diff --git a/.gitattributes b/.gitattributes index 25b46f84a6d..f5b288ab2d8 100644 --- a/.gitattributes +++ b/.gitattributes @@ -21,11 +21,8 @@ *.rtf diff=astextplain *.RTF diff=astextplain -autogen.sh text eol=lf -launcher.in text eol=lf -config.make.in text eol=lf +mono/launcher text eol=lf +mono/config.make text eol=lf targets.make text eol=lf -configure.ac text eol=lf -Makefile.in text eol=lf *.bsl linguist-vendored=true diff --git a/.gitignore b/.gitignore index a4c90c19878..e599502bb48 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,11 @@ /packages /Tools +/tests/scripts/current +/release +/debug +/Proto + # Patches that may have been generated by scripts. # (These aren't generally useful to commit directly; if anything, they should be applied.) scripts/*.patch @@ -58,8 +63,10 @@ scripts/*.patch /tests/fsharpqa/Source/CodeGen/EmittedIL/StaticInit/StaticInit_Module01.dll /tests/fsharpqa/Source/CodeGen/EmittedIL/StaticInit/StaticInit_Module01.pdb /tests/Xnet40-fsharpqa-suite-failures.log.* -/vsintegration/src/vs/FsPkgs/FSharp.Project/FS/FSharp.ProjectSystem.FSharp.fsi -/vsintegration/src/vs/FsPkgs/FSharp.Project/FS/ctofiles/ +/tests/fsharp/typeProviders/splitAssemblyTools/provider.dll +/tests/fsharp/typeProviders/splitAssemblyTypeproviders/provider.dll +/vsintegration/src/service/FsPkgs/FSharp.Project/FS/FSharp.ProjectSystem.FSharp.fsi +/vsintegration/src/service/FsPkgs/FSharp.Project/FS/ctofiles/ /tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Utils.dll /tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExprLibrary.dll /tests/fsharpqa/Source/*net40-fsharpqa-suite-failures.env @@ -82,10 +89,7 @@ Proto sign_temp .libs configure -launcher -autom4te.cache config.log -mono/config.make config.status *~ *.suo @@ -95,7 +99,6 @@ ossreadme*.txt *.csproj.user *.fsproj.user *.sln.DotSettings.user -*.ide *.log *.jrs *.chk @@ -124,3 +127,6 @@ tests/fsharpqa/testenv/bin/System.ValueTuple.dll /fcs/TestResult.xml /tests/fcs/ /fcs/.paket/Paket.Restore.targets +msbuild.binlog +/fcs/FSharp.Compiler.Service.netstandard/*.fs +/fcs/FSharp.Compiler.Service.netstandard/*.fsi diff --git a/.nuget/NuGet.Config b/.nuget/NuGet.Config deleted file mode 100644 index 225a0237b7f..00000000000 --- a/.nuget/NuGet.Config +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/.vsts-pr.yaml b/.vsts-pr.yaml new file mode 100644 index 00000000000..1f9976034fd --- /dev/null +++ b/.vsts-pr.yaml @@ -0,0 +1,62 @@ +jobs: +- job: Linux + pool: + vmImage: ubuntu-16.04 + timeoutInMinutes: 90 + strategy: + maxParallel: 2 + matrix: + release_default: + _command: ./mono/cibuild.sh + _args: release + # disabled until it can be properly fixed + #release_fcs: + # _command: ./fcs/build.sh + # _args: Build + steps: + - script: $(_command) $(_args) + - task: PublishBuildArtifacts@1 + inputs: + PathtoPublish: '$(Build.SourcesDirectory)/tests/TestResults' + ArtifactName: 'Linux $(_command) $(_args)' + publishLocation: Container + continueOnError: true + condition: failed() + +- job: Windows + pool: + vmImage: vs2017-win2016 + timeoutInMinutes: 90 + strategy: + maxParallel: 7 + matrix: + ci_part1: + _command: build.cmd + _args: release ci_part1 + ci_part2: + _command: build.cmd + _args: release ci_part2 + ci_part3: + _command: build.cmd + _args: release ci_part3 + ci_part4: + _command: build.cmd + _args: release ci_part4 + debug_default: + _command: build.cmd + _args: debug + net40_no_vs: + _command: build.cmd + _args: release net40 + release_fcs: + _command: fcs\build.cmd + _args: TestAndNuget + steps: + - script: $(_command) $(_args) + - task: PublishBuildArtifacts@1 + inputs: + PathtoPublish: '$(Build.SourcesDirectory)\tests\TestResults' + ArtifactName: 'Windows $(_command) $(_args)' + publishLocation: Container + continueOnError: true + condition: failed() diff --git a/.vsts-signed.yaml b/.vsts-signed.yaml new file mode 100644 index 00000000000..82b5d247362 --- /dev/null +++ b/.vsts-signed.yaml @@ -0,0 +1,96 @@ +jobs: +- job: Full_Signed + pool: + name: VSEng-MicroBuildVS2017 + timeoutInMinutes: 300 + variables: + MSBuildConfiguration: 'Release' + steps: + # Install Signing Plugin + - task: ms-vseng.MicroBuildTasks.30666190-6959-11e5-9f96-f56098202fef.MicroBuildSigningPlugin@1 + displayName: Install Signing Plugin + inputs: + signType: real + condition: and(succeeded(), in(variables['PB_SignType'], 'test', 'real')) + + # Install Swix Plugin + - task: ms-vseng.MicroBuildTasks.32f78468-e895-4f47-962c-58a699361df8.MicroBuildSwixPlugin@1 + displayName: Install Swix Plugin + + # Run build.cmd + - task: CmdLine@1 + displayName: Run build.cmd + inputs: + filename: build.cmd + arguments: microbuild + + # Publish nightly package to MyGet + - task: PowerShell@1 + displayName: Publish nightly package to MyGet + inputs: + scriptName: 'setup\publish-assets.ps1' + arguments: '-binariesPath $(MSBuildConfiguration) -branchName $(Build.SourceBranch) -apiKey $(FSharp.MyGetApiKey)' + condition: and(succeeded(), contains(variables['PB_PublishType'], 'myget')) + + # Publish packages to Azure Blob Storage + - task: MSBuild@1 + displayName: Publish packages to Azure Blob Storage + inputs: + solution: PublishToBlob.proj + msbuildArguments: '/t:Build /p:ExpectedFeedUrl=$(PB_PublishBlobFeedUrl) /p:AccountKey=$(PB_PublishBlobFeedKey) /p:ManifestBranch=$(SourceBranch) /p:ManifestCommit=$(SourceVersion) /p:ManifestBuildId=$(OfficialBuildId)' + condition: and(succeeded(), contains(variables['PB_PublishType'], 'blob')) + + # Create static drop + - task: PublishBuildArtifacts@1 + displayName: Create static drop + inputs: + PathtoPublish: '$(MSBuildConfiguration)' + ArtifactName: '$(Build.BuildNumber)' + publishLocation: FilePath + TargetPath: '$(DropRoot)\$(Build.DefinitionName)\$(Build.SourceBranchName)' + Parallel: true + ParallelCount: 64 + condition: and(succeeded(), contains(variables['PB_PublishType'], 'drop')) + + # Publish symbols + - task: PublishSymbols@1 + displayName: Publish symbols + inputs: + SymbolsPath: '$(DropRoot)\$(Build.DefinitionName)\$(Build.SourceBranchName)\$(Build.BuildNumber)\Symbols' + SearchPattern: '**\*.dll;**\*.exe;**\*.pdb' + SymbolsFolder: '$(Build.SourcesDirectory)\$(MSBuildConfiguration)' + TreatNotIndexedAsWarning: true + SymbolsProduct: '$(Build.DefinitionName)' + SymbolsVersion: '$(Build.BuildNumber)' + continueOnError: true + condition: and(succeeded(), contains(variables['PB_PublishType'], 'symbols')) + + # Upload VSTS Drop + - task: ms-vseng.MicroBuildTasks.4305a8de-ba66-4d8b-b2d1-0dc4ecbbf5e8.MicroBuildUploadVstsDropFolder@1 + displayName: Upload VSTS Drop + inputs: + DropFolder: '$(Build.SourcesDirectory)\$(MSBuildConfiguration)\insertion' + condition: and(succeeded(), contains(variables['PB_PublishType'], 'vsts')) + + # Execute cleanup tasks + - task: ms-vseng.MicroBuildTasks.521a94ea-9e68-468a-8167-6dcf361ea776.MicroBuildCleanup@1 + displayName: Execute cleanup tasks + condition: succeededOrFailed() + + # Publish Artifact: MicroBuildOutputs + - task: PublishBuildArtifacts@1 + displayName: 'Publish Artifact: MicroBuildOutputs' + inputs: + PathtoPublish: '$(Build.StagingDirectory)\MicroBuild\Output' + ArtifactName: MicroBuildOutputs + publishLocation: Container + condition: and(succeeded(), contains(variables['PB_PublishType'], 'microbuild')) + + # Publish Symbols to Symweb + - task: ms-vscs-artifact.build-tasks.artifactSymbolTask-1.artifactSymbolTask@0 + displayName: Publish symbols to SymWeb + inputs: + symbolServiceURI: 'https://microsoft.artifacts.visualstudio.com/DefaultCollection' + sourcePath: '$(DropRoot)\$(Build.DefinitionName)\$(Build.SourceBranchName)\$(Build.BuildNumber)\Symbols' + usePat: false + condition: and(succeeded(), contains(variables['PB_PublishType'], 'symweb')) diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index ae6f2abea5a..00000000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,230 +0,0 @@ - - Copyright (c) Microsoft Corporation. All Rights Reserved. - - See License.txt in the project root for license information. - -Visual F# -====================== - -All notable changes to this project will be documented in this file. - -### [4.0.0] - Visual Studio 2015 Update 1 - 30 November 2015 - -#### Enhancements -* Perf: `for i in expr do body` optimization [#219](https://github.com/Microsoft/visualfsharp/pull/219) -* Remove type provider security dialog and use custom icon for type provider assembly reference [#448](https://github.com/Microsoft/visualfsharp/pull/448) -* Perf: Enable parallel build inside Visual Studio [#487](https://github.com/Microsoft/visualfsharp/pull/487) -* Perf: Remove StructBox for Value Types [#549](https://github.com/Microsoft/visualfsharp/pull/549) -* Add compiler warnings for redundant arguments in raise/failwith/failwithf/nullArg/invalidOp/invalidArg [#630](https://github.com/Microsoft/visualfsharp/pull/630) -* Add a compiler warning for lower case literals in patterns [#666](https://github.com/Microsoft/visualfsharp/pull/666) - -#### Bug fixes -* Fix scope of types for named values in attributes improperly set [#437](https://github.com/Microsoft/visualfsharp/pull/437) -* Add general check for escaping typars to check phase [#442](https://github.com/Microsoft/visualfsharp/pull/442) -* Fix AccessViolationException on obfuscated assemblies [#519](https://github.com/Microsoft/visualfsharp/pull/519) -* Fix memory leaks while reloading solutions in Visual Studio [#591](https://github.com/Microsoft/visualfsharp/pull/591) -* Enable breakpoints in `with` augmentations for class types [#608](https://github.com/Microsoft/visualfsharp/pull/608) -* Fix false escaping type parameter check error [#613](https://github.com/Microsoft/visualfsharp/pull/613) -* Fix quotation of readonly fields [#622](https://github.com/Microsoft/visualfsharp/pull/622) -* Keep the reference icons when opening references [#623](https://github.com/Microsoft/visualfsharp/pull/623) -* Don't suppress missing FSI transitive references [#626](https://github.com/Microsoft/visualfsharp/pull/626) -* Make Seq.cast's non-generic and generic IEnumerable implementations equivalent [#651](https://github.com/Microsoft/visualfsharp/pull/651) - -### [4.0.0] - 20 July 2015 - -Includes commits up to `dd8252eb8d20aaedf7b1c7576cd2a8a82d24f587` - -#### Language, compiler, runtime, interactive - -* Normalization and expansion of `Array`, `List`, and `Seq` modules - * New APIs for 4.0: `chunkBySize`, `contains`, `except`, `findBack`, `findInstanceBack`, `indexed`, `item`, `mapFold`, `mapFoldBack`, `sortByDescending`, `sortDescending`, `splitInto`, `tryFindBack`, `tryFindIndexBack`, `tryHead`, `tryItem`, `tryLast` - ![Collection API additions](http://i.imgur.com/SdJ7Doh.png) -* Other new APIs - * `Option.filter`, `Option.toObj`, `Option.ofObj`, `Option.toNullable`, `Option.ofNullable` - * `String.filter` - * `Checked.int8`, `Checked.uint8` - * `Async.AwaitTask` (non-generic) - * `WebClient.AsyncDownloadFile`, `WebClient.AsyncDownloadData` - * `tryUnbox`, `isNull` -* New active pattern to match constant `Decimal` in quotations -* Slicing support for lists -* Support for consuming high-rank (> 4) arrays -* Support for units of measure in `printf`-family functions -* Support for constructors/class names as first-class functions -* Improved exception stack traces in async code -* Automatic `mutable`/`ref` conversion -* Support for static arguments to provided methods -* Support for non-nullable provided types -* Added `NonStructuralComparison` module containing non-structural comparison operators -* Support for rational exponents in units of measure -* Give fsi.exe, fsiAnyCpi.exe nice icons -* `Microsoft.` optional in namepsace paths from FSharp.Core -* Support for extension properties in object initializers -* Pre-support (not yet used) for additional nativeptr intrinsics -* Simplified, more robust resolution of type references in quotations -* Support for inheritance of types that have multiple interface instantiations -* Extended preprocessor grammar -* Support for implicit quotation of expressions used as method arguments -* Support for multiple properties in `[]` -* Eliminate tuple allocation for implicitly returned formal arguments -* Perf: fsc.exe now uses `GCLatencyMode.Batch` -* Perf: Improved `hash`/`compare`/`distinctBy`/`groupBy` performance -* Perf: `Seq.toArray` perf improvement -* Perf: Use `OptimizedClosures.FSharpFunc` in seq.fs where applicable -* Perf: Use literals and mutable variables instead of ref cells for better performance in SHA1 calc -* Perf: Use smart blend of `System.Array.Copy` and iterative copy for array copies -* Perf: Change `Seq.toList` to mutation-based to remove reliance on `List.rev` -* Perf: Change `pdbClose` to test if files are locked before inducing GCs -* Perf: Use server GC mode for compiler -* Bugfix: Changed an error message within the Set module to use the correct module name. -* Bugfix: Fix assembly name of warning FS2003 -* Bugfix [#132](http://visualfsharp.codeplex.com/workitem/132): FSI Shadowcopy causes a significant degrade in the fsi first execute time -* Bugfix [#131](https://visualfsharp.codeplex.com/workitem/131): Fix getentryassembly return value when shadowcopy is enabled in FSI -* Bugfix [#61](https://visualfsharp.codeplex.com/workitem/61) Nonverifiable code generated with units of measure conversion -* Bugfix [#68](https://visualfsharp.codeplex.com/workitem/68) BadImageFormatException with Units of Measure -* Bugfix [#146](https://visualfsharp.codeplex.com/workitem/146) BadImageFormatException in both Release and Debug build with units of measure -* Bugfix: Incorrent cross-module inlining between different .NET profiles -* Bugfix: Properly document exceptions in `Array` module -* Bugfix [#24](https://visualfsharp.codeplex.com/workitem/24): Error reporting of exceptions in type providers `AddMemberDelayed` -* Bugfix [#13](https://github.com/fsharp/fsharp/issues/13): Error on FSI terminal resize -* Bugfix [#29](https://github.com/fsharp/fsharp/issues/29): Module access modifier `internal` does not give internal access if no namespaces are used -* Bugfix: Fix typo in error message for invalid attribute combination -* Bugfix [#27](https://github.com/microsoft/visualfsharp/issues/27): Private module values can be mutated by other modules -* Bugfix [#38](https://github.com/microsoft/visualfsharp/issues/38): ICE - System.ArgumentException: not a measure abbreviation, or incorrect kind -* Bugfix [#44](https://github.com/microsoft/visualfsharp/issues/44): Problems using FSI to `#load` multiple files contributing to the same namespace -* Bugfix [#95](https://github.com/microsoft/visualfsharp/issues/95): `[]` allows access to DU member if qualified only by module name -* Bugfix [#89](https://github.com/microsoft/visualfsharp/issues/89): Embedding an untyped quotation in a typed quotation results in ArgumentException -* Bugfix: Show warning when Record is accessed without type but `[]` was set -* Bugfix [#139](https://visualfsharp.codeplex.com/workitem/139): Memory leak in `Async.AwaitWaitHandle` -* Bugfix [#122](https://github.com/microsoft/visualfsharp/issues/122): `stfld` does not give `.volatile` annotation -* Bugfix [#30](https://github.com/microsoft/visualfsharp/issues/30): Compilation error "Incorrect number of type arguments to local call" -* Bugfix [#163](https://github.com/microsoft/visualfsharp/issues/163): Array slicing does not work properly with non 0-based arrays -* Bugfix [#148](https://github.com/microsoft/visualfsharp/issues/148): XML doc comment generation adding empty garbage -* Bugfix [#98](https://github.com/Microsoft/visualfsharp/issues/98): Using a single, optional, static parameter to a type provider causes failure -* Bugfix [#109](https://github.com/Microsoft/visualfsharp/issues/109): Invalid interface generated by --sig -* Bugfix [#123](https://github.com/Microsoft/visualfsharp/issues/123): Union types without sub-classes should be sealed -* Bugfix [#68](https://github.com/Microsoft/visualfsharp/issues/68): F# 3.1 / Profile 259: `<@ System.Exception() @>` causes AmbiguousMatchException at runtime -* Bugfix [#9](https://github.com/Microsoft/visualfsharp/issues/9): Internal error in FSI: FS0192: binding null type in envBindTypeRef -* Bugfix [#10](https://github.com/Microsoft/visualfsharp/issues/10): Internal error: binding null type in envBindTypeRef -* Bugfix [#266](https://github.com/Microsoft/visualfsharp/issues/266): `windowed` error message incorrectly flags "non-negative" input when "positive" is what's needed -* Bugfix [#270](https://github.com/Microsoft/visualfsharp/issues/270): "internal error: null: convTypeRefAux" in interactive when consuming quotation containing type name with commas or spaces -* Bugfix [#276](https://github.com/Microsoft/visualfsharp/issues/276): Combining struct field with units of measure will result managed type instead of unmanaged type -* Bugfix [#269](https://github.com/Microsoft/visualfsharp/issues/269): Accidentally `#load`ing a DLL in script causes internal error -* Bugfix [#293](https://github.com/Microsoft/visualfsharp/issues/293): `#r` references without relative path are not loaded when file is local -* Bugfix [#237](https://github.com/Microsoft/visualfsharp/issues/237): Problems using FSI on multiple namespaces in a single file -* Bugfix [#338](https://github.com/Microsoft/visualfsharp/issues/338): Escaped unicode characters are encoded incorrectly -* Bugfix [#370](https://github.com/Microsoft/visualfsharp/issues/370): `Seq.sortBy` cannot handle sequences of floats containing NaN -* Bugfix [#368](https://github.com/Microsoft/visualfsharp/issues/368): Optimizer incorrectly assumes immutable field accesses are side-effect free -* Bugfix [#337](https://github.com/Microsoft/visualfsharp/issues/337): Skip interfaces that lie outside the set of referenced assemblies -* Bugfix [#383](https://github.com/Microsoft/visualfsharp/issues/383): Class with `[]` barred from inheriting from normal non-nullable class -* Bugfix [#420](https://github.com/Microsoft/visualfsharp/issues/420): Compiler emits incorrect visibility modifier for internal constructors of abstract class -* Bugfix [#362](https://github.com/Microsoft/visualfsharp/issues/362): Depickling assertion followed by nullref internal errors in units-of-measure case -* Bugfix [#342](https://github.com/Microsoft/visualfsharp/issues/342): FS0193 error when specifying sequential struct layout of a type -* Bugfix [#299](https://github.com/Microsoft/visualfsharp/issues/299): AmbiguousMatchException with `[]` on overloaded extension methods -* Bugfix [#316](https://github.com/Microsoft/visualfsharp/issues/316): Null array-valued attribute causes internal compiler error -* Bugfix [#147](https://github.com/Microsoft/visualfsharp/issues/147): FS0073: internal error: Undefined or unsolved type variable: 'a -* Bugfix [#34](https://github.com/Microsoft/visualfsharp/issues/34): Error in pass2 for type FSharp.DataFrame.FSharpFrameExtensions, error: duplicate entry 'Frame2.GroupRowsBy' in method table -* Bugfix [#212](https://github.com/Microsoft/visualfsharp/issues/212): Record fields initialized in wrong order -* Bugfix [#445](https://github.com/Microsoft/visualfsharp/issues/445): Inconsistent compiler prompt message when using `--pause` switch -* Bugfix [#238](https://github.com/Microsoft/visualfsharp/issues/238): Generic use of member constraint solved to record field causes crash - -#### Visual Studio - -* Updated all templates (except tutorial) to include AssemblyInfo.fs setup in the same manner as default C# project templates -* Add keyboard shortcuts for FSI reset and clear all -* Improved debugger view for Map values -* Improved performance reading stdout/stderr from fsi.exe to F# Interactive window -* Support for VS project up-to-date check -* Improved project template descriptions, make it clearer how to target Xamarin platforms -* Intellisense completion in object initializers -* Add menu entry "Open folder in File Explorer" on folder nodes -* Intellisense completion for named arguments -* `Alt+Enter` sends current line of code to interactive if there is no selection -* Support for debugging F# scripts with the VS debugger -* Add support for hexadecimal values (like 0xFF) ??to MSBuild property BaseAddress -* Updated menu icons used for F# interactive to align with other VS interactive windows -* Bugfix: Fix url of fsharp.org website in vs templates -* Bugfix [#141](https://visualfsharp.codeplex.com/workitem/141): The "Error List" window does not parse MSBuild messages correctly -* Bugfix [#147](https://visualfsharp.codeplex.com/workitem/147): Go to definition doesn't work for default struct ctors -* Bugfix [#50](https://github.com/microsoft/visualfsharp/issues/50): Members hidden from IntelliSense still show up in tooltips -* Bugfix [#57](https://github.com/microsoft/visualfsharp/issues/57) (partial): Visual Studio locking access to XML doc files -* Bugfix [#157](https://github.com/Microsoft/visualfsharp/issues/157): Should not allow Framework 4 / F# 3.1 combination in project properties -* Bugfix [#114](https://github.com/Microsoft/visualfsharp/issues/114): Portable Library (legacy) template displays wrong target framework version -* Bugfix [#273](https://github.com/Microsoft/visualfsharp/issues/273): VS editor shows bogus errors when scripts use multi-hop `#r` and `#load` with relative paths -* Bugfix [#312](https://github.com/Microsoft/visualfsharp/issues/312): F# library project templates and portable library templates do not have `AutoGenerateBindingRedirects` set to true -* Bugfix [#321](https://github.com/Microsoft/visualfsharp/issues/321): Provided type quickinfo shouldn't show hidden and obsolete members from base class -* Bugfix [#319](https://github.com/Microsoft/visualfsharp/issues/319): Projects with target runtime 3.0 don't show up correctly on the VS project dialog -* Bugfix [#283](https://github.com/Microsoft/visualfsharp/issues/283): Changing target framework causes incorrect binding redirects to be added to app.config -* Bugfix [#278](https://github.com/Microsoft/visualfsharp/issues/278): NullReferenceException when trying to add some COM references -* Bugfix [#259](https://github.com/Microsoft/visualfsharp/issues/259): Renaming files in folders causes strange UI display -* Bugfix [#350](https://github.com/Microsoft/visualfsharp/issues/350): Renaming linked file results in error dialog -* Bugfix [#381](https://github.com/Microsoft/visualfsharp/issues/381): Intellisense stops working when referencing PCL component from script (requires `#r "System.Runtime"`) -* Bugfix [#104](https://github.com/Microsoft/visualfsharp/issues/104): Using paste to add files to an F# project causes the order of files in the project and on the UI to get out of sync -* Bugfix [#417](https://github.com/Microsoft/visualfsharp/issues/417): 'Move file up/down' keybindings should be scoped to solution explorer -* Bugfix [#246](https://github.com/Microsoft/visualfsharp/issues/246): Fix invalid already rendered folder error -* Bugfix [#106](https://github.com/Microsoft/visualfsharp/issues/106) (partial): Visual F# Tools leak memory while reloading solutions - -### [3.1.2] - 20 August 2014 - -Includes commits up to `3385e58aabc91368c8e1f551650ba48705aaa285` - -#### Language, compiler, runtime, interactive - -* Allow arbitrary-dimensional slicing -* Ship versions FSharp.Core.dll built on portable profiles 78 and 259 -* Support "shebang" (`#!`) in F# source files -* Vertical pipes disallowed in active pattern case identifiers -* Enable non-locking shadow copy of reference assemblies in fsi/fsianycpu -* Inline codegen optimization using structs -* Perf improvement for `Seq.windowed` -* exe.config files for fsc, fsi, fsianycpu now use simple version range instead of long set of explicit version redirects -* Bugfix [#72](https://visualfsharp.codeplex.com/workitem/72): Indexer properties with more than 4 arguments cannot be accessed -* Bugfix [#113](https://visualfsharp.codeplex.com/workitem/113): `Async.Sleep` in .NETCore profiles does not invoke error continuation -* Bugfix [#91](https://visualfsharp.codeplex.com/workitem/91): String module documentation is false -* Bugfix [#78](https://visualfsharp.codeplex.com/workitem/78): Allow space characters in active pattern case identifiers -* Bugfix: Invalid code generated when calling VB methods with optional byref args -* Bugfix [#69](https://visualfsharp.codeplex.com/workitem/69): Invalid code generated when calling C# method with optional nullable args -* Bugfix [#9](https://visualfsharp.codeplex.com/workitem/9): XML doc comments on F# record type fields do not appear when accessing in C# -* Bugfix [#59](https://visualfsharp.codeplex.com/workitem/59): Compiler always requires System.Runtime.InteropServices, this is not present in all portable profiles -* Bugfix [#17](https://visualfsharp.codeplex.com/workitem/17): Incorrect generation of XML from doc comments for Record fields -* Bugfix [#7](https://visualfsharp.codeplex.com/workitem/17): NullRef in list comprehension, when for loop works -* Bugfix [#1](https://visualfsharp.codeplex.com/workitem/1): Type inference involving generic param arrays -* Bugfix [#37](https://visualfsharp.codeplex.com/workitem/37): Perf regression in 3.1.0 related to resolving extension methods -* Bugfix: Can't run F# console application with 'update' in name -* Bugfix: Slicing and range expression inconsistent -* Bugfix: Invalid code is generated when using field initializers in struct constructor - -#### Visual Studio - -* Project templates for F# portable libraries targeting profiles 78 and 259 -* Enable non-locking shadow copy of reference assemblies in fsi/fsianycpu (VS options added) -* Allow breakpoints to be set inside of quotations -* Support "Publish" action in project system for web, Azure -* Bugfix [#126](https://visualfsharp.codeplex.com/workitem/126): F# package installer does not honor custom install paths for express SKUs -* Bugfix [#75](https://visualfsharp.codeplex.com/workitem/75): Microsoft.FSharp.Targets shim not deployed with F# SDK -* Bugfix: Fix crash in smart indent provider -* Bugfix [#55](https://visualfsharp.codeplex.com/workitem/55): Cannot add reference to F# PCL project -* Bugfix: Typos in tutorial project script -* Bugfix: Required C# event members do not appear in intellisense when signature is (object, byref) - - -### [3.1.1] - 24 January 2014 - -#### Language, compiler, runtime, interactive - -* Improve F# compiler telemetry -* Bugfix: Improper treatment of * in AssemblyVersion attribute -* Bugfix: ``sprintf "%%"`` returns `"%%"` in F# 3.1.0, previously returned `"%"` in F# 3.0 and earlier -* Bugfix: F# 3.0 1D slice setter does not compile in F# 3.1.0 - -#### Visual Studio - -* Enable installation of Visual F# on VS Desktop Express -* Added support for showing xml doc comments for named arguments -* Visual F# package deployable on non-VS machines. Deploys compiler and runtime toolchain plus msbuild targets -* Bugfix: Errors when attempting to add reference to .NET core library -* Bugfix: Crash in `FSComp.SR.RunStartupValidation()` - -[4.0.0]: http://fsharp.org -[3.1.2]: http://blogs.msdn.com/b/fsharpteam/archive/2014/08/20/announcing-the-release-of-visual-f-tools-3-1-2.aspx -[3.1.1]: http://blogs.msdn.com/b/fsharpteam/archive/2014/01/22/announcing-visual-f-3-1-1-and-support-for-desktop-express.aspx diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b9d39237b9f..5299179bd03 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,7 +2,7 @@ The Visual F# team is proud to be a contributor to F#, and urge you to join in too. F# users and the F# community are grateful for all contributions to F#. -Besides this overview, we recommend ["Becoming a contributor"](http://mrange.wordpress.com/2014/12/11/becoming-an-fsharp-contributor/), a community blog post by Mårten Rånge. +Besides this overview, we recommend ["A journey into the F~ compiler"](https://skillsmatter.com/skillscasts/11629-a-journey-into-the-f-sharp-compiler/), a talk by Steffen Forkmann. For those contributing to the core of the F# compiler, we recommend ["The F# Compiler Technical Overview"](http://fsharp.github.io/2015/09/29/fsharp-compiler-guide.html) ### Getting Started @@ -68,8 +68,6 @@ Contributions to this repository will be rigorously policed for quality. All code submissions should be submitted with regression test cases, and will be subject to peer review by the community and Microsoft. The bar for contributions will be high. This will result in a higher-quality, more stable product. -- We expect contributors to be actively involved in quality assurance. -- We expect contributors to be actively involved in quality assurance. - We expect contributors to be actively involved in quality assurance. - Partial, incomplete, or poorly-tested contributions will not be accepted. - Contributions may be put on hold according to stability, testing, and design-coherence requirements. @@ -113,7 +111,7 @@ Feature PRs have the following minimum requirements: - For Visual F# Tools features, include a link to the [Visual F# Tools](https://github.com/microsoft/visualfsharp) issue for the feature. -- For F# Library features, if you have made additions to the FSharp.Core library public surface area, update [the SurfaceArea tests](https://github.com/Microsoft/visualfsharp/tree/fsharp4/src/fsharp/FSharp.Core.Unittests). +- For F# Library features, if you have made additions to the FSharp.Core library public surface area, update [the SurfaceArea tests](https://github.com/Microsoft/visualfsharp/tree/fsharp4/tests/FSharp.Core.UnitTests). - For F# Language and Library features, you will be asked to submit a speclet for the feature to the [F# Language Design](https://github.com/fsharp/fslang-design) GitHub repository of speclets. In some cases you will only need to do this after your feature is accepted, but for more complex features you may be asked to do this during the review of the feature. diff --git a/DEVGUIDE.md b/DEVGUIDE.md index c41d635de4b..82b79e2bafd 100644 --- a/DEVGUIDE.md +++ b/DEVGUIDE.md @@ -1,27 +1,38 @@ # Development Guide +## Get the Latest F# Compiler Source Code + +Get the latest source code from the master branch by running this git command: + + git clone https://github.com/Microsoft/visualfsharp.git + +Before running the build scripts, ensure that you have cleaned up the visualfsharp repo by running this git command: + + git clean -xfd + +This will remove any files that are not under version control. This is necessary only if you have already attempted to build the solution or have made other changes that might prevent it from building. + +## Installing Dependencies and Building + Follow the instructions below to build and develop the F# Compiler, Core Library and tools on Windows, macOS and Linux. -* [Developing the F# Compiler (Windows)](#developing-the-f-compiler-windows) -* [Developing the F# Compiler (Linux)](#developing-the-f-compiler-linux) -* [Developing the F# Compiler (macOS)](#developing-the-f-compiler-macos) -* [Developing the Visual F# IDE Tools (Windows Only)](#developing-the-visual-f-ide-tools-windows-only) -* [Notes and Resources](#notes) +- [Developing the F# Compiler (Windows)](#developing-the-f-compiler-windows) +- [Developing the F# Compiler (Linux)](#developing-the-f-compiler-linux) +- [Developing the F# Compiler (macOS)](#developing-the-f-compiler-macos) +- [Developing the Visual F# IDE Tools (Windows Only)](#developing-the-visual-f-ide-tools-windows-only) +- [Notes and Resources](#notes) -### Developing the F# Compiler (Windows) +### Developing the F# Compiler (Windows) Install -- [.NET 4.5.1](http://www.microsoft.com/en-us/download/details.aspx?id=40779) -- [MSBuild 12.0](http://www.microsoft.com/en-us/download/details.aspx?id=40760) or Visual Studio 2013 (or later) +- [.NET 4.6](https://www.microsoft.com/en-gb/download/details.aspx?id=48130) **NOTE on Windows:** -1. It is recommended to run the build.cmd and the qualifiers below on a command prompt with path set to have the location of MSBuild. If we have Visual Studio, we can also run using `Developer Command Prompt for Visual Studio 20xx` (depends on Visual Studio version). This developer command prompt is easier to use than normal command prompt, because it already has the correct path of Visual Studio and .NET's tooling set for us to use (including MSBuild). -2. The running command prompt must be run under Administrator right (`Run as Administrator`). -Before running the build scripts, ensure that you have cleaned up the visualfsharp repo by running this git command: +1. It is recommended to run `build.cmd` in a command prompt with path set to have the location of MSBuild. If you have Visual Studio, we can run using `Developer Command Prompt for Visual Studio 20xx` (depends on Visual Studio version). This developer command prompt is easier to use than normal command prompt, because it already has the correct path of Visual Studio and .NET's tooling set for us to use (including MSBuild). - git clean -xfd +2. The command prompt must have Administrator rights (`Run as Administrator`). On Windows you can build the F# compiler for .NET Framework as follows: @@ -60,42 +71,67 @@ After you build the first time you can open and use this solution: or just build it directly: - msbuild FSharp.sln + msbuild FSharp.sln -Building ``FSharp.sln`` builds nearly everything. However building portable profiles of -FSharp.Core.dll is not included. If you are just developing the core compiler and library -then building the solution will be enough. +If you are just developing the core compiler and library then building ``FSharp.sln`` will be enough. -### Developing the F# Compiler (Linux) +### Developing the F# Compiler (Linux) For Linux/Mono, follow [these instructions](http://www.mono-project.com/docs/getting-started/install/linux/). Also you may need: - sudo apt-get install mono-complete autoconf libtool pkg-config make git automake + sudo apt-get install mono-complete make git Then: - - ./autoconf.sh --prefix /usr + make - make install -Full testing is not yet enabled on Linux, nor is a .NET Core build of the compiler. +Then to replace your machine-wide installation: + + sudo make install -You can alternatively use +Full testing is not yet enabled on Linux. - ./build.sh +### Developing the F# Compiler (macOS) -### Developing the F# Compiler (macOS) +Install XCode command line tools (or homebrew equivalents) and Mono or Visual Studio for Mac. -Install Xamarin Studio, then +Then: - ./autogen.sh --prefix=/Library/Frameworks/Mono.framework/Versions/Current/ make + +Then to replace your machine-wide installation: + sudo make install +Full testing is not yet enabled on macOS. + +### [Optional] Specifying the install path (Linux or macOS) + +You can specify a custom installation path using the DESTDIR shell variable + + DESTDIR=/my/path/to/fsharp make install + +### Developing the F# Compiler (Linux or macOS - .NET Core) + +Install [the latest .NET SDK](https://www.microsoft.com/net/download/). Then use + + src/buildfromsource.sh + +Outputs are placed in + + BuildFromSource/Debug/... + BuildFromSource/Release/... + +This uses an installed .NET SDK 2.0 to build the various duplicated project + +Testing the .NET Core version of the F# compiler on macOS and Linux is TBD. + ### Developing the Visual F# IDE Tools (Windows Only) To build and test Visual F# IDE Tools, install these requirements: -- [Visual Studio 2017](https://www.visualstudio.com/downloads/) + +- Download [Visual Studio 2017](https://www.visualstudio.com/downloads/) +- Launch the Visual Studio Installer - Under the "Windows" workloads, select ".NET desktop development" - Select "F# desktop language support" under the optional components - Under the "Other Toolsets" workloads, select "Visual Studio extension development" @@ -108,16 +144,16 @@ Steps to build: Use ``VisualFSharp.sln`` if you're building the Visual F# IDE Tools. -Note on Debug vs Release: ``Release`` Configuration has a degraded debugging experience, so if you want to test a change locally, it is recommended to do it in the ``Debug`` configuration. For more information see https://github.com/Microsoft/visualfsharp/issues/2771 and https://github.com/Microsoft/visualfsharp/pull/2773. +Note on Debug vs Release: ``Release`` Configuration has a degraded debugging experience, so if you want to test a change locally, it is recommended to do it in the ``Debug`` configuration. For more information see issues [#2771](https://github.com/Microsoft/visualfsharp/issues/2771) and [#2773](https://github.com/Microsoft/visualfsharp/pull/2773). -Note: if you face this error [#2351](https://github.com/Microsoft/visualfsharp/issues/2351): +Note ([#2351](https://github.com/Microsoft/visualfsharp/issues/2351)): if you face this error: -> error VSSDK1077: Unable to locate the extensions directory. "ExternalSettingsManager::GetScopePaths failed to initialize PkgDefManager for C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\devenv.exe". +> error VSSDK1077: Unable to locate the extensions directory. "ExternalSettingsManager::GetScopePaths failed to initialize PkgDefManager for C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\devenv.exe". Or hard crash on launch ("Unknown Error"), delete these folders: -* `%localappdata%\Microsoft\VisualStudio\15.0_(some number here)RoslynDev` -* `%localappdata%\Microsoft\VisualStudio\15.0_(some number here)` +- `%localappdata%\Microsoft\VisualStudio\15.0_(some number here)RoslynDev` +- `%localappdata%\Microsoft\VisualStudio\15.0_(some number here)` #### [Optional] Install the Visual F# IDE Tools (Windows Only) @@ -131,18 +167,18 @@ components installed in that VS installation. You can revert this step by disab For **Debug**, uninstall then reinstall: VSIXInstaller.exe /u:"VisualFSharp" - VSIXInstaller.exe debug\net40\bin\VisualFSharpOpenSource.vsix + VSIXInstaller.exe debug\net40\bin\VisualFSharpFull.vsix For **Release**, uninstall then reinstall: VSIXInstaller.exe /u:"VisualFSharp" - VSIXInstaller.exe release\net40\bin\VisualFSharpOpenSource.vsix + VSIXInstaller.exe release\net40\bin\VisualFSharpFull.vsix Restart Visual Studio, it should now be running your freshly-built Visual F# IDE Tools with updated F# Interactive. #### [Optional] F5 testing of local changes -To test your changes locally _without_ overwriting your default installed Visual F# tools, set the `VisualFSharp\Vsix\VisualFSharpOpenSource` +To test your changes locally _without_ overwriting your default installed Visual F# tools, set the `VisualFSharp\Vsix\VisualFSharpFull` project as the startup project. When you hit F5 a new instance of Visual Studio will be started in the `RoslynDev` hive with your changes, but the root (default) hive will remain untouched. You can also start this hive automatically using @@ -170,18 +206,16 @@ For **Release**: vsintegration\update-vsintegration.cmd release -# Notes +## Debugging the F# Compiler + +See the "Debugging The Compiler" section of this [article](https://medium.com/@willie.tetlow/f-mentorship-week-1-36f51d3812d4) + +## Notes #### Windows: Links to Additional frameworks - [Git for windows](http://msysgit.github.io/) -- [.NET 3.5](http://www.microsoft.com/en-us/download/details.aspx?id=21) -- [.NET 4.5](http://www.microsoft.com/en-us/download/details.aspx?id=30653) -- [.NET 4.5.1](http://www.microsoft.com/en-us/download/details.aspx?id=40779) - [.NET 4.6](http://www.microsoft.com/en-us/download/details.aspx?id=48137) -- [MSBuild 12.0](http://www.microsoft.com/en-us/download/details.aspx?id=40760) -- [Windows 7 SDK](http://www.microsoft.com/en-us/download/details.aspx?id=8279) -- [Windows 8 SDK](http://msdn.microsoft.com/en-us/windows/desktop/hh852363.aspx) - [Windows 8.1 SDK](http://msdn.microsoft.com/en-us/library/windows/desktop/bg162891.aspx) - [Windows 10 SDK](https://developer.microsoft.com/en-US/windows/downloads/windows-10-sdk) @@ -196,16 +230,33 @@ For **Release**: - We use the proto compiler to compile the source for `FSharp.Core.dll` in this distribution. - We use the proto compiler to compile the source for `FSharp.Compiler.dll`, `fsc.exe`, `fsi.exe`, and other binaries found in this distribution. +#### Updating FSComp.fs + +If you change error messages you may need to update FSComp.fs in `src\buildfromsource\FSharp.Compiler.Private`. + +To do this, build the non-buildfromsource version of FSharp.Compiler.Private (src\fsharp\FSharp.Compiler.Private) then check its obj\ directory for `FSComp.fs` and manually copy that into the buildfromsource directory. + + .\build net40 + copy /y src\fsharp\FSharp.Compiler.Private\obj\release\net40\FSComp.* src\buildfromsource\FSharp.Compiler.Private\ + +You can also change build.cmd to default COPY_FSCOMP_RESOURCE_FOR_BUILD_FROM_SOURCES to 1 under ":ARGUMENTS_OK" label. + #### Configuring proxy server If you are behind a proxy server, NuGet client tool must be configured to use it: - .nuget\nuget.exe config -set http_proxy=proxy.domain.com:8080 -ConfigFile .nuget\NuGet.Config - .nuget\nuget.exe config -set http_proxy.user=user_name -ConfigFile .nuget\NuGet.Config - .nuget\nuget.exe config -set http_proxy.password=user_password -ConfigFile .nuget\NuGet.Config + .nuget\nuget.exe config -set http_proxy=proxy.domain.com:8080 -ConfigFile NuGet.Config + .nuget\nuget.exe config -set http_proxy.user=user_name -ConfigFile NuGet.Config + .nuget\nuget.exe config -set http_proxy.password=user_password -ConfigFile NuGet.Config Where you should set proper proxy address, user name and password. +#### When modifying, adding, or removing keywords or compiler messages + +If your changes involve modifying the list of language keywords in any way, (e.g. when implementing a new keyword), the XLF localization files need to be synced with the corresponding resx files. This can be done automatically by running `msbuild FSharp.Compiler.Private.fsproj /t:UpdateXlf` (located in [src\fsharp\FSharp.Compiler.Private](https://github.com/Microsoft/visualfsharp/tree/master/src/fsharp/FSharp.Compiler.Private)). This only works on Windows/.NETStandard framework, so changing this from any other platform requires editing and syncing all of the XLF files manually. + +After this, you must copy any differing `resx` files from the output directory into the corresponding subdirectory in [src\buildfromsource](https://github.com/Microsoft/visualfsharp/tree/master/src/fsharp/FSharp.Compiler.Private). This step will soon be eliminated (see issue [#3905](https://github.com/Microsoft/visualfsharp/issues/3905)). + #### Resources The primary technical guide to the core compiler code is [The F# Compiler Technical Guide](http://fsharp.github.io/2015/09/29/fsharp-compiler-guide.html). Please read and contribute to that guide. diff --git a/DotnetCLIToolsVersion.txt b/DotnetCLIToolsVersion.txt index 07fe0f906a8..6e840019a3b 100644 --- a/DotnetCLIToolsVersion.txt +++ b/DotnetCLIToolsVersion.txt @@ -1 +1 @@ -2.0.3-servicing-007056 + 2.1.400-preview-009197 diff --git a/FSharp.Directory.Build.props b/FSharp.Directory.Build.props new file mode 100644 index 00000000000..e9c2a5c5e99 --- /dev/null +++ b/FSharp.Directory.Build.props @@ -0,0 +1,6 @@ + + + + + + diff --git a/FSharp.Directory.Build.targets b/FSharp.Directory.Build.targets new file mode 100644 index 00000000000..0c0448113ce --- /dev/null +++ b/FSharp.Directory.Build.targets @@ -0,0 +1,6 @@ + + + + + + diff --git a/FSharp.sln b/FSharp.sln index bfa07b6d43d..923255dd35b 100644 --- a/FSharp.sln +++ b/FSharp.sln @@ -29,9 +29,9 @@ Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Fsi", "src\fsharp\fsi\Fsi.f EndProject Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Tests.FSharpSuite", "tests\fsharp\FSharp.Tests.FSharpSuite.fsproj", "{C163E892-5BF7-4B59-AA99-B0E8079C67C4}" EndProject -Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Compiler.Unittests", "src\fsharp\FSharp.Compiler.Unittests\FSharp.Compiler.Unittests.fsproj", "{A8D9641A-9170-4CF4-8FE0-6DB8C134E1B5}" +Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Compiler.UnitTests", "tests\FSharp.Compiler.UnitTests\FSharp.Compiler.UnitTests.fsproj", "{A8D9641A-9170-4CF4-8FE0-6DB8C134E1B5}" EndProject -Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Core.Unittests", "src\fsharp\FSharp.Core.Unittests\FSharp.Core.Unittests.fsproj", "{88E2D422-6852-46E3-A740-83E391DC7973}" +Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Core.UnitTests", "tests\FSharp.Core.UnitTests\FSharp.Core.UnitTests.fsproj", "{88E2D422-6852-46E3-A740-83E391DC7973}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Compiler", "Compiler", "{3881429D-A97A-49EB-B7AE-A82BA5FE9C77}" EndProject @@ -39,9 +39,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tools", "Tools", "{B8DDA694 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libraries", "Libraries", "{3058BC79-8E79-4645-B05D-48CC182FA8A6}" EndProject -Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "HostedCompilerServer", "tests\fsharpqa\testenv\src\HostedCompilerServer\HostedCompilerServer.fsproj", "{4239EFEA-E746-446A-BF7A-51FCBAB13946}" -EndProject -Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "ILComparer", "tests\fsharpqa\testenv\src\ILComparer\ILComparer.fsproj", "{2E60864A-E3FF-4BCC-810F-DC7C34E6B236}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "fsharpqafiles", "tests\fsharpqa\fsharpqafiles.csproj", "{AAAAD274-696A-49EC-AAAA-F870BE91AAAA}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -185,26 +183,17 @@ Global {88E2D422-6852-46E3-A740-83E391DC7973}.Release|Any CPU.Build.0 = Release|Any CPU {88E2D422-6852-46E3-A740-83E391DC7973}.Release|x86.ActiveCfg = Release|Any CPU {88E2D422-6852-46E3-A740-83E391DC7973}.Release|x86.Build.0 = Release|Any CPU - {4239EFEA-E746-446A-BF7A-51FCBAB13946}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4239EFEA-E746-446A-BF7A-51FCBAB13946}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4239EFEA-E746-446A-BF7A-51FCBAB13946}.Debug|x86.ActiveCfg = Debug|Any CPU - {4239EFEA-E746-446A-BF7A-51FCBAB13946}.Debug|x86.Build.0 = Debug|Any CPU - {4239EFEA-E746-446A-BF7A-51FCBAB13946}.Proto|Any CPU.ActiveCfg = Release|Any CPU - {4239EFEA-E746-446A-BF7A-51FCBAB13946}.Proto|x86.ActiveCfg = Release|Any CPU - {4239EFEA-E746-446A-BF7A-51FCBAB13946}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4239EFEA-E746-446A-BF7A-51FCBAB13946}.Release|Any CPU.Build.0 = Release|Any CPU - {4239EFEA-E746-446A-BF7A-51FCBAB13946}.Release|x86.ActiveCfg = Release|Any CPU - {4239EFEA-E746-446A-BF7A-51FCBAB13946}.Release|x86.Build.0 = Release|Any CPU - {2E60864A-E3FF-4BCC-810F-DC7C34E6B236}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2E60864A-E3FF-4BCC-810F-DC7C34E6B236}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2E60864A-E3FF-4BCC-810F-DC7C34E6B236}.Debug|x86.ActiveCfg = Debug|Any CPU - {2E60864A-E3FF-4BCC-810F-DC7C34E6B236}.Debug|x86.Build.0 = Debug|Any CPU - {2E60864A-E3FF-4BCC-810F-DC7C34E6B236}.Proto|Any CPU.ActiveCfg = Release|Any CPU - {2E60864A-E3FF-4BCC-810F-DC7C34E6B236}.Proto|x86.ActiveCfg = Release|Any CPU - {2E60864A-E3FF-4BCC-810F-DC7C34E6B236}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2E60864A-E3FF-4BCC-810F-DC7C34E6B236}.Release|Any CPU.Build.0 = Release|Any CPU - {2E60864A-E3FF-4BCC-810F-DC7C34E6B236}.Release|x86.ActiveCfg = Release|Any CPU - {2E60864A-E3FF-4BCC-810F-DC7C34E6B236}.Release|x86.Build.0 = Release|Any CPU + {AAAAD274-696A-49EC-AAAA-F870BE91AAAA}.Debug|Any CPU.ActiveCfg = Debug|x86 + {AAAAD274-696A-49EC-AAAA-F870BE91AAAA}.Debug|x86.ActiveCfg = Debug|x86 + {AAAAD274-696A-49EC-AAAA-F870BE91AAAA}.Debug|x86.Build.0 = Debug|x86 + {AAAAD274-696A-49EC-AAAA-F870BE91AAAA}.Proto|Any CPU.ActiveCfg = Debug|x86 + {AAAAD274-696A-49EC-AAAA-F870BE91AAAA}.Proto|Any CPU.Build.0 = Debug|x86 + {AAAAD274-696A-49EC-AAAA-F870BE91AAAA}.Proto|x86.ActiveCfg = Debug|x86 + {AAAAD274-696A-49EC-AAAA-F870BE91AAAA}.Proto|x86.Build.0 = Debug|x86 + {AAAAD274-696A-49EC-AAAA-F870BE91AAAA}.Release|Any CPU.ActiveCfg = Debug|x86 + {AAAAD274-696A-49EC-AAAA-F870BE91AAAA}.Release|Any CPU.Build.0 = Debug|x86 + {AAAAD274-696A-49EC-AAAA-F870BE91AAAA}.Release|x86.ActiveCfg = Debug|x86 + {AAAAD274-696A-49EC-AAAA-F870BE91AAAA}.Release|x86.Build.0 = Debug|x86 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -221,7 +210,9 @@ Global {C163E892-5BF7-4B59-AA99-B0E8079C67C4} = {CFE3259A-2D30-4EB0-80D5-E8B5F3D01449} {A8D9641A-9170-4CF4-8FE0-6DB8C134E1B5} = {CFE3259A-2D30-4EB0-80D5-E8B5F3D01449} {88E2D422-6852-46E3-A740-83E391DC7973} = {CFE3259A-2D30-4EB0-80D5-E8B5F3D01449} - {4239EFEA-E746-446A-BF7A-51FCBAB13946} = {CFE3259A-2D30-4EB0-80D5-E8B5F3D01449} - {2E60864A-E3FF-4BCC-810F-DC7C34E6B236} = {CFE3259A-2D30-4EB0-80D5-E8B5F3D01449} + {AAAAD274-696A-49EC-AAAA-F870BE91AAAA} = {CFE3259A-2D30-4EB0-80D5-E8B5F3D01449} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {BD5177C7-1380-40E7-94D2-7768E1A8B1B8} EndGlobalSection EndGlobal diff --git a/FSharpBuild.Directory.Build.props b/FSharpBuild.Directory.Build.props new file mode 100644 index 00000000000..560885e394b --- /dev/null +++ b/FSharpBuild.Directory.Build.props @@ -0,0 +1,62 @@ + + + + + + + + Debug + $(MSBuildThisFileDirectory) + $(RepoRoot)src + $(RepoRoot)Tools + false + $(RepoRoot)Proto\net40\bin + 4.4.0 + + + + + + $(NUGET_PACKAGES) + $(MSBuildThisFileDirectory)packages + + $(NuGetPackageRoot)\ + $(NuGetPackageRoot)/ + + + + + false + true + $(FSharpSourcesRoot)\fsharp\msft.pubkey + true + true + + + + + true + + + + + false + true + + + + + portable + fs + false + true + + + + + $(ProtoOutputPath)\Microsoft.FSharp.NetSdk.props + $(ProtoOutputPath)\Microsoft.FSharp.NetSdk.targets + $(ProtoOutputPath)\Microsoft.FSharp.Overrides.NetSdk.targets + + + diff --git a/FSharpBuild.Directory.Build.targets b/FSharpBuild.Directory.Build.targets new file mode 100644 index 00000000000..a447c35111a --- /dev/null +++ b/FSharpBuild.Directory.Build.targets @@ -0,0 +1,41 @@ + + + + en;$(XlfLanguages) + coreclr + net40 + $(MSBuildProjectDirectory)\$(OutputPath) + $(OutputPath) + $(RepoRoot)$(Configuration)\$(TargetDotnetProfile)\bin + $(RepoRoot)$(Configuration)\$(TargetDotnetProfile)\obj + + + + + + + + + + + + + + + + + + + + + + diff --git a/FSharpTests.Directory.Build.props b/FSharpTests.Directory.Build.props new file mode 100644 index 00000000000..7deaa0eb9b0 --- /dev/null +++ b/FSharpTests.Directory.Build.props @@ -0,0 +1,36 @@ + + + + + <_FSharpCompilerPath>$(MSBuildThisFileDirectory)$(Configuration)/net40/bin + + $(_FSharpCompilerPath) + fsc.exe + + + + + + <_FSharpCompilerPath>$(MSBuildThisFileDirectory)$(Configuration)/coreclr/bin + + $(MSBuildThisFileDirectory)Tools/dotnet20 + dotnet.exe + dotnet + $(_FSharpCompilerPath)/fsc.exe + + + + + $(_FSharpCompilerPath)/Microsoft.FSharp.NetSdk.props + $(_FSharpCompilerPath)/Microsoft.FSharp.NetSdk.targets + $(_FSharpCompilerPath)/Microsoft.FSharp.Overrides.NetSdk.targets + + + + + + $(MSBuildThisFileDirectory)$(Configuration)\coreclr\bin\FSharp.Build.dll + $(MSBuildThisFileDirectory)$(Configuration)\net40\bin\FSharp.Build.dll + + + \ No newline at end of file diff --git a/FSharpTests.Directory.Build.targets b/FSharpTests.Directory.Build.targets new file mode 100644 index 00000000000..e5b000ce518 --- /dev/null +++ b/FSharpTests.Directory.Build.targets @@ -0,0 +1,21 @@ + + + + + + + $([System.IO.File]::ReadAllText('$(MSBuildThisFileDirectory)DotnetCLIToolsVersion.txt').Trim()) + + + + + + + + + + diff --git a/Makefile b/Makefile index 77a98f2871b..14f7aef4870 100644 --- a/Makefile +++ b/Makefile @@ -1,19 +1,30 @@ include $(topsrcdir)mono/config.make -.PHONY: restore +.PHONY: restore build build-proto restore: - MONO_ENV_OPTIONS=$(monoopts) mono .nuget/NuGet.exe restore packages.config -PackagesDirectory packages -ConfigFile .nuget/NuGet.Config + MONO_ENV_OPTIONS=$(monoopts) mono .nuget/NuGet.exe restore packages.config -PackagesDirectory packages -ConfigFile ./NuGet.Config + chmod u+x packages/FSharp.Compiler.Tools.4.1.27/tools/fsi.exe + chmod u+x packages/FsLexYacc.7.0.6/build/fslex.exe + chmod u+x packages/FsLexYacc.7.0.6/build/fsyacc.exe # Make the proto using the bootstrap, then make the final compiler using the proto # We call MAKE sequentially because we don't want build-final to explicitly depend on build-proto, # as that causes a complete recompilation of both proto and final everytime you touch the # compiler sources. all: + @echo ----------- + @echo prefix=$(prefix) + @echo topdir=$(topdir) + @echo monodir=$(monodir) + @echo monolibdir=$(monolibdir) + @echo monobindir=$(monobindir) + @echo ----------- + $(MAKE) restore $(MAKE) build-proto $(MAKE) build -build-proto: restore +build-proto: MONO_ENV_OPTIONS=$(monoopts) $(MSBUILD) /p:Configuration=Proto /p:TargetDotnetProfile=$(TargetDotnetProfile) src/fsharp/FSharp.Build-proto/FSharp.Build-proto.fsproj MONO_ENV_OPTIONS=$(monoopts) $(MSBUILD) /p:Configuration=Proto /p:TargetDotnetProfile=$(TargetDotnetProfile) src/fsharp/Fsc-proto/Fsc-proto.fsproj @@ -27,7 +38,7 @@ build: MONO_ENV_OPTIONS=$(monoopts) $(MSBUILD) /p:Configuration=$(Configuration) /p:TargetDotnetProfile=net40 src/fsharp/FSharp.Compiler.Server.Shared/FSharp.Compiler.Server.Shared.fsproj MONO_ENV_OPTIONS=$(monoopts) $(MSBUILD) /p:Configuration=$(Configuration) /p:TargetDotnetProfile=net40 src/fsharp/fsi/Fsi.fsproj MONO_ENV_OPTIONS=$(monoopts) $(MSBUILD) /p:Configuration=$(Configuration) /p:TargetDotnetProfile=net40 src/fsharp/fsiAnyCpu/FsiAnyCPU.fsproj - MONO_ENV_OPTIONS=$(monoopts) $(MSBUILD) /p:Configuration=$(Configuration) /p:TargetDotnetProfile=net40 src/fsharp/FSharp.Core.Unittests/FSharp.Core.Unittests.fsproj + MONO_ENV_OPTIONS=$(monoopts) $(MSBUILD) /p:Configuration=$(Configuration) /p:TargetDotnetProfile=net40 tests/FSharp.Core.UnitTests/FSharp.Core.UnitTests.fsproj mkdir -p $(Configuration)/fsharp30/net40/bin mkdir -p $(Configuration)/fsharp31/net40/bin mkdir -p $(Configuration)/fsharp40/net40/bin diff --git a/NuGet.Config b/NuGet.Config new file mode 100644 index 00000000000..c89208eb6da --- /dev/null +++ b/NuGet.Config @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/PublishToBlob.proj b/PublishToBlob.proj index 21dbb9300e0..00bcee63359 100644 --- a/PublishToBlob.proj +++ b/PublishToBlob.proj @@ -10,26 +10,26 @@ Microsoft.DotNet.Build.Tasks.Feed - 1.0.0-prerelease-02219-01 + 2.1.0-prerelease-02419-02 - - + + - + Overwrite="$(PublishOverwrite)" + ManifestBranch="$(ManifestBranch)" + ManifestBuildId="$(ManifestBuildId)" + ManifestCommit="$(ManifestCommit)" + ManifestName="fsharp" + SkipCreateManifest="false" /> diff --git a/README.md b/README.md index 617c8a4bece..3e3c480f6ed 100644 --- a/README.md +++ b/README.md @@ -16,12 +16,11 @@ For historical reasons this repository is called "visualfsharp" and currently al ## Build Status -| | Ubuntu (Build) | Windows (Debug Build) | Windows (Release Tests 1) | Windows (Release Tests 2) | Windows (Release Tests 3) | -|:----------:|:----------------:|:----------------:|:------------------:|:-----------------------:|:---------------------:| -|**master** |[![Build Status](https://ci2.dot.net/buildStatus/icon?job=Microsoft_visualfsharp/master/release_ubuntu14.04)](https://ci2.dot.net/job/Microsoft_visualfsharp/job/master/job/release_ubuntu14.04/)|[![Build Status](https://ci2.dot.net/buildStatus/icon?job=Microsoft_visualfsharp/master/debug_windows_nt)](https://ci2.dot.net/job/Microsoft_visualfsharp/job/master/job/debug_windows_nt/)|[![Build Status](https://ci2.dot.net/buildStatus/icon?job=Microsoft_visualfsharp/master/release_ci_part1_windows_nt)](https://ci2.dot.net/job/Microsoft_visualfsharp/job/master/job/release_ci_part1_windows_nt/)|[![Build Status](https://ci2.dot.net/buildStatus/icon?job=Microsoft_visualfsharp/master/release_ci_part2_windows_nt)](https://ci2.dot.net/job/Microsoft_visualfsharp/job/master/job/release_ci_part2_windows_nt/)|[![Build Status](https://ci2.dot.net/buildStatus/icon?job=Microsoft_visualfsharp/master/release_ci_part3_windows_nt)](https://ci2.dot.net/job/Microsoft_visualfsharp/job/master/job/release_ci_part3_windows_nt/)| -|**dev15.5** |[![Build Status](https://ci2.dot.net/buildStatus/icon?job=Microsoft_visualfsharp/dev15.5/release_ubuntu14.04)](https://ci2.dot.net/job/Microsoft_visualfsharp/job/dev15.5/job/release_ubuntu14.04/)|[![Build Status](https://ci2.dot.net/buildStatus/icon?job=Microsoft_visualfsharp/dev15.5/debug_windows_nt)](https://ci2.dot.net/job/Microsoft_visualfsharp/job/dev15.5/job/debug_windows_nt/)|[![Build Status](https://ci2.dot.net/buildStatus/icon?job=Microsoft_visualfsharp/dev15.5/release_ci_part1_windows_nt)](https://ci2.dot.net/job/Microsoft_visualfsharp/job/dev15.5/job/release_ci_part1_windows_nt/)|[![Build Status](https://ci2.dot.net/buildStatus/icon?job=Microsoft_visualfsharp/dev15.5/release_ci_part2_windows_nt)](https://ci2.dot.net/job/Microsoft_visualfsharp/job/dev15.5/job/release_ci_part2_windows_nt/)|[![Build Status](https://ci2.dot.net/buildStatus/icon?job=Microsoft_visualfsharp/dev15.5/release_ci_part3_windows_nt)](https://ci2.dot.net/job/Microsoft_visualfsharp/job/dev15.5/job/release_ci_part3_windows_nt/)| -|**dev15.6** |[![Build Status](https://ci2.dot.net/buildStatus/icon?job=Microsoft_visualfsharp/dev15.6/release_ubuntu14.04)](https://ci2.dot.net/job/Microsoft_visualfsharp/job/dev15.6/job/release_ubuntu14.04/)|[![Build Status](https://ci2.dot.net/buildStatus/icon?job=Microsoft_visualfsharp/dev15.6/debug_windows_nt)](https://ci2.dot.net/job/Microsoft_visualfsharp/job/dev15.6/job/debug_windows_nt/)|[![Build Status](https://ci2.dot.net/buildStatus/icon?job=Microsoft_visualfsharp/dev15.6/release_ci_part1_windows_nt)](https://ci2.dot.net/job/Microsoft_visualfsharp/job/dev15.6/job/release_ci_part1_windows_nt/)|[![Build Status](https://ci2.dot.net/buildStatus/icon?job=Microsoft_visualfsharp/dev15.6/release_ci_part2_windows_nt)](https://ci2.dot.net/job/Microsoft_visualfsharp/job/dev15.6/job/release_ci_part2_windows_nt/)|[![Build Status](https://ci2.dot.net/buildStatus/icon?job=Microsoft_visualfsharp/dev15.6/release_ci_part3_windows_nt)](https://ci2.dot.net/job/Microsoft_visualfsharp/job/dev15.6/job/release_ci_part3_windows_nt/)| - +| Branch | Status | +|:------:|:------:| +|master|[![Build Status](https://dnceng.visualstudio.com/_apis/public/build/definitions/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/106/badge?branchname=master)](https://dnceng.visualstudio.com/public/public%20Team/_build?definitionId=106&_a=history)| +|dev15.9|[![Build Status](https://dnceng.visualstudio.com/_apis/public/build/definitions/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/106/badge?branchname=dev15.9)](https://dnceng.visualstudio.com/public/public%20Team/_build?definitionId=106&_a=history)| +|dev16.0|[![Build Status](https://dnceng.visualstudio.com/_apis/public/build/definitions/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/106/badge?branchname=dev16.0)](https://dnceng.visualstudio.com/public/public%20Team/_build?definitionId=106&_a=history)| ## Help improve the Quality of the Tools by Using the Nightly Releases of Visual F# Tools To setup Visual Studio to use the latest nightly releases of the Visual F# Tools: @@ -36,6 +35,25 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for general guidelines on the contributio To contribute to the F# ecosystem more generally see the F# Software Foundation's [Community Projects](http://fsharp.org/community/projects/) pages. +## Branches + +These are the branches in use: + +* `master` = Latest branch for OSS developers and nightly users. + - Most contributions go here. + - Able to be built, installed and used in the latest public Visual Studio release. + - May contain updated F# features and logic. + - Used to build nightly VSIX (see above). + - Gets integrated into https://github.com/fsharp/fsharp to form the basis of Mono releases + - Gets integrated into https://github.com/fsharp/FSharp.Compiler.Service to form the basis of FSharp.Compiler.Service releases + +* `dev15.x` + - Latest release branch for the particular point release of Visual Studio. + - Incorporates features and fixes from master up to a particular branch point, then selective cherry-picks. + - May contain new features that depend on new things or fixes in the corresponding Visual Studio release. + - Gets integrated back into master once the corresponding Visual Studio release is made. + - Used to build Visual F# Tool updates + ### Technical Documentation @@ -62,6 +80,8 @@ To setup Visual Studio to use the latest nightly releases of the Visual F# Tools https://blogs.msdn.microsoft.com/dotnet/2017/03/14/announcing-nightly-releases-for-the-visual-f-tools/ +If you wish to set up a *Preview* nightly atop Visual Studio preview builds, you can either [download a VSIX Manually from here](https://dotnet.myget.org/feed/fsharp-preview/package/vsix/VisualFSharp) or set up a VSIX feed in visual studio from [here](https://dotnet.myget.org/F/fsharp-preview/vsix). + ### Using CI Builds To install F#, see http://fsharp.org. diff --git a/RoslynPackageVersion.txt b/RoslynPackageVersion.txt new file mode 100644 index 00000000000..d0a9234a2fb --- /dev/null +++ b/RoslynPackageVersion.txt @@ -0,0 +1 @@ +2.9.0-beta8-63208-01 \ No newline at end of file diff --git a/TESTGUIDE.md b/TESTGUIDE.md index 9071fac914e..80f51322d7e 100644 --- a/TESTGUIDE.md +++ b/TESTGUIDE.md @@ -10,12 +10,11 @@ To run tests, use variations such as the following, depending on which test suit build.cmd vs test build.cmd all test -## Prerequisites +You can also submit pull requests to http://github.com/Microsoft/visualfsharp and run the tests via continuous integration. Most people do wholesale testing that way. -In order to run the FSharpQA suite, you will need to install [Perl](http://www.perl.org/get.html) (ActiveState Perl 5.16.3 is known to work fine). -Perl must be included in the `%PATH%` for the below steps to work. It is also recommended that you run tests from an elevated command prompt, as there are a couple of test cases which require administrative privileges. +## Prerequisites -The Perl requirement is gradually being removed. +It is recommended that you run tests from an elevated command prompt, as there are a couple of test cases which require administrative privileges. ## Test Suites @@ -25,9 +24,9 @@ The F# tests are split as follows: * [FSharpQA Suite](tests/fsharpqa/Source) - Broad and deep coverage of a variety of compiler, runtime, and syntax scenarios. -* [FSharp.Core.Unittests](src/fsharp/FSharp.Core.Unittests) - Validation of the core F# types and the public surface area of `FSharp.Core.dll`. +* [FSharp.Core.UnitTests](tests/FSharp.Core.UnitTests) - Validation of the core F# types and the public surface area of `FSharp.Core.dll`. -* [FSharp.Compiler.Unittests](src/fsharp/FSharp.Compiler.Unittests) - Validation of compiler internals. +* [FSharp.Compiler.UnitTests](tests/FSharp.Compiler.UnitTests) - Validation of compiler internals. * [VisualFSharp.UnitTests](vsintegration/tests/unittests) - Visual F# Tools IDE Unit Test Suite This suite exercises a wide range of behaviors in the F# Visual Studio project system and language service. @@ -38,35 +37,44 @@ The F# tests are split as follows: This is compiled using [tests\fsharp\FSharp.Tests.FSharpSuite.fsproj](tests/fsharp/FSharp.Tests.FSharpSuite.fsproj) to a unit test DLL which acts as a driver script. Each individual test is an NUnit test case, and so you can run it like any other NUnit test. + .\build.cmd net40 test-net40-fsharp + Tests are grouped in folders per area. Each test compiles and executes a `test.fsx|fs` file in its folder using some combination of compiler or FSI flags specified in the FSharpSuite test project. -If the compilation and execution encounter no errors, the test is considered to have passed. +If the compilation and execution encounter no errors, the test is considered to have passed. + +There are also negative tests checking code expected to fail compilation. See note about baseline under "Other Tips" bellow for tests checking expectations against "baseline" files. ### FSharpQA Suite +The FSharpQA suite relies on [Perl](http://www.perl.org/get.html), StrawberryPerl64 package from nuget is used automatically by the test suite. + These tests use the `RunAll.pl` framework to execute, however the easiest way to run them is via the `build.cmd` script, see [usage examples](https://github.com/Microsoft/visualfsharp/blob/master/build.cmd#L31). Tests are grouped in folders per area. Each folder contains a number of source code files and a single `env.lst` file. The `env.lst` file defines a series of test cases, one per line. -Each test case runs an optional "pre command," compiles a given set of source files using given flags, optionally runs the resulting binary, then optionally runs a final "post command." + +Each test case runs an optional "pre command," compiles a given set of source files using given flags, optionally runs the resulting binary, then optionally runs a final "post command". + If all of these steps complete without issue, the test is considered to have passed. +Read more at [tests/fsharpqa/readme.md](tests/fsharpqa/readme.md). + #### Test lists For the FSharpQA suite, the list of test areas and their associated "tags" is stored at tests\fsharpqa\source\test.lst // FSharpQA suite -Tags are in the left column, paths to to corresponding test folders are in the right column. If no tags are specifie, all tests will be run. +Tags are in the left column, paths to to corresponding test folders are in the right column. If no tags are specified, all tests will be run. If you want to re-run a particular test area, the easiest way to do so is to set a temporary tag for that area in test.lst (e.g. "RERUN") and then pass that as an argument to `build.cmd`: `build.cmd test-net40-fsharpqa include RERUN`. -### FSharp.Compiler.Unittests, FSharp.Core.Unittests, VisualFSharp.Unittests +### FSharp.Compiler.UnitTests, FSharp.Core.UnitTests, VisualFSharp.UnitTests These are all NUnit tests. You can execute these tests individually via the Visual Studio NUnit3 runner extension or the command line via `nunit3-console.exe`. Note that for compatibility reasons, the IDE unit tests should be run in a 32-bit process, -using the '--x86' flag to `nunit3-console.exe` - +using the `--x86` flag to `nunit3-console.exe` ### Logs and output @@ -79,11 +87,29 @@ All test execution logs and result files will be dropped into the `tests\TestRes net40-coreunit-suite-*.* vs-ideunit-suite-*.* +### Baselines + +FSharp Test Suite works with couples of .bsl (or .bslpp) files considered "expected" and called baseline, those are matched against the actual output which resides under .err or .vserr files of same name at the during test execution. +When doing so keep in mind to carefully review the diff before comitting updated baseline files. +.bslpp (baseline pre-process) files are specially designed to enable substitution of certain tokens to generate the .bsl file. You can look further about the pre-processing logic under [tests/fsharp/TypeProviderTests.fs](tests/fsharp/TypeProviderTests.fs), this is used only for type provider tests for now. + +To update baselines use this: + + fsi tests\scripts\update-baselines.fsx + +Use `-n` to dry-run: + + fsi tests\scripts\update-baselines.fsx -n + ### Other Tips -* Run as Administrator, or a handful of tests will fail +#### Run as Administrator + +Do this, or a handful of tests will fail. + +#### Making the tests run faster + +* NGen-ing the F# bits (fsc, fsi, FSharp.Core, etc) will result in tests executing much faster. Make sure you run `src\update.cmd` with the `-ngen` flag before running tests. +* The FSharp and FSharpQA suites will run test cases in parallel by default. You can comment out the relevant line (look for `PARALLEL_ARG`) to disable this. +* By default, tests from the FSharpQA suite are run using a persistent, hosted version of the compiler. This speeds up test execution, as there is no need for the `fsc.exe` process to spin up repeatedly. To disable this, uncomment the relevant line (look for `HOSTED_COMPILER`). -* Making the tests run faster - * NGen-ing the F# bits (fsc, fsi, FSharp.Core, etc) will result in tests executing much faster. Make sure you run `src\update.cmd` with the `-ngen` flag before running tests. - * The FSharp and FSharpQA suites will run test cases in parallel by default. You can comment out the relevant line (look for `PARALLEL_ARG`) to disable this. - * By default, tests from the FSharpQA suite are run using a persistent, hosted version of the compiler. This speeds up test execution, as there is no need for the `fsc.exe` process to spin up repeatedly. To disable this, uncomment the relevant line (look for `HOSTED_COMPILER`). diff --git a/VisualFSharp.sln b/VisualFSharp.sln index 5f0ba007e8f..ea9bbe592d7 100644 --- a/VisualFSharp.sln +++ b/VisualFSharp.sln @@ -1,62 +1,61 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 -VisualStudioVersion = 15.0.27116.0 +VisualStudioVersion = 15.0.28010.2036 MinimumVisualStudioVersion = 10.0.40219.1 +Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.VS.FSI", "vsintegration\src\FSharp.VS.FSI\FSharp.VS.FSI.fsproj", "{991DCF75-C2EB-42B6-9A0D-AA1D2409D519}" +EndProject Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Compiler.Private", "src\fsharp\FSharp.Compiler.Private\FSharp.Compiler.Private.fsproj", "{2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}" EndProject -Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.VS.FSI", "vsintegration\src\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 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VisualFSharpFull", "vsintegration\Vsix\VisualFSharpFull\VisualFSharpFull.csproj", "{59ADCE46-9740-4079-834D-9A03A3494EBC}" 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 Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Core", "src\fsharp\FSharp.Core\FSharp.Core.fsproj", "{DED3BBD7-53F4-428A-8C9F-27968E768605}" EndProject -Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.LanguageService", "vsintegration\src\FSharp.LanguageService\FSharp.LanguageService.fsproj", "{EE85AAB7-CDA0-4C4E-BDA0-A64CCC413E3F}" +Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.LanguageService", "vsintegration\src\FSharp.LanguageService\FSharp.LanguageService.fsproj", "{EE85AAB7-CDA0-4C4E-BDA0-A64CCC413E3F}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FSharp.LanguageService.Base", "vsintegration\src\FSharp.LanguageService.Base\FSharp.LanguageService.Base.csproj", "{1C5C163C-37EA-4A3C-8CCC-0D34B74BF8EF}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FSharp.LanguageService.Base", "vsintegration\src\FSharp.LanguageService.Base\FSharp.LanguageService.Base.csproj", "{1C5C163C-37EA-4A3C-8CCC-0D34B74BF8EF}" EndProject -Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Editor", "vsintegration\src\FSharp.Editor\FSharp.Editor.fsproj", "{65E0E82A-EACE-4787-8994-888674C2FE87}" +Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Editor", "vsintegration\src\FSharp.Editor\FSharp.Editor.fsproj", "{65E0E82A-EACE-4787-8994-888674C2FE87}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProjectSystem.Base", "vsintegration\src\FSharp.ProjectSystem.Base\Project\ProjectSystem.Base.csproj", "{B700E38B-F8C0-4E49-B5EC-DB7B7AC0C4E7}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ProjectSystem.Base", "vsintegration\src\FSharp.ProjectSystem.Base\Project\ProjectSystem.Base.csproj", "{B700E38B-F8C0-4E49-B5EC-DB7B7AC0C4E7}" EndProject Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "FSharp.PropertiesPages", "vsintegration\src\FSharp.ProjectSystem.PropertyPages\FSharp.PropertiesPages.vbproj", "{FCFB214C-462E-42B3-91CA-FC557EFEE74F}" EndProject -Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "ProjectSystem", "vsintegration\src\FSharp.ProjectSystem.FSharp\ProjectSystem.fsproj", "{6196B0F8-CAEA-4CF1-AF82-1B520F77FE44}" +Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "ProjectSystem", "vsintegration\src\FSharp.ProjectSystem.FSharp\ProjectSystem.fsproj", "{6196B0F8-CAEA-4CF1-AF82-1B520F77FE44}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ProjectTemplates", "ProjectTemplates", "{C9B1D3F5-4971-4F04-9C26-37E3AC809AB4}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{CFE3259A-2D30-4EB0-80D5-E8B5F3D01449}" EndProject -Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "VisualFSharp.Salsa", "vsintegration\tests\Salsa\VisualFSharp.Salsa.fsproj", "{FBD4B354-DC6E-4032-8EC7-C81D8DFB1AF7}" +Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "VisualFSharp.Salsa", "vsintegration\tests\Salsa\VisualFSharp.Salsa.fsproj", "{FBD4B354-DC6E-4032-8EC7-C81D8DFB1AF7}" EndProject -Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "VisualFSharp.Unittests", "vsintegration\tests\unittests\VisualFSharp.Unittests.fsproj", "{EE85AAB7-CDA0-4C4E-BDA0-A64DDDD13E3F}" +Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "VisualFSharp.UnitTests", "vsintegration\tests\UnitTests\VisualFSharp.UnitTests.fsproj", "{EE85AAB7-CDA0-4C4E-BDA0-A64DDDD13E3F}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DefinitionLocationAttribute", "vsintegration\tests\unittests\MockTypeProviders\DefinitionLocationAttribute\DefinitionLocationAttribute.csproj", "{DA39AD38-4A58-47BF-9215-E49768295169}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DefinitionLocationAttribute", "vsintegration\tests\MockTypeProviders\DefinitionLocationAttribute\DefinitionLocationAttribute.csproj", "{DA39AD38-4A58-47BF-9215-E49768295169}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DefinitionLocationAttributeFileDoesnotExist", "vsintegration\tests\unittests\MockTypeProviders\DefinitionLocationAttributeFileDoesnotExist\DefinitionLocationAttributeFileDoesnotExist.csproj", "{8C2439BD-0E49-4929-A8B1-29CEE228191E}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DefinitionLocationAttributeFileDoesnotExist", "vsintegration\tests\MockTypeProviders\DefinitionLocationAttributeFileDoesnotExist\DefinitionLocationAttributeFileDoesnotExist.csproj", "{8C2439BD-0E49-4929-A8B1-29CEE228191E}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DefinitionLocationAttributeLineDoesnotExist", "vsintegration\tests\unittests\MockTypeProviders\DefinitionLocationAttributeLineDoesnotExist\DefinitionLocationAttributeLineDoesnotExist.csproj", "{F47196DC-186D-4055-BAF2-658282A12F33}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DefinitionLocationAttributeLineDoesnotExist", "vsintegration\tests\MockTypeProviders\DefinitionLocationAttributeLineDoesnotExist\DefinitionLocationAttributeLineDoesnotExist.csproj", "{F47196DC-186D-4055-BAF2-658282A12F33}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DefinitionLocationAttributeWithSpaceInTheType", "vsintegration\tests\unittests\MockTypeProviders\DefinitionLocationAttributeWithSpaceInTheType\DefinitionLocationAttributeWithSpaceInTheType.csproj", "{D4C88934-5893-467E-A55C-A11ECD6479FE}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DefinitionLocationAttributeWithSpaceInTheType", "vsintegration\tests\MockTypeProviders\DefinitionLocationAttributeWithSpaceInTheType\DefinitionLocationAttributeWithSpaceInTheType.csproj", "{D4C88934-5893-467E-A55C-A11ECD6479FE}" EndProject -Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "DummyProviderForLanguageServiceTesting", "vsintegration\tests\unittests\MockTypeProviders\DummyProviderForLanguageServiceTesting\DummyProviderForLanguageServiceTesting.fsproj", "{6AFF752D-E991-4A08-9ED2-5BF46B0E0F8B}" +Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "DummyProviderForLanguageServiceTesting", "vsintegration\tests\MockTypeProviders\DummyProviderForLanguageServiceTesting\DummyProviderForLanguageServiceTesting.fsproj", "{6AFF752D-E991-4A08-9ED2-5BF46B0E0F8B}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EditorHideMethodsAttribute", "vsintegration\tests\unittests\MockTypeProviders\EditorHideMethodsAttribute\EditorHideMethodsAttribute.csproj", "{0B9CDEAF-EE8F-45E0-A4E0-34A8ED6DD09E}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EditorHideMethodsAttribute", "vsintegration\tests\MockTypeProviders\EditorHideMethodsAttribute\EditorHideMethodsAttribute.csproj", "{0B9CDEAF-EE8F-45E0-A4E0-34A8ED6DD09E}" EndProject -Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "EmptyAssembly", "vsintegration\tests\unittests\MockTypeProviders\EmptyAssembly\EmptyAssembly.fsproj", "{004982C6-93EA-4E70-B4F0-BE7D7219926A}" +Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "EmptyAssembly", "vsintegration\tests\MockTypeProviders\EmptyAssembly\EmptyAssembly.fsproj", "{004982C6-93EA-4E70-B4F0-BE7D7219926A}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XmlDocAttributeWithAdequateComment", "vsintegration\tests\unittests\MockTypeProviders\XmlDocAttributeWithAdequateComment\XmlDocAttributeWithAdequateComment.csproj", "{243A81AC-A954-4601-833A-60EEEFB00FCD}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XmlDocAttributeWithAdequateComment", "vsintegration\tests\MockTypeProviders\XmlDocAttributeWithAdequateComment\XmlDocAttributeWithAdequateComment.csproj", "{243A81AC-A954-4601-833A-60EEEFB00FCD}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XmlDocAttributeWithEmptyComment", "vsintegration\tests\unittests\MockTypeProviders\XmlDocAttributeWithEmptyComment\XmlDocAttributeWithEmptyComment.csproj", "{B4595EB6-053A-400E-AA1B-7727F1BC900F}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XmlDocAttributeWithEmptyComment", "vsintegration\tests\MockTypeProviders\XmlDocAttributeWithEmptyComment\XmlDocAttributeWithEmptyComment.csproj", "{B4595EB6-053A-400E-AA1B-7727F1BC900F}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XmlDocAttributeWithLocalizedComment", "vsintegration\tests\unittests\MockTypeProviders\XmlDocAttributeWithLocalizedComment\XmlDocAttributeWithLocalizedComment.csproj", "{A559D7E8-7EFD-473A-B618-A10B41AB523B}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XmlDocAttributeWithLocalizedComment", "vsintegration\tests\MockTypeProviders\XmlDocAttributeWithLocalizedComment\XmlDocAttributeWithLocalizedComment.csproj", "{A559D7E8-7EFD-473A-B618-A10B41AB523B}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XmlDocAttributeWithLongComment", "vsintegration\tests\unittests\MockTypeProviders\XmlDocAttributeWithLongComment\XmlDocAttributeWithLongComment.csproj", "{AC85EE6D-033C-45F9-B8BA-884BC22EC6D9}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XmlDocAttributeWithLongComment", "vsintegration\tests\MockTypeProviders\XmlDocAttributeWithLongComment\XmlDocAttributeWithLongComment.csproj", "{AC85EE6D-033C-45F9-B8BA-884BC22EC6D9}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XmlDocAttributeWithNullComment", "vsintegration\tests\unittests\MockTypeProviders\XmlDocAttributeWithNullComment\XmlDocAttributeWithNullComment.csproj", "{956BBE41-ABD1-4DBA-9F3B-BA1C9821C98C}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XmlDocAttributeWithNullComment", "vsintegration\tests\MockTypeProviders\XmlDocAttributeWithNullComment\XmlDocAttributeWithNullComment.csproj", "{956BBE41-ABD1-4DBA-9F3B-BA1C9821C98C}" EndProject Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Build", "src\fsharp\FSharp.Build\FSharp.Build.fsproj", "{702A7979-BCF9-4C41-853E-3ADFC9897890}" EndProject @@ -65,24 +64,21 @@ EndProject Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Compiler.Interactive.Settings", "src\fsharp\FSharp.Compiler.Interactive.Settings\FSharp.Compiler.Interactive.Settings.fsproj", "{649FA588-F02E-457C-9FCF-87E46407481E}" EndProject Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FsiAnyCPU", "src\fsharp\fsiAnyCpu\FsiAnyCPU.fsproj", "{8B3E283D-B5FE-4055-9D80-7E3A32F3967B}" - ProjectSection(ProjectDependencies) = postProject - {649FA588-F02E-457C-9FCF-87E46407481E} = {649FA588-F02E-457C-9FCF-87E46407481E} - EndProjectSection EndProject Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Fsi", "src\fsharp\fsi\Fsi.fsproj", "{D0E98C0D-490B-4C61-9329-0862F6E87645}" - ProjectSection(ProjectDependencies) = postProject - {649FA588-F02E-457C-9FCF-87E46407481E} = {649FA588-F02E-457C-9FCF-87E46407481E} - EndProjectSection EndProject Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Tests.FSharpSuite", "tests\fsharp\FSharp.Tests.FSharpSuite.fsproj", "{C163E892-5BF7-4B59-AA99-B0E8079C67C4}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "VisualFSharp.Unittests Support", "VisualFSharp.Unittests Support", "{3F044931-FB83-4433-B934-AE66AB27B278}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "VisualFSharp.UnitTests Support", "VisualFSharp.UnitTests Support", "{3F044931-FB83-4433-B934-AE66AB27B278}" EndProject -Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Compiler.Unittests", "src\fsharp\FSharp.Compiler.Unittests\FSharp.Compiler.Unittests.fsproj", "{A8D9641A-9170-4CF4-8FE0-6DB8C134E1B5}" +Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Compiler.UnitTests", "tests\FSharp.Compiler.UnitTests\FSharp.Compiler.UnitTests.fsproj", "{A8D9641A-9170-4CF4-8FE0-6DB8C134E1B5}" EndProject -Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Core.Unittests", "src\fsharp\FSharp.Core.Unittests\FSharp.Core.Unittests.fsproj", "{88E2D422-6852-46E3-A740-83E391DC7973}" +Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Core.UnitTests", "tests\FSharp.Core.UnitTests\FSharp.Core.UnitTests.fsproj", "{88E2D422-6852-46E3-A740-83E391DC7973}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "VisualFSharp", "VisualFSharp", "{4C7B48D7-19AF-4AE7-9D1D-3BB289D5480D}" + ProjectSection(SolutionItems) = preProject + vsintegration\readme.md = vsintegration\readme.md + EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Compiler", "Compiler", "{3881429D-A97A-49EB-B7AE-A82BA5FE9C77}" EndProject @@ -112,21 +108,15 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TextFile", "vsintegration\I EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XMLFile", "vsintegration\ItemTemplates\XMLFile\XMLFile.csproj", "{1FB1DD07-06AA-45B4-B5AC-20FF5BEE98B6}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Vsix", "Vsix", "{141F6C23-E1B1-4D89-9F10-F0B8AD58E71F}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VisualFSharpFull", "vsintegration\Vsix\VisualFSharpFull\VisualFSharpFull.csproj", "{59ADCE46-9740-4079-834D-9A03A3494EBC}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VisualFSharpOpenSource", "vsintegration\Vsix\VisualFSharpOpenSource\VisualFSharpOpenSource.csproj", "{E6A45CDF-B408-420F-B475-74611BEFC52B}" -EndProject Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "HostedCompilerServer", "tests\fsharpqa\testenv\src\HostedCompilerServer\HostedCompilerServer.fsproj", "{4239EFEA-E746-446A-BF7A-51FCBAB13946}" EndProject Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "ILComparer", "tests\fsharpqa\testenv\src\ILComparer\ILComparer.fsproj", "{2E60864A-E3FF-4BCC-810F-DC7C34E6B236}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Utils", "Utils", "{D086C8C6-D00D-4C3B-9AB2-A4286C9F5922}" EndProject -Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "LanguageServiceProfiling", "vsintegration\Utils\LanguageServiceProfiling\LanguageServiceProfiling.fsproj", "{E7FA3A71-51AF-4FCA-9C2F-7C853E515903}" +Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "LanguageServiceProfiling", "vsintegration\Utils\LanguageServiceProfiling\LanguageServiceProfiling.fsproj", "{E7FA3A71-51AF-4FCA-9C2F-7C853E515903}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FSharp.UIResources", "vsintegration\src\FSharp.UIResources\FSharp.UIResources.csproj", "{C4586A06-1402-48BC-8E35-A1B8642F895B}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FSharp.UIResources", "vsintegration\src\FSharp.UIResources\FSharp.UIResources.csproj", "{C4586A06-1402-48BC-8E35-A1B8642F895B}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharp_Analysis", "tests\service\data\CSharp_Analysis\CSharp_Analysis.csproj", "{887630A3-4B1D-40EA-B8B3-2D842E9C40DB}" EndProject @@ -136,52 +126,52 @@ Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "TestTP", "tests\service\dat EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ResourceFile", "vsintegration\ItemTemplates\ResourceFile\ResourceFile.csproj", "{0385564F-07B4-4264-AB8A-17C393E9140C}" EndProject -Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Build.UnitTests", "src\fsharp\FSharp.Build.UnitTests\FSharp.Build.UnitTests.fsproj", "{400FAB03-786E-40CC-85A8-04B0C2869B14}" +Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Build.UnitTests", "tests\FSharp.Build.UnitTests\FSharp.Build.UnitTests.fsproj", "{400FAB03-786E-40CC-85A8-04B0C2869B14}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PEVerify", "tests\fsharpqa\testenv\src\PEVerify\PEVerify.csproj", "{B0689A4E-07D8-494D-A0C8-791CB1D74E54}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FSharp.PatternMatcher", "vsintegration\src\FSharp.PatternMatcher\FSharp.PatternMatcher.csproj", "{18227628-DF90-4C47-AF3D-CC72D2EDD986}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Legacy", "Legacy", "{CCAB6E50-34C6-42AF-A6B0-567C29FCD91B}" +EndProject +Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "GetTypesVSUnitTests", "vsintegration\tests\GetTypesVSUnitTests\GetTypesVSUnitTests.fsproj", "{6D93CEBD-4540-4D96-A153-B440A661FD09}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Debug|x86 = Debug|x86 - Proto|Any CPU = Proto|Any CPU - Proto|x86 = Proto|x86 Release|Any CPU = Release|Any CPU Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Debug|x86.ActiveCfg = Debug|Any CPU - {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Debug|x86.Build.0 = Debug|Any CPU - {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Proto|Any CPU.ActiveCfg = Proto|Any CPU - {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Proto|Any CPU.Build.0 = Proto|Any CPU - {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Proto|x86.ActiveCfg = Proto|Any CPU - {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Proto|x86.Build.0 = Proto|Any CPU - {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Release|Any CPU.Build.0 = Release|Any CPU - {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Release|x86.ActiveCfg = Release|Any CPU - {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Release|x86.Build.0 = Release|Any CPU {991DCF75-C2EB-42B6-9A0D-AA1D2409D519}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {991DCF75-C2EB-42B6-9A0D-AA1D2409D519}.Debug|Any CPU.Build.0 = Debug|Any CPU {991DCF75-C2EB-42B6-9A0D-AA1D2409D519}.Debug|x86.ActiveCfg = Debug|Any CPU {991DCF75-C2EB-42B6-9A0D-AA1D2409D519}.Debug|x86.Build.0 = Debug|Any CPU - {991DCF75-C2EB-42B6-9A0D-AA1D2409D519}.Proto|Any CPU.ActiveCfg = Proto|Any CPU - {991DCF75-C2EB-42B6-9A0D-AA1D2409D519}.Proto|Any CPU.Build.0 = Proto|Any CPU - {991DCF75-C2EB-42B6-9A0D-AA1D2409D519}.Proto|x86.ActiveCfg = Proto|Any CPU - {991DCF75-C2EB-42B6-9A0D-AA1D2409D519}.Proto|x86.Build.0 = Proto|Any CPU {991DCF75-C2EB-42B6-9A0D-AA1D2409D519}.Release|Any CPU.ActiveCfg = Release|Any CPU {991DCF75-C2EB-42B6-9A0D-AA1D2409D519}.Release|Any CPU.Build.0 = Release|Any CPU {991DCF75-C2EB-42B6-9A0D-AA1D2409D519}.Release|x86.ActiveCfg = Release|Any CPU {991DCF75-C2EB-42B6-9A0D-AA1D2409D519}.Release|x86.Build.0 = Release|Any CPU + {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Debug|x86.ActiveCfg = Debug|Any CPU + {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Debug|x86.Build.0 = Debug|Any CPU + {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Release|Any CPU.Build.0 = Release|Any CPU + {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Release|x86.ActiveCfg = Release|Any CPU + {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Release|x86.Build.0 = Release|Any CPU + {59ADCE46-9740-4079-834D-9A03A3494EBC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {59ADCE46-9740-4079-834D-9A03A3494EBC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {59ADCE46-9740-4079-834D-9A03A3494EBC}.Debug|x86.ActiveCfg = Debug|Any CPU + {59ADCE46-9740-4079-834D-9A03A3494EBC}.Debug|x86.Build.0 = Debug|Any CPU + {59ADCE46-9740-4079-834D-9A03A3494EBC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {59ADCE46-9740-4079-834D-9A03A3494EBC}.Release|Any CPU.Build.0 = Release|Any CPU + {59ADCE46-9740-4079-834D-9A03A3494EBC}.Release|x86.ActiveCfg = Release|Any CPU + {59ADCE46-9740-4079-834D-9A03A3494EBC}.Release|x86.Build.0 = Release|Any CPU {D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06}.Debug|Any CPU.Build.0 = Debug|Any CPU {D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06}.Debug|x86.ActiveCfg = Debug|Any CPU {D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06}.Debug|x86.Build.0 = Debug|Any CPU - {D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06}.Proto|Any CPU.ActiveCfg = Proto|Any CPU - {D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06}.Proto|Any CPU.Build.0 = Proto|Any CPU - {D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06}.Proto|x86.ActiveCfg = Proto|Any CPU - {D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06}.Proto|x86.Build.0 = Proto|Any CPU {D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06}.Release|Any CPU.ActiveCfg = Release|Any CPU {D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06}.Release|Any CPU.Build.0 = Release|Any CPU {D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06}.Release|x86.ActiveCfg = Release|Any CPU @@ -190,10 +180,6 @@ Global {DED3BBD7-53F4-428A-8C9F-27968E768605}.Debug|Any CPU.Build.0 = Debug|Any CPU {DED3BBD7-53F4-428A-8C9F-27968E768605}.Debug|x86.ActiveCfg = Debug|Any CPU {DED3BBD7-53F4-428A-8C9F-27968E768605}.Debug|x86.Build.0 = Debug|Any CPU - {DED3BBD7-53F4-428A-8C9F-27968E768605}.Proto|Any CPU.ActiveCfg = Proto|Any CPU - {DED3BBD7-53F4-428A-8C9F-27968E768605}.Proto|Any CPU.Build.0 = Proto|Any CPU - {DED3BBD7-53F4-428A-8C9F-27968E768605}.Proto|x86.ActiveCfg = Proto|Any CPU - {DED3BBD7-53F4-428A-8C9F-27968E768605}.Proto|x86.Build.0 = Proto|Any CPU {DED3BBD7-53F4-428A-8C9F-27968E768605}.Release|Any CPU.ActiveCfg = Release|Any CPU {DED3BBD7-53F4-428A-8C9F-27968E768605}.Release|Any CPU.Build.0 = Release|Any CPU {DED3BBD7-53F4-428A-8C9F-27968E768605}.Release|x86.ActiveCfg = Release|Any CPU @@ -202,10 +188,6 @@ Global {EE85AAB7-CDA0-4C4E-BDA0-A64CCC413E3F}.Debug|Any CPU.Build.0 = Debug|Any CPU {EE85AAB7-CDA0-4C4E-BDA0-A64CCC413E3F}.Debug|x86.ActiveCfg = Debug|Any CPU {EE85AAB7-CDA0-4C4E-BDA0-A64CCC413E3F}.Debug|x86.Build.0 = Debug|Any CPU - {EE85AAB7-CDA0-4C4E-BDA0-A64CCC413E3F}.Proto|Any CPU.ActiveCfg = Proto|Any CPU - {EE85AAB7-CDA0-4C4E-BDA0-A64CCC413E3F}.Proto|Any CPU.Build.0 = Proto|Any CPU - {EE85AAB7-CDA0-4C4E-BDA0-A64CCC413E3F}.Proto|x86.ActiveCfg = Proto|Any CPU - {EE85AAB7-CDA0-4C4E-BDA0-A64CCC413E3F}.Proto|x86.Build.0 = Proto|Any CPU {EE85AAB7-CDA0-4C4E-BDA0-A64CCC413E3F}.Release|Any CPU.ActiveCfg = Release|Any CPU {EE85AAB7-CDA0-4C4E-BDA0-A64CCC413E3F}.Release|Any CPU.Build.0 = Release|Any CPU {EE85AAB7-CDA0-4C4E-BDA0-A64CCC413E3F}.Release|x86.ActiveCfg = Release|Any CPU @@ -214,10 +196,6 @@ Global {1C5C163C-37EA-4A3C-8CCC-0D34B74BF8EF}.Debug|Any CPU.Build.0 = Debug|Any CPU {1C5C163C-37EA-4A3C-8CCC-0D34B74BF8EF}.Debug|x86.ActiveCfg = Debug|Any CPU {1C5C163C-37EA-4A3C-8CCC-0D34B74BF8EF}.Debug|x86.Build.0 = Debug|Any CPU - {1C5C163C-37EA-4A3C-8CCC-0D34B74BF8EF}.Proto|Any CPU.ActiveCfg = Proto|Any CPU - {1C5C163C-37EA-4A3C-8CCC-0D34B74BF8EF}.Proto|Any CPU.Build.0 = Proto|Any CPU - {1C5C163C-37EA-4A3C-8CCC-0D34B74BF8EF}.Proto|x86.ActiveCfg = Proto|Any CPU - {1C5C163C-37EA-4A3C-8CCC-0D34B74BF8EF}.Proto|x86.Build.0 = Proto|Any CPU {1C5C163C-37EA-4A3C-8CCC-0D34B74BF8EF}.Release|Any CPU.ActiveCfg = Release|Any CPU {1C5C163C-37EA-4A3C-8CCC-0D34B74BF8EF}.Release|Any CPU.Build.0 = Release|Any CPU {1C5C163C-37EA-4A3C-8CCC-0D34B74BF8EF}.Release|x86.ActiveCfg = Release|Any CPU @@ -226,10 +204,6 @@ Global {65E0E82A-EACE-4787-8994-888674C2FE87}.Debug|Any CPU.Build.0 = Debug|Any CPU {65E0E82A-EACE-4787-8994-888674C2FE87}.Debug|x86.ActiveCfg = Debug|Any CPU {65E0E82A-EACE-4787-8994-888674C2FE87}.Debug|x86.Build.0 = Debug|Any CPU - {65E0E82A-EACE-4787-8994-888674C2FE87}.Proto|Any CPU.ActiveCfg = Proto|Any CPU - {65E0E82A-EACE-4787-8994-888674C2FE87}.Proto|Any CPU.Build.0 = Proto|Any CPU - {65E0E82A-EACE-4787-8994-888674C2FE87}.Proto|x86.ActiveCfg = Proto|Any CPU - {65E0E82A-EACE-4787-8994-888674C2FE87}.Proto|x86.Build.0 = Proto|Any CPU {65E0E82A-EACE-4787-8994-888674C2FE87}.Release|Any CPU.ActiveCfg = Release|Any CPU {65E0E82A-EACE-4787-8994-888674C2FE87}.Release|Any CPU.Build.0 = Release|Any CPU {65E0E82A-EACE-4787-8994-888674C2FE87}.Release|x86.ActiveCfg = Release|Any CPU @@ -238,10 +212,6 @@ Global {B700E38B-F8C0-4E49-B5EC-DB7B7AC0C4E7}.Debug|Any CPU.Build.0 = Debug|Any CPU {B700E38B-F8C0-4E49-B5EC-DB7B7AC0C4E7}.Debug|x86.ActiveCfg = Debug|Any CPU {B700E38B-F8C0-4E49-B5EC-DB7B7AC0C4E7}.Debug|x86.Build.0 = Debug|Any CPU - {B700E38B-F8C0-4E49-B5EC-DB7B7AC0C4E7}.Proto|Any CPU.ActiveCfg = Proto|Any CPU - {B700E38B-F8C0-4E49-B5EC-DB7B7AC0C4E7}.Proto|Any CPU.Build.0 = Proto|Any CPU - {B700E38B-F8C0-4E49-B5EC-DB7B7AC0C4E7}.Proto|x86.ActiveCfg = Proto|Any CPU - {B700E38B-F8C0-4E49-B5EC-DB7B7AC0C4E7}.Proto|x86.Build.0 = Proto|Any CPU {B700E38B-F8C0-4E49-B5EC-DB7B7AC0C4E7}.Release|Any CPU.ActiveCfg = Release|Any CPU {B700E38B-F8C0-4E49-B5EC-DB7B7AC0C4E7}.Release|Any CPU.Build.0 = Release|Any CPU {B700E38B-F8C0-4E49-B5EC-DB7B7AC0C4E7}.Release|x86.ActiveCfg = Release|Any CPU @@ -250,10 +220,6 @@ Global {FCFB214C-462E-42B3-91CA-FC557EFEE74F}.Debug|Any CPU.Build.0 = Debug|Any CPU {FCFB214C-462E-42B3-91CA-FC557EFEE74F}.Debug|x86.ActiveCfg = Debug|Any CPU {FCFB214C-462E-42B3-91CA-FC557EFEE74F}.Debug|x86.Build.0 = Debug|Any CPU - {FCFB214C-462E-42B3-91CA-FC557EFEE74F}.Proto|Any CPU.ActiveCfg = Proto|Any CPU - {FCFB214C-462E-42B3-91CA-FC557EFEE74F}.Proto|Any CPU.Build.0 = Proto|Any CPU - {FCFB214C-462E-42B3-91CA-FC557EFEE74F}.Proto|x86.ActiveCfg = Proto|Any CPU - {FCFB214C-462E-42B3-91CA-FC557EFEE74F}.Proto|x86.Build.0 = Proto|Any CPU {FCFB214C-462E-42B3-91CA-FC557EFEE74F}.Release|Any CPU.ActiveCfg = Release|Any CPU {FCFB214C-462E-42B3-91CA-FC557EFEE74F}.Release|Any CPU.Build.0 = Release|Any CPU {FCFB214C-462E-42B3-91CA-FC557EFEE74F}.Release|x86.ActiveCfg = Release|Any CPU @@ -262,10 +228,6 @@ Global {6196B0F8-CAEA-4CF1-AF82-1B520F77FE44}.Debug|Any CPU.Build.0 = Debug|Any CPU {6196B0F8-CAEA-4CF1-AF82-1B520F77FE44}.Debug|x86.ActiveCfg = Debug|Any CPU {6196B0F8-CAEA-4CF1-AF82-1B520F77FE44}.Debug|x86.Build.0 = Debug|Any CPU - {6196B0F8-CAEA-4CF1-AF82-1B520F77FE44}.Proto|Any CPU.ActiveCfg = Proto|Any CPU - {6196B0F8-CAEA-4CF1-AF82-1B520F77FE44}.Proto|Any CPU.Build.0 = Proto|Any CPU - {6196B0F8-CAEA-4CF1-AF82-1B520F77FE44}.Proto|x86.ActiveCfg = Proto|Any CPU - {6196B0F8-CAEA-4CF1-AF82-1B520F77FE44}.Proto|x86.Build.0 = Proto|Any CPU {6196B0F8-CAEA-4CF1-AF82-1B520F77FE44}.Release|Any CPU.ActiveCfg = Release|Any CPU {6196B0F8-CAEA-4CF1-AF82-1B520F77FE44}.Release|Any CPU.Build.0 = Release|Any CPU {6196B0F8-CAEA-4CF1-AF82-1B520F77FE44}.Release|x86.ActiveCfg = Release|Any CPU @@ -274,10 +236,6 @@ Global {FBD4B354-DC6E-4032-8EC7-C81D8DFB1AF7}.Debug|Any CPU.Build.0 = Debug|Any CPU {FBD4B354-DC6E-4032-8EC7-C81D8DFB1AF7}.Debug|x86.ActiveCfg = Debug|Any CPU {FBD4B354-DC6E-4032-8EC7-C81D8DFB1AF7}.Debug|x86.Build.0 = Debug|Any CPU - {FBD4B354-DC6E-4032-8EC7-C81D8DFB1AF7}.Proto|Any CPU.ActiveCfg = Proto|Any CPU - {FBD4B354-DC6E-4032-8EC7-C81D8DFB1AF7}.Proto|Any CPU.Build.0 = Proto|Any CPU - {FBD4B354-DC6E-4032-8EC7-C81D8DFB1AF7}.Proto|x86.ActiveCfg = Proto|Any CPU - {FBD4B354-DC6E-4032-8EC7-C81D8DFB1AF7}.Proto|x86.Build.0 = Proto|Any CPU {FBD4B354-DC6E-4032-8EC7-C81D8DFB1AF7}.Release|Any CPU.ActiveCfg = Release|Any CPU {FBD4B354-DC6E-4032-8EC7-C81D8DFB1AF7}.Release|Any CPU.Build.0 = Release|Any CPU {FBD4B354-DC6E-4032-8EC7-C81D8DFB1AF7}.Release|x86.ActiveCfg = Release|Any CPU @@ -286,10 +244,6 @@ Global {EE85AAB7-CDA0-4C4E-BDA0-A64DDDD13E3F}.Debug|Any CPU.Build.0 = Debug|Any CPU {EE85AAB7-CDA0-4C4E-BDA0-A64DDDD13E3F}.Debug|x86.ActiveCfg = Debug|Any CPU {EE85AAB7-CDA0-4C4E-BDA0-A64DDDD13E3F}.Debug|x86.Build.0 = Debug|Any CPU - {EE85AAB7-CDA0-4C4E-BDA0-A64DDDD13E3F}.Proto|Any CPU.ActiveCfg = Proto|Any CPU - {EE85AAB7-CDA0-4C4E-BDA0-A64DDDD13E3F}.Proto|Any CPU.Build.0 = Proto|Any CPU - {EE85AAB7-CDA0-4C4E-BDA0-A64DDDD13E3F}.Proto|x86.ActiveCfg = Proto|Any CPU - {EE85AAB7-CDA0-4C4E-BDA0-A64DDDD13E3F}.Proto|x86.Build.0 = Proto|Any CPU {EE85AAB7-CDA0-4C4E-BDA0-A64DDDD13E3F}.Release|Any CPU.ActiveCfg = Release|Any CPU {EE85AAB7-CDA0-4C4E-BDA0-A64DDDD13E3F}.Release|Any CPU.Build.0 = Release|Any CPU {EE85AAB7-CDA0-4C4E-BDA0-A64DDDD13E3F}.Release|x86.ActiveCfg = Release|Any CPU @@ -298,10 +252,6 @@ Global {DA39AD38-4A58-47BF-9215-E49768295169}.Debug|Any CPU.Build.0 = Debug|Any CPU {DA39AD38-4A58-47BF-9215-E49768295169}.Debug|x86.ActiveCfg = Debug|Any CPU {DA39AD38-4A58-47BF-9215-E49768295169}.Debug|x86.Build.0 = Debug|Any CPU - {DA39AD38-4A58-47BF-9215-E49768295169}.Proto|Any CPU.ActiveCfg = Proto|Any CPU - {DA39AD38-4A58-47BF-9215-E49768295169}.Proto|Any CPU.Build.0 = Proto|Any CPU - {DA39AD38-4A58-47BF-9215-E49768295169}.Proto|x86.ActiveCfg = Proto|Any CPU - {DA39AD38-4A58-47BF-9215-E49768295169}.Proto|x86.Build.0 = Proto|Any CPU {DA39AD38-4A58-47BF-9215-E49768295169}.Release|Any CPU.ActiveCfg = Release|Any CPU {DA39AD38-4A58-47BF-9215-E49768295169}.Release|Any CPU.Build.0 = Release|Any CPU {DA39AD38-4A58-47BF-9215-E49768295169}.Release|x86.ActiveCfg = Release|Any CPU @@ -310,10 +260,6 @@ Global {8C2439BD-0E49-4929-A8B1-29CEE228191E}.Debug|Any CPU.Build.0 = Debug|Any CPU {8C2439BD-0E49-4929-A8B1-29CEE228191E}.Debug|x86.ActiveCfg = Debug|Any CPU {8C2439BD-0E49-4929-A8B1-29CEE228191E}.Debug|x86.Build.0 = Debug|Any CPU - {8C2439BD-0E49-4929-A8B1-29CEE228191E}.Proto|Any CPU.ActiveCfg = Proto|Any CPU - {8C2439BD-0E49-4929-A8B1-29CEE228191E}.Proto|Any CPU.Build.0 = Proto|Any CPU - {8C2439BD-0E49-4929-A8B1-29CEE228191E}.Proto|x86.ActiveCfg = Proto|Any CPU - {8C2439BD-0E49-4929-A8B1-29CEE228191E}.Proto|x86.Build.0 = Proto|Any CPU {8C2439BD-0E49-4929-A8B1-29CEE228191E}.Release|Any CPU.ActiveCfg = Release|Any CPU {8C2439BD-0E49-4929-A8B1-29CEE228191E}.Release|Any CPU.Build.0 = Release|Any CPU {8C2439BD-0E49-4929-A8B1-29CEE228191E}.Release|x86.ActiveCfg = Release|Any CPU @@ -322,10 +268,6 @@ Global {F47196DC-186D-4055-BAF2-658282A12F33}.Debug|Any CPU.Build.0 = Debug|Any CPU {F47196DC-186D-4055-BAF2-658282A12F33}.Debug|x86.ActiveCfg = Debug|Any CPU {F47196DC-186D-4055-BAF2-658282A12F33}.Debug|x86.Build.0 = Debug|Any CPU - {F47196DC-186D-4055-BAF2-658282A12F33}.Proto|Any CPU.ActiveCfg = Proto|Any CPU - {F47196DC-186D-4055-BAF2-658282A12F33}.Proto|Any CPU.Build.0 = Proto|Any CPU - {F47196DC-186D-4055-BAF2-658282A12F33}.Proto|x86.ActiveCfg = Proto|Any CPU - {F47196DC-186D-4055-BAF2-658282A12F33}.Proto|x86.Build.0 = Proto|Any CPU {F47196DC-186D-4055-BAF2-658282A12F33}.Release|Any CPU.ActiveCfg = Release|Any CPU {F47196DC-186D-4055-BAF2-658282A12F33}.Release|Any CPU.Build.0 = Release|Any CPU {F47196DC-186D-4055-BAF2-658282A12F33}.Release|x86.ActiveCfg = Release|Any CPU @@ -334,10 +276,6 @@ Global {D4C88934-5893-467E-A55C-A11ECD6479FE}.Debug|Any CPU.Build.0 = Debug|Any CPU {D4C88934-5893-467E-A55C-A11ECD6479FE}.Debug|x86.ActiveCfg = Debug|Any CPU {D4C88934-5893-467E-A55C-A11ECD6479FE}.Debug|x86.Build.0 = Debug|Any CPU - {D4C88934-5893-467E-A55C-A11ECD6479FE}.Proto|Any CPU.ActiveCfg = Proto|Any CPU - {D4C88934-5893-467E-A55C-A11ECD6479FE}.Proto|Any CPU.Build.0 = Proto|Any CPU - {D4C88934-5893-467E-A55C-A11ECD6479FE}.Proto|x86.ActiveCfg = Proto|Any CPU - {D4C88934-5893-467E-A55C-A11ECD6479FE}.Proto|x86.Build.0 = Proto|Any CPU {D4C88934-5893-467E-A55C-A11ECD6479FE}.Release|Any CPU.ActiveCfg = Release|Any CPU {D4C88934-5893-467E-A55C-A11ECD6479FE}.Release|Any CPU.Build.0 = Release|Any CPU {D4C88934-5893-467E-A55C-A11ECD6479FE}.Release|x86.ActiveCfg = Release|Any CPU @@ -346,10 +284,6 @@ Global {6AFF752D-E991-4A08-9ED2-5BF46B0E0F8B}.Debug|Any CPU.Build.0 = Debug|Any CPU {6AFF752D-E991-4A08-9ED2-5BF46B0E0F8B}.Debug|x86.ActiveCfg = Debug|Any CPU {6AFF752D-E991-4A08-9ED2-5BF46B0E0F8B}.Debug|x86.Build.0 = Debug|Any CPU - {6AFF752D-E991-4A08-9ED2-5BF46B0E0F8B}.Proto|Any CPU.ActiveCfg = Proto|Any CPU - {6AFF752D-E991-4A08-9ED2-5BF46B0E0F8B}.Proto|Any CPU.Build.0 = Proto|Any CPU - {6AFF752D-E991-4A08-9ED2-5BF46B0E0F8B}.Proto|x86.ActiveCfg = Proto|Any CPU - {6AFF752D-E991-4A08-9ED2-5BF46B0E0F8B}.Proto|x86.Build.0 = Proto|Any CPU {6AFF752D-E991-4A08-9ED2-5BF46B0E0F8B}.Release|Any CPU.ActiveCfg = Release|Any CPU {6AFF752D-E991-4A08-9ED2-5BF46B0E0F8B}.Release|Any CPU.Build.0 = Release|Any CPU {6AFF752D-E991-4A08-9ED2-5BF46B0E0F8B}.Release|x86.ActiveCfg = Release|Any CPU @@ -358,10 +292,6 @@ Global {0B9CDEAF-EE8F-45E0-A4E0-34A8ED6DD09E}.Debug|Any CPU.Build.0 = Debug|Any CPU {0B9CDEAF-EE8F-45E0-A4E0-34A8ED6DD09E}.Debug|x86.ActiveCfg = Debug|Any CPU {0B9CDEAF-EE8F-45E0-A4E0-34A8ED6DD09E}.Debug|x86.Build.0 = Debug|Any CPU - {0B9CDEAF-EE8F-45E0-A4E0-34A8ED6DD09E}.Proto|Any CPU.ActiveCfg = Proto|Any CPU - {0B9CDEAF-EE8F-45E0-A4E0-34A8ED6DD09E}.Proto|Any CPU.Build.0 = Proto|Any CPU - {0B9CDEAF-EE8F-45E0-A4E0-34A8ED6DD09E}.Proto|x86.ActiveCfg = Proto|Any CPU - {0B9CDEAF-EE8F-45E0-A4E0-34A8ED6DD09E}.Proto|x86.Build.0 = Proto|Any CPU {0B9CDEAF-EE8F-45E0-A4E0-34A8ED6DD09E}.Release|Any CPU.ActiveCfg = Release|Any CPU {0B9CDEAF-EE8F-45E0-A4E0-34A8ED6DD09E}.Release|Any CPU.Build.0 = Release|Any CPU {0B9CDEAF-EE8F-45E0-A4E0-34A8ED6DD09E}.Release|x86.ActiveCfg = Release|Any CPU @@ -370,10 +300,6 @@ Global {004982C6-93EA-4E70-B4F0-BE7D7219926A}.Debug|Any CPU.Build.0 = Debug|Any CPU {004982C6-93EA-4E70-B4F0-BE7D7219926A}.Debug|x86.ActiveCfg = Debug|Any CPU {004982C6-93EA-4E70-B4F0-BE7D7219926A}.Debug|x86.Build.0 = Debug|Any CPU - {004982C6-93EA-4E70-B4F0-BE7D7219926A}.Proto|Any CPU.ActiveCfg = Proto|Any CPU - {004982C6-93EA-4E70-B4F0-BE7D7219926A}.Proto|Any CPU.Build.0 = Proto|Any CPU - {004982C6-93EA-4E70-B4F0-BE7D7219926A}.Proto|x86.ActiveCfg = Proto|Any CPU - {004982C6-93EA-4E70-B4F0-BE7D7219926A}.Proto|x86.Build.0 = Proto|Any CPU {004982C6-93EA-4E70-B4F0-BE7D7219926A}.Release|Any CPU.ActiveCfg = Release|Any CPU {004982C6-93EA-4E70-B4F0-BE7D7219926A}.Release|Any CPU.Build.0 = Release|Any CPU {004982C6-93EA-4E70-B4F0-BE7D7219926A}.Release|x86.ActiveCfg = Release|Any CPU @@ -382,10 +308,6 @@ Global {243A81AC-A954-4601-833A-60EEEFB00FCD}.Debug|Any CPU.Build.0 = Debug|Any CPU {243A81AC-A954-4601-833A-60EEEFB00FCD}.Debug|x86.ActiveCfg = Debug|Any CPU {243A81AC-A954-4601-833A-60EEEFB00FCD}.Debug|x86.Build.0 = Debug|Any CPU - {243A81AC-A954-4601-833A-60EEEFB00FCD}.Proto|Any CPU.ActiveCfg = Proto|Any CPU - {243A81AC-A954-4601-833A-60EEEFB00FCD}.Proto|Any CPU.Build.0 = Proto|Any CPU - {243A81AC-A954-4601-833A-60EEEFB00FCD}.Proto|x86.ActiveCfg = Proto|Any CPU - {243A81AC-A954-4601-833A-60EEEFB00FCD}.Proto|x86.Build.0 = Proto|Any CPU {243A81AC-A954-4601-833A-60EEEFB00FCD}.Release|Any CPU.ActiveCfg = Release|Any CPU {243A81AC-A954-4601-833A-60EEEFB00FCD}.Release|Any CPU.Build.0 = Release|Any CPU {243A81AC-A954-4601-833A-60EEEFB00FCD}.Release|x86.ActiveCfg = Release|Any CPU @@ -394,10 +316,6 @@ Global {B4595EB6-053A-400E-AA1B-7727F1BC900F}.Debug|Any CPU.Build.0 = Debug|Any CPU {B4595EB6-053A-400E-AA1B-7727F1BC900F}.Debug|x86.ActiveCfg = Debug|Any CPU {B4595EB6-053A-400E-AA1B-7727F1BC900F}.Debug|x86.Build.0 = Debug|Any CPU - {B4595EB6-053A-400E-AA1B-7727F1BC900F}.Proto|Any CPU.ActiveCfg = Proto|Any CPU - {B4595EB6-053A-400E-AA1B-7727F1BC900F}.Proto|Any CPU.Build.0 = Proto|Any CPU - {B4595EB6-053A-400E-AA1B-7727F1BC900F}.Proto|x86.ActiveCfg = Proto|Any CPU - {B4595EB6-053A-400E-AA1B-7727F1BC900F}.Proto|x86.Build.0 = Proto|Any CPU {B4595EB6-053A-400E-AA1B-7727F1BC900F}.Release|Any CPU.ActiveCfg = Release|Any CPU {B4595EB6-053A-400E-AA1B-7727F1BC900F}.Release|Any CPU.Build.0 = Release|Any CPU {B4595EB6-053A-400E-AA1B-7727F1BC900F}.Release|x86.ActiveCfg = Release|Any CPU @@ -406,10 +324,6 @@ Global {A559D7E8-7EFD-473A-B618-A10B41AB523B}.Debug|Any CPU.Build.0 = Debug|Any CPU {A559D7E8-7EFD-473A-B618-A10B41AB523B}.Debug|x86.ActiveCfg = Debug|Any CPU {A559D7E8-7EFD-473A-B618-A10B41AB523B}.Debug|x86.Build.0 = Debug|Any CPU - {A559D7E8-7EFD-473A-B618-A10B41AB523B}.Proto|Any CPU.ActiveCfg = Proto|Any CPU - {A559D7E8-7EFD-473A-B618-A10B41AB523B}.Proto|Any CPU.Build.0 = Proto|Any CPU - {A559D7E8-7EFD-473A-B618-A10B41AB523B}.Proto|x86.ActiveCfg = Proto|Any CPU - {A559D7E8-7EFD-473A-B618-A10B41AB523B}.Proto|x86.Build.0 = Proto|Any CPU {A559D7E8-7EFD-473A-B618-A10B41AB523B}.Release|Any CPU.ActiveCfg = Release|Any CPU {A559D7E8-7EFD-473A-B618-A10B41AB523B}.Release|Any CPU.Build.0 = Release|Any CPU {A559D7E8-7EFD-473A-B618-A10B41AB523B}.Release|x86.ActiveCfg = Release|Any CPU @@ -418,10 +332,6 @@ Global {AC85EE6D-033C-45F9-B8BA-884BC22EC6D9}.Debug|Any CPU.Build.0 = Debug|Any CPU {AC85EE6D-033C-45F9-B8BA-884BC22EC6D9}.Debug|x86.ActiveCfg = Debug|Any CPU {AC85EE6D-033C-45F9-B8BA-884BC22EC6D9}.Debug|x86.Build.0 = Debug|Any CPU - {AC85EE6D-033C-45F9-B8BA-884BC22EC6D9}.Proto|Any CPU.ActiveCfg = Proto|Any CPU - {AC85EE6D-033C-45F9-B8BA-884BC22EC6D9}.Proto|Any CPU.Build.0 = Proto|Any CPU - {AC85EE6D-033C-45F9-B8BA-884BC22EC6D9}.Proto|x86.ActiveCfg = Proto|Any CPU - {AC85EE6D-033C-45F9-B8BA-884BC22EC6D9}.Proto|x86.Build.0 = Proto|Any CPU {AC85EE6D-033C-45F9-B8BA-884BC22EC6D9}.Release|Any CPU.ActiveCfg = Release|Any CPU {AC85EE6D-033C-45F9-B8BA-884BC22EC6D9}.Release|Any CPU.Build.0 = Release|Any CPU {AC85EE6D-033C-45F9-B8BA-884BC22EC6D9}.Release|x86.ActiveCfg = Release|Any CPU @@ -430,10 +340,6 @@ Global {956BBE41-ABD1-4DBA-9F3B-BA1C9821C98C}.Debug|Any CPU.Build.0 = Debug|Any CPU {956BBE41-ABD1-4DBA-9F3B-BA1C9821C98C}.Debug|x86.ActiveCfg = Debug|Any CPU {956BBE41-ABD1-4DBA-9F3B-BA1C9821C98C}.Debug|x86.Build.0 = Debug|Any CPU - {956BBE41-ABD1-4DBA-9F3B-BA1C9821C98C}.Proto|Any CPU.ActiveCfg = Proto|Any CPU - {956BBE41-ABD1-4DBA-9F3B-BA1C9821C98C}.Proto|Any CPU.Build.0 = Proto|Any CPU - {956BBE41-ABD1-4DBA-9F3B-BA1C9821C98C}.Proto|x86.ActiveCfg = Proto|Any CPU - {956BBE41-ABD1-4DBA-9F3B-BA1C9821C98C}.Proto|x86.Build.0 = Proto|Any CPU {956BBE41-ABD1-4DBA-9F3B-BA1C9821C98C}.Release|Any CPU.ActiveCfg = Release|Any CPU {956BBE41-ABD1-4DBA-9F3B-BA1C9821C98C}.Release|Any CPU.Build.0 = Release|Any CPU {956BBE41-ABD1-4DBA-9F3B-BA1C9821C98C}.Release|x86.ActiveCfg = Release|Any CPU @@ -442,10 +348,6 @@ Global {702A7979-BCF9-4C41-853E-3ADFC9897890}.Debug|Any CPU.Build.0 = Debug|Any CPU {702A7979-BCF9-4C41-853E-3ADFC9897890}.Debug|x86.ActiveCfg = Debug|Any CPU {702A7979-BCF9-4C41-853E-3ADFC9897890}.Debug|x86.Build.0 = Debug|Any CPU - {702A7979-BCF9-4C41-853E-3ADFC9897890}.Proto|Any CPU.ActiveCfg = Proto|Any CPU - {702A7979-BCF9-4C41-853E-3ADFC9897890}.Proto|Any CPU.Build.0 = Proto|Any CPU - {702A7979-BCF9-4C41-853E-3ADFC9897890}.Proto|x86.ActiveCfg = Proto|Any CPU - {702A7979-BCF9-4C41-853E-3ADFC9897890}.Proto|x86.Build.0 = Proto|Any CPU {702A7979-BCF9-4C41-853E-3ADFC9897890}.Release|Any CPU.ActiveCfg = Release|Any CPU {702A7979-BCF9-4C41-853E-3ADFC9897890}.Release|Any CPU.Build.0 = Release|Any CPU {702A7979-BCF9-4C41-853E-3ADFC9897890}.Release|x86.ActiveCfg = Release|Any CPU @@ -454,10 +356,6 @@ Global {C94C257C-3C0A-4858-B5D8-D746498D1F08}.Debug|Any CPU.Build.0 = Debug|Any CPU {C94C257C-3C0A-4858-B5D8-D746498D1F08}.Debug|x86.ActiveCfg = Debug|Any CPU {C94C257C-3C0A-4858-B5D8-D746498D1F08}.Debug|x86.Build.0 = Debug|Any CPU - {C94C257C-3C0A-4858-B5D8-D746498D1F08}.Proto|Any CPU.ActiveCfg = Proto|Any CPU - {C94C257C-3C0A-4858-B5D8-D746498D1F08}.Proto|Any CPU.Build.0 = Proto|Any CPU - {C94C257C-3C0A-4858-B5D8-D746498D1F08}.Proto|x86.ActiveCfg = Proto|Any CPU - {C94C257C-3C0A-4858-B5D8-D746498D1F08}.Proto|x86.Build.0 = Proto|Any CPU {C94C257C-3C0A-4858-B5D8-D746498D1F08}.Release|Any CPU.ActiveCfg = Release|Any CPU {C94C257C-3C0A-4858-B5D8-D746498D1F08}.Release|Any CPU.Build.0 = Release|Any CPU {C94C257C-3C0A-4858-B5D8-D746498D1F08}.Release|x86.ActiveCfg = Release|Any CPU @@ -466,10 +364,6 @@ Global {649FA588-F02E-457C-9FCF-87E46407481E}.Debug|Any CPU.Build.0 = Debug|Any CPU {649FA588-F02E-457C-9FCF-87E46407481E}.Debug|x86.ActiveCfg = Debug|Any CPU {649FA588-F02E-457C-9FCF-87E46407481E}.Debug|x86.Build.0 = Debug|Any CPU - {649FA588-F02E-457C-9FCF-87E46407481E}.Proto|Any CPU.ActiveCfg = Proto|Any CPU - {649FA588-F02E-457C-9FCF-87E46407481E}.Proto|Any CPU.Build.0 = Proto|Any CPU - {649FA588-F02E-457C-9FCF-87E46407481E}.Proto|x86.ActiveCfg = Proto|Any CPU - {649FA588-F02E-457C-9FCF-87E46407481E}.Proto|x86.Build.0 = Proto|Any CPU {649FA588-F02E-457C-9FCF-87E46407481E}.Release|Any CPU.ActiveCfg = Release|Any CPU {649FA588-F02E-457C-9FCF-87E46407481E}.Release|Any CPU.Build.0 = Release|Any CPU {649FA588-F02E-457C-9FCF-87E46407481E}.Release|x86.ActiveCfg = Release|Any CPU @@ -478,10 +372,6 @@ Global {8B3E283D-B5FE-4055-9D80-7E3A32F3967B}.Debug|Any CPU.Build.0 = Debug|Any CPU {8B3E283D-B5FE-4055-9D80-7E3A32F3967B}.Debug|x86.ActiveCfg = Debug|Any CPU {8B3E283D-B5FE-4055-9D80-7E3A32F3967B}.Debug|x86.Build.0 = Debug|Any CPU - {8B3E283D-B5FE-4055-9D80-7E3A32F3967B}.Proto|Any CPU.ActiveCfg = Proto|Any CPU - {8B3E283D-B5FE-4055-9D80-7E3A32F3967B}.Proto|Any CPU.Build.0 = Proto|Any CPU - {8B3E283D-B5FE-4055-9D80-7E3A32F3967B}.Proto|x86.ActiveCfg = Proto|Any CPU - {8B3E283D-B5FE-4055-9D80-7E3A32F3967B}.Proto|x86.Build.0 = Proto|Any CPU {8B3E283D-B5FE-4055-9D80-7E3A32F3967B}.Release|Any CPU.ActiveCfg = Release|Any CPU {8B3E283D-B5FE-4055-9D80-7E3A32F3967B}.Release|Any CPU.Build.0 = Release|Any CPU {8B3E283D-B5FE-4055-9D80-7E3A32F3967B}.Release|x86.ActiveCfg = Release|Any CPU @@ -490,10 +380,6 @@ Global {D0E98C0D-490B-4C61-9329-0862F6E87645}.Debug|Any CPU.Build.0 = Debug|Any CPU {D0E98C0D-490B-4C61-9329-0862F6E87645}.Debug|x86.ActiveCfg = Debug|Any CPU {D0E98C0D-490B-4C61-9329-0862F6E87645}.Debug|x86.Build.0 = Debug|Any CPU - {D0E98C0D-490B-4C61-9329-0862F6E87645}.Proto|Any CPU.ActiveCfg = Proto|Any CPU - {D0E98C0D-490B-4C61-9329-0862F6E87645}.Proto|Any CPU.Build.0 = Proto|Any CPU - {D0E98C0D-490B-4C61-9329-0862F6E87645}.Proto|x86.ActiveCfg = Proto|Any CPU - {D0E98C0D-490B-4C61-9329-0862F6E87645}.Proto|x86.Build.0 = Proto|Any CPU {D0E98C0D-490B-4C61-9329-0862F6E87645}.Release|Any CPU.ActiveCfg = Release|Any CPU {D0E98C0D-490B-4C61-9329-0862F6E87645}.Release|Any CPU.Build.0 = Release|Any CPU {D0E98C0D-490B-4C61-9329-0862F6E87645}.Release|x86.ActiveCfg = Release|Any CPU @@ -502,10 +388,6 @@ Global {C163E892-5BF7-4B59-AA99-B0E8079C67C4}.Debug|Any CPU.Build.0 = Debug|Any CPU {C163E892-5BF7-4B59-AA99-B0E8079C67C4}.Debug|x86.ActiveCfg = Debug|Any CPU {C163E892-5BF7-4B59-AA99-B0E8079C67C4}.Debug|x86.Build.0 = Debug|Any CPU - {C163E892-5BF7-4B59-AA99-B0E8079C67C4}.Proto|Any CPU.ActiveCfg = Proto|Any CPU - {C163E892-5BF7-4B59-AA99-B0E8079C67C4}.Proto|Any CPU.Build.0 = Proto|Any CPU - {C163E892-5BF7-4B59-AA99-B0E8079C67C4}.Proto|x86.ActiveCfg = Proto|Any CPU - {C163E892-5BF7-4B59-AA99-B0E8079C67C4}.Proto|x86.Build.0 = Proto|Any CPU {C163E892-5BF7-4B59-AA99-B0E8079C67C4}.Release|Any CPU.ActiveCfg = Release|Any CPU {C163E892-5BF7-4B59-AA99-B0E8079C67C4}.Release|Any CPU.Build.0 = Release|Any CPU {C163E892-5BF7-4B59-AA99-B0E8079C67C4}.Release|x86.ActiveCfg = Release|Any CPU @@ -514,10 +396,6 @@ Global {A8D9641A-9170-4CF4-8FE0-6DB8C134E1B5}.Debug|Any CPU.Build.0 = Debug|Any CPU {A8D9641A-9170-4CF4-8FE0-6DB8C134E1B5}.Debug|x86.ActiveCfg = Debug|Any CPU {A8D9641A-9170-4CF4-8FE0-6DB8C134E1B5}.Debug|x86.Build.0 = Debug|Any CPU - {A8D9641A-9170-4CF4-8FE0-6DB8C134E1B5}.Proto|Any CPU.ActiveCfg = Proto|Any CPU - {A8D9641A-9170-4CF4-8FE0-6DB8C134E1B5}.Proto|Any CPU.Build.0 = Proto|Any CPU - {A8D9641A-9170-4CF4-8FE0-6DB8C134E1B5}.Proto|x86.ActiveCfg = Proto|Any CPU - {A8D9641A-9170-4CF4-8FE0-6DB8C134E1B5}.Proto|x86.Build.0 = Proto|Any CPU {A8D9641A-9170-4CF4-8FE0-6DB8C134E1B5}.Release|Any CPU.ActiveCfg = Release|Any CPU {A8D9641A-9170-4CF4-8FE0-6DB8C134E1B5}.Release|Any CPU.Build.0 = Release|Any CPU {A8D9641A-9170-4CF4-8FE0-6DB8C134E1B5}.Release|x86.ActiveCfg = Release|Any CPU @@ -526,10 +404,6 @@ Global {88E2D422-6852-46E3-A740-83E391DC7973}.Debug|Any CPU.Build.0 = Debug|Any CPU {88E2D422-6852-46E3-A740-83E391DC7973}.Debug|x86.ActiveCfg = Debug|Any CPU {88E2D422-6852-46E3-A740-83E391DC7973}.Debug|x86.Build.0 = Debug|Any CPU - {88E2D422-6852-46E3-A740-83E391DC7973}.Proto|Any CPU.ActiveCfg = Proto|Any CPU - {88E2D422-6852-46E3-A740-83E391DC7973}.Proto|Any CPU.Build.0 = Proto|Any CPU - {88E2D422-6852-46E3-A740-83E391DC7973}.Proto|x86.ActiveCfg = Proto|Any CPU - {88E2D422-6852-46E3-A740-83E391DC7973}.Proto|x86.Build.0 = Proto|Any CPU {88E2D422-6852-46E3-A740-83E391DC7973}.Release|Any CPU.ActiveCfg = Release|Any CPU {88E2D422-6852-46E3-A740-83E391DC7973}.Release|Any CPU.Build.0 = Release|Any CPU {88E2D422-6852-46E3-A740-83E391DC7973}.Release|x86.ActiveCfg = Release|Any CPU @@ -538,10 +412,6 @@ Global {604F0DAA-2D33-48DD-B162-EDF0B672803D}.Debug|Any CPU.Build.0 = Debug|Any CPU {604F0DAA-2D33-48DD-B162-EDF0B672803D}.Debug|x86.ActiveCfg = Debug|Any CPU {604F0DAA-2D33-48DD-B162-EDF0B672803D}.Debug|x86.Build.0 = Debug|Any CPU - {604F0DAA-2D33-48DD-B162-EDF0B672803D}.Proto|Any CPU.ActiveCfg = Proto|Any CPU - {604F0DAA-2D33-48DD-B162-EDF0B672803D}.Proto|Any CPU.Build.0 = Proto|Any CPU - {604F0DAA-2D33-48DD-B162-EDF0B672803D}.Proto|x86.ActiveCfg = Proto|Any CPU - {604F0DAA-2D33-48DD-B162-EDF0B672803D}.Proto|x86.Build.0 = Proto|Any CPU {604F0DAA-2D33-48DD-B162-EDF0B672803D}.Release|Any CPU.ActiveCfg = Release|Any CPU {604F0DAA-2D33-48DD-B162-EDF0B672803D}.Release|Any CPU.Build.0 = Release|Any CPU {604F0DAA-2D33-48DD-B162-EDF0B672803D}.Release|x86.ActiveCfg = Release|Any CPU @@ -550,10 +420,6 @@ Global {01678CDA-A11F-4DEE-9344-2EDF91CF1AE7}.Debug|Any CPU.Build.0 = Debug|Any CPU {01678CDA-A11F-4DEE-9344-2EDF91CF1AE7}.Debug|x86.ActiveCfg = Debug|Any CPU {01678CDA-A11F-4DEE-9344-2EDF91CF1AE7}.Debug|x86.Build.0 = Debug|Any CPU - {01678CDA-A11F-4DEE-9344-2EDF91CF1AE7}.Proto|Any CPU.ActiveCfg = Proto|Any CPU - {01678CDA-A11F-4DEE-9344-2EDF91CF1AE7}.Proto|Any CPU.Build.0 = Proto|Any CPU - {01678CDA-A11F-4DEE-9344-2EDF91CF1AE7}.Proto|x86.ActiveCfg = Proto|Any CPU - {01678CDA-A11F-4DEE-9344-2EDF91CF1AE7}.Proto|x86.Build.0 = Proto|Any CPU {01678CDA-A11F-4DEE-9344-2EDF91CF1AE7}.Release|Any CPU.ActiveCfg = Release|Any CPU {01678CDA-A11F-4DEE-9344-2EDF91CF1AE7}.Release|Any CPU.Build.0 = Release|Any CPU {01678CDA-A11F-4DEE-9344-2EDF91CF1AE7}.Release|x86.ActiveCfg = Release|Any CPU @@ -562,10 +428,6 @@ Global {2FACEE44-48BD-40B5-A2EE-B54A0C9BB7C4}.Debug|Any CPU.Build.0 = Debug|Any CPU {2FACEE44-48BD-40B5-A2EE-B54A0C9BB7C4}.Debug|x86.ActiveCfg = Debug|Any CPU {2FACEE44-48BD-40B5-A2EE-B54A0C9BB7C4}.Debug|x86.Build.0 = Debug|Any CPU - {2FACEE44-48BD-40B5-A2EE-B54A0C9BB7C4}.Proto|Any CPU.ActiveCfg = Proto|Any CPU - {2FACEE44-48BD-40B5-A2EE-B54A0C9BB7C4}.Proto|Any CPU.Build.0 = Proto|Any CPU - {2FACEE44-48BD-40B5-A2EE-B54A0C9BB7C4}.Proto|x86.ActiveCfg = Proto|Any CPU - {2FACEE44-48BD-40B5-A2EE-B54A0C9BB7C4}.Proto|x86.Build.0 = Proto|Any CPU {2FACEE44-48BD-40B5-A2EE-B54A0C9BB7C4}.Release|Any CPU.ActiveCfg = Release|Any CPU {2FACEE44-48BD-40B5-A2EE-B54A0C9BB7C4}.Release|Any CPU.Build.0 = Release|Any CPU {2FACEE44-48BD-40B5-A2EE-B54A0C9BB7C4}.Release|x86.ActiveCfg = Release|Any CPU @@ -574,10 +436,6 @@ Global {6BA13AA4-C25F-480F-856B-8E8000299A72}.Debug|Any CPU.Build.0 = Debug|Any CPU {6BA13AA4-C25F-480F-856B-8E8000299A72}.Debug|x86.ActiveCfg = Debug|Any CPU {6BA13AA4-C25F-480F-856B-8E8000299A72}.Debug|x86.Build.0 = Debug|Any CPU - {6BA13AA4-C25F-480F-856B-8E8000299A72}.Proto|Any CPU.ActiveCfg = Proto|Any CPU - {6BA13AA4-C25F-480F-856B-8E8000299A72}.Proto|Any CPU.Build.0 = Proto|Any CPU - {6BA13AA4-C25F-480F-856B-8E8000299A72}.Proto|x86.ActiveCfg = Proto|Any CPU - {6BA13AA4-C25F-480F-856B-8E8000299A72}.Proto|x86.Build.0 = Proto|Any CPU {6BA13AA4-C25F-480F-856B-8E8000299A72}.Release|Any CPU.ActiveCfg = Release|Any CPU {6BA13AA4-C25F-480F-856B-8E8000299A72}.Release|Any CPU.Build.0 = Release|Any CPU {6BA13AA4-C25F-480F-856B-8E8000299A72}.Release|x86.ActiveCfg = Release|Any CPU @@ -586,10 +444,6 @@ Global {12AC2813-E895-4AAA-AE6C-94E21DA09F64}.Debug|Any CPU.Build.0 = Debug|Any CPU {12AC2813-E895-4AAA-AE6C-94E21DA09F64}.Debug|x86.ActiveCfg = Debug|Any CPU {12AC2813-E895-4AAA-AE6C-94E21DA09F64}.Debug|x86.Build.0 = Debug|Any CPU - {12AC2813-E895-4AAA-AE6C-94E21DA09F64}.Proto|Any CPU.ActiveCfg = Proto|Any CPU - {12AC2813-E895-4AAA-AE6C-94E21DA09F64}.Proto|Any CPU.Build.0 = Proto|Any CPU - {12AC2813-E895-4AAA-AE6C-94E21DA09F64}.Proto|x86.ActiveCfg = Proto|Any CPU - {12AC2813-E895-4AAA-AE6C-94E21DA09F64}.Proto|x86.Build.0 = Proto|Any CPU {12AC2813-E895-4AAA-AE6C-94E21DA09F64}.Release|Any CPU.ActiveCfg = Release|Any CPU {12AC2813-E895-4AAA-AE6C-94E21DA09F64}.Release|Any CPU.Build.0 = Release|Any CPU {12AC2813-E895-4AAA-AE6C-94E21DA09F64}.Release|x86.ActiveCfg = Release|Any CPU @@ -598,10 +452,6 @@ Global {A333B85A-DC23-49B6-9797-B89A7951E92D}.Debug|Any CPU.Build.0 = Debug|Any CPU {A333B85A-DC23-49B6-9797-B89A7951E92D}.Debug|x86.ActiveCfg = Debug|Any CPU {A333B85A-DC23-49B6-9797-B89A7951E92D}.Debug|x86.Build.0 = Debug|Any CPU - {A333B85A-DC23-49B6-9797-B89A7951E92D}.Proto|Any CPU.ActiveCfg = Proto|Any CPU - {A333B85A-DC23-49B6-9797-B89A7951E92D}.Proto|Any CPU.Build.0 = Proto|Any CPU - {A333B85A-DC23-49B6-9797-B89A7951E92D}.Proto|x86.ActiveCfg = Proto|Any CPU - {A333B85A-DC23-49B6-9797-B89A7951E92D}.Proto|x86.Build.0 = Proto|Any CPU {A333B85A-DC23-49B6-9797-B89A7951E92D}.Release|Any CPU.ActiveCfg = Release|Any CPU {A333B85A-DC23-49B6-9797-B89A7951E92D}.Release|Any CPU.Build.0 = Release|Any CPU {A333B85A-DC23-49B6-9797-B89A7951E92D}.Release|x86.ActiveCfg = Release|Any CPU @@ -610,10 +460,6 @@ Global {E3FDD4AC-46B6-4B9F-B672-317D1202CC50}.Debug|Any CPU.Build.0 = Debug|Any CPU {E3FDD4AC-46B6-4B9F-B672-317D1202CC50}.Debug|x86.ActiveCfg = Debug|Any CPU {E3FDD4AC-46B6-4B9F-B672-317D1202CC50}.Debug|x86.Build.0 = Debug|Any CPU - {E3FDD4AC-46B6-4B9F-B672-317D1202CC50}.Proto|Any CPU.ActiveCfg = Proto|Any CPU - {E3FDD4AC-46B6-4B9F-B672-317D1202CC50}.Proto|Any CPU.Build.0 = Proto|Any CPU - {E3FDD4AC-46B6-4B9F-B672-317D1202CC50}.Proto|x86.ActiveCfg = Proto|Any CPU - {E3FDD4AC-46B6-4B9F-B672-317D1202CC50}.Proto|x86.Build.0 = Proto|Any CPU {E3FDD4AC-46B6-4B9F-B672-317D1202CC50}.Release|Any CPU.ActiveCfg = Release|Any CPU {E3FDD4AC-46B6-4B9F-B672-317D1202CC50}.Release|Any CPU.Build.0 = Release|Any CPU {E3FDD4AC-46B6-4B9F-B672-317D1202CC50}.Release|x86.ActiveCfg = Release|Any CPU @@ -622,10 +468,6 @@ Global {D11FC318-8F5D-4C8C-9287-AB40A016D13C}.Debug|Any CPU.Build.0 = Debug|Any CPU {D11FC318-8F5D-4C8C-9287-AB40A016D13C}.Debug|x86.ActiveCfg = Debug|Any CPU {D11FC318-8F5D-4C8C-9287-AB40A016D13C}.Debug|x86.Build.0 = Debug|Any CPU - {D11FC318-8F5D-4C8C-9287-AB40A016D13C}.Proto|Any CPU.ActiveCfg = Proto|Any CPU - {D11FC318-8F5D-4C8C-9287-AB40A016D13C}.Proto|Any CPU.Build.0 = Proto|Any CPU - {D11FC318-8F5D-4C8C-9287-AB40A016D13C}.Proto|x86.ActiveCfg = Proto|Any CPU - {D11FC318-8F5D-4C8C-9287-AB40A016D13C}.Proto|x86.Build.0 = Proto|Any CPU {D11FC318-8F5D-4C8C-9287-AB40A016D13C}.Release|Any CPU.ActiveCfg = Release|Any CPU {D11FC318-8F5D-4C8C-9287-AB40A016D13C}.Release|Any CPU.Build.0 = Release|Any CPU {D11FC318-8F5D-4C8C-9287-AB40A016D13C}.Release|x86.ActiveCfg = Release|Any CPU @@ -634,46 +476,14 @@ Global {1FB1DD07-06AA-45B4-B5AC-20FF5BEE98B6}.Debug|Any CPU.Build.0 = Debug|Any CPU {1FB1DD07-06AA-45B4-B5AC-20FF5BEE98B6}.Debug|x86.ActiveCfg = Debug|Any CPU {1FB1DD07-06AA-45B4-B5AC-20FF5BEE98B6}.Debug|x86.Build.0 = Debug|Any CPU - {1FB1DD07-06AA-45B4-B5AC-20FF5BEE98B6}.Proto|Any CPU.ActiveCfg = Proto|Any CPU - {1FB1DD07-06AA-45B4-B5AC-20FF5BEE98B6}.Proto|Any CPU.Build.0 = Proto|Any CPU - {1FB1DD07-06AA-45B4-B5AC-20FF5BEE98B6}.Proto|x86.ActiveCfg = Proto|Any CPU - {1FB1DD07-06AA-45B4-B5AC-20FF5BEE98B6}.Proto|x86.Build.0 = Proto|Any CPU {1FB1DD07-06AA-45B4-B5AC-20FF5BEE98B6}.Release|Any CPU.ActiveCfg = Release|Any CPU {1FB1DD07-06AA-45B4-B5AC-20FF5BEE98B6}.Release|Any CPU.Build.0 = Release|Any CPU {1FB1DD07-06AA-45B4-B5AC-20FF5BEE98B6}.Release|x86.ActiveCfg = Release|Any CPU {1FB1DD07-06AA-45B4-B5AC-20FF5BEE98B6}.Release|x86.Build.0 = Release|Any CPU - {59ADCE46-9740-4079-834D-9A03A3494EBC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {59ADCE46-9740-4079-834D-9A03A3494EBC}.Debug|Any CPU.Build.0 = Debug|Any CPU - {59ADCE46-9740-4079-834D-9A03A3494EBC}.Debug|x86.ActiveCfg = Debug|Any CPU - {59ADCE46-9740-4079-834D-9A03A3494EBC}.Debug|x86.Build.0 = Debug|Any CPU - {59ADCE46-9740-4079-834D-9A03A3494EBC}.Proto|Any CPU.ActiveCfg = Proto|Any CPU - {59ADCE46-9740-4079-834D-9A03A3494EBC}.Proto|Any CPU.Build.0 = Proto|Any CPU - {59ADCE46-9740-4079-834D-9A03A3494EBC}.Proto|x86.ActiveCfg = Proto|Any CPU - {59ADCE46-9740-4079-834D-9A03A3494EBC}.Proto|x86.Build.0 = Proto|Any CPU - {59ADCE46-9740-4079-834D-9A03A3494EBC}.Release|Any CPU.ActiveCfg = Release|Any CPU - {59ADCE46-9740-4079-834D-9A03A3494EBC}.Release|Any CPU.Build.0 = Release|Any CPU - {59ADCE46-9740-4079-834D-9A03A3494EBC}.Release|x86.ActiveCfg = Release|Any CPU - {59ADCE46-9740-4079-834D-9A03A3494EBC}.Release|x86.Build.0 = Release|Any CPU - {E6A45CDF-B408-420F-B475-74611BEFC52B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E6A45CDF-B408-420F-B475-74611BEFC52B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E6A45CDF-B408-420F-B475-74611BEFC52B}.Debug|x86.ActiveCfg = Debug|Any CPU - {E6A45CDF-B408-420F-B475-74611BEFC52B}.Debug|x86.Build.0 = Debug|Any CPU - {E6A45CDF-B408-420F-B475-74611BEFC52B}.Proto|Any CPU.ActiveCfg = Proto|Any CPU - {E6A45CDF-B408-420F-B475-74611BEFC52B}.Proto|Any CPU.Build.0 = Proto|Any CPU - {E6A45CDF-B408-420F-B475-74611BEFC52B}.Proto|x86.ActiveCfg = Proto|Any CPU - {E6A45CDF-B408-420F-B475-74611BEFC52B}.Proto|x86.Build.0 = Proto|Any CPU - {E6A45CDF-B408-420F-B475-74611BEFC52B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E6A45CDF-B408-420F-B475-74611BEFC52B}.Release|Any CPU.Build.0 = Release|Any CPU - {E6A45CDF-B408-420F-B475-74611BEFC52B}.Release|x86.ActiveCfg = Release|Any CPU - {E6A45CDF-B408-420F-B475-74611BEFC52B}.Release|x86.Build.0 = Release|Any CPU {4239EFEA-E746-446A-BF7A-51FCBAB13946}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {4239EFEA-E746-446A-BF7A-51FCBAB13946}.Debug|Any CPU.Build.0 = Debug|Any CPU {4239EFEA-E746-446A-BF7A-51FCBAB13946}.Debug|x86.ActiveCfg = Debug|Any CPU {4239EFEA-E746-446A-BF7A-51FCBAB13946}.Debug|x86.Build.0 = Debug|Any CPU - {4239EFEA-E746-446A-BF7A-51FCBAB13946}.Proto|Any CPU.ActiveCfg = Proto|Any CPU - {4239EFEA-E746-446A-BF7A-51FCBAB13946}.Proto|Any CPU.Build.0 = Proto|Any CPU - {4239EFEA-E746-446A-BF7A-51FCBAB13946}.Proto|x86.ActiveCfg = Proto|Any CPU - {4239EFEA-E746-446A-BF7A-51FCBAB13946}.Proto|x86.Build.0 = Proto|Any CPU {4239EFEA-E746-446A-BF7A-51FCBAB13946}.Release|Any CPU.ActiveCfg = Release|Any CPU {4239EFEA-E746-446A-BF7A-51FCBAB13946}.Release|Any CPU.Build.0 = Release|Any CPU {4239EFEA-E746-446A-BF7A-51FCBAB13946}.Release|x86.ActiveCfg = Release|Any CPU @@ -682,10 +492,6 @@ Global {2E60864A-E3FF-4BCC-810F-DC7C34E6B236}.Debug|Any CPU.Build.0 = Debug|Any CPU {2E60864A-E3FF-4BCC-810F-DC7C34E6B236}.Debug|x86.ActiveCfg = Debug|Any CPU {2E60864A-E3FF-4BCC-810F-DC7C34E6B236}.Debug|x86.Build.0 = Debug|Any CPU - {2E60864A-E3FF-4BCC-810F-DC7C34E6B236}.Proto|Any CPU.ActiveCfg = Proto|Any CPU - {2E60864A-E3FF-4BCC-810F-DC7C34E6B236}.Proto|Any CPU.Build.0 = Proto|Any CPU - {2E60864A-E3FF-4BCC-810F-DC7C34E6B236}.Proto|x86.ActiveCfg = Proto|Any CPU - {2E60864A-E3FF-4BCC-810F-DC7C34E6B236}.Proto|x86.Build.0 = Proto|Any CPU {2E60864A-E3FF-4BCC-810F-DC7C34E6B236}.Release|Any CPU.ActiveCfg = Release|Any CPU {2E60864A-E3FF-4BCC-810F-DC7C34E6B236}.Release|Any CPU.Build.0 = Release|Any CPU {2E60864A-E3FF-4BCC-810F-DC7C34E6B236}.Release|x86.ActiveCfg = Release|Any CPU @@ -694,10 +500,6 @@ Global {E7FA3A71-51AF-4FCA-9C2F-7C853E515903}.Debug|Any CPU.Build.0 = Debug|Any CPU {E7FA3A71-51AF-4FCA-9C2F-7C853E515903}.Debug|x86.ActiveCfg = Debug|Any CPU {E7FA3A71-51AF-4FCA-9C2F-7C853E515903}.Debug|x86.Build.0 = Debug|Any CPU - {E7FA3A71-51AF-4FCA-9C2F-7C853E515903}.Proto|Any CPU.ActiveCfg = Proto|Any CPU - {E7FA3A71-51AF-4FCA-9C2F-7C853E515903}.Proto|Any CPU.Build.0 = Proto|Any CPU - {E7FA3A71-51AF-4FCA-9C2F-7C853E515903}.Proto|x86.ActiveCfg = Proto|Any CPU - {E7FA3A71-51AF-4FCA-9C2F-7C853E515903}.Proto|x86.Build.0 = Proto|Any CPU {E7FA3A71-51AF-4FCA-9C2F-7C853E515903}.Release|Any CPU.ActiveCfg = Release|Any CPU {E7FA3A71-51AF-4FCA-9C2F-7C853E515903}.Release|Any CPU.Build.0 = Release|Any CPU {E7FA3A71-51AF-4FCA-9C2F-7C853E515903}.Release|x86.ActiveCfg = Release|Any CPU @@ -706,10 +508,6 @@ Global {C4586A06-1402-48BC-8E35-A1B8642F895B}.Debug|Any CPU.Build.0 = Debug|Any CPU {C4586A06-1402-48BC-8E35-A1B8642F895B}.Debug|x86.ActiveCfg = Debug|Any CPU {C4586A06-1402-48BC-8E35-A1B8642F895B}.Debug|x86.Build.0 = Debug|Any CPU - {C4586A06-1402-48BC-8E35-A1B8642F895B}.Proto|Any CPU.ActiveCfg = Proto|Any CPU - {C4586A06-1402-48BC-8E35-A1B8642F895B}.Proto|Any CPU.Build.0 = Proto|Any CPU - {C4586A06-1402-48BC-8E35-A1B8642F895B}.Proto|x86.ActiveCfg = Proto|Any CPU - {C4586A06-1402-48BC-8E35-A1B8642F895B}.Proto|x86.Build.0 = Proto|Any CPU {C4586A06-1402-48BC-8E35-A1B8642F895B}.Release|Any CPU.ActiveCfg = Release|Any CPU {C4586A06-1402-48BC-8E35-A1B8642F895B}.Release|Any CPU.Build.0 = Release|Any CPU {C4586A06-1402-48BC-8E35-A1B8642F895B}.Release|x86.ActiveCfg = Release|Any CPU @@ -718,10 +516,6 @@ Global {887630A3-4B1D-40EA-B8B3-2D842E9C40DB}.Debug|Any CPU.Build.0 = Debug|Any CPU {887630A3-4B1D-40EA-B8B3-2D842E9C40DB}.Debug|x86.ActiveCfg = Debug|Any CPU {887630A3-4B1D-40EA-B8B3-2D842E9C40DB}.Debug|x86.Build.0 = Debug|Any CPU - {887630A3-4B1D-40EA-B8B3-2D842E9C40DB}.Proto|Any CPU.ActiveCfg = Release|Any CPU - {887630A3-4B1D-40EA-B8B3-2D842E9C40DB}.Proto|Any CPU.Build.0 = Release|Any CPU - {887630A3-4B1D-40EA-B8B3-2D842E9C40DB}.Proto|x86.ActiveCfg = Release|Any CPU - {887630A3-4B1D-40EA-B8B3-2D842E9C40DB}.Proto|x86.Build.0 = Release|Any CPU {887630A3-4B1D-40EA-B8B3-2D842E9C40DB}.Release|Any CPU.ActiveCfg = Release|Any CPU {887630A3-4B1D-40EA-B8B3-2D842E9C40DB}.Release|Any CPU.Build.0 = Release|Any CPU {887630A3-4B1D-40EA-B8B3-2D842E9C40DB}.Release|x86.ActiveCfg = Release|Any CPU @@ -730,10 +524,6 @@ Global {FF76BD3C-5E0A-4752-B6C3-044F6E15719B}.Debug|Any CPU.Build.0 = Debug|Any CPU {FF76BD3C-5E0A-4752-B6C3-044F6E15719B}.Debug|x86.ActiveCfg = Debug|Any CPU {FF76BD3C-5E0A-4752-B6C3-044F6E15719B}.Debug|x86.Build.0 = Debug|Any CPU - {FF76BD3C-5E0A-4752-B6C3-044F6E15719B}.Proto|Any CPU.ActiveCfg = Proto|Any CPU - {FF76BD3C-5E0A-4752-B6C3-044F6E15719B}.Proto|Any CPU.Build.0 = Proto|Any CPU - {FF76BD3C-5E0A-4752-B6C3-044F6E15719B}.Proto|x86.ActiveCfg = Proto|Any CPU - {FF76BD3C-5E0A-4752-B6C3-044F6E15719B}.Proto|x86.Build.0 = Proto|Any CPU {FF76BD3C-5E0A-4752-B6C3-044F6E15719B}.Release|Any CPU.ActiveCfg = Release|Any CPU {FF76BD3C-5E0A-4752-B6C3-044F6E15719B}.Release|Any CPU.Build.0 = Release|Any CPU {FF76BD3C-5E0A-4752-B6C3-044F6E15719B}.Release|x86.ActiveCfg = Release|Any CPU @@ -742,10 +532,6 @@ Global {0385564F-07B4-4264-AB8A-17C393E9140C}.Debug|Any CPU.Build.0 = Debug|Any CPU {0385564F-07B4-4264-AB8A-17C393E9140C}.Debug|x86.ActiveCfg = Debug|Any CPU {0385564F-07B4-4264-AB8A-17C393E9140C}.Debug|x86.Build.0 = Debug|Any CPU - {0385564F-07B4-4264-AB8A-17C393E9140C}.Proto|Any CPU.ActiveCfg = Proto|Any CPU - {0385564F-07B4-4264-AB8A-17C393E9140C}.Proto|Any CPU.Build.0 = Proto|Any CPU - {0385564F-07B4-4264-AB8A-17C393E9140C}.Proto|x86.ActiveCfg = Proto|Any CPU - {0385564F-07B4-4264-AB8A-17C393E9140C}.Proto|x86.Build.0 = Proto|Any CPU {0385564F-07B4-4264-AB8A-17C393E9140C}.Release|Any CPU.ActiveCfg = Release|Any CPU {0385564F-07B4-4264-AB8A-17C393E9140C}.Release|Any CPU.Build.0 = Release|Any CPU {0385564F-07B4-4264-AB8A-17C393E9140C}.Release|x86.ActiveCfg = Release|Any CPU @@ -754,10 +540,6 @@ Global {400FAB03-786E-40CC-85A8-04B0C2869B14}.Debug|Any CPU.Build.0 = Debug|Any CPU {400FAB03-786E-40CC-85A8-04B0C2869B14}.Debug|x86.ActiveCfg = Debug|Any CPU {400FAB03-786E-40CC-85A8-04B0C2869B14}.Debug|x86.Build.0 = Debug|Any CPU - {400FAB03-786E-40CC-85A8-04B0C2869B14}.Proto|Any CPU.ActiveCfg = Proto|Any CPU - {400FAB03-786E-40CC-85A8-04B0C2869B14}.Proto|Any CPU.Build.0 = Proto|Any CPU - {400FAB03-786E-40CC-85A8-04B0C2869B14}.Proto|x86.ActiveCfg = Proto|Any CPU - {400FAB03-786E-40CC-85A8-04B0C2869B14}.Proto|x86.Build.0 = Proto|Any CPU {400FAB03-786E-40CC-85A8-04B0C2869B14}.Release|Any CPU.ActiveCfg = Release|Any CPU {400FAB03-786E-40CC-85A8-04B0C2869B14}.Release|Any CPU.Build.0 = Release|Any CPU {400FAB03-786E-40CC-85A8-04B0C2869B14}.Release|x86.ActiveCfg = Release|Any CPU @@ -766,29 +548,42 @@ Global {B0689A4E-07D8-494D-A0C8-791CB1D74E54}.Debug|Any CPU.Build.0 = Debug|Any CPU {B0689A4E-07D8-494D-A0C8-791CB1D74E54}.Debug|x86.ActiveCfg = Debug|Any CPU {B0689A4E-07D8-494D-A0C8-791CB1D74E54}.Debug|x86.Build.0 = Debug|Any CPU - {B0689A4E-07D8-494D-A0C8-791CB1D74E54}.Proto|Any CPU.ActiveCfg = Debug|Any CPU - {B0689A4E-07D8-494D-A0C8-791CB1D74E54}.Proto|Any CPU.Build.0 = Debug|Any CPU - {B0689A4E-07D8-494D-A0C8-791CB1D74E54}.Proto|x86.ActiveCfg = Debug|Any CPU - {B0689A4E-07D8-494D-A0C8-791CB1D74E54}.Proto|x86.Build.0 = Debug|Any CPU {B0689A4E-07D8-494D-A0C8-791CB1D74E54}.Release|Any CPU.ActiveCfg = Release|Any CPU {B0689A4E-07D8-494D-A0C8-791CB1D74E54}.Release|Any CPU.Build.0 = Release|Any CPU {B0689A4E-07D8-494D-A0C8-791CB1D74E54}.Release|x86.ActiveCfg = Release|Any CPU {B0689A4E-07D8-494D-A0C8-791CB1D74E54}.Release|x86.Build.0 = Release|Any CPU + {18227628-DF90-4C47-AF3D-CC72D2EDD986}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {18227628-DF90-4C47-AF3D-CC72D2EDD986}.Debug|Any CPU.Build.0 = Debug|Any CPU + {18227628-DF90-4C47-AF3D-CC72D2EDD986}.Debug|x86.ActiveCfg = Debug|Any CPU + {18227628-DF90-4C47-AF3D-CC72D2EDD986}.Debug|x86.Build.0 = Debug|Any CPU + {18227628-DF90-4C47-AF3D-CC72D2EDD986}.Release|Any CPU.ActiveCfg = Release|Any CPU + {18227628-DF90-4C47-AF3D-CC72D2EDD986}.Release|Any CPU.Build.0 = Release|Any CPU + {18227628-DF90-4C47-AF3D-CC72D2EDD986}.Release|x86.ActiveCfg = Release|Any CPU + {18227628-DF90-4C47-AF3D-CC72D2EDD986}.Release|x86.Build.0 = Release|Any CPU + {6D93CEBD-4540-4D96-A153-B440A661FD09}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6D93CEBD-4540-4D96-A153-B440A661FD09}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6D93CEBD-4540-4D96-A153-B440A661FD09}.Debug|x86.ActiveCfg = Debug|Any CPU + {6D93CEBD-4540-4D96-A153-B440A661FD09}.Debug|x86.Build.0 = Debug|Any CPU + {6D93CEBD-4540-4D96-A153-B440A661FD09}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6D93CEBD-4540-4D96-A153-B440A661FD09}.Release|Any CPU.Build.0 = Release|Any CPU + {6D93CEBD-4540-4D96-A153-B440A661FD09}.Release|x86.ActiveCfg = Release|Any CPU + {6D93CEBD-4540-4D96-A153-B440A661FD09}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3} = {3881429D-A97A-49EB-B7AE-A82BA5FE9C77} {991DCF75-C2EB-42B6-9A0D-AA1D2409D519} = {4C7B48D7-19AF-4AE7-9D1D-3BB289D5480D} + {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3} = {3881429D-A97A-49EB-B7AE-A82BA5FE9C77} + {59ADCE46-9740-4079-834D-9A03A3494EBC} = {4C7B48D7-19AF-4AE7-9D1D-3BB289D5480D} {D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06} = {B8DDA694-7939-42E3-95E5-265C2217C142} {DED3BBD7-53F4-428A-8C9F-27968E768605} = {3058BC79-8E79-4645-B05D-48CC182FA8A6} {EE85AAB7-CDA0-4C4E-BDA0-A64CCC413E3F} = {4C7B48D7-19AF-4AE7-9D1D-3BB289D5480D} {1C5C163C-37EA-4A3C-8CCC-0D34B74BF8EF} = {4C7B48D7-19AF-4AE7-9D1D-3BB289D5480D} {65E0E82A-EACE-4787-8994-888674C2FE87} = {4C7B48D7-19AF-4AE7-9D1D-3BB289D5480D} - {B700E38B-F8C0-4E49-B5EC-DB7B7AC0C4E7} = {4C7B48D7-19AF-4AE7-9D1D-3BB289D5480D} + {B700E38B-F8C0-4E49-B5EC-DB7B7AC0C4E7} = {CCAB6E50-34C6-42AF-A6B0-567C29FCD91B} {FCFB214C-462E-42B3-91CA-FC557EFEE74F} = {4C7B48D7-19AF-4AE7-9D1D-3BB289D5480D} - {6196B0F8-CAEA-4CF1-AF82-1B520F77FE44} = {4C7B48D7-19AF-4AE7-9D1D-3BB289D5480D} + {6196B0F8-CAEA-4CF1-AF82-1B520F77FE44} = {CCAB6E50-34C6-42AF-A6B0-567C29FCD91B} {C9B1D3F5-4971-4F04-9C26-37E3AC809AB4} = {4C7B48D7-19AF-4AE7-9D1D-3BB289D5480D} {FBD4B354-DC6E-4032-8EC7-C81D8DFB1AF7} = {F7876C9B-FB6A-4EFB-B058-D6967DB75FB2} {EE85AAB7-CDA0-4C4E-BDA0-A64DDDD13E3F} = {F7876C9B-FB6A-4EFB-B058-D6967DB75FB2} @@ -824,9 +619,6 @@ Global {E3FDD4AC-46B6-4B9F-B672-317D1202CC50} = {F6DAEE9A-8BE1-4C4A-BC83-09215517C7DA} {D11FC318-8F5D-4C8C-9287-AB40A016D13C} = {F6DAEE9A-8BE1-4C4A-BC83-09215517C7DA} {1FB1DD07-06AA-45B4-B5AC-20FF5BEE98B6} = {F6DAEE9A-8BE1-4C4A-BC83-09215517C7DA} - {141F6C23-E1B1-4D89-9F10-F0B8AD58E71F} = {4C7B48D7-19AF-4AE7-9D1D-3BB289D5480D} - {59ADCE46-9740-4079-834D-9A03A3494EBC} = {141F6C23-E1B1-4D89-9F10-F0B8AD58E71F} - {E6A45CDF-B408-420F-B475-74611BEFC52B} = {141F6C23-E1B1-4D89-9F10-F0B8AD58E71F} {4239EFEA-E746-446A-BF7A-51FCBAB13946} = {CFE3259A-2D30-4EB0-80D5-E8B5F3D01449} {2E60864A-E3FF-4BCC-810F-DC7C34E6B236} = {CFE3259A-2D30-4EB0-80D5-E8B5F3D01449} {D086C8C6-D00D-4C3B-9AB2-A4286C9F5922} = {4C7B48D7-19AF-4AE7-9D1D-3BB289D5480D} @@ -838,6 +630,9 @@ Global {0385564F-07B4-4264-AB8A-17C393E9140C} = {F6DAEE9A-8BE1-4C4A-BC83-09215517C7DA} {400FAB03-786E-40CC-85A8-04B0C2869B14} = {CFE3259A-2D30-4EB0-80D5-E8B5F3D01449} {B0689A4E-07D8-494D-A0C8-791CB1D74E54} = {CFE3259A-2D30-4EB0-80D5-E8B5F3D01449} + {18227628-DF90-4C47-AF3D-CC72D2EDD986} = {4C7B48D7-19AF-4AE7-9D1D-3BB289D5480D} + {CCAB6E50-34C6-42AF-A6B0-567C29FCD91B} = {4C7B48D7-19AF-4AE7-9D1D-3BB289D5480D} + {6D93CEBD-4540-4D96-A153-B440A661FD09} = {F7876C9B-FB6A-4EFB-B058-D6967DB75FB2} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {48EDBBBE-C8EE-4E3C-8B19-97184A487B37} diff --git a/autogen.sh b/autogen.sh deleted file mode 100755 index edc393b00e3..00000000000 --- a/autogen.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env sh - -which autoreconf > /dev/null || (echo "Please install autoconf" && exit 1) -autoreconf && ./configure $@ diff --git a/before_install.sh b/before_install.sh deleted file mode 100755 index d1498a55e64..00000000000 --- a/before_install.sh +++ /dev/null @@ -1,84 +0,0 @@ -#!/bin/sh - -# OS detection - -OSName=$(uname -s) -case $OSName in - Darwin) - OS=OSX - ;; - - Linux) - OS=Linux - ;; - - *) - echo "Unsupported OS '$OSName' detected. Cannot continue with build, the scripts must be updated to support this OS." - exit 1 - ;; -esac - -# On Linux (or at least, Ubuntu), when building with Mono, need to install the mono-devel package first. -if [ $OS = 'Linux' ]; then - sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF - echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list - sudo apt-get update - sudo apt-get -y install mono-devel autoconf libtool pkg-config make git -fi - -# Check if SSL certificates have been imported into Mono's certificate store. -# If certs haven't been installed, some/all of the Nuget packages will fail to restore. -# Note, the result of the certmgr and grep commands returns the number of installed X.509 certificates. -# We need to run the command twice -- on some systems (e.g. macOS) the certs are installed in the user store, -# and on other systems (e.g., Ubuntu) they're installed to the machine store. certmgr only shows what's in -# the selected store, which is why we need to check both. -if [ "$(certmgr -list -c Trust | grep -c -F "X.509")" -le 1 ] && [ "$(certmgr -list -c -m Trust | grep -c -F "X.509")" -le 1 ]; then - echo "No SSL certificates installed so unable to restore NuGet packages." >&2; - echo "Run 'mozroots --sync --import' to install certificates to Mono's certificate store." >&2; - exit 1 -fi - -# Restore NuGet packages (needed for compiler bootstrap and tests). -mono .nuget/NuGet.exe restore packages.config -PackagesDirectory packages -ConfigFile .nuget/NuGet.Config - -(if test x-$BUILD_CORECLR = x-1; then \ - sudo sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ trusty main" > /etc/apt/sources.list.d/dotnetdev.list'; \ - sudo apt-key adv --keyserver apt-mo.trafficmanager.net --recv-keys 417A0893; \ - sudo apt-get update; \ - sudo apt-get -y install dotnet-dev-1.0.0-preview2-003131; \ - (cd tests/fsharp; mono ../../.nuget/NuGet.exe restore project.json -PackagesDirectory ../../packages -ConfigFile ../../.nuget/NuGet.Config); \ - ./init-tools.sh; \ - echo "------ start log"; \ - cat ./init-tools.log; echo "------ end log"; \ -fi) - -(if test x-$BUILD_PROTO_WITH_CORECLR_LKG = x-1; then \ - (cd lkg/fsc && dotnet restore --packages ../packages && dotnet publish project.json -o ../Tools/lkg -r ubuntu.14.04-x64); \ - (cd lkg/fsi && dotnet restore --packages ../packages && dotnet publish project.json -o ../Tools/lkg -r ubuntu.14.04-x64); \ -fi) - -#TODO: work out how to avoid the need for this -chmod u+x packages/FSharp.Compiler.Tools.4.1.27/tools/fsi.exe -chmod u+x packages/FsLexYacc.7.0.6/build/fslex.exe -chmod u+x packages/FsLexYacc.7.0.6/build/fsyacc.exe - -# The FSharp.Compiler.Tools package doesn't work correctly unless a proper install of F# has been done on the machine. -# OSX can skip this because the OSX Mono installer includes F#. -if [ $OS != 'OSX' ]; then - sudo apt-get -y install fsharp -fi - -# "access to the path /etc/mono/registry/last-time is denied" -# On non-OSX systems, may need to create Mono's registry folder to avoid exceptions during builds. -# This doesn't seem to be necessary on OSX, as the folder is created by the installer. -if [ $OS != 'OSX' ]; then - # This registry folder path is correct for Linux; - # on OSX the folder is /Library/Frameworks/Mono.framework/Versions/Current/etc/mono/registry - # and may be different for *BSD systems. - __MonoRegistryDir="/etc/mono/registry" - if [ ! -d "$__MonoRegistryDir" ]; then - echo "Mono registry directory does not exist (it may not have been created yet)." - echo "The directory needs to be created now; superuser permissions are required for this." - { sudo -- sh -c "mkdir -p $__MonoRegistryDir && chmod uog+rw $__MonoRegistryDir"; } || { echo "Unable to create/chmod Mono registry directory '$__MonoRegistryDir'." >&2; } - fi -fi diff --git a/build-everything.proj b/build-everything.proj index 07e2fcbc687..caba4fd173e 100644 --- a/build-everything.proj +++ b/build-everything.proj @@ -24,70 +24,108 @@ - - + + - + + + true + true + true + true + true + + - + + + + + - - - - - - - + + + - - + + - + + - - + + true + + + + true + + + + + + + + + - + + + - - + + + + + + true + + + + + + + + + + @@ -124,3 +162,4 @@ + diff --git a/build-nuget-packages.proj b/build-nuget-packages.proj new file mode 100644 index 00000000000..2aab5455e93 --- /dev/null +++ b/build-nuget-packages.proj @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/build.cmd b/build.cmd index 1cf2de6040e..cc4283d19aa 100644 --- a/build.cmd +++ b/build.cmd @@ -1,5 +1,5 @@ rem Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -@if "%_echo%"=="" echo off +@if "%_echo%"=="" echo off setlocal enableDelayedExpansion @@ -17,12 +17,12 @@ echo Build and run a subset of test suites echo. echo Usage: echo. -echo build.cmd ^ +echo build.cmd ^ echo ^ -echo ^ +echo ^ echo ^ echo ^ -echo ^ +echo ^ echo ^ echo ^ echo. @@ -64,7 +64,6 @@ set BUILD_FROMSOURCE=0 set BUILD_VS=0 set BUILD_FCS=0 set BUILD_CONFIG=release -set BUILD_CONFIG_LOWERCASE=release set BUILD_DIAG= set BUILD_PUBLICSIGN=0 @@ -75,9 +74,15 @@ set TEST_NET40_FSHARPQA_SUITE=0 set TEST_CORECLR_COREUNIT_SUITE=0 set TEST_CORECLR_FSHARP_SUITE=0 set TEST_VS_IDEUNIT_SUITE=0 +set TEST_FCS=0 +set TEST_END_2_END=0 set INCLUDE_TEST_SPEC_NUNIT= set INCLUDE_TEST_TAGS= +set COPY_FSCOMP_RESOURCE_FOR_BUILD_FROM_SOURCES=0 + +set SIGN_TYPE=%PB_SIGNTYPE% + REM ------------------ Parse all arguments ----------------------- set _autoselect=1 @@ -114,6 +119,10 @@ if /i "%_autoselect_tests%" == "1" ( set TEST_NET40_FSHARPQA_SUITE=1 ) + if /i "%BUILD_FCS%" == "1" ( + set TEST_FCS=1 + ) + if /i "%BUILD_CORECLR%" == "1" ( set TEST_CORECLR_FSHARP_SUITE=1 set TEST_CORECLR_COREUNIT_SUITE=1 @@ -149,6 +158,7 @@ if /i "%ARG%" == "net40" ( set _autoselect=0 set BUILD_NET40_FSHARP_CORE=1 set BUILD_NET40=1 + set COPY_FSCOMP_RESOURCE_FOR_BUILD_FROM_SOURCES=1 ) if /i "%ARG%" == "coreclr" ( @@ -168,6 +178,7 @@ if /i "%ARG%" == "vs" ( set _autoselect=0 set BUILD_NET40=1 set BUILD_VS=1 + set COPY_FSCOMP_RESOURCE_FOR_BUILD_FROM_SOURCES=1 ) if /i "%ARG%" == "fcs" ( @@ -184,6 +195,7 @@ if /i "%ARG%" == "nobuild" ( ) if /i "%ARG%" == "all" ( set _autoselect=0 + set COPY_FSCOMP_RESOURCE_FOR_BUILD_FROM_SOURCES=1 set BUILD_PROTO=1 set BUILD_PROTO_WITH_CORECLR_LKG=1 set BUILD_NET40=1 @@ -205,6 +217,7 @@ if /i "%ARG%" == "microbuild" ( set BUILD_VS=1 set BUILD_SETUP=%FSC_BUILD_SETUP% set BUILD_NUGET=1 + set BUILD_MICROBUILD=1 set TEST_NET40_COMPILERUNIT_SUITE=1 set TEST_NET40_COREUNIT_SUITE=1 @@ -234,20 +247,22 @@ REM These divide "ci" into three chunks which can be done in parallel if /i "%ARG%" == "ci_part1" ( set _autoselect=0 - REM what we do + REM what we do - build and test Visual F# Tools, including setup and nuget set BUILD_PROTO=1 + set BUILD_NUGET=1 set BUILD_NET40=1 set BUILD_NET40_FSHARP_CORE=1 set BUILD_VS=1 - set BUILD_FCS=1 set TEST_VS_IDEUNIT_SUITE=1 + set BUILD_CORECLR=1 + set BUILD_SETUP=%FSC_BUILD_SETUP% set CI=1 ) if /i "%ARG%" == "ci_part2" ( set _autoselect=0 - REM what we do + REM what we do - test F# on .NET Framework set BUILD_PROTO=1 set BUILD_NET40=1 set BUILD_NET40_FSHARP_CORE=1 @@ -261,20 +276,39 @@ if /i "%ARG%" == "ci_part2" ( if /i "%ARG%" == "ci_part3" ( set _autoselect=0 - REM what we do + REM what we do: test F# on Core CLR: nuget requires coreclr, fcs requires coreclr set BUILD_PROTO_WITH_CORECLR_LKG=1 set BUILD_PROTO=1 set BUILD_CORECLR=1 set BUILD_NET40_FSHARP_CORE=1 - set BUILD_NUGET=1 set BUILD_NET40=1 - set BUILD_VS=1 - set BUILD_SETUP=%FSC_BUILD_SETUP% set TEST_CORECLR_FSHARP_SUITE=1 set TEST_CORECLR_COREUNIT_SUITE=1 set CI=1 ) +if /i "%ARG%" == "ci_part4" ( + set _autoselect=0 + + REM what we do: test F# on Core CLR: nuget requires coreclr, fcs requires coreclr + set BUILD_PROTO_WITH_CORECLR_LKG=1 + set BUILD_PROTO=1 + set BUILD_CORECLR=1 + set BUILD_NET40_FSHARP_CORE=1 + set BUILD_NET40=1 + set BUILD_FCS=1 + set TEST_FCS=1 + set CI=1 +) + +if /i "%ARG%" == "end-2-end" ( + set BUILD_PROTO=1 + set BUILD_CORECLR=1 + set BUILD_NET40_FSHARP_CORE=1 + set BUILD_NET40=1 + set TEST_END_2_END=1 +) + if /i "%ARG%" == "proto" ( set _autoselect=0 set BUILD_PROTO=1 @@ -293,6 +327,14 @@ if /i "%ARG%" == "release" ( set BUILD_CONFIG=release ) +if /i "%ARG%" == "test-sign" ( + set SIGN_TYPE=test +) + +if /i "%ARG%" == "real-sign" ( + set SIGN_TYPE=real +) + if /i "%ARG%" == "test" ( set _autoselect_tests=1 ) @@ -325,6 +367,8 @@ if /i "%ARG%" == "test-all" ( set TEST_NET40_FSHARPQA_SUITE=1 set TEST_CORECLR_COREUNIT_SUITE=1 set TEST_VS_IDEUNIT_SUITE=1 + set TEST_FCS=1 + set TEST_END_2_END=1 ) if /i "%ARG%" == "test-net40-fsharpqa" ( @@ -369,6 +413,12 @@ if /i "%ARG%" == "test-net40-fsharp" ( set TEST_NET40_FSHARP_SUITE=1 ) +if /i "%ARG%" == "test-fcs" ( + set _autoselect=0 + set BUILD_FCS=1 + set TEST_FCS=1 +) + if /i "%ARG%" == "test-coreclr-fsharp" ( set _autoselect=0 set BUILD_NET40=1 @@ -409,6 +459,41 @@ if /i "%PB_SKIPTESTS%" == "true" ( set TEST_VS_IDEUNIT_SUITE=0 ) +if /i "%TEST_NET40_FSHARP_SUITE" == "1" ( + if /i "%TEST_CORECLR_FSHARP_SUITE%" == "1" ( + TEST_END_2_END=1 + ) +) + +if /i "%BUILD_PROTO_WITH_CORECLR_LKG%" == "1" ( + set NEEDS_DOTNET_CLI_TOOLS=1 +) + +if /i "%BUILD_CORECLR%" == "1" ( + set NEEDS_DOTNET_CLI_TOOLS=1 +) + +if /i "%BUILD_FROMSOURCE%" == "1" ( + set NEEDS_DOTNET_CLI_TOOLS=1 +) + +if /i "%BUILD_FCS%" == "1" ( + set NEEDS_DOTNET_CLI_TOOLS=1 +) + +rem Decide if Proto need building +if NOT EXIST Proto\net40\bin\fsc.exe ( + set BUILD_PROTO=1 +) + +rem +rem This stops the dotnet cli from hunting around and +rem finding the highest possible dotnet sdk version to use. +rem +rem description of dotnet lookup here: +rem https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet?tabs=netcore2x +set DOTNET_MULTILEVEL_LOOKUP=false + echo Build/Tests configuration: echo. echo BUILD_PROTO=%BUILD_PROTO% @@ -423,10 +508,16 @@ echo BUILD_SETUP=%BUILD_SETUP% echo BUILD_NUGET=%BUILD_NUGET% echo BUILD_CONFIG=%BUILD_CONFIG% echo BUILD_PUBLICSIGN=%BUILD_PUBLICSIGN% +echo BUILD_MICROBUILD=%BUILD_MICROBUILD% echo. echo PB_SKIPTESTS=%PB_SKIPTESTS% echo PB_RESTORESOURCE=%PB_RESTORESOURCE% echo. +echo SIGN_TYPE=%SIGN_TYPE% +echo. +echo COPY_FSCOMP_RESOURCE_FOR_BUILD_FROM_SOURCES=%COPY_FSCOMP_RESOURCE_FOR_BUILD_FROM_SOURCES% +echo. +echo TEST_FCS=%TEST_FCS% echo TEST_NET40_COMPILERUNIT_SUITE=%TEST_NET40_COMPILERUNIT_SUITE% echo TEST_NET40_COREUNIT_SUITE=%TEST_NET40_COREUNIT_SUITE% echo TEST_NET40_FSHARP_SUITE=%TEST_NET40_FSHARP_SUITE% @@ -443,26 +534,13 @@ echo TEMP=%TEMP% :: If this is not set, VsDevCmd.bat will change %cd% to [USERPROFILE]\source, causing the build to fail. SET VSCMD_START_DIR=%cd% -:: try to find an RC or RTM edition of VS2017 -if "%VS150COMNTOOLS%" EQU "" if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Enterprise\Common7\Tools\VsDevCmd.bat" ( - call "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Enterprise\Common7\Tools\VsDevCmd.bat" -) -if "%VS150COMNTOOLS%" EQU "" if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Professional\Common7\Tools\VsDevCmd.bat" ( - call "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Professional\Common7\Tools\VsDevCmd.bat" -) -if "%VS150COMNTOOLS%" EQU "" if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat" ( - call "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat" +:: Try find installation path of VS2017 with vswhere.exe +if "%VS150COMNTOOLS%" EQU "" if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\" ( + for /f "usebackq delims=" %%i in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -latest -prerelease -property installationPath`) do set VS_INSTALLATION_PATH=%%i ) -:: Allow build from Preview editions -if "%VS150COMNTOOLS%" EQU "" if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\Preview\Enterprise\Common7\Tools\VsDevCmd.bat" ( - call "%ProgramFiles(x86)%\Microsoft Visual Studio\Preview\Enterprise\Common7\Tools\VsDevCmd.bat" -) -if "%VS150COMNTOOLS%" EQU "" if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\Preview\Professional\Common7\Tools\VsDevCmd.bat" ( - call "%ProgramFiles(x86)%\Microsoft Visual Studio\Preview\Enterprise\Common7\Tools\VsDevCmd.bat" -) -if "%VS150COMNTOOLS%" EQU "" if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\Preview\Community\Common7\Tools\VsDevCmd.bat" ( - call "%ProgramFiles(x86)%\Microsoft Visual Studio\Preview\Enterprise\Common7\Tools\VsDevCmd.bat" +if "%VS_INSTALLATION_PATH%" NEQ "" ( + call "%VS_INSTALLATION_PATH%\Common7\Tools\VsDevCmd.bat" ) :: If there's no installation of VS2017 or VS2017 Preview, use the build tools @@ -477,8 +555,16 @@ echo. echo. echo ---------------- Done with arguments, starting preparation ----------------- +rem set TargetFrameworkSDKToolsDirectory --- needed for sdk to find al.exe. +if not "%TargetFrameworkSDKToolsDirectory%" == "" ( goto have_TargetFrameworkSDKToolsDirectory ) +set TargetFrameworkSDKToolsDirectory=%WindowsSDK_ExecutablePath_x64% + +if not "%TargetFrameworkSDKToolsDirectory%" == "" ( goto have_TargetFrameworkSDKToolsDirectory ) +set TargetFrameworkSDKToolsDirectory=%WindowsSDK_ExecutablePath_x86% + +:have_TargetFrameworkSDKToolsDirectory -set BuildToolsPackage=Microsoft.VSSDK.BuildTools.15.1.192 +set BuildToolsPackage=Microsoft.VSSDK.BuildTools.15.6.170 if "%VSSDKInstall%"=="" ( set VSSDKInstall=%~dp0packages\%BuildToolsPackage%\tools\vssdk ) @@ -496,10 +582,15 @@ if "%RestorePackages%"=="" ( @echo VSSDKInstall: %VSSDKInstall% @echo VSSDKToolsPath: %VSSDKToolsPath% @echo VSSDKIncludes: %VSSDKIncludes% +@echo TargetFrameworkSDKToolsDirectory: %TargetFrameworkSDKToolsDirectory% @call src\update.cmd signonly :: Check prerequisites +if not "%VisualStudioVersion%" == "" goto vsversionset +if exist "%VS160COMNTOOLS%\..\ide\devenv.exe" set VisualStudioVersion=16.0 +if not "%VisualStudioVersion%" == "" goto vsversionset + if not "%VisualStudioVersion%" == "" goto vsversionset if exist "%VS150COMNTOOLS%\..\ide\devenv.exe" set VisualStudioVersion=15.0 if not "%VisualStudioVersion%" == "" goto vsversionset @@ -520,6 +611,10 @@ if exist "%ProgramFiles%\Microsoft Visual Studio 12.0\common7\ide\devenv.exe" se :vsversionset if "%VisualStudioVersion%" == "" echo Error: Could not find an installation of Visual Studio && goto :failure +if exist "%VS160COMNTOOLS%\..\..\MSBuild\15.0\Bin\MSBuild.exe" ( + set _msbuildexe="%VS160COMNTOOLS%\..\..\MSBuild\15.0\Bin\MSBuild.exe" + goto :havemsbuild +) if exist "%VS150COMNTOOLS%\..\..\MSBuild\15.0\Bin\MSBuild.exe" ( set _msbuildexe="%VS150COMNTOOLS%\..\..\MSBuild\15.0\Bin\MSBuild.exe" goto :havemsbuild @@ -538,21 +633,6 @@ goto :eof :havemsbuild set _nrswitch=/nr:false -:: See -if defined APPVEYOR ( - rem See - if exist "C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" ( - rem HACK HACK HACK - set _msbuildexe=%_msbuildexe% /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" - ) -) - -if defined TF_BUILD ( - echo Adding remote 'visualfsharptools' for internal build. - git remote add visualfsharptools https://github.com/Microsoft/visualfsharp.git - git fetch --all -) - set msbuildflags=%_nrswitch% /nologo REM set msbuildflags=%_nrswitch% /nologo set _ngenexe="%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\ngen.exe" @@ -561,18 +641,20 @@ if not exist %_ngenexe% echo Error: Could not find ngen.exe. && goto :failure echo ---------------- Done with prepare, starting package restore ---------------- set _nugetexe="%~dp0.nuget\NuGet.exe" -set _nugetconfig="%~dp0.nuget\NuGet.Config" +set _nugetconfig="%~dp0NuGet.Config" if "%RestorePackages%" == "true" ( - cd fcs - .paket\paket.exe restore - cd.. - @if ERRORLEVEL 1 echo Error: Paket restore failed && goto :failure + if "%BUILD_FCS%" == "1" ( + cd fcs + .paket\paket.exe restore + cd.. + @if ERRORLEVEL 1 echo Error: Paket restore failed && goto :failure + ) %_ngenexe% install %_nugetexe% /nologo set _nugetoptions=-PackagesDirectory packages -ConfigFile %_nugetconfig% if not "%PB_RESTORESOURCE%" == "" ( - set _nugetoptions=!_nugetoptions! -Source %PB_RESTORESOURCE% + set _nugetoptions=!_nugetoptions! -FallbackSource %PB_RESTORESOURCE% ) echo _nugetoptions=!_nugetoptions! @@ -580,16 +662,18 @@ if "%RestorePackages%" == "true" ( %_nugetexe% restore packages.config !_nugetoptions! @if ERRORLEVEL 1 echo Error: Nuget restore failed && goto :failure - if "%BUILD_VS%" == "1" ( - %_nugetexe% restore vsintegration\packages.config !_nugetoptions! - @if ERRORLEVEL 1 echo Error: Nuget restore failed && goto :failure - ) - if "%BUILD_SETUP%" == "1" ( %_nugetexe% restore setup\packages.config !_nugetoptions! @if ERRORLEVEL 1 echo Error: Nuget restore failed && goto :failure ) + if not "%SIGN_TYPE%" == "" ( + set signtoolnugetoptions=-PackagesDirectory "%USERPROFILE%\.nuget\packages" -ConfigFile %_nugetconfig% + if not "%PB_RESTORESOURCE%" == "" set signtoolnugetoptions=!signtoolnugetoptions! -FallbackSource %PB_RESTORESOURCE% + %_nugetexe% restore build\config\packages.config !signtoolnugetoptions! + @if ERRORLEVEL 1 echo Error: Nuget restore failed && goto :failure + ) + set restore_fsharp_suite=0 if "%TEST_NET40_FSHARP_SUITE%" == "1" set restore_fsharp_suite=1 if "%TEST_CORECLR_FSHARP_SUITE%" == "1" set restore_fsharp_suite=1 @@ -600,9 +684,58 @@ if "%RestorePackages%" == "true" ( ) ) -if "%BUILD_PROTO_WITH_CORECLR_LKG%" == "1" ( +if "%NEEDS_DOTNET_CLI_TOOLS%" == "1" ( :: Restore the Tools directory - call %~dp0init-tools.cmd + call "%~dp0init-tools.cmd" +) +set _dotnetcliexe=%~dp0Tools\dotnetcli\dotnet.exe +set _dotnet20exe=%~dp0Tools\dotnet20\dotnet.exe +set NUGET_PACKAGES=%~dp0packages +set path=%~dp0Tools\dotnet20\;%path% + +echo ----------- Done with package restore, starting dependency uptake check ------------- + +if not "%PB_PackageVersionPropsUrl%" == "" ( + set dependencyUptakeDir=%~dp0Tools\dependencyUptake + if not exist "!dependencyUptakeDir!" mkdir "!dependencyUptakeDir!" + + :: download package version overrides + echo powershell -noprofile -executionPolicy RemoteSigned -command "Invoke-WebRequest -Uri '%PB_PackageVersionPropsUrl%' -OutFile '!dependencyUptakeDir!\PackageVersions.props'" + powershell -noprofile -executionPolicy RemoteSigned -command "Invoke-WebRequest -Uri '%PB_PackageVersionPropsUrl%' -OutFile '!dependencyUptakeDir!\PackageVersions.props'" + if ERRORLEVEL 1 echo Error downloading package version properties && goto :failure + + :: prepare dependency uptake files + echo %_msbuildexe% %msbuildflags% %~dp0build\projects\PrepareDependencyUptake.proj /t:Build + %_msbuildexe% %msbuildflags% %~dp0build\projects\PrepareDependencyUptake.proj /t:Build + if ERRORLEVEL 1 echo Error building dependency uptake files && goto :failure + + :: restore dependencies + %_nugetexe% restore !dependencyUptakeDir!\packages.config -PackagesDirectory packages -ConfigFile !dependencyUptakeDir!\NuGet.config + if ERRORLEVEL 1 echo Error restoring dependency uptake packages && goto :failure + + :: set DotNetPackageVersionPropsPath + set DotNetPackageVersionPropsPath=!dependencyUptakeDir!\PackageVersions.props +) + +echo ----------- Done with package restore, starting dependency uptake check ------------- + +if not "%PB_PackageVersionPropsUrl%" == "" ( + set dependencyUptakeDir=%~dp0Tools\dependencyUptake + if not exist "!dependencyUptakeDir!" mkdir "!dependencyUptakeDir!" + + :: download package version overrides + echo powershell -noprofile -executionPolicy RemoteSigned -command "Invoke-WebRequest -Uri '%PB_PackageVersionPropsUrl%' -OutFile '!dependencyUptakeDir!\PackageVersions.props'" + powershell -noprofile -executionPolicy RemoteSigned -command "Invoke-WebRequest -Uri '%PB_PackageVersionPropsUrl%' -OutFile '!dependencyUptakeDir!\PackageVersions.props'" + if ERRORLEVEL 1 echo Error downloading package version properties && goto :failure + + :: prepare dependency uptake files + echo %_msbuildexe% %msbuildflags% %~dp0build\projects\PrepareDependencyUptake.proj /t:Build + %_msbuildexe% %msbuildflags% %~dp0build\projects\PrepareDependencyUptake.proj /t:Build + if ERRORLEVEL 1 echo Error building dependency uptake files && goto :failure + + :: restore dependencies + %_nugetexe% restore !dependencyUptakeDir!\packages.config -PackagesDirectory packages -ConfigFile !dependencyUptakeDir!\NuGet.config + if ERRORLEVEL 1 echo Error restoring dependency uptake packages && goto :failure ) set _dotnetcliexe=%~dp0Tools\dotnetcli\dotnet.exe @@ -612,10 +745,10 @@ set path=%~dp0Tools\dotnet20\;%path% set _fsiexe="packages\FSharp.Compiler.Tools.4.1.27\tools\fsi.exe" if not exist %_fsiexe% echo Error: Could not find %_fsiexe% && goto :failure -%_ngenexe% install %_fsiexe% /nologo +%_ngenexe% install %_fsiexe% /nologo if not exist %_nugetexe% echo Error: Could not find %_nugetexe% && goto :failure -%_ngenexe% install %_nugetexe% /nologo +%_ngenexe% install %_nugetexe% /nologo echo ---------------- Done with package restore, verify buildfrom source --------------- if "%BUILD_PROTO_WITH_CORECLR_LKG%" == "1" ( @@ -626,14 +759,8 @@ if "%BUILD_PROTO_WITH_CORECLR_LKG%" == "1" ( ) echo ---------------- Done with package restore, starting proto ------------------------ - -rem Decide if Proto need building -if NOT EXIST Proto\net40\bin\fsc-proto.exe ( - set BUILD_PROTO=1 -) - -set _dotnetexe=%~dp0Tools\dotnetcli\dotnet.exe -set _architecture=win7-x64 +set logdir=%~dp0%BUILD_CONFIG%\logs +if not exist "!logdir!" mkdir "!logdir!" rem Build Proto if "%BUILD_PROTO%" == "1" ( @@ -641,8 +768,8 @@ if "%BUILD_PROTO%" == "1" ( if "%BUILD_PROTO_WITH_CORECLR_LKG%" == "1" ( - echo %_msbuildexe% %msbuildflags% src\fsharp-proto-build.proj /p:BUILD_PROTO_WITH_CORECLR_LKG=%BUILD_PROTO_WITH_CORECLR_LKG% /p:Configuration=Proto - %_msbuildexe% %msbuildflags% src\fsharp-proto-build.proj /p:BUILD_PROTO_WITH_CORECLR_LKG=%BUILD_PROTO_WITH_CORECLR_LKG% /p:Configuration=Proto + echo %_msbuildexe% %msbuildflags% src\fsharp-proto-build.proj /p:BUILD_PROTO_WITH_CORECLR_LKG=%BUILD_PROTO_WITH_CORECLR_LKG% /p:Configuration=Proto /p:DisableLocalization=true /bl:%~dp0%BUILD_CONFIG%\logs\protobuild-coreclr.build.binlog + %_msbuildexe% %msbuildflags% src\fsharp-proto-build.proj /p:BUILD_PROTO_WITH_CORECLR_LKG=%BUILD_PROTO_WITH_CORECLR_LKG% /p:Configuration=Proto /p:DisableLocalization=true /bl:%~dp0%BUILD_CONFIG%\logs\protobuild-coreclr.build.binlog @if ERRORLEVEL 1 echo Error: compiler proto build failed && goto :failure ) @@ -651,35 +778,97 @@ if "%BUILD_PROTO%" == "1" ( echo %_ngenexe% install packages\FSharp.Compiler.Tools.4.1.27\tools\fsc.exe /nologo %_ngenexe% install packages\FSharp.Compiler.Tools.4.1.27\tools\fsc.exe /nologo - echo %_msbuildexe% %msbuildflags% src\fsharp-proto-build.proj /p:BUILD_PROTO_WITH_CORECLR_LKG=%BUILD_PROTO_WITH_CORECLR_LKG% /p:Configuration=Proto - %_msbuildexe% %msbuildflags% src\fsharp-proto-build.proj /p:BUILD_PROTO_WITH_CORECLR_LKG=%BUILD_PROTO_WITH_CORECLR_LKG% /p:Configuration=Proto + echo %_msbuildexe% %msbuildflags% src\fsharp-proto-build.proj /p:BUILD_PROTO_WITH_CORECLR_LKG=%BUILD_PROTO_WITH_CORECLR_LKG% /p:Configuration=Proto /p:DisableLocalization=true /bl:%~dp0%BUILD_CONFIG%\logs\protobuild-net40.build.binlog + %_msbuildexe% %msbuildflags% src\fsharp-proto-build.proj /p:BUILD_PROTO_WITH_CORECLR_LKG=%BUILD_PROTO_WITH_CORECLR_LKG% /p:Configuration=Proto /p:DisableLocalization=true /bl:%~dp0%BUILD_CONFIG%\logs\protobuild-net40.build.binlog @if ERRORLEVEL 1 echo Error: compiler proto build failed && goto :failure ) - echo %_ngenexe% install Proto\net40\bin\fsc-proto.exe /nologo - %_ngenexe% install Proto\net40\bin\fsc-proto.exe /nologo + echo %_ngenexe% install Proto\net40\bin\fsc.exe /nologo + %_ngenexe% install Proto\net40\bin\fsc.exe /nologo @if ERRORLEVEL 1 echo Error: NGen of proto failed && goto :failure ) -echo ---------------- Done with proto, starting build ------------------------ +if "%NEEDS_DOTNET_CLI_TOOLS%" == "1" ( + echo ---------------- Done with proto, starting SDK restore ------------------------ + :: Restore projects using dotnet CLI tool + echo %_dotnet20exe% restore -v:d build-everything.proj %msbuildflags% %BUILD_DIAG% + %_dotnet20exe% restore -v:d build-everything.proj %msbuildflags% %BUILD_DIAG% +) + +echo ---------------- Done with SDK restore, starting build ------------------------ if "%BUILD_PHASE%" == "1" ( - echo %_msbuildexe% %msbuildflags% build-everything.proj /t:Restore - %_msbuildexe% %msbuildflags% build-everything.proj /t:Restore - echo %_msbuildexe% %msbuildflags% build-everything.proj /p:Configuration=%BUILD_CONFIG% %BUILD_DIAG% /p:BUILD_PUBLICSIGN=%BUILD_PUBLICSIGN% - %_msbuildexe% %msbuildflags% build-everything.proj /p:Configuration=%BUILD_CONFIG% %BUILD_DIAG% /p:BUILD_PUBLICSIGN=%BUILD_PUBLICSIGN% + echo %_msbuildexe% %msbuildflags% build-everything.proj /t:Restore %BUILD_DIAG% /bl:%~dp0%BUILD_CONFIG%\net40\binmsbuild.build-everything.restore.%BUILD_CONFIG%.binlog + %_msbuildexe% %msbuildflags% build-everything.proj /t:Restore %BUILD_DIAG% /bl:%~dp0%BUILD_CONFIG%\net40\binmsbuild.build-everything.restore.%BUILD_CONFIG%.binlog + + echo %_msbuildexe% %msbuildflags% build-everything.proj /p:Configuration=%BUILD_CONFIG% %BUILD_DIAG% /p:BUILD_PUBLICSIGN=%BUILD_PUBLICSIGN% /bl:%~dp0%BUILD_CONFIG%\logs\msbuild.build-everything.build.%BUILD_CONFIG%.binlog + %_msbuildexe% %msbuildflags% build-everything.proj /p:Configuration=%BUILD_CONFIG% %BUILD_DIAG% /p:BUILD_PUBLICSIGN=%BUILD_PUBLICSIGN% /bl:%~dp0%BUILD_CONFIG%\logs\msbuild.build-everything.build.%BUILD_CONFIG%.binlog @if ERRORLEVEL 1 echo Error build failed && goto :failure ) -echo ---------------- Done with build, starting pack/update/prepare --------------- +echo ---------------- Done with build, starting assembly version checks --------------- +set asmvercheckpath=%~dp0tests\fsharpqa\testenv\src\AssemblyVersionCheck + +if "%BUILD_NET40%" == "1" ( + echo "%~dp0%BUILD_CONFIG%\net40\bin\fsi.exe" "%asmvercheckpath%\AssemblyVersionCheck.fsx" -- "%~dp0build\config\AssemblySignToolData.json" "%~dp0%BUILD_CONFIG%" + "%~dp0%BUILD_CONFIG%\net40\bin\fsi.exe" "%asmvercheckpath%\AssemblyVersionCheck.fsx" -- "%~dp0build\config\AssemblySignToolData.json" "%~dp0%BUILD_CONFIG%" + if ERRORLEVEL 1 echo Error verifying assembly versions and commit hashes. && goto :failure +) + +echo ---------------- Done with assembly version checks, starting assembly signing --------------- + +if not "%SIGN_TYPE%" == "" ( + echo build\scripts\run-signtool.cmd -MSBuild %_msbuildexe% -SignType %SIGN_TYPE% -Configuration %BUILD_CONFIG% -ConfigFile build\config\AssemblySignToolData.json + call build\scripts\run-signtool.cmd -MSBuild %_msbuildexe% -SignType %SIGN_TYPE% -Configuration %BUILD_CONFIG% -ConfigFile build\config\AssemblySignToolData.json + if ERRORLEVEL 1 echo Error running sign tool && goto :failure +) + +echo ---------------- Done with assembly signing, start package creation --------------- + +echo %_msbuildexe% %msbuildflags% build-nuget-packages.proj /p:Configuration=%BUILD_CONFIG% /bl:%~dp0%BUILD_CONFIG%\logs\msbuild.build-nuget-packages.build.%BUILD_CONFIG%.binlog + %_msbuildexe% %msbuildflags% build-nuget-packages.proj /p:Configuration=%BUILD_CONFIG% /bl:%~dp0%BUILD_CONFIG%\logs\msbuild.build-nuget-packages.build.%BUILD_CONFIG%.binlog +if ERRORLEVEL 1 echo Error building NuGet packages && goto :failure + +if not "%SIGN_TYPE%" == "" ( + echo build\scripts\run-signtool.cmd -MSBuild %_msbuildexe% -SignType %SIGN_TYPE% -Configuration %BUILD_CONFIG% -ConfigFile build\config\PackageSignToolData.json + call build\scripts\run-signtool.cmd -MSBuild %_msbuildexe% -SignType %SIGN_TYPE% -Configuration %BUILD_CONFIG% -ConfigFile build\config\PackageSignToolData.json + if ERRORLEVEL 1 echo Error running sign tool && goto :failure +) + +if "%BUILD_SETUP%" == "1" ( + echo %_msbuildexe% %msbuildflags% setup\build-insertion.proj /p:Configuration=%BUILD_CONFIG% /bl:%~dp0%BUILD_CONFIG%\logs\msbuild.build-insertion.build.%BUILD_CONFIG%.binlog + %_msbuildexe% %msbuildflags% setup\build-insertion.proj /p:Configuration=%BUILD_CONFIG% /bl:%~dp0%BUILD_CONFIG%\logs\msbuild.build-insertion.build.%BUILD_CONFIG%.binlog + if ERRORLEVEL 1 echo Error building insertion packages && goto :failure +) + +if not "%SIGN_TYPE%" == "" ( + echo build\scripts\run-signtool.cmd -MSBuild %_msbuildexe% -SignType %SIGN_TYPE% -Configuration %BUILD_CONFIG% -ConfigFile build\config\InsertionSignToolData.json + call build\scripts\run-signtool.cmd -MSBuild %_msbuildexe% -SignType %SIGN_TYPE% -Configuration %BUILD_CONFIG% -ConfigFile build\config\InsertionSignToolData.json + if ERRORLEVEL 1 echo Error running sign tool && goto :failure +) + +echo ---------------- Done with signing, building insertion files --------------- + +if "%BUILD_SETUP%" == "1" ( + echo %_msbuildexe% %msbuildflags% setup\Swix\Microsoft.FSharp.vsmanproj /p:Configuration=%BUILD_CONFIG% /bl:%~dp0%BUILD_CONFIG%\logs\msbuild.setup-swix.build.%BUILD_CONFIG%.binlog + %_msbuildexe% %msbuildflags% setup\Swix\Microsoft.FSharp.vsmanproj /p:Configuration=%BUILD_CONFIG% /bl:%~dp0%BUILD_CONFIG%\logs\msbuild.setup-swix.build.%BUILD_CONFIG%.binlog + if ERRORLEVEL 1 echo Error building .vsmanproj && goto :failure +) + +echo ---------------- Done building insertion files, starting pack/update/prepare --------------- if "%BUILD_NET40_FSHARP_CORE%" == "1" ( echo ---------------- start update.cmd --------------- call src\update.cmd %BUILD_CONFIG% -ngen ) +if "%COPY_FSCOMP_RESOURCE_FOR_BUILD_FROM_SOURCES%" == "1" ( + echo ---------------- copy fscomp resource for build from sources --------------- + copy /y src\fsharp\FSharp.Compiler.Private\obj\%BUILD_CONFIG%\net40\FSComp.* src\buildfromsource\FSharp.Compiler.Private +) + @echo set NUNITPATH=packages\NUnit.Console.3.0.0\tools\ set NUNITPATH=packages\NUnit.Console.3.0.0\tools\ if not exist %NUNITPATH% echo Error: Could not find %NUNITPATH% && goto :failure @@ -717,7 +906,7 @@ echo SNEXE32: %SNEXE32% echo SNEXE64: %SNEXE64% echo -if "%TEST_NET40_COMPILERUNIT_SUITE%" == "0" if "%TEST_NET40_COREUNIT_SUITE%" == "0" if "%TEST_CORECLR_COREUNIT_SUITE%" == "0" if "%TEST_VS_IDEUNIT_SUITE%" == "0" if "%TEST_NET40_FSHARP_SUITE%" == "0" if "%TEST_NET40_FSHARPQA_SUITE%" == "0" goto :success +if "%TEST_NET40_COMPILERUNIT_SUITE%" == "0" if "%TEST_FCS%" == "0" if "%TEST_NET40_COREUNIT_SUITE%" == "0" if "TEST_CORECLR_FSHARP_SUITE" == "0" if "%TEST_CORECLR_COREUNIT_SUITE%" == "0" if "%TEST_VS_IDEUNIT_SUITE%" == "0" if "%TEST_NET40_FSHARP_SUITE%" == "0" if "%TEST_NET40_FSHARPQA_SUITE%" == "0" goto :success if "%no_test%" == "1" goto :success @@ -751,7 +940,7 @@ ECHO link_exe=%link_exe% ECHO NUNIT3_CONSOLE=%NUNIT3_CONSOLE% ECHO NUNITPATH=%NUNITPATH% -REM ---------------- net40-fsharp ----------------------- +REM ---------------- test-net40-fsharp ----------------------- if "%TEST_NET40_FSHARP_SUITE%" == "1" ( @@ -779,6 +968,48 @@ if "%TEST_NET40_FSHARP_SUITE%" == "1" ( ) ) +REM ---------------- test-fcs ----------------------- + +if "%TEST_FCS%" == "1" ( + + del /q fcs\FSharp.Compiler.Service.Tests\TestResults\*.trx + echo "!_dotnet20exe!" test fcs/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj -c Release --logger:trx + "!_dotnet20exe!" test fcs/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj -c Release --logger:trx + + if errorlevel 1 ( + type fcs\FSharp.Compiler.Service.Tests\TestResults\*.trx + echo ----------------------------------------------------------------- + echo Error: Running FCS tests failed. See XML logging output above. Search for 'outcome="Failed"' or 'Failed ' + echo . + echo Error: Note that tests were run with both .NET Core and .NET Framework. + echo Error: Try running tests locally and using + echo . + echo dotnet test fcs/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj -c Release --logger:trx + echo . + echo Error: and look for results in + echo . + echo fcs\FSharp.Compiler.Service.Tests\TestResults\*.trx + echo . + echo ----------------------------------------------------------------- + goto :failure + ) +) + +REM ---------------- end2end ----------------------- +if "%TEST_END_2_END%" == "1" ( + + pushd %~dp0tests\EndToEndBuildTests + + echo Execute end to end compiler tests + echo call EndToEndBuildTests.cmd + call EndToEndBuildTests.cmd + if errorlevel 1 ( + popd + Echo end to end tests failed. + goto :failure + ) +) + REM ---------------- net40-fsharpqa ----------------------- set OSARCH=%PROCESSOR_ARCHITECTURE% @@ -790,6 +1021,7 @@ set HOSTED_COMPILER=1 if "%TEST_NET40_FSHARPQA_SUITE%" == "1" ( + set CSC_PIPE=%~dp0packages\Microsoft.Net.Compilers.2.7.0\tools\csc.exe set FSC=!FSCBINPATH!\fsc.exe set FSCOREDLLPATH=!FSCBinPath!\FSharp.Core.dll set PATH=!FSCBINPATH!;!PATH! @@ -832,8 +1064,8 @@ if "%TEST_NET40_COMPILERUNIT_SUITE%" == "1" ( set OUTPUTARG=--output:"!OUTPUTFILE!" ) set ERRORFILE=!RESULTSDIR!\test-net40-compilerunit-errors.log - echo "!NUNIT3_CONSOLE!" --verbose --framework:V4.0 --result:"!XMLFILE!;format=nunit3" !OUTPUTARG! !ERRORARG! --work:"!FSCBINPATH!" "!FSCBINPATH!\..\..\net40\bin\FSharp.Compiler.Unittests.dll" !WHERE_ARG_NUNIT! - "!NUNIT3_CONSOLE!" --verbose --framework:V4.0 --result:"!XMLFILE!;format=nunit3" !OUTPUTARG! !ERRORARG! --work:"!FSCBINPATH!" "!FSCBINPATH!\..\..\net40\bin\FSharp.Compiler.Unittests.dll" !WHERE_ARG_NUNIT! + echo "!NUNIT3_CONSOLE!" --verbose --framework:V4.0 --result:"!XMLFILE!;format=nunit3" !OUTPUTARG! !ERRORARG! --work:"!FSCBINPATH!" "!FSCBINPATH!\..\..\net40\bin\FSharp.Compiler.UnitTests.dll" !WHERE_ARG_NUNIT! + "!NUNIT3_CONSOLE!" --verbose --framework:V4.0 --result:"!XMLFILE!;format=nunit3" !OUTPUTARG! !ERRORARG! --work:"!FSCBINPATH!" "!FSCBINPATH!\..\..\net40\bin\FSharp.Compiler.UnitTests.dll" !WHERE_ARG_NUNIT! if errorlevel 1 ( echo ----------------------------------------------------------------- @@ -845,6 +1077,32 @@ if "%TEST_NET40_COMPILERUNIT_SUITE%" == "1" ( echo ----------------------------------------------------------------- goto :failure ) + + set OUTPUTARG= + set ERRORARG= + set OUTPUTFILE= + set ERRORFILE= + set XMLFILE=!RESULTSDIR!\test-net40-buildunit-results.xml + if "%CI%" == "1" ( + set OUTPUTFILE=!RESULTSDIR!\test-net40-buildunit-output.log + set ERRORFILE=!RESULTSDIR!\test-net40-buildunit-errors.log + set ERRORARG=--err:"!ERRORFILE!" + set OUTPUTARG=--output:"!OUTPUTFILE!" + ) + set ERRORFILE=!RESULTSDIR!\test-net40-buildunit-errors.log + echo "!NUNIT3_CONSOLE!" --verbose --framework:V4.0 --result:"!XMLFILE!;format=nunit3" !OUTPUTARG! !ERRORARG! --work:"!FSCBINPATH!" "!FSCBINPATH!\FSharp.Build.UnitTests.dll" !WHERE_ARG_NUNIT! + "!NUNIT3_CONSOLE!" --verbose --framework:V4.0 --result:"!XMLFILE!;format=nunit3" !OUTPUTARG! !ERRORARG! --work:"!FSCBINPATH!" "!FSCBINPATH!\FSharp.Build.UnitTests.dll" !WHERE_ARG_NUNIT! + + if errorlevel 1 ( + echo ----------------------------------------------------------------- + type "!OUTPUTFILE!" + echo ----------------------------------------------------------------- + type "!ERRORFILE!" + echo ----------------------------------------------------------------- + echo Error: Running tests net40-compilernit failed, see logs above -- FAILED + echo ----------------------------------------------------------------- + goto :failure + ) ) REM ---------------- net40-coreunit ----------------------- @@ -863,11 +1121,8 @@ if "%TEST_NET40_COREUNIT_SUITE%" == "1" ( set OUTPUTARG=--output:"!OUTPUTFILE!" ) - echo "!NUNIT3_CONSOLE!" --verbose --framework:V4.0 --result:"!XMLFILE!;format=nunit3" !OUTPUTARG! !ERRORARG! --work:"!FSCBINPATH!" "!FSCBINPATH!\FSharp.Build.Unittests.dll" !WHERE_ARG_NUNIT! - "!NUNIT3_CONSOLE!" --verbose --framework:V4.0 --result:"!XMLFILE!;format=nunit3" !OUTPUTARG! !ERRORARG! --work:"!FSCBINPATH!" "!FSCBINPATH!\FSharp.Build.Unittests.dll" !WHERE_ARG_NUNIT! - - echo "!NUNIT3_CONSOLE!" --verbose --framework:V4.0 --result:"!XMLFILE!;format=nunit3" !OUTPUTARG! !ERRORARG! --work:"!FSCBINPATH!" "!FSCBINPATH!\FSharp.Core.Unittests.dll" !WHERE_ARG_NUNIT! - "!NUNIT3_CONSOLE!" --verbose --framework:V4.0 --result:"!XMLFILE!;format=nunit3" !OUTPUTARG! !ERRORARG! --work:"!FSCBINPATH!" "!FSCBINPATH!\FSharp.Core.Unittests.dll" !WHERE_ARG_NUNIT! + echo "!NUNIT3_CONSOLE!" --verbose --framework:V4.0 --result:"!XMLFILE!;format=nunit3" !OUTPUTARG! !ERRORARG! --work:"!FSCBINPATH!" "!FSCBINPATH!\FSharp.Core.UnitTests.dll" !WHERE_ARG_NUNIT! + "!NUNIT3_CONSOLE!" --verbose --framework:V4.0 --result:"!XMLFILE!;format=nunit3" !OUTPUTARG! !ERRORARG! --work:"!FSCBINPATH!" "!FSCBINPATH!\FSharp.Core.UnitTests.dll" !WHERE_ARG_NUNIT! if errorlevel 1 ( echo ----------------------------------------------------------------- @@ -889,13 +1144,20 @@ if "%TEST_CORECLR_COREUNIT_SUITE%" == "1" ( set OUTPUTFILE=!RESULTSDIR!\test-coreclr-coreunit-output.log set ERRORFILE=!RESULTSDIR!\test-coreclr-coreunit-errors.log - echo "%_dotnetcliexe%" "%~dp0tests\testbin\!BUILD_CONFIG!\coreclr\FSharp.Build.Unittests\FSharp.Build.Unittests.dll" !WHERE_ARG_NUNIT! - "%_dotnetcliexe%" "%~dp0tests\testbin\!BUILD_CONFIG!\coreclr\FSharp.Build.Unittests\FSharp.Build.Unittests.dll" !WHERE_ARG_NUNIT! + echo "%_dotnetcliexe%" "%~dp0tests\testbin\!BUILD_CONFIG!\coreclr\FSharp.Build.UnitTests\FSharp.Build.UnitTests.dll" !WHERE_ARG_NUNIT! + "%_dotnetcliexe%" "%~dp0tests\testbin\!BUILD_CONFIG!\coreclr\FSharp.Build.UnitTests\FSharp.Build.UnitTests.dll" !WHERE_ARG_NUNIT! - echo "%_dotnetcliexe%" "%~dp0tests\testbin\!BUILD_CONFIG!\coreclr\FSharp.Core.Unittests\FSharp.Core.Unittests.dll" !WHERE_ARG_NUNIT! - "%_dotnetcliexe%" "%~dp0tests\testbin\!BUILD_CONFIG!\coreclr\FSharp.Core.Unittests\FSharp.Core.Unittests.dll" !WHERE_ARG_NUNIT! + if errorlevel 1 ( + echo ----------------------------------------------------------------- + echo Error: Running tests coreclr-coreunit failed, see logs above-- FAILED + echo ----------------------------------------------------------------- + goto :failure + ) - if ERRORLEVEL 1 ( + echo "%_dotnetcliexe%" "%~dp0tests\testbin\!BUILD_CONFIG!\coreclr\FSharp.Core.UnitTests\FSharp.Core.UnitTests.dll" !WHERE_ARG_NUNIT! + "%_dotnetcliexe%" "%~dp0tests\testbin\!BUILD_CONFIG!\coreclr\FSharp.Core.UnitTests\FSharp.Core.UnitTests.dll" !WHERE_ARG_NUNIT! + + if errorlevel 1 ( echo ----------------------------------------------------------------- echo Error: Running tests coreclr-coreunit failed, see logs above-- FAILED echo ----------------------------------------------------------------- @@ -942,9 +1204,19 @@ if "%TEST_VS_IDEUNIT_SUITE%" == "1" ( set OUTPUTARG=--output:"!OUTPUTFILE!" ) + rem Verify that VisualFSharp.UnitTests.dll can be loaded by nunit. Report load errors. + pushd !FSCBINPATH! + echo "!NUNIT3_CONSOLE!" --verbose --x86 --framework:V4.0 --work:"!FSCBINPATH!" --workers=1 --agents=1 --full "!FSCBINPATH!\GetTypesVSUnitTests.dll" !WHERE_ARG_NUNIT! + "!NUNIT3_CONSOLE!" --verbose --x86 --framework:V4.0 --work:"!FSCBINPATH!" --workers=1 --agents=1 --full "!FSCBINPATH!\GetTypesVSUnitTests.dll" !WHERE_ARG_NUNIT! + popd + + if errorlevel 1 ( + goto :failure + ) + pushd !FSCBINPATH! - echo "!NUNIT3_CONSOLE!" --verbose --x86 --framework:V4.0 --result:"!XMLFILE!;format=nunit3" !OUTPUTARG! !ERRORARG! --work:"!FSCBINPATH!" --workers=1 --agents=1 --full "!FSCBINPATH!\VisualFSharp.Unittests.dll" !WHERE_ARG_NUNIT! - "!NUNIT3_CONSOLE!" --verbose --x86 --framework:V4.0 --result:"!XMLFILE!;format=nunit3" !OUTPUTARG! !ERRORARG! --work:"!FSCBINPATH!" --workers=1 --agents=1 --full "!FSCBINPATH!\VisualFSharp.Unittests.dll" !WHERE_ARG_NUNIT! + echo "!NUNIT3_CONSOLE!" --verbose --x86 --framework:V4.0 --result:"!XMLFILE!;format=nunit3" !OUTPUTARG! !ERRORARG! --work:"!FSCBINPATH!" --workers=1 --agents=1 --full "!FSCBINPATH!\VisualFSharp.UnitTests.dll" !WHERE_ARG_NUNIT! + "!NUNIT3_CONSOLE!" --verbose --x86 --framework:V4.0 --result:"!XMLFILE!;format=nunit3" !OUTPUTARG! !ERRORARG! --work:"!FSCBINPATH!" --workers=1 --agents=1 --full "!FSCBINPATH!\VisualFSharp.UnitTests.dll" !WHERE_ARG_NUNIT! popd if errorlevel 1 ( @@ -955,6 +1227,8 @@ if "%TEST_VS_IDEUNIT_SUITE%" == "1" ( type "!ERRORFILE!" echo -------end vs-ide-unit errors ------------------------ echo Error: Running tests vs-ideunit failed, see logs above, search for "Errors and Failures" -- FAILED + echo Command Line for running tests + echo "!NUNIT3_CONSOLE!" --verbose --x86 --framework:V4.0 --result:"!XMLFILE!;format=nunit3" !OUTPUTARG! !ERRORARG! --work:"!FSCBINPATH!" --workers=1 --agents=1 --full "!FSCBINPATH!\VisualFSharp.UnitTests.dll" !WHERE_ARG_NUNIT! echo ---------------------------------------------------------------------------------------------------- goto :failure ) diff --git a/build.sh b/build.sh index 3d70ffc3ff6..4e78c56091c 100755 --- a/build.sh +++ b/build.sh @@ -1,802 +1,3 @@ #!/bin/sh -# Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -# Helper function to print an error message and exit with a non-zero error code. -failwith () { - printf "Error: %s\n" "$1" >&2 - exit 1 -} - -# Prints command text to stdout then runs (via eval) the command. -printeval () { - printf "%s\n" "$1" >&1 - eval "$1" -} - -# Prints build status to stdout. -build_status () { - printf "%s %s %s\n" "----------------" "$1" "-----------------" >&1 -} - -# Text for the usage message. -usage_text=" -Build and run a subset of test suites - -Usage: - -build.sh ^ - ^ - ^ - ^ - ^ - ^ - ^ - ^ - -No arguments default to 'default', meaning this (no testing) - - build.sh net40 - -Other examples: - - build.sh net40 (build compiler for .NET Framework) - build.sh coreclr (build compiler for .NET Core) - build.sh vs (build Visual Studio IDE Tools) - build.sh all (build everything) - build.sh test (build and test default targets) - build.sh net40 test (build and test net40) - build.sh coreclr test (build and test net40) - build.sh vs test (build and test net40) - build.sh all test (build and test net40) - build.sh nobuild test include Conformance (run only tests marked with Conformance category) - build.sh nobuild test include Expensive (run only tests marked with Expensive category) - -" - -# Prints usage text to stdout then exits with a non-zero exit code. -show_usage_and_exit() { - printf "%s\n" "$usage_text" - exit 1 -} - -# Check if caller specified any typical argument used to get usage/help info. -if [ "$1" = "--help" ] || [ "$1" = "-h" ] || [ "$1" = "-?" ]; then - show_usage_and_exit -fi - -# Save directory of the current script -- this is used below to fix up relative paths (if needed). -# The directory should have a trailing slash like it does on Windows, to minimize differences between scripts. -_scriptdir="$( cd -P -- "$(dirname -- "$(command -v -- "$0")")" && pwd -P )/" - -# disable setup build by setting FSC_BUILD_SETUP=0 -if [ -z "$FSC_BUILD_SETUP" ]; then - export FSC_BUILD_SETUP=0 -fi - -# by default don't build coreclr lkg. -# However allow configuration by setting (more specifically, exporting) an environment variable: export BUILD_PROTO_WITH_CORECLR_LKG = 1 -if [ -z "$BUILD_PROTO_WITH_CORECLR_LKG" ]; then - export BUILD_PROTO_WITH_CORECLR_LKG=0 -fi - -export BUILD_PROTO=0 -export BUILD_PHASE=1 -export BUILD_NET40_FSHARP_CORE=0 -export BUILD_NET40=0 -export BUILD_CORECLR=0 -export BUILD_PORTABLE=0 -export BUILD_VS=0 -export BUILD_CONFIG=release -export BUILD_CONFIG_LOWERCASE=release -export BUILD_DIAG= -export BUILD_PUBLICSIGN=0 - -export TEST_NET40_COMPILERUNIT_SUITE=0 -export TEST_NET40_COREUNIT_SUITE=0 -export TEST_NET40_FSHARP_SUITE=0 -export TEST_NET40_FSHARPQA_SUITE=0 -export TEST_CORECLR_COREUNIT_SUITE=0 -export TEST_CORECLR_FSHARP_SUITE=0 -export TEST_PORTABLE_COREUNIT_SUITE=0 -export TEST_VS_IDEUNIT_SUITE=0 -export INCLUDE_TEST_SPEC_NUNIT= -export INCLUDE_TEST_TAGS= - -# Set up variables used to determine whether we'll automatically select which -# targets to build/run/test. NOTE: These aren't exported, they're only used by this script. -no_test=0 -_autoselect=1 -_autoselect_tests=0 - -# Parse script arguments (specifying which targets to build/run/test), -# and export the corresponding environment variables to configure the build. -for arg in "$@" -do - case $arg in - "net40") - _autoselect=0 - export BUILD_NET40=1 - export BUILD_NET40_FSHARP_CORE=1 - ;; - "coreclr") - _autoselect=0 - export BUILD_PROTO_WITH_CORECLR_LKG=1 - export BUILD_CORECLR=1 - ;; - "pcls") - _autoselect=0 - export BUILD_PORTABLE=1 - ;; - "vs") - _autoselect=0 - export BUILD_NET40=1 - export BUILD_NET40_FSHARP_CORE=1 - export BUILD_VS=1 - ;; - "vstest") - export TEST_VS_IDEUNIT_SUITE=1 - ;; - "nobuild") - export BUILD_PHASE=0 - ;; - "none") - _autoselect=0 - export _buildexit=1 - export _buildexitVALUE=0 - ;; - "all") - _autoselect=0 - export BUILD_PROTO=1 - export BUILD_PROTO_WITH_CORECLR_LKG=1 - export BUILD_NET40=1 - export BUILD_NET40_FSHARP_CORE=1 - export BUILD_CORECLR=1 - export BUILD_PORTABLE=1 - export BUILD_VS=1 - export BUILD_SETUP=$FSC_BUILD_SETUP - export CI=1 - ;; - "microbuild") - _autoselect=0 - export BUILD_PROTO=1 - export BUILD_NET40=1 - export BUILD_NET40_FSHARP_CORE=1 - export BUILD_PROTO_WITH_CORECLR_LKG=1 - export BUILD_CORECLR=1 - export BUILD_PORTABLE=1 - export BUILD_VS=1 - export BUILD_SETUP=$FSC_BUILD_SETUP - - export TEST_NET40_COMPILERUNIT_SUITE=1 - export TEST_NET40_COREUNIT_SUITE=1 - export TEST_NET40_FSHARP_SUITE=1 - export TEST_NET40_FSHARPQA_SUITE=1 - export TEST_CORECLR_COREUNIT_SUITE=0 - export TEST_CORECLR_FSHARP_SUITE=0 - export TEST_PORTABLE_COREUNIT_SUITE=1 - export TEST_VS_IDEUNIT_SUITE=1 - export CI=1 - ;; - - # These divide 'ci' into multiple chunks which can be done in parallel - "ci_part1") - _autoselect=0 - - # what we do - export BUILD_PROTO=1 - export BUILD_NET40=1 - export BUILD_NET40_FSHARP_CORE=1 - export BUILD_PORTABLE=1 - export BUILD_VS=1 - export BUILD_SETUP=$FSC_BUILD_SETUP - export TEST_NET40_COMPILERUNIT_SUITE=1 - export TEST_NET40_FSHARPQA_SUITE=1 - export TEST_VS_IDEUNIT_SUITE=1 - export CI=1 - ;; - "ci_part2") - _autoselect=0 - - # what we do - export BUILD_PROTO_WITH_CORECLR_LKG=1 - export BUILD_PROTO=1 - export BUILD_NET40=1 - export BUILD_NET40_FSHARP_CORE=1 - export BUILD_PORTABLE=1 - - export TEST_NET40_COREUNIT_SUITE=1 - export TEST_NET40_FSHARP_SUITE=1 - export TEST_PORTABLE_COREUNIT_SUITE=1 - export CI=1 - ;; - "ci_part3") - _autoselect=0 - - # what we do - export BUILD_PROTO_WITH_CORECLR_LKG=1 - export BUILD_PROTO=1 - export BUILD_NET40=1 - export BUILD_NET40_FSHARP_CORE=1 - export BUILD_CORECLR=1 - - export TEST_CORECLR_FSHARP_SUITE=1 - export TEST_CORECLR_COREUNIT_SUITE=1 - export CI=1 - ;; - - # TEMP: The Jenkins builds currently call this script with the 'ci' target, - # but that doesn't exist even in build.cmd. It wasn't doing anything - # before anyway, so accept 'ci' but ignore it for now because the test - # suites don't build correctly on Linux/macOS yet anyway. - "ci") - # TODO: Do everything from ci_part1-3 here. - printf "The 'ci' target is currently ignored, until the test suite builds can be fixed for Linux/macOS.\n" - ;; - - "proto") - export BUILD_PROTO=1 - ;; - "diag") - export BUILD_DIAG=/v:detailed - if [ -z "$APPVEYOR" ]; then - export BUILD_LOG=fsharp_build_log.log - fi - ;; - "debug") - export BUILD_CONFIG=debug - ;; - "release") - export BUILD_CONFIG=release - ;; - "test") - _autoselect_tests=1 - ;; - "no-test") - no_test=1 - ;; - "include") - failwith "The 'include' option is not (yet) supported by this script." - #export /a counter=!counter!+1 - #if '$INCLUDE_TEST_SPEC_NUNIT' == '' ( export INCLUDE_TEST_SPEC_NUNIT=cat == $ARG2 ) else (set INCLUDE_TEST_SPEC_NUNIT=cat == $ARG2 or $INCLUDE_TEST_SPEC_NUNIT ) - #if '$INCLUDE_TEST_TAGS' == '' ( export INCLUDE_TEST_TAGS=$ARG2 ) else (set INCLUDE_TEST_TAGS=$ARG2;$INCLUDE_TEST_TAGS ) - ;; - "test-all") - _autoselect=0 - export BUILD_PROTO=1 - export BUILD_PROTO_WITH_CORECLR_LKG=1 - export BUILD_NET40=1 - export BUILD_NET40_FSHARP_CORE=1 - export BUILD_CORECLR=1 - export BUILD_PORTABLE=1 - export BUILD_VS=1 - export BUILD_SETUP=$FSC_BUILD_SETUP - - export TEST_NET40_COMPILERUNIT_SUITE=1 - export TEST_NET40_COREUNIT_SUITE=1 - export TEST_NET40_FSHARP_SUITE=1 - export TEST_NET40_FSHARPQA_SUITE=1 - export TEST_PORTABLE_COREUNIT_SUITE=1 - export TEST_CORECLR_COREUNIT_SUITE=1 - export TEST_VS_IDEUNIT_SUITE=1 - ;; - "test-net40-fsharpqa") - export BUILD_NET40=1 - export BUILD_NET40_FSHARP_CORE=1 - export BUILD_PORTABLE=1 - export TEST_NET40_FSHARPQA_SUITE=1 - ;; - "test-compiler-unit") - export BUILD_NET40=1 - export BUILD_NET40_FSHARP_CORE=1 - export TEST_NET40_COMPILERUNIT_SUITE=1 - ;; - "test-net40-coreunit") - export BUILD_NET40_FSHARP_CORE=1 - export TEST_NET40_COREUNIT_SUITE=1 - ;; - "test-coreclr-coreunit") - export BUILD_PROTO_WITH_CORECLR_LKG=1 - export BUILD_CORECLR=1 - export TEST_CORECLR_COREUNIT_SUITE=1 - ;; - "test-pcl-coreunit") - export BUILD_PORTABLE=1 - export TEST_PORTABLE_COREUNIT_SUITE=1 - ;; - "test-net40-fsharp") - export BUILD_NET40=1 - export BUILD_NET40_FSHARP_CORE=1 - export BUILD_PORTABLE=1 - export TEST_NET40_FSHARP_SUITE=1 - ;; - "test-coreclr-fsharp") - export BUILD_NET40=1 - export BUILD_NET40_FSHARP_CORE=1 - export BUILD_PROTO_WITH_CORECLR_LKG=1 - export BUILD_CORECLR=1 - export TEST_CORECLR_FSHARP_SUITE=1 - ;; - "publicsign") - export BUILD_PUBLICSIGN=1 - ;; - "init") - export BUILD_PROTO_WITH_CORECLR_LKG=1 - ;; - *) - errmsg=$(printf "Invalid argument: %s" "$arg") - failwith "$errmsg" - ;; - esac -done - -if [ $_buildexit -eq 1 ]; then - exit $_buildexitvalue -fi - -# Apply defaults, if necessary. -if [ $_autoselect -eq 1 ]; then - export BUILD_NET40=1 - export BUILD_NET40_FSHARP_CORE=1 -fi - -if [ $_autoselect_tests -eq 1 ]; then - if [ $BUILD_NET40 -eq 1 ]; then - export TEST_NET40_COMPILERUNIT_SUITE=1 - export TEST_NET40_COREUNIT_SUITE=1 - export TEST_NET40_FSHARP_SUITE=1 - export TEST_NET40_FSHARPQA_SUITE=1 - fi - - if [ $BUILD_CORECLR -eq 1 ]; then - export BUILD_NET40=1 - export BUILD_NET40_FSHARP_CORE=1 - export TEST_CORECLR_FSHARP_SUITE=1 - export TEST_CORECLR_COREUNIT_SUITE=1 - fi - - if [ $BUILD_PORTABLE -eq 1 ]; then - export TEST_PORTABLE_COREUNIT_SUITE=1 - fi - - if [ $BUILD_VS -eq 1 ]; then - export TEST_VS_IDEUNIT_SUITE=1 - fi -fi - -# If the `PB_SKIPTESTS` variable is set to 'true' then no tests should be built or run, even if explicitly specified -if [ $PB_SKIPTESTS -eq "true" ]; then - export TEST_NET40_COMPILERUNIT_SUITE=0 - export TEST_NET40_COREUNIT_SUITE=0 - export TEST_NET40_FSHARP_SUITE=0 - export TEST_NET40_FSHARPQA_SUITE=0 - export TEST_CORECLR_COREUNIT_SUITE=0 - export TEST_CORECLR_FSHARP_SUITE=0 - export TEST_PORTABLE_COREUNIT_SUITE=0 - export TEST_VS_IDEUNIT_SUITE=0 -fi - -# -# Report config -# - -printf "Build/Tests configuration:\n" -printf "\n" -printf "BUILD_PROTO=%s\n" "$BUILD_PROTO" -printf "BUILD_PROTO_WITH_CORECLR_LKG=%s\n" "$BUILD_PROTO_WITH_CORECLR_LKG" -printf "BUILD_NET40=%s\n" "$BUILD_NET40" -printf "BUILD_NET40_FSHARP_CORE=%s\n" "$BUILD_NET40_FSHARP_CORE" -printf "BUILD_CORECLR=%s\n" "$BUILD_CORECLR" -printf "BUILD_PORTABLE=%s\n" "$BUILD_PORTABLE" -printf "BUILD_VS=%s\n" "$BUILD_VS" -printf "BUILD_SETUP=%s\n" "$BUILD_SETUP" -printf "BUILD_CONFIG=%s\n" "$BUILD_CONFIG" -printf "BUILD_PUBLICSIGN=%s\n" "$BUILD_PUBLICSIGN" -printf "\n" -printf "PB_SKIPTESTS=%s\n" "$PB_SKIPTESTS" -printf "PB_RESTORESOURCE=%s\n" "$PB_RESTORESOURCE" -printf "\n" -printf "TEST_NET40_COMPILERUNIT_SUITE=%s\n" "$TEST_NET40_COMPILERUNIT_SUITE" -printf "TEST_NET40_COREUNIT_SUITE=%s\n" "$TEST_NET40_COREUNIT_SUITE" -printf "TEST_NET40_FSHARP_SUITE=%s\n" "$TEST_NET40_FSHARP_SUITE" -printf "TEST_NET40_FSHARPQA_SUITE=%s\n" "$TEST_NET40_FSHARPQA_SUITE" -printf "TEST_CORECLR_COREUNIT_SUITE=%s\n" "$TEST_CORECLR_COREUNIT_SUITE" -printf "TEST_CORECLR_FSHARP_SUITE=%s\n" "$TEST_CORECLR_FSHARP_SUITE" -printf "TEST_PORTABLE_COREUNIT_SUITE=%s\n" "$TEST_PORTABLE_COREUNIT_SUITE" -printf "TEST_VS_IDEUNIT_SUITE=%s\n" "$TEST_VS_IDEUNIT_SUITE" -printf "INCLUDE_TEST_SPEC_NUNIT=%s\n" "$INCLUDE_TEST_SPEC_NUNIT" -printf "INCLUDE_TEST_TAGS=%s\n" "$INCLUDE_TEST_TAGS" -printf "\n" - -# TODO: Print out environment variables? -printf "Environment\n" -printf "\n" -printf "(TODO)\n" -printf "\n" -printf "\n" - -build_status "Done with arguments, starting preparation" - -_msbuildexe="msbuild" -msbuildflags="" - -# Perform any necessary setup and system configuration prior to running builds. -./before_install.sh -rc=$?; -if [ $rc -ne 0 ]; then - printf "before_install script failed.\n" - exit $rc -fi - -build_status "Done with prepare, starting package restore" - -# Use built-in Nuget executable on Mono, if available. -_nugetexe="mono .nuget/NuGet.exe" -if command -v nuget > /dev/null; then - _nugetexe="nuget" -fi -_nugetconfig=".nuget/NuGet.Config" - -# TODO: Confirm existence of 'nuget' (or $_nugetexe) before proceeding. - -# Restore packages (default to restoring packages if otherwise unspecified). -if [ "${RestorePackages:-true}" = 'true' ]; then - cd fcs - mono .paket/paket.exe restore - cd .. - exit_code=$? - if [ $exit_code -ne 0 ]; then - exit $exit_code - fi - - _nugetoptions="-PackagesDirectory packages -ConfigFile $_nugetconfig" - if [ "$PB_RESTORESOURCE" != "" ]; then - _nugetoptions="$_nugetoptions -Source $PB_RESTORESOURCE" - fi - - eval "$_nugetexe restore packages.config $_nugetoptions" - if [ $? -ne 0 ]; then - failwith "Nuget restore failed" - fi - - if [ "$BUILD_VS" = '1' ]; then - eval "$_nugetexe restore vsintegration/packages.config $_nugetoptions" - if [ $? -ne 0 ]; then - failwith "Nuget restore failed" - fi - fi - - if [ "$BUILD_SETUP" = '1' ]; then - eval "$_nugetexe restore setup/packages.config $_nugetoptions" - if [ $? -ne 0 ]; then - failwith "Nuget restore failed" - fi - fi -fi - -# If building for CoreCLR, restore the Tools directory. -if [ "$BUILD_PROTO_WITH_CORECLR_LKG" = '1' ]; then - # Restore the Tools directory - ./init-tools.sh - rc=$?; - if [ $rc -ne 0 ]; then - printf "init-tools script failed.\n" - exit $rc - fi -fi - -# TODO: Check for existence of fsi (either on the system, or from the FSharp.Compiler.Tools package that was restored). - -build_status "Done with package restore, starting proto" - -# Decide if Proto need building -if [ ! -f "Proto/net40/bin/fsc-proto.exe" ]; then - export BUILD_PROTO=1 -fi - -_dotnetexe=dotnet -_architecture=win7-x64 - -# Build Proto -if [ "$BUILD_PROTO" = '1' ]; then - rm -rfd Proto - - if [ "$BUILD_PROTO_WITH_CORECLR_LKG" = '1' ]; then - { pushd ./lkg/fsc && eval "$_dotnetexe restore" && popd; } || failwith "dotnet restore failed" - { pushd ./lkg/fsi && eval "$_dotnetexe restore" && popd; } || failwith "dotnet restore failed" - - { pushd ./lkg/fsc && eval "$_dotnetexe publish project.json --no-build -o ${_scriptdir}Tools/lkg -r $_architecture" && popd; } || failwith "dotnet publish failed" - { pushd ./lkg/fsi && eval "$_dotnetexe publish project.json --no-build -o ${_scriptdir}Tools/lkg -r $_architecture" && popd; } || failwith "dotnet publish failed" - - { printeval "$_msbuildexe $msbuildflags src/fsharp-proto-build.proj /p:Configuration=Proto"; } || failwith "compiler proto build failed" - -# { printeval "$_ngenexe install Proto/net40/bin/fsc-proto.exe /nologo"; } || failwith "NGen of proto failed" - else - # Build proto-compiler and libs - { printeval "$_msbuildexe $msbuildflags src/fsharp-proto-build.proj /p:UseMonoPackaging=true /p:Configuration=Proto"; } || failwith "compiler proto build failed" - fi -fi - - -build_status "Done with proto, starting build" - -if [ "$BUILD_PHASE" = '1' ]; then - cmd="$_msbuildexe $msbuildflags build-everything.proj /p:UseMonoPackaging=true /p:Configuration=$BUILD_CONFIG $BUILD_DIAG /p:BUILD_PUBLICSIGN=$BUILD_PUBLICSIGN" - { printeval "$cmd"; } || failwith "'$cmd' failed" -fi - -build_status "Main part of build finished, completing parts of build needed for Mono setup" - -if [ "$BUILD_NET40" = '1' ]; then - { printeval "./autogen.sh --prefix=/usr"; } || failwith "./autogen.sh failed" - - { printeval "make"; } || failwith "make failed" -fi - -build_status "Done with build, starting update/prepare" - -if [ "$BUILD_NET40" = '1' ]; then - - { printeval "sudo make install"; } || failwith "sudo make install failed" - -# WINDOWS: -# src/update.sh $BUILD_CONFIG -# rc=$?; -# if [ $rc -ne 0 ]; then -# printf "src/update script failed.\n" -# exit $rc -# fi -fi - -NUNITPATH="packages/NUnit.Console.3.0.0/tools/" -printf "set NUNITPATH=%s\n" "$NUNITPATH" -if [ ! -d "$NUNITPATH" ]; then - failwith "Could not find $NUNITPATH" -fi - -{ printeval "cp -R $NUNITPATH ${_scriptdir}tests/fsharpqa/testenv/bin/nunit"; } || failwith "unable to copy nunit binaries to fsharpqa" -{ printeval "cp -R ${_scriptdir}tests/fsharpqa/testenv/src/nunit ${_scriptdir}tests/fsharpqa/testenv/bin/nunit"; } || failwith "unable to copy nunit binaries to fsharpqa" - -# TODO: Define location of ildasm/monodis and sn - -if [ "$TEST_NET40_COMPILERUNIT_SUITE" = '0' ] && [ "$TEST_PORTABLE_COREUNIT_SUITE" = '0' ] && [ "$TEST_CORECLR_COREUNIT_SUITE" = '0' ] && [ "$TEST_VS_IDEUNIT_SUITE" = '0' ] && [ "$TEST_NET40_FSHARP_SUITE" = '0' ] && [ "$TEST_NET40_FSHARPQA_SUITE" = '0' ]; then - # Successful build; not running tests so exit now. - exit 0 -fi - -if [ $no_test -eq 1 ]; then - # Successful build; not running tests so exit now. - exit 0 -fi - -build_status "Done with update, starting tests" - -if [ -n "$INCLUDE_TEST_SPEC_NUNIT" ]; then - export WHERE_ARG_NUNIT="--where $INCLUDE_TEST_SPEC_NUNIT" -fi - -if [ -n "$INCLUDE_TEST_TAGS" ]; then - export TTAGS_ARG_RUNALL="-ttags:$INCLUDE_TEST_TAGS" -fi - -printf "WHERE_ARG_NUNIT=%s\n" "$WHERE_ARG_NUNIT" - -export NUNITPATH="tests/fsharpqa/testenv/bin/nunit/" -export NUNIT3_CONSOLE="${NUNITPATH}nunit3-console.exe" -export link_exe="${_scriptdir}packages/VisualCppTools.14.0.24519-Pre/lib/native/bin/link.exe" -if [ ! -f "$link_exe" ]; then - failwith "failed to find '$link_exe' use nuget to restore the VisualCppTools package" -fi - -#if /I not '$single_threaded' == 'true' (set PARALLEL_ARG=-procs:$NUMBER_OF_PROCESSORS) else set PARALLEL_ARG=-procs:0 - -export FSCBINPATH="${_scriptdir}$BUILD_CONFIG/net40/bin" -export RESULTSDIR="${_scriptdir}tests/TestResults" -if [ ! -d "$RESULTSDIR" ]; then - mkdir "$RESULTSDIR" -fi - -printf "FSCBINPATH=%s\n" "$FSCBINPATH" -printf "RESULTSDIR=%s\n" "$RESULTSDIR" -printf "link_exe=%s\n" "$link_exe" -printf "NUNIT3_CONSOLE=%s\n" "$NUNIT3_CONSOLE" -printf "NUNITPATH=%s\n" "$NUNITPATH" - -# ---------------- net40-fsharp ----------------------- - -if [ "$TEST_NET40_FSHARP_SUITE" = '1' ]; then - OUTPUTARG="" - ERRORARG="" - OUTPUTFILE="" - ERRORFILE="" - XMLFILE="$RESULTSDIR/test-net40-fsharp-results.xml" - if [ "$CI" = '1' ]; then - OUTPUTFILE="$RESULTSDIR/test-net40-fsharp-output.log" - OUTPUTARG="--output:\"$OUTPUTFILE\"" - ERRORFILE="$RESULTSDIR/test-net40-fsharp-errors.log" - ERRORARG="--err:\"$ERRORFILE\"" - fi - - if ! printeval "mono $NUNIT3_CONSOLE --verbose \"$FSCBINPATH/FSharp.Tests.FSharpSuite.dll\" --framework:V4.0 --work:\"$FSCBINPATH\" $OUTPUTARG $ERRORARG --result:\"$XMLFILE;format=nunit3\" $WHERE_ARG_NUNIT"; then - if [ -f "$ERRORFILE" ]; then - echo ----------------------------------------------------------------- - cat "$ERRORFILE" - fi - echo ----------------------------------------------------------------- - echo Error: Running tests net40-fsharp failed, see log above -- FAILED - echo ----------------------------------------------------------------- - exit 1 - fi -fi - -# ---------------- net40-compilerunit ----------------------- - -if [ "$TEST_NET40_COMPILERUNIT_SUITE" = '1' ]; then - - OUTPUTARG="" - ERRORARG="" - OUTPUTFILE="" - ERRORFILE="$RESULTSDIR/test-net40-compilerunit-errors.log" - XMLFILE="$RESULTSDIR/test-net40-compilerunit-results.xml" - if [ "$CI" = '1' ]; then - OUTPUTFILE="$RESULTSDIR/test-net40-compilerunit-output.log" - ERRORARG="--err:\"$ERRORFILE\"" - OUTPUTARG="--output:\"$OUTPUTFILE\"" - fi - - if ! printeval "mono $NUNIT3_CONSOLE --verbose --framework:V4.0 --result:\"$XMLFILE;format=nunit3\" $OUTPUTARG $ERRORARG --work:\"$FSCBINPATH\" \"$FSCBINPATH/../../net40/bin/FSharp.Compiler.Unittests.dll\" $WHERE_ARG_NUNIT"; then - if [ -f "$OUTPUTFILE" ]; then - echo ----------------------------------------------------------------- - cat "$OUTPUTFILE" - fi - if [ -f "$ERRORFILE" ]; then - echo ----------------------------------------------------------------- - cat "$ERRORFILE" - fi - echo ----------------------------------------------------------------- - echo Error: Running tests net40-compilerunit failed, see logs above -- FAILED - echo ----------------------------------------------------------------- - exit 1 - fi -fi - -# ---------------- net40-coreunit ----------------------- - -if [ "$TEST_NET40_COREUNIT_SUITE" = '1' ]; then - - OUTPUTARG="" - ERRORARG="" - OUTPUTFILE="" - ERRORFILE="" - XMLFILE="$RESULTSDIR/test-net40-coreunit-results.xml" - if [ "$CI" = '1' ]; then - ERRORFILE="$RESULTSDIR/test-net40-coreunit-errors.log" - OUTPUTFILE="$RESULTSDIR/test-net40-coreunit-output.log" - ERRORARG="--err:\"$ERRORFILE\"" - OUTPUTARG="--output:\"$OUTPUTFILE\"" - fi - - if ! printeval "mono $NUNIT3_CONSOLE --verbose --framework:V4.0 --result:\"$XMLFILE;format=nunit3\" $OUTPUTARG $ERRORARG --work:\"$FSCBINPATH\" \"$FSCBINPATH/FSharp.Core.Unittests.dll\" $WHERE_ARG_NUNIT"; then - if [ -f "$OUTPUTFILE" ]; then - echo ----------------------------------------------------------------- - cat "$OUTPUTFILE" - fi - if [ -f "$ERRORFILE" ]; then - echo ----------------------------------------------------------------- - cat "$ERRORFILE" - fi - echo ----------------------------------------------------------------- - echo Error: Running tests net40-coreunit failed, see logs above -- FAILED - echo ----------------------------------------------------------------- - exit 1 - fi -fi - -# ---------------- portable-coreunit ----------------------- - -if [ "$TEST_PORTABLE_COREUNIT_SUITE" = '1' ]; then - - OUTPUTARG="" - ERRORARG="" - OUTPUTFILE="" - ERRORFILE="" - XMLFILE="$RESULTSDIR/test-portable-coreunit-results.xml" - - if [ "$CI" = '1' ]; then - OUTPUTFILE="$RESULTSDIR/test-portable-coreunit-output.log" - ERRORFILE="$RESULTSDIR/test-portable-coreunit-errors.log" - ERRORARG="--err:\"$ERRORFILE\"" - OUTPUTARG="--output:\"$OUTPUTFILE\"" - fi - - if ! printeval "mono $NUNIT3_CONSOLE /framework:V4.0 /result=\"$XMLFILE;format=nunit3\" $OUTPUTARG $ERRORARG /work=\"$FSCBINPATH\" \"$FSCBINPATH/../../portable7/bin/FSharp.Core.Unittests.dll\" \"$FSCBINPATH/../../portable47/bin/FSharp.Core.Unittests.dll\" \"$FSCBINPATH/../../portable78/bin/FSharp.Core.Unittests.dll\" \"$FSCBINPATH/../../portable259/bin/FSharp.Core.Unittests.dll\" $WHERE_ARG_NUNIT"; then - if [ -f "$OUTPUTFILE" ]; then - echo ----------------------------------------------------------------- - cat "$OUTPUTFILE" - fi - if [ -f "$ERRORFILE" ]; then - echo ----------------------------------------------------------------- - cat "$ERRORFILE" - fi - echo ----------------------------------------------------------------- - echo Error: Running tests portable-coreunit failed, see logs above -- FAILED - echo ----------------------------------------------------------------- - exit 1 - fi -fi - -# ---------------- coreclr-coreunit ----------------------- - -if [ "$TEST_CORECLR_COREUNIT_SUITE" = '1' ]; then - - XMLFILE="$RESULTSDIR/test-coreclr-coreunit-results.xml" - OUTPUTFILE="$RESULTSDIR/test-coreclr-coreunit-output.log" - ERRORFILE="$RESULTSDIR/test-coreclr-coreunit-errors.log" - - if ! printeval "$_dotnetexe \"${_scriptdir}tests/testbin/$BUILD_CONFIG/coreclr/FSharp.Core.Unittests/FSharp.Core.Unittests.dll\" $WHERE_ARG_NUNIT"; then - echo ----------------------------------------------------------------- - echo Error: Running tests coreclr-coreunit failed, see logs above-- FAILED - echo ----------------------------------------------------------------- - exit 1 - fi -fi - -# ---------------- coreclr-fsharp ----------------------- - -if [ "$TEST_CORECLR_FSHARP_SUITE" = '1' ]; then - - export single_threaded=true - export permutations=FSC_CORECLR - - OUTPUTARG="" - ERRORARG="" - OUTPUTFILE="" - ERRORFILE="" - XMLFILE="$RESULTSDIR/test-coreclr-fsharp-results.xml" - if ! printeval "$_dotnetexe \"${_scriptdir}tests/testbin/$BUILD_CONFIG/coreclr/FSharp.Tests.FSharpSuite.DrivingCoreCLR/FSharp.Tests.FSharpSuite.DrivingCoreCLR.dll\" $WHERE_ARG_NUNIT"; then - echo ----------------------------------------------------------------- - echo Error: Running tests coreclr-fsharp failed, see logs above-- FAILED - echo ----------------------------------------------------------------- - exit 1 - fi -fi - -# ---------------- net40-fsharpqa ----------------------- - -OSARCH="${PROCESSOR_ARCHITECTURE:-x64}" - -# Set this to 1 in order to use an external compiler host process -# This only has an effect when running the FSHARPQA tests, but can -# greatly speed up execution since fsc.exe does not need to be spawned thousands of times -HOSTED_COMPILER=1 - -if [ "$TEST_NET40_FSHARPQA_SUITE" = '1' ]; then - - export FSC="$FSCBINPATH/fsc.exe" - export FSCOREDLLPATH="$FSCBINPATH/FSharp.Core.dll" - export PATH="$FSCBINPATH;$PATH" - - if ! command -v perl > /dev/null; then - failwith "perl is not in the PATH, it is required for the net40-fsharpqa test suite" - fi - - OUTPUTFILE=test-net40-fsharpqa-results.log - ERRORFILE=test-net40-fsharpqa-errors.log - FAILENV=test-net40-fsharpqa-errors - - { pushd "${_scriptdir}tests/fsharpqa/source" && \ - printeval "perl tests/fsharpqa/testenv/bin/runall.pl -resultsroot $RESULTSDIR -results $OUTPUTFILE -log $ERRORFILE -fail $FAILENV -cleanup:no $TTAGS_ARG_RUNALL $PARALLEL_ARG" && \ - popd; } || { - if [ -f "$RESULTSDIR/$OUTPUTFILE" ]; then - echo ----------------------------------------------------------------- - cat "$RESULTSDIR/$OUTPUTFILE" - fi - if [ -f "$RESULTSDIR/$ERRORFILE" ]; then - echo ----------------------------------------------------------------- - cat "$RESULTSDIR/$ERRORFILE" - fi - echo ----------------------------------------------------------------- - echo Error: Running tests net40-fsharpqa failed, see logs above -- FAILED - echo ----------------------------------------------------------------- - exit 1 - } -fi +make Configuration=release diff --git a/build/config/AssemblySignToolData.json b/build/config/AssemblySignToolData.json new file mode 100644 index 00000000000..6857a57f0dd --- /dev/null +++ b/build/config/AssemblySignToolData.json @@ -0,0 +1,73 @@ +{ + "sign": [ + { + "certificate": "Microsoft", + "strongName": "StrongName", + "values": [ + "net40\\bin\\FSharp.Core.dll", + "net40\\bin\\*\\FSharp.Core.resources.dll", + "net40\\bin\\FSharp.Build.dll", + "net40\\bin\\*\\FSharp.Build.resources.dll", + "net40\\bin\\FSharp.Compiler.Private.dll", + "net40\\bin\\*\\FSharp.Compiler.Private.resources.dll", + "net40\\bin\\FSharp.Compiler.Server.Shared.dll", + "net40\\bin\\FSharp.Compiler.Interactive.Settings.dll", + "net40\\bin\\*\\FSharp.Compiler.Interactive.Settings.resources.dll", + "net40\\bin\\fsc.exe", + "net40\\bin\\fsi.exe", + "net40\\bin\\fsiAnyCpu.exe", + "net40\\bin\\FSharp.VS.FSI.dll", + "net40\\bin\\*\\FSharp.VS.FSI.resources.dll", + "net40\\bin\\FSharp.LanguageService.Base.dll", + "net40\\bin\\*\\FSharp.LanguageService.Base.resources.dll", + "net40\\bin\\FSharp.LanguageService.dll", + "net40\\bin\\*\\FSharp.LanguageService.resources.dll", + "net40\\bin\\FSharp.UIResources.dll", + "net40\\bin\\*\\FSharp.UIResources.resources.dll", + "net40\\bin\\FSharp.Editor.dll", + "net40\\bin\\*\\FSharp.Editor.resources.dll", + "net40\\bin\\FSharp.ProjectSystem.Base.dll", + "net40\\bin\\*\\FSharp.ProjectSystem.Base.resources.dll", + "net40\\bin\\FSharp.ProjectSystem.PropertyPages.dll", + "net40\\bin\\*\\FSharp.ProjectSystem.PropertyPages.resources.dll", + "net40\\bin\\FSharp.ProjectSystem.FSharp.dll", + "net40\\bin\\*\\FSharp.ProjectSystem.FSharp.resources.dll", + "net40\\bin\\FSharp.PatternMatcher.dll", + "coreclr\\bin\\FSharp.Core.dll", + "coreclr\\bin\\*\\FSharp.Core.resources.dll", + "coreclr\\bin\\FSharp.Build.dll", + "coreclr\\bin\\*\\FSharp.Build.resources.dll", + "coreclr\\bin\\FSharp.Compiler.Private.dll", + "coreclr\\bin\\*\\FSharp.Compiler.Private.resources.dll", + "coreclr\\bin\\FSharp.Compiler.Interactive.Settings.dll", + "coreclr\\bin\\*\\FSharp.Compiler.Interactive.Settings.resources.dll", + "coreclr\\bin\\fsc.exe", + "coreclr\\bin\\fsi.exe" + ] + }, + { + "certificate": "VsixSHA2", + "strongName": null, + "values": [ + "net40\\bin\\VisualFSharpFull.vsix", + "net40\\bin\\VisualFSharpTemplate.vsix", + "insertion\\Microsoft.FSharp.Dependencies.vsix", + "insertion\\Microsoft.FSharp.VSIX.Full.Resources.*.vsix" + ] + } + ], + "exclude": [ + "e_sqlite3.dll", + "FSharp.Core.4.5.2.nupkg", + "FSharp.Data.TypeProviders.dll", + "Microsoft.Build.dll", + "Microsoft.Build.Framework.dll", + "Microsoft.Build.Tasks.Core.dll", + "Microsoft.Build.Utilities.Core.dll", + "Newtonsoft.Json.dll", + "System.Collections.Immutable.dll", + "System.Reflection.Metadata.dll", + "System.ValueTuple.4.4.0.nupkg", + "System.ValueTuple.dll" + ] +} diff --git a/build/config/InsertionSignToolData.json b/build/config/InsertionSignToolData.json new file mode 100644 index 00000000000..ec8432ca9ad --- /dev/null +++ b/build/config/InsertionSignToolData.json @@ -0,0 +1,37 @@ +{ + "sign": [ + { + "certificate": "VsixSHA2", + "strongName": null, + "values": [ + "insertion\\Microsoft.FSharp.Compiler.vsix", + "insertion\\Microsoft.FSharp.Compiler.Resources.*.vsix", + "insertion\\Microsoft.FSharp.Dependencies.vsix", + "insertion\\Microsoft.FSharp.IDE.vsix", + "insertion\\Microsoft.FSharp.SDK.vsix" + ] + } + ], + "exclude": [ + "fsc.exe", + "FSharp.Build.dll", + "FSharp.Build.resources.dll", + "FSharp.Core.dll", + "FSharp.Core.resources.dll", + "FSharp.Compiler.Private.dll", + "FSharp.Compiler.Private.resources.dll", + "FSharp.Compiler.Server.Shared.dll", + "FSharp.Compiler.Interactive.Settings.dll", + "FSharp.Compiler.Interactive.Settings.resources.dll", + "fsi.exe", + "fsiAnyCpu.exe", + "FSharp.Data.TypeProviders.dll", + "Microsoft.Build.dll", + "Microsoft.Build.Framework.dll", + "Microsoft.Build.Tasks.Core.dll", + "Microsoft.Build.Utilities.Core.dll", + "System.Collections.Immutable.dll", + "System.Reflection.Metadata.dll", + "System.ValueTuple.dll" + ] +} diff --git a/build/config/PackageSignToolData.json b/build/config/PackageSignToolData.json new file mode 100644 index 00000000000..20007f59e36 --- /dev/null +++ b/build/config/PackageSignToolData.json @@ -0,0 +1,24 @@ +{ + "sign": [ + { + "certificate": "NuGet", + "strongName": null, + "values": [ + "artifacts\\*.nupkg", + "artifacts\\*\\*.nupkg" + ] + } + ], + "exclude": [ + "FSharp.Build.resources.dll", + "FSharp.Compiler.Interactive.Settings.resources.dll", + "FSharp.Compiler.Private.resources.dll", + "FSharp.Core.resources.dll", + "fsc.exe", + "FSharp.Build.dll", + "FSharp.Compiler.Interactive.Settings.dll", + "FSharp.Compiler.Private.dll", + "FSharp.Core.dll", + "fsi.exe" + ] +} \ No newline at end of file diff --git a/build/config/packages.config b/build/config/packages.config new file mode 100644 index 00000000000..e131ae53c92 --- /dev/null +++ b/build/config/packages.config @@ -0,0 +1,5 @@ + + + + + diff --git a/build/projects/PrepareDependencyUptake.proj b/build/projects/PrepareDependencyUptake.proj new file mode 100644 index 00000000000..78ded8de2ad --- /dev/null +++ b/build/projects/PrepareDependencyUptake.proj @@ -0,0 +1,33 @@ + + + + $(MSBuildThisFileDirectory)..\..\Tools\dependencyUptake + $(DependencyUptakeDirectory)\PackageVersions.props + $(DependencyUptakeDirectory)\packages.config + $(DependencyUptakeDirectory)\NuGet.config + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/build/scripts/run-signtool.cmd b/build/scripts/run-signtool.cmd new file mode 100644 index 00000000000..15ae3420693 --- /dev/null +++ b/build/scripts/run-signtool.cmd @@ -0,0 +1,69 @@ +@echo off +:: Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. +setlocal enableDelayedExpansion +set scriptdir=%~dp0 +set MSBuild= +set SignType= +set ConfigFile= + +:: +:: Validate arguments +:: + +:parsearg +if "%1" == "" goto doneargs +set arg=%1 +set argv=%2 + +if /i "%arg%" == "/?" goto help +if /i "%arg%" == "-h" goto help +if /i "%arg%" == "--help" goto help +if /i "%arg%" == "-MSBuild" ( + set MSBuild=%argv% + shift +) +if /i "%arg%" == "-SignType" ( + set SignType=%argv% + shift +) +if /i "%arg%" == "-Configuration" ( + set Configuration=%argv% + shift +) +if /i "%arg%" == "-ConfigFile" ( + set ConfigFile=%argv% + shift +) + +shift +goto parsearg + +:doneargs + +if not defined MSBuild echo Location of MSBuild.exe not specified. && goto error +if not defined ConfigFile echo Configuration file not specified. && goto error +if not exist "%MSBuild%" echo The specified MSBuild.exe does not exist. && goto error + +set NUGET_PACKAGES=%USERPROFILE%\.nuget\packages +set _signtoolexe=%NUGET_PACKAGES%\RoslynTools.SignTool\1.0.0-beta2-dev3\tools\SignTool.exe +set SignToolArgs=-msbuildPath %MSBuild% -config "%ConfigFile%" -nugetPackagesPath "%NUGET_PACKAGES%" +if /i "%SignType%" == "real" goto runsigntool +if /i "%SignType%" == "test" set SignToolArgs=%SignToolArgs% -testSign && goto runsigntool +set SignToolArgs=%SignToolArgs% -test + +:runsigntool + +if not exist "%_signtoolexe%" echo The signing tool could not be found at location '%_signtoolexe%' && goto error +set SignToolArgs=%SignToolArgs% "%scriptdir%..\..\%Configuration%" +echo "%_signtoolexe%" %SignToolArgs% + "%_signtoolexe%" %SignToolArgs% +if errorlevel 1 goto error +goto :EOF + +:help +echo Usage: %0 -MSBuild path\to\msbuild.exe -ConfigFile path\to\SignToolData.json [-SignType ^] +goto :EOF + +:error +echo Error running the sign tool. +exit /b 1 diff --git a/build/targets/AssemblyVersions.props b/build/targets/AssemblyVersions.props new file mode 100644 index 00000000000..5e82721efa6 --- /dev/null +++ b/build/targets/AssemblyVersions.props @@ -0,0 +1,68 @@ + + + + + $([System.DateTime]::Now.ToString(yyyyMMdd.0)) + + $(BUILD_BUILDNUMBER.Replace(".DRAFT", "")) + + + <_Build_Year>$(BUILD_BUILDNUMBER.Substring(0, 4)) + <_Build_Month>$(BUILD_BUILDNUMBER.Substring(4, 2)) + <_Build_Day>$(BUILD_BUILDNUMBER.Substring(6, 2)) + <_Build_Number>$(BUILD_BUILDNUMBER.Substring(9)) + $(_Build_Year).$(_Build_Month).$(_Build_Day).$(_Build_Number) + + 4.5 + $(FSCoreMajorVersion).3 + $(FSCoreMajorVersion).0.0 + + 10.2 + $(FSPackageMajorVersion).3 + $(FSPackageVersion).0 + + 15 + 8 + $(VSMajorVersion).0 + $(VSMajorVersion).$(VSMinorVersion).0.0 + + $(FSCoreVersion) + + + $(FSProductVersion) + + + $(VSAssemblyVersion) + + + $(BUILD_BUILDNUMBER.Split('.')[0].Substring(2)) + $(BUILD_BUILDNUMBER.Split('.')[1].PadLeft(2, '0')) + $(BuildTimeStamp_Date)$(BuildTimeStamp_Number) + $(VSAssemblyVersion.Split('.')[0]).$(VSAssemblyVersion.Split('.')[1]).$(BUILD_BUILDNUMBER) + 42.42.42.42 + $(BuildTimeStamp_Date)-$(BuildTimeStamp_Number) + + + + + + diff --git a/build/targets/CommonPackages.targets b/build/targets/CommonPackages.targets new file mode 100644 index 00000000000..fad7b976127 --- /dev/null +++ b/build/targets/CommonPackages.targets @@ -0,0 +1,7 @@ + + + + + + + diff --git a/build/targets/ConvertPortablePdbs.targets b/build/targets/ConvertPortablePdbs.targets new file mode 100644 index 00000000000..0965566db0c --- /dev/null +++ b/build/targets/ConvertPortablePdbs.targets @@ -0,0 +1,20 @@ + + + + + + + + + $(FinalOutputPath)\ConvertedPdbs + $(NuGetPackageRoot)Microsoft.DiaSymReader.Pdb2Pdb\$(MicrosoftDiaSymReaderPdb2PdbPackageVersion)\tools\Pdb2Pdb.exe + "$(TargetPath)" /out "$(ConvertedPdbsDirectory)\$(TargetName).pdb" /verbose /srcsvrvar SRC_INDEX=public + + + + + + + diff --git a/build/targets/GenerateAssemblyAttributes.targets b/build/targets/GenerateAssemblyAttributes.targets new file mode 100644 index 00000000000..11206a9b76d --- /dev/null +++ b/build/targets/GenerateAssemblyAttributes.targets @@ -0,0 +1,95 @@ + + + + + + + + $(IntermediateOutputPath)$(MSBuildProjectName).AssemblyLevelAttributes$(DefaultLanguageSourceExtension) + + + + + + + + + + + + + + $(IntermediateOutputPath)$(MSBuildProjectName).AssemblyVersion$(DefaultLanguageSourceExtension) + + + + + <_UseWriteCodeFragmentHack Condition="'$(OS)' == 'Unix' and '$(Language)' == 'F#'">true + + + + <_AssemblyVersionAttributes Include="System.Reflection.AssemblyCompanyAttribute"> + <_Parameter1>Microsoft Corporation + + <_AssemblyVersionAttributes Include="System.Reflection.AssemblyCopyrightAttribute"> + <_Parameter1>© Microsoft Corporation. All Rights Reserved. + + <_AssemblyVersionAttributes Include="System.Reflection.AssemblyDescriptionAttribute"> + <_Parameter1>$(AssemblyName) + + <_AssemblyVersionAttributes Include="System.Reflection.AssemblyFileVersionAttribute"> + <_Parameter1>$(Build_FileVersion) + + <_AssemblyVersionAttributes Include="System.Reflection.AssemblyInformationalVersionAttribute"> + <_Parameter1>$(MicroBuildAssemblyVersion). Commit Hash: $(GitHeadSha). + + <_AssemblyVersionAttributes Include="System.Reflection.AssemblyProductAttribute"> + <_Parameter1>Microsoft® F# + + <_AssemblyVersionAttributes Include="System.Reflection.AssemblyTitleAttribute"> + <_Parameter1>$(AssemblyName) + + <_AssemblyVersionAttributes Include="System.Reflection.AssemblyVersionAttribute"> + <_Parameter1>$(MicroBuildAssemblyVersion) + + + + + + + + + + + + + <_LinesToWrite Include="// <auto-generated>" /> + <_LinesToWrite Include="namespace FSharp" /> + <_LinesToWrite Include="open System" /> + <_LinesToWrite Include="open System.Reflection" /> + <_LinesToWrite Include="[<assembly: %(_AssemblyVersionAttributes.Identity)("%(_AssemblyVersionAttributes._Parameter1)")>]" /> + <_LinesToWrite Include="do()" /> + + + + + + + + + + + diff --git a/build/targets/GenerateInternalsVisibleTo.targets b/build/targets/GenerateInternalsVisibleTo.targets new file mode 100644 index 00000000000..ca4bb15e7ea --- /dev/null +++ b/build/targets/GenerateInternalsVisibleTo.targets @@ -0,0 +1,44 @@ + + + + $(IntermediateOutputPath)$(MSBuildProjectName).InternalsVisibleTo$(DefaultLanguageSourceExtension) + + + + + false + + + + + + <_PublicKey>002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293 + + + <_PublicKey>002400000480000094000000060200000024000052534131000400000100010077d32e043d184cf8cebf177201ec6fad091581a3a639a0534f1c4ebb3ab847a6b6636990224a04cf4bd1aec51ecec44cf0c8922eb5bb2ee65ec3fb9baa87e141042c96ce414f98af33508c7e24dab5b068aa802f6693881537ee0efcb5d3f1c9aaf8215ac42e92ba9a5a02574d6890d07464cb2f338b043b1c4ffe98efe069ee + + + <_InternalsVisibleToAttribute Include="System.Runtime.CompilerServices.InternalsVisibleToAttribute"> + <_Parameter1 Condition="'%(InternalsVisibleTo.Key)' != ''">%(InternalsVisibleTo.Identity), PublicKey=%(InternalsVisibleTo.Key) + <_Parameter1 Condition="'%(InternalsVisibleTo.Key)' == ''">%(InternalsVisibleTo.Identity), PublicKey=$(_PublicKey) + + + + + + + + + + + + + diff --git a/build/targets/GitHash.props b/build/targets/GitHash.props new file mode 100644 index 00000000000..30f2d03b915 --- /dev/null +++ b/build/targets/GitHash.props @@ -0,0 +1,51 @@ + + + + + + + + + + $(MSBuildThisFileDirectory)..\..\ + + + + + + $(BUILD_SOURCEVERSION) + + + + + + $(GIT_COMMIT) + + + + + + <developer build> + + + + + + + <_DotGitDir>$(RepoRoot).git + <_HeadFileContent Condition="Exists('$(_DotGitDir)/HEAD')">$([System.IO.File]::ReadAllText('$(_DotGitDir)/HEAD').Trim()) + <_RefPath Condition="$(_HeadFileContent.StartsWith('ref: '))">$(_DotGitDir)/$(_HeadFileContent.Substring(5)) + $([System.IO.File]::ReadAllText('$(_RefPath)').Trim()) + $(_HeadFileContent) + + + + + diff --git a/build/targets/PackageVersions.props b/build/targets/PackageVersions.props new file mode 100644 index 00000000000..2f68181bd5f --- /dev/null +++ b/build/targets/PackageVersions.props @@ -0,0 +1,91 @@ + + + + + + $([System.IO.File]::ReadAllText('$(MSBuildThisFileDirectory)..\..\RoslynPackageVersion.txt').Trim()) + + + 1.5.0 + 4.3.0 + 1.5.0 + 1.6.0 + 4.3.0 + + + $(RoslynPackageVersion) + $(RoslynPackageVersion) + $(RoslynPackageVersion) + $(RoslynPackageVersion) + $(RoslynPackageVersion) + + + 15.8.166 + $(MicrosoftBuildOverallPackagesVersion) + $(MicrosoftBuildOverallPackagesVersion) + $(MicrosoftBuildOverallPackagesVersion) + $(MicrosoftBuildOverallPackagesVersion) + 1.0.1 + + + 8.0.1 + 14.0.25420 + 15.6.27740 + 15.0.26201-alpha + 1.1.4322 + 15.0.26201 + 15.0.26201 + 15.6.27740 + 15.6.27740 + 15.6.27740 + 8.0.50727 + 7.10.6071 + 15.0.26201 + 8.0.50727 + 2.3.6152103 + 14.3.25407 + 15.0.26201 + 15.0.26201 + 15.0.26201 + 10.0.30319 + 11.0.50727 + 15.0.25123-Dev15Preview + 7.10.6072 + 8.0.50727 + 9.0.30729 + 10.0.30319 + 11.0.61030 + 12.0.30110 + 15.6.27740 + 7.10.6071 + 8.0.50727 + 10.0.30319 + 12.0.30112 + 15.6.27740 + 15.6.27740 + 15.3.23 + 15.0.26201 + 15.3.15 + 9.0.30729 + 15.6.170 + 12.0.4 + 7.0.4 + 8.0.4 + 11.0.4 + 7.0.4 + + + 1.0.30 + 1.1.0-roslyn-62714-01 + 8.0.0-alpha + 1.0.0 + 9.0.1 + 3.5.0 + 0.2.0-beta-000081 + + + + + + + diff --git a/code b/code deleted file mode 100644 index a22238d717d..00000000000 --- a/code +++ /dev/null @@ -1,46 +0,0 @@ -# Contributor Covenant Code of Conduct - -## Our Pledge - -In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. - -## Our Standards - -Examples of behavior that contributes to creating a positive environment include: - -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members - -Examples of unacceptable behavior by participants include: - -* The use of sexualized language or imagery and unwelcome sexual attention or advances -* Trolling, insulting/derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or electronic address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a professional setting - -## Our Responsibilities - -Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. - -Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. - -## Scope - -This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at opensource@microsoft.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. - -Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] - -[homepage]: http://contributor-covenant.org -[version]: http://contributor-covenant.org/version/1/4/ diff --git a/configure.ac b/configure.ac deleted file mode 100644 index ec3df2198f6..00000000000 --- a/configure.ac +++ /dev/null @@ -1,76 +0,0 @@ -# -*- Autoconf -*- -# Process this file with autoconf to produce a configure script. - -AC_PREREQ([2.61]) -AC_INIT([fsharp], [4.0], [https://github.com/fsharp/fsharp/issues]) - -# Checks for programs. -AC_PROG_MAKE_SET - -AC_PATH_PROG(PKG_CONFIG, pkg-config, no) - -# pkg-config precedence: 1) our prefix 2) the system Mono location 3) the PATH -prefix_pkg_config="$prefix"/bin/pkg-config -osx_pkg_config=/Library/Frameworks/Mono.framework/Versions/Current/bin/pkg-config - -if test -e $prefix_pkg_config; then - PKG_CONFIG=$prefix_pkg_config -elif test -e $osx_pkg_config; then - PKG_CONFIG=$osx_pkg_config -elif test "x$PKG_CONFIG" = "xno"; then - AC_MSG_ERROR([You need to install pkg-config]) -fi - -AC_MSG_NOTICE("pkg-config: $PKG_CONFIG") -AC_MSG_NOTICE("PKG_CONFIG_LIBDIR: $PKG_CONFIG_LIBDIR") - -MONO_REQUIRED_VERSION=4.0 -MONO_RECOMMENDED_VERSION=4.2 -MONO_RECOMMENDED_REASON="as it is newer and already considered a stable version" - -if ! $PKG_CONFIG --atleast-version=$MONO_REQUIRED_VERSION mono; then - AC_MSG_ERROR("You need mono $MONO_REQUIRED_VERSION") -fi - -if ! $PKG_CONFIG --atleast-version=$MONO_RECOMMENDED_VERSION mono; then - AC_MSG_WARN([Mono $MONO_RECOMMENDED_VERSION or higher is recommended, $MONO_RECOMMENDED_REASON]) -fi - -AC_ARG_WITH([gacdir], - [ --with-gacdir=/path/to/gac Specify the gac directory (ex: /usr/lib/mono/gac)], - [], - [with_gacdir=no] - ) - -MONOPREFIX=$(cd `$PKG_CONFIG --variable=prefix mono` && pwd) -MONOBINDIR="$MONOPREFIX"/bin -MONOLIBDIR="$MONOPREFIX"/lib - -AC_PATH_PROG(MSBUILD, msbuild, no) -msbuild_from_pkg_config="$MONOBINDIR"/msbuild -if test -e $msbuild_from_pkg_config; then - MSBUILD=$msbuild_from_pkg_config -elif test "x$MSBUILD" == "xno"; then - AC_MSG_ERROR([Could not find msbuild]) -fi -AC_MSG_NOTICE(msbuild: $MSBUILD) - -AC_SUBST(MONOBINDIR) -AC_SUBST(MONOLIBDIR) - -AC_CONFIG_FILES([ -mono/launcher -mono/config.make -]) -AC_OUTPUT - -CONFIGURE_FILE=autogen.sh -if ! test -e $CONFIGURE_FILE; then - CONFIGURE_FILE=configure -fi -CONFIGURE_COMMAND="`dirname $0`/$CONFIGURE_FILE" - -if ! test "x$MONOPREFIX" = "x$prefix"; then - AC_WARN([Prefix to use is not the same as mono's: $prefix - Consider using: $CONFIGURE_COMMAND --prefix=$MONOPREFIX]) -fi diff --git a/fcs/.gitignore b/fcs/.gitignore new file mode 100644 index 00000000000..51023f1bf50 --- /dev/null +++ b/fcs/.gitignore @@ -0,0 +1,11 @@ +FSharp.Compiler.Service.Tests/TestResults/* +FSharp.Compiler.Service.netstandard/illex.fs +FSharp.Compiler.Service.netstandard/ilpars.fs +FSharp.Compiler.Service.netstandard/ilpars.fsi +FSharp.Compiler.Service.netstandard/lex.fs +FSharp.Compiler.Service.netstandard/pars.fs +FSharp.Compiler.Service.netstandard/pars.fsi +FSharp.Compiler.Service.netstandard/pplex.fs +FSharp.Compiler.Service.netstandard/pppars.fs +FSharp.Compiler.Service.netstandard/pppars.fsi + diff --git a/fcs/.paket/paket.exe b/fcs/.paket/paket.exe index ef3ea32af2a..b98e000b232 100644 Binary files a/fcs/.paket/paket.exe and b/fcs/.paket/paket.exe differ diff --git a/fcs/FSharp.Compiler.Service.MSBuild.v12/FSharp.Compiler.Service.MSBuild.v12.fsproj b/fcs/FSharp.Compiler.Service.MSBuild.v12/FSharp.Compiler.Service.MSBuild.v12.fsproj index f66cda2f775..8128ab15731 100644 --- a/fcs/FSharp.Compiler.Service.MSBuild.v12/FSharp.Compiler.Service.MSBuild.v12.fsproj +++ b/fcs/FSharp.Compiler.Service.MSBuild.v12/FSharp.Compiler.Service.MSBuild.v12.fsproj @@ -1,47 +1,25 @@ - - - + $(MSBuildProjectDirectory)\..\..\src + - Debug - AnyCPU - $(MSBuildProjectDirectory)\..\..\..\ - Library - FSharp.Compiler.Service.MSBuild.v12 - $(NoWarn);44;62;9 - {8157b50e-397d-4232-a4e0-1977afc7076d} - true - 0x06800000 - true - true - $(OtherFlags) --times - $(NoWarn);69;65;54;61;75 - true - ..\..\$(Configuration)\fcs\net45\ - - false - true - AnyCPU + net45 + true + ..\..\$(Configuration.ToLower())\fcs $(DefineConstants);CROSS_PLATFORM_COMPILER $(DefineConstants);ENABLE_MONO_SUPPORT - $(OtherFlags) /warnon:1182 - $(OtherFlags) --version:$(VersionPrefix).0 - - v4.5 - - - DEBUG; $(DefineConstants) - false - $(OtherFlags) --no-jit-optimize --jit-tracking - - - true + + Additional DLL for legacy compat for the F# compiler service. + Additional DLL for legacy compat for the F# compiler service. + false + Microsoft Corporation; F# community contributors + https://github.com/fsharp/FSharp.Compiler.Service/blob/master/LICENSE + https://github.com/fsharp/FSharp.Compiler.Service + https://raw.github.com/fsharp/FSharp.Compiler.Service/master/misc/logo.png + F#, compiler, msbuild @@ -49,35 +27,33 @@ - - - - - - + + + + - $(FSharpSourcesRoot)/../fcs/dependencies/MSBuild.v12.0/Microsoft.Build.Framework.dll + $(FSharpSourcesRoot)\..\fcs\dependencies\MSBuild.v12.0\Microsoft.Build.Framework.dll false - $(FSharpSourcesRoot)/../fcs/dependencies/MSBuild.v12.0/Microsoft.Build.Engine.dll + $(FSharpSourcesRoot)\..\fcs\dependencies\MSBuild.v12.0\Microsoft.Build.Engine.dll false - $(FSharpSourcesRoot)/../fcs/dependencies/MSBuild.v12.0/Microsoft.Build.dll + $(FSharpSourcesRoot)\..\fcs\dependencies\MSBuild.v12.0\Microsoft.Build.dll false - $(FSharpSourcesRoot)/../fcs/dependencies/MSBuild.v12.0/Microsoft.Build.Utilities.v12.0.dll + $(FSharpSourcesRoot)\..\fcs\dependencies\MSBuild.v12.0\Microsoft.Build.Utilities.v12.0.dll false - $(FSharpSourcesRoot)/../fcs/dependencies/MSBuild.v12.0/Microsoft.Build.Tasks.v12.0.dll + $(FSharpSourcesRoot)\..\fcs\dependencies\MSBuild.v12.0\Microsoft.Build.Tasks.v12.0.dll false - $(FSharpSourcesRoot)\..\packages\Microsoft.Portable.FSharp.Core.4.1.20\lib\profiles\net40\FSharp.Core.dll + $(FSharpSourcesRoot)\..\packages\Microsoft.Portable.FSharp.Core.$(FSharpCoreFrozenPortablePackageVersion)\lib\profiles\net40\FSharp.Core.dll false @@ -87,6 +63,6 @@ {2e4d67b4-522d-4cf7-97e4-ba940f0b18f3} True + - - + \ No newline at end of file diff --git a/fcs/FSharp.Compiler.Service.ProjectCracker/FSharp.Compiler.Service.ProjectCracker.fsproj b/fcs/FSharp.Compiler.Service.ProjectCracker/FSharp.Compiler.Service.ProjectCracker.fsproj index b75f912c983..86296dcea04 100644 --- a/fcs/FSharp.Compiler.Service.ProjectCracker/FSharp.Compiler.Service.ProjectCracker.fsproj +++ b/fcs/FSharp.Compiler.Service.ProjectCracker/FSharp.Compiler.Service.ProjectCracker.fsproj @@ -1,67 +1,37 @@ - - + $(MSBuildProjectDirectory)\..\..\src + - Debug - AnyCPU - $(MSBuildProjectDirectory)\..\..\..\ - 2.0 - 893c3cd9-5af8-4027-a667-21e62fc2c703 - FSharp.Compiler.Service.ProjectCracker - FSharp.Compiler.Service.ProjectCracker - FSharp.Compiler.Service.ProjectCracker - Library - ..\..\$(Configuration)\fcs\net45\ - $(OutputPath)$(AssemblyName).xml - false - - v4.5 - true - AnyCPU - 3 - $(OtherFlags) --version:$(VersionPrefix).0 + net45 + true + ..\..\$(Configuration.ToLower())\fcs - - true - full - false - false - DEBUG;TRACE - - - pdbonly - true - true - TRACE + + Legacy project file cracker for the F# compiler service. + Legacy project file cracker for the F# compiler service. + false + Microsoft Corporation; F# community contributors + https://github.com/fsharp/FSharp.Compiler.Service/blob/master/LICENSE + https://github.com/fsharp/FSharp.Compiler.Service + https://raw.github.com/fsharp/FSharp.Compiler.Service/master/misc/logo.png + F#, compiler, msbuild - - - - - - - - - - $(FSharpSourcesRoot)\..\packages\Microsoft.Portable.FSharp.Core.4.1.20\lib\profiles\net40\FSharp.Core.dll - false - - ProjectCrackerOptions.fs + + + - - FSharp.Compiler.Service - {2e4d67b4-522d-4cf7-97e4-ba940f0b18f3} - True - + + + + - \ No newline at end of file diff --git a/fcs/FSharp.Compiler.Service.ProjectCracker/ProjectCracker.fs b/fcs/FSharp.Compiler.Service.ProjectCracker/ProjectCracker.fs index 7a36085de06..72e34499678 100644 --- a/fcs/FSharp.Compiler.Service.ProjectCracker/ProjectCracker.fs +++ b/fcs/FSharp.Compiler.Service.ProjectCracker/ProjectCracker.fs @@ -38,6 +38,7 @@ module Utils = logMap := Map.add opts.ProjectFile opts.LogOutput !logMap { ProjectFileName = opts.ProjectFile + ProjectId = None SourceFiles = sourceFiles OtherOptions = otherOptions ReferencedProjects = referencedProjects() diff --git a/fcs/FSharp.Compiler.Service.ProjectCrackerTool/FSharp.Compiler.Service.ProjectCrackerTool.fsproj b/fcs/FSharp.Compiler.Service.ProjectCrackerTool/FSharp.Compiler.Service.ProjectCrackerTool.fsproj index 66d196a1d54..d7f29459dee 100644 --- a/fcs/FSharp.Compiler.Service.ProjectCrackerTool/FSharp.Compiler.Service.ProjectCrackerTool.fsproj +++ b/fcs/FSharp.Compiler.Service.ProjectCrackerTool/FSharp.Compiler.Service.ProjectCrackerTool.fsproj @@ -1,44 +1,19 @@ - - + $(MSBuildProjectDirectory)\..\..\src + - Debug - AnyCPU - $(MSBuildProjectDirectory)\..\..\..\ - 2.0 - b1bdd96d-47e1-4e65-8107-fbae23a06db4 Exe - ..\..\$(Configuration)\fcs\net45\ - $(OutputPath)$(AssemblyName).xml - FSharp.Compiler.Service.ProjectCrackerTool - FSharp.Compiler.Service.ProjectCrackerTool - FSharp.Compiler.Service.ProjectCrackerTool + net45 + true + $(DefineConstants);CROSS_PLATFORM_COMPILER + $(DefineConstants);ENABLE_MONO_SUPPORT $(OtherFlags) --staticlink:FSharp.Core - $(NoWarn);40;44;2011 true - false - - v4.5 - 3 - AnyCPU - true - $(OtherFlags) --version:$(VersionPrefix).0 - - - true - full - false - false - DEBUG;TRACE - - - pdbonly - true - true - TRACE + false + ..\..\$(Configuration.ToLower())\fcs @@ -47,84 +22,32 @@ - - - - - - - - - - + + - $(FSharpSourcesRoot)\..\packages\Microsoft.Portable.FSharp.Core.4.1.20\lib\profiles\net40\FSharp.Core.dll + $(FSharpSourcesRoot)\..\packages\Microsoft.Portable.FSharp.Core.$(FSharpCoreFrozenPortablePackageVersion)\lib\profiles\net40\FSharp.Core.dll + false + + + + $(FSharpSourcesRoot)\..\fcs\dependencies\MSBuild.v12.0\Microsoft.Build.Framework.dll + false + + + $(FSharpSourcesRoot)\..\fcs\dependencies\MSBuild.v12.0\Microsoft.Build.Engine.dll + false + + + $(FSharpSourcesRoot)\..\fcs\dependencies\MSBuild.v12.0\Microsoft.Build.dll + false + + + $(FSharpSourcesRoot)\..\fcs\dependencies\MSBuild.v12.0\Microsoft.Build.Utilities.v12.0.dll + false + + + $(FSharpSourcesRoot)\..\fcs\dependencies\MSBuild.v12.0\Microsoft.Build.Tasks.v12.0.dll false - - - - - - ..\packages\Microsoft.Build\lib\net45\Microsoft.Build.dll - True - True - - - - - - - - - ..\packages\Microsoft.Build.Engine\lib\net45\Microsoft.Build.Engine.dll - True - True - - - - - - - - - ..\packages\Microsoft.Build.Framework\lib\net45\Microsoft.Build.Framework.dll - True - True - - - - - - - - - ..\packages\Microsoft.Build.Utilities.Core\lib\net45\Microsoft.Build.Utilities.Core.dll - True - True - - - - - - - - - True - - - - - - - - - ..\packages\System.Threading.Tasks.Dataflow\lib\portable-net45+win8+wpa81\System.Threading.Tasks.Dataflow.dll - True - True - - - - - \ No newline at end of file + diff --git a/fcs/FSharp.Compiler.Service.ProjectCrackerTool/Program.fs b/fcs/FSharp.Compiler.Service.ProjectCrackerTool/Program.fs index 7ce360c312f..e3de75d0d1b 100644 --- a/fcs/FSharp.Compiler.Service.ProjectCrackerTool/Program.fs +++ b/fcs/FSharp.Compiler.Service.ProjectCrackerTool/Program.fs @@ -6,12 +6,12 @@ open System.Runtime.Serialization.Json module Program = -#if !DOTNETCORE +#if !NETCOREAPP2_0 let addMSBuildv14BackupResolution () = let onResolveEvent = new ResolveEventHandler(fun sender evArgs -> let requestedAssembly = AssemblyName(evArgs.Name) - if requestedAssembly.Name.StartsWith("Microsoft.Build") && - not (requestedAssembly.Name.EndsWith(".resources")) && + if requestedAssembly.Name.StartsWith("Microsoft.Build", StringComparison.Ordinal) && + not (requestedAssembly.Name.EndsWith(".resources", StringComparison.Ordinal)) && not (requestedAssembly.Version.ToString().Contains("12.0.0.0")) then // If the version of MSBuild that we're using wasn't present on the machine, then @@ -40,7 +40,7 @@ module Program = let asText = Array.exists (fun (s: string) -> s = "--text") argv let argv = Array.filter (fun (s: string) -> s <> "--text") argv -#if !DOTNETCORE +#if !NETCOREAPP2_0 addMSBuildv14BackupResolution () #endif crackAndSendOutput asText argv diff --git a/fcs/FSharp.Compiler.Service.ProjectCrackerTool/ProjectCrackerTool.fs b/fcs/FSharp.Compiler.Service.ProjectCrackerTool/ProjectCrackerTool.fs index a20c7a33c0e..daa5c3c9e05 100644 --- a/fcs/FSharp.Compiler.Service.ProjectCrackerTool/ProjectCrackerTool.fs +++ b/fcs/FSharp.Compiler.Service.ProjectCrackerTool/ProjectCrackerTool.fs @@ -11,7 +11,7 @@ module internal ProjectCrackerTool = open Microsoft.Build.Evaluation let runningOnMono = -#if DOTNETCORE +#if NETCOREAPP2_0 false #else try match System.Type.GetType("Mono.Runtime") with null -> false | _ -> true @@ -128,7 +128,7 @@ module internal ProjectCrackerTool = outFileOpt, directory, getItems, references, projectReferences, getprop project, project.FullPath -#if !DOTNETCORE +#if !NETCOREAPP2_0 let CrackProjectUsingOldBuildAPI (fsprojFile:string) properties logOpt = let engine = new Microsoft.Build.BuildEngine.Engine() Option.iter (fun l -> engine.RegisterLogger(l)) logOpt @@ -201,7 +201,7 @@ module internal ProjectCrackerTool = let outFileOpt, directory, getItems, references, projectReferences, getProp, fsprojFullPath = try -#if DOTNETCORE +#if NETCOREAPP2_0 CrackProjectUsingNewBuildAPI fsprojFileName properties logOpt with #else diff --git a/fcs/FSharp.Compiler.Service.ProjectCrackerTool/paket.references b/fcs/FSharp.Compiler.Service.ProjectCrackerTool/paket.references deleted file mode 100644 index 3ad1f9662c7..00000000000 --- a/fcs/FSharp.Compiler.Service.ProjectCrackerTool/paket.references +++ /dev/null @@ -1,4 +0,0 @@ -Microsoft.Build.Utilities.Core -Microsoft.Build.Engine -Microsoft.Build -System.Threading.Tasks.Dataflow \ No newline at end of file diff --git a/fcs/FSharp.Compiler.Service.Tests.netcore/FSharp.Compiler.Service.Tests.netcore.fsproj b/fcs/FSharp.Compiler.Service.Tests.netcore/FSharp.Compiler.Service.Tests.netcore.fsproj deleted file mode 100644 index 71f5341bb71..00000000000 --- a/fcs/FSharp.Compiler.Service.Tests.netcore/FSharp.Compiler.Service.Tests.netcore.fsproj +++ /dev/null @@ -1,60 +0,0 @@ - - - netcoreapp1.0 - $(DefineConstants);DOTNETCORE;FX_ATLEAST_45;FX_ATLEAST_PORTABLE;FX_NO_RUNTIMEENVIRONMENT;FX_RESHAPED_REFLECTION;TODO_REWORK_ASSEMBLY_LOAD; - $(NoWarn);44; - true - true - true - false - - - - ReshapedReflection.fs - - - FsUnit.fs - - - Common.fs - - - EditorTests.fs - - - ExprTests.fs - - - TokenizerTests.fs - - - PerfTests.fs - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/fcs/FSharp.Compiler.Service.Tests/App.config b/fcs/FSharp.Compiler.Service.Tests/App.config index 1e7989fe8cf..fb0bc6286b1 100644 --- a/fcs/FSharp.Compiler.Service.Tests/App.config +++ b/fcs/FSharp.Compiler.Service.Tests/App.config @@ -4,12 +4,8 @@ - - - - - - + + diff --git a/fcs/FSharp.Compiler.Service.Tests/CSharp_Analysis/CSharp_Analysis.csproj b/fcs/FSharp.Compiler.Service.Tests/CSharp_Analysis/CSharp_Analysis.csproj new file mode 100644 index 00000000000..49585864e4d --- /dev/null +++ b/fcs/FSharp.Compiler.Service.Tests/CSharp_Analysis/CSharp_Analysis.csproj @@ -0,0 +1,10 @@ + + + + net45;netstandard2.0 + false + + + + + \ No newline at end of file diff --git a/fcs/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj b/fcs/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj index e83bc805c00..8d09c3a26f1 100644 --- a/fcs/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj +++ b/fcs/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj @@ -1,51 +1,41 @@ - - + $(MSBuildProjectDirectory)\..\..\src + - Debug - AnyCPU - $(MSBuildProjectDirectory)\..\..\..\ - 2.0 - EE85AAB7-CDA0-4C4E-BDA0-A64DDDD13E3F - Library - FSharp - FSharp.Compiler.Service.Tests - FSharp.Compiler.Service.Tests - LIBRARY - 58;75 - v4.6 - false - ..\..\$(Configuration)\fcs\net45\ - true - 3 - true + net46;netcoreapp2.0 + true + $(NoWarn);44;75; + true + true + false + true - - true - full - false - AnyCPU - true - - - pdbonly - true - AnyCPU - true + + $(DefineConstants);FX_NO_RUNTIMEENVIRONMENT + $(DefineConstants);NO_PROJECTCRACKER + + ReshapedReflection.fs + FsUnit.fs Common.fs + + AssemblyReaderShim.fs + EditorTests.fs + + Symbols.fs + FileSystemTests.fs @@ -73,19 +63,26 @@ StructureTests.fs - - FSharp.Core.optdata - PreserveNewest - - - FSharp.Core.sigdata - PreserveNewest - + + TokenizerTests.fs + + + Program.fs + - + + + + + + + + + + @@ -98,98 +95,7 @@ + + - - - $(FSharpSourcesRoot)\..\packages\System.Collections.Immutable.$(SystemCollectionsImmutableVersion)\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll - True - - - True - ..\..\packages\NUnit.3.5.0\lib\net45\nunit.framework.dll - - - - $(FSharpSourcesRoot)\..\packages\FSharp.Compiler.Tools.4.1.27\tools\FSharp.Core.dll - true - - - CSharp_Analysis - {887630A3-4B1D-40EA-B8B3-2D842E9C40DB} - True - - - {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3} - FSharp.Compiler.Service - True - - - FSharp.Compiler.Service.ProjectCracker - {893c3cd9-5af8-4027-a667-21e62fc2c703} - True - - - - - - - - ..\packages\Microsoft.Build\lib\net45\Microsoft.Build.dll - True - True - - - - - - - - - ..\packages\Microsoft.Build.Engine\lib\net45\Microsoft.Build.Engine.dll - True - True - - - - - - - - - ..\packages\Microsoft.Build.Framework\lib\net45\Microsoft.Build.Framework.dll - True - True - - - - - - - - - ..\packages\Microsoft.Build.Utilities.Core\lib\net45\Microsoft.Build.Utilities.Core.dll - True - True - - - - - - - - - True - - - - - - - - - True - - - - \ No newline at end of file diff --git a/fcs/FSharp.Compiler.Service.Tests/paket.references b/fcs/FSharp.Compiler.Service.Tests/paket.references deleted file mode 100644 index c64e284f16b..00000000000 --- a/fcs/FSharp.Compiler.Service.Tests/paket.references +++ /dev/null @@ -1,3 +0,0 @@ -Microsoft.Build.Utilities.Core -Microsoft.Build.Engine -Microsoft.Build \ No newline at end of file diff --git a/fcs/FSharp.Compiler.Service.netstandard.sln b/fcs/FSharp.Compiler.Service.netstandard.sln deleted file mode 100644 index 5cb21d46635..00000000000 --- a/fcs/FSharp.Compiler.Service.netstandard.sln +++ /dev/null @@ -1,50 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.26730.8 -MinimumVisualStudioVersion = 15.0.26124.0 -Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Compiler.Service.netstandard", "FSharp.Compiler.Service.netstandard\FSharp.Compiler.Service.netstandard.fsproj", "{36B9F520-14B1-4431-AAF2-75433B87D851}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FSharp.Compiler.Service.Tests.netcore", "FSharp.Compiler.Service.Tests.netcore\FSharp.Compiler.Service.Tests.netcore.fsproj", "{1004CE3D-0CCB-47F5-8DBF-657D1B9C19D7}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 - Release|Any CPU = Release|Any CPU - Release|x64 = Release|x64 - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {36B9F520-14B1-4431-AAF2-75433B87D851}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {36B9F520-14B1-4431-AAF2-75433B87D851}.Debug|Any CPU.Build.0 = Debug|Any CPU - {36B9F520-14B1-4431-AAF2-75433B87D851}.Debug|x64.ActiveCfg = Debug|x64 - {36B9F520-14B1-4431-AAF2-75433B87D851}.Debug|x64.Build.0 = Debug|x64 - {36B9F520-14B1-4431-AAF2-75433B87D851}.Debug|x86.ActiveCfg = Debug|x86 - {36B9F520-14B1-4431-AAF2-75433B87D851}.Debug|x86.Build.0 = Debug|x86 - {36B9F520-14B1-4431-AAF2-75433B87D851}.Release|Any CPU.ActiveCfg = Release|Any CPU - {36B9F520-14B1-4431-AAF2-75433B87D851}.Release|Any CPU.Build.0 = Release|Any CPU - {36B9F520-14B1-4431-AAF2-75433B87D851}.Release|x64.ActiveCfg = Release|x64 - {36B9F520-14B1-4431-AAF2-75433B87D851}.Release|x64.Build.0 = Release|x64 - {36B9F520-14B1-4431-AAF2-75433B87D851}.Release|x86.ActiveCfg = Release|x86 - {36B9F520-14B1-4431-AAF2-75433B87D851}.Release|x86.Build.0 = Release|x86 - {1004CE3D-0CCB-47F5-8DBF-657D1B9C19D7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1004CE3D-0CCB-47F5-8DBF-657D1B9C19D7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1004CE3D-0CCB-47F5-8DBF-657D1B9C19D7}.Debug|x64.ActiveCfg = Debug|x64 - {1004CE3D-0CCB-47F5-8DBF-657D1B9C19D7}.Debug|x64.Build.0 = Debug|x64 - {1004CE3D-0CCB-47F5-8DBF-657D1B9C19D7}.Debug|x86.ActiveCfg = Debug|x86 - {1004CE3D-0CCB-47F5-8DBF-657D1B9C19D7}.Debug|x86.Build.0 = Debug|x86 - {1004CE3D-0CCB-47F5-8DBF-657D1B9C19D7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1004CE3D-0CCB-47F5-8DBF-657D1B9C19D7}.Release|Any CPU.Build.0 = Release|Any CPU - {1004CE3D-0CCB-47F5-8DBF-657D1B9C19D7}.Release|x64.ActiveCfg = Release|x64 - {1004CE3D-0CCB-47F5-8DBF-657D1B9C19D7}.Release|x64.Build.0 = Release|x64 - {1004CE3D-0CCB-47F5-8DBF-657D1B9C19D7}.Release|x86.ActiveCfg = Release|x86 - {1004CE3D-0CCB-47F5-8DBF-657D1B9C19D7}.Release|x86.Build.0 = Release|x86 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {DEDB1900-EFFF-4691-89B1-6DBEE6B77491} - EndGlobalSection -EndGlobal diff --git a/fcs/FSharp.Compiler.Service.netstandard/FSharp.Compiler.Service.netstandard.fsproj b/fcs/FSharp.Compiler.Service.netstandard/FSharp.Compiler.Service.netstandard.fsproj deleted file mode 100644 index 0ebd29eea3d..00000000000 --- a/fcs/FSharp.Compiler.Service.netstandard/FSharp.Compiler.Service.netstandard.fsproj +++ /dev/null @@ -1,668 +0,0 @@ - - - $(MSBuildProjectDirectory)\..\..\src - - - - netstandard1.6 - FSharp.Compiler.Service - $(DefineConstants);BUILDING_WITH_LKG - $(DefineConstants);COMPILER_PUBLIC_API - $(DefineConstants);COMPILER_SERVICE_AS_DLL - $(DefineConstants);COMPILER - $(DefineConstants);COMPILER_SERVICE - $(DefineConstants);COMPILER_SERVICE_ASSUMES_FSHARP_CORE_4_4_0_0 - $(DefineConstants);EXTENSIBLE_DUMPER - $(DefineConstants);NO_EXTENSIONTYPING - $(DefineConstants);FSHARP_CORE_4_5 - $(DefineConstants);FX_PORTABLE_OR_NETSTANDARD - $(DefineConstants);FX_ATLEAST_PORTABLE - $(DefineConstants);NETSTANDARD1_6 - $(DefineConstants);PREFERRED_UI_LANG - $(DefineConstants);FX_EVENTWAITHANDLE_NO_IDISPOSABLE - $(DefineConstants);FX_NO_APP_DOMAINS - $(DefineConstants);FX_NO_ARRAY_LONG_LENGTH - $(DefineConstants);FX_NO_BEGINEND_READWRITE - $(DefineConstants);FX_NO_BINARY_SERIALIZATION - $(DefineConstants);FX_NO_CONVERTER - $(DefineConstants);FX_NO_CORHOST_SIGNER - $(DefineConstants);FX_NO_CUSTOMATTRIBUTEDATA - $(DefineConstants);FX_NO_DEFAULT_DEPENDENCY_TYPE - $(DefineConstants);FX_NO_EXIT_CONTEXT_FLAGS - $(DefineConstants);FX_NO_HEAPTERMINATION - $(DefineConstants);FX_NO_LINKEDRESOURCES - $(DefineConstants);FX_NO_PARAMETERIZED_THREAD_START - $(DefineConstants);FX_NO_PDB_READER - $(DefineConstants);FX_NO_PDB_WRITER - $(DefineConstants);FX_NO_REFLECTION_MODULE_HANDLES - $(DefineConstants);FX_NO_RUNTIMEENVIRONMENT - $(DefineConstants);FX_NO_SECURITY_PERMISSIONS - $(DefineConstants);FX_NO_SERVERCODEPAGES - $(DefineConstants);FX_NO_SYMBOLSTORE - $(DefineConstants);FX_NO_SYSTEM_CONFIGURATION - $(DefineConstants);FX_NO_THREAD - $(DefineConstants);FX_NO_THREADABORT - $(DefineConstants);FX_NO_WAITONE_MILLISECONDS - $(DefineConstants);FX_NO_WEB_CLIENT - $(DefineConstants);FX_NO_WINFORMS - $(DefineConstants);FX_NO_WIN_REGISTRY - $(DefineConstants);FX_NO_INDENTED_TEXT_WRITER - $(DefineConstants);FX_REDUCED_CONSOLE - $(DefineConstants);FX_REDUCED_EXCEPTIONS - $(DefineConstants);FX_RESHAPED_CONSOLE - $(DefineConstants);FX_RESHAPED_GLOBALIZATION - $(DefineConstants);FX_RESHAPED_REFEMIT - $(DefineConstants);FX_RESHAPED_REFLECTION - $(DefineConstants);FX_RESHAPED_REFLECTION_CORECLR - $(DefineConstants);FSI_TODO_NETCORE - $(DefineConstants);INCLUDE_METADATA_READER - $(DefineConstants);INCLUDE_METADATA_WRITER - $(DefineConstants);NO_DEBUG_LOG - $(DefineConstants);NO_INLINE_IL_PARSER - $(DefineConstants);NO_LOADER_OPTIMIZATION - $(DefineConstants);NO_LOGGING_GUI - $(DefineConstants);FX_RESHAPED_MSBUILD - $(DefineConstants);SIGNED - $(DefineConstants);TODO_REWORK_ASSEMBLY_LOAD - $(DefineConstants);TODO_REWORK_SERVER - $(NoWarn);44;69;65;54;61;75;62;9;2003; - true - true - true - - - - AssemblyInfo/assemblyinfo.FSharp.Compiler.Service.dll.fs - - - FSComp.txt - - - FSIstrings.txt - - - FSStrings.resx - - - --module Microsoft.FSharp.Compiler.AbstractIL.Internal.AsciiParser --open Microsoft.FSharp.Compiler.AbstractIL --internal --lexlib Internal.Utilities.Text.Lexing --parslib Internal.Utilities.Text.Parsing - ilpars.fsy - - - --module Microsoft.FSharp.Compiler.Parser --open Microsoft.FSharp.Compiler --internal --lexlib Internal.Utilities.Text.Lexing --parslib Internal.Utilities.Text.Parsing - pars.fsy - - - Reshaped/reshapedreflection.fs - - - ErrorText/sformat.fsi - - - ErrorText/sformat.fs - - - ErrorText/sr.fsi - - - ErrorText/sr.fs - - - LexYaccRuntime/prim-lexing.fsi - - - LexYaccRuntime/prim-lexing.fs - - - LexYaccRuntime/prim-parsing.fsi - - - LexYaccRuntime/prim-parsing.fs - - - Utilities/ResizeArray.fsi - - - Utilities/ResizeArray.fs - - - Utilities/HashMultiMap.fsi - - - Utilities/HashMultiMap.fs - - - Utilities/EditDistance.fs - - - Utilities/TaggedCollections.fsi - - - Utilities/TaggedCollections.fs - - - Utilities/QueueList.fs - - - Utilities/ildiag.fsi - - - Utilities/ildiag.fs - - - Utilities/illib.fs - - - Utilities/filename.fsi - - - Utilities/filename.fs - - - Utilities/zmap.fsi - - - Utilities/zmap.fs - - - Utilities/zset.fsi - - - Utilities/zset.fs - - - Utilities/bytes.fsi - - - Utilities/bytes.fs - - - Utilities/lib.fs - - - Utilities/InternalCollections.fsi - - - Utilities/InternalCollections.fs - - - Utilities/rational.fsi - - - Utilities/rational.fs - - - ErrorLogging/range.fsi - - - ErrorLogging/range.fs - - - ErrorLogging/ErrorLogger.fs - - - ErrorLogging/ErrorResolutionHints.fs - - - ReferenceResolution/ReferenceResolver.fs - - - AbsIL/il.fsi - - - AbsIL/il.fs - - - AbsIL/ilx.fsi - - - AbsIL/ilx.fs - - - AbsIL/ilascii.fsi - - - AbsIL/ilascii.fs - - - AbsIL/ilprint.fsi - - - AbsIL/ilprint.fs - - - AbsIL/ilmorph.fsi - - - AbsIL/ilmorph.fs - - - AbsIL/ilsign.fs - - - AbsIL/ilsupp.fsi - - - AbsIL/ilsupp.fs - - - AbsIL/ilpars.fs - - - AbsIL/illex.fs - - - AbsIL/ilbinary.fsi - - - AbsIL/ilbinary.fs - - - AbsIL/ilread.fsi - - - AbsIL/ilread.fs - - - AbsIL/ilwritepdb.fsi - - - AbsIL/ilwritepdb.fs - - - AbsIL/ilwrite.fsi - - - AbsIL/ilwrite.fs - - - AbsIL/ilreflect.fs - - - CompilerLocation/CompilerLocationUtils.fs - - - PrettyNaming/PrettyNaming.fs - - - ILXErase/ilxsettings.fs - - - ILXErase/EraseClosures.fsi - - - ILXErase/EraseClosures.fs - - - ILXErase/EraseUnions.fsi - - - ILXErase/EraseUnions.fs - - - --unicode --lexlib Internal.Utilities.Text.Lexing - AbsIL/illex.fsl - - - --unicode --lexlib Internal.Utilities.Text.Lexing - ParserAndUntypedAST/lex.fsl - - - --unicode --lexlib Internal.Utilities.Text.Lexing - ParserAndUntypedAST/pplex.fsl - - - --module Microsoft.FSharp.Compiler.PPParser --open Microsoft.FSharp.Compiler --internal --lexlib Internal.Utilities.Text.Lexing --parslib Internal.Utilities.Text.Parsing - ParserAndUntypedAST/pppars.fsy - - - ParserAndUntypedAST/UnicodeLexing.fsi - - - ParserAndUntypedAST/UnicodeLexing.fs - - - ParserAndUntypedAST/layout.fsi - - - ParserAndUntypedAST/layout.fs - - - ParserAndUntypedAST/ast.fs - - - ParserAndUntypedAST/pppars.fs - - - ParserAndUntypedAST/pars.fs - - - ParserAndUntypedAST/lexhelp.fsi - - - ParserAndUntypedAST/lexhelp.fs - - - ParserAndUntypedAST/pplex.fs - - - ParserAndUntypedAST/lex.fs - - - ParserAndUntypedAST/LexFilter.fs - - - TypedAST/tainted.fsi - - - TypedAST/tainted.fs - - - TypedAST/ExtensionTyping.fsi - - - TypedAST/ExtensionTyping.fs - - - TypedAST/QuotationPickler.fsi - - - TypedAST/QuotationPickler.fs - - - TypedAST/tast.fs - - - TypedAST/TcGlobals.fs - - - TypedAST/TastOps.fsi - - - TypedAST/TastOps.fs - - - TypedAST/TastPickle.fsi - - - TypedAST/TastPickle.fs - - - Logic/import.fsi - - - Logic/import.fs - - - Logic/infos.fs - - - Logic/AccessibilityLogic.fs - - - Logic/AttributeChecking.fs - - - Logic/InfoReader.fs - - - Logic/NicePrint.fs - - - Logic/AugmentWithHashCompare.fsi - - - Logic/AugmentWithHashCompare.fs - - - Logic/NameResolution.fsi - - - Logic/NameResolution.fs - - - Logic/TypeRelations.fs - - - Logic/SignatureConformance.fs - - - Logic/MethodOverrides.fs - - - Logic/MethodCalls.fs - - - Logic/PatternMatchCompilation.fsi - - - Logic/PatternMatchCompilation.fs - - - Logic/ConstraintSolver.fsi - - - Logic/ConstraintSolver.fs - - - Logic/CheckFormatStrings.fsi - - - Logic/CheckFormatStrings.fs - - - Logic/FindUnsolved.fs - - - Logic/QuotationTranslator.fsi - - - Logic/QuotationTranslator.fs - - - Logic/PostInferenceChecks.fsi - - - Logic/PostInferenceChecks.fs - - - Logic/TypeChecker.fsi - - - Logic/TypeChecker.fs - - - Optimize/Optimizer.fsi - - - Optimize/Optimizer.fs - - - Optimize/DetupleArgs.fsi - - - Optimize/DetupleArgs.fs - - - Optimize/InnerLambdasToTopLevelFuncs.fsi - - - Optimize/InnerLambdasToTopLevelFuncs.fs - - - Optimize/LowerCallsAndSeqs.fs - - - Optimize/autobox.fs - - - CodeGen/IlxGen.fsi - - - CodeGen/IlxGen.fs - - - Driver/CompileOps.fsi - - - Driver/CompileOps.fs - - - Driver/CompileOptions.fsi - - - Driver/CompileOptions.fs - - - Driver/fsc.fsi - - - Driver/fsc.fs - - - Symbols/SymbolHelpers.fsi - - - Symbols/SymbolHelpers.fs - - - Symbols/Symbols.fsi - - - Symbols/Symbols.fs - - - Symbols/Exprs.fsi - - - Symbols/Exprs.fs - - - Symbols/SymbolPatterns.fsi - - - Symbols/SymbolPatterns.fs - - - Service/IncrementalBuild.fsi - - - Service/IncrementalBuild.fs - - - Service/Reactor.fsi - - - Service/Reactor.fs - - - Service/ServiceConstants.fs - - - Service/ServiceLexing.fsi - - - Service/ServiceLexing.fs - - - Service/ServiceParseTreeWalk.fs - - - Service/ServiceNavigation.fsi - - - Service/ServiceNavigation.fs - - - Service/ServiceParamInfoLocations.fsi - - - Service/ServiceParamInfoLocations.fs - - - Service/ServiceUntypedParse.fsi - - - Service/ServiceUntypedParse.fs - - - Service/reshapedmsbuild.fs - - - Service/SimulatedMSBuildReferenceResolver.fs - - - Service/ServiceDeclarationLists.fsi - - - Service/ServiceDeclarationLists.fs - - - Service/ServiceAssemblyContent.fsi - - - Service/ServiceAssemblyContent.fs - - - Service/ServiceXmlDocParser.fsi - - - Service/ServiceXmlDocParser.fs - - - Service/ExternalSymbol.fsi - - - Service/ExternalSymbol.fs - - - Service/QuickParse.fsi - - - Service/QuickParse.fs - - - Service/service.fsi - - - Service/service.fs - - - Service/ServiceInterfaceStubGenerator.fsi - - - Service/ServiceInterfaceStubGenerator.fs - - - Service/ServiceStructure.fsi - - - Service/ServiceStructure.fs - - - Service/ServiceAnalysis.fsi - - - Service/ServiceAnalysis.fs - - - Service/fsi.fsi - - - Service/fsi.fs - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/fcs/FSharp.Compiler.Service.sln b/fcs/FSharp.Compiler.Service.sln index 2fe403a3e36..192f8bd6242 100644 --- a/fcs/FSharp.Compiler.Service.sln +++ b/fcs/FSharp.Compiler.Service.sln @@ -51,7 +51,7 @@ Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "UntypedTree", "samples\Unty EndProject Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FscExe", "samples\FscExe\FscExe.fsproj", "{C94C257C-3C0A-4858-B5D8-D746498D1F08}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharp_Analysis", "..\tests\service\data\CSharp_Analysis\CSharp_Analysis.csproj", "{887630A3-4B1D-40EA-B8B3-2D842E9C40DB}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharp_Analysis", "FSharp.Compiler.Service.Tests\CSharp_Analysis\CSharp_Analysis.csproj", "{887630A3-4B1D-40EA-B8B3-2D842E9C40DB}" EndProject Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FsiExe", "samples\FsiExe\FsiExe.fsproj", "{F9540CA8-1CE0-4546-A23A-A461E416E95B}" EndProject diff --git a/fcs/FSharp.Compiler.Service/.gitignore b/fcs/FSharp.Compiler.Service/.gitignore new file mode 100644 index 00000000000..722f2e9b839 --- /dev/null +++ b/fcs/FSharp.Compiler.Service/.gitignore @@ -0,0 +1,2 @@ +net4*/ +netstandard*/ diff --git a/fcs/FSharp.Compiler.Service/AssemblyInfo.fs b/fcs/FSharp.Compiler.Service/AssemblyInfo.fs new file mode 100644 index 00000000000..90521fefd5a --- /dev/null +++ b/fcs/FSharp.Compiler.Service/AssemblyInfo.fs @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace Microsoft.FSharp +open System.Reflection +open System.Runtime.InteropServices + +[] +[] +[] +[] +[] +[] + +#if NO_STRONG_NAMES +[] +[] +[] +[] +[] +[] +[] +[] +[] +[] +[] +[] +[] +[] +[] +[] + +// Note: internals visible to unit test DLLs in Retail (and all) builds. +[] +[] +[] +[] +[] +#endif + +[] +[] +[] +[] +[] +[] +[] +[] +[] +[] +[] +[] +[] +[] + +// Until dotnet sdk can version assemblies, use this +#if BUILD_FROM_SOURCE +[] +[] +[] +#endif + +do() \ No newline at end of file diff --git a/fcs/FSharp.Compiler.Service/FSharp.Compiler.Service.fsproj b/fcs/FSharp.Compiler.Service/FSharp.Compiler.Service.fsproj index eebbaa0a931..a16f39b084c 100644 --- a/fcs/FSharp.Compiler.Service/FSharp.Compiler.Service.fsproj +++ b/fcs/FSharp.Compiler.Service/FSharp.Compiler.Service.fsproj @@ -1,56 +1,50 @@ - - - - + $(MSBuildProjectDirectory)\..\..\src + - Debug - AnyCPU - $(MSBuildProjectDirectory)\..\..\ - Library - FSharp.Compiler.Service - $(NoWarn);44;62;9 - {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3} - true - 0x06800000 - true - $(NoWarn);69;65;54;61;75 - true - ..\..\$(Configuration)\fcs\net45\ - $(OutputPath)$(AssemblyName).xml - - v4.5 - - $(DefineConstants);CROSS_PLATFORM_COMPILER - $(DefineConstants);ENABLE_MONO_SUPPORT - $(DefineConstants);COMPILER + net45;netstandard2.0 + true $(DefineConstants);COMPILER_SERVICE_AS_DLL - $(DefineConstants);COMPILER_PUBLIC_API + $(DefineConstants);COMPILER + $(DefineConstants);ENABLE_MONO_SUPPORT $(DefineConstants);NO_STRONG_NAMES + ..\..\$(Configuration.ToLower())\fcs + $(TargetFramework)\ + $(TargetFramework)\ $(OtherFlags) /warnon:1182 $(OtherFlags) --times - $(OtherFlags) --version:$(VersionPrefix).0 - false - true - + $(NoWarn);44;62;69;65;54;61;75;62;9;2003; + true + true + true - - true - full - false - AnyCPU + + The F# compiler as library. For editors, for tools, for scripting. For you. + The F# compiler services package contains a custom build of the F# compiler that exposes additional functionality for implementing F# language bindings, additional tools based on the compiler or refactoring tools. The package also includes F# interactive service that can be used for embedding F# scripting into your applications. + false + Microsoft Corporation; F# community contributors + https://github.com/fsharp/FSharp.Compiler.Service/blob/master/LICENSE + https://github.com/fsharp/FSharp.Compiler.Service + https://raw.github.com/fsharp/FSharp.Compiler.Service/master/misc/logo.png + F#, fsharp, interactive, compiler, editor - - pdbonly - true - AnyCPU + + $(DefineConstants);FX_NO_PDB_READER + $(DefineConstants);FX_NO_PDB_WRITER + $(DefineConstants);FX_NO_SYMBOLSTORE + $(DefineConstants);FX_NO_LINKEDRESOURCES + $(DefineConstants);FX_NO_APP_DOMAINS + $(DefineConstants);FX_NO_RUNTIMEENVIRONMENT + $(DefineConstants);FX_NO_WIN_REGISTRY + $(DefineConstants);FX_NO_SYSTEM_CONFIGURATION + $(DefineConstants);FX_RESHAPED_REFEMIT - - AssemblyInfo/assemblyinfo.FSharp.Compiler.Service.dll.fs + + AssemblyInfo/AssemblyInfo.fs FSComp.txt @@ -58,8 +52,9 @@ FSIstrings.txt - + FSStrings.resx + FSStrings.resources --module Microsoft.FSharp.Compiler.AbstractIL.Internal.AsciiParser --open Microsoft.FSharp.Compiler.AbstractIL --internal --lexlib Internal.Utilities.Text.Lexing --parslib Internal.Utilities.Text.Parsing @@ -69,212 +64,225 @@ --module Microsoft.FSharp.Compiler.Parser --open Microsoft.FSharp.Compiler --internal --lexlib Internal.Utilities.Text.Lexing --parslib Internal.Utilities.Text.Parsing pars.fsy - + + Logger.fsi + + + Logger.fs + + Reshaped/reshapedreflection.fs - + ErrorText/sformat.fsi - + ErrorText/sformat.fs - + ErrorText/sr.fsi - + ErrorText/sr.fs - + LexYaccRuntime/prim-lexing.fsi - + LexYaccRuntime/prim-lexing.fs - + LexYaccRuntime/prim-parsing.fsi - + LexYaccRuntime/prim-parsing.fs - - Utilities\ResizeArray.fsi + + Utilities/ResizeArray.fsi - - Utilities\ResizeArray.fs + + Utilities/ResizeArray.fs - + Utilities/HashMultiMap.fsi - + Utilities/HashMultiMap.fs - - Utilities\EditDistance.fs + + Utilities/EditDistance.fs - + Utilities/TaggedCollections.fsi - + Utilities/TaggedCollections.fs - + Utilities/QueueList.fs - + Utilities/ildiag.fsi - + Utilities/ildiag.fs - + Utilities/illib.fs - + Utilities/filename.fsi - + Utilities/filename.fs - + Utilities/zmap.fsi - + Utilities/zmap.fs - + Utilities/zset.fsi - + Utilities/zset.fs - + Utilities/bytes.fsi - + Utilities/bytes.fs - + Utilities/lib.fs - + Utilities/InternalCollections.fsi - + Utilities/InternalCollections.fs - + Utilities/rational.fsi - + Utilities/rational.fs - + ErrorLogging/range.fsi - + ErrorLogging/range.fs - + ErrorLogging/ErrorLogger.fs - + ErrorLogging/ErrorResolutionHints.fs - + ReferenceResolution/ReferenceResolver.fs --unicode --lexlib Internal.Utilities.Text.Lexing AbsIL/illex.fsl - + AbsIL/il.fsi - + AbsIL/il.fs - + AbsIL/ilx.fsi - + AbsIL/ilx.fs - + AbsIL/ilascii.fsi - + AbsIL/ilascii.fs - + AbsIL/ilprint.fsi - + AbsIL/ilprint.fs - + AbsIL/ilmorph.fsi - + AbsIL/ilmorph.fs - + + + + AbsIL/ilsign.fs + + + + AbsIL/ilsupp.fsi - + AbsIL/ilsupp.fs - + AbsIL/ilpars.fs - + AbsIL/illex.fs - + AbsIL/ilbinary.fsi - + AbsIL/ilbinary.fs - + AbsIL/ilread.fsi - + AbsIL/ilread.fs - + AbsIL/ilwritepdb.fsi - + AbsIL/ilwritepdb.fs - + AbsIL/ilwrite.fsi - + AbsIL/ilwrite.fs - + AbsIL/ilreflect.fs - + CompilerLocation/CompilerLocationUtils.fs - + PrettyNaming/PrettyNaming.fs - + ILXErase/ilxsettings.fs - + ILXErase/EraseClosures.fsi - + ILXErase/EraseClosures.fs - + ILXErase/EraseUnions.fsi - + ILXErase/EraseUnions.fs @@ -289,208 +297,208 @@ --module Microsoft.FSharp.Compiler.PPParser --open Microsoft.FSharp.Compiler --internal --lexlib Internal.Utilities.Text.Lexing --parslib Internal.Utilities.Text.Parsing ParserAndUntypedAST/pppars.fsy - + ParserAndUntypedAST/UnicodeLexing.fsi - + ParserAndUntypedAST/UnicodeLexing.fs - + ParserAndUntypedAST/layout.fsi - + ParserAndUntypedAST/layout.fs - + ParserAndUntypedAST/ast.fs - + ParserAndUntypedAST/pppars.fs - + ParserAndUntypedAST/pars.fs - + ParserAndUntypedAST/lexhelp.fsi - + ParserAndUntypedAST/lexhelp.fs - + ParserAndUntypedAST/pplex.fs - + ParserAndUntypedAST/lex.fs - + ParserAndUntypedAST/LexFilter.fs - + TypedAST/tainted.fsi - + TypedAST/tainted.fs - + TypedAST/ExtensionTyping.fsi - + TypedAST/ExtensionTyping.fs - + TypedAST/QuotationPickler.fsi - + TypedAST/QuotationPickler.fs - + TypedAST/tast.fs - + TypedAST/TcGlobals.fs - + TypedAST/TastOps.fsi - + TypedAST/TastOps.fs - + TypedAST/TastPickle.fsi - + TypedAST/TastPickle.fs - + Logic/import.fsi - + Logic/import.fs - + Logic/infos.fs - + Logic/AccessibilityLogic.fs - + Logic/AttributeChecking.fs - + Logic/InfoReader.fs - + Logic/NicePrint.fs - + Logic/AugmentWithHashCompare.fsi - + Logic/AugmentWithHashCompare.fs - + Logic/NameResolution.fsi - + Logic/NameResolution.fs - + Logic/TypeRelations.fs - + Logic/SignatureConformance.fs - + Logic/MethodOverrides.fs - + Logic/MethodCalls.fs - + Logic/PatternMatchCompilation.fsi - + Logic/PatternMatchCompilation.fs - + Logic/ConstraintSolver.fsi - + Logic/ConstraintSolver.fs - + Logic/CheckFormatStrings.fsi - + Logic/CheckFormatStrings.fs - + Logic/FindUnsolved.fs - + Logic/QuotationTranslator.fsi - + Logic/QuotationTranslator.fs - + Logic/PostInferenceChecks.fsi - + Logic/PostInferenceChecks.fs - + Logic/TypeChecker.fsi - + Logic/TypeChecker.fs - + Optimize/Optimizer.fsi - + Optimize/Optimizer.fs - + Optimize/DetupleArgs.fsi - + Optimize/DetupleArgs.fs - + Optimize/InnerLambdasToTopLevelFuncs.fsi - + Optimize/InnerLambdasToTopLevelFuncs.fs - + Optimize/LowerCallsAndSeqs.fs - - Optimize\autobox.fs + + Optimize/autobox.fs - + CodeGen/IlxGen.fsi - + CodeGen/IlxGen.fs - + Driver/CompileOps.fsi - + Driver/CompileOps.fs - + Driver/CompileOptions.fsi - + Driver/CompileOptions.fs - + Driver/fsc.fsi - + Driver/fsc.fs @@ -517,46 +525,46 @@ Symbols/SymbolPatterns.fs - + Service/IncrementalBuild.fsi - + Service/IncrementalBuild.fs - + Service/Reactor.fsi - + Service/Reactor.fs - + Service/ServiceConstants.fs - + Service/ServiceLexing.fsi - + Service/ServiceLexing.fs - + Service/ServiceParseTreeWalk.fs - + Service/ServiceNavigation.fsi - + Service/ServiceNavigation.fs - + Service/ServiceParamInfoLocations.fsi - + Service/ServiceParamInfoLocations.fs - + Service/ServiceUntypedParse.fsi - + Service/ServiceUntypedParse.fs @@ -565,58 +573,58 @@ Service/SimulatedMSBuildReferenceResolver.fs - + Service/ServiceDeclarationLists.fsi - + Service/ServiceDeclarationLists.fs - + Service/ServiceAssemblyContent.fsi - + Service/ServiceAssemblyContent.fs - + Service/ServiceXmlDocParser.fsi - + Service/ServiceXmlDocParser.fs - + Service/ExternalSymbol.fsi - + Service/ExternalSymbol.fs - + Service/QuickParse.fsi - + Service/QuickParse.fs - + Service/service.fsi - + Service/service.fs - + Service/ServiceInterfaceStubGenerator.fsi - + Service/ServiceInterfaceStubGenerator.fs - + Service/ServiceStructure.fsi - + Service/ServiceStructure.fs - + Service/ServiceAnalysis.fsi - + Service/ServiceAnalysis.fs @@ -625,38 +633,29 @@ Service/fsi.fs - - - - - + + + + + + + + + + + + + + + - - $(FSharpSourcesRoot)\..\packages\Microsoft.DiaSymReader.PortablePdb.1.2.0\lib\portable-net45+win8\Microsoft.DiaSymReader.PortablePdb.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.DiaSymReader.1.1.0\lib\portable-net45+win8\Microsoft.DiaSymReader.dll - - - $(FSharpSourcesRoot)\..\packages\System.Reflection.Metadata.1.4.2\lib\portable-net45+win8\System.Reflection.Metadata.dll - - - $(FSharpSourcesRoot)\..\packages\System.Collections.Immutable.1.3.1\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll - - $(FSharpSourcesRoot)\..\packages\System.ValueTuple.4.3.1\lib\netstandard1.0\System.ValueTuple.dll - - - - - $(FSharpSourcesRoot)\..\packages\Microsoft.Portable.FSharp.Core.4.1.20\lib\profiles\net40\FSharp.Core.dll - false + $(FSharpSourcesRoot)\..\packages\System.ValueTuple.4.4.0\lib\netstandard1.0\System.ValueTuple.dll - - - - + + + \ No newline at end of file diff --git a/fcs/README.md b/fcs/README.md index 51aa24fbbef..8f86342739e 100644 --- a/fcs/README.md +++ b/fcs/README.md @@ -1,11 +1,11 @@ -# The FSharp.Compiler.Service components and nuget package +# The FSharp.Compiler.Service components and NuGet package -This directory contains the build, packaging, test and documentation-generation logic for the nuget package ``FSharp.Compiler.Service``. The source for this nuget +This directory contains the build, packaging, test and documentation-generation logic for the NuGet package ``FSharp.Compiler.Service``. The source for this NuGet package is in ``..\src``. -Basically we are packaging up the compiler as a DLL and publishing it as a nuget package. +Basically we are packaging up the compiler as a DLL and publishing it as a NuGet package. ## FSharp.Compiler.Service v. FSharp.Compiler.Private @@ -13,7 +13,7 @@ There are subtle differences between FSharp.Compiler.Service and FSharp.Compiler - FCS has a public API - FCS is built against **.NET 4.5** and **FSharp.Core 4.0.0.0** to give broader reach -- FCS has a Nuget package +- FCS has a NuGet package - FCS has a .NET Standard 1.6 version in the nuget package - FCS testing also tests the "Project Cracker" (see below) - FCS doesn't add the System.ValueTuple.dll reference by default, see ``#if COMPILER_SERVICE_AS_DLL`` in compiler codebase @@ -57,17 +57,17 @@ which does things like: ### Manual push of packages -Yu can push the packages if you have permissions, either automatically using ``build Release`` or manually +You can push the packages if you have permissions, either automatically using ``build Release`` or manually set APIKEY=... - .nuget\nuget.exe push Release\FSharp.Compiler.Service.16.0.3.nupkg %APIKEY% -Source https://nuget.org - .nuget\nuget.exe push Release\FSharp.Compiler.Service.MSBuild.v12.16.0.3.nupkg %APIKEY% -Source https://nuget.org - .nuget\nuget.exe push Release\FSharp.Compiler.Service.ProjectCracker.16.0.3.nupkg %APIKEY% -Source https://nuget.org + ..\fsharp\.nuget\nuget.exe push %HOMEDRIVE%%HOMEPATH%\Downloads\FSharp.Compiler.Service.22.0.3.nupkg %APIKEY% -Source https://nuget.org + ..\fsharp\.nuget\nuget.exe push %HOMEDRIVE%%HOMEPATH%\Downloads\FSharp.Compiler.Service.MSBuild.v12.22.0.3.nupkg %APIKEY% -Source https://nuget.org + ..\fsharp\.nuget\nuget.exe push %HOMEDRIVE%%HOMEPATH%\Downloads\FSharp.Compiler.Service.ProjectCracker.22.0.3.nupkg %APIKEY% -Source https://nuget.org ### Use of Paket and FAKE -Paket is only used to get fake and formating tools. Eventually we will likely remove this once we update the project files to .NET SDK 2.0. +Paket is only used to get FAKE and FSharp.Formatting tools. Eventually we will likely remove this once we update the project files to .NET SDK 2.0. FAKE is only used to run build.fsx. Eventually we will likely remove this once we update the project files to .NET SDK 2.0. @@ -83,7 +83,7 @@ Testing reuses the test files from ..\tests\service which were are also FCS test Output is in ``docs``. In the ``FSharp.Compiler.Service`` repo this is checked in and hosted as http://fsharp.github.io/FSharp.Compiler.Service. -## The two other nuget packages +## The two other NuGet packages It also contains both the source, build, packaging and test logic for diff --git a/fcs/RELEASE_NOTES.md b/fcs/RELEASE_NOTES.md index 44eeb9ef347..67ac7bcc6b9 100644 --- a/fcs/RELEASE_NOTES.md +++ b/fcs/RELEASE_NOTES.md @@ -1,3 +1,28 @@ +#### 22.0.3 + * [Add entity.DeclaringEntity](https://github.com/Microsoft/visualfsharp/pull/4633), [FCS feature request](https://github.com/fsharp/FSharp.Compiler.Service/issues/830) + +#### 22.0.2 + * Use correct version number in DLLs (needed until https://github.com/Microsoft/visualfsharp/issues/3113 is fixed) + +#### 22.0.1 + * Integrate visualfsharp master + * Includes recent memory usage reduction work for ByteFile and ILAttributes + +#### 21.0.1 + * Use new .NET SDK project files + * FSharp.Compiler.Service nuget now uses net45 and netstandard2.0 + * FSharp.Compiler.Service netstandard2.0 now supports type providers + +#### 19.0.1 + * Rename ``LogicalEnclosingEntity`` to ``ApparentEnclosingEntity`` for consistency int he F# codebase terminology. + * Rename ``EnclosingEntity`` to ``DeclaringEntity``. In the case of extension properties, ``EnclosingEntity`` was incorrectly returning the logical enclosing entity (i.e. the type the property appears to extend), and in this case ``ApparentEnclosingEntity`` should be used instead. + +#### 18.0.1 + * Integrate visualfsharp master + +#### 17.0.2 + * Integrate visualfsharp master + #### 16.0.3 * [File name deduplication not working with ParseAndCheckFileInProject](https://github.com/fsharp/FSharp.Compiler.Service/issues/819) @@ -404,7 +429,7 @@ * Return additional 'property' and 'event' methods for F#-defined types to regularize symbols (#108, #143) * Add IsPropertySetterMethod and IsPropertyGetterMethod which only return true for getter/setter methods, not properties. Deprecate IsSetterMethod and IsGetterMethod in favour of these. * Add IsEventAddMethod and IsEventRemoveMethod which return true for add/remove methods with an associated event -* Change IsProperty and IsEvent to only return true for the symbols for properties and events, rather than the methods assocaited with these +* Change IsProperty and IsEvent to only return true for the symbols for properties and events, rather than the methods associated with these * Fix value of Assembly for some symbols (e.g. property symbols) #### 0.0.45 - diff --git a/fcs/build.cmd b/fcs/build.cmd index c18c0a1f227..731fc76abb7 100644 --- a/fcs/build.cmd +++ b/fcs/build.cmd @@ -1,7 +1,7 @@ @echo off setlocal -cd fcs +pushd %~dp0% if errorlevel 1 ( endlocal diff --git a/fcs/build.fsx b/fcs/build.fsx index 1e39de8bbb9..145d4c88e8f 100644 --- a/fcs/build.fsx +++ b/fcs/build.fsx @@ -13,12 +13,18 @@ open Fake.ReleaseNotesHelper #if MONO // prevent incorrect output encoding (e.g. https://github.com/fsharp/FAKE/issues/1196) System.Console.OutputEncoding <- System.Text.Encoding.UTF8 - CleanDir (__SOURCE_DIRECTORY__ + "/../tests/TestResults") File.WriteAllText(__SOURCE_DIRECTORY__ + "/../tests/TestResults/notestsyet.txt","No tests yet") +let isMono = true +#else +let isMono = false #endif -let dotnetExePath = DotNetCli.InstallDotNetSDK "2.0.2" +// -------------------------------------------------------------------------------------- +// Utilities +// -------------------------------------------------------------------------------------- + +let dotnetExePath = DotNetCli.InstallDotNetSDK "2.1.201" let runDotnet workingDir args = let result = @@ -29,11 +35,8 @@ let runDotnet workingDir args = if result <> 0 then failwithf "dotnet %s failed" args -// -------------------------------------------------------------------------------------- -// Utilities -// -------------------------------------------------------------------------------------- - let assertExitCodeZero x = if x = 0 then () else failwithf "Command failed with exit code %i" x + let runCmdIn workDir (exe:string) = Printf.ksprintf (fun (args:string) -> #if MONO let exe = exe.Replace("\\","/") @@ -51,33 +54,16 @@ let runCmdIn workDir (exe:string) = Printf.ksprintf (fun (args:string) -> // The rest of the code is standard F# build script // -------------------------------------------------------------------------------------- -let releaseDir = Path.Combine(__SOURCE_DIRECTORY__, "../Release") - +let releaseDir = Path.Combine(__SOURCE_DIRECTORY__, "../release/fcs") // Read release notes & version info from RELEASE_NOTES.md let release = LoadReleaseNotes (__SOURCE_DIRECTORY__ + "/RELEASE_NOTES.md") let isAppVeyorBuild = buildServer = BuildServer.AppVeyor +let isJenkinsBuild = buildServer = BuildServer.Jenkins let isVersionTag tag = Version.TryParse tag |> fst let hasRepoVersionTag = isAppVeyorBuild && AppVeyorEnvironment.RepoTag && isVersionTag AppVeyorEnvironment.RepoTagName let assemblyVersion = if hasRepoVersionTag then AppVeyorEnvironment.RepoTagName else release.NugetVersion -let nugetVersion = release.NugetVersion -open SemVerHelper -let nugetDebugVersion = - let semVer = SemVerHelper.parse nugetVersion - let debugPatch, debugPreRelease = - match semVer.PreRelease with - | None -> semVer.Patch + 1, { Origin = "alpha001"; Name = "alpha"; Number = Some 1; Parts = [AlphaNumeric "alpha001"] } - | Some pre -> - let num = match pre.Number with Some i -> i + 1 | None -> 1 - let name = pre.Name - let newOrigin = sprintf "%s%03d" name num - semVer.Patch, { Origin = newOrigin; Name = name; Number = Some num; Parts = [AlphaNumeric newOrigin] } - let debugVer = - { semVer with - Patch = debugPatch - PreRelease = Some debugPreRelease } - debugVer.ToString() -let buildDate = DateTime.UtcNow + let buildVersion = if hasRepoVersionTag then assemblyVersion else if isAppVeyorBuild then sprintf "%s-b%s" assemblyVersion AppVeyorEnvironment.BuildNumber @@ -88,92 +74,39 @@ Target "Clean" (fun _ -> ) Target "Restore" (fun _ -> - for p in (!! "./../**/packages.config") do - let result = - ExecProcess (fun info -> + // We assume a paket restore has already been run + runDotnet __SOURCE_DIRECTORY__ "restore FSharp.Compiler.Service.sln -v n" + for p in [ "../packages.config" ] do + let rec executeProcess count = + let result = ExecProcess (fun info -> info.FileName <- FullName @"./../.nuget/NuGet.exe" info.WorkingDirectory <- FullName @"./.." - info.Arguments <- sprintf "restore %s -PackagesDirectory \"%s\" -ConfigFile \"%s\"" (FullName p) (FullName "./../packages") (FullName "./../.nuget/NuGet.Config")) TimeSpan.MaxValue - if result <> 0 then failwithf "nuget restore %s failed" p - - runDotnet __SOURCE_DIRECTORY__ "restore tools.fsproj" + info.Arguments <- sprintf "restore %s -PackagesDirectory \"%s\" -ConfigFile \"%s\"" (FullName p) (FullName "./../packages") (FullName "./../NuGet.Config")) TimeSpan.MaxValue + if result <> 0 && count > 1 then executeProcess (count - 1) else result + (executeProcess 5) |> assertExitCodeZero ) Target "BuildVersion" (fun _ -> Shell.Exec("appveyor", sprintf "UpdateBuild -Version \"%s\"" buildVersion) |> ignore ) -// -------------------------------------------------------------------------------------- -// Clean build results & restore NuGet packages - - -Target "Build.NetFx" (fun _ -> - !! "FSharp.Compiler.Service.sln" - |> MSBuild "" "Build" ["Configuration","Release" ] - |> Log (".NETFxBuild-Output: ") -) - - -// -------------------------------------------------------------------------------------- -// Run the unit tests using test runner - -Target "Test.NetFx" (fun _ -> - let testDir = __SOURCE_DIRECTORY__ + "/../tests/fcs" - CleanDir testDir - - let outDir = releaseDir + "/fcs" - - !! (outDir + "/**/*.*") - |> CopyFiles testDir - - let toolPath = __SOURCE_DIRECTORY__ + "/../packages/NUnit.Console.3.0.0/tools" - !! (toolPath + "/*.*") - |> CopyFiles testDir - - !! (testDir + "/**/FSharp.Compiler.Service.Tests.dll") - |> Fake.Testing.NUnit3.NUnit3 (fun p -> - { p with - ToolPath = testDir + "/nunit3-console.exe" - ShadowCopy = false - WorkingDir = FullName testDir - TimeOut = TimeSpan.FromMinutes 20. }) -) - -// -------------------------------------------------------------------------------------- -// Build a NuGet package -Target "NuGet.NetFx" (fun _ -> - runCmdIn __SOURCE_DIRECTORY__ "../.nuget/NuGet.exe" @"pack nuget/FSharp.Compiler.Service.nuspec -OutputDirectory %s" releaseDir - runCmdIn __SOURCE_DIRECTORY__ "../.nuget/NuGet.exe" @"pack nuget/FSharp.Compiler.Service.MSBuild.v12.nuspec -OutputDirectory %s" releaseDir - runCmdIn __SOURCE_DIRECTORY__ "../.nuget/NuGet.exe" @"pack nuget/FSharp.Compiler.Service.ProjectCracker.nuspec -OutputDirectory %s" releaseDir +Target "Build" (fun _ -> + runDotnet __SOURCE_DIRECTORY__ "build FSharp.Compiler.Service.sln -v n -c Release" ) +Target "Test" (fun _ -> + // This project file is used for the netcoreapp2.0 tests to work out reference sets + runDotnet __SOURCE_DIRECTORY__ "restore ../tests/projects/Sample_NETCoreSDK_FSharp_Library_netstandard2_0/Sample_NETCoreSDK_FSharp_Library_netstandard2_0.fsproj -v n" + runDotnet __SOURCE_DIRECTORY__ "build ../tests/projects/Sample_NETCoreSDK_FSharp_Library_netstandard2_0/Sample_NETCoreSDK_FSharp_Library_netstandard2_0.fsproj -v n" - -// -------------------------------------------------------------------------------------- -// .NET Core and .NET Core SDK - - -Target "Build.NetStd" (fun _ -> - runDotnet __SOURCE_DIRECTORY__ (sprintf "pack %s -v n -c Release" "FSharp.Compiler.Service.netstandard.sln") -) - - -Target "Test.NetStd" (fun _ -> - runDotnet __SOURCE_DIRECTORY__ (sprintf "run -p FSharp.Compiler.Service.Tests.netcore/FSharp.Compiler.Service.Tests.netcore.fsproj -c Release -- --result:TestResults.NetStd.xml;format=nunit3") + // Now run the tests + runDotnet __SOURCE_DIRECTORY__ "test FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj -v n -c Release" ) - -//use dotnet-mergenupkg to merge the .NETstandard nuget package into the default one -Target "Nuget.AddNetStd" (fun _ -> - let nupkg = sprintf "%s/FSharp.Compiler.Service.%s.nupkg" releaseDir release.AssemblyVersion - let netcoreNupkg = sprintf "FSharp.Compiler.Service.netstandard/bin/Release/FSharp.Compiler.Service.%s.nupkg" release.AssemblyVersion - runDotnet __SOURCE_DIRECTORY__ (sprintf "mergenupkg --source %s --other %s --framework netstandard1.6" nupkg netcoreNupkg) +Target "NuGet" (fun _ -> + runDotnet __SOURCE_DIRECTORY__ "pack FSharp.Compiler.Service.sln -v n -c Release" ) - -// -------------------------------------------------------------------------------------- -// Generate the documentation - Target "GenerateDocsEn" (fun _ -> executeFSIWithArgs "docsrc/tools" "generate.fsx" [] [] |> ignore ) @@ -182,9 +115,6 @@ Target "GenerateDocsJa" (fun _ -> executeFSIWithArgs "docsrc/tools" "generate.ja.fsx" [] [] |> ignore ) -// -------------------------------------------------------------------------------------- -// Release Scripts - Target "PublishNuGet" (fun _ -> Paket.Push (fun p -> let apikey = @@ -199,47 +129,28 @@ Target "PublishNuGet" (fun _ -> // -------------------------------------------------------------------------------------- // Run all targets by default. Invoke 'build ' to override +Target "Start" DoNothing Target "Release" DoNothing -Target "NuGet" DoNothing -Target "Build" DoNothing Target "GenerateDocs" DoNothing Target "TestAndNuGet" DoNothing -"Clean" - =?> ("BuildVersion", isAppVeyorBuild) - ==> "Restore" - ==> "Build.NetStd" - -"Clean" +"Start" =?> ("BuildVersion", isAppVeyorBuild) ==> "Restore" - ==> "Build.NetFx" - -"Build.NetFx" - ==> "Test.NetFx" - -"Build.NetStd" - ==> "Test.NetStd" - -"Build.NetFx" - ==> "Build.NetStd" ==> "Build" -"Build.NetStd" - ==> "Nuget.AddNetStd" +"Build" + ==> "Test" -"Build.NetFx" - ==> "NuGet.NetFx" - ==> "Nuget.AddNetStd" +"Build" ==> "NuGet" -"Test.NetFx" +"Test" ==> "TestAndNuGet" "NuGet" ==> "TestAndNuGet" - "Build" ==> "NuGet" ==> "PublishNuGet" diff --git a/fcs/cibuild.sh b/fcs/cibuild.sh new file mode 100755 index 00000000000..ddc49d8ff34 --- /dev/null +++ b/fcs/cibuild.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +# note: expects to run from top directory +./mono/latest-mono-stable.sh +./fcs/build.sh NuGet diff --git a/fcs/docsrc/content/fsharp-readme.md b/fcs/docsrc/content/fsharp-readme.md deleted file mode 100644 index 5cf3c67e36d..00000000000 --- a/fcs/docsrc/content/fsharp-readme.md +++ /dev/null @@ -1,218 +0,0 @@ -F# Compiler README -============================================================================================= - -> **NOTE:** This readme file is the original `README.md` document from the F# compiler -source code ([github.com/fsharp/fsharp](https://github.com/fsharp/fsharp)). This project is a fork of the F# compiler -source, with several minor changes that expose certain services. The readme is included -here for reference. - -This is the F# compiler, core library and core tools (open source edition). -The `master` branch is for the latest version of F# (currently F# 3.0). -To bootstrap the compiler, binaries built from an earlier version of this project are used. - -## Requirements - -Requires mono 2.9 or higher. Prefer Mono 3.0. - -On OSX, requires automake 2.69. To install from [homebrew](http://mxcl.github.com/homebrew): - - [lang=text] - brew install automake - - -## Building - -### On Linux and other Unix systems: -The usual: - - [lang=text] - ./autogen.sh - make - sudo make install - -By default that makes optimized binaries. To make debug, use `make CONFIG=debug` - - -### On MacOS (OSX) - -Use a prefix to your version of Mono: - - [lang=text] - ./autogen.sh --prefix=/Library/Frameworks/Mono.framework/Versions/Current/ - make - sudo make install - -By default that makes optimized binaries. To make debug, use `make CONFIG=debug` - -### On Windows, using msbuild (e.g.. if .NET is installed) -If you have only VS2012 installed, and not VS2010, you'll need to install the F# 2.0 Runtime (http://www.microsoft.com/en-us/download/details.aspx?id=13450) - - [lang=text] - cd src - msbuild fsharp-proto-build.proj - ngen install ..\lib\proto\4.0\fsc-proto.exe (optional) - msbuild fsharp-library-build.proj /p:Configuration=Release - msbuild fsharp-compiler-build.proj /p:Configuration=Release - -You can also build the FSharp.Core for .NET 2.0, Mono 2.1, MonoTouch, Silverlight 5.0, Windows Phone 7.1, Portable Profile47 (net45+sl5+win8), Portable Profile88 (net4+sl4+wp71+win8) and XNA 4.0 for Xbox 360 profiles: - - [lang=text] - msbuild fsharp-library-build.proj /p:TargetFramework=net20 /p:Configuration=Release - msbuild fsharp-library-build.proj /p:TargetFramework=mono21 /p:Configuration=Release - msbuild fsharp-library-build.proj /p:TargetFramework=monotouch /p:Configuration=Release - msbuild fsharp-library-build.proj /p:TargetFramework=portable-net45+sl5+win8 /p:Configuration=Release - msbuild fsharp-library-build.proj /p:TargetFramework=portable-net4+sl4+wp71+win8 /p:Configuration=Release - msbuild fsharp-library-build.proj /p:TargetFramework=sl5 /p:Configuration=Release - msbuild fsharp-library-build.proj /p:TargetFramework=wp7 /p:Configuration=Release - msbuild fsharp-library-build.proj /p:TargetFramework=net40-xna40-xbox360 /p:Configuration=Release - -You can also build the FSharp.Core and FSharp.Compiler.Silverlight.dll for Silverlight 5.0: - - [lang=text] - msbuild fsharp-library-build.proj /p:TargetFramework=sl5-compiler /p:Configuration=Release - msbuild fsharp-compiler-build.proj /p:TargetFramework=sl5-compiler /p:Configuration=Release - -Change to ` /p:Configuration=Debug` for debug binaries. - -### On Windows, using xbuild (e.g. if no .NET is installed and only Mono 3.0 is installed): - - [lang=text] - cd src - xbuild fsharp-proto-build.proj - xbuild fsharp-library-build.proj - xbuild fsharp-compiler-build.proj - -Building using xbuild does not yet lay down a Mono-ready distribution (see src/fsharp/targets.make), so should only -be used for private development rather than preparing distributions. - - -## Strong Names - -The FSharp.Core.dll produced is only delay-signed (Mono does not require strong names). -If a strong-name signed FSharp.Core.dll is needed then use the one in - - [lang=text] - lib\bootstrap\signed\3.0\v4.0\FSharp.Core.dll - -## What you get - -Once built the main compiler binaries go in - - [lang=text] - lib/release/4.0 - -There are versions of FSharp.Core for .NET 2.0, MonoAndroid, MonoTouch (Mono profile 2.1) in - - [lang=text] - lib/release/2.0 - lib/release/2.1 - lib/release/2.1monotouch - -On `make install` the binaries etc. go in the prefix, e.g. - - [lang=text] - /Library/Frameworks/Mono.framework/Versions/Current/lib/mono/2.0/FSharp.Core.dll - /Library/Frameworks/Mono.framework/Versions/Current/lib/mono/2.1/FSharp.Core.dll - /Library/Frameworks/Mono.framework/Versions/Current/lib/mono/4.0/fsc.exe - /Library/Frameworks/Mono.framework/Versions/Current/lib/mono/4.0/FSharp.Compiler.dll - ... - /Library/Frameworks/Mono.framework/Versions/Current/lib/mono/4.5/fsc.exe - /Library/Frameworks/Mono.framework/Versions/Current/lib/mono/4.5/FSharp.Compiler.dll - ... - /Library/Frameworks/Mono.framework/Versions/Current/lib/mono/gac/.../FSharp.Compiler.dll - /Library/Frameworks/Mono.framework/Versions/Current/lib/mono/gac/.../FSharp.Compiler.dll - ... - -plus some files for xbuild support - - [lang=text] - /Library/Frameworks/Mono.framework/Versions/Current/lib/mono/Microsoft\ F#/v4.0/* - /Library/Frameworks/Mono.framework/Versions/Current/lib/mono/Microsoft\ SDKs/F#/3.0/Framework/* - -(these names are the canonical names for Microsoft.FSharp.Targets used by project files coming from Visual Studio) - -plus scripts - - /usr/bin/fsharpc (F# compiler) - /usr/bin/fsharpi (F# Interactive) - -## Development notes - -###Continuous Integration Build - -We have a CI build set up with the JetBrains/Teamcity server as part of the F# community projects there: - -http://teamcity.codebetter.com/project.html?projectId=project61&tab=projectOverview - -@forki controls access. Right now this builds both a Mono 'make' install and a Windows 'cd src; msbuild fsharp-build.proj' build. No binaries are saved from the build, it is just for sanity checking. - - -###Editing the Compiler with Visual Studio or MonoDevelop - -Open `all-vs2012.sln`, and edit in modes Debug or Release. The compiler takes a good while to compile and that -can be a bit invasive to the work flow, so it's normally better to do the actual compilation from -the command line, see above. - -The F# support in MonoDevelop uses an in-process background compiler. On the Mac this causes pausing garbage -collections to kick in which makes editing the compiler in MonoDevelop awkward. - -### Building F# Core Unit Tests for .NET 4.x (optional) - -This uses the proto compiler to build the unit tests that check some parts of `FSharp.Core.dll` and `FSharp.Compiler.dll`. There is also another set of tests under `tests\fsharp`. - - [lang=text] - msbuild fsharp-library-unittests-build.proj /p:TargetFramework=net40 - -*Note: You must have NUnit installed to build the unit tests.* - - - -### Validation and Use - -Here are some simple tests to validate what you have built by checking `fsi.exe` (F# Interactive) starts up: - - - [lang=text] - lib\debug\4.0\fsi.exe - 1 + 1;; - \#q;; - lib\debug\4.0\fsi.exe /help - lib\debug\4.0\fsc.exe /help - echo printfn "hello world" > hello.fs - lib\debug\4.0\fsc.exe hello.fs - hello.exe - - -### Running Compiler tests (on Windows) - -There are language tests under `tests\fsharp\core`. The test apparatus is primitive and unfortunately uses batch files. You can run these on Windows using: - - [lang=text] - cd ..\tests\fsharp\core - ..\..\build-and-run-all-installed-ilx-configs.bat results.log - - -The results file will contain one entry for each test directory, plus any reported errors. - - - [lang=text] - tests\fsharp\core - tests\fsharp\core\queriesCustomQueryOps - tests\fsharp\core\queriesLeafExpressionConvert - tests\fsharp\core\queriesNullableOperators - tests\fsharp\core\queriesOverIEnumerable - ... - -Some tests for LINQ queries require SQL Server be installed. A failing test will look like this: - - [lang=text] - ERRORLEVEL=1: in tests\fsharp\core\csfromfs\build.bat - -You can then go to the relevant directory and run `build.bat` and `run.bat`. - - -## History - -F# compiler sources dropped by Microsoft are available from [fsharppowerpack.codeplex.com](http://fsharppowerpack.codeplex.com). - -Uses bootstrapping libraries, tools and F# compiler. The `lib/bootstrap/X.0` directories contain mono-built libraries, compiler and tools that can be used to bootstrap a build. You can also supply your own via the `--with-bootstrap` option. \ No newline at end of file diff --git a/fcs/docsrc/content/ja/compiler.fsx b/fcs/docsrc/content/ja/compiler.fsx index d21e63b8ef0..393f837cb5f 100644 --- a/fcs/docsrc/content/ja/compiler.fsx +++ b/fcs/docsrc/content/ja/compiler.fsx @@ -1,5 +1,5 @@ (*** hide ***) -#I "../../../bin/v4.5/" +#I "../../../../debug/bin/net45/" (** コンパイラの組み込み ==================== diff --git a/fcs/docsrc/content/ja/editor.fsx b/fcs/docsrc/content/ja/editor.fsx index 014be2e86c5..7bd61da5189 100644 --- a/fcs/docsrc/content/ja/editor.fsx +++ b/fcs/docsrc/content/ja/editor.fsx @@ -1,5 +1,5 @@ (*** hide ***) -#I "../../../bin/v4.5/" +#I "../../../../debug/bin/net45/" (** コンパイラサービス: エディタサービス ==================================== @@ -14,7 +14,7 @@ 今回も `FSharpChecker` オブジェクトを作成するところから始めます。 > **注意:** 以下で使用しているAPIは試験的なもので、最新バージョンのnugetパッケージの - 公開に伴って変更されることがあります。 +公開に伴って変更されることがあります。 サンプルソースコードの型チェック -------------------------------- @@ -44,14 +44,14 @@ let checker = FSharpChecker.Create() *) // サンプルの入力となる複数行文字列 let input = - """ - open System - - let foo() = - let msg = String.Concat("Hello"," ","world") - if true then - printfn "%s" msg. - """ +""" +open System + +let foo() = +let msg = String.Concat("Hello"," ","world") +if true then +printfn "%s" msg. +""" // 入力値の分割とファイル名の定義 let inputLines = input.Split('\n') let file = "/home/user/Test.fsx" @@ -73,8 +73,8 @@ let parsingOptions, _errors = checker.GetParsingOptionsFromProjectOptions(projOp *) // パースを実行 let parseFileResults = - checker.ParseFile(file, input, parsingOptions) - |> Async.RunSynchronously +checker.ParseFile(file, input, parsingOptions) +|> Async.RunSynchronously (** `TypeCheckResults` に備えられた興味深い機能の紹介に入る前に、 サンプル入力に対して型チェッカーを実行する必要があります。 @@ -84,25 +84,25 @@ F#コードにエラーがあった場合も何らかの型チェックの結果 // 型チェックを実行 let checkFileAnswer = - checker.CheckFileInProject(parseFileResults, file, 0, input, projOptions) - |> Async.RunSynchronously +checker.CheckFileInProject(parseFileResults, file, 0, input, projOptions) +|> Async.RunSynchronously (** あるいは `ParseAndCheckFileInProject` を使用すれば1つの操作で両方のチェックを行うことができます: *) let parseResults2, checkFileAnswer2 = - checker.ParseAndCheckFileInProject(file, 0, input, projOptions) - |> Async.RunSynchronously +checker.ParseAndCheckFileInProject(file, 0, input, projOptions) +|> Async.RunSynchronously (** この返り値は `CheckFileAnswer` 型で、この型に機能的に興味深いものが揃えられています... *) let checkFileResults = - match checkFileAnswer with - | FSharpCheckFileAnswer.Succeeded(res) -> res - | res -> failwithf "パースが完了していません... (%A)" res +match checkFileAnswer with +| FSharpCheckFileAnswer.Succeeded(res) -> res +| res -> failwithf "パースが完了していません... (%A)" res (** @@ -147,7 +147,7 @@ printfn "%A" tip (** > **注意:** `GetToolTipTextAlternate` は古い関数 `GetToolTipText` に代わるものです。 - `GetToolTipText` は0から始まる行番号を受け取るようになっていたため、非推奨になりました。 +`GetToolTipText` は0から始まる行番号を受け取るようになっていたため、非推奨になりました。 この関数には位置とトークンの種類の他にも、 (ソースコードの変更時に役立つように)特定行の現在の内容と、 @@ -178,19 +178,19 @@ printfn "%A" tip *) // 特定の位置における宣言(自動補完)を取得する let decls = - checkFileResults.GetDeclarationListInfo - (Some parseFileResults, 7, 23, inputLines.[6], [], "msg", fun _ -> false) - |> Async.RunSynchronously +checkFileResults.GetDeclarationListInfo +(Some parseFileResults, 7, 23, inputLines.[6], [], "msg", fun _ -> false) +|> Async.RunSynchronously // 利用可能な項目を表示 for item in decls.Items do - printfn " - %s" item.Name +printfn " - %s" item.Name (** > **注意:** `GetDeclarationListInfo` は古い関数 `GetDeclarations` に代わるものです。 - `GetDeclarations` は0から始まる行番号を受け取るようになっていたため、非推奨になりました。 - また、将来的には現在の `GetDeclarations` が削除され、 `GetDeclarationListInfo` が - `GetDeclarations` になる予定です。 +`GetDeclarations` は0から始まる行番号を受け取るようになっていたため、非推奨になりました。 +また、将来的には現在の `GetDeclarations` が削除され、 `GetDeclarationListInfo` が +`GetDeclarations` になる予定です。 コードを実行してみると、 `Substring` や `ToUpper` 、 `ToLower` といった 文字列に対するいつものメソッドのリストが取得できていることでしょう。 @@ -214,13 +214,13 @@ for item in decls.Items do *) //String.Concatメソッドのオーバーロードを取得する let methods = - checkFileResults.GetMethodsAlternate(5, 27, inputLines.[4], Some ["String"; "Concat"]) |> Async.RunSynchronously +checkFileResults.GetMethodsAlternate(5, 27, inputLines.[4], Some ["String"; "Concat"]) |> Async.RunSynchronously // 連結された引数リストを表示 for mi in methods.Methods do - [ for p in mi.Parameters -> p.Display ] - |> String.concat ", " - |> printfn "%s(%s)" methods.MethodName +[ for p in mi.Parameters -> p.Display ] +|> String.concat ", " +|> printfn "%s(%s)" methods.MethodName (** ここでは `Display` プロパティを使用することで各引数に対する アノテーションを取得しています。 @@ -247,9 +247,9 @@ F#コンパイラは型チェックを(自動的に)バックグラウンドで ファイルに対する型チェックを諦めるか、どちらか選択することになります。 > [fsharpbinding](https://github.com/fsharp/fsharpbinding) プロジェクトには - 1つのF#エージェント経由ですべてのリクエストをバックグラウンドワークとして - 処理するような、より複雑な具体例も含まれています。 - エディタの機能を実装する方法としてはこちらのほうが適切です。 +1つのF#エージェント経由ですべてのリクエストをバックグラウンドワークとして +処理するような、より複雑な具体例も含まれています。 +エディタの機能を実装する方法としてはこちらのほうが適切です。 *) diff --git a/fcs/docsrc/content/ja/filesystem.fsx b/fcs/docsrc/content/ja/filesystem.fsx index 2c18c95fa9a..1646b49ccff 100644 --- a/fcs/docsrc/content/ja/filesystem.fsx +++ b/fcs/docsrc/content/ja/filesystem.fsx @@ -1,5 +1,5 @@ (*** hide ***) -#I "../../../bin/v4.5/" +#I "../../../../debug/bin/net45/" (** コンパイラサービス: ファイルシステム仮想化 ========================================== diff --git a/fcs/docsrc/content/ja/fsharp-readme.md b/fcs/docsrc/content/ja/fsharp-readme.md deleted file mode 100644 index f7b5238400d..00000000000 --- a/fcs/docsrc/content/ja/fsharp-readme.md +++ /dev/null @@ -1,249 +0,0 @@ -F# コンパイラのREADME -============================================================================================= - -> **注意:** このreadmeファイルはF# コンパイラソースコード -([github.com/fsharp/fsharp](https://github.com/fsharp/fsharp)) -に付属していたオリジナルのファイルのコピーです。 -F# Compiler Servicesプロジェクトは元々F# Compilerプロジェクトから派生したもので、 -いくつかのサービスを公開するために若干の変更が加えられています。 -ここに含まれるreadmeファイルは参考程度にとどめてください。 - -このプロジェクトには(オープンソース版の)F# コンパイラ、コアライブラリ、コアツールが含まれます。 -いずれもMITライセンスが適用されます。 -`master` ブランチは最新バージョンのF#(現時点ではF# 3.0)に対応します。 -なおコンパイラをブートストラップするために、 -このプロジェクトの以前のバージョンでビルドされたバイナリが使用されます。 - -## 必須要件 - -Mono 2.9以上のバージョンが必要です。Mono 3.0が推奨されます。 - -OS Xの場合、automake 2.69が必要です。 -[homebrew](http://brew.sh/) 経由でインストールする場合は -以下のようにします: - - [lang=text] - brew install automake - -## ビルド - -### Linuxおよびその他のUnixシステムの場合 - -通常の手順は以下の通りです: - - [lang=text] - ./autogen.sh - make - sudo make install - -デフォルトでは最適化されたバイナリが生成されます。 -デバッグ版をビルドする場合は `make CONFIG=debug` とします。 - -### MacOS (OSX)の場合 - -Monoのバージョンを指定するprefixを設定します: - - [lang=text] - ./autogen.sh --prefix=/Library/Frameworks/Mono.framework/Versions/Current/ - make - sudo make install - -デフォルトでは最適化されたバイナリが生成されます。 -デバッグ版をビルドする場合は `make CONFIG=debug` とします。 - -### Windows上でmsbuildを使用する(つまり.NETがインストールされている)場合 - -VS2010がインストールされておらず、VS2012しかインストールされていない場合には -[F# 2.0 ランタイム](http://www.microsoft.com/en-us/download/details.aspx?id=13450) -のインストールが必要です: - - [lang=text] - cd src - msbuild fsharp-proto-build.proj - ngen install ..\lib\proto\4.0\fsc-proto.exe (optional) - msbuild fsharp-library-build.proj /p:Configuration=Release - msbuild fsharp-compiler-build.proj /p:Configuration=Release - -また、.NET 2.0やMono 2.1、MonoTouch、Silverlight 5.0、 -Windows Phone 7.1、ポータブルプロファイル47(.NET4.5+Silverlight5+Windows8)、 -ポータブルプロファイル88(.NET4+Silverlight4+WindowsPhone7.1+Windows8)、 -Xbox 360用XNA 4.0のプロファイルに対応するFSharp.Coreをビルドすることもできます: - - [lang=text] - msbuild fsharp-library-build.proj /p:TargetFramework=net20 /p:Configuration=Release - msbuild fsharp-library-build.proj /p:TargetFramework=mono21 /p:Configuration=Release - msbuild fsharp-library-build.proj /p:TargetFramework=monotouch /p:Configuration=Release - msbuild fsharp-library-build.proj /p:TargetFramework=portable-net45+sl5+win8 /p:Configuration=Release - msbuild fsharp-library-build.proj /p:TargetFramework=portable-net4+sl4+wp71+win8 /p:Configuration=Release - msbuild fsharp-library-build.proj /p:TargetFramework=sl5 /p:Configuration=Release - msbuild fsharp-library-build.proj /p:TargetFramework=wp7 /p:Configuration=Release - msbuild fsharp-library-build.proj /p:TargetFramework=net40-xna40-xbox360 /p:Configuration=Release - -Silverlight 5.0用にFSharp.CoreとFSharp.Compiler.Silverlight.dll -をビルドすることもできます: - - [lang=text] - msbuild fsharp-library-build.proj /p:TargetFramework=sl5-compiler /p:Configuration=Release - msbuild fsharp-compiler-build.proj /p:TargetFramework=sl5-compiler /p:Configuration=Release - -デバッグ版バイナリを出力する場合は ` /p:Configuration=Debug` に変更します。 - -### Windows上でxbuildを使用する(つまり.NETがインストールされておらず、Mono 3.0だけがインストールされている)場合 - - [lang=text] - cd src - xbuild fsharp-proto-build.proj - xbuild fsharp-library-build.proj - xbuild fsharp-compiler-build.proj - -xbuildを使用したビルドはMono準拠の公開用バイナリ生成にはまだ対応していないため -(src/fsharp/targets.make を参照)、個人的な使用にとどめ、 -公開用のビルドには使用してはいけません。 - -## 厳密名 - -生成されたFSharp.Core.dllには遅延署名だけが行われます -(Monoでは厳密名が必須ではありません)。 -厳密名で署名されたFSharp.Core.dllが必要であれば以下を使用してください: - - [lang=text] - lib\bootstrap\signed\3.0\v4.0\FSharp.Core.dll - -## 生成されるファイル - -ビルドが完了すると、メインのコンパイラバイナリは以下の場所に生成されます: - - [lang=text] - lib/release/4.0 - -.NET 2.0やMonoAndroid、MonoTouch(Monoプロファイル2.1)は以下の場所に生成されます: - - [lang=text] - lib/release/2.0 - lib/release/2.1 - lib/release/2.1monotouch - -`make install` を実行した場合のプレフィックスは以下のようになります: - - [lang=text] - /Library/Frameworks/Mono.framework/Versions/Current/lib/mono/2.0/FSharp.Core.dll - /Library/Frameworks/Mono.framework/Versions/Current/lib/mono/2.1/FSharp.Core.dll - /Library/Frameworks/Mono.framework/Versions/Current/lib/mono/4.0/fsc.exe - /Library/Frameworks/Mono.framework/Versions/Current/lib/mono/4.0/FSharp.Compiler.dll - ... - /Library/Frameworks/Mono.framework/Versions/Current/lib/mono/4.5/fsc.exe - /Library/Frameworks/Mono.framework/Versions/Current/lib/mono/4.5/FSharp.Compiler.dll - ... - /Library/Frameworks/Mono.framework/Versions/Current/lib/mono/gac/.../FSharp.Compiler.dll - /Library/Frameworks/Mono.framework/Versions/Current/lib/mono/gac/.../FSharp.Compiler.dll - ... - -またxbuildをサポートする場合は以下のプレフィックスになります: - - [lang=text] - /Library/Frameworks/Mono.framework/Versions/Current/lib/mono/Microsoft\ F#/v4.0/* - /Library/Frameworks/Mono.framework/Versions/Current/lib/mono/Microsoft\ SDKs/F#/3.0/Framework/* - -(これらの名前はVisual Studio由来のプロジェクトファイルで使用されている -Microsoft.FSharp.Targetsファイル内における正式名です) - -また、以下のスクリプトが配置されます: - - [lang=text] - /usr/bin/fsharpc (F# コンパイラ) - /usr/bin/fsharpi (F# Interactive) - -## 開発者用メモ - -### 継続的インテグレーションビルド - -このプロジェクトはJetBrains/Teamcityサーバー上において、 -F#コミュニティプロジェクトの一部として継続的インテグレーション -(CI:continuous integration)ビルドが行われています: - -[http://teamcity.codebetter.com/project.html?projectId=project61&tab=projectOverview](http://teamcity.codebetter.com/project.html?projectId=project61&tab=projectOverview) - -主な管理者は @forki です。 -今のところMono用に'make' installと、 -Windows用に 'cd src; msbuild fsharp-build.proj' のビルドが行われています。 -ビルドされたバイナリは保存されておらず、 -単にサニティチェックだけが対象になっています。 - -### Visual StudioまたはMonoDevelop上でコンパイラを編集する - -`all-vs2012.sln` を開いてモードをDebugまたはReleaseに設定します。 -コンパイラはコンパイル中でも気を利かせてワークフローに若干介入することがあるため、 -実際にコンパイルを実行するには上記にあるようなコマンドライン経由で -コンパイルするとよいでしょう。 - -MonoDevelopでサポートされているF#ではプロセス内バックグラウンドコンパイラが -使用されます。 -Mac上ではこれが原因でガベージコレクションを止めることがあり、 -MonoDevelop上でのコンパイラの編集がしづらくなる場合があります。 - -### .NET 4.x用にF# Coreの単体テストをビルドする(省略可) - -このプロジェクトでは、 `FSharp.Core.dll` や `FSharp.Compiler.dll` の一部を -チェックする単体テストをビルドするためにprotoコンパイラを使用しています。 -また、 `tests\fsharp` 以下にもいくつかのテストがあります。 - - [lang=text] - msbuild fsharp-library-unittests-build.proj /p:TargetFramework=net40 - -*注意: 単体テストをビルドする場合、NUnitをインストールしておく必要があります。* - -### 検証および使用方法 - -ビルドされたバイナリを簡単に検証するには、以下のようにして `fsi.exe` -(F# Interactive) を起動してみるとよいでしょう: - - [lang=text] - lib\debug\4.0\fsi.exe - 1 + 1;; - \#q;; - lib\debug\4.0\fsi.exe /help - lib\debug\4.0\fsc.exe /help - echo printfn "hello world" > hello.fs - lib\debug\4.0\fsc.exe hello.fs - hello.exe - - -### (Windows上で)コンパイラのテストを実行する - -`tests\fsharp\core` 以下には言語機能のテストがあります。 -テスト機構は素朴なもので、残念なことにバッチファイルを使用しています。 -これらのテストをWindows上で実行するには以下のようにします: - - [lang=text] - cd ..\tests\fsharp\core - ..\..\build-and-run-all-installed-ilx-configs.bat results.log - -それぞれのテストディレクトリには1つのテスト結果ファイルが生成され、 -発生したエラーも記録されます。 - - [lang=text] - tests\fsharp\core - tests\fsharp\core\queriesCustomQueryOps - tests\fsharp\core\queriesLeafExpressionConvert - tests\fsharp\core\queriesNullableOperators - tests\fsharp\core\queriesOverIEnumerable - ... - -LINQクエリに対するいくつかのテストではSQL Serverのインストールが必要です。 -テストが失敗すると、たとえば以下のように出力されます: - - [lang=text] - ERRORLEVEL=1: in tests\fsharp\core\csfromfs\build.bat - -この場合、関連するディレクトリに移動した後、 -`build.bat` および `run.bat` を実行します。 - -## 歴史 - -Microsoftから公開されたF#コンパイラのソースは -[fsharppowerpack.codeplex.com](http://fsharppowerpack.codeplex.com) にあります。 - -ブートストラップ用ライブラリ、ツール、F#コンパイラが利用できます。 -`lib/bootstrap/X.0` ディレクトリにはMonoビルド用ライブラリやコンパイラ、 -ビルドをブートストラップするために使用するツールなどが含まれています。 -ブートストラップを独自に指定する場合は `--with-bootstrap` オプションを使用します。 diff --git a/fcs/docsrc/content/ja/interactive.fsx b/fcs/docsrc/content/ja/interactive.fsx index 3344b41958b..63240cd98fd 100644 --- a/fcs/docsrc/content/ja/interactive.fsx +++ b/fcs/docsrc/content/ja/interactive.fsx @@ -1,5 +1,5 @@ (*** hide ***) -#I "../../../bin/v4.5/" +#I "../../../../debug/bin/net45/" (** インタラクティブサービス: F# Interactiveの組み込み ================================================== diff --git a/fcs/docsrc/content/ja/project.fsx b/fcs/docsrc/content/ja/project.fsx index 78cf6eff3e0..3e2895b9f38 100644 --- a/fcs/docsrc/content/ja/project.fsx +++ b/fcs/docsrc/content/ja/project.fsx @@ -1,5 +1,5 @@ (*** hide ***) -#I "../../../bin/v4.5/" +#I "../../../../debug/bin/net45/" (** コンパイラサービス: プロジェクトの分析 ====================================== diff --git a/fcs/docsrc/content/ja/symbols.fsx b/fcs/docsrc/content/ja/symbols.fsx index 15ebfab65b0..2e3f53bdba4 100644 --- a/fcs/docsrc/content/ja/symbols.fsx +++ b/fcs/docsrc/content/ja/symbols.fsx @@ -1,5 +1,5 @@ (*** hide ***) -#I "../../../bin/v4.5/" +#I "../../../../debug/bin/net45/" (** コンパイラサービス: シンボルの処理 ================================== @@ -113,8 +113,8 @@ fnVal.CurriedParameterGroups.[0].[0].Name // "x" fnVal.CurriedParameterGroups.[0].[1].Name // "y" fnVal.DeclarationLocation.StartLine // 3 fnVal.DisplayName // "foo" -fnVal.EnclosingEntity.DisplayName // "Test" -fnVal.EnclosingEntity.DeclarationLocation.StartLine // 1 +fnVal.DeclaringEntity.DisplayName // "Test" +fnVal.DeclaringEntity.DeclarationLocation.StartLine // 1 fnVal.GenericParameters.Count // 0 fnVal.InlineAnnotation // FSharpInlineAnnotation.OptionalInline fnVal.IsActivePattern // false diff --git a/fcs/docsrc/content/ja/tokenizer.fsx b/fcs/docsrc/content/ja/tokenizer.fsx index abcbb222c48..589061e0b0a 100644 --- a/fcs/docsrc/content/ja/tokenizer.fsx +++ b/fcs/docsrc/content/ja/tokenizer.fsx @@ -1,5 +1,5 @@ (*** hide ***) -#I "../../../bin/v4.5/" +#I "../../../../debug/bin/net45/" (** コンパイラサービス:F#トークナイザを使用する ============================================ diff --git a/fcs/docsrc/content/ja/untypedtree.fsx b/fcs/docsrc/content/ja/untypedtree.fsx index df6b6f4deb8..38f6e0b0e9c 100644 --- a/fcs/docsrc/content/ja/untypedtree.fsx +++ b/fcs/docsrc/content/ja/untypedtree.fsx @@ -1,5 +1,5 @@ (*** hide ***) -#I "../../../bin/v4.5/" +#I "../../../../debug/bin/net45/" (** コンパイラサービス:型無し構文木の処理 ====================================== @@ -88,7 +88,7 @@ let getUntypedTree (file, input) = `FSharpChecker` の詳細については [ APIドキュメント](../reference/microsoft-fsharp-compiler-sourcecodeservices-FSharpChecker.html) の他に、F# ソースコードのインラインコメントも参考になるでしょう -( [`service.fsi` のソースコードを参照](https://github.com/fsharp/fsharp/blob/fsharp_31/src/fsharp/vs/service.fsi) )。 +( [`service.fsi` のソースコードを参照](https://github.com/fsharp/fsharp/blob/fsharp_31/src/fsharp/service/service.fsi) )。 ASTの走査 --------- diff --git a/fcs/docsrc/content/queue.fsx b/fcs/docsrc/content/queue.fsx index e49fb006c33..f3d61f19bb3 100644 --- a/fcs/docsrc/content/queue.fsx +++ b/fcs/docsrc/content/queue.fsx @@ -19,7 +19,7 @@ To disable implicit background checking completely, set ``checker.ImplicitlyStar To change the time before background work starts, set ``checker.PauseBeforeBackgroundWork`` to the required number of milliseconds. Most calls to the FSharpChecker API enqueue an operation in the FSharpChecker compiler queue. These correspond to the -calls to EnqueueAndAwaitOpAsync in [service.fs](https://github.com/fsharp/FSharp.Compiler.Service/blob/master/src/fsharp/vs/service.fs). +calls to EnqueueAndAwaitOpAsync in [service.fs](https://github.com/fsharp/FSharp.Compiler.Service/blob/master/src/fsharp/service/service.fs). * For example, calling `ParseAndCheckProject` enqueues a `ParseAndCheckProjectImpl` operation. The time taken for the operation will depend on how much work is required to bring the project analysis up-to-date. diff --git a/fcs/docsrc/content/symbols.fsx b/fcs/docsrc/content/symbols.fsx index a4e118df1b0..fb6275fd37c 100644 --- a/fcs/docsrc/content/symbols.fsx +++ b/fcs/docsrc/content/symbols.fsx @@ -109,8 +109,8 @@ fnVal.CurriedParameterGroups.[0].[0].Name // "x" fnVal.CurriedParameterGroups.[0].[1].Name // "y" fnVal.DeclarationLocation.StartLine // 3 fnVal.DisplayName // "foo" -fnVal.EnclosingEntity.DisplayName // "Test" -fnVal.EnclosingEntity.DeclarationLocation.StartLine // 1 +fnVal.DeclaringEntity.DisplayName // "Test" +fnVal.DeclaringEntity.DeclarationLocation.StartLine // 1 fnVal.GenericParameters.Count // 0 fnVal.InlineAnnotation // FSharpInlineAnnotation.OptionalInline fnVal.IsActivePattern // false diff --git a/fcs/docsrc/tools/generate.fsx b/fcs/docsrc/tools/generate.fsx index 59bd10187af..000f25f6a47 100644 --- a/fcs/docsrc/tools/generate.fsx +++ b/fcs/docsrc/tools/generate.fsx @@ -32,7 +32,7 @@ open FSharp.MetadataFormat let root = "." // Paths with template/source/output locations -let bin = __SOURCE_DIRECTORY__ @@ "../../../Release/fcs/net45" +let bin = __SOURCE_DIRECTORY__ @@ "../../../release/fcs/net45" let content = __SOURCE_DIRECTORY__ @@ "../content" let output = __SOURCE_DIRECTORY__ @@ "../../../docs" let files = __SOURCE_DIRECTORY__ @@ "../files" diff --git a/fcs/docsrc/tools/generate.ja.fsx b/fcs/docsrc/tools/generate.ja.fsx index 8044db885d3..feaeb592d35 100644 --- a/fcs/docsrc/tools/generate.ja.fsx +++ b/fcs/docsrc/tools/generate.ja.fsx @@ -41,7 +41,7 @@ open FSharp.MetadataFormat let root = "." // Paths with template/source/output locations -let bin = __SOURCE_DIRECTORY__ @@ "../../../Release/fcs/net45" +let bin = __SOURCE_DIRECTORY__ @@ "../../../release/fcs/net45" let content = __SOURCE_DIRECTORY__ @@ "../content/ja" let outputJa = __SOURCE_DIRECTORY__ @@ "../../../docs/ja" let files = __SOURCE_DIRECTORY__ @@ "../files" diff --git a/fcs/fcs.props b/fcs/fcs.props index 88fb2f42ac1..470ea0b88da 100644 --- a/fcs/fcs.props +++ b/fcs/fcs.props @@ -3,14 +3,12 @@ - 16.0.3 + 22.0.3 + --version:$(VersionPrefix) + false $(FSharpSourcesRoot)\..\packages\FSharp.Compiler.Tools.4.1.27\tools fsi.exe - - 1.3.1 - {HintPathFromItem};{TargetFrameworkDirectory};{RawFileName} - \ No newline at end of file diff --git a/fcs/netfx.props b/fcs/netfx.props new file mode 100644 index 00000000000..064f29b1809 --- /dev/null +++ b/fcs/netfx.props @@ -0,0 +1,28 @@ + + + + + + + true + + + /Library/Frameworks/Mono.framework/Versions/Current/lib/mono + /usr/lib/mono + /usr/local/lib/mono + + + $(BaseFrameworkPathOverrideForMono)/4.5-api + $(BaseFrameworkPathOverrideForMono)/4.5.1-api + $(BaseFrameworkPathOverrideForMono)/4.5.2-api + $(BaseFrameworkPathOverrideForMono)/4.6-api + $(BaseFrameworkPathOverrideForMono)/4.6.1-api + $(BaseFrameworkPathOverrideForMono)/4.6.2-api + $(BaseFrameworkPathOverrideForMono)/4.7-api + $(BaseFrameworkPathOverrideForMono)/4.7.1-api + true + + + $(FrameworkPathOverride)/Facades;$(AssemblySearchPaths) + + \ No newline at end of file diff --git a/fcs/nuget/FSharp.Compiler.Service.MSBuild.v12.nuspec b/fcs/nuget/FSharp.Compiler.Service.MSBuild.v12.nuspec deleted file mode 100644 index ae9c17a7819..00000000000 --- a/fcs/nuget/FSharp.Compiler.Service.MSBuild.v12.nuspec +++ /dev/null @@ -1,24 +0,0 @@ - - - - FSharp.Compiler.Service.MSBuild.v12 - Adds legacy MSBuild 12.0 support to the F# compiler services package for resolving references such as #r "System, Version=4.1.0.0,..." - en-US - false - 16.0.3 - Microsoft Corporation and F# community contributors - https://github.com/fsharp/FSharp.Compiler.Service/blob/master/LICENSE - https://github.com/fsharp/FSharp.Compiler.Service - https://raw.github.com/fsharp/FSharp.Compiler.Service/master/misc/logo.png - F#, fsharp, interactive, compiler, editor - F# compiler services for creating IDE tools, language extensions and for F# embedding. - - - - - - - - - - diff --git a/fcs/nuget/FSharp.Compiler.Service.ProjectCracker.nuspec b/fcs/nuget/FSharp.Compiler.Service.ProjectCracker.nuspec deleted file mode 100644 index e45bb835728..00000000000 --- a/fcs/nuget/FSharp.Compiler.Service.ProjectCracker.nuspec +++ /dev/null @@ -1,29 +0,0 @@ - - - - FSharp.Compiler.Service.ProjectCracker - The F# compiler services package contains a custom build of the F# compiler that exposes additional functionality for implementing F# language bindings, additional tools based on the compiler or refactoring tools. The package also includes F# interactive service that can be used for embedding F# scripting into your applications. - en-US - false - 16.0.3 - Microsoft Corporation and F# community contributors - https://github.com/fsharp/FSharp.Compiler.Service/blob/master/LICENSE - https://github.com/fsharp/FSharp.Compiler.Service - https://raw.github.com/fsharp/FSharp.Compiler.Service/master/misc/logo.png - F#, fsharp, interactive, compiler, editor - F# compiler services for creating IDE tools, language extensions and for F# embedding. - - - - - - - - - - - - - - - diff --git a/fcs/nuget/FSharp.Compiler.Service.nuspec b/fcs/nuget/FSharp.Compiler.Service.nuspec deleted file mode 100644 index ba4c2e7c3d5..00000000000 --- a/fcs/nuget/FSharp.Compiler.Service.nuspec +++ /dev/null @@ -1,26 +0,0 @@ - - - - FSharp.Compiler.Service - The F# compiler services package contains a custom build of the F# compiler that exposes additional functionality for implementing F# language bindings, additional tools based on the compiler or refactoring tools. The package also includes F# interactive service that can be used for embedding F# scripting into your applications. - en-US - false - 16.0.3 - Microsoft Corporation and F# community contributors - https://github.com/fsharp/FSharp.Compiler.Service/blob/master/LICENSE - https://github.com/fsharp/FSharp.Compiler.Service - https://raw.github.com/fsharp/FSharp.Compiler.Service/master/misc/logo.png - F#, fsharp, interactive, compiler, editor - F# compiler services for creating IDE tools, language extensions and for F# embedding. - - - - - - - - - - - - diff --git a/fcs/paket.dependencies b/fcs/paket.dependencies index 39535eedd9d..ccaead9f031 100644 --- a/fcs/paket.dependencies +++ b/fcs/paket.dependencies @@ -4,9 +4,3 @@ source https://www.nuget.org/api/v2/ nuget FAKE nuget FSharp.Formatting - -nuget Microsoft.Build.Utilities.Core 14.3.0 -nuget Microsoft.Build.Framework 14.3.0 -nuget Microsoft.Build.Engine 14.3.0 -nuget Microsoft.Build 14.3.0 -nuget System.Threading.Tasks.Dataflow 4.5.24.0 \ No newline at end of file diff --git a/fcs/paket.lock b/fcs/paket.lock index 947bfc412b7..1ead25b452a 100644 --- a/fcs/paket.lock +++ b/fcs/paket.lock @@ -1,24 +1,10 @@ RESTRICTION: || (== net45) (== net46) NUGET remote: https://www.nuget.org/api/v2 - FAKE (4.63.2) + FAKE (4.64.6) FSharp.Compiler.Service (2.0.0.6) FSharp.Formatting (2.14.4) FSharp.Compiler.Service (2.0.0.6) FSharpVSPowerTools.Core (>= 2.3 < 2.4) FSharpVSPowerTools.Core (2.3) FSharp.Compiler.Service (>= 2.0.0.3) - Microsoft.Build (14.3) - Microsoft.Build.Framework (14.3) - Microsoft.Build.Engine (14.3) - Microsoft.Build.Framework (14.3) - Microsoft.Build.Framework (14.3) - System.Collections (>= 4.0.11) - restriction: || (&& (== net45) (>= netstandard1.3)) (== net46) - System.Runtime (>= 4.1) - restriction: || (&& (== net45) (>= netstandard1.3)) (== net46) - System.Runtime.InteropServices (>= 4.1) - restriction: || (&& (== net45) (>= netstandard1.3)) (== net46) - Microsoft.Build.Utilities.Core (14.3) - Microsoft.Build.Framework (14.3) - System.Collections (4.3) - restriction: || (&& (== net45) (>= netstandard1.3)) (== net46) - System.Runtime (4.3) - restriction: || (&& (== net45) (>= netstandard1.3)) (== net46) - System.Runtime.InteropServices (4.3) - restriction: || (&& (== net45) (>= netstandard1.3)) (== net46) - System.Threading.Tasks.Dataflow (4.5.24) diff --git a/fcs/samples/EditorService/EditorService.fsproj b/fcs/samples/EditorService/EditorService.fsproj index e232d6c5eff..05847e67f90 100644 --- a/fcs/samples/EditorService/EditorService.fsproj +++ b/fcs/samples/EditorService/EditorService.fsproj @@ -1,64 +1,23 @@ - - - + + + - Debug - AnyCPU - $(MSBuildProjectDirectory)\..\..\ - 2.0 - a40507d6-fa48-43d3-b18a-ae3daace4020 + net46;netcoreapp2.0 + true Exe - EditorService - EditorService - v4.5 - EditorService - - true - - - true - full - false - false - bin\Debug\ - DEBUG;TRACE - 3 - AnyCPU - bin\Debug\EditorService.xml - true - - - pdbonly - true - true - bin\Release\ - TRACE - 3 - AnyCPU - bin\Release\EditorService.xml - true + false - - - - $(SolutionDir)\..\packages\Microsoft.Portable.FSharp.Core.4.1.20\lib\profiles\net40\FSharp.Core.dll - false - - - - - - - - FSharp.Compiler.Service - {2e4d67b4-522d-4cf7-97e4-ba940f0b18f3} - True - + + + + + + + - - \ No newline at end of file + diff --git a/fcs/samples/EditorService/paket.references b/fcs/samples/EditorService/paket.references deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/fcs/samples/FscExe/FscExe.fsproj b/fcs/samples/FscExe/FscExe.fsproj index 946034ec67c..c482656827f 100644 --- a/fcs/samples/FscExe/FscExe.fsproj +++ b/fcs/samples/FscExe/FscExe.fsproj @@ -1,76 +1,24 @@ - - - - + + + - $(MSBuildProjectDirectory)\..\..\..\src - - - Debug - AnyCPU - $(MSBuildProjectDirectory)\..\..\ - x86 - {C94C257C-3C0A-4858-B5D8-D746498D1F08} + net46 + true Exe - $(NoWarn);62;44 - FscExe - FscExe - COMPILER;$(DefineConstants) - FX_RESIDENT_COMPILER;$(DefineConstants) - true - $(OtherFlags) --warnon:1182 - true - 4.4.0.0 - v4.5 - - - - true - full - false - false - bin\Debug\ - TRACE;DEBUG;$(DefineConstants) - 3 - AnyCPU - bin\Debug\FsiExe.xml - true - - - - - pdbonly - true - true - bin\Release\ - TRACE;$(DefineConstants) - 3 - AnyCPU - bin\Release\FsiExe.xml - true + false + $(DefineConstants);RESIDENT_COMPILER - - Driver/FscMain.fs - + - - - $(FSharpSourcesRoot)\..\packages\FSharp.Compiler.Tools.4.1.27\tools\FSharp.Core.dll - true - - - + + - - - FSharp.Compiler.Service - {2e4d67b4-522d-4cf7-97e4-ba940f0b18f3} - True - + + + - - \ No newline at end of file + diff --git a/fcs/samples/FscExe/FscMain.fs b/fcs/samples/FscExe/FscMain.fs index 6a639ea678d..af8f290df78 100644 --- a/fcs/samples/FscExe/FscMain.fs +++ b/fcs/samples/FscExe/FscMain.fs @@ -14,11 +14,7 @@ open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library open Microsoft.FSharp.Compiler.ErrorLogger open Microsoft.FSharp.Compiler.Range -#if FX_RESHAPED_REFLECTION -open Microsoft.FSharp.Core.ReflectionAdapters -#endif - -#if FX_RESIDENT_COMPILER +#if RESIDENT_COMPILER type TypeInThisAssembly() = member x.Dummy = 1 let progress = ref false @@ -58,19 +54,15 @@ module FSharpResidentCompiler = // Use different base channel names on mono and CLR as a CLR remoting process can't talk // to a mono server static let baseChannelName = -#if ENABLE_MONO_SUPPORT if runningOnMono then "FSCChannelMono" else -#endif "FSCChannel" static let channelName = baseChannelName + "_" + domainName + "_" + userName static let serverName = -#if ENABLE_MONO_SUPPORT if runningOnMono then "FSCServerMono" else -#endif "FSCSever" static let mutable serverExists = true @@ -131,7 +123,6 @@ module FSharpResidentCompiler = // On Unix, the file permissions of the implicit socket need to be set correctly to make this // private to the user. -#if ENABLE_MONO_SUPPORT if runningOnMono then try let monoPosix = System.Reflection.Assembly.Load(new System.Reflection.AssemblyName("Mono.Posix, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756")) @@ -152,7 +143,6 @@ module FSharpResidentCompiler = #endif () // Fail silently -#endif server.Run() static member private ConnectToServer() = @@ -177,7 +167,6 @@ module FSharpResidentCompiler = with _ -> if !progress then printfn "client: error while creating client, starting client instead" let procInfo = -#if ENABLE_MONO_SUPPORT if runningOnMono then let shellName, useShellExecute = match System.Environment.GetEnvironmentVariable("FSC_MONO") with @@ -194,7 +183,6 @@ module FSharpResidentCompiler = CreateNoWindow = true, UseShellExecute = useShellExecute) else -#endif ProcessStartInfo(FileName=fscServerExe, Arguments = "/server", CreateNoWindow = true, @@ -274,6 +262,7 @@ module Driver = System.Console.WriteLine("Press any key to continue...") System.Console.ReadKey() |> ignore +#if RESIDENT_COMPILER if runningOnMono && hasArgument "resident" argv then let argv = stripArgument "resident" argv @@ -293,14 +282,13 @@ module Driver = elif runningOnMono && hasArgument "server" argv then FSharpResidentCompiler.FSharpCompilationServer.RunServer() 0 - +#endif else let errors, exitCode = FSharpChecker.Create().Compile (argv) |> Async.RunSynchronously for error in errors do eprintfn "%s" (error.ToString()) exitCode -#if FX_NO_DEFAULT_DEPENDENCY_TYPE -#else +#if !FX_NO_DEFAULT_DEPENDENCY_TYPE [] #endif do () diff --git a/fcs/samples/FscExe/paket.references b/fcs/samples/FscExe/paket.references deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/fcs/samples/FsiExe/FsiExe.fsproj b/fcs/samples/FsiExe/FsiExe.fsproj index ef52e8ee777..7377f2c2912 100644 --- a/fcs/samples/FsiExe/FsiExe.fsproj +++ b/fcs/samples/FsiExe/FsiExe.fsproj @@ -1,63 +1,12 @@ - - - + + + - $(MSBuildProjectDirectory)\..\..\..\src - - - Debug - AnyCPU - $(MSBuildProjectDirectory)\..\..\ - 2.0 - {f9540ca8-1ce0-4546-a23a-a461e416e95b} + net46 + true Exe - FsiExe - FsiExe - v4.5 - FsiExe - 40 - - true - - - true - full - false - false - bin\Debug\ - TRACE;DEBUG - 3 - AnyCPU - bin\Debug\FsiExe.xml - true - - - - - pdbonly - true - true - bin\Release\ - TRACE - 3 - AnyCPU - bin\Release\FsiExe.xml - true + false - - - - $(FSharpSourcesRoot)\..\packages\FSharp.Compiler.Tools.4.1.27\tools\FSharp.Core.dll - true - - - - - - - - - @@ -65,11 +14,13 @@ - - FSharp.Compiler.Service - {2e4d67b4-522d-4cf7-97e4-ba940f0b18f3} - True - + + + + + + + + - - \ No newline at end of file + diff --git a/fcs/samples/FsiExe/paket.references b/fcs/samples/FsiExe/paket.references deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/fcs/samples/InteractiveService/InteractiveService.fsproj b/fcs/samples/InteractiveService/InteractiveService.fsproj index 4efd2a56b12..7aa42497261 100644 --- a/fcs/samples/InteractiveService/InteractiveService.fsproj +++ b/fcs/samples/InteractiveService/InteractiveService.fsproj @@ -1,68 +1,22 @@ - - - + + + - $(MSBuildProjectDirectory)\..\..\..\src - - - Debug - AnyCPU - $(MSBuildProjectDirectory)\..\..\ - 2.0 - 067e95e5-e3dc-4ca7-813a-4d1e277d2d52 + net46 + true Exe - InteractiveService - InteractiveService - v4.5 - InteractiveService - 4.4.0.0 - - true - - - true - full - false - false - bin\Debug\ - DEBUG;TRACE - 3 - AnyCPU - bin\Debug\InteractiveService.xml - true - - - pdbonly - true - true - bin\Release\ - TRACE - 3 - AnyCPU - bin\Release\InteractiveService.xml - true + false - - - - $(FSharpSourcesRoot)\..\packages\FSharp.Compiler.Tools.4.1.27\tools\FSharp.Core.dll - true - - - - - - - - FSharp.Compiler.Service - {2e4d67b4-522d-4cf7-97e4-ba940f0b18f3} - True - + + + + + + - - \ No newline at end of file + diff --git a/fcs/samples/InteractiveService/paket.references b/fcs/samples/InteractiveService/paket.references deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/fcs/samples/Tokenizer/Tokenizer.fsproj b/fcs/samples/Tokenizer/Tokenizer.fsproj index a58aaf190f4..7aa42497261 100644 --- a/fcs/samples/Tokenizer/Tokenizer.fsproj +++ b/fcs/samples/Tokenizer/Tokenizer.fsproj @@ -1,71 +1,22 @@ - - - + + + - $(MSBuildProjectDirectory)\..\..\..\src - - - Debug - AnyCPU - $(MSBuildProjectDirectory)\..\..\ - 2.0 - 92793069-816f-4f69-84ac-0966f8275e65 + net46 + true Exe - Tokenizer - Tokenizer - v4.5 - Tokenizer - 4.4.0.0 - - true - - - true - full - false - false - bin\Debug\ - DEBUG;TRACE - 3 - AnyCPU - bin\Debug\Tokenizer.xml - true - - - pdbonly - true - true - bin\Release\ - TRACE - 3 - AnyCPU - bin\Release\Tokenizer.xml - true + false - - - - $(FSharpSourcesRoot)\..\packages\FSharp.Compiler.Tools.4.1.27\tools\FSharp.Core.dll - true - - - - - - - - FSharp.Compiler.Service - {2e4d67b4-522d-4cf7-97e4-ba940f0b18f3} - True - + + - - 11 - - - \ No newline at end of file + + + + + diff --git a/fcs/samples/Tokenizer/paket.references b/fcs/samples/Tokenizer/paket.references deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/fcs/samples/UntypedTree/UntypedTree.fsproj b/fcs/samples/UntypedTree/UntypedTree.fsproj index e8818931cdd..7aa42497261 100644 --- a/fcs/samples/UntypedTree/UntypedTree.fsproj +++ b/fcs/samples/UntypedTree/UntypedTree.fsproj @@ -1,71 +1,22 @@ - - - + + + - $(MSBuildProjectDirectory)\..\..\..\src - - - Debug - AnyCPU - 2.0 - c816728d-bbea-472d-9f6c-e8913957a673 + net46 + true Exe - UntypedTree - UntypedTree - v4.5 - UntypedTree - 4.4.0.0 - - true - $(MSBuildProjectDirectory)\..\..\ - - - true - full - false - false - bin\Debug\ - DEBUG;TRACE - 3 - AnyCPU - bin\Debug\UntypedTree.xml - true - - - pdbonly - true - true - bin\Release\ - TRACE - 3 - AnyCPU - bin\Release\UntypedTree.xml - true + false - - - - $(FSharpSourcesRoot)\..\packages\FSharp.Compiler.Tools.4.1.27\tools\FSharp.Core.dll - true - - - - - - - - FSharp.Compiler.Service - {2e4d67b4-522d-4cf7-97e4-ba940f0b18f3} - True - + + - - 11 - - - \ No newline at end of file + + + + + diff --git a/fcs/samples/UntypedTree/UntypedTree.sln b/fcs/samples/UntypedTree/UntypedTree.sln deleted file mode 100644 index a7b50130754..00000000000 --- a/fcs/samples/UntypedTree/UntypedTree.sln +++ /dev/null @@ -1,20 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2012 -Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "UntypedTree", "UntypedTree.fsproj", "{C816728D-BBEA-472D-9F6C-E8913957A673}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {C816728D-BBEA-472D-9F6C-E8913957A673}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C816728D-BBEA-472D-9F6C-E8913957A673}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C816728D-BBEA-472D-9F6C-E8913957A673}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C816728D-BBEA-472D-9F6C-E8913957A673}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/fcs/samples/UntypedTree/paket.references b/fcs/samples/UntypedTree/paket.references deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/fcs/tools.fsproj b/fcs/tools.fsproj deleted file mode 100644 index 45aa251d767..00000000000 --- a/fcs/tools.fsproj +++ /dev/null @@ -1,10 +0,0 @@ - - - Exe - net45 - - - - - - \ No newline at end of file diff --git a/mono/appveyor.ps1 b/mono/appveyor.ps1 index b26a52d32f9..30445b98db0 100644 --- a/mono/appveyor.ps1 +++ b/mono/appveyor.ps1 @@ -1,6 +1,6 @@ # the version under development, update after a release -$version = '4.1.28' +$version = '4.1.31' function isVersionTag($tag){ $v = New-Object Version diff --git a/mono/build-mono.sh b/mono/build-mono.sh index 28ba3622aa9..12e49fae468 100755 --- a/mono/build-mono.sh +++ b/mono/build-mono.sh @@ -1,24 +1,8 @@ #!/bin/sh -# Perform any necessary setup prior to running builds -# (e.g., restoring NuGet packages). -echo "prepare-mono.sh..." - -./mono/prepare-mono.sh - -rc=$?; -if [ $rc -ne 0 ]; then - echo "mono/prepare-mono script failed." - exit $rc -fi -echo "done mono/prepare-mono.sh, building..." - -chmod +x mono/travis-autogen.sh - -# Generate the makefiles # Bootstrap the compiler # Install the compiler -./mono/travis-autogen.sh && \ +./mono/prepare-mono.sh && \ make && \ sudo make install diff --git a/mono/cibuild.sh b/mono/cibuild.sh new file mode 100755 index 00000000000..e91b33e7839 --- /dev/null +++ b/mono/cibuild.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +# note: expects to run from top directory +./mono/latest-mono-stable.sh +make Configuration=$@ +#sudo make install Configuration=$@ +#./mono/test-mono.sh \ No newline at end of file diff --git a/mono/config.make b/mono/config.make new file mode 100644 index 00000000000..91351b8ef85 --- /dev/null +++ b/mono/config.make @@ -0,0 +1,281 @@ +DEFAULT: all + +.PHONY: install-sdk-lib + +monocmd = $(shell which mono) +monocmddir = $(dir $(monocmd)) +prefix = $(shell (cd $(monocmddir)/..; pwd)) +thisdir = $(dir $(realpath $(lastword $(MAKEFILE_LIST)))) +topdir = $(thisdir)../ +builddir = $(topdir) +libdir = $(prefix)/lib/ +bindir = $(prefix)/bin/ +monobindir = $(bindir) +monolibdir = $(libdir) +monodir = $(monolibdir)mono + +debugvars: + @echo prefix=$(prefix) + @echo topdir=$(topdir) + @echo monodir=$(monodir) + @echo monolibdir=$(monolibdir) + @echo monobindir=$(monobindir) + +TargetDotnetProfile = net40 +Configuration = Release +DISTVERSION = 201011 + +# Version number mappings for various versions of FSharp.Core + + +ifeq (x-$(TargetDotnetProfile)-,x-net40-) + +ifeq (x-$(FSharpCoreBackVersion)-,x--) +VERSION = 4.4.1.0 +PKGINSTALL = yes +REFASSEMPATH = .NETFramework/v4.0 +outsuffix = $(TargetDotnetProfile) +endif + +ifeq (x-$(FSharpCoreBackVersion)-,x-3.0-) +VERSION = 4.3.0.0 +REFASSEMPATH = .NETFramework/v4.0 +outsuffix = fsharp30/$(TargetDotnetProfile) +endif + +ifeq (x-$(FSharpCoreBackVersion)-,x-3.1-) +VERSION = 4.3.1.0 +REFASSEMPATH = .NETFramework/v4.0 +outsuffix = fsharp31/$(TargetDotnetProfile) +endif + +ifeq (x-$(FSharpCoreBackVersion)-,x-4.0-) +VERSION = 4.4.0.0 +REFASSEMPATH = .NETFramework/v4.0 +outsuffix = fsharp40/$(TargetDotnetProfile) +endif + +endif + +ifeq (x-$(TargetDotnetProfile)-,x-monoandroid10+monotouch10+xamarinios10-) +VERSION = 3.98.41.0 +outsuffix = $(TargetDotnetProfile) +endif + + +ifeq (x-$(TargetDotnetProfile)-,x-xamarinmacmobile-) +VERSION = 3.99.41.0 +outsuffix = $(TargetDotnetProfile) +endif + +ifeq (x-$(TargetDotnetProfile)-,x-portable47-) +VERSION = 3.47.41.0 +PCLPATH = .NETPortable +outsuffix = $(TargetDotnetProfile) +endif + +ifeq (x-$(TargetDotnetProfile)-,x-portable7-) +VERSION = 3.7.41.0 +PCLPATH = .NETCore +outsuffix = $(TargetDotnetProfile) +endif + +ifeq (x-$(TargetDotnetProfile)-,x-portable78-) +VERSION = 3.78.41.0 +PCLPATH = .NETCore +outsuffix = $(TargetDotnetProfile) +endif + +ifeq (x-$(TargetDotnetProfile)-,x-portable259-) +VERSION = 3.259.41.0 +PCLPATH = .NETCore +outsuffix = $(TargetDotnetProfile) +endif + + +FSCORE_DELAY_SIGN_TOKEN = b03f5f7f11d50a3a +SIGN_TOKEN = f536804aa0eb945b + +tmpdir = .libs/$(Configuration)/ +outdir = $(builddir)$(Configuration)/$(outsuffix)/bin/ + +INSTALL = $(SHELL) $(topdir)/mono/install-sh +INSTALL_BIN = $(INSTALL) -c -m 755 +INSTALL_LIB = $(INSTALL_BIN) + +MSBUILD = msbuild + +EXTRA_DIST = configure +NO_DIST = .gitignore lib/debug lib/proto lib/release + + +# Install .optdata/.sigdata if they exist (they go alongside FSharp.Core) +# Install the .Targets file. The XBuild targets file gets installed into the place(s) expected for standard F# project +# files. For F# 2.0 project files this is +# /usr/lib/mono/Microsoft F#/v4.0/Microsoft.FSharp.Targets +# For F# 3.0 project files this is +# /usr/lib/mono/Microsoft SDKs/F#/3.0/Framework/v4.0/Microsoft.FSharp.Targets +# For F# 3.1 project files this is +# /usr/lib/mono/xbuild/Microsoft/VisualStudio/v12.0/FSharp/Microsoft.FSharp.Targets +# For F# 4.0 project files this is +# /usr/lib/mono/xbuild/Microsoft/VisualStudio/v14.0/FSharp/Microsoft.FSharp.Targets +# For F# 4.1 project files this is +# /usr/lib/mono/xbuild/Microsoft/VisualStudio/v15.0/FSharp/Microsoft.FSharp.Targets +# +# Here 12.0/14.0/15.0 is 'VisualStudioVersion'. xbuild should set this to 11.0/12.0/14.0/15.0, copying MSBuild. +# +# We put the F# targets and link the SDK DLLs for all these locations +# +# We put a forwarding targets file into all three locations. We also put one in +# .../lib/mono/xbuild/Microsoft/VisualStudio/v/FSharp/Microsoft.FSharp.Targets +# since this is the location if 'xbuild' fails to set VisualStudioVersion. +# +install-sdk-lib: + @echo "Installing $(ASSEMBLY)" + @mkdir -p $(DESTDIR)$(monodir)/fsharp + @if test "x$(DELAY_SIGN)" = "x1"; then \ + echo "Signing $(outdir)$(ASSEMBLY) with Mono key"; \ + $(monobindir)sn -q -R $(outdir)$(ASSEMBLY) $(topdir)mono/mono.snk; \ + fi + @if test x-$(NAME) = x-FSharp.Compiler.Private; then \ + echo "Installing extra dependency System.Collections.Immutable.dll to $(DESTDIR)$(monodir)/fsharp/"; \ + $(INSTALL_LIB) $(outdir)System.Collections.Immutable.dll $(DESTDIR)$(monodir)/fsharp/; \ + echo "Installing extra dependency System.Reflection.Metadata.dll to $(DESTDIR)$(monodir)/fsharp/"; \ + $(INSTALL_LIB) $(outdir)System.Reflection.Metadata.dll $(DESTDIR)$(monodir)/fsharp/; \ + fi + @if test x-$(NAME) = x-FSharp.Build; then \ + echo "Installing Microsoft.FSharp.Targets and Microsoft.Portable.FSharp.Targets into install locations matching Visual Studio"; \ + echo " --> $(DESTDIR)$(monodir)/fsharp/"; \ + echo " --> $(DESTDIR)$(monodir)/Microsoft\ F#/v4.0/"; \ + echo " --> $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/3.0/Framework/v4.0/"; \ + echo " --> $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/3.1/Framework/v4.0/"; \ + echo " --> $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/4.0/Framework/v4.0/"; \ + echo " --> $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/4.1/Framework/v4.0/"; \ + echo " --> $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v/FSharp/"; \ + echo " --> $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v11.0/FSharp/"; \ + echo " --> $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v12.0/FSharp/"; \ + echo " --> $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v14.0/FSharp/"; \ + echo " --> $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v15.0/FSharp/"; \ + \ + mkdir -p $(tmpdir); \ + mkdir -p $(DESTDIR)$(monodir)/Microsoft\ F#/v4.0/; \ + mkdir -p $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/3.0/Framework/v4.0/; \ + mkdir -p $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/3.1/Framework/v4.0/; \ + mkdir -p $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/4.0/Framework/v4.0/; \ + mkdir -p $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/4.1/Framework/v4.0/; \ + mkdir -p $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v/FSharp/; \ + mkdir -p $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v11.0/FSharp/; \ + mkdir -p $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v12.0/FSharp/; \ + mkdir -p $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v14.0/FSharp/; \ + mkdir -p $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v15.0/FSharp/; \ + \ + $(INSTALL_LIB) $(outdir)Microsoft.FSharp.Targets $(DESTDIR)$(monodir)/fsharp/; \ + $(INSTALL_LIB) $(outdir)Microsoft.Portable.FSharp.Targets $(DESTDIR)$(monodir)/fsharp/; \ + \ + echo '' > $(tmpdir)Microsoft.FSharp.Targets; \ + echo ' ' >> $(tmpdir)Microsoft.FSharp.Targets; \ + echo '' >> $(tmpdir)Microsoft.FSharp.Targets; \ + $(INSTALL_LIB) $(tmpdir)Microsoft.FSharp.Targets $(DESTDIR)$(monodir)/Microsoft\ F#/v4.0/; \ + $(INSTALL_LIB) $(tmpdir)Microsoft.FSharp.Targets $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/3.0/Framework/v4.0/; \ + $(INSTALL_LIB) $(tmpdir)Microsoft.FSharp.Targets $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/3.1/Framework/v4.0/; \ + $(INSTALL_LIB) $(tmpdir)Microsoft.FSharp.Targets $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/4.0/Framework/v4.0/; \ + $(INSTALL_LIB) $(tmpdir)Microsoft.FSharp.Targets $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/4.1/Framework/v4.0/; \ + $(INSTALL_LIB) $(tmpdir)Microsoft.FSharp.Targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v/FSharp/; \ + $(INSTALL_LIB) $(tmpdir)Microsoft.FSharp.Targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v11.0/FSharp/; \ + $(INSTALL_LIB) $(tmpdir)Microsoft.FSharp.Targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v12.0/FSharp/; \ + $(INSTALL_LIB) $(tmpdir)Microsoft.FSharp.Targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v14.0/FSharp/; \ + $(INSTALL_LIB) $(tmpdir)Microsoft.FSharp.Targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v15.0/FSharp/; \ + \ + echo '' > $(tmpdir)Microsoft.Portable.FSharp.Targets; \ + echo ' ' >> $(tmpdir)Microsoft.Portable.FSharp.Targets; \ + echo '' >> $(tmpdir)Microsoft.Portable.FSharp.Targets; \ + $(INSTALL_LIB) $(tmpdir)Microsoft.Portable.FSharp.Targets $(DESTDIR)$(monodir)/Microsoft\ F#/v4.0/; \ + $(INSTALL_LIB) $(tmpdir)Microsoft.Portable.FSharp.Targets $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/3.0/Framework/v4.0/; \ + $(INSTALL_LIB) $(tmpdir)Microsoft.Portable.FSharp.Targets $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/3.1/Framework/v4.0/; \ + $(INSTALL_LIB) $(tmpdir)Microsoft.Portable.FSharp.Targets $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/4.0/Framework/v4.0/; \ + $(INSTALL_LIB) $(tmpdir)Microsoft.Portable.FSharp.Targets $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/4.1/Framework/v4.0/; \ + $(INSTALL_LIB) $(tmpdir)Microsoft.Portable.FSharp.Targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v/FSharp/; \ + $(INSTALL_LIB) $(tmpdir)Microsoft.Portable.FSharp.Targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v11.0/FSharp/; \ + $(INSTALL_LIB) $(tmpdir)Microsoft.Portable.FSharp.Targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v12.0/FSharp/; \ + $(INSTALL_LIB) $(tmpdir)Microsoft.Portable.FSharp.Targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v14.0/FSharp/; \ + $(INSTALL_LIB) $(tmpdir)Microsoft.Portable.FSharp.Targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v15.0/FSharp/; \ + \ + $(INSTALL_LIB) $(outdir)Microsoft.FSharp.NetSdk.props $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v/FSharp/; \ + $(INSTALL_LIB) $(outdir)Microsoft.FSharp.NetSdk.props $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v11.0/FSharp/; \ + $(INSTALL_LIB) $(outdir)Microsoft.FSharp.NetSdk.props $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v12.0/FSharp/; \ + $(INSTALL_LIB) $(outdir)Microsoft.FSharp.NetSdk.props $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v14.0/FSharp/; \ + $(INSTALL_LIB) $(outdir)Microsoft.FSharp.NetSdk.props $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v15.0/FSharp/; \ + \ + $(INSTALL_LIB) $(outdir)Microsoft.FSharp.NetSdk.targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v/FSharp/; \ + $(INSTALL_LIB) $(outdir)Microsoft.FSharp.NetSdk.targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v11.0/FSharp/; \ + $(INSTALL_LIB) $(outdir)Microsoft.FSharp.NetSdk.targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v12.0/FSharp/; \ + $(INSTALL_LIB) $(outdir)Microsoft.FSharp.NetSdk.targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v14.0/FSharp/; \ + $(INSTALL_LIB) $(outdir)Microsoft.FSharp.NetSdk.targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v15.0/FSharp/; \ + \ + $(INSTALL_LIB) $(outdir)Microsoft.FSharp.Overrides.NetSdk.targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v/FSharp/; \ + $(INSTALL_LIB) $(outdir)Microsoft.FSharp.Overrides.NetSdk.targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v11.0/FSharp/; \ + $(INSTALL_LIB) $(outdir)Microsoft.FSharp.Overrides.NetSdk.targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v12.0/FSharp/; \ + $(INSTALL_LIB) $(outdir)Microsoft.FSharp.Overrides.NetSdk.targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v14.0/FSharp/; \ + $(INSTALL_LIB) $(outdir)Microsoft.FSharp.Overrides.NetSdk.targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v15.0/FSharp/; \ + fi + @if test x-$(outsuffix) = x-net40; then \ + if test -e $(outdir)$(NAME).dll; then \ + echo "Installing $(outdir)$(NAME).dll to $(DESTDIR)$(monodir)/fsharp/"; \ + mkdir -p $(DESTDIR)$(monodir)/fsharp/; \ + $(INSTALL_LIB) $(outdir)$(NAME).dll $(DESTDIR)$(monodir)/fsharp/; \ + fi; \ + if test -e $(outdir)$(NAME).dll.config; then \ + echo "Installing $(outdir)$(NAME).dll to $(DESTDIR)$(monodir)/fsharp/"; \ + mkdir -p $(DESTDIR)$(monodir)/fsharp/; \ + $(INSTALL_LIB) $(outdir)$(NAME).dll.config $(DESTDIR)$(monodir)/fsharp/; \ + fi; \ + if test -e $(outdir)$(NAME).xml; then \ + echo "Installing $(outdir)$(NAME).xml into $(DESTDIR)$(monodir)/fsharp/"; \ + mkdir -p $(DESTDIR)$(monodir)/fsharp/; \ + $(INSTALL_LIB) $(outdir)$(NAME).xml $(DESTDIR)$(monodir)/fsharp/; \ + fi; \ + if test -e $(outdir)$(NAME).sigdata; then \ + echo "Installing $(outdir)$(NAME).sigdata into $(DESTDIR)$(monodir)/fsharp/"; \ + mkdir -p $(DESTDIR)$(monodir)/fsharp/; \ + $(INSTALL_LIB) $(outdir)$(NAME).sigdata $(DESTDIR)$(monodir)/fsharp/; \ + fi; \ + if test -e $(outdir)$(NAME).optdata; then \ + echo "Installing $(outdir)$(NAME).optdata into $(DESTDIR)$(monodir)/fsharp/"; \ + mkdir -p $(DESTDIR)$(monodir)/fsharp/; \ + $(INSTALL_LIB) $(outdir)$(NAME).optdata $(DESTDIR)$(monodir)/fsharp/; \ + fi; \ + fi + @if test x-$(NAME) = x-FSharp.Core && test x-$(REFASSEMPATH) != x-; then \ + echo "Installing FSharp.Core $(VERSION) reference assembly into api location"; \ + echo " --> $(DESTDIR)$(monodir)/fsharp/api/$(REFASSEMPATH)/$(VERSION)"; \ + mkdir -p $(DESTDIR)$(monodir)/fsharp/api/$(REFASSEMPATH)/$(VERSION); \ + $(INSTALL_LIB) $(outdir)$(NAME).xml $(DESTDIR)$(monodir)/fsharp/api/$(REFASSEMPATH)/$(VERSION)/; \ + $(INSTALL_LIB) $(outdir)$(NAME).sigdata $(DESTDIR)$(monodir)/fsharp/api/$(REFASSEMPATH)/$(VERSION)/; \ + $(INSTALL_LIB) $(outdir)$(NAME).optdata $(DESTDIR)$(monodir)/fsharp/api/$(REFASSEMPATH)/$(VERSION)/; \ + $(INSTALL_LIB) $(outdir)$(NAME).dll $(DESTDIR)$(monodir)/fsharp/api/$(REFASSEMPATH)/$(VERSION)/; \ + fi + @if test x-$(NAME) = x-FSharp.Core && test x-$(PCLPATH) != x-; then \ + echo "Installing FSharp.Core $(VERSION) reference assembly into api location"; \ + echo " --> $(DESTDIR)$(monodir)/fsharp/$(PCLPATH)/$(VERSION)"; \ + mkdir -p $(DESTDIR)$(monodir)/fsharp/api/$(PCLPATH)/$(VERSION); \ + $(INSTALL_LIB) $(outdir)$(NAME).xml $(DESTDIR)$(monodir)/fsharp/api/$(PCLPATH)/$(VERSION)/; \ + $(INSTALL_LIB) $(outdir)$(NAME).sigdata $(DESTDIR)$(monodir)/fsharp/api/$(PCLPATH)/$(VERSION)/; \ + $(INSTALL_LIB) $(outdir)$(NAME).optdata $(DESTDIR)$(monodir)/fsharp/api/$(PCLPATH)/$(VERSION)/; \ + $(INSTALL_LIB) $(outdir)$(NAME).dll $(DESTDIR)$(monodir)/fsharp/api/$(PCLPATH)/$(VERSION)/; \ + fi + + + +# The binaries fsc.exe and fsi.exe only get installed for Mono 4.5 profile +# This also installs 'fsharpc' and 'fsharpi' and 'fsharpiAnyCpu' +install-bin: + chmod +x $(outdir)$(ASSEMBLY) + sed -e 's,[@]DIR[@],$(monodir)/fsharp,g' -e 's,[@]TOOL[@],$(ASSEMBLY),g' -e 's,[@]MONOBINDIR[@],$(monobindir),g' < $(topdir)mono/launcher > $(outdir)$(subst fs,fsharp,$(NAME)) + chmod +x $(outdir)$(subst fs,fsharp,$(NAME)) + @mkdir -p $(DESTDIR)$(monodir)/fsharp + @mkdir -p $(DESTDIR)$(bindir) + $(INSTALL_BIN) $(outdir)$(ASSEMBLY) $(DESTDIR)$(monodir)/fsharp + $(INSTALL_BIN) $(outdir)$(ASSEMBLY).config $(DESTDIR)$(monodir)/fsharp + $(INSTALL_BIN) $(outdir)$(subst fs,fsharp,$(NAME)) $(DESTDIR)$(bindir) + + diff --git a/mono/config.make.in b/mono/config.make.in deleted file mode 100644 index 3106ab99fd4..00000000000 --- a/mono/config.make.in +++ /dev/null @@ -1,267 +0,0 @@ -DEFAULT: all - -.PHONY: install-sdk-lib - -prefix := @prefix@ -topdir := @abs_top_srcdir@/ -builddir := @abs_top_builddir@/ -libdir := ${prefix}/lib/ -bindir := ${prefix}/bin/ -monobindir := @MONOBINDIR@ -monolibdir := @MONOLIBDIR@ - -monodir := ${libdir}mono - -TargetDotnetProfile = net40 -CONFIG = release -Configuration = Release -DISTVERSION = 201011 - -# Version number mappings for various versions of FSharp.Core - - -ifeq (x-$(TargetDotnetProfile)-,x-net40-) - -ifeq (x-$(FSharpCoreBackVersion)-,x--) -VERSION = 4.4.1.0 -PKGINSTALL = yes -REFASSEMPATH = .NETFramework/v4.0 -outsuffix = $(TargetDotnetProfile) -endif - -ifeq (x-$(FSharpCoreBackVersion)-,x-3.0-) -VERSION = 4.3.0.0 -REFASSEMPATH = .NETFramework/v4.0 -outsuffix = fsharp30/$(TargetDotnetProfile) -endif - -ifeq (x-$(FSharpCoreBackVersion)-,x-3.1-) -VERSION = 4.3.1.0 -REFASSEMPATH = .NETFramework/v4.0 -outsuffix = fsharp31/$(TargetDotnetProfile) -endif - -ifeq (x-$(FSharpCoreBackVersion)-,x-4.0-) -VERSION = 4.4.0.0 -REFASSEMPATH = .NETFramework/v4.0 -outsuffix = fsharp40/$(TargetDotnetProfile) -endif - -endif - -ifeq (x-$(TargetDotnetProfile)-,x-monoandroid10+monotouch10+xamarinios10-) -VERSION = 3.98.41.0 -outsuffix = $(TargetDotnetProfile) -endif - - -ifeq (x-$(TargetDotnetProfile)-,x-xamarinmacmobile-) -VERSION = 3.99.41.0 -outsuffix = $(TargetDotnetProfile) -endif - -ifeq (x-$(TargetDotnetProfile)-,x-portable47-) -VERSION = 3.47.41.0 -PCLPATH = .NETPortable -outsuffix = $(TargetDotnetProfile) -endif - -ifeq (x-$(TargetDotnetProfile)-,x-portable7-) -VERSION = 3.7.41.0 -PCLPATH = .NETCore -outsuffix = $(TargetDotnetProfile) -endif - -ifeq (x-$(TargetDotnetProfile)-,x-portable78-) -VERSION = 3.78.41.0 -PCLPATH = .NETCore -outsuffix = $(TargetDotnetProfile) -endif - -ifeq (x-$(TargetDotnetProfile)-,x-portable259-) -VERSION = 3.259.41.0 -PCLPATH = .NETCore -outsuffix = $(TargetDotnetProfile) -endif - - -FSCORE_DELAY_SIGN_TOKEN = b03f5f7f11d50a3a -SIGN_TOKEN = f536804aa0eb945b - -tmpdir = .libs/$(Configuration)/ -outdir = $(builddir)$(Configuration)/$(outsuffix)/bin/ - -INSTALL = $(SHELL) $(topdir)/mono/install-sh -INSTALL_BIN = $(INSTALL) -c -m 755 -INSTALL_LIB = $(INSTALL_BIN) - -MSBUILD = @MSBUILD@ - -EXTRA_DIST = configure -NO_DIST = .gitignore lib/debug lib/proto lib/release - - -# Install .optdata/.sigdata if they exist (they go alongside FSharp.Core) -# Install the .Targets file. The XBuild targets file gets installed into the place(s) expected for standard F# project -# files. For F# 2.0 project files this is -# /usr/lib/mono/Microsoft F#/v4.0/Microsoft.FSharp.Targets -# For F# 3.0 project files this is -# /usr/lib/mono/Microsoft SDKs/F#/3.0/Framework/v4.0/Microsoft.FSharp.Targets -# For F# 3.1 project files this is -# /usr/lib/mono/xbuild/Microsoft/VisualStudio/v12.0/FSharp/Microsoft.FSharp.Targets -# For F# 4.0 project files this is -# /usr/lib/mono/xbuild/Microsoft/VisualStudio/v14.0/FSharp/Microsoft.FSharp.Targets -# For F# 4.1 project files this is -# /usr/lib/mono/xbuild/Microsoft/VisualStudio/v15.0/FSharp/Microsoft.FSharp.Targets -# -# Here 12.0/14.0/15.0 is 'VisualStudioVersion'. xbuild should set this to 11.0/12.0/14.0/15.0, copying MSBuild. -# -# We put the F# targets and link the SDK DLLs for all these locations -# -# We put a forwarding targets file into all three locations. We also put one in -# .../lib/mono/xbuild/Microsoft/VisualStudio/v/FSharp/Microsoft.FSharp.Targets -# since this is the location if 'xbuild' fails to set VisualStudioVersion. -# -install-sdk-lib: - @echo "Installing $(ASSEMBLY)" - @mkdir -p $(DESTDIR)$(monodir)/fsharp - @if test "x$(DELAY_SIGN)" = "x1"; then \ - echo "Signing $(outdir)$(ASSEMBLY) with Mono key"; \ - $(monobindir)/sn -q -R $(outdir)$(ASSEMBLY) $(topdir)mono/mono.snk; \ - fi - @if test x-$(NAME) = x-FSharp.Compiler.Private; then \ - echo "Installing extra dependency System.Collections.Immutable.dll to $(DESTDIR)$(monodir)/fsharp/"; \ - $(INSTALL_LIB) $(outdir)System.Collections.Immutable.dll $(DESTDIR)$(monodir)/fsharp/; \ - echo "Installing extra dependency System.Reflection.Metadata.dll to $(DESTDIR)$(monodir)/fsharp/"; \ - $(INSTALL_LIB) $(outdir)System.Reflection.Metadata.dll $(DESTDIR)$(monodir)/fsharp/; \ - fi - @if test x-$(NAME) = x-FSharp.Build; then \ - echo "Installing Microsoft.FSharp.Targets and Microsoft.Portable.FSharp.Targets into install locations matching Visual Studio"; \ - echo " --> $(DESTDIR)$(monodir)/fsharp/"; \ - echo " --> $(DESTDIR)$(monodir)/Microsoft\ F#/v4.0/"; \ - echo " --> $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/3.0/Framework/v4.0/"; \ - echo " --> $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/3.1/Framework/v4.0/"; \ - echo " --> $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/4.0/Framework/v4.0/"; \ - echo " --> $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/4.1/Framework/v4.0/"; \ - echo " --> $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v/FSharp/"; \ - echo " --> $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v11.0/FSharp/"; \ - echo " --> $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v12.0/FSharp/"; \ - echo " --> $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v14.0/FSharp/"; \ - echo " --> $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v15.0/FSharp/"; \ - \ - mkdir -p $(tmpdir); \ - mkdir -p $(DESTDIR)$(monodir)/Microsoft\ F#/v4.0/; \ - mkdir -p $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/3.0/Framework/v4.0/; \ - mkdir -p $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/3.1/Framework/v4.0/; \ - mkdir -p $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/4.0/Framework/v4.0/; \ - mkdir -p $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/4.1/Framework/v4.0/; \ - mkdir -p $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v/FSharp/; \ - mkdir -p $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v11.0/FSharp/; \ - mkdir -p $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v12.0/FSharp/; \ - mkdir -p $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v14.0/FSharp/; \ - mkdir -p $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v15.0/FSharp/; \ - \ - $(INSTALL_LIB) $(outdir)Microsoft.FSharp.Targets $(DESTDIR)$(monodir)/fsharp/; \ - $(INSTALL_LIB) $(outdir)Microsoft.Portable.FSharp.Targets $(DESTDIR)$(monodir)/fsharp/; \ - \ - echo '' > $(tmpdir)Microsoft.FSharp.Targets; \ - echo ' ' >> $(tmpdir)Microsoft.FSharp.Targets; \ - echo '' >> $(tmpdir)Microsoft.FSharp.Targets; \ - $(INSTALL_LIB) $(tmpdir)Microsoft.FSharp.Targets $(DESTDIR)$(monodir)/Microsoft\ F#/v4.0/; \ - $(INSTALL_LIB) $(tmpdir)Microsoft.FSharp.Targets $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/3.0/Framework/v4.0/; \ - $(INSTALL_LIB) $(tmpdir)Microsoft.FSharp.Targets $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/3.1/Framework/v4.0/; \ - $(INSTALL_LIB) $(tmpdir)Microsoft.FSharp.Targets $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/4.0/Framework/v4.0/; \ - $(INSTALL_LIB) $(tmpdir)Microsoft.FSharp.Targets $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/4.1/Framework/v4.0/; \ - $(INSTALL_LIB) $(tmpdir)Microsoft.FSharp.Targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v/FSharp/; \ - $(INSTALL_LIB) $(tmpdir)Microsoft.FSharp.Targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v11.0/FSharp/; \ - $(INSTALL_LIB) $(tmpdir)Microsoft.FSharp.Targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v12.0/FSharp/; \ - $(INSTALL_LIB) $(tmpdir)Microsoft.FSharp.Targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v14.0/FSharp/; \ - $(INSTALL_LIB) $(tmpdir)Microsoft.FSharp.Targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v15.0/FSharp/; \ - \ - echo '' > $(tmpdir)Microsoft.Portable.FSharp.Targets; \ - echo ' ' >> $(tmpdir)Microsoft.Portable.FSharp.Targets; \ - echo '' >> $(tmpdir)Microsoft.Portable.FSharp.Targets; \ - $(INSTALL_LIB) $(tmpdir)Microsoft.Portable.FSharp.Targets $(DESTDIR)$(monodir)/Microsoft\ F#/v4.0/; \ - $(INSTALL_LIB) $(tmpdir)Microsoft.Portable.FSharp.Targets $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/3.0/Framework/v4.0/; \ - $(INSTALL_LIB) $(tmpdir)Microsoft.Portable.FSharp.Targets $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/3.1/Framework/v4.0/; \ - $(INSTALL_LIB) $(tmpdir)Microsoft.Portable.FSharp.Targets $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/4.0/Framework/v4.0/; \ - $(INSTALL_LIB) $(tmpdir)Microsoft.Portable.FSharp.Targets $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/4.1/Framework/v4.0/; \ - $(INSTALL_LIB) $(tmpdir)Microsoft.Portable.FSharp.Targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v/FSharp/; \ - $(INSTALL_LIB) $(tmpdir)Microsoft.Portable.FSharp.Targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v11.0/FSharp/; \ - $(INSTALL_LIB) $(tmpdir)Microsoft.Portable.FSharp.Targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v12.0/FSharp/; \ - $(INSTALL_LIB) $(tmpdir)Microsoft.Portable.FSharp.Targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v14.0/FSharp/; \ - $(INSTALL_LIB) $(tmpdir)Microsoft.Portable.FSharp.Targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v15.0/FSharp/; \ - \ - $(INSTALL_LIB) $(outdir)Microsoft.FSharp.NetSdk.props $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v/FSharp/; \ - $(INSTALL_LIB) $(outdir)Microsoft.FSharp.NetSdk.props $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v11.0/FSharp/; \ - $(INSTALL_LIB) $(outdir)Microsoft.FSharp.NetSdk.props $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v12.0/FSharp/; \ - $(INSTALL_LIB) $(outdir)Microsoft.FSharp.NetSdk.props $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v14.0/FSharp/; \ - $(INSTALL_LIB) $(outdir)Microsoft.FSharp.NetSdk.props $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v15.0/FSharp/; \ - \ - $(INSTALL_LIB) $(outdir)Microsoft.FSharp.NetSdk.targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v/FSharp/; \ - $(INSTALL_LIB) $(outdir)Microsoft.FSharp.NetSdk.targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v11.0/FSharp/; \ - $(INSTALL_LIB) $(outdir)Microsoft.FSharp.NetSdk.targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v12.0/FSharp/; \ - $(INSTALL_LIB) $(outdir)Microsoft.FSharp.NetSdk.targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v14.0/FSharp/; \ - $(INSTALL_LIB) $(outdir)Microsoft.FSharp.NetSdk.targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v15.0/FSharp/; \ - fi - @if test x-$(outsuffix) = x-net40; then \ - if test -e $(outdir)$(NAME).dll; then \ - echo "Installing $(outdir)$(NAME).dll to $(DESTDIR)$(monodir)/fsharp/"; \ - mkdir -p $(DESTDIR)$(monodir)/fsharp/; \ - $(INSTALL_LIB) $(outdir)$(NAME).dll $(DESTDIR)$(monodir)/fsharp/; \ - fi; \ - if test -e $(outdir)$(NAME).dll.config; then \ - echo "Installing $(outdir)$(NAME).dll to $(DESTDIR)$(monodir)/fsharp/"; \ - mkdir -p $(DESTDIR)$(monodir)/fsharp/; \ - $(INSTALL_LIB) $(outdir)$(NAME).dll.config $(DESTDIR)$(monodir)/fsharp/; \ - fi; \ - if test -e $(outdir)$(NAME).xml; then \ - echo "Installing $(outdir)$(NAME).xml into $(DESTDIR)$(monodir)/fsharp/"; \ - mkdir -p $(DESTDIR)$(monodir)/fsharp/; \ - $(INSTALL_LIB) $(outdir)$(NAME).xml $(DESTDIR)$(monodir)/fsharp/; \ - fi; \ - if test -e $(outdir)$(NAME).sigdata; then \ - echo "Installing $(outdir)$(NAME).sigdata into $(DESTDIR)$(monodir)/fsharp/"; \ - mkdir -p $(DESTDIR)$(monodir)/fsharp/; \ - $(INSTALL_LIB) $(outdir)$(NAME).sigdata $(DESTDIR)$(monodir)/fsharp/; \ - fi; \ - if test -e $(outdir)$(NAME).optdata; then \ - echo "Installing $(outdir)$(NAME).optdata into $(DESTDIR)$(monodir)/fsharp/"; \ - mkdir -p $(DESTDIR)$(monodir)/fsharp/; \ - $(INSTALL_LIB) $(outdir)$(NAME).optdata $(DESTDIR)$(monodir)/fsharp/; \ - fi; \ - fi - @if test x-$(NAME) = x-FSharp.Core && test x-$(REFASSEMPATH) != x-; then \ - echo "Installing FSharp.Core $(VERSION) reference assembly into api location"; \ - echo " --> $(DESTDIR)$(monodir)/fsharp/api/$(REFASSEMPATH)/$(VERSION)"; \ - mkdir -p $(DESTDIR)$(monodir)/fsharp/api/$(REFASSEMPATH)/$(VERSION); \ - $(INSTALL_LIB) $(outdir)$(NAME).xml $(DESTDIR)$(monodir)/fsharp/api/$(REFASSEMPATH)/$(VERSION)/; \ - $(INSTALL_LIB) $(outdir)$(NAME).sigdata $(DESTDIR)$(monodir)/fsharp/api/$(REFASSEMPATH)/$(VERSION)/; \ - $(INSTALL_LIB) $(outdir)$(NAME).optdata $(DESTDIR)$(monodir)/fsharp/api/$(REFASSEMPATH)/$(VERSION)/; \ - $(INSTALL_LIB) $(outdir)$(NAME).dll $(DESTDIR)$(monodir)/fsharp/api/$(REFASSEMPATH)/$(VERSION)/; \ - fi - @if test x-$(NAME) = x-FSharp.Core && test x-$(PCLPATH) != x-; then \ - echo "Installing FSharp.Core $(VERSION) reference assembly into api location"; \ - echo " --> $(DESTDIR)$(monodir)/fsharp/$(PCLPATH)/$(VERSION)"; \ - mkdir -p $(DESTDIR)$(monodir)/fsharp/api/$(PCLPATH)/$(VERSION); \ - $(INSTALL_LIB) $(outdir)$(NAME).xml $(DESTDIR)$(monodir)/fsharp/api/$(PCLPATH)/$(VERSION)/; \ - $(INSTALL_LIB) $(outdir)$(NAME).sigdata $(DESTDIR)$(monodir)/fsharp/api/$(PCLPATH)/$(VERSION)/; \ - $(INSTALL_LIB) $(outdir)$(NAME).optdata $(DESTDIR)$(monodir)/fsharp/api/$(PCLPATH)/$(VERSION)/; \ - $(INSTALL_LIB) $(outdir)$(NAME).dll $(DESTDIR)$(monodir)/fsharp/api/$(PCLPATH)/$(VERSION)/; \ - fi - - - -# The binaries fsc.exe and fsi.exe only get installed for Mono 4.5 profile -# This also installs 'fsharpc' and 'fsharpi' and 'fsharpiAnyCpu' -install-bin: - chmod +x $(outdir)$(ASSEMBLY) - sed -e 's,[@]DIR[@],$(monodir)/fsharp,g' -e 's,[@]TOOL[@],$(ASSEMBLY),g' -e 's,[@]MONOBINDIR[@],$(monobindir),g' < $(topdir)mono/launcher > $(outdir)$(subst fs,fsharp,$(NAME)) - chmod +x $(outdir)$(subst fs,fsharp,$(NAME)) - @mkdir -p $(DESTDIR)$(monodir)/fsharp - @mkdir -p $(DESTDIR)$(bindir) - $(INSTALL_BIN) $(outdir)$(ASSEMBLY) $(DESTDIR)$(monodir)/fsharp - $(INSTALL_BIN) $(outdir)$(ASSEMBLY).config $(DESTDIR)$(monodir)/fsharp - $(INSTALL_BIN) $(outdir)$(subst fs,fsharp,$(NAME)) $(DESTDIR)$(bindir) - - diff --git a/mono/latest-mono-stable.sh b/mono/latest-mono-stable.sh new file mode 100755 index 00000000000..045b80f8377 --- /dev/null +++ b/mono/latest-mono-stable.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# suitable for Ubuntu 16.04 - get latest Mono stable +mono --version +sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF +echo "deb http://download.mono-project.com/repo/ubuntu stable-xenial main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list +sudo apt-get update +ps -A | grep apt +#sudo rm /var/lib/dpkg/lock +#sudo dpkg --configure -a +sudo apt-get -my install mono-devel +mono --version diff --git a/mono/launcher b/mono/launcher new file mode 100644 index 00000000000..e61b7bba19d --- /dev/null +++ b/mono/launcher @@ -0,0 +1,19 @@ +#!/bin/sh +EXEC="exec " + +if test x"$1" = x--debug; then + DEBUG=--debug + shift +fi + +if test x"$1" = x--gdb; then + shift + EXEC="gdb --eval-command=run --args " +fi + +if test x"$1" = x--valgrind; then + shift + EXEC="valgrind $VALGRIND_OPTIONS" +fi + +$EXEC @MONOBINDIR@/mono $DEBUG $MONO_OPTIONS @DIR@/@TOOL@ --exename:$(basename "$0") "$@" diff --git a/mono/launcher.in b/mono/launcher.in deleted file mode 100644 index 047101512e6..00000000000 --- a/mono/launcher.in +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh -EXEC="exec " - -if test x"$1" = x--debug; then - DEBUG=--debug - shift -fi - -if test x"$1" = x--gdb; then - shift - EXEC="gdb --eval-command=run --args " -fi - -if test x"$1" = x--valgrind; then - shift - EXEC="valgrind $VALGRIND_OPTIONS" -fi - -# Beware this line must match the regular expression " (\/.*)\/fsi\.exe" when @TOOL@ is fsi.exe. -# That's because the FSharp MonoDevelop addin looks inside the text of this script to determine the installation -# location of the default FSharp install in order to find the FSharp compiler binaries (see -# fsharpbinding/MonoDevelop.FSharpBinding/Services/CompilerLocationUtils.fs). That's a pretty unfortunate -# way of finding those binaries. And really should be changed. -$EXEC @MONOBINDIR@/mono $DEBUG $MONO_OPTIONS @DIR@/@TOOL@ --exename:$(basename "$0") "$@" diff --git a/mono/prepare-mono.sh b/mono/prepare-mono.sh index 77f3e18b99d..229a7eb8492 100755 --- a/mono/prepare-mono.sh +++ b/mono/prepare-mono.sh @@ -26,41 +26,6 @@ if [ $OS = 'Linux' ]; then sudo apt-get -y install mono-devel msbuild fi -# Check if SSL certificates have been imported into Mono's certificate store. -# If certs haven't been installed, some/all of the Nuget packages will fail to restore. -#if [ $('certmgr -list -c Trust | grep -c -F "X.509"') -le 1 ]; then -# echo "No SSL certificates installed so unable to restore NuGet packages." >&2; -# echo "Run 'mozroots --sync --import' to install certificates to Mono's certificate store." >&2; -# exit 1 -#fi - -# Restore NuGet packages (needed for compiler bootstrap and tests). -mono .nuget/NuGet.exe restore packages.config -PackagesDirectory packages -ConfigFile .nuget/NuGet.Config - -(if test x-$BUILD_CORECLR = x-1; then \ - sudo sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ trusty main" > /etc/apt/sources.list.d/dotnetdev.list'; \ - sudo apt-key adv --keyserver apt-mo.trafficmanager.net --recv-keys 417A0893; \ - sudo apt-get update; \ - sudo apt-get -y install dotnet-dev-1.0.0-preview2-003131; \ - (cd tests/fsharp; mono ../../.nuget/NuGet.exe restore project.json -PackagesDirectory ../../packages -ConfigFile ../../.nuget/NuGet.Config); \ - ./init-tools.sh; \ - echo "------ start log"; \ - cat ./init-tools.log; echo "------ end log"; \ -fi) - -(if test x-$BUILD_PROTO_WITH_CORECLR_LKG = x-1; then \ - (cd lkg/fsc && dotnet restore --packages ../packages && dotnet publish project.json -o ../Tools/lkg -r ubuntu.14.04-x64); \ - (cd lkg/fsi && dotnet restore --packages ../packages && dotnet publish project.json -o ../Tools/lkg -r ubuntu.14.04-x64); \ -fi) - -#TODO: work out how to avoid the need for this -echo "chmod u+x packages/FSharp.Compiler.Tools.4.1.27/tools/fsi.exe" -echo "chmod u+x packages/FsLexYacc.7.0.6/build/fslex.exe" -echo "chmod u+x packages/FsLexYacc.7.0.6/build/fsyacc.exe" -chmod u+x packages/FSharp.Compiler.Tools.4.1.27/tools/fsi.exe -chmod u+x packages/FsLexYacc.7.0.6/build/fslex.exe -chmod u+x packages/FsLexYacc.7.0.6/build/fsyacc.exe - # The FSharp.Compiler.Tools package doesn't work correctly unless a proper install of F# has been done on the machine. # OSX can skip this because the OSX Mono installer includes F#. if [ $OS != 'OSX' ]; then diff --git a/mono/test-mono.sh b/mono/test-mono.sh index 8a9033c6710..bbcc8b8705e 100755 --- a/mono/test-mono.sh +++ b/mono/test-mono.sh @@ -1,9 +1,10 @@ # Run some project building tests # Run some a variation of the tests/fsharp suite -# Run the FSharp.Core.Unittests suite +# Run the FSharp.Core.UnitTests suite +# note: expects to run from top directory (cd tests/projects; ./build.sh) && (cd tests/fsharp/core; ./run-opt.sh) # This currently takes too long in travis -#&& mono packages/NUnit.Console.3.0.0/tools/nunit3-console.exe --agents=1 Release/net40/bin/FSharp.Core.Unittests.dll +#&& mono packages/NUnit.Console.3.0.0/tools/nunit3-console.exe --agents=1 Release/net40/bin/FSharp.Core.UnitTests.dll diff --git a/mono/travis-autogen.sh b/mono/travis-autogen.sh deleted file mode 100755 index 9c356b0862f..00000000000 --- a/mono/travis-autogen.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env sh - -echo "TRAVIS_OS_NAME=$TRAVIS_OS_NAME" -if [ "$TRAVIS_OS_NAME" = "osx" ]; - then - # Parse 'Mono JIT compiler version 5.0.1.1' to '5.0.1' - monoVer=$(mono --version | head -n 1 | cut -d' ' -f 5 | cut -d'.' -f 1-3) - prefix="/Library/Frameworks/Mono.framework/Versions/$monoVer"; - else - prefix="/usr"; -fi - -echo "./autogen.sh --prefix=$prefix" -./autogen.sh --prefix=$prefix \ No newline at end of file diff --git a/netci.groovy b/netci.groovy deleted file mode 100644 index cc7956a9834..00000000000 --- a/netci.groovy +++ /dev/null @@ -1,125 +0,0 @@ -import jobs.generation.Utilities; -import jobs.generation.JobReport; - -def project = GithubProject -def branch = GithubBranchName - -def osList = ['Windows_NT', 'Ubuntu14.04'] //, 'OSX'], 'CentOS7.1' - -def static getBuildJobName(def configuration, def os) { - return configuration.toLowerCase() + '_' + os.toLowerCase() -} - -[true, false].each { isPullRequest -> - osList.each { os -> - def configurations = []; - if (os == 'Windows_NT') { - configurations = ['Debug', 'Release_ci_part1', 'Release_ci_part2', 'Release_ci_part3', 'Release_net40_no_vs', 'Release_fcs' ]; - } - else - { - // Linux - configurations = ['Release', 'Release_fcs' ]; - } - - configurations.each { configuration -> - - def lowerConfiguration = configuration.toLowerCase() - - // Calculate job name - def jobName = getBuildJobName(configuration, os) - - def buildPath = ''; - if (os == 'Windows_NT') { - buildPath = ".\\" - } - else { - buildPath = "./" - } - def buildCommand = ''; - def buildFlavor= ''; - - if (configuration == "Release_fcs" && branch != "dev15.5") { - // Build and test FCS NuGet package - buildPath = "./fcs/" - buildFlavor = "" - if (os == 'Windows_NT') { - build_args = "TestAndNuget" - } - else { - build_args = "Build" - } - } - else if (configuration == "Debug") { - buildFlavor = "debug" - build_args = "" - } - else { - buildFlavor = "release" - if (configuration == "Release_ci_part1") { - build_args = "ci_part1" - } - else if (configuration == "Release_ci_part2") { - build_args = "ci_part2" - } - else if (configuration == "Release_ci_part3") { - build_args = "ci_part3" - } - else if (configuration == "Release_net40_no_vs") { - build_args = "net40" - } - else { - build_args = "none" - } - } - - if (os == 'Windows_NT') { - buildCommand = "${buildPath}build.cmd ${buildFlavor} ${build_args}" - } - else { - buildCommand = "${buildPath}build.sh ${buildFlavor} ${build_args}" - } - - def newJobName = Utilities.getFullJobName(project, jobName, isPullRequest) - def newJob = job(newJobName) { - steps { - if (os == 'Windows_NT') { - batchFile(""" -echo *** Build Visual F# Tools *** - -${buildPath}build.cmd ${buildFlavor} ${build_args}""") - } - else { - // Shell - shell(buildCommand) - } - } - } - - // TODO: set to false after tests are fully enabled - def skipIfNoTestFiles = true - - def affinity = configuration == 'Release_net40_no_vs' ? 'latest-or-auto' : (os == 'Windows_NT' ? 'latest-or-auto-dev15-0' : 'latest-or-auto') - Utilities.setMachineAffinity(newJob, os, affinity) - Utilities.standardJobSetup(newJob, project, isPullRequest, "*/${branch}") - - if (build_args != "none") { - Utilities.addArchival(newJob, "tests/TestResults/*.*", "", skipIfNoTestFiles, false) - if (configuration == "Release_fcs") { - Utilities.addArchival(newJob, "Release/**") - } - else { - Utilities.addArchival(newJob, "${buildFlavor}/**") - } - } - if (isPullRequest) { - Utilities.addGithubPRTriggerForBranch(newJob, branch, "${os} ${configuration} Build") - } - else { - Utilities.addGithubPushTrigger(newJob) - } - } - } -} - -JobReport.Report.generateJobReport(out) diff --git a/packages.config b/packages.config index 955d8c12ad5..0f658bb45ee 100644 --- a/packages.config +++ b/packages.config @@ -12,27 +12,42 @@ - + - - - - - - + + + + + + + + + + + + + + + - + - + + - + + + + + + @@ -45,7 +60,7 @@ - + @@ -68,4 +83,7 @@ + + + diff --git a/release-notes.md b/release-notes.md new file mode 100644 index 00000000000..2c29485b580 --- /dev/null +++ b/release-notes.md @@ -0,0 +1,404 @@ + Copyright (c) Microsoft Corporation. All Rights Reserved. + See License.txt in the project root for license information. + +## About the release notes + +We deliver F# and F# components in Visual Studio and .NET Core releases. These can include bug fixes, new tooling features, new compiler features, performance improvements, infrastructure improvements, and new langauge versions. The most recent release of F# or any F# component will be at the top of this document. + +## Visual Studio 15.8.5 + +* Fix (#5504) - Internal MSBuild Error when building non-.NET SDK projects with MSBuild parallelism +* Fix (#5518) - Visual Studio-deployed components are not NGEN'd +* Fix ([Devcom 322883](https://developercommunity.visualstudio.com/content/problem/322883/all-net-framework-f-projects-build-to-4500-regardl.html)) - FSharp.Core 4.5.0.0 binary is deployed to FSharp.Core 4.4.3.0 location + +All other closed issues for the VS 15.8 release can be found [here](https://github.com/Microsoft/visualfsharp/milestone/14). + +## F# 4.5 + +We introduced the F# language version 4.5 with this release. This also corresponds with the new 4.5.x family of FSharp.Core (the F# core library). You can read the specs for each of these changes in the [F# RFC repository](https://github.com/fsharp/fslang-design). There are also many improvements to F# tools for Visual Studio with this release. + +### Releases + +* Visual Studio 2017 update 15.8 +* .NET Core SDK version 2.1.400 or higher + +### Language features + +* Support for `voidptr` +* `NativePtr.ofVoidPtr` and `NativePtr.toVoidPtr` support +* New types: `inref<'T>`, `outref<'T>` to represent read-only and write-only `byref`s +* Support for `IsByRefLike` structs +* Support for `IsReadOnly` structs +* Full support for production and consumption of `byref` returns +* Support for extension methods for `byref`/`inref`/`outref` +* Support for `match!` in computation expressions +* Relaxed upcast requirements for `yield` in sequence, list, and array expressions +* Relaxed indentation requirements for list and array expressions +* Enumeration cases emitted as public +* Various bug fixes with `byref` programming + +### FSharp.Core features + +* Version aligned to 4.5.x for the NuGet package and 4.5.0.0 for the binary +* Improved strack traces for `async { }` so that user code can now be seen +* Support for `ValueOption<'T>` +* Support for `TryGetValue` on Map + +### Compiler improvements + +Improvements to the F# compiler in addition to the previously-mentioned language features are in F# 4.5. These include: + +* Restored ability to inherit from `FSharpFunc` +* Removed ~2.2% of all allocations in the F# compiler +* F# reference normalization support for user control of transitive assembly references written to an output file +* Respecting `WarningsNotAsErrors` +* Error message improvement when branches of a pattern match do not return the same type +* Respecting `#nowarn "2003"` +* Other smaller performance improvements and many bug fixes + +### Tooling improvements + +Significant improvements in the F# tools, such as performance enhancements and some new editor features are included this release. As always, with a large number of contributions from the F# open source community. Here are the highlights: + +* We improved IntelliSense performance for .NET SDK-style projects of all forms, including those that use multi-targeting. +* A community-driven effort to analyze and improve IntelliSense performance for very large files was contributed by [Vasily Kirichenko](https://github.com/vasily-kirichenko),[ Steffen Forkmann](https://github.com/forki), and [Gauthier Segay](https://github.com/smoothdeveloper). IntelliSense in very large files (10k+ lines of code) is roughly twice as fast now. +* The warning for an outdated FSharp.Core (despite the package being installed) is no longer present in .NET SDK-style projects. +* The description tooltip that displays XML documentation for a member after . in IntelliSense no longer times out after 10 seconds. +* A bug where you could not set breakpoints in object constructor arguments has been fixed. +* A bug where a renamed symbol would be duplicated when it is a generic parameter has been fixed. +* Templates for .NET Framework (classic F# templates) now consume FSharp.Core from a NuGet package, to align with .NET SDK F# templates. +* Automatic, transactional brace completion is now available for `()`, `[]`, `{}`, `[||]`, and `[<>]` brace pairs. We did this work in collaboration with [Gibran Rosa](https://github.com/gibranrosa). +* You can now go to definition with **Ctrl + Click** on an F# symbol. The settings for this gesture are also respected in the **Tools > Options** window. +* The IntelliSense performance UI has been modified to allow configuration of stale typecheck information for various IDE features. Explanations for each option are now present in tooltips for the settings. +* Brace match highlighting now correctly highlights braces, completed in collaboration with [Vasily Kirichenko](https://github.com/vasily-kirichenko). +* Go to definition now navigates correctly when a type is defined recursively, contributed by [Vasily Kirichenko](https://github.com/vasily-kirichenko). +* A bug where an auto-imported namespace wasn't opened when the top of a file was empty has been fixed by [Vasily Kirichenko](https://github.com/vasily-kirichenko). +* A bug where `printf` specifiers that contained dots were miscolored has been fixed by [Vasily Kirichenko](https://github.com/vasily-kirichenko). +* A bug where all opens were considered unused inside of a recursive module has been fixed by [Vasily Kirichenko](https://github.com/vasily-kirichenko). +* Autocompletion for attributes now only suggests options that are actually attributes, contributed by [Vasily Kirichenko](https://github.com/vasily-kirichenko). +* Signature Help tooltips are now generated for Type Provider static parameters at the constructor call site, contributed by[Vasily Kirichenko](https://github.com/vasily-kirichenko). +* A bug where value types used as units of measure were colored as reference types has been fixed by [Vasily Kirichenko](https://github.com/vasily-kirichenko). +* A bug where semantic colorization could disappear for some files while scrolling has been fixed by [Vasily Kirichenko](https://github.com/vasily-kirichenko). +There is now an experimental CodeLens implementation, contributed by [Victor Peter Rouven Müller](https://github.com/realvictorprm). You can turn it on in **Options > Text Editor > F# > Code Lens**. +* A bug where the F# compiler service would incorrectly elide the module names in XML documentation has been fixed by [Sebastian Urban](https://github.com/surban). +* Code that uses `Dictionary` with `ContainsKey` and subsequent `Item` calls has been changed to use `TryGetValue`, by [Eugene Auduchinok](https://github.com/auduchinok). +* [Jakob Majoka](https://github.com/majocha) also contributed in the process of consuming a different API for Tooltips. + +### Infrastructure, Packaging, and Open Source Improvements + +We made the following enhancements to infrastructure, packaging, and our open source contribution experience: + +* The F# compiler distributed with Visual Studio no longer installs as a singleton in the F# Compiler SDK location. It is now fully side-by-side with Visual Studio, meaning that side-by-side installations of Visual Studio wil finally have truly side-by-side F# tooling and language experiences. +* The FSharp.Core NuGet package is now signed. +* ETW logging has been added to the F# tools and compiler. +* The very large `control.fs`/`control.fsi` files in FSharp.Core have been split into `async.fs`/`async.fsi`, `event.fs`/`event.fsi`, `eventmodule.fs`/`eventmodule.fsi`, `mailbox.fs`/`mailbox.fsi`, and `observable.fs`/`observable.fsi`. +* We added .NET SDK-style versions of our project performance stress test artifacts. +* We removed Newtonsoft.json from our codebase, and you now have one less package downloaded for OSS contributors. +* We now use the latest versions of System.Collections.Immutable and System.Reflection.Metadata. + +## F# 4.1 + +### Releases + +* Visual Studio 2017 updates 15.0 to 15.8 (exclusive) +* .NET Core SDK versions 1.0 to 2.1.400 (exclusive) + +### Language and Core Library features + +* Struct tuples +* Initial support for consuming C#-style `ref` returns +* Struct record support with the `[]` attribute +* Struct Discriminated Union support with the `[]` attribute +* `Result<'TSuccess, 'TFailure>` type, with supporting functions in FSharp.Core +* Support for the `fixed` keyword to pin a pointer-tyle local to the stack +* Underscores in numeric literals +* Caller Info Attribute Argument support +* `namespace rec` and `module rec` to support mutually referential types and functions within the same file +* Implicit "Module" suffix added to modules that share the same name as a type +* Tuple equality for F# tuples and `System.Tuple` + +### Compiler improvements + +* Support for generating Portable PDBs +* Significant improvements to error messages, particularly to aid with suggestions +* Performance improvements +* Interoperability improvements +* Support for geenerating F# AssymblyInfo from properties for .NET SDK projects +* `--debug:full` support for F# on .NET Core on Windows +* `MakeTuple` support for struct tuples +* Warnings are forwarded when searching for method overloads +* Support for emitting an enum-specific warning when pattern matching over one +* Many smaller bug fixes + +### FSharp.Core features + +* Support for `NativePtr.ByRef` +* Support for `Async.StartImmediateAsTask` +* Support for `Seq.transpose`/`Array.transpose`/`List.transpose` +* `IsSerializable` support for `Option` and `Async<'T>` +* Many smaller bug fixes + +### IDE features for F# tools in Visual Studio + +Most items here contributed by community members. + +* Default installation of F# wherever .NET Core is installed +* Significant memory reductions in F# tooling +* IntelliSense Filters and Glyphs +* Support for Go to All +* Find all Reference support +* In-memory cross-project references support +* QuickInfo supports type colorization +* QuickInfo supports navigable links that will invoke Go to Definition +* Inline Rename support +* Go to Definition from F# to C# support +* Semantic document highlighting for selected symbols +* Support for Structured Guidelines and code outlining, which is toggleable +* Support for `EditorBrowsable(EditorBrowsableState.Never)` +* Code fix for making Record and Discriminated Union case lables upper-case +* Code fix to make suggestions for an unkown identifier +* Code fix for prefixing or replacing an unused value with an underscore +* Code fix to add the `new` keyword to a disposable type +* Code fix to add an `open` statement at the top for a symbol coming from an unopened namespace or module +* Code fix to simplify a name by removing unnecessary namespace qualifiers +* Graying out unused values in the editor +* Colorized `fsi.exe` when ran as a standalone console application +* Autocompletion support, including symbols from unopened namespaces +* Colorization for mutable values to distinguish them from immutable values +* Support for move up/down on solution folder nodes +* Support for Blue (High Contrast) theming +* Full support for .NET Core and .NET Standard projects, with the ability to create new ASP.NET Core projects in F# +* Full support for ASP.NET Web SDK tooling, such as Azure publish UI, for F# projects +* Property page auto-sizing support for different monitors +* Smart indentation support which auto-indents based on scope and auto-deindents for bracket-like characters +* XML documentation comment width scaling to prevent it running horizontally off the screen +* Multiple settings pages to modify tooling settings +* Support for Drag and Drop across folders +* Support for nightly builds of the tools +* Expanded debugger view for lists from 50 items to 5000 items +* Support for Optimization APIs in the compiler service +* Support for `IsNameGenerated` in the F# symbols API + +## Older F# releases + +### [4.0.0] - Visual Studio 2015 Update 1 - 30 November 2015 + +#### Enhancements +* Perf: `for i in expr do body` optimization [#219](https://github.com/Microsoft/visualfsharp/pull/219) +* Remove type provider security dialog and use custom icon for type provider assembly reference [#448](https://github.com/Microsoft/visualfsharp/pull/448) +* Perf: Enable parallel build inside Visual Studio [#487](https://github.com/Microsoft/visualfsharp/pull/487) +* Perf: Remove StructBox for Value Types [#549](https://github.com/Microsoft/visualfsharp/pull/549) +* Add compiler warnings for redundant arguments in raise/failwith/failwithf/nullArg/invalidOp/invalidArg [#630](https://github.com/Microsoft/visualfsharp/pull/630) +* Add a compiler warning for lower case literals in patterns [#666](https://github.com/Microsoft/visualfsharp/pull/666) + +#### Bug fixes +* Fix scope of types for named values in attributes improperly set [#437](https://github.com/Microsoft/visualfsharp/pull/437) +* Add general check for escaping typars to check phase [#442](https://github.com/Microsoft/visualfsharp/pull/442) +* Fix AccessViolationException on obfuscated assemblies [#519](https://github.com/Microsoft/visualfsharp/pull/519) +* Fix memory leaks while reloading solutions in Visual Studio [#591](https://github.com/Microsoft/visualfsharp/pull/591) +* Enable breakpoints in `with` augmentations for class types [#608](https://github.com/Microsoft/visualfsharp/pull/608) +* Fix false escaping type parameter check error [#613](https://github.com/Microsoft/visualfsharp/pull/613) +* Fix quotation of readonly fields [#622](https://github.com/Microsoft/visualfsharp/pull/622) +* Keep the reference icons when opening references [#623](https://github.com/Microsoft/visualfsharp/pull/623) +* Don't suppress missing FSI transitive references [#626](https://github.com/Microsoft/visualfsharp/pull/626) +* Make Seq.cast's non-generic and generic IEnumerable implementations equivalent [#651](https://github.com/Microsoft/visualfsharp/pull/651) + +### [4.0.0] - 20 July 2015 + +Includes commits up to `dd8252eb8d20aaedf7b1c7576cd2a8a82d24f587` + +#### Language, compiler, runtime, interactive + +* Normalization and expansion of `Array`, `List`, and `Seq` modules + * New APIs for 4.0: `chunkBySize`, `contains`, `except`, `findBack`, `findInstanceBack`, `indexed`, `item`, `mapFold`, `mapFoldBack`, `sortByDescending`, `sortDescending`, `splitInto`, `tryFindBack`, `tryFindIndexBack`, `tryHead`, `tryItem`, `tryLast` + ![Collection API additions](http://i.imgur.com/SdJ7Doh.png) +* Other new APIs + * `Option.filter`, `Option.toObj`, `Option.ofObj`, `Option.toNullable`, `Option.ofNullable` + * `String.filter` + * `Checked.int8`, `Checked.uint8` + * `Async.AwaitTask` (non-generic) + * `WebClient.AsyncDownloadFile`, `WebClient.AsyncDownloadData` + * `tryUnbox`, `isNull` +* New active pattern to match constant `Decimal` in quotations +* Slicing support for lists +* Support for consuming high-rank (> 4) arrays +* Support for units of measure in `printf`-family functions +* Support for constructors/class names as first-class functions +* Improved exception stack traces in async code +* Automatic `mutable`/`ref` conversion +* Support for static arguments to provided methods +* Support for non-nullable provided types +* Added `NonStructuralComparison` module containing non-structural comparison operators +* Support for rational exponents in units of measure +* Give fsi.exe, fsiAnyCpi.exe nice icons +* `Microsoft.` optional in namepsace paths from FSharp.Core +* Support for extension properties in object initializers +* Pre-support (not yet used) for additional nativeptr intrinsics +* Simplified, more robust resolution of type references in quotations +* Support for inheritance of types that have multiple interface instantiations +* Extended preprocessor grammar +* Support for implicit quotation of expressions used as method arguments +* Support for multiple properties in `[]` +* Eliminate tuple allocation for implicitly returned formal arguments +* Perf: fsc.exe now uses `GCLatencyMode.Batch` +* Perf: Improved `hash`/`compare`/`distinctBy`/`groupBy` performance +* Perf: `Seq.toArray` perf improvement +* Perf: Use `OptimizedClosures.FSharpFunc` in seq.fs where applicable +* Perf: Use literals and mutable variables instead of ref cells for better performance in SHA1 calc +* Perf: Use smart blend of `System.Array.Copy` and iterative copy for array copies +* Perf: Change `Seq.toList` to mutation-based to remove reliance on `List.rev` +* Perf: Change `pdbClose` to test if files are locked before inducing GCs +* Perf: Use server GC mode for compiler +* Bugfix: Changed an error message within the Set module to use the correct module name. +* Bugfix: Fix assembly name of warning FS2003 +* Bugfix [#132](http://visualfsharp.codeplex.com/workitem/132): FSI Shadowcopy causes a significant degrade in the fsi first execute time +* Bugfix [#131](https://visualfsharp.codeplex.com/workitem/131): Fix getentryassembly return value when shadowcopy is enabled in FSI +* Bugfix [#61](https://visualfsharp.codeplex.com/workitem/61) Nonverifiable code generated with units of measure conversion +* Bugfix [#68](https://visualfsharp.codeplex.com/workitem/68) BadImageFormatException with Units of Measure +* Bugfix [#146](https://visualfsharp.codeplex.com/workitem/146) BadImageFormatException in both Release and Debug build with units of measure +* Bugfix: Incorrent cross-module inlining between different .NET profiles +* Bugfix: Properly document exceptions in `Array` module +* Bugfix [#24](https://visualfsharp.codeplex.com/workitem/24): Error reporting of exceptions in type providers `AddMemberDelayed` +* Bugfix [#13](https://github.com/fsharp/fsharp/issues/13): Error on FSI terminal resize +* Bugfix [#29](https://github.com/fsharp/fsharp/issues/29): Module access modifier `internal` does not give internal access if no namespaces are used +* Bugfix: Fix typo in error message for invalid attribute combination +* Bugfix [#27](https://github.com/microsoft/visualfsharp/issues/27): Private module values can be mutated by other modules +* Bugfix [#38](https://github.com/microsoft/visualfsharp/issues/38): ICE - System.ArgumentException: not a measure abbreviation, or incorrect kind +* Bugfix [#44](https://github.com/microsoft/visualfsharp/issues/44): Problems using FSI to `#load` multiple files contributing to the same namespace +* Bugfix [#95](https://github.com/microsoft/visualfsharp/issues/95): `[]` allows access to DU member if qualified only by module name +* Bugfix [#89](https://github.com/microsoft/visualfsharp/issues/89): Embedding an untyped quotation in a typed quotation results in ArgumentException +* Bugfix: Show warning when Record is accessed without type but `[]` was set +* Bugfix [#139](https://visualfsharp.codeplex.com/workitem/139): Memory leak in `Async.AwaitWaitHandle` +* Bugfix [#122](https://github.com/microsoft/visualfsharp/issues/122): `stfld` does not give `.volatile` annotation +* Bugfix [#30](https://github.com/microsoft/visualfsharp/issues/30): Compilation error "Incorrect number of type arguments to local call" +* Bugfix [#163](https://github.com/microsoft/visualfsharp/issues/163): Array slicing does not work properly with non 0-based arrays +* Bugfix [#148](https://github.com/microsoft/visualfsharp/issues/148): XML doc comment generation adding empty garbage +* Bugfix [#98](https://github.com/Microsoft/visualfsharp/issues/98): Using a single, optional, static parameter to a type provider causes failure +* Bugfix [#109](https://github.com/Microsoft/visualfsharp/issues/109): Invalid interface generated by --sig +* Bugfix [#123](https://github.com/Microsoft/visualfsharp/issues/123): Union types without sub-classes should be sealed +* Bugfix [#68](https://github.com/Microsoft/visualfsharp/issues/68): F# 3.1 / Profile 259: `<@ System.Exception() @>` causes AmbiguousMatchException at runtime +* Bugfix [#9](https://github.com/Microsoft/visualfsharp/issues/9): Internal error in FSI: FS0192: binding null type in envBindTypeRef +* Bugfix [#10](https://github.com/Microsoft/visualfsharp/issues/10): Internal error: binding null type in envBindTypeRef +* Bugfix [#266](https://github.com/Microsoft/visualfsharp/issues/266): `windowed` error message incorrectly flags "non-negative" input when "positive" is what's needed +* Bugfix [#270](https://github.com/Microsoft/visualfsharp/issues/270): "internal error: null: convTypeRefAux" in interactive when consuming quotation containing type name with commas or spaces +* Bugfix [#276](https://github.com/Microsoft/visualfsharp/issues/276): Combining struct field with units of measure will result managed type instead of unmanaged type +* Bugfix [#269](https://github.com/Microsoft/visualfsharp/issues/269): Accidentally `#load`ing a DLL in script causes internal error +* Bugfix [#293](https://github.com/Microsoft/visualfsharp/issues/293): `#r` references without relative path are not loaded when file is local +* Bugfix [#237](https://github.com/Microsoft/visualfsharp/issues/237): Problems using FSI on multiple namespaces in a single file +* Bugfix [#338](https://github.com/Microsoft/visualfsharp/issues/338): Escaped unicode characters are encoded incorrectly +* Bugfix [#370](https://github.com/Microsoft/visualfsharp/issues/370): `Seq.sortBy` cannot handle sequences of floats containing NaN +* Bugfix [#368](https://github.com/Microsoft/visualfsharp/issues/368): Optimizer incorrectly assumes immutable field accesses are side-effect free +* Bugfix [#337](https://github.com/Microsoft/visualfsharp/issues/337): Skip interfaces that lie outside the set of referenced assemblies +* Bugfix [#383](https://github.com/Microsoft/visualfsharp/issues/383): Class with `[]` barred from inheriting from normal non-nullable class +* Bugfix [#420](https://github.com/Microsoft/visualfsharp/issues/420): Compiler emits incorrect visibility modifier for internal constructors of abstract class +* Bugfix [#362](https://github.com/Microsoft/visualfsharp/issues/362): Depickling assertion followed by nullref internal errors in units-of-measure case +* Bugfix [#342](https://github.com/Microsoft/visualfsharp/issues/342): FS0193 error when specifying sequential struct layout of a type +* Bugfix [#299](https://github.com/Microsoft/visualfsharp/issues/299): AmbiguousMatchException with `[]` on overloaded extension methods +* Bugfix [#316](https://github.com/Microsoft/visualfsharp/issues/316): Null array-valued attribute causes internal compiler error +* Bugfix [#147](https://github.com/Microsoft/visualfsharp/issues/147): FS0073: internal error: Undefined or unsolved type variable: 'a +* Bugfix [#34](https://github.com/Microsoft/visualfsharp/issues/34): Error in pass2 for type FSharp.DataFrame.FSharpFrameExtensions, error: duplicate entry 'Frame2.GroupRowsBy' in method table +* Bugfix [#212](https://github.com/Microsoft/visualfsharp/issues/212): Record fields initialized in wrong order +* Bugfix [#445](https://github.com/Microsoft/visualfsharp/issues/445): Inconsistent compiler prompt message when using `--pause` switch +* Bugfix [#238](https://github.com/Microsoft/visualfsharp/issues/238): Generic use of member constraint solved to record field causes crash + +#### Visual Studio + +* Updated all templates (except tutorial) to include AssemblyInfo.fs setup in the same manner as default C# project templates +* Add keyboard shortcuts for FSI reset and clear all +* Improved debugger view for Map values +* Improved performance reading stdout/stderr from fsi.exe to F# Interactive window +* Support for VS project up-to-date check +* Improved project template descriptions, make it clearer how to target Xamarin platforms +* Intellisense completion in object initializers +* Add menu entry "Open folder in File Explorer" on folder nodes +* Intellisense completion for named arguments +* `Alt+Enter` sends current line of code to interactive if there is no selection +* Support for debugging F# scripts with the VS debugger +* Add support for hexadecimal values (like 0xFF) ??to MSBuild property BaseAddress +* Updated menu icons used for F# interactive to align with other VS interactive windows +* Bugfix: Fix url of fsharp.org website in vs templates +* Bugfix [#141](https://visualfsharp.codeplex.com/workitem/141): The "Error List" window does not parse MSBuild messages correctly +* Bugfix [#147](https://visualfsharp.codeplex.com/workitem/147): Go to definition doesn't work for default struct ctors +* Bugfix [#50](https://github.com/microsoft/visualfsharp/issues/50): Members hidden from IntelliSense still show up in tooltips +* Bugfix [#57](https://github.com/microsoft/visualfsharp/issues/57) (partial): Visual Studio locking access to XML doc files +* Bugfix [#157](https://github.com/Microsoft/visualfsharp/issues/157): Should not allow Framework 4 / F# 3.1 combination in project properties +* Bugfix [#114](https://github.com/Microsoft/visualfsharp/issues/114): Portable Library (legacy) template displays wrong target framework version +* Bugfix [#273](https://github.com/Microsoft/visualfsharp/issues/273): VS editor shows bogus errors when scripts use multi-hop `#r` and `#load` with relative paths +* Bugfix [#312](https://github.com/Microsoft/visualfsharp/issues/312): F# library project templates and portable library templates do not have `AutoGenerateBindingRedirects` set to true +* Bugfix [#321](https://github.com/Microsoft/visualfsharp/issues/321): Provided type quickinfo shouldn't show hidden and obsolete members from base class +* Bugfix [#319](https://github.com/Microsoft/visualfsharp/issues/319): Projects with target runtime 3.0 don't show up correctly on the VS project dialog +* Bugfix [#283](https://github.com/Microsoft/visualfsharp/issues/283): Changing target framework causes incorrect binding redirects to be added to app.config +* Bugfix [#278](https://github.com/Microsoft/visualfsharp/issues/278): NullReferenceException when trying to add some COM references +* Bugfix [#259](https://github.com/Microsoft/visualfsharp/issues/259): Renaming files in folders causes strange UI display +* Bugfix [#350](https://github.com/Microsoft/visualfsharp/issues/350): Renaming linked file results in error dialog +* Bugfix [#381](https://github.com/Microsoft/visualfsharp/issues/381): Intellisense stops working when referencing PCL component from script (requires `#r "System.Runtime"`) +* Bugfix [#104](https://github.com/Microsoft/visualfsharp/issues/104): Using paste to add files to an F# project causes the order of files in the project and on the UI to get out of sync +* Bugfix [#417](https://github.com/Microsoft/visualfsharp/issues/417): 'Move file up/down' keybindings should be scoped to solution explorer +* Bugfix [#246](https://github.com/Microsoft/visualfsharp/issues/246): Fix invalid already rendered folder error +* Bugfix [#106](https://github.com/Microsoft/visualfsharp/issues/106) (partial): Visual F# Tools leak memory while reloading solutions + +### [3.1.2] - 20 August 2014 + +Includes commits up to `3385e58aabc91368c8e1f551650ba48705aaa285` + +#### Language, compiler, runtime, interactive + +* Allow arbitrary-dimensional slicing +* Ship versions FSharp.Core.dll built on portable profiles 78 and 259 +* Support "shebang" (`#!`) in F# source files +* Vertical pipes disallowed in active pattern case identifiers +* Enable non-locking shadow copy of reference assemblies in fsi/fsianycpu +* Inline codegen optimization using structs +* Perf improvement for `Seq.windowed` +* exe.config files for fsc, fsi, fsianycpu now use simple version range instead of long set of explicit version redirects +* Bugfix [#72](https://visualfsharp.codeplex.com/workitem/72): Indexer properties with more than 4 arguments cannot be accessed +* Bugfix [#113](https://visualfsharp.codeplex.com/workitem/113): `Async.Sleep` in .NETCore profiles does not invoke error continuation +* Bugfix [#91](https://visualfsharp.codeplex.com/workitem/91): String module documentation is false +* Bugfix [#78](https://visualfsharp.codeplex.com/workitem/78): Allow space characters in active pattern case identifiers +* Bugfix: Invalid code generated when calling VB methods with optional byref args +* Bugfix [#69](https://visualfsharp.codeplex.com/workitem/69): Invalid code generated when calling C# method with optional nullable args +* Bugfix [#9](https://visualfsharp.codeplex.com/workitem/9): XML doc comments on F# record type fields do not appear when accessing in C# +* Bugfix [#59](https://visualfsharp.codeplex.com/workitem/59): Compiler always requires System.Runtime.InteropServices, this is not present in all portable profiles +* Bugfix [#17](https://visualfsharp.codeplex.com/workitem/17): Incorrect generation of XML from doc comments for Record fields +* Bugfix [#7](https://visualfsharp.codeplex.com/workitem/17): NullRef in list comprehension, when for loop works +* Bugfix [#1](https://visualfsharp.codeplex.com/workitem/1): Type inference involving generic param arrays +* Bugfix [#37](https://visualfsharp.codeplex.com/workitem/37): Perf regression in 3.1.0 related to resolving extension methods +* Bugfix: Can't run F# console application with 'update' in name +* Bugfix: Slicing and range expression inconsistent +* Bugfix: Invalid code is generated when using field initializers in struct constructor + +#### Visual Studio + +* Project templates for F# portable libraries targeting profiles 78 and 259 +* Enable non-locking shadow copy of reference assemblies in fsi/fsianycpu (VS options added) +* Allow breakpoints to be set inside of quotations +* Support "Publish" action in project system for web, Azure +* Bugfix [#126](https://visualfsharp.codeplex.com/workitem/126): F# package installer does not honor custom install paths for express SKUs +* Bugfix [#75](https://visualfsharp.codeplex.com/workitem/75): Microsoft.FSharp.Targets shim not deployed with F# SDK +* Bugfix: Fix crash in smart indent provider +* Bugfix [#55](https://visualfsharp.codeplex.com/workitem/55): Cannot add reference to F# PCL project +* Bugfix: Typos in tutorial project script +* Bugfix: Required C# event members do not appear in intellisense when signature is (object, byref) + + +### [3.1.1] - 24 January 2014 + +#### Language, compiler, runtime, interactive + +* Improve F# compiler telemetry +* Bugfix: Improper treatment of * in AssemblyVersion attribute +* Bugfix: ``sprintf "%%"`` returns `"%%"` in F# 3.1.0, previously returned `"%"` in F# 3.0 and earlier +* Bugfix: F# 3.0 1D slice setter does not compile in F# 3.1.0 + +#### Visual Studio + +* Enable installation of Visual F# on VS Desktop Express +* Added support for showing xml doc comments for named arguments +* Visual F# package deployable on non-VS machines. Deploys compiler and runtime toolchain plus msbuild targets +* Bugfix: Errors when attempting to add reference to .NET core library +* Bugfix: Crash in `FSComp.SR.RunStartupValidation()` + +[4.0.0]: http://fsharp.org +[3.1.2]: http://blogs.msdn.com/b/fsharpteam/archive/2014/08/20/announcing-the-release-of-visual-f-tools-3-1-2.aspx +[3.1.1]: http://blogs.msdn.com/b/fsharpteam/archive/2014/01/22/announcing-visual-f-3-1-1-and-support-for-desktop-express.aspx + diff --git a/scripts/dotnet-install.sh b/scripts/dotnet-install.sh old mode 100644 new mode 100755 diff --git a/setup/FSharp.SDK/Common.Wix.Properties.wxs b/setup/FSharp.SDK/Common.Wix.Properties.wxs deleted file mode 100644 index f9f1994caf1..00000000000 --- a/setup/FSharp.SDK/Common.Wix.Properties.wxs +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/setup/FSharp.SDK/FSharp.SDK.wixproj b/setup/FSharp.SDK/FSharp.SDK.wixproj deleted file mode 100644 index 0ebb007757b..00000000000 --- a/setup/FSharp.SDK/FSharp.SDK.wixproj +++ /dev/null @@ -1,82 +0,0 @@ - - - - - $(MSBuildProjectDirectory)\..\.. - $(FSharpTreeRoot)\setup - - - - - - - Microsoft.FSharp.SDK.Core - Microsoft.FSharp.SDK.Resources.$(LocaleCode) - da0da41f-0e00-4598-8eee-b29d31b0ca04 - Package - net - true - false - true - false - - - - $(DefineConstants);LocaleCode=$(LocaleCode) - $(DefineConstants);LocaleId=$(LocaleId) - $(DefineConstants);LocaleParentCulture=$(LocaleParentCulture) - $(DefineConstants);LocaleSpecificCulture=$(LocaleSpecificCulture) - $(DefineConstants);IsLangPack=$(IsLangPack) - - $(DefineConstants);BinariesDir=$(BinariesDir) - $(DefineConstants);FSharpTreeRoot=$(FSharpTreeRoot) - $(DefineConstants);NugetPackagesDir=$(NugetPackagesDir) - - - - - WixNetFxExtension - - - FSharp.Wix.Extensions - $(BinariesDir)\setup\FSharp.Wix.Extensions.dll - - - - - - - - - - - - - - - - - - Microsoft400 - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/setup/FSharp.SDK/FSharp.SDK.wxs b/setup/FSharp.SDK/FSharp.SDK.wxs deleted file mode 100644 index f05fa1e4bd1..00000000000 --- a/setup/FSharp.SDK/FSharp.SDK.wxs +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/setup/FSharp.SDK/component-groups/Compiler_LangPack.wxs b/setup/FSharp.SDK/component-groups/Compiler_LangPack.wxs deleted file mode 100644 index acff23337ef..00000000000 --- a/setup/FSharp.SDK/component-groups/Compiler_LangPack.wxs +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/setup/FSharp.SDK/component-groups/Compiler_Redist.wxs b/setup/FSharp.SDK/component-groups/Compiler_Redist.wxs deleted file mode 100644 index c9d7182c018..00000000000 --- a/setup/FSharp.SDK/component-groups/Compiler_Redist.wxs +++ /dev/null @@ -1,212 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/setup/FSharp.SDK/component-groups/Runtime_LangPack.wxs b/setup/FSharp.SDK/component-groups/Runtime_LangPack.wxs deleted file mode 100644 index 5070e5fc1cd..00000000000 --- a/setup/FSharp.SDK/component-groups/Runtime_LangPack.wxs +++ /dev/null @@ -1,165 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/setup/FSharp.SDK/component-groups/Runtime_Redist.wxs b/setup/FSharp.SDK/component-groups/Runtime_Redist.wxs deleted file mode 100644 index 46dd92b7f73..00000000000 --- a/setup/FSharp.SDK/component-groups/Runtime_Redist.wxs +++ /dev/null @@ -1,220 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/setup/FSharp.Setup.props b/setup/FSharp.Setup.props index 9eafdc99cc5..899f78e6baa 100644 --- a/setup/FSharp.Setup.props +++ b/setup/FSharp.Setup.props @@ -5,19 +5,18 @@ 2.0 3.10 3.10.0.1503 + $(MSBuildThisFileDirectory) $(SetupRootFolder)\..\packages\WiX.Toolset.2015.$(WiXToolset2015Version)\tools\wix $(SetupRootFolder)\..\packages - + + + - 4.1 - - $([System.DateTime]::Now.ToString(yyyyMMdd.0)) - - $(FSharpProductVersion).$(BUILD_BUILDNUMBER.Replace(".DRAFT", "")) - + + $(VSMajorVersion).$(VSMinorVersion).$(BUILD_BUILDNUMBER) - + net40 Debug @@ -26,7 +25,7 @@ $(SetupRootFolder)\..\$(Configuration) - $(BinariesDir)\$(TargetDotnetProfile)\bin + $(BinariesDir)\$(TargetDotnetProfile)\bin\ $(BinariesDir)\insertion obj\$(Configuration)\ $(BinariesDir)\setup @@ -37,97 +36,111 @@ ENU 1033 + 9 en en-US false - + CHT 1028 + 31748 zh-Hant zh-TW true - + CSY 1029 + 5 cs cs-CZ true - + DEU 1031 + 7 de de-DE true - + FRA 1036 + 12 fr fr-FR true - + ITA 1040 + 16 it it-IT true - + JPN 1041 + 17 ja ja-JP true - + KOR 1042 + 18 ko ko-KR true - + PLK 1045 + 21 pl pl-PL true - + PTB 1046 + 1046 pt-BR pt-BR true - + RUS 1049 + 25 ru ru-RU true - + TRK 1055 + 31 tr tr-TR true - + CHS 2052 + 4 zh-Hans zh-CN true - + ESN 3082 + 10 es es-ES true diff --git a/setup/FSharp.Wix.Extensions/AssemblyInfo.cs b/setup/FSharp.Wix.Extensions/AssemblyInfo.cs deleted file mode 100644 index 42523fa3840..00000000000 --- a/setup/FSharp.Wix.Extensions/AssemblyInfo.cs +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. - -using FSharp.WIX.Extensions; -using Microsoft.Tools.WindowsInstallerXml; - -[assembly: AssemblyDefaultWixExtension(typeof(FSharpWixExtension))] diff --git a/setup/FSharp.Wix.Extensions/FSharp.Wix.Extensions.csproj b/setup/FSharp.Wix.Extensions/FSharp.Wix.Extensions.csproj deleted file mode 100644 index 135d678cae9..00000000000 --- a/setup/FSharp.Wix.Extensions/FSharp.Wix.Extensions.csproj +++ /dev/null @@ -1,45 +0,0 @@ - - - - - $(MSBuildProjectDirectory)\.. - - - - - - - CSharp - 15.0 - 4.4.1.0 - cs - - - - Library - FSharp.Wix.Extensions - {321E6C2C-9E1C-4506-B1C0-1F81DCAEF207} - v4.5 - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/setup/FSharp.Wix.Extensions/FSharpPreprocessorExtension.cs b/setup/FSharp.Wix.Extensions/FSharpPreprocessorExtension.cs deleted file mode 100644 index 48973850a9b..00000000000 --- a/setup/FSharp.Wix.Extensions/FSharpPreprocessorExtension.cs +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. - -using Microsoft.Tools.WindowsInstallerXml; -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Linq; -using System.Security.Cryptography; -using System.Text; - -namespace FSharp.WIX.Extensions -{ - public class FSharpPreprocessorExtension : PreprocessorExtension - { - private readonly string[] prefixes = new string[] { "fsharp" }; - - public override string[] Prefixes - { - get { return this.prefixes; } - } - - public override string EvaluateFunction(string prefix, string function, string[] args) - { - if (prefixes.Contains(prefix)) - { - switch (function) - { - case "guid": - return this.Guid(args); - } - } - - return null; - } - - private string Guid(string[] args) - { - var input = string.Join("|", args); - var bytes = Encoding.Default.GetBytes(input); - var output = MD5.Create().ComputeHash(bytes); - - return new Guid(output).ToString(); - } - } -} diff --git a/setup/FSharp.Wix.Extensions/FSharpWixExtension.cs b/setup/FSharp.Wix.Extensions/FSharpWixExtension.cs deleted file mode 100644 index 4273e1812a1..00000000000 --- a/setup/FSharp.Wix.Extensions/FSharpWixExtension.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. - -using System; -using Microsoft.Tools.WindowsInstallerXml; - -namespace FSharp.WIX.Extensions -{ - public class FSharpWixExtension : WixExtension - { - private readonly Lazy preprocessorExtension = new Lazy(); - - public override PreprocessorExtension PreprocessorExtension - { - get { return this.preprocessorExtension.Value; } - } - } -} diff --git a/setup/Swix/Microsoft.FSharp.Compiler.Resources/Empty.swr b/setup/Swix/Microsoft.FSharp.Compiler.Resources/Empty.swr new file mode 100644 index 00000000000..32da88c9291 --- /dev/null +++ b/setup/Swix/Microsoft.FSharp.Compiler.Resources/Empty.swr @@ -0,0 +1,5 @@ +use vs + +package name=Microsoft.FSharp.Compiler.Resources + version=$(FSharpPackageVersion) + vs.package.language=$(LocaleSpecificCulture) diff --git a/setup/Swix/Microsoft.FSharp.Compiler.Resources/Files.swr b/setup/Swix/Microsoft.FSharp.Compiler.Resources/Files.swr new file mode 100644 index 00000000000..464fdd774ee --- /dev/null +++ b/setup/Swix/Microsoft.FSharp.Compiler.Resources/Files.swr @@ -0,0 +1,11 @@ +use vs + +package name=Microsoft.FSharp.Compiler.Resources + version=$(FSharpPackageVersion) + vs.package.language=$(LocaleSpecificCulture) + +folder "InstallDir:Common7\IDE\CommonExtensions\Microsoft\FSharpCompiler\$(LocaleParentCulture)" + file source="$(BinariesFolder)\net40\bin\$(LocaleParentCulture)\FSharp.Build.resources.dll" + file source="$(BinariesFolder)\net40\bin\$(LocaleParentCulture)\FSharp.Compiler.Interactive.Settings.resources.dll" + file source="$(BinariesFolder)\net40\bin\$(LocaleParentCulture)\FSharp.Compiler.Private.resources.dll" + file source="$(BinariesFolder)\net40\bin\$(LocaleParentCulture)\FSharp.Core.resources.dll" diff --git a/setup/Swix/Microsoft.FSharp.Compiler.Resources/Microsoft.FSharp.Compiler.Resources.swixproj b/setup/Swix/Microsoft.FSharp.Compiler.Resources/Microsoft.FSharp.Compiler.Resources.swixproj new file mode 100644 index 00000000000..d722fb0293e --- /dev/null +++ b/setup/Swix/Microsoft.FSharp.Compiler.Resources/Microsoft.FSharp.Compiler.Resources.swixproj @@ -0,0 +1,41 @@ + + + + + ..\..\..\src + neutral + false + vsix + true + Debug + $(FSharpSourcesRoot)\..\$(Configuration) + $(BinariesFolder)\insertion + Microsoft.FSharp.Compiler.Resources.$(LocaleCode) + $(MSBuildThisFileDirectory)obj + + + + + + $(PackagePreprocessorDefinitions);BinariesFolder=$(BinariesFolder) + $(PackagePreprocessorDefinitions);FSharpPackageVersion=$(FSharpPackageVersion) + $(PackagePreprocessorDefinitions);LocaleParentCulture=$(LocaleParentCulture) + $(PackagePreprocessorDefinitions);LocaleSpecificCulture=$(LocaleSpecificCulture) + + + + + + + + + + + + + + + + + + diff --git a/setup/Swix/Microsoft.FSharp.Compiler/Dependencies.swr b/setup/Swix/Microsoft.FSharp.Compiler/Dependencies.swr new file mode 100644 index 00000000000..c5dcc628603 --- /dev/null +++ b/setup/Swix/Microsoft.FSharp.Compiler/Dependencies.swr @@ -0,0 +1,9 @@ +use vs + +package name=Microsoft.FSharp.Compiler + version=$(FSharpPackageVersion) + +vs.dependencies + vs.dependency id=Microsoft.FSharp.Dependencies + version=$(FSharpPackageVersion) + type=Required diff --git a/setup/Swix/Microsoft.FSharp.Compiler/Files.swr b/setup/Swix/Microsoft.FSharp.Compiler/Files.swr new file mode 100644 index 00000000000..e546ffe0b30 --- /dev/null +++ b/setup/Swix/Microsoft.FSharp.Compiler/Files.swr @@ -0,0 +1,39 @@ +use vs + +package name=Microsoft.FSharp.Compiler + version=$(FSharpPackageVersion) + +folder "InstallDir:Common7\IDE\CommonExtensions\Microsoft\FSharp" + + file source=$(BinariesFolder)\net40\bin\fsc.exe vs.file.ngen=yes vs.file.ngenArchitecture=All vs.file.ngenPriority=2 vs.file.ngenApplication="[installDir]\Common7\IDE\CommonExtensions\Microsoft\FSharp\fsc.exe" + file source="$(BinariesFolder)\net40\bin\fsc.exe.config" + + file source=$(BinariesFolder)\net40\bin\fsi.exe vs.file.ngen=yes vs.file.ngenArchitecture=X86 vs.file.ngenPriority=2 vs.file.ngenApplication="[installDir]\Common7\IDE\CommonExtensions\Microsoft\FSharp\fsi.exe" + file source="$(BinariesFolder)\net40\bin\fsi.exe.config" + + file source="$(BinariesFolder)\net40\bin\fsiAnyCpu.exe" vs.file.ngen=yes vs.file.ngenArchitecture=X64 vs.file.ngenPriority=2 vs.file.ngenApplication="[installDir]\Common7\IDE\CommonExtensions\Microsoft\FSharp\fsiAnyCpu.exe" + file source="$(BinariesFolder)\net40\bin\fsiAnyCpu.exe.config" + + file source="$(BinariesFolder)\net40\bin\FSharp.Compiler.Interactive.Settings.dll" vs.file.ngen=yes vs.file.ngenArchitecture=All vs.file.ngenPriority=2 + file source="$(BinariesFolder)\net40\bin\FSharp.Compiler.Private.dll" vs.file.ngen=yes vs.file.ngenArchitecture=All vs.file.ngenPriority=2 + file source="$(BinariesFolder)\net40\bin\FSharp.Compiler.Server.Shared.dll" vs.file.ngen=yes vs.file.ngenArchitecture=All vs.file.ngenPriority=2 + + file source="$(BinariesFolder)\net40\bin\FSharp.Core.dll" vs.file.ngen=yes vs.file.ngenArchitecture=All vs.file.ngenPriority=2 + file source="$(BinariesFolder)\net40\bin\FSharp.Core.optdata" + file source="$(BinariesFolder)\net40\bin\FSharp.Core.sigdata" + + file source="$(BinariesFolder)\net40\bin\FSharp.Build.dll" vs.file.ngen=yes vs.file.ngenArchitecture=All vs.file.ngenPriority=2 + + file source="$(PackagesFolder)\Microsoft.VisualFSharp.Type.Providers.Redist.$(MicrosoftVisualFSharpTypeProvidersRedistPackageVersion)\content\4.3.0.0\FSharp.Data.TypeProviders.dll" + file source="$(BinariesFolder)\net40\bin\Microsoft.Build.dll" + file source="$(BinariesFolder)\net40\bin\Microsoft.Build.Framework.dll" + file source="$(BinariesFolder)\net40\bin\Microsoft.Build.Tasks.Core.dll" + file source="$(BinariesFolder)\net40\bin\Microsoft.Build.Utilities.Core.dll" + file source="$(BinariesFolder)\net40\bin\Microsoft.Portable.FSharp.Targets" + file source="$(BinariesFolder)\net40\bin\System.Collections.Immutable.dll" + file source="$(BinariesFolder)\net40\bin\System.Reflection.Metadata.dll" + file source="$(BinariesFolder)\net40\bin\System.ValueTuple.dll" + file source="$(BinariesFolder)\net40\bin\Microsoft.FSharp.NetSdk.props" + file source="$(BinariesFolder)\net40\bin\Microsoft.FSharp.NetSdk.targets" + file source="$(BinariesFolder)\net40\bin\Microsoft.FSharp.Overrides.NetSdk.targets" + file source="$(BinariesFolder)\net40\bin\Microsoft.FSharp.Targets" diff --git a/setup/Swix/Microsoft.FSharp.Compiler/Microsoft.FSharp.Compiler.swixproj b/setup/Swix/Microsoft.FSharp.Compiler/Microsoft.FSharp.Compiler.swixproj new file mode 100644 index 00000000000..d748087bfcc --- /dev/null +++ b/setup/Swix/Microsoft.FSharp.Compiler/Microsoft.FSharp.Compiler.swixproj @@ -0,0 +1,42 @@ + + + + + $(MSBuildThisFileDirectory)..\..\..\src + $(FSharpSourcesRoot)\.. + neutral + false + vsix + true + Debug + $(FSharpSourcesRoot)\..\$(Configuration) + $(FSharpSourcesRoot)\..\packages + $(BinariesFolder)\insertion + Microsoft.FSharp.Compiler + $(MSBuildThisFileDirectory)obj + + + + + + + $(PackagePreprocessorDefinitions);BinariesFolder=$(BinariesFolder) + $(PackagePreprocessorDefinitions);PackagesFolder=$(PackagesFolder) + $(PackagePreprocessorDefinitions);FSharpTreeRoot=$(FSharpTreeRoot) + $(PackagePreprocessorDefinitions);FSharpPackageVersion=$(FSharpPackageVersion) + $(PackagePreprocessorDefinitions);MicrosoftVisualFSharpTypeProvidersRedistPackageVersion=$(MicrosoftVisualFSharpTypeProvidersRedistPackageVersion) + + + + + + + + + + + + + + + diff --git a/setup/Swix/Microsoft.FSharp.Dependencies/Dependencies.swr b/setup/Swix/Microsoft.FSharp.Dependencies/Dependencies.swr index fdd884965a7..97fadaec582 100644 --- a/setup/Swix/Microsoft.FSharp.Dependencies/Dependencies.swr +++ b/setup/Swix/Microsoft.FSharp.Dependencies/Dependencies.swr @@ -4,20 +4,6 @@ package name=Microsoft.FSharp.Dependencies version=$(FSharpPackageVersion) vs.dependencies - vs.dependency id=Microsoft.FSharp.SDK.Core + vs.dependency id=Microsoft.FSharp.SDK version=$(FSharpPackageVersion) type=Required - - vs.dependency id=Microsoft.FSharp.SDK.Resources - version=$(FSharpPackageVersion) - type=Required - - vs.dependency id=Microsoft.FSharp.VSIX.Full.Core - version=$(FSharpPackageVersion) - type=Required - when=Microsoft.VisualStudio.Product.Enterprise,Microsoft.VisualStudio.Product.Professional,Microsoft.VisualStudio.Product.Community - - vs.dependency id=Microsoft.FSharp.VSIX.Full.Resources - version=$(FSharpPackageVersion) - type=Required - when=Microsoft.VisualStudio.Product.Enterprise,Microsoft.VisualStudio.Product.Professional,Microsoft.VisualStudio.Product.Community diff --git a/setup/Swix/Microsoft.FSharp.Dependencies/Files.swr b/setup/Swix/Microsoft.FSharp.Dependencies/Files.swr index 9dd32500602..29a77d01c79 100644 --- a/setup/Swix/Microsoft.FSharp.Dependencies/Files.swr +++ b/setup/Swix/Microsoft.FSharp.Dependencies/Files.swr @@ -3,10 +3,11 @@ use vs package name=Microsoft.FSharp.Dependencies version=$(FSharpPackageVersion) -folder "InstallDir:MSBuild\Microsoft\VisualStudio\v15.0\FSharp" - file "Microsoft.FSharp.Targets" source="$(BinariesFolder)\setup\resources\Microsoft.FSharp.Shim.targets" - file "Microsoft.Portable.FSharp.Targets" source="$(BinariesFolder)\setup\resources\Microsoft.Portable.FSharp.Shim.targets" +folder "InstallDir:MSBuild\Microsoft\VisualStudio\v$(VSGeneralVersion)\FSharp" + file "Microsoft.FSharp.targets" source="$(BinariesFolder)\setup\resources\Microsoft.FSharp.Shim.targets" + file "Microsoft.Portable.FSharp.targets" source="$(BinariesFolder)\setup\resources\Microsoft.Portable.FSharp.Shim.targets" file "Microsoft.FSharp.NetSdk.targets" source="$(BinariesFolder)\setup\resources\Microsoft.FSharp.NetSdk.Shim.targets" + file "Microsoft.FSharp.Overrides.NetSdk.targets" source="$(BinariesFolder)\setup\resources\Microsoft.FSharp.Overrides.NetSdk.Shim.targets" file "Microsoft.FSharp.NetSdk.props" source="$(BinariesFolder)\setup\resources\Microsoft.FSharp.NetSdk.Shim.props" folder "InstallDir:Common7\IDE\PublicAssemblies" @@ -14,14 +15,5 @@ folder "InstallDir:Common7\IDE\PublicAssemblies" file source="$(BinariesFolder)\net40\bin\FSharp.Core.optdata" file source="$(BinariesFolder)\net40\bin\FSharp.Core.sigdata" -folder "InstallDir:Common7\IDE\NewScriptItems" - file source="$(BinariesFolder)\setup\resources\NewFileDialog\Script\NewFSharpScriptItems.vsdir" - file source="$(BinariesFolder)\setup\resources\NewFileDialog\Script\Script.fsx" - -folder "InstallDir:Common7\IDE\NewFileItems" - file source="$(BinariesFolder)\setup\resources\NewFileDialog\General\NewFSharpFileItems.vsdir" - file source="$(BinariesFolder)\setup\resources\NewFileDialog\General\File.fs" - file source="$(BinariesFolder)\setup\resources\NewFileDialog\General\Script.fsx" - folder "InstallDir:Common7\Tools\VsDevCmd\Ext" file source="fsharp.bat" diff --git a/setup/Swix/Microsoft.FSharp.Dependencies/Microsoft.FSharp.Dependencies.swixproj b/setup/Swix/Microsoft.FSharp.Dependencies/Microsoft.FSharp.Dependencies.swixproj index 4ac13f53b0a..06d75f70f72 100644 --- a/setup/Swix/Microsoft.FSharp.Dependencies/Microsoft.FSharp.Dependencies.swixproj +++ b/setup/Swix/Microsoft.FSharp.Dependencies/Microsoft.FSharp.Dependencies.swixproj @@ -21,6 +21,7 @@ $(PackagePreprocessorDefinitions);BinariesFolder=$(BinariesFolder) $(PackagePreprocessorDefinitions);PackagesFolder=$(PackagesFolder) $(PackagePreprocessorDefinitions);FSharpPackageVersion=$(FSharpPackageVersion) + $(PackagePreprocessorDefinitions);VSGeneralVersion=$(VSGeneralVersion) @@ -30,9 +31,10 @@ + - - - + + + diff --git a/setup/Swix/Microsoft.FSharp.Dependencies/fsharp.bat b/setup/Swix/Microsoft.FSharp.Dependencies/fsharp.bat index 9d5d7f7d77d..adbadf3f819 100644 --- a/setup/Swix/Microsoft.FSharp.Dependencies/fsharp.bat +++ b/setup/Swix/Microsoft.FSharp.Dependencies/fsharp.bat @@ -1,7 +1,8 @@ if "%VSCMD_TEST%" NEQ "" goto :test if "%VSCMD_ARG_CLEAN_ENV%" NEQ "" goto :clean_env -if "%FSHARPINSTALLDIR%" NEQ "" set "PATH=%FSHARPINSTALLDIR%;%PATH%" +set FSHARPINSTALLDIR=%VSINSTALLDIR%Common7\IDE\CommonExtensions\Microsoft\FSharp\ +set "PATH=%FSHARPINSTALLDIR%;%PATH%" goto :end diff --git a/setup/Swix/Microsoft.FSharp.IDE/Dependencies.swr b/setup/Swix/Microsoft.FSharp.IDE/Dependencies.swr new file mode 100644 index 00000000000..875b8af13f6 --- /dev/null +++ b/setup/Swix/Microsoft.FSharp.IDE/Dependencies.swr @@ -0,0 +1,19 @@ +use vs + +package name=Microsoft.FSharp.IDE + version=$(FSharpPackageVersion) + +vs.dependencies + vs.dependency id=Microsoft.FSharp.Dependencies + version=$(FSharpPackageVersion) + type=Required + + vs.dependency id=Microsoft.FSharp.VSIX.Full.Core + version=$(FSharpPackageVersion) + type=Required + when=Microsoft.VisualStudio.Product.Enterprise,Microsoft.VisualStudio.Product.Professional,Microsoft.VisualStudio.Product.Community + + vs.dependency id=Microsoft.FSharp.VSIX.Full.Resources + version=$(FSharpPackageVersion) + type=Required + when=Microsoft.VisualStudio.Product.Enterprise,Microsoft.VisualStudio.Product.Professional,Microsoft.VisualStudio.Product.Community diff --git a/setup/Swix/Microsoft.FSharp.IDE/Files.swr b/setup/Swix/Microsoft.FSharp.IDE/Files.swr new file mode 100644 index 00000000000..bf544b4be14 --- /dev/null +++ b/setup/Swix/Microsoft.FSharp.IDE/Files.swr @@ -0,0 +1,13 @@ +use vs + +package name=Microsoft.FSharp.IDE + version=$(FSharpPackageVersion) + +folder "InstallDir:Common7\IDE\NewScriptItems" + file source="$(BinariesFolder)\setup\resources\NewFileDialog\Script\NewFSharpScriptItems.vsdir" + file source="$(BinariesFolder)\setup\resources\NewFileDialog\Script\Script.fsx" + +folder "InstallDir:Common7\IDE\NewFileItems" + file source="$(BinariesFolder)\setup\resources\NewFileDialog\General\NewFSharpFileItems.vsdir" + file source="$(BinariesFolder)\setup\resources\NewFileDialog\General\File.fs" + file source="$(BinariesFolder)\setup\resources\NewFileDialog\General\Script.fsx" diff --git a/setup/Swix/Microsoft.FSharp.IDE/Microsoft.FSharp.IDE.swixproj b/setup/Swix/Microsoft.FSharp.IDE/Microsoft.FSharp.IDE.swixproj new file mode 100644 index 00000000000..47c00dd88fe --- /dev/null +++ b/setup/Swix/Microsoft.FSharp.IDE/Microsoft.FSharp.IDE.swixproj @@ -0,0 +1,38 @@ + + + + + $(MSBuildThisFileDirectory)..\..\..\src + neutral + false + vsix + true + Debug + $(FSharpSourcesRoot)\..\$(Configuration) + $(FSharpSourcesRoot)\..\packages + $(BinariesFolder)\insertion + Microsoft.FSharp.IDE + $(MSBuildThisFileDirectory)obj + + + + + + $(PackagePreprocessorDefinitions);BinariesFolder=$(BinariesFolder) + $(PackagePreprocessorDefinitions);PackagesFolder=$(PackagesFolder) + $(PackagePreprocessorDefinitions);FSharpPackageVersion=$(FSharpPackageVersion) + + + + + + + + + + + + + + + diff --git a/setup/Swix/Microsoft.FSharp.SDK.Core/Files.swr b/setup/Swix/Microsoft.FSharp.SDK.Core/Files.swr deleted file mode 100644 index 67a6272ceb6..00000000000 --- a/setup/Swix/Microsoft.FSharp.SDK.Core/Files.swr +++ /dev/null @@ -1,14 +0,0 @@ -use vs - -package name=Microsoft.FSharp.SDK.Core - version=$(FSharpPackageVersion) - vs.package.type=msi - vs.package.providerKey=Microsoft.FSharp.SDK.Core,v4.1 - -vs.installSize - SystemDrive=194670592 - TargetDrive=0 - SharedDrive=0 - -vs.payloads - vs.payload source="$(BinariesFolder)\msi\Microsoft.FSharp.SDK.Core.msi" diff --git a/setup/Swix/Microsoft.FSharp.SDK.Core/Microsoft.FSharp.SDK.Core.swixproj b/setup/Swix/Microsoft.FSharp.SDK.Core/Microsoft.FSharp.SDK.Core.swixproj deleted file mode 100644 index 99ae94075ed..00000000000 --- a/setup/Swix/Microsoft.FSharp.SDK.Core/Microsoft.FSharp.SDK.Core.swixproj +++ /dev/null @@ -1,35 +0,0 @@ - - - - - ..\..\..\src - neutral - false - manifest - Microsoft.FSharp.SDK.Core - true - Debug - $(FSharpSourcesRoot)\..\$(Configuration) - $(BinariesFolder)\insertion - $(MSBuildThisFileDirectory)obj - - - - - - $(PackagePreprocessorDefinitions);BinariesFolder=$(BinariesFolder) - $(PackagePreprocessorDefinitions);FSharpPackageVersion=$(FSharpPackageVersion) - - - - - - - - - - - - - - diff --git a/setup/Swix/Microsoft.FSharp.SDK.Resources/Empty.swr b/setup/Swix/Microsoft.FSharp.SDK.Resources/Empty.swr deleted file mode 100644 index 262ef0c9ff5..00000000000 --- a/setup/Swix/Microsoft.FSharp.SDK.Resources/Empty.swr +++ /dev/null @@ -1,7 +0,0 @@ -use vs - -package name=Microsoft.FSharp.SDK.Resources - version=$(FSharpPackageVersion) - vs.package.language=$(LocaleSpecificCulture) - vs.package.installSize=1 - vs.package.providerKey=Microsoft.FSharp.SDK.Resources,$(LocaleSpecificCulture),v4.1 diff --git a/setup/Swix/Microsoft.FSharp.SDK.Resources/Files.swr b/setup/Swix/Microsoft.FSharp.SDK.Resources/Files.swr deleted file mode 100644 index a21afbd7961..00000000000 --- a/setup/Swix/Microsoft.FSharp.SDK.Resources/Files.swr +++ /dev/null @@ -1,15 +0,0 @@ -use vs - -package name=Microsoft.FSharp.SDK.Resources - version=$(FSharpPackageVersion) - vs.package.type=msi - vs.package.language=$(LocaleSpecificCulture) - vs.package.providerKey=Microsoft.FSharp.SDK.Resources,$(LocaleSpecificCulture),v4.1 - -vs.installSize - SystemDrive=12681438 - TargetDrive=0 - SharedDrive=0 - -vs.payloads - vs.payload source="$(BinariesFolder)\msi\Microsoft.FSharp.SDK.Resources.$(LocaleCode).msi" diff --git a/setup/Swix/Microsoft.FSharp.SDK.Resources/Microsoft.FSharp.SDK.Resources.swixproj b/setup/Swix/Microsoft.FSharp.SDK.Resources/Microsoft.FSharp.SDK.Resources.swixproj deleted file mode 100644 index 6ed31b2979f..00000000000 --- a/setup/Swix/Microsoft.FSharp.SDK.Resources/Microsoft.FSharp.SDK.Resources.swixproj +++ /dev/null @@ -1,50 +0,0 @@ - - - - - ..\..\..\src - neutral - false - Microsoft.FSharp.SDK.Resources.$(LocaleCode) - true - Debug - $(FSharpSourcesRoot)\..\$(Configuration) - $(BinariesFolder)\insertion - vsix - manifest - $(MSBuildThisFileDirectory)obj - - - - - - $(PackagePreprocessorDefinitions);BinariesFolder=$(BinariesFolder) - $(PackagePreprocessorDefinitions);FSharpPackageVersion=$(FSharpPackageVersion) - $(PackagePreprocessorDefinitions);LocaleCode=$(LocaleCode) - $(PackagePreprocessorDefinitions);LocaleId=$(LocaleId) - $(PackagePreprocessorDefinitions);LocaleParentCulture=$(LocaleParentCulture) - $(PackagePreprocessorDefinitions);LocaleSpecificCulture=$(LocaleSpecificCulture) - $(PackagePreprocessorDefinitions);IsLangPack=$(IsLangPack) - - - - - - - - - - - - - - - - - - - - - - - diff --git a/setup/Swix/Microsoft.FSharp.SDK/Files.swr b/setup/Swix/Microsoft.FSharp.SDK/Files.swr new file mode 100644 index 00000000000..228bc933437 --- /dev/null +++ b/setup/Swix/Microsoft.FSharp.SDK/Files.swr @@ -0,0 +1,102 @@ +use vs + +package name=Microsoft.FSharp.SDK + version=$(FSharpPackageVersion) + +folder "InstallDir:Common7\IDE\CommonExtensions\Microsoft\FSharpSdk" + + folder ".NETCore" + folder "3.3.1.0" + file source="$(PackagesFolder)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETCore\3.3.1.0\FSharp.Core.dll" + file source="$(PackagesFolder)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETCore\3.3.1.0\FSharp.Core.optdata" + file source="$(PackagesFolder)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETCore\3.3.1.0\FSharp.Core.sigdata" + file source="$(PackagesFolder)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETCore\3.3.1.0\FSharp.Core.xml" + folder "3.7.4.0" + file source="$(PackagesFolder)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETCore\3.7.4.0\FSharp.Core.dll" + file source="$(PackagesFolder)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETCore\3.7.4.0\FSharp.Core.optdata" + file source="$(PackagesFolder)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETCore\3.7.4.0\FSharp.Core.sigdata" + file source="$(PackagesFolder)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETCore\3.7.4.0\FSharp.Core.xml" + folder "3.7.41.0" + file source="$(PackagesFolder)\Microsoft.Portable.FSharp.Core.10.1.0\lib\profiles\portable-net45+netcore45\FSharp.Core.dll" + file source="$(PackagesFolder)\Microsoft.Portable.FSharp.Core.10.1.0\lib\profiles\portable-net45+netcore45\FSharp.Core.optdata" + file source="$(PackagesFolder)\Microsoft.Portable.FSharp.Core.10.1.0\lib\profiles\portable-net45+netcore45\FSharp.Core.sigdata" + file source="$(PackagesFolder)\Microsoft.Portable.FSharp.Core.10.1.0\lib\profiles\portable-net45+netcore45\FSharp.Core.xml" + folder "3.78.3.1" + file source="$(PackagesFolder)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETCore\3.78.3.1\FSharp.Core.dll" + file source="$(PackagesFolder)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETCore\3.78.3.1\FSharp.Core.optdata" + file source="$(PackagesFolder)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETCore\3.78.3.1\FSharp.Core.sigdata" + file source="$(PackagesFolder)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETCore\3.78.3.1\FSharp.Core.xml" + folder "3.78.4.0" + file source="$(PackagesFolder)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETCore\3.78.4.0\FSharp.Core.dll" + file source="$(PackagesFolder)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETCore\3.78.4.0\FSharp.Core.optdata" + file source="$(PackagesFolder)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETCore\3.78.4.0\FSharp.Core.sigdata" + file source="$(PackagesFolder)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETCore\3.78.4.0\FSharp.Core.xml" + folder "3.78.41.0" + file source="$(PackagesFolder)\Microsoft.Portable.FSharp.Core.10.1.0\lib\profiles\portable-net45+netcore45+wp8\FSharp.Core.dll" + file source="$(PackagesFolder)\Microsoft.Portable.FSharp.Core.10.1.0\lib\profiles\portable-net45+netcore45+wp8\FSharp.Core.optdata" + file source="$(PackagesFolder)\Microsoft.Portable.FSharp.Core.10.1.0\lib\profiles\portable-net45+netcore45+wp8\FSharp.Core.sigdata" + file source="$(PackagesFolder)\Microsoft.Portable.FSharp.Core.10.1.0\lib\profiles\portable-net45+netcore45+wp8\FSharp.Core.xml" + folder "3.259.3.1" + file source="$(PackagesFolder)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETCore\3.259.3.1\FSharp.Core.dll" + file source="$(PackagesFolder)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETCore\3.259.3.1\FSharp.Core.optdata" + file source="$(PackagesFolder)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETCore\3.259.3.1\FSharp.Core.sigdata" + file source="$(PackagesFolder)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETCore\3.259.3.1\FSharp.Core.xml" + folder "3.259.4.0" + file source="$(PackagesFolder)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETCore\3.259.4.0\FSharp.Core.dll" + file source="$(PackagesFolder)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETCore\3.259.4.0\FSharp.Core.optdata" + file source="$(PackagesFolder)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETCore\3.259.4.0\FSharp.Core.sigdata" + file source="$(PackagesFolder)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETCore\3.259.4.0\FSharp.Core.xml" + folder "3.259.41.0" + file source="$(PackagesFolder)\Microsoft.Portable.FSharp.Core.10.1.0\lib\profiles\portable-net45+netcore45+wpa81+wp8\FSharp.Core.dll" + file source="$(PackagesFolder)\Microsoft.Portable.FSharp.Core.10.1.0\lib\profiles\portable-net45+netcore45+wpa81+wp8\FSharp.Core.optdata" + file source="$(PackagesFolder)\Microsoft.Portable.FSharp.Core.10.1.0\lib\profiles\portable-net45+netcore45+wpa81+wp8\FSharp.Core.sigdata" + file source="$(PackagesFolder)\Microsoft.Portable.FSharp.Core.10.1.0\lib\profiles\portable-net45+netcore45+wpa81+wp8\FSharp.Core.xml" + + folder ".NETFramework\v4.0" + folder "4.3.0.0" + file source="$(PackagesFolder)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETFramework\v4.0\4.3.0.0\FSharp.Core.dll" + file source="$(PackagesFolder)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETFramework\v4.0\4.3.0.0\FSharp.Core.optdata" + file source="$(PackagesFolder)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETFramework\v4.0\4.3.0.0\FSharp.Core.sigdata" + file source="$(PackagesFolder)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETFramework\v4.0\4.3.0.0\FSharp.Core.xml" + folder "4.3.1.0" + file source="$(PackagesFolder)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETFramework\v4.0\4.3.1.0\FSharp.Core.dll" + file source="$(PackagesFolder)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETFramework\v4.0\4.3.1.0\FSharp.Core.optdata" + file source="$(PackagesFolder)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETFramework\v4.0\4.3.1.0\FSharp.Core.sigdata" + file source="$(PackagesFolder)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETFramework\v4.0\4.3.1.0\FSharp.Core.xml" + folder "4.4.0.0" + file source="$(PackagesFolder)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETFramework\v4.0\4.4.0.0\FSharp.Core.dll" + file source="$(PackagesFolder)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETFramework\v4.0\4.4.0.0\FSharp.Core.optdata" + file source="$(PackagesFolder)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETFramework\v4.0\4.4.0.0\FSharp.Core.sigdata" + file source="$(PackagesFolder)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETFramework\v4.0\4.4.0.0\FSharp.Core.xml" + folder "4.4.1.0" + file source="$(PackagesFolder)\Microsoft.Portable.FSharp.Core.10.1.0\lib\versions\4.4.1.0\FSharp.Core.dll" + file source="$(PackagesFolder)\Microsoft.Portable.FSharp.Core.10.1.0\lib\versions\4.4.1.0\FSharp.Core.optdata" + file source="$(PackagesFolder)\Microsoft.Portable.FSharp.Core.10.1.0\lib\versions\4.4.1.0\FSharp.Core.sigdata" + file source="$(PackagesFolder)\Microsoft.Portable.FSharp.Core.10.1.0\lib\versions\4.4.1.0\FSharp.Core.xml" + folder "4.4.3.0" + file source="$(PackagesFolder)\FSharp.Core.4.3.4\lib\net45\FSharp.Core.dll" + file source="$(PackagesFolder)\FSharp.Core.4.3.4\lib\net45\FSharp.Core.optdata" + file source="$(PackagesFolder)\FSharp.Core.4.3.4\lib\net45\FSharp.Core.sigdata" + file source="$(PackagesFolder)\FSharp.Core.4.3.4\lib\net45\FSharp.Core.xml" + + folder ".NETPortable" + folder "2.3.5.0" + file source="$(PackagesFolder)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETPortable\2.3.5.0\FSharp.Core.dll" + file source="$(PackagesFolder)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETPortable\2.3.5.0\FSharp.Core.optdata" + file source="$(PackagesFolder)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETPortable\2.3.5.0\FSharp.Core.sigdata" + file source="$(PackagesFolder)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETPortable\2.3.5.0\FSharp.Core.xml" + folder "2.3.5.1" + file source="$(PackagesFolder)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETPortable\2.3.5.1\FSharp.Core.dll" + file source="$(PackagesFolder)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETPortable\2.3.5.1\FSharp.Core.optdata" + file source="$(PackagesFolder)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETPortable\2.3.5.1\FSharp.Core.sigdata" + file source="$(PackagesFolder)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETPortable\2.3.5.1\FSharp.Core.xml" + folder "3.47.4.0" + file source="$(PackagesFolder)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETPortable\3.47.4.0\FSharp.Core.dll" + file source="$(PackagesFolder)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETPortable\3.47.4.0\FSharp.Core.optdata" + file source="$(PackagesFolder)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETPortable\3.47.4.0\FSharp.Core.sigdata" + file source="$(PackagesFolder)\Microsoft.VisualFSharp.Core.Redist.1.0.0\content\.NETPortable\3.47.4.0\FSharp.Core.xml" + folder "3.47.41.0" + file source="$(PackagesFolder)\Microsoft.Portable.FSharp.Core.10.1.0\lib\profiles\portable-net45+sl5+netcore45\FSharp.Core.dll" + file source="$(PackagesFolder)\Microsoft.Portable.FSharp.Core.10.1.0\lib\profiles\portable-net45+sl5+netcore45\FSharp.Core.optdata" + file source="$(PackagesFolder)\Microsoft.Portable.FSharp.Core.10.1.0\lib\profiles\portable-net45+sl5+netcore45\FSharp.Core.sigdata" + file source="$(PackagesFolder)\Microsoft.Portable.FSharp.Core.10.1.0\lib\profiles\portable-net45+sl5+netcore45\FSharp.Core.xml" diff --git a/setup/Swix/Microsoft.FSharp.SDK/Microsoft.FSharp.SDK.swixproj b/setup/Swix/Microsoft.FSharp.SDK/Microsoft.FSharp.SDK.swixproj new file mode 100644 index 00000000000..9256eadc32f --- /dev/null +++ b/setup/Swix/Microsoft.FSharp.SDK/Microsoft.FSharp.SDK.swixproj @@ -0,0 +1,36 @@ + + + + + ..\..\..\src + neutral + false + vsix + Microsoft.FSharp.SDK + true + Debug + $(FSharpSourcesRoot)\..\$(Configuration) + $(FSharpSourcesRoot)\..\packages + $(BinariesFolder)\insertion + $(MSBuildThisFileDirectory)obj + + + + + + $(PackagePreprocessorDefinitions);PackagesFolder=$(PackagesFolder) + $(PackagePreprocessorDefinitions);FSharpPackageVersion=$(FSharpPackageVersion) + + + + + + + + + + + + + + diff --git a/setup/Swix/Microsoft.FSharp.Vsix.Resources/Files.swr b/setup/Swix/Microsoft.FSharp.Vsix.Resources/Files.swr index 8d740b0bb73..a8c5becc80e 100644 --- a/setup/Swix/Microsoft.FSharp.Vsix.Resources/Files.swr +++ b/setup/Swix/Microsoft.FSharp.Vsix.Resources/Files.swr @@ -5,16 +5,16 @@ package name=Microsoft.FSharp.VSIX.Full.Resources vs.package.language=$(LocaleSpecificCulture) folder "InstallDir:Common7\IDE\PublicAssemblies\$(LocaleParentCulture)" - file source="$(BinariesFolder)\net40\bin\localize\$(LocaleCode)\FSharp.Core.resources.dll" vs.file.ngen=yes + file source="$(BinariesFolder)\net40\bin\$(LocaleParentCulture)\FSharp.Core.resources.dll" vs.file.ngen=yes folder "InstallDir:Common7\IDE\CommonExtensions\Microsoft\FSharp\$(LocaleParentCulture)" - file source="$(BinariesFolder)\net40\bin\localize\$(LocaleCode)\FSharp.Compiler.Private.resources.dll" vs.file.ngen=yes - file source="$(BinariesFolder)\net40\bin\localize\$(LocaleCode)\FSharp.Core.resources.dll" vs.file.ngen=yes - file source="$(BinariesFolder)\net40\bin\localize\$(LocaleCode)\FSharp.LanguageService.Base.resources.dll" vs.file.ngen=yes - file source="$(BinariesFolder)\net40\bin\localize\$(LocaleCode)\FSharp.LanguageService.resources.dll" vs.file.ngen=yes - file source="$(BinariesFolder)\net40\bin\localize\$(LocaleCode)\FSharp.ProjectSystem.Base.resources.dll" vs.file.ngen=yes - file source="$(BinariesFolder)\net40\bin\localize\$(LocaleCode)\FSharp.ProjectSystem.FSharp.resources.dll" vs.file.ngen=yes - file source="$(BinariesFolder)\net40\bin\localize\$(LocaleCode)\FSharp.ProjectSystem.PropertyPages.resources.dll" vs.file.ngen=yes - file source="$(BinariesFolder)\net40\bin\localize\$(LocaleCode)\FSharp.VS.FSI.resources.dll" vs.file.ngen=yes - file source="$(BinariesFolder)\net40\bin\localize\$(LocaleCode)\fsi.resources.dll" vs.file.ngen=yes - file source="$(BinariesFolder)\net40\bin\localize\$(LocaleCode)\fsiAnyCpu.resources.dll" vs.file.ngen=yes + file source="$(BinariesFolder)\net40\bin\$(LocaleParentCulture)\FSharp.Compiler.Private.resources.dll" vs.file.ngen=yes + file source="$(BinariesFolder)\net40\bin\$(LocaleParentCulture)\FSharp.Core.resources.dll" vs.file.ngen=yes + file source="$(BinariesFolder)\net40\bin\$(LocaleParentCulture)\FSharp.Editor.resources.dll" vs.file.ngen=yes + file source="$(BinariesFolder)\net40\bin\$(LocaleParentCulture)\FSharp.LanguageService.Base.resources.dll" vs.file.ngen=yes + file source="$(BinariesFolder)\net40\bin\$(LocaleParentCulture)\FSharp.LanguageService.resources.dll" vs.file.ngen=yes + file source="$(BinariesFolder)\net40\bin\$(LocaleParentCulture)\FSharp.ProjectSystem.Base.resources.dll" vs.file.ngen=yes + file source="$(BinariesFolder)\net40\bin\$(LocaleParentCulture)\FSharp.ProjectSystem.FSharp.resources.dll" vs.file.ngen=yes + file source="$(BinariesFolder)\net40\bin\$(LocaleParentCulture)\FSharp.ProjectSystem.PropertyPages.resources.dll" vs.file.ngen=yes + file source="$(BinariesFolder)\net40\bin\$(LocaleParentCulture)\FSharp.UIResources.resources.dll" vs.file.ngen=yes + file source="$(BinariesFolder)\net40\bin\$(LocaleParentCulture)\FSharp.VS.FSI.resources.dll" vs.file.ngen=yes diff --git a/setup/Swix/Microsoft.FSharp.Vsix.Resources/Microsoft.FSharp.Vsix.Resources.swixproj b/setup/Swix/Microsoft.FSharp.Vsix.Resources/Microsoft.FSharp.Vsix.Resources.swixproj index 8238910c241..2277444e075 100644 --- a/setup/Swix/Microsoft.FSharp.Vsix.Resources/Microsoft.FSharp.Vsix.Resources.swixproj +++ b/setup/Swix/Microsoft.FSharp.Vsix.Resources/Microsoft.FSharp.Vsix.Resources.swixproj @@ -21,6 +21,7 @@ $(PackagePreprocessorDefinitions);FSharpPackageVersion=$(FSharpPackageVersion) $(PackagePreprocessorDefinitions);LocaleCode=$(LocaleCode) $(PackagePreprocessorDefinitions);LocaleId=$(LocaleId) + $(PackagePreprocessorDefinitions);LocaleParentId=$(LocaleParentId) $(PackagePreprocessorDefinitions);LocaleParentCulture=$(LocaleParentCulture) $(PackagePreprocessorDefinitions);LocaleSpecificCulture=$(LocaleSpecificCulture) $(PackagePreprocessorDefinitions);IsLangPack=$(IsLangPack) @@ -34,17 +35,17 @@ - - - - - + + + + + diff --git a/setup/Swix/Microsoft.FSharp.Vsix.Resources/Templates.swr b/setup/Swix/Microsoft.FSharp.Vsix.Resources/Templates.swr index ee35fedc9a3..770d904e226 100644 --- a/setup/Swix/Microsoft.FSharp.Vsix.Resources/Templates.swr +++ b/setup/Swix/Microsoft.FSharp.Vsix.Resources/Templates.swr @@ -4,21 +4,10 @@ package name=Microsoft.FSharp.VSIX.Full.Resources version=$(FSharpPackageVersion) vs.package.language=$(LocaleSpecificCulture) -folder "InstallDir:Common7\IDE\CommonExtensions\Microsoft\FSharp\ProjectTemplates\FSharp\$(LocaleId)\ConsoleProject" - file source="$(BinariesFolder)\net40\bin\ProjectTemplates\ConsoleProject\App.config" - file source="$(BinariesFolder)\net40\bin\localize\$(LocaleCode)\ProjectTemplates\ConsoleProject\AssemblyInfo.fs" - file source="$(BinariesFolder)\net40\bin\ProjectTemplates\ConsoleProject\ConsoleApplication.fsproj" - file source="$(BinariesFolder)\net40\bin\ProjectTemplates\ConsoleProject\ConsoleApplication.vstemplate" - file source="$(BinariesFolder)\net40\bin\localize\$(LocaleCode)\ProjectTemplates\ConsoleProject\Program.fs" - -folder "InstallDir:Common7\IDE\CommonExtensions\Microsoft\FSharp\ProjectTemplates\FSharp\$(LocaleId)\LibraryProject" - file source="$(BinariesFolder)\net40\bin\localize\$(LocaleCode)\ProjectTemplates\LibraryProject\AssemblyInfo.fs" - file source="$(BinariesFolder)\net40\bin\ProjectTemplates\LibraryProject\Library.fsproj" - file source="$(BinariesFolder)\net40\bin\ProjectTemplates\LibraryProject\Library.vstemplate" - file source="$(BinariesFolder)\net40\bin\ProjectTemplates\LibraryProject\Library1.fs" - file source="$(BinariesFolder)\net40\bin\localize\$(LocaleCode)\ProjectTemplates\LibraryProject\Script.fsx" - -folder "InstallDir:Common7\IDE\CommonExtensions\Microsoft\FSharp\ProjectTemplates\FSharp\$(LocaleId)\TutorialProject" - file source="$(BinariesFolder)\net40\bin\ProjectTemplates\TutorialProject\Tutorial.fsproj" - file source="$(BinariesFolder)\net40\bin\localize\$(LocaleCode)\ProjectTemplates\TutorialProject\Tutorial.fsx" - file source="$(BinariesFolder)\net40\bin\ProjectTemplates\TutorialProject\Tutorial.vstemplate" +folder "InstallDir:Common7\IDE\ProjectTemplates\FSharp\$(LocaleId)" + folder "ConsoleApplication" + file source="$(BinariesFolder)\net40\bin\ProjectTemplates\FSharp\$(LocaleParentId)\ConsoleApplication.zip" + folder "Library" + file source="$(BinariesFolder)\net40\bin\ProjectTemplates\FSharp\$(LocaleParentId)\Library.zip" + folder "Tutorial" + file source="$(BinariesFolder)\net40\bin\ProjectTemplates\FSharp\$(LocaleParentId)\Tutorial.zip" diff --git a/setup/Swix/Microsoft.FSharp.vsmanproj b/setup/Swix/Microsoft.FSharp.vsmanproj index 5b787bff308..f89afddafa0 100644 --- a/setup/Swix/Microsoft.FSharp.vsmanproj +++ b/setup/Swix/Microsoft.FSharp.vsmanproj @@ -9,20 +9,36 @@ true true $(FSharpSourcesRoot)\..\$(Configuration)\insertion + $(OutputPath) + $(FSharpPackageVersion) + + + + + + + - - + + + + + + - - + + + + + \ No newline at end of file diff --git a/setup/build-insertion.proj b/setup/build-insertion.proj new file mode 100644 index 00000000000..35496258dee --- /dev/null +++ b/setup/build-insertion.proj @@ -0,0 +1,47 @@ + + + + + + + . + net40 + Debug + + + + + + + + Swix\Microsoft.FSharp.SDK\Microsoft.FSharp.SDK.swixproj + + + Swix\Microsoft.FSharp.Compiler\Microsoft.FSharp.Compiler.swixproj + + + + + + + + + + + AssemblySearchPaths={HintPathFromItem};{TargetFrameworkDirectory};{RawFileName} + + + + + + + + + + + + diff --git a/setup/fsharp-setup-build.proj b/setup/fsharp-setup-build.proj index b1c5ee70a2c..e56e3191bd1 100644 --- a/setup/fsharp-setup-build.proj +++ b/setup/fsharp-setup-build.proj @@ -13,30 +13,14 @@ - - FSharp.Wix.Extensions\FSharp.Wix.Extensions.csproj - - - - - - - - - - Swix\Microsoft.FSharp.SDK.Core\Microsoft.FSharp.SDK.Core.swixproj - ..\vsintegration\Vsix\VisualFSharpFull\VisualFSharpFull.csproj + + ..\vsintegration\Vsix\VisualFSharpTemplates\VisualFSharpTemplates.csproj + - - - - @@ -46,13 +30,9 @@ Swix\Microsoft.FSharp.Dependencies\Microsoft.FSharp.Dependencies.swixproj - - - - - - - + + Swix\Microsoft.FSharp.IDE\Microsoft.FSharp.IDE.swixproj + @@ -60,23 +40,12 @@ AssemblySearchPaths={HintPathFromItem};{TargetFrameworkDirectory};{RawFileName} - - + Properties="Configuration=$(Configuration);IsLangPack=%(VsixProjects.IsLangPack);FSharpPackageVersion=$(FSharpPackageVersion);OutputPath=$(VsixBuildLocation);DisableOutputPathCopying=true;$(CustomProps)" /> - - - - - + Properties="LocaleCode=%(SwixSetupProjects.LocaleCode);LocaleId=%(SwixSetupProjects.LocaleId);LocaleParentId=%(SwixSetupProjects.LocaleParentId);LocaleParentCulture=%(SwixSetupProjects.LocaleParentCulture);LocaleSpecificCulture=%(SwixSetupProjects.LocaleSpecificCulture);IsLangPack=%(SwixSetupProjects.IsLangPack);FSharpPackageVersion=$(FSharpPackageVersion);VSGeneralVersion=$(VSGeneralVersion);$(CustomProps)"/> diff --git a/setup/packages.config b/setup/packages.config index 036cb400855..f6caa5c2da4 100644 --- a/setup/packages.config +++ b/setup/packages.config @@ -1,17 +1,15 @@ - - - - + + - - - + + + diff --git a/setup/publish-assets.ps1 b/setup/publish-assets.ps1 index 40e0d166ce2..29604698b4c 100644 --- a/setup/publish-assets.ps1 +++ b/setup/publish-assets.ps1 @@ -27,10 +27,10 @@ try { $requestUrl = "" switch ($branchName) { - "microbuild" { + "master" { $requestUrl = "https://dotnet.myget.org/F/fsharp/vsix/upload" } - "microbuild-dev15.5" { + "dev15.9" { $requestUrl = "https://dotnet.myget.org/F/fsharp-preview/vsix/upload" } default { diff --git a/setup/resources/Microsoft.FSharp.NetSdk.Shim.props b/setup/resources/Microsoft.FSharp.NetSdk.Shim.props index d29f23cf40c..203b37e5734 100644 --- a/setup/resources/Microsoft.FSharp.NetSdk.Shim.props +++ b/setup/resources/Microsoft.FSharp.NetSdk.Shim.props @@ -1,5 +1,6 @@ - + + diff --git a/setup/resources/Microsoft.FSharp.NetSdk.Shim.targets b/setup/resources/Microsoft.FSharp.NetSdk.Shim.targets index d2099442258..f5212ec914a 100644 --- a/setup/resources/Microsoft.FSharp.NetSdk.Shim.targets +++ b/setup/resources/Microsoft.FSharp.NetSdk.Shim.targets @@ -1,5 +1,6 @@ - + + diff --git a/setup/resources/Microsoft.FSharp.Overrides.NetSdk.Shim.targets b/setup/resources/Microsoft.FSharp.Overrides.NetSdk.Shim.targets new file mode 100644 index 00000000000..c7c7b8a477b --- /dev/null +++ b/setup/resources/Microsoft.FSharp.Overrides.NetSdk.Shim.targets @@ -0,0 +1,6 @@ + + + + + + diff --git a/setup/resources/Microsoft.FSharp.Shim.targets b/setup/resources/Microsoft.FSharp.Shim.targets index e54e9c4de78..62b798f5e78 100644 --- a/setup/resources/Microsoft.FSharp.Shim.targets +++ b/setup/resources/Microsoft.FSharp.Shim.targets @@ -1,5 +1,6 @@ - - - + + + + diff --git a/setup/resources/Microsoft.Portable.FSharp.Shim.targets b/setup/resources/Microsoft.Portable.FSharp.Shim.targets index 055c0d27415..5aecfd384fa 100644 --- a/setup/resources/Microsoft.Portable.FSharp.Shim.targets +++ b/setup/resources/Microsoft.Portable.FSharp.Shim.targets @@ -1,5 +1,6 @@ - - - + + + + diff --git a/src/FSharp.Profiles.props b/src/FSharp.Profiles.props new file mode 100644 index 00000000000..915781c9534 --- /dev/null +++ b/src/FSharp.Profiles.props @@ -0,0 +1,57 @@ + + + + + + $(DefineConstants);CROSS_PLATFORM_COMPILER + $(DefineConstants);ENABLE_MONO_SUPPORT + $(DefineConstants);BE_SECURITY_TRANSPARENT + $(DefineConstants);FX_LCIDFROMCODEPAGE + + + + $(DefineConstants);NETSTANDARD1_6 + $(DefineConstants);FX_NO_APP_DOMAINS + $(DefineConstants);FX_NO_ARRAY_LONG_LENGTH + $(DefineConstants);FX_NO_BEGINEND_READWRITE + $(DefineConstants);FX_NO_BINARY_SERIALIZATION + $(DefineConstants);FX_NO_CONVERTER + $(DefineConstants);FX_NO_DEFAULT_DEPENDENCY_TYPE + $(DefineConstants);FX_NO_CORHOST_SIGNER + $(DefineConstants);FX_NO_CRYPTO + $(DefineConstants);FX_NO_EVENTWAITHANDLE_IDISPOSABLE + $(DefineConstants);FX_NO_EXIT_CONTEXT_FLAGS + $(DefineConstants);FX_NO_HEAPTERMINATION + $(DefineConstants);FX_NO_LINKEDRESOURCES + $(DefineConstants);FX_NO_LOADER_OPTIMIZATION + $(DefineConstants);FX_NO_SIMPLIFIED_LOADER + $(DefineConstants);FX_NO_PARAMETERIZED_THREAD_START + $(DefineConstants);FX_NO_PDB_READER + $(DefineConstants);FX_NO_PDB_WRITER + $(DefineConstants);FX_NO_REFLECTION_MODULE_HANDLES + $(DefineConstants);FX_NO_REFLECTION_ONLY + $(DefineConstants);FX_NO_RUNTIMEENVIRONMENT + $(DefineConstants);FX_NO_SECURITY_PERMISSIONS + $(DefineConstants);FX_NO_SERVERCODEPAGES + $(DefineConstants);FX_NO_SYMBOLSTORE + $(DefineConstants);FX_NO_SYSTEM_CONFIGURATION + $(DefineConstants);FX_NO_THREAD + $(DefineConstants);FX_NO_THREADABORT + $(DefineConstants);FX_NO_WAITONE_MILLISECONDS + $(DefineConstants);FX_NO_WEB_CLIENT + $(DefineConstants);FX_NO_WIN_REGISTRY + $(DefineConstants);FX_NO_WINFORMS + $(DefineConstants);FX_REDUCED_EXCEPTIONS + $(DefineConstants);FX_REDUCED_CONSOLE + $(DefineConstants);FX_RESHAPED_REFEMIT + $(DefineConstants);FX_RESHAPED_CONSOLE + $(DefineConstants);FX_RESHAPED_GLOBALIZATION + $(DefineConstants);FX_RESHAPED_REFLECTION + $(DefineConstants);FX_JITTRACKING_ISSUE + $(DefineConstants);FX_NO_INDENTED_TEXT_WRITER + $(DefineConstants);FX_RESHAPED_REFLECTION_CORECLR + $(DefineConstants);FSI_TODO_NETCORE + $(OtherFlags) --simpleresolution + + + diff --git a/src/FSharpSource.Profiles.targets b/src/FSharpSource.Profiles.targets index f5725f270ff..9069ebdb955 100644 --- a/src/FSharpSource.Profiles.targets +++ b/src/FSharpSource.Profiles.targets @@ -3,16 +3,17 @@ - $(DefineConstants);PREFERRED_UI_LANG + $(DefineConstants);CROSS_PLATFORM_COMPILER $(DefineConstants);ENABLE_MONO_SUPPORT $(DefineConstants);BE_SECURITY_TRANSPARENT $(DefineConstants);FX_LCIDFROMCODEPAGE + + + - $(DefineConstants);FX_PORTABLE_OR_NETSTANDARD $(DefineConstants);NETSTANDARD1_6 - $(DefineConstants);PREFERRED_UI_LANG $(DefineConstants);FX_NO_APP_DOMAINS $(DefineConstants);FX_NO_ARRAY_LONG_LENGTH $(DefineConstants);FX_NO_BEGINEND_READWRITE @@ -20,13 +21,11 @@ $(DefineConstants);FX_NO_CONVERTER $(DefineConstants);FX_NO_DEFAULT_DEPENDENCY_TYPE $(DefineConstants);FX_NO_CORHOST_SIGNER - $(DefineConstants);FX_NO_CRYPTO $(DefineConstants);FX_NO_EVENTWAITHANDLE_IDISPOSABLE $(DefineConstants);FX_NO_EXIT_CONTEXT_FLAGS $(DefineConstants);FX_NO_HEAPTERMINATION $(DefineConstants);FX_NO_LINKEDRESOURCES $(DefineConstants);FX_NO_LOADER_OPTIMIZATION - $(DefineConstants);FX_NO_SIMPLIFIED_LOADER $(DefineConstants);FX_NO_PARAMETERIZED_THREAD_START $(DefineConstants);FX_NO_PDB_READER $(DefineConstants);FX_NO_PDB_WRITER @@ -43,17 +42,13 @@ $(DefineConstants);FX_NO_WEB_CLIENT $(DefineConstants);FX_NO_WIN_REGISTRY $(DefineConstants);FX_NO_WINFORMS + $(DefineConstants);FX_NO_INDENTED_TEXT_WRITER $(DefineConstants);FX_REDUCED_EXCEPTIONS $(DefineConstants);FX_REDUCED_CONSOLE $(DefineConstants);FX_RESHAPED_REFEMIT - $(DefineConstants);FX_RESHAPED_CONSOLE $(DefineConstants);FX_RESHAPED_GLOBALIZATION $(DefineConstants);FX_RESHAPED_REFLECTION - $(DefineConstants);FX_JITTRACKING_ISSUE - $(DefineConstants);FX_NO_INDENTED_TEXT_WRITER - $(DefineConstants);FX_RESHAPED_REFLECTION_CORECLR $(DefineConstants);FX_RESHAPED_MSBUILD - $(DefineConstants);FSI_TODO_NETCORE $(OtherFlags) --simpleresolution netstandard1.6 diff --git a/src/FSharpSource.Settings.targets b/src/FSharpSource.Settings.targets index 75071b1ca49..3f0d657a9b5 100644 --- a/src/FSharpSource.Settings.targets +++ b/src/FSharpSource.Settings.targets @@ -18,6 +18,9 @@ Debug + + + true @@ -30,48 +33,58 @@ true true - false - - 2.3.0-beta2-61719-01 - 15.0 - 15.0.26201 - 1.3.1 - Microsoft.VSSDK.BuildTools.15.1.192 - 15.3.23 - 15.3.15 + + obj\$(Configuration)\$(TargetDotnetProfile)\ + obj\$(Configuration)\$(TargetDotnetProfile)\$(PortableProfileBeingReferenced)\ obj\$(Configuration)\$(TargetDotnetProfile)\ obj\$(Configuration)\$(TargetDotnetProfile)\$(PortableProfileBeingReferenced)\ - 4.1.19 - 4.1.20 - 4.1.21 - 4.2.4 + + 10.1.0 + 10.2.0 + 10.2 + 3.5.0 3.5.0.0 $(FSharpSourcesRoot)\..\packages\NUnit.$(NUnitVersion)\lib\net45 - $(FSharpSourcesRoot)\..\packages\NUnit.ConsoleRunner\$(NUnitVersion)\tools\ + + true + + $(MSBuildThisFileDirectory)..\Tools\dependencyUptake\PackageVersions.props + + + true + true + 0.2.0-beta-000081 + + + + + false + true true $(FSharpSourcesRoot)\fsharp\msft.pubkey true true - + + true false true - $(MSBuildThisFileDirectory)..\packages\$(VSSDK_BUILDTOOLS_VERSION)\tools\vssdk - $(MSBuildThisFileDirectory)..\packages\$(VSSDK_BUILDTOOLS_VERSION)\tools\vssdk\bin - $(MSBuildThisFileDirectory)..\packages\$(VSSDK_BUILDTOOLS_VERSION)\tools\vssdk\Microsoft.VsSDK.targets - $(MSBuildThisFileDirectory)..\packages\$(VSSDK_BUILDTOOLS_VERSION)\tools\vssdk\inc - $(MSBuildThisFileDirectory)..\packages\$(VSSDK_BUILDTOOLS_VERSION)\tools\vssdk\schemas\VSIXManifestSchema.xsd + $(MSBuildThisFileDirectory)..\packages\Microsoft.VSSDK.BuildTools.$(MicrosoftVSSDKBuildToolsPackageVersion)\tools\vssdk + $(MSBuildThisFileDirectory)..\packages\Microsoft.VSSDK.BuildTools.$(MicrosoftVSSDKBuildToolsPackageVersion)\tools\vssdk\bin + $(MSBuildThisFileDirectory)..\packages\Microsoft.VSSDK.BuildTools.$(MicrosoftVSSDKBuildToolsPackageVersion)\tools\vssdk\Microsoft.VsSDK.targets + $(MSBuildThisFileDirectory)..\packages\Microsoft.VSSDK.BuildTools.$(MicrosoftVSSDKBuildToolsPackageVersion)\tools\vssdk\inc + $(MSBuildThisFileDirectory)..\packages\Microsoft.VSSDK.BuildTools.$(MicrosoftVSSDKBuildToolsPackageVersion)\tools\vssdk\schemas\VSIXManifestSchema.xsd @@ -83,6 +96,7 @@ full + portable false prompt @@ -95,6 +109,7 @@ pdbonly + portable true false @@ -106,6 +121,7 @@ full + portable true DEBUG;NO_STRONG_NAMES;$(DefineConstants) @@ -116,18 +132,6 @@ 3 - - $(DefineConstants),VS_VERSION_DEV12=True - $(DefineConstants);VS_VERSION_DEV12 - $(DefineConstants),VS_VERSION_DEV14=True - $(DefineConstants);VS_VERSION_DEV14 - $(DefineConstants),VS_VERSION_DEV15=True - $(DefineConstants);VS_VERSION_DEV15 - - $(DefineConstants),VS_VERSION_DEV14=True - $(DefineConstants);VS_VERSION_DEV14 - - $([System.DateTime]::Now.ToString(`yyMMdd`)) @@ -149,8 +153,21 @@ $(FSharpSourcesRoot)\..\packages\FSharp.Compiler.Tools.4.1.27\tools + + + + 14.0.0.0 + + + + + + + + en;$(XlfLanguages) + diff --git a/src/FSharpSource.targets b/src/FSharpSource.targets index 844848dc4c7..1d513b81e87 100644 --- a/src/FSharpSource.targets +++ b/src/FSharpSource.targets @@ -3,97 +3,60 @@ - 4.4.1.0 + $(MSBuildThisFileDirectory)..\ - - - - false - true - - - - - - - - - true - false - $(FSCoreVersion) - fs - - - - - - - true - true - $(FSCoreVersion) - - 15.4.1.0 - fs - - - - - - - - true - $(FSharpSourcesRoot)\fsharp\msft.pubkey - true - true - $(FSCoreVersion) - fs - - - - - - - - NO_STRONG_NAMES;$(DefineConstants) - $(FSCoreVersion) - fs - - - + + fs + - - $(OtherFlags) --version:"$(MicroBuildAssemblyVersion)" + + + + true + false + false + NO_STRONG_NAMES;$(DefineConstants) - - $(IntermediateOutputPath)source_link.json + + + $(FSharpSourcesRoot)\fsharp\test.snk + false + STRONG_NAME_FSHARP_COMPILER_WITH_TEST_KEY;$(DefineConstants) - - NO_STRONG_NAMES;$(DefineConstants) + + + $(FSCoreVersion) + $(OtherFlags) --version:"$(MicroBuildAssemblyVersion)" + + + + $(IntermediateOutputPath)source_link.json + MSBUILD_AT_LEAST_14;$(DefineConstants) + - false $(FSharpSourcesRoot)\..\packages - 2.6.2 - 2.6.2.0 + 3.0.0-alpha3 + 3.0.0.0 $(FSharpSourcesRoot)\..\packages\FsCheck.$(FsCheckVersion)\lib\ - v4.5 + v4.6 @@ -130,15 +93,19 @@ fsharp30\$(TargetDotnetProfile) fsharp31\$(TargetDotnetProfile) fsharp40\$(TargetDotnetProfile) - obj\$(TargetFrameworkOutputDirectory)\ + $(TargetDotnetProfile) + obj\$(Configuration)\$(TargetFrameworkOutputDirectory)\ $(FSharpSourcesRoot)\..\$(Configuration)\$(ProtoFlavour)\bin + + $([System.IO.File]::ReadAllText('$(MSBuildThisFileDirectory)..\DotnetCLIToolsVersion.txt').Trim()) + $(MSBuildThisFileDirectory)..\Tools\dotnet20\sdk\$(DotnetSdkVersion)\FSharp + - $(FSharpSourcesRoot)\..\Tools\dotnet20\sdk\2.0.3-servicing-007056\FSharp ..\packages\FSharp.Compiler.Tools.4.1.27\tools\Microsoft.FSharp.Targets @@ -160,8 +127,8 @@ $(FSharpSourcesRoot)\..\$(Configuration)\$(TargetFrameworkOutputDirectory)\bin $(FSharpSourcesRoot)\..\Proto\$(ProtoFlavour)\bin - fsc-proto.exe - ..\Proto\$(ProtoFlavour)\bin\Microsoft.Portable.FSharp-proto.targets + fsc.exe + ..\Proto\$(ProtoFlavour)\bin\Microsoft.Portable.FSharp.targets @@ -169,8 +136,8 @@ $(FSharpSourcesRoot)\..\$(Configuration)\$(TargetFrameworkOutputDirectory)\bin $(FSharpSourcesRoot)\..\Proto\$(ProtoFlavour)\bin - fsc-proto.exe - ..\Proto\$(ProtoFlavour)\bin\Microsoft.FSharp-proto.targets + fsc.exe + ..\Proto\$(ProtoFlavour)\bin\Microsoft.FSharp.Targets @@ -206,8 +173,8 @@ $(FSharpSourcesRoot)\..\.nuget\ -ConfigFile "$(NuGetConfigFile)" - "$(NuGetToolPath)NuGet.exe install -OutputDirectory "$(PackagesDir)" -Config "$(NuGetToolPath)NuGet.Config" - "$(NuGetToolPath)NuGet.exe" restore -OutputDirectory "$(PackagesDir)" -Config "$(NuGetToolPath)NuGet.Config" + "$(NuGetToolPath)NuGet.exe install -OutputDirectory "$(PackagesDir)" -Config "$(NuGetToolPath)..\NuGet.Config" + "$(NuGetToolPath)NuGet.exe" restore -OutputDirectory "$(PackagesDir)" -Config "$(NuGetToolPath)..\NuGet.Config" @@ -248,12 +215,12 @@ - + - + @@ -284,15 +251,7 @@ - - - - - - - - - + @@ -340,17 +299,17 @@ @@ -380,42 +339,8 @@ - - $(IntermediateOutputPath)$(MSBuildProjectName).InternalsVisibleTo$(DefaultLanguageSourceExtension) - - - - - false - - - - - - <_PublicKey>002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293 - - - <_InternalsVisibleToAttribute Include="System.Runtime.CompilerServices.InternalsVisibleToAttribute"> - <_Parameter1 Condition="'%(InternalsVisibleTo.Key)' != ''">%(InternalsVisibleTo.Identity), PublicKey=%(InternalsVisibleTo.Key) - <_Parameter1 Condition="'%(InternalsVisibleTo.Key)' == ''">%(InternalsVisibleTo.Identity), PublicKey=$(_PublicKey) - - - - - - - - - - + + diff --git a/src/Microbuild.Settings.targets b/src/Microbuild.Settings.targets index 2c3ff270c3c..6e11e3f2206 100644 --- a/src/Microbuild.Settings.targets +++ b/src/Microbuild.Settings.targets @@ -4,250 +4,10 @@ 0.2.0 - - - - - - - - - - - - - - - - - - - - - Copied: " + destinationFile, MessageImportance.High); - } - - if (isDefaultLocale) - { - Log.LogMessage("Skipping localized files (default locale)", MessageImportance.High); - } - else - { - Log.LogMessage("Copying localized files", MessageImportance.High); - - foreach (var localizedFileItem in LocalizedFiles) - { - var fileName = new FileInfo(localizedFileItem).Name; - var sourceFile = Path.Combine(absoluteOutDir, "localize", lang, TemplateCategory, AssemblyName, fileName); - var destinationFile = Path.Combine(tempZipFolder, fileName); - - if (File.Exists(sourceFile) == false) - { - throw new FileNotFoundException("Localized file not found: " + sourceFile, sourceFile); - } - - File.Delete(destinationFile); - File.Copy(sourceFile, destinationFile); - Log.LogMessage(" > Copied: " + destinationFile, MessageImportance.High); - } - } - - var templateOutputPath = isDefaultLocale - ? Path.Combine(absoluteOutDir, TemplateCategory, AssemblyName) - : Path.Combine(absoluteOutDir, "localize", lang, TemplateCategory, AssemblyName); - - if (Directory.Exists(templateOutputPath) == false) - { - Directory.CreateDirectory(templateOutputPath); - } - - var templateOutputFile = Path.Combine(templateOutputPath, AssemblyName + ".zip"); - - if (File.Exists(templateOutputFile)) - { - File.Delete(templateOutputFile); - } - - Log.LogMessage("Zipping template to: " + templateOutputFile, MessageImportance.High); - ZipFile.CreateFromDirectory(tempZipFolder, templateOutputFile); - Directory.Delete(tempZipFolder, true); - - Log.LogMessage("---------------------------------------------------", MessageImportance.High); - Log.LogMessage(string.Empty, MessageImportance.High); - } - ]]> - - - - - - - - - - - - - - - - - - - ]"); - stringBuilder.AppendLine("[]"); - stringBuilder.AppendLine("[]"); - stringBuilder.AppendLine("do ()"); - break; - case "vb": - stringBuilder.AppendLine(""); - stringBuilder.AppendLine(""); - stringBuilder.AppendLine(""); - break; - default: - throw new ArgumentException("Language " + Language + " is not supported"); - } - - var fileContents = stringBuilder.ToString(); - AssemblyFileVersionPath = Path.Combine(Path.GetTempPath(), string.Join(".", AssemblyName, ProductVersion, "AssemblyFileVersion", Language)); - - if (File.Exists(AssemblyFileVersionPath) && File.ReadAllText(AssemblyFileVersionPath) == fileContents) - { - Log.LogMessage("Assembly file version already exists. Using: " + AssemblyFileVersionPath, MessageImportance.High); - } - else - { - Log.LogMessage("Generating AssemblyFileVersion file: " + AssemblyFileVersionPath, MessageImportance.High); - File.WriteAllText(AssemblyFileVersionPath, fileContents); - } - ]]> - - - - - - - - - - - - - ENU - - - - - - - - - $([System.DateTime]::Now.ToString(yyyyMMdd.0)) - - - - - - - - - - - - - - - - - - - - - $(BUILD_BUILDNUMBER.Split('.')[0].Substring(2)) - $(BUILD_BUILDNUMBER.Split('.')[1].PadLeft(2, '0')) - $(BuildTimeStamp_Day)$(BuildTimeStamp_Number) - $(MicroBuildAssemblyVersion.Substring(0, $(MicroBuildAssemblyVersion.LastIndexOf('.')))) - $(MicroBuildAssemblyVersion_WithoutRevision).$(BuildTimeStamp) - - + diff --git a/src/absil/il.fs b/src/absil/il.fs index 6f5f0d873b3..b1bf2fdf920 100644 --- a/src/absil/il.fs +++ b/src/absil/il.fs @@ -7,15 +7,21 @@ module Microsoft.FSharp.Compiler.AbstractIL.IL #nowarn "346" // The struct, record or union type 'IlxExtensionType' has an explicit implementation of 'Object.Equals'. ... -open Internal.Utilities -open Microsoft.FSharp.Compiler.AbstractIL -open Microsoft.FSharp.Compiler.AbstractIL.Diagnostics -open Microsoft.FSharp.Compiler.AbstractIL.Internal -open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library +open System +open System.Diagnostics +open System.IO open System.Collections open System.Collections.Generic open System.Collections.Concurrent open System.Runtime.CompilerServices +open System.Reflection + +open Microsoft.FSharp.Compiler.AbstractIL +open Microsoft.FSharp.Compiler.AbstractIL.Diagnostics +open Microsoft.FSharp.Compiler.AbstractIL.Internal +open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library + +open Internal.Utilities let logging = false @@ -41,7 +47,7 @@ let _ = if logging then dprintn "* warning: Il.logging is on" let int_order = LanguagePrimitives.FastGenericComparer -let notlazy v = Lazy.CreateFromValue v +let notlazy v = Lazy<_>.CreateFromValue v /// A little ugly, but the idea is that if a data structure does not /// contain lazy values then we don't add laziness. So if the thing to map @@ -70,25 +76,25 @@ type PrimaryAssembly = // -------------------------------------------------------------------- let splitNameAt (nm:string) idx = - if idx < 0 then failwith "splitNameAt: idx < 0"; + if idx < 0 then failwith "splitNameAt: idx < 0" let last = nm.Length - 1 - if idx > last then failwith "splitNameAt: idx > last"; - (nm.Substring(0,idx)), - (if idx < last then nm.Substring (idx+1,last - idx) else "") + if idx > last then failwith "splitNameAt: idx > last" + (nm.Substring(0, idx)), + (if idx < last then nm.Substring (idx+1, last - idx) else "") let rec splitNamespaceAux (nm:string) = match nm.IndexOf '.' with | -1 -> [nm] | idx -> - let s1,s2 = splitNameAt nm idx + let s1, s2 = splitNameAt nm idx s1::splitNamespaceAux s2 /// Global State. All namespace splits ever seen // ++GLOBAL MUTABLE STATE (concurrency-safe) -let memoizeNamespaceTable = new ConcurrentDictionary() +let memoizeNamespaceTable = new ConcurrentDictionary() // ++GLOBAL MUTABLE STATE (concurrency-safe) -let memoizeNamespaceRightTable = new ConcurrentDictionary() +let memoizeNamespaceRightTable = new ConcurrentDictionary() let splitNamespace nm = @@ -98,7 +104,7 @@ let splitNamespaceMemoized nm = splitNamespace nm // ++GLOBAL MUTABLE STATE (concurrency-safe) let memoizeNamespaceArrayTable = - Concurrent.ConcurrentDictionary() + Concurrent.ConcurrentDictionary() let splitNamespaceToArray nm = memoizeNamespaceArrayTable.GetOrAdd(nm, fun nm -> @@ -107,53 +113,52 @@ let splitNamespaceToArray nm = let splitILTypeName (nm:string) = match nm.LastIndexOf '.' with - | -1 -> [],nm + | -1 -> [], nm | idx -> - let s1,s2 = splitNameAt nm idx - splitNamespace s1,s2 + let s1, s2 = splitNameAt nm idx + splitNamespace s1, s2 let emptyStringArray = ([| |] : string[]) // Duplicate of comment in import.fs: // The type names that flow to the point include the "mangled" type names used for static parameters for provided types. -// For example, +// For example, // Foo.Bar,"1.0" // This is because the ImportSystemType code goes via Abstract IL type references. Ultimately this probably isn't // the best way to do things. let splitILTypeNameWithPossibleStaticArguments (nm:string) = - let nm,suffix = + let nm, suffix = match nm.IndexOf ',' with | -1 -> nm, None | idx -> let s1, s2 = splitNameAt nm idx in s1, Some s2 - let nsp,nm = + let nsp, nm = match nm.LastIndexOf '.' with - | -1 -> emptyStringArray,nm + | -1 -> emptyStringArray, nm | idx -> - let s1,s2 = splitNameAt nm idx - splitNamespaceToArray s1,s2 + let s1, s2 = splitNameAt nm idx + splitNamespaceToArray s1, s2 nsp, (match suffix with None -> nm | Some s -> nm + "," + s) (* splitILTypeNameWithPossibleStaticArguments "Foo" = ([| |], "Foo") splitILTypeNameWithPossibleStaticArguments "Foo.Bar" = ([| "Foo" |], "Bar") -splitILTypeNameWithPossibleStaticArguments "Foo.Bar,3" = ([| "Foo" |], "Bar,3") +splitILTypeNameWithPossibleStaticArguments "Foo.Bar,3" = ([| "Foo" |], "Bar, 3") splitILTypeNameWithPossibleStaticArguments "Foo.Bar," = ([| "Foo" |], "Bar,") splitILTypeNameWithPossibleStaticArguments "Foo.Bar,\"1.0\"" = ([| "Foo" |], "Bar,\"1.0\"") splitILTypeNameWithPossibleStaticArguments "Foo.Bar.Bar,\"1.0\"" = ([| "Foo"; "Bar" |], "Bar,\"1.0\"") *) -let unsplitTypeName (ns,n) = +let unsplitTypeName (ns, n) = match ns with | [] -> String.concat "." ns + "." + n | _ -> n -let splitTypeNameRightAux nm = - if String.contains nm '.' then - let idx = String.rindex nm '.' - let s1,s2 = splitNameAt nm idx - Some s1,s2 - else None, nm +let splitTypeNameRightAux (nm:string) = + let idx = nm.LastIndexOf '.' + if idx = -1 then None, nm else + let s1, s2 = splitNameAt nm idx + Some s1, s2 let splitTypeNameRight nm = memoizeNamespaceRightTable.GetOrAdd(nm, splitTypeNameRightAux) @@ -163,21 +168,31 @@ let splitTypeNameRight nm = // -------------------------------------------------------------------- /// This is used to store event, property and field maps. -type LazyOrderedMultiMap<'Key,'Data when 'Key : equality>(keyf : 'Data -> 'Key, lazyItems : Lazy<'Data list>) = +type LazyOrderedMultiMap<'Key, 'Data when 'Key : equality>(keyf : 'Data -> 'Key, lazyItems : Lazy<'Data list>) = let quickMap= lazyItems |> lazyMap (fun entries -> - let t = new Dictionary<_,_>(entries.Length, HashIdentity.Structural) - do entries |> List.iter (fun y -> let key = keyf y in t.[key] <- y :: (if t.ContainsKey(key) then t.[key] else [])) + let t = new Dictionary<_, _>(entries.Length, HashIdentity.Structural) + do entries |> List.iter (fun y -> + let key = keyf y + let v = + match t.TryGetValue(key) with + | true, v -> v + | _ -> [] + t.[key] <- y :: v) t) member self.Entries() = lazyItems.Force() - member self.Add(y) = new LazyOrderedMultiMap<'Key,'Data>(keyf, lazyItems |> lazyMap (fun x -> y :: x)) + member self.Add(y) = new LazyOrderedMultiMap<'Key, 'Data>(keyf, lazyItems |> lazyMap (fun x -> y :: x)) - member self.Filter(f) = new LazyOrderedMultiMap<'Key,'Data>(keyf, lazyItems |> lazyMap (List.filter f)) + member self.Filter(f) = new LazyOrderedMultiMap<'Key, 'Data>(keyf, lazyItems |> lazyMap (List.filter f)) - member self.Item with get(x) = let t = quickMap.Force() in if t.ContainsKey x then t.[x] else [] + member self.Item + with get(x) = + match quickMap.Force().TryGetValue(x) with + | true, v -> v + | _ -> [] //--------------------------------------------------------------------- @@ -193,8 +208,10 @@ let b3 n = ((n >>> 24) &&& 0xFF) module SHA1 = + let inline (>>>&) (x:int) (y:int) = int32 (uint32 x >>> y) - let f(t,b,c,d) = + + let f(t, b, c, d) = if t < 20 then (b &&& c) ||| ((~~~b) &&& d) elif t < 40 then b ^^^ c ^^^ d elif t < 60 then (b &&& c) ||| (b &&& d) ||| (c &&& d) @@ -213,9 +230,9 @@ module SHA1 = type SHAStream = - { stream: byte[]; - mutable pos: int; - mutable eof: bool; } + { stream: byte[] + mutable pos: int + mutable eof: bool } let rotLeft32 x n = (x <<< n) ||| (x >>>& (32-n)) @@ -275,7 +292,7 @@ module SHA1 = d <- h3 e <- h4 for t = 0 to 79 do - let temp = (rotLeft32 a 5) + f(t,b,c,d) + e + w.[t] + k(t) + let temp = (rotLeft32 a 5) + f(t, b, c, d) + e + w.[t] + k(t) e <- d d <- c c <- rotLeft32 b 30 @@ -286,10 +303,10 @@ module SHA1 = h2 <- h2 + c h3 <- h3 + d h4 <- h4 + e - h0,h1,h2,h3,h4 + h0, h1, h2, h3, h4 let sha1HashBytes s = - let (_h0,_h1,_h2,h3,h4) = sha1Hash { stream = s; pos = 0; eof = false } // the result of the SHA algorithm is stored in registers 3 and 4 + let (_h0, _h1, _h2, h3, h4) = sha1Hash { stream = s; pos = 0; eof = false } // the result of the SHA algorithm is stored in registers 3 and 4 Array.map byte [| b0 h4; b1 h4; b2 h4; b3 h4; b0 h3; b1 h3; b2 h3; b3 h3; |] @@ -305,87 +322,79 @@ type Locale = string [] type PublicKey = + | PublicKey of byte[] + | PublicKeyToken of byte[] + member x.IsKey=match x with PublicKey _ -> true | _ -> false + member x.IsKeyToken=match x with PublicKeyToken _ -> true | _ -> false + member x.Key=match x with PublicKey b -> b | _ -> invalidOp "not a key" + member x.KeyToken=match x with PublicKeyToken b -> b | _ -> invalidOp"not a key token" member x.ToToken() = match x with | PublicKey bytes -> SHA1.sha1HashBytes bytes | PublicKeyToken token -> token + static member KeyAsToken(k) = PublicKeyToken(PublicKey(k).ToToken()) [] type AssemblyRefData = - { assemRefName: string; - assemRefHash: byte[] option; - assemRefPublicKeyInfo: PublicKey option; - assemRefRetargetable: bool; - assemRefVersion: ILVersionInfo option; - assemRefLocale: Locale option; } + { assemRefName: string + assemRefHash: byte[] option + assemRefPublicKeyInfo: PublicKey option + assemRefRetargetable: bool + assemRefVersion: ILVersionInfo option + assemRefLocale: Locale option } /// Global state: table of all assembly references keyed by AssemblyRefData. let AssemblyRefUniqueStampGenerator = new UniqueStampGenerator() -let compareVersions x y = - match x,y with - | None, None -> 0 - | Some _, None -> 1 - | None, Some _ -> -1 - | Some(x1,x2,x3,x4), Some(y1,y2,y3,y4) -> - if y1>x1 then 1 - elif y1x2 then 1 - elif y2x3 then 1 - elif y3x4 then 1 - elif y4] -type ILAssemblyRef(data) = +type ILAssemblyRef(data) = let uniqueStamp = AssemblyRefUniqueStampGenerator.Encode(data) + member x.Name=data.assemRefName + member x.Hash=data.assemRefHash + member x.PublicKey=data.assemRefPublicKeyInfo + member x.Retargetable=data.assemRefRetargetable - member x.Version=GetReferenceUnifiedVersion data + + member x.Version=data.assemRefVersion + member x.Locale=data.assemRefLocale + member x.UniqueStamp=uniqueStamp + override x.GetHashCode() = uniqueStamp + override x.Equals(yobj) = ((yobj :?> ILAssemblyRef).UniqueStamp = uniqueStamp) + interface System.IComparable with override x.CompareTo(yobj) = compare (yobj :?> ILAssemblyRef).UniqueStamp uniqueStamp - static member Create(name,hash,publicKey,retargetable,version,locale) = + + static member Create(name, hash, publicKey, retargetable, version, locale) = ILAssemblyRef - { assemRefName=name; - assemRefHash=hash; - assemRefPublicKeyInfo=publicKey; - assemRefRetargetable=retargetable; - assemRefVersion=version; - assemRefLocale=locale; } - + { assemRefName=name + assemRefHash=hash + assemRefPublicKeyInfo=publicKey + assemRefRetargetable=retargetable + assemRefVersion=version + assemRefLocale=locale } + static member FromAssemblyName (aname:System.Reflection.AssemblyName) = + let locale = None - //match aname.CultureInfo with - // | null -> None - // | x -> Some x.Name + let publicKey = match aname.GetPublicKey() with | null | [| |] -> @@ -398,29 +407,27 @@ type ILAssemblyRef(data) = let version = match aname.Version with | null -> None - | v -> Some (uint16 v.Major,uint16 v.Minor,uint16 v.Build,uint16 v.Revision) + | v -> Some (uint16 v.Major, uint16 v.Minor, uint16 v.Build, uint16 v.Revision) let retargetable = aname.Flags = System.Reflection.AssemblyNameFlags.Retargetable - ILAssemblyRef.Create(aname.Name,None,publicKey,retargetable,version,locale) + ILAssemblyRef.Create(aname.Name, None, publicKey, retargetable, version, locale) - - member aref.QualifiedName = let b = new System.Text.StringBuilder(100) let add (s:string) = (b.Append(s) |> ignore) let addC (s:char) = (b.Append(s) |> ignore) - add(aref.Name); + add(aref.Name) match aref.Version with | None -> () - | Some (a,b,c,d) -> - add ", Version="; + | Some (a, b, c, d) -> + add ", Version=" add (string (int a)) - add "."; + add "." add (string (int b)) - add "."; + add "." add (string (int c)) - add "."; + add "." add (string (int d)) add ", Culture=" match aref.Locale with @@ -449,16 +456,19 @@ type ILAssemblyRef(data) = [] type ILModuleRef = - { name: string; - hasMetadata: bool; - hash: byte[] option; } - static member Create(name,hasMetadata,hash) = - { name=name; - hasMetadata= hasMetadata; + { name: string + hasMetadata: bool + hash: byte[] option } + + static member Create(name, hasMetadata, hash) = + { name=name + hasMetadata= hasMetadata hash=hash } member x.Name=x.name + member x.HasMetadata=x.hasMetadata + member x.Hash=x.hash [] @@ -467,38 +477,43 @@ type ILScopeRef = | Local | Module of ILModuleRef | Assembly of ILAssemblyRef + member x.IsLocalRef = match x with ILScopeRef.Local -> true | _ -> false + member x.IsModuleRef = match x with ILScopeRef.Module _ -> true | _ -> false + member x.IsAssemblyRef= match x with ILScopeRef.Assembly _ -> true | _ -> false + member x.ModuleRef = match x with ILScopeRef.Module x -> x | _ -> failwith "not a module reference" - member x.AssemblyRef = match x with ILScopeRef.Assembly x -> x | _ -> failwith "not an assembly reference" - member scoref.QualifiedName = - match scoref with - | ILScopeRef.Local -> "" - | ILScopeRef.Module mref -> "module "^mref.Name - | ILScopeRef.Assembly aref when aref.Name = "mscorlib" -> "" - | ILScopeRef.Assembly aref -> aref.QualifiedName + member x.AssemblyRef = match x with ILScopeRef.Assembly x -> x | _ -> failwith "not an assembly reference" - member scoref.QualifiedNameWithNoShortPrimaryAssembly = - match scoref with + member x.QualifiedName = + match x with | ILScopeRef.Local -> "" | ILScopeRef.Module mref -> "module "+mref.Name | ILScopeRef.Assembly aref -> aref.QualifiedName type ILArrayBound = int32 option + type ILArrayBounds = ILArrayBound * ILArrayBound [] type ILArrayShape = + | ILArrayShape of ILArrayBounds list (* lobound/size pairs *) + member x.Rank = (let (ILArrayShape l) = x in l.Length) + static member SingleDimensional = ILArrayShapeStatics.SingleDimensional - static member FromRank n = if n = 1 then ILArrayShape.SingleDimensional else ILArrayShape(List.replicate n (Some 0,None)) + + static member FromRank n = if n = 1 then ILArrayShape.SingleDimensional else ILArrayShape(List.replicate n (Some 0, None)) and ILArrayShapeStatics() = + static let singleDimensional = ILArrayShape [(Some 0, None)] + static member SingleDimensional = singleDimensional /// Calling conventions. These are used in method pointer types. @@ -519,48 +534,61 @@ type ILThisConvention = [] type ILCallingConv = + | Callconv of ILThisConvention * ILArgConvention - member x.ThisConv = let (Callconv(a,_b)) = x in a - member x.BasicConv = let (Callconv(_a,b)) = x in b + + member x.ThisConv = let (Callconv(a, _b)) = x in a + + member x.BasicConv = let (Callconv(_a, b)) = x in b + member x.IsInstance = match x.ThisConv with ILThisConvention.Instance -> true | _ -> false + member x.IsInstanceExplicit = match x.ThisConv with ILThisConvention.InstanceExplicit -> true | _ -> false + member x.IsStatic = match x.ThisConv with ILThisConvention.Static -> true | _ -> false static member Instance = ILCallingConvStatics.Instance + static member Static = ILCallingConvStatics.Static /// Static storage to amortize the allocation of ILCallingConv.Instance and ILCallingConv.Static. and ILCallingConvStatics() = - static let instanceCallConv = Callconv(ILThisConvention.Instance,ILArgConvention.Default) - static let staticCallConv = Callconv(ILThisConvention.Static,ILArgConvention.Default) + + static let instanceCallConv = Callconv(ILThisConvention.Instance, ILArgConvention.Default) + + static let staticCallConv = Callconv(ILThisConvention.Static, ILArgConvention.Default) + static member Instance = instanceCallConv + static member Static = staticCallConv type ILBoxity = - | AsObject - | AsValue - + | AsObject + | AsValue // IL type references have a pre-computed hash code to enable quick lookup tables during binary generation. -[] +[] type ILTypeRef = - { trefScope: ILScopeRef; - trefEnclosing: string list; - trefName: string; + { trefScope: ILScopeRef + trefEnclosing: string list + trefName: string hashCode : int mutable asBoxedType: ILType } - static member Create(scope,enclosing,name) = + static member Create(scope, enclosing, name) = let hashCode = hash scope * 17 ^^^ (hash enclosing * 101 <<< 1) ^^^ (hash name * 47 <<< 2) - { trefScope=scope; - trefEnclosing= enclosing; - trefName=name; - hashCode=hashCode; + { trefScope=scope + trefEnclosing=enclosing + trefName=name + hashCode=hashCode asBoxedType = Unchecked.defaultof<_> } member x.Scope = x.trefScope + member x.Enclosing = x.trefEnclosing + member x.Name = x.trefName + member x.ApproxId = x.hashCode member x.AsBoxedType (tspec:ILTypeSpec) = @@ -576,13 +604,16 @@ type ILTypeRef = ILType.Boxed tspec override x.GetHashCode() = x.hashCode + override x.Equals(yobj) = let y = (yobj :?> ILTypeRef) (x.ApproxId = y.ApproxId) && (x.Scope = y.Scope) && (x.Name = y.Name) && (x.Enclosing = y.Enclosing) + interface System.IComparable with + override x.CompareTo(yobj) = let y = (yobj :?> ILTypeRef) let c = compare x.ApproxId y.ApproxId @@ -598,48 +629,58 @@ type ILTypeRef = member tref.BasicQualifiedName = (String.concat "+" (tref.Enclosing @ [ tref.Name ] )).Replace(",", @"\,") - member tref.AddQualifiedNameExtensionWithNoShortPrimaryAssembly(basic) = - let sco = tref.Scope.QualifiedNameWithNoShortPrimaryAssembly + member tref.AddQualifiedNameExtension(basic) = + let sco = tref.Scope.QualifiedName if sco = "" then basic else String.concat ", " [basic;sco] - member tref.QualifiedNameWithNoShortPrimaryAssembly = - tref.AddQualifiedNameExtensionWithNoShortPrimaryAssembly(tref.BasicQualifiedName) - member tref.QualifiedName = - let basic = tref.BasicQualifiedName - let sco = tref.Scope.QualifiedName - if sco = "" then basic else String.concat ", " [basic;sco] + tref.AddQualifiedNameExtension(tref.BasicQualifiedName) + /// For debugging + [] + member x.DebugText = x.ToString() + /// For debugging override x.ToString() = x.FullName -and - [] +and [] ILTypeSpec = - { tspecTypeRef: ILTypeRef; + { tspecTypeRef: ILTypeRef /// The type instantiation if the type is generic. tspecInst: ILGenericArgs } + member x.TypeRef=x.tspecTypeRef + member x.Scope=x.TypeRef.Scope + member x.Enclosing=x.TypeRef.Enclosing + member x.Name=x.TypeRef.Name + member x.GenericArgs=x.tspecInst - static member Create(tref,inst) = { tspecTypeRef =tref; tspecInst=inst } - override x.ToString() = x.TypeRef.ToString() + if isNil x.GenericArgs then "" else "<...>" + + static member Create(tref, inst) = { tspecTypeRef =tref; tspecInst=inst } + member x.BasicQualifiedName = let tc = x.TypeRef.BasicQualifiedName if isNil x.GenericArgs then tc else - tc + "[" + String.concat "," (x.GenericArgs |> List.map (fun arg -> "[" + arg.QualifiedNameWithNoShortPrimaryAssembly + "]")) + "]" + tc + "[" + String.concat "," (x.GenericArgs |> List.map (fun arg -> "[" + arg.QualifiedName + "]")) + "]" - member x.AddQualifiedNameExtensionWithNoShortPrimaryAssembly(basic) = - x.TypeRef.AddQualifiedNameExtensionWithNoShortPrimaryAssembly(basic) + member x.AddQualifiedNameExtension(basic) = + x.TypeRef.AddQualifiedNameExtension(basic) member x.FullName=x.TypeRef.FullName -and [] + /// For debugging + [] + member x.DebugText = x.ToString() + + override x.ToString() = x.TypeRef.ToString() + if isNil x.GenericArgs then "" else "<...>" + +and [] ILType = | Void | Array of ILArrayShape * ILType @@ -654,124 +695,173 @@ and [] member x.BasicQualifiedName = match x with | ILType.TypeVar n -> "!" + string n - | ILType.Modified(_,_ty1,ty2) -> ty2.BasicQualifiedName - | ILType.Array (ILArrayShape(s),ty) -> ty.BasicQualifiedName + "[" + System.String(',',s.Length-1) + "]" + | ILType.Modified(_, _ty1, ty2) -> ty2.BasicQualifiedName + | ILType.Array (ILArrayShape(s), ty) -> ty.BasicQualifiedName + "[" + System.String(',', s.Length-1) + "]" | ILType.Value tr | ILType.Boxed tr -> tr.BasicQualifiedName | ILType.Void -> "void" | ILType.Ptr _ty -> failwith "unexpected pointer type" | ILType.Byref _ty -> failwith "unexpected byref type" | ILType.FunctionPointer _mref -> failwith "unexpected function pointer type" - member x.AddQualifiedNameExtensionWithNoShortPrimaryAssembly(basic) = + member x.AddQualifiedNameExtension(basic) = match x with | ILType.TypeVar _n -> basic - | ILType.Modified(_,_ty1,ty2) -> ty2.AddQualifiedNameExtensionWithNoShortPrimaryAssembly(basic) - | ILType.Array (ILArrayShape(_s),ty) -> ty.AddQualifiedNameExtensionWithNoShortPrimaryAssembly(basic) - | ILType.Value tr | ILType.Boxed tr -> tr.AddQualifiedNameExtensionWithNoShortPrimaryAssembly(basic) + | ILType.Modified(_, _ty1, ty2) -> ty2.AddQualifiedNameExtension(basic) + | ILType.Array (ILArrayShape(_s), ty) -> ty.AddQualifiedNameExtension(basic) + | ILType.Value tr | ILType.Boxed tr -> tr.AddQualifiedNameExtension(basic) | ILType.Void -> failwith "void" | ILType.Ptr _ty -> failwith "unexpected pointer type" | ILType.Byref _ty -> failwith "unexpected byref type" | ILType.FunctionPointer _mref -> failwith "unexpected function pointer type" - member x.QualifiedNameWithNoShortPrimaryAssembly = - x.AddQualifiedNameExtensionWithNoShortPrimaryAssembly(x.BasicQualifiedName) + member x.QualifiedName = + x.AddQualifiedNameExtension(x.BasicQualifiedName) member x.TypeSpec = - match x with - | ILType.Boxed tr | ILType.Value tr -> tr - | _ -> invalidOp "not a nominal type" + match x with + | ILType.Boxed tr | ILType.Value tr -> tr + | _ -> invalidOp "not a nominal type" member x.Boxity = - match x with - | ILType.Boxed _ -> AsObject - | ILType.Value _ -> AsValue - | _ -> invalidOp "not a nominal type" + match x with + | ILType.Boxed _ -> AsObject + | ILType.Value _ -> AsValue + | _ -> invalidOp "not a nominal type" member x.TypeRef = - match x with - | ILType.Boxed tspec | ILType.Value tspec -> tspec.TypeRef - | _ -> invalidOp "not a nominal type" + match x with + | ILType.Boxed tspec | ILType.Value tspec -> tspec.TypeRef + | _ -> invalidOp "not a nominal type" member x.IsNominal = - match x with - | ILType.Boxed _ | ILType.Value _ -> true - | _ -> false + match x with + | ILType.Boxed _ | ILType.Value _ -> true + | _ -> false member x.GenericArgs = - match x with - | ILType.Boxed tspec | ILType.Value tspec -> tspec.GenericArgs - | _ -> [] + match x with + | ILType.Boxed tspec | ILType.Value tspec -> tspec.GenericArgs + | _ -> [] member x.IsTyvar = - match x with - | ILType.TypeVar _ -> true | _ -> false + match x with + | ILType.TypeVar _ -> true | _ -> false + + /// For debugging + [] + member x.DebugText = x.ToString() + + override x.ToString() = x.QualifiedName and [] ILCallingSignature = - { CallingConv: ILCallingConv; - ArgTypes: ILTypes; + { CallingConv: ILCallingConv + ArgTypes: ILTypes ReturnType: ILType } and ILGenericArgs = list + and ILTypes = list +let mkILCallSig (cc, args, ret) = { ArgTypes=args; CallingConv=cc; ReturnType=ret} -let mkILCallSig (cc,args,ret) = { ArgTypes=args; CallingConv=cc; ReturnType=ret} let mkILBoxedType (tspec:ILTypeSpec) = tspec.TypeRef.AsBoxedType tspec +[] type ILMethodRef = - { mrefParent: ILTypeRef; - mrefCallconv: ILCallingConv; - mrefGenericArity: int; - mrefName: string; - mrefArgs: ILTypes; + { mrefParent: ILTypeRef + mrefCallconv: ILCallingConv + mrefGenericArity: int + mrefName: string + mrefArgs: ILTypes mrefReturn: ILType } - member x.EnclosingTypeRef = x.mrefParent + + member x.DeclaringTypeRef = x.mrefParent + member x.CallingConv = x.mrefCallconv + member x.Name = x.mrefName + member x.GenericArity = x.mrefGenericArity + member x.ArgCount = List.length x.mrefArgs + member x.ArgTypes = x.mrefArgs + member x.ReturnType = x.mrefReturn - member x.CallingSignature = mkILCallSig (x.CallingConv,x.ArgTypes,x.ReturnType) - static member Create(a,b,c,d,e,f) = + member x.CallingSignature = mkILCallSig (x.CallingConv, x.ArgTypes, x.ReturnType) + + static member Create(a, b, c, d, e, f) = { mrefParent= a;mrefCallconv=b;mrefName=c;mrefGenericArity=d; mrefArgs=e;mrefReturn=f } - override x.ToString() = x.EnclosingTypeRef.ToString() + "::" + x.Name + "(...)" + /// For debugging + [] + member x.DebugText = x.ToString() -[] + override x.ToString() = x.DeclaringTypeRef.ToString() + "::" + x.Name + "(...)" + + +[] type ILFieldRef = - { EnclosingTypeRef: ILTypeRef; - Name: string; + { DeclaringTypeRef: ILTypeRef + Name: string Type: ILType } - override x.ToString() = x.EnclosingTypeRef.ToString() + "::" + x.Name -[] + /// For debugging + [] + member x.DebugText = x.ToString() + + override x.ToString() = x.DeclaringTypeRef.ToString() + "::" + x.Name + +[] type ILMethodSpec = - { mspecMethodRef: ILMethodRef; - mspecEnclosingType: ILType; - mspecMethodInst: ILGenericArgs; } - static member Create(a,b,c) = { mspecEnclosingType=a; mspecMethodRef =b; mspecMethodInst=c } + { mspecMethodRef: ILMethodRef + + mspecDeclaringType: ILType + + mspecMethodInst: ILGenericArgs } + + static member Create(a, b, c) = { mspecDeclaringType=a; mspecMethodRef=b; mspecMethodInst=c } + member x.MethodRef = x.mspecMethodRef - member x.EnclosingType=x.mspecEnclosingType + + member x.DeclaringType=x.mspecDeclaringType + member x.GenericArgs=x.mspecMethodInst + member x.Name=x.MethodRef.Name + member x.CallingConv=x.MethodRef.CallingConv + member x.GenericArity = x.MethodRef.GenericArity + member x.FormalArgTypes = x.MethodRef.ArgTypes + member x.FormalReturnType = x.MethodRef.ReturnType - override x.ToString() = x.MethodRef.ToString() + "(...)" + /// For debugging + [] + member x.DebugText = x.ToString() + + override x.ToString() = x.MethodRef.ToString() + "(...)" +[] type ILFieldSpec = - { FieldRef: ILFieldRef; - EnclosingType: ILType } + { FieldRef: ILFieldRef + DeclaringType: ILType } + member x.FormalType = x.FieldRef.Type + member x.Name = x.FieldRef.Name - member x.EnclosingTypeRef = x.FieldRef.EnclosingTypeRef - override x.ToString() = x.FieldRef.ToString() + member x.DeclaringTypeRef = x.FieldRef.DeclaringTypeRef + + /// For debugging + [] + member x.DebugText = x.ToString() + + override x.ToString() = x.FieldRef.ToString() // -------------------------------------------------------------------- // Debug info. @@ -785,42 +875,55 @@ type ILPlatform = | IA64 type ILSourceDocument = - { sourceLanguage: ILGuid option; - sourceVendor: ILGuid option; - sourceDocType: ILGuid option; - sourceFile: string; } - static member Create(language,vendor,docType,file) = - { sourceLanguage=language; - sourceVendor=vendor; - sourceDocType=docType; - sourceFile=file; } + { sourceLanguage: ILGuid option + sourceVendor: ILGuid option + sourceDocType: ILGuid option + sourceFile: string } + + static member Create(language, vendor, docType, file) = + { sourceLanguage=language + sourceVendor=vendor + sourceDocType=docType + sourceFile=file } + member x.Language=x.sourceLanguage + member x.Vendor=x.sourceVendor + member x.DocumentType=x.sourceDocType + member x.File=x.sourceFile +[] type ILSourceMarker = - { sourceDocument: ILSourceDocument; - sourceLine: int; - sourceColumn: int; - sourceEndLine: int; + { sourceDocument: ILSourceDocument + sourceLine: int + sourceColumn: int + sourceEndLine: int sourceEndColumn: int } + static member Create(document, line, column, endLine, endColumn) = - { sourceDocument=document; - sourceLine=line; - sourceColumn=column; - sourceEndLine=endLine; + { sourceDocument=document + sourceLine=line + sourceColumn=column + sourceEndLine=endLine sourceEndColumn=endColumn } + member x.Document=x.sourceDocument + member x.Line=x.sourceLine + member x.Column=x.sourceColumn + member x.EndLine=x.sourceEndLine + member x.EndColumn=x.sourceEndColumn - override x.ToString() = sprintf "(%d,%d)-(%d,%d)" x.Line x.Column x.EndLine x.EndColumn -// -------------------------------------------------------------------- -// Custom attributes -// -------------------------------------------------------------------- + /// For debugging + [] + member x.DebugText = x.ToString() + + override x.ToString() = sprintf "(%d, %d)-(%d, %d)" x.Line x.Column x.EndLine x.EndColumn type ILAttribElem = | String of string option @@ -842,17 +945,52 @@ type ILAttribElem = | Array of ILType * ILAttribElem list type ILAttributeNamedArg = (string * ILType * bool * ILAttribElem) + +[] type ILAttribute = - { Method: ILMethodSpec; + { Method: ILMethodSpec Data: byte[] - Elements: ILAttribElem list} + Elements: ILAttribElem list } + + /// For debugging + [] + member x.DebugText = x.ToString() + + override x.ToString() = x.Method.ToString() + "(...)" + +[] +type ILAttributes(array : ILAttribute[]) = + + member x.AsArray = array -[] -type ILAttributes(f: unit -> ILAttribute[]) = - let mutable array = InlineDelayInit<_>(f) - member x.AsArray = array.Value member x.AsList = x.AsArray |> Array.toList +[] +type ILAttributesStored = + + /// Computed by ilread.fs based on metadata index + | Reader of (int32 -> ILAttribute[]) + + /// Already computed + | Given of ILAttributes + + member x.GetCustomAttrs metadataIndex = + match x with + | Reader f -> ILAttributes(f metadataIndex) + | Given attrs -> attrs + +let emptyILCustomAttrs = ILAttributes [| |] + +let mkILCustomAttrsFromArray (attrs: ILAttribute[]) = if attrs.Length = 0 then emptyILCustomAttrs else ILAttributes attrs + +let mkILCustomAttrs l = match l with [] -> emptyILCustomAttrs | _ -> mkILCustomAttrsFromArray (List.toArray l) + +let emptyILCustomAttrsStored = ILAttributesStored.Given emptyILCustomAttrs + +let storeILCustomAttrs (attrs: ILAttributes) = if attrs.AsArray.Length = 0 then emptyILCustomAttrsStored else ILAttributesStored.Given attrs + +let mkILCustomAttrsReader f = ILAttributesStored.Reader f + type ILCodeLabel = int // -------------------------------------------------------------------- @@ -926,115 +1064,114 @@ type ILComparisonInstr = [] type ILInstr = - | AI_add - | AI_add_ovf - | AI_add_ovf_un - | AI_and - | AI_div - | AI_div_un - | AI_ceq - | AI_cgt - | AI_cgt_un - | AI_clt - | AI_clt_un - | AI_conv of ILBasicType - | AI_conv_ovf of ILBasicType - | AI_conv_ovf_un of ILBasicType - | AI_mul - | AI_mul_ovf - | AI_mul_ovf_un - | AI_rem - | AI_rem_un - | AI_shl - | AI_shr - | AI_shr_un - | AI_sub - | AI_sub_ovf - | AI_sub_ovf_un - | AI_xor - | AI_or - | AI_neg - | AI_not - | AI_ldnull - | AI_dup - | AI_pop - | AI_ckfinite - | AI_nop - | AI_ldc of ILBasicType * ILConst - | I_ldarg of uint16 - | I_ldarga of uint16 - | I_ldind of ILAlignment * ILVolatility * ILBasicType - | I_ldloc of uint16 - | I_ldloca of uint16 - | I_starg of uint16 - | I_stind of ILAlignment * ILVolatility * ILBasicType - | I_stloc of uint16 - - | I_br of ILCodeLabel - | I_jmp of ILMethodSpec - | I_brcmp of ILComparisonInstr * ILCodeLabel - | I_switch of ILCodeLabel list - | I_ret - - | I_call of ILTailcall * ILMethodSpec * ILVarArgs - | I_callvirt of ILTailcall * ILMethodSpec * ILVarArgs - | I_callconstraint of ILTailcall * ILType * ILMethodSpec * ILVarArgs - | I_calli of ILTailcall * ILCallingSignature * ILVarArgs - | I_ldftn of ILMethodSpec - | I_newobj of ILMethodSpec * ILVarArgs + | AI_add + | AI_add_ovf + | AI_add_ovf_un + | AI_and + | AI_div + | AI_div_un + | AI_ceq + | AI_cgt + | AI_cgt_un + | AI_clt + | AI_clt_un + | AI_conv of ILBasicType + | AI_conv_ovf of ILBasicType + | AI_conv_ovf_un of ILBasicType + | AI_mul + | AI_mul_ovf + | AI_mul_ovf_un + | AI_rem + | AI_rem_un + | AI_shl + | AI_shr + | AI_shr_un + | AI_sub + | AI_sub_ovf + | AI_sub_ovf_un + | AI_xor + | AI_or + | AI_neg + | AI_not + | AI_ldnull + | AI_dup + | AI_pop + | AI_ckfinite + | AI_nop + | AI_ldc of ILBasicType * ILConst + | I_ldarg of uint16 + | I_ldarga of uint16 + | I_ldind of ILAlignment * ILVolatility * ILBasicType + | I_ldloc of uint16 + | I_ldloca of uint16 + | I_starg of uint16 + | I_stind of ILAlignment * ILVolatility * ILBasicType + | I_stloc of uint16 + + | I_br of ILCodeLabel + | I_jmp of ILMethodSpec + | I_brcmp of ILComparisonInstr * ILCodeLabel + | I_switch of ILCodeLabel list + | I_ret + + | I_call of ILTailcall * ILMethodSpec * ILVarArgs + | I_callvirt of ILTailcall * ILMethodSpec * ILVarArgs + | I_callconstraint of ILTailcall * ILType * ILMethodSpec * ILVarArgs + | I_calli of ILTailcall * ILCallingSignature * ILVarArgs + | I_ldftn of ILMethodSpec + | I_newobj of ILMethodSpec * ILVarArgs - | I_throw - | I_endfinally - | I_endfilter - | I_leave of ILCodeLabel - | I_rethrow - - | I_ldsfld of ILVolatility * ILFieldSpec - | I_ldfld of ILAlignment * ILVolatility * ILFieldSpec - | I_ldsflda of ILFieldSpec - | I_ldflda of ILFieldSpec - | I_stsfld of ILVolatility * ILFieldSpec - | I_stfld of ILAlignment * ILVolatility * ILFieldSpec - | I_ldstr of string - | I_isinst of ILType - | I_castclass of ILType - | I_ldtoken of ILToken - | I_ldvirtftn of ILMethodSpec - - | I_cpobj of ILType - | I_initobj of ILType - | I_ldobj of ILAlignment * ILVolatility * ILType - | I_stobj of ILAlignment * ILVolatility * ILType - | I_box of ILType - | I_unbox of ILType - | I_unbox_any of ILType - | I_sizeof of ILType - - | I_ldelem of ILBasicType - | I_stelem of ILBasicType - | I_ldelema of ILReadonly * bool * ILArrayShape * ILType - | I_ldelem_any of ILArrayShape * ILType - | I_stelem_any of ILArrayShape * ILType - | I_newarr of ILArrayShape * ILType - | I_ldlen - - | I_mkrefany of ILType - | I_refanytype - | I_refanyval of ILType - - | I_break - | I_seqpoint of ILSourceMarker - - | I_arglist - - | I_localloc - | I_cpblk of ILAlignment * ILVolatility - | I_initblk of ILAlignment * ILVolatility - - (* FOR EXTENSIONS, e.g. MS-ILX *) - | EI_ilzero of ILType - | EI_ldlen_multi of int32 * int32 - + | I_throw + | I_endfinally + | I_endfilter + | I_leave of ILCodeLabel + | I_rethrow + + | I_ldsfld of ILVolatility * ILFieldSpec + | I_ldfld of ILAlignment * ILVolatility * ILFieldSpec + | I_ldsflda of ILFieldSpec + | I_ldflda of ILFieldSpec + | I_stsfld of ILVolatility * ILFieldSpec + | I_stfld of ILAlignment * ILVolatility * ILFieldSpec + | I_ldstr of string + | I_isinst of ILType + | I_castclass of ILType + | I_ldtoken of ILToken + | I_ldvirtftn of ILMethodSpec + + | I_cpobj of ILType + | I_initobj of ILType + | I_ldobj of ILAlignment * ILVolatility * ILType + | I_stobj of ILAlignment * ILVolatility * ILType + | I_box of ILType + | I_unbox of ILType + | I_unbox_any of ILType + | I_sizeof of ILType + + | I_ldelem of ILBasicType + | I_stelem of ILBasicType + | I_ldelema of ILReadonly * bool * ILArrayShape * ILType + | I_ldelem_any of ILArrayShape * ILType + | I_stelem_any of ILArrayShape * ILType + | I_newarr of ILArrayShape * ILType + | I_ldlen + + | I_mkrefany of ILType + | I_refanytype + | I_refanyval of ILType + + | I_break + | I_seqpoint of ILSourceMarker + + | I_arglist + + | I_localloc + | I_cpblk of ILAlignment * ILVolatility + | I_initblk of ILAlignment * ILVolatility + + (* FOR EXTENSIONS, e.g. MS-ILX *) + | EI_ilzero of ILType + | EI_ldlen_multi of int32 * int32 [] @@ -1046,7 +1183,7 @@ type ILExceptionClause = [] type ILExceptionSpec = - { Range: (ILCodeLabel * ILCodeLabel); + { Range: (ILCodeLabel * ILCodeLabel) Clause: ILExceptionClause } /// Indicates that a particular local variable has a particular source @@ -1054,37 +1191,37 @@ type ILExceptionSpec = /// variable numbering, which is global over the whole method. [] type ILLocalDebugMapping = - { LocalIndex: int; - LocalName: string; } + { LocalIndex: int + LocalName: string } [] type ILLocalDebugInfo = - { Range: (ILCodeLabel * ILCodeLabel); + { Range: (ILCodeLabel * ILCodeLabel) DebugMappings: ILLocalDebugMapping list } [] type ILCode = - { Labels: Dictionary + { Labels: Dictionary Instrs:ILInstr[] Exceptions: ILExceptionSpec list Locals: ILLocalDebugInfo list } [] type ILLocal = - { Type: ILType; - IsPinned: bool; + { Type: ILType + IsPinned: bool DebugInfo: (string * int * int) option } type ILLocals = list [] type ILMethodBody = - { IsZeroInit: bool; - MaxStack: int32; - NoInlining: bool; - AggressiveInlining: bool; - Locals: ILLocals; - Code: ILCode; + { IsZeroInit: bool + MaxStack: int32 + NoInlining: bool + AggressiveInlining: bool + Locals: ILLocals + Code: ILCode SourceMarker: ILSourceMarker option } [] @@ -1123,13 +1260,14 @@ type ILFieldInit = [] type ILNativeType = | Empty - | Custom of ILGuid * string * string * byte[] (* guid,nativeTypeName,custMarshallerName,cookieString *) + | Custom of ILGuid * string * string * byte[] (* guid, nativeTypeName, custMarshallerName, cookieString *) | FixedSysString of int32 | FixedArray of int32 | Currency | LPSTR | LPWSTR | LPTSTR + | LPUTF8STR | ByValStr | TBSTR | LPSTRUCT @@ -1160,7 +1298,6 @@ type ILNativeType = | ANSIBSTR | VariantBool - and [] ILNativeVariant = @@ -1209,9 +1346,8 @@ and | Int | UInt -type - [] - ILSecurityAction = +[] +type ILSecurityAction = | Request | Demand | Assert @@ -1232,14 +1368,37 @@ type | DemandChoice [] -type ILPermission = - | PermissionSet of ILSecurityAction * byte[] +type ILSecurityDecl = + | ILSecurityDecl of ILSecurityAction * byte[] -[] -type ILPermissions = - | SecurityDecls of ILPermission list - | SecurityDeclsLazy of Lazy - member x.AsList = match x with SecurityDecls m -> m | SecurityDeclsLazy m -> m.Force() +[] +type ILSecurityDecls(array : ILSecurityDecl[]) = + member x.AsArray = array + member x.AsList = x.AsArray |> Array.toList + +[] +type ILSecurityDeclsStored = + + /// Computed by ilread.fs based on metadata index + | Reader of (int32 -> ILSecurityDecl[]) + + /// Already computed + | Given of ILSecurityDecls + + member x.GetSecurityDecls metadataIndex = + match x with + | Reader f -> ILSecurityDecls(f metadataIndex) + | Given attrs -> attrs + +let emptyILSecurityDecls = ILSecurityDecls [| |] + +let emptyILSecurityDeclsStored = ILSecurityDeclsStored.Given emptyILSecurityDecls + +let mkILSecurityDecls l = match l with [] -> emptyILSecurityDecls | _ -> ILSecurityDecls (Array.ofList l) + +let storeILSecurityDecls (x: ILSecurityDecls) = if x.AsArray.Length = 0 then emptyILSecurityDeclsStored else ILSecurityDeclsStored.Given x + +let mkILSecurityDeclsReader f = ILSecurityDeclsStored.Reader f [] type PInvokeCharBestFit = @@ -1271,38 +1430,48 @@ type PInvokeCharEncoding = [] type PInvokeMethod = - { Where: ILModuleRef; - Name: string; - CallingConv: PInvokeCallingConvention; - CharEncoding: PInvokeCharEncoding; - NoMangle: bool; - LastError: bool; - ThrowOnUnmappableChar: PInvokeThrowOnUnmappableChar; + { Where: ILModuleRef + Name: string + CallingConv: PInvokeCallingConvention + CharEncoding: PInvokeCharEncoding + NoMangle: bool + LastError: bool + ThrowOnUnmappableChar: PInvokeThrowOnUnmappableChar CharBestFit: PInvokeCharBestFit } [] type ILParameter = - { Name: string option; - Type: ILType; - Default: ILFieldInit option; - Marshal: ILNativeType option; - IsIn: bool; - IsOut: bool; - IsOptional: bool; - CustomAttrs: ILAttributes } + { Name: string option + Type: ILType + Default: ILFieldInit option + Marshal: ILNativeType option + IsIn: bool + IsOut: bool + IsOptional: bool + CustomAttrsStored: ILAttributesStored + MetadataIndex: int32 } + + member x.CustomAttrs = x.CustomAttrsStored.GetCustomAttrs x.MetadataIndex type ILParameters = list [] type ILReturn = - { Marshal: ILNativeType option; - Type: ILType; - CustomAttrs: ILAttributes } + { Marshal: ILNativeType option + Type: ILType + CustomAttrsStored: ILAttributesStored + MetadataIndex: int32 } + + member x.CustomAttrs = x.CustomAttrsStored.GetCustomAttrs x.MetadataIndex + + member x.WithCustomAttrs(customAttrs) = { x with CustomAttrsStored = storeILCustomAttrs customAttrs } type ILOverridesSpec = | OverridesSpec of ILMethodRef * ILType - member x.MethodRef = let (OverridesSpec(mr,_ty)) = x in mr - member x.EnclosingType = let (OverridesSpec(_mr,ty)) = x in ty + + member x.MethodRef = let (OverridesSpec(mr, _ty)) = x in mr + + member x.DeclaringType = let (OverridesSpec(_mr, ty)) = x in ty type ILMethodVirtualInfo = { IsFinal: bool @@ -1323,9 +1492,11 @@ type MethodBody = | PInvoke of PInvokeMethod (* platform invoke to native *) | Abstract | Native + | NotAvailable type ILLazyMethodBody = | ILLazyMethodBody of Lazy + member x.Contents = let (ILLazyMethodBody mb) = x in mb.Force() [] @@ -1334,7 +1505,8 @@ type MethodCodeKind = | Native | Runtime -let mkMethBodyAux mb = ILLazyMethodBody (Lazy.CreateFromValue mb) +let mkMethBodyAux mb = ILLazyMethodBody (notlazy mb) + let mkMethBodyLazyAux mb = ILLazyMethodBody mb let typesOfILParams (ps:ILParameters) : ILTypes = ps |> List.map (fun p -> p.Type) @@ -1345,74 +1517,166 @@ type ILGenericVariance = | CoVariant | ContraVariant +[] type ILGenericParameterDef = - { Name: string; - Constraints: ILTypes; - Variance: ILGenericVariance; - HasReferenceTypeConstraint: bool; - CustomAttrs : ILAttributes; - HasNotNullableValueTypeConstraint: bool; - HasDefaultConstructorConstraint: bool; } + { Name: string + Constraints: ILTypes + Variance: ILGenericVariance + HasReferenceTypeConstraint: bool + HasNotNullableValueTypeConstraint: bool + HasDefaultConstructorConstraint: bool + CustomAttrsStored : ILAttributesStored + MetadataIndex: int32 } + + member x.CustomAttrs = x.CustomAttrsStored.GetCustomAttrs x.MetadataIndex + + /// For debugging + [] + member x.DebugText = x.ToString() override x.ToString() = x.Name type ILGenericParameterDefs = ILGenericParameterDef list +let memberAccessOfFlags flags = + let f = (flags &&& 0x00000007) + if f = 0x00000001 then ILMemberAccess.Private + elif f = 0x00000006 then ILMemberAccess.Public + elif f = 0x00000004 then ILMemberAccess.Family + elif f = 0x00000002 then ILMemberAccess.FamilyAndAssembly + elif f = 0x00000005 then ILMemberAccess.FamilyOrAssembly + elif f = 0x00000003 then ILMemberAccess.Assembly + else ILMemberAccess.CompilerControlled + +let convertMemberAccess (ilMemberAccess:ILMemberAccess) = + match ilMemberAccess with + | ILMemberAccess.Public -> MethodAttributes.Public + | ILMemberAccess.Private -> MethodAttributes.Private + | ILMemberAccess.Assembly -> MethodAttributes.Assembly + | ILMemberAccess.FamilyAndAssembly -> MethodAttributes.FamANDAssem + | ILMemberAccess.CompilerControlled -> MethodAttributes.PrivateScope + | ILMemberAccess.FamilyOrAssembly -> MethodAttributes.FamORAssem + | ILMemberAccess.Family -> MethodAttributes.Family + +let inline conditionalAdd condition flagToAdd source = if condition then source ||| flagToAdd else source &&& ~~~flagToAdd + +let NoMetadataIdx = -1 + [] -type ILMethodDef = - { Name: string; - mdKind: MethodKind; - CallingConv: ILCallingConv; - Parameters: ILParameters; - Return: ILReturn; - Access: ILMemberAccess; - mdBody: ILLazyMethodBody; - mdCodeKind: MethodCodeKind; - IsInternalCall: bool; - IsManaged: bool; - IsForwardRef: bool; - SecurityDecls: ILPermissions; - HasSecurity: bool; - IsEntryPoint:bool; - IsReqSecObj: bool; - IsHideBySig: bool; - IsSpecialName: bool; - IsUnmanagedExport: bool; - IsSynchronized: bool; - IsPreserveSig: bool; - IsMustRun: bool; - IsNoInline: bool; - IsAggressiveInline : bool - GenericParams: ILGenericParameterDefs; - CustomAttrs: ILAttributes; } +type ILMethodDef (name: string, attributes: MethodAttributes, implAttributes: MethodImplAttributes, callingConv: ILCallingConv, + parameters: ILParameters, ret: ILReturn, body: ILLazyMethodBody, isEntryPoint:bool, genericParams: ILGenericParameterDefs, + securityDeclsStored: ILSecurityDeclsStored, customAttrsStored: ILAttributesStored, metadataIndex: int32) = + + new (name, attributes, implAttributes, callingConv, parameters, ret, body, isEntryPoint, genericParams, securityDecls, customAttrs) = + ILMethodDef(name, attributes, implAttributes, callingConv, parameters, ret, body, isEntryPoint, genericParams, + storeILSecurityDecls securityDecls, storeILCustomAttrs customAttrs, NoMetadataIdx) + + // The captured data - remember the object will be as large as the data captured by these members + member __.Name = name + + member __.Attributes = attributes + + member __.ImplAttributes = implAttributes + + member __.CallingConv = callingConv + + member __.Parameters = parameters + + member __.Return = ret + + member __.Body = body + + member __.SecurityDeclsStored = securityDeclsStored + + member __.IsEntryPoint = isEntryPoint + + member __.GenericParams = genericParams + + member __.CustomAttrsStored = customAttrsStored + + member __.MetadataIndex = metadataIndex + + member x.With (?name: string, ?attributes: MethodAttributes, ?implAttributes: MethodImplAttributes, ?callingConv: ILCallingConv, ?parameters: ILParameters, ?ret: ILReturn, ?body: ILLazyMethodBody, ?securityDecls: ILSecurityDecls, ?isEntryPoint:bool, ?genericParams: ILGenericParameterDefs, ?customAttrs: ILAttributes) = + ILMethodDef (name = defaultArg name x.Name, + attributes = defaultArg attributes x.Attributes, + implAttributes = defaultArg implAttributes x.ImplAttributes, + callingConv = defaultArg callingConv x.CallingConv, + parameters = defaultArg parameters x.Parameters, + ret = defaultArg ret x.Return, + body = defaultArg body x.Body, + securityDecls = (match securityDecls with None -> x.SecurityDecls | Some attrs -> attrs), + isEntryPoint = defaultArg isEntryPoint x.IsEntryPoint, + genericParams = defaultArg genericParams x.GenericParams, + customAttrs=(match customAttrs with None -> x.CustomAttrs | Some attrs -> attrs)) + + member x.CustomAttrs = x.CustomAttrsStored.GetCustomAttrs metadataIndex + + member x.SecurityDecls = x.SecurityDeclsStored.GetSecurityDecls x.MetadataIndex + member x.ParameterTypes = typesOfILParams x.Parameters - // Whidbey feature: SafeHandle finalizer must be run + member md.Code = - match md.mdBody.Contents with + match md.Body.Contents with | MethodBody.IL il-> Some il.Code | _ -> None - member x.IsIL = match x.mdBody.Contents with | MethodBody.IL _ -> true | _ -> false - member x.Locals = match x.mdBody.Contents with | MethodBody.IL il -> il.Locals | _ -> [] - member x.MethodBody = match x.mdBody.Contents with MethodBody.IL il -> il | _ -> failwith "not IL" + member x.IsIL = match x.Body.Contents with | MethodBody.IL _ -> true | _ -> false - member x.SourceMarker = x.MethodBody.SourceMarker - member x.MaxStack = x.MethodBody.MaxStack - member x.IsZeroInit = x.MethodBody.IsZeroInit + member x.Locals = match x.Body.Contents with | MethodBody.IL il -> il.Locals | _ -> [] - member x.IsClassInitializer = match x.mdKind with | MethodKind.Cctor -> true | _ -> false - member x.IsConstructor = match x.mdKind with | MethodKind.Ctor -> true | _ -> false - member x.IsStatic = match x.mdKind with | MethodKind.Static -> true | _ -> false - member x.IsNonVirtualInstance = match x.mdKind with | MethodKind.NonVirtual -> true | _ -> false - member x.IsVirtual = match x.mdKind with | MethodKind.Virtual _ -> true | _ -> false + member x.MethodBody = match x.Body.Contents with MethodBody.IL il -> il | _ -> failwith "not IL" - member x.IsFinal = match x.mdKind with | MethodKind.Virtual v -> v.IsFinal | _ -> invalidOp "not virtual" - member x.IsNewSlot = match x.mdKind with | MethodKind.Virtual v -> v.IsNewSlot | _ -> invalidOp "not virtual" - member x.IsCheckAccessOnOverride= match x.mdKind with | MethodKind.Virtual v -> v.IsCheckAccessOnOverride | _ -> invalidOp "not virtual" - member x.IsAbstract = match x.mdKind with | MethodKind.Virtual v -> v.IsAbstract | _ -> invalidOp "not virtual" + member x.SourceMarker = x.MethodBody.SourceMarker - member md.CallingSignature = mkILCallSig (md.CallingConv,md.ParameterTypes,md.Return.Type) + member x.MaxStack = x.MethodBody.MaxStack + member x.IsZeroInit = x.MethodBody.IsZeroInit + + member md.CallingSignature = mkILCallSig (md.CallingConv, md.ParameterTypes, md.Return.Type) + + member x.IsClassInitializer = x.Name = ".cctor" + member x.IsConstructor = x.Name = ".ctor" + + member x.Access = memberAccessOfFlags (int x.Attributes) + member x.IsStatic = x.Attributes &&& MethodAttributes.Static <> enum 0 + member x.IsNonVirtualInstance = not x.IsStatic && not x.IsVirtual + member x.IsVirtual = x.Attributes &&& MethodAttributes.Virtual <> enum 0 + member x.IsFinal = x.Attributes &&& MethodAttributes.Final <> enum 0 + member x.IsNewSlot = x.Attributes &&& MethodAttributes.NewSlot <> enum 0 + member x.IsCheckAccessOnOverride= x.Attributes &&& MethodAttributes.CheckAccessOnOverride <> enum 0 + member x.IsAbstract = x.Attributes &&& MethodAttributes.Abstract <> enum 0 + member x.IsHideBySig = x.Attributes &&& MethodAttributes.HideBySig <> enum 0 + member x.IsSpecialName = x.Attributes &&& MethodAttributes.SpecialName <> enum 0 + member x.IsUnmanagedExport = x.Attributes &&& MethodAttributes.UnmanagedExport <> enum 0 + member x.IsReqSecObj = x.Attributes &&& MethodAttributes.RequireSecObject <> enum 0 + member x.HasSecurity = x.Attributes &&& MethodAttributes.HasSecurity <> enum 0 + + member x.IsManaged = x.ImplAttributes &&& MethodImplAttributes.Managed <> enum 0 + member x.IsForwardRef = x.ImplAttributes &&& MethodImplAttributes.ForwardRef <> enum 0 + member x.IsInternalCall = x.ImplAttributes &&& MethodImplAttributes.InternalCall <> enum 0 + member x.IsPreserveSig = x.ImplAttributes &&& MethodImplAttributes.PreserveSig <> enum 0 + member x.IsSynchronized = x.ImplAttributes &&& MethodImplAttributes.Synchronized <> enum 0 + member x.IsNoInline = x.ImplAttributes &&& MethodImplAttributes.NoInlining <> enum 0 + member x.IsAggressiveInline= x.ImplAttributes &&& MethodImplAttributes.AggressiveInlining <> enum 0 + member x.IsMustRun = x.ImplAttributes &&& MethodImplAttributes.NoOptimization <> enum 0 + + member x.WithSpecialName = x.With(attributes = (x.Attributes ||| MethodAttributes.SpecialName)) + member x.WithHideBySig() = + x.With(attributes = ( + if x.IsVirtual then x.Attributes &&& ~~~MethodAttributes.CheckAccessOnOverride ||| MethodAttributes.HideBySig + else failwith "WithHideBySig")) + member x.WithHideBySig(condition) = x.With(attributes = (x.Attributes |> conditionalAdd condition MethodAttributes.HideBySig)) + member x.WithFinal(condition) = x.With(attributes = (x.Attributes |> conditionalAdd condition MethodAttributes.Final)) + member x.WithAbstract(condition) = x.With(attributes = (x.Attributes |> conditionalAdd condition MethodAttributes.Abstract)) + member x.WithAccess(access) = x.With(attributes = (x.Attributes &&& ~~~MethodAttributes.MemberAccessMask ||| convertMemberAccess access)) + member x.WithNewSlot = x.With(attributes = (x.Attributes ||| MethodAttributes.NewSlot)) + member x.WithSecurity(condition) = x.With(attributes = (x.Attributes |> conditionalAdd condition MethodAttributes.HasSecurity)) + member x.WithPInvoke(condition) = x.With(attributes = (x.Attributes |> conditionalAdd condition MethodAttributes.PinvokeImpl)) + member x.WithPreserveSig(condition) = x.With(implAttributes = (x.ImplAttributes |> conditionalAdd condition MethodImplAttributes.PreserveSig)) + member x.WithSynchronized(condition) = x.With(implAttributes = (x.ImplAttributes |> conditionalAdd condition MethodImplAttributes.Synchronized)) + member x.WithNoInlining(condition) = x.With(implAttributes = (x.ImplAttributes |> conditionalAdd condition MethodImplAttributes.NoInlining)) + member x.WithAggressiveInlining(condition) = x.With(implAttributes = (x.ImplAttributes |> conditionalAdd condition MethodImplAttributes.AggressiveInlining)) + member x.WithRuntime(condition) = x.With(implAttributes = (x.ImplAttributes |> conditionalAdd condition MethodImplAttributes.Runtime)) /// Index table by name and arity. type MethodDefMap = Map @@ -1423,14 +1687,13 @@ type ILMethodDefs(f : (unit -> ILMethodDef[])) = let mutable array = InlineDelayInit<_>(f) let mutable dict = InlineDelayInit<_>(fun () -> let arr = array.Value - let t = Dictionary<_,_>() + let t = Dictionary<_, _>() for i = arr.Length - 1 downto 0 do let y = arr.[i] let key = y.Name - if t.ContainsKey key then - t.[key] <- y :: t.[key] - else - t.[key] <- [ y ] + match t.TryGetValue(key) with + | true, m -> t.[key] <- y :: m + | _ -> t.[key] <- [y] t) interface IEnumerable with @@ -1440,80 +1703,173 @@ type ILMethodDefs(f : (unit -> ILMethodDef[])) = member x.GetEnumerator() = (array.Value :> IEnumerable).GetEnumerator() member x.AsArray = array.Value + member x.AsList = array.Value|> Array.toList - member x.FindByName nm = if dict.Value.ContainsKey nm then dict.Value.[nm] else [] - member x.FindByNameAndArity (nm,arity) = x.FindByName nm |> List.filter (fun x -> List.length x.Parameters = arity) -[] -type ILEventDef = - { Type: ILType option; - Name: string; - IsRTSpecialName: bool; - IsSpecialName: bool; - AddMethod: ILMethodRef; - RemoveMethod: ILMethodRef; - FireMethod: ILMethodRef option; - OtherMethods: ILMethodRef list; - CustomAttrs: ILAttributes; } - -(* Index table by name. *) + member x.FindByName(nm) = + match dict.Value.TryGetValue(nm) with + | true, m -> m + | _ -> [] + + member x.FindByNameAndArity (nm, arity) = x.FindByName nm |> List.filter (fun x -> List.length x.Parameters = arity) + +[] +type ILEventDef(eventType: ILType option, name: string, attributes: EventAttributes, addMethod: ILMethodRef, removeMethod: ILMethodRef, fireMethod: ILMethodRef option, otherMethods: ILMethodRef list, customAttrsStored: ILAttributesStored, metadataIndex: int32) = + + new (eventType, name, attributes, addMethod, removeMethod, fireMethod, otherMethods, customAttrs) = + ILEventDef(eventType, name, attributes, addMethod, removeMethod, fireMethod, otherMethods, storeILCustomAttrs customAttrs, NoMetadataIdx) + + member __.EventType = eventType + member __.Name = name + member __.Attributes = attributes + member __.AddMethod = addMethod + member __.RemoveMethod = removeMethod + member __.FireMethod = fireMethod + member __.OtherMethods = otherMethods + member __.CustomAttrsStored = customAttrsStored + member __.MetadataIndex = metadataIndex + member x.CustomAttrs = customAttrsStored.GetCustomAttrs x.MetadataIndex + + member x.With(?eventType, ?name, ?attributes, ?addMethod, ?removeMethod, ?fireMethod, ?otherMethods, ?customAttrs) = + ILEventDef(eventType= defaultArg eventType x.EventType, + name= defaultArg name x.Name, + attributes= defaultArg attributes x.Attributes, + addMethod=defaultArg addMethod x.AddMethod, + removeMethod=defaultArg removeMethod x.RemoveMethod, + fireMethod= defaultArg fireMethod x.FireMethod, + otherMethods= defaultArg otherMethods x.OtherMethods, + customAttrs=(match customAttrs with None -> x.CustomAttrs | Some attrs -> attrs)) + + member x.IsSpecialName = (x.Attributes &&& EventAttributes.SpecialName) <> enum<_>(0) + member x.IsRTSpecialName = (x.Attributes &&& EventAttributes.RTSpecialName) <> enum<_>(0) + + /// For debugging + [] + member x.DebugText = x.ToString() + + override x.ToString() = "event " + x.Name + [] type ILEventDefs = - | Events of LazyOrderedMultiMap - member x.AsList = let (Events t) = x in t.Entries() - member x.LookupByName s = let (Events t) = x in t.[s] - -[] -type ILPropertyDef = - { Name: string; - IsRTSpecialName: bool; - IsSpecialName: bool; - SetMethod: ILMethodRef option; - GetMethod: ILMethodRef option; - CallingConv: ILThisConvention; - Type: ILType; - Init: ILFieldInit option; - Args: ILTypes; - CustomAttrs: ILAttributes; } + | ILEvents of LazyOrderedMultiMap + + member x.AsList = let (ILEvents t) = x in t.Entries() + + member x.LookupByName s = let (ILEvents t) = x in t.[s] + +[] +type ILPropertyDef(name: string, attributes: PropertyAttributes, setMethod: ILMethodRef option, getMethod: ILMethodRef option, callingConv: ILThisConvention, propertyType: ILType, init: ILFieldInit option, args: ILTypes, customAttrsStored: ILAttributesStored, metadataIndex: int32) = + + new (name, attributes, setMethod, getMethod, callingConv, propertyType, init, args, customAttrs) = + ILPropertyDef(name, attributes, setMethod, getMethod, callingConv, propertyType, init, args, storeILCustomAttrs customAttrs, NoMetadataIdx) + + member x.Name = name + member x.Attributes = attributes + member x.GetMethod = getMethod + member x.SetMethod = setMethod + member x.CallingConv = callingConv + member x.PropertyType = propertyType + member x.Init = init + member x.Args = args + member x.CustomAttrsStored = customAttrsStored + member x.CustomAttrs = customAttrsStored.GetCustomAttrs x.MetadataIndex + member x.MetadataIndex = metadataIndex + + member x.With(?name, ?attributes, ?setMethod, ?getMethod, ?callingConv, ?propertyType, ?init, ?args, ?customAttrs) = + ILPropertyDef(name=defaultArg name x.Name, + attributes=defaultArg attributes x.Attributes, + setMethod=defaultArg setMethod x.SetMethod, + getMethod=defaultArg getMethod x.GetMethod, + callingConv=defaultArg callingConv x.CallingConv, + propertyType=defaultArg propertyType x.PropertyType, + init=defaultArg init x.Init, + args=defaultArg args x.Args, + customAttrs=(match customAttrs with None -> x.CustomAttrs | Some attrs -> attrs)) + + + member x.IsSpecialName = (x.Attributes &&& PropertyAttributes.SpecialName) <> enum<_>(0) + member x.IsRTSpecialName = (x.Attributes &&& PropertyAttributes.RTSpecialName) <> enum<_>(0) + + /// For debugging + [] + member x.DebugText = x.ToString() + + override x.ToString() = "property " + x.Name // Index table by name. [] type ILPropertyDefs = - | Properties of LazyOrderedMultiMap - member x.AsList = let (Properties t) = x in t.Entries() - member x.LookupByName s = let (Properties t) = x in t.[s] + | ILProperties of LazyOrderedMultiMap + member x.AsList = let (ILProperties t) = x in t.Entries() + member x.LookupByName s = let (ILProperties t) = x in t.[s] + +let convertFieldAccess (ilMemberAccess:ILMemberAccess) = + match ilMemberAccess with + | ILMemberAccess.Assembly -> FieldAttributes.Assembly + | ILMemberAccess.CompilerControlled -> enum(0) + | ILMemberAccess.FamilyAndAssembly -> FieldAttributes.FamANDAssem + | ILMemberAccess.FamilyOrAssembly -> FieldAttributes.FamORAssem + | ILMemberAccess.Family -> FieldAttributes.Family + | ILMemberAccess.Private -> FieldAttributes.Private + | ILMemberAccess.Public -> FieldAttributes.Public [] -type ILFieldDef = - { Name: string; - Type: ILType; - IsStatic: bool; - Access: ILMemberAccess; - Data: byte[] option; - LiteralValue: ILFieldInit option; - Offset: int32 option; - IsSpecialName: bool; - Marshal: ILNativeType option; - NotSerialized: bool; - IsLiteral: bool ; - IsInitOnly: bool; - CustomAttrs: ILAttributes; } +type ILFieldDef(name: string, fieldType: ILType, attributes: FieldAttributes, data: byte[] option, literalValue: ILFieldInit option, offset: int32 option, marshal: ILNativeType option, customAttrsStored: ILAttributesStored, metadataIndex: int32) = + + new (name, fieldType, attributes, data, literalValue, offset, marshal, customAttrs) = + ILFieldDef(name, fieldType, attributes, data, literalValue, offset, marshal, storeILCustomAttrs customAttrs, NoMetadataIdx) + member __.Name=name + member __.FieldType = fieldType + member __.Attributes=attributes + member __.Data=data + member __.LiteralValue=literalValue + member __.Offset=offset + member __.Marshal=marshal + member x.CustomAttrsStored = customAttrsStored + member x.CustomAttrs = customAttrsStored.GetCustomAttrs x.MetadataIndex + member x.MetadataIndex = metadataIndex + + member x.With(?name: string, ?fieldType: ILType, ?attributes: FieldAttributes, ?data: byte[] option, ?literalValue: ILFieldInit option, ?offset: int32 option, ?marshal: ILNativeType option, ?customAttrs: ILAttributes) = + ILFieldDef(name=defaultArg name x.Name, + fieldType=defaultArg fieldType x.FieldType, + attributes=defaultArg attributes x.Attributes, + data=defaultArg data x.Data, + literalValue=defaultArg literalValue x.LiteralValue, + offset=defaultArg offset x.Offset, + marshal=defaultArg marshal x.Marshal, + customAttrs=defaultArg customAttrs x.CustomAttrs) + member x.IsStatic = x.Attributes &&& FieldAttributes.Static <> enum 0 + member x.IsSpecialName = x.Attributes &&& FieldAttributes.SpecialName <> enum 0 + member x.IsLiteral = x.Attributes &&& FieldAttributes.Literal <> enum 0 + member x.NotSerialized = x.Attributes &&& FieldAttributes.NotSerialized <> enum 0 + member x.IsInitOnly = x.Attributes &&& FieldAttributes.InitOnly <> enum 0 + member x.Access = memberAccessOfFlags (int x.Attributes) + member x.WithAccess(access) = x.With(attributes = (x.Attributes &&& ~~~FieldAttributes.FieldAccessMask ||| convertFieldAccess access)) + member x.WithInitOnly(condition) = x.With(attributes = (x.Attributes |> conditionalAdd condition FieldAttributes.InitOnly)) + member x.WithStatic(condition) = x.With(attributes = (x.Attributes |> conditionalAdd condition FieldAttributes.Static)) + member x.WithSpecialName(condition) = x.With(attributes = (x.Attributes |> conditionalAdd condition (FieldAttributes.SpecialName ||| FieldAttributes.RTSpecialName))) + member x.WithNotSerialized(condition) = x.With(attributes = (x.Attributes |> conditionalAdd condition FieldAttributes.NotSerialized)) + member x.WithLiteralDefaultValue(literal) = x.With(literalValue = literal, attributes = (x.Attributes |> conditionalAdd literal.IsSome (FieldAttributes.Literal ||| FieldAttributes.HasDefault))) + member x.WithFieldMarshal(marshal) = x.With(marshal = marshal, attributes = (x.Attributes |> conditionalAdd marshal.IsSome FieldAttributes.HasFieldMarshal)) // Index table by name. Keep a canonical list to make sure field order is not disturbed for binary manipulation. type ILFieldDefs = - | Fields of LazyOrderedMultiMap - member x.AsList = let (Fields t) = x in t.Entries() - member x.LookupByName s = let (Fields t) = x in t.[s] + | ILFields of LazyOrderedMultiMap + + member x.AsList = let (ILFields t) = x in t.Entries() + + member x.LookupByName s = let (ILFields t) = x in t.[s] type ILMethodImplDef = - { Overrides: ILOverridesSpec; + { Overrides: ILOverridesSpec OverrideBy: ILMethodSpec } // Index table by name and arity. type ILMethodImplDefs = - | MethodImpls of Lazy - member x.AsList = let (MethodImpls ltab) = x in Map.foldBack (fun _x y r -> y@r) (ltab.Force()) [] + | ILMethodImpls of Lazy + + member x.AsList = let (ILMethodImpls ltab) = x in Map.foldBack (fun _x y r -> y@r) (ltab.Force()) [] and MethodImplsMap = Map @@ -1543,6 +1899,23 @@ type ILTypeDefAccess = | Private | Nested of ILMemberAccess +let typeAccessOfFlags flags = + let f = (flags &&& 0x00000007) + if f = 0x00000001 then ILTypeDefAccess.Public + elif f = 0x00000002 then ILTypeDefAccess.Nested ILMemberAccess.Public + elif f = 0x00000003 then ILTypeDefAccess.Nested ILMemberAccess.Private + elif f = 0x00000004 then ILTypeDefAccess.Nested ILMemberAccess.Family + elif f = 0x00000006 then ILTypeDefAccess.Nested ILMemberAccess.FamilyAndAssembly + elif f = 0x00000007 then ILTypeDefAccess.Nested ILMemberAccess.FamilyOrAssembly + elif f = 0x00000005 then ILTypeDefAccess.Nested ILMemberAccess.Assembly + else ILTypeDefAccess.Private + +let typeEncodingOfFlags flags = + let f = (flags &&& 0x00030000) + if f = 0x00020000 then ILDefaultPInvokeEncoding.Auto + elif f = 0x00010000 then ILDefaultPInvokeEncoding.Unicode + else ILDefaultPInvokeEncoding.Ansi + [] type ILTypeDefKind = | Class @@ -1551,91 +1924,239 @@ type ILTypeDefKind = | Enum | Delegate +let typeKindOfFlags nm _mdefs _fdefs (super:ILType option) flags = + if (flags &&& 0x00000020) <> 0x0 then ILTypeDefKind.Interface + else + let isEnum, isDelegate, isMulticastDelegate, isValueType = + match super with + | None -> false , false, false, false + | Some ty -> + ty.TypeSpec.Name = "System.Enum", + ty.TypeSpec.Name = "System.Delegate", + ty.TypeSpec.Name = "System.MulticastDelegate", + ty.TypeSpec.Name = "System.ValueType" && nm <> "System.Enum" + let selfIsMulticastDelegate = nm = "System.MulticastDelegate" + if isEnum then ILTypeDefKind.Enum + elif (isDelegate && not selfIsMulticastDelegate) || isMulticastDelegate then ILTypeDefKind.Delegate + elif isValueType then ILTypeDefKind.ValueType + else ILTypeDefKind.Class + +let convertTypeAccessFlags access = + match access with + | ILTypeDefAccess.Public -> TypeAttributes.Public + | ILTypeDefAccess.Private -> TypeAttributes.NotPublic + | ILTypeDefAccess.Nested ILMemberAccess.Public -> TypeAttributes.NestedPublic + | ILTypeDefAccess.Nested ILMemberAccess.Private -> TypeAttributes.NestedPrivate + | ILTypeDefAccess.Nested ILMemberAccess.Family -> TypeAttributes.NestedFamily + | ILTypeDefAccess.Nested ILMemberAccess.CompilerControlled -> TypeAttributes.NestedPrivate + | ILTypeDefAccess.Nested ILMemberAccess.FamilyAndAssembly -> TypeAttributes.NestedFamANDAssem + | ILTypeDefAccess.Nested ILMemberAccess.FamilyOrAssembly -> TypeAttributes.NestedFamORAssem + | ILTypeDefAccess.Nested ILMemberAccess.Assembly -> TypeAttributes.NestedAssembly + +let convertTypeKind kind = + match kind with + | ILTypeDefKind.Class -> TypeAttributes.Class + | ILTypeDefKind.ValueType -> TypeAttributes.Class + | ILTypeDefKind.Interface -> TypeAttributes.Abstract ||| TypeAttributes.Interface + | ILTypeDefKind.Enum -> TypeAttributes.Class + | ILTypeDefKind.Delegate -> TypeAttributes.Class + +let convertLayout layout = + match layout with + | ILTypeDefLayout.Auto -> TypeAttributes.AutoLayout + | ILTypeDefLayout.Sequential _ -> TypeAttributes.SequentialLayout + | ILTypeDefLayout.Explicit _ -> TypeAttributes.ExplicitLayout + +let convertEncoding encoding = + match encoding with + | ILDefaultPInvokeEncoding.Auto -> TypeAttributes.AutoClass + | ILDefaultPInvokeEncoding.Ansi -> TypeAttributes.AnsiClass + | ILDefaultPInvokeEncoding.Unicode -> TypeAttributes.UnicodeClass + +let convertToNestedTypeAccess (ilMemberAccess:ILMemberAccess) = + match ilMemberAccess with + | ILMemberAccess.Assembly -> TypeAttributes.NestedAssembly + | ILMemberAccess.CompilerControlled -> failwith "Method access compiler controlled." + | ILMemberAccess.FamilyAndAssembly -> TypeAttributes.NestedFamANDAssem + | ILMemberAccess.FamilyOrAssembly -> TypeAttributes.NestedFamORAssem + | ILMemberAccess.Family -> TypeAttributes.NestedFamily + | ILMemberAccess.Private -> TypeAttributes.NestedPrivate + | ILMemberAccess.Public -> TypeAttributes.NestedPublic + +let convertInitSemantics (init:ILTypeInit) = + match init with + | ILTypeInit.BeforeField -> TypeAttributes.BeforeFieldInit + | ILTypeInit.OnAny -> enum 0 [] -type ILTypeDef = - { tdKind: ILTypeDefKind; - Name: string; - GenericParams: ILGenericParameterDefs; (* class is generic *) - Access: ILTypeDefAccess; - IsAbstract: bool; - IsSealed: bool; - IsSerializable: bool; - IsComInterop: bool; (* Class or interface generated for COM interop *) - Layout: ILTypeDefLayout; - IsSpecialName: bool; - Encoding: ILDefaultPInvokeEncoding; - NestedTypes: ILTypeDefs; - Implements: ILTypes; - Extends: ILType option; - Methods: ILMethodDefs; - SecurityDecls: ILPermissions; - HasSecurity: bool; - Fields: ILFieldDefs; - MethodImpls: ILMethodImplDefs; - InitSemantics: ILTypeInit; - Events: ILEventDefs; - Properties: ILPropertyDefs; - CustomAttrs: ILAttributes; } - member x.IsClass = (match x.tdKind with ILTypeDefKind.Class -> true | _ -> false) - member x.IsInterface = (match x.tdKind with ILTypeDefKind.Interface -> true | _ -> false) - member x.IsEnum = (match x.tdKind with ILTypeDefKind.Enum -> true | _ -> false) - member x.IsDelegate = (match x.tdKind with ILTypeDefKind.Delegate -> true | _ -> false) - - member tdef.IsStructOrEnum = - match tdef.tdKind with - | ILTypeDefKind.ValueType | ILTypeDefKind.Enum -> true - | _ -> false - - -and [] ILTypeDefs(f : unit -> (string list * string * ILAttributes * Lazy)[]) = +type ILTypeDef(name: string, attributes: TypeAttributes, layout: ILTypeDefLayout, implements: ILTypes, genericParams: ILGenericParameterDefs, + extends: ILType option, methods: ILMethodDefs, nestedTypes: ILTypeDefs, fields: ILFieldDefs, methodImpls: ILMethodImplDefs, + events: ILEventDefs, properties: ILPropertyDefs, securityDeclsStored: ILSecurityDeclsStored, customAttrsStored: ILAttributesStored, metadataIndex: int32) = + + let mutable customAttrsStored = customAttrsStored + + new (name, attributes, layout, implements, genericParams, extends, methods, nestedTypes, fields, methodImpls, events, properties, securityDecls, customAttrs) = + ILTypeDef (name, attributes, layout, implements, genericParams, extends, methods, nestedTypes, fields, methodImpls, events, properties, storeILSecurityDecls securityDecls, storeILCustomAttrs customAttrs, NoMetadataIdx) + + member __.Name = name + member __.Attributes = attributes + member __.GenericParams = genericParams + member __.Layout = layout + member __.NestedTypes = nestedTypes + member __.Implements = implements + member __.Extends = extends + member __.Methods = methods + member __.SecurityDeclsStored = securityDeclsStored + member __.Fields = fields + member __.MethodImpls = methodImpls + member __.Events = events + member __.Properties = properties + member __.CustomAttrsStored = customAttrsStored + member __.MetadataIndex = metadataIndex + + member x.With(?name, ?attributes, ?layout, ?implements, ?genericParams, ?extends, ?methods, ?nestedTypes, ?fields, ?methodImpls, ?events, ?properties, ?customAttrs, ?securityDecls) = + ILTypeDef(name=defaultArg name x.Name, + attributes=defaultArg attributes x.Attributes, + layout=defaultArg layout x.Layout, + genericParams = defaultArg genericParams x.GenericParams, + nestedTypes = defaultArg nestedTypes x.NestedTypes, + implements = defaultArg implements x.Implements, + extends = defaultArg extends x.Extends, + methods = defaultArg methods x.Methods, + securityDecls = defaultArg securityDecls x.SecurityDecls, + fields = defaultArg fields x.Fields, + methodImpls = defaultArg methodImpls x.MethodImpls, + events = defaultArg events x.Events, + properties = defaultArg properties x.Properties, + customAttrs = defaultArg customAttrs x.CustomAttrs) + + member x.CustomAttrs = + match customAttrsStored with + | ILAttributesStored.Reader f -> + let res = ILAttributes(f x.MetadataIndex) + customAttrsStored <- ILAttributesStored.Given res + res + | ILAttributesStored.Given res -> + res + + member x.SecurityDecls = x.SecurityDeclsStored.GetSecurityDecls x.MetadataIndex + + member x.IsClass = (typeKindOfFlags x.Name x.Methods x.Fields x.Extends (int x.Attributes)) = ILTypeDefKind.Class + member x.IsStruct = (typeKindOfFlags x.Name x.Methods x.Fields x.Extends (int x.Attributes)) = ILTypeDefKind.ValueType + member x.IsInterface = (typeKindOfFlags x.Name x.Methods x.Fields x.Extends (int x.Attributes)) = ILTypeDefKind.Interface + member x.IsEnum = (typeKindOfFlags x.Name x.Methods x.Fields x.Extends (int x.Attributes)) = ILTypeDefKind.Enum + member x.IsDelegate = (typeKindOfFlags x.Name x.Methods x.Fields x.Extends (int x.Attributes)) = ILTypeDefKind.Delegate + member x.Access = typeAccessOfFlags (int x.Attributes) + member x.IsAbstract = x.Attributes &&& TypeAttributes.Abstract <> enum 0 + member x.IsSealed = x.Attributes &&& TypeAttributes.Sealed <> enum 0 + member x.IsSerializable = x.Attributes &&& TypeAttributes.Serializable <> enum 0 + member x.IsComInterop = x.Attributes &&& TypeAttributes.Import <> enum 0 (* Class or interface generated for COM interop *) + member x.IsSpecialName = x.Attributes &&& TypeAttributes.SpecialName <> enum 0 + member x.HasSecurity = x.Attributes &&& TypeAttributes.HasSecurity <> enum 0 + member x.Encoding = typeEncodingOfFlags (int x.Attributes) + member x.IsStructOrEnum = x.IsStruct || x.IsEnum + member x.WithAccess(access) = x.With(attributes=(x.Attributes &&& ~~~TypeAttributes.VisibilityMask ||| convertTypeAccessFlags access)) + member x.WithNestedAccess(access) = x.With(attributes=(x.Attributes &&& ~~~TypeAttributes.VisibilityMask ||| convertToNestedTypeAccess access)) + member x.WithSealed(condition) = x.With(attributes=(x.Attributes |> conditionalAdd condition TypeAttributes.Sealed)) + member x.WithSerializable(condition) = x.With(attributes=(x.Attributes |> conditionalAdd condition TypeAttributes.Serializable)) + member x.WithAbstract(condition) = x.With(attributes=(x.Attributes |> conditionalAdd condition TypeAttributes.Abstract)) + member x.WithImport(condition) = x.With(attributes=(x.Attributes |> conditionalAdd condition TypeAttributes.Import)) + member x.WithHasSecurity(condition) = x.With(attributes=(x.Attributes |> conditionalAdd condition TypeAttributes.HasSecurity)) + member x.WithLayout(layout) = x.With(attributes=(x.Attributes ||| convertLayout layout), layout = layout) + member x.WithKind(kind) = x.With(attributes=(x.Attributes ||| convertTypeKind kind), extends = match kind with ILTypeDefKind.Interface -> None | _ -> x.Extends) + member x.WithEncoding(encoding) = x.With(attributes=(x.Attributes &&& ~~~TypeAttributes.StringFormatMask ||| convertEncoding encoding)) + member x.WithSpecialName(condition) = x.With(attributes=(x.Attributes |> conditionalAdd condition TypeAttributes.SpecialName)) + member x.WithInitSemantics(init) = x.With(attributes=(x.Attributes ||| convertInitSemantics init)) + +and [] ILTypeDefs(f : unit -> ILPreTypeDef[]) = let mutable array = InlineDelayInit<_>(f) + let mutable dict = InlineDelayInit<_>(fun () -> - let arr = array.Value - let t = Dictionary<_,_>(HashIdentity.Structural) - for (nsp, nm, _attr, ltd) in arr do - let key = nsp, nm - t.[key] <- ltd - t) + let arr = array.Value + let t = Dictionary<_, _>(HashIdentity.Structural) + for pre in arr do + let key = pre.Namespace, pre.Name + t.[key] <- pre + t) - member x.AsArray = [| for (_,_,_,ltd) in array.Value -> ltd.Force() |] - member x.AsList = [ for (_,_,_,ltd) in array.Value -> ltd.Force() ] + member x.AsArray = [| for pre in array.Value -> pre.GetTypeDef() |] + + member x.AsList = [ for pre in array.Value -> pre.GetTypeDef() ] interface IEnumerable with member x.GetEnumerator() = ((x :> IEnumerable).GetEnumerator() :> IEnumerator) interface IEnumerable with member x.GetEnumerator() = - (seq { for (_,_,_,ltd) in array.Value -> ltd.Force() }).GetEnumerator() + (seq { for pre in array.Value -> pre.GetTypeDef() }).GetEnumerator() - member x.AsArrayOfLazyTypeDefs = array.Value + member x.AsArrayOfPreTypeDefs = array.Value member x.FindByName nm = - let ns,n = splitILTypeName nm - dict.Value.[(ns,n)].Force() + let ns, n = splitILTypeName nm + dict.Value.[(ns, n)].GetTypeDef() + +/// This is a memory-critical class. Very many of these objects get allocated and held to represent the contents of .NET assemblies. +and [] ILPreTypeDef(nameSpace: string list, name: string, metadataIndex: int32, storage: ILTypeDefStored) = + let mutable store : ILTypeDef = Unchecked.defaultof<_> + + member __.Namespace = nameSpace + member __.Name = name + member __.MetadataIndex = metadataIndex + + member x.GetTypeDef() = + match box store with + | null -> + match storage with + | ILTypeDefStored.Given td -> + store <- td + td + | ILTypeDefStored.Computed f -> + System.Threading.LazyInitializer.EnsureInitialized(&store, System.Func<_>(fun () -> f())) + | ILTypeDefStored.Reader f -> + System.Threading.LazyInitializer.EnsureInitialized(&store, System.Func<_>(fun () -> f x.MetadataIndex)) + | _ -> store + +and ILTypeDefStored = + | Given of ILTypeDef + | Reader of (int32 -> ILTypeDef) + | Computed of (unit -> ILTypeDef) + +let mkILTypeDefReader f = ILTypeDefStored.Reader f type ILNestedExportedType = - { Name: string; - Access: ILMemberAccess; - Nested: ILNestedExportedTypes; - CustomAttrs: ILAttributes } + { Name: string + Access: ILMemberAccess + Nested: ILNestedExportedTypes + CustomAttrsStored: ILAttributesStored + MetadataIndex: int32 } + + member x.CustomAttrs = x.CustomAttrsStored.GetCustomAttrs x.MetadataIndex and ILNestedExportedTypes = - | ILNestedExportedTypes of Lazy> + | ILNestedExportedTypes of Lazy> + member x.AsList = let (ILNestedExportedTypes ltab) = x in Map.foldBack (fun _x y r -> y::r) (ltab.Force()) [] and [] ILExportedTypeOrForwarder = - { ScopeRef: ILScopeRef; - Name: string; - IsForwarder: bool; - Access: ILTypeDefAccess; - Nested: ILNestedExportedTypes; - CustomAttrs: ILAttributes } + { ScopeRef: ILScopeRef + Name: string + Attributes: TypeAttributes + Nested: ILNestedExportedTypes + CustomAttrsStored: ILAttributesStored + MetadataIndex: int32 } + + member x.Access = typeAccessOfFlags (int x.Attributes) + + member x.IsForwarder = x.Attributes &&& enum(0x00200000) <> enum 0 + + member x.CustomAttrs = x.CustomAttrsStored.GetCustomAttrs x.MetadataIndex and ILExportedTypesAndForwarders = - | ILExportedTypesAndForwarders of Lazy> + | ILExportedTypesAndForwarders of Lazy> + member x.AsList = let (ILExportedTypesAndForwarders ltab) = x in Map.foldBack (fun _x y r -> y::r) (ltab.Force()) [] [] @@ -1645,24 +2166,32 @@ type ILResourceAccess = [] type ILResourceLocation = - | Local of (unit -> byte[]) + | LocalIn of string * int * int + | LocalOut of byte[] | File of ILModuleRef * int32 | Assembly of ILAssemblyRef type ILResource = - { Name: string; - Location: ILResourceLocation; - Access: ILResourceAccess; - CustomAttrs: ILAttributes } + { Name: string + Location: ILResourceLocation + Access: ILResourceAccess + CustomAttrsStored: ILAttributesStored + MetadataIndex: int32 } + /// Read the bytes from a resource local to an assembly - member r.Bytes = - match r.Location with - | ILResourceLocation.Local b -> b() - | _ -> failwith "Bytes" + member r.GetBytes() = + match r.Location with + | ILResourceLocation.LocalIn (file, start, len) -> + File.ReadBinaryChunk(file, start, len) + | ILResourceLocation.LocalOut bytes -> bytes + | _ -> failwith "GetBytes" + + member x.CustomAttrs = x.CustomAttrsStored.GetCustomAttrs x.MetadataIndex type ILResources = - | ILResources of Lazy - member x.AsList = let (ILResources ltab) = x in (ltab.Force()) + | ILResources of ILResource list + + member x.AsList = let (ILResources ltab) = x in ltab // -------------------------------------------------------------------- // One module in the "current" assembly @@ -1678,48 +2207,60 @@ type ILAssemblyLongevity = type ILAssemblyManifest = - { Name: string; - AuxModuleHashAlgorithm: int32; - SecurityDecls: ILPermissions; - PublicKey: byte[] option; - Version: ILVersionInfo option; - Locale: Locale option; - CustomAttrs: ILAttributes; - - AssemblyLongevity: ILAssemblyLongevity; - DisableJitOptimizations: bool; - JitTracking: bool; - IgnoreSymbolStoreSequencePoints: bool; - Retargetable: bool; + { Name: string + AuxModuleHashAlgorithm: int32 + SecurityDeclsStored: ILSecurityDeclsStored + PublicKey: byte[] option + Version: ILVersionInfo option + Locale: Locale option + CustomAttrsStored: ILAttributesStored + + AssemblyLongevity: ILAssemblyLongevity + DisableJitOptimizations: bool + JitTracking: bool + IgnoreSymbolStoreSequencePoints: bool + Retargetable: bool /// Records the types implemented by other modules. - ExportedTypes: ILExportedTypesAndForwarders; + ExportedTypes: ILExportedTypesAndForwarders + /// Records whether the entrypoint resides in another module. - EntrypointElsewhere: ILModuleRef option; + EntrypointElsewhere: ILModuleRef option + MetadataIndex: int32 } + member x.CustomAttrs = x.CustomAttrsStored.GetCustomAttrs x.MetadataIndex + + member x.SecurityDecls = x.SecurityDeclsStored.GetSecurityDecls x.MetadataIndex + +[] +type ILNativeResource = + | In of fileName: string * linkedResourceBase: int * linkedResourceStart: int * linkedResourceLength: int + | Out of unlinkedResource: byte[] + type ILModuleDef = - { Manifest: ILAssemblyManifest option; - CustomAttrs: ILAttributes; - Name: string; - TypeDefs: ILTypeDefs; + { Manifest: ILAssemblyManifest option + Name: string + TypeDefs: ILTypeDefs SubsystemVersion : int * int UseHighEntropyVA : bool - (* Random bits of relatively uninteresting data *) - SubSystemFlags: int32; - IsDLL: bool; - IsILOnly: bool; - Platform: ILPlatform option; - StackReserveSize: int32 option; - Is32Bit: bool; - Is32BitPreferred: bool; - Is64Bit: bool; - VirtualAlignment: int32; - PhysicalAlignment: int32; - ImageBase: int32; - MetadataVersion: string; - Resources: ILResources; - NativeResources: list>; (* e.g. win32 resources *) + SubSystemFlags: int32 + IsDLL: bool + IsILOnly: bool + Platform: ILPlatform option + StackReserveSize: int32 option + Is32Bit: bool + Is32BitPreferred: bool + Is64Bit: bool + VirtualAlignment: int32 + PhysicalAlignment: int32 + ImageBase: int32 + MetadataVersion: string + Resources: ILResources + /// e.g. win32 resources + NativeResources: ILNativeResource list + CustomAttrsStored: ILAttributesStored + MetadataIndex: int32 } member x.ManifestOfAssembly = match x.Manifest with @@ -1729,6 +2270,7 @@ type ILModuleDef = member m.HasManifest = match m.Manifest with None -> false | _ -> true + member x.CustomAttrs = x.CustomAttrsStored.GetCustomAttrs x.MetadataIndex // -------------------------------------------------------------------- // Add fields and types to tables, with decent error messages @@ -1736,41 +2278,39 @@ type ILModuleDef = // -------------------------------------------------------------------- let mkILEmptyGenericParams = ([]: ILGenericParameterDefs) -let emptyILGenericArgsList = ([ ]: ILType list) - - +let emptyILGenericArgsList = ([]: ILType list) // -------------------------------------------------------------------- // Make ILTypeRefs etc. // -------------------------------------------------------------------- -let mkILNestedTyRef (scope,l,nm) = ILTypeRef.Create(scope,l,nm) -let mkILTyRef (scope,nm) = mkILNestedTyRef (scope,[],nm) + +let mkILNestedTyRef (scope, l, nm) = ILTypeRef.Create(scope, l, nm) + +let mkILTyRef (scope, nm) = mkILNestedTyRef (scope, [], nm) type ILGenericArgsList = ILType list -let mkILTySpec (tref,inst) = ILTypeSpec.Create(tref, inst) +let mkILTySpec (tref, inst) = ILTypeSpec.Create(tref, inst) -let mkILNonGenericTySpec tref = mkILTySpec (tref,[]) +let mkILNonGenericTySpec tref = mkILTySpec (tref, []) -let mkILTyRefInTyRef (tref:ILTypeRef,nm) = - mkILNestedTyRef (tref.Scope,tref.Enclosing@[tref.Name],nm) +let mkILTyRefInTyRef (tref:ILTypeRef, nm) = + mkILNestedTyRef (tref.Scope, tref.Enclosing@[tref.Name], nm) let mkILTy boxed tspec = - match boxed with AsObject -> mkILBoxedType tspec | _ -> ILType.Value tspec + match boxed with AsObject -> mkILBoxedType tspec | _ -> ILType.Value tspec let mkILNamedTy vc tref tinst = mkILTy vc (ILTypeSpec.Create(tref, tinst)) let mkILValueTy tref tinst = mkILNamedTy AsValue tref tinst + let mkILBoxedTy tref tinst = mkILNamedTy AsObject tref tinst let mkILNonGenericValueTy tref = mkILNamedTy AsValue tref [] -let mkILNonGenericBoxedTy tref = mkILNamedTy AsObject tref [] -// -------------------------------------------------------------------- -// Making assembly, module and file references -// -------------------------------------------------------------------- +let mkILNonGenericBoxedTy tref = mkILNamedTy AsObject tref [] let mkSimpleAssRef n = ILAssemblyRef.Create(n, None, None, false, None, None) @@ -1780,94 +2320,70 @@ let mkSimpleModRef n = // -------------------------------------------------------------------- // The toplevel class of a module is called "" -// -// REVIEW: the following comments from the ECMA Spec (Partition II, Section 9.8) -// -// "For an ordinary type, if the metadata merges two definitions -// of the same type, it simply discards one definition on the -// assumption they are equivalent and that any anomaly will be -// discovered when the type is used. For the special class that -// holds global members, however, members are unioned across all -// modules at merge time. If the same name appears to be defined -// for cross-module use in multiple modules then there is an -// error. In detail: -// - If no member of the same kind (field or method), name, and -// signature exists, then add this member to the output class. -// - If there are duplicates and no more than one has an -// accessibility other than compilercontrolled, then add them -// all in the output class. -// - If there are duplicates and two or more have an accessibility -// other than compilercontrolled an error has occurred." // -------------------------------------------------------------------- let typeNameForGlobalFunctions = "" -let mkILTypeForGlobalFunctions scoref = mkILBoxedType (mkILNonGenericTySpec (ILTypeRef.Create(scoref,[],typeNameForGlobalFunctions))) +let mkILTypeForGlobalFunctions scoref = mkILBoxedType (mkILNonGenericTySpec (ILTypeRef.Create(scoref, [], typeNameForGlobalFunctions))) let isTypeNameForGlobalFunctions d = (d = typeNameForGlobalFunctions) - -let mkILMethRef (tref,callconv,nm,gparams,args,rty) = - { mrefParent=tref; - mrefCallconv=callconv; - mrefGenericArity=gparams; - mrefName=nm; - mrefArgs=args; +let mkILMethRef (tref, callconv, nm, gparams, args, rty) = + { mrefParent=tref + mrefCallconv=callconv + mrefGenericArity=gparams + mrefName=nm + mrefArgs=args mrefReturn=rty} -let mkILMethSpecForMethRefInTy (mref,typ,minst) = - { mspecMethodRef=mref; - mspecEnclosingType=typ; +let mkILMethSpecForMethRefInTy (mref, ty, minst) = + { mspecMethodRef=mref + mspecDeclaringType=ty mspecMethodInst=minst } -let mkILMethSpec (mref, vc, tinst, minst) = mkILMethSpecForMethRefInTy (mref,mkILNamedTy vc mref.EnclosingTypeRef tinst, minst) +let mkILMethSpec (mref, vc, tinst, minst) = mkILMethSpecForMethRefInTy (mref, mkILNamedTy vc mref.DeclaringTypeRef tinst, minst) -let mk_mspec_in_tref (tref,vc,cc,nm,args,rty,tinst,minst) = - mkILMethSpec (mkILMethRef ( tref,cc,nm,List.length minst,args,rty),vc,tinst,minst) +let mkILMethSpecInTypeRef (tref, vc, cc, nm, args, rty, tinst, minst) = + mkILMethSpec (mkILMethRef ( tref, cc, nm, List.length minst, args, rty), vc, tinst, minst) -let mkILMethSpecInTy (typ:ILType, cc, nm, args, rty, minst:ILGenericArgs) = - mkILMethSpecForMethRefInTy (mkILMethRef (typ.TypeRef,cc,nm,minst.Length,args,rty),typ,minst) +let mkILMethSpecInTy (ty:ILType, cc, nm, args, rty, minst:ILGenericArgs) = + mkILMethSpecForMethRefInTy (mkILMethRef (ty.TypeRef, cc, nm, minst.Length, args, rty), ty, minst) -let mkILNonGenericMethSpecInTy (typ,cc,nm,args,rty) = - mkILMethSpecInTy (typ,cc,nm,args,rty,[]) +let mkILNonGenericMethSpecInTy (ty, cc, nm, args, rty) = + mkILMethSpecInTy (ty, cc, nm, args, rty, []) -let mkILInstanceMethSpecInTy (typ:ILType,nm,args,rty,minst) = - mkILMethSpecInTy (typ, ILCallingConv.Instance, nm, args, rty, minst) +let mkILInstanceMethSpecInTy (ty:ILType, nm, args, rty, minst) = + mkILMethSpecInTy (ty, ILCallingConv.Instance, nm, args, rty, minst) -let mkILNonGenericInstanceMethSpecInTy (typ:ILType,nm,args,rty) = - mkILInstanceMethSpecInTy (typ,nm,args,rty,[]) +let mkILNonGenericInstanceMethSpecInTy (ty:ILType, nm, args, rty) = + mkILInstanceMethSpecInTy (ty, nm, args, rty, []) -let mkILStaticMethSpecInTy (typ,nm,args,rty,minst) = - mkILMethSpecInTy (typ,ILCallingConv.Static,nm,args,rty,minst) +let mkILStaticMethSpecInTy (ty, nm, args, rty, minst) = + mkILMethSpecInTy (ty, ILCallingConv.Static, nm, args, rty, minst) -let mkILNonGenericStaticMethSpecInTy (typ,nm,args,rty) = - mkILStaticMethSpecInTy (typ,nm,args,rty,[]) +let mkILNonGenericStaticMethSpecInTy (ty, nm, args, rty) = + mkILStaticMethSpecInTy (ty, nm, args, rty, []) -let mkILCtorMethSpec (tref,args,cinst) = - mk_mspec_in_tref(tref,AsObject,ILCallingConv.Instance,".ctor",args,ILType.Void,cinst, []) +let mkILCtorMethSpec (tref, args, cinst) = + mkILMethSpecInTypeRef(tref, AsObject, ILCallingConv.Instance, ".ctor", args, ILType.Void, cinst, []) -let mkILCtorMethSpecForTy (ty,args) = - mkILMethSpecInTy(ty,ILCallingConv.Instance,".ctor",args,ILType.Void, []) +let mkILCtorMethSpecForTy (ty, args) = + mkILMethSpecInTy(ty, ILCallingConv.Instance, ".ctor", args, ILType.Void, []) -let mkILNonGenericCtorMethSpec (tref,args) = - mkILCtorMethSpec (tref,args,[]) +let mkILNonGenericCtorMethSpec (tref, args) = + mkILCtorMethSpec (tref, args, []) // -------------------------------------------------------------------- // Make references to fields // -------------------------------------------------------------------- -let mkILFieldRef(tref,nm,ty) = { EnclosingTypeRef=tref; Name=nm; Type=ty} +let mkILFieldRef(tref, nm, ty) = { DeclaringTypeRef=tref; Name=nm; Type=ty} -let mkILFieldSpec (tref,ty) = { FieldRef= tref; EnclosingType=ty } +let mkILFieldSpec (tref, ty) = { FieldRef= tref; DeclaringType=ty } -let mkILFieldSpecInTy (typ:ILType,nm,fty) = - mkILFieldSpec (mkILFieldRef (typ.TypeRef,nm,fty), typ) +let mkILFieldSpecInTy (ty:ILType, nm, fty) = + mkILFieldSpec (mkILFieldRef (ty.TypeRef, nm, fty), ty) -let emptyILCustomAttrs = ILAttributes (fun () -> [| |]) - -let mkILCustomAttrsFromArray (l: ILAttribute[]) = if l.Length = 0 then emptyILCustomAttrs else ILAttributes (fun () -> l) -let mkILCustomAttrs l = l |> List.toArray |> mkILCustomAttrsFromArray -let mkILComputedCustomAttrs f = ILAttributes f let andTailness x y = match x with Tailcall when y -> Tailcall | _ -> Normalcall @@ -1903,20 +2419,17 @@ let nonBranchingInstrsToCode instrs : ILCode = // // -------------------------------------------------------------------- -let emptyILSecurityDecls = ILPermissions.SecurityDecls [] -let mkILSecurityDecls l = match l with [] -> emptyILSecurityDecls | _ -> ILPermissions.SecurityDecls l -let mkILLazySecurityDecls l = ILPermissions.SecurityDeclsLazy l - let mkILTyvarTy tv = ILType.TypeVar tv let mkILSimpleTypar nm = - { Name=nm; + { Name=nm Constraints = [] - Variance=NonVariant; - HasReferenceTypeConstraint=false; - HasNotNullableValueTypeConstraint=false; - HasDefaultConstructorConstraint=false; - CustomAttrs = emptyILCustomAttrs } + Variance=NonVariant + HasReferenceTypeConstraint=false + HasNotNullableValueTypeConstraint=false + HasDefaultConstructorConstraint=false + CustomAttrsStored = storeILCustomAttrs emptyILCustomAttrs + MetadataIndex = NoMetadataIdx } let gparam_of_gactual (_ga:ILType) = mkILSimpleTypar "T" @@ -1933,20 +2446,24 @@ let mkILFormalNamedTy bx tref gparams = mkILNamedTy bx tref (mkILFormalGenericAr // Operations on class etc. defs. // -------------------------------------------------------------------- -let mkRefForNestedILTypeDef scope (enc:ILTypeDef list,td:ILTypeDef) = +let mkRefForNestedILTypeDef scope (enc:ILTypeDef list, td:ILTypeDef) = mkILNestedTyRef(scope, (enc |> List.map (fun etd -> etd.Name)), td.Name) // -------------------------------------------------------------------- // Operations on type tables. // -------------------------------------------------------------------- -let getName (ltd: Lazy) = - let td = Lazy.force ltd - let ns,n = splitILTypeName td.Name - (ns,n,td.CustomAttrs,ltd) +let mkILPreTypeDef (td:ILTypeDef) = + let ns, n = splitILTypeName td.Name + ILPreTypeDef(ns, n, NoMetadataIdx, ILTypeDefStored.Given td) +let mkILPreTypeDefComputed (ns, n, f) = + ILPreTypeDef(ns, n, NoMetadataIdx, ILTypeDefStored.Computed f) +let mkILPreTypeDefRead (ns, n, idx, f) = + ILPreTypeDef(ns, n, idx, f) + -let addILTypeDef td (tdefs: ILTypeDefs) = ILTypeDefs (fun () -> [| yield getName (notlazy td); yield! tdefs.AsArrayOfLazyTypeDefs |]) -let mkILTypeDefsFromArray l = ILTypeDefs (fun () -> Array.map (notlazy >> getName) l) +let addILTypeDef td (tdefs: ILTypeDefs) = ILTypeDefs (fun () -> [| yield mkILPreTypeDef td; yield! tdefs.AsArrayOfPreTypeDefs |]) +let mkILTypeDefsFromArray (l: ILTypeDef[]) = ILTypeDefs (fun () -> Array.map mkILPreTypeDef l) let mkILTypeDefs l = mkILTypeDefsFromArray (Array.ofList l) let mkILTypeDefsComputed f = ILTypeDefs f let emptyILTypeDefs = mkILTypeDefsFromArray [| |] @@ -1976,10 +2493,10 @@ let defaultImageBase = 0x034f0000 (* this is what comes out of ILDASM on 30/04/2 // Array types // -------------------------------------------------------------------- -let mkILArrTy (ty, shape) = ILType.Array(shape,ty) -let mkILArr1DTy ty = mkILArrTy (ty,ILArrayShape.SingleDimensional) +let mkILArrTy (ty, shape) = ILType.Array(shape, ty) +let mkILArr1DTy ty = mkILArrTy (ty, ILArrayShape.SingleDimensional) let isILArrTy ty = match ty with ILType.Array _ -> true| _ -> false -let destILArrTy ty = match ty with ILType.Array(shape,ty) -> (shape,ty) | _ -> failwith "destILArrTy" +let destILArrTy ty = match ty with ILType.Array(shape, ty) -> (shape, ty) | _ -> failwith "destILArrTy" // -------------------------------------------------------------------- // Sigs of special types built-in @@ -2022,7 +2539,7 @@ let tname_IntPtr = "System.IntPtr" [] let tname_UIntPtr = "System.UIntPtr" -[] +[] // This data structure needs an entirely delayed implementation type ILGlobals(primaryScopeRef) = @@ -2067,13 +2584,18 @@ type ILGlobals(primaryScopeRef) = member x.typ_Double = m_typ_Double member x.typ_Bool = m_typ_Bool member x.typ_Char = m_typ_Char + + /// For debugging + [] + member x.DebugText = x.ToString() + override x.ToString() = "" let mkILGlobals primaryScopeRef = ILGlobals primaryScopeRef let mkNormalCall mspec = I_call (Normalcall, mspec, None) let mkNormalCallvirt mspec = I_callvirt (Normalcall, mspec, None) -let mkNormalCallconstraint (ty,mspec) = I_callconstraint (Normalcall, ty, mspec, None) +let mkNormalCallconstraint (ty, mspec) = I_callconstraint (Normalcall, ty, mspec, None) let mkNormalNewobj mspec = I_newobj (mspec, None) /// Comment on common object cache sizes: @@ -2092,8 +2614,8 @@ let mkLdloc i = if 0us < i && i < uint16 ldlocs.Length then ldlocs.[int i] else let stlocs = [| for i in 0 .. 512 -> I_stloc (uint16 i) |] let mkStloc i = if 0us < i && i < uint16 stlocs.Length then stlocs.[int i] else I_stloc i -let ldi32s = [| for i in 0 .. 256 -> AI_ldc (DT_I4,ILConst.I4 i) |] -let mkLdcInt32 i = if 0 < i && i < ldi32s.Length then ldi32s.[i] else AI_ldc (DT_I4,ILConst.I4 i) +let ldi32s = [| for i in 0 .. 256 -> AI_ldc (DT_I4, ILConst.I4 i) |] +let mkLdcInt32 i = if 0 < i && i < ldi32s.Length then ldi32s.[i] else AI_ldc (DT_I4, ILConst.I4 i) let tname_CompilerGeneratedAttribute = "System.Runtime.CompilerServices.CompilerGeneratedAttribute" let tname_DebuggableAttribute = "System.Diagnostics.DebuggableAttribute" @@ -2146,18 +2668,18 @@ let isILDoubleTy ty = isILValuePrimaryAssemblyTy ty tname_Double // -------------------------------------------------------------------- let rescopeILScopeRef scoref scoref1 = - match scoref,scoref1 with - | _,ILScopeRef.Local -> scoref - | ILScopeRef.Local,_ -> scoref1 - | _,ILScopeRef.Module _ -> scoref - | ILScopeRef.Module _,_ -> scoref1 + match scoref, scoref1 with + | _, ILScopeRef.Local -> scoref + | ILScopeRef.Local, _ -> scoref1 + | _, ILScopeRef.Module _ -> scoref + | ILScopeRef.Module _, _ -> scoref1 | _ -> scoref1 let rescopeILTypeRef scoref (tref1:ILTypeRef) = let scoref1 = tref1.Scope let scoref2 = rescopeILScopeRef scoref scoref1 if scoref1 === scoref2 then tref1 - else ILTypeRef.Create(scoref2,tref1.Enclosing,tref1.Name) + else ILTypeRef.Create(scoref2, tref1.Enclosing, tref1.Name) // ORIGINAL IMPLEMENTATION (too many allocations // { tspecTypeRef=rescopeILTypeRef scoref tref; @@ -2177,24 +2699,24 @@ let rec rescopeILTypeSpec scoref (tspec1:ILTypeSpec) = let tinst2 = rescopeILTypes scoref tinst1 ILTypeSpec.Create (tref2, tinst2) -and rescopeILType scoref typ = - match typ with +and rescopeILType scoref ty = + match ty with | ILType.Ptr t -> ILType.Ptr (rescopeILType scoref t) | ILType.FunctionPointer t -> ILType.FunctionPointer (rescopeILCallSig scoref t) | ILType.Byref t -> ILType.Byref (rescopeILType scoref t) | ILType.Boxed cr1 -> let cr2 = rescopeILTypeSpec scoref cr1 - if cr1 === cr2 then typ else + if cr1 === cr2 then ty else mkILBoxedType cr2 - | ILType.Array (s,ety1) -> + | ILType.Array (s, ety1) -> let ety2 = rescopeILType scoref ety1 - if ety1 === ety2 then typ else - ILType.Array (s,ety2) + if ety1 === ety2 then ty else + ILType.Array (s, ety2) | ILType.Value cr1 -> let cr2 = rescopeILTypeSpec scoref cr1 - if cr1 === cr2 then typ else + if cr1 === cr2 then ty else ILType.Value cr2 - | ILType.Modified(b,tref,ty) -> ILType.Modified(b,rescopeILTypeRef scoref tref, rescopeILType scoref ty) + | ILType.Modified(b, tref, ty) -> ILType.Modified(b, rescopeILTypeRef scoref tref, rescopeILType scoref ty) | x -> x and rescopeILTypes scoref i = @@ -2202,19 +2724,19 @@ and rescopeILTypes scoref i = else List.mapq (rescopeILType scoref) i and rescopeILCallSig scoref csig = - mkILCallSig (csig.CallingConv,rescopeILTypes scoref csig.ArgTypes,rescopeILType scoref csig.ReturnType) + mkILCallSig (csig.CallingConv, rescopeILTypes scoref csig.ArgTypes, rescopeILType scoref csig.ReturnType) let rescopeILMethodRef scoref (x:ILMethodRef) = - { mrefParent = rescopeILTypeRef scoref x.EnclosingTypeRef; - mrefCallconv = x.mrefCallconv; - mrefGenericArity=x.mrefGenericArity; - mrefName=x.mrefName; - mrefArgs = rescopeILTypes scoref x.mrefArgs; + { mrefParent = rescopeILTypeRef scoref x.DeclaringTypeRef + mrefCallconv = x.mrefCallconv + mrefGenericArity=x.mrefGenericArity + mrefName=x.mrefName + mrefArgs = rescopeILTypes scoref x.mrefArgs mrefReturn= rescopeILType scoref x.mrefReturn } let rescopeILFieldRef scoref x = - { EnclosingTypeRef = rescopeILTypeRef scoref x.EnclosingTypeRef; - Name= x.Name; + { DeclaringTypeRef = rescopeILTypeRef scoref x.DeclaringTypeRef + Name= x.Name Type= rescopeILType scoref x.Type } // -------------------------------------------------------------------- @@ -2222,20 +2744,20 @@ let rescopeILFieldRef scoref x = // -------------------------------------------------------------------- let rec instILTypeSpecAux numFree inst (tspec:ILTypeSpec) = - ILTypeSpec.Create(tspec.TypeRef,instILGenericArgsAux numFree inst tspec.GenericArgs) + ILTypeSpec.Create(tspec.TypeRef, instILGenericArgsAux numFree inst tspec.GenericArgs) -and instILTypeAux numFree (inst:ILGenericArgs) typ = - match typ with +and instILTypeAux numFree (inst:ILGenericArgs) ty = + match ty with | ILType.Ptr t -> ILType.Ptr (instILTypeAux numFree inst t) | ILType.FunctionPointer t -> ILType.FunctionPointer (instILCallSigAux numFree inst t) - | ILType.Array (a,t) -> ILType.Array (a,instILTypeAux numFree inst t) + | ILType.Array (a, t) -> ILType.Array (a, instILTypeAux numFree inst t) | ILType.Byref t -> ILType.Byref (instILTypeAux numFree inst t) | ILType.Boxed cr -> mkILBoxedType (instILTypeSpecAux numFree inst cr) | ILType.Value cr -> ILType.Value (instILTypeSpecAux numFree inst cr) | ILType.TypeVar v -> let v = int v let top = inst.Length - if v < numFree then typ else + if v < numFree then ty else if v - numFree >= top then ILType.TypeVar (uint16 (v - top)) else @@ -2245,7 +2767,7 @@ and instILTypeAux numFree (inst:ILGenericArgs) typ = and instILGenericArgsAux numFree inst i = List.map (instILTypeAux numFree inst) i and instILCallSigAux numFree inst csig = - mkILCallSig (csig.CallingConv,List.map (instILTypeAux numFree inst) csig.ArgTypes,instILTypeAux numFree inst csig.ReturnType) + mkILCallSig (csig.CallingConv, List.map (instILTypeAux numFree inst) csig.ArgTypes, instILTypeAux numFree inst csig.ReturnType) let instILType i t = instILTypeAux 0 i t @@ -2253,38 +2775,40 @@ let instILType i t = instILTypeAux 0 i t // MS-IL: Parameters, Return types and Locals // -------------------------------------------------------------------- -let mkILParam (name,ty) : ILParameter = - { Name=name; - Default=None; - Marshal=None; - IsIn=false; - IsOut=false; - IsOptional=false; - Type=ty; - CustomAttrs=emptyILCustomAttrs } -let mkILParamNamed (s,ty) = mkILParam (Some s,ty) -let mkILParamAnon ty = mkILParam (None,ty) +let mkILParam (name, ty) : ILParameter = + { Name=name + Default=None + Marshal=None + IsIn=false + IsOut=false + IsOptional=false + Type=ty + CustomAttrsStored=storeILCustomAttrs emptyILCustomAttrs + MetadataIndex = NoMetadataIdx } +let mkILParamNamed (s, ty) = mkILParam (Some s, ty) +let mkILParamAnon ty = mkILParam (None, ty) let mkILReturn ty : ILReturn = - { Marshal=None; - Type=ty; - CustomAttrs=emptyILCustomAttrs } + { Marshal=None + Type=ty + CustomAttrsStored=storeILCustomAttrs emptyILCustomAttrs + MetadataIndex = NoMetadataIdx } let mkILLocal ty dbgInfo : ILLocal = - { IsPinned=false; - Type=ty; + { IsPinned=false + Type=ty DebugInfo=dbgInfo } type ILFieldSpec with member fr.ActualType = - let env = fr.EnclosingType.GenericArgs + let env = fr.DeclaringType.GenericArgs instILType env fr.FormalType // -------------------------------------------------------------------- // Make a method mbody // -------------------------------------------------------------------- -let mkILMethodBody (zeroinit,locals,maxstack,code,tag) : ILMethodBody = +let mkILMethodBody (zeroinit, locals, maxstack, code, tag) : ILMethodBody = { IsZeroInit=zeroinit MaxStack=maxstack NoInlining=false @@ -2293,7 +2817,7 @@ let mkILMethodBody (zeroinit,locals,maxstack,code,tag) : ILMethodBody = Code= code SourceMarker=tag } -let mkMethodBody (zeroinit,locals,maxstack,code,tag) = MethodBody.IL (mkILMethodBody (zeroinit,locals,maxstack,code,tag)) +let mkMethodBody (zeroinit, locals, maxstack, code, tag) = MethodBody.IL (mkILMethodBody (zeroinit, locals, maxstack, code, tag)) // -------------------------------------------------------------------- // Make a constructor @@ -2301,190 +2825,120 @@ let mkMethodBody (zeroinit,locals,maxstack,code,tag) = MethodBody.IL (mkILMethod let mkILVoidReturn = mkILReturn ILType.Void - -let mkILCtor (access,args,impl) = - { Name=".ctor"; - mdKind=MethodKind.Ctor; - CallingConv=ILCallingConv.Instance; - Parameters = args - Return= mkILVoidReturn; - Access=access; - mdBody= mkMethBodyAux impl; - mdCodeKind=MethodCodeKind.IL; - IsInternalCall=false; - IsManaged=true; - IsForwardRef=false; - SecurityDecls=emptyILSecurityDecls; - HasSecurity=false; - IsEntryPoint=false; - GenericParams=mkILEmptyGenericParams; - IsReqSecObj=false; - IsHideBySig=false; - IsSpecialName=true; - IsUnmanagedExport=false; - IsSynchronized=false; - IsNoInline=false; - IsAggressiveInline=false - IsMustRun=false; - IsPreserveSig=false; - CustomAttrs = emptyILCustomAttrs; } +let methBodyNotAvailable = mkMethBodyAux MethodBody.NotAvailable +let methBodyAbstract = mkMethBodyAux MethodBody.Abstract +let methBodyNative = mkMethBodyAux MethodBody.Native + +let mkILCtor (access, args, impl) = + ILMethodDef(name=".ctor", + attributes=(convertMemberAccess access ||| MethodAttributes.SpecialName ||| MethodAttributes.RTSpecialName), + implAttributes=MethodImplAttributes.Managed, + callingConv=ILCallingConv.Instance, + parameters = args, + ret= mkILVoidReturn, + body= mkMethBodyAux impl, + securityDecls=emptyILSecurityDecls, + isEntryPoint=false, + genericParams=mkILEmptyGenericParams, + customAttrs = emptyILCustomAttrs) // -------------------------------------------------------------------- // Do-nothing ctor, just pass on to monomorphic superclass // -------------------------------------------------------------------- -let mkCallBaseConstructor (typ,args: ILType list) = - [ mkLdarg0; ] @ +let mkCallBaseConstructor (ty, args: ILType list) = + [ mkLdarg0 ] @ List.mapi (fun i _ -> mkLdarg (uint16 (i+1))) args @ - [ mkNormalCall (mkILCtorMethSpecForTy (typ,[])) ] + [ mkNormalCall (mkILCtorMethSpecForTy (ty, [])) ] -let mkNormalStfld fspec = I_stfld (Aligned,Nonvolatile,fspec) -let mkNormalStsfld fspec = I_stsfld (Nonvolatile,fspec) -let mkNormalLdsfld fspec = I_ldsfld (Nonvolatile,fspec) -let mkNormalLdfld fspec = I_ldfld (Aligned,Nonvolatile,fspec) +let mkNormalStfld fspec = I_stfld (Aligned, Nonvolatile, fspec) +let mkNormalStsfld fspec = I_stsfld (Nonvolatile, fspec) +let mkNormalLdsfld fspec = I_ldsfld (Nonvolatile, fspec) +let mkNormalLdfld fspec = I_ldfld (Aligned, Nonvolatile, fspec) let mkNormalLdflda fspec = I_ldflda fspec -let mkNormalLdobj dt = I_ldobj(Aligned,Nonvolatile,dt) -let mkNormalStobj dt = I_stobj(Aligned,Nonvolatile,dt) +let mkNormalLdobj dt = I_ldobj(Aligned, Nonvolatile, dt) +let mkNormalStobj dt = I_stobj(Aligned, Nonvolatile, dt) let mkILNonGenericEmptyCtor tag superTy = - let ctor = mkCallBaseConstructor (superTy,[]) - mkILCtor(ILMemberAccess.Public,[],mkMethodBody(false,[],8, nonBranchingInstrsToCode ctor,tag)) + let ctor = mkCallBaseConstructor (superTy, []) + mkILCtor(ILMemberAccess.Public, [], mkMethodBody(false, [], 8, nonBranchingInstrsToCode ctor, tag)) // -------------------------------------------------------------------- // Make a static, top level monomophic method - very useful for // creating helper ILMethodDefs for internal use. // -------------------------------------------------------------------- -let mkILStaticMethod (genparams,nm,access,args,ret,impl) = - { GenericParams=genparams; - Name=nm; - CallingConv = ILCallingConv.Static; - mdKind=MethodKind.Static; - Parameters = args - Return= ret; - Access=access; - HasSecurity=false; - SecurityDecls=emptyILSecurityDecls; - IsEntryPoint=false; - CustomAttrs = emptyILCustomAttrs; - mdBody= mkMethBodyAux impl; - mdCodeKind=MethodCodeKind.IL; - IsInternalCall=false; - IsManaged=true; - IsForwardRef=false; - IsReqSecObj=false; - IsHideBySig=false; - IsSpecialName=false; - IsUnmanagedExport=false; - IsSynchronized=false; - IsNoInline=false; - IsAggressiveInline=false; - IsMustRun=false; - IsPreserveSig=false; } - -let mkILNonGenericStaticMethod (nm,access,args,ret,impl) = - mkILStaticMethod (mkILEmptyGenericParams,nm,access,args,ret,impl) +let mkILStaticMethod (genparams, nm, access, args, ret, impl) = + ILMethodDef(genericParams=genparams, + name=nm, + attributes=(convertMemberAccess access ||| MethodAttributes.Static), + implAttributes=MethodImplAttributes.Managed, + callingConv = ILCallingConv.Static, + parameters = args, + ret= ret, + securityDecls=emptyILSecurityDecls, + isEntryPoint=false, + customAttrs = emptyILCustomAttrs, + body= mkMethBodyAux impl) + +let mkILNonGenericStaticMethod (nm, access, args, ret, impl) = + mkILStaticMethod (mkILEmptyGenericParams, nm, access, args, ret, impl) let mkILClassCtor impl = - { Name=".cctor"; - CallingConv=ILCallingConv.Static; - GenericParams=mkILEmptyGenericParams; - mdKind=MethodKind.Cctor; - Parameters = [] - Return=mkILVoidReturn; - Access=ILMemberAccess.Private; - IsEntryPoint=false; - HasSecurity=false; - SecurityDecls=emptyILSecurityDecls; - CustomAttrs = emptyILCustomAttrs; - mdBody= mkMethBodyAux impl; - mdCodeKind=MethodCodeKind.IL; - IsInternalCall=false; - IsManaged=true; - IsForwardRef=false; - IsReqSecObj=false; - IsHideBySig=false; - IsSpecialName=true; - IsUnmanagedExport=false; - IsSynchronized=false; - IsNoInline=false; - IsAggressiveInline=false - IsMustRun=false; - IsPreserveSig=false; } + ILMethodDef(name=".cctor", + attributes=(MethodAttributes.Private ||| MethodAttributes.Static ||| MethodAttributes.SpecialName ||| MethodAttributes.RTSpecialName), + implAttributes=MethodImplAttributes.Managed, + callingConv=ILCallingConv.Static, + genericParams=mkILEmptyGenericParams, + parameters = [], + ret=mkILVoidReturn, + isEntryPoint=false, + securityDecls=emptyILSecurityDecls, + customAttrs=emptyILCustomAttrs, + body= mkMethBodyAux impl) // -------------------------------------------------------------------- // Make a virtual method, where the overriding is simply the default // (i.e. overrides by name/signature) // -------------------------------------------------------------------- -let mk_ospec (typ:ILType,callconv,nm,genparams,formal_args,formal_ret) = - OverridesSpec (mkILMethRef (typ.TypeRef, callconv, nm, genparams, formal_args,formal_ret), typ) - -let mkILGenericVirtualMethod (nm,access,genparams,actual_args,actual_ret,impl) = - { Name=nm; - GenericParams=genparams; - CallingConv=ILCallingConv.Instance; - mdKind= - MethodKind.Virtual - { IsFinal=false; - // REVIEW: We'll need to start setting this eventually - IsNewSlot = false; - IsCheckAccessOnOverride=true; - IsAbstract=(match impl with MethodBody.Abstract -> true | _ -> false) ; }; - Parameters=actual_args; - Return=actual_ret; - Access=access; - IsEntryPoint=false; - HasSecurity=false; - SecurityDecls=emptyILSecurityDecls; - CustomAttrs = emptyILCustomAttrs; - mdBody= mkMethBodyAux impl; - mdCodeKind=MethodCodeKind.IL; - IsInternalCall=false; - IsManaged=true; - IsForwardRef=false; - IsReqSecObj=false; - IsHideBySig=false; - IsSpecialName=false; - IsUnmanagedExport=false; - IsSynchronized=false; - IsNoInline=false; - IsAggressiveInline=false - IsMustRun=false; - IsPreserveSig=false; } +let mk_ospec (ty:ILType, callconv, nm, genparams, formal_args, formal_ret) = + OverridesSpec (mkILMethRef (ty.TypeRef, callconv, nm, genparams, formal_args, formal_ret), ty) + +let mkILGenericVirtualMethod (nm, access, genparams, actual_args, actual_ret, impl) = + ILMethodDef(name=nm, + attributes= + (convertMemberAccess access ||| + MethodAttributes.CheckAccessOnOverride ||| + (match impl with MethodBody.Abstract -> MethodAttributes.Abstract ||| MethodAttributes.Virtual | _ -> MethodAttributes.Virtual)), + implAttributes=MethodImplAttributes.Managed, + genericParams=genparams, + callingConv=ILCallingConv.Instance, + parameters=actual_args, + ret=actual_ret, + isEntryPoint=false, + securityDecls=emptyILSecurityDecls, + customAttrs = emptyILCustomAttrs, + body= mkMethBodyAux impl) -let mkILNonGenericVirtualMethod (nm,access,args,ret,impl) = - mkILGenericVirtualMethod (nm,access,mkILEmptyGenericParams,args,ret,impl) - -let mkILGenericNonVirtualMethod (nm,access,genparams, actual_args,actual_ret, impl) = - { Name=nm; - GenericParams=genparams; - CallingConv=ILCallingConv.Instance; - mdKind=MethodKind.NonVirtual; - Parameters=actual_args; - Return=actual_ret; - Access=access; - IsEntryPoint=false; - HasSecurity=false; - SecurityDecls=emptyILSecurityDecls; - CustomAttrs = emptyILCustomAttrs; - mdBody= mkMethBodyAux impl; - mdCodeKind=MethodCodeKind.IL; - IsInternalCall=false; - IsManaged=true; - IsForwardRef=false; - IsReqSecObj=false; - IsHideBySig=true; // see Bug343136: missing HideBySig attribute makes it problematic for C# to consume F# method overloads. - IsSpecialName=false; - IsUnmanagedExport=false; - IsSynchronized=false; - IsNoInline=false; - IsAggressiveInline=false - IsMustRun=false; - IsPreserveSig=false; } +let mkILNonGenericVirtualMethod (nm, access, args, ret, impl) = + mkILGenericVirtualMethod (nm, access, mkILEmptyGenericParams, args, ret, impl) + +let mkILGenericNonVirtualMethod (nm, access, genparams, actual_args, actual_ret, impl) = + ILMethodDef(name=nm, + attributes=(convertMemberAccess access ||| MethodAttributes.HideBySig), + implAttributes=MethodImplAttributes.Managed, + genericParams=genparams, + callingConv=ILCallingConv.Instance, + parameters=actual_args, + ret=actual_ret, + isEntryPoint=false, + securityDecls=emptyILSecurityDecls, + customAttrs = emptyILCustomAttrs, + body= mkMethBodyAux impl) -let mkILNonGenericInstanceMethod (nm,access,args,ret,impl) = - mkILGenericNonVirtualMethod (nm,access,mkILEmptyGenericParams,args,ret,impl) +let mkILNonGenericInstanceMethod (nm, access, args, ret, impl) = + mkILGenericNonVirtualMethod (nm, access, mkILEmptyGenericParams, args, ret, impl) // -------------------------------------------------------------------- @@ -2495,13 +2949,13 @@ let mkILNonGenericInstanceMethod (nm,access,args,ret,impl) = let ilmbody_code2code f (il: ILMethodBody) = {il with Code = f il.Code} -let mdef_code2code f md = +let mdef_code2code f (md: ILMethodDef) = let il = - match md.mdBody.Contents with + match md.Body.Contents with | MethodBody.IL il-> il | _ -> failwith "mdef_code2code - method not IL" let b = MethodBody.IL (ilmbody_code2code f il) - {md with mdBody= mkMethBodyAux b } + md.With(body= mkMethBodyAux b) let prependInstrsToCode (instrs: ILInstr list) (c2: ILCode) = let instrs = Array.ofList instrs @@ -2527,16 +2981,16 @@ let prependInstrsToMethod new_code md = mdef_code2code (prependInstrsToCode new_code) md // Creates cctor if needed -let cdef_cctorCode2CodeOrCreate tag f cd = +let cdef_cctorCode2CodeOrCreate tag f (cd: ILTypeDef) = let mdefs = cd.Methods let cctor = match mdefs.FindByName ".cctor" with | [mdef] -> mdef - | [] -> mkILClassCtor (mkMethodBody (false,[],1,nonBranchingInstrsToCode [ ],tag)) + | [] -> mkILClassCtor (mkMethodBody (false, [], 1, nonBranchingInstrsToCode [ ], tag)) | _ -> failwith "bad method table: more than one .cctor found" let methods = ILMethodDefs (fun () -> [| yield f cctor; for md in mdefs do if md.Name <> ".cctor" then yield md |]) - {cd with Methods = methods} + cd.With(methods = methods) let code_of_mdef (md:ILMethodDef) = @@ -2547,10 +3001,10 @@ let code_of_mdef (md:ILMethodDef) = let mkRefToILMethod (tref, md: ILMethodDef) = mkILMethRef (tref, md.CallingConv, md.Name, md.GenericParams.Length, md.ParameterTypes, md.Return.Type) -let mkRefToILField (tref,fdef:ILFieldDef) = mkILFieldRef (tref, fdef.Name, fdef.Type) +let mkRefToILField (tref, fdef:ILFieldDef) = mkILFieldRef (tref, fdef.Name, fdef.FieldType) -let mkRefForILMethod scope (tdefs,tdef) mdef = mkRefToILMethod (mkRefForNestedILTypeDef scope (tdefs,tdef), mdef) -let mkRefForILField scope (tdefs,tdef) (fdef:ILFieldDef) = mkILFieldRef (mkRefForNestedILTypeDef scope (tdefs,tdef), fdef.Name, fdef.Type) +let mkRefForILMethod scope (tdefs, tdef) mdef = mkRefToILMethod (mkRefForNestedILTypeDef scope (tdefs, tdef), mdef) +let mkRefForILField scope (tdefs, tdef) (fdef:ILFieldDef) = mkILFieldRef (mkRefForNestedILTypeDef scope (tdefs, tdef), fdef.Name, fdef.FieldType) (* Creates cctor if needed *) @@ -2558,24 +3012,24 @@ let prependInstrsToClassCtor instrs tag cd = cdef_cctorCode2CodeOrCreate tag (prependInstrsToMethod instrs) cd -let mkILField (isStatic,nm,ty,init,at,access,isLiteral) = - { Name=nm; - Type=ty; - IsStatic = isStatic; - LiteralValue = init; - Data=at; - Offset=None; - IsSpecialName = false; - Marshal=None; - NotSerialized=false; - IsInitOnly = false; - IsLiteral = isLiteral; - Access = access; - CustomAttrs=emptyILCustomAttrs } - -let mkILInstanceField (nm,ty,init,access) = mkILField (false,nm,ty,init,None,access,false) -let mkILStaticField (nm,ty,init,at,access) = mkILField (true,nm,ty,init,at,access,false) -let mkILLiteralField (nm,ty,init,at,access) = mkILField (true, nm, ty, Some init, at, access, true) +let mkILField (isStatic, nm, ty, (init:ILFieldInit option), (at: byte [] option), access, isLiteral) = + ILFieldDef(name=nm, + fieldType=ty, + attributes= + (convertFieldAccess access ||| + (if isStatic then FieldAttributes.Static else enum 0) ||| + (if isLiteral then FieldAttributes.Literal else enum 0) ||| + (if init.IsSome then FieldAttributes.HasDefault else enum 0) ||| + (if at.IsSome then FieldAttributes.HasFieldRVA else enum 0)), + literalValue = init, + data=at, + offset=None, + marshal=None, + customAttrs=emptyILCustomAttrs) + +let mkILInstanceField (nm, ty, init, access) = mkILField (false, nm, ty, init, None, access, false) +let mkILStaticField (nm, ty, init, at, access) = mkILField (true, nm, ty, init, at, access, false) +let mkILLiteralField (nm, ty, init, at, access) = mkILField (true, nm, ty, Some init, at, access, true) // -------------------------------------------------------------------- // Scopes for allocating new temporary variables. @@ -2585,21 +3039,21 @@ type ILLocalsAllocator(numPrealloc:int) = let newLocals = ResizeArray() member tmps.AllocLocal loc = let locn = uint16(numPrealloc + newLocals.Count) - newLocals.Add loc; + newLocals.Add loc locn member tmps.Close() = ResizeArray.toList newLocals -let mkILFieldsLazy l = Fields (LazyOrderedMultiMap((fun (f:ILFieldDef) -> f.Name),l)) +let mkILFieldsLazy l = ILFields (LazyOrderedMultiMap((fun (f:ILFieldDef) -> f.Name), l)) let mkILFields l = mkILFieldsLazy (notlazy l) let emptyILFields = mkILFields [] -let mkILEventsLazy l = Events (LazyOrderedMultiMap((fun (e: ILEventDef) -> e.Name),l)) +let mkILEventsLazy l = ILEvents (LazyOrderedMultiMap((fun (e: ILEventDef) -> e.Name), l)) let mkILEvents l = mkILEventsLazy (notlazy l) let emptyILEvents = mkILEvents [] -let mkILPropertiesLazy l = Properties (LazyOrderedMultiMap((fun (p: ILPropertyDef) -> p.Name),l) ) +let mkILPropertiesLazy l = ILProperties (LazyOrderedMultiMap((fun (p: ILPropertyDef) -> p.Name), l) ) let mkILProperties l = mkILPropertiesLazy (notlazy l) let emptyILProperties = mkILProperties [] @@ -2610,22 +3064,29 @@ let mkILExportedTypesLazy (l:Lazy<_>) = ILExportedTypesAndForwarders (lazy (Li let addNestedExportedTypeToTable (y: ILNestedExportedType) tab = Map.add y.Name y tab +let mkTypeForwarder scopeRef name nested customAttrs access = + { ScopeRef=scopeRef + Name=name + Attributes=enum(0x00200000) ||| convertTypeAccessFlags access + Nested=nested + CustomAttrsStored=storeILCustomAttrs customAttrs + MetadataIndex = NoMetadataIdx } + let mkILNestedExportedTypes l = ILNestedExportedTypes (notlazy (List.foldBack addNestedExportedTypeToTable l Map.empty)) let mkILNestedExportedTypesLazy (l:Lazy<_>) = ILNestedExportedTypes (lazy (List.foldBack addNestedExportedTypeToTable (l.Force()) Map.empty)) -let mkILResources l = ILResources (notlazy l) -let mkILResourcesLazy l = ILResources l +let mkILResources l = ILResources l let addMethodImplToTable y tab = - let key = (y.Overrides.MethodRef.Name,y.Overrides.MethodRef.ArgTypes.Length) + let key = (y.Overrides.MethodRef.Name, y.Overrides.MethodRef.ArgTypes.Length) let prev = Map.tryFindMulti key tab Map.add key (y::prev) tab -let mkILMethodImpls l = MethodImpls (notlazy (List.foldBack addMethodImplToTable l Map.empty)) -let mkILMethodImplsLazy l = MethodImpls (lazy (List.foldBack addMethodImplToTable (Lazy.force l) Map.empty)) +let mkILMethodImpls l = ILMethodImpls (notlazy (List.foldBack addMethodImplToTable l Map.empty)) +let mkILMethodImplsLazy l = ILMethodImpls (lazy (List.foldBack addMethodImplToTable (Lazy.force l) Map.empty)) let emptyILMethodImpls = mkILMethodImpls [] @@ -2634,139 +3095,122 @@ let emptyILMethodImpls = mkILMethodImpls [] // them in fields. preblock is how to call the superclass constructor.... // -------------------------------------------------------------------- -let mkILStorageCtorWithParamNames(tag,preblock,typ,extraParams,flds,access) = +let mkILStorageCtorWithParamNames(tag, preblock, ty, extraParams, flds, access) = mkILCtor(access, - (flds |> List.map (fun (pnm,_,ty) -> mkILParamNamed (pnm,ty))) @ extraParams, + (flds |> List.map (fun (pnm, _, ty) -> mkILParamNamed (pnm, ty))) @ extraParams, mkMethodBody - (false,[],2, + (false, [], 2, nonBranchingInstrsToCode begin (match tag with Some x -> [I_seqpoint x] | None -> []) @ preblock @ - List.concat (List.mapi (fun n (_pnm,nm,ty) -> - [ mkLdarg0; - mkLdarg (uint16 (n+1)); - mkNormalStfld (mkILFieldSpecInTy (typ,nm,ty)); + List.concat (List.mapi (fun n (_pnm, nm, fieldTy) -> + [ mkLdarg0 + mkLdarg (uint16 (n+1)) + mkNormalStfld (mkILFieldSpecInTy (ty, nm, fieldTy)) ]) flds) - end,tag)) + end, tag)) -let mkILSimpleStorageCtorWithParamNames(tag,base_tspec,typ,extraParams,flds,access) = +let mkILSimpleStorageCtorWithParamNames(tag, baseTySpec, ty, extraParams, flds, access) = let preblock = - match base_tspec with + match baseTySpec with None -> [] | Some tspec -> - ([ mkLdarg0; - mkNormalCall (mkILCtorMethSpecForTy (mkILBoxedType tspec,[])) ]) - mkILStorageCtorWithParamNames(tag,preblock,typ,extraParams,flds,access) + ([ mkLdarg0 + mkNormalCall (mkILCtorMethSpecForTy (mkILBoxedType tspec, [])) ]) + mkILStorageCtorWithParamNames(tag, preblock, ty, extraParams, flds, access) let addParamNames flds = - flds |> List.map (fun (nm,ty) -> (nm,nm,ty)) + flds |> List.map (fun (nm, ty) -> (nm, nm, ty)) -let mkILSimpleStorageCtor(tag,base_tspec,typ,extraParams,flds,access) = - mkILSimpleStorageCtorWithParamNames(tag,base_tspec,typ, extraParams, addParamNames flds, access) +let mkILSimpleStorageCtor(tag, baseTySpec, ty, extraParams, flds, access) = + mkILSimpleStorageCtorWithParamNames(tag, baseTySpec, ty, extraParams, addParamNames flds, access) -let mkILStorageCtor(tag,preblock,typ,flds,access) = mkILStorageCtorWithParamNames(tag, preblock, typ, [], addParamNames flds, access) +let mkILStorageCtor(tag, preblock, ty, flds, access) = mkILStorageCtorWithParamNames(tag, preblock, ty, [], addParamNames flds, access) let mkILGenericClass (nm, access, genparams, extends, impl, methods, fields, nestedTypes, props, events, attrs, init) = - { tdKind=ILTypeDefKind.Class; - Name=nm; - GenericParams= genparams; - Access = access; - Implements = impl - IsAbstract = false; - IsSealed = false; - IsSerializable = false; - IsComInterop=false; - IsSpecialName=false; - Layout=ILTypeDefLayout.Auto; - Encoding=ILDefaultPInvokeEncoding.Ansi; - InitSemantics=init; - Extends = Some extends; - Methods= methods; - Fields= fields; - NestedTypes=nestedTypes; - CustomAttrs=attrs; - MethodImpls=emptyILMethodImpls; - Properties=props; - Events=events; - SecurityDecls=emptyILSecurityDecls; - HasSecurity=false; -} + ILTypeDef(name=nm, + attributes=(convertTypeAccessFlags access ||| TypeAttributes.AutoLayout ||| TypeAttributes.Class ||| (match init with | ILTypeInit.BeforeField -> TypeAttributes.BeforeFieldInit | _ -> enum 0) ||| TypeAttributes.AnsiClass), + genericParams= genparams, + implements = impl, + layout=ILTypeDefLayout.Auto, + extends = Some extends, + methods= methods , + fields= fields, + nestedTypes=nestedTypes, + customAttrs=attrs, + methodImpls=emptyILMethodImpls, + properties=props, + events=events, + securityDecls=emptyILSecurityDecls) -let mkRawDataValueTypeDef (iltyp_ValueType: ILType) (nm,size,pack) = - { tdKind=ILTypeDefKind.ValueType; - Name = nm; - GenericParams= []; - Access = ILTypeDefAccess.Private; - Implements = [] - IsAbstract = false; - IsSealed = true; - Extends = Some iltyp_ValueType; - IsComInterop=false; - IsSerializable = false; - IsSpecialName=false; - Layout=ILTypeDefLayout.Explicit { Size=Some size; Pack=Some pack }; - Encoding=ILDefaultPInvokeEncoding.Ansi; - InitSemantics=ILTypeInit.BeforeField; - Methods= emptyILMethods; - Fields= emptyILFields; - NestedTypes=emptyILTypeDefs; - CustomAttrs=emptyILCustomAttrs; - MethodImpls=emptyILMethodImpls; - Properties=emptyILProperties; - Events=emptyILEvents; - SecurityDecls=emptyILSecurityDecls; - HasSecurity=false; } +let mkRawDataValueTypeDef (iltyp_ValueType: ILType) (nm, size, pack) = + ILTypeDef(name = nm, + genericParams= [], + attributes = (TypeAttributes.NotPublic ||| TypeAttributes.Sealed ||| TypeAttributes.ExplicitLayout ||| TypeAttributes.BeforeFieldInit ||| TypeAttributes.AnsiClass), + implements = [], + extends = Some iltyp_ValueType, + layout=ILTypeDefLayout.Explicit { Size=Some size; Pack=Some pack }, + methods= emptyILMethods, + fields= emptyILFields, + nestedTypes=emptyILTypeDefs, + customAttrs=emptyILCustomAttrs, + methodImpls=emptyILMethodImpls, + properties=emptyILProperties, + events=emptyILEvents, + securityDecls=emptyILSecurityDecls) let mkILSimpleClass (ilg: ILGlobals) (nm, access, methods, fields, nestedTypes, props, events, attrs, init) = - mkILGenericClass (nm,access, mkILEmptyGenericParams, ilg.typ_Object, [], methods, fields, nestedTypes, props, events, attrs, init) + mkILGenericClass (nm, access, mkILEmptyGenericParams, ilg.typ_Object, [], methods, fields, nestedTypes, props, events, attrs, init) -let mkILTypeDefForGlobalFunctions ilg (methods,fields) = mkILSimpleClass ilg (typeNameForGlobalFunctions, ILTypeDefAccess.Public, methods, fields, emptyILTypeDefs, emptyILProperties, emptyILEvents, emptyILCustomAttrs,ILTypeInit.BeforeField) +let mkILTypeDefForGlobalFunctions ilg (methods, fields) = mkILSimpleClass ilg (typeNameForGlobalFunctions, ILTypeDefAccess.Public, methods, fields, emptyILTypeDefs, emptyILProperties, emptyILEvents, emptyILCustomAttrs, ILTypeInit.BeforeField) let destTypeDefsWithGlobalFunctionsFirst ilg (tdefs: ILTypeDefs) = let l = tdefs.AsList - let top,nontop = l |> List.partition (fun td -> td.Name = typeNameForGlobalFunctions) + let top, nontop = l |> List.partition (fun td -> td.Name = typeNameForGlobalFunctions) let top2 = if isNil top then [ mkILTypeDefForGlobalFunctions ilg (emptyILMethods, emptyILFields) ] else top top2@nontop let mkILSimpleModule assname modname dll subsystemVersion useHighEntropyVA tdefs hashalg locale flags exportedTypes metadataVersion = - { Manifest= - Some { Name=assname; - AuxModuleHashAlgorithm= match hashalg with | Some(alg) -> alg | _ -> 0x8004; // SHA1 - SecurityDecls=emptyILSecurityDecls; - PublicKey= None; - Version= None; - Locale=locale - CustomAttrs=emptyILCustomAttrs; - AssemblyLongevity=ILAssemblyLongevity.Unspecified; - DisableJitOptimizations = 0 <> (flags &&& 0x4000); - JitTracking = (0 <> (flags &&& 0x8000)); // always turn these on - IgnoreSymbolStoreSequencePoints = (0 <> (flags &&& 0x2000)); - Retargetable = (0 <> (flags &&& 0x100)); - ExportedTypes=exportedTypes; - EntrypointElsewhere=None - }; - CustomAttrs=emptyILCustomAttrs; - Name=modname; - NativeResources=[]; - TypeDefs=tdefs; + let manifest = + { Name=assname + AuxModuleHashAlgorithm= match hashalg with | Some(alg) -> alg | _ -> 0x8004 // SHA1 + SecurityDeclsStored=emptyILSecurityDeclsStored + PublicKey= None + Version= None + Locale=locale + CustomAttrsStored=storeILCustomAttrs emptyILCustomAttrs + AssemblyLongevity=ILAssemblyLongevity.Unspecified + DisableJitOptimizations = 0 <> (flags &&& 0x4000) + JitTracking = (0 <> (flags &&& 0x8000)) // always turn these on + IgnoreSymbolStoreSequencePoints = (0 <> (flags &&& 0x2000)) + Retargetable = (0 <> (flags &&& 0x100)) + ExportedTypes=exportedTypes + EntrypointElsewhere=None + MetadataIndex = NoMetadataIdx } + { Manifest= Some manifest + CustomAttrsStored=storeILCustomAttrs emptyILCustomAttrs + Name=modname + NativeResources=[] + TypeDefs=tdefs SubsystemVersion = subsystemVersion UseHighEntropyVA = useHighEntropyVA - SubSystemFlags=defaultSubSystem; - IsDLL=dll; - IsILOnly=true; - Platform=None; - StackReserveSize=None; - Is32Bit=false; - Is32BitPreferred=false; - Is64Bit=false; - PhysicalAlignment=defaultPhysAlignment; - VirtualAlignment=defaultVirtAlignment; - ImageBase=defaultImageBase; - MetadataVersion=metadataVersion; - Resources=mkILResources []; + SubSystemFlags=defaultSubSystem + IsDLL=dll + IsILOnly=true + Platform=None + StackReserveSize=None + Is32Bit=false + Is32BitPreferred=false + Is64Bit=false + PhysicalAlignment=defaultPhysAlignment + VirtualAlignment=defaultVirtAlignment + ImageBase=defaultImageBase + MetadataVersion=metadataVersion + Resources=mkILResources [] + MetadataIndex = NoMetadataIdx } @@ -2793,42 +3237,36 @@ let buildILCode (_methName:string) lab2pc instrs tryspecs localspecs : ILCode = // Detecting Delegates // -------------------------------------------------------------------- -let mkILDelegateMethods (ilg: ILGlobals) (iltyp_AsyncCallback, iltyp_IAsyncResult) (parms,rtv:ILReturn) = +let mkILDelegateMethods (access) (ilg: ILGlobals) (iltyp_AsyncCallback, iltyp_IAsyncResult) (parms, rtv:ILReturn) = let rty = rtv.Type let one nm args ret = - let mdef = mkILNonGenericVirtualMethod (nm,ILMemberAccess.Public,args,mkILReturn ret,MethodBody.Abstract) - {mdef with - mdKind= - match mdef.mdKind with - | MethodKind.Virtual vinfo -> MethodKind.Virtual {vinfo with IsAbstract=false; } - | k -> k - mdCodeKind=MethodCodeKind.Runtime; - IsHideBySig=true; } - let ctor = mkILCtor(ILMemberAccess.Public, [ mkILParamNamed("object",ilg.typ_Object); mkILParamNamed("method",ilg.typ_IntPtr) ], MethodBody.Abstract) - let ctor = { ctor with mdCodeKind=MethodCodeKind.Runtime; IsHideBySig=true } - [ ctor; - one "Invoke" parms rty; - one "BeginInvoke" (parms @ [mkILParamNamed("callback",iltyp_AsyncCallback); mkILParamNamed("objects",ilg.typ_Object) ] ) iltyp_IAsyncResult; - one "EndInvoke" [mkILParamNamed("result",iltyp_IAsyncResult)] rty; ] + let mdef = mkILNonGenericVirtualMethod (nm, access, args, mkILReturn ret, MethodBody.Abstract) + mdef.WithAbstract(false).WithHideBySig(true).WithRuntime(true) + let ctor = mkILCtor(access, [ mkILParamNamed("object", ilg.typ_Object); mkILParamNamed("method", ilg.typ_IntPtr) ], MethodBody.Abstract) + let ctor = ctor.WithRuntime(true).WithHideBySig(true) + [ ctor + one "Invoke" parms rty + one "BeginInvoke" (parms @ [mkILParamNamed("callback", iltyp_AsyncCallback); mkILParamNamed("objects", ilg.typ_Object) ] ) iltyp_IAsyncResult + one "EndInvoke" [mkILParamNamed("result", iltyp_IAsyncResult)] rty ] -let mkCtorMethSpecForDelegate (ilg: ILGlobals) (typ:ILType,useUIntPtr) = - let scoref = typ.TypeRef.Scope - mkILInstanceMethSpecInTy (typ,".ctor",[rescopeILType scoref ilg.typ_Object; rescopeILType scoref (if useUIntPtr then ilg.typ_UIntPtr else ilg.typ_IntPtr)],ILType.Void,emptyILGenericArgsList) +let mkCtorMethSpecForDelegate (ilg: ILGlobals) (ty:ILType, useUIntPtr) = + let scoref = ty.TypeRef.Scope + mkILInstanceMethSpecInTy (ty, ".ctor", [rescopeILType scoref ilg.typ_Object; rescopeILType scoref (if useUIntPtr then ilg.typ_UIntPtr else ilg.typ_IntPtr)], ILType.Void, emptyILGenericArgsList) type ILEnumInfo = - { enumValues: (string * ILFieldInit) list; + { enumValues: (string * ILFieldInit) list enumType: ILType } let getTyOfILEnumInfo info = info.enumType -let computeILEnumInfo (mdName,mdFields: ILFieldDefs) = - match (List.partition (fun fd -> fd.IsStatic) mdFields.AsList) with - | staticFields,[vfd] -> - { enumType = vfd.Type; +let computeILEnumInfo (mdName, mdFields: ILFieldDefs) = + match (List.partition (fun (fd:ILFieldDef) -> fd.IsStatic) mdFields.AsList) with + | staticFields, [vfd] -> + { enumType = vfd.FieldType enumValues = staticFields |> List.map (fun fd -> (fd.Name, match fd.LiteralValue with Some i -> i | None -> failwith ("info_of_enum_tdef: badly formed enum "+mdName+": static field does not have an default value"))) } - | _,[] -> failwith ("info_of_enum_tdef: badly formed enum "+mdName+": no non-static field found") - | _,_ -> failwith ("info_of_enum_tdef: badly formed enum "+mdName+": more than one non-static field found") + | _, [] -> failwith ("info_of_enum_tdef: badly formed enum "+mdName+": no non-static field found") + | _, _ -> failwith ("info_of_enum_tdef: badly formed enum "+mdName+": more than one non-static field found") @@ -2841,64 +3279,64 @@ let sigptr_get_byte bytes sigptr = Bytes.get bytes sigptr, sigptr + 1 let sigptr_get_bool bytes sigptr = - let b0,sigptr = sigptr_get_byte bytes sigptr - (b0 = 0x01) ,sigptr + let b0, sigptr = sigptr_get_byte bytes sigptr + (b0 = 0x01) , sigptr let sigptr_get_u8 bytes sigptr = - let b0,sigptr = sigptr_get_byte bytes sigptr - byte b0,sigptr + let b0, sigptr = sigptr_get_byte bytes sigptr + byte b0, sigptr let sigptr_get_i8 bytes sigptr = - let i,sigptr = sigptr_get_u8 bytes sigptr - sbyte i,sigptr + let i, sigptr = sigptr_get_u8 bytes sigptr + sbyte i, sigptr let sigptr_get_u16 bytes sigptr = - let b0,sigptr = sigptr_get_byte bytes sigptr - let b1,sigptr = sigptr_get_byte bytes sigptr - uint16 (b0 ||| (b1 <<< 8)),sigptr + let b0, sigptr = sigptr_get_byte bytes sigptr + let b1, sigptr = sigptr_get_byte bytes sigptr + uint16 (b0 ||| (b1 <<< 8)), sigptr let sigptr_get_i16 bytes sigptr = - let u,sigptr = sigptr_get_u16 bytes sigptr - int16 u,sigptr + let u, sigptr = sigptr_get_u16 bytes sigptr + int16 u, sigptr let sigptr_get_i32 bytes sigptr = - let b0,sigptr = sigptr_get_byte bytes sigptr - let b1,sigptr = sigptr_get_byte bytes sigptr - let b2,sigptr = sigptr_get_byte bytes sigptr - let b3,sigptr = sigptr_get_byte bytes sigptr - b0 ||| (b1 <<< 8) ||| (b2 <<< 16) ||| (b3 <<< 24),sigptr + let b0, sigptr = sigptr_get_byte bytes sigptr + let b1, sigptr = sigptr_get_byte bytes sigptr + let b2, sigptr = sigptr_get_byte bytes sigptr + let b3, sigptr = sigptr_get_byte bytes sigptr + b0 ||| (b1 <<< 8) ||| (b2 <<< 16) ||| (b3 <<< 24), sigptr let sigptr_get_u32 bytes sigptr = - let u,sigptr = sigptr_get_i32 bytes sigptr - uint32 u,sigptr + let u, sigptr = sigptr_get_i32 bytes sigptr + uint32 u, sigptr let sigptr_get_i64 bytes sigptr = - let b0,sigptr = sigptr_get_byte bytes sigptr - let b1,sigptr = sigptr_get_byte bytes sigptr - let b2,sigptr = sigptr_get_byte bytes sigptr - let b3,sigptr = sigptr_get_byte bytes sigptr - let b4,sigptr = sigptr_get_byte bytes sigptr - let b5,sigptr = sigptr_get_byte bytes sigptr - let b6,sigptr = sigptr_get_byte bytes sigptr - let b7,sigptr = sigptr_get_byte bytes sigptr + let b0, sigptr = sigptr_get_byte bytes sigptr + let b1, sigptr = sigptr_get_byte bytes sigptr + let b2, sigptr = sigptr_get_byte bytes sigptr + let b3, sigptr = sigptr_get_byte bytes sigptr + let b4, sigptr = sigptr_get_byte bytes sigptr + let b5, sigptr = sigptr_get_byte bytes sigptr + let b6, sigptr = sigptr_get_byte bytes sigptr + let b7, sigptr = sigptr_get_byte bytes sigptr int64 b0 ||| (int64 b1 <<< 8) ||| (int64 b2 <<< 16) ||| (int64 b3 <<< 24) ||| (int64 b4 <<< 32) ||| (int64 b5 <<< 40) ||| (int64 b6 <<< 48) ||| (int64 b7 <<< 56), sigptr let sigptr_get_u64 bytes sigptr = - let u,sigptr = sigptr_get_i64 bytes sigptr - uint64 u,sigptr + let u, sigptr = sigptr_get_i64 bytes sigptr + uint64 u, sigptr -let float32_of_bits (x:int32) = System.BitConverter.ToSingle(System.BitConverter.GetBytes(x),0) +let float32_of_bits (x:int32) = System.BitConverter.ToSingle(System.BitConverter.GetBytes(x), 0) let float_of_bits (x:int64) = System.BitConverter.Int64BitsToDouble(x) let sigptr_get_ieee32 bytes sigptr = - let u,sigptr = sigptr_get_i32 bytes sigptr - float32_of_bits u,sigptr + let u, sigptr = sigptr_get_i32 bytes sigptr + float32_of_bits u, sigptr let sigptr_get_ieee64 bytes sigptr = - let u,sigptr = sigptr_get_i64 bytes sigptr - float_of_bits u,sigptr + let u, sigptr = sigptr_get_i64 bytes sigptr + float_of_bits u, sigptr let sigptr_get_intarray n (bytes:byte[]) sigptr = let res = Bytes.zeroCreate n @@ -2907,35 +3345,35 @@ let sigptr_get_intarray n (bytes:byte[]) sigptr = res, sigptr + n let sigptr_get_string n bytes sigptr = - let intarray,sigptr = sigptr_get_intarray n bytes sigptr + let intarray, sigptr = sigptr_get_intarray n bytes sigptr System.Text.Encoding.UTF8.GetString(intarray , 0, intarray.Length), sigptr let sigptr_get_z_i32 bytes sigptr = - let b0,sigptr = sigptr_get_byte bytes sigptr + let b0, sigptr = sigptr_get_byte bytes sigptr if b0 <= 0x7F then b0, sigptr elif b0 <= 0xbf then let b0 = b0 &&& 0x7f - let b1,sigptr = sigptr_get_byte bytes sigptr + let b1, sigptr = sigptr_get_byte bytes sigptr (b0 <<< 8) ||| b1, sigptr else let b0 = b0 &&& 0x3f - let b1,sigptr = sigptr_get_byte bytes sigptr - let b2,sigptr = sigptr_get_byte bytes sigptr - let b3,sigptr = sigptr_get_byte bytes sigptr + let b1, sigptr = sigptr_get_byte bytes sigptr + let b2, sigptr = sigptr_get_byte bytes sigptr + let b3, sigptr = sigptr_get_byte bytes sigptr (b0 <<< 24) ||| (b1 <<< 16) ||| (b2 <<< 8) ||| b3, sigptr let sigptr_get_serstring bytes sigptr = - let len,sigptr = sigptr_get_z_i32 bytes sigptr + let len, sigptr = sigptr_get_z_i32 bytes sigptr sigptr_get_string ( len) bytes sigptr let sigptr_get_serstring_possibly_null bytes sigptr = - let b0,new_sigptr = sigptr_get_byte bytes sigptr + let b0, new_sigptr = sigptr_get_byte bytes sigptr if b0 = 0xFF then // null case - None,new_sigptr + None, new_sigptr else // throw away new_sigptr, getting length & text advance - let len,sigptr = sigptr_get_z_i32 bytes sigptr + let len, sigptr = sigptr_get_z_i32 bytes sigptr let s, sigptr = sigptr_get_string len bytes sigptr - Some(s),sigptr + Some(s), sigptr //--------------------------------------------------------------------- // Get the public key token from the public key. @@ -2952,9 +3390,9 @@ let z_unsigned_int_size n = let z_unsigned_int n = if n >= 0 && n <= 0x7F then [| byte n |] elif n >= 0x80 && n <= 0x3FFF then [| byte (0x80 ||| (n >>>& 8)); byte (n &&& 0xFF) |] - else [| byte (0xc0 ||| (n >>>& 24)); - byte ((n >>>& 16) &&& 0xFF); - byte ((n >>>& 8) &&& 0xFF); + else [| byte (0xc0 ||| (n >>>& 24)) + byte ((n >>>& 16) &&& 0xFF) + byte ((n >>>& 8) &&& 0xFF) byte (n &&& 0xFF) |] let string_as_utf8_bytes (s:string) = System.Text.Encoding.UTF8.GetBytes s @@ -2979,7 +3417,7 @@ let i16AsBytes (i:int16) = u16AsBytes (uint16 i) let u32AsBytes (i:uint32) = i32AsBytes (int32 i) let u64AsBytes (i:uint64) = i64AsBytes (int64 i) -let bits_of_float32 (x:float32) = System.BitConverter.ToInt32(System.BitConverter.GetBytes(x),0) +let bits_of_float32 (x:float32) = System.BitConverter.ToInt32(System.BitConverter.GetBytes(x), 0) let bits_of_float (x:float) = System.BitConverter.DoubleToInt64Bits(x) let ieee32AsBytes i = i32AsBytes (bits_of_float32 i) @@ -3017,7 +3455,7 @@ let et_MVAR = 0x1Euy let et_CMOD_REQD = 0x1Fuy let et_CMOD_OPT = 0x20uy -let formatILVersion ((a,b,c,d):ILVersionInfo) = sprintf "%d.%d.%d.%d" (int a) (int b) (int c) (int d) +let formatILVersion ((a, b, c, d):ILVersionInfo) = sprintf "%d.%d.%d.%d" (int a) (int b) (int c) (int d) let encodeCustomAttrString s = let arr = string_as_utf8_bytes s @@ -3040,7 +3478,7 @@ let rec encodeCustomAttrElemType x = | ILType.Boxed tspec when tspec.Name = tname_String -> [| et_STRING |] | ILType.Boxed tspec when tspec.Name = tname_Object -> [| 0x51uy |] | ILType.Boxed tspec when tspec.Name = tname_Type -> [| 0x50uy |] - | ILType.Value tspec -> Array.append [| 0x55uy |] (encodeCustomAttrString tspec.TypeRef.QualifiedNameWithNoShortPrimaryAssembly) + | ILType.Value tspec -> Array.append [| 0x55uy |] (encodeCustomAttrString tspec.TypeRef.QualifiedName) | ILType.Array (shape, elemType) when shape = ILArrayShape.SingleDimensional -> Array.append [| et_SZARRAY |] (encodeCustomAttrElemType elemType) | _ -> failwith "encodeCustomAttrElemType: unrecognized custom element type" @@ -3064,7 +3502,7 @@ let rec encodeCustomAttrElemTypeForObject x = | ILAttribElem.Null _ -> [| et_STRING |]// yes, the 0xe prefix is used when passing a "null" to a property or argument of type "object" here | ILAttribElem.Single _ -> [| et_R4 |] | ILAttribElem.Double _ -> [| et_R8 |] - | ILAttribElem.Array (elemTy,_) -> [| yield et_SZARRAY; yield! encodeCustomAttrElemType elemTy |] + | ILAttribElem.Array (elemTy, _) -> [| yield et_SZARRAY; yield! encodeCustomAttrElemType elemTy |] let rec decodeCustomAttrElemType (ilg: ILGlobals) bytes sigptr x = @@ -3084,8 +3522,8 @@ let rec decodeCustomAttrElemType (ilg: ILGlobals) bytes sigptr x = | x when x = et_STRING -> ilg.typ_String, sigptr | x when x = et_OBJECT -> ilg.typ_Object, sigptr | x when x = et_SZARRAY -> - let et,sigptr = sigptr_get_u8 bytes sigptr - let elemTy,sigptr = decodeCustomAttrElemType ilg bytes sigptr et + let et, sigptr = sigptr_get_u8 bytes sigptr + let elemTy, sigptr = decodeCustomAttrElemType ilg bytes sigptr et mkILArr1DTy elemTy, sigptr | x when x = 0x50uy -> ilg.typ_Type, sigptr | _ -> failwithf "decodeCustomAttrElemType ilg: unrecognized custom element type: %A" x @@ -3111,9 +3549,9 @@ let rec encodeCustomAttrPrimValue ilg c = | ILAttribElem.UInt64 x -> u64AsBytes x | ILAttribElem.Single x -> ieee32AsBytes x | ILAttribElem.Double x -> ieee64AsBytes x - | ILAttribElem.Type (Some ty) -> encodeCustomAttrString ty.QualifiedNameWithNoShortPrimaryAssembly - | ILAttribElem.TypeRef (Some tref) -> encodeCustomAttrString tref.QualifiedNameWithNoShortPrimaryAssembly - | ILAttribElem.Array (_,elems) -> + | ILAttribElem.Type (Some ty) -> encodeCustomAttrString ty.QualifiedName + | ILAttribElem.TypeRef (Some tref) -> encodeCustomAttrString tref.QualifiedName + | ILAttribElem.Array (_, elems) -> [| yield! i32AsBytes elems.Length; for elem in elems do yield! encodeCustomAttrPrimValue ilg elem |] and encodeCustomAttrValue ilg ty c = @@ -3122,38 +3560,38 @@ and encodeCustomAttrValue ilg ty c = [| yield! encodeCustomAttrElemTypeForObject c; yield! encodeCustomAttrPrimValue ilg c |] | ILType.Array (shape, _), ILAttribElem.Null when shape = ILArrayShape.SingleDimensional -> [| yield! i32AsBytes 0xFFFFFFFF |] - | ILType.Array (shape, elemType), ILAttribElem.Array (_,elems) when shape = ILArrayShape.SingleDimensional -> + | ILType.Array (shape, elemType), ILAttribElem.Array (_, elems) when shape = ILArrayShape.SingleDimensional -> [| yield! i32AsBytes elems.Length; for elem in elems do yield! encodeCustomAttrValue ilg elemType elem |] | _ -> encodeCustomAttrPrimValue ilg c let encodeCustomAttrNamedArg ilg (nm, ty, prop, elem) = [| yield (if prop then 0x54uy else 0x53uy) - yield! encodeCustomAttrElemType ty; - yield! encodeCustomAttrString nm; + yield! encodeCustomAttrElemType ty + yield! encodeCustomAttrString nm yield! encodeCustomAttrValue ilg ty elem |] let mkILCustomAttribMethRef (ilg: ILGlobals) (mspec:ILMethodSpec, fixedArgs: list<_>, namedArgs: list<_>) = let argtys = mspec.MethodRef.ArgTypes let args = [| yield! [| 0x01uy; 0x00uy; |] - for (argty,fixedArg) in Seq.zip argtys fixedArgs do + for (argty, fixedArg) in Seq.zip argtys fixedArgs do yield! encodeCustomAttrValue ilg argty fixedArg yield! u16AsBytes (uint16 namedArgs.Length) for namedArg in namedArgs do yield! encodeCustomAttrNamedArg ilg namedArg |] - { Method = mspec; - Data = args; - Elements = fixedArgs @ (namedArgs |> List.map(fun (_,_,_,e) -> e)) } + { Method = mspec + Data = args + Elements = fixedArgs @ (namedArgs |> List.map(fun (_, _, _, e) -> e)) } -let mkILCustomAttribute ilg (tref,argtys,argvs,propvs) = - mkILCustomAttribMethRef ilg (mkILNonGenericCtorMethSpec (tref,argtys),argvs,propvs) +let mkILCustomAttribute ilg (tref, argtys, argvs, propvs) = + mkILCustomAttribMethRef ilg (mkILNonGenericCtorMethSpec (tref, argtys), argvs, propvs) let MscorlibScopeRef = ILScopeRef.Assembly (ILAssemblyRef.Create("mscorlib", None, Some ecmaPublicKey, true, None, None)) let EcmaMscorlibILGlobals = mkILGlobals MscorlibScopeRef -// PermissionSet is a 'blob' having the following format: +// ILSecurityDecl is a 'blob' having the following format: // - A byte containing a period (.). // - A compressed int32 containing the number of attributes encoded in the blob. // - An array of attributes each containing the following: @@ -3161,20 +3599,20 @@ let EcmaMscorlibILGlobals = mkILGlobals MscorlibScopeRef // as a compressed int to indicate the size followed by an array of UTF8 characters.) // - A set of properties, encoded as the named arguments to a custom attribute would be (as // in §23.3, beginning with NumNamed). -let mkPermissionSet (ilg: ILGlobals) (action,attributes: list<(ILTypeRef * (string * ILType * ILAttribElem) list)>) = +let mkPermissionSet (ilg: ILGlobals) (action, attributes: list<(ILTypeRef * (string * ILType * ILAttribElem) list)>) = let bytes = - [| yield (byte '.'); - yield! z_unsigned_int attributes.Length; - for (tref:ILTypeRef,props) in attributes do - yield! encodeCustomAttrString tref.QualifiedNameWithNoShortPrimaryAssembly + [| yield (byte '.') + yield! z_unsigned_int attributes.Length + for (tref:ILTypeRef, props) in attributes do + yield! encodeCustomAttrString tref.QualifiedName let bytes = - [| yield! z_unsigned_int props.Length; - for (nm,typ,value) in props do - yield! encodeCustomAttrNamedArg ilg (nm,typ,true,value)|] - yield! z_unsigned_int bytes.Length; + [| yield! z_unsigned_int props.Length + for (nm, ty, value) in props do + yield! encodeCustomAttrNamedArg ilg (nm, ty, true, value)|] + yield! z_unsigned_int bytes.Length yield! bytes |] - ILPermission.PermissionSet(action,bytes) + ILSecurityDecl.ILSecurityDecl(action, bytes) // Parse an IL type signature argument within a custom attribute blob @@ -3204,12 +3642,12 @@ type ILTypeSigParser(tstring : string) = s // The format we accept is - // "{`[,+]}{}{}" E.g., + // "{`[, +]}{}{}" E.g., // // System.Collections.Generic.Dictionary // `2[ // [System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089], - // dev.virtualearth.net.webservices.v1.search.CategorySpecificPropertySet], + // dev.virtualearth.net.webservices.v1.search.CategorySpecificPropertySet], // mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" // // Note that @@ -3288,7 +3726,7 @@ type ILTypeSigParser(tstring : string) = match specializations with | None -> [] | Some(genericArgs) -> genericArgs - let tspec = ILTypeSpec.Create(tref,genericArgs) + let tspec = ILTypeSpec.Create(tref, genericArgs) let ilty = match tspec.Name with | "System.SByte" @@ -3307,7 +3745,7 @@ type ILTypeSigParser(tstring : string) = // if it's an array, wrap it - otherwise, just return the IL type match rank with - | Some(r) -> ILType.Array(r,ilty) + | Some(r) -> ILType.Array(r, ilty) | _ -> ilty member x.ParseTypeSpec() = @@ -3318,99 +3756,99 @@ type ILTypeSigParser(tstring : string) = let decodeILAttribData (ilg: ILGlobals) (ca: ILAttribute) = let bytes = ca.Data let sigptr = 0 - let bb0,sigptr = sigptr_get_byte bytes sigptr - let bb1,sigptr = sigptr_get_byte bytes sigptr - if not (bb0 = 0x01 && bb1 = 0x00) then failwith "decodeILAttribData: invalid data"; + let bb0, sigptr = sigptr_get_byte bytes sigptr + let bb1, sigptr = sigptr_get_byte bytes sigptr + if not (bb0 = 0x01 && bb1 = 0x00) then failwith "decodeILAttribData: invalid data" let rec parseVal argty sigptr = match argty with | ILType.Value tspec when tspec.Name = "System.SByte" -> - let n,sigptr = sigptr_get_i8 bytes sigptr + let n, sigptr = sigptr_get_i8 bytes sigptr ILAttribElem.SByte n, sigptr | ILType.Value tspec when tspec.Name = "System.Byte" -> - let n,sigptr = sigptr_get_u8 bytes sigptr + let n, sigptr = sigptr_get_u8 bytes sigptr ILAttribElem.Byte n, sigptr | ILType.Value tspec when tspec.Name = "System.Int16" -> - let n,sigptr = sigptr_get_i16 bytes sigptr + let n, sigptr = sigptr_get_i16 bytes sigptr ILAttribElem.Int16 n, sigptr | ILType.Value tspec when tspec.Name = "System.UInt16" -> - let n,sigptr = sigptr_get_u16 bytes sigptr + let n, sigptr = sigptr_get_u16 bytes sigptr ILAttribElem.UInt16 n, sigptr | ILType.Value tspec when tspec.Name = "System.Int32" -> - let n,sigptr = sigptr_get_i32 bytes sigptr + let n, sigptr = sigptr_get_i32 bytes sigptr ILAttribElem.Int32 n, sigptr | ILType.Value tspec when tspec.Name = "System.UInt32" -> - let n,sigptr = sigptr_get_u32 bytes sigptr + let n, sigptr = sigptr_get_u32 bytes sigptr ILAttribElem.UInt32 n, sigptr | ILType.Value tspec when tspec.Name = "System.Int64" -> - let n,sigptr = sigptr_get_i64 bytes sigptr + let n, sigptr = sigptr_get_i64 bytes sigptr ILAttribElem.Int64 n, sigptr | ILType.Value tspec when tspec.Name = "System.UInt64" -> - let n,sigptr = sigptr_get_u64 bytes sigptr + let n, sigptr = sigptr_get_u64 bytes sigptr ILAttribElem.UInt64 n, sigptr | ILType.Value tspec when tspec.Name = "System.Double" -> - let n,sigptr = sigptr_get_ieee64 bytes sigptr + let n, sigptr = sigptr_get_ieee64 bytes sigptr ILAttribElem.Double n, sigptr | ILType.Value tspec when tspec.Name = "System.Single" -> - let n,sigptr = sigptr_get_ieee32 bytes sigptr + let n, sigptr = sigptr_get_ieee32 bytes sigptr ILAttribElem.Single n, sigptr | ILType.Value tspec when tspec.Name = "System.Char" -> - let n,sigptr = sigptr_get_u16 bytes sigptr + let n, sigptr = sigptr_get_u16 bytes sigptr ILAttribElem.Char (char (int32 n)), sigptr | ILType.Value tspec when tspec.Name = "System.Boolean" -> - let n,sigptr = sigptr_get_byte bytes sigptr + let n, sigptr = sigptr_get_byte bytes sigptr ILAttribElem.Bool (not (n = 0)), sigptr | ILType.Boxed tspec when tspec.Name = "System.String" -> - let n,sigptr = sigptr_get_serstring_possibly_null bytes sigptr + let n, sigptr = sigptr_get_serstring_possibly_null bytes sigptr ILAttribElem.String n, sigptr | ILType.Boxed tspec when tspec.Name = "System.Type" -> - let nOpt,sigptr = sigptr_get_serstring_possibly_null bytes sigptr + let nOpt, sigptr = sigptr_get_serstring_possibly_null bytes sigptr match nOpt with | None -> ILAttribElem.TypeRef(None), sigptr | Some n -> try let parser = ILTypeSigParser(n) - parser.ParseTypeSpec(),sigptr + parser.ParseTypeSpec(), sigptr with e -> failwith (sprintf "decodeILAttribData: error parsing type in custom attribute blob: %s" e.Message) | ILType.Boxed tspec when tspec.Name = "System.Object" -> - let et,sigptr = sigptr_get_u8 bytes sigptr + let et, sigptr = sigptr_get_u8 bytes sigptr if et = 0xFFuy then ILAttribElem.Null, sigptr else - let ty,sigptr = decodeCustomAttrElemType ilg bytes sigptr et + let ty, sigptr = decodeCustomAttrElemType ilg bytes sigptr et parseVal ty sigptr - | ILType.Array(shape,elemTy) when shape = ILArrayShape.SingleDimensional -> - let n,sigptr = sigptr_get_i32 bytes sigptr - if n = 0xFFFFFFFF then ILAttribElem.Null,sigptr else + | ILType.Array(shape, elemTy) when shape = ILArrayShape.SingleDimensional -> + let n, sigptr = sigptr_get_i32 bytes sigptr + if n = 0xFFFFFFFF then ILAttribElem.Null, sigptr else let rec parseElems acc n sigptr = if n = 0 then List.rev acc, sigptr else - let v,sigptr = parseVal elemTy sigptr + let v, sigptr = parseVal elemTy sigptr parseElems (v ::acc) (n-1) sigptr let elems, sigptr = parseElems [] n sigptr - ILAttribElem.Array(elemTy,elems), sigptr + ILAttribElem.Array(elemTy, elems), sigptr | ILType.Value _ -> (* assume it is an enumeration *) - let n,sigptr = sigptr_get_i32 bytes sigptr + let n, sigptr = sigptr_get_i32 bytes sigptr ILAttribElem.Int32 n, sigptr | _ -> failwith "decodeILAttribData: attribute data involves an enum or System.Type value" let rec parseFixed argtys sigptr = match argtys with - [] -> [],sigptr + [] -> [], sigptr | h::t -> - let nh,sigptr = parseVal h sigptr - let nt,sigptr = parseFixed t sigptr + let nh, sigptr = parseVal h sigptr + let nt, sigptr = parseFixed t sigptr nh ::nt, sigptr - let fixedArgs,sigptr = parseFixed ca.Method.FormalArgTypes sigptr - let nnamed,sigptr = sigptr_get_u16 bytes sigptr + let fixedArgs, sigptr = parseFixed ca.Method.FormalArgTypes sigptr + let nnamed, sigptr = sigptr_get_u16 bytes sigptr let rec parseNamed acc n sigptr = if n = 0 then List.rev acc else - let isPropByte,sigptr = sigptr_get_u8 bytes sigptr + let isPropByte, sigptr = sigptr_get_u8 bytes sigptr let isProp = (int isPropByte = 0x54) - let et,sigptr = sigptr_get_u8 bytes sigptr + let et, sigptr = sigptr_get_u8 bytes sigptr // We have a named value - let ty,sigptr = + let ty, sigptr = if ( (* 0x50 = (int et) || *) 0x55 = (int et)) then - let qualified_tname,sigptr = sigptr_get_serstring bytes sigptr + let qualified_tname, sigptr = sigptr_get_serstring bytes sigptr let unqualified_tname, rest = let pieces = qualified_tname.Split(',') if pieces.Length > 1 then @@ -3422,16 +3860,16 @@ let decodeILAttribData (ilg: ILGlobals) (ca: ILAttribute) = | Some aname -> ILScopeRef.Assembly(ILAssemblyRef.FromAssemblyName(System.Reflection.AssemblyName(aname))) | None -> ilg.primaryAssemblyScopeRef - let tref = mkILTyRef (scoref,unqualified_tname) + let tref = mkILTyRef (scoref, unqualified_tname) let tspec = mkILNonGenericTySpec tref - ILType.Value(tspec),sigptr + ILType.Value(tspec), sigptr else decodeCustomAttrElemType ilg bytes sigptr et - let nm,sigptr = sigptr_get_serstring bytes sigptr - let v,sigptr = parseVal ty sigptr - parseNamed ((nm,ty,isProp,v) :: acc) (n-1) sigptr + let nm, sigptr = sigptr_get_serstring bytes sigptr + let v, sigptr = parseVal ty sigptr + parseNamed ((nm, ty, isProp, v) :: acc) (n-1) sigptr let named = parseNamed [] (int nnamed) sigptr - fixedArgs,named + fixedArgs, named // -------------------------------------------------------------------- @@ -3441,16 +3879,16 @@ let decodeILAttribData (ilg: ILGlobals) (ca: ILAttribute) = // -------------------------------------------------------------------- type ILReferences = - { AssemblyReferences: ILAssemblyRef list; - ModuleReferences: ILModuleRef list; } + { AssemblyReferences: ILAssemblyRef list + ModuleReferences: ILModuleRef list } type ILReferencesAccumulator = - { refsA: HashSet; - refsM: HashSet; } + { refsA: HashSet + refsM: HashSet } let emptyILRefs = - { AssemblyReferences=[]; - ModuleReferences = []; } + { AssemblyReferences=[] + ModuleReferences = [] } (* Now find references. *) let refs_of_assref (s:ILReferencesAccumulator) x = s.refsA.Add x |> ignore @@ -3467,37 +3905,37 @@ let refs_of_tref s (x:ILTypeRef) = refs_of_scoref s x.Scope let rec refs_of_typ s x = match x with | ILType.Void | ILType.TypeVar _ -> () - | ILType.Modified(_,ty1,ty2) -> refs_of_tref s ty1; refs_of_typ s ty2 - | ILType.Array (_,ty) + | ILType.Modified(_, ty1, ty2) -> refs_of_tref s ty1; refs_of_typ s ty2 + | ILType.Array (_, ty) | ILType.Ptr ty | ILType.Byref ty -> refs_of_typ s ty | ILType.Value tr | ILType.Boxed tr -> refs_of_tspec s tr | ILType.FunctionPointer mref -> refs_of_callsig s mref -and refs_of_inst s i = refs_of_typs s i +and refs_of_inst s i = refs_of_tys s i and refs_of_tspec s (x:ILTypeSpec) = refs_of_tref s x.TypeRef; refs_of_inst s x.GenericArgs -and refs_of_callsig s csig = refs_of_typs s csig.ArgTypes; refs_of_typ s csig.ReturnType -and refs_of_genparam s x = refs_of_typs s x.Constraints +and refs_of_callsig s csig = refs_of_tys s csig.ArgTypes; refs_of_typ s csig.ReturnType +and refs_of_genparam s x = refs_of_tys s x.Constraints and refs_of_genparams s b = List.iter (refs_of_genparam s) b and refs_of_dloc s ts = refs_of_tref s ts and refs_of_mref s (x:ILMethodRef) = - refs_of_dloc s x.EnclosingTypeRef ; - refs_of_typs s x.mrefArgs; + refs_of_dloc s x.DeclaringTypeRef + refs_of_tys s x.mrefArgs refs_of_typ s x.mrefReturn -and refs_of_fref s x = refs_of_tref s x.EnclosingTypeRef; refs_of_typ s x.Type -and refs_of_ospec s (OverridesSpec(mref,ty)) = refs_of_mref s mref; refs_of_typ s ty +and refs_of_fref s x = refs_of_tref s x.DeclaringTypeRef; refs_of_typ s x.Type +and refs_of_ospec s (OverridesSpec(mref, ty)) = refs_of_mref s mref; refs_of_typ s ty and refs_of_mspec s (x: ILMethodSpec) = - refs_of_mref s x.MethodRef; - refs_of_typ s x.EnclosingType; + refs_of_mref s x.MethodRef + refs_of_typ s x.DeclaringType refs_of_inst s x.GenericArgs and refs_of_fspec s x = - refs_of_fref s x.FieldRef; - refs_of_typ s x.EnclosingType + refs_of_fref s x.FieldRef + refs_of_typ s x.DeclaringType -and refs_of_typs s l = List.iter (refs_of_typ s) l +and refs_of_tys s l = List.iter (refs_of_typ s) l and refs_of_token s x = match x with @@ -3508,25 +3946,25 @@ and refs_of_token s x = and refs_of_custom_attr s x = refs_of_mspec s x.Method and refs_of_custom_attrs s (cas : ILAttributes) = List.iter (refs_of_custom_attr s) cas.AsList -and refs_of_varargs s tyso = Option.iter (refs_of_typs s) tyso +and refs_of_varargs s tyso = Option.iter (refs_of_tys s) tyso and refs_of_instr s x = match x with - | I_call (_,mr,varargs) | I_newobj (mr,varargs) | I_callvirt (_,mr,varargs) -> - refs_of_mspec s mr; + | I_call (_, mr, varargs) | I_newobj (mr, varargs) | I_callvirt (_, mr, varargs) -> + refs_of_mspec s mr refs_of_varargs s varargs - | I_callconstraint (_,tr,mr,varargs) -> - refs_of_typ s tr; - refs_of_mspec s mr; + | I_callconstraint (_, tr, mr, varargs) -> + refs_of_typ s tr + refs_of_mspec s mr refs_of_varargs s varargs - | I_calli (_,callsig,varargs) -> + | I_calli (_, callsig, varargs) -> refs_of_callsig s callsig; refs_of_varargs s varargs | I_jmp mr | I_ldftn mr | I_ldvirtftn mr -> refs_of_mspec s mr - | I_ldsfld (_,fr) | I_ldfld (_,_,fr) | I_ldsflda fr | I_ldflda fr | I_stsfld (_,fr) | I_stfld (_,_,fr) -> + | I_ldsfld (_, fr) | I_ldfld (_, _, fr) | I_ldsflda fr | I_ldflda fr | I_stsfld (_, fr) | I_stfld (_, _, fr) -> refs_of_fspec s fr - | I_isinst ty | I_castclass ty | I_cpobj ty | I_initobj ty | I_ldobj (_,_,ty) - | I_stobj (_,_,ty) | I_box ty |I_unbox ty | I_unbox_any ty | I_sizeof ty - | I_ldelem_any (_,ty) | I_ldelema (_,_,_,ty) |I_stelem_any (_,ty) | I_newarr (_,ty) + | I_isinst ty | I_castclass ty | I_cpobj ty | I_initobj ty | I_ldobj (_, _, ty) + | I_stobj (_, _, ty) | I_box ty |I_unbox ty | I_unbox_any ty | I_sizeof ty + | I_ldelem_any (_, ty) | I_ldelema (_, _, _, ty) |I_stelem_any (_, ty) | I_newarr (_, ty) | I_mkrefany ty | I_refanyval ty | EI_ilzero ty -> refs_of_typ s ty | I_ldtoken token -> refs_of_token s token @@ -3561,11 +3999,11 @@ and refs_of_mbody s x = | MethodBody.PInvoke (attr) -> refs_of_modref s attr.Where | _ -> () -and refs_of_mdef s md = - List.iter (refs_of_param s) md.Parameters; - refs_of_return s md.Return; - refs_of_mbody s md.mdBody.Contents; - refs_of_custom_attrs s md.CustomAttrs; +and refs_of_mdef s (md: ILMethodDef) = + List.iter (refs_of_param s) md.Parameters + refs_of_return s md.Return + refs_of_mbody s md.Body.Contents + refs_of_custom_attrs s md.CustomAttrs refs_of_genparams s md.GenericParams and refs_of_param s p = refs_of_typ s p.Type @@ -3573,26 +4011,26 @@ and refs_of_return s (rt:ILReturn) = refs_of_typ s rt.Type and refs_of_mdefs s x = Seq.iter (refs_of_mdef s) x and refs_of_event_def s (ed: ILEventDef) = - Option.iter (refs_of_typ s) ed.Type ; - refs_of_mref s ed.AddMethod ; - refs_of_mref s ed.RemoveMethod; - Option.iter (refs_of_mref s) ed.FireMethod ; - List.iter (refs_of_mref s) ed.OtherMethods ; - refs_of_custom_attrs s ed.CustomAttrs + Option.iter (refs_of_typ s) ed.EventType + refs_of_mref s ed.AddMethod + refs_of_mref s ed.RemoveMethod + Option.iter (refs_of_mref s) ed.FireMethod + List.iter (refs_of_mref s) ed.OtherMethods + refs_of_custom_attrs s ed.CustomAttrs and refs_of_events s (x: ILEventDefs) = List.iter (refs_of_event_def s) x.AsList -and refs_of_property_def s pd = - Option.iter (refs_of_mref s) pd.SetMethod ; - Option.iter (refs_of_mref s) pd.GetMethod ; - refs_of_typ s pd.Type ; - refs_of_typs s pd.Args ; - refs_of_custom_attrs s pd.CustomAttrs +and refs_of_property_def s (pd: ILPropertyDef) = + Option.iter (refs_of_mref s) pd.SetMethod + Option.iter (refs_of_mref s) pd.GetMethod + refs_of_typ s pd.PropertyType + refs_of_tys s pd.Args + refs_of_custom_attrs s pd.CustomAttrs and refs_of_properties s (x: ILPropertyDefs) = List.iter (refs_of_property_def s) x.AsList -and refs_of_fdef s fd = - refs_of_typ s fd.Type; +and refs_of_fdef s (fd: ILFieldDef) = + refs_of_typ s fd.FieldType refs_of_custom_attrs s fd.CustomAttrs and refs_of_fields s fields = List.iter (refs_of_fdef s) fields @@ -3600,22 +4038,22 @@ and refs_of_fields s fields = List.iter (refs_of_fdef s) fields and refs_of_method_impls s mimpls = List.iter (refs_of_method_impl s) mimpls and refs_of_method_impl s m = - refs_of_ospec s m.Overrides; + refs_of_ospec s m.Overrides refs_of_mspec s m.OverrideBy and refs_of_tdef_kind _s _k = () and refs_of_tdef s (td : ILTypeDef) = - refs_of_types s td.NestedTypes; - refs_of_genparams s td.GenericParams; - refs_of_typs s td.Implements; - Option.iter (refs_of_typ s) td.Extends; - refs_of_mdefs s td.Methods; - refs_of_fields s td.Fields.AsList; - refs_of_method_impls s td.MethodImpls.AsList; - refs_of_events s td.Events; - refs_of_tdef_kind s td.tdKind; - refs_of_custom_attrs s td.CustomAttrs; + refs_of_types s td.NestedTypes + refs_of_genparams s td.GenericParams + refs_of_tys s td.Implements + Option.iter (refs_of_typ s) td.Extends + refs_of_mdefs s td.Methods + refs_of_fields s td.Fields.AsList + refs_of_method_impls s td.MethodImpls.AsList + refs_of_events s td.Events + refs_of_tdef_kind s td + refs_of_custom_attrs s td.CustomAttrs refs_of_properties s td.Properties and refs_of_string _s _ = () @@ -3628,23 +4066,24 @@ and refs_of_exported_types s (tab: ILExportedTypesAndForwarders) = List.iter (re and refs_of_resource_where s x = match x with - | ILResourceLocation.Local _ -> () - | ILResourceLocation.File (mref,_) -> refs_of_modref s mref + | ILResourceLocation.LocalIn _ -> () + | ILResourceLocation.LocalOut _ -> () + | ILResourceLocation.File (mref, _) -> refs_of_modref s mref | ILResourceLocation.Assembly aref -> refs_of_assref s aref and refs_of_resource s x = - refs_of_resource_where s x.Location; + refs_of_resource_where s x.Location refs_of_custom_attrs s x.CustomAttrs and refs_of_resources s (tab: ILResources) = List.iter (refs_of_resource s) tab.AsList and refs_of_modul s m = - refs_of_types s m.TypeDefs; - refs_of_resources s m.Resources; + refs_of_types s m.TypeDefs + refs_of_resources s m.Resources Option.iter (refs_of_manifest s) m.Manifest -and refs_of_manifest s m = - refs_of_custom_attrs s m.CustomAttrs; +and refs_of_manifest s (m: ILAssemblyManifest) = + refs_of_custom_attrs s m.CustomAttrs refs_of_exported_types s m.ExportedTypes let computeILRefs modul = @@ -3652,11 +4091,11 @@ let computeILRefs modul = { refsA = HashSet<_>(HashIdentity.Structural) refsM = HashSet<_>(HashIdentity.Structural) } - refs_of_modul s modul; + refs_of_modul s modul { AssemblyReferences = Seq.fold (fun acc x -> x::acc) [] s.refsA ModuleReferences = Seq.fold (fun acc x -> x::acc) [] s.refsM } -let tspan = System.TimeSpan(System.DateTime.UtcNow.Ticks - System.DateTime(2000,1,1).Ticks) +let tspan = System.TimeSpan(System.DateTime.UtcNow.Ticks - System.DateTime(2000, 1, 1).Ticks) let parseILVersion (vstr : string) = // matches "v1.2.3.4" or "1.2.3.4". Note, if numbers are missing, returns -1 (not 0). @@ -3673,22 +4112,22 @@ let parseILVersion (vstr : string) = failwith "Invalid version format" else // set the build number to the number of days since Jan 1, 2000 - versionComponents.[2] <- defaultBuild.ToString() ; + versionComponents.[2] <- defaultBuild.ToString() // Set the revision number to number of seconds today / 2 - vstr <- System.String.Join(".",versionComponents) + "." + defaultRevision.ToString() ; + vstr <- System.String.Join(".", versionComponents) + "." + defaultRevision.ToString() elif versionComponents.Length > 3 && versionComponents.[3] = "*" then // Set the revision number to number of seconds today / 2 - versionComponents.[3] <- defaultRevision.ToString() ; - vstr <- System.String.Join(".",versionComponents) ; + versionComponents.[3] <- defaultRevision.ToString() + vstr <- System.String.Join(".", versionComponents) let version = System.Version(vstr) let zero32 n = if n < 0 then 0us else uint16(n) // since the minor revision will be -1 if none is specified, we need to truncate to 0 to not break existing code let minorRevision = if version.Revision = -1 then 0us else uint16(version.MinorRevision) - (zero32 version.Major, zero32 version.Minor, zero32 version.Build, minorRevision);; + (zero32 version.Major, zero32 version.Minor, zero32 version.Build, minorRevision) -let compareILVersions (a1,a2,a3,a4) ((b1,b2,b3,b4) : ILVersionInfo) = +let compareILVersions (a1, a2, a3, a4) ((b1, b2, b3, b4) : ILVersionInfo) = let c = compare a1 b1 if c <> 0 then c else let c = compare a2 b2 @@ -3699,7 +4138,7 @@ let compareILVersions (a1,a2,a3,a4) ((b1,b2,b3,b4) : ILVersionInfo) = if c <> 0 then c else 0 -let unscopeILTypeRef (x: ILTypeRef) = ILTypeRef.Create(ILScopeRef.Local,x.Enclosing,x.Name) +let unscopeILTypeRef (x: ILTypeRef) = ILTypeRef.Create(ILScopeRef.Local, x.Enclosing, x.Name) let rec unscopeILTypeSpec (tspec:ILTypeSpec) = let tref = tspec.TypeRef @@ -3707,15 +4146,15 @@ let rec unscopeILTypeSpec (tspec:ILTypeSpec) = let tref = unscopeILTypeRef tref ILTypeSpec.Create (tref, unscopeILTypes tinst) -and unscopeILType typ = - match typ with +and unscopeILType ty = + match ty with | ILType.Ptr t -> ILType.Ptr (unscopeILType t) | ILType.FunctionPointer t -> ILType.FunctionPointer (unscopeILCallSig t) | ILType.Byref t -> ILType.Byref (unscopeILType t) | ILType.Boxed cr -> mkILBoxedType (unscopeILTypeSpec cr) - | ILType.Array (s,ty) -> ILType.Array (s,unscopeILType ty) + | ILType.Array (s, ty) -> ILType.Array (s, unscopeILType ty) | ILType.Value cr -> ILType.Value (unscopeILTypeSpec cr) - | ILType.Modified(b,tref,ty) -> ILType.Modified(b,unscopeILTypeRef tref, unscopeILType ty) + | ILType.Modified(b, tref, ty) -> ILType.Modified(b, unscopeILTypeRef tref, unscopeILType ty) | x -> x and unscopeILTypes i = @@ -3723,13 +4162,13 @@ and unscopeILTypes i = else List.map unscopeILType i and unscopeILCallSig csig = - mkILCallSig (csig.CallingConv,unscopeILTypes csig.ArgTypes,unscopeILType csig.ReturnType) + mkILCallSig (csig.CallingConv, unscopeILTypes csig.ArgTypes, unscopeILType csig.ReturnType) -let resolveILMethodRefWithRescope r td (mref:ILMethodRef) = +let resolveILMethodRefWithRescope r (td: ILTypeDef) (mref:ILMethodRef) = let args = mref.ArgTypes let nargs = args.Length let nm = mref.Name - let possibles = td.Methods.FindByNameAndArity (nm,nargs) + let possibles = td.Methods.FindByNameAndArity (nm, nargs) if isNil possibles then failwith ("no method named " + nm + " found in type " + td.Name) let argTypes = mref.ArgTypes |> List.map r let retType : ILType = r mref.ReturnType @@ -3737,7 +4176,7 @@ let resolveILMethodRefWithRescope r td (mref:ILMethodRef) = possibles |> List.filter (fun md -> mref.CallingConv = md.CallingConv && // REVIEW: this uses equality on ILType. For CMOD_OPTIONAL this is not going to be correct - (md.Parameters,argTypes) ||> List.lengthsEqAndForall2 (fun p1 p2 -> r p1.Type = p2) && + (md.Parameters, argTypes) ||> List.lengthsEqAndForall2 (fun p1 p2 -> r p1.Type = p2) && // REVIEW: this uses equality on ILType. For CMOD_OPTIONAL this is not going to be correct r md.Return.Type = retType) with | [] -> failwith ("no method named "+nm+" with appropriate argument types found in type "+td.Name) @@ -3749,31 +4188,14 @@ let resolveILMethodRef td mref = resolveILMethodRefWithRescope id td mref let mkRefToILModule m = ILModuleRef.Create(m.Name, true, None) - -let ungenericizeTypeName n = - let sym = '`' - if - String.contains n sym && - (* check what comes after the symbol is a number *) - (let m = String.rindex n sym - let res = ref (m < n.Length - 1) - for i = m + 1 to n.Length - 1 do - res := !res && n.[i] >= '0' && n.[i] <= '9'; - !res) - then - let pos = String.rindex n sym - String.sub n 0 pos - else n - - type ILEventRef = { erA: ILTypeRef; erB: string } - static member Create(a,b) = {erA=a;erB=b} - member x.EnclosingTypeRef = x.erA + static member Create(a, b) = {erA=a;erB=b} + member x.DeclaringTypeRef = x.erA member x.Name = x.erB type ILPropertyRef = { prA: ILTypeRef; prB: string } - static member Create (a,b) = {prA=a;prB=b} - member x.EnclosingTypeRef = x.prA + static member Create (a, b) = {prA=a;prB=b} + member x.DeclaringTypeRef = x.prA member x.Name = x.prB diff --git a/src/absil/il.fsi b/src/absil/il.fsi index a4621052292..3362f53d619 100644 --- a/src/absil/il.fsi +++ b/src/absil/il.fsi @@ -1,15 +1,10 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -/// The "unlinked" view of .NET metadata and code. Central to -/// to Abstract IL library -#if COMPILER_PUBLIC_API +/// The "unlinked" view of .NET metadata and code. Central to the Abstract IL library module public Microsoft.FSharp.Compiler.AbstractIL.IL -#else -module internal Microsoft.FSharp.Compiler.AbstractIL.IL -#endif -open Internal.Utilities open System.Collections.Generic +open System.Reflection [] type PrimaryAssembly = @@ -19,49 +14,7 @@ type PrimaryAssembly = member Name: string -// ==================================================================== -// .NET binaries can be converted to the data structures below by using -// the functions in the "Ilread" module. -// -// Constituent types are listed in ascending order of complexity, -// all the way up to the type ILModuleDef, representing the read of an IL -// assembly (.dll or .exe), or part of a multi-module assembly. Types are -// often specified via a concrete representation for the type (e.g. a record), -// though some types are abstract. -// -// The second part of the file (after the definition of all the types) -// specifies a large set of utilities for building objects belonging to -// the types. You will only need to become familiar with these if you -// are transforming code or writing a code-generating compiler. -// -// Several other utilities are also defined in this file: -// 1. A code builder for turning linear sequences of instructions -// augmented with exception tables into the more structured -// format used for code. -// -// 2. The "typ_XYZ", "tspec_XYZ" and "mspec_XYZ" values which -// can be used to reference types in the "primary assembly (either System.Runtime or mscorlib)" assembly. -// -// 3. The "rescopeXYZ" functions which can be used to lift a piece of -// metadata from one assembly and transform it to a piece of metadata -// suitable for use from another assembly. The transformation adjusts -// references in the metadata to take into account the assembly -// where the metadata will now be located. -// -// 4. The "instantiateXYZ" utilities to replace type variables -// by types. These are associated with generics. -// -// 5. The "intern_XYZ" tables for reducing the memory used by -// generated constructs. -// -// 6. The "refs_of_XYZ" utilities for finding all the assemblies -// referenced by a module. -// -// 7. A somewhat obscure facility to allow new instructions and types -// to be added to the This is only used by ILX. -// ==================================================================== - -// Guids (Note: consider adjusting these to the System.Guid type) +/// Represents guids type ILGuid = byte[] [] @@ -74,7 +27,7 @@ type ILPlatform = /// points and some other locations. [] type ILSourceDocument = - static member Create : language: ILGuid option * vendor: ILGuid option * documentType: ILGuid option * file: string -> ILSourceDocument + static member Create: language: ILGuid option * vendor: ILGuid option * documentType: ILGuid option * file: string -> ILSourceDocument member Language: ILGuid option member Vendor: ILGuid option member DocumentType: ILGuid option @@ -83,7 +36,7 @@ type ILSourceDocument = [] type ILSourceMarker = - static member Create : document: ILSourceDocument * line: int * column: int * endLine:int * endColumn: int-> ILSourceMarker + static member Create: document: ILSourceDocument * line: int * column: int * endLine:int * endColumn: int-> ILSourceMarker member Document: ILSourceDocument member Line: int member Column: int @@ -104,89 +57,31 @@ type ILVersionInfo = uint16 * uint16 * uint16 * uint16 [] type ILAssemblyRef = - static member Create : name: string * hash: byte[] option * publicKey: PublicKey option * retargetable: bool * version: ILVersionInfo option * locale: string option -> ILAssemblyRef - static member FromAssemblyName : System.Reflection.AssemblyName -> ILAssemblyRef - member Name: string; + static member Create: name: string * hash: byte[] option * publicKey: PublicKey option * retargetable: bool * version: ILVersionInfo option * locale: string option -> ILAssemblyRef + static member FromAssemblyName: System.Reflection.AssemblyName -> ILAssemblyRef + member Name: string + /// The fully qualified name of the assembly reference, e.g. mscorlib, Version=1.0.3705 etc. - member QualifiedName: string; - member Hash: byte[] option; - member PublicKey: PublicKey option; + member QualifiedName: string + member Hash: byte[] option + member PublicKey: PublicKey option + /// CLI says this indicates if the assembly can be retargeted (at runtime) to be from a different publisher. - member Retargetable: bool; - member Version: ILVersionInfo option; + member Retargetable: bool + member Version: ILVersionInfo option member Locale: string option interface System.IComparable [] type ILModuleRef = - static member Create : name: string * hasMetadata: bool * hash: byte[] option -> ILModuleRef + static member Create: name: string * hasMetadata: bool * hash: byte[] option -> ILModuleRef member Name: string member HasMetadata: bool member Hash: byte[] option interface System.IComparable // Scope references -// -// Scope references are the bits of metadata attached to type names -// that indicate where a type can be found. CIL has three -// kinds: local, module and assembly references: -// o Local: the type must reside in the same module as the scope reference -// o Module: the type must reside in the indicated module in the same -// assembly as the scope reference -// o Assembly: The type must reside in the indicated assembly. -// These have no implicit context. Assembly references can end up -// binding to the assembly containing the reference, i.e. -// may be self or mutually referential. -// -// Assembly reference may also resolve to type in an -// auxiliary module of an assembly when the assembly -// has an "exported types" (here called "classes elsewhere") table. -// -// We represent these references by values embedded within type -// references. These values are usually "shared" across the data -// structures for a module, i.e. one such value is created for each -// assembly or module reference, and this value is reused within each -// type object. -// -// Note that as with method references the term structure is not -// _linked_, i.e. a "ILScopeRef" is still a _reference_ to a scope, -// not the scope itself. Because the structure is not linked, -// the Abstract IL toolset does not require -// strongly connected inputs: you can manipulate an assembly -// without loading all its dependent assemblies. This is the primary -// difference between Abstract IL and Reflection, and it can be both -// a blessing and a curse depending on the kind of manipulation you -// wish to perform. -// -// Similarly, you can manipulate individual modules within -// an assembly without having the whole assembly loaded. (But note that -// most assemblies are single-module in any case). -// -// [ILScopeRef]'s _cannot_ be compared for equality in the way that -// might be expected, in these sense that two ILScopeRef's may -// resolve to the same assembly/module even though they are not equal. -// -// Aside: People have suggested normalizing all scope references -// so that this would be possible, and early versions of this -// toolkit did this. However, this meant that in order to load -// each module you had to tell the toolkit which assembly it belonged to. -// Furthermore, you had to know the exact resolved details of -// each assembly the module refers to. This is -// effectively like having a "fully-linked" view of the graph -// of assemblies, like that provided in the Ilbind module. This is really problematic for compile-time tools, -// as, for example, the policy for linking at the runtime-machine -// may actually alter the results of linking. If such compile-time -// assumptions are to be made then the tool built on top -// of the toolkit rather than the toolkit itself should -// make them. -// -// Scope references, type references, field references and method references -// can be "bound" to particular assemblies using the functions in "Ilbind". -// This simulates the resolution/binding process performed by a Common Language -// Runtime during execution. Various tests and derived operations -// can then be performed on the results of binding. -[] -[] +[] type ILScopeRef = /// A reference to the type in the current module | Local @@ -231,29 +126,31 @@ type ILThisConvention = [] type ILCallingConv = | Callconv of ILThisConvention * ILArgConvention - member IsInstance : bool - member IsInstanceExplicit : bool - member IsStatic : bool - member ThisConv : ILThisConvention - member BasicConv : ILArgConvention - static member Instance : ILCallingConv - static member Static : ILCallingConv - -/// Array shapes. For most purposes, including verification, the -/// rank is the only thing that matters. - + + member IsInstance: bool + member IsInstanceExplicit: bool + member IsStatic: bool + member ThisConv: ILThisConvention + member BasicConv: ILArgConvention + + static member Instance: ILCallingConv + static member Static : ILCallingConv + +/// Array shapes. For most purposes the rank is the only thing that matters. type ILArrayBound = int32 option + +/// Lower-bound/size pairs type ILArrayBounds = ILArrayBound * ILArrayBound -[] type ILArrayShape = - | ILArrayShape of ILArrayBounds list // lobound/size pairs - member Rank : int + | ILArrayShape of ILArrayBounds list + + member Rank: int + /// Bounds for a single dimensional, zero based array static member SingleDimensional: ILArrayShape - static member FromRank : int -> ILArrayShape + static member FromRank: int -> ILArrayShape -[] type ILBoxity = | AsObject | AsValue @@ -268,7 +165,7 @@ type ILGenericVariance = type ILTypeRef = /// Create a ILTypeRef. - static member Create : scope: ILScopeRef * enclosing: string list * name: string -> ILTypeRef + static member Create: scope: ILScopeRef * enclosing: string list * name: string -> ILTypeRef /// Where is the type, i.e. is it in this module, in another module in this assembly or in another assembly? member Scope: ILScopeRef @@ -283,59 +180,66 @@ type ILTypeRef = member FullName: string /// The name of the type in the assembly using the '+' notation for nested types. - member BasicQualifiedName : string + member BasicQualifiedName: string member QualifiedName: string -#if !NO_EXTENSIONTYPING - member QualifiedNameWithNoShortPrimaryAssembly: string -#endif - interface System.IComparable /// Type specs and types. -/// -/// These are the types that appear syntactically in .NET binaries. -/// -/// Generic type definitions must be combined with -/// an instantiation to form a type. Throughout this file, -/// a "ref" refers to something that is uninstantiated, and -/// a "spec" to a ref that is combined with the relevant instantiations. - [] type ILTypeSpec = - static member Create : typeRef:ILTypeRef * instantiation:ILGenericArgs -> ILTypeSpec + /// Create an ILTypeSpec. + static member Create: typeRef:ILTypeRef * instantiation:ILGenericArgs -> ILTypeSpec /// Which type is being referred to? member TypeRef: ILTypeRef /// The type instantiation if the type is generic, otherwise empty member GenericArgs: ILGenericArgs + + /// Where is the type, i.e. is it in this module, in another module in this assembly or in another assembly? member Scope: ILScopeRef + + /// The list of enclosing type names for a nested type. If non-nil then the first of these also contains the namespace. member Enclosing: string list + + /// The name of the type. This also contains the namespace if Enclosing is empty. member Name: string + + /// The name of the type in the assembly using the '.' notation for nested types. member FullName: string + interface System.IComparable and [] ILType = + /// Used only in return and pointer types. | Void + /// Array types | Array of ILArrayShape * ILType + /// Unboxed types, including builtin types. | Value of ILTypeSpec + /// Reference types. Also may be used for parents of members even if for members in value types. | Boxed of ILTypeSpec + /// Unmanaged pointers. Nb. the type is used by tools and for binding only, not by the verifier. | Ptr of ILType + /// Managed pointers. | Byref of ILType + /// ILCode pointers. | FunctionPointer of ILCallingSignature + /// Reference a generic arg. | TypeVar of uint16 + /// Custom modifiers. | Modified of /// True if modifier is "required". @@ -344,96 +248,106 @@ and ILTypeRef * /// The type being modified. ILType - member TypeSpec : ILTypeSpec - member Boxity : ILBoxity - member TypeRef : ILTypeRef - member IsNominal : bool - member GenericArgs : ILGenericArgs - member IsTyvar : bool - member BasicQualifiedName : string - member QualifiedNameWithNoShortPrimaryAssembly : string + + member TypeSpec: ILTypeSpec + + member Boxity: ILBoxity + + member TypeRef: ILTypeRef + + member IsNominal: bool + + member GenericArgs: ILGenericArgs + + member IsTyvar: bool + + member BasicQualifiedName: string + + member QualifiedName: string and [] ILCallingSignature = - { CallingConv: ILCallingConv; - ArgTypes: ILTypes; + { CallingConv: ILCallingConv + ArgTypes: ILTypes ReturnType: ILType } /// Actual generic parameters are always types. +and ILGenericArgs = ILType list +and ILTypes = ILType list -and ILGenericArgs = list -and ILTypes = list - -/// Formal identities of methods. Method refs refer to methods on -/// named types. In general you should work with ILMethodSpec objects -/// rather than MethodRef objects, because ILMethodSpec objects carry -/// information about how generic methods are instantiated. MethodRef -/// objects are only used at a few places in the Abstract IL syntax -/// and if analyzing or generating IL you will be unlikely to come across -/// these. - +/// Formal identities of methods. [] type ILMethodRef = - static member Create : enclosingTypeRef: ILTypeRef * callingConv: ILCallingConv * name: string * genericArity: int * argTypes: ILTypes * returnType: ILType -> ILMethodRef - member EnclosingTypeRef: ILTypeRef + + /// Functional creation + static member Create: enclosingTypeRef: ILTypeRef * callingConv: ILCallingConv * name: string * genericArity: int * argTypes: ILTypes * returnType: ILType -> ILMethodRef + + member DeclaringTypeRef: ILTypeRef + member CallingConv: ILCallingConv + member Name: string + member GenericArity: int + member ArgCount: int + member ArgTypes: ILTypes + member ReturnType: ILType + member CallingSignature: ILCallingSignature + interface System.IComparable -/// Formal identities of fields. - +/// Formal identities of fields. [] type ILFieldRef = - { EnclosingTypeRef: ILTypeRef; - Name: string; + { DeclaringTypeRef: ILTypeRef + Name: string Type: ILType } /// The information at the callsite of a method -// -// A ILMethodSpec is everything given at the callsite (apart from whether the call is a tailcall and whether it is passing -// varargs - see the instruction set below). It is made up of: -// 1) a (possibly generic) ILMethodRef -// 2) a "usage type" that indicates the how the type containing the declaration is being used (as -// a value class, a boxed value class, an instantiated generic class or whatever - see below) -// 3) an instantiation in the case where the method is generic. -// -// In this unbound form of the metadata, the enclosing type may be ILType.Boxed even when the member is a member of a value type or -// enumeration. This is because the binary format of the metadata does not carry enough information in a MemberRefParent to determine -// from the binary alone whether the enclosing type is a value type or not. - [] type ILMethodSpec = - static member Create : ILType * ILMethodRef * ILGenericArgs -> ILMethodSpec + + /// Functional creation + static member Create: ILType * ILMethodRef * ILGenericArgs -> ILMethodSpec + member MethodRef: ILMethodRef - member EnclosingType: ILType + + member DeclaringType: ILType + member GenericArgs: ILGenericArgs + member CallingConv: ILCallingConv + member GenericArity: int + member Name: string + member FormalArgTypes: ILTypes + member FormalReturnType: ILType + interface System.IComparable - /// Field specs. The data given for a ldfld, stfld etc. instruction. [] type ILFieldSpec = - { FieldRef: ILFieldRef; - EnclosingType: ILType } - member EnclosingTypeRef: ILTypeRef + { FieldRef: ILFieldRef + DeclaringType: ILType } + + member DeclaringTypeRef: ILTypeRef + member Name: string + member FormalType: ILType - member ActualType : ILType -/// ILCode labels. In structured code each code label -/// refers to a basic block somewhere in the code of the method. + member ActualType: ILType +/// ILCode labels. In structured code each code label refers to a basic block somewhere in the code of the method. type ILCodeLabel = int [] @@ -502,15 +416,8 @@ type ILComparisonInstr = | BI_brtrue /// The instruction set. -/// -/// In general we don't categorize instructions, as different -/// instruction groups are relevant for different types of operations. -/// However we do collect the branch and compare instructions together -/// because they all take an address, and the ILArithInstr ones because -/// none of them take any direct arguments. [] type ILInstr = - // Basic | AI_add | AI_add_ovf | AI_add_ovf_un @@ -639,16 +546,15 @@ type ILInstr = // Varargs - C++ only | I_arglist - // Local aggregates, i.e. stack allocated data (alloca) : C++ only + // Local aggregates, i.e. stack allocated data (alloca): C++ only | I_localloc | I_cpblk of ILAlignment * ILVolatility | I_initblk of ILAlignment * ILVolatility - // EXTENSIONS, e.g. MS-ILX + // EXTENSIONS | EI_ilzero of ILType | EI_ldlen_multi of int32 * int32 - [] type ILExceptionClause = | Finally of (ILCodeLabel * ILCodeLabel) @@ -658,7 +564,7 @@ type ILExceptionClause = [] type ILExceptionSpec = - { Range: (ILCodeLabel * ILCodeLabel); + { Range: (ILCodeLabel * ILCodeLabel) Clause: ILExceptionClause } /// Indicates that a particular local variable has a particular source @@ -666,8 +572,8 @@ type ILExceptionSpec = /// variable numbering, which is global over the whole method. [] type ILLocalDebugMapping = - { LocalIndex: int; - LocalName: string; } + { LocalIndex: int + LocalName: string } [] type ILLocalDebugInfo = @@ -682,7 +588,6 @@ type ILCode = Locals: ILLocalDebugInfo list } /// Field Init - [] type ILFieldInit = | String of string @@ -749,7 +654,6 @@ type ILNativeVariant = /// Native Types, for marshalling to the native C interface. /// These are taken directly from the ILASM syntax, see ECMA Spec (Partition II, 7.4). - [] type ILNativeType = | Empty @@ -760,6 +664,7 @@ type ILNativeType = | LPSTR | LPWSTR | LPTSTR + | LPUTF8STR | ByValStr | TBSTR | LPSTRUCT @@ -776,7 +681,8 @@ type ILNativeType = | UInt16 | UInt32 | UInt64 - | Array of ILNativeType option * (int32 * int32 option) option (* optional idx of parameter giving size plus optional additive i.e. num elems *) + /// optional idx of parameter giving size plus optional additive i.e. num elems + | Array of ILNativeType option * (int32 * int32 option) option | Int | UInt | Method @@ -790,12 +696,11 @@ type ILNativeType = | ANSIBSTR | VariantBool - /// Local variables [] type ILLocal = - { Type: ILType; - IsPinned: bool; + { Type: ILType + IsPinned: bool DebugInfo: (string * int * int) option } type ILLocals = list @@ -803,13 +708,12 @@ type ILLocals = list /// IL method bodies [] type ILMethodBody = - { IsZeroInit: bool; - /// strictly speaking should be a uint16 - MaxStack: int32; - NoInlining: bool; - AggressiveInlining: bool; - Locals: ILLocals; - Code: ILCode; + { IsZeroInit: bool + MaxStack: int32 + NoInlining: bool + AggressiveInlining: bool + Locals: ILLocals + Code: ILCode SourceMarker: ILSourceMarker option } /// Member Access @@ -851,42 +755,50 @@ type ILAttributeNamedArg = string * ILType * bool * ILAttribElem /// Custom attributes. See 'decodeILAttribData' for a helper to parse the byte[] /// to ILAttribElem's as best as possible. type ILAttribute = - { Method: ILMethodSpec; + { Method: ILMethodSpec Data: byte[] Elements: ILAttribElem list} -[] +[] type ILAttributes = - member AsArray : ILAttribute [] - member AsList : ILAttribute list + member AsArray: ILAttribute [] + member AsList: ILAttribute list -/// Method parameters and return values. +/// Represents the efficiency-oriented storage of ILAttributes in another item. +[] +type ILAttributesStored +/// Method parameters and return values. [] type ILParameter = - { Name: string option; - Type: ILType; - Default: ILFieldInit option; + { Name: string option + Type: ILType + Default: ILFieldInit option /// Marshalling map for parameters. COM Interop only. - Marshal: ILNativeType option; - IsIn: bool; - IsOut: bool; - IsOptional: bool; - CustomAttrs: ILAttributes } + Marshal: ILNativeType option + IsIn: bool + IsOut: bool + IsOptional: bool + CustomAttrsStored: ILAttributesStored + MetadataIndex: int32 } + member CustomAttrs: ILAttributes type ILParameters = list -val typesOfILParams : ILParameters -> ILType list +val typesOfILParams: ILParameters -> ILType list /// Method return values. [] type ILReturn = - { Marshal: ILNativeType option; - Type: ILType; - CustomAttrs: ILAttributes } + { Marshal: ILNativeType option + Type: ILType + CustomAttrsStored: ILAttributesStored + MetadataIndex: int32 } + + member CustomAttrs: ILAttributes + + member WithCustomAttrs: customAttrs: ILAttributes -> ILReturn -/// Security ILPermissions -/// Attached to various structures... [] type ILSecurityAction = | Request @@ -908,14 +820,18 @@ type ILSecurityAction = | InheritanceDemandChoice | DemandChoice -type ILPermission = - | PermissionSet of ILSecurityAction * byte[] +type ILSecurityDecl = + | ILSecurityDecl of ILSecurityAction * byte[] -/// Abstract type equivalent to ILPermission list - use helpers +/// Abstract type equivalent to ILSecurityDecl list - use helpers /// below to construct/destruct these. -[] -type ILPermissions = - member AsList : ILPermission list +[] +type ILSecurityDecls = + member AsList: ILSecurityDecl list + +/// Represents the efficiency-oriented storage of ILSecurityDecls in another item. +[] +type ILSecurityDeclsStored /// PInvoke attributes. [] @@ -948,33 +864,27 @@ type PInvokeThrowOnUnmappableChar = [] type PInvokeMethod = - { Where: ILModuleRef; - Name: string; - CallingConv: PInvokeCallingConvention; - CharEncoding: PInvokeCharEncoding; - NoMangle: bool; - LastError: bool; - ThrowOnUnmappableChar: PInvokeThrowOnUnmappableChar; + { Where: ILModuleRef + Name: string + CallingConv: PInvokeCallingConvention + CharEncoding: PInvokeCharEncoding + NoMangle: bool + LastError: bool + ThrowOnUnmappableChar: PInvokeThrowOnUnmappableChar CharBestFit: PInvokeCharBestFit } -/// [OverridesSpec] - refer to a method declaration in a superclass -/// or superinterface. Used for overriding/method impls. Includes -/// a type for the parent for the same reason that a method specs -/// includes the type of the enclosing type, i.e. the type -/// gives the "ILGenericArgs" at which the parent type is being used. - +/// [OverridesSpec] - refer to a method declaration in a superclass or interface. type ILOverridesSpec = | OverridesSpec of ILMethodRef * ILType member MethodRef: ILMethodRef - member EnclosingType: ILType + member DeclaringType: ILType -// REVIEW: fold this into ILMethodDef. type ILMethodVirtualInfo = - { IsFinal: bool; - IsNewSlot: bool; - IsCheckAccessOnOverride: bool; - IsAbstract: bool; } + { IsFinal: bool + IsNewSlot: bool + IsCheckAccessOnOverride: bool + IsAbstract: bool } [] type MethodKind = @@ -984,204 +894,287 @@ type MethodKind = | NonVirtual | Virtual of ILMethodVirtualInfo -// REVIEW: fold this into ILMethodDef. [] type MethodBody = | IL of ILMethodBody - | PInvoke of PInvokeMethod (* platform invoke to native *) + | PInvoke of PInvokeMethod | Abstract | Native + | NotAvailable -// REVIEW: fold this into ILMethodDef. [] type MethodCodeKind = | IL | Native | Runtime -/// Generic parameters. Formal generic parameter declarations -/// may include the bounds, if any, on the generic parameter. +/// Generic parameters. Formal generic parameter declarations may include the bounds, if any, on the generic parameter. type ILGenericParameterDef = - { Name: string; - /// At most one is the parent type, the others are interface types. - Constraints: ILTypes; + { Name: string + + /// At most one is the parent type, the others are interface types. + Constraints: ILTypes + /// Variance of type parameters, only applicable to generic parameters for generic interfaces and delegates. - Variance: ILGenericVariance; + Variance: ILGenericVariance + /// Indicates the type argument must be a reference type. - HasReferenceTypeConstraint: bool; - CustomAttrs : ILAttributes; + HasReferenceTypeConstraint: bool + /// Indicates the type argument must be a value type, but not Nullable. - HasNotNullableValueTypeConstraint: bool; + HasNotNullableValueTypeConstraint: bool + /// Indicates the type argument must have a public nullary constructor. - HasDefaultConstructorConstraint: bool; } + HasDefaultConstructorConstraint: bool + + /// Do not use this + CustomAttrsStored: ILAttributesStored + + /// Do not use this + MetadataIndex: int32 } + member CustomAttrs: ILAttributes type ILGenericParameterDefs = ILGenericParameterDef list [] type ILLazyMethodBody = - member Contents : MethodBody - -/// Method definitions. -/// -/// There are several different flavours of methods (constructors, -/// abstract, virtual, static, instance, class constructors). There -/// is no perfect factorization of these as the combinations are not -/// independent. + member Contents: MethodBody +/// IL Method definitions. [] type ILMethodDef = - { Name: string; - mdKind: MethodKind; - CallingConv: ILCallingConv; - Parameters: ILParameters; - Return: ILReturn; - Access: ILMemberAccess; - mdBody: ILLazyMethodBody; - mdCodeKind: MethodCodeKind; - IsInternalCall: bool; - IsManaged: bool; - IsForwardRef: bool; - SecurityDecls: ILPermissions; - /// Some methods are marked "HasSecurity" even if there are no permissions attached, e.g. if they use SuppressUnmanagedCodeSecurityAttribute - HasSecurity: bool; - IsEntryPoint:bool; - IsReqSecObj: bool; - IsHideBySig: bool; - IsSpecialName: bool; - /// The method is exported to unmanaged code using COM interop. - IsUnmanagedExport: bool; - IsSynchronized: bool; - IsPreserveSig: bool; - /// .NET 2.0 feature: SafeHandle finalizer must be run. - IsMustRun: bool; - IsNoInline: bool; - IsAggressiveInline: bool; - - GenericParams: ILGenericParameterDefs; - CustomAttrs: ILAttributes; } + + /// Functional creation of a value, with delayed reading of some elements via a metadata index + new: name: string * attributes: MethodAttributes * implAttributes: MethodImplAttributes * callingConv: ILCallingConv * + parameters: ILParameters * ret: ILReturn * body: ILLazyMethodBody * isEntryPoint:bool * genericParams: ILGenericParameterDefs * + securityDeclsStored: ILSecurityDeclsStored * customAttrsStored: ILAttributesStored * metadataIndex: int32 -> ILMethodDef + + /// Functional creation of a value, immediate + new: name: string * attributes: MethodAttributes * implAttributes: MethodImplAttributes * callingConv: ILCallingConv * + parameters: ILParameters * ret: ILReturn * body: ILLazyMethodBody * isEntryPoint:bool * genericParams: ILGenericParameterDefs * + securityDecls: ILSecurityDecls * customAttrs: ILAttributes -> ILMethodDef - member ParameterTypes: ILTypes; - member IsIL : bool - member Code : ILCode option - member Locals : ILLocals - member MaxStack : int32 - member IsZeroInit : bool + member Name: string + member Attributes: MethodAttributes + member ImplAttributes: MethodImplAttributes + member CallingConv: ILCallingConv + member Parameters: ILParameters + member Return: ILReturn + member Body: ILLazyMethodBody + member SecurityDecls: ILSecurityDecls + member IsEntryPoint:bool + member GenericParams: ILGenericParameterDefs + member CustomAttrs: ILAttributes + member ParameterTypes: ILTypes + member IsIL: bool + member Code: ILCode option + member Locals: ILLocals + member MaxStack: int32 + member IsZeroInit: bool - /// .cctor methods. The predicates (IsClassInitializer,IsConstructor,IsStatic,IsNonVirtualInstance,IsVirtual) - /// form a complete, non-overlapping classification of this type. + /// Indicates a .cctor method. member IsClassInitializer: bool - /// .ctor methods. The predicates (IsClassInitializer,IsConstructor,IsStatic,IsNonVirtualInstance,IsVirtual) - /// form a complete, non-overlapping classification of this type. + + /// Indicates a .ctor method. member IsConstructor: bool - /// static methods. The predicates (IsClassInitializer,IsConstructor,IsStatic,IsNonVirtualInstance,IsVirtual) - /// form a complete, non-overlapping classification of this type. + + /// Indicates a static method. member IsStatic: bool - /// instance methods that are not virtual. The predicates (IsClassInitializer,IsConstructor,IsStatic,IsNonVirtualInstance,IsVirtual) - /// form a complete, non-overlapping classification of this type. + + /// Indicates this is an instance methods that is not virtual. member IsNonVirtualInstance: bool - /// instance methods that are virtual or abstract or implement an interface slot. - /// The predicates (IsClassInitializer,IsConstructor,IsStatic,IsNonVirtualInstance,IsVirtual) - /// form a complete, non-overlapping classification of this type. + + /// Indicates an instance methods that is virtual or abstract or implements an interface slot. member IsVirtual: bool member IsFinal: bool member IsNewSlot: bool - member IsCheckAccessOnOverride : bool + member IsCheckAccessOnOverride: bool member IsAbstract: bool - member MethodBody : ILMethodBody + member MethodBody: ILMethodBody member CallingSignature: ILCallingSignature + member Access: ILMemberAccess + member IsHideBySig: bool + member IsSpecialName: bool + + /// The method is exported to unmanaged code using COM interop. + member IsUnmanagedExport: bool + member IsReqSecObj: bool + + /// Some methods are marked "HasSecurity" even if there are no permissions attached, e.g. if they use SuppressUnmanagedCodeSecurityAttribute + member HasSecurity: bool + member IsManaged: bool + member IsForwardRef: bool + member IsInternalCall: bool + member IsPreserveSig: bool + member IsSynchronized: bool + member IsNoInline: bool + member IsAggressiveInline: bool + + /// SafeHandle finalizer must be run. + member IsMustRun: bool + + /// Functional update of the value + member With: ?name: string * ?attributes: MethodAttributes * ?implAttributes: MethodImplAttributes * ?callingConv: ILCallingConv * + ?parameters: ILParameters * ?ret: ILReturn * ?body: ILLazyMethodBody * ?securityDecls: ILSecurityDecls * ?isEntryPoint:bool * + ?genericParams: ILGenericParameterDefs * ?customAttrs: ILAttributes -> ILMethodDef + member WithSpecialName: ILMethodDef + member WithHideBySig: unit -> ILMethodDef + member WithHideBySig: bool -> ILMethodDef + member WithFinal: bool -> ILMethodDef + member WithAbstract: bool -> ILMethodDef + member WithAccess: ILMemberAccess -> ILMethodDef + member WithNewSlot: ILMethodDef + member WithSecurity: bool -> ILMethodDef + member WithPInvoke: bool -> ILMethodDef + member WithPreserveSig: bool -> ILMethodDef + member WithSynchronized: bool -> ILMethodDef + member WithNoInlining: bool -> ILMethodDef + member WithAggressiveInlining: bool -> ILMethodDef + member WithRuntime: bool -> ILMethodDef /// Tables of methods. Logically equivalent to a list of methods but /// the table is kept in a form optimized for looking up methods by /// name and arity. - -/// abstract type equivalent to [ILMethodDef list] [] type ILMethodDefs = interface IEnumerable - member AsArray : ILMethodDef[] - member AsList : ILMethodDef list - member FindByName : string -> ILMethodDef list + member AsArray: ILMethodDef[] + member AsList: ILMethodDef list + member FindByName: string -> ILMethodDef list /// Field definitions. [] type ILFieldDef = - { Name: string; - Type: ILType; - IsStatic: bool; - Access: ILMemberAccess; - Data: byte[] option; - LiteralValue: ILFieldInit option; - /// The explicit offset in bytes when explicit layout is used. - Offset: int32 option; - IsSpecialName: bool; - Marshal: ILNativeType option; - NotSerialized: bool; - IsLiteral: bool ; - IsInitOnly: bool; - CustomAttrs: ILAttributes; } - -/// Tables of fields. Logically equivalent to a list of fields but -/// the table is kept in a form optimized for looking up fields by -/// name. + + /// Functional creation of a value using delayed reading via a metadata index + new: name: string * fieldType: ILType * attributes: FieldAttributes * data: byte[] option * + literalValue: ILFieldInit option * offset: int32 option * marshal: ILNativeType option * + customAttrsStored: ILAttributesStored * metadataIndex: int32 -> ILFieldDef + + /// Functional creation of a value, immediate + new: name: string * fieldType: ILType * attributes: FieldAttributes * data: byte[] option * + literalValue: ILFieldInit option * offset: int32 option * marshal: ILNativeType option * + customAttrs: ILAttributes -> ILFieldDef + + member Name: string + member FieldType: ILType + member Attributes: FieldAttributes + member Data: byte[] option + member LiteralValue: ILFieldInit option + + /// The explicit offset in bytes when explicit layout is used. + member Offset: int32 option + member Marshal: ILNativeType option + member CustomAttrs: ILAttributes + member IsStatic: bool + member IsSpecialName: bool + member IsLiteral: bool + member NotSerialized: bool + member IsInitOnly: bool + member Access: ILMemberAccess + + /// Functional update of the value + member With: ?name: string * ?fieldType: ILType * ?attributes: FieldAttributes * ?data: byte[] option * ?literalValue: ILFieldInit option * + ?offset: int32 option * ?marshal: ILNativeType option * ?customAttrs: ILAttributes -> ILFieldDef + member WithAccess: ILMemberAccess -> ILFieldDef + member WithInitOnly: bool -> ILFieldDef + member WithStatic: bool -> ILFieldDef + member WithSpecialName: bool -> ILFieldDef + member WithNotSerialized: bool -> ILFieldDef + member WithLiteralDefaultValue: ILFieldInit option -> ILFieldDef + member WithFieldMarshal: ILNativeType option -> ILFieldDef + +/// Tables of fields. Logically equivalent to a list of fields but the table is kept in +/// a form to allow efficient looking up fields by name. [] type ILFieldDefs = - member AsList : ILFieldDef list - member LookupByName : string -> ILFieldDef list + member AsList: ILFieldDef list + member LookupByName: string -> ILFieldDef list /// Event definitions. [] type ILEventDef = - { Type: ILType option; - Name: string; - IsRTSpecialName: bool; - IsSpecialName: bool; - AddMethod: ILMethodRef; - RemoveMethod: ILMethodRef; - FireMethod: ILMethodRef option; - OtherMethods: ILMethodRef list; - CustomAttrs: ILAttributes; } + + /// Functional creation of a value, using delayed reading via a metadata index, for ilread.fs + new: eventType: ILType option * name: string * attributes: EventAttributes * addMethod: ILMethodRef * + removeMethod: ILMethodRef * fireMethod: ILMethodRef option * otherMethods: ILMethodRef list * + customAttrsStored: ILAttributesStored * metadataIndex: int32 -> ILEventDef + + /// Functional creation of a value, immediate + new: eventType: ILType option * name: string * attributes: EventAttributes * addMethod: ILMethodRef * + removeMethod: ILMethodRef * fireMethod: ILMethodRef option * otherMethods: ILMethodRef list * + customAttrs: ILAttributes -> ILEventDef + + member EventType: ILType option + member Name: string + member Attributes: EventAttributes + member AddMethod: ILMethodRef + member RemoveMethod: ILMethodRef + member FireMethod: ILMethodRef option + member OtherMethods: ILMethodRef list + member CustomAttrs: ILAttributes + member IsSpecialName: bool + member IsRTSpecialName: bool + + /// Functional update of the value + member With: ?eventType: ILType option * ?name: string * ?attributes: EventAttributes * ?addMethod: ILMethodRef * + ?removeMethod: ILMethodRef * ?fireMethod: ILMethodRef option * ?otherMethods: ILMethodRef list * + ?customAttrs: ILAttributes -> ILEventDef /// Table of those events in a type definition. [] type ILEventDefs = - member AsList : ILEventDef list - member LookupByName : string -> ILEventDef list + member AsList: ILEventDef list + member LookupByName: string -> ILEventDef list -/// Property definitions. +/// Property definitions [] type ILPropertyDef = - { Name: string; - IsRTSpecialName: bool; - IsSpecialName: bool; - SetMethod: ILMethodRef option; - GetMethod: ILMethodRef option; - CallingConv: ILThisConvention; - Type: ILType; - Init: ILFieldInit option; - Args: ILTypes; - CustomAttrs: ILAttributes; } - -/// Table of those properties in a type definition. + + /// Functional creation of a value, using delayed reading via a metadata index, for ilread.fs + new: name: string * attributes: PropertyAttributes * setMethod: ILMethodRef option * getMethod: ILMethodRef option * + callingConv: ILThisConvention * propertyType: ILType * init: ILFieldInit option * args: ILTypes * + customAttrsStored: ILAttributesStored * metadataIndex: int32 -> ILPropertyDef + + /// Functional creation of a value, immediate + new: name: string * attributes: PropertyAttributes * setMethod: ILMethodRef option * getMethod: ILMethodRef option * + callingConv: ILThisConvention * propertyType: ILType * init: ILFieldInit option * args: ILTypes * + customAttrs: ILAttributes -> ILPropertyDef + + member Name: string + member Attributes: PropertyAttributes + member SetMethod: ILMethodRef option + member GetMethod: ILMethodRef option + member CallingConv: ILThisConvention + member PropertyType: ILType + member Init: ILFieldInit option + member Args: ILTypes + member CustomAttrs: ILAttributes + member IsSpecialName: bool + member IsRTSpecialName: bool + + /// Functional update of the value + member With: ?name: string * ?attributes: PropertyAttributes * ?setMethod: ILMethodRef option * ?getMethod: ILMethodRef option * + ?callingConv: ILThisConvention * ?propertyType: ILType * ?init: ILFieldInit option * ?args: ILTypes * + ?customAttrs: ILAttributes -> ILPropertyDef + +/// Table of properties in an IL type definition. [] [] type ILPropertyDefs = - member AsList : ILPropertyDef list - member LookupByName : string -> ILPropertyDef list + member AsList: ILPropertyDef list + member LookupByName: string -> ILPropertyDef list /// Method Impls -/// -/// If there is an entry (pms --> ms) in this table, then method [ms] -/// is used to implement method [pms] for the purposes of this class -/// and its subclasses. type ILMethodImplDef = - { Overrides: ILOverridesSpec; + { Overrides: ILOverridesSpec OverrideBy: ILMethodSpec } [] type ILMethodImplDefs = - member AsList : ILMethodImplDef list + member AsList: ILMethodImplDef list /// Type Layout information. [] @@ -1191,7 +1184,7 @@ type ILTypeDefLayout = | Explicit of ILTypeDefLayoutInfo and ILTypeDefLayoutInfo = - { Size: int32 option; + { Size: int32 option Pack: uint16 option } /// Indicate the initialization semantics of a type. @@ -1215,20 +1208,6 @@ type ILTypeDefAccess = | Nested of ILMemberAccess /// A categorization of type definitions into "kinds" - -//------------------------------------------------------------------- -// A note for the nit-picky.... In theory, the "kind" of a type -// definition can only be partially determined prior to binding. -// For example, you cannot really, absolutely tell if a type is -// really, absolutely a value type until you bind the -// super class and test it for type equality against System.ValueType. -// However, this is unbearably annoying, as it means you -// have to load "primary runtime assembly (System.Runtime or mscorlib)" and perform bind operations -// in order to be able to determine some quite simple -// things. So we approximate by simply looking at the name -// of the superclass when loading. -// ------------------------------------------------------------------ - [] type ILTypeDefKind = | Class @@ -1237,72 +1216,111 @@ type ILTypeDefKind = | Enum | Delegate -/// Tables of named type definitions. The types and table may contain on-demand -/// (lazy) computations, e.g. the actual reading of some aspects -/// of a type definition may be delayed if the reader being used supports -/// this. -/// -/// This is an abstract type equivalent to "ILTypeDef list". -[] -[] +/// Tables of named type definitions. +[] type ILTypeDefs = interface IEnumerable - member AsArray : ILTypeDef[] - member AsList : ILTypeDef list + + member AsArray: ILTypeDef[] + + member AsList: ILTypeDef list /// Get some information about the type defs, but do not force the read of the type defs themselves. - member AsArrayOfLazyTypeDefs : (string list * string * ILAttributes * Lazy) array + member AsArrayOfPreTypeDefs: ILPreTypeDef[] /// Calls to FindByName will result in any laziness in the overall /// set of ILTypeDefs being read in in addition /// to the details for the type found, but the remaining individual /// type definitions will not be read. - member FindByName : string -> ILTypeDef + member FindByName: string -> ILTypeDef -/// Type Definitions -/// -/// As for methods there are several important constraints not encoded -/// in the type definition below, for example that the super class of -/// an interface type is always None, or that enumerations always -/// have a very specific form. +/// Represents IL Type Definitions. and [] ILTypeDef = - { tdKind: ILTypeDefKind; - Name: string; - GenericParams: ILGenericParameterDefs; - Access: ILTypeDefAccess; - IsAbstract: bool; - IsSealed: bool; - IsSerializable: bool; - /// Class or interface generated for COM interop. - IsComInterop: bool; - Layout: ILTypeDefLayout; - IsSpecialName: bool; - Encoding: ILDefaultPInvokeEncoding; - NestedTypes: ILTypeDefs; - Implements: ILTypes; - Extends: ILType option; - Methods: ILMethodDefs; - SecurityDecls: ILPermissions; - /// Some classes are marked "HasSecurity" even if there are no permissions attached, - /// e.g. if they use SuppressUnmanagedCodeSecurityAttribute - HasSecurity: bool; - Fields: ILFieldDefs; - MethodImpls: ILMethodImplDefs; - InitSemantics: ILTypeInit; - Events: ILEventDefs; - Properties: ILPropertyDefs; - CustomAttrs: ILAttributes; } - member IsClass: bool; - member IsInterface: bool; - member IsEnum: bool; - member IsDelegate: bool; - member IsStructOrEnum : bool -[] -[] + /// Functional creation of a value, using delayed reading via a metadata index, for ilread.fs + new: name: string * attributes: TypeAttributes * layout: ILTypeDefLayout * implements: ILTypes * genericParams: ILGenericParameterDefs * + extends: ILType option * methods: ILMethodDefs * nestedTypes: ILTypeDefs * fields: ILFieldDefs * methodImpls: ILMethodImplDefs * + events: ILEventDefs * properties: ILPropertyDefs * securityDeclsStored: ILSecurityDeclsStored * customAttrsStored: ILAttributesStored * metadataIndex: int32 -> ILTypeDef + + /// Functional creation of a value, immediate + new: name: string * attributes: TypeAttributes * layout: ILTypeDefLayout * implements: ILTypes * genericParams: ILGenericParameterDefs * + extends: ILType option * methods: ILMethodDefs * nestedTypes: ILTypeDefs * fields: ILFieldDefs * methodImpls: ILMethodImplDefs * + events: ILEventDefs * properties: ILPropertyDefs * securityDecls: ILSecurityDecls * customAttrs: ILAttributes -> ILTypeDef + + member Name: string + member Attributes: TypeAttributes + member GenericParams: ILGenericParameterDefs + member Layout: ILTypeDefLayout + member NestedTypes: ILTypeDefs + member Implements: ILTypes + member Extends: ILType option + member Methods: ILMethodDefs + member SecurityDecls: ILSecurityDecls + member Fields: ILFieldDefs + member MethodImpls: ILMethodImplDefs + member Events: ILEventDefs + member Properties: ILPropertyDefs + member CustomAttrs: ILAttributes + member IsClass: bool + member IsStruct: bool + member IsInterface: bool + member IsEnum: bool + member IsDelegate: bool + member IsStructOrEnum: bool + member Access: ILTypeDefAccess + member IsAbstract: bool + member IsSealed: bool + member IsSerializable: bool + /// Class or interface generated for COM interop. + member IsComInterop: bool + member IsSpecialName: bool + /// Some classes are marked "HasSecurity" even if there are no permissions attached, + /// e.g. if they use SuppressUnmanagedCodeSecurityAttribute + member HasSecurity: bool + member Encoding: ILDefaultPInvokeEncoding + + member WithAccess: ILTypeDefAccess -> ILTypeDef + member WithNestedAccess: ILMemberAccess -> ILTypeDef + member WithSealed: bool -> ILTypeDef + member WithSerializable: bool -> ILTypeDef + member WithAbstract: bool -> ILTypeDef + member WithImport: bool -> ILTypeDef + member WithHasSecurity: bool -> ILTypeDef + member WithLayout: ILTypeDefLayout -> ILTypeDef + member WithKind: ILTypeDefKind -> ILTypeDef + member WithEncoding: ILDefaultPInvokeEncoding -> ILTypeDef + member WithSpecialName: bool -> ILTypeDef + member WithInitSemantics: ILTypeInit -> ILTypeDef + + /// Functional update + member With: ?name: string * ?attributes: TypeAttributes * ?layout: ILTypeDefLayout * ?implements: ILTypes * + ?genericParams:ILGenericParameterDefs * ?extends:ILType option * ?methods:ILMethodDefs * + ?nestedTypes:ILTypeDefs * ?fields: ILFieldDefs * ?methodImpls:ILMethodImplDefs * ?events:ILEventDefs * + ?properties:ILPropertyDefs * ?customAttrs:ILAttributes * ?securityDecls: ILSecurityDecls -> ILTypeDef + +/// Represents a prefix of information for ILTypeDef. +/// +/// The information is enough to perform name resolution for the F# compiler, probe attributes +/// for ExtensionAttribute etc. This is key to the on-demand exploration of .NET metadata. +/// This information has to be "Goldilocks" - not too much, not too little, just right. +and [] ILPreTypeDef = + member Namespace: string list + member Name: string + member MetadataIndex: int32 + /// Realise the actual full typedef + member GetTypeDef : unit -> ILTypeDef + +and [] ILTypeDefStored + +val mkILPreTypeDef : ILTypeDef -> ILPreTypeDef +val mkILPreTypeDefComputed : string list * string * (unit -> ILTypeDef) -> ILPreTypeDef +val mkILPreTypeDefRead : string list * string * int32 * ILTypeDefStored -> ILPreTypeDef +val mkILTypeDefReader: (int32 -> ILTypeDef) -> ILTypeDefStored + +[] type ILNestedExportedTypes = - member AsList : ILNestedExportedType list + member AsList: ILNestedExportedType list /// "Classes Elsewhere" - classes in auxiliary modules. /// @@ -1332,26 +1350,31 @@ type ILNestedExportedTypes = /// these are only found in the "Nested" field of ILExportedTypeOrForwarder objects // REVIEW: fold this into ILExportedTypeOrForwarder. There's not much value in keeping these distinct and ILNestedExportedType = - { Name: string; - Access: ILMemberAccess; - Nested: ILNestedExportedTypes; - CustomAttrs: ILAttributes } + { Name: string + Access: ILMemberAccess + Nested: ILNestedExportedTypes + CustomAttrsStored: ILAttributesStored + MetadataIndex: int32 } + member CustomAttrs: ILAttributes /// these are only found in the ILExportedTypesAndForwarders table in the manifest [] type ILExportedTypeOrForwarder = - { ScopeRef: ILScopeRef; + { ScopeRef: ILScopeRef /// [Namespace.]Name - Name: string; - IsForwarder: bool; - Access: ILTypeDefAccess; - Nested: ILNestedExportedTypes; - CustomAttrs: ILAttributes } + Name: string + Attributes: TypeAttributes + Nested: ILNestedExportedTypes + CustomAttrsStored: ILAttributesStored + MetadataIndex: int32 } + member Access: ILTypeDefAccess + member IsForwarder: bool + member CustomAttrs: ILAttributes [] [] type ILExportedTypesAndForwarders = - member AsList : ILExportedTypeOrForwarder list + member AsList: ILExportedTypeOrForwarder list [] type ILResourceAccess = @@ -1360,8 +1383,16 @@ type ILResourceAccess = [] type ILResourceLocation = - | Local of (unit -> byte[]) (* resources may be re-read each time this function is called *) + /// Represents a manifest resource that can be read from within the PE file + | LocalIn of string * int * int + + /// Represents a manifest resource that is due to be written to the output PE file + | LocalOut of byte[] + + /// Represents a manifest resource in an associated file | File of ILModuleRef * int32 + + /// Represents a manifest resource in a different assembly | Assembly of ILAssemblyRef /// "Manifest ILResources" are chunks of resource data, being one of: @@ -1369,18 +1400,22 @@ type ILResourceLocation = /// - in an external file in this assembly (offset given in the ILResourceLocation field). /// - as a resources in another assembly of the same name. type ILResource = - { Name: string; - Location: ILResourceLocation; - Access: ILResourceAccess; - CustomAttrs: ILAttributes } - /// Read the bytes from a resource local to an assembly - member Bytes : byte[] + { Name: string + Location: ILResourceLocation + Access: ILResourceAccess + CustomAttrsStored: ILAttributesStored + MetadataIndex: int32 } + + /// Read the bytes from a resource local to an assembly. Will fail for non-local resources. + member GetBytes : unit -> byte[] + + member CustomAttrs: ILAttributes /// Table of resources in a module. [] [] type ILResources = - member AsList : ILResource list + member AsList: ILResource list [] @@ -1393,64 +1428,78 @@ type ILAssemblyLongevity = /// The main module of an assembly is a module plus some manifest information. type ILAssemblyManifest = - { Name: string; + { Name: string /// This is the ID of the algorithm used for the hashes of auxiliary /// files in the assembly. These hashes are stored in the /// ILModuleRef.Hash fields of this assembly. These are not /// cryptographic hashes: they are simple file hashes. The algorithm /// is normally 0x00008004 indicating the SHA1 hash algorithm. - AuxModuleHashAlgorithm: int32; - SecurityDecls: ILPermissions; + AuxModuleHashAlgorithm: int32 + SecurityDeclsStored: ILSecurityDeclsStored /// This is the public key used to sign this /// assembly (the signature itself is stored elsewhere: see the /// binary format, and may not have been written if delay signing /// is used). (member Name, member PublicKey) forms the full /// public name of the assembly. - PublicKey: byte[] option; - Version: ILVersionInfo option; - Locale: string option; - CustomAttrs: ILAttributes; - AssemblyLongevity: ILAssemblyLongevity; - DisableJitOptimizations: bool; - JitTracking: bool; - IgnoreSymbolStoreSequencePoints: bool; - Retargetable: bool; + PublicKey: byte[] option + Version: ILVersionInfo option + Locale: string option + CustomAttrsStored: ILAttributesStored + AssemblyLongevity: ILAssemblyLongevity + DisableJitOptimizations: bool + JitTracking: bool + IgnoreSymbolStoreSequencePoints: bool + Retargetable: bool /// Records the types implemented by this assembly in auxiliary /// modules. - ExportedTypes: ILExportedTypesAndForwarders; + ExportedTypes: ILExportedTypesAndForwarders /// Records whether the entrypoint resides in another module. - EntrypointElsewhere: ILModuleRef option; + EntrypointElsewhere: ILModuleRef option + MetadataIndex: int32 } + member CustomAttrs: ILAttributes + member SecurityDecls: ILSecurityDecls + +[] +type ILNativeResource = + /// Represents a native resource to be read from the PE file + | In of fileName: string * linkedResourceBase: int * linkedResourceStart: int * linkedResourceLength: int + + /// Represents a native resource to be written in an output file + | Out of unlinkedResource: byte[] + /// One module in the "current" assembly, either a main-module or /// an auxiliary module. The main module will have a manifest. /// /// An assembly is built by joining together a "main" module plus /// several auxiliary modules. type ILModuleDef = - { Manifest: ILAssemblyManifest option; - CustomAttrs: ILAttributes; - Name: string; - TypeDefs: ILTypeDefs; - SubsystemVersion : int * int - UseHighEntropyVA : bool - SubSystemFlags: int32; - IsDLL: bool; - IsILOnly: bool; - Platform: ILPlatform option; - StackReserveSize: int32 option; - Is32Bit: bool; - Is32BitPreferred: bool; - Is64Bit: bool; - VirtualAlignment: int32; - PhysicalAlignment: int32; - ImageBase: int32; - MetadataVersion: string; - Resources: ILResources; - /// e.g. win86 resources, as the exact contents of a .res or .obj file. - NativeResources: Lazy list; } + { Manifest: ILAssemblyManifest option + Name: string + TypeDefs: ILTypeDefs + SubsystemVersion: int * int + UseHighEntropyVA: bool + SubSystemFlags: int32 + IsDLL: bool + IsILOnly: bool + Platform: ILPlatform option + StackReserveSize: int32 option + Is32Bit: bool + Is32BitPreferred: bool + Is64Bit: bool + VirtualAlignment: int32 + PhysicalAlignment: int32 + ImageBase: int32 + MetadataVersion: string + Resources: ILResources + /// e.g. win86 resources, as the exact contents of a .res or .obj file. Must be unlinked manually. + NativeResources: ILNativeResource list + CustomAttrsStored: ILAttributesStored + MetadataIndex: int32 } member ManifestOfAssembly: ILAssemblyManifest - member HasManifest : bool + member HasManifest: bool + member CustomAttrs: ILAttributes /// Find the method definition corresponding to the given property or /// event operation. These are always in the same class as the property @@ -1487,12 +1536,9 @@ val splitILTypeNameWithPossibleStaticArguments: string -> string[] * string /// namespace is kept as a whole string, rather than split at dots. val splitTypeNameRight: string -> string option * string - val typeNameForGlobalFunctions: string -val isTypeNameForGlobalFunctions: string -> bool - -val ungenericizeTypeName: string -> string (* e.g. List`1 --> List *) +val isTypeNameForGlobalFunctions: string -> bool // ==================================================================== // PART 2 @@ -1507,8 +1553,8 @@ val ungenericizeTypeName: string -> string (* e.g. List`1 --> List *) /// reference items from it via an ILGlobals for that specific version built using mkILGlobals. [] type ILGlobals = - member primaryAssemblyScopeRef : ILScopeRef - member primaryAssemblyName : string + member primaryAssemblyScopeRef: ILScopeRef + member primaryAssemblyName: string member typ_Object: ILType member typ_String: ILType member typ_Type: ILType @@ -1532,7 +1578,7 @@ type ILGlobals = /// Build the table of commonly used references given functions to find types in system assemblies val mkILGlobals: ILScopeRef -> ILGlobals -val EcmaMscorlibILGlobals : ILGlobals +val EcmaMscorlibILGlobals: ILGlobals /// When writing a binary the fake "toplevel" type definition (called ) /// must come first. This function puts it first, and creates it in the returned @@ -1550,6 +1596,7 @@ val decodeILAttribData: /// Generate simple references to assemblies and modules. val mkSimpleAssRef: string -> ILAssemblyRef + val mkSimpleModRef: string -> ILModuleRef val mkILTyvarTy: uint16 -> ILType @@ -1576,7 +1623,7 @@ val mkILArrTy: ILType * ILArrayShape -> ILType val mkILArr1DTy: ILType -> ILType val isILArrTy: ILType -> bool val destILArrTy: ILType -> ILArrayShape * ILType -val mkILBoxedType : ILTypeSpec -> ILType +val mkILBoxedType: ILTypeSpec -> ILType /// Make method references and specs. val mkILMethRef: ILTypeRef * ILCallingConv * string * int * ILType list * ILType -> ILMethodRef @@ -1609,14 +1656,14 @@ val mkILFieldSpecInTy: ILType * string * ILType -> ILFieldSpec val mkILCallSig: ILCallingConv * ILType list * ILType -> ILCallingSignature -/// Make generalized versions of possibly-generic types, -/// e.g. Given the ILTypeDef for List, return the type "List". +/// Make generalized versions of possibly-generic types, e.g. Given the ILTypeDef for List, return the type "List". val mkILFormalBoxedTy: ILTypeRef -> ILGenericParameterDef list -> ILType val mkILFormalNamedTy: ILBoxity -> ILTypeRef -> ILGenericParameterDef list -> ILType val mkILFormalTypars: ILType list -> ILGenericParameterDefs val mkILFormalGenericArgs: int -> ILGenericParameterDefs -> ILGenericArgsList -val mkILSimpleTypar : string -> ILGenericParameterDef +val mkILSimpleTypar: string -> ILGenericParameterDef + /// Make custom attributes. val mkILCustomAttribMethRef: ILGlobals @@ -1632,11 +1679,11 @@ val mkILCustomAttribute: ILAttributeNamedArg list (* named args: values and flags indicating if they are fields or properties *) -> ILAttribute -val mkPermissionSet : ILGlobals -> ILSecurityAction * (ILTypeRef * (string * ILType * ILAttribElem) list) list -> ILPermission +val mkPermissionSet: ILGlobals -> ILSecurityAction * (ILTypeRef * (string * ILType * ILAttribElem) list) list -> ILSecurityDecl /// Making code. val generateCodeLabel: unit -> ILCodeLabel -val formatCodeLabel : ILCodeLabel -> string +val formatCodeLabel: ILCodeLabel -> string /// Make some code that is a straight line sequence of instructions. /// The function will add a "return" if the last instruction is not an exiting instruction. @@ -1644,16 +1691,16 @@ val nonBranchingInstrsToCode: ILInstr list -> ILCode /// Helpers for codegen: scopes for allocating new temporary variables. type ILLocalsAllocator = - new : preAlloc: int -> ILLocalsAllocator - member AllocLocal : ILLocal -> uint16 - member Close : unit -> ILLocal list + new: preAlloc: int -> ILLocalsAllocator + member AllocLocal: ILLocal -> uint16 + member Close: unit -> ILLocal list /// Derived functions for making some common patterns of instructions. val mkNormalCall: ILMethodSpec -> ILInstr val mkNormalCallvirt: ILMethodSpec -> ILInstr val mkNormalCallconstraint: ILType * ILMethodSpec -> ILInstr val mkNormalNewobj: ILMethodSpec -> ILInstr -val mkCallBaseConstructor : ILType * ILType list -> ILInstr list +val mkCallBaseConstructor: ILType * ILType list -> ILInstr list val mkNormalStfld: ILFieldSpec -> ILInstr val mkNormalStsfld: ILFieldSpec -> ILInstr val mkNormalLdsfld: ILFieldSpec -> ILInstr @@ -1683,16 +1730,19 @@ val mkILEmptyGenericParams: ILGenericParameterDefs /// Make method definitions. val mkILMethodBody: initlocals:bool * ILLocals * int * ILCode * ILSourceMarker option -> ILMethodBody val mkMethodBody: bool * ILLocals * int * ILCode * ILSourceMarker option -> MethodBody +val methBodyNotAvailable: ILLazyMethodBody +val methBodyAbstract: ILLazyMethodBody +val methBodyNative: ILLazyMethodBody val mkILCtor: ILMemberAccess * ILParameter list * MethodBody -> ILMethodDef val mkILClassCtor: MethodBody -> ILMethodDef val mkILNonGenericEmptyCtor: ILSourceMarker option -> ILType -> ILMethodDef val mkILStaticMethod: ILGenericParameterDefs * string * ILMemberAccess * ILParameter list * ILReturn * MethodBody -> ILMethodDef val mkILNonGenericStaticMethod: string * ILMemberAccess * ILParameter list * ILReturn * MethodBody -> ILMethodDef -val mkILGenericVirtualMethod: string * ILMemberAccess * ILGenericParameterDefs * ILParameter list * ILReturn * MethodBody -> ILMethodDef -val mkILGenericNonVirtualMethod: string * ILMemberAccess * ILGenericParameterDefs * ILParameter list * ILReturn * MethodBody -> ILMethodDef +val mkILGenericVirtualMethod: string * ILMemberAccess * ILGenericParameterDefs * ILParameter list * ILReturn * MethodBody -> ILMethodDef +val mkILGenericNonVirtualMethod: string * ILMemberAccess * ILGenericParameterDefs * ILParameter list * ILReturn * MethodBody -> ILMethodDef val mkILNonGenericVirtualMethod: string * ILMemberAccess * ILParameter list * ILReturn * MethodBody -> ILMethodDef -val mkILNonGenericInstanceMethod: string * ILMemberAccess * ILParameter list * ILReturn * MethodBody -> ILMethodDef +val mkILNonGenericInstanceMethod: string * ILMemberAccess * ILParameter list * ILReturn * MethodBody -> ILMethodDef /// Make field definitions. @@ -1731,7 +1781,7 @@ val mkILStorageCtor: ILSourceMarker option * ILInstr list * ILType * (string * I val mkILSimpleStorageCtor: ILSourceMarker option * ILTypeSpec option * ILType * ILParameter list * (string * ILType) list * ILMemberAccess -> ILMethodDef val mkILSimpleStorageCtorWithParamNames: ILSourceMarker option * ILTypeSpec option * ILType * ILParameter list * (string * string * ILType) list * ILMemberAccess -> ILMethodDef -val mkILDelegateMethods: ILGlobals -> ILType * ILType -> ILParameter list * ILReturn -> ILMethodDef list +val mkILDelegateMethods: ILMemberAccess -> ILGlobals -> ILType * ILType -> ILParameter list * ILReturn -> ILMethodDef list /// Given a delegate type definition which lies in a particular scope, /// make a reference to its constructor. @@ -1743,15 +1793,17 @@ val mkILTypeForGlobalFunctions: ILScopeRef -> ILType /// Making tables of custom attributes, etc. val mkILCustomAttrs: ILAttribute list -> ILAttributes val mkILCustomAttrsFromArray: ILAttribute[] -> ILAttributes -val mkILComputedCustomAttrs: (unit -> ILAttribute[]) -> ILAttributes +val storeILCustomAttrs: ILAttributes -> ILAttributesStored +val mkILCustomAttrsReader: (int32 -> ILAttribute[]) -> ILAttributesStored val emptyILCustomAttrs: ILAttributes -val mkILSecurityDecls: ILPermission list -> ILPermissions -val mkILLazySecurityDecls: Lazy -> ILPermissions -val emptyILSecurityDecls: ILPermissions +val mkILSecurityDecls: ILSecurityDecl list -> ILSecurityDecls +val emptyILSecurityDecls: ILSecurityDecls +val storeILSecurityDecls: ILSecurityDecls -> ILSecurityDeclsStored +val mkILSecurityDeclsReader: (int32 -> ILSecurityDecl[]) -> ILSecurityDeclsStored -val mkMethBodyAux : MethodBody -> ILLazyMethodBody -val mkMethBodyLazyAux : Lazy -> ILLazyMethodBody +val mkMethBodyAux: MethodBody -> ILLazyMethodBody +val mkMethBodyLazyAux: Lazy -> ILLazyMethodBody val mkILEvents: ILEventDef list -> ILEventDefs val mkILEventsLazy: Lazy -> ILEventDefs @@ -1786,9 +1838,10 @@ val emptyILTypeDefs: ILTypeDefs /// /// Note that individual type definitions may contain further delays /// in their method, field and other tables. -val mkILTypeDefsComputed: (unit -> (string list * string * ILAttributes * Lazy) array) -> ILTypeDefs +val mkILTypeDefsComputed: (unit -> ILPreTypeDef[]) -> ILTypeDefs val addILTypeDef: ILTypeDef -> ILTypeDefs -> ILTypeDefs +val mkTypeForwarder: ILScopeRef -> string -> ILNestedExportedTypes -> ILAttributes -> ILTypeDefAccess -> ILExportedTypeOrForwarder val mkILNestedExportedTypes: ILNestedExportedType list -> ILNestedExportedTypes val mkILNestedExportedTypesLazy: Lazy -> ILNestedExportedTypes @@ -1796,10 +1849,9 @@ val mkILExportedTypes: ILExportedTypeOrForwarder list -> ILExportedTypesAndForwa val mkILExportedTypesLazy: Lazy -> ILExportedTypesAndForwarders val mkILResources: ILResource list -> ILResources -val mkILResourcesLazy: Lazy -> ILResources /// Making modules. -val mkILSimpleModule: assemblyName:string -> moduleName:string -> dll:bool -> subsystemVersion : (int * int) -> useHighEntropyVA : bool -> ILTypeDefs -> int32 option -> string option -> int -> ILExportedTypesAndForwarders -> string -> ILModuleDef +val mkILSimpleModule: assemblyName:string -> moduleName:string -> dll:bool -> subsystemVersion: (int * int) -> useHighEntropyVA: bool -> ILTypeDefs -> int32 option -> string option -> int -> ILExportedTypesAndForwarders -> string -> ILModuleDef /// Generate references to existing type definitions, method definitions /// etc. Useful for generating references, e.g. to a class we're processing @@ -1808,9 +1860,9 @@ val mkILSimpleModule: assemblyName:string -> moduleName:string -> dll:bool -> su /// an auxiliary module or are generating multiple assemblies at /// once. -val mkRefForNestedILTypeDef : ILScopeRef -> ILTypeDef list * ILTypeDef -> ILTypeRef -val mkRefForILMethod : ILScopeRef -> ILTypeDef list * ILTypeDef -> ILMethodDef -> ILMethodRef -val mkRefForILField : ILScopeRef -> ILTypeDef list * ILTypeDef -> ILFieldDef -> ILFieldRef +val mkRefForNestedILTypeDef: ILScopeRef -> ILTypeDef list * ILTypeDef -> ILTypeRef +val mkRefForILMethod : ILScopeRef -> ILTypeDef list * ILTypeDef -> ILMethodDef -> ILMethodRef +val mkRefForILField : ILScopeRef -> ILTypeDef list * ILTypeDef -> ILFieldDef -> ILFieldRef val mkRefToILMethod: ILTypeRef * ILMethodDef -> ILMethodRef val mkRefToILField: ILTypeRef * ILFieldDef -> ILFieldRef @@ -1818,6 +1870,7 @@ val mkRefToILField: ILTypeRef * ILFieldDef -> ILFieldRef val mkRefToILAssembly: ILAssemblyManifest -> ILAssemblyRef val mkRefToILModule: ILModuleDef -> ILModuleRef +val NoMetadataIdx: int32 // -------------------------------------------------------------------- // Rescoping. @@ -1840,15 +1893,19 @@ val mkRefToILModule: ILModuleDef -> ILModuleRef /// Rescoping. The first argument tells the function how to reference the original scope from /// the new scope. val rescopeILScopeRef: ILScopeRef -> ILScopeRef -> ILScopeRef + /// Rescoping. The first argument tells the function how to reference the original scope from /// the new scope. val rescopeILTypeSpec: ILScopeRef -> ILTypeSpec -> ILTypeSpec + /// Rescoping. The first argument tells the function how to reference the original scope from /// the new scope. val rescopeILType: ILScopeRef -> ILType -> ILType + /// Rescoping. The first argument tells the function how to reference the original scope from /// the new scope. val rescopeILMethodRef: ILScopeRef -> ILMethodRef -> ILMethodRef + /// Rescoping. The first argument tells the function how to reference the original scope from /// the new scope. val rescopeILFieldRef: ILScopeRef -> ILFieldRef -> ILFieldRef @@ -1856,26 +1913,14 @@ val rescopeILFieldRef: ILScopeRef -> ILFieldRef -> ILFieldRef /// Unscoping. Clears every scope information, use for looking up IL method references only. val unscopeILType: ILType -> ILType -//----------------------------------------------------------------------- -// The ILCode Builder utility. -//---------------------------------------------------------------------- - val buildILCode: string -> lab2pc: Dictionary -> instrs:ILInstr[] -> ILExceptionSpec list -> ILLocalDebugInfo list -> ILCode -// -------------------------------------------------------------------- -// The instantiation utilities. -// -------------------------------------------------------------------- - /// Instantiate type variables that occur within types and other items. val instILTypeAux: int -> ILGenericArgs -> ILType -> ILType /// Instantiate type variables that occur within types and other items. val instILType: ILGenericArgs -> ILType -> ILType -// -------------------------------------------------------------------- -// ECMA globals -// -------------------------------------------------------------------- - /// This is a 'vendor neutral' way of referencing mscorlib. val ecmaPublicKey: PublicKey @@ -1899,7 +1944,7 @@ val isILDoubleTy: ILType -> bool val isILSingleTy: ILType -> bool /// Get a public key token from a public key. -val sha1HashBytes : byte[] -> byte[] (* SHA1 hash *) +val sha1HashBytes: byte[] -> byte[] (* SHA1 hash *) /// Get a version number from a CLR version string, e.g. 1.0.3705.0 val parseILVersion: string -> ILVersionInfo @@ -1908,38 +1953,33 @@ val compareILVersions: ILVersionInfo -> ILVersionInfo -> int /// Decompose a type definition according to its kind. type ILEnumInfo = - { enumValues: (string * ILFieldInit) list; + { enumValues: (string * ILFieldInit) list enumType: ILType } val getTyOfILEnumInfo: ILEnumInfo -> ILType val computeILEnumInfo: string * ILFieldDefs -> ILEnumInfo - -// -------------------------------------------------------------------- -// For completeness. These do not occur in metadata but tools that -// care about the existence of properties and events in the metadata -// can benefit from them. -// -------------------------------------------------------------------- - +/// A utility type provided for completeness [] type ILEventRef = - static member Create : ILTypeRef * string -> ILEventRef - member EnclosingTypeRef: ILTypeRef + static member Create: ILTypeRef * string -> ILEventRef + member DeclaringTypeRef: ILTypeRef member Name: string +/// A utility type provided for completeness [] type ILPropertyRef = - static member Create : ILTypeRef * string -> ILPropertyRef - member EnclosingTypeRef: ILTypeRef + static member Create: ILTypeRef * string -> ILPropertyRef + member DeclaringTypeRef: ILTypeRef member Name: string interface System.IComparable val runningOnMono: bool type ILReferences = - { AssemblyReferences: ILAssemblyRef list; - ModuleReferences: ILModuleRef list; } + { AssemblyReferences: ILAssemblyRef list + ModuleReferences: ILModuleRef list } /// Find the full set of assemblies referenced by a module. val computeILRefs: ILModuleDef -> ILReferences diff --git a/src/absil/ilbinary.fs b/src/absil/ilbinary.fs index 78467beeef3..46dfef12be6 100644 --- a/src/absil/ilbinary.fs +++ b/src/absil/ilbinary.fs @@ -838,6 +838,7 @@ let nt_ARRAY = 0x2Auy let nt_LPSTRUCT = 0x2Buy let nt_CUSTOMMARSHALER = 0x2Cuy let nt_ERROR = 0x2Duy +let nt_LPUTF8STR = 0x30uy let nt_MAX = 0x50uy // From c:/clrenv.i386/Crt/Inc/i386/hs.h @@ -894,6 +895,7 @@ let ILNativeTypeMap = nt_LPSTR , ILNativeType.LPSTR nt_LPWSTR , ILNativeType.LPWSTR nt_LPTSTR, ILNativeType.LPTSTR + nt_LPUTF8STR, ILNativeType.LPUTF8STR nt_IUNKNOWN , (* COM interop *) ILNativeType.IUnknown nt_IDISPATCH , (* COM interop *) ILNativeType.IDispatch nt_BYVALSTR , ILNativeType.ByValStr diff --git a/src/absil/illex.fsl b/src/absil/illex.fsl index ea0d4d85629..481f7b28f63 100644 --- a/src/absil/illex.fsl +++ b/src/absil/illex.fsl @@ -87,7 +87,7 @@ let eval = function | 'a' -> 10 | 'b' -> 11 | 'c' -> 12 | 'd' -> 13 | 'e' -> 14 | 'f' -> 15 | _ -> failwith "bad hexbyte" -let kwdOrInstrOrId s = if (Lazy.force kwdInstrTable).ContainsKey s then kwdOrInstr s else VAL_ID s +let kwdOrInstrOrId s = match (Lazy.force kwdInstrTable).TryFind s with Some v -> v | _ -> VAL_ID s } diff --git a/src/absil/illib.fs b/src/absil/illib.fs index b48b277a481..ab92a747b5e 100644 --- a/src/absil/illib.fs +++ b/src/absil/illib.fs @@ -1,18 +1,16 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -#if COMPILER_PUBLIC_API module public Microsoft.FSharp.Compiler.AbstractIL.Internal.Library -#else -module internal Microsoft.FSharp.Compiler.AbstractIL.Internal.Library -#endif #nowarn "1178" // The struct, record or union type 'internal_instr_extension' is not structurally comparable because the type open System -open System.Collections open System.Collections.Generic +open System.Diagnostics +open System.IO open System.Reflection -open Internal.Utilities +open System.Threading +open System.Runtime.CompilerServices #if FX_RESHAPED_REFLECTION open Microsoft.FSharp.Core.ReflectionAdapters @@ -40,18 +38,18 @@ let inline isSingleton l = | _ -> false let inline isNonNull x = not (isNull x) -let inline nonNull msg x = if isNull x then failwith ("null: " ^ msg) else x -let (===) x y = LanguagePrimitives.PhysicalEquality x y +let inline nonNull msg x = if isNull x then failwith ("null: " + msg) else x +let inline (===) x y = LanguagePrimitives.PhysicalEquality x y //--------------------------------------------------------------------- // Library: ReportTime //--------------------------------------------------------------------- let reportTime = - let tFirst = ref None - let tPrev = ref None + let tFirst = ref None + let tPrev = ref None fun showTimes descr -> if showTimes then - let t = System.Diagnostics.Process.GetCurrentProcess().UserProcessorTime.TotalSeconds + let t = Process.GetCurrentProcess().UserProcessorTime.TotalSeconds let prev = match !tPrev with None -> 0.0 | Some t -> t let first = match !tFirst with None -> (tFirst := Some t; t) | Some t -> t printf "ilwrite: TIME %10.3f (total) %10.3f (delta) - %s\n" (t - first) (t - prev) descr @@ -64,14 +62,14 @@ let reportTime = [] /// An efficient lazy for inline storage in a class type. Results in fewer thunks. type InlineDelayInit<'T when 'T : not struct> = - new (f: unit -> 'T) = {store = Unchecked.defaultof<'T>; func = System.Func<_>(f) } + new (f: unit -> 'T) = {store = Unchecked.defaultof<'T>; func = Func<_>(f) } val mutable store : 'T - val mutable func : System.Func<'T> + val mutable func : Func<'T> member x.Value = match x.func with | null -> x.store | _ -> - let res = System.Threading.LazyInitializer.EnsureInitialized(&x.store, x.func) + let res = LazyInitializer.EnsureInitialized(&x.store, x.func) x.func <- Unchecked.defaultof<_> res @@ -137,6 +135,9 @@ module Array = loop p l 0 + let existsTrue (arr: bool[]) = + let rec loop n = (n < arr.Length) && (arr.[n] || loop (n+1)) + loop 0 let findFirstIndexWhereTrue (arr: _[]) p = let rec look lo hi = @@ -241,36 +242,12 @@ module Option = let mapFold f s opt = match opt with | None -> None,s - | Some x -> let x',s' = f s x in Some x',s' - - let otherwise opt dflt = - match opt with - | None -> dflt - | Some x -> x - - let fold f z x = - match x with - | None -> z - | Some x -> f z x - - let attempt (f: unit -> 'T) = try Some (f()) with _ -> None - - - let orElseWith f opt = - match opt with - | None -> f() - | x -> x - - let orElse v opt = - match opt with - | None -> v - | x -> x - - let defaultValue v opt = - match opt with - | None -> v - | Some x -> x + | Some x -> + let x',s' = f s x + Some x',s' + let attempt (f: unit -> 'T) = try Some (f()) with _ -> None + module List = //let item n xs = List.nth xs n @@ -289,6 +266,10 @@ module List = let rec loop i xs = match xs with [] -> false | h::t -> f i h || loop (i+1) t loop 0 xs + let existsTrue (xs: bool list) = + let rec loop i xs = match xs with [] -> false | h::t -> h || loop (i+1) t + loop 0 xs + let lengthsEqAndForall2 p l1 l2 = List.length l1 = List.length l2 && List.forall2 p l1 l2 @@ -298,30 +279,11 @@ module List = | [] -> None | h::t -> if f h then Some (h,n) else findi (n+1) f t - let chop n l = - if n = List.length l then (l,[]) else // avoids allocation unless necessary - let rec loop n l acc = - if n <= 0 then (List.rev acc,l) else - match l with - | [] -> failwith "List.chop: overchop" - | (h::t) -> loop (n-1) t (h::acc) - loop n l [] - - let take n l = - if n = List.length l then l else - let rec loop acc n l = - match l with - | [] -> List.rev acc - | x::xs -> if n<=0 then List.rev acc else loop (x::acc) (n-1) xs - - loop [] n l - let rec drop n l = match l with | [] -> [] | _::xs -> if n=0 then l else drop (n-1) xs - let splitChoose select l = let rec ch acc1 acc2 l = match l with @@ -362,7 +324,7 @@ module List = let rec loop acc l = match l with | [] -> - System.Diagnostics.Debug.Assert(false, "empty list") + Debug.Assert(false, "empty list") invalidArg "l" "empty list" | [h] -> List.rev acc,h | h::t -> loop (h::acc) t @@ -381,7 +343,7 @@ module List = let headAndTail l = match l with | [] -> - System.Diagnostics.Debug.Assert(false, "empty list") + Debug.Assert(false, "empty list") failwith "List.headAndTail" | h::t -> h,t @@ -423,7 +385,7 @@ module List = let range n m = [ n .. m ] - let indexNotFound() = raise (new System.Collections.Generic.KeyNotFoundException("An index satisfying the predicate was not found in the collection")) + let indexNotFound() = raise (new KeyNotFoundException("An index satisfying the predicate was not found in the collection")) let rec assoc x l = match l with @@ -446,9 +408,6 @@ module List = | x::xs -> if i=n then f x::xs else x::mn (i+1) xs mn 0 xs - - let rec until p l = match l with [] -> [] | h::t -> if p h then [] else h :: until p t - let count pred xs = List.fold (fun n x -> if pred x then n+1 else n) 0 xs // WARNING: not tail-recursive @@ -473,38 +432,28 @@ module List = let existsSquared f xss = xss |> List.exists (fun xs -> xs |> List.exists (fun x -> f x)) let mapiFoldSquared f z xss = mapFoldSquared f z (xss |> mapiSquared (fun i j x -> (i,j,x))) -[] -type ValueOption<'T> = - | VSome of 'T - | VNone - member x.IsSome = match x with VSome _ -> true | VNone -> false - member x.IsNone = match x with VSome _ -> false | VNone -> true - member x.Value = match x with VSome r -> r | VNone -> failwith "ValueOption.Value: value is None" - [] module ValueOption = - let inline ofOption x = match x with Some x -> VSome x | None -> VNone - let inline bind f x = match x with VSome x -> f x | VNone -> VNone + let inline ofOption x = match x with Some x -> ValueSome x | None -> ValueNone + let inline bind f x = match x with ValueSome x -> f x | ValueNone -> ValueNone + let inline isSome x = match x with ValueSome _ -> true | ValueNone -> false + let inline isNone x = match x with ValueSome _ -> false | ValueNone -> true + +type String with + member inline x.StartsWithOrdinal(value) = + x.StartsWith(value, StringComparison.Ordinal) -module String = - let indexNotFound() = raise (new System.Collections.Generic.KeyNotFoundException("An index for the character was not found in the string")) + member inline x.EndsWithOrdinal(value) = + x.EndsWith(value, StringComparison.Ordinal) - let make (n: int) (c: char) : string = new System.String(c, n) +module String = + let make (n: int) (c: char) : string = new String(c, n) let get (str:string) i = str.[i] let sub (s:string) (start:int) (len:int) = s.Substring(start,len) - let index (s:string) (c:char) = - let r = s.IndexOf(c) - if r = -1 then indexNotFound() else r - - let rindex (s:string) (c:char) = - let r = s.LastIndexOf(c) - if r = -1 then indexNotFound() else r - - let contains (s:string) (c:char) = - s.IndexOf(c,0,String.length s) <> -1 + let contains (s:string) (c:char) = s.IndexOf(c) <> -1 let order = LanguagePrimitives.FastGenericComparer @@ -515,7 +464,7 @@ module String = s.ToUpperInvariant() let isUpper (s:string) = - s.Length >= 1 && System.Char.IsUpper s.[0] && not (System.Char.IsLower s.[0]) + s.Length >= 1 && Char.IsUpper s.[0] && not (Char.IsLower s.[0]) let capitalize (s:string) = if s.Length = 0 then s @@ -525,26 +474,9 @@ module String = if s.Length = 0 then s else lowercase s.[0..0] + s.[ 1.. s.Length - 1 ] + let dropPrefix (s:string) (t:string) = s.[t.Length..s.Length - 1] - let tryDropPrefix (s:string) (t:string) = - if s.StartsWith t then - Some s.[t.Length..s.Length - 1] - else - None - - let tryDropSuffix (s:string) (t:string) = - if s.EndsWith t then - Some s.[0..s.Length - t.Length - 1] - else - None - - let hasPrefix s t = Option.isSome (tryDropPrefix s t) - let dropPrefix s t = match (tryDropPrefix s t) with Some(res) -> res | None -> failwith "dropPrefix" - - let dropSuffix s t = match (tryDropSuffix s t) with Some(res) -> res | None -> failwith "dropSuffix" - - open System - open System.IO + let dropSuffix (s:string) (t:string) = s.[0..s.Length - t.Length - 1] let inline toCharArray (str: string) = str.ToCharArray() @@ -582,7 +514,7 @@ module String = let (|StartsWith|_|) pattern value = if String.IsNullOrWhiteSpace value then None - elif value.StartsWith pattern then + elif value.StartsWithOrdinal(pattern) then Some() else None @@ -600,15 +532,28 @@ module String = while not (isNull !line) do yield !line line := reader.ReadLine() - if str.EndsWith("\n") then + if str.EndsWithOrdinal("\n") then // last trailing space not returned // http://stackoverflow.com/questions/19365404/stringreader-omits-trailing-linebreak yield String.Empty |] -module Dictionary = - let inline newWithSize (size: int) = System.Collections.Generic.Dictionary<_,_>(size, HashIdentity.Structural) - +module Dictionary = + let inline newWithSize (size: int) = Dictionary<_,_>(size, HashIdentity.Structural) + +[] +type DictionaryExtensions() = + [] + static member inline BagAdd(dic: Dictionary<'key, 'value list>, key: 'key, value: 'value) = + match dic.TryGetValue key with + | true, values -> dic.[key] <- value :: values + | _ -> dic.[key] <- [value] + + [] + static member inline BagExistsValueForKey(dic: Dictionary<'key, 'value list>, key: 'key, f: 'value -> bool) = + match dic.TryGetValue key with + | true, values -> values |> List.exists f + | _ -> false module Lazy = let force (x: Lazy<'T>) = x.Force() @@ -664,7 +609,7 @@ module Map = type ResultOrException<'TResult> = | Result of 'TResult - | Exception of System.Exception + | Exception of Exception [] module ResultOrException = @@ -698,13 +643,13 @@ type ValueOrCancelled<'TResult> = /// /// A cancellable computation is passed may be cancelled via a CancellationToken, which is propagated implicitly. /// If cancellation occurs, it is propagated as data rather than by raising an OperationCanceledException. -type Cancellable<'TResult> = Cancellable of (System.Threading.CancellationToken -> ValueOrCancelled<'TResult>) +type Cancellable<'TResult> = Cancellable of (CancellationToken -> ValueOrCancelled<'TResult>) [] module Cancellable = /// Run a cancellable computation using the given cancellation token - let run (ct: System.Threading.CancellationToken) (Cancellable oper) = + let run (ct: CancellationToken) (Cancellable oper) = if ct.IsCancellationRequested then ValueOrCancelled.Cancelled (OperationCanceledException ct) else @@ -757,7 +702,7 @@ module Cancellable = /// Run the computation in a mode where it may not be cancelled. The computation never results in a /// ValueOrCancelled.Cancelled. let runWithoutCancellation comp = - let res = run System.Threading.CancellationToken.None comp + let res = run CancellationToken.None comp match res with | ValueOrCancelled.Cancelled _ -> failwith "unexpected cancellation" | ValueOrCancelled.Value r -> r @@ -811,7 +756,7 @@ type CancellableBuilder() = member x.ReturnFrom(v) = v member x.Combine(e1,e2) = e1 |> Cancellable.bind (fun () -> e2) member x.TryWith(e,handler) = Cancellable.tryWith e handler - member x.Using(resource,e) = Cancellable.tryFinally (e resource) (fun () -> (resource :> System.IDisposable).Dispose()) + member x.Using(resource,e) = Cancellable.tryFinally (e resource) (fun () -> (resource :> IDisposable).Dispose()) member x.TryFinally(e,compensation) = Cancellable.tryFinally e compensation member x.Delay(f) = Cancellable.delay f member x.Zero() = Cancellable.ret () @@ -836,7 +781,6 @@ type Eventually<'T> = [] module Eventually = - open System.Threading let rec box e = match e with @@ -859,7 +803,7 @@ module Eventually = /// /// If cancellation happens, the operation is left half-complete, ready to resume. let repeatedlyProgressUntilDoneOrTimeShareOverOrCanceled timeShareInMilliseconds (ct: CancellationToken) runner e = - let sw = new System.Diagnostics.Stopwatch() + let sw = new Stopwatch() let rec runTimeShare ctok e = runner ctok (fun ctok -> sw.Reset() @@ -952,11 +896,10 @@ let _ = eventually { use x = null in return 1 } type UniqueStampGenerator<'T when 'T : equality>() = let encodeTab = new Dictionary<'T,int>(HashIdentity.Structural) let mutable nItems = 0 - let encode str = - if encodeTab.ContainsKey(str) - then - encodeTab.[str] - else + let encode str = + match encodeTab.TryGetValue(str) with + | true, idx -> idx + | _ -> let idx = nItems encodeTab.[str] <- idx nItems <- nItems + 1 @@ -970,7 +913,7 @@ type UniqueStampGenerator<'T when 'T : equality>() = type MemoizationTable<'T,'U>(compute: 'T -> 'U, keyComparer: IEqualityComparer<'T>, ?canMemoize) = - let table = new System.Collections.Generic.Dictionary<'T,'U>(keyComparer) + let table = new Dictionary<'T,'U>(keyComparer) member t.Apply(x) = if (match canMemoize with None -> true | Some f -> f x) then let mutable res = Unchecked.defaultof<'U> @@ -1022,11 +965,11 @@ type LazyWithContext<'T,'ctxt> = | null -> x.value | _ -> // Enter the lock in case another thread is in the process of evaluating the result - System.Threading.Monitor.Enter(x); + Monitor.Enter(x); try x.UnsynchronizedForce(ctxt) finally - System.Threading.Monitor.Exit(x) + Monitor.Exit(x) member x.UnsynchronizedForce(ctxt) = match x.funcOrException with @@ -1174,7 +1117,7 @@ module NameMap = [] module NameMultiMap = let existsInRange f (m: NameMultiMap<'T>) = NameMap.exists (fun _ l -> List.exists f l) m - let find v (m: NameMultiMap<'T>) = match Map.tryFind v m with None -> [] | Some r -> r + let find v (m: NameMultiMap<'T>) = match m.TryGetValue v with true, r -> r | _ -> [] let add v x (m: NameMultiMap<'T>) = NameMap.add v (x :: find v m) m let range (m: NameMultiMap<'T>) = Map.foldBack (fun _ x sofar -> x @ sofar) m [] let rangeReversingEachBucket (m: NameMultiMap<'T>) = Map.foldBack (fun _ x sofar -> List.rev x @ sofar) m [] @@ -1188,10 +1131,9 @@ module NameMultiMap = [] module MultiMap = let existsInRange f (m: MultiMap<_,_>) = Map.exists (fun _ l -> List.exists f l) m - let find v (m: MultiMap<_,_>) = match Map.tryFind v m with None -> [] | Some r -> r + let find v (m: MultiMap<_,_>) = match m.TryGetValue v with true, r -> r | _ -> [] let add v x (m: MultiMap<_,_>) = Map.add v (x :: find v m) m let range (m: MultiMap<_,_>) = Map.foldBack (fun _ x sofar -> x @ sofar) m [] - //let chooseRange f (m: MultiMap<_,_>) = Map.foldBack (fun _ x sofar -> List.choose f x @ sofar) m [] let empty : MultiMap<_,_> = Map.empty let initBy f xs : MultiMap<_,_> = xs |> Seq.groupBy f |> Seq.map (fun (k,v) -> (k,List.ofSeq v)) |> Map.ofSeq @@ -1200,11 +1142,6 @@ type LayeredMap<'Key,'Value when 'Key : comparison> = Map<'Key,'Value> type Map<'Key,'Value when 'Key : comparison> with static member Empty : Map<'Key,'Value> = Map.empty - member m.TryGetValue (key,res:byref<'Value>) = - match m.TryFind key with - | None -> false - | Some r -> res <- r; true - member x.Values = [ for (KeyValue(_,v)) in x -> v ] member x.AddAndMarkAsCollapsible (kvs: _[]) = (x,kvs) ||> Array.fold (fun x (KeyValue(k,v)) -> x.Add(k,v)) member x.LinearTryModifyThenLaterFlatten (key, f: 'Value option -> 'Value) = x.Add (key, f (x.TryFind key)) @@ -1214,68 +1151,98 @@ type Map<'Key,'Value when 'Key : comparison> with [] type LayeredMultiMap<'Key,'Value when 'Key : equality and 'Key : comparison>(contents : LayeredMap<'Key,'Value list>) = member x.Add (k,v) = LayeredMultiMap(contents.Add(k,v :: x.[k])) - member x.Item with get k = match contents.TryFind k with None -> [] | Some l -> l + member x.Item with get k = match contents.TryGetValue k with true, l -> l | _ -> [] member x.AddAndMarkAsCollapsible (kvs: _[]) = let x = (x,kvs) ||> Array.fold (fun x (KeyValue(k,v)) -> x.Add(k,v)) x.MarkAsCollapsible() member x.MarkAsCollapsible() = LayeredMultiMap(contents.MarkAsCollapsible()) member x.TryFind k = contents.TryFind k + member x.TryGetValue k = contents.TryGetValue k member x.Values = contents.Values |> List.concat static member Empty : LayeredMultiMap<'Key,'Value> = LayeredMultiMap LayeredMap.Empty [] module Shim = - open System.IO - #if FX_RESHAPED_REFLECTION open PrimReflectionAdapters open Microsoft.FSharp.Core.ReflectionAdapters #endif type IFileSystem = + + /// A shim over File.ReadAllBytes abstract ReadAllBytesShim: fileName:string -> byte[] - abstract FileStreamReadShim: fileName:string -> System.IO.Stream - abstract FileStreamCreateShim: fileName:string -> System.IO.Stream - abstract FileStreamWriteExistingShim: fileName:string -> System.IO.Stream + + /// A shim over FileStream with FileMode.Open,FileAccess.Read,FileShare.ReadWrite + abstract FileStreamReadShim: fileName:string -> Stream + + /// A shim over FileStream with FileMode.Create,FileAccess.Write,FileShare.Read + abstract FileStreamCreateShim: fileName:string -> Stream + + /// A shim over FileStream with FileMode.Open,FileAccess.Write,FileShare.Read + abstract FileStreamWriteExistingShim: fileName:string -> Stream /// Take in a filename with an absolute path, and return the same filename /// but canonicalized with respect to extra path separators (e.g. C:\\\\foo.txt) /// and '..' portions abstract GetFullPathShim: fileName:string -> string + + /// A shim over Path.IsPathRooted abstract IsPathRootedShim: path:string -> bool + + /// A shim over Path.IsInvalidPath abstract IsInvalidPathShim: filename:string -> bool + + /// A shim over Path.GetTempPath abstract GetTempPathShim : unit -> string /// Utc time of the last modification - abstract GetLastWriteTimeShim: fileName:string -> System.DateTime - abstract SafeExists: fileName:string -> bool - abstract FileDelete: fileName:string -> unit - abstract AssemblyLoadFrom: fileName:string -> System.Reflection.Assembly - abstract AssemblyLoad: assemblyName:System.Reflection.AssemblyName -> System.Reflection.Assembly + abstract GetLastWriteTimeShim: fileName: string -> DateTime + + /// A shim over File.Exists + abstract SafeExists: fileName: string -> bool + + /// A shim over File.Delete + abstract FileDelete: fileName: string -> unit + + /// Used to load type providers and located assemblies in F# Interactive + abstract AssemblyLoadFrom: fileName: string -> Assembly + + /// Used to load a dependency for F# Interactive and in an unused corner-case of type provider loading + abstract AssemblyLoad: assemblyName: AssemblyName -> Assembly + + /// Used to determine if a file will not be subject to deletion during the lifetime of a typical client process. + abstract IsStableFileHeuristic: fileName: string -> bool type DefaultFileSystem() = interface IFileSystem with - member __.AssemblyLoadFrom(fileName:string) = - Assembly.LoadFrom fileName - member __.AssemblyLoad(assemblyName:System.Reflection.AssemblyName) = + + member __.AssemblyLoadFrom(fileName: string) = + Assembly.UnsafeLoadFrom fileName + + member __.AssemblyLoad(assemblyName: AssemblyName) = Assembly.Load assemblyName - member __.ReadAllBytesShim (fileName:string) = File.ReadAllBytes fileName - member __.FileStreamReadShim (fileName:string) = new FileStream(fileName,FileMode.Open,FileAccess.Read,FileShare.ReadWrite) :> Stream - member __.FileStreamCreateShim (fileName:string) = new FileStream(fileName,FileMode.Create,FileAccess.Write,FileShare.Read ,0x1000,false) :> Stream - member __.FileStreamWriteExistingShim (fileName:string) = new FileStream(fileName,FileMode.Open,FileAccess.Write,FileShare.Read ,0x1000,false) :> Stream - member __.GetFullPathShim (fileName:string) = System.IO.Path.GetFullPath fileName + member __.ReadAllBytesShim (fileName: string) = File.ReadAllBytes fileName - member __.IsPathRootedShim (path:string) = Path.IsPathRooted path + member __.FileStreamReadShim (fileName: string) = new FileStream(fileName,FileMode.Open,FileAccess.Read,FileShare.ReadWrite) :> Stream - member __.IsInvalidPathShim(path:string) = + member __.FileStreamCreateShim (fileName: string) = new FileStream(fileName,FileMode.Create,FileAccess.Write,FileShare.Read ,0x1000,false) :> Stream + + member __.FileStreamWriteExistingShim (fileName: string) = new FileStream(fileName,FileMode.Open,FileAccess.Write,FileShare.Read ,0x1000,false) :> Stream + + member __.GetFullPathShim (fileName: string) = System.IO.Path.GetFullPath fileName + + member __.IsPathRootedShim (path: string) = Path.IsPathRooted path + + member __.IsInvalidPathShim(path: string) = let isInvalidPath(p:string) = - String.IsNullOrEmpty(p) || p.IndexOfAny(System.IO.Path.GetInvalidPathChars()) <> -1 + String.IsNullOrEmpty(p) || p.IndexOfAny(Path.GetInvalidPathChars()) <> -1 let isInvalidFilename(p:string) = - String.IsNullOrEmpty(p) || p.IndexOfAny(System.IO.Path.GetInvalidFileNameChars()) <> -1 + String.IsNullOrEmpty(p) || p.IndexOfAny(Path.GetInvalidFileNameChars()) <> -1 let isInvalidDirectory(d:string) = d=null || d.IndexOfAny(Path.GetInvalidPathChars()) <> -1 @@ -1285,14 +1252,31 @@ module Shim = let filename = Path.GetFileName(path) isInvalidDirectory(directory) || isInvalidFilename(filename) - member __.GetTempPathShim() = System.IO.Path.GetTempPath() + member __.GetTempPathShim() = Path.GetTempPath() member __.GetLastWriteTimeShim (fileName:string) = File.GetLastWriteTimeUtc fileName - member __.SafeExists (fileName:string) = System.IO.File.Exists fileName - member __.FileDelete (fileName:string) = System.IO.File.Delete fileName - type System.Text.Encoding with - static member GetEncodingShim(n:int) = - System.Text.Encoding.GetEncoding(n) + member __.SafeExists (fileName:string) = File.Exists fileName + + member __.FileDelete (fileName:string) = File.Delete fileName + + member __.IsStableFileHeuristic (fileName: string) = + let directory = Path.GetDirectoryName(fileName) + directory.Contains("Reference Assemblies/") || + directory.Contains("Reference Assemblies\\") || + directory.Contains("packages/") || + directory.Contains("packages\\") || + directory.Contains("lib/mono/") let mutable FileSystem = DefaultFileSystem() :> IFileSystem + + type File with + static member ReadBinaryChunk (fileName, start, len) = + use stream = FileSystem.FileStreamReadShim fileName + stream.Seek(int64 start, SeekOrigin.Begin) |> ignore + let buffer = Array.zeroCreate len + let mutable n = 0 + while n < len do + n <- n + stream.Read(buffer, n, len-n) + buffer + diff --git a/src/absil/ilmorph.fs b/src/absil/ilmorph.fs index dc0d27e1feb..c6d009cd4d3 100644 --- a/src/absil/ilmorph.fs +++ b/src/absil/ilmorph.fs @@ -44,66 +44,66 @@ let code_instr2instrs f (code: ILCode) = -let code_instr2instr_typ2typ (finstr,fty) (c:ILCode) = +let code_instr2instr_ty2ty (finstr,fty) (c:ILCode) = let c = code_instr2instr finstr c { c with Exceptions = c.Exceptions |> List.map (fun e -> { e with Clause = e.Clause |> (function ILExceptionClause.TypeCatch (ilty, b) -> ILExceptionClause.TypeCatch (fty ilty, b) | cl -> cl) }) } // -------------------------------------------------------------------- -// Standard morphisms - mapping types etc. +// Standard morphisms - mapping tyes etc. // -------------------------------------------------------------------- -let rec typ_tref2tref f x = +let rec ty_tref2tref f x = match x with - | ILType.Ptr t -> ILType.Ptr (typ_tref2tref f t) + | ILType.Ptr t -> ILType.Ptr (ty_tref2tref f t) | ILType.FunctionPointer x -> ILType.FunctionPointer { x with - ArgTypes=List.map (typ_tref2tref f) x.ArgTypes; - ReturnType=typ_tref2tref f x.ReturnType} - | ILType.Byref t -> ILType.Byref (typ_tref2tref f t) + ArgTypes=List.map (ty_tref2tref f) x.ArgTypes; + ReturnType=ty_tref2tref f x.ReturnType} + | ILType.Byref t -> ILType.Byref (ty_tref2tref f t) | ILType.Boxed cr -> mkILBoxedType (tspec_tref2tref f cr) | ILType.Value ir -> ILType.Value (tspec_tref2tref f ir) - | ILType.Array (s,ty) -> ILType.Array (s,typ_tref2tref f ty) + | ILType.Array (s,ty) -> ILType.Array (s,ty_tref2tref f ty) | ILType.TypeVar v -> ILType.TypeVar v - | ILType.Modified (req,tref,ty) -> ILType.Modified (req, f tref, typ_tref2tref f ty) + | ILType.Modified (req,tref,ty) -> ILType.Modified (req, f tref, ty_tref2tref f ty) | ILType.Void -> ILType.Void and tspec_tref2tref f (x:ILTypeSpec) = - mkILTySpec(f x.TypeRef, List.map (typ_tref2tref f) x.GenericArgs) + mkILTySpec(f x.TypeRef, List.map (ty_tref2tref f) x.GenericArgs) -let rec typ_scoref2scoref_tyvar2typ ((_fscope,ftyvar) as fs)x = +let rec ty_scoref2scoref_tyvar2ty ((_fscope,ftyvar) as fs)x = match x with - | ILType.Ptr t -> ILType.Ptr (typ_scoref2scoref_tyvar2typ fs t) - | ILType.FunctionPointer t -> ILType.FunctionPointer (callsig_scoref2scoref_tyvar2typ fs t) - | ILType.Byref t -> ILType.Byref (typ_scoref2scoref_tyvar2typ fs t) - | ILType.Boxed cr -> mkILBoxedType (tspec_scoref2scoref_tyvar2typ fs cr) - | ILType.Value ir -> ILType.Value (tspec_scoref2scoref_tyvar2typ fs ir) - | ILType.Array (s,ty) -> ILType.Array (s,typ_scoref2scoref_tyvar2typ fs ty) + | ILType.Ptr t -> ILType.Ptr (ty_scoref2scoref_tyvar2ty fs t) + | ILType.FunctionPointer t -> ILType.FunctionPointer (callsig_scoref2scoref_tyvar2ty fs t) + | ILType.Byref t -> ILType.Byref (ty_scoref2scoref_tyvar2ty fs t) + | ILType.Boxed cr -> mkILBoxedType (tspec_scoref2scoref_tyvar2ty fs cr) + | ILType.Value ir -> ILType.Value (tspec_scoref2scoref_tyvar2ty fs ir) + | ILType.Array (s,ty) -> ILType.Array (s,ty_scoref2scoref_tyvar2ty fs ty) | ILType.TypeVar v -> ftyvar v | x -> x -and tspec_scoref2scoref_tyvar2typ fs (x:ILTypeSpec) = - ILTypeSpec.Create(morphILScopeRefsInILTypeRef (fst fs) x.TypeRef,typs_scoref2scoref_tyvar2typ fs x.GenericArgs) -and callsig_scoref2scoref_tyvar2typ f x = +and tspec_scoref2scoref_tyvar2ty fs (x:ILTypeSpec) = + ILTypeSpec.Create(morphILScopeRefsInILTypeRef (fst fs) x.TypeRef,tys_scoref2scoref_tyvar2ty fs x.GenericArgs) +and callsig_scoref2scoref_tyvar2ty f x = { x with - ArgTypes=List.map (typ_scoref2scoref_tyvar2typ f) x.ArgTypes; - ReturnType=typ_scoref2scoref_tyvar2typ f x.ReturnType} -and typs_scoref2scoref_tyvar2typ f i = List.map (typ_scoref2scoref_tyvar2typ f) i -and gparams_scoref2scoref_tyvar2typ f i = List.map (gparam_scoref2scoref_tyvar2typ f) i -and gparam_scoref2scoref_tyvar2typ _f i = i + ArgTypes=List.map (ty_scoref2scoref_tyvar2ty f) x.ArgTypes; + ReturnType=ty_scoref2scoref_tyvar2ty f x.ReturnType} +and tys_scoref2scoref_tyvar2ty f i = List.map (ty_scoref2scoref_tyvar2ty f) i +and gparams_scoref2scoref_tyvar2ty f i = List.map (gparam_scoref2scoref_tyvar2ty f) i +and gparam_scoref2scoref_tyvar2ty _f i = i and morphILScopeRefsInILTypeRef fscope (x:ILTypeRef) = ILTypeRef.Create(scope=fscope x.Scope, enclosing=x.Enclosing, name = x.Name) -let callsig_typ2typ f (x: ILCallingSignature) = +let callsig_ty2ty f (x: ILCallingSignature) = { CallingConv=x.CallingConv; ArgTypes=List.map f x.ArgTypes; ReturnType=f x.ReturnType} -let gparam_typ2typ f gf = {gf with Constraints = List.map f gf.Constraints} -let gparams_typ2typ f gfs = List.map (gparam_typ2typ f) gfs -let typs_typ2typ (f: ILType -> ILType) x = List.map f x -let mref_typ2typ (f: ILType -> ILType) (x:ILMethodRef) = - ILMethodRef.Create(enclosingTypeRef= (f (mkILBoxedType (mkILNonGenericTySpec x.EnclosingTypeRef))).TypeRef, +let gparam_ty2ty f gf = {gf with Constraints = List.map f gf.Constraints} +let gparams_ty2ty f gfs = List.map (gparam_ty2ty f) gfs +let tys_ty2ty (f: ILType -> ILType) x = List.map f x +let mref_ty2ty (f: ILType -> ILType) (x:ILMethodRef) = + ILMethodRef.Create(enclosingTypeRef= (f (mkILBoxedType (mkILNonGenericTySpec x.DeclaringTypeRef))).TypeRef, callingConv=x.CallingConv, name=x.Name, genericArity=x.GenericArity, @@ -113,37 +113,37 @@ let mref_typ2typ (f: ILType -> ILType) (x:ILMethodRef) = type formal_scopeCtxt = Choice -let mspec_typ2typ (((factualty : ILType -> ILType) , (fformalty: formal_scopeCtxt -> ILType -> ILType))) (x: ILMethodSpec) = - mkILMethSpecForMethRefInTy(mref_typ2typ (fformalty (Choice1Of2 x)) x.MethodRef, - factualty x.EnclosingType, - typs_typ2typ factualty x.GenericArgs) +let mspec_ty2ty (((factualty : ILType -> ILType) , (fformalty: formal_scopeCtxt -> ILType -> ILType))) (x: ILMethodSpec) = + mkILMethSpecForMethRefInTy(mref_ty2ty (fformalty (Choice1Of2 x)) x.MethodRef, + factualty x.DeclaringType, + tys_ty2ty factualty x.GenericArgs) -let fref_typ2typ (f: ILType -> ILType) x = - { x with EnclosingTypeRef = (f (mkILBoxedType (mkILNonGenericTySpec x.EnclosingTypeRef))).TypeRef; +let fref_ty2ty (f: ILType -> ILType) x = + { x with DeclaringTypeRef = (f (mkILBoxedType (mkILNonGenericTySpec x.DeclaringTypeRef))).TypeRef; Type= f x.Type } -let fspec_typ2typ ((factualty,(fformalty : formal_scopeCtxt -> ILType -> ILType))) x = - { FieldRef=fref_typ2typ (fformalty (Choice2Of2 x)) x.FieldRef; - EnclosingType= factualty x.EnclosingType } +let fspec_ty2ty ((factualty,(fformalty : formal_scopeCtxt -> ILType -> ILType))) x = + { FieldRef=fref_ty2ty (fformalty (Choice2Of2 x)) x.FieldRef; + DeclaringType= factualty x.DeclaringType } -let rec celem_typ2typ f celem = +let rec celem_ty2ty f celem = match celem with | ILAttribElem.Type (Some ty) -> ILAttribElem.Type (Some (f ty)) | ILAttribElem.TypeRef (Some tref) -> ILAttribElem.TypeRef (Some (f (mkILBoxedType (mkILNonGenericTySpec tref))).TypeRef) - | ILAttribElem.Array (elemTy,elems) -> ILAttribElem.Array (f elemTy, List.map (celem_typ2typ f) elems) + | ILAttribElem.Array (elemTy,elems) -> ILAttribElem.Array (f elemTy, List.map (celem_ty2ty f) elems) | _ -> celem -let cnamedarg_typ2typ f ((nm, ty, isProp, elem) : ILAttributeNamedArg) = - (nm, f ty, isProp, celem_typ2typ f elem) +let cnamedarg_ty2ty f ((nm, ty, isProp, elem) : ILAttributeNamedArg) = + (nm, f ty, isProp, celem_ty2ty f elem) -let cattr_typ2typ ilg f c = - let meth = mspec_typ2typ (f, (fun _ -> f)) c.Method +let cattr_ty2ty ilg f c = + let meth = mspec_ty2ty (f, (fun _ -> f)) c.Method // dev11 M3 defensive coding: if anything goes wrong with attribute decoding or encoding, then back out. if morphCustomAttributeData then try let elems,namedArgs = IL.decodeILAttribData ilg c - let elems = elems |> List.map (celem_typ2typ f) - let namedArgs = namedArgs |> List.map (cnamedarg_typ2typ f) + let elems = elems |> List.map (celem_ty2ty f) + let namedArgs = namedArgs |> List.map (cnamedarg_ty2ty f) IL.mkILCustomAttribMethRef ilg (meth, elems, namedArgs) with _ -> { c with Method = meth } @@ -151,26 +151,26 @@ let cattr_typ2typ ilg f c = { c with Method = meth } -let cattrs_typ2typ ilg f (cs: ILAttributes) = - mkILCustomAttrs (List.map (cattr_typ2typ ilg f) cs.AsList) +let cattrs_ty2ty ilg f (cs: ILAttributes) = + mkILCustomAttrs (List.map (cattr_ty2ty ilg f) cs.AsList) -let fdef_typ2typ ilg ftype (fd: ILFieldDef) = - {fd with Type=ftype fd.Type; - CustomAttrs=cattrs_typ2typ ilg ftype fd.CustomAttrs} +let fdef_ty2ty ilg ftye (fd: ILFieldDef) = + fd.With(fieldType=ftye fd.FieldType, + customAttrs=cattrs_ty2ty ilg ftye fd.CustomAttrs) -let local_typ2typ f (l: ILLocal) = {l with Type = f l.Type} -let varargs_typ2typ f (varargs: ILVarArgs) = Option.map (List.map f) varargs +let local_ty2ty f (l: ILLocal) = {l with Type = f l.Type} +let varargs_ty2ty f (varargs: ILVarArgs) = Option.map (List.map f) varargs (* REVIEW: convert varargs *) let morphILTypesInILInstr ((factualty,fformalty)) i = let factualty = factualty (Some i) - let conv_fspec fr = fspec_typ2typ (factualty,fformalty (Some i)) fr - let conv_mspec mr = mspec_typ2typ (factualty,fformalty (Some i)) mr + let conv_fspec fr = fspec_ty2ty (factualty,fformalty (Some i)) fr + let conv_mspec mr = mspec_ty2ty (factualty,fformalty (Some i)) mr match i with - | I_calli (a,mref,varargs) -> I_calli (a,callsig_typ2typ (factualty) mref,varargs_typ2typ factualty varargs) - | I_call (a,mr,varargs) -> I_call (a,conv_mspec mr,varargs_typ2typ factualty varargs) - | I_callvirt (a,mr,varargs) -> I_callvirt (a,conv_mspec mr,varargs_typ2typ factualty varargs) - | I_callconstraint (a,ty,mr,varargs) -> I_callconstraint (a,factualty ty,conv_mspec mr,varargs_typ2typ factualty varargs) - | I_newobj (mr,varargs) -> I_newobj (conv_mspec mr,varargs_typ2typ factualty varargs) + | I_calli (a,mref,varargs) -> I_calli (a,callsig_ty2ty (factualty) mref,varargs_ty2ty factualty varargs) + | I_call (a,mr,varargs) -> I_call (a,conv_mspec mr,varargs_ty2ty factualty varargs) + | I_callvirt (a,mr,varargs) -> I_callvirt (a,conv_mspec mr,varargs_ty2ty factualty varargs) + | I_callconstraint (a,ty,mr,varargs) -> I_callconstraint (a,factualty ty,conv_mspec mr,varargs_ty2ty factualty varargs) + | I_newobj (mr,varargs) -> I_newobj (conv_mspec mr,varargs_ty2ty factualty varargs) | I_ldftn mr -> I_ldftn (conv_mspec mr) | I_ldvirtftn mr -> I_ldvirtftn (conv_mspec mr) | I_ldfld (a,b,fr) -> I_ldfld (a,b,conv_fspec fr) @@ -179,42 +179,42 @@ let morphILTypesInILInstr ((factualty,fformalty)) i = | I_ldflda fr -> I_ldflda (conv_fspec fr) | I_stfld (a,b,fr) -> I_stfld (a,b,conv_fspec fr) | I_stsfld (a,fr) -> I_stsfld (a,conv_fspec fr) - | I_castclass typ -> I_castclass (factualty typ) - | I_isinst typ -> I_isinst (factualty typ) - | I_initobj typ -> I_initobj (factualty typ) - | I_cpobj typ -> I_cpobj (factualty typ) - | I_stobj (al,vol,typ) -> I_stobj (al,vol,factualty typ) - | I_ldobj (al,vol,typ) -> I_ldobj (al,vol,factualty typ) - | I_box typ -> I_box (factualty typ) - | I_unbox typ -> I_unbox (factualty typ) - | I_unbox_any typ -> I_unbox_any (factualty typ) - | I_ldelem_any (shape,typ) -> I_ldelem_any (shape,factualty typ) - | I_stelem_any (shape,typ) -> I_stelem_any (shape,factualty typ) - | I_newarr (shape,typ) -> I_newarr (shape,factualty typ) - | I_ldelema (ro,isNativePtr,shape,typ) -> I_ldelema (ro,isNativePtr,shape,factualty typ) - | I_sizeof typ -> I_sizeof (factualty typ) + | I_castclass ty -> I_castclass (factualty ty) + | I_isinst ty -> I_isinst (factualty ty) + | I_initobj ty -> I_initobj (factualty ty) + | I_cpobj ty -> I_cpobj (factualty ty) + | I_stobj (al,vol,ty) -> I_stobj (al,vol,factualty ty) + | I_ldobj (al,vol,ty) -> I_ldobj (al,vol,factualty ty) + | I_box ty -> I_box (factualty ty) + | I_unbox ty -> I_unbox (factualty ty) + | I_unbox_any ty -> I_unbox_any (factualty ty) + | I_ldelem_any (shape,ty) -> I_ldelem_any (shape,factualty ty) + | I_stelem_any (shape,ty) -> I_stelem_any (shape,factualty ty) + | I_newarr (shape,ty) -> I_newarr (shape,factualty ty) + | I_ldelema (ro,isNativePtr,shape,ty) -> I_ldelema (ro,isNativePtr,shape,factualty ty) + | I_sizeof ty -> I_sizeof (factualty ty) | I_ldtoken tok -> match tok with - | ILToken.ILType typ -> I_ldtoken (ILToken.ILType (factualty typ)) + | ILToken.ILType ty -> I_ldtoken (ILToken.ILType (factualty ty)) | ILToken.ILMethod mr -> I_ldtoken (ILToken.ILMethod (conv_mspec mr)) | ILToken.ILField fr -> I_ldtoken (ILToken.ILField (conv_fspec fr)) | x -> x -let return_typ2typ ilg f (r:ILReturn) = {r with Type=f r.Type; CustomAttrs=cattrs_typ2typ ilg f r.CustomAttrs} -let param_typ2typ ilg f (p: ILParameter) = {p with Type=f p.Type; CustomAttrs=cattrs_typ2typ ilg f p.CustomAttrs} +let return_ty2ty ilg f (r:ILReturn) = {r with Type=f r.Type; CustomAttrsStored= storeILCustomAttrs (cattrs_ty2ty ilg f r.CustomAttrs)} +let param_ty2ty ilg f (p: ILParameter) = {p with Type=f p.Type; CustomAttrsStored= storeILCustomAttrs (cattrs_ty2ty ilg f p.CustomAttrs)} let morphILMethodDefs f (m:ILMethodDefs) = mkILMethods (List.map f m.AsList) let fdefs_fdef2fdef f (m:ILFieldDefs) = mkILFields (List.map f m.AsList) -(* use this when the conversion produces just one type... *) +(* use this when the conversion produces just one tye... *) let morphILTypeDefs f (m: ILTypeDefs) = mkILTypeDefsFromArray (Array.map f m.AsArray) -let locals_typ2typ f ls = List.map (local_typ2typ f) ls +let locals_ty2ty f ls = List.map (local_ty2ty f) ls -let ilmbody_instr2instr_typ2typ fs (il: ILMethodBody) = - let (finstr,ftype) = fs - {il with Code=code_instr2instr_typ2typ (finstr,ftype) il.Code; - Locals = locals_typ2typ ftype il.Locals } +let ilmbody_instr2instr_ty2ty fs (il: ILMethodBody) = + let (finstr,ftye) = fs + {il with Code=code_instr2instr_ty2ty (finstr,ftye) il.Code; + Locals = locals_ty2ty ftye il.Locals } let morphILMethodBody (filmbody) (x: ILLazyMethodBody) = let c = @@ -223,103 +223,99 @@ let morphILMethodBody (filmbody) (x: ILLazyMethodBody) = | x -> x mkMethBodyAux c -let ospec_typ2typ f (OverridesSpec(mref,ty)) = OverridesSpec(mref_typ2typ f mref, f ty) - -let mdef_typ2typ_ilmbody2ilmbody ilg fs md = - let (ftype,filmbody) = fs - let ftype' = ftype (Some md) - let body' = morphILMethodBody (filmbody (Some md)) md.mdBody - {md with - GenericParams=gparams_typ2typ ftype' md.GenericParams; - mdBody= body'; - Parameters = List.map (param_typ2typ ilg ftype') md.Parameters; - Return = return_typ2typ ilg ftype' md.Return; - CustomAttrs=cattrs_typ2typ ilg ftype' md.CustomAttrs } - -let fdefs_typ2typ ilg f x = fdefs_fdef2fdef (fdef_typ2typ ilg f) x - -let mdefs_typ2typ_ilmbody2ilmbody ilg fs x = morphILMethodDefs (mdef_typ2typ_ilmbody2ilmbody ilg fs) x - -let mimpl_typ2typ f e = - { Overrides = ospec_typ2typ f e.Overrides; - OverrideBy = mspec_typ2typ (f,(fun _ -> f)) e.OverrideBy; } - -let edef_typ2typ ilg f e = - { e with - Type = Option.map f e.Type; - AddMethod = mref_typ2typ f e.AddMethod; - RemoveMethod = mref_typ2typ f e.RemoveMethod; - FireMethod = Option.map (mref_typ2typ f) e.FireMethod; - OtherMethods = List.map (mref_typ2typ f) e.OtherMethods; - CustomAttrs = cattrs_typ2typ ilg f e.CustomAttrs } - -let pdef_typ2typ ilg f p = - { p with - SetMethod = Option.map (mref_typ2typ f) p.SetMethod; - GetMethod = Option.map (mref_typ2typ f) p.GetMethod; - Type = f p.Type; - Args = List.map f p.Args; - CustomAttrs = cattrs_typ2typ ilg f p.CustomAttrs } - -let pdefs_typ2typ ilg f (pdefs: ILPropertyDefs) = mkILProperties (List.map (pdef_typ2typ ilg f) pdefs.AsList) -let edefs_typ2typ ilg f (edefs: ILEventDefs) = mkILEvents (List.map (edef_typ2typ ilg f) edefs.AsList) - -let mimpls_typ2typ f (mimpls : ILMethodImplDefs) = mkILMethodImpls (List.map (mimpl_typ2typ f) mimpls.AsList) - -let rec tdef_typ2typ_ilmbody2ilmbody_mdefs2mdefs ilg enc fs td = - let (ftype,fmdefs) = fs - let ftype' = ftype (Some (enc,td)) None +let ospec_ty2ty f (OverridesSpec(mref,ty)) = OverridesSpec(mref_ty2ty f mref, f ty) + +let mdef_ty2ty_ilmbody2ilmbody ilg fs (md: ILMethodDef) = + let (ftye,filmbody) = fs + let ftye' = ftye (Some md) + let body' = morphILMethodBody (filmbody (Some md)) md.Body + md.With(genericParams=gparams_ty2ty ftye' md.GenericParams, + body= body', + parameters = List.map (param_ty2ty ilg ftye') md.Parameters, + ret = return_ty2ty ilg ftye' md.Return, + customAttrs=cattrs_ty2ty ilg ftye' md.CustomAttrs) + +let fdefs_ty2ty ilg f x = fdefs_fdef2fdef (fdef_ty2ty ilg f) x + +let mdefs_ty2ty_ilmbody2ilmbody ilg fs x = morphILMethodDefs (mdef_ty2ty_ilmbody2ilmbody ilg fs) x + +let mimpl_ty2ty f e = + { Overrides = ospec_ty2ty f e.Overrides; + OverrideBy = mspec_ty2ty (f,(fun _ -> f)) e.OverrideBy; } + +let edef_ty2ty ilg f (e: ILEventDef) = + e.With(eventType = Option.map f e.EventType, + addMethod = mref_ty2ty f e.AddMethod, + removeMethod = mref_ty2ty f e.RemoveMethod, + fireMethod = Option.map (mref_ty2ty f) e.FireMethod, + otherMethods = List.map (mref_ty2ty f) e.OtherMethods, + customAttrs = cattrs_ty2ty ilg f e.CustomAttrs) + +let pdef_ty2ty ilg f (p: ILPropertyDef) = + p.With(setMethod = Option.map (mref_ty2ty f) p.SetMethod, + getMethod = Option.map (mref_ty2ty f) p.GetMethod, + propertyType = f p.PropertyType, + args = List.map f p.Args, + customAttrs = cattrs_ty2ty ilg f p.CustomAttrs) + +let pdefs_ty2ty ilg f (pdefs: ILPropertyDefs) = mkILProperties (List.map (pdef_ty2ty ilg f) pdefs.AsList) +let edefs_ty2ty ilg f (edefs: ILEventDefs) = mkILEvents (List.map (edef_ty2ty ilg f) edefs.AsList) + +let mimpls_ty2ty f (mimpls : ILMethodImplDefs) = mkILMethodImpls (List.map (mimpl_ty2ty f) mimpls.AsList) + +let rec tdef_ty2ty_ilmbody2ilmbody_mdefs2mdefs ilg enc fs (td: ILTypeDef) = + let (ftye,fmdefs) = fs + let ftye' = ftye (Some (enc,td)) None let mdefs' = fmdefs (enc,td) td.Methods - let fdefs' = fdefs_typ2typ ilg ftype' td.Fields - {td with Implements= List.map ftype' td.Implements; - GenericParams= gparams_typ2typ ftype' td.GenericParams; - Extends = Option.map ftype' td.Extends; - Methods=mdefs'; - NestedTypes=tdefs_typ2typ_ilmbody2ilmbody_mdefs2mdefs ilg (enc@[td]) fs td.NestedTypes; - Fields=fdefs'; - MethodImpls = mimpls_typ2typ ftype' td.MethodImpls; - Events = edefs_typ2typ ilg ftype' td.Events; - Properties = pdefs_typ2typ ilg ftype' td.Properties; - CustomAttrs = cattrs_typ2typ ilg ftype' td.CustomAttrs; - } - -and tdefs_typ2typ_ilmbody2ilmbody_mdefs2mdefs ilg enc fs tdefs = - morphILTypeDefs (tdef_typ2typ_ilmbody2ilmbody_mdefs2mdefs ilg enc fs) tdefs + let fdefs' = fdefs_ty2ty ilg ftye' td.Fields + td.With(implements= List.map ftye' td.Implements, + genericParams= gparams_ty2ty ftye' td.GenericParams, + extends = Option.map ftye' td.Extends, + methods=mdefs', + nestedTypes=tdefs_ty2ty_ilmbody2ilmbody_mdefs2mdefs ilg (enc@[td]) fs td.NestedTypes, + fields=fdefs', + methodImpls = mimpls_ty2ty ftye' td.MethodImpls, + events = edefs_ty2ty ilg ftye' td.Events, + properties = pdefs_ty2ty ilg ftye' td.Properties, + customAttrs = cattrs_ty2ty ilg ftye' td.CustomAttrs) + +and tdefs_ty2ty_ilmbody2ilmbody_mdefs2mdefs ilg enc fs tdefs = + morphILTypeDefs (tdef_ty2ty_ilmbody2ilmbody_mdefs2mdefs ilg enc fs) tdefs // -------------------------------------------------------------------- // Derived versions of the above, e.g. with defaults added // -------------------------------------------------------------------- -let manifest_typ2typ ilg f (m : ILAssemblyManifest) = - { m with CustomAttrs = cattrs_typ2typ ilg f m.CustomAttrs } +let manifest_ty2ty ilg f (m : ILAssemblyManifest) = + { m with CustomAttrsStored = storeILCustomAttrs (cattrs_ty2ty ilg f m.CustomAttrs) } -let morphILTypeInILModule_ilmbody2ilmbody_mdefs2mdefs ilg ((ftype: ILModuleDef -> (ILTypeDef list * ILTypeDef) option -> ILMethodDef option -> ILType -> ILType),fmdefs) m = +let morphILTypeInILModule_ilmbody2ilmbody_mdefs2mdefs ilg ((ftye: ILModuleDef -> (ILTypeDef list * ILTypeDef) option -> ILMethodDef option -> ILType -> ILType),fmdefs) m = - let ftdefs = tdefs_typ2typ_ilmbody2ilmbody_mdefs2mdefs ilg [] (ftype m,fmdefs m) + let ftdefs = tdefs_ty2ty_ilmbody2ilmbody_mdefs2mdefs ilg [] (ftye m,fmdefs m) { m with TypeDefs=ftdefs m.TypeDefs; - CustomAttrs=cattrs_typ2typ ilg (ftype m None None) m.CustomAttrs; - Manifest=Option.map (manifest_typ2typ ilg (ftype m None None)) m.Manifest } + CustomAttrsStored= storeILCustomAttrs (cattrs_ty2ty ilg (ftye m None None) m.CustomAttrs); + Manifest=Option.map (manifest_ty2ty ilg (ftye m None None)) m.Manifest } -let module_instr2instr_typ2typ ilg fs x = - let (fcode,ftype) = fs - let filmbody modCtxt tdefCtxt mdefCtxt = ilmbody_instr2instr_typ2typ (fcode modCtxt tdefCtxt mdefCtxt, ftype modCtxt (Some tdefCtxt) mdefCtxt) - let fmdefs modCtxt tdefCtxt = mdefs_typ2typ_ilmbody2ilmbody ilg (ftype modCtxt (Some tdefCtxt), filmbody modCtxt tdefCtxt) - morphILTypeInILModule_ilmbody2ilmbody_mdefs2mdefs ilg (ftype, fmdefs) x +let module_instr2instr_ty2ty ilg fs x = + let (fcode,ftye) = fs + let filmbody modCtxt tdefCtxt mdefCtxt = ilmbody_instr2instr_ty2ty (fcode modCtxt tdefCtxt mdefCtxt, ftye modCtxt (Some tdefCtxt) mdefCtxt) + let fmdefs modCtxt tdefCtxt = mdefs_ty2ty_ilmbody2ilmbody ilg (ftye modCtxt (Some tdefCtxt), filmbody modCtxt tdefCtxt) + morphILTypeInILModule_ilmbody2ilmbody_mdefs2mdefs ilg (ftye, fmdefs) x let morphILInstrsAndILTypesInILModule ilg (f1,f2) x = - module_instr2instr_typ2typ ilg (f1, f2) x + module_instr2instr_ty2ty ilg (f1, f2) x let morphILInstrsInILCode f x = code_instr2instrs f x -let morphILTypeInILModule ilg ftype y = +let morphILTypeInILModule ilg ftye y = let finstr modCtxt tdefCtxt mdefCtxt = - let fty = ftype modCtxt (Some tdefCtxt) mdefCtxt + let fty = ftye modCtxt (Some tdefCtxt) mdefCtxt morphILTypesInILInstr ((fun _instrCtxt -> fty), (fun _instrCtxt _formalCtxt -> fty)) - morphILInstrsAndILTypesInILModule ilg (finstr,ftype) y + morphILInstrsAndILTypesInILModule ilg (finstr,ftye) y let morphILTypeRefsInILModuleMemoized ilg f modul = - let fty = Tables.memoize (typ_tref2tref f) + let fty = Tables.memoize (ty_tref2tref f) morphILTypeInILModule ilg (fun _ _ _ ty -> fty ty) modul let morphILScopeRefsInILModuleMemoized ilg f modul = diff --git a/src/absil/ilprint.fs b/src/absil/ilprint.fs index 6c98fc605b9..f11524bc8d1 100644 --- a/src/absil/ilprint.fs +++ b/src/absil/ilprint.fs @@ -13,6 +13,7 @@ open Microsoft.FSharp.Compiler.AbstractIL.IL open System.Text open System.IO +open System.Reflection #if DEBUG let pretty () = true @@ -24,7 +25,7 @@ let pretty () = true let tyvar_generator = let i = ref 0 fun n -> - incr i; n^string !i + incr i; n + string !i // Carry an environment because the way we print method variables // depends on the gparams of the current scope. @@ -212,11 +213,10 @@ and goutput_typ_with_shortened_class_syntax env os = function | typ2 -> goutput_typ env os typ2 and goutput_gactuals env os inst = - if inst.Length = 0 then () - else - output_string os "<"; + if not (List.isEmpty inst) then + output_string os "<" output_seq ", " (goutput_gactual env) os inst - output_string os ">"; + output_string os ">" and goutput_gactual env os ty = goutput_typ env os ty @@ -270,14 +270,14 @@ and goutput_permission _env os p = match p with - | PermissionSet (sa,b) -> + | ILSecurityDecl (sa,b) -> output_string os " .permissionset " output_security_action os sa output_string os " = (" output_bytes os b output_string os ")" -and goutput_security_decls env os (ps: ILPermissions) = output_seq " " (goutput_permission env) os ps.AsList +and goutput_security_decls env os (ps: ILSecurityDecls) = output_seq " " (goutput_permission env) os ps.AsList and goutput_gparam env os (gf: ILGenericParameterDef) = output_string os (tyvar_generator gf.Name); @@ -338,12 +338,12 @@ and goutput_mref env os (mref:ILMethodRef) = and goutput_mspec env os (mspec:ILMethodSpec) = let fenv = ppenv_enter_method mspec.GenericArity - (ppenv_enter_tdef (mkILFormalTypars mspec.EnclosingType.GenericArgs) env) + (ppenv_enter_tdef (mkILFormalTypars mspec.DeclaringType.GenericArgs) env) output_callconv os mspec.CallingConv; output_string os " "; goutput_typ fenv os mspec.FormalReturnType; output_string os " "; - goutput_dlocref env os mspec.EnclosingType; + goutput_dlocref env os mspec.DeclaringType; output_string os " "; let name = mspec.Name if name = ".ctor" || name = ".cctor" then output_string os name else output_id os name; @@ -356,12 +356,12 @@ and goutput_vararg_mspec env os (mspec, varargs) = | Some varargs' -> let fenv = ppenv_enter_method mspec.GenericArity - (ppenv_enter_tdef (mkILFormalTypars mspec.EnclosingType.GenericArgs) env) + (ppenv_enter_tdef (mkILFormalTypars mspec.DeclaringType.GenericArgs) env) output_callconv os mspec.CallingConv; output_string os " "; goutput_typ fenv os mspec.FormalReturnType; output_string os " "; - goutput_dlocref env os mspec.EnclosingType; + goutput_dlocref env os mspec.DeclaringType; let name = mspec.Name if name = ".ctor" || name = ".cctor" then output_string os name else output_id os name goutput_gactuals env os mspec.GenericArgs; @@ -385,10 +385,10 @@ and goutput_vararg_sig env os (csig:ILCallingSignature,varargs:ILVarArgs) = output_string os ")"; and goutput_fspec env os (x:ILFieldSpec) = - let fenv = ppenv_enter_tdef (mkILFormalTypars x.EnclosingType.GenericArgs) env + let fenv = ppenv_enter_tdef (mkILFormalTypars x.DeclaringType.GenericArgs) env goutput_typ fenv os x.FormalType; output_string os " "; - goutput_dlocref env os x.EnclosingType; + goutput_dlocref env os x.DeclaringType; output_id os x.Name let output_member_access os access = @@ -396,8 +396,8 @@ let output_member_access os access = (match access with | ILMemberAccess.Public -> "public" | ILMemberAccess.Private -> "private" - | ILMemberAccess.CompilerControlled -> "privatescope" | ILMemberAccess.Family -> "family" + | ILMemberAccess.CompilerControlled -> "privatescope" | ILMemberAccess.FamilyAndAssembly -> "famandassem" | ILMemberAccess.FamilyOrAssembly -> "famorassem" | ILMemberAccess.Assembly -> "assembly") @@ -470,30 +470,30 @@ let output_custom_attr_data os data = output_string os " = "; output_parens output_bytes os data let goutput_custom_attr env os attr = - output_string os " .custom "; - goutput_mspec env os attr.Method; + output_string os " .custom " + goutput_mspec env os attr.Method output_custom_attr_data os attr.Data let goutput_custom_attrs env os (attrs : ILAttributes) = List.iter (fun attr -> goutput_custom_attr env os attr; output_string os "\n" ) attrs.AsList -let goutput_fdef _tref env os fd = - output_string os " .field "; +let goutput_fdef _tref env os (fd: ILFieldDef) = + output_string os " .field " match fd.Offset with Some i -> output_string os "["; output_i32 os i; output_string os "] " | None -> () match fd.Marshal with Some _i -> output_string os "// marshal attribute not printed\n"; | None -> () - output_member_access os fd.Access; - output_string os " "; - if fd.IsStatic then output_string os " static "; - if fd.IsLiteral then output_string os " literal "; - if fd.IsSpecialName then output_string os " specialname rtspecialname "; - if fd.IsInitOnly then output_string os " initonly "; - if fd.NotSerialized then output_string os " notserialized "; - goutput_typ env os fd.Type; - output_string os " "; - output_id os fd.Name; - output_option output_at os fd.Data; - output_option output_field_init os fd.LiteralValue; - output_string os "\n"; + output_member_access os fd.Access + output_string os " " + if fd.IsStatic then output_string os " static " + if fd.IsLiteral then output_string os " literal " + if fd.IsSpecialName then output_string os " specialname rtspecialname " + if fd.IsInitOnly then output_string os " initonly " + if fd.NotSerialized then output_string os " notserialized " + goutput_typ env os fd.FieldType + output_string os " " + output_id os fd.Name + output_option output_at os fd.Data + output_option output_field_init os fd.LiteralValue + output_string os "\n" goutput_custom_attrs env os fd.CustomAttrs @@ -769,11 +769,10 @@ let goutput_ilmbody env os (il: ILMethodBody) = output_string os ")\n" -let goutput_mbody is_entrypoint env os md = - match md.mdCodeKind with - | MethodCodeKind.Native -> output_string os "native " - | MethodCodeKind.IL -> output_string os "cil " - | MethodCodeKind.Runtime -> output_string os "runtime " +let goutput_mbody is_entrypoint env os (md: ILMethodDef) = + if md.ImplAttributes &&& MethodImplAttributes.Native <> enum 0 then output_string os "native " + elif md.ImplAttributes &&& MethodImplAttributes.IL <> enum 0 then output_string os "cil " + else output_string os "runtime " output_string os (if md.IsInternalCall then "internalcall " else " "); output_string os (if md.IsManaged then "managed " else " "); @@ -781,30 +780,29 @@ let goutput_mbody is_entrypoint env os md = output_string os " \n{ \n" ; goutput_security_decls env os md.SecurityDecls; goutput_custom_attrs env os md.CustomAttrs; - match md.mdBody.Contents with + match md.Body.Contents with | MethodBody.IL il -> goutput_ilmbody env os il | _ -> () if is_entrypoint then output_string os " .entrypoint"; output_string os "\n"; output_string os "}\n" -let goutput_mdef env os md = +let goutput_mdef env os (md:ILMethodDef) = let attrs = - match md.mdKind with - | MethodKind.Virtual vinfo -> - "virtual "^ - (if vinfo.IsFinal then "final " else "")^ - (if vinfo.IsNewSlot then "newslot " else "")^ - (if vinfo.IsCheckAccessOnOverride then " strict " else "")^ - (if vinfo.IsAbstract then " abstract " else "")^ + if md.IsVirtual then + "virtual " + + (if md.IsFinal then "final " else "") + + (if md.IsNewSlot then "newslot " else "") + + (if md.IsCheckAccessOnOverride then " strict " else "") + + (if md.IsAbstract then " abstract " else "") + " " - | MethodKind.NonVirtual -> "" - | MethodKind.Ctor -> "rtspecialname" - | MethodKind.Static -> - "static "^ - (match md.mdBody.Contents with + elif md.IsNonVirtualInstance then "" + elif md.IsConstructor then "rtspecialname" + elif md.IsStatic then + "static " + + (match md.Body.Contents with MethodBody.PInvoke (attr) -> - "pinvokeimpl(\""^ attr.Where.Name^"\" as \""^ attr.Name ^"\""^ + "pinvokeimpl(\"" + attr.Where.Name + "\" as \"" + attr.Name + "\"" + (match attr.CallingConv with | PInvokeCallingConvention.None -> "" | PInvokeCallingConvention.Cdecl -> " cdecl" @@ -824,7 +822,8 @@ let goutput_mdef env os md = ")" | _ -> "") - | MethodKind.Cctor -> "specialname rtspecialname static" + elif md.IsClassInitializer then "specialname rtspecialname static" + else "" let is_entrypoint = md.IsEntryPoint let menv = ppenv_enter_method (List.length md.GenericParams) env output_string os " .method "; @@ -854,7 +853,7 @@ let goutput_mdef env os md = (goutput_mbody is_entrypoint menv) os md; output_string os "\n" -let goutput_pdef env os pd = +let goutput_pdef env os (pd: ILPropertyDef) = output_string os "property\n\tgetter: "; (match pd.GetMethod with None -> () | Some mref -> goutput_mref env os mref); output_string os "\n\tsetter: "; @@ -865,14 +864,14 @@ let goutput_superclass env os = function | Some typ -> output_string os "extends "; (goutput_typ_with_shortened_class_syntax env) os typ let goutput_superinterfaces env os imp = - if imp = [] then () else - output_string os "implements "; - output_seq "," (goutput_typ_with_shortened_class_syntax env) os imp + if not (List.isEmpty imp) then + output_string os "implements " + output_seq "," (goutput_typ_with_shortened_class_syntax env) os imp let goutput_implements env os (imp:ILTypes) = - if imp.Length = 0 then () else - output_string os "implements "; - output_seq "," (goutput_typ_with_shortened_class_syntax env) os imp + if not (List.isEmpty imp) then + output_string os "implements " + output_seq "," (goutput_typ_with_shortened_class_syntax env) os imp let the = function Some x -> x | None -> failwith "the" @@ -893,7 +892,7 @@ let goutput_mdefs env os (mdefs: ILMethodDefs) = let goutput_pdefs env os (pdefs: ILPropertyDefs) = List.iter (fun f -> (goutput_pdef env) os f; output_string os "\n" ) pdefs.AsList -let rec goutput_tdef (enc) env contents os cd = +let rec goutput_tdef enc env contents os (cd: ILTypeDef) = let env = ppenv_enter_tdef cd.GenericParams env let layout_attr,pp_layout_decls = splitTypeLayout cd.Layout if isTypeNameForGlobalFunctions cd.Name then @@ -904,10 +903,9 @@ let rec goutput_tdef (enc) env contents os cd = goutput_pdefs env os cd.Properties; else output_string os "\n"; - match cd.tdKind with - | ILTypeDefKind.Class | ILTypeDefKind.Enum | ILTypeDefKind.Delegate | ILTypeDefKind.ValueType -> output_string os ".class " - | ILTypeDefKind.Interface -> output_string os ".class interface " - output_init_semantics os cd.InitSemantics; + if cd.IsInterface then output_string os ".class interface " + else output_string os ".class " + output_init_semantics os cd.Attributes; output_string os " "; output_type_access os cd.Access; output_string os " "; @@ -937,33 +935,31 @@ let rec goutput_tdef (enc) env contents os cd = output_string os "\n}"; and output_init_semantics os f = - match f with - ILTypeInit.BeforeField -> output_string os "beforefieldinit"; - | ILTypeInit.OnAny -> () + if f &&& TypeAttributes.BeforeFieldInit <> enum 0 then output_string os "beforefieldinit" and goutput_lambdas env os lambdas = match lambdas with | Lambdas_forall (gf,l) -> - output_angled (goutput_gparam env) os gf; - output_string os " "; + output_angled (goutput_gparam env) os gf + output_string os " " (goutput_lambdas env) os l | Lambdas_lambda (ps,l) -> output_parens (goutput_param env) os ps; - output_string os " "; + output_string os " " (goutput_lambdas env) os l | Lambdas_return typ -> output_string os "--> "; (goutput_typ env) os typ -and goutput_tdefs contents (enc) env os (td: ILTypeDefs) = +and goutput_tdefs contents enc env os (td: ILTypeDefs) = List.iter (goutput_tdef enc env contents os) td.AsList let output_ver os (a,b,c,d) = - output_string os " .ver "; - output_u16 os a; - output_string os " : "; - output_u16 os b; - output_string os " : "; - output_u16 os c; - output_string os " : "; + output_string os " .ver " + output_u16 os a + output_string os " : " + output_u16 os b + output_string os " : " + output_u16 os c + output_string os " : " output_u16 os d let output_locale os s = output_string os " .Locale "; output_qstring os s @@ -1002,7 +998,8 @@ let goutput_resource env os r = output_string os " { "; goutput_custom_attrs env os r.CustomAttrs; match r.Location with - | ILResourceLocation.Local _ -> + | ILResourceLocation.LocalIn _ + | ILResourceLocation.LocalOut _ -> output_string os " /* loc nyi */ "; | ILResourceLocation.File (mref,off) -> output_string os " .file "; @@ -1025,11 +1022,10 @@ let goutput_manifest env os m = output_sqstring os m.Name; output_string os " { \n"; output_string os ".hash algorithm "; output_i32 os m.AuxModuleHashAlgorithm; output_string os "\n"; - goutput_custom_attrs env os m.CustomAttrs; - goutput_security_decls env os m.SecurityDecls; - (output_option output_publickey) os m.PublicKey; - (output_option output_ver) os m.Version; - (output_option output_locale) os m.Locale; + goutput_custom_attrs env os m.CustomAttrs + (output_option output_publickey) os m.PublicKey + (output_option output_ver) os m.Version + (output_option output_locale) os m.Locale output_string os " } \n" diff --git a/src/absil/ilread.fs b/src/absil/ilread.fs index f4ea49effee..5d94041dae1 100644 --- a/src/absil/ilread.fs +++ b/src/absil/ilread.fs @@ -5,14 +5,16 @@ // //--------------------------------------------------------------------- -module internal Microsoft.FSharp.Compiler.AbstractIL.ILBinaryReader +module Microsoft.FSharp.Compiler.AbstractIL.ILBinaryReader #nowarn "42" // This construct is deprecated: it is only for use in the F# library open System +open System.Collections.Generic +open System.Diagnostics open System.IO open System.Runtime.InteropServices -open System.Collections.Generic +open System.Text open Internal.Utilities open Internal.Utilities.Collections open Microsoft.FSharp.Compiler.AbstractIL @@ -27,21 +29,15 @@ open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library open Microsoft.FSharp.Compiler.ErrorLogger open Microsoft.FSharp.Compiler.Range open Microsoft.FSharp.NativeInterop - -type ILReaderOptions = - { pdbPath: string option - ilGlobals: ILGlobals - optimizeForMemory: bool } - -#if STATISTICS -let reportRef = ref (fun _oc -> ()) -let addReport f = let old = !reportRef in reportRef := (fun oc -> old oc; f oc) -let report (oc:TextWriter) = !reportRef oc ; reportRef := ref (fun _oc -> ()) -#endif +open System.Reflection let checking = false let logging = false -let _ = if checking then dprintn "warning : Ilread.checking is on" +let _ = if checking then dprintn "warning : ILBinaryReader.checking is on" +let noStableFileHeuristic = try (System.Environment.GetEnvironmentVariable("FSharp_NoStableFileHeuristic") <> null) with _ -> false +let alwaysMemoryMapFSC = try (System.Environment.GetEnvironmentVariable("FSharp_AlwaysMemoryMapCommandLineCompiler") <> null) with _ -> false +let stronglyHeldReaderCacheSizeDefault = 30 +let stronglyHeldReaderCacheSize = try (match System.Environment.GetEnvironmentVariable("FSharp_StronglyHeldBinaryReaderCacheSize") with null -> stronglyHeldReaderCacheSizeDefault | s -> int32 s) with _ -> stronglyHeldReaderCacheSizeDefault let singleOfBits (x:int32) = System.BitConverter.ToSingle(System.BitConverter.GetBytes(x), 0) let doubleOfBits (x:int64) = System.BitConverter.Int64BitsToDouble(x) @@ -94,16 +90,103 @@ let tokToTaggedIdx f nbits tok = let idx = tok >>>& nbits TaggedIndex(f tag, idx) +type Statistics = + { mutable rawMemoryFileCount : int + mutable memoryMapFileOpenedCount : int + mutable memoryMapFileClosedCount : int + mutable weakByteFileCount : int + mutable byteFileCount : int } + +let stats = + { rawMemoryFileCount = 0 + memoryMapFileOpenedCount = 0 + memoryMapFileClosedCount = 0 + weakByteFileCount = 0 + byteFileCount = 0 } + +let GetStatistics() = stats [] -type BinaryFile() = +/// An abstraction over how we access the contents of .NET binaries. May be backed by managed or unmanaged memory, +/// memory mapped file or by on-disk resources. These objects should never need explicit disposal - they must either +/// not hold resources of clean up after themselves when collected. +type BinaryView() = + + /// Read a byte from the file abstract ReadByte : addr:int -> byte + + /// Read a chunk of bytes from the file abstract ReadBytes : addr:int -> int -> byte[] + + /// Read an Int32 from the file abstract ReadInt32 : addr:int -> int + + /// Read a UInt16 from the file abstract ReadUInt16 : addr:int -> uint16 + + /// Read a length of a UTF8 string from the file abstract CountUtf8String : addr:int -> int + + /// Read a UTF8 string from the file abstract ReadUTF8String : addr: int -> string +/// An abstraction over how we access the contents of .NET binaries. May be backed by managed or unmanaged memory, +/// memory mapped file or by on-disk resources. +type BinaryFile = + /// Return a BinaryView for temporary use which eagerly holds any necessary memory resources for the duration of its lifetime, + /// and is faster to access byte-by-byte. The returned BinaryView should _not_ be captured in a closure that outlives the + /// desired lifetime. + abstract GetView : unit -> BinaryView + +/// A view over a raw pointer to memory +type RawMemoryView(obj: obj, start:nativeint, len: int) = + inherit BinaryView() + + override m.ReadByte i = + if nativeint i + 1n > nativeint len then failwithf "RawMemoryView overrun, i = %d, obj = %A" i obj + Marshal.ReadByte(start + nativeint i) + + override m.ReadBytes i n = + if nativeint i + nativeint n > nativeint len then failwithf "RawMemoryView overrun, i = %d, n = %d, obj = %A" i n obj + let res = Bytes.zeroCreate n + Marshal.Copy(start + nativeint i, res, 0, n) + res + + override m.ReadInt32 i = + if nativeint i + 4n > nativeint len then failwithf "RawMemoryView overrun, i = %d, obj = %A" i obj + Marshal.ReadInt32(start + nativeint i) + + override m.ReadUInt16 i = + if nativeint i + 2n > nativeint len then failwithf "RawMemoryView overrun, i = %d, obj = %A" i obj + uint16(Marshal.ReadInt16(start + nativeint i)) + + override m.CountUtf8String i = + if nativeint i > nativeint len then failwithf "RawMemoryView overrun, i = %d, obj = %A" i obj + let pStart = start + nativeint i + let mutable p = start + while Marshal.ReadByte(p) <> 0uy do + p <- p + 1n + int (p - pStart) + + override m.ReadUTF8String i = + let n = m.CountUtf8String i + if nativeint i + nativeint n > nativeint len then failwithf "RawMemoryView overrun, i = %d, n = %d, obj = %A" i n obj + System.Runtime.InteropServices.Marshal.PtrToStringAnsi(start + nativeint i, n) + + member __.HoldObj() = obj + + +/// Gives views over a raw chunk of memory, for example those returned to us by the memory manager in Roslyn's +/// Visual Studio integration. 'obj' must keep the memory alive. The object will capture it and thus also keep the memory alive for +/// the lifetime of this object. +type RawMemoryFile(fileName: string, obj: obj, addr: nativeint, length: int) = + do stats.rawMemoryFileCount <- stats.rawMemoryFileCount + 1 + let view = RawMemoryView(obj, addr, length) + member __.HoldObj() = obj // make sure we capture 'obj' + member __.FileName = fileName + interface BinaryFile with + override __.GetView() = view :>_ + /// Read from memory mapped files. module MemoryMapping = @@ -153,160 +236,216 @@ module MemoryMapping = let OPEN_EXISTING = 0x0003 let OPEN_ALWAYS = 0x0004 -type MemoryMappedFile(hMap: MemoryMapping.HANDLE, start:nativeint) = - inherit BinaryFile() - - static member Create fileName = - //printf "fileName = %s\n" fileName - let hFile = MemoryMapping.CreateFile (fileName, MemoryMapping.GENERIC_READ, MemoryMapping.FILE_SHARE_READ_WRITE, IntPtr.Zero, MemoryMapping.OPEN_EXISTING, 0, IntPtr.Zero ) - //printf "hFile = %Lx\n" (hFile.ToInt64()) - if ( hFile.Equals(MemoryMapping.INVALID_HANDLE) ) then - failwithf "CreateFile(0x%08x)" ( Marshal.GetHRForLastWin32Error() ) - let protection = 0x00000002 (* ReadOnly *) - //printf "OK! hFile = %Lx\n" (hFile.ToInt64()) - let hMap = MemoryMapping.CreateFileMapping (hFile, IntPtr.Zero, protection, 0, 0, null ) - ignore(MemoryMapping.CloseHandle(hFile)) - if hMap.Equals(MemoryMapping.NULL_HANDLE) then - failwithf "CreateFileMapping(0x%08x)" ( Marshal.GetHRForLastWin32Error() ) - - let start = MemoryMapping.MapViewOfFile (hMap, MemoryMapping.MAP_READ, 0, 0, 0n) - - if start.Equals(IntPtr.Zero) then - failwithf "MapViewOfFile(0x%08x)" ( Marshal.GetHRForLastWin32Error() ) - MemoryMappedFile(hMap, start) - - member m.Addr (i:int) : nativeint = - start + nativeint i +/// A view over a raw pointer to memory given by a memory mapped file. +/// NOTE: we should do more checking of validity here. +type MemoryMapView(start:nativeint) = + inherit BinaryView() override m.ReadByte i = - Marshal.ReadByte(m.Addr i) + Marshal.ReadByte(start + nativeint i) - override m.ReadBytes i len = - let res = Bytes.zeroCreate len - Marshal.Copy(m.Addr i, res, 0, len) + override m.ReadBytes i n = + let res = Bytes.zeroCreate n + Marshal.Copy(start + nativeint i, res, 0, n) res override m.ReadInt32 i = - Marshal.ReadInt32(m.Addr i) + Marshal.ReadInt32(start + nativeint i) override m.ReadUInt16 i = - uint16(Marshal.ReadInt16(m.Addr i)) - - member m.Close() = - ignore(MemoryMapping.UnmapViewOfFile start) - ignore(MemoryMapping.CloseHandle hMap) + uint16(Marshal.ReadInt16(start + nativeint i)) override m.CountUtf8String i = - let start = m.Addr i + let pStart = start + nativeint i let mutable p = start while Marshal.ReadByte(p) <> 0uy do p <- p + 1n - int (p - start) + int (p - pStart) override m.ReadUTF8String i = let n = m.CountUtf8String i - System.Runtime.InteropServices.Marshal.PtrToStringAnsi((m.Addr i), n) -//#if FX_RESHAPED_REFLECTION -// System.Text.Encoding.UTF8.GetString(NativePtr.ofNativeInt (m.Addr i), n) -//#else -// new System.String(NativePtr.ofNativeInt (m.Addr i), 0, n, System.Text.Encoding.UTF8) -//#endif + System.Runtime.InteropServices.Marshal.PtrToStringAnsi(start + nativeint i, n) +/// Memory maps a file and creates a single view over the entirety of its contents. The +/// lock on the file is only released when the object is disposed. +/// For memory mapping we currently take one view and never release it. +[] +type MemoryMapFile(fileName: string, view: MemoryMapView, hMap: MemoryMapping.HANDLE, hView:nativeint) = -//--------------------------------------------------------------------- -// Read file from memory blocks -//--------------------------------------------------------------------- + do stats.memoryMapFileOpenedCount <- stats.memoryMapFileOpenedCount + 1 + let mutable closed = false + static member Create fileName = + let hFile = MemoryMapping.CreateFile (fileName, MemoryMapping.GENERIC_READ, MemoryMapping.FILE_SHARE_READ_WRITE, IntPtr.Zero, MemoryMapping.OPEN_EXISTING, 0, IntPtr.Zero ) + if hFile.Equals(MemoryMapping.INVALID_HANDLE) then + failwithf "CreateFile(0x%08x)" (Marshal.GetHRForLastWin32Error()) + let protection = 0x00000002 + let hMap = MemoryMapping.CreateFileMapping (hFile, IntPtr.Zero, protection, 0, 0, null ) + ignore(MemoryMapping.CloseHandle(hFile)) + if hMap.Equals(MemoryMapping.NULL_HANDLE) then + failwithf "CreateFileMapping(0x%08x)" (Marshal.GetHRForLastWin32Error()) + + let hView = MemoryMapping.MapViewOfFile (hMap, MemoryMapping.MAP_READ, 0, 0, 0n) + + if hView.Equals(IntPtr.Zero) then + failwithf "MapViewOfFile(0x%08x)" (Marshal.GetHRForLastWin32Error()) + + let view = MemoryMapView(hView) + + MemoryMapFile(fileName, view, hMap, hView) + member __.FileName = fileName -type ByteFile(bytes:byte[]) = - inherit BinaryFile() + member __.Close() = + stats.memoryMapFileClosedCount <- stats.memoryMapFileClosedCount + 1 + if not closed then + closed <- true + MemoryMapping.UnmapViewOfFile hView |> ignore + MemoryMapping.CloseHandle hMap |> ignore - override mc.ReadByte addr = bytes.[addr] - override mc.ReadBytes addr len = Array.sub bytes addr len - override m.CountUtf8String addr = + interface BinaryFile with + override __.GetView() = (view :> BinaryView) + +/// Read file from memory blocks +type ByteView(bytes:byte[]) = + inherit BinaryView() + + override __.ReadByte addr = bytes.[addr] + + override __.ReadBytes addr len = Array.sub bytes addr len + + override __.CountUtf8String addr = let mutable p = addr while bytes.[p] <> 0uy do p <- p + 1 p - addr - override m.ReadUTF8String addr = - let n = m.CountUtf8String addr + override bfv.ReadUTF8String addr = + let n = bfv.CountUtf8String addr System.Text.Encoding.UTF8.GetString (bytes, addr, n) - override is.ReadInt32 addr = - let b0 = is.ReadByte addr - let b1 = is.ReadByte (addr+1) - let b2 = is.ReadByte (addr+2) - let b3 = is.ReadByte (addr+3) + override bfv.ReadInt32 addr = + let b0 = bfv.ReadByte addr + let b1 = bfv.ReadByte (addr+1) + let b2 = bfv.ReadByte (addr+2) + let b3 = bfv.ReadByte (addr+3) int b0 ||| (int b1 <<< 8) ||| (int b2 <<< 16) ||| (int b3 <<< 24) - override is.ReadUInt16 addr = - let b0 = is.ReadByte addr - let b1 = is.ReadByte (addr+1) + override bfv.ReadUInt16 addr = + let b0 = bfv.ReadByte addr + let b1 = bfv.ReadByte (addr+1) uint16 b0 ||| (uint16 b1 <<< 8) + +/// A BinaryFile backed by an array of bytes held strongly as managed memory +[] +type ByteFile(fileName: string, bytes:byte[]) = + let view = ByteView(bytes) + do stats.byteFileCount <- stats.byteFileCount + 1 + member __.FileName = fileName + interface BinaryFile with + override bf.GetView() = view :> BinaryView + +/// Same as ByteFile but holds the bytes weakly. The bytes will be re-read from the backing file when a view is requested. +/// This is the default implementation used by F# Compiler Services when accessing "stable" binaries. It is not used +/// by Visual Studio, where tryGetMetadataSnapshot provides a RawMemoryFile backed by Roslyn data. +[] +type WeakByteFile(fileName: string, chunk: (int * int) option) = + + do stats.weakByteFileCount <- stats.weakByteFileCount + 1 + + /// Used to check that the file hasn't changed + let fileStamp = FileSystem.GetLastWriteTimeShim(fileName) + + /// The weak handle to the bytes for the file + let weakBytes = new WeakReference (null) + + member __.FileName = fileName + + /// Get the bytes for the file + interface BinaryFile with + + override this.GetView() = + let strongBytes = + let mutable tg = null + if not (weakBytes.TryGetTarget(&tg)) then + if FileSystem.GetLastWriteTimeShim(fileName) <> fileStamp then + error (Error (FSComp.SR.ilreadFileChanged fileName, range0)) + + let bytes = + match chunk with + | None -> FileSystem.ReadAllBytesShim fileName + | Some(start, length) -> File.ReadBinaryChunk (fileName, start, length) + + tg <- bytes + + weakBytes.SetTarget bytes + + tg + + (ByteView(strongBytes) :> BinaryView) + -let seekReadByte (is:BinaryFile) addr = is.ReadByte addr -let seekReadBytes (is:BinaryFile) addr len = is.ReadBytes addr len -let seekReadInt32 (is:BinaryFile) addr = is.ReadInt32 addr -let seekReadUInt16 (is:BinaryFile) addr = is.ReadUInt16 addr +let seekReadByte (mdv:BinaryView) addr = mdv.ReadByte addr +let seekReadBytes (mdv:BinaryView) addr len = mdv.ReadBytes addr len +let seekReadInt32 (mdv:BinaryView) addr = mdv.ReadInt32 addr +let seekReadUInt16 (mdv:BinaryView) addr = mdv.ReadUInt16 addr -let seekReadByteAsInt32 is addr = int32 (seekReadByte is addr) +let seekReadByteAsInt32 mdv addr = int32 (seekReadByte mdv addr) -let seekReadInt64 is addr = - let b0 = seekReadByte is addr - let b1 = seekReadByte is (addr+1) - let b2 = seekReadByte is (addr+2) - let b3 = seekReadByte is (addr+3) - let b4 = seekReadByte is (addr+4) - let b5 = seekReadByte is (addr+5) - let b6 = seekReadByte is (addr+6) - let b7 = seekReadByte is (addr+7) +let seekReadInt64 mdv addr = + let b0 = seekReadByte mdv addr + let b1 = seekReadByte mdv (addr+1) + let b2 = seekReadByte mdv (addr+2) + let b3 = seekReadByte mdv (addr+3) + let b4 = seekReadByte mdv (addr+4) + let b5 = seekReadByte mdv (addr+5) + let b6 = seekReadByte mdv (addr+6) + let b7 = seekReadByte mdv (addr+7) int64 b0 ||| (int64 b1 <<< 8) ||| (int64 b2 <<< 16) ||| (int64 b3 <<< 24) ||| (int64 b4 <<< 32) ||| (int64 b5 <<< 40) ||| (int64 b6 <<< 48) ||| (int64 b7 <<< 56) -let seekReadUInt16AsInt32 is addr = int32 (seekReadUInt16 is addr) +let seekReadUInt16AsInt32 mdv addr = int32 (seekReadUInt16 mdv addr) -let seekReadCompressedUInt32 is addr = - let b0 = seekReadByte is addr +let seekReadCompressedUInt32 mdv addr = + let b0 = seekReadByte mdv addr if b0 <= 0x7Fuy then int b0, addr+1 elif b0 <= 0xBFuy then let b0 = b0 &&& 0x7Fuy - let b1 = seekReadByteAsInt32 is (addr+1) + let b1 = seekReadByteAsInt32 mdv (addr+1) (int b0 <<< 8) ||| int b1, addr+2 else let b0 = b0 &&& 0x3Fuy - let b1 = seekReadByteAsInt32 is (addr+1) - let b2 = seekReadByteAsInt32 is (addr+2) - let b3 = seekReadByteAsInt32 is (addr+3) + let b1 = seekReadByteAsInt32 mdv (addr+1) + let b2 = seekReadByteAsInt32 mdv (addr+2) + let b3 = seekReadByteAsInt32 mdv (addr+3) (int b0 <<< 24) ||| (int b1 <<< 16) ||| (int b2 <<< 8) ||| int b3, addr+4 -let seekReadSByte is addr = sbyte (seekReadByte is addr) -let seekReadSingle is addr = singleOfBits (seekReadInt32 is addr) -let seekReadDouble is addr = doubleOfBits (seekReadInt64 is addr) +let seekReadSByte mdv addr = sbyte (seekReadByte mdv addr) +let seekReadSingle mdv addr = singleOfBits (seekReadInt32 mdv addr) +let seekReadDouble mdv addr = doubleOfBits (seekReadInt64 mdv addr) -let rec seekCountUtf8String is addr n = - let c = seekReadByteAsInt32 is addr +let rec seekCountUtf8String mdv addr n = + let c = seekReadByteAsInt32 mdv addr if c = 0 then n - else seekCountUtf8String is (addr+1) (n+1) + else seekCountUtf8String mdv (addr+1) (n+1) -let seekReadUTF8String is addr = - let n = seekCountUtf8String is addr 0 - let bytes = seekReadBytes is addr n +let seekReadUTF8String mdv addr = + let n = seekCountUtf8String mdv addr 0 + let bytes = seekReadBytes mdv addr n System.Text.Encoding.UTF8.GetString (bytes, 0, bytes.Length) -let seekReadBlob is addr = - let len, addr = seekReadCompressedUInt32 is addr - seekReadBytes is addr len +let seekReadBlob mdv addr = + let len, addr = seekReadCompressedUInt32 mdv addr + seekReadBytes mdv addr len -let seekReadUserString is addr = - let len, addr = seekReadCompressedUInt32 is addr - let bytes = seekReadBytes is addr (len - 1) - System.Text.Encoding.Unicode.GetString(bytes, 0, bytes.Length) +let seekReadUserString mdv addr = + let len, addr = seekReadCompressedUInt32 mdv addr + let bytes = seekReadBytes mdv addr (len - 1) + Encoding.Unicode.GetString(bytes, 0, bytes.Length) -let seekReadGuid is addr = seekReadBytes is addr 0x10 +let seekReadGuid mdv addr = seekReadBytes mdv addr 0x10 -let seekReadUncodedToken is addr = - i32ToUncodedToken (seekReadInt32 is addr) +let seekReadUncodedToken mdv addr = + i32ToUncodedToken (seekReadInt32 mdv addr) //--------------------------------------------------------------------- @@ -744,7 +883,6 @@ type MemberRefAsMspecIdx = MemberRefAsMspecIdx of int * int type MethodSpecAsMspecIdx = MethodSpecAsMspecIdx of int * int type MemberRefAsFspecIdx = MemberRefAsFspecIdx of int * int type CustomAttrIdx = CustomAttrIdx of CustomAttributeTypeTag * int * int32 -type SecurityDeclIdx = SecurityDeclIdx of uint16 * int32 type GenericParamsIdx = GenericParamsIdx of int * TypeOrMethodDefTag * int //--------------------------------------------------------------------- @@ -787,8 +925,14 @@ let mkCacheGeneric lowMem _inbase _nm _sz = | null -> cache := new Dictionary<_, _>(11 (* sz:int *) ) | _ -> () !cache - if cache.ContainsKey idx then (incr count; cache.[idx]) - else let res = f idx in cache.[idx] <- res; res + match cache.TryGetValue(idx) with + | true, v -> + incr count + v + | _ -> + let res = f idx + cache.[idx] <- res + res //----------------------------------------------------------------------- // Polymorphic general helpers for searching for particular rows. @@ -880,7 +1024,7 @@ let seekReadIndexedRows (numRows, rowReader, keyFunc, keyComparer, binaryChop, r List.rev !res -let seekReadOptionalIndexedRow (info) = +let seekReadOptionalIndexedRow info = match seekReadIndexedRows info with | [k] -> Some k | [] -> None @@ -888,7 +1032,7 @@ let seekReadOptionalIndexedRow (info) = dprintn ("multiple rows found when indexing table") Some h -let seekReadIndexedRow (info) = +let seekReadIndexedRow info = match seekReadOptionalIndexedRow info with | Some row -> row | None -> failwith ("no row found for key when indexing table") @@ -897,31 +1041,19 @@ let seekReadIndexedRow (info) = // The big fat reader. //--------------------------------------------------------------------- -type ILModuleReader = - { modul: ILModuleDef - ilAssemblyRefs: Lazy - dispose: unit -> unit } - member x.ILModuleDef = x.modul - member x.ILAssemblyRefs = x.ilAssemblyRefs.Force() - interface IDisposable with - member x.Dispose() = x.dispose() - - type MethodData = MethodData of ILType * ILCallingConv * string * ILTypes * ILType * ILTypes type VarArgMethodData = VarArgMethodData of ILType * ILCallingConv * string * ILTypes * ILVarArgs * ILType * ILTypes -[] -type ILReaderContext = - { ilg: ILGlobals - dataEndPoints: Lazy - sorted: int64 +[] +type PEReader = + { fileName: string #if FX_NO_PDB_READER pdb: obj option #else pdb: (PdbReader * (string -> ILSourceDocument)) option #endif entryPointToken: TableName * int - getNumRows: TableName -> int + pefile: BinaryFile textSegmentPhysicalLoc : int32 textSegmentPhysicalSize : int32 dataSegmentPhysicalLoc : int32 @@ -934,8 +1066,19 @@ type ILReaderContext = resourcesAddr:int32 strongnameAddr:int32 vtableFixupsAddr:int32 - is: BinaryFile - infile:string + noFileOnDisk:bool +} + +[] +type ILMetadataReader = + { ilg: ILGlobals + sorted: int64 + mdfile: BinaryFile + pectxtCaptured: PEReader option // only set when reading full PE including code etc. for static linking + entryPointToken: TableName * int + dataEndPoints: Lazy + fileName:string + getNumRows: TableName -> int userStringsStreamPhysicalLoc: int32 stringsStreamPhysicalLoc: int32 blobsStreamPhysicalLoc: int32 @@ -963,52 +1106,15 @@ type ILReaderContext = stringsBigness: bool guidsBigness: bool blobsBigness: bool - countTypeRef : int ref - countTypeDef : int ref - countField : int ref - countMethod : int ref - countParam : int ref - countInterfaceImpl : int ref - countMemberRef : int ref - countConstant : int ref - countCustomAttribute : int ref - countFieldMarshal: int ref - countPermission : int ref - countClassLayout : int ref - countFieldLayout : int ref - countStandAloneSig : int ref - countEventMap : int ref - countEvent : int ref - countPropertyMap : int ref - countProperty : int ref - countMethodSemantics : int ref - countMethodImpl : int ref - countModuleRef : int ref - countTypeSpec : int ref - countImplMap : int ref - countFieldRVA : int ref - countAssembly : int ref - countAssemblyRef : int ref - countFile : int ref - countExportedType : int ref - countManifestResource : int ref - countNested : int ref - countGenericParam : int ref - countGenericParamConstraint : int ref - countMethodSpec : int ref seekReadNestedRow : int -> int * int seekReadConstantRow : int -> uint16 * TaggedIndex * int32 seekReadMethodSemanticsRow : int -> int32 * int * TaggedIndex seekReadTypeDefRow : int -> int32 * int32 * int32 * TaggedIndex * int * int - seekReadInterfaceImplRow : int -> int * TaggedIndex - seekReadFieldMarshalRow : int -> TaggedIndex * int32 - seekReadPropertyMapRow : int -> int * int seekReadAssemblyRef : int -> ILAssemblyRef seekReadMethodSpecAsMethodData : MethodSpecAsMspecIdx -> VarArgMethodData seekReadMemberRefAsMethodData : MemberRefAsMspecIdx -> VarArgMethodData seekReadMemberRefAsFieldSpec : MemberRefAsFspecIdx -> ILFieldSpec seekReadCustomAttr : CustomAttrIdx -> ILAttribute - seekReadSecurityDecl : SecurityDeclIdx -> ILPermission seekReadTypeRef : int ->ILTypeRef seekReadTypeRefAsType : TypeRefAsTypIdx -> ILType readBlobHeapAsPropertySig : BlobAsPropSigIdx -> ILThisConvention * ILType * ILTypes @@ -1018,414 +1124,395 @@ type ILReaderContext = seekReadTypeDefAsType : TypeDefAsTypIdx -> ILType seekReadMethodDefAsMethodData : int -> MethodData seekReadGenericParams : GenericParamsIdx -> ILGenericParameterDef list - seekReadFieldDefAsFieldSpec : int -> ILFieldSpec } + seekReadFieldDefAsFieldSpec : int -> ILFieldSpec + customAttrsReader_Module : ILAttributesStored + customAttrsReader_Assembly : ILAttributesStored + customAttrsReader_TypeDef : ILAttributesStored + customAttrsReader_GenericParam: ILAttributesStored + customAttrsReader_FieldDef: ILAttributesStored + customAttrsReader_MethodDef: ILAttributesStored + customAttrsReader_ParamDef: ILAttributesStored + customAttrsReader_Event: ILAttributesStored + customAttrsReader_Property: ILAttributesStored + customAttrsReader_ManifestResource: ILAttributesStored + customAttrsReader_ExportedType: ILAttributesStored + securityDeclsReader_TypeDef : ILSecurityDeclsStored + securityDeclsReader_MethodDef : ILSecurityDeclsStored + securityDeclsReader_Assembly : ILSecurityDeclsStored + typeDefReader : ILTypeDefStored } -let count c = -#if DEBUG - incr c -#else - c |> ignore - () -#endif - -let seekReadUInt16Adv ctxt (addr: byref) = - let res = seekReadUInt16 ctxt.is addr +let seekReadUInt16Adv mdv (addr: byref) = + let res = seekReadUInt16 mdv addr addr <- addr + 2 res -let seekReadInt32Adv ctxt (addr: byref) = - let res = seekReadInt32 ctxt.is addr +let seekReadInt32Adv mdv (addr: byref) = + let res = seekReadInt32 mdv addr addr <- addr+4 res -let seekReadUInt16AsInt32Adv ctxt (addr: byref) = - let res = seekReadUInt16AsInt32 ctxt.is addr +let seekReadUInt16AsInt32Adv mdv (addr: byref) = + let res = seekReadUInt16AsInt32 mdv addr addr <- addr+2 res -let seekReadTaggedIdx f nbits big is (addr: byref) = - let tok = if big then seekReadInt32Adv is &addr else seekReadUInt16AsInt32Adv is &addr +let seekReadTaggedIdx f nbits big mdv (addr: byref) = + let tok = if big then seekReadInt32Adv mdv &addr else seekReadUInt16AsInt32Adv mdv &addr tokToTaggedIdx f nbits tok -let seekReadIdx big ctxt (addr: byref) = - if big then seekReadInt32Adv ctxt &addr else seekReadUInt16AsInt32Adv ctxt &addr +let seekReadIdx big mdv (addr: byref) = + if big then seekReadInt32Adv mdv &addr else seekReadUInt16AsInt32Adv mdv &addr -let seekReadUntaggedIdx (tab:TableName) ctxt (addr: byref) = - seekReadIdx ctxt.tableBigness.[tab.Index] ctxt &addr +let seekReadUntaggedIdx (tab:TableName) (ctxt: ILMetadataReader) mdv (addr: byref) = + seekReadIdx ctxt.tableBigness.[tab.Index] mdv &addr -let seekReadResolutionScopeIdx ctxt (addr: byref) = seekReadTaggedIdx mkResolutionScopeTag 2 ctxt.rsBigness ctxt &addr -let seekReadTypeDefOrRefOrSpecIdx ctxt (addr: byref) = seekReadTaggedIdx mkTypeDefOrRefOrSpecTag 2 ctxt.tdorBigness ctxt &addr -let seekReadTypeOrMethodDefIdx ctxt (addr: byref) = seekReadTaggedIdx mkTypeOrMethodDefTag 1 ctxt.tomdBigness ctxt &addr -let seekReadHasConstantIdx ctxt (addr: byref) = seekReadTaggedIdx mkHasConstantTag 2 ctxt.hcBigness ctxt &addr -let seekReadHasCustomAttributeIdx ctxt (addr: byref) = seekReadTaggedIdx mkHasCustomAttributeTag 5 ctxt.hcaBigness ctxt &addr -let seekReadHasFieldMarshalIdx ctxt (addr: byref) = seekReadTaggedIdx mkHasFieldMarshalTag 1 ctxt.hfmBigness ctxt &addr -let seekReadHasDeclSecurityIdx ctxt (addr: byref) = seekReadTaggedIdx mkHasDeclSecurityTag 2 ctxt.hdsBigness ctxt &addr -let seekReadMemberRefParentIdx ctxt (addr: byref) = seekReadTaggedIdx mkMemberRefParentTag 3 ctxt.mrpBigness ctxt &addr -let seekReadHasSemanticsIdx ctxt (addr: byref) = seekReadTaggedIdx mkHasSemanticsTag 1 ctxt.hsBigness ctxt &addr -let seekReadMethodDefOrRefIdx ctxt (addr: byref) = seekReadTaggedIdx mkMethodDefOrRefTag 1 ctxt.mdorBigness ctxt &addr -let seekReadMemberForwardedIdx ctxt (addr: byref) = seekReadTaggedIdx mkMemberForwardedTag 1 ctxt.mfBigness ctxt &addr -let seekReadImplementationIdx ctxt (addr: byref) = seekReadTaggedIdx mkImplementationTag 2 ctxt.iBigness ctxt &addr -let seekReadCustomAttributeTypeIdx ctxt (addr: byref) = seekReadTaggedIdx mkILCustomAttributeTypeTag 3 ctxt.catBigness ctxt &addr -let seekReadStringIdx ctxt (addr: byref) = seekReadIdx ctxt.stringsBigness ctxt &addr -let seekReadGuidIdx ctxt (addr: byref) = seekReadIdx ctxt.guidsBigness ctxt &addr -let seekReadBlobIdx ctxt (addr: byref) = seekReadIdx ctxt.blobsBigness ctxt &addr +let seekReadResolutionScopeIdx (ctxt: ILMetadataReader) mdv (addr: byref) = seekReadTaggedIdx mkResolutionScopeTag 2 ctxt.rsBigness mdv &addr +let seekReadTypeDefOrRefOrSpecIdx (ctxt: ILMetadataReader) mdv (addr: byref) = seekReadTaggedIdx mkTypeDefOrRefOrSpecTag 2 ctxt.tdorBigness mdv &addr +let seekReadTypeOrMethodDefIdx (ctxt: ILMetadataReader) mdv (addr: byref) = seekReadTaggedIdx mkTypeOrMethodDefTag 1 ctxt.tomdBigness mdv &addr +let seekReadHasConstantIdx (ctxt: ILMetadataReader) mdv (addr: byref) = seekReadTaggedIdx mkHasConstantTag 2 ctxt.hcBigness mdv &addr +let seekReadHasCustomAttributeIdx (ctxt: ILMetadataReader) mdv (addr: byref) = seekReadTaggedIdx mkHasCustomAttributeTag 5 ctxt.hcaBigness mdv &addr +let seekReadHasFieldMarshalIdx (ctxt: ILMetadataReader) mdv (addr: byref) = seekReadTaggedIdx mkHasFieldMarshalTag 1 ctxt.hfmBigness mdv &addr +let seekReadHasDeclSecurityIdx (ctxt: ILMetadataReader) mdv (addr: byref) = seekReadTaggedIdx mkHasDeclSecurityTag 2 ctxt.hdsBigness mdv &addr +let seekReadMemberRefParentIdx (ctxt: ILMetadataReader) mdv (addr: byref) = seekReadTaggedIdx mkMemberRefParentTag 3 ctxt.mrpBigness mdv &addr +let seekReadHasSemanticsIdx (ctxt: ILMetadataReader) mdv (addr: byref) = seekReadTaggedIdx mkHasSemanticsTag 1 ctxt.hsBigness mdv &addr +let seekReadMethodDefOrRefIdx (ctxt: ILMetadataReader) mdv (addr: byref) = seekReadTaggedIdx mkMethodDefOrRefTag 1 ctxt.mdorBigness mdv &addr +let seekReadMemberForwardedIdx (ctxt: ILMetadataReader) mdv (addr: byref) = seekReadTaggedIdx mkMemberForwardedTag 1 ctxt.mfBigness mdv &addr +let seekReadImplementationIdx (ctxt: ILMetadataReader) mdv (addr: byref) = seekReadTaggedIdx mkImplementationTag 2 ctxt.iBigness mdv &addr +let seekReadCustomAttributeTypeIdx (ctxt: ILMetadataReader) mdv (addr: byref) = seekReadTaggedIdx mkILCustomAttributeTypeTag 3 ctxt.catBigness mdv &addr +let seekReadStringIdx (ctxt: ILMetadataReader) mdv (addr: byref) = seekReadIdx ctxt.stringsBigness mdv &addr +let seekReadGuidIdx (ctxt: ILMetadataReader) mdv (addr: byref) = seekReadIdx ctxt.guidsBigness mdv &addr +let seekReadBlobIdx (ctxt: ILMetadataReader) mdv (addr: byref) = seekReadIdx ctxt.blobsBigness mdv &addr -let seekReadModuleRow ctxt idx = +let seekReadModuleRow (ctxt: ILMetadataReader) mdv idx = if idx = 0 then failwith "cannot read Module table row 0" let mutable addr = ctxt.rowAddr TableNames.Module idx - let generation = seekReadUInt16Adv ctxt &addr - let nameIdx = seekReadStringIdx ctxt &addr - let mvidIdx = seekReadGuidIdx ctxt &addr - let encidIdx = seekReadGuidIdx ctxt &addr - let encbaseidIdx = seekReadGuidIdx ctxt &addr + let generation = seekReadUInt16Adv mdv &addr + let nameIdx = seekReadStringIdx ctxt mdv &addr + let mvidIdx = seekReadGuidIdx ctxt mdv &addr + let encidIdx = seekReadGuidIdx ctxt mdv &addr + let encbaseidIdx = seekReadGuidIdx ctxt mdv &addr (generation, nameIdx, mvidIdx, encidIdx, encbaseidIdx) /// Read Table ILTypeRef. -let seekReadTypeRefRow ctxt idx = - count ctxt.countTypeRef +let seekReadTypeRefRow (ctxt: ILMetadataReader) mdv idx = let mutable addr = ctxt.rowAddr TableNames.TypeRef idx - let scopeIdx = seekReadResolutionScopeIdx ctxt &addr - let nameIdx = seekReadStringIdx ctxt &addr - let namespaceIdx = seekReadStringIdx ctxt &addr + let scopeIdx = seekReadResolutionScopeIdx ctxt mdv &addr + let nameIdx = seekReadStringIdx ctxt mdv &addr + let namespaceIdx = seekReadStringIdx ctxt mdv &addr (scopeIdx, nameIdx, namespaceIdx) /// Read Table ILTypeDef. -let seekReadTypeDefRow ctxt idx = ctxt.seekReadTypeDefRow idx +let seekReadTypeDefRow (ctxt: ILMetadataReader) idx = ctxt.seekReadTypeDefRow idx let seekReadTypeDefRowUncached ctxtH idx = - let ctxt = getHole ctxtH - count ctxt.countTypeDef + let (ctxt : ILMetadataReader) = getHole ctxtH + let mdv = ctxt.mdfile.GetView() let mutable addr = ctxt.rowAddr TableNames.TypeDef idx - let flags = seekReadInt32Adv ctxt &addr - let nameIdx = seekReadStringIdx ctxt &addr - let namespaceIdx = seekReadStringIdx ctxt &addr - let extendsIdx = seekReadTypeDefOrRefOrSpecIdx ctxt &addr - let fieldsIdx = seekReadUntaggedIdx TableNames.Field ctxt &addr - let methodsIdx = seekReadUntaggedIdx TableNames.Method ctxt &addr + let flags = seekReadInt32Adv mdv &addr + let nameIdx = seekReadStringIdx ctxt mdv &addr + let namespaceIdx = seekReadStringIdx ctxt mdv &addr + let extendsIdx = seekReadTypeDefOrRefOrSpecIdx ctxt mdv &addr + let fieldsIdx = seekReadUntaggedIdx TableNames.Field ctxt mdv &addr + let methodsIdx = seekReadUntaggedIdx TableNames.Method ctxt mdv &addr (flags, nameIdx, namespaceIdx, extendsIdx, fieldsIdx, methodsIdx) /// Read Table Field. -let seekReadFieldRow ctxt idx = - count ctxt.countField +let seekReadFieldRow (ctxt: ILMetadataReader) mdv idx = let mutable addr = ctxt.rowAddr TableNames.Field idx - let flags = seekReadUInt16AsInt32Adv ctxt &addr - let nameIdx = seekReadStringIdx ctxt &addr - let typeIdx = seekReadBlobIdx ctxt &addr + let flags = seekReadUInt16AsInt32Adv mdv &addr + let nameIdx = seekReadStringIdx ctxt mdv &addr + let typeIdx = seekReadBlobIdx ctxt mdv &addr (flags, nameIdx, typeIdx) /// Read Table Method. -let seekReadMethodRow ctxt idx = - count ctxt.countMethod +let seekReadMethodRow (ctxt: ILMetadataReader) mdv idx = let mutable addr = ctxt.rowAddr TableNames.Method idx - let codeRVA = seekReadInt32Adv ctxt &addr - let implflags = seekReadUInt16AsInt32Adv ctxt &addr - let flags = seekReadUInt16AsInt32Adv ctxt &addr - let nameIdx = seekReadStringIdx ctxt &addr - let typeIdx = seekReadBlobIdx ctxt &addr - let paramIdx = seekReadUntaggedIdx TableNames.Param ctxt &addr + let codeRVA = seekReadInt32Adv mdv &addr + let implflags = seekReadUInt16AsInt32Adv mdv &addr + let flags = seekReadUInt16AsInt32Adv mdv &addr + let nameIdx = seekReadStringIdx ctxt mdv &addr + let typeIdx = seekReadBlobIdx ctxt mdv &addr + let paramIdx = seekReadUntaggedIdx TableNames.Param ctxt mdv &addr (codeRVA, implflags, flags, nameIdx, typeIdx, paramIdx) /// Read Table Param. -let seekReadParamRow ctxt idx = - count ctxt.countParam +let seekReadParamRow (ctxt: ILMetadataReader) mdv idx = let mutable addr = ctxt.rowAddr TableNames.Param idx - let flags = seekReadUInt16AsInt32Adv ctxt &addr - let seq = seekReadUInt16AsInt32Adv ctxt &addr - let nameIdx = seekReadStringIdx ctxt &addr + let flags = seekReadUInt16AsInt32Adv mdv &addr + let seq = seekReadUInt16AsInt32Adv mdv &addr + let nameIdx = seekReadStringIdx ctxt mdv &addr (flags, seq, nameIdx) /// Read Table InterfaceImpl. -let seekReadInterfaceImplRow ctxt idx = ctxt.seekReadInterfaceImplRow idx -let seekReadInterfaceImplRowUncached ctxtH idx = - let ctxt = getHole ctxtH - count ctxt.countInterfaceImpl +let seekReadInterfaceImplRow (ctxt: ILMetadataReader) mdv idx = let mutable addr = ctxt.rowAddr TableNames.InterfaceImpl idx - let tidx = seekReadUntaggedIdx TableNames.TypeDef ctxt &addr - let intfIdx = seekReadTypeDefOrRefOrSpecIdx ctxt &addr + let tidx = seekReadUntaggedIdx TableNames.TypeDef ctxt mdv &addr + let intfIdx = seekReadTypeDefOrRefOrSpecIdx ctxt mdv &addr (tidx, intfIdx) /// Read Table MemberRef. -let seekReadMemberRefRow ctxt idx = - count ctxt.countMemberRef +let seekReadMemberRefRow (ctxt: ILMetadataReader) mdv idx = let mutable addr = ctxt.rowAddr TableNames.MemberRef idx - let mrpIdx = seekReadMemberRefParentIdx ctxt &addr - let nameIdx = seekReadStringIdx ctxt &addr - let typeIdx = seekReadBlobIdx ctxt &addr + let mrpIdx = seekReadMemberRefParentIdx ctxt mdv &addr + let nameIdx = seekReadStringIdx ctxt mdv &addr + let typeIdx = seekReadBlobIdx ctxt mdv &addr (mrpIdx, nameIdx, typeIdx) /// Read Table Constant. -let seekReadConstantRow ctxt idx = ctxt.seekReadConstantRow idx +let seekReadConstantRow (ctxt: ILMetadataReader) idx = ctxt.seekReadConstantRow idx let seekReadConstantRowUncached ctxtH idx = - let ctxt = getHole ctxtH - count ctxt.countConstant + let (ctxt: ILMetadataReader) = getHole ctxtH + let mdv = ctxt.mdfile.GetView() let mutable addr = ctxt.rowAddr TableNames.Constant idx - let kind = seekReadUInt16Adv ctxt &addr - let parentIdx = seekReadHasConstantIdx ctxt &addr - let valIdx = seekReadBlobIdx ctxt &addr + let kind = seekReadUInt16Adv mdv &addr + let parentIdx = seekReadHasConstantIdx ctxt mdv &addr + let valIdx = seekReadBlobIdx ctxt mdv &addr (kind, parentIdx, valIdx) /// Read Table CustomAttribute. -let seekReadCustomAttributeRow ctxt idx = - count ctxt.countCustomAttribute +let seekReadCustomAttributeRow (ctxt: ILMetadataReader) idx = + let mdv = ctxt.mdfile.GetView() let mutable addr = ctxt.rowAddr TableNames.CustomAttribute idx - let parentIdx = seekReadHasCustomAttributeIdx ctxt &addr - let typeIdx = seekReadCustomAttributeTypeIdx ctxt &addr - let valIdx = seekReadBlobIdx ctxt &addr + let parentIdx = seekReadHasCustomAttributeIdx ctxt mdv &addr + let typeIdx = seekReadCustomAttributeTypeIdx ctxt mdv &addr + let valIdx = seekReadBlobIdx ctxt mdv &addr (parentIdx, typeIdx, valIdx) /// Read Table FieldMarshal. -let seekReadFieldMarshalRow ctxt idx = ctxt.seekReadFieldMarshalRow idx -let seekReadFieldMarshalRowUncached ctxtH idx = - let ctxt = getHole ctxtH - count ctxt.countFieldMarshal +let seekReadFieldMarshalRow (ctxt: ILMetadataReader) mdv idx = let mutable addr = ctxt.rowAddr TableNames.FieldMarshal idx - let parentIdx = seekReadHasFieldMarshalIdx ctxt &addr - let typeIdx = seekReadBlobIdx ctxt &addr + let parentIdx = seekReadHasFieldMarshalIdx ctxt mdv &addr + let typeIdx = seekReadBlobIdx ctxt mdv &addr (parentIdx, typeIdx) /// Read Table Permission. -let seekReadPermissionRow ctxt idx = - count ctxt.countPermission +let seekReadPermissionRow (ctxt: ILMetadataReader) mdv idx = let mutable addr = ctxt.rowAddr TableNames.Permission idx - let action = seekReadUInt16Adv ctxt &addr - let parentIdx = seekReadHasDeclSecurityIdx ctxt &addr - let typeIdx = seekReadBlobIdx ctxt &addr + let action = seekReadUInt16Adv mdv &addr + let parentIdx = seekReadHasDeclSecurityIdx ctxt mdv &addr + let typeIdx = seekReadBlobIdx ctxt mdv &addr (action, parentIdx, typeIdx) /// Read Table ClassLayout. -let seekReadClassLayoutRow ctxt idx = - count ctxt.countClassLayout +let seekReadClassLayoutRow (ctxt: ILMetadataReader) mdv idx = let mutable addr = ctxt.rowAddr TableNames.ClassLayout idx - let pack = seekReadUInt16Adv ctxt &addr - let size = seekReadInt32Adv ctxt &addr - let tidx = seekReadUntaggedIdx TableNames.TypeDef ctxt &addr + let pack = seekReadUInt16Adv mdv &addr + let size = seekReadInt32Adv mdv &addr + let tidx = seekReadUntaggedIdx TableNames.TypeDef ctxt mdv &addr (pack, size, tidx) /// Read Table FieldLayout. -let seekReadFieldLayoutRow ctxt idx = - count ctxt.countFieldLayout +let seekReadFieldLayoutRow (ctxt: ILMetadataReader) mdv idx = let mutable addr = ctxt.rowAddr TableNames.FieldLayout idx - let offset = seekReadInt32Adv ctxt &addr - let fidx = seekReadUntaggedIdx TableNames.Field ctxt &addr + let offset = seekReadInt32Adv mdv &addr + let fidx = seekReadUntaggedIdx TableNames.Field ctxt mdv &addr (offset, fidx) //// Read Table StandAloneSig. -let seekReadStandAloneSigRow ctxt idx = - count ctxt.countStandAloneSig +let seekReadStandAloneSigRow (ctxt: ILMetadataReader) mdv idx = let mutable addr = ctxt.rowAddr TableNames.StandAloneSig idx - let sigIdx = seekReadBlobIdx ctxt &addr + let sigIdx = seekReadBlobIdx ctxt mdv &addr sigIdx /// Read Table EventMap. -let seekReadEventMapRow ctxt idx = - count ctxt.countEventMap +let seekReadEventMapRow (ctxt: ILMetadataReader) mdv idx = let mutable addr = ctxt.rowAddr TableNames.EventMap idx - let tidx = seekReadUntaggedIdx TableNames.TypeDef ctxt &addr - let eventsIdx = seekReadUntaggedIdx TableNames.Event ctxt &addr + let tidx = seekReadUntaggedIdx TableNames.TypeDef ctxt mdv &addr + let eventsIdx = seekReadUntaggedIdx TableNames.Event ctxt mdv &addr (tidx, eventsIdx) /// Read Table Event. -let seekReadEventRow ctxt idx = - count ctxt.countEvent +let seekReadEventRow (ctxt: ILMetadataReader) mdv idx = let mutable addr = ctxt.rowAddr TableNames.Event idx - let flags = seekReadUInt16AsInt32Adv ctxt &addr - let nameIdx = seekReadStringIdx ctxt &addr - let typIdx = seekReadTypeDefOrRefOrSpecIdx ctxt &addr + let flags = seekReadUInt16AsInt32Adv mdv &addr + let nameIdx = seekReadStringIdx ctxt mdv &addr + let typIdx = seekReadTypeDefOrRefOrSpecIdx ctxt mdv &addr (flags, nameIdx, typIdx) /// Read Table PropertyMap. -let seekReadPropertyMapRow ctxt idx = ctxt.seekReadPropertyMapRow idx -let seekReadPropertyMapRowUncached ctxtH idx = - let ctxt = getHole ctxtH - count ctxt.countPropertyMap +let seekReadPropertyMapRow (ctxt: ILMetadataReader) mdv idx = let mutable addr = ctxt.rowAddr TableNames.PropertyMap idx - let tidx = seekReadUntaggedIdx TableNames.TypeDef ctxt &addr - let propsIdx = seekReadUntaggedIdx TableNames.Property ctxt &addr + let tidx = seekReadUntaggedIdx TableNames.TypeDef ctxt mdv &addr + let propsIdx = seekReadUntaggedIdx TableNames.Property ctxt mdv &addr (tidx, propsIdx) /// Read Table Property. -let seekReadPropertyRow ctxt idx = - count ctxt.countProperty +let seekReadPropertyRow (ctxt: ILMetadataReader) mdv idx = let mutable addr = ctxt.rowAddr TableNames.Property idx - let flags = seekReadUInt16AsInt32Adv ctxt &addr - let nameIdx = seekReadStringIdx ctxt &addr - let typIdx = seekReadBlobIdx ctxt &addr + let flags = seekReadUInt16AsInt32Adv mdv &addr + let nameIdx = seekReadStringIdx ctxt mdv &addr + let typIdx = seekReadBlobIdx ctxt mdv &addr (flags, nameIdx, typIdx) /// Read Table MethodSemantics. -let seekReadMethodSemanticsRow ctxt idx = ctxt.seekReadMethodSemanticsRow idx +let seekReadMethodSemanticsRow (ctxt: ILMetadataReader) idx = ctxt.seekReadMethodSemanticsRow idx let seekReadMethodSemanticsRowUncached ctxtH idx = - let ctxt = getHole ctxtH - count ctxt.countMethodSemantics + let (ctxt: ILMetadataReader) = getHole ctxtH + let mdv = ctxt.mdfile.GetView() let mutable addr = ctxt.rowAddr TableNames.MethodSemantics idx - let flags = seekReadUInt16AsInt32Adv ctxt &addr - let midx = seekReadUntaggedIdx TableNames.Method ctxt &addr - let assocIdx = seekReadHasSemanticsIdx ctxt &addr + let flags = seekReadUInt16AsInt32Adv mdv &addr + let midx = seekReadUntaggedIdx TableNames.Method ctxt mdv &addr + let assocIdx = seekReadHasSemanticsIdx ctxt mdv &addr (flags, midx, assocIdx) /// Read Table MethodImpl. -let seekReadMethodImplRow ctxt idx = - count ctxt.countMethodImpl +let seekReadMethodImplRow (ctxt: ILMetadataReader) mdv idx = let mutable addr = ctxt.rowAddr TableNames.MethodImpl idx - let tidx = seekReadUntaggedIdx TableNames.TypeDef ctxt &addr - let mbodyIdx = seekReadMethodDefOrRefIdx ctxt &addr - let mdeclIdx = seekReadMethodDefOrRefIdx ctxt &addr + let tidx = seekReadUntaggedIdx TableNames.TypeDef ctxt mdv &addr + let mbodyIdx = seekReadMethodDefOrRefIdx ctxt mdv &addr + let mdeclIdx = seekReadMethodDefOrRefIdx ctxt mdv &addr (tidx, mbodyIdx, mdeclIdx) /// Read Table ILModuleRef. -let seekReadModuleRefRow ctxt idx = - count ctxt.countModuleRef +let seekReadModuleRefRow (ctxt: ILMetadataReader) mdv idx = let mutable addr = ctxt.rowAddr TableNames.ModuleRef idx - let nameIdx = seekReadStringIdx ctxt &addr + let nameIdx = seekReadStringIdx ctxt mdv &addr nameIdx /// Read Table ILTypeSpec. -let seekReadTypeSpecRow ctxt idx = - count ctxt.countTypeSpec +let seekReadTypeSpecRow (ctxt: ILMetadataReader) mdv idx = let mutable addr = ctxt.rowAddr TableNames.TypeSpec idx - let blobIdx = seekReadBlobIdx ctxt &addr + let blobIdx = seekReadBlobIdx ctxt mdv &addr blobIdx /// Read Table ImplMap. -let seekReadImplMapRow ctxt idx = - count ctxt.countImplMap +let seekReadImplMapRow (ctxt: ILMetadataReader) mdv idx = let mutable addr = ctxt.rowAddr TableNames.ImplMap idx - let flags = seekReadUInt16AsInt32Adv ctxt &addr - let forwrdedIdx = seekReadMemberForwardedIdx ctxt &addr - let nameIdx = seekReadStringIdx ctxt &addr - let scopeIdx = seekReadUntaggedIdx TableNames.ModuleRef ctxt &addr + let flags = seekReadUInt16AsInt32Adv mdv &addr + let forwrdedIdx = seekReadMemberForwardedIdx ctxt mdv &addr + let nameIdx = seekReadStringIdx ctxt mdv &addr + let scopeIdx = seekReadUntaggedIdx TableNames.ModuleRef ctxt mdv &addr (flags, forwrdedIdx, nameIdx, scopeIdx) /// Read Table FieldRVA. -let seekReadFieldRVARow ctxt idx = - count ctxt.countFieldRVA +let seekReadFieldRVARow (ctxt: ILMetadataReader) mdv idx = let mutable addr = ctxt.rowAddr TableNames.FieldRVA idx - let rva = seekReadInt32Adv ctxt &addr - let fidx = seekReadUntaggedIdx TableNames.Field ctxt &addr + let rva = seekReadInt32Adv mdv &addr + let fidx = seekReadUntaggedIdx TableNames.Field ctxt mdv &addr (rva, fidx) /// Read Table Assembly. -let seekReadAssemblyRow ctxt idx = - count ctxt.countAssembly +let seekReadAssemblyRow (ctxt: ILMetadataReader) mdv idx = let mutable addr = ctxt.rowAddr TableNames.Assembly idx - let hash = seekReadInt32Adv ctxt &addr - let v1 = seekReadUInt16Adv ctxt &addr - let v2 = seekReadUInt16Adv ctxt &addr - let v3 = seekReadUInt16Adv ctxt &addr - let v4 = seekReadUInt16Adv ctxt &addr - let flags = seekReadInt32Adv ctxt &addr - let publicKeyIdx = seekReadBlobIdx ctxt &addr - let nameIdx = seekReadStringIdx ctxt &addr - let localeIdx = seekReadStringIdx ctxt &addr + let hash = seekReadInt32Adv mdv &addr + let v1 = seekReadUInt16Adv mdv &addr + let v2 = seekReadUInt16Adv mdv &addr + let v3 = seekReadUInt16Adv mdv &addr + let v4 = seekReadUInt16Adv mdv &addr + let flags = seekReadInt32Adv mdv &addr + let publicKeyIdx = seekReadBlobIdx ctxt mdv &addr + let nameIdx = seekReadStringIdx ctxt mdv &addr + let localeIdx = seekReadStringIdx ctxt mdv &addr (hash, v1, v2, v3, v4, flags, publicKeyIdx, nameIdx, localeIdx) /// Read Table ILAssemblyRef. -let seekReadAssemblyRefRow ctxt idx = - count ctxt.countAssemblyRef +let seekReadAssemblyRefRow (ctxt: ILMetadataReader) mdv idx = let mutable addr = ctxt.rowAddr TableNames.AssemblyRef idx - let v1 = seekReadUInt16Adv ctxt &addr - let v2 = seekReadUInt16Adv ctxt &addr - let v3 = seekReadUInt16Adv ctxt &addr - let v4 = seekReadUInt16Adv ctxt &addr - let flags = seekReadInt32Adv ctxt &addr - let publicKeyOrTokenIdx = seekReadBlobIdx ctxt &addr - let nameIdx = seekReadStringIdx ctxt &addr - let localeIdx = seekReadStringIdx ctxt &addr - let hashValueIdx = seekReadBlobIdx ctxt &addr + let v1 = seekReadUInt16Adv mdv &addr + let v2 = seekReadUInt16Adv mdv &addr + let v3 = seekReadUInt16Adv mdv &addr + let v4 = seekReadUInt16Adv mdv &addr + let flags = seekReadInt32Adv mdv &addr + let publicKeyOrTokenIdx = seekReadBlobIdx ctxt mdv &addr + let nameIdx = seekReadStringIdx ctxt mdv &addr + let localeIdx = seekReadStringIdx ctxt mdv &addr + let hashValueIdx = seekReadBlobIdx ctxt mdv &addr (v1, v2, v3, v4, flags, publicKeyOrTokenIdx, nameIdx, localeIdx, hashValueIdx) /// Read Table File. -let seekReadFileRow ctxt idx = - count ctxt.countFile +let seekReadFileRow (ctxt: ILMetadataReader) mdv idx = let mutable addr = ctxt.rowAddr TableNames.File idx - let flags = seekReadInt32Adv ctxt &addr - let nameIdx = seekReadStringIdx ctxt &addr - let hashValueIdx = seekReadBlobIdx ctxt &addr + let flags = seekReadInt32Adv mdv &addr + let nameIdx = seekReadStringIdx ctxt mdv &addr + let hashValueIdx = seekReadBlobIdx ctxt mdv &addr (flags, nameIdx, hashValueIdx) /// Read Table ILExportedTypeOrForwarder. -let seekReadExportedTypeRow ctxt idx = - count ctxt.countExportedType +let seekReadExportedTypeRow (ctxt: ILMetadataReader) mdv idx = let mutable addr = ctxt.rowAddr TableNames.ExportedType idx - let flags = seekReadInt32Adv ctxt &addr - let tok = seekReadInt32Adv ctxt &addr - let nameIdx = seekReadStringIdx ctxt &addr - let namespaceIdx = seekReadStringIdx ctxt &addr - let implIdx = seekReadImplementationIdx ctxt &addr + let flags = seekReadInt32Adv mdv &addr + let tok = seekReadInt32Adv mdv &addr + let nameIdx = seekReadStringIdx ctxt mdv &addr + let namespaceIdx = seekReadStringIdx ctxt mdv &addr + let implIdx = seekReadImplementationIdx ctxt mdv &addr (flags, tok, nameIdx, namespaceIdx, implIdx) /// Read Table ManifestResource. -let seekReadManifestResourceRow ctxt idx = - count ctxt.countManifestResource +let seekReadManifestResourceRow (ctxt: ILMetadataReader) mdv idx = let mutable addr = ctxt.rowAddr TableNames.ManifestResource idx - let offset = seekReadInt32Adv ctxt &addr - let flags = seekReadInt32Adv ctxt &addr - let nameIdx = seekReadStringIdx ctxt &addr - let implIdx = seekReadImplementationIdx ctxt &addr + let offset = seekReadInt32Adv mdv &addr + let flags = seekReadInt32Adv mdv &addr + let nameIdx = seekReadStringIdx ctxt mdv &addr + let implIdx = seekReadImplementationIdx ctxt mdv &addr (offset, flags, nameIdx, implIdx) /// Read Table Nested. -let seekReadNestedRow ctxt idx = ctxt.seekReadNestedRow idx +let seekReadNestedRow (ctxt: ILMetadataReader) idx = ctxt.seekReadNestedRow idx let seekReadNestedRowUncached ctxtH idx = - let ctxt = getHole ctxtH - count ctxt.countNested + let (ctxt: ILMetadataReader) = getHole ctxtH + let mdv = ctxt.mdfile.GetView() let mutable addr = ctxt.rowAddr TableNames.Nested idx - let nestedIdx = seekReadUntaggedIdx TableNames.TypeDef ctxt &addr - let enclIdx = seekReadUntaggedIdx TableNames.TypeDef ctxt &addr + let nestedIdx = seekReadUntaggedIdx TableNames.TypeDef ctxt mdv &addr + let enclIdx = seekReadUntaggedIdx TableNames.TypeDef ctxt mdv &addr (nestedIdx, enclIdx) /// Read Table GenericParam. -let seekReadGenericParamRow ctxt idx = - count ctxt.countGenericParam +let seekReadGenericParamRow (ctxt: ILMetadataReader) mdv idx = let mutable addr = ctxt.rowAddr TableNames.GenericParam idx - let seq = seekReadUInt16Adv ctxt &addr - let flags = seekReadUInt16Adv ctxt &addr - let ownerIdx = seekReadTypeOrMethodDefIdx ctxt &addr - let nameIdx = seekReadStringIdx ctxt &addr + let seq = seekReadUInt16Adv mdv &addr + let flags = seekReadUInt16Adv mdv &addr + let ownerIdx = seekReadTypeOrMethodDefIdx ctxt mdv &addr + let nameIdx = seekReadStringIdx ctxt mdv &addr (idx, seq, flags, ownerIdx, nameIdx) // Read Table GenericParamConstraint. -let seekReadGenericParamConstraintRow ctxt idx = - count ctxt.countGenericParamConstraint +let seekReadGenericParamConstraintRow (ctxt: ILMetadataReader) mdv idx = let mutable addr = ctxt.rowAddr TableNames.GenericParamConstraint idx - let pidx = seekReadUntaggedIdx TableNames.GenericParam ctxt &addr - let constraintIdx = seekReadTypeDefOrRefOrSpecIdx ctxt &addr + let pidx = seekReadUntaggedIdx TableNames.GenericParam ctxt mdv &addr + let constraintIdx = seekReadTypeDefOrRefOrSpecIdx ctxt mdv &addr (pidx, constraintIdx) /// Read Table ILMethodSpec. -let seekReadMethodSpecRow ctxt idx = - count ctxt.countMethodSpec +let seekReadMethodSpecRow (ctxt: ILMetadataReader) mdv idx = let mutable addr = ctxt.rowAddr TableNames.MethodSpec idx - let mdorIdx = seekReadMethodDefOrRefIdx ctxt &addr - let instIdx = seekReadBlobIdx ctxt &addr + let mdorIdx = seekReadMethodDefOrRefIdx ctxt mdv &addr + let instIdx = seekReadBlobIdx ctxt mdv &addr (mdorIdx, instIdx) let readUserStringHeapUncached ctxtH idx = - let ctxt = getHole ctxtH - seekReadUserString ctxt.is (ctxt.userStringsStreamPhysicalLoc + idx) + let (ctxt: ILMetadataReader) = getHole ctxtH + let mdv = ctxt.mdfile.GetView() + seekReadUserString mdv (ctxt.userStringsStreamPhysicalLoc + idx) -let readUserStringHeap ctxt idx = ctxt.readUserStringHeap idx +let readUserStringHeap (ctxt: ILMetadataReader) idx = ctxt.readUserStringHeap idx let readStringHeapUncached ctxtH idx = - let ctxt = getHole ctxtH - seekReadUTF8String ctxt.is (ctxt.stringsStreamPhysicalLoc + idx) -let readStringHeap ctxt idx = ctxt.readStringHeap idx -let readStringHeapOption ctxt idx = if idx = 0 then None else Some (readStringHeap ctxt idx) + let (ctxt: ILMetadataReader) = getHole ctxtH + let mdv = ctxt.mdfile.GetView() + seekReadUTF8String mdv (ctxt.stringsStreamPhysicalLoc + idx) + +let readStringHeap (ctxt: ILMetadataReader) idx = ctxt.readStringHeap idx + +let readStringHeapOption (ctxt: ILMetadataReader) idx = if idx = 0 then None else Some (readStringHeap ctxt idx) let emptyByteArray: byte[] = [||] + let readBlobHeapUncached ctxtH idx = - let ctxt = getHole ctxtH + let (ctxt: ILMetadataReader) = getHole ctxtH + let mdv = ctxt.mdfile.GetView() // valid index lies in range [1..streamSize) - // NOTE: idx cannot be 0 - Blob\String heap has first empty element that is one byte 0 + // NOTE: idx cannot be 0 - Blob\String heap has first empty element that mdv one byte 0 if idx <= 0 || idx >= ctxt.blobsStreamSize then emptyByteArray - else seekReadBlob ctxt.is (ctxt.blobsStreamPhysicalLoc + idx) -let readBlobHeap ctxt idx = ctxt.readBlobHeap idx + else seekReadBlob mdv (ctxt.blobsStreamPhysicalLoc + idx) + +let readBlobHeap (ctxt: ILMetadataReader) idx = ctxt.readBlobHeap idx + let readBlobHeapOption ctxt idx = if idx = 0 then None else Some (readBlobHeap ctxt idx) -let readGuidHeap ctxt idx = seekReadGuid ctxt.is (ctxt.guidsStreamPhysicalLoc + idx) +//let readGuidHeap ctxt idx = seekReadGuid ctxt.mdv (ctxt.guidsStreamPhysicalLoc + idx) // read a single value out of a blob heap using the given function let readBlobHeapAsBool ctxt vidx = fst (sigptrGetBool (readBlobHeap ctxt vidx) 0) @@ -1457,31 +1544,38 @@ let readBlobHeapAsDouble ctxt vidx = fst (sigptrGetDouble (readBlobHeap ctxt vid // (e) the start of the native resources attached to the binary if any // ----------------------------------------------------------------------*) -#if FX_NO_LINKEDRESOURCES -let readNativeResources _ctxt = [] +// noFileOnDisk indicates that the PE file was read from Memory using OpenILModuleReaderFromBytes +// For example the assembly came from a type provider +// In this case we eagerly read the native resources into memory +let readNativeResources (pectxt: PEReader) = + [ if pectxt.nativeResourcesSize <> 0x0 && pectxt.nativeResourcesAddr <> 0x0 then + let start = pectxt.anyV2P (pectxt.fileName + ": native resources", pectxt.nativeResourcesAddr) + if pectxt.noFileOnDisk then +#if !FX_NO_LINKEDRESOURCES + let unlinkedResource = + let linkedResource = seekReadBytes (pectxt.pefile.GetView()) start pectxt.nativeResourcesSize + unlinkResource pectxt.nativeResourcesAddr linkedResource + yield ILNativeResource.Out unlinkedResource #else -let readNativeResources ctxt = - let nativeResources = - if ctxt.nativeResourcesSize = 0x0 || ctxt.nativeResourcesAddr = 0x0 then - [] - else - [ (lazy (let linkedResource = seekReadBytes ctxt.is (ctxt.anyV2P (ctxt.infile + ": native resources", ctxt.nativeResourcesAddr)) ctxt.nativeResourcesSize - unlinkResource ctxt.nativeResourcesAddr linkedResource)) ] - nativeResources + () #endif - -let dataEndPoints ctxtH = + else + yield ILNativeResource.In (pectxt.fileName, pectxt.nativeResourcesAddr, start, pectxt.nativeResourcesSize ) ] + + +let getDataEndPointsDelayed (pectxt: PEReader) ctxtH = lazy - let ctxt = getHole ctxtH + let (ctxt: ILMetadataReader) = getHole ctxtH + let mdv = ctxt.mdfile.GetView() let dataStartPoints = let res = ref [] for i = 1 to ctxt.getNumRows (TableNames.FieldRVA) do - let rva, _fidx = seekReadFieldRVARow ctxt i + let rva, _fidx = seekReadFieldRVARow ctxt mdv i res := ("field", rva) :: !res for i = 1 to ctxt.getNumRows TableNames.ManifestResource do - let (offset, _, _, TaggedIndex(_tag, idx)) = seekReadManifestResourceRow ctxt i + let (offset, _, _, TaggedIndex(_tag, idx)) = seekReadManifestResourceRow ctxt mdv i if idx = 0 then - let rva = ctxt.resourcesAddr + offset + let rva = pectxt.resourcesAddr + offset res := ("manifest resource", rva) :: !res !res if isNil dataStartPoints then [] @@ -1489,61 +1583,65 @@ let dataEndPoints ctxtH = let methodRVAs = let res = ref [] for i = 1 to ctxt.getNumRows TableNames.Method do - let (rva, _, _, nameIdx, _, _) = seekReadMethodRow ctxt i + let (rva, _, _, nameIdx, _, _) = seekReadMethodRow ctxt mdv i if rva <> 0 then let nm = readStringHeap ctxt nameIdx res := (nm, rva) :: !res !res - ([ ctxt.textSegmentPhysicalLoc + ctxt.textSegmentPhysicalSize ; - ctxt.dataSegmentPhysicalLoc + ctxt.dataSegmentPhysicalSize ] + ([ pectxt.textSegmentPhysicalLoc + pectxt.textSegmentPhysicalSize ; + pectxt.dataSegmentPhysicalLoc + pectxt.dataSegmentPhysicalSize ] @ - (List.map ctxt.anyV2P + (List.map pectxt.anyV2P (dataStartPoints - @ [for (virtAddr, _virtSize, _physLoc) in ctxt.sectionHeaders do yield ("section start", virtAddr) done] - @ [("md", ctxt.metadataAddr)] - @ (if ctxt.nativeResourcesAddr = 0x0 then [] else [("native resources", ctxt.nativeResourcesAddr) ]) - @ (if ctxt.resourcesAddr = 0x0 then [] else [("managed resources", ctxt.resourcesAddr) ]) - @ (if ctxt.strongnameAddr = 0x0 then [] else [("managed strongname", ctxt.strongnameAddr) ]) - @ (if ctxt.vtableFixupsAddr = 0x0 then [] else [("managed vtable_fixups", ctxt.vtableFixupsAddr) ]) + @ [for (virtAddr, _virtSize, _physLoc) in pectxt.sectionHeaders do yield ("section start", virtAddr) done] + @ [("md", pectxt.metadataAddr)] + @ (if pectxt.nativeResourcesAddr = 0x0 then [] else [("native resources", pectxt.nativeResourcesAddr) ]) + @ (if pectxt.resourcesAddr = 0x0 then [] else [("managed resources", pectxt.resourcesAddr) ]) + @ (if pectxt.strongnameAddr = 0x0 then [] else [("managed strongname", pectxt.strongnameAddr) ]) + @ (if pectxt.vtableFixupsAddr = 0x0 then [] else [("managed vtable_fixups", pectxt.vtableFixupsAddr) ]) @ methodRVAs))) |> List.distinct |> List.sort -let rec rvaToData ctxt nm rva = +let rvaToData (ctxt: ILMetadataReader) (pectxt: PEReader) nm rva = if rva = 0x0 then failwith "rva is zero" - let start = ctxt.anyV2P (nm, rva) + let start = pectxt.anyV2P (nm, rva) let endPoints = (Lazy.force ctxt.dataEndPoints) let rec look l = match l with | [] -> - failwithf "find_text_data_extent: none found for infile=%s, name=%s, rva=0x%08x, start=0x%08x" ctxt.infile nm rva start + failwithf "find_text_data_extent: none found for fileName=%s, name=%s, rva=0x%08x, start=0x%08x" ctxt.fileName nm rva start | e::t -> if start < e then - (seekReadBytes ctxt.is start (e - start)) + let pev = pectxt.pefile.GetView() + seekReadBytes pev start (e - start) else look t look endPoints - //----------------------------------------------------------------------- // Read the AbsIL structure (lazily) by reading off the relevant rows. // ---------------------------------------------------------------------- -let isSorted ctxt (tab:TableName) = ((ctxt.sorted &&& (int64 1 <<< tab.Index)) <> int64 0x0) +let isSorted (ctxt: ILMetadataReader) (tab:TableName) = ((ctxt.sorted &&& (int64 1 <<< tab.Index)) <> int64 0x0) -let rec seekReadModule ctxt (subsys, subsysversion, useHighEntropyVA, ilOnly, only32, is32bitpreferred, only64, platform, isDll, alignVirt, alignPhys, imageBaseReal, ilMetadataVersion) idx = - let (_generation, nameIdx, _mvidIdx, _encidIdx, _encbaseidIdx) = seekReadModuleRow ctxt idx +// Note, pectxtEager and pevEager must not be captured by the results of this function +let rec seekReadModule (ctxt: ILMetadataReader) (pectxtEager: PEReader) pevEager peinfo ilMetadataVersion idx = + let (subsys, subsysversion, useHighEntropyVA, ilOnly, only32, is32bitpreferred, only64, platform, isDll, alignVirt, alignPhys, imageBaseReal) = peinfo + let mdv = ctxt.mdfile.GetView() + let (_generation, nameIdx, _mvidIdx, _encidIdx, _encbaseidIdx) = seekReadModuleRow ctxt mdv idx let ilModuleName = readStringHeap ctxt nameIdx - let nativeResources = readNativeResources ctxt + let nativeResources = readNativeResources pectxtEager { Manifest = - if ctxt.getNumRows (TableNames.Assembly) > 0 then Some (seekReadAssemblyManifest ctxt 1) + if ctxt.getNumRows (TableNames.Assembly) > 0 then Some (seekReadAssemblyManifest ctxt pectxtEager 1) else None - CustomAttrs = seekReadCustomAttrs ctxt (TaggedIndex(hca_Module, idx)) + CustomAttrsStored = ctxt.customAttrsReader_Module + MetadataIndex = idx Name = ilModuleName NativeResources=nativeResources - TypeDefs = mkILTypeDefsComputed (fun () -> seekReadTopTypeDefs ctxt ()) + TypeDefs = mkILTypeDefsComputed (fun () -> seekReadTopTypeDefs ctxt) SubSystemFlags = int32 subsys IsILOnly = ilOnly SubsystemVersion = subsysversion @@ -1558,39 +1656,43 @@ let rec seekReadModule ctxt (subsys, subsysversion, useHighEntropyVA, ilOnly, on PhysicalAlignment = alignPhys ImageBase = imageBaseReal MetadataVersion = ilMetadataVersion - Resources = seekReadManifestResources ctxt () } + Resources = seekReadManifestResources ctxt mdv pectxtEager pevEager } -and seekReadAssemblyManifest ctxt idx = - let (hash, v1, v2, v3, v4, flags, publicKeyIdx, nameIdx, localeIdx) = seekReadAssemblyRow ctxt idx +and seekReadAssemblyManifest (ctxt: ILMetadataReader) pectxt idx = + let mdview = ctxt.mdfile.GetView() + let (hash, v1, v2, v3, v4, flags, publicKeyIdx, nameIdx, localeIdx) = seekReadAssemblyRow ctxt mdview idx let name = readStringHeap ctxt nameIdx let pubkey = readBlobHeapOption ctxt publicKeyIdx { Name= name AuxModuleHashAlgorithm=hash - SecurityDecls= seekReadSecurityDecls ctxt (TaggedIndex(hds_Assembly, idx)) + SecurityDeclsStored= ctxt.securityDeclsReader_Assembly PublicKey= pubkey Version= Some (v1, v2, v3, v4) Locale= readStringHeapOption ctxt localeIdx - CustomAttrs = seekReadCustomAttrs ctxt (TaggedIndex(hca_Assembly, idx)) + CustomAttrsStored = ctxt.customAttrsReader_Assembly + MetadataIndex = idx AssemblyLongevity= - begin let masked = flags &&& 0x000e - if masked = 0x0000 then ILAssemblyLongevity.Unspecified - elif masked = 0x0002 then ILAssemblyLongevity.Library - elif masked = 0x0004 then ILAssemblyLongevity.PlatformAppDomain - elif masked = 0x0006 then ILAssemblyLongevity.PlatformProcess - elif masked = 0x0008 then ILAssemblyLongevity.PlatformSystem - else ILAssemblyLongevity.Unspecified - end - ExportedTypes= seekReadTopExportedTypes ctxt () - EntrypointElsewhere=(if fst ctxt.entryPointToken = TableNames.File then Some (seekReadFile ctxt (snd ctxt.entryPointToken)) else None) + let masked = flags &&& 0x000e + if masked = 0x0000 then ILAssemblyLongevity.Unspecified + elif masked = 0x0002 then ILAssemblyLongevity.Library + elif masked = 0x0004 then ILAssemblyLongevity.PlatformAppDomain + elif masked = 0x0006 then ILAssemblyLongevity.PlatformProcess + elif masked = 0x0008 then ILAssemblyLongevity.PlatformSystem + else ILAssemblyLongevity.Unspecified + ExportedTypes= seekReadTopExportedTypes ctxt + EntrypointElsewhere= + let (tab, tok) = pectxt.entryPointToken + if tab = TableNames.File then Some (seekReadFile ctxt mdview tok) else None Retargetable = 0 <> (flags &&& 0x100) DisableJitOptimizations = 0 <> (flags &&& 0x4000) JitTracking = 0 <> (flags &&& 0x8000) IgnoreSymbolStoreSequencePoints = 0 <> (flags &&& 0x2000) } -and seekReadAssemblyRef ctxt idx = ctxt.seekReadAssemblyRef idx +and seekReadAssemblyRef (ctxt: ILMetadataReader) idx = ctxt.seekReadAssemblyRef idx and seekReadAssemblyRefUncached ctxtH idx = - let ctxt = getHole ctxtH - let (v1, v2, v3, v4, flags, publicKeyOrTokenIdx, nameIdx, localeIdx, hashValueIdx) = seekReadAssemblyRefRow ctxt idx + let (ctxt: ILMetadataReader) = getHole ctxtH + let mdv = ctxt.mdfile.GetView() + let (v1, v2, v3, v4, flags, publicKeyOrTokenIdx, nameIdx, localeIdx, hashValueIdx) = seekReadAssemblyRefRow ctxt mdv idx let nm = readStringHeap ctxt nameIdx let publicKey = match readBlobHeapOption ctxt publicKeyOrTokenIdx with @@ -1605,33 +1707,19 @@ and seekReadAssemblyRefUncached ctxtH idx = version=Some(v1, v2, v3, v4), locale=readStringHeapOption ctxt localeIdx) -and seekReadModuleRef ctxt idx = - let (nameIdx) = seekReadModuleRefRow ctxt idx - ILModuleRef.Create(name = readStringHeap ctxt nameIdx, - hasMetadata=true, - hash=None) +and seekReadModuleRef (ctxt: ILMetadataReader) mdv idx = + let (nameIdx) = seekReadModuleRefRow ctxt mdv idx + ILModuleRef.Create(name = readStringHeap ctxt nameIdx, hasMetadata=true, hash=None) -and seekReadFile ctxt idx = - let (flags, nameIdx, hashValueIdx) = seekReadFileRow ctxt idx - ILModuleRef.Create(name = readStringHeap ctxt nameIdx, - hasMetadata= ((flags &&& 0x0001) = 0x0), - hash= readBlobHeapOption ctxt hashValueIdx) +and seekReadFile (ctxt: ILMetadataReader) mdv idx = + let (flags, nameIdx, hashValueIdx) = seekReadFileRow ctxt mdv idx + ILModuleRef.Create(name = readStringHeap ctxt nameIdx, hasMetadata= ((flags &&& 0x0001) = 0x0), hash= readBlobHeapOption ctxt hashValueIdx) -and seekReadClassLayout ctxt idx = - match seekReadOptionalIndexedRow (ctxt.getNumRows TableNames.ClassLayout, seekReadClassLayoutRow ctxt, (fun (_, _, tidx) -> tidx), simpleIndexCompare idx, isSorted ctxt TableNames.ClassLayout, (fun (pack, size, _) -> pack, size)) with +and seekReadClassLayout (ctxt: ILMetadataReader) mdv idx = + match seekReadOptionalIndexedRow (ctxt.getNumRows TableNames.ClassLayout, seekReadClassLayoutRow ctxt mdv, (fun (_, _, tidx) -> tidx), simpleIndexCompare idx, isSorted ctxt TableNames.ClassLayout, (fun (pack, size, _) -> pack, size)) with | None -> { Size = None; Pack = None } | Some (pack, size) -> { Size = Some size; Pack = Some pack } -and memberAccessOfFlags flags = - let f = (flags &&& 0x00000007) - if f = 0x00000001 then ILMemberAccess.Private - elif f = 0x00000006 then ILMemberAccess.Public - elif f = 0x00000004 then ILMemberAccess.Family - elif f = 0x00000002 then ILMemberAccess.FamilyAndAssembly - elif f = 0x00000005 then ILMemberAccess.FamilyOrAssembly - elif f = 0x00000003 then ILMemberAccess.Assembly - else ILMemberAccess.CompilerControlled - and typeAccessOfFlags flags = let f = (flags &&& 0x00000007) if f = 0x00000001 then ILTypeDefAccess.Public @@ -1643,31 +1731,12 @@ and typeAccessOfFlags flags = elif f = 0x00000005 then ILTypeDefAccess.Nested ILMemberAccess.Assembly else ILTypeDefAccess.Private -and typeLayoutOfFlags ctxt flags tidx = +and typeLayoutOfFlags (ctxt: ILMetadataReader) mdv flags tidx = let f = (flags &&& 0x00000018) - if f = 0x00000008 then ILTypeDefLayout.Sequential (seekReadClassLayout ctxt tidx) - elif f = 0x00000010 then ILTypeDefLayout.Explicit (seekReadClassLayout ctxt tidx) + if f = 0x00000008 then ILTypeDefLayout.Sequential (seekReadClassLayout ctxt mdv tidx) + elif f = 0x00000010 then ILTypeDefLayout.Explicit (seekReadClassLayout ctxt mdv tidx) else ILTypeDefLayout.Auto -and typeKindOfFlags nm _mdefs _fdefs (super:ILType option) flags = - if (flags &&& 0x00000020) <> 0x0 then ILTypeDefKind.Interface - else - let isEnum = (match super with None -> false | Some ty -> ty.TypeSpec.Name = "System.Enum") - let isDelegate = (match super with None -> false | Some ty -> ty.TypeSpec.Name = "System.Delegate") - let isMulticastDelegate = (match super with None -> false | Some ty -> ty.TypeSpec.Name = "System.MulticastDelegate") - let selfIsMulticastDelegate = nm = "System.MulticastDelegate" - let isValueType = (match super with None -> false | Some ty -> ty.TypeSpec.Name = "System.ValueType" && nm <> "System.Enum") - if isEnum then ILTypeDefKind.Enum - elif (isDelegate && not selfIsMulticastDelegate) || isMulticastDelegate then ILTypeDefKind.Delegate - elif isValueType then ILTypeDefKind.ValueType - else ILTypeDefKind.Class - -and typeEncodingOfFlags flags = - let f = (flags &&& 0x00030000) - if f = 0x00020000 then ILDefaultPInvokeEncoding.Auto - elif f = 0x00010000 then ILDefaultPInvokeEncoding.Unicode - else ILDefaultPInvokeEncoding.Ansi - and isTopTypeDef flags = (typeAccessOfFlags flags = ILTypeDefAccess.Private) || typeAccessOfFlags flags = ILTypeDefAccess.Public @@ -1690,7 +1759,7 @@ and readBlobHeapAsTypeName ctxt (nameIdx, namespaceIdx) = | None -> name | Some ns -> ctxt.memoizeString (ns+"."+name) -and seekReadTypeDefRowExtents ctxt _info (idx:int) = +and seekReadTypeDefRowExtents (ctxt: ILMetadataReader) _info (idx:int) = if idx >= ctxt.getNumRows TableNames.TypeDef then ctxt.getNumRows TableNames.Field + 1, ctxt.getNumRows TableNames.Method + 1 @@ -1702,94 +1771,85 @@ and seekReadTypeDefRowWithExtents ctxt (idx:int) = let info= seekReadTypeDefRow ctxt idx info, seekReadTypeDefRowExtents ctxt info idx -and seekReadTypeDef ctxt toponly (idx:int) = +and seekReadPreTypeDef ctxt toponly (idx:int) = let (flags, nameIdx, namespaceIdx, _, _, _) = seekReadTypeDefRow ctxt idx if toponly && not (isTopTypeDef flags) then None else let ns, n = readBlobHeapAsSplitTypeName ctxt (nameIdx, namespaceIdx) - let cas = seekReadCustomAttrs ctxt (TaggedIndex(hca_TypeDef, idx)) - - let rest = - lazy + // Return the ILPreTypeDef + Some (mkILPreTypeDefRead (ns, n, idx, ctxt.typeDefReader)) + +and typeDefReader ctxtH : ILTypeDefStored = + mkILTypeDefReader + (fun idx -> + let (ctxt: ILMetadataReader) = getHole ctxtH + let mdv = ctxt.mdfile.GetView() // Re-read so as not to save all these in the lazy closure - this suspension ctxt.is the largest // heavily allocated one in all of AbsIL + let ((flags, nameIdx, namespaceIdx, extendsIdx, fieldsIdx, methodsIdx) as info) = seekReadTypeDefRow ctxt idx let nm = readBlobHeapAsTypeName ctxt (nameIdx, namespaceIdx) - let cas = seekReadCustomAttrs ctxt (TaggedIndex(hca_TypeDef, idx)) - let (endFieldsIdx, endMethodsIdx) = seekReadTypeDefRowExtents ctxt info idx let typars = seekReadGenericParams ctxt 0 (tomd_TypeDef, idx) let numtypars = typars.Length let super = seekReadOptionalTypeDefOrRef ctxt numtypars AsObject extendsIdx - let layout = typeLayoutOfFlags ctxt flags idx + let layout = typeLayoutOfFlags ctxt mdv flags idx let hasLayout = (match layout with ILTypeDefLayout.Explicit _ -> true | _ -> false) let mdefs = seekReadMethods ctxt numtypars methodsIdx endMethodsIdx let fdefs = seekReadFields ctxt (numtypars, hasLayout) fieldsIdx endFieldsIdx - let kind = typeKindOfFlags nm mdefs fdefs super flags let nested = seekReadNestedTypeDefs ctxt idx - let impls = seekReadInterfaceImpls ctxt numtypars idx - let sdecls = seekReadSecurityDecls ctxt (TaggedIndex(hds_TypeDef, idx)) + let impls = seekReadInterfaceImpls ctxt mdv numtypars idx let mimpls = seekReadMethodImpls ctxt numtypars idx let props = seekReadProperties ctxt numtypars idx let events = seekReadEvents ctxt numtypars idx - { tdKind= kind - Name=nm - GenericParams=typars - Access= typeAccessOfFlags flags - IsAbstract= (flags &&& 0x00000080) <> 0x0 - IsSealed= (flags &&& 0x00000100) <> 0x0 - IsSerializable= (flags &&& 0x00002000) <> 0x0 - IsComInterop= (flags &&& 0x00001000) <> 0x0 - Layout = layout - IsSpecialName= (flags &&& 0x00000400) <> 0x0 - Encoding=typeEncodingOfFlags flags - NestedTypes= nested - Implements = impls - Extends = super - Methods = mdefs - SecurityDecls = sdecls - HasSecurity=(flags &&& 0x00040000) <> 0x0 - Fields=fdefs - MethodImpls=mimpls - InitSemantics= - if kind = ILTypeDefKind.Interface then ILTypeInit.OnAny - elif (flags &&& 0x00100000) <> 0x0 then ILTypeInit.BeforeField - else ILTypeInit.OnAny - Events= events - Properties=props - CustomAttrs=cas } - Some (ns, n, cas, rest) - -and seekReadTopTypeDefs ctxt () = + ILTypeDef(name=nm, + genericParams=typars , + attributes= enum(flags), + layout = layout, + nestedTypes= nested, + implements = impls, + extends = super, + methods = mdefs, + securityDeclsStored = ctxt.securityDeclsReader_TypeDef, + fields=fdefs, + methodImpls=mimpls, + events= events, + properties=props, + customAttrsStored=ctxt.customAttrsReader_TypeDef, + metadataIndex=idx) + ) + +and seekReadTopTypeDefs (ctxt: ILMetadataReader) = [| for i = 1 to ctxt.getNumRows TableNames.TypeDef do - match seekReadTypeDef ctxt true i with + match seekReadPreTypeDef ctxt true i with | None -> () | Some td -> yield td |] -and seekReadNestedTypeDefs ctxt tidx = +and seekReadNestedTypeDefs (ctxt: ILMetadataReader) tidx = mkILTypeDefsComputed (fun () -> let nestedIdxs = seekReadIndexedRows (ctxt.getNumRows TableNames.Nested, seekReadNestedRow ctxt, snd, simpleIndexCompare tidx, false, fst) [| for i in nestedIdxs do - match seekReadTypeDef ctxt false i with + match seekReadPreTypeDef ctxt false i with | None -> () | Some td -> yield td |]) -and seekReadInterfaceImpls ctxt numtypars tidx = +and seekReadInterfaceImpls (ctxt: ILMetadataReader) mdv numtypars tidx = seekReadIndexedRows (ctxt.getNumRows TableNames.InterfaceImpl, - seekReadInterfaceImplRow ctxt, - fst, - simpleIndexCompare tidx, - isSorted ctxt TableNames.InterfaceImpl, - (snd >> seekReadTypeDefOrRef ctxt numtypars AsObject (*ok*) List.empty)) + seekReadInterfaceImplRow ctxt mdv, + fst, + simpleIndexCompare tidx, + isSorted ctxt TableNames.InterfaceImpl, + (snd >> seekReadTypeDefOrRef ctxt numtypars AsObject (*ok*) List.empty)) and seekReadGenericParams ctxt numtypars (a, b) : ILGenericParameterDefs = ctxt.seekReadGenericParams (GenericParamsIdx(numtypars, a, b)) and seekReadGenericParamsUncached ctxtH (GenericParamsIdx(numtypars, a, b)) = - let ctxt = getHole ctxtH + let (ctxt: ILMetadataReader) = getHole ctxtH + let mdv = ctxt.mdfile.GetView() let pars = seekReadIndexedRows - (ctxt.getNumRows TableNames.GenericParam, seekReadGenericParamRow ctxt, + (ctxt.getNumRows TableNames.GenericParam, seekReadGenericParamRow ctxt mdv, (fun (_, _, _, tomd, _) -> tomd), tomdCompare (TaggedIndex(a, b)), isSorted ctxt TableNames.GenericParam, @@ -1801,34 +1861,34 @@ and seekReadGenericParamsUncached ctxtH (GenericParamsIdx(numtypars, a, b)) = elif variance_flags = 0x0001 then CoVariant elif variance_flags = 0x0002 then ContraVariant else NonVariant - let constraints = seekReadGenericParamConstraintsUncached ctxt numtypars gpidx - let cas = seekReadCustomAttrs ctxt (TaggedIndex(hca_GenericParam, gpidx)) + let constraints = seekReadGenericParamConstraints ctxt mdv numtypars gpidx seq, {Name=readStringHeap ctxt nameIdx Constraints = constraints Variance=variance - CustomAttrs=cas + CustomAttrsStored = ctxt.customAttrsReader_GenericParam + MetadataIndex=gpidx HasReferenceTypeConstraint= (flags &&& 0x0004) <> 0 HasNotNullableValueTypeConstraint= (flags &&& 0x0008) <> 0 HasDefaultConstructorConstraint=(flags &&& 0x0010) <> 0 })) pars |> List.sortBy fst |> List.map snd -and seekReadGenericParamConstraintsUncached ctxt numtypars gpidx = +and seekReadGenericParamConstraints (ctxt: ILMetadataReader) mdv numtypars gpidx = seekReadIndexedRows (ctxt.getNumRows TableNames.GenericParamConstraint, - seekReadGenericParamConstraintRow ctxt, + seekReadGenericParamConstraintRow ctxt mdv, fst, simpleIndexCompare gpidx, isSorted ctxt TableNames.GenericParamConstraint, (snd >> seekReadTypeDefOrRef ctxt numtypars AsObject (*ok*) List.empty)) -and seekReadTypeDefAsType ctxt boxity (ginst:ILTypes) idx = +and seekReadTypeDefAsType (ctxt: ILMetadataReader) boxity (ginst:ILTypes) idx = ctxt.seekReadTypeDefAsType (TypeDefAsTypIdx (boxity, ginst, idx)) and seekReadTypeDefAsTypeUncached ctxtH (TypeDefAsTypIdx (boxity, ginst, idx)) = let ctxt = getHole ctxtH mkILTy boxity (ILTypeSpec.Create(seekReadTypeDefAsTypeRef ctxt idx, ginst)) -and seekReadTypeDefAsTypeRef ctxt idx = +and seekReadTypeDefAsTypeRef (ctxt: ILMetadataReader) idx = let enc = if seekIsTopTypeDefOfIdx ctxt idx then [] else @@ -1839,138 +1899,142 @@ and seekReadTypeDefAsTypeRef ctxt idx = let nm = readBlobHeapAsTypeName ctxt (nameIdx, namespaceIdx) ILTypeRef.Create(scope=ILScopeRef.Local, enclosing=enc, name = nm ) -and seekReadTypeRef ctxt idx = ctxt.seekReadTypeRef idx +and seekReadTypeRef (ctxt: ILMetadataReader) idx = ctxt.seekReadTypeRef idx and seekReadTypeRefUncached ctxtH idx = - let ctxt = getHole ctxtH - let scopeIdx, nameIdx, namespaceIdx = seekReadTypeRefRow ctxt idx - let scope, enc = seekReadTypeRefScope ctxt scopeIdx + let (ctxt: ILMetadataReader) = getHole ctxtH + let mdv = ctxt.mdfile.GetView() + let scopeIdx, nameIdx, namespaceIdx = seekReadTypeRefRow ctxt mdv idx + let scope, enc = seekReadTypeRefScope ctxt mdv scopeIdx let nm = readBlobHeapAsTypeName ctxt (nameIdx, namespaceIdx) ILTypeRef.Create(scope=scope, enclosing=enc, name = nm) -and seekReadTypeRefAsType ctxt boxity ginst idx = ctxt.seekReadTypeRefAsType (TypeRefAsTypIdx (boxity, ginst, idx)) +and seekReadTypeRefAsType (ctxt: ILMetadataReader) boxity ginst idx = ctxt.seekReadTypeRefAsType (TypeRefAsTypIdx (boxity, ginst, idx)) and seekReadTypeRefAsTypeUncached ctxtH (TypeRefAsTypIdx (boxity, ginst, idx)) = let ctxt = getHole ctxtH mkILTy boxity (ILTypeSpec.Create(seekReadTypeRef ctxt idx, ginst)) -and seekReadTypeDefOrRef ctxt numtypars boxity (ginst:ILTypes) (TaggedIndex(tag, idx) ) = +and seekReadTypeDefOrRef (ctxt: ILMetadataReader) numtypars boxity (ginst:ILTypes) (TaggedIndex(tag, idx) ) = + let mdv = ctxt.mdfile.GetView() match tag with | tag when tag = tdor_TypeDef -> seekReadTypeDefAsType ctxt boxity ginst idx | tag when tag = tdor_TypeRef -> seekReadTypeRefAsType ctxt boxity ginst idx | tag when tag = tdor_TypeSpec -> - if ginst.Length > 0 then dprintn ("type spec used as type constructor for a generic instantiation: ignoring instantiation") - readBlobHeapAsType ctxt numtypars (seekReadTypeSpecRow ctxt idx) + if not (List.isEmpty ginst) then dprintn ("type spec used as type constructor for a generic instantiation: ignoring instantiation") + readBlobHeapAsType ctxt numtypars (seekReadTypeSpecRow ctxt mdv idx) | _ -> failwith "seekReadTypeDefOrRef ctxt" -and seekReadTypeDefOrRefAsTypeRef ctxt (TaggedIndex(tag, idx) ) = +and seekReadTypeDefOrRefAsTypeRef (ctxt: ILMetadataReader) (TaggedIndex(tag, idx) ) = match tag with | tag when tag = tdor_TypeDef -> seekReadTypeDefAsTypeRef ctxt idx | tag when tag = tdor_TypeRef -> seekReadTypeRef ctxt idx | tag when tag = tdor_TypeSpec -> - dprintn ("type spec used where a type ref or def ctxt.is required") + dprintn ("type spec used where a type ref or def is required") ctxt.ilg.typ_Object.TypeRef | _ -> failwith "seekReadTypeDefOrRefAsTypeRef_readTypeDefOrRefOrSpec" -and seekReadMethodRefParent ctxt numtypars (TaggedIndex(tag, idx)) = +and seekReadMethodRefParent (ctxt: ILMetadataReader) mdv numtypars (TaggedIndex(tag, idx)) = match tag with - | tag when tag = mrp_TypeRef -> seekReadTypeRefAsType ctxt AsObject (* not ok - no way to tell if a member ref parent ctxt.is a value type or not *) List.empty idx - | tag when tag = mrp_ModuleRef -> mkILTypeForGlobalFunctions (ILScopeRef.Module (seekReadModuleRef ctxt idx)) + | tag when tag = mrp_TypeRef -> seekReadTypeRefAsType ctxt AsObject (* not ok - no way to tell if a member ref parent is a value type or not *) List.empty idx + | tag when tag = mrp_ModuleRef -> mkILTypeForGlobalFunctions (ILScopeRef.Module (seekReadModuleRef ctxt mdv idx)) | tag when tag = mrp_MethodDef -> - let (MethodData(enclTyp, cc, nm, argtys, retty, minst)) = seekReadMethodDefAsMethodData ctxt idx - let mspec = mkILMethSpecInTy (enclTyp, cc, nm, argtys, retty, minst) - mspec.EnclosingType - | tag when tag = mrp_TypeSpec -> readBlobHeapAsType ctxt numtypars (seekReadTypeSpecRow ctxt idx) - | _ -> failwith "seekReadMethodRefParent ctxt" + let (MethodData(enclTy, cc, nm, argtys, retty, minst)) = seekReadMethodDefAsMethodData ctxt idx + let mspec = mkILMethSpecInTy (enclTy, cc, nm, argtys, retty, minst) + mspec.DeclaringType + | tag when tag = mrp_TypeSpec -> readBlobHeapAsType ctxt numtypars (seekReadTypeSpecRow ctxt mdv idx) + | _ -> failwith "seekReadMethodRefParent" -and seekReadMethodDefOrRef ctxt numtypars (TaggedIndex(tag, idx)) = +and seekReadMethodDefOrRef (ctxt: ILMetadataReader) numtypars (TaggedIndex(tag, idx)) = match tag with | tag when tag = mdor_MethodDef -> - let (MethodData(enclTyp, cc, nm, argtys, retty, minst)) = seekReadMethodDefAsMethodData ctxt idx - VarArgMethodData(enclTyp, cc, nm, argtys, None, retty, minst) + let (MethodData(enclTy, cc, nm, argtys, retty, minst)) = seekReadMethodDefAsMethodData ctxt idx + VarArgMethodData(enclTy, cc, nm, argtys, None, retty, minst) | tag when tag = mdor_MemberRef -> seekReadMemberRefAsMethodData ctxt numtypars idx - | _ -> failwith "seekReadMethodDefOrRef ctxt" + | _ -> failwith "seekReadMethodDefOrRef" -and seekReadMethodDefOrRefNoVarargs ctxt numtypars x = - let (VarArgMethodData(enclTyp, cc, nm, argtys, varargs, retty, minst)) = seekReadMethodDefOrRef ctxt numtypars x +and seekReadMethodDefOrRefNoVarargs (ctxt: ILMetadataReader) numtypars x = + let (VarArgMethodData(enclTy, cc, nm, argtys, varargs, retty, minst)) = seekReadMethodDefOrRef ctxt numtypars x if varargs <> None then dprintf "ignoring sentinel and varargs in ILMethodDef token signature" - MethodData(enclTyp, cc, nm, argtys, retty, minst) + MethodData(enclTy, cc, nm, argtys, retty, minst) -and seekReadCustomAttrType ctxt (TaggedIndex(tag, idx) ) = +and seekReadCustomAttrType (ctxt: ILMetadataReader) (TaggedIndex(tag, idx) ) = match tag with | tag when tag = cat_MethodDef -> - let (MethodData(enclTyp, cc, nm, argtys, retty, minst)) = seekReadMethodDefAsMethodData ctxt idx - mkILMethSpecInTy (enclTyp, cc, nm, argtys, retty, minst) + let (MethodData(enclTy, cc, nm, argtys, retty, minst)) = seekReadMethodDefAsMethodData ctxt idx + mkILMethSpecInTy (enclTy, cc, nm, argtys, retty, minst) | tag when tag = cat_MemberRef -> - let (MethodData(enclTyp, cc, nm, argtys, retty, minst)) = seekReadMemberRefAsMethDataNoVarArgs ctxt 0 idx - mkILMethSpecInTy (enclTyp, cc, nm, argtys, retty, minst) + let (MethodData(enclTy, cc, nm, argtys, retty, minst)) = seekReadMemberRefAsMethDataNoVarArgs ctxt 0 idx + mkILMethSpecInTy (enclTy, cc, nm, argtys, retty, minst) | _ -> failwith "seekReadCustomAttrType ctxt" -and seekReadImplAsScopeRef ctxt (TaggedIndex(tag, idx) ) = +and seekReadImplAsScopeRef (ctxt: ILMetadataReader) mdv (TaggedIndex(tag, idx) ) = if idx = 0 then ILScopeRef.Local else match tag with - | tag when tag = i_File -> ILScopeRef.Module (seekReadFile ctxt idx) + | tag when tag = i_File -> ILScopeRef.Module (seekReadFile ctxt mdv idx) | tag when tag = i_AssemblyRef -> ILScopeRef.Assembly (seekReadAssemblyRef ctxt idx) - | tag when tag = i_ExportedType -> failwith "seekReadImplAsScopeRef ctxt" - | _ -> failwith "seekReadImplAsScopeRef ctxt" + | tag when tag = i_ExportedType -> failwith "seekReadImplAsScopeRef" + | _ -> failwith "seekReadImplAsScopeRef" -and seekReadTypeRefScope ctxt (TaggedIndex(tag, idx) ) = +and seekReadTypeRefScope (ctxt: ILMetadataReader) mdv (TaggedIndex(tag, idx) ) = match tag with | tag when tag = rs_Module -> ILScopeRef.Local, [] - | tag when tag = rs_ModuleRef -> ILScopeRef.Module (seekReadModuleRef ctxt idx), [] + | tag when tag = rs_ModuleRef -> ILScopeRef.Module (seekReadModuleRef ctxt mdv idx), [] | tag when tag = rs_AssemblyRef -> ILScopeRef.Assembly (seekReadAssemblyRef ctxt idx), [] | tag when tag = rs_TypeRef -> let tref = seekReadTypeRef ctxt idx tref.Scope, (tref.Enclosing@[tref.Name]) - | _ -> failwith "seekReadTypeRefScope ctxt" + | _ -> failwith "seekReadTypeRefScope" -and seekReadOptionalTypeDefOrRef ctxt numtypars boxity idx = +and seekReadOptionalTypeDefOrRef (ctxt: ILMetadataReader) numtypars boxity idx = if idx = TaggedIndex(tdor_TypeDef, 0) then None else Some (seekReadTypeDefOrRef ctxt numtypars boxity List.empty idx) -and seekReadField ctxt (numtypars, hasLayout) (idx:int) = - let (flags, nameIdx, typeIdx) = seekReadFieldRow ctxt idx - let nm = readStringHeap ctxt nameIdx - let isStatic = (flags &&& 0x0010) <> 0 - let fd = - { Name = nm - Type= readBlobHeapAsFieldSig ctxt numtypars typeIdx - Access = memberAccessOfFlags flags - IsStatic = isStatic - IsInitOnly = (flags &&& 0x0020) <> 0 - IsLiteral = (flags &&& 0x0040) <> 0 - NotSerialized = (flags &&& 0x0080) <> 0 - IsSpecialName = (flags &&& 0x0200) <> 0 || (flags &&& 0x0400) <> 0 (* REVIEW: RTSpecialName *) - LiteralValue = if (flags &&& 0x8000) = 0 then None else Some (seekReadConstant ctxt (TaggedIndex(hc_FieldDef, idx))) - Marshal = - if (flags &&& 0x1000) = 0 then None else - Some (seekReadIndexedRow (ctxt.getNumRows TableNames.FieldMarshal, seekReadFieldMarshalRow ctxt, - fst, hfmCompare (TaggedIndex(hfm_FieldDef, idx)), - isSorted ctxt TableNames.FieldMarshal, - (snd >> readBlobHeapAsNativeType ctxt))) - Data = - if (flags &&& 0x0100) = 0 then None - else - let rva = seekReadIndexedRow (ctxt.getNumRows TableNames.FieldRVA, seekReadFieldRVARow ctxt, - snd, simpleIndexCompare idx, isSorted ctxt TableNames.FieldRVA, fst) - Some (rvaToData ctxt "field" rva) - Offset = - if hasLayout && not isStatic then - Some (seekReadIndexedRow (ctxt.getNumRows TableNames.FieldLayout, seekReadFieldLayoutRow ctxt, - snd, simpleIndexCompare idx, isSorted ctxt TableNames.FieldLayout, fst)) else None - CustomAttrs=seekReadCustomAttrs ctxt (TaggedIndex(hca_FieldDef, idx)) } - fd +and seekReadField ctxt mdv (numtypars, hasLayout) (idx:int) = + let (flags, nameIdx, typeIdx) = seekReadFieldRow ctxt mdv idx + let nm = readStringHeap ctxt nameIdx + let isStatic = (flags &&& 0x0010) <> 0 + ILFieldDef(name = nm, + fieldType= readBlobHeapAsFieldSig ctxt numtypars typeIdx, + attributes = enum(flags), + literalValue = (if (flags &&& 0x8000) = 0 then None else Some (seekReadConstant ctxt (TaggedIndex(hc_FieldDef, idx)))), + marshal = + (if (flags &&& 0x1000) = 0 then + None + else + Some (seekReadIndexedRow (ctxt.getNumRows TableNames.FieldMarshal, seekReadFieldMarshalRow ctxt mdv, + fst, hfmCompare (TaggedIndex(hfm_FieldDef, idx)), + isSorted ctxt TableNames.FieldMarshal, + (snd >> readBlobHeapAsNativeType ctxt)))), + data = + (if (flags &&& 0x0100) = 0 then + None + else + match ctxt.pectxtCaptured with + | None -> None // indicates metadata only, where Data is not available + | Some pectxt -> + let rva = seekReadIndexedRow (ctxt.getNumRows TableNames.FieldRVA, seekReadFieldRVARow ctxt mdv, + snd, simpleIndexCompare idx, isSorted ctxt TableNames.FieldRVA, fst) + Some (rvaToData ctxt pectxt "field" rva)), + offset = + (if hasLayout && not isStatic then + Some (seekReadIndexedRow (ctxt.getNumRows TableNames.FieldLayout, seekReadFieldLayoutRow ctxt mdv, + snd, simpleIndexCompare idx, isSorted ctxt TableNames.FieldLayout, fst)) else None), + customAttrsStored=ctxt.customAttrsReader_FieldDef, + metadataIndex = idx) -and seekReadFields ctxt (numtypars, hasLayout) fidx1 fidx2 = +and seekReadFields (ctxt: ILMetadataReader) (numtypars, hasLayout) fidx1 fidx2 = mkILFieldsLazy (lazy + let mdv = ctxt.mdfile.GetView() [ for i = fidx1 to fidx2 - 1 do - yield seekReadField ctxt (numtypars, hasLayout) i ]) + yield seekReadField ctxt mdv (numtypars, hasLayout) i ]) -and seekReadMethods ctxt numtypars midx1 midx2 = +and seekReadMethods (ctxt: ILMetadataReader) numtypars midx1 midx2 = mkILMethodsComputed (fun () -> + let mdv = ctxt.mdfile.GetView() [| for i = midx1 to midx2 - 1 do - yield seekReadMethod ctxt numtypars i |]) + yield seekReadMethod ctxt mdv numtypars i |]) and sigptrGetTypeDefOrRefOrSpecIdx bytes sigptr = let n, sigptr = sigptrGetZInt32 bytes sigptr @@ -1979,7 +2043,7 @@ and sigptrGetTypeDefOrRefOrSpecIdx bytes sigptr = else (* Type Ref *) TaggedIndex(tdor_TypeRef, (n >>>& 2)), sigptr -and sigptrGetTy ctxt numtypars bytes sigptr = +and sigptrGetTy (ctxt: ILMetadataReader) numtypars bytes sigptr = let b0, sigptr = sigptrGetByte bytes sigptr if b0 = et_OBJECT then ctxt.ilg.typ_Object , sigptr elif b0 = et_STRING then ctxt.ilg.typ_String, sigptr @@ -2018,16 +2082,16 @@ and sigptrGetTy ctxt numtypars bytes sigptr = let n, sigptr = sigptrGetZInt32 bytes sigptr ILType.TypeVar (uint16 (n + numtypars)), sigptr elif b0 = et_BYREF then - let typ, sigptr = sigptrGetTy ctxt numtypars bytes sigptr - ILType.Byref typ, sigptr + let ty, sigptr = sigptrGetTy ctxt numtypars bytes sigptr + ILType.Byref ty, sigptr elif b0 = et_PTR then - let typ, sigptr = sigptrGetTy ctxt numtypars bytes sigptr - ILType.Ptr typ, sigptr + let ty, sigptr = sigptrGetTy ctxt numtypars bytes sigptr + ILType.Ptr ty, sigptr elif b0 = et_SZARRAY then - let typ, sigptr = sigptrGetTy ctxt numtypars bytes sigptr - mkILArr1DTy typ, sigptr + let ty, sigptr = sigptrGetTy ctxt numtypars bytes sigptr + mkILArr1DTy ty, sigptr elif b0 = et_ARRAY then - let typ, sigptr = sigptrGetTy ctxt numtypars bytes sigptr + let ty, sigptr = sigptrGetTy ctxt numtypars bytes sigptr let rank, sigptr = sigptrGetZInt32 bytes sigptr let numSized, sigptr = sigptrGetZInt32 bytes sigptr let sizes, sigptr = sigptrFold sigptrGetZInt32 numSized bytes sigptr @@ -2038,7 +2102,7 @@ and sigptrGetTy ctxt numtypars bytes sigptr = (if i < numLoBounded then Some (List.item i lobounds) else None), (if i < numSized then Some (List.item i sizes) else None) ILArrayShape (Array.toList (Array.init rank dim)) - mkILArrTy (typ, shape), sigptr + mkILArrTy (ty, shape), sigptr elif b0 = et_VOID then ILType.Void, sigptr elif b0 = et_TYPEDBYREF then @@ -2046,8 +2110,8 @@ and sigptrGetTy ctxt numtypars bytes sigptr = t, sigptr elif b0 = et_CMOD_REQD || b0 = et_CMOD_OPT then let tdorIdx, sigptr = sigptrGetTypeDefOrRefOrSpecIdx bytes sigptr - let typ, sigptr = sigptrGetTy ctxt numtypars bytes sigptr - ILType.Modified((b0 = et_CMOD_REQD), seekReadTypeDefOrRefAsTypeRef ctxt tdorIdx, typ), sigptr + let ty, sigptr = sigptrGetTy ctxt numtypars bytes sigptr + ILType.Modified((b0 = et_CMOD_REQD), seekReadTypeDefOrRefAsTypeRef ctxt tdorIdx, ty), sigptr elif b0 = et_FNPTR then let ccByte, sigptr = sigptrGetByte bytes sigptr let generic, cc = byteAsCallConv ccByte @@ -2063,10 +2127,10 @@ and sigptrGetTy ctxt numtypars bytes sigptr = elif b0 = et_SENTINEL then failwith "varargs NYI" else ILType.Void , sigptr -and sigptrGetVarArgTys ctxt n numtypars bytes sigptr = +and sigptrGetVarArgTys (ctxt: ILMetadataReader) n numtypars bytes sigptr = sigptrFold (sigptrGetTy ctxt numtypars) n bytes sigptr -and sigptrGetArgTys ctxt n numtypars bytes sigptr acc = +and sigptrGetArgTys (ctxt: ILMetadataReader) n numtypars bytes sigptr acc = if n <= 0 then (List.rev acc, None), sigptr else let b0, sigptr2 = sigptrGetByte bytes sigptr @@ -2077,22 +2141,22 @@ and sigptrGetArgTys ctxt n numtypars bytes sigptr acc = let x, sigptr = sigptrGetTy ctxt numtypars bytes sigptr sigptrGetArgTys ctxt (n-1) numtypars bytes sigptr (x::acc) -and sigptrGetLocal ctxt numtypars bytes sigptr = +and sigptrGetLocal (ctxt: ILMetadataReader) numtypars bytes sigptr = let pinned, sigptr = let b0, sigptr' = sigptrGetByte bytes sigptr if b0 = et_PINNED then true, sigptr' else false, sigptr - let typ, sigptr = sigptrGetTy ctxt numtypars bytes sigptr - let loc : ILLocal = { IsPinned = pinned; Type = typ; DebugInfo = None } + let ty, sigptr = sigptrGetTy ctxt numtypars bytes sigptr + let loc : ILLocal = { IsPinned = pinned; Type = ty; DebugInfo = None } loc, sigptr -and readBlobHeapAsMethodSig ctxt numtypars blobIdx = +and readBlobHeapAsMethodSig (ctxt: ILMetadataReader) numtypars blobIdx = ctxt.readBlobHeapAsMethodSig (BlobAsMethodSigIdx (numtypars, blobIdx)) and readBlobHeapAsMethodSigUncached ctxtH (BlobAsMethodSigIdx (numtypars, blobIdx)) = - let ctxt = getHole ctxtH + let (ctxt: ILMetadataReader) = getHole ctxtH let bytes = readBlobHeap ctxt blobIdx let sigptr = 0 let ccByte, sigptr = sigptrGetByte bytes sigptr @@ -2100,7 +2164,7 @@ and readBlobHeapAsMethodSigUncached ctxtH (BlobAsMethodSigIdx (numtypars, blobId let genarity, sigptr = if generic then sigptrGetZInt32 bytes sigptr else 0x0, sigptr let numparams, sigptr = sigptrGetZInt32 bytes sigptr let retty, sigptr = sigptrGetTy ctxt numtypars bytes sigptr - let (argtys, varargs), _sigptr = sigptrGetArgTys ctxt ( numparams) numtypars bytes sigptr [] + let (argtys, varargs), _sigptr = sigptrGetArgTys ctxt numparams numtypars bytes sigptr [] generic, genarity, cc, retty, argtys, varargs and readBlobHeapAsType ctxt numtypars blobIdx = @@ -2121,8 +2185,9 @@ and readBlobHeapAsFieldSigUncached ctxtH (BlobAsFieldSigIdx (numtypars, blobIdx) retty -and readBlobHeapAsPropertySig ctxt numtypars blobIdx = +and readBlobHeapAsPropertySig (ctxt: ILMetadataReader) numtypars blobIdx = ctxt.readBlobHeapAsPropertySig (BlobAsPropSigIdx (numtypars, blobIdx)) + and readBlobHeapAsPropertySigUncached ctxtH (BlobAsPropSigIdx (numtypars, blobIdx)) = let ctxt = getHole ctxtH let bytes = readBlobHeap ctxt blobIdx @@ -2136,7 +2201,7 @@ and readBlobHeapAsPropertySigUncached ctxtH (BlobAsPropSigIdx (numtypars, blobId let argtys, _sigptr = sigptrFold (sigptrGetTy ctxt numtypars) ( numparams) bytes sigptr hasthis, retty, argtys -and readBlobHeapAsLocalsSig ctxt numtypars blobIdx = +and readBlobHeapAsLocalsSig (ctxt: ILMetadataReader) numtypars blobIdx = ctxt.readBlobHeapAsLocalsSig (BlobAsLocalSigIdx (numtypars, blobIdx)) and readBlobHeapAsLocalsSigUncached ctxtH (BlobAsLocalSigIdx (numtypars, blobIdx)) = @@ -2169,26 +2234,30 @@ and byteAsCallConv b = and seekReadMemberRefAsMethodData ctxt numtypars idx : VarArgMethodData = ctxt.seekReadMemberRefAsMethodData (MemberRefAsMspecIdx (numtypars, idx)) + and seekReadMemberRefAsMethodDataUncached ctxtH (MemberRefAsMspecIdx (numtypars, idx)) = - let ctxt = getHole ctxtH - let (mrpIdx, nameIdx, typeIdx) = seekReadMemberRefRow ctxt idx + let (ctxt: ILMetadataReader) = getHole ctxtH + let mdv = ctxt.mdfile.GetView() + let (mrpIdx, nameIdx, typeIdx) = seekReadMemberRefRow ctxt mdv idx let nm = readStringHeap ctxt nameIdx - let enclTyp = seekReadMethodRefParent ctxt numtypars mrpIdx - let _generic, genarity, cc, retty, argtys, varargs = readBlobHeapAsMethodSig ctxt enclTyp.GenericArgs.Length typeIdx + let enclTy = seekReadMethodRefParent ctxt mdv numtypars mrpIdx + let _generic, genarity, cc, retty, argtys, varargs = readBlobHeapAsMethodSig ctxt enclTy.GenericArgs.Length typeIdx let minst = List.init genarity (fun n -> mkILTyvarTy (uint16 (numtypars+n))) - (VarArgMethodData(enclTyp, cc, nm, argtys, varargs, retty, minst)) + (VarArgMethodData(enclTy, cc, nm, argtys, varargs, retty, minst)) and seekReadMemberRefAsMethDataNoVarArgs ctxt numtypars idx : MethodData = - let (VarArgMethodData(enclTyp, cc, nm, argtys, varargs, retty, minst)) = seekReadMemberRefAsMethodData ctxt numtypars idx + let (VarArgMethodData(enclTy, cc, nm, argtys, varargs, retty, minst)) = seekReadMemberRefAsMethodData ctxt numtypars idx if Option.isSome varargs then dprintf "ignoring sentinel and varargs in ILMethodDef token signature" - (MethodData(enclTyp, cc, nm, argtys, retty, minst)) + (MethodData(enclTy, cc, nm, argtys, retty, minst)) -and seekReadMethodSpecAsMethodData ctxt numtypars idx = +and seekReadMethodSpecAsMethodData (ctxt: ILMetadataReader) numtypars idx = ctxt.seekReadMethodSpecAsMethodData (MethodSpecAsMspecIdx (numtypars, idx)) + and seekReadMethodSpecAsMethodDataUncached ctxtH (MethodSpecAsMspecIdx (numtypars, idx)) = - let ctxt = getHole ctxtH - let (mdorIdx, instIdx) = seekReadMethodSpecRow ctxt idx - let (VarArgMethodData(enclTyp, cc, nm, argtys, varargs, retty, _)) = seekReadMethodDefOrRef ctxt numtypars mdorIdx + let (ctxt: ILMetadataReader) = getHole ctxtH + let mdv = ctxt.mdfile.GetView() + let (mdorIdx, instIdx) = seekReadMethodSpecRow ctxt mdv idx + let (VarArgMethodData(enclTy, cc, nm, argtys, varargs, retty, _)) = seekReadMethodDefOrRef ctxt numtypars mdorIdx let minst = let bytes = readBlobHeap ctxt instIdx let sigptr = 0 @@ -2197,17 +2266,19 @@ and seekReadMethodSpecAsMethodDataUncached ctxtH (MethodSpecAsMspecIdx (numtypar let numgpars, sigptr = sigptrGetZInt32 bytes sigptr let argtys, _sigptr = sigptrFold (sigptrGetTy ctxt numtypars) numgpars bytes sigptr argtys - VarArgMethodData(enclTyp, cc, nm, argtys, varargs, retty, minst) + VarArgMethodData(enclTy, cc, nm, argtys, varargs, retty, minst) -and seekReadMemberRefAsFieldSpec ctxt numtypars idx = +and seekReadMemberRefAsFieldSpec (ctxt: ILMetadataReader) numtypars idx = ctxt.seekReadMemberRefAsFieldSpec (MemberRefAsFspecIdx (numtypars, idx)) + and seekReadMemberRefAsFieldSpecUncached ctxtH (MemberRefAsFspecIdx (numtypars, idx)) = - let ctxt = getHole ctxtH - let (mrpIdx, nameIdx, typeIdx) = seekReadMemberRefRow ctxt idx + let (ctxt: ILMetadataReader) = getHole ctxtH + let mdv = ctxt.mdfile.GetView() + let (mrpIdx, nameIdx, typeIdx) = seekReadMemberRefRow ctxt mdv idx let nm = readStringHeap ctxt nameIdx - let enclTyp = seekReadMethodRefParent ctxt numtypars mrpIdx + let enclTy = seekReadMethodRefParent ctxt mdv numtypars mrpIdx let retty = readBlobHeapAsFieldSig ctxt numtypars typeIdx - mkILFieldSpecInTy(enclTyp, nm, retty) + mkILFieldSpecInTy(enclTy, nm, retty) // One extremely annoying aspect of the MD format is that given a // ILMethodDef token it is non-trivial to find which ILTypeDef it belongs @@ -2217,8 +2288,10 @@ and seekReadMemberRefAsFieldSpecUncached ctxtH (MemberRefAsFspecIdx (numtypars, // method-range and field-range start/finish indexes and seekReadMethodDefAsMethodData ctxt idx = ctxt.seekReadMethodDefAsMethodData idx + and seekReadMethodDefAsMethodDataUncached ctxtH idx = - let ctxt = getHole ctxtH + let (ctxt: ILMetadataReader) = getHole ctxtH + let mdv = ctxt.mdfile.GetView() // Look for the method def parent. let tidx = seekReadIndexedRow (ctxt.getNumRows TableNames.TypeDef, @@ -2238,26 +2311,28 @@ and seekReadMethodDefAsMethodDataUncached ctxtH idx = let finst = mkILFormalGenericArgs 0 typeGenericArgs let minst = mkILFormalGenericArgs typeGenericArgsCount methodGenericArgs + // Read the method def parent. - let enclTyp = seekReadTypeDefAsType ctxt AsObject (* not ok: see note *) finst tidx - // Return the constituent parts: put it together at the place where this is called. + let enclTy = seekReadTypeDefAsType ctxt AsObject (* not ok: see note *) finst tidx - let (_code_rva, _implflags, _flags, nameIdx, typeIdx, _paramIdx) = seekReadMethodRow ctxt idx + // Return the constituent parts: put it together at the place where this is called. + let (_code_rva, _implflags, _flags, nameIdx, typeIdx, _paramIdx) = seekReadMethodRow ctxt mdv idx let nm = readStringHeap ctxt nameIdx // Read the method def signature. let _generic, _genarity, cc, retty, argtys, varargs = readBlobHeapAsMethodSig ctxt typeGenericArgsCount typeIdx if varargs <> None then dprintf "ignoring sentinel and varargs in ILMethodDef token signature" - MethodData(enclTyp, cc, nm, argtys, retty, minst) + MethodData(enclTy, cc, nm, argtys, retty, minst) - (* Similarly for fields. *) -and seekReadFieldDefAsFieldSpec ctxt idx = +and seekReadFieldDefAsFieldSpec (ctxt: ILMetadataReader) idx = ctxt.seekReadFieldDefAsFieldSpec idx + and seekReadFieldDefAsFieldSpecUncached ctxtH idx = - let ctxt = getHole ctxtH - let (_flags, nameIdx, typeIdx) = seekReadFieldRow ctxt idx + let (ctxt: ILMetadataReader) = getHole ctxtH + let mdv = ctxt.mdfile.GetView() + let (_flags, nameIdx, typeIdx) = seekReadFieldRow ctxt mdv idx let nm = readStringHeap ctxt nameIdx (* Look for the field def parent. *) let tidx = @@ -2271,40 +2346,26 @@ and seekReadFieldDefAsFieldSpecUncached ctxtH idx = true, fst) // Read the field signature. let retty = readBlobHeapAsFieldSig ctxt 0 typeIdx + // Create a formal instantiation if needed let finst = mkILFormalGenericArgs 0 (seekReadGenericParams ctxt 0 (tomd_TypeDef, tidx)) + // Read the field def parent. - let enclTyp = seekReadTypeDefAsType ctxt AsObject (* not ok: see note *) finst tidx + let enclTy = seekReadTypeDefAsType ctxt AsObject (* not ok: see note *) finst tidx + // Put it together. - mkILFieldSpecInTy(enclTyp, nm, retty) + mkILFieldSpecInTy(enclTy, nm, retty) -and seekReadMethod ctxt numtypars (idx:int) = - let (codeRVA, implflags, flags, nameIdx, typeIdx, paramIdx) = seekReadMethodRow ctxt idx +and seekReadMethod (ctxt: ILMetadataReader) mdv numtypars (idx:int) = + let (codeRVA, implflags, flags, nameIdx, typeIdx, paramIdx) = seekReadMethodRow ctxt mdv idx let nm = readStringHeap ctxt nameIdx - let isStatic = (flags &&& 0x0010) <> 0x0 - let final = (flags &&& 0x0020) <> 0x0 - let virt = (flags &&& 0x0040) <> 0x0 - let strict = (flags &&& 0x0200) <> 0x0 - let hidebysig = (flags &&& 0x0080) <> 0x0 - let newslot = (flags &&& 0x0100) <> 0x0 let abstr = (flags &&& 0x0400) <> 0x0 - let specialname = (flags &&& 0x0800) <> 0x0 let pinvoke = (flags &&& 0x2000) <> 0x0 - let export = (flags &&& 0x0008) <> 0x0 - let _rtspecialname = (flags &&& 0x1000) <> 0x0 - let reqsecobj = (flags &&& 0x8000) <> 0x0 - let hassec = (flags &&& 0x4000) <> 0x0 let codetype = implflags &&& 0x0003 let unmanaged = (implflags &&& 0x0004) <> 0x0 - let forwardref = (implflags &&& 0x0010) <> 0x0 - let preservesig = (implflags &&& 0x0080) <> 0x0 let internalcall = (implflags &&& 0x1000) <> 0x0 - let synchronized = (implflags &&& 0x0020) <> 0x0 let noinline = (implflags &&& 0x0008) <> 0x0 let aggressiveinline = (implflags &&& 0x0100) <> 0x0 - let mustrun = (implflags &&& 0x0040) <> 0x0 - let cctor = (nm = ".cctor") - let ctor = (nm = ".ctor") let _generic, _genarity, cc, retty, argtys, varargs = readBlobHeapAsMethodSig ctxt numtypars typeIdx if varargs <> None then dprintf "ignoring sentinel and varargs in ILMethodDef signature" @@ -2312,87 +2373,59 @@ and seekReadMethod ctxt numtypars (idx:int) = if idx >= ctxt.getNumRows TableNames.Method then ctxt.getNumRows TableNames.Param + 1 else - let (_, _, _, _, _, paramIdx) = seekReadMethodRow ctxt (idx + 1) + let (_, _, _, _, _, paramIdx) = seekReadMethodRow ctxt mdv (idx + 1) paramIdx - let ret, ilParams = seekReadParams ctxt (retty, argtys) paramIdx endParamIdx - - { Name=nm - mdKind = - (if cctor then MethodKind.Cctor - elif ctor then MethodKind.Ctor - elif isStatic then MethodKind.Static - elif virt then - MethodKind.Virtual - { IsFinal=final - IsNewSlot=newslot - IsCheckAccessOnOverride=strict - IsAbstract=abstr } - else MethodKind.NonVirtual) - Access = memberAccessOfFlags flags - SecurityDecls=seekReadSecurityDecls ctxt (TaggedIndex(hds_MethodDef, idx)) - HasSecurity=hassec - IsEntryPoint= (fst ctxt.entryPointToken = TableNames.Method && snd ctxt.entryPointToken = idx) - IsReqSecObj=reqsecobj - IsHideBySig=hidebysig - IsSpecialName=specialname - IsUnmanagedExport=export - IsSynchronized=synchronized - IsNoInline=noinline - IsAggressiveInline=aggressiveinline - IsMustRun=mustrun - IsPreserveSig=preservesig - IsManaged = not unmanaged - IsInternalCall = internalcall - IsForwardRef = forwardref - mdCodeKind = (if (codetype = 0x00) then MethodCodeKind.IL elif (codetype = 0x01) then MethodCodeKind.Native elif (codetype = 0x03) then MethodCodeKind.Runtime else MethodCodeKind.Native) - GenericParams=seekReadGenericParams ctxt numtypars (tomd_MethodDef, idx) - CustomAttrs=seekReadCustomAttrs ctxt (TaggedIndex(hca_MethodDef, idx)) - Parameters= ilParams - CallingConv=cc - Return=ret - mdBody= + let ret, ilParams = seekReadParams ctxt mdv (retty, argtys) paramIdx endParamIdx + + let isEntryPoint = + let (tab, tok) = ctxt.entryPointToken + (tab = TableNames.Method && tok = idx) + + let body = if (codetype = 0x01) && pinvoke then - mkMethBodyLazyAux (notlazy MethodBody.Native) + methBodyNative elif pinvoke then - seekReadImplMap ctxt nm idx + seekReadImplMap ctxt nm idx elif internalcall || abstr || unmanaged || (codetype <> 0x00) then - //if codeRVA <> 0x0 then dprintn "non-IL or abstract method with non-zero RVA" - mkMethBodyLazyAux (notlazy MethodBody.Abstract) + methBodyAbstract else - seekReadMethodRVA ctxt (idx, nm, internalcall, noinline, aggressiveinline, numtypars) codeRVA - } + match ctxt.pectxtCaptured with + | None -> methBodyNotAvailable + | Some pectxt -> seekReadMethodRVA pectxt ctxt (idx, nm, internalcall, noinline, aggressiveinline, numtypars) codeRVA + + ILMethodDef(name=nm, + attributes = enum(flags), + implAttributes= enum(implflags), + securityDeclsStored=ctxt.securityDeclsReader_MethodDef, + isEntryPoint=isEntryPoint, + genericParams=seekReadGenericParams ctxt numtypars (tomd_MethodDef, idx), + parameters= ilParams, + callingConv=cc, + ret=ret, + body=body, + customAttrsStored=ctxt.customAttrsReader_MethodDef, + metadataIndex=idx) -and seekReadParams ctxt (retty, argtys) pidx1 pidx2 = - let retRes : ILReturn ref = ref { Marshal=None; Type=retty; CustomAttrs=emptyILCustomAttrs } - let paramsRes : ILParameter [] = - argtys - |> List.toArray - |> Array.map (fun ty -> - { Name=None - Default=None - Marshal=None - IsIn=false - IsOut=false - IsOptional=false - Type=ty - CustomAttrs=emptyILCustomAttrs }) +and seekReadParams (ctxt: ILMetadataReader) mdv (retty, argtys) pidx1 pidx2 = + let retRes = ref (mkILReturn retty) + let paramsRes = argtys |> List.toArray |> Array.map mkILParamAnon for i = pidx1 to pidx2 - 1 do - seekReadParamExtras ctxt (retRes, paramsRes) i + seekReadParamExtras ctxt mdv (retRes, paramsRes) i !retRes, List.ofArray paramsRes -and seekReadParamExtras ctxt (retRes, paramsRes) (idx:int) = - let (flags, seq, nameIdx) = seekReadParamRow ctxt idx +and seekReadParamExtras (ctxt: ILMetadataReader) mdv (retRes, paramsRes) (idx:int) = + let (flags, seq, nameIdx) = seekReadParamRow ctxt mdv idx let inOutMasked = (flags &&& 0x00FF) let hasMarshal = (flags &&& 0x2000) <> 0x0 let hasDefault = (flags &&& 0x1000) <> 0x0 - let fmReader idx = seekReadIndexedRow (ctxt.getNumRows TableNames.FieldMarshal, seekReadFieldMarshalRow ctxt, fst, hfmCompare idx, isSorted ctxt TableNames.FieldMarshal, (snd >> readBlobHeapAsNativeType ctxt)) - let cas = seekReadCustomAttrs ctxt (TaggedIndex(hca_ParamDef, idx)) + let fmReader idx = seekReadIndexedRow (ctxt.getNumRows TableNames.FieldMarshal, seekReadFieldMarshalRow ctxt mdv, fst, hfmCompare idx, isSorted ctxt TableNames.FieldMarshal, (snd >> readBlobHeapAsNativeType ctxt)) if seq = 0 then retRes := { !retRes with Marshal=(if hasMarshal then Some (fmReader (TaggedIndex(hfm_ParamDef, idx))) else None) - CustomAttrs = cas } + CustomAttrsStored = ctxt.customAttrsReader_ParamDef + MetadataIndex = idx} elif seq > Array.length paramsRes then dprintn "bad seq num. for param" else paramsRes.[seq - 1] <- @@ -2403,22 +2436,24 @@ and seekReadParamExtras ctxt (retRes, paramsRes) (idx:int) = IsIn = ((inOutMasked &&& 0x0001) <> 0x0) IsOut = ((inOutMasked &&& 0x0002) <> 0x0) IsOptional = ((inOutMasked &&& 0x0010) <> 0x0) - CustomAttrs =cas } + CustomAttrsStored = ctxt.customAttrsReader_ParamDef + MetadataIndex = idx } -and seekReadMethodImpls ctxt numtypars tidx = +and seekReadMethodImpls (ctxt: ILMetadataReader) numtypars tidx = mkILMethodImplsLazy (lazy - let mimpls = seekReadIndexedRows (ctxt.getNumRows TableNames.MethodImpl, seekReadMethodImplRow ctxt, (fun (a, _, _) -> a), simpleIndexCompare tidx, isSorted ctxt TableNames.MethodImpl, (fun (_, b, c) -> b, c)) + let mdv = ctxt.mdfile.GetView() + let mimpls = seekReadIndexedRows (ctxt.getNumRows TableNames.MethodImpl, seekReadMethodImplRow ctxt mdv, (fun (a, _, _) -> a), simpleIndexCompare tidx, isSorted ctxt TableNames.MethodImpl, (fun (_, b, c) -> b, c)) mimpls |> List.map (fun (b, c) -> { OverrideBy= - let (MethodData(enclTyp, cc, nm, argtys, retty, minst)) = seekReadMethodDefOrRefNoVarargs ctxt numtypars b - mkILMethSpecInTy (enclTyp, cc, nm, argtys, retty, minst) + let (MethodData(enclTy, cc, nm, argtys, retty, minst)) = seekReadMethodDefOrRefNoVarargs ctxt numtypars b + mkILMethSpecInTy (enclTy, cc, nm, argtys, retty, minst) Overrides= - let (MethodData(enclTyp, cc, nm, argtys, retty, minst)) = seekReadMethodDefOrRefNoVarargs ctxt numtypars c - let mspec = mkILMethSpecInTy (enclTyp, cc, nm, argtys, retty, minst) - OverridesSpec(mspec.MethodRef, mspec.EnclosingType) })) + let (MethodData(enclTy, cc, nm, argtys, retty, minst)) = seekReadMethodDefOrRefNoVarargs ctxt numtypars c + let mspec = mkILMethSpecInTy (enclTy, cc, nm, argtys, retty, minst) + OverridesSpec(mspec.MethodRef, mspec.DeclaringType) })) -and seekReadMultipleMethodSemantics ctxt (flags, id) = +and seekReadMultipleMethodSemantics (ctxt: ILMetadataReader) (flags, id) = seekReadIndexedRows (ctxt.getNumRows TableNames.MethodSemantics , seekReadMethodSemanticsRow ctxt, @@ -2426,8 +2461,8 @@ and seekReadMultipleMethodSemantics ctxt (flags, id) = hsCompare id, isSorted ctxt TableNames.MethodSemantics, (fun (a, b, _c) -> - let (MethodData(enclTyp, cc, nm, argtys, retty, minst)) = seekReadMethodDefAsMethodData ctxt b - a, (mkILMethSpecInTy (enclTyp, cc, nm, argtys, retty, minst)).MethodRef)) + let (MethodData(enclTy, cc, nm, argtys, retty, minst)) = seekReadMethodDefAsMethodData ctxt b + a, (mkILMethSpecInTy (enclTy, cc, nm, argtys, retty, minst)).MethodRef)) |> List.filter (fun (flags2, _) -> flags = flags2) |> List.map snd @@ -2443,37 +2478,38 @@ and seekReadMethodSemantics ctxt id = | None -> failwith "seekReadMethodSemantics ctxt: no method found" | Some x -> x -and seekReadEvent ctxt numtypars idx = - let (flags, nameIdx, typIdx) = seekReadEventRow ctxt idx - { Name = readStringHeap ctxt nameIdx - Type = seekReadOptionalTypeDefOrRef ctxt numtypars AsObject typIdx - IsSpecialName = (flags &&& 0x0200) <> 0x0 - IsRTSpecialName = (flags &&& 0x0400) <> 0x0 - AddMethod= seekReadMethodSemantics ctxt (0x0008, TaggedIndex(hs_Event, idx)) - RemoveMethod=seekReadMethodSemantics ctxt (0x0010, TaggedIndex(hs_Event, idx)) - FireMethod=seekReadoptional_MethodSemantics ctxt (0x0020, TaggedIndex(hs_Event, idx)) - OtherMethods = seekReadMultipleMethodSemantics ctxt (0x0004, TaggedIndex(hs_Event, idx)) - CustomAttrs=seekReadCustomAttrs ctxt (TaggedIndex(hca_Event, idx)) } +and seekReadEvent ctxt mdv numtypars idx = + let (flags, nameIdx, typIdx) = seekReadEventRow ctxt mdv idx + ILEventDef(eventType = seekReadOptionalTypeDefOrRef ctxt numtypars AsObject typIdx, + name = readStringHeap ctxt nameIdx, + attributes = enum(flags), + addMethod= seekReadMethodSemantics ctxt (0x0008, TaggedIndex(hs_Event, idx)), + removeMethod=seekReadMethodSemantics ctxt (0x0010, TaggedIndex(hs_Event, idx)), + fireMethod=seekReadoptional_MethodSemantics ctxt (0x0020, TaggedIndex(hs_Event, idx)), + otherMethods = seekReadMultipleMethodSemantics ctxt (0x0004, TaggedIndex(hs_Event, idx)), + customAttrsStored=ctxt.customAttrsReader_Event, + metadataIndex = idx ) - (* REVIEW: can substantially reduce numbers of EventMap and PropertyMap reads by first checking if the whole table is sorted according to ILTypeDef tokens and then doing a binary chop *) -and seekReadEvents ctxt numtypars tidx = + (* REVIEW: can substantially reduce numbers of EventMap and PropertyMap reads by first checking if the whole table mdv sorted according to ILTypeDef tokens and then doing a binary chop *) +and seekReadEvents (ctxt: ILMetadataReader) numtypars tidx = mkILEventsLazy (lazy - match seekReadOptionalIndexedRow (ctxt.getNumRows TableNames.EventMap, (fun i -> i, seekReadEventMapRow ctxt i), (fun (_, row) -> fst row), compare tidx, false, (fun (i, row) -> (i, snd row))) with + let mdv = ctxt.mdfile.GetView() + match seekReadOptionalIndexedRow (ctxt.getNumRows TableNames.EventMap, (fun i -> i, seekReadEventMapRow ctxt mdv i), (fun (_, row) -> fst row), compare tidx, false, (fun (i, row) -> (i, snd row))) with | None -> [] | Some (rowNum, beginEventIdx) -> let endEventIdx = if rowNum >= ctxt.getNumRows TableNames.EventMap then ctxt.getNumRows TableNames.Event + 1 else - let (_, endEventIdx) = seekReadEventMapRow ctxt (rowNum + 1) + let (_, endEventIdx) = seekReadEventMapRow ctxt mdv (rowNum + 1) endEventIdx [ for i in beginEventIdx .. endEventIdx - 1 do - yield seekReadEvent ctxt numtypars i ]) + yield seekReadEvent ctxt mdv numtypars i ]) -and seekReadProperty ctxt numtypars idx = - let (flags, nameIdx, typIdx) = seekReadPropertyRow ctxt idx +and seekReadProperty ctxt mdv numtypars idx = + let (flags, nameIdx, typIdx) = seekReadPropertyRow ctxt mdv idx let cc, retty, argtys = readBlobHeapAsPropertySig ctxt numtypars typIdx let setter= seekReadoptional_MethodSemantics ctxt (0x0001, TaggedIndex(hs_Property, idx)) let getter = seekReadoptional_MethodSemantics ctxt (0x0002, TaggedIndex(hs_Property, idx)) @@ -2486,39 +2522,42 @@ and seekReadProperty ctxt numtypars idx = match setter with | Some mref -> mref.CallingConv .ThisConv | None -> cc - { Name=readStringHeap ctxt nameIdx - CallingConv = cc2 - IsRTSpecialName=(flags &&& 0x0400) <> 0x0 - IsSpecialName= (flags &&& 0x0200) <> 0x0 - SetMethod=setter - GetMethod=getter - Type=retty - Init= if (flags &&& 0x1000) = 0 then None else Some (seekReadConstant ctxt (TaggedIndex(hc_Property, idx))) - Args=argtys - CustomAttrs=seekReadCustomAttrs ctxt (TaggedIndex(hca_Property, idx)) } + + ILPropertyDef(name=readStringHeap ctxt nameIdx, + callingConv = cc2, + attributes = enum(flags), + setMethod=setter, + getMethod=getter, + propertyType=retty, + init= (if (flags &&& 0x1000) = 0 then None else Some (seekReadConstant ctxt (TaggedIndex(hc_Property, idx)))), + args=argtys, + customAttrsStored=ctxt.customAttrsReader_Property, + metadataIndex = idx ) -and seekReadProperties ctxt numtypars tidx = +and seekReadProperties (ctxt: ILMetadataReader) numtypars tidx = mkILPropertiesLazy (lazy - match seekReadOptionalIndexedRow (ctxt.getNumRows TableNames.PropertyMap, (fun i -> i, seekReadPropertyMapRow ctxt i), (fun (_, row) -> fst row), compare tidx, false, (fun (i, row) -> (i, snd row))) with + let mdv = ctxt.mdfile.GetView() + match seekReadOptionalIndexedRow (ctxt.getNumRows TableNames.PropertyMap, (fun i -> i, seekReadPropertyMapRow ctxt mdv i), (fun (_, row) -> fst row), compare tidx, false, (fun (i, row) -> (i, snd row))) with | None -> [] | Some (rowNum, beginPropIdx) -> let endPropIdx = if rowNum >= ctxt.getNumRows TableNames.PropertyMap then ctxt.getNumRows TableNames.Property + 1 else - let (_, endPropIdx) = seekReadPropertyMapRow ctxt (rowNum + 1) + let (_, endPropIdx) = seekReadPropertyMapRow ctxt mdv (rowNum + 1) endPropIdx [ for i in beginPropIdx .. endPropIdx - 1 do - yield seekReadProperty ctxt numtypars i ]) + yield seekReadProperty ctxt mdv numtypars i ]) -and seekReadCustomAttrs ctxt idx = - mkILComputedCustomAttrs - (fun () -> +and customAttrsReader ctxtH tag : ILAttributesStored = + mkILCustomAttrsReader + (fun idx -> + let (ctxt: ILMetadataReader) = getHole ctxtH seekReadIndexedRows (ctxt.getNumRows TableNames.CustomAttribute, seekReadCustomAttributeRow ctxt, (fun (a, _, _) -> a), - hcaCompare idx, + hcaCompare (TaggedIndex(tag,idx)), isSorted ctxt TableNames.CustomAttribute, (fun (_, b, c) -> seekReadCustomAttr ctxt (b, c))) |> List.toArray) @@ -2535,26 +2574,24 @@ and seekReadCustomAttrUncached ctxtH (CustomAttrIdx (cat, idx, valIdx)) = | None -> Bytes.ofInt32Array [| |] Elements = [] } -and seekReadSecurityDecls ctxt idx = - mkILLazySecurityDecls - (lazy +and securityDeclsReader ctxtH tag = + mkILSecurityDeclsReader + (fun idx -> + let (ctxt: ILMetadataReader) = getHole ctxtH + let mdv = ctxt.mdfile.GetView() seekReadIndexedRows (ctxt.getNumRows TableNames.Permission, - seekReadPermissionRow ctxt, + seekReadPermissionRow ctxt mdv, (fun (_, par, _) -> par), - hdsCompare idx, + hdsCompare (TaggedIndex(tag,idx)), isSorted ctxt TableNames.Permission, - (fun (act, _, ty) -> seekReadSecurityDecl ctxt (act, ty)))) - -and seekReadSecurityDecl ctxt (a, b) = - ctxt.seekReadSecurityDecl (SecurityDeclIdx (a, b)) - -and seekReadSecurityDeclUncached ctxtH (SecurityDeclIdx (act, ty)) = - let ctxt = getHole ctxtH - PermissionSet ((if List.memAssoc (int act) (Lazy.force ILSecurityActionRevMap) then List.assoc (int act) (Lazy.force ILSecurityActionRevMap) else failwith "unknown security action"), - readBlobHeap ctxt ty) + (fun (act, _, ty) -> seekReadSecurityDecl ctxt (act, ty))) + |> List.toArray) +and seekReadSecurityDecl ctxt (act, ty) = + ILSecurityDecl ((if List.memAssoc (int act) (Lazy.force ILSecurityActionRevMap) then List.assoc (int act) (Lazy.force ILSecurityActionRevMap) else failwith "unknown security action"), + readBlobHeap ctxt ty) -and seekReadConstant ctxt idx = +and seekReadConstant (ctxt: ILMetadataReader) idx = let kind, vidx = seekReadIndexedRow (ctxt.getNumRows TableNames.Constant, seekReadConstantRow ctxt, (fun (_, key, _) -> key), @@ -2579,11 +2616,12 @@ and seekReadConstant ctxt idx = | x when x = uint16 et_CLASS || x = uint16 et_OBJECT -> ILFieldInit.Null | _ -> ILFieldInit.Null -and seekReadImplMap ctxt nm midx = +and seekReadImplMap (ctxt: ILMetadataReader) nm midx = mkMethBodyLazyAux (lazy + let mdv = ctxt.mdfile.GetView() let (flags, nameIdx, scopeIdx) = seekReadIndexedRow (ctxt.getNumRows TableNames.ImplMap, - seekReadImplMapRow ctxt, + seekReadImplMapRow ctxt mdv, (fun (_, m, _, _) -> m), mfCompare (TaggedIndex(mf_MethodDef, midx)), isSorted ctxt TableNames.ImplMap, @@ -2597,6 +2635,7 @@ and seekReadImplMap ctxt nm midx = elif masked = 0x0500 then PInvokeCallingConvention.Fastcall elif masked = 0x0100 then PInvokeCallingConvention.WinApi else (dprintn "strange CallingConv"; PInvokeCallingConvention.None) + let enc = let masked = flags &&& 0x0006 if masked = 0x0000 then PInvokeCharEncoding.None @@ -2604,12 +2643,14 @@ and seekReadImplMap ctxt nm midx = elif masked = 0x0004 then PInvokeCharEncoding.Unicode elif masked = 0x0006 then PInvokeCharEncoding.Auto else (dprintn "strange CharEncoding"; PInvokeCharEncoding.None) + let bestfit = let masked = flags &&& 0x0030 if masked = 0x0000 then PInvokeCharBestFit.UseAssembly elif masked = 0x0010 then PInvokeCharBestFit.Enabled elif masked = 0x0020 then PInvokeCharBestFit.Disabled else (dprintn "strange CharBestFit"; PInvokeCharBestFit.UseAssembly) + let unmap = let masked = flags &&& 0x3000 if masked = 0x0000 then PInvokeThrowOnUnmappableChar.UseAssembly @@ -2627,16 +2668,15 @@ and seekReadImplMap ctxt nm midx = (match readStringHeapOption ctxt nameIdx with | None -> nm | Some nm2 -> nm2) - Where = seekReadModuleRef ctxt scopeIdx }) + Where = seekReadModuleRef ctxt mdv scopeIdx }) -and seekReadTopCode ctxt numtypars (sz:int) start seqpoints = +and seekReadTopCode (ctxt: ILMetadataReader) pev mdv numtypars (sz:int) start seqpoints = let labelsOfRawOffsets = new Dictionary<_, _>(sz/2) let ilOffsetsOfLabels = new Dictionary<_, _>(sz/2) - let tryRawToLabel rawOffset = - if labelsOfRawOffsets.ContainsKey rawOffset then - Some(labelsOfRawOffsets.[rawOffset]) - else - None + let tryRawToLabel rawOffset = + match labelsOfRawOffsets.TryGetValue(rawOffset) with + | true, v -> Some v + | _ -> None let rawToLabel rawOffset = match tryRawToLabel rawOffset with @@ -2657,11 +2697,11 @@ and seekReadTopCode ctxt numtypars (sz:int) start seqpoints = let lastb2 = ref 0x0 let b = ref 0x0 let get () = - lastb := seekReadByteAsInt32 ctxt.is (start + (!curr)) + lastb := seekReadByteAsInt32 pev (start + (!curr)) incr curr b := if !lastb = 0xfe && !curr < sz then - lastb2 := seekReadByteAsInt32 ctxt.is (start + (!curr)) + lastb2 := seekReadByteAsInt32 pev (start + (!curr)) incr curr !lastb2 else @@ -2701,7 +2741,7 @@ and seekReadTopCode ctxt numtypars (sz:int) start seqpoints = !b = (i_tail &&& 0xff)) do begin if !b = (i_unaligned &&& 0xff) then - let unal = seekReadByteAsInt32 ctxt.is (start + (!curr)) + let unal = seekReadByteAsInt32 pev (start + (!curr)) incr curr prefixes.al <- if unal = 0x1 then Unaligned1 @@ -2711,10 +2751,10 @@ and seekReadTopCode ctxt numtypars (sz:int) start seqpoints = elif !b = (i_volatile &&& 0xff) then prefixes.vol <- Volatile elif !b = (i_readonly &&& 0xff) then prefixes.ro <- ReadonlyAddress elif !b = (i_constrained &&& 0xff) then - let uncoded = seekReadUncodedToken ctxt.is (start + (!curr)) + let uncoded = seekReadUncodedToken pev (start + (!curr)) curr := !curr + 4 - let typ = seekReadTypeDefOrRef ctxt numtypars AsObject [] (uncodedTokenToTypeDefOrRefOrSpec uncoded) - prefixes.constrained <- Some typ + let ty = seekReadTypeDefOrRef ctxt numtypars AsObject [] (uncodedTokenToTypeDefOrRefOrSpec uncoded) + prefixes.constrained <- Some ty else prefixes.tl <- Tailcall end get () @@ -2729,37 +2769,37 @@ and seekReadTopCode ctxt numtypars (sz:int) start seqpoints = let instr = match idecoder with | I_u16_u8_instr f -> - let x = seekReadByte ctxt.is (start + (!curr)) |> uint16 + let x = seekReadByte pev (start + (!curr)) |> uint16 curr := !curr + 1 f prefixes x | I_u16_u16_instr f -> - let x = seekReadUInt16 ctxt.is (start + (!curr)) + let x = seekReadUInt16 pev (start + (!curr)) curr := !curr + 2 f prefixes x | I_none_instr f -> f prefixes | I_i64_instr f -> - let x = seekReadInt64 ctxt.is (start + (!curr)) + let x = seekReadInt64 pev (start + (!curr)) curr := !curr + 8 f prefixes x | I_i32_i8_instr f -> - let x = seekReadSByte ctxt.is (start + (!curr)) |> int32 + let x = seekReadSByte pev (start + (!curr)) |> int32 curr := !curr + 1 f prefixes x | I_i32_i32_instr f -> - let x = seekReadInt32 ctxt.is (start + (!curr)) + let x = seekReadInt32 pev (start + (!curr)) curr := !curr + 4 f prefixes x | I_r4_instr f -> - let x = seekReadSingle ctxt.is (start + (!curr)) + let x = seekReadSingle pev (start + (!curr)) curr := !curr + 4 f prefixes x | I_r8_instr f -> - let x = seekReadDouble ctxt.is (start + (!curr)) + let x = seekReadDouble pev (start + (!curr)) curr := !curr + 8 f prefixes x | I_field_instr f -> - let (tab, tok) = seekReadUncodedToken ctxt.is (start + (!curr)) + let (tab, tok) = seekReadUncodedToken pev (start + (!curr)) curr := !curr + 4 let fspec = if tab = TableNames.Field then @@ -2771,9 +2811,9 @@ and seekReadTopCode ctxt numtypars (sz:int) start seqpoints = | I_method_instr f -> // method instruction, curr = "+string !curr - let (tab, idx) = seekReadUncodedToken ctxt.is (start + (!curr)) + let (tab, idx) = seekReadUncodedToken pev (start + (!curr)) curr := !curr + 4 - let (VarArgMethodData(enclTyp, cc, nm, argtys, varargs, retty, minst)) = + let (VarArgMethodData(enclTy, cc, nm, argtys, varargs, retty, minst)) = if tab = TableNames.Method then seekReadMethodDefOrRef ctxt numtypars (TaggedIndex(mdor_MethodDef, idx)) elif tab = TableNames.MemberRef then @@ -2781,7 +2821,7 @@ and seekReadTopCode ctxt numtypars (sz:int) start seqpoints = elif tab = TableNames.MethodSpec then seekReadMethodSpecAsMethodData ctxt numtypars idx else failwith "bad table in MethodDefOrRefOrSpec" - match enclTyp with + match enclTy with | ILType.Array (shape, ty) -> match nm with | "Get" -> I_ldelem_any(shape, ty) @@ -2790,36 +2830,36 @@ and seekReadTopCode ctxt numtypars (sz:int) start seqpoints = | ".ctor" -> I_newarr(shape, ty) | _ -> failwith "bad method on array type" | _ -> - let mspec = mkILMethSpecInTy (enclTyp, cc, nm, argtys, retty, minst) + let mspec = mkILMethSpecInTy (enclTy, cc, nm, argtys, retty, minst) f prefixes (mspec, varargs) | I_type_instr f -> - let uncoded = seekReadUncodedToken ctxt.is (start + (!curr)) + let uncoded = seekReadUncodedToken pev (start + (!curr)) curr := !curr + 4 - let typ = seekReadTypeDefOrRef ctxt numtypars AsObject [] (uncodedTokenToTypeDefOrRefOrSpec uncoded) - f prefixes typ + let ty = seekReadTypeDefOrRef ctxt numtypars AsObject [] (uncodedTokenToTypeDefOrRefOrSpec uncoded) + f prefixes ty | I_string_instr f -> - let (tab, idx) = seekReadUncodedToken ctxt.is (start + (!curr)) + let (tab, idx) = seekReadUncodedToken pev (start + (!curr)) curr := !curr + 4 if tab <> TableNames.UserStrings then dprintn "warning: bad table in user string for ldstr" f prefixes (readUserStringHeap ctxt (idx)) | I_conditional_i32_instr f -> - let offsDest = (seekReadInt32 ctxt.is (start + (!curr))) + let offsDest = (seekReadInt32 pev (start + (!curr))) curr := !curr + 4 let dest = !curr + offsDest f prefixes (rawToLabel dest) | I_conditional_i8_instr f -> - let offsDest = int (seekReadSByte ctxt.is (start + (!curr))) + let offsDest = int (seekReadSByte pev (start + (!curr))) curr := !curr + 1 let dest = !curr + offsDest f prefixes (rawToLabel dest) | I_unconditional_i32_instr f -> - let offsDest = (seekReadInt32 ctxt.is (start + (!curr))) + let offsDest = (seekReadInt32 pev (start + (!curr))) curr := !curr + 4 let dest = !curr + offsDest f prefixes (rawToLabel dest) | I_unconditional_i8_instr f -> - let offsDest = int (seekReadSByte ctxt.is (start + (!curr))) + let offsDest = int (seekReadSByte pev (start + (!curr))) curr := !curr + 1 let dest = !curr + offsDest f prefixes (rawToLabel dest) @@ -2827,13 +2867,13 @@ and seekReadTopCode ctxt numtypars (sz:int) start seqpoints = dprintn ("invalid instruction: "+string !lastb+ (if !lastb = 0xfe then ", "+string !lastb2 else "")) I_ret | I_tok_instr f -> - let (tab, idx) = seekReadUncodedToken ctxt.is (start + (!curr)) + let (tab, idx) = seekReadUncodedToken pev (start + (!curr)) curr := !curr + 4 (* REVIEW: this incorrectly labels all MemberRef tokens as ILMethod's: we should go look at the MemberRef sig to determine if it is a field or method *) let token_info = if tab = TableNames.Method || tab = TableNames.MemberRef (* REVIEW:generics or tab = TableNames.MethodSpec *) then - let (MethodData(enclTyp, cc, nm, argtys, retty, minst)) = seekReadMethodDefOrRefNoVarargs ctxt numtypars (uncodedTokenToMethodDefOrRef (tab, idx)) - ILToken.ILMethod (mkILMethSpecInTy (enclTyp, cc, nm, argtys, retty, minst)) + let (MethodData(enclTy, cc, nm, argtys, retty, minst)) = seekReadMethodDefOrRefNoVarargs ctxt numtypars (uncodedTokenToMethodDefOrRef (tab, idx)) + ILToken.ILMethod (mkILMethSpecInTy (enclTy, cc, nm, argtys, retty, minst)) elif tab = TableNames.Field then ILToken.ILField (seekReadFieldDefAsFieldSpec ctxt idx) elif tab = TableNames.TypeDef || tab = TableNames.TypeRef || tab = TableNames.TypeSpec then @@ -2841,18 +2881,18 @@ and seekReadTopCode ctxt numtypars (sz:int) start seqpoints = else failwith "bad token for ldtoken" f prefixes token_info | I_sig_instr f -> - let (tab, idx) = seekReadUncodedToken ctxt.is (start + (!curr)) + let (tab, idx) = seekReadUncodedToken pev (start + (!curr)) curr := !curr + 4 if tab <> TableNames.StandAloneSig then dprintn "strange table for callsig token" - let generic, _genarity, cc, retty, argtys, varargs = readBlobHeapAsMethodSig ctxt numtypars (seekReadStandAloneSigRow ctxt idx) - if generic then failwith "bad image: a generic method signature ctxt.is begin used at a calli instruction" + let generic, _genarity, cc, retty, argtys, varargs = readBlobHeapAsMethodSig ctxt numtypars (seekReadStandAloneSigRow ctxt mdv idx) + if generic then failwith "bad image: a generic method signature is begin used at a calli instruction" f prefixes (mkILCallSig (cc, argtys, retty), varargs) | I_switch_instr f -> - let n = (seekReadInt32 ctxt.is (start + (!curr))) + let n = (seekReadInt32 pev (start + (!curr))) curr := !curr + 4 let offsets = List.init n (fun _ -> - let i = (seekReadInt32 ctxt.is (start + (!curr))) + let i = (seekReadInt32 pev (start + (!curr))) curr := !curr + 4 i) let dests = List.map (fun offs -> rawToLabel (!curr + offs)) offsets @@ -2880,13 +2920,14 @@ and seekReadTopCode ctxt numtypars (sz:int) start seqpoints = instrs, rawToLabel, lab2pc, raw2nextLab #if FX_NO_PDB_READER -and seekReadMethodRVA ctxt (_idx, nm, _internalcall, noinline, aggressiveinline, numtypars) rva = +and seekReadMethodRVA (pectxt: PEReader) (ctxt: ILMetadataReader) (_idx, nm, _internalcall, noinline, aggressiveinline, numtypars) rva = #else -and seekReadMethodRVA ctxt (idx, nm, _internalcall, noinline, aggressiveinline, numtypars) rva = +and seekReadMethodRVA (pectxt: PEReader) (ctxt: ILMetadataReader) (idx, nm, _internalcall, noinline, aggressiveinline, numtypars) rva = #endif mkMethBodyLazyAux (lazy - begin + let pev = pectxt.pefile.GetView() + let mdv = ctxt.mdfile.GetView() // Read any debug information for this method into temporary data structures // -- a list of locals, marked with the raw offsets (actually closures which accept the resolution function that maps raw offsets to labels) @@ -2896,7 +2937,7 @@ and seekReadMethodRVA ctxt (idx, nm, _internalcall, noinline, aggressiveinline, #if FX_NO_PDB_READER [], None, [] #else - match ctxt.pdb with + match pectxt.pdb with | None -> [], None, [] | Some (pdbr, get_doc) -> @@ -2952,14 +2993,14 @@ and seekReadMethodRVA ctxt (idx, nm, _internalcall, noinline, aggressiveinline, [], None, [] #endif - let baseRVA = ctxt.anyV2P("method rva", rva) + let baseRVA = pectxt.anyV2P("method rva", rva) // ": reading body of method "+nm+" at rva "+string rva+", phys "+string baseRVA - let b = seekReadByte ctxt.is baseRVA + let b = seekReadByte pev baseRVA if (b &&& e_CorILMethod_FormatMask) = e_CorILMethod_TinyFormat then let codeBase = baseRVA + 1 let codeSize = (int32 b >>>& 2) // tiny format for "+nm+", code size = " + string codeSize) - let instrs, _, lab2pc, raw2nextLab = seekReadTopCode ctxt numtypars codeSize codeBase seqpoints + let instrs, _, lab2pc, raw2nextLab = seekReadTopCode ctxt pev mdv numtypars codeSize codeBase seqpoints (* Convert the linear code format to the nested code format *) let localPdbInfos2 = List.map (fun f -> f raw2nextLab) localPdbInfos let code = buildILCode nm lab2pc instrs [] localPdbInfos2 @@ -2975,20 +3016,20 @@ and seekReadMethodRVA ctxt (idx, nm, _internalcall, noinline, aggressiveinline, elif (b &&& e_CorILMethod_FormatMask) = e_CorILMethod_FatFormat then let hasMoreSections = (b &&& e_CorILMethod_MoreSects) <> 0x0uy let initlocals = (b &&& e_CorILMethod_InitLocals) <> 0x0uy - let maxstack = seekReadUInt16AsInt32 ctxt.is (baseRVA + 2) - let codeSize = seekReadInt32 ctxt.is (baseRVA + 4) - let localsTab, localToken = seekReadUncodedToken ctxt.is (baseRVA + 8) + let maxstack = seekReadUInt16AsInt32 pev (baseRVA + 2) + let codeSize = seekReadInt32 pev (baseRVA + 4) + let localsTab, localToken = seekReadUncodedToken pev (baseRVA + 8) let codeBase = baseRVA + 12 let locals = if localToken = 0x0 then [] else if localsTab <> TableNames.StandAloneSig then dprintn "strange table for locals token" - readBlobHeapAsLocalsSig ctxt numtypars (seekReadStandAloneSigRow ctxt localToken) + readBlobHeapAsLocalsSig ctxt numtypars (seekReadStandAloneSigRow ctxt pev localToken) // fat format for "+nm+", code size = " + string codeSize+", hasMoreSections = "+(if hasMoreSections then "true" else "false")+", b = "+string b) // Read the method body - let instrs, rawToLabel, lab2pc, raw2nextLab = seekReadTopCode ctxt numtypars ( codeSize) codeBase seqpoints + let instrs, rawToLabel, lab2pc, raw2nextLab = seekReadTopCode ctxt pev mdv numtypars ( codeSize) codeBase seqpoints // Read all the sections that follow the method body. // These contain the exception clauses. @@ -2997,11 +3038,11 @@ and seekReadMethodRVA ctxt (idx, nm, _internalcall, noinline, aggressiveinline, let seh = ref [] while !moreSections do let sectionBase = !nextSectionBase - let sectionFlag = seekReadByte ctxt.is sectionBase + let sectionFlag = seekReadByte pev sectionBase // fat format for "+nm+", sectionFlag = " + string sectionFlag) let sectionSize, clauses = if (sectionFlag &&& e_CorILMethod_Sect_FatFormat) <> 0x0uy then - let bigSize = (seekReadInt32 ctxt.is sectionBase) >>>& 8 + let bigSize = (seekReadInt32 pev sectionBase) >>>& 8 // bigSize = "+string bigSize) let clauses = if (sectionFlag &&& e_CorILMethod_Sect_EHTable) <> 0x0uy then @@ -3012,17 +3053,17 @@ and seekReadMethodRVA ctxt (idx, nm, _internalcall, noinline, aggressiveinline, List.init numClauses (fun i -> let clauseBase = sectionBase + 4 + (i * 24) - let kind = seekReadInt32 ctxt.is (clauseBase + 0) - let st1 = seekReadInt32 ctxt.is (clauseBase + 4) - let sz1 = seekReadInt32 ctxt.is (clauseBase + 8) - let st2 = seekReadInt32 ctxt.is (clauseBase + 12) - let sz2 = seekReadInt32 ctxt.is (clauseBase + 16) - let extra = seekReadInt32 ctxt.is (clauseBase + 20) + let kind = seekReadInt32 pev (clauseBase + 0) + let st1 = seekReadInt32 pev (clauseBase + 4) + let sz1 = seekReadInt32 pev (clauseBase + 8) + let st2 = seekReadInt32 pev (clauseBase + 12) + let sz2 = seekReadInt32 pev (clauseBase + 16) + let extra = seekReadInt32 pev (clauseBase + 20) (kind, st1, sz1, st2, sz2, extra)) else [] bigSize, clauses else - let smallSize = seekReadByteAsInt32 ctxt.is (sectionBase + 0x01) + let smallSize = seekReadByteAsInt32 pev (sectionBase + 0x01) let clauses = if (sectionFlag &&& e_CorILMethod_Sect_EHTable) <> 0x0uy then // WORKAROUND: The ECMA spec says this should be @@ -3032,13 +3073,13 @@ and seekReadMethodRVA ctxt (idx, nm, _internalcall, noinline, aggressiveinline, // dprintn (nm+" has " + string numClauses + " tiny seh clauses") List.init numClauses (fun i -> let clauseBase = sectionBase + 4 + (i * 12) - let kind = seekReadUInt16AsInt32 ctxt.is (clauseBase + 0) + let kind = seekReadUInt16AsInt32 pev (clauseBase + 0) if logging then dprintn ("One tiny SEH clause, kind = "+string kind) - let st1 = seekReadUInt16AsInt32 ctxt.is (clauseBase + 2) - let sz1 = seekReadByteAsInt32 ctxt.is (clauseBase + 4) - let st2 = seekReadUInt16AsInt32 ctxt.is (clauseBase + 5) - let sz2 = seekReadByteAsInt32 ctxt.is (clauseBase + 7) - let extra = seekReadInt32 ctxt.is (clauseBase + 8) + let st1 = seekReadUInt16AsInt32 pev (clauseBase + 2) + let sz1 = seekReadByteAsInt32 pev (clauseBase + 4) + let st2 = seekReadUInt16AsInt32 pev (clauseBase + 5) + let sz2 = seekReadByteAsInt32 pev (clauseBase + 7) + let extra = seekReadInt32 pev (clauseBase + 8) (kind, st1, sz1, st2, sz2, extra)) else [] @@ -3066,16 +3107,14 @@ and seekReadMethodRVA ctxt (idx, nm, _internalcall, noinline, aggressiveinline, elif kind = e_COR_ILEXCEPTION_CLAUSE_FAULT then ILExceptionClause.Fault(handlerStart, handlerFinish) else begin - dprintn (ctxt.infile + ": unknown exception handler kind: "+string kind) + dprintn (ctxt.fileName + ": unknown exception handler kind: "+string kind) ILExceptionClause.Finally(handlerStart, handlerFinish) end let key = (tryStart, tryFinish) - if sehMap.ContainsKey key then - let prev = sehMap.[key] - sehMap.[key] <- (prev @ [clause]) - else - sehMap.[key] <- [clause]) + match sehMap.TryGetValue(key) with + | true, prev -> sehMap.[key] <- prev @ [clause] + | _ -> sehMap.[key] <- [clause]) clauses ([], sehMap) ||> Seq.fold (fun acc (KeyValue(key, bs)) -> [ for b in bs -> {Range=key; Clause=b} : ILExceptionSpec ] @ acc) seh := sehClauses @@ -3099,16 +3138,15 @@ and seekReadMethodRVA ctxt (idx, nm, _internalcall, noinline, aggressiveinline, SourceMarker=methRangePdbInfo} else if logging then failwith "unknown format" - MethodBody.Abstract - end) + MethodBody.Abstract) -and int32AsILVariantType ctxt (n:int32) = +and int32AsILVariantType (ctxt: ILMetadataReader) (n:int32) = if List.memAssoc n (Lazy.force ILVariantTypeRevMap) then List.assoc n (Lazy.force ILVariantTypeRevMap) elif (n &&& vt_ARRAY) <> 0x0 then ILNativeVariant.Array (int32AsILVariantType ctxt (n &&& (~~~ vt_ARRAY))) elif (n &&& vt_VECTOR) <> 0x0 then ILNativeVariant.Vector (int32AsILVariantType ctxt (n &&& (~~~ vt_VECTOR))) elif (n &&& vt_BYREF) <> 0x0 then ILNativeVariant.Byref (int32AsILVariantType ctxt (n &&& (~~~ vt_BYREF))) - else (dprintn (ctxt.infile + ": int32AsILVariantType ctxt: unexpected variant type, n = "+string n) ; ILNativeVariant.Empty) + else (dprintn (ctxt.fileName + ": int32AsILVariantType ctxt: unexpected variant type, n = "+string n) ; ILNativeVariant.Empty) and readBlobHeapAsNativeType ctxt blobIdx = // reading native type blob "+string blobIdx) @@ -3183,28 +3221,36 @@ and sigptrGetILNativeType ctxt bytes sigptr = ILNativeType.Array (Some nt, Some(pnum, Some(additive))), sigptr else (ILNativeType.Empty, sigptr) -and seekReadManifestResources ctxt () = - mkILResourcesLazy - (lazy - [ for i = 1 to ctxt.getNumRows TableNames.ManifestResource do - let (offset, flags, nameIdx, implIdx) = seekReadManifestResourceRow ctxt i - let scoref = seekReadImplAsScopeRef ctxt implIdx - let datalab = - match scoref with - | ILScopeRef.Local -> - let start = ctxt.anyV2P ("resource", offset + ctxt.resourcesAddr) - let len = seekReadInt32 ctxt.is start - ILResourceLocation.Local (fun () -> seekReadBytes ctxt.is (start + 4) len) - | ILScopeRef.Module mref -> ILResourceLocation.File (mref, offset) - | ILScopeRef.Assembly aref -> ILResourceLocation.Assembly aref +// Note, pectxtEager and pevEager must not be captured by the results of this function +// As a result, reading the resource offsets in the physical file is done eagerly to avoid holding on to any resources +and seekReadManifestResources (ctxt: ILMetadataReader) (mdv: BinaryView) (pectxtEager: PEReader) (pevEager: BinaryView) = + mkILResources + [ for i = 1 to ctxt.getNumRows TableNames.ManifestResource do + let (offset, flags, nameIdx, implIdx) = seekReadManifestResourceRow ctxt mdv i + + let scoref = seekReadImplAsScopeRef ctxt mdv implIdx + + let location = + match scoref with + | ILScopeRef.Local -> + let start = pectxtEager.anyV2P ("resource", offset + pectxtEager.resourcesAddr) + let resourceLength = seekReadInt32 pevEager start + let offsetOfBytesFromStartOfPhysicalPEFile = start + 4 + if pectxtEager.noFileOnDisk then + ILResourceLocation.LocalOut (seekReadBytes pevEager offsetOfBytesFromStartOfPhysicalPEFile resourceLength) + else + ILResourceLocation.LocalIn (ctxt.fileName, offsetOfBytesFromStartOfPhysicalPEFile, resourceLength) + + | ILScopeRef.Module mref -> ILResourceLocation.File (mref, offset) + | ILScopeRef.Assembly aref -> ILResourceLocation.Assembly aref let r = { Name= readStringHeap ctxt nameIdx - Location = datalab + Location = location Access = (if (flags &&& 0x01) <> 0x0 then ILResourceAccess.Public else ILResourceAccess.Private) - CustomAttrs = seekReadCustomAttrs ctxt (TaggedIndex(hca_ManifestResource, i)) } - yield r ]) - + CustomAttrsStored = ctxt.customAttrsReader_ManifestResource + MetadataIndex = i } + yield r ] and seekReadNestedExportedTypes ctxt (exported: _ array) (nested: Lazy<_ array>) parentIdx = mkILNestedExportedTypesLazy @@ -3217,14 +3263,16 @@ and seekReadNestedExportedTypes ctxt (exported: _ array) (nested: Lazy<_ array>) | ILTypeDefAccess.Nested n -> n | _ -> failwith "non-nested access for a nested type described as being in an auxiliary module") Nested = seekReadNestedExportedTypes ctxt exported nested i - CustomAttrs = seekReadCustomAttrs ctxt (TaggedIndex(hca_ExportedType, i)) } + CustomAttrsStored = ctxt.customAttrsReader_ExportedType + MetadataIndex = i } )) -and seekReadTopExportedTypes ctxt () = +and seekReadTopExportedTypes (ctxt: ILMetadataReader) = mkILExportedTypesLazy (lazy + let mdv = ctxt.mdfile.GetView() let numRows = ctxt.getNumRows TableNames.ExportedType - let exported = [| for i in 1..numRows -> seekReadExportedTypeRow ctxt i |] + let exported = [| for i in 1..numRows -> seekReadExportedTypeRow ctxt mdv i |] // add each nested type id to their parent's children list let nested = lazy ( @@ -3243,21 +3291,21 @@ and seekReadTopExportedTypes ctxt () = // if not a nested type if (isTopTypeDef flags) && (tag <> i_ExportedType) then yield - { ScopeRef = seekReadImplAsScopeRef ctxt implIdx + { ScopeRef = seekReadImplAsScopeRef ctxt mdv implIdx Name = readBlobHeapAsTypeName ctxt (nameIdx, namespaceIdx) - IsForwarder = ((flags &&& 0x00200000) <> 0) - Access = typeAccessOfFlags flags + Attributes = enum(flags) Nested = seekReadNestedExportedTypes ctxt exported nested i - CustomAttrs = seekReadCustomAttrs ctxt (TaggedIndex(hca_ExportedType, i)) } + CustomAttrsStored = ctxt.customAttrsReader_ExportedType + MetadataIndex = i } ]) #if !FX_NO_PDB_READER -let getPdbReader opts infile = - match opts.pdbPath with +let getPdbReader pdbDirPath fileName = + match pdbDirPath with | None -> None | Some pdbpath -> try - let pdbr = pdbReadOpen infile pdbpath + let pdbr = pdbReadOpen fileName pdbpath let pdbdocs = pdbReaderGetDocuments pdbr let tab = new Dictionary<_, _>(Array.length pdbdocs) @@ -3269,220 +3317,42 @@ let getPdbReader opts infile = documentType = Some (pdbDocumentGetType pdbdoc), file = url)) - let docfun url = if tab.ContainsKey url then tab.[url] else failwith ("Document with URL "+url+" not found in list of documents in the PDB file") + let docfun url = + match tab.TryGetValue(url) with + | true, doc -> doc + | _ -> failwith ("Document with URL " + url + " not found in list of documents in the PDB file") Some (pdbr, docfun) with e -> dprintn ("* Warning: PDB file could not be read and will be ignored: "+e.Message); None #endif -//----------------------------------------------------------------------- -// Crack the binary headers, build a reader context and return the lazy -// read of the AbsIL module. -// ---------------------------------------------------------------------- - -let rec genOpenBinaryReader infile is opts = - - (* MSDOS HEADER *) - let peSignaturePhysLoc = seekReadInt32 is 0x3c - - (* PE HEADER *) - let peFileHeaderPhysLoc = peSignaturePhysLoc + 0x04 - let peOptionalHeaderPhysLoc = peFileHeaderPhysLoc + 0x14 - let peSignature = seekReadInt32 is (peSignaturePhysLoc + 0) - if peSignature <> 0x4550 then failwithf "not a PE file - bad magic PE number 0x%08x, is = %A" peSignature is - - - (* PE SIGNATURE *) - let machine = seekReadUInt16AsInt32 is (peFileHeaderPhysLoc + 0) - let numSections = seekReadUInt16AsInt32 is (peFileHeaderPhysLoc + 2) - let optHeaderSize = seekReadUInt16AsInt32 is (peFileHeaderPhysLoc + 16) - if optHeaderSize <> 0xe0 && - optHeaderSize <> 0xf0 then failwith "not a PE file - bad optional header size" - let x64adjust = optHeaderSize - 0xe0 - let only64 = (optHeaderSize = 0xf0) (* May want to read in the optional header Magic number and check that as well... *) - let platform = match machine with | 0x8664 -> Some(AMD64) | 0x200 -> Some(IA64) | _ -> Some(X86) - let sectionHeadersStartPhysLoc = peOptionalHeaderPhysLoc + optHeaderSize - - let flags = seekReadUInt16AsInt32 is (peFileHeaderPhysLoc + 18) - let isDll = (flags &&& 0x2000) <> 0x0 - - (* OPTIONAL PE HEADER *) - let _textPhysSize = seekReadInt32 is (peOptionalHeaderPhysLoc + 4) (* Size of the code (text) section, or the sum of all code sections if there are multiple sections. *) - (* x86: 000000a0 *) - let _initdataPhysSize = seekReadInt32 is (peOptionalHeaderPhysLoc + 8) (* Size of the initialized data section, or the sum of all such sections if there are multiple data sections. *) - let _uninitdataPhysSize = seekReadInt32 is (peOptionalHeaderPhysLoc + 12) (* Size of the uninitialized data section, or the sum of all such sections if there are multiple data sections. *) - let _entrypointAddr = seekReadInt32 is (peOptionalHeaderPhysLoc + 16) (* RVA of entry point , needs to point to bytes 0xFF 0x25 followed by the RVA+!0x4000000 in a section marked execute/read for EXEs or 0 for DLLs e.g. 0x0000b57e *) - let _textAddr = seekReadInt32 is (peOptionalHeaderPhysLoc + 20) (* e.g. 0x0002000 *) - (* x86: 000000b0 *) - let dataSegmentAddr = seekReadInt32 is (peOptionalHeaderPhysLoc + 24) (* e.g. 0x0000c000 *) - (* REVIEW: For now, we'll use the DWORD at offset 24 for x64. This currently ok since fsc doesn't support true 64-bit image bases, - but we'll have to fix this up when such support is added. *) - let imageBaseReal = if only64 then dataSegmentAddr else seekReadInt32 is (peOptionalHeaderPhysLoc + 28) (* Image Base Always 0x400000 (see Section 23.1). - QUERY : no it's not always 0x400000, e.g. 0x034f0000 *) - let alignVirt = seekReadInt32 is (peOptionalHeaderPhysLoc + 32) (* Section Alignment Always 0x2000 (see Section 23.1). *) - let alignPhys = seekReadInt32 is (peOptionalHeaderPhysLoc + 36) (* File Alignment Either 0x200 or 0x1000. *) - (* x86: 000000c0 *) - let _osMajor = seekReadUInt16 is (peOptionalHeaderPhysLoc + 40) (* OS Major Always 4 (see Section 23.1). *) - let _osMinor = seekReadUInt16 is (peOptionalHeaderPhysLoc + 42) (* OS Minor Always 0 (see Section 23.1). *) - let _userMajor = seekReadUInt16 is (peOptionalHeaderPhysLoc + 44) (* User Major Always 0 (see Section 23.1). *) - let _userMinor = seekReadUInt16 is (peOptionalHeaderPhysLoc + 46) (* User Minor Always 0 (see Section 23.1). *) - let subsysMajor = seekReadUInt16AsInt32 is (peOptionalHeaderPhysLoc + 48) (* SubSys Major Always 4 (see Section 23.1). *) - let subsysMinor = seekReadUInt16AsInt32 is (peOptionalHeaderPhysLoc + 50) (* SubSys Minor Always 0 (see Section 23.1). *) - (* x86: 000000d0 *) - let _imageEndAddr = seekReadInt32 is (peOptionalHeaderPhysLoc + 56) (* Image Size: Size, in bytes, of image, including all headers and padding; shall be a multiple of Section Alignment. e.g. 0x0000e000 *) - let _headerPhysSize = seekReadInt32 is (peOptionalHeaderPhysLoc + 60) (* Header Size Combined size of MS-DOS Header, PE Header, PE Optional Header and padding; shall be a multiple of the file alignment. *) - let subsys = seekReadUInt16 is (peOptionalHeaderPhysLoc + 68) (* SubSystem Subsystem required to run this image. Shall be either IMAGE_SUBSYSTEM_WINDOWS_CE_GUI (!0x3) or IMAGE_SUBSYSTEM_WINDOWS_GUI (!0x2). QUERY: Why is this 3 on the images ILASM produces??? *) - let useHighEnthropyVA = - let n = seekReadUInt16 is (peOptionalHeaderPhysLoc + 70) - let highEnthropyVA = 0x20us - (n &&& highEnthropyVA) = highEnthropyVA - - (* x86: 000000e0 *) - - (* WARNING: THESE ARE 64 bit ON x64/ia64 *) - (* REVIEW: If we ever decide that we need these values for x64, we'll have to read them in as 64bit and fix up the rest of the offsets. - Then again, it should suffice to just use the defaults, and still not bother... *) - (* let stackReserve = seekReadInt32 is (peOptionalHeaderPhysLoc + 72) in *) (* Stack Reserve Size Always 0x100000 (1Mb) (see Section 23.1). *) - (* let stackCommit = seekReadInt32 is (peOptionalHeaderPhysLoc + 76) in *) (* Stack Commit Size Always 0x1000 (4Kb) (see Section 23.1). *) - (* let heapReserve = seekReadInt32 is (peOptionalHeaderPhysLoc + 80) in *) (* Heap Reserve Size Always 0x100000 (1Mb) (see Section 23.1). *) - (* let heapCommit = seekReadInt32 is (peOptionalHeaderPhysLoc + 84) in *) (* Heap Commit Size Always 0x1000 (4Kb) (see Section 23.1). *) - - (* x86: 000000f0, x64: 00000100 *) - let _numDataDirectories = seekReadInt32 is (peOptionalHeaderPhysLoc + 92 + x64adjust) (* Number of Data Directories: Always 0x10 (see Section 23.1). *) - (* 00000100 - these addresses are for x86 - for the x64 location, add x64adjust (0x10) *) - let _importTableAddr = seekReadInt32 is (peOptionalHeaderPhysLoc + 104 + x64adjust) (* Import Table RVA of Import Table, (see clause 24.3.1). e.g. 0000b530 *) - let _importTableSize = seekReadInt32 is (peOptionalHeaderPhysLoc + 108 + x64adjust) (* Size of Import Table, (see clause 24.3.1). *) - let nativeResourcesAddr = seekReadInt32 is (peOptionalHeaderPhysLoc + 112 + x64adjust) - let nativeResourcesSize = seekReadInt32 is (peOptionalHeaderPhysLoc + 116 + x64adjust) - (* 00000110 *) - (* 00000120 *) - (* let base_relocTableNames.addr = seekReadInt32 is (peOptionalHeaderPhysLoc + 136) - let base_relocTableNames.size = seekReadInt32 is (peOptionalHeaderPhysLoc + 140) in *) - (* 00000130 *) - (* 00000140 *) - (* 00000150 *) - let _importAddrTableAddr = seekReadInt32 is (peOptionalHeaderPhysLoc + 192 + x64adjust) (* RVA of Import Addr Table, (see clause 24.3.1). e.g. 0x00002000 *) - let _importAddrTableSize = seekReadInt32 is (peOptionalHeaderPhysLoc + 196 + x64adjust) (* Size of Import Addr Table, (see clause 24.3.1). e.g. 0x00002000 *) - (* 00000160 *) - let cliHeaderAddr = seekReadInt32 is (peOptionalHeaderPhysLoc + 208 + x64adjust) - let _cliHeaderSize = seekReadInt32 is (peOptionalHeaderPhysLoc + 212 + x64adjust) - (* 00000170 *) - - - (* Crack section headers *) - - let sectionHeaders = - [ for i in 0 .. numSections-1 do - let pos = sectionHeadersStartPhysLoc + i * 0x28 - let virtSize = seekReadInt32 is (pos + 8) - let virtAddr = seekReadInt32 is (pos + 12) - let physLoc = seekReadInt32 is (pos + 20) - yield (virtAddr, virtSize, physLoc) ] - - let findSectionHeader addr = - let rec look i pos = - if i >= numSections then 0x0 - else - let virtSize = seekReadInt32 is (pos + 8) - let virtAddr = seekReadInt32 is (pos + 12) - if (addr >= virtAddr && addr < virtAddr + virtSize) then pos - else look (i+1) (pos + 0x28) - look 0 sectionHeadersStartPhysLoc - - let textHeaderStart = findSectionHeader cliHeaderAddr - let dataHeaderStart = findSectionHeader dataSegmentAddr - (* let relocHeaderStart = findSectionHeader base_relocTableNames.addr in *) - - let _textSize = if textHeaderStart = 0x0 then 0x0 else seekReadInt32 is (textHeaderStart + 8) - let _textAddr = if textHeaderStart = 0x0 then 0x0 else seekReadInt32 is (textHeaderStart + 12) - let textSegmentPhysicalSize = if textHeaderStart = 0x0 then 0x0 else seekReadInt32 is (textHeaderStart + 16) - let textSegmentPhysicalLoc = if textHeaderStart = 0x0 then 0x0 else seekReadInt32 is (textHeaderStart + 20) - - if logging then dprintn (infile + ": textHeaderStart = "+string textHeaderStart) - if logging then dprintn (infile + ": dataHeaderStart = "+string dataHeaderStart) - if logging then dprintn (infile + ": dataSegmentAddr (pre section crack) = "+string dataSegmentAddr) - - let dataSegmentSize = if dataHeaderStart = 0x0 then 0x0 else seekReadInt32 is (dataHeaderStart + 8) - let dataSegmentAddr = if dataHeaderStart = 0x0 then 0x0 else seekReadInt32 is (dataHeaderStart + 12) - let dataSegmentPhysicalSize = if dataHeaderStart = 0x0 then 0x0 else seekReadInt32 is (dataHeaderStart + 16) - let dataSegmentPhysicalLoc = if dataHeaderStart = 0x0 then 0x0 else seekReadInt32 is (dataHeaderStart + 20) - - if logging then dprintn (infile + ": dataSegmentAddr (post section crack) = "+string dataSegmentAddr) - - let anyV2P (n, v) = - let rec look i pos = - if i >= numSections then (failwith (infile + ": bad "+n+", rva "+string v); 0x0) - else - let virtSize = seekReadInt32 is (pos + 8) - let virtAddr = seekReadInt32 is (pos + 12) - let physLoc = seekReadInt32 is (pos + 20) - if (v >= virtAddr && (v < virtAddr + virtSize)) then (v - virtAddr) + physLoc - else look (i+1) (pos + 0x28) - look 0 sectionHeadersStartPhysLoc - - if logging then dprintn (infile + ": numSections = "+string numSections) - if logging then dprintn (infile + ": cliHeaderAddr = "+string cliHeaderAddr) - if logging then dprintn (infile + ": cliHeaderPhys = "+string (anyV2P ("cli header", cliHeaderAddr))) - if logging then dprintn (infile + ": dataSegmentSize = "+string dataSegmentSize) - if logging then dprintn (infile + ": dataSegmentAddr = "+string dataSegmentAddr) - - let cliHeaderPhysLoc = anyV2P ("cli header", cliHeaderAddr) - - let _majorRuntimeVersion = seekReadUInt16 is (cliHeaderPhysLoc + 4) - let _minorRuntimeVersion = seekReadUInt16 is (cliHeaderPhysLoc + 6) - let metadataAddr = seekReadInt32 is (cliHeaderPhysLoc + 8) - let _metadataSegmentSize = seekReadInt32 is (cliHeaderPhysLoc + 12) - let cliFlags = seekReadInt32 is (cliHeaderPhysLoc + 16) - - let ilOnly = (cliFlags &&& 0x01) <> 0x00 - let only32 = (cliFlags &&& 0x02) <> 0x00 - let is32bitpreferred = (cliFlags &&& 0x00020003) <> 0x00 - let _strongnameSigned = (cliFlags &&& 0x08) <> 0x00 - let _trackdebugdata = (cliFlags &&& 0x010000) <> 0x00 - - let entryPointToken = seekReadUncodedToken is (cliHeaderPhysLoc + 20) - let resourcesAddr = seekReadInt32 is (cliHeaderPhysLoc + 24) - let resourcesSize = seekReadInt32 is (cliHeaderPhysLoc + 28) - let strongnameAddr = seekReadInt32 is (cliHeaderPhysLoc + 32) - let _strongnameSize = seekReadInt32 is (cliHeaderPhysLoc + 36) - let vtableFixupsAddr = seekReadInt32 is (cliHeaderPhysLoc + 40) - let _vtableFixupsSize = seekReadInt32 is (cliHeaderPhysLoc + 44) - - if logging then dprintn (infile + ": metadataAddr = "+string metadataAddr) - if logging then dprintn (infile + ": resourcesAddr = "+string resourcesAddr) - if logging then dprintn (infile + ": resourcesSize = "+string resourcesSize) - if logging then dprintn (infile + ": nativeResourcesAddr = "+string nativeResourcesAddr) - if logging then dprintn (infile + ": nativeResourcesSize = "+string nativeResourcesSize) - - let metadataPhysLoc = anyV2P ("metadata", metadataAddr) - let magic = seekReadUInt16AsInt32 is metadataPhysLoc - if magic <> 0x5342 then failwith (infile + ": bad metadata magic number: " + string magic) - let magic2 = seekReadUInt16AsInt32 is (metadataPhysLoc + 2) +// Note, pectxtEager and pevEager must not be captured by the results of this function +let openMetadataReader (fileName, mdfile: BinaryFile, metadataPhysLoc, peinfo, pectxtEager: PEReader, pevEager: BinaryView, pectxtCaptured, reduceMemoryUsage, ilGlobals) = + let mdv = mdfile.GetView() + let magic = seekReadUInt16AsInt32 mdv metadataPhysLoc + if magic <> 0x5342 then failwith (fileName + ": bad metadata magic number: " + string magic) + let magic2 = seekReadUInt16AsInt32 mdv (metadataPhysLoc + 2) if magic2 <> 0x424a then failwith "bad metadata magic number" - let _majorMetadataVersion = seekReadUInt16 is (metadataPhysLoc + 4) - let _minorMetadataVersion = seekReadUInt16 is (metadataPhysLoc + 6) + let _majorMetadataVersion = seekReadUInt16 mdv (metadataPhysLoc + 4) + let _minorMetadataVersion = seekReadUInt16 mdv (metadataPhysLoc + 6) - let versionLength = seekReadInt32 is (metadataPhysLoc + 12) - let ilMetadataVersion = seekReadBytes is (metadataPhysLoc + 16) versionLength |> Array.filter (fun b -> b <> 0uy) + let versionLength = seekReadInt32 mdv (metadataPhysLoc + 12) + let ilMetadataVersion = seekReadBytes mdv (metadataPhysLoc + 16) versionLength |> Array.filter (fun b -> b <> 0uy) let x = align 0x04 (16 + versionLength) - let numStreams = seekReadUInt16AsInt32 is (metadataPhysLoc + x + 2) + let numStreams = seekReadUInt16AsInt32 mdv (metadataPhysLoc + x + 2) let streamHeadersStart = (metadataPhysLoc + x + 4) - if logging then dprintn (infile + ": numStreams = "+string numStreams) - if logging then dprintn (infile + ": streamHeadersStart = "+string streamHeadersStart) - - (* Crack stream headers *) - let tryFindStream name = let rec look i pos = if i >= numStreams then None else - let offset = seekReadInt32 is (pos + 0) - let length = seekReadInt32 is (pos + 4) + let offset = seekReadInt32 mdv (pos + 0) + let length = seekReadInt32 mdv (pos + 4) let res = ref true let fin = ref false let n = ref 0 // read and compare the stream name byte by byte while (not !fin) do - let c= seekReadByteAsInt32 is (pos + 8 + (!n)) + let c= seekReadByteAsInt32 mdv (pos + 8 + (!n)) if c = 0 then fin := true elif !n >= Array.length name || c <> name.[!n] then @@ -3504,9 +3374,8 @@ let rec genOpenBinaryReader infile is opts = match tryFindStream [| 0x23; 0x2d |] (* #-: at least one DLL I've seen uses this! *) with | Some res -> res | None -> - dprintf "no metadata tables found under stream names '#~' or '#-', please report this\n" - let firstStreamOffset = seekReadInt32 is (streamHeadersStart + 0) - let firstStreamLength = seekReadInt32 is (streamHeadersStart + 4) + let firstStreamOffset = seekReadInt32 mdv (streamHeadersStart + 0) + let firstStreamLength = seekReadInt32 mdv (streamHeadersStart + 4) firstStreamOffset, firstStreamLength let (stringsStreamPhysicalLoc, stringsStreamSize) = findStream [| 0x23; 0x53; 0x74; 0x72; 0x69; 0x6e; 0x67; 0x73; |] (* #Strings *) @@ -3581,9 +3450,9 @@ let rec genOpenBinaryReader infile is opts = kindIllegal (* Table 63 *) |] - let heapSizes = seekReadByteAsInt32 is (tablesStreamPhysLoc + 6) - let valid = seekReadInt64 is (tablesStreamPhysLoc + 8) - let sorted = seekReadInt64 is (tablesStreamPhysLoc + 16) + let heapSizes = seekReadByteAsInt32 mdv (tablesStreamPhysLoc + 6) + let valid = seekReadInt64 mdv (tablesStreamPhysLoc + 8) + let sorted = seekReadInt64 mdv (tablesStreamPhysLoc + 16) let tablesPresent, tableRowCount, startOfTables = let present = ref [] let numRows = Array.create 64 0 @@ -3591,7 +3460,7 @@ let rec genOpenBinaryReader infile is opts = for i = 0 to 63 do if (valid &&& (int64 1 <<< i)) <> int64 0 then present := i :: !present - numRows.[i] <- (seekReadInt32 is !prevNumRowIdx) + numRows.[i] <- (seekReadInt32 mdv !prevNumRowIdx) prevNumRowIdx := !prevNumRowIdx + 4 List.rev !present, numRows, !prevNumRowIdx @@ -3601,9 +3470,9 @@ let rec genOpenBinaryReader infile is opts = let guidsBigness = (heapSizes &&& 2) <> 0 let blobsBigness = (heapSizes &&& 4) <> 0 - if logging then dprintn (infile + ": numTables = "+string numTables) - if logging && stringsBigness then dprintn (infile + ": strings are big") - if logging && blobsBigness then dprintn (infile + ": blobs are big") + if logging then dprintn (fileName + ": numTables = "+string numTables) + if logging && stringsBigness then dprintn (fileName + ": strings are big") + if logging && blobsBigness then dprintn (fileName + ": blobs are big") let tableBigness = Array.map (fun n -> n >= 0x10000) tableRowCount @@ -3721,226 +3590,335 @@ let rec genOpenBinaryReader infile is opts = let tablePhysLocations = let res = Array.create 64 0x0 - let prevTablePhysLoc = ref startOfTables + let mutable prevTablePhysLoc = startOfTables for i = 0 to 63 do - res.[i] <- !prevTablePhysLoc - prevTablePhysLoc := !prevTablePhysLoc + (tableRowCount.[i] * tableRowSizes.[i]) - if logging then dprintf "tablePhysLocations.[%d] = %d, offset from startOfTables = 0x%08x\n" i res.[i] (res.[i] - startOfTables) + res.[i] <- prevTablePhysLoc + prevTablePhysLoc <- prevTablePhysLoc + (tableRowCount.[i] * tableRowSizes.[i]) res - let inbase = Filename.fileNameOfPath infile + ": " + let inbase = Filename.fileNameOfPath fileName + ": " // All the caches. The sizes are guesstimates for the rough sharing-density of the assembly - let cacheAssemblyRef = mkCacheInt32 opts.optimizeForMemory inbase "ILAssemblyRef" (getNumRows TableNames.AssemblyRef) - let cacheMethodSpecAsMethodData = mkCacheGeneric opts.optimizeForMemory inbase "MethodSpecAsMethodData" (getNumRows TableNames.MethodSpec / 20 + 1) - let cacheMemberRefAsMemberData = mkCacheGeneric opts.optimizeForMemory inbase "MemberRefAsMemberData" (getNumRows TableNames.MemberRef / 20 + 1) - let cacheCustomAttr = mkCacheGeneric opts.optimizeForMemory inbase "CustomAttr" (getNumRows TableNames.CustomAttribute / 50 + 1) - let cacheTypeRef = mkCacheInt32 opts.optimizeForMemory inbase "ILTypeRef" (getNumRows TableNames.TypeRef / 20 + 1) - let cacheTypeRefAsType = mkCacheGeneric opts.optimizeForMemory inbase "TypeRefAsType" (getNumRows TableNames.TypeRef / 20 + 1) - let cacheBlobHeapAsPropertySig = mkCacheGeneric opts.optimizeForMemory inbase "BlobHeapAsPropertySig" (getNumRows TableNames.Property / 20 + 1) - let cacheBlobHeapAsFieldSig = mkCacheGeneric opts.optimizeForMemory inbase "BlobHeapAsFieldSig" (getNumRows TableNames.Field / 20 + 1) - let cacheBlobHeapAsMethodSig = mkCacheGeneric opts.optimizeForMemory inbase "BlobHeapAsMethodSig" (getNumRows TableNames.Method / 20 + 1) - let cacheTypeDefAsType = mkCacheGeneric opts.optimizeForMemory inbase "TypeDefAsType" (getNumRows TableNames.TypeDef / 20 + 1) - let cacheMethodDefAsMethodData = mkCacheInt32 opts.optimizeForMemory inbase "MethodDefAsMethodData" (getNumRows TableNames.Method / 20 + 1) - let cacheGenericParams = mkCacheGeneric opts.optimizeForMemory inbase "GenericParams" (getNumRows TableNames.GenericParam / 20 + 1) - let cacheFieldDefAsFieldSpec = mkCacheInt32 opts.optimizeForMemory inbase "FieldDefAsFieldSpec" (getNumRows TableNames.Field / 20 + 1) - let cacheUserStringHeap = mkCacheInt32 opts.optimizeForMemory inbase "UserStringHeap" ( userStringsStreamSize / 20 + 1) + let cacheAssemblyRef = mkCacheInt32 reduceMemoryUsage inbase "ILAssemblyRef" (getNumRows TableNames.AssemblyRef) + let cacheMethodSpecAsMethodData = mkCacheGeneric reduceMemoryUsage inbase "MethodSpecAsMethodData" (getNumRows TableNames.MethodSpec / 20 + 1) + let cacheMemberRefAsMemberData = mkCacheGeneric reduceMemoryUsage inbase "MemberRefAsMemberData" (getNumRows TableNames.MemberRef / 20 + 1) + let cacheCustomAttr = mkCacheGeneric reduceMemoryUsage inbase "CustomAttr" (getNumRows TableNames.CustomAttribute / 50 + 1) + let cacheTypeRef = mkCacheInt32 reduceMemoryUsage inbase "ILTypeRef" (getNumRows TableNames.TypeRef / 20 + 1) + let cacheTypeRefAsType = mkCacheGeneric reduceMemoryUsage inbase "TypeRefAsType" (getNumRows TableNames.TypeRef / 20 + 1) + let cacheBlobHeapAsPropertySig = mkCacheGeneric reduceMemoryUsage inbase "BlobHeapAsPropertySig" (getNumRows TableNames.Property / 20 + 1) + let cacheBlobHeapAsFieldSig = mkCacheGeneric reduceMemoryUsage inbase "BlobHeapAsFieldSig" (getNumRows TableNames.Field / 20 + 1) + let cacheBlobHeapAsMethodSig = mkCacheGeneric reduceMemoryUsage inbase "BlobHeapAsMethodSig" (getNumRows TableNames.Method / 20 + 1) + let cacheTypeDefAsType = mkCacheGeneric reduceMemoryUsage inbase "TypeDefAsType" (getNumRows TableNames.TypeDef / 20 + 1) + let cacheMethodDefAsMethodData = mkCacheInt32 reduceMemoryUsage inbase "MethodDefAsMethodData" (getNumRows TableNames.Method / 20 + 1) + let cacheGenericParams = mkCacheGeneric reduceMemoryUsage inbase "GenericParams" (getNumRows TableNames.GenericParam / 20 + 1) + let cacheFieldDefAsFieldSpec = mkCacheInt32 reduceMemoryUsage inbase "FieldDefAsFieldSpec" (getNumRows TableNames.Field / 20 + 1) + let cacheUserStringHeap = mkCacheInt32 reduceMemoryUsage inbase "UserStringHeap" ( userStringsStreamSize / 20 + 1) // nb. Lots and lots of cache hits on this cache, hence never optimize cache away let cacheStringHeap = mkCacheInt32 false inbase "string heap" ( stringsStreamSize / 50 + 1) - let cacheBlobHeap = mkCacheInt32 opts.optimizeForMemory inbase "blob heap" ( blobsStreamSize / 50 + 1) + let cacheBlobHeap = mkCacheInt32 reduceMemoryUsage inbase "blob heap" ( blobsStreamSize / 50 + 1) // These tables are not required to enforce sharing fo the final data // structure, but are very useful as searching these tables gives rise to many reads // in standard applications. - let cacheNestedRow = mkCacheInt32 opts.optimizeForMemory inbase "Nested Table Rows" (getNumRows TableNames.Nested / 20 + 1) - let cacheConstantRow = mkCacheInt32 opts.optimizeForMemory inbase "Constant Rows" (getNumRows TableNames.Constant / 20 + 1) - let cacheMethodSemanticsRow = mkCacheInt32 opts.optimizeForMemory inbase "MethodSemantics Rows" (getNumRows TableNames.MethodSemantics / 20 + 1) - let cacheTypeDefRow = mkCacheInt32 opts.optimizeForMemory inbase "ILTypeDef Rows" (getNumRows TableNames.TypeDef / 20 + 1) - let cacheInterfaceImplRow = mkCacheInt32 opts.optimizeForMemory inbase "InterfaceImpl Rows" (getNumRows TableNames.InterfaceImpl / 20 + 1) - let cacheFieldMarshalRow = mkCacheInt32 opts.optimizeForMemory inbase "FieldMarshal Rows" (getNumRows TableNames.FieldMarshal / 20 + 1) - let cachePropertyMapRow = mkCacheInt32 opts.optimizeForMemory inbase "PropertyMap Rows" (getNumRows TableNames.PropertyMap / 20 + 1) - - let mkRowCounter _nm = - let count = ref 0 -#if DEBUG -#if STATISTICS - addReport (fun oc -> if !count <> 0 then oc.WriteLine (inbase+string !count + " "+_nm+" rows read")) -#endif -#else - _nm |> ignore -#endif - count - - let countTypeRef = mkRowCounter "ILTypeRef" - let countTypeDef = mkRowCounter "ILTypeDef" - let countField = mkRowCounter "Field" - let countMethod = mkRowCounter "Method" - let countParam = mkRowCounter "Param" - let countInterfaceImpl = mkRowCounter "InterfaceImpl" - let countMemberRef = mkRowCounter "MemberRef" - let countConstant = mkRowCounter "Constant" - let countCustomAttribute = mkRowCounter "CustomAttribute" - let countFieldMarshal = mkRowCounter "FieldMarshal" - let countPermission = mkRowCounter "Permission" - let countClassLayout = mkRowCounter "ClassLayout" - let countFieldLayout = mkRowCounter "FieldLayout" - let countStandAloneSig = mkRowCounter "StandAloneSig" - let countEventMap = mkRowCounter "EventMap" - let countEvent = mkRowCounter "Event" - let countPropertyMap = mkRowCounter "PropertyMap" - let countProperty = mkRowCounter "Property" - let countMethodSemantics = mkRowCounter "MethodSemantics" - let countMethodImpl = mkRowCounter "MethodImpl" - let countModuleRef = mkRowCounter "ILModuleRef" - let countTypeSpec = mkRowCounter "ILTypeSpec" - let countImplMap = mkRowCounter "ImplMap" - let countFieldRVA = mkRowCounter "FieldRVA" - let countAssembly = mkRowCounter "Assembly" - let countAssemblyRef = mkRowCounter "ILAssemblyRef" - let countFile = mkRowCounter "File" - let countExportedType = mkRowCounter "ILExportedTypeOrForwarder" - let countManifestResource = mkRowCounter "ManifestResource" - let countNested = mkRowCounter "Nested" - let countGenericParam = mkRowCounter "GenericParam" - let countGenericParamConstraint = mkRowCounter "GenericParamConstraint" - let countMethodSpec = mkRowCounter "ILMethodSpec" + let cacheNestedRow = mkCacheInt32 reduceMemoryUsage inbase "Nested Table Rows" (getNumRows TableNames.Nested / 20 + 1) + let cacheConstantRow = mkCacheInt32 reduceMemoryUsage inbase "Constant Rows" (getNumRows TableNames.Constant / 20 + 1) + let cacheMethodSemanticsRow = mkCacheInt32 reduceMemoryUsage inbase "MethodSemantics Rows" (getNumRows TableNames.MethodSemantics / 20 + 1) + let cacheTypeDefRow = mkCacheInt32 reduceMemoryUsage inbase "ILTypeDef Rows" (getNumRows TableNames.TypeDef / 20 + 1) + + let rowAddr (tab:TableName) idx = tablePhysLocations.[tab.Index] + (idx - 1) * tableRowSizes.[tab.Index] + + // Build the reader context + // Use an initialization hole + let ctxtH = ref None + let ctxt : ILMetadataReader = + { ilg=ilGlobals + sorted=sorted + getNumRows=getNumRows + mdfile=mdfile + dataEndPoints = match pectxtCaptured with None -> notlazy [] | Some pectxt -> getDataEndPointsDelayed pectxt ctxtH + pectxtCaptured=pectxtCaptured + entryPointToken=pectxtEager.entryPointToken + fileName=fileName + userStringsStreamPhysicalLoc = userStringsStreamPhysicalLoc + stringsStreamPhysicalLoc = stringsStreamPhysicalLoc + blobsStreamPhysicalLoc = blobsStreamPhysicalLoc + blobsStreamSize = blobsStreamSize + memoizeString = Tables.memoize id + readUserStringHeap = cacheUserStringHeap (readUserStringHeapUncached ctxtH) + readStringHeap = cacheStringHeap (readStringHeapUncached ctxtH) + readBlobHeap = cacheBlobHeap (readBlobHeapUncached ctxtH) + seekReadNestedRow = cacheNestedRow (seekReadNestedRowUncached ctxtH) + seekReadConstantRow = cacheConstantRow (seekReadConstantRowUncached ctxtH) + seekReadMethodSemanticsRow = cacheMethodSemanticsRow (seekReadMethodSemanticsRowUncached ctxtH) + seekReadTypeDefRow = cacheTypeDefRow (seekReadTypeDefRowUncached ctxtH) + seekReadAssemblyRef = cacheAssemblyRef (seekReadAssemblyRefUncached ctxtH) + seekReadMethodSpecAsMethodData = cacheMethodSpecAsMethodData (seekReadMethodSpecAsMethodDataUncached ctxtH) + seekReadMemberRefAsMethodData = cacheMemberRefAsMemberData (seekReadMemberRefAsMethodDataUncached ctxtH) + seekReadMemberRefAsFieldSpec = seekReadMemberRefAsFieldSpecUncached ctxtH + seekReadCustomAttr = cacheCustomAttr (seekReadCustomAttrUncached ctxtH) + seekReadTypeRef = cacheTypeRef (seekReadTypeRefUncached ctxtH) + readBlobHeapAsPropertySig = cacheBlobHeapAsPropertySig (readBlobHeapAsPropertySigUncached ctxtH) + readBlobHeapAsFieldSig = cacheBlobHeapAsFieldSig (readBlobHeapAsFieldSigUncached ctxtH) + readBlobHeapAsMethodSig = cacheBlobHeapAsMethodSig (readBlobHeapAsMethodSigUncached ctxtH) + readBlobHeapAsLocalsSig = readBlobHeapAsLocalsSigUncached ctxtH + seekReadTypeDefAsType = cacheTypeDefAsType (seekReadTypeDefAsTypeUncached ctxtH) + seekReadTypeRefAsType = cacheTypeRefAsType (seekReadTypeRefAsTypeUncached ctxtH) + seekReadMethodDefAsMethodData = cacheMethodDefAsMethodData (seekReadMethodDefAsMethodDataUncached ctxtH) + seekReadGenericParams = cacheGenericParams (seekReadGenericParamsUncached ctxtH) + seekReadFieldDefAsFieldSpec = cacheFieldDefAsFieldSpec (seekReadFieldDefAsFieldSpecUncached ctxtH) + customAttrsReader_Module = customAttrsReader ctxtH hca_Module + customAttrsReader_Assembly = customAttrsReader ctxtH hca_Assembly + customAttrsReader_TypeDef = customAttrsReader ctxtH hca_TypeDef + customAttrsReader_GenericParam= customAttrsReader ctxtH hca_GenericParam + customAttrsReader_FieldDef= customAttrsReader ctxtH hca_FieldDef + customAttrsReader_MethodDef= customAttrsReader ctxtH hca_MethodDef + customAttrsReader_ParamDef= customAttrsReader ctxtH hca_ParamDef + customAttrsReader_Event= customAttrsReader ctxtH hca_Event + customAttrsReader_Property= customAttrsReader ctxtH hca_Property + customAttrsReader_ManifestResource= customAttrsReader ctxtH hca_ManifestResource + customAttrsReader_ExportedType= customAttrsReader ctxtH hca_ExportedType + securityDeclsReader_TypeDef = securityDeclsReader ctxtH hds_TypeDef + securityDeclsReader_MethodDef = securityDeclsReader ctxtH hds_MethodDef + securityDeclsReader_Assembly = securityDeclsReader ctxtH hds_Assembly + typeDefReader = typeDefReader ctxtH + guidsStreamPhysicalLoc = guidsStreamPhysicalLoc + rowAddr=rowAddr + rsBigness=rsBigness + tdorBigness=tdorBigness + tomdBigness=tomdBigness + hcBigness=hcBigness + hcaBigness=hcaBigness + hfmBigness=hfmBigness + hdsBigness=hdsBigness + mrpBigness=mrpBigness + hsBigness=hsBigness + mdorBigness=mdorBigness + mfBigness=mfBigness + iBigness=iBigness + catBigness=catBigness + stringsBigness=stringsBigness + guidsBigness=guidsBigness + blobsBigness=blobsBigness + tableBigness=tableBigness } + ctxtH := Some ctxt + + let ilModule = seekReadModule ctxt pectxtEager pevEager peinfo (System.Text.Encoding.UTF8.GetString (ilMetadataVersion, 0, ilMetadataVersion.Length)) 1 + let ilAssemblyRefs = lazy [ for i in 1 .. getNumRows TableNames.AssemblyRef do yield seekReadAssemblyRef ctxt i ] + + ilModule, ilAssemblyRefs + +//----------------------------------------------------------------------- +// Crack the binary headers, build a reader context and return the lazy +// read of the AbsIL module. +// ---------------------------------------------------------------------- +let openPEFileReader (fileName, pefile: BinaryFile, pdbDirPath, noFileOnDisk) = + let pev = pefile.GetView() + (* MSDOS HEADER *) + let peSignaturePhysLoc = seekReadInt32 pev 0x3c + (* PE HEADER *) + let peFileHeaderPhysLoc = peSignaturePhysLoc + 0x04 + let peOptionalHeaderPhysLoc = peFileHeaderPhysLoc + 0x14 + let peSignature = seekReadInt32 pev (peSignaturePhysLoc + 0) + if peSignature <> 0x4550 then failwithf "not a PE file - bad magic PE number 0x%08x, is = %A" peSignature pev + + + (* PE SIGNATURE *) + let machine = seekReadUInt16AsInt32 pev (peFileHeaderPhysLoc + 0) + let numSections = seekReadUInt16AsInt32 pev (peFileHeaderPhysLoc + 2) + let optHeaderSize = seekReadUInt16AsInt32 pev (peFileHeaderPhysLoc + 16) + if optHeaderSize <> 0xe0 && + optHeaderSize <> 0xf0 then failwith "not a PE file - bad optional header size" + let x64adjust = optHeaderSize - 0xe0 + let only64 = (optHeaderSize = 0xf0) (* May want to read in the optional header Magic number and check that as well... *) + let platform = match machine with | 0x8664 -> Some(AMD64) | 0x200 -> Some(IA64) | _ -> Some(X86) + let sectionHeadersStartPhysLoc = peOptionalHeaderPhysLoc + optHeaderSize + + let flags = seekReadUInt16AsInt32 pev (peFileHeaderPhysLoc + 18) + let isDll = (flags &&& 0x2000) <> 0x0 + + (* OPTIONAL PE HEADER *) + let _textPhysSize = seekReadInt32 pev (peOptionalHeaderPhysLoc + 4) (* Size of the code (text) section, or the sum of all code sections if there are multiple sections. *) + (* x86: 000000a0 *) + let _initdataPhysSize = seekReadInt32 pev (peOptionalHeaderPhysLoc + 8) (* Size of the initialized data section, or the sum of all such sections if there are multiple data sections. *) + let _uninitdataPhysSize = seekReadInt32 pev (peOptionalHeaderPhysLoc + 12) (* Size of the uninitialized data section, or the sum of all such sections if there are multiple data sections. *) + let _entrypointAddr = seekReadInt32 pev (peOptionalHeaderPhysLoc + 16) (* RVA of entry point , needs to point to bytes 0xFF 0x25 followed by the RVA+!0x4000000 in a section marked execute/read for EXEs or 0 for DLLs e.g. 0x0000b57e *) + let _textAddr = seekReadInt32 pev (peOptionalHeaderPhysLoc + 20) (* e.g. 0x0002000 *) + (* x86: 000000b0 *) + let dataSegmentAddr = seekReadInt32 pev (peOptionalHeaderPhysLoc + 24) (* e.g. 0x0000c000 *) + (* REVIEW: For now, we'll use the DWORD at offset 24 for x64. This currently ok since fsc doesn't support true 64-bit image bases, + but we'll have to fix this up when such support is added. *) + let imageBaseReal = if only64 then dataSegmentAddr else seekReadInt32 pev (peOptionalHeaderPhysLoc + 28) (* Image Base Always 0x400000 (see Section 23.1). - QUERY : no it's not always 0x400000, e.g. 0x034f0000 *) + let alignVirt = seekReadInt32 pev (peOptionalHeaderPhysLoc + 32) (* Section Alignment Always 0x2000 (see Section 23.1). *) + let alignPhys = seekReadInt32 pev (peOptionalHeaderPhysLoc + 36) (* File Alignment Either 0x200 or 0x1000. *) + (* x86: 000000c0 *) + let _osMajor = seekReadUInt16 pev (peOptionalHeaderPhysLoc + 40) (* OS Major Always 4 (see Section 23.1). *) + let _osMinor = seekReadUInt16 pev (peOptionalHeaderPhysLoc + 42) (* OS Minor Always 0 (see Section 23.1). *) + let _userMajor = seekReadUInt16 pev (peOptionalHeaderPhysLoc + 44) (* User Major Always 0 (see Section 23.1). *) + let _userMinor = seekReadUInt16 pev (peOptionalHeaderPhysLoc + 46) (* User Minor Always 0 (see Section 23.1). *) + let subsysMajor = seekReadUInt16AsInt32 pev (peOptionalHeaderPhysLoc + 48) (* SubSys Major Always 4 (see Section 23.1). *) + let subsysMinor = seekReadUInt16AsInt32 pev (peOptionalHeaderPhysLoc + 50) (* SubSys Minor Always 0 (see Section 23.1). *) + (* x86: 000000d0 *) + let _imageEndAddr = seekReadInt32 pev (peOptionalHeaderPhysLoc + 56) (* Image Size: Size, in bytes, of image, including all headers and padding; shall be a multiple of Section Alignment. e.g. 0x0000e000 *) + let _headerPhysSize = seekReadInt32 pev (peOptionalHeaderPhysLoc + 60) (* Header Size Combined size of MS-DOS Header, PE Header, PE Optional Header and padding; shall be a multiple of the file alignment. *) + let subsys = seekReadUInt16 pev (peOptionalHeaderPhysLoc + 68) (* SubSystem Subsystem required to run this image. Shall be either IMAGE_SUBSYSTEM_WINDOWS_CE_GUI (!0x3) or IMAGE_SUBSYSTEM_WINDOWS_GUI (!0x2). QUERY: Why is this 3 on the images ILASM produces??? *) + let useHighEnthropyVA = + let n = seekReadUInt16 pev (peOptionalHeaderPhysLoc + 70) + let highEnthropyVA = 0x20us + (n &&& highEnthropyVA) = highEnthropyVA + + (* x86: 000000e0 *) + + (* WARNING: THESE ARE 64 bit ON x64/ia64 *) + (* REVIEW: If we ever decide that we need these values for x64, we'll have to read them in as 64bit and fix up the rest of the offsets. + Then again, it should suffice to just use the defaults, and still not bother... *) + (* let stackReserve = seekReadInt32 is (peOptionalHeaderPhysLoc + 72) in *) (* Stack Reserve Size Always 0x100000 (1Mb) (see Section 23.1). *) + (* let stackCommit = seekReadInt32 is (peOptionalHeaderPhysLoc + 76) in *) (* Stack Commit Size Always 0x1000 (4Kb) (see Section 23.1). *) + (* let heapReserve = seekReadInt32 is (peOptionalHeaderPhysLoc + 80) in *) (* Heap Reserve Size Always 0x100000 (1Mb) (see Section 23.1). *) + (* let heapCommit = seekReadInt32 is (peOptionalHeaderPhysLoc + 84) in *) (* Heap Commit Size Always 0x1000 (4Kb) (see Section 23.1). *) + + (* x86: 000000f0, x64: 00000100 *) + let _numDataDirectories = seekReadInt32 pev (peOptionalHeaderPhysLoc + 92 + x64adjust) (* Number of Data Directories: Always 0x10 (see Section 23.1). *) + (* 00000100 - these addresses are for x86 - for the x64 location, add x64adjust (0x10) *) + let _importTableAddr = seekReadInt32 pev (peOptionalHeaderPhysLoc + 104 + x64adjust) (* Import Table RVA of Import Table, (see clause 24.3.1). e.g. 0000b530 *) + let _importTableSize = seekReadInt32 pev (peOptionalHeaderPhysLoc + 108 + x64adjust) (* Size of Import Table, (see clause 24.3.1). *) + let nativeResourcesAddr = seekReadInt32 pev (peOptionalHeaderPhysLoc + 112 + x64adjust) + let nativeResourcesSize = seekReadInt32 pev (peOptionalHeaderPhysLoc + 116 + x64adjust) + (* 00000110 *) + (* 00000120 *) + (* let base_relocTableNames.addr = seekReadInt32 is (peOptionalHeaderPhysLoc + 136) + let base_relocTableNames.size = seekReadInt32 is (peOptionalHeaderPhysLoc + 140) in *) + (* 00000130 *) + (* 00000140 *) + (* 00000150 *) + let _importAddrTableAddr = seekReadInt32 pev (peOptionalHeaderPhysLoc + 192 + x64adjust) (* RVA of Import Addr Table, (see clause 24.3.1). e.g. 0x00002000 *) + let _importAddrTableSize = seekReadInt32 pev (peOptionalHeaderPhysLoc + 196 + x64adjust) (* Size of Import Addr Table, (see clause 24.3.1). e.g. 0x00002000 *) + (* 00000160 *) + let cliHeaderAddr = seekReadInt32 pev (peOptionalHeaderPhysLoc + 208 + x64adjust) + let _cliHeaderSize = seekReadInt32 pev (peOptionalHeaderPhysLoc + 212 + x64adjust) + (* 00000170 *) + + + (* Crack section headers *) + + let sectionHeaders = + [ for i in 0 .. numSections-1 do + let pos = sectionHeadersStartPhysLoc + i * 0x28 + let virtSize = seekReadInt32 pev (pos + 8) + let virtAddr = seekReadInt32 pev (pos + 12) + let physLoc = seekReadInt32 pev (pos + 20) + yield (virtAddr, virtSize, physLoc) ] + + let findSectionHeader addr = + let rec look i pos = + if i >= numSections then 0x0 + else + let virtSize = seekReadInt32 pev (pos + 8) + let virtAddr = seekReadInt32 pev (pos + 12) + if (addr >= virtAddr && addr < virtAddr + virtSize) then pos + else look (i+1) (pos + 0x28) + look 0 sectionHeadersStartPhysLoc + + let textHeaderStart = findSectionHeader cliHeaderAddr + let dataHeaderStart = findSectionHeader dataSegmentAddr + (* let relocHeaderStart = findSectionHeader base_relocTableNames.addr in *) + + let _textSize = if textHeaderStart = 0x0 then 0x0 else seekReadInt32 pev (textHeaderStart + 8) + let _textAddr = if textHeaderStart = 0x0 then 0x0 else seekReadInt32 pev (textHeaderStart + 12) + let textSegmentPhysicalSize = if textHeaderStart = 0x0 then 0x0 else seekReadInt32 pev (textHeaderStart + 16) + let textSegmentPhysicalLoc = if textHeaderStart = 0x0 then 0x0 else seekReadInt32 pev (textHeaderStart + 20) + + //let dataSegmentSize = if dataHeaderStart = 0x0 then 0x0 else seekReadInt32 pev (dataHeaderStart + 8) + //let dataSegmentAddr = if dataHeaderStart = 0x0 then 0x0 else seekReadInt32 pev (dataHeaderStart + 12) + let dataSegmentPhysicalSize = if dataHeaderStart = 0x0 then 0x0 else seekReadInt32 pev (dataHeaderStart + 16) + let dataSegmentPhysicalLoc = if dataHeaderStart = 0x0 then 0x0 else seekReadInt32 pev (dataHeaderStart + 20) + + let anyV2P (n, v) = + let pev = pefile.GetView() + let rec look i pos = + if i >= numSections then (failwith (fileName + ": bad "+n+", rva "+string v); 0x0) + else + let virtSize = seekReadInt32 pev (pos + 8) + let virtAddr = seekReadInt32 pev (pos + 12) + let physLoc = seekReadInt32 pev (pos + 20) + if (v >= virtAddr && (v < virtAddr + virtSize)) then (v - virtAddr) + physLoc + else look (i+1) (pos + 0x28) + look 0 sectionHeadersStartPhysLoc + + let cliHeaderPhysLoc = anyV2P ("cli header", cliHeaderAddr) + + let _majorRuntimeVersion = seekReadUInt16 pev (cliHeaderPhysLoc + 4) + let _minorRuntimeVersion = seekReadUInt16 pev (cliHeaderPhysLoc + 6) + let metadataAddr = seekReadInt32 pev (cliHeaderPhysLoc + 8) + let metadataSize = seekReadInt32 pev (cliHeaderPhysLoc + 12) + let cliFlags = seekReadInt32 pev (cliHeaderPhysLoc + 16) + + let ilOnly = (cliFlags &&& 0x01) <> 0x00 + let only32 = (cliFlags &&& 0x02) <> 0x00 + let is32bitpreferred = (cliFlags &&& 0x00020003) <> 0x00 + let _strongnameSigned = (cliFlags &&& 0x08) <> 0x00 + let _trackdebugdata = (cliFlags &&& 0x010000) <> 0x00 + + let entryPointToken = seekReadUncodedToken pev (cliHeaderPhysLoc + 20) + let resourcesAddr = seekReadInt32 pev (cliHeaderPhysLoc + 24) + let resourcesSize = seekReadInt32 pev (cliHeaderPhysLoc + 28) + let strongnameAddr = seekReadInt32 pev (cliHeaderPhysLoc + 32) + let _strongnameSize = seekReadInt32 pev (cliHeaderPhysLoc + 36) + let vtableFixupsAddr = seekReadInt32 pev (cliHeaderPhysLoc + 40) + let _vtableFixupsSize = seekReadInt32 pev (cliHeaderPhysLoc + 44) + + if logging then dprintn (fileName + ": metadataAddr = "+string metadataAddr) + if logging then dprintn (fileName + ": resourcesAddr = "+string resourcesAddr) + if logging then dprintn (fileName + ": resourcesSize = "+string resourcesSize) + if logging then dprintn (fileName + ": nativeResourcesAddr = "+string nativeResourcesAddr) + if logging then dprintn (fileName + ": nativeResourcesSize = "+string nativeResourcesSize) + + let metadataPhysLoc = anyV2P ("metadata", metadataAddr) //----------------------------------------------------------------------- // Set up the PDB reader so we can read debug info for methods. // ---------------------------------------------------------------------- #if FX_NO_PDB_READER - let pdb = None + let pdb = ignore pdbDirPath; None #else let pdb = if runningOnMono then None else - getPdbReader opts infile + getPdbReader pdbDirPath fileName #endif - let rowAddr (tab:TableName) idx = tablePhysLocations.[tab.Index] + (idx - 1) * tableRowSizes.[tab.Index] - - - // Build the reader context - // Use an initialization hole - let ctxtH = ref None - let ctxt = { ilg=opts.ilGlobals - dataEndPoints = dataEndPoints ctxtH - pdb=pdb - sorted=sorted - getNumRows=getNumRows - textSegmentPhysicalLoc=textSegmentPhysicalLoc - textSegmentPhysicalSize=textSegmentPhysicalSize - dataSegmentPhysicalLoc=dataSegmentPhysicalLoc - dataSegmentPhysicalSize=dataSegmentPhysicalSize - anyV2P=anyV2P - metadataAddr=metadataAddr - sectionHeaders=sectionHeaders - nativeResourcesAddr=nativeResourcesAddr - nativeResourcesSize=nativeResourcesSize - resourcesAddr=resourcesAddr - strongnameAddr=strongnameAddr - vtableFixupsAddr=vtableFixupsAddr - is=is - infile=infile - userStringsStreamPhysicalLoc = userStringsStreamPhysicalLoc - stringsStreamPhysicalLoc = stringsStreamPhysicalLoc - blobsStreamPhysicalLoc = blobsStreamPhysicalLoc - blobsStreamSize = blobsStreamSize - memoizeString = Tables.memoize id - readUserStringHeap = cacheUserStringHeap (readUserStringHeapUncached ctxtH) - readStringHeap = cacheStringHeap (readStringHeapUncached ctxtH) - readBlobHeap = cacheBlobHeap (readBlobHeapUncached ctxtH) - seekReadNestedRow = cacheNestedRow (seekReadNestedRowUncached ctxtH) - seekReadConstantRow = cacheConstantRow (seekReadConstantRowUncached ctxtH) - seekReadMethodSemanticsRow = cacheMethodSemanticsRow (seekReadMethodSemanticsRowUncached ctxtH) - seekReadTypeDefRow = cacheTypeDefRow (seekReadTypeDefRowUncached ctxtH) - seekReadInterfaceImplRow = cacheInterfaceImplRow (seekReadInterfaceImplRowUncached ctxtH) - seekReadFieldMarshalRow = cacheFieldMarshalRow (seekReadFieldMarshalRowUncached ctxtH) - seekReadPropertyMapRow = cachePropertyMapRow (seekReadPropertyMapRowUncached ctxtH) - seekReadAssemblyRef = cacheAssemblyRef (seekReadAssemblyRefUncached ctxtH) - seekReadMethodSpecAsMethodData = cacheMethodSpecAsMethodData (seekReadMethodSpecAsMethodDataUncached ctxtH) - seekReadMemberRefAsMethodData = cacheMemberRefAsMemberData (seekReadMemberRefAsMethodDataUncached ctxtH) - seekReadMemberRefAsFieldSpec = seekReadMemberRefAsFieldSpecUncached ctxtH - seekReadCustomAttr = cacheCustomAttr (seekReadCustomAttrUncached ctxtH) - seekReadSecurityDecl = seekReadSecurityDeclUncached ctxtH - seekReadTypeRef = cacheTypeRef (seekReadTypeRefUncached ctxtH) - readBlobHeapAsPropertySig = cacheBlobHeapAsPropertySig (readBlobHeapAsPropertySigUncached ctxtH) - readBlobHeapAsFieldSig = cacheBlobHeapAsFieldSig (readBlobHeapAsFieldSigUncached ctxtH) - readBlobHeapAsMethodSig = cacheBlobHeapAsMethodSig (readBlobHeapAsMethodSigUncached ctxtH) - readBlobHeapAsLocalsSig = readBlobHeapAsLocalsSigUncached ctxtH - seekReadTypeDefAsType = cacheTypeDefAsType (seekReadTypeDefAsTypeUncached ctxtH) - seekReadTypeRefAsType = cacheTypeRefAsType (seekReadTypeRefAsTypeUncached ctxtH) - seekReadMethodDefAsMethodData = cacheMethodDefAsMethodData (seekReadMethodDefAsMethodDataUncached ctxtH) - seekReadGenericParams = cacheGenericParams (seekReadGenericParamsUncached ctxtH) - seekReadFieldDefAsFieldSpec = cacheFieldDefAsFieldSpec (seekReadFieldDefAsFieldSpecUncached ctxtH) - guidsStreamPhysicalLoc = guidsStreamPhysicalLoc - rowAddr=rowAddr - entryPointToken=entryPointToken - rsBigness=rsBigness - tdorBigness=tdorBigness - tomdBigness=tomdBigness - hcBigness=hcBigness - hcaBigness=hcaBigness - hfmBigness=hfmBigness - hdsBigness=hdsBigness - mrpBigness=mrpBigness - hsBigness=hsBigness - mdorBigness=mdorBigness - mfBigness=mfBigness - iBigness=iBigness - catBigness=catBigness - stringsBigness=stringsBigness - guidsBigness=guidsBigness - blobsBigness=blobsBigness - tableBigness=tableBigness - countTypeRef = countTypeRef - countTypeDef = countTypeDef - countField = countField - countMethod = countMethod - countParam = countParam - countInterfaceImpl = countInterfaceImpl - countMemberRef = countMemberRef - countConstant = countConstant - countCustomAttribute = countCustomAttribute - countFieldMarshal = countFieldMarshal - countPermission = countPermission - countClassLayout = countClassLayout - countFieldLayout = countFieldLayout - countStandAloneSig = countStandAloneSig - countEventMap = countEventMap - countEvent = countEvent - countPropertyMap = countPropertyMap - countProperty = countProperty - countMethodSemantics = countMethodSemantics - countMethodImpl = countMethodImpl - countModuleRef = countModuleRef - countTypeSpec = countTypeSpec - countImplMap = countImplMap - countFieldRVA = countFieldRVA - countAssembly = countAssembly - countAssemblyRef = countAssemblyRef - countFile = countFile - countExportedType = countExportedType - countManifestResource = countManifestResource - countNested = countNested - countGenericParam = countGenericParam - countGenericParamConstraint = countGenericParamConstraint - countMethodSpec = countMethodSpec } - ctxtH := Some ctxt - - let ilModule = seekReadModule ctxt (subsys, (subsysMajor, subsysMinor), useHighEnthropyVA, ilOnly, only32, is32bitpreferred, only64, platform, isDll, alignVirt, alignPhys, imageBaseReal, System.Text.Encoding.UTF8.GetString (ilMetadataVersion, 0, ilMetadataVersion.Length)) 1 - let ilAssemblyRefs = lazy [ for i in 1 .. getNumRows TableNames.AssemblyRef do yield seekReadAssemblyRef ctxt i ] - + let pectxt : PEReader = + { pdb=pdb + textSegmentPhysicalLoc=textSegmentPhysicalLoc + textSegmentPhysicalSize=textSegmentPhysicalSize + dataSegmentPhysicalLoc=dataSegmentPhysicalLoc + dataSegmentPhysicalSize=dataSegmentPhysicalSize + anyV2P=anyV2P + metadataAddr=metadataAddr + sectionHeaders=sectionHeaders + nativeResourcesAddr=nativeResourcesAddr + nativeResourcesSize=nativeResourcesSize + resourcesAddr=resourcesAddr + strongnameAddr=strongnameAddr + vtableFixupsAddr=vtableFixupsAddr + pefile=pefile + fileName=fileName + entryPointToken=entryPointToken + noFileOnDisk=noFileOnDisk + } + let peinfo = (subsys, (subsysMajor, subsysMinor), useHighEnthropyVA, ilOnly, only32, is32bitpreferred, only64, platform, isDll, alignVirt, alignPhys, imageBaseReal) + (metadataPhysLoc, metadataSize, peinfo, pectxt, pev, pdb) + +let openPE (fileName, pefile, pdbDirPath, reduceMemoryUsage, ilGlobals, noFileOnDisk) = + let (metadataPhysLoc, _metadataSize, peinfo, pectxt, pev, pdb) = openPEFileReader (fileName, pefile, pdbDirPath, noFileOnDisk) + let ilModule, ilAssemblyRefs = openMetadataReader (fileName, pefile, metadataPhysLoc, peinfo, pectxt, pev, Some pectxt, reduceMemoryUsage, ilGlobals) ilModule, ilAssemblyRefs, pdb - -let mkDefault ilg = - { optimizeForMemory=false - pdbPath= None - ilGlobals = ilg } +let openPEMetadataOnly (fileName, peinfo, pectxtEager, pev, mdfile: BinaryFile, reduceMemoryUsage, ilGlobals) = + openMetadataReader (fileName, mdfile, 0, peinfo, pectxtEager, pev, None, reduceMemoryUsage, ilGlobals) + let ClosePdbReader pdb = #if FX_NO_PDB_READER ignore pdb @@ -3951,69 +3929,184 @@ let ClosePdbReader pdb = | None -> () #endif -let OpenILModuleReader infile opts = - - try - let mmap = MemoryMappedFile.Create infile - let modul, ilAssemblyRefs, pdb = genOpenBinaryReader infile mmap opts - { modul = modul - ilAssemblyRefs=ilAssemblyRefs - dispose = (fun () -> - mmap.Close() - ClosePdbReader pdb) } - with _ -> - let mc = ByteFile(infile |> FileSystem.ReadAllBytesShim) - let modul, ilAssemblyRefs, pdb = genOpenBinaryReader infile mc opts - { modul = modul - ilAssemblyRefs = ilAssemblyRefs - dispose = (fun () -> - ClosePdbReader pdb) } +type ILReaderMetadataSnapshot = (obj * nativeint * int) +type ILReaderTryGetMetadataSnapshot = (* path: *) string * (* snapshotTimeStamp: *) System.DateTime -> ILReaderMetadataSnapshot option + +[] +type MetadataOnlyFlag = Yes | No + +[] +type ReduceMemoryFlag = Yes | No + +type ILReaderOptions = + { pdbDirPath: string option + ilGlobals: ILGlobals + reduceMemoryUsage: ReduceMemoryFlag + metadataOnly: MetadataOnlyFlag + tryGetMetadataSnapshot: ILReaderTryGetMetadataSnapshot } + + +type ILModuleReader = + abstract ILModuleDef : ILModuleDef + abstract ILAssemblyRefs : ILAssemblyRef list + + /// ILModuleReader objects only need to be explicitly disposed if memory mapping is used, i.e. reduceMemoryUsage = false + inherit System.IDisposable + +[] +type ILModuleReaderImpl(ilModule: ILModuleDef, ilAssemblyRefs: Lazy, dispose: unit -> unit) = + interface ILModuleReader with + member x.ILModuleDef = ilModule + member x.ILAssemblyRefs = ilAssemblyRefs.Force() + member x.Dispose() = dispose() + // ++GLOBAL MUTABLE STATE (concurrency safe via locking) type ILModuleReaderCacheLockToken() = interface LockToken -let ilModuleReaderCache = new AgedLookup(0, areSimilar=(fun (x, y) -> x = y)) +type ILModuleReaderCacheKey = ILModuleReaderCacheKey of string * DateTime * ILScopeRef * bool * ReduceMemoryFlag * MetadataOnlyFlag +let ilModuleReaderCache = new AgedLookup(stronglyHeldReaderCacheSize, areSimilar=(fun (x, y) -> x = y)) let ilModuleReaderCacheLock = Lock() -let OpenILModuleReaderAfterReadingAllBytes infile opts = +let stableFileHeuristicApplies fileName = + not noStableFileHeuristic && try FileSystem.IsStableFileHeuristic fileName with _ -> false + +let createByteFileChunk opts fileName chunk = + // If we're trying to reduce memory usage then we are willing to go back and re-read the binary, so we can use + // a weakly-held handle to an array of bytes. + if opts.reduceMemoryUsage = ReduceMemoryFlag.Yes && stableFileHeuristicApplies fileName then + WeakByteFile(fileName, chunk) :> BinaryFile + else + let bytes = + match chunk with + | None -> FileSystem.ReadAllBytesShim fileName + | Some (start, length) -> File.ReadBinaryChunk(fileName, start, length) + ByteFile(fileName, bytes) :> BinaryFile + +let tryMemoryMapWholeFile opts fileName = + let file = + try + MemoryMapFile.Create fileName :> BinaryFile + with _ -> + createByteFileChunk opts fileName None + let disposer = + { new IDisposable with + member __.Dispose() = + match file with + | :? MemoryMapFile as m -> m.Close() // Note that the PE file reader is not required after this point for metadata-only reading + | _ -> () } + disposer, file + +let OpenILModuleReaderFromBytes fileName bytes opts = + let pefile = ByteFile(fileName, bytes) :> BinaryFile + let ilModule, ilAssemblyRefs, pdb = openPE (fileName, pefile, opts.pdbDirPath, (opts.reduceMemoryUsage = ReduceMemoryFlag.Yes), opts.ilGlobals, true) + new ILModuleReaderImpl(ilModule, ilAssemblyRefs, (fun () -> ClosePdbReader pdb)) :> ILModuleReader + +let OpenILModuleReader fileName opts = // Pseudo-normalize the paths. - let key, succeeded = + let (ILModuleReaderCacheKey (fullPath,writeStamp,_,_,_,_) as key), keyOk = try - (FileSystem.GetFullPathShim(infile), - FileSystem.GetLastWriteTimeShim(infile), - opts.ilGlobals.primaryAssemblyScopeRef, - opts.pdbPath.IsSome), true - with e -> - System.Diagnostics.Debug.Assert(false, sprintf "Failed to compute key in OpenILModuleReaderAfterReadingAllBytes cache for '%s'. Falling back to uncached." infile) - ("", System.DateTime.UtcNow, ILScopeRef.Local, false), false + let fullPath = FileSystem.GetFullPathShim(fileName) + let writeTime = FileSystem.GetLastWriteTimeShim(fileName) + let key = ILModuleReaderCacheKey (fullPath, writeTime, opts.ilGlobals.primaryAssemblyScopeRef, opts.pdbDirPath.IsSome, opts.reduceMemoryUsage, opts.metadataOnly) + key, true + with exn -> + System.Diagnostics.Debug.Assert(false, sprintf "Failed to compute key in OpenILModuleReader cache for '%s'. Falling back to uncached. Error = %s" fileName (exn.ToString())) + let fakeKey = ILModuleReaderCacheKey(fileName, System.DateTime.UtcNow, ILScopeRef.Local, false, ReduceMemoryFlag.Yes, MetadataOnlyFlag.Yes) + fakeKey, false let cacheResult = - if not succeeded then None // Fall back to uncached. - else if opts.pdbPath.IsSome then None // can't used a cached entry when reading PDBs, since it makes the returned object IDisposable - else ilModuleReaderCacheLock.AcquireLock (fun ltok -> ilModuleReaderCache.TryGet(ltok, key)) + if keyOk then + if opts.pdbDirPath.IsSome then None // can't used a cached entry when reading PDBs, since it makes the returned object IDisposable + else ilModuleReaderCacheLock.AcquireLock (fun ltok -> ilModuleReaderCache.TryGet(ltok, key)) + else + None match cacheResult with - | Some(ilModuleReader) -> ilModuleReader + | Some ilModuleReader -> ilModuleReader | None -> - let mc = ByteFile(infile |> FileSystem.ReadAllBytesShim) - let modul, ilAssemblyRefs, pdb = genOpenBinaryReader infile mc opts + + let reduceMemoryUsage = (opts.reduceMemoryUsage = ReduceMemoryFlag.Yes) + let metadataOnly = (opts.metadataOnly = MetadataOnlyFlag.Yes) + + if reduceMemoryUsage && opts.pdbDirPath.IsNone then + + // This case is used in FCS applications, devenv.exe and fsi.exe + // let ilModuleReader = - { modul = modul - ilAssemblyRefs = ilAssemblyRefs - dispose = (fun () -> ClosePdbReader pdb) } - if Option.isNone pdb && succeeded then + // Check if we are doing metadataOnly reading (the most common case in both the compiler and IDE) + if metadataOnly then + + // See if tryGetMetadata gives us a BinaryFile for the metadata section alone. + let mdfileOpt = + match opts.tryGetMetadataSnapshot (fullPath, writeStamp) with + | Some (obj, start, len) -> Some (RawMemoryFile(fullPath, obj, start, len) :> BinaryFile) + | None -> None + + // For metadata-only, always use a temporary, short-lived PE file reader, preferably over a memory mapped file. + // Then use the metadata blob as the long-lived memory resource. + let disposer, pefileEager = tryMemoryMapWholeFile opts fullPath + use _disposer = disposer + let (metadataPhysLoc, metadataSize, peinfo, pectxtEager, pevEager, _pdb) = openPEFileReader (fullPath, pefileEager, None, false) + let mdfile = + match mdfileOpt with + | Some mdfile -> mdfile + | None -> + // If tryGetMetadata doesn't give anything, then just read the metadata chunk out of the binary + createByteFileChunk opts fullPath (Some (metadataPhysLoc, metadataSize)) + + let ilModule, ilAssemblyRefs = openPEMetadataOnly (fullPath, peinfo, pectxtEager, pevEager, mdfile, reduceMemoryUsage, opts.ilGlobals) + new ILModuleReaderImpl(ilModule, ilAssemblyRefs, ignore) + else + // If we are not doing metadata-only, then just go ahead and read all the bytes and hold them either strongly or weakly + // depending on the heuristic + let pefile = createByteFileChunk opts fullPath None + let ilModule, ilAssemblyRefs, _pdb = openPE (fullPath, pefile, None, reduceMemoryUsage, opts.ilGlobals, false) + new ILModuleReaderImpl(ilModule, ilAssemblyRefs, ignore) + + if keyOk then ilModuleReaderCacheLock.AcquireLock (fun ltok -> ilModuleReaderCache.Put(ltok, key, ilModuleReader)) - ilModuleReader -let OpenILModuleReaderFromBytes fileNameForDebugOutput bytes opts = - assert opts.pdbPath.IsNone - let mc = ByteFile(bytes) - let modul, ilAssemblyRefs, pdb = genOpenBinaryReader fileNameForDebugOutput mc opts - let ilModuleReader = - { modul = modul - ilAssemblyRefs = ilAssemblyRefs - dispose = (fun () -> ClosePdbReader pdb) } - ilModuleReader + ilModuleReader :> ILModuleReader + + else + // This case is primarily used in fsc.exe. + // + // In fsc.exe, we're not trying to reduce memory usage, nor do we really care if we leak memory. + // + // Note we ignore the "metadata only" flag as it's generally OK to read in the + // whole binary for the command-line compiler: address space is rarely an issue. + // + // We do however care about avoiding locks on files that prevent their deletion during a + // multi-proc build. So use memory mapping, but only for stable files. Other files + // still use an in-memory ByteFile + let _disposer, pefile = + if alwaysMemoryMapFSC || stableFileHeuristicApplies fullPath then + tryMemoryMapWholeFile opts fullPath + else + let pefile = createByteFileChunk opts fullPath None + let disposer = { new IDisposable with member __.Dispose() = () } + disposer, pefile + + let ilModule, ilAssemblyRefs, pdb = openPE (fullPath, pefile, opts.pdbDirPath, reduceMemoryUsage, opts.ilGlobals, false) + let ilModuleReader = new ILModuleReaderImpl(ilModule, ilAssemblyRefs, (fun () -> ClosePdbReader pdb)) + + // Readers with PDB reader disposal logic don't go in the cache. Note the PDB reader is only used in static linking. + if keyOk && opts.pdbDirPath.IsNone then + ilModuleReaderCacheLock.AcquireLock (fun ltok -> ilModuleReaderCache.Put(ltok, key, ilModuleReader)) + + ilModuleReader :> ILModuleReader +[] +module Shim = + open Microsoft.FSharp.Compiler.Lib + type IAssemblyReader = + abstract GetILModuleReader: filename: string * readerOptions: ILReaderOptions -> ILModuleReader + [] + type DefaultAssemblyReader() = + interface IAssemblyReader with + member __.GetILModuleReader(filename, readerOptions) = + OpenILModuleReader filename readerOptions + let mutable AssemblyReader = DefaultAssemblyReader() :> IAssemblyReader diff --git a/src/absil/ilread.fsi b/src/absil/ilread.fsi index c69312f0379..c548447444a 100644 --- a/src/absil/ilread.fsi +++ b/src/absil/ilread.fsi @@ -24,7 +24,7 @@ /// class. That is not particularly satisfactory, and it may be /// a good idea to build a small library which extracts the information /// you need. -module internal Microsoft.FSharp.Compiler.AbstractIL.ILBinaryReader +module Microsoft.FSharp.Compiler.AbstractIL.ILBinaryReader open Internal.Utilities open Microsoft.FSharp.Compiler.AbstractIL @@ -33,35 +33,73 @@ open Microsoft.FSharp.Compiler.AbstractIL.Internal open Microsoft.FSharp.Compiler.ErrorLogger open System.IO +/// Used to implement a Binary file over native memory, used by Roslyn integration +type ILReaderMetadataSnapshot = (obj * nativeint * int) +type ILReaderTryGetMetadataSnapshot = (* path: *) string * (* snapshotTimeStamp: *) System.DateTime -> ILReaderMetadataSnapshot option + +[] +type MetadataOnlyFlag = Yes | No + +[] +type ReduceMemoryFlag = Yes | No type ILReaderOptions = - { pdbPath: string option; - ilGlobals: ILGlobals; - optimizeForMemory: bool (* normally off, i.e. optimize for startup-path speed *) } + { pdbDirPath: string option + + ilGlobals: ILGlobals + + // fsc.exe does not use reduceMemoryUsage (hence keeps MORE caches in AbstractIL and MORE memory mapping and MORE memory hogging but FASTER and SIMPLER file access) + // fsi.exe does uses reduceMemoryUsage (hence keeps FEWER caches in AbstractIL and LESS memory mapping and LESS memory hogging but slightly SLOWER file access), because its long running + // FCS uses reduceMemoryUsage (hence keeps FEWER caches in AbstractIL and LESS memory mapping and LESS memory hogging), because it is typically long running + reduceMemoryUsage: ReduceMemoryFlag + + /// Only open a metadata reader for the metadata portion of the .NET binary without keeping alive any data associated with the PE reader + /// - IL code will not be available (mdBody in ILMethodDef will return NotAvailable) + /// - Managed resources will be reported back as ILResourceLocation.LocalIn (as always) + /// - Native resources will not be available (none will be returned) + /// - Static data associated with fields will not be available + metadataOnly: MetadataOnlyFlag + + /// A function to call to try to get an object that acts as a snapshot of the metadata section of a .NET binary, + /// and from which we can read the metadata. Only used when metadataOnly=true. + tryGetMetadataSnapshot: ILReaderTryGetMetadataSnapshot } -val mkDefault : ILGlobals -> ILReaderOptions -// The non-memory resources (i.e. the file handle) associated with -// the read can be recovered by calling Dispose. Any remaining -// lazily-computed items in the metadata graph returned by MetadataOfILModuleReader -// will no longer be valid. -[] +/// Represents a reader of the metadata of a .NET binary. May also give some values (e.g. IL code) from the PE file +/// if it was provided. type ILModuleReader = - member ILModuleDef : ILModuleDef - member ILAssemblyRefs : ILAssemblyRef list - interface System.IDisposable + abstract ILModuleDef: ILModuleDef + abstract ILAssemblyRefs: ILAssemblyRef list -val OpenILModuleReader: string -> ILReaderOptions -> ILModuleReader + /// ILModuleReader objects only need to be explicitly disposed if memory mapping is used, i.e. reduceMemoryUsage = false + inherit System.IDisposable + /// Open a binary reader, except first copy the entire contents of the binary into /// memory, close the file and ensure any subsequent reads happen from the in-memory store. /// PDB files may not be read with this option. -val OpenILModuleReaderAfterReadingAllBytes: string -> ILReaderOptions -> ILModuleReader +val internal OpenILModuleReader: string -> ILReaderOptions -> ILModuleReader /// Open a binary reader based on the given bytes. -val OpenILModuleReaderFromBytes: fileNameForDebugOutput:string -> assemblyContents: byte[] -> options: ILReaderOptions -> ILModuleReader +val internal OpenILModuleReaderFromBytes: fileNameForDebugOutput:string -> assemblyContents: byte[] -> options: ILReaderOptions -> ILModuleReader + +type Statistics = + { mutable rawMemoryFileCount : int + mutable memoryMapFileOpenedCount : int + mutable memoryMapFileClosedCount : int + mutable weakByteFileCount : int + mutable byteFileCount : int } + +val GetStatistics : unit -> Statistics + +[] +module Shim = + + type IAssemblyReader = + abstract GetILModuleReader: filename: string * readerOptions: ILReaderOptions -> ILModuleReader + + [] + type DefaultAssemblyReader = + interface IAssemblyReader -#if STATISTICS -(* report statistics from all reads *) -val report: TextWriter -> unit -#endif + val mutable AssemblyReader: IAssemblyReader diff --git a/src/absil/ilreflect.fs b/src/absil/ilreflect.fs index f35e6e7b792..96ca8efe04c 100644 --- a/src/absil/ilreflect.fs +++ b/src/absil/ilreflect.fs @@ -7,27 +7,22 @@ module internal Microsoft.FSharp.Compiler.AbstractIL.ILRuntimeWriter -open Internal.Utilities +open System +open System.Reflection +open System.Reflection.Emit +open System.Runtime.InteropServices +open System.Collections.Generic + open Microsoft.FSharp.Compiler.AbstractIL open Microsoft.FSharp.Compiler.AbstractIL.Internal open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library open Microsoft.FSharp.Compiler.AbstractIL.Diagnostics -open Microsoft.FSharp.Compiler.AbstractIL.Extensions -open Microsoft.FSharp.Compiler.AbstractIL.Extensions.ILX -open Microsoft.FSharp.Compiler.AbstractIL.Extensions.ILX.Types open Microsoft.FSharp.Compiler.AbstractIL.IL open Microsoft.FSharp.Compiler.ErrorLogger open Microsoft.FSharp.Compiler.Range open Microsoft.FSharp.Core.Printf -open System -open System.IO -open System.Reflection -open System.Reflection.Emit -open System.Runtime.InteropServices -open System.Collections.Generic - #if FX_RESHAPED_REFLECTION open Microsoft.FSharp.Core.ReflectionAdapters #endif @@ -121,13 +116,9 @@ type System.Reflection.Emit.MethodBuilder with if logRefEmitCalls then printfn "methodBuilder%d.SetImplementationFlags(enum %d)" (abs <| hash methB) (LanguagePrimitives.EnumToValue attrs) methB.SetImplementationFlags(attrs) - member methB.SetReturnTypeAndLog(rt:System.Type) = - if logRefEmitCalls then printfn "methodBuilder%d.SetReturnType(typeof<%s>)" (abs <| hash methB) rt.FullName - methB.SetReturnType(rt) - - member methB.SetParametersAndLog(ps) = - if logRefEmitCalls then printfn "methodBuilder%d.SetParameters(%A)" (abs <| hash methB) ps - methB.SetParameters(ps) + member methB.SetSignatureAndLog(returnType, returnTypeRequiredCustomModifiers, returnTypeOptionalCustomModifiers, parameterTypes, parameterTypeRequiredCustomModifiers,parameterTypeOptionalCustomModifiers) = + if logRefEmitCalls then printfn "methodBuilder%d.SetSignature(...)" (abs <| hash methB) + methB.SetSignature(returnType, returnTypeRequiredCustomModifiers, returnTypeOptionalCustomModifiers, parameterTypes, parameterTypeRequiredCustomModifiers,parameterTypeOptionalCustomModifiers) member methB.DefineParameterAndLog(n, attr, nm) = if logRefEmitCalls then printfn "methodBuilder%d.DefineParameter(%d, enum %d, %A)" (abs <| hash methB) n (LanguagePrimitives.EnumToValue attr) nm @@ -411,7 +402,7 @@ let envUpdateCreatedTypeRef emEnv (tref:ILTypeRef) = // The (TypeBuilder :> Type) does not implement all the methods that a Type proper does. let typT, typB, typeDef, _createdTypOpt = Zmap.force tref emEnv.emTypMap "envGetTypeDef: failed" if typB.IsCreated() then - let typ = typB.CreateTypeAndLog() + let ty = typB.CreateTypeAndLog() #if ENABLE_MONO_SUPPORT // Mono has a bug where executing code that includes an array type // match "match x with :? C[] -> ..." before the full loading of an object of type @@ -419,12 +410,12 @@ let envUpdateCreatedTypeRef emEnv (tref:ILTypeRef) = // of objects. We use System.Runtime.Serialization.FormatterServices.GetUninitializedObject to do // the fake allocation - this creates an "empty" object, even if the object doesn't have // a constructor. It is not usable in partial trust code. - if runningOnMono && typ.IsClass && not typ.IsAbstract && not typ.IsGenericType && not typ.IsGenericTypeDefinition then + if runningOnMono && ty.IsClass && not ty.IsAbstract && not ty.IsGenericType && not ty.IsGenericTypeDefinition then try - System.Runtime.Serialization.FormatterServices.GetUninitializedObject(typ) |> ignore + System.Runtime.Serialization.FormatterServices.GetUninitializedObject(ty) |> ignore with e -> () #endif - {emEnv with emTypMap = Zmap.add tref (typT, typB, typeDef, Some typ) emEnv.emTypMap} + {emEnv with emTypMap = Zmap.add tref (typT, typB, typeDef, Some ty) emEnv.emTypMap} else #if DEBUG printf "envUpdateCreatedTypeRef: expected type to be created\n"; @@ -434,7 +425,7 @@ let envUpdateCreatedTypeRef emEnv (tref:ILTypeRef) = let convTypeRef cenv emEnv preferCreated (tref:ILTypeRef) = let res = match Zmap.tryFind tref emEnv.emTypMap with - | Some (_typT, _typB, _typeDef, Some createdTyp) when preferCreated -> createdTyp + | Some (_typT, _typB, _typeDef, Some createdTy) when preferCreated -> createdTy | Some (typT, _typB, _typeDef, _) -> typT | None -> convTypeRefAux cenv tref match res with @@ -484,7 +475,7 @@ let envSetLabel emEnv name lab = let envGetLabel emEnv name = Zmap.find name emEnv.emLabels -let envPushTyvars emEnv typs = {emEnv with emTyvars = typs :: emEnv.emTyvars} +let envPushTyvars emEnv tys = {emEnv with emTyvars = tys :: emEnv.emTyvars} let envPopTyvars emEnv = {emEnv with emTyvars = List.tail emEnv.emTyvars} let envGetTyvar emEnv u16 = match emEnv.emTyvars with @@ -534,8 +525,8 @@ let rec convTypeSpec cenv emEnv preferCreated (tspec:ILTypeSpec) = | null -> error(Error(FSComp.SR.itemNotFoundDuringDynamicCodeGen ("type", tspec.TypeRef.QualifiedName, tspec.Scope.QualifiedName), range0)) | _ -> res -and convTypeAux cenv emEnv preferCreated typ = - match typ with +and convTypeAux cenv emEnv preferCreated ty = + match ty with | ILType.Void -> Type.GetType("System.Void") | ILType.Array (shape, eltType) -> let baseT = convTypeAux cenv emEnv preferCreated eltType @@ -558,11 +549,11 @@ and convTypeAux cenv emEnv preferCreated typ = baseT.MakeByRefType() | ILType.TypeVar tv -> envGetTyvar emEnv tv // Consider completing the following cases: - | ILType.Modified (false, _, modifiedTy) -> + | ILType.Modified (_, _, modifiedTy) -> + // Note, "modreq" are not being emitted. This is convTypeAux cenv emEnv preferCreated modifiedTy - | ILType.Modified (true, _, _) -> failwith "convType: modreq" - | ILType.FunctionPointer _callsig -> failwith "convType: fptr" + | ILType.FunctionPointer _callsig -> failwith "convType: fptr" // [Bug 4063]. // The convType functions convert AbsIL types into concrete Type values. @@ -581,23 +572,42 @@ and convTypeAux cenv emEnv preferCreated typ = // will need to be fixed for emitted types to handle both TypeBuilder and later Type proper. /// Uses TypeBuilder/TypeBuilderInstantiation for emitted types. -let convType cenv emEnv typ = convTypeAux cenv emEnv false typ +let convType cenv emEnv ty = convTypeAux cenv emEnv false ty // Used for ldtoken -let convTypeOrTypeDef cenv emEnv typ = - match typ with +let convTypeOrTypeDef cenv emEnv ty = + match ty with // represents an uninstantiated "TypeDef" or "TypeRef" | ILType.Boxed tspec when tspec.GenericArgs.IsEmpty -> convTypeRef cenv emEnv false tspec.TypeRef - | _ -> convType cenv emEnv typ + | _ -> convType cenv emEnv ty -let convTypes cenv emEnv (typs:ILTypes) = List.map (convType cenv emEnv) typs +let convTypes cenv emEnv (tys:ILTypes) = List.map (convType cenv emEnv) tys -let convTypesToArray cenv emEnv (typs:ILTypes) = convTypes cenv emEnv typs |> List.toArray +let convTypesToArray cenv emEnv (tys:ILTypes) = convTypes cenv emEnv tys |> List.toArray /// Uses the .CreateType() for emitted type if available. -let convCreatedType cenv emEnv typ = convTypeAux cenv emEnv true typ -let convCreatedTypeRef cenv emEnv typ = convTypeRef cenv emEnv true typ +let convCreatedType cenv emEnv ty = convTypeAux cenv emEnv true ty +let convCreatedTypeRef cenv emEnv ty = convTypeRef cenv emEnv true ty +let rec convParamModifiersOfType cenv emEnv (pty: ILType) = + [| match pty with + | ILType.Modified (modreq, ty, modifiedTy) -> + yield (modreq, convTypeRef cenv emEnv false ty) + yield! convParamModifiersOfType cenv emEnv modifiedTy + | _ -> () |] + +let splitModifiers mods = + let reqd = mods |> Array.choose (function (true, ty) -> Some ty | _ -> None) + let optional = mods |> Array.choose (function (false, ty) -> Some ty | _ -> None) + reqd, optional + +let convParamModifiers cenv emEnv (p: ILParameter) = + let mods = convParamModifiersOfType cenv emEnv p.Type + splitModifiers mods + +let convReturnModifiers cenv emEnv (p: ILReturn) = + let mods = convParamModifiersOfType cenv emEnv p.Type + splitModifiers mods //---------------------------------------------------------------------------- // convFieldInit @@ -642,11 +652,11 @@ let TypeBuilderInstantiationT = assert (not (isNull ty)) ty -let typeIsNotQueryable (typ : Type) = +let typeIsNotQueryable (ty : Type) = #if FX_RESHAPED_REFLECTION - let typ = typ.GetTypeInfo() + let ty = ty.GetTypeInfo() #endif - (typ :? TypeBuilder) || ((typ.GetType()).Equals(TypeBuilderInstantiationT)) + (ty :? TypeBuilder) || ((ty.GetType()).Equals(TypeBuilderInstantiationT)) //---------------------------------------------------------------------------- // convFieldSpec //---------------------------------------------------------------------------- @@ -654,7 +664,7 @@ let typeIsNotQueryable (typ : Type) = let queryableTypeGetField _emEnv (parentT:Type) (fref: ILFieldRef) = let res = parentT.GetField(fref.Name, BindingFlags.Public ||| BindingFlags.NonPublic ||| BindingFlags.Instance ||| BindingFlags.Static ) match res with - | null -> error(Error(FSComp.SR.itemNotFoundInTypeDuringDynamicCodeGen ("field", fref.Name, fref.EnclosingTypeRef.FullName, fref.EnclosingTypeRef.Scope.QualifiedName), range0)) + | null -> error(Error(FSComp.SR.itemNotFoundInTypeDuringDynamicCodeGen ("field", fref.Name, fref.DeclaringTypeRef.FullName, fref.DeclaringTypeRef.Scope.QualifiedName), range0)) | _ -> res let nonQueryableTypeGetField (parentTI:Type) (fieldInfo : FieldInfo) : FieldInfo = @@ -668,8 +678,8 @@ let nonQueryableTypeGetField (parentTI:Type) (fieldInfo : FieldInfo) : FieldInfo let convFieldSpec cenv emEnv fspec = let fref = fspec.FieldRef - let tref = fref.EnclosingTypeRef - let parentTI = convType cenv emEnv fspec.EnclosingType + let tref = fref.DeclaringTypeRef + let parentTI = convType cenv emEnv fspec.DeclaringType if isEmittedTypeRef emEnv tref then // NOTE: if "convType becomes convCreatedType", then handle queryable types here too. [bug 4063] (necessary? what repro?) let fieldB = envGetFieldB emEnv fref @@ -753,7 +763,9 @@ let queryableTypeGetMethodBySearch cenv emEnv parentT (mref:ILMethodRef) = res match List.tryFind select methInfos with - | None -> failwith "convMethodRef: could not bind to method" + | None -> + let methNames = methInfos |> List.map (fun m -> m.Name) |> List.distinct + failwithf "convMethodRef: could not bind to method '%A' of type '%s'" (System.String.Join(", ", methNames)) parentT.AssemblyQualifiedName | Some methInfo -> methInfo (* return MethodInfo for (generic) type's (generic) method *) let queryableTypeGetMethod cenv emEnv parentT (mref:ILMethodRef) = @@ -793,7 +805,7 @@ let nonQueryableTypeGetMethod (parentTI:Type) (methInfo : MethodInfo) : MethodIn else methInfo let convMethodRef cenv emEnv (parentTI:Type) (mref:ILMethodRef) = - let parent = mref.EnclosingTypeRef + let parent = mref.DeclaringTypeRef let res = if isEmittedTypeRef emEnv parent then // NOTE: if "convType becomes convCreatedType", then handle queryable types here too. [bug 4063] @@ -817,7 +829,7 @@ let convMethodRef cenv emEnv (parentTI:Type) (mref:ILMethodRef) = //---------------------------------------------------------------------------- let convMethodSpec cenv emEnv (mspec:ILMethodSpec) = - let typT = convType cenv emEnv mspec.EnclosingType (* (instanced) parent Type *) + let typT = convType cenv emEnv mspec.DeclaringType (* (instanced) parent Type *) let methInfo = convMethodRef cenv emEnv typT mspec.MethodRef (* (generic) method of (generic) parent *) let methInfo = if isNil mspec.GenericArgs then @@ -852,9 +864,9 @@ let nonQueryableTypeGetConstructor (parentTI:Type) (consInfo : ConstructorInfo) let convConstructorSpec cenv emEnv (mspec:ILMethodSpec) = let mref = mspec.MethodRef - let parentTI = convType cenv emEnv mspec.EnclosingType + let parentTI = convType cenv emEnv mspec.DeclaringType let res = - if isEmittedTypeRef emEnv mref.EnclosingTypeRef then + if isEmittedTypeRef emEnv mref.DeclaringTypeRef then let consB = envGetConsB emEnv mref nonQueryableTypeGetConstructor parentTI consB else @@ -919,7 +931,7 @@ let emitInstrTail (ilG:ILGenerator) tail emitTheCall = let emitInstrNewobj cenv emEnv (ilG:ILGenerator) mspec varargs = match varargs with | None -> ilG.EmitAndLog(OpCodes.Newobj, convConstructorSpec cenv emEnv mspec) - | Some _vartyps -> failwith "emit: pending new varargs" // XXX - gap + | Some _varargTys -> failwith "emit: pending new varargs" // XXX - gap let emitSilverlightCheck (ilG:ILGenerator) = ignore ilG @@ -930,13 +942,13 @@ let emitInstrCall cenv emEnv (ilG:ILGenerator) opCall tail (mspec:ILMethodSpec) if mspec.MethodRef.Name = ".ctor" || mspec.MethodRef.Name = ".cctor" then let cinfo = convConstructorSpec cenv emEnv mspec match varargs with - | None -> ilG.EmitAndLog (opCall, cinfo) - | Some _vartyps -> failwith "emitInstrCall: .ctor and varargs" + | None -> ilG.EmitAndLog (opCall, cinfo) + | Some _varargTys -> failwith "emitInstrCall: .ctor and varargs" else let minfo = convMethodSpec cenv emEnv mspec match varargs with - | None -> ilG.EmitAndLog(opCall, minfo) - | Some vartyps -> ilG.EmitCall (opCall, minfo, convTypesToArray cenv emEnv vartyps) + | None -> ilG.EmitAndLog(opCall, minfo) + | Some varargTys -> ilG.EmitCall (opCall, minfo, convTypesToArray cenv emEnv varargTys) ) let getGenericMethodDefinition q (ty:Type) = @@ -1053,7 +1065,7 @@ let rec emitInstr cenv (modB : ModuleBuilder) emEnv (ilG:ILGenerator) instr = | AI_ldc (DT_I8, ILConst.I8 i64) -> ilG.Emit(OpCodes.Ldc_I8, i64) | AI_ldc (DT_R4, ILConst.R4 r32) -> ilG.Emit(OpCodes.Ldc_R4, r32) | AI_ldc (DT_R8, ILConst.R8 r64) -> ilG.Emit(OpCodes.Ldc_R8, r64) - | AI_ldc (_ , _ ) -> failwith "emitInstrI_arith (AI_ldc (typ, const)) iltyped" + | AI_ldc (_ , _ ) -> failwith "emitInstrI_arith (AI_ldc (ty, const)) iltyped" | I_ldarg u16 -> ilG.EmitAndLog(OpCodes.Ldarg , int16 u16) | I_ldarga u16 -> ilG.EmitAndLog(OpCodes.Ldarga, int16 u16) | I_ldind (align, vol, dt) -> @@ -1110,8 +1122,8 @@ let rec emitInstr cenv (modB : ModuleBuilder) emEnv (ilG:ILGenerator) instr = emitSilverlightCheck ilG emitInstrCall cenv emEnv ilG OpCodes.Callvirt tail mspec varargs - | I_callconstraint (tail, typ, mspec, varargs) -> - ilG.Emit(OpCodes.Constrained, convType cenv emEnv typ); + | I_callconstraint (tail, ty, mspec, varargs) -> + ilG.Emit(OpCodes.Constrained, convType cenv emEnv ty); emitInstrCall cenv emEnv ilG OpCodes.Callvirt tail mspec varargs | I_calli (tail, callsig, None) -> @@ -1122,13 +1134,13 @@ let rec emitInstr cenv (modB : ModuleBuilder) emEnv (ilG:ILGenerator) instr = convTypesToArray cenv emEnv callsig.ArgTypes, Unchecked.defaultof)) - | I_calli (tail, callsig, Some vartyps) -> + | I_calli (tail, callsig, Some varargTys) -> emitInstrTail ilG tail (fun () -> ilG.EmitCalli(OpCodes.Calli, convCallConv callsig.CallingConv, convType cenv emEnv callsig.ReturnType, convTypesToArray cenv emEnv callsig.ArgTypes, - convTypesToArray cenv emEnv vartyps)) + convTypesToArray cenv emEnv varargTys)) | I_ldftn mspec -> ilG.EmitAndLog(OpCodes.Ldftn, convMethodSpec cenv emEnv mspec) @@ -1155,30 +1167,30 @@ let rec emitInstr cenv (modB : ModuleBuilder) emEnv (ilG:ILGenerator) instr = ilG.EmitAndLog(OpCodes.Stfld, convFieldSpec cenv emEnv fspec) | I_ldstr s -> ilG.EmitAndLog(OpCodes.Ldstr, s) - | I_isinst typ -> ilG.EmitAndLog(OpCodes.Isinst, convType cenv emEnv typ) - | I_castclass typ -> ilG.EmitAndLog(OpCodes.Castclass, convType cenv emEnv typ) - | I_ldtoken (ILToken.ILType typ) -> ilG.EmitAndLog(OpCodes.Ldtoken, convTypeOrTypeDef cenv emEnv typ) + | I_isinst ty -> ilG.EmitAndLog(OpCodes.Isinst, convType cenv emEnv ty) + | I_castclass ty -> ilG.EmitAndLog(OpCodes.Castclass, convType cenv emEnv ty) + | I_ldtoken (ILToken.ILType ty) -> ilG.EmitAndLog(OpCodes.Ldtoken, convTypeOrTypeDef cenv emEnv ty) | I_ldtoken (ILToken.ILMethod mspec) -> ilG.EmitAndLog(OpCodes.Ldtoken, convMethodSpec cenv emEnv mspec) | I_ldtoken (ILToken.ILField fspec) -> ilG.EmitAndLog(OpCodes.Ldtoken, convFieldSpec cenv emEnv fspec) | I_ldvirtftn mspec -> ilG.EmitAndLog(OpCodes.Ldvirtftn, convMethodSpec cenv emEnv mspec) // Value type instructions - | I_cpobj typ -> ilG.EmitAndLog(OpCodes.Cpobj , convType cenv emEnv typ) - | I_initobj typ -> ilG.EmitAndLog(OpCodes.Initobj , convType cenv emEnv typ) + | I_cpobj ty -> ilG.EmitAndLog(OpCodes.Cpobj , convType cenv emEnv ty) + | I_initobj ty -> ilG.EmitAndLog(OpCodes.Initobj , convType cenv emEnv ty) - | I_ldobj (align, vol, typ) -> + | I_ldobj (align, vol, ty) -> emitInstrAlign ilG align emitInstrVolatile ilG vol - ilG.EmitAndLog(OpCodes.Ldobj , convType cenv emEnv typ) + ilG.EmitAndLog(OpCodes.Ldobj , convType cenv emEnv ty) - | I_stobj (align, vol, typ) -> + | I_stobj (align, vol, ty) -> emitInstrAlign ilG align emitInstrVolatile ilG vol - ilG.EmitAndLog(OpCodes.Stobj , convType cenv emEnv typ) + ilG.EmitAndLog(OpCodes.Stobj , convType cenv emEnv ty) - | I_box typ -> ilG.EmitAndLog(OpCodes.Box , convType cenv emEnv typ) - | I_unbox typ -> ilG.EmitAndLog(OpCodes.Unbox , convType cenv emEnv typ) - | I_unbox_any typ -> ilG.EmitAndLog(OpCodes.Unbox_Any, convType cenv emEnv typ) - | I_sizeof typ -> ilG.EmitAndLog(OpCodes.Sizeof , convType cenv emEnv typ) + | I_box ty -> ilG.EmitAndLog(OpCodes.Box , convType cenv emEnv ty) + | I_unbox ty -> ilG.EmitAndLog(OpCodes.Unbox , convType cenv emEnv ty) + | I_unbox_any ty -> ilG.EmitAndLog(OpCodes.Unbox_Any, convType cenv emEnv ty) + | I_sizeof ty -> ilG.EmitAndLog(OpCodes.Sizeof , convType cenv emEnv ty) // Generalized array instructions. // In AbsIL these instructions include @@ -1226,21 +1238,21 @@ let rec emitInstr cenv (modB : ModuleBuilder) emEnv (ilG:ILGenerator) instr = | DT_U8 -> failwith "emitInstr cenv: stelem U8" | DT_REF -> ilG.EmitAndLog(OpCodes.Stelem_Ref) - | I_ldelema (ro, _isNativePtr, shape, typ) -> + | I_ldelema (ro, _isNativePtr, shape, ty) -> if (ro = ReadonlyAddress) then ilG.EmitAndLog(OpCodes.Readonly); if (shape = ILArrayShape.SingleDimensional) - then ilG.EmitAndLog(OpCodes.Ldelema, convType cenv emEnv typ) + then ilG.EmitAndLog(OpCodes.Ldelema, convType cenv emEnv ty) else - let aty = convType cenv emEnv (ILType.Array(shape, typ)) + let aty = convType cenv emEnv (ILType.Array(shape, ty)) let ety = aty.GetElementType() let rty = ety.MakeByRefType() let meth = modB.GetArrayMethodAndLog(aty, "Address", System.Reflection.CallingConventions.HasThis, rty, Array.create shape.Rank (typeof) ) ilG.EmitAndLog(OpCodes.Call, meth) - | I_ldelem_any (shape, typ) -> - if (shape = ILArrayShape.SingleDimensional) then ilG.EmitAndLog(OpCodes.Ldelem, convType cenv emEnv typ) + | I_ldelem_any (shape, ty) -> + if (shape = ILArrayShape.SingleDimensional) then ilG.EmitAndLog(OpCodes.Ldelem, convType cenv emEnv ty) else - let aty = convType cenv emEnv (ILType.Array(shape, typ)) + let aty = convType cenv emEnv (ILType.Array(shape, ty)) let ety = aty.GetElementType() let meth = #if ENABLE_MONO_SUPPORT @@ -1252,10 +1264,10 @@ let rec emitInstr cenv (modB : ModuleBuilder) emEnv (ilG:ILGenerator) instr = modB.GetArrayMethodAndLog(aty, "Get", System.Reflection.CallingConventions.HasThis, ety, Array.create shape.Rank (typeof) ) ilG.EmitAndLog(OpCodes.Call, meth) - | I_stelem_any (shape, typ) -> - if (shape = ILArrayShape.SingleDimensional) then ilG.EmitAndLog(OpCodes.Stelem, convType cenv emEnv typ) + | I_stelem_any (shape, ty) -> + if (shape = ILArrayShape.SingleDimensional) then ilG.EmitAndLog(OpCodes.Stelem, convType cenv emEnv ty) else - let aty = convType cenv emEnv (ILType.Array(shape, typ)) + let aty = convType cenv emEnv (ILType.Array(shape, ty)) let ety = aty.GetElementType() let meth = #if ENABLE_MONO_SUPPORT @@ -1267,18 +1279,18 @@ let rec emitInstr cenv (modB : ModuleBuilder) emEnv (ilG:ILGenerator) instr = modB.GetArrayMethodAndLog(aty, "Set", System.Reflection.CallingConventions.HasThis, (null:Type), Array.append (Array.create shape.Rank (typeof)) (Array.ofList [ ety ])) ilG.EmitAndLog(OpCodes.Call, meth) - | I_newarr (shape, typ) -> + | I_newarr (shape, ty) -> if (shape = ILArrayShape.SingleDimensional) - then ilG.EmitAndLog(OpCodes.Newarr, convType cenv emEnv typ) + then ilG.EmitAndLog(OpCodes.Newarr, convType cenv emEnv ty) else - let aty = convType cenv emEnv (ILType.Array(shape, typ)) + let aty = convType cenv emEnv (ILType.Array(shape, ty)) let meth = modB.GetArrayMethodAndLog(aty, ".ctor", System.Reflection.CallingConventions.HasThis, (null:Type), Array.create shape.Rank (typeof)) ilG.EmitAndLog(OpCodes.Newobj, meth) | I_ldlen -> ilG.EmitAndLog(OpCodes.Ldlen) - | I_mkrefany typ -> ilG.EmitAndLog(OpCodes.Mkrefany, convType cenv emEnv typ) + | I_mkrefany ty -> ilG.EmitAndLog(OpCodes.Mkrefany, convType cenv emEnv ty) | I_refanytype -> ilG.EmitAndLog(OpCodes.Refanytype) - | I_refanyval typ -> ilG.EmitAndLog(OpCodes.Refanyval, convType cenv emEnv typ) + | I_refanyval ty -> ilG.EmitAndLog(OpCodes.Refanyval, convType cenv emEnv ty) | I_rethrow -> ilG.EmitAndLog(OpCodes.Rethrow) | I_break -> ilG.EmitAndLog(OpCodes.Break) | I_seqpoint src -> @@ -1286,7 +1298,7 @@ let rec emitInstr cenv (modB : ModuleBuilder) emEnv (ilG:ILGenerator) instr = ignore src () #else - if cenv.generatePdb && not (src.Document.File.EndsWith("stdin", StringComparison.Ordinal)) then + if cenv.generatePdb && not (src.Document.File.EndsWithOrdinal("stdin")) then let guid x = match x with None -> Guid.Empty | Some g -> Guid(g:byte[]) in let symDoc = modB.DefineDocumentAndLog(src.Document.File, guid src.Document.Language, guid src.Document.Vendor, guid src.Document.DocumentType) ilG.MarkSequencePointAndLog(symDoc, src.Line, src.Column, src.EndLine, src.EndColumn) @@ -1317,7 +1329,10 @@ let emitCode cenv modB emEnv (ilG:ILGenerator) (code: ILCode) = let emEnv = (emEnv, code.Labels) ||> Seq.fold (fun emEnv (KeyValue(label, pc)) -> let lab = ilG.DefineLabelAndLog() - pc2lab.[pc] <- (if pc2lab.ContainsKey pc then lab :: pc2lab.[pc] else [lab]) + pc2lab.[pc] <- + match pc2lab.TryGetValue(pc) with + | true, labels -> lab :: labels + | _ -> [lab] envSetLabel emEnv label lab) // Build a table that contains the operations that define where exception handlers are @@ -1325,7 +1340,10 @@ let emitCode cenv modB emEnv (ilG:ILGenerator) (code: ILCode) = let lab2pc = code.Labels let add lab action = let pc = lab2pc.[lab] - pc2action.[pc] <- (if pc2action.ContainsKey pc then pc2action.[pc] @ [ action ] else [ action ]) + pc2action.[pc] <- + match pc2action.TryGetValue(pc) with + | true, actions -> actions @ [action] + | _ -> [action] for e in code.Exceptions do let (startTry, _endTry) = e.Range @@ -1346,20 +1364,26 @@ let emitCode cenv modB emEnv (ilG:ILGenerator) (code: ILCode) = add startHandler (fun () -> ilG.BeginCatchBlockAndLog null) add endHandler ilG.EndExceptionBlockAndLog - | ILExceptionClause.TypeCatch(typ, (startHandler, endHandler)) -> - add startHandler (fun () -> ilG.BeginCatchBlockAndLog (convType cenv emEnv typ)) + | ILExceptionClause.TypeCatch(ty, (startHandler, endHandler)) -> + add startHandler (fun () -> ilG.BeginCatchBlockAndLog (convType cenv emEnv ty)) add endHandler ilG.EndExceptionBlockAndLog // Emit the instructions let instrs = code.Instrs for pc = 0 to instrs.Length do - if pc2action.ContainsKey pc then - for action in pc2action.[pc] do + match pc2action.TryGetValue(pc) with + | true, actions -> + for action in actions do action() - if pc2lab.ContainsKey pc then - for lab in pc2lab.[pc] do - ilG.MarkLabelAndLog lab + | _ -> () + + match pc2lab.TryGetValue(pc) with + | true, labels -> + for lab in labels do + ilG.MarkLabelAndLog(lab) + | _ -> () + if pc < instrs.Length then match instrs.[pc] with | I_br l when code.Labels.[l] = pc + 1 -> () // compress I_br to next instruction @@ -1385,9 +1409,10 @@ let emitILMethodBody cenv modB emEnv (ilG:ILGenerator) (ilmbody: ILMethodBody) = let emitMethodBody cenv modB emEnv ilG _name (mbody: ILLazyMethodBody) = match mbody.Contents with | MethodBody.IL ilmbody -> emitILMethodBody cenv modB emEnv (ilG()) ilmbody - | MethodBody.PInvoke _pinvoke -> () (* printf "EMIT: pinvoke method %s\n" name *) (* XXX - check *) - | MethodBody.Abstract -> () (* printf "EMIT: abstract method %s\n" name *) (* XXX - check *) - | MethodBody.Native -> failwith "emitMethodBody cenv: native" (* XXX - gap *) + | MethodBody.PInvoke _pinvoke -> () + | MethodBody.Abstract -> () + | MethodBody.Native -> failwith "emitMethodBody: native" + | MethodBody.NotAvailable -> failwith "emitMethodBody: metadata only" let convCustomAttr cenv emEnv cattr = let methInfo = @@ -1422,7 +1447,7 @@ let buildGenParamsPass1b cenv emEnv (genArgs : Type array) (gps : ILGenericParam let gpB = genpBs.[i] // the Constraints are either the parent (base) type or interfaces. let constraintTs = convTypes cenv emEnv gp.Constraints - let interfaceTs, baseTs = List.partition (fun (typ:System.Type) -> typ.IsInterface) constraintTs + let interfaceTs, baseTs = List.partition (fun (ty:System.Type) -> ty.IsInterface) constraintTs // set base type constraint (match baseTs with [ ] -> () // Q: should a baseType be set? It is in some samples. Should this be a failure case? @@ -1430,7 +1455,7 @@ let buildGenParamsPass1b cenv emEnv (genArgs : Type array) (gps : ILGenericParam | _ -> failwith "buildGenParam: multiple base types" ); // set interface constraints (interfaces that instances of gp must meet) - gpB.SetInterfaceConstraints(Array.ofList interfaceTs); + gpB.SetInterfaceConstraints(Array.ofList interfaceTs) gp.CustomAttrs |> emitCustomAttrs cenv emEnv (wrapCustomAttr gpB.SetCustomAttribute) let flags = GenericParameterAttributes.None @@ -1451,7 +1476,7 @@ let buildGenParamsPass1b cenv emEnv (genArgs : Type array) (gps : ILGenericParam //---------------------------------------------------------------------------- let emitParameter cenv emEnv (defineParameter : int * ParameterAttributes * string -> ParameterBuilder) i (param: ILParameter) = - // -Type: typ; + // -Type: ty; // -Default: ILFieldInit option; // -Marshal: NativeType option; (* Marshalling map for parameters. COM Interop only. *) let attrs = flagsIf param.IsIn ParameterAttributes.In ||| @@ -1465,73 +1490,21 @@ let emitParameter cenv emEnv (defineParameter : int * ParameterAttributes * stri let parB = defineParameter(i, attrs, name) emitCustomAttrs cenv emEnv (wrapCustomAttr parB.SetCustomAttribute) param.CustomAttrs -//---------------------------------------------------------------------------- -// convMethodAttributes -//---------------------------------------------------------------------------- - -let convMethodAttributes (mdef: ILMethodDef) = - let attrKind = - match mdef.mdKind with - | MethodKind.Static -> MethodAttributes.Static - | MethodKind.Cctor -> MethodAttributes.Static - | MethodKind.Ctor -> enum 0 - | MethodKind.NonVirtual -> enum 0 - | MethodKind.Virtual vinfo -> MethodAttributes.Virtual ||| - flagsIf vinfo.IsNewSlot MethodAttributes.NewSlot ||| - flagsIf vinfo.IsFinal MethodAttributes.Final ||| - flagsIf vinfo.IsCheckAccessOnOverride MethodAttributes.CheckAccessOnOverride ||| - flagsIf vinfo.IsAbstract MethodAttributes.Abstract - - let attrAccess = - match mdef.Access with - | ILMemberAccess.Assembly -> MethodAttributes.Assembly - | ILMemberAccess.CompilerControlled -> failwith "Method access compiler controled." - | ILMemberAccess.FamilyAndAssembly -> MethodAttributes.FamANDAssem - | ILMemberAccess.FamilyOrAssembly -> MethodAttributes.FamORAssem - | ILMemberAccess.Family -> MethodAttributes.Family - | ILMemberAccess.Private -> MethodAttributes.Private - | ILMemberAccess.Public -> MethodAttributes.Public - - let attrOthers = flagsIf mdef.HasSecurity MethodAttributes.HasSecurity ||| - flagsIf mdef.IsSpecialName MethodAttributes.SpecialName ||| - flagsIf mdef.IsHideBySig MethodAttributes.HideBySig ||| - flagsIf mdef.IsReqSecObj MethodAttributes.RequireSecObject - - attrKind ||| attrAccess ||| attrOthers - -let convMethodImplFlags mdef = - (match mdef.mdCodeKind with - | MethodCodeKind.Native -> MethodImplAttributes.Native - | MethodCodeKind.Runtime -> MethodImplAttributes.Runtime - | MethodCodeKind.IL -> MethodImplAttributes.IL) - ||| flagsIf mdef.IsInternalCall MethodImplAttributes.InternalCall - ||| (if mdef.IsManaged then MethodImplAttributes.Managed else MethodImplAttributes.Unmanaged) - ||| flagsIf mdef.IsForwardRef MethodImplAttributes.ForwardRef - ||| flagsIf mdef.IsPreserveSig MethodImplAttributes.PreserveSig - ||| flagsIf mdef.IsSynchronized MethodImplAttributes.Synchronized - ||| flagsIf (match mdef.mdBody.Contents with MethodBody.IL b -> b.NoInlining | _ -> false) MethodImplAttributes.NoInlining - ||| flagsIf (match mdef.mdBody.Contents with MethodBody.IL b -> b.AggressiveInlining | _ -> false) MethodImplAttributes.AggressiveInlining - //---------------------------------------------------------------------------- // buildMethodPass2 //---------------------------------------------------------------------------- let rec buildMethodPass2 cenv tref (typB:TypeBuilder) emEnv (mdef : ILMethodDef) = - let attrs = convMethodAttributes mdef - let implflags = convMethodImplFlags mdef + let attrs = mdef.Attributes + let implflags = mdef.ImplAttributes let cconv = convCallConv mdef.CallingConv let mref = mkRefToILMethod (tref, mdef) - let emEnv = if mdef.IsEntryPoint && isNil mdef.ParameterTypes then - (* Bug 2209: - Here, we collect the entry points generated by ilxgen corresponding to the top-level effects. - Users can (now) annotate their own functions with EntryPoint attributes. - However, these user entry points functions must take string[] argument. - By only adding entry points with no arguments, we only collect the top-level effects. - *) - envAddEntryPt emEnv (typB, mdef.Name) - else - emEnv - match mdef.mdBody.Contents with + let emEnv = + if mdef.IsEntryPoint && isNil mdef.ParameterTypes then + envAddEntryPt emEnv (typB, mdef.Name) + else + emEnv + match mdef.Body.Contents with #if !FX_RESHAPED_REFEMIT | MethodBody.PInvoke p -> let argtys = convTypesToArray cenv emEnv mdef.ParameterTypes @@ -1555,17 +1528,7 @@ let rec buildMethodPass2 cenv tref (typB:TypeBuilder) emEnv (mdef : ILMethodDef) (* p.CharBestFit *) (* p.NoMangle *) - let methB = typB.DefinePInvokeMethod(mdef.Name, - p.Where.Name, - p.Name, - attrs, - cconv, - rty, - null, null, - argtys, - null, null, - pcc, - pcs) + let methB = typB.DefinePInvokeMethod(mdef.Name, p.Where.Name, p.Name, attrs, cconv, rty, null, null, argtys, null, null, pcc, pcs) methB.SetImplementationFlagsAndLog(implflags); envBindMethodRef emEnv mref methB #endif @@ -1586,11 +1549,22 @@ let rec buildMethodPass2 cenv tref (typB:TypeBuilder) emEnv (mdef : ILMethodDef) let genArgs = getGenericArgumentsOfMethod methB let emEnv = envPushTyvars emEnv (Array.append (getGenericArgumentsOfType (typB.AsType())) genArgs) buildGenParamsPass1b cenv emEnv genArgs mdef.GenericParams; + // Set parameter and return types (may depend on generic args) - methB.SetParametersAndLog(convTypesToArray cenv emEnv mdef.ParameterTypes); - methB.SetReturnTypeAndLog(convType cenv emEnv mdef.Return.Type); + let parameterTypes = convTypesToArray cenv emEnv mdef.ParameterTypes + let parameterTypeRequiredCustomModifiers,parameterTypeOptionalCustomModifiers = + mdef.Parameters + |> List.toArray + |> Array.map (convParamModifiers cenv emEnv) + |> Array.unzip + + let returnTypeRequiredCustomModifiers, returnTypeOptionalCustomModifiers = mdef.Return |> convReturnModifiers cenv emEnv + let returnType = convType cenv emEnv mdef.Return.Type + + methB.SetSignatureAndLog(returnType, returnTypeRequiredCustomModifiers, returnTypeOptionalCustomModifiers, parameterTypes, parameterTypeRequiredCustomModifiers,parameterTypeOptionalCustomModifiers); + let emEnv = envPopTyvars emEnv - methB.SetImplementationFlagsAndLog(implflags); + methB.SetImplementationFlagsAndLog(implflags) envBindMethodRef emEnv mref methB @@ -1601,7 +1575,7 @@ let rec buildMethodPass2 cenv tref (typB:TypeBuilder) emEnv (mdef : ILMethodDef) let rec buildMethodPass3 cenv tref modB (typB:TypeBuilder) emEnv (mdef : ILMethodDef) = let mref = mkRefToILMethod (tref, mdef) let isPInvoke = - match mdef.mdBody.Contents with + match mdef.Body.Contents with | MethodBody.PInvoke _p -> true | _ -> false match mdef.Name with @@ -1613,7 +1587,7 @@ let rec buildMethodPass3 cenv tref modB (typB:TypeBuilder) emEnv (mdef : ILMetho let defineParameter (i, attr, name) = consB.DefineParameterAndLog(i+1, attr, name) mdef.Parameters |> List.iteri (emitParameter cenv emEnv defineParameter); // Body - emitMethodBody cenv modB emEnv consB.GetILGenerator mdef.Name mdef.mdBody; + emitMethodBody cenv modB emEnv consB.GetILGenerator mdef.Name mdef.Body; emitCustomAttrs cenv emEnv (wrapCustomAttr consB.SetCustomAttribute) mdef.CustomAttrs; () | _name -> @@ -1634,7 +1608,7 @@ let rec buildMethodPass3 cenv tref modB (typB:TypeBuilder) emEnv (mdef : ILMetho mdef.Parameters |> List.iteri (fun a b -> emitParameter cenv emEnv defineParameter a b); // Body if not isPInvoke then - emitMethodBody cenv modB emEnv methB.GetILGeneratorAndLog mdef.Name mdef.mdBody; + emitMethodBody cenv modB emEnv methB.GetILGeneratorAndLog mdef.Name mdef.Body; let emEnv = envPopTyvars emEnv // case fold later... emitCustomAttrs cenv emEnv methB.SetCustomAttributeAndLog mdef.CustomAttrs @@ -1644,23 +1618,8 @@ let rec buildMethodPass3 cenv tref modB (typB:TypeBuilder) emEnv (mdef : ILMetho let buildFieldPass2 cenv tref (typB:TypeBuilder) emEnv (fdef : ILFieldDef) = - (*{ -Data: bytes option; - -Marshal: NativeType option; *) - let attrsAccess = match fdef.Access with - | ILMemberAccess.Assembly -> FieldAttributes.Assembly - | ILMemberAccess.CompilerControlled -> failwith "Field access compiler controled." - | ILMemberAccess.FamilyAndAssembly -> FieldAttributes.FamANDAssem - | ILMemberAccess.FamilyOrAssembly -> FieldAttributes.FamORAssem - | ILMemberAccess.Family -> FieldAttributes.Family - | ILMemberAccess.Private -> FieldAttributes.Private - | ILMemberAccess.Public -> FieldAttributes.Public - let attrsOther = flagsIf fdef.IsStatic FieldAttributes.Static ||| - flagsIf fdef.IsSpecialName FieldAttributes.SpecialName ||| - flagsIf fdef.IsLiteral FieldAttributes.Literal ||| - flagsIf fdef.IsInitOnly FieldAttributes.InitOnly ||| - flagsIf fdef.NotSerialized FieldAttributes.NotSerialized - let attrs = attrsAccess ||| attrsOther - let fieldT = convType cenv emEnv fdef.Type + let attrs = fdef.Attributes + let fieldT = convType cenv emEnv fdef.FieldType let fieldB = match fdef.Data with | Some d -> typB.DefineInitializedData(fdef.Name, d, attrs) @@ -1687,11 +1646,11 @@ let buildFieldPass2 cenv tref (typB:TypeBuilder) emEnv (fdef : ILFieldDef) = fdef.Offset |> Option.iter (fun offset -> fieldB.SetOffset(offset)); // custom attributes: done on pass 3 as they may reference attribute constructors generated on // pass 2. - let fref = mkILFieldRef (tref, fdef.Name, fdef.Type) + let fref = mkILFieldRef (tref, fdef.Name, fdef.FieldType) envBindFieldRef emEnv fref fieldB let buildFieldPass3 cenv tref (_typB:TypeBuilder) emEnv (fdef : ILFieldDef) = - let fref = mkILFieldRef (tref, fdef.Name, fdef.Type) + let fref = mkILFieldRef (tref, fdef.Name, fdef.FieldType) let fieldB = envGetFieldB emEnv fref emitCustomAttrs cenv emEnv (wrapCustomAttr fieldB.SetCustomAttribute) fdef.CustomAttrs @@ -1703,7 +1662,7 @@ let buildPropertyPass2 cenv tref (typB:TypeBuilder) emEnv (prop : ILPropertyDef) let attrs = flagsIf prop.IsRTSpecialName PropertyAttributes.RTSpecialName ||| flagsIf prop.IsSpecialName PropertyAttributes.SpecialName - let propB = typB.DefinePropertyAndLog(prop.Name, attrs, convType cenv emEnv prop.Type, convTypesToArray cenv emEnv prop.Args) + let propB = typB.DefinePropertyAndLog(prop.Name, attrs, convType cenv emEnv prop.PropertyType, convTypesToArray cenv emEnv prop.Args) prop.SetMethod |> Option.iter (fun mref -> propB.SetSetMethod(envGetMethB emEnv mref)); prop.GetMethod |> Option.iter (fun mref -> propB.SetGetMethod(envGetMethB emEnv mref)); @@ -1726,8 +1685,8 @@ let buildPropertyPass3 cenv tref (_typB:TypeBuilder) emEnv (prop : ILPropertyDef let buildEventPass3 cenv (typB:TypeBuilder) emEnv (eventDef : ILEventDef) = let attrs = flagsIf eventDef.IsSpecialName EventAttributes.SpecialName ||| flagsIf eventDef.IsRTSpecialName EventAttributes.RTSpecialName - assert eventDef.Type.IsSome - let eventB = typB.DefineEventAndLog(eventDef.Name, attrs, convType cenv emEnv eventDef.Type.Value) + assert eventDef.EventType.IsSome + let eventB = typB.DefineEventAndLog(eventDef.Name, attrs, convType cenv emEnv eventDef.EventType.Value) eventDef.AddMethod |> (fun mref -> eventB.SetAddOnMethod(envGetMethB emEnv mref)); eventDef.RemoveMethod |> (fun mref -> eventB.SetRemoveOnMethod(envGetMethB emEnv mref)); @@ -1767,7 +1726,7 @@ let typeAttrbutesOfTypeAccess x = | ILTypeDefAccess.Nested macc -> match macc with | ILMemberAccess.Assembly -> TypeAttributes.NestedAssembly - | ILMemberAccess.CompilerControlled -> failwith "Nested compiler controled." + | ILMemberAccess.CompilerControlled -> failwith "Nested compiler controled." | ILMemberAccess.FamilyAndAssembly -> TypeAttributes.NestedFamANDAssem | ILMemberAccess.FamilyOrAssembly -> TypeAttributes.NestedFamORAssem | ILMemberAccess.Family -> TypeAttributes.NestedFamily @@ -1796,9 +1755,9 @@ let typeAttributesOfTypeLayout cenv emEnv x = (p.Size |> Option.toList |> List.map (fun x -> ("Size", cenv.ilg.typ_Int32, false, ILAttribElem.Int32 x)))))) | _ -> None match x with - | ILTypeDefLayout.Auto -> TypeAttributes.AutoLayout, None - | ILTypeDefLayout.Explicit p -> TypeAttributes.ExplicitLayout, (attr 0x02 p) - | ILTypeDefLayout.Sequential p -> TypeAttributes.SequentialLayout, (attr 0x00 p) + | ILTypeDefLayout.Auto -> None + | ILTypeDefLayout.Explicit p -> (attr 0x02 p) + | ILTypeDefLayout.Sequential p -> (attr 0x00 p) //---------------------------------------------------------------------------- @@ -1810,17 +1769,9 @@ let rec buildTypeDefPass1 cenv emEnv (modB:ModuleBuilder) rootTypeBuilder nestin // -SecurityDecls: Permissions; // -InitSemantics: ILTypeInit; // TypeAttributes - let attrsKind = typeAttrbutesOfTypeDefKind tdef.tdKind - let attrsAccess = typeAttrbutesOfTypeAccess tdef.Access - let attrsLayout, cattrsLayout = typeAttributesOfTypeLayout cenv emEnv tdef.Layout - let attrsEnc = typeAttributesOfTypeEncoding tdef.Encoding - let attrsOther = flagsIf tdef.IsAbstract TypeAttributes.Abstract ||| - flagsIf tdef.IsSealed TypeAttributes.Sealed ||| - flagsIf tdef.IsSerializable TypeAttributes.Serializable ||| - flagsIf tdef.IsSpecialName TypeAttributes.SpecialName ||| - flagsIf tdef.HasSecurity TypeAttributes.HasSecurity + let cattrsLayout = typeAttributesOfTypeLayout cenv emEnv tdef.Layout - let attrsType = attrsKind ||| attrsAccess ||| attrsLayout ||| attrsEnc ||| attrsOther + let attrsType = tdef.Attributes // TypeBuilder from TypeAttributes. let typB : TypeBuilder = rootTypeBuilder (tdef.Name, attrsType) @@ -1855,7 +1806,7 @@ let rec buildTypeDefPass1b cenv nesting emEnv (tdef : ILTypeDef) = let genArgs = getGenericArgumentsOfType (typB.AsType()) let emEnv = envPushTyvars emEnv genArgs // Parent may reference types being defined, so has to come after it's Pass1 creation - tdef.Extends |> Option.iter (fun typ -> typB.SetParentAndLog(convType cenv emEnv typ)); + tdef.Extends |> Option.iter (fun ty -> typB.SetParentAndLog(convType cenv emEnv ty)); // build constraints on ILGenericParameterDefs. Constraints may reference types being defined, // so have to come after all types are created buildGenParamsPass1b cenv emEnv genArgs tdef.GenericParams; @@ -1953,8 +1904,8 @@ let getEnclosingTypeRefs (tref:ILTypeRef) = type CollectTypes = ValueTypesOnly | All // Find all constituent type references -let rec getTypeRefsInType (allTypes: CollectTypes) typ acc = - match typ with +let rec getTypeRefsInType (allTypes: CollectTypes) ty acc = + match ty with | ILType.Void | ILType.TypeVar _ -> acc | ILType.Ptr eltType | ILType.Byref eltType -> @@ -1979,38 +1930,38 @@ let verbose2 = false let createTypeRef (visited : Dictionary<_, _>, created : Dictionary<_, _>) emEnv tref = let rec traverseTypeDef (tref:ILTypeRef) (tdef:ILTypeDef) = - if verbose2 then dprintf "buildTypeDefPass4: Creating Enclosing Types of %s\n" tdef.Name; + if verbose2 then dprintf "buildTypeDefPass4: Creating Enclosing Types of %s\n" tdef.Name for enc in getEnclosingTypeRefs tref do traverseTypeRef enc // WORKAROUND (ProductStudio FSharp 1.0 bug 615): the constraints on generic method parameters // are resolved overly eagerly by reflection emit's CreateType. - if verbose2 then dprintf "buildTypeDefPass4: Doing type typar constraints of %s\n" tdef.Name; + if verbose2 then dprintf "buildTypeDefPass4: Doing type typar constraints of %s\n" tdef.Name for gp in tdef.GenericParams do for cx in gp.Constraints do traverseType CollectTypes.All cx - if verbose2 then dprintf "buildTypeDefPass4: Doing method constraints of %s\n" tdef.Name; + if verbose2 then dprintf "buildTypeDefPass4: Doing method constraints of %s\n" tdef.Name for md in tdef.Methods.AsList do for gp in md.GenericParams do for cx in gp.Constraints do traverseType CollectTypes.All cx // We absolutely need the exact parent type... - if verbose2 then dprintf "buildTypeDefPass4: Creating Super Class Chain of %s\n" tdef.Name; + if verbose2 then dprintf "buildTypeDefPass4: Creating Super Class Chain of %s\n" tdef.Name tdef.Extends |> Option.iter (traverseType CollectTypes.All) // We absolutely need the exact interface types... - if verbose2 then dprintf "buildTypeDefPass4: Creating Interface Chain of %s\n" tdef.Name; + if verbose2 then dprintf "buildTypeDefPass4: Creating Interface Chain of %s\n" tdef.Name tdef.Implements |> List.iter (traverseType CollectTypes.All) - if verbose2 then dprintf "buildTypeDefPass4: Do value types in fields of %s\n" tdef.Name; - tdef.Fields.AsList |> List.iter (fun fd -> traverseType CollectTypes.ValueTypesOnly fd.Type) + if verbose2 then dprintf "buildTypeDefPass4: Do value types in fields of %s\n" tdef.Name + tdef.Fields.AsList |> List.iter (fun fd -> traverseType CollectTypes.ValueTypesOnly fd.FieldType) if verbose2 then dprintf "buildTypeDefPass4: Done with dependencies of %s\n" tdef.Name - and traverseType allTypes typ = - getTypeRefsInType allTypes typ [] + and traverseType allTypes ty = + getTypeRefsInType allTypes ty [] |> List.filter (isEmittedTypeRef emEnv) |> List.iter traverseTypeRef @@ -2109,8 +2060,11 @@ let buildModuleFragment cenv emEnv (asmB : AssemblyBuilder) (modB : ModuleBuilde m.Resources.AsList |> List.iter (fun r -> let attribs = (match r.Access with ILResourceAccess.Public -> ResourceAttributes.Public | ILResourceAccess.Private -> ResourceAttributes.Private) match r.Location with - | ILResourceLocation.Local bf -> - modB.DefineManifestResourceAndLog(r.Name, new System.IO.MemoryStream(bf()), attribs) + | ILResourceLocation.LocalIn (file, start, len) -> + let bytes = FileSystem.ReadAllBytesShim(file).[start .. start + len - 1] + modB.DefineManifestResourceAndLog(r.Name, new System.IO.MemoryStream(bytes), attribs) + | ILResourceLocation.LocalOut bytes -> + modB.DefineManifestResourceAndLog(r.Name, new System.IO.MemoryStream(bytes), attribs) | ILResourceLocation.File (mr, _) -> asmB.AddResourceFileAndLog(r.Name, mr.Name, attribs) | ILResourceLocation.Assembly _ -> @@ -2136,7 +2090,7 @@ let defineDynamicAssemblyAndLog(asmName, flags, asmDir:string) = asmB let mkDynamicAssemblyAndModule (assemblyName, optimize, debugInfo, collectible) = - let filename = assemblyName ^ ".dll" + let filename = assemblyName + ".dll" let asmDir = "." let asmName = new AssemblyName() asmName.Name <- assemblyName; @@ -2192,7 +2146,7 @@ let emitModuleFragment (ilg, emEnv, asmB : AssemblyBuilder, modB : ModuleBuilder // Once the emitted type is created this typT is updated to ensure it is the Type proper. // So Type lookup will return the proper Type not TypeBuilder. let LookupTypeRef cenv emEnv tref = convCreatedTypeRef cenv emEnv tref -let LookupType cenv emEnv typ = convCreatedType cenv emEnv typ +let LookupType cenv emEnv ty = convCreatedType cenv emEnv ty // Lookups of ILFieldRef and MethodRef may require a similar non-Builder-fixup post Type-creation. let LookupFieldRef emEnv fref = Zmap.tryFind fref emEnv.emFieldMap |> Option.map (fun fieldBuilder -> fieldBuilder :> FieldInfo) diff --git a/src/absil/ilsupp.fs b/src/absil/ilsupp.fs index 66a1a6aa161..fb4e3a58fdd 100644 --- a/src/absil/ilsupp.fs +++ b/src/absil/ilsupp.fs @@ -600,11 +600,11 @@ let linkNativeResources (unlinkedResources:byte[] list) (ulLinkedResourceBaseRV if outputFilePath = "" then [ FileSystem.GetTempPathShim() ] else - [ FileSystem.GetTempPathShim() ; (outputFilePath ^ "\\") ] + [ FileSystem.GetTempPathShim() ; (outputFilePath + "\\") ] // Get a unique random file let rec GetUniqueRandomFileName(path) = - let tfn = path ^ System.IO.Path.GetRandomFileName() + let tfn = path + System.IO.Path.GetRandomFileName() if FileSystem.SafeExists(tfn) then GetUniqueRandomFileName(path) else @@ -614,7 +614,7 @@ let linkNativeResources (unlinkedResources:byte[] list) (ulLinkedResourceBaseRV let machine = if 2 = nPEFileType then "X64" else "X86" let cmdLineArgsPreamble = sprintf "/NOLOGO /READONLY /MACHINE:%s" machine - let cvtres = corSystemDir^"cvtres.exe " + let cvtres = corSystemDir + "cvtres.exe " let createCvtresArgs path = let tempObjFileName = GetUniqueRandomFileName(path) @@ -624,7 +624,7 @@ let linkNativeResources (unlinkedResources:byte[] list) (ulLinkedResourceBaseRV for _ulr in unlinkedResources do let tempResFileName = GetUniqueRandomFileName(path) resFiles <- tempResFileName :: resFiles ; - cmdLineArgs <- cmdLineArgs ^ " \"" ^ tempResFileName ^ "\"" + cmdLineArgs <- cmdLineArgs + " \"" + tempResFileName + "\"" let trf = resFiles let cmd = cmdLineArgs cmd,tempObjFileName,trf @@ -641,7 +641,7 @@ let linkNativeResources (unlinkedResources:byte[] list) (ulLinkedResourceBaseRV tempResFiles <- files (invoc,tmp,files) - let cvtresInvocation = cvtres ^ cmdLineArgs + let cvtresInvocation = cvtres + cmdLineArgs try let mutable iFiles = 0 diff --git a/src/absil/ilwrite.fs b/src/absil/ilwrite.fs index 81fcf5be8ae..d28348bf860 100644 --- a/src/absil/ilwrite.fs +++ b/src/absil/ilwrite.fs @@ -404,10 +404,10 @@ type UnsharedRow(elems: RowElement[]) = // This lets us translate AbsIL type variable number to IL type variable numbering type ILTypeWriterEnv = { EnclosingTyparCount: int } let envForTypeDef (td:ILTypeDef) = { EnclosingTyparCount=td.GenericParams.Length } -let envForMethodRef env (typ:ILType) = { EnclosingTyparCount=(match typ with ILType.Array _ -> env.EnclosingTyparCount | _ -> typ.GenericArgs.Length) } +let envForMethodRef env (ty:ILType) = { EnclosingTyparCount=(match ty with ILType.Array _ -> env.EnclosingTyparCount | _ -> ty.GenericArgs.Length) } let envForNonGenericMethodRef _mref = { EnclosingTyparCount=System.Int32.MaxValue } -let envForFieldSpec (fspec:ILFieldSpec) = { EnclosingTyparCount=fspec.EnclosingType.GenericArgs.Length } -let envForOverrideSpec (ospec:ILOverridesSpec) = { EnclosingTyparCount=ospec.EnclosingType.GenericArgs.Length } +let envForFieldSpec (fspec:ILFieldSpec) = { EnclosingTyparCount=fspec.DeclaringType.GenericArgs.Length } +let envForOverrideSpec (ospec:ILOverridesSpec) = { EnclosingTyparCount=ospec.DeclaringType.GenericArgs.Length } //--------------------------------------------------------------------- // TABLES @@ -587,6 +587,7 @@ type cenv = blobs: MetadataTable strings: MetadataTable userStrings: MetadataTable + normalizeAssemblyRefs: ILAssemblyRef -> ILAssemblyRef } member cenv.GetTable (tab:TableName) = cenv.tables.[tab.Index] @@ -714,9 +715,9 @@ let rec GetAssemblyRefAsRow cenv (aref:ILAssemblyRef) = StringIndex (GetStringHeapIdx cenv aref.Name), StringIndex (match aref.Locale with None -> 0 | Some s -> GetStringHeapIdx cenv s), BlobIndex (match aref.Hash with None -> 0 | Some s -> GetBytesAsBlobIdx cenv s)) - + and GetAssemblyRefAsIdx cenv aref = - FindOrAddSharedRow cenv TableNames.AssemblyRef (GetAssemblyRefAsRow cenv aref) + FindOrAddSharedRow cenv TableNames.AssemblyRef (GetAssemblyRefAsRow cenv (cenv.normalizeAssemblyRefs aref)) and GetModuleRefAsRow cenv (mref:ILModuleRef) = SharedRow @@ -740,7 +741,7 @@ and GetModuleRefAsFileIdx cenv mref = let isScopeRefLocal scoref = (scoref = ILScopeRef.Local) let isTypeRefLocal (tref:ILTypeRef) = isScopeRefLocal tref.Scope -let isTypeLocal (typ:ILType) = typ.IsNominal && isNil typ.GenericArgs && isTypeRefLocal typ.TypeRef +let isTypeLocal (ty:ILType) = ty.IsNominal && isNil ty.GenericArgs && isTypeRefLocal ty.TypeRef // -------------------------------------------------------------------- // Scopes to Implementation elements. @@ -866,23 +867,23 @@ and EmitType cenv env bb ty = // REVIEW: what are these doing here? | ILType.Value tspec when tspec.Name = "System.String" -> bb.EmitByte et_STRING | ILType.Value tspec when tspec.Name = "System.Object" -> bb.EmitByte et_OBJECT - | typ when isILSByteTy typ -> bb.EmitByte et_I1 - | typ when isILInt16Ty typ -> bb.EmitByte et_I2 - | typ when isILInt32Ty typ -> bb.EmitByte et_I4 - | typ when isILInt64Ty typ -> bb.EmitByte et_I8 - | typ when isILByteTy typ -> bb.EmitByte et_U1 - | typ when isILUInt16Ty typ -> bb.EmitByte et_U2 - | typ when isILUInt32Ty typ -> bb.EmitByte et_U4 - | typ when isILUInt64Ty typ -> bb.EmitByte et_U8 - | typ when isILDoubleTy typ -> bb.EmitByte et_R8 - | typ when isILSingleTy typ -> bb.EmitByte et_R4 - | typ when isILBoolTy typ -> bb.EmitByte et_BOOLEAN - | typ when isILCharTy typ -> bb.EmitByte et_CHAR - | typ when isILStringTy typ -> bb.EmitByte et_STRING - | typ when isILObjectTy typ -> bb.EmitByte et_OBJECT - | typ when isILIntPtrTy typ -> bb.EmitByte et_I - | typ when isILUIntPtrTy typ -> bb.EmitByte et_U - | typ when isILTypedReferenceTy typ -> bb.EmitByte et_TYPEDBYREF + | ty when isILSByteTy ty -> bb.EmitByte et_I1 + | ty when isILInt16Ty ty -> bb.EmitByte et_I2 + | ty when isILInt32Ty ty -> bb.EmitByte et_I4 + | ty when isILInt64Ty ty -> bb.EmitByte et_I8 + | ty when isILByteTy ty -> bb.EmitByte et_U1 + | ty when isILUInt16Ty ty -> bb.EmitByte et_U2 + | ty when isILUInt32Ty ty -> bb.EmitByte et_U4 + | ty when isILUInt64Ty ty -> bb.EmitByte et_U8 + | ty when isILDoubleTy ty -> bb.EmitByte et_R8 + | ty when isILSingleTy ty -> bb.EmitByte et_R4 + | ty when isILBoolTy ty -> bb.EmitByte et_BOOLEAN + | ty when isILCharTy ty -> bb.EmitByte et_CHAR + | ty when isILStringTy ty -> bb.EmitByte et_STRING + | ty when isILObjectTy ty -> bb.EmitByte et_OBJECT + | ty when isILIntPtrTy ty -> bb.EmitByte et_I + | ty when isILUIntPtrTy ty -> bb.EmitByte et_U + | ty when isILTypedReferenceTy ty -> bb.EmitByte et_TYPEDBYREF | ILType.Boxed tspec -> EmitTypeSpec cenv env bb (et_CLASS, tspec) | ILType.Value tspec -> EmitTypeSpec cenv env bb (et_VALUETYPE, tspec) @@ -898,12 +899,12 @@ and EmitType cenv env bb ty = bb.EmitByte et_MVAR bb.EmitZ32 (int32 tv - cgparams) - | ILType.Byref typ -> + | ILType.Byref ty -> bb.EmitByte et_BYREF - EmitType cenv env bb typ - | ILType.Ptr typ -> + EmitType cenv env bb ty + | ILType.Ptr ty -> bb.EmitByte et_PTR - EmitType cenv env bb typ + EmitType cenv env bb ty | ILType.Void -> bb.EmitByte et_VOID | ILType.FunctionPointer x -> @@ -1069,11 +1070,11 @@ and GetFieldInitFlags i = // -------------------------------------------------------------------- let GetMemberAccessFlags access = - match access with - | ILMemberAccess.CompilerControlled -> 0x00000000 + match access with | ILMemberAccess.Public -> 0x00000006 | ILMemberAccess.Private -> 0x00000001 | ILMemberAccess.Family -> 0x00000004 + | ILMemberAccess.CompilerControlled -> 0x00000000 | ILMemberAccess.FamilyAndAssembly -> 0x00000002 | ILMemberAccess.FamilyOrAssembly -> 0x00000005 | ILMemberAccess.Assembly -> 0x00000003 @@ -1085,47 +1086,17 @@ let GetTypeAccessFlags access = | ILTypeDefAccess.Nested ILMemberAccess.Public -> 0x00000002 | ILTypeDefAccess.Nested ILMemberAccess.Private -> 0x00000003 | ILTypeDefAccess.Nested ILMemberAccess.Family -> 0x00000004 + | ILTypeDefAccess.Nested ILMemberAccess.CompilerControlled -> failwith "bad type acccess" | ILTypeDefAccess.Nested ILMemberAccess.FamilyAndAssembly -> 0x00000006 | ILTypeDefAccess.Nested ILMemberAccess.FamilyOrAssembly -> 0x00000007 | ILTypeDefAccess.Nested ILMemberAccess.Assembly -> 0x00000005 - | ILTypeDefAccess.Nested ILMemberAccess.CompilerControlled -> failwith "bad type acccess" let rec GetTypeDefAsRow cenv env _enc (td:ILTypeDef) = let nselem, nelem = GetTypeNameAsElemPair cenv td.Name let flags = if (isTypeNameForGlobalFunctions td.Name) then 0x00000000 else - - GetTypeAccessFlags td.Access ||| - begin - match td.Layout with - | ILTypeDefLayout.Auto -> 0x00000000 - | ILTypeDefLayout.Sequential _ -> 0x00000008 - | ILTypeDefLayout.Explicit _ -> 0x00000010 - end ||| - begin - match td.tdKind with - | ILTypeDefKind.Interface -> 0x00000020 - | _ -> 0x00000000 - end ||| - (if td.IsAbstract then 0x00000080l else 0x00000000) ||| - (if td.IsSealed then 0x00000100l else 0x00000000) ||| - (if td.IsComInterop then 0x00001000l else 0x00000000) ||| - (if td.IsSerializable then 0x00002000l else 0x00000000) ||| - begin - match td.Encoding with - | ILDefaultPInvokeEncoding.Ansi -> 0x00000000 - | ILDefaultPInvokeEncoding.Auto -> 0x00020000 - | ILDefaultPInvokeEncoding.Unicode -> 0x00010000 - end ||| - begin - match td.InitSemantics with - | ILTypeInit.BeforeField when not (match td.tdKind with ILTypeDefKind.Interface -> true | _ -> false) -> 0x00100000 - | _ -> 0x00000000 - end ||| - (if td.IsSpecialName then 0x00000400 else 0x00000000) ||| - // @REVIEW (if rtspecialname_of_tdef td then 0x00000800 else 0x00000000) ||| - (if td.HasSecurity || not td.SecurityDecls.AsList.IsEmpty then 0x00040000 else 0x00000000) + int td.Attributes let tdorTag, tdorRow = GetTypeOptionAsTypeDefOrRef cenv env td.Extends UnsharedRow @@ -1152,7 +1123,7 @@ and GetTypeDefAsEventMapRow cenv tidx = SimpleIndex (TableNames.Event, cenv.eventDefs.Count + 1) |] and GetKeyForFieldDef tidx (fd: ILFieldDef) = - FieldDefKey (tidx, fd.Name, fd.Type) + FieldDefKey (tidx, fd.Name, fd.FieldType) and GenFieldDefPass2 cenv tidx fd = ignore (cenv.fieldDefs.AddUniqueEntry "field" (fun (fdkey:FieldDefKey) -> fdkey.Name) (GetKeyForFieldDef tidx fd)) @@ -1176,7 +1147,7 @@ and GenMethodDefPass2 cenv tidx md = cenv.methodDefIdxs.[md] <- idx and GetKeyForPropertyDef tidx (x: ILPropertyDef) = - PropKey (tidx, x.Name, x.Type, x.Args) + PropKey (tidx, x.Name, x.PropertyType, x.Args) and GenPropertyDefPass2 cenv tidx x = ignore (cenv.propertyDefs.AddUniqueEntry "property" (fun (PropKey (_, n, _, _)) -> n) (GetKeyForPropertyDef tidx x)) @@ -1285,7 +1256,7 @@ and GetFieldDefAsFieldDefIdx cenv tidx fd = // -------------------------------------------------------------------- let GetMethodRefAsMethodDefIdx cenv (mref:ILMethodRef) = - let tref = mref.EnclosingTypeRef + let tref = mref.DeclaringTypeRef try if not (isTypeRefLocal tref) then failwithf "method referred to by method impl, event or property is not in a type defined in this module, method ref is %A" mref @@ -1295,22 +1266,22 @@ let GetMethodRefAsMethodDefIdx cenv (mref:ILMethodRef) = with e -> failwithf "Error in GetMethodRefAsMethodDefIdx for mref = %A, error: %s" (mref.Name, tref.Name) e.Message -let rec MethodRefInfoAsMemberRefRow cenv env fenv (nm, typ, callconv, args, ret, varargs, genarity) = - MemberRefRow(GetTypeAsMemberRefParent cenv env typ, +let rec MethodRefInfoAsMemberRefRow cenv env fenv (nm, ty, callconv, args, ret, varargs, genarity) = + MemberRefRow(GetTypeAsMemberRefParent cenv env ty, GetStringHeapIdx cenv nm, GetMethodRefInfoAsBlobIdx cenv fenv (callconv, args, ret, varargs, genarity)) and GetMethodRefInfoAsBlobIdx cenv env info = GetBytesAsBlobIdx cenv (GetCallsigAsBytes cenv env info) -let GetMethodRefInfoAsMemberRefIdx cenv env ((_, typ, _, _, _, _, _) as minfo) = - let fenv = envForMethodRef env typ +let GetMethodRefInfoAsMemberRefIdx cenv env ((_, ty, _, _, _, _, _) as minfo) = + let fenv = envForMethodRef env ty FindOrAddSharedRow cenv TableNames.MemberRef (MethodRefInfoAsMemberRefRow cenv env fenv minfo) -let GetMethodRefInfoAsMethodRefOrDef isAlwaysMethodDef cenv env ((nm, typ:ILType, cc, args, ret, varargs, genarity) as minfo) = - if Option.isNone varargs && (isAlwaysMethodDef || isTypeLocal typ) then - if not typ.IsNominal then failwith "GetMethodRefInfoAsMethodRefOrDef: unexpected local tref-typ" - try (mdor_MethodDef, GetMethodRefAsMethodDefIdx cenv (mkILMethRef (typ.TypeRef, cc, nm, genarity, args, ret))) +let GetMethodRefInfoAsMethodRefOrDef isAlwaysMethodDef cenv env ((nm, ty:ILType, cc, args, ret, varargs, genarity) as minfo) = + if Option.isNone varargs && (isAlwaysMethodDef || isTypeLocal ty) then + if not ty.IsNominal then failwith "GetMethodRefInfoAsMethodRefOrDef: unexpected local tref-ty" + try (mdor_MethodDef, GetMethodRefAsMethodDefIdx cenv (mkILMethRef (ty.TypeRef, cc, nm, genarity, args, ret))) with MethodDefNotFound -> (mdor_MemberRef, GetMethodRefInfoAsMemberRefIdx cenv env minfo) else (mdor_MemberRef, GetMethodRefInfoAsMemberRefIdx cenv env minfo) @@ -1319,8 +1290,8 @@ let GetMethodRefInfoAsMethodRefOrDef isAlwaysMethodDef cenv env ((nm, typ:ILType // ILMethodSpec --> ILMethodRef/ILMethodDef/ILMethodSpec // -------------------------------------------------------------------- -let rec GetMethodSpecInfoAsMethodSpecIdx cenv env (nm, typ, cc, args, ret, varargs, minst:ILGenericArgs) = - let mdorTag, mdorRow = GetMethodRefInfoAsMethodRefOrDef false cenv env (nm, typ, cc, args, ret, varargs, minst.Length) +let rec GetMethodSpecInfoAsMethodSpecIdx cenv env (nm, ty, cc, args, ret, varargs, minst:ILGenericArgs) = + let mdorTag, mdorRow = GetMethodRefInfoAsMethodRefOrDef false cenv env (nm, ty, cc, args, ret, varargs, minst.Length) let blob = emitBytesViaBuffer (fun bb -> bb.EmitByte e_IMAGE_CEE_CS_CALLCONV_GENERICINST @@ -1339,16 +1310,16 @@ and GetMethodDefOrRefAsUncodedToken (tag, idx) = getUncodedToken tab idx and GetMethodSpecInfoAsUncodedToken cenv env ((_, _, _, _, _, _, minst:ILGenericArgs) as minfo) = - if minst.Length > 0 then - getUncodedToken TableNames.MethodSpec (GetMethodSpecInfoAsMethodSpecIdx cenv env minfo) - else - GetMethodDefOrRefAsUncodedToken (GetMethodRefInfoAsMethodRefOrDef false cenv env (GetMethodRefInfoOfMethodSpecInfo minfo)) + if List.isEmpty minst then + GetMethodDefOrRefAsUncodedToken (GetMethodRefInfoAsMethodRefOrDef false cenv env (GetMethodRefInfoOfMethodSpecInfo minfo)) + else + getUncodedToken TableNames.MethodSpec (GetMethodSpecInfoAsMethodSpecIdx cenv env minfo) and GetMethodSpecAsUncodedToken cenv env mspec = GetMethodSpecInfoAsUncodedToken cenv env (InfoOfMethodSpec mspec) -and GetMethodRefInfoOfMethodSpecInfo (nm, typ, cc, args, ret, varargs, minst:ILGenericArgs) = - (nm, typ, cc, args, ret, varargs, minst.Length) +and GetMethodRefInfoOfMethodSpecInfo (nm, ty, cc, args, ret, varargs, minst:ILGenericArgs) = + (nm, ty, cc, args, ret, varargs, minst.Length) and GetMethodSpecAsMethodDefOrRef cenv env (mspec, varargs) = GetMethodRefInfoAsMethodRefOrDef false cenv env (GetMethodRefInfoOfMethodSpecInfo (InfoOfMethodSpec (mspec, varargs))) @@ -1358,7 +1329,7 @@ and GetMethodSpecAsMethodDef cenv env (mspec, varargs) = and InfoOfMethodSpec (mspec:ILMethodSpec, varargs) = (mspec.Name, - mspec.EnclosingType, + mspec.DeclaringType, mspec.CallingConv, mspec.FormalArgTypes, mspec.FormalReturnType, @@ -1373,13 +1344,13 @@ and InfoOfMethodSpec (mspec:ILMethodSpec, varargs) = let rec GetOverridesSpecAsMemberRefIdx cenv env ospec = let fenv = envForOverrideSpec ospec - let row = MethodRefInfoAsMemberRefRow cenv env fenv (ospec.MethodRef.Name, ospec.EnclosingType, ospec.MethodRef.CallingConv, ospec.MethodRef.ArgTypes, ospec.MethodRef.ReturnType, None, ospec.MethodRef.GenericArity) + let row = MethodRefInfoAsMemberRefRow cenv env fenv (ospec.MethodRef.Name, ospec.DeclaringType, ospec.MethodRef.CallingConv, ospec.MethodRef.ArgTypes, ospec.MethodRef.ReturnType, None, ospec.MethodRef.GenericArity) FindOrAddSharedRow cenv TableNames.MemberRef row and GetOverridesSpecAsMethodDefOrRef cenv env (ospec:ILOverridesSpec) = - let typ = ospec.EnclosingType - if isTypeLocal typ then - if not typ.IsNominal then failwith "GetOverridesSpecAsMethodDefOrRef: unexpected local tref-typ" + let ty = ospec.DeclaringType + if isTypeLocal ty then + if not ty.IsNominal then failwith "GetOverridesSpecAsMethodDefOrRef: unexpected local tref-ty" try (mdor_MethodDef, GetMethodRefAsMethodDefIdx cenv ospec.MethodRef) with MethodDefNotFound -> (mdor_MemberRef, GetOverridesSpecAsMemberRefIdx cenv env ospec) else @@ -1392,12 +1363,12 @@ and GetOverridesSpecAsMethodDefOrRef cenv env (ospec:ILOverridesSpec) = // -------------------------------------------------------------------- let rec GetMethodRefAsMemberRefIdx cenv env fenv (mref:ILMethodRef) = - let row = MethodRefInfoAsMemberRefRow cenv env fenv (mref.Name, mkILNonGenericBoxedTy mref.EnclosingTypeRef, mref.CallingConv, mref.ArgTypes, mref.ReturnType, None, mref.GenericArity) + let row = MethodRefInfoAsMemberRefRow cenv env fenv (mref.Name, mkILNonGenericBoxedTy mref.DeclaringTypeRef, mref.CallingConv, mref.ArgTypes, mref.ReturnType, None, mref.GenericArity) FindOrAddSharedRow cenv TableNames.MemberRef row and GetMethodRefAsCustomAttribType cenv (mref:ILMethodRef) = let fenv = envForNonGenericMethodRef mref - let tref = mref.EnclosingTypeRef + let tref = mref.DeclaringTypeRef if isTypeRefLocal tref then try (cat_MethodDef, GetMethodRefAsMethodDefIdx cenv mref) with MethodDefNotFound -> (cat_MemberRef, GetMethodRefAsMemberRefIdx cenv fenv fenv mref) @@ -1432,10 +1403,10 @@ and GenCustomAttrsPass3Or4 cenv hca (attrs: ILAttributes) = attrs.AsList |> List.iter (GenCustomAttrPass3Or4 cenv hca) // -------------------------------------------------------------------- -// ILPermissionSet --> DeclSecurity rows +// ILSecurityDecl --> DeclSecurity rows // -------------------------------------------------------------------- *) -let rec GetSecurityDeclRow cenv hds (PermissionSet (action, s)) = +let rec GetSecurityDeclRow cenv hds (ILSecurityDecl (action, s)) = UnsharedRow [| UShort (uint16 (List.assoc action (Lazy.force ILSecurityActionMap))) HasDeclSecurity (fst hds, snd hds) @@ -1452,7 +1423,7 @@ and GenSecurityDeclsPass3 cenv hds attrs = // -------------------------------------------------------------------- let rec GetFieldSpecAsMemberRefRow cenv env fenv (fspec:ILFieldSpec) = - MemberRefRow (GetTypeAsMemberRefParent cenv env fspec.EnclosingType, + MemberRefRow (GetTypeAsMemberRefParent cenv env fspec.DeclaringType, GetStringHeapIdx cenv fspec.Name, GetFieldSpecSigAsBlobIdx cenv fenv fspec) @@ -1472,10 +1443,10 @@ and GetFieldSpecSigAsBlobIdx cenv env x = GetBytesAsBlobIdx cenv (GetFieldSpecSigAsBytes cenv env x) and GetFieldSpecAsFieldDefOrRef cenv env (fspec:ILFieldSpec) = - let typ = fspec.EnclosingType - if isTypeLocal typ then - if not typ.IsNominal then failwith "GetFieldSpecAsFieldDefOrRef: unexpected local tref-typ" - let tref = typ.TypeRef + let ty = fspec.DeclaringType + if isTypeLocal ty then + if not ty.IsNominal then failwith "GetFieldSpecAsFieldDefOrRef: unexpected local tref-ty" + let tref = ty.TypeRef let tidx = GetIdxForTypeDef cenv (TdKey(tref.Enclosing, tref.Name)) let fdkey = FieldDefKey (tidx, fspec.Name, fspec.FormalType) (true, FindFieldDefIdx cenv fdkey) @@ -1670,17 +1641,16 @@ module Codebuf = match i, tgs with | (_, Some i_short), [tg] when - begin - // Use the original offsets to compute if the branch is small or large. This is - // a safe approximation because code only gets smaller. - if not (origAvailBrFixups.ContainsKey tg) then - dprintn ("branch target " + formatCodeLabel tg + " not found in code") - let origDest = - if origAvailBrFixups.ContainsKey tg then origAvailBrFixups.[tg] - else 666666 + // Use the original offsets to compute if the branch is small or large. This is + // a safe approximation because code only gets smaller. + (let origDest = + match origAvailBrFixups.TryGetValue tg with + | true, fixup -> fixup + | _ -> + dprintn ("branch target " + formatCodeLabel tg + " not found in code") + 666666 let origRelOffset = origDest - origEndOfInstr - -128 <= origRelOffset && origRelOffset <= 127 - end + -128 <= origRelOffset && origRelOffset <= 127) -> newCode.EmitIntAsByte i_short true @@ -1750,18 +1720,16 @@ module Codebuf = // Now apply the adjusted fixups in the new code newReqdBrFixups |> List.iter (fun (newFixupLoc, endOfInstr, tg, small) -> - if not (newAvailBrFixups.ContainsKey tg) then - failwith ("target "+formatCodeLabel tg+" not found in new fixups") - try - let n = newAvailBrFixups.[tg] - let relOffset = (n - endOfInstr) - if small then - if Bytes.get newCode newFixupLoc <> 0x98 then failwith "br fixupsanity check failed" - newCode.[newFixupLoc] <- b0 relOffset - else - checkFixup32 newCode newFixupLoc 0xf00dd00fl - applyFixup32 newCode newFixupLoc relOffset - with :? KeyNotFoundException -> ()) + match newAvailBrFixups.TryGetValue(tg) with + | true, n -> + let relOffset = n - endOfInstr + if small then + if Bytes.get newCode newFixupLoc <> 0x98 then failwith "br fixupsanity check failed" + newCode.[newFixupLoc] <- b0 relOffset + else + checkFixup32 newCode newFixupLoc 0xf00dd00fl + applyFixup32 newCode newFixupLoc relOffset + | _ -> failwith ("target " + formatCodeLabel tg + " not found in new fixups")) newCode, newReqdStringFixups, newExnClauses, newSeqPoints, newScopes @@ -2006,8 +1974,8 @@ module Codebuf = emitInstrCode codebuf i_ldtoken codebuf.EmitUncodedToken (match tok with - | ILToken.ILType typ -> - match GetTypeAsTypeDefOrRef cenv env typ with + | ILToken.ILType ty -> + match GetTypeAsTypeDefOrRef cenv env ty with | (tag, idx) when tag = tdor_TypeDef -> getUncodedToken TableNames.TypeDef idx | (tag, idx) when tag = tdor_TypeRef -> getUncodedToken TableNames.TypeRef idx | (tag, idx) when tag = tdor_TypeSpec -> getUncodedToken TableNames.TypeSpec idx @@ -2162,8 +2130,8 @@ module Codebuf = conv (r1, labelsToRange lab2pc r2) ExceptionClauseKind.FaultClause | ILExceptionClause.FilterCatch ((filterStart, _), r3) -> conv (r1, labelsToRange lab2pc r3) (ExceptionClauseKind.FilterClause (pc2pos.[lab2pc.[filterStart]])) - | ILExceptionClause.TypeCatch (typ, r2) -> - conv (r1, labelsToRange lab2pc r2) (TypeFilterClause (getTypeDefOrRefAsUncodedToken (GetTypeAsTypeDefOrRef cenv env typ))) + | ILExceptionClause.TypeCatch (ty, r2) -> + conv (r1, labelsToRange lab2pc r2) (TypeFilterClause (getTypeDefOrRefAsUncodedToken (GetTypeAsTypeDefOrRef cenv env ty))) SEHTree.Node (Some n, children) ) trees @@ -2194,14 +2162,19 @@ module Codebuf = // Build a table mapping Abstract IL pcs to positions in the generated code buffer let pc2pos = Array.zeroCreate (instrs.Length+1) let pc2labs = Dictionary() - for (KeyValue(lab, pc)) in code.Labels do - if pc2labs.ContainsKey pc then pc2labs.[pc] <- lab :: pc2labs.[pc] else pc2labs.[pc] <- [lab] + for KeyValue (lab, pc) in code.Labels do + match pc2labs.TryGetValue(pc) with + | true, labels -> + pc2labs.[pc] <- lab :: labels + | _ -> pc2labs.[pc] <- [lab] // Emit the instructions for pc = 0 to instrs.Length do - if pc2labs.ContainsKey pc then - for lab in pc2labs.[pc] do - codebuf.RecordAvailBrFixup lab + match pc2labs.TryGetValue(pc) with + | true, labels -> + for lab in labels do + codebuf.RecordAvailBrFixup(lab) + | _ -> () pc2pos.[pc] <- codebuf.code.Position if pc < instrs.Length then match instrs.[pc] with @@ -2349,23 +2322,13 @@ let GenILMethodBody mname cenv env (il: ILMethodBody) = // -------------------------------------------------------------------- let rec GetFieldDefAsFieldDefRow cenv env (fd: ILFieldDef) = - let flags = - GetMemberAccessFlags fd.Access ||| - (if fd.IsStatic then 0x0010 else 0x0) ||| - (if fd.IsInitOnly then 0x0020 else 0x0) ||| - (if fd.IsLiteral then 0x0040 else 0x0) ||| - (if fd.NotSerialized then 0x0080 else 0x0) ||| - (if fd.IsSpecialName then 0x0200 else 0x0) ||| - (if fd.IsSpecialName then 0x0400 else 0x0) ||| // REVIEW: RTSpecialName - (if (fd.LiteralValue <> None) then 0x8000 else 0x0) ||| - (if (fd.Marshal <> None) then 0x1000 else 0x0) ||| - (if (fd.Data <> None) then 0x0100 else 0x0) + let flags = int fd.Attributes UnsharedRow [| UShort (uint16 flags) StringE (GetStringHeapIdx cenv fd.Name) Blob (GetFieldDefSigAsBlobIdx cenv env fd ) |] -and GetFieldDefSigAsBlobIdx cenv env fd = GetFieldDefTypeAsBlobIdx cenv env fd.Type +and GetFieldDefSigAsBlobIdx cenv env fd = GetFieldDefTypeAsBlobIdx cenv env fd.FieldType and GenFieldDefPass3 cenv env fd = let fidx = AddUnsharedRow cenv TableNames.Field (GetFieldDefAsFieldDefRow cenv env fd) @@ -2517,7 +2480,7 @@ let GenReturnPass3 cenv (returnv: ILReturn) = let GetMethodDefSigAsBytes cenv env (mdef: ILMethodDef) = emitBytesViaBuffer (fun bb -> bb.EmitByte (callconvToByte mdef.GenericParams.Length mdef.CallingConv) - if mdef.GenericParams.Length > 0 then bb.EmitZ32 mdef.GenericParams.Length + if not (List.isEmpty mdef.GenericParams) then bb.EmitZ32 mdef.GenericParams.Length bb.EmitZ32 mdef.Parameters.Length EmitType cenv env bb mdef.Return.Type mdef.ParameterTypes |> List.iter (EmitType cenv env bb)) @@ -2526,46 +2489,15 @@ let GenMethodDefSigAsBlobIdx cenv env mdef = GetBytesAsBlobIdx cenv (GetMethodDefSigAsBytes cenv env mdef) let GenMethodDefAsRow cenv env midx (md: ILMethodDef) = - let flags = - GetMemberAccessFlags md.Access ||| - (if (match md.mdKind with - | MethodKind.Static | MethodKind.Cctor -> true - | _ -> false) then 0x0010 else 0x0) ||| - (if (match md.mdKind with MethodKind.Virtual vinfo -> vinfo.IsFinal | _ -> false) then 0x0020 else 0x0) ||| - (if (match md.mdKind with MethodKind.Virtual _ -> true | _ -> false) then 0x0040 else 0x0) ||| - (if md.IsHideBySig then 0x0080 else 0x0) ||| - (if (match md.mdKind with MethodKind.Virtual vinfo -> vinfo.IsCheckAccessOnOverride | _ -> false) then 0x0200 else 0x0) ||| - (if (match md.mdKind with MethodKind.Virtual vinfo -> vinfo.IsNewSlot | _ -> false) then 0x0100 else 0x0) ||| - (if (match md.mdKind with MethodKind.Virtual vinfo -> vinfo.IsAbstract | _ -> false) then 0x0400 else 0x0) ||| - (if md.IsSpecialName then 0x0800 else 0x0) ||| - (if (match md.mdBody.Contents with MethodBody.PInvoke _ -> true | _ -> false) then 0x2000 else 0x0) ||| - (if md.IsUnmanagedExport then 0x0008 else 0x0) ||| - (if - (match md.mdKind with - | MethodKind.Ctor | MethodKind.Cctor -> true - | _ -> false) then 0x1000 else 0x0) ||| // RTSpecialName - (if md.IsReqSecObj then 0x8000 else 0x0) ||| - (if md.HasSecurity || not md.SecurityDecls.AsList.IsEmpty then 0x4000 else 0x0) + let flags = md.Attributes - let implflags = - (match md.mdCodeKind with - | MethodCodeKind.Native -> 0x0001 - | MethodCodeKind.Runtime -> 0x0003 - | MethodCodeKind.IL -> 0x0000) ||| - (if md.IsInternalCall then 0x1000 else 0x0000) ||| - (if md.IsManaged then 0x0000 else 0x0004) ||| - (if md.IsForwardRef then 0x0010 else 0x0000) ||| - (if md.IsPreserveSig then 0x0080 else 0x0000) ||| - (if md.IsSynchronized then 0x0020 else 0x0000) ||| - (if md.IsMustRun then 0x0040 else 0x0000) ||| - (if (md.IsNoInline || (match md.mdBody.Contents with MethodBody.IL il -> il.NoInlining | _ -> false)) then 0x0008 else 0x0000) ||| - (if (md.IsAggressiveInline || (match md.mdBody.Contents with MethodBody.IL il -> il.AggressiveInlining | _ -> false)) then 0x0100 else 0x0000) + let implflags = md.ImplAttributes if md.IsEntryPoint then if cenv.entrypoint <> None then failwith "duplicate entrypoint" else cenv.entrypoint <- Some (true, midx) let codeAddr = - (match md.mdBody.Contents with + (match md.Body.Contents with | MethodBody.IL ilmbody -> let addr = cenv.nextCodeAddr let (localToken, code, seqpoints, rootScope) = GenILMethodBody md.Name cenv env ilmbody @@ -2594,7 +2526,8 @@ let GenMethodDefAsRow cenv env midx (md: ILMethodDef) = SequencePoints=seqpoints } cenv.AddCode code addr - | MethodBody.Abstract -> + | MethodBody.Abstract + | MethodBody.PInvoke _ -> // Now record the PDB record for this method - we write this out later. if cenv.generatePdb then cenv.pdbinfo.Add @@ -2636,7 +2569,7 @@ let GenMethodDefPass3 cenv env (md:ILMethodDef) = md.CustomAttrs |> GenCustomAttrsPass3Or4 cenv (hca_MethodDef, midx) md.SecurityDecls.AsList |> GenSecurityDeclsPass3 cenv (hds_MethodDef, midx) md.GenericParams |> List.iteri (fun n gp -> GenGenericParamPass3 cenv env n (tomd_MethodDef, midx) gp) - match md.mdBody.Contents with + match md.Body.Contents with | MethodBody.PInvoke attr -> let flags = begin match attr.CallingConv with @@ -2689,19 +2622,16 @@ let GenPropertyMethodSemanticsPass3 cenv pidx kind mref = let rec GetPropertySigAsBlobIdx cenv env prop = GetBytesAsBlobIdx cenv (GetPropertySigAsBytes cenv env prop) -and GetPropertySigAsBytes cenv env prop = +and GetPropertySigAsBytes cenv env (prop: ILPropertyDef) = emitBytesViaBuffer (fun bb -> let b = ((hasthisToByte prop.CallingConv) ||| e_IMAGE_CEE_CS_CALLCONV_PROPERTY) bb.EmitByte b bb.EmitZ32 prop.Args.Length - EmitType cenv env bb prop.Type + EmitType cenv env bb prop.PropertyType prop.Args |> List.iter (EmitType cenv env bb)) and GetPropertyAsPropertyRow cenv env (prop:ILPropertyDef) = - let flags = - (if prop.IsSpecialName then 0x0200 else 0x0) ||| - (if prop.IsRTSpecialName then 0x0400 else 0x0) ||| - (if prop.Init <> None then 0x1000 else 0x0) + let flags = prop.Attributes UnsharedRow [| UShort (uint16 flags) StringE (GetStringHeapIdx cenv prop.Name) @@ -2733,10 +2663,8 @@ let rec GenEventMethodSemanticsPass3 cenv eidx kind mref = /// ILEventDef --> Event Row + MethodSemantics entries and GenEventAsEventRow cenv env (md: ILEventDef) = - let flags = - (if md.IsSpecialName then 0x0200 else 0x0) ||| - (if md.IsRTSpecialName then 0x0400 else 0x0) - let tdorTag, tdorRow = GetTypeOptionAsTypeDefOrRef cenv env md.Type + let flags = md.Attributes + let tdorTag, tdorRow = GetTypeOptionAsTypeDefOrRef cenv env md.EventType UnsharedRow [| UShort (uint16 flags) StringE (GetStringHeapIdx cenv md.Name) @@ -2757,21 +2685,24 @@ and GenEventPass3 cenv env (md: ILEventDef) = let rec GetResourceAsManifestResourceRow cenv r = let data, impl = - match r.Location with - | ILResourceLocation.Local bf -> - let b = bf() - // Embedded managed resources must be word-aligned. However resource format is - // not specified in ECMA. Some mscorlib resources appear to be non-aligned - it seems it doesn't matter.. - let offset = cenv.resources.Position - let alignedOffset = (align 0x8 offset) - let pad = alignedOffset - offset - let resourceSize = b.Length - cenv.resources.EmitPadding pad - cenv.resources.EmitInt32 resourceSize - cenv.resources.EmitBytes b - Data (alignedOffset, true), (i_File, 0) - | ILResourceLocation.File (mref, offset) -> ULong offset, (i_File, GetModuleRefAsFileIdx cenv mref) - | ILResourceLocation.Assembly aref -> ULong 0x0, (i_AssemblyRef, GetAssemblyRefAsIdx cenv aref) + let embedManagedResources (bytes:byte[]) = + // Embedded managed resources must be word-aligned. However resource format is + // not specified in ECMA. Some mscorlib resources appear to be non-aligned - it seems it doesn't matter.. + let offset = cenv.resources.Position + let alignedOffset = (align 0x8 offset) + let pad = alignedOffset - offset + let resourceSize = bytes.Length + cenv.resources.EmitPadding pad + cenv.resources.EmitInt32 resourceSize + cenv.resources.EmitBytes bytes + Data (alignedOffset, true), (i_File, 0) + + match r.Location with + | ILResourceLocation.LocalIn _ -> embedManagedResources (r.GetBytes()) + | ILResourceLocation.LocalOut bytes -> embedManagedResources bytes + | ILResourceLocation.File (mref, offset) -> ULong offset, (i_File, GetModuleRefAsFileIdx cenv mref) + | ILResourceLocation.Assembly aref -> ULong 0x0, (i_AssemblyRef, GetAssemblyRefAsIdx cenv aref) + UnsharedRow [| data ULong (match r.Access with ILResourceAccess.Public -> 0x01 | ILResourceAccess.Private -> 0x02) @@ -2861,8 +2792,7 @@ and GenNestedExportedTypesPass3 cenv nidx (nce: ILNestedExportedTypes) = and GenExportedTypePass3 cenv (ce: ILExportedTypeOrForwarder) = let nselem, nelem = GetTypeNameAsElemPair cenv ce.Name - let flags = GetTypeAccessFlags ce.Access - let flags = if ce.IsForwarder then 0x00200000 ||| flags else flags + let flags = int32 ce.Attributes let impl = GetScopeRefAsImplementationElem cenv ce.ScopeRef let cidx = AddUnsharedRow cenv TableNames.ExportedType @@ -2981,7 +2911,7 @@ let GenModule (cenv : cenv) (modul: ILModuleDef) = GenTypeDefsPass4 [] cenv tds reportTime cenv.showTimes "Module Generation Pass 4" -let generateIL requiredDataFixups (desiredMetadataVersion, generatePdb, ilg : ILGlobals, emitTailcalls, deterministic, showTimes) (m : ILModuleDef) cilStartAddress = +let generateIL requiredDataFixups (desiredMetadataVersion, generatePdb, ilg : ILGlobals, emitTailcalls, deterministic, showTimes) (m : ILModuleDef) cilStartAddress normalizeAssemblyRefs = let isDll = m.IsDLL let cenv = @@ -3029,7 +2959,8 @@ let generateIL requiredDataFixups (desiredMetadataVersion, generatePdb, ilg : IL guids=MetadataTable<_>.New("guids", HashIdentity.Structural) blobs= MetadataTable<_>.New("blobs", HashIdentity.Structural) strings= MetadataTable<_>.New("strings", EqualityComparer.Default) - userStrings= MetadataTable<_>.New("user strings", EqualityComparer.Default) } + userStrings= MetadataTable<_>.New("user strings", EqualityComparer.Default) + normalizeAssemblyRefs = normalizeAssemblyRefs } // Now the main compilation step GenModule cenv m @@ -3126,16 +3057,16 @@ module FileSystemUtilites = #endif () -let writeILMetadataAndCode (generatePdb, desiredMetadataVersion, ilg, emitTailcalls, deterministic, showTimes) modul cilStartAddress = +let writeILMetadataAndCode (generatePdb, desiredMetadataVersion, ilg, emitTailcalls, deterministic, showTimes) modul cilStartAddress normalizeAssemblyRefs = - // When we know the real RVAs of the data section we fixup the references for the FieldRVA table. + // When we know the real RVAs of the data section we fixup the references for the FieldRVA table. // These references are stored as offsets into the metadata we return from this function let requiredDataFixups = ref [] let next = cilStartAddress let strings, userStrings, blobs, guids, tables, entryPointToken, code, requiredStringFixups, data, resources, pdbData, mappings = - generateIL requiredDataFixups (desiredMetadataVersion, generatePdb, ilg, emitTailcalls, deterministic, showTimes) modul cilStartAddress + generateIL requiredDataFixups (desiredMetadataVersion, generatePdb, ilg, emitTailcalls, deterministic, showTimes) modul cilStartAddress normalizeAssemblyRefs reportTime showTimes "Generated Tables and Code" let tableSize (tab: TableName) = tables.[tab.Index].Count @@ -3579,7 +3510,8 @@ let writeBytes (os: BinaryWriter) (chunk:byte[]) = os.Write(chunk, 0, chunk.Leng let writeBinaryAndReportMappings (outfile, ilg: ILGlobals, pdbfile: string option, signer: ILStrongNameSigner option, portablePDB, embeddedPDB, - embedAllSource, embedSourceList, sourceLink, emitTailcalls, deterministic, showTimes, dumpDebugInfo ) modul = + embedAllSource, embedSourceList, sourceLink, emitTailcalls, deterministic, showTimes, dumpDebugInfo ) + modul normalizeAssemblyRefs = // Store the public key from the signer into the manifest. This means it will be written // to the binary and also acts as an indicator to leave space for delay sign @@ -3696,7 +3628,7 @@ let writeBinaryAndReportMappings (outfile, | None -> failwith "Expected msorlib to have a version number" let entryPointToken, code, codePadding, metadata, data, resources, requiredDataFixups, pdbData, mappings, guidStart = - writeILMetadataAndCode ((pdbfile <> None), desiredMetadataVersion, ilg, emitTailcalls, deterministic, showTimes) modul next + writeILMetadataAndCode ((pdbfile <> None), desiredMetadataVersion, ilg, emitTailcalls, deterministic, showTimes) modul next normalizeAssemblyRefs reportTime showTimes "Generated IL and metadata"; let _codeChunk, next = chunk code.Length next @@ -3791,7 +3723,13 @@ let writeBinaryAndReportMappings (outfile, ignore resourceFormat [||] #else - let unlinkedResources = List.map Lazy.force resources + let unlinkedResources = + resources |> List.map (function + | ILNativeResource.Out bytes -> bytes + | ILNativeResource.In (fileName, linkedResourceBase, start, len) -> + let linkedResource = File.ReadBinaryChunk (fileName, start, len) + unlinkResource linkedResourceBase linkedResource) + begin try linkNativeResources unlinkedResources next resourceFormat (Path.GetDirectoryName(outfile)) with e -> failwith ("Linking a native resource failed: "+e.Message+"") @@ -4336,8 +4274,8 @@ type options = showTimes: bool dumpDebugInfo:bool } -let WriteILBinary (outfile, (args: options), modul) = +let WriteILBinary (outfile, (args: options), modul, normalizeAssemblyRefs) = writeBinaryAndReportMappings (outfile, args.ilg, args.pdbfile, args.signer, args.portablePDB, args.embeddedPDB, args.embedAllSource, - args.embedSourceList, args.sourceLink, args.emitTailcalls, args.deterministic, args.showTimes, args.dumpDebugInfo) modul + args.embedSourceList, args.sourceLink, args.emitTailcalls, args.deterministic, args.showTimes, args.dumpDebugInfo) modul normalizeAssemblyRefs |> ignore diff --git a/src/absil/ilwrite.fsi b/src/absil/ilwrite.fsi index 80860381a0e..fc23d028bd5 100644 --- a/src/absil/ilwrite.fsi +++ b/src/absil/ilwrite.fsi @@ -30,4 +30,4 @@ type options = dumpDebugInfo : bool } /// Write a binary to the file system. Extra configuration parameters can also be specified. -val WriteILBinary: filename: string * options: options * input: ILModuleDef -> unit +val WriteILBinary: filename: string * options: options * input: ILModuleDef * (ILAssemblyRef -> ILAssemblyRef) -> unit diff --git a/src/absil/ilwritepdb.fs b/src/absil/ilwritepdb.fs index f8baa3aea4c..61771a9b2de 100644 --- a/src/absil/ilwritepdb.fs +++ b/src/absil/ilwritepdb.fs @@ -416,29 +416,28 @@ let generatePortablePdb (embedAllSource:bool) (embedSourceList:string list) (sou let collectScopes scope = let list = new List() - let rec toList scope = - list.Add scope - scope.Children |> Seq.iter(fun s -> toList s) - toList scope + let rec toList scope parent = + let nested = + match parent with + | Some p -> scope.StartOffset <> p.StartOffset || scope.EndOffset <> p.EndOffset + | None -> true + + if nested then list.Add scope + scope.Children |> Seq.iter(fun s -> toList s (if nested then Some scope else parent)) + + toList scope None list.ToArray() |> Array.sortWith scopeSorter collectScopes scope |> Seq.iter(fun s -> - if s.Children.Length = 0 then - metadata.AddLocalScope(MetadataTokens.MethodDefinitionHandle(minfo.MethToken), - Unchecked.defaultof, - nextHandle lastLocalVariableHandle, - Unchecked.defaultof, - 0, s.EndOffset - s.StartOffset ) |>ignore - else - metadata.AddLocalScope(MetadataTokens.MethodDefinitionHandle(minfo.MethToken), - Unchecked.defaultof, - nextHandle lastLocalVariableHandle, - Unchecked.defaultof, - s.StartOffset, s.EndOffset - s.StartOffset) |>ignore - - for localVariable in s.Locals do - lastLocalVariableHandle <- metadata.AddLocalVariable(LocalVariableAttributes.None, localVariable.Index, metadata.GetOrAddString(localVariable.Name)) - ) + metadata.AddLocalScope(MetadataTokens.MethodDefinitionHandle(minfo.MethToken), + Unchecked.defaultof, + nextHandle lastLocalVariableHandle, + Unchecked.defaultof, + s.StartOffset, s.EndOffset - s.StartOffset ) |>ignore + + for localVariable in s.Locals do + lastLocalVariableHandle <- metadata.AddLocalVariable(LocalVariableAttributes.None, localVariable.Index, metadata.GetOrAddString(localVariable.Name)) + ) match minfo.RootScope with | None -> () @@ -456,8 +455,8 @@ let generatePortablePdb (embedAllSource:bool) (embedSourceList:string list) (sou let convert (content:IEnumerable) = use sha = System.Security.Cryptography.SHA1.Create() // IncrementalHash is core only let hash = content - |> Seq.map ( fun c -> c.GetBytes().Array |> sha.ComputeHash ) - |> Seq.collect id |> Array.ofSeq |> sha.ComputeHash + |> Seq.collect (fun c -> c.GetBytes().Array |> sha.ComputeHash) + |> Array.ofSeq |> sha.ComputeHash BlobContentId.FromHash(hash) System.Func, BlobContentId>( convert ) @@ -533,19 +532,22 @@ let writePdbInfo showTimes f fpdb info cvChunk = // Partition the sequence points by document let spsets = - let res = (Map.empty : Map) - let add res (_,sp) = - let k = sp.Document - match Map.tryFind k res with - | Some xsR -> xsR := sp :: !xsR; res - | None -> Map.add k (ref [sp]) res - - let res = Array.fold add res sps - let res = Map.toList res // ordering may not be stable - List.map (fun (_,x) -> Array.ofList !x) res - - spsets |> List.iter (fun spset -> - if spset.Length > 0 then + let res = Dictionary() + for (_,sp) in sps do + let k = sp.Document + let mutable xsR = Unchecked.defaultof<_> + if res.TryGetValue(k,&xsR) then + xsR := sp :: !xsR + else + res.[k] <- ref [sp] + + res + + spsets + |> Seq.iter (fun kv -> + let spset = !kv.Value + if not spset.IsEmpty then + let spset = Array.ofList spset Array.sortInPlaceWith SequencePoint.orderByOffset spset let sps = spset |> Array.map (fun sp -> @@ -601,7 +603,7 @@ open Microsoft.FSharp.Reflection // Supports the following cases: // obj?Foo() // call with no arguments // obj?Foo(1, "a") // call with two arguments (extracted from tuple) -// NOTE: This doesn�t actually handle all overloads. It just picks first entry with right +// NOTE: This doesn't actually handle all overloads. It just picks first entry with right // number of arguments. let (?) this memb (args:'Args) : 'R = // Get array of 'obj' arguments for the reflection call @@ -635,7 +637,7 @@ let createWriter (f:string) = // MDB Writer. Generate debug symbols using the MDB format //--------------------------------------------------------------------- let writeMdbInfo fmdb f info = - // Note, if we can�t delete it code will fail later + // Note, if we can't delete it code will fail later try FileSystem.FileDelete fmdb with _ -> () // Try loading the MDB symbol writer from an assembly available on Mono dynamically diff --git a/src/absil/ilx.fs b/src/absil/ilx.fs index afe285ae73f..1914ace9b07 100644 --- a/src/absil/ilx.fs +++ b/src/absil/ilx.fs @@ -22,7 +22,7 @@ let mkLowerName (nm: string) = type IlxUnionField(fd: ILFieldDef) = let lowerName = mkLowerName fd.Name member x.ILField = fd - member x.Type = x.ILField.Type + member x.Type = x.ILField.FieldType member x.Name = x.ILField.Name member x.LowerName = lowerName @@ -49,7 +49,7 @@ type IlxUnionRef = type IlxUnionSpec = | IlxUnionSpec of IlxUnionRef * ILGenericArgs - member x.EnclosingType = let (IlxUnionSpec(IlxUnionRef(bx, tref, _, _, _), inst)) = x in mkILNamedTy bx tref inst + member x.DeclaringType = let (IlxUnionSpec(IlxUnionRef(bx, tref, _, _, _), inst)) = x in mkILNamedTy bx tref inst member x.Boxity = let (IlxUnionSpec(IlxUnionRef(bx, _, _, _, _), _)) = x in bx member x.TypeRef = let (IlxUnionSpec(IlxUnionRef(_, tref, _, _, _), _)) = x in tref member x.GenericArgs = let (IlxUnionSpec(_, inst)) = x in inst diff --git a/src/absil/ilx.fsi b/src/absil/ilx.fsi index 6ee5eceef12..39792635fe7 100644 --- a/src/absil/ilx.fsi +++ b/src/absil/ilx.fsi @@ -44,7 +44,7 @@ type IlxUnionRef = type IlxUnionSpec = | IlxUnionSpec of IlxUnionRef * ILGenericArgs - member EnclosingType : ILType + member DeclaringType : ILType member GenericArgs : ILGenericArgs member Alternatives : IlxUnionAlternative list member AlternativesArray : IlxUnionAlternative[] diff --git a/src/assemblyinfo/assemblyinfo.FSharp.Build.dll.fs b/src/assemblyinfo/assemblyinfo.FSharp.Build.dll.fs deleted file mode 100644 index e31498dae32..00000000000 --- a/src/assemblyinfo/assemblyinfo.FSharp.Build.dll.fs +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. - -namespace Microsoft.FSharp -open System.Reflection -[] -[] -[] -[] -[] -do() - -// Until dotnet sdk can version assemblies, use this -#if BUILD_FROM_SOURCE -[] -[] -[] -#endif - -do() diff --git a/src/assemblyinfo/assemblyinfo.FSharp.Compiler.Interactive.Settings.dll.fs b/src/assemblyinfo/assemblyinfo.FSharp.Compiler.Interactive.Settings.dll.fs deleted file mode 100644 index 5a1ca9682a0..00000000000 --- a/src/assemblyinfo/assemblyinfo.FSharp.Compiler.Interactive.Settings.dll.fs +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. - -namespace Microsoft.FSharp -open System.Reflection -open System.Runtime.InteropServices - -[] -[] -[] -[] -[] -[] - -// Until dotnet sdk can version assemblies, use this -#if BUILD_FROM_SOURCE -[] -[] -[] -#endif - -do() diff --git a/src/assemblyinfo/assemblyinfo.FSharp.Compiler.Private.dll.fs b/src/assemblyinfo/assemblyinfo.FSharp.Compiler.Private.dll.fs deleted file mode 100644 index 80f054f8529..00000000000 --- a/src/assemblyinfo/assemblyinfo.FSharp.Compiler.Private.dll.fs +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. - -namespace Microsoft.FSharp -open System.Reflection -open System.Runtime.InteropServices - -[] -[] -[] -[] -[] -[] - -// Until dotnet sdk can version assemblies, use this -#if BUILD_FROM_SOURCE -[] -[] -[] -#endif - -do() diff --git a/src/assemblyinfo/assemblyinfo.FSharp.Compiler.Service.dll.fs b/src/assemblyinfo/assemblyinfo.FSharp.Compiler.Service.dll.fs deleted file mode 100644 index 19ad354e749..00000000000 --- a/src/assemblyinfo/assemblyinfo.FSharp.Compiler.Service.dll.fs +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. - -namespace Microsoft.FSharp -open System.Reflection -open System.Runtime.InteropServices - -[] -[] -[] -[] -[] -[] - -#if NO_STRONG_NAMES -[] -[] -[] -[] -[] -[] -[] -[] -[] -[] -[] -[] -[] -[] -[] -[] - -// Note: internals visible to unit test DLLs in Retail (and all) builds. -[] -[] -[] -[] -[] -#endif - -[] -[] -[] -[] -[] -[] -[] -[] -[] -[] -[] -[] -[] -[] - -// Until dotnet sdk can version assemblies, use this -#if BUILD_FROM_SOURCE -[] -[] -[] -#endif - -do() diff --git a/src/assemblyinfo/assemblyinfo.FSharp.Core.dll.fs b/src/assemblyinfo/assemblyinfo.FSharp.Core.dll.fs deleted file mode 100644 index b0058b3cfda..00000000000 --- a/src/assemblyinfo/assemblyinfo.FSharp.Core.dll.fs +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. - -namespace Microsoft.FSharp -open System.Reflection -open System.Runtime.InteropServices - -[] -[] -[] -[] -[] -#if !FSCORE_PORTABLE_OLD -[] -#endif - -#if PORTABLE -[] -[] -#endif - -// Until dotnet sdk can version assemblies, use this -#if BUILD_FROM_SOURCE -[] -[] -[] -#endif - -do() - diff --git a/src/assemblyinfo/assemblyinfo.fsc.exe.fs b/src/assemblyinfo/assemblyinfo.fsc.exe.fs deleted file mode 100644 index d7adacfd7e1..00000000000 --- a/src/assemblyinfo/assemblyinfo.fsc.exe.fs +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. - -namespace Microsoft.FSharp -open System.Reflection -open System.Runtime.InteropServices - -[] -[] -[] -[] -[] -[] - -// Until dotnet sdk can version assemblies, use this -#if BUILD_FROM_SOURCE -[] -[] -[] -#endif - -do() diff --git a/src/assemblyinfo/assemblyinfo.fsi.exe.fs b/src/assemblyinfo/assemblyinfo.fsi.exe.fs deleted file mode 100644 index c9fcdc0fb1a..00000000000 --- a/src/assemblyinfo/assemblyinfo.fsi.exe.fs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. - -namespace Microsoft.FSharp -open System.Reflection -[] -[] -[] -[] -[] - -// Until dotnet sdk can version assemblies, use this -#if BUILD_FROM_SOURCE -[] -[] -[] -#endif - -do() diff --git a/src/buildfromsource.cmd b/src/buildfromsource.cmd index 3cb67b19a34..ed0892e4e09 100644 --- a/src/buildfromsource.cmd +++ b/src/buildfromsource.cmd @@ -3,19 +3,19 @@ set __scriptpath=%~dp0 rem build tools -dotnet restore %__scriptpath%buildtools\fslex\fslex.fsproj +dotnet restore "%__scriptpath%buildtools\fslex\fslex.fsproj" if ERRORLEVEL 1 echo Error: failed && goto :failure -dotnet publish %__scriptpath%buildtools\fslex\fslex.fsproj -o %__scriptpath%..\Tools\fslex +dotnet publish "%__scriptpath%buildtools\fslex\fslex.fsproj" -o "%__scriptpath%..\Tools\fslex" if ERRORLEVEL 1 echo Error: failed && goto :failure -dotnet restore %__scriptpath%buildtools\fsyacc\fsyacc.fsproj +dotnet restore "%__scriptpath%buildtools\fsyacc\fsyacc.fsproj" if ERRORLEVEL 1 echo Error: failed && goto :failure -dotnet publish %__scriptpath%buildtools\fsyacc\fsyacc.fsproj -o %__scriptpath%..\Tools\fsyacc +dotnet publish "%__scriptpath%buildtools\fsyacc\fsyacc.fsproj" -o "%__scriptpath%..\Tools\fsyacc" if ERRORLEVEL 1 echo Error: failed && goto :failure rem build and pack tools -dotnet restore %__scriptpath%buildfromsource\FSharp.Compiler.nuget\FSharp.Compiler.nuget.fsproj +dotnet restore "%__scriptpath%buildfromsource\FSharp.Compiler.nuget\FSharp.Compiler.nuget.fsproj" if ERRORLEVEL 1 echo Error: failed && goto :failure -dotnet pack %__scriptpath%buildfromsource\FSharp.Compiler.nuget\FSharp.Compiler.nuget.fsproj -c Release +dotnet pack "%__scriptpath%buildfromsource\FSharp.Compiler.nuget\FSharp.Compiler.nuget.fsproj" -c Release if ERRORLEVEL 1 echo Error: failed && goto :failure goto :success diff --git a/src/buildfromsource/BuildFromSource.targets b/src/buildfromsource/BuildFromSource.targets index e69d5959276..bfcd3d48e82 100644 --- a/src/buildfromsource/BuildFromSource.targets +++ b/src/buildfromsource/BuildFromSource.targets @@ -3,19 +3,20 @@ - 4.4.1.0 + 4.5.0.0 $(MSBuildThisFileDirectory)../../BuildFromSource/$(Configuration)/bin $(MSBuildThisFileDirectory).. true true false + false $(DefineConstants);BUILD_FROM_SOURCE $(MSBuildThisFileDirectory)../buildtools/keys/MSFT.snk true - $(OtherFlags) --publicsign --keyfile:$(KeyFile) + $(OtherFlags) --publicsign --keyfile:"$(KeyFile)" $(OtherFlags) --nocopyfsharpcore dotnet @@ -36,21 +37,6 @@ - - - - - $([System.Text.RegularExpressions.Regex]::Replace($([System.IO.File]::ReadAllText("%(CopyAndSubstituteText.FullPath)")), "%(CopyAndSubstituteText.Pattern1)", "%(CopyAndSubstituteText.Replacement1)")) - $([System.Text.RegularExpressions.Regex]::Replace($(FileText), "%(CopyAndSubstituteText.Pattern2)", "%(CopyAndSubstituteText.Replacement2)")) - - - - - false diff --git a/src/buildfromsource/Directory.Build.props b/src/buildfromsource/Directory.Build.props new file mode 100644 index 00000000000..bcfb137cc73 --- /dev/null +++ b/src/buildfromsource/Directory.Build.props @@ -0,0 +1,5 @@ + + + + + diff --git a/src/buildfromsource/FSharp.Build/AssemblyInfo.fs b/src/buildfromsource/FSharp.Build/AssemblyInfo.fs new file mode 100644 index 00000000000..5eb0475d851 --- /dev/null +++ b/src/buildfromsource/FSharp.Build/AssemblyInfo.fs @@ -0,0 +1,14 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace Microsoft.FSharp +open System.Reflection + +[] +[] +[] +[] +[] +[] +[] +[] +do() diff --git a/src/buildfromsource/FSharp.Build/FSBuild.fs b/src/buildfromsource/FSharp.Build/FSBuild.fs index f4e36cd07a1..5b94476c3d3 100644 --- a/src/buildfromsource/FSharp.Build/FSBuild.fs +++ b/src/buildfromsource/FSharp.Build/FSBuild.fs @@ -16,14 +16,14 @@ type internal SR private() = // BEGIN BOILERPLATE static let getCurrentAssembly () = - #if DNXCORE50 || NETSTANDARD1_5 || NETSTANDARD1_6 || NETCOREAPP1_0 + #if FX_RESHAPED_REFLECTION typeof.GetTypeInfo().Assembly #else System.Reflection.Assembly.GetExecutingAssembly() #endif static let getTypeInfo (t: System.Type) = - #if DNXCORE50 || NETSTANDARD1_5 || NETSTANDARD1_6 || NETCOREAPP1_0 + #if FX_RESHAPED_REFLECTION t.GetTypeInfo() #else t diff --git a/src/buildfromsource/FSharp.Build/FSharp.Build.fsproj b/src/buildfromsource/FSharp.Build/FSharp.Build.fsproj index 0bbcd502150..be5a089ff2f 100644 --- a/src/buildfromsource/FSharp.Build/FSharp.Build.fsproj +++ b/src/buildfromsource/FSharp.Build/FSharp.Build.fsproj @@ -4,7 +4,7 @@ Library - netcoreapp1.0 + netstandard2.0 FSharp.Build $(NoWarn);45;55;62;75;1204 true @@ -17,8 +17,7 @@ FSBuild.resx - - + @@ -27,35 +26,23 @@ - - Microsoft.FSharp.Targets - {BuildSuffix} - - - - Microsoft.Portable.FSharp.Targets - {BuildSuffix} - - - - Microsoft.FSharp.NetSdk.props - {BuildSuffix} - - - - Microsoft.FSharp.NetSdk.targets - {BuildSuffix} - - + + + + + - - - - - + + + + + + + + diff --git a/src/buildfromsource/FSharp.Compiler.Interactive.Settings/AssemblyInfo.fs b/src/buildfromsource/FSharp.Compiler.Interactive.Settings/AssemblyInfo.fs new file mode 100644 index 00000000000..9477e27f151 --- /dev/null +++ b/src/buildfromsource/FSharp.Compiler.Interactive.Settings/AssemblyInfo.fs @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace Microsoft.FSharp +open System.Reflection +open System.Runtime.InteropServices + +[] +[] +[] +[] +[] +[] +[] +[] +[] +do() diff --git a/src/buildfromsource/FSharp.Compiler.Interactive.Settings/FSInteractiveSettings.fs b/src/buildfromsource/FSharp.Compiler.Interactive.Settings/FSInteractiveSettings.fs index bc255ecfc74..e5391e9bda9 100644 --- a/src/buildfromsource/FSharp.Compiler.Interactive.Settings/FSInteractiveSettings.fs +++ b/src/buildfromsource/FSharp.Compiler.Interactive.Settings/FSInteractiveSettings.fs @@ -16,14 +16,14 @@ type internal SR private() = // BEGIN BOILERPLATE static let getCurrentAssembly () = - #if DNXCORE50 || NETSTANDARD1_5 || NETSTANDARD1_6 || NETCOREAPP1_0 + #if FX_RESHAPED_REFLECTION typeof.GetTypeInfo().Assembly #else System.Reflection.Assembly.GetExecutingAssembly() #endif static let getTypeInfo (t: System.Type) = - #if DNXCORE50 || NETSTANDARD1_5 || NETSTANDARD1_6 || NETCOREAPP1_0 + #if FX_RESHAPED_REFLECTION t.GetTypeInfo() #else t diff --git a/src/buildfromsource/FSharp.Compiler.Interactive.Settings/FSharp.Compiler.Interactive.Settings.fsproj b/src/buildfromsource/FSharp.Compiler.Interactive.Settings/FSharp.Compiler.Interactive.Settings.fsproj index e8a37a4ac28..74fd6fa0fcc 100644 --- a/src/buildfromsource/FSharp.Compiler.Interactive.Settings/FSharp.Compiler.Interactive.Settings.fsproj +++ b/src/buildfromsource/FSharp.Compiler.Interactive.Settings/FSharp.Compiler.Interactive.Settings.fsproj @@ -8,7 +8,6 @@ FSharp.Compiler.Interactive.Settings $(NoWarn);45;55;62;75;1182;1204 true - true $(OtherFlags) --maxerrors:20 --extraoptimizationloops:1 @@ -18,8 +17,7 @@ FSInteractiveSettings.resx - - + @@ -27,10 +25,12 @@ - - + + + + diff --git a/src/buildfromsource/FSharp.Compiler.Private/.gitignore b/src/buildfromsource/FSharp.Compiler.Private/.gitignore index fa6bb93f549..cb1cc7c265c 100644 --- a/src/buildfromsource/FSharp.Compiler.Private/.gitignore +++ b/src/buildfromsource/FSharp.Compiler.Private/.gitignore @@ -7,3 +7,5 @@ pars.fsi pplex.fs pppars.fs pppars.fsi +FSComp.resources +FSComp.*.resources diff --git a/src/buildfromsource/FSharp.Compiler.Private/AssemblyInfo.fs b/src/buildfromsource/FSharp.Compiler.Private/AssemblyInfo.fs new file mode 100644 index 00000000000..3b6e5c9279f --- /dev/null +++ b/src/buildfromsource/FSharp.Compiler.Private/AssemblyInfo.fs @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace Microsoft.FSharp +open System.Reflection +open System.Runtime.InteropServices + +[] +[] +[] +[] +[] +[] +[] +[] +[] +do() diff --git a/src/buildfromsource/FSharp.Compiler.Private/FSComp.fs b/src/buildfromsource/FSharp.Compiler.Private/FSComp.fs index abc321272d5..c6341838189 100644 --- a/src/buildfromsource/FSharp.Compiler.Private/FSComp.fs +++ b/src/buildfromsource/FSharp.Compiler.Private/FSComp.fs @@ -16,14 +16,14 @@ type internal SR private() = // BEGIN BOILERPLATE static let getCurrentAssembly () = - #if DNXCORE50 || NETSTANDARD1_5 || NETSTANDARD1_6 || NETCOREAPP1_0 + #if FX_RESHAPED_REFLECTION typeof.GetTypeInfo().Assembly #else System.Reflection.Assembly.GetExecutingAssembly() #endif static let getTypeInfo (t: System.Type) = - #if DNXCORE50 || NETSTANDARD1_5 || NETSTANDARD1_6 || NETCOREAPP1_0 + #if FX_RESHAPED_REFLECTION t.GetTypeInfo() #else t @@ -163,22 +163,22 @@ type internal SR private() = /// Add . for indexer access. /// (Originally from ..\FSComp.txt:19) static member addIndexerDot() = (GetStringFunc("addIndexerDot",",,,") ) - /// All elements of a list constructor expression must have the same type. This expression was expected to have type '%s', but here has type '%s'. + /// All elements of a list must be of the same type as the first element, which here is '%s'. This element has type '%s'. /// (Originally from ..\FSComp.txt:20) static member listElementHasWrongType(a0 : System.String, a1 : System.String) = (GetStringFunc("listElementHasWrongType",",,,%s,,,%s,,,") a0 a1) - /// All elements of an array constructor expression must have the same type. This expression was expected to have type '%s', but here has type '%s'. + /// All elements of an array must be of the same type as the first element, which here is '%s'. This element has type '%s'. /// (Originally from ..\FSComp.txt:21) static member arrayElementHasWrongType(a0 : System.String, a1 : System.String) = (GetStringFunc("arrayElementHasWrongType",",,,%s,,,%s,,,") a0 a1) - /// The 'if' expression is missing an 'else' branch. The 'then' branch has type '%s'. Because 'if' is an expression, and not a statement, add an 'else' branch which returns a value of the same type. + /// This 'if' expression is missing an 'else' branch. Because 'if' is an expression, and not a statement, add an 'else' branch which also returns a value of type '%s'. /// (Originally from ..\FSComp.txt:22) static member missingElseBranch(a0 : System.String) = (GetStringFunc("missingElseBranch",",,,%s,,,") a0) /// The 'if' expression needs to have type '%s' to satisfy context type requirements. It currently has type '%s'. /// (Originally from ..\FSComp.txt:23) static member ifExpression(a0 : System.String, a1 : System.String) = (GetStringFunc("ifExpression",",,,%s,,,%s,,,") a0 a1) - /// All branches of an 'if' expression must have the same type. This expression was expected to have type '%s', but here has type '%s'. + /// All branches of an 'if' expression must return values of the same type as the first branch, which here is '%s'. This branch returns a value of type '%s'. /// (Originally from ..\FSComp.txt:24) static member elseBranchHasWrongType(a0 : System.String, a1 : System.String) = (GetStringFunc("elseBranchHasWrongType",",,,%s,,,%s,,,") a0 a1) - /// All branches of a pattern match expression must have the same type. This expression was expected to have type '%s', but here has type '%s'. + /// All branches of a pattern match expression must return values of the same type as the first branch, which here is '%s'. This branch returns a value of type '%s'. /// (Originally from ..\FSComp.txt:25) static member followingPatternMatchClauseHasWrongType(a0 : System.String, a1 : System.String) = (GetStringFunc("followingPatternMatchClauseHasWrongType",",,,%s,,,%s,,,") a0 a1) /// A pattern match guard must be of type 'bool', but this 'when' expression is of type '%s'. @@ -363,7 +363,7 @@ type internal SR private() = static member tastUnexpectedByRef() = (255, GetStringFunc("tastUnexpectedByRef",",,,") ) /// A value must be mutable in order to mutate the contents or take the address of a value type, e.g. 'let mutable x = ...' /// (Originally from ..\FSComp.txt:86) - static member tastValueMustBeLocalAndMutable() = (256, GetStringFunc("tastValueMustBeLocalAndMutable",",,,") ) + static member tastValueMustBeMutable() = (256, GetStringFunc("tastValueMustBeMutable",",,,") ) /// Invalid mutation of a constant expression. Consider copying the expression to a mutable local, e.g. 'let mutable x = ...'. /// (Originally from ..\FSComp.txt:87) static member tastInvalidMutationOfConstant() = (257, GetStringFunc("tastInvalidMutationOfConstant",",,,") ) @@ -595,3564 +595,3573 @@ type internal SR private() = /// The implicit instantiation of a generic construct at or near this point could not be resolved because it could resolve to multiple unrelated types, e.g. '%s' and '%s'. Consider using type annotations to resolve the ambiguity /// (Originally from ..\FSComp.txt:163) static member typrelCannotResolveImplicitGenericInstantiation(a0 : System.String, a1 : System.String) = (331, GetStringFunc("typrelCannotResolveImplicitGenericInstantiation",",,,%s,,,%s,,,") a0 a1) - /// Could not resolve the ambiguity inherent in the use of the operator '%s' at or near this program point. Consider using type annotations to resolve the ambiguity. - /// (Originally from ..\FSComp.txt:164) - static member typrelCannotResolveAmbiguityInOverloadedOperator(a0 : System.String) = (332, GetStringFunc("typrelCannotResolveAmbiguityInOverloadedOperator",",,,%s,,,") a0) /// Could not resolve the ambiguity inherent in the use of a 'printf'-style format string - /// (Originally from ..\FSComp.txt:165) + /// (Originally from ..\FSComp.txt:164) static member typrelCannotResolveAmbiguityInPrintf() = (333, GetStringFunc("typrelCannotResolveAmbiguityInPrintf",",,,") ) /// Could not resolve the ambiguity in the use of a generic construct with an 'enum' constraint at or near this position - /// (Originally from ..\FSComp.txt:166) + /// (Originally from ..\FSComp.txt:165) static member typrelCannotResolveAmbiguityInEnum() = (334, GetStringFunc("typrelCannotResolveAmbiguityInEnum",",,,") ) /// Could not resolve the ambiguity in the use of a generic construct with a 'delegate' constraint at or near this position - /// (Originally from ..\FSComp.txt:167) + /// (Originally from ..\FSComp.txt:166) static member typrelCannotResolveAmbiguityInDelegate() = (335, GetStringFunc("typrelCannotResolveAmbiguityInDelegate",",,,") ) /// Invalid value - /// (Originally from ..\FSComp.txt:168) + /// (Originally from ..\FSComp.txt:167) static member typrelInvalidValue() = (337, GetStringFunc("typrelInvalidValue",",,,") ) /// The signature and implementation are not compatible because the respective type parameter counts differ - /// (Originally from ..\FSComp.txt:169) + /// (Originally from ..\FSComp.txt:168) static member typrelSigImplNotCompatibleParamCountsDiffer() = (338, GetStringFunc("typrelSigImplNotCompatibleParamCountsDiffer",",,,") ) /// The signature and implementation are not compatible because the type parameter in the class/signature has a different compile-time requirement to the one in the member/implementation - /// (Originally from ..\FSComp.txt:170) + /// (Originally from ..\FSComp.txt:169) static member typrelSigImplNotCompatibleCompileTimeRequirementsDiffer() = (339, GetStringFunc("typrelSigImplNotCompatibleCompileTimeRequirementsDiffer",",,,") ) /// The signature and implementation are not compatible because the declaration of the type parameter '%s' requires a constraint of the form %s - /// (Originally from ..\FSComp.txt:171) + /// (Originally from ..\FSComp.txt:170) static member typrelSigImplNotCompatibleConstraintsDiffer(a0 : System.String, a1 : System.String) = (340, GetStringFunc("typrelSigImplNotCompatibleConstraintsDiffer",",,,%s,,,%s,,,") a0 a1) /// The signature and implementation are not compatible because the type parameter '%s' has a constraint of the form %s but the implementation does not. Either remove this constraint from the signature or add it to the implementation. - /// (Originally from ..\FSComp.txt:172) + /// (Originally from ..\FSComp.txt:171) static member typrelSigImplNotCompatibleConstraintsDifferRemove(a0 : System.String, a1 : System.String) = (341, GetStringFunc("typrelSigImplNotCompatibleConstraintsDifferRemove",",,,%s,,,%s,,,") a0 a1) /// The type '%s' implements 'System.IComparable'. Consider also adding an explicit override for 'Object.Equals' - /// (Originally from ..\FSComp.txt:173) + /// (Originally from ..\FSComp.txt:172) static member typrelTypeImplementsIComparableShouldOverrideObjectEquals(a0 : System.String) = (342, GetStringFunc("typrelTypeImplementsIComparableShouldOverrideObjectEquals",",,,%s,,,") a0) /// The type '%s' implements 'System.IComparable' explicitly but provides no corresponding override for 'Object.Equals'. An implementation of 'Object.Equals' has been automatically provided, implemented via 'System.IComparable'. Consider implementing the override 'Object.Equals' explicitly - /// (Originally from ..\FSComp.txt:174) + /// (Originally from ..\FSComp.txt:173) static member typrelTypeImplementsIComparableDefaultObjectEqualsProvided(a0 : System.String) = (343, GetStringFunc("typrelTypeImplementsIComparableDefaultObjectEqualsProvided",",,,%s,,,") a0) /// The struct, record or union type '%s' has an explicit implementation of 'Object.GetHashCode' or 'Object.Equals'. You must apply the 'CustomEquality' attribute to the type - /// (Originally from ..\FSComp.txt:175) + /// (Originally from ..\FSComp.txt:174) static member typrelExplicitImplementationOfGetHashCodeOrEquals(a0 : System.String) = (344, GetStringFunc("typrelExplicitImplementationOfGetHashCodeOrEquals",",,,%s,,,") a0) /// The struct, record or union type '%s' has an explicit implementation of 'Object.GetHashCode'. Consider implementing a matching override for 'Object.Equals(obj)' - /// (Originally from ..\FSComp.txt:176) + /// (Originally from ..\FSComp.txt:175) static member typrelExplicitImplementationOfGetHashCode(a0 : System.String) = (345, GetStringFunc("typrelExplicitImplementationOfGetHashCode",",,,%s,,,") a0) /// The struct, record or union type '%s' has an explicit implementation of 'Object.Equals'. Consider implementing a matching override for 'Object.GetHashCode()' - /// (Originally from ..\FSComp.txt:177) + /// (Originally from ..\FSComp.txt:176) static member typrelExplicitImplementationOfEquals(a0 : System.String) = (346, GetStringFunc("typrelExplicitImplementationOfEquals",",,,%s,,,") a0) /// The exception definitions are not compatible because a CLI exception mapping is being hidden by a signature. The exception mapping must be visible to other modules. The module contains the exception definition\n %s \nbut its signature specifies\n\t%s - /// (Originally from ..\FSComp.txt:178) + /// (Originally from ..\FSComp.txt:177) static member ExceptionDefsNotCompatibleHiddenBySignature(a0 : System.String, a1 : System.String) = (GetStringFunc("ExceptionDefsNotCompatibleHiddenBySignature",",,,%s,,,%s,,,") a0 a1) /// The exception definitions are not compatible because the CLI representations differ. The module contains the exception definition\n %s \nbut its signature specifies\n\t%s - /// (Originally from ..\FSComp.txt:179) + /// (Originally from ..\FSComp.txt:178) static member ExceptionDefsNotCompatibleDotNetRepresentationsDiffer(a0 : System.String, a1 : System.String) = (GetStringFunc("ExceptionDefsNotCompatibleDotNetRepresentationsDiffer",",,,%s,,,%s,,,") a0 a1) /// The exception definitions are not compatible because the exception abbreviation is being hidden by the signature. The abbreviation must be visible to other CLI languages. Consider making the abbreviation visible in the signature. The module contains the exception definition\n %s \nbut its signature specifies\n\t%s. - /// (Originally from ..\FSComp.txt:180) + /// (Originally from ..\FSComp.txt:179) static member ExceptionDefsNotCompatibleAbbreviationHiddenBySignature(a0 : System.String, a1 : System.String) = (GetStringFunc("ExceptionDefsNotCompatibleAbbreviationHiddenBySignature",",,,%s,,,%s,,,") a0 a1) /// The exception definitions are not compatible because the exception abbreviations in the signature and implementation differ. The module contains the exception definition\n %s \nbut its signature specifies\n\t%s. - /// (Originally from ..\FSComp.txt:181) + /// (Originally from ..\FSComp.txt:180) static member ExceptionDefsNotCompatibleSignaturesDiffer(a0 : System.String, a1 : System.String) = (GetStringFunc("ExceptionDefsNotCompatibleSignaturesDiffer",",,,%s,,,%s,,,") a0 a1) /// The exception definitions are not compatible because the exception declarations differ. The module contains the exception definition\n %s \nbut its signature specifies\n\t%s. - /// (Originally from ..\FSComp.txt:182) + /// (Originally from ..\FSComp.txt:181) static member ExceptionDefsNotCompatibleExceptionDeclarationsDiffer(a0 : System.String, a1 : System.String) = (GetStringFunc("ExceptionDefsNotCompatibleExceptionDeclarationsDiffer",",,,%s,,,%s,,,") a0 a1) /// The exception definitions are not compatible because the field '%s' was required by the signature but was not specified by the implementation. The module contains the exception definition\n %s \nbut its signature specifies\n\t%s. - /// (Originally from ..\FSComp.txt:183) + /// (Originally from ..\FSComp.txt:182) static member ExceptionDefsNotCompatibleFieldInSigButNotImpl(a0 : System.String, a1 : System.String, a2 : System.String) = (GetStringFunc("ExceptionDefsNotCompatibleFieldInSigButNotImpl",",,,%s,,,%s,,,%s,,,") a0 a1 a2) /// The exception definitions are not compatible because the field '%s' was present in the implementation but not in the signature. The module contains the exception definition\n %s \nbut its signature specifies\n\t%s. - /// (Originally from ..\FSComp.txt:184) + /// (Originally from ..\FSComp.txt:183) static member ExceptionDefsNotCompatibleFieldInImplButNotSig(a0 : System.String, a1 : System.String, a2 : System.String) = (GetStringFunc("ExceptionDefsNotCompatibleFieldInImplButNotSig",",,,%s,,,%s,,,%s,,,") a0 a1 a2) /// The exception definitions are not compatible because the order of the fields is different in the signature and implementation. The module contains the exception definition\n %s \nbut its signature specifies\n\t%s. - /// (Originally from ..\FSComp.txt:185) + /// (Originally from ..\FSComp.txt:184) static member ExceptionDefsNotCompatibleFieldOrderDiffers(a0 : System.String, a1 : System.String) = (GetStringFunc("ExceptionDefsNotCompatibleFieldOrderDiffers",",,,%s,,,%s,,,") a0 a1) /// The namespace or module attributes differ between signature and implementation - /// (Originally from ..\FSComp.txt:186) + /// (Originally from ..\FSComp.txt:185) static member typrelModuleNamespaceAttributesDifferInSigAndImpl() = (355, GetStringFunc("typrelModuleNamespaceAttributesDifferInSigAndImpl",",,,") ) /// This method is over-constrained in its type parameters - /// (Originally from ..\FSComp.txt:187) + /// (Originally from ..\FSComp.txt:186) static member typrelMethodIsOverconstrained() = (356, GetStringFunc("typrelMethodIsOverconstrained",",,,") ) /// No implementations of '%s' had the correct number of arguments and type parameters. The required signature is '%s'. - /// (Originally from ..\FSComp.txt:188) + /// (Originally from ..\FSComp.txt:187) static member typrelOverloadNotFound(a0 : System.String, a1 : System.String) = (357, GetStringFunc("typrelOverloadNotFound",",,,%s,,,%s,,,") a0 a1) /// The override for '%s' was ambiguous - /// (Originally from ..\FSComp.txt:189) + /// (Originally from ..\FSComp.txt:188) static member typrelOverrideWasAmbiguous(a0 : System.String) = (358, GetStringFunc("typrelOverrideWasAmbiguous",",,,%s,,,") a0) /// More than one override implements '%s' - /// (Originally from ..\FSComp.txt:190) + /// (Originally from ..\FSComp.txt:189) static member typrelMoreThenOneOverride(a0 : System.String) = (359, GetStringFunc("typrelMoreThenOneOverride",",,,%s,,,") a0) /// The method '%s' is sealed and cannot be overridden - /// (Originally from ..\FSComp.txt:191) + /// (Originally from ..\FSComp.txt:190) static member typrelMethodIsSealed(a0 : System.String) = (360, GetStringFunc("typrelMethodIsSealed",",,,%s,,,") a0) /// The override '%s' implements more than one abstract slot, e.g. '%s' and '%s' - /// (Originally from ..\FSComp.txt:192) + /// (Originally from ..\FSComp.txt:191) static member typrelOverrideImplementsMoreThenOneSlot(a0 : System.String, a1 : System.String, a2 : System.String) = (361, GetStringFunc("typrelOverrideImplementsMoreThenOneSlot",",,,%s,,,%s,,,%s,,,") a0 a1 a2) /// Duplicate or redundant interface - /// (Originally from ..\FSComp.txt:193) + /// (Originally from ..\FSComp.txt:192) static member typrelDuplicateInterface() = (362, GetStringFunc("typrelDuplicateInterface",",,,") ) /// The interface '%s' is included in multiple explicitly implemented interface types. Add an explicit implementation of this interface. - /// (Originally from ..\FSComp.txt:194) + /// (Originally from ..\FSComp.txt:193) static member typrelNeedExplicitImplementation(a0 : System.String) = (363, GetStringFunc("typrelNeedExplicitImplementation",",,,%s,,,") a0) /// A named argument has been assigned more than one value - /// (Originally from ..\FSComp.txt:195) + /// (Originally from ..\FSComp.txt:194) static member typrelNamedArgumentHasBeenAssignedMoreThenOnce() = (364, GetStringFunc("typrelNamedArgumentHasBeenAssignedMoreThenOnce",",,,") ) /// No implementation was given for '%s' - /// (Originally from ..\FSComp.txt:196) + /// (Originally from ..\FSComp.txt:195) static member typrelNoImplementationGiven(a0 : System.String) = (365, GetStringFunc("typrelNoImplementationGiven",",,,%s,,,") a0) /// No implementation was given for '%s'. Note that all interface members must be implemented and listed under an appropriate 'interface' declaration, e.g. 'interface ... with member ...'. - /// (Originally from ..\FSComp.txt:197) + /// (Originally from ..\FSComp.txt:196) static member typrelNoImplementationGivenWithSuggestion(a0 : System.String) = (366, GetStringFunc("typrelNoImplementationGivenWithSuggestion",",,,%s,,,") a0) /// The member '%s' does not have the correct number of arguments. The required signature is '%s'. - /// (Originally from ..\FSComp.txt:198) + /// (Originally from ..\FSComp.txt:197) static member typrelMemberDoesNotHaveCorrectNumberOfArguments(a0 : System.String, a1 : System.String) = (367, GetStringFunc("typrelMemberDoesNotHaveCorrectNumberOfArguments",",,,%s,,,%s,,,") a0 a1) /// The member '%s' does not have the correct number of method type parameters. The required signature is '%s'. - /// (Originally from ..\FSComp.txt:199) + /// (Originally from ..\FSComp.txt:198) static member typrelMemberDoesNotHaveCorrectNumberOfTypeParameters(a0 : System.String, a1 : System.String) = (368, GetStringFunc("typrelMemberDoesNotHaveCorrectNumberOfTypeParameters",",,,%s,,,%s,,,") a0 a1) /// The member '%s' does not have the correct kinds of generic parameters. The required signature is '%s'. - /// (Originally from ..\FSComp.txt:200) + /// (Originally from ..\FSComp.txt:199) static member typrelMemberDoesNotHaveCorrectKindsOfGenericParameters(a0 : System.String, a1 : System.String) = (369, GetStringFunc("typrelMemberDoesNotHaveCorrectKindsOfGenericParameters",",,,%s,,,%s,,,") a0 a1) /// The member '%s' cannot be used to implement '%s'. The required signature is '%s'. - /// (Originally from ..\FSComp.txt:201) + /// (Originally from ..\FSComp.txt:200) static member typrelMemberCannotImplement(a0 : System.String, a1 : System.String, a2 : System.String) = (370, GetStringFunc("typrelMemberCannotImplement",",,,%s,,,%s,,,%s,,,") a0 a1 a2) /// Error while parsing embedded IL - /// (Originally from ..\FSComp.txt:202) + /// (Originally from ..\FSComp.txt:201) static member astParseEmbeddedILError() = (371, GetStringFunc("astParseEmbeddedILError",",,,") ) /// Error while parsing embedded IL type - /// (Originally from ..\FSComp.txt:203) + /// (Originally from ..\FSComp.txt:202) static member astParseEmbeddedILTypeError() = (372, GetStringFunc("astParseEmbeddedILTypeError",",,,") ) /// This indexer notation has been removed from the F# language - /// (Originally from ..\FSComp.txt:204) + /// (Originally from ..\FSComp.txt:203) static member astDeprecatedIndexerNotation() = (GetStringFunc("astDeprecatedIndexerNotation",",,,") ) /// Invalid expression on left of assignment - /// (Originally from ..\FSComp.txt:205) + /// (Originally from ..\FSComp.txt:204) static member astInvalidExprLeftHandOfAssignment() = (374, GetStringFunc("astInvalidExprLeftHandOfAssignment",",,,") ) /// The 'ReferenceEquality' attribute cannot be used on structs. Consider using the 'StructuralEquality' attribute instead, or implement an override for 'System.Object.Equals(obj)'. - /// (Originally from ..\FSComp.txt:206) + /// (Originally from ..\FSComp.txt:205) static member augNoRefEqualsOnStruct() = (376, GetStringFunc("augNoRefEqualsOnStruct",",,,") ) /// This type uses an invalid mix of the attributes 'NoEquality', 'ReferenceEquality', 'StructuralEquality', 'NoComparison' and 'StructuralComparison' - /// (Originally from ..\FSComp.txt:207) + /// (Originally from ..\FSComp.txt:206) static member augInvalidAttrs() = (377, GetStringFunc("augInvalidAttrs",",,,") ) /// The 'NoEquality' attribute must be used in conjunction with the 'NoComparison' attribute - /// (Originally from ..\FSComp.txt:208) + /// (Originally from ..\FSComp.txt:207) static member augNoEqualityNeedsNoComparison() = (378, GetStringFunc("augNoEqualityNeedsNoComparison",",,,") ) /// The 'StructuralComparison' attribute must be used in conjunction with the 'StructuralEquality' attribute - /// (Originally from ..\FSComp.txt:209) + /// (Originally from ..\FSComp.txt:208) static member augStructCompNeedsStructEquality() = (379, GetStringFunc("augStructCompNeedsStructEquality",",,,") ) /// The 'StructuralEquality' attribute must be used in conjunction with the 'NoComparison' or 'StructuralComparison' attributes - /// (Originally from ..\FSComp.txt:210) + /// (Originally from ..\FSComp.txt:209) static member augStructEqNeedsNoCompOrStructComp() = (380, GetStringFunc("augStructEqNeedsNoCompOrStructComp",",,,") ) /// A type cannot have both the 'ReferenceEquality' and 'StructuralEquality' or 'StructuralComparison' attributes - /// (Originally from ..\FSComp.txt:211) + /// (Originally from ..\FSComp.txt:210) static member augTypeCantHaveRefEqAndStructAttrs() = (381, GetStringFunc("augTypeCantHaveRefEqAndStructAttrs",",,,") ) /// Only record, union, exception and struct types may be augmented with the 'ReferenceEquality', 'StructuralEquality' and 'StructuralComparison' attributes - /// (Originally from ..\FSComp.txt:212) + /// (Originally from ..\FSComp.txt:211) static member augOnlyCertainTypesCanHaveAttrs() = (382, GetStringFunc("augOnlyCertainTypesCanHaveAttrs",",,,") ) /// A type with attribute 'ReferenceEquality' cannot have an explicit implementation of 'Object.Equals(obj)', 'System.IEquatable<_>' or 'System.Collections.IStructuralEquatable' - /// (Originally from ..\FSComp.txt:213) + /// (Originally from ..\FSComp.txt:212) static member augRefEqCantHaveObjEquals() = (383, GetStringFunc("augRefEqCantHaveObjEquals",",,,") ) /// A type with attribute 'CustomEquality' must have an explicit implementation of at least one of 'Object.Equals(obj)', 'System.IEquatable<_>' or 'System.Collections.IStructuralEquatable' - /// (Originally from ..\FSComp.txt:214) + /// (Originally from ..\FSComp.txt:213) static member augCustomEqNeedsObjEquals() = (384, GetStringFunc("augCustomEqNeedsObjEquals",",,,") ) /// A type with attribute 'CustomComparison' must have an explicit implementation of at least one of 'System.IComparable' or 'System.Collections.IStructuralComparable' - /// (Originally from ..\FSComp.txt:215) + /// (Originally from ..\FSComp.txt:214) static member augCustomCompareNeedsIComp() = (385, GetStringFunc("augCustomCompareNeedsIComp",",,,") ) /// A type with attribute 'NoEquality' should not usually have an explicit implementation of 'Object.Equals(obj)'. Disable this warning if this is intentional for interoperability purposes - /// (Originally from ..\FSComp.txt:216) + /// (Originally from ..\FSComp.txt:215) static member augNoEqNeedsNoObjEquals() = (386, GetStringFunc("augNoEqNeedsNoObjEquals",",,,") ) /// A type with attribute 'NoComparison' should not usually have an explicit implementation of 'System.IComparable', 'System.IComparable<_>' or 'System.Collections.IStructuralComparable'. Disable this warning if this is intentional for interoperability purposes - /// (Originally from ..\FSComp.txt:217) + /// (Originally from ..\FSComp.txt:216) static member augNoCompCantImpIComp() = (386, GetStringFunc("augNoCompCantImpIComp",",,,") ) /// The 'CustomEquality' attribute must be used in conjunction with the 'NoComparison' or 'CustomComparison' attributes - /// (Originally from ..\FSComp.txt:218) + /// (Originally from ..\FSComp.txt:217) static member augCustomEqNeedsNoCompOrCustomComp() = (387, GetStringFunc("augCustomEqNeedsNoCompOrCustomComp",",,,") ) /// Positional specifiers are not permitted in format strings - /// (Originally from ..\FSComp.txt:219) + /// (Originally from ..\FSComp.txt:218) static member forPositionalSpecifiersNotPermitted() = (GetStringFunc("forPositionalSpecifiersNotPermitted",",,,") ) /// Missing format specifier - /// (Originally from ..\FSComp.txt:220) + /// (Originally from ..\FSComp.txt:219) static member forMissingFormatSpecifier() = (GetStringFunc("forMissingFormatSpecifier",",,,") ) /// '%s' flag set twice - /// (Originally from ..\FSComp.txt:221) + /// (Originally from ..\FSComp.txt:220) static member forFlagSetTwice(a0 : System.String) = (GetStringFunc("forFlagSetTwice",",,,%s,,,") a0) /// Prefix flag (' ' or '+') set twice - /// (Originally from ..\FSComp.txt:222) + /// (Originally from ..\FSComp.txt:221) static member forPrefixFlagSpacePlusSetTwice() = (GetStringFunc("forPrefixFlagSpacePlusSetTwice",",,,") ) /// The # formatting modifier is invalid in F# - /// (Originally from ..\FSComp.txt:223) + /// (Originally from ..\FSComp.txt:222) static member forHashSpecifierIsInvalid() = (GetStringFunc("forHashSpecifierIsInvalid",",,,") ) /// Bad precision in format specifier - /// (Originally from ..\FSComp.txt:224) + /// (Originally from ..\FSComp.txt:223) static member forBadPrecision() = (GetStringFunc("forBadPrecision",",,,") ) /// Bad width in format specifier - /// (Originally from ..\FSComp.txt:225) + /// (Originally from ..\FSComp.txt:224) static member forBadWidth() = (GetStringFunc("forBadWidth",",,,") ) /// '%s' format does not support '0' flag - /// (Originally from ..\FSComp.txt:226) + /// (Originally from ..\FSComp.txt:225) static member forDoesNotSupportZeroFlag(a0 : System.String) = (GetStringFunc("forDoesNotSupportZeroFlag",",,,%s,,,") a0) /// Precision missing after the '.' - /// (Originally from ..\FSComp.txt:227) + /// (Originally from ..\FSComp.txt:226) static member forPrecisionMissingAfterDot() = (GetStringFunc("forPrecisionMissingAfterDot",",,,") ) /// '%s' format does not support precision - /// (Originally from ..\FSComp.txt:228) + /// (Originally from ..\FSComp.txt:227) static member forFormatDoesntSupportPrecision(a0 : System.String) = (GetStringFunc("forFormatDoesntSupportPrecision",",,,%s,,,") a0) /// Bad format specifier (after l or L): Expected ld,li,lo,lu,lx or lX. In F# code you can use %%d, %%x, %%o or %%u instead, which are overloaded to work with all basic integer types. - /// (Originally from ..\FSComp.txt:229) + /// (Originally from ..\FSComp.txt:228) static member forBadFormatSpecifier() = (GetStringFunc("forBadFormatSpecifier",",,,") ) /// The 'l' or 'L' in this format specifier is unnecessary. In F# code you can use %%d, %%x, %%o or %%u instead, which are overloaded to work with all basic integer types. - /// (Originally from ..\FSComp.txt:230) + /// (Originally from ..\FSComp.txt:229) static member forLIsUnnecessary() = (GetStringFunc("forLIsUnnecessary",",,,") ) /// The 'h' or 'H' in this format specifier is unnecessary. You can use %%d, %%x, %%o or %%u instead, which are overloaded to work with all basic integer types. - /// (Originally from ..\FSComp.txt:231) + /// (Originally from ..\FSComp.txt:230) static member forHIsUnnecessary() = (GetStringFunc("forHIsUnnecessary",",,,") ) /// '%s' does not support prefix '%s' flag - /// (Originally from ..\FSComp.txt:232) + /// (Originally from ..\FSComp.txt:231) static member forDoesNotSupportPrefixFlag(a0 : System.String, a1 : System.String) = (GetStringFunc("forDoesNotSupportPrefixFlag",",,,%s,,,%s,,,") a0 a1) /// Bad format specifier: '%s' - /// (Originally from ..\FSComp.txt:233) + /// (Originally from ..\FSComp.txt:232) static member forBadFormatSpecifierGeneral(a0 : System.String) = (GetStringFunc("forBadFormatSpecifierGeneral",",,,%s,,,") a0) /// System.Environment.Exit did not exit - /// (Originally from ..\FSComp.txt:234) + /// (Originally from ..\FSComp.txt:233) static member elSysEnvExitDidntExit() = (GetStringFunc("elSysEnvExitDidntExit",",,,") ) /// The treatment of this operator is now handled directly by the F# compiler and its meaning cannot be redefined - /// (Originally from ..\FSComp.txt:235) + /// (Originally from ..\FSComp.txt:234) static member elDeprecatedOperator() = (GetStringFunc("elDeprecatedOperator",",,,") ) /// A protected member is called or 'base' is being used. This is only allowed in the direct implementation of members since they could escape their object scope. - /// (Originally from ..\FSComp.txt:236) + /// (Originally from ..\FSComp.txt:235) static member chkProtectedOrBaseCalled() = (405, GetStringFunc("chkProtectedOrBaseCalled",",,,") ) /// The byref-typed variable '%s' is used in an invalid way. Byrefs cannot be captured by closures or passed to inner functions. - /// (Originally from ..\FSComp.txt:237) + /// (Originally from ..\FSComp.txt:236) static member chkByrefUsedInInvalidWay(a0 : System.String) = (406, GetStringFunc("chkByrefUsedInInvalidWay",",,,%s,,,") a0) /// The 'base' keyword is used in an invalid way. Base calls cannot be used in closures. Consider using a private member to make base calls. - /// (Originally from ..\FSComp.txt:238) + /// (Originally from ..\FSComp.txt:237) static member chkBaseUsedInInvalidWay() = (408, GetStringFunc("chkBaseUsedInInvalidWay",",,,") ) /// The variable '%s' is used in an invalid way - /// (Originally from ..\FSComp.txt:239) + /// (Originally from ..\FSComp.txt:238) static member chkVariableUsedInInvalidWay(a0 : System.String) = (GetStringFunc("chkVariableUsedInInvalidWay",",,,%s,,,") a0) /// The type '%s' is less accessible than the value, member or type '%s' it is used in. - /// (Originally from ..\FSComp.txt:240) + /// (Originally from ..\FSComp.txt:239) static member chkTypeLessAccessibleThanType(a0 : System.String, a1 : System.String) = (410, GetStringFunc("chkTypeLessAccessibleThanType",",,,%s,,,%s,,,") a0 a1) /// 'System.Void' can only be used as 'typeof' in F# - /// (Originally from ..\FSComp.txt:241) + /// (Originally from ..\FSComp.txt:240) static member chkSystemVoidOnlyInTypeof() = (411, GetStringFunc("chkSystemVoidOnlyInTypeof",",,,") ) /// A type instantiation involves a byref type. This is not permitted by the rules of Common IL. - /// (Originally from ..\FSComp.txt:242) + /// (Originally from ..\FSComp.txt:241) static member chkErrorUseOfByref() = (412, GetStringFunc("chkErrorUseOfByref",",,,") ) /// Calls to 'reraise' may only occur directly in a handler of a try-with - /// (Originally from ..\FSComp.txt:243) + /// (Originally from ..\FSComp.txt:242) static member chkErrorContainsCallToRethrow() = (413, GetStringFunc("chkErrorContainsCallToRethrow",",,,") ) /// Expression-splicing operators may only be used within quotations - /// (Originally from ..\FSComp.txt:244) + /// (Originally from ..\FSComp.txt:243) static member chkSplicingOnlyInQuotations() = (414, GetStringFunc("chkSplicingOnlyInQuotations",",,,") ) /// First-class uses of the expression-splicing operator are not permitted - /// (Originally from ..\FSComp.txt:245) + /// (Originally from ..\FSComp.txt:244) static member chkNoFirstClassSplicing() = (415, GetStringFunc("chkNoFirstClassSplicing",",,,") ) /// First-class uses of the address-of operators are not permitted - /// (Originally from ..\FSComp.txt:246) + /// (Originally from ..\FSComp.txt:245) static member chkNoFirstClassAddressOf() = (416, GetStringFunc("chkNoFirstClassAddressOf",",,,") ) /// First-class uses of the 'reraise' function is not permitted - /// (Originally from ..\FSComp.txt:247) + /// (Originally from ..\FSComp.txt:246) static member chkNoFirstClassRethrow() = (417, GetStringFunc("chkNoFirstClassRethrow",",,,") ) /// The byref typed value '%s' cannot be used at this point - /// (Originally from ..\FSComp.txt:248) + /// (Originally from ..\FSComp.txt:247) static member chkNoByrefAtThisPoint(a0 : System.String) = (418, GetStringFunc("chkNoByrefAtThisPoint",",,,%s,,,") a0) /// 'base' values may only be used to make direct calls to the base implementations of overridden members - /// (Originally from ..\FSComp.txt:249) + /// (Originally from ..\FSComp.txt:248) static member chkLimitationsOfBaseKeyword() = (419, GetStringFunc("chkLimitationsOfBaseKeyword",",,,") ) /// Object constructors cannot directly use try/with and try/finally prior to the initialization of the object. This includes constructs such as 'for x in ...' that may elaborate to uses of these constructs. This is a limitation imposed by Common IL. - /// (Originally from ..\FSComp.txt:250) + /// (Originally from ..\FSComp.txt:249) static member chkObjCtorsCantUseExceptionHandling() = (420, GetStringFunc("chkObjCtorsCantUseExceptionHandling",",,,") ) /// The address of the variable '%s' cannot be used at this point - /// (Originally from ..\FSComp.txt:251) + /// (Originally from ..\FSComp.txt:250) static member chkNoAddressOfAtThisPoint(a0 : System.String) = (421, GetStringFunc("chkNoAddressOfAtThisPoint",",,,%s,,,") a0) /// The address of the static field '%s' cannot be used at this point - /// (Originally from ..\FSComp.txt:252) + /// (Originally from ..\FSComp.txt:251) static member chkNoAddressStaticFieldAtThisPoint(a0 : System.String) = (422, GetStringFunc("chkNoAddressStaticFieldAtThisPoint",",,,%s,,,") a0) /// The address of the field '%s' cannot be used at this point - /// (Originally from ..\FSComp.txt:253) + /// (Originally from ..\FSComp.txt:252) static member chkNoAddressFieldAtThisPoint(a0 : System.String) = (423, GetStringFunc("chkNoAddressFieldAtThisPoint",",,,%s,,,") a0) /// The address of an array element cannot be used at this point - /// (Originally from ..\FSComp.txt:254) + /// (Originally from ..\FSComp.txt:253) static member chkNoAddressOfArrayElementAtThisPoint() = (424, GetStringFunc("chkNoAddressOfArrayElementAtThisPoint",",,,") ) /// The type of a first-class function cannot contain byrefs - /// (Originally from ..\FSComp.txt:255) + /// (Originally from ..\FSComp.txt:254) static member chkFirstClassFuncNoByref() = (425, GetStringFunc("chkFirstClassFuncNoByref",",,,") ) /// A method return type would contain byrefs which is not permitted - /// (Originally from ..\FSComp.txt:256) + /// (Originally from ..\FSComp.txt:255) static member chkReturnTypeNoByref() = (426, GetStringFunc("chkReturnTypeNoByref",",,,") ) /// Invalid custom attribute value (not a constant or literal) - /// (Originally from ..\FSComp.txt:257) + /// (Originally from ..\FSComp.txt:256) static member chkInvalidCustAttrVal() = (428, GetStringFunc("chkInvalidCustAttrVal",",,,") ) /// The attribute type '%s' has 'AllowMultiple=false'. Multiple instances of this attribute cannot be attached to a single language element. - /// (Originally from ..\FSComp.txt:258) + /// (Originally from ..\FSComp.txt:257) static member chkAttrHasAllowMultiFalse(a0 : System.String) = (429, GetStringFunc("chkAttrHasAllowMultiFalse",",,,%s,,,") a0) /// The member '%s' is used in an invalid way. A use of '%s' has been inferred prior to its definition at or near '%s'. This is an invalid forward reference. - /// (Originally from ..\FSComp.txt:259) + /// (Originally from ..\FSComp.txt:258) static member chkMemberUsedInInvalidWay(a0 : System.String, a1 : System.String, a2 : System.String) = (430, GetStringFunc("chkMemberUsedInInvalidWay",",,,%s,,,%s,,,%s,,,") a0 a1 a2) /// A byref typed value would be stored here. Top-level let-bound byref values are not permitted. - /// (Originally from ..\FSComp.txt:260) + /// (Originally from ..\FSComp.txt:259) static member chkNoByrefAsTopValue() = (431, GetStringFunc("chkNoByrefAsTopValue",",,,") ) /// [] terms cannot contain uses of the prefix splice operator '%%' - /// (Originally from ..\FSComp.txt:261) + /// (Originally from ..\FSComp.txt:260) static member chkReflectedDefCantSplice() = (432, GetStringFunc("chkReflectedDefCantSplice",",,,") ) /// A function labeled with the 'EntryPointAttribute' attribute must be the last declaration in the last file in the compilation sequence. - /// (Originally from ..\FSComp.txt:262) + /// (Originally from ..\FSComp.txt:261) static member chkEntryPointUsage() = (433, GetStringFunc("chkEntryPointUsage",",,,") ) /// compiled form of the union case - /// (Originally from ..\FSComp.txt:263) + /// (Originally from ..\FSComp.txt:262) static member chkUnionCaseCompiledForm() = (GetStringFunc("chkUnionCaseCompiledForm",",,,") ) /// default augmentation of the union case - /// (Originally from ..\FSComp.txt:264) + /// (Originally from ..\FSComp.txt:263) static member chkUnionCaseDefaultAugmentation() = (GetStringFunc("chkUnionCaseDefaultAugmentation",",,,") ) /// The property '%s' has the same name as a method in type '%s'. - /// (Originally from ..\FSComp.txt:265) + /// (Originally from ..\FSComp.txt:264) static member chkPropertySameNameMethod(a0 : System.String, a1 : System.String) = (434, GetStringFunc("chkPropertySameNameMethod",",,,%s,,,%s,,,") a0 a1) /// The property '%s' of type '%s' has a getter and a setter that do not match. If one is abstract then the other must be as well. - /// (Originally from ..\FSComp.txt:266) + /// (Originally from ..\FSComp.txt:265) static member chkGetterSetterDoNotMatchAbstract(a0 : System.String, a1 : System.String) = (435, GetStringFunc("chkGetterSetterDoNotMatchAbstract",",,,%s,,,%s,,,") a0 a1) /// The property '%s' has the same name as another property in type '%s', but one takes indexer arguments and the other does not. You may be missing an indexer argument to one of your properties. - /// (Originally from ..\FSComp.txt:267) + /// (Originally from ..\FSComp.txt:266) static member chkPropertySameNameIndexer(a0 : System.String, a1 : System.String) = (436, GetStringFunc("chkPropertySameNameIndexer",",,,%s,,,%s,,,") a0 a1) /// A type would store a byref typed value. This is not permitted by Common IL. - /// (Originally from ..\FSComp.txt:268) + /// (Originally from ..\FSComp.txt:267) static member chkCantStoreByrefValue() = (437, GetStringFunc("chkCantStoreByrefValue",",,,") ) /// Duplicate method. The method '%s' has the same name and signature as another method in type '%s'. - /// (Originally from ..\FSComp.txt:270) + /// (Originally from ..\FSComp.txt:269) static member chkDuplicateMethod(a0 : System.String, a1 : System.String) = (438, GetStringFunc("chkDuplicateMethod",",,,%s,,,%s,,,") a0 a1) /// Duplicate method. The method '%s' has the same name and signature as another method in type '%s' once tuples, functions, units of measure and/or provided types are erased. - /// (Originally from ..\FSComp.txt:271) + /// (Originally from ..\FSComp.txt:270) static member chkDuplicateMethodWithSuffix(a0 : System.String, a1 : System.String) = (438, GetStringFunc("chkDuplicateMethodWithSuffix",",,,%s,,,%s,,,") a0 a1) /// The method '%s' has curried arguments but has the same name as another method in type '%s'. Methods with curried arguments cannot be overloaded. Consider using a method taking tupled arguments. - /// (Originally from ..\FSComp.txt:272) + /// (Originally from ..\FSComp.txt:271) static member chkDuplicateMethodCurried(a0 : System.String, a1 : System.String) = (439, GetStringFunc("chkDuplicateMethodCurried",",,,%s,,,%s,,,") a0 a1) /// Methods with curried arguments cannot declare 'out', 'ParamArray', 'optional', 'ReflectedDefinition', 'byref', 'CallerLineNumber', 'CallerMemberName', or 'CallerFilePath' arguments - /// (Originally from ..\FSComp.txt:273) + /// (Originally from ..\FSComp.txt:272) static member chkCurriedMethodsCantHaveOutParams() = (440, GetStringFunc("chkCurriedMethodsCantHaveOutParams",",,,") ) /// Duplicate property. The property '%s' has the same name and signature as another property in type '%s'. - /// (Originally from ..\FSComp.txt:274) + /// (Originally from ..\FSComp.txt:273) static member chkDuplicateProperty(a0 : System.String, a1 : System.String) = (441, GetStringFunc("chkDuplicateProperty",",,,%s,,,%s,,,") a0 a1) /// Duplicate property. The property '%s' has the same name and signature as another property in type '%s' once tuples, functions, units of measure and/or provided types are erased. - /// (Originally from ..\FSComp.txt:275) + /// (Originally from ..\FSComp.txt:274) static member chkDuplicatePropertyWithSuffix(a0 : System.String, a1 : System.String) = (441, GetStringFunc("chkDuplicatePropertyWithSuffix",",,,%s,,,%s,,,") a0 a1) /// Duplicate method. The abstract method '%s' has the same name and signature as an abstract method in an inherited type. - /// (Originally from ..\FSComp.txt:276) + /// (Originally from ..\FSComp.txt:275) static member chkDuplicateMethodInheritedType(a0 : System.String) = (442, GetStringFunc("chkDuplicateMethodInheritedType",",,,%s,,,") a0) /// Duplicate method. The abstract method '%s' has the same name and signature as an abstract method in an inherited type once tuples, functions, units of measure and/or provided types are erased. - /// (Originally from ..\FSComp.txt:277) + /// (Originally from ..\FSComp.txt:276) static member chkDuplicateMethodInheritedTypeWithSuffix(a0 : System.String) = (442, GetStringFunc("chkDuplicateMethodInheritedTypeWithSuffix",",,,%s,,,") a0) /// This type implements the same interface at different generic instantiations '%s' and '%s'. This is not permitted in this version of F#. - /// (Originally from ..\FSComp.txt:278) + /// (Originally from ..\FSComp.txt:277) static member chkMultipleGenericInterfaceInstantiations(a0 : System.String, a1 : System.String) = (443, GetStringFunc("chkMultipleGenericInterfaceInstantiations",",,,%s,,,%s,,,") a0 a1) /// The type of a field using the 'DefaultValue' attribute must admit default initialization, i.e. have 'null' as a proper value or be a struct type whose fields all admit default initialization. You can use 'DefaultValue(false)' to disable this check - /// (Originally from ..\FSComp.txt:279) + /// (Originally from ..\FSComp.txt:278) static member chkValueWithDefaultValueMustHaveDefaultValue() = (444, GetStringFunc("chkValueWithDefaultValueMustHaveDefaultValue",",,,") ) /// The type abbreviation contains byrefs. This is not permitted by F#. - /// (Originally from ..\FSComp.txt:280) + /// (Originally from ..\FSComp.txt:279) static member chkNoByrefInTypeAbbrev() = (445, GetStringFunc("chkNoByrefInTypeAbbrev",",,,") ) /// The variable '%s' is bound in a quotation but is used as part of a spliced expression. This is not permitted since it may escape its scope. - /// (Originally from ..\FSComp.txt:281) + /// (Originally from ..\FSComp.txt:280) static member crefBoundVarUsedInSplice(a0 : System.String) = (446, GetStringFunc("crefBoundVarUsedInSplice",",,,%s,,,") a0) /// Quotations cannot contain uses of generic expressions - /// (Originally from ..\FSComp.txt:282) + /// (Originally from ..\FSComp.txt:281) static member crefQuotationsCantContainGenericExprs() = (447, GetStringFunc("crefQuotationsCantContainGenericExprs",",,,") ) /// Quotations cannot contain function definitions that are inferred or declared to be generic. Consider adding some type constraints to make this a valid quoted expression. - /// (Originally from ..\FSComp.txt:283) + /// (Originally from ..\FSComp.txt:282) static member crefQuotationsCantContainGenericFunctions() = (448, GetStringFunc("crefQuotationsCantContainGenericFunctions",",,,") ) /// Quotations cannot contain object expressions - /// (Originally from ..\FSComp.txt:284) + /// (Originally from ..\FSComp.txt:283) static member crefQuotationsCantContainObjExprs() = (449, GetStringFunc("crefQuotationsCantContainObjExprs",",,,") ) /// Quotations cannot contain expressions that take the address of a field - /// (Originally from ..\FSComp.txt:285) + /// (Originally from ..\FSComp.txt:284) static member crefQuotationsCantContainAddressOf() = (450, GetStringFunc("crefQuotationsCantContainAddressOf",",,,") ) /// Quotations cannot contain expressions that fetch static fields - /// (Originally from ..\FSComp.txt:286) + /// (Originally from ..\FSComp.txt:285) static member crefQuotationsCantContainStaticFieldRef() = (451, GetStringFunc("crefQuotationsCantContainStaticFieldRef",",,,") ) /// Quotations cannot contain inline assembly code or pattern matching on arrays - /// (Originally from ..\FSComp.txt:287) + /// (Originally from ..\FSComp.txt:286) static member crefQuotationsCantContainInlineIL() = (452, GetStringFunc("crefQuotationsCantContainInlineIL",",,,") ) /// Quotations cannot contain descending for loops - /// (Originally from ..\FSComp.txt:288) + /// (Originally from ..\FSComp.txt:287) static member crefQuotationsCantContainDescendingForLoops() = (453, GetStringFunc("crefQuotationsCantContainDescendingForLoops",",,,") ) /// Quotations cannot contain expressions that fetch union case indexes - /// (Originally from ..\FSComp.txt:289) + /// (Originally from ..\FSComp.txt:288) static member crefQuotationsCantFetchUnionIndexes() = (454, GetStringFunc("crefQuotationsCantFetchUnionIndexes",",,,") ) /// Quotations cannot contain expressions that set union case fields - /// (Originally from ..\FSComp.txt:290) + /// (Originally from ..\FSComp.txt:289) static member crefQuotationsCantSetUnionFields() = (455, GetStringFunc("crefQuotationsCantSetUnionFields",",,,") ) /// Quotations cannot contain expressions that set fields in exception values - /// (Originally from ..\FSComp.txt:291) + /// (Originally from ..\FSComp.txt:290) static member crefQuotationsCantSetExceptionFields() = (456, GetStringFunc("crefQuotationsCantSetExceptionFields",",,,") ) /// Quotations cannot contain expressions that require byref pointers - /// (Originally from ..\FSComp.txt:292) + /// (Originally from ..\FSComp.txt:291) static member crefQuotationsCantRequireByref() = (457, GetStringFunc("crefQuotationsCantRequireByref",",,,") ) /// Quotations cannot contain expressions that make member constraint calls, or uses of operators that implicitly resolve to a member constraint call - /// (Originally from ..\FSComp.txt:293) + /// (Originally from ..\FSComp.txt:292) static member crefQuotationsCantCallTraitMembers() = (458, GetStringFunc("crefQuotationsCantCallTraitMembers",",,,") ) /// Quotations cannot contain this kind of constant - /// (Originally from ..\FSComp.txt:294) + /// (Originally from ..\FSComp.txt:293) static member crefQuotationsCantContainThisConstant() = (459, GetStringFunc("crefQuotationsCantContainThisConstant",",,,") ) /// Quotations cannot contain this kind of pattern match - /// (Originally from ..\FSComp.txt:295) + /// (Originally from ..\FSComp.txt:294) static member crefQuotationsCantContainThisPatternMatch() = (460, GetStringFunc("crefQuotationsCantContainThisPatternMatch",",,,") ) /// Quotations cannot contain array pattern matching - /// (Originally from ..\FSComp.txt:296) + /// (Originally from ..\FSComp.txt:295) static member crefQuotationsCantContainArrayPatternMatching() = (461, GetStringFunc("crefQuotationsCantContainArrayPatternMatching",",,,") ) /// Quotations cannot contain this kind of type - /// (Originally from ..\FSComp.txt:297) + /// (Originally from ..\FSComp.txt:296) static member crefQuotationsCantContainThisType() = (462, GetStringFunc("crefQuotationsCantContainThisType",",,,") ) /// The declared type parameter '%s' cannot be used here since the type parameter cannot be resolved at compile time - /// (Originally from ..\FSComp.txt:298) + /// (Originally from ..\FSComp.txt:297) static member csTypeCannotBeResolvedAtCompileTime(a0 : System.String) = (GetStringFunc("csTypeCannotBeResolvedAtCompileTime",",,,%s,,,") a0) /// This code is less generic than indicated by its annotations. A unit-of-measure specified using '_' has been determined to be '1', i.e. dimensionless. Consider making the code generic, or removing the use of '_'. - /// (Originally from ..\FSComp.txt:299) + /// (Originally from ..\FSComp.txt:298) static member csCodeLessGeneric() = (464, GetStringFunc("csCodeLessGeneric",",,,") ) /// Type inference problem too complicated (maximum iteration depth reached). Consider adding further type annotations. - /// (Originally from ..\FSComp.txt:300) + /// (Originally from ..\FSComp.txt:299) static member csTypeInferenceMaxDepth() = (465, GetStringFunc("csTypeInferenceMaxDepth",",,,") ) /// Expected arguments to an instance member - /// (Originally from ..\FSComp.txt:301) + /// (Originally from ..\FSComp.txt:300) static member csExpectedArguments() = (GetStringFunc("csExpectedArguments",",,,") ) /// This indexer expects %d arguments but is here given %d - /// (Originally from ..\FSComp.txt:302) + /// (Originally from ..\FSComp.txt:301) static member csIndexArgumentMismatch(a0 : System.Int32, a1 : System.Int32) = (GetStringFunc("csIndexArgumentMismatch",",,,%d,,,%d,,,") a0 a1) /// Expecting a type supporting the operator '%s' but given a function type. You may be missing an argument to a function. - /// (Originally from ..\FSComp.txt:303) + /// (Originally from ..\FSComp.txt:302) static member csExpectTypeWithOperatorButGivenFunction(a0 : System.String) = (GetStringFunc("csExpectTypeWithOperatorButGivenFunction",",,,%s,,,") a0) /// Expecting a type supporting the operator '%s' but given a tuple type - /// (Originally from ..\FSComp.txt:304) + /// (Originally from ..\FSComp.txt:303) static member csExpectTypeWithOperatorButGivenTuple(a0 : System.String) = (GetStringFunc("csExpectTypeWithOperatorButGivenTuple",",,,%s,,,") a0) /// None of the types '%s' support the operator '%s' - /// (Originally from ..\FSComp.txt:305) + /// (Originally from ..\FSComp.txt:304) static member csTypesDoNotSupportOperator(a0 : System.String, a1 : System.String) = (GetStringFunc("csTypesDoNotSupportOperator",",,,%s,,,%s,,,") a0 a1) /// The type '%s' does not support the operator '%s' - /// (Originally from ..\FSComp.txt:306) + /// (Originally from ..\FSComp.txt:305) static member csTypeDoesNotSupportOperator(a0 : System.String, a1 : System.String) = (GetStringFunc("csTypeDoesNotSupportOperator",",,,%s,,,%s,,,") a0 a1) /// None of the types '%s' support the operator '%s'. Consider opening the module 'Microsoft.FSharp.Linq.NullableOperators'. - /// (Originally from ..\FSComp.txt:307) + /// (Originally from ..\FSComp.txt:306) static member csTypesDoNotSupportOperatorNullable(a0 : System.String, a1 : System.String) = (GetStringFunc("csTypesDoNotSupportOperatorNullable",",,,%s,,,%s,,,") a0 a1) /// The type '%s' does not support the operator '%s'. Consider opening the module 'Microsoft.FSharp.Linq.NullableOperators'. - /// (Originally from ..\FSComp.txt:308) + /// (Originally from ..\FSComp.txt:307) static member csTypeDoesNotSupportOperatorNullable(a0 : System.String, a1 : System.String) = (GetStringFunc("csTypeDoesNotSupportOperatorNullable",",,,%s,,,%s,,,") a0 a1) /// The type '%s' does not support a conversion to the type '%s' - /// (Originally from ..\FSComp.txt:309) + /// (Originally from ..\FSComp.txt:308) static member csTypeDoesNotSupportConversion(a0 : System.String, a1 : System.String) = (GetStringFunc("csTypeDoesNotSupportConversion",",,,%s,,,%s,,,") a0 a1) /// The type '%s' has a method '%s' (full name '%s'), but the method is static - /// (Originally from ..\FSComp.txt:310) + /// (Originally from ..\FSComp.txt:309) static member csMethodFoundButIsStatic(a0 : System.String, a1 : System.String, a2 : System.String) = (GetStringFunc("csMethodFoundButIsStatic",",,,%s,,,%s,,,%s,,,") a0 a1 a2) /// The type '%s' has a method '%s' (full name '%s'), but the method is not static - /// (Originally from ..\FSComp.txt:311) + /// (Originally from ..\FSComp.txt:310) static member csMethodFoundButIsNotStatic(a0 : System.String, a1 : System.String, a2 : System.String) = (GetStringFunc("csMethodFoundButIsNotStatic",",,,%s,,,%s,,,%s,,,") a0 a1 a2) /// The constraints 'struct' and 'not struct' are inconsistent - /// (Originally from ..\FSComp.txt:312) + /// (Originally from ..\FSComp.txt:311) static member csStructConstraintInconsistent() = (472, GetStringFunc("csStructConstraintInconsistent",",,,") ) /// The type '%s' does not have 'null' as a proper value - /// (Originally from ..\FSComp.txt:313) + /// (Originally from ..\FSComp.txt:312) static member csTypeDoesNotHaveNull(a0 : System.String) = (GetStringFunc("csTypeDoesNotHaveNull",",,,%s,,,") a0) /// The type '%s' does not have 'null' as a proper value. To create a null value for a Nullable type use 'System.Nullable()'. - /// (Originally from ..\FSComp.txt:314) + /// (Originally from ..\FSComp.txt:313) static member csNullableTypeDoesNotHaveNull(a0 : System.String) = (GetStringFunc("csNullableTypeDoesNotHaveNull",",,,%s,,,") a0) /// The type '%s' does not support the 'comparison' constraint because it has the 'NoComparison' attribute - /// (Originally from ..\FSComp.txt:315) + /// (Originally from ..\FSComp.txt:314) static member csTypeDoesNotSupportComparison1(a0 : System.String) = (GetStringFunc("csTypeDoesNotSupportComparison1",",,,%s,,,") a0) /// The type '%s' does not support the 'comparison' constraint. For example, it does not support the 'System.IComparable' interface - /// (Originally from ..\FSComp.txt:316) + /// (Originally from ..\FSComp.txt:315) static member csTypeDoesNotSupportComparison2(a0 : System.String) = (GetStringFunc("csTypeDoesNotSupportComparison2",",,,%s,,,") a0) /// The type '%s' does not support the 'comparison' constraint because it is a record, union or struct with one or more structural element types which do not support the 'comparison' constraint. Either avoid the use of comparison with this type, or add the 'StructuralComparison' attribute to the type to determine which field type does not support comparison - /// (Originally from ..\FSComp.txt:317) + /// (Originally from ..\FSComp.txt:316) static member csTypeDoesNotSupportComparison3(a0 : System.String) = (GetStringFunc("csTypeDoesNotSupportComparison3",",,,%s,,,") a0) /// The type '%s' does not support the 'equality' constraint because it has the 'NoEquality' attribute - /// (Originally from ..\FSComp.txt:318) + /// (Originally from ..\FSComp.txt:317) static member csTypeDoesNotSupportEquality1(a0 : System.String) = (GetStringFunc("csTypeDoesNotSupportEquality1",",,,%s,,,") a0) /// The type '%s' does not support the 'equality' constraint because it is a function type - /// (Originally from ..\FSComp.txt:319) + /// (Originally from ..\FSComp.txt:318) static member csTypeDoesNotSupportEquality2(a0 : System.String) = (GetStringFunc("csTypeDoesNotSupportEquality2",",,,%s,,,") a0) /// The type '%s' does not support the 'equality' constraint because it is a record, union or struct with one or more structural element types which do not support the 'equality' constraint. Either avoid the use of equality with this type, or add the 'StructuralEquality' attribute to the type to determine which field type does not support equality - /// (Originally from ..\FSComp.txt:320) + /// (Originally from ..\FSComp.txt:319) static member csTypeDoesNotSupportEquality3(a0 : System.String) = (GetStringFunc("csTypeDoesNotSupportEquality3",",,,%s,,,") a0) /// The type '%s' is not a CLI enum type - /// (Originally from ..\FSComp.txt:321) + /// (Originally from ..\FSComp.txt:320) static member csTypeIsNotEnumType(a0 : System.String) = (GetStringFunc("csTypeIsNotEnumType",",,,%s,,,") a0) /// The type '%s' has a non-standard delegate type - /// (Originally from ..\FSComp.txt:322) + /// (Originally from ..\FSComp.txt:321) static member csTypeHasNonStandardDelegateType(a0 : System.String) = (GetStringFunc("csTypeHasNonStandardDelegateType",",,,%s,,,") a0) /// The type '%s' is not a CLI delegate type - /// (Originally from ..\FSComp.txt:323) + /// (Originally from ..\FSComp.txt:322) static member csTypeIsNotDelegateType(a0 : System.String) = (GetStringFunc("csTypeIsNotDelegateType",",,,%s,,,") a0) /// This type parameter cannot be instantiated to 'Nullable'. This is a restriction imposed in order to ensure the meaning of 'null' in some CLI languages is not confusing when used in conjunction with 'Nullable' values. - /// (Originally from ..\FSComp.txt:324) + /// (Originally from ..\FSComp.txt:323) static member csTypeParameterCannotBeNullable() = (GetStringFunc("csTypeParameterCannotBeNullable",",,,") ) /// A generic construct requires that the type '%s' is a CLI or F# struct type - /// (Originally from ..\FSComp.txt:325) + /// (Originally from ..\FSComp.txt:324) static member csGenericConstructRequiresStructType(a0 : System.String) = (GetStringFunc("csGenericConstructRequiresStructType",",,,%s,,,") a0) /// A generic construct requires that the type '%s' is an unmanaged type - /// (Originally from ..\FSComp.txt:326) + /// (Originally from ..\FSComp.txt:325) static member csGenericConstructRequiresUnmanagedType(a0 : System.String) = (GetStringFunc("csGenericConstructRequiresUnmanagedType",",,,%s,,,") a0) /// The type '%s' is not compatible with any of the types %s, arising from the use of a printf-style format string - /// (Originally from ..\FSComp.txt:327) + /// (Originally from ..\FSComp.txt:326) static member csTypeNotCompatibleBecauseOfPrintf(a0 : System.String, a1 : System.String) = (GetStringFunc("csTypeNotCompatibleBecauseOfPrintf",",,,%s,,,%s,,,") a0 a1) /// A generic construct requires that the type '%s' have reference semantics, but it does not, i.e. it is a struct - /// (Originally from ..\FSComp.txt:328) + /// (Originally from ..\FSComp.txt:327) static member csGenericConstructRequiresReferenceSemantics(a0 : System.String) = (GetStringFunc("csGenericConstructRequiresReferenceSemantics",",,,%s,,,") a0) /// A generic construct requires that the type '%s' be non-abstract - /// (Originally from ..\FSComp.txt:329) + /// (Originally from ..\FSComp.txt:328) static member csGenericConstructRequiresNonAbstract(a0 : System.String) = (GetStringFunc("csGenericConstructRequiresNonAbstract",",,,%s,,,") a0) /// A generic construct requires that the type '%s' have a public default constructor - /// (Originally from ..\FSComp.txt:330) + /// (Originally from ..\FSComp.txt:329) static member csGenericConstructRequiresPublicDefaultConstructor(a0 : System.String) = (GetStringFunc("csGenericConstructRequiresPublicDefaultConstructor",",,,%s,,,") a0) /// Type instantiation length mismatch - /// (Originally from ..\FSComp.txt:331) + /// (Originally from ..\FSComp.txt:330) static member csTypeInstantiationLengthMismatch() = (483, GetStringFunc("csTypeInstantiationLengthMismatch",",,,") ) /// Optional arguments not permitted here - /// (Originally from ..\FSComp.txt:332) + /// (Originally from ..\FSComp.txt:331) static member csOptionalArgumentNotPermittedHere() = (484, GetStringFunc("csOptionalArgumentNotPermittedHere",",,,") ) /// %s is not a static member - /// (Originally from ..\FSComp.txt:333) + /// (Originally from ..\FSComp.txt:332) static member csMemberIsNotStatic(a0 : System.String) = (485, GetStringFunc("csMemberIsNotStatic",",,,%s,,,") a0) /// %s is not an instance member - /// (Originally from ..\FSComp.txt:334) + /// (Originally from ..\FSComp.txt:333) static member csMemberIsNotInstance(a0 : System.String) = (486, GetStringFunc("csMemberIsNotInstance",",,,%s,,,") a0) /// Argument length mismatch - /// (Originally from ..\FSComp.txt:335) + /// (Originally from ..\FSComp.txt:334) static member csArgumentLengthMismatch() = (487, GetStringFunc("csArgumentLengthMismatch",",,,") ) /// The argument types don't match - /// (Originally from ..\FSComp.txt:336) + /// (Originally from ..\FSComp.txt:335) static member csArgumentTypesDoNotMatch() = (488, GetStringFunc("csArgumentTypesDoNotMatch",",,,") ) /// This method expects a CLI 'params' parameter in this position. 'params' is a way of passing a variable number of arguments to a method in languages such as C#. Consider passing an array for this argument - /// (Originally from ..\FSComp.txt:337) + /// (Originally from ..\FSComp.txt:336) static member csMethodExpectsParams() = (489, GetStringFunc("csMethodExpectsParams",",,,") ) /// The member or object constructor '%s' is not %s - /// (Originally from ..\FSComp.txt:338) + /// (Originally from ..\FSComp.txt:337) static member csMemberIsNotAccessible(a0 : System.String, a1 : System.String) = (490, GetStringFunc("csMemberIsNotAccessible",",,,%s,,,%s,,,") a0 a1) /// The member or object constructor '%s' is not %s. Private members may only be accessed from within the declaring type. Protected members may only be accessed from an extending type and cannot be accessed from inner lambda expressions. - /// (Originally from ..\FSComp.txt:339) + /// (Originally from ..\FSComp.txt:338) static member csMemberIsNotAccessible2(a0 : System.String, a1 : System.String) = (491, GetStringFunc("csMemberIsNotAccessible2",",,,%s,,,%s,,,") a0 a1) /// %s is not a static method - /// (Originally from ..\FSComp.txt:340) + /// (Originally from ..\FSComp.txt:339) static member csMethodIsNotAStaticMethod(a0 : System.String) = (492, GetStringFunc("csMethodIsNotAStaticMethod",",,,%s,,,") a0) /// %s is not an instance method - /// (Originally from ..\FSComp.txt:341) + /// (Originally from ..\FSComp.txt:340) static member csMethodIsNotAnInstanceMethod(a0 : System.String) = (493, GetStringFunc("csMethodIsNotAnInstanceMethod",",,,%s,,,") a0) /// The member or object constructor '%s' has no argument or settable return property '%s'. %s. - /// (Originally from ..\FSComp.txt:342) + /// (Originally from ..\FSComp.txt:341) static member csMemberHasNoArgumentOrReturnProperty(a0 : System.String, a1 : System.String, a2 : System.String) = (GetStringFunc("csMemberHasNoArgumentOrReturnProperty",",,,%s,,,%s,,,%s,,,") a0 a1 a2) /// The object constructor '%s' has no argument or settable return property '%s'. %s. - /// (Originally from ..\FSComp.txt:343) + /// (Originally from ..\FSComp.txt:342) static member csCtorHasNoArgumentOrReturnProperty(a0 : System.String, a1 : System.String, a2 : System.String) = (GetStringFunc("csCtorHasNoArgumentOrReturnProperty",",,,%s,,,%s,,,%s,,,") a0 a1 a2) /// The required signature is %s - /// (Originally from ..\FSComp.txt:344) + /// (Originally from ..\FSComp.txt:343) static member csRequiredSignatureIs(a0 : System.String) = (495, GetStringFunc("csRequiredSignatureIs",",,,%s,,,") a0) /// The member or object constructor '%s' requires %d argument(s). The required signature is '%s'. - /// (Originally from ..\FSComp.txt:345) + /// (Originally from ..\FSComp.txt:344) static member csMemberSignatureMismatch(a0 : System.String, a1 : System.Int32, a2 : System.String) = (496, GetStringFunc("csMemberSignatureMismatch",",,,%s,,,%d,,,%s,,,") a0 a1 a2) /// The member or object constructor '%s' requires %d additional argument(s). The required signature is '%s'. - /// (Originally from ..\FSComp.txt:346) + /// (Originally from ..\FSComp.txt:345) static member csMemberSignatureMismatch2(a0 : System.String, a1 : System.Int32, a2 : System.String) = (497, GetStringFunc("csMemberSignatureMismatch2",",,,%s,,,%d,,,%s,,,") a0 a1 a2) /// The member or object constructor '%s' requires %d argument(s). The required signature is '%s'. Some names for missing arguments are %s. - /// (Originally from ..\FSComp.txt:347) + /// (Originally from ..\FSComp.txt:346) static member csMemberSignatureMismatch3(a0 : System.String, a1 : System.Int32, a2 : System.String, a3 : System.String) = (498, GetStringFunc("csMemberSignatureMismatch3",",,,%s,,,%d,,,%s,,,%s,,,") a0 a1 a2 a3) /// The member or object constructor '%s' requires %d additional argument(s). The required signature is '%s'. Some names for missing arguments are %s. - /// (Originally from ..\FSComp.txt:348) + /// (Originally from ..\FSComp.txt:347) static member csMemberSignatureMismatch4(a0 : System.String, a1 : System.Int32, a2 : System.String, a3 : System.String) = (499, GetStringFunc("csMemberSignatureMismatch4",",,,%s,,,%d,,,%s,,,%s,,,") a0 a1 a2 a3) /// The member or object constructor '%s' requires %d argument(s) but is here given %d unnamed and %d named argument(s). The required signature is '%s'. - /// (Originally from ..\FSComp.txt:349) + /// (Originally from ..\FSComp.txt:348) static member csMemberSignatureMismatchArityNamed(a0 : System.String, a1 : System.Int32, a2 : System.Int32, a3 : System.Int32, a4 : System.String) = (500, GetStringFunc("csMemberSignatureMismatchArityNamed",",,,%s,,,%d,,,%d,,,%d,,,%s,,,") a0 a1 a2 a3 a4) /// The member or object constructor '%s' takes %d argument(s) but is here given %d. The required signature is '%s'. - /// (Originally from ..\FSComp.txt:350) + /// (Originally from ..\FSComp.txt:349) static member csMemberSignatureMismatchArity(a0 : System.String, a1 : System.Int32, a2 : System.Int32, a3 : System.String) = (501, GetStringFunc("csMemberSignatureMismatchArity",",,,%s,,,%d,,,%d,,,%s,,,") a0 a1 a2 a3) /// The object constructor '%s' takes %d argument(s) but is here given %d. The required signature is '%s'. - /// (Originally from ..\FSComp.txt:351) + /// (Originally from ..\FSComp.txt:350) static member csCtorSignatureMismatchArity(a0 : System.String, a1 : System.Int32, a2 : System.Int32, a3 : System.String) = (501, GetStringFunc("csCtorSignatureMismatchArity",",,,%s,,,%d,,,%d,,,%s,,,") a0 a1 a2 a3) /// The object constructor '%s' takes %d argument(s) but is here given %d. The required signature is '%s'. If some of the arguments are meant to assign values to properties, consider separating those arguments with a comma (','). - /// (Originally from ..\FSComp.txt:352) + /// (Originally from ..\FSComp.txt:351) static member csCtorSignatureMismatchArityProp(a0 : System.String, a1 : System.Int32, a2 : System.Int32, a3 : System.String) = (501, GetStringFunc("csCtorSignatureMismatchArityProp",",,,%s,,,%d,,,%d,,,%s,,,") a0 a1 a2 a3) /// The member or object constructor '%s' takes %d type argument(s) but is here given %d. The required signature is '%s'. - /// (Originally from ..\FSComp.txt:353) + /// (Originally from ..\FSComp.txt:352) static member csMemberSignatureMismatchArityType(a0 : System.String, a1 : System.Int32, a2 : System.Int32, a3 : System.String) = (502, GetStringFunc("csMemberSignatureMismatchArityType",",,,%s,,,%d,,,%d,,,%s,,,") a0 a1 a2 a3) /// A member or object constructor '%s' taking %d arguments is not accessible from this code location. All accessible versions of method '%s' take %d arguments. - /// (Originally from ..\FSComp.txt:354) + /// (Originally from ..\FSComp.txt:353) static member csMemberNotAccessible(a0 : System.String, a1 : System.Int32, a2 : System.String, a3 : System.Int32) = (503, GetStringFunc("csMemberNotAccessible",",,,%s,,,%d,,,%s,,,%d,,,") a0 a1 a2 a3) /// Incorrect generic instantiation. No %s member named '%s' takes %d generic arguments. - /// (Originally from ..\FSComp.txt:355) + /// (Originally from ..\FSComp.txt:354) static member csIncorrectGenericInstantiation(a0 : System.String, a1 : System.String, a2 : System.Int32) = (504, GetStringFunc("csIncorrectGenericInstantiation",",,,%s,,,%s,,,%d,,,") a0 a1 a2) /// The member or object constructor '%s' does not take %d argument(s). An overload was found taking %d arguments. - /// (Originally from ..\FSComp.txt:356) + /// (Originally from ..\FSComp.txt:355) static member csMemberOverloadArityMismatch(a0 : System.String, a1 : System.Int32, a2 : System.Int32) = (505, GetStringFunc("csMemberOverloadArityMismatch",",,,%s,,,%d,,,%d,,,") a0 a1 a2) /// No %s member or object constructor named '%s' takes %d arguments - /// (Originally from ..\FSComp.txt:357) + /// (Originally from ..\FSComp.txt:356) static member csNoMemberTakesTheseArguments(a0 : System.String, a1 : System.String, a2 : System.Int32) = (506, GetStringFunc("csNoMemberTakesTheseArguments",",,,%s,,,%s,,,%d,,,") a0 a1 a2) /// No %s member or object constructor named '%s' takes %d arguments. Note the call to this member also provides %d named arguments. - /// (Originally from ..\FSComp.txt:358) + /// (Originally from ..\FSComp.txt:357) static member csNoMemberTakesTheseArguments2(a0 : System.String, a1 : System.String, a2 : System.Int32, a3 : System.Int32) = (507, GetStringFunc("csNoMemberTakesTheseArguments2",",,,%s,,,%s,,,%d,,,%d,,,") a0 a1 a2 a3) /// No %s member or object constructor named '%s' takes %d arguments. The named argument '%s' doesn't correspond to any argument or settable return property for any overload. - /// (Originally from ..\FSComp.txt:359) + /// (Originally from ..\FSComp.txt:358) static member csNoMemberTakesTheseArguments3(a0 : System.String, a1 : System.String, a2 : System.Int32, a3 : System.String) = (508, GetStringFunc("csNoMemberTakesTheseArguments3",",,,%s,,,%s,,,%d,,,%s,,,") a0 a1 a2 a3) /// Method or object constructor '%s' not found - /// (Originally from ..\FSComp.txt:360) + /// (Originally from ..\FSComp.txt:359) static member csMethodNotFound(a0 : System.String) = (509, GetStringFunc("csMethodNotFound",",,,%s,,,") a0) /// No overloads match for method '%s'. - /// (Originally from ..\FSComp.txt:361) + /// (Originally from ..\FSComp.txt:360) static member csNoOverloadsFound(a0 : System.String) = (GetStringFunc("csNoOverloadsFound",",,,%s,,,") a0) /// A unique overload for method '%s' could not be determined based on type information prior to this program point. A type annotation may be needed. - /// (Originally from ..\FSComp.txt:362) + /// (Originally from ..\FSComp.txt:361) static member csMethodIsOverloaded(a0 : System.String) = (GetStringFunc("csMethodIsOverloaded",",,,%s,,,") a0) /// Candidates: %s - /// (Originally from ..\FSComp.txt:363) + /// (Originally from ..\FSComp.txt:362) static member csCandidates(a0 : System.String) = (GetStringFunc("csCandidates",",,,%s,,,") a0) /// The available overloads are shown below. - /// (Originally from ..\FSComp.txt:364) + /// (Originally from ..\FSComp.txt:363) static member csSeeAvailableOverloads() = (GetStringFunc("csSeeAvailableOverloads",",,,") ) /// Accessibility modifiers are not permitted on 'do' bindings, but '%s' was given. - /// (Originally from ..\FSComp.txt:365) + /// (Originally from ..\FSComp.txt:364) static member parsDoCannotHaveVisibilityDeclarations(a0 : System.String) = (512, GetStringFunc("parsDoCannotHaveVisibilityDeclarations",",,,%s,,,") a0) /// End of file in #if section begun at or after here - /// (Originally from ..\FSComp.txt:366) + /// (Originally from ..\FSComp.txt:365) static member parsEofInHashIf() = (513, GetStringFunc("parsEofInHashIf",",,,") ) /// End of file in string begun at or before here - /// (Originally from ..\FSComp.txt:367) + /// (Originally from ..\FSComp.txt:366) static member parsEofInString() = (514, GetStringFunc("parsEofInString",",,,") ) /// End of file in verbatim string begun at or before here - /// (Originally from ..\FSComp.txt:368) + /// (Originally from ..\FSComp.txt:367) static member parsEofInVerbatimString() = (515, GetStringFunc("parsEofInVerbatimString",",,,") ) /// End of file in comment begun at or before here - /// (Originally from ..\FSComp.txt:369) + /// (Originally from ..\FSComp.txt:368) static member parsEofInComment() = (516, GetStringFunc("parsEofInComment",",,,") ) /// End of file in string embedded in comment begun at or before here - /// (Originally from ..\FSComp.txt:370) + /// (Originally from ..\FSComp.txt:369) static member parsEofInStringInComment() = (517, GetStringFunc("parsEofInStringInComment",",,,") ) /// End of file in verbatim string embedded in comment begun at or before here - /// (Originally from ..\FSComp.txt:371) + /// (Originally from ..\FSComp.txt:370) static member parsEofInVerbatimStringInComment() = (518, GetStringFunc("parsEofInVerbatimStringInComment",",,,") ) /// End of file in IF-OCAML section begun at or before here - /// (Originally from ..\FSComp.txt:372) + /// (Originally from ..\FSComp.txt:371) static member parsEofInIfOcaml() = (519, GetStringFunc("parsEofInIfOcaml",",,,") ) /// End of file in directive begun at or before here - /// (Originally from ..\FSComp.txt:373) + /// (Originally from ..\FSComp.txt:372) static member parsEofInDirective() = (520, GetStringFunc("parsEofInDirective",",,,") ) /// No #endif found for #if or #else - /// (Originally from ..\FSComp.txt:374) + /// (Originally from ..\FSComp.txt:373) static member parsNoHashEndIfFound() = (521, GetStringFunc("parsNoHashEndIfFound",",,,") ) /// Attributes have been ignored in this construct - /// (Originally from ..\FSComp.txt:375) + /// (Originally from ..\FSComp.txt:374) static member parsAttributesIgnored() = (522, GetStringFunc("parsAttributesIgnored",",,,") ) /// 'use' bindings are not permitted in primary constructors - /// (Originally from ..\FSComp.txt:376) + /// (Originally from ..\FSComp.txt:375) static member parsUseBindingsIllegalInImplicitClassConstructors() = (523, GetStringFunc("parsUseBindingsIllegalInImplicitClassConstructors",",,,") ) /// 'use' bindings are not permitted in modules and are treated as 'let' bindings - /// (Originally from ..\FSComp.txt:377) + /// (Originally from ..\FSComp.txt:376) static member parsUseBindingsIllegalInModules() = (524, GetStringFunc("parsUseBindingsIllegalInModules",",,,") ) /// An integer for loop must use a simple identifier - /// (Originally from ..\FSComp.txt:378) + /// (Originally from ..\FSComp.txt:377) static member parsIntegerForLoopRequiresSimpleIdentifier() = (525, GetStringFunc("parsIntegerForLoopRequiresSimpleIdentifier",",,,") ) /// At most one 'with' augmentation is permitted - /// (Originally from ..\FSComp.txt:379) + /// (Originally from ..\FSComp.txt:378) static member parsOnlyOneWithAugmentationAllowed() = (526, GetStringFunc("parsOnlyOneWithAugmentationAllowed",",,,") ) /// A semicolon is not expected at this point - /// (Originally from ..\FSComp.txt:380) + /// (Originally from ..\FSComp.txt:379) static member parsUnexpectedSemicolon() = (527, GetStringFunc("parsUnexpectedSemicolon",",,,") ) /// Unexpected end of input - /// (Originally from ..\FSComp.txt:381) + /// (Originally from ..\FSComp.txt:380) static member parsUnexpectedEndOfFile() = (528, GetStringFunc("parsUnexpectedEndOfFile",",,,") ) /// Accessibility modifiers are not permitted here, but '%s' was given. - /// (Originally from ..\FSComp.txt:382) + /// (Originally from ..\FSComp.txt:381) static member parsUnexpectedVisibilityDeclaration(a0 : System.String) = (529, GetStringFunc("parsUnexpectedVisibilityDeclaration",",,,%s,,,") a0) /// Only '#' compiler directives may occur prior to the first 'namespace' declaration - /// (Originally from ..\FSComp.txt:383) + /// (Originally from ..\FSComp.txt:382) static member parsOnlyHashDirectivesAllowed() = (530, GetStringFunc("parsOnlyHashDirectivesAllowed",",,,") ) /// Accessibility modifiers should come immediately prior to the identifier naming a construct - /// (Originally from ..\FSComp.txt:384) + /// (Originally from ..\FSComp.txt:383) static member parsVisibilityDeclarationsShouldComePriorToIdentifier() = (531, GetStringFunc("parsVisibilityDeclarationsShouldComePriorToIdentifier",",,,") ) /// Files should begin with either a namespace or module declaration, e.g. 'namespace SomeNamespace.SubNamespace' or 'module SomeNamespace.SomeModule', but not both. To define a module within a namespace use 'module SomeModule = ...' - /// (Originally from ..\FSComp.txt:385) + /// (Originally from ..\FSComp.txt:384) static member parsNamespaceOrModuleNotBoth() = (532, GetStringFunc("parsNamespaceOrModuleNotBoth",",,,") ) /// A module abbreviation must be a simple name, not a path - /// (Originally from ..\FSComp.txt:386) + /// (Originally from ..\FSComp.txt:385) static member parsModuleAbbreviationMustBeSimpleName() = (534, GetStringFunc("parsModuleAbbreviationMustBeSimpleName",",,,") ) /// Ignoring attributes on module abbreviation - /// (Originally from ..\FSComp.txt:387) + /// (Originally from ..\FSComp.txt:386) static member parsIgnoreAttributesOnModuleAbbreviation() = (535, GetStringFunc("parsIgnoreAttributesOnModuleAbbreviation",",,,") ) /// The '%s' accessibility attribute is not allowed on module abbreviation. Module abbreviations are always private. - /// (Originally from ..\FSComp.txt:388) + /// (Originally from ..\FSComp.txt:387) static member parsIgnoreAttributesOnModuleAbbreviationAlwaysPrivate(a0 : System.String) = (536, GetStringFunc("parsIgnoreAttributesOnModuleAbbreviationAlwaysPrivate",",,,%s,,,") a0) /// The '%s' visibility attribute is not allowed on module abbreviation. Module abbreviations are always private. - /// (Originally from ..\FSComp.txt:389) + /// (Originally from ..\FSComp.txt:388) static member parsIgnoreVisibilityOnModuleAbbreviationAlwaysPrivate(a0 : System.String) = (537, GetStringFunc("parsIgnoreVisibilityOnModuleAbbreviationAlwaysPrivate",",,,%s,,,") a0) /// Unclosed block - /// (Originally from ..\FSComp.txt:390) + /// (Originally from ..\FSComp.txt:389) static member parsUnClosedBlockInHashLight() = (538, GetStringFunc("parsUnClosedBlockInHashLight",",,,") ) /// Unmatched 'begin' or 'struct' - /// (Originally from ..\FSComp.txt:391) + /// (Originally from ..\FSComp.txt:390) static member parsUnmatchedBeginOrStruct() = (539, GetStringFunc("parsUnmatchedBeginOrStruct",",,,") ) /// A module name must be a simple name, not a path - /// (Originally from ..\FSComp.txt:392) + /// (Originally from ..\FSComp.txt:391) static member parsModuleDefnMustBeSimpleName() = (541, GetStringFunc("parsModuleDefnMustBeSimpleName",",,,") ) /// Unexpected empty type moduleDefn list - /// (Originally from ..\FSComp.txt:393) + /// (Originally from ..\FSComp.txt:392) static member parsUnexpectedEmptyModuleDefn() = (542, GetStringFunc("parsUnexpectedEmptyModuleDefn",",,,") ) /// Attributes should be placed before 'val' - /// (Originally from ..\FSComp.txt:394) + /// (Originally from ..\FSComp.txt:393) static member parsAttributesMustComeBeforeVal() = (GetStringFunc("parsAttributesMustComeBeforeVal",",,,") ) /// Attributes are not permitted on interface implementations - /// (Originally from ..\FSComp.txt:395) + /// (Originally from ..\FSComp.txt:394) static member parsAttributesAreNotPermittedOnInterfaceImplementations() = (543, GetStringFunc("parsAttributesAreNotPermittedOnInterfaceImplementations",",,,") ) /// Syntax error - /// (Originally from ..\FSComp.txt:396) + /// (Originally from ..\FSComp.txt:395) static member parsSyntaxError() = (544, GetStringFunc("parsSyntaxError",",,,") ) /// Augmentations are not permitted on delegate type moduleDefns - /// (Originally from ..\FSComp.txt:397) + /// (Originally from ..\FSComp.txt:396) static member parsAugmentationsIllegalOnDelegateType() = (545, GetStringFunc("parsAugmentationsIllegalOnDelegateType",",,,") ) /// Unmatched 'class', 'interface' or 'struct' - /// (Originally from ..\FSComp.txt:398) + /// (Originally from ..\FSComp.txt:397) static member parsUnmatchedClassInterfaceOrStruct() = (546, GetStringFunc("parsUnmatchedClassInterfaceOrStruct",",,,") ) /// A type definition requires one or more members or other declarations. If you intend to define an empty class, struct or interface, then use 'type ... = class end', 'interface end' or 'struct end'. - /// (Originally from ..\FSComp.txt:399) + /// (Originally from ..\FSComp.txt:398) static member parsEmptyTypeDefinition() = (547, GetStringFunc("parsEmptyTypeDefinition",",,,") ) /// Unmatched 'with' or badly formatted 'with' block - /// (Originally from ..\FSComp.txt:400) + /// (Originally from ..\FSComp.txt:399) static member parsUnmatchedWith() = (550, GetStringFunc("parsUnmatchedWith",",,,") ) /// 'get', 'set' or 'get,set' required - /// (Originally from ..\FSComp.txt:401) + /// (Originally from ..\FSComp.txt:400) static member parsGetOrSetRequired() = (551, GetStringFunc("parsGetOrSetRequired",",,,") ) /// Only class types may take value arguments - /// (Originally from ..\FSComp.txt:402) + /// (Originally from ..\FSComp.txt:401) static member parsOnlyClassCanTakeValueArguments() = (552, GetStringFunc("parsOnlyClassCanTakeValueArguments",",,,") ) /// Unmatched 'begin' - /// (Originally from ..\FSComp.txt:403) + /// (Originally from ..\FSComp.txt:402) static member parsUnmatchedBegin() = (553, GetStringFunc("parsUnmatchedBegin",",,,") ) /// Invalid declaration syntax - /// (Originally from ..\FSComp.txt:404) + /// (Originally from ..\FSComp.txt:403) static member parsInvalidDeclarationSyntax() = (554, GetStringFunc("parsInvalidDeclarationSyntax",",,,") ) /// 'get' and/or 'set' required - /// (Originally from ..\FSComp.txt:405) + /// (Originally from ..\FSComp.txt:404) static member parsGetAndOrSetRequired() = (555, GetStringFunc("parsGetAndOrSetRequired",",,,") ) /// Type annotations on property getters and setters must be given after the 'get()' or 'set(v)', e.g. 'with get() : string = ...' - /// (Originally from ..\FSComp.txt:406) + /// (Originally from ..\FSComp.txt:405) static member parsTypeAnnotationsOnGetSet() = (556, GetStringFunc("parsTypeAnnotationsOnGetSet",",,,") ) /// A getter property is expected to be a function, e.g. 'get() = ...' or 'get(index) = ...' - /// (Originally from ..\FSComp.txt:407) + /// (Originally from ..\FSComp.txt:406) static member parsGetterMustHaveAtLeastOneArgument() = (557, GetStringFunc("parsGetterMustHaveAtLeastOneArgument",",,,") ) /// Multiple accessibilities given for property getter or setter - /// (Originally from ..\FSComp.txt:408) + /// (Originally from ..\FSComp.txt:407) static member parsMultipleAccessibilitiesForGetSet() = (558, GetStringFunc("parsMultipleAccessibilitiesForGetSet",",,,") ) /// Property setters must be defined using 'set value = ', 'set idx value = ' or 'set (idx1,...,idxN) value = ... ' - /// (Originally from ..\FSComp.txt:409) + /// (Originally from ..\FSComp.txt:408) static member parsSetSyntax() = (559, GetStringFunc("parsSetSyntax",",,,") ) /// Interfaces always have the same visibility as the enclosing type - /// (Originally from ..\FSComp.txt:410) + /// (Originally from ..\FSComp.txt:409) static member parsInterfacesHaveSameVisibilityAsEnclosingType() = (560, GetStringFunc("parsInterfacesHaveSameVisibilityAsEnclosingType",",,,") ) /// Accessibility modifiers are not allowed on this member. Abstract slots always have the same visibility as the enclosing type. - /// (Originally from ..\FSComp.txt:411) + /// (Originally from ..\FSComp.txt:410) static member parsAccessibilityModsIllegalForAbstract() = (561, GetStringFunc("parsAccessibilityModsIllegalForAbstract",",,,") ) /// Attributes are not permitted on 'inherit' declarations - /// (Originally from ..\FSComp.txt:412) + /// (Originally from ..\FSComp.txt:411) static member parsAttributesIllegalOnInherit() = (562, GetStringFunc("parsAttributesIllegalOnInherit",",,,") ) /// Accessibility modifiers are not permitted on an 'inherits' declaration - /// (Originally from ..\FSComp.txt:413) + /// (Originally from ..\FSComp.txt:412) static member parsVisibilityIllegalOnInherit() = (563, GetStringFunc("parsVisibilityIllegalOnInherit",",,,") ) /// 'inherit' declarations cannot have 'as' bindings. To access members of the base class when overriding a method, the syntax 'base.SomeMember' may be used; 'base' is a keyword. Remove this 'as' binding. - /// (Originally from ..\FSComp.txt:414) + /// (Originally from ..\FSComp.txt:413) static member parsInheritDeclarationsCannotHaveAsBindings() = (564, GetStringFunc("parsInheritDeclarationsCannotHaveAsBindings",",,,") ) /// Attributes are not allowed here - /// (Originally from ..\FSComp.txt:415) + /// (Originally from ..\FSComp.txt:414) static member parsAttributesIllegalHere() = (565, GetStringFunc("parsAttributesIllegalHere",",,,") ) /// Accessibility modifiers are not permitted in this position for type abbreviations - /// (Originally from ..\FSComp.txt:416) + /// (Originally from ..\FSComp.txt:415) static member parsTypeAbbreviationsCannotHaveVisibilityDeclarations() = (566, GetStringFunc("parsTypeAbbreviationsCannotHaveVisibilityDeclarations",",,,") ) /// Accessibility modifiers are not permitted in this position for enum types - /// (Originally from ..\FSComp.txt:417) + /// (Originally from ..\FSComp.txt:416) static member parsEnumTypesCannotHaveVisibilityDeclarations() = (567, GetStringFunc("parsEnumTypesCannotHaveVisibilityDeclarations",",,,") ) /// All enum fields must be given values - /// (Originally from ..\FSComp.txt:418) + /// (Originally from ..\FSComp.txt:417) static member parsAllEnumFieldsRequireValues() = (568, GetStringFunc("parsAllEnumFieldsRequireValues",",,,") ) /// Accessibility modifiers are not permitted on inline assembly code types - /// (Originally from ..\FSComp.txt:419) + /// (Originally from ..\FSComp.txt:418) static member parsInlineAssemblyCannotHaveVisibilityDeclarations() = (569, GetStringFunc("parsInlineAssemblyCannotHaveVisibilityDeclarations",",,,") ) /// Unexpected identifier: '%s' - /// (Originally from ..\FSComp.txt:420) + /// (Originally from ..\FSComp.txt:419) static member parsUnexpectedIdentifier(a0 : System.String) = (571, GetStringFunc("parsUnexpectedIdentifier",",,,%s,,,") a0) /// Accessibility modifiers are not permitted on union cases. Use 'type U = internal ...' or 'type U = private ...' to give an accessibility to the whole representation. - /// (Originally from ..\FSComp.txt:421) + /// (Originally from ..\FSComp.txt:420) static member parsUnionCasesCannotHaveVisibilityDeclarations() = (572, GetStringFunc("parsUnionCasesCannotHaveVisibilityDeclarations",",,,") ) /// Accessibility modifiers are not permitted on enumeration fields - /// (Originally from ..\FSComp.txt:422) + /// (Originally from ..\FSComp.txt:421) static member parsEnumFieldsCannotHaveVisibilityDeclarations() = (573, GetStringFunc("parsEnumFieldsCannotHaveVisibilityDeclarations",",,,") ) /// Consider using a separate record type instead - /// (Originally from ..\FSComp.txt:423) + /// (Originally from ..\FSComp.txt:422) static member parsConsiderUsingSeparateRecordType() = (GetStringFunc("parsConsiderUsingSeparateRecordType",",,,") ) /// Accessibility modifiers are not permitted on record fields. Use 'type R = internal ...' or 'type R = private ...' to give an accessibility to the whole representation. - /// (Originally from ..\FSComp.txt:424) + /// (Originally from ..\FSComp.txt:423) static member parsRecordFieldsCannotHaveVisibilityDeclarations() = (575, GetStringFunc("parsRecordFieldsCannotHaveVisibilityDeclarations",",,,") ) /// The declaration form 'let ... and ...' for non-recursive bindings is not used in F# code. Consider using a sequence of 'let' bindings - /// (Originally from ..\FSComp.txt:425) + /// (Originally from ..\FSComp.txt:424) static member parsLetAndForNonRecBindings() = (576, GetStringFunc("parsLetAndForNonRecBindings",",,,") ) /// Unmatched '(' - /// (Originally from ..\FSComp.txt:426) + /// (Originally from ..\FSComp.txt:425) static member parsUnmatchedParen() = (583, GetStringFunc("parsUnmatchedParen",",,,") ) /// Successive patterns should be separated by spaces or tupled - /// (Originally from ..\FSComp.txt:427) + /// (Originally from ..\FSComp.txt:426) static member parsSuccessivePatternsShouldBeSpacedOrTupled() = (584, GetStringFunc("parsSuccessivePatternsShouldBeSpacedOrTupled",",,,") ) /// No matching 'in' found for this 'let' - /// (Originally from ..\FSComp.txt:428) + /// (Originally from ..\FSComp.txt:427) static member parsNoMatchingInForLet() = (586, GetStringFunc("parsNoMatchingInForLet",",,,") ) /// Error in the return expression for this 'let'. Possible incorrect indentation. - /// (Originally from ..\FSComp.txt:429) + /// (Originally from ..\FSComp.txt:428) static member parsErrorInReturnForLetIncorrectIndentation() = (587, GetStringFunc("parsErrorInReturnForLetIncorrectIndentation",",,,") ) /// The block following this '%s' is unfinished. Every code block is an expression and must have a result. '%s' cannot be the final code element in a block. Consider giving this block an explicit result. - /// (Originally from ..\FSComp.txt:430) + /// (Originally from ..\FSComp.txt:429) static member parsExpectedExpressionAfterLet(a0 : System.String, a1 : System.String) = (588, GetStringFunc("parsExpectedExpressionAfterLet",",,,%s,,,%s,,,") a0 a1) /// Incomplete conditional. Expected 'if then ' or 'if then else '. - /// (Originally from ..\FSComp.txt:431) + /// (Originally from ..\FSComp.txt:430) static member parsIncompleteIf() = (589, GetStringFunc("parsIncompleteIf",",,,") ) /// 'assert' may not be used as a first class value. Use 'assert ' instead. - /// (Originally from ..\FSComp.txt:432) + /// (Originally from ..\FSComp.txt:431) static member parsAssertIsNotFirstClassValue() = (590, GetStringFunc("parsAssertIsNotFirstClassValue",",,,") ) /// Identifier expected - /// (Originally from ..\FSComp.txt:433) + /// (Originally from ..\FSComp.txt:432) static member parsIdentifierExpected() = (594, GetStringFunc("parsIdentifierExpected",",,,") ) /// 'in' or '=' expected - /// (Originally from ..\FSComp.txt:434) + /// (Originally from ..\FSComp.txt:433) static member parsInOrEqualExpected() = (595, GetStringFunc("parsInOrEqualExpected",",,,") ) /// The use of '->' in sequence and computation expressions is limited to the form 'for pat in expr -> expr'. Use the syntax 'for ... in ... do ... yield...' to generate elements in more complex sequence expressions. - /// (Originally from ..\FSComp.txt:435) + /// (Originally from ..\FSComp.txt:434) static member parsArrowUseIsLimited() = (596, GetStringFunc("parsArrowUseIsLimited",",,,") ) /// Successive arguments should be separated by spaces or tupled, and arguments involving function or method applications should be parenthesized - /// (Originally from ..\FSComp.txt:436) + /// (Originally from ..\FSComp.txt:435) static member parsSuccessiveArgsShouldBeSpacedOrTupled() = (597, GetStringFunc("parsSuccessiveArgsShouldBeSpacedOrTupled",",,,") ) /// Unmatched '[' - /// (Originally from ..\FSComp.txt:437) + /// (Originally from ..\FSComp.txt:436) static member parsUnmatchedBracket() = (598, GetStringFunc("parsUnmatchedBracket",",,,") ) /// Missing qualification after '.' - /// (Originally from ..\FSComp.txt:438) + /// (Originally from ..\FSComp.txt:437) static member parsMissingQualificationAfterDot() = (599, GetStringFunc("parsMissingQualificationAfterDot",",,,") ) /// In F# code you may use 'expr.[expr]'. A type annotation may be required to indicate the first expression is an array - /// (Originally from ..\FSComp.txt:439) + /// (Originally from ..\FSComp.txt:438) static member parsParenFormIsForML() = (GetStringFunc("parsParenFormIsForML",",,,") ) /// Mismatched quotation, beginning with '%s' - /// (Originally from ..\FSComp.txt:440) + /// (Originally from ..\FSComp.txt:439) static member parsMismatchedQuote(a0 : System.String) = (601, GetStringFunc("parsMismatchedQuote",",,,%s,,,") a0) /// Unmatched '%s' - /// (Originally from ..\FSComp.txt:441) + /// (Originally from ..\FSComp.txt:440) static member parsUnmatched(a0 : System.String) = (602, GetStringFunc("parsUnmatched",",,,%s,,,") a0) /// Unmatched '[|' - /// (Originally from ..\FSComp.txt:442) + /// (Originally from ..\FSComp.txt:441) static member parsUnmatchedBracketBar() = (603, GetStringFunc("parsUnmatchedBracketBar",",,,") ) /// Unmatched '{' - /// (Originally from ..\FSComp.txt:443) + /// (Originally from ..\FSComp.txt:442) static member parsUnmatchedBrace() = (604, GetStringFunc("parsUnmatchedBrace",",,,") ) /// Field bindings must have the form 'id = expr;' - /// (Originally from ..\FSComp.txt:444) + /// (Originally from ..\FSComp.txt:443) static member parsFieldBinding() = (609, GetStringFunc("parsFieldBinding",",,,") ) /// This member is not permitted in an object implementation - /// (Originally from ..\FSComp.txt:445) + /// (Originally from ..\FSComp.txt:444) static member parsMemberIllegalInObjectImplementation() = (610, GetStringFunc("parsMemberIllegalInObjectImplementation",",,,") ) /// Missing function body - /// (Originally from ..\FSComp.txt:446) + /// (Originally from ..\FSComp.txt:445) static member parsMissingFunctionBody() = (611, GetStringFunc("parsMissingFunctionBody",",,,") ) /// Syntax error in labelled type argument - /// (Originally from ..\FSComp.txt:447) + /// (Originally from ..\FSComp.txt:446) static member parsSyntaxErrorInLabeledType() = (613, GetStringFunc("parsSyntaxErrorInLabeledType",",,,") ) /// Unexpected infix operator in type expression - /// (Originally from ..\FSComp.txt:448) + /// (Originally from ..\FSComp.txt:447) static member parsUnexpectedInfixOperator() = (615, GetStringFunc("parsUnexpectedInfixOperator",",,,") ) /// The syntax '(typ,...,typ) ident' is not used in F# code. Consider using 'ident' instead - /// (Originally from ..\FSComp.txt:449) + /// (Originally from ..\FSComp.txt:448) static member parsMultiArgumentGenericTypeFormDeprecated() = (GetStringFunc("parsMultiArgumentGenericTypeFormDeprecated",",,,") ) /// Invalid literal in type - /// (Originally from ..\FSComp.txt:450) + /// (Originally from ..\FSComp.txt:449) static member parsInvalidLiteralInType() = (618, GetStringFunc("parsInvalidLiteralInType",",,,") ) /// Unexpected infix operator in unit-of-measure expression. Legal operators are '*', '/' and '^'. - /// (Originally from ..\FSComp.txt:451) + /// (Originally from ..\FSComp.txt:450) static member parsUnexpectedOperatorForUnitOfMeasure() = (619, GetStringFunc("parsUnexpectedOperatorForUnitOfMeasure",",,,") ) /// Unexpected integer literal in unit-of-measure expression - /// (Originally from ..\FSComp.txt:452) + /// (Originally from ..\FSComp.txt:451) static member parsUnexpectedIntegerLiteralForUnitOfMeasure() = (620, GetStringFunc("parsUnexpectedIntegerLiteralForUnitOfMeasure",",,,") ) /// Syntax error: unexpected type parameter specification - /// (Originally from ..\FSComp.txt:453) + /// (Originally from ..\FSComp.txt:452) static member parsUnexpectedTypeParameter() = (621, GetStringFunc("parsUnexpectedTypeParameter",",,,") ) /// Mismatched quotation operator name, beginning with '%s' - /// (Originally from ..\FSComp.txt:454) + /// (Originally from ..\FSComp.txt:453) static member parsMismatchedQuotationName(a0 : System.String) = (622, GetStringFunc("parsMismatchedQuotationName",",,,%s,,,") a0) /// Active pattern case identifiers must begin with an uppercase letter - /// (Originally from ..\FSComp.txt:455) + /// (Originally from ..\FSComp.txt:454) static member parsActivePatternCaseMustBeginWithUpperCase() = (623, GetStringFunc("parsActivePatternCaseMustBeginWithUpperCase",",,,") ) /// The '|' character is not permitted in active pattern case identifiers - /// (Originally from ..\FSComp.txt:456) + /// (Originally from ..\FSComp.txt:455) static member parsActivePatternCaseContainsPipe() = (624, GetStringFunc("parsActivePatternCaseContainsPipe",",,,") ) /// Denominator must not be 0 in unit-of-measure exponent - /// (Originally from ..\FSComp.txt:457) + /// (Originally from ..\FSComp.txt:456) static member parsIllegalDenominatorForMeasureExponent() = (625, GetStringFunc("parsIllegalDenominatorForMeasureExponent",",,,") ) /// No '=' symbol should follow a 'namespace' declaration - /// (Originally from ..\FSComp.txt:458) + /// (Originally from ..\FSComp.txt:457) static member parsNoEqualShouldFollowNamespace() = (GetStringFunc("parsNoEqualShouldFollowNamespace",",,,") ) /// The syntax 'module ... = struct .. end' is not used in F# code. Consider using 'module ... = begin .. end' - /// (Originally from ..\FSComp.txt:459) + /// (Originally from ..\FSComp.txt:458) static member parsSyntaxModuleStructEndDeprecated() = (GetStringFunc("parsSyntaxModuleStructEndDeprecated",",,,") ) /// The syntax 'module ... : sig .. end' is not used in F# code. Consider using 'module ... = begin .. end' - /// (Originally from ..\FSComp.txt:460) + /// (Originally from ..\FSComp.txt:459) static member parsSyntaxModuleSigEndDeprecated() = (GetStringFunc("parsSyntaxModuleSigEndDeprecated",",,,") ) /// A static field was used where an instance field is expected - /// (Originally from ..\FSComp.txt:461) + /// (Originally from ..\FSComp.txt:460) static member tcStaticFieldUsedWhenInstanceFieldExpected() = (627, GetStringFunc("tcStaticFieldUsedWhenInstanceFieldExpected",",,,") ) /// Method '%s' is not accessible from this code location - /// (Originally from ..\FSComp.txt:462) + /// (Originally from ..\FSComp.txt:461) static member tcMethodNotAccessible(a0 : System.String) = (629, GetStringFunc("tcMethodNotAccessible",",,,%s,,,") a0) /// Implicit product of measures following / - /// (Originally from ..\FSComp.txt:464) + /// (Originally from ..\FSComp.txt:463) static member tcImplicitMeasureFollowingSlash() = (632, GetStringFunc("tcImplicitMeasureFollowingSlash",",,,") ) /// Unexpected SynMeasure.Anon - /// (Originally from ..\FSComp.txt:465) + /// (Originally from ..\FSComp.txt:464) static member tcUnexpectedMeasureAnon() = (633, GetStringFunc("tcUnexpectedMeasureAnon",",,,") ) /// Non-zero constants cannot have generic units. For generic zero, write 0.0<_>. - /// (Originally from ..\FSComp.txt:466) + /// (Originally from ..\FSComp.txt:465) static member tcNonZeroConstantCannotHaveGenericUnit() = (634, GetStringFunc("tcNonZeroConstantCannotHaveGenericUnit",",,,") ) /// In sequence expressions, results are generated using 'yield' - /// (Originally from ..\FSComp.txt:467) + /// (Originally from ..\FSComp.txt:466) static member tcSeqResultsUseYield() = (635, GetStringFunc("tcSeqResultsUseYield",",,,") ) /// Unexpected big rational constant - /// (Originally from ..\FSComp.txt:468) + /// (Originally from ..\FSComp.txt:467) static member tcUnexpectedBigRationalConstant() = (GetStringFunc("tcUnexpectedBigRationalConstant",",,,") ) /// Units-of-measure supported only on float, float32, decimal and signed integer types - /// (Originally from ..\FSComp.txt:469) + /// (Originally from ..\FSComp.txt:468) static member tcInvalidTypeForUnitsOfMeasure() = (636, GetStringFunc("tcInvalidTypeForUnitsOfMeasure",",,,") ) /// Unexpected Const_uint16array - /// (Originally from ..\FSComp.txt:470) + /// (Originally from ..\FSComp.txt:469) static member tcUnexpectedConstUint16Array() = (GetStringFunc("tcUnexpectedConstUint16Array",",,,") ) /// Unexpected Const_bytearray - /// (Originally from ..\FSComp.txt:471) + /// (Originally from ..\FSComp.txt:470) static member tcUnexpectedConstByteArray() = (GetStringFunc("tcUnexpectedConstByteArray",",,,") ) /// A parameter with attributes must also be given a name, e.g. '[] Name : Type' - /// (Originally from ..\FSComp.txt:472) + /// (Originally from ..\FSComp.txt:471) static member tcParameterRequiresName() = (640, GetStringFunc("tcParameterRequiresName",",,,") ) /// Return values cannot have names - /// (Originally from ..\FSComp.txt:473) + /// (Originally from ..\FSComp.txt:472) static member tcReturnValuesCannotHaveNames() = (641, GetStringFunc("tcReturnValuesCannotHaveNames",",,,") ) /// MemberKind.PropertyGetSet only expected in parse trees - /// (Originally from ..\FSComp.txt:474) + /// (Originally from ..\FSComp.txt:473) static member tcMemberKindPropertyGetSetNotExpected() = (GetStringFunc("tcMemberKindPropertyGetSetNotExpected",",,,") ) /// Namespaces cannot contain values. Consider using a module to hold your value declarations. - /// (Originally from ..\FSComp.txt:475) + /// (Originally from ..\FSComp.txt:474) static member tcNamespaceCannotContainValues() = (201, GetStringFunc("tcNamespaceCannotContainValues",",,,") ) /// Namespaces cannot contain extension members except in the same file and namespace declaration group where the type is defined. Consider using a module to hold declarations of extension members. - /// (Originally from ..\FSComp.txt:476) + /// (Originally from ..\FSComp.txt:475) static member tcNamespaceCannotContainExtensionMembers() = (644, GetStringFunc("tcNamespaceCannotContainExtensionMembers",",,,") ) /// Multiple visibility attributes have been specified for this identifier - /// (Originally from ..\FSComp.txt:477) + /// (Originally from ..\FSComp.txt:476) static member tcMultipleVisibilityAttributes() = (645, GetStringFunc("tcMultipleVisibilityAttributes",",,,") ) /// Multiple visibility attributes have been specified for this identifier. 'let' bindings in classes are always private, as are any 'let' bindings inside expressions. - /// (Originally from ..\FSComp.txt:478) + /// (Originally from ..\FSComp.txt:477) static member tcMultipleVisibilityAttributesWithLet() = (646, GetStringFunc("tcMultipleVisibilityAttributesWithLet",",,,") ) /// The name '(%s)' 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 '%s' instead. - /// (Originally from ..\FSComp.txt:479) + /// (Originally from ..\FSComp.txt:478) static member tcInvalidMethodNameForRelationalOperator(a0 : System.String, a1 : System.String) = (GetStringFunc("tcInvalidMethodNameForRelationalOperator",",,,%s,,,%s,,,") a0 a1) /// The name '(%s)' 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 '%s' instead. - /// (Originally from ..\FSComp.txt:480) + /// (Originally from ..\FSComp.txt:479) static member tcInvalidMethodNameForEquality(a0 : System.String, a1 : System.String) = (GetStringFunc("tcInvalidMethodNameForEquality",",,,%s,,,%s,,,") a0 a1) /// The name '(%s)' should not be used as a member name. If defining a static member for use from other CLI languages then use the name '%s' instead. - /// (Originally from ..\FSComp.txt:481) + /// (Originally from ..\FSComp.txt:480) static member tcInvalidMemberName(a0 : System.String, a1 : System.String) = (GetStringFunc("tcInvalidMemberName",",,,%s,,,%s,,,") a0 a1) /// The name '(%s)' should not be used as a member name because it is given a standard definition in the F# library over fixed types - /// (Originally from ..\FSComp.txt:482) + /// (Originally from ..\FSComp.txt:481) static member tcInvalidMemberNameFixedTypes(a0 : System.String) = (GetStringFunc("tcInvalidMemberNameFixedTypes",",,,%s,,,") a0) /// The '%s' operator should not normally be redefined. To define overloaded comparison semantics for a particular type, implement the 'System.IComparable' interface in the definition of that type. - /// (Originally from ..\FSComp.txt:483) + /// (Originally from ..\FSComp.txt:482) static member tcInvalidOperatorDefinitionRelational(a0 : System.String) = (GetStringFunc("tcInvalidOperatorDefinitionRelational",",,,%s,,,") a0) /// The '%s' operator should not normally be redefined. To define equality semantics for a type, override the 'Object.Equals' member in the definition of that type. - /// (Originally from ..\FSComp.txt:484) + /// (Originally from ..\FSComp.txt:483) static member tcInvalidOperatorDefinitionEquality(a0 : System.String) = (GetStringFunc("tcInvalidOperatorDefinitionEquality",",,,%s,,,") a0) /// The '%s' operator should not normally be redefined. Consider using a different operator name - /// (Originally from ..\FSComp.txt:485) + /// (Originally from ..\FSComp.txt:484) static member tcInvalidOperatorDefinition(a0 : System.String) = (GetStringFunc("tcInvalidOperatorDefinition",",,,%s,,,") a0) /// The '%s' operator cannot be redefined. Consider using a different operator name - /// (Originally from ..\FSComp.txt:486) + /// (Originally from ..\FSComp.txt:485) static member tcInvalidIndexOperatorDefinition(a0 : System.String) = (GetStringFunc("tcInvalidIndexOperatorDefinition",",,,%s,,,") a0) /// Expected module or namespace parent %s - /// (Originally from ..\FSComp.txt:487) + /// (Originally from ..\FSComp.txt:486) static member tcExpectModuleOrNamespaceParent(a0 : System.String) = (GetStringFunc("tcExpectModuleOrNamespaceParent",",,,%s,,,") a0) /// The struct, record or union type '%s' implements the interface 'System.IComparable' explicitly. You must apply the 'CustomComparison' attribute to the type. - /// (Originally from ..\FSComp.txt:488) + /// (Originally from ..\FSComp.txt:487) static member tcImplementsIComparableExplicitly(a0 : System.String) = (647, GetStringFunc("tcImplementsIComparableExplicitly",",,,%s,,,") a0) /// The struct, record or union type '%s' implements the interface 'System.IComparable<_>' explicitly. You must apply the 'CustomComparison' attribute to the type, and should also provide a consistent implementation of the non-generic interface System.IComparable. - /// (Originally from ..\FSComp.txt:489) + /// (Originally from ..\FSComp.txt:488) static member tcImplementsGenericIComparableExplicitly(a0 : System.String) = (648, GetStringFunc("tcImplementsGenericIComparableExplicitly",",,,%s,,,") a0) /// The struct, record or union type '%s' implements the interface 'System.IStructuralComparable' explicitly. Apply the 'CustomComparison' attribute to the type. - /// (Originally from ..\FSComp.txt:490) + /// (Originally from ..\FSComp.txt:489) static member tcImplementsIStructuralComparableExplicitly(a0 : System.String) = (649, GetStringFunc("tcImplementsIStructuralComparableExplicitly",",,,%s,,,") a0) /// This record contains fields from inconsistent types - /// (Originally from ..\FSComp.txt:491) + /// (Originally from ..\FSComp.txt:490) static member tcRecordFieldInconsistentTypes() = (656, GetStringFunc("tcRecordFieldInconsistentTypes",",,,") ) /// DLLImport stubs cannot be inlined - /// (Originally from ..\FSComp.txt:492) + /// (Originally from ..\FSComp.txt:491) static member tcDllImportStubsCannotBeInlined() = (657, GetStringFunc("tcDllImportStubsCannotBeInlined",",,,") ) /// Structs may only bind a 'this' parameter at member declarations - /// (Originally from ..\FSComp.txt:493) + /// (Originally from ..\FSComp.txt:492) static member tcStructsCanOnlyBindThisAtMemberDeclaration() = (658, GetStringFunc("tcStructsCanOnlyBindThisAtMemberDeclaration",",,,") ) /// Unexpected expression at recursive inference point - /// (Originally from ..\FSComp.txt:494) + /// (Originally from ..\FSComp.txt:493) static member tcUnexpectedExprAtRecInfPoint() = (659, GetStringFunc("tcUnexpectedExprAtRecInfPoint",",,,") ) /// This code is less generic than required by its annotations because the explicit type variable '%s' could not be generalized. It was constrained to be '%s'. - /// (Originally from ..\FSComp.txt:495) + /// (Originally from ..\FSComp.txt:494) static member tcLessGenericBecauseOfAnnotation(a0 : System.String, a1 : System.String) = (660, GetStringFunc("tcLessGenericBecauseOfAnnotation",",,,%s,,,%s,,,") a0 a1) /// One or more of the explicit class or function type variables for this binding could not be generalized, because they were constrained to other types - /// (Originally from ..\FSComp.txt:496) + /// (Originally from ..\FSComp.txt:495) static member tcConstrainedTypeVariableCannotBeGeneralized() = (661, GetStringFunc("tcConstrainedTypeVariableCannotBeGeneralized",",,,") ) /// A generic type parameter has been used in a way that constrains it to always be '%s' - /// (Originally from ..\FSComp.txt:497) + /// (Originally from ..\FSComp.txt:496) static member tcGenericParameterHasBeenConstrained(a0 : System.String) = (662, GetStringFunc("tcGenericParameterHasBeenConstrained",",,,%s,,,") a0) /// This type parameter has been used in a way that constrains it to always be '%s' - /// (Originally from ..\FSComp.txt:498) + /// (Originally from ..\FSComp.txt:497) static member tcTypeParameterHasBeenConstrained(a0 : System.String) = (663, GetStringFunc("tcTypeParameterHasBeenConstrained",",,,%s,,,") a0) /// The type parameters inferred for this value are not stable under the erasure of type abbreviations. This is due to the use of type abbreviations which drop or reorder type parameters, e.g. \n\ttype taggedInt<'a> = int or\n\ttype swap<'a,'b> = 'b * 'a.\nConsider declaring the type parameters for this value explicitly, e.g.\n\tlet f<'a,'b> ((x,y) : swap<'b,'a>) : swap<'a,'b> = (y,x). - /// (Originally from ..\FSComp.txt:499) + /// (Originally from ..\FSComp.txt:498) static member tcTypeParametersInferredAreNotStable() = (664, GetStringFunc("tcTypeParametersInferredAreNotStable",",,,") ) /// Explicit type parameters may only be used on module or member bindings - /// (Originally from ..\FSComp.txt:500) + /// (Originally from ..\FSComp.txt:499) static member tcExplicitTypeParameterInvalid() = (665, GetStringFunc("tcExplicitTypeParameterInvalid",",,,") ) /// You must explicitly declare either all or no type parameters when overriding a generic abstract method - /// (Originally from ..\FSComp.txt:501) + /// (Originally from ..\FSComp.txt:500) static member tcOverridingMethodRequiresAllOrNoTypeParameters() = (666, GetStringFunc("tcOverridingMethodRequiresAllOrNoTypeParameters",",,,") ) /// The field labels and expected type of this record expression or pattern do not uniquely determine a corresponding record type - /// (Originally from ..\FSComp.txt:502) + /// (Originally from ..\FSComp.txt:501) static member tcFieldsDoNotDetermineUniqueRecordType() = (667, GetStringFunc("tcFieldsDoNotDetermineUniqueRecordType",",,,") ) /// The field '%s' appears twice in this record expression or pattern - /// (Originally from ..\FSComp.txt:503) + /// (Originally from ..\FSComp.txt:502) static member tcFieldAppearsTwiceInRecord(a0 : System.String) = (668, GetStringFunc("tcFieldAppearsTwiceInRecord",",,,%s,,,") a0) /// Unknown union case - /// (Originally from ..\FSComp.txt:504) + /// (Originally from ..\FSComp.txt:503) static member tcUnknownUnion() = (669, GetStringFunc("tcUnknownUnion",",,,") ) /// This code is not sufficiently generic. The type variable %s could not be generalized because it would escape its scope. - /// (Originally from ..\FSComp.txt:505) + /// (Originally from ..\FSComp.txt:504) static member tcNotSufficientlyGenericBecauseOfScope(a0 : System.String) = (670, GetStringFunc("tcNotSufficientlyGenericBecauseOfScope",",,,%s,,,") a0) /// A property cannot have explicit type parameters. Consider using a method instead. - /// (Originally from ..\FSComp.txt:506) + /// (Originally from ..\FSComp.txt:505) static member tcPropertyRequiresExplicitTypeParameters() = (671, GetStringFunc("tcPropertyRequiresExplicitTypeParameters",",,,") ) /// A constructor cannot have explicit type parameters. Consider using a static construction method instead. - /// (Originally from ..\FSComp.txt:507) + /// (Originally from ..\FSComp.txt:506) static member tcConstructorCannotHaveTypeParameters() = (672, GetStringFunc("tcConstructorCannotHaveTypeParameters",",,,") ) /// This instance member needs a parameter to represent the object being invoked. Make the member static or use the notation 'member x.Member(args) = ...'. - /// (Originally from ..\FSComp.txt:508) + /// (Originally from ..\FSComp.txt:507) static member tcInstanceMemberRequiresTarget() = (673, GetStringFunc("tcInstanceMemberRequiresTarget",",,,") ) /// Unexpected source-level property specification in syntax tree - /// (Originally from ..\FSComp.txt:509) + /// (Originally from ..\FSComp.txt:508) static member tcUnexpectedPropertyInSyntaxTree() = (674, GetStringFunc("tcUnexpectedPropertyInSyntaxTree",",,,") ) /// A static initializer requires an argument - /// (Originally from ..\FSComp.txt:510) + /// (Originally from ..\FSComp.txt:509) static member tcStaticInitializerRequiresArgument() = (675, GetStringFunc("tcStaticInitializerRequiresArgument",",,,") ) /// An object constructor requires an argument - /// (Originally from ..\FSComp.txt:511) + /// (Originally from ..\FSComp.txt:510) static member tcObjectConstructorRequiresArgument() = (676, GetStringFunc("tcObjectConstructorRequiresArgument",",,,") ) /// This static member should not have a 'this' parameter. Consider using the notation 'member Member(args) = ...'. - /// (Originally from ..\FSComp.txt:512) + /// (Originally from ..\FSComp.txt:511) static member tcStaticMemberShouldNotHaveThis() = (677, GetStringFunc("tcStaticMemberShouldNotHaveThis",",,,") ) /// An explicit static initializer should use the syntax 'static new(args) = expr' - /// (Originally from ..\FSComp.txt:513) + /// (Originally from ..\FSComp.txt:512) static member tcExplicitStaticInitializerSyntax() = (678, GetStringFunc("tcExplicitStaticInitializerSyntax",",,,") ) /// An explicit object constructor should use the syntax 'new(args) = expr' - /// (Originally from ..\FSComp.txt:514) + /// (Originally from ..\FSComp.txt:513) static member tcExplicitObjectConstructorSyntax() = (679, GetStringFunc("tcExplicitObjectConstructorSyntax",",,,") ) /// Unexpected source-level property specification - /// (Originally from ..\FSComp.txt:515) + /// (Originally from ..\FSComp.txt:514) static member tcUnexpectedPropertySpec() = (680, GetStringFunc("tcUnexpectedPropertySpec",",,,") ) /// This form of object expression is not used in F#. Use 'member this.MemberName ... = ...' to define member implementations in object expressions. - /// (Originally from ..\FSComp.txt:516) + /// (Originally from ..\FSComp.txt:515) static member tcObjectExpressionFormDeprecated() = (GetStringFunc("tcObjectExpressionFormDeprecated",",,,") ) /// Invalid declaration - /// (Originally from ..\FSComp.txt:517) + /// (Originally from ..\FSComp.txt:516) static member tcInvalidDeclaration() = (682, GetStringFunc("tcInvalidDeclaration",",,,") ) /// Attributes are not allowed within patterns - /// (Originally from ..\FSComp.txt:518) + /// (Originally from ..\FSComp.txt:517) static member tcAttributesInvalidInPatterns() = (683, GetStringFunc("tcAttributesInvalidInPatterns",",,,") ) /// The generic function '%s' must be given explicit type argument(s) - /// (Originally from ..\FSComp.txt:519) + /// (Originally from ..\FSComp.txt:518) static member tcFunctionRequiresExplicitTypeArguments(a0 : System.String) = (685, GetStringFunc("tcFunctionRequiresExplicitTypeArguments",",,,%s,,,") a0) /// The method or function '%s' should not be given explicit type argument(s) because it does not declare its type parameters explicitly - /// (Originally from ..\FSComp.txt:520) + /// (Originally from ..\FSComp.txt:519) static member tcDoesNotAllowExplicitTypeArguments(a0 : System.String) = (686, GetStringFunc("tcDoesNotAllowExplicitTypeArguments",",,,%s,,,") a0) /// This value, type or method expects %d type parameter(s) but was given %d - /// (Originally from ..\FSComp.txt:521) + /// (Originally from ..\FSComp.txt:520) static member tcTypeParameterArityMismatch(a0 : System.Int32, a1 : System.Int32) = (687, GetStringFunc("tcTypeParameterArityMismatch",",,,%d,,,%d,,,") a0 a1) /// The default, zero-initializing constructor of a struct type may only be used if all the fields of the struct type admit default initialization - /// (Originally from ..\FSComp.txt:522) + /// (Originally from ..\FSComp.txt:521) static member tcDefaultStructConstructorCall() = (688, GetStringFunc("tcDefaultStructConstructorCall",",,,") ) /// Couldn't find Dispose on IDisposable, or it was overloaded - /// (Originally from ..\FSComp.txt:523) + /// (Originally from ..\FSComp.txt:522) static member tcCouldNotFindIDisposable() = (GetStringFunc("tcCouldNotFindIDisposable",",,,") ) /// This value is not a literal and cannot be used in a pattern - /// (Originally from ..\FSComp.txt:524) + /// (Originally from ..\FSComp.txt:523) static member tcNonLiteralCannotBeUsedInPattern() = (689, GetStringFunc("tcNonLiteralCannotBeUsedInPattern",",,,") ) /// This field is readonly - /// (Originally from ..\FSComp.txt:525) + /// (Originally from ..\FSComp.txt:524) static member tcFieldIsReadonly() = (690, GetStringFunc("tcFieldIsReadonly",",,,") ) /// Named arguments must appear after all other arguments - /// (Originally from ..\FSComp.txt:526) + /// (Originally from ..\FSComp.txt:525) static member tcNameArgumentsMustAppearLast() = (691, GetStringFunc("tcNameArgumentsMustAppearLast",",,,") ) /// This function value is being used to construct a delegate type whose signature includes a byref argument. You must use an explicit lambda expression taking %d arguments. - /// (Originally from ..\FSComp.txt:527) + /// (Originally from ..\FSComp.txt:526) static member tcFunctionRequiresExplicitLambda(a0 : System.Int32) = (692, GetStringFunc("tcFunctionRequiresExplicitLambda",",,,%d,,,") a0) /// The type '%s' is not a type whose values can be enumerated with this syntax, i.e. is not compatible with either seq<_>, IEnumerable<_> or IEnumerable and does not have a GetEnumerator method - /// (Originally from ..\FSComp.txt:528) + /// (Originally from ..\FSComp.txt:527) static member tcTypeCannotBeEnumerated(a0 : System.String) = (693, GetStringFunc("tcTypeCannotBeEnumerated",",,,%s,,,") a0) /// This recursive binding uses an invalid mixture of recursive forms - /// (Originally from ..\FSComp.txt:529) + /// (Originally from ..\FSComp.txt:528) static member tcInvalidMixtureOfRecursiveForms() = (695, GetStringFunc("tcInvalidMixtureOfRecursiveForms",",,,") ) /// This is not a valid object construction expression. Explicit object constructors must either call an alternate constructor or initialize all fields of the object and specify a call to a super class constructor. - /// (Originally from ..\FSComp.txt:530) + /// (Originally from ..\FSComp.txt:529) static member tcInvalidObjectConstructionExpression() = (696, GetStringFunc("tcInvalidObjectConstructionExpression",",,,") ) /// Invalid constraint - /// (Originally from ..\FSComp.txt:531) + /// (Originally from ..\FSComp.txt:530) static member tcInvalidConstraint() = (697, GetStringFunc("tcInvalidConstraint",",,,") ) /// Invalid constraint: the type used for the constraint is sealed, which means the constraint could only be satisfied by at most one solution - /// (Originally from ..\FSComp.txt:532) + /// (Originally from ..\FSComp.txt:531) static member tcInvalidConstraintTypeSealed() = (698, GetStringFunc("tcInvalidConstraintTypeSealed",",,,") ) /// An 'enum' constraint must be of the form 'enum' - /// (Originally from ..\FSComp.txt:533) + /// (Originally from ..\FSComp.txt:532) static member tcInvalidEnumConstraint() = (699, GetStringFunc("tcInvalidEnumConstraint",",,,") ) /// 'new' constraints must take one argument of type 'unit' and return the constructed type - /// (Originally from ..\FSComp.txt:534) + /// (Originally from ..\FSComp.txt:533) static member tcInvalidNewConstraint() = (700, GetStringFunc("tcInvalidNewConstraint",",,,") ) /// This property has an invalid type. Properties taking multiple indexer arguments should have types of the form 'ty1 * ty2 -> ty3'. Properties returning functions should have types of the form '(ty1 -> ty2)'. - /// (Originally from ..\FSComp.txt:535) + /// (Originally from ..\FSComp.txt:534) static member tcInvalidPropertyType() = (701, GetStringFunc("tcInvalidPropertyType",",,,") ) /// Expected unit-of-measure parameter, not type parameter. Explicit unit-of-measure parameters must be marked with the [] attribute. - /// (Originally from ..\FSComp.txt:536) + /// (Originally from ..\FSComp.txt:535) static member tcExpectedUnitOfMeasureMarkWithAttribute() = (702, GetStringFunc("tcExpectedUnitOfMeasureMarkWithAttribute",",,,") ) /// Expected type parameter, not unit-of-measure parameter - /// (Originally from ..\FSComp.txt:537) + /// (Originally from ..\FSComp.txt:536) static member tcExpectedTypeParameter() = (703, GetStringFunc("tcExpectedTypeParameter",",,,") ) /// Expected type, not unit-of-measure - /// (Originally from ..\FSComp.txt:538) + /// (Originally from ..\FSComp.txt:537) static member tcExpectedTypeNotUnitOfMeasure() = (704, GetStringFunc("tcExpectedTypeNotUnitOfMeasure",",,,") ) /// Expected unit-of-measure, not type - /// (Originally from ..\FSComp.txt:539) + /// (Originally from ..\FSComp.txt:538) static member tcExpectedUnitOfMeasureNotType() = (705, GetStringFunc("tcExpectedUnitOfMeasureNotType",",,,") ) /// Units-of-measure cannot be used as prefix arguments to a type. Rewrite as postfix arguments in angle brackets. - /// (Originally from ..\FSComp.txt:540) + /// (Originally from ..\FSComp.txt:539) static member tcInvalidUnitsOfMeasurePrefix() = (706, GetStringFunc("tcInvalidUnitsOfMeasurePrefix",",,,") ) /// Unit-of-measure cannot be used in type constructor application - /// (Originally from ..\FSComp.txt:541) + /// (Originally from ..\FSComp.txt:540) static member tcUnitsOfMeasureInvalidInTypeConstructor() = (707, GetStringFunc("tcUnitsOfMeasureInvalidInTypeConstructor",",,,") ) /// This control construct may only be used if the computation expression builder defines a '%s' method - /// (Originally from ..\FSComp.txt:542) + /// (Originally from ..\FSComp.txt:541) static member tcRequireBuilderMethod(a0 : System.String) = (708, GetStringFunc("tcRequireBuilderMethod",",,,%s,,,") a0) /// This type has no nested types - /// (Originally from ..\FSComp.txt:543) + /// (Originally from ..\FSComp.txt:542) static member tcTypeHasNoNestedTypes() = (709, GetStringFunc("tcTypeHasNoNestedTypes",",,,") ) /// Unexpected %s in type expression - /// (Originally from ..\FSComp.txt:544) + /// (Originally from ..\FSComp.txt:543) static member tcUnexpectedSymbolInTypeExpression(a0 : System.String) = (711, GetStringFunc("tcUnexpectedSymbolInTypeExpression",",,,%s,,,") a0) /// Type parameter cannot be used as type constructor - /// (Originally from ..\FSComp.txt:545) + /// (Originally from ..\FSComp.txt:544) static member tcTypeParameterInvalidAsTypeConstructor() = (712, GetStringFunc("tcTypeParameterInvalidAsTypeConstructor",",,,") ) /// Illegal syntax in type expression - /// (Originally from ..\FSComp.txt:546) + /// (Originally from ..\FSComp.txt:545) static member tcIllegalSyntaxInTypeExpression() = (713, GetStringFunc("tcIllegalSyntaxInTypeExpression",",,,") ) /// Anonymous unit-of-measure cannot be nested inside another unit-of-measure expression - /// (Originally from ..\FSComp.txt:547) + /// (Originally from ..\FSComp.txt:546) static member tcAnonymousUnitsOfMeasureCannotBeNested() = (714, GetStringFunc("tcAnonymousUnitsOfMeasureCannotBeNested",",,,") ) /// Anonymous type variables are not permitted in this declaration - /// (Originally from ..\FSComp.txt:548) + /// (Originally from ..\FSComp.txt:547) static member tcAnonymousTypeInvalidInDeclaration() = (715, GetStringFunc("tcAnonymousTypeInvalidInDeclaration",",,,") ) /// Unexpected / in type - /// (Originally from ..\FSComp.txt:549) + /// (Originally from ..\FSComp.txt:548) static member tcUnexpectedSlashInType() = (716, GetStringFunc("tcUnexpectedSlashInType",",,,") ) /// Unexpected type arguments - /// (Originally from ..\FSComp.txt:550) + /// (Originally from ..\FSComp.txt:549) static member tcUnexpectedTypeArguments() = (717, GetStringFunc("tcUnexpectedTypeArguments",",,,") ) /// Optional arguments are only permitted on type members - /// (Originally from ..\FSComp.txt:551) + /// (Originally from ..\FSComp.txt:550) static member tcOptionalArgsOnlyOnMembers() = (718, GetStringFunc("tcOptionalArgsOnlyOnMembers",",,,") ) /// Name '%s' not bound in pattern context - /// (Originally from ..\FSComp.txt:552) + /// (Originally from ..\FSComp.txt:551) static member tcNameNotBoundInPattern(a0 : System.String) = (719, GetStringFunc("tcNameNotBoundInPattern",",,,%s,,,") a0) /// Non-primitive numeric literal constants cannot be used in pattern matches because they can be mapped to multiple different types through the use of a NumericLiteral module. Consider using replacing with a variable, and use 'when = ' at the end of the match clause. - /// (Originally from ..\FSComp.txt:553) + /// (Originally from ..\FSComp.txt:552) static member tcInvalidNonPrimitiveLiteralInPatternMatch() = (720, GetStringFunc("tcInvalidNonPrimitiveLiteralInPatternMatch",",,,") ) /// Type arguments cannot be specified here - /// (Originally from ..\FSComp.txt:554) + /// (Originally from ..\FSComp.txt:553) static member tcInvalidTypeArgumentUsage() = (721, GetStringFunc("tcInvalidTypeArgumentUsage",",,,") ) /// Only active patterns returning exactly one result may accept arguments - /// (Originally from ..\FSComp.txt:555) + /// (Originally from ..\FSComp.txt:554) static member tcRequireActivePatternWithOneResult() = (722, GetStringFunc("tcRequireActivePatternWithOneResult",",,,") ) /// Invalid argument to parameterized pattern label - /// (Originally from ..\FSComp.txt:556) + /// (Originally from ..\FSComp.txt:555) static member tcInvalidArgForParameterizedPattern() = (723, GetStringFunc("tcInvalidArgForParameterizedPattern",",,,") ) /// Internal error. Invalid index into active pattern array - /// (Originally from ..\FSComp.txt:557) + /// (Originally from ..\FSComp.txt:556) static member tcInvalidIndexIntoActivePatternArray() = (724, GetStringFunc("tcInvalidIndexIntoActivePatternArray",",,,") ) /// This union case does not take arguments - /// (Originally from ..\FSComp.txt:558) + /// (Originally from ..\FSComp.txt:557) static member tcUnionCaseDoesNotTakeArguments() = (725, GetStringFunc("tcUnionCaseDoesNotTakeArguments",",,,") ) /// This union case takes one argument - /// (Originally from ..\FSComp.txt:559) + /// (Originally from ..\FSComp.txt:558) static member tcUnionCaseRequiresOneArgument() = (726, GetStringFunc("tcUnionCaseRequiresOneArgument",",,,") ) /// This union case expects %d arguments in tupled form - /// (Originally from ..\FSComp.txt:560) + /// (Originally from ..\FSComp.txt:559) static member tcUnionCaseExpectsTupledArguments(a0 : System.Int32) = (727, GetStringFunc("tcUnionCaseExpectsTupledArguments",",,,%d,,,") a0) /// Field '%s' is not static - /// (Originally from ..\FSComp.txt:561) + /// (Originally from ..\FSComp.txt:560) static member tcFieldIsNotStatic(a0 : System.String) = (728, GetStringFunc("tcFieldIsNotStatic",",,,%s,,,") a0) /// This field is not a literal and cannot be used in a pattern - /// (Originally from ..\FSComp.txt:562) + /// (Originally from ..\FSComp.txt:561) static member tcFieldNotLiteralCannotBeUsedInPattern() = (729, GetStringFunc("tcFieldNotLiteralCannotBeUsedInPattern",",,,") ) /// This is not a variable, constant, active recognizer or literal - /// (Originally from ..\FSComp.txt:563) + /// (Originally from ..\FSComp.txt:562) static member tcRequireVarConstRecogOrLiteral() = (730, GetStringFunc("tcRequireVarConstRecogOrLiteral",",,,") ) /// This is not a valid pattern - /// (Originally from ..\FSComp.txt:564) + /// (Originally from ..\FSComp.txt:563) static member tcInvalidPattern() = (731, GetStringFunc("tcInvalidPattern",",,,") ) /// Character range matches have been removed in F#. Consider using a 'when' pattern guard instead. - /// (Originally from ..\FSComp.txt:565) + /// (Originally from ..\FSComp.txt:564) static member tcUseWhenPatternGuard() = (GetStringFunc("tcUseWhenPatternGuard",",,,") ) /// Illegal pattern - /// (Originally from ..\FSComp.txt:566) + /// (Originally from ..\FSComp.txt:565) static member tcIllegalPattern() = (733, GetStringFunc("tcIllegalPattern",",,,") ) /// Syntax error - unexpected '?' symbol - /// (Originally from ..\FSComp.txt:567) + /// (Originally from ..\FSComp.txt:566) static member tcSyntaxErrorUnexpectedQMark() = (734, GetStringFunc("tcSyntaxErrorUnexpectedQMark",",,,") ) /// Expected %d expressions, got %d - /// (Originally from ..\FSComp.txt:568) + /// (Originally from ..\FSComp.txt:567) static member tcExpressionCountMisMatch(a0 : System.Int32, a1 : System.Int32) = (735, GetStringFunc("tcExpressionCountMisMatch",",,,%d,,,%d,,,") a0 a1) /// TcExprUndelayed: delayed - /// (Originally from ..\FSComp.txt:569) + /// (Originally from ..\FSComp.txt:568) static member tcExprUndelayed() = (736, GetStringFunc("tcExprUndelayed",",,,") ) /// This expression form may only be used in sequence and computation expressions - /// (Originally from ..\FSComp.txt:570) + /// (Originally from ..\FSComp.txt:569) static member tcExpressionRequiresSequence() = (737, GetStringFunc("tcExpressionRequiresSequence",",,,") ) /// Invalid object expression. Objects without overrides or interfaces should use the expression form 'new Type(args)' without braces. - /// (Originally from ..\FSComp.txt:571) + /// (Originally from ..\FSComp.txt:570) static member tcInvalidObjectExpressionSyntaxForm() = (738, GetStringFunc("tcInvalidObjectExpressionSyntaxForm",",,,") ) /// Invalid object, sequence or record expression - /// (Originally from ..\FSComp.txt:572) + /// (Originally from ..\FSComp.txt:571) static member tcInvalidObjectSequenceOrRecordExpression() = (739, GetStringFunc("tcInvalidObjectSequenceOrRecordExpression",",,,") ) /// Invalid record, sequence or computation expression. Sequence expressions should be of the form 'seq { ... }' - /// (Originally from ..\FSComp.txt:573) + /// (Originally from ..\FSComp.txt:572) static member tcInvalidSequenceExpressionSyntaxForm() = (740, GetStringFunc("tcInvalidSequenceExpressionSyntaxForm",",,,") ) /// This list or array expression includes an element of the form 'if ... then ... else'. Parenthesize this expression to indicate it is an individual element of the list or array, to disambiguate this from a list generated using a sequence expression - /// (Originally from ..\FSComp.txt:574) + /// (Originally from ..\FSComp.txt:573) static member tcExpressionWithIfRequiresParenthesis() = (GetStringFunc("tcExpressionWithIfRequiresParenthesis",",,,") ) /// Unable to parse format string '%s' - /// (Originally from ..\FSComp.txt:575) + /// (Originally from ..\FSComp.txt:574) static member tcUnableToParseFormatString(a0 : System.String) = (741, GetStringFunc("tcUnableToParseFormatString",",,,%s,,,") a0) /// This list expression exceeds the maximum size for list literals. Use an array for larger literals and call Array.ToList. - /// (Originally from ..\FSComp.txt:576) + /// (Originally from ..\FSComp.txt:575) static member tcListLiteralMaxSize() = (742, GetStringFunc("tcListLiteralMaxSize",",,,") ) /// The expression form 'expr then expr' may only be used as part of an explicit object constructor - /// (Originally from ..\FSComp.txt:577) + /// (Originally from ..\FSComp.txt:576) static member tcExpressionFormRequiresObjectConstructor() = (743, GetStringFunc("tcExpressionFormRequiresObjectConstructor",",,,") ) /// Named arguments cannot be given to member trait calls - /// (Originally from ..\FSComp.txt:578) + /// (Originally from ..\FSComp.txt:577) static member tcNamedArgumentsCannotBeUsedInMemberTraits() = (744, GetStringFunc("tcNamedArgumentsCannotBeUsedInMemberTraits",",,,") ) /// This is not a valid name for an enumeration case - /// (Originally from ..\FSComp.txt:579) + /// (Originally from ..\FSComp.txt:578) static member tcNotValidEnumCaseName() = (745, GetStringFunc("tcNotValidEnumCaseName",",,,") ) /// This field is not mutable - /// (Originally from ..\FSComp.txt:580) + /// (Originally from ..\FSComp.txt:579) static member tcFieldIsNotMutable() = (746, GetStringFunc("tcFieldIsNotMutable",",,,") ) /// This construct may only be used within list, array and sequence expressions, e.g. expressions of the form 'seq { ... }', '[ ... ]' or '[| ... |]'. These use the syntax 'for ... in ... do ... yield...' to generate elements - /// (Originally from ..\FSComp.txt:581) + /// (Originally from ..\FSComp.txt:580) static member tcConstructRequiresListArrayOrSequence() = (747, GetStringFunc("tcConstructRequiresListArrayOrSequence",",,,") ) /// This construct may only be used within computation expressions. To return a value from an ordinary function simply write the expression without 'return'. - /// (Originally from ..\FSComp.txt:582) + /// (Originally from ..\FSComp.txt:581) static member tcConstructRequiresComputationExpressions() = (748, GetStringFunc("tcConstructRequiresComputationExpressions",",,,") ) /// This construct may only be used within sequence or computation expressions - /// (Originally from ..\FSComp.txt:583) + /// (Originally from ..\FSComp.txt:582) static member tcConstructRequiresSequenceOrComputations() = (749, GetStringFunc("tcConstructRequiresSequenceOrComputations",",,,") ) /// This construct may only be used within computation expressions - /// (Originally from ..\FSComp.txt:584) + /// (Originally from ..\FSComp.txt:583) static member tcConstructRequiresComputationExpression() = (750, GetStringFunc("tcConstructRequiresComputationExpression",",,,") ) /// Invalid indexer expression - /// (Originally from ..\FSComp.txt:585) + /// (Originally from ..\FSComp.txt:584) static member tcInvalidIndexerExpression() = (751, GetStringFunc("tcInvalidIndexerExpression",",,,") ) /// The operator 'expr.[idx]' has been used on an object of indeterminate type based on information prior to this program point. Consider adding further type constraints - /// (Originally from ..\FSComp.txt:586) + /// (Originally from ..\FSComp.txt:585) static member tcObjectOfIndeterminateTypeUsedRequireTypeConstraint() = (752, GetStringFunc("tcObjectOfIndeterminateTypeUsedRequireTypeConstraint",",,,") ) /// Cannot inherit from a variable type - /// (Originally from ..\FSComp.txt:587) + /// (Originally from ..\FSComp.txt:586) static member tcCannotInheritFromVariableType() = (753, GetStringFunc("tcCannotInheritFromVariableType",",,,") ) /// Calls to object constructors on type parameters cannot be given arguments - /// (Originally from ..\FSComp.txt:588) + /// (Originally from ..\FSComp.txt:587) static member tcObjectConstructorsOnTypeParametersCannotTakeArguments() = (754, GetStringFunc("tcObjectConstructorsOnTypeParametersCannotTakeArguments",",,,") ) /// The 'CompiledName' attribute cannot be used with this language element - /// (Originally from ..\FSComp.txt:589) + /// (Originally from ..\FSComp.txt:588) static member tcCompiledNameAttributeMisused() = (755, GetStringFunc("tcCompiledNameAttributeMisused",",,,") ) /// '%s' may only be used with named types - /// (Originally from ..\FSComp.txt:590) + /// (Originally from ..\FSComp.txt:589) static member tcNamedTypeRequired(a0 : System.String) = (756, GetStringFunc("tcNamedTypeRequired",",,,%s,,,") a0) /// 'inherit' cannot be used on interface types. Consider implementing the interface by using 'interface ... with ... end' instead. - /// (Originally from ..\FSComp.txt:591) + /// (Originally from ..\FSComp.txt:590) static member tcInheritCannotBeUsedOnInterfaceType() = (757, GetStringFunc("tcInheritCannotBeUsedOnInterfaceType",",,,") ) /// 'new' cannot be used on interface types. Consider using an object expression '{ new ... with ... }' instead. - /// (Originally from ..\FSComp.txt:592) + /// (Originally from ..\FSComp.txt:591) static member tcNewCannotBeUsedOnInterfaceType() = (758, GetStringFunc("tcNewCannotBeUsedOnInterfaceType",",,,") ) /// Instances of this type cannot be created since it has been marked abstract or not all methods have been given implementations. Consider using an object expression '{ new ... with ... }' instead. - /// (Originally from ..\FSComp.txt:593) + /// (Originally from ..\FSComp.txt:592) static member tcAbstractTypeCannotBeInstantiated() = (759, GetStringFunc("tcAbstractTypeCannotBeInstantiated",",,,") ) /// It is recommended that objects supporting the IDisposable interface are created using the syntax 'new Type(args)', rather than 'Type(args)' or 'Type' as a function value representing the constructor, to indicate that resources may be owned by the generated value - /// (Originally from ..\FSComp.txt:594) + /// (Originally from ..\FSComp.txt:593) static member tcIDisposableTypeShouldUseNew() = (760, GetStringFunc("tcIDisposableTypeShouldUseNew",",,,") ) /// '%s' may only be used to construct object types - /// (Originally from ..\FSComp.txt:595) + /// (Originally from ..\FSComp.txt:594) static member tcSyntaxCanOnlyBeUsedToCreateObjectTypes(a0 : System.String) = (761, GetStringFunc("tcSyntaxCanOnlyBeUsedToCreateObjectTypes",",,,%s,,,") a0) /// Constructors for the type '%s' must directly or indirectly call its implicit object constructor. Use a call to the implicit object constructor instead of a record expression. - /// (Originally from ..\FSComp.txt:596) + /// (Originally from ..\FSComp.txt:595) static member tcConstructorRequiresCall(a0 : System.String) = (762, GetStringFunc("tcConstructorRequiresCall",",,,%s,,,") a0) /// The field '%s' has been given a value, but is not present in the type '%s' - /// (Originally from ..\FSComp.txt:597) + /// (Originally from ..\FSComp.txt:596) static member tcUndefinedField(a0 : System.String, a1 : System.String) = (763, GetStringFunc("tcUndefinedField",",,,%s,,,%s,,,") a0 a1) /// No assignment given for field '%s' of type '%s' - /// (Originally from ..\FSComp.txt:598) + /// (Originally from ..\FSComp.txt:597) static member tcFieldRequiresAssignment(a0 : System.String, a1 : System.String) = (764, GetStringFunc("tcFieldRequiresAssignment",",,,%s,,,%s,,,") a0 a1) /// Extraneous fields have been given values - /// (Originally from ..\FSComp.txt:599) + /// (Originally from ..\FSComp.txt:598) static member tcExtraneousFieldsGivenValues() = (765, GetStringFunc("tcExtraneousFieldsGivenValues",",,,") ) /// Only overrides of abstract and virtual members may be specified in object expressions - /// (Originally from ..\FSComp.txt:600) + /// (Originally from ..\FSComp.txt:599) static member tcObjectExpressionsCanOnlyOverrideAbstractOrVirtual() = (766, GetStringFunc("tcObjectExpressionsCanOnlyOverrideAbstractOrVirtual",",,,") ) /// The member '%s' does not correspond to any abstract or virtual method available to override or implement. - /// (Originally from ..\FSComp.txt:601) + /// (Originally from ..\FSComp.txt:600) static member tcNoAbstractOrVirtualMemberFound(a0 : System.String) = (767, GetStringFunc("tcNoAbstractOrVirtualMemberFound",",,,%s,,,") a0) /// The type %s contains the member '%s' but it is not a virtual or abstract method that is available to override or implement. - /// (Originally from ..\FSComp.txt:602) + /// (Originally from ..\FSComp.txt:601) static member tcMemberFoundIsNotAbstractOrVirtual(a0 : System.String, a1 : System.String) = (767, GetStringFunc("tcMemberFoundIsNotAbstractOrVirtual",",,,%s,,,%s,,,") a0 a1) /// The member '%s' does not accept the correct number of arguments. %d argument(s) are expected, but %d were given. The required signature is '%s'.%s - /// (Originally from ..\FSComp.txt:603) + /// (Originally from ..\FSComp.txt:602) static member tcArgumentArityMismatch(a0 : System.String, a1 : System.Int32, a2 : System.Int32, a3 : System.String, a4 : System.String) = (768, GetStringFunc("tcArgumentArityMismatch",",,,%s,,,%d,,,%d,,,%s,,,%s,,,") a0 a1 a2 a3 a4) /// The member '%s' does not accept the correct number of arguments. One overload accepts %d arguments, but %d were given. The required signature is '%s'.%s - /// (Originally from ..\FSComp.txt:604) + /// (Originally from ..\FSComp.txt:603) static member tcArgumentArityMismatchOneOverload(a0 : System.String, a1 : System.Int32, a2 : System.Int32, a3 : System.String, a4 : System.String) = (769, GetStringFunc("tcArgumentArityMismatchOneOverload",",,,%s,,,%d,,,%d,,,%s,,,%s,,,") a0 a1 a2 a3 a4) /// A simple method name is required here - /// (Originally from ..\FSComp.txt:605) + /// (Originally from ..\FSComp.txt:604) static member tcSimpleMethodNameRequired() = (770, GetStringFunc("tcSimpleMethodNameRequired",",,,") ) /// The types System.ValueType, System.Enum, System.Delegate, System.MulticastDelegate and System.Array cannot be used as super types in an object expression or class - /// (Originally from ..\FSComp.txt:606) + /// (Originally from ..\FSComp.txt:605) static member tcPredefinedTypeCannotBeUsedAsSuperType() = (771, GetStringFunc("tcPredefinedTypeCannotBeUsedAsSuperType",",,,") ) /// 'new' must be used with a named type - /// (Originally from ..\FSComp.txt:607) + /// (Originally from ..\FSComp.txt:606) static member tcNewMustBeUsedWithNamedType() = (772, GetStringFunc("tcNewMustBeUsedWithNamedType",",,,") ) /// Cannot create an extension of a sealed type - /// (Originally from ..\FSComp.txt:608) + /// (Originally from ..\FSComp.txt:607) static member tcCannotCreateExtensionOfSealedType() = (773, GetStringFunc("tcCannotCreateExtensionOfSealedType",",,,") ) /// No arguments may be given when constructing a record value - /// (Originally from ..\FSComp.txt:609) + /// (Originally from ..\FSComp.txt:608) static member tcNoArgumentsForRecordValue() = (774, GetStringFunc("tcNoArgumentsForRecordValue",",,,") ) /// Interface implementations cannot be given on construction expressions - /// (Originally from ..\FSComp.txt:610) + /// (Originally from ..\FSComp.txt:609) static member tcNoInterfaceImplementationForConstructionExpression() = (775, GetStringFunc("tcNoInterfaceImplementationForConstructionExpression",",,,") ) /// Object construction expressions may only be used to implement constructors in class types - /// (Originally from ..\FSComp.txt:611) + /// (Originally from ..\FSComp.txt:610) static member tcObjectConstructionCanOnlyBeUsedInClassTypes() = (776, GetStringFunc("tcObjectConstructionCanOnlyBeUsedInClassTypes",",,,") ) /// Only simple bindings of the form 'id = expr' can be used in construction expressions - /// (Originally from ..\FSComp.txt:612) + /// (Originally from ..\FSComp.txt:611) static member tcOnlySimpleBindingsCanBeUsedInConstructionExpressions() = (777, GetStringFunc("tcOnlySimpleBindingsCanBeUsedInConstructionExpressions",",,,") ) /// Objects must be initialized by an object construction expression that calls an inherited object constructor and assigns a value to each field - /// (Originally from ..\FSComp.txt:613) + /// (Originally from ..\FSComp.txt:612) static member tcObjectsMustBeInitializedWithObjectExpression() = (778, GetStringFunc("tcObjectsMustBeInitializedWithObjectExpression",",,,") ) /// Expected an interface type - /// (Originally from ..\FSComp.txt:614) + /// (Originally from ..\FSComp.txt:613) static member tcExpectedInterfaceType() = (779, GetStringFunc("tcExpectedInterfaceType",",,,") ) /// Constructor expressions for interfaces do not take arguments - /// (Originally from ..\FSComp.txt:615) + /// (Originally from ..\FSComp.txt:614) static member tcConstructorForInterfacesDoNotTakeArguments() = (780, GetStringFunc("tcConstructorForInterfacesDoNotTakeArguments",",,,") ) /// This object constructor requires arguments - /// (Originally from ..\FSComp.txt:616) + /// (Originally from ..\FSComp.txt:615) static member tcConstructorRequiresArguments() = (781, GetStringFunc("tcConstructorRequiresArguments",",,,") ) /// 'new' may only be used with object constructors - /// (Originally from ..\FSComp.txt:617) + /// (Originally from ..\FSComp.txt:616) static member tcNewRequiresObjectConstructor() = (782, GetStringFunc("tcNewRequiresObjectConstructor",",,,") ) /// At least one override did not correctly implement its corresponding abstract member - /// (Originally from ..\FSComp.txt:618) + /// (Originally from ..\FSComp.txt:617) static member tcAtLeastOneOverrideIsInvalid() = (783, GetStringFunc("tcAtLeastOneOverrideIsInvalid",",,,") ) /// This numeric literal requires that a module '%s' defining functions FromZero, FromOne, FromInt32, FromInt64 and FromString be in scope - /// (Originally from ..\FSComp.txt:619) + /// (Originally from ..\FSComp.txt:618) static member tcNumericLiteralRequiresModule(a0 : System.String) = (784, GetStringFunc("tcNumericLiteralRequiresModule",",,,%s,,,") a0) /// Invalid record construction - /// (Originally from ..\FSComp.txt:620) + /// (Originally from ..\FSComp.txt:619) static member tcInvalidRecordConstruction() = (785, GetStringFunc("tcInvalidRecordConstruction",",,,") ) /// The expression form { expr with ... } may only be used with record types. To build object types use { new Type(...) with ... } - /// (Originally from ..\FSComp.txt:621) + /// (Originally from ..\FSComp.txt:620) static member tcExpressionFormRequiresRecordTypes() = (786, GetStringFunc("tcExpressionFormRequiresRecordTypes",",,,") ) /// The inherited type is not an object model type - /// (Originally from ..\FSComp.txt:622) + /// (Originally from ..\FSComp.txt:621) static member tcInheritedTypeIsNotObjectModelType() = (787, GetStringFunc("tcInheritedTypeIsNotObjectModelType",",,,") ) /// Object construction expressions (i.e. record expressions with inheritance specifications) may only be used to implement constructors in object model types. Use 'new ObjectType(args)' to construct instances of object model types outside of constructors - /// (Originally from ..\FSComp.txt:623) + /// (Originally from ..\FSComp.txt:622) static member tcObjectConstructionExpressionCanOnlyImplementConstructorsInObjectModelTypes() = (788, GetStringFunc("tcObjectConstructionExpressionCanOnlyImplementConstructorsInObjectModelTypes",",,,") ) /// '{ }' is not a valid expression. Records must include at least one field. Empty sequences are specified by using Seq.empty or an empty list '[]'. - /// (Originally from ..\FSComp.txt:624) + /// (Originally from ..\FSComp.txt:623) static member tcEmptyRecordInvalid() = (789, GetStringFunc("tcEmptyRecordInvalid",",,,") ) /// This type is not a record type. Values of class and struct types must be created using calls to object constructors. - /// (Originally from ..\FSComp.txt:625) + /// (Originally from ..\FSComp.txt:624) static member tcTypeIsNotARecordTypeNeedConstructor() = (790, GetStringFunc("tcTypeIsNotARecordTypeNeedConstructor",",,,") ) /// This type is not a record type - /// (Originally from ..\FSComp.txt:626) + /// (Originally from ..\FSComp.txt:625) static member tcTypeIsNotARecordType() = (791, GetStringFunc("tcTypeIsNotARecordType",",,,") ) /// This construct is ambiguous as part of a computation expression. Nested expressions may be written using 'let _ = (...)' and nested computations using 'let! res = builder { ... }'. - /// (Originally from ..\FSComp.txt:627) + /// (Originally from ..\FSComp.txt:626) static member tcConstructIsAmbiguousInComputationExpression() = (792, GetStringFunc("tcConstructIsAmbiguousInComputationExpression",",,,") ) /// This construct is ambiguous as part of a sequence expression. Nested expressions may be written using 'let _ = (...)' and nested sequences using 'yield! seq {... }'. - /// (Originally from ..\FSComp.txt:628) + /// (Originally from ..\FSComp.txt:627) static member tcConstructIsAmbiguousInSequenceExpression() = (793, GetStringFunc("tcConstructIsAmbiguousInSequenceExpression",",,,") ) /// 'do!' cannot be used within sequence expressions - /// (Originally from ..\FSComp.txt:629) + /// (Originally from ..\FSComp.txt:628) static member tcDoBangIllegalInSequenceExpression() = (794, GetStringFunc("tcDoBangIllegalInSequenceExpression",",,,") ) /// The use of 'let! x = coll' in sequence expressions is not permitted. Use 'for x in coll' instead. - /// (Originally from ..\FSComp.txt:630) + /// (Originally from ..\FSComp.txt:629) static member tcUseForInSequenceExpression() = (795, GetStringFunc("tcUseForInSequenceExpression",",,,") ) /// 'try'/'with' cannot be used within sequence expressions - /// (Originally from ..\FSComp.txt:631) + /// (Originally from ..\FSComp.txt:630) static member tcTryIllegalInSequenceExpression() = (796, GetStringFunc("tcTryIllegalInSequenceExpression",",,,") ) /// In sequence expressions, multiple results are generated using 'yield!' - /// (Originally from ..\FSComp.txt:632) + /// (Originally from ..\FSComp.txt:631) static member tcUseYieldBangForMultipleResults() = (797, GetStringFunc("tcUseYieldBangForMultipleResults",",,,") ) /// Invalid assignment - /// (Originally from ..\FSComp.txt:633) + /// (Originally from ..\FSComp.txt:632) static member tcInvalidAssignment() = (799, GetStringFunc("tcInvalidAssignment",",,,") ) /// Invalid use of a type name - /// (Originally from ..\FSComp.txt:634) + /// (Originally from ..\FSComp.txt:633) static member tcInvalidUseOfTypeName() = (800, GetStringFunc("tcInvalidUseOfTypeName",",,,") ) /// This type has no accessible object constructors - /// (Originally from ..\FSComp.txt:635) + /// (Originally from ..\FSComp.txt:634) static member tcTypeHasNoAccessibleConstructor() = (801, GetStringFunc("tcTypeHasNoAccessibleConstructor",",,,") ) /// Invalid use of an interface type - /// (Originally from ..\FSComp.txt:638) + /// (Originally from ..\FSComp.txt:637) static member tcInvalidUseOfInterfaceType() = (804, GetStringFunc("tcInvalidUseOfInterfaceType",",,,") ) /// Invalid use of a delegate constructor. Use the syntax 'new Type(args)' or just 'Type(args)'. - /// (Originally from ..\FSComp.txt:639) + /// (Originally from ..\FSComp.txt:638) static member tcInvalidUseOfDelegate() = (805, GetStringFunc("tcInvalidUseOfDelegate",",,,") ) /// Property '%s' is not static - /// (Originally from ..\FSComp.txt:640) + /// (Originally from ..\FSComp.txt:639) static member tcPropertyIsNotStatic(a0 : System.String) = (806, GetStringFunc("tcPropertyIsNotStatic",",,,%s,,,") a0) /// Property '%s' is not readable - /// (Originally from ..\FSComp.txt:641) + /// (Originally from ..\FSComp.txt:640) static member tcPropertyIsNotReadable(a0 : System.String) = (807, GetStringFunc("tcPropertyIsNotReadable",",,,%s,,,") a0) /// This lookup cannot be used here - /// (Originally from ..\FSComp.txt:642) + /// (Originally from ..\FSComp.txt:641) static member tcLookupMayNotBeUsedHere() = (808, GetStringFunc("tcLookupMayNotBeUsedHere",",,,") ) /// Property '%s' is static - /// (Originally from ..\FSComp.txt:643) + /// (Originally from ..\FSComp.txt:642) static member tcPropertyIsStatic(a0 : System.String) = (809, GetStringFunc("tcPropertyIsStatic",",,,%s,,,") a0) /// Property '%s' cannot be set - /// (Originally from ..\FSComp.txt:644) + /// (Originally from ..\FSComp.txt:643) static member tcPropertyCannotBeSet1(a0 : System.String) = (810, GetStringFunc("tcPropertyCannotBeSet1",",,,%s,,,") a0) /// Constructors must be applied to arguments and cannot be used as first-class values. If necessary use an anonymous function '(fun arg1 ... argN -> new Type(arg1,...,argN))'. - /// (Originally from ..\FSComp.txt:645) + /// (Originally from ..\FSComp.txt:644) static member tcConstructorsCannotBeFirstClassValues() = (811, GetStringFunc("tcConstructorsCannotBeFirstClassValues",",,,") ) /// The syntax 'expr.id' may only be used with record labels, properties and fields - /// (Originally from ..\FSComp.txt:646) + /// (Originally from ..\FSComp.txt:645) static member tcSyntaxFormUsedOnlyWithRecordLabelsPropertiesAndFields() = (812, GetStringFunc("tcSyntaxFormUsedOnlyWithRecordLabelsPropertiesAndFields",",,,") ) /// Event '%s' is static - /// (Originally from ..\FSComp.txt:647) + /// (Originally from ..\FSComp.txt:646) static member tcEventIsStatic(a0 : System.String) = (813, GetStringFunc("tcEventIsStatic",",,,%s,,,") a0) /// Event '%s' is not static - /// (Originally from ..\FSComp.txt:648) + /// (Originally from ..\FSComp.txt:647) static member tcEventIsNotStatic(a0 : System.String) = (814, GetStringFunc("tcEventIsNotStatic",",,,%s,,,") a0) /// The named argument '%s' did not match any argument or mutable property - /// (Originally from ..\FSComp.txt:649) + /// (Originally from ..\FSComp.txt:648) static member tcNamedArgumentDidNotMatch(a0 : System.String) = (815, GetStringFunc("tcNamedArgumentDidNotMatch",",,,%s,,,") a0) /// One or more of the overloads of this method has curried arguments. Consider redesigning these members to take arguments in tupled form. - /// (Originally from ..\FSComp.txt:650) + /// (Originally from ..\FSComp.txt:649) static member tcOverloadsCannotHaveCurriedArguments() = (816, GetStringFunc("tcOverloadsCannotHaveCurriedArguments",",,,") ) /// The unnamed arguments do not form a prefix of the arguments of the method called - /// (Originally from ..\FSComp.txt:651) + /// (Originally from ..\FSComp.txt:650) static member tcUnnamedArgumentsDoNotFormPrefix() = (GetStringFunc("tcUnnamedArgumentsDoNotFormPrefix",",,,") ) /// Static optimization conditionals are only for use within the F# library - /// (Originally from ..\FSComp.txt:652) + /// (Originally from ..\FSComp.txt:651) static member tcStaticOptimizationConditionalsOnlyForFSharpLibrary() = (817, GetStringFunc("tcStaticOptimizationConditionalsOnlyForFSharpLibrary",",,,") ) /// The corresponding formal argument is not optional - /// (Originally from ..\FSComp.txt:653) + /// (Originally from ..\FSComp.txt:652) static member tcFormalArgumentIsNotOptional() = (818, GetStringFunc("tcFormalArgumentIsNotOptional",",,,") ) /// Invalid optional assignment to a property or field - /// (Originally from ..\FSComp.txt:654) + /// (Originally from ..\FSComp.txt:653) static member tcInvalidOptionalAssignmentToPropertyOrField() = (819, GetStringFunc("tcInvalidOptionalAssignmentToPropertyOrField",",,,") ) /// A delegate constructor must be passed a single function value - /// (Originally from ..\FSComp.txt:655) + /// (Originally from ..\FSComp.txt:654) static member tcDelegateConstructorMustBePassed() = (820, GetStringFunc("tcDelegateConstructorMustBePassed",",,,") ) /// A binding cannot be marked both 'use' and 'rec' - /// (Originally from ..\FSComp.txt:656) + /// (Originally from ..\FSComp.txt:655) static member tcBindingCannotBeUseAndRec() = (821, GetStringFunc("tcBindingCannotBeUseAndRec",",,,") ) /// The 'VolatileField' attribute may only be used on 'let' bindings in classes - /// (Originally from ..\FSComp.txt:657) + /// (Originally from ..\FSComp.txt:656) static member tcVolatileOnlyOnClassLetBindings() = (823, GetStringFunc("tcVolatileOnlyOnClassLetBindings",",,,") ) /// Attributes are not permitted on 'let' bindings in expressions - /// (Originally from ..\FSComp.txt:658) + /// (Originally from ..\FSComp.txt:657) static member tcAttributesAreNotPermittedOnLetBindings() = (824, GetStringFunc("tcAttributesAreNotPermittedOnLetBindings",",,,") ) /// The 'DefaultValue' attribute may only be used on 'val' declarations - /// (Originally from ..\FSComp.txt:659) + /// (Originally from ..\FSComp.txt:658) static member tcDefaultValueAttributeRequiresVal() = (825, GetStringFunc("tcDefaultValueAttributeRequiresVal",",,,") ) /// The 'ConditionalAttribute' attribute may only be used on members - /// (Originally from ..\FSComp.txt:660) + /// (Originally from ..\FSComp.txt:659) static member tcConditionalAttributeRequiresMembers() = (826, GetStringFunc("tcConditionalAttributeRequiresMembers",",,,") ) /// This is not a valid name for an active pattern - /// (Originally from ..\FSComp.txt:661) + /// (Originally from ..\FSComp.txt:660) static member tcInvalidActivePatternName() = (827, GetStringFunc("tcInvalidActivePatternName",",,,") ) /// The 'EntryPointAttribute' attribute may only be used on function definitions in modules - /// (Originally from ..\FSComp.txt:662) + /// (Originally from ..\FSComp.txt:661) static member tcEntryPointAttributeRequiresFunctionInModule() = (828, GetStringFunc("tcEntryPointAttributeRequiresFunctionInModule",",,,") ) /// Mutable values cannot be marked 'inline' - /// (Originally from ..\FSComp.txt:663) + /// (Originally from ..\FSComp.txt:662) static member tcMutableValuesCannotBeInline() = (829, GetStringFunc("tcMutableValuesCannotBeInline",",,,") ) /// Mutable values cannot have generic parameters - /// (Originally from ..\FSComp.txt:664) + /// (Originally from ..\FSComp.txt:663) static member tcMutableValuesMayNotHaveGenericParameters() = (830, GetStringFunc("tcMutableValuesMayNotHaveGenericParameters",",,,") ) /// Mutable function values should be written 'let mutable f = (fun args -> ...)' - /// (Originally from ..\FSComp.txt:665) + /// (Originally from ..\FSComp.txt:664) static member tcMutableValuesSyntax() = (831, GetStringFunc("tcMutableValuesSyntax",",,,") ) /// Only functions may be marked 'inline' - /// (Originally from ..\FSComp.txt:666) + /// (Originally from ..\FSComp.txt:665) static member tcOnlyFunctionsCanBeInline() = (832, GetStringFunc("tcOnlyFunctionsCanBeInline",",,,") ) /// A literal value cannot be given the [] or [] attributes - /// (Originally from ..\FSComp.txt:667) + /// (Originally from ..\FSComp.txt:666) static member tcIllegalAttributesForLiteral() = (833, GetStringFunc("tcIllegalAttributesForLiteral",",,,") ) /// A literal value cannot be marked 'mutable' - /// (Originally from ..\FSComp.txt:668) + /// (Originally from ..\FSComp.txt:667) static member tcLiteralCannotBeMutable() = (834, GetStringFunc("tcLiteralCannotBeMutable",",,,") ) /// A literal value cannot be marked 'inline' - /// (Originally from ..\FSComp.txt:669) + /// (Originally from ..\FSComp.txt:668) static member tcLiteralCannotBeInline() = (835, GetStringFunc("tcLiteralCannotBeInline",",,,") ) /// Literal values cannot have generic parameters - /// (Originally from ..\FSComp.txt:670) + /// (Originally from ..\FSComp.txt:669) static member tcLiteralCannotHaveGenericParameters() = (836, GetStringFunc("tcLiteralCannotHaveGenericParameters",",,,") ) /// This is not a valid constant expression - /// (Originally from ..\FSComp.txt:671) + /// (Originally from ..\FSComp.txt:670) static member tcInvalidConstantExpression() = (837, GetStringFunc("tcInvalidConstantExpression",",,,") ) /// This type is not accessible from this code location - /// (Originally from ..\FSComp.txt:672) + /// (Originally from ..\FSComp.txt:671) static member tcTypeIsInaccessible() = (838, GetStringFunc("tcTypeIsInaccessible",",,,") ) /// Unexpected condition in imported assembly: failed to decode AttributeUsage attribute - /// (Originally from ..\FSComp.txt:673) + /// (Originally from ..\FSComp.txt:672) static member tcUnexpectedConditionInImportedAssembly() = (839, GetStringFunc("tcUnexpectedConditionInImportedAssembly",",,,") ) /// Unrecognized attribute target. Valid attribute targets are 'assembly', 'module', 'type', 'method', 'property', 'return', 'param', 'field', 'event', 'constructor'. - /// (Originally from ..\FSComp.txt:674) + /// (Originally from ..\FSComp.txt:673) static member tcUnrecognizedAttributeTarget() = (840, GetStringFunc("tcUnrecognizedAttributeTarget",",,,") ) /// This attribute is not valid for use on this language element. Assembly attributes should be attached to a 'do ()' declaration, if necessary within an F# module. - /// (Originally from ..\FSComp.txt:675) + /// (Originally from ..\FSComp.txt:674) static member tcAttributeIsNotValidForLanguageElementUseDo() = (841, GetStringFunc("tcAttributeIsNotValidForLanguageElementUseDo",",,,") ) /// This attribute is not valid for use on this language element - /// (Originally from ..\FSComp.txt:676) + /// (Originally from ..\FSComp.txt:675) static member tcAttributeIsNotValidForLanguageElement() = (842, GetStringFunc("tcAttributeIsNotValidForLanguageElement",",,,") ) /// Optional arguments cannot be used in custom attributes - /// (Originally from ..\FSComp.txt:677) + /// (Originally from ..\FSComp.txt:676) static member tcOptionalArgumentsCannotBeUsedInCustomAttribute() = (843, GetStringFunc("tcOptionalArgumentsCannotBeUsedInCustomAttribute",",,,") ) /// This property cannot be set - /// (Originally from ..\FSComp.txt:678) + /// (Originally from ..\FSComp.txt:677) static member tcPropertyCannotBeSet0() = (844, GetStringFunc("tcPropertyCannotBeSet0",",,,") ) /// This property or field was not found on this custom attribute type - /// (Originally from ..\FSComp.txt:679) + /// (Originally from ..\FSComp.txt:678) static member tcPropertyOrFieldNotFoundInAttribute() = (845, GetStringFunc("tcPropertyOrFieldNotFoundInAttribute",",,,") ) /// A custom attribute must be a reference type - /// (Originally from ..\FSComp.txt:680) + /// (Originally from ..\FSComp.txt:679) static member tcCustomAttributeMustBeReferenceType() = (846, GetStringFunc("tcCustomAttributeMustBeReferenceType",",,,") ) /// The number of args for a custom attribute does not match the expected number of args for the attribute constructor - /// (Originally from ..\FSComp.txt:681) + /// (Originally from ..\FSComp.txt:680) static member tcCustomAttributeArgumentMismatch() = (847, GetStringFunc("tcCustomAttributeArgumentMismatch",",,,") ) /// A custom attribute must invoke an object constructor - /// (Originally from ..\FSComp.txt:682) + /// (Originally from ..\FSComp.txt:681) static member tcCustomAttributeMustInvokeConstructor() = (848, GetStringFunc("tcCustomAttributeMustInvokeConstructor",",,,") ) /// Attribute expressions must be calls to object constructors - /// (Originally from ..\FSComp.txt:683) + /// (Originally from ..\FSComp.txt:682) static member tcAttributeExpressionsMustBeConstructorCalls() = (849, GetStringFunc("tcAttributeExpressionsMustBeConstructorCalls",",,,") ) /// This attribute cannot be used in this version of F# - /// (Originally from ..\FSComp.txt:684) + /// (Originally from ..\FSComp.txt:683) static member tcUnsupportedAttribute() = (850, GetStringFunc("tcUnsupportedAttribute",",,,") ) /// Invalid inline specification - /// (Originally from ..\FSComp.txt:685) + /// (Originally from ..\FSComp.txt:684) static member tcInvalidInlineSpecification() = (851, GetStringFunc("tcInvalidInlineSpecification",",,,") ) /// 'use' bindings must be of the form 'use = ' - /// (Originally from ..\FSComp.txt:686) + /// (Originally from ..\FSComp.txt:685) static member tcInvalidUseBinding() = (852, GetStringFunc("tcInvalidUseBinding",",,,") ) /// Abstract members are not permitted in an augmentation - they must be defined as part of the type itself - /// (Originally from ..\FSComp.txt:687) + /// (Originally from ..\FSComp.txt:686) static member tcAbstractMembersIllegalInAugmentation() = (853, GetStringFunc("tcAbstractMembersIllegalInAugmentation",",,,") ) /// Method overrides and interface implementations are not permitted here - /// (Originally from ..\FSComp.txt:688) + /// (Originally from ..\FSComp.txt:687) static member tcMethodOverridesIllegalHere() = (854, GetStringFunc("tcMethodOverridesIllegalHere",",,,") ) /// No abstract or interface member was found that corresponds to this override - /// (Originally from ..\FSComp.txt:689) + /// (Originally from ..\FSComp.txt:688) static member tcNoMemberFoundForOverride() = (855, GetStringFunc("tcNoMemberFoundForOverride",",,,") ) /// This override takes a different number of arguments to the corresponding abstract member. The following abstract members were found:%s - /// (Originally from ..\FSComp.txt:690) + /// (Originally from ..\FSComp.txt:689) static member tcOverrideArityMismatch(a0 : System.String) = (856, GetStringFunc("tcOverrideArityMismatch",",,,%s,,,") a0) /// This method already has a default implementation - /// (Originally from ..\FSComp.txt:691) + /// (Originally from ..\FSComp.txt:690) static member tcDefaultImplementationAlreadyExists() = (857, GetStringFunc("tcDefaultImplementationAlreadyExists",",,,") ) /// The method implemented by this default is ambiguous - /// (Originally from ..\FSComp.txt:692) + /// (Originally from ..\FSComp.txt:691) static member tcDefaultAmbiguous() = (858, GetStringFunc("tcDefaultAmbiguous",",,,") ) /// No abstract property was found that corresponds to this override - /// (Originally from ..\FSComp.txt:693) + /// (Originally from ..\FSComp.txt:692) static member tcNoPropertyFoundForOverride() = (859, GetStringFunc("tcNoPropertyFoundForOverride",",,,") ) /// This property overrides or implements an abstract property but the abstract property doesn't have a corresponding %s - /// (Originally from ..\FSComp.txt:694) + /// (Originally from ..\FSComp.txt:693) static member tcAbstractPropertyMissingGetOrSet(a0 : System.String) = (860, GetStringFunc("tcAbstractPropertyMissingGetOrSet",",,,%s,,,") a0) /// Invalid signature for set member - /// (Originally from ..\FSComp.txt:695) + /// (Originally from ..\FSComp.txt:694) static member tcInvalidSignatureForSet() = (861, GetStringFunc("tcInvalidSignatureForSet",",,,") ) /// This new member hides the abstract member '%s'. Rename the member or use 'override' instead. - /// (Originally from ..\FSComp.txt:696) + /// (Originally from ..\FSComp.txt:695) static member tcNewMemberHidesAbstractMember(a0 : System.String) = (864, GetStringFunc("tcNewMemberHidesAbstractMember",",,,%s,,,") a0) /// This new member hides the abstract member '%s' once tuples, functions, units of measure and/or provided types are erased. Rename the member or use 'override' instead. - /// (Originally from ..\FSComp.txt:697) + /// (Originally from ..\FSComp.txt:696) static member tcNewMemberHidesAbstractMemberWithSuffix(a0 : System.String) = (864, GetStringFunc("tcNewMemberHidesAbstractMemberWithSuffix",",,,%s,,,") a0) /// Interfaces cannot contain definitions of static initializers - /// (Originally from ..\FSComp.txt:698) + /// (Originally from ..\FSComp.txt:697) static member tcStaticInitializersIllegalInInterface() = (865, GetStringFunc("tcStaticInitializersIllegalInInterface",",,,") ) /// Interfaces cannot contain definitions of object constructors - /// (Originally from ..\FSComp.txt:699) + /// (Originally from ..\FSComp.txt:698) static member tcObjectConstructorsIllegalInInterface() = (866, GetStringFunc("tcObjectConstructorsIllegalInInterface",",,,") ) /// Interfaces cannot contain definitions of member overrides - /// (Originally from ..\FSComp.txt:700) + /// (Originally from ..\FSComp.txt:699) static member tcMemberOverridesIllegalInInterface() = (867, GetStringFunc("tcMemberOverridesIllegalInInterface",",,,") ) /// Interfaces cannot contain definitions of concrete members. You may need to define a constructor on your type to indicate that the type is a class. - /// (Originally from ..\FSComp.txt:701) + /// (Originally from ..\FSComp.txt:700) static member tcConcreteMembersIllegalInInterface() = (868, GetStringFunc("tcConcreteMembersIllegalInInterface",",,,") ) /// Constructors cannot be specified in exception augmentations - /// (Originally from ..\FSComp.txt:702) + /// (Originally from ..\FSComp.txt:701) static member tcConstructorsDisallowedInExceptionAugmentation() = (869, GetStringFunc("tcConstructorsDisallowedInExceptionAugmentation",",,,") ) /// Structs cannot have an object constructor with no arguments. This is a restriction imposed on all CLI languages as structs automatically support a default constructor. - /// (Originally from ..\FSComp.txt:703) + /// (Originally from ..\FSComp.txt:702) static member tcStructsCannotHaveConstructorWithNoArguments() = (870, GetStringFunc("tcStructsCannotHaveConstructorWithNoArguments",",,,") ) /// Constructors cannot be defined for this type - /// (Originally from ..\FSComp.txt:704) + /// (Originally from ..\FSComp.txt:703) static member tcConstructorsIllegalForThisType() = (871, GetStringFunc("tcConstructorsIllegalForThisType",",,,") ) /// Recursive bindings that include member specifications can only occur as a direct augmentation of a type - /// (Originally from ..\FSComp.txt:705) + /// (Originally from ..\FSComp.txt:704) static member tcRecursiveBindingsWithMembersMustBeDirectAugmentation() = (872, GetStringFunc("tcRecursiveBindingsWithMembersMustBeDirectAugmentation",",,,") ) /// Only simple variable patterns can be bound in 'let rec' constructs - /// (Originally from ..\FSComp.txt:706) + /// (Originally from ..\FSComp.txt:705) static member tcOnlySimplePatternsInLetRec() = (873, GetStringFunc("tcOnlySimplePatternsInLetRec",",,,") ) /// Only record fields and simple, non-recursive 'let' bindings may be marked mutable - /// (Originally from ..\FSComp.txt:707) + /// (Originally from ..\FSComp.txt:706) static member tcOnlyRecordFieldsAndSimpleLetCanBeMutable() = (874, GetStringFunc("tcOnlyRecordFieldsAndSimpleLetCanBeMutable",",,,") ) /// This member is not sufficiently generic - /// (Originally from ..\FSComp.txt:708) + /// (Originally from ..\FSComp.txt:707) static member tcMemberIsNotSufficientlyGeneric() = (875, GetStringFunc("tcMemberIsNotSufficientlyGeneric",",,,") ) /// A declaration may only be the [] attribute if a constant value is also given, e.g. 'val x : int = 1' - /// (Originally from ..\FSComp.txt:709) + /// (Originally from ..\FSComp.txt:708) static member tcLiteralAttributeRequiresConstantValue() = (876, GetStringFunc("tcLiteralAttributeRequiresConstantValue",",,,") ) /// A declaration may only be given a value in a signature if the declaration has the [] attribute - /// (Originally from ..\FSComp.txt:710) + /// (Originally from ..\FSComp.txt:709) static member tcValueInSignatureRequiresLiteralAttribute() = (877, GetStringFunc("tcValueInSignatureRequiresLiteralAttribute",",,,") ) /// Thread-static and context-static variables must be static and given the [] attribute to indicate that the value is initialized to the default value on each new thread - /// (Originally from ..\FSComp.txt:711) + /// (Originally from ..\FSComp.txt:710) static member tcThreadStaticAndContextStaticMustBeStatic() = (878, GetStringFunc("tcThreadStaticAndContextStaticMustBeStatic",",,,") ) /// Volatile fields must be marked 'mutable' and cannot be thread-static - /// (Originally from ..\FSComp.txt:712) + /// (Originally from ..\FSComp.txt:711) static member tcVolatileFieldsMustBeMutable() = (879, GetStringFunc("tcVolatileFieldsMustBeMutable",",,,") ) /// Uninitialized 'val' fields must be mutable and marked with the '[]' attribute. Consider using a 'let' binding instead of a 'val' field. - /// (Originally from ..\FSComp.txt:713) + /// (Originally from ..\FSComp.txt:712) static member tcUninitializedValFieldsMustBeMutable() = (880, GetStringFunc("tcUninitializedValFieldsMustBeMutable",",,,") ) /// Static 'val' fields in types must be mutable, private and marked with the '[]' attribute. They are initialized to the 'null' or 'zero' value for their type. Consider also using a 'static let mutable' binding in a class type. - /// (Originally from ..\FSComp.txt:714) + /// (Originally from ..\FSComp.txt:713) static member tcStaticValFieldsMustBeMutableAndPrivate() = (881, GetStringFunc("tcStaticValFieldsMustBeMutableAndPrivate",",,,") ) /// This field requires a name - /// (Originally from ..\FSComp.txt:715) + /// (Originally from ..\FSComp.txt:714) static member tcFieldRequiresName() = (882, GetStringFunc("tcFieldRequiresName",",,,") ) /// Invalid namespace, module, type or union case name - /// (Originally from ..\FSComp.txt:716) + /// (Originally from ..\FSComp.txt:715) static member tcInvalidNamespaceModuleTypeUnionName() = (883, GetStringFunc("tcInvalidNamespaceModuleTypeUnionName",",,,") ) /// Explicit type declarations for constructors must be of the form 'ty1 * ... * tyN -> resTy'. Parentheses may be required around 'resTy' - /// (Originally from ..\FSComp.txt:717) + /// (Originally from ..\FSComp.txt:716) static member tcIllegalFormForExplicitTypeDeclaration() = (884, GetStringFunc("tcIllegalFormForExplicitTypeDeclaration",",,,") ) /// Return types of union cases must be identical to the type being defined, up to abbreviations - /// (Originally from ..\FSComp.txt:718) + /// (Originally from ..\FSComp.txt:717) static member tcReturnTypesForUnionMustBeSameAsType() = (885, GetStringFunc("tcReturnTypesForUnionMustBeSameAsType",",,,") ) /// This is not a valid value for an enumeration literal - /// (Originally from ..\FSComp.txt:719) + /// (Originally from ..\FSComp.txt:718) static member tcInvalidEnumerationLiteral() = (886, GetStringFunc("tcInvalidEnumerationLiteral",",,,") ) /// The type '%s' is not an interface type - /// (Originally from ..\FSComp.txt:720) + /// (Originally from ..\FSComp.txt:719) static member tcTypeIsNotInterfaceType1(a0 : System.String) = (887, GetStringFunc("tcTypeIsNotInterfaceType1",",,,%s,,,") a0) /// Duplicate specification of an interface - /// (Originally from ..\FSComp.txt:721) + /// (Originally from ..\FSComp.txt:720) static member tcDuplicateSpecOfInterface() = (888, GetStringFunc("tcDuplicateSpecOfInterface",",,,") ) /// A field/val declaration is not permitted here - /// (Originally from ..\FSComp.txt:722) + /// (Originally from ..\FSComp.txt:721) static member tcFieldValIllegalHere() = (889, GetStringFunc("tcFieldValIllegalHere",",,,") ) /// A inheritance declaration is not permitted here - /// (Originally from ..\FSComp.txt:723) + /// (Originally from ..\FSComp.txt:722) static member tcInheritIllegalHere() = (890, GetStringFunc("tcInheritIllegalHere",",,,") ) /// This declaration opens the module '%s', which is marked as 'RequireQualifiedAccess'. Adjust your code to use qualified references to the elements of the module instead, e.g. 'List.map' instead of 'map'. This change will ensure that your code is robust as new constructs are added to libraries. - /// (Originally from ..\FSComp.txt:724) + /// (Originally from ..\FSComp.txt:723) static member tcModuleRequiresQualifiedAccess(a0 : System.String) = (892, GetStringFunc("tcModuleRequiresQualifiedAccess",",,,%s,,,") a0) /// This declaration opens the namespace or module '%s' through a partially qualified path. Adjust this code to use the full path of the namespace. This change will make your code more robust as new constructs are added to the F# and CLI libraries. - /// (Originally from ..\FSComp.txt:725) + /// (Originally from ..\FSComp.txt:724) static member tcOpenUsedWithPartiallyQualifiedPath(a0 : System.String) = (893, GetStringFunc("tcOpenUsedWithPartiallyQualifiedPath",",,,%s,,,") a0) /// Local class bindings cannot be marked inline. Consider lifting the definition out of the class or else do not mark it as inline. - /// (Originally from ..\FSComp.txt:726) + /// (Originally from ..\FSComp.txt:725) static member tcLocalClassBindingsCannotBeInline() = (894, GetStringFunc("tcLocalClassBindingsCannotBeInline",",,,") ) /// Type abbreviations cannot have members - /// (Originally from ..\FSComp.txt:727) + /// (Originally from ..\FSComp.txt:726) static member tcTypeAbbreviationsMayNotHaveMembers() = (895, GetStringFunc("tcTypeAbbreviationsMayNotHaveMembers",",,,") ) /// As of F# 4.1, the accessibility of type abbreviations is checked at compile-time. Consider changing the accessibility of the type abbreviation. Ignoring this warning might lead to runtime errors. - /// (Originally from ..\FSComp.txt:728) + /// (Originally from ..\FSComp.txt:727) static member tcTypeAbbreviationsCheckedAtCompileTime() = (GetStringFunc("tcTypeAbbreviationsCheckedAtCompileTime",",,,") ) /// Enumerations cannot have members - /// (Originally from ..\FSComp.txt:729) + /// (Originally from ..\FSComp.txt:728) static member tcEnumerationsMayNotHaveMembers() = (896, GetStringFunc("tcEnumerationsMayNotHaveMembers",",,,") ) /// Measure declarations may have only static members - /// (Originally from ..\FSComp.txt:730) + /// (Originally from ..\FSComp.txt:729) static member tcMeasureDeclarationsRequireStaticMembers() = (897, GetStringFunc("tcMeasureDeclarationsRequireStaticMembers",",,,") ) /// Structs cannot contain 'do' bindings because the default constructor for structs would not execute these bindings - /// (Originally from ..\FSComp.txt:731) + /// (Originally from ..\FSComp.txt:730) static member tcStructsMayNotContainDoBindings() = (GetStringFunc("tcStructsMayNotContainDoBindings",",,,") ) /// Structs cannot contain value definitions because the default constructor for structs will not execute these bindings. Consider adding additional arguments to the primary constructor for the type. - /// (Originally from ..\FSComp.txt:732) + /// (Originally from ..\FSComp.txt:731) static member tcStructsMayNotContainLetBindings() = (901, GetStringFunc("tcStructsMayNotContainLetBindings",",,,") ) /// Static value definitions may only be used in types with a primary constructor. Consider adding arguments to the type definition, e.g. 'type X(args) = ...'. - /// (Originally from ..\FSComp.txt:733) + /// (Originally from ..\FSComp.txt:732) static member tcStaticLetBindingsRequireClassesWithImplicitConstructors() = (902, GetStringFunc("tcStaticLetBindingsRequireClassesWithImplicitConstructors",",,,") ) /// Measure declarations may have only static members: constructors are not available - /// (Originally from ..\FSComp.txt:734) + /// (Originally from ..\FSComp.txt:733) static member tcMeasureDeclarationsRequireStaticMembersNotConstructors() = (904, GetStringFunc("tcMeasureDeclarationsRequireStaticMembersNotConstructors",",,,") ) /// A member and a local class binding both have the name '%s' - /// (Originally from ..\FSComp.txt:735) + /// (Originally from ..\FSComp.txt:734) static member tcMemberAndLocalClassBindingHaveSameName(a0 : System.String) = (905, GetStringFunc("tcMemberAndLocalClassBindingHaveSameName",",,,%s,,,") a0) /// Type abbreviations cannot have interface declarations - /// (Originally from ..\FSComp.txt:736) + /// (Originally from ..\FSComp.txt:735) static member tcTypeAbbreviationsCannotHaveInterfaceDeclaration() = (906, GetStringFunc("tcTypeAbbreviationsCannotHaveInterfaceDeclaration",",,,") ) /// Enumerations cannot have interface declarations - /// (Originally from ..\FSComp.txt:737) + /// (Originally from ..\FSComp.txt:736) static member tcEnumerationsCannotHaveInterfaceDeclaration() = (907, GetStringFunc("tcEnumerationsCannotHaveInterfaceDeclaration",",,,") ) /// This type is not an interface type - /// (Originally from ..\FSComp.txt:738) + /// (Originally from ..\FSComp.txt:737) static member tcTypeIsNotInterfaceType0() = (908, GetStringFunc("tcTypeIsNotInterfaceType0",",,,") ) /// All implemented interfaces should be declared on the initial declaration of the type - /// (Originally from ..\FSComp.txt:739) + /// (Originally from ..\FSComp.txt:738) static member tcAllImplementedInterfacesShouldBeDeclared() = (909, GetStringFunc("tcAllImplementedInterfacesShouldBeDeclared",",,,") ) /// A default implementation of this interface has already been added because the explicit implementation of the interface was not specified at the definition of the type - /// (Originally from ..\FSComp.txt:740) + /// (Originally from ..\FSComp.txt:739) static member tcDefaultImplementationForInterfaceHasAlreadyBeenAdded() = (910, GetStringFunc("tcDefaultImplementationForInterfaceHasAlreadyBeenAdded",",,,") ) /// This member is not permitted in an interface implementation - /// (Originally from ..\FSComp.txt:741) + /// (Originally from ..\FSComp.txt:740) static member tcMemberNotPermittedInInterfaceImplementation() = (911, GetStringFunc("tcMemberNotPermittedInInterfaceImplementation",",,,") ) /// This declaration element is not permitted in an augmentation - /// (Originally from ..\FSComp.txt:742) + /// (Originally from ..\FSComp.txt:741) static member tcDeclarationElementNotPermittedInAugmentation() = (912, GetStringFunc("tcDeclarationElementNotPermittedInAugmentation",",,,") ) /// Types cannot contain nested type definitions - /// (Originally from ..\FSComp.txt:743) + /// (Originally from ..\FSComp.txt:742) static member tcTypesCannotContainNestedTypes() = (913, GetStringFunc("tcTypesCannotContainNestedTypes",",,,") ) /// type, exception or module - /// (Originally from ..\FSComp.txt:744) + /// (Originally from ..\FSComp.txt:743) static member tcTypeExceptionOrModule() = (GetStringFunc("tcTypeExceptionOrModule",",,,") ) /// type or module - /// (Originally from ..\FSComp.txt:745) + /// (Originally from ..\FSComp.txt:744) static member tcTypeOrModule() = (GetStringFunc("tcTypeOrModule",",,,") ) /// The struct, record or union type '%s' implements the interface 'System.IStructuralEquatable' explicitly. Apply the 'CustomEquality' attribute to the type. - /// (Originally from ..\FSComp.txt:746) + /// (Originally from ..\FSComp.txt:745) static member tcImplementsIStructuralEquatableExplicitly(a0 : System.String) = (914, GetStringFunc("tcImplementsIStructuralEquatableExplicitly",",,,%s,,,") a0) /// The struct, record or union type '%s' implements the interface 'System.IEquatable<_>' explicitly. Apply the 'CustomEquality' attribute to the type and provide a consistent implementation of the non-generic override 'System.Object.Equals(obj)'. - /// (Originally from ..\FSComp.txt:747) + /// (Originally from ..\FSComp.txt:746) static member tcImplementsIEquatableExplicitly(a0 : System.String) = (915, GetStringFunc("tcImplementsIEquatableExplicitly",",,,%s,,,") a0) /// Explicit type specifications cannot be used for exception constructors - /// (Originally from ..\FSComp.txt:748) + /// (Originally from ..\FSComp.txt:747) static member tcExplicitTypeSpecificationCannotBeUsedForExceptionConstructors() = (916, GetStringFunc("tcExplicitTypeSpecificationCannotBeUsedForExceptionConstructors",",,,") ) /// Exception abbreviations should not have argument lists - /// (Originally from ..\FSComp.txt:749) + /// (Originally from ..\FSComp.txt:748) static member tcExceptionAbbreviationsShouldNotHaveArgumentList() = (917, GetStringFunc("tcExceptionAbbreviationsShouldNotHaveArgumentList",",,,") ) /// Abbreviations for Common IL exceptions cannot take arguments - /// (Originally from ..\FSComp.txt:750) + /// (Originally from ..\FSComp.txt:749) static member tcAbbreviationsFordotNetExceptionsCannotTakeArguments() = (918, GetStringFunc("tcAbbreviationsFordotNetExceptionsCannotTakeArguments",",,,") ) /// Exception abbreviations must refer to existing exceptions or F# types deriving from System.Exception - /// (Originally from ..\FSComp.txt:751) + /// (Originally from ..\FSComp.txt:750) static member tcExceptionAbbreviationsMustReferToValidExceptions() = (919, GetStringFunc("tcExceptionAbbreviationsMustReferToValidExceptions",",,,") ) /// Abbreviations for Common IL exception types must have a matching object constructor - /// (Originally from ..\FSComp.txt:752) + /// (Originally from ..\FSComp.txt:751) static member tcAbbreviationsFordotNetExceptionsMustHaveMatchingObjectConstructor() = (920, GetStringFunc("tcAbbreviationsFordotNetExceptionsMustHaveMatchingObjectConstructor",",,,") ) /// Not an exception - /// (Originally from ..\FSComp.txt:753) + /// (Originally from ..\FSComp.txt:752) static member tcNotAnException() = (921, GetStringFunc("tcNotAnException",",,,") ) /// Invalid module name - /// (Originally from ..\FSComp.txt:755) + /// (Originally from ..\FSComp.txt:754) static member tcInvalidModuleName() = (924, GetStringFunc("tcInvalidModuleName",",,,") ) /// Invalid type extension - /// (Originally from ..\FSComp.txt:756) + /// (Originally from ..\FSComp.txt:755) static member tcInvalidTypeExtension() = (925, GetStringFunc("tcInvalidTypeExtension",",,,") ) /// The attributes of this type specify multiple kinds for the type - /// (Originally from ..\FSComp.txt:757) + /// (Originally from ..\FSComp.txt:756) static member tcAttributesOfTypeSpecifyMultipleKindsForType() = (926, GetStringFunc("tcAttributesOfTypeSpecifyMultipleKindsForType",",,,") ) /// The kind of the type specified by its attributes does not match the kind implied by its definition - /// (Originally from ..\FSComp.txt:758) + /// (Originally from ..\FSComp.txt:757) static member tcKindOfTypeSpecifiedDoesNotMatchDefinition() = (927, GetStringFunc("tcKindOfTypeSpecifiedDoesNotMatchDefinition",",,,") ) /// Measure definitions cannot have type parameters - /// (Originally from ..\FSComp.txt:759) + /// (Originally from ..\FSComp.txt:758) static member tcMeasureDefinitionsCannotHaveTypeParameters() = (928, GetStringFunc("tcMeasureDefinitionsCannotHaveTypeParameters",",,,") ) /// This type requires a definition - /// (Originally from ..\FSComp.txt:760) + /// (Originally from ..\FSComp.txt:759) static member tcTypeRequiresDefinition() = (929, GetStringFunc("tcTypeRequiresDefinition",",,,") ) /// This type abbreviation has one or more declared type parameters that do not appear in the type being abbreviated. Type abbreviations must use all declared type parameters in the type being abbreviated. Consider removing one or more type parameters, or use a concrete type definition that wraps an underlying type, such as 'type C<'a> = C of ...'. - /// (Originally from ..\FSComp.txt:761) + /// (Originally from ..\FSComp.txt:760) static member tcTypeAbbreviationHasTypeParametersMissingOnType() = (GetStringFunc("tcTypeAbbreviationHasTypeParametersMissingOnType",",,,") ) /// Structs, interfaces, enums and delegates cannot inherit from other types - /// (Originally from ..\FSComp.txt:762) + /// (Originally from ..\FSComp.txt:761) static member tcStructsInterfacesEnumsDelegatesMayNotInheritFromOtherTypes() = (931, GetStringFunc("tcStructsInterfacesEnumsDelegatesMayNotInheritFromOtherTypes",",,,") ) /// Types cannot inherit from multiple concrete types - /// (Originally from ..\FSComp.txt:763) + /// (Originally from ..\FSComp.txt:762) static member tcTypesCannotInheritFromMultipleConcreteTypes() = (932, GetStringFunc("tcTypesCannotInheritFromMultipleConcreteTypes",",,,") ) /// Records, union, abbreviations and struct types cannot have the 'AllowNullLiteral' attribute - /// (Originally from ..\FSComp.txt:764) + /// (Originally from ..\FSComp.txt:763) static member tcRecordsUnionsAbbreviationsStructsMayNotHaveAllowNullLiteralAttribute() = (934, GetStringFunc("tcRecordsUnionsAbbreviationsStructsMayNotHaveAllowNullLiteralAttribute",",,,") ) /// Types with the 'AllowNullLiteral' attribute may only inherit from or implement types which also allow the use of the null literal - /// (Originally from ..\FSComp.txt:765) + /// (Originally from ..\FSComp.txt:764) static member tcAllowNullTypesMayOnlyInheritFromAllowNullTypes() = (935, GetStringFunc("tcAllowNullTypesMayOnlyInheritFromAllowNullTypes",",,,") ) /// Generic types cannot be given the 'StructLayout' attribute - /// (Originally from ..\FSComp.txt:766) + /// (Originally from ..\FSComp.txt:765) static member tcGenericTypesCannotHaveStructLayout() = (936, GetStringFunc("tcGenericTypesCannotHaveStructLayout",",,,") ) /// Only structs and classes without primary constructors may be given the 'StructLayout' attribute - /// (Originally from ..\FSComp.txt:767) + /// (Originally from ..\FSComp.txt:766) static member tcOnlyStructsCanHaveStructLayout() = (937, GetStringFunc("tcOnlyStructsCanHaveStructLayout",",,,") ) /// The representation of this type is hidden by the signature. It must be given an attribute such as [], [] or [] to indicate the characteristics of the type. - /// (Originally from ..\FSComp.txt:768) + /// (Originally from ..\FSComp.txt:767) static member tcRepresentationOfTypeHiddenBySignature() = (938, GetStringFunc("tcRepresentationOfTypeHiddenBySignature",",,,") ) /// Only classes may be given the 'AbstractClass' attribute - /// (Originally from ..\FSComp.txt:769) + /// (Originally from ..\FSComp.txt:768) static member tcOnlyClassesCanHaveAbstract() = (939, GetStringFunc("tcOnlyClassesCanHaveAbstract",",,,") ) /// Only types representing units-of-measure may be given the 'Measure' attribute - /// (Originally from ..\FSComp.txt:770) + /// (Originally from ..\FSComp.txt:769) static member tcOnlyTypesRepresentingUnitsOfMeasureCanHaveMeasure() = (940, GetStringFunc("tcOnlyTypesRepresentingUnitsOfMeasureCanHaveMeasure",",,,") ) /// Accessibility modifiers are not permitted on overrides or interface implementations - /// (Originally from ..\FSComp.txt:771) + /// (Originally from ..\FSComp.txt:770) static member tcOverridesCannotHaveVisibilityDeclarations() = (941, GetStringFunc("tcOverridesCannotHaveVisibilityDeclarations",",,,") ) /// Discriminated union types are always sealed - /// (Originally from ..\FSComp.txt:772) + /// (Originally from ..\FSComp.txt:771) static member tcTypesAreAlwaysSealedDU() = (942, GetStringFunc("tcTypesAreAlwaysSealedDU",",,,") ) /// Record types are always sealed - /// (Originally from ..\FSComp.txt:773) + /// (Originally from ..\FSComp.txt:772) static member tcTypesAreAlwaysSealedRecord() = (942, GetStringFunc("tcTypesAreAlwaysSealedRecord",",,,") ) /// Assembly code types are always sealed - /// (Originally from ..\FSComp.txt:774) + /// (Originally from ..\FSComp.txt:773) static member tcTypesAreAlwaysSealedAssemblyCode() = (942, GetStringFunc("tcTypesAreAlwaysSealedAssemblyCode",",,,") ) /// Struct types are always sealed - /// (Originally from ..\FSComp.txt:775) + /// (Originally from ..\FSComp.txt:774) static member tcTypesAreAlwaysSealedStruct() = (942, GetStringFunc("tcTypesAreAlwaysSealedStruct",",,,") ) /// Delegate types are always sealed - /// (Originally from ..\FSComp.txt:776) + /// (Originally from ..\FSComp.txt:775) static member tcTypesAreAlwaysSealedDelegate() = (942, GetStringFunc("tcTypesAreAlwaysSealedDelegate",",,,") ) /// Enum types are always sealed - /// (Originally from ..\FSComp.txt:777) + /// (Originally from ..\FSComp.txt:776) static member tcTypesAreAlwaysSealedEnum() = (942, GetStringFunc("tcTypesAreAlwaysSealedEnum",",,,") ) /// Interface types and delegate types cannot contain fields - /// (Originally from ..\FSComp.txt:778) + /// (Originally from ..\FSComp.txt:777) static member tcInterfaceTypesAndDelegatesCannotContainFields() = (943, GetStringFunc("tcInterfaceTypesAndDelegatesCannotContainFields",",,,") ) /// Abbreviated types cannot be given the 'Sealed' attribute - /// (Originally from ..\FSComp.txt:779) + /// (Originally from ..\FSComp.txt:778) static member tcAbbreviatedTypesCannotBeSealed() = (944, GetStringFunc("tcAbbreviatedTypesCannotBeSealed",",,,") ) /// Cannot inherit a sealed type - /// (Originally from ..\FSComp.txt:780) + /// (Originally from ..\FSComp.txt:779) static member tcCannotInheritFromSealedType() = (945, GetStringFunc("tcCannotInheritFromSealedType",",,,") ) /// Cannot inherit from interface type. Use interface ... with instead. - /// (Originally from ..\FSComp.txt:781) + /// (Originally from ..\FSComp.txt:780) static member tcCannotInheritFromInterfaceType() = (946, GetStringFunc("tcCannotInheritFromInterfaceType",",,,") ) /// Struct types cannot contain abstract members - /// (Originally from ..\FSComp.txt:782) + /// (Originally from ..\FSComp.txt:781) static member tcStructTypesCannotContainAbstractMembers() = (947, GetStringFunc("tcStructTypesCannotContainAbstractMembers",",,,") ) /// Interface types cannot be sealed - /// (Originally from ..\FSComp.txt:783) + /// (Originally from ..\FSComp.txt:782) static member tcInterfaceTypesCannotBeSealed() = (948, GetStringFunc("tcInterfaceTypesCannotBeSealed",",,,") ) /// Delegate specifications must be of the form 'typ -> typ' - /// (Originally from ..\FSComp.txt:784) + /// (Originally from ..\FSComp.txt:783) static member tcInvalidDelegateSpecification() = (949, GetStringFunc("tcInvalidDelegateSpecification",",,,") ) /// Delegate specifications must not be curried types. Use 'typ * ... * typ -> typ' for multi-argument delegates, and 'typ -> (typ -> typ)' for delegates returning function values. - /// (Originally from ..\FSComp.txt:785) + /// (Originally from ..\FSComp.txt:784) static member tcDelegatesCannotBeCurried() = (950, GetStringFunc("tcDelegatesCannotBeCurried",",,,") ) /// Literal enumerations must have type int, uint, int16, uint16, int64, uint64, byte, sbyte or char - /// (Originally from ..\FSComp.txt:786) + /// (Originally from ..\FSComp.txt:785) static member tcInvalidTypeForLiteralEnumeration() = (951, GetStringFunc("tcInvalidTypeForLiteralEnumeration",",,,") ) /// This type definition involves an immediate cyclic reference through an abbreviation - /// (Originally from ..\FSComp.txt:788) + /// (Originally from ..\FSComp.txt:787) static member tcTypeDefinitionIsCyclic() = (953, GetStringFunc("tcTypeDefinitionIsCyclic",",,,") ) /// This type definition involves an immediate cyclic reference through a struct field or inheritance relation - /// (Originally from ..\FSComp.txt:789) + /// (Originally from ..\FSComp.txt:788) static member tcTypeDefinitionIsCyclicThroughInheritance() = (954, GetStringFunc("tcTypeDefinitionIsCyclicThroughInheritance",",,,") ) /// The syntax 'type X with ...' is reserved for augmentations. Types whose representations are hidden but which have members are now declared in signatures using 'type X = ...'. You may also need to add the '[] attribute to the type definition in the signature - /// (Originally from ..\FSComp.txt:790) + /// (Originally from ..\FSComp.txt:789) static member tcReservedSyntaxForAugmentation() = (GetStringFunc("tcReservedSyntaxForAugmentation",",,,") ) /// Members that extend interface, delegate or enum types must be placed in a module separate to the definition of the type. This module must either have the AutoOpen attribute or be opened explicitly by client code to bring the extension members into scope. - /// (Originally from ..\FSComp.txt:791) + /// (Originally from ..\FSComp.txt:790) static member tcMembersThatExtendInterfaceMustBePlacedInSeparateModule() = (956, GetStringFunc("tcMembersThatExtendInterfaceMustBePlacedInSeparateModule",",,,") ) /// One or more of the declared type parameters for this type extension have a missing or wrong type constraint not matching the original type constraints on '%s' - /// (Originally from ..\FSComp.txt:792) + /// (Originally from ..\FSComp.txt:791) static member tcDeclaredTypeParametersForExtensionDoNotMatchOriginal(a0 : System.String) = (957, GetStringFunc("tcDeclaredTypeParametersForExtensionDoNotMatchOriginal",",,,%s,,,") a0) /// Type definitions may only have one 'inherit' specification and it must be the first declaration - /// (Originally from ..\FSComp.txt:793) + /// (Originally from ..\FSComp.txt:792) static member tcTypeDefinitionsWithImplicitConstructionMustHaveOneInherit() = (959, GetStringFunc("tcTypeDefinitionsWithImplicitConstructionMustHaveOneInherit",",,,") ) /// 'let' and 'do' bindings must come before member and interface definitions in type definitions - /// (Originally from ..\FSComp.txt:794) + /// (Originally from ..\FSComp.txt:793) static member tcTypeDefinitionsWithImplicitConstructionMustHaveLocalBindingsBeforeMembers() = (960, GetStringFunc("tcTypeDefinitionsWithImplicitConstructionMustHaveLocalBindingsBeforeMembers",",,,") ) /// This 'inherit' declaration specifies the inherited type but no arguments. Consider supplying arguments, e.g. 'inherit BaseType(args)'. - /// (Originally from ..\FSComp.txt:795) + /// (Originally from ..\FSComp.txt:794) static member tcInheritDeclarationMissingArguments() = (961, GetStringFunc("tcInheritDeclarationMissingArguments",",,,") ) /// This 'inherit' declaration has arguments, but is not in a type with a primary constructor. Consider adding arguments to your type definition, e.g. 'type X(args) = ...'. - /// (Originally from ..\FSComp.txt:796) + /// (Originally from ..\FSComp.txt:795) static member tcInheritConstructionCallNotPartOfImplicitSequence() = (962, GetStringFunc("tcInheritConstructionCallNotPartOfImplicitSequence",",,,") ) /// This definition may only be used in a type with a primary constructor. Consider adding arguments to your type definition, e.g. 'type X(args) = ...'. - /// (Originally from ..\FSComp.txt:797) + /// (Originally from ..\FSComp.txt:796) static member tcLetAndDoRequiresImplicitConstructionSequence() = (963, GetStringFunc("tcLetAndDoRequiresImplicitConstructionSequence",",,,") ) /// Type abbreviations cannot have augmentations - /// (Originally from ..\FSComp.txt:798) + /// (Originally from ..\FSComp.txt:797) static member tcTypeAbbreviationsCannotHaveAugmentations() = (964, GetStringFunc("tcTypeAbbreviationsCannotHaveAugmentations",",,,") ) /// The path '%s' is a namespace. A module abbreviation may not abbreviate a namespace. - /// (Originally from ..\FSComp.txt:799) + /// (Originally from ..\FSComp.txt:798) static member tcModuleAbbreviationForNamespace(a0 : System.String) = (965, GetStringFunc("tcModuleAbbreviationForNamespace",",,,%s,,,") a0) /// The type '%s' is used in an invalid way. A value prior to '%s' has an inferred type involving '%s', which is an invalid forward reference. - /// (Originally from ..\FSComp.txt:800) + /// (Originally from ..\FSComp.txt:799) static member tcTypeUsedInInvalidWay(a0 : System.String, a1 : System.String, a2 : System.String) = (966, GetStringFunc("tcTypeUsedInInvalidWay",",,,%s,,,%s,,,%s,,,") a0 a1 a2) /// The member '%s' is used in an invalid way. A use of '%s' has been inferred prior to the definition of '%s', which is an invalid forward reference. - /// (Originally from ..\FSComp.txt:801) + /// (Originally from ..\FSComp.txt:800) static member tcMemberUsedInInvalidWay(a0 : System.String, a1 : System.String, a2 : System.String) = (967, GetStringFunc("tcMemberUsedInInvalidWay",",,,%s,,,%s,,,%s,,,") a0 a1 a2) /// The attribute 'AutoOpen(\"%s\")' in the assembly '%s' did not refer to a valid module or namespace in that assembly and has been ignored - /// (Originally from ..\FSComp.txt:804) + /// (Originally from ..\FSComp.txt:803) static member tcAttributeAutoOpenWasIgnored(a0 : System.String, a1 : System.String) = (970, GetStringFunc("tcAttributeAutoOpenWasIgnored",",,,%s,,,%s,,,") a0 a1) /// Undefined value '%s' - /// (Originally from ..\FSComp.txt:805) + /// (Originally from ..\FSComp.txt:804) static member ilUndefinedValue(a0 : System.String) = (971, GetStringFunc("ilUndefinedValue",",,,%s,,,") a0) /// Label %s not found - /// (Originally from ..\FSComp.txt:806) + /// (Originally from ..\FSComp.txt:805) static member ilLabelNotFound(a0 : System.String) = (972, GetStringFunc("ilLabelNotFound",",,,%s,,,") a0) /// Incorrect number of type arguments to local call - /// (Originally from ..\FSComp.txt:807) + /// (Originally from ..\FSComp.txt:806) static member ilIncorrectNumberOfTypeArguments() = (973, GetStringFunc("ilIncorrectNumberOfTypeArguments",",,,") ) /// Dynamic invocation of %s is not supported - /// (Originally from ..\FSComp.txt:808) + /// (Originally from ..\FSComp.txt:807) static member ilDynamicInvocationNotSupported(a0 : System.String) = (GetStringFunc("ilDynamicInvocationNotSupported",",,,%s,,,") a0) /// Taking the address of a literal field is invalid - /// (Originally from ..\FSComp.txt:809) + /// (Originally from ..\FSComp.txt:808) static member ilAddressOfLiteralFieldIsInvalid() = (975, GetStringFunc("ilAddressOfLiteralFieldIsInvalid",",,,") ) /// This operation involves taking the address of a value '%s' represented using a local variable or other special representation. This is invalid. - /// (Originally from ..\FSComp.txt:810) + /// (Originally from ..\FSComp.txt:809) static member ilAddressOfValueHereIsInvalid(a0 : System.String) = (976, GetStringFunc("ilAddressOfValueHereIsInvalid",",,,%s,,,") a0) /// Custom marshallers cannot be specified in F# code. Consider using a C# helper function. - /// (Originally from ..\FSComp.txt:811) + /// (Originally from ..\FSComp.txt:810) static member ilCustomMarshallersCannotBeUsedInFSharp() = (980, GetStringFunc("ilCustomMarshallersCannotBeUsedInFSharp",",,,") ) /// The MarshalAs attribute could not be decoded - /// (Originally from ..\FSComp.txt:812) + /// (Originally from ..\FSComp.txt:811) static member ilMarshalAsAttributeCannotBeDecoded() = (981, GetStringFunc("ilMarshalAsAttributeCannotBeDecoded",",,,") ) /// The signature for this external function contains type parameters. Constrain the argument and return types to indicate the types of the corresponding C function. - /// (Originally from ..\FSComp.txt:813) + /// (Originally from ..\FSComp.txt:812) static member ilSignatureForExternalFunctionContainsTypeParameters() = (982, GetStringFunc("ilSignatureForExternalFunctionContainsTypeParameters",",,,") ) /// The DllImport attribute could not be decoded - /// (Originally from ..\FSComp.txt:814) + /// (Originally from ..\FSComp.txt:813) static member ilDllImportAttributeCouldNotBeDecoded() = (983, GetStringFunc("ilDllImportAttributeCouldNotBeDecoded",",,,") ) /// Literal fields cannot be set - /// (Originally from ..\FSComp.txt:815) + /// (Originally from ..\FSComp.txt:814) static member ilLiteralFieldsCannotBeSet() = (984, GetStringFunc("ilLiteralFieldsCannotBeSet",",,,") ) /// GenSetStorage: %s was represented as a static method but was not an appropriate lambda expression - /// (Originally from ..\FSComp.txt:816) + /// (Originally from ..\FSComp.txt:815) static member ilStaticMethodIsNotLambda(a0 : System.String) = (985, GetStringFunc("ilStaticMethodIsNotLambda",",,,%s,,,") a0) /// Mutable variables cannot escape their method - /// (Originally from ..\FSComp.txt:817) + /// (Originally from ..\FSComp.txt:816) static member ilMutableVariablesCannotEscapeMethod() = (986, GetStringFunc("ilMutableVariablesCannotEscapeMethod",",,,") ) /// Compiler error: unexpected unrealized value - /// (Originally from ..\FSComp.txt:818) + /// (Originally from ..\FSComp.txt:817) static member ilUnexpectedUnrealizedValue() = (987, GetStringFunc("ilUnexpectedUnrealizedValue",",,,") ) /// Main module of program is empty: nothing will happen when it is run - /// (Originally from ..\FSComp.txt:819) + /// (Originally from ..\FSComp.txt:818) static member ilMainModuleEmpty() = (988, GetStringFunc("ilMainModuleEmpty",",,,") ) /// This type cannot be used for a literal field - /// (Originally from ..\FSComp.txt:820) + /// (Originally from ..\FSComp.txt:819) static member ilTypeCannotBeUsedForLiteralField() = (989, GetStringFunc("ilTypeCannotBeUsedForLiteralField",",,,") ) /// Unexpected GetSet annotation on a property - /// (Originally from ..\FSComp.txt:821) + /// (Originally from ..\FSComp.txt:820) static member ilUnexpectedGetSetAnnotation() = (990, GetStringFunc("ilUnexpectedGetSetAnnotation",",,,") ) /// The FieldOffset attribute could not be decoded - /// (Originally from ..\FSComp.txt:822) + /// (Originally from ..\FSComp.txt:821) static member ilFieldOffsetAttributeCouldNotBeDecoded() = (991, GetStringFunc("ilFieldOffsetAttributeCouldNotBeDecoded",",,,") ) /// The StructLayout attribute could not be decoded - /// (Originally from ..\FSComp.txt:823) + /// (Originally from ..\FSComp.txt:822) static member ilStructLayoutAttributeCouldNotBeDecoded() = (992, GetStringFunc("ilStructLayoutAttributeCouldNotBeDecoded",",,,") ) /// The DefaultAugmentation attribute could not be decoded - /// (Originally from ..\FSComp.txt:824) + /// (Originally from ..\FSComp.txt:823) static member ilDefaultAugmentationAttributeCouldNotBeDecoded() = (993, GetStringFunc("ilDefaultAugmentationAttributeCouldNotBeDecoded",",,,") ) /// Reflected definitions cannot contain uses of the prefix splice operator '%%' - /// (Originally from ..\FSComp.txt:825) + /// (Originally from ..\FSComp.txt:824) static member ilReflectedDefinitionsCannotUseSliceOperator() = (994, GetStringFunc("ilReflectedDefinitionsCannotUseSliceOperator",",,,") ) /// Problem with codepage '%d': %s - /// (Originally from ..\FSComp.txt:826) + /// (Originally from ..\FSComp.txt:825) static member optsProblemWithCodepage(a0 : System.Int32, a1 : System.String) = (1000, GetStringFunc("optsProblemWithCodepage",",,,%d,,,%s,,,") a0 a1) /// Copyright (c) Microsoft Corporation. All Rights Reserved. - /// (Originally from ..\FSComp.txt:827) + /// (Originally from ..\FSComp.txt:826) static member optsCopyright() = (GetStringFunc("optsCopyright",",,,") ) /// Freely distributed under the MIT Open Source License. https://github.com/Microsoft/visualfsharp/blob/master/License.txt - /// (Originally from ..\FSComp.txt:828) + /// (Originally from ..\FSComp.txt:827) static member optsCopyrightCommunity() = (GetStringFunc("optsCopyrightCommunity",",,,") ) /// Name of the output file (Short form: -o) - /// (Originally from ..\FSComp.txt:829) + /// (Originally from ..\FSComp.txt:828) static member optsNameOfOutputFile() = (GetStringFunc("optsNameOfOutputFile",",,,") ) /// Build a console executable - /// (Originally from ..\FSComp.txt:830) + /// (Originally from ..\FSComp.txt:829) static member optsBuildConsole() = (GetStringFunc("optsBuildConsole",",,,") ) /// Build a Windows executable - /// (Originally from ..\FSComp.txt:831) + /// (Originally from ..\FSComp.txt:830) static member optsBuildWindows() = (GetStringFunc("optsBuildWindows",",,,") ) /// Build a library (Short form: -a) - /// (Originally from ..\FSComp.txt:832) + /// (Originally from ..\FSComp.txt:831) static member optsBuildLibrary() = (GetStringFunc("optsBuildLibrary",",,,") ) /// Build a module that can be added to another assembly - /// (Originally from ..\FSComp.txt:833) + /// (Originally from ..\FSComp.txt:832) static member optsBuildModule() = (GetStringFunc("optsBuildModule",",,,") ) /// Delay-sign the assembly using only the public portion of the strong name key - /// (Originally from ..\FSComp.txt:834) + /// (Originally from ..\FSComp.txt:833) static member optsDelaySign() = (GetStringFunc("optsDelaySign",",,,") ) /// Public-sign the assembly using only the public portion of the strong name key, and mark the assembly as signed - /// (Originally from ..\FSComp.txt:835) + /// (Originally from ..\FSComp.txt:834) static member optsPublicSign() = (GetStringFunc("optsPublicSign",",,,") ) /// Write the xmldoc of the assembly to the given file - /// (Originally from ..\FSComp.txt:836) + /// (Originally from ..\FSComp.txt:835) static member optsWriteXml() = (GetStringFunc("optsWriteXml",",,,") ) /// Specify a strong name key file - /// (Originally from ..\FSComp.txt:837) + /// (Originally from ..\FSComp.txt:836) static member optsStrongKeyFile() = (GetStringFunc("optsStrongKeyFile",",,,") ) /// Specify a strong name key container - /// (Originally from ..\FSComp.txt:838) + /// (Originally from ..\FSComp.txt:837) static member optsStrongKeyContainer() = (GetStringFunc("optsStrongKeyContainer",",,,") ) /// Limit which platforms this code can run on: x86, Itanium, x64, anycpu32bitpreferred, or anycpu. The default is anycpu. - /// (Originally from ..\FSComp.txt:839) + /// (Originally from ..\FSComp.txt:838) static member optsPlatform() = (GetStringFunc("optsPlatform",",,,") ) /// Only include optimization information essential for implementing inlined constructs. Inhibits cross-module inlining but improves binary compatibility. - /// (Originally from ..\FSComp.txt:840) + /// (Originally from ..\FSComp.txt:839) static member optsNoOpt() = (GetStringFunc("optsNoOpt",",,,") ) /// Don't add a resource to the generated assembly containing F#-specific metadata - /// (Originally from ..\FSComp.txt:841) + /// (Originally from ..\FSComp.txt:840) static member optsNoInterface() = (GetStringFunc("optsNoInterface",",,,") ) /// Print the inferred interface of the assembly to a file - /// (Originally from ..\FSComp.txt:842) + /// (Originally from ..\FSComp.txt:841) static member optsSig() = (GetStringFunc("optsSig",",,,") ) /// Reference an assembly (Short form: -r) - /// (Originally from ..\FSComp.txt:843) + /// (Originally from ..\FSComp.txt:842) static member optsReference() = (GetStringFunc("optsReference",",,,") ) /// Specify a Win32 resource file (.res) - /// (Originally from ..\FSComp.txt:844) + /// (Originally from ..\FSComp.txt:843) static member optsWin32res() = (GetStringFunc("optsWin32res",",,,") ) /// Specify a Win32 manifest file - /// (Originally from ..\FSComp.txt:845) + /// (Originally from ..\FSComp.txt:844) static member optsWin32manifest() = (GetStringFunc("optsWin32manifest",",,,") ) /// Do not include the default Win32 manifest - /// (Originally from ..\FSComp.txt:846) + /// (Originally from ..\FSComp.txt:845) static member optsNowin32manifest() = (GetStringFunc("optsNowin32manifest",",,,") ) /// Embed all source files in the portable PDB file - /// (Originally from ..\FSComp.txt:847) + /// (Originally from ..\FSComp.txt:846) static member optsEmbedAllSource() = (GetStringFunc("optsEmbedAllSource",",,,") ) /// Embed specific source files in the portable PDB file - /// (Originally from ..\FSComp.txt:848) + /// (Originally from ..\FSComp.txt:847) static member optsEmbedSource() = (GetStringFunc("optsEmbedSource",",,,") ) /// Source link information file to embed in the portable PDB file - /// (Originally from ..\FSComp.txt:849) + /// (Originally from ..\FSComp.txt:848) static member optsSourceLink() = (GetStringFunc("optsSourceLink",",,,") ) /// --embed switch only supported when emitting a Portable PDB (--debug:portable or --debug:embedded) - /// (Originally from ..\FSComp.txt:850) + /// (Originally from ..\FSComp.txt:849) static member optsEmbeddedSourceRequirePortablePDBs() = (1501, GetStringFunc("optsEmbeddedSourceRequirePortablePDBs",",,,") ) /// --sourcelink switch only supported when emitting a Portable PDB (--debug:portable or --debug:embedded) - /// (Originally from ..\FSComp.txt:851) + /// (Originally from ..\FSComp.txt:850) static member optsSourceLinkRequirePortablePDBs() = (1502, GetStringFunc("optsSourceLinkRequirePortablePDBs",",,,") ) /// Source file is too large to embed in a portable PDB - /// (Originally from ..\FSComp.txt:852) + /// (Originally from ..\FSComp.txt:851) static member srcFileTooLarge() = (GetStringFunc("srcFileTooLarge",",,,") ) /// Embed the specified managed resource - /// (Originally from ..\FSComp.txt:853) + /// (Originally from ..\FSComp.txt:852) static member optsResource() = (GetStringFunc("optsResource",",,,") ) /// Link the specified resource to this assembly where the resinfo format is [,[,public|private]] - /// (Originally from ..\FSComp.txt:854) + /// (Originally from ..\FSComp.txt:853) static member optsLinkresource() = (GetStringFunc("optsLinkresource",",,,") ) /// Emit debug information (Short form: -g) - /// (Originally from ..\FSComp.txt:855) + /// (Originally from ..\FSComp.txt:854) static member optsDebugPM() = (GetStringFunc("optsDebugPM",",,,") ) /// Specify debugging type: full, portable, embedded, pdbonly. ('%s' is the default if no debuggging type specified and enables attaching a debugger to a running program, 'portable' is a cross-platform format, 'embedded' is a cross-platform format embedded into the output file). - /// (Originally from ..\FSComp.txt:856) + /// (Originally from ..\FSComp.txt:855) static member optsDebug(a0 : System.String) = (GetStringFunc("optsDebug",",,,%s,,,") a0) /// Enable optimizations (Short form: -O) - /// (Originally from ..\FSComp.txt:857) + /// (Originally from ..\FSComp.txt:856) static member optsOptimize() = (GetStringFunc("optsOptimize",",,,") ) /// Enable or disable tailcalls - /// (Originally from ..\FSComp.txt:858) + /// (Originally from ..\FSComp.txt:857) static member optsTailcalls() = (GetStringFunc("optsTailcalls",",,,") ) /// Produce a deterministic assembly (including module version GUID and timestamp) - /// (Originally from ..\FSComp.txt:859) + /// (Originally from ..\FSComp.txt:858) static member optsDeterministic() = (GetStringFunc("optsDeterministic",",,,") ) /// Enable or disable cross-module optimizations - /// (Originally from ..\FSComp.txt:860) + /// (Originally from ..\FSComp.txt:859) static member optsCrossoptimize() = (GetStringFunc("optsCrossoptimize",",,,") ) /// Report all warnings as errors - /// (Originally from ..\FSComp.txt:861) + /// (Originally from ..\FSComp.txt:860) static member optsWarnaserrorPM() = (GetStringFunc("optsWarnaserrorPM",",,,") ) /// Report specific warnings as errors - /// (Originally from ..\FSComp.txt:862) + /// (Originally from ..\FSComp.txt:861) static member optsWarnaserror() = (GetStringFunc("optsWarnaserror",",,,") ) /// Set a warning level (0-5) - /// (Originally from ..\FSComp.txt:863) + /// (Originally from ..\FSComp.txt:862) static member optsWarn() = (GetStringFunc("optsWarn",",,,") ) /// Disable specific warning messages - /// (Originally from ..\FSComp.txt:864) + /// (Originally from ..\FSComp.txt:863) static member optsNowarn() = (GetStringFunc("optsNowarn",",,,") ) /// Enable specific warnings that may be off by default - /// (Originally from ..\FSComp.txt:865) + /// (Originally from ..\FSComp.txt:864) static member optsWarnOn() = (GetStringFunc("optsWarnOn",",,,") ) /// Generate overflow checks - /// (Originally from ..\FSComp.txt:866) + /// (Originally from ..\FSComp.txt:865) static member optsChecked() = (GetStringFunc("optsChecked",",,,") ) /// Define conditional compilation symbols (Short form: -d) - /// (Originally from ..\FSComp.txt:867) + /// (Originally from ..\FSComp.txt:866) static member optsDefine() = (GetStringFunc("optsDefine",",,,") ) /// Ignore ML compatibility warnings - /// (Originally from ..\FSComp.txt:868) + /// (Originally from ..\FSComp.txt:867) static member optsMlcompatibility() = (GetStringFunc("optsMlcompatibility",",,,") ) /// Suppress compiler copyright message - /// (Originally from ..\FSComp.txt:869) + /// (Originally from ..\FSComp.txt:868) static member optsNologo() = (GetStringFunc("optsNologo",",,,") ) /// Display this usage message (Short form: -?) - /// (Originally from ..\FSComp.txt:870) + /// (Originally from ..\FSComp.txt:869) static member optsHelp() = (GetStringFunc("optsHelp",",,,") ) /// Read response file for more options - /// (Originally from ..\FSComp.txt:871) + /// (Originally from ..\FSComp.txt:870) static member optsResponseFile() = (GetStringFunc("optsResponseFile",",,,") ) /// Specify the codepage used to read source files - /// (Originally from ..\FSComp.txt:872) + /// (Originally from ..\FSComp.txt:871) static member optsCodepage() = (GetStringFunc("optsCodepage",",,,") ) /// Output messages in UTF-8 encoding - /// (Originally from ..\FSComp.txt:873) + /// (Originally from ..\FSComp.txt:872) static member optsUtf8output() = (GetStringFunc("optsUtf8output",",,,") ) /// Output messages with fully qualified paths - /// (Originally from ..\FSComp.txt:874) + /// (Originally from ..\FSComp.txt:873) static member optsFullpaths() = (GetStringFunc("optsFullpaths",",,,") ) /// Specify a directory for the include path which is used to resolve source files and assemblies (Short form: -I) - /// (Originally from ..\FSComp.txt:875) + /// (Originally from ..\FSComp.txt:874) static member optsLib() = (GetStringFunc("optsLib",",,,") ) /// Base address for the library to be built - /// (Originally from ..\FSComp.txt:876) + /// (Originally from ..\FSComp.txt:875) static member optsBaseaddress() = (GetStringFunc("optsBaseaddress",",,,") ) /// Do not reference the default CLI assemblies by default - /// (Originally from ..\FSComp.txt:877) + /// (Originally from ..\FSComp.txt:876) static member optsNoframework() = (GetStringFunc("optsNoframework",",,,") ) /// Statically link the F# library and all referenced DLLs that depend on it into the assembly being generated - /// (Originally from ..\FSComp.txt:878) + /// (Originally from ..\FSComp.txt:877) static member optsStandalone() = (GetStringFunc("optsStandalone",",,,") ) /// Statically link the given assembly and all referenced DLLs that depend on this assembly. Use an assembly name e.g. mylib, not a DLL name. - /// (Originally from ..\FSComp.txt:879) + /// (Originally from ..\FSComp.txt:878) static member optsStaticlink() = (GetStringFunc("optsStaticlink",",,,") ) /// Use a resident background compilation service to improve compiler startup times. - /// (Originally from ..\FSComp.txt:880) + /// (Originally from ..\FSComp.txt:879) static member optsResident() = (GetStringFunc("optsResident",",,,") ) /// Name the output debug file - /// (Originally from ..\FSComp.txt:881) + /// (Originally from ..\FSComp.txt:880) static member optsPdb() = (GetStringFunc("optsPdb",",,,") ) /// Resolve assembly references using directory-based rules rather than MSBuild resolution - /// (Originally from ..\FSComp.txt:882) + /// (Originally from ..\FSComp.txt:881) static member optsSimpleresolution() = (GetStringFunc("optsSimpleresolution",",,,") ) /// Unrecognized target '%s', expected 'exe', 'winexe', 'library' or 'module' - /// (Originally from ..\FSComp.txt:883) + /// (Originally from ..\FSComp.txt:882) static member optsUnrecognizedTarget(a0 : System.String) = (1048, GetStringFunc("optsUnrecognizedTarget",",,,%s,,,") a0) /// Unrecognized debug type '%s', expected 'pdbonly' or 'full' - /// (Originally from ..\FSComp.txt:884) + /// (Originally from ..\FSComp.txt:883) static member optsUnrecognizedDebugType(a0 : System.String) = (1049, GetStringFunc("optsUnrecognizedDebugType",",,,%s,,,") a0) /// Invalid warning level '%d' - /// (Originally from ..\FSComp.txt:885) + /// (Originally from ..\FSComp.txt:884) static member optsInvalidWarningLevel(a0 : System.Int32) = (1050, GetStringFunc("optsInvalidWarningLevel",",,,%d,,,") a0) /// Short form of '%s' - /// (Originally from ..\FSComp.txt:886) + /// (Originally from ..\FSComp.txt:885) static member optsShortFormOf(a0 : System.String) = (GetStringFunc("optsShortFormOf",",,,%s,,,") a0) /// The command-line option '--cliroot' has been deprecated. Use an explicit reference to a specific copy of mscorlib.dll instead. - /// (Originally from ..\FSComp.txt:887) + /// (Originally from ..\FSComp.txt:886) static member optsClirootDeprecatedMsg() = (GetStringFunc("optsClirootDeprecatedMsg",",,,") ) /// Use to override where the compiler looks for mscorlib.dll and framework components - /// (Originally from ..\FSComp.txt:888) + /// (Originally from ..\FSComp.txt:887) static member optsClirootDescription() = (GetStringFunc("optsClirootDescription",",,,") ) /// - OUTPUT FILES - - /// (Originally from ..\FSComp.txt:889) + /// (Originally from ..\FSComp.txt:888) static member optsHelpBannerOutputFiles() = (GetStringFunc("optsHelpBannerOutputFiles",",,,") ) /// - INPUT FILES - - /// (Originally from ..\FSComp.txt:890) + /// (Originally from ..\FSComp.txt:889) static member optsHelpBannerInputFiles() = (GetStringFunc("optsHelpBannerInputFiles",",,,") ) /// - RESOURCES - - /// (Originally from ..\FSComp.txt:891) + /// (Originally from ..\FSComp.txt:890) static member optsHelpBannerResources() = (GetStringFunc("optsHelpBannerResources",",,,") ) /// - CODE GENERATION - - /// (Originally from ..\FSComp.txt:892) + /// (Originally from ..\FSComp.txt:891) static member optsHelpBannerCodeGen() = (GetStringFunc("optsHelpBannerCodeGen",",,,") ) /// - ADVANCED - - /// (Originally from ..\FSComp.txt:893) + /// (Originally from ..\FSComp.txt:892) static member optsHelpBannerAdvanced() = (GetStringFunc("optsHelpBannerAdvanced",",,,") ) /// - MISCELLANEOUS - - /// (Originally from ..\FSComp.txt:894) + /// (Originally from ..\FSComp.txt:893) static member optsHelpBannerMisc() = (GetStringFunc("optsHelpBannerMisc",",,,") ) /// - LANGUAGE - - /// (Originally from ..\FSComp.txt:895) + /// (Originally from ..\FSComp.txt:894) static member optsHelpBannerLanguage() = (GetStringFunc("optsHelpBannerLanguage",",,,") ) /// - ERRORS AND WARNINGS - - /// (Originally from ..\FSComp.txt:896) + /// (Originally from ..\FSComp.txt:895) static member optsHelpBannerErrsAndWarns() = (GetStringFunc("optsHelpBannerErrsAndWarns",",,,") ) /// Unknown --test argument: '%s' - /// (Originally from ..\FSComp.txt:897) + /// (Originally from ..\FSComp.txt:896) static member optsUnknownArgumentToTheTestSwitch(a0 : System.String) = (1063, GetStringFunc("optsUnknownArgumentToTheTestSwitch",",,,%s,,,") a0) /// Unrecognized platform '%s', valid values are 'x86', 'x64', 'Itanium', 'anycpu32bitpreferred', and 'anycpu' - /// (Originally from ..\FSComp.txt:898) + /// (Originally from ..\FSComp.txt:897) static member optsUnknownPlatform(a0 : System.String) = (1064, GetStringFunc("optsUnknownPlatform",",,,%s,,,") a0) /// The command-line option '%s' is for test purposes only - /// (Originally from ..\FSComp.txt:899) + /// (Originally from ..\FSComp.txt:898) static member optsInternalNoDescription(a0 : System.String) = (GetStringFunc("optsInternalNoDescription",",,,%s,,,") a0) /// The command-line option '%s' has been deprecated - /// (Originally from ..\FSComp.txt:900) + /// (Originally from ..\FSComp.txt:899) static member optsDCLONoDescription(a0 : System.String) = (GetStringFunc("optsDCLONoDescription",",,,%s,,,") a0) /// The command-line option '%s' has been deprecated. Use '%s' instead. - /// (Originally from ..\FSComp.txt:901) + /// (Originally from ..\FSComp.txt:900) static member optsDCLODeprecatedSuggestAlternative(a0 : System.String, a1 : System.String) = (GetStringFunc("optsDCLODeprecatedSuggestAlternative",",,,%s,,,%s,,,") a0 a1) /// The command-line option '%s' has been deprecated. HTML document generation is now part of the F# Power Pack, via the tool FsHtmlDoc.exe. - /// (Originally from ..\FSComp.txt:902) + /// (Originally from ..\FSComp.txt:901) static member optsDCLOHtmlDoc(a0 : System.String) = (GetStringFunc("optsDCLOHtmlDoc",",,,%s,,,") a0) /// Output warning and error messages in color - /// (Originally from ..\FSComp.txt:903) + /// (Originally from ..\FSComp.txt:902) static member optsConsoleColors() = (GetStringFunc("optsConsoleColors",",,,") ) /// Enable high-entropy ASLR - /// (Originally from ..\FSComp.txt:904) + /// (Originally from ..\FSComp.txt:903) static member optsUseHighEntropyVA() = (GetStringFunc("optsUseHighEntropyVA",",,,") ) /// Specify subsystem version of this assembly - /// (Originally from ..\FSComp.txt:905) + /// (Originally from ..\FSComp.txt:904) static member optsSubSystemVersion() = (GetStringFunc("optsSubSystemVersion",",,,") ) /// Specify target framework profile of this assembly. Valid values are mscorlib, netcore or netstandard. Default - mscorlib - /// (Originally from ..\FSComp.txt:906) + /// (Originally from ..\FSComp.txt:905) static member optsTargetProfile() = (GetStringFunc("optsTargetProfile",",,,") ) /// Emit debug information in quotations - /// (Originally from ..\FSComp.txt:907) + /// (Originally from ..\FSComp.txt:906) static member optsEmitDebugInfoInQuotations() = (GetStringFunc("optsEmitDebugInfoInQuotations",",,,") ) /// Specify the preferred output language culture name (e.g. es-ES, ja-JP) - /// (Originally from ..\FSComp.txt:908) + /// (Originally from ..\FSComp.txt:907) static member optsPreferredUiLang() = (GetStringFunc("optsPreferredUiLang",",,,") ) /// Don't copy FSharp.Core.dll along the produced binaries - /// (Originally from ..\FSComp.txt:909) + /// (Originally from ..\FSComp.txt:908) static member optsNoCopyFsharpCore() = (GetStringFunc("optsNoCopyFsharpCore",",,,") ) /// Invalid version '%s' for '--subsystemversion'. The version must be 4.00 or greater. - /// (Originally from ..\FSComp.txt:910) + /// (Originally from ..\FSComp.txt:909) static member optsInvalidSubSystemVersion(a0 : System.String) = (1051, GetStringFunc("optsInvalidSubSystemVersion",",,,%s,,,") a0) /// Invalid value '%s' for '--targetprofile', valid values are 'mscorlib', 'netcore' or 'netstandard'. - /// (Originally from ..\FSComp.txt:911) + /// (Originally from ..\FSComp.txt:910) static member optsInvalidTargetProfile(a0 : System.String) = (1052, GetStringFunc("optsInvalidTargetProfile",",,,%s,,,") a0) /// Full name - /// (Originally from ..\FSComp.txt:912) + /// (Originally from ..\FSComp.txt:911) static member typeInfoFullName() = (GetStringFunc("typeInfoFullName",",,,") ) /// and %d other overloads - /// (Originally from ..\FSComp.txt:916) + /// (Originally from ..\FSComp.txt:915) static member typeInfoOtherOverloads(a0 : System.Int32) = (GetStringFunc("typeInfoOtherOverloads",",,,%d,,,") a0) /// union case - /// (Originally from ..\FSComp.txt:917) + /// (Originally from ..\FSComp.txt:916) static member typeInfoUnionCase() = (GetStringFunc("typeInfoUnionCase",",,,") ) /// active pattern result - /// (Originally from ..\FSComp.txt:918) + /// (Originally from ..\FSComp.txt:917) static member typeInfoActivePatternResult() = (GetStringFunc("typeInfoActivePatternResult",",,,") ) /// active recognizer - /// (Originally from ..\FSComp.txt:919) + /// (Originally from ..\FSComp.txt:918) static member typeInfoActiveRecognizer() = (GetStringFunc("typeInfoActiveRecognizer",",,,") ) /// field - /// (Originally from ..\FSComp.txt:920) + /// (Originally from ..\FSComp.txt:919) static member typeInfoField() = (GetStringFunc("typeInfoField",",,,") ) /// event - /// (Originally from ..\FSComp.txt:921) + /// (Originally from ..\FSComp.txt:920) static member typeInfoEvent() = (GetStringFunc("typeInfoEvent",",,,") ) /// property - /// (Originally from ..\FSComp.txt:922) + /// (Originally from ..\FSComp.txt:921) static member typeInfoProperty() = (GetStringFunc("typeInfoProperty",",,,") ) /// extension - /// (Originally from ..\FSComp.txt:923) + /// (Originally from ..\FSComp.txt:922) static member typeInfoExtension() = (GetStringFunc("typeInfoExtension",",,,") ) /// custom operation - /// (Originally from ..\FSComp.txt:924) + /// (Originally from ..\FSComp.txt:923) static member typeInfoCustomOperation() = (GetStringFunc("typeInfoCustomOperation",",,,") ) /// argument - /// (Originally from ..\FSComp.txt:925) + /// (Originally from ..\FSComp.txt:924) static member typeInfoArgument() = (GetStringFunc("typeInfoArgument",",,,") ) /// patvar - /// (Originally from ..\FSComp.txt:926) + /// (Originally from ..\FSComp.txt:925) static member typeInfoPatternVariable() = (GetStringFunc("typeInfoPatternVariable",",,,") ) /// namespace - /// (Originally from ..\FSComp.txt:927) + /// (Originally from ..\FSComp.txt:926) static member typeInfoNamespace() = (GetStringFunc("typeInfoNamespace",",,,") ) /// module - /// (Originally from ..\FSComp.txt:928) + /// (Originally from ..\FSComp.txt:927) static member typeInfoModule() = (GetStringFunc("typeInfoModule",",,,") ) /// namespace/module - /// (Originally from ..\FSComp.txt:929) + /// (Originally from ..\FSComp.txt:928) static member typeInfoNamespaceOrModule() = (GetStringFunc("typeInfoNamespaceOrModule",",,,") ) /// from %s - /// (Originally from ..\FSComp.txt:930) + /// (Originally from ..\FSComp.txt:929) static member typeInfoFromFirst(a0 : System.String) = (GetStringFunc("typeInfoFromFirst",",,,%s,,,") a0) /// also from %s - /// (Originally from ..\FSComp.txt:931) + /// (Originally from ..\FSComp.txt:930) static member typeInfoFromNext(a0 : System.String) = (GetStringFunc("typeInfoFromNext",",,,%s,,,") a0) /// generated property - /// (Originally from ..\FSComp.txt:932) + /// (Originally from ..\FSComp.txt:931) static member typeInfoGeneratedProperty() = (GetStringFunc("typeInfoGeneratedProperty",",,,") ) /// generated type - /// (Originally from ..\FSComp.txt:933) + /// (Originally from ..\FSComp.txt:932) static member typeInfoGeneratedType() = (GetStringFunc("typeInfoGeneratedType",",,,") ) /// Found by AssemblyFolders registry key - /// (Originally from ..\FSComp.txt:934) + /// (Originally from ..\FSComp.txt:933) static member assemblyResolutionFoundByAssemblyFoldersKey() = (GetStringFunc("assemblyResolutionFoundByAssemblyFoldersKey",",,,") ) /// Found by AssemblyFoldersEx registry key - /// (Originally from ..\FSComp.txt:935) + /// (Originally from ..\FSComp.txt:934) static member assemblyResolutionFoundByAssemblyFoldersExKey() = (GetStringFunc("assemblyResolutionFoundByAssemblyFoldersExKey",",,,") ) /// .NET Framework - /// (Originally from ..\FSComp.txt:936) + /// (Originally from ..\FSComp.txt:935) static member assemblyResolutionNetFramework() = (GetStringFunc("assemblyResolutionNetFramework",",,,") ) /// Global Assembly Cache - /// (Originally from ..\FSComp.txt:937) + /// (Originally from ..\FSComp.txt:936) static member assemblyResolutionGAC() = (GetStringFunc("assemblyResolutionGAC",",,,") ) /// Recursive class hierarchy in type '%s' - /// (Originally from ..\FSComp.txt:938) + /// (Originally from ..\FSComp.txt:937) static member recursiveClassHierarchy(a0 : System.String) = (1089, GetStringFunc("recursiveClassHierarchy",",,,%s,,,") a0) /// Invalid recursive reference to an abstract slot - /// (Originally from ..\FSComp.txt:939) + /// (Originally from ..\FSComp.txt:938) static member InvalidRecursiveReferenceToAbstractSlot() = (1090, GetStringFunc("InvalidRecursiveReferenceToAbstractSlot",",,,") ) /// The event '%s' has a non-standard type. If this event is declared in another CLI language, you may need to access this event using the explicit %s and %s methods for the event. If this event is declared in F#, make the type of the event an instantiation of either 'IDelegateEvent<_>' or 'IEvent<_,_>'. - /// (Originally from ..\FSComp.txt:940) + /// (Originally from ..\FSComp.txt:939) static member eventHasNonStandardType(a0 : System.String, a1 : System.String, a2 : System.String) = (1091, GetStringFunc("eventHasNonStandardType",",,,%s,,,%s,,,%s,,,") a0 a1 a2) /// The type '%s' is not accessible from this code location - /// (Originally from ..\FSComp.txt:941) + /// (Originally from ..\FSComp.txt:940) static member typeIsNotAccessible(a0 : System.String) = (1092, GetStringFunc("typeIsNotAccessible",",,,%s,,,") a0) /// The union cases or fields of the type '%s' are not accessible from this code location - /// (Originally from ..\FSComp.txt:942) + /// (Originally from ..\FSComp.txt:941) static member unionCasesAreNotAccessible(a0 : System.String) = (1093, GetStringFunc("unionCasesAreNotAccessible",",,,%s,,,") a0) /// The value '%s' is not accessible from this code location - /// (Originally from ..\FSComp.txt:943) + /// (Originally from ..\FSComp.txt:942) static member valueIsNotAccessible(a0 : System.String) = (1094, GetStringFunc("valueIsNotAccessible",",,,%s,,,") a0) /// The union case '%s' is not accessible from this code location - /// (Originally from ..\FSComp.txt:944) + /// (Originally from ..\FSComp.txt:943) static member unionCaseIsNotAccessible(a0 : System.String) = (1095, GetStringFunc("unionCaseIsNotAccessible",",,,%s,,,") a0) /// The record, struct or class field '%s' is not accessible from this code location - /// (Originally from ..\FSComp.txt:945) + /// (Originally from ..\FSComp.txt:944) static member fieldIsNotAccessible(a0 : System.String) = (1096, GetStringFunc("fieldIsNotAccessible",",,,%s,,,") a0) /// The struct or class field '%s' is not accessible from this code location - /// (Originally from ..\FSComp.txt:946) + /// (Originally from ..\FSComp.txt:945) static member structOrClassFieldIsNotAccessible(a0 : System.String) = (1097, GetStringFunc("structOrClassFieldIsNotAccessible",",,,%s,,,") a0) /// This construct is experimental - /// (Originally from ..\FSComp.txt:947) + /// (Originally from ..\FSComp.txt:946) static member experimentalConstruct() = (GetStringFunc("experimentalConstruct",",,,") ) /// No Invoke methods found for delegate type - /// (Originally from ..\FSComp.txt:948) + /// (Originally from ..\FSComp.txt:947) static member noInvokeMethodsFound() = (1099, GetStringFunc("noInvokeMethodsFound",",,,") ) /// More than one Invoke method found for delegate type - /// (Originally from ..\FSComp.txt:949) + /// (Originally from ..\FSComp.txt:948) static member moreThanOneInvokeMethodFound() = (GetStringFunc("moreThanOneInvokeMethodFound",",,,") ) /// Delegates are not allowed to have curried signatures - /// (Originally from ..\FSComp.txt:950) + /// (Originally from ..\FSComp.txt:949) static member delegatesNotAllowedToHaveCurriedSignatures() = (1101, GetStringFunc("delegatesNotAllowedToHaveCurriedSignatures",",,,") ) /// Unexpected Expr.TyChoose - /// (Originally from ..\FSComp.txt:951) + /// (Originally from ..\FSComp.txt:950) static member tlrUnexpectedTExpr() = (1102, GetStringFunc("tlrUnexpectedTExpr",",,,") ) /// Note: Lambda-lifting optimizations have not been applied because of the use of this local constrained generic function as a first class value. Adding type constraints may resolve this condition. - /// (Originally from ..\FSComp.txt:952) + /// (Originally from ..\FSComp.txt:951) static member tlrLambdaLiftingOptimizationsNotApplied() = (1103, GetStringFunc("tlrLambdaLiftingOptimizationsNotApplied",",,,") ) /// Identifiers containing '@' are reserved for use in F# code generation - /// (Originally from ..\FSComp.txt:953) + /// (Originally from ..\FSComp.txt:952) static member lexhlpIdentifiersContainingAtSymbolReserved() = (1104, GetStringFunc("lexhlpIdentifiersContainingAtSymbolReserved",",,,") ) /// The identifier '%s' is reserved for future use by F# - /// (Originally from ..\FSComp.txt:954) + /// (Originally from ..\FSComp.txt:953) static member lexhlpIdentifierReserved(a0 : System.String) = (GetStringFunc("lexhlpIdentifierReserved",",,,%s,,,") a0) /// Missing variable '%s' - /// (Originally from ..\FSComp.txt:955) + /// (Originally from ..\FSComp.txt:954) static member patcMissingVariable(a0 : System.String) = (1106, GetStringFunc("patcMissingVariable",",,,%s,,,") a0) /// Partial active patterns may only generate one result - /// (Originally from ..\FSComp.txt:956) + /// (Originally from ..\FSComp.txt:955) static member patcPartialActivePatternsGenerateOneResult() = (1107, GetStringFunc("patcPartialActivePatternsGenerateOneResult",",,,") ) /// The type '%s' is required here and is unavailable. You must add a reference to assembly '%s'. - /// (Originally from ..\FSComp.txt:957) + /// (Originally from ..\FSComp.txt:956) static member impTypeRequiredUnavailable(a0 : System.String, a1 : System.String) = (1108, GetStringFunc("impTypeRequiredUnavailable",",,,%s,,,%s,,,") a0 a1) /// A reference to the type '%s' in assembly '%s' was found, but the type could not be found in that assembly - /// (Originally from ..\FSComp.txt:958) + /// (Originally from ..\FSComp.txt:957) static member impReferencedTypeCouldNotBeFoundInAssembly(a0 : System.String, a1 : System.String) = (1109, GetStringFunc("impReferencedTypeCouldNotBeFoundInAssembly",",,,%s,,,%s,,,") a0 a1) /// Internal error or badly formed metadata: not enough type parameters were in scope while importing - /// (Originally from ..\FSComp.txt:959) + /// (Originally from ..\FSComp.txt:958) static member impNotEnoughTypeParamsInScopeWhileImporting() = (1110, GetStringFunc("impNotEnoughTypeParamsInScopeWhileImporting",",,,") ) /// A reference to the DLL %s is required by assembly %s. The imported type %s is located in the first assembly and could not be resolved. - /// (Originally from ..\FSComp.txt:960) + /// (Originally from ..\FSComp.txt:959) static member impReferenceToDllRequiredByAssembly(a0 : System.String, a1 : System.String, a2 : System.String) = (1111, GetStringFunc("impReferenceToDllRequiredByAssembly",",,,%s,,,%s,,,%s,,,") a0 a1 a2) /// An imported assembly uses the type '%s' but that type is not public - /// (Originally from ..\FSComp.txt:961) + /// (Originally from ..\FSComp.txt:960) static member impImportedAssemblyUsesNotPublicType(a0 : System.String) = (1112, GetStringFunc("impImportedAssemblyUsesNotPublicType",",,,%s,,,") a0) /// The value '%s' was marked inline but its implementation makes use of an internal or private function which is not sufficiently accessible - /// (Originally from ..\FSComp.txt:962) + /// (Originally from ..\FSComp.txt:961) static member optValueMarkedInlineButIncomplete(a0 : System.String) = (1113, GetStringFunc("optValueMarkedInlineButIncomplete",",,,%s,,,") a0) /// The value '%s' was marked inline but was not bound in the optimization environment - /// (Originally from ..\FSComp.txt:963) + /// (Originally from ..\FSComp.txt:962) static member optValueMarkedInlineButWasNotBoundInTheOptEnv(a0 : System.String) = (1114, GetStringFunc("optValueMarkedInlineButWasNotBoundInTheOptEnv",",,,%s,,,") a0) /// Local value %s not found during optimization - /// (Originally from ..\FSComp.txt:964) + /// (Originally from ..\FSComp.txt:963) static member optLocalValueNotFoundDuringOptimization(a0 : System.String) = (1115, GetStringFunc("optLocalValueNotFoundDuringOptimization",",,,%s,,,") a0) /// A value marked as 'inline' has an unexpected value - /// (Originally from ..\FSComp.txt:965) + /// (Originally from ..\FSComp.txt:964) static member optValueMarkedInlineHasUnexpectedValue() = (1116, GetStringFunc("optValueMarkedInlineHasUnexpectedValue",",,,") ) /// A value marked as 'inline' could not be inlined - /// (Originally from ..\FSComp.txt:966) + /// (Originally from ..\FSComp.txt:965) static member optValueMarkedInlineCouldNotBeInlined() = (1117, GetStringFunc("optValueMarkedInlineCouldNotBeInlined",",,,") ) /// Failed to inline the value '%s' marked 'inline', perhaps because a recursive value was marked 'inline' - /// (Originally from ..\FSComp.txt:967) + /// (Originally from ..\FSComp.txt:966) static member optFailedToInlineValue(a0 : System.String) = (1118, GetStringFunc("optFailedToInlineValue",",,,%s,,,") a0) /// Recursive ValValue %s - /// (Originally from ..\FSComp.txt:968) + /// (Originally from ..\FSComp.txt:967) static member optRecursiveValValue(a0 : System.String) = (1119, GetStringFunc("optRecursiveValValue",",,,%s,,,") a0) /// The indentation of this 'in' token is incorrect with respect to the corresponding 'let' - /// (Originally from ..\FSComp.txt:969) + /// (Originally from ..\FSComp.txt:968) static member lexfltIncorrentIndentationOfIn() = (GetStringFunc("lexfltIncorrentIndentationOfIn",",,,") ) /// Possible incorrect indentation: this token is offside of context started at position %s. Try indenting this token further or using standard formatting conventions. - /// (Originally from ..\FSComp.txt:970) + /// (Originally from ..\FSComp.txt:969) static member lexfltTokenIsOffsideOfContextStartedEarlier(a0 : System.String) = (GetStringFunc("lexfltTokenIsOffsideOfContextStartedEarlier",",,,%s,,,") a0) /// The '|' tokens separating rules of this pattern match are misaligned by one column. Consider realigning your code or using further indentation. - /// (Originally from ..\FSComp.txt:971) + /// (Originally from ..\FSComp.txt:970) static member lexfltSeparatorTokensOfPatternMatchMisaligned() = (GetStringFunc("lexfltSeparatorTokensOfPatternMatchMisaligned",",,,") ) /// Invalid module/expression/type - /// (Originally from ..\FSComp.txt:972) + /// (Originally from ..\FSComp.txt:971) static member nrInvalidModuleExprType() = (1123, GetStringFunc("nrInvalidModuleExprType",",,,") ) /// Multiple types exist called '%s', taking different numbers of generic parameters. Provide a type instantiation to disambiguate the type resolution, e.g. '%s'. - /// (Originally from ..\FSComp.txt:973) + /// (Originally from ..\FSComp.txt:972) static member nrTypeInstantiationNeededToDisambiguateTypesWithSameName(a0 : System.String, a1 : System.String) = (1124, GetStringFunc("nrTypeInstantiationNeededToDisambiguateTypesWithSameName",",,,%s,,,%s,,,") a0 a1) /// The instantiation of the generic type '%s' is missing and can't be inferred from the arguments or return type of this member. Consider providing a type instantiation when accessing this type, e.g. '%s'. - /// (Originally from ..\FSComp.txt:974) + /// (Originally from ..\FSComp.txt:973) static member nrTypeInstantiationIsMissingAndCouldNotBeInferred(a0 : System.String, a1 : System.String) = (1125, GetStringFunc("nrTypeInstantiationIsMissingAndCouldNotBeInferred",",,,%s,,,%s,,,") a0 a1) /// 'global' may only be used as the first name in a qualified path - /// (Originally from ..\FSComp.txt:975) + /// (Originally from ..\FSComp.txt:974) static member nrGlobalUsedOnlyAsFirstName() = (1126, GetStringFunc("nrGlobalUsedOnlyAsFirstName",",,,") ) /// This is not a constructor or literal, or a constructor is being used incorrectly - /// (Originally from ..\FSComp.txt:976) + /// (Originally from ..\FSComp.txt:975) static member nrIsNotConstructorOrLiteral() = (1127, GetStringFunc("nrIsNotConstructorOrLiteral",",,,") ) /// Unexpected empty long identifier - /// (Originally from ..\FSComp.txt:977) + /// (Originally from ..\FSComp.txt:976) static member nrUnexpectedEmptyLongId() = (1128, GetStringFunc("nrUnexpectedEmptyLongId",",,,") ) /// The record type '%s' does not contain a label '%s'. - /// (Originally from ..\FSComp.txt:978) + /// (Originally from ..\FSComp.txt:977) static member nrRecordDoesNotContainSuchLabel(a0 : System.String, a1 : System.String) = (1129, GetStringFunc("nrRecordDoesNotContainSuchLabel",",,,%s,,,%s,,,") a0 a1) /// Invalid field label - /// (Originally from ..\FSComp.txt:979) + /// (Originally from ..\FSComp.txt:978) static member nrInvalidFieldLabel() = (1130, GetStringFunc("nrInvalidFieldLabel",",,,") ) /// Invalid expression '%s' - /// (Originally from ..\FSComp.txt:980) + /// (Originally from ..\FSComp.txt:979) static member nrInvalidExpression(a0 : System.String) = (1132, GetStringFunc("nrInvalidExpression",",,,%s,,,") a0) /// No constructors are available for the type '%s' - /// (Originally from ..\FSComp.txt:981) + /// (Originally from ..\FSComp.txt:980) static member nrNoConstructorsAvailableForType(a0 : System.String) = (1133, GetStringFunc("nrNoConstructorsAvailableForType",",,,%s,,,") a0) /// The union type for union case '%s' was defined with the RequireQualifiedAccessAttribute. Include the name of the union type ('%s') in the name you are using. - /// (Originally from ..\FSComp.txt:982) + /// (Originally from ..\FSComp.txt:981) static member nrUnionTypeNeedsQualifiedAccess(a0 : System.String, a1 : System.String) = (1134, GetStringFunc("nrUnionTypeNeedsQualifiedAccess",",,,%s,,,%s,,,") a0 a1) /// The record type for the record field '%s' was defined with the RequireQualifiedAccessAttribute. Include the name of the record type ('%s') in the name you are using. - /// (Originally from ..\FSComp.txt:983) + /// (Originally from ..\FSComp.txt:982) static member nrRecordTypeNeedsQualifiedAccess(a0 : System.String, a1 : System.String) = (1135, GetStringFunc("nrRecordTypeNeedsQualifiedAccess",",,,%s,,,%s,,,") a0 a1) /// Unexpected error creating debug information file '%s' - /// (Originally from ..\FSComp.txt:984) + /// (Originally from ..\FSComp.txt:983) static member ilwriteErrorCreatingPdb(a0 : System.String) = (1136, GetStringFunc("ilwriteErrorCreatingPdb",",,,%s,,,") a0) /// This number is outside the allowable range for this integer type - /// (Originally from ..\FSComp.txt:985) + /// (Originally from ..\FSComp.txt:984) static member lexOutsideIntegerRange() = (1138, GetStringFunc("lexOutsideIntegerRange",",,,") ) /// '%s' is not permitted as a character in operator names and is reserved for future use - /// (Originally from ..\FSComp.txt:989) + /// (Originally from ..\FSComp.txt:988) static member lexCharNotAllowedInOperatorNames(a0 : System.String) = (GetStringFunc("lexCharNotAllowedInOperatorNames",",,,%s,,,") a0) /// Unexpected character '%s' - /// (Originally from ..\FSComp.txt:990) + /// (Originally from ..\FSComp.txt:989) static member lexUnexpectedChar(a0 : System.String) = (GetStringFunc("lexUnexpectedChar",",,,%s,,,") a0) /// This byte array literal contains characters that do not encode as a single byte - /// (Originally from ..\FSComp.txt:991) + /// (Originally from ..\FSComp.txt:990) static member lexByteArrayCannotEncode() = (1140, GetStringFunc("lexByteArrayCannotEncode",",,,") ) /// Identifiers followed by '%s' are reserved for future use - /// (Originally from ..\FSComp.txt:992) + /// (Originally from ..\FSComp.txt:991) static member lexIdentEndInMarkReserved(a0 : System.String) = (1141, GetStringFunc("lexIdentEndInMarkReserved",",,,%s,,,") a0) /// This number is outside the allowable range for 8-bit signed integers - /// (Originally from ..\FSComp.txt:993) + /// (Originally from ..\FSComp.txt:992) static member lexOutsideEightBitSigned() = (1142, GetStringFunc("lexOutsideEightBitSigned",",,,") ) /// This number is outside the allowable range for hexadecimal 8-bit signed integers - /// (Originally from ..\FSComp.txt:994) + /// (Originally from ..\FSComp.txt:993) static member lexOutsideEightBitSignedHex() = (1143, GetStringFunc("lexOutsideEightBitSignedHex",",,,") ) /// This number is outside the allowable range for 8-bit unsigned integers - /// (Originally from ..\FSComp.txt:995) + /// (Originally from ..\FSComp.txt:994) static member lexOutsideEightBitUnsigned() = (1144, GetStringFunc("lexOutsideEightBitUnsigned",",,,") ) /// This number is outside the allowable range for 16-bit signed integers - /// (Originally from ..\FSComp.txt:996) + /// (Originally from ..\FSComp.txt:995) static member lexOutsideSixteenBitSigned() = (1145, GetStringFunc("lexOutsideSixteenBitSigned",",,,") ) /// This number is outside the allowable range for 16-bit unsigned integers - /// (Originally from ..\FSComp.txt:997) + /// (Originally from ..\FSComp.txt:996) static member lexOutsideSixteenBitUnsigned() = (1146, GetStringFunc("lexOutsideSixteenBitUnsigned",",,,") ) /// This number is outside the allowable range for 32-bit signed integers - /// (Originally from ..\FSComp.txt:998) + /// (Originally from ..\FSComp.txt:997) static member lexOutsideThirtyTwoBitSigned() = (1147, GetStringFunc("lexOutsideThirtyTwoBitSigned",",,,") ) /// This number is outside the allowable range for 32-bit unsigned integers - /// (Originally from ..\FSComp.txt:999) + /// (Originally from ..\FSComp.txt:998) static member lexOutsideThirtyTwoBitUnsigned() = (1148, GetStringFunc("lexOutsideThirtyTwoBitUnsigned",",,,") ) /// This number is outside the allowable range for 64-bit signed integers - /// (Originally from ..\FSComp.txt:1000) + /// (Originally from ..\FSComp.txt:999) static member lexOutsideSixtyFourBitSigned() = (1149, GetStringFunc("lexOutsideSixtyFourBitSigned",",,,") ) /// This number is outside the allowable range for 64-bit unsigned integers - /// (Originally from ..\FSComp.txt:1001) + /// (Originally from ..\FSComp.txt:1000) static member lexOutsideSixtyFourBitUnsigned() = (1150, GetStringFunc("lexOutsideSixtyFourBitUnsigned",",,,") ) /// This number is outside the allowable range for signed native integers - /// (Originally from ..\FSComp.txt:1002) + /// (Originally from ..\FSComp.txt:1001) static member lexOutsideNativeSigned() = (1151, GetStringFunc("lexOutsideNativeSigned",",,,") ) /// This number is outside the allowable range for unsigned native integers - /// (Originally from ..\FSComp.txt:1003) + /// (Originally from ..\FSComp.txt:1002) static member lexOutsideNativeUnsigned() = (1152, GetStringFunc("lexOutsideNativeUnsigned",",,,") ) /// Invalid floating point number - /// (Originally from ..\FSComp.txt:1004) + /// (Originally from ..\FSComp.txt:1003) static member lexInvalidFloat() = (1153, GetStringFunc("lexInvalidFloat",",,,") ) /// This number is outside the allowable range for decimal literals - /// (Originally from ..\FSComp.txt:1005) + /// (Originally from ..\FSComp.txt:1004) static member lexOusideDecimal() = (1154, GetStringFunc("lexOusideDecimal",",,,") ) /// This number is outside the allowable range for 32-bit floats - /// (Originally from ..\FSComp.txt:1006) + /// (Originally from ..\FSComp.txt:1005) static member lexOusideThirtyTwoBitFloat() = (1155, GetStringFunc("lexOusideThirtyTwoBitFloat",",,,") ) /// This is not a valid numeric literal. Valid numeric literals include 1, 0x1, 0b0001 (int), 1u (uint32), 1L (int64), 1UL (uint64), 1s (int16), 1y (sbyte), 1uy (byte), 1.0 (float), 1.0f (float32), 1.0m (decimal), 1I (BigInteger). - /// (Originally from ..\FSComp.txt:1007) + /// (Originally from ..\FSComp.txt:1006) static member lexInvalidNumericLiteral() = (1156, GetStringFunc("lexInvalidNumericLiteral",",,,") ) /// This is not a valid byte literal - /// (Originally from ..\FSComp.txt:1008) + /// (Originally from ..\FSComp.txt:1007) static member lexInvalidByteLiteral() = (1157, GetStringFunc("lexInvalidByteLiteral",",,,") ) /// This is not a valid character literal - /// (Originally from ..\FSComp.txt:1009) + /// (Originally from ..\FSComp.txt:1008) static member lexInvalidCharLiteral() = (1158, GetStringFunc("lexInvalidCharLiteral",",,,") ) /// This Unicode encoding is only valid in string literals - /// (Originally from ..\FSComp.txt:1010) + /// (Originally from ..\FSComp.txt:1009) static member lexThisUnicodeOnlyInStringLiterals() = (1159, GetStringFunc("lexThisUnicodeOnlyInStringLiterals",",,,") ) /// This token is reserved for future use - /// (Originally from ..\FSComp.txt:1011) + /// (Originally from ..\FSComp.txt:1010) static member lexTokenReserved() = (1160, GetStringFunc("lexTokenReserved",",,,") ) /// TABs are not allowed in F# code unless the #indent \"off\" option is used - /// (Originally from ..\FSComp.txt:1012) + /// (Originally from ..\FSComp.txt:1011) static member lexTabsNotAllowed() = (1161, GetStringFunc("lexTabsNotAllowed",",,,") ) /// Invalid line number: '%s' - /// (Originally from ..\FSComp.txt:1013) + /// (Originally from ..\FSComp.txt:1012) static member lexInvalidLineNumber(a0 : System.String) = (1162, GetStringFunc("lexInvalidLineNumber",",,,%s,,,") a0) /// #if directive must appear as the first non-whitespace character on a line - /// (Originally from ..\FSComp.txt:1014) + /// (Originally from ..\FSComp.txt:1013) static member lexHashIfMustBeFirst() = (1163, GetStringFunc("lexHashIfMustBeFirst",",,,") ) /// #else has no matching #if - /// (Originally from ..\FSComp.txt:1015) + /// (Originally from ..\FSComp.txt:1014) static member lexHashElseNoMatchingIf() = (GetStringFunc("lexHashElseNoMatchingIf",",,,") ) /// #endif required for #else - /// (Originally from ..\FSComp.txt:1016) + /// (Originally from ..\FSComp.txt:1015) static member lexHashEndifRequiredForElse() = (GetStringFunc("lexHashEndifRequiredForElse",",,,") ) /// #else directive must appear as the first non-whitespace character on a line - /// (Originally from ..\FSComp.txt:1017) + /// (Originally from ..\FSComp.txt:1016) static member lexHashElseMustBeFirst() = (1166, GetStringFunc("lexHashElseMustBeFirst",",,,") ) /// #endif has no matching #if - /// (Originally from ..\FSComp.txt:1018) + /// (Originally from ..\FSComp.txt:1017) static member lexHashEndingNoMatchingIf() = (GetStringFunc("lexHashEndingNoMatchingIf",",,,") ) /// #endif directive must appear as the first non-whitespace character on a line - /// (Originally from ..\FSComp.txt:1019) + /// (Originally from ..\FSComp.txt:1018) static member lexHashEndifMustBeFirst() = (1168, GetStringFunc("lexHashEndifMustBeFirst",",,,") ) /// #if directive should be immediately followed by an identifier - /// (Originally from ..\FSComp.txt:1020) + /// (Originally from ..\FSComp.txt:1019) static member lexHashIfMustHaveIdent() = (1169, GetStringFunc("lexHashIfMustHaveIdent",",,,") ) /// Syntax error. Wrong nested #endif, unexpected tokens before it. - /// (Originally from ..\FSComp.txt:1021) + /// (Originally from ..\FSComp.txt:1020) static member lexWrongNestedHashEndif() = (1170, GetStringFunc("lexWrongNestedHashEndif",",,,") ) /// #! may only appear as the first line at the start of a file. - /// (Originally from ..\FSComp.txt:1022) + /// (Originally from ..\FSComp.txt:1021) static member lexHashBangMustBeFirstInFile() = (GetStringFunc("lexHashBangMustBeFirstInFile",",,,") ) /// Expected single line comment or end of line - /// (Originally from ..\FSComp.txt:1023) + /// (Originally from ..\FSComp.txt:1022) static member pplexExpectedSingleLineComment() = (1171, GetStringFunc("pplexExpectedSingleLineComment",",,,") ) /// Infix operator member '%s' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ... - /// (Originally from ..\FSComp.txt:1024) + /// (Originally from ..\FSComp.txt:1023) static member memberOperatorDefinitionWithNoArguments(a0 : System.String) = (1172, GetStringFunc("memberOperatorDefinitionWithNoArguments",",,,%s,,,") a0) /// Infix operator member '%s' has %d initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ... - /// (Originally from ..\FSComp.txt:1025) + /// (Originally from ..\FSComp.txt:1024) static member memberOperatorDefinitionWithNonPairArgument(a0 : System.String, a1 : System.Int32) = (1173, GetStringFunc("memberOperatorDefinitionWithNonPairArgument",",,,%s,,,%d,,,") a0 a1) /// Infix operator member '%s' has extra curried arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ... - /// (Originally from ..\FSComp.txt:1026) + /// (Originally from ..\FSComp.txt:1025) static member memberOperatorDefinitionWithCurriedArguments(a0 : System.String) = (1174, GetStringFunc("memberOperatorDefinitionWithCurriedArguments",",,,%s,,,") a0) /// All record, union and struct types in FSharp.Core.dll must be explicitly labelled with 'StructuralComparison' or 'NoComparison' - /// (Originally from ..\FSComp.txt:1027) + /// (Originally from ..\FSComp.txt:1026) static member tcFSharpCoreRequiresExplicit() = (1175, GetStringFunc("tcFSharpCoreRequiresExplicit",",,,") ) /// The struct, record or union type '%s' has the 'StructuralComparison' attribute but the type parameter '%s' does not satisfy the 'comparison' constraint. Consider adding the 'comparison' constraint to the type parameter - /// (Originally from ..\FSComp.txt:1028) + /// (Originally from ..\FSComp.txt:1027) static member tcStructuralComparisonNotSatisfied1(a0 : System.String, a1 : System.String) = (1176, GetStringFunc("tcStructuralComparisonNotSatisfied1",",,,%s,,,%s,,,") a0 a1) /// The struct, record or union type '%s' has the 'StructuralComparison' attribute but the component type '%s' does not satisfy the 'comparison' constraint - /// (Originally from ..\FSComp.txt:1029) + /// (Originally from ..\FSComp.txt:1028) static member tcStructuralComparisonNotSatisfied2(a0 : System.String, a1 : System.String) = (1177, GetStringFunc("tcStructuralComparisonNotSatisfied2",",,,%s,,,%s,,,") a0 a1) /// The struct, record or union type '%s' is not structurally comparable because the type parameter %s does not satisfy the 'comparison' constraint. Consider adding the 'NoComparison' attribute to the type '%s' to clarify that the type is not comparable - /// (Originally from ..\FSComp.txt:1030) + /// (Originally from ..\FSComp.txt:1029) static member tcNoComparisonNeeded1(a0 : System.String, a1 : System.String, a2 : System.String) = (1178, GetStringFunc("tcNoComparisonNeeded1",",,,%s,,,%s,,,%s,,,") a0 a1 a2) /// The struct, record or union type '%s' is not structurally comparable because the type '%s' does not satisfy the 'comparison' constraint. Consider adding the 'NoComparison' attribute to the type '%s' to clarify that the type is not comparable - /// (Originally from ..\FSComp.txt:1031) + /// (Originally from ..\FSComp.txt:1030) static member tcNoComparisonNeeded2(a0 : System.String, a1 : System.String, a2 : System.String) = (1178, GetStringFunc("tcNoComparisonNeeded2",",,,%s,,,%s,,,%s,,,") a0 a1 a2) /// The struct, record or union type '%s' does not support structural equality because the type parameter %s does not satisfy the 'equality' constraint. Consider adding the 'NoEquality' attribute to the type '%s' to clarify that the type does not support structural equality - /// (Originally from ..\FSComp.txt:1032) + /// (Originally from ..\FSComp.txt:1031) static member tcNoEqualityNeeded1(a0 : System.String, a1 : System.String, a2 : System.String) = (1178, GetStringFunc("tcNoEqualityNeeded1",",,,%s,,,%s,,,%s,,,") a0 a1 a2) /// The struct, record or union type '%s' does not support structural equality because the type '%s' does not satisfy the 'equality' constraint. Consider adding the 'NoEquality' attribute to the type '%s' to clarify that the type does not support structural equality - /// (Originally from ..\FSComp.txt:1033) + /// (Originally from ..\FSComp.txt:1032) static member tcNoEqualityNeeded2(a0 : System.String, a1 : System.String, a2 : System.String) = (1178, GetStringFunc("tcNoEqualityNeeded2",",,,%s,,,%s,,,%s,,,") a0 a1 a2) /// The struct, record or union type '%s' has the 'StructuralEquality' attribute but the type parameter '%s' does not satisfy the 'equality' constraint. Consider adding the 'equality' constraint to the type parameter - /// (Originally from ..\FSComp.txt:1034) + /// (Originally from ..\FSComp.txt:1033) static member tcStructuralEqualityNotSatisfied1(a0 : System.String, a1 : System.String) = (1179, GetStringFunc("tcStructuralEqualityNotSatisfied1",",,,%s,,,%s,,,") a0 a1) /// The struct, record or union type '%s' has the 'StructuralEquality' attribute but the component type '%s' does not satisfy the 'equality' constraint - /// (Originally from ..\FSComp.txt:1035) + /// (Originally from ..\FSComp.txt:1034) static member tcStructuralEqualityNotSatisfied2(a0 : System.String, a1 : System.String) = (1180, GetStringFunc("tcStructuralEqualityNotSatisfied2",",,,%s,,,%s,,,") a0 a1) /// Each argument of the primary constructor for a struct must be given a type, for example 'type S(x1:int, x2: int) = ...'. These arguments determine the fields of the struct. - /// (Originally from ..\FSComp.txt:1036) + /// (Originally from ..\FSComp.txt:1035) static member tcStructsMustDeclareTypesOfImplicitCtorArgsExplicitly() = (1181, GetStringFunc("tcStructsMustDeclareTypesOfImplicitCtorArgsExplicitly",",,,") ) /// The value '%s' is unused - /// (Originally from ..\FSComp.txt:1037) + /// (Originally from ..\FSComp.txt:1036) static member chkUnusedValue(a0 : System.String) = (1182, GetStringFunc("chkUnusedValue",",,,%s,,,") a0) /// The recursive object reference '%s' is unused. The presence of a recursive object reference adds runtime initialization checks to members in this and derived types. Consider removing this recursive object reference. - /// (Originally from ..\FSComp.txt:1038) + /// (Originally from ..\FSComp.txt:1037) static member chkUnusedThisVariable(a0 : System.String) = (1183, GetStringFunc("chkUnusedThisVariable",",,,%s,,,") a0) /// A getter property may have at most one argument group - /// (Originally from ..\FSComp.txt:1039) + /// (Originally from ..\FSComp.txt:1038) static member parsGetterAtMostOneArgument() = (1184, GetStringFunc("parsGetterAtMostOneArgument",",,,") ) /// A setter property may have at most two argument groups - /// (Originally from ..\FSComp.txt:1040) + /// (Originally from ..\FSComp.txt:1039) static member parsSetterAtMostTwoArguments() = (1185, GetStringFunc("parsSetterAtMostTwoArguments",",,,") ) /// Invalid property getter or setter - /// (Originally from ..\FSComp.txt:1041) + /// (Originally from ..\FSComp.txt:1040) static member parsInvalidProperty() = (1186, GetStringFunc("parsInvalidProperty",",,,") ) /// An indexer property must be given at least one argument - /// (Originally from ..\FSComp.txt:1042) + /// (Originally from ..\FSComp.txt:1041) static member parsIndexerPropertyRequiresAtLeastOneArgument() = (1187, GetStringFunc("parsIndexerPropertyRequiresAtLeastOneArgument",",,,") ) /// This operation accesses a mutable top-level value defined in another assembly in an unsupported way. The value cannot be accessed through its address. Consider copying the expression to a mutable local, e.g. 'let mutable x = ...', and if necessary assigning the value back after the completion of the operation - /// (Originally from ..\FSComp.txt:1043) + /// (Originally from ..\FSComp.txt:1042) static member tastInvalidAddressOfMutableAcrossAssemblyBoundary() = (1188, GetStringFunc("tastInvalidAddressOfMutableAcrossAssemblyBoundary",",,,") ) /// Type parameters must be placed directly adjacent to the type name, e.g. \"type C<'T>\", not type \"C <'T>\" - /// (Originally from ..\FSComp.txt:1044) + /// (Originally from ..\FSComp.txt:1043) static member parsNonAdjacentTypars() = (1189, GetStringFunc("parsNonAdjacentTypars",",,,") ) /// Type arguments must be placed directly adjacent to the type name, e.g. \"C<'T>\", not \"C <'T>\" - /// (Originally from ..\FSComp.txt:1045) + /// (Originally from ..\FSComp.txt:1044) static member parsNonAdjacentTyargs() = (1190, GetStringFunc("parsNonAdjacentTyargs",",,,") ) /// The use of the type syntax 'int C' and 'C ' is not permitted here. Consider adjusting this type to be written in the form 'C' - /// (Originally from ..\FSComp.txt:1046) + /// (Originally from ..\FSComp.txt:1045) static member parsNonAtomicType() = (GetStringFunc("parsNonAtomicType",",,,") ) /// The module/namespace '%s' from compilation unit '%s' did not contain the module/namespace '%s' - /// (Originally from ..\FSComp.txt:1049) + /// (Originally from ..\FSComp.txt:1048) static member tastUndefinedItemRefModuleNamespace(a0 : System.String, a1 : System.String, a2 : System.String) = (1193, GetStringFunc("tastUndefinedItemRefModuleNamespace",",,,%s,,,%s,,,%s,,,") a0 a1 a2) /// The module/namespace '%s' from compilation unit '%s' did not contain the val '%s' - /// (Originally from ..\FSComp.txt:1050) + /// (Originally from ..\FSComp.txt:1049) static member tastUndefinedItemRefVal(a0 : System.String, a1 : System.String, a2 : System.String) = (1194, GetStringFunc("tastUndefinedItemRefVal",",,,%s,,,%s,,,%s,,,") a0 a1 a2) /// The module/namespace '%s' from compilation unit '%s' did not contain the namespace, module or type '%s' - /// (Originally from ..\FSComp.txt:1051) + /// (Originally from ..\FSComp.txt:1050) static member tastUndefinedItemRefModuleNamespaceType(a0 : System.String, a1 : System.String, a2 : System.String) = (1195, GetStringFunc("tastUndefinedItemRefModuleNamespaceType",",,,%s,,,%s,,,%s,,,") a0 a1 a2) /// The 'UseNullAsTrueValue' attribute flag may only be used with union types that have one nullary case and at least one non-nullary case - /// (Originally from ..\FSComp.txt:1052) + /// (Originally from ..\FSComp.txt:1051) static member tcInvalidUseNullAsTrueValue() = (1196, GetStringFunc("tcInvalidUseNullAsTrueValue",",,,") ) /// The parameter '%s' was inferred to have byref type. Parameters of byref type must be given an explicit type annotation, e.g. 'x1: byref'. When used, a byref parameter is implicitly dereferenced. - /// (Originally from ..\FSComp.txt:1053) + /// (Originally from ..\FSComp.txt:1052) static member tcParameterInferredByref(a0 : System.String) = (1197, GetStringFunc("tcParameterInferredByref",",,,%s,,,") a0) /// The generic member '%s' has been used at a non-uniform instantiation prior to this program point. Consider reordering the members so this member occurs first. Alternatively, specify the full type of the member explicitly, including argument types, return type and any additional generic parameters and constraints. - /// (Originally from ..\FSComp.txt:1054) + /// (Originally from ..\FSComp.txt:1053) static member tcNonUniformMemberUse(a0 : System.String) = (1198, GetStringFunc("tcNonUniformMemberUse",",,,%s,,,") a0) /// The attribute '%s' appears in both the implementation and the signature, but the attribute arguments differ. Only the attribute from the signature will be included in the compiled code. - /// (Originally from ..\FSComp.txt:1055) + /// (Originally from ..\FSComp.txt:1054) static member tcAttribArgsDiffer(a0 : System.String) = (1200, GetStringFunc("tcAttribArgsDiffer",",,,%s,,,") a0) /// Cannot call an abstract base member: '%s' - /// (Originally from ..\FSComp.txt:1056) + /// (Originally from ..\FSComp.txt:1055) static member tcCannotCallAbstractBaseMember(a0 : System.String) = (1201, GetStringFunc("tcCannotCallAbstractBaseMember",",,,%s,,,") a0) /// Could not resolve the ambiguity in the use of a generic construct with an 'unmanaged' constraint at or near this position - /// (Originally from ..\FSComp.txt:1057) + /// (Originally from ..\FSComp.txt:1056) static member typrelCannotResolveAmbiguityInUnmanaged() = (1202, GetStringFunc("typrelCannotResolveAmbiguityInUnmanaged",",,,") ) /// This construct is for ML compatibility. %s. You can disable this warning by using '--mlcompatibility' or '--nowarn:62'. - /// (Originally from ..\FSComp.txt:1060) + /// (Originally from ..\FSComp.txt:1059) static member mlCompatMessage(a0 : System.String) = (GetStringFunc("mlCompatMessage",",,,%s,,,") a0) /// The type '%s' has been marked as having an Explicit layout, but the field '%s' has not been marked with the 'FieldOffset' attribute - /// (Originally from ..\FSComp.txt:1062) + /// (Originally from ..\FSComp.txt:1061) static member ilFieldDoesNotHaveValidOffsetForStructureLayout(a0 : System.String, a1 : System.String) = (1206, GetStringFunc("ilFieldDoesNotHaveValidOffsetForStructureLayout",",,,%s,,,%s,,,") a0 a1) /// Interfaces inherited by other interfaces should be declared using 'inherit ...' instead of 'interface ...' - /// (Originally from ..\FSComp.txt:1063) + /// (Originally from ..\FSComp.txt:1062) static member tcInterfacesShouldUseInheritNotInterface() = (1207, GetStringFunc("tcInterfacesShouldUseInheritNotInterface",",,,") ) /// Invalid prefix operator - /// (Originally from ..\FSComp.txt:1064) + /// (Originally from ..\FSComp.txt:1063) static member parsInvalidPrefixOperator() = (1208, GetStringFunc("parsInvalidPrefixOperator",",,,") ) /// Invalid operator definition. Prefix operator definitions must use a valid prefix operator name. - /// (Originally from ..\FSComp.txt:1065) + /// (Originally from ..\FSComp.txt:1064) static member parsInvalidPrefixOperatorDefinition() = (1208, GetStringFunc("parsInvalidPrefixOperatorDefinition",",,,") ) /// The file extensions '.ml' and '.mli' are for ML compatibility - /// (Originally from ..\FSComp.txt:1066) + /// (Originally from ..\FSComp.txt:1065) static member buildCompilingExtensionIsForML() = (GetStringFunc("buildCompilingExtensionIsForML",",,,") ) /// Consider using a file with extension '.ml' or '.mli' instead - /// (Originally from ..\FSComp.txt:1067) + /// (Originally from ..\FSComp.txt:1066) static member lexIndentOffForML() = (GetStringFunc("lexIndentOffForML",",,,") ) /// Active pattern '%s' is not a function - /// (Originally from ..\FSComp.txt:1068) + /// (Originally from ..\FSComp.txt:1067) static member activePatternIdentIsNotFunctionTyped(a0 : System.String) = (1209, GetStringFunc("activePatternIdentIsNotFunctionTyped",",,,%s,,,") a0) /// Active pattern '%s' 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 = A x' - /// (Originally from ..\FSComp.txt:1069) + /// (Originally from ..\FSComp.txt:1068) static member activePatternChoiceHasFreeTypars(a0 : System.String) = (1210, GetStringFunc("activePatternChoiceHasFreeTypars",",,,%s,,,") a0) /// The FieldOffset attribute can only be placed on members of types marked with the StructLayout(LayoutKind.Explicit) - /// (Originally from ..\FSComp.txt:1070) + /// (Originally from ..\FSComp.txt:1069) static member ilFieldHasOffsetForSequentialLayout() = (1211, GetStringFunc("ilFieldHasOffsetForSequentialLayout",",,,") ) /// Optional arguments must come at the end of the argument list, after any non-optional arguments - /// (Originally from ..\FSComp.txt:1071) + /// (Originally from ..\FSComp.txt:1070) static member tcOptionalArgsMustComeAfterNonOptionalArgs() = (1212, GetStringFunc("tcOptionalArgsMustComeAfterNonOptionalArgs",",,,") ) /// Attribute 'System.Diagnostics.ConditionalAttribute' is only valid on methods or attribute classes - /// (Originally from ..\FSComp.txt:1072) + /// (Originally from ..\FSComp.txt:1071) static member tcConditionalAttributeUsage() = (1213, GetStringFunc("tcConditionalAttributeUsage",",,,") ) /// Extension members cannot provide operator overloads. Consider defining the operator as part of the type definition instead. - /// (Originally from ..\FSComp.txt:1074) + /// (Originally from ..\FSComp.txt:1073) static member tcMemberOperatorDefinitionInExtrinsic() = (1215, GetStringFunc("tcMemberOperatorDefinitionInExtrinsic",",,,") ) /// The name of the MDB file must be .mdb. The --pdb option will be ignored. - /// (Originally from ..\FSComp.txt:1075) + /// (Originally from ..\FSComp.txt:1074) static member ilwriteMDBFileNameCannotBeChangedWarning() = (1216, GetStringFunc("ilwriteMDBFileNameCannotBeChangedWarning",",,,") ) /// MDB generation failed. Could not find compatible member %s - /// (Originally from ..\FSComp.txt:1076) + /// (Originally from ..\FSComp.txt:1075) static member ilwriteMDBMemberMissing(a0 : System.String) = (1217, GetStringFunc("ilwriteMDBMemberMissing",",,,%s,,,") a0) /// Cannot generate MDB debug information. Failed to load the 'MonoSymbolWriter' type from the 'Mono.CompilerServices.SymbolWriter.dll' assembly. - /// (Originally from ..\FSComp.txt:1077) + /// (Originally from ..\FSComp.txt:1076) static member ilwriteErrorCreatingMdb() = (1218, GetStringFunc("ilwriteErrorCreatingMdb",",,,") ) /// The union case named '%s' conflicts with the generated type '%s' - /// (Originally from ..\FSComp.txt:1078) + /// (Originally from ..\FSComp.txt:1077) static member tcUnionCaseNameConflictsWithGeneratedType(a0 : System.String, a1 : System.String) = (1219, GetStringFunc("tcUnionCaseNameConflictsWithGeneratedType",",,,%s,,,%s,,,") a0 a1) /// ReflectedDefinitionAttribute may not be applied to an instance member on a struct type, because the instance member takes an implicit 'this' byref parameter - /// (Originally from ..\FSComp.txt:1079) + /// (Originally from ..\FSComp.txt:1078) static member chkNoReflectedDefinitionOnStructMember() = (1220, GetStringFunc("chkNoReflectedDefinitionOnStructMember",",,,") ) /// DLLImport bindings must be static members in a class or function definitions in a module - /// (Originally from ..\FSComp.txt:1080) + /// (Originally from ..\FSComp.txt:1079) static member tcDllImportNotAllowed() = (1221, GetStringFunc("tcDllImportNotAllowed",",,,") ) /// When mscorlib.dll or FSharp.Core.dll is explicitly referenced the %s option must also be passed - /// (Originally from ..\FSComp.txt:1081) + /// (Originally from ..\FSComp.txt:1080) static member buildExplicitCoreLibRequiresNoFramework(a0 : System.String) = (1222, GetStringFunc("buildExplicitCoreLibRequiresNoFramework",",,,%s,,,") a0) /// FSharp.Core.sigdata not found alongside FSharp.Core. File expected in %s. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required. - /// (Originally from ..\FSComp.txt:1082) + /// (Originally from ..\FSComp.txt:1081) static member buildExpectedSigdataFile(a0 : System.String) = (1223, GetStringFunc("buildExpectedSigdataFile",",,,%s,,,") a0) /// File '%s' not found alongside FSharp.Core. File expected in %s. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required. - /// (Originally from ..\FSComp.txt:1083) + /// (Originally from ..\FSComp.txt:1082) static member buildExpectedFileAlongSideFSharpCore(a0 : System.String, a1 : System.String) = (1225, GetStringFunc("buildExpectedFileAlongSideFSharpCore",",,,%s,,,%s,,,") a0 a1) /// Filename '%s' contains invalid character '%s' - /// (Originally from ..\FSComp.txt:1084) + /// (Originally from ..\FSComp.txt:1083) static member buildUnexpectedFileNameCharacter(a0 : System.String, a1 : System.String) = (1227, GetStringFunc("buildUnexpectedFileNameCharacter",",,,%s,,,%s,,,") a0 a1) /// 'use!' bindings must be of the form 'use! = ' - /// (Originally from ..\FSComp.txt:1085) + /// (Originally from ..\FSComp.txt:1084) static member tcInvalidUseBangBinding() = (1228, GetStringFunc("tcInvalidUseBangBinding",",,,") ) /// Inner generic functions are not permitted in quoted expressions. Consider adding some type constraints until this function is no longer generic. - /// (Originally from ..\FSComp.txt:1086) + /// (Originally from ..\FSComp.txt:1085) static member crefNoInnerGenericsInQuotations() = (1230, GetStringFunc("crefNoInnerGenericsInQuotations",",,,") ) /// The type '%s' is not a valid enumerator type , i.e. does not have a 'MoveNext()' method returning a bool, and a 'Current' property - /// (Originally from ..\FSComp.txt:1087) + /// (Originally from ..\FSComp.txt:1086) static member tcEnumTypeCannotBeEnumerated(a0 : System.String) = (1231, GetStringFunc("tcEnumTypeCannotBeEnumerated",",,,%s,,,") a0) /// End of file in triple-quote string begun at or before here - /// (Originally from ..\FSComp.txt:1088) + /// (Originally from ..\FSComp.txt:1087) static member parsEofInTripleQuoteString() = (1232, GetStringFunc("parsEofInTripleQuoteString",",,,") ) /// End of file in triple-quote string embedded in comment begun at or before here - /// (Originally from ..\FSComp.txt:1089) + /// (Originally from ..\FSComp.txt:1088) static member parsEofInTripleQuoteStringInComment() = (1233, GetStringFunc("parsEofInTripleQuoteStringInComment",",,,") ) /// This type test or downcast will ignore the unit-of-measure '%s' - /// (Originally from ..\FSComp.txt:1090) + /// (Originally from ..\FSComp.txt:1089) static member tcTypeTestLosesMeasures(a0 : System.String) = (1240, GetStringFunc("tcTypeTestLosesMeasures",",,,%s,,,") a0) /// Expected type argument or static argument - /// (Originally from ..\FSComp.txt:1091) + /// (Originally from ..\FSComp.txt:1090) static member parsMissingTypeArgs() = (1241, GetStringFunc("parsMissingTypeArgs",",,,") ) /// Unmatched '<'. Expected closing '>' - /// (Originally from ..\FSComp.txt:1092) + /// (Originally from ..\FSComp.txt:1091) static member parsMissingGreaterThan() = (1242, GetStringFunc("parsMissingGreaterThan",",,,") ) /// Unexpected quotation operator '<@' in type definition. If you intend to pass a verbatim string as a static argument to a type provider, put a space between the '<' and '@' characters. - /// (Originally from ..\FSComp.txt:1093) + /// (Originally from ..\FSComp.txt:1092) static member parsUnexpectedQuotationOperatorInTypeAliasDidYouMeanVerbatimString() = (1243, GetStringFunc("parsUnexpectedQuotationOperatorInTypeAliasDidYouMeanVerbatimString",",,,") ) /// Attempted to parse this as an operator name, but failed - /// (Originally from ..\FSComp.txt:1094) + /// (Originally from ..\FSComp.txt:1093) static member parsErrorParsingAsOperatorName() = (1244, GetStringFunc("parsErrorParsingAsOperatorName",",,,") ) /// \U%s is not a valid Unicode character escape sequence - /// (Originally from ..\FSComp.txt:1095) + /// (Originally from ..\FSComp.txt:1094) static member lexInvalidUnicodeLiteral(a0 : System.String) = (1245, GetStringFunc("lexInvalidUnicodeLiteral",",,,%s,,,") a0) /// '%s' must be applied to an argument of type '%s', but has been applied to an argument of type '%s' - /// (Originally from ..\FSComp.txt:1096) + /// (Originally from ..\FSComp.txt:1095) static member tcCallerInfoWrongType(a0 : System.String, a1 : System.String, a2 : System.String) = (1246, GetStringFunc("tcCallerInfoWrongType",",,,%s,,,%s,,,%s,,,") a0 a1 a2) /// '%s' can only be applied to optional arguments - /// (Originally from ..\FSComp.txt:1097) + /// (Originally from ..\FSComp.txt:1096) static member tcCallerInfoNotOptional(a0 : System.String) = (1247, GetStringFunc("tcCallerInfoNotOptional",",,,%s,,,") a0) /// The specified .NET Framework version '%s' is not supported. Please specify a value from the enumeration Microsoft.Build.Utilities.TargetDotNetFrameworkVersion. - /// (Originally from ..\FSComp.txt:1099) + /// (Originally from ..\FSComp.txt:1098) static member toolLocationHelperUnsupportedFrameworkVersion(a0 : System.String) = (1300, GetStringFunc("toolLocationHelperUnsupportedFrameworkVersion",",,,%s,,,") a0) /// Invalid Magic value in CLR Header - /// (Originally from ..\FSComp.txt:1103) + /// (Originally from ..\FSComp.txt:1102) static member ilSignInvalidMagicValue() = (1301, GetStringFunc("ilSignInvalidMagicValue",",,,") ) /// Bad image format - /// (Originally from ..\FSComp.txt:1104) + /// (Originally from ..\FSComp.txt:1103) static member ilSignBadImageFormat() = (1302, GetStringFunc("ilSignBadImageFormat",",,,") ) /// Private key expected - /// (Originally from ..\FSComp.txt:1105) + /// (Originally from ..\FSComp.txt:1104) static member ilSignPrivateKeyExpected() = (1303, GetStringFunc("ilSignPrivateKeyExpected",",,,") ) /// RSA key expected - /// (Originally from ..\FSComp.txt:1106) + /// (Originally from ..\FSComp.txt:1105) static member ilSignRsaKeyExpected() = (1304, GetStringFunc("ilSignRsaKeyExpected",",,,") ) /// Invalid bit Length - /// (Originally from ..\FSComp.txt:1107) + /// (Originally from ..\FSComp.txt:1106) static member ilSignInvalidBitLen() = (1305, GetStringFunc("ilSignInvalidBitLen",",,,") ) /// Invalid RSAParameters structure - '{0}' expected - /// (Originally from ..\FSComp.txt:1108) + /// (Originally from ..\FSComp.txt:1107) static member ilSignInvalidRSAParams() = (1306, GetStringFunc("ilSignInvalidRSAParams",",,,") ) /// Invalid algId - 'Exponent' expected - /// (Originally from ..\FSComp.txt:1109) + /// (Originally from ..\FSComp.txt:1108) static member ilSignInvalidAlgId() = (1307, GetStringFunc("ilSignInvalidAlgId",",,,") ) /// Invalid signature size - /// (Originally from ..\FSComp.txt:1110) + /// (Originally from ..\FSComp.txt:1109) static member ilSignInvalidSignatureSize() = (1308, GetStringFunc("ilSignInvalidSignatureSize",",,,") ) /// No signature directory - /// (Originally from ..\FSComp.txt:1111) + /// (Originally from ..\FSComp.txt:1110) static member ilSignNoSignatureDirectory() = (1309, GetStringFunc("ilSignNoSignatureDirectory",",,,") ) /// Invalid Public Key blob - /// (Originally from ..\FSComp.txt:1112) + /// (Originally from ..\FSComp.txt:1111) static member ilSignInvalidPKBlob() = (1310, GetStringFunc("ilSignInvalidPKBlob",",,,") ) /// Exiting - too many errors - /// (Originally from ..\FSComp.txt:1114) + /// (Originally from ..\FSComp.txt:1113) static member fscTooManyErrors() = (GetStringFunc("fscTooManyErrors",",,,") ) /// The documentation file has no .xml suffix - /// (Originally from ..\FSComp.txt:1115) + /// (Originally from ..\FSComp.txt:1114) static member docfileNoXmlSuffix() = (2001, GetStringFunc("docfileNoXmlSuffix",",,,") ) /// No implementation files specified - /// (Originally from ..\FSComp.txt:1116) + /// (Originally from ..\FSComp.txt:1115) static member fscNoImplementationFiles() = (2002, GetStringFunc("fscNoImplementationFiles",",,,") ) - /// An %s specified version '%s', but this value is invalid and has been ignored - /// (Originally from ..\FSComp.txt:1117) + /// The attribute %s specified version '%s', but this value is invalid and has been ignored + /// (Originally from ..\FSComp.txt:1116) static member fscBadAssemblyVersion(a0 : System.String, a1 : System.String) = (2003, GetStringFunc("fscBadAssemblyVersion",",,,%s,,,%s,,,") a0 a1) /// Conflicting options specified: 'win32manifest' and 'win32res'. Only one of these can be used. - /// (Originally from ..\FSComp.txt:1118) + /// (Originally from ..\FSComp.txt:1117) static member fscTwoResourceManifests() = (2004, GetStringFunc("fscTwoResourceManifests",",,,") ) /// The code in assembly '%s' makes uses of quotation literals. Static linking may not include components that make use of quotation literals unless all assemblies are compiled with at least F# 4.0. - /// (Originally from ..\FSComp.txt:1119) + /// (Originally from ..\FSComp.txt:1118) static member fscQuotationLiteralsStaticLinking(a0 : System.String) = (2005, GetStringFunc("fscQuotationLiteralsStaticLinking",",,,%s,,,") a0) /// Code in this assembly makes uses of quotation literals. Static linking may not include components that make use of quotation literals unless all assemblies are compiled with at least F# 4.0. - /// (Originally from ..\FSComp.txt:1120) + /// (Originally from ..\FSComp.txt:1119) static member fscQuotationLiteralsStaticLinking0() = (2006, GetStringFunc("fscQuotationLiteralsStaticLinking0",",,,") ) /// Static linking may not include a .EXE - /// (Originally from ..\FSComp.txt:1121) + /// (Originally from ..\FSComp.txt:1120) static member fscStaticLinkingNoEXE() = (2007, GetStringFunc("fscStaticLinkingNoEXE",",,,") ) /// Static linking may not include a mixed managed/unmanaged DLL - /// (Originally from ..\FSComp.txt:1122) + /// (Originally from ..\FSComp.txt:1121) static member fscStaticLinkingNoMixedDLL() = (2008, GetStringFunc("fscStaticLinkingNoMixedDLL",",,,") ) /// Ignoring mixed managed/unmanaged assembly '%s' during static linking - /// (Originally from ..\FSComp.txt:1123) + /// (Originally from ..\FSComp.txt:1122) static member fscIgnoringMixedWhenLinking(a0 : System.String) = (2009, GetStringFunc("fscIgnoringMixedWhenLinking",",,,%s,,,") a0) /// Assembly '%s' was referenced transitively and the assembly could not be resolved automatically. Static linking will assume this DLL has no dependencies on the F# library or other statically linked DLLs. Consider adding an explicit reference to this DLL. - /// (Originally from ..\FSComp.txt:1124) + /// (Originally from ..\FSComp.txt:1123) static member fscAssumeStaticLinkContainsNoDependencies(a0 : System.String) = (2011, GetStringFunc("fscAssumeStaticLinkContainsNoDependencies",",,,%s,,,") a0) /// Assembly '%s' not found in dependency set of target binary. Statically linked roots should be specified using an assembly name, without a DLL or EXE extension. If this assembly was referenced explicitly then it is possible the assembly was not actually required by the generated binary, in which case it should not be statically linked. - /// (Originally from ..\FSComp.txt:1125) + /// (Originally from ..\FSComp.txt:1124) static member fscAssemblyNotFoundInDependencySet(a0 : System.String) = (2012, GetStringFunc("fscAssemblyNotFoundInDependencySet",",,,%s,,,") a0) /// The key file '%s' could not be opened - /// (Originally from ..\FSComp.txt:1126) + /// (Originally from ..\FSComp.txt:1125) static member fscKeyFileCouldNotBeOpened(a0 : System.String) = (2013, GetStringFunc("fscKeyFileCouldNotBeOpened",",,,%s,,,") a0) /// A problem occurred writing the binary '%s': %s - /// (Originally from ..\FSComp.txt:1127) + /// (Originally from ..\FSComp.txt:1126) static member fscProblemWritingBinary(a0 : System.String, a1 : System.String) = (2014, GetStringFunc("fscProblemWritingBinary",",,,%s,,,%s,,,") a0 a1) /// The 'AssemblyVersionAttribute' has been ignored because a version was given using a command line option - /// (Originally from ..\FSComp.txt:1128) + /// (Originally from ..\FSComp.txt:1127) static member fscAssemblyVersionAttributeIgnored() = (2015, GetStringFunc("fscAssemblyVersionAttributeIgnored",",,,") ) /// Error emitting 'System.Reflection.AssemblyCultureAttribute' attribute -- 'Executables cannot be satellite assemblies, Culture should always be empty' - /// (Originally from ..\FSComp.txt:1129) + /// (Originally from ..\FSComp.txt:1128) static member fscAssemblyCultureAttributeError() = (2016, GetStringFunc("fscAssemblyCultureAttributeError",",,,") ) /// Option '--delaysign' overrides attribute 'System.Reflection.AssemblyDelaySignAttribute' given in a source file or added module - /// (Originally from ..\FSComp.txt:1130) + /// (Originally from ..\FSComp.txt:1129) static member fscDelaySignWarning() = (2017, GetStringFunc("fscDelaySignWarning",",,,") ) /// Option '--keyfile' overrides attribute 'System.Reflection.AssemblyKeyFileAttribute' given in a source file or added module - /// (Originally from ..\FSComp.txt:1131) + /// (Originally from ..\FSComp.txt:1130) static member fscKeyFileWarning() = (2018, GetStringFunc("fscKeyFileWarning",",,,") ) /// Option '--keycontainer' overrides attribute 'System.Reflection.AssemblyNameAttribute' given in a source file or added module - /// (Originally from ..\FSComp.txt:1132) + /// (Originally from ..\FSComp.txt:1131) static member fscKeyNameWarning() = (2019, GetStringFunc("fscKeyNameWarning",",,,") ) /// The assembly '%s' is listed on the command line. Assemblies should be referenced using a command line flag such as '-r'. - /// (Originally from ..\FSComp.txt:1133) + /// (Originally from ..\FSComp.txt:1132) static member fscReferenceOnCommandLine(a0 : System.String) = (2020, GetStringFunc("fscReferenceOnCommandLine",",,,%s,,,") a0) /// The resident compilation service was not used because a problem occured in communicating with the server. - /// (Originally from ..\FSComp.txt:1134) + /// (Originally from ..\FSComp.txt:1133) static member fscRemotingError() = (2021, GetStringFunc("fscRemotingError",",,,") ) /// Problem with filename '%s': Illegal characters in path. - /// (Originally from ..\FSComp.txt:1135) + /// (Originally from ..\FSComp.txt:1134) static member pathIsInvalid(a0 : System.String) = (2022, GetStringFunc("pathIsInvalid",",,,%s,,,") a0) /// Passing a .resx file (%s) as a source file to the compiler is deprecated. Use resgen.exe to transform the .resx file into a .resources file to pass as a --resource option. If you are using MSBuild, this can be done via an item in the .fsproj project file. - /// (Originally from ..\FSComp.txt:1136) + /// (Originally from ..\FSComp.txt:1135) static member fscResxSourceFileDeprecated(a0 : System.String) = (2023, GetStringFunc("fscResxSourceFileDeprecated",",,,%s,,,") a0) /// Static linking may not be used on an assembly referencing mscorlib (e.g. a .NET Framework assembly) when generating an assembly that references System.Runtime (e.g. a .NET Core or Portable assembly). - /// (Originally from ..\FSComp.txt:1137) + /// (Originally from ..\FSComp.txt:1136) static member fscStaticLinkingNoProfileMismatches() = (2024, GetStringFunc("fscStaticLinkingNoProfileMismatches",",,,") ) /// An %s specified version '%s', but this value is a wildcard, and you have requested a deterministic build, these are in conflict. - /// (Originally from ..\FSComp.txt:1138) + /// (Originally from ..\FSComp.txt:1137) static member fscAssemblyWildcardAndDeterminism(a0 : System.String, a1 : System.String) = (2025, GetStringFunc("fscAssemblyWildcardAndDeterminism",",,,%s,,,%s,,,") a0 a1) /// Determinstic builds only support portable PDBs (--debug:portable or --debug:embedded) - /// (Originally from ..\FSComp.txt:1139) + /// (Originally from ..\FSComp.txt:1138) static member fscDeterministicDebugRequiresPortablePdb() = (2026, GetStringFunc("fscDeterministicDebugRequiresPortablePdb",",,,") ) /// Character '%s' is not allowed in provided namespace name '%s' - /// (Originally from ..\FSComp.txt:1140) + /// (Originally from ..\FSComp.txt:1139) static member etIllegalCharactersInNamespaceName(a0 : System.String, a1 : System.String) = (3000, GetStringFunc("etIllegalCharactersInNamespaceName",",,,%s,,,%s,,,") a0 a1) /// The provided type '%s' returned a member with a null or empty member name - /// (Originally from ..\FSComp.txt:1141) + /// (Originally from ..\FSComp.txt:1140) static member etNullOrEmptyMemberName(a0 : System.String) = (3001, GetStringFunc("etNullOrEmptyMemberName",",,,%s,,,") a0) /// The provided type '%s' returned a null member - /// (Originally from ..\FSComp.txt:1142) + /// (Originally from ..\FSComp.txt:1141) static member etNullMember(a0 : System.String) = (3002, GetStringFunc("etNullMember",",,,%s,,,") a0) /// The provided type '%s' member info '%s' has null declaring type - /// (Originally from ..\FSComp.txt:1143) + /// (Originally from ..\FSComp.txt:1142) static member etNullMemberDeclaringType(a0 : System.String, a1 : System.String) = (3003, GetStringFunc("etNullMemberDeclaringType",",,,%s,,,%s,,,") a0 a1) /// The provided type '%s' has member '%s' which has declaring type '%s'. Expected declaring type to be the same as provided type. - /// (Originally from ..\FSComp.txt:1144) + /// (Originally from ..\FSComp.txt:1143) static member etNullMemberDeclaringTypeDifferentFromProvidedType(a0 : System.String, a1 : System.String, a2 : System.String) = (3004, GetStringFunc("etNullMemberDeclaringTypeDifferentFromProvidedType",",,,%s,,,%s,,,%s,,,") a0 a1 a2) /// Referenced assembly '%s' has assembly level attribute '%s' but no public type provider classes were found - /// (Originally from ..\FSComp.txt:1145) + /// (Originally from ..\FSComp.txt:1144) static member etHostingAssemblyFoundWithoutHosts(a0 : System.String, a1 : System.String) = (3005, GetStringFunc("etHostingAssemblyFoundWithoutHosts",",,,%s,,,%s,,,") a0 a1) /// Type '%s' from type provider '%s' has an empty namespace. Use 'null' for the global namespace. - /// (Originally from ..\FSComp.txt:1146) + /// (Originally from ..\FSComp.txt:1145) static member etEmptyNamespaceOfTypeNotAllowed(a0 : System.String, a1 : System.String) = (3006, GetStringFunc("etEmptyNamespaceOfTypeNotAllowed",",,,%s,,,%s,,,") a0 a1) /// Empty namespace found from the type provider '%s'. Use 'null' for the global namespace. - /// (Originally from ..\FSComp.txt:1147) + /// (Originally from ..\FSComp.txt:1146) static member etEmptyNamespaceNotAllowed(a0 : System.String) = (3007, GetStringFunc("etEmptyNamespaceNotAllowed",",,,%s,,,") a0) /// Provided type '%s' has 'IsGenericType' as true, but generic types are not supported. - /// (Originally from ..\FSComp.txt:1148) + /// (Originally from ..\FSComp.txt:1147) static member etMustNotBeGeneric(a0 : System.String) = (3011, GetStringFunc("etMustNotBeGeneric",",,,%s,,,") a0) /// Provided type '%s' has 'IsArray' as true, but array types are not supported. - /// (Originally from ..\FSComp.txt:1149) + /// (Originally from ..\FSComp.txt:1148) static member etMustNotBeAnArray(a0 : System.String) = (3013, GetStringFunc("etMustNotBeAnArray",",,,%s,,,") a0) /// Invalid member '%s' on provided type '%s'. Provided type members must be public, and not be generic, virtual, or abstract. - /// (Originally from ..\FSComp.txt:1150) + /// (Originally from ..\FSComp.txt:1149) static member etMethodHasRequirements(a0 : System.String, a1 : System.String) = (3014, GetStringFunc("etMethodHasRequirements",",,,%s,,,%s,,,") a0 a1) /// Invalid member '%s' on provided type '%s'. Only properties, methods and constructors are allowed - /// (Originally from ..\FSComp.txt:1151) + /// (Originally from ..\FSComp.txt:1150) static member etUnsupportedMemberKind(a0 : System.String, a1 : System.String) = (3015, GetStringFunc("etUnsupportedMemberKind",",,,%s,,,%s,,,") a0 a1) /// Property '%s' on provided type '%s' has CanRead=true but there was no value from GetGetMethod() - /// (Originally from ..\FSComp.txt:1152) + /// (Originally from ..\FSComp.txt:1151) static member etPropertyCanReadButHasNoGetter(a0 : System.String, a1 : System.String) = (3016, GetStringFunc("etPropertyCanReadButHasNoGetter",",,,%s,,,%s,,,") a0 a1) /// Property '%s' on provided type '%s' has CanRead=false but GetGetMethod() returned a method - /// (Originally from ..\FSComp.txt:1153) + /// (Originally from ..\FSComp.txt:1152) static member etPropertyHasGetterButNoCanRead(a0 : System.String, a1 : System.String) = (3017, GetStringFunc("etPropertyHasGetterButNoCanRead",",,,%s,,,%s,,,") a0 a1) /// Property '%s' on provided type '%s' has CanWrite=true but there was no value from GetSetMethod() - /// (Originally from ..\FSComp.txt:1154) + /// (Originally from ..\FSComp.txt:1153) static member etPropertyCanWriteButHasNoSetter(a0 : System.String, a1 : System.String) = (3018, GetStringFunc("etPropertyCanWriteButHasNoSetter",",,,%s,,,%s,,,") a0 a1) /// Property '%s' on provided type '%s' has CanWrite=false but GetSetMethod() returned a method - /// (Originally from ..\FSComp.txt:1155) + /// (Originally from ..\FSComp.txt:1154) static member etPropertyHasSetterButNoCanWrite(a0 : System.String, a1 : System.String) = (3019, GetStringFunc("etPropertyHasSetterButNoCanWrite",",,,%s,,,%s,,,") a0 a1) /// One or more errors seen during provided type setup - /// (Originally from ..\FSComp.txt:1156) + /// (Originally from ..\FSComp.txt:1155) static member etOneOrMoreErrorsSeenDuringExtensionTypeSetting() = (3020, GetStringFunc("etOneOrMoreErrorsSeenDuringExtensionTypeSetting",",,,") ) /// Unexpected exception from provided type '%s' member '%s': %s - /// (Originally from ..\FSComp.txt:1157) + /// (Originally from ..\FSComp.txt:1156) static member etUnexpectedExceptionFromProvidedTypeMember(a0 : System.String, a1 : System.String, a2 : System.String) = (3021, GetStringFunc("etUnexpectedExceptionFromProvidedTypeMember",",,,%s,,,%s,,,%s,,,") a0 a1 a2) /// Unsupported constant type '%s'. Quotations provided by type providers can only contain simple constants. The implementation of the type provider may need to be adjusted by moving a value declared outside a provided quotation literal to be a 'let' binding inside the quotation literal. - /// (Originally from ..\FSComp.txt:1158) + /// (Originally from ..\FSComp.txt:1157) static member etUnsupportedConstantType(a0 : System.String) = (3022, GetStringFunc("etUnsupportedConstantType",",,,%s,,,") a0) /// Unsupported expression '%s' from type provider. If you are the author of this type provider, consider adjusting it to provide a different provided expression. - /// (Originally from ..\FSComp.txt:1159) + /// (Originally from ..\FSComp.txt:1158) static member etUnsupportedProvidedExpression(a0 : System.String) = (3025, GetStringFunc("etUnsupportedProvidedExpression",",,,%s,,,") a0) /// Expected provided type named '%s' but provided type has 'Name' with value '%s' - /// (Originally from ..\FSComp.txt:1160) + /// (Originally from ..\FSComp.txt:1159) static member etProvidedTypeHasUnexpectedName(a0 : System.String, a1 : System.String) = (3028, GetStringFunc("etProvidedTypeHasUnexpectedName",",,,%s,,,%s,,,") a0 a1) /// Event '%s' on provided type '%s' has no value from GetAddMethod() - /// (Originally from ..\FSComp.txt:1161) + /// (Originally from ..\FSComp.txt:1160) static member etEventNoAdd(a0 : System.String, a1 : System.String) = (3029, GetStringFunc("etEventNoAdd",",,,%s,,,%s,,,") a0 a1) /// Event '%s' on provided type '%s' has no value from GetRemoveMethod() - /// (Originally from ..\FSComp.txt:1162) + /// (Originally from ..\FSComp.txt:1161) static member etEventNoRemove(a0 : System.String, a1 : System.String) = (3030, GetStringFunc("etEventNoRemove",",,,%s,,,%s,,,") a0 a1) /// Assembly attribute '%s' refers to a designer assembly '%s' which cannot be loaded or doesn't exist. %s - /// (Originally from ..\FSComp.txt:1163) + /// (Originally from ..\FSComp.txt:1162) static member etProviderHasWrongDesignerAssembly(a0 : System.String, a1 : System.String, a2 : System.String) = (3031, GetStringFunc("etProviderHasWrongDesignerAssembly",",,,%s,,,%s,,,%s,,,") a0 a1 a2) /// The type provider does not have a valid constructor. A constructor taking either no arguments or one argument of type 'TypeProviderConfig' was expected. - /// (Originally from ..\FSComp.txt:1164) + /// (Originally from ..\FSComp.txt:1163) static member etProviderDoesNotHaveValidConstructor() = (3032, GetStringFunc("etProviderDoesNotHaveValidConstructor",",,,") ) /// The type provider '%s' reported an error: %s - /// (Originally from ..\FSComp.txt:1165) + /// (Originally from ..\FSComp.txt:1164) static member etProviderError(a0 : System.String, a1 : System.String) = (3033, GetStringFunc("etProviderError",",,,%s,,,%s,,,") a0 a1) /// The type provider '%s' used an invalid parameter in the ParameterExpression: %s - /// (Originally from ..\FSComp.txt:1166) + /// (Originally from ..\FSComp.txt:1165) static member etIncorrectParameterExpression(a0 : System.String, a1 : System.String) = (3034, GetStringFunc("etIncorrectParameterExpression",",,,%s,,,%s,,,") a0 a1) /// The type provider '%s' provided a method with a name '%s' and metadata token '%d', which is not reported among its methods of its declaring type '%s' - /// (Originally from ..\FSComp.txt:1167) + /// (Originally from ..\FSComp.txt:1166) static member etIncorrectProvidedMethod(a0 : System.String, a1 : System.String, a2 : System.Int32, a3 : System.String) = (3035, GetStringFunc("etIncorrectProvidedMethod",",,,%s,,,%s,,,%d,,,%s,,,") a0 a1 a2 a3) /// The type provider '%s' provided a constructor which is not reported among the constructors of its declaring type '%s' - /// (Originally from ..\FSComp.txt:1168) + /// (Originally from ..\FSComp.txt:1167) static member etIncorrectProvidedConstructor(a0 : System.String, a1 : System.String) = (3036, GetStringFunc("etIncorrectProvidedConstructor",",,,%s,,,%s,,,") a0 a1) /// A direct reference to the generated type '%s' is not permitted. Instead, use a type definition, e.g. 'type TypeAlias = '. This indicates that a type provider adds generated types to your assembly. - /// (Originally from ..\FSComp.txt:1169) + /// (Originally from ..\FSComp.txt:1168) static member etDirectReferenceToGeneratedTypeNotAllowed(a0 : System.String) = (3039, GetStringFunc("etDirectReferenceToGeneratedTypeNotAllowed",",,,%s,,,") a0) /// Expected provided type with path '%s' but provided type has path '%s' - /// (Originally from ..\FSComp.txt:1170) + /// (Originally from ..\FSComp.txt:1169) static member etProvidedTypeHasUnexpectedPath(a0 : System.String, a1 : System.String) = (3041, GetStringFunc("etProvidedTypeHasUnexpectedPath",",,,%s,,,%s,,,") a0 a1) /// Unexpected 'null' return value from provided type '%s' member '%s' - /// (Originally from ..\FSComp.txt:1171) + /// (Originally from ..\FSComp.txt:1170) static member etUnexpectedNullFromProvidedTypeMember(a0 : System.String, a1 : System.String) = (3042, GetStringFunc("etUnexpectedNullFromProvidedTypeMember",",,,%s,,,%s,,,") a0 a1) /// Unexpected exception from member '%s' of provided type '%s' member '%s': %s - /// (Originally from ..\FSComp.txt:1172) + /// (Originally from ..\FSComp.txt:1171) static member etUnexpectedExceptionFromProvidedMemberMember(a0 : System.String, a1 : System.String, a2 : System.String, a3 : System.String) = (3043, GetStringFunc("etUnexpectedExceptionFromProvidedMemberMember",",,,%s,,,%s,,,%s,,,%s,,,") a0 a1 a2 a3) /// Nested provided types do not take static arguments or generic parameters - /// (Originally from ..\FSComp.txt:1173) + /// (Originally from ..\FSComp.txt:1172) static member etNestedProvidedTypesDoNotTakeStaticArgumentsOrGenericParameters() = (3044, GetStringFunc("etNestedProvidedTypesDoNotTakeStaticArgumentsOrGenericParameters",",,,") ) /// Invalid static argument to provided type. Expected an argument of kind '%s'. - /// (Originally from ..\FSComp.txt:1174) + /// (Originally from ..\FSComp.txt:1173) static member etInvalidStaticArgument(a0 : System.String) = (3045, GetStringFunc("etInvalidStaticArgument",",,,%s,,,") a0) /// An error occured applying the static arguments to a provided type - /// (Originally from ..\FSComp.txt:1175) + /// (Originally from ..\FSComp.txt:1174) static member etErrorApplyingStaticArgumentsToType() = (3046, GetStringFunc("etErrorApplyingStaticArgumentsToType",",,,") ) /// Unknown static argument kind '%s' when resolving a reference to a provided type or method '%s' - /// (Originally from ..\FSComp.txt:1176) + /// (Originally from ..\FSComp.txt:1175) static member etUnknownStaticArgumentKind(a0 : System.String, a1 : System.String) = (3047, GetStringFunc("etUnknownStaticArgumentKind",",,,%s,,,%s,,,") a0 a1) /// invalid namespace for provided type - /// (Originally from ..\FSComp.txt:1177) + /// (Originally from ..\FSComp.txt:1176) static member invalidNamespaceForProvidedType() = (GetStringFunc("invalidNamespaceForProvidedType",",,,") ) /// invalid full name for provided type - /// (Originally from ..\FSComp.txt:1178) + /// (Originally from ..\FSComp.txt:1177) static member invalidFullNameForProvidedType() = (GetStringFunc("invalidFullNameForProvidedType",",,,") ) /// The type provider returned 'null', which is not a valid return value from '%s' - /// (Originally from ..\FSComp.txt:1180) + /// (Originally from ..\FSComp.txt:1179) static member etProviderReturnedNull(a0 : System.String) = (3051, GetStringFunc("etProviderReturnedNull",",,,%s,,,") a0) /// The type provider constructor has thrown an exception: %s - /// (Originally from ..\FSComp.txt:1181) + /// (Originally from ..\FSComp.txt:1180) static member etTypeProviderConstructorException(a0 : System.String) = (3053, GetStringFunc("etTypeProviderConstructorException",",,,%s,,,") a0) /// Type provider '%s' returned null from GetInvokerExpression. - /// (Originally from ..\FSComp.txt:1182) + /// (Originally from ..\FSComp.txt:1181) static member etNullProvidedExpression(a0 : System.String) = (3056, GetStringFunc("etNullProvidedExpression",",,,%s,,,") a0) /// The type provider '%s' returned an invalid type from 'ApplyStaticArguments'. A type with name '%s' was expected, but a type with name '%s' was returned. - /// (Originally from ..\FSComp.txt:1183) + /// (Originally from ..\FSComp.txt:1182) static member etProvidedAppliedTypeHadWrongName(a0 : System.String, a1 : System.String, a2 : System.String) = (3057, GetStringFunc("etProvidedAppliedTypeHadWrongName",",,,%s,,,%s,,,%s,,,") a0 a1 a2) /// The type provider '%s' returned an invalid method from 'ApplyStaticArgumentsForMethod'. A method with name '%s' was expected, but a method with name '%s' was returned. - /// (Originally from ..\FSComp.txt:1184) + /// (Originally from ..\FSComp.txt:1183) static member etProvidedAppliedMethodHadWrongName(a0 : System.String, a1 : System.String, a2 : System.String) = (3058, GetStringFunc("etProvidedAppliedMethodHadWrongName",",,,%s,,,%s,,,%s,,,") a0 a1 a2) /// This type test or downcast will erase the provided type '%s' to the type '%s' - /// (Originally from ..\FSComp.txt:1185) + /// (Originally from ..\FSComp.txt:1184) static member tcTypeTestLossy(a0 : System.String, a1 : System.String) = (3060, GetStringFunc("tcTypeTestLossy",",,,%s,,,%s,,,") a0 a1) /// This downcast will erase the provided type '%s' to the type '%s'. - /// (Originally from ..\FSComp.txt:1186) + /// (Originally from ..\FSComp.txt:1185) static member tcTypeCastErased(a0 : System.String, a1 : System.String) = (3061, GetStringFunc("tcTypeCastErased",",,,%s,,,%s,,,") a0 a1) /// This type test with a provided type '%s' is not allowed because this provided type will be erased to '%s' at runtime. - /// (Originally from ..\FSComp.txt:1187) + /// (Originally from ..\FSComp.txt:1186) static member tcTypeTestErased(a0 : System.String, a1 : System.String) = (3062, GetStringFunc("tcTypeTestErased",",,,%s,,,%s,,,") a0 a1) /// Cannot inherit from erased provided type - /// (Originally from ..\FSComp.txt:1188) + /// (Originally from ..\FSComp.txt:1187) static member tcCannotInheritFromErasedType() = (3063, GetStringFunc("tcCannotInheritFromErasedType",",,,") ) /// Assembly '%s' hase TypeProviderAssembly attribute with invalid value '%s'. The value should be a valid assembly name - /// (Originally from ..\FSComp.txt:1189) + /// (Originally from ..\FSComp.txt:1188) static member etInvalidTypeProviderAssemblyName(a0 : System.String, a1 : System.String) = (3065, GetStringFunc("etInvalidTypeProviderAssemblyName",",,,%s,,,%s,,,") a0 a1) /// Invalid member name. Members may not have name '.ctor' or '.cctor' - /// (Originally from ..\FSComp.txt:1190) + /// (Originally from ..\FSComp.txt:1189) static member tcInvalidMemberNameCtor() = (3066, GetStringFunc("tcInvalidMemberNameCtor",",,,") ) /// The function or member '%s' is used in a way that requires further type annotations at its definition to ensure consistency of inferred types. The inferred signature is '%s'. - /// (Originally from ..\FSComp.txt:1191) + /// (Originally from ..\FSComp.txt:1190) static member tcInferredGenericTypeGivesRiseToInconsistency(a0 : System.String, a1 : System.String) = (3068, GetStringFunc("tcInferredGenericTypeGivesRiseToInconsistency",",,,%s,,,%s,,,") a0 a1) /// The number of type arguments did not match: '%d' given, '%d' expected. This may be related to a previously reported error. - /// (Originally from ..\FSComp.txt:1192) + /// (Originally from ..\FSComp.txt:1191) static member tcInvalidTypeArgumentCount(a0 : System.Int32, a1 : System.Int32) = (3069, GetStringFunc("tcInvalidTypeArgumentCount",",,,%d,,,%d,,,") a0 a1) /// Cannot override inherited member '%s' because it is sealed - /// (Originally from ..\FSComp.txt:1193) + /// (Originally from ..\FSComp.txt:1192) static member tcCannotOverrideSealedMethod(a0 : System.String) = (3070, GetStringFunc("tcCannotOverrideSealedMethod",",,,%s,,,") a0) /// The type provider '%s' reported an error in the context of provided type '%s', member '%s'. The error: %s - /// (Originally from ..\FSComp.txt:1194) + /// (Originally from ..\FSComp.txt:1193) static member etProviderErrorWithContext(a0 : System.String, a1 : System.String, a2 : System.String, a3 : System.String) = (3071, GetStringFunc("etProviderErrorWithContext",",,,%s,,,%s,,,%s,,,%s,,,") a0 a1 a2 a3) /// An exception occurred when accessing the '%s' of a provided type: %s - /// (Originally from ..\FSComp.txt:1195) + /// (Originally from ..\FSComp.txt:1194) static member etProvidedTypeWithNameException(a0 : System.String, a1 : System.String) = (3072, GetStringFunc("etProvidedTypeWithNameException",",,,%s,,,%s,,,") a0 a1) /// The '%s' of a provided type was null or empty. - /// (Originally from ..\FSComp.txt:1196) + /// (Originally from ..\FSComp.txt:1195) static member etProvidedTypeWithNullOrEmptyName(a0 : System.String) = (3073, GetStringFunc("etProvidedTypeWithNullOrEmptyName",",,,%s,,,") a0) /// Character '%s' is not allowed in provided type name '%s' - /// (Originally from ..\FSComp.txt:1197) + /// (Originally from ..\FSComp.txt:1196) static member etIllegalCharactersInTypeName(a0 : System.String, a1 : System.String) = (3075, GetStringFunc("etIllegalCharactersInTypeName",",,,%s,,,%s,,,") a0 a1) /// In queries, '%s' must use a simple pattern - /// (Originally from ..\FSComp.txt:1198) + /// (Originally from ..\FSComp.txt:1197) static member tcJoinMustUseSimplePattern(a0 : System.String) = (3077, GetStringFunc("tcJoinMustUseSimplePattern",",,,%s,,,") a0) /// A custom query operation for '%s' is required but not specified - /// (Originally from ..\FSComp.txt:1199) + /// (Originally from ..\FSComp.txt:1198) static member tcMissingCustomOperation(a0 : System.String) = (3078, GetStringFunc("tcMissingCustomOperation",",,,%s,,,") a0) /// Named static arguments must come after all unnamed static arguments - /// (Originally from ..\FSComp.txt:1200) + /// (Originally from ..\FSComp.txt:1199) static member etBadUnnamedStaticArgs() = (3080, GetStringFunc("etBadUnnamedStaticArgs",",,,") ) /// The static parameter '%s' of the provided type or method '%s' requires a value. Static parameters to type providers may be optionally specified using named arguments, e.g. '%s<%s=...>'. - /// (Originally from ..\FSComp.txt:1201) + /// (Originally from ..\FSComp.txt:1200) static member etStaticParameterRequiresAValue(a0 : System.String, a1 : System.String, a2 : System.String, a3 : System.String) = (3081, GetStringFunc("etStaticParameterRequiresAValue",",,,%s,,,%s,,,%s,,,%s,,,") a0 a1 a2 a3) /// No static parameter exists with name '%s' - /// (Originally from ..\FSComp.txt:1202) + /// (Originally from ..\FSComp.txt:1201) static member etNoStaticParameterWithName(a0 : System.String) = (3082, GetStringFunc("etNoStaticParameterWithName",",,,%s,,,") a0) /// The static parameter '%s' has already been given a value - /// (Originally from ..\FSComp.txt:1203) + /// (Originally from ..\FSComp.txt:1202) static member etStaticParameterAlreadyHasValue(a0 : System.String) = (3083, GetStringFunc("etStaticParameterAlreadyHasValue",",,,%s,,,") a0) /// Multiple static parameters exist with name '%s' - /// (Originally from ..\FSComp.txt:1204) + /// (Originally from ..\FSComp.txt:1203) static member etMultipleStaticParameterWithName(a0 : System.String) = (3084, GetStringFunc("etMultipleStaticParameterWithName",",,,%s,,,") a0) /// A custom operation may not be used in conjunction with a non-value or recursive 'let' binding in another part of this computation expression - /// (Originally from ..\FSComp.txt:1205) + /// (Originally from ..\FSComp.txt:1204) static member tcCustomOperationMayNotBeUsedInConjunctionWithNonSimpleLetBindings() = (3085, GetStringFunc("tcCustomOperationMayNotBeUsedInConjunctionWithNonSimpleLetBindings",",,,") ) /// A custom operation may not be used in conjunction with 'use', 'try/with', 'try/finally', 'if/then/else' or 'match' operators within this computation expression - /// (Originally from ..\FSComp.txt:1206) + /// (Originally from ..\FSComp.txt:1205) static member tcCustomOperationMayNotBeUsedHere() = (3086, GetStringFunc("tcCustomOperationMayNotBeUsedHere",",,,") ) /// The custom operation '%s' refers to a method which is overloaded. The implementations of custom operations may not be overloaded. - /// (Originally from ..\FSComp.txt:1207) + /// (Originally from ..\FSComp.txt:1206) static member tcCustomOperationMayNotBeOverloaded(a0 : System.String) = (3087, GetStringFunc("tcCustomOperationMayNotBeOverloaded",",,,%s,,,") a0) /// An if/then/else expression may not be used within queries. Consider using either an if/then expression, or use a sequence expression instead. - /// (Originally from ..\FSComp.txt:1208) + /// (Originally from ..\FSComp.txt:1207) static member tcIfThenElseMayNotBeUsedWithinQueries() = (3090, GetStringFunc("tcIfThenElseMayNotBeUsedWithinQueries",",,,") ) /// Invalid argument to 'methodhandleof' during codegen - /// (Originally from ..\FSComp.txt:1209) + /// (Originally from ..\FSComp.txt:1208) static member ilxgenUnexpectedArgumentToMethodHandleOfDuringCodegen() = (3091, GetStringFunc("ilxgenUnexpectedArgumentToMethodHandleOfDuringCodegen",",,,") ) /// A reference to a provided type was missing a value for the static parameter '%s'. You may need to recompile one or more referenced assemblies. - /// (Originally from ..\FSComp.txt:1210) + /// (Originally from ..\FSComp.txt:1209) static member etProvidedTypeReferenceMissingArgument(a0 : System.String) = (3092, GetStringFunc("etProvidedTypeReferenceMissingArgument",",,,%s,,,") a0) /// A reference to a provided type had an invalid value '%s' for a static parameter. You may need to recompile one or more referenced assemblies. - /// (Originally from ..\FSComp.txt:1211) + /// (Originally from ..\FSComp.txt:1210) static member etProvidedTypeReferenceInvalidText(a0 : System.String) = (3093, GetStringFunc("etProvidedTypeReferenceInvalidText",",,,%s,,,") a0) /// '%s' is not used correctly. This is a custom operation in this query or computation expression. - /// (Originally from ..\FSComp.txt:1212) + /// (Originally from ..\FSComp.txt:1211) static member tcCustomOperationNotUsedCorrectly(a0 : System.String) = (3095, GetStringFunc("tcCustomOperationNotUsedCorrectly",",,,%s,,,") a0) /// '%s' is not used correctly. Usage: %s. This is a custom operation in this query or computation expression. - /// (Originally from ..\FSComp.txt:1213) + /// (Originally from ..\FSComp.txt:1212) static member tcCustomOperationNotUsedCorrectly2(a0 : System.String, a1 : System.String) = (3095, GetStringFunc("tcCustomOperationNotUsedCorrectly2",",,,%s,,,%s,,,") a0 a1) /// %s var in collection %s (outerKey = innerKey). Note that parentheses are required after '%s' - /// (Originally from ..\FSComp.txt:1214) + /// (Originally from ..\FSComp.txt:1213) static member customOperationTextLikeJoin(a0 : System.String, a1 : System.String, a2 : System.String) = (GetStringFunc("customOperationTextLikeJoin",",,,%s,,,%s,,,%s,,,") a0 a1 a2) /// %s var in collection %s (outerKey = innerKey) into group. Note that parentheses are required after '%s' - /// (Originally from ..\FSComp.txt:1215) + /// (Originally from ..\FSComp.txt:1214) static member customOperationTextLikeGroupJoin(a0 : System.String, a1 : System.String, a2 : System.String) = (GetStringFunc("customOperationTextLikeGroupJoin",",,,%s,,,%s,,,%s,,,") a0 a1 a2) /// %s var in collection - /// (Originally from ..\FSComp.txt:1216) + /// (Originally from ..\FSComp.txt:1215) static member customOperationTextLikeZip(a0 : System.String) = (GetStringFunc("customOperationTextLikeZip",",,,%s,,,") a0) /// '%s' must be followed by a variable name. Usage: %s. - /// (Originally from ..\FSComp.txt:1217) + /// (Originally from ..\FSComp.txt:1216) static member tcBinaryOperatorRequiresVariable(a0 : System.String, a1 : System.String) = (3096, GetStringFunc("tcBinaryOperatorRequiresVariable",",,,%s,,,%s,,,") a0 a1) /// Incorrect syntax for '%s'. Usage: %s. - /// (Originally from ..\FSComp.txt:1218) + /// (Originally from ..\FSComp.txt:1217) static member tcOperatorIncorrectSyntax(a0 : System.String, a1 : System.String) = (3097, GetStringFunc("tcOperatorIncorrectSyntax",",,,%s,,,%s,,,") a0 a1) /// '%s' must come after a 'for' selection clause and be followed by the rest of the query. Syntax: ... %s ... - /// (Originally from ..\FSComp.txt:1219) + /// (Originally from ..\FSComp.txt:1218) static member tcBinaryOperatorRequiresBody(a0 : System.String, a1 : System.String) = (3098, GetStringFunc("tcBinaryOperatorRequiresBody",",,,%s,,,%s,,,") a0 a1) /// '%s' is used with an incorrect number of arguments. This is a custom operation in this query or computation expression. Expected %d argument(s), but given %d. - /// (Originally from ..\FSComp.txt:1220) + /// (Originally from ..\FSComp.txt:1219) static member tcCustomOperationHasIncorrectArgCount(a0 : System.String, a1 : System.Int32, a2 : System.Int32) = (3099, GetStringFunc("tcCustomOperationHasIncorrectArgCount",",,,%s,,,%d,,,%d,,,") a0 a1 a2) /// Expected an expression after this point - /// (Originally from ..\FSComp.txt:1221) + /// (Originally from ..\FSComp.txt:1220) static member parsExpectedExpressionAfterToken() = (3100, GetStringFunc("parsExpectedExpressionAfterToken",",,,") ) /// Expected a type after this point - /// (Originally from ..\FSComp.txt:1222) + /// (Originally from ..\FSComp.txt:1221) static member parsExpectedTypeAfterToken() = (3101, GetStringFunc("parsExpectedTypeAfterToken",",,,") ) /// Unmatched '[<'. Expected closing '>]' - /// (Originally from ..\FSComp.txt:1223) + /// (Originally from ..\FSComp.txt:1222) static member parsUnmatchedLBrackLess() = (3102, GetStringFunc("parsUnmatchedLBrackLess",",,,") ) /// Unexpected end of input in 'match' expression. Expected 'match with | -> | -> ...'. - /// (Originally from ..\FSComp.txt:1224) + /// (Originally from ..\FSComp.txt:1223) static member parsUnexpectedEndOfFileMatch() = (3103, GetStringFunc("parsUnexpectedEndOfFileMatch",",,,") ) /// Unexpected end of input in 'try' expression. Expected 'try with ' or 'try finally '. - /// (Originally from ..\FSComp.txt:1225) + /// (Originally from ..\FSComp.txt:1224) static member parsUnexpectedEndOfFileTry() = (3104, GetStringFunc("parsUnexpectedEndOfFileTry",",,,") ) /// Unexpected end of input in 'while' expression. Expected 'while do '. - /// (Originally from ..\FSComp.txt:1226) + /// (Originally from ..\FSComp.txt:1225) static member parsUnexpectedEndOfFileWhile() = (3105, GetStringFunc("parsUnexpectedEndOfFileWhile",",,,") ) /// Unexpected end of input in 'for' expression. Expected 'for in do '. - /// (Originally from ..\FSComp.txt:1227) + /// (Originally from ..\FSComp.txt:1226) static member parsUnexpectedEndOfFileFor() = (3106, GetStringFunc("parsUnexpectedEndOfFileFor",",,,") ) /// Unexpected end of input in 'match' or 'try' expression - /// (Originally from ..\FSComp.txt:1228) + /// (Originally from ..\FSComp.txt:1227) static member parsUnexpectedEndOfFileWith() = (3107, GetStringFunc("parsUnexpectedEndOfFileWith",",,,") ) /// Unexpected end of input in 'then' branch of conditional expression. Expected 'if then ' or 'if then else '. - /// (Originally from ..\FSComp.txt:1229) + /// (Originally from ..\FSComp.txt:1228) static member parsUnexpectedEndOfFileThen() = (3108, GetStringFunc("parsUnexpectedEndOfFileThen",",,,") ) /// Unexpected end of input in 'else' branch of conditional expression. Expected 'if then ' or 'if then else '. - /// (Originally from ..\FSComp.txt:1230) + /// (Originally from ..\FSComp.txt:1229) static member parsUnexpectedEndOfFileElse() = (3109, GetStringFunc("parsUnexpectedEndOfFileElse",",,,") ) /// Unexpected end of input in body of lambda expression. Expected 'fun ... -> '. - /// (Originally from ..\FSComp.txt:1231) + /// (Originally from ..\FSComp.txt:1230) static member parsUnexpectedEndOfFileFunBody() = (3110, GetStringFunc("parsUnexpectedEndOfFileFunBody",",,,") ) /// Unexpected end of input in type arguments - /// (Originally from ..\FSComp.txt:1232) + /// (Originally from ..\FSComp.txt:1231) static member parsUnexpectedEndOfFileTypeArgs() = (3111, GetStringFunc("parsUnexpectedEndOfFileTypeArgs",",,,") ) /// Unexpected end of input in type signature - /// (Originally from ..\FSComp.txt:1233) + /// (Originally from ..\FSComp.txt:1232) static member parsUnexpectedEndOfFileTypeSignature() = (3112, GetStringFunc("parsUnexpectedEndOfFileTypeSignature",",,,") ) /// Unexpected end of input in type definition - /// (Originally from ..\FSComp.txt:1234) + /// (Originally from ..\FSComp.txt:1233) static member parsUnexpectedEndOfFileTypeDefinition() = (3113, GetStringFunc("parsUnexpectedEndOfFileTypeDefinition",",,,") ) /// Unexpected end of input in object members - /// (Originally from ..\FSComp.txt:1235) + /// (Originally from ..\FSComp.txt:1234) static member parsUnexpectedEndOfFileObjectMembers() = (3114, GetStringFunc("parsUnexpectedEndOfFileObjectMembers",",,,") ) /// Unexpected end of input in value, function or member definition - /// (Originally from ..\FSComp.txt:1236) + /// (Originally from ..\FSComp.txt:1235) static member parsUnexpectedEndOfFileDefinition() = (3115, GetStringFunc("parsUnexpectedEndOfFileDefinition",",,,") ) /// Unexpected end of input in expression - /// (Originally from ..\FSComp.txt:1237) + /// (Originally from ..\FSComp.txt:1236) static member parsUnexpectedEndOfFileExpression() = (3116, GetStringFunc("parsUnexpectedEndOfFileExpression",",,,") ) /// Unexpected end of type. Expected a name after this point. - /// (Originally from ..\FSComp.txt:1238) + /// (Originally from ..\FSComp.txt:1237) static member parsExpectedNameAfterToken() = (3117, GetStringFunc("parsExpectedNameAfterToken",",,,") ) /// Incomplete value or function definition. If this is in an expression, the body of the expression must be indented to the same column as the 'let' keyword. - /// (Originally from ..\FSComp.txt:1239) + /// (Originally from ..\FSComp.txt:1238) static member parsUnmatchedLet() = (3118, GetStringFunc("parsUnmatchedLet",",,,") ) /// Incomplete value definition. If this is in an expression, the body of the expression must be indented to the same column as the 'let!' keyword. - /// (Originally from ..\FSComp.txt:1240) + /// (Originally from ..\FSComp.txt:1239) static member parsUnmatchedLetBang() = (3119, GetStringFunc("parsUnmatchedLetBang",",,,") ) /// Incomplete value definition. If this is in an expression, the body of the expression must be indented to the same column as the 'use!' keyword. - /// (Originally from ..\FSComp.txt:1241) + /// (Originally from ..\FSComp.txt:1240) static member parsUnmatchedUseBang() = (3120, GetStringFunc("parsUnmatchedUseBang",",,,") ) /// Incomplete value definition. If this is in an expression, the body of the expression must be indented to the same column as the 'use' keyword. - /// (Originally from ..\FSComp.txt:1242) + /// (Originally from ..\FSComp.txt:1241) static member parsUnmatchedUse() = (3121, GetStringFunc("parsUnmatchedUse",",,,") ) /// Missing 'do' in 'while' expression. Expected 'while do '. - /// (Originally from ..\FSComp.txt:1243) + /// (Originally from ..\FSComp.txt:1242) static member parsWhileDoExpected() = (3122, GetStringFunc("parsWhileDoExpected",",,,") ) /// Missing 'do' in 'for' expression. Expected 'for in do '. - /// (Originally from ..\FSComp.txt:1244) + /// (Originally from ..\FSComp.txt:1243) static member parsForDoExpected() = (3123, GetStringFunc("parsForDoExpected",",,,") ) /// Invalid join relation in '%s'. Expected 'expr expr', where is =, =?, ?= or ?=?. - /// (Originally from ..\FSComp.txt:1245) + /// (Originally from ..\FSComp.txt:1244) static member tcInvalidRelationInJoin(a0 : System.String) = (3125, GetStringFunc("tcInvalidRelationInJoin",",,,%s,,,") a0) /// Calls - /// (Originally from ..\FSComp.txt:1246) + /// (Originally from ..\FSComp.txt:1245) static member typeInfoCallsWord() = (GetStringFunc("typeInfoCallsWord",",,,") ) /// Invalid number of generic arguments to type '%s' in provided type. Expected '%d' arguments, given '%d'. - /// (Originally from ..\FSComp.txt:1247) + /// (Originally from ..\FSComp.txt:1246) static member impInvalidNumberOfGenericArguments(a0 : System.String, a1 : System.Int32, a2 : System.Int32) = (3126, GetStringFunc("impInvalidNumberOfGenericArguments",",,,%s,,,%d,,,%d,,,") a0 a1 a2) /// Invalid value '%s' for unit-of-measure parameter '%s' - /// (Originally from ..\FSComp.txt:1248) + /// (Originally from ..\FSComp.txt:1247) static member impInvalidMeasureArgument1(a0 : System.String, a1 : System.String) = (3127, GetStringFunc("impInvalidMeasureArgument1",",,,%s,,,%s,,,") a0 a1) /// Invalid value unit-of-measure parameter '%s' - /// (Originally from ..\FSComp.txt:1249) + /// (Originally from ..\FSComp.txt:1248) static member impInvalidMeasureArgument2(a0 : System.String) = (3127, GetStringFunc("impInvalidMeasureArgument2",",,,%s,,,") a0) /// Property '%s' on provided type '%s' is neither readable nor writable as it has CanRead=false and CanWrite=false - /// (Originally from ..\FSComp.txt:1250) + /// (Originally from ..\FSComp.txt:1249) static member etPropertyNeedsCanWriteOrCanRead(a0 : System.String, a1 : System.String) = (3128, GetStringFunc("etPropertyNeedsCanWriteOrCanRead",",,,%s,,,%s,,,") a0 a1) /// A use of 'into' must be followed by the remainder of the computation - /// (Originally from ..\FSComp.txt:1251) + /// (Originally from ..\FSComp.txt:1250) static member tcIntoNeedsRestOfQuery() = (3129, GetStringFunc("tcIntoNeedsRestOfQuery",",,,") ) /// The operator '%s' does not accept the use of 'into' - /// (Originally from ..\FSComp.txt:1252) + /// (Originally from ..\FSComp.txt:1251) static member tcOperatorDoesntAcceptInto(a0 : System.String) = (3130, GetStringFunc("tcOperatorDoesntAcceptInto",",,,%s,,,") a0) /// The definition of the custom operator '%s' does not use a valid combination of attribute flags - /// (Originally from ..\FSComp.txt:1253) + /// (Originally from ..\FSComp.txt:1252) static member tcCustomOperationInvalid(a0 : System.String) = (3131, GetStringFunc("tcCustomOperationInvalid",",,,%s,,,") a0) /// This type definition may not have the 'CLIMutable' attribute. Only record types may have this attribute. - /// (Originally from ..\FSComp.txt:1254) + /// (Originally from ..\FSComp.txt:1253) static member tcThisTypeMayNotHaveACLIMutableAttribute() = (3132, GetStringFunc("tcThisTypeMayNotHaveACLIMutableAttribute",",,,") ) /// 'member val' definitions are only permitted in types with a primary constructor. Consider adding arguments to your type definition, e.g. 'type X(args) = ...'. - /// (Originally from ..\FSComp.txt:1255) + /// (Originally from ..\FSComp.txt:1254) static member tcAutoPropertyRequiresImplicitConstructionSequence() = (3133, GetStringFunc("tcAutoPropertyRequiresImplicitConstructionSequence",",,,") ) /// Property definitions may not be declared mutable. To indicate that this property can be set, use 'member val PropertyName = expr with get,set'. - /// (Originally from ..\FSComp.txt:1256) + /// (Originally from ..\FSComp.txt:1255) static member parsMutableOnAutoPropertyShouldBeGetSet() = (3134, GetStringFunc("parsMutableOnAutoPropertyShouldBeGetSet",",,,") ) /// To indicate that this property can be set, use 'member val PropertyName = expr with get,set'. - /// (Originally from ..\FSComp.txt:1257) + /// (Originally from ..\FSComp.txt:1256) static member parsMutableOnAutoPropertyShouldBeGetSetNotJustSet() = (3135, GetStringFunc("parsMutableOnAutoPropertyShouldBeGetSetNotJustSet",",,,") ) /// Type '%s' is illegal because in byref, T cannot contain byref types. - /// (Originally from ..\FSComp.txt:1258) + /// (Originally from ..\FSComp.txt:1257) static member chkNoByrefsOfByrefs(a0 : System.String) = (3136, GetStringFunc("chkNoByrefsOfByrefs",",,,%s,,,") a0) /// F# supports array ranks between 1 and 32. The value %d is not allowed. - /// (Originally from ..\FSComp.txt:1259) + /// (Originally from ..\FSComp.txt:1258) static member tastopsMaxArrayThirtyTwo(a0 : System.Int32) = (3138, GetStringFunc("tastopsMaxArrayThirtyTwo",",,,%d,,,") a0) /// In queries, use the form 'for x in n .. m do ...' for ranging over integers - /// (Originally from ..\FSComp.txt:1260) + /// (Originally from ..\FSComp.txt:1259) static member tcNoIntegerForLoopInQuery() = (3139, GetStringFunc("tcNoIntegerForLoopInQuery",",,,") ) /// 'while' expressions may not be used in queries - /// (Originally from ..\FSComp.txt:1261) + /// (Originally from ..\FSComp.txt:1260) static member tcNoWhileInQuery() = (3140, GetStringFunc("tcNoWhileInQuery",",,,") ) /// 'try/finally' expressions may not be used in queries - /// (Originally from ..\FSComp.txt:1262) + /// (Originally from ..\FSComp.txt:1261) static member tcNoTryFinallyInQuery() = (3141, GetStringFunc("tcNoTryFinallyInQuery",",,,") ) /// 'use' expressions may not be used in queries - /// (Originally from ..\FSComp.txt:1263) + /// (Originally from ..\FSComp.txt:1262) static member tcUseMayNotBeUsedInQueries() = (3142, GetStringFunc("tcUseMayNotBeUsedInQueries",",,,") ) /// 'let!', 'use!' and 'do!' expressions may not be used in queries - /// (Originally from ..\FSComp.txt:1264) + /// (Originally from ..\FSComp.txt:1263) static member tcBindMayNotBeUsedInQueries() = (3143, GetStringFunc("tcBindMayNotBeUsedInQueries",",,,") ) /// 'return' and 'return!' may not be used in queries - /// (Originally from ..\FSComp.txt:1265) + /// (Originally from ..\FSComp.txt:1264) static member tcReturnMayNotBeUsedInQueries() = (3144, GetStringFunc("tcReturnMayNotBeUsedInQueries",",,,") ) /// This is not a known query operator. Query operators are identifiers such as 'select', 'where', 'sortBy', 'thenBy', 'groupBy', 'groupValBy', 'join', 'groupJoin', 'sumBy' and 'averageBy', defined using corresponding methods on the 'QueryBuilder' type. - /// (Originally from ..\FSComp.txt:1266) + /// (Originally from ..\FSComp.txt:1265) static member tcUnrecognizedQueryOperator() = (3145, GetStringFunc("tcUnrecognizedQueryOperator",",,,") ) /// 'try/with' expressions may not be used in queries - /// (Originally from ..\FSComp.txt:1267) + /// (Originally from ..\FSComp.txt:1266) static member tcTryWithMayNotBeUsedInQueries() = (3146, GetStringFunc("tcTryWithMayNotBeUsedInQueries",",,,") ) /// This 'let' definition may not be used in a query. Only simple value definitions may be used in queries. - /// (Originally from ..\FSComp.txt:1268) + /// (Originally from ..\FSComp.txt:1267) static member tcNonSimpleLetBindingInQuery() = (3147, GetStringFunc("tcNonSimpleLetBindingInQuery",",,,") ) /// Too many static parameters. Expected at most %d parameters, but got %d unnamed and %d named parameters. - /// (Originally from ..\FSComp.txt:1269) + /// (Originally from ..\FSComp.txt:1268) static member etTooManyStaticParameters(a0 : System.Int32, a1 : System.Int32, a2 : System.Int32) = (3148, GetStringFunc("etTooManyStaticParameters",",,,%d,,,%d,,,%d,,,") a0 a1 a2) /// Invalid provided literal value '%s' - /// (Originally from ..\FSComp.txt:1270) + /// (Originally from ..\FSComp.txt:1269) static member infosInvalidProvidedLiteralValue(a0 : System.String) = (3149, GetStringFunc("infosInvalidProvidedLiteralValue",",,,%s,,,") a0) /// The 'anycpu32bitpreferred' platform can only be used with EXE targets. You must use 'anycpu' instead. - /// (Originally from ..\FSComp.txt:1271) + /// (Originally from ..\FSComp.txt:1270) static member invalidPlatformTarget() = (3150, GetStringFunc("invalidPlatformTarget",",,,") ) /// This member, function or value declaration may not be declared 'inline' - /// (Originally from ..\FSComp.txt:1272) + /// (Originally from ..\FSComp.txt:1271) static member tcThisValueMayNotBeInlined() = (3151, GetStringFunc("tcThisValueMayNotBeInlined",",,,") ) /// The provider '%s' returned a non-generated type '%s' in the context of a set of generated types. Consider adjusting the type provider to only return generated types. - /// (Originally from ..\FSComp.txt:1273) + /// (Originally from ..\FSComp.txt:1272) static member etErasedTypeUsedInGeneration(a0 : System.String, a1 : System.String) = (3152, GetStringFunc("etErasedTypeUsedInGeneration",",,,%s,,,%s,,,") a0 a1) /// Arguments to query operators may require parentheses, e.g. 'where (x > y)' or 'groupBy (x.Length / 10)' - /// (Originally from ..\FSComp.txt:1274) + /// (Originally from ..\FSComp.txt:1273) static member tcUnrecognizedQueryBinaryOperator() = (3153, GetStringFunc("tcUnrecognizedQueryBinaryOperator",",,,") ) /// A quotation may not involve an assignment to or taking the address of a captured local variable - /// (Originally from ..\FSComp.txt:1275) + /// (Originally from ..\FSComp.txt:1274) static member crefNoSetOfHole() = (3155, GetStringFunc("crefNoSetOfHole",",,,") ) /// + 1 overload - /// (Originally from ..\FSComp.txt:1276) + /// (Originally from ..\FSComp.txt:1275) static member nicePrintOtherOverloads1() = (GetStringFunc("nicePrintOtherOverloads1",",,,") ) /// + %d overloads - /// (Originally from ..\FSComp.txt:1277) + /// (Originally from ..\FSComp.txt:1276) static member nicePrintOtherOverloadsN(a0 : System.Int32) = (GetStringFunc("nicePrintOtherOverloadsN",",,,%d,,,") a0) /// Erased to - /// (Originally from ..\FSComp.txt:1278) + /// (Originally from ..\FSComp.txt:1277) static member erasedTo() = (GetStringFunc("erasedTo",",,,") ) /// Unexpected token '%s' or incomplete expression - /// (Originally from ..\FSComp.txt:1279) + /// (Originally from ..\FSComp.txt:1278) static member parsUnfinishedExpression(a0 : System.String) = (3156, GetStringFunc("parsUnfinishedExpression",",,,%s,,,") a0) /// Cannot find code target for this attribute, possibly because the code after the attribute is incomplete. - /// (Originally from ..\FSComp.txt:1280) + /// (Originally from ..\FSComp.txt:1279) static member parsAttributeOnIncompleteCode() = (3158, GetStringFunc("parsAttributeOnIncompleteCode",",,,") ) /// Type name cannot be empty. - /// (Originally from ..\FSComp.txt:1281) + /// (Originally from ..\FSComp.txt:1280) static member parsTypeNameCannotBeEmpty() = (3159, GetStringFunc("parsTypeNameCannotBeEmpty",",,,") ) /// Problem reading assembly '%s': %s - /// (Originally from ..\FSComp.txt:1282) + /// (Originally from ..\FSComp.txt:1281) static member buildProblemReadingAssembly(a0 : System.String, a1 : System.String) = (3160, GetStringFunc("buildProblemReadingAssembly",",,,%s,,,%s,,,") a0 a1) /// Invalid provided field. Provided fields of erased provided types must be literals. - /// (Originally from ..\FSComp.txt:1283) + /// (Originally from ..\FSComp.txt:1282) static member tcTPFieldMustBeLiteral() = (3161, GetStringFunc("tcTPFieldMustBeLiteral",",,,") ) /// (loading description...) - /// (Originally from ..\FSComp.txt:1284) + /// (Originally from ..\FSComp.txt:1283) static member loadingDescription() = (GetStringFunc("loadingDescription",",,,") ) /// (description unavailable...) - /// (Originally from ..\FSComp.txt:1285) + /// (Originally from ..\FSComp.txt:1284) static member descriptionUnavailable() = (GetStringFunc("descriptionUnavailable",",,,") ) /// A type variable has been constrained by multiple different class types. A type variable may only have one class constraint. - /// (Originally from ..\FSComp.txt:1286) + /// (Originally from ..\FSComp.txt:1285) static member chkTyparMultipleClassConstraints() = (3162, GetStringFunc("chkTyparMultipleClassConstraints",",,,") ) /// 'match' expressions may not be used in queries - /// (Originally from ..\FSComp.txt:1287) + /// (Originally from ..\FSComp.txt:1286) static member tcMatchMayNotBeUsedWithQuery() = (3163, GetStringFunc("tcMatchMayNotBeUsedWithQuery",",,,") ) /// Infix operator member '%s' has %d initial argument(s). Expected a tuple of 3 arguments - /// (Originally from ..\FSComp.txt:1288) + /// (Originally from ..\FSComp.txt:1287) static member memberOperatorDefinitionWithNonTripleArgument(a0 : System.String, a1 : System.Int32) = (3164, GetStringFunc("memberOperatorDefinitionWithNonTripleArgument",",,,%s,,,%d,,,") a0 a1) /// The operator '%s' cannot be resolved. Consider opening the module 'Microsoft.FSharp.Linq.NullableOperators'. - /// (Originally from ..\FSComp.txt:1289) + /// (Originally from ..\FSComp.txt:1288) static member cannotResolveNullableOperators(a0 : System.String) = (3165, GetStringFunc("cannotResolveNullableOperators",",,,%s,,,") a0) /// '%s' must be followed by 'in'. Usage: %s. - /// (Originally from ..\FSComp.txt:1290) + /// (Originally from ..\FSComp.txt:1289) static member tcOperatorRequiresIn(a0 : System.String, a1 : System.String) = (3167, GetStringFunc("tcOperatorRequiresIn",",,,%s,,,%s,,,") a0 a1) /// Neither 'member val' nor 'override val' definitions are permitted in object expressions. - /// (Originally from ..\FSComp.txt:1291) + /// (Originally from ..\FSComp.txt:1290) static member parsIllegalMemberVarInObjectImplementation() = (3168, GetStringFunc("parsIllegalMemberVarInObjectImplementation",",,,") ) /// Copy-and-update record expressions must include at least one field. - /// (Originally from ..\FSComp.txt:1292) + /// (Originally from ..\FSComp.txt:1291) static member tcEmptyCopyAndUpdateRecordInvalid() = (3169, GetStringFunc("tcEmptyCopyAndUpdateRecordInvalid",",,,") ) /// '_' cannot be used as field name - /// (Originally from ..\FSComp.txt:1293) + /// (Originally from ..\FSComp.txt:1292) static member parsUnderscoreInvalidFieldName() = (3170, GetStringFunc("parsUnderscoreInvalidFieldName",",,,") ) /// The provided types generated by this use of a type provider may not be used from other F# assemblies and should be marked internal or private. Consider using 'type internal TypeName = ...' or 'type private TypeName = ...'. - /// (Originally from ..\FSComp.txt:1294) + /// (Originally from ..\FSComp.txt:1293) static member tcGeneratedTypesShouldBeInternalOrPrivate() = (3171, GetStringFunc("tcGeneratedTypesShouldBeInternalOrPrivate",",,,") ) /// A property's getter and setter must have the same type. Property '%s' has getter of type '%s' but setter of type '%s'. - /// (Originally from ..\FSComp.txt:1295) + /// (Originally from ..\FSComp.txt:1294) static member chkGetterAndSetterHaveSamePropertyType(a0 : System.String, a1 : System.String, a2 : System.String) = (3172, GetStringFunc("chkGetterAndSetterHaveSamePropertyType",",,,%s,,,%s,,,%s,,,") a0 a1 a2) /// Array method '%s' is supplied by the runtime and cannot be directly used in code. For operations with array elements consider using family of GetArray/SetArray functions from LanguagePrimitives.IntrinsicFunctions module. - /// (Originally from ..\FSComp.txt:1296) + /// (Originally from ..\FSComp.txt:1295) static member tcRuntimeSuppliedMethodCannotBeUsedInUserCode(a0 : System.String) = (3173, GetStringFunc("tcRuntimeSuppliedMethodCannotBeUsedInUserCode",",,,%s,,,") a0) /// Union case/exception '%s' does not have field named '%s'. - /// (Originally from ..\FSComp.txt:1297) + /// (Originally from ..\FSComp.txt:1296) static member tcUnionCaseConstructorDoesNotHaveFieldWithGivenName(a0 : System.String, a1 : System.String) = (3174, GetStringFunc("tcUnionCaseConstructorDoesNotHaveFieldWithGivenName",",,,%s,,,%s,,,") a0 a1) - /// Union case/exception field '%s' cannot be used more than once. + /// The exception '%s' does not have a field named '%s'. + /// (Originally from ..\FSComp.txt:1297) + static member tcExceptionConstructorDoesNotHaveFieldWithGivenName(a0 : System.String, a1 : System.String) = (3174, GetStringFunc("tcExceptionConstructorDoesNotHaveFieldWithGivenName",",,,%s,,,%s,,,") a0 a1) + /// Active patterns do not have fields. This syntax is invalid. /// (Originally from ..\FSComp.txt:1298) + static member tcActivePatternsDoNotHaveFields() = (3174, GetStringFunc("tcActivePatternsDoNotHaveFields",",,,") ) + /// The constructor does not have a field named '%s'. + /// (Originally from ..\FSComp.txt:1299) + static member tcConstructorDoesNotHaveFieldWithGivenName(a0 : System.String) = (3174, GetStringFunc("tcConstructorDoesNotHaveFieldWithGivenName",",,,%s,,,") a0) + /// Union case/exception field '%s' cannot be used more than once. + /// (Originally from ..\FSComp.txt:1297) static member tcUnionCaseFieldCannotBeUsedMoreThanOnce(a0 : System.String) = (3175, GetStringFunc("tcUnionCaseFieldCannotBeUsedMoreThanOnce",",,,%s,,,") a0) /// Named field '%s' is used more than once. - /// (Originally from ..\FSComp.txt:1299) + /// (Originally from ..\FSComp.txt:1298) static member tcFieldNameIsUsedModeThanOnce(a0 : System.String) = (3176, GetStringFunc("tcFieldNameIsUsedModeThanOnce",",,,%s,,,") a0) /// Named field '%s' conflicts with autogenerated name for anonymous field. - /// (Originally from ..\FSComp.txt:1300) + /// (Originally from ..\FSComp.txt:1299) static member tcFieldNameConflictsWithGeneratedNameForAnonymousField(a0 : System.String) = (3176, GetStringFunc("tcFieldNameConflictsWithGeneratedNameForAnonymousField",",,,%s,,,") a0) /// This literal expression or attribute argument results in an arithmetic overflow. - /// (Originally from ..\FSComp.txt:1301) + /// (Originally from ..\FSComp.txt:1300) static member tastConstantExpressionOverflow() = (3177, GetStringFunc("tastConstantExpressionOverflow",",,,") ) /// This is not valid literal expression. The [] attribute will be ignored. - /// (Originally from ..\FSComp.txt:1302) + /// (Originally from ..\FSComp.txt:1301) static member tcIllegalStructTypeForConstantExpression() = (3178, GetStringFunc("tcIllegalStructTypeForConstantExpression",",,,") ) /// System.Runtime.InteropServices assembly is required to use UnknownWrapper\DispatchWrapper classes. - /// (Originally from ..\FSComp.txt:1303) + /// (Originally from ..\FSComp.txt:1302) static member fscSystemRuntimeInteropServicesIsRequired() = (3179, GetStringFunc("fscSystemRuntimeInteropServicesIsRequired",",,,") ) /// The mutable local '%s' is implicitly allocated as a reference cell because it has been captured by a closure. This warning is for informational purposes only to indicate where implicit allocations are performed. - /// (Originally from ..\FSComp.txt:1304) + /// (Originally from ..\FSComp.txt:1303) static member abImplicitHeapAllocation(a0 : System.String) = (3180, GetStringFunc("abImplicitHeapAllocation",",,,%s,,,") a0) /// A type provider implemented GetStaticParametersForMethod, but ApplyStaticArgumentsForMethod was not implemented or invalid - /// (Originally from ..\FSComp.txt:1305) + /// (Originally from ..\FSComp.txt:1304) static member estApplyStaticArgumentsForMethodNotImplemented() = (GetStringFunc("estApplyStaticArgumentsForMethodNotImplemented",",,,") ) /// An error occured applying the static arguments to a provided method - /// (Originally from ..\FSComp.txt:1306) + /// (Originally from ..\FSComp.txt:1305) static member etErrorApplyingStaticArgumentsToMethod() = (3181, GetStringFunc("etErrorApplyingStaticArgumentsToMethod",",,,") ) /// Unexpected character '%s' in preprocessor expression - /// (Originally from ..\FSComp.txt:1307) + /// (Originally from ..\FSComp.txt:1306) static member pplexUnexpectedChar(a0 : System.String) = (3182, GetStringFunc("pplexUnexpectedChar",",,,%s,,,") a0) /// Unexpected token '%s' in preprocessor expression - /// (Originally from ..\FSComp.txt:1308) + /// (Originally from ..\FSComp.txt:1307) static member ppparsUnexpectedToken(a0 : System.String) = (3183, GetStringFunc("ppparsUnexpectedToken",",,,%s,,,") a0) /// Incomplete preprocessor expression - /// (Originally from ..\FSComp.txt:1309) + /// (Originally from ..\FSComp.txt:1308) static member ppparsIncompleteExpression() = (3184, GetStringFunc("ppparsIncompleteExpression",",,,") ) /// Missing token '%s' in preprocessor expression - /// (Originally from ..\FSComp.txt:1310) + /// (Originally from ..\FSComp.txt:1309) static member ppparsMissingToken(a0 : System.String) = (3185, GetStringFunc("ppparsMissingToken",",,,%s,,,") a0) /// An error occurred while reading the F# metadata node at position %d in table '%s' of assembly '%s'. The node had no matching declaration. Please report this warning. You may need to recompile the F# assembly you are using. - /// (Originally from ..\FSComp.txt:1311) + /// (Originally from ..\FSComp.txt:1310) static member pickleMissingDefinition(a0 : System.Int32, a1 : System.String, a2 : System.String) = (3186, GetStringFunc("pickleMissingDefinition",",,,%d,,,%s,,,%s,,,") a0 a1 a2) /// Type inference caused the type variable %s to escape its scope. Consider adding an explicit type parameter declaration or adjusting your code to be less generic. - /// (Originally from ..\FSComp.txt:1312) + /// (Originally from ..\FSComp.txt:1311) static member checkNotSufficientlyGenericBecauseOfScope(a0 : System.String) = (3187, GetStringFunc("checkNotSufficientlyGenericBecauseOfScope",",,,%s,,,") a0) /// Type inference caused an inference type variable to escape its scope. Consider adding type annotations to make your code less generic. - /// (Originally from ..\FSComp.txt:1313) + /// (Originally from ..\FSComp.txt:1312) static member checkNotSufficientlyGenericBecauseOfScopeAnon() = (3188, GetStringFunc("checkNotSufficientlyGenericBecauseOfScopeAnon",",,,") ) /// Redundant arguments are being ignored in function '%s'. Expected %d but got %d arguments. - /// (Originally from ..\FSComp.txt:1314) + /// (Originally from ..\FSComp.txt:1313) static member checkRaiseFamilyFunctionArgumentCount(a0 : System.String, a1 : System.Int32, a2 : System.Int32) = (3189, GetStringFunc("checkRaiseFamilyFunctionArgumentCount",",,,%s,,,%d,,,%d,,,") a0 a1 a2) /// Lowercase literal '%s' is being shadowed by a new pattern with the same name. Only uppercase and module-prefixed literals can be used as named patterns. - /// (Originally from ..\FSComp.txt:1315) + /// (Originally from ..\FSComp.txt:1314) static member checkLowercaseLiteralBindingInPattern(a0 : System.String) = (3190, GetStringFunc("checkLowercaseLiteralBindingInPattern",",,,%s,,,") a0) /// This literal pattern does not take arguments - /// (Originally from ..\FSComp.txt:1316) + /// (Originally from ..\FSComp.txt:1315) static member tcLiteralDoesNotTakeArguments() = (3191, GetStringFunc("tcLiteralDoesNotTakeArguments",",,,") ) /// Constructors are not permitted as extension members - they must be defined as part of the original definition of the type - /// (Originally from ..\FSComp.txt:1317) + /// (Originally from ..\FSComp.txt:1316) static member tcConstructorsIllegalInAugmentation() = (3192, GetStringFunc("tcConstructorsIllegalInAugmentation",",,,") ) /// Invalid response file '%s' ( '%s' ) - /// (Originally from ..\FSComp.txt:1318) + /// (Originally from ..\FSComp.txt:1317) static member optsInvalidResponseFile(a0 : System.String, a1 : System.String) = (3193, GetStringFunc("optsInvalidResponseFile",",,,%s,,,%s,,,") a0 a1) /// Response file '%s' not found in '%s' - /// (Originally from ..\FSComp.txt:1319) + /// (Originally from ..\FSComp.txt:1318) static member optsResponseFileNotFound(a0 : System.String, a1 : System.String) = (3194, GetStringFunc("optsResponseFileNotFound",",,,%s,,,%s,,,") a0 a1) /// Response file name '%s' is empty, contains invalid characters, has a drive specification without an absolute path, or is too long - /// (Originally from ..\FSComp.txt:1320) + /// (Originally from ..\FSComp.txt:1319) static member optsResponseFileNameInvalid(a0 : System.String) = (3195, GetStringFunc("optsResponseFileNameInvalid",",,,%s,,,") a0) /// Cannot find FSharp.Core.dll in compiler's directory - /// (Originally from ..\FSComp.txt:1321) + /// (Originally from ..\FSComp.txt:1320) static member fsharpCoreNotFoundToBeCopied() = (3196, GetStringFunc("fsharpCoreNotFoundToBeCopied",",,,") ) /// One tuple type is a struct tuple, the other is a reference tuple - /// (Originally from ..\FSComp.txt:1322) + /// (Originally from ..\FSComp.txt:1321) static member tcTupleStructMismatch() = (GetStringFunc("tcTupleStructMismatch",",,,") ) /// This provided method requires static parameters - /// (Originally from ..\FSComp.txt:1323) + /// (Originally from ..\FSComp.txt:1322) static member etMissingStaticArgumentsToMethod() = (3197, GetStringFunc("etMissingStaticArgumentsToMethod",",,,") ) /// The conversion from %s to %s is a compile-time safe upcast, not a downcast. Consider using 'upcast' instead of 'downcast'. - /// (Originally from ..\FSComp.txt:1324) + /// (Originally from ..\FSComp.txt:1323) static member considerUpcast(a0 : System.String, a1 : System.String) = (3198, GetStringFunc("considerUpcast",",,,%s,,,%s,,,") a0 a1) /// The conversion from %s to %s is a compile-time safe upcast, not a downcast. Consider using the :> (upcast) operator instead of the :?> (downcast) operator. - /// (Originally from ..\FSComp.txt:1325) + /// (Originally from ..\FSComp.txt:1324) static member considerUpcastOperator(a0 : System.String, a1 : System.String) = (3198, GetStringFunc("considerUpcastOperator",",,,%s,,,%s,,,") a0 a1) /// The 'rec' on this module is implied by an outer 'rec' declaration and is being ignored - /// (Originally from ..\FSComp.txt:1326) + /// (Originally from ..\FSComp.txt:1325) static member tcRecImplied() = (3199, GetStringFunc("tcRecImplied",",,,") ) /// In a recursive declaration group, 'open' declarations must come first in each module - /// (Originally from ..\FSComp.txt:1327) + /// (Originally from ..\FSComp.txt:1326) static member tcOpenFirstInMutRec() = (3200, GetStringFunc("tcOpenFirstInMutRec",",,,") ) /// In a recursive declaration group, module abbreviations must come after all 'open' declarations and before other declarations - /// (Originally from ..\FSComp.txt:1328) + /// (Originally from ..\FSComp.txt:1327) static member tcModuleAbbrevFirstInMutRec() = (3201, GetStringFunc("tcModuleAbbrevFirstInMutRec",",,,") ) /// This declaration is not supported in recursive declaration groups - /// (Originally from ..\FSComp.txt:1329) + /// (Originally from ..\FSComp.txt:1328) static member tcUnsupportedMutRecDecl() = (3202, GetStringFunc("tcUnsupportedMutRecDecl",",,,") ) /// Invalid use of 'rec' keyword - /// (Originally from ..\FSComp.txt:1330) + /// (Originally from ..\FSComp.txt:1329) static member parsInvalidUseOfRec() = (3203, GetStringFunc("parsInvalidUseOfRec",",,,") ) /// If a union type has more than one case and is a struct, then all fields within the union type must be given unique names. - /// (Originally from ..\FSComp.txt:1331) + /// (Originally from ..\FSComp.txt:1330) static member tcStructUnionMultiCaseDistinctFields() = (3204, GetStringFunc("tcStructUnionMultiCaseDistinctFields",",,,") ) /// The CallerMemberNameAttribute applied to parameter '%s' will have no effect. It is overridden by the CallerFilePathAttribute. - /// (Originally from ..\FSComp.txt:1332) + /// (Originally from ..\FSComp.txt:1331) static member CallerMemberNameIsOverriden(a0 : System.String) = (3206, GetStringFunc("CallerMemberNameIsOverriden",",,,%s,,,") a0) /// Invalid use of 'fixed'. 'fixed' may only be used in a declaration of the form 'use x = fixed expr' where the expression is an array, the address of a field, the address of an array element or a string' - /// (Originally from ..\FSComp.txt:1333) + /// (Originally from ..\FSComp.txt:1332) static member tcFixedNotAllowed() = (3207, GetStringFunc("tcFixedNotAllowed",",,,") ) /// Could not find method System.Runtime.CompilerServices.OffsetToStringData in references when building 'fixed' expression. - /// (Originally from ..\FSComp.txt:1334) + /// (Originally from ..\FSComp.txt:1333) static member tcCouldNotFindOffsetToStringData() = (3208, GetStringFunc("tcCouldNotFindOffsetToStringData",",,,") ) - /// The address of the variable '%s' cannot be used at this point. A method or function may not return the address of this local value. - /// (Originally from ..\FSComp.txt:1335) - static member chkNoByrefReturnOfLocal(a0 : System.String) = (3209, GetStringFunc("chkNoByrefReturnOfLocal",",,,%s,,,") a0) + /// The address of the variable '%s' or a related expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + /// (Originally from ..\FSComp.txt:1334) + static member chkNoByrefAddressOfLocal(a0 : System.String) = (3209, GetStringFunc("chkNoByrefAddressOfLocal",",,,%s,,,") a0) /// %s is an active pattern and cannot be treated as a discriminated union case with named fields. - /// (Originally from ..\FSComp.txt:1336) + /// (Originally from ..\FSComp.txt:1335) static member tcNamedActivePattern(a0 : System.String) = (3210, GetStringFunc("tcNamedActivePattern",",,,%s,,,") a0) /// The default value does not have the same type as the argument. The DefaultParameterValue attribute and any Optional attribute will be ignored. Note: 'null' needs to be annotated with the correct type, e.g. 'DefaultParameterValue(null:obj)'. - /// (Originally from ..\FSComp.txt:1337) + /// (Originally from ..\FSComp.txt:1336) static member DefaultParameterValueNotAppropriateForArgument() = (3211, GetStringFunc("DefaultParameterValueNotAppropriateForArgument",",,,") ) /// The system type '%s' was required but no referenced system DLL contained this type - /// (Originally from ..\FSComp.txt:1338) + /// (Originally from ..\FSComp.txt:1337) static member tcGlobalsSystemTypeNotFound(a0 : System.String) = (GetStringFunc("tcGlobalsSystemTypeNotFound",",,,%s,,,") a0) /// The member '%s' matches multiple overloads of the same method.\nPlease restrict it to one of the following:%s. - /// (Originally from ..\FSComp.txt:1339) + /// (Originally from ..\FSComp.txt:1338) static member typrelMemberHasMultiplePossibleDispatchSlots(a0 : System.String, a1 : System.String) = (3213, GetStringFunc("typrelMemberHasMultiplePossibleDispatchSlots",",,,%s,,,%s,,,") a0 a1) /// Method or object constructor '%s' is not static - /// (Originally from ..\FSComp.txt:1340) + /// (Originally from ..\FSComp.txt:1339) static member methodIsNotStatic(a0 : System.String) = (3214, GetStringFunc("methodIsNotStatic",",,,%s,,,") a0) /// Unexpected symbol '=' in expression. Did you intend to use 'for x in y .. z do' instead? - /// (Originally from ..\FSComp.txt:1341) + /// (Originally from ..\FSComp.txt:1340) static member parsUnexpectedSymbolEqualsInsteadOfIn() = (3215, GetStringFunc("parsUnexpectedSymbolEqualsInsteadOfIn",",,,") ) /// Indicates a method that either has no implementation in the type in which it is declared or that is virtual and has a default implementation. - /// (Originally from ..\FSComp.txt:1342) + /// (Originally from ..\FSComp.txt:1341) static member keywordDescriptionAbstract() = (GetStringFunc("keywordDescriptionAbstract",",,,") ) /// Used in mutually recursive bindings, in property declarations, and with multiple constraints on generic parameters. - /// (Originally from ..\FSComp.txt:1343) + /// (Originally from ..\FSComp.txt:1342) static member keyworkDescriptionAnd() = (GetStringFunc("keyworkDescriptionAnd",",,,") ) /// Used to give the current class object an object name. Also used to give a name to a whole pattern within a pattern match. - /// (Originally from ..\FSComp.txt:1344) + /// (Originally from ..\FSComp.txt:1343) static member keywordDescriptionAs() = (GetStringFunc("keywordDescriptionAs",",,,") ) /// Used to verify code during debugging. - /// (Originally from ..\FSComp.txt:1345) + /// (Originally from ..\FSComp.txt:1344) static member keywordDescriptionAssert() = (GetStringFunc("keywordDescriptionAssert",",,,") ) /// Used as the name of the base class object. - /// (Originally from ..\FSComp.txt:1346) + /// (Originally from ..\FSComp.txt:1345) static member keywordDescriptionBase() = (GetStringFunc("keywordDescriptionBase",",,,") ) /// In verbose syntax, indicates the start of a code block. - /// (Originally from ..\FSComp.txt:1347) + /// (Originally from ..\FSComp.txt:1346) static member keywordDescriptionBegin() = (GetStringFunc("keywordDescriptionBegin",",,,") ) /// In verbose syntax, indicates the start of a class definition. - /// (Originally from ..\FSComp.txt:1348) + /// (Originally from ..\FSComp.txt:1347) static member keywordDescriptionClass() = (GetStringFunc("keywordDescriptionClass",",,,") ) /// Indicates an implementation of an abstract method; used together with an abstract method declaration to create a virtual method. - /// (Originally from ..\FSComp.txt:1349) + /// (Originally from ..\FSComp.txt:1348) static member keywordDescriptionDefault() = (GetStringFunc("keywordDescriptionDefault",",,,") ) /// Used to declare a delegate. - /// (Originally from ..\FSComp.txt:1350) + /// (Originally from ..\FSComp.txt:1349) static member keywordDescriptionDelegate() = (GetStringFunc("keywordDescriptionDelegate",",,,") ) /// Used in looping constructs or to execute imperative code. - /// (Originally from ..\FSComp.txt:1351) + /// (Originally from ..\FSComp.txt:1350) static member keywordDescriptionDo() = (GetStringFunc("keywordDescriptionDo",",,,") ) /// In verbose syntax, indicates the end of a block of code in a looping expression. - /// (Originally from ..\FSComp.txt:1352) + /// (Originally from ..\FSComp.txt:1351) static member keywordDescriptionDone() = (GetStringFunc("keywordDescriptionDone",",,,") ) /// Used to convert to a type that is lower in the inheritance chain. - /// (Originally from ..\FSComp.txt:1353) + /// (Originally from ..\FSComp.txt:1352) static member keywordDescriptionDowncast() = (GetStringFunc("keywordDescriptionDowncast",",,,") ) /// In a for expression, used when counting in reverse. - /// (Originally from ..\FSComp.txt:1354) + /// (Originally from ..\FSComp.txt:1353) static member keywordDescriptionDownto() = (GetStringFunc("keywordDescriptionDownto",",,,") ) /// Used in conditional branching. A short form of else if. - /// (Originally from ..\FSComp.txt:1355) + /// (Originally from ..\FSComp.txt:1354) static member keywordDescriptionElif() = (GetStringFunc("keywordDescriptionElif",",,,") ) /// Used in conditional branching. - /// (Originally from ..\FSComp.txt:1356) + /// (Originally from ..\FSComp.txt:1355) static member keywordDescriptionElse() = (GetStringFunc("keywordDescriptionElse",",,,") ) /// In type definitions and type extensions, indicates the end of a section of member definitions. In verbose syntax, used to specify the end of a code block that starts with the begin keyword. - /// (Originally from ..\FSComp.txt:1357) + /// (Originally from ..\FSComp.txt:1356) static member keywordDescriptionEnd() = (GetStringFunc("keywordDescriptionEnd",",,,") ) /// Used to declare an exception type. - /// (Originally from ..\FSComp.txt:1358) + /// (Originally from ..\FSComp.txt:1357) static member keywordDescriptionException() = (GetStringFunc("keywordDescriptionException",",,,") ) /// Indicates that a declared program element is defined in another binary or assembly. - /// (Originally from ..\FSComp.txt:1359) + /// (Originally from ..\FSComp.txt:1358) static member keywordDescriptionExtern() = (GetStringFunc("keywordDescriptionExtern",",,,") ) /// Used as a Boolean literal. - /// (Originally from ..\FSComp.txt:1360) + /// (Originally from ..\FSComp.txt:1359) static member keywordDescriptionTrueFalse() = (GetStringFunc("keywordDescriptionTrueFalse",",,,") ) /// Used together with try to introduce a block of code that executes regardless of whether an exception occurs. - /// (Originally from ..\FSComp.txt:1361) + /// (Originally from ..\FSComp.txt:1360) static member keywordDescriptionFinally() = (GetStringFunc("keywordDescriptionFinally",",,,") ) /// Used in looping constructs. - /// (Originally from ..\FSComp.txt:1362) + /// (Originally from ..\FSComp.txt:1361) static member keywordDescriptionFor() = (GetStringFunc("keywordDescriptionFor",",,,") ) /// Used in lambda expressions, also known as anonymous functions. - /// (Originally from ..\FSComp.txt:1363) + /// (Originally from ..\FSComp.txt:1362) static member keywordDescriptionFun() = (GetStringFunc("keywordDescriptionFun",",,,") ) /// Used as a shorter alternative to the fun keyword and a match expression in a lambda expression that has pattern matching on a single argument. - /// (Originally from ..\FSComp.txt:1364) + /// (Originally from ..\FSComp.txt:1363) static member keywordDescriptionFunction() = (GetStringFunc("keywordDescriptionFunction",",,,") ) /// Used to reference the top-level .NET namespace. - /// (Originally from ..\FSComp.txt:1365) + /// (Originally from ..\FSComp.txt:1364) static member keywordDescriptionGlobal() = (GetStringFunc("keywordDescriptionGlobal",",,,") ) /// Used in conditional branching constructs. - /// (Originally from ..\FSComp.txt:1366) + /// (Originally from ..\FSComp.txt:1365) static member keywordDescriptionIf() = (GetStringFunc("keywordDescriptionIf",",,,") ) /// Used for sequence expressions and, in verbose syntax, to separate expressions from bindings. - /// (Originally from ..\FSComp.txt:1367) + /// (Originally from ..\FSComp.txt:1366) static member keywordDescriptionIn() = (GetStringFunc("keywordDescriptionIn",",,,") ) /// Used to specify a base class or base interface. - /// (Originally from ..\FSComp.txt:1368) + /// (Originally from ..\FSComp.txt:1367) static member keywordDescriptionInherit() = (GetStringFunc("keywordDescriptionInherit",",,,") ) /// Used to indicate a function that should be integrated directly into the caller's code. - /// (Originally from ..\FSComp.txt:1369) + /// (Originally from ..\FSComp.txt:1368) static member keywordDescriptionInline() = (GetStringFunc("keywordDescriptionInline",",,,") ) /// Used to declare and implement interfaces. - /// (Originally from ..\FSComp.txt:1370) + /// (Originally from ..\FSComp.txt:1369) static member keywordDescriptionInterface() = (GetStringFunc("keywordDescriptionInterface",",,,") ) /// Used to specify that a member is visible inside an assembly but not outside it. - /// (Originally from ..\FSComp.txt:1371) + /// (Originally from ..\FSComp.txt:1370) static member keywordDescriptionInternal() = (GetStringFunc("keywordDescriptionInternal",",,,") ) /// Used to specify a computation that is to be performed only when a result is needed. - /// (Originally from ..\FSComp.txt:1372) + /// (Originally from ..\FSComp.txt:1371) static member keywordDescriptionLazy() = (GetStringFunc("keywordDescriptionLazy",",,,") ) /// Used to associate, or bind, a name to a value or function. - /// (Originally from ..\FSComp.txt:1373) + /// (Originally from ..\FSComp.txt:1372) static member keywordDescriptionLet() = (GetStringFunc("keywordDescriptionLet",",,,") ) - /// Used in asynchronous workflows to bind a name to the result of an asynchronous computation, or, in other computation expressions, used to bind a name to a result, which is of the computation type. - /// (Originally from ..\FSComp.txt:1374) + /// Used in computation expressions to bind a name to the result of another computation expression. + /// (Originally from ..\FSComp.txt:1373) static member keywordDescriptionLetBang() = (GetStringFunc("keywordDescriptionLetBang",",,,") ) /// Used to branch by comparing a value to a pattern. - /// (Originally from ..\FSComp.txt:1375) + /// (Originally from ..\FSComp.txt:1374) static member keywordDescriptionMatch() = (GetStringFunc("keywordDescriptionMatch",",,,") ) + /// Used in computation expressions to pattern match directly over the result of another computation expression. + /// (Originally from ..\FSComp.txt:1375) + static member keywordDescriptionMatchBang() = (GetStringFunc("keywordDescriptionMatchBang",",,,") ) /// Used to declare a property or method in an object type. /// (Originally from ..\FSComp.txt:1376) static member keywordDescriptionMember() = (GetStringFunc("keywordDescriptionMember",",,,") ) @@ -4195,10 +4204,10 @@ type internal SR private() = /// Used to indicate that a function is recursive. /// (Originally from ..\FSComp.txt:1389) static member keywordDescriptionRec() = (GetStringFunc("keywordDescriptionRec",",,,") ) - /// Used to indicate a value to provide as the result of a computation expression. + /// Used to provide a value for the result of the containing computation expression. /// (Originally from ..\FSComp.txt:1390) static member keywordDescriptionReturn() = (GetStringFunc("keywordDescriptionReturn",",,,") ) - /// Used to indicate a computation expression that, when evaluated, provides the result of the containing computation expression. + /// Used to provide a value for the result of the containing computation expression, where that value itself comes from the result another computation expression. /// (Originally from ..\FSComp.txt:1391) static member keywordDescriptionReturnBang() = (GetStringFunc("keywordDescriptionReturnBang",",,,") ) /// Used in query expressions to specify what fields or columns to extract. Note that this is a contextual keyword, which means that it is not actually a reserved word and it only acts like a keyword in appropriate context. @@ -4225,10 +4234,10 @@ type internal SR private() = /// Used to convert to a type that is higher in the inheritance chain. /// (Originally from ..\FSComp.txt:1399) static member keywordDescriptionUpcast() = (GetStringFunc("keywordDescriptionUpcast",",,,") ) - /// Used instead of let for values that require Dispose to be called to free resources. + /// Used instead of let for values that implement IDisposable" /// (Originally from ..\FSComp.txt:1400) static member keywordDescriptionUse() = (GetStringFunc("keywordDescriptionUse",",,,") ) - /// Used instead of let! in asynchronous workflows and other computation expressions for values that require Dispose to be called to free resources. + /// Used instead of let! in computation expressions for computation expression results that implement IDisposable. /// (Originally from ..\FSComp.txt:1401) static member keywordDescriptionUseBang() = (GetStringFunc("keywordDescriptionUseBang",",,,") ) /// Used in a signature to indicate a value, or in a type to declare a member, in limited situations. @@ -4300,6 +4309,63 @@ type internal SR private() = /// An error occurred while reading the F# metadata of assembly '%s'. A reserved construct was utilized. You may need to upgrade your F# compiler or use an earlier version of the assembly that doesn't make use of a specific construct. /// (Originally from ..\FSComp.txt:1424) static member pickleUnexpectedNonZero(a0 : System.String) = (3219, GetStringFunc("pickleUnexpectedNonZero",",,,%s,,,") a0) + /// This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. + /// (Originally from ..\FSComp.txt:1425) + static member tcTupleMemberNotNormallyUsed() = (3220, GetStringFunc("tcTupleMemberNotNormallyUsed",",,,") ) + /// This expression returns a value of type '%s' but is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to use the expression as a value in the sequence then use an explicit 'yield'. + /// (Originally from ..\FSComp.txt:1426) + static member implicitlyDiscardedInSequenceExpression(a0 : System.String) = (3221, GetStringFunc("implicitlyDiscardedInSequenceExpression",",,,%s,,,") a0) + /// This expression returns a value of type '%s' but is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to use the expression as a value in the sequence then use an explicit 'yield!'. + /// (Originally from ..\FSComp.txt:1427) + static member implicitlyDiscardedSequenceInSequenceExpression(a0 : System.String) = (3222, GetStringFunc("implicitlyDiscardedSequenceInSequenceExpression",",,,%s,,,") a0) + /// The file '%s' changed on disk unexpectedly, please reload. + /// (Originally from ..\FSComp.txt:1428) + static member ilreadFileChanged(a0 : System.String) = (3223, GetStringFunc("ilreadFileChanged",",,,%s,,,") a0) + /// The byref pointer is readonly, so this write is not permitted. + /// (Originally from ..\FSComp.txt:1429) + static member writeToReadOnlyByref() = (3224, GetStringFunc("writeToReadOnlyByref",",,,") ) + /// A ReadOnly attribute has been applied to a struct type with a mutable field. + /// (Originally from ..\FSComp.txt:1430) + static member readOnlyAttributeOnStructWithMutableField() = (3225, GetStringFunc("readOnlyAttributeOnStructWithMutableField",",,,") ) + /// A byref pointer returned by a function or method is implicitly dereferenced as of F# 4.5. To acquire the return value as a pointer, use the address-of operator, e.g. '&f(x)' or '&obj.Method(arg1, arg2)'. + /// (Originally from ..\FSComp.txt:1431) + static member tcByrefReturnImplicitlyDereferenced() = (3226, GetStringFunc("tcByrefReturnImplicitlyDereferenced",",,,") ) + /// A type annotated with IsByRefLike must also be a struct. Consider adding the [] attribute to the type. + /// (Originally from ..\FSComp.txt:1432) + static member tcByRefLikeNotStruct() = (3227, GetStringFunc("tcByRefLikeNotStruct",",,,") ) + /// The address of a value returned from the expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + /// (Originally from ..\FSComp.txt:1433) + static member chkNoByrefAddressOfValueFromExpression() = (3228, GetStringFunc("chkNoByrefAddressOfValueFromExpression",",,,") ) + /// The Span or IsByRefLike expression cannot be returned from this function or method, because it is composed using elements that may escape their scope. + /// (Originally from ..\FSComp.txt:1434) + static member chkNoReturnOfLimitedSpan() = (3229, GetStringFunc("chkNoReturnOfLimitedSpan",",,,") ) + /// This value can't be assigned because the target '%s' may refer to non-stack-local memory, while the expression being assigned is assessed to potentially refer to stack-local memory. This is to help prevent pointers to stack-bound memory escaping their scope. + /// (Originally from ..\FSComp.txt:1435) + static member chkNoWriteToLimitedSpan(a0 : System.String) = (3230, GetStringFunc("chkNoWriteToLimitedSpan",",,,%s,,,") a0) + /// A value defined in a module must be mutable in order to take its address, e.g. 'let mutable x = ...' + /// (Originally from ..\FSComp.txt:1436) + static member tastValueMustBeLocal() = (3231, GetStringFunc("tastValueMustBeLocal",",,,") ) + /// A type annotated with IsReadOnly must also be a struct. Consider adding the [] attribute to the type. + /// (Originally from ..\FSComp.txt:1437) + static member tcIsReadOnlyNotStruct() = (3232, GetStringFunc("tcIsReadOnlyNotStruct",",,,") ) + /// Struct members cannot return the address of fields of the struct by reference + /// (Originally from ..\FSComp.txt:1438) + static member chkStructsMayNotReturnAddressesOfContents() = (3233, GetStringFunc("chkStructsMayNotReturnAddressesOfContents",",,,") ) + /// The function or method call cannot be used at this point, because one argument that is a byref of a non-stack-local Span or IsByRefLike type is used with another argument that is a stack-local Span or IsByRefLike type. This is to ensure the address of the local value does not escape its scope. + /// (Originally from ..\FSComp.txt:1439) + static member chkNoByrefLikeFunctionCall() = (3234, GetStringFunc("chkNoByrefLikeFunctionCall",",,,") ) + /// The Span or IsByRefLike variable '%s' cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + /// (Originally from ..\FSComp.txt:1440) + static member chkNoSpanLikeVariable(a0 : System.String) = (3235, GetStringFunc("chkNoSpanLikeVariable",",,,%s,,,") a0) + /// A Span or IsByRefLike value returned from the expression cannot be used at ths point. This is to ensure the address of the local value does not escape its scope. + /// (Originally from ..\FSComp.txt:1441) + static member chkNoSpanLikeValueFromExpression() = (3236, GetStringFunc("chkNoSpanLikeValueFromExpression",",,,") ) + /// Cannot take the address of the value returned from the expression. Assign the returned value to a let-bound value before taking the address. + /// (Originally from ..\FSComp.txt:1442) + static member tastCantTakeAddressOfExpression() = (3237, GetStringFunc("tastCantTakeAddressOfExpression",",,,") ) + /// This type does not inherit Attribute, it will not work correctly with other .NET languages. + /// (Originally from ..\FSComp.txt:1443) + static member tcTypeDoesNotInheritAttribute() = (3242, GetStringFunc("tcTypeDoesNotInheritAttribute",",,,") ) /// Call this method once to validate that all known resources are valid; throws if not static member RunStartupValidation() = @@ -4385,7 +4451,7 @@ type internal SR private() = ignore(GetString("tastInvalidFormForPropertyGetter")) ignore(GetString("tastInvalidFormForPropertySetter")) ignore(GetString("tastUnexpectedByRef")) - ignore(GetString("tastValueMustBeLocalAndMutable")) + ignore(GetString("tastValueMustBeMutable")) ignore(GetString("tastInvalidMutationOfConstant")) ignore(GetString("tastValueHasBeenCopied")) ignore(GetString("tastRecursiveValuesMayNotBeInConstructionOfTuple")) @@ -4463,7 +4529,6 @@ type internal SR private() = ignore(GetString("FieldNotContainedLiteralsDiffer")) ignore(GetString("FieldNotContainedTypesDiffer")) ignore(GetString("typrelCannotResolveImplicitGenericInstantiation")) - ignore(GetString("typrelCannotResolveAmbiguityInOverloadedOperator")) ignore(GetString("typrelCannotResolveAmbiguityInPrintf")) ignore(GetString("typrelCannotResolveAmbiguityInEnum")) ignore(GetString("typrelCannotResolveAmbiguityInDelegate")) @@ -5608,7 +5673,7 @@ type internal SR private() = ignore(GetString("CallerMemberNameIsOverriden")) ignore(GetString("tcFixedNotAllowed")) ignore(GetString("tcCouldNotFindOffsetToStringData")) - ignore(GetString("chkNoByrefReturnOfLocal")) + ignore(GetString("chkNoByrefAddressOfLocal")) ignore(GetString("tcNamedActivePattern")) ignore(GetString("DefaultParameterValueNotAppropriateForArgument")) ignore(GetString("tcGlobalsSystemTypeNotFound")) @@ -5649,6 +5714,7 @@ type internal SR private() = ignore(GetString("keywordDescriptionLet")) ignore(GetString("keywordDescriptionLetBang")) ignore(GetString("keywordDescriptionMatch")) + ignore(GetString("keywordDescriptionMatchBang")) ignore(GetString("keywordDescriptionMember")) ignore(GetString("keywordDescriptionModule")) ignore(GetString("keywordDescriptionMutable")) @@ -5698,4 +5764,23 @@ type internal SR private() = ignore(GetString("notAFunctionButMaybeDeclaration")) ignore(GetString("ArgumentsInSigAndImplMismatch")) ignore(GetString("pickleUnexpectedNonZero")) + ignore(GetString("tcTupleMemberNotNormallyUsed")) + ignore(GetString("implicitlyDiscardedInSequenceExpression")) + ignore(GetString("implicitlyDiscardedSequenceInSequenceExpression")) + ignore(GetString("ilreadFileChanged")) + ignore(GetString("writeToReadOnlyByref")) + ignore(GetString("readOnlyAttributeOnStructWithMutableField")) + ignore(GetString("tcByrefReturnImplicitlyDereferenced")) + ignore(GetString("tcByRefLikeNotStruct")) + ignore(GetString("chkNoByrefAddressOfValueFromExpression")) + ignore(GetString("chkNoReturnOfLimitedSpan")) + ignore(GetString("chkNoWriteToLimitedSpan")) + ignore(GetString("tastValueMustBeLocal")) + ignore(GetString("tcIsReadOnlyNotStruct")) + ignore(GetString("chkStructsMayNotReturnAddressesOfContents")) + ignore(GetString("chkNoByrefLikeFunctionCall")) + ignore(GetString("chkNoSpanLikeVariable")) + ignore(GetString("chkNoSpanLikeValueFromExpression")) + ignore(GetString("tastCantTakeAddressOfExpression")) + ignore(GetString("tcTypeDoesNotInheritAttribute")) () diff --git a/src/buildfromsource/FSharp.Compiler.Private/FSComp.resx b/src/buildfromsource/FSharp.Compiler.Private/FSComp.resx index 71f965fc9fa..c34fee949bd 100644 --- a/src/buildfromsource/FSharp.Compiler.Private/FSComp.resx +++ b/src/buildfromsource/FSharp.Compiler.Private/FSComp.resx @@ -166,22 +166,22 @@ Add . for indexer access. - All elements of a list constructor expression must have the same type. This expression was expected to have type '{0}', but here has type '{1}'. + All elements of a list must be of the same type as the first element, which here is '{0}'. This element has type '{1}'. - All elements of an array constructor expression must have the same type. This expression was expected to have type '{0}', but here has type '{1}'. + All elements of an array must be of the same type as the first element, which here is '{0}'. This element has type '{1}'. - The 'if' expression is missing an 'else' branch. The 'then' branch has type '{0}'. Because 'if' is an expression, and not a statement, add an 'else' branch which returns a value of the same type. + This 'if' expression is missing an 'else' branch. Because 'if' is an expression, and not a statement, add an 'else' branch which also returns a value of type '{0}'. The 'if' expression needs to have type '{0}' to satisfy context type requirements. It currently has type '{1}'. - All branches of an 'if' expression must have the same type. This expression was expected to have type '{0}', but here has type '{1}'. + All branches of an 'if' expression must return values of the same type as the first branch, which here is '{0}'. This branch returns a value of type '{1}'. - All branches of a pattern match expression must have the same type. This expression was expected to have type '{0}', but here has type '{1}'. + All branches of a pattern match expression must return values of the same type as the first branch, which here is '{0}'. This branch returns a value of type '{1}'. A pattern match guard must be of type 'bool', but this 'when' expression is of type '{0}'. @@ -363,7 +363,7 @@ Unexpected use of a byref-typed variable - + A value must be mutable in order to mutate the contents or take the address of a value type, e.g. 'let mutable x = ...' @@ -597,9 +597,6 @@ The implicit instantiation of a generic construct at or near this point could not be resolved because it could resolve to multiple unrelated types, e.g. '{0}' and '{1}'. Consider using type annotations to resolve the ambiguity - - Could not resolve the ambiguity inherent in the use of the operator '{0}' at or near this program point. Consider using type annotations to resolve the ambiguity. - Could not resolve the ambiguity inherent in the use of a 'printf'-style format string @@ -3085,7 +3082,7 @@ This number is outside the allowable range for 32-bit floats - This is not a valid numeric literal. Valid numeric literals include 1, 0x1, 0b0001 (int), 1u (uint32), 1L (int64), 1UL (uint64), 1s (int16), 1y (sbyte), 1uy (byte), 1.0 (float), 1.0f (float32), 1.0m (decimal), 1I (BigInteger). + This is not a valid numeric literal. Valid numeric literals include 1, 0x1, 0b0001 (int), 1u (uint32), 1L (int64), 1UL (uint64), 1s (int16), 1us (uint16), 1y (sbyte), 1uy (byte), 1.0 (float), 1.0f (float32), 1.0m (decimal), 1I (BigInteger). This is not a valid byte literal @@ -3382,7 +3379,7 @@ No implementation files specified - An {0} specified version '{1}', but this value is invalid and has been ignored + The attribute {0} specified version '{1}', but this value is invalid and has been ignored Conflicting options specified: 'win32manifest' and 'win32res'. Only one of these can be used. @@ -3919,7 +3916,16 @@ Array method '{0}' is supplied by the runtime and cannot be directly used in code. For operations with array elements consider using family of GetArray/SetArray functions from LanguagePrimitives.IntrinsicFunctions module. - Union case/exception '{0}' does not have field named '{1}'. + The union case '{0}' does not have a field named '{1}'. + + + The exception '{0}' does not have a field named '{1}'. + + + Active patterns do not have fields. This syntax is invalid. + + + The constructor does not have a field named '{0}'. Union case/exception field '{0}' cannot be used more than once. @@ -4032,8 +4038,8 @@ Could not find method System.Runtime.CompilerServices.OffsetToStringData in references when building 'fixed' expression. - - The address of the variable '{0}' cannot be used at this point. A method or function may not return the address of this local value. + + The address of the variable '{0}' or a related expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope. {0} is an active pattern and cannot be treated as a discriminated union case with named fields. @@ -4150,11 +4156,14 @@ Used to associate, or bind, a name to a value or function. - Used in asynchronous workflows to bind a name to the result of an asynchronous computation, or, in other computation expressions, used to bind a name to a result, which is of the computation type. + Used in computation expressions to bind a name to the result of another computation expression. Used to branch by comparing a value to a pattern. + + Used in computation expressions to pattern match directly over the result of another computation expression. + Used to declare a property or method in an object type. @@ -4198,10 +4207,10 @@ Used to indicate that a function is recursive. - Used to indicate a value to provide as the result of a computation expression. + Used to provide a value for the result of the containing computation expression. - Used to indicate a computation expression that, when evaluated, provides the result of the containing computation expression. + Used to provide a value for the result of the containing computation expression, where that value itself comes from the result another computation expression. Used in query expressions to specify what fields or columns to extract. Note that this is a contextual keyword, which means that it is not actually a reserved word and it only acts like a keyword in appropriate context. @@ -4228,10 +4237,10 @@ Used to convert to a type that is higher in the inheritance chain. - Used instead of let for values that require Dispose to be called to free resources. + Used instead of let for values that implement IDisposable" - Used instead of let! in asynchronous workflows and other computation expressions for values that require Dispose to be called to free resources. + Used instead of let! in computation expressions for computation expression results that implement IDisposable. Used in a signature to indicate a value, or in a type to declare a member, in limited situations. @@ -4303,4 +4312,61 @@ An error occurred while reading the F# metadata of assembly '{0}'. A reserved construct was utilized. You may need to upgrade your F# compiler or use an earlier version of the assembly that doesn't make use of a specific construct. - \ No newline at end of file + + This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. + + + This expression returns a value of type '{0}' but is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to use the expression as a value in the sequence then use an explicit 'yield'. + + + This expression returns a value of type '{0}' but is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to use the expression as a value in the sequence then use an explicit 'yield!'. + + + The file '{0}' changed on disk unexpectedly, please reload. + + + The byref pointer is readonly, so this write is not permitted. + + + A ReadOnly attribute has been applied to a struct type with a mutable field. + + + A byref pointer returned by a function or method is implicitly dereferenced as of F# 4.5. To acquire the return value as a pointer, use the address-of operator, e.g. '&f(x)' or '&obj.Method(arg1, arg2)'. + + + A type annotated with IsByRefLike must also be a struct. Consider adding the [<Struct>] attribute to the type. + + + The address of a value returned from the expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + + + The Span or IsByRefLike expression cannot be returned from this function or method, because it is composed using elements that may escape their scope. + + + This value can't be assigned because the target '{0}' may refer to non-stack-local memory, while the expression being assigned is assessed to potentially refer to stack-local memory. This is to help prevent pointers to stack-bound memory escaping their scope. + + + A value defined in a module must be mutable in order to take its address, e.g. 'let mutable x = ...' + + + A type annotated with IsReadOnly must also be a struct. Consider adding the [<Struct>] attribute to the type. + + + Struct members cannot return the address of fields of the struct by reference + + + The function or method call cannot be used at this point, because one argument that is a byref of a non-stack-local Span or IsByRefLike type is used with another argument that is a stack-local Span or IsByRefLike type. This is to ensure the address of the local value does not escape its scope. + + + The Span or IsByRefLike variable '{0}' cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + + + A Span or IsByRefLike value returned from the expression cannot be used at ths point. This is to ensure the address of the local value does not escape its scope. + + + Cannot take the address of the value returned from the expression. Assign the returned value to a let-bound value before taking the address. + + + This type does not inherit Attribute, it will not work correctly with other .NET languages. + + diff --git a/src/buildfromsource/FSharp.Compiler.Private/FSIstrings.fs b/src/buildfromsource/FSharp.Compiler.Private/FSIstrings.fs index 94cd9e3b429..26307e2ef42 100644 --- a/src/buildfromsource/FSharp.Compiler.Private/FSIstrings.fs +++ b/src/buildfromsource/FSharp.Compiler.Private/FSIstrings.fs @@ -16,14 +16,14 @@ type internal SR private() = // BEGIN BOILERPLATE static let getCurrentAssembly () = - #if DNXCORE50 || NETSTANDARD1_5 || NETSTANDARD1_6 || NETCOREAPP1_0 + #if FX_RESHAPED_REFLECTION typeof.GetTypeInfo().Assembly #else System.Reflection.Assembly.GetExecutingAssembly() #endif static let getTypeInfo (t: System.Type) = - #if DNXCORE50 || NETSTANDARD1_5 || NETSTANDARD1_6 || NETCOREAPP1_0 + #if FX_RESHAPED_REFLECTION t.GetTypeInfo() #else t diff --git a/src/buildfromsource/FSharp.Compiler.Private/FSharp.Compiler.Private.fsproj b/src/buildfromsource/FSharp.Compiler.Private/FSharp.Compiler.Private.fsproj index 6e4a625372c..1668c425ebe 100644 --- a/src/buildfromsource/FSharp.Compiler.Private/FSharp.Compiler.Private.fsproj +++ b/src/buildfromsource/FSharp.Compiler.Private/FSharp.Compiler.Private.fsproj @@ -14,24 +14,22 @@ - - $(FSharpSourcesRoot)\..\loc\lcl\{Lang}\$(AssemblyName).dll.lcl - $(FSharpSourcesRoot)\..\loc\lci\$(AssemblyName).dll.lci - false - false - - - assemblyinfo.FSharp.Compiler.Private.dll.fs - + FSComp.resx - + FSStrings.resx + + Logger.fsi + + + Logger.fs + Reflection\reshapedreflection.fs @@ -44,10 +42,10 @@ ErrorText\sformat.fs - + ErrorText\sr.fsi - + ErrorText\sr.fs @@ -116,37 +114,37 @@ Utilities\bytes.fs - + Utilities\InternalCollections.fsi - + Utilities\InternalCollections.fs - + Utilities\QueueList.fs - + Utilities\lib.fs - + Utilities\rational.fsi - + Utilities\rational.fs - + ErrorLogging\range.fsi - + ErrorLogging\range.fs - + ErrorLogging\ErrorLogger.fs - + ErrorLogging\ErrorResolutionHints.fs - + ReferenceResolution\ReferenceResolver.fs @@ -232,7 +230,7 @@ CompilerLocation\CompilerLocationUtils.fs - + PrettyNaming\PrettyNaming.fs @@ -250,35 +248,35 @@ ILXErase\EraseUnions.fs - + --unicode --lexlib Internal.Utilities.Text.Lexing ParserAndUntypedAST\pplex.fsl - + --module Microsoft.FSharp.Compiler.PPParser --open Microsoft.FSharp.Compiler --internal --lexlib Internal.Utilities.Text.Lexing --parslib Internal.Utilities.Text.Parsing ParserAndUntypedAST\pppars.fsy - + --unicode --lexlib Internal.Utilities.Text.Lexing ParserAndUntypedAST\lex.fsl - + --module Microsoft.FSharp.Compiler.Parser --open Microsoft.FSharp.Compiler --internal --lexlib Internal.Utilities.Text.Lexing --parslib Internal.Utilities.Text.Parsing ParserAndUntypedAST\pars.fsy - + ParserAndUntypedAST\UnicodeLexing.fsi - + ParserAndUntypedAST\UnicodeLexing.fs - + ParserAndUntypedAST\layout.fsi - + ParserAndUntypedAST\layout.fs - + ParserAndUntypedAST\ast.fs @@ -287,10 +285,10 @@ ParserAndUntypedAST\pars.fs - + ParserAndUntypedAST\lexhelp.fsi - + ParserAndUntypedAST\lexhelp.fs @@ -299,309 +297,309 @@ ParserAndUntypedAST\lex.fs - + ParserAndUntypedAST\lexfilter.fs - + TypedAST\tainted.fsi - + TypedAST\tainted.fs - + TypedAST\ExtensionTyping.fsi - + TypedAST\ExtensionTyping.fs - + TypedAST\QuotationPickler.fsi - + TypedAST\QuotationPickler.fs - + TypedAST\tast.fs - + TypedAST\TcGlobals.fs - + TypedAST\TastOps.fsi - + TypedAST\TastOps.fs - + TypedAST\TastPickle.fsi - + TypedAST\TastPickle.fs - + Logic\import.fsi - + Logic\import.fs - + Logic\infos.fs - + Logic\AccessibilityLogic.fs - + Logic\AttributeChecking.fs - + Logic\InfoReader.fs - + Logic\NicePrint.fs - + Logic\AugmentWithHashCompare.fsi - + Logic\AugmentWithHashCompare.fs - + Logic\NameResolution.fsi - + Logic\NameResolution.fs - + Logic\TypeRelations.fs - + Logic\SignatureConformance.fs - + Logic\MethodOverrides.fs - + Logic\MethodCalls.fs - + Logic\PatternMatchCompilation.fsi - + Logic\PatternMatchCompilation.fs - + Logic\ConstraintSolver.fsi - + Logic\ConstraintSolver.fs - + Logic\CheckFormatStrings.fsi - + Logic\CheckFormatStrings.fs - + Logic\FindUnsolved.fs - + Logic\QuotationTranslator.fsi - + Logic\QuotationTranslator.fs - + Logic\PostInferenceChecks.fsi - + Logic\PostInferenceChecks.fs - + Logic\TypeChecker.fsi - + Logic\TypeChecker.fs - + Optimize\Optimizer.fsi - + Optimize\Optimizer.fs - + Optimize\DetupleArgs.fsi - + Optimize\DetupleArgs.fs - + Optimize\InnerLambdasToTopLevelFuncs.fsi - + Optimize\InnerLambdasToTopLevelFuncs.fs - + Optimize\LowerCallsAndSeqs.fs - + Optimize\autobox.fs - + CodeGen\IlxGen.fsi - + CodeGen\IlxGen.fs - + Driver\CompileOps.fsi - + Driver\CompileOps.fs - + Driver\CompileOptions.fsi - + Driver\CompileOptions.fs - + Driver\fsc.fsi - + Driver\fsc.fs - + Symbols/SymbolHelpers.fsi - + Symbols/SymbolHelpers.fs - + Symbols/Symbols.fsi - + Symbols/Symbols.fs - + Symbols/Exprs.fsi - + Symbols/Exprs.fs - + Symbols/SymbolPatterns.fsi - + Symbols/SymbolPatterns.fs - + Service/IncrementalBuild.fsi - + Service/IncrementalBuild.fs - + Service/Reactor.fsi - + Service/Reactor.fs - + Service/ServiceConstants.fs - + Service/ServiceDeclarationLists.fsi - + Service/ServiceDeclarationLists.fs - + Service/ServiceLexing.fsi - + Service/ServiceLexing.fs - + Service/ServiceParseTreeWalk.fs - + Service/ServiceNavigation.fsi - + Service/ServiceNavigation.fs - + Service/ServiceParamInfoLocations.fsi - + Service/ServiceParamInfoLocations.fs - + Service/ServiceUntypedParse.fsi - + Service/ServiceUntypedParse.fs - + Service/ServiceAssemblyContent.fsi - + Service/ServiceAssemblyContent.fs - + Service/ServiceXmlDocParser.fsi - + Service/ServiceXmlDocParser.fs Service/reshapedmsbuild.fs - + Service/SimulatedMSBuildReferenceResolver.fs - + Service/ExternalSymbol.fsi - + Service/ExternalSymbol.fs - + Service/QuickParse.fsi - + Service/QuickParse.fs - + Service/service.fsi - + Service/service.fs - + Service/ServiceInterfaceStubGenerator.fsi - + Service/ServiceInterfaceStubGenerator.fs - + Service/ServiceStructure.fsi - + Service/ServiceStructure.fs - + Service/ServiceAnalysis.fsi - + Service/ServiceAnalysis.fs @@ -609,47 +607,44 @@ FSIstrings.resx - + InteractiveSession\fsi.fsi - + InteractiveSession\fsi.fs - - Misc/InternalsVisibleTo.fs - - + Misc/MSBuildReferenceResolver.fs - + Misc/LegacyHostedCompilerForTesting.fs - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + diff --git a/src/buildfromsource/FSharp.Compiler.nuget/FSharp.Compiler.nuget.fsproj b/src/buildfromsource/FSharp.Compiler.nuget/FSharp.Compiler.nuget.fsproj index 3737779f560..92144d8db07 100644 --- a/src/buildfromsource/FSharp.Compiler.nuget/FSharp.Compiler.nuget.fsproj +++ b/src/buildfromsource/FSharp.Compiler.nuget/FSharp.Compiler.nuget.fsproj @@ -4,7 +4,7 @@ Exe - netcoreapp1.0 + netstandard2.0 Microsoft.FSharp.Compiler $(NoWarn);45;55;62;75;1204 true @@ -20,7 +20,7 @@ Microsoft and F# Software Foundation Visual F# Compiler FSharp functional programming -rc-$(BuildRevision.Trim())-0 - 4.2.0$(PreReleaseSuffix) + 10.2.0$(PreReleaseSuffix) -prop "licenseUrl=$(PackageLicenceUrl)" -prop "version=$(PackageVersion)" -prop "authors=$(PackageAuthors)" -prop "projectUrl=$(PackageProjectUrl)" -prop "tags=$(PackageTags)" diff --git a/src/buildfromsource/FSharp.Core/AssemblyInfo.fs b/src/buildfromsource/FSharp.Core/AssemblyInfo.fs new file mode 100644 index 00000000000..91e66830260 --- /dev/null +++ b/src/buildfromsource/FSharp.Core/AssemblyInfo.fs @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace Microsoft.FSharp +open System.Reflection +open System.Runtime.InteropServices + +[] +[] +[] +[] +[] +[] + +#if PORTABLE +[] +[] +#endif + +[] +[] +[] +do() + diff --git a/src/buildfromsource/FSharp.Core/FSharp.Core.fsproj b/src/buildfromsource/FSharp.Core/FSharp.Core.fsproj index a56ae2a3547..29030516ebd 100644 --- a/src/buildfromsource/FSharp.Core/FSharp.Core.fsproj +++ b/src/buildfromsource/FSharp.Core/FSharp.Core.fsproj @@ -8,7 +8,6 @@ FSharp.Core $(NoWarn);45;55;62;75;1204 true - true $(DefineConstants);FSHARP_CORE $(OtherFlags) --warnon:1182 --compiling-fslib --compiling-fslib-40 --maxerrors:20 --extraoptimizationloops:1 @@ -20,12 +19,12 @@ FSCore.resx - + Primitives/prim-types-prelude.fsi - - + + Primitives/prim-types-prelude.fs - + Primitives/SR.fs @@ -122,12 +121,6 @@ Reflection/reflect.fs - - Event/event.fsi - - - Event/event.fs - Numerics/n.fsi @@ -164,11 +157,35 @@ NativeInterop/nativeptr.fs - - Async/control.fsi + + Control/event.fsi + + + Control/event.fs - - Async/control.fs + + Control/async.fsi + + + Control/async.fs + + + Control/eventmodule.fsi + + + Control/eventmodule.fs + + + Control/observable.fsi + + + Control/observable.fs + + + MailboxProcessor/mailbox.fsi + + + MailboxProcessor/mailbox.fs Queries/Linq.fsi @@ -197,17 +214,15 @@ Extras/fslib-extra-pervasives.fs - - assemblyinfo.FSharp.Core.dll.fs - + - - - - - + + + + + diff --git a/src/buildfromsource/Fsc/AssemblyInfo.fs b/src/buildfromsource/Fsc/AssemblyInfo.fs new file mode 100644 index 00000000000..42f7feb94b9 --- /dev/null +++ b/src/buildfromsource/Fsc/AssemblyInfo.fs @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace Microsoft.FSharp +open System.Reflection +open System.Runtime.InteropServices + +[] +[] +[] +[] +[] +[] +[] +[] +[] +do() diff --git a/src/buildfromsource/Fsc/Fsc.fsproj b/src/buildfromsource/Fsc/Fsc.fsproj index 572a8c8efaf..d1b1bfa2f80 100644 --- a/src/buildfromsource/Fsc/Fsc.fsproj +++ b/src/buildfromsource/Fsc/Fsc.fsproj @@ -4,20 +4,18 @@ Exe - netcoreapp1.0 + netstandard2.0 .exe fsc $(NoWarn);45;55;62;75;1204 true - $(DefineConstants);COMPILER $(OtherFlags) --maxerrors:20 --extraoptimizationloops:1 - - - Resources/assemblyinfo.fsc.exe.fs + + Resources/AssemblyInfo.fs fscmain.fs @@ -33,9 +31,12 @@ - - - + + + + + + diff --git a/src/buildfromsource/Fsi/AssemblyInfo.fs b/src/buildfromsource/Fsi/AssemblyInfo.fs new file mode 100644 index 00000000000..2103574e816 --- /dev/null +++ b/src/buildfromsource/Fsi/AssemblyInfo.fs @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace Microsoft.FSharp +open System.Reflection +[] +[] +[] +[] +[] +[] +[] +[] +do() diff --git a/src/buildfromsource/Fsi/Fsi.fsproj b/src/buildfromsource/Fsi/Fsi.fsproj index 9ecd22b7265..56390954225 100644 --- a/src/buildfromsource/Fsi/Fsi.fsproj +++ b/src/buildfromsource/Fsi/Fsi.fsproj @@ -4,12 +4,12 @@ Exe - netcoreapp1.0 + netstandard2.0 .exe fsi $(NoWarn);45;55;62;75;1204 true - $(DefineConstants);BUILD_FROM_SOURCE;COMPILER + $(DefineConstants);BUILD_FROM_SOURCE $(OtherFlags) --warnon:1182 --maxerrors:20 --extraoptimizationloops:1 @@ -19,10 +19,7 @@ $(FsiDir)\fsi.res - - assemblyinfo.fsi.exe.fs - - + console.fs @@ -38,13 +35,16 @@ - - - - - - - + + + + + + + + + + diff --git a/src/buildfromsource/targets/PackageVersions.props b/src/buildfromsource/targets/PackageVersions.props new file mode 100644 index 00000000000..e4f39318bac --- /dev/null +++ b/src/buildfromsource/targets/PackageVersions.props @@ -0,0 +1,36 @@ + + + + + + 1.4.0 + 4.3.0 + 4.3.0 + 4.3.0 + 4.3.0 + 4.3.0 + 4.3.0 + 1.5.0 + 4.3.0 + 4.3.0 + 4.3.0 + 4.3.0 + 4.3.0 + 4.3.0 + 4.3.0 + 4.3.0 + 4.4.0 + + + 15.1.548 + 15.1.548 + 15.1.548 + 15.1.548 + 4.3.0 + + + + + + + diff --git a/src/buildtools/fslex/fslexast.fs b/src/buildtools/fslex/fslexast.fs index 96619645dd8..db9727cb970 100644 --- a/src/buildtools/fslex/fslexast.fs +++ b/src/buildtools/fslex/fslexast.fs @@ -1,6 +1,6 @@ (* (c) Microsoft Corporation 2005-2008. *) -module FsLexYacc.FsLex.AST +module internal FsLexYacc.FsLex.AST open System.Collections.Generic open Microsoft.FSharp.Text diff --git a/src/buildtools/fssrgen/fssrgen.fsx b/src/buildtools/fssrgen/fssrgen.fsx index 0bee9b79e11..4fe5bbb38e1 100644 --- a/src/buildtools/fssrgen/fssrgen.fsx +++ b/src/buildtools/fssrgen/fssrgen.fsx @@ -229,14 +229,14 @@ let StringBoilerPlate filename = // BEGIN BOILERPLATE static let getCurrentAssembly () = - #if DNXCORE50 || NETSTANDARD1_5 || NETSTANDARD1_6 || NETCOREAPP1_0 + #if FX_RESHAPED_REFLECTION typeof.GetTypeInfo().Assembly #else System.Reflection.Assembly.GetExecutingAssembly() #endif static let getTypeInfo (t: System.Type) = - #if DNXCORE50 || NETSTANDARD1_5 || NETSTANDARD1_6 || NETCOREAPP1_0 + #if FX_RESHAPED_REFLECTION t.GetTypeInfo() #else t diff --git a/src/buildtools/fsyacc/fsyaccast.fs b/src/buildtools/fsyacc/fsyaccast.fs index deb2d3ef8a1..f4edc399723 100644 --- a/src/buildtools/fsyacc/fsyaccast.fs +++ b/src/buildtools/fsyacc/fsyaccast.fs @@ -39,7 +39,7 @@ type Symbols = Symbol list //--------------------------------------------------------------------- // Output Raw Parser Spec AST -let StringOfSym sym = match sym with Terminal s -> "'" ^ s ^ "'" | NonTerminal s -> s +let StringOfSym sym = match sym with Terminal s -> "'" + s + "'" | NonTerminal s -> s let OutputSym os sym = fprintf os "%s" (StringOfSym sym) @@ -353,7 +353,7 @@ let CompilerLalrParserSpec logf (spec : ProcessedParserSpec) = stopWatch.Start() // Augment the grammar - let fakeStartNonTerminals = spec.StartSymbols |> List.map(fun nt -> "_start"^nt) + let fakeStartNonTerminals = spec.StartSymbols |> List.map(fun nt -> "_start" + nt) let nonTerminals = fakeStartNonTerminals@spec.NonTerminals let endOfInputTerminal = "$$" let dummyLookahead = "#" @@ -466,7 +466,7 @@ let CompilerLalrParserSpec logf (spec : ProcessedParserSpec) = let IsStartItem item0 = fakeStartNonTerminalsSet.Contains(ntIdx_of_item0 item0) let IsKernelItem item0 = (IsStartItem item0 || dotIdx_of_item0 item0 <> 0) - let StringOfSym sym = match sym with PTerminal s -> "'" ^ termTab.OfIndex s ^ "'" | PNonTerminal s -> ntTab.OfIndex s + let StringOfSym sym = match sym with PTerminal s -> "'" + termTab.OfIndex s + "'" | PNonTerminal s -> ntTab.OfIndex s let OutputSym os sym = fprintf os "%s" (StringOfSym sym) diff --git a/src/fsharp/AccessibilityLogic.fs b/src/fsharp/AccessibilityLogic.fs index c69d00cd0a0..dcd8d5d801e 100644 --- a/src/fsharp/AccessibilityLogic.fs +++ b/src/fsharp/AccessibilityLogic.fs @@ -3,11 +3,8 @@ /// The basic logic of private/internal/protected/InternalsVisibleTo/public accessibility module internal Microsoft.FSharp.Compiler.AccessibilityLogic -open Internal.Utilities -open Microsoft.FSharp.Compiler.AbstractIL open Microsoft.FSharp.Compiler.AbstractIL.IL open Microsoft.FSharp.Compiler -open Microsoft.FSharp.Compiler.Ast open Microsoft.FSharp.Compiler.ErrorLogger open Microsoft.FSharp.Compiler.Infos open Microsoft.FSharp.Compiler.Tast @@ -50,7 +47,7 @@ type AccessorDomain = | AccessibleFromSomewhere -> 4 static member CustomEquals(g:TcGlobals, ad1:AccessorDomain, ad2:AccessorDomain) = match ad1, ad2 with - | AccessibleFrom(cs1,tc1), AccessibleFrom(cs2,tc2) -> (cs1 = cs2) && (match tc1,tc2 with None,None -> true | Some tc1, Some tc2 -> tyconRefEq g tc1 tc2 | _ -> false) + | AccessibleFrom(cs1, tc1), AccessibleFrom(cs2, tc2) -> (cs1 = cs2) && (match tc1, tc2 with None, None -> true | Some tc1, Some tc2 -> tyconRefEq g tc1 tc2 | _ -> false) | AccessibleFromEverywhere, AccessibleFromEverywhere -> true | AccessibleFromSomeFSharpCode, AccessibleFromSomeFSharpCode -> true | AccessibleFromSomewhere, AccessibleFromSomewhere -> true @@ -62,7 +59,7 @@ let IsAccessible ad taccess = | AccessibleFromEverywhere -> canAccessFromEverywhere taccess | AccessibleFromSomeFSharpCode -> canAccessFromSomewhere taccess | AccessibleFromSomewhere -> true - | AccessibleFrom (cpaths,_tcrefViewedFromOption) -> + | AccessibleFrom (cpaths, _tcrefViewedFromOption) -> List.exists (canAccessFrom taccess) cpaths /// Indicates if an IL member is accessible (ignoring its enclosing type) @@ -76,7 +73,7 @@ let private IsILMemberAccessible g amap m (tcrefOfViewedItem : TyconRef) ad acce access = ILMemberAccess.Family || access = ILMemberAccess.FamilyOrAssembly) - | AccessibleFrom (cpaths,tcrefViewedFromOption) -> + | AccessibleFrom (cpaths, tcrefViewedFromOption) -> let accessibleByFamily = ((access = ILMemberAccess.Family || @@ -118,14 +115,14 @@ let private IsILTypeDefAccessible (amap : Import.ImportMap) m ad encTyconRefOpt | AccessibleFromSomeFSharpCode | AccessibleFrom _ -> tdef.Access = ILTypeDefAccess.Public -/// Indicates if a TyconRef is visible through the AccessibleFrom(cpaths,_). +/// Indicates if a TyconRef is visible through the AccessibleFrom(cpaths, _). /// Note that InternalsVisibleTo extends those cpaths. let private IsTyconAccessibleViaVisibleTo ad (tcrefOfViewedItem:TyconRef) = match ad with | AccessibleFromEverywhere | AccessibleFromSomewhere | AccessibleFromSomeFSharpCode -> false - | AccessibleFrom (cpaths,_tcrefViewedFromOption) -> + | AccessibleFrom (cpaths, _tcrefViewedFromOption) -> canAccessFromOneOf cpaths tcrefOfViewedItem.CompilationPath /// Indicates if given IL based TyconRef is accessible. If TyconRef is nested then we'll @@ -165,8 +162,8 @@ let private IsILTypeInfoAccessible amap m ad (tcrefOfViewedItem : TyconRef) = check None (enc @ [tdef]) /// Indicates if an IL member associated with the given ILType is accessible -let private IsILTypeAndMemberAccessible g amap m adType ad (ILTypeInfo(tcrefOfViewedItem, _, _, _)) access = - IsILTypeInfoAccessible amap m adType tcrefOfViewedItem && IsILMemberAccessible g amap m tcrefOfViewedItem ad access +let private IsILTypeAndMemberAccessible g amap m adType ad (ty: ILTypeInfo) access = + IsILTypeInfoAccessible amap m adType ty.TyconRefOfRawMetadata && IsILMemberAccessible g amap m ty.TyconRefOfRawMetadata ad access /// Indicates if an entity is accessible let IsEntityAccessible amap m ad (tcref:TyconRef) = @@ -179,7 +176,7 @@ let IsEntityAccessible amap m ad (tcref:TyconRef) = let CheckTyconAccessible amap m ad tcref = let res = IsEntityAccessible amap m ad tcref if not res then - errorR(Error(FSComp.SR.typeIsNotAccessible tcref.DisplayName,m)) + errorR(Error(FSComp.SR.typeIsNotAccessible tcref.DisplayName, m)) res /// Indicates if a type definition and its representation contents are accessible @@ -192,14 +189,15 @@ let CheckTyconReprAccessible amap m ad tcref = CheckTyconAccessible amap m ad tcref && (let res = IsAccessible ad tcref.TypeReprAccessibility if not res then - errorR (Error (FSComp.SR.unionCasesAreNotAccessible tcref.DisplayName,m)) + errorR (Error (FSComp.SR.unionCasesAreNotAccessible tcref.DisplayName, m)) res) /// Indicates if a type is accessible (both definition and instantiation) let rec IsTypeAccessible g amap m ad ty = - not (isAppTy g ty) || - let tcref,tinst = destAppTy g ty - IsEntityAccessible amap m ad tcref && IsTypeInstAccessible g amap m ad tinst + match tryAppTy g ty with + | ValueNone -> true + | ValueSome(tcref, tinst) -> + IsEntityAccessible amap m ad tcref && IsTypeInstAccessible g amap m ad tinst and IsTypeInstAccessible g amap m ad tinst = match tinst with @@ -213,7 +211,7 @@ let IsProvidedMemberAccessible (amap:Import.ImportMap) m ad ty access = if not isTyAccessible then false else not (isAppTy g ty) || - let tcrefOfViewedItem,_ = destAppTy g ty + let tcrefOfViewedItem = tcrefOfAppTy g ty IsILMemberAccessible g amap m tcrefOfViewedItem ad access /// Compute the accessibility of a provided member @@ -227,14 +225,14 @@ let ComputeILAccess isPublic isFamily isFamilyOrAssembly isFamilyAndAssembly = /// IndiCompute the accessibility of a provided member let IsILFieldInfoAccessible g amap m ad x = match x with - | ILFieldInfo (tinfo,fd) -> IsILTypeAndMemberAccessible g amap m ad ad tinfo fd.Access + | ILFieldInfo (tinfo, fd) -> IsILTypeAndMemberAccessible g amap m ad ad tinfo fd.Access #if !NO_EXTENSIONTYPING - | ProvidedField (amap, tpfi, m) as pfi -> + | ProvidedField (amap, tpfi, m) -> let access = tpfi.PUntaint((fun fi -> ComputeILAccess fi.IsPublic fi.IsFamily fi.IsFamilyOrAssembly fi.IsFamilyAndAssembly), m) - IsProvidedMemberAccessible amap m ad pfi.EnclosingType access + IsProvidedMemberAccessible amap m ad x.ApparentEnclosingType access #endif -let GetILAccessOfILEventInfo (ILEventInfo (tinfo,edef)) = +let GetILAccessOfILEventInfo (ILEventInfo (tinfo, edef)) = (resolveILMethodRef tinfo.RawMetadata edef.AddMethod).Access let IsILEventInfoAccessible g amap m ad einfo = @@ -243,10 +241,10 @@ let IsILEventInfoAccessible g amap m ad einfo = let private IsILMethInfoAccessible g amap m adType ad ilminfo = match ilminfo with - | ILMethInfo (_,typ,None,mdef,_) -> IsILTypeAndMemberAccessible g amap m adType ad (ILTypeInfo.FromType g typ) mdef.Access - | ILMethInfo (_,_,Some declaringTyconRef,mdef,_) -> IsILMemberAccessible g amap m declaringTyconRef ad mdef.Access + | ILMethInfo (_, ty, None, mdef, _) -> IsILTypeAndMemberAccessible g amap m adType ad (ILTypeInfo.FromType g ty) mdef.Access + | ILMethInfo (_, _, Some declaringTyconRef, mdef, _) -> IsILMemberAccessible g amap m declaringTyconRef ad mdef.Access -let GetILAccessOfILPropInfo (ILPropInfo(tinfo,pdef)) = +let GetILAccessOfILPropInfo (ILPropInfo(tinfo, pdef)) = let tdef = tinfo.RawMetadata let ilAccess = match pdef.GetMethod with @@ -266,7 +264,7 @@ let IsValAccessible ad (vref:ValRef) = let CheckValAccessible m ad (vref:ValRef) = if not (IsValAccessible ad vref) then - errorR (Error (FSComp.SR.valueIsNotAccessible vref.DisplayName,m)) + errorR (Error (FSComp.SR.valueIsNotAccessible vref.DisplayName, m)) let IsUnionCaseAccessible amap m ad (ucref:UnionCaseRef) = IsTyconReprAccessible amap m ad ucref.TyconRef && @@ -276,7 +274,7 @@ let CheckUnionCaseAccessible amap m ad (ucref:UnionCaseRef) = CheckTyconReprAccessible amap m ad ucref.TyconRef && (let res = IsAccessible ad ucref.UnionCase.Accessibility if not res then - errorR (Error (FSComp.SR.unionCaseIsNotAccessible ucref.CaseName,m)) + errorR (Error (FSComp.SR.unionCaseIsNotAccessible ucref.CaseName, m)) res) let IsRecdFieldAccessible amap m ad (rfref:RecdFieldRef) = @@ -287,7 +285,7 @@ let CheckRecdFieldAccessible amap m ad (rfref:RecdFieldRef) = CheckTyconReprAccessible amap m ad rfref.TyconRef && (let res = IsAccessible ad rfref.RecdField.Accessibility if not res then - errorR (Error (FSComp.SR.fieldIsNotAccessible rfref.FieldName,m)) + errorR (Error (FSComp.SR.fieldIsNotAccessible rfref.FieldName, m)) res) let CheckRecdFieldInfoAccessible amap m ad (rfinfo:RecdFieldInfo) = @@ -295,7 +293,7 @@ let CheckRecdFieldInfoAccessible amap m ad (rfinfo:RecdFieldInfo) = let CheckILFieldInfoAccessible g amap m ad finfo = if not (IsILFieldInfoAccessible g amap m ad finfo) then - errorR (Error (FSComp.SR.structOrClassFieldIsNotAccessible finfo.FieldName,m)) + errorR (Error (FSComp.SR.structOrClassFieldIsNotAccessible finfo.FieldName, m)) /// Uses a separate accessibility domains for containing type and method itself /// This makes sense cases like @@ -310,21 +308,21 @@ let CheckILFieldInfoAccessible g amap m ad finfo = /// when calling x.SomeMethod() we need to use 'adTyp' do verify that type of x is accessible from C /// and 'ad' to determine accessibility of SomeMethod. /// I.e when calling x.Public() and x.Protected() -in both cases first check should succeed and second - should fail in the latter one. -let IsTypeAndMethInfoAccessible amap m adTyp ad = function - | ILMeth (g,x,_) -> IsILMethInfoAccessible g amap m adTyp ad x - | FSMeth (_,_,vref,_) -> IsValAccessible ad vref - | DefaultStructCtor(g,typ) -> IsTypeAccessible g amap m ad typ +let IsTypeAndMethInfoAccessible amap m accessDomainTy ad = function + | ILMeth (g, x, _) -> IsILMethInfoAccessible g amap m accessDomainTy ad x + | FSMeth (_, _, vref, _) -> IsValAccessible ad vref + | DefaultStructCtor(g, ty) -> IsTypeAccessible g amap m ad ty #if !NO_EXTENSIONTYPING - | ProvidedMeth(amap,tpmb,_,m) as etmi -> + | ProvidedMeth(amap, tpmb, _, m) as etmi -> let access = tpmb.PUntaint((fun mi -> ComputeILAccess mi.IsPublic mi.IsFamily mi.IsFamilyOrAssembly mi.IsFamilyAndAssembly), m) - IsProvidedMemberAccessible amap m ad etmi.EnclosingType access + IsProvidedMemberAccessible amap m ad etmi.ApparentEnclosingType access #endif let IsMethInfoAccessible amap m ad minfo = IsTypeAndMethInfoAccessible amap m ad ad minfo let IsPropInfoAccessible g amap m ad = function - | ILProp (_,x) -> IsILPropInfoAccessible g amap m ad x - | FSProp (_,_,Some vref,_) - | FSProp (_,_,_,Some vref) -> IsValAccessible ad vref + | ILProp ilpinfo -> IsILPropInfoAccessible g amap m ad ilpinfo + | FSProp (_, _, Some vref, _) + | FSProp (_, _, _, Some vref) -> IsValAccessible ad vref #if !NO_EXTENSIONTYPING | ProvidedProp (amap, tppi, m) as pp-> let access = @@ -337,12 +335,10 @@ let IsPropInfoAccessible g amap m ad = function | None -> tryGetILAccessForProvidedMethodBase(ppi.GetSetMethod()) | x -> x), m) defaultArg a ILMemberAccess.Public - IsProvidedMemberAccessible amap m ad pp.EnclosingType access + IsProvidedMemberAccessible amap m ad pp.ApparentEnclosingType access #endif | _ -> false let IsFieldInfoAccessible ad (rfref:RecdFieldInfo) = IsAccessible ad rfref.RecdField.Accessibility - - diff --git a/src/fsharp/AttributeChecking.fs b/src/fsharp/AttributeChecking.fs index d3902075119..3be4a3a0705 100644 --- a/src/fsharp/AttributeChecking.fs +++ b/src/fsharp/AttributeChecking.fs @@ -4,14 +4,11 @@ /// on items from name resolution module internal Microsoft.FSharp.Compiler.AttributeChecking -open Internal.Utilities -open Microsoft.FSharp.Compiler.AbstractIL +open System.Collections.Generic open Microsoft.FSharp.Compiler.AbstractIL.IL open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library open Microsoft.FSharp.Compiler -open Microsoft.FSharp.Compiler.AccessibilityLogic -open Microsoft.FSharp.Compiler.Ast open Microsoft.FSharp.Compiler.Range open Microsoft.FSharp.Compiler.ErrorLogger open Microsoft.FSharp.Compiler.Infos @@ -55,7 +52,7 @@ let rec private evalILAttribElem e = let rec private evalFSharpAttribArg g e = match e with - | Expr.Const(c,_,_) -> + | Expr.Const(c, _, _) -> match c with | Const.Bool b -> box b | Const.SByte i -> box i @@ -72,7 +69,7 @@ let rec private evalFSharpAttribArg g e = | Const.Zero -> null | Const.String s -> box s | _ -> fail() - | Expr.Op (TOp.Array,_,a,_) -> box [| for i in a -> evalFSharpAttribArg g i |] + | Expr.Op (TOp.Array, _, a, _) -> box [| for i in a -> evalFSharpAttribArg g i |] | TypeOfExpr g ty -> box ty // TODO: | TypeDefOfExpr g ty | _ -> fail() @@ -83,31 +80,31 @@ type AttribInfo = member x.TyconRef = match x with - | FSAttribInfo(_g,Attrib(tcref,_,_,_,_,_,_)) -> tcref + | FSAttribInfo(_g, Attrib(tcref, _, _, _, _, _, _)) -> tcref | ILAttribInfo (g, amap, scoref, a, m) -> - let ty = ImportILType scoref amap m [] a.Method.EnclosingType + let ty = ImportILType scoref amap m [] a.Method.DeclaringType tcrefOfAppTy g ty member x.ConstructorArguments = match x with - | FSAttribInfo(g,Attrib(_,_,unnamedArgs,_,_,_,_)) -> + | FSAttribInfo(g, Attrib(_, _, unnamedArgs, _, _, _, _)) -> unnamedArgs - |> List.map (fun (AttribExpr(origExpr,evaluatedExpr)) -> + |> List.map (fun (AttribExpr(origExpr, evaluatedExpr)) -> let ty = tyOfExpr g origExpr let obj = evalFSharpAttribArg g evaluatedExpr - ty,obj) + ty, obj) | ILAttribInfo (g, amap, scoref, cattr, m) -> let parms, _args = decodeILAttribData g.ilg cattr - [ for (argty,argval) in Seq.zip cattr.Method.FormalArgTypes parms -> + [ for (argty, argval) in Seq.zip cattr.Method.FormalArgTypes parms -> let ty = ImportILType scoref amap m [] argty let obj = evalILAttribElem argval - ty,obj ] + ty, obj ] member x.NamedArguments = match x with - | FSAttribInfo(g,Attrib(_,_,_,namedArgs,_,_,_)) -> + | FSAttribInfo(g, Attrib(_, _, _, namedArgs, _, _, _)) -> namedArgs - |> List.map (fun (AttribNamedArg(nm,_,isField,AttribExpr(origExpr,evaluatedExpr))) -> + |> List.map (fun (AttribNamedArg(nm, _, isField, AttribExpr(origExpr, evaluatedExpr))) -> let ty = tyOfExpr g origExpr let obj = evalFSharpAttribArg g evaluatedExpr ty, nm, isField, obj) @@ -133,12 +130,12 @@ let GetAttribInfosOfEntity g amap m (tcref:TyconRef) = #if !NO_EXTENSIONTYPING // TODO: provided attributes | ProvidedTypeMetadata _info -> [] - //let provAttribs = info.ProvidedType.PApply((fun a -> (a :> IProvidedCustomAttributeProvider)),m) - //match provAttribs.PUntaint((fun a -> a. .GetAttributeConstructorArgs(provAttribs.TypeProvider.PUntaintNoFailure(id), atref.FullName)),m) with + //let provAttribs = info.ProvidedType.PApply((fun a -> (a :> IProvidedCustomAttributeProvider)), m) + //match provAttribs.PUntaint((fun a -> a. .GetAttributeConstructorArgs(provAttribs.TypeProvider.PUntaintNoFailure(id), atref.FullName)), m) with //| Some args -> f3 args //| None -> None #endif - | ILTypeMetadata (TILObjectReprData(scoref,_,tdef)) -> + | ILTypeMetadata (TILObjectReprData(scoref, _, tdef)) -> tdef.CustomAttrs |> AttribInfosOfIL g amap scoref m | FSharpOrArrayOrByrefOrTupleOrExnTypeMetadata -> tcref.Attribs |> List.map (fun a -> FSAttribInfo (g, a)) @@ -146,21 +143,21 @@ let GetAttribInfosOfEntity g amap m (tcref:TyconRef) = let GetAttribInfosOfMethod amap m minfo = match minfo with - | ILMeth (g,ilminfo,_) -> ilminfo.RawMetadata.CustomAttrs |> AttribInfosOfIL g amap ilminfo.MetadataScope m - | FSMeth (g,_,vref,_) -> vref.Attribs |> AttribInfosOfFS g + | ILMeth (g, ilminfo, _) -> ilminfo.RawMetadata.CustomAttrs |> AttribInfosOfIL g amap ilminfo.MetadataScope m + | FSMeth (g, _, vref, _) -> vref.Attribs |> AttribInfosOfFS g | DefaultStructCtor _ -> [] #if !NO_EXTENSIONTYPING // TODO: provided attributes - | ProvidedMeth (_,_mi,_,_m) -> + | ProvidedMeth (_, _mi, _, _m) -> [] #endif let GetAttribInfosOfProp amap m pinfo = match pinfo with - | ILProp(g,ilpinfo) -> ilpinfo.RawMetadata.CustomAttrs |> AttribInfosOfIL g amap ilpinfo.ILTypeInfo.ILScopeRef m - | FSProp(g,_,Some vref,_) - | FSProp(g,_,_,Some vref) -> vref.Attribs |> AttribInfosOfFS g + | ILProp ilpinfo -> ilpinfo.RawMetadata.CustomAttrs |> AttribInfosOfIL ilpinfo.TcGlobals amap ilpinfo.ILTypeInfo.ILScopeRef m + | FSProp(g, _, Some vref, _) + | FSProp(g, _, _, Some vref) -> vref.Attribs |> AttribInfosOfFS g | FSProp _ -> failwith "GetAttribInfosOfProp: unreachable" #if !NO_EXTENSIONTYPING // TODO: provided attributes @@ -169,7 +166,7 @@ let GetAttribInfosOfProp amap m pinfo = let GetAttribInfosOfEvent amap m einfo = match einfo with - | ILEvent(g, x) -> x.RawMetadata.CustomAttrs |> AttribInfosOfIL g amap x.ILTypeInfo.ILScopeRef m + | ILEvent ileinfo -> ileinfo.RawMetadata.CustomAttrs |> AttribInfosOfIL einfo.TcGlobals amap ileinfo.ILTypeInfo.ILScopeRef m | FSEvent(_, pi, _vref1, _vref2) -> GetAttribInfosOfProp amap m pi #if !NO_EXTENSIONTYPING // TODO: provided attributes @@ -180,17 +177,17 @@ let GetAttribInfosOfEvent amap m einfo = /// provided attributes. // // This is used for AttributeUsageAttribute, DefaultMemberAttribute and ConditionalAttribute (on attribute types) -let TryBindTyconRefAttribute g m (AttribInfo (atref,_) as args) (tcref:TyconRef) f1 f2 f3 = +let TryBindTyconRefAttribute g m (AttribInfo (atref, _) as args) (tcref:TyconRef) f1 f2 f3 = ignore m; ignore f3 match metadataOfTycon tcref.Deref with #if !NO_EXTENSIONTYPING | ProvidedTypeMetadata info -> - let provAttribs = info.ProvidedType.PApply((fun a -> (a :> IProvidedCustomAttributeProvider)),m) - match provAttribs.PUntaint((fun a -> a.GetAttributeConstructorArgs(provAttribs.TypeProvider.PUntaintNoFailure(id), atref.FullName)),m) with + let provAttribs = info.ProvidedType.PApply((fun a -> (a :> IProvidedCustomAttributeProvider)), m) + match provAttribs.PUntaint((fun a -> a.GetAttributeConstructorArgs(provAttribs.TypeProvider.PUntaintNoFailure(id), atref.FullName)), m) with | Some args -> f3 args | None -> None #endif - | ILTypeMetadata (TILObjectReprData(_,_,tdef)) -> + | ILTypeMetadata (TILObjectReprData(_, _, tdef)) -> match TryDecodeILAttribute g atref tdef.CustomAttrs with | Some attr -> f1 attr | _ -> None @@ -204,16 +201,16 @@ let TryBindTyconRefAttribute g m (AttribInfo (atref,_) as args) (tcref:TyconRef) let BindMethInfoAttributes m minfo f1 f2 f3 = ignore m; ignore f3 match minfo with - | ILMeth (_,x,_) -> f1 x.RawMetadata.CustomAttrs - | FSMeth (_,_,vref,_) -> f2 vref.Attribs + | ILMeth (_, x, _) -> f1 x.RawMetadata.CustomAttrs + | FSMeth (_, _, vref, _) -> f2 vref.Attribs | DefaultStructCtor _ -> f2 [] #if !NO_EXTENSIONTYPING - | ProvidedMeth (_,mi,_,_) -> f3 (mi.PApply((fun st -> (st :> IProvidedCustomAttributeProvider)),m)) + | ProvidedMeth (_, mi, _, _) -> f3 (mi.PApply((fun st -> (st :> IProvidedCustomAttributeProvider)), m)) #endif /// Analyze three cases for attributes declared on methods: IL-declared attributes, F#-declared attributes and /// provided attributes. -let TryBindMethInfoAttribute g m (AttribInfo(atref,_) as attribSpec) minfo f1 f2 f3 = +let TryBindMethInfoAttribute g m (AttribInfo(atref, _) as attribSpec) minfo f1 f2 f3 = #if !NO_EXTENSIONTYPING #else // to prevent unused parameter warning @@ -224,7 +221,7 @@ let TryBindMethInfoAttribute g m (AttribInfo(atref,_) as attribSpec) minfo f1 f2 (fun fsAttribs -> TryFindFSharpAttribute g attribSpec fsAttribs |> Option.bind f2) #if !NO_EXTENSIONTYPING (fun provAttribs -> - match provAttribs.PUntaint((fun a -> a.GetAttributeConstructorArgs(provAttribs.TypeProvider.PUntaintNoFailure(id), atref.FullName)),m) with + match provAttribs.PUntaint((fun a -> a.GetAttributeConstructorArgs(provAttribs.TypeProvider.PUntaintNoFailure(id), atref.FullName)), m) with | Some args -> f3 args | None -> None) #else @@ -236,9 +233,9 @@ let TryBindMethInfoAttribute g m (AttribInfo(atref,_) as attribSpec) minfo f1 f2 /// This is just used for the 'ConditionalAttribute' attribute let TryFindMethInfoStringAttribute g m attribSpec minfo = TryBindMethInfoAttribute g m attribSpec minfo - (function ([ILAttribElem.String (Some msg) ],_) -> Some msg | _ -> None) - (function (Attrib(_,_,[ AttribStringArg msg ],_,_,_,_)) -> Some msg | _ -> None) - (function ([ Some ((:? string as msg) : obj) ],_) -> Some msg | _ -> None) + (function ([ILAttribElem.String (Some msg) ], _) -> Some msg | _ -> None) + (function (Attrib(_, _, [ AttribStringArg msg ], _, _, _, _)) -> Some msg | _ -> None) + (function ([ Some ((:? string as msg) : obj) ], _) -> Some msg | _ -> None) /// Check if a method has a specific attribute. let MethInfoHasAttribute g m attribSpec minfo = @@ -251,21 +248,21 @@ let MethInfoHasAttribute g m attribSpec minfo = /// Check IL attributes for 'ObsoleteAttribute', returning errors and warnings as data -let private CheckILAttributes (g: TcGlobals) cattrs m = +let private CheckILAttributes (g: TcGlobals) isByrefLikeTyconRef cattrs m = let (AttribInfo(tref,_)) = g.attrib_SystemObsolete match TryDecodeILAttribute g tref cattrs with - | Some ([ILAttribElem.String (Some msg) ],_) -> - WarnD(ObsoleteWarning(msg,m)) - | Some ([ILAttribElem.String (Some msg); ILAttribElem.Bool isError ],_) -> + | Some ([ILAttribElem.String (Some msg) ], _) when not isByrefLikeTyconRef -> + WarnD(ObsoleteWarning(msg, m)) + | Some ([ILAttribElem.String (Some msg); ILAttribElem.Bool isError ], _) when not isByrefLikeTyconRef -> if isError then - ErrorD (ObsoleteError(msg,m)) + ErrorD (ObsoleteError(msg, m)) else - WarnD (ObsoleteWarning(msg,m)) - | Some ([ILAttribElem.String None ],_) -> - WarnD(ObsoleteWarning("",m)) - | Some _ -> - WarnD(ObsoleteWarning("",m)) - | None -> + WarnD (ObsoleteWarning(msg, m)) + | Some ([ILAttribElem.String None ], _) when not isByrefLikeTyconRef -> + WarnD(ObsoleteWarning("", m)) + | Some _ when not isByrefLikeTyconRef -> + WarnD(ObsoleteWarning("", m)) + | _ -> CompleteD /// Check F# attributes for 'ObsoleteAttribute', 'CompilerMessageAttribute' and 'ExperimentalAttribute', @@ -274,13 +271,13 @@ let CheckFSharpAttributes g attribs m = if isNil attribs then CompleteD else (match TryFindFSharpAttribute g g.attrib_SystemObsolete attribs with - | Some(Attrib(_,_,[ AttribStringArg s ],_,_,_,_)) -> - WarnD(ObsoleteWarning(s,m)) - | Some(Attrib(_,_,[ AttribStringArg s; AttribBoolArg(isError) ],_,_,_,_)) -> + | Some(Attrib(_, _, [ AttribStringArg s ], _, _, _, _)) -> + WarnD(ObsoleteWarning(s, m)) + | Some(Attrib(_, _, [ AttribStringArg s; AttribBoolArg(isError) ], _, _, _, _)) -> if isError then - ErrorD (ObsoleteError(s,m)) + ErrorD (ObsoleteError(s, m)) else - WarnD (ObsoleteWarning(s,m)) + WarnD (ObsoleteWarning(s, m)) | Some _ -> WarnD(ObsoleteWarning("", m)) | None -> @@ -288,21 +285,21 @@ let CheckFSharpAttributes g attribs m = ) ++ (fun () -> match TryFindFSharpAttribute g g.attrib_CompilerMessageAttribute attribs with - | Some(Attrib(_,_,[ AttribStringArg s ; AttribInt32Arg n ],namedArgs,_,_,_)) -> - let msg = UserCompilerMessage(s,n,m) + | Some(Attrib(_, _, [ AttribStringArg s ; AttribInt32Arg n ], namedArgs, _, _, _)) -> + let msg = UserCompilerMessage(s, n, m) let isError = match namedArgs with | ExtractAttribNamedArg "IsError" (AttribBoolArg v) -> v | _ -> false - if isError then ErrorD msg else WarnD msg + if isError && (not g.compilingFslib || n <> 1204) then ErrorD msg else WarnD msg | _ -> CompleteD ) ++ (fun () -> match TryFindFSharpAttribute g g.attrib_ExperimentalAttribute attribs with - | Some(Attrib(_,_,[ AttribStringArg(s) ],_,_,_,_)) -> - WarnD(Experimental(s,m)) + | Some(Attrib(_, _, [ AttribStringArg(s) ], _, _, _, _)) -> + WarnD(Experimental(s, m)) | Some _ -> WarnD(Experimental(FSComp.SR.experimentalConstruct (), m)) | _ -> @@ -319,25 +316,25 @@ let CheckFSharpAttributes g attribs m = #if !NO_EXTENSIONTYPING /// Check a list of provided attributes for 'ObsoleteAttribute', returning errors and warnings as data let private CheckProvidedAttributes (g: TcGlobals) m (provAttribs: Tainted) = - let (AttribInfo(tref,_)) = g.attrib_SystemObsolete - match provAttribs.PUntaint((fun a -> a.GetAttributeConstructorArgs(provAttribs.TypeProvider.PUntaintNoFailure(id), tref.FullName)),m) with - | Some ([ Some (:? string as msg) ], _) -> WarnD(ObsoleteWarning(msg,m)) + let (AttribInfo(tref, _)) = g.attrib_SystemObsolete + match provAttribs.PUntaint((fun a -> a.GetAttributeConstructorArgs(provAttribs.TypeProvider.PUntaintNoFailure(id), tref.FullName)), m) with + | Some ([ Some (:? string as msg) ], _) -> WarnD(ObsoleteWarning(msg, m)) | Some ([ Some (:? string as msg); Some (:?bool as isError) ], _) -> if isError then - ErrorD (ObsoleteError(msg,m)) + ErrorD (ObsoleteError(msg, m)) else - WarnD (ObsoleteWarning(msg,m)) + WarnD (ObsoleteWarning(msg, m)) | Some ([ None ], _) -> - WarnD(ObsoleteWarning("",m)) + WarnD(ObsoleteWarning("", m)) | Some _ -> - WarnD(ObsoleteWarning("",m)) + WarnD(ObsoleteWarning("", m)) | None -> CompleteD #endif /// Indicate if a list of IL attributes contains 'ObsoleteAttribute'. Used to suppress the item in intellisense. let CheckILAttributesForUnseen (g: TcGlobals) cattrs _m = - let (AttribInfo(tref,_)) = g.attrib_SystemObsolete + let (AttribInfo(tref, _)) = g.attrib_SystemObsolete Option.isSome (TryDecodeILAttribute g tref cattrs) /// Checks the attributes for CompilerMessageAttribute, which has an IsHidden argument that allows @@ -345,15 +342,15 @@ let CheckILAttributesForUnseen (g: TcGlobals) cattrs _m = let CheckFSharpAttributesForHidden g attribs = not (isNil attribs) && (match TryFindFSharpAttribute g g.attrib_CompilerMessageAttribute attribs with - | Some(Attrib(_,_,[AttribStringArg _; AttribInt32Arg messageNumber], - ExtractAttribNamedArg "IsHidden" (AttribBoolArg v),_,_,_)) -> + | Some(Attrib(_, _, [AttribStringArg _; AttribInt32Arg messageNumber], + ExtractAttribNamedArg "IsHidden" (AttribBoolArg v), _, _, _)) -> // Message number 62 is for "ML Compatibility". Items labelled with this are visible in intellisense // when mlCompatibility is set. v && not (messageNumber = 62 && g.mlCompatibility) | _ -> false) || (match TryFindFSharpAttribute g g.attrib_ComponentModelEditorBrowsableAttribute attribs with - | Some(Attrib(_,_,[AttribInt32Arg state],_,_,_,_)) -> state = int System.ComponentModel.EditorBrowsableState.Never + | Some(Attrib(_, _, [AttribInt32Arg state], _, _, _, _)) -> state = int System.ComponentModel.EditorBrowsableState.Never | _ -> false) /// Indicate if a list of F# attributes contains 'ObsoleteAttribute'. Used to suppress the item in intellisense. @@ -371,19 +368,19 @@ let CheckFSharpAttributesForUnseen g attribs _m = #if !NO_EXTENSIONTYPING /// Indicate if a list of provided attributes contains 'ObsoleteAttribute'. Used to suppress the item in intellisense. let CheckProvidedAttributesForUnseen (provAttribs: Tainted) m = - provAttribs.PUntaint((fun a -> a.GetAttributeConstructorArgs(provAttribs.TypeProvider.PUntaintNoFailure(id), typeof.FullName).IsSome),m) + provAttribs.PUntaint((fun a -> a.GetAttributeConstructorArgs(provAttribs.TypeProvider.PUntaintNoFailure(id), typeof.FullName).IsSome), m) #endif /// Check the attributes associated with a property, returning warnings and errors as data. let CheckPropInfoAttributes pinfo m = match pinfo with - | ILProp(g,ILPropInfo(_,pdef)) -> CheckILAttributes g pdef.CustomAttrs m - | FSProp(g,_,Some vref,_) - | FSProp(g,_,_,Some vref) -> CheckFSharpAttributes g vref.Attribs m + | ILProp(ILPropInfo(_, pdef)) -> CheckILAttributes pinfo.TcGlobals false pdef.CustomAttrs m + | FSProp(g, _, Some vref, _) + | FSProp(g, _, _, Some vref) -> CheckFSharpAttributes g vref.Attribs m | FSProp _ -> failwith "CheckPropInfoAttributes: unreachable" #if !NO_EXTENSIONTYPING - | ProvidedProp (amap,pi,m) -> - CheckProvidedAttributes amap.g m (pi.PApply((fun st -> (st :> IProvidedCustomAttributeProvider)),m)) + | ProvidedProp (amap, pi, m) -> + CheckProvidedAttributes amap.g m (pi.PApply((fun st -> (st :> IProvidedCustomAttributeProvider)), m)) #endif @@ -391,23 +388,23 @@ let CheckPropInfoAttributes pinfo m = /// Check the attributes associated with a IL field, returning warnings and errors as data. let CheckILFieldAttributes g (finfo:ILFieldInfo) m = match finfo with - | ILFieldInfo(_,pd) -> - CheckILAttributes g pd.CustomAttrs m |> CommitOperationResult + | ILFieldInfo(_, pd) -> + CheckILAttributes g false pd.CustomAttrs m |> CommitOperationResult #if !NO_EXTENSIONTYPING - | ProvidedField (amap,fi,m) -> - CheckProvidedAttributes amap.g m (fi.PApply((fun st -> (st :> IProvidedCustomAttributeProvider)),m)) |> CommitOperationResult + | ProvidedField (amap, fi, m) -> + CheckProvidedAttributes amap.g m (fi.PApply((fun st -> (st :> IProvidedCustomAttributeProvider)), m)) |> CommitOperationResult #endif /// Check the attributes associated with a method, returning warnings and errors as data. let CheckMethInfoAttributes g m tyargsOpt minfo = let search = BindMethInfoAttributes m minfo - (fun ilAttribs -> Some(CheckILAttributes g ilAttribs m)) + (fun ilAttribs -> Some(CheckILAttributes g false ilAttribs m)) (fun fsAttribs -> let res = CheckFSharpAttributes g fsAttribs m ++ (fun () -> if Option.isNone tyargsOpt && HasFSharpAttribute g g.attrib_RequiresExplicitTypeArgumentsAttribute fsAttribs then - ErrorD(Error(FSComp.SR.tcFunctionRequiresExplicitTypeArguments(minfo.LogicalName),m)) + ErrorD(Error(FSComp.SR.tcFunctionRequiresExplicitTypeArguments(minfo.LogicalName), m)) else CompleteD) Some res) @@ -422,8 +419,8 @@ let CheckMethInfoAttributes g m tyargsOpt minfo = /// Indicate if a method has 'Obsolete', 'CompilerMessageAttribute' or 'TypeProviderEditorHideMethodsAttribute'. /// Used to suppress the item in intellisense. -let MethInfoIsUnseen g m typ minfo = - let isUnseenByObsoleteAttrib = +let MethInfoIsUnseen g m ty minfo = + let isUnseenByObsoleteAttrib () = match BindMethInfoAttributes m minfo (fun ilAttribs -> Some(CheckILAttributesForUnseen g ilAttribs m)) (fun fsAttribs -> Some(CheckFSharpAttributesForUnseen g fsAttribs m)) @@ -436,12 +433,12 @@ let MethInfoIsUnseen g m typ minfo = | Some res -> res | None -> false - let isUnseenByHidingAttribute = + let isUnseenByHidingAttribute () = #if !NO_EXTENSIONTYPING - not (isObjTy g typ) && - isAppTy g typ && - isObjTy g minfo.EnclosingType && - let tcref = tcrefOfAppTy g typ + not (isObjTy g ty) && + isAppTy g ty && + isObjTy g minfo.ApparentEnclosingType && + let tcref = tcrefOfAppTy g ty match tcref.TypeReprInfo with | TProvidedTypeExtensionPoint info -> info.ProvidedType.PUntaint((fun st -> (st :> IProvidedCustomAttributeProvider).GetHasTypeProviderEditorHideMethodsAttribute(info.ProvidedType.TypeProvider.PUntaintNoFailure(id))), m) @@ -453,32 +450,38 @@ let MethInfoIsUnseen g m typ minfo = // just to look at the attributes on IL methods. if tcref.IsILTycon then tcref.ILTyconRawMetadata.CustomAttrs.AsList - |> List.exists (fun attr -> attr.Method.EnclosingType.TypeSpec.Name = typeof.FullName) + |> List.exists (fun attr -> attr.Method.DeclaringType.TypeSpec.Name = typeof.FullName) else false #else - typ |> ignore + ty |> ignore false #endif - isUnseenByObsoleteAttrib || isUnseenByHidingAttribute + + //let isUnseenByBeingTupleMethod () = isAnyTupleTy g ty + + isUnseenByObsoleteAttrib () || isUnseenByHidingAttribute () //|| isUnseenByBeingTupleMethod () /// Indicate if a property has 'Obsolete' or 'CompilerMessageAttribute'. /// Used to suppress the item in intellisense. let PropInfoIsUnseen m pinfo = match pinfo with - | ILProp (g,ILPropInfo(_,pdef)) -> CheckILAttributesForUnseen g pdef.CustomAttrs m - | FSProp (g,_,Some vref,_) - | FSProp (g,_,_,Some vref) -> CheckFSharpAttributesForUnseen g vref.Attribs m + | ILProp (ILPropInfo(_, pdef) as ilpinfo) -> + // Properties on .NET tuple types are resolvable but unseen + isAnyTupleTy pinfo.TcGlobals ilpinfo.ILTypeInfo.ToType || + CheckILAttributesForUnseen pinfo.TcGlobals pdef.CustomAttrs m + | FSProp (g, _, Some vref, _) + | FSProp (g, _, _, Some vref) -> CheckFSharpAttributesForUnseen g vref.Attribs m | FSProp _ -> failwith "CheckPropInfoAttributes: unreachable" #if !NO_EXTENSIONTYPING - | ProvidedProp (_amap,pi,m) -> - CheckProvidedAttributesForUnseen (pi.PApply((fun st -> (st :> IProvidedCustomAttributeProvider)),m)) m + | ProvidedProp (_amap, pi, m) -> + CheckProvidedAttributesForUnseen (pi.PApply((fun st -> (st :> IProvidedCustomAttributeProvider)), m)) m #endif /// Check the attributes on an entity, returning errors and warnings as data. let CheckEntityAttributes g (x:TyconRef) m = if x.IsILTycon then - CheckILAttributes g x.ILTyconRawMetadata.CustomAttrs m + CheckILAttributes g (isByrefLikeTyconRef g m x) x.ILTyconRawMetadata.CustomAttrs m else CheckFSharpAttributes g x.Attribs m @@ -501,3 +504,23 @@ let CheckRecdFieldInfoAttributes g (x:RecdFieldInfo) m = CheckRecdFieldAttributes g x.RecdFieldRef m +// Identify any security attributes +let IsSecurityAttribute (g: TcGlobals) amap (casmap : Dictionary) (Attrib(tcref, _, _, _, _, _, _)) m = + // There's no CAS on Silverlight, so we have to be careful here + match g.attrib_SecurityAttribute with + | None -> false + | Some attr -> + match attr.TyconRef.TryDeref with + | ValueSome _ -> + let tcs = tcref.Stamp + match casmap.TryGetValue(tcs) with + | true, c -> c + | _ -> + let exists = ExistsInEntireHierarchyOfType (fun t -> typeEquiv g t (mkAppTy attr.TyconRef [])) g amap m AllowMultiIntfInstantiations.Yes (mkAppTy tcref []) + casmap.[tcs] <- exists + exists + | ValueNone -> false + +let IsSecurityCriticalAttribute g (Attrib(tcref, _, _, _, _, _, _)) = + (tyconRefEq g tcref g.attrib_SecurityCriticalAttribute.TyconRef || tyconRefEq g tcref g.attrib_SecuritySafeCriticalAttribute.TyconRef) + diff --git a/src/fsharp/AugmentWithHashCompare.fs b/src/fsharp/AugmentWithHashCompare.fs index e886b534477..6d9abf0dc10 100644 --- a/src/fsharp/AugmentWithHashCompare.fs +++ b/src/fsharp/AugmentWithHashCompare.fs @@ -3,10 +3,8 @@ /// Generate the hash/compare functions we add to user-defined types by default. module internal Microsoft.FSharp.Compiler.AugmentWithHashCompare -open Microsoft.FSharp.Compiler open Microsoft.FSharp.Compiler.AbstractIL open Microsoft.FSharp.Compiler.AbstractIL.IL -open Microsoft.FSharp.Compiler.AbstractIL.Internal open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library open Microsoft.FSharp.Compiler.Tast open Microsoft.FSharp.Compiler.Tastops @@ -18,14 +16,14 @@ open Microsoft.FSharp.Compiler.Infos let mkIComparableCompareToSlotSig (g: TcGlobals) = TSlotSig("CompareTo",g.mk_IComparable_ty, [],[], [[TSlotParam(Some("obj"),g.obj_ty,false,false,false,[])]],Some g.int_ty) -let mkGenericIComparableCompareToSlotSig (g: TcGlobals) typ = - TSlotSig("CompareTo",(mkAppTy g.system_GenericIComparable_tcref [typ]),[],[], [[TSlotParam(Some("obj"),typ,false,false,false,[])]],Some g.int_ty) +let mkGenericIComparableCompareToSlotSig (g: TcGlobals) ty = + TSlotSig("CompareTo",(mkAppTy g.system_GenericIComparable_tcref [ty]),[],[], [[TSlotParam(Some("obj"),ty,false,false,false,[])]],Some g.int_ty) let mkIStructuralComparableCompareToSlotSig (g: TcGlobals) = TSlotSig("CompareTo",g.mk_IStructuralComparable_ty,[],[],[[TSlotParam(None,(mkRefTupledTy g [g.obj_ty ; g.IComparer_ty]),false,false,false,[])]], Some g.int_ty) -let mkGenericIEquatableEqualsSlotSig (g: TcGlobals) typ = - TSlotSig("Equals",(mkAppTy g.system_GenericIEquatable_tcref [typ]),[],[], [[TSlotParam(Some("obj"),typ,false,false,false,[])]],Some g.bool_ty) +let mkGenericIEquatableEqualsSlotSig (g: TcGlobals) ty = + TSlotSig("Equals",(mkAppTy g.system_GenericIEquatable_tcref [ty]),[],[], [[TSlotParam(Some("obj"),ty,false,false,false,[])]],Some g.bool_ty) let mkIStructuralEquatableEqualsSlotSig (g: TcGlobals) = TSlotSig("Equals",g.mk_IStructuralEquatable_ty,[],[],[[TSlotParam(None,(mkRefTupledTy g [g.obj_ty ; g.IEqualityComparer_ty]),false,false,false,[])]], Some g.bool_ty) @@ -46,14 +44,19 @@ let mkEqualsSlotSig (g: TcGlobals) = let mkThisTy g ty = if isStructTy g ty then mkByrefTy g ty else ty let mkCompareObjTy g ty = (mkThisTy g ty) --> (g.obj_ty --> g.int_ty) + let mkCompareTy g ty = (mkThisTy g ty) --> (ty --> g.int_ty) + let mkCompareWithComparerTy g ty = (mkThisTy g ty) --> ((mkRefTupledTy g [g.obj_ty ; g.IComparer_ty]) --> g.int_ty) let mkEqualsObjTy g ty = (mkThisTy g ty) --> (g.obj_ty --> g.bool_ty) + let mkEqualsTy g ty = (mkThisTy g ty) --> (ty --> g.bool_ty) + let mkEqualsWithComparerTy g ty = (mkThisTy g ty) --> ((mkRefTupledTy g [g.obj_ty ; g.IEqualityComparer_ty]) --> g.bool_ty) let mkHashTy g ty = (mkThisTy g ty) --> (g.unit_ty --> g.int_ty) + let mkHashWithComparerTy g ty = (mkThisTy g ty) --> (g.IEqualityComparer_ty --> g.int_ty) //------------------------------------------------------------------------- @@ -61,7 +64,9 @@ let mkHashWithComparerTy g ty = (mkThisTy g ty) --> (g.IEqualityComparer_ty --> //------------------------------------------------------------------------- let mkRelBinOp (g: TcGlobals) op m e1 e2 = mkAsmExpr ([ op ],[], [e1; e2],[g.bool_ty],m) + let mkClt g m e1 e2 = mkRelBinOp g IL.AI_clt m e1 e2 + let mkCgt g m e1 e2 = mkRelBinOp g IL.AI_cgt m e1 e2 //------------------------------------------------------------------------- @@ -86,7 +91,9 @@ let mkILCallGetEqualityComparer (g: TcGlobals) m = let mkThisVar g m ty = mkCompGenLocal m "this" (mkThisTy g ty) let mkShl g m acce n = mkAsmExpr([ IL.AI_shl ],[],[acce; mkInt g m n],[g.int_ty],m) + let mkShr g m acce n = mkAsmExpr([ IL.AI_shr ],[],[acce; mkInt g m n],[g.int_ty],m) + let mkAdd (g: TcGlobals) m e1 e2 = mkAsmExpr([ IL.AI_add ],[],[e1;e2],[g.int_ty],m) let mkAddToHashAcc g m e accv acce = @@ -103,6 +110,7 @@ let mkCombineHashGenerators g m exprs accv acce = //------------------------------------------------------------------------- let mkThatAddrLocal g m ty = mkCompGenLocal m "obj" (mkThisTy g ty) + let mkThatAddrLocalIfNeeded g m tcve ty = if isStructTy g ty then let thataddrv, thataddre = mkCompGenLocal m "obj" (mkThisTy g ty) @@ -117,13 +125,13 @@ let mkThisVarThatVar g m ty = let mkThatVarBind g m ty thataddrv expr = if isStructTy g ty then let thatv2,_ = mkMutableCompGenLocal m "obj" ty - thatv2,mkCompGenLet m thataddrv (mkValAddr m (mkLocalValRef thatv2)) expr + thatv2,mkCompGenLet m thataddrv (mkValAddr m false (mkLocalValRef thatv2)) expr else thataddrv,expr let mkBindThatAddr g m ty thataddrv thatv thate expr = if isStructTy g ty then // let thataddrv = &thatv - mkCompGenLet m thataddrv (mkValAddr m (mkLocalValRef thatv)) expr + mkCompGenLet m thataddrv (mkValAddr m false (mkLocalValRef thatv)) expr else // let thataddrv = that mkCompGenLet m thataddrv thate expr @@ -133,7 +141,7 @@ let mkBindThatAddrIfNeeded m thataddrvOpt thatv expr = | None -> expr | Some thataddrv -> // let thataddrv = &thatv - mkCompGenLet m thataddrv (mkValAddr m (mkLocalValRef thatv)) expr + mkCompGenLet m thataddrv (mkValAddr m false (mkLocalValRef thatv)) expr let mkDerefThis g m (thisv: Val) thise = if isByrefTy g thisv.Type then mkAddrGet m (mkLocalValRef thisv) @@ -508,7 +516,6 @@ let mkUnionEquality g tcref (tycon:Tycon) = let expr = if tycon.IsStructOrEnumTycon then expr else mkBindThatNullEquals g m thise thataddre expr thisv,thatv,expr - /// Build the equality implementation for a union type when parameterized by a comparer let mkUnionEqualityWithComparer g tcref (tycon:Tycon) (_thisv,thise) thatobje (thatv,thate) compe = let m = tycon.Range @@ -819,7 +826,7 @@ let TyconIsCandidateForAugmentationWithCompare (g: TcGlobals) (tycon:Tycon) = // This type gets defined in prim-types, before we can add attributes to F# type definitions let isUnit = g.compilingFslib && tycon.DisplayName = "Unit" not isUnit && - + not (TyconRefHasAttribute g tycon.Range g.attrib_IsByRefLikeAttribute (mkLocalTyconRef tycon)) && match getAugmentationAttribs g tycon with // [< >] | true, true, None, None, None, None , None, None, None @@ -834,6 +841,7 @@ let TyconIsCandidateForAugmentationWithEquals (g: TcGlobals) (tycon:Tycon) = // This type gets defined in prim-types, before we can add attributes to F# type definitions let isUnit = g.compilingFslib && tycon.DisplayName = "Unit" not isUnit && + not (TyconRefHasAttribute g tycon.Range g.attrib_IsByRefLikeAttribute (mkLocalTyconRef tycon)) && match getAugmentationAttribs g tycon with // [< >] @@ -860,7 +868,7 @@ let slotImplMethod (final,c,slotsig) : ValMemberInfo = IsOverrideOrExplicitImpl=true MemberKind=MemberKind.Member} IsImplemented=false - ApparentParent=c} + ApparentEnclosingEntity=c} let nonVirtualMethod c : ValMemberInfo = { ImplementedSlotSigs=[] @@ -870,7 +878,7 @@ let nonVirtualMethod c : ValMemberInfo = IsOverrideOrExplicitImpl=false MemberKind=MemberKind.Member} IsImplemented=false - ApparentParent=c} + ApparentEnclosingEntity=c} let unitArg = ValReprInfo.unitArgData let unaryArg = [ ValReprInfo.unnamedTopArg ] diff --git a/src/fsharp/AugmentWithHashCompare.fsi b/src/fsharp/AugmentWithHashCompare.fsi index 75fd06c38aa..089966c8b1e 100644 --- a/src/fsharp/AugmentWithHashCompare.fsi +++ b/src/fsharp/AugmentWithHashCompare.fsi @@ -3,11 +3,7 @@ /// Generate the hash/compare functions we add to user-defined types by default. module internal Microsoft.FSharp.Compiler.AugmentWithHashCompare -open Internal.Utilities -open Microsoft.FSharp.Compiler.AbstractIL -open Microsoft.FSharp.Compiler.AbstractIL.Internal open Microsoft.FSharp.Compiler - open Microsoft.FSharp.Compiler.Tast open Microsoft.FSharp.Compiler.TcGlobals diff --git a/src/fsharp/CheckFormatStrings.fs b/src/fsharp/CheckFormatStrings.fs index 3ca134907c4..4d532904a16 100644 --- a/src/fsharp/CheckFormatStrings.fs +++ b/src/fsharp/CheckFormatStrings.fs @@ -2,7 +2,6 @@ module internal Microsoft.FSharp.Compiler.CheckFormatStrings -open Internal.Utilities open Microsoft.FSharp.Compiler open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library open Microsoft.FSharp.Compiler.Ast @@ -11,6 +10,7 @@ open Microsoft.FSharp.Compiler.Tast open Microsoft.FSharp.Compiler.Tastops open Microsoft.FSharp.Compiler.TcGlobals open Microsoft.FSharp.Compiler.ConstraintSolver +open Microsoft.FSharp.Compiler.NameResolution type FormatItem = Simple of TType | FuncAndVal @@ -22,7 +22,7 @@ let lowestDefaultPriority = 0 (* See comment on TyparConstraint.DefaultsTo *) let mkFlexibleFormatTypar m tys dflt = let tp = NewTypar (TyparKind.Type,TyparRigidity.Rigid,Typar(mkSynId m "fmt",HeadTypeStaticReq,true),false,TyparDynamicReq.Yes,[],false,false) - tp.FixupConstraints [ TyparConstraint.SimpleChoice (tys,m); TyparConstraint.DefaultsTo (lowestDefaultPriority,dflt,m)] + tp.SetConstraints [ TyparConstraint.SimpleChoice (tys,m); TyparConstraint.DefaultsTo (lowestDefaultPriority,dflt,m)] copyAndFixupFormatTypar m tp let mkFlexibleIntFormatTypar (g: TcGlobals) m = @@ -48,27 +48,21 @@ let newInfo ()= addZeros = false precision = false} -let parseFormatStringInternal (m:range) (g: TcGlobals) (source: string option) fmt bty cty = +let parseFormatStringInternal (m:range) (g: TcGlobals) (context: FormatStringCheckContext option) fmt bty cty = // Offset is used to adjust ranges depending on whether input string is regular, verbatim or triple-quote. // We construct a new 'fmt' string since the current 'fmt' string doesn't distinguish between "\n" and escaped "\\n". let (offset, fmt) = - match source with - | Some source -> - let source = source.Replace("\r\n", "\n").Replace("\r", "\n") - let positions = - source.Split('\n') - |> Seq.map (fun s -> String.length s + 1) - |> Seq.scan (+) 0 - |> Seq.toArray - let length = source.Length - if m.EndLine < positions.Length then - let startIndex = positions.[m.StartLine-1] + m.StartColumn - let endIndex = positions.[m.EndLine-1] + m.EndColumn - 1 - if startIndex < length-3 && source.[startIndex..startIndex+2] = "\"\"\"" then - (3, source.[startIndex+3..endIndex-3]) - elif startIndex < length-2 && source.[startIndex..startIndex+1] = "@\"" then - (2, source.[startIndex+2..endIndex-1]) - else (1, source.[startIndex+1..endIndex-1]) + match context with + | Some context -> + let length = context.NormalizedSource.Length + if m.EndLine < context.LineEndPositions.Length then + let startIndex = context.LineEndPositions.[m.StartLine-1] + m.StartColumn + let endIndex = context.LineEndPositions.[m.EndLine-1] + m.EndColumn - 1 + if startIndex < length-3 && context.NormalizedSource.[startIndex..startIndex+2] = "\"\"\"" then + (3, context.NormalizedSource.[startIndex+3..endIndex-3]) + elif startIndex < length-2 && context.NormalizedSource.[startIndex..startIndex+1] = "@\"" then + (2, context.NormalizedSource.[startIndex+2..endIndex-1]) + else (1, context.NormalizedSource.[startIndex+1..endIndex-1]) else (1, fmt) | None -> (1, fmt) @@ -293,8 +287,8 @@ let parseFormatStringInternal (m:range) (g: TcGlobals) (source: string option) f let results = parseLoop [] (0, 0, m.StartColumn) results, Seq.toList specifierLocations -let ParseFormatString m g source fmt bty cty dty = - let argtys, specifierLocations = parseFormatStringInternal m g source fmt bty cty +let ParseFormatString m g formatStringCheckContext fmt bty cty dty = + let argtys, specifierLocations = parseFormatStringInternal m g formatStringCheckContext fmt bty cty let aty = List.foldBack (-->) argtys dty let ety = mkRefTupledTy g argtys (aty, ety), specifierLocations diff --git a/src/fsharp/CheckFormatStrings.fsi b/src/fsharp/CheckFormatStrings.fsi index 11eb6e41cc5..2b6d8d4f020 100644 --- a/src/fsharp/CheckFormatStrings.fsi +++ b/src/fsharp/CheckFormatStrings.fsi @@ -7,12 +7,11 @@ module internal Microsoft.FSharp.Compiler.CheckFormatStrings -open Internal.Utilities open Microsoft.FSharp.Compiler +open Microsoft.FSharp.Compiler.NameResolution open Microsoft.FSharp.Compiler.Tast open Microsoft.FSharp.Compiler.TcGlobals -open Microsoft.FSharp.Compiler.AbstractIL.Internal -val ParseFormatString : Range.range -> TcGlobals -> source: string option -> fmt: string -> bty: TType -> cty: TType -> dty: TType -> (TType * TType) * (Range.range * int) list +val ParseFormatString : Range.range -> TcGlobals -> formatStringCheckContext: FormatStringCheckContext option -> fmt: string -> bty: TType -> cty: TType -> dty: TType -> (TType * TType) * (Range.range * int) list val TryCountFormatStringArguments : m:Range.range -> g:TcGlobals -> fmt:string -> bty:TType -> cty:TType -> int option diff --git a/src/fsharp/CompileOps.fs b/src/fsharp/CompileOps.fs index 0cab042759a..3517d044284 100644 --- a/src/fsharp/CompileOps.fs +++ b/src/fsharp/CompileOps.fs @@ -4,51 +4,46 @@ module internal Microsoft.FSharp.Compiler.CompileOps open System -open System.Collections.Concurrent open System.Collections.Generic open System.Diagnostics open System.IO -open System.Runtime.CompilerServices open System.Text open Internal.Utilities -open Internal.Utilities.Text open Internal.Utilities.Collections open Internal.Utilities.Filename +open Internal.Utilities.Text open Microsoft.FSharp.Compiler.AbstractIL open Microsoft.FSharp.Compiler.AbstractIL.IL +open Microsoft.FSharp.Compiler.AbstractIL.ILBinaryReader open Microsoft.FSharp.Compiler.AbstractIL.Internal open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library open Microsoft.FSharp.Compiler.AbstractIL.Extensions.ILX open Microsoft.FSharp.Compiler.AbstractIL.Diagnostics open Microsoft.FSharp.Compiler -open Microsoft.FSharp.Compiler.TastPickle -open Microsoft.FSharp.Compiler.Range -open Microsoft.FSharp.Compiler.TypeChecker -open Microsoft.FSharp.Compiler.SR -open Microsoft.FSharp.Compiler.DiagnosticMessage -open Microsoft.FSharp.Compiler.Range open Microsoft.FSharp.Compiler.Ast open Microsoft.FSharp.Compiler.AttributeChecking +open Microsoft.FSharp.Compiler.ConstraintSolver +open Microsoft.FSharp.Compiler.DiagnosticMessage open Microsoft.FSharp.Compiler.ErrorLogger -open Microsoft.FSharp.Compiler.Tast -open Microsoft.FSharp.Compiler.Tastops -open Microsoft.FSharp.Compiler.Tastops.DebugPrint -open Microsoft.FSharp.Compiler.TcGlobals +open Microsoft.FSharp.Compiler.Import +open Microsoft.FSharp.Compiler.Infos open Microsoft.FSharp.Compiler.Lexhelp open Microsoft.FSharp.Compiler.Lib -open Microsoft.FSharp.Compiler.Infos -open Microsoft.FSharp.Compiler.ConstraintSolver -open Microsoft.FSharp.Compiler.ReferenceResolver -open Microsoft.FSharp.Compiler.TypeRelations -open Microsoft.FSharp.Compiler.SignatureConformance +open Microsoft.FSharp.Compiler.MethodCalls open Microsoft.FSharp.Compiler.MethodOverrides open Microsoft.FSharp.Compiler.NameResolution open Microsoft.FSharp.Compiler.PrettyNaming -open Microsoft.FSharp.Compiler.Import - +open Microsoft.FSharp.Compiler.Range +open Microsoft.FSharp.Compiler.ReferenceResolver +open Microsoft.FSharp.Compiler.SignatureConformance +open Microsoft.FSharp.Compiler.TastPickle +open Microsoft.FSharp.Compiler.TypeChecker +open Microsoft.FSharp.Compiler.Tast +open Microsoft.FSharp.Compiler.Tastops +open Microsoft.FSharp.Compiler.TcGlobals #if !NO_EXTENSIONTYPING open Microsoft.FSharp.Compiler.ExtensionTyping @@ -156,6 +151,7 @@ let GetRangeOfDiagnostic(err:PhasedDiagnostic) = | InterfaceNotRevealed(_, _, m) | WrappedError (_, m) | PatternMatchCompilation.MatchIncomplete (_, _, m) + | PatternMatchCompilation.EnumMatchIncomplete (_, _, m) | PatternMatchCompilation.RuleNeverMatched m | ValNotMutable(_, _, m) | ValNotLocal(_, _, m) @@ -357,6 +353,7 @@ let GetDiagnosticNumber(err:PhasedDiagnostic) = | ExtensionTyping.ProvidedTypeResolutionNoRange _ | ExtensionTyping.ProvidedTypeResolution _ -> 103 #endif + | PatternMatchCompilation.EnumMatchIncomplete _ -> 104 (* DO NOT CHANGE THE NUMBERS *) // Strip TargetInvocationException wrappers @@ -535,11 +532,11 @@ let UseOfAddressOfOperatorE() = DeclareResourceString("UseOfAddressOfOperator", let DefensiveCopyWarningE() = DeclareResourceString("DefensiveCopyWarning", "%s") let DeprecatedThreadStaticBindingWarningE() = DeclareResourceString("DeprecatedThreadStaticBindingWarning", "") let FunctionValueUnexpectedE() = DeclareResourceString("FunctionValueUnexpected", "%s") -let UnitTypeExpectedE() = DeclareResourceString("UnitTypeExpected", "") -let UnitTypeExpectedWithEqualityE() = DeclareResourceString("UnitTypeExpectedWithEquality", "") -let UnitTypeExpectedWithPossiblePropertySetterE() = DeclareResourceString("UnitTypeExpectedWithPossiblePropertySetter", "%s%s") -let UnitTypeExpectedWithPossibleAssignmentE() = DeclareResourceString("UnitTypeExpectedWithPossibleAssignment", "%s") -let UnitTypeExpectedWithPossibleAssignmentToMutableE() = DeclareResourceString("UnitTypeExpectedWithPossibleAssignmentToMutable", "%s") +let UnitTypeExpectedE() = DeclareResourceString("UnitTypeExpected", "%s") +let UnitTypeExpectedWithEqualityE() = DeclareResourceString("UnitTypeExpectedWithEquality", "%s") +let UnitTypeExpectedWithPossiblePropertySetterE() = DeclareResourceString("UnitTypeExpectedWithPossiblePropertySetter", "%s%s%s") +let UnitTypeExpectedWithPossibleAssignmentE() = DeclareResourceString("UnitTypeExpectedWithPossibleAssignment", "%s%s") +let UnitTypeExpectedWithPossibleAssignmentToMutableE() = DeclareResourceString("UnitTypeExpectedWithPossibleAssignmentToMutable", "%s%s") let RecursiveUseCheckedAtRuntimeE() = DeclareResourceString("RecursiveUseCheckedAtRuntime", "") let LetRecUnsound1E() = DeclareResourceString("LetRecUnsound1", "%s") let LetRecUnsound2E() = DeclareResourceString("LetRecUnsound2", "%s%s") @@ -562,6 +559,7 @@ let MatchIncomplete2E() = DeclareResourceString("MatchIncomplete2", "%s") let MatchIncomplete3E() = DeclareResourceString("MatchIncomplete3", "%s") let MatchIncomplete4E() = DeclareResourceString("MatchIncomplete4", "") let RuleNeverMatchedE() = DeclareResourceString("RuleNeverMatched", "") +let EnumMatchIncomplete1E() = DeclareResourceString("EnumMatchIncomplete1", "") let ValNotMutableE() = DeclareResourceString("ValNotMutable", "%s") let ValNotLocalE() = DeclareResourceString("ValNotLocal", "") let Obsolete1E() = DeclareResourceString("Obsolete1", "") @@ -697,12 +695,12 @@ let OutputPhasedErrorR (os:StringBuilder) (err:PhasedDiagnostic) = | ContextInfo.TupleInRecordFields -> os.Append(ErrorFromAddingTypeEquation1E().Format t2 t1 tpcs) |> ignore os.Append(System.Environment.NewLine + FSComp.SR.commaInsteadOfSemicolonInRecord()) |> ignore - | _ when t2 = "bool" && t1.EndsWith " ref" -> + | _ when t2 = "bool" && t1.EndsWithOrdinal(" ref") -> os.Append(ErrorFromAddingTypeEquation1E().Format t2 t1 tpcs) |> ignore os.Append(System.Environment.NewLine + FSComp.SR.derefInsteadOfNot()) |> ignore | _ -> os.Append(ErrorFromAddingTypeEquation1E().Format t2 t1 tpcs) |> ignore - | ErrorFromAddingTypeEquation(_, _, _, _, ((ConstraintSolverTypesNotInEqualityRelation (_, _, _, _, _, contextInfo) ) as e), _) when contextInfo <> ContextInfo.NoContext -> + | ErrorFromAddingTypeEquation(_, _, _, _, ((ConstraintSolverTypesNotInEqualityRelation (_, _, _, _, _, contextInfo) ) as e), _) when (match contextInfo with ContextInfo.NoContext -> false | _ -> true) -> OutputExceptionR os e | ErrorFromAddingTypeEquation(_, _, _, _, ((ConstraintSolverTypesNotInSubsumptionRelation _ | ConstraintSolverError _ ) as e), _) -> @@ -1033,6 +1031,7 @@ let OutputPhasedErrorR (os:StringBuilder) (err:PhasedDiagnostic) = | Parser.TOKEN_LAZY -> getErrorString("Parser.TOKEN.LAZY") | Parser.TOKEN_OLAZY -> getErrorString("Parser.TOKEN.LAZY") | Parser.TOKEN_MATCH -> getErrorString("Parser.TOKEN.MATCH") + | Parser.TOKEN_MATCH_BANG -> getErrorString("Parser.TOKEN.MATCH.BANG") | Parser.TOKEN_MUTABLE -> getErrorString("Parser.TOKEN.MUTABLE") | Parser.TOKEN_NEW -> getErrorString("Parser.TOKEN.NEW") | Parser.TOKEN_OF -> getErrorString("Parser.TOKEN.OF") @@ -1252,7 +1251,7 @@ let OutputPhasedErrorR (os:StringBuilder) (err:PhasedDiagnostic) = | _ :: ts -> hasUnitTType_app ts | [] -> false - match minfoVirt.EnclosingType with + match minfoVirt.ApparentEnclosingType with | TType_app (t, types) when t.IsFSharpInterfaceTycon && hasUnitTType_app types -> // match abstract member with 'unit' passed as generic argument os.Append(OverrideDoesntOverride4E().Format sig1) |> ignore @@ -1295,28 +1294,32 @@ let OutputPhasedErrorR (os:StringBuilder) (err:PhasedDiagnostic) = os.Append(DeprecatedThreadStaticBindingWarningE().Format) |> ignore | FunctionValueUnexpected (denv, ty, _) -> - // REVIEW: consider if we need to show _cxs (the type parameter constraints) let ty, _cxs = PrettyTypes.PrettifyType denv.g ty - os.Append(FunctionValueUnexpectedE().Format (NicePrint.stringOfTy denv ty)) |> ignore + let errorText = FunctionValueUnexpectedE().Format (NicePrint.stringOfTy denv ty) + os.Append errorText |> ignore - | UnitTypeExpected (_, _, _) -> - let warningText = UnitTypeExpectedE().Format + | UnitTypeExpected (denv, ty, _) -> + let ty, _cxs = PrettyTypes.PrettifyType denv.g ty + let warningText = UnitTypeExpectedE().Format (NicePrint.stringOfTy denv ty) os.Append warningText |> ignore - | UnitTypeExpectedWithEquality (_) -> - let warningText = UnitTypeExpectedWithEqualityE().Format + | UnitTypeExpectedWithEquality (denv, ty, _) -> + let ty, _cxs = PrettyTypes.PrettifyType denv.g ty + let warningText = UnitTypeExpectedWithEqualityE().Format (NicePrint.stringOfTy denv ty) os.Append warningText |> ignore - | UnitTypeExpectedWithPossiblePropertySetter (_, _, bindingName, propertyName, _) -> - let warningText = UnitTypeExpectedWithPossiblePropertySetterE().Format bindingName propertyName + | UnitTypeExpectedWithPossiblePropertySetter (denv, ty, bindingName, propertyName, _) -> + let ty, _cxs = PrettyTypes.PrettifyType denv.g ty + let warningText = UnitTypeExpectedWithPossiblePropertySetterE().Format (NicePrint.stringOfTy denv ty) bindingName propertyName os.Append warningText |> ignore - | UnitTypeExpectedWithPossibleAssignment (_, _, isAlreadyMutable, bindingName, _) -> + | UnitTypeExpectedWithPossibleAssignment (denv, ty, isAlreadyMutable, bindingName, _) -> + let ty, _cxs = PrettyTypes.PrettifyType denv.g ty let warningText = if isAlreadyMutable then - UnitTypeExpectedWithPossibleAssignmentToMutableE().Format bindingName + UnitTypeExpectedWithPossibleAssignmentToMutableE().Format (NicePrint.stringOfTy denv ty) bindingName else - UnitTypeExpectedWithPossibleAssignmentE().Format bindingName + UnitTypeExpectedWithPossibleAssignmentE().Format (NicePrint.stringOfTy denv ty) bindingName os.Append warningText |> ignore | RecursiveUseCheckedAtRuntime _ -> @@ -1350,8 +1353,8 @@ let OutputPhasedErrorR (os:StringBuilder) (err:PhasedDiagnostic) = | NonUniqueInferredAbstractSlot(_, denv, bindnm, bvirt1, bvirt2, _) -> os.Append(NonUniqueInferredAbstractSlot1E().Format bindnm) |> ignore - let ty1 = bvirt1.EnclosingType - let ty2 = bvirt2.EnclosingType + let ty1 = bvirt1.ApparentEnclosingType + let ty2 = bvirt2.ApparentEnclosingType // REVIEW: consider if we need to show _cxs (the type parameter constraints) let t1, t2, _cxs = NicePrint.minimalStringsOfTwoTypes denv ty1 ty2 os.Append(NonUniqueInferredAbstractSlot2E().Format) |> ignore @@ -1400,6 +1403,15 @@ let OutputPhasedErrorR (os:StringBuilder) (err:PhasedDiagnostic) = if isComp then os.Append(MatchIncomplete4E().Format) |> ignore + | PatternMatchCompilation.EnumMatchIncomplete (isComp, cexOpt, _) -> + os.Append(EnumMatchIncomplete1E().Format) |> ignore + match cexOpt with + | None -> () + | Some (cex, false) -> os.Append(MatchIncomplete2E().Format cex) |> ignore + | Some (cex, true) -> os.Append(MatchIncomplete3E().Format cex) |> ignore + if isComp then + os.Append(MatchIncomplete4E().Format) |> ignore + | PatternMatchCompilation.RuleNeverMatched _ -> os.Append(RuleNeverMatchedE().Format) |> ignore | ValNotMutable(_, valRef, _) -> os.Append(ValNotMutableE().Format(valRef.DisplayName)) |> ignore @@ -1592,7 +1604,7 @@ let SanitizeFileName fileName implicitIncludeDir = let currentDir = implicitIncludeDir // if the file name is not rooted in the current directory, return the full path - if not(fullPath.StartsWith(currentDir)) then + if not(fullPath.StartsWithOrdinal(currentDir)) then fullPath // if the file name is rooted in the current directory, return the relative path else @@ -1784,7 +1796,7 @@ type private TypeInThisAssembly = class end let GetDefaultSystemValueTupleReference () = try let asm = typeof>.Assembly - if asm.FullName.StartsWith "System.ValueTuple" then + if asm.FullName.StartsWithOrdinal("System.ValueTuple") then Some asm.Location else let location = Path.GetDirectoryName(typeof.Assembly.Location) @@ -1912,8 +1924,6 @@ let SystemAssemblies () = yield "System.Threading.Timer" yield "FSharp.Compiler.Interactive.Settings" - yield "Microsoft.DiaSymReader" - yield "Microsoft.DiaSymReader.PortablePdb" yield "Microsoft.Win32.Registry" yield "System.Diagnostics.Tracing" yield "System.Globalization.Calendars" @@ -2015,7 +2025,7 @@ let GetWarningNumber(m, s:string) = // therefore if we have warning id that starts with a numeric digit we convert it to Some (int32) // anything else is ignored None if Char.IsDigit(s.[0]) then Some (int32 s) - elif s.StartsWith("FS", StringComparison.Ordinal) = true then raise (new ArgumentException()) + elif s.StartsWithOrdinal("FS") = true then raise (new ArgumentException()) else None with err -> warning(Error(FSComp.SR.buildInvalidWarningNumber(s), m)) @@ -2035,6 +2045,7 @@ let ComputeMakePathAbsolute implicitIncludeDir (path : string) = // Configuration //---------------------------------------------------------------------------- +[] type CompilerTarget = | WinExe | ConsoleExe @@ -2042,8 +2053,12 @@ type CompilerTarget = | Module member x.IsExe = (match x with ConsoleExe | WinExe -> true | _ -> false) +[] type ResolveAssemblyReferenceMode = Speculative | ReportErrors +[] +type CopyFSharpCoreFlag = Yes | No + /// Represents the file or string used for the --version flag type VersionFlag = | VersionString of string @@ -2077,9 +2092,9 @@ type IRawFSharpAssemblyData = abstract GetInternalsVisibleToAttributes : ILGlobals -> string list /// The raw IL module definition in the assembly, if any. This is not present for cross-project references /// in the language service - abstract TryGetRawILModule : unit -> ILModuleDef option + abstract TryGetILModuleDef : unit -> ILModuleDef option /// The raw F# signature data in the assembly, if any - abstract GetRawFSharpSignatureData : range * ilShortAssemName: string * fileName: string -> (string * byte[]) list + abstract GetRawFSharpSignatureData : range * ilShortAssemName: string * fileName: string -> (string * (unit -> byte[])) list /// The raw F# optimization data in the assembly, if any abstract GetRawFSharpOptimizationData : range * ilShortAssemName: string * fileName: string -> (string * (unit -> byte[])) list /// The table of type forwarders in the assembly @@ -2097,12 +2112,13 @@ type TimeStampCache(defaultTimeStamp: DateTime) = let projects = Dictionary(HashIdentity.Reference) member cache.GetFileTimeStamp fileName = let ok, v = files.TryGetValue(fileName) - if ok then v else + if ok then v else let v = - if FileSystem.SafeExists(fileName) then + try FileSystem.GetLastWriteTimeShim(fileName) - else - defaultTimeStamp + with + | :? FileNotFoundException -> + defaultTimeStamp files.[fileName] <- v v @@ -2178,13 +2194,13 @@ type CcuLoadFailureAction = | RaiseError | ReturnNone +[] type TcConfigBuilder = { mutable primaryAssembly : PrimaryAssembly mutable autoResolveOpenDirectivesToDlls: bool mutable noFeedback: bool mutable stackReserveSize: int32 option mutable implicitIncludeDir: string (* normally "." *) - mutable openBinariesInMemory: bool (* false for command line, true for VS *) mutable openDebugInformationForLaterStaticLinking: bool (* only for --standalone *) defaultFSharpBinariesDir: string mutable compilingFslib: bool @@ -2204,7 +2220,7 @@ type TcConfigBuilder = mutable referencedDLLs : AssemblyReference list mutable projectReferences : IProjectReference list mutable knownUnresolvedReferences : UnresolvedAssemblyReference list - optimizeForMemory: bool + reduceMemoryUsage: ReduceMemoryFlag mutable subsystemVersion : int * int mutable useHighEntropyVA : bool mutable inputCodePage: int option @@ -2286,9 +2302,7 @@ type TcConfigBuilder = mutable optSettings : Optimizer.OptimizationSettings mutable emitTailcalls : bool mutable deterministic : bool -#if PREFERRED_UI_LANG mutable preferredUiLang: string option -#endif mutable lcid : int option mutable productNameForBannerText : string /// show the MS (c) notice, e.g. with help or fsi? @@ -2317,9 +2331,6 @@ type TcConfigBuilder = isInvalidationSupported : bool /// used to log sqm data - mutable sqmSessionGuid : System.Guid option - mutable sqmNumOfSourceFiles : int - sqmSessionStartedTime : int64 /// if true - every expression in quotations will be augmented with full debug info (filename, location in file) mutable emitDebugInfoInQuotations : bool @@ -2327,10 +2338,16 @@ type TcConfigBuilder = mutable exename : string option // If true - the compiler will copy FSharp.Core.dll along the produced binaries - mutable copyFSharpCore : bool + mutable copyFSharpCore : CopyFSharpCoreFlag /// When false FSI will lock referenced assemblies requiring process restart, false = disable Shadow Copy false (*default*) mutable shadowCopyReferences : bool + + /// A function to call to try to get an object that acts as a snapshot of the metadata section of a .NET binary, + /// and from which we can read the metadata. Only used when metadataOnly=true. + mutable tryGetMetadataSnapshot : ILReaderTryGetMetadataSnapshot + + mutable internalTestSpanStackReferring : bool } static member Initial = @@ -2346,7 +2363,6 @@ type TcConfigBuilder = conditionalCompilationDefines = [] implicitIncludeDir = String.Empty autoResolveOpenDirectivesToDlls = false - openBinariesInMemory = false openDebugInformationForLaterStaticLinking = false defaultFSharpBinariesDir = String.Empty compilingFslib = false @@ -2367,7 +2383,7 @@ type TcConfigBuilder = errorSeverityOptions = FSharpErrorSeverityOptions.Default embedResources = [] inputCodePage = None - optimizeForMemory = true + reduceMemoryUsage = ReduceMemoryFlag.Yes // always gets set explicitly subsystemVersion = 4, 0 // per spec for 357994 useHighEntropyVA = false mlCompatibility = false @@ -2377,7 +2393,7 @@ type TcConfigBuilder = platform = None prefer32Bit = false useSimpleResolution = runningOnMono - target = ConsoleExe + target = CompilerTarget.ConsoleExe debuginfo = false testFlagEmitFeeFeeAs100001 = false dumpDebugInfo = false @@ -2447,9 +2463,7 @@ type TcConfigBuilder = optSettings = Optimizer.OptimizationSettings.Defaults emitTailcalls = true deterministic = false -#if PREFERRED_UI_LANG preferredUiLang = None -#endif lcid = None // See bug 6071 for product banner spec productNameForBannerText = FSComp.SR.buildProductName(FSharpEnvironment.FSharpBannerVersion) @@ -2465,29 +2479,32 @@ type TcConfigBuilder = noDebugData = false isInteractive = false isInvalidationSupported = false - sqmSessionGuid = None - sqmNumOfSourceFiles = 0 - sqmSessionStartedTime = System.DateTime.UtcNow.Ticks emitDebugInfoInQuotations = false exename = None - copyFSharpCore = false + copyFSharpCore = CopyFSharpCoreFlag.No shadowCopyReferences = false + tryGetMetadataSnapshot = (fun _ -> None) + internalTestSpanStackReferring = false } - static member CreateNew(legacyReferenceResolver, defaultFSharpBinariesDir, optimizeForMemory, implicitIncludeDir, - isInteractive, isInvalidationSupported, defaultCopyFSharpCore) = - Debug.Assert(FileSystem.IsPathRootedShim(implicitIncludeDir), sprintf "implicitIncludeDir should be absolute: '%s'" implicitIncludeDir) - if (String.IsNullOrEmpty(defaultFSharpBinariesDir)) then - failwith "Expected a valid defaultFSharpBinariesDir" - { TcConfigBuilder.Initial with - implicitIncludeDir = implicitIncludeDir - defaultFSharpBinariesDir = defaultFSharpBinariesDir - optimizeForMemory = optimizeForMemory - legacyReferenceResolver = legacyReferenceResolver - isInteractive = isInteractive - isInvalidationSupported = isInvalidationSupported - copyFSharpCore = defaultCopyFSharpCore - } + static member CreateNew(legacyReferenceResolver, defaultFSharpBinariesDir, reduceMemoryUsage, implicitIncludeDir, + isInteractive, isInvalidationSupported, defaultCopyFSharpCore, tryGetMetadataSnapshot) = + + Debug.Assert(FileSystem.IsPathRootedShim(implicitIncludeDir), sprintf "implicitIncludeDir should be absolute: '%s'" implicitIncludeDir) + + if (String.IsNullOrEmpty(defaultFSharpBinariesDir)) then + failwith "Expected a valid defaultFSharpBinariesDir" + + { TcConfigBuilder.Initial with + implicitIncludeDir = implicitIncludeDir + defaultFSharpBinariesDir = defaultFSharpBinariesDir + reduceMemoryUsage = reduceMemoryUsage + legacyReferenceResolver = legacyReferenceResolver + isInteractive = isInteractive + isInvalidationSupported = isInvalidationSupported + copyFSharpCore = defaultCopyFSharpCore + tryGetMetadataSnapshot = tryGetMetadataSnapshot + } member tcConfigB.ResolveSourceFile(m, nm, pathLoadedFrom) = use unwindBuildPhase = PushThreadBuildPhaseUntilUnwind BuildPhase.Parameter @@ -2497,7 +2514,7 @@ type TcConfigBuilder = member tcConfigB.DecideNames (sourceFiles) = use unwindBuildPhase = PushThreadBuildPhaseUntilUnwind BuildPhase.Parameter if sourceFiles = [] then errorR(Error(FSComp.SR.buildNoInputsSpecified(), rangeCmdArgs)) - let ext() = match tcConfigB.target with Dll -> ".dll" | Module -> ".netmodule" | ConsoleExe | WinExe -> ".exe" + let ext() = match tcConfigB.target with CompilerTarget.Dll -> ".dll" | CompilerTarget.Module -> ".netmodule" | CompilerTarget.ConsoleExe | CompilerTarget.WinExe -> ".exe" let implFiles = sourceFiles |> List.filter (fun lower -> List.exists (Filename.checkSuffix (String.lowercase lower)) FSharpImplFileSuffixes) let outfile = match tcConfigB.outputFile, List.rev implFiles with @@ -2592,13 +2609,13 @@ type TcConfigBuilder = member tcConfigB.RemoveReferencedAssemblyByPath (m, path) = tcConfigB.referencedDLLs <- tcConfigB.referencedDLLs |> List.filter (fun ar-> ar.Range <> m || ar.Text <> path) - static member SplitCommandLineResourceInfo ri = - if String.contains ri ',' then - let p = String.index ri ',' + static member SplitCommandLineResourceInfo (ri:string) = + let p = ri.IndexOf ',' + if p <> -1 then let file = String.sub ri 0 p let rest = String.sub ri (p+1) (String.length ri - p - 1) - if String.contains rest ',' then - let p = String.index rest ',' + let p = rest.IndexOf ',' + if p <> -1 then let name = String.sub rest 0 p+".resources" let pubpri = String.sub rest (p+1) (rest.Length - p - 1) if pubpri = "public" then file, name, ILResourceAccess.Public @@ -2610,27 +2627,16 @@ type TcConfigBuilder = ri, fileNameOfPath ri, ILResourceAccess.Public -let OpenILBinary(filename, optimizeForMemory, openBinariesInMemory, ilGlobalsOpt, pdbPathOption, shadowCopyReferences) = - let ilGlobals = - // ILScopeRef.Local can be used only for primary assembly (mscorlib or System.Runtime) itself - // Remaining assemblies should be opened using existing ilGlobals (so they can properly locate fundamental types) - match ilGlobalsOpt with - | None -> mkILGlobals ILScopeRef.Local - | Some g -> g - - let opts = { ILBinaryReader.mkDefault ilGlobals with - // fsc.exe does not uses optimizeForMemory (hence keeps MORE caches in AbstractIL) - // fsi.exe does use optimizeForMemory (hence keeps FEWER caches in AbstractIL), because its long running - // Visual Studio does use optimizeForMemory (hence keeps FEWER caches in AbstractIL), because its long running - ILBinaryReader.optimizeForMemory=optimizeForMemory - ILBinaryReader.pdbPath = pdbPathOption } +let OpenILBinary(filename, reduceMemoryUsage, ilGlobals, pdbDirPath, shadowCopyReferences, tryGetMetadataSnapshot) = + let opts : ILReaderOptions = + { ilGlobals = ilGlobals + metadataOnly = MetadataOnlyFlag.Yes + reduceMemoryUsage = reduceMemoryUsage + pdbDirPath = pdbDirPath + tryGetMetadataSnapshot = tryGetMetadataSnapshot } - // Visual Studio uses OpenILModuleReaderAfterReadingAllBytes for all DLLs to avoid having to dispose of any readers explicitly - if openBinariesInMemory then // && not syslib - ILBinaryReader.OpenILModuleReaderAfterReadingAllBytes filename opts - else - let location = -#if !FX_RESHAPED_REFLECTION_CORECLR // shadow copy not supported + let location = +#if !FX_RESHAPED_REFLECTION // shadow copy not supported // In order to use memory mapped files on the shadow copied version of the Assembly, we `preload the assembly // We swallow all exceptions so that we do not change the exception contract of this API if shadowCopyReferences then @@ -2642,7 +2648,7 @@ let OpenILBinary(filename, optimizeForMemory, openBinariesInMemory, ilGlobalsOpt ignore shadowCopyReferences #endif filename - ILBinaryReader.OpenILModuleReader location opts + AssemblyReader.GetILModuleReader(location, opts) #if DEBUG [] @@ -2665,7 +2671,7 @@ type AssemblyResolution = /// This is because ``EvaluateRawContents(ctok)`` is used. However this path is only currently used /// in fsi.fs, which does not use project references. // - member this.GetILAssemblyRef(ctok) = + member this.GetILAssemblyRef(ctok, reduceMemoryUsage, tryGetMetadataSnapshot) = cancellable { match !this.ilAssemblyRef with | Some(assref) -> return assref @@ -2687,8 +2693,13 @@ type AssemblyResolution = match assRefOpt with | Some aref -> aref | None -> - let readerSettings : ILBinaryReader.ILReaderOptions = {pdbPath=None;ilGlobals = EcmaMscorlibILGlobals;optimizeForMemory=false} - use reader = ILBinaryReader.OpenILModuleReaderAfterReadingAllBytes this.resolvedPath readerSettings + let readerSettings : ILReaderOptions = + { pdbDirPath=None + ilGlobals = EcmaMscorlibILGlobals + reduceMemoryUsage = reduceMemoryUsage + metadataOnly = MetadataOnlyFlag.Yes + tryGetMetadataSnapshot = tryGetMetadataSnapshot } + use reader = OpenILModuleReader this.resolvedPath readerSettings mkRefToILAssembly reader.ILModuleDef.ManifestOfAssembly this.ilAssemblyRef := Some(assRef) return assRef @@ -2767,12 +2778,13 @@ type TcConfig private (data : TcConfigBuilder, validate:bool) = do if ((primaryAssemblyExplicitFilenameOpt.IsSome || fslibExplicitFilenameOpt.IsSome) && data.framework) then error(Error(FSComp.SR.buildExplicitCoreLibRequiresNoFramework("--noframework"), rangeStartup)) + let ilGlobals = mkILGlobals ILScopeRef.Local let clrRootValue, targetFrameworkVersionValue = match primaryAssemblyExplicitFilenameOpt with | Some(primaryAssemblyFilename) -> let filename = ComputeMakePathAbsolute data.implicitIncludeDir primaryAssemblyFilename try - use ilReader = OpenILBinary(filename, data.optimizeForMemory, data.openBinariesInMemory, None, None, data.shadowCopyReferences) + use ilReader = OpenILBinary(filename, data.reduceMemoryUsage, ilGlobals, None, data.shadowCopyReferences, data.tryGetMetadataSnapshot) let ilModule = ilReader.ILModuleDef match ilModule.ManifestOfAssembly.Version with | Some(v1, v2, _, _) -> @@ -2796,15 +2808,16 @@ type TcConfig private (data : TcConfigBuilder, validate:bool) = // Look for an explicit reference to FSharp.Core and use that to compute fsharpBinariesDir // FUTURE: remove this, we only read the binary for the exception it raises let fsharpBinariesDirValue = -#if FX_NO_SIMPLIFIED_LOADER +// NOTE: It's not clear why this behaviour has been changed for the NETSTANDARD compilations of the F# compiler +#if NETSTANDARD1_6 || NETSTANDARD2_0 data.defaultFSharpBinariesDir #else match fslibExplicitFilenameOpt with - | Some(fslibFilename) -> + | Some fslibFilename -> let filename = ComputeMakePathAbsolute data.implicitIncludeDir fslibFilename if fslibReference.ProjectReference.IsNone then try - use ilReader = OpenILBinary(filename, data.optimizeForMemory, data.openBinariesInMemory, None, None, data.shadowCopyReferences) + use ilReader = OpenILBinary(filename, data.reduceMemoryUsage, ilGlobals, None, data.shadowCopyReferences, data.tryGetMetadataSnapshot) () with e -> error(Error(FSComp.SR.buildErrorOpeningBinaryFile(filename, e.Message), rangeStartup)) @@ -2820,7 +2833,6 @@ type TcConfig private (data : TcConfigBuilder, validate:bool) = member x.noFeedback = data.noFeedback member x.stackReserveSize = data.stackReserveSize member x.implicitIncludeDir = data.implicitIncludeDir - member x.openBinariesInMemory = data.openBinariesInMemory member x.openDebugInformationForLaterStaticLinking = data.openDebugInformationForLaterStaticLinking member x.fsharpBinariesDir = fsharpBinariesDirValue member x.compilingFslib = data.compilingFslib @@ -2840,7 +2852,7 @@ type TcConfig private (data : TcConfigBuilder, validate:bool) = member x.referencedDLLs = data.referencedDLLs member x.knownUnresolvedReferences = data.knownUnresolvedReferences member x.clrRoot = clrRootValue - member x.optimizeForMemory = data.optimizeForMemory + member x.reduceMemoryUsage = data.reduceMemoryUsage member x.subsystemVersion = data.subsystemVersion member x.useHighEntropyVA = data.useHighEntropyVA member x.inputCodePage = data.inputCodePage @@ -2913,9 +2925,7 @@ type TcConfig private (data : TcConfigBuilder, validate:bool) = member x.optSettings = data.optSettings member x.emitTailcalls = data.emitTailcalls member x.deterministic = data.deterministic -#if PREFERRED_UI_LANG member x.preferredUiLang = data.preferredUiLang -#endif member x.lcid = data.lcid member x.optsOn = data.optsOn member x.productNameForBannerText = data.productNameForBannerText @@ -2932,11 +2942,10 @@ type TcConfig private (data : TcConfigBuilder, validate:bool) = member x.isInteractive = data.isInteractive member x.isInvalidationSupported = data.isInvalidationSupported member x.emitDebugInfoInQuotations = data.emitDebugInfoInQuotations - member x.sqmSessionGuid = data.sqmSessionGuid - member x.sqmNumOfSourceFiles = data.sqmNumOfSourceFiles - member x.sqmSessionStartedTime = data.sqmSessionStartedTime member x.copyFSharpCore = data.copyFSharpCore member x.shadowCopyReferences = data.shadowCopyReferences + member x.tryGetMetadataSnapshot = data.tryGetMetadataSnapshot + member x.internalTestSpanStackReferring = data.internalTestSpanStackReferring static member Create(builder, validate) = use unwindBuildPhase = PushThreadBuildPhaseUntilUnwind BuildPhase.Parameter TcConfig(builder, validate) @@ -2960,7 +2969,8 @@ type TcConfig private (data : TcConfigBuilder, validate:bool) = yield tcConfig.MakePathAbsolute x | None -> -#if FSI_TODO_NETCORE // there is no really good notion of runtime directory on .NETCore +// "there is no really good notion of runtime directory on .NETCore" +#if NETSTANDARD1_6 || NETSTANDARD2_0 let runtimeRoot = Path.GetDirectoryName(typeof.Assembly.Location) #else let runtimeRoot = System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory() @@ -3070,10 +3080,6 @@ type TcConfig private (data : TcConfigBuilder, validate:bool) = let ext = System.IO.Path.GetExtension(nm) let isNetModule = String.Compare(ext, ".netmodule", StringComparison.OrdinalIgnoreCase)=0 - let unknownToolTip (resolvedPath, resolved) = - let line(append:string) = append.Trim([|' '|])+"\n" - line(resolvedPath) + line(resolved) - // See if the language service has already produced the contents of the assembly for us, virtually match r.ProjectReference with | Some _ -> @@ -3105,20 +3111,13 @@ type TcConfig private (data : TcConfigBuilder, validate:bool) = match resolved with | Some(resolved) -> let sysdir = tcConfig.IsSystemAssembly resolved - let fusionName = - if isNetModule then "" - else - try - let readerSettings : ILBinaryReader.ILReaderOptions = {pdbPath=None;ilGlobals = EcmaMscorlibILGlobals;optimizeForMemory=false} - use reader = ILBinaryReader.OpenILModuleReaderAfterReadingAllBytes resolved readerSettings - let assRef = mkRefToILAssembly reader.ILModuleDef.ManifestOfAssembly - assRef.QualifiedName - with e -> - "" Some { originalReference = r resolvedPath = resolved - prepareToolTip = (fun () -> unknownToolTip (resolved, fusionName)) + prepareToolTip = (fun () -> + let fusionName = System.Reflection.AssemblyName.GetAssemblyName(resolved).ToString() + let line(append:string) = append.Trim([|' '|])+"\n" + line(resolved) + line(fusionName)) sysdir = sysdir ilAssemblyRef = ref None } | None -> None @@ -3180,7 +3179,7 @@ type TcConfig private (data : TcConfigBuilder, validate:bool) = let logDiagnostic showMessages = (fun isError code message-> - if showMessages && mode = ReportErrors then + if showMessages && mode = ResolveAssemblyReferenceMode.ReportErrors then if isError then errorR(MSBuildReferenceResolutionError(code, message, errorAndWarningRange)) else @@ -3246,11 +3245,11 @@ type TcConfig private (data : TcConfigBuilder, validate:bool) = ms|>List.map(fun originalReference -> System.Diagnostics.Debug.Assert(FileSystem.IsPathRootedShim(resolvedFile.itemSpec), sprintf "msbuild-resolved path is not absolute: '%s'" resolvedFile.itemSpec) let canonicalItemSpec = FileSystem.GetFullPathShim(resolvedFile.itemSpec) - {originalReference=originalReference - resolvedPath=canonicalItemSpec - prepareToolTip = (fun () -> resolvedFile.prepareToolTip (originalReference.Text, canonicalItemSpec)) - sysdir= tcConfig.IsSystemAssembly canonicalItemSpec - ilAssemblyRef = ref None}) + { originalReference=originalReference + resolvedPath=canonicalItemSpec + prepareToolTip = (fun () -> resolvedFile.prepareToolTip (originalReference.Text, canonicalItemSpec)) + sysdir= tcConfig.IsSystemAssembly canonicalItemSpec + ilAssemblyRef = ref None }) (maxIndexOfReference, assemblyResolutions)) // When calculating the resulting resolutions, we're going to use the index of the reference @@ -3279,7 +3278,7 @@ type TcConfig private (data : TcConfigBuilder, validate:bool) = // If mode=Speculative, then we haven't reported any errors. // We report the error condition by returning an empty list of resolutions - if mode = Speculative && (List.length unresolvedReferences) > 0 then + if mode = ResolveAssemblyReferenceMode.Speculative && (List.length unresolvedReferences) > 0 then [], (List.ofArray groupedReferences) |> List.map (fun (name, _, r) -> (name, r)) |> List.map UnresolvedAssemblyReference else resultingResolutions, unresolvedReferences |> List.map (fun (name, _, r) -> (name, r)) |> List.map UnresolvedAssemblyReference @@ -3625,7 +3624,7 @@ let ParseOneInputLexbuf (tcConfig:TcConfig, lexResourceManager, conditionalCompi with e -> (* errorR(Failure("parse failed")); *) errorRecovery e rangeStartup; None -let ParseOneInputFile (tcConfig:TcConfig, lexResourceManager, conditionalCompilationDefines, filename, isLastCompiland, errorLogger, retryLocked) = +let ParseOneInputFile (tcConfig: TcConfig, lexResourceManager, conditionalCompilationDefines, filename, isLastCompiland, errorLogger, retryLocked) = try let lower = String.lowercase filename if List.exists (Filename.checkSuffix lower) (FSharpSigFileSuffixes@FSharpImplFileSuffixes) then @@ -3639,16 +3638,16 @@ let ParseOneInputFile (tcConfig:TcConfig, lexResourceManager, conditionalCompila [] -type TcAssemblyResolutions(results : AssemblyResolution list, unresolved : UnresolvedAssemblyReference list) = +type TcAssemblyResolutions(tcConfig: TcConfig, results: AssemblyResolution list, unresolved : UnresolvedAssemblyReference list) = let originalReferenceToResolution = results |> List.map (fun r -> r.originalReference.Text, r) |> Map.ofList let resolvedPathToResolution = results |> List.map (fun r -> r.resolvedPath, r) |> Map.ofList /// Add some resolutions to the map of resolution results. - member tcResolutions.AddResolutionResults(newResults) = TcAssemblyResolutions(results @ newResults, unresolved) + member tcResolutions.AddResolutionResults(newResults) = TcAssemblyResolutions(tcConfig, results @ newResults, unresolved) /// Add some unresolved results. - member tcResolutions.AddUnresolvedReferences(newUnresolved) = TcAssemblyResolutions(results, unresolved @ newUnresolved) + member tcResolutions.AddUnresolvedReferences(newUnresolved) = TcAssemblyResolutions(tcConfig, results, unresolved @ newUnresolved) /// Get information about referenced DLLs member tcResolutions.GetAssemblyResolutions() = results @@ -3658,13 +3657,13 @@ type TcAssemblyResolutions(results : AssemblyResolution list, unresolved : Unres /// This doesn't need to be cancellable, it is only used by F# Interactive member tcResolution.TryFindByExactILAssemblyRef (ctok, assref) = results |> List.tryFind (fun ar-> - let r = ar.GetILAssemblyRef(ctok) |> Cancellable.runWithoutCancellation + let r = ar.GetILAssemblyRef(ctok, tcConfig.reduceMemoryUsage, tcConfig.tryGetMetadataSnapshot) |> Cancellable.runWithoutCancellation r = assref) /// This doesn't need to be cancellable, it is only used by F# Interactive member tcResolution.TryFindBySimpleAssemblyName (ctok, simpleAssemName) = results |> List.tryFind (fun ar-> - let r = ar.GetILAssemblyRef(ctok) |> Cancellable.runWithoutCancellation + let r = ar.GetILAssemblyRef(ctok, tcConfig.reduceMemoryUsage, tcConfig.tryGetMetadataSnapshot) |> Cancellable.runWithoutCancellation r.Name = simpleAssemName) member tcResolutions.TryFindByResolvedPath nm = resolvedPathToResolution.TryFind nm @@ -3686,8 +3685,8 @@ type TcAssemblyResolutions(results : AssemblyResolution list, unresolved : Unres successes, failures else RequireCompilationThread ctok // we don't want to do assembly resolution concurrently, we assume MSBuild doesn't handle this - TcConfig.TryResolveLibsUsingMSBuildRules (tcConfig, assemblyList, rangeStartup, ReportErrors) - TcAssemblyResolutions(resolved, unresolved @ knownUnresolved) + TcConfig.TryResolveLibsUsingMSBuildRules (tcConfig, assemblyList, rangeStartup, ResolveAssemblyReferenceMode.ReportErrors) + TcAssemblyResolutions(tcConfig, resolved, unresolved @ knownUnresolved) static member GetAllDllReferences (tcConfig:TcConfig) = @@ -3752,50 +3751,46 @@ type TcAssemblyResolutions(results : AssemblyResolution list, unresolved : Unres //-------------------------------------------------------------------------- let IsSignatureDataResource (r: ILResource) = - r.Name.StartsWith FSharpSignatureDataResourceName || - r.Name.StartsWith FSharpSignatureDataResourceName2 + r.Name.StartsWithOrdinal(FSharpSignatureDataResourceName) || + r.Name.StartsWithOrdinal(FSharpSignatureDataResourceName2) let IsOptimizationDataResource (r: ILResource) = - r.Name.StartsWith FSharpOptimizationDataResourceName || - r.Name.StartsWith FSharpOptimizationDataResourceName2 + r.Name.StartsWithOrdinal(FSharpOptimizationDataResourceName)|| + r.Name.StartsWithOrdinal(FSharpOptimizationDataResourceName2) let GetSignatureDataResourceName (r: ILResource) = - if r.Name.StartsWith FSharpSignatureDataResourceName then + if r.Name.StartsWithOrdinal(FSharpSignatureDataResourceName) then String.dropPrefix r.Name FSharpSignatureDataResourceName - elif r.Name.StartsWith FSharpSignatureDataResourceName2 then + elif r.Name.StartsWithOrdinal(FSharpSignatureDataResourceName2) then String.dropPrefix r.Name FSharpSignatureDataResourceName2 else failwith "GetSignatureDataResourceName" let GetOptimizationDataResourceName (r: ILResource) = - if r.Name.StartsWith FSharpOptimizationDataResourceName then + if r.Name.StartsWithOrdinal(FSharpOptimizationDataResourceName) then String.dropPrefix r.Name FSharpOptimizationDataResourceName - elif r.Name.StartsWith FSharpOptimizationDataResourceName2 then + elif r.Name.StartsWithOrdinal(FSharpOptimizationDataResourceName2) then String.dropPrefix r.Name FSharpOptimizationDataResourceName2 else failwith "GetOptimizationDataResourceName" -let IsReflectedDefinitionsResource (r: ILResource) = r.Name.StartsWith QuotationPickler.SerializedReflectedDefinitionsResourceNameBase - -type ILResource with - /// Get a function to read the bytes from a resource local to an assembly - member r.GetByteReader(m) = - match r.Location with - | ILResourceLocation.Local b -> b - | _-> error(InternalError("GetByteReader", m)) +let IsReflectedDefinitionsResource (r: ILResource) = + r.Name.StartsWithOrdinal(QuotationPickler.SerializedReflectedDefinitionsResourceNameBase) let MakeILResource rname bytes = { Name = rname - Location = ILResourceLocation.Local (fun () -> bytes) + Location = ILResourceLocation.LocalOut bytes Access = ILResourceAccess.Public - CustomAttrs = emptyILCustomAttrs } + CustomAttrsStored = storeILCustomAttrs emptyILCustomAttrs + MetadataIndex = NoMetadataIdx } let PickleToResource inMem file g scope rname p x = { Name = rname - Location = (let bytes = pickleObjWithDanglingCcus inMem file g scope p x in ILResourceLocation.Local (fun () -> bytes)) + Location = (let bytes = pickleObjWithDanglingCcus inMem file g scope p x in ILResourceLocation.LocalOut bytes) Access = ILResourceAccess.Public - CustomAttrs = emptyILCustomAttrs } + CustomAttrsStored = storeILCustomAttrs emptyILCustomAttrs + MetadataIndex = NoMetadataIdx } let GetSignatureData (file, ilScopeRef, ilModule, byteReader) : PickledDataWithReferences = - unpickleObjWithDanglingCcus file ilScopeRef ilModule unpickleCcuInfo byteReader + unpickleObjWithDanglingCcus file ilScopeRef ilModule unpickleCcuInfo (byteReader()) let WriteSignatureData (tcConfig: TcConfig, tcGlobals, exportRemapping, ccu: CcuThunk, file, inMem) : ILResource = let mspec = ccu.Contents @@ -3825,29 +3820,28 @@ type RawFSharpAssemblyDataBackedByFileOnDisk (ilModule: ILModuleDef, ilAssemblyR interface IRawFSharpAssemblyData with member __.GetAutoOpenAttributes(ilg) = GetAutoOpenAttributes ilg ilModule member __.GetInternalsVisibleToAttributes(ilg) = GetInternalsVisibleToAttributes ilg ilModule - member __.TryGetRawILModule() = Some ilModule + member __.TryGetILModuleDef() = Some ilModule member __.GetRawFSharpSignatureData(m, ilShortAssemName, filename) = let resources = ilModule.Resources.AsList let sigDataReaders = [ for iresource in resources do if IsSignatureDataResource iresource then - let ccuName = GetSignatureDataResourceName iresource - let byteReader = iresource.GetByteReader(m) - yield (ccuName, byteReader()) ] + let ccuName = GetSignatureDataResourceName iresource + yield (ccuName, fun () -> iresource.GetBytes()) ] let sigDataReaders = if sigDataReaders.IsEmpty && List.contains ilShortAssemName externalSigAndOptData then let sigFileName = Path.ChangeExtension(filename, "sigdata") if not (FileSystem.SafeExists sigFileName) then error(Error(FSComp.SR.buildExpectedSigdataFile (FileSystem.GetFullPathShim sigFileName), m)) - [ (ilShortAssemName, FileSystem.ReadAllBytesShim sigFileName)] + [ (ilShortAssemName, fun () -> FileSystem.ReadAllBytesShim sigFileName)] else sigDataReaders sigDataReaders member __.GetRawFSharpOptimizationData(m, ilShortAssemName, filename) = let optDataReaders = ilModule.Resources.AsList - |> List.choose (fun r -> if IsOptimizationDataResource r then Some(GetOptimizationDataResourceName r, r.GetByteReader(m)) else None) + |> List.choose (fun r -> if IsOptimizationDataResource r then Some(GetOptimizationDataResourceName r, (fun () -> r.GetBytes())) else None) // Look for optimization data in a file let optDataReaders = @@ -4059,11 +4053,15 @@ type TcImports(tcConfigP:TcConfigProvider, initialResolutions:TcAssemblyResoluti let ilScopeRef = ILScopeRef.Assembly (ILAssemblyRef.FromAssemblyName aname) let fileName = aname.Name + ".dll" let bytes = assembly.PApplyWithProvider((fun (assembly, provider) -> assembly.GetManifestModuleContents(provider)), m).PUntaint(id, m) + let tcConfig = tcConfigP.Get(ctok) let ilModule, ilAssemblyRefs = - let opts = { ILBinaryReader.mkDefault g.ilg with - ILBinaryReader.optimizeForMemory=true - ILBinaryReader.pdbPath = None } - let reader = ILBinaryReader.OpenILModuleReaderFromBytes fileName bytes opts + let opts : ILReaderOptions = + { ilGlobals = g.ilg + reduceMemoryUsage = tcConfig.reduceMemoryUsage + pdbDirPath = None + metadataOnly = MetadataOnlyFlag.Yes + tryGetMetadataSnapshot = tcConfig.tryGetMetadataSnapshot } + let reader = OpenILModuleReaderFromBytes fileName bytes opts reader.ILModuleDef, reader.ILAssemblyRefs let theActualAssembly = assembly.PUntaint((fun x -> x.Handle), m) @@ -4089,6 +4087,7 @@ type TcImports(tcConfigP:TcConfigProvider, initialResolutions:TcAssemblyResoluti FileName = Some fileName MemberSignatureEquality = (fun ty1 ty2 -> Tastops.typeEquivAux EraseAll g ty1 ty2) ImportProvidedType = (fun ty -> Import.ImportProvidedType (tcImports.GetImportMap()) m ty) + TryGetILModuleDef = (fun () -> Some ilModule) TypeForwarders = Map.empty } let ccu = CcuThunk.Create(ilShortAssemName, ccuData) @@ -4124,35 +4123,37 @@ type TcImports(tcConfigP:TcConfigProvider, initialResolutions:TcAssemblyResoluti CheckDisposed() disposeActions <- action :: disposeActions - override obj.ToString() = - sprintf "tcImports = \n dllInfos=%A\n dllTable=%A\n ccuInfos=%A\n ccuTable=%A\n Base=%s\n" - dllInfos - dllTable - ccuInfos - ccuTable - (match importsBase with None-> "None" | Some(importsBase) -> importsBase.ToString()) - - // Note: the returned binary reader is associated with the tcImports, i.e. when the tcImports are closed // then the reader is closed. member tcImports.OpenILBinaryModule(ctok, filename, m) = try CheckDisposed() let tcConfig = tcConfigP.Get(ctok) - let pdbPathOption = + let pdbDirPath = // We open the pdb file if one exists parallel to the binary we // are reading, so that --standalone will preserve debug information. if tcConfig.openDebugInformationForLaterStaticLinking then - let pdbDir = (try Filename.directoryName filename with _ -> ".") - let pdbFile = (try Filename.chopExtension filename with _ -> filename)+".pdb" - if FileSystem.SafeExists pdbFile then + let pdbDir = try Filename.directoryName filename with _ -> "." + let pdbFile = (try Filename.chopExtension filename with _ -> filename) + ".pdb" + + if FileSystem.SafeExists(pdbFile) then if verbose then dprintf "reading PDB file %s from directory %s\n" pdbFile pdbDir Some pdbDir - else - None - else + else + None + else None - let ilILBinaryReader = OpenILBinary(filename, tcConfig.optimizeForMemory, tcConfig.openBinariesInMemory, ilGlobalsOpt, pdbPathOption, tcConfig.shadowCopyReferences) + + let ilGlobals = + // ILScopeRef.Local can be used only for primary assembly (mscorlib or System.Runtime) itself + // Remaining assemblies should be opened using existing ilGlobals (so they can properly locate fundamental types) + match ilGlobalsOpt with + | None -> mkILGlobals ILScopeRef.Local + | Some g -> g + + let ilILBinaryReader = + OpenILBinary (filename, tcConfig.reduceMemoryUsage, ilGlobals, pdbDirPath, tcConfig.shadowCopyReferences, tcConfig.tryGetMetadataSnapshot) + tcImports.AttachDisposeAction(fun _ -> (ilILBinaryReader :> IDisposable).Dispose()) ilILBinaryReader.ILModuleDef, ilILBinaryReader.ILAssemblyRefs with e -> @@ -4281,14 +4282,16 @@ type TcImports(tcConfigP:TcConfigProvider, initialResolutions:TcAssemblyResoluti // Find assembly level TypeProviderAssemblyAttributes. These will point to the assemblies that // have class which implement ITypeProvider and which have TypeProviderAttribute on them. - let providerAssemblies = + let designTimeAssemblyNames = runtimeAssemblyAttributes |> List.choose (TryDecodeTypeProviderAssemblyAttr (defaultArg ilGlobalsOpt EcmaMscorlibILGlobals)) // If no design-time assembly is specified, use the runtime assembly - |> List.map (function null -> Path.GetFileNameWithoutExtension fileNameOfRuntimeAssembly | s -> s) - |> Set.ofList + |> List.map (function null -> fileNameOfRuntimeAssembly | s -> s) + // For each simple name of a design-time assembly, we take the first matching one in the order they are + // specified in the attributes + |> List.distinctBy (fun s -> try Path.GetFileNameWithoutExtension(s) with _ -> s) - if providerAssemblies.Count > 0 then + if not (List.isEmpty designTimeAssemblyNames) then // Find the SystemRuntimeAssemblyVersion value to report in the TypeProviderConfig. let primaryAssemblyVersion = @@ -4316,10 +4319,9 @@ type TcImports(tcConfigP:TcConfigProvider, initialResolutions:TcAssemblyResoluti fun arg -> systemRuntimeContainsTypeRef.Value arg let providers = - [ for assemblyName in providerAssemblies do - yield ExtensionTyping.GetTypeProvidersOfAssembly(fileNameOfRuntimeAssembly, ilScopeRefOfRuntimeAssembly, assemblyName, typeProviderEnvironment, - tcConfig.isInvalidationSupported, tcConfig.isInteractive, systemRuntimeContainsType, primaryAssemblyVersion, m) ] - let providers = providers |> List.concat + [ for designTimeAssemblyName in designTimeAssemblyNames do + yield! ExtensionTyping.GetTypeProvidersOfAssembly(fileNameOfRuntimeAssembly, ilScopeRefOfRuntimeAssembly, designTimeAssemblyName, typeProviderEnvironment, + tcConfig.isInvalidationSupported, tcConfig.isInteractive, systemRuntimeContainsType, primaryAssemblyVersion, m) ] // Note, type providers are disposable objects. The TcImports owns the provider objects - when/if it is disposed, the providers are disposed. // We ignore all exceptions from provider disposal. @@ -4399,8 +4401,8 @@ type TcImports(tcConfigP:TcConfigProvider, initialResolutions:TcAssemblyResoluti member tcImports.PrepareToImportReferencedILAssembly (ctok, m, filename, dllinfo:ImportedBinary) = CheckDisposed() let tcConfig = tcConfigP.Get(ctok) - assert dllinfo.RawMetadata.TryGetRawILModule().IsSome - let ilModule = dllinfo.RawMetadata.TryGetRawILModule().Value + assert dllinfo.RawMetadata.TryGetILModuleDef().IsSome + let ilModule = dllinfo.RawMetadata.TryGetILModuleDef().Value let ilScopeRef = dllinfo.ILScopeRef let aref = match ilScopeRef with @@ -4448,7 +4450,7 @@ type TcImports(tcConfigP:TcConfigProvider, initialResolutions:TcAssemblyResoluti let ccuRawDataAndInfos = ilModule.GetRawFSharpSignatureData(m, ilShortAssemName, filename) |> List.map (fun (ccuName, sigDataReader) -> - let data = GetSignatureData (filename, ilScopeRef, ilModule.TryGetRawILModule(), sigDataReader) + let data = GetSignatureData (filename, ilScopeRef, ilModule.TryGetILModuleDef(), sigDataReader) let optDatas = Map.ofList optDataReaders @@ -4473,6 +4475,7 @@ type TcImports(tcConfigP:TcConfigProvider, initialResolutions:TcAssemblyResoluti IsProviderGenerated = false ImportProvidedType = (fun ty -> Import.ImportProvidedType (tcImports.GetImportMap()) m ty) #endif + TryGetILModuleDef = ilModule.TryGetILModuleDef UsesFSharp20PlusQuotations = minfo.usesQuotations MemberSignatureEquality= (fun ty1 ty2 -> Tastops.typeEquivAux EraseAll (tcImports.GetTcGlobals()) ty1 ty2) TypeForwarders = ImportILAssemblyTypeForwarders(tcImports.GetImportMap, m, ilModule.GetRawTypeForwarders()) } @@ -4486,7 +4489,7 @@ type TcImports(tcConfigP:TcConfigProvider, initialResolutions:TcAssemblyResoluti if verbose then dprintf "*** no optimization data for CCU %s, was DLL compiled with --no-optimization-data??\n" ccuName None | Some info -> - let data = GetOptimizationData (filename, ilScopeRef, ilModule.TryGetRawILModule(), info) + let data = GetOptimizationData (filename, ilScopeRef, ilModule.TryGetILModuleDef(), info) let res = data.OptionalFixup(fun nm -> availableToOptionalCcu(tcImports.FindCcu(ctok, m, nm, lookupOnly=false))) if verbose then dprintf "found optimization data for CCU %s\n" ccuName Some res) @@ -4503,7 +4506,7 @@ type TcImports(tcConfigP:TcConfigProvider, initialResolutions:TcAssemblyResoluti ILScopeRef = ilScopeRef } let phase2() = #if !NO_EXTENSIONTYPING - match ilModule.TryGetRawILModule() with + match ilModule.TryGetILModuleDef() with | None -> () // no type providers can be used without a real IL Module present | Some ilModule -> ccuinfo.TypeProviders <- tcImports.ImportTypeProviderExtensions (ctok, tcConfig, filename, ilScopeRef, ilModule.ManifestOfAssembly.CustomAttrs.AsList, ccu.Contents, invalidateCcu, m) @@ -4828,6 +4831,8 @@ type TcImports(tcConfigP:TcConfigProvider, initialResolutions:TcAssemblyResoluti disposeActions <- [] for action in actions do action() + override tcImports.ToString() = "TcImports(...)" + /// Process #r in F# Interactive. /// Adds the reference to the tcImports and add the ccu to the type checking environment. let RequireDLL (ctok, tcImports:TcImports, tcEnv, thisAssemblyName, m, file) = @@ -5058,11 +5063,11 @@ module private ScriptPreprocessClosure = ParseOneInputLexbuf (tcConfig, lexResourceManager, defines, lexbuf, filename, isLastCompiland, errorLogger) /// Create a TcConfig for load closure starting from a single .fsx file - let CreateScriptSourceTcConfig (legacyReferenceResolver, defaultFSharpBinariesDir, filename:string, codeContext, useSimpleResolution, useFsiAuxLib, basicReferences, applyCommandLineArgs, assumeDotNetFramework) = + let CreateScriptTextTcConfig (legacyReferenceResolver, defaultFSharpBinariesDir, filename:string, codeContext, useSimpleResolution, useFsiAuxLib, basicReferences, applyCommandLineArgs, assumeDotNetFramework, tryGetMetadataSnapshot, reduceMemoryUsage) = let projectDir = Path.GetDirectoryName(filename) let isInteractive = (codeContext = CodeContext.CompilationAndEvaluation) let isInvalidationSupported = (codeContext = CodeContext.Editing) - let tcConfigB = TcConfigBuilder.CreateNew(legacyReferenceResolver, defaultFSharpBinariesDir, true (* optimize for memory *), projectDir, isInteractive, isInvalidationSupported, defaultCopyFSharpCore=false) + let tcConfigB = TcConfigBuilder.CreateNew(legacyReferenceResolver, defaultFSharpBinariesDir, reduceMemoryUsage, projectDir, isInteractive, isInvalidationSupported, defaultCopyFSharpCore=CopyFSharpCoreFlag.No, tryGetMetadataSnapshot=tryGetMetadataSnapshot) applyCommandLineArgs tcConfigB match basicReferences with | None -> BasicReferencesForScriptLoadClosure(useFsiAuxLib, assumeDotNetFramework) |> List.iter(fun f->tcConfigB.AddReferencedAssemblyByPath(range0, f)) // Add script references @@ -5087,7 +5092,7 @@ module private ScriptPreprocessClosure = use reader = match inputCodePage with | None -> new StreamReader(stream, true) - | Some n -> new StreamReader(stream, Encoding.GetEncodingShim(n)) + | Some (n: int) -> new StreamReader(stream, Encoding.GetEncoding(n)) let source = reader.ReadToEnd() [ClosureSource(filename, m, source, parseRequired)] with e -> @@ -5212,11 +5217,11 @@ module private ScriptPreprocessClosure = let allRootDiagnostics = allRootDiagnostics |> List.filter (fst >> isRootRange) let result : LoadClosure = - { SourceFiles = List.groupByFirst sourceFiles - References = List.groupByFirst references + { SourceFiles = List.groupBy fst sourceFiles |> List.map (map2Of2 (List.map snd)) + References = List.groupBy fst references |> List.map (map2Of2 (List.map snd)) UnresolvedReferences = unresolvedReferences Inputs = sourceInputs - NoWarns = List.groupByFirst globalNoWarns + NoWarns = List.groupBy fst globalNoWarns |> List.map (map2Of2 (List.map snd)) OriginalLoadReferences = tcConfig.loadedSources ResolutionDiagnostics = resolutionDiagnostics AllRootFileDiagnostics = allRootDiagnostics @@ -5225,18 +5230,18 @@ module private ScriptPreprocessClosure = result /// Given source text, find the full load closure. Used from service.fs, when editing a script file - let GetFullClosureOfScriptSource(ctok, legacyReferenceResolver, defaultFSharpBinariesDir, filename, source, codeContext, useSimpleResolution, useFsiAuxLib, lexResourceManager:Lexhelp.LexResourceManager, applyCommmandLineArgs, assumeDotNetFramework) = + let GetFullClosureOfScriptText(ctok, legacyReferenceResolver, defaultFSharpBinariesDir, filename, source, codeContext, useSimpleResolution, useFsiAuxLib, lexResourceManager:Lexhelp.LexResourceManager, applyCommmandLineArgs, assumeDotNetFramework, tryGetMetadataSnapshot, reduceMemoryUsage) = // Resolve the basic references such as FSharp.Core.dll first, before processing any #I directives in the script // // This is tries to mimic the action of running the script in F# Interactive - the initial context for scripting is created // first, then #I and other directives are processed. let references0 = - let tcConfig = CreateScriptSourceTcConfig(legacyReferenceResolver, defaultFSharpBinariesDir, filename, codeContext, useSimpleResolution, useFsiAuxLib, None, applyCommmandLineArgs, assumeDotNetFramework) + let tcConfig = CreateScriptTextTcConfig(legacyReferenceResolver, defaultFSharpBinariesDir, filename, codeContext, useSimpleResolution, useFsiAuxLib, None, applyCommmandLineArgs, assumeDotNetFramework, tryGetMetadataSnapshot, reduceMemoryUsage) let resolutions0, _unresolvedReferences = GetAssemblyResolutionInformation(ctok, tcConfig) let references0 = resolutions0 |> List.map (fun r->r.originalReference.Range, r.resolvedPath) |> Seq.distinct |> List.ofSeq references0 - let tcConfig = CreateScriptSourceTcConfig(legacyReferenceResolver, defaultFSharpBinariesDir, filename, codeContext, useSimpleResolution, useFsiAuxLib, Some references0, applyCommmandLineArgs, assumeDotNetFramework) + let tcConfig = CreateScriptTextTcConfig(legacyReferenceResolver, defaultFSharpBinariesDir, filename, codeContext, useSimpleResolution, useFsiAuxLib, Some references0, applyCommmandLineArgs, assumeDotNetFramework, tryGetMetadataSnapshot, reduceMemoryUsage) let closureSources = [ClosureSource(filename, range0, source, true)] let closureFiles, tcConfig = FindClosureFiles(closureSources, tcConfig, codeContext, lexResourceManager) @@ -5251,14 +5256,18 @@ module private ScriptPreprocessClosure = GetLoadClosure(ctok, mainFile, closureFiles, tcConfig, codeContext) type LoadClosure with - // Used from service.fs, when editing a script file - static member ComputeClosureOfSourceText(ctok, legacyReferenceResolver, defaultFSharpBinariesDir, filename:string, source:string, codeContext, useSimpleResolution:bool, useFsiAuxLib, lexResourceManager:Lexhelp.LexResourceManager, applyCommmandLineArgs, assumeDotNetFramework) : LoadClosure = + /// Analyze a script text and find the closure of its references. + /// Used from FCS, when editing a script file. + // + /// A temporary TcConfig is created along the way, is why this routine takes so many arguments. We want to be sure to use exactly the + /// same arguments as the rest of the application. + static member ComputeClosureOfScriptText(ctok, legacyReferenceResolver, defaultFSharpBinariesDir, filename:string, source:string, codeContext, useSimpleResolution:bool, useFsiAuxLib, lexResourceManager:Lexhelp.LexResourceManager, applyCommmandLineArgs, assumeDotNetFramework, tryGetMetadataSnapshot, reduceMemoryUsage) : LoadClosure = use unwindBuildPhase = PushThreadBuildPhaseUntilUnwind BuildPhase.Parse - ScriptPreprocessClosure.GetFullClosureOfScriptSource(ctok, legacyReferenceResolver, defaultFSharpBinariesDir, filename, source, codeContext, useSimpleResolution, useFsiAuxLib, lexResourceManager, applyCommmandLineArgs, assumeDotNetFramework) + ScriptPreprocessClosure.GetFullClosureOfScriptText(ctok, legacyReferenceResolver, defaultFSharpBinariesDir, filename, source, codeContext, useSimpleResolution, useFsiAuxLib, lexResourceManager, applyCommmandLineArgs, assumeDotNetFramework, tryGetMetadataSnapshot, reduceMemoryUsage) - /// Used from fsi.fs and fsc.fs, for #load and command line. - /// The resulting references are then added to a TcConfig. - static member ComputeClosureOfSourceFiles (ctok, tcConfig:TcConfig, files:(string*range) list, codeContext, lexResourceManager:Lexhelp.LexResourceManager) = + /// Analyze a set of script files and find the closure of their references. The resulting references are then added to the given TcConfig. + /// Used from fsi.fs and fsc.fs, for #load and command line. + static member ComputeClosureOfScriptFiles (ctok, tcConfig:TcConfig, files:(string*range) list, codeContext, lexResourceManager:Lexhelp.LexResourceManager) = use unwindBuildPhase = PushThreadBuildPhaseUntilUnwind BuildPhase.Parse ScriptPreprocessClosure.GetFullClosureOfScriptFiles (ctok, tcConfig, files, codeContext, lexResourceManager) @@ -5322,7 +5331,6 @@ let CheckSimulateException(tcConfig:TcConfig) = type RootSigs = Zmap type RootImpls = Zset -type TypecheckerSigsAndImpls = RootSigsAndImpls of RootSigs * RootImpls * ModuleOrNamespaceType * ModuleOrNamespaceType let qnameOrder = Order.orderBy (fun (q:QualifiedNameOfFile) -> q.Text) @@ -5333,17 +5341,25 @@ type TcState = tcsTcSigEnv: TcEnv tcsTcImplEnv: TcEnv tcsCreatesGeneratedProvidedTypes: bool - /// The accumulated results of type checking for this assembly - tcsRootSigsAndImpls : TypecheckerSigsAndImpls } + tcsRootSigs: RootSigs + tcsRootImpls: RootImpls + tcsCcuSig: ModuleOrNamespaceType } + member x.NiceNameGenerator = x.tcsNiceNameGen + member x.TcEnvFromSignatures = x.tcsTcSigEnv + member x.TcEnvFromImpls = x.tcsTcImplEnv + member x.Ccu = x.tcsCcu + member x.CreatesGeneratedProvidedTypes = x.tcsCreatesGeneratedProvidedTypes - member x.PartialAssemblySignature = - let (RootSigsAndImpls(_rootSigs, _rootImpls, _allSigModulTyp, allImplementedSigModulTyp)) = x.tcsRootSigsAndImpls - allImplementedSigModulTyp + // Assem(a.fsi + b.fsi + c.fsi) (after checking implementation file ) + member x.CcuType = x.tcsCcuType + + // a.fsi + b.fsi + c.fsi (after checking implementation file for c.fs) + member x.CcuSig = x.tcsCcuSig member x.NextStateAfterIncrementalFragment(tcEnvAtEndOfLastInput) = { x with tcsTcSigEnv = tcEnvAtEndOfLastInput @@ -5365,6 +5381,7 @@ let GetInitialTcState(m, ccuName, tcConfig:TcConfig, tcGlobals, tcImports:TcImpo IsProviderGenerated = false ImportProvidedType = (fun ty -> Import.ImportProvidedType (tcImports.GetImportMap()) m ty) #endif + TryGetILModuleDef = (fun () -> None) FileName=None Stamp = newStamp() QualifiedName= None @@ -5380,133 +5397,127 @@ let GetInitialTcState(m, ccuName, tcConfig:TcConfig, tcGlobals, tcImports:TcImpo if tcConfig.compilingFslib then tcGlobals.fslibCcu.Fixup(ccu) - let rootSigs = Zmap.empty qnameOrder - let rootImpls = Zset.empty qnameOrder - let allSigModulTyp = NewEmptyModuleOrNamespaceType Namespace - let allImplementedSigModulTyp = NewEmptyModuleOrNamespaceType Namespace { tcsCcu= ccu tcsCcuType=ccuType tcsNiceNameGen=niceNameGen tcsTcSigEnv=tcEnv0 tcsTcImplEnv=tcEnv0 tcsCreatesGeneratedProvidedTypes=false - tcsRootSigsAndImpls = RootSigsAndImpls (rootSigs, rootImpls, allSigModulTyp, allImplementedSigModulTyp) } + tcsRootSigs = Zmap.empty qnameOrder + tcsRootImpls = Zset.empty qnameOrder + tcsCcuSig = NewEmptyModuleOrNamespaceType Namespace } + /// Typecheck a single file (or interactive entry into F# Interactive) -let TypeCheckOneInputEventually - (checkForErrors, tcConfig:TcConfig, tcImports:TcImports, - tcGlobals, prefixPathOpt, tcSink, tcState: TcState, inp: ParsedInput) = - eventually { - try - let! ctok = Eventually.token - RequireCompilationThread ctok // Everything here requires the compilation thread since it works on the TAST - - CheckSimulateException(tcConfig) - let (RootSigsAndImpls(rootSigs, rootImpls, allSigModulTyp, allImplementedSigModulTyp)) = tcState.tcsRootSigsAndImpls - let m = inp.Range - let amap = tcImports.GetImportMap() - let! (topAttrs, implFiles, tcEnvAtEnd, tcSigEnv, tcImplEnv, topSigsAndImpls, ccuType, createsGeneratedProvidedTypes) = - eventually { - match inp with - | ParsedInput.SigFile (ParsedSigFileInput(_, qualNameOfFile, _, _, _) as file) -> - - // Check if we've seen this top module signature before. - if Zmap.mem qualNameOfFile rootSigs then - errorR(Error(FSComp.SR.buildSignatureAlreadySpecified(qualNameOfFile.Text), m.StartRange)) +let TypeCheckOneInputEventually (checkForErrors, tcConfig:TcConfig, tcImports:TcImports, tcGlobals, prefixPathOpt, tcSink, tcState: TcState, inp: ParsedInput) = - // Check if the implementation came first in compilation order - if Zset.contains qualNameOfFile rootImpls then - errorR(Error(FSComp.SR.buildImplementationAlreadyGivenDetail(qualNameOfFile.Text), m)) + eventually { + try + let! ctok = Eventually.token + RequireCompilationThread ctok // Everything here requires the compilation thread since it works on the TAST - // Typecheck the signature file - let! (tcEnv, sigFileType, createsGeneratedProvidedTypes) = - TypeCheckOneSigFile (tcGlobals, tcState.tcsNiceNameGen, amap, tcState.tcsCcu, checkForErrors, tcConfig.conditionalCompilationDefines, tcSink) tcState.tcsTcSigEnv file + CheckSimulateException(tcConfig) - let rootSigs = Zmap.add qualNameOfFile sigFileType rootSigs + let m = inp.Range + let amap = tcImports.GetImportMap() + match inp with + | ParsedInput.SigFile (ParsedSigFileInput(_, qualNameOfFile, _, _, _) as file) -> + + // Check if we've seen this top module signature before. + if Zmap.mem qualNameOfFile tcState.tcsRootSigs then + errorR(Error(FSComp.SR.buildSignatureAlreadySpecified(qualNameOfFile.Text), m.StartRange)) - // Open the prefixPath for fsi.exe - let tcEnv = - match prefixPathOpt with - | None -> tcEnv - | Some prefixPath -> - let m = qualNameOfFile.Range - TcOpenDecl tcSink tcGlobals amap m m tcEnv prefixPath + // Check if the implementation came first in compilation order + if Zset.contains qualNameOfFile tcState.tcsRootImpls then + errorR(Error(FSComp.SR.buildImplementationAlreadyGivenDetail(qualNameOfFile.Text), m)) - let res = (EmptyTopAttrs, [], tcEnv, tcEnv, tcState.tcsTcImplEnv, RootSigsAndImpls(rootSigs, rootImpls, allSigModulTyp, allImplementedSigModulTyp), tcState.tcsCcuType, createsGeneratedProvidedTypes) - return res + // Typecheck the signature file + let! (tcEnv, sigFileType, createsGeneratedProvidedTypes) = + TypeCheckOneSigFile (tcGlobals, tcState.tcsNiceNameGen, amap, tcState.tcsCcu, checkForErrors, tcConfig.conditionalCompilationDefines, tcSink, tcConfig.internalTestSpanStackReferring) tcState.tcsTcSigEnv file - | ParsedInput.ImplFile (ParsedImplFileInput(filename, _, qualNameOfFile, _, _, _, _) as file) -> - - // Check if we've got an interface for this fragment - let rootSigOpt = rootSigs.TryFind(qualNameOfFile) + let rootSigs = Zmap.add qualNameOfFile sigFileType tcState.tcsRootSigs - if verbose then dprintf "ParsedInput.ImplFile, nm = %s, qualNameOfFile = %s, ?rootSigOpt = %b\n" filename qualNameOfFile.Text (Option.isSome rootSigOpt) + // Add the signature to the signature env (unless it had an explicit signature) + let ccuSigForFile = CombineCcuContentFragments m [sigFileType; tcState.tcsCcuSig] + + // Open the prefixPath for fsi.exe + let tcEnv = + match prefixPathOpt with + | None -> tcEnv + | Some prefixPath -> + let m = qualNameOfFile.Range + TcOpenDecl tcSink tcGlobals amap m m tcEnv prefixPath + + let tcState = + { tcState with + tcsTcSigEnv=tcEnv + tcsTcImplEnv=tcState.tcsTcImplEnv + tcsRootSigs=rootSigs + tcsCreatesGeneratedProvidedTypes=tcState.tcsCreatesGeneratedProvidedTypes || createsGeneratedProvidedTypes} + + return (tcEnv, EmptyTopAttrs, None, ccuSigForFile), tcState + + | ParsedInput.ImplFile (ParsedImplFileInput(_, _, qualNameOfFile, _, _, _, _) as file) -> + + // Check if we've got an interface for this fragment + let rootSigOpt = tcState.tcsRootSigs.TryFind(qualNameOfFile) - // Check if we've already seen an implementation for this fragment - if Zset.contains qualNameOfFile rootImpls then + // Check if we've already seen an implementation for this fragment + if Zset.contains qualNameOfFile tcState.tcsRootImpls then errorR(Error(FSComp.SR.buildImplementationAlreadyGiven(qualNameOfFile.Text), m)) - let tcImplEnv = tcState.tcsTcImplEnv + let tcImplEnv = tcState.tcsTcImplEnv - // Typecheck the implementation file - let! topAttrs, implFile, tcEnvAtEnd, createsGeneratedProvidedTypes = - TypeCheckOneImplFile (tcGlobals, tcState.tcsNiceNameGen, amap, tcState.tcsCcu, checkForErrors, tcConfig.conditionalCompilationDefines, tcSink) tcImplEnv rootSigOpt file + // Typecheck the implementation file + let! topAttrs, implFile, _implFileHiddenType, tcEnvAtEnd, createsGeneratedProvidedTypes = + TypeCheckOneImplFile (tcGlobals, tcState.tcsNiceNameGen, amap, tcState.tcsCcu, checkForErrors, tcConfig.conditionalCompilationDefines, tcSink, tcConfig.internalTestSpanStackReferring) tcImplEnv rootSigOpt file - let hadSig = Option.isSome rootSigOpt - let implFileSigType = SigTypeOfImplFile implFile + let hadSig = rootSigOpt.IsSome + let implFileSigType = SigTypeOfImplFile implFile - if verbose then dprintf "done TypeCheckOneImplFile...\n" - let rootImpls = Zset.add qualNameOfFile rootImpls + let rootImpls = Zset.add qualNameOfFile tcState.tcsRootImpls - // Only add it to the environment if it didn't have a signature - let m = qualNameOfFile.Range + // Only add it to the environment if it didn't have a signature + let m = qualNameOfFile.Range - // Add the implementation as to the implementation env - let tcImplEnv = AddLocalRootModuleOrNamespace TcResultsSink.NoSink tcGlobals amap m tcImplEnv implFileSigType + // Add the implementation as to the implementation env + let tcImplEnv = AddLocalRootModuleOrNamespace TcResultsSink.NoSink tcGlobals amap m tcImplEnv implFileSigType - // Add the implementation as to the signature env (unless it had an explicit signature) - let tcSigEnv = - if hadSig then tcState.tcsTcSigEnv - else AddLocalRootModuleOrNamespace TcResultsSink.NoSink tcGlobals amap m tcState.tcsTcSigEnv implFileSigType + // Add the implementation as to the signature env (unless it had an explicit signature) + let tcSigEnv = + if hadSig then tcState.tcsTcSigEnv + else AddLocalRootModuleOrNamespace TcResultsSink.NoSink tcGlobals amap m tcState.tcsTcSigEnv implFileSigType - // Open the prefixPath for fsi.exe (tcImplEnv) - let tcImplEnv = - match prefixPathOpt with - | Some prefixPath -> TcOpenDecl tcSink tcGlobals amap m m tcImplEnv prefixPath - | _ -> tcImplEnv - - // Open the prefixPath for fsi.exe (tcSigEnv) - let tcSigEnv = - match prefixPathOpt with - | Some prefixPath when not hadSig -> TcOpenDecl tcSink tcGlobals amap m m tcSigEnv prefixPath - | _ -> tcSigEnv - - let allImplementedSigModulTyp = CombineCcuContentFragments m [implFileSigType; allImplementedSigModulTyp] - - // Add it to the CCU - let ccuType = - // The signature must be reestablished. - // [CHECK: Why? This seriously degraded performance] - NewCcuContents ILScopeRef.Local m tcState.tcsCcu.AssemblyName allImplementedSigModulTyp - - if verbose then dprintf "done TypeCheckOneInputEventually...\n" - - let topSigsAndImpls = RootSigsAndImpls(rootSigs, rootImpls, allSigModulTyp, allImplementedSigModulTyp) - let res = (topAttrs, [implFile], tcEnvAtEnd, tcSigEnv, tcImplEnv, topSigsAndImpls, ccuType, createsGeneratedProvidedTypes) - return res } + // Open the prefixPath for fsi.exe (tcImplEnv) + let tcImplEnv = + match prefixPathOpt with + | Some prefixPath -> TcOpenDecl tcSink tcGlobals amap m m tcImplEnv prefixPath + | _ -> tcImplEnv + + // Open the prefixPath for fsi.exe (tcSigEnv) + let tcSigEnv = + match prefixPathOpt with + | Some prefixPath when not hadSig -> TcOpenDecl tcSink tcGlobals amap m m tcSigEnv prefixPath + | _ -> tcSigEnv + + let ccuSig = CombineCcuContentFragments m [implFileSigType; tcState.tcsCcuSig ] + + let ccuSigForFile = CombineCcuContentFragments m [implFileSigType; tcState.tcsCcuSig] + + let tcState = + { tcState with + tcsTcSigEnv=tcSigEnv + tcsTcImplEnv=tcImplEnv + tcsRootImpls=rootImpls + tcsCcuSig=ccuSig + tcsCreatesGeneratedProvidedTypes=tcState.tcsCreatesGeneratedProvidedTypes || createsGeneratedProvidedTypes } + return (tcEnvAtEnd, topAttrs, Some implFile, ccuSigForFile), tcState - return (tcEnvAtEnd, topAttrs, implFiles), - { tcState with - tcsCcuType=ccuType - tcsTcSigEnv=tcSigEnv - tcsTcImplEnv=tcImplEnv - tcsCreatesGeneratedProvidedTypes=tcState.tcsCreatesGeneratedProvidedTypes || createsGeneratedProvidedTypes - tcsRootSigsAndImpls = topSigsAndImpls } - with e -> - errorRecovery e range0 - return (tcState.TcEnvFromSignatures, EmptyTopAttrs, []), tcState - } + with e -> + errorRecovery e range0 + return (tcState.TcEnvFromSignatures, EmptyTopAttrs, None, tcState.tcsCcuSig), tcState + } /// Typecheck a single file (or interactive entry into F# Interactive) let TypeCheckOneInput (ctok, checkForErrors, tcConfig, tcImports, tcGlobals, prefixPathOpt) tcState inp = @@ -5518,40 +5529,36 @@ let TypeCheckOneInput (ctok, checkForErrors, tcConfig, tcImports, tcGlobals, pre /// Finish checking multiple files (or one interactive entry into F# Interactive) let TypeCheckMultipleInputsFinish(results, tcState: TcState) = - let tcEnvsAtEndFile, topAttrs, implFiles = List.unzip3 results - + let tcEnvsAtEndFile, topAttrs, implFiles, ccuSigsForFiles = List.unzip4 results let topAttrs = List.foldBack CombineTopAttrs topAttrs EmptyTopAttrs - let implFiles = List.concat implFiles + let implFiles = List.choose id implFiles // This is the environment required by fsi.exe when incrementally adding definitions let tcEnvAtEndOfLastFile = (match tcEnvsAtEndFile with h :: _ -> h | _ -> tcState.TcEnvFromSignatures) - - (tcEnvAtEndOfLastFile, topAttrs, implFiles), tcState - -/// Check multiple files (or one interactive entry into F# Interactive) -let TypeCheckMultipleInputs (ctok, checkForErrors, tcConfig: TcConfig, tcImports, tcGlobals, prefixPathOpt, tcState, inputs) = - let results, tcState = (tcState, inputs) ||> List.mapFold (TypeCheckOneInput (ctok, checkForErrors, tcConfig, tcImports, tcGlobals, prefixPathOpt)) - TypeCheckMultipleInputsFinish(results, tcState) + (tcEnvAtEndOfLastFile, topAttrs, implFiles, ccuSigsForFiles), tcState let TypeCheckOneInputAndFinishEventually(checkForErrors, tcConfig: TcConfig, tcImports, tcGlobals, prefixPathOpt, tcSink, tcState, input) = eventually { + Logger.LogBlockStart LogCompilerFunctionId.CompileOps_TypeCheckOneInputAndFinishEventually let! results, tcState = TypeCheckOneInputEventually(checkForErrors, tcConfig, tcImports, tcGlobals, prefixPathOpt, tcSink, tcState, input) - return TypeCheckMultipleInputsFinish([results], tcState) + let result = TypeCheckMultipleInputsFinish([results], tcState) + Logger.LogBlockStop LogCompilerFunctionId.CompileOps_TypeCheckOneInputAndFinishEventually + return result } let TypeCheckClosedInputSetFinish (declaredImpls: TypedImplFile list, tcState) = // Publish the latest contents to the CCU - tcState.tcsCcu.Deref.Contents <- tcState.tcsCcuType + tcState.tcsCcu.Deref.Contents <- NewCcuContents ILScopeRef.Local range0 tcState.tcsCcu.AssemblyName tcState.tcsCcuSig // Check all interfaces have implementations - let (RootSigsAndImpls(rootSigs, rootImpls, _, _)) = tcState.tcsRootSigsAndImpls - rootSigs |> Zmap.iter (fun qualNameOfFile _ -> - if not (Zset.contains qualNameOfFile rootImpls) then + tcState.tcsRootSigs |> Zmap.iter (fun qualNameOfFile _ -> + if not (Zset.contains qualNameOfFile tcState.tcsRootImpls) then errorR(Error(FSComp.SR.buildSignatureWithoutImplementation(qualNameOfFile.Text), qualNameOfFile.Range))) tcState, declaredImpls let TypeCheckClosedInputSet (ctok, checkForErrors, tcConfig, tcImports, tcGlobals, prefixPathOpt, tcState, inputs) = // tcEnvAtEndOfLastFile is the environment required by fsi.exe when incrementally adding definitions - let (tcEnvAtEndOfLastFile, topAttrs, implFiles), tcState = TypeCheckMultipleInputs (ctok, checkForErrors, tcConfig, tcImports, tcGlobals, prefixPathOpt, tcState, inputs) + let results, tcState = (tcState, inputs) ||> List.mapFold (TypeCheckOneInput (ctok, checkForErrors, tcConfig, tcImports, tcGlobals, prefixPathOpt)) + let (tcEnvAtEndOfLastFile, topAttrs, implFiles, _), tcState = TypeCheckMultipleInputsFinish(results, tcState) let tcState, declaredImpls = TypeCheckClosedInputSetFinish (implFiles, tcState) tcState, topAttrs, declaredImpls, tcEnvAtEndOfLastFile diff --git a/src/fsharp/CompileOps.fsi b/src/fsharp/CompileOps.fsi index 77916b63f49..eb371fa5927 100755 --- a/src/fsharp/CompileOps.fsi +++ b/src/fsharp/CompileOps.fsi @@ -6,10 +6,9 @@ module internal Microsoft.FSharp.Compiler.CompileOps open System open System.Text open System.Collections.Generic -open Internal.Utilities -open Microsoft.FSharp.Compiler.AbstractIL +open Microsoft.FSharp.Compiler.AbstractIL open Microsoft.FSharp.Compiler.AbstractIL.IL -open Microsoft.FSharp.Compiler.AbstractIL.Internal +open Microsoft.FSharp.Compiler.AbstractIL.ILBinaryReader open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library open Microsoft.FSharp.Compiler open Microsoft.FSharp.Compiler.TypeChecker @@ -17,10 +16,6 @@ open Microsoft.FSharp.Compiler.Range open Microsoft.FSharp.Compiler.Ast open Microsoft.FSharp.Compiler.ErrorLogger open Microsoft.FSharp.Compiler.Tast -open Microsoft.FSharp.Compiler.Tastops -open Microsoft.FSharp.Compiler.Lib -open Microsoft.FSharp.Compiler.Infos -open Microsoft.FSharp.Compiler.ReferenceResolver open Microsoft.FSharp.Compiler.TcGlobals open Microsoft.FSharp.Core.CompilerServices #if !NO_EXTENSIONTYPING @@ -150,11 +145,11 @@ type IRawFSharpAssemblyData = abstract GetInternalsVisibleToAttributes: ILGlobals -> string list /// The raw IL module definition in the assembly, if any. This is not present for cross-project references /// in the language service - abstract TryGetRawILModule: unit -> ILModuleDef option + abstract TryGetILModuleDef: unit -> ILModuleDef option abstract HasAnyFSharpSignatureDataAttribute: bool abstract HasMatchingFSharpSignatureDataAttribute: ILGlobals -> bool /// The raw F# signature data in the assembly, if any - abstract GetRawFSharpSignatureData: range * ilShortAssemName: string * fileName: string -> (string * byte[]) list + abstract GetRawFSharpSignatureData: range * ilShortAssemName: string * fileName: string -> (string * (unit -> byte[])) list /// The raw F# optimization data in the assembly, if any abstract GetRawFSharpOptimizationData: range * ilShortAssemName: string * fileName: string -> (string * (unit -> byte[])) list /// The table of type forwarders in the assembly @@ -211,6 +206,7 @@ type UnresolvedAssemblyReference = UnresolvedAssemblyReference of string * Assem type ResolvedExtensionReference = ResolvedExtensionReference of string * AssemblyReference list * Tainted list #endif +[] type CompilerTarget = | WinExe | ConsoleExe @@ -218,10 +214,14 @@ type CompilerTarget = | Module member IsExe: bool +[] type ResolveAssemblyReferenceMode = | Speculative | ReportErrors +[] +type CopyFSharpCoreFlag = Yes | No + //---------------------------------------------------------------------------- // TcConfig //-------------------------------------------------------------------------- @@ -234,13 +234,13 @@ type VersionFlag = member GetVersionInfo: implicitIncludeDir:string -> ILVersionInfo member GetVersionString: implicitIncludeDir:string -> string +[] type TcConfigBuilder = { mutable primaryAssembly: PrimaryAssembly mutable autoResolveOpenDirectivesToDlls: bool mutable noFeedback: bool mutable stackReserveSize: int32 option mutable implicitIncludeDir: string - mutable openBinariesInMemory: bool mutable openDebugInformationForLaterStaticLinking: bool defaultFSharpBinariesDir: string mutable compilingFslib: bool @@ -263,7 +263,7 @@ type TcConfigBuilder = mutable referencedDLLs: AssemblyReference list mutable projectReferences: IProjectReference list mutable knownUnresolvedReferences: UnresolvedAssemblyReference list - optimizeForMemory: bool + reduceMemoryUsage: ReduceMemoryFlag mutable subsystemVersion: int * int mutable useHighEntropyVA: bool mutable inputCodePage: int option @@ -338,9 +338,7 @@ type TcConfigBuilder = mutable optSettings : Optimizer.OptimizationSettings mutable emitTailcalls: bool mutable deterministic: bool -#if PREFERRED_UI_LANG mutable preferredUiLang: string option -#endif mutable lcid : int option mutable productNameForBannerText: string mutable showBanner : bool @@ -357,13 +355,17 @@ type TcConfigBuilder = /// If true, indicates all type checking and code generation is in the context of fsi.exe isInteractive: bool isInvalidationSupported: bool - mutable sqmSessionGuid: System.Guid option - mutable sqmNumOfSourceFiles: int - sqmSessionStartedTime: int64 mutable emitDebugInfoInQuotations: bool mutable exename: string option - mutable copyFSharpCore: bool + mutable copyFSharpCore: CopyFSharpCoreFlag mutable shadowCopyReferences: bool + + /// A function to call to try to get an object that acts as a snapshot of the metadata section of a .NET binary, + /// and from which we can read the metadata. Only used when metadataOnly=true. + mutable tryGetMetadataSnapshot : ILReaderTryGetMetadataSnapshot + + /// if true - 'let mutable x = Span.Empty', the value 'x' is a stack referring span. Used for internal testing purposes only until we get true stack spans. + mutable internalTestSpanStackReferring : bool } static member Initial: TcConfigBuilder @@ -371,11 +373,13 @@ type TcConfigBuilder = static member CreateNew: legacyReferenceResolver: ReferenceResolver.Resolver * defaultFSharpBinariesDir: string * - optimizeForMemory: bool * + reduceMemoryUsage: ReduceMemoryFlag * implicitIncludeDir: string * isInteractive: bool * isInvalidationSupported: bool * - defaultCopyFSharpCore: bool -> TcConfigBuilder + defaultCopyFSharpCore: CopyFSharpCoreFlag * + tryGetMetadataSnapshot: ILReaderTryGetMetadataSnapshot + -> TcConfigBuilder member DecideNames: string list -> outfile: string * pdbfile: string option * assemblyName: string member TurnWarningOff: range * string -> unit @@ -398,7 +402,6 @@ type TcConfig = member noFeedback: bool member stackReserveSize: int32 option member implicitIncludeDir: string - member openBinariesInMemory: bool member openDebugInformationForLaterStaticLinking: bool member fsharpBinariesDir: string member compilingFslib: bool @@ -417,7 +420,7 @@ type TcConfig = member subsystemVersion: int * int member useHighEntropyVA: bool member referencedDLLs: AssemblyReference list - member optimizeForMemory: bool + member reduceMemoryUsage: ReduceMemoryFlag member inputCodePage: int option member embedResources: string list member errorSeverityOptions: FSharpErrorSeverityOptions @@ -488,11 +491,7 @@ type TcConfig = member optSettings : Optimizer.OptimizationSettings member emitTailcalls: bool member deterministic: bool -#if PREFERRED_UI_LANG member preferredUiLang: string option -#else - member lcid : int option -#endif member optsOn : bool member productNameForBannerText: string member showBanner : bool @@ -525,10 +524,7 @@ type TcConfig = /// File system query based on TcConfig settings member MakePathAbsolute: string -> string - member sqmSessionGuid: System.Guid option - member sqmNumOfSourceFiles: int - member sqmSessionStartedTime: int64 - member copyFSharpCore: bool + member copyFSharpCore: CopyFSharpCoreFlag member shadowCopyReferences: bool static member Create: TcConfigBuilder * validate: bool -> TcConfig @@ -580,11 +576,8 @@ type ImportedAssembly = [] type TcAssemblyResolutions = member GetAssemblyResolutions: unit -> AssemblyResolution list - static member SplitNonFoundationalResolutions : CompilationThreadToken * TcConfig -> AssemblyResolution list * AssemblyResolution list * UnresolvedAssemblyReference list static member BuildFromPriorResolutions : CompilationThreadToken * TcConfig * AssemblyResolution list * UnresolvedAssemblyReference list -> TcAssemblyResolutions - - /// Represents a table of imported assemblies with their resolutions. [] @@ -649,6 +642,9 @@ val WriteSignatureData: TcConfig * TcGlobals * Tastops.Remap * CcuThunk * filena /// Write F# optimization data as an IL resource val WriteOptimizationData: TcGlobals * filename: string * inMem: bool * CcuThunk * Optimizer.LazyModuleInfo -> ILResource +//---------------------------------------------------------------------------- +// #r and other directives +//-------------------------------------------------------------------------- //---------------------------------------------------------------------------- // #r and other directives @@ -711,8 +707,10 @@ type TcState = /// Get the typing environment implied by the set of implementation files checked so far member TcEnvFromImpls: TcEnv - /// The inferred contents of the assembly, containing the signatures of all implemented files. - member PartialAssemblySignature: ModuleOrNamespaceType + + /// The inferred contents of the assembly, containing the signatures of all files. + // a.fsi + b.fsi + c.fsi (after checking implementation file for c.fs) + member CcuSig: ModuleOrNamespaceType member NextStateAfterIncrementalFragment: TcEnv -> TcState @@ -725,10 +723,10 @@ val GetInitialTcState: /// Check one input, returned as an Eventually computation val TypeCheckOneInputEventually : checkForErrors:(unit -> bool) * TcConfig * TcImports * TcGlobals * Ast.LongIdent option * NameResolution.TcResultsSink * TcState * Ast.ParsedInput - -> Eventually<(TcEnv * TopAttribs * TypedImplFile list) * TcState> + -> Eventually<(TcEnv * TopAttribs * TypedImplFile option * ModuleOrNamespaceType) * TcState> /// Finish the checking of multiple inputs -val TypeCheckMultipleInputsFinish: (TcEnv * TopAttribs * 'T list) list * TcState -> (TcEnv * TopAttribs * 'T list) * TcState +val TypeCheckMultipleInputsFinish: (TcEnv * TopAttribs * 'T option * 'U) list * TcState -> (TcEnv * TopAttribs * 'T list * 'U list) * TcState /// Finish the checking of a closed set of inputs val TypeCheckClosedInputSetFinish: TypedImplFile list * TcState -> TcState * TypedImplFile list @@ -739,7 +737,7 @@ val TypeCheckClosedInputSet: CompilationThreadToken * checkForErrors: (unit -> b /// Check a single input and finish the checking val TypeCheckOneInputAndFinishEventually : checkForErrors: (unit -> bool) * TcConfig * TcImports * TcGlobals * Ast.LongIdent option * NameResolution.TcResultsSink * TcState * Ast.ParsedInput - -> Eventually<(TcEnv * TopAttribs * TypedImplFile list) * TcState> + -> Eventually<(TcEnv * TopAttribs * TypedImplFile list * ModuleOrNamespaceType list) * TcState> /// Indicates if we should report a warning val ReportWarning: FSharpErrorSeverityOptions -> PhasedDiagnostic -> bool @@ -764,7 +762,6 @@ type LoadClosureInput = ParseDiagnostics: (PhasedDiagnostic * bool) list MetaCommandDiagnostics: (PhasedDiagnostic * bool) list } - [] type LoadClosure = { /// The source files along with the ranges of the #load positions in each file. @@ -794,8 +791,13 @@ type LoadClosure = /// Diagnostics seen while processing the compiler options implied root of closure LoadClosureRootFileDiagnostics: (PhasedDiagnostic * bool) list } - // Used from service.fs, when editing a script file - static member ComputeClosureOfSourceText: CompilationThreadToken * legacyReferenceResolver: ReferenceResolver.Resolver * defaultFSharpBinariesDir: string * filename: string * source: string * implicitDefines:CodeContext * useSimpleResolution: bool * useFsiAuxLib: bool * lexResourceManager: Lexhelp.LexResourceManager * applyCompilerOptions: (TcConfigBuilder -> unit) * assumeDotNetFramework: bool -> LoadClosure + /// Analyze a script text and find the closure of its references. + /// Used from FCS, when editing a script file. + // + /// A temporary TcConfig is created along the way, is why this routine takes so many arguments. We want to be sure to use exactly the + /// same arguments as the rest of the application. + static member ComputeClosureOfScriptText: CompilationThreadToken * legacyReferenceResolver: ReferenceResolver.Resolver * defaultFSharpBinariesDir: string * filename: string * source: string * implicitDefines:CodeContext * useSimpleResolution: bool * useFsiAuxLib: bool * lexResourceManager: Lexhelp.LexResourceManager * applyCompilerOptions: (TcConfigBuilder -> unit) * assumeDotNetFramework: bool * tryGetMetadataSnapshot: ILReaderTryGetMetadataSnapshot * reduceMemoryUsage: ReduceMemoryFlag -> LoadClosure - /// Used from fsi.fs and fsc.fs, for #load and command line. The resulting references are then added to a TcConfig. - static member ComputeClosureOfSourceFiles: CompilationThreadToken * tcConfig:TcConfig * (string * range) list * implicitDefines:CodeContext * lexResourceManager: Lexhelp.LexResourceManager -> LoadClosure + /// Analyze a set of script files and find the closure of their references. The resulting references are then added to the given TcConfig. + /// Used from fsi.fs and fsc.fs, for #load and command line. + static member ComputeClosureOfScriptFiles: CompilationThreadToken * tcConfig:TcConfig * (string * range) list * implicitDefines:CodeContext * lexResourceManager: Lexhelp.LexResourceManager -> LoadClosure diff --git a/src/fsharp/CompileOptions.fs b/src/fsharp/CompileOptions.fs index 1c78fd9aa33..6ae18644dea 100644 --- a/src/fsharp/CompileOptions.fs +++ b/src/fsharp/CompileOptions.fs @@ -188,7 +188,7 @@ module ResponseFile = let parseLine (l: string) = match l with | s when String.IsNullOrWhiteSpace(s) -> None - | s when l.StartsWith("#") -> Some (ResponseFileLine.Comment (s.TrimStart('#'))) + | s when l.StartsWithOrdinal("#") -> Some (ResponseFileLine.Comment (s.TrimStart('#'))) | s -> Some (ResponseFileLine.CompilerOptionSpec (s.Trim())) try @@ -224,7 +224,7 @@ let ParseCompilerOptions (collectOtherArgument : string -> unit, blocks: Compile if opt.Length = 2 || isSlashOpt opt then opt <- opt.[1 ..] // else, it should be a non-abbreviated option starting with "--" - elif opt.Length > 3 && opt.StartsWith("--") then + elif opt.Length > 3 && opt.StartsWithOrdinal("--") then opt <- opt.[2 ..] else opt <- "" @@ -247,19 +247,19 @@ let ParseCompilerOptions (collectOtherArgument : string -> unit, blocks: Compile let getSwitchOpt (opt : string) = // if opt is a switch, strip the '+' or '-' - if opt <> "--" && opt.Length > 1 && (opt.EndsWith("+",StringComparison.Ordinal) || opt.EndsWith("-",StringComparison.Ordinal)) then + if opt <> "--" && opt.Length > 1 && (opt.EndsWithOrdinal("+") || opt.EndsWithOrdinal("-")) then opt.[0 .. opt.Length - 2] else opt let getSwitch (s: string) = let s = (s.Split([|':'|])).[0] - if s <> "--" && s.EndsWith("-",StringComparison.Ordinal) then OptionSwitch.Off else OptionSwitch.On + if s <> "--" && s.EndsWithOrdinal("-") then OptionSwitch.Off else OptionSwitch.On let rec processArg args = match args with | [] -> () - | ((rsp: string) :: t) when rsp.StartsWith("@") -> + | ((rsp: string) :: t) when rsp.StartsWithOrdinal("@") -> let responseFileOptions = let fullpath = try @@ -457,10 +457,10 @@ let (++) x s = x @ [s] let SetTarget (tcConfigB : TcConfigBuilder)(s : string) = match s.ToLowerInvariant() with - | "exe" -> tcConfigB.target <- ConsoleExe - | "winexe" -> tcConfigB.target <- WinExe - | "library" -> tcConfigB.target <- Dll - | "module" -> tcConfigB.target <- Module + | "exe" -> tcConfigB.target <- CompilerTarget.ConsoleExe + | "winexe" -> tcConfigB.target <- CompilerTarget.WinExe + | "library" -> tcConfigB.target <- CompilerTarget.Dll + | "module" -> tcConfigB.target <- CompilerTarget.Module | _ -> error(Error(FSComp.SR.optsUnrecognizedTarget(s),rangeCmdArgs)) let SetDebugSwitch (tcConfigB : TcConfigBuilder) (dtype : string option) (s : OptionSwitch) = @@ -470,7 +470,13 @@ let SetDebugSwitch (tcConfigB : TcConfigBuilder) (dtype : string option) (s : Op | "portable" -> tcConfigB.portablePDB <- true; tcConfigB.embeddedPDB <- false; tcConfigB.jitTracking <- true; tcConfigB.ignoreSymbolStoreSequencePoints <- true | "pdbonly" -> tcConfigB.portablePDB <- false; tcConfigB.embeddedPDB <- false; tcConfigB.jitTracking <- false | "embedded" -> tcConfigB.portablePDB <- true; tcConfigB.embeddedPDB <- true; tcConfigB.jitTracking <- true; tcConfigB.ignoreSymbolStoreSequencePoints <- true +#if FX_NO_PDB_WRITER + // When building on the coreclr, full means portable + | "full" -> tcConfigB.portablePDB <- true; tcConfigB.embeddedPDB <- false; tcConfigB.jitTracking <- true +#else | "full" -> tcConfigB.portablePDB <- false; tcConfigB.embeddedPDB <- false; tcConfigB.jitTracking <- true +#endif + | _ -> error(Error(FSComp.SR.optsUnrecognizedDebugType(s), rangeCmdArgs)) | None -> tcConfigB.portablePDB <- false; tcConfigB.embeddedPDB <- false; tcConfigB.jitTracking <- s = OptionSwitch.On; tcConfigB.debuginfo <- s = OptionSwitch.On @@ -549,7 +555,7 @@ let inputFileFlagsFsc tcConfigB = inputFileFlagsBoth tcConfigB //--------------------------------- let errorsAndWarningsFlags (tcConfigB: TcConfigBuilder) = - let trimFS (s:string) = if s.StartsWith("FS", StringComparison.Ordinal) = true then s.Substring(2) else s + let trimFS (s:string) = if s.StartsWithOrdinal("FS") = true then s.Substring(2) else s let trimFStoInt (s:string) = try Some (int32 (trimFS s)) @@ -642,7 +648,7 @@ let outputFileFlagsFsc (tcConfigB : TcConfigBuilder) = CompilerOption("sig", tagFile, OptionString (setSignatureFile tcConfigB), None, Some (FSComp.SR.optsSig())) - CompilerOption("nocopyfsharpcore", tagNone, OptionUnit (fun () -> tcConfigB.copyFSharpCore <- false), None, Some (FSComp.SR.optsNoCopyFsharpCore())) + CompilerOption("nocopyfsharpcore", tagNone, OptionUnit (fun () -> tcConfigB.copyFSharpCore <- CopyFSharpCoreFlag.No), None, Some (FSComp.SR.optsNoCopyFsharpCore())) ] @@ -732,17 +738,15 @@ let libFlagAbbrev (tcConfigB : TcConfigBuilder) = let codePageFlag (tcConfigB : TcConfigBuilder) = CompilerOption("codepage", tagInt, OptionInt (fun n -> try - System.Text.Encoding.GetEncodingShim(n) |> ignore + System.Text.Encoding.GetEncoding(n) |> ignore with :? System.ArgumentException as err -> error(Error(FSComp.SR.optsProblemWithCodepage(n,err.Message),rangeCmdArgs)) tcConfigB.inputCodePage <- Some(n)), None, Some (FSComp.SR.optsCodepage())) -#if PREFERRED_UI_LANG let preferredUiLang (tcConfigB: TcConfigBuilder) = CompilerOption("preferreduilang", tagString, OptionString (fun s -> tcConfigB.preferredUiLang <- Some(s)), None, Some(FSComp.SR.optsPreferredUiLang())) -#endif let utf8OutputFlag (tcConfigB: TcConfigBuilder) = CompilerOption("utf8output", tagNone, OptionUnit (fun () -> tcConfigB.utf8output <- true), None, @@ -771,9 +775,7 @@ let advancedFlagsBoth tcConfigB = [ yield codePageFlag tcConfigB yield utf8OutputFlag tcConfigB -#if PREFERRED_UI_LANG yield preferredUiLang tcConfigB -#endif yield fullPathsFlag tcConfigB yield libFlag tcConfigB yield CompilerOption("simpleresolution", @@ -830,6 +832,7 @@ let advancedFlagsFsc tcConfigB = let testFlag tcConfigB = CompilerOption("test", tagString, OptionString (fun s -> match s with + | "StackSpan" -> tcConfigB.internalTestSpanStackReferring <- true | "ErrorRanges" -> tcConfigB.errorStyle <- ErrorStyle.TestErrors | "MemberBodyRanges" -> PostTypeCheckSemanticChecks.testFlagMemberBody := true | "Tracking" -> Lib.tracking := true (* general purpose on/off diagnostics flag *) @@ -849,20 +852,16 @@ let testFlag tcConfigB = let vsSpecificFlags (tcConfigB: TcConfigBuilder) = [ CompilerOption("vserrors", tagNone, OptionUnit (fun () -> tcConfigB.errorStyle <- ErrorStyle.VSErrors), None, None) CompilerOption("validate-type-providers", tagNone, OptionUnit (id), None, None) // preserved for compatibility's sake, no longer has any effect -#if PREFERRED_UI_LANG - CompilerOption("LCID", tagInt, OptionInt (fun _n -> ()), None, None) -#else - CompilerOption("LCID", tagInt, OptionInt (fun n -> tcConfigB.lcid <- Some(n)), None, None) -#endif + CompilerOption("LCID", tagInt, OptionInt ignore, None, None) CompilerOption("flaterrors", tagNone, OptionUnit (fun () -> tcConfigB.flatErrors <- true), None, None) - CompilerOption("sqmsessionguid", tagNone, OptionString (fun s -> tcConfigB.sqmSessionGuid <- try System.Guid(s) |> Some with e -> None), None, None) + CompilerOption("sqmsessionguid", tagNone, OptionString ignore, None, None) CompilerOption("gccerrors", tagNone, OptionUnit (fun () -> tcConfigB.errorStyle <- ErrorStyle.GccErrors), None, None) CompilerOption("exename", tagNone, OptionString (fun s -> tcConfigB.exename <- Some(s)), None, None) CompilerOption("maxerrors", tagInt, OptionInt (fun n -> tcConfigB.maxErrors <- n), None, None) ] let internalFlags (tcConfigB:TcConfigBuilder) = [ - CompilerOption("stamps", tagNone, OptionUnit (fun () -> ()), Some(InternalCommandLineOption("--stamps", rangeCmdArgs)), None) + CompilerOption("stamps", tagNone, OptionUnit ignore, Some(InternalCommandLineOption("--stamps", rangeCmdArgs)), None) CompilerOption("ranges", tagNone, OptionSet Tastops.DebugPrint.layoutRanges, Some(InternalCommandLineOption("--ranges", rangeCmdArgs)), None) CompilerOption("terms" , tagNone, OptionUnit (fun () -> tcConfigB.showTerms <- true), Some(InternalCommandLineOption("--terms", rangeCmdArgs)), None) CompilerOption("termsfile" , tagNone, OptionUnit (fun () -> tcConfigB.writeTermsToFiles <- true), Some(InternalCommandLineOption("--termsfile", rangeCmdArgs)), None) @@ -1018,7 +1017,7 @@ let abbreviatedFlagsFsc tcConfigB = abbreviatedFlagsBoth tcConfigB @ [ (* FSC only abbreviated options *) CompilerOption("o", tagString, OptionString (setOutFileName tcConfigB), None, Some(FSComp.SR.optsShortFormOf("--out"))) - CompilerOption("a", tagString, OptionUnit (fun () -> tcConfigB.target <- Dll), None, Some(FSComp.SR.optsShortFormOf("--target library"))) + CompilerOption("a", tagString, OptionUnit (fun () -> tcConfigB.target <- CompilerTarget.Dll), None, Some(FSComp.SR.optsShortFormOf("--target library"))) (* FSC help abbreviations. FSI has it's own help options... *) CompilerOption("?" , tagNone, OptionHelp (fun blocks -> displayHelpFsc tcConfigB blocks), None, Some(FSComp.SR.optsShortFormOf("--help"))) CompilerOption("help" , tagNone, OptionHelp (fun blocks -> displayHelpFsc tcConfigB blocks), None, Some(FSComp.SR.optsShortFormOf("--help"))) @@ -1350,7 +1349,7 @@ let GenerateIlxCode (ilxBackend, isInteractiveItExpr, isInteractiveOnMono, tcCon fragName = fragName localOptimizationsAreOn= tcConfig.optSettings.localOpt () testFlagEmitFeeFeeAs100001 = tcConfig.testFlagEmitFeeFeeAs100001 - mainMethodInfo= (if (tcConfig.target = Dll || tcConfig.target = Module) then None else Some topAttrs.mainMethodAttrs) + mainMethodInfo= (if (tcConfig.target = CompilerTarget.Dll || tcConfig.target = CompilerTarget.Module) then None else Some topAttrs.mainMethodAttrs) ilxBackend = ilxBackend isInteractive = tcConfig.isInteractive isInteractiveItExpr = isInteractiveItExpr @@ -1374,7 +1373,7 @@ let NormalizeAssemblyRefs (ctok, tcImports:TcImports) scoref = let GetGeneratedILModuleName (t:CompilerTarget) (s:string) = // return the name of the file as a module name - let ext = match t with | Dll -> "dll" | Module -> "netmodule" | _ -> "exe" + let ext = match t with CompilerTarget.Dll -> "dll" | CompilerTarget.Module -> "netmodule" | _ -> "exe" s + "." + ext let ignoreFailureOnMono1_1_16 f = try f() with _ -> () diff --git a/src/fsharp/CompileOptions.fsi b/src/fsharp/CompileOptions.fsi index 2a6858b1ff0..50e7a3acefc 100644 --- a/src/fsharp/CompileOptions.fsi +++ b/src/fsharp/CompileOptions.fsi @@ -2,15 +2,9 @@ module internal Microsoft.FSharp.Compiler.CompileOptions -open Internal.Utilities open Microsoft.FSharp.Compiler -open Microsoft.FSharp.Compiler.AbstractIL -open Microsoft.FSharp.Compiler.AbstractIL.IL -open Microsoft.FSharp.Compiler.AbstractIL.Internal open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library open Microsoft.FSharp.Compiler.CompileOps -open Microsoft.FSharp.Compiler.ErrorLogger -open Microsoft.FSharp.Compiler.Ast open Microsoft.FSharp.Compiler.Tast open Microsoft.FSharp.Compiler.Import open Microsoft.FSharp.Compiler.Optimizer diff --git a/src/fsharp/ConstraintSolver.fs b/src/fsharp/ConstraintSolver.fs index 0ec8f9f832a..8363ea03d6c 100644 --- a/src/fsharp/ConstraintSolver.fs +++ b/src/fsharp/ConstraintSolver.fs @@ -1,6 +1,5 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -module internal Microsoft.FSharp.Compiler.ConstraintSolver //------------------------------------------------------------------------- // Incremental type inference constraint solving. @@ -30,11 +29,13 @@ module internal Microsoft.FSharp.Compiler.ConstraintSolver // //------------------------------------------------------------------------- + +module internal Microsoft.FSharp.Compiler.ConstraintSolver + open Internal.Utilities.Collections open Microsoft.FSharp.Compiler open Microsoft.FSharp.Compiler.AbstractIL -open Microsoft.FSharp.Compiler.AbstractIL.Internal open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library open Microsoft.FSharp.Compiler.Ast open Microsoft.FSharp.Compiler.ErrorLogger @@ -58,10 +59,10 @@ open Microsoft.FSharp.Compiler.TypeRelations // of the constraint resolution carried out by type checking. //------------------------------------------------------------------------- -let compgen_id = mkSynId range0 unassignedTyparName +let compgenId = mkSynId range0 unassignedTyparName let NewCompGenTypar (kind, rigid, staticReq, dynamicReq, error) = - NewTypar(kind, rigid, Typar(compgen_id, staticReq, true), error, dynamicReq, [], false, false) + NewTypar(kind, rigid, Typar(compgenId, staticReq, true), error, dynamicReq, [], false, false) let anon_id m = mkSynId m unassignedTyparName @@ -75,10 +76,16 @@ let NewInferenceMeasurePar () = NewCompGenTypar (TyparKind.Measure, TyparRigidit let NewErrorTypar () = NewCompGenTypar (TyparKind.Type, TyparRigidity.Flexible, NoStaticReq, TyparDynamicReq.No, true) let NewErrorMeasureVar () = NewCompGenTypar (TyparKind.Measure, TyparRigidity.Flexible, NoStaticReq, TyparDynamicReq.No, true) -let NewInferenceType () = mkTyparTy (NewTypar (TyparKind.Type, TyparRigidity.Flexible, Typar(compgen_id, NoStaticReq, true), false, TyparDynamicReq.No, [], false, false)) +let NewInferenceType () = mkTyparTy (NewTypar (TyparKind.Type, TyparRigidity.Flexible, Typar(compgenId, NoStaticReq, true), false, TyparDynamicReq.No, [], false, false)) let NewErrorType () = mkTyparTy (NewErrorTypar ()) let NewErrorMeasure () = Measure.Var (NewErrorMeasureVar ()) +let NewByRefKindInferenceType (g: TcGlobals) m = + let tp = NewTypar (TyparKind.Type, TyparRigidity.Flexible, Typar(compgenId, HeadTypeStaticReq, true), false, TyparDynamicReq.No, [], false, false) + if g.byrefkind_InOut_tcr.CanDeref then + tp.SetConstraints [TyparConstraint.DefaultsTo(10, TType_app(g.byrefkind_InOut_tcr, []), m)] + mkTyparTy tp + let NewInferenceTypes l = l |> List.map (fun _ -> NewInferenceType ()) // QUERY: should 'rigid' ever really be 'true'? We set this when we know @@ -115,32 +122,34 @@ let FreshenMethInfo m (minfo:MethInfo) = [] /// Information about the context of a type equation. type ContextInfo = -/// No context was given. -| NoContext -/// The type equation comes from an IF expression. -| IfExpression of range -/// The type equation comes from an omitted else branch. -| OmittedElseBranch of range -/// The type equation comes from a type check of the result of an else branch. -| ElseBranchResult of range -/// The type equation comes from the verification of record fields. -| RecordFields -/// The type equation comes from the verification of a tuple in record fields. -| TupleInRecordFields -/// The type equation comes from a list or array constructor -| CollectionElement of bool * range -/// The type equation comes from a return in a computation expression. -| ReturnInComputationExpression -/// The type equation comes from a yield in a computation expression. -| YieldInComputationExpression -/// The type equation comes from a runtime type test. -| RuntimeTypeTest of bool -/// The type equation comes from an downcast where a upcast could be used. -| DowncastUsedInsteadOfUpcast of bool -/// The type equation comes from a return type of a pattern match clause (not the first clause). -| FollowingPatternMatchClause of range -/// The type equation comes from a pattern match guard. -| PatternMatchGuard of range + /// No context was given. + | NoContext + /// The type equation comes from an IF expression. + | IfExpression of range + /// The type equation comes from an omitted else branch. + | OmittedElseBranch of range + /// The type equation comes from a type check of the result of an else branch. + | ElseBranchResult of range + /// The type equation comes from the verification of record fields. + | RecordFields + /// The type equation comes from the verification of a tuple in record fields. + | TupleInRecordFields + /// The type equation comes from a list or array constructor + | CollectionElement of bool * range + /// The type equation comes from a return in a computation expression. + | ReturnInComputationExpression + /// The type equation comes from a yield in a computation expression. + | YieldInComputationExpression + /// The type equation comes from a runtime type test. + | RuntimeTypeTest of bool + /// The type equation comes from an downcast where a upcast could be used. + | DowncastUsedInsteadOfUpcast of bool + /// The type equation comes from a return type of a pattern match clause (not the first clause). + | FollowingPatternMatchClause of range + /// The type equation comes from a pattern match guard. + | PatternMatchGuard of range + /// The type equation comes from a sequence expression. + | SequenceExpression of TType exception ConstraintSolverTupleDiffLengths of DisplayEnv * TType list * TType list * range * range exception ConstraintSolverInfiniteTypes of ContextInfo * DisplayEnv * TType * TType * range * range @@ -258,7 +267,9 @@ let isIntegerTy g ty = isUnsignedIntegerTy g ty let isStringTy g ty = typeEquiv g g.string_ty ty + let isCharTy g ty = typeEquiv g g.char_ty ty + let isBoolTy g ty = typeEquiv g g.bool_ty ty /// float or float32 or float<_> or float32<_> @@ -356,7 +367,7 @@ let FilterEachThenUndo f meths = trace.Undo() match CheckNoErrorsAndGetWarnings res with | None -> None - | Some warns -> Some (calledMeth, warns.Length, trace)) + | Some warns -> Some (calledMeth, warns, trace)) let ShowAccessDomain ad = match ad with @@ -415,8 +426,6 @@ let PreferUnifyTypar (v1:Typar) (v2:Typar) = | true, false -> false | _ -> true - - /// Reorder a list of (variable, exponent) pairs so that a variable that is Preferred /// is at the head of the list, if possible let FindPreferredTypar vs = @@ -465,23 +474,36 @@ and SolveTypStaticReq (csenv:ConstraintSolverEnv) trace req ty = IterateD (fun ((tpr:Typar), _) -> SolveTypStaticReqTypar csenv trace req tpr) vs | _ -> match tryAnyParTy csenv.g ty with - | Some tpr -> SolveTypStaticReqTypar csenv trace req tpr - | None -> CompleteD + | ValueSome tpr -> SolveTypStaticReqTypar csenv trace req tpr + | ValueNone -> CompleteD -let rec TransactDynamicReq (trace:OptionalTrace) (tpr:Typar) req = +let TransactDynamicReq (trace:OptionalTrace) (tpr:Typar) req = let orig = tpr.DynamicReq trace.Exec (fun () -> tpr.SetDynamicReq req) (fun () -> tpr.SetDynamicReq orig) CompleteD -and SolveTypDynamicReq (csenv:ConstraintSolverEnv) trace req ty = +let SolveTypDynamicReq (csenv:ConstraintSolverEnv) trace req ty = match req with | TyparDynamicReq.No -> CompleteD | TyparDynamicReq.Yes -> match tryAnyParTy csenv.g ty with - | Some tpr when tpr.DynamicReq <> TyparDynamicReq.Yes -> + | ValueSome tpr when tpr.DynamicReq <> TyparDynamicReq.Yes -> TransactDynamicReq trace tpr TyparDynamicReq.Yes | _ -> CompleteD +let TransactIsCompatFlex (trace:OptionalTrace) (tpr:Typar) req = + let orig = tpr.IsCompatFlex + trace.Exec (fun () -> tpr.SetIsCompatFlex req) (fun () -> tpr.SetIsCompatFlex orig) + CompleteD + +let SolveTypIsCompatFlex (csenv:ConstraintSolverEnv) trace req ty = + if req then + match tryAnyParTy csenv.g ty with + | ValueSome tpr when not tpr.IsCompatFlex -> TransactIsCompatFlex trace tpr req + | _ -> CompleteD + else + CompleteD + let SubstMeasureWarnIfRigid (csenv:ConstraintSolverEnv) trace (v:Typar) ms = if v.Rigidity.WarnIfUnified && not (isAnyParTy csenv.g (TType_measure ms)) then // NOTE: we grab the name eagerly to make sure the type variable prints as a type variable @@ -665,8 +687,8 @@ let CheckWarnIfRigid (csenv:ConstraintSolverEnv) ty1 (r:Typar) ty = if not r.Rigidity.WarnIfUnified then CompleteD else let needsWarning = match tryAnyParTy g ty with - | None -> true - | Some tp2 -> + | ValueNone -> true + | ValueSome tp2 -> not tp2.IsCompilerGenerated && (r.IsCompilerGenerated || // exclude this warning for two identically named user-specified type parameters, e.g. from different mutually recursive functions or types @@ -681,7 +703,7 @@ let CheckWarnIfRigid (csenv:ConstraintSolverEnv) ty1 (r:Typar) ty = /// Add the constraint "ty1 = ty" to the constraint problem, where ty1 is a type variable. /// Propagate all effects of adding this constraint, e.g. to solve other variables -let rec SolveTyparEqualsTyp (csenv:ConstraintSolverEnv) ndeep m2 (trace:OptionalTrace) ty1 ty = +let rec SolveTyparEqualsType (csenv:ConstraintSolverEnv) ndeep m2 (trace:OptionalTrace) ty1 ty = let m = csenv.m DepthCheck ndeep m ++ (fun () -> @@ -714,49 +736,51 @@ let rec SolveTyparEqualsTyp (csenv:ConstraintSolverEnv) ndeep m2 (trace:Optional CompleteD) ++ (fun _ -> // Re-solve the other constraints associated with this type variable - solveTypMeetsTyparConstraints csenv ndeep m2 trace ty (r.DynamicReq, r.StaticReq, r.Constraints))) + solveTypMeetsTyparConstraints csenv ndeep m2 trace ty r)) - | _ -> failwith "SolveTyparEqualsTyp") + | _ -> failwith "SolveTyparEqualsType") -/// Given a type 'ty' and a set of constraints on that type, solve those constraints. -and solveTypMeetsTyparConstraints (csenv:ConstraintSolverEnv) ndeep m2 trace ty (dreq, sreq, cs) = +/// Apply the constraints on 'typar' to the type 'ty' +and solveTypMeetsTyparConstraints (csenv:ConstraintSolverEnv) ndeep m2 trace ty (r: Typar) = let g = csenv.g + // Propagate compat flex requirements from 'tp' to 'ty' + SolveTypIsCompatFlex csenv trace r.IsCompatFlex ty ++ (fun () -> // Propagate dynamic requirements from 'tp' to 'ty' - SolveTypDynamicReq csenv trace dreq ty ++ (fun () -> + SolveTypDynamicReq csenv trace r.DynamicReq ty ++ (fun () -> // Propagate static requirements from 'tp' to 'ty' - SolveTypStaticReq csenv trace sreq ty ++ (fun () -> + SolveTypStaticReq csenv trace r.StaticReq ty ++ (fun () -> // Solve constraints on 'tp' w.r.t. 'ty' - cs |> IterateD (function + r.Constraints |> IterateD (function | TyparConstraint.DefaultsTo (priority, dty, m) -> if typeEquiv g ty dty then CompleteD else match tryDestTyparTy g ty with - | None -> CompleteD - | Some destTypar -> + | ValueNone -> CompleteD + | ValueSome destTypar -> AddConstraint csenv ndeep m2 trace destTypar (TyparConstraint.DefaultsTo(priority, dty, m)) - | TyparConstraint.SupportsNull m2 -> SolveTypSupportsNull csenv ndeep m2 trace ty - | TyparConstraint.IsEnum(underlying, m2) -> SolveTypIsEnum csenv ndeep m2 trace ty underlying - | TyparConstraint.SupportsComparison(m2) -> SolveTypeSupportsComparison csenv ndeep m2 trace ty - | TyparConstraint.SupportsEquality(m2) -> SolveTypSupportsEquality csenv ndeep m2 trace ty - | TyparConstraint.IsDelegate(aty, bty, m2) -> SolveTypIsDelegate csenv ndeep m2 trace ty aty bty - | TyparConstraint.IsNonNullableStruct m2 -> SolveTypIsNonNullableValueType csenv ndeep m2 trace ty - | TyparConstraint.IsUnmanaged m2 -> SolveTypIsUnmanaged csenv ndeep m2 trace ty - | TyparConstraint.IsReferenceType m2 -> SolveTypIsReferenceType csenv ndeep m2 trace ty - | TyparConstraint.RequiresDefaultConstructor m2 -> SolveTypRequiresDefaultConstructor csenv ndeep m2 trace ty - | TyparConstraint.SimpleChoice(tys, m2) -> SolveTypChoice csenv ndeep m2 trace ty tys - | TyparConstraint.CoercesTo(ty2, m2) -> SolveTypSubsumesTypKeepAbbrevs csenv ndeep m2 trace None ty2 ty + | TyparConstraint.SupportsNull m2 -> SolveTypeSupportsNull csenv ndeep m2 trace ty + | TyparConstraint.IsEnum(underlying, m2) -> SolveTypeIsEnum csenv ndeep m2 trace ty underlying + | TyparConstraint.SupportsComparison(m2) -> SolveTypeSupportsComparison csenv ndeep m2 trace ty + | TyparConstraint.SupportsEquality(m2) -> SolveTypeSupportsEquality csenv ndeep m2 trace ty + | TyparConstraint.IsDelegate(aty, bty, m2) -> SolveTypeIsDelegate csenv ndeep m2 trace ty aty bty + | TyparConstraint.IsNonNullableStruct m2 -> SolveTypeIsNonNullableValueType csenv ndeep m2 trace ty + | TyparConstraint.IsUnmanaged m2 -> SolveTypeIsUnmanaged csenv ndeep m2 trace ty + | TyparConstraint.IsReferenceType m2 -> SolveTypeIsReferenceType csenv ndeep m2 trace ty + | TyparConstraint.RequiresDefaultConstructor m2 -> SolveTypeRequiresDefaultConstructor csenv ndeep m2 trace ty + | TyparConstraint.SimpleChoice(tys, m2) -> SolveTypeChoice csenv ndeep m2 trace ty tys + | TyparConstraint.CoercesTo(ty2, m2) -> SolveTypeSubsumesTypeKeepAbbrevs csenv ndeep m2 trace None ty2 ty | TyparConstraint.MayResolveMember(traitInfo, m2) -> SolveMemberConstraint csenv false false ndeep m2 trace traitInfo ++ (fun _ -> CompleteD) - ))) + )))) /// Add the constraint "ty1 = ty2" to the constraint problem. /// Propagate all effects of adding this constraint, e.g. to solve type variables -and SolveTypEqualsTyp (csenv:ConstraintSolverEnv) ndeep m2 (trace: OptionalTrace) (cxsln:(TraitConstraintInfo * TraitConstraintSln) option) ty1 ty2 = +and SolveTypeEqualsType (csenv:ConstraintSolverEnv) ndeep m2 (trace: OptionalTrace) (cxsln:(TraitConstraintInfo * TraitConstraintSln) option) ty1 ty2 = let ndeep = ndeep + 1 let aenv = csenv.EquivEnv let g = csenv.g @@ -775,48 +799,48 @@ and SolveTypEqualsTyp (csenv:ConstraintSolverEnv) ndeep m2 (trace: OptionalTrace match sty1, sty2 with // type vars inside forall-types may be alpha-equivalent - | TType_var tp1, TType_var tp2 when typarEq tp1 tp2 || (aenv.EquivTypars.ContainsKey tp1 && typeEquiv g aenv.EquivTypars.[tp1] ty2) -> CompleteD + | TType_var tp1, TType_var tp2 when typarEq tp1 tp2 || (match aenv.EquivTypars.TryFind tp1 with | Some v when typeEquiv g v ty2 -> true | _ -> false) -> CompleteD - | TType_var tp1, TType_var tp2 when PreferUnifyTypar tp1 tp2 -> SolveTyparEqualsTyp csenv ndeep m2 trace sty1 ty2 - | TType_var tp1, TType_var tp2 when not csenv.MatchingOnly && PreferUnifyTypar tp2 tp1 -> SolveTyparEqualsTyp csenv ndeep m2 trace sty2 ty1 + | TType_var tp1, TType_var tp2 when PreferUnifyTypar tp1 tp2 -> SolveTyparEqualsType csenv ndeep m2 trace sty1 ty2 + | TType_var tp1, TType_var tp2 when not csenv.MatchingOnly && PreferUnifyTypar tp2 tp1 -> SolveTyparEqualsType csenv ndeep m2 trace sty2 ty1 - | TType_var r, _ when (r.Rigidity <> TyparRigidity.Rigid) -> SolveTyparEqualsTyp csenv ndeep m2 trace sty1 ty2 - | _, TType_var r when (r.Rigidity <> TyparRigidity.Rigid) && not csenv.MatchingOnly -> SolveTyparEqualsTyp csenv ndeep m2 trace sty2 ty1 + | TType_var r, _ when (r.Rigidity <> TyparRigidity.Rigid) -> SolveTyparEqualsType csenv ndeep m2 trace sty1 ty2 + | _, TType_var r when (r.Rigidity <> TyparRigidity.Rigid) && not csenv.MatchingOnly -> SolveTyparEqualsType csenv ndeep m2 trace sty2 ty1 // Catch float<_>=float<1>, float32<_>=float32<1> and decimal<_>=decimal<1> | (_, TType_app (tc2, [ms])) when (tc2.IsMeasureableReprTycon && typeEquiv csenv.g sty1 (reduceTyconRefMeasureableOrProvided csenv.g tc2 [ms])) - -> SolveTypEqualsTyp csenv ndeep m2 trace None ms (TType_measure Measure.One) + -> SolveTypeEqualsType csenv ndeep m2 trace None ms (TType_measure Measure.One) | (TType_app (tc2, [ms]), _) when (tc2.IsMeasureableReprTycon && typeEquiv csenv.g sty2 (reduceTyconRefMeasureableOrProvided csenv.g tc2 [ms])) - -> SolveTypEqualsTyp csenv ndeep m2 trace None ms (TType_measure Measure.One) + -> SolveTypeEqualsType csenv ndeep m2 trace None ms (TType_measure Measure.One) - | TType_app (tc1, l1) , TType_app (tc2, l2) when tyconRefEq g tc1 tc2 -> SolveTypEqualsTypEqns csenv ndeep m2 trace None l1 l2 + | TType_app (tc1, l1) , TType_app (tc2, l2) when tyconRefEq g tc1 tc2 -> SolveTypeEqualsTypeEqns csenv ndeep m2 trace None l1 l2 | TType_app (_, _) , TType_app (_, _) -> localAbortD | TType_tuple (tupInfo1, l1) , TType_tuple (tupInfo2, l2) -> if evalTupInfoIsStruct tupInfo1 <> evalTupInfoIsStruct tupInfo2 then ErrorD (ConstraintSolverError(FSComp.SR.tcTupleStructMismatch(), csenv.m, m2)) else - SolveTypEqualsTypEqns csenv ndeep m2 trace None l1 l2 - | TType_fun (d1, r1) , TType_fun (d2, r2) -> SolveFunTypEqn csenv ndeep m2 trace None d1 d2 r1 r2 + SolveTypeEqualsTypeEqns csenv ndeep m2 trace None l1 l2 + | TType_fun (d1, r1) , TType_fun (d2, r2) -> SolveFunTypeEqn csenv ndeep m2 trace None d1 d2 r1 r2 | TType_measure ms1 , TType_measure ms2 -> UnifyMeasures csenv trace ms1 ms2 | TType_forall(tps1, rty1), TType_forall(tps2, rty2) -> if tps1.Length <> tps2.Length then localAbortD else let aenv = aenv.BindEquivTypars tps1 tps2 let csenv = {csenv with EquivEnv = aenv } if not (typarsAEquiv g aenv tps1 tps2) then localAbortD else - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace rty1 rty2 + SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace rty1 rty2 - | TType_ucase (uc1, l1) , TType_ucase (uc2, l2) when g.unionCaseRefEq uc1 uc2 -> SolveTypEqualsTypEqns csenv ndeep m2 trace None l1 l2 + | TType_ucase (uc1, l1) , TType_ucase (uc2, l2) when g.unionCaseRefEq uc1 uc2 -> SolveTypeEqualsTypeEqns csenv ndeep m2 trace None l1 l2 | _ -> localAbortD -and SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace ty1 ty2 = SolveTypEqualsTypKeepAbbrevsWithCxsln csenv ndeep m2 trace None ty1 ty2 +and SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace ty1 ty2 = SolveTypeEqualsTypeKeepAbbrevsWithCxsln csenv ndeep m2 trace None ty1 ty2 -and private SolveTypEqualsTypKeepAbbrevsWithCxsln csenv ndeep m2 trace cxsln ty1 ty2 = +and private SolveTypeEqualsTypeKeepAbbrevsWithCxsln csenv ndeep m2 trace cxsln ty1 ty2 = // Back out of expansions of type abbreviations to give improved error messages. // Note: any "normalization" of equations on type variables must respect the trace parameter - TryD (fun () -> SolveTypEqualsTyp csenv ndeep m2 trace cxsln ty1 ty2) + TryD (fun () -> SolveTypeEqualsType csenv ndeep m2 trace cxsln ty1 ty2) (function LocallyAbortOperationThatLosesAbbrevs -> ErrorD(ConstraintSolverTypesNotInEqualityRelation(csenv.DisplayEnv, ty1, ty2, csenv.m, m2, csenv.eContextInfo)) | err -> ErrorD err) -and SolveTypEqualsTypEqns csenv ndeep m2 trace cxsln origl1 origl2 = +and SolveTypeEqualsTypeEqns csenv ndeep m2 trace cxsln origl1 origl2 = match origl1, origl2 with | [], [] -> CompleteD | _ -> @@ -825,16 +849,21 @@ and SolveTypEqualsTypEqns csenv ndeep m2 trace cxsln origl1 origl2 = match l1, l2 with | [], [] -> CompleteD | h1::t1, h2::t2 -> - SolveTypEqualsTypKeepAbbrevsWithCxsln csenv ndeep m2 trace cxsln h1 h2 ++ (fun () -> loop t1 t2) + SolveTypeEqualsTypeKeepAbbrevsWithCxsln csenv ndeep m2 trace cxsln h1 h2 ++ (fun () -> loop t1 t2) | _ -> ErrorD(ConstraintSolverTupleDiffLengths(csenv.DisplayEnv, origl1, origl2, csenv.m, m2)) loop origl1 origl2 -and SolveFunTypEqn csenv ndeep m2 trace cxsln d1 d2 r1 r2 = - SolveTypEqualsTypKeepAbbrevsWithCxsln csenv ndeep m2 trace cxsln d1 d2 ++ (fun () -> - SolveTypEqualsTypKeepAbbrevsWithCxsln csenv ndeep m2 trace cxsln r1 r2) +and SolveFunTypeEqn csenv ndeep m2 trace cxsln d1 d2 r1 r2 = + SolveTypeEqualsTypeKeepAbbrevsWithCxsln csenv ndeep m2 trace cxsln d1 d2 ++ (fun () -> + SolveTypeEqualsTypeKeepAbbrevsWithCxsln csenv ndeep m2 trace cxsln r1 r2) -and SolveTypSubsumesTyp (csenv:ConstraintSolverEnv) ndeep m2 (trace: OptionalTrace) cxsln ty1 ty2 = +// ty1: expected +// ty2: actual +// +// "ty2 casts to ty1" +// "a value of type ty2 can be used where a value of type ty1 is expected" +and SolveTypeSubsumesType (csenv:ConstraintSolverEnv) ndeep m2 (trace: OptionalTrace) cxsln ty1 ty2 = // 'a :> obj ---> let ndeep = ndeep + 1 let g = csenv.g @@ -847,29 +876,46 @@ and SolveTypSubsumesTyp (csenv:ConstraintSolverEnv) ndeep m2 (trace: OptionalTra let aenv = csenv.EquivEnv let denv = csenv.DisplayEnv match sty1, sty2 with - | TType_var tp1, _ when aenv.EquivTypars.ContainsKey tp1 -> - SolveTypSubsumesTyp csenv ndeep m2 trace cxsln aenv.EquivTypars.[tp1] ty2 - - | TType_var r1, TType_var r2 when typarEq r1 r2 -> CompleteD + | TType_var tp1, _ -> + match aenv.EquivTypars.TryFind tp1 with + | Some v -> SolveTypeSubsumesType csenv ndeep m2 trace cxsln v ty2 + | _ -> + match sty2 with + | TType_var r2 when typarEq tp1 r2 -> CompleteD + | TType_var r when not csenv.MatchingOnly -> SolveTyparSubtypeOfType csenv ndeep m2 trace r ty1 + | _ -> SolveTypeEqualsTypeKeepAbbrevsWithCxsln csenv ndeep m2 trace cxsln ty1 ty2 + | _, TType_var r when not csenv.MatchingOnly -> SolveTyparSubtypeOfType csenv ndeep m2 trace r ty1 - | TType_var _ , _ -> SolveTypEqualsTypKeepAbbrevsWithCxsln csenv ndeep m2 trace cxsln ty1 ty2 + | TType_tuple (tupInfo1, l1) , TType_tuple (tupInfo2, l2) -> if evalTupInfoIsStruct tupInfo1 <> evalTupInfoIsStruct tupInfo2 then ErrorD (ConstraintSolverError(FSComp.SR.tcTupleStructMismatch(), csenv.m, m2)) else - SolveTypEqualsTypEqns csenv ndeep m2 trace cxsln l1 l2 (* nb. can unify since no variance *) - | TType_fun (d1, r1) , TType_fun (d2, r2) -> SolveFunTypEqn csenv ndeep m2 trace cxsln d1 d2 r1 r2 (* nb. can unify since no variance *) + SolveTypeEqualsTypeEqns csenv ndeep m2 trace cxsln l1 l2 (* nb. can unify since no variance *) + | TType_fun (d1, r1) , TType_fun (d2, r2) -> SolveFunTypeEqn csenv ndeep m2 trace cxsln d1 d2 r1 r2 (* nb. can unify since no variance *) | TType_measure ms1, TType_measure ms2 -> UnifyMeasures csenv trace ms1 ms2 // Enforce the identities float=float<1>, float32=float32<1> and decimal=decimal<1> | (_, TType_app (tc2, [ms])) when (tc2.IsMeasureableReprTycon && typeEquiv csenv.g sty1 (reduceTyconRefMeasureableOrProvided csenv.g tc2 [ms])) - -> SolveTypEqualsTypKeepAbbrevsWithCxsln csenv ndeep m2 trace cxsln ms (TType_measure Measure.One) + -> SolveTypeEqualsTypeKeepAbbrevsWithCxsln csenv ndeep m2 trace cxsln ms (TType_measure Measure.One) | (TType_app (tc2, [ms]), _) when (tc2.IsMeasureableReprTycon && typeEquiv csenv.g sty2 (reduceTyconRefMeasureableOrProvided csenv.g tc2 [ms])) - -> SolveTypEqualsTypKeepAbbrevsWithCxsln csenv ndeep m2 trace cxsln ms (TType_measure Measure.One) + -> SolveTypeEqualsTypeKeepAbbrevsWithCxsln csenv ndeep m2 trace cxsln ms (TType_measure Measure.One) + + // Special subsumption rule for byref tags + | TType_app (tc1, l1) , TType_app (tc2, l2) when tyconRefEq g tc1 tc2 && g.byref2_tcr.CanDeref && tyconRefEq g g.byref2_tcr tc1 -> + match l1, l2 with + | [ h1; tag1 ], [ h2; tag2 ] -> + SolveTypeEqualsType csenv ndeep m2 trace None h1 h2 ++ (fun () -> + match stripTyEqnsA csenv.g canShortcut tag1, stripTyEqnsA csenv.g canShortcut tag2 with + | TType_app(tagc1, []), TType_app(tagc2, []) + when (tyconRefEq g tagc2 g.byrefkind_InOut_tcr && + (tyconRefEq g tagc1 g.byrefkind_In_tcr || tyconRefEq g tagc1 g.byrefkind_Out_tcr) ) -> CompleteD + | _ -> SolveTypeEqualsType csenv ndeep m2 trace cxsln tag1 tag2) + | _ -> SolveTypeEqualsTypeEqns csenv ndeep m2 trace cxsln l1 l2 | TType_app (tc1, l1) , TType_app (tc2, l2) when tyconRefEq g tc1 tc2 -> - SolveTypEqualsTypEqns csenv ndeep m2 trace cxsln l1 l2 + SolveTypeEqualsTypeEqns csenv ndeep m2 trace cxsln l1 l2 | TType_ucase (uc1, l1) , TType_ucase (uc2, l2) when g.unionCaseRefEq uc1 uc2 -> - SolveTypEqualsTypEqns csenv ndeep m2 trace cxsln l1 l2 + SolveTypeEqualsTypeEqns csenv ndeep m2 trace cxsln l1 l2 | _ -> // By now we know the type is not a variable type @@ -897,7 +943,7 @@ and SolveTypSubsumesTyp (csenv:ConstraintSolverEnv) ndeep m2 (trace: OptionalTra match tinst with | [ty1arg] -> let ty2arg = destArrayTy g ty2 - SolveTypEqualsTypKeepAbbrevsWithCxsln csenv ndeep m2 trace cxsln ty1arg ty2arg + SolveTypeEqualsTypeKeepAbbrevsWithCxsln csenv ndeep m2 trace cxsln ty1arg ty2arg | _ -> error(InternalError("destArrayTy", m)) | _ -> // D :> Head<_> --> C :> Head<_> for the @@ -905,11 +951,11 @@ and SolveTypSubsumesTyp (csenv:ConstraintSolverEnv) ndeep m2 (trace: OptionalTra // may feasibly convert to Head. match FindUniqueFeasibleSupertype g amap m ty1 ty2 with | None -> ErrorD(ConstraintSolverTypesNotInSubsumptionRelation(denv, ty1, ty2, m, m2)) - | Some t -> SolveTypSubsumesTyp csenv ndeep m2 trace cxsln ty1 t + | Some t -> SolveTypeSubsumesType csenv ndeep m2 trace cxsln ty1 t -and SolveTypSubsumesTypKeepAbbrevs csenv ndeep m2 trace cxsln ty1 ty2 = +and SolveTypeSubsumesTypeKeepAbbrevs csenv ndeep m2 trace cxsln ty1 ty2 = let denv = csenv.DisplayEnv - TryD (fun () -> SolveTypSubsumesTyp csenv ndeep m2 trace cxsln ty1 ty2) + TryD (fun () -> SolveTypeSubsumesType csenv ndeep m2 trace cxsln ty1 ty2) (function LocallyAbortOperationThatLosesAbbrevs -> ErrorD(ConstraintSolverTypesNotInSubsumptionRelation(denv, ty1, ty2, csenv.m, m2)) | err -> ErrorD err) @@ -923,7 +969,7 @@ and SolveTyparSubtypeOfType (csenv:ConstraintSolverEnv) ndeep m2 trace tp ty1 = if isObjTy g ty1 then CompleteD elif typeEquiv g ty1 (mkTyparTy tp) then CompleteD elif isSealedTy g ty1 then - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace (mkTyparTy tp) ty1 + SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace (mkTyparTy tp) ty1 else AddConstraint csenv ndeep m2 trace tp (TyparConstraint.CoercesTo(ty1, csenv.m)) @@ -934,7 +980,7 @@ and DepthCheck ndeep m = and SolveDimensionlessNumericType (csenv:ConstraintSolverEnv) ndeep m2 trace ty = match GetMeasureOfType csenv.g ty with | Some (tcref, _) -> - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace ty (mkAppTy tcref [TType_measure Measure.One]) + SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace ty (mkAppTy tcref [TType_measure Measure.One]) | None -> CompleteD @@ -962,7 +1008,7 @@ and SolveMemberConstraint (csenv:ConstraintSolverEnv) ignoreUnresolvedOverload p // Assert the object type if the constraint is for an instance member if memFlags.IsInstance then match tys, argtys with - | [ty], (h :: _) -> SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace h ty + | [ty], (h :: _) -> SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace h ty | _ -> ErrorD (ConstraintSolverError(FSComp.SR.csExpectedArguments(), m, m2)) else CompleteD ++ (fun () -> @@ -1019,73 +1065,73 @@ and SolveMemberConstraint (csenv:ConstraintSolverEnv) ignoreUnresolvedOverload p match GetMeasureOfType g argty1 with | Some (tcref, ms1) -> let ms2 = freshMeasure () - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace argty2 (mkAppTy tcref [TType_measure ms2]) ++ (fun () -> - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace rty (mkAppTy tcref [TType_measure (Measure.Prod(ms1, if nm = "op_Multiply" then ms2 else Measure.Inv ms2))]) ++ (fun () -> + SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace argty2 (mkAppTy tcref [TType_measure ms2]) ++ (fun () -> + SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace rty (mkAppTy tcref [TType_measure (Measure.Prod(ms1, if nm = "op_Multiply" then ms2 else Measure.Inv ms2))]) ++ (fun () -> ResultD TTraitBuiltIn)) | _ -> match GetMeasureOfType g argty2 with | Some (tcref, ms2) -> let ms1 = freshMeasure () - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace argty1 (mkAppTy tcref [TType_measure ms1]) ++ (fun () -> - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace rty (mkAppTy tcref [TType_measure (Measure.Prod(ms1, if nm = "op_Multiply" then ms2 else Measure.Inv ms2))]) ++ (fun () -> + SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace argty1 (mkAppTy tcref [TType_measure ms1]) ++ (fun () -> + SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace rty (mkAppTy tcref [TType_measure (Measure.Prod(ms1, if nm = "op_Multiply" then ms2 else Measure.Inv ms2))]) ++ (fun () -> ResultD TTraitBuiltIn)) | _ -> - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace argty2 argty1 ++ (fun () -> - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace rty argty1 ++ (fun () -> + SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace argty2 argty1 ++ (fun () -> + SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace rty argty1 ++ (fun () -> ResultD TTraitBuiltIn)) | _, _, false, ("op_Addition" | "op_Subtraction" | "op_Modulus"), [argty1;argty2] when // Ignore any explicit +/- overloads from any basic integral types - (minfos |> List.forall (fun minfo -> isIntegerTy g minfo.EnclosingType ) && + (minfos |> List.forall (fun minfo -> isIntegerTy g minfo.ApparentEnclosingType ) && ( (IsNumericOrIntegralEnumType g argty1 || (nm = "op_Addition" && (isCharTy g argty1 || isStringTy g argty1))) && (permitWeakResolution || not (isTyparTy g argty2)) || (IsNumericOrIntegralEnumType g argty2 || (nm = "op_Addition" && (isCharTy g argty2 || isStringTy g argty2))) && (permitWeakResolution || not (isTyparTy g argty1)))) -> - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace argty2 argty1 ++ (fun () -> - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace rty argty1 ++ (fun () -> + SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace argty2 argty1 ++ (fun () -> + SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace rty argty1 ++ (fun () -> ResultD TTraitBuiltIn)) | _, _, false, ("op_LessThan" | "op_LessThanOrEqual" | "op_GreaterThan" | "op_GreaterThanOrEqual" | "op_Equality" | "op_Inequality" ), [argty1;argty2] when // Ignore any explicit overloads from any basic integral types - (minfos |> List.forall (fun minfo -> isIntegerTy g minfo.EnclosingType ) && + (minfos |> List.forall (fun minfo -> isIntegerTy g minfo.ApparentEnclosingType ) && ( (IsRelationalType g argty1 && (permitWeakResolution || not (isTyparTy g argty2))) || (IsRelationalType g argty2 && (permitWeakResolution || not (isTyparTy g argty1))))) -> - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace argty2 argty1 ++ (fun () -> - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace rty g.bool_ty ++ (fun () -> + SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace argty2 argty1 ++ (fun () -> + SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace rty g.bool_ty ++ (fun () -> ResultD TTraitBuiltIn)) // We pretend for uniformity that the numeric types have a static property called Zero and One // As with constants, only zero is polymorphic in its units | [], [ty], false, "get_Zero", [] when IsNumericType g ty -> - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace rty ty ++ (fun () -> + SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace rty ty ++ (fun () -> ResultD TTraitBuiltIn) | [], [ty], false, "get_One", [] when IsNumericType g ty || isCharTy g ty -> SolveDimensionlessNumericType csenv ndeep m2 trace ty ++ (fun () -> - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace rty ty ++ (fun () -> + SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace rty ty ++ (fun () -> ResultD TTraitBuiltIn)) | [], _, false, ("DivideByInt"), [argty1;argty2] when isFpTy g argty1 || isDecimalTy g argty1 -> - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace argty2 g.int_ty ++ (fun () -> - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace rty argty1 ++ (fun () -> + SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace argty2 g.int_ty ++ (fun () -> + SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace rty argty1 ++ (fun () -> ResultD TTraitBuiltIn)) // We pretend for uniformity that the 'string' and 'array' types have an indexer property called 'Item' | [], [ty], true, ("get_Item"), [argty1] when isStringTy g ty -> - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace argty1 g.int_ty ++ (fun () -> - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace rty g.char_ty ++ (fun () -> + SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace argty1 g.int_ty ++ (fun () -> + SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace rty g.char_ty ++ (fun () -> ResultD TTraitBuiltIn)) | [], [ty], true, ("get_Item"), argtys when isArrayTy g ty -> (if rankOfArrayTy g ty <> argtys.Length then ErrorD(ConstraintSolverError(FSComp.SR.csIndexArgumentMismatch((rankOfArrayTy g ty), argtys.Length), m, m2)) else CompleteD) ++ (fun () -> - (argtys |> IterateD (fun argty -> SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace argty g.int_ty)) ++ (fun () -> + (argtys |> IterateD (fun argty -> SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace argty g.int_ty)) ++ (fun () -> let ety = destArrayTy g ty - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace rty ety ++ (fun () -> + SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace rty ety ++ (fun () -> ResultD TTraitBuiltIn))) | [], [ty], true, ("set_Item"), argtys @@ -1093,57 +1139,57 @@ and SolveMemberConstraint (csenv:ConstraintSolverEnv) ignoreUnresolvedOverload p (if rankOfArrayTy g ty <> argtys.Length - 1 then ErrorD(ConstraintSolverError(FSComp.SR.csIndexArgumentMismatch((rankOfArrayTy g ty), (argtys.Length - 1)), m, m2)) else CompleteD) ++ (fun () -> let argtys, ety = List.frontAndBack argtys - (argtys |> IterateD (fun argty -> SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace argty g.int_ty)) ++ (fun () -> + (argtys |> IterateD (fun argty -> SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace argty g.int_ty)) ++ (fun () -> let etys = destArrayTy g ty - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace ety etys ++ (fun () -> + SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace ety etys ++ (fun () -> ResultD TTraitBuiltIn))) | [], _, false, ("op_BitwiseAnd" | "op_BitwiseOr" | "op_ExclusiveOr"), [argty1;argty2] when (isIntegerOrIntegerEnumTy g argty1 || (isEnumTy g argty1)) && (permitWeakResolution || not (isTyparTy g argty2)) || (isIntegerOrIntegerEnumTy g argty2 || (isEnumTy g argty2)) && (permitWeakResolution || not (isTyparTy g argty1)) -> - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace argty2 argty1 ++ (fun () -> - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace rty argty1 ++ (fun () -> + SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace argty2 argty1 ++ (fun () -> + SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace rty argty1 ++ (fun () -> SolveDimensionlessNumericType csenv ndeep m2 trace argty1 ++ (fun () -> ResultD TTraitBuiltIn))); | [], _, false, ("op_LeftShift" | "op_RightShift"), [argty1;argty2] when isIntegerOrIntegerEnumTy g argty1 -> - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace argty2 g.int_ty ++ (fun () -> - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace rty argty1 ++ (fun () -> + SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace argty2 g.int_ty ++ (fun () -> + SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace rty argty1 ++ (fun () -> SolveDimensionlessNumericType csenv ndeep m2 trace argty1 ++ (fun () -> ResultD TTraitBuiltIn))) | _, _, false, ("op_UnaryPlus"), [argty] when IsNumericOrIntegralEnumType g argty -> - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace rty argty ++ (fun () -> + SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace rty argty ++ (fun () -> ResultD TTraitBuiltIn) | _, _, false, ("op_UnaryNegation"), [argty] when isSignedIntegerTy g argty || isFpTy g argty || isDecimalTy g argty -> - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace rty argty ++ (fun () -> + SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace rty argty ++ (fun () -> ResultD TTraitBuiltIn) | _, _, true, ("get_Sign"), [] when (let argty = tys.Head in isSignedIntegerTy g argty || isFpTy g argty || isDecimalTy g argty) -> - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace rty g.int32_ty ++ (fun () -> + SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace rty g.int32_ty ++ (fun () -> ResultD TTraitBuiltIn) | _, _, false, ("op_LogicalNot" | "op_OnesComplement"), [argty] when isIntegerOrIntegerEnumTy g argty -> - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace rty argty ++ (fun () -> + SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace rty argty ++ (fun () -> SolveDimensionlessNumericType csenv ndeep m2 trace argty ++ (fun () -> ResultD TTraitBuiltIn)) | _, _, false, ("Abs"), [argty] when isSignedIntegerTy g argty || isFpTy g argty || isDecimalTy g argty -> - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace rty argty ++ (fun () -> + SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace rty argty ++ (fun () -> ResultD TTraitBuiltIn) | _, _, false, "Sqrt", [argty1] @@ -1151,18 +1197,18 @@ and SolveMemberConstraint (csenv:ConstraintSolverEnv) ignoreUnresolvedOverload p match GetMeasureOfType g argty1 with | Some (tcref, _) -> let ms1 = freshMeasure () - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace argty1 (mkAppTy tcref [TType_measure (Measure.Prod (ms1, ms1))]) ++ (fun () -> - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace rty (mkAppTy tcref [TType_measure ms1]) ++ (fun () -> + SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace argty1 (mkAppTy tcref [TType_measure (Measure.Prod (ms1, ms1))]) ++ (fun () -> + SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace rty (mkAppTy tcref [TType_measure ms1]) ++ (fun () -> ResultD TTraitBuiltIn)) | None -> - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace rty argty1 ++ (fun () -> + SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace rty argty1 ++ (fun () -> ResultD TTraitBuiltIn) | _, _, false, ("Sin" | "Cos" | "Tan" | "Sinh" | "Cosh" | "Tanh" | "Atan" | "Acos" | "Asin" | "Exp" | "Ceiling" | "Floor" | "Round" | "Truncate" | "Log10" | "Log" | "Sqrt"), [argty] when isFpTy g argty -> SolveDimensionlessNumericType csenv ndeep m2 trace argty ++ (fun () -> - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace rty argty ++ (fun () -> + SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace rty argty ++ (fun () -> ResultD TTraitBuiltIn)) | _, _, false, ("op_Explicit"), [argty] @@ -1190,16 +1236,16 @@ and SolveMemberConstraint (csenv:ConstraintSolverEnv) ignoreUnresolvedOverload p when isFpTy g argty1 -> SolveDimensionlessNumericType csenv ndeep m2 trace argty1 ++ (fun () -> - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace argty2 argty1 ++ (fun () -> - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace rty argty1 ++ (fun () -> + SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace argty2 argty1 ++ (fun () -> + SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace rty argty1 ++ (fun () -> ResultD TTraitBuiltIn))) | _, _, false, ("Atan2"), [argty1; argty2] when isFpTy g argty1 -> - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace argty2 argty1 ++ (fun () -> + SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace argty2 argty1 ++ (fun () -> match GetMeasureOfType g argty1 with - | None -> SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace rty argty1 - | Some (tcref, _) -> SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace rty (mkAppTy tcref [TType_measure Measure.One])) ++ (fun () -> + | None -> SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace rty argty1 + | Some (tcref, _) -> SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace rty (mkAppTy tcref [TType_measure Measure.One])) ++ (fun () -> ResultD TTraitBuiltIn) | _ -> @@ -1208,8 +1254,8 @@ and SolveMemberConstraint (csenv:ConstraintSolverEnv) ignoreUnresolvedOverload p // First look for a solution by a record property let recdPropSearch = - let isGetProp = nm.StartsWith "get_" - let isSetProp = nm.StartsWith "set_" + let isGetProp = nm.StartsWithOrdinal("get_") + let isSetProp = nm.StartsWithOrdinal("set_") if argtys.IsEmpty && isGetProp || isSetProp then let propName = nm.[4..] let props = @@ -1277,7 +1323,7 @@ and SolveMemberConstraint (csenv:ConstraintSolverEnv) ignoreUnresolvedOverload p | Some (rfinfo, isSetProp), None -> // OK, the constraint is solved by a record property. Assert that the return types match. let rty2 = if isSetProp then g.unit_ty else rfinfo.FieldType - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace rty rty2 ++ (fun () -> + SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace rty rty2 ++ (fun () -> ResultD (TTraitSolvedRecdProp(rfinfo, isSetProp))) | None, Some (calledMeth:CalledMeth<_>) -> // OK, the constraint is solved. @@ -1287,9 +1333,9 @@ and SolveMemberConstraint (csenv:ConstraintSolverEnv) ignoreUnresolvedOverload p let isInstance = minfo.IsInstance if isInstance <> memFlags.IsInstance then if isInstance then - ErrorD(ConstraintSolverError(FSComp.SR.csMethodFoundButIsNotStatic((NicePrint.minimalStringOfType denv minfo.EnclosingType), (DecompileOpName nm), nm), m, m2 )) + ErrorD(ConstraintSolverError(FSComp.SR.csMethodFoundButIsNotStatic((NicePrint.minimalStringOfType denv minfo.ApparentEnclosingType), (DecompileOpName nm), nm), m, m2 )) else - ErrorD(ConstraintSolverError(FSComp.SR.csMethodFoundButIsStatic((NicePrint.minimalStringOfType denv minfo.EnclosingType), (DecompileOpName nm), nm), m, m2 )) + ErrorD(ConstraintSolverError(FSComp.SR.csMethodFoundButIsStatic((NicePrint.minimalStringOfType denv minfo.ApparentEnclosingType), (DecompileOpName nm), nm), m, m2 )) else CheckMethInfoAttributes g m None minfo ++ (fun () -> ResultD (TTraitSolved (minfo, calledMeth.CalledTyArgs)))) @@ -1341,10 +1387,10 @@ and MemberConstraintSolutionOfMethInfo css m minfo minst = match minfo with | ILMeth(_, ilMeth, _) -> let mref = IL.mkRefToILMethod (ilMeth.DeclaringTyconRef.CompiledRepresentationForNamedType, ilMeth.RawMetadata) - let iltref = ilMeth.DeclaringTyconRefOption |> Option.map (fun tcref -> tcref.CompiledRepresentationForNamedType) + let iltref = ilMeth.ILExtensionMethodDeclaringTyconRef |> Option.map (fun tcref -> tcref.CompiledRepresentationForNamedType) ILMethSln(ilMeth.ApparentEnclosingType, iltref, mref, minst) - | FSMeth(_, typ, vref, _) -> - FSMethSln(typ, vref, minst) + | FSMeth(_, ty, vref, _) -> + FSMethSln(ty, vref, minst) | MethInfo.DefaultStructCtor _ -> error(InternalError("the default struct constructor was the unexpected solution to a trait constraint", m)) #if !NO_EXTENSIONTYPING @@ -1352,7 +1398,7 @@ and MemberConstraintSolutionOfMethInfo css m minfo minst = let g = amap.g let minst = [] // GENERIC TYPE PROVIDERS: for generics, we would have an minst here let allArgVars, allArgs = minfo.GetParamTypes(amap, m, minst) |> List.concat |> List.mapi (fun i ty -> mkLocal m ("arg"+string i) ty) |> List.unzip - let objArgVars, objArgs = (if minfo.IsInstance then [mkLocal m "this" minfo.EnclosingType] else []) |> List.unzip + let objArgVars, objArgs = (if minfo.IsInstance then [mkLocal m "this" minfo.ApparentEnclosingType] else []) |> List.unzip let callMethInfoOpt, callExpr, callExprTy = ProvidedMethodCalls.BuildInvokerExpressionForProvidedMethodCall css.TcVal (g, amap, mi, objArgs, NeverMutates, false, ValUseFlag.NormalValUse, allArgs, m) let closedExprSln = ClosedExprSln (mkLambdas m [] (objArgVars@allArgVars) (callExpr, callExprTy) ) // If the call is a simple call to an IL method with all the arguments in the natural order, then revert to use ILMethSln. @@ -1412,7 +1458,7 @@ and GetRelevantMethodsForTrait (csenv:ConstraintSolverEnv) permitWeakResolution /// The nominal support of the member constraint and GetSupportOfMemberConstraint (csenv:ConstraintSolverEnv) (TTrait(tys, _, _, _, _, _)) = - tys |> List.choose (tryAnyParTy csenv.g) + tys |> List.choose (tryAnyParTyOption csenv.g) /// All the typars relevant to the member constraint *) and GetFreeTyparsOfMemberConstraint (csenv:ConstraintSolverEnv) (TTrait(tys, _, _, argtys, rty, _)) = @@ -1429,9 +1475,9 @@ and SolveRelevantMemberConstraints (csenv:ConstraintSolverEnv) ndeep permitWeakR /// Normalize the typar let ty = mkTyparTy tp match tryAnyParTy csenv.g ty with - | Some tp -> + | ValueSome tp -> SolveRelevantMemberConstraintsForTypar csenv ndeep permitWeakResolution trace tp - | None -> + | ValueNone -> ResultD false)) and SolveRelevantMemberConstraintsForTypar (csenv:ConstraintSolverEnv) ndeep permitWeakResolution (trace:OptionalTrace) tp = @@ -1502,8 +1548,8 @@ and AddConstraint (csenv:ConstraintSolverEnv) ndeep m2 trace tp newConstraint = let rty1 = GetFSharpViewOfReturnType g rty1 let rty2 = GetFSharpViewOfReturnType g rty2 - Iterate2D (SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace) argtys1 argtys2 ++ (fun () -> - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace rty1 rty2 ++ (fun () -> + Iterate2D (SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace) argtys1 argtys2 ++ (fun () -> + SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace rty1 rty2 ++ (fun () -> CompleteD)) | (TyparConstraint.CoercesTo(ty1, _), @@ -1521,16 +1567,16 @@ and AddConstraint (csenv:ConstraintSolverEnv) ndeep m2 trace tp newConstraint = parents1 |> IterateD (fun ty1Parent -> parents2 |> IterateD (fun ty2Parent -> if not (HaveSameHeadType g ty1Parent ty2Parent) then CompleteD else - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace ty1Parent ty2Parent)) + SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace ty1Parent ty2Parent)) | (TyparConstraint.IsEnum (u1, _), TyparConstraint.IsEnum (u2, m2)) -> - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace u1 u2 + SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace u1 u2 | (TyparConstraint.IsDelegate (aty1, bty1, _), TyparConstraint.IsDelegate (aty2, bty2, m2)) -> - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace aty1 aty2 ++ (fun () -> - SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace bty1 bty2) + SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace aty1 aty2 ++ (fun () -> + SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace bty1 bty2) | TyparConstraint.SupportsComparison _, TyparConstraint.IsDelegate _ | TyparConstraint.IsDelegate _ , TyparConstraint.SupportsComparison _ @@ -1634,19 +1680,19 @@ and AddConstraint (csenv:ConstraintSolverEnv) ndeep m2 trace tp newConstraint = // Write the constraint into the type variable // Record a entry in the undo trace if one is provided - let orig = tp.typar_constraints - trace.Exec (fun () -> tp.typar_constraints <- newConstraints) (fun () -> tp.typar_constraints <- orig) + let orig = tp.Constraints + trace.Exec (fun () -> tp.SetConstraints newConstraints) (fun () -> tp.SetConstraints orig) CompleteD))) -and SolveTypSupportsNull (csenv:ConstraintSolverEnv) ndeep m2 trace ty = +and SolveTypeSupportsNull (csenv:ConstraintSolverEnv) ndeep m2 trace ty = let g = csenv.g let m = csenv.m let denv = csenv.DisplayEnv match tryDestTyparTy g ty with - | Some destTypar -> + | ValueSome destTypar -> AddConstraint csenv ndeep m2 trace destTypar (TyparConstraint.SupportsNull m) - | None -> + | ValueNone -> if TypeSatisfiesNullConstraint g m ty then CompleteD else match ty with | NullableTy g _ -> @@ -1660,12 +1706,12 @@ and SolveTypeSupportsComparison (csenv:ConstraintSolverEnv) ndeep m2 trace ty = let amap = csenv.amap let denv = csenv.DisplayEnv match tryDestTyparTy g ty with - | Some destTypar -> + | ValueSome destTypar -> AddConstraint csenv ndeep m2 trace destTypar (TyparConstraint.SupportsComparison m) - | None -> + | ValueNone -> // Check it isn't ruled out by the user match tryDestAppTy g ty with - | Some tcref when HasFSharpAttribute g g.attrib_NoComparisonAttribute tcref.Attribs -> + | ValueSome tcref when HasFSharpAttribute g g.attrib_NoComparisonAttribute tcref.Attribs -> ErrorD (ConstraintSolverError(FSComp.SR.csTypeDoesNotSupportComparison1(NicePrint.minimalStringOfType denv ty), m, m2)) | _ -> match ty with @@ -1699,21 +1745,21 @@ and SolveTypeSupportsComparison (csenv:ConstraintSolverEnv) ndeep m2 trace ty = else ErrorD (ConstraintSolverError(FSComp.SR.csTypeDoesNotSupportComparison2(NicePrint.minimalStringOfType denv ty), m, m2)) -and SolveTypSupportsEquality (csenv:ConstraintSolverEnv) ndeep m2 trace ty = +and SolveTypeSupportsEquality (csenv:ConstraintSolverEnv) ndeep m2 trace ty = let g = csenv.g let m = csenv.m let denv = csenv.DisplayEnv match tryDestTyparTy g ty with - | Some destTypar -> + | ValueSome destTypar -> AddConstraint csenv ndeep m2 trace destTypar (TyparConstraint.SupportsEquality m) - | None -> + | _ -> match tryDestAppTy g ty with - | Some tcref when HasFSharpAttribute g g.attrib_NoEqualityAttribute tcref.Attribs -> + | ValueSome tcref when HasFSharpAttribute g g.attrib_NoEqualityAttribute tcref.Attribs -> ErrorD (ConstraintSolverError(FSComp.SR.csTypeDoesNotSupportEquality1(NicePrint.minimalStringOfType denv ty), m, m2)) | _ -> match ty with | SpecialEquatableHeadType g tinst -> - tinst |> IterateD (SolveTypSupportsEquality (csenv:ConstraintSolverEnv) ndeep m2 trace) + tinst |> IterateD (SolveTypeSupportsEquality (csenv:ConstraintSolverEnv) ndeep m2 trace) | SpecialNotEquatableHeadType g _ -> ErrorD (ConstraintSolverError(FSComp.SR.csTypeDoesNotSupportEquality2(NicePrint.minimalStringOfType denv ty), m, m2)) | _ -> @@ -1729,57 +1775,57 @@ and SolveTypSupportsEquality (csenv:ConstraintSolverEnv) ndeep m2 trace ty = // Check the (possibly inferred) structural dependencies (tinst, tcref.TyparsNoRange) ||> Iterate2D (fun ty tp -> if tp.EqualityConditionalOn then - SolveTypSupportsEquality (csenv:ConstraintSolverEnv) ndeep m2 trace ty + SolveTypeSupportsEquality (csenv:ConstraintSolverEnv) ndeep m2 trace ty else CompleteD) | _ -> CompleteD -and SolveTypIsEnum (csenv:ConstraintSolverEnv) ndeep m2 trace ty underlying = +and SolveTypeIsEnum (csenv:ConstraintSolverEnv) ndeep m2 trace ty underlying = trackErrors { let g = csenv.g let m = csenv.m let denv = csenv.DisplayEnv match tryDestTyparTy g ty with - | Some destTypar -> + | ValueSome destTypar -> return! AddConstraint csenv ndeep m2 trace destTypar (TyparConstraint.IsEnum(underlying, m)) - | None -> + | _ -> if isEnumTy g ty then - do! SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace underlying (underlyingTypeOfEnumTy g ty) + do! SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace underlying (underlyingTypeOfEnumTy g ty) return! CompleteD else return! ErrorD (ConstraintSolverError(FSComp.SR.csTypeIsNotEnumType(NicePrint.minimalStringOfType denv ty), m, m2)) } -and SolveTypIsDelegate (csenv:ConstraintSolverEnv) ndeep m2 trace ty aty bty = +and SolveTypeIsDelegate (csenv:ConstraintSolverEnv) ndeep m2 trace ty aty bty = trackErrors { let g = csenv.g let m = csenv.m let denv = csenv.DisplayEnv match tryDestTyparTy g ty with - | Some destTypar -> + | ValueSome destTypar -> return! AddConstraint csenv ndeep m2 trace destTypar (TyparConstraint.IsDelegate(aty, bty, m)) - | None -> + | _ -> if isDelegateTy g ty then - match TryDestStandardDelegateTyp csenv.InfoReader m AccessibleFromSomewhere ty with + match TryDestStandardDelegateType csenv.InfoReader m AccessibleFromSomewhere ty with | Some (tupledArgTy, rty) -> - do! SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace aty tupledArgTy - do! SolveTypEqualsTypKeepAbbrevs csenv ndeep m2 trace bty rty + do! SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace aty tupledArgTy + do! SolveTypeEqualsTypeKeepAbbrevs csenv ndeep m2 trace bty rty | None -> return! ErrorD (ConstraintSolverError(FSComp.SR.csTypeHasNonStandardDelegateType(NicePrint.minimalStringOfType denv ty), m, m2)) else return! ErrorD (ConstraintSolverError(FSComp.SR.csTypeIsNotDelegateType(NicePrint.minimalStringOfType denv ty), m, m2)) } -and SolveTypIsNonNullableValueType (csenv:ConstraintSolverEnv) ndeep m2 trace ty = +and SolveTypeIsNonNullableValueType (csenv:ConstraintSolverEnv) ndeep m2 trace ty = trackErrors { let g = csenv.g let m = csenv.m let denv = csenv.DisplayEnv match tryDestTyparTy g ty with - | Some destTypar -> + | ValueSome destTypar -> return! AddConstraint csenv ndeep m2 trace destTypar (TyparConstraint.IsNonNullableStruct m) - | None -> + | _ -> let underlyingTy = stripTyEqnsAndMeasureEqns g ty if isStructTy g underlyingTy then if tyconRefEq g g.system_Nullable_tcref (tcrefOfAppTy g underlyingTy) then @@ -1788,53 +1834,53 @@ and SolveTypIsNonNullableValueType (csenv:ConstraintSolverEnv) ndeep m2 trace ty return! ErrorD (ConstraintSolverError(FSComp.SR.csGenericConstructRequiresStructType(NicePrint.minimalStringOfType denv ty), m, m2)) } -and SolveTypIsUnmanaged (csenv:ConstraintSolverEnv) ndeep m2 trace ty = +and SolveTypeIsUnmanaged (csenv:ConstraintSolverEnv) ndeep m2 trace ty = let g = csenv.g let m = csenv.m let denv = csenv.DisplayEnv match tryDestTyparTy g ty with - | Some destTypar -> + | ValueSome destTypar -> AddConstraint csenv ndeep m2 trace destTypar (TyparConstraint.IsUnmanaged m) - | None -> + | _ -> if isUnmanagedTy g ty then CompleteD else ErrorD (ConstraintSolverError(FSComp.SR.csGenericConstructRequiresUnmanagedType(NicePrint.minimalStringOfType denv ty), m, m2)) -and SolveTypChoice (csenv:ConstraintSolverEnv) ndeep m2 trace ty tys = +and SolveTypeChoice (csenv:ConstraintSolverEnv) ndeep m2 trace ty tys = let g = csenv.g let m = csenv.m let denv = csenv.DisplayEnv match tryDestTyparTy g ty with - | Some destTypar -> + | ValueSome destTypar -> AddConstraint csenv ndeep m2 trace destTypar (TyparConstraint.SimpleChoice(tys, m)) - | None -> + | _ -> if List.exists (typeEquivAux Erasure.EraseMeasures g ty) tys then CompleteD else ErrorD (ConstraintSolverError(FSComp.SR.csTypeNotCompatibleBecauseOfPrintf((NicePrint.minimalStringOfType denv ty), (String.concat "," (List.map (NicePrint.prettyStringOfTy denv) tys))), m, m2)) -and SolveTypIsReferenceType (csenv:ConstraintSolverEnv) ndeep m2 trace ty = +and SolveTypeIsReferenceType (csenv:ConstraintSolverEnv) ndeep m2 trace ty = let g = csenv.g let m = csenv.m let denv = csenv.DisplayEnv match tryDestTyparTy g ty with - | Some destTypar -> + | ValueSome destTypar -> AddConstraint csenv ndeep m2 trace destTypar (TyparConstraint.IsReferenceType m) - | None -> + | _ -> if isRefTy g ty then CompleteD else ErrorD (ConstraintSolverError(FSComp.SR.csGenericConstructRequiresReferenceSemantics(NicePrint.minimalStringOfType denv ty), m, m)) -and SolveTypRequiresDefaultConstructor (csenv:ConstraintSolverEnv) ndeep m2 trace typ = +and SolveTypeRequiresDefaultConstructor (csenv:ConstraintSolverEnv) ndeep m2 trace origTy = let g = csenv.g let amap = csenv.amap let m = csenv.m let denv = csenv.DisplayEnv - let ty = stripTyEqnsAndMeasureEqns g typ + let ty = stripTyEqnsAndMeasureEqns g origTy match tryDestTyparTy g ty with - | Some destTypar -> + | ValueSome destTypar -> AddConstraint csenv ndeep m2 trace destTypar (TyparConstraint.RequiresDefaultConstructor m) - | None -> + | _ -> if isStructTy g ty && TypeHasDefaultValue g m ty then CompleteD else @@ -1842,19 +1888,19 @@ and SolveTypRequiresDefaultConstructor (csenv:ConstraintSolverEnv) ndeep m2 trac |> List.exists (fun x -> x.IsNullary && IsMethInfoAccessible amap m AccessibleFromEverywhere x) then match tryDestAppTy g ty with - | Some tcref when HasFSharpAttribute g g.attrib_AbstractClassAttribute tcref.Attribs -> - ErrorD (ConstraintSolverError(FSComp.SR.csGenericConstructRequiresNonAbstract(NicePrint.minimalStringOfType denv typ), m, m2)) + | ValueSome tcref when HasFSharpAttribute g g.attrib_AbstractClassAttribute tcref.Attribs -> + ErrorD (ConstraintSolverError(FSComp.SR.csGenericConstructRequiresNonAbstract(NicePrint.minimalStringOfType denv origTy), m, m2)) | _ -> CompleteD else match tryDestAppTy g ty with - | Some tcref when + | ValueSome tcref when tcref.PreEstablishedHasDefaultConstructor || // F# 3.1 feature: records with CLIMutable attribute should satisfy 'default constructor' constraint (tcref.IsRecordTycon && HasFSharpAttribute g g.attrib_CLIMutableAttribute tcref.Attribs) -> CompleteD | _ -> - ErrorD (ConstraintSolverError(FSComp.SR.csGenericConstructRequiresPublicDefaultConstructor(NicePrint.minimalStringOfType denv typ), m, m2)) + ErrorD (ConstraintSolverError(FSComp.SR.csGenericConstructRequiresPublicDefaultConstructor(NicePrint.minimalStringOfType denv origTy), m, m2)) // Parameterized compatibility relation between member signatures. The real work // is done by "equateTypes" and "subsumeTypes" and "subsumeArg" @@ -1867,116 +1913,114 @@ and CanMemberSigsMatchUpToCheck (subsumeArg: CalledArg -> CallerArg<_> -> OperationResult) // used to compare the arguments for compatibility reqdRetTyOpt (calledMeth:CalledMeth<_>): ImperativeOperationResult = - - let g = csenv.g - let amap = csenv.amap - let m = csenv.m - - let minfo = calledMeth.Method - let minst = calledMeth.CalledTyArgs - let uminst = calledMeth.CallerTyArgs - let callerObjArgTys = calledMeth.CallerObjArgTys - let methodRetTy = calledMeth.ReturnType - let assignedItemSetters = calledMeth.AssignedItemSetters - let unnamedCalledOptArgs = calledMeth.UnnamedCalledOptArgs - let unnamedCalledOutArgs = calledMeth.UnnamedCalledOutArgs - - // First equate the method instantiation (if any) with the method type parameters - if minst.Length <> uminst.Length then ErrorD(Error(FSComp.SR.csTypeInstantiationLengthMismatch(), m)) else - - Iterate2D unifyTypes minst uminst ++ (fun () -> - - if not (permitOptArgs || isNil unnamedCalledOptArgs) then ErrorD(Error(FSComp.SR.csOptionalArgumentNotPermittedHere(), m)) else + trackErrors { + let g = csenv.g + let amap = csenv.amap + let m = csenv.m - - let calledObjArgTys = minfo.GetObjArgTypes(amap, m, minst) + let minfo = calledMeth.Method + let minst = calledMeth.CalledTyArgs + let uminst = calledMeth.CallerTyArgs + let callerObjArgTys = calledMeth.CallerObjArgTys + let assignedItemSetters = calledMeth.AssignedItemSetters + let unnamedCalledOptArgs = calledMeth.UnnamedCalledOptArgs + let unnamedCalledOutArgs = calledMeth.UnnamedCalledOutArgs + + // First equate the method instantiation (if any) with the method type parameters + if minst.Length <> uminst.Length then + return! ErrorD(Error(FSComp.SR.csTypeInstantiationLengthMismatch(), m)) + else + do! Iterate2D unifyTypes minst uminst + if not (permitOptArgs || isNil unnamedCalledOptArgs) then + return! ErrorD(Error(FSComp.SR.csOptionalArgumentNotPermittedHere(), m)) + else + let calledObjArgTys = calledMeth.CalledObjArgTys(m) - // Check all the argument types. + // Check all the argument types. - if calledObjArgTys.Length <> callerObjArgTys.Length then - if (calledObjArgTys.Length <> 0) then - ErrorD(Error (FSComp.SR.csMemberIsNotStatic(minfo.LogicalName), m)) - else - ErrorD(Error (FSComp.SR.csMemberIsNotInstance(minfo.LogicalName), m)) - else - Iterate2D subsumeTypes calledObjArgTys callerObjArgTys ++ (fun () -> - (calledMeth.ArgSets |> IterateD (fun argSet -> - if argSet.UnnamedCalledArgs.Length <> argSet.UnnamedCallerArgs.Length then ErrorD(Error(FSComp.SR.csArgumentLengthMismatch(), m)) else - Iterate2D subsumeArg argSet.UnnamedCalledArgs argSet.UnnamedCallerArgs)) ++ (fun () -> - (calledMeth.ParamArrayCalledArgOpt |> OptionD (fun calledArg -> - if isArray1DTy g calledArg.CalledArgumentType then - let paramArrayElemTy = destArrayTy g calledArg.CalledArgumentType - let reflArgInfo = calledArg.ReflArgInfo // propgate the reflected-arg info to each param array argument - calledMeth.ParamArrayCallerArgs |> OptionD (IterateD (fun callerArg -> subsumeArg (CalledArg((0, 0), false, NotOptional, NoCallerInfo, false, None, reflArgInfo, paramArrayElemTy)) callerArg)) - else - CompleteD) - - ) ++ (fun () -> - (calledMeth.ArgSets |> IterateD (fun argSet -> - argSet.AssignedNamedArgs |> IterateD (fun arg -> subsumeArg arg.CalledArg arg.CallerArg))) ++ (fun () -> - (assignedItemSetters |> IterateD (fun (AssignedItemSetter(_, item, caller)) -> - let name, calledArgTy = - match item with - | AssignedPropSetter(_, pminfo, pminst) -> - let calledArgTy = List.head (List.head (pminfo.GetParamTypes(amap, m, pminst))) - pminfo.LogicalName, calledArgTy - - | AssignedILFieldSetter(finfo) -> - (* Get or set instance IL field *) - let calledArgTy = finfo.FieldType(amap, m) - finfo.FieldName, calledArgTy + if calledObjArgTys.Length <> callerObjArgTys.Length then + if (calledObjArgTys.Length <> 0) then + return! ErrorD(Error (FSComp.SR.csMemberIsNotStatic(minfo.LogicalName), m)) + else + return! ErrorD(Error (FSComp.SR.csMemberIsNotInstance(minfo.LogicalName), m)) + else + do! Iterate2D subsumeTypes calledObjArgTys callerObjArgTys + for argSet in calledMeth.ArgSets do + if argSet.UnnamedCalledArgs.Length <> argSet.UnnamedCallerArgs.Length then + return! ErrorD(Error(FSComp.SR.csArgumentLengthMismatch(), m)) + else + do! Iterate2D subsumeArg argSet.UnnamedCalledArgs argSet.UnnamedCallerArgs + match calledMeth.ParamArrayCalledArgOpt with + | Some calledArg -> + if isArray1DTy g calledArg.CalledArgumentType then + let paramArrayElemTy = destArrayTy g calledArg.CalledArgumentType + let reflArgInfo = calledArg.ReflArgInfo // propgate the reflected-arg info to each param array argument + match calledMeth.ParamArrayCallerArgs with + | Some args -> + for callerArg in args do + do! subsumeArg (CalledArg((0, 0), false, NotOptional, NoCallerInfo, false, false, None, reflArgInfo, paramArrayElemTy)) callerArg + | _ -> () + | _ -> () + for argSet in calledMeth.ArgSets do + for arg in argSet.AssignedNamedArgs do + do! subsumeArg arg.CalledArg arg.CallerArg + for (AssignedItemSetter(_, item, caller)) in assignedItemSetters do + let name, calledArgTy = + match item with + | AssignedPropSetter(_, pminfo, pminst) -> + let calledArgTy = List.head (List.head (pminfo.GetParamTypes(amap, m, pminst))) + pminfo.LogicalName, calledArgTy + + | AssignedILFieldSetter(finfo) -> + (* Get or set instance IL field *) + let calledArgTy = finfo.FieldType(amap, m) + finfo.FieldName, calledArgTy - | AssignedRecdFieldSetter(rfinfo) -> - let calledArgTy = rfinfo.FieldType - rfinfo.Name, calledArgTy + | AssignedRecdFieldSetter(rfinfo) -> + let calledArgTy = rfinfo.FieldType + rfinfo.Name, calledArgTy - subsumeArg (CalledArg((-1, 0), false, NotOptional, NoCallerInfo, false, Some (mkSynId m name), ReflectedArgInfo.None, calledArgTy)) caller) )) ++ (fun () -> - - // - Always take the return type into account for - // -- op_Explicit, op_Implicit - // -- methods using tupling of unfilled out args - // - Never take into account return type information for constructors - match reqdRetTyOpt with - | None -> CompleteD - | Some _ when minfo.IsConstructor -> CompleteD - | Some _ when not alwaysCheckReturn && isNil unnamedCalledOutArgs -> CompleteD - | Some reqdRetTy -> - let methodRetTy = - if isNil unnamedCalledOutArgs then - methodRetTy - else - let outArgTys = unnamedCalledOutArgs |> List.map (fun calledArg -> destByrefTy g calledArg.CalledArgumentType) - if isUnitTy g methodRetTy then mkRefTupledTy g outArgTys - else mkRefTupledTy g (methodRetTy :: outArgTys) - unifyTypes reqdRetTy methodRetTy ))))) - -//------------------------------------------------------------------------- -// Resolve IL overloading. -// -// This utilizes the type inference constraint solving engine in undo mode. -//------------------------------------------------------------------------- - + do! subsumeArg (CalledArg((-1, 0), false, NotOptional, NoCallerInfo, false, false, Some (mkSynId m name), ReflectedArgInfo.None, calledArgTy)) caller + // - Always take the return type into account for + // -- op_Explicit, op_Implicit + // -- methods using tupling of unfilled out args + // - Never take into account return type information for constructors + match reqdRetTyOpt with + | Some _ when (minfo.IsConstructor || not alwaysCheckReturn && isNil unnamedCalledOutArgs) -> () + | Some reqdRetTy -> + let methodRetTy = calledMeth.CalledReturnTypeAfterOutArgTupling + return! unifyTypes reqdRetTy methodRetTy + | _ -> () + } // Assert a subtype constraint, and wrap an ErrorsFromAddingSubsumptionConstraint error around any failure // to allow us to report the outer types involved in the constraint -and private SolveTypSubsumesTypWithReport (csenv:ConstraintSolverEnv) ndeep m trace cxsln ty1 ty2 = - TryD (fun () -> SolveTypSubsumesTypKeepAbbrevs csenv ndeep m trace cxsln ty1 ty2) +// +// ty1: expected +// ty2: actual +// +// "ty2 casts to ty1" +// "a value of type ty2 can be used where a value of type ty1 is expected" +and private SolveTypeSubsumesTypeWithReport (csenv:ConstraintSolverEnv) ndeep m trace cxsln ty1 ty2 = + TryD (fun () -> SolveTypeSubsumesTypeKeepAbbrevs csenv ndeep m trace cxsln ty1 ty2) (function | LocallyAbortOperationThatFailsToResolveOverload -> CompleteD | res -> match csenv.eContextInfo with | ContextInfo.RuntimeTypeTest isOperator -> // test if we can cast other way around - match CollectThenUndo (fun newTrace -> SolveTypSubsumesTypKeepAbbrevs csenv ndeep m (OptionalTrace.WithTrace newTrace) cxsln ty2 ty1) with + match CollectThenUndo (fun newTrace -> SolveTypeSubsumesTypeKeepAbbrevs csenv ndeep m (OptionalTrace.WithTrace newTrace) cxsln ty2 ty1) with | OkResult _ -> ErrorD (ErrorsFromAddingSubsumptionConstraint(csenv.g, csenv.DisplayEnv, ty1, ty2, res, ContextInfo.DowncastUsedInsteadOfUpcast isOperator, m)) | _ -> ErrorD (ErrorsFromAddingSubsumptionConstraint(csenv.g, csenv.DisplayEnv, ty1, ty2, res, ContextInfo.NoContext, m)) | _ -> ErrorD (ErrorsFromAddingSubsumptionConstraint(csenv.g, csenv.DisplayEnv, ty1, ty2, res, csenv.eContextInfo, m))) -and private SolveTypEqualsTypWithReport (csenv:ConstraintSolverEnv) ndeep m trace cxsln ty1 ty2 = - TryD (fun () -> SolveTypEqualsTypKeepAbbrevsWithCxsln csenv ndeep m trace cxsln ty1 ty2) +// ty1: actual +// ty2: expected +and private SolveTypeEqualsTypeWithReport (csenv:ConstraintSolverEnv) ndeep m trace cxsln actual expected = + TryD (fun () -> SolveTypeEqualsTypeKeepAbbrevsWithCxsln csenv ndeep m trace cxsln actual expected) (function | LocallyAbortOperationThatFailsToResolveOverload -> CompleteD - | res -> ErrorD (ErrorFromAddingTypeEquation(csenv.g, csenv.DisplayEnv, ty1, ty2, res, m))) + | res -> ErrorD (ErrorFromAddingTypeEquation(csenv.g, csenv.DisplayEnv, actual, expected, res, m))) and ArgsMustSubsumeOrConvert (csenv:ConstraintSolverEnv) @@ -1990,7 +2034,7 @@ and ArgsMustSubsumeOrConvert let g = csenv.g let m = callerArg.Range let calledArgTy = AdjustCalledArgType csenv.InfoReader isConstraint calledArg callerArg - SolveTypSubsumesTypWithReport csenv ndeep m trace cxsln calledArgTy callerArg.Type ++ (fun () -> + SolveTypeSubsumesTypeWithReport csenv ndeep m trace cxsln calledArgTy callerArg.Type ++ (fun () -> if calledArg.IsParamArray && isArray1DTy g calledArgTy && not (isArray1DTy g callerArg.Type) then ErrorD(Error(FSComp.SR.csMethodExpectsParams(), m)) @@ -1998,17 +2042,17 @@ and ArgsMustSubsumeOrConvert CompleteD) and MustUnify csenv ndeep trace cxsln ty1 ty2 = - SolveTypEqualsTypWithReport csenv ndeep csenv.m trace cxsln ty1 ty2 + SolveTypeEqualsTypeWithReport csenv ndeep csenv.m trace cxsln ty1 ty2 and MustUnifyInsideUndo csenv ndeep trace cxsln ty1 ty2 = - SolveTypEqualsTypWithReport csenv ndeep csenv.m (WithTrace trace) cxsln ty1 ty2 + SolveTypeEqualsTypeWithReport csenv ndeep csenv.m (WithTrace trace) cxsln ty1 ty2 and ArgsMustSubsumeOrConvertInsideUndo (csenv:ConstraintSolverEnv) ndeep trace cxsln isConstraint calledArg (CallerArg(callerArgTy, m, _, _) as callerArg) = let calledArgTy = AdjustCalledArgType csenv.InfoReader isConstraint calledArg callerArg - SolveTypSubsumesTypWithReport csenv ndeep m (WithTrace trace) cxsln calledArgTy callerArgTy + SolveTypeSubsumesTypeWithReport csenv ndeep m (WithTrace trace) cxsln calledArgTy callerArgTy and TypesMustSubsumeOrConvertInsideUndo (csenv:ConstraintSolverEnv) ndeep trace cxsln m calledArgTy callerArgTy = - SolveTypSubsumesTypWithReport csenv ndeep m trace cxsln calledArgTy callerArgTy + SolveTypeSubsumesTypeWithReport csenv ndeep m trace cxsln calledArgTy callerArgTy and ArgsEquivInsideUndo (csenv:ConstraintSolverEnv) isConstraint calledArg (CallerArg(callerArgTy, m, _, _) as callerArg) = let calledArgTy = AdjustCalledArgType csenv.InfoReader isConstraint calledArg callerArg @@ -2048,7 +2092,7 @@ and ReportNoCandidatesError (csenv:ConstraintSolverEnv) (nUnnamedCallerArgs, nNa | CallerNamedArg(id, _) :: _ -> if minfo.IsConstructor then let predictFields() = - minfo.DeclaringEntityRef.AllInstanceFieldsAsList + minfo.DeclaringTyconRef.AllInstanceFieldsAsList |> List.map (fun p -> p.Name.Replace("@", "")) |> System.Collections.Generic.HashSet @@ -2191,8 +2235,8 @@ and ResolveOverloading (ArgsEquivInsideUndo csenv cx.IsSome) reqdRetTyOpt calledMeth) with - | [(calledMeth, _, _)] -> - Some calledMeth, CompleteD, NoTrace // Can't re-play the trace since ArgsEquivInsideUndo was used + | [(calledMeth, warns, _)] -> + Some calledMeth, OkResult (warns, ()), NoTrace // Can't re-play the trace since ArgsEquivInsideUndo was used | _ -> // Now determine the applicable methods. @@ -2215,7 +2259,7 @@ and ResolveOverloading if isOpConversion then match calledMethGroup, reqdRetTyOpt with | h :: _, Some rty -> - Some (h.Method.EnclosingType, rty) + Some (h.Method.ApparentEnclosingType, rty) | _ -> None else None @@ -2252,8 +2296,8 @@ and ResolveOverloading None, ErrorD (failOverloading (FSComp.SR.csNoOverloadsFound methodName) errors), NoTrace - | [(calledMeth, _, t)] -> - Some calledMeth, CompleteD, WithTrace t + | [(calledMeth, warns, t)] -> + Some calledMeth, OkResult (warns, ()), WithTrace t | applicableMeths -> @@ -2275,21 +2319,29 @@ and ResolveOverloading let c = compareTypes calledArg1.CalledArgumentType calledArg2.CalledArgumentType if c <> 0 then c else - // Func<_> is always considered better than any other delegate type let c = (calledArg1.CalledArgumentType, calledArg2.CalledArgumentType) ||> compareCond (fun ty1 ty2 -> + + // Func<_> is always considered better than any other delegate type match tryDestAppTy csenv.g ty1 with - | Some tcref1 -> + | ValueSome tcref1 when tcref1.DisplayName = "Func" && (match tcref1.PublicPath with Some p -> p.EnclosingPath = [| "System" |] | _ -> false) && isDelegateTy g ty1 && - isDelegateTy g ty2 + isDelegateTy g ty2 -> true + + // T is always better than inref + | _ when isInByrefTy csenv.g ty2 && typeEquiv csenv.g ty1 (destByrefTy csenv.g ty2) -> + true + | _ -> false) if c <> 0 then c else 0 - let better (candidate:CalledMeth<_>, candidateWarnCount, _) (other:CalledMeth<_>, otherWarnCount, _) = + let better (candidate:CalledMeth<_>, candidateWarnings, _) (other:CalledMeth<_>, otherwarnings, _) = + let candidateWarnCount = List.length candidateWarnings + let otherWarnCount = List.length otherwarnings // Prefer methods that don't give "this code is less generic" warnings // Note: Relies on 'compare' respecting true > false let c = compare (candidateWarnCount = 0) (otherWarnCount = 0) @@ -2380,7 +2432,7 @@ and ResolveOverloading else None) match bestMethods with - | [(calledMeth, _, t)] -> Some calledMeth, CompleteD, WithTrace t + | [(calledMeth, warns, t)] -> Some calledMeth, OkResult (warns, ()), WithTrace t | bestMethods -> let methodNames = let methods = @@ -2435,14 +2487,11 @@ and ResolveOverloading | None -> CompleteD | Some _ when calledMeth.Method.IsConstructor -> CompleteD | Some reqdRetTy -> - let methodRetTy = - if isNil calledMeth.UnnamedCalledOutArgs then - calledMeth.ReturnType - else - let outArgTys = calledMeth.UnnamedCalledOutArgs |> List.map (fun calledArg -> destByrefTy g calledArg.CalledArgumentType) - if isUnitTy g calledMeth.ReturnType then mkRefTupledTy g outArgTys - else mkRefTupledTy g (calledMeth.ReturnType :: outArgTys) - MustUnify csenv ndeep trace cxsln reqdRetTy methodRetTy) + let actualRetTy = calledMeth.CalledReturnTypeAfterOutArgTupling + if isByrefTy g reqdRetTy then + ErrorD(Error(FSComp.SR.tcByrefReturnImplicitlyDereferenced(), m)) + else + MustUnify csenv ndeep trace cxsln reqdRetTy actualRetTy) | None -> None, errors @@ -2501,8 +2550,8 @@ let EliminateConstraintsForGeneralizedTypars csenv (trace:OptionalTrace) (genera // No error recovery here: we do that on a per-expression basis. //------------------------------------------------------------------------- -let AddCxTypeEqualsType contextInfo denv css m ty1 ty2 = - SolveTypEqualsTypWithReport (MakeConstraintSolverEnv contextInfo css m denv) 0 m NoTrace None ty1 ty2 +let AddCxTypeEqualsType contextInfo denv css m actual expected = + SolveTypeEqualsTypeWithReport (MakeConstraintSolverEnv contextInfo css m denv) 0 m NoTrace None actual expected |> RaiseOperationResult let UndoIfFailed f = @@ -2523,22 +2572,22 @@ let UndoIfFailed f = true let AddCxTypeEqualsTypeUndoIfFailed denv css m ty1 ty2 = - UndoIfFailed (fun trace -> SolveTypEqualsTypKeepAbbrevs (MakeConstraintSolverEnv ContextInfo.NoContext css m denv) 0 m (WithTrace trace) ty1 ty2) + UndoIfFailed (fun trace -> SolveTypeEqualsTypeKeepAbbrevs (MakeConstraintSolverEnv ContextInfo.NoContext css m denv) 0 m (WithTrace trace) ty1 ty2) let AddCxTypeEqualsTypeMatchingOnlyUndoIfFailed denv css m ty1 ty2 = let csenv = { MakeConstraintSolverEnv ContextInfo.NoContext css m denv with MatchingOnly = true } - UndoIfFailed (fun trace -> SolveTypEqualsTypKeepAbbrevs csenv 0 m (WithTrace trace) ty1 ty2) + UndoIfFailed (fun trace -> SolveTypeEqualsTypeKeepAbbrevs csenv 0 m (WithTrace trace) ty1 ty2) let AddCxTypeMustSubsumeTypeUndoIfFailed denv css m ty1 ty2 = - UndoIfFailed (fun trace -> SolveTypSubsumesTypKeepAbbrevs (MakeConstraintSolverEnv ContextInfo.NoContext css m denv) 0 m (WithTrace trace) None ty1 ty2) + UndoIfFailed (fun trace -> SolveTypeSubsumesTypeKeepAbbrevs (MakeConstraintSolverEnv ContextInfo.NoContext css m denv) 0 m (WithTrace trace) None ty1 ty2) let AddCxTypeMustSubsumeTypeMatchingOnlyUndoIfFailed denv css m ty1 ty2 = let csenv = MakeConstraintSolverEnv ContextInfo.NoContext css m denv let csenv = { csenv with MatchingOnly = true } - UndoIfFailed (fun trace -> SolveTypSubsumesTypKeepAbbrevs csenv 0 m (WithTrace trace) None ty1 ty2) + UndoIfFailed (fun trace -> SolveTypeSubsumesTypeKeepAbbrevs csenv 0 m (WithTrace trace) None ty1 ty2) let AddCxTypeMustSubsumeType contextInfo denv css m trace ty1 ty2 = - SolveTypSubsumesTypWithReport (MakeConstraintSolverEnv contextInfo css m denv) 0 m trace None ty1 ty2 + SolveTypeSubsumesTypeWithReport (MakeConstraintSolverEnv contextInfo css m denv) 0 m trace None ty1 ty2 |> RaiseOperationResult let AddCxMethodConstraint denv css m trace traitInfo = @@ -2547,7 +2596,7 @@ let AddCxMethodConstraint denv css m trace traitInfo = |> RaiseOperationResult let AddCxTypeMustSupportNull denv css m trace ty = - TryD (fun () -> SolveTypSupportsNull (MakeConstraintSolverEnv ContextInfo.NoContext css m denv) 0 m trace ty) + TryD (fun () -> SolveTypeSupportsNull (MakeConstraintSolverEnv ContextInfo.NoContext css m denv) 0 m trace ty) (fun res -> ErrorD (ErrorFromAddingConstraint(denv, res, m))) |> RaiseOperationResult @@ -2557,41 +2606,41 @@ let AddCxTypeMustSupportComparison denv css m trace ty = |> RaiseOperationResult let AddCxTypeMustSupportEquality denv css m trace ty = - TryD (fun () -> SolveTypSupportsEquality (MakeConstraintSolverEnv ContextInfo.NoContext css m denv) 0 m trace ty) + TryD (fun () -> SolveTypeSupportsEquality (MakeConstraintSolverEnv ContextInfo.NoContext css m denv) 0 m trace ty) (fun res -> ErrorD (ErrorFromAddingConstraint(denv, res, m))) |> RaiseOperationResult let AddCxTypeMustSupportDefaultCtor denv css m trace ty = - TryD (fun () -> SolveTypRequiresDefaultConstructor (MakeConstraintSolverEnv ContextInfo.NoContext css m denv) 0 m trace ty) + TryD (fun () -> SolveTypeRequiresDefaultConstructor (MakeConstraintSolverEnv ContextInfo.NoContext css m denv) 0 m trace ty) (fun res -> ErrorD (ErrorFromAddingConstraint(denv, res, m))) |> RaiseOperationResult let AddCxTypeIsReferenceType denv css m trace ty = - TryD (fun () -> SolveTypIsReferenceType (MakeConstraintSolverEnv ContextInfo.NoContext css m denv) 0 m trace ty) + TryD (fun () -> SolveTypeIsReferenceType (MakeConstraintSolverEnv ContextInfo.NoContext css m denv) 0 m trace ty) (fun res -> ErrorD (ErrorFromAddingConstraint(denv, res, m))) |> RaiseOperationResult let AddCxTypeIsValueType denv css m trace ty = - TryD (fun () -> SolveTypIsNonNullableValueType (MakeConstraintSolverEnv ContextInfo.NoContext css m denv) 0 m trace ty) + TryD (fun () -> SolveTypeIsNonNullableValueType (MakeConstraintSolverEnv ContextInfo.NoContext css m denv) 0 m trace ty) (fun res -> ErrorD (ErrorFromAddingConstraint(denv, res, m))) |> RaiseOperationResult let AddCxTypeIsUnmanaged denv css m trace ty = - TryD (fun () -> SolveTypIsUnmanaged (MakeConstraintSolverEnv ContextInfo.NoContext css m denv) 0 m trace ty) + TryD (fun () -> SolveTypeIsUnmanaged (MakeConstraintSolverEnv ContextInfo.NoContext css m denv) 0 m trace ty) (fun res -> ErrorD (ErrorFromAddingConstraint(denv, res, m))) |> RaiseOperationResult let AddCxTypeIsEnum denv css m trace ty underlying = - TryD (fun () -> SolveTypIsEnum (MakeConstraintSolverEnv ContextInfo.NoContext css m denv) 0 m trace ty underlying) + TryD (fun () -> SolveTypeIsEnum (MakeConstraintSolverEnv ContextInfo.NoContext css m denv) 0 m trace ty underlying) (fun res -> ErrorD (ErrorFromAddingConstraint(denv, res, m))) |> RaiseOperationResult let AddCxTypeIsDelegate denv css m trace ty aty bty = - TryD (fun () -> SolveTypIsDelegate (MakeConstraintSolverEnv ContextInfo.NoContext css m denv) 0 m trace ty aty bty) + TryD (fun () -> SolveTypeIsDelegate (MakeConstraintSolverEnv ContextInfo.NoContext css m denv) 0 m trace ty aty bty) (fun res -> ErrorD (ErrorFromAddingConstraint(denv, res, m))) |> RaiseOperationResult -let CodegenWitnessThatTypSupportsTraitConstraint tcVal g amap m (traitInfo:TraitConstraintInfo) argExprs = +let CodegenWitnessThatTypeSupportsTraitConstraint tcVal g amap m (traitInfo:TraitConstraintInfo) argExprs = let css = { g = g amap = amap @@ -2606,18 +2655,19 @@ let CodegenWitnessThatTypSupportsTraitConstraint tcVal g amap m (traitInfo:Trait | None -> Choice4Of4() | Some sln -> match sln with - | ILMethSln(typ, extOpt, mref, minst) -> - let tcref, _tinst = destAppTy g typ + | ILMethSln(origTy, extOpt, mref, minst) -> + let metadataTy = convertToTypeWithMetadataIfPossible g origTy + let tcref = tcrefOfAppTy g metadataTy let mdef = IL.resolveILMethodRef tcref.ILTyconRawMetadata mref let ilMethInfo = match extOpt with - | None -> MethInfo.CreateILMeth(amap, m, typ, mdef) + | None -> MethInfo.CreateILMeth(amap, m, origTy, mdef) | Some ilActualTypeRef -> let actualTyconRef = Import.ImportILTypeRef amap m ilActualTypeRef - MethInfo.CreateILExtensionMeth(amap, m, typ, actualTyconRef, None, mdef) + MethInfo.CreateILExtensionMeth(amap, m, origTy, actualTyconRef, None, mdef) Choice1Of4 (ilMethInfo, minst) - | FSMethSln(typ, vref, minst) -> - Choice1Of4 (FSMeth(g, typ, vref, None), minst) + | FSMethSln(ty, vref, minst) -> + Choice1Of4 (FSMeth(g, ty, vref, None), minst) | FSRecdFieldSln(tinst, rfref, isSetProp) -> Choice2Of4 (tinst, rfref, isSetProp) | BuiltInSln -> @@ -2651,7 +2701,7 @@ let CodegenWitnessThatTypSupportsTraitConstraint tcVal g amap m (traitInfo:Trait // the address of the object then go do that if minfo.IsStruct && minfo.IsInstance && (match argExprs with [] -> false | h :: _ -> not (isByrefTy g (tyOfExpr g h))) then let h, t = List.headAndTail argExprs - let wrap, h' = mkExprAddrOfExpr g true false PossiblyMutates h None m + let wrap, h', _readonly, _writeonly = mkExprAddrOfExpr g true false PossiblyMutates h None m ResultD (Some (wrap (Expr.Op(TOp.TraitCall(traitInfo), [], (h' :: t), m)))) else ResultD (Some (MakeMethInfoCall amap m minfo methArgTys argExprs )) @@ -2666,7 +2716,7 @@ let CodegenWitnessThatTypSupportsTraitConstraint tcVal g amap m (traitInfo:Trait // the address of the object then go do that if rfref.Tycon.IsStructOrEnumTycon && not (isByrefTy g (tyOfExpr g argExprs.[0])) then let h = List.head argExprs - let wrap, h' = mkExprAddrOfExpr g true false DefinitelyMutates h None m + let wrap, h', _readonly, _writeonly = mkExprAddrOfExpr g true false DefinitelyMutates h None m Some (wrap (mkRecdFieldSetViaExprAddr (h', rfref, tinst, argExprs.[1], m))) else Some (mkRecdFieldSetViaExprAddr (argExprs.[0], rfref, tinst, argExprs.[1], m)) @@ -2688,7 +2738,7 @@ let ChooseTyparSolutionAndSolve css denv tp = let amap = css.amap let max, m = ChooseTyparSolutionAndRange g amap tp let csenv = MakeConstraintSolverEnv ContextInfo.NoContext css m denv - TryD (fun () -> SolveTyparEqualsTyp csenv 0 m NoTrace (mkTyparTy tp) max) + TryD (fun () -> SolveTyparEqualsType csenv 0 m NoTrace (mkTyparTy tp) max) (fun err -> ErrorD(ErrorFromApplyingDefault(g, denv, tp, max, err, m))) |> RaiseOperationResult @@ -2696,7 +2746,7 @@ let ChooseTyparSolutionAndSolve css denv tp = let CheckDeclaredTypars denv css m typars1 typars2 = TryD (fun () -> CollectThenUndo (fun trace -> - SolveTypEqualsTypEqns (MakeConstraintSolverEnv ContextInfo.NoContext css m denv) 0 m (WithTrace trace) None + SolveTypeEqualsTypeEqns (MakeConstraintSolverEnv ContextInfo.NoContext css m denv) 0 m (WithTrace trace) None (List.map mkTyparTy typars1) (List.map mkTyparTy typars2))) (fun res -> ErrorD (ErrorFromAddingConstraint(denv, res, m))) @@ -2719,7 +2769,7 @@ let IsApplicableMethApprox g amap m (minfo:MethInfo) availObjTy = let minst = FreshenMethInfo m minfo match minfo.GetObjArgTypes(amap, m, minst) with | [reqdObjTy] -> - TryD (fun () -> SolveTypSubsumesTyp csenv 0 m NoTrace None reqdObjTy availObjTy ++ (fun () -> ResultD true)) + TryD (fun () -> SolveTypeSubsumesType csenv 0 m NoTrace None reqdObjTy availObjTy ++ (fun () -> ResultD true)) (fun _err -> ResultD false) |> CommitOperationResult | _ -> true diff --git a/src/fsharp/ConstraintSolver.fsi b/src/fsharp/ConstraintSolver.fsi index b2837078737..e943d7be69a 100644 --- a/src/fsharp/ConstraintSolver.fsi +++ b/src/fsharp/ConstraintSolver.fsi @@ -3,11 +3,6 @@ /// Solves constraints using a mutable constraint-solver state module internal Microsoft.FSharp.Compiler.ConstraintSolver -open Internal.Utilities -open Internal.Utilities.Collections -open Microsoft.FSharp.Compiler.AbstractIL -open Microsoft.FSharp.Compiler.AbstractIL.Internal -open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library open Microsoft.FSharp.Compiler open Microsoft.FSharp.Compiler.AccessibilityLogic open Microsoft.FSharp.Compiler.Ast @@ -16,7 +11,6 @@ open Microsoft.FSharp.Compiler.Tast open Microsoft.FSharp.Compiler.Range open Microsoft.FSharp.Compiler.Import open Microsoft.FSharp.Compiler.Tastops -open Microsoft.FSharp.Compiler.Tast open Microsoft.FSharp.Compiler.TcGlobals open Microsoft.FSharp.Compiler.Infos open Microsoft.FSharp.Compiler.MethodCalls @@ -28,6 +22,9 @@ val NewAnonTypar : TyparKind * range * TyparRigidity * TyparStaticReq * TyparDyn /// Create an inference type variable val NewInferenceType : unit -> TType +/// Create an inference type variable for the kind of a byref pointer +val NewByRefKindInferenceType : TcGlobals -> range -> TType + /// Create an inference type variable representing an error condition when checking an expression val NewErrorType : unit -> TType @@ -76,7 +73,8 @@ type ContextInfo = | FollowingPatternMatchClause of range /// The type equation comes from a pattern match guard. | PatternMatchGuard of range - +/// The type equation comes from a sequence expression. +| SequenceExpression of TType exception ConstraintSolverTupleDiffLengths of DisplayEnv * TType list * TType list * range * range exception ConstraintSolverInfiniteTypes of ContextInfo * DisplayEnv * TType * TType * range * range @@ -115,8 +113,8 @@ type OptionalTrace = | WithTrace of Trace val SimplifyMeasuresInTypeScheme : TcGlobals -> bool -> Typars -> TType -> TyparConstraint list -> Typars -val SolveTyparEqualsTyp : ConstraintSolverEnv -> int -> range -> OptionalTrace -> TType -> TType -> OperationResult -val SolveTypEqualsTypKeepAbbrevs : ConstraintSolverEnv -> int -> range -> OptionalTrace -> TType -> TType -> OperationResult +val SolveTyparEqualsType : ConstraintSolverEnv -> int -> range -> OptionalTrace -> TType -> TType -> OperationResult +val SolveTypeEqualsTypeKeepAbbrevs : ConstraintSolverEnv -> int -> range -> OptionalTrace -> TType -> TType -> OperationResult val CanonicalizeRelevantMemberConstraints : ConstraintSolverEnv -> int -> OptionalTrace -> Typars -> OperationResult val ResolveOverloading : ConstraintSolverEnv -> OptionalTrace -> string -> ndeep: int -> TraitConstraintInfo option -> int * int -> AccessorDomain -> CalledMeth list -> bool -> TType option -> CalledMeth option * OperationResult val UnifyUniqueOverloading : ConstraintSolverEnv -> int * int -> string -> AccessorDomain -> CalledMeth list -> TType -> OperationResult @@ -142,7 +140,7 @@ val AddCxTypeIsUnmanaged : DisplayEnv -> ConstraintSolverSt val AddCxTypeIsEnum : DisplayEnv -> ConstraintSolverState -> range -> OptionalTrace -> TType -> TType -> unit val AddCxTypeIsDelegate : DisplayEnv -> ConstraintSolverState -> range -> OptionalTrace -> TType -> TType -> TType -> unit -val CodegenWitnessThatTypSupportsTraitConstraint : TcValF -> TcGlobals -> ImportMap -> range -> TraitConstraintInfo -> Expr list -> OperationResult +val CodegenWitnessThatTypeSupportsTraitConstraint : TcValF -> TcGlobals -> ImportMap -> range -> TraitConstraintInfo -> Expr list -> OperationResult val ChooseTyparSolutionAndSolve : ConstraintSolverState -> DisplayEnv -> Typar -> unit diff --git a/src/fsharp/DetupleArgs.fs b/src/fsharp/DetupleArgs.fs index 9053b28ba1a..bf56deeeb7f 100644 --- a/src/fsharp/DetupleArgs.fs +++ b/src/fsharp/DetupleArgs.fs @@ -2,29 +2,20 @@ module internal Microsoft.FSharp.Compiler.Detuple -open Internal.Utilities open Microsoft.FSharp.Compiler -open Microsoft.FSharp.Compiler.AbstractIL open Microsoft.FSharp.Compiler.AbstractIL.Internal open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library -open Microsoft.FSharp.Compiler.AbstractIL.Diagnostics open Microsoft.FSharp.Compiler.Ast -open Microsoft.FSharp.Compiler.ErrorLogger open Microsoft.FSharp.Compiler.Tast open Microsoft.FSharp.Compiler.Tastops -open Microsoft.FSharp.Compiler.Tastops.DebugPrint open Microsoft.FSharp.Compiler.TcGlobals -open Microsoft.FSharp.Compiler.Layout -open Microsoft.FSharp.Compiler.PrettyNaming open Microsoft.FSharp.Compiler.Lib - - // // This pass has one aim. // - to eliminate tuples allocated at call sites (due to uncurried style) // -// After PASS, +// After PASS, // Private, non-top-level functions fOrig which had explicit tuples at all callsites, // have been replaced by transformedVal taking the individual tuple fields, // subject to the type of the fOrig formal permitting the split. @@ -51,10 +42,10 @@ open Microsoft.FSharp.Compiler.Lib // // The COLLAPSE transform is based on answer A2... // -// [[ let rec fOrig p = ... fOrig (a,b) ... -// fOrig (x,y) ]] +// [[ let rec fOrig p = ... fOrig (a, b) ... +// fOrig (x, y) ]] // -> -// let rec transformedVal p1 p2 = let p = p1,p2 +// let rec transformedVal p1 p2 = let p = p1, p2 // ... (transformedVal a b) ... // // transformedVal x y @@ -68,9 +59,9 @@ open Microsoft.FSharp.Compiler.Lib // // 1. Require call-pattern info about callsites of each function, e.g. // -// [ (_,_) ; (_,(_,_,_)) ; _ ] -// [ (_,_) ; (_,_) ] -// [ (_,_) ] +// [ (_, _) ; (_, (_, _, _)) ; _ ] +// [ (_, _) ; (_, _) ] +// [ (_, _) ] // // Detailing the number of arguments applied and their explicit tuple structure. // @@ -117,14 +108,14 @@ open Microsoft.FSharp.Compiler.Lib // // [[DEFN: fOrig = LAM tps. lam x1 ...xp xq...xN. body ]] // -> -// transformedVal = LAM tps. lam [[FORMALS: yb1...ybp]] xq...xN. [[REBINDS x1,yb1 ... xp,ybp]] [[FIX: body]] +// transformedVal = LAM tps. lam [[FORMALS: yb1...ybp]] xq...xN. [[REBINDS x1, yb1 ... xp, ybp]] [[FIX: body]] // // [[FORMAL: SameArg xi]] -> xi // [[FORMAL: NewArgs vs]] -> [ [v1] ... [vN] ] // list up individual args for Expr.Lambda // // [[REBIND: xi , SameArg xi]] -> // no binding needed -// [[REBIND: [u], NewArgs vs]] -> u = "rebuildTuple(cpi,vs)" -// [[REBIND: us , NewArgs vs]] -> "rebuildTuple(cpi,vs)" then bind us to buildProjections. // for Expr.Lambda +// [[REBIND: [u], NewArgs vs]] -> u = "rebuildTuple(cpi, vs)" +// [[REBIND: us , NewArgs vs]] -> "rebuildTuple(cpi, vs)" then bind us to buildProjections. // for Expr.Lambda // // rebuildTuple - create tuple based on vs fringe according to cpi tuple structure. // @@ -133,7 +124,7 @@ open Microsoft.FSharp.Compiler.Lib // 5. Fixup callsites. // // [[FIXCALL: APP fOrig tps args]] -> when fOrig is transformed, APP fOrig tps [[collapse args wrt cpf]] -// otherwise, unchanged, APP fOrig tps args. +// otherwise, unchanged, APP fOrig tps args. // // 6. Overview. // - pre-pass to find callPatterns. @@ -157,18 +148,18 @@ open Microsoft.FSharp.Compiler.Lib // Merge a tyapp node and and app node. let (|TyappAndApp|_|) e = match e with - | Expr.App (f,fty,tys,args,m) -> + | Expr.App (f, fty, tys, args, m) -> match stripExpr f with - | Expr.App(f2,fty2,tys2,[],m2) -> Some(f2,fty2,tys2 @ tys,args,m2) - | Expr.App _ -> Some(f,fty,tys,args,m) (* has args, so not combine ty args *) - | f -> Some(f,fty,tys,args,m) + | Expr.App(f2, fty2, tys2, [], m2) -> Some(f2, fty2, tys2 @ tys, args, m2) + | Expr.App _ -> Some(f, fty, tys, args, m) (* has args, so not combine ty args *) + | f -> Some(f, fty, tys, args, m) | _ -> None //------------------------------------------------------------------------- // GetValsBoundInExpr //------------------------------------------------------------------------- module GlobalUsageAnalysis = - let bindAccBounds vals (_isInDTree,v) = Zset.add v vals + let bindAccBounds vals (_isInDTree, v) = Zset.add v vals let GetValsBoundInExpr expr = let folder = {ExprFolder0 with valBindingSiteIntercept = bindAccBounds} @@ -190,13 +181,13 @@ module GlobalUsageAnalysis = /// (b) log it's binding site representation. type Results = { /// v -> context / APP inst args - Uses : Zmap + Uses : Zmap /// v -> binding repr - Defns : Zmap + Defns : Zmap /// bound in a decision tree? DecisionTreeBindings : Zset /// v -> v list * recursive? -- the others in the mutual binding - RecursiveBindings : Zmap + RecursiveBindings : Zmap TopLevelBindings : Zset IterationIsAtTopLevel : bool } @@ -217,7 +208,7 @@ module GlobalUsageAnalysis = | None -> Zmap.add f [tup] z.Uses } /// Log the definition of a binding - let logBinding z (isInDTree,v) = + let logBinding z (isInDTree, v) = let z = if isInDTree then {z with DecisionTreeBindings = Zset.add v z.DecisionTreeBindings} else z let z = if z.IterationIsAtTopLevel then {z with TopLevelBindings = Zset.add v z.TopLevelBindings} else z z @@ -227,14 +218,14 @@ module GlobalUsageAnalysis = let logNonRecBinding z (bind:Binding) = let v = bind.Var let vs = [v] - {z with RecursiveBindings = Zmap.add v (false,vs) z.RecursiveBindings + {z with RecursiveBindings = Zmap.add v (false, vs) z.RecursiveBindings Defns = Zmap.add v bind.Expr z.Defns } /// Log the definition of a recursive binding let logRecBindings z binds = let vs = valsOfBinds binds - {z with RecursiveBindings = (z.RecursiveBindings,vs) ||> List.fold (fun mubinds v -> Zmap.add v (true,vs) mubinds) - Defns = (z.Defns,binds) ||> List.fold (fun eqns bind -> Zmap.add bind.Var bind.Expr eqns) } + {z with RecursiveBindings = (z.RecursiveBindings, vs) ||> List.fold (fun mubinds v -> Zmap.add v (true, vs) mubinds) + Defns = (z.Defns, binds) ||> List.fold (fun eqns bind -> Zmap.add bind.Var bind.Expr eqns) } /// Work locally under a lambda of some kind let foldUnderLambda f z x = @@ -250,7 +241,7 @@ module GlobalUsageAnalysis = // Fold expr, intercepts selected exprs. // "val v" - count [] callpattern of v - // "app (f,args)" - count callpattern of f + // "app (f, args)" - count callpattern of f //--- // On intercepted nodes, must continue exprF fold over any subexpressions, e.g. args. //------ @@ -268,32 +259,32 @@ module GlobalUsageAnalysis = let exprUsageIntercept exprF z expr = let rec recognise context expr = match expr with - | Expr.Val (v,_,_) -> + | Expr.Val (v, _, _) -> // YES: count free occurrence - let z = foldLocalVal (fun z v -> logUse v (context,[],[]) z) z v + let z = foldLocalVal (fun z v -> logUse v (context, [], []) z) z v Some z - | TyappAndApp(f,_,tys,args,_) -> + | TyappAndApp(f, _, tys, args, _) -> match f with - | Expr.Val (fOrig,_,_) -> + | Expr.Val (fOrig, _, _) -> // app where function is val // YES: count instance/app (app when have term args), and then // collect from args (have intercepted this node) - let collect z f = logUse f (context,tys,args) z + let collect z f = logUse f (context, tys, args) z let z = foldLocalVal collect z fOrig let z = List.fold exprF z args Some z | _ -> // NO: app but function is not val None - | Expr.Op(TOp.TupleFieldGet (tupInfo,n),ts,[x],_) when not (evalTupInfoIsStruct tupInfo) -> - let context = TupleGet (n,ts) :: context + | Expr.Op(TOp.TupleFieldGet (tupInfo, n), ts, [x], _) when not (evalTupInfoIsStruct tupInfo) -> + let context = TupleGet (n, ts) :: context recognise context x // lambdas end top-level status - | Expr.Lambda(_id,_ctorThisValOpt,_baseValOpt,_vs,body,_,_) -> + | Expr.Lambda(_id, _ctorThisValOpt, _baseValOpt, _vs, body, _, _) -> let z = foldUnderLambda exprF z body Some z - | Expr.TyLambda(_id,_tps,body,_,_) -> + | Expr.TyLambda(_id, _tps, body, _, _) -> let z = foldUnderLambda exprF z body Some z | _ -> @@ -302,8 +293,8 @@ module GlobalUsageAnalysis = let context = [] recognise context expr - let targetIntercept exprF z = function TTarget(_argvs,body,_) -> Some (foldUnderLambda exprF z body) - let tmethodIntercept exprF z = function TObjExprMethod(_,_,_,_,e,_m) -> Some (foldUnderLambda exprF z e) + let targetIntercept exprF z = function TTarget(_argvs, body, _) -> Some (foldUnderLambda exprF z body) + let tmethodIntercept exprF z = function TObjExprMethod(_, _, _, _, e, _m) -> Some (foldUnderLambda exprF z e) {ExprFolder0 with exprIntercept = exprUsageIntercept @@ -335,7 +326,7 @@ let internalError str = raise(Failure(str)) let mkLocalVal m name ty topValInfo = let compgen = false in (* REVIEW: review: should this be true? *) - NewVal(name,m,None,ty,Immutable,compgen,topValInfo,taccessPublic,ValNotInRecScope,None,NormalVal,[],ValInline.Optional,XmlDoc.Empty,false,false,false,false,false,false,None,ParentNone) + NewVal(name, m, None, ty, Immutable, compgen, topValInfo, taccessPublic, ValNotInRecScope, None, NormalVal, [], ValInline.Optional, XmlDoc.Empty, false, false, false, false, false, false, None, ParentNone) //------------------------------------------------------------------------- @@ -352,21 +343,22 @@ let rec ValReprInfoForTS ts = | TupleTS ts -> ts |> List.collect ValReprInfoForTS let rec andTS ts tsB = - match ts,tsB with - | _ ,UnknownTS -> UnknownTS - | UnknownTS ,_ -> UnknownTS - | TupleTS ss ,TupleTS ssB -> if ss.Length <> ssB.Length then UnknownTS (* different tuple instances *) - else TupleTS (List.map2 andTS ss ssB) + match ts, tsB with + | _ , UnknownTS -> UnknownTS + | UnknownTS, _ -> UnknownTS + | TupleTS ss, TupleTS ssB -> + if ss.Length <> ssB.Length then UnknownTS (* different tuple instances *) + else TupleTS (List.map2 andTS ss ssB) let checkTS = function - | TupleTS [] -> internalError "exprTS: Tuple[] not expected. (units not done that way)." - | TupleTS [_] -> internalError "exprTS: Tuple[x] not expected. (singleton tuples should not exist." - | ts -> ts + | TupleTS [] -> internalError "exprTS: Tuple[] not expected. (units not done that way)." + | TupleTS [_] -> internalError "exprTS: Tuple[x] not expected. (singleton tuples should not exist." + | ts -> ts /// explicit tuple-structure in expr let rec uncheckedExprTS expr = match expr with - | Expr.Op(TOp.Tuple tupInfo,_tys,args,_) when not (evalTupInfoIsStruct tupInfo) -> + | Expr.Op(TOp.Tuple tupInfo, _tys, args, _) when not (evalTupInfoIsStruct tupInfo) -> TupleTS (List.map uncheckedExprTS args) | _ -> UnknownTS @@ -383,17 +375,17 @@ let typeTS g tys = tys |> uncheckedTypeTS g |> checkTS let rebuildTS g m ts vs = let rec rebuild vs ts = - match vs,ts with - | [] ,UnknownTS -> internalError "rebuildTS: not enough fringe to build tuple" - | v::vs,UnknownTS -> (exprForVal m v,v.Type),vs - | vs ,TupleTS tss -> - let xtys,vs = List.mapFold rebuild vs tss - let xs,tys = List.unzip xtys + match vs, ts with + | [] , UnknownTS -> internalError "rebuildTS: not enough fringe to build tuple" + | v::vs, UnknownTS -> (exprForVal m v, v.Type), vs + | vs , TupleTS tss -> + let xtys, vs = List.mapFold rebuild vs tss + let xs, tys = List.unzip xtys let x = mkRefTupled g m xs tys let ty = mkRefTupledTy g tys - (x,ty),vs + (x, ty), vs - let (x,_ty),vs = rebuild vs ts + let (x, _ty), vs = rebuild vs ts if vs.Length <> 0 then internalError "rebuildTS: had more fringe vars than fringe. REPORT BUG" x @@ -420,15 +412,15 @@ let rec minimalCallPattern callPattern = /// Combines a list of callpatterns into one common callpattern. let commonCallPattern callPatterns = let rec andCPs cpA cpB = - match cpA,cpB with - | [] ,[] -> [] - | tsA::tsAs,tsB::tsBs -> andTS tsA tsB :: andCPs tsAs tsBs - | _tsA::_tsAs,[] -> [] (* now trim to shortest - UnknownTS :: andCPs tsAs [] *) - | [] ,_tsB::_tsBs -> [] (* now trim to shortest - UnknownTS :: andCPs [] tsBs *) + match cpA, cpB with + | [] , [] -> [] + | tsA::tsAs, tsB::tsBs -> andTS tsA tsB :: andCPs tsAs tsBs + | _tsA::_tsAs, [] -> [] (* now trim to shortest - UnknownTS :: andCPs tsAs [] *) + | [] , _tsB::_tsBs -> [] (* now trim to shortest - UnknownTS :: andCPs [] tsBs *) List.reduce andCPs callPatterns -let siteCP (_accessors,_inst,args) = argsCP args +let siteCP (_accessors, _inst, args) = argsCP args let sitesCPs sites = List.map siteCP sites //------------------------------------------------------------------------- @@ -459,10 +451,10 @@ type Transform = // transform - mkTransform - decided, create necessary stuff //------------------------------------------------------------------------- -let mkTransform g (f:Val) m tps x1Ntys rty (callPattern,tyfringes: (TType list * Val list) list) = +let mkTransform g (f:Val) m tps x1Ntys rty (callPattern, tyfringes: (TType list * Val list) list) = // Create formal choices for x1...xp under callPattern let transformedFormals = - (callPattern,tyfringes) ||> List.map2 (fun cpi (tyfringe,vs) -> + (callPattern, tyfringes) ||> List.map2 (fun cpi (tyfringe, vs) -> match cpi with | UnknownTS -> SameArg | TupleTS [] -> SameArg @@ -475,23 +467,23 @@ let mkTransform g (f:Val) m tps x1Ntys rty (callPattern,tyfringes: (TType list * let baseName = match vs with [v] -> v.LogicalName | _ -> "arg" let baseRange = match vs with [v] -> v.Range | _ -> m tyfringe |> List.mapi (fun i ty -> - let name = baseName ^ string i + let name = baseName + string i mkCompGenLocal baseRange name ty |> fst) - NewArgs (vs,rebuildTS g m cpi vs)) + NewArgs (vs, rebuildTS g m cpi vs)) // Create transformedVal replacement for f // Mark the arity of the value let topValInfo = match f.ValReprInfo with | None -> None - | _ -> Some(ValReprInfo (ValReprInfo.InferTyparInfo tps,List.collect ValReprInfoForTS callPattern,ValReprInfo.unnamedRetVal)) + | _ -> Some(ValReprInfo (ValReprInfo.InferTyparInfo tps, List.collect ValReprInfoForTS callPattern, ValReprInfo.unnamedRetVal)) (* type(transformedVal) tyfringes types replace initial arg types of f *) let tys1r = List.collect fst tyfringes (* types for collapsed initial r args *) let tysrN = List.drop tyfringes.Length x1Ntys (* types for remaining args *) let argtys = tys1r @ tysrN let fCty = mkLambdaTy tps argtys rty - let transformedVal = mkLocalVal f.Range (globalNng.FreshCompilerGeneratedName (f.LogicalName,f.Range)) fCty topValInfo + let transformedVal = mkLocalVal f.Range (globalNng.FreshCompilerGeneratedName (f.LogicalName, f.Range)) fCty topValInfo { transformCallPattern = callPattern transformedFormals = transformedFormals transformedVal = transformedVal } @@ -501,26 +493,27 @@ let mkTransform g (f:Val) m tps x1Ntys rty (callPattern,tyfringes: (TType list * // transform - vTransforms - support //------------------------------------------------------------------------- +let rec zipTupleStructureAndType g ts ty = + // match a tuple-structure and type, yields: + // (a) (restricted) tuple-structure, and + // (b) type fringe for each arg position. + match ts with + | TupleTS tss when isRefTupleTy g ty -> + let tys = destRefTupleTy g ty + let tss, tyfringe = zipTupleStructuresAndTypes g tss tys + TupleTS tss, tyfringe + | _ -> + UnknownTS, [ty] (* trim back CallPattern, function more general *) + +and zipTupleStructuresAndTypes g tss tys = + let tstys = List.map2 (zipTupleStructureAndType g) tss tys // assumes tss tys same length + let tss = List.map fst tstys + let tys = List.collect snd tstys // link fringes + tss, tys + let zipCallPatternArgTys m g (callPattern : TupleStructure list) (vss : Val list list) = - let rec zipTSTyp ts typ = - // match a tuple-structure and type, yields: - // (a) (restricted) tuple-structure, and - // (b) type fringe for each arg position. - match ts with - | TupleTS tss when isRefTupleTy g typ -> - let tys = destRefTupleTy g typ - let tss,tyfringe = zipTSListTypList tss tys - TupleTS tss,tyfringe - | _ -> - UnknownTS,[typ] (* trim back CallPattern, function more general *) - and zipTSListTypList tss tys = - let tstys = List.map2 zipTSTyp tss tys // assumes tss tys same length - let tss = List.map fst tstys - let tys = List.collect snd tstys // link fringes - tss,tys - let vss = List.take callPattern.Length vss // drop excessive tys if callPattern shorter - let tstys = List.map2 (fun ts vs -> let ts,tyfringe = zipTSTyp ts (typeOfLambdaArg m vs) in ts,(tyfringe,vs)) callPattern vss + let tstys = List.map2 (fun ts vs -> let ts, tyfringe = zipTupleStructureAndType g ts (typeOfLambdaArg m vs) in ts, (tyfringe, vs)) callPattern vss List.unzip tstys //------------------------------------------------------------------------- @@ -534,10 +527,10 @@ let zipCallPatternArgTys m g (callPattern : TupleStructure list) (vss : Val list let decideFormalSuggestedCP g z tys vss = let rec trimTsByAccess accessors ts = - match ts,accessors with - | UnknownTS ,_ -> UnknownTS - | TupleTS _tss,[] -> UnknownTS (* trim it, require the val at this point *) - | TupleTS tss,TupleGet (i,_ty)::accessors -> + match ts, accessors with + | UnknownTS , _ -> UnknownTS + | TupleTS _tss, [] -> UnknownTS (* trim it, require the val at this point *) + | TupleTS tss, TupleGet (i, _ty)::accessors -> let tss = List.mapNth i (trimTsByAccess accessors) tss TupleTS tss @@ -545,7 +538,7 @@ let decideFormalSuggestedCP g z tys vss = match Zmap.tryFind v z.Uses with | None -> UnknownTS (* formal has no usage info, it is unused *) | Some sites -> - let trim ts (accessors,_inst,_args) = trimTsByAccess accessors ts + let trim ts (accessors, _inst, _args) = trimTsByAccess accessors ts List.fold trim ts sites let trimTsByFormal z ts vss = @@ -564,25 +557,25 @@ let decideFormalSuggestedCP g z tys vss = // transform - decideTransform //------------------------------------------------------------------------- -let decideTransform g z v callPatterns (m,tps,vss:Val list list,rty) = +let decideTransform g z v callPatterns (m, tps, vss:Val list list, rty) = let tys = List.map (typeOfLambdaArg m) vss (* arg types *) (* NOTE: 'a in arg types may have been instanced at different tuples... *) (* commonCallPattern has to handle those cases. *) let callPattern = commonCallPattern callPatterns // common CallPattern - let callPattern = List.take vss.Length callPattern // restricted to max nArgs + let callPattern = List.truncate vss.Length callPattern // restricted to max nArgs // Get formal callPattern by defn usage of formals let formalCallPattern = decideFormalSuggestedCP g z tys vss - let callPattern = List.take callPattern.Length formalCallPattern + let callPattern = List.truncate callPattern.Length formalCallPattern // Zip with information about known args - let callPattern,tyfringes = zipCallPatternArgTys m g callPattern vss + let callPattern, tyfringes = zipCallPatternArgTys m g callPattern vss // Drop trivial tail AND let callPattern = minimalCallPattern callPattern // Shorten tyfringes (zippable) - let tyfringes = List.take callPattern.Length tyfringes + let tyfringes = List.truncate callPattern.Length tyfringes if isTrivialCP callPattern then None // no transform else - Some (v,mkTransform g v m tps tys rty (callPattern,tyfringes)) + Some (v, mkTransform g v m tps tys rty (callPattern, tyfringes)) //------------------------------------------------------------------------- @@ -592,10 +585,10 @@ let decideTransform g z v callPatterns (m,tps,vss:Val list list,rty) = // Public f could be used beyond assembly. // For now, suppressing any transforms on these. // Later, could transform f and fix up local calls and provide an f wrapper for beyond. -let eligibleVal g (v:Val) = +let eligibleVal g m (v:Val) = let dllImportStubOrOtherNeverInline = (v.InlineInfo = ValInline.Never) let mutableVal = v.IsMutable - let byrefVal = isByrefLikeTy g v.Type + let byrefVal = isByrefLikeTy g m v.Type not dllImportStubOrOtherNeverInline && not byrefVal && not mutableVal && @@ -603,19 +596,19 @@ let eligibleVal g (v:Val) = not v.IsCompiledAsTopLevel let determineTransforms g (z : GlobalUsageAnalysis.Results) = - let selectTransform f sites = - if not (eligibleVal g f) then None else + let selectTransform (f: Val) sites = + if not (eligibleVal g f.Range f) then None else // Consider f, if it has top-level lambda (meaning has term args) match Zmap.tryFind f z.Defns with | None -> None // no binding site, so no transform | Some e -> - let tps,vss,_b,rty = stripTopLambda (e,f.Type) + let tps, vss, _b, rty = stripTopLambda (e, f.Type) match List.concat vss with | [] -> None // defn has no term args | arg1::_ -> // consider f let m = arg1.Range // mark of first arg, mostly for error reporting let callPatterns = sitesCPs sites // callPatterns from sites - decideTransform g z f callPatterns (m,tps,vss,rty) // make transform (if required) + decideTransform g z f callPatterns (m, tps, vss, rty) // make transform (if required) let vtransforms = Zmap.chooseL selectTransform z.Uses let vtransforms = Zmap.ofList valOrder vtransforms @@ -629,7 +622,7 @@ let determineTransforms g (z : GlobalUsageAnalysis.Results) = type penv = { // The planned transforms - transforms : Zmap + transforms : Zmap ccu : CcuThunk g : TcGlobals } @@ -650,68 +643,68 @@ type env = prefix : string m : Range.range } -let suffixE env s = {env with prefix = env.prefix ^ s} +let suffixE env s = {env with prefix = env.prefix + s} let rangeE env m = {env with m = m} let push b bs = b::bs let pushL xs bs = xs@bs let newLocal env ty = mkCompGenLocal env.m env.prefix ty -let newLocalN env i ty = mkCompGenLocal env.m (env.prefix ^ string i) ty +let newLocalN env i ty = mkCompGenLocal env.m (env.prefix + string i) ty let noEffectExpr env bindings x = match x with - | Expr.Val (_v,_,_m) -> bindings,x + | Expr.Val (_v, _, _m) -> bindings, x | x -> - let tmp,xtmp = newLocal env (tyOfExpr env.eg x) + let tmp, xtmp = newLocal env (tyOfExpr env.eg x) let bind = mkCompGenBind tmp x - push bind bindings,xtmp + push bind bindings, xtmp // Given 'e', build // let v1 = e#1 // let v2 = e#N let buildProjections env bindings x xtys = - let binds,vixs = + let binds, vixs = xtys |> List.mapi (fun i xty -> - let vi,vix = newLocalN env i xty - let bind = mkBind NoSequencePointAtInvisibleBinding vi (mkTupleFieldGet env.eg (tupInfoRef,x,xtys,i,env.m)) - bind,vix) + let vi, vix = newLocalN env i xty + let bind = mkBind NoSequencePointAtInvisibleBinding vi (mkTupleFieldGet env.eg (tupInfoRef, x, xtys, i, env.m)) + bind, vix) |> List.unzip // Why are we reversing here? Because we end up reversing once more later let bindings = pushL (List.rev binds) bindings - bindings,vixs + bindings, vixs let rec collapseArg env bindings ts (x:Expr) = let m = x.Range let env = rangeE env m - match ts,x with - | UnknownTS ,x -> - let bindings,vx = noEffectExpr env bindings x - bindings,[vx] - | TupleTS tss,Expr.Op(TOp.Tuple tupInfo,_xtys,xs,_) when not (evalTupInfoIsStruct tupInfo) -> + match ts, x with + | UnknownTS , x -> + let bindings, vx = noEffectExpr env bindings x + bindings, [vx] + | TupleTS tss, Expr.Op(TOp.Tuple tupInfo, _xtys, xs, _) when not (evalTupInfoIsStruct tupInfo) -> let env = suffixE env "'" collapseArgs env bindings 1 tss xs - | TupleTS tss,x -> + | TupleTS tss, x -> // project components - let bindings,x = noEffectExpr env bindings x + let bindings, x = noEffectExpr env bindings x let env = suffixE env "_p" let xty = tyOfExpr env.eg x let xtys = destRefTupleTy env.eg xty - let bindings,xs = buildProjections env bindings x xtys + let bindings, xs = buildProjections env bindings x xtys collapseArg env bindings (TupleTS tss) (mkRefTupled env.eg m xs xtys) and collapseArgs env bindings n (callPattern) args = - match callPattern,args with - | [] ,args -> bindings,args - | ts::tss,arg::args -> + match callPattern, args with + | [] , args -> bindings, args + | ts::tss, arg::args -> let env1 = suffixE env (string n) - let bindings,xty = collapseArg env1 bindings ts arg - let bindings,xtys = collapseArgs env bindings (n+1) tss args - bindings,xty @ xtys - | _ts::_tss,[] -> + let bindings, xty = collapseArg env1 bindings ts arg + let bindings, xtys = collapseArgs env bindings (n+1) tss args + bindings, xty @ xtys + | _ts::_tss, [] -> internalError "collapseArgs: CallPattern longer than callsite args. REPORT BUG" @@ -721,13 +714,13 @@ and collapseArgs env bindings n (callPattern) args = // REVIEW: use mkLet etc. let mkLets binds (body:Expr) = - (binds,body) ||> List.foldBack (fun b acc -> mkLetBind acc.Range b acc) + (binds, body) ||> List.foldBack (fun b acc -> mkLetBind acc.Range b acc) -let fixupApp (penv:penv) (fx,fty,tys,args,m) = +let fixupApp (penv:penv) (fx, fty, tys, args, m) = // Is it a val app, where the val has a transform? match fx with - | Expr.Val (vref,_,m) -> + | Expr.Val (vref, _, m) -> let f = vref.Deref match hasTransfrom penv f with | Some trans -> @@ -739,13 +732,13 @@ let fixupApp (penv:penv) (fx,fty,tys,args,m) = (* [[f tps args ]] -> transformedVal tps [[COLLAPSED: args]] *) let env = {prefix = "arg";m = m;eg=penv.g} let bindings = [] - let bindings,args = collapseArgs env bindings 0 callPattern args + let bindings, args = collapseArgs env bindings 0 callPattern args let bindings = List.rev bindings - mkLets bindings (Expr.App (fCx,fCty,tys,args,m)) + mkLets bindings (Expr.App (fCx, fCty, tys, args, m)) | None -> - Expr.App (fx,fty,tys,args,m) (* no change, f untransformed val *) + Expr.App (fx, fty, tys, args, m) (* no change, f untransformed val *) | _ -> - Expr.App (fx,fty,tys,args,m) (* no change, f is expr *) + Expr.App (fx, fty, tys, args, m) (* no change, f is expr *) //------------------------------------------------------------------------- @@ -755,20 +748,20 @@ let fixupApp (penv:penv) (fx,fty,tys,args,m) = let transFormal ybi xi = match ybi with | SameArg -> [xi] // one arg - where arg=vpsecs - | NewArgs (vs,_x) -> vs |> List.map List.singleton // many args + | NewArgs (vs, _x) -> vs |> List.map List.singleton // many args let transRebind ybi xi = - match xi,ybi with - | _ ,SameArg -> [] (* no rebinding, reused original formal *) - | [u],NewArgs (_vs,x) -> [mkCompGenBind u x] - | us ,NewArgs (_vs,x) -> List.map2 mkCompGenBind us (tryDestRefTupleExpr x) + match xi, ybi with + | _ , SameArg -> [] (* no rebinding, reused original formal *) + | [u], NewArgs (_vs, x) -> [mkCompGenBind u x] + | us , NewArgs (_vs, x) -> List.map2 mkCompGenBind us (tryDestRefTupleExpr x) //------------------------------------------------------------------------- // pass - mubinds //------------------------------------------------------------------------- -// Foreach (f,repr) where +// Foreach (f, repr) where // If f has trans, then // repr = LAM tps. lam x1...xN . body // @@ -776,13 +769,13 @@ let transRebind ybi xi = // // New binding: // -// transformedVal = LAM tps. lam [[FORMALS: yb1 ... ybp]] xq...xN = let [[REBINDS: x1,yb1 ...]] +// transformedVal = LAM tps. lam [[FORMALS: yb1 ... ybp]] xq...xN = let [[REBINDS: x1, yb1 ...]] // body // // Does not fix calls/defns in binding rhs, that is done by caller. // -let passBind penv (TBind(fOrig,repr,letSeqPtOpt) as bind) = +let passBind penv (TBind(fOrig, repr, letSeqPtOpt) as bind) = let m = fOrig.Range match hasTransfrom penv fOrig with | None -> @@ -790,7 +783,7 @@ let passBind penv (TBind(fOrig,repr,letSeqPtOpt) as bind) = bind | Some trans -> // fOrig has transform - let tps,vss,body,rty = stripTopLambda (repr,fOrig.Type) + let tps, vss, body, rty = stripTopLambda (repr, fOrig.Type) // transformedVal is curried version of fOrig let transformedVal = trans.transformedVal // fCBody - parts - formals @@ -798,15 +791,15 @@ let passBind penv (TBind(fOrig,repr,letSeqPtOpt) as bind) = let p = transformedFormals.Length if (vss.Length < p) then internalError "passBinds: |vss|

List.map (passBind penv) // 3. run pass over following code. //------------------------------------------------------------------------- -let passBindRhs conv (TBind (v,repr,letSeqPtOpt)) = TBind(v,conv repr,letSeqPtOpt) +let passBindRhs conv (TBind (v, repr, letSeqPtOpt)) = TBind(v, conv repr, letSeqPtOpt) let preInterceptExpr (penv:penv) conv expr = match expr with - | Expr.LetRec (binds,e,m,_) -> + | Expr.LetRec (binds, e, m, _) -> let binds = List.map (passBindRhs conv) binds let binds = passBinds penv binds Some (mkLetRecBinds m binds (conv e)) - | Expr.Let (bind,e,m,_) -> + | Expr.Let (bind, e, m, _) -> let bind = passBindRhs conv bind let bind = passBind penv bind Some (mkLetBind m bind (conv e)) - | TyappAndApp(f,fty,tys,args,m) -> + | TyappAndApp(f, fty, tys, args, m) -> // match app, and fixup if needed let args = List.map conv args let f = conv f - Some (fixupApp penv (f,fty,tys,args,m) ) + Some (fixupApp penv (f, fty, tys, args, m) ) | _ -> None let postTransformExpr (penv:penv) expr = match expr with - | Expr.LetRec (binds,e,m,_) -> + | Expr.LetRec (binds, e, m, _) -> let binds = passBinds penv binds Some (mkLetRecBinds m binds e) - | Expr.Let (bind,e,m,_) -> + | Expr.Let (bind, e, m, _) -> let bind = passBind penv bind Some (mkLetBind m bind e) - | TyappAndApp(f,fty,tys,args,m) -> + | TyappAndApp(f, fty, tys, args, m) -> // match app, and fixup if needed - Some (fixupApp penv (f,fty,tys,args,m) ) + Some (fixupApp penv (f, fty, tys, args, m) ) | _ -> None diff --git a/src/fsharp/DetupleArgs.fsi b/src/fsharp/DetupleArgs.fsi index 907afc3298e..58412315820 100644 --- a/src/fsharp/DetupleArgs.fsi +++ b/src/fsharp/DetupleArgs.fsi @@ -2,16 +2,10 @@ module internal Microsoft.FSharp.Compiler.Detuple -open Internal.Utilities -open Microsoft.FSharp.Compiler.AbstractIL open Microsoft.FSharp.Compiler.AbstractIL.Internal -open Microsoft.FSharp.Compiler open Microsoft.FSharp.Compiler.Tast open Microsoft.FSharp.Compiler.TcGlobals - - -(* detuple pass: *) val DetupleImplFile : CcuThunk -> TcGlobals -> TypedImplFile -> TypedImplFile module GlobalUsageAnalysis = diff --git a/src/fsharp/ErrorLogger.fs b/src/fsharp/ErrorLogger.fs index cb2b585168c..d29874bb0d5 100755 --- a/src/fsharp/ErrorLogger.fs +++ b/src/fsharp/ErrorLogger.fs @@ -1,16 +1,8 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -#if COMPILER_PUBLIC_API module public Microsoft.FSharp.Compiler.ErrorLogger -#else -module internal Microsoft.FSharp.Compiler.ErrorLogger -#endif -open Internal.Utilities open Microsoft.FSharp.Compiler -open Microsoft.FSharp.Compiler.AbstractIL.Diagnostics -open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library -open Microsoft.FSharp.Compiler.Lib open Microsoft.FSharp.Compiler.Range open System @@ -113,23 +105,23 @@ exception ErrorWithSuggestions of (int * string) * range * string * Suggestions let inline protectAssemblyExploration dflt f = try f() - with - | UnresolvedPathReferenceNoRange _ -> dflt - | _ -> reraise() + with + | UnresolvedPathReferenceNoRange _ -> dflt + | _ -> reraise() let inline protectAssemblyExplorationF dflt f = try f() - with - | UnresolvedPathReferenceNoRange (asmName, path) -> dflt(asmName, path) - | _ -> reraise() + with + | UnresolvedPathReferenceNoRange (asmName, path) -> dflt(asmName, path) + | _ -> reraise() let inline protectAssemblyExplorationNoReraise dflt1 dflt2 f = try f() - with - | UnresolvedPathReferenceNoRange _ -> dflt1 - | _ -> dflt2 + with + | UnresolvedPathReferenceNoRange _ -> dflt1 + | _ -> dflt2 // Attach a range if this is a range dual exception. let rec AttachRange m (exn:exn) = @@ -140,7 +132,7 @@ let rec AttachRange m (exn:exn) = | :? System.Reflection.TargetInvocationException -> AttachRange m exn.InnerException | UnresolvedReferenceNoRange(a) -> UnresolvedReferenceError(a, m) | UnresolvedPathReferenceNoRange(a, p) -> UnresolvedPathReference(a, p, m) - | Failure(msg) -> InternalError(msg^" (Failure)", m) + | Failure(msg) -> InternalError(msg + " (Failure)", m) | :? System.ArgumentException as exn -> InternalError(exn.Message + " (ArgumentException)", m) | notARangeDual -> notARangeDual @@ -154,20 +146,22 @@ type Exiter = let QuitProcessExiter = { new Exiter with - member x.Exit(n) = + member __.Exit(n) = try System.Environment.Exit(n) with _ -> () - failwithf "%s" <| FSComp.SR.elSysEnvExitDidntExit() } + FSComp.SR.elSysEnvExitDidntExit() + |> failwith } /// Closed enumeration of build phases. +[] type BuildPhase = | DefaultPhase | Compile | Parameter | Parse | TypeCheck | CodeGen - | Optimize | IlxGen | IlGen | Output + | Optimize | IlxGen | IlGen | Output | Interactive // An error seen during interactive execution /// Literal build phase subcategory strings. @@ -216,17 +210,17 @@ type PhasedDiagnostic = /// member pe.Subcategory() = match pe.Phase with - | DefaultPhase -> BuildPhaseSubcategory.DefaultPhase - | Compile -> BuildPhaseSubcategory.Compile - | Parameter -> BuildPhaseSubcategory.Parameter - | Parse -> BuildPhaseSubcategory.Parse - | TypeCheck -> BuildPhaseSubcategory.TypeCheck - | CodeGen -> BuildPhaseSubcategory.CodeGen - | Optimize -> BuildPhaseSubcategory.Optimize - | IlxGen -> BuildPhaseSubcategory.IlxGen - | IlGen -> BuildPhaseSubcategory.IlGen - | Output -> BuildPhaseSubcategory.Output - | Interactive -> BuildPhaseSubcategory.Interactive + | BuildPhase.DefaultPhase -> BuildPhaseSubcategory.DefaultPhase + | BuildPhase.Compile -> BuildPhaseSubcategory.Compile + | BuildPhase.Parameter -> BuildPhaseSubcategory.Parameter + | BuildPhase.Parse -> BuildPhaseSubcategory.Parse + | BuildPhase.TypeCheck -> BuildPhaseSubcategory.TypeCheck + | BuildPhase.CodeGen -> BuildPhaseSubcategory.CodeGen + | BuildPhase.Optimize -> BuildPhaseSubcategory.Optimize + | BuildPhase.IlxGen -> BuildPhaseSubcategory.IlxGen + | BuildPhase.IlGen -> BuildPhaseSubcategory.IlGen + | BuildPhase.Output -> BuildPhaseSubcategory.Output + | BuildPhase.Interactive -> BuildPhaseSubcategory.Interactive /// Return true if the textual phase given is from the compile part of the build process. /// This set needs to be equal to the set of subcategories that the language service can produce. @@ -260,7 +254,7 @@ type PhasedDiagnostic = member pe.IsPhaseInCompile() = let isPhaseInCompile = match pe.Phase with - | Compile | Parameter | Parse | TypeCheck -> true + | BuildPhase.Compile | BuildPhase.Parameter | BuildPhase.Parse | BuildPhase.TypeCheck -> true | _ -> false // Sanity check ensures that Phase matches Subcategory #if DEBUG @@ -278,7 +272,7 @@ type ErrorLogger(nameForDebugging:string) = // The 'Impl' factoring enables a developer to place a breakpoint at the non-Impl // code just below and get a breakpoint for all error logger implementations. abstract DiagnosticSink: phasedError: PhasedDiagnostic * isError: bool -> unit - member this.DebugDisplay() = sprintf "ErrorLogger(%s)" nameForDebugging + member __.DebugDisplay() = sprintf "ErrorLogger(%s)" nameForDebugging let DiscardErrorsLogger = { new ErrorLogger("DiscardErrorsLogger") with @@ -341,7 +335,7 @@ module ErrorLoggerExtensions = try let preserveStackTrace = typeof.GetMethod("InternalPreserveStackTrace", BindingFlags.Instance ||| BindingFlags.NonPublic) preserveStackTrace.Invoke(exn, null) |> ignore - with e-> + with _ -> // This is probably only the mono case. System.Diagnostics.Debug.Assert(false, "Could not preserve stack trace for watson exception.") () @@ -415,7 +409,7 @@ module ErrorLoggerExtensions = x.ErrorR (AttachRange m exn) // may raise exceptions, e.g. an fsi error sink raises StopProcessing. ReraiseIfWatsonable(exn) with - | ReportedError _ | WrappedError(ReportedError _, _) -> () + | ReportedError _ | WrappedError(ReportedError _, _) -> () member x.StopProcessingRecovery (exn:exn) (m:range) = // Do standard error recovery. @@ -425,10 +419,11 @@ module ErrorLoggerExtensions = match exn with | StopProcessing | WrappedError(StopProcessing, _) -> () // suppress, so skip error recovery. | _ -> - try x.ErrorRecovery exn m + try + x.ErrorRecovery exn m with - | StopProcessing | WrappedError(StopProcessing, _) -> () // catch, e.g. raised by DiagnosticSink. - | ReportedError _ | WrappedError(ReportedError _, _) -> () // catch, but not expected unless ErrorRecovery is changed. + | StopProcessing | WrappedError(StopProcessing, _) -> () // catch, e.g. raised by DiagnosticSink. + | ReportedError _ | WrappedError(ReportedError _, _) -> () // catch, but not expected unless ErrorRecovery is changed. member x.ErrorRecoveryNoRange (exn:exn) = x.ErrorRecovery exn range0 @@ -449,13 +444,13 @@ let PushErrorLoggerPhaseUntilUnwind(errorLoggerTransformer : ErrorLogger -> #Err let newInstalled = ref true let newIsInstalled() = if !newInstalled then () else (assert false; (); (*failwith "error logger used after unwind"*)) // REVIEW: ok to throw? let chkErrorLogger = { new ErrorLogger("PushErrorLoggerPhaseUntilUnwind") with - member x.DiagnosticSink(phasedError, isError) = newIsInstalled(); newErrorLogger.DiagnosticSink(phasedError, isError) - member x.ErrorCount = newIsInstalled(); newErrorLogger.ErrorCount } + member __.DiagnosticSink(phasedError, isError) = newIsInstalled(); newErrorLogger.DiagnosticSink(phasedError, isError) + member __.ErrorCount = newIsInstalled(); newErrorLogger.ErrorCount } CompileThreadStatic.ErrorLogger <- chkErrorLogger { new System.IDisposable with - member x.Dispose() = + member __.Dispose() = CompileThreadStatic.ErrorLogger <- oldErrorLogger newInstalled := false } @@ -465,13 +460,13 @@ let SetThreadErrorLoggerNoUnwind(errorLogger) = CompileThreadStatic.ErrorLog // Global functions are still used by parser and TAST ops. /// Raises an exception with error recovery and returns unit. -let errorR exn = CompileThreadStatic.ErrorLogger.ErrorR exn +let errorR exn = CompileThreadStatic.ErrorLogger.ErrorR exn /// Raises a warning with error recovery and returns unit. let warning exn = CompileThreadStatic.ErrorLogger.Warning exn /// Raises a special exception and returns 'T - can be caught later at an errorRecovery point. -let error exn = CompileThreadStatic.ErrorLogger.Error exn +let error exn = CompileThreadStatic.ErrorLogger.Error exn /// Simulates an error. For test purposes only. let simulateError (p : PhasedDiagnostic) = CompileThreadStatic.ErrorLogger.SimulateError p @@ -501,8 +496,8 @@ let suppressErrorReporting f = try let errorLogger = { new ErrorLogger("suppressErrorReporting") with - member x.DiagnosticSink(_phasedError, _isError) = () - member x.ErrorCount = 0 } + member __.DiagnosticSink(_phasedError, _isError) = () + member __.ErrorCount = 0 } SetThreadErrorLoggerNoUnwind(errorLogger) f() finally @@ -575,8 +570,11 @@ type TrackErrorsBuilder() = member x.Return res = ResultD res member x.ReturnFrom res = res member x.For(seq, k) = IterateD k seq + member x.Combine(expr1, expr2) = expr1 ++ expr2 member x.While(gd, k) = WhileD gd k member x.Zero() = CompleteD + member x.Delay(fn) = fun () -> fn () + member x.Run(fn) = fn () let trackErrors = TrackErrorsBuilder() @@ -640,11 +638,7 @@ let NormalizeErrorString (text : string) = i <- i + delta buf.ToString() -#if COMPILER_PUBLIC_API -type FSharpErrorSeverityOptions = -#else -type internal FSharpErrorSeverityOptions = -#endif +type public FSharpErrorSeverityOptions = { WarnLevel: int GlobalWarnAsError: bool diff --git a/src/fsharp/ErrorResolutionHints.fs b/src/fsharp/ErrorResolutionHints.fs index 64ef837c85f..e674adb6f46 100644 --- a/src/fsharp/ErrorResolutionHints.fs +++ b/src/fsharp/ErrorResolutionHints.fs @@ -4,6 +4,7 @@ module internal Microsoft.FSharp.Compiler.ErrorResolutionHints open Internal.Utilities +open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library let maxSuggestions = 5 let minThresholdForSuggestions = 0.7 @@ -28,17 +29,18 @@ let FilterPredictions (idText:string) (suggestionF:ErrorLogger.Suggestions) = let allSuggestions = suggestionF() let demangle (nm:string) = - if nm.StartsWith "( " && nm.EndsWith " )" then + if nm.StartsWithOrdinal("( ") && nm.EndsWithOrdinal(" )") then let cleanName = nm.[2..nm.Length - 3] cleanName else nm /// Returns `true` if given string is an operator display name, e.g. ( |>> ) let IsOperatorName (name: string) = - if not (name.StartsWith "( " && name.EndsWith " )") then false else - let name = name.[2..name.Length - 3] - let res = name |> Seq.forall (fun c -> c <> ' ') - res + if not (name.StartsWithOrdinal("( ") && name.EndsWithOrdinal(" )")) then + false + else + let name = name.[2..name.Length - 3] + name |> Seq.forall (fun c -> c <> ' ') if allSuggestions.Contains idText then [] else // some other parsing error occurred allSuggestions @@ -47,11 +49,11 @@ let FilterPredictions (idText:string) (suggestionF:ErrorLogger.Suggestions) = // value as well as to formally squelch the associated compiler // error/warning (FS1182), we remove such names from the suggestions, // both to prevent accidental usages as well as to encourage good taste - if IsOperatorName suggestion || suggestion.StartsWith "_" then None else + if IsOperatorName suggestion || suggestion.StartsWithOrdinal("_") then None else let suggestion:string = demangle suggestion let suggestedText = suggestion.ToUpperInvariant() let similarity = EditDistance.JaroWinklerDistance uppercaseText suggestedText - if similarity >= highConfidenceThreshold || suggestion.EndsWith ("." + idText) then + if similarity >= highConfidenceThreshold || suggestion.EndsWithOrdinal("." + idText) then Some(similarity, suggestion) elif similarity < minThresholdForSuggestions && suggestedText.Length > minStringLengthForThreshold then None diff --git a/src/fsharp/ExtensionTyping.fs b/src/fsharp/ExtensionTyping.fs index dade9c9650e..0d86ca58a05 100755 --- a/src/fsharp/ExtensionTyping.fs +++ b/src/fsharp/ExtensionTyping.fs @@ -36,6 +36,34 @@ module internal ExtensionTyping = temporaryFolder : string } + // Specify the tooling-compatible fragments of a path such as: + // typeproviders/fsharp41/net461/MyProvider.DesignTime.dll + // tools/fsharp41/net461/MyProvider.DesignTime.dll + // See https://github.com/Microsoft/visualfsharp/issues/3736 + + // Represents the FF#-compiler <-> type provider protocol. + // When the API or protocol updates, add a new version moniker to the front of the list here. + let toolingCompatibleTypeProviderProtocolMonikers() = + [ "fsharp41" ] + + // Detect the host tooling context + let toolingCompatibleVersions() = + if typeof.Assembly.GetName().Name = "mscorlib" then + [ "net461"; "net452"; "net451"; "net45"; "netstandard2.0"] + elif typeof.Assembly.GetName().Name = "System.Private.CoreLib" then + [ "netcoreapp2.0"; "netstandard2.0"] + else + System.Diagnostics.Debug.Assert(false, "Couldn't determine runtime tooling context, assuming it supports at least .NET Standard 2.0") + [ "netstandard2.0"] + + + let toolingCompatiblePaths() = + [ for protocol in toolingCompatibleTypeProviderProtocolMonikers() do + for netRuntime in toolingCompatibleVersions() do + yield Path.Combine("typeproviders", protocol, netRuntime) + yield Path.Combine("tools", protocol, netRuntime) + ] + /// Load a the design-time part of a type-provider into the host process, and look for types /// marked with the TypeProviderAttribute attribute. let GetTypeProviderImplementationTypes (runTimeAssemblyFileName, designTimeAssemblyNameString, m:range) = @@ -46,32 +74,58 @@ module internal ExtensionTyping = // Find and load the designer assembly for the type provider component. // - // If the assembly name ends with .dll, or is just a simple name, we look in the directory next to runtime assembly. - // Else we only look in the GAC. - let designTimeAssemblyOpt = - let loadFromDir fileName = + // We look in the directories stepping up from the location of the runtime assembly. + + let loadFromLocation designTimeAssemblyPath = + try + Some (FileSystem.AssemblyLoadFrom designTimeAssemblyPath) + with e -> + raiseError e + + let rec searchParentDirChain dir designTimeAssemblyName = + seq { + for subdir in toolingCompatiblePaths() do + let designTimeAssemblyPath = Path.Combine (dir, subdir, designTimeAssemblyName) + if FileSystem.SafeExists designTimeAssemblyPath then + yield loadFromLocation designTimeAssemblyPath + match Path.GetDirectoryName(dir) with + | s when s = "" || s = null || Path.GetFileName(dir) = "packages" || s = dir -> () + | parentDir -> yield! searchParentDirChain parentDir designTimeAssemblyName + } + + let loadFromParentDirRelativeToRuntimeAssemblyLocation designTimeAssemblyName = + let runTimeAssemblyPath = Path.GetDirectoryName runTimeAssemblyFileName + searchParentDirChain runTimeAssemblyPath designTimeAssemblyName + |> Seq.tryHead + |> function + | Some res -> res + | None -> + // The search failed, just load from the first location and report an error let runTimeAssemblyPath = Path.GetDirectoryName runTimeAssemblyFileName - let designTimeAssemblyPath = Path.Combine (runTimeAssemblyPath, fileName) - try - Some (FileSystem.AssemblyLoadFrom designTimeAssemblyPath) - with e -> - raiseError e - let loadFromGac() = - try - let asmName = System.Reflection.AssemblyName designTimeAssemblyNameString - Some (FileSystem.AssemblyLoad (asmName)) - with e -> - raiseError e + loadFromLocation (Path.Combine (runTimeAssemblyPath, designTimeAssemblyName)) + + let designTimeAssemblyOpt = if designTimeAssemblyNameString.EndsWith(".dll", StringComparison.OrdinalIgnoreCase) then - loadFromDir designTimeAssemblyNameString + loadFromParentDirRelativeToRuntimeAssemblyLocation designTimeAssemblyNameString else - let name = System.Reflection.AssemblyName designTimeAssemblyNameString + // Cover the case where the ".dll" extension has been left off and no version etc. has been used in the assembly + // string specification. The Name=FullName comparison is particularly strange, and was there to support + // design-time DLLs specified using "x.DesignTIme, Version= ..." long assembly names and GAC loads. + // These kind of design-time assembly specifications are no longer used to our knowledge so that comparison is basically legacy + // and will always succeed. + let name = System.Reflection.AssemblyName (Path.GetFileNameWithoutExtension designTimeAssemblyNameString) if name.Name.Equals(name.FullName, StringComparison.OrdinalIgnoreCase) then - let fileName = designTimeAssemblyNameString+".dll" - loadFromDir fileName + let designTimeAssemblyName = designTimeAssemblyNameString+".dll" + loadFromParentDirRelativeToRuntimeAssemblyLocation designTimeAssemblyName else - loadFromGac() + // Load from the GAC using Assembly.Load. This is legacy since type provider design-time components are + // never in the GAC these days and "x.DesignTIme, Version= ..." specifications are never used. + try + let asmName = System.Reflection.AssemblyName designTimeAssemblyNameString + Some (FileSystem.AssemblyLoad (asmName)) + with e -> + raiseError e // If we've find a design-time assembly, look for the public types with TypeProviderAttribute match designTimeAssemblyOpt with @@ -152,12 +206,17 @@ module internal ExtensionTyping = try let designTimeAssemblyName = try - Some (System.Reflection.AssemblyName designTimeAssemblyNameString) + if designTimeAssemblyNameString.EndsWith(".dll", StringComparison.OrdinalIgnoreCase) then + Some (System.Reflection.AssemblyName (Path.GetFileNameWithoutExtension designTimeAssemblyNameString)) + else + Some (System.Reflection.AssemblyName designTimeAssemblyNameString) with :? ArgumentException -> errorR(Error(FSComp.SR.etInvalidTypeProviderAssemblyName(runTimeAssemblyFileName, designTimeAssemblyNameString), m)) None [ match designTimeAssemblyName, resolutionEnvironment.outputFile with + // Check if the attribute is pointing to the file being compiled, in which case ignore it + // This checks seems like legacy but is included for compat. | Some designTimeAssemblyName, Some path when String.Compare(designTimeAssemblyName.Name, Path.GetFileNameWithoutExtension path, StringComparison.OrdinalIgnoreCase) = 0 -> () | Some _, _ -> @@ -369,7 +428,7 @@ module internal ExtensionTyping = member __.GetGenericArguments() = x.GetGenericArguments() |> ProvidedType.CreateArray ctxt member __.ApplyStaticArguments(provider: ITypeProvider, fullTypePathAfterArguments, staticArgs: obj[]) = provider.ApplyStaticArguments(x, fullTypePathAfterArguments, staticArgs) |> ProvidedType.Create ctxt - member __.IsVoid = (typeof.Equals(x)) + member __.IsVoid = (typeof.Equals(x) || (x.Namespace = "System" && x.Name = "Void")) member __.IsGenericParameter = x.IsGenericParameter member __.IsValueType = x.IsValueType member __.IsByRef = x.IsByRef @@ -1036,7 +1095,7 @@ module internal ExtensionTyping = try match ResolveProvidedType(resolver, m, moduleOrNamespace, typeName) with | Tainted.Null -> None - | typ -> Some typ + | ty -> Some ty with e -> errorRecovery e m None @@ -1140,16 +1199,8 @@ module internal ExtensionTyping = staticParameters |> Array.map (fun sp -> let typeBeforeArgumentsName = typeBeforeArguments.PUntaint ((fun st -> st.Name), m) let spName = sp.PUntaint ((fun sp -> sp.Name), m) - if not (argSpecsTable.ContainsKey spName) then - if sp.PUntaint ((fun sp -> sp.IsOptional), m) then - match sp.PUntaint((fun sp -> sp.RawDefaultValue), m) with - | null -> error (Error(FSComp.SR.etStaticParameterRequiresAValue (spName, typeBeforeArgumentsName, typeBeforeArgumentsName, spName), range0)) - | v -> v - else - error(Error(FSComp.SR.etProvidedTypeReferenceMissingArgument(spName), range0)) - else - let arg = argSpecsTable.[spName] - + match argSpecsTable.TryGetValue(spName) with + | true, arg -> /// Find the name of the representation type for the static parameter let spReprTypeName = sp.PUntaint((fun sp -> @@ -1173,7 +1224,16 @@ module internal ExtensionTyping = | "System.Char" -> box (char arg) | "System.Boolean" -> box (arg = "True") | "System.String" -> box (string arg) - | s -> error(Error(FSComp.SR.etUnknownStaticArgumentKind(s, typeLogicalName), range0))) + | s -> error(Error(FSComp.SR.etUnknownStaticArgumentKind(s, typeLogicalName), range0)) + + | _ -> + if sp.PUntaint ((fun sp -> sp.IsOptional), m) then + match sp.PUntaint((fun sp -> sp.RawDefaultValue), m) with + | null -> error (Error(FSComp.SR.etStaticParameterRequiresAValue (spName, typeBeforeArgumentsName, typeBeforeArgumentsName, spName), range0)) + | v -> v + else + error(Error(FSComp.SR.etProvidedTypeReferenceMissingArgument(spName), range0))) + match TryApplyProvidedType(typeBeforeArguments, None, staticArgs, range0) with | Some (typeWithArguments, checkTypeName) -> diff --git a/src/fsharp/ExtensionTyping.fsi b/src/fsharp/ExtensionTyping.fsi index f796881c357..a16788e2bb7 100755 --- a/src/fsharp/ExtensionTyping.fsi +++ b/src/fsharp/ExtensionTyping.fsi @@ -24,6 +24,9 @@ module internal ExtensionTyping = /// Raised when an type provider has thrown an exception. exception ProvidedTypeResolutionNoRange of exn + /// Get the list of relative paths searched for type provider design-time components + val toolingCompatiblePaths: unit -> string list + /// Carries information about the type provider resolution environment. type ResolutionEnvironment = { diff --git a/src/fsharp/FSComp.txt b/src/fsharp/FSComp.txt index deeb8d5daf0..a3f5f82d0ea 100644 --- a/src/fsharp/FSComp.txt +++ b/src/fsharp/FSComp.txt @@ -17,12 +17,12 @@ undefinedNameTypeParameter,"The type parameter %s is not defined." undefinedNamePatternDiscriminator,"The pattern discriminator '%s' is not defined." replaceWithSuggestion,"Replace with '%s'" addIndexerDot,"Add . for indexer access." -listElementHasWrongType,"All elements of a list constructor expression must have the same type. This expression was expected to have type '%s', but here has type '%s'." -arrayElementHasWrongType,"All elements of an array constructor expression must have the same type. This expression was expected to have type '%s', but here has type '%s'." -missingElseBranch,"The 'if' expression is missing an 'else' branch. The 'then' branch has type '%s'. Because 'if' is an expression, and not a statement, add an 'else' branch which returns a value of the same type." +listElementHasWrongType,"All elements of a list must be of the same type as the first element, which here is '%s'. This element has type '%s'." +arrayElementHasWrongType,"All elements of an array must be of the same type as the first element, which here is '%s'. This element has type '%s'." +missingElseBranch,"This 'if' expression is missing an 'else' branch. Because 'if' is an expression, and not a statement, add an 'else' branch which also returns a value of type '%s'." ifExpression,"The 'if' expression needs to have type '%s' to satisfy context type requirements. It currently has type '%s'." -elseBranchHasWrongType,"All branches of an 'if' expression must have the same type. This expression was expected to have type '%s', but here has type '%s'." -followingPatternMatchClauseHasWrongType,"All branches of a pattern match expression must have the same type. This expression was expected to have type '%s', but here has type '%s'." +elseBranchHasWrongType,"All branches of an 'if' expression must return values of the same type as the first branch, which here is '%s'. This branch returns a value of type '%s'." +followingPatternMatchClauseHasWrongType,"All branches of a pattern match expression must return values of the same type as the first branch, which here is '%s'. This branch returns a value of type '%s'." patternMatchGuardIsNotBool,"A pattern match guard must be of type 'bool', but this 'when' expression is of type '%s'." commaInsteadOfSemicolonInRecord,"A ';' is used to separate field values in records. Consider replacing ',' with ';'." derefInsteadOfNot,"The '!' operator is used to dereference a ref cell. Consider using 'not expr' here." @@ -83,7 +83,7 @@ tastTypeHasAssemblyCodeRepresentation,"The type '%s' has an inline assembly code 253,tastInvalidFormForPropertyGetter,"Invalid form for a property getter. At least one '()' argument is required when using the explicit syntax." 254,tastInvalidFormForPropertySetter,"Invalid form for a property setter. At least one argument is required." 255,tastUnexpectedByRef,"Unexpected use of a byref-typed variable" -256,tastValueMustBeLocalAndMutable,"A value must be mutable in order to mutate the contents or take the address of a value type, e.g. 'let mutable x = ...'" +256,tastValueMustBeMutable,"A value must be mutable in order to mutate the contents or take the address of a value type, e.g. 'let mutable x = ...'" 257,tastInvalidMutationOfConstant,"Invalid mutation of a constant expression. Consider copying the expression to a mutable local, e.g. 'let mutable x = ...'." tastValueHasBeenCopied,"The value has been copied to ensure the original is not mutated by this operation or because the copy is implicit when returning a struct from a member and another member is then accessed" 259,tastRecursiveValuesMayNotBeInConstructionOfTuple,"Recursively defined values cannot appear directly as part of the construction of a tuple value within a recursive binding" @@ -161,7 +161,6 @@ FieldNotContainedMutablesDiffer,"The module contains the field\n %s \nbut FieldNotContainedLiteralsDiffer,"The module contains the field\n %s \nbut its signature specifies\n %s \nThe 'literal' modifiers differ" FieldNotContainedTypesDiffer,"The module contains the field\n %s \nbut its signature specifies\n %s \nThe types differ" 331,typrelCannotResolveImplicitGenericInstantiation,"The implicit instantiation of a generic construct at or near this point could not be resolved because it could resolve to multiple unrelated types, e.g. '%s' and '%s'. Consider using type annotations to resolve the ambiguity" -332,typrelCannotResolveAmbiguityInOverloadedOperator,"Could not resolve the ambiguity inherent in the use of the operator '%s' at or near this program point. Consider using type annotations to resolve the ambiguity." 333,typrelCannotResolveAmbiguityInPrintf,"Could not resolve the ambiguity inherent in the use of a 'printf'-style format string" 334,typrelCannotResolveAmbiguityInEnum,"Could not resolve the ambiguity in the use of a generic construct with an 'enum' constraint at or near this position" 335,typrelCannotResolveAmbiguityInDelegate,"Could not resolve the ambiguity in the use of a generic construct with a 'delegate' constraint at or near this position" @@ -1041,8 +1040,8 @@ lexHashBangMustBeFirstInFile,"#! may only appear as the first line at the start 1186,parsInvalidProperty,"Invalid property getter or setter" 1187,parsIndexerPropertyRequiresAtLeastOneArgument,"An indexer property must be given at least one argument" 1188,tastInvalidAddressOfMutableAcrossAssemblyBoundary,"This operation accesses a mutable top-level value defined in another assembly in an unsupported way. The value cannot be accessed through its address. Consider copying the expression to a mutable local, e.g. 'let mutable x = ...', and if necessary assigning the value back after the completion of the operation" -1189,parsNonAdjacentTypars,"Type parameters must be placed directly adjacent to the type name, e.g. \"type C<'T>\", not type \"C <'T>\"" -1190,parsNonAdjacentTyargs,"Type arguments must be placed directly adjacent to the type name, e.g. \"C<'T>\", not \"C <'T>\"" +1189,parsNonAdjacentTypars,"Remove spaces between the type name and type parameter, e.g. \"type C<'T>\", not type \"C <'T>\". Type parameters must be placed directly adjacent to the type name." +1190,parsNonAdjacentTyargs,"Remove spaces between the type name and type parameter, e.g. \"C<'T>\", not \"C <'T>\". Type parameters must be placed directly adjacent to the type name." parsNonAtomicType,"The use of the type syntax 'int C' and 'C ' is not permitted here. Consider adjusting this type to be written in the form 'C'" # 1191,tastUndefinedTyconItemField,"The type %s did not contain the field '%s'" # 1192,tastUndefinedTyconItemUnionCase,"The type %s did not contain the union case '%s'" @@ -1114,7 +1113,7 @@ lexIndentOffForML,"Consider using a file with extension '.ml' or '.mli' instead" fscTooManyErrors,"Exiting - too many errors" 2001,docfileNoXmlSuffix,"The documentation file has no .xml suffix" 2002,fscNoImplementationFiles,"No implementation files specified" -2003,fscBadAssemblyVersion,"An %s specified version '%s', but this value is invalid and has been ignored" +2003,fscBadAssemblyVersion,"The attribute %s specified version '%s', but this value is invalid and has been ignored" 2004,fscTwoResourceManifests,"Conflicting options specified: 'win32manifest' and 'win32res'. Only one of these can be used." 2005,fscQuotationLiteralsStaticLinking,"The code in assembly '%s' makes uses of quotation literals. Static linking may not include components that make use of quotation literals unless all assemblies are compiled with at least F# 4.0." 2006,fscQuotationLiteralsStaticLinking0,"Code in this assembly makes uses of quotation literals. Static linking may not include components that make use of quotation literals unless all assemblies are compiled with at least F# 4.0." @@ -1294,7 +1293,10 @@ descriptionUnavailable,"(description unavailable...)" 3171,tcGeneratedTypesShouldBeInternalOrPrivate,"The provided types generated by this use of a type provider may not be used from other F# assemblies and should be marked internal or private. Consider using 'type internal TypeName = ...' or 'type private TypeName = ...'." 3172,chkGetterAndSetterHaveSamePropertyType,"A property's getter and setter must have the same type. Property '%s' has getter of type '%s' but setter of type '%s'." 3173,tcRuntimeSuppliedMethodCannotBeUsedInUserCode,"Array method '%s' is supplied by the runtime and cannot be directly used in code. For operations with array elements consider using family of GetArray/SetArray functions from LanguagePrimitives.IntrinsicFunctions module." -3174,tcUnionCaseConstructorDoesNotHaveFieldWithGivenName,"Union case/exception '%s' does not have field named '%s'." +3174,tcUnionCaseConstructorDoesNotHaveFieldWithGivenName,"The union case '%s' does not have a field named '%s'." +3174,tcExceptionConstructorDoesNotHaveFieldWithGivenName,"The exception '%s' does not have a field named '%s'." +3174,tcActivePatternsDoNotHaveFields,"Active patterns do not have fields. This syntax is invalid." +3174,tcConstructorDoesNotHaveFieldWithGivenName,"The constructor does not have a field named '%s'." 3175,tcUnionCaseFieldCannotBeUsedMoreThanOnce,"Union case/exception field '%s' cannot be used more than once." 3176,tcFieldNameIsUsedModeThanOnce,"Named field '%s' is used more than once." 3176,tcFieldNameConflictsWithGeneratedNameForAnonymousField,"Named field '%s' conflicts with autogenerated name for anonymous field." @@ -1332,7 +1334,7 @@ tcTupleStructMismatch,"One tuple type is a struct tuple, the other is a referenc 3206,CallerMemberNameIsOverriden,"The CallerMemberNameAttribute applied to parameter '%s' will have no effect. It is overridden by the CallerFilePathAttribute." 3207,tcFixedNotAllowed,"Invalid use of 'fixed'. 'fixed' may only be used in a declaration of the form 'use x = fixed expr' where the expression is an array, the address of a field, the address of an array element or a string'" 3208,tcCouldNotFindOffsetToStringData,"Could not find method System.Runtime.CompilerServices.OffsetToStringData in references when building 'fixed' expression." -3209,chkNoByrefReturnOfLocal,"The address of the variable '%s' cannot be used at this point. A method or function may not return the address of this local value." +3209,chkNoByrefAddressOfLocal,"The address of the variable '%s' or a related expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope." 3210,tcNamedActivePattern,"%s is an active pattern and cannot be treated as a discriminated union case with named fields." 3211,DefaultParameterValueNotAppropriateForArgument,"The default value does not have the same type as the argument. The DefaultParameterValue attribute and any Optional attribute will be ignored. Note: 'null' needs to be annotated with the correct type, e.g. 'DefaultParameterValue(null:obj)'." tcGlobalsSystemTypeNotFound,"The system type '%s' was required but no referenced system DLL contained this type" @@ -1371,8 +1373,9 @@ keywordDescriptionInterface,"Used to declare and implement interfaces." keywordDescriptionInternal,"Used to specify that a member is visible inside an assembly but not outside it." keywordDescriptionLazy,"Used to specify a computation that is to be performed only when a result is needed." keywordDescriptionLet,"Used to associate, or bind, a name to a value or function." -keywordDescriptionLetBang,"Used in asynchronous workflows to bind a name to the result of an asynchronous computation, or, in other computation expressions, used to bind a name to a result, which is of the computation type." +keywordDescriptionLetBang,"Used in computation expressions to bind a name to the result of another computation expression." keywordDescriptionMatch,"Used to branch by comparing a value to a pattern." +keywordDescriptionMatchBang,"Used in computation expressions to pattern match directly over the result of another computation expression." keywordDescriptionMember,"Used to declare a property or method in an object type." keywordDescriptionModule,"Used to associate a name with a group of related types, values, and functions, to logically separate it from other code." keywordDescriptionMutable,"Used to declare a variable, that is, a value that can be changed." @@ -1387,8 +1390,8 @@ keywordDescriptionOverride,"Used to implement a version of an abstract or virtua keywordDescriptionPrivate,"Restricts access to a member to code in the same type or module." keywordDescriptionPublic,"Allows access to a member from outside the type." keywordDescriptionRec,"Used to indicate that a function is recursive." -keywordDescriptionReturn,"Used to indicate a value to provide as the result of a computation expression." -keywordDescriptionReturnBang,"Used to indicate a computation expression that, when evaluated, provides the result of the containing computation expression." +keywordDescriptionReturn,"Used to provide a value for the result of the containing computation expression." +keywordDescriptionReturnBang,"Used to provide a value for the result of the containing computation expression, where that value itself comes from the result another computation expression." keywordDescriptionSelect,"Used in query expressions to specify what fields or columns to extract. Note that this is a contextual keyword, which means that it is not actually a reserved word and it only acts like a keyword in appropriate context." keywordDescriptionStatic,"Used to indicate a method or property that can be called without an instance of a type, or a value member that is shared among all instances of a type." keywordDescriptionStruct,"Used to declare a structure type. Also used in generic parameter constraints. Used for OCaml compatibility in module definitions." @@ -1397,8 +1400,8 @@ keywordDescriptionTo,"Used in for loops to indicate a range." keywordDescriptionTry,"Used to introduce a block of code that might generate an exception. Used together with with or finally." keywordDescriptionType,"Used to declare a class, record, structure, discriminated union, enumeration type, unit of measure, or type abbreviation." keywordDescriptionUpcast,"Used to convert to a type that is higher in the inheritance chain." -keywordDescriptionUse,"Used instead of let for values that require Dispose to be called to free resources." -keywordDescriptionUseBang,"Used instead of let! in asynchronous workflows and other computation expressions for values that require Dispose to be called to free resources." +keywordDescriptionUse,"Used instead of let for values that implement IDisposable"" +keywordDescriptionUseBang,"Used instead of let! in computation expressions for computation expression results that implement IDisposable." keywordDescriptionVal,"Used in a signature to indicate a value, or in a type to declare a member, in limited situations." keywordDescriptionVoid,"Indicates the .NET void type. Used when interoperating with other .NET languages." keywordDescriptionWhen,"Used for Boolean conditions (when guards) on pattern matches and to introduce a constraint clause for a generic type parameter." @@ -1422,3 +1425,22 @@ notAFunctionButMaybeIndexer,"This expression is not a function and cannot be app notAFunctionButMaybeDeclaration,"This value is not a function and cannot be applied. Did you forget to terminate a declaration?" 3218,ArgumentsInSigAndImplMismatch,"The argument names in the signature '%s' and implementation '%s' do not match. The argument name from the signature file will be used. This may cause problems when debugging or profiling." 3219,pickleUnexpectedNonZero,"An error occurred while reading the F# metadata of assembly '%s'. A reserved construct was utilized. You may need to upgrade your F# compiler or use an earlier version of the assembly that doesn't make use of a specific construct." +3220,tcTupleMemberNotNormallyUsed,"This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead." +3221,implicitlyDiscardedInSequenceExpression,"This expression returns a value of type '%s' but is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to use the expression as a value in the sequence then use an explicit 'yield'." +3222,implicitlyDiscardedSequenceInSequenceExpression,"This expression returns a value of type '%s' but is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to use the expression as a value in the sequence then use an explicit 'yield!'." +3223,ilreadFileChanged,"The file '%s' changed on disk unexpectedly, please reload." +3224,writeToReadOnlyByref,"The byref pointer is readonly, so this write is not permitted." +3225,readOnlyAttributeOnStructWithMutableField,"A ReadOnly attribute has been applied to a struct type with a mutable field." +3226,tcByrefReturnImplicitlyDereferenced,"A byref pointer returned by a function or method is implicitly dereferenced as of F# 4.5. To acquire the return value as a pointer, use the address-of operator, e.g. '&f(x)' or '&obj.Method(arg1, arg2)'." +3227,tcByRefLikeNotStruct,"A type annotated with IsByRefLike must also be a struct. Consider adding the [] attribute to the type." +3228,chkNoByrefAddressOfValueFromExpression,"The address of a value returned from the expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope." +3229,chkNoReturnOfLimitedSpan,"The Span or IsByRefLike expression cannot be returned from this function or method, because it is composed using elements that may escape their scope." +3230,chkNoWriteToLimitedSpan,"This value can't be assigned because the target '%s' may refer to non-stack-local memory, while the expression being assigned is assessed to potentially refer to stack-local memory. This is to help prevent pointers to stack-bound memory escaping their scope." +3231,tastValueMustBeLocal,"A value defined in a module must be mutable in order to take its address, e.g. 'let mutable x = ...'" +3232,tcIsReadOnlyNotStruct,"A type annotated with IsReadOnly must also be a struct. Consider adding the [] attribute to the type." +3233,chkStructsMayNotReturnAddressesOfContents,"Struct members cannot return the address of fields of the struct by reference" +3234,chkNoByrefLikeFunctionCall,"The function or method call cannot be used at this point, because one argument that is a byref of a non-stack-local Span or IsByRefLike type is used with another argument that is a stack-local Span or IsByRefLike type. This is to ensure the address of the local value does not escape its scope." +3235,chkNoSpanLikeVariable,"The Span or IsByRefLike variable '%s' cannot be used at this point. This is to ensure the address of the local value does not escape its scope." +3236,chkNoSpanLikeValueFromExpression,"A Span or IsByRefLike value returned from the expression cannot be used at ths point. This is to ensure the address of the local value does not escape its scope." +3237,tastCantTakeAddressOfExpression,"Cannot take the address of the value returned from the expression. Assign the returned value to a let-bound value before taking the address." +3242,tcTypeDoesNotInheritAttribute,"This type does not inherit Attribute, it will not work correctly with other .NET languages." diff --git a/src/fsharp/FSStrings.resx b/src/fsharp/FSStrings.resx index 29df23d2296..5a99d5e9e74 100644 --- a/src/fsharp/FSStrings.resx +++ b/src/fsharp/FSStrings.resx @@ -594,6 +594,9 @@ keyword 'match' + + keyword 'match!' + keyword 'mutable' @@ -886,19 +889,19 @@ This expression is a function value, i.e. is missing arguments. Its type is {0}. - The result of this expression is implicitly ignored. Consider using 'ignore' to discard this value explicitly, e.g. 'expr |> ignore', or 'let' to bind the result to a name, e.g. 'let result = expr'. + The result of this expression has type '{0}' and is implicitly ignored. Consider using 'ignore' to discard this value explicitly, e.g. 'expr |> ignore', or 'let' to bind the result to a name, e.g. 'let result = expr'. - The result of this equality expression is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. + The result of this equality expression has type '{0}' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. - The result of this equality expression is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to set a value to a property, then use the '<-' operator e.g. '{0}.{1} <- expression'. + The result of this equality expression has type '{0}' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to set a value to a property, then use the '<-' operator e.g. '{1}.{2} <- expression'. - The result of this equality expression is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to mutate a value, then mark the value 'mutable' and use the '<-' operator e.g. '{0} <- expression'. + The result of this equality expression has type '{0}' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to mutate a value, then mark the value 'mutable' and use the '<-' operator e.g. '{1} <- expression'. - The result of this equality expression is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to mutate a value, then use the '<-' operator e.g. '{0} <- expression'. + The result of this equality expression has type '{0}' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to mutate a value, then use the '<-' operator e.g. '{1} <- expression'. This recursive use will be checked for initialization-soundness at runtime. This warning is usually harmless, and may be suppressed by using '#nowarn "21"' or '--nowarn:21'. @@ -969,6 +972,9 @@ Unmatched elements will be ignored. + + Enums may take values outside known cases. + This rule will never be matched diff --git a/src/fsharp/FSharp.Build-proto/FSharp.Build-proto.fsproj b/src/fsharp/FSharp.Build-proto/FSharp.Build-proto.fsproj index 8aba433807d..1bae3eda985 100644 --- a/src/fsharp/FSharp.Build-proto/FSharp.Build-proto.fsproj +++ b/src/fsharp/FSharp.Build-proto/FSharp.Build-proto.fsproj @@ -6,12 +6,13 @@ Proto AnyCPU + + Library - FSharp.Build-proto + FSharp.Build true - BUILDING_WITH_LKG;$(DefineConstants) LKG {D8BC791F-C1A9-49DC-9432-0F3090537555} @@ -40,30 +41,24 @@ WriteCodeFragment.fs - - Microsoft.FSharp-proto.targets - Microsoft.FSharp-proto.targets - {BuildSuffix} - -proto - - - Microsoft.Portable.FSharp-proto.targets - Microsoft.Portable.FSharp-proto.targets - {BuildSuffix} - -proto - - - Microsoft.FSharp.NetSdk-proto.props - Microsoft.FSharp.NetSdk-proto.props - {BuildSuffix} - -proto - - - Microsoft.FSharp.NetSdk-proto.targets - Microsoft.FSharp.NetSdk-proto.targets - {BuildSuffix} - -proto - + + Microsoft.FSharp.Targets + + + Microsoft.Portable.FSharp.Targets + + + Microsoft.FSharp.NetSdk.props + + + Microsoft.FSharp.NetSdk.targets + + + Microsoft.FSharp.Overrides.NetSdk.targets + + + Microsoft.VisualFSharp.Type.Providers.Redist + @@ -72,19 +67,41 @@ - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualFSharp.Msbuild.15.0.1.0.1\lib\net45\Microsoft.Build.Framework.dll + + + $(FSharpSourcesRoot)\..\packages\Microsoft.Build.Framework.$(MicrosoftBuildFrameworkPackageVersion)\lib\net46\Microsoft.Build.Framework.dll - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualFSharp.Msbuild.15.0.1.0.1\lib\net45\Microsoft.Build.dll + + $(FSharpSourcesRoot)\..\packages\Microsoft.Build.$(MicrosoftBuildPackageVersion)\lib\net46\Microsoft.Build.dll - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualFSharp.Msbuild.15.0.1.0.1\lib\net45\Microsoft.Build.Utilities.Core.dll + + $(FSharpSourcesRoot)\..\packages\Microsoft.Build.Utilities.Core.$(MicrosoftBuildUtilitiesCorePackageVersion)\lib\net46\Microsoft.Build.Utilities.Core.dll - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualFSharp.Msbuild.15.0.1.0.1\lib\net45\Microsoft.Build.Tasks.Core.dll + + $(FSharpSourcesRoot)\..\packages\Microsoft.Build.Tasks.Core.$(MicrosoftBuildTasksCorePackageVersion)\lib\net46\Microsoft.Build.Tasks.Core.dll + + $(FSharpSourcesRoot)\..\packages\Microsoft.Build.Tasks.Core.$(MicrosoftBuildTasksCorePackageVersion)\lib\net46\Microsoft.Build.Tasks.Core.dll + + + $(FSharpSourcesRoot)\..\packages\System.IO.Compression.$(SystemIoCompressionPackageVersion)\lib\net46\System.IO.Compression.dll + + + + + $(FSharpSourcesRoot)\..\packages\Microsoft.Build.Framework.14.3.0\lib\net45\Microsoft.Build.Framework.dll + + + $(FSharpSourcesRoot)\..\packages\Microsoft.Build.14.3.0\lib\net45\Microsoft.Build.dll + + + $(FSharpSourcesRoot)\..\packages\Microsoft.Build.Utilities.Core.14.3.0\lib\net45\Microsoft.Build.Utilities.Core.dll + + + $(FSharpSourcesRoot)\..\packages\Microsoft.Build.Tasks.Core.14.3.0\lib\net45\Microsoft.Build.Tasks.Core.dll + + + {DED3BBD7-53F4-428A-8C9F-27968E768605} FSharp.Core diff --git a/src/fsharp/FSharp.Build.UnitTests/FSharp.Build.UnitTests.fsproj b/src/fsharp/FSharp.Build.UnitTests/FSharp.Build.UnitTests.fsproj deleted file mode 100644 index b68ab16911c..00000000000 --- a/src/fsharp/FSharp.Build.UnitTests/FSharp.Build.UnitTests.fsproj +++ /dev/null @@ -1,77 +0,0 @@ - - - - - $(MSBuildProjectDirectory)\..\.. - {400FAB03-786E-40CC-85A8-04B0C2869B14} - true - false - - - - Debug - AnyCPU - 2.0 - true - true - Library - false - FSharp.Build.UnitTests - netcore - - - $(DefineConstants);$(TargetDotnetProfile.ToLower()) - - - true - false - $(DefineConstants);DEBUG;TRACE - prompt - 3 - - - true - $(DefineConstants);TRACE - prompt - 3 - - - - true - True - $(NUnitLibDir)\nunit.framework.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualFSharp.Msbuild.15.0.1.0.1\lib\net45\Microsoft.Build.Framework.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualFSharp.Msbuild.15.0.1.0.1\lib\net45\Microsoft.Build.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualFSharp.Msbuild.15.0.1.0.1\lib\net45\Microsoft.Build.Utilities.Core.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualFSharp.Msbuild.15.0.1.0.1\lib\net45\Microsoft.Build.Tasks.Core.dll - - - - - {702A7979-BCF9-4C41-853E-3ADFC9897890} - FSharp.Build - - - {DED3BBD7-53F4-428A-8C9F-27968E768605} - FSharp.Core - - - - - - - - - - - - - diff --git a/src/fsharp/FSharp.Build.UnitTests/WriteCodeFragmentTests.fs b/src/fsharp/FSharp.Build.UnitTests/WriteCodeFragmentTests.fs deleted file mode 100644 index 70800400d27..00000000000 --- a/src/fsharp/FSharp.Build.UnitTests/WriteCodeFragmentTests.fs +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. - -namespace FSharp.Build.UnitTests - -open Microsoft.Build.Framework -open Microsoft.Build.Utilities -open Microsoft.FSharp.Build -open NUnit.Framework - -[] -type WriteCodeFragmentTests()= - - let verifyAttribute (attributeName:string) (parameters:(string*string) list) (expectedAttributeText:string) = - let taskItem = TaskItem(attributeName) - parameters |> List.iter (fun (key, value) -> taskItem.SetMetadata(key, value)) - let actualAttributeText = WriteCodeFragment.GenerateAttribute (taskItem :> ITaskItem) - let fullExpectedAttributeText = "[]" - Assert.AreEqual(fullExpectedAttributeText, actualAttributeText) - - [] - member this.``No parameters``() = - verifyAttribute "SomeAttribute" [] "SomeAttribute()" - - [] - member this.``Skipped and out of order positional parameters``() = - verifyAttribute "SomeAttribute" [("_Parameter3", "3"); ("_Parameter5", "5"); ("_Parameter2", "2")] "SomeAttribute(null, \"2\", \"3\", null, \"5\")" - - [] - member this.``Named parameters``() = - verifyAttribute "SomeAttribute" [("One", "1"); ("Two", "2")] "SomeAttribute(One = \"1\", Two = \"2\")" - - [] - member this.``Named and positional parameters``() = - verifyAttribute "SomeAttribute" [("One", "1"); ("_Parameter2", "2.2"); ("Two", "2")] "SomeAttribute(null, \"2.2\", One = \"1\", Two = \"2\")" - - [] - member this.``Escaped string parameters``() = - verifyAttribute "SomeAttribute" [("_Parameter1", "\"uno\"")] "SomeAttribute(\"\\\"uno\\\"\")" - // this should look like: SomeAttribute("\"uno\"") diff --git a/src/fsharp/FSharp.Build.UnitTests/project.json b/src/fsharp/FSharp.Build.UnitTests/project.json deleted file mode 100644 index 557b06140e2..00000000000 --- a/src/fsharp/FSharp.Build.UnitTests/project.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "version": "1.0.0-*", - "name": "FSharp.Build.UnitTests", - "buildOptions": { - "debugType": "portable", - "emitEntryPoint": true - }, - "dependencies": { - "nunit": "3.5.0", - "nunitlite": "3.5.0", - "Microsoft.Build": "15.1.548", - "Microsoft.Build.Framework": "15.1.548", - "Microsoft.Build.Tasks.Core": "15.1.548", - "Microsoft.Build.Utilities.Core": "15.1.548" - }, - "runtimes": { - "win7-x86": {}, - "win7-x64": {}, - "osx.10.11-x64": {}, - "ubuntu.14.04-x64": {} - }, - "frameworks": { - "netcoreapp1.0": { - "dependencies": { - "Microsoft.NETCore.App": { - "type": "platform", - "version": "1.0.1" - } - }, - "imports": [ "netstandard1.1", "netstandard1.6", "portable-net45+win8+wp8+wpa81" ] - } - } -} diff --git a/src/fsharp/FSharp.Build/FSharp.Build.fsproj b/src/fsharp/FSharp.Build/FSharp.Build.fsproj index 405deb589ad..0046e733380 100644 --- a/src/fsharp/FSharp.Build/FSharp.Build.fsproj +++ b/src/fsharp/FSharp.Build/FSharp.Build.fsproj @@ -3,8 +3,12 @@ $(MSBuildProjectDirectory)\..\.. + FSharp + true + + Debug AnyCPU @@ -13,6 +17,7 @@ true {702A7979-BCF9-4C41-853E-3ADFC9897890} + $(FSharpSourcesRoot)\..\loc\lcl\{Lang}\$(AssemblyName).dll.lcl @@ -20,9 +25,8 @@ false false - + - @@ -31,46 +35,54 @@ - - Microsoft.FSharp.Targets - {BuildSuffix} - - - - Microsoft.Portable.FSharp.Targets - {BuildSuffix} - - - - Microsoft.FSharp.NetSdk.props - {BuildSuffix} - - - - Microsoft.FSharp.NetSdk.targets - {BuildSuffix} - - + + + + + - + - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualFSharp.Msbuild.15.0.1.0.1\lib\net45\Microsoft.Build.Framework.dll + + + $(FSharpSourcesRoot)\..\packages\Microsoft.Build.Framework.$(MicrosoftBuildFrameworkPackageVersion)\lib\net46\Microsoft.Build.Framework.dll + + + $(FSharpSourcesRoot)\..\packages\Microsoft.Build.$(MicrosoftBuildPackageVersion)\lib\net46\Microsoft.Build.dll + + + $(FSharpSourcesRoot)\..\packages\Microsoft.Build.Utilities.Core.$(MicrosoftBuildUtilitiesCorePackageVersion)\lib\net46\Microsoft.Build.Utilities.Core.dll + + + $(FSharpSourcesRoot)\..\packages\Microsoft.Build.Tasks.Core.$(MicrosoftBuildTasksCorePackageVersion)\lib\net46\Microsoft.Build.Tasks.Core.dll + + + $(FSharpSourcesRoot)\..\packages\Microsoft.Build.Tasks.Core.$(MicrosoftBuildTasksCorePackageVersion)\lib\net46\Microsoft.Build.Tasks.Core.dll + + + $(FSharpSourcesRoot)\..\packages\System.IO.Compression.$(SystemIoCompressionPackageVersion)\lib\net46\System.IO.Compression.dll + + + $(FSharpSourcesRoot)\..\packages\Microsoft.VisualFSharp.Type.Providers.Redist.$(MicrosoftVisualFSharpTypeProvidersRedistPackageVersion)\content\4.3.0.0\FSharp.Data.TypeProviders.dll + + + + + $(FSharpSourcesRoot)\..\packages\Microsoft.Build.Framework.14.3.0\lib\net45\Microsoft.Build.Framework.dll - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualFSharp.Msbuild.15.0.1.0.1\lib\net45\Microsoft.Build.dll + + $(FSharpSourcesRoot)\..\packages\Microsoft.Build.14.3.0\lib\net45\Microsoft.Build.dll - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualFSharp.Msbuild.15.0.1.0.1\lib\net45\Microsoft.Build.Utilities.Core.dll + + $(FSharpSourcesRoot)\..\packages\Microsoft.Build.Utilities.Core.14.3.0\lib\net45\Microsoft.Build.Utilities.Core.dll - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualFSharp.Msbuild.15.0.1.0.1\lib\net45\Microsoft.Build.Tasks.Core.dll + + $(FSharpSourcesRoot)\..\packages\Microsoft.Build.Tasks.Core.14.3.0\lib\net45\Microsoft.Build.Tasks.Core.dll @@ -80,14 +92,4 @@ - - - - - - Microsoft - StrongName - - - diff --git a/src/fsharp/FSharp.Build/FSharpEmbedResourceText.fs b/src/fsharp/FSharp.Build/FSharpEmbedResourceText.fs index 3e2e58eddb5..8be55fda907 100644 --- a/src/fsharp/FSharp.Build/FSharpEmbedResourceText.fs +++ b/src/fsharp/FSharp.Build/FSharpEmbedResourceText.fs @@ -239,14 +239,14 @@ open Printf // BEGIN BOILERPLATE static let getCurrentAssembly () = - #if DNXCORE50 || NETSTANDARD1_5 || NETSTANDARD1_6 || NETCOREAPP1_0 + #if FX_RESHAPED_REFLECTION typeof.GetTypeInfo().Assembly #else System.Reflection.Assembly.GetExecutingAssembly() #endif static let getTypeInfo (t: System.Type) = - #if DNXCORE50 || NETSTANDARD1_5 || NETSTANDARD1_6 || NETCOREAPP1_0 + #if FX_RESHAPED_REFLECTION t.GetTypeInfo() #else t @@ -348,14 +348,16 @@ open Printf let outFilename = Path.Combine(_outputPath, justfilename + ".fs") let outXmlFilename = Path.Combine(_outputPath, justfilename + ".resx") - if File.Exists(outFilename) && - File.Exists(outXmlFilename) && - File.Exists(filename) && - File.GetLastWriteTimeUtc(filename) <= File.GetLastWriteTimeUtc(outFilename) && - File.GetLastWriteTimeUtc(filename) <= File.GetLastWriteTimeUtc(outXmlFilename) then - printMessage (sprintf "Skipping generation of %s and %s since up-to-date" outFilename outXmlFilename) - Some (outFilename, outXmlFilename) + let condition1 = File.Exists(outFilename) + let condition2 = condition1 && File.Exists(outXmlFilename) + let condition3 = condition2 && File.Exists(filename) + let condition4 = condition3 && (File.GetLastWriteTimeUtc(filename) <= File.GetLastWriteTimeUtc(outFilename)) + let condition5 = condition4 && (File.GetLastWriteTimeUtc(filename) <= File.GetLastWriteTimeUtc(outXmlFilename) ) + if condition5 then + printMessage (sprintf "Skipping generation of %s and %s from %s since up-to-date" outFilename outXmlFilename filename) + Some (filename, outFilename, outXmlFilename) else + printMessage (sprintf "Generating %s and %s from %s, because condition %d is false, see FSharpEmbedResourceText.fs in the F# source" outFilename outXmlFilename filename (if not condition1 then 1 elif not condition2 then 2 elif not condition3 then 3 elif not condition4 then 4 else 5) ) printMessage (sprintf "Reading %s" filename) let lines = File.ReadAllLines(filename) @@ -450,7 +452,7 @@ open Printf use outXmlStream = File.Create outXmlFilename xd.Save outXmlStream printMessage (sprintf "Done %s" outFilename) - Some (outFilename, outXmlFilename) + Some (filename, outFilename, outXmlFilename) with e -> PrintErr(filename, 0, sprintf "An exception occurred when processing '%s'\n%s" filename (e.ToString())) None @@ -487,7 +489,7 @@ open Printf |> Array.choose (fun item -> generateResxAndSource item.ItemSpec) let generatedSource, generatedResx = - [| for (source, resx) in generatedFiles do + [| for (textFile, source, resx) in generatedFiles do let sourceItem = let item = TaskItem(source) item.SetMetadata("AutoGen", "true") @@ -497,6 +499,7 @@ open Printf let resxItem = let item = TaskItem(resx) item.SetMetadata("ManifestResourceName", Path.GetFileNameWithoutExtension(resx)) + item.SetMetadata("SourceDocumentPath", textFile) item :> ITaskItem yield (sourceItem, resxItem) |] |> Array.unzip diff --git a/src/fsharp/FSharp.Build/Fsc.fs b/src/fsharp/FSharp.Build/Fsc.fs index f397c50914c..95f3ec2f98c 100644 --- a/src/fsharp/FSharp.Build/Fsc.fs +++ b/src/fsharp/FSharp.Build/Fsc.fs @@ -38,7 +38,7 @@ type public Fsc () as this = let mutable documentationFile : string = null let mutable dotnetFscCompilerPath : string = null let mutable embedAllSources = false - let mutable embed : string = null + let mutable embeddedFiles : ITaskItem[] = [||] let mutable generateInterfaceFile : string = null let mutable highEntropyVA : bool = false let mutable keyFile : string = null @@ -73,6 +73,7 @@ type public Fsc () as this = let mutable treatWarningsAsErrors : bool = false let mutable useStandardResourceNames : bool = false let mutable warningsAsErrors : string = null + let mutable warningsNotAsErrors : string = null let mutable versionFile : string = null let mutable warningLevel : string = null let mutable win32res : string = null @@ -105,7 +106,9 @@ type public Fsc () as this = | _ -> null) if embedAllSources then builder.AppendSwitch("--embed+") - builder.AppendSwitchIfNotNull("--embed:", embed) + if embeddedFiles <> null then + for item in embeddedFiles do + builder.AppendSwitchIfNotNull("--embed:", item.ItemSpec) builder.AppendSwitchIfNotNull("--sourcelink:", sourceLink) // NoFramework if noFramework then @@ -195,6 +198,11 @@ type public Fsc () as this = builder.AppendSwitchIfNotNull("--warnaserror:", warningsAsErrorsArray, ",") + // WarningsNotAsErrors + match warningsNotAsErrors with + | null -> () + | _ -> builder.AppendSwitchIfNotNull("--warnaserror-:", warningsNotAsErrors.Split([|' '; ';'; ','|], StringSplitOptions.RemoveEmptyEntries), ",") + // Win32ResourceFile builder.AppendSwitchIfNotNull("--win32res:", win32res) @@ -284,9 +292,9 @@ type public Fsc () as this = with get() = embedAllSources and set(s) = embedAllSources <- s - member fsc.Embed - with get() = embed - and set(e) = embed <- e + member fsc.EmbeddedFiles + with get() = embeddedFiles + and set(e) = embeddedFiles <- e // --generate-interface-file : // Print the inferred interface of the @@ -448,6 +456,10 @@ type public Fsc () as this = with get() = warningsAsErrors and set(s) = warningsAsErrors <- s + member fsc.WarningsNotAsErrors + with get() = warningsNotAsErrors + and set(s) = warningsNotAsErrors <- s + member fsc.VisualStudioStyleErrors with get() = vserrors and set(p) = vserrors <- p diff --git a/src/fsharp/FSharp.Build/InternalsVisibleTo.fs b/src/fsharp/FSharp.Build/InternalsVisibleTo.fs index d4b4322e152..bb1fe45b30a 100644 --- a/src/fsharp/FSharp.Build/InternalsVisibleTo.fs +++ b/src/fsharp/FSharp.Build/InternalsVisibleTo.fs @@ -2,5 +2,5 @@ namespace Microsoft.FSharp -[] +[] do() diff --git a/src/fsharp/FSharp.Build/Microsoft.FSharp.NetSdk.props b/src/fsharp/FSharp.Build/Microsoft.FSharp.NetSdk.props index fdc2b69ab82..97302e0bc96 100644 --- a/src/fsharp/FSharp.Build/Microsoft.FSharp.NetSdk.props +++ b/src/fsharp/FSharp.Build/Microsoft.FSharp.NetSdk.props @@ -37,21 +37,22 @@ WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and {F2A71F9B-5D33-465A-A702-920D77279786} false - true false 3 - + 3239;$(WarningsAsErrors) true true false + false false true + true @@ -63,4 +64,36 @@ WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and $(MSBuildThisFileDirectory) RunFsc.sh + + + + + + + 4.4.0 + 4.5.2 + $(DefaultValueTuplePackageVersion) + $(DefaultFSharpCorePackageVersion) + + + + + + + + + + diff --git a/src/fsharp/FSharp.Build/Microsoft.FSharp.NetSdk.targets b/src/fsharp/FSharp.Build/Microsoft.FSharp.NetSdk.targets index ceb5be04943..d3e11d007b6 100644 --- a/src/fsharp/FSharp.Build/Microsoft.FSharp.NetSdk.targets +++ b/src/fsharp/FSharp.Build/Microsoft.FSharp.NetSdk.targets @@ -35,11 +35,6 @@ WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and <_ExplicitReference Include="$(FrameworkPathOverride)\mscorlib.dll" Condition=" '$(NoStdLib)' != 'true' " /> - - <_TargetFrameworkVersionWithoutV>$(TargetFrameworkVersion) - <_TargetFrameworkVersionWithoutV Condition="$(TargetFrameworkVersion.StartsWith('v'))">$(TargetFrameworkVersion.Substring(1)) - - mscorlib netcore @@ -53,24 +48,31 @@ WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and $(MSBuildProjectFullPath) - - 4.2.* - - - - <_FrameworkNeedsValueTupleReference Condition=" ('$(TargetFrameworkIdentifier)' == '.NETStandard' or '$(TargetFrameworkIdentifier)' == '.NETCoreApp') and !('$(_TargetFrameworkVersionWithoutV)' >= '2.0') ">true - <_FrameworkNeedsValueTupleReference Condition=" '$(TargetFrameworkIdentifier)' == '.NETFramework' and - ('$(_TargetFrameworkVersionWithoutV)' == '4.0' or - '$(_TargetFrameworkVersionWithoutV)' == '4.5' or - '$(_TargetFrameworkVersionWithoutV)' == '4.6' or - '$(_TargetFrameworkVersionWithoutV)' == '4.6.1' or - '$(_TargetFrameworkVersionWithoutV)' == '4.6.2' or - '$(_TargetFrameworkVersionWithoutV)' == '4.7') ">true + + $(TargetsForTfmSpecificContentInPackage);PackageFSharpDesignTimeTools - - - - + + + fsharp41 + tools + + + + + + + <_ResolvedProjectOutputFiles + Include="%(_ResolvedProjectReferencePaths.RootDir)%(_ResolvedProjectReferencePaths.Directory)/**/*" + Exclude="%(_ResolvedProjectReferencePaths.RootDir)%(_ResolvedProjectReferencePaths.Directory)/**/FSharp.Core.dll;%(_ResolvedProjectReferencePaths.RootDir)%(_ResolvedProjectReferencePaths.Directory)/**/System.ValueTuple.dll" + Condition="'%(_ResolvedProjectReferencePaths.IsFSharpDesignTimeProvider)' == 'true'"> + %(_ResolvedProjectReferencePaths.NearestTargetFramework) + + + + $(FSharpToolsDirectory)/$(FSharpDesignTimeProtocol)/%(_ResolvedProjectOutputFiles.NearestTargetFramework)/%(_ResolvedProjectOutputFiles.FileName)%(_ResolvedProjectOutputFiles.Extension) + + + diff --git a/src/fsharp/FSharp.Build/Microsoft.FSharp.Overrides.NetSdk.targets b/src/fsharp/FSharp.Build/Microsoft.FSharp.Overrides.NetSdk.targets new file mode 100644 index 00000000000..ce837dbf213 --- /dev/null +++ b/src/fsharp/FSharp.Build/Microsoft.FSharp.Overrides.NetSdk.targets @@ -0,0 +1,36 @@ + + + + + + + + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) + + + + + + + + + + + + + + + diff --git a/src/fsharp/FSharp.Build/Microsoft.FSharp.Targets b/src/fsharp/FSharp.Build/Microsoft.FSharp.Targets index 4274f54af2a..8808c10ebc2 100644 --- a/src/fsharp/FSharp.Build/Microsoft.FSharp.Targets +++ b/src/fsharp/FSharp.Build/Microsoft.FSharp.Targets @@ -19,13 +19,15 @@ this file. $(MSBuildAllProjects);$(MSBuildThisFileFullPath) + FSharp.Build.dll - - - - - + + + + + + true @@ -258,6 +260,10 @@ this file. Include="@(_CoreCompileResourceInputs);@(CompiledLicenseFile);@(AdditionalEmbeddedResource)" /> + + + + - - + - + + + + <_OldRootSdkLocation>$(MSBuildProgramFiles32)\Reference Assemblies\Microsoft\FSharp + + $(VsInstallRoot)\Common7\IDE\CommonExtensions\Microsoft\FSharpSdk + + <_CoreRelativeSuffix>.NETCore\$(TargetFSharpCoreVersion)\FSharp.Core.dll + <_FrameworkRelativeSuffix>.NETFramework\v4.0\$(TargetFSharpCoreVersion)\FSharp.Core.dll + <_PortableRelativeSuffix>.NETPortable\$(TargetFSharpCoreVersion)\FSharp.Core.dll + + + <_OldCoreSdkPath>$(_OldRootSdkLocation)\$(_CoreRelativeSuffix) + <_NewCoreSdkPath>$(NewFSharpSdkLocation)\$(_CoreRelativeSuffix) + + + <_OldFrameworkSdkPath>$(_OldRootSdkLocation)\$(_FrameworkRelativeSuffix) + <_NewFrameworkSdkPath>$(NewFSharpSdkLocation)\$(_FrameworkRelativeSuffix) + + + <_OldPortableSdkPath>$(_OldRootSdkLocation)\$(_PortableRelativeSuffix) + <_NewPortableSdkPath>$(NewFSharpSdkLocation)\$(_PortableRelativeSuffix) + + + + + + $(_NewCoreSdkPath) + + + + + $(_NewFrameworkSdkPath) + + + + + $(_NewPortableSdkPath) + + + + + + + <_OldRefAssemTPLocation>$(MSBuildProgramFiles32)\Reference Assemblies\Microsoft\FSharp\.NETFramework\v4.0\4.3.0.0\Type Providers\FSharp.Data.TypeProviders.dll + <_OldSdkTPLocationPrefix>$(MSBuildProgramFiles32)\Microsoft SDKs\F# + <_OldSdkTPLocationSuffix>Framework\v4.0\FSharp.Data.TypeProviders.dll + + $(MSBuildThisFileDirectory) + $(NewFSharpCompilerLocation)\ + + + + + + + + + + $(NewFSharpCompilerLocation)FSharp.Data.TypeProviders.dll + + + + + + $(NewFSharpCompilerLocation)FSharp.Data.TypeProviders.dll + + + + + + diff --git a/src/fsharp/FSharp.Build/Microsoft.Portable.FSharp.Targets b/src/fsharp/FSharp.Build/Microsoft.Portable.FSharp.Targets index d0a3df1cbce..54491a3c2a5 100644 --- a/src/fsharp/FSharp.Build/Microsoft.Portable.FSharp.Targets +++ b/src/fsharp/FSharp.Build/Microsoft.Portable.FSharp.Targets @@ -15,8 +15,8 @@ - - + + diff --git a/src/fsharp/FSharp.Build/WriteCodeFragment.fs b/src/fsharp/FSharp.Build/WriteCodeFragment.fs index ee8eaab2830..a36193da547 100644 --- a/src/fsharp/FSharp.Build/WriteCodeFragment.fs +++ b/src/fsharp/FSharp.Build/WriteCodeFragment.fs @@ -33,7 +33,7 @@ type WriteCodeFragment() = | _ -> sb.Append(c)) (StringBuilder().Append("\"")) sb.Append("\"").ToString() - static member GenerateAttribute (item:ITaskItem) = + static member GenerateAttribute (item:ITaskItem, language:string) = let attributeName = item.ItemSpec let args = // mimicking the behavior from https://github.com/Microsoft/msbuild/blob/70ce7e9ccb891b63f0859f1f7f0b955693ed3742/src/Tasks/WriteCodeFragment.cs#L355-L415 @@ -73,7 +73,11 @@ type WriteCodeFragment() = | (0, _) -> combinedNamedParameters // only named arguments | (_, 0) -> combinedOrderedParameters // only positional arguments | (_, _) -> combinedOrderedParameters + ", " + combinedNamedParameters // both positional and named arguments - sprintf "[]" attributeName args + match language.ToLowerInvariant() with + | "f#" -> sprintf "[]" attributeName args + | "c#" -> sprintf "[assembly: %s(%s)]" attributeName args + | "vb" -> sprintf "" attributeName args + | _ -> failwith "Language name must be one of F#, C# or VB" // adding this property to maintain API equivalence with the MSBuild task member this.Language @@ -93,37 +97,48 @@ type WriteCodeFragment() = with get() = _outputFile and set(value) = _outputFile <- value + interface ITask with member this.BuildEngine with get() = _buildEngine and set(value) = _buildEngine <- value + member this.HostObject with get() = _hostObject and set(value) = _hostObject <- value + member this.Execute() = try if isNull _outputFile && isNull _outputDirectory then failwith "Output location must be specified" - if _language.ToLowerInvariant() <> "f#" then failwith "Language name must be F#" - let boilerplate = @"// + let boilerplate = + match _language.ToLowerInvariant() with + | "f#" -> "// \n// Generated by the FSharp WriteCodeFragment class.\n// \nnamespace FSharp\n\nopen System\nopen System.Reflection\n" + | "c#" -> "// \n// Generated by the FSharp WriteCodeFragment class.\n// \n\nusing System;\nusing System.Reflection;" + | "vb" -> "'------------------------------------------------------------------------------\n' \n' Generated by the FSharp WriteCodeFragment class.\n' \n'------------------------------------------------------------------------------\n\nOption Strict Off\nOption Explicit On\n\nImports System\nImports System.Reflection" + | _ -> failwith "Language name must be one of F#, C# or VB" -namespace FSharp - -open System -open System.Reflection" let sb = StringBuilder().AppendLine(boilerplate).AppendLine() - let code = Array.fold (fun (sb:StringBuilder) (item:ITaskItem) -> sb.AppendLine(WriteCodeFragment.GenerateAttribute item)) sb _assemblyAttributes - code.AppendLine().AppendLine("do()") |> ignore + let code = Array.fold (fun (sb:StringBuilder) (item:ITaskItem) -> sb.AppendLine(WriteCodeFragment.GenerateAttribute (item, _language.ToLowerInvariant()))) sb _assemblyAttributes + + if _language.ToLowerInvariant() = "f#" then code.AppendLine("do()") |> ignore + let fileName = _outputFile.ItemSpec + let outputFileItem = - if not (isNull _outputFile) && not (isNull _outputDirectory) && not (Path.IsPathRooted(_outputFile.ItemSpec)) then - TaskItem(Path.Combine(_outputDirectory.ItemSpec, _outputFile.ItemSpec)) :> ITaskItem + if not (isNull _outputFile) && not (isNull _outputDirectory) && not (Path.IsPathRooted(fileName)) then + TaskItem(Path.Combine(_outputDirectory.ItemSpec, fileName)) :> ITaskItem elif isNull _outputFile then let tempFile = Path.Combine(Path.GetTempPath(), sprintf "tmp%s.fs" (Guid.NewGuid().ToString("N"))) TaskItem(tempFile) :> ITaskItem else _outputFile - File.WriteAllText(_outputFile.ItemSpec, code.ToString()) + + let codeText = code.ToString() + let alreadyExists = (try File.Exists fileName && File.ReadAllText(fileName) = codeText with _ -> false) + if not alreadyExists then + File.WriteAllText(fileName, codeText) _outputFile <- outputFileItem true + with e -> printf "Error writing code fragment: %s" (e.ToString()) false diff --git a/src/fsharp/FSharp.Build/project.json b/src/fsharp/FSharp.Build/project.json index e9b92c192f4..849f4f7f42f 100644 --- a/src/fsharp/FSharp.Build/project.json +++ b/src/fsharp/FSharp.Build/project.json @@ -1,9 +1,9 @@ { "dependencies": { - "Microsoft.Build": "15.1.548", - "Microsoft.Build.Framework": "15.1.548", - "Microsoft.Build.Tasks.Core": "15.1.548", - "Microsoft.Build.Utilities.Core": "15.1.548", + "Microsoft.Build": "15.6.85", + "Microsoft.Build.Framework": "15.6.85", + "Microsoft.Build.Tasks.Core": "15.6.85", + "Microsoft.Build.Utilities.Core": "15.6.85", "Microsoft.NETCore.Platforms": "1.1.0", "Microsoft.Win32.Registry": { "version": "4.3.0", diff --git a/src/fsharp/FSharp.Build/xlf/FSBuild.txt.cs.xlf b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.cs.xlf new file mode 100644 index 00000000000..d4e4bac23e6 --- /dev/null +++ b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.cs.xlf @@ -0,0 +1,12 @@ + + + + + + ToolPath is unknown; specify the path to fsc.exe as the ToolPath property. + Parametr ToolPath je neznámý; zadejte cestu k souboru fsc.exe jako vlastnost ToolPath. + + + + + \ No newline at end of file diff --git a/src/fsharp/FSharp.Build/xlf/FSBuild.txt.de.xlf b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.de.xlf new file mode 100644 index 00000000000..604ba262f77 --- /dev/null +++ b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.de.xlf @@ -0,0 +1,12 @@ + + + + + + ToolPath is unknown; specify the path to fsc.exe as the ToolPath property. + ToolPath ist unbekannt. Geben Sie den Pfad zu "fsc.exe" als ToolPath-Eigenschaft an. + + + + + \ No newline at end of file diff --git a/src/fsharp/FSharp.Build/xlf/FSBuild.txt.en.xlf b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.en.xlf new file mode 100644 index 00000000000..1cd033f6d2c --- /dev/null +++ b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.en.xlf @@ -0,0 +1,12 @@ + + + + + + ToolPath is unknown; specify the path to fsc.exe as the ToolPath property. + ToolPath is unknown; specify the path to fsc.exe as the ToolPath property. + + + + + \ No newline at end of file diff --git a/src/fsharp/FSharp.Build/xlf/FSBuild.txt.es.xlf b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.es.xlf new file mode 100644 index 00000000000..47f7b770a59 --- /dev/null +++ b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.es.xlf @@ -0,0 +1,12 @@ + + + + + + ToolPath is unknown; specify the path to fsc.exe as the ToolPath property. + ToolPath desconocido; especifique la ruta de acceso del archivo fsc.exe como propiedad ToolPath. + + + + + \ No newline at end of file diff --git a/src/fsharp/FSharp.Build/xlf/FSBuild.txt.fr.xlf b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.fr.xlf new file mode 100644 index 00000000000..2d08c442466 --- /dev/null +++ b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.fr.xlf @@ -0,0 +1,12 @@ + + + + + + ToolPath is unknown; specify the path to fsc.exe as the ToolPath property. + ToolPath inconnu ; spécifiez le chemin d'accès de fsc.exe en tant que propriété ToolPath. + + + + + \ No newline at end of file diff --git a/src/fsharp/FSharp.Build/xlf/FSBuild.txt.it.xlf b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.it.xlf new file mode 100644 index 00000000000..f4df6a25059 --- /dev/null +++ b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.it.xlf @@ -0,0 +1,12 @@ + + + + + + ToolPath is unknown; specify the path to fsc.exe as the ToolPath property. + ToolPath sconosciuto. Specificare il percorso di fsc.exe come proprietà ToolPath. + + + + + \ No newline at end of file diff --git a/src/fsharp/FSharp.Build/xlf/FSBuild.txt.ja.xlf b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.ja.xlf new file mode 100644 index 00000000000..6c430cb50b0 --- /dev/null +++ b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.ja.xlf @@ -0,0 +1,12 @@ + + + + + + ToolPath is unknown; specify the path to fsc.exe as the ToolPath property. + ToolPath が不明です。fsc.exe へのパスを ToolPath プロパティとして指定してください。 + + + + + \ No newline at end of file diff --git a/src/fsharp/FSharp.Build/xlf/FSBuild.txt.ko.xlf b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.ko.xlf new file mode 100644 index 00000000000..7b689385a7e --- /dev/null +++ b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.ko.xlf @@ -0,0 +1,12 @@ + + + + + + ToolPath is unknown; specify the path to fsc.exe as the ToolPath property. + ToolPath를 알 수 없습니다. fsc.exe의 경로를 ToolPath 속성으로 지정하세요. + + + + + \ No newline at end of file diff --git a/src/fsharp/FSharp.Build/xlf/FSBuild.txt.pl.xlf b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.pl.xlf new file mode 100644 index 00000000000..d3a0e4f9761 --- /dev/null +++ b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.pl.xlf @@ -0,0 +1,12 @@ + + + + + + ToolPath is unknown; specify the path to fsc.exe as the ToolPath property. + Właściwość ToolPath jest nieznana. Określ ścieżkę do pliku fsc.exe jako właściwość ToolPath. + + + + + \ No newline at end of file diff --git a/src/fsharp/FSharp.Build/xlf/FSBuild.txt.pt-BR.xlf b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.pt-BR.xlf new file mode 100644 index 00000000000..4bdb28cd9f7 --- /dev/null +++ b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.pt-BR.xlf @@ -0,0 +1,12 @@ + + + + + + ToolPath is unknown; specify the path to fsc.exe as the ToolPath property. + ToolPath é desconhecido; especifique o caminho para fsc.exe como propriedade de ToolPath. + + + + + \ No newline at end of file diff --git a/src/fsharp/FSharp.Build/xlf/FSBuild.txt.ru.xlf b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.ru.xlf new file mode 100644 index 00000000000..ed2d4a5d09f --- /dev/null +++ b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.ru.xlf @@ -0,0 +1,12 @@ + + + + + + ToolPath is unknown; specify the path to fsc.exe as the ToolPath property. + Неизвестное значение свойства ToolPath; укажите в качестве значения свойства ToolPath путь к файлу fsc.exe. + + + + + \ No newline at end of file diff --git a/src/fsharp/FSharp.Build/xlf/FSBuild.txt.tr.xlf b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.tr.xlf new file mode 100644 index 00000000000..b2332af2b82 --- /dev/null +++ b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.tr.xlf @@ -0,0 +1,12 @@ + + + + + + ToolPath is unknown; specify the path to fsc.exe as the ToolPath property. + ToolPath bilinmiyor; fsc.exe yolunu ToolPath özelliği olarak belirtin. + + + + + \ No newline at end of file diff --git a/src/fsharp/FSharp.Build/xlf/FSBuild.txt.zh-Hans.xlf b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.zh-Hans.xlf new file mode 100644 index 00000000000..d224ab41b5b --- /dev/null +++ b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.zh-Hans.xlf @@ -0,0 +1,12 @@ + + + + + + ToolPath is unknown; specify the path to fsc.exe as the ToolPath property. + ToolPath 未知;将 fsc.exe 的路径指定为 ToolPath 属性。 + + + + + \ No newline at end of file diff --git a/src/fsharp/FSharp.Build/xlf/FSBuild.txt.zh-Hant.xlf b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.zh-Hant.xlf new file mode 100644 index 00000000000..94447e27905 --- /dev/null +++ b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.zh-Hant.xlf @@ -0,0 +1,12 @@ + + + + + + ToolPath is unknown; specify the path to fsc.exe as the ToolPath property. + 未知的 ToolPath,請指定 fsc.exe 的路徑做為 ToolPath 屬性。 + + + + + \ No newline at end of file diff --git a/src/fsharp/FSharp.Compiler.Interactive.Settings/FSharp.Compiler.Interactive.Settings.fsproj b/src/fsharp/FSharp.Compiler.Interactive.Settings/FSharp.Compiler.Interactive.Settings.fsproj index 554547215cd..5e0d312c22a 100644 --- a/src/fsharp/FSharp.Compiler.Interactive.Settings/FSharp.Compiler.Interactive.Settings.fsproj +++ b/src/fsharp/FSharp.Compiler.Interactive.Settings/FSharp.Compiler.Interactive.Settings.fsproj @@ -3,6 +3,8 @@ $(MSBuildProjectDirectory)\..\.. + FSharp + true @@ -22,7 +24,6 @@ - @@ -44,13 +45,4 @@ FSharp.Core - - - - - Microsoft - StrongName - - - diff --git a/src/fsharp/FSharp.Compiler.Interactive.Settings/InternalsVisibleTo.fs b/src/fsharp/FSharp.Compiler.Interactive.Settings/InternalsVisibleTo.fs deleted file mode 100644 index 3071a74b616..00000000000 --- a/src/fsharp/FSharp.Compiler.Interactive.Settings/InternalsVisibleTo.fs +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. - -namespace Microsoft.FSharp -open System.Reflection -[] -[] -[] - -do() - diff --git a/src/fsharp/FSharp.Compiler.Private/FSharp.Compiler.Private.fsproj b/src/fsharp/FSharp.Compiler.Private/FSharp.Compiler.Private.fsproj index 214f60cdc9f..0c72713522c 100644 --- a/src/fsharp/FSharp.Compiler.Private/FSharp.Compiler.Private.fsproj +++ b/src/fsharp/FSharp.Compiler.Private/FSharp.Compiler.Private.fsproj @@ -3,6 +3,8 @@ $(MSBuildProjectDirectory)\..\.. + FSharp + true @@ -23,12 +25,8 @@ - - - - @@ -37,16 +35,6 @@ - - - - - - Microsoft - StrongName - - - @@ -60,29 +48,26 @@ - - + + - - $(FSharpSourcesRoot)\..\loc\lcl\{Lang}\$(AssemblyName).dll.lcl - $(FSharpSourcesRoot)\..\loc\lci\$(AssemblyName).dll.lci - false - false - - - assemblyinfo.FSharp.Compiler.Private.dll.fs - FSComp.txt FSStrings.resx + + Logger.fsi + + + Logger.fs + Reflection\reshapedreflection.fs @@ -553,64 +538,64 @@ - + Service/IncrementalBuild.fsi - + Service/IncrementalBuild.fs - + Service/Reactor.fsi - + Service/Reactor.fs - + Service/ServiceConstants.fs - + Service/ServiceDeclarationLists.fsi - + Service/ServiceDeclarationLists.fs - + Service/ServiceLexing.fsi - + Service/ServiceLexing.fs - + Service/ServiceParseTreeWalk.fs - + Service/ServiceNavigation.fsi - + Service/ServiceNavigation.fs - + Service/ServiceParamInfoLocations.fsi - + Service/ServiceParamInfoLocations.fs - + Service/ServiceUntypedParse.fsi - + Service/ServiceUntypedParse.fs - + Service/ServiceAssemblyContent.fsi - + Service/ServiceAssemblyContent.fs - + Service/ServiceXmlDocParser.fsi - + Service/ServiceXmlDocParser.fs @@ -619,40 +604,40 @@ Service/SimulatedMSBuildReferenceResolver.fs - + Service/ExternalSymbol.fsi - + Service/ExternalSymbol.fs - + Service/QuickParse.fsi - + Service/QuickParse.fs - + Service/service.fsi - + Service/service.fs - + Service/ServiceInterfaceStubGenerator.fsi - + Service/ServiceInterfaceStubGenerator.fs - + Service/ServiceStructure.fsi - + Service/ServiceStructure.fs - + Service/ServiceAnalysis.fsi - + Service/ServiceAnalysis.fs @@ -661,17 +646,17 @@ FSIstrings.txt - InteractiveSession\fsi.fsi + InteractiveSession/fsi.fsi - InteractiveSession\fsi.fs + InteractiveSession/fsi.fs - + Misc/MSBuildReferenceResolver.fs - + Misc/LegacyHostedCompilerForTesting.fs @@ -687,33 +672,31 @@ - - ..\..\..\packages\Microsoft.DiaSymReader.PortablePdb.1.2.0\lib\portable-net45+win8\Microsoft.DiaSymReader.PortablePdb.dll - - - ..\..\..\packages\Microsoft.DiaSymReader.1.1.0\lib\portable-net45+win8\Microsoft.DiaSymReader.dll - - ..\..\..\packages\System.Reflection.Metadata.1.4.2\lib\portable-net45+win8\System.Reflection.Metadata.dll + ..\..\..\packages\System.Reflection.Metadata.$(SystemReflectionMetadataPackageVersion)\lib\portable-net45+win8\System.Reflection.Metadata.dll - ..\..\..\packages\System.Collections.Immutable.$(SystemCollectionsImmutableVersion)\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll + ..\..\..\packages\System.Collections.Immutable.$(SystemCollectionsImmutablePackageVersion)\lib\netstandard1.0\System.Collections.Immutable.dll - ..\..\..\packages\System.ValueTuple.4.3.1\lib\netstandard1.0\System.ValueTuple.dll - true + ..\..\..\packages\System.ValueTuple.$(SystemValueTuplePackageVersion)\lib\netstandard1.0\System.ValueTuple.dll - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualFSharp.Msbuild.15.0.1.0.1\lib\net45\Microsoft.Build.Framework.dll + + ..\..\..\packages\System.IO.Compression.$(SystemIoCompressionPackageVersion)\lib\net46\System.IO.Compression.dll + + + + + $(FSharpSourcesRoot)\..\packages\Microsoft.Build.Framework.$(MicrosoftBuildFrameworkPackageVersion)\lib\net46\Microsoft.Build.Framework.dll - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualFSharp.Msbuild.15.0.1.0.1\lib\net45\Microsoft.Build.dll + + $(FSharpSourcesRoot)\..\packages\Microsoft.Build.$(MicrosoftBuildPackageVersion)\lib\net46\Microsoft.Build.dll - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualFSharp.Msbuild.15.0.1.0.1\lib\net45\Microsoft.Build.Utilities.Core.dll + + $(FSharpSourcesRoot)\..\packages\Microsoft.Build.Utilities.Core.$(MicrosoftBuildUtilitiesCorePackageVersion)\lib\net46\Microsoft.Build.Utilities.Core.dll - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualFSharp.Msbuild.15.0.1.0.1\lib\net45\Microsoft.Build.Tasks.Core.dll + + $(FSharpSourcesRoot)\..\packages\Microsoft.Build.Tasks.Core.$(MicrosoftBuildTasksCorePackageVersion)\lib\net46\Microsoft.Build.Tasks.Core.dll @@ -722,4 +705,4 @@ FSharp.Core - \ No newline at end of file + diff --git a/src/fsharp/FSharp.Compiler.Private/FSharp.Compiler.Private.netcore.nuspec b/src/fsharp/FSharp.Compiler.Private/FSharp.Compiler.Private.netcore.nuspec index 3b663e8d3d5..dfac86f3568 100644 --- a/src/fsharp/FSharp.Compiler.Private/FSharp.Compiler.Private.netcore.nuspec +++ b/src/fsharp/FSharp.Compiler.Private/FSharp.Compiler.Private.netcore.nuspec @@ -16,14 +16,14 @@ - + - + @@ -31,9 +31,7 @@ - - - + diff --git a/src/fsharp/FSharp.Compiler.Private/project.json b/src/fsharp/FSharp.Compiler.Private/project.json index 09cfefb19fc..b9bf7861ae6 100644 --- a/src/fsharp/FSharp.Compiler.Private/project.json +++ b/src/fsharp/FSharp.Compiler.Private/project.json @@ -1,14 +1,14 @@ { "dependencies": { "NETStandard.Library": "1.6.1", - "System.Collections.Immutable":"1.3.1", + "System.Collections.Immutable": "1.5.0", "System.Diagnostics.Process": "4.3.0", "System.Diagnostics.TraceSource": "4.3.0", "System.Linq.Expressions": "4.3.0", "System.Linq.Queryable": "4.3.0", "System.Net.Requests": "4.3.0", "System.Reflection.Emit": "4.3.0", - "System.Reflection.Metadata": "1.4.2", + "System.Reflection.Metadata": "1.6.0", "System.Reflection.TypeExtensions": "4.3.0", "System.Runtime": "4.3.0", "System.Runtime.InteropServices": "4.3.0", @@ -17,9 +17,7 @@ "System.Threading.Tasks.Parallel": "4.3.0", "System.Threading.Thread": "4.3.0", "System.Threading.ThreadPool": "4.3.0", - "Microsoft.DiaSymReader.PortablePdb": "1.2.0", - "Microsoft.DiaSymReader": "1.1.0", - "System.ValueTuple": "4.3.1" + "System.ValueTuple": "4.3.0" }, "runtimes": { "win7-x86": { }, diff --git a/src/fsharp/FSharp.Compiler.Server.Shared/AssemblyInfo.fs b/src/fsharp/FSharp.Compiler.Server.Shared/AssemblyInfo.fs index c877e145a39..6293584b70f 100644 --- a/src/fsharp/FSharp.Compiler.Server.Shared/AssemblyInfo.fs +++ b/src/fsharp/FSharp.Compiler.Server.Shared/AssemblyInfo.fs @@ -5,10 +5,5 @@ namespace Microsoft.FSharp open System.Reflection open System.Runtime.InteropServices -[] -[] -[] -[] -[] [] do() diff --git a/src/fsharp/FSharp.Compiler.Server.Shared/FSharp.Compiler.Server.Shared.fsproj b/src/fsharp/FSharp.Compiler.Server.Shared/FSharp.Compiler.Server.Shared.fsproj index ad31f08f033..91eadb4875e 100644 --- a/src/fsharp/FSharp.Compiler.Server.Shared/FSharp.Compiler.Server.Shared.fsproj +++ b/src/fsharp/FSharp.Compiler.Server.Shared/FSharp.Compiler.Server.Shared.fsproj @@ -3,7 +3,8 @@ $(MSBuildProjectDirectory)\..\.. - true + FSharp + true @@ -38,14 +39,4 @@ - - - - - - Microsoft - StrongName - - - diff --git a/src/fsharp/FSharp.Compiler.Unittests/FSharp.Compiler.Unittests.fsproj b/src/fsharp/FSharp.Compiler.Unittests/FSharp.Compiler.Unittests.fsproj deleted file mode 100644 index 765e8cc5bb9..00000000000 --- a/src/fsharp/FSharp.Compiler.Unittests/FSharp.Compiler.Unittests.fsproj +++ /dev/null @@ -1,70 +0,0 @@ - - - - - $(MSBuildProjectDirectory)\..\.. - {a8d9641a-9170-4cf4-8fe0-6db8c134e1b5} - - - - AnyCPU - 2.0 - true - true - Library - FSharp.Compiler.Unittests - - false - false - - - true - false - bin\Debug\ - DEBUG;TRACE - prompt - 3 - - - true - bin\Release\ - TRACE - prompt - 3 - - - - True - $(NUnitLibDir)\nunit.framework.dll - - - - - - - - - ..\..\..\packages\System.ValueTuple.4.3.1\lib\netstandard1.0\System.ValueTuple.dll - - - - - - - - - - - - - FSharp.Compiler.Private - {2e4d67b4-522d-4cf7-97e4-ba940f0b18f3} - - - FSharp.Core - {ded3bbd7-53f4-428a-8c9f-27968e768605} - True - - - - \ No newline at end of file diff --git a/src/fsharp/FSharp.Compiler.Unittests/ProductVersion.fs b/src/fsharp/FSharp.Compiler.Unittests/ProductVersion.fs deleted file mode 100644 index 74c4da0c2fa..00000000000 --- a/src/fsharp/FSharp.Compiler.Unittests/ProductVersion.fs +++ /dev/null @@ -1,107 +0,0 @@ -namespace FSharp.Compiler.Unittests - -open System -open System.Text -open NUnit.Framework - -open Microsoft.FSharp.Compiler.AbstractIL.IL -open Microsoft.FSharp.Compiler.Driver.MainModuleBuilder - -#nowarn "3180" - -module FileVersionTest = - - let fileVersionAttrName = typeof.FullName - - [] - let parseILVersion () = - "0.0.0.0" |> parseILVersion |> Assert.areEqual (0us,0us,0us,0us) - "1.2.3.4" |> parseILVersion |> Assert.areEqual (1us,2us,3us,4us) - - [] - let ``should use AssemblyFileVersionAttribute if set`` () = - let findStringAttr n = n |> Assert.areEqual fileVersionAttrName; Some "1.2.3.4" - let warn = Assert.failf "no warning expected but was '%A'" - fileVersion warn findStringAttr (1us,0us,0us,0us) |> Assert.areEqual (1us,2us,3us,4us) - - [] - let ``should raise warning FS2003 if AssemblyFileVersionAttribute is not a valid version`` () = - let mutable exns = [] - let warn e = exns <- List.append exns [e] - - fileVersion warn (fun _ -> Some "1.2a.3.3") (3us,7us,8us,6us) - |> Assert.areEqual (3us,7us,8us,6us) - - match exns with - | [ Warning(2003, description) ] as a -> - description |> StringAssert.contains "1.2a.3.3" - description |> StringAssert.contains fileVersionAttrName - | ex -> Assert.failf "expecting warning 2003 but was %A" ex - - [] - let ``should fallback to assemblyVersion if AssemblyFileVersionAttribute not set`` () = - let findStringAttr n = n |> Assert.areEqual fileVersionAttrName; None; - let warn = Assert.failf "no warning expected but was '%A'" - fileVersion warn findStringAttr (1us,0us,0us,4us) |> Assert.areEqual (1us,0us,0us,4us) - -module ProductVersionTest = - - let informationalVersionAttrName = typeof.FullName - let fileVersionAttrName = typeof.FullName - - [] - let ``should use AssemblyInformationalVersionAttribute if set`` () = - let mutable args = [] - let findStrAttr x = args <- List.append args [x]; Some "12.34.56.78" - productVersion ignore findStrAttr (1us,0us,0us,6us) |> Assert.areEqual "12.34.56.78" - args |> Assert.areEqual [ informationalVersionAttrName ] - - [] - let ``should raise warning FS2003 if AssemblyInformationalVersionAttribute is not a valid version`` () = - let mutable exns = [] - let warn e = exns <- List.append exns [e] - - productVersion warn (fun _ -> Some "1.2.3-main (build #12)") (1us,0us,0us,6us) - |> Assert.areEqual "1.2.3-main (build #12)" - - match exns with - | [ Warning(2003, description) ] as a -> - description |> StringAssert.contains "1.2.3-main (build #12)" - description |> StringAssert.contains informationalVersionAttrName - | ex -> Assert.failf "expecting warning 2003 but was %A" ex - - [] - let ``should fallback to fileVersion if AssemblyInformationalVersionAttribute not set or empty`` () = - let warn = Assert.failf "no warnings expected, but was '%A'" - productVersion warn (fun _ -> None) (3us,2us,1us,0us) |> Assert.areEqual "3.2.1.0" - productVersion warn (fun _ -> Some "") (3us,2us,1us,0us) |> Assert.areEqual "3.2.1.0" - - let validValues () = - let max = System.UInt16.MaxValue - [ "1.2.3.4", (1us,2us,3us,4us) - "0.0.0.0", (0us,0us,0us,0us) - "3213.57843.32382.59493", (3213us,57843us,32382us,59493us) - (sprintf "%d.%d.%d.%d" max max max max), (max,max,max,max) ] - |> List.map (fun (s,e) -> TestCaseData(s, e)) - - [] - let ``should use values if valid major.minor.revision.build version format`` (v, expected) = - v |> productVersionToILVersionInfo |> Assert.areEqual expected - - let invalidValues () = - [ "1.2.3.4", (1us,2us,3us,4us) - "1.2.3.4a", (1us,2us,3us,0us) - "1.2.c3.4", (1us,2us,0us,0us) - "1.2-d.3.4", (1us,0us,0us,0us) - "1dd.2.3.4", (0us,0us,0us,0us) - "1dd.2da.d3hj.dd4ds", (0us,0us,0us,0us) - "1.5.6.7.dasd", (1us,5us,6us,7us) - "9.3", (9us,3us,0us,0us) - "", (0us,0us,0us,0us) - "70000.80000.90000.100000", (0us,0us,0us,0us) - (sprintf "%d.70000.80000.90000" System.UInt16.MaxValue), (System.UInt16.MaxValue,0us,0us,0us) ] - |> List.map (fun (s,e) -> TestCaseData(s, e)) - - [] - let ``should zero starting from first invalid version part`` (v, expected) = - v |> productVersionToILVersionInfo |> Assert.areEqual expected diff --git a/src/fsharp/FSharp.Compiler.nuget/FSharp.Compiler.Template.nuget.props b/src/fsharp/FSharp.Compiler.nuget/FSharp.Compiler.Template.nuget.props new file mode 100644 index 00000000000..4bb58eff671 --- /dev/null +++ b/src/fsharp/FSharp.Compiler.nuget/FSharp.Compiler.Template.nuget.props @@ -0,0 +1,21 @@ + + + $(MSBuildProjectDirectory)\..\.. + rc + obj\BuildVersionFile.props + + + + + + https://github.com/Microsoft/visualfsharp/blob/master/License.txt + https://github.com/Microsoft/visualfsharp + Microsoft and F# Software Foundation + Visual F# Compiler FSharp functional programming + $(FSharpSourcesRoot)\..\$(Configuration)\coreclr\bin + -rtm-$(NuGetPackageVersionSuffix) + $(FSPackageVersion)$(PreReleaseSuffix) + + + + diff --git a/src/fsharp/FSharp.Compiler.nuget/FSharp.Compiler.Template.nuget.targets b/src/fsharp/FSharp.Compiler.nuget/FSharp.Compiler.Template.nuget.targets new file mode 100644 index 00000000000..ec624f3287a --- /dev/null +++ b/src/fsharp/FSharp.Compiler.nuget/FSharp.Compiler.Template.nuget.targets @@ -0,0 +1,47 @@ + + + + + + + fsi + {d0e98c0d-490b-4c61-9329-0862f6e87645} + True + + + Fsc + {C94C257C-3C0A-4858-B5D8-D746498D1F08} + True + + + + + + + + + + + + + + + $(GitHeadSha) + [developer build] + -prop "licenseUrl=$(PackageLicenceUrl)" -prop "version=$(PackageVersion)" -prop "authors=$(PackageAuthors)" -prop "projectUrl=$(PackageProjectUrl)" -prop "tags=$(PackageTags)" -prop "githeadsha=$(NormalizedGitHeadSha)" + + + + + + + + + diff --git a/src/fsharp/FSharp.Compiler.nuget/FSharp.Compiler.nuget.proj b/src/fsharp/FSharp.Compiler.nuget/FSharp.Compiler.nuget.proj deleted file mode 100644 index bb860ccbb86..00000000000 --- a/src/fsharp/FSharp.Compiler.nuget/FSharp.Compiler.nuget.proj +++ /dev/null @@ -1,69 +0,0 @@ - - - $(MSBuildProjectDirectory)\..\.. - rc - obj\BuildVersionFile.props - - - - - - https://github.com/Microsoft/visualfsharp/blob/master/License.txt - https://github.com/Microsoft/visualfsharp - Microsoft and F# Software Foundation - Visual F# Compiler FSharp functional programming - $(FSharpSourcesRoot)\..\$(Configuration)\coreclr\bin - -rtm-$(BuildRevision.Trim())-0 - 4.2.0$(PreReleaseSuffix) - -prop "licenseUrl=$(PackageLicenceUrl)" -prop "version=$(PackageVersion)" -prop "authors=$(PackageAuthors)" -prop "projectUrl=$(PackageProjectUrl)" -prop "tags=$(PackageTags)" - - - - - - - - - - - - fsi - {d0e98c0d-490b-4c61-9329-0862f6e87645} - True - - - Fsc - {C94C257C-3C0A-4858-B5D8-D746498D1F08} - True - - - - - - - - - - - - - - - - -prop "licenseUrl=$(PackageLicenceUrl)" -prop "version=$(PackageVersion)" -prop "authors=$(PackageAuthors)" -prop "projectUrl=$(PackageProjectUrl)" -prop "tags=$(PackageTags)" - - - - - - - - - diff --git a/src/fsharp/FSharp.Compiler.nuget/Microsoft.FSharp.Compiler.nuget.proj b/src/fsharp/FSharp.Compiler.nuget/Microsoft.FSharp.Compiler.nuget.proj new file mode 100644 index 00000000000..53ed79e8acb --- /dev/null +++ b/src/fsharp/FSharp.Compiler.nuget/Microsoft.FSharp.Compiler.nuget.proj @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/src/fsharp/FSharp.Compiler.nuget/Microsoft.FSharp.Compiler.nuspec b/src/fsharp/FSharp.Compiler.nuget/Microsoft.FSharp.Compiler.nuspec index 0b70058263e..4130025ffbe 100644 --- a/src/fsharp/FSharp.Compiler.nuget/Microsoft.FSharp.Compiler.nuspec +++ b/src/fsharp/FSharp.Compiler.nuget/Microsoft.FSharp.Compiler.nuspec @@ -4,7 +4,8 @@ Microsoft.FSharp.Compiler .NET Core compatible version of the fsharp compiler fsc.exe. - Supported Platforms: - .NET Core (.netstandard1.6) + Supported Platforms: - .NET Core (.netstandard1.6). + Commit hash: $githeadsha$. en-US true @@ -17,7 +18,7 @@ - + @@ -25,24 +26,23 @@ - + - - - + - + + @@ -54,16 +54,31 @@ tools, build and runtime/native make unnecessary copies. this approach gives a very small deployment. Which is kind of necessary. --> + + + + + + + + + - + + + + + + + diff --git a/src/fsharp/FSharp.Compiler.nuget/Testing.FSharp.Compiler.nuget.proj b/src/fsharp/FSharp.Compiler.nuget/Testing.FSharp.Compiler.nuget.proj new file mode 100644 index 00000000000..dc9f19add52 --- /dev/null +++ b/src/fsharp/FSharp.Compiler.nuget/Testing.FSharp.Compiler.nuget.proj @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/src/fsharp/FSharp.Compiler.nuget/Testing.FSharp.Compiler.nuspec b/src/fsharp/FSharp.Compiler.nuget/Testing.FSharp.Compiler.nuspec index 021b458ed30..d2dd36b3174 100644 --- a/src/fsharp/FSharp.Compiler.nuget/Testing.FSharp.Compiler.nuspec +++ b/src/fsharp/FSharp.Compiler.nuget/Testing.FSharp.Compiler.nuspec @@ -16,7 +16,7 @@ - + @@ -24,16 +24,14 @@ - + - - - + @@ -55,7 +53,13 @@ - + + + + + + + diff --git a/src/fsharp/FSharp.Core.Unittests/FSharp.Core.Unittests.fsproj b/src/fsharp/FSharp.Core.Unittests/FSharp.Core.Unittests.fsproj deleted file mode 100644 index 9a655b05f7d..00000000000 --- a/src/fsharp/FSharp.Core.Unittests/FSharp.Core.Unittests.fsproj +++ /dev/null @@ -1,128 +0,0 @@ - - - - - $(MSBuildProjectDirectory)\..\.. - {88e2d422-6852-46e3-a740-83e391dc7973} - true - false - - - - Debug - AnyCPU - 2.0 - true - true - Library - false - FSharp.Core.Unittests - - false - false - netcore - $(NoWarn);217 - - - $(DefineConstants);$(TargetDotnetProfile.ToLower()) - - - true - false - $(DefineConstants);DEBUG;TRACE - prompt - 3 - - - true - $(DefineConstants);TRACE - prompt - 3 - - - - - true - True - $(NUnitLibDir)\nunit.framework.dll - - - true - True - $(FsCheckLibDir)\net45\FsCheck.dll - - - ..\..\..\packages\System.ValueTuple.4.3.1\lib\portable-net40+sl4+win8+wp8\System.ValueTuple.dll - True - - - - - {DED3BBD7-53F4-428A-8C9F-27968E768605} - FSharp.Core - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - FSharp.Core.Unittests.dll.config - FSCoreVersion - $(FSCoreVersion) - - - - diff --git a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/CreateComparersRegression.fsx b/src/fsharp/FSharp.Core.Unittests/FSharp.Core/CreateComparersRegression.fsx deleted file mode 100644 index 0bcd55d1c0c..00000000000 --- a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/CreateComparersRegression.fsx +++ /dev/null @@ -1,6 +0,0 @@ -// run as "fsi --exec CreateComparersRegression.fsx > tmp.txt" -// and then copy text in tmp.txt into the bottom of ComparersRegression.fs - -#r @"..\..\..\..\Release\net40\bin\FSharp.Core.Unittests.dll" - -FSharp.Core.Unittests.FSharp_Core.Microsoft_FSharp_Core.ComparersRegression.createData () \ No newline at end of file diff --git a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Reflection/FSharpReflection.fs b/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Reflection/FSharpReflection.fs deleted file mode 100644 index 7871f3f0c74..00000000000 --- a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Reflection/FSharpReflection.fs +++ /dev/null @@ -1,1032 +0,0 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. - -// Various tests for Microsoft.FSharp.Reflection - -namespace FSharp.Core.Unittests.FSharp_Core.Microsoft_FSharp_Reflection - -open System -open System.Reflection - -open FSharp.Core.Unittests.LibraryTestFx -open NUnit.Framework - -open Microsoft.FSharp.Reflection - -(* -[Test Strategy] -Make sure each method works on: -* Generic types -* Null -* DiscriminatedUnion -* Delegate -* Record -* Exception -* Tuple -* Fuction -*) - -#if FX_RESHAPED_REFLECTION -module PrimReflectionAdapters = - open System.Linq - - type System.Type with - member this.Assembly = this.GetTypeInfo().Assembly - member this.IsGenericType = this.GetTypeInfo().IsGenericType - member this.IsValueType = this.GetTypeInfo().IsValueType - member this.IsAssignableFrom(otherTy : Type) = this.GetTypeInfo().IsAssignableFrom(otherTy.GetTypeInfo()) - member this.GetProperty(name) = this.GetRuntimeProperty(name) - member this.GetProperties() = this.GetRuntimeProperties() |> Array.ofSeq - member this.GetMethod(name, parameterTypes) = this.GetRuntimeMethod(name, parameterTypes) - member this.GetCustomAttributes(attrTy : Type, inherits : bool) : obj[] = - unbox (box (CustomAttributeExtensions.GetCustomAttributes(this.GetTypeInfo(), attrTy, inherits).ToArray())) - - type System.Reflection.MemberInfo with - member this.ReflectedType = this.DeclaringType - - type System.Reflection.Assembly with - member this.GetTypes() = this.DefinedTypes |> Seq.map (fun ti -> ti.AsType()) |> Array.ofSeq - -open PrimReflectionAdapters -#endif - -module IsModule = - type IsModuleType () = - member this.M = 1 - -type FSharpDelegate = delegate of int -> string - -type RecordType = { field1 : string; field2 : RecordType option; field3 : (unit -> RecordType * string) } -type GenericRecordType<'a, 'b> = { field1 : 'a; field2 : 'b; field3 : (unit -> GenericRecordType<'a, 'b>) } - -type SingleNullaryCaseDiscUnion = SingleNullaryCaseTag -type SingleCaseDiscUnion = SingleCaseTag of float * float * float - -type DiscUnionType<'a> = - | A // No data associated with tag - | B of 'a * DiscUnionType<'a> option - | C of float * string - -exception ExceptionInt of int - -exception DatalessException - -module FSharpModule = - type ModuleType() = - class - end - -[] -type FSharpValueTests() = - - // global variables - let rec recordtype1 : RecordType = { field1 = "field1"; field2 = Some(recordtype1); field3 = ( fun () -> (recordtype1,"") )} - let recordtype2 : RecordType = { field1 = "field2"; field2 = Some(recordtype1); field3 = ( fun () -> (recordtype1,"") )} - - let rec genericRecordType1 : GenericRecordType = - { - field1 = "field1" - field2 = 1 - field3 = (fun () -> genericRecordType1) - } - - let genericRecordType2 : GenericRecordType = { field1 = "field1"; field2 = 1; field3 = ( fun () -> genericRecordType1 )} - - let nullValue = null - - let singlecaseunion1 = SingleCaseDiscUnion.SingleCaseTag(1.0,2.0,3.0) - let singlecaseunion2 = SingleCaseDiscUnion.SingleCaseTag(4.0,5.0,6.0) - - let discUniontypeA = DiscUnionType.A - let discUniontypeB = DiscUnionType.B(1,Some(discUniontypeA)) - let discUniontypeC = DiscUnionType.C(1.0,"stringparam") - - let recDiscUniontypeB = DiscUnionType.B(1,Some(discUniontypeB)) - - let fsharpdelegate1 = new FSharpDelegate(fun (x:int) -> "delegate1") - let fsharpdelegate2 = new FSharpDelegate(fun (x:int) -> "delegate2") - - let tuple1 = ( 1, "tuple1") - let tuple2 = ( 2, "tuple2",(fun x -> x + 1)) - let tuple3 = ( 1, ( 2, "tuple")) - - - let func1 param = param + 1 - let func2 param = param + "" - - let exInt = ExceptionInt(1) - let exDataless = DatalessException - - [] - member this.Equals() = - // Record value - Assert.IsTrue(FSharpValue.Equals(recordtype1, recordtype1)) - Assert.IsFalse(FSharpValue.Equals(recordtype1, recordtype2)) - - // Generic Record value - Assert.IsTrue(FSharpValue.Equals(genericRecordType1, genericRecordType1)) - Assert.IsFalse(FSharpValue.Equals(genericRecordType1, genericRecordType2)) - - // null value - Assert.IsTrue(FSharpValue.Equals(nullValue,nullValue)) - Assert.IsFalse(FSharpValue.Equals(nullValue,1)) - - // Single Case Union - Assert.IsTrue(FSharpValue.Equals(singlecaseunion1,singlecaseunion1)) - Assert.IsFalse(FSharpValue.Equals(singlecaseunion1,singlecaseunion2)) - - // Discriminated Union - Assert.IsTrue(FSharpValue.Equals(discUniontypeA,discUniontypeA)) - Assert.IsFalse(FSharpValue.Equals(discUniontypeB,discUniontypeC)) - - // FSharpDelegate - Assert.IsTrue(FSharpValue.Equals(fsharpdelegate1,fsharpdelegate1)) - Assert.IsFalse(FSharpValue.Equals(fsharpdelegate1,fsharpdelegate2)) - - // Tuple - Assert.IsTrue(FSharpValue.Equals(tuple1, tuple1)) - Assert.IsFalse(FSharpValue.Equals( (1, 2, 3), (4, 5, 6) )) - - // Tuples of differing types - Assert.IsFalse(FSharpValue.Equals(tuple1, tuple2)) - - // Exception - Assert.IsTrue(FSharpValue.Equals(exInt,exInt)) - Assert.IsFalse(FSharpValue.Equals(exInt,exDataless)) - () - - [] - member this.GetExceptionFields() = - - // int - Assert.AreEqual(FSharpValue.GetExceptionFields(exInt), ([|1|] : obj [])) - - // dataless - Assert.AreEqual(FSharpValue.GetExceptionFields(exDataless),[||]) - - // invalid type - CheckThrowsArgumentException(fun () -> FSharpValue.GetExceptionFields(1) |> ignore) - CheckThrowsArgumentException(fun () -> FSharpValue.GetExceptionFields( () ) |> ignore) - - // System Exception - CheckThrowsArgumentException(fun () -> FSharpValue.GetExceptionFields(new System.Exception("ex message")) |> ignore) - - // null - CheckThrowsArgumentException(fun () -> FSharpValue.GetExceptionFields(null) |> ignore) - - () - - [] - member this.GetRecordField() = - - // Record - let propertyinfo1 = (typeof).GetProperty("field1") - Assert.AreEqual((FSharpValue.GetRecordField(recordtype1,propertyinfo1)),"field1") - - // Generic Record value - let propertyinfo2 = (typeof>).GetProperty("field2") - Assert.AreEqual((FSharpValue.GetRecordField(genericRecordType1,propertyinfo2)),1) - - // null value - CheckThrowsArgumentException(fun () ->FSharpValue.GetRecordField(null,propertyinfo1)|> ignore) - CheckThrowsArgumentException(fun () ->FSharpValue.GetRecordField( () ,propertyinfo1)|> ignore) - - // invalid value - CheckThrowsArgumentException(fun () -> FSharpValue.GetRecordField("invalid",propertyinfo1) |> ignore) - - // invalid property info - let propertyinfoint = (typeof).GetProperty("fieldstring") - CheckThrowsArgumentException(fun () -> FSharpValue.GetRecordField("invalid",propertyinfoint) |> ignore) - - () - - [] - member this.GetRecordFields() = - // Record - let propertyinfo1 = (typeof).GetProperty("field1") - Assert.AreEqual((FSharpValue.GetRecordFields(recordtype1)).[0],"field1") - - // Generic Record value - let propertyinfo2 = (typeof>).GetProperty("field1") - Assert.AreEqual((FSharpValue.GetRecordFields(genericRecordType1)).[0],"field1") - - // null value - CheckThrowsArgumentException(fun () -> FSharpValue.GetRecordFields(null)|> ignore) - CheckThrowsArgumentException(fun () -> FSharpValue.GetRecordFields( () )|> ignore) - - // invalid value - CheckThrowsArgumentException(fun () -> FSharpValue.GetRecordFields("invalid") |> ignore) - () - - - [] - member this.GetTupleField() = - // Tuple - Assert.AreEqual((FSharpValue.GetTupleField(tuple1,0)),1) - - // Tuple with function element - Assert.AreEqual( FSharpValue.GetTupleField(tuple2,1), "tuple2") - - // null value - CheckThrowsArgumentException(fun () -> FSharpValue.GetTupleField(null, 3)|> ignore) - CheckThrowsArgumentException(fun () -> FSharpValue.GetTupleField( () , 3)|> ignore) - - // invalid value - CheckThrowsArgumentException(fun () -> FSharpValue.GetTupleField("Invalid",3)|> ignore) - - // index out of range - CheckThrowsArgumentException(fun () -> FSharpValue.GetTupleField(tuple2,8)|> ignore) - () - - [] - member this.GetTupleFields() = - // Tuple - Assert.AreEqual(FSharpValue.GetTupleFields(tuple1).[0],1) - - // Tuple with function element - Assert.AreEqual( (FSharpValue.GetTupleFields(tuple2)).[1],"tuple2") - - // null value - CheckThrowsArgumentException(fun () -> FSharpValue.GetTupleFields(null)|> ignore) - CheckThrowsArgumentException(fun () -> FSharpValue.GetTupleFields( () )|> ignore) - - // invalid value - CheckThrowsArgumentException(fun () -> FSharpValue.GetTupleFields("Invalid")|> ignore) - () - - [] - member this.GetUnionFields() = - // single case union - let (singlecaseinfo,singlevaluearray) = FSharpValue.GetUnionFields(singlecaseunion1,typeof) - Assert.AreEqual(singlevaluearray, ([|1.0;2.0;3.0|] : obj [])) - - // DiscUnionType - let (duCaseinfo, duValueArray) = FSharpValue.GetUnionFields(discUniontypeB,typeof>) - Assert.AreEqual(duValueArray.[0],1) - - // null value - CheckThrowsArgumentException(fun () -> FSharpValue.GetUnionFields(null, null)|> ignore) - CheckThrowsArgumentException(fun () -> FSharpValue.GetUnionFields( () , null)|> ignore) - - () - - [] - member this.MakeFunction() = - - // Int function - let implementationInt (x:obj) = box( unbox(x) + 1) - let resultFuncIntObj = FSharpValue.MakeFunction(typeof int>, implementationInt ) - let resultFuncInt = resultFuncIntObj :?> (int -> int) - Assert.AreEqual(resultFuncInt(5),6) - - // String funcion - let implementationString (x:obj) = box( unbox(x) + " function") - let resultFuncStringObj = FSharpValue.MakeFunction(typeof string>, implementationString ) - let resultFuncString = resultFuncStringObj :?> (string -> string) - Assert.AreEqual(resultFuncString("parameter"),"parameter function") - - () - - [] - member this.MakeRecord() = - // Record - let makeRecord = FSharpValue.MakeRecord(typeof,[|box"field1";box(Some(recordtype1));box( fun () -> (recordtype1,"")) |]) - Assert.AreEqual(FSharpValue.GetRecordFields(makeRecord).[0],"field1") - - // Generic Record value - let makeRecordGeneric = FSharpValue.MakeRecord(typeof>,[|box"field1";box(1);box( fun () -> genericRecordType1) |]) - Assert.AreEqual(FSharpValue.GetRecordFields(makeRecordGeneric).[0],"field1") - - // null value - CheckThrowsArgumentException(fun () ->FSharpValue.MakeRecord(null,null)|> ignore) - - // invalid value - CheckThrowsArgumentException(fun () -> FSharpValue.MakeRecord(typeof>,[|box(1);box("invalid param");box("invalid param") |])|> ignore) - () - - [] - member this.MakeTuple() = - // Tuple - let makeTuple = FSharpValue.MakeTuple([|box(1);box("tuple")|], typeof>) - Assert.AreEqual(FSharpValue.GetTupleFields(makeTuple).[0],1) - - // Tuple with function - let makeTuplewithFunc = FSharpValue.MakeTuple([|box(1);box("tuple with func");box(fun x -> x + 1)|], typeof int)>>) - Assert.AreEqual(FSharpValue.GetTupleFields(makeTuplewithFunc).[1],"tuple with func") - - // null value - CheckThrowsArgumentNullException(fun () ->FSharpValue.MakeTuple(null,null)|> ignore) - - // invalid value - CheckThrowsArgumentException(fun () -> FSharpValue.MakeTuple([|box"invalid param";box"invalid param"|],typeof>) |> ignore) - () - - [] - member this.MakeUnion() = - // single case union - let (singlecaseinfo,singlevaluearray) = FSharpValue.GetUnionFields(singlecaseunion1,typeof) - let resultSingleCaseUnion=FSharpValue.MakeUnion(singlecaseinfo,[|box(1.0);box(2.0);box(3.0)|]) - Assert.AreEqual(resultSingleCaseUnion,singlecaseunion1) - - // DiscUnionType - let (duCaseinfo, duValueArray) = FSharpValue.GetUnionFields(discUniontypeB,typeof>) - let resultDiscUnion=FSharpValue.MakeUnion(duCaseinfo,[|box(1);box(Some(discUniontypeB))|]) - Assert.AreEqual(resultDiscUnion,recDiscUniontypeB) - - () - - [] - member this.PreComputeRecordConstructor() = - // Record - let recCtor = FSharpValue.PreComputeRecordConstructor(typeof) - let resultRecordType = recCtor([| box("field1");box(Some(recordtype1));box(fun () -> (recordtype1,""))|]) - Assert.AreEqual( (unbox(resultRecordType)).field1 ,recordtype1.field1) - - // Generic Record value - let genericRecCtor = FSharpValue.PreComputeRecordConstructor(typeof>) - let resultGenericRecordType = genericRecCtor([| box("field1");box(2);box( fun () -> genericRecordType1)|]) - Assert.AreEqual( (unbox>(resultGenericRecordType)).field1,genericRecordType1.field1) - - // null value - CheckThrowsArgumentException(fun () ->FSharpValue.PreComputeRecordConstructor(null)|> ignore) - - // invalid value - CheckThrowsArgumentException(fun () -> FSharpValue.PreComputeRecordConstructor(typeof>) |> ignore) - - () - - [] - member this.PreComputeRecordConstructorInfo() = - // Record - let recordCtorInfo = FSharpValue.PreComputeRecordConstructorInfo(typeof) - Assert.AreEqual(recordCtorInfo.ReflectedType,typeof ) - - // Generic Record value - let genericrecordCtorInfo = FSharpValue.PreComputeRecordConstructorInfo(typeof>) - Assert.AreEqual(genericrecordCtorInfo.ReflectedType,typeof>) - - // null value - CheckThrowsArgumentException(fun () ->FSharpValue.PreComputeRecordConstructorInfo(null)|> ignore) - - // invalid value - CheckThrowsArgumentException(fun () -> FSharpValue.PreComputeRecordConstructorInfo(typeof>) |> ignore) - () - - [] - member this.PreComputeRecordFieldReader() = - // Record - let recordFieldReader = FSharpValue.PreComputeRecordFieldReader((typeof).GetProperty("field1")) - Assert.AreEqual(recordFieldReader(recordtype1),box("field1")) - - // Generic Record value - let recordFieldReader = FSharpValue.PreComputeRecordFieldReader((typeof>).GetProperty("field1")) - Assert.AreEqual(recordFieldReader(genericRecordType1),box("field1")) - - // null value - CheckThrowsArgumentException(fun () -> FSharpValue.PreComputeRecordFieldReader(null)|> ignore) - () - - [] - member this.PreComputeRecordReader() = - // Record - let recordReader = FSharpValue.PreComputeRecordReader(typeof) - Assert.AreEqual( (recordReader(recordtype1)).[0],"field1") - - // Generic Record value - let genericrecordReader = FSharpValue.PreComputeRecordReader(typeof>) - Assert.AreEqual( (genericrecordReader(genericRecordType1)).[0],"field1") - - // null value - CheckThrowsArgumentException(fun () ->FSharpValue.PreComputeRecordReader(null)|> ignore) - - // invalid value - CheckThrowsArgumentException(fun () -> FSharpValue.PreComputeRecordReader(typeof>) |> ignore) - () - - [] - member this.PreComputeTupleConstructor() = - // Tuple - let tupleCtor = FSharpValue.PreComputeTupleConstructor(tuple1.GetType()) - Assert.AreEqual( tupleCtor([| box(1);box("tuple1") |]) , box(tuple1)) - - // Tuple with function member - let tuplewithFuncCtor = FSharpValue.PreComputeTupleConstructor(tuple2.GetType()) - let resultTuplewithFunc = tuplewithFuncCtor([| box(2); box("tuple2"); box(fun x -> x + 1)|]) - Assert.AreEqual( FSharpValue.GetTupleFields( box(resultTuplewithFunc)).[1] , "tuple2") - - // nested tuple - let tupleNestedCtor = FSharpValue.PreComputeTupleConstructor(tuple3.GetType()) - Assert.AreEqual( tupleNestedCtor([| box(1);box(2,"tuple")|] ), box(tuple3)) - - // null value - CheckThrowsArgumentException(fun () -> FSharpValue.PreComputeTupleConstructor(null)|> ignore) - - // invalid value - CheckThrowsArgumentException(fun () -> FSharpValue.PreComputeTupleConstructor(typeof>) |> ignore) - CheckThrowsArgumentException(fun () -> FSharpValue.PreComputeTupleConstructor(typeof) |> ignore) - - () - - [] - member this.PreComputeTupleConstructorInfo() = - // Tuple - let (tupleCtorInfo, tupleType) = FSharpValue.PreComputeTupleConstructorInfo(typeof>) - Assert.AreEqual(tupleCtorInfo.ReflectedType,typeof> ) - - // Nested - let (nestedTupleCtorInfo, nestedTupleType) = FSharpValue.PreComputeTupleConstructorInfo(typeof>>) - Assert.AreEqual(nestedTupleCtorInfo.ReflectedType, typeof>>) - - // null value - CheckThrowsArgumentException(fun () ->FSharpValue.PreComputeTupleConstructorInfo(null)|> ignore) - - // invalid value - CheckThrowsArgumentException(fun () -> FSharpValue.PreComputeTupleConstructorInfo(typeof) |> ignore) - () - - - [] - member this.PreComputeTuplePropertyInfo() = - - // Tuple - let (tuplePropInfo, typeindex) = FSharpValue.PreComputeTuplePropertyInfo(typeof>,0) - Assert.AreEqual(tuplePropInfo.PropertyType,typeof) - - // Nested - let (tupleNestedPropInfo, typeindex) = FSharpValue.PreComputeTuplePropertyInfo(typeof>>,1) - Assert.AreEqual(tupleNestedPropInfo.PropertyType,typeof>) - - // null value - CheckThrowsArgumentException(fun () ->FSharpValue.PreComputeTuplePropertyInfo(null,0)|> ignore) - - // invalid value - CheckThrowsArgumentException(fun () -> FSharpValue.PreComputeTuplePropertyInfo(typeof,0) |> ignore) - () - - [] - member this.PreComputeTupleReader() = - - // Tuple - let tuplereader = FSharpValue.PreComputeTupleReader(typeof>) - Assert.AreEqual(tuplereader(tuple1).[0],1) - - // Nested - let nestedtuplereader = FSharpValue.PreComputeTupleReader(typeof>>) - Assert.AreEqual(nestedtuplereader(tuple3).[1],box(2, "tuple")) - - // null value - CheckThrowsArgumentException(fun () ->FSharpValue.PreComputeTupleReader(null)|> ignore) - - // invalid value - CheckThrowsArgumentException(fun () -> FSharpValue.PreComputeTupleReader(typeof) |> ignore) - () - - [] - member this.PreComputeUnionConstructor() = - - // SingleCaseUnion - let (singlecaseinfo,singlevaluearray) = FSharpValue.GetUnionFields(singlecaseunion1,typeof) - let singleUnionCtor = FSharpValue.PreComputeUnionConstructor(singlecaseinfo) - let resuleSingleCaseUnion = singleUnionCtor([|box(1.0);box(2.0);box(3.0)|]) - Assert.AreEqual(resuleSingleCaseUnion,singlecaseunion1) - - // DiscUnion - let (discunioninfo,discunionvaluearray) = FSharpValue.GetUnionFields(discUniontypeB,typeof>) - let discUnionCtor = FSharpValue.PreComputeUnionConstructor(discunioninfo) - let resuleDiscUnionB = discUnionCtor([|box(1);box(Some(discUniontypeB))|]) - Assert.AreEqual(resuleDiscUnionB,recDiscUniontypeB) - - () - - [] - member this.PreComputeUnionConstructorInfo() = - - // SingleCaseUnion - let (singlecaseinfo,singlevaluearray) = FSharpValue.GetUnionFields(singlecaseunion1,typeof) - let singlecaseMethodInfo = FSharpValue.PreComputeUnionConstructorInfo(singlecaseinfo) - Assert.AreEqual(singlecaseMethodInfo.ReflectedType,typeof) - - // DiscUnion - let (discUnionInfo,discvaluearray) = FSharpValue.GetUnionFields(discUniontypeB,typeof>) - let discUnionMethodInfo = FSharpValue.PreComputeUnionConstructorInfo(discUnionInfo) - Assert.AreEqual(discUnionMethodInfo.ReflectedType,typeof>) - - () - - [] - member this.PreComputeUnionReader() = - - // SingleCaseUnion - let (singlecaseinfo,singlevaluearray) = FSharpValue.GetUnionFields(singlecaseunion1,typeof) - let singlecaseUnionReader = FSharpValue.PreComputeUnionReader(singlecaseinfo) - Assert.AreEqual(singlecaseUnionReader(box(singlecaseunion1)),[|box(1.0);box(2.0);box(3.0)|]) - - // DiscUnion - let (discUnionInfo,discvaluearray) = FSharpValue.GetUnionFields(recDiscUniontypeB,typeof>) - let discUnionReader = FSharpValue.PreComputeUnionReader(discUnionInfo) - Assert.AreEqual(discUnionReader(box(recDiscUniontypeB)) , [|box(1);box(Some(discUniontypeB))|]) - - () - - [] - member this.PreComputeUnionTagMemberInfo() = - - // SingleCaseUnion - let singlecaseUnionMemberInfo = FSharpValue.PreComputeUnionTagMemberInfo(typeof) - Assert.AreEqual(singlecaseUnionMemberInfo.ReflectedType, typeof) - - // DiscUnion - let discUnionMemberInfo = FSharpValue.PreComputeUnionTagMemberInfo(typeof>) - Assert.AreEqual(discUnionMemberInfo.ReflectedType, typeof>) - - // null value - CheckThrowsArgumentException(fun () ->FSharpValue.PreComputeUnionTagMemberInfo(null)|> ignore) - - // invalid value - CheckThrowsArgumentException(fun () -> FSharpValue.PreComputeUnionTagMemberInfo(typeof) |> ignore) - () - - [] - member this.PreComputeUnionTagReader() = - - // SingleCaseUnion - let singlecaseUnionTagReader = FSharpValue.PreComputeUnionTagReader(typeof) - Assert.AreEqual(singlecaseUnionTagReader(box(singlecaseunion1)), 0) - - // DiscUnion - let discUnionTagReader = FSharpValue.PreComputeUnionTagReader(typeof>) - Assert.AreEqual(discUnionTagReader(box(discUniontypeB)), 1) - - // null value - CheckThrowsArgumentException(fun () ->FSharpValue.PreComputeUnionTagReader(null)|> ignore) - - // invalid value - CheckThrowsArgumentException(fun () -> FSharpValue.PreComputeUnionTagReader(typeof) |> ignore) - () - - - - - - -[] -type FSharpTypeTests() = - - // instance for member this.ObjectEquals - let rec recordtype1 : RecordType = { field1 = "field1"; field2 = Some(recordtype1); field3 = ( fun () -> (recordtype1,"") )} - let recordtype2 : RecordType = { field1 = "field2"; field2 = Some(recordtype1); field3 = ( fun () -> (recordtype1,"") )} - let rec genericRecordType1 : GenericRecordType = { field1 = "field1"; field2 = 1; field3 = ( fun () -> genericRecordType1 )} - let genericRecordType2 : GenericRecordType = { field1 = "field1"; field2 = 1; field3 = ( fun () -> genericRecordType1 )} - - let nullValue = null - - let singlecaseunion1 = SingleCaseDiscUnion.SingleCaseTag(1.0,2.0,3.0) - let singlecaseunion2 = SingleCaseDiscUnion.SingleCaseTag(4.0,5.0,6.0) - - let discUniontypeA = DiscUnionType.A - let discUniontypeB = DiscUnionType.B(1,Some(discUniontypeA)) - let discUniontypeC = DiscUnionType.C(1.0,"stringparam") - - let fsharpdelegate1 = new FSharpDelegate(fun (x:int) -> "delegate1") - let fsharpdelegate2 = new FSharpDelegate(fun (x:int) -> "delegate2") - - - let tuple1 = ( 1, "tuple1") - let tuple2 = ( 2, "tuple2") - - let func1 param = param + 1 - let func2 param = param + "" - - let exInt = ExceptionInt(1) - let exDataless = DatalessException - - // Base class methods - [] - member this.ObjectEquals() = - - // Record value - Assert.IsTrue(FSharpValue.Equals(recordtype1, recordtype1)) - Assert.IsFalse(FSharpValue.Equals(recordtype1, recordtype2)) - - // Generic Record value - Assert.IsTrue(FSharpValue.Equals(genericRecordType1, genericRecordType1)) - Assert.IsFalse(FSharpValue.Equals(genericRecordType1, genericRecordType2)) - - // null value - Assert.IsTrue(FSharpValue.Equals(nullValue,nullValue)) - Assert.IsFalse(FSharpValue.Equals(nullValue,1)) - - // Single Case Union - Assert.IsTrue(FSharpValue.Equals(singlecaseunion1,singlecaseunion1)) - Assert.IsFalse(FSharpValue.Equals(singlecaseunion1,singlecaseunion2)) - - // Discriminated Union - Assert.IsTrue(FSharpValue.Equals(discUniontypeA,discUniontypeA)) - Assert.IsFalse(FSharpValue.Equals(discUniontypeB,discUniontypeC)) - - // FSharpDelegate - Assert.IsTrue(FSharpValue.Equals(fsharpdelegate1,fsharpdelegate1)) - Assert.IsFalse(FSharpValue.Equals(fsharpdelegate1,fsharpdelegate2)) - - // Tuple - Assert.IsTrue(FSharpValue.Equals(tuple1,tuple1)) - Assert.IsFalse(FSharpValue.Equals(tuple1,tuple2)) - - // Exception - Assert.IsTrue(FSharpValue.Equals(exInt,exInt)) - Assert.IsFalse(FSharpValue.Equals(exInt,exDataless)) - - () - - - // Static methods - [] - member this.GetExceptionFields() = - - // positive - let forallexistedInt = - FSharpType.GetExceptionFields(typeof) - |> Array.forall (fun property -> (Array.IndexOf(typeof.GetProperties(), property) > -1)) - - Assert.IsTrue(forallexistedInt) - - let forallexistedDataless = - FSharpType.GetExceptionFields(typeof) - |> Array.forall (fun property -> (Array.IndexOf(typeof.GetProperties(),property) > -1)) - Assert.IsTrue(forallexistedDataless) - - // Argument Exception - CheckThrowsArgumentException(fun () ->FSharpType.GetExceptionFields(typeof) |> ignore ) - - // null - CheckThrowsArgumentNullException(fun () ->FSharpType.GetExceptionFields(null) |> ignore ) - - () - - - [] - member this.GetFunctionElements() = - - // positive - Assert.AreEqual(FSharpType.GetFunctionElements(typeof string>),(typeof,typeof)) - Assert.AreEqual(FSharpType.GetFunctionElements(typeof int -> string>), (typeof, typeof>)) - - // argument exception - CheckThrowsArgumentException(fun () ->FSharpType.GetFunctionElements(typeof) |> ignore ) - - // null - CheckThrowsArgumentNullException(fun () ->FSharpType.GetFunctionElements(null) |> ignore ) - - () - - [] - member this.GetRecordFields() = - - // positive - Assert.AreEqual(FSharpType.GetRecordFields(typeof),(typeof.GetProperties())) - Assert.AreEqual(FSharpType.GetRecordFields(typeof>),(typeof>.GetProperties())) - - // argument exception - CheckThrowsArgumentException(fun () ->FSharpType.GetRecordFields(typeof) |> ignore ) - - // null - CheckThrowsArgumentNullException(fun () ->FSharpType.GetRecordFields(null) |> ignore ) - - () - - - [] - member this.GetTupleElements() = - - // positive - Assert.AreEqual(FSharpType.GetTupleElements(typeof>),[|typeof; typeof|]) - Assert.AreEqual(FSharpType.GetTupleElements(typeof>),[|typeof; typeof;typeof|]) - - // argument exception - CheckThrowsArgumentException(fun () ->FSharpType.GetTupleElements(typeof) |> ignore ) - - // null - CheckThrowsArgumentNullException(fun () ->FSharpType.GetTupleElements(null) |> ignore ) - - () - - [] - member this.GetUnionCases() = - // SingleCaseUnion - let singlecaseUnionCaseInfoArray = FSharpType.GetUnionCases(typeof) - let (expectedSinglecaseinfo,singlevaluearray) = FSharpValue.GetUnionFields(singlecaseunion1,typeof) - Assert.AreEqual(singlecaseUnionCaseInfoArray.[0], expectedSinglecaseinfo) - - // DiscUnionType - - let discunionCaseInfoArray = FSharpType.GetUnionCases(typeof>) - let (expectedDuCaseinfoArray, duValueArray) = FSharpValue.GetUnionFields(discUniontypeB,typeof>) - Assert.AreEqual(discunionCaseInfoArray.[1],expectedDuCaseinfoArray) - - // null value - CheckThrowsArgumentNullException(fun () ->FSharpType.GetUnionCases(null)|> ignore) - - // invalid value - CheckThrowsArgumentException(fun () -> FSharpType.GetUnionCases(typeof) |> ignore) - - () - - [] - member this.IsExceptionRepresentation() = - - // positive - Assert.IsTrue(FSharpType.IsExceptionRepresentation(typeof)) - Assert.IsTrue(FSharpType.IsExceptionRepresentation(typeof)) - - // negative - Assert.IsFalse(FSharpType.IsExceptionRepresentation(typeof)) - Assert.IsFalse(FSharpType.IsExceptionRepresentation(typeof)) - - // null - CheckThrowsArgumentNullException(fun () -> FSharpType.IsExceptionRepresentation(null) |> ignore ) - - () - - [] - member this.IsFunction() = - - // positive - Assert.IsTrue(FSharpType.IsFunction(typeof int>)) - Assert.IsTrue(FSharpType.IsFunction(typeof int -> int>)) - - // negative - Assert.IsFalse(FSharpType.IsFunction(typeof)) - - // null - CheckThrowsArgumentNullException(fun () -> FSharpType.IsFunction(null) |> ignore ) - - () - - [] - member this.IsModule() = - - let getasm (t : Type) = t.Assembly - - // Positive Test - let assemblyTypesPositive = (getasm (typeof)).GetTypes() - - let moduleType = - assemblyTypesPositive - |> Array.filter (fun ty -> ty.Name = "IsModule") - |> (fun arr -> arr.[0]) - - Assert.IsTrue(FSharpType.IsModule(moduleType)) //assemblyTypesPositive.[3] is Microsoft_FSharp_Reflection.FSharpModule which is module type - - // Negative Test - // FSharp Assembly - let asmCore = getasm (typeof>) - Assert.IsFalse(FSharpType.IsModule(asmCore.GetTypes().[0])) - - // .Net Assembly - let asmSystem = getasm (typeof) - Assert.IsFalse(FSharpType.IsModule(asmSystem.GetTypes().[0])) - - // custom Assembly - let asmCustom = getasm (typeof) - Assert.IsFalse(FSharpType.IsModule(asmCustom.GetTypes().[0])) - - // null - CheckThrowsArgumentNullException(fun () -> FSharpType.IsModule(null) |> ignore ) - - () - - [] - member this.IsRecord() = - - // positive - Assert.IsTrue(FSharpType.IsRecord(typeof)) - Assert.IsTrue(FSharpType.IsRecord(typeof>)) - - // negative - Assert.IsFalse(FSharpType.IsRecord(typeof)) - - // null - CheckThrowsArgumentNullException(fun () ->FSharpType.IsRecord(null) |> ignore ) - - () - - // Regression for 5588, Reflection: unit is still treated as a record type, but only if you pass BindingFlags.NonPublic - [] - member this.``IsRecord.Regression5588``() = - - // negative - Assert.IsFalse(FSharpType.IsRecord(typeof)) - -#if FX_RESHAPED_REFLECTION - Assert.IsFalse( FSharpType.IsRecord(typeof, true) ) -#else - Assert.IsFalse( FSharpType.IsRecord(typeof, System.Reflection.BindingFlags.NonPublic) ) -#endif - () - - - [] - member this.IsTuple() = - - // positive - Assert.IsTrue(FSharpType.IsTuple(typeof>)) - Assert.IsTrue(FSharpType.IsTuple(typeof>)) - - // negative - Assert.IsFalse(FSharpType.IsTuple(typeof)) - Assert.IsFalse(FSharpType.IsTuple(typeof)) - - // null - CheckThrowsArgumentNullException(fun () ->FSharpType.IsTuple(null) |> ignore ) - - () - - [] - member this.IsUnion() = - - // positive - Assert.IsTrue(FSharpType.IsUnion(typeof)) - Assert.IsTrue(FSharpType.IsUnion(typeof>)) - - // negative - Assert.IsFalse(FSharpType.IsUnion(typeof)) - Assert.IsFalse(FSharpType.IsUnion(typeof)) - - - // null - CheckThrowsArgumentNullException(fun () ->FSharpType.IsUnion(null) |> ignore ) - - () - - [] - member this.MakeFunctionType() = - - // positive - Assert.AreEqual(FSharpType.MakeFunctionType(typeof,typeof),typeofstring>) - - // negative - Assert.AreNotEqual(FSharpType.MakeFunctionType(typeof,typeof),typeofstring->int>) - - // null - CheckThrowsArgumentNullException(fun () ->FSharpType.MakeFunctionType(null,null) |> ignore ) - - () - - [] - member this.MakeTupleType() = - - // positive - Assert.AreEqual(FSharpType.MakeTupleType([|typeof; typeof|]),typeof>) - - // negative - Assert.AreNotEqual(FSharpType.MakeTupleType([|typeof; typeof|]),typeof>) - - // null - CheckThrowsArgumentException(fun () ->FSharpType.MakeTupleType([|null;null|]) |> ignore ) - - - - () - - -[] -type UnionCaseInfoTests() = - - let singlenullarycaseunion = SingleNullaryCaseDiscUnion.SingleNullaryCaseTag - - let singlecaseunion1 = SingleCaseDiscUnion.SingleCaseTag(1.0, 2.0, 3.0) - let singlecaseunion2 = SingleCaseDiscUnion.SingleCaseTag(4.0, 5.0, 6.0) - - let discUniontypeA = DiscUnionType.A - let discUniontypeB = DiscUnionType.B(1,Some(discUniontypeA)) - let discUniontypeC = DiscUnionType.C(1.0, "stringparam") - - let recDiscUniontypeB = DiscUnionType.B(1,Some(discUniontypeB)) - - let ((singlenullarycaseinfo:UnionCaseInfo),singlenullaryvaluearray) = FSharpValue.GetUnionFields(singlenullarycaseunion,typeof) - - let ((singlecaseinfo:UnionCaseInfo),singlevaluearray) = FSharpValue.GetUnionFields(singlecaseunion1,typeof) - - let ((discUnionInfoA:UnionCaseInfo), discvaluearray) = FSharpValue.GetUnionFields(discUniontypeA, typeof>) - let ((discUnionInfoB:UnionCaseInfo), discvaluearray) = FSharpValue.GetUnionFields(discUniontypeB, typeof>) - let ((discUnionInfoC:UnionCaseInfo), discvaluearray) = FSharpValue.GetUnionFields(discUniontypeC, typeof>) - - let ((recDiscCaseinfo:UnionCaseInfo),recDiscCasevaluearray) = FSharpValue.GetUnionFields(recDiscUniontypeB,typeof>) - - [] - member this.Equals() = - //positive - // single case - Assert.IsTrue(singlecaseinfo.Equals(singlecaseinfo)) - - // disc union - Assert.IsTrue(discUnionInfoA.Equals(discUnionInfoA)) - - // rec disc union - Assert.IsTrue(recDiscCaseinfo.Equals(recDiscCaseinfo)) - - // negative - // single case - Assert.IsFalse(singlecaseinfo.Equals(discUnionInfoA)) - - // disc union - Assert.IsFalse(discUnionInfoA.Equals(discUnionInfoB)) - - // rec disc union - Assert.IsFalse(recDiscCaseinfo.Equals(discUnionInfoA)) - - // null - Assert.IsFalse(singlecaseinfo.Equals(null)) - () - - [] - member this.GetCustomAttributes() = - - // single case - let singlecaseAttribute = (singlecaseinfo.GetCustomAttributes()).[0] :?> Attribute - Assert.AreEqual(singlecaseAttribute.ToString(),"Microsoft.FSharp.Core.CompilationMappingAttribute" ) - - // disc union - let discunionAttribute = (discUnionInfoA.GetCustomAttributes()).[0] :?> Attribute - Assert.AreEqual(discunionAttribute.ToString(),"Microsoft.FSharp.Core.CompilationMappingAttribute" ) - - // rec disc union - let recdiscAttribute = (recDiscCaseinfo.GetCustomAttributes()).[0] :?> Attribute - Assert.AreEqual(recdiscAttribute.ToString(),"Microsoft.FSharp.Core.CompilationMappingAttribute" ) - - // null - CheckThrowsArgumentNullException(fun () -> singlecaseinfo.GetCustomAttributes(null) |> ignore ) - () - - [] - member this.GetFields() = - - // single case - let singlecaseFieldInfo = (singlecaseinfo.GetFields()).[0] - Assert.AreEqual(singlecaseFieldInfo.PropertyType ,typeof<(float)>) - - // disc union null empty - let discunionFieldInfoEpt = discUnionInfoA.GetFields() - Assert.AreEqual(discunionFieldInfoEpt.Length ,0) - - // disc union int - let discunionFieldInfo = (discUnionInfoB.GetFields()).[0] - Assert.AreEqual(discunionFieldInfo.PropertyType ,typeof) - - // rec disc union - let recdiscFieldInfo = (recDiscCaseinfo.GetFields()).[0] - Assert.AreEqual(recdiscFieldInfo.PropertyType ,typeof) - - - () - - [] - member this.GetHashCode() = - - // positive - // single case - Assert.AreEqual(singlecaseinfo.GetHashCode(),singlecaseinfo.GetHashCode()) - - // disc union - - Assert.AreEqual(discUnionInfoA.GetHashCode(),discUnionInfoA.GetHashCode()) - - // rec disc union - - Assert.AreEqual(recDiscCaseinfo.GetHashCode(),recDiscCaseinfo.GetHashCode()) - - // negative - // disc union - Assert.AreNotEqual(discUnionInfoA.GetHashCode(),discUnionInfoB.GetHashCode()) - - () - - - [] - member this.GetType() = - - // single case - Assert.AreEqual(singlecaseinfo.GetType(),typeof ) - - // disc union - Assert.AreEqual(discUnionInfoA.GetType(),typeof ) - - // rec disc union - Assert.AreEqual(recDiscCaseinfo.GetType(),typeof ) - () - - - [] - member this.ToString() = - - // single case - Assert.AreEqual(singlenullarycaseinfo.ToString(),"SingleNullaryCaseDiscUnion.SingleNullaryCaseTag") - - // single case - Assert.AreEqual(singlecaseinfo.ToString(),"SingleCaseDiscUnion.SingleCaseTag") - - // disc union - Assert.IsTrue((discUnionInfoA.ToString()).Contains("DiscUnionType") ) - - // rec disc union - Assert.IsTrue((recDiscCaseinfo.ToString()).Contains("DiscUnionType")) - () \ No newline at end of file diff --git a/src/fsharp/FSharp.Core.Unittests/project.json b/src/fsharp/FSharp.Core.Unittests/project.json deleted file mode 100644 index dffe6fdcc7f..00000000000 --- a/src/fsharp/FSharp.Core.Unittests/project.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "version": "1.0.0-*", - "name": "FSharp.Core.Unittests", - "buildOptions": { - "debugType": "portable", - "emitEntryPoint": true - }, - "dependencies": { - "nunit": "3.5.0", - "nunitlite": "3.5.0", - "System.ValueTuple": "4.3.1", - "FsCheck": "2.6.2", - "Microsoft.FSharp.TupleSample": "1.0.0-alpha-161112" - }, - "runtimes": { - "win7-x86": {}, - "win7-x64": {}, - "osx.10.11-x64": {}, - "ubuntu.14.04-x64": {} - }, - "frameworks": { - "netcoreapp1.0": { - "dependencies": { - "Microsoft.NETCore.App": { - "type": "platform", - "version": "1.0.1" - } - }, - "imports": [ "netstandard1.1", "netstandard1.6", "portable-net45+win8+wp8+wpa81" ] - } - }, -} diff --git a/src/fsharp/FSharp.Core.nuget/FSharp.Core.4.1.xxx.nuspec b/src/fsharp/FSharp.Core.nuget/FSharp.Core.4.1.xxx.nuspec deleted file mode 100644 index 84ca12cf79f..00000000000 --- a/src/fsharp/FSharp.Core.nuget/FSharp.Core.4.1.xxx.nuspec +++ /dev/null @@ -1,126 +0,0 @@ - - - - - FSharp.Core - - FSharp.Core redistributables from Visual F# 4.1.0 - Supported Platforms: - .NET 2.0 (net20) - .NET 4.0 (net40) - .NET 4.5+ (net45) - .NET Portable Profile 7 (portable-net45+netcore45) - .NET Portable Profile 47 (portable-net45+sl5+netcore45) - .NET Portable Profile 78 (portable-net45+netcore45+wp8) - .NET Portable Profile 259 (portable-net45+netcore45+wpa81+wp8) - .NET Standard 1.6 (netstandard1.6) - MonoAndroid, MonoTouch, Xamarin.iOS (portable-net45+monoandroid10+monotouch10+xamarinios10) - XamarinMac mobile (xamarinmac20) - - en-US - false - $version$ - $authors$ - $licenseUrl$ - $projectUrl$ - $tags$ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/fsharp/FSharp.Core.nuget/FSharp.Core.4.2.xxx.nuspec b/src/fsharp/FSharp.Core.nuget/FSharp.Core.4.2.xxx.nuspec deleted file mode 100644 index 26e97553648..00000000000 --- a/src/fsharp/FSharp.Core.nuget/FSharp.Core.4.2.xxx.nuspec +++ /dev/null @@ -1,66 +0,0 @@ - - - - - FSharp.Core - FSharp.Core for F# 4.1 -

FSharp.Core for F# 4.1 - - FSharp.Core redistributables from Visual F# 4.1.0 - Supported Platforms: - .NET 4.5+ (net45) - netstandard1.6 (netstandard1.6) - netstandard2.0 (netstandard2.0) - - en-US - $version$ - $authors$ - $licenseUrl$ - $projectUrl$ - $tags$ - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/fsharp/FSharp.Core.nuget/FSharp.Core.nuget.proj b/src/fsharp/FSharp.Core.nuget/FSharp.Core.nuget.proj index 6373fc3fb3e..550d2fb7245 100644 --- a/src/fsharp/FSharp.Core.nuget/FSharp.Core.nuget.proj +++ b/src/fsharp/FSharp.Core.nuget/FSharp.Core.nuget.proj @@ -12,13 +12,15 @@ https://github.com/Microsoft/visualfsharp Microsoft and F# Software Foundation Visual F# Compiler FSharp functional programming + Microsoft and F# Software Foundation + (C) Microsoft Corporation. All rights reserved. + true $(FSharpSourcesRoot)\..\$(Configuration)\artifacts - - - + + @@ -37,8 +39,8 @@ - + @@ -52,16 +54,16 @@ X.X.XXX - $(FSharpCore41TargetVersion) - 4.1 + $(FSharpCoreFrozenPortableTargetPackageVersion) + $(FSharpCoreFrozenPortableTargetMajorVersion) - $(FSharpCore42TargetVersion) - 4.2 + $(FSCorePackageVersion) + $(FSCoreMajorVersion) - $(FSharpCore41FrozenPortableTargetVersion) - 4.1 - - -prop "licenseUrl=$(PackageLicenceUrl)" -prop "version=$(PackageVersion)" -prop "authors=$(PackageAuthors)" -prop "projectUrl=$(PackageProjectUrl)" -prop "tags=$(PackageTags)" + + $(GitHeadSha) + [developer build] + -prop "licenseUrl=$(PackageLicenceUrl)" -prop "version=$(PackageVersion)" -prop "authors=$(PackageAuthors)" -prop "projectUrl=$(PackageProjectUrl)" -prop "tags=$(PackageTags)" -prop "githeadsha=$(NormalizedGitHeadSha)" -prop "owners=$(PackageOwners)" -prop "copyright=$(PackageCopyright)" -prop "requireLicenseAcceptance=$(PackageRequireLicenceAcceptence)" diff --git a/src/fsharp/FSharp.Core.nuget/FSharp.Core.nuspec b/src/fsharp/FSharp.Core.nuget/FSharp.Core.nuspec new file mode 100644 index 00000000000..d71634de277 --- /dev/null +++ b/src/fsharp/FSharp.Core.nuget/FSharp.Core.nuspec @@ -0,0 +1,74 @@ + + + + + FSharp.Core + FSharp.Core for F# 4.5 + FSharp.Core for F# 4.5 + + FSharp.Core redistributables from Visual F# Tools version 10.2 For F# 4.5 + Supported Platforms: + .NET Framework 4.5+ (net45) + netstandard1.6 (netstandard1.6) + netstandard2.0 (netstandard2.0) + + Commit hash: $githeadsha$. + + $owners$ + $version$ + $authors$ + $copyright$ + $licenseUrl$ + $projectUrl$ + http://fsharp.org/img/logo.png + $tags$ + $requireLicenseAcceptance$ + en-US + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/fsharp/FSharp.Core.nuget/Microsoft.Portable.FSharp.Core.4.1.xxx.nuspec b/src/fsharp/FSharp.Core.nuget/Microsoft.Portable.FSharp.Core.4.1.xxx.nuspec deleted file mode 100644 index 22812ebf2eb..00000000000 --- a/src/fsharp/FSharp.Core.nuget/Microsoft.Portable.FSharp.Core.4.1.xxx.nuspec +++ /dev/null @@ -1,27 +0,0 @@ - - - - - Microsoft.Portable.FSharp.Core - Frozen portable profiles - en-US - false - $version$ - $authors$ - $licenseUrl$ - $projectUrl$ - $tags$ - - - - - - - - - - - - - - diff --git a/src/fsharp/FSharp.Core.nuget/Microsoft.Portable.FSharp.Core.nuspec b/src/fsharp/FSharp.Core.nuget/Microsoft.Portable.FSharp.Core.nuspec new file mode 100644 index 00000000000..7ca41bb2168 --- /dev/null +++ b/src/fsharp/FSharp.Core.nuget/Microsoft.Portable.FSharp.Core.nuspec @@ -0,0 +1,27 @@ + + + + + Microsoft.Portable.FSharp.Core + Frozen portable profiles + en-US + false + $version$ + $authors$ + $licenseUrl$ + $projectUrl$ + $tags$ + + + + + + + + + + + + + + diff --git a/src/fsharp/FSharp.Core/FSharp.Core.fsproj b/src/fsharp/FSharp.Core/FSharp.Core.fsproj index 1270c5cef98..8681b9c4fc5 100644 --- a/src/fsharp/FSharp.Core/FSharp.Core.fsproj +++ b/src/fsharp/FSharp.Core/FSharp.Core.fsproj @@ -6,6 +6,7 @@ $(MSBuildProjectDirectory)\..\.. FSharp LKG + v4.5 @@ -16,11 +17,11 @@ Library FSharp.Core FSHARP_CORE;$(DefineConstants) + BUILDING_WITH_LKG;$(DefineConstants) $(NoWarn);45;55;62;75;1204 0x05000000 true true - true $(OtherFlags) --warnon:1182 --compiling-fslib --extraoptimizationloops:1 $(OtherFlags) --warnon:3218 $(OtherFlags) --maxerrors:20 @@ -34,17 +35,8 @@ PreserveNewest - - - $(FSharpSourcesRoot)\..\loc\lcl\{Lang}\$(AssemblyName).dll.lcl - $(FSharpSourcesRoot)\..\loc\lci\$(AssemblyName).dll.lci - false - false - - - - - + + false @@ -159,12 +151,6 @@ Reflection/reflect.fs - - Event/event.fsi - - - Event/event.fs - Numerics/n.fsi @@ -201,11 +187,35 @@ NativeInterop/nativeptr.fs - - Async/control.fsi + + Control/event.fsi + + + Control/event.fs + + + Control/async.fsi - - Async/control.fs + + Control/async.fs + + + Control/eventmodule.fsi + + + Control/eventmodule.fs + + + Control/observable.fsi + + + Control/observable.fs + + + MailboxProcessor/mailbox.fsi + + + MailboxProcessor/mailbox.fs Queries/Linq.fsi @@ -234,9 +244,6 @@ Extras/fslib-extra-pervasives.fs - - assemblyinfo.FSharp.Core.dll.fs - @@ -268,17 +275,6 @@ - - - - - - Microsoft - StrongName - - - - - -prop "licenseUrl=$(PackageLicenceUrl)" -prop "version=$(FSharpCore42TargetVersion)" -prop "authors=$(PackageAuthors)" -prop "projectUrl=$(PackageProjectUrl)" -prop "tags=$(PackageTags)" + -prop "licenseUrl=$(PackageLicenceUrl)" -prop "version=$(FSharpCoreFrozenPortablePackageVersion)" -prop "authors=$(PackageAuthors)" -prop "projectUrl=$(PackageProjectUrl)" -prop "tags=$(PackageTags)" diff --git a/src/fsharp/FSharp.Core/Linq.fs b/src/fsharp/FSharp.Core/Linq.fs index 8c5c6513269..8b6b5124c4d 100644 --- a/src/fsharp/FSharp.Core/Linq.fs +++ b/src/fsharp/FSharp.Core/Linq.fs @@ -782,11 +782,7 @@ module LeafExpressionConverter = typedefof>, tyargs else let tyargs = [| vP.Type; bodyP.Type |] -#if FX_NO_CONVERTER typedefof>, tyargs -#else - typedefof>, tyargs -#endif let convType = lambdaTy.MakeGenericType tyargs let convDelegate = Expression.Lambda(convType, bodyP, [| vP |]) |> asExpr Expression.Call(typeof,"ToFSharpFunc", tyargs,[| convDelegate |]) |> asExpr diff --git a/src/fsharp/FSharp.Core/array.fs b/src/fsharp/FSharp.Core/array.fs index dfcc0a9def2..29713557fc9 100644 --- a/src/fsharp/FSharp.Core/array.fs +++ b/src/fsharp/FSharp.Core/array.fs @@ -13,9 +13,6 @@ namespace Microsoft.FSharp.Collections #if FX_RESHAPED_REFLECTION open System.Reflection #endif -#if FX_NO_ICLONEABLE - open Microsoft.FSharp.Core.ICloneableExtensions -#endif /// Basic operations on arrays [] @@ -166,6 +163,9 @@ namespace Microsoft.FSharp.Collections Microsoft.FSharp.Primitives.Basics.Array.subUnchecked 0 count array let inline countByImpl (comparer:IEqualityComparer<'SafeKey>) (projection:'T->'SafeKey) (getKey:'SafeKey->'Key) (array:'T[]) = + let length = array.Length + if length = 0 then Microsoft.FSharp.Primitives.Basics.Array.zeroCreateUnchecked 0 else + let dict = Dictionary comparer // Build the groupings @@ -282,6 +282,9 @@ namespace Microsoft.FSharp.Collections [] let distinctBy projection (array:'T[]) = checkNonNull "array" array + let length = array.Length + if length = 0 then Microsoft.FSharp.Primitives.Basics.Array.zeroCreateUnchecked 0 else + let temp = Microsoft.FSharp.Primitives.Basics.Array.zeroCreateUnchecked array.Length let mutable i = 0 let hashSet = HashSet<_>(HashIdentity.Structural<_>) @@ -408,10 +411,12 @@ namespace Microsoft.FSharp.Collections loop 0 let inline groupByImpl (comparer:IEqualityComparer<'SafeKey>) (keyf:'T->'SafeKey) (getKey:'SafeKey->'Key) (array: 'T[]) = + let length = array.Length + if length = 0 then Microsoft.FSharp.Primitives.Basics.Array.zeroCreateUnchecked 0 else let dict = Dictionary<_,ResizeArray<_>> comparer // Build the groupings - for i = 0 to (array.Length - 1) do + for i = 0 to length - 1 do let v = array.[i] let safeKey = keyf v let mutable prev = Unchecked.defaultof<_> @@ -1238,6 +1243,29 @@ namespace Microsoft.FSharp.Collections elif array.Length = 0 then invalidArg "array" LanguagePrimitives.ErrorStrings.InputSequenceEmptyString else invalidArg "array" (SR.GetString(SR.inputSequenceTooLong)) + let transposeArrays (array:'T[][]) = + let len = array.Length + if len = 0 then Microsoft.FSharp.Primitives.Basics.Array.zeroCreateUnchecked 0 else + let lenInner = array.[0].Length + + for j in 1..len-1 do + if lenInner <> array.[j].Length then + invalidArgDifferentArrayLength "array.[0]" lenInner (String.Format("array.[{0}]", j)) array.[j].Length + + let result : 'T[][] = Microsoft.FSharp.Primitives.Basics.Array.zeroCreateUnchecked lenInner + for i in 0..lenInner-1 do + result.[i] <- Microsoft.FSharp.Primitives.Basics.Array.zeroCreateUnchecked len + for j in 0..len-1 do + result.[i].[j] <- array.[j].[i] + result + + [] + let transpose (arrays:seq<'T[]>) = + checkNonNull "arrays" arrays + match arrays with + | :? ('T[][]) as ts -> ts |> transposeArrays // avoid a clone, since we only read the array + | _ -> arrays |> Seq.toArray |> transposeArrays + [] let truncate count (array:'T[]) = checkNonNull "array" array @@ -1247,7 +1275,6 @@ namespace Microsoft.FSharp.Collections let count' = Operators.min count len Microsoft.FSharp.Primitives.Basics.Array.subUnchecked 0 count' array -#if !FX_NO_TPL_PARALLEL module Parallel = open System.Threading.Tasks @@ -1357,4 +1384,3 @@ namespace Microsoft.FSharp.Collections iFalse <- iFalse + 1 res1, res2 -#endif diff --git a/src/fsharp/FSharp.Core/array.fsi b/src/fsharp/FSharp.Core/array.fsi index d101533cfe9..ad9e82f27fb 100644 --- a/src/fsharp/FSharp.Core/array.fsi +++ b/src/fsharp/FSharp.Core/array.fsi @@ -12,7 +12,7 @@ namespace Microsoft.FSharp.Collections [] module Array = - /// Builds a new array that contains the cartesian product of the two input arrays. + /// Returns a new array that contains all pairings of elements from the first and second arrays. /// The first input array. /// The second input array. /// Thrown when either of the input arrays is null. @@ -985,6 +985,14 @@ namespace Microsoft.FSharp.Collections [] val toSeq: array:'T[] -> seq<'T> + /// Returns the transpose of the given sequence of arrays. + /// The input sequence of arrays. + /// The transposed array. + /// Thrown when the input sequence is null. + /// Thrown when the input arrays differ in length. + [] + val transpose: arrays:seq<'T[]> -> 'T[][] + /// Returns at most N elements in a new array. /// The maximum number of items to return. /// The input array. @@ -1102,7 +1110,6 @@ namespace Microsoft.FSharp.Collections [] val zip3: array1:'T1[] -> array2:'T2[] -> array3:'T3[] -> ('T1 * 'T2 * 'T3)[] -#if !FX_NO_TPL_PARALLEL /// Provides parallel operations on arrays module Parallel = @@ -1198,4 +1205,3 @@ namespace Microsoft.FSharp.Collections /// Thrown when the input array is null. [] val partition : predicate:('T -> bool) -> array:'T[] -> 'T[] * 'T[] -#endif diff --git a/src/fsharp/FSharp.Core/array2.fs b/src/fsharp/FSharp.Core/array2.fs index ec06deb96f1..d6836475f7e 100644 --- a/src/fsharp/FSharp.Core/array2.fs +++ b/src/fsharp/FSharp.Core/array2.fs @@ -53,7 +53,7 @@ namespace Microsoft.FSharp.Collections [] let zeroCreateBased (base1:int) (base2:int) (length1:int) (length2:int) = if (base1 = 0 && base2 = 0) then -#if FX_PORTABLE_OR_NETSTANDARD +#if NETSTANDARD1_6 zeroCreate length1 length2 #else // Note: this overload is available on Compact Framework and Silverlight, but not Portable diff --git a/src/fsharp/FSharp.Core/async.fs b/src/fsharp/FSharp.Core/async.fs new file mode 100644 index 00000000000..4fe2d48d6fc --- /dev/null +++ b/src/fsharp/FSharp.Core/async.fs @@ -0,0 +1,1803 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace Microsoft.FSharp.Control + + #nowarn "40" + #nowarn "52" // The value has been copied to ensure the original is not mutated by this operation + + open System + open System.Diagnostics + open System.Reflection + open System.Runtime.CompilerServices + open System.Runtime.ExceptionServices + open System.Threading + open System.Threading.Tasks + open Microsoft.FSharp.Core + open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators + open Microsoft.FSharp.Control + open Microsoft.FSharp.Collections + +#if FX_RESHAPED_REFLECTION + open ReflectionAdapters +#endif + + type LinkedSubSource(cancellationToken : CancellationToken) = + + let failureCTS = new CancellationTokenSource() + + let linkedCTS = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken, failureCTS.Token) + + member this.Token = linkedCTS.Token + + member this.Cancel() = failureCTS.Cancel() + + member this.Dispose() = + linkedCTS.Dispose() + failureCTS.Dispose() + + interface IDisposable with + member this.Dispose() = this.Dispose() + + /// Global mutable state used to associate Exception + [] + module ExceptionDispatchInfoHelpers = + + let associationTable = ConditionalWeakTable() + + type ExceptionDispatchInfo with + + member edi.GetAssociatedSourceException() = + let exn = edi.SourceException + // Try to store the entry in the association table to allow us to recover it later. + try associationTable.Add(exn, edi) with _ -> () + exn + + // Capture, but prefer the saved information if available + [] + static member RestoreOrCapture(exn) = + match associationTable.TryGetValue(exn) with + | true, edi -> edi + | _ -> + ExceptionDispatchInfo.Capture(exn) + + member inline edi.ThrowAny() = + edi.Throw() + Unchecked.defaultof<'T> // Note, this line should not be reached, but gives a generic return type + + // F# don't always take tailcalls to functions returning 'unit' because this + // is represented as type 'void' in the underlying IL. + // Hence we don't use the 'unit' return type here, and instead invent our own type. + [] + type AsyncReturn = + | AsyncReturn + + type cont<'T> = ('T -> AsyncReturn) + type econt = (ExceptionDispatchInfo -> AsyncReturn) + type ccont = (OperationCanceledException -> AsyncReturn) + + [] + type Trampoline() = + + let fake () = Unchecked.defaultof + let unfake (_ : AsyncReturn) = () + + [] + static let bindLimitBeforeHijack = 300 + + [] + static val mutable private thisThreadHasTrampoline : bool + + static member ThisThreadHasTrampoline = + Trampoline.thisThreadHasTrampoline + + let mutable storedCont = None + let mutable storedExnCont = None + let mutable bindCount = 0 + + /// Use this trampoline on the synchronous stack if none exists, and execute + /// the given function. The function might write its continuation into the trampoline. + [] + member __.Execute (firstAction : unit -> AsyncReturn) = + + let thisIsTopTrampoline = + if Trampoline.thisThreadHasTrampoline then + false + else + Trampoline.thisThreadHasTrampoline <- true + true + try + let mutable keepGoing = true + let mutable action = firstAction + while keepGoing do + try + action() |> unfake + match storedCont with + | None -> + keepGoing <- false + | Some cont -> + storedCont <- None + action <- cont + // Let the exception propagate all the way to the trampoline to get a full .StackTrace entry + with exn -> + match storedExnCont with + | None -> + reraise() + | Some econt -> + storedExnCont <- None + let edi = ExceptionDispatchInfo.RestoreOrCapture exn + action <- (fun () -> econt edi) + + finally + if thisIsTopTrampoline then + Trampoline.thisThreadHasTrampoline <- false + fake() + + /// Increment the counter estimating the size of the synchronous stack and + /// return true if time to jump on trampoline. + member __.IncrementBindCount() = + bindCount <- bindCount + 1 + bindCount >= bindLimitBeforeHijack + + /// Prepare to abandon the synchronous stack of the current execution and save the continuation in the trampoline. + member __.Set action = + assert storedCont.IsNone + bindCount <- 0 + storedCont <- Some action + fake() + + /// Save the exception continuation during propagation of an exception, or prior to raising an exception + member __.OnExceptionRaised (action: econt) = + assert storedExnCont.IsNone + storedExnCont <- Some action + + type TrampolineHolder() as this = + let mutable trampoline = null + + let fake () = Unchecked.defaultof + static let unfake (_: AsyncReturn) = () + + // Preallocate this delegate and keep it in the trampoline holder. + let sendOrPostCallbackWithTrampoline = + SendOrPostCallback (fun o -> + let f = unbox<(unit -> AsyncReturn)> o + this.ExecuteWithTrampoline f |> unfake) + + // Preallocate this delegate and keep it in the trampoline holder. + let waitCallbackForQueueWorkItemWithTrampoline = + WaitCallback (fun o -> + let f = unbox<(unit -> AsyncReturn)> o + this.ExecuteWithTrampoline f |> unfake) + +#if !FX_NO_PARAMETERIZED_THREAD_START + // Preallocate this delegate and keep it in the trampoline holder. + let threadStartCallbackForStartThreadWithTrampoline = + ParameterizedThreadStart (fun o -> + let f = unbox<(unit -> AsyncReturn)> o + this.ExecuteWithTrampoline f |> unfake) +#endif + + /// Execute an async computation after installing a trampoline on its synchronous stack. + [] + member __.ExecuteWithTrampoline firstAction = + trampoline <- new Trampoline() + trampoline.Execute firstAction + + member this.PostWithTrampoline (syncCtxt: SynchronizationContext) (f : unit -> AsyncReturn) = + syncCtxt.Post (sendOrPostCallbackWithTrampoline, state=(f |> box)) + fake() + + member this.QueueWorkItemWithTrampoline (f: unit -> AsyncReturn) = + if not (ThreadPool.QueueUserWorkItem(waitCallbackForQueueWorkItemWithTrampoline, f |> box)) then + failwith "failed to queue user work item" + fake() + + member this.PostOrQueueWithTrampoline (syncCtxt : SynchronizationContext) f = + match syncCtxt with + | null -> this.QueueWorkItemWithTrampoline f + | _ -> this.PostWithTrampoline syncCtxt f + +#if FX_NO_PARAMETERIZED_THREAD_START + // This should be the only call to Thread.Start in this library. We must always install a trampoline. + member this.StartThreadWithTrampoline (f : unit -> AsyncReturn) = +#if FX_NO_THREAD + this.QueueWorkItemWithTrampoline(f) +#else + (new Thread((fun _ -> this.Execute f |> unfake), IsBackground=true)).Start() + fake() +#endif + +#else + // This should be the only call to Thread.Start in this library. We must always install a trampoline. + member __.StartThreadWithTrampoline (f : unit -> AsyncReturn) = + (new Thread(threadStartCallbackForStartThreadWithTrampoline,IsBackground=true)).Start(f|>box) + fake() +#endif + + /// Save the exception continuation during propagation of an exception, or prior to raising an exception + member inline __.OnExceptionRaised(econt) = + trampoline.OnExceptionRaised econt + + /// Call a continuation, but first check if an async computation should trampoline on its synchronous stack. + member inline __.HijackCheckThenCall (cont : 'T -> AsyncReturn) res = + if trampoline.IncrementBindCount() then + trampoline.Set (fun () -> cont res) + else + // NOTE: this must be a tailcall + cont res + + [] + [] + /// Represents rarely changing components of an in-flight async computation + type AsyncActivationAux = + { /// The active cancellation token + token : CancellationToken + + /// The exception continuation + econt : econt + + /// The cancellation continuation + ccont : ccont + + /// Holds some commonly-allocated callbacks and a mutable location to use for a trampoline + trampolineHolder : TrampolineHolder } + + [] + [] + /// Represents context for an in-flight async computation + type AsyncActivationContents<'T> = + { /// The success continuation + cont : cont<'T> + + /// The rarely changing components + aux : AsyncActivationAux } + + /// A struct wrapper around AsyncActivationContents. Using a struct wrapper allows us to change representation of the + /// contents at a later point, e.g. to change the contents to a .NET Task or some other representation. + [] + type AsyncActivation<'T>(contents: AsyncActivationContents<'T>) = + + /// Produce a new execution context for a composite async + member ctxt.WithCancellationContinuation ccont = AsyncActivation<'T> { contents with aux = { ctxt.aux with ccont = ccont } } + + /// Produce a new execution context for a composite async + member ctxt.WithExceptionContinuation econt = AsyncActivation<'T> { contents with aux = { ctxt.aux with econt = econt } } + + /// Produce a new execution context for a composite async + member ctxt.WithContinuation(cont) = AsyncActivation<'U> { cont = cont; aux = contents.aux } + + /// Produce a new execution context for a composite async + member ctxt.WithContinuations(cont, econt) = AsyncActivation<'U> { cont = cont; aux = { contents.aux with econt = econt } } + + /// Produce a new execution context for a composite async + member ctxt.WithContinuations(cont, econt, ccont) = AsyncActivation<'T> { contents with cont = cont; aux = { ctxt.aux with econt = econt; ccont = ccont } } + + /// The extra information relevant to the execution of the async + member ctxt.aux = contents.aux + + /// The success continuation relevant to the execution of the async + member ctxt.cont = contents.cont + + /// The exception continuation relevant to the execution of the async + member ctxt.econt = contents.aux.econt + + /// The cancellation continuation relevant to the execution of the async + member ctxt.ccont = contents.aux.ccont + + /// The cancellation token relevant to the execution of the async + member ctxt.token = contents.aux.token + + /// The trampoline holder being used to protect execution of the async + member ctxt.trampolineHolder = contents.aux.trampolineHolder + + /// Check if cancellation has been requested + member ctxt.IsCancellationRequested = contents.aux.token.IsCancellationRequested + + /// Call the cancellation continuation of the active computation + member ctxt.OnCancellation () = + contents.aux.ccont (new OperationCanceledException (contents.aux.token)) + + /// Check for trampoline hijacking. + member inline ctxt.HijackCheckThenCall cont arg = + contents.aux.trampolineHolder.HijackCheckThenCall cont arg + + /// Call the success continuation of the asynchronous execution context after checking for + /// cancellation and trampoline hijacking. + member ctxt.OnSuccess result = + if ctxt.IsCancellationRequested then + ctxt.OnCancellation () + else + ctxt.HijackCheckThenCall ctxt.cont result + + /// Call the exception continuation directly + member ctxt.CallExceptionContinuation edi = + contents.aux.econt edi + + /// Save the exception continuation during propagation of an exception, or prior to raising an exception + member ctxt.OnExceptionRaised() = + contents.aux.trampolineHolder.OnExceptionRaised contents.aux.econt + + /// Make an initial async activation. + static member Create cancellationToken trampolineHolder cont econt ccont : AsyncActivation<'T> = + AsyncActivation { cont = cont; aux = { token = cancellationToken; econt = econt; ccont = ccont; trampolineHolder = trampolineHolder } } + + /// Queue the success continuation of the asynchronous execution context as a work item in the thread pool + /// after installing a trampoline + member ctxt.QueueContinuationWithTrampoline (result: 'T) = + let ctxt = ctxt + ctxt.aux.trampolineHolder.QueueWorkItemWithTrampoline(fun () -> ctxt.cont result) + + /// Call the success continuation of the asynchronous execution context + member ctxt.CallContinuation(result: 'T) = + ctxt.cont result + + /// Represents an asynchronous computation + [] + type Async<'T> = + { Invoke : (AsyncActivation<'T> -> AsyncReturn) } + + /// Mutable register to help ensure that code is only executed once + [] + type Latch() = + let mutable i = 0 + + /// Execute the latch + member this.Enter() = Interlocked.CompareExchange(&i, 1, 0) = 0 + + /// Ensures that a function is only called once + [] + type Once() = + let latch = Latch() + + /// Execute the function at most once + member this.Do f = + if latch.Enter() then + f() + + /// Represents the result of an asynchronous computation + [] + type AsyncResult<'T> = + | Ok of 'T + | Error of ExceptionDispatchInfo + | Canceled of OperationCanceledException + + /// Get the result of an asynchronous computation + [] + member res.Commit () = + match res with + | AsyncResult.Ok res -> res + | AsyncResult.Error edi -> edi.ThrowAny() + | AsyncResult.Canceled exn -> raise exn + + /// Primitives to execute asynchronous computations + module AsyncPrimitives = + + let inline fake () = Unchecked.defaultof + + let unfake (_: AsyncReturn) = () + + /// The mutable global CancellationTokenSource, see Async.DefaultCancellationToken + let mutable defaultCancellationTokenSource = new CancellationTokenSource() + + /// Primitive to invoke an async computation. + // + // Note: direct calls to this function may end up in user assemblies via inlining + [] + let Invoke (computation: Async<'T>) (ctxt: AsyncActivation<_>) : AsyncReturn = + ctxt.HijackCheckThenCall computation.Invoke ctxt + + /// Apply userCode to x. If no exception is raised then call the normal continuation. Used to implement + /// 'finally' and 'when cancelled'. + [] + let CallThenContinue userCode arg (ctxt: AsyncActivation<_>) : AsyncReturn = + let mutable result = Unchecked.defaultof<_> + let mutable ok = false + + try + result <- userCode arg + ok <- true + finally + if not ok then + ctxt.OnExceptionRaised() + + if ok then + ctxt.HijackCheckThenCall ctxt.cont result + else + fake() + + /// Apply 'part2' to 'result1' and invoke the resulting computation. + // + // Note: direct calls to this function end up in user assemblies via inlining + [] + let CallThenInvoke (ctxt: AsyncActivation<_>) result1 part2 : AsyncReturn = + let mutable result = Unchecked.defaultof<_> + let mutable ok = false + + try + result <- part2 result1 + ok <- true + finally + if not ok then + ctxt.OnExceptionRaised() + + if ok then + Invoke result ctxt + else + fake() + + /// Like `CallThenInvoke` but does not do a hijack check for historical reasons (exact code compat) + [] + let CallThenInvokeNoHijackCheck (ctxt: AsyncActivation<_>) userCode result1 = + let mutable res = Unchecked.defaultof<_> + let mutable ok = false + + try + res <- userCode result1 + ok <- true + finally + if not ok then + ctxt.OnExceptionRaised() + + if ok then + res.Invoke ctxt + else + fake() + + /// Apply 'catchFilter' to 'arg'. If the result is 'Some' invoke the resulting computation. If the result is 'None' + /// then send 'result1' to the exception continuation. + [] + let CallFilterThenInvoke (ctxt: AsyncActivation<'T>) catchFilter (edi: ExceptionDispatchInfo) : AsyncReturn = + let mutable resOpt = Unchecked.defaultof<_> + let mutable ok = false + + try + resOpt <- catchFilter (edi.GetAssociatedSourceException()) + ok <- true + finally + if not ok then + ctxt.OnExceptionRaised() + + if ok then + match resOpt with + | None -> + ctxt.HijackCheckThenCall ctxt.econt edi + | Some res -> + Invoke res ctxt + else + fake() + + /// Internal way of making an async from code, for exact code compat. + /// Perform a cancellation check and ensure that any exceptions raised by + /// the immediate execution of "userCode" are sent to the exception continuation. + [] + let ProtectedCode (ctxt: AsyncActivation<'T>) userCode = + if ctxt.IsCancellationRequested then + ctxt.OnCancellation () + else + let mutable ok = false + try + let res = userCode ctxt + ok <- true + res + finally + if not ok then + ctxt.OnExceptionRaised() + + /// Build a primitive without any exception or resync protection + [] + let MakeAsync body = { Invoke = body } + + [] + // Note: direct calls to this function end up in user assemblies via inlining + let Bind (ctxt: AsyncActivation<'T>) (part1: Async<'U>) (part2: 'U -> Async<'T>) : AsyncReturn = + if ctxt.IsCancellationRequested then + ctxt.OnCancellation () + else + Invoke part1 (ctxt.WithContinuation(fun result1 -> CallThenInvokeNoHijackCheck ctxt part2 result1 )) + + [] + /// Re-route all continuations to execute the finally function. + let TryFinally (ctxt: AsyncActivation<'T>) computation finallyFunction = + if ctxt.IsCancellationRequested then + ctxt.OnCancellation () + else + // The new continuation runs the finallyFunction and resumes the old continuation + // If an exception is thrown we continue with the previous exception continuation. + let cont result = + CallThenContinue finallyFunction () (ctxt.WithContinuation(fun () -> ctxt.cont result)) + // The new exception continuation runs the finallyFunction and then runs the previous exception continuation. + // If an exception is thrown we continue with the previous exception continuation. + let econt exn = + CallThenContinue finallyFunction () (ctxt.WithContinuation(fun () -> ctxt.econt exn)) + // The cancellation continuation runs the finallyFunction and then runs the previous cancellation continuation. + // If an exception is thrown we continue with the previous cancellation continuation (the exception is lost) + let ccont cexn = + CallThenContinue finallyFunction () (ctxt.WithContinuations(cont=(fun () -> ctxt.ccont cexn), econt = (fun _ -> ctxt.ccont cexn))) + let newCtxt = ctxt.WithContinuations(cont=cont, econt=econt, ccont=ccont) + computation.Invoke newCtxt + + /// Re-route the exception continuation to call to catchFunction. If catchFunction returns None then call the exception continuation. + /// If it returns Some, invoke the resulting async. + [] + let TryWith (ctxt: AsyncActivation<'T>) computation catchFunction = + if ctxt.IsCancellationRequested then + ctxt.OnCancellation () + else + let newCtxt = + ctxt.WithExceptionContinuation(fun edi -> + if ctxt.IsCancellationRequested then + ctxt.OnCancellation () + else + CallFilterThenInvoke ctxt catchFunction edi) + computation.Invoke newCtxt + + /// Internal way of making an async from code, for exact code compat. + /// When run, ensures that any exceptions raised by the immediate execution of "f" are + /// sent to the exception continuation. + let CreateProtectedAsync f = + MakeAsync (fun ctxt -> ProtectedCode ctxt f) + + /// Internal way of making an async from result, for exact code compat. + let CreateAsyncResultAsync res = + MakeAsync (fun ctxt -> + match res with + | AsyncResult.Ok r -> ctxt.cont r + | AsyncResult.Error edi -> ctxt.CallExceptionContinuation edi + | AsyncResult.Canceled oce -> ctxt.ccont oce) + + // Generate async computation which calls its continuation with the given result + let inline CreateReturnAsync res = + // Note: this code ends up in user assemblies via inlining + MakeAsync (fun ctxt -> ctxt.OnSuccess res) + + // The primitive bind operation. Generate a process that runs the first process, takes + // its result, applies f and then runs the new process produced. Hijack if necessary and + // run 'f' with exception protection + let inline CreateBindAsync part1 part2 = + // Note: this code ends up in user assemblies via inlining + MakeAsync (fun ctxt -> + Bind ctxt part1 part2) + + // Call the given function with exception protection, but first + // check for cancellation. + let inline CreateCallAsync part2 result1 = + // Note: this code ends up in user assemblies via inlining + MakeAsync (fun ctxt -> + if ctxt.IsCancellationRequested then + ctxt.OnCancellation () + else + CallThenInvoke ctxt result1 part2) + + let inline CreateDelayAsync computation = + // Note: this code ends up in user assemblies via inlining + CreateCallAsync computation () + + /// Implements the sequencing construct of async computation expressions + let inline CreateSequentialAsync part1 part2 = + // Note: this code ends up in user assemblies via inlining + CreateBindAsync part1 (fun () -> part2) + + /// Create an async for a try/finally + let inline CreateTryFinallyAsync finallyFunction computation = + MakeAsync (fun ctxt -> TryFinally ctxt computation finallyFunction) + + /// Create an async for a try/with filtering exceptions through a pattern match + let inline CreateTryWithFilterAsync catchFunction computation = + MakeAsync (fun ctxt -> TryWith ctxt computation (fun edi -> catchFunction edi)) + + /// Create an async for a try/with filtering + let inline CreateTryWithAsync catchFunction computation = + CreateTryWithFilterAsync (fun exn -> Some (catchFunction exn)) computation + + /// Call the finallyFunction if the computation results in a cancellation, and then continue with cancellation. + /// If the finally function gives an exception then continue with cancellation regardless. + let CreateWhenCancelledAsync (finallyFunction : OperationCanceledException -> unit) computation = + MakeAsync (fun ctxt -> + let ccont = ctxt.ccont + let newCtxt = + ctxt.WithCancellationContinuation(fun exn -> + CallThenContinue finallyFunction exn (ctxt.WithContinuations(cont = (fun _ -> ccont exn), econt = (fun _ -> ccont exn)))) + computation.Invoke newCtxt) + + /// A single pre-allocated computation that fetched the current cancellation token + let cancellationTokenAsync = + MakeAsync (fun ctxt -> ctxt.cont ctxt.aux.token) + + /// A single pre-allocated computation that returns a unit result + let unitAsync = + CreateReturnAsync() + + /// Implement use/Dispose + let CreateUsingAsync (resource:'T :> IDisposable) (computation:'T -> Async<'a>) : Async<'a> = + let mutable x = 0 + let disposeFunction _ = + if Interlocked.CompareExchange(&x, 1, 0) = 0 then + Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicFunctions.Dispose resource + CreateTryFinallyAsync disposeFunction (CreateCallAsync computation resource) |> CreateWhenCancelledAsync disposeFunction + + let inline CreateIgnoreAsync computation = + CreateBindAsync computation (fun _ -> unitAsync) + + /// Implement the while loop construct of async computation expressions + let CreateWhileAsync guardFunc computation = + if guardFunc() then + let mutable whileAsync = Unchecked.defaultof<_> + whileAsync <- CreateBindAsync computation (fun () -> if guardFunc() then whileAsync else unitAsync) + whileAsync + else + unitAsync + + /// Implement the for loop construct of async commputation expressions + let CreateForLoopAsync (source: seq<_>) computation = + CreateUsingAsync (source.GetEnumerator()) (fun ie -> + CreateWhileAsync + (fun () -> ie.MoveNext()) + (CreateDelayAsync (fun () -> computation ie.Current))) + + let CreateSwitchToAsync (syncCtxt: SynchronizationContext) = + CreateProtectedAsync (fun ctxt -> + ctxt.trampolineHolder.PostWithTrampoline syncCtxt ctxt.cont) + + let CreateSwitchToNewThreadAsync() = + CreateProtectedAsync (fun ctxt -> + ctxt.trampolineHolder.StartThreadWithTrampoline ctxt.cont) + + let CreateSwitchToThreadPoolAsync() = + CreateProtectedAsync (fun ctxt -> + ctxt.trampolineHolder.QueueWorkItemWithTrampoline ctxt.cont) + + /// Post back to the sync context regardless of which continuation is taken + let DelimitSyncContext (ctxt: AsyncActivation<_>) = + match SynchronizationContext.Current with + | null -> ctxt + | syncCtxt -> + ctxt.WithContinuations(cont = (fun x -> ctxt.trampolineHolder.PostWithTrampoline syncCtxt (fun () -> ctxt.cont x)), + econt = (fun x -> ctxt.trampolineHolder.PostWithTrampoline syncCtxt (fun () -> ctxt.econt x)), + ccont = (fun x -> ctxt.trampolineHolder.PostWithTrampoline syncCtxt (fun () -> ctxt.ccont x))) + + // When run, ensures that each of the continuations of the process are run in the same synchronization context. + let CreateDelimitedUserCodeAsync f = + CreateProtectedAsync (fun ctxt -> + let ctxtWithSync = DelimitSyncContext ctxt + f ctxtWithSync) + + [] + [] + type SuspendedAsync<'T>(ctxt : AsyncActivation<'T>) = + + let syncCtxt = SynchronizationContext.Current + + let thread = + match syncCtxt with + | null -> null // saving a thread-local access + | _ -> Thread.CurrentThread + + let trampolineHolder = ctxt.trampolineHolder + + member __.ContinueImmediate res = + let action () = ctxt.cont res + let inline executeImmediately () = trampolineHolder.ExecuteWithTrampoline action + let currentSyncCtxt = SynchronizationContext.Current + match syncCtxt, currentSyncCtxt with + | null, null -> + executeImmediately () + // See bug 370350; this logic is incorrect from the perspective of how SynchronizationContext is meant to work, + // but the logic works for mainline scenarios (WinForms/WPF/ASP.NET) and we won't change it again. + | _ when Object.Equals(syncCtxt, currentSyncCtxt) && thread.Equals(Thread.CurrentThread) -> + executeImmediately () + | _ -> + trampolineHolder.PostOrQueueWithTrampoline syncCtxt action + + member __.ContinueWithPostOrQueue res = + trampolineHolder.PostOrQueueWithTrampoline syncCtxt (fun () -> ctxt.cont res) + + /// A utility type to provide a synchronization point between an asynchronous computation + /// and callers waiting on the result of that computation. + /// + /// Use with care! + [] + [] + type ResultCell<'T>() = + + let mutable result = None + + // The continuations for the result + let mutable savedConts : list> = [] + + // The WaitHandle event for the result. Only created if needed, and set to null when disposed. + let mutable resEvent = null + + let mutable disposed = false + + // All writers of result are protected by lock on syncRoot. + let syncRoot = new Object() + + member x.GetWaitHandle() = + lock syncRoot (fun () -> + if disposed then + raise (System.ObjectDisposedException("ResultCell")); + match resEvent with + | null -> + // Start in signalled state if a result is already present. + let ev = new ManualResetEvent(result.IsSome) + resEvent <- ev + (ev :> WaitHandle) + | ev -> + (ev :> WaitHandle)) + + member x.Close() = + lock syncRoot (fun () -> + if not disposed then + disposed <- true; + match resEvent with + | null -> () + | ev -> +#if FX_NO_EVENTWAITHANDLE_IDISPOSABLE + ev.Dispose() + System.GC.SuppressFinalize(ev) +#else + ev.Close(); +#endif + resEvent <- null) + + interface IDisposable with + member x.Dispose() = x.Close() + + member x.GrabResult() = + match result with + | Some res -> res + | None -> failwith "Unexpected no result" + + /// Record the result in the ResultCell. + member x.RegisterResult (res:'T, reuseThread) = + let grabbedConts = + lock syncRoot (fun () -> + // Ignore multiple sets of the result. This can happen, e.g. for a race between a cancellation and a success + if x.ResultAvailable then + [] // invalidOp "multiple results registered for asynchronous operation" + else + // In this case the ResultCell has already been disposed, e.g. due to a timeout. + // The result is dropped on the floor. + if disposed then + [] + else + result <- Some res; + // If the resEvent exists then set it. If not we can skip setting it altogether and it won't be + // created + match resEvent with + | null -> + () + | ev -> + // Setting the event need to happen under lock so as not to race with Close() + ev.Set () |> ignore + List.rev savedConts) + + // Run the action outside the lock + match grabbedConts with + | [] -> fake() + | [cont] -> + if reuseThread then + cont.ContinueImmediate(res) + else + cont.ContinueWithPostOrQueue(res) + | otherwise -> + otherwise |> List.iter (fun cont -> cont.ContinueWithPostOrQueue(res) |> unfake) |> fake + + member x.ResultAvailable = result.IsSome + + /// Await the result of a result cell, without a direct timeout or direct + /// cancellation. That is, the underlying computation must fill the result + /// if cancellation or timeout occurs. + member x.AwaitResult_NoDirectCancelOrTimeout = + MakeAsync (fun ctxt -> + // Check if a result is available synchronously + let resOpt = + match result with + | Some _ -> result + | None -> + lock syncRoot (fun () -> + match result with + | Some _ -> + result + | None -> + // Otherwise save the continuation and call it in RegisterResult + savedConts <- (SuspendedAsync<_>(ctxt))::savedConts + None + ) + match resOpt with + | Some res -> ctxt.cont res + | None -> fake() + ) + + member x.TryWaitForResultSynchronously (?timeout) : 'T option = + // Check if a result is available. + match result with + | Some _ as r -> + r + | None -> + // Force the creation of the WaitHandle + let resHandle = x.GetWaitHandle() + // Check again. While we were in GetWaitHandle, a call to RegisterResult may have set result then skipped the + // Set because the resHandle wasn't forced. + match result with + | Some _ as r -> + r + | None -> + // OK, let's really wait for the Set signal. This may block. + let timeout = defaultArg timeout Threading.Timeout.Infinite +#if FX_NO_EXIT_CONTEXT_FLAGS +#if FX_NO_WAITONE_MILLISECONDS + let ok = resHandle.WaitOne(TimeSpan(int64(timeout)*10000L)) +#else + let ok = resHandle.WaitOne(millisecondsTimeout= timeout) +#endif +#else + let ok = resHandle.WaitOne(millisecondsTimeout= timeout,exitContext=true) +#endif + if ok then + // Now the result really must be available + result + else + // timed out + None + + + /// Create an instance of an arbitrary delegate type delegating to the given F# function + type FuncDelegate<'T>(f) = + member __.Invoke(sender:obj, a:'T) : unit = ignore(sender); f(a) + static member Create<'Delegate when 'Delegate :> Delegate>(f) = + let obj = FuncDelegate<'T>(f) + let invokeMeth = (typeof>).GetMethod("Invoke", BindingFlags.Public ||| BindingFlags.NonPublic ||| BindingFlags.Instance) + System.Delegate.CreateDelegate(typeof<'Delegate>, obj, invokeMeth) :?> 'Delegate + + [] + let QueueAsync cancellationToken cont econt ccont computation = + let trampolineHolder = new TrampolineHolder() + trampolineHolder.QueueWorkItemWithTrampoline (fun () -> + let ctxt = AsyncActivation.Create cancellationToken trampolineHolder cont econt ccont + computation.Invoke ctxt) + + /// Run the asynchronous workflow and wait for its result. + [] + let RunSynchronouslyInAnotherThread (token:CancellationToken,computation,timeout) = + let token,innerCTS = + // If timeout is provided, we govern the async by our own CTS, to cancel + // when execution times out. Otherwise, the user-supplied token governs the async. + match timeout with + | None -> token, None + | Some _ -> + let subSource = new LinkedSubSource(token) + subSource.Token, Some subSource + + use resultCell = new ResultCell>() + QueueAsync + token + (fun res -> resultCell.RegisterResult(AsyncResult.Ok(res),reuseThread=true)) + (fun edi -> resultCell.RegisterResult(AsyncResult.Error(edi),reuseThread=true)) + (fun exn -> resultCell.RegisterResult(AsyncResult.Canceled(exn),reuseThread=true)) + computation + |> unfake + + let res = resultCell.TryWaitForResultSynchronously(?timeout = timeout) + match res with + | None -> // timed out + // issue cancellation signal + if innerCTS.IsSome then innerCTS.Value.Cancel() + // wait for computation to quiesce; drop result on the floor + resultCell.TryWaitForResultSynchronously() |> ignore + // dispose the CancellationTokenSource + if innerCTS.IsSome then innerCTS.Value.Dispose() + raise (System.TimeoutException()) + | Some res -> + match innerCTS with + | Some subSource -> subSource.Dispose() + | None -> () + res.Commit() + + [] + let RunSynchronouslyInCurrentThread (cancellationToken:CancellationToken,computation) = + use resultCell = new ResultCell>() + let trampolineHolder = new TrampolineHolder() + + trampolineHolder.ExecuteWithTrampoline (fun () -> + let ctxt = + AsyncActivation.Create + cancellationToken + trampolineHolder + (fun res -> resultCell.RegisterResult(AsyncResult.Ok(res),reuseThread=true)) + (fun edi -> resultCell.RegisterResult(AsyncResult.Error(edi),reuseThread=true)) + (fun exn -> resultCell.RegisterResult(AsyncResult.Canceled(exn),reuseThread=true)) + computation.Invoke ctxt) + |> unfake + + let res = resultCell.TryWaitForResultSynchronously().Value + res.Commit() + + [] + let RunSynchronously cancellationToken (computation: Async<'T>) timeout = + // Reuse the current ThreadPool thread if possible. Unfortunately + // Thread.IsThreadPoolThread isn't available on all profiles so + // we approximate it by testing synchronization context for null. + match SynchronizationContext.Current, timeout with + | null, None -> RunSynchronouslyInCurrentThread (cancellationToken, computation) + // When the timeout is given we need a dedicated thread + // which cancels the computation. + // Performing the cancellation in the ThreadPool eg. by using + // Timer from System.Threading or CancellationTokenSource.CancelAfter + // (which internally uses Timer) won't work properly + // when the ThreadPool is busy. + // + // And so when the timeout is given we always use the current thread + // for the cancellation and run the computation in another thread. + | _ -> RunSynchronouslyInAnotherThread (cancellationToken, computation, timeout) + + [] + let Start cancellationToken (computation:Async) = + QueueAsync + cancellationToken + (fun () -> fake()) // nothing to do on success + (fun edi -> edi.ThrowAny()) // raise exception in child + (fun _ -> fake()) // ignore cancellation in child + computation + |> unfake + + [] + let StartWithContinuations cancellationToken (computation:Async<'T>) cont econt ccont = + let trampolineHolder = new TrampolineHolder() + trampolineHolder.ExecuteWithTrampoline (fun () -> + let ctxt = AsyncActivation.Create cancellationToken trampolineHolder (cont >> fake) (econt >> fake) (ccont >> fake) + computation.Invoke ctxt) + |> unfake + + [] + let StartAsTask cancellationToken (computation:Async<'T>) taskCreationOptions = + let taskCreationOptions = defaultArg taskCreationOptions TaskCreationOptions.None + let tcs = new TaskCompletionSource<_>(taskCreationOptions) + + // The contract: + // a) cancellation signal should always propagate to the computation + // b) when the task IsCompleted -> nothing is running anymore + let task = tcs.Task + QueueAsync + cancellationToken + (fun r -> tcs.SetResult r |> fake) + (fun edi -> tcs.SetException edi.SourceException |> fake) + (fun _ -> tcs.SetCanceled() |> fake) + computation + |> unfake + task + + // Helper to attach continuation to the given task. + [] + let taskContinueWith (task : Task<'T>) (ctxt: AsyncActivation<'T>) useCcontForTaskCancellation = + + let continuation (completedTask: Task<_>) : unit = + ctxt.trampolineHolder.ExecuteWithTrampoline (fun () -> + if completedTask.IsCanceled then + if useCcontForTaskCancellation then + ctxt.OnCancellation () + else + let edi = ExceptionDispatchInfo.Capture(new TaskCanceledException(completedTask)) + ctxt.CallExceptionContinuation edi + elif completedTask.IsFaulted then + let edi = ExceptionDispatchInfo.RestoreOrCapture(completedTask.Exception) + ctxt.CallExceptionContinuation edi + else + ctxt.cont completedTask.Result) |> unfake + + task.ContinueWith(Action>(continuation)) |> ignore |> fake + + [] + let taskContinueWithUnit (task: Task) (ctxt: AsyncActivation) useCcontForTaskCancellation = + + let continuation (completedTask: Task) : unit = + ctxt.trampolineHolder.ExecuteWithTrampoline (fun () -> + if completedTask.IsCanceled then + if useCcontForTaskCancellation then + ctxt.OnCancellation () + else + let edi = ExceptionDispatchInfo.Capture(new TaskCanceledException(completedTask)) + ctxt.CallExceptionContinuation edi + elif completedTask.IsFaulted then + let edi = ExceptionDispatchInfo.RestoreOrCapture(completedTask.Exception) + ctxt.CallExceptionContinuation edi + else + ctxt.cont ()) |> unfake + + task.ContinueWith(Action(continuation)) |> ignore |> fake + + [] + type AsyncIAsyncResult<'T>(callback: System.AsyncCallback,state:obj) = + // This gets set to false if the result is not available by the + // time the IAsyncResult is returned to the caller of Begin + let mutable completedSynchronously = true + + let mutable disposed = false + + let cts = new CancellationTokenSource() + + let result = new ResultCell>() + + member s.SetResult(v: AsyncResult<'T>) = + result.RegisterResult(v,reuseThread=true) |> unfake + match callback with + | null -> () + | d -> + // The IASyncResult becomes observable here + d.Invoke (s :> System.IAsyncResult) + + member s.GetResult() = + match result.TryWaitForResultSynchronously (-1) with + | Some (AsyncResult.Ok v) -> v + | Some (AsyncResult.Error edi) -> edi.ThrowAny() + | Some (AsyncResult.Canceled err) -> raise err + | None -> failwith "unreachable" + + member x.IsClosed = disposed + + member x.Close() = + if not disposed then + disposed <- true + cts.Dispose() + result.Close() + + member x.Token = cts.Token + + member x.CancelAsync() = cts.Cancel() + + member x.CheckForNotSynchronous() = + if not result.ResultAvailable then + completedSynchronously <- false + + interface System.IAsyncResult with + member x.IsCompleted = result.ResultAvailable + member x.CompletedSynchronously = completedSynchronously + member x.AsyncWaitHandle = result.GetWaitHandle() + member x.AsyncState = state + + interface System.IDisposable with + member x.Dispose() = x.Close() + + module AsBeginEndHelpers = + let beginAction (computation, callback, state) = + let aiar = new AsyncIAsyncResult<'T>(callback, state) + let cont v = aiar.SetResult (AsyncResult.Ok v) + let econt v = aiar.SetResult (AsyncResult.Error v) + let ccont v = aiar.SetResult (AsyncResult.Canceled v) + StartWithContinuations aiar.Token computation cont econt ccont + aiar.CheckForNotSynchronous() + (aiar :> IAsyncResult) + + let endAction<'T> (iar:IAsyncResult) = + match iar with + | :? AsyncIAsyncResult<'T> as aiar -> + if aiar.IsClosed then + raise (System.ObjectDisposedException("AsyncResult")) + else + let res = aiar.GetResult() + aiar.Close () + res + | _ -> + invalidArg "iar" (SR.GetString(SR.mismatchIAREnd)) + + let cancelAction<'T>(iar:IAsyncResult) = + match iar with + | :? AsyncIAsyncResult<'T> as aiar -> + aiar.CancelAsync() + | _ -> + invalidArg "iar" (SR.GetString(SR.mismatchIARCancel)) + + open AsyncPrimitives + + [] + type AsyncBuilder() = + member __.Zero () = unitAsync + + member __.Delay generator = CreateDelayAsync generator + + member inline __.Return value = CreateReturnAsync value + + member inline __.ReturnFrom (computation:Async<_>) = computation + + member inline __.Bind (computation, binder) = CreateBindAsync computation binder + + member __.Using (resource, binder) = CreateUsingAsync resource binder + + member __.While (guard, computation) = CreateWhileAsync guard computation + + member __.For (sequence, body) = CreateForLoopAsync sequence body + + member inline __.Combine (computation1, computation2) = CreateSequentialAsync computation1 computation2 + + member inline __.TryFinally (computation, compensation) = CreateTryFinallyAsync compensation computation + + member inline __.TryWith (computation, catchHandler) = CreateTryWithAsync catchHandler computation + + // member inline __.TryWithFilter (computation, catchHandler) = CreateTryWithFilterAsync catchHandler computation + + [] + module AsyncBuilderImpl = + let async = AsyncBuilder() + + [] + type Async = + + static member CancellationToken = cancellationTokenAsync + + static member CancelCheck () = unitAsync + + static member FromContinuations (callback : ('T -> unit) * (exn -> unit) * (OperationCanceledException -> unit) -> unit) : Async<'T> = + MakeAsync (fun ctxt -> + if ctxt.IsCancellationRequested then + ctxt.OnCancellation () + else + let mutable underCurrentThreadStack = true + let mutable contToTailCall = None + let thread = Thread.CurrentThread + let latch = Latch() + let once cont x = + if not(latch.Enter()) then invalidOp(SR.GetString(SR.controlContinuationInvokedMultipleTimes)) + if Thread.CurrentThread.Equals(thread) && underCurrentThreadStack then + contToTailCall <- Some(fun () -> cont x) + else if Trampoline.ThisThreadHasTrampoline then + let syncCtxt = SynchronizationContext.Current + ctxt.trampolineHolder.PostOrQueueWithTrampoline syncCtxt (fun () -> cont x) |> unfake + else + ctxt.trampolineHolder.ExecuteWithTrampoline (fun () -> cont x ) |> unfake + try + callback (once ctxt.cont, (fun exn -> once ctxt.econt (ExceptionDispatchInfo.RestoreOrCapture(exn))), once ctxt.ccont) + with exn -> + if not(latch.Enter()) then invalidOp(SR.GetString(SR.controlContinuationInvokedMultipleTimes)) + let edi = ExceptionDispatchInfo.RestoreOrCapture(exn) + ctxt.econt edi |> unfake + + underCurrentThreadStack <- false + + match contToTailCall with + | Some k -> k() + | _ -> fake()) + + static member DefaultCancellationToken = defaultCancellationTokenSource.Token + + static member CancelDefaultToken() = + + let cts = defaultCancellationTokenSource + + // set new CancellationTokenSource before calling Cancel - otherwise if Cancel throws token will stay unchanged + defaultCancellationTokenSource <- new CancellationTokenSource() + + cts.Cancel() + + // we do not dispose the old default CTS - let GC collect it + + static member Catch (computation: Async<'T>) = + MakeAsync (fun ctxt -> + // Turn the success or exception into data + let newCtxt = ctxt.WithContinuations(cont = (fun res -> ctxt.cont (Choice1Of2 res)), + econt = (fun edi -> ctxt.cont (Choice2Of2 (edi.GetAssociatedSourceException())))) + computation.Invoke newCtxt) + + static member RunSynchronously (computation: Async<'T>,?timeout,?cancellationToken:CancellationToken) = + let timeout, cancellationToken = + match cancellationToken with + | None -> timeout,defaultCancellationTokenSource.Token + | Some token when not token.CanBeCanceled -> timeout, token + | Some token -> None, token + AsyncPrimitives.RunSynchronously cancellationToken computation timeout + + static member Start (computation, ?cancellationToken) = + let cancellationToken = defaultArg cancellationToken defaultCancellationTokenSource.Token + AsyncPrimitives.Start cancellationToken computation + + static member StartAsTask (computation,?taskCreationOptions,?cancellationToken)= + let cancellationToken = defaultArg cancellationToken defaultCancellationTokenSource.Token + AsyncPrimitives.StartAsTask cancellationToken computation taskCreationOptions + + static member StartChildAsTask (computation,?taskCreationOptions) = + async { let! cancellationToken = cancellationTokenAsync + return AsyncPrimitives.StartAsTask cancellationToken computation taskCreationOptions } + + static member Parallel (computations: seq>) = + MakeAsync (fun ctxt -> + let tasks, result = + try + Seq.toArray computations, None // manually protect eval of seq + with exn -> + let edi = ExceptionDispatchInfo.RestoreOrCapture(exn) + null, Some (ctxt.CallExceptionContinuation edi) + + match result with + | Some r -> r + | None -> + if tasks.Length = 0 then + // must not be in a 'protect' if we call cont explicitly; if cont throws, it should unwind the stack, preserving Dev10 behavior + ctxt.cont [| |] + else + ProtectedCode ctxt (fun ctxt -> + let ctxtWithSync = DelimitSyncContext ctxt // manually resync + let mutable count = tasks.Length + let mutable firstExn = None + let results = Array.zeroCreate tasks.Length + // Attempt to cancel the individual operations if an exception happens on any of the other threads + let innerCTS = new LinkedSubSource(ctxtWithSync.token) + + let finishTask(remaining) = + if (remaining = 0) then + innerCTS.Dispose() + match firstExn with + | None -> ctxtWithSync.trampolineHolder.ExecuteWithTrampoline (fun () -> ctxtWithSync.cont results) + | Some (Choice1Of2 exn) -> ctxtWithSync.trampolineHolder.ExecuteWithTrampoline (fun () -> ctxtWithSync.econt exn) + | Some (Choice2Of2 cexn) -> ctxtWithSync.trampolineHolder.ExecuteWithTrampoline (fun () -> ctxtWithSync.ccont cexn) + else + fake() + + // recordSuccess and recordFailure between them decrement count to 0 and + // as soon as 0 is reached dispose innerCancellationSource + + let recordSuccess i res = + results.[i] <- res + finishTask(Interlocked.Decrement &count) + + let recordFailure exn = + // capture first exception and then decrement the counter to avoid race when + // - thread 1 decremented counter and preempted by the scheduler + // - thread 2 decremented counter and called finishTask + // since exception is not yet captured - finishtask will fall into success branch + match Interlocked.CompareExchange(&firstExn, Some exn, None) with + | None -> + // signal cancellation before decrementing the counter - this guarantees that no other thread can sneak to finishTask and dispose innerCTS + // NOTE: Cancel may introduce reentrancy - i.e. when handler registered for the cancellation token invokes cancel continuation that will call 'recordFailure' + // to correctly handle this we need to return decremented value, not the current value of 'count' otherwise we may invoke finishTask with value '0' several times + innerCTS.Cancel() + | _ -> () + finishTask(Interlocked.Decrement &count) + + tasks |> Array.iteri (fun i p -> + QueueAsync + innerCTS.Token + // on success, record the result + (fun res -> recordSuccess i res) + // on exception... + (fun edi -> recordFailure (Choice1Of2 edi)) + // on cancellation... + (fun cexn -> recordFailure (Choice2Of2 cexn)) + p + |> unfake) + fake())) + + static member Choice(computations : Async<'T option> seq) : Async<'T option> = + MakeAsync (fun ctxt -> + let result = + try Seq.toArray computations |> Choice1Of2 + with exn -> ExceptionDispatchInfo.RestoreOrCapture exn |> Choice2Of2 + + match result with + | Choice2Of2 edi -> ctxt.CallExceptionContinuation edi + | Choice1Of2 [||] -> ctxt.cont None + | Choice1Of2 computations -> + ProtectedCode ctxt (fun ctxt -> + let ctxtWithSync = DelimitSyncContext ctxt + let noneCount = ref 0 + let exnCount = ref 0 + let innerCts = new LinkedSubSource(ctxtWithSync.token) + + let scont (result : 'T option) = + match result with + | Some _ -> + if Interlocked.Increment exnCount = 1 then + innerCts.Cancel(); ctxtWithSync.trampolineHolder.ExecuteWithTrampoline (fun () -> ctxtWithSync.cont result) + else + fake() + + | None -> + if Interlocked.Increment noneCount = computations.Length then + innerCts.Cancel(); ctxtWithSync.trampolineHolder.ExecuteWithTrampoline (fun () -> ctxtWithSync.cont None) + else + fake() + + let econt (exn : ExceptionDispatchInfo) = + if Interlocked.Increment exnCount = 1 then + innerCts.Cancel(); ctxtWithSync.trampolineHolder.ExecuteWithTrampoline (fun () -> ctxtWithSync.econt exn) + else + fake() + + let ccont (exn : OperationCanceledException) = + if Interlocked.Increment exnCount = 1 then + innerCts.Cancel(); ctxtWithSync.trampolineHolder.ExecuteWithTrampoline (fun () -> ctxtWithSync.ccont exn) + else + fake() + + for c in computations do + QueueAsync innerCts.Token scont econt ccont c |> unfake + + fake())) + + /// StartWithContinuations, except the exception continuation is given an ExceptionDispatchInfo + static member StartWithContinuationsUsingDispatchInfo(computation:Async<'T>, continuation, exceptionContinuation, cancellationContinuation, ?cancellationToken) : unit = + let cancellationToken = defaultArg cancellationToken defaultCancellationTokenSource.Token + AsyncPrimitives.StartWithContinuations cancellationToken computation continuation exceptionContinuation cancellationContinuation + + static member StartWithContinuations(computation:Async<'T>, continuation, exceptionContinuation, cancellationContinuation, ?cancellationToken) : unit = + Async.StartWithContinuationsUsingDispatchInfo(computation, continuation, (fun edi -> exceptionContinuation (edi.GetAssociatedSourceException())), cancellationContinuation, ?cancellationToken=cancellationToken) + + static member StartImmediateAsTask (computation : Async<'T>, ?cancellationToken ) : Task<'T>= + let cancellationToken = defaultArg cancellationToken defaultCancellationTokenSource.Token + let ts = new TaskCompletionSource<'T>() + let task = ts.Task + Async.StartWithContinuations( + computation, + (fun k -> ts.SetResult k), + (fun exn -> ts.SetException exn), + (fun _ -> ts.SetCanceled()), + cancellationToken) + task + + static member StartImmediate(computation:Async, ?cancellationToken) : unit = + let cancellationToken = defaultArg cancellationToken defaultCancellationTokenSource.Token + AsyncPrimitives.StartWithContinuations cancellationToken computation id (fun edi -> edi.ThrowAny()) ignore + + static member Sleep(millisecondsDueTime) : Async = + CreateDelimitedUserCodeAsync (fun ctxt -> + let mutable timer = None : Timer option + let cont = ctxt.cont + let ccont = ctxt.ccont + let latch = new Latch() + let registration = + ctxt.token.Register( + (fun _ -> + if latch.Enter() then + match timer with + | None -> () + | Some t -> t.Dispose() + ctxt.trampolineHolder.ExecuteWithTrampoline (fun () -> ccont(new OperationCanceledException(ctxt.token))) |> unfake), + null) + let mutable edi = null + try + timer <- new Timer((fun _ -> + if latch.Enter() then + // NOTE: If the CTS for the token would have been disposed, disposal of the registration would throw + // However, our contract is that until async computation ceases execution (and invokes ccont) + // the CTS will not be disposed. Execution of savedCCont is guarded by latch, so we are safe unless + // user violates the contract. + registration.Dispose() + // Try to Dispose of the Timer. + // Note: there is a race here: the Timer time very occasionally + // calls the callback _before_ the timer object has been recorded anywhere. This makes it difficult to dispose the + // timer in this situation. In this case we just let the timer be collected by finalization. + match timer with + | None -> () + | Some t -> t.Dispose() + // Now we're done, so call the continuation + ctxt.trampolineHolder.ExecuteWithTrampoline (fun () -> cont()) |> unfake), + null, dueTime=millisecondsDueTime, period = -1) |> Some + with exn -> + if latch.Enter() then + // post exception to econt only if we successfully enter the latch (no other continuations were called) + edi <- ExceptionDispatchInfo.RestoreOrCapture(exn) + + match edi with + | null -> + fake() + | _ -> + ctxt.econt edi) + + /// Wait for a wait handle. Both timeout and cancellation are supported + static member AwaitWaitHandle(waitHandle: WaitHandle, ?millisecondsTimeout:int) = + let millisecondsTimeout = defaultArg millisecondsTimeout Threading.Timeout.Infinite + if millisecondsTimeout = 0 then + async.Delay(fun () -> +#if FX_NO_EXIT_CONTEXT_FLAGS +#if FX_NO_WAITONE_MILLISECONDS + let ok = waitHandle.WaitOne(TimeSpan(0L)) +#else + let ok = waitHandle.WaitOne(0) +#endif +#else + let ok = waitHandle.WaitOne(0,exitContext=false) +#endif + async.Return ok) + else + CreateDelimitedUserCodeAsync(fun ctxt -> + let aux = ctxt.aux + let rwh = ref (None : RegisteredWaitHandle option) + let latch = Latch() + let rec cancelHandler = + Action(fun _ -> + if latch.Enter() then + // if we got here - then we need to unregister RegisteredWaitHandle + trigger cancellation + // entrance to TP callback is protected by latch - so savedCont will never be called + lock rwh (fun () -> + match !rwh with + | None -> () + | Some rwh -> rwh.Unregister(null) |> ignore) + Async.Start (async { do (ctxt.ccont (OperationCanceledException(aux.token)) |> unfake) })) + + and registration : CancellationTokenRegistration = aux.token.Register(cancelHandler, null) + + let savedCont = ctxt.cont + try + lock rwh (fun () -> + rwh := Some(ThreadPool.RegisterWaitForSingleObject + (waitObject=waitHandle, + callBack=WaitOrTimerCallback(fun _ timeOut -> + if latch.Enter() then + lock rwh (fun () -> rwh.Value.Value.Unregister(null) |> ignore) + rwh := None + registration.Dispose() + ctxt.trampolineHolder.ExecuteWithTrampoline (fun () -> savedCont (not timeOut)) |> unfake), + state=null, + millisecondsTimeOutInterval=millisecondsTimeout, + executeOnlyOnce=true)); + fake()) + with _ -> + if latch.Enter() then + registration.Dispose() + reraise() // reraise exception only if we successfully enter the latch (no other continuations were called) + else + fake() + ) + + static member AwaitIAsyncResult(iar: IAsyncResult, ?millisecondsTimeout): Async = + async { if iar.CompletedSynchronously then + return true + else + return! Async.AwaitWaitHandle(iar.AsyncWaitHandle, ?millisecondsTimeout=millisecondsTimeout) } + + + /// Bind the result of a result cell, calling the appropriate continuation. + static member BindResult (result: AsyncResult<'T>) : Async<'T> = + MakeAsync (fun ctxt -> + (match result with + | Ok v -> ctxt.cont v + | Error exn -> ctxt.CallExceptionContinuation exn + | Canceled exn -> ctxt.ccont exn) ) + + /// Await and use the result of a result cell. The resulting async doesn't support cancellation + /// or timeout directly, rather the underlying computation must fill the result if cancellation + /// or timeout occurs. + static member AwaitAndBindResult_NoDirectCancelOrTimeout(resultCell: ResultCell>) : Async<'T> = + async { + let! result = resultCell.AwaitResult_NoDirectCancelOrTimeout + return! Async.BindResult result + } + + /// Await the result of a result cell belonging to a child computation. The resulting async supports timeout and if + /// it happens the child computation will be cancelled. The resulting async doesn't support cancellation + /// directly, rather the underlying computation must fill the result if cancellation occurs. + static member AwaitAndBindChildResult(innerCTS: CancellationTokenSource, resultCell: ResultCell>, millisecondsTimeout) : Async<'T> = + match millisecondsTimeout with + | None | Some -1 -> + resultCell |> Async.AwaitAndBindResult_NoDirectCancelOrTimeout + + | Some 0 -> + async { if resultCell.ResultAvailable then + let res = resultCell.GrabResult() + return res.Commit() + else + return raise (System.TimeoutException()) } + | _ -> + async { try + if resultCell.ResultAvailable then + let res = resultCell.GrabResult() + return res.Commit() + else + let! ok = Async.AwaitWaitHandle (resultCell.GetWaitHandle(), ?millisecondsTimeout=millisecondsTimeout) + if ok then + let res = resultCell.GrabResult() + return res.Commit() + else // timed out + // issue cancellation signal + innerCTS.Cancel() + // wait for computation to quiesce + let! _ = Async.AwaitWaitHandle (resultCell.GetWaitHandle()) + return raise (System.TimeoutException()) + finally + resultCell.Close() } + + + static member FromBeginEnd(beginAction, endAction, ?cancelAction): Async<'T> = + async { let! cancellationToken = cancellationTokenAsync + let resultCell = new ResultCell<_>() + + let once = Once() + + let registration : CancellationTokenRegistration = + + let onCancel (_:obj) = + // Call the cancellation routine + match cancelAction with + | None -> + // Register the result. This may race with a successful result, but + // ResultCell allows a race and throws away whichever comes last. + once.Do(fun () -> + let canceledResult = Canceled (OperationCanceledException(cancellationToken)) + resultCell.RegisterResult(canceledResult,reuseThread=true) |> unfake + ) + | Some cancel -> + // If we get an exception from a cooperative cancellation function + // we assume the operation has already completed. + try cancel() with _ -> () + + cancellationToken.Register(Action(onCancel), null) + + let callback = + new System.AsyncCallback(fun iar -> + if not iar.CompletedSynchronously then + // The callback has been activated, so ensure cancellation is not possible + // beyond this point. + match cancelAction with + | Some _ -> + registration.Dispose() + | None -> + once.Do(fun () -> registration.Dispose()) + + // Run the endAction and collect its result. + let res = + try + Ok(endAction iar) + with exn -> + let edi = ExceptionDispatchInfo.RestoreOrCapture(exn) + Error edi + + // Register the result. This may race with a cancellation result, but + // ResultCell allows a race and throws away whichever comes last. + resultCell.RegisterResult(res,reuseThread=true) |> unfake) + + let (iar:IAsyncResult) = beginAction (callback,(null:obj)) + if iar.CompletedSynchronously then + registration.Dispose() + return endAction iar + else + // Note: ok to use "NoDirectCancel" here because cancellation has been registered above + // Note: ok to use "NoDirectTimeout" here because no timeout parameter to this method + return! Async.AwaitAndBindResult_NoDirectCancelOrTimeout(resultCell) } + + + static member FromBeginEnd(arg,beginAction,endAction,?cancelAction): Async<'T> = + Async.FromBeginEnd((fun (iar,state) -> beginAction(arg,iar,state)), endAction, ?cancelAction=cancelAction) + + static member FromBeginEnd(arg1,arg2,beginAction,endAction,?cancelAction): Async<'T> = + Async.FromBeginEnd((fun (iar,state) -> beginAction(arg1,arg2,iar,state)), endAction, ?cancelAction=cancelAction) + + static member FromBeginEnd(arg1,arg2,arg3,beginAction,endAction,?cancelAction): Async<'T> = + Async.FromBeginEnd((fun (iar,state) -> beginAction(arg1,arg2,arg3,iar,state)), endAction, ?cancelAction=cancelAction) + + static member AsBeginEnd<'Arg,'T> (computation:('Arg -> Async<'T>)) : + // The 'Begin' member + ('Arg * System.AsyncCallback * obj -> System.IAsyncResult) * + // The 'End' member + (System.IAsyncResult -> 'T) * + // The 'Cancel' member + (System.IAsyncResult -> unit) = + let beginAction = fun (a1,callback,state) -> AsBeginEndHelpers.beginAction ((computation a1), callback, state) + beginAction, AsBeginEndHelpers.endAction<'T>, AsBeginEndHelpers.cancelAction<'T> + + static member AwaitEvent(event:IEvent<'Delegate,'T>, ?cancelAction) : Async<'T> = + async { let! cancellationToken = cancellationTokenAsync + let resultCell = new ResultCell<_>() + // Set up the handlers to listen to events and cancellation + let once = new Once() + let rec registration : CancellationTokenRegistration= + let onCancel _ = + // We've been cancelled. Call the given cancellation routine + match cancelAction with + | None -> + // We've been cancelled without a cancel action. Stop listening to events + event.RemoveHandler(del) + // Register the result. This may race with a successful result, but + // ResultCell allows a race and throws away whichever comes last. + once.Do(fun () -> resultCell.RegisterResult(Canceled (OperationCanceledException(cancellationToken)),reuseThread=true) |> unfake) + | Some cancel -> + // If we get an exception from a cooperative cancellation function + // we assume the operation has already completed. + try cancel() with _ -> () + cancellationToken.Register(Action(onCancel), null) + + and del = + FuncDelegate<'T>.Create<'Delegate>(fun eventArgs -> + // Stop listening to events + event.RemoveHandler(del) + // The callback has been activated, so ensure cancellation is not possible beyond this point + once.Do(fun () -> registration.Dispose()) + let res = Ok(eventArgs) + // Register the result. This may race with a cancellation result, but + // ResultCell allows a race and throws away whichever comes last. + resultCell.RegisterResult(res,reuseThread=true) |> unfake) + + // Start listening to events + event.AddHandler(del) + + // Return the async computation that allows us to await the result + // Note: ok to use "NoDirectCancel" here because cancellation has been registered above + // Note: ok to use "NoDirectTimeout" here because no timeout parameter to this method + return! Async.AwaitAndBindResult_NoDirectCancelOrTimeout(resultCell) } + + static member Ignore (computation: Async<'T>) = CreateIgnoreAsync computation + + static member SwitchToNewThread() = CreateSwitchToNewThreadAsync() + + static member SwitchToThreadPool() = CreateSwitchToThreadPoolAsync() + + static member StartChild (computation:Async<'T>,?millisecondsTimeout) = + async { + let resultCell = new ResultCell<_>() + let! cancellationToken = cancellationTokenAsync + let innerCTS = new CancellationTokenSource() // innerCTS does not require disposal + let ctsRef = ref innerCTS + let reg = cancellationToken.Register( + (fun _ -> + match !ctsRef with + | null -> () + | otherwise -> otherwise.Cancel()), + null) + do QueueAsync + innerCTS.Token + // since innerCTS is not ever Disposed, can call reg.Dispose() without a safety Latch + (fun res -> ctsRef := null; reg.Dispose(); resultCell.RegisterResult (Ok res, reuseThread=true)) + (fun edi -> ctsRef := null; reg.Dispose(); resultCell.RegisterResult (Error edi,reuseThread=true)) + (fun err -> ctsRef := null; reg.Dispose(); resultCell.RegisterResult (Canceled err,reuseThread=true)) + computation + |> unfake + + return Async.AwaitAndBindChildResult(innerCTS, resultCell, millisecondsTimeout) } + + static member SwitchToContext syncContext = + async { match syncContext with + | null -> + // no synchronization context, just switch to the thread pool + do! Async.SwitchToThreadPool() + | syncCtxt -> + // post the continuation to the synchronization context + return! CreateSwitchToAsync syncCtxt } + + static member OnCancel interruption = + async { let! cancellationToken = cancellationTokenAsync + // latch protects CancellationTokenRegistration.Dispose from being called twice + let latch = Latch() + let rec handler (_ : obj) = + try + if latch.Enter() then registration.Dispose() + interruption () + with _ -> () + and registration : CancellationTokenRegistration = cancellationToken.Register(Action(handler), null) + return { new System.IDisposable with + member this.Dispose() = + // dispose CancellationTokenRegistration only if cancellation was not requested. + // otherwise - do nothing, disposal will be performed by the handler itself + if not cancellationToken.IsCancellationRequested then + if latch.Enter() then registration.Dispose() } } + + static member TryCancelled (computation: Async<'T>,compensation) = + CreateWhenCancelledAsync compensation computation + + static member AwaitTask (task:Task<'T>) : Async<'T> = + CreateDelimitedUserCodeAsync (fun ctxt -> taskContinueWith task ctxt false) + + static member AwaitTask (task:Task) : Async = + CreateDelimitedUserCodeAsync (fun ctxt -> taskContinueWithUnit task ctxt false) + + module CommonExtensions = + + type System.IO.Stream with + + [] // give the extension member a 'nice', unmangled compiled name, unique within this module + member stream.AsyncRead(buffer: byte[],?offset,?count) = + let offset = defaultArg offset 0 + let count = defaultArg count buffer.Length +#if FX_NO_BEGINEND_READWRITE + // use combo CreateDelimitedUserCodeAsync + taskContinueWith instead of AwaitTask so we can pass cancellation token to the ReadAsync task + CreateDelimitedUserCodeAsync (fun ctxt -> taskContinueWith (stream.ReadAsync(buffer, offset, count, ctxt.aux.token)) ctxt false) +#else + Async.FromBeginEnd (buffer,offset,count,stream.BeginRead,stream.EndRead) +#endif + + [] // give the extension member a 'nice', unmangled compiled name, unique within this module + member stream.AsyncRead(count) = + async { let buffer = Array.zeroCreate count + let i = ref 0 + while !i < count do + let! n = stream.AsyncRead(buffer,!i,count - !i) + i := !i + n + if n = 0 then + raise(System.IO.EndOfStreamException(SR.GetString(SR.failedReadEnoughBytes))) + return buffer } + + [] // give the extension member a 'nice', unmangled compiled name, unique within this module + member stream.AsyncWrite(buffer:byte[], ?offset:int, ?count:int) = + let offset = defaultArg offset 0 + let count = defaultArg count buffer.Length +#if FX_NO_BEGINEND_READWRITE + // use combo CreateDelimitedUserCodeAsync + taskContinueWithUnit instead of AwaitTask so we can pass cancellation token to the WriteAsync task + CreateDelimitedUserCodeAsync (fun ctxt -> taskContinueWithUnit (stream.WriteAsync(buffer, offset, count, ctxt.aux.token)) ctxt false) +#else + Async.FromBeginEnd (buffer,offset,count,stream.BeginWrite,stream.EndWrite) +#endif + + type IObservable<'Args> with + + [] // give the extension member a 'nice', unmangled compiled name, unique within this module + member x.Add(callback: 'Args -> unit) = x.Subscribe callback |> ignore + + [] // give the extension member a 'nice', unmangled compiled name, unique within this module + member x.Subscribe(callback) = + x.Subscribe { new IObserver<'Args> with + member x.OnNext(args) = callback args + member x.OnError(e) = () + member x.OnCompleted() = () } + + module WebExtensions = + open AsyncPrimitives + + type System.Net.WebRequest with + [] // give the extension member a 'nice', unmangled compiled name, unique within this module + member req.AsyncGetResponse() : Async= + + let canceled = ref false // WebException with Status = WebExceptionStatus.RequestCanceled can be raised in other situations except cancellation, use flag to filter out false positives + + // Use CreateTryWithFilterAsync to allow propagation of exception without losing stack + Async.FromBeginEnd(beginAction=req.BeginGetResponse, + endAction = req.EndGetResponse, + cancelAction = fun() -> canceled := true; req.Abort()) + |> CreateTryWithFilterAsync (fun exn -> + match exn with + | :? System.Net.WebException as webExn + when webExn.Status = System.Net.WebExceptionStatus.RequestCanceled && !canceled -> + + Some (Async.BindResult(AsyncResult.Canceled (OperationCanceledException webExn.Message))) + | _ -> + None) + +#if !FX_NO_WEB_CLIENT + + type System.Net.WebClient with + member inline private this.Download(event: IEvent<'T, _>, handler: _ -> 'T, start, result) = + let downloadAsync = + Async.FromContinuations (fun (cont, econt, ccont) -> + let userToken = new obj() + let rec delegate' (_: obj) (args : #ComponentModel.AsyncCompletedEventArgs) = + // ensure we handle the completed event from correct download call + if userToken = args.UserState then + event.RemoveHandler handle + if args.Cancelled then + ccont (new OperationCanceledException()) + elif isNotNull args.Error then + econt args.Error + else + cont (result args) + and handle = handler delegate' + event.AddHandler handle + start userToken + ) + + async { + use! _holder = Async.OnCancel(fun _ -> this.CancelAsync()) + return! downloadAsync + } + + [] // give the extension member a 'nice', unmangled compiled name, unique within this module + member this.AsyncDownloadString (address:Uri) : Async = + this.Download( + event = this.DownloadStringCompleted, + handler = (fun action -> Net.DownloadStringCompletedEventHandler(action)), + start = (fun userToken -> this.DownloadStringAsync(address, userToken)), + result = (fun args -> args.Result) + ) + + [] // give the extension member a 'nice', unmangled compiled name, unique within this module + member this.AsyncDownloadData (address:Uri) : Async = + this.Download( + event = this.DownloadDataCompleted, + handler = (fun action -> Net.DownloadDataCompletedEventHandler(action)), + start = (fun userToken -> this.DownloadDataAsync(address, userToken)), + result = (fun args -> args.Result) + ) + + [] // give the extension member a 'nice', unmangled compiled name, unique within this module + member this.AsyncDownloadFile (address:Uri, fileName:string) : Async = + this.Download( + event = this.DownloadFileCompleted, + handler = (fun action -> ComponentModel.AsyncCompletedEventHandler(action)), + start = (fun userToken -> this.DownloadFileAsync(address, fileName, userToken)), + result = (fun _ -> ()) + ) +#endif + diff --git a/src/fsharp/FSharp.Core/async.fsi b/src/fsharp/FSharp.Core/async.fsi new file mode 100644 index 00000000000..b3312c6990d --- /dev/null +++ b/src/fsharp/FSharp.Core/async.fsi @@ -0,0 +1,769 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace Microsoft.FSharp.Control + + open System + open System.Threading + open System.Threading.Tasks + open System.Runtime.ExceptionServices + + open Microsoft.FSharp.Core + open Microsoft.FSharp.Control + open Microsoft.FSharp.Collections + + /// A compositional asynchronous computation, which, when run, will eventually produce a value + /// of type T, or else raises an exception. + /// + /// Asynchronous computations are normally specified using an F# computation expression. + /// + /// When run, asynchronous computations have two modes: as a work item (executing synchronous + /// code), or as a wait item (waiting for an event or I/O completion). + /// + /// When run, asynchronous computations can be governed by CancellationToken. This can usually + /// be specified when the async computation is started. The associated CancellationTokenSource + /// may be used to cancel the asynchronous computation. Asynchronous computations built using + /// computation expressions can check the cancellation condition regularly. Synchronous + /// computations within an asynchronous computation do not automatically check this condition. + + [] + type Async<'T> + + /// This static class holds members for creating and manipulating asynchronous computations. + + [] + [] + type Async = + + /// Runs the asynchronous computation and await its result. + /// + /// If an exception occurs in the asynchronous computation then an exception is re-raised by this + /// function. + /// + /// If no cancellation token is provided then the default cancellation token is used. + /// + /// The timeout parameter is given in milliseconds. A value of -1 is equivalent to + /// System.Threading.Timeout.Infinite. + /// The computation to run. + /// The amount of time in milliseconds to wait for the result of the + /// computation before raising a System.TimeoutException. If no value is provided + /// for timeout then a default of -1 is used to correspond to System.Threading.Timeout.Infinite. + /// If a cancellable cancellationToken is provided, timeout parameter will be ignored + /// The cancellation token to be associated with the computation. + /// If one is not supplied, the default cancellation token is used. + /// The result of the computation. + static member RunSynchronously : computation:Async<'T> * ?timeout : int * ?cancellationToken:CancellationToken-> 'T + + /// Starts the asynchronous computation in the thread pool. Do not await its result. + /// + /// If no cancellation token is provided then the default cancellation token is used. + /// The computation to run asynchronously. + /// The cancellation token to be associated with the computation. + /// If one is not supplied, the default cancellation token is used. + static member Start : computation:Async * ?cancellationToken:CancellationToken -> unit + + /// Executes a computation in the thread pool. + /// If no cancellation token is provided then the default cancellation token is used. + /// A System.Threading.Tasks.Task that will be completed + /// in the corresponding state once the computation terminates (produces the result, throws exception or gets canceled) + /// + static member StartAsTask : computation:Async<'T> * ?taskCreationOptions:TaskCreationOptions * ?cancellationToken:CancellationToken -> Task<'T> + + /// Creates an asynchronous computation which starts the given computation as a System.Threading.Tasks.Task + static member StartChildAsTask : computation:Async<'T> * ?taskCreationOptions:TaskCreationOptions -> Async> + + /// Creates an asynchronous computation that executes computation. + /// If this computation completes successfully then return Choice1Of2 with the returned + /// value. If this computation raises an exception before it completes then return Choice2Of2 + /// with the raised exception. + /// The input computation that returns the type T. + /// A computation that returns a choice of type T or exception. + static member Catch : computation:Async<'T> -> Async> + + /// Creates an asynchronous computation that executes computation. + /// If this computation is cancelled before it completes then the computation generated by + /// running compensation is executed. + /// The input asynchronous computation. + /// The function to be run if the computation is cancelled. + /// An asynchronous computation that runs the compensation if the input computation + /// is cancelled. + static member TryCancelled : computation:Async<'T> * compensation:(OperationCanceledException -> unit) -> Async<'T> + + /// Generates a scoped, cooperative cancellation handler for use within an asynchronous workflow. + /// + /// For example, + /// async { use! holder = Async.OnCancel interruption ... } + /// generates an asynchronous computation where, if a cancellation happens any time during + /// the execution of the asynchronous computation in the scope of holder, then action + /// interruption is executed on the thread that is performing the cancellation. This can + /// be used to arrange for a computation to be asynchronously notified that a cancellation + /// has occurred, e.g. by setting a flag, or deregistering a pending I/O action. + /// The function that is executed on the thread performing the + /// cancellation. + /// An asynchronous computation that triggers the interruption if it is cancelled + /// before being disposed. + static member OnCancel : interruption: (unit -> unit) -> Async + + /// Creates an asynchronous computation that returns the CancellationToken governing the execution + /// of the computation. + /// In async { let! token = Async.CancellationToken ...} token can be used to initiate other + /// asynchronous operations that will cancel cooperatively with this workflow. + /// An asynchronous computation capable of retrieving the CancellationToken from a computation + /// expression. + static member CancellationToken : Async + + /// Raises the cancellation condition for the most recent set of asynchronous computations started + /// without any specific CancellationToken. Replaces the global CancellationTokenSource with a new + /// global token source for any asynchronous computations created after this point without any + /// specific CancellationToken. + static member CancelDefaultToken : unit -> unit + + /// Gets the default cancellation token for executing asynchronous computations. + /// The default CancellationToken. + static member DefaultCancellationToken : CancellationToken + + //---------- Parallelism + + /// Starts a child computation within an asynchronous workflow. + /// This allows multiple asynchronous computations to be executed simultaneously. + /// + /// This method should normally be used as the immediate + /// right-hand-side of a let! binding in an F# asynchronous workflow, that is, + /// + /// async { ... + /// let! completor1 = childComputation1 |> Async.StartChild + /// let! completor2 = childComputation2 |> Async.StartChild + /// ... + /// let! result1 = completor1 + /// let! result2 = completor2 + /// ... } + /// + /// When used in this way, each use of StartChild starts an instance of childComputation + /// and returns a completor object representing a computation to wait for the completion of the operation. + /// When executed, the completor awaits the completion of childComputation. + /// The child computation. + /// The timeout value in milliseconds. If one is not provided + /// then the default value of -1 corresponding to System.Threading.Timeout.Infinite. + /// A new computation that waits for the input computation to finish. + static member StartChild : computation:Async<'T> * ?millisecondsTimeout : int -> Async> + + /// Creates an asynchronous computation that executes all the given asynchronous computations, + /// initially queueing each as work items and using a fork/join pattern. + /// + /// If all child computations succeed, an array of results is passed to the success continuation. + /// + /// If any child computation raises an exception, then the overall computation will trigger an + /// exception, and cancel the others. + /// + /// The overall computation will respond to cancellation while executing the child computations. + /// If cancelled, the computation will cancel any remaining child computations but will still wait + /// for the other child computations to complete. + /// A sequence of distinct computations to be parallelized. + /// A computation that returns an array of values from the sequence of input computations. + static member Parallel : computations:seq> -> Async<'T[]> + + /// Creates an asynchronous computation that executes all given asynchronous computations in parallel, + /// returning the result of the first succeeding computation (one whose result is 'Some x'). + /// If all child computations complete with None, the parent computation also returns None. + /// + /// + /// If any child computation raises an exception, then the overall computation will trigger an + /// exception, and cancel the others. + /// + /// The overall computation will respond to cancellation while executing the child computations. + /// If cancelled, the computation will cancel any remaining child computations but will still wait + /// for the other child computations to complete. + /// A sequence of computations to be parallelized. + /// A computation that returns the first succeeding computation. + static member Choice : computations:seq> -> Async<'T option> + + //---------- Thread Control + + /// Creates an asynchronous computation that creates a new thread and runs + /// its continuation in that thread. + /// A computation that will execute on a new thread. + static member SwitchToNewThread : unit -> Async + + /// Creates an asynchronous computation that queues a work item that runs + /// its continuation. + /// A computation that generates a new work item in the thread pool. + static member SwitchToThreadPool : unit -> Async + + /// Creates an asynchronous computation that runs + /// its continuation using syncContext.Post. If syncContext is null + /// then the asynchronous computation is equivalent to SwitchToThreadPool(). + /// The synchronization context to accept the posted computation. + /// An asynchronous computation that uses the syncContext context to execute. + static member SwitchToContext : syncContext:System.Threading.SynchronizationContext -> Async + + /// Creates an asynchronous computation that captures the current + /// success, exception and cancellation continuations. The callback must + /// eventually call exactly one of the given continuations. + /// The function that accepts the current success, exception, and cancellation + /// continuations. + /// An asynchronous computation that provides the callback with the current continuations. + static member FromContinuations : callback:(('T -> unit) * (exn -> unit) * (OperationCanceledException -> unit) -> unit) -> Async<'T> + + /// Creates an asynchronous computation that waits for a single invocation of a CLI + /// event by adding a handler to the event. Once the computation completes or is + /// cancelled, the handler is removed from the event. + /// + /// The computation will respond to cancellation while waiting for the event. If a + /// cancellation occurs, and cancelAction is specified, then it is executed, and + /// the computation continues to wait for the event. + /// + /// If cancelAction is not specified, then cancellation causes the computation + /// to cancel immediately. + /// The event to handle once. + /// An optional function to execute instead of cancelling when a + /// cancellation is issued. + /// An asynchronous computation that waits for the event to be invoked. + static member AwaitEvent: event:IEvent<'Del,'T> * ?cancelAction : (unit -> unit) -> Async<'T> when 'Del : delegate<'T,unit> and 'Del :> System.Delegate + + /// Creates an asynchronous computation that will wait on the given WaitHandle. + /// + /// The computation returns true if the handle indicated a result within the given timeout. + /// The WaitHandle that can be signalled. + /// The timeout value in milliseconds. If one is not provided + /// then the default value of -1 corresponding to System.Threading.Timeout.Infinite. + /// An asynchronous computation that waits on the given WaitHandle. + static member AwaitWaitHandle: waitHandle: WaitHandle * ?millisecondsTimeout:int -> Async + + /// Creates an asynchronous computation that will wait on the IAsyncResult. + /// + /// The computation returns true if the handle indicated a result within the given timeout. + /// The IAsyncResult to wait on. + /// The timeout value in milliseconds. If one is not provided + /// then the default value of -1 corresponding to System.Threading.Timeout.Infinite. + /// An asynchronous computation that waits on the given IAsyncResult. + static member AwaitIAsyncResult: iar: System.IAsyncResult * ?millisecondsTimeout:int -> Async + + /// Return an asynchronous computation that will wait for the given task to complete and return + /// its result. + static member AwaitTask: task: Task<'T> -> Async<'T> + /// Return an asynchronous computation that will wait for the given task to complete and return + /// its result. + static member AwaitTask: task: Task -> Async + + /// Creates an asynchronous computation that will sleep for the given time. This is scheduled + /// using a System.Threading.Timer object. The operation will not block operating system threads + /// for the duration of the wait. + /// The number of milliseconds to sleep. + /// An asynchronous computation that will sleep for the given time. + /// Thrown when the due time is negative + /// and not infinite. + static member Sleep: millisecondsDueTime:int -> Async + + /// Creates an asynchronous computation in terms of a Begin/End pair of actions in + /// the style used in CLI APIs. For example, + /// Async.FromBeginEnd(ws.BeginGetWeather,ws.EndGetWeather) + /// When the computation is run, beginFunc is executed, with + /// a callback which represents the continuation of the computation. + /// When the callback is invoked, the overall result is fetched using endFunc. + /// + /// The computation will respond to cancellation while waiting for the completion + /// of the operation. If a cancellation occurs, and cancelAction is specified, then it is + /// executed, and the computation continues to wait for the completion of the operation. + /// + /// If cancelAction is not specified, then cancellation causes the computation + /// to stop immediately, and subsequent invocations of the callback are ignored. + /// The function initiating a traditional CLI asynchronous operation. + /// The function completing a traditional CLI asynchronous operation. + /// An optional function to be executed when a cancellation is requested. + /// An asynchronous computation wrapping the given Begin/End functions. + static member FromBeginEnd : beginAction:(System.AsyncCallback * obj -> System.IAsyncResult) * endAction:(System.IAsyncResult -> 'T) * ?cancelAction : (unit -> unit) -> Async<'T> + + /// Creates an asynchronous computation in terms of a Begin/End pair of actions in + /// the style used in CLI APIs. This overload should be used if the operation is + /// qualified by one argument. For example, + /// Async.FromBeginEnd(place,ws.BeginGetWeather,ws.EndGetWeather) + /// When the computation is run, beginFunc is executed, with + /// a callback which represents the continuation of the computation. + /// When the callback is invoked, the overall result is fetched using endFunc. + /// + /// The computation will respond to cancellation while waiting for the completion + /// of the operation. If a cancellation occurs, and cancelAction is specified, then it is + /// executed, and the computation continues to wait for the completion of the operation. + /// + /// If cancelAction is not specified, then cancellation causes the computation + /// to stop immediately, and subsequent invocations of the callback are ignored. + /// The argument for the operation. + /// The function initiating a traditional CLI asynchronous operation. + /// The function completing a traditional CLI asynchronous operation. + /// An optional function to be executed when a cancellation is requested. + /// An asynchronous computation wrapping the given Begin/End functions. + static member FromBeginEnd : arg:'Arg1 * beginAction:('Arg1 * System.AsyncCallback * obj -> System.IAsyncResult) * endAction:(System.IAsyncResult -> 'T) * ?cancelAction : (unit -> unit) -> Async<'T> + + /// Creates an asynchronous computation in terms of a Begin/End pair of actions in + /// the style used in CLI APIs. This overload should be used if the operation is + /// qualified by two arguments. For example, + /// Async.FromBeginEnd(arg1,arg2,ws.BeginGetWeather,ws.EndGetWeather) + /// When the computation is run, beginFunc is executed, with + /// a callback which represents the continuation of the computation. + /// When the callback is invoked, the overall result is fetched using endFunc. + /// + /// The computation will respond to cancellation while waiting for the completion + /// of the operation. If a cancellation occurs, and cancelAction is specified, then it is + /// executed, and the computation continues to wait for the completion of the operation. + /// + /// If cancelAction is not specified, then cancellation causes the computation + /// to stop immediately, and subsequent invocations of the callback are ignored. + /// The first argument for the operation. + /// The second argument for the operation. + /// The function initiating a traditional CLI asynchronous operation. + /// The function completing a traditional CLI asynchronous operation. + /// An optional function to be executed when a cancellation is requested. + /// An asynchronous computation wrapping the given Begin/End functions. + static member FromBeginEnd : arg1:'Arg1 * arg2:'Arg2 * beginAction:('Arg1 * 'Arg2 * System.AsyncCallback * obj -> System.IAsyncResult) * endAction:(System.IAsyncResult -> 'T) * ?cancelAction : (unit -> unit) -> Async<'T> + + /// Creates an asynchronous computation in terms of a Begin/End pair of actions in + /// the style used in CLI APIs. This overload should be used if the operation is + /// qualified by three arguments. For example, + /// Async.FromBeginEnd(arg1,arg2,arg3,ws.BeginGetWeather,ws.EndGetWeather) + /// When the computation is run, beginFunc is executed, with + /// a callback which represents the continuation of the computation. + /// When the callback is invoked, the overall result is fetched using endFunc. + /// + /// The computation will respond to cancellation while waiting for the completion + /// of the operation. If a cancellation occurs, and cancelAction is specified, then it is + /// executed, and the computation continues to wait for the completion of the operation. + /// + /// If cancelAction is not specified, then cancellation causes the computation + /// to stop immediately, and subsequent invocations of the callback are ignored. + /// The first argument for the operation. + /// The second argument for the operation. + /// The third argument for the operation. + /// The function initiating a traditional CLI asynchronous operation. + /// The function completing a traditional CLI asynchronous operation. + /// An optional function to be executed when a cancellation is requested. + /// An asynchronous computation wrapping the given Begin/End functions. + static member FromBeginEnd : arg1:'Arg1 * arg2:'Arg2 * arg3:'Arg3 * beginAction:('Arg1 * 'Arg2 * 'Arg3 * System.AsyncCallback * obj -> System.IAsyncResult) * endAction:(System.IAsyncResult -> 'T) * ?cancelAction : (unit -> unit) -> Async<'T> + + /// Creates three functions that can be used to implement the .NET Asynchronous + /// Programming Model (APM) for a given asynchronous computation. + /// + /// The functions should normally be published as members with prefix Begin, + /// End and Cancel, and can be used within a type definition as follows: + /// + /// let beginAction,endAction,cancelAction = Async.AsBeginEnd (fun arg -> computation) + /// member x.BeginSomeOperation(arg,callback,state:obj) = beginAction(arg,callback,state) + /// member x.EndSomeOperation(iar) = endAction(iar) + /// member x.CancelSomeOperation(iar) = cancelAction(iar) + /// + /// + /// If the asynchronous computation takes no arguments, then AsBeginEnd is used as follows: + /// + /// let beginAction,endAction,cancelAction = Async.AsBeginEnd (fun () -> computation) + /// member x.BeginSomeOperation(callback,state:obj) = beginAction((),callback,state) + /// member x.EndSomeOperation(iar) = endAction(iar) + /// member x.CancelSomeOperation(iar) = cancelAction(iar) + /// + /// + /// + /// If the asynchronous computation takes two arguments, then AsBeginEnd is used as follows: + /// + /// let beginAction,endAction,cancelAction = Async.AsBeginEnd (fun arg1 arg2 -> computation) + /// member x.BeginSomeOperation(arg1,arg2,callback,state:obj) = beginAction((),callback,state) + /// member x.EndSomeOperation(iar) = endAction(iar) + /// member x.CancelSomeOperation(iar) = cancelAction(iar) + /// + /// + /// In each case, the resulting API will be familiar to programmers in other CLI languages and + /// is a useful way to publish asynchronous computations in CLI components. + /// A function generating the asynchronous computation to split into the traditional + /// .NET Asynchronous Programming Model. + /// A tuple of the begin, end, and cancel members. + static member AsBeginEnd : computation:('Arg -> Async<'T>) -> + // The 'Begin' member + ('Arg * System.AsyncCallback * obj -> System.IAsyncResult) * + // The 'End' member + (System.IAsyncResult -> 'T) * + // The 'Cancel' member + (System.IAsyncResult -> unit) + + /// Creates an asynchronous computation that runs the given computation and ignores + /// its result. + /// The input computation. + /// A computation that is equivalent to the input computation, but disregards the result. + static member Ignore : computation: Async<'T> -> Async + + /// Runs an asynchronous computation, starting immediately on the current operating system + /// thread. Call one of the three continuations when the operation completes. + /// If no cancellation token is provided then the default cancellation token + /// is used. + /// The asynchronous computation to execute. + /// The function called on success. + /// The function called on exception. + /// The function called on cancellation. + /// The CancellationToken to associate with the computation. + /// The default is used if this parameter is not provided. + static member StartWithContinuations: + computation:Async<'T> * + continuation:('T -> unit) * exceptionContinuation:(exn -> unit) * cancellationContinuation:(OperationCanceledException -> unit) * + ?cancellationToken:CancellationToken-> unit + + static member internal StartWithContinuationsUsingDispatchInfo: + computation:Async<'T> * + continuation:('T -> unit) * exceptionContinuation:(ExceptionDispatchInfo -> unit) * cancellationContinuation:(OperationCanceledException -> unit) * + ?cancellationToken:CancellationToken-> unit + + /// Runs an asynchronous computation, starting immediately on the current operating system + /// thread. + /// If no cancellation token is provided then the default cancellation token is used. + /// The asynchronous computation to execute. + /// The CancellationToken to associate with the computation. + /// The default is used if this parameter is not provided. + static member StartImmediate: + computation:Async * ?cancellationToken:CancellationToken-> unit + + /// Runs an asynchronous computation, starting immediately on the current operating system, + /// but also returns the execution as System.Threading.Tasks.Task + /// + /// If no cancellation token is provided then the default cancellation token is used. + /// You may prefer using this method if you want to achive a similar behviour to async await in C# as + /// async computation starts on the current thread with an ability to return a result. + /// + /// The asynchronous computation to execute. + /// The CancellationToken to associate with the computation. + /// The default is used if this parameter is not provided. + /// A System.Threading.Tasks.Task that will be completed + /// in the corresponding state once the computation terminates (produces the result, throws exception or gets canceled) + static member StartImmediateAsTask: + computation:Async<'T> * ?cancellationToken:CancellationToken-> Task<'T> + + + /// The F# compiler emits references to this type to implement F# async expressions. + type AsyncReturn + + /// The F# compiler emits references to this type to implement F# async expressions. + [] + type AsyncActivation<'T> = + + /// The F# compiler emits calls to this function to implement F# async expressions. + /// + /// A value indicating asynchronous execution. + member IsCancellationRequested: bool + + /// The F# compiler emits calls to this function to implement F# async expressions. + /// + /// A value indicating asynchronous execution. + member OnSuccess: 'T -> AsyncReturn + + /// The F# compiler emits calls to this function to implement F# async expressions. + member OnExceptionRaised: unit -> unit + + /// The F# compiler emits calls to this function to implement F# async expressions. + /// + /// A value indicating asynchronous execution. + member OnCancellation: unit -> AsyncReturn + + /// Used by MailboxProcessor + member internal QueueContinuationWithTrampoline: 'T -> AsyncReturn + /// Used by MailboxProcessor + member internal CallContinuation: 'T -> AsyncReturn + + [] + // Internals used by MailboxProcessor + type internal AsyncResult<'T> = + | Ok of 'T + | Error of ExceptionDispatchInfo + | Canceled of OperationCanceledException + + [] + /// Entry points for generated code + module AsyncPrimitives = + + /// The F# compiler emits calls to this function to implement F# async expressions. + /// + /// The body of the async computation. + /// + /// The async computation. + val MakeAsync: body:(AsyncActivation<'T> -> AsyncReturn) -> Async<'T> + + /// The F# compiler emits calls to this function to implement constructs for F# async expressions. + /// + /// The async computation. + /// The async activation. + /// + /// A value indicating asynchronous execution. + val Invoke: computation: Async<'T> -> ctxt:AsyncActivation<'T> -> AsyncReturn + + /// The F# compiler emits calls to this function to implement constructs for F# async expressions. + /// + /// The async activation. + /// The result of the first part of the computation. + /// A function returning the second part of the computation. + /// + /// A value indicating asynchronous execution. + val CallThenInvoke: ctxt:AsyncActivation<'T> -> result1:'U -> part2:('U -> Async<'T>) -> AsyncReturn + + /// The F# compiler emits calls to this function to implement the let! construct for F# async expressions. + /// + /// The async activation. + /// A function returning the second part of the computation. + /// + /// An async activation suitable for running part1 of the asynchronous execution. + val Bind: ctxt:AsyncActivation<'T> -> part1:Async<'U> -> part2:('U -> Async<'T>) -> AsyncReturn + + /// The F# compiler emits calls to this function to implement the try/finally construct for F# async expressions. + /// + /// The async activation. + /// The computation to protect. + /// The finally code. + /// + /// A value indicating asynchronous execution. + val TryFinally: ctxt:AsyncActivation<'T> -> computation: Async<'T> -> finallyFunction: (unit -> unit) -> AsyncReturn + + /// The F# compiler emits calls to this function to implement the try/with construct for F# async expressions. + /// + /// The async activation. + /// The computation to protect. + /// The exception filter. + /// + /// A value indicating asynchronous execution. + val TryWith: ctxt:AsyncActivation<'T> -> computation: Async<'T> -> catchFunction: (Exception -> Async<'T> option) -> AsyncReturn + + [] + // Internals used by MailboxProcessor + type internal ResultCell<'T> = + new : unit -> ResultCell<'T> + member GetWaitHandle: unit -> WaitHandle + member Close: unit -> unit + interface IDisposable + member RegisterResult: 'T * reuseThread: bool -> AsyncReturn + member GrabResult: unit -> 'T + member ResultAvailable : bool + member AwaitResult_NoDirectCancelOrTimeout : Async<'T> + member TryWaitForResultSynchronously: ?timeout: int -> 'T option + + // Internals used by MailboxProcessor + val internal CreateAsyncResultAsync : AsyncResult<'T> -> Async<'T> + + [] + [] + /// The type of the async operator, used to build workflows for asynchronous computations. + type AsyncBuilder = + /// Creates an asynchronous computation that enumerates the sequence seq + /// on demand and runs body for each element. + /// + /// A cancellation check is performed on each iteration of the loop. + /// + /// The existence of this method permits the use of for in the + /// async { ... } computation expression syntax. + /// The sequence to enumerate. + /// A function to take an item from the sequence and create + /// an asynchronous computation. Can be seen as the body of the for expression. + /// An asynchronous computation that will enumerate the sequence and run body + /// for each element. + member For: sequence:seq<'T> * body:('T -> Async) -> Async + + /// Creates an asynchronous computation that just returns (). + /// + /// A cancellation check is performed when the computation is executed. + /// + /// The existence of this method permits the use of empty else branches in the + /// async { ... } computation expression syntax. + /// An asynchronous computation that returns (). + member Zero : unit -> Async + + /// Creates an asynchronous computation that first runs computation1 + /// and then runs computation2, returning the result of computation2. + /// + /// A cancellation check is performed when the computation is executed. + /// + /// The existence of this method permits the use of expression sequencing in the + /// async { ... } computation expression syntax. + /// The first part of the sequenced computation. + /// The second part of the sequenced computation. + /// An asynchronous computation that runs both of the computations sequentially. + member inline Combine : computation1:Async * computation2:Async<'T> -> Async<'T> + + /// Creates an asynchronous computation that runs computation repeatedly + /// until guard() becomes false. + /// + /// A cancellation check is performed whenever the computation is executed. + /// + /// The existence of this method permits the use of while in the + /// async { ... } computation expression syntax. + /// The function to determine when to stop executing computation. + /// The function to be executed. Equivalent to the body + /// of a while expression. + /// An asynchronous computation that behaves similarly to a while loop when run. + member While : guard:(unit -> bool) * computation:Async -> Async + + /// Creates an asynchronous computation that returns the result v. + /// + /// A cancellation check is performed when the computation is executed. + /// + /// The existence of this method permits the use of return in the + /// async { ... } computation expression syntax. + /// The value to return from the computation. + /// An asynchronous computation that returns value when executed. + member inline Return : value:'T -> Async<'T> + + /// Delegates to the input computation. + /// + /// The existence of this method permits the use of return! in the + /// async { ... } computation expression syntax. + /// The input computation. + /// The input computation. + member inline ReturnFrom : computation:Async<'T> -> Async<'T> + + /// Creates an asynchronous computation that runs generator. + /// + /// A cancellation check is performed when the computation is executed. + /// The function to run. + /// An asynchronous computation that runs generator. + member Delay : generator:(unit -> Async<'T>) -> Async<'T> + + /// Creates an asynchronous computation that runs binder(resource). + /// The action resource.Dispose() is executed as this computation yields its result + /// or if the asynchronous computation exits by an exception or by cancellation. + /// + /// A cancellation check is performed when the computation is executed. + /// + /// The existence of this method permits the use of use and use! in the + /// async { ... } computation expression syntax. + /// The resource to be used and disposed. + /// The function that takes the resource and returns an asynchronous + /// computation. + /// An asynchronous computation that binds and eventually disposes resource. + member Using: resource:'T * binder:('T -> Async<'U>) -> Async<'U> when 'T :> System.IDisposable + + /// Creates an asynchronous computation that runs computation, and when + /// computation generates a result T, runs binder res. + /// + /// A cancellation check is performed when the computation is executed. + /// + /// The existence of this method permits the use of let! in the + /// async { ... } computation expression syntax. + /// The computation to provide an unbound result. + /// The function to bind the result of computation. + /// An asynchronous computation that performs a monadic bind on the result + /// of computation. + member inline Bind: computation: Async<'T> * binder: ('T -> Async<'U>) -> Async<'U> + + /// Creates an asynchronous computation that runs computation. The action compensation is executed + /// after computation completes, whether computation exits normally or by an exception. If compensation raises an exception itself + /// the original exception is discarded and the new exception becomes the overall result of the computation. + /// + /// A cancellation check is performed when the computation is executed. + /// + /// The existence of this method permits the use of try/finally in the + /// async { ... } computation expression syntax. + /// The input computation. + /// The action to be run after computation completes or raises an + /// exception (including cancellation). + /// An asynchronous computation that executes computation and compensation afterwards or + /// when an exception is raised. + member inline TryFinally : computation:Async<'T> * compensation:(unit -> unit) -> Async<'T> + + /// Creates an asynchronous computation that runs computation and returns its result. + /// If an exception happens then catchHandler(exn) is called and the resulting computation executed instead. + /// + /// A cancellation check is performed when the computation is executed. + /// + /// The existence of this method permits the use of try/with in the + /// async { ... } computation expression syntax. + /// + /// The input computation. + /// The function to run when computation throws an exception. + /// An asynchronous computation that executes computation and calls catchHandler if an + /// exception is thrown. + member inline TryWith : computation:Async<'T> * catchHandler:(exn -> Async<'T>) -> Async<'T> + + // member inline TryWithFilter : computation:Async<'T> * catchHandler:(exn -> Async<'T> option) -> Async<'T> + + /// Generate an object used to build asynchronous computations using F# computation expressions. The value + /// 'async' is a pre-defined instance of this type. + /// + /// A cancellation check is performed when the computation is executed. + internal new : unit -> AsyncBuilder + + [] + /// A module of extension members providing asynchronous operations for some basic CLI types related to concurrency and I/O. + module CommonExtensions = + + type System.IO.Stream with + + /// Returns an asynchronous computation that will read from the stream into the given buffer. + /// The buffer to read into. + /// An optional offset as a number of bytes in the stream. + /// An optional number of bytes to read from the stream. + /// An asynchronous computation that will read from the stream into the given buffer. + /// Thrown when the sum of offset and count is longer than + /// the buffer length. + /// Thrown when offset or count is negative. + [] // give the extension member a nice, unmangled compiled name, unique within this module + member AsyncRead : buffer:byte[] * ?offset:int * ?count:int -> Async + + /// Returns an asynchronous computation that will read the given number of bytes from the stream. + /// The number of bytes to read. + /// An asynchronous computation that returns the read byte[] when run. + [] // give the extension member a nice, unmangled compiled name, unique within this module + member AsyncRead : count:int -> Async + + /// Returns an asynchronous computation that will write the given bytes to the stream. + /// The buffer to write from. + /// An optional offset as a number of bytes in the stream. + /// An optional number of bytes to write to the stream. + /// An asynchronous computation that will write the given bytes to the stream. + /// Thrown when the sum of offset and count is longer than + /// the buffer length. + /// Thrown when offset or count is negative. + [] // give the extension member a nice, unmangled compiled name, unique within this module + member AsyncWrite : buffer:byte[] * ?offset:int * ?count:int -> Async + + + ///The family of first class event values for delegate types that satisfy the F# delegate constraint. + type IObservable<'T> with + /// Permanently connects a listener function to the observable. The listener will + /// be invoked for each observation. + /// The function to be called for each observation. + [] // give the extension member a nice, unmangled compiled name, unique within this module + member Add: callback:('T -> unit) -> unit + + /// Connects a listener function to the observable. The listener will + /// be invoked for each observation. The listener can be removed by + /// calling Dispose on the returned IDisposable object. + /// The function to be called for each observation. + /// An object that will remove the listener if disposed. + [] // give the extension member a nice, unmangled compiled name, unique within this module + member Subscribe: callback:('T -> unit) -> System.IDisposable + + /// A module of extension members providing asynchronous operations for some basic Web operations. + [] + module WebExtensions = + + type System.Net.WebRequest with + /// Returns an asynchronous computation that, when run, will wait for a response to the given WebRequest. + /// An asynchronous computation that waits for response to the WebRequest. + [] // give the extension member a nice, unmangled compiled name, unique within this module + member AsyncGetResponse : unit -> Async + +#if !FX_NO_WEB_CLIENT + type System.Net.WebClient with + + /// Returns an asynchronous computation that, when run, will wait for the download of the given URI. + /// The URI to retrieve. + /// An asynchronous computation that will wait for the download of the URI. + [] // give the extension member a nice, unmangled compiled name, unique within this module + member AsyncDownloadString : address:System.Uri -> Async + + /// Returns an asynchronous computation that, when run, will wait for the download of the given URI. + /// The URI to retrieve. + /// An asynchronous computation that will wait for the download of the URI. + [] // give the extension member a nice, unmangled compiled name, unique within this module + member AsyncDownloadData : address:System.Uri -> Async + + /// Returns an asynchronous computation that, when run, will wait for the download of the given URI to specified file. + /// The URI to retrieve. + /// The filename to save download to. + /// An asynchronous computation that will wait for the download of the URI to specified file. + [] // give the extension member a nice, unmangled compiled name, unique within this module + member AsyncDownloadFile : address:System.Uri * fileName: string -> Async +#endif + + // Internals used by MailboxProcessor + module internal AsyncBuilderImpl = + val async : AsyncBuilder + diff --git a/src/fsharp/FSharp.Core/control.fs b/src/fsharp/FSharp.Core/control.fs deleted file mode 100644 index a614813e4ba..00000000000 --- a/src/fsharp/FSharp.Core/control.fs +++ /dev/null @@ -1,2438 +0,0 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. - -namespace Microsoft.FSharp.Control - - #nowarn "40" - #nowarn "21" - #nowarn "47" - #nowarn "52" // The value has been copied to ensure the original is not mutated by this operation - #nowarn "67" // This type test or downcast will always hold - #nowarn "864" // IObservable.Subscribe - - open System - open System.Diagnostics - open System.Diagnostics.CodeAnalysis - open System.IO - open System.Reflection - open System.Runtime.ExceptionServices - open System.Threading - open System.Threading.Tasks - open Microsoft.FSharp.Core - open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators - open Microsoft.FSharp.Core.Operators - open Microsoft.FSharp.Control - open Microsoft.FSharp.Collections - -#if FX_RESHAPED_REFLECTION - open ReflectionAdapters -#endif - - - /// We use our own internal implementation of queues to avoid a dependency on System.dll - type Queue<'T>() = //: IEnumerable, ICollection, IEnumerable - - let mutable array = [| |] - let mutable head = 0 - let mutable size = 0 - let mutable tail = 0 - - let SetCapacity(capacity) = - let destinationArray = Array.zeroCreate capacity; - if (size > 0) then - if (head < tail) then - System.Array.Copy(array, head, destinationArray, 0, size); - - else - System.Array.Copy(array, head, destinationArray, 0, array.Length - head); - System.Array.Copy(array, 0, destinationArray, array.Length - head, tail); - array <- destinationArray; - head <- 0; - tail <- if (size = capacity) then 0 else size; - - member x.Dequeue() = - if (size = 0) then - failwith "Dequeue" - let local = array.[head]; - array.[head] <- Unchecked.defaultof<'T> - head <- (head + 1) % array.Length; - size <- size - 1; - local - - member this.Enqueue(item) = - if (size = array.Length) then - let capacity = int ((int64 array.Length * 200L) / 100L); - let capacity = max capacity (array.Length + 4) - SetCapacity(capacity); - array.[tail] <- item; - tail <- (tail + 1) % array.Length; - size <- size + 1 - - member x.Count = size - - type LinkedSubSource(ct : CancellationToken) = - - let failureCTS = new CancellationTokenSource() - let linkedCTS = CancellationTokenSource.CreateLinkedTokenSource(ct, failureCTS.Token) - - member this.Token = linkedCTS.Token - member this.Cancel() = failureCTS.Cancel() - member this.Dispose() = - linkedCTS.Dispose() - failureCTS.Dispose() - - interface IDisposable with - member this.Dispose() = this.Dispose() - - - // F# don't always take tailcalls to functions returning 'unit' because this - // is represented as type 'void' in the underlying IL. - // Hence we don't use the 'unit' return type here, and instead invent our own type. - [] - type FakeUnitValue = - | FakeUnit - - - type cont<'T> = ('T -> FakeUnitValue) - type econt = (ExceptionDispatchInfo -> FakeUnitValue) - type ccont = (OperationCanceledException -> FakeUnitValue) - - - - //---------------------------------- - // PRIMITIVE ASYNC TRAMPOLINE - - [] - type Trampoline() = - - [] - static let bindLimitBeforeHijack = 300 - - [] - [] - static val mutable private thisThreadHasTrampoline : bool - - static member ThisThreadHasTrampoline = - Trampoline.thisThreadHasTrampoline - - let mutable cont = None - let mutable bindCount = 0 - - static let unfake FakeUnit = () - - // Install a trampolineStack if none exists - member this.ExecuteAction (firstAction : unit -> FakeUnitValue) = - let rec loop action = - action() |> unfake - match cont with - | None -> () - | Some newAction -> - cont <- None - loop newAction - let thisIsTopTrampoline = - if Trampoline.thisThreadHasTrampoline then - false - else - Trampoline.thisThreadHasTrampoline <- true - true - try - loop firstAction - finally - if thisIsTopTrampoline then - Trampoline.thisThreadHasTrampoline <- false - FakeUnit - - // returns true if time to jump on trampoline - member this.IncrementBindCount() = - bindCount <- bindCount + 1 - bindCount >= bindLimitBeforeHijack - - member this.Set action = - match cont with - | None -> - bindCount <- 0 - cont <- Some action - | _ -> failwith "Internal error: attempting to install continuation twice" - - -#if FSCORE_PORTABLE_NEW - // Imitation of desktop functionality for .NETCore - // 1. QueueUserWorkItem reimplemented as Task.Run - // 2. Thread.CurrentThread type in the code is typically used to check if continuation is called on the same thread that initiated the async computation - // if this condition holds we may decide to invoke continuation directly rather than queueing it. - // Thread type here is barely a wrapper over CurrentManagedThreadId value - it should be enough to uniquely identify the actual thread - - [] - type internal WaitCallback = WaitCallback of (obj -> unit) - - type ThreadPool = - static member QueueUserWorkItem(WaitCallback(cb), state : obj) = - System.Threading.Tasks.Task.Run (fun () -> cb(state)) |> ignore - true - - [] - type Thread(threadId : int) = - static member CurrentThread = Thread(Environment.CurrentManagedThreadId) - member this.ThreadId = threadId - override this.GetHashCode() = threadId - override this.Equals(other : obj) = - match other with - | :? Thread as other -> threadId = other.ThreadId - | _ -> false - -#endif - - type TrampolineHolder() as this = - let mutable trampoline = null - - static let unfake FakeUnit = () - // preallocate context-switching callbacks - // Preallocate the delegate - // This should be the only call to SynchronizationContext.Post in this library. We must always install a trampoline. - let sendOrPostCallback = - SendOrPostCallback(fun o -> - let f = unbox o : unit -> FakeUnitValue - this.Protect f |> unfake - ) - - // Preallocate the delegate - // This should be the only call to QueueUserWorkItem in this library. We must always install a trampoline. - let waitCallbackForQueueWorkItemWithTrampoline = - WaitCallback(fun o -> - let f = unbox o : unit -> FakeUnitValue - this.Protect f |> unfake - ) - -#if !FX_NO_PARAMETERIZED_THREAD_START - // This should be the only call to Thread.Start in this library. We must always install a trampoline. - let threadStartCallbackForStartThreadWithTrampoline = - ParameterizedThreadStart(fun o -> - let f = unbox o : unit -> FakeUnitValue - this.Protect f |> unfake - ) -#endif - - member this.Post (ctxt: SynchronizationContext) (f : unit -> FakeUnitValue) = - ctxt.Post (sendOrPostCallback, state=(f |> box)) - FakeUnit - - member this.QueueWorkItem (f: unit -> FakeUnitValue) = - if not (ThreadPool.QueueUserWorkItem(waitCallbackForQueueWorkItemWithTrampoline, f |> box)) then - failwith "failed to queue user work item" - FakeUnit - -#if FX_NO_PARAMETERIZED_THREAD_START - // This should be the only call to Thread.Start in this library. We must always install a trampoline. - member this.StartThread (f : unit -> FakeUnitValue) = -#if FX_NO_THREAD - this.QueueWorkItem(f) -#else - (new Thread((fun _ -> this.Protect f |> unfake), IsBackground=true)).Start() - FakeUnit -#endif - -#else - // This should be the only call to Thread.Start in this library. We must always install a trampoline. - member this.StartThread (f : unit -> FakeUnitValue) = - (new Thread(threadStartCallbackForStartThreadWithTrampoline,IsBackground=true)).Start(f|>box) - FakeUnit -#endif - - member this.Protect firstAction = - trampoline <- new Trampoline() - trampoline.ExecuteAction(firstAction) - - member this.Trampoline = trampoline - - [] - [] - type AsyncParamsAux = - { token : CancellationToken; - econt : econt; - ccont : ccont; - trampolineHolder : TrampolineHolder - } - - [] - [] - type AsyncParams<'T> = - { cont : cont<'T> - aux : AsyncParamsAux - } - - [] - [] - type Async<'T> = - P of (AsyncParams<'T> -> FakeUnitValue) - - module AsyncBuilderImpl = - // To consider: augment with more exception traceability information - // To consider: add the ability to suspend running ps in debug mode - // To consider: add the ability to trace running ps in debug mode - open System - open System.Threading - open System.IO - open Microsoft.FSharp.Core - - let fake () = FakeUnit - let unfake FakeUnit = () - let ignoreFake _ = FakeUnit - - - let mutable defaultCancellationTokenSource = new CancellationTokenSource() - - [] - type AsyncImplResult<'T> = - | Ok of 'T - | Error of ExceptionDispatchInfo - | Canceled of OperationCanceledException - - let inline hijack (trampolineHolder:TrampolineHolder) res (cont : 'T -> FakeUnitValue) : FakeUnitValue = - if trampolineHolder.Trampoline.IncrementBindCount() then - trampolineHolder.Trampoline.Set(fun () -> cont res) - FakeUnit - else - // NOTE: this must be a tailcall - cont res - - /// Global mutable state used to associate Exception - let associationTable = System.Runtime.CompilerServices.ConditionalWeakTable() - - type ExceptionDispatchInfo with - - member edi.GetAssociatedSourceException() = - let exn = edi.SourceException - // Try to store the entry in the association table to allow us to recover it later. - try lock associationTable (fun () -> associationTable.Add(exn, edi)) with _ -> () - exn - - // Capture, but prefer the saved information if available - static member inline RestoreOrCapture(exn) = - match lock associationTable (fun () -> associationTable.TryGetValue(exn)) with - | true, edi -> edi - | _ -> - ExceptionDispatchInfo.Capture(exn) - - member inline edi.ThrowAny() = - edi.Throw() - Unchecked.defaultof<'T> // Note, this line should not be reached, but gives a generic return type - - // Apply f to x and call either the continuation or exception continuation depending what happens - let inline protect (trampolineHolder:TrampolineHolder) econt f x (cont : 'T -> FakeUnitValue) : FakeUnitValue = - // This is deliberately written in a allocation-free style, except when the trampoline is taken - let mutable res = Unchecked.defaultof<_> - let mutable edi = null - - try - res <- f x - with exn -> - edi <- ExceptionDispatchInfo.RestoreOrCapture(exn) - - match edi with - | null -> - // NOTE: this must be a tailcall - hijack trampolineHolder res cont - | _ -> - // NOTE: this must be a tailcall - hijack trampolineHolder edi econt - - // Apply f to x and call either the continuation or exception continuation depending what happens - let inline protectNoHijack econt f x (cont : 'T -> FakeUnitValue) : FakeUnitValue = - // This is deliberately written in a allocation-free style - let mutable res = Unchecked.defaultof<_> - let mutable edi = null - - try - res <- f x - with exn -> - edi <- ExceptionDispatchInfo.RestoreOrCapture(exn) - - match edi with - | null -> - // NOTE: this must be a tailcall - cont res - | exn -> - // NOTE: this must be a tailcall - econt exn - - - - // Reify exceptional results as exceptions - let commit res = - match res with - | Ok res -> res - | Error edi -> edi.ThrowAny() - | Canceled exn -> raise exn - - // Reify exceptional results as exceptionsJIT 64 doesn't always take tailcalls correctly - - let commitWithPossibleTimeout res = - match res with - | None -> raise (System.TimeoutException()) - | Some res -> commit res - - - //---------------------------------- - // PRIMITIVE ASYNC INVOCATION - - // Apply the underlying implementation of an async computation to its inputs - let inline invokeA (P pf) args = pf args - - - let startA cancellationToken trampolineHolder cont econt ccont p = - let args = - { cont = cont - aux = { token = cancellationToken; - econt = econt - ccont = ccont - trampolineHolder = trampolineHolder - } - } - invokeA p args - - -#if FX_NO_PARAMETERIZED_THREAD_START - // Preallocate the delegate - // This should be the only call to QueueUserWorkItem in this library. We must always install a trampoline. - let waitCallbackForQueueWorkItemWithTrampoline(trampolineHolder : TrampolineHolder) = - WaitCallback(fun o -> - let f = unbox o : unit -> FakeUnitValue - trampolineHolder.Protect f |> unfake - ) - - let startThreadWithTrampoline (trampolineHolder:TrampolineHolder) (f : unit -> FakeUnitValue) = -#if FX_NO_THREAD - if not (ThreadPool.QueueUserWorkItem((waitCallbackForQueueWorkItemWithTrampoline trampolineHolder), f |> box)) then - failwith "failed to queue user work item" - FakeUnit -#else - (new Thread((fun _ -> trampolineHolder.Protect f |> unfake), IsBackground=true)).Start() - FakeUnit -#endif - -#else - - // Statically preallocate the delegate - let threadStartCallbackForStartThreadWithTrampoline = - ParameterizedThreadStart(fun o -> - let (trampolineHolder,f) = unbox o : TrampolineHolder * (unit -> FakeUnitValue) - trampolineHolder.Protect f |> unfake - ) - - // This should be the only call to Thread.Start in this library. We must always install a trampoline. - let startThreadWithTrampoline (trampolineHolder:TrampolineHolder) (f : unit -> FakeUnitValue) = - (new Thread(threadStartCallbackForStartThreadWithTrampoline,IsBackground=true)).Start((trampolineHolder,f)|>box) - FakeUnit -#endif - - - let startAsync cancellationToken cont econt ccont p = - let trampolineHolder = new TrampolineHolder() - trampolineHolder.Protect (fun () -> startA cancellationToken trampolineHolder cont econt ccont p) - - let queueAsync cancellationToken cont econt ccont p = - let trampolineHolder = new TrampolineHolder() - trampolineHolder.QueueWorkItem(fun () -> startA cancellationToken trampolineHolder cont econt ccont p) - - - //---------------------------------- - // PRIMITIVE ASYNC CONSTRUCTORS - - // Use this to recover ExceptionDispatchInfo when outside the "with" part of a try/with block. - // This indicates all the places where we lose a stack trace. - // - // Stack trace losses come when interoperating with other code that only provide us with an exception value, - // notably .NET 4.x tasks and user exceptions passed to the exception continuation in Async.FromContinuations. - let MayLoseStackTrace exn = ExceptionDispatchInfo.RestoreOrCapture(exn) - - // Call the exception continuation - let errorT args edi = - args.aux.econt edi - - // Call the cancellation continuation - let cancelT (args:AsyncParams<_>) = - args.aux.ccont (new OperationCanceledException(args.aux.token)) - - // Build a primitive without any exception of resync protection - // - // Use carefully!! - let unprotectedPrimitive f = P f - - let protectedPrimitiveCore args f = - if args.aux.token.IsCancellationRequested then - cancelT args - else - try - f args - with exn -> - let edi = ExceptionDispatchInfo.RestoreOrCapture(exn) - errorT args edi - - // When run, ensures that any exceptions raised by the immediate execution of "f" are - // sent to the exception continuation. - // - let protectedPrimitive f = - unprotectedPrimitive (fun args -> protectedPrimitiveCore args f) - - let reify res = - unprotectedPrimitive (fun args -> - match res with - | AsyncImplResult.Ok r -> args.cont r - | AsyncImplResult.Error e -> args.aux.econt e - | AsyncImplResult.Canceled oce -> args.aux.ccont oce) - - //---------------------------------- - // BUILDER OPERATIONS - - // Generate async computation which calls its continuation with the given result - let resultA x = - unprotectedPrimitive (fun ({ aux = aux } as args) -> - if aux.token.IsCancellationRequested then - cancelT args - else - hijack aux.trampolineHolder x args.cont) - - - - // The primitive bind operation. Generate a process that runs the first process, takes - // its result, applies f and then runs the new process produced. Hijack if necessary and - // run 'f' with exception protection - let bindA p1 f = - unprotectedPrimitive (fun args -> - if args.aux.token.IsCancellationRequested then - cancelT args - else - - let args = - let cont a = protectNoHijack args.aux.econt f a (fun p2 -> invokeA p2 args) - { cont=cont; - aux = args.aux - } - // Trampoline the continuation onto a new work item every so often - let trampoline = args.aux.trampolineHolder.Trampoline - if trampoline.IncrementBindCount() then - trampoline.Set(fun () -> invokeA p1 args) - FakeUnit - else - // NOTE: this must be a tailcall - invokeA p1 args) - - - // callA = "bindA (return x) f" - let callA f x = - unprotectedPrimitive (fun args -> - if args.aux.token.IsCancellationRequested then - cancelT args - else - protect args.aux.trampolineHolder args.aux.econt f x (fun p2 -> invokeA p2 args) - ) - - // delayPrim = "bindA (return ()) f" - let delayA f = callA f () - - // Call p but augment the normal, exception and cancel continuations with a call to finallyFunction. - // If the finallyFunction raises an exception then call the original exception continuation - // with the new exception. If exception is raised after a cancellation, exception is ignored - // and cancel continuation is called. - let tryFinallyA finallyFunction p = - unprotectedPrimitive (fun args -> - if args.aux.token.IsCancellationRequested then - cancelT args - else - let trampolineHolder = args.aux.trampolineHolder - // The new continuation runs the finallyFunction and resumes the old continuation - // If an exception is thrown we continue with the previous exception continuation. - let cont b = protect trampolineHolder args.aux.econt finallyFunction () (fun () -> args.cont b) - // The new exception continuation runs the finallyFunction and then runs the previous exception continuation. - // If an exception is thrown we continue with the previous exception continuation. - let econt exn = protect trampolineHolder args.aux.econt finallyFunction () (fun () -> args.aux.econt exn) - // The cancellation continuation runs the finallyFunction and then runs the previous cancellation continuation. - // If an exception is thrown we continue with the previous cancellation continuation (the exception is lost) - let ccont cexn = protect trampolineHolder (fun _ -> args.aux.ccont cexn) finallyFunction () (fun () -> args.aux.ccont cexn) - invokeA p { args with cont = cont; aux = { args.aux with econt = econt; ccont = ccont } }) - - // Re-route the exception continuation to call to catchFunction. If catchFunction or the new process fail - // then call the original exception continuation with the failure. - let tryWithDispatchInfoA catchFunction p = - unprotectedPrimitive (fun args -> - if args.aux.token.IsCancellationRequested then - cancelT args - else - let econt (edi: ExceptionDispatchInfo) = invokeA (callA catchFunction edi) args - invokeA p { args with aux = { args.aux with econt = econt } }) - - let tryWithExnA catchFunction computation = - computation |> tryWithDispatchInfoA (fun edi -> catchFunction (edi.GetAssociatedSourceException())) - - /// Call the finallyFunction if the computation results in a cancellation - let whenCancelledA (finallyFunction : OperationCanceledException -> unit) p = - unprotectedPrimitive (fun ({ aux = aux } as args)-> - let ccont exn = protect aux.trampolineHolder (fun _ -> aux.ccont exn) finallyFunction exn (fun _ -> aux.ccont exn) - invokeA p { args with aux = { aux with ccont = ccont } }) - - let getCancellationToken() = - unprotectedPrimitive (fun ({ aux = aux } as args) -> args.cont aux.token) - - let getTrampolineHolder() = - unprotectedPrimitive (fun ({ aux = aux } as args) -> args.cont aux.trampolineHolder) - - /// Return a unit result - let doneA = - resultA() - - /// Implement use/Dispose - let usingA (r:'T :> IDisposable) (f:'T -> Async<'a>) : Async<'a> = - let mutable x = 0 - let disposeFunction _ = - if Interlocked.CompareExchange(&x, 1, 0) = 0 then - Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicFunctions.Dispose r - tryFinallyA disposeFunction (callA f r) |> whenCancelledA disposeFunction - - let ignoreA p = - bindA p (fun _ -> doneA) - - /// Implement the while loop - let rec whileA gd prog = - if gd() then - bindA prog (fun () -> whileA gd prog) - else - doneA - - /// Implement the for loop - let rec forA (e: seq<_>) prog = - usingA (e.GetEnumerator()) (fun ie -> - whileA - (fun () -> ie.MoveNext()) - (delayA(fun () -> prog ie.Current))) - - - let sequentialA p1 p2 = - bindA p1 (fun () -> p2) - - - open AsyncBuilderImpl - - [] - [] - type AsyncBuilder() = - member b.Zero() = doneA - member b.Delay(generator) = delayA(generator) - member b.Return(value) = resultA(value) - member b.ReturnFrom(computation:Async<_>) = computation - member b.Bind(computation, binder) = bindA computation binder - member b.Using(resource, binder) = usingA resource binder - member b.While(guard, computation) = whileA guard computation - member b.For(sequence, body) = forA sequence body - member b.Combine(computation1, computation2) = sequentialA computation1 computation2 - member b.TryFinally(computation, compensation) = tryFinallyA compensation computation - member b.TryWith(computation, catchHandler) = tryWithExnA catchHandler computation - - module AsyncImpl = - let async = AsyncBuilder() - - //---------------------------------- - // DERIVED SWITCH TO HELPERS - - let switchTo (ctxt: SynchronizationContext) = - protectedPrimitive(fun ({ aux = aux } as args) -> - aux.trampolineHolder.Post ctxt (fun () -> args.cont () )) - - let switchToNewThread() = - protectedPrimitive(fun ({ aux = aux } as args) -> - aux.trampolineHolder.StartThread (fun () -> args.cont () ) ) - - let switchToThreadPool() = - protectedPrimitive(fun ({ aux = aux } as args) -> - aux.trampolineHolder.QueueWorkItem (fun () -> args.cont ()) ) - - //---------------------------------- - // DERIVED ASYNC RESYNC HELPERS - - let delimitContinuationsWith (delimiter : TrampolineHolder -> (unit -> FakeUnitValue) -> FakeUnitValue) ({ aux = aux } as args) = - let trampolineHolder = aux.trampolineHolder - { args with - cont = (fun x -> delimiter trampolineHolder (fun () -> args.cont x)) - aux = { aux with - econt = (fun x -> delimiter trampolineHolder (fun () -> aux.econt x )); - ccont = (fun x -> delimiter trampolineHolder (fun () -> aux.ccont x)) - } - } - - let getSyncContext () = System.Threading.SynchronizationContext.Current - - let postOrQueue (ctxt : SynchronizationContext) (trampolineHolder:TrampolineHolder) f = - match ctxt with - | null -> trampolineHolder.QueueWorkItem f - | _ -> trampolineHolder.Post ctxt f - - - let delimitSyncContext args = - match getSyncContext () with - | null -> args - | ctxt -> - let aux = args.aux - let trampolineHolder = aux.trampolineHolder - { args with - cont = (fun x -> trampolineHolder.Post ctxt (fun () -> args.cont x)) - aux = { aux with - econt = (fun x -> trampolineHolder.Post ctxt (fun () -> aux.econt x )); - ccont = (fun x -> trampolineHolder.Post ctxt (fun () -> aux.ccont x)) - } - } - - // When run, ensures that each of the continuations of the process are run in the same synchronization context. - let protectedPrimitiveWithResync f = - protectedPrimitive(fun args -> - let args = delimitSyncContext args - f args) - - let unprotectedPrimitiveWithResync f = - unprotectedPrimitive(fun args -> - let args = delimitSyncContext args - f args) - - [] - [] - type Latch() = - let mutable i = 0 - member this.Enter() = Interlocked.CompareExchange(&i, 1, 0) = 0 - - [] - [] - type Once() = - let latch = Latch() - member this.Do f = - if latch.Enter() then - f() - - [] - [] - type SuspendedAsync<'T>(args : AsyncParams<'T>) = - let ctxt = getSyncContext () - let thread = - match ctxt with - | null -> null // saving a thread-local access - | _ -> Thread.CurrentThread - let trampolineHolder = args.aux.trampolineHolder - member this.ContinueImmediate res = - let action () = args.cont res - let inline executeImmediately () = trampolineHolder.Protect action - let currentCtxt = System.Threading.SynchronizationContext.Current - match ctxt, currentCtxt with - | null, null -> - executeImmediately () - // See bug 370350; this logic is incorrect from the perspective of how SynchronizationContext is meant to work, - // but the logic works for mainline scenarios (WinForms/WPF/ASP.NET) and we won't change it again. - | _ when Object.Equals(ctxt, currentCtxt) && thread.Equals(Thread.CurrentThread) -> - executeImmediately () - | _ -> - postOrQueue ctxt trampolineHolder action - - member this.ContinueWithPostOrQueue res = - postOrQueue ctxt trampolineHolder (fun () -> args.cont res) - - - - // A utility type to provide a synchronization point between an asynchronous computation - // and callers waiting on the result of that computation. - // - // Use with care! - [] - [] - type ResultCell<'T>() = - let mutable result = None - // The continuations for the result - let mutable savedConts : list> = [] - // The WaitHandle event for the result. Only created if needed, and set to null when disposed. - let mutable resEvent = null - let mutable disposed = false - // All writers of result are protected by lock on syncRoot. - let syncRoot = new Object() - - member x.GetWaitHandle() = - lock syncRoot (fun () -> - if disposed then - raise (System.ObjectDisposedException("ResultCell")); - match resEvent with - | null -> - // Start in signalled state if a result is already present. - let ev = new ManualResetEvent(result.IsSome) - resEvent <- ev - (ev :> WaitHandle) - | ev -> - (ev :> WaitHandle)) - - member x.Close() = - lock syncRoot (fun () -> - if not disposed then - disposed <- true; - match resEvent with - | null -> () - | ev -> -#if FX_NO_EVENTWAITHANDLE_IDISPOSABLE - ev.Dispose() - System.GC.SuppressFinalize(ev) -#else - ev.Close(); -#endif - resEvent <- null) - - interface IDisposable with - member x.Dispose() = x.Close() // ; System.GC.SuppressFinalize(x) - - - member x.GrabResult() = - match result with - | Some res -> res - | None -> failwith "Unexpected no result" - - - /// Record the result in the ResultCell. - member x.RegisterResult (res:'T, reuseThread) = - let grabbedConts = - lock syncRoot (fun () -> - // Ignore multiple sets of the result. This can happen, e.g. for a race between a cancellation and a success - if x.ResultAvailable then - [] // invalidOp "multiple results registered for asynchronous operation" - else - // In this case the ResultCell has already been disposed, e.g. due to a timeout. - // The result is dropped on the floor. - if disposed then - [] - else - result <- Some res; - // If the resEvent exists then set it. If not we can skip setting it altogether and it won't be - // created - match resEvent with - | null -> - () - | ev -> - // Setting the event need to happen under lock so as not to race with Close() - ev.Set () |> ignore - List.rev savedConts) - // Run the action outside the lock - match grabbedConts with - | [] -> FakeUnit - | [cont] -> - if reuseThread then - cont.ContinueImmediate(res) - else - cont.ContinueWithPostOrQueue(res) - | otherwise -> - otherwise |> List.iter (fun cont -> cont.ContinueWithPostOrQueue(res) |> unfake) |> fake - - member x.ResultAvailable = result.IsSome - - member x.AwaitResult = - unprotectedPrimitive(fun args -> - // Check if a result is available synchronously - let resOpt = - match result with - | Some _ -> result - | None -> - lock syncRoot (fun () -> - match result with - | Some _ -> - result - | None -> - // Otherwise save the continuation and call it in RegisterResult - savedConts <- (SuspendedAsync<_>(args))::savedConts - None - ) - match resOpt with - | Some res -> args.cont res - | None -> FakeUnit - ) - - member x.TryWaitForResultSynchronously (?timeout) : 'T option = - // Check if a result is available. - match result with - | Some _ as r -> - r - | None -> - // Force the creation of the WaitHandle - let resHandle = x.GetWaitHandle() - // Check again. While we were in GetWaitHandle, a call to RegisterResult may have set result then skipped the - // Set because the resHandle wasn't forced. - match result with - | Some _ as r -> - r - | None -> - // OK, let's really wait for the Set signal. This may block. - let timeout = defaultArg timeout Threading.Timeout.Infinite -#if FX_NO_EXIT_CONTEXT_FLAGS -#if FX_NO_WAITONE_MILLISECONDS - let ok = resHandle.WaitOne(TimeSpan(int64(timeout)*10000L)) -#else - let ok = resHandle.WaitOne(millisecondsTimeout= timeout) -#endif -#else - let ok = resHandle.WaitOne(millisecondsTimeout= timeout,exitContext=true) -#endif - if ok then - // Now the result really must be available - result - else - // timed out - None - - open AsyncImpl - - type private Closure<'T>(f) = - member x.Invoke(sender:obj, a:'T) : unit = ignore(sender); f(a) - - module CancellationTokenOps = - /// Run the asynchronous workflow and wait for its result. - let private RunSynchronouslyInAnotherThread (token:CancellationToken,computation,timeout) = - let token,innerCTS = - // If timeout is provided, we govern the async by our own CTS, to cancel - // when execution times out. Otherwise, the user-supplied token governs the async. - match timeout with - | None -> token,None - | Some _ -> - let subSource = new LinkedSubSource(token) - subSource.Token, Some subSource - - use resultCell = new ResultCell>() - queueAsync - token - (fun res -> resultCell.RegisterResult(Ok(res),reuseThread=true)) - (fun edi -> resultCell.RegisterResult(Error(edi),reuseThread=true)) - (fun exn -> resultCell.RegisterResult(Canceled(exn),reuseThread=true)) - computation - |> unfake - - let res = resultCell.TryWaitForResultSynchronously(?timeout = timeout) in - match res with - | None -> // timed out - // issue cancellation signal - if innerCTS.IsSome then innerCTS.Value.Cancel() - // wait for computation to quiesce; drop result on the floor - resultCell.TryWaitForResultSynchronously() |> ignore - // dispose the CancellationTokenSource - if innerCTS.IsSome then innerCTS.Value.Dispose() - raise (System.TimeoutException()) - | Some res -> - match innerCTS with - | Some subSource -> subSource.Dispose() - | None -> () - commit res - - let private RunSynchronouslyInCurrentThread (token:CancellationToken,computation) = - use resultCell = new ResultCell>() - let trampolineHolder = TrampolineHolder() - - trampolineHolder.Protect - (fun () -> - startA - token - trampolineHolder - (fun res -> resultCell.RegisterResult(Ok(res),reuseThread=true)) - (fun edi -> resultCell.RegisterResult(Error(edi),reuseThread=true)) - (fun exn -> resultCell.RegisterResult(Canceled(exn),reuseThread=true)) - computation) - |> unfake - - commit (resultCell.TryWaitForResultSynchronously() |> Option.get) - - let RunSynchronously (token:CancellationToken,computation,timeout) = - // Reuse the current ThreadPool thread if possible. Unfortunately - // Thread.IsThreadPoolThread isn't available on all profiles so - // we approximate it by testing synchronization context for null. - match SynchronizationContext.Current, timeout with - | null, None -> RunSynchronouslyInCurrentThread (token, computation) - // When the timeout is given we need a dedicated thread - // which cancels the computation. - // Performing the cancellation in the ThreadPool eg. by using - // Timer from System.Threading or CancellationTokenSource.CancelAfter - // (which internally uses Timer) won't work properly - // when the ThreadPool is busy. - // - // And so when the timeout is given we always use the current thread - // for the cancellation and run the computation in another thread. - | _ -> RunSynchronouslyInAnotherThread (token, computation, timeout) - - let Start (token:CancellationToken,computation) = - queueAsync - token - (fun () -> FakeUnit) // nothing to do on success - (fun edi -> edi.ThrowAny()) // raise exception in child - (fun _ -> FakeUnit) // ignore cancellation in child - computation - |> unfake - - let StartWithContinuations(token:CancellationToken, a:Async<'T>, cont, econt, ccont) : unit = - startAsync token (cont >> fake) (econt >> fake) (ccont >> fake) a |> ignore - - type VolatileBarrier() = - [] - let mutable isStopped = false - member __.Proceed = not isStopped - member __.Stop() = isStopped <- true - - let StartAsTask (token:CancellationToken, computation : Async<_>,taskCreationOptions) : Task<_> = - let taskCreationOptions = defaultArg taskCreationOptions TaskCreationOptions.None - let tcs = new TaskCompletionSource<_>(taskCreationOptions) - - // The contract: - // a) cancellation signal should always propagate to the computation - // b) when the task IsCompleted -> nothing is running anymore - let task = tcs.Task - queueAsync - token - (fun r -> tcs.SetResult r |> fake) - (fun edi -> tcs.SetException edi.SourceException |> fake) - (fun _ -> tcs.SetCanceled() |> fake) - computation - |> unfake - task - - [] - [] - type Async = - - static member CancellationToken = getCancellationToken() - - static member CancelCheck () = doneA - - static member FromContinuations (callback : ('T -> unit) * (exn -> unit) * (OperationCanceledException -> unit) -> unit) : Async<'T> = - unprotectedPrimitive (fun ({ aux = aux } as args) -> - if args.aux.token.IsCancellationRequested then - cancelT args - else - let underCurrentThreadStack = ref true - let contToTailCall = ref None - let thread = Thread.CurrentThread - let latch = Latch() - let once cont x = - if not(latch.Enter()) then invalidOp(SR.GetString(SR.controlContinuationInvokedMultipleTimes)) - if Thread.CurrentThread.Equals(thread) && !underCurrentThreadStack then - contToTailCall := Some(fun () -> cont x) - else if Trampoline.ThisThreadHasTrampoline then - let ctxt = getSyncContext() - postOrQueue ctxt aux.trampolineHolder (fun () -> cont x) |> unfake - else - aux.trampolineHolder.Protect (fun () -> cont x ) |> unfake - try - callback (once args.cont, (fun exn -> once aux.econt (MayLoseStackTrace(exn))), once aux.ccont) - with exn -> - if not(latch.Enter()) then invalidOp(SR.GetString(SR.controlContinuationInvokedMultipleTimes)) - let edi = ExceptionDispatchInfo.RestoreOrCapture(exn) - aux.econt edi |> unfake - - underCurrentThreadStack := false - - match !contToTailCall with - | Some k -> k() - | _ -> FakeUnit - ) - - static member DefaultCancellationToken = defaultCancellationTokenSource.Token - - static member CancelDefaultToken() = - let cts = defaultCancellationTokenSource - // set new CancellationTokenSource before calling Cancel - otherwise if Cancel throws token will stay unchanged - defaultCancellationTokenSource <- new CancellationTokenSource() - // we do not dispose the old default CTS - let GC collect it - cts.Cancel() - // we do not dispose the old default CTS - let GC collect it - - static member Catch (computation: Async<'T>) = - unprotectedPrimitive (fun ({ aux = aux } as args) -> - startA aux.token aux.trampolineHolder (Choice1Of2 >> args.cont) (fun edi -> args.cont (Choice2Of2 (edi.GetAssociatedSourceException()))) aux.ccont computation) - - static member RunSynchronously (computation: Async<'T>,?timeout,?cancellationToken:CancellationToken) = - let timeout,token = - match cancellationToken with - | None -> timeout,defaultCancellationTokenSource.Token - | Some token when not token.CanBeCanceled -> timeout, token - | Some token -> None, token - CancellationTokenOps.RunSynchronously(token, computation, timeout) - - static member Start (computation, ?cancellationToken) = - let token = defaultArg cancellationToken defaultCancellationTokenSource.Token - CancellationTokenOps.Start (token, computation) - - static member StartAsTask (computation,?taskCreationOptions,?cancellationToken)= - let token = defaultArg cancellationToken defaultCancellationTokenSource.Token - CancellationTokenOps.StartAsTask(token,computation,taskCreationOptions) - - static member StartChildAsTask (computation,?taskCreationOptions) = - async { let! token = getCancellationToken() - return CancellationTokenOps.StartAsTask(token,computation, taskCreationOptions) } - - type Async with - static member Parallel (computations: seq>) = - unprotectedPrimitive (fun args -> - let tasks,result = - try - Seq.toArray computations, None // manually protect eval of seq - with exn -> - let edi = ExceptionDispatchInfo.RestoreOrCapture(exn) - null, Some(errorT args edi) - - match result with - | Some r -> r - | None -> - if tasks.Length = 0 then args.cont [| |] else // must not be in a 'protect' if we call cont explicitly; if cont throws, it should unwind the stack, preserving Dev10 behavior - protectedPrimitiveCore args (fun args -> - let ({ aux = aux } as args) = delimitSyncContext args // manually resync - let count = ref tasks.Length - let firstExn = ref None - let results = Array.zeroCreate tasks.Length - // Attempt to cancel the individual operations if an exception happens on any of the other threads - let innerCTS = new LinkedSubSource(aux.token) - let trampolineHolder = aux.trampolineHolder - - let finishTask(remaining) = - if (remaining = 0) then - innerCTS.Dispose() - match (!firstExn) with - | None -> trampolineHolder.Protect(fun () -> args.cont results) - | Some (Choice1Of2 exn) -> trampolineHolder.Protect(fun () -> aux.econt exn) - | Some (Choice2Of2 cexn) -> trampolineHolder.Protect(fun () -> aux.ccont cexn) - else - FakeUnit - - // recordSuccess and recordFailure between them decrement count to 0 and - // as soon as 0 is reached dispose innerCancellationSource - - let recordSuccess i res = - results.[i] <- res; - finishTask(Interlocked.Decrement count) - - let recordFailure exn = - // capture first exception and then decrement the counter to avoid race when - // - thread 1 decremented counter and preempted by the scheduler - // - thread 2 decremented counter and called finishTask - // since exception is not yet captured - finishtask will fall into success branch - match Interlocked.CompareExchange(firstExn, Some exn, None) with - | None -> - // signal cancellation before decrementing the counter - this guarantees that no other thread can sneak to finishTask and dispose innerCTS - // NOTE: Cancel may introduce reentrancy - i.e. when handler registered for the cancellation token invokes cancel continuation that will call 'recordFailure' - // to correctly handle this we need to return decremented value, not the current value of 'count' otherwise we may invoke finishTask with value '0' several times - innerCTS.Cancel() - | _ -> () - finishTask(Interlocked.Decrement count) - - tasks |> Array.iteri (fun i p -> - queueAsync - innerCTS.Token - // on success, record the result - (fun res -> recordSuccess i res) - // on exception... - (fun edi -> recordFailure (Choice1Of2 edi)) - // on cancellation... - (fun cexn -> recordFailure (Choice2Of2 cexn)) - p - |> unfake); - FakeUnit)) - - static member Choice(computations : Async<'T option> seq) : Async<'T option> = - unprotectedPrimitive(fun args -> - let result = - try Seq.toArray computations |> Choice1Of2 - with exn -> ExceptionDispatchInfo.RestoreOrCapture exn |> Choice2Of2 - - match result with - | Choice2Of2 edi -> args.aux.econt edi - | Choice1Of2 [||] -> args.cont None - | Choice1Of2 computations -> - protectedPrimitiveCore args (fun args -> - let ({ aux = aux } as args) = delimitSyncContext args - let noneCount = ref 0 - let exnCount = ref 0 - let innerCts = new LinkedSubSource(aux.token) - let trampolineHolder = aux.trampolineHolder - - let scont (result : 'T option) = - match result with - | Some _ -> - if Interlocked.Increment exnCount = 1 then - innerCts.Cancel(); trampolineHolder.Protect(fun () -> args.cont result) - else - FakeUnit - - | None -> - if Interlocked.Increment noneCount = computations.Length then - innerCts.Cancel(); trampolineHolder.Protect(fun () -> args.cont None) - else - FakeUnit - - let econt (exn : ExceptionDispatchInfo) = - if Interlocked.Increment exnCount = 1 then - innerCts.Cancel(); trampolineHolder.Protect(fun () -> args.aux.econt exn) - else - FakeUnit - - let ccont (exn : OperationCanceledException) = - if Interlocked.Increment exnCount = 1 then - innerCts.Cancel(); trampolineHolder.Protect(fun () -> args.aux.ccont exn) - else - FakeUnit - - for c in computations do - queueAsync innerCts.Token scont econt ccont c |> unfake - - FakeUnit)) - - // Contains helpers that will attach continuation to the given task. - // Should be invoked as a part of protectedPrimitive(withResync) call - module TaskHelpers = - let continueWith (task : Task<'T>, args, useCcontForTaskCancellation) = - - let continuation (completedTask : Task<_>) : unit = - args.aux.trampolineHolder.Protect((fun () -> - if completedTask.IsCanceled then - if useCcontForTaskCancellation - then args.aux.ccont (new OperationCanceledException(args.aux.token)) - else args.aux.econt (ExceptionDispatchInfo.Capture(new TaskCanceledException(completedTask))) - elif completedTask.IsFaulted then - args.aux.econt (MayLoseStackTrace(completedTask.Exception)) - else - args.cont completedTask.Result)) |> unfake - - task.ContinueWith(Action>(continuation)) |> ignore |> fake - - let continueWithUnit (task : Task, args, useCcontForTaskCancellation) = - - let continuation (completedTask : Task) : unit = - args.aux.trampolineHolder.Protect((fun () -> - if completedTask.IsCanceled then - if useCcontForTaskCancellation - then args.aux.ccont (new OperationCanceledException(args.aux.token)) - else args.aux.econt (ExceptionDispatchInfo.Capture(new TaskCanceledException(completedTask))) - elif completedTask.IsFaulted then - args.aux.econt (MayLoseStackTrace(completedTask.Exception)) - else - args.cont ())) |> unfake - - task.ContinueWith(Action(continuation)) |> ignore |> fake - - type Async with - - /// StartWithContinuations, except the exception continuation is given an ExceptionDispatchInfo - static member StartWithContinuationsUsingDispatchInfo(computation:Async<'T>, continuation, exceptionContinuation, cancellationContinuation, ?cancellationToken) : unit = - let token = defaultArg cancellationToken defaultCancellationTokenSource.Token - CancellationTokenOps.StartWithContinuations(token, computation, continuation, exceptionContinuation, cancellationContinuation) - - static member StartWithContinuations(computation:Async<'T>, continuation, exceptionContinuation, cancellationContinuation, ?cancellationToken) : unit = - Async.StartWithContinuationsUsingDispatchInfo(computation, continuation, (fun edi -> exceptionContinuation (edi.GetAssociatedSourceException())), cancellationContinuation, ?cancellationToken=cancellationToken) - - static member StartImmediate(computation:Async, ?cancellationToken) : unit = - let token = defaultArg cancellationToken defaultCancellationTokenSource.Token - CancellationTokenOps.StartWithContinuations(token, computation, id, (fun edi -> edi.ThrowAny()), ignore) - -#if FSCORE_PORTABLE_NEW - static member Sleep(dueTime : int) : Async = - // use combo protectedPrimitiveWithResync + continueWith instead of AwaitTask so we can pass cancellation token to the Delay task - unprotectedPrimitiveWithResync ( fun ({ aux = aux} as args) -> - let mutable edi = null - - let task = - try - Task.Delay(dueTime, aux.token) - with exn -> - edi <- ExceptionDispatchInfo.RestoreOrCapture(exn) - null - - match edi with - | null -> TaskHelpers.continueWithUnit (task, args, true) - | _ -> aux.econt edi - ) -#else - static member Sleep(millisecondsDueTime) : Async = - unprotectedPrimitiveWithResync (fun ({ aux = aux } as args) -> - let timer = ref (None : Timer option) - let savedCont = args.cont - let savedCCont = aux.ccont - let latch = new Latch() - let registration = - aux.token.Register( - (fun _ -> - if latch.Enter() then - match !timer with - | None -> () - | Some t -> t.Dispose() - aux.trampolineHolder.Protect(fun () -> savedCCont(new OperationCanceledException(aux.token))) |> unfake - ), - null) - let mutable edi = null - try - timer := new Timer((fun _ -> - if latch.Enter() then - // NOTE: If the CTS for the token would have been disposed, disposal of the registration would throw - // However, our contract is that until async computation ceases execution (and invokes ccont) - // the CTS will not be disposed. Execution of savedCCont is guarded by latch, so we are safe unless - // user violates the contract. - registration.Dispose() - // Try to Dispose of the TImer. - // Note: there is a race here: the System.Threading.Timer time very occasionally - // calls the callback _before_ the timer object has been recorded anywhere. This makes it difficult to dispose the - // timer in this situation. In this case we just let the timer be collected by finalization. - match !timer with - | None -> () - | Some t -> t.Dispose() - // Now we're done, so call the continuation - aux.trampolineHolder.Protect (fun () -> savedCont()) |> unfake), - null, dueTime=millisecondsDueTime, period = -1) |> Some - with exn -> - if latch.Enter() then - edi <- ExceptionDispatchInfo.RestoreOrCapture(exn) // post exception to econt only if we successfully enter the latch (no other continuations were called) - - match edi with - | null -> - FakeUnit - | _ -> - aux.econt edi - ) -#endif - - static member AwaitWaitHandle(waitHandle:WaitHandle,?millisecondsTimeout:int) = - let millisecondsTimeout = defaultArg millisecondsTimeout Threading.Timeout.Infinite - if millisecondsTimeout = 0 then - async.Delay(fun () -> -#if FX_NO_EXIT_CONTEXT_FLAGS -#if FX_NO_WAITONE_MILLISECONDS - let ok = waitHandle.WaitOne(TimeSpan(0L)) -#else - let ok = waitHandle.WaitOne(0) -#endif -#else - let ok = waitHandle.WaitOne(0,exitContext=false) -#endif - async.Return ok) - else - protectedPrimitiveWithResync(fun ({ aux = aux } as args) -> - let rwh = ref (None : RegisteredWaitHandle option) - let latch = Latch() - let rec cancelHandler = - Action(fun _ -> - if latch.Enter() then - // if we got here - then we need to unregister RegisteredWaitHandle + trigger cancellation - // entrance to TP callback is protected by latch - so savedCont will never be called - lock rwh (fun () -> - match !rwh with - | None -> () - | Some rwh -> rwh.Unregister(null) |> ignore) - Async.Start (async { do (aux.ccont (OperationCanceledException(aux.token)) |> unfake) })) - - and registration : CancellationTokenRegistration = aux.token.Register(cancelHandler, null) - - let savedCont = args.cont - try - lock rwh (fun () -> - rwh := Some(ThreadPool.RegisterWaitForSingleObject - (waitObject=waitHandle, - callBack=WaitOrTimerCallback(fun _ timeOut -> - if latch.Enter() then - lock rwh (fun () -> rwh.Value.Value.Unregister(null) |> ignore) - rwh := None - registration.Dispose() - aux.trampolineHolder.Protect (fun () -> savedCont (not timeOut)) |> unfake), - state=null, - millisecondsTimeOutInterval=millisecondsTimeout, - executeOnlyOnce=true)); - FakeUnit) - with _ -> - if latch.Enter() then - registration.Dispose() - reraise() // reraise exception only if we successfully enter the latch (no other continuations were called) - else FakeUnit - ) - - static member AwaitIAsyncResult(iar: IAsyncResult, ?millisecondsTimeout): Async = - async { if iar.CompletedSynchronously then - return true - else - return! Async.AwaitWaitHandle(iar.AsyncWaitHandle, ?millisecondsTimeout=millisecondsTimeout) } - - - /// Await the result of a result cell without a timeout - static member ReifyResult(result:AsyncImplResult<'T>) : Async<'T> = - unprotectedPrimitive(fun ({ aux = aux } as args) -> - (match result with - | Ok v -> args.cont v - | Error exn -> aux.econt exn - | Canceled exn -> aux.ccont exn) ) - - /// Await the result of a result cell without a timeout - static member AwaitAndReifyResult(resultCell:ResultCell>) : Async<'T> = - async { - let! result = resultCell.AwaitResult - return! Async.ReifyResult(result) - } - - - - /// Await the result of a result cell without a timeout - /// - /// Always resyncs to the synchronization context if needed, by virtue of it being built - /// from primitives which resync. - static member AsyncWaitAsyncWithTimeout(innerCTS : CancellationTokenSource, resultCell:ResultCell>,millisecondsTimeout) : Async<'T> = - match millisecondsTimeout with - | None | Some -1 -> - resultCell |> Async.AwaitAndReifyResult - - | Some 0 -> - async { if resultCell.ResultAvailable then - return commit (resultCell.GrabResult()) - else - return commitWithPossibleTimeout None } - | _ -> - async { try - if resultCell.ResultAvailable then - return commit (resultCell.GrabResult()) - else - let! ok = Async.AwaitWaitHandle (resultCell.GetWaitHandle(),?millisecondsTimeout=millisecondsTimeout) - if ok then - return commitWithPossibleTimeout (Some (resultCell.GrabResult())) - else // timed out - // issue cancellation signal - innerCTS.Cancel() - // wait for computation to quiesce - let! _ = Async.AwaitWaitHandle (resultCell.GetWaitHandle()) - return commitWithPossibleTimeout None - finally - resultCell.Close() } - - - static member FromBeginEnd(beginAction,endAction,?cancelAction): Async<'T> = - async { let! cancellationToken = getCancellationToken() - let resultCell = new ResultCell<_>() - - let once = Once() - let registration : CancellationTokenRegistration = - let onCancel (_:obj) = - // Call the cancellation routine - match cancelAction with - | None -> - // Register the result. This may race with a successful result, but - // ResultCell allows a race and throws away whichever comes last. - once.Do(fun () -> - let canceledResult = Canceled (OperationCanceledException(cancellationToken)) - resultCell.RegisterResult(canceledResult,reuseThread=true) |> unfake - ) - | Some cancel -> - // If we get an exception from a cooperative cancellation function - // we assume the operation has already completed. - try cancel() with _ -> () - cancellationToken.Register(Action(onCancel), null) - let callback = - new System.AsyncCallback(fun iar -> - if not iar.CompletedSynchronously then - // The callback has been activated, so ensure cancellation is not possible - // beyond this point. - match cancelAction with - | Some _ -> - registration.Dispose() - | None -> - once.Do(fun () -> registration.Dispose()) - - // Run the endAction and collect its result. - let res = - try - Ok(endAction iar) - with exn -> - let edi = ExceptionDispatchInfo.RestoreOrCapture(exn) - Error edi - - // Register the result. This may race with a cancellation result, but - // ResultCell allows a race and throws away whichever comes last. - resultCell.RegisterResult(res,reuseThread=true) |> unfake - else ()) - - - - let (iar:IAsyncResult) = beginAction (callback,(null:obj)) - if iar.CompletedSynchronously then - registration.Dispose() - return endAction iar - else - return! Async.AwaitAndReifyResult(resultCell) } - - - static member FromBeginEnd(arg,beginAction,endAction,?cancelAction): Async<'T> = - Async.FromBeginEnd((fun (iar,state) -> beginAction(arg,iar,state)), endAction, ?cancelAction=cancelAction) - - - static member FromBeginEnd(arg1,arg2,beginAction,endAction,?cancelAction): Async<'T> = - Async.FromBeginEnd((fun (iar,state) -> beginAction(arg1,arg2,iar,state)), endAction, ?cancelAction=cancelAction) - - static member FromBeginEnd(arg1,arg2,arg3,beginAction,endAction,?cancelAction): Async<'T> = - Async.FromBeginEnd((fun (iar,state) -> beginAction(arg1,arg2,arg3,iar,state)), endAction, ?cancelAction=cancelAction) - - - - [] - [] - type AsyncIAsyncResult<'T>(callback: System.AsyncCallback,state:obj) = - // This gets set to false if the result is not available by the - // time the IAsyncResult is returned to the caller of Begin - let mutable completedSynchronously = true - - let mutable disposed = false - - let cts = new CancellationTokenSource() - - let result = new ResultCell>() - - member s.SetResult(v: AsyncImplResult<'T>) = - result.RegisterResult(v,reuseThread=true) |> unfake - match callback with - | null -> () - | d -> - // The IASyncResult becomes observable here - d.Invoke (s :> System.IAsyncResult) - - member s.GetResult() = - match result.TryWaitForResultSynchronously (-1) with - | Some (Ok v) -> v - | Some (Error edi) -> edi.ThrowAny() - | Some (Canceled err) -> raise err - | None -> failwith "unreachable" - - member x.IsClosed = disposed - member x.Close() = - if not disposed then - disposed <- true - cts.Dispose() - result.Close() - - member x.Token = cts.Token - - member x.CancelAsync() = cts.Cancel() - - member x.CheckForNotSynchronous() = - if not result.ResultAvailable then - completedSynchronously <- false - - interface System.IAsyncResult with - member x.IsCompleted = result.ResultAvailable - member x.CompletedSynchronously = completedSynchronously - member x.AsyncWaitHandle = result.GetWaitHandle() - member x.AsyncState = state - - interface System.IDisposable with - member x.Dispose() = x.Close() - - module AsBeginEndHelpers = - let beginAction(computation,callback,state) = - let aiar = new AsyncIAsyncResult<'T>(callback,state) - let cont v = aiar.SetResult (Ok v) - let econt v = aiar.SetResult (Error v) - let ccont v = aiar.SetResult (Canceled v) - CancellationTokenOps.StartWithContinuations(aiar.Token,computation,cont,econt,ccont) - aiar.CheckForNotSynchronous() - (aiar :> IAsyncResult) - - let endAction<'T> (iar:IAsyncResult) = - match iar with - | :? AsyncIAsyncResult<'T> as aiar -> - if aiar.IsClosed then - raise (System.ObjectDisposedException("AsyncResult")) - else - let res = aiar.GetResult() - aiar.Close () - res - | _ -> - invalidArg "iar" (SR.GetString(SR.mismatchIAREnd)) - - let cancelAction<'T>(iar:IAsyncResult) = - match iar with - | :? AsyncIAsyncResult<'T> as aiar -> - aiar.CancelAsync() - | _ -> - invalidArg "iar" (SR.GetString(SR.mismatchIARCancel)) - - - type Async with - - - - static member AsBeginEnd<'Arg,'T> (computation:('Arg -> Async<'T>)) : - // The 'Begin' member - ('Arg * System.AsyncCallback * obj -> System.IAsyncResult) * - // The 'End' member - (System.IAsyncResult -> 'T) * - // The 'Cancel' member - (System.IAsyncResult -> unit) = - let beginAction = fun (a1,callback,state) -> AsBeginEndHelpers.beginAction ((computation a1), callback, state) - beginAction, AsBeginEndHelpers.endAction<'T>, AsBeginEndHelpers.cancelAction<'T> - - static member AwaitEvent(event:IEvent<'Delegate,'T>, ?cancelAction) : Async<'T> = - async { let! token = getCancellationToken() - let resultCell = new ResultCell<_>() - // Set up the handlers to listen to events and cancellation - let once = new Once() - let rec registration : CancellationTokenRegistration= - let onCancel _ = - // We've been cancelled. Call the given cancellation routine - match cancelAction with - | None -> - // We've been cancelled without a cancel action. Stop listening to events - event.RemoveHandler(del) - // Register the result. This may race with a successful result, but - // ResultCell allows a race and throws away whichever comes last. - once.Do(fun () -> resultCell.RegisterResult(Canceled (OperationCanceledException(token)),reuseThread=true) |> unfake) - | Some cancel -> - // If we get an exception from a cooperative cancellation function - // we assume the operation has already completed. - try cancel() with _ -> () - token.Register(Action(onCancel), null) - - and obj = - new Closure<'T>(fun eventArgs -> - // Stop listening to events - event.RemoveHandler(del) - // The callback has been activated, so ensure cancellation is not possible beyond this point - once.Do(fun () -> registration.Dispose()) - let res = Ok(eventArgs) - // Register the result. This may race with a cancellation result, but - // ResultCell allows a race and throws away whichever comes last. - resultCell.RegisterResult(res,reuseThread=true) |> unfake) - and del = -#if FX_PORTABLE_OR_NETSTANDARD - let invokeMeth = (typeof>).GetMethod("Invoke", BindingFlags.Public ||| BindingFlags.NonPublic ||| BindingFlags.Instance) - System.Delegate.CreateDelegate(typeof<'Delegate>, obj, invokeMeth) :?> 'Delegate -#else - System.Delegate.CreateDelegate(typeof<'Delegate>, obj, "Invoke") :?> 'Delegate -#endif - - // Start listening to events - event.AddHandler(del) - - // Return the async computation that allows us to await the result - return! Async.AwaitAndReifyResult(resultCell) } - - type Async with - static member Ignore (computation: Async<'T>) = bindA computation (fun _ -> doneA) - static member SwitchToNewThread() = switchToNewThread() - static member SwitchToThreadPool() = switchToThreadPool() - - type Async with - - static member StartChild (computation:Async<'T>,?millisecondsTimeout) = - async { - let resultCell = new ResultCell<_>() - let! ct = getCancellationToken() - let innerCTS = new CancellationTokenSource() // innerCTS does not require disposal - let ctsRef = ref innerCTS - let reg = ct.Register( - (fun _ -> - match !ctsRef with - | null -> () - | otherwise -> otherwise.Cancel()), - null) - do queueAsync - innerCTS.Token - // since innerCTS is not ever Disposed, can call reg.Dispose() without a safety Latch - (fun res -> ctsRef := null; reg.Dispose(); resultCell.RegisterResult (Ok res, reuseThread=true)) - (fun edi -> ctsRef := null; reg.Dispose(); resultCell.RegisterResult (Error edi,reuseThread=true)) - (fun err -> ctsRef := null; reg.Dispose(); resultCell.RegisterResult (Canceled err,reuseThread=true)) - computation - |> unfake - - return Async.AsyncWaitAsyncWithTimeout(innerCTS, resultCell,millisecondsTimeout) } - - static member SwitchToContext syncContext = - async { match syncContext with - | null -> - // no synchronization context, just switch to the thread pool - do! Async.SwitchToThreadPool() - | ctxt -> - // post the continuation to the synchronization context - return! switchTo ctxt } - - static member OnCancel interruption = - async { let! ct = getCancellationToken () - // latch protects CancellationTokenRegistration.Dispose from being called twice - let latch = Latch() - let rec handler (_ : obj) = - try - if latch.Enter() then registration.Dispose() - interruption () - with _ -> () - and registration : CancellationTokenRegistration = ct.Register(Action(handler), null) - return { new System.IDisposable with - member this.Dispose() = - // dispose CancellationTokenRegistration only if cancellation was not requested. - // otherwise - do nothing, disposal will be performed by the handler itself - if not ct.IsCancellationRequested then - if latch.Enter() then registration.Dispose() } } - - static member TryCancelled (computation: Async<'T>,compensation) = - whenCancelledA compensation computation - - static member AwaitTask (task:Task<'T>) : Async<'T> = - protectedPrimitiveWithResync (fun args -> - TaskHelpers.continueWith(task, args, false) - ) - - static member AwaitTask (task:Task) : Async = - protectedPrimitiveWithResync (fun args -> - TaskHelpers.continueWithUnit (task, args, false) - ) - - module CommonExtensions = - - open AsyncBuilderImpl - - type System.IO.Stream with - - [] // give the extension member a 'nice', unmangled compiled name, unique within this module - member stream.AsyncRead(buffer: byte[],?offset,?count) = - let offset = defaultArg offset 0 - let count = defaultArg count buffer.Length -#if FX_NO_BEGINEND_READWRITE - // use combo protectedPrimitiveWithResync + continueWith instead of AwaitTask so we can pass cancellation token to the ReadAsync task - protectedPrimitiveWithResync (fun ({ aux = aux } as args) -> - TaskHelpers.continueWith(stream.ReadAsync(buffer, offset, count, aux.token), args, false) - ) -#else - Async.FromBeginEnd (buffer,offset,count,stream.BeginRead,stream.EndRead) -#endif - - [] // give the extension member a 'nice', unmangled compiled name, unique within this module - member stream.AsyncRead(count) = - async { let buffer = Array.zeroCreate count - let i = ref 0 - while !i < count do - let! n = stream.AsyncRead(buffer,!i,count - !i) - i := !i + n - if n = 0 then - raise(System.IO.EndOfStreamException(SR.GetString(SR.failedReadEnoughBytes))) - return buffer } - - [] // give the extension member a 'nice', unmangled compiled name, unique within this module - member stream.AsyncWrite(buffer:byte[], ?offset:int, ?count:int) = - let offset = defaultArg offset 0 - let count = defaultArg count buffer.Length -#if FX_NO_BEGINEND_READWRITE - // use combo protectedPrimitiveWithResync + continueWith instead of AwaitTask so we can pass cancellation token to the WriteAsync task - protectedPrimitiveWithResync ( fun ({ aux = aux} as args) -> - TaskHelpers.continueWithUnit(stream.WriteAsync(buffer, offset, count, aux.token), args, false) - ) -#else - Async.FromBeginEnd (buffer,offset,count,stream.BeginWrite,stream.EndWrite) -#endif - - type System.Threading.WaitHandle with - member waitHandle.AsyncWaitOne(?millisecondsTimeout:int) = // only used internally, not a public API - Async.AwaitWaitHandle(waitHandle,?millisecondsTimeout=millisecondsTimeout) - - type IObservable<'Args> with - - [] // give the extension member a 'nice', unmangled compiled name, unique within this module - member x.Add(callback: 'Args -> unit) = x.Subscribe callback |> ignore - - [] // give the extension member a 'nice', unmangled compiled name, unique within this module - member x.Subscribe(callback) = - x.Subscribe { new IObserver<'Args> with - member x.OnNext(args) = callback args - member x.OnError(e) = () - member x.OnCompleted() = () } - - module WebExtensions = - open AsyncBuilderImpl - - type System.Net.WebRequest with - [] // give the extension member a 'nice', unmangled compiled name, unique within this module - member req.AsyncGetResponse() : Async= - - let canceled = ref false // WebException with Status = WebExceptionStatus.RequestCanceled can be raised in other situations except cancellation, use flag to filter out false positives - - // Use tryWithDispatchInfoA to allow propagation of ExceptionDispatchInfo - Async.FromBeginEnd(beginAction=req.BeginGetResponse, - endAction = req.EndGetResponse, - cancelAction = fun() -> canceled := true; req.Abort()) - |> tryWithDispatchInfoA (fun edi -> - match edi.SourceException with - | :? System.Net.WebException as webExn - when webExn.Status = System.Net.WebExceptionStatus.RequestCanceled && !canceled -> - - Async.ReifyResult(AsyncImplResult.Canceled (OperationCanceledException webExn.Message)) - | _ -> - edi.ThrowAny()) - -#if !FX_NO_WEB_CLIENT - - type System.Net.WebClient with - member inline private this.Download(event: IEvent<'T, _>, handler: _ -> 'T, start, result) = - let downloadAsync = - Async.FromContinuations (fun (cont, econt, ccont) -> - let userToken = new obj() - let rec delegate' (_: obj) (args : #ComponentModel.AsyncCompletedEventArgs) = - // ensure we handle the completed event from correct download call - if userToken = args.UserState then - event.RemoveHandler handle - if args.Cancelled then - ccont (new OperationCanceledException()) - elif isNotNull args.Error then - econt args.Error - else - cont (result args) - and handle = handler delegate' - event.AddHandler handle - start userToken - ) - - async { - use! _holder = Async.OnCancel(fun _ -> this.CancelAsync()) - return! downloadAsync - } - - [] // give the extension member a 'nice', unmangled compiled name, unique within this module - member this.AsyncDownloadString (address:Uri) : Async = - this.Download( - event = this.DownloadStringCompleted, - handler = (fun action -> Net.DownloadStringCompletedEventHandler(action)), - start = (fun userToken -> this.DownloadStringAsync(address, userToken)), - result = (fun args -> args.Result) - ) - - [] // give the extension member a 'nice', unmangled compiled name, unique within this module - member this.AsyncDownloadData (address:Uri) : Async = - this.Download( - event = this.DownloadDataCompleted, - handler = (fun action -> Net.DownloadDataCompletedEventHandler(action)), - start = (fun userToken -> this.DownloadDataAsync(address, userToken)), - result = (fun args -> args.Result) - ) - - [] // give the extension member a 'nice', unmangled compiled name, unique within this module - member this.AsyncDownloadFile (address:Uri, fileName:string) : Async = - this.Download( - event = this.DownloadFileCompleted, - handler = (fun action -> ComponentModel.AsyncCompletedEventHandler(action)), - start = (fun userToken -> this.DownloadFileAsync(address, fileName, userToken)), - result = (fun _ -> ()) - ) -#endif - - - open CommonExtensions - - module AsyncHelpers = - let awaitEither a1 a2 = - async { - let c = new ResultCell<_>() - let! ct = Async.CancellationToken - let start a f = - Async.StartWithContinuationsUsingDispatchInfo(a, - (fun res -> c.RegisterResult(f res |> AsyncImplResult.Ok, reuseThread=false) |> unfake), - (fun edi -> c.RegisterResult(edi |> AsyncImplResult.Error, reuseThread=false) |> unfake), - (fun oce -> c.RegisterResult(oce |> AsyncImplResult.Canceled, reuseThread=false) |> unfake), - cancellationToken = ct - ) - start a1 Choice1Of2 - start a2 Choice2Of2 - let! result = c.AwaitResult - return! reify result - } - let timeout msec cancellationToken = - if msec < 0 then - unprotectedPrimitive(fun _ -> FakeUnit) // "block" forever - else - let c = new ResultCell<_>() - Async.StartWithContinuations( - computation=Async.Sleep(msec), - continuation=(fun () -> c.RegisterResult((), reuseThread = false) |> unfake), - exceptionContinuation=ignore, - cancellationContinuation=ignore, - cancellationToken = cancellationToken) - c.AwaitResult - - [] - [] - type Mailbox<'Msg>(cancellationSupported: bool) = - let mutable inboxStore = null - let mutable arrivals = new Queue<'Msg>() - let syncRoot = arrivals - - // Control elements indicating the state of the reader. When the reader is "blocked" at an - // asynchronous receive, either - // -- "cont" is non-null and the reader is "activated" by re-scheduling cont in the thread pool; or - // -- "pulse" is non-null and the reader is "activated" by setting this event - let mutable savedCont : ((bool -> FakeUnitValue) * TrampolineHolder) option = None - - // Readers who have a timeout use this event - let mutable pulse : AutoResetEvent = null - - // Make sure that the "pulse" value is created - let ensurePulse() = - match pulse with - | null -> - pulse <- new AutoResetEvent(false); - | _ -> - () - pulse - - let waitOneNoTimeoutOrCancellation = - unprotectedPrimitive (fun ({ aux = aux } as args) -> - match savedCont with - | None -> - let descheduled = - // An arrival may have happened while we're preparing to deschedule - lock syncRoot (fun () -> - if arrivals.Count = 0 then - // OK, no arrival so deschedule - savedCont <- Some(args.cont, aux.trampolineHolder); - true - else - false) - if descheduled then - FakeUnit - else - // If we didn't deschedule then run the continuation immediately - args.cont true - | Some _ -> - failwith "multiple waiting reader continuations for mailbox") - - let waitOneWithCancellation(timeout) = - ensurePulse().AsyncWaitOne(millisecondsTimeout=timeout) - - let waitOne(timeout) = - if timeout < 0 && not cancellationSupported then - waitOneNoTimeoutOrCancellation - else - waitOneWithCancellation(timeout) - - member x.inbox = - match inboxStore with - | null -> inboxStore <- new System.Collections.Generic.List<'Msg>(1) // ResizeArray - | _ -> () - inboxStore - - member x.CurrentQueueLength = - lock syncRoot (fun () -> x.inbox.Count + arrivals.Count) - - member x.scanArrivalsUnsafe(f) = - if arrivals.Count = 0 then None - else let msg = arrivals.Dequeue() - match f msg with - | None -> - x.inbox.Add(msg); - x.scanArrivalsUnsafe(f) - | res -> res - - // Lock the arrivals queue while we scan that - member x.scanArrivals(f) = lock syncRoot (fun () -> x.scanArrivalsUnsafe(f)) - - member x.scanInbox(f,n) = - match inboxStore with - | null -> None - | inbox -> - if n >= inbox.Count - then None - else - let msg = inbox.[n] - match f msg with - | None -> x.scanInbox (f,n+1) - | res -> inbox.RemoveAt(n); res - - member x.receiveFromArrivalsUnsafe() = - if arrivals.Count = 0 then None - else Some(arrivals.Dequeue()) - - member x.receiveFromArrivals() = - lock syncRoot (fun () -> x.receiveFromArrivalsUnsafe()) - - member x.receiveFromInbox() = - match inboxStore with - | null -> None - | inbox -> - if inbox.Count = 0 - then None - else - let x = inbox.[0] - inbox.RemoveAt(0); - Some(x) - - member x.Post(msg) = - lock syncRoot (fun () -> - - // Add the message to the arrivals queue - arrivals.Enqueue(msg) - - // Cooperatively unblock any waiting reader. If there is no waiting - // reader we just leave the message in the incoming queue - match savedCont with - | None -> - match pulse with - | null -> - () // no one waiting, leaving the message in the queue is sufficient - | ev -> - // someone is waiting on the wait handle - ev.Set() |> ignore - - | Some(action,trampolineHolder) -> - savedCont <- None - trampolineHolder.QueueWorkItem(fun () -> action true) |> unfake) - - member x.TryScan ((f: 'Msg -> (Async<'T>) option), timeout) : Async<'T option> = - let rec scan timeoutAsync (timeoutCts:CancellationTokenSource) = - async { match x.scanArrivals(f) with - | None -> - // Deschedule and wait for a message. When it comes, rescan the arrivals - let! ok = AsyncHelpers.awaitEither waitOneNoTimeoutOrCancellation timeoutAsync - match ok with - | Choice1Of2 true -> - return! scan timeoutAsync timeoutCts - | Choice1Of2 false -> - return failwith "should not happen - waitOneNoTimeoutOrCancellation always returns true" - | Choice2Of2 () -> - lock syncRoot (fun () -> - // Cancel the outstanding wait for messages installed by waitOneWithCancellation - // - // HERE BE DRAGONS. This is bestowed on us because we only support - // a single mailbox reader at any one time. - // If awaitEither returned control because timeoutAsync has terminated, waitOneNoTimeoutOrCancellation - // might still be in-flight. In practical terms, it means that the push-to-async-result-cell - // continuation that awaitEither registered on it is still pending, i.e. it is still in savedCont. - // That continuation is a no-op now, but it is still a registered reader for arriving messages. - // Therefore we just abandon it - a brutal way of canceling. - // This ugly non-compositionality is only needed because we only support a single mailbox reader - // (i.e. the user is not allowed to run several Receive/TryReceive/Scan/TryScan in parallel) - otherwise - // we would just have an extra no-op reader in the queue. - savedCont <- None) - - return None - | Some resP -> - timeoutCts.Cancel() // cancel the timeout watcher - let! res = resP - return Some res - } - let rec scanNoTimeout () = - async { match x.scanArrivals(f) with - | None -> let! ok = waitOne(Timeout.Infinite) - if ok then - return! scanNoTimeout() - else - return (failwith "Timed out with infinite timeout??") - | Some resP -> - let! res = resP - return Some res - } - - // Look in the inbox first - async { match x.scanInbox(f,0) with - | None when timeout < 0 -> return! scanNoTimeout() - | None -> - let! ct = Async.CancellationToken - let timeoutCts = CancellationTokenSource.CreateLinkedTokenSource(ct, CancellationToken.None) - let timeoutAsync = AsyncHelpers.timeout timeout timeoutCts.Token - return! scan timeoutAsync timeoutCts - | Some resP -> - let! res = resP - return Some res - - } - - member x.Scan((f: 'Msg -> (Async<'T>) option), timeout) = - async { let! resOpt = x.TryScan(f,timeout) - match resOpt with - | None -> return raise(TimeoutException(SR.GetString(SR.mailboxScanTimedOut))) - | Some res -> return res } - - member x.TryReceive(timeout) = - let rec processFirstArrival() = - async { match x.receiveFromArrivals() with - | None -> - // Make sure the pulse is created if it is going to be needed. - // If it isn't, then create it, and go back to the start to - // check arrivals again. - match pulse with - | null -> - if timeout >= 0 || cancellationSupported then - ensurePulse() |> ignore - return! processFirstArrival() - | _ -> - // Wait until we have been notified about a message. When that happens, rescan the arrivals - let! ok = waitOne(timeout) - if ok then return! processFirstArrival() - else return None - | res -> return res } - - // look in the inbox first - async { match x.receiveFromInbox() with - | None -> return! processFirstArrival() - | res -> return res } - - member x.Receive(timeout) = - - let rec processFirstArrival() = - async { match x.receiveFromArrivals() with - | None -> - // Make sure the pulse is created if it is going to be needed. - // If it isn't, then create it, and go back to the start to - // check arrivals again. - match pulse with - | null when timeout >= 0 || cancellationSupported -> - ensurePulse() |> ignore - return! processFirstArrival() - | _ -> - // Wait until we have been notified about a message. When that happens, rescan the arrivals - let! ok = waitOne(timeout) - if ok then return! processFirstArrival() - else return raise(TimeoutException(SR.GetString(SR.mailboxReceiveTimedOut))) - | Some res -> return res } - - // look in the inbox first - async { match x.receiveFromInbox() with - | None -> return! processFirstArrival() - | Some res -> return res } - - interface System.IDisposable with - member __.Dispose() = - if isNotNull pulse then (pulse :> IDisposable).Dispose() - -#if DEBUG - member x.UnsafeContents = - (x.inbox,arrivals,pulse,savedCont) |> box -#endif - - - [] - [] - type AsyncReplyChannel<'Reply>(replyf : 'Reply -> unit) = - member x.Reply(value) = replyf(value) - - [] - [] - [] - type MailboxProcessor<'Msg>(body, ?cancellationToken) = - let cancellationSupported = cancellationToken.IsSome - let cancellationToken = defaultArg cancellationToken Async.DefaultCancellationToken - let mailbox = new Mailbox<'Msg>(cancellationSupported) - let mutable defaultTimeout = Threading.Timeout.Infinite - let mutable started = false - let errorEvent = new Event() - - member x.CurrentQueueLength = mailbox.CurrentQueueLength // nb. unprotected access gives an approximation of the queue length - - member x.DefaultTimeout - with get() = defaultTimeout - and set(v) = defaultTimeout <- v - - [] - member x.Error = errorEvent.Publish - -#if DEBUG - member x.UnsafeMessageQueueContents = mailbox.UnsafeContents -#endif - member x.Start() = - if started then - raise (new InvalidOperationException(SR.GetString(SR.mailboxProcessorAlreadyStarted))) - else - started <- true - - // Protect the execution and send errors to the event. - // Note that exception stack traces are lost in this design - in an extended design - // the event could propagate an ExceptionDispatchInfo instead of an Exception. - let p = - async { try - do! body x - with exn -> - errorEvent.Trigger exn } - - Async.Start(computation=p, cancellationToken=cancellationToken) - - member x.Post(message) = mailbox.Post(message) - - member x.TryPostAndReply(buildMessage : (_ -> 'Msg), ?timeout) : 'Reply option = - let timeout = defaultArg timeout defaultTimeout - use resultCell = new ResultCell<_>() - let msg = buildMessage (new AsyncReplyChannel<_>(fun reply -> - // Note the ResultCell may have been disposed if the operation - // timed out. In this case RegisterResult drops the result on the floor. - resultCell.RegisterResult(reply,reuseThread=false) |> unfake)) - mailbox.Post(msg) - resultCell.TryWaitForResultSynchronously(timeout=timeout) - - member x.PostAndReply(buildMessage, ?timeout) : 'Reply = - match x.TryPostAndReply(buildMessage,?timeout=timeout) with - | None -> raise (TimeoutException(SR.GetString(SR.mailboxProcessorPostAndReplyTimedOut))) - | Some res -> res - - member x.PostAndTryAsyncReply(buildMessage, ?timeout) : Async<'Reply option> = - let timeout = defaultArg timeout defaultTimeout - let resultCell = new ResultCell<_>() - let msg = buildMessage (new AsyncReplyChannel<_>(fun reply -> - // Note the ResultCell may have been disposed if the operation - // timed out. In this case RegisterResult drops the result on the floor. - resultCell.RegisterResult(reply,reuseThread=false) |> unfake)) - mailbox.Post(msg) - match timeout with - | Threading.Timeout.Infinite -> - async { let! result = resultCell.AwaitResult - return Some(result) - } - - | _ -> - async { use _disposeCell = resultCell - let! ok = resultCell.GetWaitHandle().AsyncWaitOne(millisecondsTimeout=timeout) - let res = (if ok then Some(resultCell.GrabResult()) else None) - return res } - - member x.PostAndAsyncReply(buildMessage, ?timeout:int) = - let timeout = defaultArg timeout defaultTimeout - match timeout with - | Threading.Timeout.Infinite -> - // Nothing to dispose, no wait handles used - let resultCell = new ResultCell<_>() - let msg = buildMessage (new AsyncReplyChannel<_>(fun reply -> resultCell.RegisterResult(reply,reuseThread=false) |> unfake)) - mailbox.Post(msg) - resultCell.AwaitResult - | _ -> - let asyncReply = x.PostAndTryAsyncReply(buildMessage,timeout=timeout) - async { let! res = asyncReply - match res with - | None -> return! raise (TimeoutException(SR.GetString(SR.mailboxProcessorPostAndAsyncReplyTimedOut))) - | Some res -> return res - } - - member x.Receive(?timeout) = mailbox.Receive(timeout=defaultArg timeout defaultTimeout) - member x.TryReceive(?timeout) = mailbox.TryReceive(timeout=defaultArg timeout defaultTimeout) - member x.Scan(scanner: 'Msg -> (Async<'T>) option,?timeout) = mailbox.Scan(scanner,timeout=defaultArg timeout defaultTimeout) - member x.TryScan(scanner: 'Msg -> (Async<'T>) option,?timeout) = mailbox.TryScan(scanner,timeout=defaultArg timeout defaultTimeout) - - interface System.IDisposable with - member x.Dispose() = (mailbox :> IDisposable).Dispose() - - static member Start(body,?cancellationToken) = - let mb = new MailboxProcessor<'Msg>(body,?cancellationToken=cancellationToken) - mb.Start(); - mb - - - [] - [] - module Event = - [] - let create<'T>() = - let ev = new Event<'T>() - ev.Trigger, ev.Publish - - [] - let map mapping (sourceEvent: IEvent<'Delegate,'T>) = - let ev = new Event<_>() - sourceEvent.Add(fun x -> ev.Trigger(mapping x)); - ev.Publish - - [] - let filter predicate (sourceEvent: IEvent<'Delegate,'T>) = - let ev = new Event<_>() - sourceEvent.Add(fun x -> if predicate x then ev.Trigger x); - ev.Publish - - [] - let partition predicate (sourceEvent: IEvent<'Delegate,'T>) = - let ev1 = new Event<_>() - let ev2 = new Event<_>() - sourceEvent.Add(fun x -> if predicate x then ev1.Trigger x else ev2.Trigger x); - ev1.Publish,ev2.Publish - - [] - let choose chooser (sourceEvent: IEvent<'Delegate,'T>) = - let ev = new Event<_>() - sourceEvent.Add(fun x -> match chooser x with None -> () | Some r -> ev.Trigger r); - ev.Publish - - [] - let scan collector state (sourceEvent: IEvent<'Delegate,'T>) = - let state = ref state - let ev = new Event<_>() - sourceEvent.Add(fun msg -> - let z = !state - let z = collector z msg - state := z; - ev.Trigger(z)); - ev.Publish - - [] - let add callback (sourceEvent: IEvent<'Delegate,'T>) = sourceEvent.Add(callback) - - [] - let pairwise (sourceEvent : IEvent<'Delegate,'T>) : IEvent<'T * 'T> = - let ev = new Event<'T * 'T>() - let lastArgs = ref None - sourceEvent.Add(fun args2 -> - (match !lastArgs with - | None -> () - | Some args1 -> ev.Trigger(args1,args2)); - lastArgs := Some args2); - - ev.Publish - - [] - let merge (event1: IEvent<'Del1,'T>) (event2: IEvent<'Del2,'T>) = - let ev = new Event<_>() - event1.Add(fun x -> ev.Trigger(x)); - event2.Add(fun x -> ev.Trigger(x)); - ev.Publish - - [] - let split (splitter : 'T -> Choice<'U1,'U2>) (sourceEvent: IEvent<'Delegate,'T>) = - let ev1 = new Event<_>() - let ev2 = new Event<_>() - sourceEvent.Add(fun x -> match splitter x with Choice1Of2 y -> ev1.Trigger(y) | Choice2Of2 z -> ev2.Trigger(z)); - ev1.Publish,ev2.Publish - - - [] - [] - module Observable = - let obs x = (x :> IObservable<_>) - - - let inline protect f succeed fail = - match (try Choice1Of2 (f ()) with e -> Choice2Of2 e) with - | Choice1Of2 x -> (succeed x) - | Choice2Of2 e -> (fail e) - - [] - type BasicObserver<'T>() = - let mutable stopped = false - abstract Next : value : 'T -> unit - abstract Error : error : exn -> unit - abstract Completed : unit -> unit - interface IObserver<'T> with - member x.OnNext value = if not stopped then x.Next value - member x.OnError e = if not stopped then stopped <- true - x.Error e - member x.OnCompleted () = if not stopped then stopped <- true - x.Completed () - - -(* - type AutoDetachObserver<'T>(o : IObserver<'T>, s : IObservable) = - inherit BasicObserver<'T>() - override x.Next v = o.OnNext v - override x.Error e = o.OnError e - s.Add (fun d -> d.Dispose()) - override x.Completed () = o.OnCompleted () - s.Add (fun d -> d.Dispose()) - - type MyObservable<'T>() = - abstract MySubscribe : observer : IObserver<'T> -> System.IDisposable - interface IObservable<'T> - member x.Subscribe o = let (t, s) = create () - let ado = new AutoDetachObserver<'T>(o, s) - let d = x.MySubscribe ado - t d - d -*) - - [] - let map mapping (source: IObservable<'T>) = - { new IObservable<'U> with - member x.Subscribe(observer) = - source.Subscribe { new BasicObserver<'T>() with - member x.Next(v) = - protect (fun () -> mapping v) observer.OnNext observer.OnError - member x.Error(e) = observer.OnError(e) - member x.Completed() = observer.OnCompleted() } } - - [] - let choose chooser (source: IObservable<'T>) = - { new IObservable<'U> with - member x.Subscribe(observer) = - source.Subscribe { new BasicObserver<'T>() with - member x.Next(v) = - protect (fun () -> chooser v) (function None -> () | Some v2 -> observer.OnNext v2) observer.OnError - member x.Error(e) = observer.OnError(e) - member x.Completed() = observer.OnCompleted() } } - - [] - let filter predicate (source: IObservable<'T>) = - choose (fun x -> if predicate x then Some x else None) source - - [] - let partition predicate (source: IObservable<'T>) = - filter predicate source, filter (predicate >> not) source - - - [] - let scan collector state (source: IObservable<'T>) = - { new IObservable<'U> with - member x.Subscribe(observer) = - let state = ref state - source.Subscribe { new BasicObserver<'T>() with - member x.Next(v) = - let z = !state - protect (fun () -> collector z v) (fun z -> - state := z - observer.OnNext z) observer.OnError - - member x.Error(e) = observer.OnError(e) - member x.Completed() = observer.OnCompleted() } } - - [] - let add callback (source: IObservable<'T>) = source.Add(callback) - - [] - let subscribe (callback: 'T -> unit) (source: IObservable<'T>) = source.Subscribe(callback) - - [] - let pairwise (source : IObservable<'T>) : IObservable<'T * 'T> = - { new IObservable<_> with - member x.Subscribe(observer) = - let lastArgs = ref None - source.Subscribe { new BasicObserver<'T>() with - member x.Next(args2) = - match !lastArgs with - | None -> () - | Some args1 -> observer.OnNext (args1,args2) - lastArgs := Some args2 - member x.Error(e) = observer.OnError(e) - member x.Completed() = observer.OnCompleted() } } - - - [] - let merge (source1: IObservable<'T>) (source2: IObservable<'T>) = - { new IObservable<_> with - member x.Subscribe(observer) = - let stopped = ref false - let completed1 = ref false - let completed2 = ref false - let h1 = - source1.Subscribe { new IObserver<'T> with - member x.OnNext(v) = - if not !stopped then - observer.OnNext v - member x.OnError(e) = - if not !stopped then - stopped := true; - observer.OnError(e) - member x.OnCompleted() = - if not !stopped then - completed1 := true; - if !completed1 && !completed2 then - stopped := true - observer.OnCompleted() } - let h2 = - source2.Subscribe { new IObserver<'T> with - member x.OnNext(v) = - if not !stopped then - observer.OnNext v - member x.OnError(e) = - if not !stopped then - stopped := true; - observer.OnError(e) - member x.OnCompleted() = - if not !stopped then - completed2 := true; - if !completed1 && !completed2 then - stopped := true - observer.OnCompleted() } - - { new IDisposable with - member x.Dispose() = - h1.Dispose(); - h2.Dispose() } } - - [] - let split (splitter : 'T -> Choice<'U1,'U2>) (source: IObservable<'T>) = - choose (fun v -> match splitter v with Choice1Of2 x -> Some x | _ -> None) source, - choose (fun v -> match splitter v with Choice2Of2 x -> Some x | _ -> None) source - diff --git a/src/fsharp/FSharp.Core/control.fsi b/src/fsharp/FSharp.Core/control.fsi deleted file mode 100644 index 77be1ceae14..00000000000 --- a/src/fsharp/FSharp.Core/control.fsi +++ /dev/null @@ -1,1009 +0,0 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. - -namespace Microsoft.FSharp.Control - - open System - open System.Threading - open System.Threading.Tasks - open System.Runtime.CompilerServices - - open Microsoft.FSharp.Core - open Microsoft.FSharp.Core.Operators - open Microsoft.FSharp.Control - open Microsoft.FSharp.Collections - - - /// A compositional asynchronous computation, which, when run, will eventually produce a value - /// of type T, or else raises an exception. - /// - /// Asynchronous computations are normally specified using an F# computation expression. - /// - /// When run, asynchronous computations have two modes: as a work item (executing synchronous - /// code), or as a wait item (waiting for an event or I/O completion). - /// - /// When run, asynchronous computations can be governed by CancellationToken. This can usually - /// be specified when the async computation is started. The associated CancellationTokenSource - /// may be used to cancel the asynchronous computation. Asynchronous computations built using - /// computation expressions can check the cancellation condition regularly. Synchronous - /// computations within an asynchronous computation do not automatically check this condition. - - [] - [] - [] - type Async<'T> - - /// This static class holds members for creating and manipulating asynchronous computations. - - [] - [] - type Async = - - /// Runs the asynchronous computation and await its result. - /// - /// If an exception occurs in the asynchronous computation then an exception is re-raised by this - /// function. - /// - /// If no cancellation token is provided then the default cancellation token is used. - /// - /// The timeout parameter is given in milliseconds. A value of -1 is equivalent to - /// System.Threading.Timeout.Infinite. - /// The computation to run. - /// The amount of time in milliseconds to wait for the result of the - /// computation before raising a System.TimeoutException. If no value is provided - /// for timeout then a default of -1 is used to correspond to System.Threading.Timeout.Infinite. - ////If a cancellable cancellationToken is provided, timeout parameter will be ignored - /// The cancellation token to be associated with the computation. - /// If one is not supplied, the default cancellation token is used. - /// The result of the computation. - static member RunSynchronously : computation:Async<'T> * ?timeout : int * ?cancellationToken:CancellationToken-> 'T - - /// Starts the asynchronous computation in the thread pool. Do not await its result. - /// - /// If no cancellation token is provided then the default cancellation token is used. - /// The computation to run asynchronously. - /// The cancellation token to be associated with the computation. - /// If one is not supplied, the default cancellation token is used. - static member Start : computation:Async * ?cancellationToken:CancellationToken -> unit - - /// Executes a computation in the thread pool. - /// If no cancellation token is provided then the default cancellation token is used. - /// A System.Threading.Tasks.Task that will be completed - /// in the corresponding state once the computation terminates (produces the result, throws exception or gets canceled) - /// - static member StartAsTask : computation:Async<'T> * ?taskCreationOptions:TaskCreationOptions * ?cancellationToken:CancellationToken -> Task<'T> - - /// Creates an asynchronous computation which starts the given computation as a System.Threading.Tasks.Task - static member StartChildAsTask : computation:Async<'T> * ?taskCreationOptions:TaskCreationOptions -> Async> - - /// Creates an asynchronous computation that executes computation. - /// If this computation completes successfully then return Choice1Of2 with the returned - /// value. If this computation raises an exception before it completes then return Choice2Of2 - /// with the raised exception. - /// The input computation that returns the type T. - /// A computation that returns a choice of type T or exception. - static member Catch : computation:Async<'T> -> Async> - - /// Creates an asynchronous computation that executes computation. - /// If this computation is cancelled before it completes then the computation generated by - /// running compensation is executed. - /// The input asynchronous computation. - /// The function to be run if the computation is cancelled. - /// An asynchronous computation that runs the compensation if the input computation - /// is cancelled. - static member TryCancelled : computation:Async<'T> * compensation:(OperationCanceledException -> unit) -> Async<'T> - - /// Generates a scoped, cooperative cancellation handler for use within an asynchronous workflow. - /// - /// For example, - /// async { use! holder = Async.OnCancel interruption ... } - /// generates an asynchronous computation where, if a cancellation happens any time during - /// the execution of the asynchronous computation in the scope of holder, then action - /// interruption is executed on the thread that is performing the cancellation. This can - /// be used to arrange for a computation to be asynchronously notified that a cancellation - /// has occurred, e.g. by setting a flag, or deregistering a pending I/O action. - /// The function that is executed on the thread performing the - /// cancellation. - /// An asynchronous computation that triggers the interruption if it is cancelled - /// before being disposed. - static member OnCancel : interruption: (unit -> unit) -> Async - - /// Creates an asynchronous computation that returns the CancellationToken governing the execution - /// of the computation. - /// In async { let! token = Async.CancellationToken ...} token can be used to initiate other - /// asynchronous operations that will cancel cooperatively with this workflow. - /// An asynchronous computation capable of retrieving the CancellationToken from a computation - /// expression. - static member CancellationToken : Async - - /// Raises the cancellation condition for the most recent set of asynchronous computations started - /// without any specific CancellationToken. Replaces the global CancellationTokenSource with a new - /// global token source for any asynchronous computations created after this point without any - /// specific CancellationToken. - static member CancelDefaultToken : unit -> unit - - /// Gets the default cancellation token for executing asynchronous computations. - /// The default CancellationToken. - static member DefaultCancellationToken : CancellationToken - - //---------- Parallelism - - /// Starts a child computation within an asynchronous workflow. - /// This allows multiple asynchronous computations to be executed simultaneously. - /// - /// This method should normally be used as the immediate - /// right-hand-side of a let! binding in an F# asynchronous workflow, that is, - /// - /// async { ... - /// let! completor1 = childComputation1 |> Async.StartChild - /// let! completor2 = childComputation2 |> Async.StartChild - /// ... - /// let! result1 = completor1 - /// let! result2 = completor2 - /// ... } - /// - /// When used in this way, each use of StartChild starts an instance of childComputation - /// and returns a completor object representing a computation to wait for the completion of the operation. - /// When executed, the completor awaits the completion of childComputation. - /// The child computation. - /// The timeout value in milliseconds. If one is not provided - /// then the default value of -1 corresponding to System.Threading.Timeout.Infinite. - /// A new computation that waits for the input computation to finish. - static member StartChild : computation:Async<'T> * ?millisecondsTimeout : int -> Async> - - /// Creates an asynchronous computation that executes all the given asynchronous computations, - /// initially queueing each as work items and using a fork/join pattern. - /// - /// If all child computations succeed, an array of results is passed to the success continuation. - /// - /// If any child computation raises an exception, then the overall computation will trigger an - /// exception, and cancel the others. - /// - /// The overall computation will respond to cancellation while executing the child computations. - /// If cancelled, the computation will cancel any remaining child computations but will still wait - /// for the other child computations to complete. - /// A sequence of distinct computations to be parallelized. - /// A computation that returns an array of values from the sequence of input computations. - static member Parallel : computations:seq> -> Async<'T[]> - - /// Creates an asynchronous computation that executes all given asynchronous computations in parallel, - /// returning the result of the first succeeding computation (one whose result is 'Some x'). - /// If all child computations complete with None, the parent computation also returns None. - /// - /// - /// If any child computation raises an exception, then the overall computation will trigger an - /// exception, and cancel the others. - /// - /// The overall computation will respond to cancellation while executing the child computations. - /// If cancelled, the computation will cancel any remaining child computations but will still wait - /// for the other child computations to complete. - /// A sequence of computations to be parallelized. - /// A computation that returns the first succeeding computation. - static member Choice : computations:seq> -> Async<'T option> - - //---------- Thread Control - - /// Creates an asynchronous computation that creates a new thread and runs - /// its continuation in that thread. - /// A computation that will execute on a new thread. - static member SwitchToNewThread : unit -> Async - - /// Creates an asynchronous computation that queues a work item that runs - /// its continuation. - /// A computation that generates a new work item in the thread pool. - static member SwitchToThreadPool : unit -> Async - - /// Creates an asynchronous computation that runs - /// its continuation using syncContext.Post. If syncContext is null - /// then the asynchronous computation is equivalent to SwitchToThreadPool(). - /// The synchronization context to accept the posted computation. - /// An asynchronous computation that uses the syncContext context to execute. - static member SwitchToContext : syncContext:System.Threading.SynchronizationContext -> Async - - /// Creates an asynchronous computation that captures the current - /// success, exception and cancellation continuations. The callback must - /// eventually call exactly one of the given continuations. - /// The function that accepts the current success, exception, and cancellation - /// continuations. - /// An asynchronous computation that provides the callback with the current continuations. - static member FromContinuations : callback:(('T -> unit) * (exn -> unit) * (OperationCanceledException -> unit) -> unit) -> Async<'T> - - /// Creates an asynchronous computation that waits for a single invocation of a CLI - /// event by adding a handler to the event. Once the computation completes or is - /// cancelled, the handler is removed from the event. - /// - /// The computation will respond to cancellation while waiting for the event. If a - /// cancellation occurs, and cancelAction is specified, then it is executed, and - /// the computation continues to wait for the event. - /// - /// If cancelAction is not specified, then cancellation causes the computation - /// to cancel immediately. - /// The event to handle once. - /// An optional function to execute instead of cancelling when a - /// cancellation is issued. - /// An asynchronous computation that waits for the event to be invoked. - static member AwaitEvent: event:IEvent<'Del,'T> * ?cancelAction : (unit -> unit) -> Async<'T> when 'Del : delegate<'T,unit> and 'Del :> System.Delegate - - /// Creates an asynchronous computation that will wait on the given WaitHandle. - /// - /// The computation returns true if the handle indicated a result within the given timeout. - /// The WaitHandle that can be signalled. - /// The timeout value in milliseconds. If one is not provided - /// then the default value of -1 corresponding to System.Threading.Timeout.Infinite. - /// An asynchronous computation that waits on the given WaitHandle. - static member AwaitWaitHandle: waitHandle: WaitHandle * ?millisecondsTimeout:int -> Async - - /// Creates an asynchronous computation that will wait on the IAsyncResult. - /// - /// The computation returns true if the handle indicated a result within the given timeout. - /// The IAsyncResult to wait on. - /// The timeout value in milliseconds. If one is not provided - /// then the default value of -1 corresponding to System.Threading.Timeout.Infinite. - /// An asynchronous computation that waits on the given IAsyncResult. - static member AwaitIAsyncResult: iar: System.IAsyncResult * ?millisecondsTimeout:int -> Async - - /// Return an asynchronous computation that will wait for the given task to complete and return - /// its result. - static member AwaitTask: task: Task<'T> -> Async<'T> - /// Return an asynchronous computation that will wait for the given task to complete and return - /// its result. - static member AwaitTask: task: Task -> Async - - /// Creates an asynchronous computation that will sleep for the given time. This is scheduled - /// using a System.Threading.Timer object. The operation will not block operating system threads - /// for the duration of the wait. - /// The number of milliseconds to sleep. - /// An asynchronous computation that will sleep for the given time. - /// Thrown when the due time is negative - /// and not infinite. - static member Sleep: millisecondsDueTime:int -> Async - - /// Creates an asynchronous computation in terms of a Begin/End pair of actions in - /// the style used in CLI APIs. For example, - /// Async.FromBeginEnd(ws.BeginGetWeather,ws.EndGetWeather) - /// When the computation is run, beginFunc is executed, with - /// a callback which represents the continuation of the computation. - /// When the callback is invoked, the overall result is fetched using endFunc. - /// - /// The computation will respond to cancellation while waiting for the completion - /// of the operation. If a cancellation occurs, and cancelAction is specified, then it is - /// executed, and the computation continues to wait for the completion of the operation. - /// - /// If cancelAction is not specified, then cancellation causes the computation - /// to stop immediately, and subsequent invocations of the callback are ignored. - /// The function initiating a traditional CLI asynchronous operation. - /// The function completing a traditional CLI asynchronous operation. - /// An optional function to be executed when a cancellation is requested. - /// An asynchronous computation wrapping the given Begin/End functions. - static member FromBeginEnd : beginAction:(System.AsyncCallback * obj -> System.IAsyncResult) * endAction:(System.IAsyncResult -> 'T) * ?cancelAction : (unit -> unit) -> Async<'T> - - /// Creates an asynchronous computation in terms of a Begin/End pair of actions in - /// the style used in CLI APIs. This overload should be used if the operation is - /// qualified by one argument. For example, - /// Async.FromBeginEnd(place,ws.BeginGetWeather,ws.EndGetWeather) - /// When the computation is run, beginFunc is executed, with - /// a callback which represents the continuation of the computation. - /// When the callback is invoked, the overall result is fetched using endFunc. - /// - /// The computation will respond to cancellation while waiting for the completion - /// of the operation. If a cancellation occurs, and cancelAction is specified, then it is - /// executed, and the computation continues to wait for the completion of the operation. - /// - /// If cancelAction is not specified, then cancellation causes the computation - /// to stop immediately, and subsequent invocations of the callback are ignored. - /// The argument for the operation. - /// The function initiating a traditional CLI asynchronous operation. - /// The function completing a traditional CLI asynchronous operation. - /// An optional function to be executed when a cancellation is requested. - /// An asynchronous computation wrapping the given Begin/End functions. - static member FromBeginEnd : arg:'Arg1 * beginAction:('Arg1 * System.AsyncCallback * obj -> System.IAsyncResult) * endAction:(System.IAsyncResult -> 'T) * ?cancelAction : (unit -> unit) -> Async<'T> - - /// Creates an asynchronous computation in terms of a Begin/End pair of actions in - /// the style used in CLI APIs. This overload should be used if the operation is - /// qualified by two arguments. For example, - /// Async.FromBeginEnd(arg1,arg2,ws.BeginGetWeather,ws.EndGetWeather) - /// When the computation is run, beginFunc is executed, with - /// a callback which represents the continuation of the computation. - /// When the callback is invoked, the overall result is fetched using endFunc. - /// - /// The computation will respond to cancellation while waiting for the completion - /// of the operation. If a cancellation occurs, and cancelAction is specified, then it is - /// executed, and the computation continues to wait for the completion of the operation. - /// - /// If cancelAction is not specified, then cancellation causes the computation - /// to stop immediately, and subsequent invocations of the callback are ignored. - /// The first argument for the operation. - /// The second argument for the operation. - /// The function initiating a traditional CLI asynchronous operation. - /// The function completing a traditional CLI asynchronous operation. - /// An optional function to be executed when a cancellation is requested. - /// An asynchronous computation wrapping the given Begin/End functions. - static member FromBeginEnd : arg1:'Arg1 * arg2:'Arg2 * beginAction:('Arg1 * 'Arg2 * System.AsyncCallback * obj -> System.IAsyncResult) * endAction:(System.IAsyncResult -> 'T) * ?cancelAction : (unit -> unit) -> Async<'T> - - /// Creates an asynchronous computation in terms of a Begin/End pair of actions in - /// the style used in CLI APIs. This overload should be used if the operation is - /// qualified by three arguments. For example, - /// Async.FromBeginEnd(arg1,arg2,arg3,ws.BeginGetWeather,ws.EndGetWeather) - /// When the computation is run, beginFunc is executed, with - /// a callback which represents the continuation of the computation. - /// When the callback is invoked, the overall result is fetched using endFunc. - /// - /// The computation will respond to cancellation while waiting for the completion - /// of the operation. If a cancellation occurs, and cancelAction is specified, then it is - /// executed, and the computation continues to wait for the completion of the operation. - /// - /// If cancelAction is not specified, then cancellation causes the computation - /// to stop immediately, and subsequent invocations of the callback are ignored. - /// The first argument for the operation. - /// The second argument for the operation. - /// The third argument for the operation. - /// The function initiating a traditional CLI asynchronous operation. - /// The function completing a traditional CLI asynchronous operation. - /// An optional function to be executed when a cancellation is requested. - /// An asynchronous computation wrapping the given Begin/End functions. - static member FromBeginEnd : arg1:'Arg1 * arg2:'Arg2 * arg3:'Arg3 * beginAction:('Arg1 * 'Arg2 * 'Arg3 * System.AsyncCallback * obj -> System.IAsyncResult) * endAction:(System.IAsyncResult -> 'T) * ?cancelAction : (unit -> unit) -> Async<'T> - - /// Creates three functions that can be used to implement the .NET Asynchronous - /// Programming Model (APM) for a given asynchronous computation. - /// - /// The functions should normally be published as members with prefix Begin, - /// End and Cancel, and can be used within a type definition as follows: - /// - /// let beginAction,endAction,cancelAction = Async.AsBeginEnd (fun arg -> computation) - /// member x.BeginSomeOperation(arg,callback,state:obj) = beginAction(arg,callback,state) - /// member x.EndSomeOperation(iar) = endAction(iar) - /// member x.CancelSomeOperation(iar) = cancelAction(iar) - /// - /// - /// If the asynchronous computation takes no arguments, then AsBeginEnd is used as follows: - /// - /// let beginAction,endAction,cancelAction = Async.AsBeginEnd (fun () -> computation) - /// member x.BeginSomeOperation(callback,state:obj) = beginAction((),callback,state) - /// member x.EndSomeOperation(iar) = endAction(iar) - /// member x.CancelSomeOperation(iar) = cancelAction(iar) - /// - /// - /// - /// If the asynchronous computation takes two arguments, then AsBeginEnd is used as follows: - /// - /// let beginAction,endAction,cancelAction = Async.AsBeginEnd (fun arg1 arg2 -> computation) - /// member x.BeginSomeOperation(arg1,arg2,callback,state:obj) = beginAction((),callback,state) - /// member x.EndSomeOperation(iar) = endAction(iar) - /// member x.CancelSomeOperation(iar) = cancelAction(iar) - /// - /// - /// In each case, the resulting API will be familiar to programmers in other CLI languages and - /// is a useful way to publish asynchronous computations in CLI components. - /// A function generating the asynchronous computation to split into the traditional - /// .NET Asynchronous Programming Model. - /// A tuple of the begin, end, and cancel members. - static member AsBeginEnd : computation:('Arg -> Async<'T>) -> - // The 'Begin' member - ('Arg * System.AsyncCallback * obj -> System.IAsyncResult) * - // The 'End' member - (System.IAsyncResult -> 'T) * - // The 'Cancel' member - (System.IAsyncResult -> unit) - - /// Creates an asynchronous computation that runs the given computation and ignores - /// its result. - /// The input computation. - /// A computation that is equivalent to the input computation, but disregards the result. - static member Ignore : computation: Async<'T> -> Async - - /// Runs an asynchronous computation, starting immediately on the current operating system - /// thread. Call one of the three continuations when the operation completes. - /// If no cancellation token is provided then the default cancellation token - /// is used. - /// The asynchronous computation to execute. - /// The function called on success. - /// The function called on exception. - /// The function called on cancellation. - /// The CancellationToken to associate with the computation. - /// The default is used if this parameter is not provided. - static member StartWithContinuations: - computation:Async<'T> * - continuation:('T -> unit) * exceptionContinuation:(exn -> unit) * cancellationContinuation:(OperationCanceledException -> unit) * - ?cancellationToken:CancellationToken-> unit - - /// Runs an asynchronous computation, starting immediately on the current operating system - /// thread. - /// If no cancellation token is provided then the default cancellation token is used. - /// The asynchronous computation to execute. - /// The CancellationToken to associate with the computation. - /// The default is used if this parameter is not provided. - static member StartImmediate: - computation:Async * ?cancellationToken:CancellationToken-> unit - - - - [] - [] - /// The type of the async operator, used to build workflows for asynchronous computations. - type AsyncBuilder = - /// Creates an asynchronous computation that enumerates the sequence seq - /// on demand and runs body for each element. - /// - /// A cancellation check is performed on each iteration of the loop. - /// - /// The existence of this method permits the use of for in the - /// async { ... } computation expression syntax. - /// The sequence to enumerate. - /// A function to take an item from the sequence and create - /// an asynchronous computation. Can be seen as the body of the for expression. - /// An asynchronous computation that will enumerate the sequence and run body - /// for each element. - member For: sequence:seq<'T> * body:('T -> Async) -> Async - - /// Creates an asynchronous computation that just returns (). - /// - /// A cancellation check is performed when the computation is executed. - /// - /// The existence of this method permits the use of empty else branches in the - /// async { ... } computation expression syntax. - /// An asynchronous computation that returns (). - member Zero : unit -> Async - - /// Creates an asynchronous computation that first runs computation1 - /// and then runs computation2, returning the result of computation2. - /// - /// A cancellation check is performed when the computation is executed. - /// - /// The existence of this method permits the use of expression sequencing in the - /// async { ... } computation expression syntax. - /// The first part of the sequenced computation. - /// The second part of the sequenced computation. - /// An asynchronous computation that runs both of the computations sequentially. - member Combine : computation1:Async * computation2:Async<'T> -> Async<'T> - - /// Creates an asynchronous computation that runs computation repeatedly - /// until guard() becomes false. - /// - /// A cancellation check is performed whenever the computation is executed. - /// - /// The existence of this method permits the use of while in the - /// async { ... } computation expression syntax. - /// The function to determine when to stop executing computation. - /// The function to be executed. Equivalent to the body - /// of a while expression. - /// An asynchronous computation that behaves similarly to a while loop when run. - member While : guard:(unit -> bool) * computation:Async -> Async - - /// Creates an asynchronous computation that returns the result v. - /// - /// A cancellation check is performed when the computation is executed. - /// - /// The existence of this method permits the use of return in the - /// async { ... } computation expression syntax. - /// The value to return from the computation. - /// An asynchronous computation that returns value when executed. - member Return : value:'T -> Async<'T> - - /// Delegates to the input computation. - /// - /// The existence of this method permits the use of return! in the - /// async { ... } computation expression syntax. - /// The input computation. - /// The input computation. - member ReturnFrom : computation:Async<'T> -> Async<'T> - - /// Creates an asynchronous computation that runs generator. - /// - /// A cancellation check is performed when the computation is executed. - /// The function to run. - /// An asynchronous computation that runs generator. - member Delay : generator:(unit -> Async<'T>) -> Async<'T> - - /// Creates an asynchronous computation that runs binder(resource). - /// The action resource.Dispose() is executed as this computation yields its result - /// or if the asynchronous computation exits by an exception or by cancellation. - /// - /// A cancellation check is performed when the computation is executed. - /// - /// The existence of this method permits the use of use and use! in the - /// async { ... } computation expression syntax. - /// The resource to be used and disposed. - /// The function that takes the resource and returns an asynchronous - /// computation. - /// An asynchronous computation that binds and eventually disposes resource. - member Using: resource:'T * binder:('T -> Async<'U>) -> Async<'U> when 'T :> System.IDisposable - - /// Creates an asynchronous computation that runs computation, and when - /// computation generates a result T, runs binder res. - /// - /// A cancellation check is performed when the computation is executed. - /// - /// The existence of this method permits the use of let! in the - /// async { ... } computation expression syntax. - /// The computation to provide an unbound result. - /// The function to bind the result of computation. - /// An asynchronous computation that performs a monadic bind on the result - /// of computation. - member Bind: computation: Async<'T> * binder: ('T -> Async<'U>) -> Async<'U> - - /// Creates an asynchronous computation that runs computation. The action compensation is executed - /// after computation completes, whether computation exits normally or by an exception. If compensation raises an exception itself - /// the original exception is discarded and the new exception becomes the overall result of the computation. - /// - /// A cancellation check is performed when the computation is executed. - /// - /// The existence of this method permits the use of try/finally in the - /// async { ... } computation expression syntax. - /// The input computation. - /// The action to be run after computation completes or raises an - /// exception (including cancellation). - /// An asynchronous computation that executes computation and compensation afterwards or - /// when an exception is raised. - member TryFinally : computation:Async<'T> * compensation:(unit -> unit) -> Async<'T> - - /// Creates an asynchronous computation that runs computation and returns its result. - /// If an exception happens then catchHandler(exn) is called and the resulting computation executed instead. - /// - /// A cancellation check is performed when the computation is executed. - /// - /// The existence of this method permits the use of try/with in the - /// async { ... } computation expression syntax. - /// The input computation. - /// The function to run when computation throws an exception. - /// An asynchronous computation that executes computation and calls catchHandler if an - /// exception is thrown. - member TryWith : computation:Async<'T> * catchHandler:(exn -> Async<'T>) -> Async<'T> - - /// Generate an object used to build asynchronous computations using F# computation expressions. The value - /// 'async' is a pre-defined instance of this type. - /// - /// A cancellation check is performed when the computation is executed. - internal new : unit -> AsyncBuilder - - [] - /// A module of extension members providing asynchronous operations for some basic CLI types related to concurrency and I/O. - module CommonExtensions = - open System.IO - - type System.IO.Stream with - - /// Returns an asynchronous computation that will read from the stream into the given buffer. - /// The buffer to read into. - /// An optional offset as a number of bytes in the stream. - /// An optional number of bytes to read from the stream. - /// An asynchronous computation that will read from the stream into the given buffer. - /// Thrown when the sum of offset and count is longer than - /// the buffer length. - /// Thrown when offset or count is negative. - [] // give the extension member a nice, unmangled compiled name, unique within this module - member AsyncRead : buffer:byte[] * ?offset:int * ?count:int -> Async - - /// Returns an asynchronous computation that will read the given number of bytes from the stream. - /// The number of bytes to read. - /// An asynchronous computation that returns the read byte[] when run. - [] // give the extension member a nice, unmangled compiled name, unique within this module - member AsyncRead : count:int -> Async - - /// Returns an asynchronous computation that will write the given bytes to the stream. - /// The buffer to write from. - /// An optional offset as a number of bytes in the stream. - /// An optional number of bytes to write to the stream. - /// An asynchronous computation that will write the given bytes to the stream. - /// Thrown when the sum of offset and count is longer than - /// the buffer length. - /// Thrown when offset or count is negative. - [] // give the extension member a nice, unmangled compiled name, unique within this module - member AsyncWrite : buffer:byte[] * ?offset:int * ?count:int -> Async - - - ///The family of first class event values for delegate types that satisfy the F# delegate constraint. - type IObservable<'T> with - /// Permanently connects a listener function to the observable. The listener will - /// be invoked for each observation. - /// The function to be called for each observation. - [] // give the extension member a nice, unmangled compiled name, unique within this module - member Add: callback:('T -> unit) -> unit - - /// Connects a listener function to the observable. The listener will - /// be invoked for each observation. The listener can be removed by - /// calling Dispose on the returned IDisposable object. - /// The function to be called for each observation. - /// An object that will remove the listener if disposed. - [] // give the extension member a nice, unmangled compiled name, unique within this module - member Subscribe: callback:('T -> unit) -> System.IDisposable - - /// A module of extension members providing asynchronous operations for some basic Web operations. - [] - module WebExtensions = - begin - - type System.Net.WebRequest with - /// Returns an asynchronous computation that, when run, will wait for a response to the given WebRequest. - /// An asynchronous computation that waits for response to the WebRequest. - [] // give the extension member a nice, unmangled compiled name, unique within this module - member AsyncGetResponse : unit -> Async - -#if !FX_NO_WEB_CLIENT - type System.Net.WebClient with - /// Returns an asynchronous computation that, when run, will wait for the download of the given URI. - /// The URI to retrieve. - /// An asynchronous computation that will wait for the download of the URI. - [] // give the extension member a nice, unmangled compiled name, unique within this module - member AsyncDownloadString : address:System.Uri -> Async - /// Returns an asynchronous computation that, when run, will wait for the download of the given URI. - /// The URI to retrieve. - /// An asynchronous computation that will wait for the download of the URI. - [] // give the extension member a nice, unmangled compiled name, unique within this module - member AsyncDownloadData : address:System.Uri -> Async - /// Returns an asynchronous computation that, when run, will wait for the download of the given URI to specified file. - /// The URI to retrieve. - /// The filename to save download to. - /// An asynchronous computation that will wait for the download of the URI to specified file. - [] // give the extension member a nice, unmangled compiled name, unique within this module - member AsyncDownloadFile : address:System.Uri * fileName: string -> Async -#endif - - end - - - [] - [] - /// A handle to a capability to reply to a PostAndReply message. - type AsyncReplyChannel<'Reply> = - /// Sends a reply to a PostAndReply message. - /// The value to send. - member Reply : value:'Reply -> unit - - - /// A message-processing agent which executes an asynchronous computation. - /// - /// The agent encapsulates a message queue that supports multiple-writers and - /// a single reader agent. Writers send messages to the agent by using the Post - /// method and its variations. - /// - /// The agent may wait for messages using the Receive or TryReceive methods or - /// scan through all available messages using the Scan or TryScan method. - - [] - [] - [] - type MailboxProcessor<'Msg> = - - /// Creates an agent. The body function is used to generate the asynchronous - /// computation executed by the agent. This function is not executed until - /// Start is called. - /// The function to produce an asynchronous computation that will be executed - /// as the read loop for the MailboxProcessor when Start is called. - /// An optional cancellation token for the body. - /// Defaults to Async.DefaultCancellationToken. - /// The created MailboxProcessor. - new : body:(MailboxProcessor<'Msg> -> Async) * ?cancellationToken: CancellationToken -> MailboxProcessor<'Msg> - - /// Creates and starts an agent. The body function is used to generate the asynchronous - /// computation executed by the agent. - /// The function to produce an asynchronous computation that will be executed - /// as the read loop for the MailboxProcessor when Start is called. - /// An optional cancellation token for the body. - /// Defaults to Async.DefaultCancellationToken. - /// The created MailboxProcessor. - static member Start : body:(MailboxProcessor<'Msg> -> Async) * ?cancellationToken: CancellationToken -> MailboxProcessor<'Msg> - - /// Posts a message to the message queue of the MailboxProcessor, asynchronously. - /// The message to post. - member Post : message:'Msg -> unit - - /// Posts a message to an agent and await a reply on the channel, synchronously. - /// - /// The message is generated by applying buildMessage to a new reply channel - /// to be incorporated into the message. The receiving agent must process this - /// message and invoke the Reply method on this reply channel precisely once. - /// The function to incorporate the AsyncReplyChannel into - /// the message to be sent. - /// An optional timeout parameter (in milliseconds) to wait for a reply message. - /// Defaults to -1 which corresponds to System.Threading.Timeout.Infinite. - /// The reply from the agent. - member PostAndReply : buildMessage:(AsyncReplyChannel<'Reply> -> 'Msg) * ?timeout : int -> 'Reply - - /// Posts a message to an agent and await a reply on the channel, asynchronously. - /// - /// The message is generated by applying buildMessage to a new reply channel - /// to be incorporated into the message. The receiving agent must process this - /// message and invoke the Reply method on this reply channel precisely once. - /// The function to incorporate the AsyncReplyChannel into - /// the message to be sent. - /// An optional timeout parameter (in milliseconds) to wait for a reply message. - /// Defaults to -1 which corresponds to System.Threading.Timeout.Infinite. - /// An asynchronous computation that will wait for the reply from the agent. - member PostAndAsyncReply : buildMessage:(AsyncReplyChannel<'Reply> -> 'Msg) * ?timeout : int -> Async<'Reply> - - /// Like PostAndReply, but returns None if no reply within the timeout period. - /// The function to incorporate the AsyncReplyChannel into - /// the message to be sent. - /// An optional timeout parameter (in milliseconds) to wait for a reply message. - /// Defaults to -1 which corresponds to System.Threading.Timeout.Infinite. - /// The reply from the agent or None if the timeout expires. - member TryPostAndReply : buildMessage:(AsyncReplyChannel<'Reply> -> 'Msg) * ?timeout : int -> 'Reply option - - /// Like AsyncPostAndReply, but returns None if no reply within the timeout period. - /// The function to incorporate the AsyncReplyChannel into - /// the message to be sent. - /// An optional timeout parameter (in milliseconds) to wait for a reply message. - /// Defaults to -1 which corresponds to System.Threading.Timeout.Infinite. - /// An asynchronous computation that will return the reply or None if the timeout expires. - member PostAndTryAsyncReply : buildMessage:(AsyncReplyChannel<'Reply> -> 'Msg) * ?timeout : int -> Async<'Reply option> - - /// Waits for a message. This will consume the first message in arrival order. - /// - /// This method is for use within the body of the agent. - /// - /// This method is for use within the body of the agent. For each agent, at most - /// one concurrent reader may be active, so no more than one concurrent call to - /// Receive, TryReceive, Scan and/or TryScan may be active. - /// An optional timeout in milliseconds. Defaults to -1 which corresponds - /// to System.Threading.Timeout.Infinite. - /// An asynchronous computation that returns the received message. - /// Thrown when the timeout is exceeded. - member Receive : ?timeout:int -> Async<'Msg> - - /// Waits for a message. This will consume the first message in arrival order. - /// - /// This method is for use within the body of the agent. - /// - /// Returns None if a timeout is given and the timeout is exceeded. - /// - /// This method is for use within the body of the agent. For each agent, at most - /// one concurrent reader may be active, so no more than one concurrent call to - /// Receive, TryReceive, Scan and/or TryScan may be active. - /// An optional timeout in milliseconds. Defaults to -1 which - /// corresponds to System.Threading.Timeout.Infinite. - /// An asynchronous computation that returns the received message or - /// None if the timeout is exceeded. - member TryReceive : ?timeout:int -> Async<'Msg option> - - /// Scans for a message by looking through messages in arrival order until scanner - /// returns a Some value. Other messages remain in the queue. - /// - /// Returns None if a timeout is given and the timeout is exceeded. - /// - /// This method is for use within the body of the agent. For each agent, at most - /// one concurrent reader may be active, so no more than one concurrent call to - /// Receive, TryReceive, Scan and/or TryScan may be active. - /// The function to return None if the message is to be skipped - /// or Some if the message is to be processed and removed from the queue. - /// An optional timeout in milliseconds. Defaults to -1 which corresponds - /// to System.Threading.Timeout.Infinite. - /// An asynchronous computation that scanner built off the read message. - /// Thrown when the timeout is exceeded. - member Scan : scanner:('Msg -> (Async<'T>) option) * ?timeout:int -> Async<'T> - - /// Scans for a message by looking through messages in arrival order until scanner - /// returns a Some value. Other messages remain in the queue. - /// - /// This method is for use within the body of the agent. For each agent, at most - /// one concurrent reader may be active, so no more than one concurrent call to - /// Receive, TryReceive, Scan and/or TryScan may be active. - /// The function to return None if the message is to be skipped - /// or Some if the message is to be processed and removed from the queue. - /// An optional timeout in milliseconds. Defaults to -1 which corresponds - /// to System.Threading.Timeout.Infinite. - /// An asynchronous computation that scanner built off the read message. - member TryScan : scanner:('Msg -> (Async<'T>) option) * ?timeout:int -> Async<'T option> - - /// Starts the agent. - member Start : unit -> unit - - /// Raises a timeout exception if a message not received in this amount of time. By default - /// no timeout is used. - member DefaultTimeout : int with get, set - - /// Occurs when the execution of the agent results in an exception. - [] - member Error : IEvent - - interface System.IDisposable - - /// Returns the number of unprocessed messages in the message queue of the agent. - member CurrentQueueLength : int - - - [] - [] - /// Basic operations on first class event and other observable objects. - module Observable = - - /// Returns an observable for the merged observations from the sources. - /// The returned object propagates success and error values arising - /// from either source and completes when both the sources have completed. - /// - /// For each observer, the registered intermediate observing object is not - /// thread safe. That is, observations arising from the sources must not - /// be triggered concurrently on different threads. - /// The first Observable. - /// The second Observable. - /// An Observable that propagates information from both sources. - [] - val merge: source1:IObservable<'T> -> source2:IObservable<'T> -> IObservable<'T> - - /// Returns an observable which transforms the observations of the source by the - /// given function. The transformation function is executed once for each - /// subscribed observer. The returned object also propagates error observations - /// arising from the source and completes when the source completes. - /// The function applied to observations from the source. - /// The input Observable. - /// An Observable of the type specified by mapping. - [] - val map: mapping:('T -> 'U) -> source:IObservable<'T> -> IObservable<'U> - - /// Returns an observable which filters the observations of the source - /// by the given function. The observable will see only those observations - /// for which the predicate returns true. The predicate is executed once for - /// each subscribed observer. The returned object also propagates error - /// observations arising from the source and completes when the source completes. - /// The function to apply to observations to determine if it should - /// be kept. - /// The input Observable. - /// An Observable that filters observations based on filter. - [] - val filter: predicate:('T -> bool) -> source:IObservable<'T> -> IObservable<'T> - - /// Returns two observables which partition the observations of the source by - /// the given function. The first will trigger observations for those values - /// for which the predicate returns true. The second will trigger observations - /// for those values where the predicate returns false. The predicate is - /// executed once for each subscribed observer. Both also propagate all error - /// observations arising from the source and each completes when the source - /// completes. - /// The function to determine which output Observable will trigger - /// a particular observation. - /// The input Observable. - /// A tuple of Observables. The first triggers when the predicate returns true, and - /// the second triggers when the predicate returns false. - [] - val partition: predicate:('T -> bool) -> source:IObservable<'T> -> (IObservable<'T> * IObservable<'T>) - - /// Returns two observables which split the observations of the source by the - /// given function. The first will trigger observations x for which the - /// splitter returns Choice1Of2 x. The second will trigger observations - /// y for which the splitter returns Choice2Of2 y The splitter is - /// executed once for each subscribed observer. Both also propagate error - /// observations arising from the source and each completes when the source - /// completes. - /// The function that takes an observation an transforms - /// it into one of the two output Choice types. - /// The input Observable. - /// A tuple of Observables. The first triggers when splitter returns Choice1of2 - /// and the second triggers when splitter returns Choice2of2. - [] - val split: splitter:('T -> Choice<'U1,'U2>) -> source:IObservable<'T> -> (IObservable<'U1> * IObservable<'U2>) - - /// Returns an observable which chooses a projection of observations from the source - /// using the given function. The returned object will trigger observations x - /// for which the splitter returns Some x. The returned object also propagates - /// all errors arising from the source and completes when the source completes. - /// The function that returns Some for observations to be propagated - /// and None for observations to ignore. - /// The input Observable. - /// An Observable that only propagates some of the observations from the source. - [] - val choose: chooser:('T -> 'U option) -> source:IObservable<'T> -> IObservable<'U> - - /// Returns an observable which, for each observer, allocates an item of state - /// and applies the given accumulating function to successive values arising from - /// the input. The returned object will trigger observations for each computed - /// state value, excluding the initial value. The returned object propagates - /// all errors arising from the source and completes when the source completes. - /// - /// For each observer, the registered intermediate observing object is not thread safe. - /// That is, observations arising from the source must not be triggered concurrently - /// on different threads. - /// The function to update the state with each observation. - /// The initial state. - /// The input Observable. - /// An Observable that triggers on the updated state values. - [] - val scan: collector:('U -> 'T -> 'U) -> state:'U -> source:IObservable<'T> -> IObservable<'U> - - /// Creates an observer which permanently subscribes to the given observable and which calls - /// the given function for each observation. - /// The function to be called on each observation. - /// The input Observable. - [] - val add : callback:('T -> unit) -> source:IObservable<'T> -> unit - - /// Creates an observer which subscribes to the given observable and which calls - /// the given function for each observation. - /// The function to be called on each observation. - /// The input Observable. - /// An object that will remove the callback if disposed. - [] - val subscribe : callback:('T -> unit) -> source:IObservable<'T> -> System.IDisposable - - /// Returns a new observable that triggers on the second and subsequent triggerings of the input observable. - /// The Nth triggering of the input observable passes the arguments from the N-1th and Nth triggering as - /// a pair. The argument passed to the N-1th triggering is held in hidden internal state until the - /// Nth triggering occurs. - /// - /// For each observer, the registered intermediate observing object is not thread safe. - /// That is, observations arising from the source must not be triggered concurrently - /// on different threads. - /// The input Observable. - /// An Observable that triggers on successive pairs of observations from the input Observable. - [] - val pairwise: source:IObservable<'T> -> IObservable<'T * 'T> - - [] - [] - module Event = - - /// Fires the output event when either of the input events fire. - /// The first input event. - /// The second input event. - /// An event that fires when either of the input events fire. - [] - val merge: event1:IEvent<'Del1,'T> -> event2:IEvent<'Del2,'T> -> IEvent<'T> - - /// Returns a new event that passes values transformed by the given function. - /// The function to transform event values. - /// The input event. - /// An event that passes the transformed values. - [] - val map: mapping:('T -> 'U) -> sourceEvent:IEvent<'Del,'T> -> IEvent<'U> - - /// Returns a new event that listens to the original event and triggers the resulting - /// event only when the argument to the event passes the given function. - /// The function to determine which triggers from the event to propagate. - /// The input event. - /// An event that only passes values that pass the predicate. - [] - val filter: predicate:('T -> bool) -> sourceEvent:IEvent<'Del,'T> -> IEvent<'T> - - /// Returns a new event that listens to the original event and triggers the - /// first resulting event if the application of the predicate to the event arguments - /// returned true, and the second event if it returned false. - /// The function to determine which output event to trigger. - /// The input event. - /// A tuple of events. The first is triggered when the predicate evaluates to true - /// and the second when the predicate evaluates to false. - [] - val partition: predicate:('T -> bool) -> sourceEvent:IEvent<'Del,'T> -> (IEvent<'T> * IEvent<'T>) - - /// Returns a new event that listens to the original event and triggers the - /// first resulting event if the application of the function to the event arguments - /// returned a Choice1Of2, and the second event if it returns a Choice2Of2. - /// The function to transform event values into one of two types. - /// The input event. - /// A tuple of events. The first fires whenever splitter evaluates to Choice1of1 and - /// the second fires whenever splitter evaluates to Choice2of2. - [] - val split: splitter:('T -> Choice<'U1,'U2>) -> sourceEvent:IEvent<'Del,'T> -> (IEvent<'U1> * IEvent<'U2>) - - /// Returns a new event which fires on a selection of messages from the original event. - /// The selection function takes an original message to an optional new message. - /// The function to select and transform event values to pass on. - /// The input event. - /// An event that fires only when the chooser returns Some. - [] - val choose: chooser:('T -> 'U option) -> sourceEvent:IEvent<'Del,'T> -> IEvent<'U> - - [] - /// Returns a new event consisting of the results of applying the given accumulating function - /// to successive values triggered on the input event. An item of internal state - /// records the current value of the state parameter. The internal state is not locked during the - /// execution of the accumulation function, so care should be taken that the - /// input IEvent not triggered by multiple threads simultaneously. - /// The function to update the state with each event value. - /// The initial state. - /// The input event. - /// An event that fires on the updated state values. - val scan: collector:('U -> 'T -> 'U) -> state:'U -> sourceEvent:IEvent<'Del,'T> -> IEvent<'U> - - /// Runs the given function each time the given event is triggered. - /// The function to call when the event is triggered. - /// The input event. - [] - val add : callback:('T -> unit) -> sourceEvent:IEvent<'Del,'T> -> unit - - /// Returns a new event that triggers on the second and subsequent triggerings of the input event. - /// The Nth triggering of the input event passes the arguments from the N-1th and Nth triggering as - /// a pair. The argument passed to the N-1th triggering is held in hidden internal state until the - /// Nth triggering occurs. - /// The input event. - /// An event that triggers on pairs of consecutive values passed from the source event. - [] - val pairwise: sourceEvent:IEvent<'Del,'T> -> IEvent<'T * 'T> - - diff --git a/src/fsharp/FSharp.Core/event.fs b/src/fsharp/FSharp.Core/event.fs index 19b94a36697..4489c325d5a 100644 --- a/src/fsharp/FSharp.Core/event.fs +++ b/src/fsharp/FSharp.Core/event.fs @@ -147,5 +147,3 @@ namespace Microsoft.FSharp.Control (e :?> IEvent<_,_>).AddHandler(h) { new System.IDisposable with member x.Dispose() = (e :?> IEvent<_,_>).RemoveHandler(h) } } - - diff --git a/src/fsharp/FSharp.Core/event.fsi b/src/fsharp/FSharp.Core/event.fsi index 2ade4ac205c..23bc85ceea6 100644 --- a/src/fsharp/FSharp.Core/event.fsi +++ b/src/fsharp/FSharp.Core/event.fsi @@ -8,7 +8,6 @@ namespace Microsoft.FSharp.Control open Microsoft.FSharp.Control open Microsoft.FSharp.Collections - /// Event implementations for an arbitrary type of delegate. [] type DelegateEvent<'Delegate when 'Delegate :> System.Delegate> = @@ -21,7 +20,6 @@ namespace Microsoft.FSharp.Control /// Publishes the event as a first class event value. member Publish : IDelegateEvent<'Delegate> - /// Event implementations for a delegate types following the standard .NET Framework convention of a first 'sender' argument. [] type Event<'Delegate,'Args when 'Delegate : delegate<'Args,unit> and 'Delegate :> System.Delegate > = diff --git a/src/fsharp/FSharp.Core/eventmodule.fs b/src/fsharp/FSharp.Core/eventmodule.fs new file mode 100644 index 00000000000..da359843d5c --- /dev/null +++ b/src/fsharp/FSharp.Core/eventmodule.fs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace Microsoft.FSharp.Control + + open Microsoft.FSharp.Core + open Microsoft.FSharp.Control + + [] + [] + module Event = + [] + let create<'T>() = + let ev = new Event<'T>() + ev.Trigger, ev.Publish + + [] + let map mapping (sourceEvent: IEvent<'Delegate,'T>) = + let ev = new Event<_>() + sourceEvent.Add(fun x -> ev.Trigger(mapping x)); + ev.Publish + + [] + let filter predicate (sourceEvent: IEvent<'Delegate,'T>) = + let ev = new Event<_>() + sourceEvent.Add(fun x -> if predicate x then ev.Trigger x); + ev.Publish + + [] + let partition predicate (sourceEvent: IEvent<'Delegate,'T>) = + let ev1 = new Event<_>() + let ev2 = new Event<_>() + sourceEvent.Add(fun x -> if predicate x then ev1.Trigger x else ev2.Trigger x); + ev1.Publish,ev2.Publish + + [] + let choose chooser (sourceEvent: IEvent<'Delegate,'T>) = + let ev = new Event<_>() + sourceEvent.Add(fun x -> match chooser x with None -> () | Some r -> ev.Trigger r); + ev.Publish + + [] + let scan collector state (sourceEvent: IEvent<'Delegate,'T>) = + let state = ref state + let ev = new Event<_>() + sourceEvent.Add(fun msg -> + let z = !state + let z = collector z msg + state := z; + ev.Trigger(z)); + ev.Publish + + [] + let add callback (sourceEvent: IEvent<'Delegate,'T>) = sourceEvent.Add(callback) + + [] + let pairwise (sourceEvent : IEvent<'Delegate,'T>) : IEvent<'T * 'T> = + let ev = new Event<'T * 'T>() + let lastArgs = ref None + sourceEvent.Add(fun args2 -> + (match !lastArgs with + | None -> () + | Some args1 -> ev.Trigger(args1,args2)) + lastArgs := Some args2) + + ev.Publish + + [] + let merge (event1: IEvent<'Del1,'T>) (event2: IEvent<'Del2,'T>) = + let ev = new Event<_>() + event1.Add(fun x -> ev.Trigger(x)) + event2.Add(fun x -> ev.Trigger(x)) + ev.Publish + + [] + let split (splitter : 'T -> Choice<'U1,'U2>) (sourceEvent: IEvent<'Delegate,'T>) = + let ev1 = new Event<_>() + let ev2 = new Event<_>() + sourceEvent.Add(fun x -> match splitter x with Choice1Of2 y -> ev1.Trigger(y) | Choice2Of2 z -> ev2.Trigger(z)); + ev1.Publish,ev2.Publish + + diff --git a/src/fsharp/FSharp.Core/eventmodule.fsi b/src/fsharp/FSharp.Core/eventmodule.fsi new file mode 100644 index 00000000000..c3f5f3cc9fb --- /dev/null +++ b/src/fsharp/FSharp.Core/eventmodule.fsi @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace Microsoft.FSharp.Control + + open Microsoft.FSharp.Core + open Microsoft.FSharp.Control + + [] + [] + module Event = + + /// Fires the output event when either of the input events fire. + /// The first input event. + /// The second input event. + /// An event that fires when either of the input events fire. + [] + val merge: event1:IEvent<'Del1,'T> -> event2:IEvent<'Del2,'T> -> IEvent<'T> + + /// Returns a new event that passes values transformed by the given function. + /// The function to transform event values. + /// The input event. + /// An event that passes the transformed values. + [] + val map: mapping:('T -> 'U) -> sourceEvent:IEvent<'Del,'T> -> IEvent<'U> + + /// Returns a new event that listens to the original event and triggers the resulting + /// event only when the argument to the event passes the given function. + /// The function to determine which triggers from the event to propagate. + /// The input event. + /// An event that only passes values that pass the predicate. + [] + val filter: predicate:('T -> bool) -> sourceEvent:IEvent<'Del,'T> -> IEvent<'T> + + /// Returns a new event that listens to the original event and triggers the + /// first resulting event if the application of the predicate to the event arguments + /// returned true, and the second event if it returned false. + /// The function to determine which output event to trigger. + /// The input event. + /// A tuple of events. The first is triggered when the predicate evaluates to true + /// and the second when the predicate evaluates to false. + [] + val partition: predicate:('T -> bool) -> sourceEvent:IEvent<'Del,'T> -> (IEvent<'T> * IEvent<'T>) + + /// Returns a new event that listens to the original event and triggers the + /// first resulting event if the application of the function to the event arguments + /// returned a Choice1Of2, and the second event if it returns a Choice2Of2. + /// The function to transform event values into one of two types. + /// The input event. + /// A tuple of events. The first fires whenever splitter evaluates to Choice1of1 and + /// the second fires whenever splitter evaluates to Choice2of2. + [] + val split: splitter:('T -> Choice<'U1,'U2>) -> sourceEvent:IEvent<'Del,'T> -> (IEvent<'U1> * IEvent<'U2>) + + /// Returns a new event which fires on a selection of messages from the original event. + /// The selection function takes an original message to an optional new message. + /// The function to select and transform event values to pass on. + /// The input event. + /// An event that fires only when the chooser returns Some. + [] + val choose: chooser:('T -> 'U option) -> sourceEvent:IEvent<'Del,'T> -> IEvent<'U> + + [] + /// Returns a new event consisting of the results of applying the given accumulating function + /// to successive values triggered on the input event. An item of internal state + /// records the current value of the state parameter. The internal state is not locked during the + /// execution of the accumulation function, so care should be taken that the + /// input IEvent not triggered by multiple threads simultaneously. + /// The function to update the state with each event value. + /// The initial state. + /// The input event. + /// An event that fires on the updated state values. + val scan: collector:('U -> 'T -> 'U) -> state:'U -> sourceEvent:IEvent<'Del,'T> -> IEvent<'U> + + /// Runs the given function each time the given event is triggered. + /// The function to call when the event is triggered. + /// The input event. + [] + val add : callback:('T -> unit) -> sourceEvent:IEvent<'Del,'T> -> unit + + /// Returns a new event that triggers on the second and subsequent triggerings of the input event. + /// The Nth triggering of the input event passes the arguments from the N-1th and Nth triggering as + /// a pair. The argument passed to the N-1th triggering is held in hidden internal state until the + /// Nth triggering occurs. + /// The input event. + /// An event that triggers on pairs of consecutive values passed from the source event. + [] + val pairwise: sourceEvent:IEvent<'Del,'T> -> IEvent<'T * 'T> + + diff --git a/src/fsharp/FSharp.Core/fslib-extra-pervasives.fs b/src/fsharp/FSharp.Core/fslib-extra-pervasives.fs index 25aab8048aa..63cb2d80718 100644 --- a/src/fsharp/FSharp.Core/fslib-extra-pervasives.fs +++ b/src/fsharp/FSharp.Core/fslib-extra-pervasives.fs @@ -40,59 +40,95 @@ module ExtraTopLevelOperators = let inline ICollection_Contains<'collection,'item when 'collection :> ICollection<'item>> (collection:'collection) (item:'item) = collection.Contains item - let inline dictImpl (comparer:IEqualityComparer<'SafeKey>) (makeSafeKey:'Key->'SafeKey) (getKey:'SafeKey->'Key) (l:seq<'Key*'T>) = + [] + [>)>] + type DictImpl<'SafeKey,'Key,'T>(t : Dictionary<'SafeKey,'T>, makeSafeKey : 'Key->'SafeKey, getKey : 'SafeKey->'Key) = + + member x.Count = t.Count + + // Give a read-only view of the dictionary + interface IDictionary<'Key, 'T> with + member s.Item + with get x = dont_tail_call (fun () -> t.[makeSafeKey x]) + and set _ _ = raise (NotSupportedException(SR.GetString(SR.thisValueCannotBeMutated))) + member s.Keys = + let keys = t.Keys + { new ICollection<'Key> with + member s.Add(x) = raise (NotSupportedException(SR.GetString(SR.thisValueCannotBeMutated))); + member s.Clear() = raise (NotSupportedException(SR.GetString(SR.thisValueCannotBeMutated))); + member s.Remove(x) = raise (NotSupportedException(SR.GetString(SR.thisValueCannotBeMutated))); + member s.Contains(x) = t.ContainsKey (makeSafeKey x) + member s.CopyTo(arr,i) = + let mutable n = 0 + for k in keys do + arr.[i+n] <- getKey k + n <- n + 1 + member s.IsReadOnly = true + member s.Count = keys.Count + interface IEnumerable<'Key> with + member s.GetEnumerator() = (keys |> Seq.map getKey).GetEnumerator() + interface System.Collections.IEnumerable with + member s.GetEnumerator() = ((keys |> Seq.map getKey) :> System.Collections.IEnumerable).GetEnumerator() } + + member s.Values = upcast t.Values + member s.Add(_,_) = raise (NotSupportedException(SR.GetString(SR.thisValueCannotBeMutated))) + member s.ContainsKey(k) = dont_tail_call (fun () -> t.ContainsKey(makeSafeKey k)) + member s.TryGetValue(k,r) = + let safeKey = makeSafeKey k + if t.ContainsKey(safeKey) then (r <- t.[safeKey]; true) else false + member s.Remove(_ : 'Key) = (raise (NotSupportedException(SR.GetString(SR.thisValueCannotBeMutated))) : bool) + + interface IReadOnlyDictionary<'Key, 'T> with + member __.Item with get key = t.[makeSafeKey key] + member __.Keys = t.Keys |> Seq.map getKey + member __.TryGetValue(key, r) = + match t.TryGetValue (makeSafeKey key) with + | false, _ -> false + | true, value -> + r <- value + true + member __.Values = (t :> IReadOnlyDictionary<_,_>).Values + member __.ContainsKey k = t.ContainsKey (makeSafeKey k) + + interface ICollection> with + member s.Add(_) = raise (NotSupportedException(SR.GetString(SR.thisValueCannotBeMutated))); + member s.Clear() = raise (NotSupportedException(SR.GetString(SR.thisValueCannotBeMutated))); + member s.Remove(_) = raise (NotSupportedException(SR.GetString(SR.thisValueCannotBeMutated))); + member s.Contains(KeyValue(k,v)) = ICollection_Contains t (KeyValuePair<_,_>(makeSafeKey k,v)) + member s.CopyTo(arr,i) = + let mutable n = 0 + for (KeyValue(k,v)) in t do + arr.[i+n] <- KeyValuePair<_,_>(getKey k,v) + n <- n + 1 + member s.IsReadOnly = true + member s.Count = t.Count + + interface IReadOnlyCollection> with + member __.Count = t.Count + + interface IEnumerable> with + member s.GetEnumerator() = + // We use an array comprehension here instead of seq {} as otherwise we get incorrect + // IEnumerator.Reset() and IEnumerator.Current semantics. + let kvps = [| for (KeyValue (k,v)) in t -> KeyValuePair (getKey k, v) |] :> seq<_> + kvps.GetEnumerator() + + interface System.Collections.IEnumerable with + member s.GetEnumerator() = + // We use an array comprehension here instead of seq {} as otherwise we get incorrect + // IEnumerator.Reset() and IEnumerator.Current semantics. + let kvps = [| for (KeyValue (k,v)) in t -> KeyValuePair (getKey k, v) |] :> System.Collections.IEnumerable + kvps.GetEnumerator() + + and DictDebugView<'SafeKey,'Key,'T>(d:DictImpl<'SafeKey,'Key,'T>) = + [] + member x.Items = Array.ofSeq d + + let inline dictImpl (comparer:IEqualityComparer<'SafeKey>) (makeSafeKey : 'Key->'SafeKey) (getKey : 'SafeKey->'Key) (l:seq<'Key*'T>) = let t = Dictionary comparer - for (k,v) in l do + for (k,v) in l do t.[makeSafeKey k] <- v - // Give a read-only view of the dictionary - { new IDictionary<'Key, 'T> with - member s.Item - with get x = dont_tail_call (fun () -> t.[makeSafeKey x]) - and set x v = raise (NotSupportedException(SR.GetString(SR.thisValueCannotBeMutated))) - member s.Keys = - let keys = t.Keys - { new ICollection<'Key> with - member s.Add(x) = raise (NotSupportedException(SR.GetString(SR.thisValueCannotBeMutated))); - member s.Clear() = raise (NotSupportedException(SR.GetString(SR.thisValueCannotBeMutated))); - member s.Remove(x) = raise (NotSupportedException(SR.GetString(SR.thisValueCannotBeMutated))); - member s.Contains(x) = t.ContainsKey (makeSafeKey x) - member s.CopyTo(arr,i) = - let mutable n = 0 - for k in keys do - arr.[i+n] <- getKey k - n <- n + 1 - member s.IsReadOnly = true - member s.Count = keys.Count - interface IEnumerable<'Key> with - member s.GetEnumerator() = (keys |> Seq.map getKey).GetEnumerator() - interface System.Collections.IEnumerable with - member s.GetEnumerator() = ((keys |> Seq.map getKey) :> System.Collections.IEnumerable).GetEnumerator() } - - member s.Values = upcast t.Values - member s.Add(k,v) = raise (NotSupportedException(SR.GetString(SR.thisValueCannotBeMutated))) - member s.ContainsKey(k) = dont_tail_call (fun () -> t.ContainsKey(makeSafeKey k)) - member s.TryGetValue(k,r) = - let safeKey = makeSafeKey k - if t.ContainsKey(safeKey) then (r <- t.[safeKey]; true) else false - member s.Remove(k : 'Key) = (raise (NotSupportedException(SR.GetString(SR.thisValueCannotBeMutated))) : bool) - interface ICollection> with - member s.Add(x) = raise (NotSupportedException(SR.GetString(SR.thisValueCannotBeMutated))); - member s.Clear() = raise (NotSupportedException(SR.GetString(SR.thisValueCannotBeMutated))); - member s.Remove(x) = raise (NotSupportedException(SR.GetString(SR.thisValueCannotBeMutated))); - member s.Contains(KeyValue(k,v)) = ICollection_Contains t (KeyValuePair<_,_>(makeSafeKey k,v)) - member s.CopyTo(arr,i) = - let mutable n = 0 - for (KeyValue(k,v)) in t do - arr.[i+n] <- KeyValuePair<_,_>(getKey k,v) - n <- n + 1 - member s.IsReadOnly = true - member s.Count = t.Count - interface IEnumerable> with - member s.GetEnumerator() = - (t |> Seq.map (fun (KeyValue(k,v)) -> KeyValuePair<_,_>(getKey k,v))).GetEnumerator() - interface System.Collections.IEnumerable with - member s.GetEnumerator() = - ((t |> Seq.map (fun (KeyValue(k,v)) -> KeyValuePair<_,_>(getKey k,v))) :> System.Collections.IEnumerable).GetEnumerator() } + DictImpl(t, makeSafeKey, getKey) // We avoid wrapping a StructBox, because under 64 JIT we get some "hard" tailcalls which affect performance let dictValueType (l:seq<'Key*'T>) = dictImpl HashIdentity.Structural<'Key> id id l @@ -101,14 +137,24 @@ module ExtraTopLevelOperators = let dictRefType (l:seq<'Key*'T>) = dictImpl RuntimeHelpers.StructBox<'Key>.Comparer (fun k -> RuntimeHelpers.StructBox k) (fun sb -> sb.Value) l [] - let dict (keyValuePairs:seq<'Key*'T>) = + let dict (keyValuePairs:seq<'Key*'T>) : IDictionary<'Key,'T> = +#if FX_RESHAPED_REFLECTION + if (typeof<'Key>).GetTypeInfo().IsValueType +#else + if typeof<'Key>.IsValueType +#endif + then dictValueType keyValuePairs :> _ + else dictRefType keyValuePairs :> _ + + [] + let readOnlyDict (keyValuePairs:seq<'Key*'T>) : IReadOnlyDictionary<'Key,'T> = #if FX_RESHAPED_REFLECTION if (typeof<'Key>).GetTypeInfo().IsValueType #else if typeof<'Key>.IsValueType #endif - then dictValueType keyValuePairs - else dictRefType keyValuePairs + then dictValueType keyValuePairs :> _ + else dictRefType keyValuePairs :> _ let getArray (vals : seq<'T>) = match vals with diff --git a/src/fsharp/FSharp.Core/fslib-extra-pervasives.fsi b/src/fsharp/FSharp.Core/fslib-extra-pervasives.fsi index 6c96eda32a4..6cfbd860c47 100644 --- a/src/fsharp/FSharp.Core/fslib-extra-pervasives.fsi +++ b/src/fsharp/FSharp.Core/fslib-extra-pervasives.fsi @@ -122,6 +122,10 @@ module ExtraTopLevelOperators = [] val dict : keyValuePairs:seq<'Key * 'Value> -> System.Collections.Generic.IDictionary<'Key,'Value> when 'Key : equality + /// Builds a read-only lookup table from a sequence of key/value pairs. The key objects are indexed using generic hashing and equality. + [] + val readOnlyDict : keyValuePairs:seq<'Key * 'Value> -> System.Collections.Generic.IReadOnlyDictionary<'Key,'Value> when 'Key : equality + /// Builds a 2D array from a sequence of sequences of elements. [] val array2D : rows:seq<#seq<'T>> -> 'T[,] diff --git a/src/fsharp/FSharp.Core/list.fs b/src/fsharp/FSharp.Core/list.fs index 45eccc3f3a3..f02ceffcff6 100644 --- a/src/fsharp/FSharp.Core/list.fs +++ b/src/fsharp/FSharp.Core/list.fs @@ -17,6 +17,11 @@ namespace Microsoft.FSharp.Collections [] module List = + let inline checkNonNull argName arg = + match box arg with + | null -> nullArg argName + | _ -> () + let inline indexNotFound() = raise (KeyNotFoundException(SR.GetString(SR.keyNotFoundAlt))) [] @@ -43,6 +48,10 @@ namespace Microsoft.FSharp.Collections let concat lists = Microsoft.FSharp.Primitives.Basics.List.concat lists let inline countByImpl (comparer:IEqualityComparer<'SafeKey>) (projection:'T->'SafeKey) (getKey:'SafeKey->'Key) (list:'T list) = + match list with + | [] -> [] + | _ -> + let dict = Dictionary comparer let rec loop srcList = match srcList with @@ -410,11 +419,8 @@ namespace Microsoft.FSharp.Collections let filter predicate list = Microsoft.FSharp.Primitives.Basics.List.filter predicate list [] - let except itemsToExclude list = - match box itemsToExclude with - | null -> nullArg "itemsToExclude" - | _ -> () - + let except (itemsToExclude: seq<'T>) list = + checkNonNull "itemsToExclude" itemsToExclude match list with | [] -> list | _ -> @@ -665,6 +671,11 @@ namespace Microsoft.FSharp.Collections | [] -> invalidArg "source" LanguagePrimitives.ErrorStrings.InputSequenceEmptyString | _ -> invalidArg "source" (SR.GetString(SR.inputSequenceTooLong)) + [] + let transpose (lists : seq<'T list>) = + checkNonNull "lists" lists + Microsoft.FSharp.Primitives.Basics.List.transpose (ofSeq lists) + [] let truncate count list = Microsoft.FSharp.Primitives.Basics.List.truncate count list diff --git a/src/fsharp/FSharp.Core/list.fsi b/src/fsharp/FSharp.Core/list.fsi index 6ba6f988a2f..d42186e73d9 100644 --- a/src/fsharp/FSharp.Core/list.fsi +++ b/src/fsharp/FSharp.Core/list.fsi @@ -12,7 +12,7 @@ namespace Microsoft.FSharp.Collections [] module List = - /// Returns a new list that contains the cartesian product of the two input lists. + /// Returns a new list that contains all pairings of elements from the first and second lists. /// The first input list. /// The second input list. /// The resulting list of pairs. @@ -782,6 +782,14 @@ namespace Microsoft.FSharp.Collections [] val tryHead: list:'T list -> 'T option + /// Returns the transpose of the given sequence of lists. + /// The input sequence of list. + /// The transposed list. + /// Thrown when the input sequence is null. + /// Thrown when the input lists differ in length. + [] + val transpose: lists:seq<'T list> -> 'T list list + /// Returns at most N elements in a new list. /// The maximum number of items to return. /// The input list. diff --git a/src/fsharp/FSharp.Core/local.fs b/src/fsharp/FSharp.Core/local.fs index 1fe10797cd8..42297795184 100644 --- a/src/fsharp/FSharp.Core/local.fs +++ b/src/fsharp/FSharp.Core/local.fs @@ -79,10 +79,6 @@ open Microsoft.FSharp.Collections open Microsoft.FSharp.Core.Operators open System.Diagnostics.CodeAnalysis open System.Collections.Generic -#if FX_NO_ICLONEABLE -open Microsoft.FSharp.Core.ICloneableExtensions -#else -#endif module internal List = @@ -200,6 +196,10 @@ module internal List = cons let groupBy (comparer:IEqualityComparer<'SafeKey>) (keyf:'T->'SafeKey) (getKey:'SafeKey->'Key) (list: 'T list) = + match list with + | [] -> [] + | _ -> + let dict = Dictionary<_, _ list []> comparer // Build the groupings @@ -685,6 +685,71 @@ module internal List = then cons, (partitionToFreshConsTailLeft cons predicate t) else (partitionToFreshConsTailRight cons predicate t), cons + let rec transposeGetHeadsFreshConsTail headsCons tailsCons list headCount = + match list with + | [] -> + setFreshConsTail headsCons [] + setFreshConsTail tailsCons [] + headCount + | head::tail -> + match head with + | [] -> + setFreshConsTail headsCons [] + setFreshConsTail tailsCons [] + headCount + | h::t -> + let headsCons2 = freshConsNoTail h + setFreshConsTail headsCons headsCons2 + let tailsCons2 = freshConsNoTail t + setFreshConsTail tailsCons tailsCons2 + transposeGetHeadsFreshConsTail headsCons2 tailsCons2 tail (headCount + 1) + + /// Split off the heads of the lists + let transposeGetHeads list = + match list with + | [] -> [],[],0 + | head::tail -> + match head with + | [] -> + let mutable j = 0 + for t in tail do + j <- j + 1 + if not t.IsEmpty then + invalidArgDifferentListLength "list.[0]" (System.String.Format("list.[{0}]", j)) t.Length + [],[],0 + | h::t -> + let headsCons = freshConsNoTail h + let tailsCons = freshConsNoTail t + let headCount = transposeGetHeadsFreshConsTail headsCons tailsCons tail 1 + headsCons, tailsCons, headCount + + /// Append the next element to the transposed list + let rec transposeToFreshConsTail cons list expectedCount = + match list with + | [] -> setFreshConsTail cons [] + | _ -> + match transposeGetHeads list with + | [],_,_ -> + setFreshConsTail cons [] + | heads,tails,headCount -> + if headCount < expectedCount then + invalidArgDifferentListLength (System.String.Format("list.[{0}]", headCount)) "list.[0]" <| tails.[0].Length + 1 + let cons2 = freshConsNoTail heads + setFreshConsTail cons cons2 + transposeToFreshConsTail cons2 tails expectedCount + + /// Build the transposed list + let transpose (list: 'T list list) = + match list with + | [] -> list + | [[]] -> [] + | _ -> + let heads, tails, headCount = transposeGetHeads list + if headCount = 0 then [] else + let cons = freshConsNoTail heads + transposeToFreshConsTail cons tails headCount + cons + let rec truncateToFreshConsTail cons count list = if count = 0 then setFreshConsTail cons [] else match list with @@ -695,12 +760,13 @@ module internal List = truncateToFreshConsTail cons2 (count-1) t let truncate count list = - match list with - | [] -> list - | _ :: ([] as nil) -> if count > 0 then list else nil - | h::t -> - if count <= 0 then [] - else + if count <= 0 then + [] + else + match list with + | [] + | [_] -> list + | h::t -> let cons = freshConsNoTail h truncateToFreshConsTail cons (count-1) t cons diff --git a/src/fsharp/FSharp.Core/local.fsi b/src/fsharp/FSharp.Core/local.fsi index 8ee4bbcdcfa..3181dcbc6ec 100644 --- a/src/fsharp/FSharp.Core/local.fsi +++ b/src/fsharp/FSharp.Core/local.fsi @@ -63,6 +63,7 @@ module internal List = val toArray : 'T list -> 'T[] val inline ofSeq : seq<'T> -> 'T List val splitAt : int -> 'T list -> ('T list * 'T list) + val transpose : 'T list list -> 'T list list val truncate : int -> 'T list -> 'T list module internal Array = diff --git a/src/fsharp/FSharp.Core/mailbox.fs b/src/fsharp/FSharp.Core/mailbox.fs new file mode 100644 index 00000000000..f58a94b6f12 --- /dev/null +++ b/src/fsharp/FSharp.Core/mailbox.fs @@ -0,0 +1,481 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace Microsoft.FSharp.Control + + open System + open System.Threading + open Microsoft.FSharp.Core + open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators + open Microsoft.FSharp.Control + open Microsoft.FSharp.Control.AsyncBuilderImpl + open Microsoft.FSharp.Control.AsyncPrimitives + open Microsoft.FSharp.Collections + + /// We use our own internal implementation of queues to avoid a dependency on System.dll + type Queue<'T>() = + + let mutable array = [| |] + let mutable head = 0 + let mutable size = 0 + let mutable tail = 0 + + let SetCapacity(capacity) = + let destinationArray = Array.zeroCreate capacity + if (size > 0) then + if (head < tail) then + Array.Copy(array, head, destinationArray, 0, size) + + else + Array.Copy(array, head, destinationArray, 0, array.Length - head) + Array.Copy(array, 0, destinationArray, array.Length - head, tail) + array <- destinationArray + head <- 0 + tail <- if (size = capacity) then 0 else size + + member x.Dequeue() = + if (size = 0) then + failwith "Dequeue" + let local = array.[head] + array.[head] <- Unchecked.defaultof<'T> + head <- (head + 1) % array.Length + size <- size - 1 + local + + member this.Enqueue(item) = + if (size = array.Length) then + let capacity = int ((int64 array.Length * 200L) / 100L) + let capacity = max capacity (array.Length + 4) + SetCapacity(capacity) + array.[tail] <- item + tail <- (tail + 1) % array.Length + size <- size + 1 + + member x.Count = size + + + module AsyncHelpers = + + let awaitEither a1 a2 = + async { + let resultCell = new ResultCell<_>() + let! cancellationToken = Async.CancellationToken + let start a f = + Async.StartWithContinuationsUsingDispatchInfo(a, + (fun res -> resultCell.RegisterResult(f res |> AsyncResult.Ok, reuseThread=false) |> ignore), + (fun edi -> resultCell.RegisterResult(edi |> AsyncResult.Error, reuseThread=false) |> ignore), + (fun oce -> resultCell.RegisterResult(oce |> AsyncResult.Canceled, reuseThread=false) |> ignore), + cancellationToken = cancellationToken + ) + start a1 Choice1Of2 + start a2 Choice2Of2 + // Note: It is ok to use "NoDirectCancel" here because the started computations use the same + // cancellation token and will register a cancelled result if cancellation occurs. + // Note: It is ok to use "NoDirectTimeout" here because there is no specific timeout log to this routine. + let! result = resultCell.AwaitResult_NoDirectCancelOrTimeout + return! CreateAsyncResultAsync result + } + + let timeout msec cancellationToken = + assert (msec >= 0) + let resultCell = new ResultCell<_>() + Async.StartWithContinuations( + computation=Async.Sleep(msec), + continuation=(fun () -> resultCell.RegisterResult((), reuseThread = false) |> ignore), + exceptionContinuation=ignore, + cancellationContinuation=ignore, + cancellationToken = cancellationToken) + // Note: It is ok to use "NoDirectCancel" here because the started computations use the same + // cancellation token and will register a cancelled result if cancellation occurs. + // Note: It is ok to use "NoDirectTimeout" here because the child compuation above looks after the timeout. + resultCell.AwaitResult_NoDirectCancelOrTimeout + + [] + [] + type Mailbox<'Msg>(cancellationSupported: bool) = + let mutable inboxStore = null + let mutable arrivals = new Queue<'Msg>() + let syncRoot = arrivals + + // Control elements indicating the state of the reader. When the reader is "blocked" at an + // asynchronous receive, either + // -- "cont" is non-null and the reader is "activated" by re-scheduling cont in the thread pool; or + // -- "pulse" is non-null and the reader is "activated" by setting this event + let mutable savedCont : (bool -> AsyncReturn) option = None + + // Readers who have a timeout use this event + let mutable pulse : AutoResetEvent = null + + // Make sure that the "pulse" value is created + let ensurePulse() = + match pulse with + | null -> + pulse <- new AutoResetEvent(false); + | _ -> + () + pulse + + let waitOneNoTimeoutOrCancellation = + MakeAsync (fun ctxt -> + match savedCont with + | None -> + let descheduled = + // An arrival may have happened while we're preparing to deschedule + lock syncRoot (fun () -> + if arrivals.Count = 0 then + // OK, no arrival so deschedule + savedCont <- Some(fun res -> ctxt.QueueContinuationWithTrampoline(res)) + true + else + false) + if descheduled then + Unchecked.defaultof<_> + else + // If we didn't deschedule then run the continuation immediately + ctxt.CallContinuation true + | Some _ -> + failwith "multiple waiting reader continuations for mailbox") + + let waitOneWithCancellation timeout = + Async.AwaitWaitHandle(ensurePulse(), millisecondsTimeout=timeout) + + let waitOne timeout = + if timeout < 0 && not cancellationSupported then + waitOneNoTimeoutOrCancellation + else + waitOneWithCancellation(timeout) + + member __.inbox = + match inboxStore with + | null -> inboxStore <- new System.Collections.Generic.List<'Msg>(1) + | _ -> () + inboxStore + + member x.CurrentQueueLength = + lock syncRoot (fun () -> x.inbox.Count + arrivals.Count) + + member x.ScanArrivalsUnsafe(f) = + if arrivals.Count = 0 then + None + else + let msg = arrivals.Dequeue() + match f msg with + | None -> + x.inbox.Add(msg) + x.ScanArrivalsUnsafe(f) + | res -> res + + // Lock the arrivals queue while we scan that + member x.ScanArrivals(f) = + lock syncRoot (fun () -> x.ScanArrivalsUnsafe(f)) + + member x.ScanInbox(f,n) = + match inboxStore with + | null -> None + | inbox -> + if n >= inbox.Count + then None + else + let msg = inbox.[n] + match f msg with + | None -> x.ScanInbox (f,n+1) + | res -> inbox.RemoveAt(n); res + + member x.ReceiveFromArrivalsUnsafe() = + if arrivals.Count = 0 then + None + else + Some(arrivals.Dequeue()) + + member x.ReceiveFromArrivals() = + lock syncRoot (fun () -> x.ReceiveFromArrivalsUnsafe()) + + member x.ReceiveFromInbox() = + match inboxStore with + | null -> None + | inbox -> + if inbox.Count = 0 then + None + else + let x = inbox.[0] + inbox.RemoveAt(0) + Some(x) + + member x.Post(msg) = + lock syncRoot (fun () -> + + // Add the message to the arrivals queue + arrivals.Enqueue(msg) + + // Cooperatively unblock any waiting reader. If there is no waiting + // reader we just leave the message in the incoming queue + match savedCont with + | None -> + match pulse with + | null -> + () // no one waiting, leaving the message in the queue is sufficient + | ev -> + // someone is waiting on the wait handle + ev.Set() |> ignore + + | Some action -> + savedCont <- None + action true |> ignore) + + member x.TryScan ((f: 'Msg -> (Async<'T>) option), timeout) : Async<'T option> = + let rec scan timeoutAsync (timeoutCts:CancellationTokenSource) = + async { + match x.ScanArrivals(f) with + | None -> + // Deschedule and wait for a message. When it comes, rescan the arrivals + let! ok = AsyncHelpers.awaitEither waitOneNoTimeoutOrCancellation timeoutAsync + match ok with + | Choice1Of2 true -> + return! scan timeoutAsync timeoutCts + | Choice1Of2 false -> + return failwith "should not happen - waitOneNoTimeoutOrCancellation always returns true" + | Choice2Of2 () -> + lock syncRoot (fun () -> + // Cancel the outstanding wait for messages installed by waitOneWithCancellation + // + // HERE BE DRAGONS. This is bestowed on us because we only support + // a single mailbox reader at any one time. + // If awaitEither returned control because timeoutAsync has terminated, waitOneNoTimeoutOrCancellation + // might still be in-flight. In practical terms, it means that the push-to-async-result-cell + // continuation that awaitEither registered on it is still pending, i.e. it is still in savedCont. + // That continuation is a no-op now, but it is still a registered reader for arriving messages. + // Therefore we just abandon it - a brutal way of canceling. + // This ugly non-compositionality is only needed because we only support a single mailbox reader + // (i.e. the user is not allowed to run several Receive/TryReceive/Scan/TryScan in parallel) - otherwise + // we would just have an extra no-op reader in the queue. + savedCont <- None) + + return None + | Some resP -> + timeoutCts.Cancel() // cancel the timeout watcher + let! res = resP + return Some res + } + let rec scanNoTimeout () = + async { + match x.ScanArrivals(f) with + | None -> + let! ok = waitOne(Timeout.Infinite) + if ok then + return! scanNoTimeout() + else + return (failwith "Timed out with infinite timeout??") + | Some resP -> + let! res = resP + return Some res + } + + // Look in the inbox first + async { + match x.ScanInbox(f,0) with + | None when timeout < 0 -> + return! scanNoTimeout() + | None -> + let! cancellationToken = Async.CancellationToken + let timeoutCts = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken, CancellationToken.None) + let timeoutAsync = AsyncHelpers.timeout timeout timeoutCts.Token + return! scan timeoutAsync timeoutCts + | Some resP -> + let! res = resP + return Some res + } + + member x.Scan((f: 'Msg -> (Async<'T>) option), timeout) = + async { + let! resOpt = x.TryScan(f,timeout) + match resOpt with + | None -> return raise(TimeoutException(SR.GetString(SR.mailboxScanTimedOut))) + | Some res -> return res + } + + member x.TryReceive(timeout) = + let rec processFirstArrival() = + async { + match x.ReceiveFromArrivals() with + | None -> + // Make sure the pulse is created if it is going to be needed. + // If it isn't, then create it, and go back to the start to + // check arrivals again. + match pulse with + | null when timeout >= 0 || cancellationSupported -> + ensurePulse() |> ignore + return! processFirstArrival() + | _ -> + // Wait until we have been notified about a message. When that happens, rescan the arrivals + let! ok = waitOne(timeout) + if ok then + return! processFirstArrival() + else + return None + | res -> return res + } + + // look in the inbox first + async { + match x.ReceiveFromInbox() with + | None -> return! processFirstArrival() + | res -> return res + } + + member x.Receive(timeout) = + + let rec processFirstArrival() = + async { + match x.ReceiveFromArrivals() with + | None -> + // Make sure the pulse is created if it is going to be needed. + // If it isn't, then create it, and go back to the start to + // check arrivals again. + match pulse with + | null when timeout >= 0 || cancellationSupported -> + ensurePulse() |> ignore + return! processFirstArrival() + | _ -> + // Wait until we have been notified about a message. When that happens, rescan the arrivals + let! ok = waitOne(timeout) + if ok then + return! processFirstArrival() + else + return raise(TimeoutException(SR.GetString(SR.mailboxReceiveTimedOut))) + | Some res -> return res + } + + // look in the inbox first + async { + match x.ReceiveFromInbox() with + | None -> return! processFirstArrival() + | Some res -> return res + } + + interface System.IDisposable with + member __.Dispose() = + if isNotNull pulse then (pulse :> IDisposable).Dispose() + +#if DEBUG + member x.UnsafeContents = + (x.inbox,arrivals,pulse,savedCont) |> box +#endif + + + [] + [] + type AsyncReplyChannel<'Reply>(replyf : 'Reply -> unit) = + member x.Reply(value) = replyf(value) + + [] + [] + [] + type MailboxProcessor<'Msg>(body, ?cancellationToken) = + + let cancellationSupported = cancellationToken.IsSome + let cancellationToken = defaultArg cancellationToken Async.DefaultCancellationToken + let mailbox = new Mailbox<'Msg>(cancellationSupported) + let mutable defaultTimeout = Threading.Timeout.Infinite + let mutable started = false + let errorEvent = new Event() + + member __.CurrentQueueLength = mailbox.CurrentQueueLength // nb. unprotected access gives an approximation of the queue length + + member __.DefaultTimeout + with get() = defaultTimeout + and set(v) = defaultTimeout <- v + + [] + member __.Error = errorEvent.Publish + +#if DEBUG + member __.UnsafeMessageQueueContents = mailbox.UnsafeContents +#endif + + member x.Start() = + if started then + raise (new InvalidOperationException(SR.GetString(SR.mailboxProcessorAlreadyStarted))) + else + started <- true + + // Protect the execution and send errors to the event. + // Note that exception stack traces are lost in this design - in an extended design + // the event could propagate an ExceptionDispatchInfo instead of an Exception. + let p = + async { try + do! body x + with exn -> + errorEvent.Trigger exn } + + Async.Start(computation=p, cancellationToken=cancellationToken) + + member __.Post(message) = mailbox.Post(message) + + member __.TryPostAndReply(buildMessage : (_ -> 'Msg), ?timeout) : 'Reply option = + let timeout = defaultArg timeout defaultTimeout + use resultCell = new ResultCell<_>() + let msg = buildMessage (new AsyncReplyChannel<_>(fun reply -> + // Note the ResultCell may have been disposed if the operation + // timed out. In this case RegisterResult drops the result on the floor. + resultCell.RegisterResult(reply,reuseThread=false) |> ignore)) + mailbox.Post(msg) + resultCell.TryWaitForResultSynchronously(timeout=timeout) + + member x.PostAndReply(buildMessage, ?timeout) : 'Reply = + match x.TryPostAndReply(buildMessage,?timeout=timeout) with + | None -> raise (TimeoutException(SR.GetString(SR.mailboxProcessorPostAndReplyTimedOut))) + | Some res -> res + + member __.PostAndTryAsyncReply(buildMessage, ?timeout) : Async<'Reply option> = + let timeout = defaultArg timeout defaultTimeout + let resultCell = new ResultCell<_>() + let msg = buildMessage (new AsyncReplyChannel<_>(fun reply -> + // Note the ResultCell may have been disposed if the operation + // timed out. In this case RegisterResult drops the result on the floor. + resultCell.RegisterResult(reply, reuseThread=false) |> ignore)) + mailbox.Post(msg) + match timeout with + | Threading.Timeout.Infinite when not cancellationSupported -> + async { let! result = resultCell.AwaitResult_NoDirectCancelOrTimeout + return Some result } + + | _ -> + async { use _disposeCell = resultCell + let! ok = Async.AwaitWaitHandle(resultCell.GetWaitHandle(), millisecondsTimeout=timeout) + let res = (if ok then Some(resultCell.GrabResult()) else None) + return res } + + member x.PostAndAsyncReply(buildMessage, ?timeout:int) = + let timeout = defaultArg timeout defaultTimeout + match timeout with + | Threading.Timeout.Infinite when not cancellationSupported -> + // Nothing to dispose, no wait handles used + let resultCell = new ResultCell<_>() + let msg = buildMessage (new AsyncReplyChannel<_>(fun reply -> resultCell.RegisterResult(reply,reuseThread=false) |> ignore)) + mailbox.Post(msg) + resultCell.AwaitResult_NoDirectCancelOrTimeout + | _ -> + let asyncReply = x.PostAndTryAsyncReply(buildMessage,timeout=timeout) + async { let! res = asyncReply + match res with + | None -> return! raise (TimeoutException(SR.GetString(SR.mailboxProcessorPostAndAsyncReplyTimedOut))) + | Some res -> return res } + + member __.Receive(?timeout) = + mailbox.Receive(timeout=defaultArg timeout defaultTimeout) + + member __.TryReceive(?timeout) = + mailbox.TryReceive(timeout=defaultArg timeout defaultTimeout) + + member __.Scan(scanner: 'Msg -> (Async<'T>) option,?timeout) = + mailbox.Scan(scanner,timeout=defaultArg timeout defaultTimeout) + + member __.TryScan(scanner: 'Msg -> (Async<'T>) option,?timeout) = + mailbox.TryScan(scanner,timeout=defaultArg timeout defaultTimeout) + + interface System.IDisposable with + member __.Dispose() = (mailbox :> IDisposable).Dispose() + + static member Start(body,?cancellationToken) = + let mailboxProcessor = new MailboxProcessor<'Msg>(body,?cancellationToken=cancellationToken) + mailboxProcessor.Start() + mailboxProcessor diff --git a/src/fsharp/FSharp.Core/mailbox.fsi b/src/fsharp/FSharp.Core/mailbox.fsi new file mode 100644 index 00000000000..6d818299e06 --- /dev/null +++ b/src/fsharp/FSharp.Core/mailbox.fsi @@ -0,0 +1,162 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace Microsoft.FSharp.Control + + open System.Threading + + open Microsoft.FSharp.Core + open Microsoft.FSharp.Control + + [] + /// A handle to a capability to reply to a PostAndReply message. + type AsyncReplyChannel<'Reply> = + /// Sends a reply to a PostAndReply message. + /// The value to send. + member Reply : value:'Reply -> unit + + /// A message-processing agent which executes an asynchronous computation. + /// + /// The agent encapsulates a message queue that supports multiple-writers and + /// a single reader agent. Writers send messages to the agent by using the Post + /// method and its variations. + /// + /// The agent may wait for messages using the Receive or TryReceive methods or + /// scan through all available messages using the Scan or TryScan method. + [] + type MailboxProcessor<'Msg> = + + /// Creates an agent. The body function is used to generate the asynchronous + /// computation executed by the agent. This function is not executed until + /// Start is called. + /// The function to produce an asynchronous computation that will be executed + /// as the read loop for the MailboxProcessor when Start is called. + /// An optional cancellation token for the body. + /// Defaults to Async.DefaultCancellationToken. + /// The created MailboxProcessor. + new : body:(MailboxProcessor<'Msg> -> Async) * ?cancellationToken: CancellationToken -> MailboxProcessor<'Msg> + + /// Creates and starts an agent. The body function is used to generate the asynchronous + /// computation executed by the agent. + /// The function to produce an asynchronous computation that will be executed + /// as the read loop for the MailboxProcessor when Start is called. + /// An optional cancellation token for the body. + /// Defaults to Async.DefaultCancellationToken. + /// The created MailboxProcessor. + static member Start : body:(MailboxProcessor<'Msg> -> Async) * ?cancellationToken: CancellationToken -> MailboxProcessor<'Msg> + + /// Posts a message to the message queue of the MailboxProcessor, asynchronously. + /// The message to post. + member Post : message:'Msg -> unit + + /// Posts a message to an agent and await a reply on the channel, synchronously. + /// + /// The message is generated by applying buildMessage to a new reply channel + /// to be incorporated into the message. The receiving agent must process this + /// message and invoke the Reply method on this reply channel precisely once. + /// The function to incorporate the AsyncReplyChannel into + /// the message to be sent. + /// An optional timeout parameter (in milliseconds) to wait for a reply message. + /// Defaults to -1 which corresponds to System.Threading.Timeout.Infinite. + /// The reply from the agent. + member PostAndReply : buildMessage:(AsyncReplyChannel<'Reply> -> 'Msg) * ?timeout : int -> 'Reply + + /// Posts a message to an agent and await a reply on the channel, asynchronously. + /// + /// The message is generated by applying buildMessage to a new reply channel + /// to be incorporated into the message. The receiving agent must process this + /// message and invoke the Reply method on this reply channel precisely once. + /// The function to incorporate the AsyncReplyChannel into + /// the message to be sent. + /// An optional timeout parameter (in milliseconds) to wait for a reply message. + /// Defaults to -1 which corresponds to System.Threading.Timeout.Infinite. + /// An asynchronous computation that will wait for the reply from the agent. + member PostAndAsyncReply : buildMessage:(AsyncReplyChannel<'Reply> -> 'Msg) * ?timeout : int -> Async<'Reply> + + /// Like PostAndReply, but returns None if no reply within the timeout period. + /// The function to incorporate the AsyncReplyChannel into + /// the message to be sent. + /// An optional timeout parameter (in milliseconds) to wait for a reply message. + /// Defaults to -1 which corresponds to System.Threading.Timeout.Infinite. + /// The reply from the agent or None if the timeout expires. + member TryPostAndReply : buildMessage:(AsyncReplyChannel<'Reply> -> 'Msg) * ?timeout : int -> 'Reply option + + /// Like AsyncPostAndReply, but returns None if no reply within the timeout period. + /// The function to incorporate the AsyncReplyChannel into + /// the message to be sent. + /// An optional timeout parameter (in milliseconds) to wait for a reply message. + /// Defaults to -1 which corresponds to System.Threading.Timeout.Infinite. + /// An asynchronous computation that will return the reply or None if the timeout expires. + member PostAndTryAsyncReply : buildMessage:(AsyncReplyChannel<'Reply> -> 'Msg) * ?timeout : int -> Async<'Reply option> + + /// Waits for a message. This will consume the first message in arrival order. + /// + /// This method is for use within the body of the agent. + /// + /// This method is for use within the body of the agent. For each agent, at most + /// one concurrent reader may be active, so no more than one concurrent call to + /// Receive, TryReceive, Scan and/or TryScan may be active. + /// An optional timeout in milliseconds. Defaults to -1 which corresponds + /// to System.Threading.Timeout.Infinite. + /// An asynchronous computation that returns the received message. + /// Thrown when the timeout is exceeded. + member Receive : ?timeout:int -> Async<'Msg> + + /// Waits for a message. This will consume the first message in arrival order. + /// + /// This method is for use within the body of the agent. + /// + /// Returns None if a timeout is given and the timeout is exceeded. + /// + /// This method is for use within the body of the agent. For each agent, at most + /// one concurrent reader may be active, so no more than one concurrent call to + /// Receive, TryReceive, Scan and/or TryScan may be active. + /// An optional timeout in milliseconds. Defaults to -1 which + /// corresponds to System.Threading.Timeout.Infinite. + /// An asynchronous computation that returns the received message or + /// None if the timeout is exceeded. + member TryReceive : ?timeout:int -> Async<'Msg option> + + /// Scans for a message by looking through messages in arrival order until scanner + /// returns a Some value. Other messages remain in the queue. + /// + /// Returns None if a timeout is given and the timeout is exceeded. + /// + /// This method is for use within the body of the agent. For each agent, at most + /// one concurrent reader may be active, so no more than one concurrent call to + /// Receive, TryReceive, Scan and/or TryScan may be active. + /// The function to return None if the message is to be skipped + /// or Some if the message is to be processed and removed from the queue. + /// An optional timeout in milliseconds. Defaults to -1 which corresponds + /// to System.Threading.Timeout.Infinite. + /// An asynchronous computation that scanner built off the read message. + /// Thrown when the timeout is exceeded. + member Scan : scanner:('Msg -> (Async<'T>) option) * ?timeout:int -> Async<'T> + + /// Scans for a message by looking through messages in arrival order until scanner + /// returns a Some value. Other messages remain in the queue. + /// + /// This method is for use within the body of the agent. For each agent, at most + /// one concurrent reader may be active, so no more than one concurrent call to + /// Receive, TryReceive, Scan and/or TryScan may be active. + /// The function to return None if the message is to be skipped + /// or Some if the message is to be processed and removed from the queue. + /// An optional timeout in milliseconds. Defaults to -1 which corresponds + /// to System.Threading.Timeout.Infinite. + /// An asynchronous computation that scanner built off the read message. + member TryScan : scanner:('Msg -> (Async<'T>) option) * ?timeout:int -> Async<'T option> + + /// Starts the agent. + member Start : unit -> unit + + /// Raises a timeout exception if a message not received in this amount of time. By default + /// no timeout is used. + member DefaultTimeout : int with get, set + + /// Occurs when the execution of the agent results in an exception. + [] + member Error : IEvent + + interface System.IDisposable + + /// Returns the number of unprocessed messages in the message queue of the agent. + member CurrentQueueLength : int diff --git a/src/fsharp/FSharp.Core/map.fs b/src/fsharp/FSharp.Core/map.fs index fd8012c1707..8efc49a1a41 100644 --- a/src/fsharp/FSharp.Core/map.fs +++ b/src/fsharp/FSharp.Core/map.fs @@ -64,17 +64,18 @@ namespace Microsoft.FSharp.Collections let empty = MapEmpty - let height = function + let height (m: MapTree<'Key, 'Value>) = + match m with | MapEmpty -> 0 | MapOne _ -> 1 | MapNode(_,_,_,_,h) -> h - let isEmpty m = + let isEmpty (m: MapTree<'Key, 'Value>) = match m with | MapEmpty -> true | _ -> false - let mk l k v r = + let mk l k v r : MapTree<'Key, 'Value> = match l,r with | MapEmpty,MapEmpty -> MapOne(k,v) | _ -> @@ -83,7 +84,7 @@ namespace Microsoft.FSharp.Collections let m = if hl < hr then hr else hl MapNode(k,v,l,r,m+1) - let rebalance t1 k v t2 = + let rebalance t1 (k: 'Key) (v: 'Value) t2 = let t1h = height t1 let t2h = height t2 if t2h > t1h + 2 then (* right is heavier than left *) @@ -114,7 +115,7 @@ namespace Microsoft.FSharp.Collections | _ -> failwith "rebalance" else mk t1 k v t2 - let rec add (comparer: IComparer<'Value>) k v m = + let rec add (comparer: IComparer<'Key>) k (v: 'Value) (m: MapTree<'Key, 'Value>) = match m with | MapEmpty -> MapOne(k,v) | MapOne(k2,_) -> @@ -128,36 +129,37 @@ namespace Microsoft.FSharp.Collections elif c = 0 then MapNode(k,v,l,r,h) else rebalance l k2 v2 (add comparer k v r) - let rec find (comparer: IComparer<'Value>) k m = + let rec tryGetValue (comparer: IComparer<'Key>) k (v: byref<'Value>) (m: MapTree<'Key, 'Value>) = match m with - | MapEmpty -> raise (KeyNotFoundException()) + | MapEmpty -> false | MapOne(k2,v2) -> let c = comparer.Compare(k,k2) - if c = 0 then v2 - else raise (KeyNotFoundException()) + if c = 0 then v <- v2; true + else false | MapNode(k2,v2,l,r,_) -> let c = comparer.Compare(k,k2) - if c < 0 then find comparer k l - elif c = 0 then v2 - else find comparer k r + if c < 0 then tryGetValue comparer k &v l + elif c = 0 then v <- v2; true + else tryGetValue comparer k &v r + + let find (comparer: IComparer<'Key>) k (m: MapTree<'Key, 'Value>) = + let mutable v = Unchecked.defaultof<'Value> + if tryGetValue comparer k &v m then + v + else + raise (KeyNotFoundException()) - let rec tryFind (comparer: IComparer<'Value>) k m = - match m with - | MapEmpty -> None - | MapOne(k2,v2) -> - let c = comparer.Compare(k,k2) - if c = 0 then Some v2 - else None - | MapNode(k2,v2,l,r,_) -> - let c = comparer.Compare(k,k2) - if c < 0 then tryFind comparer k l - elif c = 0 then Some v2 - else tryFind comparer k r + let tryFind (comparer: IComparer<'Key>) k (m: MapTree<'Key, 'Value>) = + let mutable v = Unchecked.defaultof<'Value> + if tryGetValue comparer k &v m then + Some v + else + None - let partition1 (comparer: IComparer<'Value>) (f:OptimizedClosures.FSharpFunc<_,_,_>) k v (acc1,acc2) = + let partition1 (comparer: IComparer<'Key>) (f:OptimizedClosures.FSharpFunc<_,_,_>) k v (acc1,acc2) = if f.Invoke(k, v) then (add comparer k v acc1,acc2) else (acc1,add comparer k v acc2) - let rec partitionAux (comparer: IComparer<'Value>) (f:OptimizedClosures.FSharpFunc<_,_,_>) s acc = + let rec partitionAux (comparer: IComparer<'Key>) (f:OptimizedClosures.FSharpFunc<_,_,_>) s acc = match s with | MapEmpty -> acc | MapOne(k,v) -> partition1 comparer f k v acc @@ -166,11 +168,11 @@ namespace Microsoft.FSharp.Collections let acc = partition1 comparer f k v acc partitionAux comparer f l acc - let partition (comparer: IComparer<'Value>) f s = partitionAux comparer (OptimizedClosures.FSharpFunc<_,_,_>.Adapt(f)) s (empty,empty) + let partition (comparer: IComparer<'Key>) f s = partitionAux comparer (OptimizedClosures.FSharpFunc<_,_,_>.Adapt(f)) s (empty,empty) - let filter1 (comparer: IComparer<'Value>) (f:OptimizedClosures.FSharpFunc<_,_,_>) k v acc = if f.Invoke(k, v) then add comparer k v acc else acc + let filter1 (comparer: IComparer<'Key>) (f:OptimizedClosures.FSharpFunc<_,_,_>) k v acc = if f.Invoke(k, v) then add comparer k v acc else acc - let rec filterAux (comparer: IComparer<'Value>) (f:OptimizedClosures.FSharpFunc<_,_,_>) s acc = + let rec filterAux (comparer: IComparer<'Key>) (f:OptimizedClosures.FSharpFunc<_,_,_>) s acc = match s with | MapEmpty -> acc | MapOne(k,v) -> filter1 comparer f k v acc @@ -179,9 +181,9 @@ namespace Microsoft.FSharp.Collections let acc = filter1 comparer f k v acc filterAux comparer f r acc - let filter (comparer: IComparer<'Value>) f s = filterAux comparer (OptimizedClosures.FSharpFunc<_,_,_>.Adapt(f)) s empty + let filter (comparer: IComparer<'Key>) f s = filterAux comparer (OptimizedClosures.FSharpFunc<_,_,_>.Adapt(f)) s empty - let rec spliceOutSuccessor m = + let rec spliceOutSuccessor (m: MapTree<'Key, 'Value>) = match m with | MapEmpty -> failwith "internal error: Map.spliceOutSuccessor" | MapOne(k2,v2) -> k2,v2,MapEmpty @@ -190,7 +192,7 @@ namespace Microsoft.FSharp.Collections | MapEmpty -> k2,v2,r | _ -> let k3,v3,l' = spliceOutSuccessor l in k3,v3,mk l' k2 v2 r - let rec remove (comparer: IComparer<'Value>) k m = + let rec remove (comparer: IComparer<'Key>) k (m: MapTree<'Key, 'Value>) = match m with | MapEmpty -> empty | MapOne(k2,_) -> @@ -208,7 +210,7 @@ namespace Microsoft.FSharp.Collections mk l sk sv r' else rebalance l k2 v2 (remove comparer k r) - let rec mem (comparer: IComparer<'Value>) k m = + let rec mem (comparer: IComparer<'Key>) k (m: MapTree<'Key, 'Value>) = match m with | MapEmpty -> false | MapOne(k2,_) -> (comparer.Compare(k,k2) = 0) @@ -217,7 +219,7 @@ namespace Microsoft.FSharp.Collections if c < 0 then mem comparer k l else (c = 0 || mem comparer k r) - let rec iterOpt (f:OptimizedClosures.FSharpFunc<_,_,_>) m = + let rec iterOpt (f:OptimizedClosures.FSharpFunc<_,_,_>) (m: MapTree<'Key, 'Value>) = match m with | MapEmpty -> () | MapOne(k2,v2) -> f.Invoke(k2, v2) @@ -300,7 +302,7 @@ namespace Microsoft.FSharp.Collections let fold f x m = foldOpt (OptimizedClosures.FSharpFunc<_,_,_,_>.Adapt(f)) x m - let foldSectionOpt (comparer: IComparer<'Value>) lo hi (f:OptimizedClosures.FSharpFunc<_,_,_,_>) m x = + let foldSectionOpt (comparer: IComparer<'Key>) lo hi (f:OptimizedClosures.FSharpFunc<_,_,_,_>) m x = let rec foldFromTo (f:OptimizedClosures.FSharpFunc<_,_,_,_>) m x = match m with | MapEmpty -> x @@ -319,7 +321,7 @@ namespace Microsoft.FSharp.Collections if comparer.Compare(lo,hi) = 1 then x else foldFromTo f m x - let foldSection (comparer: IComparer<'Value>) lo hi f m x = + let foldSection (comparer: IComparer<'Key>) lo hi f m x = foldSectionOpt comparer lo hi (OptimizedClosures.FSharpFunc<_,_,_,_>.Adapt(f)) m x let toList m = @@ -531,6 +533,9 @@ namespace Microsoft.FSharp.Collections member m.Remove(key) : Map<'Key,'Value> = new Map<'Key,'Value>(comparer,MapTree.remove comparer key tree) + member m.TryGetValue(key, [] value:byref<'Value>) = + MapTree.tryGetValue comparer key &value tree + member m.TryFind(key) = #if TRACE_SETS_AND_MAPS MapTree.report() @@ -588,7 +593,7 @@ namespace Microsoft.FSharp.Collections member s.Add(k,v) = ignore(k,v); raise (NotSupportedException(SR.GetString(SR.mapCannotBeMutated))) member s.ContainsKey(k) = s.ContainsKey(k) - member s.TryGetValue(k,r) = if s.ContainsKey(k) then (r <- s.[k]; true) else false + member s.TryGetValue(k,r) = s.TryGetValue(k,&r) member s.Remove(k : 'Key) = ignore(k); (raise (NotSupportedException(SR.GetString(SR.mapCannotBeMutated))) : bool) interface ICollection> with @@ -612,6 +617,16 @@ namespace Microsoft.FSharp.Collections | _ -> invalidArg "obj" (SR.GetString(SR.notComparable)) + interface IReadOnlyCollection> with + member s.Count = s.Count + + interface IReadOnlyDictionary<'Key, 'Value> with + member s.Item with get(key) = s.[key] + member s.Keys = seq { for kvp in s -> kvp.Key } + member s.TryGetValue(key, value:byref<'Value>) = s.TryGetValue(key, &value) + member s.Values = seq { for kvp in s -> kvp.Value } + member s.ContainsKey key = s.ContainsKey key + override x.ToString() = match List.ofSeq (Seq.truncate 4 x) with | [] -> "map []" diff --git a/src/fsharp/FSharp.Core/map.fsi b/src/fsharp/FSharp.Core/map.fsi index 959acd0316f..9a702596a4c 100644 --- a/src/fsharp/FSharp.Core/map.fsi +++ b/src/fsharp/FSharp.Core/map.fsi @@ -56,11 +56,20 @@ namespace Microsoft.FSharp.Collections /// The mapped value, or None if the key is not in the map. member TryFind: key:'Key -> 'Value option + /// Lookup an element in the map, assigning to value if the element is in the domain + /// of the map and returning false if not. + /// The input key. + /// A reference to the output value. + /// true if the value is present, false if not. + member TryGetValue: key:'Key * [] value:byref<'Value> -> bool + interface IDictionary<'Key, 'Value> interface ICollection> interface IEnumerable> interface System.IComparable interface System.Collections.IEnumerable + interface IReadOnlyCollection> + interface IReadOnlyDictionary<'Key,'Value> override Equals : obj -> bool /// Functional programming operators related to the Map<_,_> type. diff --git a/src/fsharp/FSharp.Core/math/z.fs b/src/fsharp/FSharp.Core/math/z.fs index 587c5280a49..1a33c9588f2 100644 --- a/src/fsharp/FSharp.Core/math/z.fs +++ b/src/fsharp/FSharp.Core/math/z.fs @@ -19,8 +19,7 @@ namespace System.Numerics // NOTE: 0 has two repns (+1,0) or (-1,0). [] [] -#if FX_PORTABLE_OR_NETSTANDARD -#else +#if !NETSTANDARD1_6 [] #endif type BigInteger(signInt:int, v : BigNat) = @@ -402,49 +401,6 @@ namespace Microsoft.FSharp.Core if ok then res else -#if FSCORE_PORTABLE_OLD - // SL5 (and therefore Portable Profile47) does not have Parse, so make our own simple implementation - let parse(s : string) = - // ws* sign? digits+ ws* - let mutable i = 0 - // leading whitespace - while i < s.Length && System.Char.IsWhiteSpace(s.[i]) do - i <- i + 1 - if i = s.Length then - raise <| new System.ArgumentException() - // optional sign - let mutable isNegative = false - if s.[i] = '+' then - i <- i + 1 - elif s.[i] = '-' then - isNegative <- true - i <- i + 1 - if i = s.Length then - raise <| new System.ArgumentException() - // digits - let startDigits = i - while i < s.Length && System.Char.IsDigit(s.[i]) do - i <- i + 1 - let endDigits = i - let len = endDigits - startDigits - if len = 0 then - raise <| new System.ArgumentException() - // trailing whitespace - while i < s.Length && System.Char.IsWhiteSpace(s.[i]) do - i <- i + 1 - if i <> s.Length then - raise <| new System.ArgumentException() - // text is now valid, parse it - let mutable r = new System.Numerics.BigInteger(int(s.[startDigits]) - int('0')) - let ten = new System.Numerics.BigInteger(10) - for j in startDigits+1 .. endDigits-1 do - r <- r * ten - r <- r + new System.Numerics.BigInteger(int(s.[j]) - int('0')) - if isNegative then - r <- new System.Numerics.BigInteger(0) - r - r - let v = parse s -#else let v = #if FX_NO_BIGINT BigInteger.Parse s @@ -453,7 +409,6 @@ namespace Microsoft.FSharp.Core BigInteger.Parse (s.[2..],NumberStyles.AllowHexSpecifier,CultureInfo.InvariantCulture) else BigInteger.Parse (s,NumberStyles.AllowLeadingSign,CultureInfo.InvariantCulture) -#endif #endif res <- v tabParse.[s] <- res diff --git a/src/fsharp/FSharp.Core/nativeptr.fs b/src/fsharp/FSharp.Core/nativeptr.fs index bb70928c47c..db9f81bf8a5 100644 --- a/src/fsharp/FSharp.Core/nativeptr.fs +++ b/src/fsharp/FSharp.Core/nativeptr.fs @@ -25,6 +25,14 @@ module NativePtr = [] let inline toNativeInt (address: nativeptr<'T>) = (# "" address : nativeint #) + [] + [] + let inline toVoidPtr (address: nativeptr<'T>) = (# "" address : voidptr #) + + [] + [] + let inline ofVoidPtr (address: voidptr) = (# "" address : nativeptr<'T> #) + [] [] let inline add (address : nativeptr<'T>) (index:int) : nativeptr<'T> = toNativeInt address + nativeint index * (# "sizeof !0" type('T) : nativeint #) |> ofNativeInt @@ -49,3 +57,6 @@ module NativePtr = [] let inline stackalloc (count:int) : nativeptr<'T> = (# "localloc" (count * sizeof<'T>) : nativeptr<'T> #) + [] + [] + let inline toByRef (address: nativeptr<'T>) : byref<'T> = (# "" address : 'T byref #) diff --git a/src/fsharp/FSharp.Core/nativeptr.fsi b/src/fsharp/FSharp.Core/nativeptr.fsi index 0a5b959ff63..db6a6d9e2f0 100644 --- a/src/fsharp/FSharp.Core/nativeptr.fsi +++ b/src/fsharp/FSharp.Core/nativeptr.fsi @@ -19,6 +19,22 @@ namespace Microsoft.FSharp.NativeInterop /// A typed pointer. val inline ofNativeInt : address:nativeint -> nativeptr<'T> + [] + [] + [] + /// Returns an untyped native pointer for a given typed pointer. + /// The pointer address. + /// A typed pointer. + val inline toVoidPtr : address:nativeptr<'T> -> voidptr + + [] + [] + [] + /// Returns a typed native pointer for a untyped native pointer. + /// The untyped pointer. + /// A typed pointer. + val inline ofVoidPtr : voidptr -> nativeptr<'T> + [] [] [] @@ -81,3 +97,11 @@ namespace Microsoft.FSharp.NativeInterop [] [] val inline stackalloc : count:int -> nativeptr<'T> + + /// Converts a given typed native pointer to a managed pointer. + /// The input pointer. + /// The managed pointer. + [] + [] + [] + val inline toByRef : nativeptr<'T> -> byref<'T> diff --git a/src/fsharp/FSharp.Core/observable.fs b/src/fsharp/FSharp.Core/observable.fs new file mode 100644 index 00000000000..75ef1d081b1 --- /dev/null +++ b/src/fsharp/FSharp.Core/observable.fs @@ -0,0 +1,177 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace Microsoft.FSharp.Control + + open System + open Microsoft.FSharp.Core + open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators + open Microsoft.FSharp.Control + + [] + [] + module Observable = + + let inline protect f succeed fail = + match (try Choice1Of2 (f ()) with e -> Choice2Of2 e) with + | Choice1Of2 x -> (succeed x) + | Choice2Of2 e -> (fail e) + + [] + type BasicObserver<'T>() = + + let mutable stopped = false + + abstract Next : value : 'T -> unit + + abstract Error : error : exn -> unit + + abstract Completed : unit -> unit + + interface IObserver<'T> with + + member x.OnNext value = + if not stopped then + x.Next value + + member x.OnError e = + if not stopped then + stopped <- true + x.Error e + + member x.OnCompleted () = + if not stopped then + stopped <- true + x.Completed () + + [] + let map mapping (source: IObservable<'T>) = + { new IObservable<'U> with + member x.Subscribe(observer) = + source.Subscribe + { new BasicObserver<'T>() with + + member x.Next(v) = + protect (fun () -> mapping v) observer.OnNext observer.OnError + + member x.Error(e) = observer.OnError(e) + + member x.Completed() = observer.OnCompleted() } } + + [] + let choose chooser (source: IObservable<'T>) = + { new IObservable<'U> with + member x.Subscribe(observer) = + source.Subscribe + { new BasicObserver<'T>() with + + member x.Next(v) = + protect (fun () -> chooser v) (function None -> () | Some v2 -> observer.OnNext v2) observer.OnError + + member x.Error(e) = observer.OnError(e) + + member x.Completed() = observer.OnCompleted() } } + + [] + let filter predicate (source: IObservable<'T>) = + choose (fun x -> if predicate x then Some x else None) source + + [] + let partition predicate (source: IObservable<'T>) = + filter predicate source, filter (predicate >> not) source + + [] + let scan collector state (source: IObservable<'T>) = + { new IObservable<'U> with + member x.Subscribe(observer) = + let mutable state = state + source.Subscribe + { new BasicObserver<'T>() with + + member x.Next(v) = + let z = state + protect (fun () -> collector z v) (fun z -> + state <- z + observer.OnNext z) observer.OnError + + member x.Error(e) = observer.OnError(e) + + member x.Completed() = observer.OnCompleted() } } + + [] + let add callback (source: IObservable<'T>) = source.Add(callback) + + [] + let subscribe (callback: 'T -> unit) (source: IObservable<'T>) = source.Subscribe(callback) + + [] + let pairwise (source : IObservable<'T>) : IObservable<'T * 'T> = + { new IObservable<_> with + member x.Subscribe(observer) = + let mutable lastArgs = None + source.Subscribe + { new BasicObserver<'T>() with + + member x.Next(args2) = + match lastArgs with + | None -> () + | Some args1 -> observer.OnNext (args1,args2) + lastArgs <- Some args2 + + member x.Error(e) = observer.OnError(e) + + member x.Completed() = observer.OnCompleted() } } + + [] + let merge (source1: IObservable<'T>) (source2: IObservable<'T>) = + { new IObservable<_> with + member x.Subscribe(observer) = + let mutable stopped = false + let mutable completed1 = false + let mutable completed2 = false + let h1 = + source1.Subscribe + { new IObserver<'T> with + member x.OnNext(v) = + if not stopped then + observer.OnNext v + + member x.OnError(e) = + if not stopped then + stopped <- true + observer.OnError(e) + + member x.OnCompleted() = + if not stopped then + completed1 <- true + if completed1 && completed2 then + stopped <- true + observer.OnCompleted() } + let h2 = + source2.Subscribe + { new IObserver<'T> with + member x.OnNext(v) = + if not stopped then + observer.OnNext v + + member x.OnError(e) = + if not stopped then + stopped <- true + observer.OnError(e) + + member x.OnCompleted() = + if not stopped then + completed2 <- true + if completed1 && completed2 then + stopped <- true + observer.OnCompleted() } + + { new IDisposable with + member x.Dispose() = + h1.Dispose() + h2.Dispose() } } + + [] + let split (splitter : 'T -> Choice<'U1,'U2>) (source: IObservable<'T>) = + choose (fun v -> match splitter v with Choice1Of2 x -> Some x | _ -> None) source, + choose (fun v -> match splitter v with Choice2Of2 x -> Some x | _ -> None) source + diff --git a/src/fsharp/FSharp.Core/observable.fsi b/src/fsharp/FSharp.Core/observable.fsi new file mode 100644 index 00000000000..36cbee5700d --- /dev/null +++ b/src/fsharp/FSharp.Core/observable.fsi @@ -0,0 +1,131 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace Microsoft.FSharp.Control + + open System + open Microsoft.FSharp.Core + + [] + [] + /// Basic operations on first class event and other observable objects. + module Observable = + + /// Returns an observable for the merged observations from the sources. + /// The returned object propagates success and error values arising + /// from either source and completes when both the sources have completed. + /// + /// For each observer, the registered intermediate observing object is not + /// thread safe. That is, observations arising from the sources must not + /// be triggered concurrently on different threads. + /// The first Observable. + /// The second Observable. + /// An Observable that propagates information from both sources. + [] + val merge: source1:IObservable<'T> -> source2:IObservable<'T> -> IObservable<'T> + + /// Returns an observable which transforms the observations of the source by the + /// given function. The transformation function is executed once for each + /// subscribed observer. The returned object also propagates error observations + /// arising from the source and completes when the source completes. + /// The function applied to observations from the source. + /// The input Observable. + /// An Observable of the type specified by mapping. + [] + val map: mapping:('T -> 'U) -> source:IObservable<'T> -> IObservable<'U> + + /// Returns an observable which filters the observations of the source + /// by the given function. The observable will see only those observations + /// for which the predicate returns true. The predicate is executed once for + /// each subscribed observer. The returned object also propagates error + /// observations arising from the source and completes when the source completes. + /// The function to apply to observations to determine if it should + /// be kept. + /// The input Observable. + /// An Observable that filters observations based on filter. + [] + val filter: predicate:('T -> bool) -> source:IObservable<'T> -> IObservable<'T> + + /// Returns two observables which partition the observations of the source by + /// the given function. The first will trigger observations for those values + /// for which the predicate returns true. The second will trigger observations + /// for those values where the predicate returns false. The predicate is + /// executed once for each subscribed observer. Both also propagate all error + /// observations arising from the source and each completes when the source + /// completes. + /// The function to determine which output Observable will trigger + /// a particular observation. + /// The input Observable. + /// A tuple of Observables. The first triggers when the predicate returns true, and + /// the second triggers when the predicate returns false. + [] + val partition: predicate:('T -> bool) -> source:IObservable<'T> -> (IObservable<'T> * IObservable<'T>) + + /// Returns two observables which split the observations of the source by the + /// given function. The first will trigger observations x for which the + /// splitter returns Choice1Of2 x. The second will trigger observations + /// y for which the splitter returns Choice2Of2 y The splitter is + /// executed once for each subscribed observer. Both also propagate error + /// observations arising from the source and each completes when the source + /// completes. + /// The function that takes an observation an transforms + /// it into one of the two output Choice types. + /// The input Observable. + /// A tuple of Observables. The first triggers when splitter returns Choice1of2 + /// and the second triggers when splitter returns Choice2of2. + [] + val split: splitter:('T -> Choice<'U1,'U2>) -> source:IObservable<'T> -> (IObservable<'U1> * IObservable<'U2>) + + /// Returns an observable which chooses a projection of observations from the source + /// using the given function. The returned object will trigger observations x + /// for which the splitter returns Some x. The returned object also propagates + /// all errors arising from the source and completes when the source completes. + /// The function that returns Some for observations to be propagated + /// and None for observations to ignore. + /// The input Observable. + /// An Observable that only propagates some of the observations from the source. + [] + val choose: chooser:('T -> 'U option) -> source:IObservable<'T> -> IObservable<'U> + + /// Returns an observable which, for each observer, allocates an item of state + /// and applies the given accumulating function to successive values arising from + /// the input. The returned object will trigger observations for each computed + /// state value, excluding the initial value. The returned object propagates + /// all errors arising from the source and completes when the source completes. + /// + /// For each observer, the registered intermediate observing object is not thread safe. + /// That is, observations arising from the source must not be triggered concurrently + /// on different threads. + /// The function to update the state with each observation. + /// The initial state. + /// The input Observable. + /// An Observable that triggers on the updated state values. + [] + val scan: collector:('U -> 'T -> 'U) -> state:'U -> source:IObservable<'T> -> IObservable<'U> + + /// Creates an observer which permanently subscribes to the given observable and which calls + /// the given function for each observation. + /// The function to be called on each observation. + /// The input Observable. + [] + val add : callback:('T -> unit) -> source:IObservable<'T> -> unit + + /// Creates an observer which subscribes to the given observable and which calls + /// the given function for each observation. + /// The function to be called on each observation. + /// The input Observable. + /// An object that will remove the callback if disposed. + [] + val subscribe : callback:('T -> unit) -> source:IObservable<'T> -> System.IDisposable + + /// Returns a new observable that triggers on the second and subsequent triggerings of the input observable. + /// The Nth triggering of the input observable passes the arguments from the N-1th and Nth triggering as + /// a pair. The argument passed to the N-1th triggering is held in hidden internal state until the + /// Nth triggering occurs. + /// + /// For each observer, the registered intermediate observing object is not thread safe. + /// That is, observations arising from the source must not be triggered concurrently + /// on different threads. + /// The input Observable. + /// An Observable that triggers on successive pairs of observations from the input Observable. + [] + val pairwise: source:IObservable<'T> -> IObservable<'T * 'T> diff --git a/src/fsharp/FSharp.Core/prim-types-prelude.fs b/src/fsharp/FSharp.Core/prim-types-prelude.fs index f06eb19b96b..74c84101707 100644 --- a/src/fsharp/FSharp.Core/prim-types-prelude.fs +++ b/src/fsharp/FSharp.Core/prim-types-prelude.fs @@ -64,8 +64,8 @@ namespace Microsoft.FSharp.Core type array<'T> = 'T[] - type byref<'T> = (# "!0&" #) - type nativeptr<'T when 'T : unmanaged> = (# "native int" #) - type ilsigptr<'T> = (# "!0*" #) + type voidptr = (# "void*" #) + + type ilsigptr<'T> = (# "!0*" #) diff --git a/src/fsharp/FSharp.Core/prim-types-prelude.fsi b/src/fsharp/FSharp.Core/prim-types-prelude.fsi index 9267ab531a6..ed68965bf28 100644 --- a/src/fsharp/FSharp.Core/prim-types-prelude.fsi +++ b/src/fsharp/FSharp.Core/prim-types-prelude.fsi @@ -17,6 +17,7 @@ namespace Microsoft.FSharp.Core /// An abbreviation for the CLI type System.IntPtr. type nativeint = System.IntPtr + /// An abbreviation for the CLI type System.UIntPtr. type unativeint = System.UIntPtr @@ -25,41 +26,52 @@ namespace Microsoft.FSharp.Core /// An abbreviation for the CLI type System.Single. type float32 = System.Single + /// An abbreviation for the CLI type System.Double. type float = System.Double + /// An abbreviation for the CLI type System.Single. type single = System.Single + /// An abbreviation for the CLI type System.Double. type double = System.Double /// An abbreviation for the CLI type System.SByte. type sbyte = System.SByte + /// An abbreviation for the CLI type System.Byte. type byte = System.Byte + /// An abbreviation for the CLI type System.SByte. type int8 = System.SByte + /// An abbreviation for the CLI type System.Byte. type uint8 = System.Byte /// An abbreviation for the CLI type System.Int16. type int16 = System.Int16 + /// An abbreviation for the CLI type System.UInt16. type uint16 = System.UInt16 /// An abbreviation for the CLI type System.Int32. type int32 = System.Int32 + /// An abbreviation for the CLI type System.UInt32. type uint32 = System.UInt32 /// An abbreviation for the CLI type System.Int64. type int64 = System.Int64 + /// An abbreviation for the CLI type System.UInt64. type uint64 = System.UInt64 /// An abbreviation for the CLI type System.Char. type char = System.Char + /// An abbreviation for the CLI type System.Boolean. type bool = System.Boolean + /// An abbreviation for the CLI type System.Decimal. type decimal = System.Decimal @@ -216,10 +228,6 @@ namespace Microsoft.FSharp.Core /// values. type 'T array = 'T[] - - /// Represents a managed pointer in F# code. - type byref<'T> = (# "!0&" #) - /// Represents an unmanaged pointer in F# code. /// /// This type should only be used when writing F# code that interoperates @@ -229,6 +237,15 @@ namespace Microsoft.FSharp.Core /// by the functions in the NativeInterop.NativePtr module. type nativeptr<'T when 'T : unmanaged> = (# "native int" #) + /// Represents an untyped unmanaged pointer in F# code. + /// + /// This type should only be used when writing F# code that interoperates + /// with native code. Use of this type in F# code may result in + /// unverifiable code being generated. Conversions to and from the + /// nativeint type may be required. Values of this type can be generated + /// by the functions in the NativeInterop.NativePtr module. + type voidptr = (# "void*" #) + /// This type is for internal use by the F# code generator. type ilsigptr<'T> = (# "!0*" #) diff --git a/src/fsharp/FSharp.Core/prim-types.fs b/src/fsharp/FSharp.Core/prim-types.fs index 36ae18b7ae0..753a75204dc 100644 --- a/src/fsharp/FSharp.Core/prim-types.fs +++ b/src/fsharp/FSharp.Core/prim-types.fs @@ -20,11 +20,6 @@ namespace Microsoft.FSharp.Core open System.Reflection open System.Text - - //------------------------------------------------------------------------- - // Unit - - [] // No op_equality on unit type Unit() = override x.GetHashCode() = 0 override x.Equals(obj:obj) = @@ -34,19 +29,6 @@ namespace Microsoft.FSharp.Core and unit = Unit - -namespace Microsoft.FSharp.Core - - open System - open System.Collections - open System.Collections.Generic - open System.Diagnostics - open System.Globalization - open System.Text - - //------------------------------------------------------------------------- - // enumerations - type SourceConstructFlags = | None = 0 | SumType = 1 @@ -66,22 +48,11 @@ namespace Microsoft.FSharp.Core | None = 0 | Static = 1 | Instance = 2 - | ModuleSuffix = 4 // append 'Module' to the end of a non-unique module - | UseNullAsTrueValue = 8 // Note if you change this then change CompilationRepresentationFlags_PermitNull further below + /// append 'Module' to the end of a non-unique module + | ModuleSuffix = 4 + | UseNullAsTrueValue = 8 | Event = 16 -#if FX_NO_ICLONEABLE - module ICloneableExtensions = - type System.Array with - member x.Clone() = - let ty = (x.GetType()).GetElementType() - let clone = System.Array.CreateInstance(ty,x.Length) - x.CopyTo(clone,0) - clone - - open ICloneableExtensions -#endif - [] type SealedAttribute(value:bool) = inherit System.Attribute() @@ -337,12 +308,12 @@ namespace Microsoft.FSharp.Core [] type OptionalArgumentAttribute() = inherit System.Attribute() - + [] [] type GeneralizableValueAttribute() = inherit System.Attribute() - + [] [] type RequiresExplicitTypeArgumentsAttribute() = @@ -352,7 +323,7 @@ namespace Microsoft.FSharp.Core [] type RequireQualifiedAccessAttribute() = inherit System.Attribute() - + [] [] type AutoOpenAttribute(path:string) = @@ -360,6 +331,14 @@ namespace Microsoft.FSharp.Core member x.Path = path new() = AutoOpenAttribute("") + /// This Attribute is used to make Value bindings like + /// let x = some code + /// operate like static properties. + [] + [] + type ValueAsStaticPropertyAttribute() = + inherit System.Attribute() + [] type float<[] 'Measure> = float [] type float32<[] 'Measure> = float32 [] type decimal<[] 'Measure> = decimal @@ -368,6 +347,33 @@ namespace Microsoft.FSharp.Core [] type int16<[] 'Measure> = int16 [] type int64<[] 'Measure> = int64 + /// Represents a managed pointer in F# code. + type byref<'T> = (# "!0&" #) + + /// Represents a managed pointer in F# code. + type byref<'T, 'Kind> = (# "!0&" #) + + /// Represents the types of byrefs in F# 4.5+ + module ByRefKinds = + + /// Represents a byref that can be written + [] + type Out() = class end + + /// Represents a byref that can be read + [] + type In() = class end + + /// Represents a byref that can be both read and written + [] + type InOut = class end + + /// Represents a in-argument or readonly managed pointer in F# code. This type should only be used with F# 4.5+. + type inref<'T> = byref<'T, ByRefKinds.In> + + /// Represents a out-argument managed pointer in F# code. This type should only be used with F# 4.5+. + type outref<'T> = byref<'T, ByRefKinds.Out> + #if FX_RESHAPED_REFLECTION module PrimReflectionAdapters = @@ -463,8 +469,6 @@ namespace Microsoft.FSharp.Core module TupleUtils = - open BasicInlinedOperations - // adapted from System.Tuple::CombineHashCodes let inline mask (n:int) (m:int) = (# "and" n m : int #) let inline opshl (x:int) (n:int) : int = (# "shl" x (mask n 31) : int #) @@ -490,18 +494,6 @@ namespace Microsoft.FSharp.Core combineTupleHashes (get codes 0) (get codes 1) -namespace Microsoft.FSharp.Core - - open System - open System.Collections - open System.Collections.Generic - open System.Diagnostics - open System.Globalization - open System.Linq - open System.Text - open Microsoft.FSharp.Core - open Microsoft.FSharp.Core.BasicInlinedOperations - //------------------------------------------------------------------------- // The main aim here is to bootstrap the definition of structural hashing // and comparison. Calls to these form part of the auto-generated @@ -510,14 +502,23 @@ namespace Microsoft.FSharp.Core module LanguagePrimitives = module (* internal *) ErrorStrings = - // inline functions cannot call GetString, so we must make these bits public + // inline functions cannot call GetString, so we must make these bits public + [] let AddressOpNotFirstClassString = SR.GetString(SR.addressOpNotFirstClass) + + [] let NoNegateMinValueString = SR.GetString(SR.noNegateMinValue) + // needs to be public to be visible from inline function 'average' and others + [] let InputSequenceEmptyString = SR.GetString(SR.inputSequenceEmpty) + // needs to be public to be visible from inline function 'average' and others + [] let InputArrayEmptyString = SR.GetString(SR.arrayWasEmpty) + // needs to be public to be visible from inline function 'average' and others + [] let InputMustBeNonNegativeString = SR.GetString(SR.inputMustBeNonNegative) [] // nested module OK @@ -537,10 +538,10 @@ namespace Microsoft.FSharp.Core // Byref usage checks prohibit type instantiations involving byrefs. [] - let inline (~&) (obj : 'T) : 'T byref = + let inline (~&) (obj : 'T) : byref<'T> = ignore obj // pretend the variable is used let e = new System.ArgumentException(ErrorStrings.AddressOpNotFirstClassString) - (# "throw" (e :> System.Exception) : 'T byref #) + (# "throw" (e :> System.Exception) : byref<'T> #) [] let inline (~&&) (obj : 'T) : nativeptr<'T> = @@ -961,11 +962,11 @@ namespace Microsoft.FSharp.Core let c = int64Order lenx1 leny1 if c <> 0 then c else let basex0 = int64 (x.GetLowerBound(0)) - let basex1 = int64 (x.GetLowerBound(1)) let basey0 = int64 (y.GetLowerBound(0)) - let basey1 = int64 (y.GetLowerBound(1)) let c = int64Order basex0 basey0 if c <> 0 then c else + let basex1 = int64 (x.GetLowerBound(1)) + let basey1 = int64 (y.GetLowerBound(1)) let c = int64Order basex1 basey1 if c <> 0 then c else let rec check0 i = @@ -1575,15 +1576,15 @@ namespace Microsoft.FSharp.Core when 'T : nativeint = (# "ceq" x y : bool #) when 'T : unativeint = (# "ceq" x y : bool #) when 'T : float = - if not (# "ceq" x x : bool #) && not (# "ceq" y y : bool #) then + if (# "ceq" x y : bool #) then true else - (# "ceq" x y : bool #) + not (# "ceq" x x : bool #) && not (# "ceq" y y : bool #) when 'T : float32 = - if not (# "ceq" x x : bool #) && not (# "ceq" y y : bool #) then + if (# "ceq" x y : bool #) then true else - (# "ceq" x y : bool #) + not (# "ceq" x x : bool #) && not (# "ceq" y y : bool #) when 'T : char = (# "ceq" x y : bool #) when 'T : string = System.String.Equals((# "" x : string #),(# "" y : string #)) when 'T : decimal = System.Decimal.op_Equality((# "" x:decimal #), (# "" y:decimal #)) @@ -2188,6 +2189,7 @@ namespace Microsoft.FSharp.Core let FloatComparer = MakeGenericComparer() let Float32Comparer = MakeGenericComparer() let DecimalComparer = MakeGenericComparer() + let BoolComparer = MakeGenericComparer() /// Use a type-indexed table to ensure we only create a single FastStructuralComparison function /// for each type @@ -2225,6 +2227,7 @@ namespace Microsoft.FSharp.Core | ty when ty.Equals(typeof) -> null | ty when ty.Equals(typeof) -> null | ty when ty.Equals(typeof) -> unboxPrim (box StringComparer) + | ty when ty.Equals(typeof) -> null | _ -> MakeGenericComparer<'T>() static let f : System.Collections.Generic.IComparer<'T> = @@ -2244,6 +2247,7 @@ namespace Microsoft.FSharp.Core | ty when ty.Equals(typeof) -> unboxPrim (box Float32Comparer) | ty when ty.Equals(typeof) -> unboxPrim (box DecimalComparer) | ty when ty.Equals(typeof) -> unboxPrim (box StringComparer) + | ty when ty.Equals(typeof) -> unboxPrim (box BoolComparer) | _ -> // Review: There are situations where we should be able // to return System.Collections.Generic.Comparer<'T>.Default here. @@ -2790,17 +2794,17 @@ namespace Microsoft.FSharp.Core // Function Values [] - type FSharpTypeFunc() = + type FSharpTypeFunc [] () = abstract Specialize<'T> : unit -> obj [] - type FSharpFunc<'T,'Res>() = + type FSharpFunc<'T,'Res> [] () = abstract Invoke : 'T -> 'Res module OptimizedClosures = [] - type FSharpFunc<'T,'U,'V>() = + type FSharpFunc<'T,'U,'V> [] () = inherit FSharpFunc<'T,('U -> 'V)>() abstract Invoke : 'T * 'U -> 'V override f.Invoke(t) = (fun u -> f.Invoke(t,u)) @@ -2813,7 +2817,7 @@ namespace Microsoft.FSharp.Core member x.Invoke(t,u) = (retype func : FSharpFunc<'T,FSharpFunc<'U,'V>>).Invoke(t).Invoke(u) } [] - type FSharpFunc<'T,'U,'V,'W>() = + type FSharpFunc<'T,'U,'V,'W> [] () = inherit FSharpFunc<'T,('U -> 'V -> 'W)>() abstract Invoke : 'T * 'U * 'V -> 'W override f.Invoke(t) = (fun u v -> f.Invoke(t,u,v)) @@ -2831,7 +2835,7 @@ namespace Microsoft.FSharp.Core member x.Invoke(t,u,v) = (retype func : FSharpFunc<'T,('U -> 'V -> 'W)>).Invoke(t) u v } [] - type FSharpFunc<'T,'U,'V,'W,'X>() = + type FSharpFunc<'T,'U,'V,'W,'X> [] () = inherit FSharpFunc<'T,('U -> 'V -> 'W -> 'X)>() abstract Invoke : 'T * 'U * 'V * 'W -> 'X static member Adapt(func : 'T -> 'U -> 'V -> 'W -> 'X) = @@ -2854,7 +2858,7 @@ namespace Microsoft.FSharp.Core override f.Invoke(t) = (fun u v w -> f.Invoke(t,u,v,w)) [] - type FSharpFunc<'T,'U,'V,'W,'X,'Y>() = + type FSharpFunc<'T,'U,'V,'W,'X,'Y> [] () = inherit FSharpFunc<'T,('U -> 'V -> 'W -> 'X -> 'Y)>() abstract Invoke : 'T * 'U * 'V * 'W * 'X -> 'Y override f.Invoke(t) = (fun u v w x -> f.Invoke(t,u,v,w,x)) @@ -2910,40 +2914,82 @@ namespace Microsoft.FSharp.Core type FSharpFunc<'T,'Res> with -#if FX_NO_CONVERTER + + // Note: this is not made public in the signature, because of conflicts with the Converter overload. + // The method remains in case someone is calling it via reflection. [] - static member op_Implicit (func : System.Func<_,_>) : ('T -> 'Res) = (fun t -> func.Invoke(t)) + static member op_Implicit(converter : System.Func<_,_>) : ('T -> 'Res) = (fun t -> converter.Invoke(t)) + + // Note: this is not made public in the signature, because of conflicts with the Converter overload. + // The method remains in case someone is calling it via reflection. [] - static member op_Implicit (func : ('T -> 'Res) ) = new System.Func<'T,'Res>(func) -#else + static member op_Implicit(func : ('T -> 'Res) ) = new System.Func<'T,'Res>(func) + +#if !FX_NO_CONVERTER [] - static member op_Implicit (converter : System.Converter<_,_>) : ('T -> 'Res) = (fun t -> converter.Invoke(t)) + static member op_Implicit(f : System.Converter<_,_>) : ('T -> 'Res) = (fun t -> f.Invoke(t)) + [] static member op_Implicit (func : ('T -> 'Res) ) = new System.Converter<'T,'Res>(func) - static member FromConverter (converter : System.Converter<_,_>) : ('T -> 'Res) = (fun t -> converter.Invoke(t)) - static member ToConverter ( func : ('T -> 'Res) ) = new System.Converter<'T,'Res>(func) + static member FromConverter (converter: System.Converter<_,_>) : ('T -> 'Res) = (fun t -> converter.Invoke(t)) + + static member ToConverter (func: ('T -> 'Res) ) = new System.Converter<'T,'Res>(func) #endif - static member InvokeFast (func:FSharpFunc<_,_>, arg1:'T, arg2:'Res) = OptimizedClosures.invokeFast2(func, arg1, arg2) - static member InvokeFast (func:FSharpFunc<_,_>, arg1:'T, arg2:'Res, arg3) = OptimizedClosures.invokeFast3(func, arg1, arg2, arg3) - static member InvokeFast (func:FSharpFunc<_,_>, arg1:'T, arg2:'Res, arg3, arg4) = OptimizedClosures.invokeFast4(func, arg1, arg2, arg3, arg4) - static member InvokeFast (func:FSharpFunc<_,_>, arg1:'T, arg2:'Res, arg3, arg4, arg5) = OptimizedClosures.invokeFast5(func, arg1, arg2, arg3, arg4, arg5) + + static member InvokeFast (func:FSharpFunc<_,_>, arg1: 'T, arg2: 'Res) = OptimizedClosures.invokeFast2(func, arg1, arg2) + + static member InvokeFast (func:FSharpFunc<_,_>, arg1: 'T, arg2: 'Res, arg3) = OptimizedClosures.invokeFast3(func, arg1, arg2, arg3) + + static member InvokeFast (func:FSharpFunc<_,_>, arg1: 'T, arg2: 'Res, arg3, arg4) = OptimizedClosures.invokeFast4(func, arg1, arg2, arg3, arg4) + + static member InvokeFast (func:FSharpFunc<_,_>, arg1: 'T, arg2: 'Res, arg3, arg4, arg5) = OptimizedClosures.invokeFast5(func, arg1, arg2, arg3, arg4, arg5) [] [] type FuncConvert = - static member ToFSharpFunc (action: Action<_>) = (fun t -> action.Invoke(t)) -#if FX_NO_CONVERTER - static member ToFSharpFunc (converter: System.Func<_, _>) = (fun t -> converter.Invoke(t)) -#else - static member ToFSharpFunc (converter: Converter<_,_>) = (fun t -> converter.Invoke(t)) -#endif - static member FuncFromTupled (func:'T1 * 'T2 -> 'Res) = (fun a b -> func (a, b)) - static member FuncFromTupled (func:'T1 * 'T2 * 'T3 -> 'Res) = (fun a b c -> func (a, b, c)) - static member FuncFromTupled (func:'T1 * 'T2 * 'T3 * 'T4 -> 'Res) = (fun a b c d -> func (a, b, c, d)) - static member FuncFromTupled (func:'T1 * 'T2 * 'T3 * 'T4 * 'T5 -> 'Res) = (fun a b c d e-> func (a, b, c, d, e)) + static member inline ToFSharpFunc (action: Action<_>) = (fun t -> action.Invoke(t)) + +#if !FX_NO_CONVERTER + static member inline ToFSharpFunc (converter : Converter<_,_>) = (fun t -> converter.Invoke(t)) +#endif + + // Note: this is not made public in the signature, because of conflicts with the Converter overload. + // The method remains in case someone is calling it via reflection. + static member inline ToFSharpFunc (converter: System.Func<_, _>) = (fun t -> converter.Invoke(t)) + + static member inline FromFunc (func: System.Func<_>) = (fun () -> func.Invoke()) + + static member inline FromFunc (func: System.Func<_, _>) = (fun t -> func.Invoke(t)) + + static member inline FromFunc (func: System.Func<_, _, _>) = (fun t1 t2 -> func.Invoke(t1,t2)) + static member inline FromFunc (func: System.Func<_, _, _, _>) = (fun t1 t2 t3 -> func.Invoke(t1,t2,t3)) + + static member inline FromFunc (func: System.Func<_, _, _, _, _>) = (fun t1 t2 t3 t4 -> func.Invoke(t1,t2,t3,t4)) + + static member inline FromFunc (func: System.Func<_, _, _, _, _, _>) = (fun t1 t2 t3 t4 t5 -> func.Invoke(t1,t2,t3,t4,t5)) + + static member inline FromAction (action: System.Action) = (fun () -> action.Invoke()) + + static member inline FromAction (action: System.Action<_>) = (fun t -> action.Invoke(t)) + + static member inline FromAction (action: System.Action<_, _>) = (fun t1 t2 -> action.Invoke(t1,t2)) + + static member inline FromAction (action: System.Action<_, _, _>) = (fun t1 t2 t3 -> action.Invoke(t1,t2,t3)) + + static member inline FromAction (action: System.Action<_, _, _, _>) = (fun t1 t2 t3 t4 -> action.Invoke(t1,t2,t3,t4)) + + static member inline FromAction (action: System.Action<_, _, _, _, _>) = (fun t1 t2 t3 t4 t5 -> action.Invoke(t1,t2,t3,t4,t5)) + + static member inline FuncFromTupled (func: 'T1 * 'T2 -> 'Res) = (fun a b -> func (a, b)) + + static member inline FuncFromTupled (func: 'T1 * 'T2 * 'T3 -> 'Res) = (fun a b c -> func (a, b, c)) + + static member inline FuncFromTupled (func: 'T1 * 'T2 * 'T3 * 'T4 -> 'Res) = (fun a b c d -> func (a, b, c, d)) + + static member inline FuncFromTupled (func: 'T1 * 'T2 * 'T3 * 'T4 * 'T5 -> 'Res) = (fun a b c d e -> func (a, b, c, d, e)) //------------------------------------------------------------------------- // Refs @@ -2998,7 +3044,6 @@ namespace Microsoft.FSharp.Core and 'T option = Option<'T> - [] [] [] @@ -3006,9 +3051,18 @@ namespace Microsoft.FSharp.Core | Ok of ResultValue:'T | Error of ErrorValue:'TError + [] + [] + [] + type ValueOption<'T> = + | ValueNone : 'T voption + | ValueSome : 'T -> 'T voption + + member x.Value = match x with ValueSome x -> x | ValueNone -> raise (new System.InvalidOperationException("ValueOption.Value")) + + + and 'T voption = ValueOption<'T> -//============================================================================ -//============================================================================ namespace Microsoft.FSharp.Collections //------------------------------------------------------------------------- @@ -3034,10 +3088,8 @@ namespace Microsoft.FSharp.Collections | (::) : Head: 'T * Tail: 'T list -> 'T list interface System.Collections.Generic.IEnumerable<'T> interface System.Collections.IEnumerable - -#if !FSCORE_PORTABLE_OLD interface System.Collections.Generic.IReadOnlyCollection<'T> -#endif + interface System.Collections.Generic.IReadOnlyList<'T> and 'T list = List<'T> @@ -3045,30 +3097,35 @@ namespace Microsoft.FSharp.Collections // List (debug view) //------------------------------------------------------------------------- - and + and ListDebugView<'T>(l:list<'T>) = - let ListDebugViewMaxLength = 50 - let rec count l n = - match l with - | [] -> n - | _::t -> if n > ListDebugViewMaxLength then n else count t (n+1) + let ListDebugViewMaxLength = 50 // default displayed Max Length + let ListDebugViewMaxFullLength = 5000 // display only when FullList opened (5000 is a super big display used to cut-off an infinite list or undebuggably huge one) + let rec count l n max = + match l with + | [] -> n + | _::t -> if n > max then n else count t (n+1) max - [] - member x.Items = - let n = count l 0 - let items = zeroCreate n + let items length = + let items = zeroCreate length let rec copy (items: 'T[]) l i = match l with | [] -> () | h::t -> - if i < n then + if i < length then SetArray items i h copy items t (i+1) copy items l 0 items + [] + member x.Items = items (count l 0 ListDebugViewMaxLength) + + [] + member x._FullList = items (count l 0 ListDebugViewMaxFullLength) + type ResizeArray<'T> = System.Collections.Generic.List<'T> //------------------------------------------------------------------------- @@ -3221,10 +3278,11 @@ namespace Microsoft.FSharp.Collections interface System.Collections.IEnumerable with member l.GetEnumerator() = (PrivateListHelpers.mkListEnumerator l :> System.Collections.IEnumerator) -#if !FSCORE_PORTABLE_OLD interface IReadOnlyCollection<'T> with member l.Count = l.Length -#endif + + interface IReadOnlyList<'T> with + member l.Item with get(index) = l.[index] type seq<'T> = IEnumerable<'T> @@ -3252,53 +3310,6 @@ namespace Microsoft.FSharp.Core [] module Operators = - -#if MULTI_DIMENSIONAL_EXTENSION_PROPERTIES - type ``[,]``<'T> with - [] - member arr.Length1 = (# "ldlen.multi 2 0" arr : int #) - [] - member arr.Length2 = (# "ldlen.multi 2 1" arr : int #) - [] - member arr.Base1 = arr.GetLowerBound(0) - [] - member arr.Base2 = arr.GetLowerBound(1) - - - type ``[,,]``<'T> with - [] - member arr.Length1 = (# "ldlen.multi 3 0" arr : int #) - [] - member arr.Length2 = (# "ldlen.multi 3 1" arr : int #) - [] - member arr.Length3 = (# "ldlen.multi 3 2" arr : int #) - [] - member arr.Base1 = arr.GetLowerBound(0) - [] - member arr.Base2 = arr.GetLowerBound(1) - [] - member arr.Base3 = arr.GetLowerBound(2) - - - type ``[,,,]``<'T> with - [] - member arr.Length1 = (# "ldlen.multi 4 0" arr : int #) - [] - member arr.Length2 = (# "ldlen.multi 4 1" arr : int #) - [] - member arr.Length3 = (# "ldlen.multi 4 2" arr : int #) - [] - member arr.Length4 = (# "ldlen.multi 4 3" arr : int #) - [] - member arr.Base1 = arr.GetLowerBound(0) - [] - member arr.Base2 = arr.GetLowerBound(1) - [] - member arr.Base3 = arr.GetLowerBound(2) - [] - member arr.Base4 = arr.GetLowerBound(3) -#endif - [] let seq (sequence: seq<'T>) = sequence @@ -3416,11 +3427,11 @@ namespace Microsoft.FSharp.Core let (^) (s1: string) (s2: string) = System.String.Concat(s1, s2) - [] - [] let defaultArg arg defaultValue = match arg with None -> defaultValue | Some v -> v + [] + let defaultValueArg arg defaultValue = match arg with ValueNone -> defaultValue | ValueSome v -> v [] let inline (~-) (n: ^T) : ^T = @@ -3642,11 +3653,14 @@ namespace Microsoft.FSharp.Core | (h::t) -> match list2 with | [] -> list1 - | _ -> - let res = [h] - let lastCons = PrivateListHelpers.appendToFreshConsTail res t - PrivateListHelpers.setFreshConsTail lastCons list2 - res + | _ -> + match t with + | [] -> h :: list2 + | _ -> + let res = [h] + let lastCons = PrivateListHelpers.appendToFreshConsTail res t + PrivateListHelpers.setFreshConsTail lastCons list2 + res [] let incr cell = cell.contents <- cell.contents + 1 @@ -4160,7 +4174,7 @@ namespace Microsoft.FSharp.Core else (# "ceq" e1 e1 : int #) when ^T : float32 = if (# "clt" e1 e2 : bool #) then (-1) elif (# "cgt" e1 e2 : bool #) then (1) - elif (# "ceq" e1 e2 : bool #) then (1) + elif (# "ceq" e1 e2 : bool #) then (0) elif (# "ceq" e2 e2 : bool #) then (-1) else (# "ceq" e1 e1 : int #) when ^T : char = if (# "clt.un" e1 e2 : bool #) then (-1) else (# "cgt.un" e1 e2 : int #) @@ -4588,18 +4602,7 @@ namespace Microsoft.FSharp.Core when ^T : unativeint = (# "conv.ovf.i.un" value : nativeint #) when ^T : byte = (# "conv.ovf.i.un" value : nativeint #) -#if NAN_INFINITY_MEASURES - module Measure = - - let infinity<[] 'Measure> : float<'Measure> = LanguagePrimitives.FloatWithMeasure System.Double.PositiveInfinity - let nan<[] 'Measure> : float<'Measure> = LanguagePrimitives.FloatWithMeasure System.Double.NaN - - let infinityf<[] 'Measure> : float32<'Measure> = LanguagePrimitives.Float32WithMeasure System.Single.PositiveInfinity - let nanf<[] 'Measure> : float32<'Measure> = LanguagePrimitives.Float32WithMeasure System.Single.NaN -#endif - - module OperatorIntrinsics = begin - + module OperatorIntrinsics = open System.Collections #if FX_RESHAPED_REFLECTION @@ -5502,10 +5505,7 @@ namespace Microsoft.FSharp.Core let TanhDynamic x = TanhDynamicImplTable<_>.Result x let PowDynamic x y = PowDynamicImplTable<_,_>.Result x y - - end open OperatorIntrinsics - let inline (..) (start:^T) (finish:^T) = RangeGeneric (GenericOne< (^T) >) Checked.(+) start finish @@ -5762,153 +5762,19 @@ namespace Microsoft.FSharp.Control namespace Microsoft.FSharp.Control open System - open System.Diagnostics open Microsoft.FSharp.Core type IDelegateEvent<'Delegate when 'Delegate :> System.Delegate > = - [] abstract AddHandler: handler:'Delegate -> unit - [] abstract RemoveHandler: handler:'Delegate -> unit type IEvent<'Delegate,'Args when 'Delegate : delegate<'Args,unit> and 'Delegate :> System.Delegate > = inherit IDelegateEvent<'Delegate> inherit IObservable<'Args> - - - [] [] type Handler<'Args> = delegate of sender:obj * args:'Args -> unit type IEvent<'Args> = IEvent, 'Args> - // FxCop suppressions - open System.Diagnostics.CodeAnalysis - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - - [] - [] - [] - [] - [] - [] - - [] - [] - - [] - [] - [] - [] - [] - [] - [] - [] - [] - - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - - [] - - - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - - - [] - [] do() diff --git a/src/fsharp/FSharp.Core/prim-types.fsi b/src/fsharp/FSharp.Core/prim-types.fsi index 9d3eabf7f70..61786826a20 100644 --- a/src/fsharp/FSharp.Core/prim-types.fsi +++ b/src/fsharp/FSharp.Core/prim-types.fsi @@ -2,118 +2,117 @@ #nowarn "35" // This construct is deprecated: the treatment of this operator is now handled directly by the F# compiler and its meaning may not be redefined. #nowarn "61" // The containing type can use 'null' as a representation value for its nullary union case. This member will be compiled as a static member. -#nowarn "62" // The syntax 'module ... : sig .. end' is for ML compatibility. Consider using 'module ... = begin .. end'. /// Basic F# type definitions, functions and operators namespace Microsoft.FSharp.Core open System - /// The type 'unit', which has only one value "()". This value is special and /// always uses the representation 'null'. type Unit = - interface System.IComparable + interface IComparable /// The type 'unit', which has only one value "()". This value is special and /// always uses the representation 'null'. and unit = Unit - -namespace Microsoft.FSharp.Core - - open System - open System.Collections - /// Indicates the relationship between a compiled entity in a CLI binary and an element in F# source code. type SourceConstructFlags = /// Indicates that the compiled entity has no relationship to an element in F# source code. | None = 0 + /// Indicates that the compiled entity is part of the representation of an F# union type declaration. | SumType = 1 + /// Indicates that the compiled entity is part of the representation of an F# record type declaration. | RecordType = 2 + /// Indicates that the compiled entity is part of the representation of an F# class or other object type declaration. | ObjectType = 3 + /// Indicates that the compiled entity is part of the representation of an F# record or union case field declaration. | Field = 4 + /// Indicates that the compiled entity is part of the representation of an F# exception declaration. | Exception = 5 + /// Indicates that the compiled entity is part of the representation of an F# closure. | Closure = 6 + /// Indicates that the compiled entity is part of the representation of an F# module declaration. | Module = 7 + /// Indicates that the compiled entity is part of the representation of an F# union case declaration. | UnionCase = 8 + /// Indicates that the compiled entity is part of the representation of an F# value declaration. | Value = 9 + /// The mask of values related to the kind of the compiled entity. | KindMask = 31 + /// Indicates that the compiled entity had private or internal representation in F# source code. | NonPublicRepresentation = 32 [] - /// Indicates one or more adjustments to the compiled representation of an F# type or member. + /// Indicates one or more adjustments to the compiled representation of an F# type or member. type CompilationRepresentationFlags = + /// No special compilation representation. | None = 0 + /// Compile an instance member as 'static' . | Static = 1 + /// Compile a member as 'instance' even if null is used as a representation for this type. | Instance = 2 + /// append 'Module' to the end of a module whose name clashes with a type name in the same namespace. | ModuleSuffix = 4 + /// Permit the use of null as a representation for nullary discriminators in a discriminated union. | UseNullAsTrueValue = 8 + /// Compile a property as a CLI event. | Event = 16 -#if FX_NO_ICLONEABLE - module ICloneableExtensions = - type System.Array with - member Clone : unit -> System.Array -#else -#endif - - - //------------------------------------------------------------------------- - // F#-specific Attributes - - /// Adding this attribute to class definition makes it sealed, which means it may not /// be extended or implemented. [] type SealedAttribute = - inherit System.Attribute + inherit Attribute /// Creates an instance of the attribute. /// The created attribute. new : unit -> SealedAttribute - - /// The value of the attribute, indicating whether the type is sealed or not. - member Value: bool + /// Creates an instance of the attribute /// Indicates whether the class is sealed. /// SealedAttribute new : value:bool -> SealedAttribute + + /// The value of the attribute, indicating whether the type is sealed or not. + member Value: bool /// Adding this attribute to class definition makes it abstract, which means it need not /// implement all its methods. Instances of abstract classes may not be constructed directly. [] [] type AbstractClassAttribute = - inherit System.Attribute + inherit Attribute + /// Creates an instance of the attribute /// AbstractClassAttribute new : unit -> AbstractClassAttribute - /// Adding this attribute to the let-binding for the definition of a top-level /// value makes the quotation expression that implements the value available /// for use at runtime. [] [] type ReflectedDefinitionAttribute = - inherit System.Attribute + inherit Attribute + /// Creates an instance of the attribute /// ReflectedDefinitionAttribute new : unit -> ReflectedDefinitionAttribute @@ -138,7 +137,8 @@ namespace Microsoft.FSharp.Core [] [] type EqualityConditionalOnAttribute = - inherit System.Attribute + inherit Attribute + /// Creates an instance of the attribute /// EqualityConditionalOnAttribute new : unit -> EqualityConditionalOnAttribute @@ -155,7 +155,8 @@ namespace Microsoft.FSharp.Core [] [] type ComparisonConditionalOnAttribute = - inherit System.Attribute + inherit Attribute + /// Creates an instance of the attribute /// ComparisonConditionalOnAttribute new : unit -> ComparisonConditionalOnAttribute @@ -164,7 +165,8 @@ namespace Microsoft.FSharp.Core [] [] type StructAttribute = - inherit System.Attribute + inherit Attribute + /// Creates an instance of the attribute /// StructAttribute new : unit -> StructAttribute @@ -174,7 +176,8 @@ namespace Microsoft.FSharp.Core [] [] type MeasureAttribute = - inherit System.Attribute + inherit Attribute + /// Creates an instance of the attribute /// MeasureAttribute new : unit -> MeasureAttribute @@ -184,7 +187,8 @@ namespace Microsoft.FSharp.Core [] [] type MeasureAnnotatedAbbreviationAttribute = - inherit System.Attribute + inherit Attribute + /// Creates an instance of the attribute /// MeasureAnnotatedAbbreviationAttribute new : unit -> MeasureAnnotatedAbbreviationAttribute @@ -193,7 +197,8 @@ namespace Microsoft.FSharp.Core [] [] type InterfaceAttribute = - inherit System.Attribute + inherit Attribute + /// Creates an instance of the attribute /// InterfaceAttribute new : unit -> InterfaceAttribute @@ -202,7 +207,8 @@ namespace Microsoft.FSharp.Core [] [] type ClassAttribute = - inherit System.Attribute + inherit Attribute + /// Creates an instance of the attribute /// ClassAttribute new : unit -> ClassAttribute @@ -213,7 +219,8 @@ namespace Microsoft.FSharp.Core [] [] type AllowNullLiteralAttribute = - inherit System.Attribute + inherit Attribute + /// Creates an instance of the attribute /// AllowNullLiteralAttribute new : unit -> AllowNullLiteralAttribute @@ -229,7 +236,8 @@ namespace Microsoft.FSharp.Core [] [] type LiteralAttribute = - inherit System.Attribute + inherit Attribute + /// Creates an instance of the attribute /// LiteralAttribute new : unit -> LiteralAttribute @@ -240,7 +248,8 @@ namespace Microsoft.FSharp.Core [] [] type CLIEventAttribute = - inherit System.Attribute + inherit Attribute + /// Creates an instance of the attribute /// CLIEventAttribute new : unit -> CLIEventAttribute @@ -250,7 +259,8 @@ namespace Microsoft.FSharp.Core [] [] type CLIMutableAttribute = - inherit System.Attribute + inherit Attribute + /// Creates an instance of the attribute /// CLIMutableAttribute new : unit -> CLIMutableAttribute @@ -261,9 +271,11 @@ namespace Microsoft.FSharp.Core [] [] type DefaultAugmentationAttribute = - inherit System.Attribute + inherit Attribute + /// The value of the attribute, indicating whether the type has a default augmentation or not member Value: bool + /// Creates an instance of the attribute /// Indicates whether to generate helper members on the CLI class representing a discriminated /// union. @@ -275,7 +287,8 @@ namespace Microsoft.FSharp.Core [] [] type VolatileFieldAttribute = - inherit System.Attribute + inherit Attribute + /// Creates an instance of the attribute /// VolatileFieldAttribute new : unit -> VolatileFieldAttribute @@ -286,7 +299,8 @@ namespace Microsoft.FSharp.Core [] [] type EntryPointAttribute = - inherit System.Attribute + inherit Attribute + /// Creates an instance of the attribute /// EntryPointAttribute new : unit -> EntryPointAttribute @@ -297,7 +311,8 @@ namespace Microsoft.FSharp.Core [] [] type ReferenceEqualityAttribute = - inherit System.Attribute + inherit Attribute + /// Creates an instance of the attribute /// ReferenceEqualityAttribute new : unit -> ReferenceEqualityAttribute @@ -308,7 +323,8 @@ namespace Microsoft.FSharp.Core [] [] type StructuralEqualityAttribute = - inherit System.Attribute + inherit Attribute + /// Creates an instance of the attribute /// StructuralEqualityAttribute new : unit -> StructuralEqualityAttribute @@ -318,47 +334,57 @@ namespace Microsoft.FSharp.Core [] [] type StructuralComparisonAttribute = - inherit System.Attribute + inherit Attribute + /// Creates an instance of the attribute /// StructuralComparisonAttribute new : unit -> StructuralComparisonAttribute - [] [] /// Indicates that a member on a computation builder type is a custom query operator, /// and indicates the name of that operator. type CustomOperationAttribute = + inherit Attribute + /// Creates an instance of the attribute /// CustomOperationAttribute new : name:string -> CustomOperationAttribute + /// Get the name of the custom operation when used in a query or other computation expression member Name : string + /// Indicates if the custom operation supports the use of 'into' immediately after the use of the operation in a query or other computation expression to consume the results of the operation member AllowIntoPattern : bool with get,set + /// Indicates if the custom operation is an operation similar to a zip in a sequence computation, supporting two inputs member IsLikeZip : bool with get,set + /// Indicates if the custom operation is an operation similar to a join in a sequence computation, supporting two inputs and a correlation constraint member IsLikeJoin : bool with get,set + /// Indicates if the custom operation is an operation similar to a group join in a sequence computation, supporting two inputs and a correlation constraint, and generating a group member IsLikeGroupJoin : bool with get,set + /// Indicates the name used for the 'on' part of the custom query operator for join-like operators member JoinConditionWord : string with get,set + /// Indicates if the custom operation maintains the variable space of the query of computation expression member MaintainsVariableSpace : bool with get,set + /// Indicates if the custom operation maintains the variable space of the query of computation expression through the use of a bind operation member MaintainsVariableSpaceUsingBind : bool with get,set - inherit System.Attribute [] [] /// Indicates that, when a custom operator is used in a computation expression, /// a parameter is automatically parameterized by the variable space of the computation expression type ProjectionParameterAttribute = + /// Creates an instance of the attribute /// ProjectionParameterAttribute new : unit -> ProjectionParameterAttribute - inherit System.Attribute + inherit Attribute /// Adding this attribute to a type indicates it is a type where equality is an abnormal operation. /// This means that the type does not satisfy the F# 'equality' constraint. Within the bounds of the @@ -368,17 +394,18 @@ namespace Microsoft.FSharp.Core [] [] type NoEqualityAttribute = - inherit System.Attribute + inherit Attribute + /// Creates an instance of the attribute /// NoEqualityAttribute new : unit -> NoEqualityAttribute - /// Adding this attribute to a type indicates it is a type with a user-defined implementation of equality. [] [] type CustomEqualityAttribute = - inherit System.Attribute + inherit Attribute + /// Creates an instance of the attribute /// CustomEqualityAttribute new : unit -> CustomEqualityAttribute @@ -387,12 +414,12 @@ namespace Microsoft.FSharp.Core [] [] type CustomComparisonAttribute = - inherit System.Attribute + inherit Attribute + /// Creates an instance of the attribute /// CustomComparisonAttribute new : unit -> CustomComparisonAttribute - /// Adding this attribute to a type indicates it is a type where comparison is an abnormal operation. /// This means that the type does not satisfy the F# 'comparison' constraint. Within the bounds of the /// F# type system, this helps ensure that the F# generic comparison function is not instantiated directly @@ -401,24 +428,27 @@ namespace Microsoft.FSharp.Core [] [] type NoComparisonAttribute = - inherit System.Attribute + inherit Attribute + /// Creates an instance of the attribute /// NoComparisonAttribute new : unit -> NoComparisonAttribute - /// Adding this attribute to a field declaration means that the field is /// not initialized. During type checking a constraint is asserted that the field type supports 'null'. /// If the 'check' value is false then the constraint is not asserted. [] [] type DefaultValueAttribute = - inherit System.Attribute + inherit Attribute + /// Indicates if a constraint is asserted that the field type supports 'null' member Check: bool + /// Creates an instance of the attribute /// DefaultValueAttribute new : unit -> DefaultValueAttribute + /// Creates an instance of the attribute /// Indicates whether to assert that the field type supports null. /// DefaultValueAttribute @@ -428,7 +458,8 @@ namespace Microsoft.FSharp.Core [] [] type OptionalArgumentAttribute = - inherit System.Attribute + inherit Attribute + /// Creates an instance of the attribute /// OptionalArgumentAttribute new : unit -> OptionalArgumentAttribute @@ -438,7 +469,8 @@ namespace Microsoft.FSharp.Core [] [] type RequiresExplicitTypeArgumentsAttribute = - inherit System.Attribute + inherit Attribute + /// Creates an instance of the attribute /// RequiresExplicitTypeArgumentsAttribute new : unit -> RequiresExplicitTypeArgumentsAttribute @@ -448,7 +480,8 @@ namespace Microsoft.FSharp.Core [] [] type GeneralizableValueAttribute = - inherit System.Attribute + inherit Attribute + /// Creates an instance of the attribute /// GeneralizableValueAttribute new : unit -> GeneralizableValueAttribute @@ -458,40 +491,39 @@ namespace Microsoft.FSharp.Core [] [] type CompiledNameAttribute = - inherit System.Attribute - /// The name of the value as it appears in compiled code - member CompiledName: string + inherit Attribute + /// Creates an instance of the attribute /// The name to use in compiled code. /// CompiledNameAttribute new : compiledName:string -> CompiledNameAttribute + /// The name of the value as it appears in compiled code + member CompiledName: string + /// Adding this attribute to a type with value 'false' disables the behaviour where F# makes the /// type Serializable by default. [] [] type AutoSerializableAttribute = - inherit System.Attribute - /// The value of the attribute, indicating whether the type is automatically marked serializable or not - member Value: bool + inherit Attribute + /// Creates an instance of the attribute /// Indicates whether the type should be serializable by default. /// AutoSerializableAttribute new : value:bool -> AutoSerializableAttribute + /// The value of the attribute, indicating whether the type is automatically marked serializable or not + member Value: bool + /// This attribute is added to generated assemblies to indicate the /// version of the data schema used to encode additional F# /// specific information in the resource attached to compiled F# libraries. [] [] type FSharpInterfaceDataVersionAttribute = - inherit System.Attribute - /// The major version number of the F# version associated with the attribute - member Major: int - /// The minor version number of the F# version associated with the attribute - member Minor: int - /// The release number of the F# version associated with the attribute - member Release: int + inherit Attribute + /// Creates an instance of the attribute /// The major version number. /// The minor version number. @@ -499,6 +531,15 @@ namespace Microsoft.FSharp.Core /// FSharpInterfaceDataVersionAttribute new : major:int * minor:int * release:int -> FSharpInterfaceDataVersionAttribute + /// The major version number of the F# version associated with the attribute + member Major: int + + /// The minor version number of the F# version associated with the attribute + member Minor: int + + /// The release number of the F# version associated with the attribute + member Release: int + /// This attribute is inserted automatically by the F# compiler to tag types /// and methods in the generated CLI code with flags indicating the correspondence /// with original source constructs. It is used by the functions in the @@ -507,21 +548,18 @@ namespace Microsoft.FSharp.Core [] [] type CompilationMappingAttribute = - inherit System.Attribute - /// Indicates the relationship between the compiled entity and F# source code - member SourceConstructFlags : SourceConstructFlags - /// Indicates the sequence number of the entity, if any, in a linear sequence of elements with F# source code - member SequenceNumber : int - /// Indicates the variant number of the entity, if any, in a linear sequence of elements with F# source code - member VariantNumber : int + inherit Attribute + /// Creates an instance of the attribute /// Indicates the type of source construct. /// CompilationMappingAttribute new : sourceConstructFlags:SourceConstructFlags -> CompilationMappingAttribute + /// Creates an instance of the attribute /// Indicates the type of source construct. /// CompilationMappingAttribute new : sourceConstructFlags:SourceConstructFlags * sequenceNumber: int -> CompilationMappingAttribute + /// Creates an instance of the attribute /// Indicates the type of source construct. /// CompilationMappingAttribute @@ -531,8 +569,18 @@ namespace Microsoft.FSharp.Core /// Indicates the type definitions needed to resolve the source construct. /// CompilationMappingAttribute new : resourceName:string * typeDefinitions:System.Type[] -> CompilationMappingAttribute + + /// Indicates the relationship between the compiled entity and F# source code + member SourceConstructFlags : SourceConstructFlags + + /// Indicates the sequence number of the entity, if any, in a linear sequence of elements with F# source code + member SequenceNumber : int + + /// Indicates the variant number of the entity, if any, in a linear sequence of elements with F# source code + member VariantNumber : int /// Indicates the resource the source construct relates to member ResourceName : string + /// Indicates the type definitions needed to resolve the source construct member TypeDefinitions : System.Type[] @@ -542,54 +590,62 @@ namespace Microsoft.FSharp.Core [] [] type CompilationSourceNameAttribute = - inherit System.Attribute - /// Indicates the name of the entity in F# source code - member SourceName : string + inherit Attribute + /// Creates an instance of the attribute /// The name of the method in source. /// CompilationSourceNameAttribute new : sourceName:string -> CompilationSourceNameAttribute + /// Indicates the name of the entity in F# source code + member SourceName : string + /// This attribute is used to adjust the runtime representation for a type. /// For example, it may be used to note that the null representation /// may be used for a type. This affects how some constructs are compiled. [] [] type CompilationRepresentationAttribute = - inherit System.Attribute - /// Indicates one or more adjustments to the compiled representation of an F# type or member - member Flags : CompilationRepresentationFlags + inherit Attribute + /// Creates an instance of the attribute /// Indicates adjustments to the compiled representation of the type or member. /// CompilationRepresentationAttribute new : flags:CompilationRepresentationFlags -> CompilationRepresentationAttribute + /// Indicates one or more adjustments to the compiled representation of an F# type or member + member Flags : CompilationRepresentationFlags + /// This attribute is used to tag values that are part of an experimental library /// feature. [] [] type ExperimentalAttribute = - inherit System.Attribute - /// Indicates the warning message to be emitted when F# source code uses this construct - member Message: string + inherit Attribute + /// Creates an instance of the attribute /// The warning message to be emitted when code uses this construct. /// ExperimentalAttribute new : message:string-> ExperimentalAttribute + /// Indicates the warning message to be emitted when F# source code uses this construct + member Message: string + /// This attribute is generated automatically by the F# compiler to tag functions and members /// that accept a partial application of some of their arguments and return a residual function [] [] type CompilationArgumentCountsAttribute = - inherit System.Attribute - /// Indicates the number of arguments in each argument group - member Counts: System.Collections.Generic.IEnumerable + inherit Attribute + /// Creates an instance of the attribute /// Indicates the number of arguments in each argument group. /// CompilationArgumentCountsAttribute new : counts:int[] -> CompilationArgumentCountsAttribute + /// Indicates the number of arguments in each argument group + member Counts: System.Collections.Generic.IEnumerable + /// This attribute is used to mark how a type is displayed by default when using /// '%A' printf formatting patterns and other two-dimensional text-based display layouts. /// In this version of F# valid values are of the form PreText {PropertyName1} PostText {PropertyName2} ... {PropertyNameX} PostText. @@ -597,32 +653,39 @@ namespace Microsoft.FSharp.Core [] [] type StructuredFormatDisplayAttribute = - inherit System.Attribute - /// Indicates the text to display by default when objects of this type are displayed - /// using '%A' printf formatting patterns and other two-dimensional text-based display - /// layouts. - member Value: string + inherit Attribute + /// Creates an instance of the attribute /// Indicates the text to display when using the '%A' printf formatting. /// StructuredFormatDisplayAttribute new : value:string-> StructuredFormatDisplayAttribute + /// Indicates the text to display by default when objects of this type are displayed + /// using '%A' printf formatting patterns and other two-dimensional text-based display + /// layouts. + member Value: string + /// Indicates that a message should be emitted when F# source code uses this construct. [] [] type CompilerMessageAttribute = - inherit System.Attribute + inherit Attribute + + /// Creates an instance of the attribute. + new : message:string * messageNumber: int -> CompilerMessageAttribute + /// Indicates the warning message to be emitted when F# source code uses this construct member Message: string + /// Indicates the number associated with the message. member MessageNumber: int + /// Indicates if the message should indicate a compiler error. Error numbers less than /// 10000 are considered reserved for use by the F# compiler and libraries. member IsError: bool with get,set + /// Indicates if the construct should always be hidden in an editing environment. member IsHidden: bool with get,set - /// Creates an instance of the attribute. - new : message:string * messageNumber: int -> CompilerMessageAttribute /// This attribute is used to tag values whose use will result in the generation /// of unverifiable code. These values are inevitably marked 'inline' to ensure that @@ -631,7 +694,8 @@ namespace Microsoft.FSharp.Core [] [] type UnverifiableAttribute = - inherit System.Attribute + inherit Attribute + /// Creates an instance of the attribute /// UnverifiableAttribute new : unit -> UnverifiableAttribute @@ -644,18 +708,19 @@ namespace Microsoft.FSharp.Core [] [] type NoDynamicInvocationAttribute = - inherit System.Attribute + inherit Attribute + /// Creates an instance of the attribute /// NoDynamicInvocationAttribute new : unit -> NoDynamicInvocationAttribute - /// This attribute is used to indicate that references to the elements of a module, record or union /// type require explicit qualified access. [] [] type RequireQualifiedAccessAttribute = - inherit System.Attribute + inherit Attribute + /// Creates an instance of the attribute /// RequireQualifiedAccessAttribute new : unit -> RequireQualifiedAccessAttribute @@ -670,21 +735,21 @@ namespace Microsoft.FSharp.Core [] [] type AutoOpenAttribute = - inherit System.Attribute - /// Indicates the namespace or module to be automatically opened when an assembly is referenced - /// or an enclosing module opened. - member Path: string + inherit Attribute + /// Creates an attribute used to mark a module as 'automatically opened' when the enclosing namespace is opened /// AutoOpenAttribute new : unit -> AutoOpenAttribute + /// Creates an attribute used to mark a namespace or module path to be 'automatically opened' when an assembly is referenced /// The namespace or module to be automatically opened when an assembly is referenced /// or an enclosing module opened. /// AutoOpenAttribute new : path:string-> AutoOpenAttribute - //------------------------------------------------------------------------- - // Units of measure + /// Indicates the namespace or module to be automatically opened when an assembly is referenced + /// or an enclosing module opened. + member Path: string [] /// The type of floating point numbers, annotated with a unit of measure. The unit @@ -735,6 +800,55 @@ namespace Microsoft.FSharp.Core /// System.Int64. type int64<[] 'Measure> = int64 + /// Represents a managed pointer in F# code. +#if BUILDING_WITH_LKG || BUILD_FROM_SOURCE + [] +#else + [] +#endif + type byref<'T, 'Kind> = (# "!0&" #) + + /// Represents a managed pointer in F# code. For F# 4.5+ this is considered equivalent to byref<'T, ByRefKinds.InOut> + type byref<'T> = (# "!0&" #) + + /// Represents the types of byrefs in F# 4.5+ +#if BUILDING_WITH_LKG || BUILD_FROM_SOURCE + [] +#else + [] +#endif + module ByRefKinds = + + /// Represents a byref that can be written +#if BUILDING_WITH_LKG || BUILD_FROM_SOURCE + [] +#else + [] +#endif + type Out + + /// Represents a byref that can be read +#if BUILDING_WITH_LKG || BUILD_FROM_SOURCE + [] +#else + [] +#endif + type In + + /// Represents a byref that can be both read and written +#if BUILDING_WITH_LKG || BUILD_FROM_SOURCE + [] +#else + [] +#endif + type InOut + + /// Represents a in-argument or readonly managed pointer in F# code. This type should only be used with F# 4.5+. + type inref<'T> = byref<'T, ByRefKinds.In> + + /// Represents a out-argument managed pointer in F# code. This type should only be used with F# 4.5+. + type outref<'T> = byref<'T, ByRefKinds.Out> + /// Language primitives associated with the F# language module LanguagePrimitives = @@ -807,7 +921,6 @@ namespace Microsoft.FSharp.Core /// The maximum value. val inline GenericMaximum : e1:'T -> e2:'T -> 'T when 'T : comparison - /// Reference/physical equality. /// True if the inputs are reference-equal, false otherwise. /// The first value. @@ -1033,7 +1146,7 @@ namespace Microsoft.FSharp.Core /// The input object. /// The managed pointer. [] - val inline ( ~& ) : obj:'T -> 'T byref + val inline ( ~& ) : obj:'T -> byref<'T> /// Address-of. Uses of this value may result in the generation of unverifiable code. /// The input object. @@ -1229,11 +1342,6 @@ namespace Microsoft.FSharp.Core [] val inline FastCompareTuple5 : comparer:System.Collections.IComparer -> tuple1:('T1 * 'T2 * 'T3 * 'T4 * 'T5) -> tuple2:('T1 * 'T2 * 'T3 * 'T4 * 'T5) -> int - -namespace Microsoft.FSharp.Core - open System - open Microsoft.FSharp.Core - #if FX_RESHAPED_REFLECTION module internal PrimReflectionAdapters = @@ -1257,8 +1365,10 @@ namespace Microsoft.FSharp.Core [] [] type Choice<'T1,'T2> = + /// Choice 1 of 2 choices | Choice1Of2 of 'T1 + /// Choice 2 of 2 choices | Choice2Of2 of 'T2 @@ -1266,10 +1376,13 @@ namespace Microsoft.FSharp.Core [] [] type Choice<'T1,'T2,'T3> = + /// Choice 1 of 3 choices | Choice1Of3 of 'T1 + /// Choice 2 of 3 choices | Choice2Of3 of 'T2 + /// Choice 3 of 3 choices | Choice3Of3 of 'T3 @@ -1277,12 +1390,16 @@ namespace Microsoft.FSharp.Core [] [] type Choice<'T1,'T2,'T3,'T4> = + /// Choice 1 of 4 choices | Choice1Of4 of 'T1 + /// Choice 2 of 4 choices | Choice2Of4 of 'T2 + /// Choice 3 of 4 choices | Choice3Of4 of 'T3 + /// Choice 4 of 4 choices | Choice4Of4 of 'T4 @@ -1290,14 +1407,19 @@ namespace Microsoft.FSharp.Core [] [] type Choice<'T1,'T2,'T3,'T4,'T5> = + /// Choice 1 of 5 choices | Choice1Of5 of 'T1 + /// Choice 2 of 5 choices | Choice2Of5 of 'T2 + /// Choice 3 of 5 choices | Choice3Of5 of 'T3 + /// Choice 4 of 5 choices | Choice4Of5 of 'T4 + /// Choice 5 of 5 choices | Choice5Of5 of 'T5 @@ -1305,16 +1427,22 @@ namespace Microsoft.FSharp.Core [] [] type Choice<'T1,'T2,'T3,'T4,'T5,'T6> = + /// Choice 1 of 6 choices | Choice1Of6 of 'T1 + /// Choice 2 of 6 choices | Choice2Of6 of 'T2 + /// Choice 3 of 6 choices | Choice3Of6 of 'T3 + /// Choice 4 of 6 choices | Choice4Of6 of 'T4 + /// Choice 5 of 6 choices | Choice5Of6 of 'T5 + /// Choice 6 of 6 choices | Choice6Of6 of 'T6 @@ -1322,40 +1450,41 @@ namespace Microsoft.FSharp.Core [] [] type Choice<'T1,'T2,'T3,'T4,'T5,'T6,'T7> = + /// Choice 1 of 7 choices | Choice1Of7 of 'T1 + /// Choice 2 of 7 choices | Choice2Of7 of 'T2 + /// Choice 3 of 7 choices | Choice3Of7 of 'T3 + /// Choice 4 of 7 choices | Choice4Of7 of 'T4 + /// Choice 5 of 7 choices | Choice5Of7 of 'T5 + /// Choice 6 of 7 choices | Choice6Of7 of 'T6 + /// Choice 7 of 7 choices | Choice7Of7 of 'T7 - //------------------------------------------------------------------------- - // F# Exception Types - - /// Non-exhaustive match failures will raise the MatchFailureException exception [] exception MatchFailureException of string * int * int - //------------------------------------------------------------------------- - // F# Function Types - - /// The CLI type used to represent F# first-class type function values. This type is for use /// by compiled F# code. [] type FSharpTypeFunc = + /// Specialize the type function at a given type /// The specialized type. abstract Specialize<'T> : unit -> obj + /// Construct an instance of an F# first class type function value /// FSharpTypeFunc new : unit -> FSharpTypeFunc @@ -1364,15 +1493,23 @@ namespace Microsoft.FSharp.Core /// typically used directly, though may be used from other CLI languages. [] type FSharpFunc<'T,'U> = + + /// Construct an instance of an F# first class function value + /// The created F# function. + new : unit -> FSharpFunc<'T,'U> + /// Invoke an F# first class function value with one argument /// /// 'U abstract member Invoke : func:'T -> 'U + #if !FX_NO_CONVERTER + /// Convert an F# first class function value to a value of type System.Converter /// The input function. /// A System.Converter of the function type. static member op_Implicit : func:('T -> 'U) -> System.Converter<'T,'U> + /// Convert an value of type System.Converter to a F# first class function value /// The input System.Converter. /// An F# function of the same type. @@ -1382,11 +1519,13 @@ namespace Microsoft.FSharp.Core /// The input function. /// System.Converter<'T,'U> static member ToConverter : func:('T -> 'U) -> System.Converter<'T,'U> + /// Convert an value of type System.Converter to a F# first class function value /// The input System.Converter. /// An F# function of the same type. static member FromConverter : converter:System.Converter<'T,'U> -> ('T -> 'U) #endif + /// Invoke an F# first class function value with five curried arguments. In some cases this /// will result in a more efficient application than applying the arguments successively. /// The input function. @@ -1397,6 +1536,7 @@ namespace Microsoft.FSharp.Core /// The fifth arg. /// The function result. static member InvokeFast : func: FSharpFunc<'T,('U -> 'V -> 'W -> 'X -> 'Y)> * arg1:'T * arg2:'U * arg3:'V * arg4:'W * arg5:'X -> 'Y + /// Invoke an F# first class function value with four curried arguments. In some cases this /// will result in a more efficient application than applying the arguments successively. /// The input function. @@ -1406,6 +1546,7 @@ namespace Microsoft.FSharp.Core /// The fourth arg. /// The function result. static member InvokeFast : func: FSharpFunc<'T,('U -> 'V -> 'W -> 'X)> * arg1:'T * arg2:'U * arg3:'V * arg4:'W -> 'X + /// Invoke an F# first class function value with three curried arguments. In some cases this /// will result in a more efficient application than applying the arguments successively. /// The input function. @@ -1414,6 +1555,7 @@ namespace Microsoft.FSharp.Core /// The third arg. /// The function result. static member InvokeFast : func: FSharpFunc<'T,('U -> 'V -> 'W)> * arg1:'T * arg2:'U * arg3:'V -> 'W + /// Invoke an F# first class function value with two curried arguments. In some cases this /// will result in a more efficient application than applying the arguments successively. /// The input function. @@ -1422,44 +1564,103 @@ namespace Microsoft.FSharp.Core /// The function result. static member InvokeFast : func: FSharpFunc<'T,('U -> 'V)> * arg1:'T * arg2:'U -> 'V - /// Construct an instance of an F# first class function value - /// The created F# function. - new : unit -> FSharpFunc<'T,'U> - [] [] /// Helper functions for converting F# first class function values to and from CLI representations /// of functions using delegates. type FuncConvert = + /// Convert the given Action delegate object to an F# function value - /// The input action. + /// The input Action delegate. /// The F# function. - static member ToFSharpFunc : action:Action<'T> -> ('T -> unit) + static member inline ToFSharpFunc : action:Action<'T> -> ('T -> unit) + #if !FX_NO_CONVERTER /// Convert the given Converter delegate object to an F# function value - /// The input Converter. + /// The input Converter delegate. /// The F# function. - static member ToFSharpFunc : converter:Converter<'T,'U> -> ('T -> 'U) + static member inline ToFSharpFunc : converter:Converter<'T,'U> -> ('T -> 'U) #endif + + /// Convert the given Action delegate object to an F# function value + /// The input Action delegate. + /// The F# function. + static member inline FromAction : action:Action -> (unit -> unit) + + /// Convert the given Action delegate object to an F# function value + /// The input Action delegate. + /// The F# function. + static member inline FromAction : action:Action<'T> -> ('T -> unit) + + /// Convert the given Action delegate object to an F# function value + /// The input Action delegate. + /// The F#funcfunction. + static member inline FromAction : action:Action<'T1,'T2> -> ('T1 -> 'T2 -> unit) + + /// Convert the given Action delegate object to an F# function value + /// The input Action delegate. + /// The F# function. + static member inline FromAction : action:Action<'T1,'T2,'T3> -> ('T1 -> 'T2 -> 'T3 -> unit) + + /// Convert the given Action delegate object to an F# function value + /// The input Action delegate. + /// The F# function. + static member inline FromAction : action:Action<'T1,'T2,'T3,'T4> -> ('T1 -> 'T2 -> 'T3 -> 'T4 -> unit) + + /// Convert the given Action delegate object to an F# function value + /// The input Action delegate. + /// The F# function. + static member inline FromAction : action:Action<'T1,'T2,'T3,'T4,'T5> -> ('T1 -> 'T2 -> 'T3 -> 'T4 -> 'T5 -> unit) + + /// Convert the given Func delegate object to an F# function value + /// The input Func delegate. + /// The F# function. + static member inline FromFunc : func:Func<'T> -> (unit -> 'T) + + /// Convert the given Func delegate object to an F# function value + /// The input Func delegate. + /// The F# function. + static member inline FromFunc : func:Func<'T,'U> -> ('T -> 'U) + + /// Convert the given Func delegate object to an F# function value + /// The input Func delegate. + /// The F#funcfunction. + static member inline FromFunc : func:Func<'T1,'T2,'U> -> ('T1 -> 'T2 -> 'U) + + /// Convert the given Func delegate object to an F# function value + /// The input Func delegate. + /// The F# function. + static member inline FromFunc : func:Func<'T1,'T2,'T3,'U> -> ('T1 -> 'T2 -> 'T3 -> 'U) + + /// Convert the given Func delegate object to an F# function value + /// The input Func delegate. + /// The F# function. + static member inline FromFunc : func:Func<'T1,'T2,'T3,'T4,'U> -> ('T1 -> 'T2 -> 'T3 -> 'T4 -> 'U) + + /// Convert the given Func delegate object to an F# function value + /// The input Func delegate. + /// The F# function. + static member inline FromFunc : func:Func<'T1,'T2,'T3,'T4,'T5,'U> -> ('T1 -> 'T2 -> 'T3 -> 'T4 -> 'T5 -> 'U) + /// A utility function to convert function values from tupled to curried form /// The input tupled function. /// The output curried function. - static member FuncFromTupled : func:('T1 * 'T2 -> 'U) -> ('T1 -> 'T2 -> 'U) + static member inline FuncFromTupled : func:('T1 * 'T2 -> 'U) -> ('T1 -> 'T2 -> 'U) /// A utility function to convert function values from tupled to curried form /// The input tupled function. /// The output curried function. - static member FuncFromTupled : func:('T1 * 'T2 * 'T3 -> 'U) -> ('T1 -> 'T2 -> 'T3 -> 'U) + static member inline FuncFromTupled : func:('T1 * 'T2 * 'T3 -> 'U) -> ('T1 -> 'T2 -> 'T3 -> 'U) /// A utility function to convert function values from tupled to curried form /// The input tupled function. /// The output curried function. - static member FuncFromTupled : func:('T1 * 'T2 * 'T3 * 'T4 -> 'U) -> ('T1 -> 'T2 -> 'T3 -> 'T4 -> 'U) + static member inline FuncFromTupled : func:('T1 * 'T2 * 'T3 * 'T4 -> 'U) -> ('T1 -> 'T2 -> 'T3 -> 'T4 -> 'U) /// A utility function to convert function values from tupled to curried form /// The input tupled function. /// The output curried function. - static member FuncFromTupled : func:('T1 * 'T2 * 'T3 * 'T4 * 'T5 -> 'U) -> ('T1 -> 'T2 -> 'T3 -> 'T4 -> 'T5 -> 'U) + static member inline FuncFromTupled : func:('T1 * 'T2 * 'T3 * 'T4 * 'T5 -> 'U) -> ('T1 -> 'T2 -> 'T3 -> 'T4 -> 'T5 -> 'U) /// An implementation module used to hold some private implementations of function /// value invocation. @@ -1471,16 +1672,19 @@ namespace Microsoft.FSharp.Core [] type FSharpFunc<'T1,'T2,'U> = inherit FSharpFunc<'T1,('T2 -> 'U)> + /// Invoke the optimized function value with two curried arguments /// The first arg. /// The second arg. /// The function result. abstract member Invoke : arg1:'T1 * arg2:'T2 -> 'U + /// Adapt an F# first class function value to be an optimized function value that can /// accept two curried arguments without intervening execution. /// The input function. /// The adapted function. static member Adapt : func:('T1 -> 'T2 -> 'U) -> FSharpFunc<'T1,'T2,'U> + /// Construct an optimized function value that can accept two curried /// arguments without intervening execution. /// The optimized function. @@ -1491,7 +1695,9 @@ namespace Microsoft.FSharp.Core /// typically used directly from either F# code or from other CLI languages. [] type FSharpFunc<'T1,'T2,'T3,'U> = + inherit FSharpFunc<'T1,('T2 -> 'T3 -> 'U)> + /// Invoke an F# first class function value that accepts three curried arguments /// without intervening execution /// The first arg. @@ -1499,11 +1705,13 @@ namespace Microsoft.FSharp.Core /// The third arg. /// The function result. abstract member Invoke : arg1:'T1 * arg2:'T2 * arg3:'T3 -> 'U + /// Adapt an F# first class function value to be an optimized function value that can /// accept three curried arguments without intervening execution. /// The input function. /// The adapted function. static member Adapt : func:('T1 -> 'T2 -> 'T3 -> 'U) -> FSharpFunc<'T1,'T2,'T3,'U> + /// Construct an optimized function value that can accept three curried /// arguments without intervening execution. /// The optimized function. @@ -1515,6 +1723,7 @@ namespace Microsoft.FSharp.Core [] type FSharpFunc<'T1,'T2,'T3,'T4,'U> = inherit FSharpFunc<'T1,('T2 -> 'T3 -> 'T4 -> 'U)> + /// Invoke an F# first class function value that accepts four curried arguments /// without intervening execution /// The first arg. @@ -1523,11 +1732,13 @@ namespace Microsoft.FSharp.Core /// The fourth arg. /// The function result. abstract member Invoke : arg1:'T1 * arg2:'T2 * arg3:'T3 * arg4:'T4 -> 'U + /// Adapt an F# first class function value to be an optimized function value that can /// accept four curried arguments without intervening execution. /// The input function. /// The optimized function. static member Adapt : func:('T1 -> 'T2 -> 'T3 -> 'T4 -> 'U) -> FSharpFunc<'T1,'T2,'T3,'T4,'U> + /// Construct an optimized function value that can accept four curried /// arguments without intervening execution. /// The optimized function. @@ -1539,6 +1750,7 @@ namespace Microsoft.FSharp.Core [] type FSharpFunc<'T1,'T2,'T3,'T4,'T5,'U> = inherit FSharpFunc<'T1,('T2 -> 'T3 -> 'T4 -> 'T5 -> 'U)> + /// Invoke an F# first class function value that accepts five curried arguments /// without intervening execution /// The first arg. @@ -1548,28 +1760,26 @@ namespace Microsoft.FSharp.Core /// The fifth arg. /// The function result. abstract member Invoke : arg1:'T1 * arg2:'T2 * arg3:'T3 * arg4:'T4 * arg5:'T5 -> 'U + /// Adapt an F# first class function value to be an optimized function value that can /// accept five curried arguments without intervening execution. /// The input function. /// The optimized function. static member Adapt : func:('T1 -> 'T2 -> 'T3 -> 'T4 -> 'T5 -> 'U) -> FSharpFunc<'T1,'T2,'T3,'T4,'T5,'U> + /// Construct an optimized function value that can accept five curried /// arguments without intervening execution. /// The optimized function. new : unit -> FSharpFunc<'T1,'T2,'T3,'T4,'T5,'U> - - //------------------------------------------------------------------------- - // F# Mutable Reference Cells - - /// The type of mutable references. Use the functions [!] and [:=] to get and /// set values of this type. [] [] type Ref<'T> = { /// The current value of the reference cell - mutable contents: 'T;} + mutable contents: 'T } + /// The current value of the reference cell member Value : 'T with get,set @@ -1577,10 +1787,6 @@ namespace Microsoft.FSharp.Core /// set values of this type. and 'T ref = Ref<'T> - //------------------------------------------------------------------------- - // F# Option Types - - /// The type of optional values. When used from other CLI languages the /// empty option is the null value. /// @@ -1596,6 +1802,7 @@ namespace Microsoft.FSharp.Core [] [] type Option<'T> = + /// The representation of "No value" | None : 'T option @@ -1639,20 +1846,49 @@ namespace Microsoft.FSharp.Core /// due to the use of null as a value representation. and 'T option = Option<'T> + /// The type of optional values, represented as structs. + /// + /// Use the constructors ValueSome and ValueNone to create values of this type. + /// Use the values in the ValueOption module to manipulate values of this type, + /// or pattern match against the values directly. + [] + [] + [] + type ValueOption<'T> = + /// The representation of "No value" + | ValueNone: 'T voption + + /// The representation of "Value of type 'T" + /// The input value. + /// An option representing the value. + | ValueSome: 'T -> 'T voption + + /// Get the value of a 'ValueSome' option. An InvalidOperationException is raised if the option is 'ValueNone'. + member Value : 'T + + /// The type of optional values, represented as structs. + /// + /// Use the constructors ValueSome and ValueNone to create values of this type. + /// Use the values in the ValueOption module to manipulate values of this type, + /// or pattern match against the values directly. + and 'T voption = ValueOption<'T> /// Helper type for error handling without exceptions. [] [] [] type Result<'T,'TError> = + /// Represents an OK or a Successful result. The code succeeded with a value of 'T. | Ok of ResultValue:'T + /// Represents an Error or a Failure. The code failed with a value of 'TError representing what went wrong. | Error of ErrorValue:'TError namespace Microsoft.FSharp.Collections open System + open System.Collections open System.Collections.Generic open Microsoft.FSharp.Core @@ -1667,6 +1903,7 @@ namespace Microsoft.FSharp.Collections type List<'T> = | ([]) : 'T list | (::) : Head: 'T * Tail: 'T list -> 'T list + /// Returns an empty list of a particular type static member Empty : 'T list @@ -1700,13 +1937,11 @@ namespace Microsoft.FSharp.Collections /// The list with head appended to the front of tail. static member Cons : head:'T * tail:'T list -> 'T list - interface System.Collections.Generic.IEnumerable<'T> - interface System.Collections.IEnumerable + interface IEnumerable<'T> + interface IEnumerable + interface IReadOnlyCollection<'T> + interface IReadOnlyList<'T> -#if !FSCORE_PORTABLE_OLD - interface System.Collections.Generic.IReadOnlyCollection<'T> -#endif - /// An abbreviation for the type of immutable singly-linked lists. /// /// Use the constructors [] and :: (infix) to create values of this type, or @@ -1720,8 +1955,6 @@ namespace Microsoft.FSharp.Collections /// An abbreviation for the CLI type System.Collections.Generic.IEnumerable<_> type seq<'T> = IEnumerable<'T> - - namespace Microsoft.FSharp.Core open System @@ -1729,38 +1962,10 @@ namespace Microsoft.FSharp.Core open Microsoft.FSharp.Core open Microsoft.FSharp.Collections - /// Basic F# Operators. This module is automatically opened in all F# code. [] module Operators = - // Arithmetic operators. These operators are overloaded and can be used - // on any pair of types that satisfies the constraint, e.g. the - // '+' function can be used on any type that supports the "op_Addition" - // constraint. This includes all CLI types that support the op_Addition - // operator. The standard integral and floating point types support - // constraints as follows: - // - The built-in integral types are: - // sbyte, byte, int16, uint16, int32, unit32, - // int64, uint64, nativeint, unativeint - // - // - The built-in floating point types are: - // float, float32 - // - // - The built-in numeric types are these combined - // - // All built-in numeric types support: - // 'ty.(+) : (ty,ty) -> ty - // 'ty.(-) : (ty,ty) -> ty - // 'ty.( * ) : (ty,ty) -> ty - // 'ty.(/) : (ty,ty) -> ty - // 'ty.(%) : (ty,ty) -> ty - // 'ty.(~+) : (ty) -> ty - // - // All signed numeric types support: - // 'ty.(~-) : (ty) -> ty - - /// Overloaded unary negation. /// The value to negate. /// The result of the operation. @@ -1889,12 +2094,14 @@ namespace Microsoft.FSharp.Core /// The function. /// The function result. val inline (|>): arg:'T1 -> func:('T1 -> 'U) -> 'U + /// Apply a function to two values, the values being a pair on the left, the function on the right /// The first argument. /// The second argument. /// The function. /// The function result. val inline (||>): arg1:'T1 * arg2:'T2 -> func:('T1 -> 'T2 -> 'U) -> 'U + /// Apply a function to three values, the values being a triple on the left, the function on the right /// The first argument. /// The second argument. @@ -1931,6 +2138,13 @@ namespace Microsoft.FSharp.Core [] val defaultArg : arg:'T option -> defaultValue:'T -> 'T + /// Used to specify a default value for an optional argument in the implementation of a function + /// A value option representing the argument. + /// The default value of the argument. + /// The argument value. If it is None, the defaultValue is returned. + [] + val defaultValueArg : arg:'T voption -> defaultValue:'T -> 'T + /// Concatenate two strings. The operator '+' may also be used. [] val (^): s1:string -> s2:string -> string @@ -2131,6 +2345,7 @@ namespace Microsoft.FSharp.Core /// Equivalent to System.Single.NaN [] val nanf: float32 + #if !FX_NO_SYSTEM_CONSOLE /// Reads the value of the property System.Console.In. [] @@ -2523,68 +2738,6 @@ namespace Microsoft.FSharp.Core [] val ( |KeyValue| ): keyValuePair:KeyValuePair<'Key,'Value> -> 'Key * 'Value -#if MULTI_DIMENSIONAL_EXTENSION_PROPERTIES - type ``[,]``<'T> with - [] - /// Get the length of an array in the first dimension - member Length1 : int - [] - /// Get the length of the array in the second dimension - member Length2 : int - [] - /// Get the lower bound of the array in the first dimension - member Base1 : int - [] - /// Get the lower bound of the array in the second dimension - member Base2 : int - - type ``[,,]``<'T> with - [] - /// Get the length of an array in the first dimension - member Length1 : int - [] - /// Get the length of an array in the second dimension - member Length2 : int - [] - /// Get the length of an array in the third dimension - member Length3 : int - [] - /// Get the lower bound of the array in the first dimension - member Base1 : int - [] - /// Get the lower bound of the array in the second dimension - member Base2 : int - [] - /// Get the lower bound of the array in the third dimension - member Base3 : int - - type ``[,,,]``<'T> with - [] - /// Get the length of an array in the first dimension - member Length1 : int - [] - /// Get the length of an array in the second dimension - member Length2 : int - [] - /// Get the length of an array in the third dimension - member Length3 : int - [] - /// Get the length of an array in the fourth dimension - member Length4 : int - [] - /// Get the lower bound of the array in the first dimension - member Base1 : int - [] - /// Get the lower bound of the array in the second dimension - member Base2 : int - [] - /// Get the lower bound of the array in the third dimension - member Base3 : int - [] - /// Get the lower bound of the array in the fourth dimension - member Base4 : int -#endif - /// A module of compiler intrinsic functions for efficient implementations of F# integer ranges /// and dynamic invocations of other F# operators module OperatorIntrinsics = @@ -2908,7 +3061,6 @@ namespace Microsoft.FSharp.Core [] val PowGeneric : one:'T * mul: ('T -> 'T -> 'T) * value:'T * exponent:int -> 'T - /// This module contains basic operations which do not apply runtime and/or static checks module Unchecked = @@ -3157,34 +3309,16 @@ namespace Microsoft.FSharp.Core val inline char : value:^T -> char when ^T : (static member op_Explicit : ^T -> char) and default ^T : int - -#if NAN_INFINITY_MEASURES - module Measure = - - /// Version of System.Double.PositiveInfinity that is generic in its units-of-measure - [] - val infinity<[] 'Measure> : float<'Measure> - - /// Version of System.Double.NaN that is generic in its units-of-measure - [] - val nan<[] 'Measure> : float<'Measure> - - /// Version of System.Single.PositiveInfinity that is generic in its units-of-measure - [] - val infinityf<[] 'Measure> : float32<'Measure> - - /// Version of System.Single.NaN that is generic in its units-of-measure - [] - val nanf<[] 'Measure> : float32<'Measure> -#endif - namespace Microsoft.FSharp.Control + open Microsoft.FSharp.Core /// Extensions related to Lazy values. [] module LazyExtensions = + type System.Lazy<'T> with + /// Creates a lazy computation that evaluates to the result of the given function when forced. /// The function to provide the value when needed. /// The created Lazy object. @@ -3203,7 +3337,6 @@ namespace Microsoft.FSharp.Control [] // give the extension member a 'nice', unmangled compiled name, unique within this module member Force : unit -> 'T - /// The type of delayed computations. /// /// Use the values in the Lazy module to manipulate @@ -3219,18 +3352,19 @@ namespace Microsoft.FSharp.Control open Microsoft.FSharp.Core open System - /// First class event values for arbitrary delegate types. /// /// F# gives special status to member properties compatible with type IDelegateEvent and /// tagged with the CLIEventAttribute. In this case the F# compiler generates appropriate /// CLI metadata to make the member appear to other CLI languages as a CLI event. type IDelegateEvent<'Delegate when 'Delegate :> System.Delegate > = + /// Connect a handler delegate object to the event. A handler can /// be later removed using RemoveHandler. The listener will /// be invoked when the event is fired. /// A delegate to be invoked when the event is fired. abstract AddHandler: handler:'Delegate -> unit + /// Remove a listener delegate from an event listener store. /// The delegate to be removed from the event listener store. abstract RemoveHandler: handler:'Delegate -> unit @@ -3241,7 +3375,6 @@ namespace Microsoft.FSharp.Control inherit IDelegateEvent<'Delegate> inherit IObservable<'Args> - /// A delegate type associated with the F# event type IEvent<_> /// The object that fired the event. /// The event arguments. diff --git a/src/fsharp/FSharp.Core/quotations.fs b/src/fsharp/FSharp.Core/quotations.fs index 8c78edd8e03..992bbe54f62 100644 --- a/src/fsharp/FSharp.Core/quotations.fs +++ b/src/fsharp/FSharp.Core/quotations.fs @@ -990,7 +990,7 @@ module Patterns = let resT = instFormal tyargTs rty let methInfo = try -#if FX_PORTABLE_OR_NETSTANDARD +#if FX_RESHAPED_REFLECTION match parentT.GetMethod(nm,argTs) with #else match parentT.GetMethod(nm,staticOrInstanceBindingFlags,null,argTs,null) with @@ -1022,7 +1022,7 @@ module Patterns = let tyArgs = List.toArray tyArgs let methInfo = try -#if FX_PORTABLE_OR_NETSTANDARD +#if FX_RESHAPED_REFLECTION match ty.GetMethod(nm, argTypes) with #else match ty.GetMethod(nm,staticOrInstanceBindingFlags,null, argTypes,null) with @@ -1145,7 +1145,7 @@ module Patterns = let typ = mkNamedType(tc,tyargs) let argtyps : Type list = argTypes |> inst tyargs let retType : Type = retType |> inst tyargs |> removeVoid -#if FX_PORTABLE_OR_NETSTANDARD +#if FX_RESHAPED_REFLECTION try typ.GetProperty(propName, staticOrInstanceBindingFlags) with :? AmbiguousMatchException -> null // more than one property found with the specified name and matching binding constraints - return null to initiate manual search @@ -1164,7 +1164,7 @@ module Patterns = let bindGenericCtor (tc:Type,argTypes:Instantiable) = let argtyps = instFormal (getGenericArguments tc) argTypes -#if FX_PORTABLE_OR_NETSTANDARD +#if FX_RESHAPED_REFLECTION let argTypes = Array.ofList argtyps tc.GetConstructor(argTypes) |> bindCtorBySearchIfCandidateIsNull tc argTypes @@ -1176,7 +1176,7 @@ module Patterns = let bindCtor (tc,argTypes:Instantiable,tyargs) = let typ = mkNamedType(tc,tyargs) let argtyps = argTypes |> inst tyargs -#if FX_PORTABLE_OR_NETSTANDARD +#if FX_RESHAPED_REFLECTION let argTypes = Array.ofList argtyps typ.GetConstructor(argTypes) |> bindCtorBySearchIfCandidateIsNull typ argTypes diff --git a/src/fsharp/FSharp.Core/reflect.fs b/src/fsharp/FSharp.Core/reflect.fs index 4c69ddca0b3..78528294f5c 100644 --- a/src/fsharp/FSharp.Core/reflect.fs +++ b/src/fsharp/FSharp.Core/reflect.fs @@ -15,11 +15,7 @@ open Microsoft.FSharp.Primitives.Basics module internal ReflectionUtils = -#if FX_NO_SYSTEM_BINDINGFLAGS - type BindingFlags = Microsoft.FSharp.Core.ReflectionAdapters.BindingFlags -#else type BindingFlags = System.Reflection.BindingFlags -#endif let toBindingFlags allowAccessToNonPublicMembers = if allowAccessToNonPublicMembers then @@ -59,7 +55,7 @@ module internal Impl = //----------------------------------------------------------------- // GENERAL UTILITIES -#if FX_PORTABLE_OR_NETSTANDARD +#if FX_RESHAPED_REFLECTION let instanceFieldFlags = BindingFlags.Instance let instancePropertyFlags = BindingFlags.Instance let staticPropertyFlags = BindingFlags.Static @@ -79,7 +75,7 @@ module internal Impl = let getInstancePropertyReader (typ: Type,propName,bindingFlags) = match getInstancePropertyInfo(typ, propName, bindingFlags) with | null -> None -#if FX_PORTABLE_OR_NETSTANDARD +#if FX_RESHAPED_REFLECTION | prop -> Some(fun (obj:obj) -> prop.GetValue(obj,null)) #else | prop -> Some(fun (obj:obj) -> prop.GetValue(obj,instancePropertyFlags ||| bindingFlags,null,null,null)) @@ -288,7 +284,7 @@ module internal Impl = let getUnionCaseRecordReader (typ:Type,tag:int,bindingFlags) = let props = fieldsPropsOfUnionCase(typ,tag,bindingFlags) -#if FX_PORTABLE_OR_NETSTANDARD +#if FX_RESHAPED_REFLECTION (fun (obj:obj) -> props |> Array.map (fun prop -> prop.GetValue(obj,null))) #else (fun (obj:obj) -> props |> Array.map (fun prop -> prop.GetValue(obj,bindingFlags,null,null,null))) @@ -305,7 +301,7 @@ module internal Impl = | Some reader -> (fun (obj:obj) -> reader obj :?> int) | None -> (fun (obj:obj) -> -#if FX_PORTABLE_OR_NETSTANDARD +#if FX_RESHAPED_REFLECTION let m2b = typ.GetMethod("GetTag", [| typ |]) #else let m2b = typ.GetMethod("GetTag", BindingFlags.Static ||| bindingFlags, null, [| typ |], null) @@ -314,7 +310,7 @@ module internal Impl = let getUnionTagMemberInfo (typ:Type,bindingFlags) = match getInstancePropertyInfo (typ,"Tag",bindingFlags) with -#if FX_PORTABLE_OR_NETSTANDARD +#if FX_RESHAPED_REFLECTION | null -> (typ.GetMethod("GetTag") :> MemberInfo) #else | null -> (typ.GetMethod("GetTag",BindingFlags.Static ||| bindingFlags) :> MemberInfo) @@ -338,7 +334,7 @@ module internal Impl = let getUnionCaseConstructor (typ:Type,tag:int,bindingFlags) = let meth = getUnionCaseConstructorMethod (typ,tag,bindingFlags) (fun args -> -#if FX_PORTABLE_OR_NETSTANDARD +#if FX_RESHAPED_REFLECTION meth.Invoke(null,args)) #else meth.Invoke(null,BindingFlags.Static ||| BindingFlags.InvokeMethod ||| bindingFlags,null,args,null)) @@ -451,11 +447,11 @@ module internal Impl = // Item1, Item2, ..., Item // Item1, Item2, ..., Item, Rest // The PropertyInfo may not come back in order, so ensure ordering here. -#if !FX_PORTABLE_OR_NETSTANDARD +#if !NETSTANDARD1_6 assert(maxTuple < 10) // Alphasort will only works for upto 9 items: Item1, Item10, Item2, Item3, ..., Item9, Rest #endif let props = props |> Array.sortBy (fun p -> p.Name) // they are not always in alphabetic order -#if !FX_PORTABLE_OR_NETSTANDARD +#if !NETSTANDARD1_6 assert(props.Length <= maxTuple) assert(let haveNames = props |> Array.map (fun p -> p.Name) let expectNames = Array.init props.Length (fun i -> let j = i+1 // index j = 1,2,..,props.Length <= maxTuple @@ -473,11 +469,11 @@ module internal Impl = // Item1, Item2, ..., Item // Item1, Item2, ..., Item, Rest // The PropertyInfo may not come back in order, so ensure ordering here. -#if !FX_PORTABLE_OR_NETSTANDARD +#if !NETSTANDARD1_6 assert(maxTuple < 10) // Alphasort will only works for upto 9 items: Item1, Item10, Item2, Item3, ..., Item9, Rest #endif let fields = fields |> Array.sortBy (fun fi -> fi.Name) // they are not always in alphabetic order -#if !FX_PORTABLE_OR_NETSTANDARD +#if !NETSTANDARD1_6 assert(fields.Length <= maxTuple) assert(let haveNames = fields |> Array.map (fun fi -> fi.Name) let expectNames = Array.init fields.Length (fun i -> let j = i+1 // index j = 1,2,..,fields.Length <= maxTuple @@ -488,36 +484,34 @@ module internal Impl = #endif fields - let getTupleConstructorMethod(typ:Type,bindingFlags) = + let getTupleConstructorMethod (typ:Type) = let ctor = if typ.IsValueType then - let fields = typ.GetFields(bindingFlags) |> orderTupleFields -#if FX_PORTABLE_OR_NETSTANDARD - ignore bindingFlags + let fields = typ.GetFields (instanceFieldFlags ||| BindingFlags.Public) |> orderTupleFields +#if FX_RESHAPED_REFLECTION typ.GetConstructor(fields |> Array.map (fun fi -> fi.FieldType)) #else - typ.GetConstructor(BindingFlags.Instance ||| bindingFlags,null,fields |> Array.map (fun fi -> fi.FieldType),null) + typ.GetConstructor(BindingFlags.Public ||| BindingFlags.Instance,null,fields |> Array.map (fun fi -> fi.FieldType),null) #endif else let props = typ.GetProperties() |> orderTupleProperties -#if FX_PORTABLE_OR_NETSTANDARD - ignore bindingFlags +#if FX_RESHAPED_REFLECTION typ.GetConstructor(props |> Array.map (fun p -> p.PropertyType)) #else - typ.GetConstructor(BindingFlags.Instance ||| bindingFlags,null,props |> Array.map (fun p -> p.PropertyType),null) + typ.GetConstructor(BindingFlags.Public ||| BindingFlags.Instance,null,props |> Array.map (fun p -> p.PropertyType),null) #endif match ctor with | null -> raise <| ArgumentException(String.Format(SR.GetString(SR.invalidTupleTypeConstructorNotDefined), typ.FullName)) | _ -> () ctor - let getTupleCtor(typ:Type,bindingFlags) = - let ctor = getTupleConstructorMethod(typ,bindingFlags) + let getTupleCtor(typ:Type) = + let ctor = getTupleConstructorMethod typ (fun (args:obj[]) -> -#if FX_PORTABLE_OR_NETSTANDARD +#if FX_RESHAPED_REFLECTION ctor.Invoke(args)) #else - ctor.Invoke(BindingFlags.InvokeMethod ||| BindingFlags.Instance ||| bindingFlags,null,args,null)) + ctor.Invoke(BindingFlags.InvokeMethod ||| BindingFlags.Instance ||| BindingFlags.Public, null, args, null)) #endif let rec getTupleReader (typ:Type) = @@ -525,7 +519,7 @@ module internal Impl = // Get the reader for the outer tuple record let reader = if typ.IsValueType then - let fields = (typ.GetFields(instanceFieldFlags ||| BindingFlags.Public) |> orderTupleFields) + let fields = (typ.GetFields (instanceFieldFlags ||| BindingFlags.Public) |> orderTupleFields) ((fun (obj:obj) -> fields |> Array.map (fun field -> field.GetValue(obj)))) else let props = (typ.GetProperties(instancePropertyFlags ||| BindingFlags.Public) |> orderTupleProperties) @@ -542,7 +536,7 @@ module internal Impl = let rec getTupleConstructor (typ:Type) = let etys = typ.GetGenericArguments() - let maker1 = getTupleCtor (typ,BindingFlags.Public) + let maker1 = getTupleCtor typ if etys.Length < maxTuple then maker1 else @@ -554,7 +548,7 @@ module internal Impl = let getTupleConstructorInfo (typ:Type) = let etys = typ.GetGenericArguments() - let maker1 = getTupleConstructorMethod (typ,BindingFlags.Public) + let maker1 = getTupleConstructorMethod typ if etys.Length < maxTuple then maker1,None else @@ -626,7 +620,7 @@ module internal Impl = let getRecordConstructorMethod(typ:Type,bindingFlags) = let props = fieldPropsOfRecordType(typ,bindingFlags) -#if FX_PORTABLE_OR_NETSTANDARD +#if FX_RESHAPED_REFLECTION let ctor = typ.GetConstructor(props |> Array.map (fun p -> p.PropertyType)) #else let ctor = typ.GetConstructor(BindingFlags.Instance ||| bindingFlags,null,props |> Array.map (fun p -> p.PropertyType),null) @@ -639,7 +633,7 @@ module internal Impl = let getRecordConstructor(typ:Type,bindingFlags) = let ctor = getRecordConstructorMethod(typ,bindingFlags) (fun (args:obj[]) -> -#if FX_PORTABLE_OR_NETSTANDARD +#if FX_RESHAPED_REFLECTION ctor.Invoke(args)) #else ctor.Invoke(BindingFlags.InvokeMethod ||| BindingFlags.Instance ||| bindingFlags,null,args,null)) diff --git a/src/fsharp/FSharp.Core/reflect.fsi b/src/fsharp/FSharp.Core/reflect.fsi index eb0240a1fdb..99d4e491891 100644 --- a/src/fsharp/FSharp.Core/reflect.fsi +++ b/src/fsharp/FSharp.Core/reflect.fsi @@ -70,8 +70,6 @@ type FSharpValue = /// A function to read the specified field from the record. static member PreComputeRecordFieldReader : info:PropertyInfo -> (obj -> obj) -// These APIs are only internal for portable profile, 7,78 and 259 of FSHarp.Core.dll --- those profiles System.Reflection.BindingFlags -#if !FX_NO_SYSTEM_BINDINGFLAGS /// Creates an instance of a record type. /// /// Assumes the given input is a record type. @@ -188,7 +186,6 @@ type FSharpValue = /// Thrown when the input type is not an F# exception. /// The fields from the given exception. static member GetExceptionFields: exn:obj * ?bindingFlags:BindingFlags -> obj[] -#endif /// Creates an instance of a tuple type /// @@ -263,7 +260,6 @@ type FSharpValue = /// Contains operations associated with constructing and analyzing F# types such as records, unions and tuples type FSharpType = -#if !FX_NO_SYSTEM_BINDINGFLAGS /// Reads all the fields from a record value, in declaration order /// /// Assumes the given input is a record value. If not, ArgumentException is raised. @@ -309,8 +305,6 @@ type FSharpType = /// True if the type check is an F# exception. static member IsExceptionRepresentation: exceptionType:Type * ?bindingFlags:BindingFlags -> bool -#endif - /// Returns a System.Type representing the F# function type with the given domain and range /// The input type of the function. /// The output type of the function. @@ -529,9 +523,5 @@ namespace Microsoft.FSharp.Reflection open Microsoft.FSharp.Core module internal ReflectionUtils = -#if FX_NO_SYSTEM_BINDINGFLAGS - type BindingFlags = ReflectionAdapters.BindingFlags -#else type BindingFlags = System.Reflection.BindingFlags -#endif val toBindingFlags : allowAccessToNonPublicMembers : bool -> BindingFlags \ No newline at end of file diff --git a/src/fsharp/FSharp.Core/seq.fs b/src/fsharp/FSharp.Core/seq.fs index 3d82bff7901..3162a0fe594 100644 --- a/src/fsharp/FSharp.Core/seq.fs +++ b/src/fsharp/FSharp.Core/seq.fs @@ -457,11 +457,6 @@ namespace Microsoft.FSharp.Collections [] module Seq = -#if FX_NO_ICLONEABLE - open Microsoft.FSharp.Core.ICloneableExtensions -#else -#endif - open Microsoft.FSharp.Collections.Internal open Microsoft.FSharp.Collections.IEnumerator @@ -854,10 +849,10 @@ namespace Microsoft.FSharp.Collections [] let singleton value = mkSeq (fun () -> IEnumerator.Singleton value) - [] let truncate count (source: seq<'T>) = checkNonNull "source" source + if count <= 0 then empty else seq { let i = ref 0 use ie = source.GetEnumerator() while !i < count && ie.MoveNext() do @@ -1037,6 +1032,8 @@ namespace Microsoft.FSharp.Collections let inline groupByImpl (comparer:IEqualityComparer<'SafeKey>) (keyf:'T->'SafeKey) (getKey:'SafeKey->'Key) (seq:seq<'T>) = checkNonNull "seq" seq + if isEmpty seq then empty else + let dict = Dictionary<_,ResizeArray<_>> comparer // Previously this was 1, but I think this is rather stingy, considering that we are already paying @@ -1079,9 +1076,18 @@ namespace Microsoft.FSharp.Collections then mkDelayedSeq (fun () -> groupByValueType projection source) else mkDelayedSeq (fun () -> groupByRefType projection source) + [] + let transpose (source: seq<#seq<'T>>) = + checkNonNull "source" source + source + |> collect indexed + |> groupBy fst + |> map (snd >> (map snd)) + [] let distinct source = checkNonNull "source" source + if isEmpty source then empty else seq { let hashSet = HashSet<'T>(HashIdentity.Structural<'T>) for v in source do if hashSet.Add(v) then @@ -1090,6 +1096,7 @@ namespace Microsoft.FSharp.Collections [] let distinctBy projection source = checkNonNull "source" source + if isEmpty source then empty else seq { let hashSet = HashSet<_>(HashIdentity.Structural<_>) for v in source do if hashSet.Add(projection v) then @@ -1133,6 +1140,7 @@ namespace Microsoft.FSharp.Collections let inline countByImpl (comparer:IEqualityComparer<'SafeKey>) (keyf:'T->'SafeKey) (getKey:'SafeKey->'Key) (source:seq<'T>) = checkNonNull "source" source + if isEmpty source then empty else let dict = Dictionary comparer diff --git a/src/fsharp/FSharp.Core/seq.fsi b/src/fsharp/FSharp.Core/seq.fsi index 38a96793f73..045a22b84ab 100644 --- a/src/fsharp/FSharp.Core/seq.fsi +++ b/src/fsharp/FSharp.Core/seq.fsi @@ -14,7 +14,7 @@ namespace Microsoft.FSharp.Collections [] module Seq = - /// Returns a new sequence that contains the cartesian product of the two input sequences. + /// Returns a new sequence that contains all pairings of elements from the first and second sequences. /// The first sequence. /// The second sequence. /// The result sequence. @@ -1276,6 +1276,16 @@ namespace Microsoft.FSharp.Collections [] val tryPick: chooser:('T -> 'U option) -> source:seq<'T> -> 'U option + /// Returns the transpose of the given sequence of sequences. + /// This function returns a sequence that digests the whole initial sequence as soon as + /// that sequence is iterated. As a result this function should not be used with + /// large or infinite sequences. + /// The input sequence. + /// The transposed sequence. + /// Thrown when the input sequence is null. + [] + val transpose: source:seq<'Collection> -> seq> when 'Collection :> seq<'T> + /// Returns a sequence that when enumerated returns at most N elements. /// /// The maximum number of items to enumerate. diff --git a/src/fsharp/FSharp.Core/set.fs b/src/fsharp/FSharp.Core/set.fs index a05d8527557..85c04a2c241 100644 --- a/src/fsharp/FSharp.Core/set.fs +++ b/src/fsharp/FSharp.Core/set.fs @@ -711,7 +711,10 @@ namespace Microsoft.FSharp.Collections member s.Contains(x) = SetTree.mem s.Comparer x s.Tree member s.CopyTo(arr,i) = SetTree.copyToArray s.Tree arr i member s.IsReadOnly = true - member s.Count = SetTree.count s.Tree + member s.Count = s.Count + + interface IReadOnlyCollection<'T> with + member s.Count = s.Count interface IEnumerable<'T> with member s.GetEnumerator() = SetTree.mkIEnumerator s.Tree @@ -813,12 +816,6 @@ namespace Microsoft.FSharp.Collections [] let count (set: Set<'T>) = set.Count - [] - let minimumElement (set: Set<'T>) = set.MinimumElement - - [] - let maximumElement (set: Set<'T>) = set.MaximumElement - [] let ofList elements = Set(List.toSeq elements) diff --git a/src/fsharp/FSharp.Core/set.fsi b/src/fsharp/FSharp.Core/set.fsi index e9dc5d4d6d3..9293a523312 100644 --- a/src/fsharp/FSharp.Core/set.fsi +++ b/src/fsharp/FSharp.Core/set.fsi @@ -93,8 +93,8 @@ namespace Microsoft.FSharp.Collections interface ICollection<'T> interface IEnumerable<'T> interface System.Collections.IEnumerable - interface System.IComparable + interface IReadOnlyCollection<'T> override Equals : obj -> bool diff --git a/src/fsharp/FSharp.Core/string.fs b/src/fsharp/FSharp.Core/string.fs index 2a5f291f903..e620e4cac6a 100644 --- a/src/fsharp/FSharp.Core/string.fs +++ b/src/fsharp/FSharp.Core/string.fs @@ -12,57 +12,59 @@ namespace Microsoft.FSharp.Core [] [] module String = - - let inline emptyIfNull str = - match str with - | null -> String.Empty - | _ -> str - [] let concat sep (strings : seq) = String.Join(sep, strings) [] let iter (action : (char -> unit)) (str:string) = - let str = emptyIfNull str - for i = 0 to str.Length - 1 do - action str.[i] + if not (String.IsNullOrEmpty str) then + for i = 0 to str.Length - 1 do + action str.[i] [] let iteri action (str:string) = - let str = emptyIfNull str - let f = OptimizedClosures.FSharpFunc<_,_,_>.Adapt(action) - for i = 0 to str.Length - 1 do - f.Invoke(i, str.[i]) + if not (String.IsNullOrEmpty str) then + let f = OptimizedClosures.FSharpFunc<_,_,_>.Adapt(action) + for i = 0 to str.Length - 1 do + f.Invoke(i, str.[i]) [] let map (mapping: char -> char) (str:string) = - let str = emptyIfNull str - let res = StringBuilder str.Length - str |> iter (fun c -> res.Append(mapping c) |> ignore) - res.ToString() + if String.IsNullOrEmpty str then + String.Empty + else + let res = StringBuilder str.Length + str |> iter (fun c -> res.Append(mapping c) |> ignore) + res.ToString() [] let mapi (mapping: int -> char -> char) (str:string) = - let str = emptyIfNull str - let res = StringBuilder str.Length - let f = OptimizedClosures.FSharpFunc<_,_,_>.Adapt(mapping) - str |> iteri (fun i c -> res.Append(f.Invoke(i, c)) |> ignore) - res.ToString() + if String.IsNullOrEmpty str then + String.Empty + else + let res = StringBuilder str.Length + let f = OptimizedClosures.FSharpFunc<_,_,_>.Adapt(mapping) + str |> iteri (fun i c -> res.Append(f.Invoke(i, c)) |> ignore) + res.ToString() [] let filter (predicate: char -> bool) (str:string) = - let str = emptyIfNull str - let res = StringBuilder str.Length - str |> iter (fun c -> if predicate c then res.Append c |> ignore) - res.ToString() + if String.IsNullOrEmpty str then + String.Empty + else + let res = StringBuilder str.Length + str |> iter (fun c -> if predicate c then res.Append c |> ignore) + res.ToString() [] let collect (mapping: char -> string) (str:string) = - let str = emptyIfNull str - let res = StringBuilder str.Length - str |> iter (fun c -> res.Append(mapping c) |> ignore) - res.ToString() + if String.IsNullOrEmpty str then + String.Empty + else + let res = StringBuilder str.Length + str |> iter (fun c -> res.Append(mapping c) |> ignore) + res.ToString() [] let init (count:int) (initializer: int-> string) = @@ -75,25 +77,34 @@ namespace Microsoft.FSharp.Core [] let replicate (count:int) (str:string) = if count < 0 then invalidArgInputMustBeNonNegative "count" count - let str = emptyIfNull str - let res = StringBuilder str.Length - for i = 0 to count - 1 do - res.Append str |> ignore - res.ToString() + + if String.IsNullOrEmpty str then + String.Empty + else + let res = StringBuilder(count * str.Length) + for i = 0 to count - 1 do + res.Append str |> ignore + res.ToString() [] let forall predicate (str:string) = - let str = emptyIfNull str - let rec check i = (i >= str.Length) || (predicate str.[i] && check (i+1)) - check 0 + if String.IsNullOrEmpty str then + true + else + let rec check i = (i >= str.Length) || (predicate str.[i] && check (i+1)) + check 0 [] let exists predicate (str:string) = - let str = emptyIfNull str - let rec check i = (i < str.Length) && (predicate str.[i] || check (i+1)) - check 0 + if String.IsNullOrEmpty str then + false + else + let rec check i = (i < str.Length) && (predicate str.[i] || check (i+1)) + check 0 [] let length (str:string) = - let str = emptyIfNull str - str.Length + if String.IsNullOrEmpty str then + 0 + else + str.Length diff --git a/src/fsharp/FSharp.Core/xlf/FSCore.cs.xlf b/src/fsharp/FSharp.Core/xlf/FSCore.cs.xlf new file mode 100644 index 00000000000..7c8e97d6501 --- /dev/null +++ b/src/fsharp/FSharp.Core/xlf/FSCore.cs.xlf @@ -0,0 +1,712 @@ + + + + + + The match cases were incomplete + Případy výrazu match byly neúplné. + + + + First class uses of address-of operators are not permitted. + Použití operátorů address-of jako výrazů první třídy není povoleno. + + + + The arrays have different lengths. + Pole mají rozdílné délky. + + + + The input array was empty. + Vstupní pole bylo prázdné. + + + + Input string was not in a correct format. + Vstupní řetězec nemá správný formát. + + + + Expecting delegate type. + Je očekáván typ delegáta. + + + + Dynamic invocation of DivideByInt involving coercions is not supported. + Dynamické vyvolání metody DivideByInt zahrnující převody není podporováno. + + + + Dynamic invocation of op_Addition involving coercions is not supported. + Dynamické vyvolání metody op_Addition zahrnující převody není podporováno. + + + + Dynamic invocation of op_Addition involving overloading is not supported. + Dynamické vyvolání metody op_Addition zahrnující přetížení není podporováno. + + + + Dynamic invocation of op_Multiply involving coercions is not supported. + Dynamické vyvolání metody op_Multiply zahrnující převody není podporováno. + + + + Dynamic invocation of op_Multiply involving overloading is not supported. + Dynamické vyvolání metody op_Multiply zahrnující přetížení není podporováno. + + + + The end of a range cannot be NaN. + Koncová hodnota rozsahu nemůže být NaN. + + + + Enumeration already finished. + Výčet byl již dokončen. + + + + Enumeration has not started. Call MoveNext. + Výčet nebyl zahájen. Volejte metodu MoveNext. + + + + Set contains no elements. + Sada neobsahuje žádné prvky. + + + + Enumeration based on System.Int32 exceeded System.Int32.MaxValue. + Výčet založený na typu System.Int32 překročil hodnotu System.Int32.MaxValue. + + + + Failed to read enough bytes from the stream. + Nezdařilo se přečíst dostatek bajtů z datového proudu. + + + + Failure during generic comparison: the type '{0}' does not implement the System.IComparable interface. This error may be arise from the use of a function such as 'compare', 'max' or 'min' or a data structure such as 'Set' or 'Map' whose keys contain instances of this type. + Chyba během obecného srovnání: typ {0} neimplementuje rozhraní System.IComparable. Tato chyba může být způsobena použitím funkce jako například compare, max nebo min nebo datové struktury jako například Set nebo Map, jejichž klíče obsahují instance tohoto typu. + + + + The index was outside the range of elements in the list. + Index byl mimo rozsah prvků seznamu. + + + + The input list was empty. + Vstupní seznam byl prázdný. + + + + The input must be non-negative. + Hodnota vstupu musí být nezáporná. + + + + The input must be positive. + Hodnota vstupu musí být kladná. + + + + The input sequence was empty. + Vstupní sekvence byla prázdná. + + + + This is not a valid tuple type for the F# reflection library. + Toto není platný typ řazené kolekce členů pro knihovnu reflexe jazyka F#. + + + + The item, key, or index was not found in the collection. + V kolekci nebyla nalezena položka, klíč nebo index. + + + + The lists had different lengths. + Seznamy měly rozdílné délky. + + + + The MailboxProcessor has already been started. + Agent MailboxProcessor již byl spuštěn. + + + + MailboxProcessor.PostAndAsyncReply timed out. + Vypršel časový limit metody MailboxProcessor.PostAndAsyncReply. + + + + MailboxProcessor.PostAndReply timed out. + Vypršel časový limit metody MailboxProcessor.PostAndReply. + + + + Mailbox.Receive timed out. + Vypršel časový limit metody Mailbox.Receive. + + + + Mailbox.Scan timed out. + Vypršel časový limit metody Mailbox.Scan. + + + + Map values cannot be mutated. + Hodnoty mapy nemohou být mutovány. + + + + The IAsyncResult object provided does not match this 'Cancel' operation. + Poskytnutý objekt IAsyncResult neodpovídá této operaci Cancel. + + + + The IAsyncResult object provided does not match this 'End' operation. + Poskytnutý objekt IAsyncResult neodpovídá této operaci End. + + + + Negating the minimum value of a twos complement number is invalid. + Negace minimální hodnoty čísla ve formátu dvojkového doplňku je neplatná. + + + + The initialization of an object or value resulted in an object or value being accessed recursively before it was fully initialized. + Inicializace objektu nebo hodnoty způsobila rekurzivní přístup k objektu nebo hodnotě před úplným dokončením inicializace. + + + + The static initialization of a file or type resulted in static data being accessed recursively before it was fully initialized. + Statická inicializace souboru nebo typu způsobila rekurzivní přístup ke statickým datům před úplným dokončením inicializace. + + + + Arrays with non-zero base cannot be created on this platform. + Na této platformě nelze vytvářet pole, která nejsou počítána od nuly. + + + + Type '{0}' is not a function type. + Typ {0} není typ funkce. + + + + Type '{0}' is not the representation of an F# exception declaration. + Typ {0} není reprezentací deklarace výjimky jazyka F#. + + + + The function did not compute a permutation. + Funkce nevypočítala permutaci. + + + + Type '{0}' is not an F# record type. + Typ {0} není typ záznamu jazyka F#. + + + + Type '{0}' is not a tuple type. + Typ {0} není typ řazené kolekce členů. + + + + Type '{0}' is not an F# union type. + Typ {0} není typ union jazyka F#. + + + + The two objects have different types and are not comparable. + Tyto dva objekty mají rozdílné typy a nelze je porovnat. + + + + The input sequence has an insufficient number of elements. + Vstupní sekvence má nedostatečný počet prvků. + + + + This object is for recursive equality calls and cannot be used for hashing. + Tento objekt je určen pro rekurzivní volání rovnosti a nelze jej použít pro algoritmus hash. + + + + One of the elements in the array is null. + Jeden z prvků v poli má hodnotu null. + + + + The object is not an F# record value. + Objekt není hodnotou záznamu jazyka F#. + + + + The object is null and no type was given. Either pass a non-null object or a non-null type parameter. + Objekt má hodnotu null a nebyl určen žádný typ. Buď předejte objekt, který nemá hodnotu null, nebo parametr typu, který nemá hodnotu null. + + + + The index is outside the legal range. + Index je mimo přípustný rozsah. + + + + The type '{0}' is the representation of an F# exception declaration but its representation is private. You must specify BindingFlags.NonPublic to access private type representations. + Typ {0} je reprezentací deklarace výjimky jazyka F#, ale jeho reprezentace je privátní. Aby bylo možné přistupovat k privátním reprezentacím typů, je nutné určit příznak BindingFlags.NonPublic. + + + + The type '{0}' is an F# record type but its representation is private. You must specify BindingFlags.NonPublic to access private type representations. + Typ {0} je reprezentací typu záznamu jazyka F#, ale jeho reprezentace je privátní. Aby bylo možné přistupovat k privátním reprezentacím typů, je nutné určit příznak BindingFlags.NonPublic. + + + + The type '{0}' is an F# union type but its representation is private. You must specify BindingFlags.NonPublic to access private type representations. + Typ {0} je reprezentací typu union jazyka F#, ale jeho reprezentace je privátní. Aby bylo možné přistupovat k privátním reprezentacím typů, je nutné určit příznak BindingFlags.NonPublic. + + + + Expected exactly one type argument. + Byl očekáván přesně jeden argument typu. + + + + Expected exactly two type arguments. + Byly očekávány přesně dva argumenty typu. + + + + Not a valid F# union case index. + Nejedená se o platný index případu typu union jazyka F#. + + + + Type '{0}' did not have an F# record field named '{1}'. + Typ {0} neobsahoval pole záznamu jazyka F# s názvem {1}. + + + + Type '{0}' did not have an F# union case named '{1}'. + Typ {0} neobsahoval případ typu union jazyka F# s názvem {1}. + + + + Type mismatch when building '{0}': the type of the field was incorrect. Expected '{1}', but received type '{2}'. + Neshoda typů při sestavování {0}: typ pole byl nesprávný. Očekávaný typ byl {1}, ale přijatý typ byl {2}. + + + + Type mismatch when building '{0}': body must return unit. Expected '{1}', but received type '{2}'. + Neshoda typů při sestavování {0}: tělo musí vracet výraz typu unit. Očekávaný typ byl {1}, ale přijatý typ byl {2}. + + + + Type mismatch when building '{0}': condition expression must be of type bool. Expected '{1}', but received type '{2}'. + Neshoda typů při sestavování {0}: výraz podmínky musí být typu bool. Očekávaný typ byl {1}, ale přijatý typ byl {2}. + + + + Type mismatch when building '{0}': expected function type in function application or let binding. Expected '{1}', but received type '{2}'. + Neshoda typů při sestavování {0}: při použití funkce nebo vytvoření vazby přiřazení let byl očekáván typ funkce. Očekávaný typ byl {1}, ale přijatý typ byl {2}. + + + + Type mismatch when building '{0}': expression doesn't match the tuple type. Expected '{1}', but received type '{2}'. + Neshoda typů při sestavování {0}: výraz neodpovídá typu řazené kolekce členů. Očekávaný typ byl {1}, ale přijatý typ byl {2}. + + + + Type mismatch when building '{0}': types of expression does not match. Expected '{1}', but received type '{2}'. + Neshoda typů při sestavování {0}: typy výrazů se neshodují. Očekávaný typ byl {1}, ale přijatý typ byl {2}. + + + + Type mismatch when building '{0}': function argument type doesn't match. Expected '{1}', but received type '{2}'. + Neshoda typů při sestavování {0}: neodpovídá typ argumentu funkce. Očekávaný typ byl {1}, ale přijatý typ byl {2}. + + + + Type mismatch when building '{0}': guard must return boolean. Expected '{1}', but received type '{2}'. + Neshoda typů při sestavování {0}: výraz guard musí vracet hodnotu typu boolean. Očekávaný typ byl {1}, ale přijatý typ byl {2}. + + + + Type mismatch when building '{0}': incorrect argument type for an F# record. Expected '{1}', but received type '{2}'. + Neshoda typů při sestavování {0}: nesprávný typ argumentu pro záznam jazyka F#. Očekávaný typ byl {1}, ale přijatý typ byl {2}. + + + + Type mismatch when building '{0}': incorrect argument type for an F# union. Expected '{1}', but received type '{2}'. + Neshoda typů při sestavování {0}: nesprávný typ argumentu pro typ union jazyka F#. Očekávaný typ byl {1}, ale přijatý typ byl {2}. + + + + Type mismatch when building '{0}': initializer doesn't match array type. Expected '{1}', but received type '{2}'. + Neshoda typů při sestavování {0}: inicializátor neodpovídá typu pole. Očekávaný typ byl {1}, ale přijatý typ byl {2}. + + + + Type mismatch when building '{0}': invalid parameter for a method or indexer property. Expected '{1}', but received type '{2}'. + Neshoda typů při sestavování {0}: neplatný parametr metody nebo vlastnosti indexeru. Očekávaný typ byl {1}, ale přijatý typ byl {2}. + + + + Type mismatch when building '{0}': body of the for loop must be lambda taking integer as an argument. Expected '{1}', but received type '{2}'. + Neshoda typů při sestavování {0}: tělo cyklu for musí být výraz lambda, který jako argument přijímá celé číslo. Očekávaný typ byl {1}, ale přijatý typ byl {2}. + + + + Type mismatch when building '{0}': lower and upper bounds must be integers. Expected '{1}', but received type '{2}'. + Neshoda typů při sestavování {0}: dolní a horní hranice musejí být celá čísla. Očekávaný typ byl {1}, ale přijatý typ byl {2}. + + + + Type mismatch when building '{0}': types of true and false branches differ. Expected '{1}', but received type '{2}'. + Neshoda typů při sestavování {0}: typy ve větvích true a false se liší. Očekávaný typ byl {1}, ale přijatý typ byl {2}. + + + + Type mismatch when building '{0}': mismatched type of argument and tuple element. Expected '{1}', but received type '{2}'. + Neshoda typů při sestavování {0}: typ argumentu a prvku řazené kolekce členů se neshodují. Očekávaný typ byl {1}, ale přijatý typ byl {2}. + + + + Type mismatch when building '{0}': the variable type doesn't match the type of the right-hand-side of a let binding. Expected '{1}', but received type '{2}'. + Neshoda typů při sestavování {0}: typ proměnné se neshoduje s typem výrazu na pravé straně vazby let. Očekávaný typ byl {1}, ale přijatý typ byl {2}. + + + + Unexpected quotation hole in expression. + Výraz obsahuje neočekávanou konstrukci quotation hole. + + + + The parameter is not a recognized method name. + Parametr není rozpoznaný název metody. + + + + Reset is not supported on this enumerator. + Tento enumerátor nepodporuje operaci resetování. + + + + The start of a range cannot be NaN. + Počáteční hodnota rozsahu nemůže být NaN. + + + + The step of a range cannot be NaN. + Krok rozsahu nemůže být NaN. + + + + The step of a range cannot be zero. + Krok rozsahu nemůže být nula. + + + + The System.Threading.SynchronizationContext.Current of the calling thread is null. + Vlastnost System.Threading.SynchronizationContext.Current volajícího vlákna má hodnotu null. + + + + The tuple index '{1}' was out of range for tuple type '{0}'. + Index {1} řazené kolekce členů byl mimo rozsah řazené kolekce členů typu {0}. + + + + Failed to bind constructor + Nezdařilo se vytvořit vazbu konstruktoru. + + + + Failed to bind field '{0}' + Nezdařilo se vytvořit vazbu pole {0}. + + + + Failed to bind property '{0}' + Nezdařilo se vytvořit vazbu vlastnosti {0}. + + + + Failed to bind type '{0}' in assembly '{1}' + Nezdařilo se vytvořit vazbu typu {0} v sestavení {1}. + + + + Incompatible record length + Nekompatibilní délka záznamu + + + + Incorrect instance type + Nesprávný typ instance + + + + Incorrect number of arguments + Nesprávný počet argumentů + + + + Incorrect type + Nesprávný typ + + + + Invalid function type + Neplatný typ funkce + + + + The member is non-static (instance), but no receiver object was supplied + Člen není statický (patří k instanci), ale nebyl poskytnut žádný objekt příjemce. + + + + Parent type cannot be null + Nadřazený typ nemůže mít hodnotu null. + + + + Reading a set-only property + Čtení vlastnosti, které podporuje pouze operaci set + + + + Receiver object was unexpected, as member is static + Objekt příjemce nebyl očekáván, protože člen je statický. + + + + Type mismatch when building '{0}': the expression has the wrong type. Expected '{1}', but received type '{2}'. + Neshoda typů při sestavování {0}: výraz je chybného typu. Očekávaný typ byl {1}, ale přijatý typ byl {2}. + + + + Type mismatch when building '{0}': function type doesn't match delegate type. Expected '{1}', but received type '{2}'. + Neshoda typů při sestavování {0}: typ funkce neodpovídá typu delegáta. Očekávaný typ byl {1}, ale přijatý typ byl {2}. + + + + Type mismatch when splicing expression into quotation literal. The type of the expression tree being inserted doesn't match the type expected by the splicing operation. Expected '{0}', but received type '{1}'. Consider type-annotating with the expected expression type, e.g., (%% x : {0}) or (%x : {0}). + Neshoda typů při spojování výrazu do literálu citace. Typ vkládaného stromu výrazů neodpovídá typu, který očekává operace spojení. Očekávaný typ byl {0}, ale přijatý typ byl {1}. Zvažte uvedení očekávaného typu výrazu, např. (%% x : {0}) nebo (%x : {0}). + + + + Tuple access out of range + Přístup do řazené kolekce členů mimo rozsah + + + + The tuple lengths are different + Délky řazených kolekcí členů se liší. + + + + F# union type requires different number of arguments + Typ union jazyka F# vyžaduje odlišný počet argumentů. + + + + Writing a get-only property + Zápis vlastnosti, která podporuje pouze operaci get + + + + The method '{0}' expects {1} type arguments but {2} were provided + Počet očekávaných argumentů typu metody {0} je {1}, ale počet poskytnutých argumentů je {2}. + + + + An index satisfying the predicate was not found in the collection. + V kolekci nebyl nalezen index splňující predikát. + + + + The constructor method '{0}' for the union case could not be found + Metoda konstruktoru {0} pro případ typu union nebyla nalezena. + + + + first class uses of '%' or '%%' are not permitted + Použití % nebo %% jako výrazů první třídy není povoleno. + + + + MoveNext not called, or finished + Nebyla volána nebo dokončena metoda MoveNext. + + + + Multiple CompilationMappingAttributes, expected at most one + Více atributů CompilationMappingAttributes, byl očekáván nejvýše jeden. + + + + Bad float value + Chybná hodnota float + + + + Bad format specifier:{0} + Chybný specifikátor formátu: {0} + + + + Bad integer supplied to dynamic formatter + Dynamickému formátovacímu modulu byla předána chybná celočíselná hodnota. + + + + Expected a precision argument + Byl očekáván argument určující přesnost. + + + + Expected a width argument + Byl očekáván argument určující šířku. + + + + The # formatting modifier is invalid in F# + Modifikátor formátu # je v jazyce F# neplatný. + + + + Missing format specifier + Chybí specifikátor formátu. + + + + Not a function type + Nejedná se o typ funkce. + + + + Bad format specifier (precision) + Chybný specifikátor formátu (přesnost) + + + + Bad format specifier (after {0}) + Chybný specifikátor formátu (za {0}) + + + + Bad format specifier (width) + Chybný specifikátor formátu (šířka) + + + + Could not bind function {0} in type {1} + Nebylo možné vytvořit vazbu funkce {0} v typu {1}. + + + + Could not bind property {0} in type {1} + Nebylo možné vytvořit vazbu vlastnosti {0} v typu {1}. + + + + Could not bind to method + Nebylo možné vytvořit vazbu na metodu. + + + + Cannot take the address of this quotation + Nelze získat adresu této citace. + + + + Failed to bind assembly '{0}' while processing quotation data + Při zpracování dat citace se nezdařilo vytvořit vazbu sestavení {0}. + + + + ill formed expression: AppOp or LetOp + Chybně vytvořený výraz: AppOp nebo LetOp + + + + type argument out of range + Argument typu je mimo rozsah. + + + + This value cannot be mutated + Tato hodnota nemůže být mutována. + + + + The option value was None + Hodnota možnosti byla None. + + + + A continuation provided by Async.FromContinuations was invoked multiple times + Pokračování poskytované metodou Async.FromContinuations bylo vyvoláno vícekrát. + + + + The record type '{0}' is invalid. Required constructor is not defined. + Záznam typu {0} je neplatný. Požadovaný konstruktor není definován. + + + + The tuple type '{0}' is invalid. Required constructor is not defined. + Řazená kolekce členů typu {0} je neplatná. Požadovaný konstruktor není definován. + + + + The input sequence contains more than one element. + Vstupní sekvence obsahuje více než jeden element. + + + + 'thenBy' and 'thenByDescending' may only be used with an ordered input + Operátory thenBy a thenByDescending lze použít pouze pro uspořádaný vstup. + + + + Unrecognized use of a 'sumBy' or 'averageBy' operator in a query. In queries whose original data is of static type IQueryable, these operators may only be used with result type int32, int64, single, double or decimal + Nerozpoznané použití operátoru sumBy nebo averageBy v dotazu. V dotazech, jejichž původní data jsou statického typu IQueryable, je tyto operátory možné použít pouze s typem výsledku int32, int64, single, double nebo decimal. + + + + An if/then/else conditional or pattern matching expression with multiple branches is not permitted in a query. An if/then/else conditional may be used. + V dotazu není povolen podmíněný výraz if/then/else nebo výraz porovnávání vzorů s více větvemi. Je možné použít podmíněný výraz if/then/else. + + + + This is not a valid query expression. The following construct was used in a query but is not recognized by the F#-to-LINQ query translator:\n{0}\nCheck the specification of permitted queries and consider moving some of the operations out of the query expression. + Toto není platný výraz dotazu. V dotazu byla použita následující konstrukce, která není rozpoznána překladačem dotazu z jazyka F# do jazyka LINQ:\n{0}\nProstudujte si specifikace povolených dotazů a zvažte přesunutí některých operací mimo výraz dotazu. + + + + This is not a valid query expression. The method '{0}' was used in a query but is not recognized by the F#-to-LINQ query translator. Check the specification of permitted queries and consider moving some of the operations out of the query expression + Toto není platný výraz dotazu. V dotazu byla použita metoda {0}, která není rozpoznána překladačem dotazu z jazyka F# do jazyka LINQ. Prostudujte si specifikace povolených dotazů a zvažte přesunutí některých operací mimo výraz dotazu. + + + + This is not a valid query expression. The property '{0}' was used in a query but is not recognized by the F#-to-LINQ query translator. Check the specification of permitted queries and consider moving some of the operations out of the query expression. + Toto není platný výraz dotazu. V dotazu byla použita vlastnost {0}, která není rozpoznána překladačem dotazu z jazyka F# do jazyka LINQ. Prostudujte si specifikace povolených dotazů a zvažte přesunutí některých operací mimo výraz dotazu. + + + + This is not a valid query expression. The construct '{0}' was used in a query but is not recognized by the F#-to-LINQ query translator. Check the specification of permitted queries and consider moving some of the operations out of the query expression. + Toto není platný výraz dotazu. V dotazu byla použita konstrukce {0}, která není rozpoznána překladačem dotazu z jazyka F# do jazyka LINQ. Prostudujte si specifikace povolených dotazů a zvažte přesunutí některých operací mimo výraz dotazu. + + + + + \ No newline at end of file diff --git a/src/fsharp/FSharp.Core/xlf/FSCore.de.xlf b/src/fsharp/FSharp.Core/xlf/FSCore.de.xlf new file mode 100644 index 00000000000..cfcd71290fa --- /dev/null +++ b/src/fsharp/FSharp.Core/xlf/FSCore.de.xlf @@ -0,0 +1,712 @@ + + + + + + The match cases were incomplete + Die Übereinstimmungsfälle waren unvollständig. + + + + First class uses of address-of operators are not permitted. + Verwendungen der ersten Klasse von address-of-Operatoren sind nicht zulässig. + + + + The arrays have different lengths. + Die Länge der Arrays ist unterschiedlich. + + + + The input array was empty. + Das Eingabearray war leer. + + + + Input string was not in a correct format. + Die Eingabezeichenfolge hat das falsche Format. + + + + Expecting delegate type. + Es wird ein Delegattyp erwartet. + + + + Dynamic invocation of DivideByInt involving coercions is not supported. + Der dynamische Aufruf von DivideByInt, der Koersionen umfasst, wird nicht unterstützt. + + + + Dynamic invocation of op_Addition involving coercions is not supported. + Der dynamische Aufruf von op_Addition, der Koersionen umfasst, wird nicht unterstützt. + + + + Dynamic invocation of op_Addition involving overloading is not supported. + Der dynamische Aufruf von op_Addition, der eine Überladung umfasst, wird nicht unterstützt. + + + + Dynamic invocation of op_Multiply involving coercions is not supported. + Der dynamische Aufruf von op_Multiply, der Koersionen umfasst, wird nicht unterstützt. + + + + Dynamic invocation of op_Multiply involving overloading is not supported. + Der dynamische Aufruf von op_Multiply, der eine Überladung umfasst, wird nicht unterstützt. + + + + The end of a range cannot be NaN. + Das Ende des Bereichs kann nicht NaN sein. + + + + Enumeration already finished. + Die Enumeration wurde bereits beendet. + + + + Enumeration has not started. Call MoveNext. + Die Enumeration wurde nicht gestartet. Rufen Sie "MoveNext" auf. + + + + Set contains no elements. + Die Gruppe enthält keine Elemente. + + + + Enumeration based on System.Int32 exceeded System.Int32.MaxValue. + Bei der Enumeration basierend auf System.Int32 wurde System.Int32.MaxValue überschritten. + + + + Failed to read enough bytes from the stream. + Fehler beim Lesen ausreichender Bytes aus dem Strom. + + + + Failure during generic comparison: the type '{0}' does not implement the System.IComparable interface. This error may be arise from the use of a function such as 'compare', 'max' or 'min' or a data structure such as 'Set' or 'Map' whose keys contain instances of this type. + Fehler beim generischen Vergleich: Der Typ "{0}" implementiert die System.IComparable-Schnittstelle nicht. Dieser Fehler kann durch Verwendung einer Funktion wie "compare", "max" oder "min" oder einer Datenstruktur wie "Set" oder "Map" verursacht werden, deren Schlüssel Instanzen dieses Typs enthalten. + + + + The index was outside the range of elements in the list. + Der Index war außerhalb des Bereichs von Elementen in der Liste. + + + + The input list was empty. + Die Eingabeliste war leer. + + + + The input must be non-negative. + Die Eingabe darf nicht negativ sein. + + + + The input must be positive. + Die Eingabe muss positiv sein. + + + + The input sequence was empty. + Die Eingabesequenz war leer. + + + + This is not a valid tuple type for the F# reflection library. + Dies ist kein gültiger Tupeltyp für die F#-Reflektionsbibliothek. + + + + The item, key, or index was not found in the collection. + Das Element, der Schlüssel oder der Index wurde in der Auflistung nicht gefunden. + + + + The lists had different lengths. + Die Längen der Listen waren unterschiedlich. + + + + The MailboxProcessor has already been started. + Der MailboxProcessor wurde bereits gestartet. + + + + MailboxProcessor.PostAndAsyncReply timed out. + Das Zeitlimit von MailboxProcessor.PostAndAsyncReply wurde überschritten. + + + + MailboxProcessor.PostAndReply timed out. + Das Zeitlimit von MailboxProcessor.PostAndReply wurde überschritten. + + + + Mailbox.Receive timed out. + Das Zeitlimit von Mailbox.Receive wurde überschritten. + + + + Mailbox.Scan timed out. + Das Zeitlimit von Mailbox.Scan wurde überschritten. + + + + Map values cannot be mutated. + Für Zuordnungswerte kann kein Mutating verwendet werden. + + + + The IAsyncResult object provided does not match this 'Cancel' operation. + Das bereitgestellte IAsyncResult-Objekt stimmt nicht mit diesem "Abbrechen"-Vorgang überein. + + + + The IAsyncResult object provided does not match this 'End' operation. + Das bereitgestellte IAsyncResult-Objekt stimmt nicht mit diesem "Beenden"-Vorgang überein. + + + + Negating the minimum value of a twos complement number is invalid. + Das Negieren des minimalen Wertes einer Ergänzungszahl ist unzulässig. + + + + The initialization of an object or value resulted in an object or value being accessed recursively before it was fully initialized. + Aufgrund der Initialisierung eines Objekts oder Werts erfolgte ein rekursiver Zugriff auf ein Objekt bzw. einen Wert, bevor die Initialisierung abgeschlossen war. + + + + The static initialization of a file or type resulted in static data being accessed recursively before it was fully initialized. + Aufgrund der statischen Initialisierung einer Datei oder des Typs erfolgte ein rekursiver Zugriff auf die Daten, bevor diese vollständig initialisiert waren. + + + + Arrays with non-zero base cannot be created on this platform. + Auf dieser Plattform können keine Arrays mit einer Basis ungleich null erstellt werden. + + + + Type '{0}' is not a function type. + Der Typ "{0}" ist kein Funktionstyp. + + + + Type '{0}' is not the representation of an F# exception declaration. + Der Typ "{0}" ist keine Darstellung einer F#-Ausnahmedeklaration. + + + + The function did not compute a permutation. + Die Funktion hat keine Permutation berechnet. + + + + Type '{0}' is not an F# record type. + Der Typ "{0}" ist kein F#-Datensatztyp. + + + + Type '{0}' is not a tuple type. + Der Typ "{0}" ist kein Tupeltyp. + + + + Type '{0}' is not an F# union type. + Der Typ "{0}" ist kein F#-Union-Typ. + + + + The two objects have different types and are not comparable. + Die beiden Objekte haben verschiedene Typen und sind nicht vergleichbar. + + + + The input sequence has an insufficient number of elements. + Die Eingabesequenz hat eine unzureichende Anzahl von Elementen. + + + + This object is for recursive equality calls and cannot be used for hashing. + Dieses Objekt ist für rekursive Gleichheitsaufrufe vorgesehen und kann nicht für Hashing verwendet werden. + + + + One of the elements in the array is null. + Eines der Elemente im Array ist NULL. + + + + The object is not an F# record value. + Das Objekt ist kein F#-Datensatzwert. + + + + The object is null and no type was given. Either pass a non-null object or a non-null type parameter. + Das Objekt ist NULL und kein Typ wurde angegeben. Übergeben Sie entweder einen Nicht-NULL-Objektparameter oder einen Nicht-NULL-Typparameter. + + + + The index is outside the legal range. + Der Index liegt außerhalb des zulässigen Bereichs. + + + + The type '{0}' is the representation of an F# exception declaration but its representation is private. You must specify BindingFlags.NonPublic to access private type representations. + Der Typ "{0}" ist die Darstellung einer F#-Ausnahmendeklaration, aber die Darstellung ist privat. Sie müssen BindingFlags.NonPublic angeben, um auf Darstellungen vom Typ "privat" zuzugreifen. + + + + The type '{0}' is an F# record type but its representation is private. You must specify BindingFlags.NonPublic to access private type representations. + Der Typ "{0}" ist ein F#-Datensatztyp, aber die Darstellung ist privat. Sie müssen BindingFlags.NonPublic angeben, um auf Darstellungen vom Typ "privat" zuzugreifen. + + + + The type '{0}' is an F# union type but its representation is private. You must specify BindingFlags.NonPublic to access private type representations. + Der Typ "{0}" ist ein F#-Union-Typ, aber die Darstellung ist privat. Sie müssen BindingFlags.NonPublic angeben, um auf Darstellungen vom Typ "privat" zuzugreifen. + + + + Expected exactly one type argument. + Es wurde genau ein Typargument erwartet. + + + + Expected exactly two type arguments. + Es wurden genau zwei Typargumente erwartet. + + + + Not a valid F# union case index. + Kein gültiger F#-Union-Fallindex. + + + + Type '{0}' did not have an F# record field named '{1}'. + Der Typ "{0}" wies kein F#-Datensatzfeld mit dem Namen "{1}" auf. + + + + Type '{0}' did not have an F# union case named '{1}'. + Der Typ "{0}" wies keinen F#-Union-Fall mit dem Namen "{1}" auf. + + + + Type mismatch when building '{0}': the type of the field was incorrect. Expected '{1}', but received type '{2}'. + Typenkonflikt beim Erstellen von "{0}": Der Typ des Felds war falsch. Erwartet wurde "{1}", aber der Typ "{2}" wurde empfangen. + + + + Type mismatch when building '{0}': body must return unit. Expected '{1}', but received type '{2}'. + Typenkonflikt beim Erstellen von "{0}": Der Textkörper muss eine Einheit zurückgeben. Erwartet wurde "{1}", aber der Typ "{2}" wurde empfangen. + + + + Type mismatch when building '{0}': condition expression must be of type bool. Expected '{1}', but received type '{2}'. + Typenkonflikt beim Erstellen von "{0}": Der Bedingungsausdruck muss vom Typ "boolesch" sein. Erwartet wurde "{1}", aber der Typ "{2}" wurde empfangen. + + + + Type mismatch when building '{0}': expected function type in function application or let binding. Expected '{1}', but received type '{2}'. + Typenkonflikt beim Erstellen von "{0}": Erwartet wurde ein Funktionstyp in der Anwendungs- oder Let-Bindung der Funktion. Erwartet wurde "{1}", aber der Typ "{2}" wurde empfangen. + + + + Type mismatch when building '{0}': expression doesn't match the tuple type. Expected '{1}', but received type '{2}'. + Typenkonflikt beim Erstellen von "{0}": Der Ausdruck stimmt nicht mit dem Tupeltyp überein. Erwartet wurde "{1}", aber der Typ "{2}" wurde empfangen. + + + + Type mismatch when building '{0}': types of expression does not match. Expected '{1}', but received type '{2}'. + Typenkonflikt beim Erstellen von "{0}": Die Typen des Ausdrucks stimmen nicht überein. Erwartet wurde "{1}", aber der Typ "{2}" wurde empfangen. + + + + Type mismatch when building '{0}': function argument type doesn't match. Expected '{1}', but received type '{2}'. + Typenkonflikt beim Erstellen von "{0}": Der Funktionsargumenttyp stimmt nicht überein. Erwartet wurde "{1}", aber der Typ "{2}" wurde empfangen. + + + + Type mismatch when building '{0}': guard must return boolean. Expected '{1}', but received type '{2}'. + Typenkonflikt beim Erstellen von "{0}": Schutz muss einen booleschen Wert zurückgeben. Erwartet wurde "{1}", aber der Typ "{2}" wurde empfangen. + + + + Type mismatch when building '{0}': incorrect argument type for an F# record. Expected '{1}', but received type '{2}'. + Typenkonflikt beim Erstellen von "{0}": Der Argumenttyp für einen F#-Datensatz ist falsch. Erwartet wurde "{1}", aber der Typ "{2}" wurde empfangen. + + + + Type mismatch when building '{0}': incorrect argument type for an F# union. Expected '{1}', but received type '{2}'. + Typenkonflikt beim Erstellen von "{0}": Der Argumenttyp für F#-Union ist falsch. Erwartet wurde "{1}", aber der Typ "{2}" wurde empfangen. + + + + Type mismatch when building '{0}': initializer doesn't match array type. Expected '{1}', but received type '{2}'. + Typenkonflikt beim Erstellen von "{0}": Der Initialisierer stimmt nicht mit dem Arraytyp überein. Erwartet wurde "{1}", aber der Typ "{2}" wurde empfangen. + + + + Type mismatch when building '{0}': invalid parameter for a method or indexer property. Expected '{1}', but received type '{2}'. + Typenkonflikt beim Erstellen von "{0}": Der Parameter für eine Methode oder Indexereigenschaft ist falsch. Erwartet wurde "{1}", aber der Typ "{2}" wurde empfangen. + + + + Type mismatch when building '{0}': body of the for loop must be lambda taking integer as an argument. Expected '{1}', but received type '{2}'. + Typenkonflikt beim Erstellen von "{0}": Der Textkörper der for-Schleife muss ein Lambda-Ausdruck sein, der einen Integer als Argument annimmt. Erwartet wurde "{1}", aber der Typ "{2}" wurde empfangen. + + + + Type mismatch when building '{0}': lower and upper bounds must be integers. Expected '{1}', but received type '{2}'. + Typenkonflikt beim Erstellen von "{0}": Die unteren und oberen Grenzwerte müssen Integer sein. Erwartet wurde "{1}", aber der Typ "{2}" wurde empfangen. + + + + Type mismatch when building '{0}': types of true and false branches differ. Expected '{1}', but received type '{2}'. + Typenkonflikt beim Erstellen von "{0}": Die Typen der Wahr- und Falsch-Verzweigungen stimmen nicht überein. Erwartet wurde "{1}", aber der Typ "{2}" wurde empfangen. + + + + Type mismatch when building '{0}': mismatched type of argument and tuple element. Expected '{1}', but received type '{2}'. + Typenkonflikt beim Erstellen von "{0}": Der Typ des Arguments und des Tupelelements stimmen nicht überein. Erwartet wurde "{1}", aber der Typ "{2}" wurde empfangen. + + + + Type mismatch when building '{0}': the variable type doesn't match the type of the right-hand-side of a let binding. Expected '{1}', but received type '{2}'. + Typenkonflikt beim Erstellen von "{0}": Der Variablentyp stimmt nicht mit dem Typ der rechten Seite einer Let-Bindung überein. Erwartet wurde "{1}", aber der Typ "{2}" wurde empfangen. + + + + Unexpected quotation hole in expression. + Unerwartes Quotation Hole in Ausdruck. + + + + The parameter is not a recognized method name. + Der Parameter ist kein bekannter Methodenname. + + + + Reset is not supported on this enumerator. + Das Zurücksetzen wird für diesen Enumerator nicht unterstützt. + + + + The start of a range cannot be NaN. + Der Start des Bereichs darf nicht NaN sein. + + + + The step of a range cannot be NaN. + Der Schritt eines Bereichs darf nicht NaN sein. + + + + The step of a range cannot be zero. + Der Schritt eines Bereichs darf nicht null sein. + + + + The System.Threading.SynchronizationContext.Current of the calling thread is null. + System.Threading.SynchronizationContext.Current des aufrufenden Threads ist NULL. + + + + The tuple index '{1}' was out of range for tuple type '{0}'. + Der Tupelindex "{1}" war für Tupeltyp "{0}" außerhalb des gültigen Bereichs. + + + + Failed to bind constructor + Fehler beim Binden des Konstruktors. + + + + Failed to bind field '{0}' + Fehler beim Binden des Felds "{0}". + + + + Failed to bind property '{0}' + Fehler beim Binden der Eigenschaft "{0}". + + + + Failed to bind type '{0}' in assembly '{1}' + Fehler beim Binden des Typs "{0}" in Assembly "{1}". + + + + Incompatible record length + Die Datensatzlänge ist nicht kompatibel. + + + + Incorrect instance type + Der Instanztyp ist falsch. + + + + Incorrect number of arguments + Die Anzahl der Argumente ist falsch. + + + + Incorrect type + Falscher Typ + + + + Invalid function type + Ungültiger Funktionstyp. + + + + The member is non-static (instance), but no receiver object was supplied + Das Member ist nicht statisch (Instanz), aber es wurde kein Empfängerobjekt bereitgestellt. + + + + Parent type cannot be null + Der übergeordnete Typ darf nicht NULL sein. + + + + Reading a set-only property + Es wird eine Eigenschaft gelesen, die nur festlegbar ist + + + + Receiver object was unexpected, as member is static + Das Empfängerobjekt wurde nicht erwartet, da das Member statisch ist. + + + + Type mismatch when building '{0}': the expression has the wrong type. Expected '{1}', but received type '{2}'. + Typenkonflikt beim Erstellen von "{0}": Der Ausdruck weist den falschen Typ auf. Erwartet wurde "{1}", aber der Typ "{2}" wurde empfangen. + + + + Type mismatch when building '{0}': function type doesn't match delegate type. Expected '{1}', but received type '{2}'. + Typenkonflikt beim Erstellen von "{0}": Der Funktionstyp stimmt nicht mit dem Delegattyp überein. Erwartet wurde "{1}", aber der Typ "{2}" wurde empfangen. + + + + Type mismatch when splicing expression into quotation literal. The type of the expression tree being inserted doesn't match the type expected by the splicing operation. Expected '{0}', but received type '{1}'. Consider type-annotating with the expected expression type, e.g., (%% x : {0}) or (%x : {0}). + Typenkonflikt beim Splicing des Ausdrucks in ein Quotation-Literal. Der Typ der eingefügten Ausdrucksbaumstruktur stimmt nicht mit dem Typ überein, der vom Splicing-Vorgang erwartet wurde. Typ '{0}' erwartet, '{1}' erhalten. Erwägen Sie Typanmerkungen mit dem erwarteten Ausdruckstyp, z. B. (%% x : {0}) oder (%x : {0}). + + + + Tuple access out of range + Der Tupelzugriff liegt außerhalb des zulässigen Bereichs. + + + + The tuple lengths are different + Die Tupellängen sind unterschiedlich. + + + + F# union type requires different number of arguments + F#-Union-Typ erfordert eine unterschiedliche Anzahl von Argumenten. + + + + Writing a get-only property + Es wird eine Eigenschaft geschrieben, die nur abrufbar ist + + + + The method '{0}' expects {1} type arguments but {2} were provided + Die Methode "{0}" erwartet {1} Typargumente, aber {2} wurden bereitgestellt. + + + + An index satisfying the predicate was not found in the collection. + In der Auflistung wurde kein Index gefunden, der das Prädikat erfüllt. + + + + The constructor method '{0}' for the union case could not be found + Die Konstruktormethode "{0}" für den Union-Fall wurde nicht gefunden. + + + + first class uses of '%' or '%%' are not permitted + Verwendungen der ersten Klasse von "%" oder "%%" sind nicht erlaubt. + + + + MoveNext not called, or finished + MoveNext wurde nicht aufgerufen oder ist beendet. + + + + Multiple CompilationMappingAttributes, expected at most one + Mehrere CompilationMappingAttributes, aber maximal eins wurde erwartet. + + + + Bad float value + Ungültiger Floatwert + + + + Bad format specifier:{0} + Ungültiger Formatbezeichner: {0} + + + + Bad integer supplied to dynamic formatter + Für den dynamischen Formatierer wurde ein ungültiger Integer bereitgestellt. + + + + Expected a precision argument + Es wurde ein precision-Argument erwartet. + + + + Expected a width argument + Es wurde ein width-Argument erwartet. + + + + The # formatting modifier is invalid in F# + Der #-Formatierungsmodifizierer ist in F# ungültig. + + + + Missing format specifier + Der Formatbezeichner fehlt. + + + + Not a function type + Kein Funktionstyp. + + + + Bad format specifier (precision) + Ungültiger Formatbezeichner (precision) + + + + Bad format specifier (after {0}) + Ungültiger Formatbezeichner (nach {0}) + + + + Bad format specifier (width) + Ungültiger Formatbezeichner (width) + + + + Could not bind function {0} in type {1} + Die Funktion "{0}" in Typ "{1}" konnte nicht gebunden werden. + + + + Could not bind property {0} in type {1} + Die Eigenschaft "{0}" in Typ "{1}" konnte nicht gebunden werden. + + + + Could not bind to method + Die Bindung an Methode war nicht möglich. + + + + Cannot take the address of this quotation + Die Adresse dieser Quotation kann nicht verwendet werden. + + + + Failed to bind assembly '{0}' while processing quotation data + Fehler beim Binden der Assembly "{0}" während der Verarbeitung der Quotation-Daten. + + + + ill formed expression: AppOp or LetOp + Unzulässig geformter Ausdruck: AppOp oder LetOp + + + + type argument out of range + Das Typargument liegt außerhalb des zulässigen Bereichs. + + + + This value cannot be mutated + Für diesen Wert darf kein Mutating verwendet werden. + + + + The option value was None + Der Optionswert war "Kein". + + + + A continuation provided by Async.FromContinuations was invoked multiple times + Eine von "Async.FromContinuations" bereitgestellte Fortsetzung wurde mehrfach aufgerufen. + + + + The record type '{0}' is invalid. Required constructor is not defined. + Der Datensatztyp "{0} " ist ungültig. Erforderlicher Konstruktor ist nicht definiert. + + + + The tuple type '{0}' is invalid. Required constructor is not defined. + Der Tupeltyp "{0}" ist ungültig. Erforderlicher Konstruktor ist nicht definiert. + + + + The input sequence contains more than one element. + Die Eingabesequenz enthält mehr als ein Element. + + + + 'thenBy' and 'thenByDescending' may only be used with an ordered input + thenBy und "thenByDescending" dürfen nur mit einer sortierten Eingabe verwendet werden. + + + + Unrecognized use of a 'sumBy' or 'averageBy' operator in a query. In queries whose original data is of static type IQueryable, these operators may only be used with result type int32, int64, single, double or decimal + Nicht erkannte Verwendung eines "sumBy"- oder "averageBy"-Operators in einer Abfrage. Bei Abfragen mit ursprünglichen Daten des statischen IQueryable-Typs dürfen diese Operatoren nur mit den Ergebnistypen int32, int64, single, double oder decimal verwendet werden. + + + + An if/then/else conditional or pattern matching expression with multiple branches is not permitted in a query. An if/then/else conditional may be used. + In einer Abfrage sind die bedingten Ausdrücke if/then/else oder der Musterabgleichausdruck mit mehrfachen Verzweigungen nicht zulässig. Eine if/then/else-Bedingung kann verwendet werden. + + + + This is not a valid query expression. The following construct was used in a query but is not recognized by the F#-to-LINQ query translator:\n{0}\nCheck the specification of permitted queries and consider moving some of the operations out of the query expression. + Dies ist kein gültiger Abfrageausdruck. Das folgende Konstrukt wurde in einer Abfrage verwendet, wird jedoch vom F#-to-LINQ-Abfragekonvertierungsprogramm nicht erkannt:\n{0}\nÜberprüfen Sie die Spezifikation von zulässigen Abfragen, und entfernen Sie unter Umständen einige Operationen aus dem Abfrageausdruck. + + + + This is not a valid query expression. The method '{0}' was used in a query but is not recognized by the F#-to-LINQ query translator. Check the specification of permitted queries and consider moving some of the operations out of the query expression + Dies ist kein gültiger Abfrageausdruck. Die Methode "{0}" wurde in einer Abfrage verwendet, wird aber vom F#-to-LINQ-Abfragekonvertierungsprogramm nicht erkannt. Überprüfen Sie die Spezifikation von zulässigen Abfragen, und entfernen Sie unter Umständen einige Operationen aus dem Abfrageausdruck. + + + + This is not a valid query expression. The property '{0}' was used in a query but is not recognized by the F#-to-LINQ query translator. Check the specification of permitted queries and consider moving some of the operations out of the query expression. + Dies ist kein gültiger Abfrageausdruck. Die Eigenschaft "{0}" wurde in einer Abfrage verwendet, wird jedoch vom F#-to-LINQ-Abfragekonvertierungsprogramm nicht erkannt. Überprüfen Sie die Spezifikation zulässiger Abfragen, und entfernen Sie unter Umständen einige Operationen aus dem Abfrageausdruck. + + + + This is not a valid query expression. The construct '{0}' was used in a query but is not recognized by the F#-to-LINQ query translator. Check the specification of permitted queries and consider moving some of the operations out of the query expression. + Dies ist kein gültiger Abfrageausdruck. Das Konstrukt "{0}" wurde in einer Abfrage verwendet, wird jedoch vom F#-to-LINQ-Abfragekonvertierungsprogramm nicht erkannt. Überprüfen Sie die Spezifikation zulässiger Abfragen, und entfernen Sie unter Umständen einige Operationen aus dem Abfrageausdruck. + + + + + \ No newline at end of file diff --git a/src/fsharp/FSharp.Core/xlf/FSCore.en.xlf b/src/fsharp/FSharp.Core/xlf/FSCore.en.xlf new file mode 100644 index 00000000000..10fca2c29ed --- /dev/null +++ b/src/fsharp/FSharp.Core/xlf/FSCore.en.xlf @@ -0,0 +1,712 @@ + + + + + + The match cases were incomplete + The match cases were incomplete + + + + First class uses of address-of operators are not permitted. + First class uses of address-of operators are not permitted. + + + + The arrays have different lengths. + The arrays have different lengths. + + + + The input array was empty. + The input array was empty. + + + + Input string was not in a correct format. + Input string was not in a correct format. + + + + Expecting delegate type. + Expecting delegate type. + + + + Dynamic invocation of DivideByInt involving coercions is not supported. + Dynamic invocation of DivideByInt involving coercions is not supported. + + + + Dynamic invocation of op_Addition involving coercions is not supported. + Dynamic invocation of op_Addition involving coercions is not supported. + + + + Dynamic invocation of op_Addition involving overloading is not supported. + Dynamic invocation of op_Addition involving overloading is not supported. + + + + Dynamic invocation of op_Multiply involving coercions is not supported. + Dynamic invocation of op_Multiply involving coercions is not supported. + + + + Dynamic invocation of op_Multiply involving overloading is not supported. + Dynamic invocation of op_Multiply involving overloading is not supported. + + + + The end of a range cannot be NaN. + The end of a range cannot be NaN. + + + + Enumeration already finished. + Enumeration already finished. + + + + Enumeration has not started. Call MoveNext. + Enumeration has not started. Call MoveNext. + + + + Set contains no elements. + Set contains no elements. + + + + Enumeration based on System.Int32 exceeded System.Int32.MaxValue. + Enumeration based on System.Int32 exceeded System.Int32.MaxValue. + + + + Failed to read enough bytes from the stream. + Failed to read enough bytes from the stream. + + + + Failure during generic comparison: the type '{0}' does not implement the System.IComparable interface. This error may be arise from the use of a function such as 'compare', 'max' or 'min' or a data structure such as 'Set' or 'Map' whose keys contain instances of this type. + Failure during generic comparison: the type '{0}' does not implement the System.IComparable interface. This error may be arise from the use of a function such as 'compare', 'max' or 'min' or a data structure such as 'Set' or 'Map' whose keys contain instances of this type. + + + + The index was outside the range of elements in the list. + The index was outside the range of elements in the list. + + + + The input list was empty. + The input list was empty. + + + + The input must be non-negative. + The input must be non-negative. + + + + The input must be positive. + The input must be positive. + + + + The input sequence was empty. + The input sequence was empty. + + + + This is not a valid tuple type for the F# reflection library. + This is not a valid tuple type for the F# reflection library. + + + + The item, key, or index was not found in the collection. + The item, key, or index was not found in the collection. + + + + The lists had different lengths. + The lists had different lengths. + + + + The MailboxProcessor has already been started. + The MailboxProcessor has already been started. + + + + MailboxProcessor.PostAndAsyncReply timed out. + MailboxProcessor.PostAndAsyncReply timed out. + + + + MailboxProcessor.PostAndReply timed out. + MailboxProcessor.PostAndReply timed out. + + + + Mailbox.Receive timed out. + Mailbox.Receive timed out. + + + + Mailbox.Scan timed out. + Mailbox.Scan timed out. + + + + Map values cannot be mutated. + Map values cannot be mutated. + + + + The IAsyncResult object provided does not match this 'Cancel' operation. + The IAsyncResult object provided does not match this 'Cancel' operation. + + + + The IAsyncResult object provided does not match this 'End' operation. + The IAsyncResult object provided does not match this 'End' operation. + + + + Negating the minimum value of a twos complement number is invalid. + Negating the minimum value of a twos complement number is invalid. + + + + The initialization of an object or value resulted in an object or value being accessed recursively before it was fully initialized. + The initialization of an object or value resulted in an object or value being accessed recursively before it was fully initialized. + + + + The static initialization of a file or type resulted in static data being accessed recursively before it was fully initialized. + The static initialization of a file or type resulted in static data being accessed recursively before it was fully initialized. + + + + Arrays with non-zero base cannot be created on this platform. + Arrays with non-zero base cannot be created on this platform. + + + + Type '{0}' is not a function type. + Type '{0}' is not a function type. + + + + Type '{0}' is not the representation of an F# exception declaration. + Type '{0}' is not the representation of an F# exception declaration. + + + + The function did not compute a permutation. + The function did not compute a permutation. + + + + Type '{0}' is not an F# record type. + Type '{0}' is not an F# record type. + + + + Type '{0}' is not a tuple type. + Type '{0}' is not a tuple type. + + + + Type '{0}' is not an F# union type. + Type '{0}' is not an F# union type. + + + + The two objects have different types and are not comparable. + The two objects have different types and are not comparable. + + + + The input sequence has an insufficient number of elements. + The input sequence has an insufficient number of elements. + + + + This object is for recursive equality calls and cannot be used for hashing. + This object is for recursive equality calls and cannot be used for hashing. + + + + One of the elements in the array is null. + One of the elements in the array is null. + + + + The object is not an F# record value. + The object is not an F# record value. + + + + The object is null and no type was given. Either pass a non-null object or a non-null type parameter. + The object is null and no type was given. Either pass a non-null object or a non-null type parameter. + + + + The index is outside the legal range. + The index is outside the legal range. + + + + The type '{0}' is the representation of an F# exception declaration but its representation is private. You must specify BindingFlags.NonPublic to access private type representations. + The type '{0}' is the representation of an F# exception declaration but its representation is private. You must specify BindingFlags.NonPublic to access private type representations. + + + + The type '{0}' is an F# record type but its representation is private. You must specify BindingFlags.NonPublic to access private type representations. + The type '{0}' is an F# record type but its representation is private. You must specify BindingFlags.NonPublic to access private type representations. + + + + The type '{0}' is an F# union type but its representation is private. You must specify BindingFlags.NonPublic to access private type representations. + The type '{0}' is an F# union type but its representation is private. You must specify BindingFlags.NonPublic to access private type representations. + + + + Expected exactly one type argument. + Expected exactly one type argument. + + + + Expected exactly two type arguments. + Expected exactly two type arguments. + + + + Not a valid F# union case index. + Not a valid F# union case index. + + + + Type '{0}' did not have an F# record field named '{1}'. + Type '{0}' did not have an F# record field named '{1}'. + + + + Type '{0}' did not have an F# union case named '{1}'. + Type '{0}' did not have an F# union case named '{1}'. + + + + Type mismatch when building '{0}': the type of the field was incorrect. Expected '{1}', but received type '{2}'. + Type mismatch when building '{0}': the type of the field was incorrect. Expected '{1}', but received type '{2}'. + + + + Type mismatch when building '{0}': body must return unit. Expected '{1}', but received type '{2}'. + Type mismatch when building '{0}': body must return unit. Expected '{1}', but received type '{2}'. + + + + Type mismatch when building '{0}': condition expression must be of type bool. Expected '{1}', but received type '{2}'. + Type mismatch when building '{0}': condition expression must be of type bool. Expected '{1}', but received type '{2}'. + + + + Type mismatch when building '{0}': expected function type in function application or let binding. Expected '{1}', but received type '{2}'. + Type mismatch when building '{0}': expected function type in function application or let binding. Expected '{1}', but received type '{2}'. + + + + Type mismatch when building '{0}': expression doesn't match the tuple type. Expected '{1}', but received type '{2}'. + Type mismatch when building '{0}': expression doesn't match the tuple type. Expected '{1}', but received type '{2}'. + + + + Type mismatch when building '{0}': types of expression does not match. Expected '{1}', but received type '{2}'. + Type mismatch when building '{0}': types of expression does not match. Expected '{1}', but received type '{2}'. + + + + Type mismatch when building '{0}': function argument type doesn't match. Expected '{1}', but received type '{2}'. + Type mismatch when building '{0}': function argument type doesn't match. Expected '{1}', but received type '{2}'. + + + + Type mismatch when building '{0}': guard must return boolean. Expected '{1}', but received type '{2}'. + Type mismatch when building '{0}': guard must return boolean. Expected '{1}', but received type '{2}'. + + + + Type mismatch when building '{0}': incorrect argument type for an F# record. Expected '{1}', but received type '{2}'. + Type mismatch when building '{0}': incorrect argument type for an F# record. Expected '{1}', but received type '{2}'. + + + + Type mismatch when building '{0}': incorrect argument type for an F# union. Expected '{1}', but received type '{2}'. + Type mismatch when building '{0}': incorrect argument type for an F# union. Expected '{1}', but received type '{2}'. + + + + Type mismatch when building '{0}': initializer doesn't match array type. Expected '{1}', but received type '{2}'. + Type mismatch when building '{0}': initializer doesn't match array type. Expected '{1}', but received type '{2}'. + + + + Type mismatch when building '{0}': invalid parameter for a method or indexer property. Expected '{1}', but received type '{2}'. + Type mismatch when building '{0}': invalid parameter for a method or indexer property. Expected '{1}', but received type '{2}'. + + + + Type mismatch when building '{0}': body of the for loop must be lambda taking integer as an argument. Expected '{1}', but received type '{2}'. + Type mismatch when building '{0}': body of the for loop must be lambda taking integer as an argument. Expected '{1}', but received type '{2}'. + + + + Type mismatch when building '{0}': lower and upper bounds must be integers. Expected '{1}', but received type '{2}'. + Type mismatch when building '{0}': lower and upper bounds must be integers. Expected '{1}', but received type '{2}'. + + + + Type mismatch when building '{0}': types of true and false branches differ. Expected '{1}', but received type '{2}'. + Type mismatch when building '{0}': types of true and false branches differ. Expected '{1}', but received type '{2}'. + + + + Type mismatch when building '{0}': mismatched type of argument and tuple element. Expected '{1}', but received type '{2}'. + Type mismatch when building '{0}': mismatched type of argument and tuple element. Expected '{1}', but received type '{2}'. + + + + Type mismatch when building '{0}': the variable type doesn't match the type of the right-hand-side of a let binding. Expected '{1}', but received type '{2}'. + Type mismatch when building '{0}': the variable type doesn't match the type of the right-hand-side of a let binding. Expected '{1}', but received type '{2}'. + + + + Unexpected quotation hole in expression. + Unexpected quotation hole in expression. + + + + The parameter is not a recognized method name. + The parameter is not a recognized method name. + + + + Reset is not supported on this enumerator. + Reset is not supported on this enumerator. + + + + The start of a range cannot be NaN. + The start of a range cannot be NaN. + + + + The step of a range cannot be NaN. + The step of a range cannot be NaN. + + + + The step of a range cannot be zero. + The step of a range cannot be zero. + + + + The System.Threading.SynchronizationContext.Current of the calling thread is null. + The System.Threading.SynchronizationContext.Current of the calling thread is null. + + + + The tuple index '{1}' was out of range for tuple type '{0}'. + The tuple index '{1}' was out of range for tuple type '{0}'. + + + + Failed to bind constructor + Failed to bind constructor + + + + Failed to bind field '{0}' + Failed to bind field '{0}' + + + + Failed to bind property '{0}' + Failed to bind property '{0}' + + + + Failed to bind type '{0}' in assembly '{1}' + Failed to bind type '{0}' in assembly '{1}' + + + + Incompatible record length + Incompatible record length + + + + Incorrect instance type + Incorrect instance type + + + + Incorrect number of arguments + Incorrect number of arguments + + + + Incorrect type + Incorrect type + + + + Invalid function type + Invalid function type + + + + The member is non-static (instance), but no receiver object was supplied + The member is non-static (instance), but no receiver object was supplied + + + + Parent type cannot be null + Parent type cannot be null + + + + Reading a set-only property + Reading a set-only property + + + + Receiver object was unexpected, as member is static + Receiver object was unexpected, as member is static + + + + Type mismatch when building '{0}': the expression has the wrong type. Expected '{1}', but received type '{2}'. + Type mismatch when building '{0}': the expression has the wrong type. Expected '{1}', but received type '{2}'. + + + + Type mismatch when building '{0}': function type doesn't match delegate type. Expected '{1}', but received type '{2}'. + Type mismatch when building '{0}': function type doesn't match delegate type. Expected '{1}', but received type '{2}'. + + + + Type mismatch when splicing expression into quotation literal. The type of the expression tree being inserted doesn't match the type expected by the splicing operation. Expected '{0}', but received type '{1}'. Consider type-annotating with the expected expression type, e.g., (%% x : {0}) or (%x : {0}). + Type mismatch when splicing expression into quotation literal. The type of the expression tree being inserted doesn't match the type expected by the splicing operation. Expected '{0}', but received type '{1}'. Consider type-annotating with the expected expression type, e.g., (%% x : {0}) or (%x : {0}). + + + + Tuple access out of range + Tuple access out of range + + + + The tuple lengths are different + The tuple lengths are different + + + + F# union type requires different number of arguments + F# union type requires different number of arguments + + + + Writing a get-only property + Writing a get-only property + + + + The method '{0}' expects {1} type arguments but {2} were provided + The method '{0}' expects {1} type arguments but {2} were provided + + + + An index satisfying the predicate was not found in the collection. + An index satisfying the predicate was not found in the collection. + + + + The constructor method '{0}' for the union case could not be found + The constructor method '{0}' for the union case could not be found + + + + first class uses of '%' or '%%' are not permitted + first class uses of '%' or '%%' are not permitted + + + + MoveNext not called, or finished + MoveNext not called, or finished + + + + Multiple CompilationMappingAttributes, expected at most one + Multiple CompilationMappingAttributes, expected at most one + + + + Bad float value + Bad float value + + + + Bad format specifier:{0} + Bad format specifier:{0} + + + + Bad integer supplied to dynamic formatter + Bad integer supplied to dynamic formatter + + + + Expected a precision argument + Expected a precision argument + + + + Expected a width argument + Expected a width argument + + + + The # formatting modifier is invalid in F# + The # formatting modifier is invalid in F# + + + + Missing format specifier + Missing format specifier + + + + Not a function type + Not a function type + + + + Bad format specifier (precision) + Bad format specifier (precision) + + + + Bad format specifier (after {0}) + Bad format specifier (after {0}) + + + + Bad format specifier (width) + Bad format specifier (width) + + + + Could not bind function {0} in type {1} + Could not bind function {0} in type {1} + + + + Could not bind property {0} in type {1} + Could not bind property {0} in type {1} + + + + Could not bind to method + Could not bind to method + + + + Cannot take the address of this quotation + Cannot take the address of this quotation + + + + Failed to bind assembly '{0}' while processing quotation data + Failed to bind assembly '{0}' while processing quotation data + + + + ill formed expression: AppOp or LetOp + ill formed expression: AppOp or LetOp + + + + type argument out of range + type argument out of range + + + + This value cannot be mutated + This value cannot be mutated + + + + The option value was None + The option value was None + + + + A continuation provided by Async.FromContinuations was invoked multiple times + A continuation provided by Async.FromContinuations was invoked multiple times + + + + The record type '{0}' is invalid. Required constructor is not defined. + The record type '{0}' is invalid. Required constructor is not defined. + + + + The tuple type '{0}' is invalid. Required constructor is not defined. + The tuple type '{0}' is invalid. Required constructor is not defined. + + + + The input sequence contains more than one element. + The input sequence contains more than one element. + + + + 'thenBy' and 'thenByDescending' may only be used with an ordered input + 'thenBy' and 'thenByDescending' may only be used with an ordered input + + + + Unrecognized use of a 'sumBy' or 'averageBy' operator in a query. In queries whose original data is of static type IQueryable, these operators may only be used with result type int32, int64, single, double or decimal + Unrecognized use of a 'sumBy' or 'averageBy' operator in a query. In queries whose original data is of static type IQueryable, these operators may only be used with result type int32, int64, single, double or decimal + + + + An if/then/else conditional or pattern matching expression with multiple branches is not permitted in a query. An if/then/else conditional may be used. + An if/then/else conditional or pattern matching expression with multiple branches is not permitted in a query. An if/then/else conditional may be used. + + + + This is not a valid query expression. The following construct was used in a query but is not recognized by the F#-to-LINQ query translator:\n{0}\nCheck the specification of permitted queries and consider moving some of the operations out of the query expression. + This is not a valid query expression. The following construct was used in a query but is not recognized by the F#-to-LINQ query translator:\n{0}\nCheck the specification of permitted queries and consider moving some of the operations out of the query expression. + + + + This is not a valid query expression. The method '{0}' was used in a query but is not recognized by the F#-to-LINQ query translator. Check the specification of permitted queries and consider moving some of the operations out of the query expression + This is not a valid query expression. The method '{0}' was used in a query but is not recognized by the F#-to-LINQ query translator. Check the specification of permitted queries and consider moving some of the operations out of the query expression + + + + This is not a valid query expression. The property '{0}' was used in a query but is not recognized by the F#-to-LINQ query translator. Check the specification of permitted queries and consider moving some of the operations out of the query expression. + This is not a valid query expression. The property '{0}' was used in a query but is not recognized by the F#-to-LINQ query translator. Check the specification of permitted queries and consider moving some of the operations out of the query expression. + + + + This is not a valid query expression. The construct '{0}' was used in a query but is not recognized by the F#-to-LINQ query translator. Check the specification of permitted queries and consider moving some of the operations out of the query expression. + This is not a valid query expression. The construct '{0}' was used in a query but is not recognized by the F#-to-LINQ query translator. Check the specification of permitted queries and consider moving some of the operations out of the query expression. + + + + + \ No newline at end of file diff --git a/src/fsharp/FSharp.Core/xlf/FSCore.es.xlf b/src/fsharp/FSharp.Core/xlf/FSCore.es.xlf new file mode 100644 index 00000000000..46a617777f6 --- /dev/null +++ b/src/fsharp/FSharp.Core/xlf/FSCore.es.xlf @@ -0,0 +1,712 @@ + + + + + + The match cases were incomplete + Los casos de coincidencia estaban incompletos. + + + + First class uses of address-of operators are not permitted. + No se permite el uso de operadores address-of en la primera clase. + + + + The arrays have different lengths. + Las matrices tienen una longitud diferente. + + + + The input array was empty. + La matriz de entrada estaba vacía. + + + + Input string was not in a correct format. + La cadena de entrada no tiene el formato correcto. + + + + Expecting delegate type. + Se espera un tipo de delegado. + + + + Dynamic invocation of DivideByInt involving coercions is not supported. + No se admite la invocación dinámica de DivideByInt que implique conversiones. + + + + Dynamic invocation of op_Addition involving coercions is not supported. + No se admite la invocación dinámica de op_Addition que implique conversiones. + + + + Dynamic invocation of op_Addition involving overloading is not supported. + No se admite la invocación dinámica de op_Addition que implique sobrecarga. + + + + Dynamic invocation of op_Multiply involving coercions is not supported. + No se admite la invocación dinámica de op_Multiply que implique conversiones. + + + + Dynamic invocation of op_Multiply involving overloading is not supported. + No se admite la invocación dinámica de op_Multiply que implique sobrecarga. + + + + The end of a range cannot be NaN. + El final de un intervalo no puede ser NaN. + + + + Enumeration already finished. + Enumeración finalizada. + + + + Enumeration has not started. Call MoveNext. + No se ha iniciado la enumeración. Llame a MoveNext. + + + + Set contains no elements. + Set no contiene elementos. + + + + Enumeration based on System.Int32 exceeded System.Int32.MaxValue. + La enumeración basada en System.Int32 superaba el valor de System.Int32.MaxValue. + + + + Failed to read enough bytes from the stream. + No se pudieron leer suficientes bytes del flujo. + + + + Failure during generic comparison: the type '{0}' does not implement the System.IComparable interface. This error may be arise from the use of a function such as 'compare', 'max' or 'min' or a data structure such as 'Set' or 'Map' whose keys contain instances of this type. + Error durante la comparación genérica: el tipo '{0}' no implementa la interfaz System.IComparable. Este error puede deberse al uso de una función como 'compare', 'max' o 'min', o una estructura de datos como 'Set' o 'Map' cuyas claves contienen instancias de este tipo. + + + + The index was outside the range of elements in the list. + El índice estaba fuera del intervalo de elementos de la lista. + + + + The input list was empty. + La lista de entrada estaba vacía. + + + + The input must be non-negative. + La entrada no debe ser negativa. + + + + The input must be positive. + El valor de entrada debe ser positivo. + + + + The input sequence was empty. + La secuencia de entrada estaba vacía. + + + + This is not a valid tuple type for the F# reflection library. + Este no es un tipo de tupla válido para la biblioteca de reflexión F#. + + + + The item, key, or index was not found in the collection. + No se encontró el elemento, la clave o el índice en la colección. + + + + The lists had different lengths. + Las listas tenían longitudes diferentes. + + + + The MailboxProcessor has already been started. + Ya se inició MailboxProcessor. + + + + MailboxProcessor.PostAndAsyncReply timed out. + Se agotó el tiempo de espera de MailboxProcessor.PostAndAsyncReply. + + + + MailboxProcessor.PostAndReply timed out. + Se agotó el tiempo de espera de MailboxProcessor.PostAndReply. + + + + Mailbox.Receive timed out. + Se agotó el tiempo de espera de Mailbox.Receive. + + + + Mailbox.Scan timed out. + Se agotó el tiempo de espera de Mailbox.Scan. + + + + Map values cannot be mutated. + Los valores de Map no son mutables. + + + + The IAsyncResult object provided does not match this 'Cancel' operation. + El objeto IAsyncResult proporcionado no coincide con esta operación 'Cancel'. + + + + The IAsyncResult object provided does not match this 'End' operation. + El objeto IAsyncResult proporcionado no coincide con la operación 'End'. + + + + Negating the minimum value of a twos complement number is invalid. + La negación del valor mínimo de un número complementario de dos no es válida. + + + + The initialization of an object or value resulted in an object or value being accessed recursively before it was fully initialized. + La inicialización de un objeto o valor generó un objeto o valor al que se obtiene acceso recursivamente antes de haberse inicializado totalmente. + + + + The static initialization of a file or type resulted in static data being accessed recursively before it was fully initialized. + La inicialización estática de un archivo o tipo generó datos estáticos a los que se obtiene acceso recursivamente antes de haberse inicializado + + + + Arrays with non-zero base cannot be created on this platform. + No se pueden crear matrices con base distinta de cero en esta plataforma. + + + + Type '{0}' is not a function type. + El tipo '{0}' no es un tipo de función. + + + + Type '{0}' is not the representation of an F# exception declaration. + El tipo '{0}' no es la representación de una declaración de excepción F#. + + + + The function did not compute a permutation. + La función no calculó una permutación. + + + + Type '{0}' is not an F# record type. + El tipo '{0}' no es un tipo de registro F#. + + + + Type '{0}' is not a tuple type. + El tipo '{0}' no es un tipo de tupla. + + + + Type '{0}' is not an F# union type. + El tipo '{0}' no es un tipo de unión F#. + + + + The two objects have different types and are not comparable. + Los dos objetos tienen tipos diferentes y no se pueden comparar. + + + + The input sequence has an insufficient number of elements. + La secuencia de entrada tiene un número insuficiente de elementos. + + + + This object is for recursive equality calls and cannot be used for hashing. + Este objeto es para llamadas de igualdad recursivas y no se puede usar para algoritmos hash. + + + + One of the elements in the array is null. + Uno de los elementos de la matriz es nulo. + + + + The object is not an F# record value. + El objeto no es un valor de registro F#. + + + + The object is null and no type was given. Either pass a non-null object or a non-null type parameter. + El objeto es nulo y no se proporcionó ningún tipo. Pase un objeto o un parámetro de tipo que no sean nulos. + + + + The index is outside the legal range. + El índice está fuera del intervalo correcto. + + + + The type '{0}' is the representation of an F# exception declaration but its representation is private. You must specify BindingFlags.NonPublic to access private type representations. + El tipo '{0}' es la representación de una declaración de excepción F# pero su representación es privada. Debe especificar BindingFlags.NonPublic para obtener acceso a representaciones de tipo privadas. + + + + The type '{0}' is an F# record type but its representation is private. You must specify BindingFlags.NonPublic to access private type representations. + El tipo '{0}' es un tipo de registro F# pero su representación es privada. Debe especificar BindingFlags.NonPublic para obtener acceso a representaciones de tipo privadas. + + + + The type '{0}' is an F# union type but its representation is private. You must specify BindingFlags.NonPublic to access private type representations. + El tipo '{0}' es un tipo de unión F# pero su representación es privada. Debe especificar BindingFlags.NonPublic para obtener acceso a representaciones de tipo privadas. + + + + Expected exactly one type argument. + Se esperaba exactamente un argumento de tipo. + + + + Expected exactly two type arguments. + Se esperaban exactamente dos argumentos de tipo. + + + + Not a valid F# union case index. + No es un índice de caso de unión F# válido. + + + + Type '{0}' did not have an F# record field named '{1}'. + El tipo '{0}' no tenía un campo de registro F# denominado '{1}'. + + + + Type '{0}' did not have an F# union case named '{1}'. + El tipo '{0}' no tenía un caso de unión F# denominado '{1}'. + + + + Type mismatch when building '{0}': the type of the field was incorrect. Expected '{1}', but received type '{2}'. + Incoherencia de tipos al compilar '{0}': el tipo del campo era incorrecto. Se esperaba '{1}', pero se recibió el tipo '{2}'. + + + + Type mismatch when building '{0}': body must return unit. Expected '{1}', but received type '{2}'. + Incoherencia de tipos al compilar '{0}': el cuerpo debe devolver una unidad. Se esperaba '{1}', pero se recibió el tipo '{2}'. + + + + Type mismatch when building '{0}': condition expression must be of type bool. Expected '{1}', but received type '{2}'. + Incoherencia de tipos al compilar '{0}': la expresión de condición debe ser de tipo booleano. Se esperaba '{1}', pero se recibió el tipo '{2}'. + + + + Type mismatch when building '{0}': expected function type in function application or let binding. Expected '{1}', but received type '{2}'. + Incoherencia de tipos al compilar '{0}': se esperaba un tipo de función en la aplicación de función o un enlace let. Se esperaba '{1}', pero se recibió el tipo '{2}'. + + + + Type mismatch when building '{0}': expression doesn't match the tuple type. Expected '{1}', but received type '{2}'. + Incoherencia de tipos al compilar '{0}': la expresión no coincide con el tipo de tupla. Se esperaba '{1}', pero se recibió el tipo '{2}'. + + + + Type mismatch when building '{0}': types of expression does not match. Expected '{1}', but received type '{2}'. + Incoherencia de tipos al compilar '{0}': los tipos de la expresión no coinciden. Se esperaba '{1}', pero se recibió el tipo '{2}'. + + + + Type mismatch when building '{0}': function argument type doesn't match. Expected '{1}', but received type '{2}'. + Incoherencia de tipos al compilar '{0}': el tipo de argumento de función no coincide. Se esperaba '{1}', pero se recibió el tipo '{2}'. + + + + Type mismatch when building '{0}': guard must return boolean. Expected '{1}', but received type '{2}'. + Incoherencia de tipos al compilar '{0}': la restricción debe devolver un tipo booleano. Se esperaba '{1}', pero se recibió el tipo '{2}'. + + + + Type mismatch when building '{0}': incorrect argument type for an F# record. Expected '{1}', but received type '{2}'. + Incoherencia de tipos al compilar '{0}': tipo de argumento incorrecto para un registro F#. Se esperaba '{1}', pero se recibió el tipo '{2}'. + + + + Type mismatch when building '{0}': incorrect argument type for an F# union. Expected '{1}', but received type '{2}'. + Incoherencia de tipos al compilar '{0}': tipo de argumento incorrecto para una unión F#. Se esperaba '{1}', pero se recibió el tipo '{2}'. + + + + Type mismatch when building '{0}': initializer doesn't match array type. Expected '{1}', but received type '{2}'. + Incoherencia de tipos al compilar '{0}': el inicializador no coincide con el tipo de matriz. Se esperaba '{1}', pero se recibió el tipo '{2}'. + + + + Type mismatch when building '{0}': invalid parameter for a method or indexer property. Expected '{1}', but received type '{2}'. + Incoherencia de tipos al compilar '{0}': parámetro no válido para una propiedad de método o de indizador. Se esperaba '{1}', pero se recibió el tipo '{2}'. + + + + Type mismatch when building '{0}': body of the for loop must be lambda taking integer as an argument. Expected '{1}', but received type '{2}'. + Incoherencia de tipos al compilar '{0}': el cuerpo del bucle For debe ser una expresión lambda que tome un entero como argumento. Se esperaba '{1}', pero se recibió el tipo '{2}'. + + + + Type mismatch when building '{0}': lower and upper bounds must be integers. Expected '{1}', but received type '{2}'. + Incoherencia de tipos al compilar '{0}': los límites superior e inferior deben ser números enteros. Se esperaba '{1}', pero se recibió el tipo '{2}'. + + + + Type mismatch when building '{0}': types of true and false branches differ. Expected '{1}', but received type '{2}'. + Incoherencia de tipos al compilar '{0}': los tipos de las bifurcaciones true y false son diferentes. Se esperaba '{1}', pero se recibió el tipo '{2}'. + + + + Type mismatch when building '{0}': mismatched type of argument and tuple element. Expected '{1}', but received type '{2}'. + Incoherencia de tipos al compilar '{0}': el tipo del argumento y del elemento de tupla no coinciden. Se esperaba '{1}', pero se recibió el tipo '{2}'. + + + + Type mismatch when building '{0}': the variable type doesn't match the type of the right-hand-side of a let binding. Expected '{1}', but received type '{2}'. + Incoherencia de tipos al compilar '{0}': el tipo de variable no coincide con el tipo del lado derecho de un enlace let. Se esperaba '{1}', pero se recibió el tipo '{2}'. + + + + Unexpected quotation hole in expression. + Espacio de citación inesperado en una expresión. + + + + The parameter is not a recognized method name. + El parámetro no es un nombre de método reconocido. + + + + Reset is not supported on this enumerator. + No se admite restablecer en este enumerador. + + + + The start of a range cannot be NaN. + El inicio de un intervalo no puede ser NaN. + + + + The step of a range cannot be NaN. + El paso de un intervalo no puede ser NaN. + + + + The step of a range cannot be zero. + El paso de un intervalo no puede ser cero. + + + + The System.Threading.SynchronizationContext.Current of the calling thread is null. + El elemento System.Threading.SynchronizationContext.Current del subproceso que llama es nulo. + + + + The tuple index '{1}' was out of range for tuple type '{0}'. + El índice de tupla '{1}' estaba fuera de intervalo para el tipo de tupla '{0}'. + + + + Failed to bind constructor + No se pudo enlazar el constructor. + + + + Failed to bind field '{0}' + No se pudo enlazar el campo '{0}'. + + + + Failed to bind property '{0}' + No se pudo enlazar la propiedad '{0}'. + + + + Failed to bind type '{0}' in assembly '{1}' + No se pudo enlazar el tipo '{0}' en el ensamblado '{1}'. + + + + Incompatible record length + Longitud de registro incompatible. + + + + Incorrect instance type + Tipo de instancia incorrecto. + + + + Incorrect number of arguments + Número de argumentos incorrecto. + + + + Incorrect type + Tipo incorrecto. + + + + Invalid function type + Tipo de función no válido. + + + + The member is non-static (instance), but no receiver object was supplied + El miembro no es estático (instancia), pero no se proporcionó ningún objeto de receptor. + + + + Parent type cannot be null + El tipo primario no puede ser nulo. + + + + Reading a set-only property + Leyendo una propiedad con solo establecedor. + + + + Receiver object was unexpected, as member is static + Objeto de receptor inesperado, ya que el miembro es estático. + + + + Type mismatch when building '{0}': the expression has the wrong type. Expected '{1}', but received type '{2}'. + Incoherencia de tipos al compilar '{0}': la expresión tiene un tipo incorrecto. Se esperaba '{1}', pero se recibió el tipo '{2}'. + + + + Type mismatch when building '{0}': function type doesn't match delegate type. Expected '{1}', but received type '{2}'. + Incoherencia de tipos al compilar '{0}': el tipo de función no coincide con el tipo de delegado. Se esperaba '{1}', pero se recibió el tipo '{2}'. + + + + Type mismatch when splicing expression into quotation literal. The type of the expression tree being inserted doesn't match the type expected by the splicing operation. Expected '{0}', but received type '{1}'. Consider type-annotating with the expected expression type, e.g., (%% x : {0}) or (%x : {0}). + Incoherencia de tipos al insertar la expresión en el literal de expresión de código delimitada. El tipo de árbol de expresión que se va a insertar no coincide con el tipo esperado por la operación de inserción Se esperaba '{0}', pero se recibió el tipo '{1}'. Considere la anotación del tipo de expresión esperado, por ejemplo, (%% x: {0}) o (%x: {0}). + + + + Tuple access out of range + Acceso de tupla fuera de intervalo. + + + + The tuple lengths are different + Las longitudes de tupla son diferentes. + + + + F# union type requires different number of arguments + El tipo de unión F# requiere un número diferente de argumentos. + + + + Writing a get-only property + Escribiendo una propiedad con solo captador + + + + The method '{0}' expects {1} type arguments but {2} were provided + El método '{0}' espera {1} argumentos de tipo, pero se proporcionaron {2}. + + + + An index satisfying the predicate was not found in the collection. + No se encontró ningún índice que satisfaga el predicado en la colección. + + + + The constructor method '{0}' for the union case could not be found + No se encontró el método de constructor '{0}' para el caso de unión. + + + + first class uses of '%' or '%%' are not permitted + No se permite el uso de '%' o '%%' en la primera clase. + + + + MoveNext not called, or finished + No se llamó a MoveNext o finalizó. + + + + Multiple CompilationMappingAttributes, expected at most one + Varios CompilationMappingAttributes. Se esperaba uno como máximo. + + + + Bad float value + Valor float incorrecto. + + + + Bad format specifier:{0} + Especificador de formato incorrecto: {0} + + + + Bad integer supplied to dynamic formatter + Se proporcionó un entero incorrecto a un formateador dinámico. + + + + Expected a precision argument + Se esperaba un argumento de precisión. + + + + Expected a width argument + Se esperaba un argumento de acho. + + + + The # formatting modifier is invalid in F# + El modificador de formato # no es válido en F#. + + + + Missing format specifier + Falta un especificador de formato. + + + + Not a function type + No es un tipo de función. + + + + Bad format specifier (precision) + Especificador de formato incorrecto (precisión). + + + + Bad format specifier (after {0}) + Especificador de formato incorrecto (después de {0}). + + + + Bad format specifier (width) + Especificador de formato incorrecto (ancho). + + + + Could not bind function {0} in type {1} + No se pudo enlazar la función {0} en el tipo {1}. + + + + Could not bind property {0} in type {1} + No se pudo enlazar la propiedad {0} en el tipo {1} + + + + Could not bind to method + No se pudo enlazar al método. + + + + Cannot take the address of this quotation + No puede tomar la dirección de esta citación. + + + + Failed to bind assembly '{0}' while processing quotation data + No se pudo enlazar el ensamblado '{0}' mientras se procesaban los datos de citación. + + + + ill formed expression: AppOp or LetOp + Expresión con formato incorrecto: AppOp o LetOp + + + + type argument out of range + argumento de tipo fuera de intervalo + + + + This value cannot be mutated + Este valor no es mutable. + + + + The option value was None + El valor de la opción era None. + + + + A continuation provided by Async.FromContinuations was invoked multiple times + Se invocó varias veces una continuación proporcionada por Async.FromContinuations. + + + + The record type '{0}' is invalid. Required constructor is not defined. + El tipo de registro '{0}' no es válido. El constructor requerido no está definido. + + + + The tuple type '{0}' is invalid. Required constructor is not defined. + El tipo de tupla '{0}' no es válido. El constructor requerido no está definido. + + + + The input sequence contains more than one element. + La secuencia de entrada contiene más de un elemento. + + + + 'thenBy' and 'thenByDescending' may only be used with an ordered input + 'thenBy' y 'thenByDescending' solo se pueden usar con una entrada ordenada + + + + Unrecognized use of a 'sumBy' or 'averageBy' operator in a query. In queries whose original data is of static type IQueryable, these operators may only be used with result type int32, int64, single, double or decimal + Uso no reconocido de un operador 'sumBy' o 'averageBy' en una consulta. En las consultas cuyos datos originales son de tipo estático IQueryable, estos operadores solo se pueden usar con el tipo de resultado int32, int64, single, double o decimal. + + + + An if/then/else conditional or pattern matching expression with multiple branches is not permitted in a query. An if/then/else conditional may be used. + No se permite una expresión de detección de patrones o condicional if/then/else con varias bifurcaciones en una consulta. Puede usarse una expresión condicional if/then/else. + + + + This is not a valid query expression. The following construct was used in a query but is not recognized by the F#-to-LINQ query translator:\n{0}\nCheck the specification of permitted queries and consider moving some of the operations out of the query expression. + Esta no es una expresión de consulta válida. La siguiente construcción se usó en una consulta, pero el traductor de consultas F#-to-LINQ no la reconoce:\n{0}\nCompruebe la especificación de consultas permitidas y considere mover algunas de las operaciones fuera de la expresión de consulta. + + + + This is not a valid query expression. The method '{0}' was used in a query but is not recognized by the F#-to-LINQ query translator. Check the specification of permitted queries and consider moving some of the operations out of the query expression + Esta no es una expresión de consulta válida. El método '{0}' se usó en una consulta, pero el traductor de consultas F#-to-LINQ no lo reconoce. Compruebe la especificación de consultas permitidas y considere mover algunas de las operaciones fuera de la expresión de consulta. + + + + This is not a valid query expression. The property '{0}' was used in a query but is not recognized by the F#-to-LINQ query translator. Check the specification of permitted queries and consider moving some of the operations out of the query expression. + Esta no es una expresión de consulta válida. La propiedad '{0}' se usó en una consulta, pero el traductor de consultas F#-to-LINQ no la reconoce. Compruebe la especificación de consultas permitidas y considere mover algunas de las operaciones fuera de la expresión de consulta. + + + + This is not a valid query expression. The construct '{0}' was used in a query but is not recognized by the F#-to-LINQ query translator. Check the specification of permitted queries and consider moving some of the operations out of the query expression. + Esta no es una expresión de consulta válida. La construcción '{0}' se usó en una consulta, pero el traductor de consultas F#-to-LINQ no la reconoce. Compruebe la especificación de consultas permitidas y considere mover algunas de las operaciones fuera de la expresión de consulta. + + + + + \ No newline at end of file diff --git a/src/fsharp/FSharp.Core/xlf/FSCore.fr.xlf b/src/fsharp/FSharp.Core/xlf/FSCore.fr.xlf new file mode 100644 index 00000000000..09dfb48a62c --- /dev/null +++ b/src/fsharp/FSharp.Core/xlf/FSCore.fr.xlf @@ -0,0 +1,712 @@ + + + + + + The match cases were incomplete + La casse n'est pas complète + + + + First class uses of address-of operators are not permitted. + L'utilisation d'opérateurs address-of par la première classe n'est pas autorisée. + + + + The arrays have different lengths. + Les tableaux ont des longueurs différentes. + + + + The input array was empty. + Le tableau d'entrée était vide. + + + + Input string was not in a correct format. + Le format de la chaîne d'entrée est incorrect. + + + + Expecting delegate type. + Type délégué attendu. + + + + Dynamic invocation of DivideByInt involving coercions is not supported. + L'appel dynamique de DivideByInt qui implique des contraintes n'est pas pris en charge. + + + + Dynamic invocation of op_Addition involving coercions is not supported. + L'appel dynamique de op_Addition qui implique des contraintes n'est pas pris en charge. + + + + Dynamic invocation of op_Addition involving overloading is not supported. + L'appel dynamique de op_Addition qui implique des surcharges n'est pas pris en charge. + + + + Dynamic invocation of op_Multiply involving coercions is not supported. + L'appel dynamique de op_Multiply qui implique des contraintes n'est pas pris en charge. + + + + Dynamic invocation of op_Multiply involving overloading is not supported. + L'appel dynamique de op_Multiply qui implique des surcharges n'est pas pris en charge. + + + + The end of a range cannot be NaN. + La fin d'une plage ne peut pas être NaN. + + + + Enumeration already finished. + Énumération déjà terminée. + + + + Enumeration has not started. Call MoveNext. + L'énumération n'a pas encore commencé. Appelez MoveNext. + + + + Set contains no elements. + Set ne contient pas d'éléments. + + + + Enumeration based on System.Int32 exceeded System.Int32.MaxValue. + L'énumération basée sur System.Int32 dépasse System.Int32.MaxValue. + + + + Failed to read enough bytes from the stream. + Échec de la lecture de suffisamment d'octets du flux. + + + + Failure during generic comparison: the type '{0}' does not implement the System.IComparable interface. This error may be arise from the use of a function such as 'compare', 'max' or 'min' or a data structure such as 'Set' or 'Map' whose keys contain instances of this type. + Échec lors de la comparaison générique : le type '{0}' n'implémente pas l'interface System.IComparable. Cette erreur peut se produire en raison de l'utilisation d'une fonction telle que 'compare', 'max' ou 'min' ou d'une structure de données telle que 'Set' ou 'Map' dont les clés contiennent des instances de ce type. + + + + The index was outside the range of elements in the list. + L'index se trouve en dehors de la plage d'éléments de la liste. + + + + The input list was empty. + La liste d'entrée était vide. + + + + The input must be non-negative. + La saisie ne doit pas être négative. + + + + The input must be positive. + L'entrée doit être positive. + + + + The input sequence was empty. + La séquence d'entrée était vide. + + + + This is not a valid tuple type for the F# reflection library. + Il ne s'agit pas d'un type tuple valide pour la bibliothèque Reflection F#. + + + + The item, key, or index was not found in the collection. + L'élément, la clé ou l'index est introuvable dans la collection. + + + + The lists had different lengths. + Les listes ont des longueurs différentes. + + + + The MailboxProcessor has already been started. + MailboxProcessor a déjà été démarré. + + + + MailboxProcessor.PostAndAsyncReply timed out. + MailboxProcessor.PostAndAsyncReply a dépassé le délai. + + + + MailboxProcessor.PostAndReply timed out. + MailboxProcessor.PostAndReply a dépassé le délai. + + + + Mailbox.Receive timed out. + Mailbox.Receive a dépassé le délai. + + + + Mailbox.Scan timed out. + Mailbox.Scan a dépassé le délai. + + + + Map values cannot be mutated. + Les valeurs Map ne peuvent pas être mutées. + + + + The IAsyncResult object provided does not match this 'Cancel' operation. + L'objet IAsyncResult fournir ne correspond pas à cette opération 'Cancel'. + + + + The IAsyncResult object provided does not match this 'End' operation. + L'objet IAsyncResult ne correspond pas à cette opération 'End'. + + + + Negating the minimum value of a twos complement number is invalid. + La mise en négatif de la valeur minimale du complément à deux d'un nombre n'est pas valide. + + + + The initialization of an object or value resulted in an object or value being accessed recursively before it was fully initialized. + L'initialisation d'un objet ou d'une valeur a provoqué l'accès récursif à un objet ou une valeur avant son initialisation complète. + + + + The static initialization of a file or type resulted in static data being accessed recursively before it was fully initialized. + L'initialisation statique d'un fichier ou d'un type a provoqué l'accès récursif aux données statiques avant son initialisation complète. + + + + Arrays with non-zero base cannot be created on this platform. + Les tableaux avec une base différente de zéro ne peuvent pas être créés sur cette plateforme. + + + + Type '{0}' is not a function type. + Le type '{0}' n'est un type de fonction. + + + + Type '{0}' is not the representation of an F# exception declaration. + Le type '{0}' n'est pas la représentation d'une déclaration d'exception F#. + + + + The function did not compute a permutation. + La fonction n'a pas calculé une permutation. + + + + Type '{0}' is not an F# record type. + Le type '{0}' n'est pas un type d'enregistrement F#. + + + + Type '{0}' is not a tuple type. + Le type '{0}' n'est pas un type tuple. + + + + Type '{0}' is not an F# union type. + Le type '{0}' n'est pas un type union F#. + + + + The two objects have different types and are not comparable. + Les deux objets ont des types différents et ne sont pas comparables. + + + + The input sequence has an insufficient number of elements. + La séquence d'entrée n'a pas un nombre d'éléments suffisant. + + + + This object is for recursive equality calls and cannot be used for hashing. + Cet objet est destiné aux appels d'égalité récursifs et ne peut pas être utilisé pour le hachage. + + + + One of the elements in the array is null. + L'un des éléments dans le tableau est null. + + + + The object is not an F# record value. + L'objet n'est pas une valeur d'enregistrement F#. + + + + The object is null and no type was given. Either pass a non-null object or a non-null type parameter. + L'objet est null et aucun type n'a été indiqué. Passez un objet qui n'est pas null ou un paramètre de type qui n'est pas null. + + + + The index is outside the legal range. + L'index se trouve en dehors de la plage légale. + + + + The type '{0}' is the representation of an F# exception declaration but its representation is private. You must specify BindingFlags.NonPublic to access private type representations. + Le type '{0}' est la représentation d'une déclaration d'exception F#, mais sa représentation est privée. Vous devez spécifier BindingFlags.NonPublic pour accéder à des représentations de type privé. + + + + The type '{0}' is an F# record type but its representation is private. You must specify BindingFlags.NonPublic to access private type representations. + Le type '{0}' est un type d'enregistrement F#, mais sa représentation est privée. Vous devez spécifier BindingFlags.NonPublic pour accéder à des représentations de type privé. + + + + The type '{0}' is an F# union type but its representation is private. You must specify BindingFlags.NonPublic to access private type representations. + Le type '{0}' est un type union F#, mais sa représentation est privée. Vous devez spécifier BindingFlags.NonPublic pour accéder à des représentations de type privé. + + + + Expected exactly one type argument. + Un argument de type exactement attendu. + + + + Expected exactly two type arguments. + Deux arguments de type exactement attendus. + + + + Not a valid F# union case index. + Index de cas d'union F# non valide. + + + + Type '{0}' did not have an F# record field named '{1}'. + Le type '{0}' n'a pas de champ d'enregistrement F# nommé '{1}'. + + + + Type '{0}' did not have an F# union case named '{1}'. + Le type '{0}' n'a pas de cas d'union F# nommé '{1}'. + + + + Type mismatch when building '{0}': the type of the field was incorrect. Expected '{1}', but received type '{2}'. + Incompatibilité de type lors de la création de '{0}' : le type du champ était incorrect. '{1}' attendu, mais type '{2}' reçu. + + + + Type mismatch when building '{0}': body must return unit. Expected '{1}', but received type '{2}'. + Incompatibilité de type lors de la création de '{0}' : le corps doit renvoyer l'unité. '{1}' attendu, mais type '{2}' reçu. + + + + Type mismatch when building '{0}': condition expression must be of type bool. Expected '{1}', but received type '{2}'. + Incompatibilité de type lors de la création de '{0}' : l'expression de condition doit être de type bool. '{1}' attendu, mais type '{2}' reçu. + + + + Type mismatch when building '{0}': expected function type in function application or let binding. Expected '{1}', but received type '{2}'. + Incompatibilité de type lors de la création de '{0}' : type de fonction attendu dans l'application de fonction ou liaison let. '{1}' attendu, mais type '{2}' reçu. + + + + Type mismatch when building '{0}': expression doesn't match the tuple type. Expected '{1}', but received type '{2}'. + Incompatibilité de type lors de la création de '{0}' : l'expression ne correspond pas au type tuple. '{1}' attendu, mais type '{2}' reçu. + + + + Type mismatch when building '{0}': types of expression does not match. Expected '{1}', but received type '{2}'. + Incompatibilité de type lors de la création de '{0}' : les types d'expression ne correspondent pas. '{1}' attendu, mais type '{2}' reçu. + + + + Type mismatch when building '{0}': function argument type doesn't match. Expected '{1}', but received type '{2}'. + Incompatibilité de type lors de la création de '{0}' : le type d'argument de fonction ne correspond pas. '{1}' attendu, mais type '{2}' reçu. + + + + Type mismatch when building '{0}': guard must return boolean. Expected '{1}', but received type '{2}'. + Incompatibilité de type lors de la création de '{0}' : la garde doit retourner une valeur booléenne. '{1}' attendu, mais type '{2}' reçu. + + + + Type mismatch when building '{0}': incorrect argument type for an F# record. Expected '{1}', but received type '{2}'. + Incompatibilité de type lors de la création de '{0}' : type d'argument incorrect pour un enregistrement F#. '{1}' attendu, mais type '{2}' reçu. + + + + Type mismatch when building '{0}': incorrect argument type for an F# union. Expected '{1}', but received type '{2}'. + Incompatibilité de type lors de la création de '{0}' : type d'argument incorrect pour une union F#. '{1}' attendu, mais type '{2}' reçu. + + + + Type mismatch when building '{0}': initializer doesn't match array type. Expected '{1}', but received type '{2}'. + Incompatibilité de type durant la création de '{0}' : l'initialiseur ne correspond pas au type tableau. '{1}' attendu, mais type '{2}' reçu. + + + + Type mismatch when building '{0}': invalid parameter for a method or indexer property. Expected '{1}', but received type '{2}'. + Incompatibilité de type lors de la création de '{0}' : paramètre incorrect pour une méthode ou une propriété indexer. '{1}' attendu, mais type '{2}' reçu. + + + + Type mismatch when building '{0}': body of the for loop must be lambda taking integer as an argument. Expected '{1}', but received type '{2}'. + Incompatibilité de type lors de la création de '{0}' : le corps de la boucle for doit être lambda avec un entier comme argument. '{1}' attendu, mais type '{2}' reçu. + + + + Type mismatch when building '{0}': lower and upper bounds must be integers. Expected '{1}', but received type '{2}'. + Incompatibilité de type lors de la création de '{0}' : les limites inférieures et supérieures doivent être des entiers. '{1}' attendu, mais type '{2}' reçu. + + + + Type mismatch when building '{0}': types of true and false branches differ. Expected '{1}', but received type '{2}'. + Incompatibilité de type lors de la création de '{0}' : les types des branches true et false ne sont pas identiques. '{1}' attendu, mais type '{2}' reçu. + + + + Type mismatch when building '{0}': mismatched type of argument and tuple element. Expected '{1}', but received type '{2}'. + Incompatibilité de type lors de la création de '{0}' : incompatibilité de type de l'argument et de l'élément tuple. '{1}' attendu, mais type '{2}' reçu. + + + + Type mismatch when building '{0}': the variable type doesn't match the type of the right-hand-side of a let binding. Expected '{1}', but received type '{2}'. + Incompatibilité de type lors de la création de '{0}' : le type de variable ne correspond pas au type du côté droit d'une liaison let. '{1}' attendu, mais type '{2}' reçu. + + + + Unexpected quotation hole in expression. + Espace de quotation inattendu dans l'expression. + + + + The parameter is not a recognized method name. + Le paramètre n'est pas un nom de méthode reconnu. + + + + Reset is not supported on this enumerator. + La réinitialisation n'est pas prise en charge sur cet énumérateur. + + + + The start of a range cannot be NaN. + Le début d'une plage ne peut pas être NaN. + + + + The step of a range cannot be NaN. + Une étape d'une plage ne peut pas être NaN. + + + + The step of a range cannot be zero. + Une étape d'une plage ne peut pas être zéro. + + + + The System.Threading.SynchronizationContext.Current of the calling thread is null. + System.Threading.SynchronizationContext.Current du thread appelant est null. + + + + The tuple index '{1}' was out of range for tuple type '{0}'. + L'index tuple '{1}' est hors limites pour le type tuple '{0}'. + + + + Failed to bind constructor + Liaison au constructeur impossible + + + + Failed to bind field '{0}' + Liaison au champ '{0}' impossible + + + + Failed to bind property '{0}' + Liaison à la propriété '{0}' impossible + + + + Failed to bind type '{0}' in assembly '{1}' + Impossible de lier le type '{0}' dans l'assembly '{1}' + + + + Incompatible record length + Longueur d'enregistrement incompatible + + + + Incorrect instance type + Type d'instance incorrect + + + + Incorrect number of arguments + Nombre d'arguments incorrect + + + + Incorrect type + Type incorrect + + + + Invalid function type + Type de fonction non valide + + + + The member is non-static (instance), but no receiver object was supplied + Le membre n'est pas statique (instance), mais aucun objet récepteur n'était fourni + + + + Parent type cannot be null + Le type parent ne peut pas être null + + + + Reading a set-only property + Lecture d'une propriété ne pouvant avoir un qu'une méthode setter + + + + Receiver object was unexpected, as member is static + L'objet récepteur était inattendu, car le membre est statique + + + + Type mismatch when building '{0}': the expression has the wrong type. Expected '{1}', but received type '{2}'. + Incompatibilité de type lors de la création de '{0}' : l'expression a un type incorrect. '{1}' attendu, mais type '{2}' reçu. + + + + Type mismatch when building '{0}': function type doesn't match delegate type. Expected '{1}', but received type '{2}'. + Incompatibilité de type lors de la création de '{0}' : le type de fonction ne correspond pas au type délégué. '{1}' attendu, mais type '{2}' reçu. + + + + Type mismatch when splicing expression into quotation literal. The type of the expression tree being inserted doesn't match the type expected by the splicing operation. Expected '{0}', but received type '{1}'. Consider type-annotating with the expected expression type, e.g., (%% x : {0}) or (%x : {0}). + Incompatibilité de type lors de l'ajout d'expression à un littéral de quotation. Le type de l'arborescence de l'expression insérée ne correspond pas au type attendu par l'opération d'ajout. '{0}' attendu, mais type '{1}' reçu. Envisagez l'annotation de type avec le type d'expression attendu, par exemple (%% x : {0}) ou (%x : {0}). + + + + Tuple access out of range + Accès tuple hors limites + + + + The tuple lengths are different + Les longueurs tuple sont différentes + + + + F# union type requires different number of arguments + Un type union F# requiert plusieurs arguments + + + + Writing a get-only property + Lecture d'une propriété ne pouvant avoir qu'une méthode getter + + + + The method '{0}' expects {1} type arguments but {2} were provided + La méthode '{0}' attend {1} arguments de type mais {2} ont été fournis + + + + An index satisfying the predicate was not found in the collection. + Un index répondant au prédicat est introuvable dans la collection. + + + + The constructor method '{0}' for the union case could not be found + La méthode constructor '{0}' pour le cas d'union est introuvable + + + + first class uses of '%' or '%%' are not permitted + L'utilisation de '%' ou '%%' par la première classe n'est pas autorisée + + + + MoveNext not called, or finished + MoveNext n'est pas appelé ou n'est pas terminé + + + + Multiple CompilationMappingAttributes, expected at most one + Plusieurs CompilationMappingAttributes, un seul est attendu + + + + Bad float value + Valeur float incorrecte + + + + Bad format specifier:{0} + Spécificateur de format incorrect :{0} + + + + Bad integer supplied to dynamic formatter + Entier incorrect fourni au formateur dynamique + + + + Expected a precision argument + Argument de précision attendu + + + + Expected a width argument + Argument de largeur attendu + + + + The # formatting modifier is invalid in F# + Le modificateur de mise en forme # n'est pas valide en F# + + + + Missing format specifier + Spécificateur de format manquant + + + + Not a function type + N'est pas un type de fonction + + + + Bad format specifier (precision) + Spécificateur de format incorrect (précision) + + + + Bad format specifier (after {0}) + Spécificateur de format incorrect (après {0}) + + + + Bad format specifier (width) + Spécificateur de format incorrect (largeur) + + + + Could not bind function {0} in type {1} + Impossible de lier la fonction {0} dans le type {1} + + + + Could not bind property {0} in type {1} + Impossible de lier la propriété {0} dans le type {1} + + + + Could not bind to method + Liaison à la méthode impossible + + + + Cannot take the address of this quotation + Impossible de lire l'adresse de cette quotation + + + + Failed to bind assembly '{0}' while processing quotation data + Impossible de lier l'assembly '{0}' lors du traitement des données de quotation + + + + ill formed expression: AppOp or LetOp + expression incorrecte : AppOp ou LetOp + + + + type argument out of range + argument de type hors limites + + + + This value cannot be mutated + Cette valeur ne peut pas être mutée + + + + The option value was None + La valeur de l'option est Aucun + + + + A continuation provided by Async.FromContinuations was invoked multiple times + Une continuation fournie par Async.FromContinuations a été appelée plusieurs fois + + + + The record type '{0}' is invalid. Required constructor is not defined. + Le type enregistrement '{0}' n'est pas valide. Un constructeur requis n'est pas défini. + + + + The tuple type '{0}' is invalid. Required constructor is not defined. + Le type tuple '{0}' n'est pas valide. Un constructeur requis n'est pas défini. + + + + The input sequence contains more than one element. + La séquence d'entrée contient plusieurs éléments. + + + + 'thenBy' and 'thenByDescending' may only be used with an ordered input + 'thenBy' et 'thenByDescending' peuvent seulement être utilisés avec une entrée ordonnée + + + + Unrecognized use of a 'sumBy' or 'averageBy' operator in a query. In queries whose original data is of static type IQueryable, these operators may only be used with result type int32, int64, single, double or decimal + Utilisation non reconnue d'un opérateur 'sumBy' ou 'averageBy' dans une requête. Dans les requêtes dont les données d'origine est de type statique IQueryable, ces opérateurs peuvent seulement être utilisés avec le type de résultat int32, int64, single, double ou decimal + + + + An if/then/else conditional or pattern matching expression with multiple branches is not permitted in a query. An if/then/else conditional may be used. + Une expression if/then/else conditionnelle ou contenant des critères spéciaux avec plusieurs branches n'est pas autorisée dans une requête. Une conditionnelle if/then/else peut être utilisée. + + + + This is not a valid query expression. The following construct was used in a query but is not recognized by the F#-to-LINQ query translator:\n{0}\nCheck the specification of permitted queries and consider moving some of the operations out of the query expression. + Cette expression de requête n'est pas valide. La construction suivante a été utilisée dans une requête, mais n'est pas reconnue par le traducteur de requête F#-to-LINQ :\n{0}\nVérifiez la spécification des requêtes autorisées et envisagez de retirer certaines opérations de l'expression de requête. + + + + This is not a valid query expression. The method '{0}' was used in a query but is not recognized by the F#-to-LINQ query translator. Check the specification of permitted queries and consider moving some of the operations out of the query expression + Cette expression de requête n'est pas valide. La méthode '{0}' a été utilisée dans une requête, mais n'est pas reconnue par le traducteur de requête F#-to-LINQ. Vérifiez la spécification des requêtes autorisées et envisagez de retirer certaines opérations de l'expression de requête + + + + This is not a valid query expression. The property '{0}' was used in a query but is not recognized by the F#-to-LINQ query translator. Check the specification of permitted queries and consider moving some of the operations out of the query expression. + Cette expression de requête n'est pas valide. La propriété '{0}' a été utilisée dans une requête, mais n'est pas reconnue par le traducteur de requête F#-to-LINQ. Vérifiez la spécification des requêtes autorisées et envisagez de retirer certaines opérations de l'expression de requête. + + + + This is not a valid query expression. The construct '{0}' was used in a query but is not recognized by the F#-to-LINQ query translator. Check the specification of permitted queries and consider moving some of the operations out of the query expression. + Cette expression de requête n'est pas valide. La construction '{0}' a été utilisée dans une requête, mais n'est pas reconnue par le traducteur de requête F#-to-LINQ. Vérifiez la spécification des requêtes autorisées et envisagez de retirer certaines opérations de l'expression de requête. + + + + + \ No newline at end of file diff --git a/src/fsharp/FSharp.Core/xlf/FSCore.it.xlf b/src/fsharp/FSharp.Core/xlf/FSCore.it.xlf new file mode 100644 index 00000000000..5598638a5f4 --- /dev/null +++ b/src/fsharp/FSharp.Core/xlf/FSCore.it.xlf @@ -0,0 +1,712 @@ + + + + + + The match cases were incomplete + Case di corrispondenza incompleti + + + + First class uses of address-of operators are not permitted. + Utilizzi di prima classe di operatori address-of non consentiti. + + + + The arrays have different lengths. + Le matrici hanno lunghezza diversa. + + + + The input array was empty. + La matrice di input è vuota. + + + + Input string was not in a correct format. + Formato della stringa di input non corretto. + + + + Expecting delegate type. + Previsto tipo delegato. + + + + Dynamic invocation of DivideByInt involving coercions is not supported. + Chiamata dinamica di DivideByInt con coercizioni non supportata. + + + + Dynamic invocation of op_Addition involving coercions is not supported. + Chiamata dinamica di op_Addition con coercizioni non supportata. + + + + Dynamic invocation of op_Addition involving overloading is not supported. + Chiamata dinamica di op_Addition con overload non supportata. + + + + Dynamic invocation of op_Multiply involving coercions is not supported. + Chiamata dinamica di op_Multiply con coercizioni non supportata. + + + + Dynamic invocation of op_Multiply involving overloading is not supported. + Chiamata dinamica di op_Multiply con overload non supportata. + + + + The end of a range cannot be NaN. + La fine di un intervallo deve essere un numero. + + + + Enumeration already finished. + Enumerazione già terminata. + + + + Enumeration has not started. Call MoveNext. + L'enumerazione non è stata avviata. Chiamare MoveNext. + + + + Set contains no elements. + Il set non contiene elementi. + + + + Enumeration based on System.Int32 exceeded System.Int32.MaxValue. + L'enumerazione basata su System.Int32 supera System.Int32.MaxValue. + + + + Failed to read enough bytes from the stream. + Non è stato possibile leggere un numero sufficiente di byte dal flusso. + + + + Failure during generic comparison: the type '{0}' does not implement the System.IComparable interface. This error may be arise from the use of a function such as 'compare', 'max' or 'min' or a data structure such as 'Set' or 'Map' whose keys contain instances of this type. + Errore durante il confronto generico: il tipo '{0}' non implementa l'interfaccia System.IComparable. Questo errore potrebbe essere dovuto all'utilizzo di una funzione quale 'compare', 'max' o 'min' o a una struttura di dati quale 'Set' o 'Map' le cui chiavi contengono istanze di questo tipo. + + + + The index was outside the range of elements in the list. + Indice non compreso nell'intervallo di elementi in elenco. + + + + The input list was empty. + Elenco di input vuoto. + + + + The input must be non-negative. + L'input non può essere negativo. + + + + The input must be positive. + L'input deve essere positivo. + + + + The input sequence was empty. + Sequenza di input vuota. + + + + This is not a valid tuple type for the F# reflection library. + Tipo di tupla non valido per la libreria di reflection F#. + + + + The item, key, or index was not found in the collection. + Elemento, chiave o indice non trovato nella raccolta. + + + + The lists had different lengths. + Gli elenchi hanno lunghezza diversa. + + + + The MailboxProcessor has already been started. + MailboxProcessor già avviato. + + + + MailboxProcessor.PostAndAsyncReply timed out. + Timeout di MailboxProcessor.PostAndAsyncReply. + + + + MailboxProcessor.PostAndReply timed out. + Timeout di MailboxProcessor.PostAndReply. + + + + Mailbox.Receive timed out. + Timeout di Mailbox.Receive. + + + + Mailbox.Scan timed out. + Timeout di Mailbox.Scan. + + + + Map values cannot be mutated. + Non è possibile modificare i valori di Map. + + + + The IAsyncResult object provided does not match this 'Cancel' operation. + Oggetto IAsyncResult specificato non corrispondente all'operazione 'Cancel'. + + + + The IAsyncResult object provided does not match this 'End' operation. + Oggetto IAsyncResult specificato non corrispondente all'operazione 'End'. + + + + Negating the minimum value of a twos complement number is invalid. + La negazione del valore minimo di un complemento a due non è valida. + + + + The initialization of an object or value resulted in an object or value being accessed recursively before it was fully initialized. + In seguito all'inizializzazione di un oggetto o di un valore, è stato effettuato l'accesso in modo ricorsivo a un oggetto o a un valore prima che fosse completamente inizializzato. + + + + The static initialization of a file or type resulted in static data being accessed recursively before it was fully initialized. + In seguito all'inizializzazione statica di un file o di un tipo, è stato effettuato l'accesso in modo ricorsivo ai dati statici prima che fossero completamente inizializzati. + + + + Arrays with non-zero base cannot be created on this platform. + Non è possibile creare matrici con basi diverse da zero in questa piattaforma. + + + + Type '{0}' is not a function type. + Il tipo '{0}' non è un tipo di funzione. + + + + Type '{0}' is not the representation of an F# exception declaration. + Il tipo '{0}' non è una rappresentazione di una dichiarazione di eccezione F#. + + + + The function did not compute a permutation. + Permutazione non calcolata dalla funzione. + + + + Type '{0}' is not an F# record type. + Il tipo '{0}' non è un tipo di record F#. + + + + Type '{0}' is not a tuple type. + Il tipo '{0}' non è un tipo di tupla. + + + + Type '{0}' is not an F# union type. + Il tipo '{0}' non è un tipo di unione F#. + + + + The two objects have different types and are not comparable. + I due oggetti hanno tipi diversi e non sono confrontabili. + + + + The input sequence has an insufficient number of elements. + Numero insufficiente di elementi nella sequenza di input. + + + + This object is for recursive equality calls and cannot be used for hashing. + L'oggetto è destinato alle chiamate di uguaglianza ricorsive e non è possibile usarlo per l'hashing. + + + + One of the elements in the array is null. + Uno degli elementi nella matrice è Null. + + + + The object is not an F# record value. + L'oggetto non è un valore di record F#. + + + + The object is null and no type was given. Either pass a non-null object or a non-null type parameter. + L'oggetto è Null e non è stato specificato alcun tipo. Passare un oggetto non Null o un parametro di tipo non Null. + + + + The index is outside the legal range. + L'indice non è compreso nell'intervallo valido. + + + + The type '{0}' is the representation of an F# exception declaration but its representation is private. You must specify BindingFlags.NonPublic to access private type representations. + Il tipo '{0}' è la rappresentazione di una dichiarazione di eccezione F#, tuttavia la relativa rappresentazione è privata. Per accedere a rappresentazioni di tipo privato è necessario specificare BindingFlags.NonPublic. + + + + The type '{0}' is an F# record type but its representation is private. You must specify BindingFlags.NonPublic to access private type representations. + Il tipo '{0}' è un tipo di record F#, tuttavia la relativa rappresentazione è privata. Per accedere a rappresentazioni di tipo privato è necessario specificare BindingFlags.NonPublic. + + + + The type '{0}' is an F# union type but its representation is private. You must specify BindingFlags.NonPublic to access private type representations. + Il tipo '{0}' è un tipo di unione F#, tuttavia la relativa rappresentazione è privata. Per accedere a rappresentazioni di tipo privato è necessario specificare BindingFlags.NonPublic. + + + + Expected exactly one type argument. + È previsto esattamente un solo argomento tipo. + + + + Expected exactly two type arguments. + Sono previsti esattamente due argomenti tipo. + + + + Not a valid F# union case index. + Indice case di unione F# non valido. + + + + Type '{0}' did not have an F# record field named '{1}'. + Il tipo '{0}' non ha un campo di record F# denominato '{1}'. + + + + Type '{0}' did not have an F# union case named '{1}'. + Il tipo '{0}' non ha un case di unione F# denominato '{1}'. + + + + Type mismatch when building '{0}': the type of the field was incorrect. Expected '{1}', but received type '{2}'. + Tipo non corrispondente durante la compilazione di '{0}': il tipo del campo non è corretto. Previsto '{1}', tipo ricevuto '{2}'. + + + + Type mismatch when building '{0}': body must return unit. Expected '{1}', but received type '{2}'. + Tipo non corrispondente durante la compilazione di '{0}': il corpo deve restituire un'unità. Previsto '{1}', tipo ricevuto '{2}'. + + + + Type mismatch when building '{0}': condition expression must be of type bool. Expected '{1}', but received type '{2}'. + Tipo non corrispondente durante la compilazione di '{0}': l'espressione della condizione deve essere di tipo booleano. Previsto '{1}', tipo ricevuto '{2}'. + + + + Type mismatch when building '{0}': expected function type in function application or let binding. Expected '{1}', but received type '{2}'. + Tipo non corrispondente durante la compilazione di '{0}': è previsto il tipo di funzione nel binding let o nell'applicazione di funzione. È previsto '{1}', ma il tipo ricevuto è '{2}'. + + + + Type mismatch when building '{0}': expression doesn't match the tuple type. Expected '{1}', but received type '{2}'. + Tipo non corrispondente durante la compilazione di '{0}': l'espressione non corrisponde al tipo di tupla. Previsto '{1}', tipo ricevuto '{2}'. + + + + Type mismatch when building '{0}': types of expression does not match. Expected '{1}', but received type '{2}'. + Tipo non corrispondente durante la compilazione di '{0}': tipi di espressione non corrispondenti. Previsto '{1}', tipo ricevuto '{2}'. + + + + Type mismatch when building '{0}': function argument type doesn't match. Expected '{1}', but received type '{2}'. + Tipo non corrispondente durante la compilazione di '{0}': tipo di argomento della funzione non corrispondente. Previsto '{1}', tipo ricevuto '{2}'. + + + + Type mismatch when building '{0}': guard must return boolean. Expected '{1}', but received type '{2}'. + Tipo non corrispondente durante la compilazione di '{0}': l'espressione guard deve restituire un valore booleano. Previsto '{1}', tipo ricevuto '{2}'. + + + + Type mismatch when building '{0}': incorrect argument type for an F# record. Expected '{1}', but received type '{2}'. + Tipo non corrispondente durante la compilazione di '{0}': tipo di argomento non corretto per un record F#. Previsto '{1}', tipo ricevuto '{2}'. + + + + Type mismatch when building '{0}': incorrect argument type for an F# union. Expected '{1}', but received type '{2}'. + Tipo non corrispondente durante la compilazione di '{0}': tipo di argomento non corretto per un'unione F#. Previsto '{1}', tipo ricevuto '{2}'. + + + + Type mismatch when building '{0}': initializer doesn't match array type. Expected '{1}', but received type '{2}'. + Tipo non corrispondente durante la compilazione di '{0}': l'inizializzatore non corrisponde al tipo di matrice. Previsto '{1}', tipo ricevuto '{2}'. + + + + Type mismatch when building '{0}': invalid parameter for a method or indexer property. Expected '{1}', but received type '{2}'. + Tipo non corrispondente durante la compilazione di '{0}': parametro non valido per un metodo o una proprietà di indicizzatore. Previsto '{1}', tipo ricevuto '{2}'. + + + + Type mismatch when building '{0}': body of the for loop must be lambda taking integer as an argument. Expected '{1}', but received type '{2}'. + Tipo non corrispondente durante la compilazione di '{0}': il corpo del ciclo deve essere un'espressione lambda che usa un intero come argomento. È previsto '{1}', ma il tipo ricevuto è '{2}'. + + + + Type mismatch when building '{0}': lower and upper bounds must be integers. Expected '{1}', but received type '{2}'. + Tipo non corrispondente durante la compilazione di '{0}': i limiti inferiore e superiore devono essere un intero. È previsto '{1}', ma il tipo ricevuto è '{2}'. + + + + Type mismatch when building '{0}': types of true and false branches differ. Expected '{1}', but received type '{2}'. + Tipo non corrispondente durante la compilazione di '{0}': i tipi di rami true e false sono diversi. È previsto '{1}', ma è stato ricevuto il tipo '{2}'. + + + + Type mismatch when building '{0}': mismatched type of argument and tuple element. Expected '{1}', but received type '{2}'. + Tipo non corrispondente durante la compilazione di '{0}': tipo di argomento ed elemento di tupla non corrispondenti. Previsto '{1}', tipo ricevuto '{2}'. + + + + Type mismatch when building '{0}': the variable type doesn't match the type of the right-hand-side of a let binding. Expected '{1}', but received type '{2}'. + Tipo non corrispondente durante la compilazione di '{0}': il tipo di variabile non corrisponde al tipo della parte destra di un binding let. È previsto '{1}', ma il tipo ricevuto è '{2}'. + + + + Unexpected quotation hole in expression. + Hole nella quotation imprevisto nell'espressione. + + + + The parameter is not a recognized method name. + Il parametro non è un nome di metodo riconosciuto. + + + + Reset is not supported on this enumerator. + Reimpostazione non supportata in questo enumeratore. + + + + The start of a range cannot be NaN. + L'inizio di un intervallo deve essere un numero. + + + + The step of a range cannot be NaN. + Il passaggio di un intervallo deve essere un numero. + + + + The step of a range cannot be zero. + Il passaggio di un intervallo non può essere zero. + + + + The System.Threading.SynchronizationContext.Current of the calling thread is null. + System.Threading.SynchronizationContext.Current del thread chiamante Null. + + + + The tuple index '{1}' was out of range for tuple type '{0}'. + L'indice della tupla '{1}' non è compreso nell'intervallo per il tipo di tupla '{0}'. + + + + Failed to bind constructor + Non è stato possibile eseguire il binding del costruttore + + + + Failed to bind field '{0}' + Non è stato possibile eseguire il binding del campo '{0}' + + + + Failed to bind property '{0}' + Non è stato possibile eseguire il binding della proprietà '{0}' + + + + Failed to bind type '{0}' in assembly '{1}' + Non è stato possibile eseguire il binding del tipo '{0}' nell'assembly '{1}' + + + + Incompatible record length + Lunghezza record non compatibile + + + + Incorrect instance type + Tipi di istanza non corretto + + + + Incorrect number of arguments + Numero di argomenti non corretto + + + + Incorrect type + Tipo non corretto + + + + Invalid function type + Tipo di funzione non valido + + + + The member is non-static (instance), but no receiver object was supplied + Il membro non è statico (istanza), tuttavia non è stato specificato alcun oggetto ricevitore + + + + Parent type cannot be null + Il tipo padre non può essere Null + + + + Reading a set-only property + Lettura di una proprietà di sola impostazione + + + + Receiver object was unexpected, as member is static + Oggetto ricevitore imprevisto perché il membro è statico + + + + Type mismatch when building '{0}': the expression has the wrong type. Expected '{1}', but received type '{2}'. + Tipo non corrispondente durante la compilazione di '{0}': l'espressione è di tipo non corretto. Previsto '{1}', tipo ricevuto '{2}'. + + + + Type mismatch when building '{0}': function type doesn't match delegate type. Expected '{1}', but received type '{2}'. + Tipo non corrispondente durante la compilazione di '{0}': il tipo di funzione non corrisponde al tipo di delegato. Previsto '{1}', tipo ricevuto '{2}'. + + + + Type mismatch when splicing expression into quotation literal. The type of the expression tree being inserted doesn't match the type expected by the splicing operation. Expected '{0}', but received type '{1}'. Consider type-annotating with the expected expression type, e.g., (%% x : {0}) or (%x : {0}). + Tipo non corrispondente durante lo splicing dell'espressione in valori letterali di quotation. Il tipo dell'albero delle espressioni che viene inserito non corrisponde al tipo previsto dall'operazione di splicing. Tipo previsto '{0}'. Tipo ricevuto '{1}'. Eseguire l'annotazione del tipo con il tipo dell'espressione previsto, ossia (%% x : {0}) o (%x : {0}). + + + + Tuple access out of range + Accesso tupla non compreso nell'intervallo + + + + The tuple lengths are different + Le tuple sono di lunghezza diversa + + + + F# union type requires different number of arguments + Il tipo di unione F# richiede un numero diverso di argomenti + + + + Writing a get-only property + Scrittura di una proprietà di solo richiamo + + + + The method '{0}' expects {1} type arguments but {2} were provided + Il metodo '{0}' prevede {1} argomenti tipo, tuttavia ne sono stati specificati {2} + + + + An index satisfying the predicate was not found in the collection. + Nella raccolta non è stato trovato alcun indice che soddisfi il predicato. + + + + The constructor method '{0}' for the union case could not be found + Il metodo del costruttore '{0}' per il case di unione non è stato trovato + + + + first class uses of '%' or '%%' are not permitted + utilizzi di prima classe di '%' o '%%' non consentiti + + + + MoveNext not called, or finished + MoveNext non chiamato o terminato + + + + Multiple CompilationMappingAttributes, expected at most one + Più CompilationMappingAttribute. Previsto massimo uno + + + + Bad float value + Valore float non valido + + + + Bad format specifier:{0} + Identificatore di formato non valido: {0} + + + + Bad integer supplied to dynamic formatter + Intero non valido fornito al formattatore dinamico + + + + Expected a precision argument + Previsto argomento precision + + + + Expected a width argument + Previsto argomento width + + + + The # formatting modifier is invalid in F# + Il modificatore di formattazione # non è valido in F# + + + + Missing format specifier + Identificatore di formato mancante + + + + Not a function type + Non è un tipo di funzione + + + + Bad format specifier (precision) + Identificatore di formato non valido (precision) + + + + Bad format specifier (after {0}) + Identificatore di formato non valido (dopo {0}) + + + + Bad format specifier (width) + Identificatore di formato non valido (width) + + + + Could not bind function {0} in type {1} + Non è stato possibile eseguire il binding della funzione {0} nel tipo {1} + + + + Could not bind property {0} in type {1} + Non è stato possibile eseguire il binding della proprietà {0} nel tipo {1} + + + + Could not bind to method + Non è stato possibile eseguire il binding al metodo + + + + Cannot take the address of this quotation + L'indirizzo di questa quotation non è accettato + + + + Failed to bind assembly '{0}' while processing quotation data + Non è stato possibile eseguire il binding dell'assembly '{0}' durante l'elaborazione dei dati di quotation + + + + ill formed expression: AppOp or LetOp + espressione in formato non valido: AppOp o LetOp + + + + type argument out of range + argomento tipo non compreso nell'intervallo + + + + This value cannot be mutated + Non è possibile modificare questo valore + + + + The option value was None + Il valore dell'opzione è None + + + + A continuation provided by Async.FromContinuations was invoked multiple times + È stata richiamata più volte una continuazione fornita da Async.FromContinuations + + + + The record type '{0}' is invalid. Required constructor is not defined. + Tipo di record '{0}' non valido. Un costruttore necessario non è definito. + + + + The tuple type '{0}' is invalid. Required constructor is not defined. + Tipo di tupla '{0}' non valido. Un costruttore necessario non è definito. + + + + The input sequence contains more than one element. + La sequenza di input contiene più elementi. + + + + 'thenBy' and 'thenByDescending' may only be used with an ordered input + 'thenBy' e 'thenByDescending' possono essere utilizzati solo con un input ordinato + + + + Unrecognized use of a 'sumBy' or 'averageBy' operator in a query. In queries whose original data is of static type IQueryable, these operators may only be used with result type int32, int64, single, double or decimal + Uso non riconosciuto di un operatore 'sumBy' o 'averageBy' in una query. Nelle query i cui dati originali sono del tipo statico IQueryable, questi operatori possono essere utilizzati solo con tipo di risultato int32, int64, single, double o decimal + + + + An if/then/else conditional or pattern matching expression with multiple branches is not permitted in a query. An if/then/else conditional may be used. + Una condizione if/then/else o un'espressione di criteri di ricerca con più rami non è consentita in una query. È possibile usare una condizione if/then/else. + + + + This is not a valid query expression. The following construct was used in a query but is not recognized by the F#-to-LINQ query translator:\n{0}\nCheck the specification of permitted queries and consider moving some of the operations out of the query expression. + Espressione di query non valida. Il costrutto seguente è stato utilizzato in una query, tuttavia non è riconosciuto dal traduttore di query da F# a LINQ:\n{0}\nVerificare le specifiche delle query consentite e provare a spostare alcune operazioni all'esterno dell'espressione di query. + + + + This is not a valid query expression. The method '{0}' was used in a query but is not recognized by the F#-to-LINQ query translator. Check the specification of permitted queries and consider moving some of the operations out of the query expression + Espressione di query non valida. Il metodo '{0}' è stato utilizzato in una query ma non è stato riconosciuto dal traduttore di query da F# a LINQ. Verificare le specifiche delle query consentite e provare a spostare alcune operazioni all'esterno dell'espressione di query + + + + This is not a valid query expression. The property '{0}' was used in a query but is not recognized by the F#-to-LINQ query translator. Check the specification of permitted queries and consider moving some of the operations out of the query expression. + Espressione di query non valida. La proprietà '{0}' è stato utilizzata in una query ma non è stata riconosciuta dal traduttore di query da F# a LINQ. Verificare le specifiche delle query consentite e provare a spostare alcune operazioni all'esterno dell'espressione di query. + + + + This is not a valid query expression. The construct '{0}' was used in a query but is not recognized by the F#-to-LINQ query translator. Check the specification of permitted queries and consider moving some of the operations out of the query expression. + Espressione di query non valida. Il costrutto '{0}' è stato utilizzato in una query ma non è stato riconosciuto dal traduttore di query da F# a LINQ. Verificare le specifiche delle query consentite e provare a spostare alcune operazioni all'esterno dell'espressione di query. + + + + + \ No newline at end of file diff --git a/src/fsharp/FSharp.Core/xlf/FSCore.ja.xlf b/src/fsharp/FSharp.Core/xlf/FSCore.ja.xlf new file mode 100644 index 00000000000..51440221431 --- /dev/null +++ b/src/fsharp/FSharp.Core/xlf/FSCore.ja.xlf @@ -0,0 +1,712 @@ + + + + + + The match cases were incomplete + 一致条件が不完全でした + + + + First class uses of address-of operators are not permitted. + アドレス演算子のファースト クラスの使用は許可されていません。 + + + + The arrays have different lengths. + 配列の長さが異なります。 + + + + The input array was empty. + 入力配列が空でした。 + + + + Input string was not in a correct format. + 文字列の形式が正しくありません。 + + + + Expecting delegate type. + デリゲート型を必要としています。 + + + + Dynamic invocation of DivideByInt involving coercions is not supported. + 強制型変換に関連する DivideByInt の動的な呼び出しはサポートされていません。 + + + + Dynamic invocation of op_Addition involving coercions is not supported. + 強制型変換に関連する op_Addition の動的な呼び出しはサポートされていません。 + + + + Dynamic invocation of op_Addition involving overloading is not supported. + オーバーロードに関連する op_Addition の動的な呼び出しはサポートされていません。 + + + + Dynamic invocation of op_Multiply involving coercions is not supported. + 強制型変換に関連する op_Multiply の動的な呼び出しはサポートされていません。 + + + + Dynamic invocation of op_Multiply involving overloading is not supported. + オーバーロードに関連する op_Multiply の動的な呼び出しはサポートされていません。 + + + + The end of a range cannot be NaN. + 範囲の最後を NaN にすることはできません。 + + + + Enumeration already finished. + 列挙は既に終了しています。 + + + + Enumeration has not started. Call MoveNext. + 列挙は開始していません。MoveNext を呼び出してください。 + + + + Set contains no elements. + セットに要素がありません。 + + + + Enumeration based on System.Int32 exceeded System.Int32.MaxValue. + System.Int32 に基づく列挙型が System.Int32.MaxValue を超えました。 + + + + Failed to read enough bytes from the stream. + ストリームから十分なバイト数を読み取ることができませんでした。 + + + + Failure during generic comparison: the type '{0}' does not implement the System.IComparable interface. This error may be arise from the use of a function such as 'compare', 'max' or 'min' or a data structure such as 'Set' or 'Map' whose keys contain instances of this type. + 汎用的な比較中にエラーが発生しました: 型 '{0}' は System.IComparable インターフェイスを実装しません。このエラーは、'compare'、'max'、'min' などの関数、またはこの型のインスタンスを含むキーを持つ 'Set' や 'Map' などのデータ構造を使用した場合に発生することがあります。 + + + + The index was outside the range of elements in the list. + インデックスはリストの要素の範囲外にありました。 + + + + The input list was empty. + 入力リストが空でした。 + + + + The input must be non-negative. + 入力は負以外である必要があります。 + + + + The input must be positive. + 入力は正である必要があります。 + + + + The input sequence was empty. + 入力シーケンスが空でした。 + + + + This is not a valid tuple type for the F# reflection library. + これは F# リフレクション ライブラリに対して有効なタプル型ではありません。 + + + + The item, key, or index was not found in the collection. + 項目、キー、またはインデックスがコレクションに見つかりませんでした。 + + + + The lists had different lengths. + リストの長さが異なります。 + + + + The MailboxProcessor has already been started. + MailboxProcessor は既に開始されています。 + + + + MailboxProcessor.PostAndAsyncReply timed out. + MailboxProcessor.PostAndAsyncReply がタイムアウトしました。 + + + + MailboxProcessor.PostAndReply timed out. + MailboxProcessor.PostAndReply がタイムアウトしました。 + + + + Mailbox.Receive timed out. + Mailbox.Receive がタイムアウトしました。 + + + + Mailbox.Scan timed out. + Mailbox.Scan がタイムアウトしました。 + + + + Map values cannot be mutated. + マップ値は変換できません。 + + + + The IAsyncResult object provided does not match this 'Cancel' operation. + 提供された IAsyncResult オブジェクトはこの '取り消し' 操作と一致しません。 + + + + The IAsyncResult object provided does not match this 'End' operation. + 提供された IAsyncResult オブジェクトはこの '終了' 操作と一致しません。 + + + + Negating the minimum value of a twos complement number is invalid. + 2 の補数の最小値を無効にすることはできません。 + + + + The initialization of an object or value resulted in an object or value being accessed recursively before it was fully initialized. + オブジェクトまたは値の初期化の結果、そのオブジェクトまたは値が、完全に初期化される前に再帰的にアクセスされました。 + + + + The static initialization of a file or type resulted in static data being accessed recursively before it was fully initialized. + ファイルまたは型の静的な初期化の結果、静的データが、完全に初期化される前に再帰的にアクセスされました。 + + + + Arrays with non-zero base cannot be created on this platform. + このプラットフォームでは、ゼロ以外を基数とする配列を作成できません。 + + + + Type '{0}' is not a function type. + 型 '{0}' は関数型ではありません。 + + + + Type '{0}' is not the representation of an F# exception declaration. + 型 '{0}' は F# 例外宣言の表現ではありません。 + + + + The function did not compute a permutation. + 関数は順列を計算しませんでした。 + + + + Type '{0}' is not an F# record type. + 型 '{0}' は F# レコード型ではありません。 + + + + Type '{0}' is not a tuple type. + 型 '{0}' はタプル型ではありません。 + + + + Type '{0}' is not an F# union type. + 型 '{0}' は F# 共用体型ではありません。 + + + + The two objects have different types and are not comparable. + 2 つのオブジェクトの型が異なり、比較できません。 + + + + The input sequence has an insufficient number of elements. + 入力シーケンスには十分な数の要素がありません。 + + + + This object is for recursive equality calls and cannot be used for hashing. + このオブジェクトは再帰的な等値呼び出し用であり、ハッシュには使用できません。 + + + + One of the elements in the array is null. + 配列の要素の 1 つが null です。 + + + + The object is not an F# record value. + オブジェクトは F# レコード値ではありません。 + + + + The object is null and no type was given. Either pass a non-null object or a non-null type parameter. + オブジェクトは null であり、型が指定されていません。null 以外のオブジェクトまたは null 以外の型パラメーターを渡してください。 + + + + The index is outside the legal range. + インデックスは有効範囲外です。 + + + + The type '{0}' is the representation of an F# exception declaration but its representation is private. You must specify BindingFlags.NonPublic to access private type representations. + 型 '{0}' は F# 例外宣言の表現ですが、その表現はプライベートです。プライベート型表現にアクセスするには BindingFlags.NonPublic を指定する必要があります。 + + + + The type '{0}' is an F# record type but its representation is private. You must specify BindingFlags.NonPublic to access private type representations. + 型 '{0}' は F# レコード型ですが、その表現はプライベートです。プライベート型表現にアクセスするには BindingFlags.NonPublic を指定する必要があります。 + + + + The type '{0}' is an F# union type but its representation is private. You must specify BindingFlags.NonPublic to access private type representations. + 型 '{0}' は F# 共用体型ですが、その表現はプライベートです。プライベート型表現にアクセスするには BindingFlags.NonPublic を指定する必要があります。 + + + + Expected exactly one type argument. + 型引数が 1 つだけ必要でした。 + + + + Expected exactly two type arguments. + 型引数が 2 つだけ必要でした。 + + + + Not a valid F# union case index. + 有効な F# 共用体ケース インデックスではありません。 + + + + Type '{0}' did not have an F# record field named '{1}'. + 型 '{0}' には '{1}' という名前の F# レコード フィールドがありませんでした。 + + + + Type '{0}' did not have an F# union case named '{1}'. + 型 '{0}' には '{1}' という名前の F# 共用体ケースがありませんでした。 + + + + Type mismatch when building '{0}': the type of the field was incorrect. Expected '{1}', but received type '{2}'. + {0}' を構築するときの型の不一致: フィールドの型が正しくありませんでした。'{1}' が必要でしたが、型 '{2}' を受け取りました。 + + + + Type mismatch when building '{0}': body must return unit. Expected '{1}', but received type '{2}'. + {0}' を構築するときの型の不一致: 本体はユニットを返す必要があります。'{1}' が必要でしたが、型 '{2}' を受け取りました。 + + + + Type mismatch when building '{0}': condition expression must be of type bool. Expected '{1}', but received type '{2}'. + {0}' を構築するときの型の不一致: 条件式は bool 型である必要があります。'{1}' が必要でしたが、型 '{2}' を受け取りました。 + + + + Type mismatch when building '{0}': expected function type in function application or let binding. Expected '{1}', but received type '{2}'. + {0}' を構築するときの型の不一致: 関数アプリケーションまたは let 束縛では関数型が必要でした。'{1}' が必要でしたが、型 '{2}' を受け取りました。 + + + + Type mismatch when building '{0}': expression doesn't match the tuple type. Expected '{1}', but received type '{2}'. + {0}' を構築するときの型の不一致: 式がタプル型と一致しません。'{1}' が必要でしたが、型 '{2}' を受け取りました。 + + + + Type mismatch when building '{0}': types of expression does not match. Expected '{1}', but received type '{2}'. + {0}' を構築するときの型の不一致: 式の型が一致しません。'{1}' が必要でしたが、型 '{2}' を受け取りました。 + + + + Type mismatch when building '{0}': function argument type doesn't match. Expected '{1}', but received type '{2}'. + {0}' を構築するときの型の不一致: 関数引数型が一致しません。'{1}' が必要でしたが、型 '{2}' を受け取りました。 + + + + Type mismatch when building '{0}': guard must return boolean. Expected '{1}', but received type '{2}'. + {0}' を構築するときの型の不一致: ガードはブール型を返す必要があります。'{1}' が必要でしたが、型 '{2}' を受け取りました。 + + + + Type mismatch when building '{0}': incorrect argument type for an F# record. Expected '{1}', but received type '{2}'. + {0}' を構築するときの型の不一致: F# レコードの引数型が正しくありません。'{1}' が必要でしたが、型 '{2}' を受け取りました。 + + + + Type mismatch when building '{0}': incorrect argument type for an F# union. Expected '{1}', but received type '{2}'. + {0}' を構築するときの型の不一致: F# 共用体の引数型が正しくありません。'{1}' が必要でしたが、型 '{2}' を受け取りました。 + + + + Type mismatch when building '{0}': initializer doesn't match array type. Expected '{1}', but received type '{2}'. + {0}' を構築するときの型の不一致: 初期化子が配列型と一致しません。'{1}' が必要でしたが、型 '{2}' を受け取りました。 + + + + Type mismatch when building '{0}': invalid parameter for a method or indexer property. Expected '{1}', but received type '{2}'. + {0}' を構築するときの型の不一致:メソッドまたはインデクサー プロパティのパラメーターが無効です。'{1}' が必要でしたが、型 '{2}' を受け取りました。 + + + + Type mismatch when building '{0}': body of the for loop must be lambda taking integer as an argument. Expected '{1}', but received type '{2}'. + {0}' を構築するときの型の不一致: for loop の本体は整数を引数として受け取るラムダである必要があります。'{1}' が必要でしたが、型 '{2}' を受け取りました。 + + + + Type mismatch when building '{0}': lower and upper bounds must be integers. Expected '{1}', but received type '{2}'. + {0}' を構築するときの型の不一致: 下限と上限は整数である必要があります。'{1}' が必要でしたが、型 '{2}' を受け取りました。 + + + + Type mismatch when building '{0}': types of true and false branches differ. Expected '{1}', but received type '{2}'. + {0}' を構築するときの型の不一致: true と false の分岐の型が異なります。'{1}' が必要でしたが、型 '{2}' を受け取りました。 + + + + Type mismatch when building '{0}': mismatched type of argument and tuple element. Expected '{1}', but received type '{2}'. + {0}' を構築するときの型の不一致: 引数とタプル要素の型が一致しませんでした。'{1}' が必要でしたが、型 '{2}' を受け取りました。 + + + + Type mismatch when building '{0}': the variable type doesn't match the type of the right-hand-side of a let binding. Expected '{1}', but received type '{2}'. + {0}' を構築するときの型の不一致: 変数型が let 束縛の右側の型と一致しません。'{1}' が必要でしたが、型 '{2}' を受け取りました。 + + + + Unexpected quotation hole in expression. + 式に予期しない引用のホールがあります。 + + + + The parameter is not a recognized method name. + パラメーターは認識されているメソッド名ではありません。 + + + + Reset is not supported on this enumerator. + この列挙型ではリセットがサポートされていません。 + + + + The start of a range cannot be NaN. + 範囲の開始を NaN にすることはできません。 + + + + The step of a range cannot be NaN. + 範囲のステップを NaN にすることはできません。 + + + + The step of a range cannot be zero. + 範囲のステップをゼロにすることはできません。 + + + + The System.Threading.SynchronizationContext.Current of the calling thread is null. + 呼び出しスレッドの System.Threading.SynchronizationContext.Current が null です。 + + + + The tuple index '{1}' was out of range for tuple type '{0}'. + タプル インデックス '{1}' はタプル型 '{0}' の範囲外でした。 + + + + Failed to bind constructor + コンストラクターをバインドできませんでした + + + + Failed to bind field '{0}' + フィールド '{0}' をバインドできませんでした + + + + Failed to bind property '{0}' + プロパティ '{0}' をバインドできませんでした + + + + Failed to bind type '{0}' in assembly '{1}' + アセンブリ '{1}' の型 '{0}' をバインドできませんでした + + + + Incompatible record length + 互換性のないレコード長 + + + + Incorrect instance type + インスタンス型が正しくありません + + + + Incorrect number of arguments + 引数の数が正しくありません + + + + Incorrect type + 型が正しくありません + + + + Invalid function type + 無効な関数型 + + + + The member is non-static (instance), but no receiver object was supplied + メンバーは非静的 (インスタンス) ですが、レシーバー オブジェクトが指定されませんでした + + + + Parent type cannot be null + 親の型を null にすることはできません + + + + Reading a set-only property + 設定専用のプロパティを読み取っています + + + + Receiver object was unexpected, as member is static + メンバーは静的であるため、レシーバー オブジェクトは予期されていませんでした + + + + Type mismatch when building '{0}': the expression has the wrong type. Expected '{1}', but received type '{2}'. + {0}' を構築するときの型の不一致: 式に間違った型があります。'{1}' が必要でしたが、型 '{2}' を受け取りました。 + + + + Type mismatch when building '{0}': function type doesn't match delegate type. Expected '{1}', but received type '{2}'. + {0}' を構築するときの型の不一致: 関数型がデリゲート型と一致しません。'{1}' が必要でしたが、型 '{2}' を受け取りました。 + + + + Type mismatch when splicing expression into quotation literal. The type of the expression tree being inserted doesn't match the type expected by the splicing operation. Expected '{0}', but received type '{1}'. Consider type-annotating with the expected expression type, e.g., (%% x : {0}) or (%x : {0}). + 式を引用リテラルにスプライスするときの型が一致していません。挿入されている式ツリーの型が、スプライス操作に必要な型と一致しません。'{0}' が必要でしたが、型 '{1}' を受け取りました。(%% x : {0}) や (%x : {0}) など必要な式の型での型注釈付けを検討してください。 + + + + Tuple access out of range + タプルのアクセスが範囲外です + + + + The tuple lengths are different + タプルの長さが異なります + + + + F# union type requires different number of arguments + F# 共用体型には異なる数の引数が必要です + + + + Writing a get-only property + 取得専用のプロパティを書き込んでいます + + + + The method '{0}' expects {1} type arguments but {2} were provided + メソッド '{0}' には {1} 個の型引数が必要ですが、{2} 個が指定されました + + + + An index satisfying the predicate was not found in the collection. + 述語を満たすインデックスがコレクションに見つかりませんでした。 + + + + The constructor method '{0}' for the union case could not be found + 共用体ケースのコンストラクター メソッド '{0}' が見つかりませんでした + + + + first class uses of '%' or '%%' are not permitted + '%' または '%%' のファースト クラスの使用は許可されていません + + + + MoveNext not called, or finished + MoveNext は呼び出されていないか、終了しました + + + + Multiple CompilationMappingAttributes, expected at most one + 複数の CompilationMappingAttribute がありますが、必要なのは最大 1 つです + + + + Bad float value + 浮動小数値が正しくありません + + + + Bad format specifier:{0} + 書式指定子が正しくありません: {0} + + + + Bad integer supplied to dynamic formatter + 動的フォーマッタに対して指定された整数が正しくありません + + + + Expected a precision argument + 精度引数が必要でした + + + + Expected a width argument + 幅引数が必要でした + + + + The # formatting modifier is invalid in F# + # 書式修飾子は F# では無効です + + + + Missing format specifier + 書式指定子がありません + + + + Not a function type + 関数型ではありません + + + + Bad format specifier (precision) + 書式指定子 (精度) が正しくありません + + + + Bad format specifier (after {0}) + 書式指定子 ({0} の後) が正しくありません + + + + Bad format specifier (width) + 書式指定子 (幅) が正しくありません + + + + Could not bind function {0} in type {1} + 型 {1} で関数 {0} をバインドできませんでした + + + + Could not bind property {0} in type {1} + 型 {1} でプロパティ {0} をバインドできませんでした + + + + Could not bind to method + メソッドにバインドできませんでした + + + + Cannot take the address of this quotation + この引用のアドレスを取得できません + + + + Failed to bind assembly '{0}' while processing quotation data + 引用データの処理中にアセンブリ '{0}' をバインドできませんでした + + + + ill formed expression: AppOp or LetOp + 正しくない形式の式: AppOp または LetOp + + + + type argument out of range + 型引数が範囲外です + + + + This value cannot be mutated + この値は変換できません + + + + The option value was None + オプション値は None でした + + + + A continuation provided by Async.FromContinuations was invoked multiple times + Async.FromContinuations で提供される継続が複数回呼び出されました + + + + The record type '{0}' is invalid. Required constructor is not defined. + レコード型 '{0}' は無効です。必要なコンストラクターが定義されていません。 + + + + The tuple type '{0}' is invalid. Required constructor is not defined. + タプル型 '{0}' は無効です。必要なコンストラクターが定義されていません。 + + + + The input sequence contains more than one element. + 入力シーケンスに複数の要素が含まれています。 + + + + 'thenBy' and 'thenByDescending' may only be used with an ordered input + 'thenBy' および 'thenByDescending' は、順序付けされた入力だけで使用できます + + + + Unrecognized use of a 'sumBy' or 'averageBy' operator in a query. In queries whose original data is of static type IQueryable, these operators may only be used with result type int32, int64, single, double or decimal + クエリ内で 'sumBy' または 'averageBy' 演算子が認識されない使われ方をしています。元のデータがスタティック型 IQueryable であるクエリでは、これらの演算子は結果の型が int32、int64、single、double、または decimal である場合にだけ使用できます。 + + + + An if/then/else conditional or pattern matching expression with multiple branches is not permitted in a query. An if/then/else conditional may be used. + if/then/else 条件節、または分岐のあるパターン一致式は、クエリで使用できません。if/then/else 条件節が使用されている可能性があります。 + + + + This is not a valid query expression. The following construct was used in a query but is not recognized by the F#-to-LINQ query translator:\n{0}\nCheck the specification of permitted queries and consider moving some of the operations out of the query expression. + これは有効なクエリ式ではありません。クエリで次の構造が使用されていますが、F# から LINQ へのクエリ トランスレーターに認識されません:\n{0}\n許可されたクエリの仕様を確認し、一部の操作をクエリ式の外に移動することを検討してください。 + + + + This is not a valid query expression. The method '{0}' was used in a query but is not recognized by the F#-to-LINQ query translator. Check the specification of permitted queries and consider moving some of the operations out of the query expression + これは有効なクエリ式ではありません。クエリでメソッド '{0}' が使用されていますが、F# から LINQ へのクエリ トランスレーターに認識されません。許可されたクエリの仕様を確認し、一部の操作をクエリ式の外に移動することを検討してください + + + + This is not a valid query expression. The property '{0}' was used in a query but is not recognized by the F#-to-LINQ query translator. Check the specification of permitted queries and consider moving some of the operations out of the query expression. + これは有効なクエリ式ではありません。クエリでプロパティ '{0}' が使用されていますが、F# から LINQ へのクエリ トランスレーターに認識されません。許可されたクエリの仕様を確認し、一部の操作をクエリ式の外に移動することを検討してください。 + + + + This is not a valid query expression. The construct '{0}' was used in a query but is not recognized by the F#-to-LINQ query translator. Check the specification of permitted queries and consider moving some of the operations out of the query expression. + これは有効なクエリ式ではありません。クエリで構造 '{0}' が使用されていますが、F# から LINQ へのクエリ トランスレーターに認識されません。許可されたクエリの仕様を確認し、一部の操作をクエリ式の外に移動することを検討してください。 + + + + + \ No newline at end of file diff --git a/src/fsharp/FSharp.Core/xlf/FSCore.ko.xlf b/src/fsharp/FSharp.Core/xlf/FSCore.ko.xlf new file mode 100644 index 00000000000..76a111799a3 --- /dev/null +++ b/src/fsharp/FSharp.Core/xlf/FSCore.ko.xlf @@ -0,0 +1,712 @@ + + + + + + The match cases were incomplete + 일치하는 케이스가 완전하지 않습니다. + + + + First class uses of address-of operators are not permitted. + address-of 연산자의 첫 번째 클래스 사용은 허용되지 않습니다. + + + + The arrays have different lengths. + 배열의 길이가 서로 다릅니다. + + + + The input array was empty. + 입력 배열이 비어 있습니다. + + + + Input string was not in a correct format. + 입력 문자열의 형식이 잘못되었습니다. + + + + Expecting delegate type. + 대리자 형식이 필요합니다. + + + + Dynamic invocation of DivideByInt involving coercions is not supported. + 강제 변환과 관련된 DivideByInt의 동적 호출이 지원되지 않습니다. + + + + Dynamic invocation of op_Addition involving coercions is not supported. + 강제 변환과 관련된 op_Addition의 동적 호출이 지원되지 않습니다. + + + + Dynamic invocation of op_Addition involving overloading is not supported. + 오버로드와 관련된 op_Addition의 동적 호출이 지원되지 않습니다. + + + + Dynamic invocation of op_Multiply involving coercions is not supported. + 강제 변환과 관련된 op_Multiply의 동적 호출이 지원되지 않습니다. + + + + Dynamic invocation of op_Multiply involving overloading is not supported. + 오버로드와 관련된 op_Multiply의 동적 호출이 지원되지 않습니다. + + + + The end of a range cannot be NaN. + 범위의 끝은 NaN일 수 없습니다. + + + + Enumeration already finished. + 열거가 이미 완료되었습니다. + + + + Enumeration has not started. Call MoveNext. + 열거가 시작되지 않았습니다. MoveNext를 호출하세요. + + + + Set contains no elements. + 집합에 요소가 없습니다. + + + + Enumeration based on System.Int32 exceeded System.Int32.MaxValue. + System.Int32를 기반으로 하는 열거형이 System.Int32.MaxValue를 초과했습니다. + + + + Failed to read enough bytes from the stream. + 스트림에서 충분한 바이트를 읽지 못했습니다. + + + + Failure during generic comparison: the type '{0}' does not implement the System.IComparable interface. This error may be arise from the use of a function such as 'compare', 'max' or 'min' or a data structure such as 'Set' or 'Map' whose keys contain instances of this type. + 제네릭 비교 중에 오류가 발생했습니다. '{0}' 형식은 System.IComparable 인터페이스를 구현하지 않습니다. 이 오류는 키에 이 형식의 인스턴스가 포함된 'Set' 또는 'Map' 등의 데이터 구조나 'compare', 'max' 또는 'min' 등의 함수 사용으로 인해 발생할 수 있습니다. + + + + The index was outside the range of elements in the list. + 인덱스가 목록에서 요소의 범위를 벗어났습니다. + + + + The input list was empty. + 입력 목록이 비어 있습니다. + + + + The input must be non-negative. + 입력은 음수가 아니어야 합니다. + + + + The input must be positive. + 입력은 양수여야 합니다. + + + + The input sequence was empty. + 입력 시퀀스가 비어 있습니다. + + + + This is not a valid tuple type for the F# reflection library. + F# 리플렉션 라이브러리에 대한 올바른 튜플 형식이 아닙니다. + + + + The item, key, or index was not found in the collection. + 컬렉션에서 항목, 키 또는 인덱스를 찾을 수 없습니다. + + + + The lists had different lengths. + 목록의 길이가 서로 다릅니다. + + + + The MailboxProcessor has already been started. + MailboxProcessor가 이미 시작되었습니다. + + + + MailboxProcessor.PostAndAsyncReply timed out. + MailboxProcessor.PostAndAsyncReply 시간이 초과되었습니다. + + + + MailboxProcessor.PostAndReply timed out. + MailboxProcessor.PostAndReply 시간이 초과되었습니다. + + + + Mailbox.Receive timed out. + Mailbox.Receive 시간이 초과되었습니다. + + + + Mailbox.Scan timed out. + Mailbox.Scan 시간이 초과되었습니다. + + + + Map values cannot be mutated. + 맵 값을 변경할 수 없습니다. + + + + The IAsyncResult object provided does not match this 'Cancel' operation. + 제공된 IAsyncResult 개체가 이 '취소' 작업과 일치하지 않습니다. + + + + The IAsyncResult object provided does not match this 'End' operation. + 제공된 IAsyncResult 개체가 이 '종료' 작업과 일치하지 않습니다. + + + + Negating the minimum value of a twos complement number is invalid. + 2의 보수 중 최소값 부정이 잘못되었습니다. + + + + The initialization of an object or value resulted in an object or value being accessed recursively before it was fully initialized. + 개체 또는 값을 초기화한 결과 해당 개체 또는 값이 완전히 초기화되기 전에 재귀적으로 액세스되고 있습니다. + + + + The static initialization of a file or type resulted in static data being accessed recursively before it was fully initialized. + 파일 또는 유형을 정적으로 초기화한 결과 정적 데이터가 완전히 초기화되기 전에 재귀적으로 액세스되고 있습니다. + + + + Arrays with non-zero base cannot be created on this platform. + 이 플랫폼에서는 0부터 시작하지 않는 배열을 만들 수 없습니다. + + + + Type '{0}' is not a function type. + '{0}' 형식은 함수 형식이 아닙니다. + + + + Type '{0}' is not the representation of an F# exception declaration. + '{0}' 형식은 F# 예외 선언의 표현이 아닙니다. + + + + The function did not compute a permutation. + 함수가 순열을 계산하지 않습니다. + + + + Type '{0}' is not an F# record type. + '{0}' 형식은 F# 레코드 형식이 아닙니다. + + + + Type '{0}' is not a tuple type. + '{0}' 형식은 튜플 형식이 아닙니다. + + + + Type '{0}' is not an F# union type. + '{0}' 형식은 F# 공용 구조체 형식이 아닙니다. + + + + The two objects have different types and are not comparable. + 두 개체의 형식이 다르므로 비교할 수 없습니다. + + + + The input sequence has an insufficient number of elements. + 입력 시퀀스의 요소 수가 부족합니다. + + + + This object is for recursive equality calls and cannot be used for hashing. + 이 개체는 재귀 동등 호출용이므로 해시용으로 사용할 수 없습니다. + + + + One of the elements in the array is null. + 배열에 있는 요소 중 하나가 null입니다. + + + + The object is not an F# record value. + 개체가 F# 레코드 값이 아닙니다. + + + + The object is null and no type was given. Either pass a non-null object or a non-null type parameter. + 개체가 null이며 형식이 지정되지 않았습니다. null이 아닌 개체 또는 null이 아닌 형식 매개 변수를 전달하세요. + + + + The index is outside the legal range. + 인덱스가 올바른 범위를 벗어났습니다. + + + + The type '{0}' is the representation of an F# exception declaration but its representation is private. You must specify BindingFlags.NonPublic to access private type representations. + '{0}' 형식은 F# 예외 선언의 표현인데 표현은 전용입니다. 전용 형식 표현에 액세스하려면 BindingFlags.NonPublic을 지정해야 합니다. + + + + The type '{0}' is an F# record type but its representation is private. You must specify BindingFlags.NonPublic to access private type representations. + '{0}' 형식은 F# 레코드 형식인데 표현은 전용입니다. 전용 형식 표현에 액세스하려면 BindingFlags.NonPublic을 지정해야 합니다. + + + + The type '{0}' is an F# union type but its representation is private. You must specify BindingFlags.NonPublic to access private type representations. + '{0}' 형식은 F# 공용 구조체 형식인데 표현은 전용입니다. 전용 형식 표현에 액세스하려면 BindingFlags.NonPublic을 지정해야 합니다. + + + + Expected exactly one type argument. + 정확히 형식 인수 하나만 필요합니다. + + + + Expected exactly two type arguments. + 정확히 형식 인수 두 개만 필요합니다. + + + + Not a valid F# union case index. + 올바른 F# 공용 구조체 케이스 인덱스가 아닙니다. + + + + Type '{0}' did not have an F# record field named '{1}'. + {0}' 형식에 이름이 '{1}'인 F# 레코드 필드가 없습니다. + + + + Type '{0}' did not have an F# union case named '{1}'. + {0}' 형식에 이름이 '{1}'인 F# 공용 구조체 케이스가 없습니다. + + + + Type mismatch when building '{0}': the type of the field was incorrect. Expected '{1}', but received type '{2}'. + {0}'을(를) 작성하는 동안 형식 불일치 문제가 발생했습니다. 필드의 형식이 잘못되었습니다. '{1}'이(가) 필요한데 '{2}' 형식을 수신했습니다. + + + + Type mismatch when building '{0}': body must return unit. Expected '{1}', but received type '{2}'. + {0}'을(를) 작성하는 동안 형식 불일치 문제가 발생했습니다. 본문이 단위를 반환해야 합니다. '{1}'이(가) 필요한데 '{2}' 형식을 수신했습니다. + + + + Type mismatch when building '{0}': condition expression must be of type bool. Expected '{1}', but received type '{2}'. + {0}'을(를) 작성하는 동안 형식 불일치 문제가 발생했습니다. 조건식이 부울 형식이어야 합니다. '{1}'이(가) 필요한데 '{2}' 형식을 수신했습니다. + + + + Type mismatch when building '{0}': expected function type in function application or let binding. Expected '{1}', but received type '{2}'. + {0}'을(를) 작성하는 동안 형식 불일치 문제가 발생했습니다. 함수 응용 프로그램 또는 let 바인딩에 함수 형식이 필요합니다. '{1}'이(가) 필요한데 '{2}' 형식을 수신했습니다. + + + + Type mismatch when building '{0}': expression doesn't match the tuple type. Expected '{1}', but received type '{2}'. + {0}'을(를) 작성하는 동안 형식 불일치 문제가 발생했습니다. 식이 튜플 형식과 일치하지 않습니다. '{1}'이(가) 필요한데 '{2}' 형식을 수신했습니다. + + + + Type mismatch when building '{0}': types of expression does not match. Expected '{1}', but received type '{2}'. + {0}'을(를) 작성하는 동안 형식 불일치 문제가 발생했습니다. 식의 형식이 일치하지 않습니다. '{1}'이(가) 필요한데 '{2}' 형식을 수신했습니다. + + + + Type mismatch when building '{0}': function argument type doesn't match. Expected '{1}', but received type '{2}'. + {0}'을(를) 작성하는 동안 형식 불일치 문제가 발생했습니다. 함수 인수 형식이 일치하지 않습니다. '{1}'이(가) 필요한데 '{2}' 형식을 수신했습니다. + + + + Type mismatch when building '{0}': guard must return boolean. Expected '{1}', but received type '{2}'. + {0}'을(를) 작성하는 동안 형식 불일치 문제가 발생했습니다. 가드는 부울을 반환해야 합니다. '{1}'이(가) 필요한데 '{2}' 형식을 수신했습니다. + + + + Type mismatch when building '{0}': incorrect argument type for an F# record. Expected '{1}', but received type '{2}'. + {0}'을(를) 작성하는 동안 형식 불일치 문제가 발생했습니다. F# 레코드에 대한 인수 형식이 잘못되었습니다. '{1}'이(가) 필요한데 '{2}' 형식을 수신했습니다. + + + + Type mismatch when building '{0}': incorrect argument type for an F# union. Expected '{1}', but received type '{2}'. + {0}'을(를) 작성하는 동안 형식 불일치 문제가 발생했습니다. F# 공용 구조체에 대한 인수 형식이 잘못되었습니다. '{1}'이(가) 필요한데 '{2}' 형식을 수신했습니다. + + + + Type mismatch when building '{0}': initializer doesn't match array type. Expected '{1}', but received type '{2}'. + {0}'을(를) 작성하는 동안 형식 불일치 문제가 발생했습니다. 이니셜라이저가 배열 형식과 일치하지 않습니다. '{1}'이(가) 필요한데 '{2}' 형식을 수신했습니다. + + + + Type mismatch when building '{0}': invalid parameter for a method or indexer property. Expected '{1}', but received type '{2}'. + {0}'을(를) 작성하는 동안 형식 불일치 문제가 발생했습니다. 메서드 또는 인덱서 속성에 대한 매개 변수가 잘못되었습니다. '{1}'이(가) 필요한데 '{2}' 형식을 수신했습니다. + + + + Type mismatch when building '{0}': body of the for loop must be lambda taking integer as an argument. Expected '{1}', but received type '{2}'. + {0}'을(를) 작성하는 동안 형식 불일치 문제가 발생했습니다. For 루프의 본문은 정수를 인수로 사용하는 람다여야 합니다. '{1}'이(가) 필요한데 '{2}' 형식을 수신했습니다. + + + + Type mismatch when building '{0}': lower and upper bounds must be integers. Expected '{1}', but received type '{2}'. + {0}'을(를) 작성하는 동안 형식 불일치 문제가 발생했습니다. 하한 및 상한은 정수여야 합니다. '{1}'이(가) 필요한데 '{2}' 형식을 수신했습니다. + + + + Type mismatch when building '{0}': types of true and false branches differ. Expected '{1}', but received type '{2}'. + {0}'을(를) 작성하는 동안 형식 불일치 문제가 발생했습니다. True 및 False 분기의 형식이 서로 다릅니다. '{1}'이(가) 필요한데 '{2}' 형식을 수신했습니다. + + + + Type mismatch when building '{0}': mismatched type of argument and tuple element. Expected '{1}', but received type '{2}'. + {0}'을(를) 작성하는 동안 형식 불일치 문제가 발생했습니다. 인수와 튜플 요소의 형식이 일치하지 않습니다. '{1}'이(가) 필요한데 '{2}' 형식을 수신했습니다. + + + + Type mismatch when building '{0}': the variable type doesn't match the type of the right-hand-side of a let binding. Expected '{1}', but received type '{2}'. + {0}'을(를) 작성하는 동안 형식 불일치 문제가 발생했습니다. 변수 형식이 let 바인딩의 오른쪽 형식과 일치하지 않습니다. '{1}'이(가) 필요한데 '{2}' 형식을 수신했습니다. + + + + Unexpected quotation hole in expression. + 식에 예기치 않은 인용 오류가 있습니다. + + + + The parameter is not a recognized method name. + 매개 변수는 인식할 수 없는 메서드 이름입니다. + + + + Reset is not supported on this enumerator. + 다시 설정은 이 열거자에서 지원되지 않습니다. + + + + The start of a range cannot be NaN. + 범위의 시작은 NaN일 수 없습니다. + + + + The step of a range cannot be NaN. + 범위의 단계는 NaN일 수 없습니다. + + + + The step of a range cannot be zero. + 범위의 단계는 0일 수 없습니다. + + + + The System.Threading.SynchronizationContext.Current of the calling thread is null. + 호출 스레드의 System.Threading.SynchronizationContext.Current가 null입니다. + + + + The tuple index '{1}' was out of range for tuple type '{0}'. + 튜플 인덱스 '{1}'이(가) 튜플 형식 '{0}'에 대한 범위를 벗어났습니다. + + + + Failed to bind constructor + 생성자를 바인딩하지 못했습니다. + + + + Failed to bind field '{0}' + '{0}' 필드를 바인딩하지 못했습니다. + + + + Failed to bind property '{0}' + '{0}' 속성을 바인딩하지 못했습니다. + + + + Failed to bind type '{0}' in assembly '{1}' + {1}' 어셈블리의 '{0}' 형식을 바인딩하지 못했습니다. + + + + Incompatible record length + 호환되지 않는 레코드 길이입니다. + + + + Incorrect instance type + 인스턴스 형식이 잘못되었습니다. + + + + Incorrect number of arguments + 인수 개수가 잘못되었습니다. + + + + Incorrect type + 형식이 잘못되었습니다. + + + + Invalid function type + 함수 형식이 잘못되었습니다. + + + + The member is non-static (instance), but no receiver object was supplied + 멤버가 비정적(인스턴스)이지만 수신기 개체를 지정하지 않았습니다. + + + + Parent type cannot be null + 부모 형식은 null일 수 없습니다. + + + + Reading a set-only property + set-only 속성을 읽고 있습니다. + + + + Receiver object was unexpected, as member is static + 멤버가 정적이므로 수신기 개체는 필요하지 않습니다. + + + + Type mismatch when building '{0}': the expression has the wrong type. Expected '{1}', but received type '{2}'. + {0}'을(를) 작성하는 동안 형식 불일치 문제가 발생했습니다. 식에 잘못된 형식이 있습니다. '{1}'이(가) 필요한데 '{2}' 형식을 수신했습니다. + + + + Type mismatch when building '{0}': function type doesn't match delegate type. Expected '{1}', but received type '{2}'. + {0}'을(를) 작성하는 동안 형식 불일치 문제가 발생했습니다. 함수 형식이 대리자 형식과 일치하지 않습니다. '{1}'이(가) 필요한데 '{2}' 형식을 수신했습니다. + + + + Type mismatch when splicing expression into quotation literal. The type of the expression tree being inserted doesn't match the type expected by the splicing operation. Expected '{0}', but received type '{1}'. Consider type-annotating with the expected expression type, e.g., (%% x : {0}) or (%x : {0}). + 식을 따옴표로 묶인 리터럴로 스플라이스하는 동안 형식 불일치 문제가 발생했습니다. 삽입 중인 식 트리의 형식이 스플라이스 작업에 필요한 형식과 일치하지 않습니다. '{0}'이(가) 필요한데 '{1}'을(를) 수신했습니다. (%% x : {0}) 또는 (%x : {0})과 같이 필요한 식 형식으로 형식 주석 처리하세요. + + + + Tuple access out of range + 튜플 액세스가 범위를 벗어났습니다. + + + + The tuple lengths are different + 튜플 길이가 서로 다릅니다. + + + + F# union type requires different number of arguments + F# 공용 구조체 형식에 다른 개수의 인수가 필요합니다. + + + + Writing a get-only property + get-only 속성을 쓰고 있습니다. + + + + The method '{0}' expects {1} type arguments but {2} were provided + {0}' 메서드에는 {1} 형식 인수가 필요한데 {2}이(가) 제공되었습니다. + + + + An index satisfying the predicate was not found in the collection. + 컬렉션에서 조건자를 만족하는 인덱스를 찾을 수 없습니다. + + + + The constructor method '{0}' for the union case could not be found + 공용 구조체 케이스의 생성자 메서드 '{0}'을(를) 찾을 수 없습니다. + + + + first class uses of '%' or '%%' are not permitted + '%' 또는 '%%'의 첫 번째 클래스를 사용할 수 없습니다. + + + + MoveNext not called, or finished + MoveNext가 호출되지 않았거나 완료되었습니다. + + + + Multiple CompilationMappingAttributes, expected at most one + CompilationMappingAttributes가 여러 개입니다. 하나만 필요합니다. + + + + Bad float value + float 값이 잘못되었습니다. + + + + Bad format specifier:{0} + 잘못된 형식 지정자: {0} + + + + Bad integer supplied to dynamic formatter + 동적 포맷터에 제공된 정수가 잘못되었습니다. + + + + Expected a precision argument + 전체 자릿수 인수가 필요합니다. + + + + Expected a width argument + 너비 인수가 필요합니다. + + + + The # formatting modifier is invalid in F# + F#에서는 # 서식 지정 한정자를 사용할 수 없습니다. + + + + Missing format specifier + 서식 지정자가 없습니다. + + + + Not a function type + 함수 형식이 아닙니다. + + + + Bad format specifier (precision) + 잘못된 형식 지정자(전체 자릿수) + + + + Bad format specifier (after {0}) + 잘못된 형식 지정자({0} 이후) + + + + Bad format specifier (width) + 잘못된 형식 지정자(너비) + + + + Could not bind function {0} in type {1} + {1} 형식의 {0} 함수를 바인딩할 수 없습니다. + + + + Could not bind property {0} in type {1} + {1} 형식의 {0} 속성을 바인딩할 수 없습니다. + + + + Could not bind to method + 메서드에 바인딩할 수 없습니다. + + + + Cannot take the address of this quotation + 이 인용의 주소를 가져올 수 없습니다. + + + + Failed to bind assembly '{0}' while processing quotation data + 인용 데이터를 처리하는 동안 '{0}' 어셈블리를 바인딩하지 못했습니다. + + + + ill formed expression: AppOp or LetOp + 잘못된 형식의 식: AppOp 또는 LetOp + + + + type argument out of range + 형식 인수가 범위를 벗어났습니다. + + + + This value cannot be mutated + 이 값을 변경할 수 없습니다. + + + + The option value was None + 옵션 값이 None입니다. + + + + A continuation provided by Async.FromContinuations was invoked multiple times + Async.FromContinuations에 의해 제공된 연속 작업이 여러 번 호출되었습니다. + + + + The record type '{0}' is invalid. Required constructor is not defined. + 레코드 형식 '{0}'이(가) 잘못되었습니다. 필요한 생성자가 정의되지 않았습니다. + + + + The tuple type '{0}' is invalid. Required constructor is not defined. + 튜플 형식 '{0}'이(가) 잘못되었습니다. 필요한 생성자가 정의되지 않았습니다. + + + + The input sequence contains more than one element. + 입력 시퀀스에 요소가 두 개 이상 있습니다. + + + + 'thenBy' and 'thenByDescending' may only be used with an ordered input + 'thenBy' 및 'thenByDescending'은 순서가 지정된 입력에서만 사용할 수 있습니다. + + + + Unrecognized use of a 'sumBy' or 'averageBy' operator in a query. In queries whose original data is of static type IQueryable, these operators may only be used with result type int32, int64, single, double or decimal + 쿼리에서 'sumBy' 또는 'averageBy' 연산자 사용을 인식할 수 없습니다. 원본 데이터가 정적 형식 IQueryable인 쿼리의 경우 결과 형식 int32, int64, single, double 또는 decimal에만 이러한 연산자를 사용할 수 있습니다. + + + + An if/then/else conditional or pattern matching expression with multiple branches is not permitted in a query. An if/then/else conditional may be used. + 여러 분기가 포함된 if/then/else 조건식 또는 패턴 일치 식은 쿼리에 사용할 수 없습니다. if/then/else 조건문을 사용할 수 있습니다. + + + + This is not a valid query expression. The following construct was used in a query but is not recognized by the F#-to-LINQ query translator:\n{0}\nCheck the specification of permitted queries and consider moving some of the operations out of the query expression. + 올바른 쿼리 식이 아닙니다. 다음 생성자가 쿼리에 사용되었지만 F#-to-LINQ 쿼리 변환기에서 인식할 수 없습니다.\n{0}\n허용되는 쿼리의 사양을 확인하고 일부 연산을 쿼리 식 외부로 이동하세요. + + + + This is not a valid query expression. The method '{0}' was used in a query but is not recognized by the F#-to-LINQ query translator. Check the specification of permitted queries and consider moving some of the operations out of the query expression + 올바른 쿼리 식이 아닙니다. '{0}' 메서드가 쿼리에 사용되었지만 F#-to-LINQ 쿼리 변환기에서 인식할 수 없습니다. 허용되는 쿼리의 사양을 확인하고 일부 연산을 쿼리 식 외부로 이동하세요. + + + + This is not a valid query expression. The property '{0}' was used in a query but is not recognized by the F#-to-LINQ query translator. Check the specification of permitted queries and consider moving some of the operations out of the query expression. + 올바른 쿼리 식이 아닙니다. '{0}' 속성이 쿼리에 사용되었지만 F#-to-LINQ 쿼리 변환기에서 인식할 수 없습니다. 허용되는 쿼리의 사양을 확인하고 일부 연산을 쿼리 식 외부로 이동하세요. + + + + This is not a valid query expression. The construct '{0}' was used in a query but is not recognized by the F#-to-LINQ query translator. Check the specification of permitted queries and consider moving some of the operations out of the query expression. + 올바른 쿼리 식이 아닙니다. '{0}' 구문이 쿼리에 사용되었지만 F#-to-LINQ 쿼리 변환기에서 인식할 수 없습니다. 허용되는 쿼리의 사양을 확인하고 일부 연산을 쿼리 식 외부로 이동하세요. + + + + + \ No newline at end of file diff --git a/src/fsharp/FSharp.Core/xlf/FSCore.pl.xlf b/src/fsharp/FSharp.Core/xlf/FSCore.pl.xlf new file mode 100644 index 00000000000..3d869bc263b --- /dev/null +++ b/src/fsharp/FSharp.Core/xlf/FSCore.pl.xlf @@ -0,0 +1,712 @@ + + + + + + The match cases were incomplete + Instrukcje „case” do porównania są niekompletne. + + + + First class uses of address-of operators are not permitted. + Używanie operatorów „address-of” w pierwszej klasie jest niedozwolone. + + + + The arrays have different lengths. + Tablice mają różne długości. + + + + The input array was empty. + Tablica wejściowa jest pusta. + + + + Input string was not in a correct format. + Nieprawidłowy format ciągu wejściowego. + + + + Expecting delegate type. + Oczekiwano typu delegowanego. + + + + Dynamic invocation of DivideByInt involving coercions is not supported. + Dynamiczne wywołanie metody DivideByInt z wymuszeniami nie jest obsługiwane. + + + + Dynamic invocation of op_Addition involving coercions is not supported. + Dynamiczne wywołanie metody op_Addition z wymuszeniami nie jest obsługiwane. + + + + Dynamic invocation of op_Addition involving overloading is not supported. + Dynamiczne wywołanie metody op_Addition z przeciążeniem nie jest obsługiwane. + + + + Dynamic invocation of op_Multiply involving coercions is not supported. + Dynamiczne wywołanie metody op_Multiply z wymuszeniami nie jest obsługiwane. + + + + Dynamic invocation of op_Multiply involving overloading is not supported. + Dynamiczne wywołanie metody op_Multiply z przeciążeniem nie jest obsługiwane. + + + + The end of a range cannot be NaN. + Końcową wartością zakresu nie może być NaN. + + + + Enumeration already finished. + Wyliczanie zostało już zakończone. + + + + Enumeration has not started. Call MoveNext. + Wyliczanie nie zostało uruchomione. Wywołaj element MoveNext. + + + + Set contains no elements. + Zestaw nie zawiera żadnych elementów. + + + + Enumeration based on System.Int32 exceeded System.Int32.MaxValue. + Wyliczenie oparte na obiekcie System.Int32 przekracza wartość określoną w polu System.Int32.MaxValue. + + + + Failed to read enough bytes from the stream. + Nie można odczytać wystarczającej liczby bajtów ze strumienia. + + + + Failure during generic comparison: the type '{0}' does not implement the System.IComparable interface. This error may be arise from the use of a function such as 'compare', 'max' or 'min' or a data structure such as 'Set' or 'Map' whose keys contain instances of this type. + Nie można wykonać standardowego porównania: typ „{0}” nie implementuje interfejsu System.IComparable. Błąd może być spowodowany użyciem funkcji takiej jak „compare”, „max” lub „min” albo struktury danych takiej jak „Set” lub „Map”, której klucze zawierają wystąpienia tego typu. + + + + The index was outside the range of elements in the list. + Wartość indeksu jest spoza zakresu elementów na liście. + + + + The input list was empty. + Lista wejściowa jest pusta. + + + + The input must be non-negative. + Wartość wejściowa nie może być ujemna. + + + + The input must be positive. + Wartość wejściowa musi być dodatnia. + + + + The input sequence was empty. + Sekwencja wejściowa jest pusta. + + + + This is not a valid tuple type for the F# reflection library. + To nie jest prawidłowy typ krotki dla biblioteki odbić F#. + + + + The item, key, or index was not found in the collection. + W kolekcji nie odnaleziono elementu, klucza lub indeksu. + + + + The lists had different lengths. + Listy mają różne długości. + + + + The MailboxProcessor has already been started. + Kolejka MailboxProcessor została już uruchomiona. + + + + MailboxProcessor.PostAndAsyncReply timed out. + Upłynął limit czasu działania metody MailboxProcessor.PostAndAsyncReply. + + + + MailboxProcessor.PostAndReply timed out. + Upłynął limit czasu działania metody MailboxProcessor.PostAndReply. + + + + Mailbox.Receive timed out. + Upłynął limit czasu działania metody Mailbox.Receive. + + + + Mailbox.Scan timed out. + Upłynął limit czasu działania metody Mailbox.Scan. + + + + Map values cannot be mutated. + Przyporządkowane wartości nie mogą ulegać mutacjom. + + + + The IAsyncResult object provided does not match this 'Cancel' operation. + Podany obiekt IAsyncResult nie pasuje do tej operacji „Cancel”. + + + + The IAsyncResult object provided does not match this 'End' operation. + Podany obiekt IAsyncResult nie pasuje do tej operacji „End”. + + + + Negating the minimum value of a twos complement number is invalid. + Negacja minimalnej wartości liczby zapisanej w notacji uzupełniania do dwóch jest nieprawidłowa. + + + + The initialization of an object or value resulted in an object or value being accessed recursively before it was fully initialized. + Zainicjowanie obiektu lub wartości spowodowało cykliczny dostęp do tego obiektu/wartości przed zakończeniem inicjowania. + + + + The static initialization of a file or type resulted in static data being accessed recursively before it was fully initialized. + Statyczne zainicjowanie pliku lub typu spowodowało cykliczny dostęp do statycznych danych przed zakończeniem inicjowania. + + + + Arrays with non-zero base cannot be created on this platform. + Na tej platformie nie można tworzyć tablic o wartości początkowej zero. + + + + Type '{0}' is not a function type. + Typ „{0}” nie jest typem funkcji. + + + + Type '{0}' is not the representation of an F# exception declaration. + Typ „{0}” nie reprezentuje deklaracji wyjątku języka F#. + + + + The function did not compute a permutation. + Funkcja nie oblicza permutacji. + + + + Type '{0}' is not an F# record type. + Typ „{0}” nie jest typem rekordu języka F#. + + + + Type '{0}' is not a tuple type. + Typ „{0}” nie jest typem krotki. + + + + Type '{0}' is not an F# union type. + Typ „{0}” nie jest typem unii języka F#. + + + + The two objects have different types and are not comparable. + Te dwa obiekty są różnego typu, dlatego nie można ich porównać. + + + + The input sequence has an insufficient number of elements. + Sekwencja wejściowa zawiera niewystarczającą liczbę elementów. + + + + This object is for recursive equality calls and cannot be used for hashing. + Ten obiekt jest przeznaczony dla cyklicznego wywoływania porównań i nie może służyć do tworzenia skrótów. + + + + One of the elements in the array is null. + Jeden z elementów w tablicy ma wartość zerową. + + + + The object is not an F# record value. + Obiekt nie jest wartością rekordu języka F#. + + + + The object is null and no type was given. Either pass a non-null object or a non-null type parameter. + Obiekt ma wartość zerową oraz nie określono jego typu. Podaj obiekt niepusty albo parametr o zdefiniowanym typie. + + + + The index is outside the legal range. + Wartość indeksu leży poza dozwolonym zakresem. + + + + The type '{0}' is the representation of an F# exception declaration but its representation is private. You must specify BindingFlags.NonPublic to access private type representations. + Typ „{0}” reprezentuje deklarację wyjątku języka F#, jednak reprezentacja ta ma charakter prywatny. Aby mieć dostęp do reprezentacji prywatnych, należy ustawić flagę BindingFlags.NonPublic. + + + + The type '{0}' is an F# record type but its representation is private. You must specify BindingFlags.NonPublic to access private type representations. + Typ „{0}” reprezentuje typ rekordu języka F#, jednak reprezentacja ta ma charakter prywatny. Aby mieć dostęp do reprezentacji prywatnych, należy ustawić flagę BindingFlags.NonPublic. + + + + The type '{0}' is an F# union type but its representation is private. You must specify BindingFlags.NonPublic to access private type representations. + Typ „{0}” reprezentuje typ unii języka F#, jednak reprezentacja ta ma charakter prywatny. Aby mieć dostęp do reprezentacji prywatnych, należy ustawić flagę BindingFlags.NonPublic. + + + + Expected exactly one type argument. + Oczekiwano dokładnie jednego argumentu typu. + + + + Expected exactly two type arguments. + Oczekiwano dokładnie dwóch argumentów typu. + + + + Not a valid F# union case index. + Nieprawidłowy indeks instrukcji „case” złożenia języka F#. + + + + Type '{0}' did not have an F# record field named '{1}'. + Typ „{0}” nie zawiera pola rekordu języka F# o nazwie „{1}”. + + + + Type '{0}' did not have an F# union case named '{1}'. + Typ „{0}” nie zawiera instrukcji „case” złożenia języka F# o nazwie „{1}”. + + + + Type mismatch when building '{0}': the type of the field was incorrect. Expected '{1}', but received type '{2}'. + Niezgodność typów podczas kompilowania elementu „{0}”: błędny typ pola. Oczekiwano typu „{1}”, natomiast stwierdzono typ „{2}”. + + + + Type mismatch when building '{0}': body must return unit. Expected '{1}', but received type '{2}'. + Niezgodność typów podczas kompilowania elementu „{0}”: z treści musi być zwracana jednostka. Oczekiwano typu „{1}”, natomiast stwierdzono typ „{2}”. + + + + Type mismatch when building '{0}': condition expression must be of type bool. Expected '{1}', but received type '{2}'. + Niezgodność typów podczas kompilowania elementu „{0}”: wyrażenie warunku musi być wyrażeniem logicznym. Oczekiwano typu „{1}”, natomiast stwierdzono typ „{2}”. + + + + Type mismatch when building '{0}': expected function type in function application or let binding. Expected '{1}', but received type '{2}'. + Niezgodność typów podczas kompilowania elementu „{0}”: oczekiwano typu funkcji w zastosowaniu funkcji lub powiązaniu zezwolenia. Oczekiwano typu „{1}”, natomiast stwierdzono typ „{2}”. + + + + Type mismatch when building '{0}': expression doesn't match the tuple type. Expected '{1}', but received type '{2}'. + Niezgodność typów podczas kompilowania elementu „{0}”: wyrażenie nie pasuje do typu krotki. Oczekiwano typu „{1}”, natomiast stwierdzono typ „{2}”. + + + + Type mismatch when building '{0}': types of expression does not match. Expected '{1}', but received type '{2}'. + Niezgodność typów podczas kompilowania elementu „{0}”: niezgodne typy wyrażeń. Oczekiwano typu „{1}”, natomiast stwierdzono typ „{2}”. + + + + Type mismatch when building '{0}': function argument type doesn't match. Expected '{1}', but received type '{2}'. + Niezgodność typów podczas kompilowania elementu „{0}”: niezgodny typ argumentu funkcji. Oczekiwano typu „{1}”, natomiast stwierdzono typ „{2}”. + + + + Type mismatch when building '{0}': guard must return boolean. Expected '{1}', but received type '{2}'. + Niezgodność typów podczas kompilowania elementu „{0}”: strażnik musi zwracać wartość logiczną. Oczekiwano typu „{1}”, natomiast stwierdzono typ „{2}”. + + + + Type mismatch when building '{0}': incorrect argument type for an F# record. Expected '{1}', but received type '{2}'. + Niezgodność typów podczas kompilowania elementu „{0}”: błędny typ argumentu rekordu języka F#. Oczekiwano typu „{1}”, natomiast stwierdzono typ „{2}”. + + + + Type mismatch when building '{0}': incorrect argument type for an F# union. Expected '{1}', but received type '{2}'. + Niezgodność typów podczas kompilowania elementu „{0}”: błędny typ argumentu złożenia języka F#. Oczekiwano typu „{1}”, natomiast stwierdzono typ „{2}”. + + + + Type mismatch when building '{0}': initializer doesn't match array type. Expected '{1}', but received type '{2}'. + Niezgodność typów podczas kompilowania elementu „{0}”: inicjator nie pasuje do typu tablicy. Oczekiwano typu „{1}”, natomiast stwierdzono typ „{2}”. + + + + Type mismatch when building '{0}': invalid parameter for a method or indexer property. Expected '{1}', but received type '{2}'. + Niezgodność typów podczas kompilowania elementu „{0}”: nieprawidłowy parametr metody lub właściwości indeksatora. Oczekiwano typu „{1}”, natomiast stwierdzono typ „{2}”. + + + + Type mismatch when building '{0}': body of the for loop must be lambda taking integer as an argument. Expected '{1}', but received type '{2}'. + Niezgodność typów podczas kompilowania elementu „{0}”: treścią pętli „for” musi być wyrażenie lambda, którego argumentem jest liczba całkowita. Oczekiwano typu „{1}”, natomiast stwierdzono typ „{2}”. + + + + Type mismatch when building '{0}': lower and upper bounds must be integers. Expected '{1}', but received type '{2}'. + Niezgodność typów podczas kompilowania elementu „{0}”: wartości graniczne dolna i górna muszą być liczbami całkowitymi. Oczekiwano typu „{1}”, natomiast stwierdzono typ „{2}”. + + + + Type mismatch when building '{0}': types of true and false branches differ. Expected '{1}', but received type '{2}'. + Niezgodność typów podczas kompilowania elementu „{0}”: typy gałęzi prawdy i fałszu różnią się od siebie. Oczekiwano typu „{1}”, natomiast stwierdzono typ „{2}”. + + + + Type mismatch when building '{0}': mismatched type of argument and tuple element. Expected '{1}', but received type '{2}'. + Niezgodność typów podczas kompilowania elementu „{0}”: niezgodne typy argumentu i elementu krotki. Oczekiwano typu „{1}”, natomiast stwierdzono typ „{2}”. + + + + Type mismatch when building '{0}': the variable type doesn't match the type of the right-hand-side of a let binding. Expected '{1}', but received type '{2}'. + Niezgodność typów podczas kompilowania elementu „{0}”: typ zmiennej nie pasuje do typu prawej części powiązania zezwolenia. Oczekiwano typu „{1}”, natomiast stwierdzono typ „{2}”. + + + + Unexpected quotation hole in expression. + Nieoczekiwana przerwa w cytacie w wyrażeniu. + + + + The parameter is not a recognized method name. + Parametr nie jest rozpoznawaną nazwą metody. + + + + Reset is not supported on this enumerator. + Ten moduł wyliczający nie obsługuje resetowania. + + + + The start of a range cannot be NaN. + Początkową wartością zakresu nie może być NaN. + + + + The step of a range cannot be NaN. + Wartością kroku w zakresie nie może być NaN. + + + + The step of a range cannot be zero. + Wartością kroku w zakresie nie może być zero. + + + + The System.Threading.SynchronizationContext.Current of the calling thread is null. + Właściwość System.Threading.SynchronizationContext.Current w wątku wywołującym ma wartość zerową. + + + + The tuple index '{1}' was out of range for tuple type '{0}'. + Indeks „{1}” jest poza zakresem typu krotki „{0}”. + + + + Failed to bind constructor + Nie można powiązać konstruktora. + + + + Failed to bind field '{0}' + Nie można powiązać pola „{0}”. + + + + Failed to bind property '{0}' + Nie można powiązać właściwości „{0}”. + + + + Failed to bind type '{0}' in assembly '{1}' + Nie można powiązać typu „{0}” w zestawie „{1}”. + + + + Incompatible record length + Niezgodna długość rekordu. + + + + Incorrect instance type + Błędny typ wystąpienia. + + + + Incorrect number of arguments + Błędna liczba argumentów. + + + + Incorrect type + Błędny typ. + + + + Invalid function type + Nieprawidłowy typ funkcji. + + + + The member is non-static (instance), but no receiver object was supplied + Element członkowski jest (wystąpieniem) niestatycznym, jednak nie określono obiektu odbiornika. + + + + Parent type cannot be null + Typ nadrzędny nie może mieć wartości zerowej. + + + + Reading a set-only property + Odczytywanie właściwości ustawianej + + + + Receiver object was unexpected, as member is static + Obiekt odbiornika jest nieoczekiwany, ponieważ element członkowski ma charakter statyczny. + + + + Type mismatch when building '{0}': the expression has the wrong type. Expected '{1}', but received type '{2}'. + Niezgodność typów podczas kompilowania elementu „{0}”: wyrażenie ma błędny typ. Oczekiwano typu „{1}”, natomiast stwierdzono typ „{2}”. + + + + Type mismatch when building '{0}': function type doesn't match delegate type. Expected '{1}', but received type '{2}'. + Niezgodność typów podczas kompilowania elementu „{0}”: typ funkcji nie pasuje do typu delegowanego. Oczekiwano typu „{1}”, natomiast stwierdzono typ „{2}”. + + + + Type mismatch when splicing expression into quotation literal. The type of the expression tree being inserted doesn't match the type expected by the splicing operation. Expected '{0}', but received type '{1}'. Consider type-annotating with the expected expression type, e.g., (%% x : {0}) or (%x : {0}). + Niezgodność typów podczas łączenia wyrażenia w cytowany literał. Typ wstawianego drzewa wyrażenia jest niezgodny z typem oczekiwanym przez operację łączenia. Oczekiwano typu „{0}”, natomiast stwierdzono typ „{1}”. Rozważ adnotację typu przy użyciu oczekiwanego typu wyrażenia, np. (%% x : {0}) lub (%x : {0}). + + + + Tuple access out of range + Wartość krotki jest poza dostępnym zakresem. + + + + The tuple lengths are different + Długości krotek różnią się od siebie. + + + + F# union type requires different number of arguments + Typ unii języka F# wymaga innej liczby argumentów. + + + + Writing a get-only property + Zapisywanie właściwości pobieranej + + + + The method '{0}' expects {1} type arguments but {2} were provided + Metoda „{0}” oczekuje argumentów typu {1}, natomiast podano argumenty typu {2}. + + + + An index satisfying the predicate was not found in the collection. + W kolekcji nie odnaleziono indeksu pasującego do predykatu. + + + + The constructor method '{0}' for the union case could not be found + Nie można odnaleźć metody „{0}” konstruktora dla instrukcji „case” złożenia. + + + + first class uses of '%' or '%%' are not permitted + Używanie „%” i „%%” w pierwszej klasie jest niedozwolone. + + + + MoveNext not called, or finished + Metoda MoveNext nie została wywołana albo nie zakończyła działania. + + + + Multiple CompilationMappingAttributes, expected at most one + Wykryto kilka atrybutów CompilationMappingAttribute, podczas gdy oczekiwano najwyżej jednego. + + + + Bad float value + Błędna wartość zmiennoprzecinkowa. + + + + Bad format specifier:{0} + Błędny specyfikator formatu:{0} + + + + Bad integer supplied to dynamic formatter + Do dynamicznego modułu formatującego została przekazana błędna liczba całkowita. + + + + Expected a precision argument + Oczekiwano argumentu dokładności. + + + + Expected a width argument + Oczekiwano argumentu szerokości. + + + + The # formatting modifier is invalid in F# + Modyfikator formatu # jest nieprawidłowy w języku F# + + + + Missing format specifier + Brak specyfikatora formatu + + + + Not a function type + To nie jest typ funkcji. + + + + Bad format specifier (precision) + Błędny specyfikator formatu (dokładności). + + + + Bad format specifier (after {0}) + Błędny specyfikator formatu (po elemencie {0}). + + + + Bad format specifier (width) + Błędny specyfikator formatu (szerokości). + + + + Could not bind function {0} in type {1} + Nie można powiązać funkcji {0} w typie {1}. + + + + Could not bind property {0} in type {1} + Nie można powiązać właściwości {0} w typie {1}. + + + + Could not bind to method + Nie można powiązać z metodą. + + + + Cannot take the address of this quotation + Nie można przyjąć adresu tego cytatu. + + + + Failed to bind assembly '{0}' while processing quotation data + Nie można powiązać zestawu „{0}” w trakcie przetwarzania danych cytatu. + + + + ill formed expression: AppOp or LetOp + błędnie skonstruowane wyrażenie: AppOp lub LetOp + + + + type argument out of range + wartość argumentu typu poza zakresem + + + + This value cannot be mutated + Ta wartość nie może ulegać mutacjom. + + + + The option value was None + Opcja ma wartość Brak. + + + + A continuation provided by Async.FromContinuations was invoked multiple times + Kontynuacja realizowana przez metodę Async.FromContinuations została wywołana kilka razy. + + + + The record type '{0}' is invalid. Required constructor is not defined. + Typ rekordu „{0}” jest nieprawidłowy. Nie zdefiniowano wymaganego konstruktora. + + + + The tuple type '{0}' is invalid. Required constructor is not defined. + Typ krotki „{0}” jest nieprawidłowy. Nie zdefiniowano wymaganego konstruktora. + + + + The input sequence contains more than one element. + Sekwencja wejściowa zawiera więcej niż jeden element. + + + + 'thenBy' and 'thenByDescending' may only be used with an ordered input + Operatorów „thenBy” i „thenByDescending” można używać tylko wobec sortowanych danych wejściowych. + + + + Unrecognized use of a 'sumBy' or 'averageBy' operator in a query. In queries whose original data is of static type IQueryable, these operators may only be used with result type int32, int64, single, double or decimal + Nierozpoznane użycie operatora „sumBy” lub „averageBy” w zapytaniu. W zapytaniach, których oryginalne dane są statycznego typu IQueryable, obu operatorów można używać tylko do typów wyników int32, int64, single, double lub decimal. + + + + An if/then/else conditional or pattern matching expression with multiple branches is not permitted in a query. An if/then/else conditional may be used. + W zapytaniu nie można używać wyrażenia warunkowego if/then/else ani wyrażenia porównującego wielogałęziowe wzorce. Dozwolone są proste wyrażenia warunkowe if/then/else. + + + + This is not a valid query expression. The following construct was used in a query but is not recognized by the F#-to-LINQ query translator:\n{0}\nCheck the specification of permitted queries and consider moving some of the operations out of the query expression. + To nie jest prawidłowe wyrażenie zapytania. Poniższa konstrukcja została użyta w zapytaniu, ale nie rozpoznaje jej translator zapytań z języka F# na język LINQ:\n{0}\nSprawdź specyfikacje dozwolonych zapytań i rozważ przeniesienie niektórych operacji poza wyrażenie zapytania. + + + + This is not a valid query expression. The method '{0}' was used in a query but is not recognized by the F#-to-LINQ query translator. Check the specification of permitted queries and consider moving some of the operations out of the query expression + To nie jest prawidłowe wyrażenie zapytania. Metoda „{0}” została użyta w zapytaniu, ale nie rozpoznaje jej translator zapytań z języka F# na język LINQ. Sprawdź specyfikacje dozwolonych zapytań i rozważ przeniesienie niektórych operacji poza wyrażenie zapytania. + + + + This is not a valid query expression. The property '{0}' was used in a query but is not recognized by the F#-to-LINQ query translator. Check the specification of permitted queries and consider moving some of the operations out of the query expression. + To nie jest prawidłowe wyrażenie zapytania. Właściwość „{0}” została użyta w zapytaniu, ale nie rozpoznaje jej translator zapytań z języka F# na język LINQ. Sprawdź specyfikacje dozwolonych zapytań i rozważ przeniesienie niektórych operacji poza wyrażenie zapytania. + + + + This is not a valid query expression. The construct '{0}' was used in a query but is not recognized by the F#-to-LINQ query translator. Check the specification of permitted queries and consider moving some of the operations out of the query expression. + To nie jest prawidłowe wyrażenie zapytania. Konstrukcja „{0}” została użyta w zapytaniu, ale nie rozpoznaje jej translator zapytań z języka F# na język LINQ. Sprawdź specyfikacje dozwolonych zapytań i rozważ przeniesienie niektórych operacji poza wyrażenie zapytania. + + + + + \ No newline at end of file diff --git a/src/fsharp/FSharp.Core/xlf/FSCore.pt-BR.xlf b/src/fsharp/FSharp.Core/xlf/FSCore.pt-BR.xlf new file mode 100644 index 00000000000..48c0450f629 --- /dev/null +++ b/src/fsharp/FSharp.Core/xlf/FSCore.pt-BR.xlf @@ -0,0 +1,712 @@ + + + + + + The match cases were incomplete + Os casos compatíveis estavam incompletos + + + + First class uses of address-of operators are not permitted. + Usos de operadores address-of de primeira classe não são permitidos. + + + + The arrays have different lengths. + As matrizes possuem tamanhos diferentes. + + + + The input array was empty. + A matriz de entrada estava vazia. + + + + Input string was not in a correct format. + A cadeia de caracteres de entrada não estava em um formato correto. + + + + Expecting delegate type. + Esperando tipo delegate. + + + + Dynamic invocation of DivideByInt involving coercions is not supported. + Não há suporte para a invocação dinâmica de DivideByInt que envolve coerções. + + + + Dynamic invocation of op_Addition involving coercions is not supported. + Não há suporte para a invocação dinâmica de op_Addition que envolve coerções. + + + + Dynamic invocation of op_Addition involving overloading is not supported. + Não há suporte para a invocação dinâmica de op_Addition que envolve sobrecarga. + + + + Dynamic invocation of op_Multiply involving coercions is not supported. + Não há suporte para a invocação dinâmica de op_Multiply que envolve coerções. + + + + Dynamic invocation of op_Multiply involving overloading is not supported. + Não há suporte para a invocação dinâmica de op_Multiply que envolve sobrecarga. + + + + The end of a range cannot be NaN. + O final de um intervalo não pode ser NaN. + + + + Enumeration already finished. + Enumeração já concluída. + + + + Enumeration has not started. Call MoveNext. + Enumeração não iniciada. Chame MoveNext. + + + + Set contains no elements. + Set não contém elementos. + + + + Enumeration based on System.Int32 exceeded System.Int32.MaxValue. + A enumeração baseada em System.Int32 excedeu System.Int32.MaxValue. + + + + Failed to read enough bytes from the stream. + Falha ao ler bytes suficientes do fluxo. + + + + Failure during generic comparison: the type '{0}' does not implement the System.IComparable interface. This error may be arise from the use of a function such as 'compare', 'max' or 'min' or a data structure such as 'Set' or 'Map' whose keys contain instances of this type. + Falha durante comparação genérica: o tipo '{0}' não implementa a interface System.IComparable. Este erro pode decorrer do uso de uma função, como 'compare', 'max' ou 'min', ou de uma estrutura de dados, como 'Set' ou 'Map', cujas chaves contêm instâncias desse tipo. + + + + The index was outside the range of elements in the list. + O índice estava fora do intervalo de elementos na lista. + + + + The input list was empty. + A lista de entrada estava vazia. + + + + The input must be non-negative. + A entrada deve ser não negativa. + + + + The input must be positive. + A entrada deve ser positiva. + + + + The input sequence was empty. + A sequência de entrada estava vazia. + + + + This is not a valid tuple type for the F# reflection library. + Tipo de tupla inválido para a biblioteca de reflexão F#. + + + + The item, key, or index was not found in the collection. + Item, chave ou índice não localizado na coleção. + + + + The lists had different lengths. + As listas tinham tamanhos diferentes. + + + + The MailboxProcessor has already been started. + O MailboxProcessor já foi iniciado. + + + + MailboxProcessor.PostAndAsyncReply timed out. + Tempo limite de MailboxProcessor.PostAndAsyncReply esgotado. + + + + MailboxProcessor.PostAndReply timed out. + Tempo limite de MailboxProcessor.PostAndReply esgotado. + + + + Mailbox.Receive timed out. + Tempo limite de Mailbox.Receive esgotado. + + + + Mailbox.Scan timed out. + Tempo limite de Mailbox.Scan esgotado. + + + + Map values cannot be mutated. + Valores de mapa não podem ser modificados. + + + + The IAsyncResult object provided does not match this 'Cancel' operation. + O objeto IAsyncResult fornecido não corresponde a esta operação 'Cancel'. + + + + The IAsyncResult object provided does not match this 'End' operation. + O objeto IAsyncResult fornecido não corresponde a esta operação 'End'. + + + + Negating the minimum value of a twos complement number is invalid. + É inválido negar o valor mínimo de um número de dois complementos. + + + + The initialization of an object or value resulted in an object or value being accessed recursively before it was fully initialized. + A inicialização de um objeto ou valor fez que um objeto ou valor fosse acessado recursivamente antes de ser totalmente inicializado. + + + + The static initialization of a file or type resulted in static data being accessed recursively before it was fully initialized. + A inicialização estática de um arquivo ou tipo fez que dados estáticos fossem acessados recursivamente antes de serem totalmente inicializados. + + + + Arrays with non-zero base cannot be created on this platform. + Matrizes com base diferente de zero não podem ser criadas nesta plataforma. + + + + Type '{0}' is not a function type. + O tipo '{0}' não é um tipo de função. + + + + Type '{0}' is not the representation of an F# exception declaration. + O tipo '{0}' não é a representação de uma declaração de exceção F#. + + + + The function did not compute a permutation. + A função não computou uma permuta. + + + + Type '{0}' is not an F# record type. + O tipo '{0}' não é um tipo de registro F#. + + + + Type '{0}' is not a tuple type. + O tipo '{0}' não é um tipo de tupla. + + + + Type '{0}' is not an F# union type. + O tipo '{0}' não é um tipo de união F#. + + + + The two objects have different types and are not comparable. + Os dois objetos possuem tipos diferentes e não são comparáveis. + + + + The input sequence has an insufficient number of elements. + A sequência de entrada possui um número insuficiente de elementos. + + + + This object is for recursive equality calls and cannot be used for hashing. + Este objeto é para chamadas de igualdade recursivas e não pode ser usado para hash. + + + + One of the elements in the array is null. + Um dos elementos na matriz é nulo. + + + + The object is not an F# record value. + O objeto não é um valor de registro F#. + + + + The object is null and no type was given. Either pass a non-null object or a non-null type parameter. + O objeto é nulo e nenhum tipo foi especificado. Passe um objeto não nulo ou um parâmetro de tipo não nulo. + + + + The index is outside the legal range. + O índice está fora do intervalo válido. + + + + The type '{0}' is the representation of an F# exception declaration but its representation is private. You must specify BindingFlags.NonPublic to access private type representations. + O tipo '{0}' é a representação de uma declaração de exceção F#, mas sua representação é particular. É necessário especificar BindingFlags.NonPublic para acessar representações de tipo particular. + + + + The type '{0}' is an F# record type but its representation is private. You must specify BindingFlags.NonPublic to access private type representations. + O tipo '{0}' é um tipo de registro F#, mas sua representação é particular. É necessário especificar BindingFlags.NonPublic para acessar representações de tipo particular. + + + + The type '{0}' is an F# union type but its representation is private. You must specify BindingFlags.NonPublic to access private type representations. + O tipo '{0}' é um tipo de união F#, mas sua representação é particular. É necessário especificar BindingFlags.NonPublic para acessar representações de tipo particular. + + + + Expected exactly one type argument. + Exatamente um argumento de tipo esperado. + + + + Expected exactly two type arguments. + Exatamente dois argumentos de tipo esperados. + + + + Not a valid F# union case index. + Não é um índice de caso união F# válido. + + + + Type '{0}' did not have an F# record field named '{1}'. + O tipo '{0}' não tinha um campo de registro F# denominado '{1}'. + + + + Type '{0}' did not have an F# union case named '{1}'. + O tipo '{0}' não tinha um caso união F# denominado '{1}'. + + + + Type mismatch when building '{0}': the type of the field was incorrect. Expected '{1}', but received type '{2}'. + Tipos incompatíveis ao compilar '{0}': tipo de campo incorreto. '{1}' esperado, mas o tipo recebido foi '{2}'. + + + + Type mismatch when building '{0}': body must return unit. Expected '{1}', but received type '{2}'. + Tipos incompatíveis ao compilar '{0}': o corpo deve retornar unidade. '{1}' esperado, mas o tipo recebido foi '{2}'. + + + + Type mismatch when building '{0}': condition expression must be of type bool. Expected '{1}', but received type '{2}'. + Tipos incompatíveis ao compilar '{0}': a expressão de condição deve ser do tipo booliana. '{1}' esperado, mas o tipo recebido foi '{2}'. + + + + Type mismatch when building '{0}': expected function type in function application or let binding. Expected '{1}', but received type '{2}'. + Tipos incompatíveis ao compilar '{0}': tipo de função esperado em aplicativo de função ou associação let. '{1}' esperado, mas o tipo recebido foi '{2}'. + + + + Type mismatch when building '{0}': expression doesn't match the tuple type. Expected '{1}', but received type '{2}'. + Tipos incompatíveis ao compilar '{0}': expressão incompatível com tipo de tupla. '{1}' esperado, mas o tipo recebido foi '{2}'. + + + + Type mismatch when building '{0}': types of expression does not match. Expected '{1}', but received type '{2}'. + Tipos incompatíveis ao compilar '{0}': tipos de expressão incompatíveis. '{1}' esperado, mas o tipo recebido foi '{2}'. + + + + Type mismatch when building '{0}': function argument type doesn't match. Expected '{1}', but received type '{2}'. + Tipos incompatíveis ao compilar '{0}': tipo de argumento de função incompatível. '{1}' esperado, mas o tipo recebido foi '{2}'. + + + + Type mismatch when building '{0}': guard must return boolean. Expected '{1}', but received type '{2}'. + Tipos incompatíveis ao compilar '{0}': a proteção deve retornar booliano. '{1}' esperado, mas o tipo recebido foi '{2}'. + + + + Type mismatch when building '{0}': incorrect argument type for an F# record. Expected '{1}', but received type '{2}'. + Tipos incompatíveis ao compilar '{0}': tipo de argumento incorreto para um registro F#. '{1}' esperado, mas o tipo recebido foi '{2}'. + + + + Type mismatch when building '{0}': incorrect argument type for an F# union. Expected '{1}', but received type '{2}'. + Tipos incompatíveis ao compilar '{0}': tipo de argumento incorreto para uma união F#. '{1}' esperado, mas o tipo recebido foi '{2}'. + + + + Type mismatch when building '{0}': initializer doesn't match array type. Expected '{1}', but received type '{2}'. + Tipos incompatíveis ao compilar '{0}': inicializador incompatível com tipo de matriz. '{1}' esperado, mas o tipo recebido foi '{2}'. + + + + Type mismatch when building '{0}': invalid parameter for a method or indexer property. Expected '{1}', but received type '{2}'. + Tipos incompatíveis ao compilar '{0}': parâmetro inválido para uma propriedade de indexador ou método. '{1}' esperado, mas o tipo recebido foi '{2}'. + + + + Type mismatch when building '{0}': body of the for loop must be lambda taking integer as an argument. Expected '{1}', but received type '{2}'. + Tipos incompatíveis ao compilar '{0}': o corpo do loop for deve ser lambda com um inteiro como argumento. '{1}' esperado, mas o tipo recebido foi '{2}'. + + + + Type mismatch when building '{0}': lower and upper bounds must be integers. Expected '{1}', but received type '{2}'. + Tipos incompatíveis ao compilar '{0}': os limites inferior e superior devem ser inteiros. '{1}' esperado, mas o tipo recebido foi '{2}'. + + + + Type mismatch when building '{0}': types of true and false branches differ. Expected '{1}', but received type '{2}'. + Tipos incompatíveis ao compilar '{0}': tipos de ramificações true e false diferem. '{1}' esperado, mas o tipo recebido foi '{2}'. + + + + Type mismatch when building '{0}': mismatched type of argument and tuple element. Expected '{1}', but received type '{2}'. + Tipos incompatíveis ao compilar '{0}': tipo de argumento e elemento de tupla incompatíveis. '{1}' esperado, mas o tipo recebido foi '{2}'. + + + + Type mismatch when building '{0}': the variable type doesn't match the type of the right-hand-side of a let binding. Expected '{1}', but received type '{2}'. + Tipos incompatíveis ao compilar '{0}': tipo de variável incompatível com tipo do lado direito de uma associação let. '{1}' esperado, mas o tipo recebido foi '{2}'. + + + + Unexpected quotation hole in expression. + Lacuna de cotação inesperada na expressão. + + + + The parameter is not a recognized method name. + O parâmetro não é um nome de método reconhecido. + + + + Reset is not supported on this enumerator. + Não há suporte para Reset neste enumerador. + + + + The start of a range cannot be NaN. + O início de um intervalo não pode ser NaN. + + + + The step of a range cannot be NaN. + A etapa de um intervalo não pode ser NaN. + + + + The step of a range cannot be zero. + A etapa de um intervalo não pode ser zero. + + + + The System.Threading.SynchronizationContext.Current of the calling thread is null. + O System.Threading.SynchronizationContext.Current do thread de chamada é nulo. + + + + The tuple index '{1}' was out of range for tuple type '{0}'. + O índice de tupla '{1}' estava fora do intervalo do tipo de tupla '{0}'. + + + + Failed to bind constructor + Falha ao associar construtor + + + + Failed to bind field '{0}' + Falha ao associar o campo '{0}' + + + + Failed to bind property '{0}' + Falha ao associar a propriedade '{0}' + + + + Failed to bind type '{0}' in assembly '{1}' + Falha ao associar o tipo '{0}' ao assembly '{1}' + + + + Incompatible record length + Tamanho de registro incompatível + + + + Incorrect instance type + Tipo de instância incorreto + + + + Incorrect number of arguments + Número de argumentos incorreto + + + + Incorrect type + Tipo incorreto + + + + Invalid function type + Tipo de função inválido + + + + The member is non-static (instance), but no receiver object was supplied + O membro é não estático (instância), mas nenhum objeto receptor foi fornecido + + + + Parent type cannot be null + O tipo pai não pode ser nulo + + + + Reading a set-only property + Lendo uma propriedade set-only + + + + Receiver object was unexpected, as member is static + O objeto receptor era inesperado, pois o membro é estático + + + + Type mismatch when building '{0}': the expression has the wrong type. Expected '{1}', but received type '{2}'. + Tipos incompatíveis ao compilar '{0}': a expressão tem o tipo errado. '{1}' esperado, mas o tipo recebido foi '{2}'. + + + + Type mismatch when building '{0}': function type doesn't match delegate type. Expected '{1}', but received type '{2}'. + Tipos incompatíveis ao compilar '{0}': tipo de função incompatível com tipo delegate. '{1}' esperado, mas o tipo recebido foi '{2}'. + + + + Type mismatch when splicing expression into quotation literal. The type of the expression tree being inserted doesn't match the type expected by the splicing operation. Expected '{0}', but received type '{1}'. Consider type-annotating with the expected expression type, e.g., (%% x : {0}) or (%x : {0}). + Inconsistência de tipos ao unir expressão em literal de cotação. O tipo da árvore de expressões inserida não corresponde ao tipo esperado pela operação de união. Esperado '{0}', mas o tipo recebido foi '{1}'. Considere a anotação de tipo com o tipo de expressão esperado, por exemplo, (%% x : {0}) ou (%x : {0}). + + + + Tuple access out of range + Acesso de tupla fora do intervalo + + + + The tuple lengths are different + Os tamanhos de tupla são diferentes + + + + F# union type requires different number of arguments + O tipo de união F# requer um número diferente de argumentos + + + + Writing a get-only property + Gravando uma propriedade get-only + + + + The method '{0}' expects {1} type arguments but {2} were provided + O método '{0}' espera argumentos de tipo {1}, mas {2} foram fornecidos + + + + An index satisfying the predicate was not found in the collection. + Índice compatível com predicado não localizado na coleção. + + + + The constructor method '{0}' for the union case could not be found + O método de construtor '{0}' para o caso união não foi encontrado + + + + first class uses of '%' or '%%' are not permitted + usos de '%' ou '%%' de primeira classe não são permitidos + + + + MoveNext not called, or finished + MoveNext não chamado, ou concluído + + + + Multiple CompilationMappingAttributes, expected at most one + Vários CompilationMappingAttributes; no máximo um esperado + + + + Bad float value + Valor de flutuação incorreto + + + + Bad format specifier:{0} + Especificador de formato incorreto:{0} + + + + Bad integer supplied to dynamic formatter + Inteiro incorreto fornecido a formatador dinâmico + + + + Expected a precision argument + Argumento de precisão esperado + + + + Expected a width argument + Argumento de largura esperado + + + + The # formatting modifier is invalid in F# + O modificador de formatação # é inválido em F# + + + + Missing format specifier + Especificador de formato ausente + + + + Not a function type + Não é um tipo de função + + + + Bad format specifier (precision) + Especificador de formato incorreto (precisão) + + + + Bad format specifier (after {0}) + Especificador de formato incorreto (após {0}) + + + + Bad format specifier (width) + Especificador de formato incorreto (largura) + + + + Could not bind function {0} in type {1} + Não foi possível associar a função {0} ao tipo {1} + + + + Could not bind property {0} in type {1} + Não foi possível associar a propriedade {0} ao tipo {1} + + + + Could not bind to method + Não foi possível associar ao método + + + + Cannot take the address of this quotation + Não é possível obter o endereço desta cotação + + + + Failed to bind assembly '{0}' while processing quotation data + Falha ao associar o assembly '{0}' ao processar dados de cotação + + + + ill formed expression: AppOp or LetOp + expressão malformada: AppOp ou LetOp + + + + type argument out of range + argumento de tipo fora do intervalo + + + + This value cannot be mutated + Este valor não pode ser modificado + + + + The option value was None + O valor da opção era None + + + + A continuation provided by Async.FromContinuations was invoked multiple times + Uma continuação fornecida por Async.FromContinuations foi invocada várias vezes + + + + The record type '{0}' is invalid. Required constructor is not defined. + O tipo de registro '{0}' é inválido. O construtor necessário não foi definido. + + + + The tuple type '{0}' is invalid. Required constructor is not defined. + O tipo de tupla '{0}' é inválido. O construtor necessário não foi definido. + + + + The input sequence contains more than one element. + A sequência de entrada contém mais de um elemento. + + + + 'thenBy' and 'thenByDescending' may only be used with an ordered input + 'thenBy' e 'thenByDescending' só podem ser usados com uma entrada ordenada + + + + Unrecognized use of a 'sumBy' or 'averageBy' operator in a query. In queries whose original data is of static type IQueryable, these operators may only be used with result type int32, int64, single, double or decimal + Uso não reconhecido de um operador 'sumBy' ou 'averageBy' em uma consulta. Em consultas cujos dados originais são do tipo estático IQueryable, esses operadores só podem ser usados com o tipo de resultado int32, int64, single, double ou decimal + + + + An if/then/else conditional or pattern matching expression with multiple branches is not permitted in a query. An if/then/else conditional may be used. + Uma expressão de correspondência de padrões ou condicional if/then/else com várias ramificações não é permitida em uma consulta. Uma condicional if/then/else pode ser usada. + + + + This is not a valid query expression. The following construct was used in a query but is not recognized by the F#-to-LINQ query translator:\n{0}\nCheck the specification of permitted queries and consider moving some of the operations out of the query expression. + Expressão de consulta inválida. A construção a seguir foi usada em uma consulta, mas não é reconhecida pelo conversor de consultas F#-to-LINQ:\n{0}\nVerifique a especificação de consultas permitidas e considere remover algumas das operações da expressão de consulta. + + + + This is not a valid query expression. The method '{0}' was used in a query but is not recognized by the F#-to-LINQ query translator. Check the specification of permitted queries and consider moving some of the operations out of the query expression + Expressão de consulta inválida. O método '{0}' foi usado em uma consulta, mas não é reconhecido pelo conversor de consultas F#-to-LINQ. Verifique a especificação de consultas permitidas e considere remover algumas das operações da expressão de consulta + + + + This is not a valid query expression. The property '{0}' was used in a query but is not recognized by the F#-to-LINQ query translator. Check the specification of permitted queries and consider moving some of the operations out of the query expression. + Expressão de consulta inválida. A propriedade '{0}' foi usada em uma consulta, mas não é reconhecida pelo conversor de consultas F#-to-LINQ. Verifique a especificação de consultas permitidas e considere remover algumas das operações da expressão de consulta. + + + + This is not a valid query expression. The construct '{0}' was used in a query but is not recognized by the F#-to-LINQ query translator. Check the specification of permitted queries and consider moving some of the operations out of the query expression. + Expressão de consulta inválida. A construção '{0}' foi usada em uma consulta, mas não é reconhecida pelo conversor de consultas F#-to-LINQ. Verifique a especificação de consultas permitidas e considere remover algumas das operações da expressão de consulta. + + + + + \ No newline at end of file diff --git a/src/fsharp/FSharp.Core/xlf/FSCore.ru.xlf b/src/fsharp/FSharp.Core/xlf/FSCore.ru.xlf new file mode 100644 index 00000000000..6daf52715c5 --- /dev/null +++ b/src/fsharp/FSharp.Core/xlf/FSCore.ru.xlf @@ -0,0 +1,712 @@ + + + + + + The match cases were incomplete + Варианты сопоставления не были завершены + + + + First class uses of address-of operators are not permitted. + Использование операторов address-of в первом классе не допускается. + + + + The arrays have different lengths. + Массивы разной длины. + + + + The input array was empty. + Входной массив был пуст. + + + + Input string was not in a correct format. + Входная строка имела неверный формат. + + + + Expecting delegate type. + Требуется делегатный тип. + + + + Dynamic invocation of DivideByInt involving coercions is not supported. + Динамические вызовы DivideByInt, затрагивающие приведение, не поддерживаются. + + + + Dynamic invocation of op_Addition involving coercions is not supported. + Динамические вызовы op_Addition, затрагивающие приведение, не поддерживаются. + + + + Dynamic invocation of op_Addition involving overloading is not supported. + Динамические вызовы op_Addition, затрагивающие перегрузку, не поддерживаются. + + + + Dynamic invocation of op_Multiply involving coercions is not supported. + Динамические вызовы op_Multiply, затрагивающие приведение, не поддерживаются. + + + + Dynamic invocation of op_Multiply involving overloading is not supported. + Динамические вызовы op_Multiply, затрагивающие перегрузку, не поддерживаются. + + + + The end of a range cannot be NaN. + Окончанием диапазона не может быть NaN. + + + + Enumeration already finished. + Перечисление уже завершено. + + + + Enumeration has not started. Call MoveNext. + Перечисление не начато. Вызовите MoveNext. + + + + Set contains no elements. + Set не содержит элементов. + + + + Enumeration based on System.Int32 exceeded System.Int32.MaxValue. + Перечисление, основанное на System.Int32, превысило значение System.Int32.MaxValue. + + + + Failed to read enough bytes from the stream. + Не удалось прочитать достаточное количество байтов из потока. + + + + Failure during generic comparison: the type '{0}' does not implement the System.IComparable interface. This error may be arise from the use of a function such as 'compare', 'max' or 'min' or a data structure such as 'Set' or 'Map' whose keys contain instances of this type. + Ошибка в ходе общего сравнения: тип "{0}" не реализует интерфейс System.IComparable. Эта ошибка может возникать из-за использования функции, такой как "compare", "max" или "min", либо структуры данных, такой как "Set" или "Map", ключи которой содержат экземпляры этого типа. + + + + The index was outside the range of elements in the list. + Индекс вышел за границы диапазона элементов списка. + + + + The input list was empty. + Входной список был пуст. + + + + The input must be non-negative. + Входное значение должно быть неотрицательным. + + + + The input must be positive. + Входное значение должно быть положительным. + + + + The input sequence was empty. + Входная последовательность была пуста. + + + + This is not a valid tuple type for the F# reflection library. + Это недопустимый тип кортежа для библиотеки отражения F#. + + + + The item, key, or index was not found in the collection. + Элемент, ключ или индекс не найдены в коллекции. + + + + The lists had different lengths. + Списки разной длины. + + + + The MailboxProcessor has already been started. + MailboxProcessor уже запущен. + + + + MailboxProcessor.PostAndAsyncReply timed out. + Истекло время ожидания MailboxProcessor.PostAndAsyncReply. + + + + MailboxProcessor.PostAndReply timed out. + Истекло время ожидания MailboxProcessor.PostAndReply. + + + + Mailbox.Receive timed out. + Истекло время ожидания Mailbox.Receive. + + + + Mailbox.Scan timed out. + Истекло время ожидания Mailbox.Scan. + + + + Map values cannot be mutated. + Значения Map нельзя изменить. + + + + The IAsyncResult object provided does not match this 'Cancel' operation. + Предоставленный объект IAsyncResult не соответствует этой операции Cancel. + + + + The IAsyncResult object provided does not match this 'End' operation. + Предоставленный объект IAsyncResult не соответствует этой операции End. + + + + Negating the minimum value of a twos complement number is invalid. + Инвертировать минимальное значение двоичного дополнения невозможно. + + + + The initialization of an object or value resulted in an object or value being accessed recursively before it was fully initialized. + Инициализация объекта или значения привела к рекурсивному вызову объекта или значения перед его полной инициализацией. + + + + The static initialization of a file or type resulted in static data being accessed recursively before it was fully initialized. + Статическая инициализация файла или типа привела к рекурсивному обращению к статическим данным перед его полной инициализацией. + + + + Arrays with non-zero base cannot be created on this platform. + На этой платформе невозможно создание массивов с ненулевой базой. + + + + Type '{0}' is not a function type. + Тип "{0}" не является функциональным типом. + + + + Type '{0}' is not the representation of an F# exception declaration. + Тип "{0}" не является представлением объявления исключения F#. + + + + The function did not compute a permutation. + Функция не вычислила перестановку. + + + + Type '{0}' is not an F# record type. + Тип "{0}" не является типом записи F#. + + + + Type '{0}' is not a tuple type. + Тип "{0}" не является кортежным типом. + + + + Type '{0}' is not an F# union type. + Тип "{0}" не является типом объединения F#. + + + + The two objects have different types and are not comparable. + Эти два объекта имеют разные типы и не являются сравнимыми. + + + + The input sequence has an insufficient number of elements. + Входная последовательность содержит недостаточное число элементов. + + + + This object is for recursive equality calls and cannot be used for hashing. + Этот объект предназначен для рекурсивных вызовов равенства и не может использоваться для хеширования. + + + + One of the elements in the array is null. + Один из элементов массива имеет неопределенное (null) значение. + + + + The object is not an F# record value. + Объект не является типом записи F#. + + + + The object is null and no type was given. Either pass a non-null object or a non-null type parameter. + Объект имеет неопределенное (null) значение или тип не был задан. Передайте либо ненулевой (не null) объект, либо непустой (не null) параметр типа. + + + + The index is outside the legal range. + Индекс находится вне допустимого диапазона. + + + + The type '{0}' is the representation of an F# exception declaration but its representation is private. You must specify BindingFlags.NonPublic to access private type representations. + Тип "{0}" является представлением объявления исключения F#, но его представление является частным. Необходимо указать BindingFlags.NonPublic для доступа к представления частных типов. + + + + The type '{0}' is an F# record type but its representation is private. You must specify BindingFlags.NonPublic to access private type representations. + Тип "{0}" является типом записи F#, но его представление является частным. Необходимо указать BindingFlags.NonPublic для доступа к представления частных типов. + + + + The type '{0}' is an F# union type but its representation is private. You must specify BindingFlags.NonPublic to access private type representations. + Тип "{0}" является типом объединения F#, но его представление является частным. Необходимо указать BindingFlags.NonPublic для доступа к представления частных типов. + + + + Expected exactly one type argument. + Требуется ровно один аргумент типа. + + + + Expected exactly two type arguments. + Требуется ровно два аргумента типа. + + + + Not a valid F# union case index. + Не является допустимым индексом случая объединения F#. + + + + Type '{0}' did not have an F# record field named '{1}'. + Тип "{0}" не имеет поля записи F# с именем "{1}". + + + + Type '{0}' did not have an F# union case named '{1}'. + Тип "{0}" не имеет случая объединения F# с именем "{1}". + + + + Type mismatch when building '{0}': the type of the field was incorrect. Expected '{1}', but received type '{2}'. + Несоответствие типа при сборке "{0}": не верный тип поля. Требуется "{1}", но получен тип "{2}". + + + + Type mismatch when building '{0}': body must return unit. Expected '{1}', but received type '{2}'. + Несоответствие типа при сборке "{0}": body должен возвращать значение типа unit. Требуется "{1}", но получен тип "{2}". + + + + Type mismatch when building '{0}': condition expression must be of type bool. Expected '{1}', but received type '{2}'. + Несоответствие типа при сборке "{0}": выражение условия должно иметь тип bool. Требуется "{1}", но получен тип "{2}". + + + + Type mismatch when building '{0}': expected function type in function application or let binding. Expected '{1}', but received type '{2}'. + Несоответствие типа при сборке "{0}": ожидаемый тип функции в приложении функции или привязке присваивания. Требуется "{1}", но получен тип "{2}". + + + + Type mismatch when building '{0}': expression doesn't match the tuple type. Expected '{1}', but received type '{2}'. + Несоответствие типа при сборке "{0}": выражение не соответствует типу кортежа. Требуется "{1}", но получен тип "{2}". + + + + Type mismatch when building '{0}': types of expression does not match. Expected '{1}', but received type '{2}'. + Несоответствие типа при сборке "{0}": типы выражения не совпадают. Требуется "{1}", но получен тип "{2}". + + + + Type mismatch when building '{0}': function argument type doesn't match. Expected '{1}', but received type '{2}'. + Несоответствие типа при сборке "{0}": несоответствующий тип аргумента функции. Требуется "{1}", но получен тип "{2}". + + + + Type mismatch when building '{0}': guard must return boolean. Expected '{1}', but received type '{2}'. + Несоответствие типа при сборке "{0}": условие должно возвращать логическое значение. Требуется "{1}", но получен тип "{2}". + + + + Type mismatch when building '{0}': incorrect argument type for an F# record. Expected '{1}', but received type '{2}'. + Несоответствие типа при сборке "{0}": Неправильный тип аргумента для записи F#. Требуется "{1}", но получен тип "{2}". + + + + Type mismatch when building '{0}': incorrect argument type for an F# union. Expected '{1}', but received type '{2}'. + Несоответствие типа при сборке "{0}": Неправильный тип аргумента для объединения F#. Требуется "{1}", но получен тип "{2}". + + + + Type mismatch when building '{0}': initializer doesn't match array type. Expected '{1}', but received type '{2}'. + Несоответствие типа при сборке "{0}": инициализатор не соответствует типу массива. Требуется "{1}", но получен тип "{2}". + + + + Type mismatch when building '{0}': invalid parameter for a method or indexer property. Expected '{1}', but received type '{2}'. + Несоответствие типа при сборке "{0}": недопустимый параметр для метода или свойства индексатора. Требуется "{1}", но получен тип "{2}". + + + + Type mismatch when building '{0}': body of the for loop must be lambda taking integer as an argument. Expected '{1}', but received type '{2}'. + Несоответствие типа при сборке "{0}": тело цикла "for" должно представлять собой лямбду, принимающую в качестве аргумента целочисленное значение. Требуется "{1}", но получен тип "{2}". + + + + Type mismatch when building '{0}': lower and upper bounds must be integers. Expected '{1}', but received type '{2}'. + Несоответствие типа при сборке "{0}": нижняя и верхняя границы должны быть целыми числами. Требуется "{1}", но получен тип "{2}". + + + + Type mismatch when building '{0}': types of true and false branches differ. Expected '{1}', but received type '{2}'. + Несоответствие типа при сборке "{0}": типы ветвей true и false различны. Требуется "{1}", но получен тип "{2}". + + + + Type mismatch when building '{0}': mismatched type of argument and tuple element. Expected '{1}', but received type '{2}'. + Несоответствие типа при сборке "{0}": несоответствие типа аргумента и элемента кортежа. Требуется "{1}", но получен тип "{2}". + + + + Type mismatch when building '{0}': the variable type doesn't match the type of the right-hand-side of a let binding. Expected '{1}', but received type '{2}'. + Несоответствие типа при сборке "{0}": Тип переменной не соответствует типу правой части let-привязки. Требуется "{1}", но получен тип "{2}". + + + + Unexpected quotation hole in expression. + Непредвиденный шаблон цитирования в выражении. + + + + The parameter is not a recognized method name. + Параметр не является распознанным именем метода. + + + + Reset is not supported on this enumerator. + Сброс не поддерживается в этом перечислителе. + + + + The start of a range cannot be NaN. + Началом диапазона не может быть NaN. + + + + The step of a range cannot be NaN. + Шагом диапазона не может быть NaN. + + + + The step of a range cannot be zero. + Шагом диапазона не может быть ноль. + + + + The System.Threading.SynchronizationContext.Current of the calling thread is null. + System.Threading.SynchronizationContext.Current вызывающего потока имеет неопределенное (null) значение. + + + + The tuple index '{1}' was out of range for tuple type '{0}'. + Индекс кортежа "{1}" находился вне диапазона для кортежного типа "{0}". + + + + Failed to bind constructor + Не удалось задать привязку конструктора + + + + Failed to bind field '{0}' + Не удалось задать привязку поля "{0}" + + + + Failed to bind property '{0}' + Не удалось задать привязку свойства "{0}" + + + + Failed to bind type '{0}' in assembly '{1}' + Не удалось задать привязку типа "{0}" в сборке "{1}" + + + + Incompatible record length + Несовместимая длина записи + + + + Incorrect instance type + Неправильный тип экземпляра + + + + Incorrect number of arguments + Неправильное число аргументов + + + + Incorrect type + Неправильный тип + + + + Invalid function type + Недопустимый тип функции + + + + The member is non-static (instance), but no receiver object was supplied + Элемент не является статическим (экземпляр), однако объект приемника не указан + + + + Parent type cannot be null + Родительский тип не может быть нулевым + + + + Reading a set-only property + Чтение свойства, доступного только для установки + + + + Receiver object was unexpected, as member is static + Объект приемника оказался неожиданным, так как элемент статический + + + + Type mismatch when building '{0}': the expression has the wrong type. Expected '{1}', but received type '{2}'. + Несоответствие типа при сборке "{0}": выражение относится к неверному типу. Требуется "{1}", но получен тип "{2}". + + + + Type mismatch when building '{0}': function type doesn't match delegate type. Expected '{1}', but received type '{2}'. + Несоответствие типа при сборке "{0}": тип функции не соответствует типу делегата. Требуется "{1}", но получен тип "{2}". + + + + Type mismatch when splicing expression into quotation literal. The type of the expression tree being inserted doesn't match the type expected by the splicing operation. Expected '{0}', but received type '{1}'. Consider type-annotating with the expected expression type, e.g., (%% x : {0}) or (%x : {0}). + Несоответствие типов при вставке выражения в литерал кавычек. Тип вставляемого дерева выражения не соответствует типу, ожидаемому операцией вставки. Ожидался тип "{0}", однако получен тип "{1}". Попробуйте аннотировать тип выражения ожидаемым типом, например (%% x : {0}) или (%x : {0}). + + + + Tuple access out of range + Доступ кортежа вне диапазона + + + + The tuple lengths are different + Длины кортежей различны + + + + F# union type requires different number of arguments + К# типу объединения требуется другое количество аргументов + + + + Writing a get-only property + Запись свойства, доступного только для получения + + + + The method '{0}' expects {1} type arguments but {2} were provided + Методу "{0}" требуются аргументы типа {1}, однако предоставлены аргументы типа {2} + + + + An index satisfying the predicate was not found in the collection. + Не удалось обнаружить в коллекции индекс, удовлетворяющий предикату. + + + + The constructor method '{0}' for the union case could not be found + Не удалось найти метод конструктора "{0}" для варианта объединения + + + + first class uses of '%' or '%%' are not permitted + использование "%" или "%%" в первом классе не разрешено + + + + MoveNext not called, or finished + MoveNext не вызвана или не завершена + + + + Multiple CompilationMappingAttributes, expected at most one + Присутствует несколько атрибутов CompilationMappingAttributes; требуется не больше одного + + + + Bad float value + Неверное значение с плавающей точкой + + + + Bad format specifier:{0} + Неверный спецификатор формата:{0} + + + + Bad integer supplied to dynamic formatter + Динамическому форматтеру передано неверное целое + + + + Expected a precision argument + Требуется аргумент точности + + + + Expected a width argument + Требуется аргумент ширины + + + + The # formatting modifier is invalid in F# + Модификатор форматирования # в F# недопустим. + + + + Missing format specifier + Отсутствует указатель формата + + + + Not a function type + Не является типом функции + + + + Bad format specifier (precision) + Неверный спецификатор формата (точность) + + + + Bad format specifier (after {0}) + Неверный спецификатор формата (после {0}) + + + + Bad format specifier (width) + Неверный спецификатор формата (ширина) + + + + Could not bind function {0} in type {1} + Не удалось выполнить привязку функции {0} в типе {1} + + + + Could not bind property {0} in type {1} + Не удалось выполнить привязку свойства {0} в типе {1} + + + + Could not bind to method + Не удалось выполнить привязку к методу + + + + Cannot take the address of this quotation + Не удается получить адрес этой цитаты + + + + Failed to bind assembly '{0}' while processing quotation data + Не удалось привязать сборку ""{0}"" во время обработки данных цитирования + + + + ill formed expression: AppOp or LetOp + Неверно сформированное выражение: AppOp или LetOp + + + + type argument out of range + аргумент типа вне диапазона + + + + This value cannot be mutated + Это значение нельзя изменить. + + + + The option value was None + Значением параметра было Нет + + + + A continuation provided by Async.FromContinuations was invoked multiple times + Продолжение, предоставленное Async.FromContinuations, было вызвано несколько раз + + + + The record type '{0}' is invalid. Required constructor is not defined. + Тип записи "{0}" является недопустимым. Не определен обязательный конструктор. + + + + The tuple type '{0}' is invalid. Required constructor is not defined. + Тип кортежа "{0}" является недопустимым. Не определен обязательный конструктор. + + + + The input sequence contains more than one element. + Входная последовательность содержит более одного элемента. + + + + 'thenBy' and 'thenByDescending' may only be used with an ordered input + thenBy и thenByDescending можно использовать только в случае упорядоченных входных данных + + + + Unrecognized use of a 'sumBy' or 'averageBy' operator in a query. In queries whose original data is of static type IQueryable, these operators may only be used with result type int32, int64, single, double or decimal + Нераспознаваемое использование в запросе оператора sumBy или averageBy. В запросах, исходным типом данных которых является статический тип IQueryable, эти операторы можно использовать только с типом результата int32, int64, single, double или decimal + + + + An if/then/else conditional or pattern matching expression with multiple branches is not permitted in a query. An if/then/else conditional may be used. + В запросах не допускается использовать условные выражения if/then/else или проверку на соответствие шаблонам с несколькими ветвями. Можно использовать обычные условные выражения if/then/else. + + + + This is not a valid query expression. The following construct was used in a query but is not recognized by the F#-to-LINQ query translator:\n{0}\nCheck the specification of permitted queries and consider moving some of the operations out of the query expression. + Недопустимое выражение запроса. Следующая конструкция использовалась в запросе, но не была распознана транслятором запросов из F# в LINQ:\n{0}\nПроверьте спецификацию разрешенных запросов и попробуйте вынести часть операций за пределы запроса. + + + + This is not a valid query expression. The method '{0}' was used in a query but is not recognized by the F#-to-LINQ query translator. Check the specification of permitted queries and consider moving some of the operations out of the query expression + Недопустимое выражение запроса. Метод "{0}" использовался в запросе, но не был распознан транслятором запросов из F# в LINQ. Проверьте спецификацию разрешенных запросов и попробуйте вынести часть операций за пределы выражения запроса + + + + This is not a valid query expression. The property '{0}' was used in a query but is not recognized by the F#-to-LINQ query translator. Check the specification of permitted queries and consider moving some of the operations out of the query expression. + Недопустимое выражение запроса. Свойство "{0}" использовалось в запросе, но не было распознано транслятором запросов из F# в LINQ. Проверьте спецификацию разрешенных запросов и попробуйте вынести часть операций за пределы выражения запроса. + + + + This is not a valid query expression. The construct '{0}' was used in a query but is not recognized by the F#-to-LINQ query translator. Check the specification of permitted queries and consider moving some of the operations out of the query expression. + Недопустимое выражение запроса. Конструкция "{0}" использовалась запросе, но не была распознана транслятором запросов из F# в LINQ. Проверьте спецификацию разрешенных запросов и попробуйте вынести часть операций за пределы выражения запроса. + + + + + \ No newline at end of file diff --git a/src/fsharp/FSharp.Core/xlf/FSCore.tr.xlf b/src/fsharp/FSharp.Core/xlf/FSCore.tr.xlf new file mode 100644 index 00000000000..2baf7f4b07b --- /dev/null +++ b/src/fsharp/FSharp.Core/xlf/FSCore.tr.xlf @@ -0,0 +1,712 @@ + + + + + + The match cases were incomplete + Eşleşme durumları tam değildi + + + + First class uses of address-of operators are not permitted. + Address-of işleçlerinin birinci sınıf kullanımlarına izin verilmiyor. + + + + The arrays have different lengths. + Dizinlerin uzunlukları farklı. + + + + The input array was empty. + Giriş dizisi boştu. + + + + Input string was not in a correct format. + Giriş dizesi doğru biçimde değildi. + + + + Expecting delegate type. + Temsilci türü bekleniyor. + + + + Dynamic invocation of DivideByInt involving coercions is not supported. + Zorlamalar içeren dinamik DivideByInt çağrısı desteklenmiyor. + + + + Dynamic invocation of op_Addition involving coercions is not supported. + Zorlamalar içeren dinamik op_Addition çağrısı desteklenmiyor. + + + + Dynamic invocation of op_Addition involving overloading is not supported. + Aşırı yükleme içeren dinamik op_Addition çağrısı desteklenmiyor. + + + + Dynamic invocation of op_Multiply involving coercions is not supported. + Zorlamalar içeren dinamik op_Multiply çağrısı desteklenmiyor. + + + + Dynamic invocation of op_Multiply involving overloading is not supported. + Aşırı yükleme içeren dinamik op_Multiply çağrısı desteklenmiyor. + + + + The end of a range cannot be NaN. + Aralığın sonu NaN olamaz. + + + + Enumeration already finished. + Sabit listesi zaten tamamlanmış. + + + + Enumeration has not started. Call MoveNext. + Sabit listesi işlemi başlamadı. MoveNext çağrısı yapın. + + + + Set contains no elements. + Küme hiç öğe içermiyor. + + + + Enumeration based on System.Int32 exceeded System.Int32.MaxValue. + System.Int32'yi temel alan numaralandırma System.Int32.MaxValue'yu aştı. + + + + Failed to read enough bytes from the stream. + Akıştan yeterli miktarda bayt okunamadı. + + + + Failure during generic comparison: the type '{0}' does not implement the System.IComparable interface. This error may be arise from the use of a function such as 'compare', 'max' or 'min' or a data structure such as 'Set' or 'Map' whose keys contain instances of this type. + Genel karşılaştırma sırasında hata: '{0}' türü System.IComparable arabirimini uygulamıyor. Bu hata 'compare', 'max' veya 'min' gibi bir işlevin ya da anahtarları bu türün örneklerini içeren 'Set' veya 'Map' gibi bir veri yapısının kullanılmasından kaynaklanabilir. + + + + The index was outside the range of elements in the list. + Dizin listedeki öğeleri içeren aralığın dışındaydı. + + + + The input list was empty. + Giriş listesi boştu. + + + + The input must be non-negative. + Giriş negatif olmayan bir sayı olmalıdır. + + + + The input must be positive. + Girdinin pozitif bir değer olması gerekir. + + + + The input sequence was empty. + Giriş dizisi boştu. + + + + This is not a valid tuple type for the F# reflection library. + Bu, F# yansıma kitaplığı için geçerli bir demet türü değil. + + + + The item, key, or index was not found in the collection. + Belirtilen öğe, anahtar veya dizin koleksiyonda bulunamadı. + + + + The lists had different lengths. + Listelerin uzunlukları farklıydı. + + + + The MailboxProcessor has already been started. + MailboxProcessor zaten başlatılmış. + + + + MailboxProcessor.PostAndAsyncReply timed out. + MailboxProcessor.PostAndAsyncReply zaman aşımına uğradı. + + + + MailboxProcessor.PostAndReply timed out. + MailboxProcessor.PostAndReply zaman aşımına uğradı. + + + + Mailbox.Receive timed out. + Mailbox.Receive zaman aşımına uğradı. + + + + Mailbox.Scan timed out. + Mailbox.Scan zaman aşımına uğradı. + + + + Map values cannot be mutated. + Eşleme değerleri değiştirilemez. + + + + The IAsyncResult object provided does not match this 'Cancel' operation. + Sağlanan IAsyncResult nesnesi bu 'Cancel' işlemiyle eşleşmiyor. + + + + The IAsyncResult object provided does not match this 'End' operation. + Sağlanan IAsyncResult nesnesi bu 'End' işlemiyle eşleşmiyor. + + + + Negating the minimum value of a twos complement number is invalid. + İkiye tamamlanmış bir sayının en küçük değerini eksi yapma geçersizdir. + + + + The initialization of an object or value resulted in an object or value being accessed recursively before it was fully initialized. + Bir nesnenin veya değerin başlatılması işlemi, tam olarak başlatılmadan önce nesneye veya değere özyinelemeli olarak erişilmesiyle sonuçlandı. + + + + The static initialization of a file or type resulted in static data being accessed recursively before it was fully initialized. + Bir dosyanın veya türün statik başlatılması işlemi, tam olarak başlatılmadan önce statik verilere özyinelemeli olarak erişilmesiyle sonuçlandı. + + + + Arrays with non-zero base cannot be created on this platform. + Bu platformda sıfır tabanlı olmayan diziler oluşturulamaz. + + + + Type '{0}' is not a function type. + '{0}' türü bir işlev türü değil. + + + + Type '{0}' is not the representation of an F# exception declaration. + '{0}' türü bir F# özel durum bildirimini temsil etmiyor. + + + + The function did not compute a permutation. + İşlev bir permütasyon hesaplamadı. + + + + Type '{0}' is not an F# record type. + '{0}' türü bir F# kayıt türü değil. + + + + Type '{0}' is not a tuple type. + '{0}' türü bir demet türü değil. + + + + Type '{0}' is not an F# union type. + '{0}' türü bir F# birleşim türü değil. + + + + The two objects have different types and are not comparable. + İki nesne farklı türlere sahip ve karşılaştırılamaz. + + + + The input sequence has an insufficient number of elements. + Giriş dizisinde yetersiz sayıda öğe var. + + + + This object is for recursive equality calls and cannot be used for hashing. + Bu nesne özyinelemeli eşitlik çağrıları içindir ve karma işlevi için kullanılamaz. + + + + One of the elements in the array is null. + Dizideki öğelerden biri null. + + + + The object is not an F# record value. + Nesne bir F# kayıt değeri değil. + + + + The object is null and no type was given. Either pass a non-null object or a non-null type parameter. + Nesne null ve hiçbir tür verilmedi. Null olmayan bir nesne ya da null olmayan türde bir parametre geçirin. + + + + The index is outside the legal range. + Dizin geçerli aralığın dışında. + + + + The type '{0}' is the representation of an F# exception declaration but its representation is private. You must specify BindingFlags.NonPublic to access private type representations. + '{0}' türü bir F# özel durum bildirimini temsil ediyor ancak temsili özel değil. Özel tür temsillerine erişmek için BindingFlags.NonPublic belirtmelisiniz. + + + + The type '{0}' is an F# record type but its representation is private. You must specify BindingFlags.NonPublic to access private type representations. + '{0}' türü bir F# kayıt türü ancak temsili özel değil. Özel tür temsillerine erişmek için BindingFlags.NonPublic belirtmelisiniz. + + + + The type '{0}' is an F# union type but its representation is private. You must specify BindingFlags.NonPublic to access private type representations. + '{0}' türü bir F# birleşim türü ancak temsili özel değil. Özel tür temsillerine erişmek için BindingFlags.NonPublic belirtmelisiniz. + + + + Expected exactly one type argument. + Tam olarak bir tür bağımsız değişkeni bekleniyor. + + + + Expected exactly two type arguments. + Tam olarak iki tür bağımsız değişkeni bekleniyor. + + + + Not a valid F# union case index. + Geçerli bir F# birleşim durumu dizini değil. + + + + Type '{0}' did not have an F# record field named '{1}'. + {0}' türünde '{1}' adlı bir F# kayıt alanı yoktu. + + + + Type '{0}' did not have an F# union case named '{1}'. + {0}' türünde '{1}' adlı bir F# birleşim durumu yoktu. + + + + Type mismatch when building '{0}': the type of the field was incorrect. Expected '{1}', but received type '{2}'. + {0}' oluşturulurken tür uyuşmazlığı oluştu: alanın türü yanlıştı. '{1}' bekleniyordu, ancak '{2}' türü alındı. + + + + Type mismatch when building '{0}': body must return unit. Expected '{1}', but received type '{2}'. + {0}' oluşturulurken tür uyuşmazlığı oluştu: gövde birim döndürmelidir. '{1}' bekleniyordu, ancak '{2}' türü alındı. + + + + Type mismatch when building '{0}': condition expression must be of type bool. Expected '{1}', but received type '{2}'. + {0}' oluşturulurken tür uyuşmazlığı oluştu: koşul ifadesi bool türünde olmalıdır. '{1}' bekleniyordu, ancak '{2}' türü alındı. + + + + Type mismatch when building '{0}': expected function type in function application or let binding. Expected '{1}', but received type '{2}'. + {0}' oluşturulurken tür uyuşmazlığı oluştu: işlev uygulamasında veya let bağlamasında işlev türü bekleniyordu. '{1}' bekleniyordu, ancak '{2}' türü alındı. + + + + Type mismatch when building '{0}': expression doesn't match the tuple type. Expected '{1}', but received type '{2}'. + {0}' oluşturulurken tür uyuşmazlığı oluştu: ifade demet türüyle eşleşmiyor. '{1}' bekleniyordu, ancak '{2}' türü alındı. + + + + Type mismatch when building '{0}': types of expression does not match. Expected '{1}', but received type '{2}'. + {0}' oluşturulurken tür uyuşmazlığı oluştu: ifadenin türleri eşleşmiyor. '{1}' bekleniyordu, ancak '{2}' türü alındı. + + + + Type mismatch when building '{0}': function argument type doesn't match. Expected '{1}', but received type '{2}'. + {0}' oluşturulurken tür uyuşmazlığı oluştu: işlev bağımsız değişkeni türü eşleşmiyor. '{1}' bekleniyordu, ancak '{2}' türü alındı. + + + + Type mismatch when building '{0}': guard must return boolean. Expected '{1}', but received type '{2}'. + {0}' oluşturulurken tür uyuşmazlığı oluştu: koruma boole değeri döndürmelidir. '{1}' bekleniyordu, ancak '{2}' türü alındı. + + + + Type mismatch when building '{0}': incorrect argument type for an F# record. Expected '{1}', but received type '{2}'. + {0}' oluşturulurken tür uyuşmazlığı oluştu: bir F# kaydı için geçersiz bağımsız değişken türü. '{1}' bekleniyordu, ancak '{2}' türü alındı. + + + + Type mismatch when building '{0}': incorrect argument type for an F# union. Expected '{1}', but received type '{2}'. + {0}' oluşturulurken tür uyuşmazlığı oluştu: bir F# birleşimi için geçersiz bağımsız değişken türü. '{1}' bekleniyordu, ancak '{2}' türü alındı. + + + + Type mismatch when building '{0}': initializer doesn't match array type. Expected '{1}', but received type '{2}'. + {0}' oluşturulurken tür uyuşmazlığı oluştu: başlatıcı dizi türüyle eşleşmiyor. '{1}' bekleniyordu, ancak '{2}' türü alındı. + + + + Type mismatch when building '{0}': invalid parameter for a method or indexer property. Expected '{1}', but received type '{2}'. + {0}' oluşturulurken tür uyuşmazlığı oluştu: bir metot veya dizin oluşturucu özelliği için geçersiz parametre. '{1}' bekleniyordu, ancak '{2}' türü alındı. + + + + Type mismatch when building '{0}': body of the for loop must be lambda taking integer as an argument. Expected '{1}', but received type '{2}'. + {0}' oluşturulurken tür uyuşmazlığı oluştu: for döngüsünün gövdesi bağımsız değişken olarak tamsayı alan lambda olmalıdır. '{1}' bekleniyordu, ancak '{2}' türü alındı. + + + + Type mismatch when building '{0}': lower and upper bounds must be integers. Expected '{1}', but received type '{2}'. + {0}' oluşturulurken tür uyuşmazlığı oluştu: alt ve üst sınırlar tamsayı olmalıdır. '{1}' bekleniyordu, ancak '{2}' türü alındı. + + + + Type mismatch when building '{0}': types of true and false branches differ. Expected '{1}', but received type '{2}'. + {0}' oluşturulurken tür uyuşmazlığı oluştu: true ve false dallarının türleri farklı. '{1}' bekleniyordu, ancak '{2}' türü alındı. + + + + Type mismatch when building '{0}': mismatched type of argument and tuple element. Expected '{1}', but received type '{2}'. + {0}' oluşturulurken tür uyuşmazlığı oluştu: bağımsız değişken ile demet öğesinin türü eşleşmiyor. '{1}' bekleniyordu, ancak '{2}' türü alındı. + + + + Type mismatch when building '{0}': the variable type doesn't match the type of the right-hand-side of a let binding. Expected '{1}', but received type '{2}'. + {0}' oluşturulurken tür uyuşmazlığı oluştu: değişken türü bir let bağlamasının sağ tarafının türüyle eşleşmiyor. '{1}' bekleniyordu, ancak '{2}' türü alındı. + + + + Unexpected quotation hole in expression. + İfadede beklenmeyen tırnak boşluğu var. + + + + The parameter is not a recognized method name. + Parametre tanınan bir metot adı değil. + + + + Reset is not supported on this enumerator. + Bu numaralayıcı üzerinde sıfırlama işlemi desteklenmiyor. + + + + The start of a range cannot be NaN. + Aralığın başlangıcı NaN olamaz. + + + + The step of a range cannot be NaN. + Aralığın adımı NaN olamaz. + + + + The step of a range cannot be zero. + Aralığın adımı sıfır olamaz. + + + + The System.Threading.SynchronizationContext.Current of the calling thread is null. + Çağıran iş parçacığının System.Threading.SynchronizationContext.Current'ı null. + + + + The tuple index '{1}' was out of range for tuple type '{0}'. + {0}' demet türü için '{1}' demet dizini aralık dışındaydı. + + + + Failed to bind constructor + Oluşturucu bağlanamadı + + + + Failed to bind field '{0}' + '{0}' alanı bağlanamadı + + + + Failed to bind property '{0}' + '{0}' özelliği bağlanamadı + + + + Failed to bind type '{0}' in assembly '{1}' + {1}' bütünleştirilmiş kodundaki '{0}' türü bağlanamadı + + + + Incompatible record length + Uyumsuz kayıt uzunluğu + + + + Incorrect instance type + Yanlış örnek türü + + + + Incorrect number of arguments + Yanlış sayıda bağımsız değişken + + + + Incorrect type + Yanlış tür + + + + Invalid function type + Geçersiz işlev türü + + + + The member is non-static (instance), but no receiver object was supplied + Üye statik değil (örnek), ancak hiçbir alıcı nesne sağlanmadı + + + + Parent type cannot be null + Üst tür null olamaz + + + + Reading a set-only property + Yalnızca ayarlanabilen bir özellik okunuyor + + + + Receiver object was unexpected, as member is static + Üye statik olduğundan alıcı nesne beklenmiyordu + + + + Type mismatch when building '{0}': the expression has the wrong type. Expected '{1}', but received type '{2}'. + {0}' oluşturulurken tür uyuşmazlığı oluştu: ifadenin türü yanlış. '{1}' bekleniyordu, ancak '{2}' türü alındı. + + + + Type mismatch when building '{0}': function type doesn't match delegate type. Expected '{1}', but received type '{2}'. + {0}' oluşturulurken tür uyuşmazlığı oluştu: işlev türü temsilci türüyle eşleşmiyor. '{1}' bekleniyordu, ancak '{2}' türü alındı. + + + + Type mismatch when splicing expression into quotation literal. The type of the expression tree being inserted doesn't match the type expected by the splicing operation. Expected '{0}', but received type '{1}'. Consider type-annotating with the expected expression type, e.g., (%% x : {0}) or (%x : {0}). + İfade değişmez teklif değerine birleştirilirken tür uyuşmazlığı oluştu. Eklenen ifade ağacının türü birleştirme işlemi tarafından beklenen türle eşleşmiyor. '{0}' bekleniyordu, ancak '{1}' türü alındı. (%% x : {0}) veya (%x : {0}) gibi beklenen ifade türüyle tür eklemeyi düşünün. + + + + Tuple access out of range + Demet erişimi aralık dışında + + + + The tuple lengths are different + Demet uzunlukları farklı + + + + F# union type requires different number of arguments + F# birleşim türü farklı sayıda bağımsız değişken gerektirir + + + + Writing a get-only property + Yalnızca alınabilen bir özellik yazılıyor + + + + The method '{0}' expects {1} type arguments but {2} were provided + {0}' metodu {1} türünde bağımsız değişkenler bekliyor ancak {2} sağlandı + + + + An index satisfying the predicate was not found in the collection. + Koşulu sağlayan bir dizin koleksiyonda bulunamadı. + + + + The constructor method '{0}' for the union case could not be found + Birleşim durumunun '{0}' oluşturucu metodu bulunamadı + + + + first class uses of '%' or '%%' are not permitted + birinci sınıf '%' veya '%%' kullanımına izin verilmiyor + + + + MoveNext not called, or finished + MoveNext çağrılmadı veya tamamlanmadı + + + + Multiple CompilationMappingAttributes, expected at most one + Birden fazla CompilationMappingAttributes var; bir tane bekleniyordu + + + + Bad float value + Hatalı float değeri + + + + Bad format specifier:{0} + Hatalı biçim belirticisi: {0} + + + + Bad integer supplied to dynamic formatter + Dinamik biçimlendiriciye yanlış tamsayı sağlandı + + + + Expected a precision argument + Bir duyarlık bağımsız değişkeni bekleniyordu + + + + Expected a width argument + Bir genişlik bağımsız değişkeni bekleniyordu + + + + The # formatting modifier is invalid in F# + # biçimlendirme değiştiricisi F# içinde geçersizdir + + + + Missing format specifier + Biçim belirticisi eksik + + + + Not a function type + Bir işlev türü değil + + + + Bad format specifier (precision) + Hatalı biçim belirticisi (duyarlık) + + + + Bad format specifier (after {0}) + Hatalı biçim belirticisi ({0} sonrasında) + + + + Bad format specifier (width) + Hatalı biçim belirticisi (genişlik) + + + + Could not bind function {0} in type {1} + {1} türünde {0} işlevi bağlanamadı + + + + Could not bind property {0} in type {1} + {1} türündeki {0} özelliği bağlanamadı + + + + Could not bind to method + Metot bağlanamadı + + + + Cannot take the address of this quotation + Bu tırnağın adresi alınamıyor + + + + Failed to bind assembly '{0}' while processing quotation data + Tırnak verileri işlenirken '{0}' bütünleştirilmiş kodu bağlanamadı + + + + ill formed expression: AppOp or LetOp + hatalı biçimlendirilmiş ifade: AppOp veya LetOp + + + + type argument out of range + tür bağımsız değişkeni aralık dışında + + + + This value cannot be mutated + Bu değer değiştirilemez + + + + The option value was None + Seçenek değeri None idi + + + + A continuation provided by Async.FromContinuations was invoked multiple times + Async.FromContinuations tarafından sağlanan bir devamlılık birden fazla kez çağrıldı + + + + The record type '{0}' is invalid. Required constructor is not defined. + '{0}' kayıt türü geçersiz. Gerekli oluşturucu tanımlanmadı. + + + + The tuple type '{0}' is invalid. Required constructor is not defined. + '{0}' demet türü geçersiz. Gerekli oluşturucu tanımlanmadı. + + + + The input sequence contains more than one element. + Giriş dizisi birden fazla öğe içeriyor. + + + + 'thenBy' and 'thenByDescending' may only be used with an ordered input + 'thenBy' ve 'thenByDescending' yalnızca sıralanmış bir girişle kullanılabilir + + + + Unrecognized use of a 'sumBy' or 'averageBy' operator in a query. In queries whose original data is of static type IQueryable, these operators may only be used with result type int32, int64, single, double or decimal + Sorguda 'sumBy' veya 'averageBy' işlecinin tanınmayan kullanımı. Özgün verileri statik IQueryable türünde olan sorgularda, bu işleçler yalnızca int32, int64, single, double veya decimal sonuç türüyle kullanılabilir + + + + An if/then/else conditional or pattern matching expression with multiple branches is not permitted in a query. An if/then/else conditional may be used. + Sorguda, birden fazla dalı bulunan if/then/else koşullu veya desen eşleştirme ifadesine izin verilmez. Bir if/then/else koşulu kullanılabilir. + + + + This is not a valid query expression. The following construct was used in a query but is not recognized by the F#-to-LINQ query translator:\n{0}\nCheck the specification of permitted queries and consider moving some of the operations out of the query expression. + Bu geçerli bir sorgu ifadesi değil. Aşağıdaki yapı sorguda kullanıldı, ancak F#-to-LINQ çevirmeni tarafından tanınmıyor:\n{0}\nİzin verilen soruların belirtimini denetleyin ve işlemlerden bazılarını sorgu ifadesinin dışına taşımayı düşünün. + + + + This is not a valid query expression. The method '{0}' was used in a query but is not recognized by the F#-to-LINQ query translator. Check the specification of permitted queries and consider moving some of the operations out of the query expression + Bu geçerli bir sorgu ifadesi değil. '{0}' metodu sorguda kullanıldı, ancak F#-to-LINQ çevirmeni tarafından tanınmıyor. İzin verilen soruların belirtimini denetleyin ve işlemlerden bazılarını sorgu ifadesinin dışına taşımayı düşünün + + + + This is not a valid query expression. The property '{0}' was used in a query but is not recognized by the F#-to-LINQ query translator. Check the specification of permitted queries and consider moving some of the operations out of the query expression. + Bu geçerli bir sorgu ifadesi değil. '{0}' özelliği sorguda kullanıldı, ancak F#-to-LINQ çevirmeni tarafından tanınmıyor. İzin verilen soruların belirtimini denetleyin ve işlemlerden bazılarını sorgu ifadesinin dışına taşımayı düşünün. + + + + This is not a valid query expression. The construct '{0}' was used in a query but is not recognized by the F#-to-LINQ query translator. Check the specification of permitted queries and consider moving some of the operations out of the query expression. + Bu geçerli bir sorgu ifadesi değil. '{0}' yapısı sorguda kullanıldı, ancak F#-to-LINQ çevirmeni tarafından tanınmıyor. İzin verilen soruların belirtimini denetleyin ve işlemlerden bazılarını sorgu ifadesinin dışına taşımayı düşünün. + + + + + \ No newline at end of file diff --git a/src/fsharp/FSharp.Core/xlf/FSCore.zh-Hans.xlf b/src/fsharp/FSharp.Core/xlf/FSCore.zh-Hans.xlf new file mode 100644 index 00000000000..9bac5ce1a8b --- /dev/null +++ b/src/fsharp/FSharp.Core/xlf/FSCore.zh-Hans.xlf @@ -0,0 +1,712 @@ + + + + + + The match cases were incomplete + 大小写匹配不完整 + + + + First class uses of address-of operators are not permitted. + 不允许优先使用 address-of 运算符。 + + + + The arrays have different lengths. + 各个数组具有不同的长度。 + + + + The input array was empty. + 输入数组为空。 + + + + Input string was not in a correct format. + 输入字符串的格式不正确。 + + + + Expecting delegate type. + 应为委托类型。 + + + + Dynamic invocation of DivideByInt involving coercions is not supported. + 不支持对涉及强制的 DivideByInt 进行动态调用。 + + + + Dynamic invocation of op_Addition involving coercions is not supported. + 不支持对涉及强制的 op_Addition 进行动态调用。 + + + + Dynamic invocation of op_Addition involving overloading is not supported. + 不支持对涉及重载的 op_Addition 进行动态调用。 + + + + Dynamic invocation of op_Multiply involving coercions is not supported. + 不支持对涉及强制的 op_Multiply 进行动态调用。 + + + + Dynamic invocation of op_Multiply involving overloading is not supported. + 不支持对涉及重载的 op_Multiply 进行动态调用。 + + + + The end of a range cannot be NaN. + 范围的末尾不能为 NaN。 + + + + Enumeration already finished. + 枚举已完成。 + + + + Enumeration has not started. Call MoveNext. + 枚举尚未开始。请调用 MoveNext。 + + + + Set contains no elements. + 集未包含任何元素。 + + + + Enumeration based on System.Int32 exceeded System.Int32.MaxValue. + 基于 System.Int32 的枚举已超过 System.Int32.MaxValue。 + + + + Failed to read enough bytes from the stream. + 未能从流中读取足够的字节。 + + + + Failure during generic comparison: the type '{0}' does not implement the System.IComparable interface. This error may be arise from the use of a function such as 'compare', 'max' or 'min' or a data structure such as 'Set' or 'Map' whose keys contain instances of this type. + 泛型比较过程中出错: 类型“{0}”未实现 System.IComparable 接口。此错误可能是因使用的函数(如“compare”、“max”或“min”)或数据结构(如“Set”或“Map”)中的键包含此类型的实例而导致的。 + + + + The index was outside the range of elements in the list. + 索引超出了列表中元素的范围。 + + + + The input list was empty. + 输入列表为空。 + + + + The input must be non-negative. + 输入必须为非负数。 + + + + The input must be positive. + 输入值必须为正数。 + + + + The input sequence was empty. + 输入序列为空。 + + + + This is not a valid tuple type for the F# reflection library. + 这不是 F# 反射库的有效元组类型。 + + + + The item, key, or index was not found in the collection. + 未在集合中找到相应的项、键或索引。 + + + + The lists had different lengths. + 各个列表具有不同的长度。 + + + + The MailboxProcessor has already been started. + 已启动 MailboxProcessor。 + + + + MailboxProcessor.PostAndAsyncReply timed out. + MailboxProcessor.PostAndAsyncReply 超时。 + + + + MailboxProcessor.PostAndReply timed out. + MailboxProcessor.PostAndReply 超时。 + + + + Mailbox.Receive timed out. + Mailbox.Receive 超时。 + + + + Mailbox.Scan timed out. + Mailbox.Scan 超时。 + + + + Map values cannot be mutated. + 无法转变映射值。 + + + + The IAsyncResult object provided does not match this 'Cancel' operation. + 提供的 IAsyncResult 对象与此“取消”操作不匹配。 + + + + The IAsyncResult object provided does not match this 'End' operation. + 提供的 IAsyncResult 对象与此“结束”操作不匹配。 + + + + Negating the minimum value of a twos complement number is invalid. + 对 2 的补数的最小值求反的操作无效。 + + + + The initialization of an object or value resulted in an object or value being accessed recursively before it was fully initialized. + 对象或值的初始化导致对象或值正被按递归方式访问,而尚未完全初始化。 + + + + The static initialization of a file or type resulted in static data being accessed recursively before it was fully initialized. + 文件或类型的静态初始化导致静态数据正被按递归方式访问,而其尚未完全初始化。 + + + + Arrays with non-zero base cannot be created on this platform. + 无法在此平台上创建不是从零数开始的数组。 + + + + Type '{0}' is not a function type. + 类型“{0}”不是函数类型。 + + + + Type '{0}' is not the representation of an F# exception declaration. + 类型“{0}”不是 F# 异常声明的表示形式。 + + + + The function did not compute a permutation. + 该函数不计算排列。 + + + + Type '{0}' is not an F# record type. + 类型“{0}”不是 F# 记录类型。 + + + + Type '{0}' is not a tuple type. + 类型“{0}”不是元组类型。 + + + + Type '{0}' is not an F# union type. + 类型“{0}”不是 F# 联合类型。 + + + + The two objects have different types and are not comparable. + 两个对象具有不同的类型,不可以进行比较。 + + + + The input sequence has an insufficient number of elements. + 输入序列具有的元素数目不足。 + + + + This object is for recursive equality calls and cannot be used for hashing. + 此对象用于递归相等调用,而不能用于哈希处理。 + + + + One of the elements in the array is null. + 数组中的某个元素为 null。 + + + + The object is not an F# record value. + 该对象不是 F# 记录值。 + + + + The object is null and no type was given. Either pass a non-null object or a non-null type parameter. + 该对象为 null,并且未给定任何类型。 请传递一个非 null 对象,或者传递一个非 null 类型参数。 + + + + The index is outside the legal range. + 索引超出了合法范围。 + + + + The type '{0}' is the representation of an F# exception declaration but its representation is private. You must specify BindingFlags.NonPublic to access private type representations. + 类型“{0}”是 F# 异常声明的表示形式,但其表示形式是私有的。您必须指定 BindingFlags.NonPublic,才能访问私有类型表示形式。 + + + + The type '{0}' is an F# record type but its representation is private. You must specify BindingFlags.NonPublic to access private type representations. + 类型“{0}”是 F# 记录类型,但其表示形式是私有的。您必须指定 BindingFlags.NonPublic,才能访问私有类型表示形式。 + + + + The type '{0}' is an F# union type but its representation is private. You must specify BindingFlags.NonPublic to access private type representations. + 类型“{0}”是 F# 联合类型,但其表示形式是私有的。您必须指定 BindingFlags.NonPublic,才能访问私有类型表示形式。 + + + + Expected exactly one type argument. + 应正好为一个类型参数。 + + + + Expected exactly two type arguments. + 应正好为两个类型参数。 + + + + Not a valid F# union case index. + 不是有效的 F# 联合用例索引。 + + + + Type '{0}' did not have an F# record field named '{1}'. + 类型“{0}”不具有名为“{1}”的 F# 记录字段。 + + + + Type '{0}' did not have an F# union case named '{1}'. + 类型“{0}”不具有名为“{1}”的 F# 联合用例。 + + + + Type mismatch when building '{0}': the type of the field was incorrect. Expected '{1}', but received type '{2}'. + 在生成“{0}”时类型不匹配: 字段的类型不正确。应为“{1}”,但收到的类型为“{2}”。 + + + + Type mismatch when building '{0}': body must return unit. Expected '{1}', but received type '{2}'. + 在生成“{0}”时类型不匹配: body 必须返回 unit。应为“{1}”,但收到的类型为“{2}”。 + + + + Type mismatch when building '{0}': condition expression must be of type bool. Expected '{1}', but received type '{2}'. + 在生成“{0}”时类型不匹配: 条件表达式的类型必须为 bool。应为“{1}”,但收到的类型为“{2}”。 + + + + Type mismatch when building '{0}': expected function type in function application or let binding. Expected '{1}', but received type '{2}'. + 在生成“{0}”时类型不匹配: 应为函数应用程序或 let 绑定中的函数类型。应为“{1}”,但收到的类型为“{2}”。 + + + + Type mismatch when building '{0}': expression doesn't match the tuple type. Expected '{1}', but received type '{2}'. + 在生成“{0}”时类型不匹配: 表达式与元组类型不匹配。应为“{1}”,但收到的类型为“{2}”。 + + + + Type mismatch when building '{0}': types of expression does not match. Expected '{1}', but received type '{2}'. + 在生成“{0}”时类型不匹配: 表达式的类型不匹配。应为“{1}”,但收到的类型为“{2}”。 + + + + Type mismatch when building '{0}': function argument type doesn't match. Expected '{1}', but received type '{2}'. + 在生成“{0}”时类型不匹配: 函数参数类型不匹配。应为“{1}”,但收到的类型为“{2}”。 + + + + Type mismatch when building '{0}': guard must return boolean. Expected '{1}', but received type '{2}'. + 在生成“{0}”时类型不匹配: guard 必须返回 boolean。应为“{1}”,但收到的类型为“{2}”。 + + + + Type mismatch when building '{0}': incorrect argument type for an F# record. Expected '{1}', but received type '{2}'. + 在生成“{0}”时类型不匹配: F# 记录的参数类型不正确。应为“{1}”,但收到的类型为“{2}”。 + + + + Type mismatch when building '{0}': incorrect argument type for an F# union. Expected '{1}', but received type '{2}'. + 在生成“{0}”时类型不匹配: F# 联合的参数类型不正确。应为“{1}”,但收到的类型为“{2}”。 + + + + Type mismatch when building '{0}': initializer doesn't match array type. Expected '{1}', but received type '{2}'. + 在生成“{0}”时类型不匹配: 初始化表达式与数组类型不匹配。应为“{1}”,但收到的类型为“{2}”。 + + + + Type mismatch when building '{0}': invalid parameter for a method or indexer property. Expected '{1}', but received type '{2}'. + 在生成“{0}”时类型不匹配: 方法或索引器属性的参数无效。应为“{1}”,但收到的类型为“{2}”。 + + + + Type mismatch when building '{0}': body of the for loop must be lambda taking integer as an argument. Expected '{1}', but received type '{2}'. + 在生成“{0}”时类型不匹配: for 循环的主体必须是采用整数作为参数的 lambda。应为“{1}”,但收到的类型为“{2}”。 + + + + Type mismatch when building '{0}': lower and upper bounds must be integers. Expected '{1}', but received type '{2}'. + 在生成“{0}”时类型不匹配: 下限或上限必须为整数。应为“{1}”,但收到的类型为“{2}”。 + + + + Type mismatch when building '{0}': types of true and false branches differ. Expected '{1}', but received type '{2}'. + 在生成“{0}”时类型不匹配: 类型为 true 和 false 的分支不同。应为“{1}”,但收到的类型为“{2}”。 + + + + Type mismatch when building '{0}': mismatched type of argument and tuple element. Expected '{1}', but received type '{2}'. + 在生成“{0}”时类型不匹配: 参数和元组元素的类型不匹配。应为“{1}”,但收到的类型为“{2}”。 + + + + Type mismatch when building '{0}': the variable type doesn't match the type of the right-hand-side of a let binding. Expected '{1}', but received type '{2}'. + 在生成“{0}”时类型不匹配: 变量类型与 let 绑定右侧的类型不匹配。应为“{1}”,但收到的类型为“{2}”。 + + + + Unexpected quotation hole in expression. + 表达式中存在意外的引用漏洞。 + + + + The parameter is not a recognized method name. + 该参数不是可识别的方法名称。 + + + + Reset is not supported on this enumerator. + 此枚举器不支持重置。 + + + + The start of a range cannot be NaN. + 范围的开头不能为 NaN。 + + + + The step of a range cannot be NaN. + 范围的跨距不能为 NaN。 + + + + The step of a range cannot be zero. + 范围的跨距不能为零。 + + + + The System.Threading.SynchronizationContext.Current of the calling thread is null. + 调用线程的 System.Threading.SynchronizationContext.Current 为 null。 + + + + The tuple index '{1}' was out of range for tuple type '{0}'. + 元组索引“{1}”超出元组类型“{0}”的范围。 + + + + Failed to bind constructor + 未能绑定构造函数 + + + + Failed to bind field '{0}' + 未能绑定字段“{0}” + + + + Failed to bind property '{0}' + 未能绑定属性“{0}” + + + + Failed to bind type '{0}' in assembly '{1}' + 未能绑定程序集“{1}”中的类型“{0}” + + + + Incompatible record length + 记录长度不兼容 + + + + Incorrect instance type + 实例类型不正确 + + + + Incorrect number of arguments + 参数数目不正确 + + + + Incorrect type + 类型不正确 + + + + Invalid function type + 函数类型无效 + + + + The member is non-static (instance), but no receiver object was supplied + 该成员是非静态的(实例),但未提供任何接收器对象 + + + + Parent type cannot be null + 父类型不能为 null + + + + Reading a set-only property + 正在读取仅有 setter 的属性 + + + + Receiver object was unexpected, as member is static + 由于成员是静态的,因此不应出现接收器对象 + + + + Type mismatch when building '{0}': the expression has the wrong type. Expected '{1}', but received type '{2}'. + 在生成“{0}”时类型不匹配: 表达式具有错误类型。应为“{1}”,但收到的类型为“{2}”。 + + + + Type mismatch when building '{0}': function type doesn't match delegate type. Expected '{1}', but received type '{2}'. + 在生成“{0}”时类型不匹配: 函数类型与委托类型不匹配。应为“{1}”,但收到的类型为“{2}”。 + + + + Type mismatch when splicing expression into quotation literal. The type of the expression tree being inserted doesn't match the type expected by the splicing operation. Expected '{0}', but received type '{1}'. Consider type-annotating with the expected expression type, e.g., (%% x : {0}) or (%x : {0}). + 将表达式拼接到引用文本中时类型不匹配。要插入的表达式树的类型与拼接操作所需的类型不匹配。应为“{0}”,但收到的类型为“{1}”。请考虑使用预期表达式类型进行类型批准,例如,(%% x : {0})或(%x : {0})。 + + + + Tuple access out of range + 元组访问超出范围 + + + + The tuple lengths are different + 各个元组长度不同 + + + + F# union type requires different number of arguments + F# 联合类型需要不同数目的参数 + + + + Writing a get-only property + 正在写入仅有 getter 的属性 + + + + The method '{0}' expects {1} type arguments but {2} were provided + 方法“{0}”要求 {1} 个类型参数,但提供了 {2} 个类型参数 + + + + An index satisfying the predicate was not found in the collection. + 未在集合找到符合谓词的索引。 + + + + The constructor method '{0}' for the union case could not be found + 找不到联合用例的构造函数方法“{0}” + + + + first class uses of '%' or '%%' are not permitted + 不允许优先使用“%”或“%%” + + + + MoveNext not called, or finished + 未调用 MoveNext 或已完成 MoveNext + + + + Multiple CompilationMappingAttributes, expected at most one + 多个 CompilationMappingAttribute,最多只应有一个 + + + + Bad float value + 错误的浮点值 + + + + Bad format specifier:{0} + 错误的格式说明符: {0} + + + + Bad integer supplied to dynamic formatter + 提供给动态格式化程序的整数错误 + + + + Expected a precision argument + 应为精度参数 + + + + Expected a width argument + 应为宽度参数 + + + + The # formatting modifier is invalid in F# + # 格式修饰符在 F# 中无效 + + + + Missing format specifier + 缺少格式说明符 + + + + Not a function type + 不是函数类型 + + + + Bad format specifier (precision) + 错误的格式说明符(精度) + + + + Bad format specifier (after {0}) + 错误的格式说明符(在 {0} 之后) + + + + Bad format specifier (width) + 错误的格式说明符(宽度) + + + + Could not bind function {0} in type {1} + 未能绑定类型 {1} 中的函数 {0} + + + + Could not bind property {0} in type {1} + 未能绑定类型 {1} 中的属性 {0} + + + + Could not bind to method + 未能绑定到方法 + + + + Cannot take the address of this quotation + 无法获取此引用的地址 + + + + Failed to bind assembly '{0}' while processing quotation data + 在处理引用数据时未能绑定程序集“{0}” + + + + ill formed expression: AppOp or LetOp + 格式错误的表达式: AppOp 或 LetOp + + + + type argument out of range + 类型参数超出范围 + + + + This value cannot be mutated + 无法转变此值 + + + + The option value was None + 选项值为“None” + + + + A continuation provided by Async.FromContinuations was invoked multiple times + Async.FromContinuations 提供的延续被调用了多次 + + + + The record type '{0}' is invalid. Required constructor is not defined. + 记录类型“{0}”无效。未定义所需的构造函数。 + + + + The tuple type '{0}' is invalid. Required constructor is not defined. + 元组类型“{0}”无效。未定义所需的构造函数。 + + + + The input sequence contains more than one element. + 输入序列包含多个元素。 + + + + 'thenBy' and 'thenByDescending' may only be used with an ordered input + “thenBy”和“thenByDescending”只能用于有序输入 + + + + Unrecognized use of a 'sumBy' or 'averageBy' operator in a query. In queries whose original data is of static type IQueryable, these operators may only be used with result type int32, int64, single, double or decimal + 查询中无法识别的“sumBy”或“averageBy”运算符用法。在其原始数据属于静态类型 IQueryable 的查询中,这些运算符只能用于结果类型 int32、int64、single、double 或 decimal + + + + An if/then/else conditional or pattern matching expression with multiple branches is not permitted in a query. An if/then/else conditional may be used. + 查询中不允许出现拥有多个分支的 if/then/else 条件或模式匹配表达式。可以使用 if/then/else 条件。 + + + + This is not a valid query expression. The following construct was used in a query but is not recognized by the F#-to-LINQ query translator:\n{0}\nCheck the specification of permitted queries and consider moving some of the operations out of the query expression. + 这不是有效的查询表达式。查询中使用了下面的构造,但 F#-LINQ 查询转换器无法识别该构造:\n{0}\n请查看有效查询的规范,考虑是否将部分运算移到查询表达式之外。 + + + + This is not a valid query expression. The method '{0}' was used in a query but is not recognized by the F#-to-LINQ query translator. Check the specification of permitted queries and consider moving some of the operations out of the query expression + 这不是有效的查询表达式。查询中使用了方法“{0}”,但 F#-LINQ 查询转换器无法识别该方法。请查看有效查询的规范,考虑是否将部分运算移到查询表达式之外 + + + + This is not a valid query expression. The property '{0}' was used in a query but is not recognized by the F#-to-LINQ query translator. Check the specification of permitted queries and consider moving some of the operations out of the query expression. + 这不是有效的查询表达式。查询中使用了属性“{0}”,但 F#-LINQ 查询转换器无法识别该属性。请查看有效查询的规范,考虑是否将部分运算移到查询表达式之外。 + + + + This is not a valid query expression. The construct '{0}' was used in a query but is not recognized by the F#-to-LINQ query translator. Check the specification of permitted queries and consider moving some of the operations out of the query expression. + 这不是有效的查询表达式。查询中使用了构造“{0}”,但 F#-LINQ 查询转换器无法识别该构造。请查看有效查询的规范,考虑是否将部分运算移到查询表达式之外。 + + + + + \ No newline at end of file diff --git a/src/fsharp/FSharp.Core/xlf/FSCore.zh-Hant.xlf b/src/fsharp/FSharp.Core/xlf/FSCore.zh-Hant.xlf new file mode 100644 index 00000000000..e75ede8758c --- /dev/null +++ b/src/fsharp/FSharp.Core/xlf/FSCore.zh-Hant.xlf @@ -0,0 +1,712 @@ + + + + + + The match cases were incomplete + 大小寫須相符不完整 + + + + First class uses of address-of operators are not permitted. + 不允許優先使用傳址運算子。 + + + + The arrays have different lengths. + 陣列有不同的長度。 + + + + The input array was empty. + 輸入陣列是空的。 + + + + Input string was not in a correct format. + 輸入字串格式不正確。 + + + + Expecting delegate type. + 必須是委派類型。 + + + + Dynamic invocation of DivideByInt involving coercions is not supported. + 不支援與強制型轉相關的 DivideByInt 的動態引動過程。 + + + + Dynamic invocation of op_Addition involving coercions is not supported. + 不支援與強制型轉相關的 op_Addition 的動態引動過程。 + + + + Dynamic invocation of op_Addition involving overloading is not supported. + 不支援與多載相關的 op_Addition 的動態引動過程。 + + + + Dynamic invocation of op_Multiply involving coercions is not supported. + 不支援與強制型轉相關的 op_Multiply 的動態引動過程。 + + + + Dynamic invocation of op_Multiply involving overloading is not supported. + 不支援與多載相關的 op_Multiply 的動態引動過程。 + + + + The end of a range cannot be NaN. + 範圍結尾不能是 NaN。 + + + + Enumeration already finished. + 列舉已完成。 + + + + Enumeration has not started. Call MoveNext. + 尚未開始列舉。呼叫 MoveNext。 + + + + Set contains no elements. + Set 未包含項目。 + + + + Enumeration based on System.Int32 exceeded System.Int32.MaxValue. + 依 System.Int32 而定的列舉超過 System.Int32.MaxValue。 + + + + Failed to read enough bytes from the stream. + 無法從資料流讀取足夠的位元組。 + + + + Failure during generic comparison: the type '{0}' does not implement the System.IComparable interface. This error may be arise from the use of a function such as 'compare', 'max' or 'min' or a data structure such as 'Set' or 'Map' whose keys contain instances of this type. + 進行泛型比較期間失敗: 類型 '{0}' 未實作 System.IComparable 介面。這個錯誤可能是由使用的函式 (如 'compare'、'max' 或 'min') 或資料結構 (如 'Set' 或 'Map') 的索引鍵包含此類型的執行個體引起的。 + + + + The index was outside the range of elements in the list. + 索引在清單的項目範圍之外。 + + + + The input list was empty. + 輸入清單是空的。 + + + + The input must be non-negative. + 輸入必須是非負數。 + + + + The input must be positive. + 輸入必須是正數。 + + + + The input sequence was empty. + 輸入序列是空的。 + + + + This is not a valid tuple type for the F# reflection library. + 這不是 F# 反映庫的有效元組型別。 + + + + The item, key, or index was not found in the collection. + 在集合中找不到項目、索引鍵或索引。 + + + + The lists had different lengths. + 清單有不同的長度。 + + + + The MailboxProcessor has already been started. + 已經啟動 MailboxProcessor。 + + + + MailboxProcessor.PostAndAsyncReply timed out. + MailboxProcessor.PostAndAsyncReply 逾時。 + + + + MailboxProcessor.PostAndReply timed out. + MailboxProcessor.PostAndReply 逾時。 + + + + Mailbox.Receive timed out. + Mailbox.Receive 逾時。 + + + + Mailbox.Scan timed out. + Mailbox.Scan 逾時。 + + + + Map values cannot be mutated. + 不能變更對應值。 + + + + The IAsyncResult object provided does not match this 'Cancel' operation. + 提供的 IAsyncResult 物件不符合此 'Cancel' 作業。 + + + + The IAsyncResult object provided does not match this 'End' operation. + 提供的 IAsyncResult 物件不符合此 'End' 作業。 + + + + Negating the minimum value of a twos complement number is invalid. + 對二進位補數的最小值取補數無效。 + + + + The initialization of an object or value resulted in an object or value being accessed recursively before it was fully initialized. + 物件或值的初始化造成物件或值未完全初始化之前就被遞迴存取。 + + + + The static initialization of a file or type resulted in static data being accessed recursively before it was fully initialized. + 檔案或類型的靜態初始化造成靜態資料未完全初始化之前就被遞迴存取。 + + + + Arrays with non-zero base cannot be created on this platform. + 在這個平台上無法建立以非零為起始的陣列。 + + + + Type '{0}' is not a function type. + 類型 '{0}' 不是函式類型。 + + + + Type '{0}' is not the representation of an F# exception declaration. + 類型 '{0}' 不是 F# 例外狀況宣告的表示。 + + + + The function did not compute a permutation. + 這個函式未計算排列。 + + + + Type '{0}' is not an F# record type. + 類型 '{0}' 不是 F# 記錄類型。 + + + + Type '{0}' is not a tuple type. + 型別 '{0}' 不是元組型別。 + + + + Type '{0}' is not an F# union type. + 型別 '{0}' 不是 F# 等位型別。 + + + + The two objects have different types and are not comparable. + 兩個物件有不同的類型,無法進行計算。 + + + + The input sequence has an insufficient number of elements. + 輸入序列的項目數目不足。 + + + + This object is for recursive equality calls and cannot be used for hashing. + 這個物件用於遞迴等式呼叫,無法用於雜湊。 + + + + One of the elements in the array is null. + 陣列中的其中一個元素為 null。 + + + + The object is not an F# record value. + 這個物件不是 F# 記錄值。 + + + + The object is null and no type was given. Either pass a non-null object or a non-null type parameter. + 這個物件為 null,而且未指定任何型別。請傳遞一個非 null 物件或一個非 null 型別參數。 + + + + The index is outside the legal range. + 索引在合法範圍之外。 + + + + The type '{0}' is the representation of an F# exception declaration but its representation is private. You must specify BindingFlags.NonPublic to access private type representations. + 類型 '{0}' 是 F# 例外狀況宣告的表示,但其表示是私用的。您必須指定 BindingFlags.NonPublic,才能存取私用類型表示。 + + + + The type '{0}' is an F# record type but its representation is private. You must specify BindingFlags.NonPublic to access private type representations. + 類型 '{0}' 是 F# 記錄類型,但其表示是私用的。您必須指定 BindingFlags.NonPublic,才能存取私用類型表示。 + + + + The type '{0}' is an F# union type but its representation is private. You must specify BindingFlags.NonPublic to access private type representations. + 型別 '{0}' 是 F# 等位型別,但其表示為私用。您必須指定 BindingFlags.NonPublic,才能存取私用型別表示。 + + + + Expected exactly one type argument. + 只能有一個型別引數。 + + + + Expected exactly two type arguments. + 只能有兩個類型引數。 + + + + Not a valid F# union case index. + 不是有效的 F# 聯集索引。 + + + + Type '{0}' did not have an F# record field named '{1}'. + 類型 '{0}' 沒有名為 '{1}' 的 F# 記錄欄位。 + + + + Type '{0}' did not have an F# union case named '{1}'. + 類型 '{0}' 沒有名為 '{1}' 的 F# 聯集。 + + + + Type mismatch when building '{0}': the type of the field was incorrect. Expected '{1}', but received type '{2}'. + 建置 '{0}' 時發生類型不符的情況: 欄位類型不正確。必須是 '{1}',但卻收到類型 '{2}'。 + + + + Type mismatch when building '{0}': body must return unit. Expected '{1}', but received type '{2}'. + 建置 '{0}' 時發生類型不符的情況: 主體必須傳回單位。必須是 '{1}',但卻收到類型 '{2}'。 + + + + Type mismatch when building '{0}': condition expression must be of type bool. Expected '{1}', but received type '{2}'. + 建置 '{0}' 時發生類型不符的情況: 條件運算式的類型必須是布林。必須是 '{1}',但卻收到類型 '{2}'。 + + + + Type mismatch when building '{0}': expected function type in function application or let binding. Expected '{1}', but received type '{2}'. + 建置 '{0}' 時發生類型不符的情況: 必須是函式應用程式或 let 繫結中的函式類型。必須是 '{1}',但卻收到類型 '{2}'。 + + + + Type mismatch when building '{0}': expression doesn't match the tuple type. Expected '{1}', but received type '{2}'. + 建置 '{0}' 時發生型別不符的情況: 運算式與元組型別不相符。必須是 '{1}',但卻收到型別 '{2}'。 + + + + Type mismatch when building '{0}': types of expression does not match. Expected '{1}', but received type '{2}'. + 建置 '{0}' 時發生類型不符的情況: 運算式的類型不相符。必須是 '{1}',但卻收到類型 '{2}'。 + + + + Type mismatch when building '{0}': function argument type doesn't match. Expected '{1}', but received type '{2}'. + 建置 '{0}' 時發生類型不符的情況: 函式引數類型不相符。必須是 '{1}',但卻收到類型 '{2}'。 + + + + Type mismatch when building '{0}': guard must return boolean. Expected '{1}', but received type '{2}'. + 建置 '{0}' 時發生類型不符的情況: 成立條件必須傳回布林值。必須是 '{1}',但卻收到類型 '{2}'。 + + + + Type mismatch when building '{0}': incorrect argument type for an F# record. Expected '{1}', but received type '{2}'. + 建置 '{0}' 時發生類型不符的情況: F# 記錄的引數類型不正確。必須是 '{1}',但卻收到類型 '{2}'。 + + + + Type mismatch when building '{0}': incorrect argument type for an F# union. Expected '{1}', but received type '{2}'. + 建置 '{0}' 時發生類型不符的情況: F# 聯集的引數類型不正確。必須是 '{1}',但卻收到類型 '{2}'。 + + + + Type mismatch when building '{0}': initializer doesn't match array type. Expected '{1}', but received type '{2}'. + 建置 '{0}' 時發生類型不符的情況: 初始設定式與陣列類型不相符。必須是 '{1}',但卻收到類型 '{2}'。 + + + + Type mismatch when building '{0}': invalid parameter for a method or indexer property. Expected '{1}', but received type '{2}'. + 建置 '{0}' 時發生類型不符的情況: 方法或索引子屬性的參數無效。必須是 '{1}',但卻收到類型 '{2}'。 + + + + Type mismatch when building '{0}': body of the for loop must be lambda taking integer as an argument. Expected '{1}', but received type '{2}'. + 建置 '{0}' 時發生類型不符的情況: 迴圈主體必須是可接受整數當做引數的 Lambda。必須是 '{1}',但卻收到類型 '{2}'。 + + + + Type mismatch when building '{0}': lower and upper bounds must be integers. Expected '{1}', but received type '{2}'. + 建置 '{0}' 時發生類型不符的情況: 上下限必須是整數。必須是 '{1}',但卻收到類型 '{2}'。 + + + + Type mismatch when building '{0}': types of true and false branches differ. Expected '{1}', but received type '{2}'. + 建置 '{0}' 時發生類型不符的情況: true 和 false 分支的類型不相同。必須是 '{1}',但卻收到類型 '{2}'。 + + + + Type mismatch when building '{0}': mismatched type of argument and tuple element. Expected '{1}', but received type '{2}'. + 建置 '{0}' 時發生型別不符的情況: 引數和元組項目的型別不相符。必須是 '{1}',但卻收到型別 '{2}'。 + + + + Type mismatch when building '{0}': the variable type doesn't match the type of the right-hand-side of a let binding. Expected '{1}', but received type '{2}'. + 建置 '{0}' 時發生類型不符的情況: 變數類型與 let 繫結右手邊的類型不相符。必須是 '{1}',但卻收到類型 '{2}'。 + + + + Unexpected quotation hole in expression. + 運算式中有未預期的引號漏洞。 + + + + The parameter is not a recognized method name. + 這個參數不是可辨識的方法名稱。 + + + + Reset is not supported on this enumerator. + 此列舉程式不支援重設動作。 + + + + The start of a range cannot be NaN. + 範圍開頭不能是 NaN。 + + + + The step of a range cannot be NaN. + 範圍步驟不能是 NaN。 + + + + The step of a range cannot be zero. + 範圍步驟不能為零。 + + + + The System.Threading.SynchronizationContext.Current of the calling thread is null. + 呼叫執行緒的 System.Threading.SynchronizationContext.Current 為 null。 + + + + The tuple index '{1}' was out of range for tuple type '{0}'. + 元組索引 '{1}' 超出元組型別 '{0}' 的範圍。 + + + + Failed to bind constructor + 無法繫結建構函式 + + + + Failed to bind field '{0}' + 無法繫結欄位 '{0}' + + + + Failed to bind property '{0}' + 無法繫結屬性 '{0}' + + + + Failed to bind type '{0}' in assembly '{1}' + 無法繫結組件 '{1}' 中的類型 '{0}' + + + + Incompatible record length + 不完整的記錄長度 + + + + Incorrect instance type + 不正確的執行個體類型 + + + + Incorrect number of arguments + 不正確的引數數目 + + + + Incorrect type + 不正確的類型 + + + + Invalid function type + 無效的函式類型 + + + + The member is non-static (instance), but no receiver object was supplied + 成員為非靜態 (執行個體),但未提供任何接收者物件 + + + + Parent type cannot be null + 父類型不能為 null + + + + Reading a set-only property + 讀取 set-only 屬性 + + + + Receiver object was unexpected, as member is static + 不應有接收者物件,因為成員為靜態 + + + + Type mismatch when building '{0}': the expression has the wrong type. Expected '{1}', but received type '{2}'. + 建置 '{0}' 時發生類型不符的情況: 運算式的類型錯誤。必須是 '{1}',但卻收到類型 '{2}'。 + + + + Type mismatch when building '{0}': function type doesn't match delegate type. Expected '{1}', but received type '{2}'. + 建置 '{0}' 時發生類型不符的情況: 函式類型與委派類型不相符。必須是 '{1}',但卻收到類型 '{2}'。 + + + + Type mismatch when splicing expression into quotation literal. The type of the expression tree being inserted doesn't match the type expected by the splicing operation. Expected '{0}', but received type '{1}'. Consider type-annotating with the expected expression type, e.g., (%% x : {0}) or (%x : {0}). + 將運算式接合成引號常值時發生類型不符的情況。所插入運算式樹狀結構的類型不符合接合運算預期的類型。必須是 '{0}',但卻收到類型 '{1}'。請考慮以預期的運算式類型標註類型,例如 (%% x : {0}) 或 (%x : {0})。 + + + + Tuple access out of range + 元組存取超出範圍 + + + + The tuple lengths are different + 元組長度不相同 + + + + F# union type requires different number of arguments + F# 等位型別需要不同的引數數目 + + + + Writing a get-only property + 寫入 get-only 屬性 + + + + The method '{0}' expects {1} type arguments but {2} were provided + 方法 '{0}' 需要 {1} 型別引數,但提供的是 {2} + + + + An index satisfying the predicate was not found in the collection. + 在集合中找不到符合述詞的索引。 + + + + The constructor method '{0}' for the union case could not be found + 找不到聯集的建構函式方法 '{0}' + + + + first class uses of '%' or '%%' are not permitted + 不允許優先使用 '%' 或 '%%' + + + + MoveNext not called, or finished + MoveNext 未呼叫或完成 + + + + Multiple CompilationMappingAttributes, expected at most one + 多個 CompilationMappingAttributes,但最多只允許一個 + + + + Bad float value + 不正確的浮點值 + + + + Bad format specifier:{0} + 不正確的格式規範: {0} + + + + Bad integer supplied to dynamic formatter + 提供給動態格式子的整數錯誤 + + + + Expected a precision argument + 必須是精確度引數 + + + + Expected a width argument + 必須是寬度引數 + + + + The # formatting modifier is invalid in F# + # 格式修飾詞在 F# 中無效 + + + + Missing format specifier + 遺漏格式修飾詞 + + + + Not a function type + 不是函式類型 + + + + Bad format specifier (precision) + 不正確的格式修飾詞 (精確度) + + + + Bad format specifier (after {0}) + 不正確的格式修飾詞 (在 {0} 之後) + + + + Bad format specifier (width) + 不正確的格式規範 (寬度) + + + + Could not bind function {0} in type {1} + 無法繫結類型 {1} 中的函式 {0} + + + + Could not bind property {0} in type {1} + 無法繫結類型 {1} 中的屬性 {0} + + + + Could not bind to method + 無法繫結至方法 + + + + Cannot take the address of this quotation + 無法取得此引號的位址 + + + + Failed to bind assembly '{0}' while processing quotation data + 處理引號資料時無法繫結到組件 '{0}' + + + + ill formed expression: AppOp or LetOp + 格式不正確的運算式: AppOp 或 LetOp + + + + type argument out of range + 型別引數超出範圍 + + + + This value cannot be mutated + 不能變更這個值 + + + + The option value was None + 選項值為 None + + + + A continuation provided by Async.FromContinuations was invoked multiple times + Async.FromContinuations 提供的接續部分已被多次叫用。 + + + + The record type '{0}' is invalid. Required constructor is not defined. + 記錄類型 '{0}' 無效。未定義必要的建構函式。 + + + + The tuple type '{0}' is invalid. Required constructor is not defined. + 元組型別 '{0}' 無效。未定義必要的建構函式。 + + + + The input sequence contains more than one element. + 輸入序列包含一個以上的項目。 + + + + 'thenBy' and 'thenByDescending' may only be used with an ordered input + 'thenBy' 和 'thenByDescending' 只能搭配已排序的輸入一起使用 + + + + Unrecognized use of a 'sumBy' or 'averageBy' operator in a query. In queries whose original data is of static type IQueryable, these operators may only be used with result type int32, int64, single, double or decimal + 查詢中無法辨認的 'sumBy' 或 'averageBy' 運算子使用方式。在原始資料屬於靜態類型 IQueryable 的查詢中,這些運算子只能搭配結果類型 int32、int64、single、double 或 decimal 一起使用 + + + + An if/then/else conditional or pattern matching expression with multiple branches is not permitted in a query. An if/then/else conditional may be used. + 不允許在查詢中使用具有多個分支的 if/then/else 條件式或模式比對運算式。您可以使用 if/then/else 條件式。 + + + + This is not a valid query expression. The following construct was used in a query but is not recognized by the F#-to-LINQ query translator:\n{0}\nCheck the specification of permitted queries and consider moving some of the operations out of the query expression. + 這不是有效的查詢運算式。查詢中使用了下列建構,但 F#-to-LINQ 查詢翻譯工具無法加以辨認:\n{0}\n請檢查所允許之查詢的規格,並考慮將一些運算移出查詢運算式。 + + + + This is not a valid query expression. The method '{0}' was used in a query but is not recognized by the F#-to-LINQ query translator. Check the specification of permitted queries and consider moving some of the operations out of the query expression + 這不是有效的查詢運算式。查詢中使用了方法 '{0}',但 F#-to-LINQ 查詢翻譯工具無法加以辨認。請檢查所允許之查詢的規格,並考慮將一些運算移出查詢運算式 + + + + This is not a valid query expression. The property '{0}' was used in a query but is not recognized by the F#-to-LINQ query translator. Check the specification of permitted queries and consider moving some of the operations out of the query expression. + 這不是有效的查詢運算式。查詢中使用了屬性 '{0}',但 F#-to-LINQ 查詢翻譯工具無法加以辨認。請檢查所允許之查詢的規格,並考慮將一些運算移出查詢運算式。 + + + + This is not a valid query expression. The construct '{0}' was used in a query but is not recognized by the F#-to-LINQ query translator. Check the specification of permitted queries and consider moving some of the operations out of the query expression. + 這不是有效的查詢運算式。查詢中使用了建構 '{0}',但 F#-to-LINQ 查詢翻譯工具無法加以辨認。請檢查所允許之查詢的規格,並考慮將一些運算移出查詢運算式。 + + + + + \ No newline at end of file diff --git a/src/fsharp/FindUnsolved.fs b/src/fsharp/FindUnsolved.fs index 484c9af1024..e78e41212dd 100644 --- a/src/fsharp/FindUnsolved.fs +++ b/src/fsharp/FindUnsolved.fs @@ -6,8 +6,6 @@ module internal Microsoft.FSharp.Compiler.FindUnsolved -open Internal.Utilities - open Microsoft.FSharp.Compiler open Microsoft.FSharp.Compiler.AbstractIL.Internal open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library @@ -52,8 +50,8 @@ let rec accExpr (cenv:cenv) (env:env) expr = | Expr.Quote(ast,_,_,_m,ty) -> accExpr cenv env ast accTy cenv env ty - | Expr.Obj (_,typ,basev,basecall,overrides,iimpls,_m) -> - accTy cenv env typ + | Expr.Obj (_,ty,basev,basecall,overrides,iimpls,_m) -> + accTy cenv env ty accExpr cenv env basecall accMethods cenv env basev overrides accIntfImpls cenv env basev iimpls @@ -72,7 +70,7 @@ let rec accExpr (cenv:cenv) (env:env) expr = | Expr.TyLambda(_,tps,_body,_m,rty) -> let topValInfo = ValReprInfo (ValReprInfo.InferTyparInfo tps,[],ValReprInfo.unnamedRetVal) accTy cenv env rty - let ty = tryMkForallTy tps rty + let ty = mkForallTyIfNeeded tps rty accLambdas cenv env topValInfo expr ty | Expr.TyChoose(_tps,e1,_m) -> accExpr cenv env e1 @@ -220,7 +218,7 @@ let accTycons cenv env tycons = List.iter (accTycon cenv env) tycons let rec accModuleOrNamespaceExpr cenv env x = match x with - | ModuleOrNamespaceExprWithSig(_mty,def,_m) -> accModuleOrNamespaceDef cenv env def + | ModuleOrNamespaceExprWithSig(_mty, def, _m) -> accModuleOrNamespaceDef cenv env def and accModuleOrNamespaceDefs cenv env x = List.iter (accModuleOrNamespaceDef cenv env) x diff --git a/src/fsharp/Fsc-proto/Fsc-proto.fsproj b/src/fsharp/Fsc-proto/Fsc-proto.fsproj index fd3d209e512..5cccf4f17a2 100644 --- a/src/fsharp/Fsc-proto/Fsc-proto.fsproj +++ b/src/fsharp/Fsc-proto/Fsc-proto.fsproj @@ -10,10 +10,8 @@ x86 Exe $(NoWarn);62 - fsc-proto + fsc NO_EXTENSIONTYPING;$(DefineConstants) - BUILDING_PROTO;$(DefineConstants) - BUILDING_WITH_LKG;$(DefineConstants) COMPILER;$(DefineConstants) $(NoWarn);35;44;62;9;60;86;47;1203 LKG @@ -51,6 +49,12 @@ --module Microsoft.FSharp.Compiler.AbstractIL.Internal.AsciiParser --open Microsoft.FSharp.Compiler.AbstractIL --internal --lexlib Internal.Utilities.Text.Lexing --parslib Internal.Utilities.Text.Parsing ilpars.fsy + + Logger.fsi + + + Logger.fs + Reflection\reshapedreflection.fs @@ -438,7 +442,10 @@ fsc.fs - + + Service/SimulatedMSBuildReferenceResolver.fs + + MSBuildReferenceResolver.fs @@ -453,38 +460,38 @@ - - $(FSharpSourcesRoot)\..\packages\Microsoft.DiaSymReader.PortablePdb.1.2.0\lib\portable-net45+win8\Microsoft.DiaSymReader.PortablePdb.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.DiaSymReader.1.1.0\lib\portable-net45+win8\Microsoft.DiaSymReader.dll - - $(FSharpSourcesRoot)\..\packages\System.Reflection.Metadata.1.4.2\lib\portable-net45+win8\System.Reflection.Metadata.dll + $(FSharpSourcesRoot)\..\packages\System.Reflection.Metadata.$(SystemReflectionMetadataPackageVersion)\lib\portable-net45+win8\System.Reflection.Metadata.dll - $(FSharpSourcesRoot)\..\packages\System.Collections.Immutable.$(SystemCollectionsImmutableVersion)\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll + $(FSharpSourcesRoot)\..\packages\System.Collections.Immutable.$(SystemCollectionsImmutablePackageVersion)\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll - $(FSharpSourcesRoot)\..\packages\System.ValueTuple.4.3.1\lib\netstandard1.0\System.ValueTuple.dll + $(FSharpSourcesRoot)\..\packages\System.ValueTuple.$(SystemValueTuplePackageVersion)\lib\netstandard1.0\System.ValueTuple.dll {DED3BBD7-53F4-428A-8C9F-27968E768605} FSharp.Core - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualFSharp.Msbuild.15.0.1.0.1\lib\net45\Microsoft.Build.Framework.dll + + + $(FSharpSourcesRoot)\..\packages\Microsoft.Build.Framework.$(MicrosoftBuildFrameworkPackageVersion)\lib\net46\Microsoft.Build.Framework.dll + + + $(FSharpSourcesRoot)\..\packages\Microsoft.Build.$(MicrosoftBuildPackageVersion)\lib\net46\Microsoft.Build.dll + + + $(FSharpSourcesRoot)\..\packages\Microsoft.Build.Utilities.Core.$(MicrosoftBuildUtilitiesCorePackageVersion)\lib\net46\Microsoft.Build.Utilities.Core.dll - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualFSharp.Msbuild.15.0.1.0.1\lib\net45\Microsoft.Build.dll + + $(FSharpSourcesRoot)\..\packages\Microsoft.Build.Tasks.Core.$(MicrosoftBuildTasksCorePackageVersion)\lib\net46\Microsoft.Build.Tasks.Core.dll - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualFSharp.Msbuild.15.0.1.0.1\lib\net45\Microsoft.Build.Utilities.Core.dll + + $(FSharpSourcesRoot)\..\packages\Microsoft.Build.Tasks.Core.$(MicrosoftBuildTasksCorePackageVersion)\lib\net46\Microsoft.Build.Tasks.Core.dll - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualFSharp.Msbuild.15.0.1.0.1\lib\net45\Microsoft.Build.Tasks.Core.dll + + $(FSharpSourcesRoot)\..\packages\System.IO.Compression.$(SystemIoCompressionPackageVersion)\lib\net46\System.IO.Compression.dll diff --git a/src/fsharp/Fsc-proto/app.config b/src/fsharp/Fsc-proto/app.config index 46b5e39962b..be4549ea2d2 100644 --- a/src/fsharp/Fsc-proto/app.config +++ b/src/fsharp/Fsc-proto/app.config @@ -4,7 +4,7 @@ - + diff --git a/src/fsharp/Fsc/Fsc.fsproj b/src/fsharp/Fsc/Fsc.fsproj index 127f1c4753a..aa6c8eed8fb 100644 --- a/src/fsharp/Fsc/Fsc.fsproj +++ b/src/fsharp/Fsc/Fsc.fsproj @@ -4,6 +4,9 @@ $(MSBuildProjectDirectory)\..\.. + FSharp + true + true @@ -18,27 +21,16 @@ Exe $(NoWarn);62 fsc - COMPILER;$(DefineConstants) true + true $(OtherFlags) --warnon:1182 - - - $(FSharpSourcesRoot)\..\loc\lcl\{Lang}\$(AssemblyName).exe.lcl - $(FSharpSourcesRoot)\..\loc\lci\$(AssemblyName).exe.lci - false - false - - - + - - Resources/assemblyinfo.fsc.exe.fs - fscmain.fs @@ -70,15 +62,4 @@ - - - - - - Microsoft - StrongName - - - - diff --git a/src/fsharp/Fsc/InternalsVisibleTo.fs b/src/fsharp/Fsc/InternalsVisibleTo.fs index bd9b7f3d57c..f8491475163 100644 --- a/src/fsharp/Fsc/InternalsVisibleTo.fs +++ b/src/fsharp/Fsc/InternalsVisibleTo.fs @@ -2,7 +2,7 @@ namespace Microsoft.FSharp open System.Reflection -[] +[] do() diff --git a/src/fsharp/Fsc/app.config b/src/fsharp/Fsc/app.config index 493b8a72763..80d85763659 100644 --- a/src/fsharp/Fsc/app.config +++ b/src/fsharp/Fsc/app.config @@ -6,11 +6,11 @@ - + - + diff --git a/src/fsharp/Fsc/project.json b/src/fsharp/Fsc/project.json index 9c96ba5a003..09458a531ee 100644 --- a/src/fsharp/Fsc/project.json +++ b/src/fsharp/Fsc/project.json @@ -3,7 +3,7 @@ "Microsoft.NETCore.Platforms": "1.1.0", "NETStandard.Library": "1.6.1", "System.Linq.Expressions": "4.3.0", - "System.Reflection.Metadata": "1.4.2", + "System.Reflection.Metadata": "1.6.0", "System.Runtime.Loader": "4.3.0" }, "runtimes": { diff --git a/src/fsharp/IlxGen.fs b/src/fsharp/IlxGen.fs index e0311b39529..d115154a756 100644 --- a/src/fsharp/IlxGen.fs +++ b/src/fsharp/IlxGen.fs @@ -7,40 +7,39 @@ module internal Microsoft.FSharp.Compiler.IlxGen open System.IO +open System.Reflection open System.Collections.Generic + open Internal.Utilities open Internal.Utilities.Collections + open Microsoft.FSharp.Compiler.AbstractIL open Microsoft.FSharp.Compiler.AbstractIL.IL open Microsoft.FSharp.Compiler.AbstractIL.Internal open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library open Microsoft.FSharp.Compiler.AbstractIL.Extensions.ILX open Microsoft.FSharp.Compiler.AbstractIL.Extensions.ILX.Types -open Microsoft.FSharp.Compiler.AbstractIL.Diagnostics open Microsoft.FSharp.Compiler.AbstractIL.Internal.BinaryConstants open Microsoft.FSharp.Compiler +open Microsoft.FSharp.Compiler.AttributeChecking +open Microsoft.FSharp.Compiler.Ast +open Microsoft.FSharp.Compiler.ErrorLogger +open Microsoft.FSharp.Compiler.Infos open Microsoft.FSharp.Compiler.Import +open Microsoft.FSharp.Compiler.Layout +open Microsoft.FSharp.Compiler.Lib +open Microsoft.FSharp.Compiler.PrettyNaming +open Microsoft.FSharp.Compiler.Range open Microsoft.FSharp.Compiler.Tast open Microsoft.FSharp.Compiler.Tastops open Microsoft.FSharp.Compiler.Tastops.DebugPrint -open Microsoft.FSharp.Compiler.Range -open Microsoft.FSharp.Compiler.Ast -open Microsoft.FSharp.Compiler.ErrorLogger -open Microsoft.FSharp.Compiler.PrettyNaming open Microsoft.FSharp.Compiler.TcGlobals -open Microsoft.FSharp.Compiler.Layout -open Microsoft.FSharp.Compiler.Lib open Microsoft.FSharp.Compiler.TypeRelations -open Microsoft.FSharp.Compiler.TypeChecker -open Microsoft.FSharp.Compiler.Infos -open Microsoft.FSharp.Compiler.AbstractIL.Extensions.ILX.Types - let IsNonErasedTypar (tp:Typar) = not tp.IsErased let DropErasedTypars (tps:Typar list) = tps |> List.filter IsNonErasedTypar -let DropErasedTyargs tys = tys |> List.filter (fun ty -> match ty with TType_measure _ -> false | _ -> true) -let AddSpecialNameFlag (mdef:ILMethodDef) = { mdef with IsSpecialName = true } +let DropErasedTyargs tys = tys |> List.filter (fun ty -> match ty with TType_measure _ -> false | _ -> true) let AddNonUserCompilerGeneratedAttribs (g: TcGlobals) (mdef:ILMethodDef) = g.AddMethodGeneratedAttributes mdef @@ -66,7 +65,7 @@ let mkLdfldMethodDef (ilMethName,reprAccess,isStatic,ilTy,ilFieldName,ilPropType mkILNonGenericStaticMethod (ilMethName,reprAccess,[],ilReturn,mkMethodBody(true,[],2,nonBranchingInstrsToCode [mkNormalLdsfld ilFieldSpec],None)) else mkILNonGenericInstanceMethod (ilMethName,reprAccess,[],ilReturn,mkMethodBody (true,[],2,nonBranchingInstrsToCode [ mkLdarg0; mkNormalLdfld ilFieldSpec],None)) - ilMethodDef |> AddSpecialNameFlag + ilMethodDef.WithSpecialName let ChooseParamNames fieldNamesAndTypes = let takenFieldNames = fieldNamesAndTypes |> List.map p23 |> Set.ofList @@ -194,8 +193,8 @@ type cenv = let mkTypeOfExpr cenv m ilty = mkAsmExpr ([ mkNormalCall (mspec_Type_GetTypeFromHandle cenv.g) ], [], - [mkAsmExpr ([ I_ldtoken (ILToken.ILType ilty) ], [],[],[cenv.g.system_RuntimeTypeHandle_typ],m)], - [cenv.g.system_Type_typ],m) + [mkAsmExpr ([ I_ldtoken (ILToken.ILType ilty) ], [],[],[cenv.g.system_RuntimeTypeHandle_ty],m)], + [cenv.g.system_Type_ty],m) let mkGetNameExpr cenv (ilt : ILType) m = mkAsmExpr ([I_ldstr ilt.BasicQualifiedName],[],[],[cenv.g.string_ty],m) @@ -364,14 +363,30 @@ let voidCheck m g permits ty = error(InternalError("System.Void unexpectedly detected in IL code generation. This should not occur.",m)) #endif -// When generating parameter and return types generate precise .NET IL pointer types -// These can't be generated for generic instantiations, since .NET generics doesn't -// permit this. But for 'naked' values (locals, parameters, return values etc.) machine -// integer values and native pointer values are compatible (though the code is unverifiable). +/// When generating parameter and return types generate precise .NET IL pointer types. +/// These can't be generated for generic instantiations, since .NET generics doesn't +/// permit this. But for 'naked' values (locals, parameters, return values etc.) machine +/// integer values and native pointer values are compatible (though the code is unverifiable). type PtrsOK = | PtrTypesOK | PtrTypesNotOK +let GenReadOnlyAttributeIfNecessary (g: TcGlobals) ty = + let add = isInByrefTy g ty && g.attrib_IsReadOnlyAttribute.TyconRef.CanDeref + if add then + let attr = mkILCustomAttribute g.ilg (g.attrib_IsReadOnlyAttribute.TypeRef, [], [], []) + Some attr + else + None + +/// Generate "modreq([mscorlib]System.Runtime.InteropServices.InAttribute)" on inref types. +let GenReadOnlyModReqIfNecessary (g: TcGlobals) ty ilTy = + let add = isInByrefTy g ty && g.attrib_InAttribute.TyconRef.CanDeref + if add then + ILType.Modified(true, g.attrib_InAttribute.TypeRef, ilTy) + else + ilTy + let rec GenTypeArgAux amap m tyenv tyarg = GenTypeAux amap m tyenv VoidNotOK PtrTypesNotOK tyarg @@ -396,6 +411,7 @@ and GenTyAppAux amap m tyenv repr tinst = and GenNamedTyAppAux (amap:ImportMap) m tyenv ptrsOK tcref tinst = let g = amap.g let tinst = DropErasedTyargs tinst + // See above note on ptrsOK if ptrsOK = PtrTypesOK && tyconRefEq g tcref g.nativeptr_tcr && (freeInTypes CollectTypars tinst).FreeTypars.IsEmpty then GenNamedTyAppAux amap m tyenv ptrsOK g.ilsigptr_tcr tinst @@ -418,7 +434,10 @@ and GenTypeAux amap m (tyenv: TypeReprEnv) voidOK ptrsOK ty = #endif match stripTyEqnsAndMeasureEqns g ty with | TType_app (tcref, tinst) -> GenNamedTyAppAux amap m tyenv ptrsOK tcref tinst + + | TType_tuple (tupInfo, args) -> GenTypeAux amap m tyenv VoidNotOK ptrsOK (mkCompiledTupleTy g (evalTupInfoIsStruct tupInfo) args) + | TType_fun (dty, returnTy) -> EraseClosures.mkILFuncTy g.ilxPubCloEnv (GenTypeArgAux amap m tyenv dty) (GenTypeArgAux amap m tyenv returnTy) | TType_ucase (ucref, args) -> @@ -429,21 +448,22 @@ and GenTypeAux amap m (tyenv: TypeReprEnv) voidOK ptrsOK ty = let tps = DropErasedTypars tps if tps.IsEmpty then GenTypeAux amap m tyenv VoidNotOK ptrsOK tau else EraseClosures.mkILTyFuncTy g.ilxPubCloEnv + | TType_var tp -> mkILTyvarTy tyenv.[tp,m] + | TType_measure _ -> g.ilg.typ_Int32 //-------------------------------------------------------------------------- // Generate ILX references to closures, classunions etc. given a tyenv //-------------------------------------------------------------------------- -and GenUnionCaseRef (amap: ImportMap) m tyenv i (fspecs:RecdField array) = +and GenUnionCaseRef (amap: ImportMap) m tyenv i (fspecs:RecdField[]) = let g = amap.g fspecs |> Array.mapi (fun j fspec -> let ilFieldDef = IL.mkILInstanceField(fspec.Name,GenType amap m tyenv fspec.FormalType, None, ILMemberAccess.Public) + // These properties on the "field" of an alternative end up going on a property generated by cu_erase.fs IlxUnionField - { ilFieldDef with - // These properties on the "field" of an alternative end up going on a property generated by cu_erase.fs - CustomAttrs = mkILCustomAttrs [(mkCompilationMappingAttrWithVariantNumAndSeqNum g (int SourceConstructFlags.Field) i j )] } ) + (ilFieldDef.With(customAttrs = mkILCustomAttrs [(mkCompilationMappingAttrWithVariantNumAndSeqNum g (int SourceConstructFlags.Field) i j )]))) and GenUnionRef (amap: ImportMap) m (tcref: TyconRef) = @@ -451,8 +471,8 @@ and GenUnionRef (amap: ImportMap) m (tcref: TyconRef) = let tycon = tcref.Deref assert(not tycon.IsTypeAbbrev) match tycon.UnionTypeInfo with - | None -> failwith "GenUnionRef m" - | Some funion -> + | ValueNone -> failwith "GenUnionRef m" + | ValueSome funion -> cached funion.CompiledRepresentation (fun () -> let tyenvinner = TypeReprEnv.ForTycon tycon match tcref.CompiledRepresentation with @@ -506,13 +526,19 @@ and GenNamedTyApp amap m tyenv tcref tinst = GenNamedTyAppAux amap m tyenv PtrTy and GenReturnType amap m tyenv returnTyOpt = match returnTyOpt with | None -> ILType.Void - | Some returnTy -> GenTypeAux amap m tyenv VoidNotOK(*1*) PtrTypesOK returnTy (*1: generate void from unit, but not accept void *) - -and GenParamType amap m tyenv ty = - ty |> GenTypeAux amap m tyenv VoidNotOK PtrTypesOK + | Some returnTy -> + let ilTy = GenTypeAux amap m tyenv VoidNotOK(*1*) PtrTypesOK returnTy (*1: generate void from unit, but not accept void *) + GenReadOnlyModReqIfNecessary amap.g returnTy ilTy + +and GenParamType amap m tyenv isSlotSig ty = + let ilTy = GenTypeAux amap m tyenv VoidNotOK PtrTypesOK ty + if isSlotSig then + GenReadOnlyModReqIfNecessary amap.g ty ilTy + else + ilTy -and GenParamTypes amap m tyenv tys = - tys |> List.map (GenTypeAux amap m tyenv VoidNotOK PtrTypesOK) +and GenParamTypes amap m tyenv isSlotSig tys = + tys |> List.map (GenParamType amap m tyenv isSlotSig) and GenTypeArgs amap m tyenv tyargs = GenTypeArgsAux amap m tyenv tyargs @@ -609,14 +635,14 @@ type ValStorage = | StaticProperty of ILMethodSpec * OptionalShadowLocal /// Indicates the value is "stored" as a IL static method (in a "main" class for a F# /// compilation unit, or as a member) according to its inferred or specified arity. - | Method of ValReprInfo * ValRef * ILMethodSpec * Range.range * ArgReprInfo list * ArgReprInfo + | Method of ValReprInfo * ValRef * ILMethodSpec * Range.range * ArgReprInfo list * TType list * ArgReprInfo /// Indicates the value is stored at the given position in the closure environment accessed via "ldarg 0" | Env of ILType * int * ILFieldSpec * NamedLocalIlxClosureInfo ref option /// Indicates that the value is an argument of a method being generated | Arg of int /// Indicates that the value is stored in local of the method being generated. NamedLocalIlxClosureInfo is normally empty. /// It is non-empty for 'local type functions', see comments on definition of NamedLocalIlxClosureInfo. - | Local of int * NamedLocalIlxClosureInfo ref option + | Local of idx: int * realloc: bool * NamedLocalIlxClosureInfo ref option and OptionalShadowLocal = | NoShadowLocal @@ -713,14 +739,14 @@ let AddStorageForVal (g: TcGlobals) (v,s) eenv = // Passing an empty remap is sufficient for FSharp.Core.dll because it turns out the remapped type signature can // still be resolved. match tryRescopeVal g.fslibCcu Remap.Empty v with - | None -> eenv - | Some vref -> + | ValueNone -> eenv + | ValueSome vref -> match vref.TryDeref with - | VNone -> + | ValueNone -> //let msg = sprintf "could not dereference external value reference to something in FSharp.Core.dll during code generation, v.MangledName = '%s', v.Range = %s" v.MangledName (stringOfRange v.Range) //System.Diagnostics.Debug.Assert(false, msg) eenv - | VSome gv -> + | ValueSome gv -> { eenv with valsInScope = eenv.valsInScope.Add gv s } else eenv @@ -767,17 +793,19 @@ let GetMethodSpecForMemberVal amap g (memberInfo:ValMemberInfo) (vref:ValRef) = let flatArgInfos = List.concat curriedArgInfos let isCtor = (memberInfo.MemberFlags.MemberKind = MemberKind.Constructor) let cctor = (memberInfo.MemberFlags.MemberKind = MemberKind.ClassConstructor) - let parentTcref = vref.TopValActualParent + let parentTcref = vref.TopValDeclaringEntity let parentTypars = parentTcref.TyparsNoRange let numParentTypars = parentTypars.Length if tps.Length < numParentTypars then error(InternalError("CodeGen check: type checking did not ensure that this method is sufficiently generic", m)) - let ctps,mtps = List.chop numParentTypars tps + let ctps,mtps = List.splitAt numParentTypars tps let isCompiledAsInstance = ValRefIsCompiledAsInstanceMember g vref let ilActualRetTy = let ilRetTy = GenReturnType amap m tyenvUnderTypars returnTy if isCtor || cctor then ILType.Void else ilRetTy + let ilTy = GenType amap m tyenvUnderTypars (mkAppTy parentTcref (List.map mkTyparTy ctps)) + if isCompiledAsInstance || isCtor then // Find the 'this' argument type if any let thisTy,flatArgInfos = @@ -789,8 +817,8 @@ let GetMethodSpecForMemberVal amap g (memberInfo:ValMemberInfo) (vref:ValRef) = let thisTy = if isByrefTy g thisTy then destByrefTy g thisTy else thisTy let thisArgTys = argsOfAppTy g thisTy - if ctps.Length <> thisArgTys.Length then - warning(InternalError(sprintf "CodeGen check: type checking did not quantify the correct number of type variables for this method, #parentTypars = %d, #ctps = %d, #mtps = %d, #thisArgTys = %d" numParentTypars ctps.Length mtps.Length thisArgTys.Length,m)) + if numParentTypars <> thisArgTys.Length then + warning(InternalError(sprintf "CodeGen check: type checking did not quantify the correct number of type variables for this method, #parentTypars = %d, #mtps = %d, #thisArgTys = %d" numParentTypars mtps.Length thisArgTys.Length,m)) else List.iter2 (fun gtp ty2 -> @@ -799,18 +827,19 @@ let GetMethodSpecForMemberVal amap g (memberInfo:ValMemberInfo) (vref:ValRef) = ctps thisArgTys let methodArgTys,paramInfos = List.unzip flatArgInfos - let ilMethodArgTys = GenParamTypes amap m tyenvUnderTypars methodArgTys + let isSlotSig = memberInfo.MemberFlags.IsDispatchSlot || memberInfo.MemberFlags.IsOverrideOrExplicitImpl + let ilMethodArgTys = GenParamTypes amap m tyenvUnderTypars isSlotSig methodArgTys let ilMethodInst = GenTypeArgs amap m tyenvUnderTypars (List.map mkTyparTy mtps) let mspec = mkILInstanceMethSpecInTy (ilTy,vref.CompiledName,ilMethodArgTys,ilActualRetTy,ilMethodInst) - mspec,ctps,mtps,paramInfos,retInfo + mspec,ctps,mtps,paramInfos,retInfo,methodArgTys else let methodArgTys,paramInfos = List.unzip flatArgInfos - let ilMethodArgTys = GenParamTypes amap m tyenvUnderTypars methodArgTys + let ilMethodArgTys = GenParamTypes amap m tyenvUnderTypars false methodArgTys let ilMethodInst = GenTypeArgs amap m tyenvUnderTypars (List.map mkTyparTy mtps) let mspec = mkILStaticMethSpecInTy (ilTy,vref.CompiledName,ilMethodArgTys,ilActualRetTy,ilMethodInst) - mspec,ctps,mtps,paramInfos,retInfo + mspec,ctps,mtps,paramInfos,retInfo,methodArgTys // Generate the ILFieldSpec for a top-level value @@ -865,8 +894,8 @@ let ComputeStorageForTopVal (amap, g, optIntraAssemblyInfo:IlxGenIntraAssemblyIn let nm = "get_"+nm let tyenvUnderTypars = TypeReprEnv.ForTypars [] let ilRetTy = GenType amap m tyenvUnderTypars vref.Type - let typ = mkILTyForCompLoc cloc - let mspec = mkILStaticMethSpecInTy (typ, nm, [], ilRetTy, []) + let ty = mkILTyForCompLoc cloc + let mspec = mkILStaticMethSpecInTy (ty, nm, [], ilRetTy, []) StaticProperty (mspec, optShadowLocal) else @@ -896,18 +925,18 @@ let ComputeStorageForTopVal (amap, g, optIntraAssemblyInfo:IlxGenIntraAssemblyIn | _ -> match vref.MemberInfo with | Some memberInfo when not vref.IsExtensionMember -> - let mspec,_,_,paramInfos,retInfo = GetMethodSpecForMemberVal amap g memberInfo vref - Method (topValInfo, vref, mspec, m, paramInfos, retInfo) + let mspec,_,_,paramInfos,retInfo,methodArgTys = GetMethodSpecForMemberVal amap g memberInfo vref + Method (topValInfo, vref, mspec, m, paramInfos, methodArgTys, retInfo) | _ -> let (tps, curriedArgInfos, returnTy, retInfo) = GetTopValTypeInCompiledForm g topValInfo vref.Type m let tyenvUnderTypars = TypeReprEnv.ForTypars tps let (methodArgTys,paramInfos) = curriedArgInfos |> List.concat |> List.unzip - let ilMethodArgTys = GenParamTypes amap m tyenvUnderTypars methodArgTys + let ilMethodArgTys = GenParamTypes amap m tyenvUnderTypars false methodArgTys let ilRetTy = GenReturnType amap m tyenvUnderTypars returnTy let ilLocTy = mkILTyForCompLoc cloc let ilMethodInst = GenTypeArgs amap m tyenvUnderTypars (List.map mkTyparTy tps) let mspec = mkILStaticMethSpecInTy (ilLocTy, nm, ilMethodArgTys, ilRetTy, ilMethodInst) - Method (topValInfo, vref, mspec, m, paramInfos, retInfo) + Method (topValInfo, vref, mspec, m, paramInfos, methodArgTys, retInfo) let ComputeAndAddStorageForLocalTopVal (amap, g, intraAssemblyFieldTable, isInteractive, optShadowLocal) cloc (v:Val) eenv = let storage = ComputeStorageForTopVal (amap, g, Some intraAssemblyFieldTable, isInteractive, optShadowLocal, mkLocalValRef v, cloc) @@ -973,7 +1002,7 @@ and AddBindingsForModuleDef allocVal cloc eenv x = allocVal cloc bind.Var eenv | TMDefDo _ -> eenv - | TMAbstract(ModuleOrNamespaceExprWithSig(mtyp,_,_)) -> + | TMAbstract(ModuleOrNamespaceExprWithSig(mtyp, _, _)) -> AddBindingsForLocalModuleType allocVal cloc eenv mtyp | TMDefs(mdefs) -> AddBindingsForModuleDefs allocVal cloc eenv mdefs @@ -1004,8 +1033,7 @@ let AddIncrementalLocalAssemblyFragmentToIlxGenEnv (amap:ImportMap, isIncrementa let cloc = { cloc with clocTopImplQualifiedName = qname.Text } if isIncrementalFragment then match mexpr with - | ModuleOrNamespaceExprWithSig(_,mdef,_) -> AddBindingsForModuleDef allocVal cloc eenv mdef - (* | ModuleOrNamespaceExprWithSig(mtyp,_,m) -> error(Error("don't expect inner defs to have a constraint",m)) *) + | ModuleOrNamespaceExprWithSig(_, mdef, _) -> AddBindingsForModuleDef allocVal cloc eenv mdef else AddBindingsForLocalModuleType allocVal cloc eenv mexpr.Type) @@ -1049,18 +1077,18 @@ let MergeOptions m o1 o2 = #endif Some x -let MergePropertyPair m (pd: ILPropertyDef) pdef = - {pd with GetMethod=MergeOptions m pd.GetMethod pdef.GetMethod - SetMethod=MergeOptions m pd.SetMethod pdef.SetMethod} +let MergePropertyPair m (pd: ILPropertyDef) (pdef: ILPropertyDef) = + pd.With(getMethod=MergeOptions m pd.GetMethod pdef.GetMethod, + setMethod=MergeOptions m pd.SetMethod pdef.SetMethod) type PropKey = PropKey of string * ILTypes * ILThisConvention let AddPropertyDefToHash (m:range) (ht:Dictionary) (pdef: ILPropertyDef) = let nm = PropKey(pdef.Name, pdef.Args, pdef.CallingConv) - if ht.ContainsKey nm then - let idx,pd = ht.[nm] + match ht.TryGetValue(nm) with + | true, (idx, pd) -> ht.[nm] <- (idx, MergePropertyPair m pd pdef) - else + | _ -> ht.[nm] <- (ht.Count, pdef) @@ -1075,7 +1103,7 @@ let MergePropertyDefs m ilPropertyDefs = //-------------------------------------------------------------------------- /// Information collected imperatively for each type definition -type TypeDefBuilder(tdef, tdefDiscards) = +type TypeDefBuilder(tdef: ILTypeDef, tdefDiscards) = let gmethods = new ResizeArray(0) let gfields = new ResizeArray(0) let gproperties : Dictionary = new Dictionary<_,_>(3,HashIdentity.Structural) @@ -1083,16 +1111,16 @@ type TypeDefBuilder(tdef, tdefDiscards) = let gnested = new TypeDefsBuilder() member b.Close() = - { tdef with - Methods = mkILMethods (tdef.Methods.AsList @ ResizeArray.toList gmethods) - Fields = mkILFields (tdef.Fields.AsList @ ResizeArray.toList gfields) - Properties = mkILProperties (tdef.Properties.AsList @ HashRangeSorted gproperties ) - Events = mkILEvents (tdef.Events.AsList @ ResizeArray.toList gevents) - NestedTypes = mkILTypeDefs (tdef.NestedTypes.AsList @ gnested.Close()) } - + tdef.With(methods = mkILMethods (tdef.Methods.AsList @ ResizeArray.toList gmethods), + fields = mkILFields (tdef.Fields.AsList @ ResizeArray.toList gfields), + properties = mkILProperties (tdef.Properties.AsList @ HashRangeSorted gproperties ), + events = mkILEvents (tdef.Events.AsList @ ResizeArray.toList gevents), + nestedTypes = mkILTypeDefs (tdef.NestedTypes.AsList @ gnested.Close())) member b.AddEventDef(edef) = gevents.Add edef + member b.AddFieldDef(ilFieldDef) = gfields.Add ilFieldDef + member b.AddMethodDef(ilMethodDef) = let discard = match tdefDiscards with @@ -1100,7 +1128,9 @@ type TypeDefBuilder(tdef, tdefDiscards) = | None -> false if not discard then gmethods.Add ilMethodDef + member b.NestedTypeDefs = gnested + member b.GetCurrentFields() = gfields |> Seq.readonly /// Merge Get and Set property nodes, which we generate independently for F# code @@ -1167,7 +1197,7 @@ type AssemblyBuilder(cenv:cenv) as mgbuf = let vtdef = mkRawDataValueTypeDef cenv.g.iltyp_ValueType (name,size,0us) let vtref = NestedTypeRefForCompLoc cloc vtdef.Name let vtspec = mkILTySpec(vtref,[]) - let vtdef = {vtdef with Access= ComputeTypeAccess vtref true} + let vtdef = vtdef.WithAccess(ComputeTypeAccess vtref true) mgbuf.AddTypeDef(vtref, vtdef, false, true, None) vtspec), keyComparer=HashIdentity.Structural) @@ -1187,7 +1217,7 @@ type AssemblyBuilder(cenv:cenv) as mgbuf = match explicitEntryPointInfo with | Some tref -> let IntializeCompiledScript(fspec,m) = - mgbuf.AddExplicitInitToSpecificMethodDef((fun md -> md.IsEntryPoint), tref, fspec, GenPossibleILSourceMarker cenv m, [], []) + mgbuf.AddExplicitInitToSpecificMethodDef((fun (md:ILMethodDef) -> md.IsEntryPoint), tref, fspec, GenPossibleILSourceMarker cenv m, [], []) scriptInitFspecs |> List.iter IntializeCompiledScript | None -> () @@ -1273,8 +1303,7 @@ let FeeFeeInstr (cenv:cenv) doc = type CodeGenBuffer(m:range, mgbuf: AssemblyBuilder, methodName, - alreadyUsedArgs:int, - alreadyUsedLocals:int) = + alreadyUsedArgs:int) = let locals = new ResizeArray<((string * (Mark * Mark)) list * ILType * bool)>(10) let codebuf = new ResizeArray(200) @@ -1293,10 +1322,9 @@ type CodeGenBuffer(m:range, let rec lab2pc n lbl = if n = System.Int32.MaxValue then error(InternalError("recursive label graph",m)) - if codeLabelToCodeLabel.ContainsKey lbl then - lab2pc (n+1) codeLabelToCodeLabel.[lbl] - else - codeLabelToPC.[lbl] + match codeLabelToCodeLabel.TryGetValue(lbl) with + | true, l -> lab2pc (n + 1) l + | _ -> codeLabelToPC.[lbl] let mutable lastSeqPoint = None @@ -1437,16 +1465,13 @@ type CodeGenBuffer(m:range, j member cgbuf.ReallocLocal(cond,ranges,ty,isFixed) = - let j = - match ResizeArray.tryFindIndexi cond locals with - | Some j -> - let (prevRanges,_,isFixed) = locals.[j] - locals.[j] <- ((ranges@prevRanges),ty,isFixed) - j - | None -> - cgbuf.AllocLocal(ranges,ty,isFixed) - let j = j + alreadyUsedLocals - j + match ResizeArray.tryFindIndexi cond locals with + | Some j -> + let (prevRanges,_,isFixed) = locals.[j] + locals.[j] <- ((ranges@prevRanges),ty,isFixed) + j, true + | None -> + cgbuf.AllocLocal(ranges,ty,isFixed), false member cgbuf.Close() = @@ -1502,10 +1527,10 @@ let GenConstArray cenv (cgbuf:CodeGenBuffer) eenv ilElementType (data:'a[]) (wri let ilFieldName = CompilerGeneratedName ("field" + string(newUnique())) let fty = ILType.Value vtspec let ilFieldDef = mkILStaticField (ilFieldName,fty, None, Some bytes, ILMemberAccess.Assembly) - let ilFieldDef = { ilFieldDef with CustomAttrs = mkILCustomAttrs [ cenv.g.DebuggerBrowsableNeverAttribute ] } + let ilFieldDef = ilFieldDef.With(customAttrs = mkILCustomAttrs [ cenv.g.DebuggerBrowsableNeverAttribute ]) let fspec = mkILFieldSpecInTy (mkILTyForCompLoc eenv.cloc,ilFieldName, fty) CountStaticFieldDef() - cgbuf.mgbuf.AddFieldDef(fspec.EnclosingTypeRef,ilFieldDef) + cgbuf.mgbuf.AddFieldDef(fspec.DeclaringTypeRef,ilFieldDef) CG.EmitInstrs cgbuf (pop 0) (Push [ ilArrayType; ilArrayType; cenv.g.iltyp_RuntimeFieldHandle ]) @@ -1552,8 +1577,8 @@ let discardAndReturnVoid = DiscardThen ReturnVoid // the bodies of methods in a couple of places //------------------------------------------------------------------------- -let CodeGenThen cenv mgbuf (entryPointInfo,methodName,eenv,alreadyUsedArgs,alreadyUsedLocals,codeGenFunction,m) = - let cgbuf = new CodeGenBuffer(m,mgbuf,methodName,alreadyUsedArgs,alreadyUsedLocals) +let CodeGenThen cenv mgbuf (entryPointInfo,methodName,eenv,alreadyUsedArgs,codeGenFunction,m) = + let cgbuf = new CodeGenBuffer(m,mgbuf,methodName,alreadyUsedArgs) let start = CG.GenerateMark cgbuf "mstart" let innerVals = entryPointInfo |> List.map (fun (v,kind) -> (v,(kind,start))) @@ -1596,10 +1621,10 @@ let CodeGenThen cenv mgbuf (entryPointInfo,methodName,eenv,alreadyUsedArgs,alrea localDebugSpecs, hasSequencePoints) -let CodeGenMethod cenv mgbuf (entryPointInfo,methodName,eenv,alreadyUsedArgs,alreadyUsedLocals,codeGenFunction,m) = +let CodeGenMethod cenv mgbuf (entryPointInfo,methodName,eenv,alreadyUsedArgs,codeGenFunction,m) = let locals,maxStack,lab2pc,instrs,exns,localDebugSpecs,hasSequencePoints = - CodeGenThen cenv mgbuf (entryPointInfo,methodName,eenv,alreadyUsedArgs,alreadyUsedLocals,codeGenFunction,m) + CodeGenThen cenv mgbuf (entryPointInfo,methodName,eenv,alreadyUsedArgs,codeGenFunction,m) let code = IL.buildILCode methodName lab2pc instrs exns localDebugSpecs @@ -1883,7 +1908,7 @@ let rec GenExpr (cenv:cenv) (cgbuf:CodeGenBuffer) eenv sp expr sequel = GenGetExnField cenv cgbuf eenv (e,ecref,n,m) sequel | TOp.UnionCaseFieldGet(ucref,n),[e],_ -> GenGetUnionCaseField cenv cgbuf eenv (e,ucref,tyargs,n,m) sequel - | TOp.UnionCaseFieldGetAddr(ucref,n),[e],_ -> + | TOp.UnionCaseFieldGetAddr(ucref,n,_readonly),[e],_ -> GenGetUnionCaseFieldAddr cenv cgbuf eenv (e,ucref,tyargs,n,m) sequel | TOp.UnionCaseTagGet ucref,[e],_ -> GenGetUnionCaseTag cenv cgbuf eenv (e,ucref,tyargs,m) sequel @@ -1897,9 +1922,9 @@ let rec GenExpr (cenv:cenv) (cgbuf:CodeGenBuffer) eenv sp expr sequel = GenGetRecdField cenv cgbuf eenv (e,f,tyargs,m) sequel | TOp.ValFieldGet f,[],_ -> GenGetStaticField cenv cgbuf eenv (f,tyargs,m) sequel - | TOp.ValFieldGetAddr f,[e],_ -> + | TOp.ValFieldGetAddr (f, _readonly),[e],_ -> GenGetRecdFieldAddr cenv cgbuf eenv (e,f,tyargs,m) sequel - | TOp.ValFieldGetAddr f,[],_ -> + | TOp.ValFieldGetAddr (f, _readonly),[],_ -> GenGetStaticFieldAddr cenv cgbuf eenv (f,tyargs,m) sequel | TOp.ValFieldSet f,[e1;e2],_ -> GenSetRecdField cenv cgbuf eenv (e1,f,tyargs,e2,m) sequel @@ -1919,14 +1944,14 @@ let rec GenExpr (cenv:cenv) (cgbuf:CodeGenBuffer) eenv sp expr sequel = GenTryCatch cenv cgbuf eenv (e1,vf,ef,vh,eh,m,resty,spTry,spWith) sequel | TOp.ILCall(virt,_,valu,newobj,valUseFlags,_,isDllImport,ilMethRef,enclArgTys,methArgTys,returnTys),args,[] -> GenILCall cenv cgbuf eenv (virt,valu,newobj,valUseFlags,isDllImport,ilMethRef,enclArgTys,methArgTys,args,returnTys,m) sequel - | TOp.RefAddrGet,[e],[ty] -> GenGetAddrOfRefCellField cenv cgbuf eenv (e,ty,m) sequel + | TOp.RefAddrGet _readonly,[e],[ty] -> GenGetAddrOfRefCellField cenv cgbuf eenv (e,ty,m) sequel | TOp.Coerce,[e],[tgty;srcty] -> GenCoerce cenv cgbuf eenv (e,tgty,m,srcty) sequel | TOp.Reraise,[],[rtnty] -> GenReraise cenv cgbuf eenv (rtnty,m) sequel | TOp.TraitCall(ss),args,[] -> GenTraitCall cenv cgbuf eenv (ss,args, m) expr sequel | TOp.LValueOp(LSet,v),[e],[] -> GenSetVal cenv cgbuf eenv (v,e,m) sequel | TOp.LValueOp(LByrefGet,v),[],[] -> GenGetByref cenv cgbuf eenv (v,m) sequel | TOp.LValueOp(LByrefSet,v),[e],[] -> GenSetByref cenv cgbuf eenv (v,e,m) sequel - | TOp.LValueOp(LGetAddr,v),[],[] -> GenGetValAddr cenv cgbuf eenv (v,m) sequel + | TOp.LValueOp(LAddrOf _,v),[],[] -> GenGetValAddr cenv cgbuf eenv (v,m) sequel | TOp.Array,elems,[elemTy] -> GenNewArray cenv cgbuf eenv (elems,elemTy,m) sequel | TOp.Bytes bytes,[],[] -> if cenv.opts.emitConstantArraysUsingStaticDataBlobs then @@ -1959,10 +1984,10 @@ let rec GenExpr (cenv:cenv) (cgbuf:CodeGenBuffer) eenv sp expr sequel = end | Expr.StaticOptimization(constraints,e2,e3,m) -> GenStaticOptimization cenv cgbuf eenv (constraints,e2,e3,m) sequel - | Expr.Obj(_,typ,_,_,[meth],[],m) when isDelegateTy cenv.g typ -> + | Expr.Obj(_,ty,_,_,[meth],[],m) when isDelegateTy cenv.g ty -> GenDelegateExpr cenv cgbuf eenv expr (meth,m) sequel - | Expr.Obj(_,typ,basev,basecall,overrides,interfaceImpls,m) -> - GenObjectExpr cenv cgbuf eenv expr (typ,basev,basecall,overrides,interfaceImpls,m) sequel + | Expr.Obj(_,ty,basev,basecall,overrides,interfaceImpls,m) -> + GenObjectExpr cenv cgbuf eenv expr (ty,basev,basecall,overrides,interfaceImpls,m) sequel | Expr.Quote(ast,conv,_,m,ty) -> GenQuotation cenv cgbuf eenv (ast,conv,m,ty) sequel | Expr.Link _ -> failwith "Unexpected reclink" @@ -1971,9 +1996,9 @@ let rec GenExpr (cenv:cenv) (cgbuf:CodeGenBuffer) eenv sp expr sequel = and GenExprs cenv cgbuf eenv es = List.iter (fun e -> GenExpr cenv cgbuf eenv SPSuppress e Continue) es -and CodeGenMethodForExpr cenv mgbuf (spReq,entryPointInfo,methodName,eenv,alreadyUsedArgs,alreadyUsedLocals,expr0,sequel0) = +and CodeGenMethodForExpr cenv mgbuf (spReq,entryPointInfo,methodName,eenv,alreadyUsedArgs,expr0,sequel0) = let _,code = - CodeGenMethod cenv mgbuf (entryPointInfo,methodName,eenv,alreadyUsedArgs,alreadyUsedLocals, + CodeGenMethod cenv mgbuf (entryPointInfo,methodName,eenv,alreadyUsedArgs, (fun cgbuf eenv -> GenExpr cenv cgbuf eenv spReq expr0 sequel0), expr0.Range) code @@ -2123,15 +2148,15 @@ and GenAllocTuple cenv cgbuf eenv (tupInfo, args,argtys,m) sequel = let tupInfo = evalTupInfoIsStruct tupInfo let tcref, tys, args, newm = mkCompiledTuple cenv.g tupInfo (argtys,args,m) - let typ = GenNamedTyApp cenv.amap newm eenv.tyenv tcref tys + let ty = GenNamedTyApp cenv.amap newm eenv.tyenv tcref tys let ntyvars = if (tys.Length - 1) < goodTupleFields then (tys.Length - 1) else goodTupleFields let formalTyvars = [ for n in 0 .. ntyvars do yield mkILTyvarTy (uint16 n) ] GenExprs cenv cgbuf eenv args // Generate a reference to the constructor - CG.EmitInstr cgbuf (pop args.Length) (Push [typ]) + CG.EmitInstr cgbuf (pop args.Length) (Push [ty]) (mkNormalNewobj - (mkILCtorMethSpecForTy (typ,formalTyvars))) + (mkILCtorMethSpecForTy (ty,formalTyvars))) GenSequel cenv eenv.cloc cgbuf sequel and GenGetTupleField cenv cgbuf eenv (tupInfo,e,tys,n,m) sequel = @@ -2141,16 +2166,16 @@ and GenGetTupleField cenv cgbuf eenv (tupInfo,e,tys,n,m) sequel = if ar <= 0 then failwith "getCompiledTupleItem" elif ar < maxTuple then let tcr' = mkCompiledTupleTyconRef g tupInfo ar - let typ = GenNamedTyApp cenv.amap m eenv.tyenv tcr' tys - mkGetTupleItemN g m n typ tupInfo e tys.[n] + let ty = GenNamedTyApp cenv.amap m eenv.tyenv tcr' tys + mkGetTupleItemN g m n ty tupInfo e tys.[n] else let tysA,tysB = List.splitAfter (goodTupleFields) tys let tyB = mkCompiledTupleTy g tupInfo tysB let tys' = tysA@[tyB] let tcr' = mkCompiledTupleTyconRef g tupInfo (List.length tys') - let typ' = GenNamedTyApp cenv.amap m eenv.tyenv tcr' tys' + let ty' = GenNamedTyApp cenv.amap m eenv.tyenv tcr' tys' let n' = (min n goodTupleFields) - let elast = mkGetTupleItemN g m n' typ' tupInfo e tys'.[n'] + let elast = mkGetTupleItemN g m n' ty' tupInfo e tys'.[n'] if n < goodTupleFields then elast else @@ -2159,23 +2184,23 @@ and GenGetTupleField cenv cgbuf eenv (tupInfo,e,tys,n,m) sequel = and GenAllocExn cenv cgbuf eenv (c,args,m) sequel = GenExprs cenv cgbuf eenv args - let typ = GenExnType cenv.amap m eenv.tyenv c + let ty = GenExnType cenv.amap m eenv.tyenv c let flds = recdFieldsOfExnDefRef c let argtys = flds |> List.map (fun rfld -> GenType cenv.amap m eenv.tyenv rfld.FormalType) - let mspec = mkILCtorMethSpecForTy (typ, argtys) + let mspec = mkILCtorMethSpecForTy (ty, argtys) CG.EmitInstr cgbuf - (pop args.Length) (Push [typ]) + (pop args.Length) (Push [ty]) (mkNormalNewobj mspec) GenSequel cenv eenv.cloc cgbuf sequel and GenAllocUnionCase cenv cgbuf eenv (c,tyargs,args,m) sequel = GenExprs cenv cgbuf eenv args let cuspec,idx = GenUnionCaseSpec cenv.amap m eenv.tyenv c tyargs - CG.EmitInstrs cgbuf (pop args.Length) (Push [cuspec.EnclosingType]) (EraseUnions.mkNewData cenv.g.ilg (cuspec, idx)) + CG.EmitInstrs cgbuf (pop args.Length) (Push [cuspec.DeclaringType]) (EraseUnions.mkNewData cenv.g.ilg (cuspec, idx)) GenSequel cenv eenv.cloc cgbuf sequel and GenAllocRecd cenv cgbuf eenv ctorInfo (tcref,argtys,args,m) sequel = - let typ = GenNamedTyApp cenv.amap m eenv.tyenv tcref argtys + let ty = GenNamedTyApp cenv.amap m eenv.tyenv tcref argtys // Filter out fields with default initialization let relevantFields = @@ -2186,7 +2211,7 @@ and GenAllocRecd cenv cgbuf eenv ctorInfo (tcref,argtys,args,m) sequel = match ctorInfo with | RecdExprIsObjInit -> (args,relevantFields) ||> List.iter2 (fun e f -> - CG.EmitInstr cgbuf (pop 0) (Push (if tcref.IsStructOrEnumTycon then [ILType.Byref typ] else [typ])) mkLdarg0 + CG.EmitInstr cgbuf (pop 0) (Push (if tcref.IsStructOrEnumTycon then [ILType.Byref ty] else [ty])) mkLdarg0 GenExpr cenv cgbuf eenv SPSuppress e Continue GenFieldStore false cenv cgbuf eenv (tcref.MakeNestedRecdFieldRef f,argtys,m) discard) // Object construction doesn't generate a true value. @@ -2196,9 +2221,9 @@ and GenAllocRecd cenv cgbuf eenv ctorInfo (tcref,argtys,args,m) sequel = GenExprs cenv cgbuf eenv args // generate a reference to the record constructor let tyenvinner = TypeReprEnv.ForTyconRef tcref - CG.EmitInstr cgbuf (pop args.Length) (Push [typ]) + CG.EmitInstr cgbuf (pop args.Length) (Push [ty]) (mkNormalNewobj - (mkILCtorMethSpecForTy (typ,relevantFields |> List.map (fun f -> GenType cenv.amap m tyenvinner f.FormalType) ))) + (mkILCtorMethSpecForTy (ty,relevantFields |> List.map (fun f -> GenType cenv.amap m tyenvinner f.FormalType) ))) GenSequel cenv eenv.cloc cgbuf sequel @@ -2286,13 +2311,13 @@ and GenReraise cenv cgbuf eenv (rtnty,m) sequel = and GenGetExnField cenv cgbuf eenv (e,ecref,fieldNum,m) sequel = GenExpr cenv cgbuf eenv SPSuppress e Continue let exnc = stripExnEqns ecref - let typ = GenExnType cenv.amap m eenv.tyenv ecref - CG.EmitInstrs cgbuf (pop 0) Push0 [ I_castclass typ] + let ty = GenExnType cenv.amap m eenv.tyenv ecref + CG.EmitInstrs cgbuf (pop 0) Push0 [ I_castclass ty] let fld = List.item fieldNum exnc.TrueInstanceFieldsAsList let ftyp = GenType cenv.amap m eenv.tyenv fld.FormalType - let mspec = mkILNonGenericInstanceMethSpecInTy (typ,"get_" + fld.Name, [], ftyp) + let mspec = mkILNonGenericInstanceMethSpecInTy (ty,"get_" + fld.Name, [], ftyp) CG.EmitInstr cgbuf (pop 1) (Push [ftyp]) (mkNormalCall mspec) GenSequel cenv eenv.cloc cgbuf sequel @@ -2300,13 +2325,13 @@ and GenGetExnField cenv cgbuf eenv (e,ecref,fieldNum,m) sequel = and GenSetExnField cenv cgbuf eenv (e,ecref,fieldNum,e2,m) sequel = GenExpr cenv cgbuf eenv SPSuppress e Continue let exnc = stripExnEqns ecref - let typ = GenExnType cenv.amap m eenv.tyenv ecref - CG.EmitInstrs cgbuf (pop 0) Push0 [ I_castclass typ ] + let ty = GenExnType cenv.amap m eenv.tyenv ecref + CG.EmitInstrs cgbuf (pop 0) Push0 [ I_castclass ty ] let fld = List.item fieldNum exnc.TrueInstanceFieldsAsList let ftyp = GenType cenv.amap m eenv.tyenv fld.FormalType let ilFieldName = ComputeFieldName exnc fld GenExpr cenv cgbuf eenv SPSuppress e2 Continue - CG.EmitInstr cgbuf (pop 2) Push0 (mkNormalStfld(mkILFieldSpecInTy (typ,ilFieldName,ftyp))) + CG.EmitInstr cgbuf (pop 2) Push0 (mkNormalStfld(mkILFieldSpecInTy (ty,ilFieldName,ftyp))) GenUnitThenSequel cenv eenv m eenv.cloc cgbuf sequel and UnionCodeGen (cgbuf: CodeGenBuffer) = @@ -2361,7 +2386,7 @@ and GenSetUnionCaseField cenv cgbuf eenv (e,ucref,tyargs,n,e2,m) sequel = let cuspec,idx = GenUnionCaseSpec cenv.amap m eenv.tyenv ucref tyargs let avoidHelpers = entityRefInThisAssembly cenv.g.compilingFslib ucref.TyconRef EraseUnions.emitCastData cenv.g.ilg (UnionCodeGen cgbuf) (false,avoidHelpers,cuspec,idx) - CG.EmitInstrs cgbuf (pop 1) (Push [cuspec.EnclosingType]) [ ] // push/pop to match the line above + CG.EmitInstrs cgbuf (pop 1) (Push [cuspec.DeclaringType]) [ ] // push/pop to match the line above GenExpr cenv cgbuf eenv SPSuppress e2 Continue CG.EmitInstrs cgbuf (pop 2) Push0 (EraseUnions.mkStData (cuspec, idx, n)) GenUnitThenSequel cenv eenv m eenv.cloc cgbuf sequel @@ -2406,7 +2431,7 @@ and GenFieldGet isStatic cenv cgbuf eenv (rfref:RecdFieldRef,tyargs,m) = CG.EmitInstrs cgbuf (mk_field_pops isStatic 0) (Push [fspec.ActualType]) [ instr ] else let cconv = if isStatic then ILCallingConv.Static else ILCallingConv.Instance - let mspec = mkILMethSpecInTy (fspec.EnclosingType,cconv, "get_" + rfref.RecdField.rfield_id.idText, [], fspec.FormalType, []) + let mspec = mkILMethSpecInTy (fspec.DeclaringType,cconv, "get_" + rfref.RecdField.rfield_id.idText, [], fspec.FormalType, []) CG.EmitInstr cgbuf (mk_field_pops isStatic 0) (Push [fspec.ActualType]) (mkNormalCall mspec) and GenFieldStore isStatic cenv cgbuf eenv (rfref:RecdFieldRef,tyargs,m) sequel = @@ -2414,7 +2439,7 @@ and GenFieldStore isStatic cenv cgbuf eenv (rfref:RecdFieldRef,tyargs,m) sequel let fld = rfref.RecdField if fld.IsMutable && not (useGenuineField rfref.Tycon fld) then let cconv = if isStatic then ILCallingConv.Static else ILCallingConv.Instance - let mspec = mkILMethSpecInTy (fspec.EnclosingType, cconv, "set_" + fld.rfield_id.idText, [fspec.FormalType],ILType.Void,[]) + let mspec = mkILMethSpecInTy (fspec.DeclaringType, cconv, "set_" + fld.rfield_id.idText, [fspec.FormalType],ILType.Void,[]) CG.EmitInstr cgbuf (mk_field_pops isStatic 1) Push0 (mkNormalCall mspec) else let vol = if rfref.RecdField.IsVolatile then Volatile else Nonvolatile @@ -2477,27 +2502,27 @@ and GenUntupledArgExpr cenv cgbuf eenv m argInfos expr sequel = and GenApp cenv cgbuf eenv (f,fty,tyargs,args,m) sequel = match (f,tyargs,args) with (* Look for tailcall to turn into branch *) - | (Expr.Val(v,_,_),_,_) when - ((ListAssoc.containsKey cenv.g.valRefEq v eenv.innerVals) && - not v.IsConstructor && - let (kind,_) = ListAssoc.find cenv.g.valRefEq v eenv.innerVals - (* when branch-calling methods we must have the right type parameters *) - begin match kind with - | BranchCallClosure _ -> true - | BranchCallMethod (_,_,tps,_,_) -> - (List.lengthsEqAndForall2 (fun ty tp -> typeEquiv cenv.g ty (mkTyparTy tp)) tyargs tps) - end && - (* must be exact #args, ignoring tupling - we untuple if needed below *) - (let arityInfo = - match kind with - | BranchCallClosure arityInfo - | BranchCallMethod (arityInfo,_,_,_,_) -> arityInfo - arityInfo.Length = args.Length - ) && - (* no tailcall out of exception handler, etc. *) - (match sequelIgnoringEndScopesAndDiscard sequel with Return | ReturnVoid -> true | _ -> false)) + | (Expr.Val(v,_,_),_,_) when + match ListAssoc.tryFind cenv.g.valRefEq v eenv.innerVals with + | Some (kind,_) -> + (not v.IsConstructor && + (* when branch-calling methods we must have the right type parameters *) + (match kind with + | BranchCallClosure _ -> true + | BranchCallMethod (_,_,tps,_,_) -> + (List.lengthsEqAndForall2 (fun ty tp -> typeEquiv cenv.g ty (mkTyparTy tp)) tyargs tps)) && + (* must be exact #args, ignoring tupling - we untuple if needed below *) + (let arityInfo = + match kind with + | BranchCallClosure arityInfo + | BranchCallMethod (arityInfo,_,_,_,_) -> arityInfo + arityInfo.Length = args.Length + ) && + (* no tailcall out of exception handler, etc. *) + (match sequelIgnoringEndScopesAndDiscard sequel with Return | ReturnVoid -> true | _ -> false)) + | None -> false -> - let (kind,mark) = ListAssoc.find cenv.g.valRefEq v eenv.innerVals + let (kind,mark) = ListAssoc.find cenv.g.valRefEq v eenv.innerVals // already checked above in when guard let ntmargs = match kind with | BranchCallClosure arityInfo -> @@ -2548,7 +2573,7 @@ and GenApp cenv cgbuf eenv (f,fty,tyargs,args,m) sequel = let storage = StorageForValRef m vref eenv match storage with - | Method (_,_,mspec,_,_,_) -> + | Method (_,_,mspec,_,_,_,_) -> CG.EmitInstr cgbuf (pop 0) (Push [cenv.g.iltyp_RuntimeMethodHandle]) (I_ldtoken (ILToken.ILMethod mspec)) | _ -> errorR(Error(FSComp.SR.ilxgenUnexpectedArgumentToMethodHandleOfDuringCodegen(), m)) @@ -2575,7 +2600,7 @@ and GenApp cenv cgbuf eenv (f,fty,tyargs,args,m) sequel = when (let storage = StorageForValRef m vref eenv match storage with - | Method (topValInfo,vref,_,_,_,_) -> + | Method (topValInfo,vref,_,_,_,_,_) -> (let tps,argtys,_,_ = GetTopValTypeInFSharpForm cenv.g topValInfo vref.Type m tps.Length = tyargs.Length && argtys.Length <= args.Length) @@ -2583,10 +2608,10 @@ and GenApp cenv cgbuf eenv (f,fty,tyargs,args,m) sequel = let storage = StorageForValRef m vref eenv match storage with - | Method (topValInfo,vref,mspec,_,_,_) -> + | Method (topValInfo,vref,mspec,_,_,_,_) -> let nowArgs,laterArgs = let _,curriedArgInfos,_,_ = GetTopValTypeInFSharpForm cenv.g topValInfo vref.Type m - List.chop curriedArgInfos.Length args + List.splitAt curriedArgInfos.Length args let actualRetTy = applyTys cenv.g vref.Type (tyargs,nowArgs) let _,curriedArgInfos,returnTy,_ = GetTopValTypeInCompiledForm cenv.g topValInfo vref.Type m @@ -2603,14 +2628,14 @@ and GenApp cenv cgbuf eenv (f,fty,tyargs,args,m) sequel = let numEnclILTypeArgs = match vref.MemberInfo with | Some _ when not (vref.IsExtensionMember) -> - List.length(vref.MemberApparentParent.TyparsNoRange |> DropErasedTypars) + List.length(vref.MemberApparentEntity.TyparsNoRange |> DropErasedTypars) | _ -> 0 let (ilEnclArgTys,ilMethArgTys) = if ilTyArgs.Length < numEnclILTypeArgs then error(InternalError("length mismatch",m)) - List.chop numEnclILTypeArgs ilTyArgs + List.splitAt numEnclILTypeArgs ilTyArgs - let boxity = mspec.EnclosingType.Boxity + let boxity = mspec.DeclaringType.Boxity let mspec = mkILMethSpec (mspec.MethodRef, boxity,ilEnclArgTys,ilMethArgTys) // "Unit" return types on static methods become "void" @@ -2645,7 +2670,7 @@ and GenApp cenv cgbuf eenv (f,fty,tyargs,args,m) sequel = // ok, now we're ready to generate if isSuperInit || isSelfInit then - CG.EmitInstrs cgbuf (pop 0) (Push [mspec.EnclosingType ]) [ mkLdarg0 ] + CG.EmitInstrs cgbuf (pop 0) (Push [mspec.DeclaringType ]) [ mkLdarg0 ] GenUntupledArgsDiscardingLoneUnit cenv cgbuf eenv m vref.NumObjArgs curriedArgInfos nowArgs @@ -2656,7 +2681,7 @@ and GenApp cenv cgbuf eenv (f,fty,tyargs,args,m) sequel = // Only save arguments that have effects if Optimizer.ExprHasEffect cenv.g laterArg then let ilTy = laterArg |> tyOfExpr cenv.g |> GenType cenv.amap m eenv.tyenv - let loc,eenv = AllocLocal cenv cgbuf eenv true (ilxgenGlobalNng.FreshCompilerGeneratedName ("arg",m), ilTy, false) scopeMarks + let loc, _realloc, eenv = AllocLocal cenv cgbuf eenv true (ilxgenGlobalNng.FreshCompilerGeneratedName ("arg",m), ilTy, false) scopeMarks GenExpr cenv cgbuf eenv SPSuppress laterArg Continue EmitSetLocal cgbuf loc Choice1Of2 (ilTy,loc),eenv @@ -2668,7 +2693,7 @@ and GenApp cenv cgbuf eenv (f,fty,tyargs,args,m) sequel = (if mustGenerateUnitAfterCall || isSuperInit || isSelfInit then Push0 else (Push [(GenType cenv.amap m eenv.tyenv actualRetTy)])) callInstr // For isSuperInit, load the 'this' pointer as the pretend 'result' of the operation. It will be popped again in most cases - if isSuperInit then CG.EmitInstrs cgbuf (pop 0) (Push [mspec.EnclosingType]) [ mkLdarg0 ] + if isSuperInit then CG.EmitInstrs cgbuf (pop 0) (Push [mspec.DeclaringType]) [ mkLdarg0 ] // When generating debug code, generate a 'nop' after a 'call' that returns 'void' // This is what C# does, as it allows the call location to be maintained correctly in the stack frame @@ -2713,7 +2738,7 @@ and CanTailcall (hasStructObjArg, ccallInfo, withinSEH, hasByrefArg, mustGenerat then Tailcall else Normalcall -and GenNamedLocalTyFuncCall cenv (cgbuf: CodeGenBuffer) eenv typ cloinfo tyargs m = +and GenNamedLocalTyFuncCall cenv (cgbuf: CodeGenBuffer) eenv ty cloinfo tyargs m = let ilContractClassTyargs = cloinfo.localTypeFuncContractFreeTypars @@ -2732,7 +2757,7 @@ and GenNamedLocalTyFuncCall cenv (cgbuf: CodeGenBuffer) eenv typ cloinfo tyargs // Local TyFunc are represented as a $contract type. they currently get stored in a value of type object // Recover result (value or reference types) via unbox_any. CG.EmitInstrs cgbuf (pop 1) (Push [ilContractTy]) [I_unbox_any ilContractTy] - let actualRetTy = applyTys cenv.g typ (tyargs,[]) + let actualRetTy = applyTys cenv.g ty (tyargs,[]) let ilDirectInvokeMethSpec = mkILInstanceMethSpecInTy(ilContractTy, "DirectInvoke", [], ilContractFormalRetTy, ilTyArgs) let ilActualRetTy = GenType cenv.amap m eenv.tyenv actualRetTy @@ -2756,17 +2781,17 @@ and GenIndirectCall cenv cgbuf eenv (functy,tyargs,args,m) sequel = // keep only non-erased type arguments when computing indirect call let tyargs = DropErasedTyargs tyargs - let typars,formalFuncTyp = tryDestForallTy cenv.g functy + let typars, formalFuncTy = tryDestForallTy cenv.g functy let feenv = eenv.tyenv.Add typars // This does two phases: REVIEW: the code is too complex for what it's achieving and should be rewritten let formalRetTy,appBuilder = List.fold - (fun (formalFuncTyp,sofar) _ -> - let dty,rty = destFunTy cenv.g formalFuncTyp + (fun (formalFuncTy,sofar) _ -> + let dty,rty = destFunTy cenv.g formalFuncTy (rty,(fun acc -> sofar (Apps_app(GenType cenv.amap m feenv dty,acc))))) - (formalFuncTyp,id) + (formalFuncTy,id) args let ilxRetApps = Apps_done (GenType cenv.amap m feenv formalRetTy) @@ -2812,7 +2837,7 @@ and GenTry cenv cgbuf eenv scopeMarks (e1,m,resty,spTry) = let afterHandler = CG.GenerateDelayMark cgbuf "afterHandler" let eenvinner = {eenvinner with withinSEH = true} let ilResultTy = GenType cenv.amap m eenvinner.tyenv resty - let whereToSave,eenvinner = AllocLocal cenv cgbuf eenvinner true (ilxgenGlobalNng.FreshCompilerGeneratedName ("tryres",m),ilResultTy, false) (startTryMark,endTryMark) + let whereToSave, _realloc, eenvinner = AllocLocal cenv cgbuf eenvinner true (ilxgenGlobalNng.FreshCompilerGeneratedName ("tryres",m),ilResultTy, false) (startTryMark,endTryMark) // Generate the body of the try. In the normal case (SequencePointAtTry) we generate a sequence point // both on the 'try' keyword and on the start of the expression in the 'try'. For inlined code and @@ -2972,7 +2997,7 @@ and GenForLoop cenv cgbuf eenv (spFor,v,e1,dir,e2,loopBody,m) sequel = let finishIdx,eenvinner = if isFSharpStyle then - let v,eenvinner = AllocLocal cenv cgbuf eenvinner true (ilxgenGlobalNng.FreshCompilerGeneratedName ("endLoop",m), cenv.g.ilg.typ_Int32, false) (start,finish) + let v, _realloc, eenvinner = AllocLocal cenv cgbuf eenvinner true (ilxgenGlobalNng.FreshCompilerGeneratedName ("endLoop",m), cenv.g.ilg.typ_Int32, false) (start,finish) v, eenvinner else -1,eenvinner @@ -3098,8 +3123,8 @@ and GenAsmCode cenv cgbuf eenv (il,tyargs,args,returnTys,m) sequel = if isNil ilTyArgs then fspec else - {fspec with EnclosingType= - let ty = fspec.EnclosingType + {fspec with DeclaringType= + let ty = fspec.DeclaringType let tspec = ty.TypeSpec mkILTy ty.Boxity (mkILTySpec(tspec.TypeRef, ilTyArgs)) } match i,ilTyArgs with @@ -3136,8 +3161,8 @@ and GenAsmCode cenv cgbuf eenv (il,tyargs,args,returnTys,m) sequel = | [ EI_ilzero _ ], _, _, _ -> match tyargs with - | [typ] -> - GenDefaultValue cenv cgbuf eenv (typ,m) + | [ty] -> + GenDefaultValue cenv cgbuf eenv (ty,m) GenSequel cenv eenv.cloc cgbuf sequel | _ -> failwith "Bad polymorphic IL instruction" @@ -3264,14 +3289,14 @@ and GenQuotation cenv cgbuf eenv (ast,conv,m,ety) sequel = match QuotationTranslator.QuotationGenerationScope.ComputeQuotationFormat cenv.g with | QuotationTranslator.QuotationSerializationFormat.FSharp_40_Plus -> let referencedTypeDefExprs = List.map (mkILNonGenericBoxedTy >> mkTypeOfExpr cenv m) referencedTypeDefs - let referencedTypeDefsExpr = mkArray (cenv.g.system_Type_typ, referencedTypeDefExprs, m) - let spliceTypesExpr = mkArray (cenv.g.system_Type_typ, spliceTypeExprs, m) + let referencedTypeDefsExpr = mkArray (cenv.g.system_Type_ty, referencedTypeDefExprs, m) + let spliceTypesExpr = mkArray (cenv.g.system_Type_ty, spliceTypeExprs, m) let spliceArgsExpr = mkArray (rawTy, spliceArgExprs, m) mkCallDeserializeQuotationFSharp40Plus cenv.g m someTypeInModuleExpr referencedTypeDefsExpr spliceTypesExpr spliceArgsExpr bytesExpr | QuotationTranslator.QuotationSerializationFormat.FSharp_20_Plus -> let mkList ty els = List.foldBack (mkCons cenv.g ty) els (mkNil cenv.g m ty) - let spliceTypesExpr = mkList cenv.g.system_Type_typ spliceTypeExprs + let spliceTypesExpr = mkList cenv.g.system_Type_ty spliceTypeExprs let spliceArgsExpr = mkList rawTy spliceArgExprs mkCallDeserializeQuotationFSharp20Plus cenv.g m someTypeInModuleExpr spliceTypesExpr spliceArgsExpr bytesExpr @@ -3306,7 +3331,7 @@ and GenILCall cenv cgbuf eenv (virt,valu,newobj,valUseFlags,isDllImport,ilMethRe // Load the 'this' pointer to pass to the superclass constructor. This argument is not // in the expression tree since it can't be treated like an ordinary value - if isSuperInit then CG.EmitInstrs cgbuf (pop 0) (Push [ilMethSpec.EnclosingType]) [ mkLdarg0 ] + if isSuperInit then CG.EmitInstrs cgbuf (pop 0) (Push [ilMethSpec.DeclaringType]) [ mkLdarg0 ] GenExprs cenv cgbuf eenv argExprs let il = if newobj then [ I_newobj(ilMethSpec,None) ] @@ -3323,7 +3348,7 @@ and GenILCall cenv cgbuf eenv (virt,valu,newobj,valUseFlags,isDllImport,ilMethRe // Load the 'this' pointer as the pretend 'result' of the isSuperInit operation. // It will be immediately popped in most cases, but may also be used as the target of some "property set" operations. - if isSuperInit then CG.EmitInstrs cgbuf (pop 0) (Push [ilMethSpec.EnclosingType]) [ mkLdarg0 ] + if isSuperInit then CG.EmitInstrs cgbuf (pop 0) (Push [ilMethSpec.DeclaringType]) [ mkLdarg0 ] CommitCallSequel cenv eenv m eenv.cloc cgbuf mustGenerateUnitAfterCall sequel and CommitCallSequel cenv eenv m cloc cgbuf mustGenerateUnitAfterCall sequel = @@ -3332,14 +3357,19 @@ and CommitCallSequel cenv eenv m cloc cgbuf mustGenerateUnitAfterCall sequel = else GenSequel cenv cloc cgbuf sequel +and MakeNotSupportedExnExpr cenv eenv (argExpr, m) = + let ety = mkAppTy (cenv.g.FindSysTyconRef ["System"] "NotSupportedException") [] + let ilty = GenType cenv.amap m eenv.tyenv ety + let mref = mkILCtorMethSpecForTy(ilty, [cenv.g.ilg.typ_String]).MethodRef + Expr.Op(TOp.ILCall(false,false,false,true,NormalValUse,false,false,mref,[],[],[ety]),[],[argExpr],m) + and GenTraitCall cenv cgbuf eenv (traitInfo, argExprs, m) expr sequel = - let minfoOpt = CommitOperationResult (ConstraintSolver.CodegenWitnessThatTypSupportsTraitConstraint cenv.TcVal cenv.g cenv.amap m traitInfo argExprs) + let minfoOpt = CommitOperationResult (ConstraintSolver.CodegenWitnessThatTypeSupportsTraitConstraint cenv.TcVal cenv.g cenv.amap m traitInfo argExprs) match minfoOpt with | None -> - let replacementExpr = - mkThrow m (tyOfExpr cenv.g expr) - (mkExnExpr(cenv.g.FindSysTyconRef ["System"] "NotSupportedException", - [ mkString cenv.g m (FSComp.SR.ilDynamicInvocationNotSupported(traitInfo.MemberName))],m)) + let exnArg = mkString cenv.g m (FSComp.SR.ilDynamicInvocationNotSupported(traitInfo.MemberName)) + let exnExpr = MakeNotSupportedExnExpr cenv eenv (exnArg, m) + let replacementExpr = mkThrow m (tyOfExpr cenv.g expr) exnExpr GenExpr cenv cgbuf eenv SPSuppress replacementExpr sequel | Some expr -> let expr = cenv.optimizeDuringCodeGen expr @@ -3358,8 +3388,9 @@ and GenGetAddrOfRefCellField cenv cgbuf eenv (e,ty,m) sequel = and GenGetValAddr cenv cgbuf eenv (v: ValRef, m) sequel = let vspec = v.Deref let ilTy = GenTypeOfVal cenv eenv vspec - match StorageForValRef m v eenv with - | Local (idx,None) -> + let storage = StorageForValRef m v eenv + match storage with + | Local (idx, _, None) -> CG.EmitInstrs cgbuf (pop 0) (Push [ILType.Byref ilTy]) [ I_ldloca (uint16 idx) ] | Arg idx -> CG.EmitInstrs cgbuf (pop 0) (Push [ILType.Byref ilTy]) [ I_ldarga (uint16 idx) ] @@ -3369,7 +3400,7 @@ and GenGetValAddr cenv cgbuf eenv (v: ValRef, m) sequel = EmitGetStaticFieldAddr cgbuf ilTy fspec | Env (_,_,ilField,_) -> CG.EmitInstrs cgbuf (pop 0) (Push [ILType.Byref ilTy]) [ mkLdarg0; mkNormalLdflda ilField ] - | Local (_,Some _) | StaticProperty _ | Method _ | Env _ | Null -> + | Local (_, _, Some _) | StaticProperty _ | Method _ | Env _ | Null -> errorR(Error(FSComp.SR.ilAddressOfValueHereIsInvalid(v.DisplayName),m)) CG.EmitInstrs cgbuf (pop 1) (Push [ILType.Byref ilTy]) [ I_ldarga (uint16 669 (* random value for post-hoc diagnostic analysis on generated tree *) ) ] ; @@ -3394,32 +3425,33 @@ and GenDefaultValue cenv cgbuf eenv (ty,m) = CG.EmitInstr cgbuf (pop 0) (Push [ilTy]) AI_ldnull else match tryDestAppTy cenv.g ty with - | Some tcref when (tyconRefEq cenv.g cenv.g.system_SByte_tcref tcref || - tyconRefEq cenv.g cenv.g.system_Int16_tcref tcref || - tyconRefEq cenv.g cenv.g.system_Int32_tcref tcref || - tyconRefEq cenv.g cenv.g.system_Bool_tcref tcref || - tyconRefEq cenv.g cenv.g.system_Byte_tcref tcref || - tyconRefEq cenv.g cenv.g.system_Char_tcref tcref || - tyconRefEq cenv.g cenv.g.system_UInt16_tcref tcref || - tyconRefEq cenv.g cenv.g.system_UInt32_tcref tcref) -> + | ValueSome tcref when (tyconRefEq cenv.g cenv.g.system_SByte_tcref tcref || + tyconRefEq cenv.g cenv.g.system_Int16_tcref tcref || + tyconRefEq cenv.g cenv.g.system_Int32_tcref tcref || + tyconRefEq cenv.g cenv.g.system_Bool_tcref tcref || + tyconRefEq cenv.g cenv.g.system_Byte_tcref tcref || + tyconRefEq cenv.g cenv.g.system_Char_tcref tcref || + tyconRefEq cenv.g cenv.g.system_UInt16_tcref tcref || + tyconRefEq cenv.g cenv.g.system_UInt32_tcref tcref) -> CG.EmitInstr cgbuf (pop 0) (Push [ilTy]) iLdcZero - | Some tcref when (tyconRefEq cenv.g cenv.g.system_Int64_tcref tcref || - tyconRefEq cenv.g cenv.g.system_UInt64_tcref tcref) -> + | ValueSome tcref when (tyconRefEq cenv.g cenv.g.system_Int64_tcref tcref || + tyconRefEq cenv.g cenv.g.system_UInt64_tcref tcref) -> CG.EmitInstr cgbuf (pop 0) (Push [ilTy]) (iLdcInt64 0L) - | Some tcref when (tyconRefEq cenv.g cenv.g.system_Single_tcref tcref) -> + | ValueSome tcref when (tyconRefEq cenv.g cenv.g.system_Single_tcref tcref) -> CG.EmitInstr cgbuf (pop 0) (Push [ilTy]) (iLdcSingle 0.0f) - | Some tcref when (tyconRefEq cenv.g cenv.g.system_Double_tcref tcref) -> + | ValueSome tcref when (tyconRefEq cenv.g cenv.g.system_Double_tcref tcref) -> CG.EmitInstr cgbuf (pop 0) (Push [ilTy]) (iLdcDouble 0.0) | _ -> let ilTy = GenType cenv.amap m eenv.tyenv ty LocalScope "ilzero" cgbuf (fun scopeMarks -> - let locIdx, _ = AllocLocal cenv cgbuf eenv true (ilxgenGlobalNng.FreshCompilerGeneratedName ("default",m), ilTy, false) scopeMarks + let locIdx, realloc, _ = AllocLocal cenv cgbuf eenv true (ilxgenGlobalNng.FreshCompilerGeneratedName ("default",m), ilTy, false) scopeMarks // "initobj" (Generated by EmitInitLocal) doesn't work on byref types // But ilzero(&ty) only gets generated in the built-in get-address function so // we can just rely on zeroinit of all IL locals. - match ilTy with - | ILType.Byref _ -> () - | _ -> EmitInitLocal cgbuf ilTy locIdx + if realloc then + match ilTy with + | ILType.Byref _ -> () + | _ -> EmitInitLocal cgbuf ilTy locIdx EmitGetLocal cgbuf ilTy locIdx ) @@ -3437,7 +3469,7 @@ and GenGenericParam cenv eenv (tp:Typar) = // use the CompiledName if given // Inference variables get given an IL name "TA, TB" etc. let nm = - match tp.typar_il_name with + match tp.ILName with | None -> tp.Name | Some nm -> nm // Some special rules apply when compiling Fsharp.Core.dll to avoid a proliferation of [] attributes on type parameters @@ -3455,7 +3487,8 @@ and GenGenericParam cenv eenv (tp:Typar) = Constraints = subTypeConstraints Variance=NonVariant - CustomAttrs = mkILCustomAttrs (GenAttrs cenv eenv tp.Attribs) + CustomAttrsStored = storeILCustomAttrs (mkILCustomAttrs (GenAttrs cenv eenv tp.Attribs)) + MetadataIndex = NoMetadataIdx HasReferenceTypeConstraint=refTypeConstraint HasNotNullableValueTypeConstraint=notNullableValueTypeConstraint HasDefaultConstructorConstraint= defaultConstructorConstraint } @@ -3466,31 +3499,47 @@ and GenGenericParam cenv eenv (tp:Typar) = /// Generates the data used for parameters at definitions of abstract method slots such as interface methods or override methods. and GenSlotParam m cenv eenv (TSlotParam(nm,ty,inFlag,outFlag,optionalFlag,attribs)) : ILParameter = - let inFlag2,outFlag2,optionalFlag2,defaultParamValue,paramMarshal2,attribs = GenParamAttribs cenv attribs + let ilTy = GenParamType cenv.amap m eenv.tyenv true ty + let inFlag2,outFlag2,optionalFlag2,defaultParamValue,paramMarshal2,attribs = GenParamAttribs cenv ty attribs + + let ilAttribs = GenAttrs cenv eenv attribs + + let ilAttribs = + match GenReadOnlyAttributeIfNecessary cenv.g ty with + | Some attr -> ilAttribs @ [attr] + | None -> ilAttribs { Name=nm - Type= GenParamType cenv.amap m eenv.tyenv ty + Type= ilTy Default=defaultParamValue Marshal=paramMarshal2 IsIn=inFlag || inFlag2 IsOut=outFlag || outFlag2 IsOptional=optionalFlag || optionalFlag2 - CustomAttrs= mkILCustomAttrs (GenAttrs cenv eenv attribs) } + CustomAttrsStored = storeILCustomAttrs (mkILCustomAttrs ilAttribs) + MetadataIndex = NoMetadataIdx } -and GenFormalSlotsig m cenv eenv (TSlotSig(_,typ,ctps,mtps,paraml,returnTy)) = +and GenFormalSlotsig m cenv eenv (TSlotSig(_,ty,ctps,mtps,paraml,returnTy)) = let paraml = List.concat paraml - let ilTy = GenType cenv.amap m eenv.tyenv typ + let ilTy = GenType cenv.amap m eenv.tyenv ty let eenvForSlotSig = EnvForTypars (ctps @ mtps) eenv let ilParams = paraml |> List.map (GenSlotParam m cenv eenvForSlotSig) let ilRetTy = GenReturnType cenv.amap m eenvForSlotSig.tyenv returnTy let ilRet = mkILReturn ilRetTy + let ilRet = + match returnTy with + | None -> ilRet + | Some ty -> + match GenReadOnlyAttributeIfNecessary cenv.g ty with + | Some attr -> ilRet.WithCustomAttrs (mkILCustomAttrs (ilRet.CustomAttrs.AsList @ [attr])) + | None -> ilRet ilTy, ilParams, ilRet and instSlotParam inst (TSlotParam(nm,ty,inFlag,fl2,fl3,attrs)) = TSlotParam(nm,instType inst ty,inFlag,fl2,fl3,attrs) -and GenActualSlotsig m cenv eenv (TSlotSig(_,typ,ctps,mtps,ilSlotParams,ilSlotRetTy)) methTyparsOfOverridingMethod (methodParams: Val list) = +and GenActualSlotsig m cenv eenv (TSlotSig(_,ty,ctps,mtps,ilSlotParams,ilSlotRetTy)) methTyparsOfOverridingMethod (methodParams: Val list) = let ilSlotParams = List.concat ilSlotParams - let instForSlotSig = mkTyparInst (ctps@mtps) (argsOfAppTy cenv.g typ @ generalizeTypars methTyparsOfOverridingMethod) + let instForSlotSig = mkTyparInst (ctps@mtps) (argsOfAppTy cenv.g ty @ generalizeTypars methTyparsOfOverridingMethod) let ilParams = ilSlotParams |> List.map (instSlotParam instForSlotSig >> GenSlotParam m cenv eenv) // Use the better names if available let ilParams = if ilParams.Length = methodParams.Length then (ilParams, methodParams) ||> List.map2 (fun p pv -> { p with Name = Some (nameOfVal pv) }) else ilParams @@ -3522,31 +3571,14 @@ and bindBaseOrThisVarOpt cenv eenv baseValOpt = | None -> eenv | Some basev -> AddStorageForVal cenv.g (basev,notlazy (Arg 0)) eenv -and fixupVirtualSlotFlags mdef = - {mdef with - IsHideBySig=true - mdKind = (match mdef.mdKind with - | MethodKind.Virtual vinfo -> - MethodKind.Virtual - {vinfo with - IsCheckAccessOnOverride=false } - | _ -> failwith "fixupVirtualSlotFlags") } +and fixupVirtualSlotFlags (mdef:ILMethodDef) = + mdef.WithHideBySig() and renameMethodDef nameOfOverridingMethod (mdef : ILMethodDef) = - {mdef with Name=nameOfOverridingMethod } - -and fixupMethodImplFlags mdef = - {mdef with - Access=ILMemberAccess.Private - IsHideBySig=true - mdKind=(match mdef.mdKind with - | MethodKind.Virtual vinfo -> - MethodKind.Virtual - {vinfo with - IsCheckAccessOnOverride=false - IsFinal=true - IsNewSlot=true } - | _ -> failwith "fixupMethodImpl") } + mdef.With(name=nameOfOverridingMethod) + +and fixupMethodImplFlags (mdef:ILMethodDef) = + mdef.WithAccess(ILMemberAccess.Private).WithHideBySig().WithFinal(true).WithNewSlot and GenObjectMethod cenv eenvinner (cgbuf:CodeGenBuffer) useMethodImpl tmethod = @@ -3564,7 +3596,7 @@ and GenObjectMethod cenv eenvinner (cgbuf:CodeGenBuffer) useMethodImpl tmethod = // Args are stored starting at #1 let eenvForMeth = AddStorageForLocalVals cenv.g (methodParams |> List.mapi (fun i v -> (v,Arg i))) eenvUnderTypars - let ilMethodBody = CodeGenMethodForExpr cenv cgbuf.mgbuf (SPAlways,[],nameOfOverridenMethod,eenvForMeth,0,0,methodBodyExpr,(if slotSigHasVoidReturnTy slotsig then discardAndReturnVoid else Return)) + let ilMethodBody = CodeGenMethodForExpr cenv cgbuf.mgbuf (SPAlways,[],nameOfOverridenMethod,eenvForMeth,0,methodBodyExpr,(if slotSigHasVoidReturnTy slotsig then discardAndReturnVoid else Return)) let nameOfOverridingMethod,methodImplGenerator = GenMethodImpl cenv eenvinner (useMethodImpl,slotsig) methodBodyExpr.Range @@ -3579,7 +3611,7 @@ and GenObjectMethod cenv eenvinner (cgbuf:CodeGenBuffer) useMethodImpl tmethod = // fixup attributes to generate a method impl let mdef = if useMethodImpl then fixupMethodImplFlags mdef else mdef let mdef = fixupVirtualSlotFlags mdef - let mdef = { mdef with CustomAttrs = mkILCustomAttrs ilAttribs } + let mdef = mdef.With(customAttrs = mkILCustomAttrs ilAttribs) [(useMethodImpl,methodImplGenerator,methTyparsOfOverridingMethod),mdef] and GenObjectExpr cenv cgbuf eenvouter expr (baseType,baseValOpt,basecall,overrides,interfaceImpls,m) sequel = @@ -3600,7 +3632,7 @@ and GenObjectExpr cenv cgbuf eenvouter expr (baseType,baseValOpt,basecall,overri let ilTyForOverriding = mkILBoxedTy ilCloTypeRef ilCloGenericActuals let eenvinner = bindBaseOrThisVarOpt cenv eenvinner baseValOpt - let ilCtorBody = CodeGenMethodForExpr cenv cgbuf.mgbuf (SPAlways,[],cloName,eenvinner,1,0,basecall,discardAndReturnVoid) + let ilCtorBody = CodeGenMethodForExpr cenv cgbuf.mgbuf (SPAlways,[],cloName,eenvinner,1,basecall,discardAndReturnVoid) let genMethodAndOptionalMethodImpl tmethod useMethodImpl = @@ -3638,7 +3670,7 @@ and GenSequenceExpr cenv (cgbuf:CodeGenBuffer) eenvouter (nextEnumeratorValRef:V // pretend that the state variables are bound let eenvouter = - eenvouter |> AddStorageForLocalVals cenv.g (stateVars |> List.map (fun v -> v.Deref,Local(0,None))) + eenvouter |> AddStorageForLocalVals cenv.g (stateVars |> List.map (fun v -> v.Deref, Local(0, false, None))) // Get the free variables. Make a lambda to pretend that the 'nextEnumeratorValRef' is bound (it is an argument to GenerateNext) let (cloAttribs,_,_,cloFreeTyvars,cloFreeVars,ilCloTypeRef:ILTypeRef,ilCloFreeVars,eenvinner) = @@ -3662,7 +3694,7 @@ and GenSequenceExpr cenv (cgbuf:CodeGenBuffer) eenvouter (nextEnumeratorValRef:V let getFreshMethod = let _,mbody = - CodeGenMethod cenv cgbuf.mgbuf ([],"GetFreshEnumerator",eenvinner,1,0, + CodeGenMethod cenv cgbuf.mgbuf ([],"GetFreshEnumerator",eenvinner,1, (fun cgbuf eenv -> for fv in cloFreeVars do (* TODO: Emit CompareExchange @@ -3685,22 +3717,22 @@ and GenSequenceExpr cenv (cgbuf:CodeGenBuffer) eenvouter (nextEnumeratorValRef:V let closeMethod = // Note: We suppress the first sequence point in the body of this method since it is the initial state machine jump let spReq = SPSuppress - mkILNonGenericVirtualMethod("Close",ILMemberAccess.Public, [], mkILReturn ILType.Void, MethodBody.IL (CodeGenMethodForExpr cenv cgbuf.mgbuf (spReq,[],"Close",eenvinner,1,0,closeExpr,discardAndReturnVoid))) + mkILNonGenericVirtualMethod("Close",ILMemberAccess.Public, [], mkILReturn ILType.Void, MethodBody.IL (CodeGenMethodForExpr cenv cgbuf.mgbuf (spReq,[],"Close",eenvinner,1,closeExpr,discardAndReturnVoid))) let checkCloseMethod = // Note: We suppress the first sequence point in the body of this method since it is the initial state machine jump let spReq = SPSuppress - mkILNonGenericVirtualMethod("get_CheckClose",ILMemberAccess.Public, [], mkILReturn cenv.g.ilg.typ_Bool, MethodBody.IL (CodeGenMethodForExpr cenv cgbuf.mgbuf (spReq,[],"get_CheckClose",eenvinner,1,0,checkCloseExpr,Return))) + mkILNonGenericVirtualMethod("get_CheckClose",ILMemberAccess.Public, [], mkILReturn cenv.g.ilg.typ_Bool, MethodBody.IL (CodeGenMethodForExpr cenv cgbuf.mgbuf (spReq,[],"get_CheckClose",eenvinner,1,checkCloseExpr,Return))) let generateNextMethod = // Note: We suppress the first sequence point in the body of this method since it is the initial state machine jump let spReq = SPSuppress // the 'next enumerator' byref arg is at arg position 1 let eenvinner = eenvinner |> AddStorageForLocalVals cenv.g [ (nextEnumeratorValRef.Deref, Arg 1) ] - mkILNonGenericVirtualMethod("GenerateNext",ILMemberAccess.Public, [mkILParamNamed("next",ILType.Byref ilCloEnumerableTy)], mkILReturn cenv.g.ilg.typ_Int32, MethodBody.IL (CodeGenMethodForExpr cenv cgbuf.mgbuf (spReq,[],"GenerateNext",eenvinner,2,0,generateNextExpr,Return))) + mkILNonGenericVirtualMethod("GenerateNext",ILMemberAccess.Public, [mkILParamNamed("next",ILType.Byref ilCloEnumerableTy)], mkILReturn cenv.g.ilg.typ_Int32, MethodBody.IL (CodeGenMethodForExpr cenv cgbuf.mgbuf (spReq,[],"GenerateNext",eenvinner,2,generateNextExpr,Return))) let lastGeneratedMethod = - mkILNonGenericVirtualMethod("get_LastGenerated",ILMemberAccess.Public, [], mkILReturn ilCloSeqElemTy, MethodBody.IL (CodeGenMethodForExpr cenv cgbuf.mgbuf (SPSuppress,[],"get_LastGenerated",eenvinner,1,0,exprForValRef m currvref,Return))) + mkILNonGenericVirtualMethod("get_LastGenerated",ILMemberAccess.Public, [], mkILReturn ilCloSeqElemTy, MethodBody.IL (CodeGenMethodForExpr cenv cgbuf.mgbuf (SPSuppress,[],"get_LastGenerated",eenvinner,1,exprForValRef m currvref,Return))) |> AddNonUserCompilerGeneratedAttribs cenv.g let ilCtorBody = @@ -3732,32 +3764,30 @@ and GenClosureTypeDefs cenv (tref:ILTypeRef, ilGenParams, attrs, ilCloFreeVars, cloStructure=ilCloLambdas cloCode=notlazy ilCtorBody } - let td = - { Name = tref.Name - Layout = ILTypeDefLayout.Auto - Access = ComputeTypeAccess tref true - GenericParams = ilGenParams - CustomAttrs = mkILCustomAttrs(attrs @ [mkCompilationMappingAttr cenv.g (int SourceConstructFlags.Closure) ]) - Fields = emptyILFields - InitSemantics=ILTypeInit.BeforeField - IsSealed=true - IsAbstract=false - tdKind=ILTypeDefKind.Class - Events= emptyILEvents - Properties = emptyILProperties - Methods= mkILMethods mdefs - MethodImpls= mkILMethodImpls mimpls - IsSerializable= cenv.g.attrib_SerializableAttribute.IsSome - IsComInterop= false - IsSpecialName= true - NestedTypes=emptyILTypeDefs - Encoding= ILDefaultPInvokeEncoding.Auto - Implements = ilIntfTys - Extends= Some ext - SecurityDecls= emptyILSecurityDecls - HasSecurity=false } - - let tdefs = EraseClosures.convIlxClosureDef cenv.g.ilxPubCloEnv tref.Enclosing td cloInfo + let tdef = + ILTypeDef(name = tref.Name, + layout = ILTypeDefLayout.Auto, + attributes = enum 0, + genericParams = ilGenParams, + customAttrs = mkILCustomAttrs(attrs @ [mkCompilationMappingAttr cenv.g (int SourceConstructFlags.Closure) ]), + fields = emptyILFields, + events= emptyILEvents, + properties = emptyILProperties, + methods= mkILMethods mdefs, + methodImpls= mkILMethodImpls mimpls, + nestedTypes=emptyILTypeDefs, + implements = ilIntfTys, + extends= Some ext, + securityDecls= emptyILSecurityDecls) + .WithSealed(true) + .WithSerializable(true) + .WithSpecialName(true) + .WithAccess(ComputeTypeAccess tref true) + .WithLayout(ILTypeDefLayout.Auto) + .WithEncoding(ILDefaultPInvokeEncoding.Auto) + .WithInitSemantics(ILTypeInit.BeforeField) + + let tdefs = EraseClosures.convIlxClosureDef cenv.g.ilxPubCloEnv tref.Enclosing tdef cloInfo tdefs and GenGenericParams cenv eenv tps = tps |> DropErasedTypars |> List.map (GenGenericParam cenv eenv) @@ -3775,7 +3805,7 @@ and GenLambdaClosure cenv (cgbuf:CodeGenBuffer) eenv isLocalTypeFunc selfv expr match selfv with | Some v -> [(v, BranchCallClosure (cloinfo.cloArityInfo))] | _ -> [] - let ilCloBody = CodeGenMethodForExpr cenv cgbuf.mgbuf (SPAlways,entryPointInfo,cloinfo.cloName,eenvinner,1,0,body,Return) + let ilCloBody = CodeGenMethodForExpr cenv cgbuf.mgbuf (SPAlways,entryPointInfo,cloinfo.cloName,eenvinner,1,body,Return) let ilCloTypeRef = cloinfo.cloSpec.TypeRef let cloTypeDefs = if isLocalTypeFunc then @@ -3787,31 +3817,22 @@ and GenLambdaClosure cenv (cgbuf:CodeGenBuffer) eenv isLocalTypeFunc selfv expr let ilContractCtor = mkILNonGenericEmptyCtor None cenv.g.ilg.typ_Object let ilContractMeths = [ilContractCtor; mkILGenericVirtualMethod("DirectInvoke",ILMemberAccess.Assembly,ilContractMethTyargs,[],mkILReturn ilContractFormalRetTy, MethodBody.Abstract) ] - let ilContractTypeDef = - { Name = ilContractTypeRef.Name - Layout = ILTypeDefLayout.Auto - Access = ComputeTypeAccess ilContractTypeRef true - GenericParams = ilContractGenericParams - CustomAttrs = mkILCustomAttrs [mkCompilationMappingAttr cenv.g (int SourceConstructFlags.Closure) ] - Fields = emptyILFields - InitSemantics=ILTypeInit.BeforeField - IsSealed=false // the contract type is an abstract type and not sealed - IsAbstract=true // the contract type is an abstract type - tdKind=ILTypeDefKind.Class - Events= emptyILEvents - Properties = emptyILProperties - Methods= mkILMethods ilContractMeths - MethodImpls= emptyILMethodImpls - IsSerializable= cenv.g.attrib_SerializableAttribute.IsSome - IsComInterop=false - IsSpecialName= true - NestedTypes=emptyILTypeDefs - Encoding= ILDefaultPInvokeEncoding.Auto - Implements = [] - Extends= Some cenv.g.ilg.typ_Object - SecurityDecls= emptyILSecurityDecls - HasSecurity=false } + ILTypeDef(name = ilContractTypeRef.Name, + layout = ILTypeDefLayout.Auto, + attributes = enum 0, + genericParams = ilContractGenericParams, + customAttrs = mkILCustomAttrs [mkCompilationMappingAttr cenv.g (int SourceConstructFlags.Closure) ], + fields = emptyILFields, + events= emptyILEvents, + properties = emptyILProperties, + methods= mkILMethods ilContractMeths, + methodImpls= emptyILMethodImpls, + nestedTypes=emptyILTypeDefs, + implements = [], + extends= Some cenv.g.ilg.typ_Object, + securityDecls= emptyILSecurityDecls) + let ilContractTypeDef = ilContractTypeDef.WithAbstract(true).WithAccess(ComputeTypeAccess ilContractTypeRef true).WithSerializable(true).WithSpecialName(true).WithLayout(ILTypeDefLayout.Auto).WithInitSemantics(ILTypeInit.BeforeField).WithEncoding(ILDefaultPInvokeEncoding.Auto) // the contract type is an abstract type and not sealed cgbuf.mgbuf.AddTypeDef(ilContractTypeRef, ilContractTypeDef, false, false, None) let ilCtorBody = mkILMethodBody (true,[],8,nonBranchingInstrsToCode (mkCallBaseConstructor(ilContractTy,[])), None ) @@ -3845,7 +3866,7 @@ and GenTypeOfVal cenv eenv (v:Val) = and GenFreevar cenv m eenvouter tyenvinner (fv:Val) = match StorageForVal m fv eenvouter with // Local type functions - | Local(_,Some _) | Env(_,_,_,Some _) -> cenv.g.ilg.typ_Object + | Local(_, _, Some _) | Env(_,_,_,Some _) -> cenv.g.ilg.typ_Object #if DEBUG // Check for things that should never make it into the free variable set. Only do this in debug for performance reasons | (StaticField _ | StaticProperty _ | Method _ | Null) -> error(InternalError("GenFreevar: compiler error: unexpected unrealized value",fv.Range)) @@ -3933,7 +3954,7 @@ and GetIlxClosureFreeVars cenv m selfv eenvouter takenNames expr = (cloFreeVars,ilCloFreeVars) ||> List.mapi2 (fun i v fv -> let localCloInfo = match StorageForVal m v eenvouter with - | Local(_,localCloInfo) + | Local(_, _, localCloInfo) | Env(_,_,_,localCloInfo) -> localCloInfo | _ -> None let ilField = mkILFieldSpecInTy (ilCloTyInner,fv.fvName,fv.fvType) @@ -3951,7 +3972,7 @@ and GetIlxClosureInfo cenv m isLocalTypeFunc selfv eenvouter expr = let returnTy = match expr with | Expr.Lambda (_,_,_,_,_,_,returnTy) | Expr.TyLambda(_,_,_,_,returnTy) -> returnTy - | Expr.Obj(_,typ,_,_,_,_,_) -> typ + | Expr.Obj(_,ty,_,_,_,_,_) -> ty | _ -> failwith "GetIlxClosureInfo: not a lambda expression" // Determine the structure of the closure. We do this before analyzing free variables to @@ -4147,7 +4168,7 @@ and GenDelegateExpr cenv cgbuf eenvouter expr (TObjExprMethod((TSlotSig(_,delega let ilDelegeeParams,ilDelegeeRet = GenActualSlotsig m cenv envForDelegeeUnderTypars slotsig methTyparsOfOverridingMethod tmvs let envForDelegeeMeth = AddStorageForLocalVals cenv.g (List.mapi (fun i v -> (v,Arg (i+numthis))) tmvs) envForDelegeeUnderTypars - let ilMethodBody = CodeGenMethodForExpr cenv cgbuf.mgbuf (SPAlways,[],delegeeMethName,envForDelegeeMeth,1,0,body,(if slotSigHasVoidReturnTy slotsig then discardAndReturnVoid else Return)) + let ilMethodBody = CodeGenMethodForExpr cenv cgbuf.mgbuf (SPAlways,[],delegeeMethName,envForDelegeeMeth,1,body,(if slotSigHasVoidReturnTy slotsig then discardAndReturnVoid else Return)) let delegeeInvokeMeth = mkILNonGenericInstanceMethod (delegeeMethName,ILMemberAccess.Assembly, @@ -4682,6 +4703,12 @@ and ComputeMemberAccessRestrictedBySig eenv vspec = not vspec.IsMemberOrModuleBinding || // anything that's not a module or member binding gets assembly visibility vspec.IsIncrClassGeneratedMember // compiler generated members for class function 'let' bindings get assembly visibility ComputeMemberAccess isHidden +and ComputeMethodAccessRestrictedBySig eenv vspec = + let isHidden = + IsHiddenVal eenv.sigToImplRemapInfo vspec || // anything hidden by a signature gets assembly visibility + not vspec.IsMemberOrModuleBinding || // anything that's not a module or member binding gets assembly visibility + vspec.IsIncrClassGeneratedMember // compiler generated members for class function 'let' bindings get assembly visibility + ComputeMemberAccess isHidden and GenBindingAfterSequencePoint cenv cgbuf eenv sp (TBind(vspec,rhsExpr,_)) startScopeMarkOpt = @@ -4694,12 +4721,12 @@ and GenBindingAfterSequencePoint cenv cgbuf eenv sp (TBind(vspec,rhsExpr,_)) sta let eenv = {eenv with letBoundVars= (mkLocalValRef vspec) :: eenv.letBoundVars} - let access = ComputeMemberAccessRestrictedBySig eenv vspec + let access = ComputeMethodAccessRestrictedBySig eenv vspec // Workaround for .NET and Visual Studio restriction w.r.t debugger type proxys // Mark internal constructors in internal classes as public. let access = - if access = ILMemberAccess.Assembly && vspec.IsConstructor && IsHiddenTycon eenv.sigToImplRemapInfo vspec.MemberApparentParent.Deref then + if access = ILMemberAccess.Assembly && vspec.IsConstructor && IsHiddenTycon eenv.sigToImplRemapInfo vspec.MemberApparentEntity.Deref then ILMemberAccess.Public else access @@ -4713,43 +4740,41 @@ and GenBindingAfterSequencePoint cenv cgbuf eenv sp (TBind(vspec,rhsExpr,_)) sta CommitStartScope cgbuf startScopeMarkOpt // The initialization code for static 'let' and 'do' bindings gets compiled into the initialization .cctor for the whole file - | _ when vspec.IsClassConstructor && isNil vspec.TopValActualParent.TyparsNoRange -> + | _ when vspec.IsClassConstructor && isNil vspec.TopValDeclaringEntity.TyparsNoRange -> let tps,_,_,_,cctorBody,_ = IteratedAdjustArityOfLambda cenv.g cenv.amap vspec.ValReprInfo.Value rhsExpr let eenv = EnvForTypars tps eenv CommitStartScope cgbuf startScopeMarkOpt GenExpr cenv cgbuf eenv SPSuppress cctorBody discard - | Method (topValInfo,_,mspec,_,paramInfos,retInfo) -> + | Method (topValInfo,_,mspec,_,paramInfos,methodArgTys,retInfo) -> let tps,ctorThisValOpt,baseValOpt,vsl,body',bodyty = IteratedAdjustArityOfLambda cenv.g cenv.amap topValInfo rhsExpr let methodVars = List.concat vsl CommitStartScope cgbuf startScopeMarkOpt - GenMethodForBinding cenv cgbuf eenv (vspec,mspec,access,paramInfos,retInfo) (topValInfo,ctorThisValOpt,baseValOpt,tps,methodVars, body', bodyty) + GenMethodForBinding cenv cgbuf eenv (vspec,mspec,access,paramInfos,retInfo) (topValInfo,ctorThisValOpt,baseValOpt,tps,methodVars, methodArgTys, body', bodyty) | StaticProperty (ilGetterMethSpec, optShadowLocal) -> let ilAttribs = GenAttrs cenv eenv vspec.Attribs let ilTy = ilGetterMethSpec.FormalReturnType let ilPropDef = - { Name = PrettyNaming.ChopPropertyName ilGetterMethSpec.Name - IsRTSpecialName = false - IsSpecialName = false - SetMethod = None - GetMethod = Some ilGetterMethSpec.MethodRef - CallingConv = ILThisConvention.Static - Type = ilTy - Init = None - Args = [] - CustomAttrs = mkILCustomAttrs ilAttribs } - cgbuf.mgbuf.AddOrMergePropertyDef(ilGetterMethSpec.MethodRef.EnclosingTypeRef, ilPropDef,m) + ILPropertyDef(name = PrettyNaming.ChopPropertyName ilGetterMethSpec.Name, + attributes = PropertyAttributes.None, + setMethod = None, + getMethod = Some ilGetterMethSpec.MethodRef, + callingConv = ILThisConvention.Static, + propertyType = ilTy, + init = None, + args = [], + customAttrs = mkILCustomAttrs ilAttribs) + cgbuf.mgbuf.AddOrMergePropertyDef(ilGetterMethSpec.MethodRef.DeclaringTypeRef, ilPropDef,m) let ilMethodDef = - let ilMethodBody = MethodBody.IL(CodeGenMethodForExpr cenv cgbuf.mgbuf (SPSuppress, [], ilGetterMethSpec.Name, eenv, 0, 0, rhsExpr, Return)) - mkILStaticMethod ([], ilGetterMethSpec.Name, access, [], mkILReturn ilTy, ilMethodBody) - |> AddSpecialNameFlag + let ilMethodBody = MethodBody.IL(CodeGenMethodForExpr cenv cgbuf.mgbuf (SPSuppress, [], ilGetterMethSpec.Name, eenv, 0, rhsExpr, Return)) + (mkILStaticMethod ([], ilGetterMethSpec.Name, access, [], mkILReturn ilTy, ilMethodBody)).WithSpecialName |> AddNonUserCompilerGeneratedAttribs cenv.g CountMethodDef() - cgbuf.mgbuf.AddMethodDef(ilGetterMethSpec.MethodRef.EnclosingTypeRef, ilMethodDef) + cgbuf.mgbuf.AddMethodDef(ilGetterMethSpec.MethodRef.DeclaringTypeRef, ilMethodDef) CommitStartScope cgbuf startScopeMarkOpt match optShadowLocal with @@ -4772,15 +4797,12 @@ and GenBindingAfterSequencePoint cenv cgbuf eenv sp (TBind(vspec,rhsExpr,_)) sta let ilFieldDef = mkILStaticField (fspec.Name, fty, None, None, access) let ilFieldDef = match vref.LiteralValue with - | Some konst -> { ilFieldDef with IsLiteral=true; LiteralValue= Some(GenFieldInit m konst) } + | Some konst -> ilFieldDef.WithLiteralDefaultValue( Some (GenFieldInit m konst) ) | None -> ilFieldDef let ilFieldDef = let isClassInitializer = (cgbuf.MethodName = ".cctor") - if mut || cenv.opts.isInteractiveItExpr || not isClassInitializer || hasLiteralAttr then - ilFieldDef - else - {ilFieldDef with IsInitOnly=true } + ilFieldDef.WithInitOnly(not (mut || cenv.opts.isInteractiveItExpr || not isClassInitializer || hasLiteralAttr)) let ilAttribs = if not hasLiteralAttr then @@ -4790,11 +4812,9 @@ and GenBindingAfterSequencePoint cenv cgbuf eenv sp (TBind(vspec,rhsExpr,_)) sta else GenAttrs cenv eenv vspec.Attribs // literals have no property, so preserve all the attributes on the field itself - let ilFieldDef = - { ilFieldDef with - CustomAttrs = mkILCustomAttrs (ilAttribs @ [ cenv.g.DebuggerBrowsableNeverAttribute ]) } + let ilFieldDef = ilFieldDef.With(customAttrs = mkILCustomAttrs (ilAttribs @ [ cenv.g.DebuggerBrowsableNeverAttribute ])) - [ (fspec.EnclosingTypeRef, ilFieldDef) ] + [ (fspec.DeclaringTypeRef, ilFieldDef) ] let ilTypeRefForProperty = ilTyForProperty.TypeRef @@ -4809,28 +4829,25 @@ and GenBindingAfterSequencePoint cenv cgbuf eenv sp (TBind(vspec,rhsExpr,_)) sta |> List.filter (fun (Attrib(_,_,_,_,_,targets,_)) -> canTarget(targets, System.AttributeTargets.Property)) |> GenAttrs cenv eenv // property only gets attributes that target properties let ilPropDef = - { Name=ilPropName - IsRTSpecialName=false - IsSpecialName=false - SetMethod=if mut || cenv.opts.isInteractiveItExpr then Some ilSetterMethRef else None - GetMethod=Some ilGetterMethRef - CallingConv=ILThisConvention.Static - Type=fty - Init=None - Args = [] - CustomAttrs=mkILCustomAttrs (ilAttribs @ [mkCompilationMappingAttr cenv.g (int SourceConstructFlags.Value)]) } + ILPropertyDef(name=ilPropName, + attributes = PropertyAttributes.None, + setMethod=(if mut || cenv.opts.isInteractiveItExpr then Some ilSetterMethRef else None), + getMethod=Some ilGetterMethRef, + callingConv=ILThisConvention.Static, + propertyType=fty, + init=None, + args = [], + customAttrs=mkILCustomAttrs (ilAttribs @ [mkCompilationMappingAttr cenv.g (int SourceConstructFlags.Value)])) cgbuf.mgbuf.AddOrMergePropertyDef(ilTypeRefForProperty,ilPropDef,m) let getterMethod = mkILStaticMethod([],ilGetterMethRef.Name,access,[],mkILReturn fty, - mkMethodBody(true,[],2,nonBranchingInstrsToCode [ mkNormalLdsfld fspec ],None)) - |> AddSpecialNameFlag + mkMethodBody(true,[],2,nonBranchingInstrsToCode [ mkNormalLdsfld fspec ],None)).WithSpecialName cgbuf.mgbuf.AddMethodDef(ilTypeRefForProperty,getterMethod) if mut || cenv.opts.isInteractiveItExpr then let setterMethod = mkILStaticMethod([],ilSetterMethRef.Name,access,[mkILParamNamed("value",fty)],mkILReturn ILType.Void, - mkMethodBody(true,[],2,nonBranchingInstrsToCode [ mkLdarg0;mkNormalStsfld fspec],None)) - |> AddSpecialNameFlag + mkMethodBody(true,[],2,nonBranchingInstrsToCode [ mkLdarg0;mkNormalStsfld fspec],None)).WithSpecialName cgbuf.mgbuf.AddMethodDef(ilTypeRefForProperty,setterMethod) GenBindingRhs cenv cgbuf eenv sp vspec rhsExpr @@ -4845,9 +4862,15 @@ and GenBindingAfterSequencePoint cenv cgbuf eenv sp (TBind(vspec,rhsExpr,_)) sta GenSetStorage m cgbuf storage | _ -> - GenBindingRhs cenv cgbuf eenv SPSuppress vspec rhsExpr - CommitStartScope cgbuf startScopeMarkOpt - GenStoreVal cgbuf eenv vspec.Range vspec + let storage = StorageForVal m vspec eenv + match storage, rhsExpr with + // locals are zero-init, no need to initialize them + | Local (_, realloc, _), Expr.Const(Const.Zero,_,_) when not realloc -> + CommitStartScope cgbuf startScopeMarkOpt + | _ -> + GenBindingRhs cenv cgbuf eenv SPSuppress vspec rhsExpr + CommitStartScope cgbuf startScopeMarkOpt + GenStoreVal cgbuf eenv vspec.Range vspec //------------------------------------------------------------------------- // Generate method bindings @@ -4969,7 +4992,8 @@ and GenMarshal cenv attribs = error(Error(FSComp.SR.ilCustomMarshallersCannotBeUsedInFSharp(),m)) (* ILNativeType.Custom of bytes * string * string * bytes (* GUID,nativeTypeName,custMarshallerName,cookieString *) *) //ILNativeType.Error - | 0x2D -> ILNativeType.Error + | 0x2D -> ILNativeType.Error + | 0x30 -> ILNativeType.LPUTF8STR | _ -> ILNativeType.Empty Some(decodeUnmanagedType unmanagedType), otherAttribs | Some (Attrib(_,_,_,_,_,_,m)) -> @@ -4979,9 +5003,9 @@ and GenMarshal cenv attribs = // No MarshalAs detected None, attribs -and GenParamAttribs cenv attribs = - let inFlag = HasFSharpAttributeOpt cenv.g cenv.g.attrib_InAttribute attribs - let outFlag = HasFSharpAttribute cenv.g cenv.g.attrib_OutAttribute attribs +and GenParamAttribs cenv paramTy attribs = + let inFlag = HasFSharpAttribute cenv.g cenv.g.attrib_InAttribute attribs || isInByrefTy cenv.g paramTy + let outFlag = HasFSharpAttribute cenv.g cenv.g.attrib_OutAttribute attribs || isOutByrefTy cenv.g paramTy let optionalFlag = HasFSharpAttributeOpt cenv.g cenv.g.attrib_OptionalAttribute attribs let defaultValue = TryFindFSharpAttributeOpt cenv.g cenv.g.attrib_DefaultParameterValueAttribute attribs @@ -4990,7 +5014,7 @@ and GenParamAttribs cenv attribs = // as custom attributes in the code - they are implicit from the IL bits for these let attribs = attribs - |> List.filter (IsMatchingFSharpAttributeOpt cenv.g cenv.g.attrib_InAttribute >> not) + |> List.filter (IsMatchingFSharpAttribute cenv.g cenv.g.attrib_InAttribute >> not) |> List.filter (IsMatchingFSharpAttribute cenv.g cenv.g.attrib_OutAttribute >> not) |> List.filter (IsMatchingFSharpAttributeOpt cenv.g cenv.g.attrib_OptionalAttribute >> not) |> List.filter (IsMatchingFSharpAttributeOpt cenv.g cenv.g.attrib_DefaultParameterValueAttribute >> not) @@ -4998,7 +5022,7 @@ and GenParamAttribs cenv attribs = let Marshal,attribs = GenMarshal cenv attribs inFlag,outFlag,optionalFlag,defaultValue,Marshal,attribs -and GenParams cenv eenv (mspec:ILMethodSpec) (attribs:ArgReprInfo list) (implValsOpt: Val list option) = +and GenParams cenv eenv (mspec:ILMethodSpec) (attribs:ArgReprInfo list) methodArgTys (implValsOpt: Val list option) = let ilArgTys = mspec.FormalArgTypes let argInfosAndTypes = if List.length attribs = List.length ilArgTys then List.zip ilArgTys attribs @@ -5011,9 +5035,9 @@ and GenParams cenv eenv (mspec:ILMethodSpec) (attribs:ArgReprInfo list) (implVal | _ -> List.map (fun x -> x,None) argInfosAndTypes - (Set.empty,argInfosAndTypes) - ||> List.mapFold (fun takenNames ((ilArgTy,topArgInfo),implValOpt) -> - let inFlag,outFlag,optionalFlag,defaultParamValue,Marshal,attribs = GenParamAttribs cenv topArgInfo.Attribs + (Set.empty,List.zip methodArgTys argInfosAndTypes) + ||> List.mapFold (fun takenNames (methodArgTy, ((ilArgTy,topArgInfo),implValOpt)) -> + let inFlag,outFlag,optionalFlag,defaultParamValue,Marshal,attribs = GenParamAttribs cenv methodArgTy topArgInfo.Attribs let idOpt = (match topArgInfo.Name with | Some v -> Some v @@ -5029,6 +5053,14 @@ and GenParams cenv eenv (mspec:ILMethodSpec) (attribs:ArgReprInfo list) (implVal | None -> None, takenNames + + let ilAttribs = GenAttrs cenv eenv attribs + + let ilAttribs = + match GenReadOnlyAttributeIfNecessary cenv.g methodArgTy with + | Some attr -> ilAttribs @ [attr] + | None -> ilAttribs + let param : ILParameter = { Name=nmOpt Type= ilArgTy @@ -5037,47 +5069,47 @@ and GenParams cenv eenv (mspec:ILMethodSpec) (attribs:ArgReprInfo list) (implVal IsIn=inFlag IsOut=outFlag IsOptional=optionalFlag - CustomAttrs= mkILCustomAttrs (GenAttrs cenv eenv attribs) } + CustomAttrsStored = storeILCustomAttrs (mkILCustomAttrs ilAttribs) + MetadataIndex = NoMetadataIdx } param, takenNames) |> fst and GenReturnInfo cenv eenv ilRetTy (retInfo : ArgReprInfo) : ILReturn = - let marshal,attrs = GenMarshal cenv retInfo.Attribs + let marshal,attribs = GenMarshal cenv retInfo.Attribs { Type=ilRetTy Marshal=marshal - CustomAttrs= mkILCustomAttrs (GenAttrs cenv eenv attrs) } + CustomAttrsStored= storeILCustomAttrs (mkILCustomAttrs (GenAttrs cenv eenv attribs)) + MetadataIndex = NoMetadataIdx } and GenPropertyForMethodDef compileAsInstance tref mdef (v:Val) (memberInfo:ValMemberInfo) ilArgTys ilPropTy ilAttrs compiledName = let name = match compiledName with | Some n -> n | _ -> v.PropertyName in (* chop "get_" *) - { Name=name - IsRTSpecialName=false - IsSpecialName=false - SetMethod=(if memberInfo.MemberFlags.MemberKind= MemberKind.PropertySet then Some(mkRefToILMethod(tref,mdef)) else None) - GetMethod=(if memberInfo.MemberFlags.MemberKind= MemberKind.PropertyGet then Some(mkRefToILMethod(tref,mdef)) else None) - CallingConv=(if compileAsInstance then ILThisConvention.Instance else ILThisConvention.Static) - Type=ilPropTy - Init=None - Args = ilArgTys - CustomAttrs=ilAttrs } + ILPropertyDef(name = name, + attributes = PropertyAttributes.None, + setMethod = (if memberInfo.MemberFlags.MemberKind= MemberKind.PropertySet then Some(mkRefToILMethod(tref,mdef)) else None), + getMethod = (if memberInfo.MemberFlags.MemberKind= MemberKind.PropertyGet then Some(mkRefToILMethod(tref,mdef)) else None), + callingConv = (if compileAsInstance then ILThisConvention.Instance else ILThisConvention.Static), + propertyType = ilPropTy, + init = None, + args = ilArgTys, + customAttrs = ilAttrs) and GenEventForProperty cenv eenvForMeth (mspec:ILMethodSpec) (v:Val) ilAttrsThatGoOnPrimaryItem m returnTy = let evname = v.PropertyName let delegateTy = Infos.FindDelegateTypeOfPropertyEvent cenv.g cenv.amap evname m returnTy let ilDelegateTy = GenType cenv.amap m eenvForMeth.tyenv delegateTy - let ilThisTy = mspec.EnclosingType + let ilThisTy = mspec.DeclaringType let addMethRef = mkILMethRef (ilThisTy.TypeRef,mspec.CallingConv,"add_" + evname,0,[ilDelegateTy],ILType.Void) let removeMethRef = mkILMethRef (ilThisTy.TypeRef,mspec.CallingConv,"remove_" + evname,0,[ilDelegateTy],ILType.Void) - { Type = Some(ilDelegateTy) - Name= evname - IsRTSpecialName=false - IsSpecialName=false - AddMethod = addMethRef - RemoveMethod = removeMethRef - FireMethod= None - OtherMethods= [] - CustomAttrs = mkILCustomAttrs ilAttrsThatGoOnPrimaryItem } + ILEventDef(eventType = Some ilDelegateTy, + name= evname, + attributes = EventAttributes.None, + addMethod = addMethRef, + removeMethod = removeMethRef, + fireMethod= None, + otherMethods= [], + customAttrs = mkILCustomAttrs ilAttrsThatGoOnPrimaryItem) and ComputeFlagFixupsForMemberBinding cenv (v:Val,memberInfo:ValMemberInfo) = @@ -5086,28 +5118,35 @@ and ComputeFlagFixupsForMemberBinding cenv (v:Val,memberInfo:ValMemberInfo) = else memberInfo.ImplementedSlotSigs |> List.map (fun slotsig -> let oty = slotsig.ImplementedType - let otcref,_ = destAppTy cenv.g oty - let tcref = v.MemberApparentParent + let otcref = tcrefOfAppTy cenv.g oty + let tcref = v.MemberApparentEntity - let useMethodImpl = - // REVIEW: it would be good to get rid of this special casing of Compare and GetHashCode during code generation - let isCompare = - (Option.isSome tcref.GeneratedCompareToValues && typeEquiv cenv.g oty cenv.g.mk_IComparable_ty) || - (Option.isSome tcref.GeneratedCompareToValues && tyconRefEq cenv.g cenv.g.system_GenericIComparable_tcref otcref) - - let isGenericEquals = - (Option.isSome tcref.GeneratedHashAndEqualsWithComparerValues && tyconRefEq cenv.g cenv.g.system_GenericIEquatable_tcref otcref) - - let isStructural = - (Option.isSome tcref.GeneratedCompareToWithComparerValues && typeEquiv cenv.g oty cenv.g.mk_IStructuralComparable_ty) || - (Option.isSome tcref.GeneratedHashAndEqualsWithComparerValues && typeEquiv cenv.g oty cenv.g.mk_IStructuralEquatable_ty) - isInterfaceTy cenv.g oty && not isCompare && not isStructural && not isGenericEquals + let useMethodImpl = + // REVIEW: it would be good to get rid of this special casing of Compare and GetHashCode during code generation + isInterfaceTy cenv.g oty && + (let isCompare = + Option.isSome tcref.GeneratedCompareToValues && + (typeEquiv cenv.g oty cenv.g.mk_IComparable_ty || + tyconRefEq cenv.g cenv.g.system_GenericIComparable_tcref otcref) + + not isCompare) && + + (let isGenericEquals = + Option.isSome tcref.GeneratedHashAndEqualsWithComparerValues && tyconRefEq cenv.g cenv.g.system_GenericIEquatable_tcref otcref + + not isGenericEquals) && + (let isStructural = + (Option.isSome tcref.GeneratedCompareToWithComparerValues && typeEquiv cenv.g oty cenv.g.mk_IStructuralComparable_ty) || + (Option.isSome tcref.GeneratedHashAndEqualsWithComparerValues && typeEquiv cenv.g oty cenv.g.mk_IStructuralEquatable_ty) + not isStructural) let nameOfOverridingMethod = GenNameOfOverridingMethod cenv (useMethodImpl,slotsig) - (if useMethodImpl then fixupMethodImplFlags >> renameMethodDef nameOfOverridingMethod - else fixupVirtualSlotFlags >> renameMethodDef nameOfOverridingMethod)) + if useMethodImpl then + fixupMethodImplFlags >> renameMethodDef nameOfOverridingMethod + else + fixupVirtualSlotFlags >> renameMethodDef nameOfOverridingMethod) and ComputeMethodImplAttribs cenv (_v:Val) attrs = let implflags = @@ -5139,7 +5178,7 @@ and ComputeMethodImplAttribs cenv (_v:Val) attrs = and GenMethodForBinding cenv cgbuf eenv (v:Val,mspec,access,paramInfos,retInfo) - (topValInfo,ctorThisValOpt,baseValOpt,tps,methodVars, body, returnTy) = + (topValInfo,ctorThisValOpt,baseValOpt,tps,methodVars, methodArgTys, body, returnTy) = let m = v.Range let selfMethodVars,nonSelfMethodVars,compileAsInstance = @@ -5153,6 +5192,7 @@ and GenMethodForBinding let nonUnitNonSelfMethodVars,body = BindUnitVars cenv.g (nonSelfMethodVars,paramInfos,body) let nonUnitMethodVars = selfMethodVars@nonUnitNonSelfMethodVars let cmtps,curriedArgInfos,_,_ = GetTopValTypeInCompiledForm cenv.g topValInfo v.Type v.Range + let eenv = bindBaseOrThisVarOpt cenv eenv ctorThisValOpt let eenv = bindBaseOrThisVarOpt cenv eenv baseValOpt @@ -5179,7 +5219,7 @@ and GenMethodForBinding // Now generate the code. - let hasPreserveSigNamedArg,ilMethodBody,_hasDllImport = + let hasPreserveSigNamedArg,ilMethodBody,hasDllImport = match TryFindFSharpAttributeOpt cenv.g cenv.g.attrib_DllImportAttribute v.Attribs with | Some (Attrib(_,_,[ AttribStringArg(dll) ],namedArgs,_,_,m)) -> if not (isNil tps) then error(Error(FSComp.SR.ilSignatureForExternalFunctionContainsTypeParameters(),m)) @@ -5193,15 +5233,15 @@ and GenMethodForBinding // However still generate the code for reflection etc. let bodyExpr = if HasFSharpAttribute cenv.g cenv.g.attrib_NoDynamicInvocationAttribute v.Attribs then - mkThrow m returnTy - (mkExnExpr(cenv.g.FindSysTyconRef ["System"] "NotSupportedException", - [ mkString cenv.g m (FSComp.SR.ilDynamicInvocationNotSupported(v.CompiledName))],m)) + let exnArg = mkString cenv.g m (FSComp.SR.ilDynamicInvocationNotSupported(v.CompiledName)) + let exnExpr = MakeNotSupportedExnExpr cenv eenv (exnArg, m) + mkThrow m returnTy exnExpr else body // This is the main code generation for most methods false, - MethodBody.IL(CodeGenMethodForExpr cenv cgbuf.mgbuf (SPAlways,tailCallInfo, mspec.Name, eenvForMeth, 0, 0, bodyExpr, sequel)), + MethodBody.IL(CodeGenMethodForExpr cenv cgbuf.mgbuf (SPAlways,tailCallInfo, mspec.Name, eenvForMeth, 0, bodyExpr, sequel)), false // Do not generate DllImport attributes into the code - they are implicit from the P/Invoke @@ -5225,7 +5265,7 @@ and GenMethodForBinding let permissionSets = CreatePermissionSets cenv.g cenv.amap eenv securityAttributes - let secDecls = if securityAttributes.Length > 0 then (mkILSecurityDecls permissionSets) else (emptyILSecurityDecls) + let secDecls = if List.isEmpty securityAttributes then emptyILSecurityDecls else mkILSecurityDecls permissionSets // Do not push the attributes to the method for events and properties let ilAttrsCompilerGenerated = if v.IsCompilerGenerated then [ cenv.g.CompilerGeneratedAttribute ] else [] @@ -5235,33 +5275,33 @@ and GenMethodForBinding yield! GenCompilationArgumentCountsAttr cenv v ] let ilTypars = GenGenericParams cenv eenvUnderMethLambdaTypars tps - let ilParams = GenParams cenv eenv mspec paramInfos (Some(nonUnitNonSelfMethodVars)) + let ilParams = GenParams cenv eenv mspec paramInfos methodArgTys (Some(nonUnitNonSelfMethodVars)) let ilReturn = GenReturnInfo cenv eenv mspec.FormalReturnType retInfo let methName = mspec.Name - let tref = mspec.MethodRef.EnclosingTypeRef + let tref = mspec.MethodRef.DeclaringTypeRef - let EmitTheMethodDef mdef = + let EmitTheMethodDef (mdef:ILMethodDef) = // Does the function have an explicit [] attribute? let isExplicitEntryPoint = HasFSharpAttribute cenv.g cenv.g.attrib_EntryPointAttribute attrs - + let mdef = - {mdef with - IsPreserveSig = hasPreserveSigImplFlag || hasPreserveSigNamedArg - IsSynchronized = hasSynchronizedImplFlag - IsEntryPoint = isExplicitEntryPoint - IsNoInline = hasNoInliningFlag - IsAggressiveInline = hasAggressiveInliningImplFlag - HasSecurity = mdef.HasSecurity || (securityAttributes.Length > 0) - SecurityDecls = secDecls } + mdef + .WithSecurity(not (List.isEmpty securityAttributes)) + .WithPInvoke(hasDllImport) + .WithPreserveSig(hasPreserveSigImplFlag || hasPreserveSigNamedArg) + .WithSynchronized(hasSynchronizedImplFlag) + .WithNoInlining(hasNoInliningFlag) + .WithAggressiveInlining(hasAggressiveInliningImplFlag) + .With(isEntryPoint=isExplicitEntryPoint, securityDecls=secDecls) let mdef = if // operator names - mdef.Name.StartsWith("op_",System.StringComparison.Ordinal) || + mdef.Name.StartsWithOrdinal("op_") || // active pattern names - mdef.Name.StartsWith("|",System.StringComparison.Ordinal) || + mdef.Name.StartsWithOrdinal("|") || // event add/remove method v.val_flags.IsGeneratedEventVal then - {mdef with IsSpecialName=true} + mdef.WithSpecialName else mdef CountMethodDef() @@ -5275,17 +5315,17 @@ and GenMethodForBinding () | Some(memberInfo) when not v.IsExtensionMember -> - let ilMethTypars = ilTypars |> List.drop mspec.EnclosingType.GenericArgs.Length + let ilMethTypars = ilTypars |> List.drop mspec.DeclaringType.GenericArgs.Length if memberInfo.MemberFlags.MemberKind = MemberKind.Constructor then assert (isNil ilMethTypars) let mdef = mkILCtor (access,ilParams,ilMethodBody) - let mdef = { mdef with CustomAttrs= mkILCustomAttrs (ilAttrsThatGoOnPrimaryItem @ sourceNameAttribs @ ilAttrsCompilerGenerated) } + let mdef = mdef.With(customAttrs= mkILCustomAttrs (ilAttrsThatGoOnPrimaryItem @ sourceNameAttribs @ ilAttrsCompilerGenerated)) EmitTheMethodDef mdef elif memberInfo.MemberFlags.MemberKind = MemberKind.ClassConstructor then assert (isNil ilMethTypars) let mdef = mkILClassCtor ilMethodBody - let mdef = { mdef with CustomAttrs= mkILCustomAttrs (ilAttrsThatGoOnPrimaryItem @ sourceNameAttribs @ ilAttrsCompilerGenerated) } + let mdef = mdef.With(customAttrs= mkILCustomAttrs (ilAttrsThatGoOnPrimaryItem @ sourceNameAttribs @ ilAttrsCompilerGenerated)) EmitTheMethodDef mdef // Generate virtual/override methods + method-impl information if needed @@ -5309,16 +5349,13 @@ and GenMethodForBinding let isAbstract = memberInfo.MemberFlags.IsDispatchSlot && - let tcref = v.MemberApparentParent + let tcref = v.MemberApparentEntity not tcref.Deref.IsFSharpDelegateTycon let mdef = - {mdef with - mdKind=match mdef.mdKind with - | MethodKind.Virtual vinfo -> - MethodKind.Virtual {vinfo with IsFinal=memberInfo.MemberFlags.IsFinal - IsAbstract=isAbstract } - | k -> k } + if mdef.IsVirtual then + mdef.WithFinal(memberInfo.MemberFlags.IsFinal).WithAbstract(isAbstract) + else mdef match memberInfo.MemberFlags.MemberKind with @@ -5345,11 +5382,10 @@ and GenMethodForBinding cgbuf.mgbuf.AddOrMergePropertyDef(tref,ilPropDef,m) // Add the special name flag for all properties - let mdef = mdef |> AddSpecialNameFlag - let mdef = { mdef with CustomAttrs= mkILCustomAttrs ((GenAttrs cenv eenv attrsAppliedToGetterOrSetter) @ sourceNameAttribs @ ilAttrsCompilerGenerated) } + let mdef = mdef.WithSpecialName.With(customAttrs= mkILCustomAttrs ((GenAttrs cenv eenv attrsAppliedToGetterOrSetter) @ sourceNameAttribs @ ilAttrsCompilerGenerated)) EmitTheMethodDef mdef | _ -> - let mdef = { mdef with CustomAttrs= mkILCustomAttrs (ilAttrsThatGoOnPrimaryItem @ sourceNameAttribs @ ilAttrsCompilerGenerated) } + let mdef = mdef.With(customAttrs= mkILCustomAttrs (ilAttrsThatGoOnPrimaryItem @ sourceNameAttribs @ ilAttrsCompilerGenerated)) EmitTheMethodDef mdef | _ -> @@ -5365,7 +5401,7 @@ and GenMethodForBinding | _ -> ilAttrsThatGoOnPrimaryItem let ilCustomAttrs = mkILCustomAttrs (ilAttrs @ sourceNameAttribs @ ilAttrsCompilerGenerated) - let mdef = { mdef with CustomAttrs= ilCustomAttrs } + let mdef = mdef.With(customAttrs= ilCustomAttrs) EmitTheMethodDef mdef @@ -5452,47 +5488,55 @@ and CommitStartScope cgbuf startScopeMarkOpt = | None -> () | Some ss -> cgbuf.SetMarkToHere(ss) -and EmitInitLocal cgbuf typ idx = CG.EmitInstrs cgbuf (pop 0) Push0 [I_ldloca (uint16 idx); (I_initobj typ) ] +and EmitInitLocal cgbuf ty idx = CG.EmitInstrs cgbuf (pop 0) Push0 [I_ldloca (uint16 idx); (I_initobj ty) ] and EmitSetLocal cgbuf idx = CG.EmitInstr cgbuf (pop 1) Push0 (mkStloc (uint16 idx)) -and EmitGetLocal cgbuf typ idx = CG.EmitInstr cgbuf (pop 0) (Push [typ]) (mkLdloc (uint16 idx)) +and EmitGetLocal cgbuf ty idx = CG.EmitInstr cgbuf (pop 0) (Push [ty]) (mkLdloc (uint16 idx)) and EmitSetStaticField cgbuf fspec = CG.EmitInstr cgbuf (pop 1) Push0 (mkNormalStsfld fspec) -and EmitGetStaticFieldAddr cgbuf typ fspec = CG.EmitInstr cgbuf (pop 0) (Push [typ]) (I_ldsflda fspec) -and EmitGetStaticField cgbuf typ fspec = CG.EmitInstr cgbuf (pop 0) (Push [typ]) (mkNormalLdsfld fspec) +and EmitGetStaticFieldAddr cgbuf ty fspec = CG.EmitInstr cgbuf (pop 0) (Push [ty]) (I_ldsflda fspec) +and EmitGetStaticField cgbuf ty fspec = CG.EmitInstr cgbuf (pop 0) (Push [ty]) (mkNormalLdsfld fspec) and GenSetStorage m cgbuf storage = match storage with - | Local (idx,_) -> EmitSetLocal cgbuf idx + | Local (idx, _, _) -> + EmitSetLocal cgbuf idx + | StaticField (_, _, hasLiteralAttr, ilContainerTy, _, _, _, ilSetterMethRef, _) -> if hasLiteralAttr then errorR(Error(FSComp.SR.ilLiteralFieldsCannotBeSet(),m)) CG.EmitInstr cgbuf (pop 1) Push0 (I_call(Normalcall,mkILMethSpecForMethRefInTy(ilSetterMethRef,ilContainerTy,[]),None)) + | StaticProperty (ilGetterMethSpec,_) -> error(Error(FSComp.SR.ilStaticMethodIsNotLambda(ilGetterMethSpec.Name),m)) - | Method (_,_,mspec,m,_,_) -> + + | Method (_,_,mspec,m,_,_,_) -> error(Error(FSComp.SR.ilStaticMethodIsNotLambda(mspec.Name),m)) - | Null -> CG.EmitInstr cgbuf (pop 1) Push0 AI_pop - | Arg _ -> error(Error(FSComp.SR.ilMutableVariablesCannotEscapeMethod(),m)) + + | Null -> + CG.EmitInstr cgbuf (pop 1) Push0 AI_pop + + | Arg _ -> + error(Error(FSComp.SR.ilMutableVariablesCannotEscapeMethod(),m)) | Env (_,_,ilField,_) -> // Note: ldarg0 has already been emitted in GenSetVal CG.EmitInstr cgbuf (pop 2) Push0 (mkNormalStfld ilField) -and CommitGetStorageSequel cenv cgbuf eenv m typ localCloInfo storeSequel = +and CommitGetStorageSequel cenv cgbuf eenv m ty localCloInfo storeSequel = match localCloInfo,storeSequel with | Some {contents =NamedLocalIlxClosureInfoGenerator _cloinfo},_ -> error(InternalError("Unexpected generator",m)) | Some {contents =NamedLocalIlxClosureInfoGenerated cloinfo},Some (tyargs,args,m,sequel) when not (isNil tyargs) -> - let actualRetTy = GenNamedLocalTyFuncCall cenv cgbuf eenv typ cloinfo tyargs m + let actualRetTy = GenNamedLocalTyFuncCall cenv cgbuf eenv ty cloinfo tyargs m CommitGetStorageSequel cenv cgbuf eenv m actualRetTy None (Some ([],args,m,sequel)) | _, None -> () | _,Some ([],[],_,sequel) -> GenSequel cenv eenv.cloc cgbuf sequel | _,Some (tyargs,args,m,sequel) -> - GenArgsAndIndirectCall cenv cgbuf eenv (typ,tyargs,args,m) sequel + GenArgsAndIndirectCall cenv cgbuf eenv (ty,tyargs,args,m) sequel -and GenGetStorageAndSequel cenv cgbuf eenv m (typ,ilTy) storage storeSequel = +and GenGetStorageAndSequel cenv cgbuf eenv m (ty,ilTy) storage storeSequel = match storage with - | Local (idx,localCloInfo) -> + | Local (idx, _, localCloInfo) -> EmitGetLocal cgbuf ilTy idx - CommitGetStorageSequel cenv cgbuf eenv m typ localCloInfo storeSequel + CommitGetStorageSequel cenv cgbuf eenv m ty localCloInfo storeSequel | StaticField (fspec, _, hasLiteralAttr, ilContainerTy, _, _, ilGetterMethRef, _, _) -> // References to literals go directly to the field - no property is used @@ -5500,13 +5544,13 @@ and GenGetStorageAndSequel cenv cgbuf eenv m (typ,ilTy) storage storeSequel = EmitGetStaticField cgbuf ilTy fspec else CG.EmitInstr cgbuf (pop 0) (Push [ilTy]) (I_call(Normalcall, mkILMethSpecForMethRefInTy (ilGetterMethRef, ilContainerTy, []), None)) - CommitGetStorageSequel cenv cgbuf eenv m typ None storeSequel + CommitGetStorageSequel cenv cgbuf eenv m ty None storeSequel | StaticProperty (ilGetterMethSpec, _) -> CG.EmitInstr cgbuf (pop 0) (Push [ilTy]) (I_call (Normalcall, ilGetterMethSpec, None)) - CommitGetStorageSequel cenv cgbuf eenv m typ None storeSequel + CommitGetStorageSequel cenv cgbuf eenv m ty None storeSequel - | Method (topValInfo,vref,mspec,_,_,_) -> + | Method (topValInfo,vref,mspec,_,_,_,_) -> // Get a toplevel value as a first-class value. // We generate a lambda expression and that simply calls // the toplevel method. However we optimize the case where we are @@ -5528,16 +5572,16 @@ and GenGetStorageAndSequel cenv cgbuf eenv m (typ,ilTy) storage storeSequel = | Null -> CG.EmitInstr cgbuf (pop 0) (Push [ilTy]) (AI_ldnull) - CommitGetStorageSequel cenv cgbuf eenv m typ None storeSequel + CommitGetStorageSequel cenv cgbuf eenv m ty None storeSequel | Arg i -> CG.EmitInstr cgbuf (pop 0) (Push [ilTy]) (mkLdarg (uint16 i)) - CommitGetStorageSequel cenv cgbuf eenv m typ None storeSequel + CommitGetStorageSequel cenv cgbuf eenv m ty None storeSequel | Env (_,_,ilField,localCloInfo) -> // Note: ldarg 0 is emitted in 'cu_erase' erasure of the ldenv instruction CG.EmitInstrs cgbuf (pop 0) (Push [ilTy]) [ mkLdarg0; mkNormalLdfld ilField ] - CommitGetStorageSequel cenv cgbuf eenv m typ localCloInfo storeSequel + CommitGetStorageSequel cenv cgbuf eenv m ty localCloInfo storeSequel and GenGetLocalVals cenv cgbuf eenvouter m fvs = List.iter (fun v -> GenGetLocalVal cenv cgbuf eenvouter m v None) fvs @@ -5559,11 +5603,12 @@ and AllocLocal cenv cgbuf eenv compgen (v,ty,isFixed) (scopeMarks: Mark * Mark) // The debug range for the local let ranges = if compgen then [] else [(v,scopeMarks)] // Get an index for the local - let j = - if cenv.opts.localOptimizationsAreOn - then cgbuf.ReallocLocal((fun i (_,ty',isFixed') -> not isFixed' && not isFixed && not (IntMap.mem i eenv.liveLocals) && (ty = ty')),ranges,ty,isFixed) - else cgbuf.AllocLocal(ranges,ty,isFixed) - j, { eenv with liveLocals = IntMap.add j () eenv.liveLocals } + let j, realloc = + if cenv.opts.localOptimizationsAreOn then + cgbuf.ReallocLocal((fun i (_,ty',isFixed') -> not isFixed' && not isFixed && not (IntMap.mem i eenv.liveLocals) && (ty = ty')),ranges,ty,isFixed) + else + cgbuf.AllocLocal(ranges,ty,isFixed), false + j, realloc, { eenv with liveLocals = IntMap.add j () eenv.liveLocals } and AllocLocalVal cenv cgbuf v eenv repr scopeMarks = let repr,eenv = @@ -5578,12 +5623,12 @@ and AllocLocalVal cenv cgbuf v eenv repr scopeMarks = let cloinfo,_,_ = GetIlxClosureInfo cenv v.Range true None eenvinner (Option.get repr) cloinfo - let idx,eenv = AllocLocal cenv cgbuf eenv v.IsCompilerGenerated (v.CompiledName, cenv.g.ilg.typ_Object, false) scopeMarks - Local (idx,Some(ref (NamedLocalIlxClosureInfoGenerator cloinfoGenerate))),eenv + let idx, realloc, eenv = AllocLocal cenv cgbuf eenv v.IsCompilerGenerated (v.CompiledName, cenv.g.ilg.typ_Object, false) scopeMarks + Local (idx, realloc, Some(ref (NamedLocalIlxClosureInfoGenerator cloinfoGenerate))),eenv else (* normal local *) - let idx,eenv = AllocLocal cenv cgbuf eenv v.IsCompilerGenerated (v.CompiledName, GenTypeOfVal cenv eenv v, v.IsFixed) scopeMarks - Local (idx,None),eenv + let idx, realloc, eenv = AllocLocal cenv cgbuf eenv v.IsCompilerGenerated (v.CompiledName, GenTypeOfVal cenv eenv v, v.IsFixed) scopeMarks + Local (idx,realloc, None),eenv let eenv = AddStorageForVal cenv.g (v,notlazy repr) eenv Some repr, eenv @@ -5600,7 +5645,7 @@ and AllocStorageForBinds cenv cgbuf scopeMarks eenv binds = match reprOpt with | Some repr -> match repr with - | Local(_,Some g) + | Local(_, _, Some g) | Env(_,_,_,Some g) -> match !g with | NamedLocalIlxClosureInfoGenerator f -> g := NamedLocalIlxClosureInfoGenerated (f eenv) @@ -5651,7 +5696,10 @@ and AllocTopValWithinExpr cenv cgbuf cloc scopeMarks v eenv = /// - and because IL requires empty stack following a forward br (jump). and EmitSaveStack cenv cgbuf eenv m scopeMarks = let savedStack = (cgbuf.GetCurrentStack()) - let savedStackLocals,eenvinner = List.mapFold (fun eenv ty -> AllocLocal cenv cgbuf eenv true (ilxgenGlobalNng.FreshCompilerGeneratedName ("spill",m), ty, false) scopeMarks) eenv savedStack + let savedStackLocals,eenvinner = + (eenv, savedStack) ||> List.mapFold (fun eenv ty -> + let idx, _realloc, eenv = AllocLocal cenv cgbuf eenv true (ilxgenGlobalNng.FreshCompilerGeneratedName ("spill",m), ty, false) scopeMarks + idx, eenv) List.iter (EmitSetLocal cgbuf) savedStackLocals cgbuf.AssertEmptyStack() (savedStack,savedStackLocals),eenvinner (* need to return, it marks locals "live" *) @@ -5759,7 +5807,7 @@ and GenAttr amap g eenv (Attrib(_,k,args,props,_,_,_)) = | ILAttrib(mref) -> mkILMethSpec(mref,AsObject,[],[]) | FSAttrib(vref) -> assert(vref.IsMember) - let mspec,_,_,_,_ = GetMethodSpecForMemberVal amap g (Option.get vref.MemberInfo) vref + let mspec,_,_,_,_,_ = GetMethodSpecForMemberVal amap g (Option.get vref.MemberInfo) vref mspec let ilArgs = List.map2 (fun (AttribExpr(_,vexpr)) ty -> GenAttribArg amap g eenv vexpr ty) args mspec.FormalArgTypes mkILCustomAttribMethRef g.ilg (mspec,ilArgs, props) @@ -5811,12 +5859,12 @@ and GenTypeDefForCompLoc (cenv, eenv, mgbuf: AssemblyBuilder, cloc, hidden, attr then [ ] else [mkCompilationMappingAttr cenv.g (int SourceConstructFlags.Module)])), initTrigger) - let tdef = { tdef with IsSealed=true; IsAbstract=true } + let tdef = tdef.WithSealed(true).WithAbstract(true) mgbuf.AddTypeDef(tref, tdef, eliminateIfEmpty, addAtEnd, None) and GenModuleExpr cenv cgbuf qname lazyInitInfo eenv x = - let (ModuleOrNamespaceExprWithSig(mty,def,_)) = x + let (ModuleOrNamespaceExprWithSig(mty, def, _)) = x // REVIEW: the scopeMarks are used for any shadow locals we create for the module bindings // We use one scope for all the bindings in the module, which makes them all appear with their "default" values // rather than incrementally as we step through the initializations in the module. This is a little unfortunate @@ -5939,7 +5987,7 @@ and GenTopImpl cenv mgbuf mainInfoOpt eenv (TImplFile(qname, _, mexpr, hasExplic // topInstrs is ILInstr[] and contains the abstract IL for this file's top-level actions. topCode is the ILMethodBody for that same code. let topInstrs,topCode = CodeGenMethod cenv mgbuf - ([],methodName,eenv,0,0, + ([],methodName,eenv,0, (fun cgbuf eenv -> GenModuleExpr cenv cgbuf qname lazyInitInfo eenv mexpr CG.EmitInstr cgbuf (pop 0) Push0 I_ret),m) @@ -5998,7 +6046,7 @@ and GenTopImpl cenv mgbuf mainInfoOpt eenv (TImplFile(qname, _, mexpr, hasExplic // generate main@ let ilMainMethodDef = let mdef = mkILNonGenericStaticMethod(mainMethName,ILMemberAccess.Public,[],mkILReturn ILType.Void, MethodBody.IL topCode) - {mdef with IsEntryPoint= true; CustomAttrs = ilAttrs } + mdef.With(isEntryPoint= true, customAttrs = ilAttrs) mgbuf.AddMethodDef(initClassTy.TypeRef,ilMainMethodDef) @@ -6088,33 +6136,27 @@ and GenAbstractBinding cenv eenv tref (vref:ValRef) = [ yield! GenAttrs cenv eenv attribs yield! GenCompilationArgumentCountsAttr cenv vref.Deref ] - let mspec,ctps,mtps,argInfos,retInfo = GetMethodSpecForMemberVal cenv.amap cenv.g memberInfo vref + let mspec,ctps,mtps,argInfos,retInfo,methodArgTys = GetMethodSpecForMemberVal cenv.amap cenv.g memberInfo vref let eenvForMeth = EnvForTypars (ctps@mtps) eenv let ilMethTypars = GenGenericParams cenv eenvForMeth mtps let ilReturn = GenReturnInfo cenv eenvForMeth mspec.FormalReturnType retInfo - let ilParams = GenParams cenv eenvForMeth mspec argInfos None + let ilParams = GenParams cenv eenvForMeth mspec argInfos methodArgTys None let compileAsInstance = ValRefIsCompiledAsInstanceMember cenv.g vref let mdef = mkILGenericVirtualMethod (vref.CompiledName,ILMemberAccess.Public,ilMethTypars,ilParams,ilReturn,MethodBody.Abstract) let mdef = fixupVirtualSlotFlags mdef let mdef = - {mdef with - IsPreserveSig=hasPreserveSigImplFlag - IsSynchronized=hasSynchronizedImplFlag - IsNoInline=hasNoInliningFlag - IsAggressiveInline=hasAggressiveInliningImplFlag - mdKind=match mdef.mdKind with - | MethodKind.Virtual vinfo -> - MethodKind.Virtual {vinfo with IsFinal=memberInfo.MemberFlags.IsFinal - IsAbstract=memberInfo.MemberFlags.IsDispatchSlot } - | k -> k } + if mdef.IsVirtual then + mdef.WithFinal(memberInfo.MemberFlags.IsFinal).WithAbstract(memberInfo.MemberFlags.IsDispatchSlot) + else mdef + let mdef = mdef.WithPreserveSig(hasPreserveSigImplFlag).WithSynchronized(hasSynchronizedImplFlag).WithNoInlining(hasNoInliningFlag).WithAggressiveInlining(hasAggressiveInliningImplFlag) match memberInfo.MemberFlags.MemberKind with | MemberKind.ClassConstructor | MemberKind.Constructor | MemberKind.Member -> - let mdef = {mdef with CustomAttrs= mkILCustomAttrs ilAttrs } + let mdef = mdef.With(customAttrs= mkILCustomAttrs ilAttrs) [mdef], [], [] | MemberKind.PropertyGetSet -> error(Error(FSComp.SR.ilUnexpectedGetSetAnnotation(),m)) | MemberKind.PropertySet | MemberKind.PropertyGet -> @@ -6129,7 +6171,7 @@ and GenAbstractBinding cenv eenv tref (vref:ValRef) = let ilPropTy = GenType cenv.amap m eenvForMeth.tyenv vtyp let ilArgTys = v |> ArgInfosOfPropertyVal cenv.g |> List.map fst |> GenTypes cenv.amap m eenvForMeth.tyenv GenPropertyForMethodDef compileAsInstance tref mdef v memberInfo ilArgTys ilPropTy (mkILCustomAttrs ilAttrs) None - let mdef = mdef |> AddSpecialNameFlag + let mdef = mdef.WithSpecialName [mdef], [ilPropDef],[] else @@ -6140,7 +6182,7 @@ and GenTypeDef cenv mgbuf lazyInitInfo eenv m (tycon:Tycon) = [ match (eenv.valsInScope.TryFind cenv.g.sprintf_vref.Deref, eenv.valsInScope.TryFind cenv.g.new_format_vref.Deref) with - | Some(Lazy(Method(_,_,sprintfMethSpec,_,_,_))), Some(Lazy(Method(_,_,newFormatMethSpec,_,_,_))) -> + | Some(Lazy(Method(_,_,sprintfMethSpec,_,_,_,_))), Some(Lazy(Method(_,_,newFormatMethSpec,_,_,_,_))) -> // The type returned by the 'sprintf' call let funcTy = EraseClosures.mkILFuncTy cenv.g.ilxPubCloEnv ilThisTy cenv.g.ilg.typ_String // Give the instantiation of the printf format object, i.e. a Format`5 object compatible with StringFormat @@ -6156,22 +6198,23 @@ and GenTypeDef cenv mgbuf lazyInitInfo eenv m (tycon:Tycon) = let sprintfMethSpec = mkILMethSpec(sprintfMethSpec.MethodRef,AsObject,[],[funcTy]) // Here's the body of the method. Call printf, then invoke the function it returns let callInstrs = EraseClosures.mkCallFunc cenv.g.ilxPubCloEnv (fun _ -> 0us) eenv.tyenv.Count Normalcall (Apps_app(ilThisTy, Apps_done cenv.g.ilg.typ_String)) - let ilMethodDef = mkILNonGenericVirtualMethod ("ToString",ILMemberAccess.Public,[], - mkILReturn cenv.g.ilg.typ_String, - mkMethodBody (true,[],2,nonBranchingInstrsToCode - ([ // load the hardwired format string - yield I_ldstr "%+A" - // make the printf format object - yield mkNormalNewobj newFormatMethSpec - // call sprintf - yield mkNormalCall sprintfMethSpec - // call the function returned by sprintf - yield mkLdarg0 - if ilThisTy.Boxity = ILBoxity.AsValue then - yield mkNormalLdobj ilThisTy ] @ - callInstrs), - None)) - let mdef = { ilMethodDef with CustomAttrs = mkILCustomAttrs [ cenv.g.CompilerGeneratedAttribute ] } + let mdef = + mkILNonGenericVirtualMethod ("ToString",ILMemberAccess.Public,[], + mkILReturn cenv.g.ilg.typ_String, + mkMethodBody (true,[],2,nonBranchingInstrsToCode + ([ // load the hardwired format string + yield I_ldstr "%+A" + // make the printf format object + yield mkNormalNewobj newFormatMethSpec + // call sprintf + yield mkNormalCall sprintfMethSpec + // call the function returned by sprintf + yield mkLdarg0 + if ilThisTy.Boxity = ILBoxity.AsValue then + yield mkNormalLdobj ilThisTy ] @ + callInstrs), + None)) + let mdef = mdef.With(customAttrs = mkILCustomAttrs [ cenv.g.CompilerGeneratedAttribute ]) yield mdef | None,_ -> () | _,None -> () @@ -6288,7 +6331,7 @@ and GenTypeDef cenv mgbuf lazyInitInfo eenv m (tycon:Tycon) = not (HasFSharpAttribute cenv.g cenv.g.attrib_DebuggerTypeProxyAttribute tycon.Attribs)) let permissionSets = CreatePermissionSets cenv.g cenv.amap eenv securityAttrs - let secDecls = if securityAttrs.Length > 0 then (mkILSecurityDecls permissionSets) else (emptyILSecurityDecls) + let secDecls = if List.isEmpty securityAttrs then emptyILSecurityDecls else mkILSecurityDecls permissionSets let ilDebugDisplayAttributes = [ yield! GenAttrs cenv eenv debugDisplayAttrs @@ -6313,8 +6356,8 @@ and GenTypeDef cenv mgbuf lazyInitInfo eenv m (tycon:Tycon) = | TTyconClass -> ILTypeDefKind.Class | TTyconStruct -> ILTypeDefKind.ValueType | TTyconInterface -> ILTypeDefKind.Interface - | TTyconEnum -> ILTypeDefKind.Enum - | TTyconDelegate _ -> ILTypeDefKind.Delegate + | TTyconEnum -> ILTypeDefKind.Enum + | TTyconDelegate _ -> ILTypeDefKind.Delegate | TRecdRepr _ | TUnionRepr _ when tycon.IsStructOrEnumTycon -> ILTypeDefKind.ValueType | _ -> ILTypeDefKind.Class @@ -6334,15 +6377,17 @@ and GenTypeDef cenv mgbuf lazyInitInfo eenv m (tycon:Tycon) = [ for fspec in tycon.AllFieldsAsList do let useGenuineField = useGenuineField tycon fspec - + // The property (or genuine IL field) is hidden in these circumstances: // - secret fields apart from "__value" fields for enums // - the representation of the type is hidden // - the F# field is hidden by a signature or private declaration - let isPropHidden = - ((fspec.IsCompilerGenerated && not tycon.IsEnumTycon) || - hiddenRepr || - IsHiddenRecdField eenv.sigToImplRemapInfo (tcref.MakeNestedRecdFieldRef fspec)) + let isPropHidden = + // Enums always have public cases irrespective of Enum Visibility + if tycon.IsEnumTycon then false + else + (fspec.IsCompilerGenerated || hiddenRepr || + IsHiddenRecdField eenv.sigToImplRemapInfo (tcref.MakeNestedRecdFieldRef fspec)) let ilType = GenType cenv.amap m eenvinner.tyenv fspec.FormalType let ilFieldName = ComputeFieldName tycon fspec @@ -6390,20 +6435,25 @@ and GenTypeDef cenv mgbuf lazyInitInfo eenv m (tycon:Tycon) = | TRecdRepr _ when not useGenuineField -> [ cenv.g.DebuggerBrowsableNeverAttribute ] // hide fields in records in debug display | _ -> [] // don't hide fields in classes in debug display - yield - { Name = ilFieldName - Type = ilPropType - IsStatic = isStatic - Access = ComputeMemberAccess isFieldHidden - Data = None - LiteralValue = Option.map (GenFieldInit m) fspec.LiteralValue - Offset = ilFieldOffset - IsSpecialName = (ilFieldName="value__" && tycon.IsEnumTycon) - Marshal = ilFieldMarshal - NotSerialized = ilNotSerialized - IsInitOnly = false - IsLiteral = fspec.LiteralValue.IsSome - CustomAttrs = mkILCustomAttrs (GenAttrs cenv eenv fattribs @ extraAttribs) } + let access = ComputeMemberAccess isFieldHidden + let literalValue = Option.map (GenFieldInit m) fspec.LiteralValue + + let fdef = + ILFieldDef(name = ilFieldName, + fieldType = ilPropType, + attributes = enum 0, + data = None, + literalValue = None, + offset = ilFieldOffset, + marshal = None, + customAttrs = mkILCustomAttrs (GenAttrs cenv eenv fattribs @ extraAttribs)) + .WithAccess(access) + .WithStatic(isStatic) + .WithSpecialName(ilFieldName="value__" && tycon.IsEnumTycon) + .WithNotSerialized(ilNotSerialized) + .WithLiteralDefaultValue(literalValue) + .WithFieldMarshal(ilFieldMarshal) + yield fdef if requiresExtraField then yield mkILInstanceField("__dummy",cenv.g.ilg.typ_Int32,None,ILMemberAccess.Assembly) ] @@ -6417,16 +6467,15 @@ and GenTypeDef cenv mgbuf lazyInitInfo eenv m (tycon:Tycon) = let ilHasSetter = isCLIMutable || isFSharpMutable let ilFieldAttrs = GenAttrs cenv eenv propAttribs @ [mkCompilationMappingAttrWithSeqNum cenv.g (int SourceConstructFlags.Field) i] yield - { Name = ilPropName - IsRTSpecialName = false - IsSpecialName = false - SetMethod = (if ilHasSetter then Some(mkILMethRef(tref,ilCallingConv,"set_" + ilPropName,0,[ilPropType],ILType.Void)) else None) - GetMethod = Some(mkILMethRef(tref,ilCallingConv,"get_" + ilPropName,0,[],ilPropType)) - CallingConv = ilCallingConv.ThisConv - Type = ilPropType - Init = None - Args = [] - CustomAttrs = mkILCustomAttrs ilFieldAttrs } ] + ILPropertyDef(name= ilPropName, + attributes= PropertyAttributes.None, + setMethod= (if ilHasSetter then Some(mkILMethRef(tref,ilCallingConv,"set_" + ilPropName,0,[ilPropType],ILType.Void)) else None), + getMethod= Some(mkILMethRef(tref,ilCallingConv,"get_" + ilPropName,0,[],ilPropType)), + callingConv= ilCallingConv.ThisConv, + propertyType= ilPropType, + init= None, + args= [], + customAttrs = mkILCustomAttrs ilFieldAttrs) ] let methodDefs = [ // Generate property getter methods for those fields that have properties @@ -6456,13 +6505,13 @@ and GenTypeDef cenv mgbuf lazyInitInfo eenv m (tycon:Tycon) = mkILNonGenericInstanceMethod (ilMethName,iLAccess,ilParams,ilReturn, mkMethodBody(true,[],2,nonBranchingInstrsToCode ([ mkLdarg0;mkLdarg 1us;mkNormalStfld ilFieldSpec]),None)) - yield ilMethodDef |> AddSpecialNameFlag + yield ilMethodDef.WithSpecialName if generateDebugDisplayAttribute then let (|Lazy|) (x:Lazy<_>) = x.Force() match (eenv.valsInScope.TryFind cenv.g.sprintf_vref.Deref, eenv.valsInScope.TryFind cenv.g.new_format_vref.Deref) with - | Some(Lazy(Method(_,_,sprintfMethSpec,_,_,_))), Some(Lazy(Method(_,_,newFormatMethSpec,_,_,_))) -> + | Some(Lazy(Method(_,_,sprintfMethSpec,_,_,_,_))), Some(Lazy(Method(_,_,newFormatMethSpec,_,_,_,_))) -> // The type returned by the 'sprintf' call let funcTy = EraseClosures.mkILFuncTy cenv.g.ilxPubCloEnv ilThisTy cenv.g.ilg.typ_String // Give the instantiation of the printf format object, i.e. a Format`5 object compatible with StringFormat @@ -6495,7 +6544,7 @@ and GenTypeDef cenv mgbuf lazyInitInfo eenv m (tycon:Tycon) = yield mkNormalLdobj ilThisTy ] @ callInstrs), None)) - yield ilMethodDef |> AddSpecialNameFlag |> AddNonUserCompilerGeneratedAttribs cenv.g + yield ilMethodDef.WithSpecialName |> AddNonUserCompilerGeneratedAttribs cenv.g | None,_ -> //printfn "sprintf not found" () @@ -6543,14 +6592,14 @@ and GenTypeDef cenv mgbuf lazyInitInfo eenv m (tycon:Tycon) = let p,r = // When "type delegateTy = delegate of unit -> returnTy", // suppress the unit arg from delegate .Invoke vslot. - let (TSlotSig(nm,typ,ctps,mtps,paraml,returnTy)) = ss + let (TSlotSig(nm,ty,ctps,mtps,paraml,returnTy)) = ss let paraml = match paraml with | [[tsp]] when isUnitTy cenv.g tsp.Type -> [] (* suppress unit arg *) | paraml -> paraml - GenActualSlotsig m cenv eenvinner (TSlotSig(nm,typ,ctps,mtps,paraml,returnTy)) [] [] - for ilMethodDef in mkILDelegateMethods cenv.g.ilg (cenv.g.iltyp_AsyncCallback, cenv.g.iltyp_IAsyncResult) (p,r) do - yield { ilMethodDef with Access=reprAccess } + GenActualSlotsig m cenv eenvinner (TSlotSig(nm,ty,ctps,mtps,paraml,returnTy)) [] [] + for ilMethodDef in mkILDelegateMethods reprAccess cenv.g.ilg (cenv.g.iltyp_AsyncCallback, cenv.g.iltyp_IAsyncResult) (p,r) do + yield ilMethodDef | _ -> () | TUnionRepr _ when not (tycon.HasMember cenv.g "ToString" []) -> @@ -6563,15 +6612,13 @@ and GenTypeDef cenv mgbuf lazyInitInfo eenv m (tycon:Tycon) = let ilFields = mkILFields ilFieldDefs let tdef, tdefDiscards = - let isSerializable = (TryFindFSharpBoolAttribute cenv.g cenv.g.attrib_AutoSerializableAttribute tycon.Attribs <> Some(false)) - && cenv.g.attrib_SerializableAttribute.IsSome - + let isSerializable = (TryFindFSharpBoolAttribute cenv.g cenv.g.attrib_AutoSerializableAttribute tycon.Attribs <> Some(false)) + match tycon.TypeReprInfo with | TILObjectRepr _ -> - let td = tycon.ILTyconRawMetadata - {td with Access = access - CustomAttrs = mkILCustomAttrs ilCustomAttrs - GenericParams = ilGenParams }, None + let tdef = tycon.ILTyconRawMetadata.WithAccess(access) + let tdef = tdef.With(customAttrs = mkILCustomAttrs ilCustomAttrs, genericParams = ilGenParams) + tdef, None | TRecdRepr _ | TFSharpObjectRepr _ as tyconRepr -> let super = superOfTycon cenv.g tycon @@ -6600,7 +6647,7 @@ and GenTypeDef cenv mgbuf lazyInitInfo eenv m (tycon:Tycon) = // before the main method even starts. let typeDefTrigger = if eenv.isFinalFile || tycon.TyparsNoRange.IsEmpty then - ILTypeInit.OnAny + ILTypeInit.OnAny else ILTypeInit.BeforeField @@ -6611,11 +6658,8 @@ and GenTypeDef cenv mgbuf lazyInitInfo eenv m (tycon:Tycon) = // Set some the extra entries in the definition let isTheSealedAttribute = tyconRefEq cenv.g tcref cenv.g.attrib_SealedAttribute.TyconRef - let tdef = { tdef with IsSealed = isSealedTy cenv.g thisTy || isTheSealedAttribute - IsSerializable = isSerializable - MethodImpls=mkILMethodImpls methodImpls - IsAbstract=isAbstract - IsComInterop=isComInteropTy cenv.g thisTy } + let tdef = tdef.WithSealed(isSealedTy cenv.g thisTy || isTheSealedAttribute).WithSerializable(isSerializable).WithAbstract(isAbstract).WithImport(isComInteropTy cenv.g thisTy) + let tdef = tdef.With(methodImpls=mkILMethodImpls methodImpls) let tdLayout,tdEncoding = match TryFindFSharpAttribute cenv.g cenv.g.attrib_StructLayoutAttribute tycon.Attribs with @@ -6653,33 +6697,32 @@ and GenTypeDef cenv mgbuf lazyInitInfo eenv m (tycon:Tycon) = // In that case we generate a dummy field instead (cenv.opts.workAroundReflectionEmitBugs && not tycon.TyparsNoRange.IsEmpty) then - ILTypeDefLayout.Sequential { Size=None; Pack=None }, ILDefaultPInvokeEncoding.Ansi + ILTypeDefLayout.Sequential { Size=None; Pack=None }, ILDefaultPInvokeEncoding.Ansi else - ILTypeDefLayout.Sequential { Size=Some 1; Pack=Some 0us }, ILDefaultPInvokeEncoding.Ansi + ILTypeDefLayout.Sequential { Size=Some 1; Pack=Some 0us }, ILDefaultPInvokeEncoding.Ansi | _ -> ILTypeDefLayout.Auto, ILDefaultPInvokeEncoding.Ansi // if the type's layout is Explicit, ensure that each field has a valid offset - let validateExplicit fdef = + let validateExplicit (fdef: ILFieldDef) = match fdef.Offset with // Remove field suffix "@" for pretty printing | None -> errorR(Error(FSComp.SR.ilFieldDoesNotHaveValidOffsetForStructureLayout(tdef.Name, fdef.Name.Replace("@","")), (trimRangeToLine m))) | _ -> () // if the type's layout is Sequential, no offsets should be applied - let validateSequential fdef = + let validateSequential (fdef: ILFieldDef) = match fdef.Offset with | Some _ -> errorR(Error(FSComp.SR.ilFieldHasOffsetForSequentialLayout(), (trimRangeToLine m))) | _ -> () - + match tdLayout with | ILTypeDefLayout.Explicit(_) -> List.iter validateExplicit ilFieldDefs - | ILTypeDefLayout.Sequential(_) -> List.iter validateSequential ilFieldDefs + | ILTypeDefLayout.Sequential(_) -> List.iter validateSequential ilFieldDefs | _ -> () - let tdef = { tdef with tdKind = ilTypeDefKind; Layout=tdLayout; Encoding=tdEncoding } - let tdef = match ilTypeDefKind with ILTypeDefKind.Interface -> { tdef with Extends = None; IsAbstract=true } | _ -> tdef + let tdef = tdef.WithKind(ilTypeDefKind).WithLayout(tdLayout).WithEncoding(tdEncoding) tdef, None | TUnionRepr _ -> @@ -6704,39 +6747,38 @@ and GenTypeDef cenv mgbuf lazyInitInfo eenv m (tycon:Tycon) = // Structs with no instance fields get size 1, pack 0 ILTypeDefLayout.Sequential { Size=Some 1; Pack=Some 0us } else - ILTypeDefLayout.Sequential { Size=None; Pack=None } + ILTypeDefLayout.Sequential { Size=None; Pack=None } else ILTypeDefLayout.Auto + let cattrs = + mkILCustomAttrs (ilCustomAttrs @ + [mkCompilationMappingAttr cenv.g + (int (if hiddenRepr + then SourceConstructFlags.SumType ||| SourceConstructFlags.NonPublicRepresentation + else SourceConstructFlags.SumType)) ]) let tdef = - { Name = ilTypeName - Layout = layout - Access = access - GenericParams = ilGenParams - CustomAttrs = - mkILCustomAttrs (ilCustomAttrs @ - [mkCompilationMappingAttr cenv.g - (int (if hiddenRepr - then SourceConstructFlags.SumType ||| SourceConstructFlags.NonPublicRepresentation - else SourceConstructFlags.SumType)) ]) - InitSemantics=ILTypeInit.BeforeField - IsSealed=true - IsAbstract=false - tdKind= (if tycon.IsStructOrEnumTycon then ILTypeDefKind.ValueType else ILTypeDefKind.Class) - Fields = ilFields - Events= ilEvents - Properties = ilProperties - Methods= mkILMethods ilMethods - MethodImpls= mkILMethodImpls methodImpls - IsComInterop=false - IsSerializable= isSerializable - IsSpecialName= false - NestedTypes=emptyILTypeDefs - Encoding= ILDefaultPInvokeEncoding.Auto - Implements = ilIntfTys - Extends= Some (if tycon.IsStructOrEnumTycon then cenv.g.iltyp_ValueType else cenv.g.ilg.typ_Object) - SecurityDecls= emptyILSecurityDecls - HasSecurity=false } + ILTypeDef(name = ilTypeName, + layout = layout, + attributes = enum 0, + genericParams = ilGenParams, + customAttrs = cattrs, + fields = ilFields, + events= ilEvents, + properties = ilProperties, + methods= mkILMethods ilMethods, + methodImpls= mkILMethodImpls methodImpls, + nestedTypes=emptyILTypeDefs, + implements = ilIntfTys, + extends= Some (if tycon.IsStructOrEnumTycon then cenv.g.iltyp_ValueType else cenv.g.ilg.typ_Object), + securityDecls= emptyILSecurityDecls) + .WithLayout(layout) + .WithSerializable(isSerializable) + .WithSealed(true) + .WithEncoding(ILDefaultPInvokeEncoding.Auto) + .WithAccess(access) + .WithInitSemantics(ILTypeInit.BeforeField) + let tdef2 = cenv.g.eraseClassUnionDef tref tdef cuinfo // Discard the user-supplied (i.e. prim-type.fs) implementations of the get_Empty, get_IsEmpty, get_Value and get_None and Some methods. @@ -6757,7 +6799,8 @@ and GenTypeDef cenv mgbuf lazyInitInfo eenv m (tycon:Tycon) = | _ -> failwith "??" - let tdef = {tdef with SecurityDecls= secDecls; HasSecurity=securityAttrs.Length > 0} + let tdef = tdef.WithHasSecurity(not (List.isEmpty securityAttrs)) + let tdef = tdef.With(securityDecls = secDecls) mgbuf.AddTypeDef(tref, tdef, false, false, tdefDiscards) // If a non-generic type is written with "static let" and "static do" (i.e. it has a ".cctor") @@ -6793,16 +6836,15 @@ and GenExnDef cenv mgbuf eenv m (exnc:Tycon) = let ilMethodDef = mkLdfldMethodDef (ilMethName,reprAccess,false,ilThisTy,ilFieldName,ilPropType) let ilFieldDef = IL.mkILInstanceField(ilFieldName,ilPropType, None, ILMemberAccess.Assembly) let ilPropDef = - { Name=ilPropName - IsRTSpecialName=false - IsSpecialName=false - SetMethod=None - GetMethod=Some(mkILMethRef(tref,ILCallingConv.Instance,ilMethName,0,[],ilPropType)) - CallingConv=ILThisConvention.Instance - Type=ilPropType - Init=None - Args = [] - CustomAttrs=mkILCustomAttrs (GenAttrs cenv eenv fld.PropertyAttribs @ [mkCompilationMappingAttrWithSeqNum cenv.g (int SourceConstructFlags.Field) i]) } + ILPropertyDef(name = ilPropName, + attributes = PropertyAttributes.None, + setMethod = None, + getMethod = Some(mkILMethRef(tref,ILCallingConv.Instance,ilMethName,0,[],ilPropType)), + callingConv = ILThisConvention.Instance, + propertyType = ilPropType, + init = None, + args = [], + customAttrs=mkILCustomAttrs (GenAttrs cenv eenv fld.PropertyAttribs @ [mkCompilationMappingAttrWithSeqNum cenv.g (int SourceConstructFlags.Field) i])) yield (ilMethodDef,ilFieldDef,ilPropDef,(ilPropName,ilFieldName,ilPropType)) ] |> List.unzip4 @@ -6817,11 +6859,10 @@ and GenExnDef cenv mgbuf eenv m (exnc:Tycon) = else [] - let serializationRelatedMembers = - // do not emit serialization related members if target framework lacks SerializableAttribute or SerializationInfo - match cenv.g.attrib_SerializableAttribute, cenv.g.iltyp_SerializationInfo, cenv.g.iltyp_StreamingContext with - | Some _, Some serializationInfoType, Some streamingContextType -> + // do not emit serialization related members if target framework lacks SerializationInfo or StreamingContext + match cenv.g.iltyp_SerializationInfo, cenv.g.iltyp_StreamingContext with + | Some serializationInfoType, Some streamingContextType -> let ilCtorDefForSerialziation = mkILCtor(ILMemberAccess.Family, [mkILParamNamed("info", serializationInfoType);mkILParamNamed("context",streamingContextType)], @@ -6880,7 +6921,7 @@ and GenExnDef cenv mgbuf eenv m (exnc:Tycon) = emptyILEvents, mkILCustomAttrs [mkCompilationMappingAttr cenv.g (int SourceConstructFlags.Exception)], ILTypeInit.BeforeField) - let tdef = { tdef with IsSerializable = cenv.g.attrib_SerializableAttribute.IsSome } + let tdef = tdef.WithSerializable(true) mgbuf.AddTypeDef(tref, tdef, false, false, None) @@ -7010,7 +7051,7 @@ let defaultOf = let LookupGeneratedValue (amap:ImportMap) (ctxt: ExecutionContext) eenv (v:Val) = try // Convert the v.Type into a System.Type according to ilxgen and ilreflect. - let objTyp = + let objTyp() = let ilTy = GenType amap v.Range TypeReprEnv.Empty v.Type (* TypeReprEnv.Empty ok, not expecting typars *) ctxt.LookupType ilTy // Lookup the compiled v value (as an object). @@ -7018,30 +7059,30 @@ let LookupGeneratedValue (amap:ImportMap) (ctxt: ExecutionContext) eenv (v:Val) | StaticField (fspec, _, hasLiteralAttr, ilContainerTy, _, _, ilGetterMethRef, _, _) -> let obj = if hasLiteralAttr then - let staticTyp = ctxt.LookupTypeRef fspec.EnclosingTypeRef + let staticTy = ctxt.LookupTypeRef fspec.DeclaringTypeRef // Checked: This FieldInfo (FieldBuilder) supports GetValue(). - staticTyp.GetField(fspec.Name).GetValue(null:obj) + staticTy.GetField(fspec.Name).GetValue(null:obj) else - let staticTyp = ctxt.LookupTypeRef ilContainerTy.TypeRef + let staticTy = ctxt.LookupTypeRef ilContainerTy.TypeRef // We can't call .Invoke on the ILMethodRef's MethodInfo, // because it is the MethodBuilder and that does not support Invoke. // Rather, we look for the getter MethodInfo from the built type and .Invoke on that. - let methInfo = staticTyp.GetMethod(ilGetterMethRef.Name, BindingFlags.Static ||| BindingFlags.Public ||| BindingFlags.NonPublic) + let methInfo = staticTy.GetMethod(ilGetterMethRef.Name, BindingFlags.Static ||| BindingFlags.Public ||| BindingFlags.NonPublic) methInfo.Invoke((null:obj),(null:obj[])) - Some (obj,objTyp) + Some (obj,objTyp()) | StaticProperty (ilGetterMethSpec, _) -> let obj = - let staticTyp = ctxt.LookupTypeRef ilGetterMethSpec.MethodRef.EnclosingTypeRef + let staticTy = ctxt.LookupTypeRef ilGetterMethSpec.MethodRef.DeclaringTypeRef // We can't call .Invoke on the ILMethodRef's MethodInfo, // because it is the MethodBuilder and that does not support Invoke. // Rather, we look for the getter MethodInfo from the built type and .Invoke on that. - let methInfo = staticTyp.GetMethod(ilGetterMethSpec.Name, BindingFlags.Static ||| BindingFlags.Public ||| BindingFlags.NonPublic) + let methInfo = staticTy.GetMethod(ilGetterMethSpec.Name, BindingFlags.Static ||| BindingFlags.Public ||| BindingFlags.NonPublic) methInfo.Invoke((null:obj),(null:obj[])) - Some (obj,objTyp) + Some (obj,objTyp()) | Null -> - Some (null,objTyp) + Some (null,objTyp()) | Local _ -> None | Method _ -> None | Arg _ -> None @@ -7059,11 +7100,11 @@ let ClearGeneratedValue (ctxt: ExecutionContext) (_g:TcGlobals) eenv (v:Val) = match StorageForVal v.Range v eenv with | StaticField (fspec, _, hasLiteralAttr, _, _, _, _ilGetterMethRef, ilSetterMethRef, _) -> if not hasLiteralAttr && v.IsMutable then - let staticTyp = ctxt.LookupTypeRef ilSetterMethRef.EnclosingTypeRef - let typ = ctxt.LookupType fspec.ActualType + let staticTy = ctxt.LookupTypeRef ilSetterMethRef.DeclaringTypeRef + let ty = ctxt.LookupType fspec.ActualType - let methInfo = staticTyp.GetMethod(ilSetterMethRef.Name, BindingFlags.Static ||| BindingFlags.Public ||| BindingFlags.NonPublic) - methInfo.Invoke (null, [| defaultOf typ |]) |> ignore + let methInfo = staticTy.GetMethod(ilSetterMethRef.Name, BindingFlags.Static ||| BindingFlags.Public ||| BindingFlags.NonPublic) + methInfo.Invoke (null, [| defaultOf ty |]) |> ignore | _ -> () with e -> @@ -7077,11 +7118,11 @@ let LookupGeneratedInfo (ctxt: ExecutionContext) (g:TcGlobals) eenv (v:Val) = try match StorageForVal v.Range v eenv with | StaticField (fspec, _, hasLiteralAttr, ilContainerTy, _, _, ilGetterMethRef, _, _) -> - let staticTyp = ctxt.LookupTypeRef ilContainerTy.TypeRef + let staticTy = ctxt.LookupTypeRef ilContainerTy.TypeRef if hasLiteralAttr then - Some (staticTyp.GetField(fspec.Name) :> MemberInfo) + Some (staticTy.GetField(fspec.Name) :> MemberInfo) else - Some (staticTyp.GetMethod(ilGetterMethRef.Name,[||]) :> MemberInfo) + Some (staticTy.GetMethod(ilGetterMethRef.Name,[||]) :> MemberInfo) | Null -> None | Local _ -> None | Method _ -> None diff --git a/src/fsharp/IlxGen.fsi b/src/fsharp/IlxGen.fsi index bd01f941284..25c727eca82 100644 --- a/src/fsharp/IlxGen.fsi +++ b/src/fsharp/IlxGen.fsi @@ -6,7 +6,6 @@ open System open System.IO open System.Reflection open Microsoft.FSharp.Compiler -open Microsoft.FSharp.Compiler.AbstractIL open Microsoft.FSharp.Compiler.AbstractIL.IL open Microsoft.FSharp.Compiler.Tast open Microsoft.FSharp.Compiler.TcGlobals @@ -19,21 +18,39 @@ type IlxGenBackend = [] type internal IlxGenOptions = { fragName : string + + /// Indicates if we are generating filter blocks generateFilterBlocks : bool + + /// Indicates if we should workaround old reflection emit bugs workAroundReflectionEmitBugs : bool + + /// Indicates if static array data should be emitted using static blobs emitConstantArraysUsingStaticDataBlobs : bool + /// If this is set, then the last module becomes the "main" module mainMethodInfo : Attribs option + + /// Indicates if local optimizations are active localOptimizationsAreOn : bool + + /// Indicates if we are generating debug symbols or not generateDebugSymbols : bool + + /// A flag to help test emit of debug information testFlagEmitFeeFeeAs100001 : bool + + /// Indicates which backend we are generating code for ilxBackend : IlxGenBackend + /// Indicates the code is being generated in FSI.EXE and is executed immediately after code generation /// This includes all interactively compiled code, including #load, definitions, and expressions isInteractive : bool - // Indicates the code generated is an interactive 'it' expression. We generate a setter to allow clearing of the underlying - // storage, even though 'it' is not logically mutable + + /// Indicates the code generated is an interactive 'it' expression. We generate a setter to allow clearing of the underlying + /// storage, even though 'it' is not logically mutable isInteractiveItExpr : bool + /// Indicates that, whenever possible, use callvirt instead of call alwaysCallVirt : bool } @@ -72,7 +89,7 @@ type public IlxAssemblyGenerator = member GenerateCode : IlxGenOptions * TypedAssemblyAfterOptimization * Attribs * Attribs -> IlxGenResults /// Create the CAS permission sets for an assembly fragment - member CreatePermissionSets : Attrib list -> ILPermission list + member CreatePermissionSets : Attrib list -> ILSecurityDecl list /// Invert the compilation of the given value and clear the storage of the value member ClearGeneratedValue : ExecutionContext * Val -> unit diff --git a/src/fsharp/InfoReader.fs b/src/fsharp/InfoReader.fs index c6f8a7629ce..e04485887e1 100644 --- a/src/fsharp/InfoReader.fs +++ b/src/fsharp/InfoReader.fs @@ -4,8 +4,9 @@ /// Select members from a type by name, searching the type hierarchy if needed module internal Microsoft.FSharp.Compiler.InfoReader +open System.Collections.Generic + open Microsoft.FSharp.Compiler.AbstractIL.IL -open Microsoft.FSharp.Compiler.AbstractIL.Internal open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library open Microsoft.FSharp.Compiler @@ -41,18 +42,16 @@ let private SelectImmediateMemberVals g optFilter f (tcref:TyconRef) = let private checkFilter optFilter (nm:string) = match optFilter with None -> true | Some n2 -> nm = n2 /// Try to select an F# value when querying members, and if so return a MethInfo that wraps the F# value. -let TrySelectMemberVal g optFilter typ pri _membInfo (vref:ValRef) = +let TrySelectMemberVal g optFilter ty pri _membInfo (vref:ValRef) = if checkFilter optFilter vref.LogicalName then - Some(FSMeth(g,typ,vref,pri)) + Some(FSMeth(g,ty,vref,pri)) else None -/// Query the immediate methods of an F# type, not taking into account inherited methods. The optFilter -/// parameter is an optional name to restrict the set of properties returned. -let GetImmediateIntrinsicMethInfosOfType (optFilter,ad) g amap m typ = - let minfos = +let rec GetImmediateIntrinsicMethInfosOfTypeAux (optFilter,ad) g amap m origTy metadataTy = - match metadataOfTy g typ with + let minfos = + match metadataOfTy g metadataTy with #if !NO_EXTENSIONTYPING | ProvidedTypeMetadata info -> let st = info.ProvidedType @@ -60,55 +59,75 @@ let GetImmediateIntrinsicMethInfosOfType (optFilter,ad) g amap m typ = match optFilter with | Some name -> st.PApplyArray ((fun st -> st.GetMethods() |> Array.filter (fun mi -> mi.Name = name) ), "GetMethods", m) | None -> st.PApplyArray ((fun st -> st.GetMethods()), "GetMethods", m) - [ for mi in meths -> ProvidedMeth(amap,mi.Coerce(m),None,m) ] + [ for mi in meths -> ProvidedMeth(amap, mi.Coerce(m), None, m) ] #endif - | ILTypeMetadata (TILObjectReprData(_,_,tdef)) -> - let mdefs = tdef.Methods - let mdefs = (match optFilter with None -> mdefs.AsList | Some nm -> mdefs.FindByName nm) - mdefs |> List.map (fun mdef -> MethInfo.CreateILMeth(amap, m, typ, mdef)) + | ILTypeMetadata _ -> + let tinfo = ILTypeInfo.FromType g origTy + let mdefs = tinfo.RawMetadata.Methods + let mdefs = match optFilter with None -> mdefs.AsList | Some nm -> mdefs.FindByName nm + mdefs |> List.map (fun mdef -> MethInfo.CreateILMeth(amap, m, origTy, mdef)) + | FSharpOrArrayOrByrefOrTupleOrExnTypeMetadata -> - match tryDestAppTy g typ with - | None -> [] - | Some tcref -> - SelectImmediateMemberVals g optFilter (TrySelectMemberVal g optFilter typ None) tcref + // Tuple types also support the methods get_Item1-8, get_Rest from the compiled tuple type. + // In this case convert to the .NET Tuple type that carries metadata and try again + if isAnyTupleTy g metadataTy then + let betterMetadataTy = convertToTypeWithMetadataIfPossible g metadataTy + GetImmediateIntrinsicMethInfosOfTypeAux (optFilter,ad) g amap m origTy betterMetadataTy + // Function types support methods FSharpFunc<_,_>.FromConverter and friends from .NET metadata, + // but not instance methods (you can't write "f.Invoke(x)", you have to write "f x") + elif isFunTy g metadataTy then + let betterMetadataTy = convertToTypeWithMetadataIfPossible g metadataTy + GetImmediateIntrinsicMethInfosOfTypeAux (optFilter,ad) g amap m origTy betterMetadataTy + |> List.filter (fun minfo -> not minfo.IsInstance) + else + match tryDestAppTy g metadataTy with + | ValueNone -> [] + | ValueSome tcref -> + SelectImmediateMemberVals g optFilter (TrySelectMemberVal g optFilter origTy None) tcref let minfos = minfos |> List.filter (IsMethInfoAccessible amap m ad) minfos +/// Query the immediate methods of an F# type, not taking into account inherited methods. The optFilter +/// parameter is an optional name to restrict the set of properties returned. +let GetImmediateIntrinsicMethInfosOfType (optFilter,ad) g amap m ty = + GetImmediateIntrinsicMethInfosOfTypeAux (optFilter,ad) g amap m ty ty + /// A helper type to help collect properties. /// /// Join up getters and setters which are not associated in the F# data structure -type PropertyCollector(g,amap,m,typ,optFilter,ad) = +type PropertyCollector(g, amap, m, ty, optFilter, ad) = let hashIdentity = - Microsoft.FSharp.Collections.HashIdentity.FromFunctions + HashIdentity.FromFunctions (fun (pinfo:PropInfo) -> hash pinfo.PropertyName) (fun pinfo1 pinfo2 -> pinfo1.IsStatic = pinfo2.IsStatic && PropInfosEquivByNameAndPartialSig EraseNone g amap m pinfo1 pinfo2 && pinfo1.IsDefiniteFSharpOverride = pinfo2.IsDefiniteFSharpOverride ) - let props = new System.Collections.Generic.Dictionary(hashIdentity) + + let props = new Dictionary(hashIdentity) + let add pinfo = - if props.ContainsKey(pinfo) then - match props.[pinfo], pinfo with - | FSProp (_,typ,Some vref1,_), FSProp (_,_,_,Some vref2) - | FSProp (_,typ,_,Some vref2), FSProp (_,_,Some vref1,_) -> - let pinfo = FSProp (g,typ,Some vref1,Some vref2) - props.[pinfo] <- pinfo - | _ -> - // This assert fires while editing bad code. We will give a warning later in check.fs - //assert ("unexpected case"= "") - () - else + match props.TryGetValue(pinfo), pinfo with + | (true, FSProp (_, ty, Some vref1 ,_)), FSProp (_, _, _, Some vref2) + | (true, FSProp (_, ty, _, Some vref2)), FSProp (_, _, Some vref1, _) -> + let pinfo = FSProp (g,ty,Some vref1,Some vref2) + props.[pinfo] <- pinfo + | (true, _), _ -> + // This assert fires while editing bad code. We will give a warning later in check.fs + //assert ("unexpected case"= "") + () + | _ -> props.[pinfo] <- pinfo member x.Collect(membInfo:ValMemberInfo,vref:ValRef) = match membInfo.MemberFlags.MemberKind with | MemberKind.PropertyGet -> - let pinfo = FSProp(g,typ,Some vref,None) + let pinfo = FSProp(g,ty,Some vref,None) if checkFilter optFilter vref.PropertyName && IsPropInfoAccessible g amap m ad pinfo then add pinfo | MemberKind.PropertySet -> - let pinfo = FSProp(g,typ,None,Some vref) + let pinfo = FSProp(g,ty,None,Some vref) if checkFilter optFilter vref.PropertyName && IsPropInfoAccessible g amap m ad pinfo then add pinfo | _ -> @@ -116,12 +135,10 @@ type PropertyCollector(g,amap,m,typ,optFilter,ad) = member x.Close() = [ for KeyValue(_,pinfo) in props -> pinfo ] -/// Query the immediate properties of an F# type, not taking into account inherited properties. The optFilter -/// parameter is an optional name to restrict the set of properties returned. -let GetImmediateIntrinsicPropInfosOfType (optFilter,ad) g amap m typ = - let pinfos = +let rec GetImmediateIntrinsicPropInfosOfTypeAux (optFilter,ad) g amap m origTy metadataTy = - match metadataOfTy g typ with + let pinfos = + match metadataOfTy g metadataTy with #if !NO_EXTENSIONTYPING | ProvidedTypeMetadata info -> let st = info.ProvidedType @@ -134,37 +151,48 @@ let GetImmediateIntrinsicPropInfosOfType (optFilter,ad) g amap m typ = | None -> st.PApplyArray((fun st -> st.GetProperties()), "GetProperties", m) matchingProps - |> Seq.map(fun pi -> ProvidedProp(amap,pi,m)) + |> Seq.map(fun pi -> ProvidedProp(amap, pi, m)) |> List.ofSeq #endif - | ILTypeMetadata (TILObjectReprData(_,_,tdef)) -> - let tinfo = ILTypeInfo.FromType g typ - let pdefs = tdef.Properties + + | ILTypeMetadata _ -> + let tinfo = ILTypeInfo.FromType g origTy + let pdefs = tinfo.RawMetadata.Properties let pdefs = match optFilter with None -> pdefs.AsList | Some nm -> pdefs.LookupByName nm - pdefs |> List.map (fun pd -> ILProp(g,ILPropInfo(tinfo,pd))) + pdefs |> List.map (fun pdef -> ILProp(ILPropInfo(tinfo, pdef))) + | FSharpOrArrayOrByrefOrTupleOrExnTypeMetadata -> - match tryDestAppTy g typ with - | None -> [] - | Some tcref -> - let propCollector = new PropertyCollector(g,amap,m,typ,optFilter,ad) - SelectImmediateMemberVals g None - (fun membInfo vref -> propCollector.Collect(membInfo,vref); None) - tcref |> ignore - propCollector.Close() + // Tuple types also support the properties Item1-8, Rest from the compiled tuple type + // In this case convert to the .NET Tuple type that carries metadata and try again + if isAnyTupleTy g metadataTy || isFunTy g metadataTy then + let betterMetadataTy = convertToTypeWithMetadataIfPossible g metadataTy + GetImmediateIntrinsicPropInfosOfTypeAux (optFilter,ad) g amap m origTy betterMetadataTy + else + match tryDestAppTy g metadataTy with + | ValueNone -> [] + | ValueSome tcref -> + let propCollector = new PropertyCollector(g, amap, m, origTy, optFilter, ad) + SelectImmediateMemberVals g None (fun membInfo vref -> propCollector.Collect(membInfo, vref); None) tcref |> ignore + propCollector.Close() let pinfos = pinfos |> List.filter (IsPropInfoAccessible g amap m ad) pinfos +/// Query the immediate properties of an F# type, not taking into account inherited properties. The optFilter +/// parameter is an optional name to restrict the set of properties returned. +let rec GetImmediateIntrinsicPropInfosOfType (optFilter,ad) g amap m ty = + GetImmediateIntrinsicPropInfosOfTypeAux (optFilter,ad) g amap m ty ty + // Checks whether the given type has an indexer property. -let IsIndexerType g amap typ = - isArray1DTy g typ || - isListTy g typ || - match tryDestAppTy g typ with - | Some tcref -> +let IsIndexerType g amap ty = + isArray1DTy g ty || + isListTy g ty || + match tryDestAppTy g ty with + | ValueSome tcref -> let _, entityTy = generalizeTyconRef tcref - let props = GetImmediateIntrinsicPropInfosOfType (None, AccessibleFromSomeFSharpCode) g amap range0 entityTy + let props = GetImmediateIntrinsicPropInfosOfType (None, AccessibleFromSomeFSharpCode) g amap range0 entityTy props |> List.exists (fun x -> x.PropertyName = "Item") - | _ -> false + | ValueNone -> false /// Sets of methods up the hierarchy, ignoring duplicates by name and sig. @@ -179,12 +207,12 @@ type HierarchyItem = /// An InfoReader is an object to help us read and cache infos. /// We create one of these for each file we typecheck. -type InfoReader(g:TcGlobals, amap:Import.ImportMap) = +type InfoReader(g: TcGlobals, amap: Import.ImportMap) = /// Get the declared IL fields of a type, not including inherited fields - let GetImmediateIntrinsicILFieldsOfType (optFilter,ad) m typ = + let GetImmediateIntrinsicILFieldsOfType (optFilter, ad) m ty = let infos = - match metadataOfTy g typ with + match metadataOfTy g ty with #if !NO_EXTENSIONTYPING | ProvidedTypeMetadata info -> let st = info.ProvidedType @@ -196,9 +224,9 @@ type InfoReader(g:TcGlobals, amap:Import.ImportMap) = | Tainted.Null -> [] | fi -> [ ProvidedField(amap,fi,m) ] #endif - | ILTypeMetadata (TILObjectReprData(_,_,tdef)) -> - let tinfo = ILTypeInfo.FromType g typ - let fdefs = tdef.Fields + | ILTypeMetadata _ -> + let tinfo = ILTypeInfo.FromType g ty + let fdefs = tinfo.RawMetadata.Fields let fdefs = match optFilter with None -> fdefs.AsList | Some nm -> fdefs.LookupByName nm fdefs |> List.map (fun pd -> ILFieldInfo(tinfo,pd)) | FSharpOrArrayOrByrefOrTupleOrExnTypeMetadata -> @@ -206,10 +234,10 @@ type InfoReader(g:TcGlobals, amap:Import.ImportMap) = let infos = infos |> List.filter (IsILFieldInfoAccessible g amap m ad) infos - /// Get the declared events of a type, not including inherited events - let ComputeImmediateIntrinsicEventsOfType (optFilter,ad) m typ = + /// Get the declared events of a type, not including inherited events, and not including F#-declared CLIEvents + let ComputeImmediateIntrinsicEventsOfType (optFilter, ad) m ty = let infos = - match metadataOfTy g typ with + match metadataOfTy g ty with #if !NO_EXTENSIONTYPING | ProvidedTypeMetadata info -> let st = info.ProvidedType @@ -221,73 +249,73 @@ type InfoReader(g:TcGlobals, amap:Import.ImportMap) = | Tainted.Null -> [] | ei -> [ ProvidedEvent(amap,ei,m) ] #endif - | ILTypeMetadata (TILObjectReprData(_,_,tdef)) -> - let tinfo = ILTypeInfo.FromType g typ - let edefs = tdef.Events + | ILTypeMetadata _ -> + let tinfo = ILTypeInfo.FromType g ty + let edefs = tinfo.RawMetadata.Events let edefs = match optFilter with None -> edefs.AsList | Some nm -> edefs.LookupByName nm [ for edef in edefs do - let einfo = ILEventInfo(tinfo,edef) - if IsILEventInfoAccessible g amap m ad einfo then - yield ILEvent(g,einfo) ] + let ileinfo = ILEventInfo(tinfo,edef) + if IsILEventInfoAccessible g amap m ad ileinfo then + yield ILEvent ileinfo ] | FSharpOrArrayOrByrefOrTupleOrExnTypeMetadata -> [] infos /// Make a reference to a record or class field - let MakeRecdFieldInfo g typ (tcref:TyconRef) fspec = - RecdFieldInfo(argsOfAppTy g typ,tcref.MakeNestedRecdFieldRef fspec) + let MakeRecdFieldInfo g ty (tcref:TyconRef) fspec = + RecdFieldInfo(argsOfAppTy g ty,tcref.MakeNestedRecdFieldRef fspec) /// Get the F#-declared record fields or class 'val' fields of a type - let GetImmediateIntrinsicRecdOrClassFieldsOfType (optFilter,_ad) _m typ = - match tryDestAppTy g typ with - | None -> [] - | Some tcref -> + let GetImmediateIntrinsicRecdOrClassFieldsOfType (optFilter, _ad) _m ty = + match tryDestAppTy g ty with + | ValueNone -> [] + | ValueSome tcref -> // Note;secret fields are not allowed in lookups here, as we're only looking // up user-visible fields in name resolution. match optFilter with | Some nm -> match tcref.GetFieldByName nm with - | Some rfield when not rfield.IsCompilerGenerated -> [MakeRecdFieldInfo g typ tcref rfield] + | Some rfield when not rfield.IsCompilerGenerated -> [MakeRecdFieldInfo g ty tcref rfield] | _ -> [] | None -> [ for fdef in tcref.AllFieldsArray do if not fdef.IsCompilerGenerated then - yield MakeRecdFieldInfo g typ tcref fdef ] + yield MakeRecdFieldInfo g ty tcref fdef ] /// The primitive reader for the method info sets up a hierarchy - let GetIntrinsicMethodSetsUncached ((optFilter,ad,allowMultiIntfInst),m,typ) = - FoldPrimaryHierarchyOfType (fun typ acc -> GetImmediateIntrinsicMethInfosOfType (optFilter,ad) g amap m typ :: acc) g amap m allowMultiIntfInst typ [] + let GetIntrinsicMethodSetsUncached ((optFilter,ad,allowMultiIntfInst),m,ty) = + FoldPrimaryHierarchyOfType (fun ty acc -> GetImmediateIntrinsicMethInfosOfType (optFilter,ad) g amap m ty :: acc) g amap m allowMultiIntfInst ty [] /// The primitive reader for the property info sets up a hierarchy - let GetIntrinsicPropertySetsUncached ((optFilter,ad,allowMultiIntfInst),m,typ) = - FoldPrimaryHierarchyOfType (fun typ acc -> GetImmediateIntrinsicPropInfosOfType (optFilter,ad) g amap m typ :: acc) g amap m allowMultiIntfInst typ [] + let GetIntrinsicPropertySetsUncached ((optFilter,ad,allowMultiIntfInst),m,ty) = + FoldPrimaryHierarchyOfType (fun ty acc -> GetImmediateIntrinsicPropInfosOfType (optFilter,ad) g amap m ty :: acc) g amap m allowMultiIntfInst ty [] - let GetIntrinsicILFieldInfosUncached ((optFilter,ad),m,typ) = - FoldPrimaryHierarchyOfType (fun typ acc -> GetImmediateIntrinsicILFieldsOfType (optFilter,ad) m typ @ acc) g amap m AllowMultiIntfInstantiations.Yes typ [] + let GetIntrinsicILFieldInfosUncached ((optFilter,ad),m,ty) = + FoldPrimaryHierarchyOfType (fun ty acc -> GetImmediateIntrinsicILFieldsOfType (optFilter,ad) m ty @ acc) g amap m AllowMultiIntfInstantiations.Yes ty [] - let GetIntrinsicEventInfosUncached ((optFilter,ad),m,typ) = - FoldPrimaryHierarchyOfType (fun typ acc -> ComputeImmediateIntrinsicEventsOfType (optFilter,ad) m typ @ acc) g amap m AllowMultiIntfInstantiations.Yes typ [] + let GetIntrinsicEventInfosUncached ((optFilter,ad),m,ty) = + FoldPrimaryHierarchyOfType (fun ty acc -> ComputeImmediateIntrinsicEventsOfType (optFilter,ad) m ty @ acc) g amap m AllowMultiIntfInstantiations.Yes ty [] - let GetIntrinsicRecdOrClassFieldInfosUncached ((optFilter,ad),m,typ) = - FoldPrimaryHierarchyOfType (fun typ acc -> GetImmediateIntrinsicRecdOrClassFieldsOfType (optFilter,ad) m typ @ acc) g amap m AllowMultiIntfInstantiations.Yes typ [] + let GetIntrinsicRecdOrClassFieldInfosUncached ((optFilter,ad),m,ty) = + FoldPrimaryHierarchyOfType (fun ty acc -> GetImmediateIntrinsicRecdOrClassFieldsOfType (optFilter,ad) m ty @ acc) g amap m AllowMultiIntfInstantiations.Yes ty [] - let GetEntireTypeHierachyUncached (allowMultiIntfInst,m,typ) = - FoldEntireHierarchyOfType (fun typ acc -> typ :: acc) g amap m allowMultiIntfInst typ [] + let GetEntireTypeHierachyUncached (allowMultiIntfInst,m,ty) = + FoldEntireHierarchyOfType (fun ty acc -> ty :: acc) g amap m allowMultiIntfInst ty [] - let GetPrimaryTypeHierachyUncached (allowMultiIntfInst,m,typ) = - FoldPrimaryHierarchyOfType (fun typ acc -> typ :: acc) g amap m allowMultiIntfInst typ [] + let GetPrimaryTypeHierachyUncached (allowMultiIntfInst,m,ty) = + FoldPrimaryHierarchyOfType (fun ty acc -> ty :: acc) g amap m allowMultiIntfInst ty [] /// The primitive reader for the named items up a hierarchy - let GetIntrinsicNamedItemsUncached ((nm,ad),m,typ) = + let GetIntrinsicNamedItemsUncached ((nm,ad),m,ty) = if nm = ".ctor" then None else // '.ctor' lookups only ever happen via constructor syntax let optFilter = Some nm - FoldPrimaryHierarchyOfType (fun typ acc -> - let minfos = GetImmediateIntrinsicMethInfosOfType (optFilter,ad) g amap m typ - let pinfos = GetImmediateIntrinsicPropInfosOfType (optFilter,ad) g amap m typ - let finfos = GetImmediateIntrinsicILFieldsOfType (optFilter,ad) m typ - let einfos = ComputeImmediateIntrinsicEventsOfType (optFilter,ad) m typ - let rfinfos = GetImmediateIntrinsicRecdOrClassFieldsOfType (optFilter,ad) m typ + FoldPrimaryHierarchyOfType (fun ty acc -> + let minfos = GetImmediateIntrinsicMethInfosOfType (optFilter,ad) g amap m ty + let pinfos = GetImmediateIntrinsicPropInfosOfType (optFilter,ad) g amap m ty + let finfos = GetImmediateIntrinsicILFieldsOfType (optFilter,ad) m ty + let einfos = ComputeImmediateIntrinsicEventsOfType (optFilter,ad) m ty + let rfinfos = GetImmediateIntrinsicRecdOrClassFieldsOfType (optFilter,ad) m ty match acc with | Some(MethodItem(inheritedMethSets)) when not (isNil minfos) -> Some(MethodItem (minfos::inheritedMethSets)) | _ when not (isNil minfos) -> Some(MethodItem ([minfos])) @@ -302,7 +330,7 @@ type InfoReader(g:TcGlobals, amap:Import.ImportMap) = | _ -> acc) g amap m AllowMultiIntfInstantiations.Yes - typ + ty None /// Make a cache for function 'f' keyed by type (plus some additional 'flags') that only @@ -314,8 +342,8 @@ type InfoReader(g:TcGlobals, amap:Import.ImportMap) = // Only cache closed, monomorphic types (closed = all members for the type // have been processed). Generic type instantiations could be processed if we had // a decent hash function for these. - canMemoize=(fun (_flags,(_:range),typ) -> - match stripTyEqns g typ with + canMemoize=(fun (_flags,(_:range),ty) -> + match stripTyEqns g ty with | TType_app(tcref,[]) -> tcref.TypeContents.tcaug_closed | _ -> false), @@ -327,10 +355,10 @@ type InfoReader(g:TcGlobals, amap:Import.ImportMap) = match stripTyEqns g typ1, stripTyEqns g typ2 with | TType_app(tcref1,[]),TType_app(tcref2,[]) -> tyconRefEq g tcref1 tcref2 | _ -> false - member x.GetHashCode((flags,_,typ)) = + member x.GetHashCode((flags,_,ty)) = // Ignoring the ranges - that's OK. flagsEq.GetHashCode flags + - (match stripTyEqns g typ with + (match stripTyEqns g ty with | TType_app(tcref,[]) -> hash tcref.LogicalName | _ -> 0) }) @@ -365,91 +393,98 @@ type InfoReader(g:TcGlobals, amap:Import.ImportMap) = member x.amap = amap /// Read the raw method sets of a type, including inherited ones. Cache the result for monomorphic types - member x.GetRawIntrinsicMethodSetsOfType (optFilter,ad,allowMultiIntfInst,m,typ) = - methodInfoCache.Apply(((optFilter,ad,allowMultiIntfInst),m,typ)) + member x.GetRawIntrinsicMethodSetsOfType (optFilter,ad,allowMultiIntfInst,m,ty) = + methodInfoCache.Apply(((optFilter,ad,allowMultiIntfInst),m,ty)) /// Read the raw property sets of a type, including inherited ones. Cache the result for monomorphic types - member x.GetRawIntrinsicPropertySetsOfType (optFilter,ad,allowMultiIntfInst,m,typ) = - propertyInfoCache.Apply(((optFilter,ad,allowMultiIntfInst),m,typ)) + member x.GetRawIntrinsicPropertySetsOfType (optFilter,ad,allowMultiIntfInst,m,ty) = + propertyInfoCache.Apply(((optFilter,ad,allowMultiIntfInst),m,ty)) /// Read the record or class fields of a type, including inherited ones. Cache the result for monomorphic types. - member x.GetRecordOrClassFieldsOfType (optFilter,ad,m,typ) = - recdOrClassFieldInfoCache.Apply(((optFilter,ad),m,typ)) + member x.GetRecordOrClassFieldsOfType (optFilter,ad,m,ty) = + recdOrClassFieldInfoCache.Apply(((optFilter,ad),m,ty)) /// Read the IL fields of a type, including inherited ones. Cache the result for monomorphic types. - member x.GetILFieldInfosOfType (optFilter,ad,m,typ) = - ilFieldInfoCache.Apply(((optFilter,ad),m,typ)) + member x.GetILFieldInfosOfType (optFilter,ad,m,ty) = + ilFieldInfoCache.Apply(((optFilter,ad),m,ty)) - member x.GetImmediateIntrinsicEventsOfType (optFilter,ad,m,typ) = ComputeImmediateIntrinsicEventsOfType (optFilter,ad) m typ + member x.GetImmediateIntrinsicEventsOfType (optFilter,ad,m,ty) = ComputeImmediateIntrinsicEventsOfType (optFilter,ad) m ty /// Read the events of a type, including inherited ones. Cache the result for monomorphic types. - member x.GetEventInfosOfType (optFilter,ad,m,typ) = - eventInfoCache.Apply(((optFilter,ad),m,typ)) + member x.GetEventInfosOfType (optFilter,ad,m,ty) = + eventInfoCache.Apply(((optFilter,ad),m,ty)) /// Try and find a record or class field for a type. - member x.TryFindRecdOrClassFieldInfoOfType (nm,m,typ) = - match recdOrClassFieldInfoCache.Apply((Some nm,AccessibleFromSomewhere),m,typ) with - | [] -> None - | [single] -> Some single + member x.TryFindRecdOrClassFieldInfoOfType (nm,m,ty) = + match recdOrClassFieldInfoCache.Apply((Some nm,AccessibleFromSomewhere),m,ty) with + | [] -> ValueNone + | [single] -> ValueSome single | flds -> // multiple fields with the same name can come from different classes, // so filter them by the given type name - match tryDestAppTy g typ with - | None -> None - | Some tcref -> + match tryDestAppTy g ty with + | ValueNone -> ValueNone + | ValueSome tcref -> match flds |> List.filter (fun rfinfo -> tyconRefEq g tcref rfinfo.TyconRef) with - | [] -> None - | [single] -> Some single + | [] -> ValueNone + | [single] -> ValueSome single | _ -> failwith "unexpected multiple fields with same name" // Because it should have been already reported as duplicate fields /// Try and find an item with the given name in a type. - member x.TryFindNamedItemOfType (nm,ad,m,typ) = - namedItemsCache.Apply(((nm,ad),m,typ)) + member x.TryFindNamedItemOfType (nm,ad,m,ty) = + namedItemsCache.Apply(((nm,ad),m,ty)) /// Get the super-types of a type, including interface types. - member x.GetEntireTypeHierachy (allowMultiIntfInst,m,typ) = - entireTypeHierarchyCache.Apply((allowMultiIntfInst,m,typ)) + member x.GetEntireTypeHierachy (allowMultiIntfInst,m,ty) = + entireTypeHierarchyCache.Apply((allowMultiIntfInst,m,ty)) /// Get the super-types of a type, excluding interface types. - member x.GetPrimaryTypeHierachy (allowMultiIntfInst,m,typ) = - primaryTypeHierarchyCache.Apply((allowMultiIntfInst,m,typ)) - + member x.GetPrimaryTypeHierachy (allowMultiIntfInst,m,ty) = + primaryTypeHierarchyCache.Apply((allowMultiIntfInst,m,ty)) -//------------------------------------------------------------------------- -// Constructor infos - /// Get the declared constructors of any F# type -let GetIntrinsicConstructorInfosOfType (infoReader:InfoReader) m ty = +let rec GetIntrinsicConstructorInfosOfTypeAux (infoReader:InfoReader) m origTy metadataTy = protectAssemblyExploration [] (fun () -> let g = infoReader.g let amap = infoReader.amap - if isAppTy g ty then - match metadataOfTy g ty with + match metadataOfTy g metadataTy with #if !NO_EXTENSIONTYPING - | ProvidedTypeMetadata info -> - let st = info.ProvidedType - [ for ci in st.PApplyArray((fun st -> st.GetConstructors()), "GetConstructors", m) do - yield ProvidedMeth(amap,ci.Coerce(m),None,m) ] + | ProvidedTypeMetadata info -> + let st = info.ProvidedType + [ for ci in st.PApplyArray((fun st -> st.GetConstructors()), "GetConstructors", m) do + yield ProvidedMeth(amap,ci.Coerce(m),None,m) ] #endif - | ILTypeMetadata _ -> - let tinfo = ILTypeInfo.FromType g ty - tinfo.RawMetadata.Methods.FindByName ".ctor" - |> List.filter (fun md -> match md.mdKind with MethodKind.Ctor -> true | _ -> false) - |> List.map (fun mdef -> MethInfo.CreateILMeth (amap, m, ty, mdef)) - - | FSharpOrArrayOrByrefOrTupleOrExnTypeMetadata -> - let tcref = tcrefOfAppTy g ty - tcref.MembersOfFSharpTyconByName - |> NameMultiMap.find ".ctor" - |> List.choose(fun vref -> - match vref.MemberInfo with - | Some membInfo when (membInfo.MemberFlags.MemberKind = MemberKind.Constructor) -> Some vref - | _ -> None) - |> List.map (fun x -> FSMeth(g,ty,x,None)) - else [] + | ILTypeMetadata _ -> + let tinfo = ILTypeInfo.FromType g origTy + tinfo.RawMetadata.Methods.FindByName ".ctor" + |> List.filter (fun md -> md.IsConstructor) + |> List.map (fun mdef -> MethInfo.CreateILMeth (amap, m, origTy, mdef)) + + | FSharpOrArrayOrByrefOrTupleOrExnTypeMetadata -> + // Tuple types also support constructors. In this case convert to the .NET Tuple type that carries metadata and try again + // Function types also support constructors. In this case convert to the FSharpFunc type that carries metadata and try again + if isAnyTupleTy g metadataTy || isFunTy g metadataTy then + let betterMetadataTy = convertToTypeWithMetadataIfPossible g metadataTy + GetIntrinsicConstructorInfosOfTypeAux infoReader m origTy betterMetadataTy + else + match tryDestAppTy g metadataTy with + | ValueNone -> [] + | ValueSome tcref -> + tcref.MembersOfFSharpTyconByName + |> NameMultiMap.find ".ctor" + |> List.choose(fun vref -> + match vref.MemberInfo with + | Some membInfo when (membInfo.MemberFlags.MemberKind = MemberKind.Constructor) -> Some vref + | _ -> None) + |> List.map (fun x -> FSMeth(g, origTy, x, None)) ) +let GetIntrinsicConstructorInfosOfType infoReader m ty = + GetIntrinsicConstructorInfosOfTypeAux infoReader m ty ty + + + //------------------------------------------------------------------------- // Collecting methods and properties taking into account hiding rules in the hierarchy @@ -602,7 +637,7 @@ let ExcludeHiddenOfMethInfos g amap m (minfos:MethInfo list list) = (fun minfo -> minfo.LogicalName) (fun m1 m2 -> // only hide those truly from super classes - not (tyconRefEq g (tcrefOfAppTy g m1.EnclosingType) (tcrefOfAppTy g m2.EnclosingType)) && + not (tyconRefEq g m1.DeclaringTyconRef m2.DeclaringTyconRef) && MethInfosEquivByNameAndPartialSig EraseNone true g amap m m1 m2) |> List.concat @@ -614,26 +649,26 @@ let ExcludeHiddenOfPropInfos g amap m pinfos = |> List.concat /// Get the sets of intrinsic methods in the hierarchy (not including extension methods) -let GetIntrinsicMethInfoSetsOfType (infoReader:InfoReader) (optFilter,ad,allowMultiIntfInst) findFlag m typ = - infoReader.GetRawIntrinsicMethodSetsOfType(optFilter,ad,allowMultiIntfInst,m,typ) +let GetIntrinsicMethInfoSetsOfType (infoReader:InfoReader) (optFilter,ad,allowMultiIntfInst) findFlag m ty = + infoReader.GetRawIntrinsicMethodSetsOfType(optFilter,ad,allowMultiIntfInst,m,ty) |> FilterOverridesOfMethInfos findFlag infoReader.g infoReader.amap m /// Get the sets intrinsic properties in the hierarchy (not including extension properties) -let GetIntrinsicPropInfoSetsOfType (infoReader:InfoReader) (optFilter,ad,allowMultiIntfInst) findFlag m typ = - infoReader.GetRawIntrinsicPropertySetsOfType(optFilter,ad,allowMultiIntfInst,m,typ) +let GetIntrinsicPropInfoSetsOfType (infoReader:InfoReader) (optFilter,ad,allowMultiIntfInst) findFlag m ty = + infoReader.GetRawIntrinsicPropertySetsOfType(optFilter,ad,allowMultiIntfInst,m,ty) |> FilterOverridesOfPropInfos findFlag infoReader.g infoReader.amap m /// Get the flattened list of intrinsic methods in the hierarchy -let GetIntrinsicMethInfosOfType infoReader (optFilter,ad,allowMultiIntfInst) findFlag m typ = - GetIntrinsicMethInfoSetsOfType infoReader (optFilter,ad,allowMultiIntfInst) findFlag m typ |> List.concat +let GetIntrinsicMethInfosOfType infoReader (optFilter,ad,allowMultiIntfInst) findFlag m ty = + GetIntrinsicMethInfoSetsOfType infoReader (optFilter,ad,allowMultiIntfInst) findFlag m ty |> List.concat /// Get the flattened list of intrinsic properties in the hierarchy -let GetIntrinsicPropInfosOfType infoReader (optFilter,ad,allowMultiIntfInst) findFlag m typ = - GetIntrinsicPropInfoSetsOfType infoReader (optFilter,ad,allowMultiIntfInst) findFlag m typ |> List.concat +let GetIntrinsicPropInfosOfType infoReader (optFilter,ad,allowMultiIntfInst) findFlag m ty = + GetIntrinsicPropInfoSetsOfType infoReader (optFilter,ad,allowMultiIntfInst) findFlag m ty |> List.concat /// Perform type-directed name resolution of a particular named member in an F# type -let TryFindIntrinsicNamedItemOfType (infoReader:InfoReader) (nm,ad) findFlag m typ = - match infoReader.TryFindNamedItemOfType(nm, ad, m, typ) with +let TryFindIntrinsicNamedItemOfType (infoReader:InfoReader) (nm,ad) findFlag m ty = + match infoReader.TryFindNamedItemOfType(nm, ad, m, ty) with | Some item -> match item with | PropertyItem psets -> Some(PropertyItem (psets |> FilterOverridesOfPropInfos findFlag infoReader.g infoReader.amap m)) @@ -689,7 +724,7 @@ let GetSigOfFunctionForDelegate (infoReader:InfoReader) delty m ad = SigOfFunctionForDelegate(invokeMethInfo,compiledViewOfDelArgTys,delRetTy,fty) /// Try and interpret a delegate type as a "standard" .NET delegate type associated with an event, with a "sender" parameter. -let TryDestStandardDelegateTyp (infoReader:InfoReader) m ad delTy = +let TryDestStandardDelegateType (infoReader:InfoReader) m ad delTy = let g = infoReader.g let (SigOfFunctionForDelegate(_,compiledViewOfDelArgTys,delRetTy,_)) = GetSigOfFunctionForDelegate infoReader delTy m ad match compiledViewOfDelArgTys with @@ -714,7 +749,7 @@ let TryDestStandardDelegateTyp (infoReader:InfoReader) m ad delTy = /// (from http://msdn.microsoft.com/library/default.asp?url=/library/en-us/csref/html/vcwlkEventsTutorial.asp) let IsStandardEventInfo (infoReader:InfoReader) m ad (einfo:EventInfo) = let dty = einfo.GetDelegateType(infoReader.amap,m) - match TryDestStandardDelegateTyp infoReader m ad dty with + match TryDestStandardDelegateType infoReader m ad dty with | Some _ -> true | None -> false @@ -722,7 +757,7 @@ let IsStandardEventInfo (infoReader:InfoReader) m ad (einfo:EventInfo) = let ArgsTypOfEventInfo (infoReader:InfoReader) m ad (einfo:EventInfo) = let amap = infoReader.amap let dty = einfo.GetDelegateType(amap,m) - match TryDestStandardDelegateTyp infoReader m ad dty with + match TryDestStandardDelegateType infoReader m ad dty with | Some(argtys,_) -> argtys | None -> error(nonStandardEventError einfo.EventName m) diff --git a/src/fsharp/InnerLambdasToTopLevelFuncs.fs b/src/fsharp/InnerLambdasToTopLevelFuncs.fs index e2547a9325d..da5c49f4bb7 100644 --- a/src/fsharp/InnerLambdasToTopLevelFuncs.fs +++ b/src/fsharp/InnerLambdasToTopLevelFuncs.fs @@ -2,12 +2,9 @@ module internal Microsoft.FSharp.Compiler.InnerLambdasToTopLevelFuncs -open Internal.Utilities -open Microsoft.FSharp.Compiler.AbstractIL +open Microsoft.FSharp.Compiler open Microsoft.FSharp.Compiler.AbstractIL.Internal open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library - -open Microsoft.FSharp.Compiler open Microsoft.FSharp.Compiler.AbstractIL.Diagnostics open Microsoft.FSharp.Compiler.Ast open Microsoft.FSharp.Compiler.ErrorLogger @@ -19,22 +16,8 @@ open Microsoft.FSharp.Compiler.Layout open Microsoft.FSharp.Compiler.Detuple.GlobalUsageAnalysis open Microsoft.FSharp.Compiler.Lib - let verboseTLR = false -#if TLR_LIFT -/// Turns on explicit lifting of TLR constants to toplevel -/// e.g. use true if want the TLR constants to be initialised once. -/// -/// NOTE: liftTLR is incomplete and disabled -/// Approach is to filter Top* let binds whilst "under lambdas", -/// and wrap them around that expr ASAP (when get to TopLevel position). -/// However, for arity assigned public vals (not TLR at moment), -/// assumptions that their RHS are lambdas get broken since the -/// lambda can be wrapped with bindings... -let liftTLR = ref false -#endif - //------------------------------------------------------------------------- // library helpers //------------------------------------------------------------------------- @@ -166,7 +149,7 @@ let IsRefusedTLR g (f:Val) = // things marked ValInline.Never are special let dllImportStubOrOtherNeverInline = (f.InlineInfo = ValInline.Never) // Cannot have static fields of byref type - let byrefVal = isByrefLikeTy g f.Type + let byrefVal = isByrefLikeTy g f.Range f.Type // Special values are instance methods etc. on .NET types. For now leave these alone let specialVal = f.MemberInfo.IsSome let alreadyChosen = f.ValReprInfo.IsSome @@ -179,10 +162,9 @@ let IsMandatoryTopLevel (f:Val) = specialVal || isModulBinding let IsMandatoryNonTopLevel g (f:Val) = - let byrefVal = isByrefLikeTy g f.Type + let byrefVal = isByrefLikeTy g f.Range f.Type byrefVal - //------------------------------------------------------------------------- // pass1: decide which f are to be TLR? and if so, arity(f) //------------------------------------------------------------------------- @@ -744,7 +726,7 @@ let FlatEnvPacks g fclassM topValS declist (reqdItemsMap: Zmap List.filter (fun v -> not (isByrefLikeTy g v.Type)) + let vals = vals |> List.filter (fun v -> not (isByrefLikeTy g v.Range v.Type)) // Remove values which have been labelled TLR, no need to close over these let vals = vals |> List.filter (Zset.memberOf topValS >> not) @@ -843,7 +825,7 @@ let CreateNewValuesForTLR g tlrS arityM fclassM envPackM = let wf = Zmap.force f arityM ("createFHat - wf",(fun v -> showL (valL v))) let fc = Zmap.force f fclassM ("createFHat - fc",nameOfVal) let envp = Zmap.force fc envPackM ("CreateNewValuesForTLR - envp",string) - let name = f.LogicalName (* ^ "_TLR_" ^ string wf *) + let name = f.LogicalName (* + "_TLR_" + string wf *) let m = f.Range let tps,tau = f.TypeScheme let argtys,res = stripFunTy g tau @@ -937,25 +919,8 @@ module Pass4_RewriteAssembly = let SetPreDecs z pdt = {z with rws_preDecs=pdt} /// collect Top* repr bindings - if needed... -#if TLR_LIFT - let LiftTopBinds isRec _penv z binds = - let isTopBind (bind: Binding) = Option.isSome bind.Var.ValReprInfo - let topBinds,otherBinds = List.partition isTopBind binds - let liftTheseBindings = - !liftTLR && // lifting enabled - not z.rws_mustinline && // can't lift bindings in a mustinline context - they would become private an not inlined - z.rws_innerLevel>0 && // only collect Top* bindings when at inner levels (else will drop them!) - not (isNil topBinds) // only collect topBinds if there are some! - if liftTheseBindings then - let LiftedDeclaration = isRec,topBinds // LiftedDeclaration Top* decs - let z = {z with rws_preDecs = TreeNode [z.rws_preDecs;LeafNode LiftedDeclaration]} // logged at end - z,otherBinds - else - z,binds (* not "topBinds @ otherBinds" since that has changed order... *) -#else let LiftTopBinds _isRec _penv z binds = z,binds -#endif /// Wrap preDecs (in order) over an expr - use letrec/let as approp let MakePreDec m (isRec,binds: Bindings) expr = @@ -1023,7 +988,7 @@ module Pass4_RewriteAssembly = // Take off the variables let tps,vss,b,rty = stripTopLambda (b,f.Type) // Don't take all the variables - only up to length wf - let vssTake,vssDrop = List.chop wf vss + let vssTake,vssDrop = List.splitAt wf vss // put the variables back on let b,rty = mkMultiLambdasCore b.Range vssDrop (b,rty) // fHat, args @@ -1283,9 +1248,9 @@ module Pass4_RewriteAssembly = and TransValBindings penv z binds = List.mapFold (TransValBinding penv) z binds and TransModuleExpr penv z x = match x with - | ModuleOrNamespaceExprWithSig(mty,def,m) -> + | ModuleOrNamespaceExprWithSig(mty, def, m) -> let def,z = TransModuleDef penv z def - ModuleOrNamespaceExprWithSig(mty,def,m),z + ModuleOrNamespaceExprWithSig(mty, def, m),z and TransModuleDefs penv z x = List.mapFold (TransModuleDef penv) z x and TransModuleDef penv (z: RewriteState) x : ModuleOrNamespaceExpr * RewriteState = diff --git a/src/fsharp/InnerLambdasToTopLevelFuncs.fsi b/src/fsharp/InnerLambdasToTopLevelFuncs.fsi index 10709b5486d..916d5634384 100644 --- a/src/fsharp/InnerLambdasToTopLevelFuncs.fsi +++ b/src/fsharp/InnerLambdasToTopLevelFuncs.fsi @@ -6,6 +6,3 @@ open Microsoft.FSharp.Compiler open Microsoft.FSharp.Compiler.TcGlobals val MakeTLRDecisions : Tast.CcuThunk -> TcGlobals -> Tast.TypedImplFile -> Tast.TypedImplFile -#if TLR_LIFT -val liftTLR : bool ref -#endif diff --git a/src/fsharp/InternalCollections.fs b/src/fsharp/InternalCollections.fs index 51fedcd6f96..8713eef00ff 100755 --- a/src/fsharp/InternalCollections.fs +++ b/src/fsharp/InternalCollections.fs @@ -198,37 +198,3 @@ type internal MruCache<'Token, 'Key,'Value when 'Value : not struct>(keepStrongl member bc.Resize(tok, newKeepStrongly, ?newKeepMax) = cache.Resize(tok, newKeepStrongly, ?newKeepMax=newKeepMax) -/// List helpers -[] -type internal List = - /// Return a new list with one element for each unique 'Key. Multiple 'TValues are flattened. - /// The original order of the first instance of 'Key is preserved. - static member groupByFirst( l : ('Key * 'Value) list) : ('Key * 'Value list) list = - let nextIndex = ref 0 - let result = System.Collections.Generic.List<'Key * System.Collections.Generic.List<'Value>>() - let keyToIndex = Dictionary<'Key,int>(HashIdentity.Structural) - let indexOfKey(key) = - match keyToIndex.TryGetValue(key) with - | true, v -> v - | false, _ -> - keyToIndex.Add(key,!nextIndex) - nextIndex := !nextIndex + 1 - !nextIndex - 1 - - for kv in l do - let index = indexOfKey(fst kv) - if index>= result.Count then - let k,vs = fst kv,System.Collections.Generic.List<'Value>() - vs.Add(snd kv) - result.Add(k,vs) - else - let _,vs = result.[index] - vs.Add(snd kv) - - result |> Seq.map(fun (k,vs) -> k,vs |> List.ofSeq ) |> List.ofSeq - - /// Return each distinct item in the list using reference equality. - static member referenceDistinct( l : 'T list) : 'T list when 'T : not struct = - let set = System.Collections.Generic.Dictionary<'T,bool>(HashIdentity.Reference) - l |> List.iter(fun i->set.Add(i,true)) - set |> Seq.map(fun kv->kv.Key) |> List.ofSeq diff --git a/src/fsharp/InternalCollections.fsi b/src/fsharp/InternalCollections.fsi index 8e26bc95782..711fb91d848 100755 --- a/src/fsharp/InternalCollections.fsi +++ b/src/fsharp/InternalCollections.fsi @@ -75,10 +75,3 @@ namespace Internal.Utilities.Collections /// Resize member Resize : 'Token * keepStrongly: int * ?keepMax : int -> unit - [] - type internal List = - /// Return a new list with one element for each unique 'Key. Multiple 'TValues are flattened. - /// The original order of the first instance of 'Key is preserved. - static member groupByFirst : l:('Key * 'Value) list -> ('Key * 'Value list) list when 'Key : equality - /// Return each distinct item in the list using reference equality. - static member referenceDistinct : 'T list -> 'T list when 'T : not struct diff --git a/src/fsharp/LegacyHostedCompilerForTesting.fs b/src/fsharp/LegacyHostedCompilerForTesting.fs index 38cfd28d8e8..1f8e258e07e 100644 --- a/src/fsharp/LegacyHostedCompilerForTesting.fs +++ b/src/fsharp/LegacyHostedCompilerForTesting.fs @@ -13,6 +13,7 @@ open Microsoft.FSharp.Compiler open Microsoft.FSharp.Compiler.Driver open Microsoft.FSharp.Compiler.ErrorLogger open Microsoft.FSharp.Compiler.CompileOps +open Microsoft.FSharp.Compiler.AbstractIL.ILBinaryReader open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library /// build issue location @@ -65,7 +66,7 @@ type internal InProcCompiler(legacyReferenceResolver) = { new Exiter with member this.Exit n = exitCode := n; raise StopProcessing } try - typecheckAndCompile(ctok, argv, legacyReferenceResolver, false, false, true, exiter, loggerProvider.Provider, None, None) + typecheckAndCompile(ctok, argv, legacyReferenceResolver, false, ReduceMemoryFlag.Yes, CopyFSharpCoreFlag.Yes, exiter, loggerProvider.Provider, None, None) with | StopProcessing -> () | ReportedError _ | WrappedError(ReportedError _,_) -> diff --git a/src/fsharp/LexFilter.fs b/src/fsharp/LexFilter.fs index 5b9deaf832e..f8b7f951c29 100755 --- a/src/fsharp/LexFilter.fs +++ b/src/fsharp/LexFilter.fs @@ -444,7 +444,7 @@ type TokenTup = let (|TyparsCloseOp|_|) (txt:string) = let angles = txt |> Seq.takeWhile (fun c -> c = '>') |> Seq.toList let afterAngles = txt |> Seq.skipWhile (fun c -> c = '>') |> Seq.toList - if angles.Length = 0 then None else + if List.isEmpty angles then None else let afterOp = match (new System.String(Array.ofSeq afterAngles)) with @@ -669,8 +669,11 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, -> unindentationLimit false rest // 'f ...{' places no limit until we hit a CtxtLetDecl etc... - | _,(CtxtParen (LBRACE,_) :: CtxtVanilla _ :: CtxtSeqBlock _ :: rest) - | _,(CtxtSeqBlock _ :: CtxtParen(LBRACE,_) :: CtxtVanilla _ :: CtxtSeqBlock _ :: rest) + // 'f ...[' places no limit until we hit a CtxtLetDecl etc... + // 'f ...[|' places no limit until we hit a CtxtLetDecl etc... + | _,(CtxtParen ((LBRACE | LBRACK | LBRACK_BAR),_) :: CtxtSeqBlock _ :: rest) + | _,(CtxtParen ((LBRACE | LBRACK | LBRACK_BAR),_) :: CtxtVanilla _ :: CtxtSeqBlock _ :: rest) + | _,(CtxtSeqBlock _ :: CtxtParen((LBRACE | LBRACK | LBRACK_BAR),_) :: CtxtVanilla _ :: CtxtSeqBlock _ :: rest) -> unindentationLimit false rest @@ -1048,7 +1051,7 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, | Parser.EOF _ -> false | _ -> not (isSameLine()) || - (match peekNextToken() with TRY | MATCH | IF | LET _ | FOR | WHILE -> true | _ -> false) + (match peekNextToken() with TRY | MATCH | MATCH_BANG | IF | LET _ | FOR | WHILE -> true | _ -> false) // Look for '=' or '.Id.id.id = ' after an identifier let rec isLongIdentEquals token = @@ -2031,7 +2034,7 @@ type LexFilterImpl (lightSyntaxStatus:LightSyntaxStatus, compilingFsLib, lexer, pushCtxt tokenTup (CtxtIf (tokenStartPos)) returnToken tokenLexbufState token - | MATCH, _ -> + | (MATCH | MATCH_BANG), _ -> if debug then dprintf "MATCH, pushing CtxtMatch(%a)\n" outputPos tokenStartPos pushCtxt tokenTup (CtxtMatch (tokenStartPos)) returnToken tokenLexbufState token diff --git a/src/fsharp/Logger.fs b/src/fsharp/Logger.fs new file mode 100644 index 00000000000..7ecfe842f27 --- /dev/null +++ b/src/fsharp/Logger.fs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace Microsoft.FSharp.Compiler + +open System.Diagnostics.Tracing +open System + +type LogCompilerFunctionId = + | Service_ParseAndCheckFileInProject = 1 + | Service_CheckOneFile = 2 + | Service_IncrementalBuildersCache_BuildingNewCache = 3 + | Service_IncrementalBuildersCache_GettingCache = 4 + | CompileOps_TypeCheckOneInputAndFinishEventually = 5 + +/// This is for ETW tracing across FSharp.Compiler. +[] +type FSharpCompilerEventSource() = + inherit EventSource() + + static let instance = new FSharpCompilerEventSource() + static member Instance = instance + + [] + member this.Log(functionId: LogCompilerFunctionId) = + if this.IsEnabled() then + this.WriteEvent(1, int functionId) + + + [] + member this.LogMessage(message: string, functionId: LogCompilerFunctionId) = + if this.IsEnabled() then + this.WriteEvent(2, message, int functionId) + + [] + member this.BlockStart(functionId: LogCompilerFunctionId) = + if this.IsEnabled() then + this.WriteEvent(3, int functionId) + + [] + member this.BlockStop(functionId: LogCompilerFunctionId) = + if this.IsEnabled() then + this.WriteEvent(4, int functionId) + + [] + member this.BlockMessageStart(message: string, functionId: LogCompilerFunctionId) = + if this.IsEnabled() then + this.WriteEvent(5, message, int functionId) + + [] + member this.BlockMessageStop(message: string, functionId: LogCompilerFunctionId) = + if this.IsEnabled() then + this.WriteEvent(6, message, int functionId) + +[] +module Logger = + + let Log(functionId) = + FSharpCompilerEventSource.Instance.Log(functionId) + + let LogMessage message functionId = + FSharpCompilerEventSource.Instance.LogMessage(message, functionId) + + let LogBlockStart(functionId) = + FSharpCompilerEventSource.Instance.BlockStart(functionId) + + let LogBlockStop(functionId) = + FSharpCompilerEventSource.Instance.BlockStop(functionId) + + let LogBlockMessageStart message functionId = + FSharpCompilerEventSource.Instance.BlockMessageStart(message, functionId) + + let LogBlockMessageStop message functionId = + FSharpCompilerEventSource.Instance.BlockMessageStop(message, functionId) + + let LogBlock(functionId) = + FSharpCompilerEventSource.Instance.BlockStart(functionId) + { new IDisposable with + member __.Dispose() = + FSharpCompilerEventSource.Instance.BlockStop(functionId) } + + let LogBlockMessage message functionId = + FSharpCompilerEventSource.Instance.BlockMessageStart(message, functionId) + { new IDisposable with + member __.Dispose() = + FSharpCompilerEventSource.Instance.BlockMessageStop(message, functionId) } diff --git a/src/fsharp/Logger.fsi b/src/fsharp/Logger.fsi new file mode 100644 index 00000000000..324a0d09366 --- /dev/null +++ b/src/fsharp/Logger.fsi @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace Microsoft.FSharp.Compiler + +open System + +// FIXME: We cannot make this internal yet until F# gets a compiler switch to make cases public when the type itself is internal. +// https://github.com/Microsoft/visualfsharp/issues/4821 +type (* internal *) LogCompilerFunctionId = + | Service_ParseAndCheckFileInProject = 1 + | Service_CheckOneFile = 2 + | Service_IncrementalBuildersCache_BuildingNewCache = 3 + | Service_IncrementalBuildersCache_GettingCache = 4 + | CompileOps_TypeCheckOneInputAndFinishEventually = 5 + +[] +module internal Logger = + + val Log : LogCompilerFunctionId -> unit + + val LogMessage : message: string -> LogCompilerFunctionId -> unit + + val LogBlockStart : LogCompilerFunctionId -> unit + + val LogBlockStop : LogCompilerFunctionId -> unit + + val LogBlockMessageStart : message: string -> LogCompilerFunctionId -> unit + + val LogBlockMessageStop : message: string -> LogCompilerFunctionId -> unit + + val LogBlock : LogCompilerFunctionId -> IDisposable + + val LogBlockMessage : message: string -> LogCompilerFunctionId -> IDisposable diff --git a/src/fsharp/LowerCallsAndSeqs.fs b/src/fsharp/LowerCallsAndSeqs.fs index 9dfde6b6386..3bb5c3cbd4f 100644 --- a/src/fsharp/LowerCallsAndSeqs.fs +++ b/src/fsharp/LowerCallsAndSeqs.fs @@ -2,24 +2,19 @@ module internal Microsoft.FSharp.Compiler.LowerCallsAndSeqs -open Internal.Utilities open Microsoft.FSharp.Compiler.AbstractIL -open Microsoft.FSharp.Compiler.AbstractIL.Diagnostics open Microsoft.FSharp.Compiler.AbstractIL.IL open Microsoft.FSharp.Compiler.AbstractIL.Internal open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library -open Microsoft.FSharp.Compiler open Microsoft.FSharp.Compiler.AccessibilityLogic open Microsoft.FSharp.Compiler.Ast -open Microsoft.FSharp.Compiler.Range open Microsoft.FSharp.Compiler.Infos open Microsoft.FSharp.Compiler.ErrorLogger open Microsoft.FSharp.Compiler.Tast open Microsoft.FSharp.Compiler.Tastops open Microsoft.FSharp.Compiler.Lib open Microsoft.FSharp.Compiler.TcGlobals -open Microsoft.FSharp.Compiler.PrettyNaming open Microsoft.FSharp.Compiler.InfoReader open Microsoft.FSharp.Compiler.MethodCalls @@ -89,13 +84,18 @@ type LoweredSeqFirstPhaseResult = { /// The code to run in the second phase, to rebuild the expressions, once all code labels and their mapping to program counters have been determined /// 'nextVar' is the argument variable for the GenerateNext method that represents the byref argument that holds the "goto" destination for a tailcalling sequence expression phase2 : ((* pc: *) ValRef * (* current: *) ValRef * (* nextVar: *) ValRef * Map -> Expr * Expr * Expr) + /// The labels allocated for one portion of the sequence expression labels : int list + /// any actual work done in Close significantClose : bool /// The state variables allocated for one portion of the sequence expression (i.e. the local let-bound variables which become state variables) - stateVars: ValRef list } + stateVars: ValRef list + + /// The vars captured by the non-synchronous path + capturedVars: FreeVars } let isVarFreeInExpr v e = Zset.contains v (freeInExpr CollectTyparsAndLocals e).FreeLocals @@ -179,6 +179,17 @@ let LowerSeqExpr g amap overallExpr = | Expr.App(Expr.Val (vref,_,_),_f0ty,[elemTy],[e],_m) when valRefEq g vref g.seq_vref -> Some (e,elemTy) | _ -> None + let RepresentBindingAsLocal (bind: Binding) res2 m = + // printfn "found letrec state variable %s" bind.Var.DisplayName + { res2 with + phase2 = (fun ctxt -> + let generate2,dispose2,checkDispose2 = res2.phase2 ctxt + let generate = mkLetBind m bind generate2 + let dispose = dispose2 + let checkDispose = checkDispose2 + generate,dispose,checkDispose) + stateVars = res2.stateVars } + let RepresentBindingAsStateMachineLocal (bind: Binding) res2 m = // printfn "found letrec state variable %s" bind.Var.DisplayName let (TBind(v,e,sp)) = bind @@ -248,17 +259,28 @@ let LowerSeqExpr g amap overallExpr = labels=[label] stateVars=[] significantClose = false + capturedVars = emptyFreeVars } - | SeqDelay(e,_elemTy) -> + | SeqDelay(delayedExpr,_elemTy) -> // printfn "found Seq.delay" - Lower isWholeExpr isTailCall noDisposeContinuationLabel currentDisposeContinuationLabel e // note, using 'isWholeExpr' here prevents 'seq { yield! e }' and 'seq { 0 .. 1000 }' from being compiled + // note, using 'isWholeExpr' here prevents 'seq { yield! e }' and 'seq { 0 .. 1000 }' from being compiled + Lower isWholeExpr isTailCall noDisposeContinuationLabel currentDisposeContinuationLabel delayedExpr | SeqAppend(e1,e2,m) -> // printfn "found Seq.append" - match Lower false false noDisposeContinuationLabel currentDisposeContinuationLabel e1, - Lower false isTailCall noDisposeContinuationLabel currentDisposeContinuationLabel e2 with + let res1 = Lower false false noDisposeContinuationLabel currentDisposeContinuationLabel e1 + let res2 = Lower false isTailCall noDisposeContinuationLabel currentDisposeContinuationLabel e2 + match res1, res2 with | Some res1, Some res2 -> + + let capturedVars = + if res1.labels.IsEmpty then + res2.capturedVars + else + // All of 'e2' is needed after resuming at any of the labels + unionFreeVars res1.capturedVars (freeInExpr CollectLocals e2) + Some { phase2 = (fun ctxt -> let generate1,dispose1,checkDispose1 = res1.phase2 ctxt let generate2,dispose2,checkDispose2 = res2.phase2 ctxt @@ -270,29 +292,43 @@ let LowerSeqExpr g amap overallExpr = generate,dispose,checkDispose) labels= res1.labels @ res2.labels stateVars = res1.stateVars @ res2.stateVars - significantClose = res1.significantClose || res2.significantClose } + significantClose = res1.significantClose || res2.significantClose + capturedVars = capturedVars } | _ -> None - | SeqWhile(e1,e2,m) -> + | SeqWhile(guardExpr,bodyExpr,m) -> // printfn "found Seq.while" - match Lower false false noDisposeContinuationLabel currentDisposeContinuationLabel e2 with + let resBody = Lower false false noDisposeContinuationLabel currentDisposeContinuationLabel bodyExpr + match resBody with | Some res2 -> + let capturedVars = + if res2.labels.IsEmpty then + res2.capturedVars // the whole loopis synchronous, no labels + else + freeInExpr CollectLocals expr // everything is needed on subsequent iterations + Some { phase2 = (fun ctxt -> let generate2,dispose2,checkDispose2 = res2.phase2 ctxt - let generate = mkWhile g (SequencePointAtWhileLoop e1.Range,NoSpecialWhileLoopMarker,e1,generate2,m) + let generate = mkWhile g (SequencePointAtWhileLoop guardExpr.Range,NoSpecialWhileLoopMarker,guardExpr,generate2,m) let dispose = dispose2 let checkDispose = checkDispose2 generate,dispose,checkDispose) labels = res2.labels stateVars = res2.stateVars - significantClose = res2.significantClose } + significantClose = res2.significantClose + capturedVars = capturedVars } | _ -> None | SeqUsing(resource,v,body,elemTy,m) -> // printfn "found Seq.using" - Lower false isTailCall noDisposeContinuationLabel currentDisposeContinuationLabel (mkLet (SequencePointAtBinding body.Range) m v resource (mkCallSeqFinally g m elemTy body (mkUnitDelayLambda g m (mkCallDispose g m v.Type (exprForVal m v))))) + let reduction = + mkLet (SequencePointAtBinding body.Range) m v resource + (mkCallSeqFinally g m elemTy body + (mkUnitDelayLambda g m + (mkCallDispose g m v.Type (exprForVal m v)))) + Lower false isTailCall noDisposeContinuationLabel currentDisposeContinuationLabel reduction | SeqFor(inp,v,body,genElemTy,m) -> // printfn "found Seq.for" @@ -303,18 +339,21 @@ let LowerSeqExpr g amap overallExpr = // while enum.MoveNext() do // let v = enum.Current // body ]] - Lower false isTailCall noDisposeContinuationLabel currentDisposeContinuationLabel - (mkCallSeqUsing g m inpEnumTy genElemTy (callNonOverloadedMethod g amap m "GetEnumerator" (mkSeqTy g inpElemTy) [inp]) - (mkLambdaNoType g m enumv + let reduction = + mkCallSeqUsing g m inpEnumTy genElemTy (callNonOverloadedMethod g amap m "GetEnumerator" (mkSeqTy g inpElemTy) [inp]) + (mkLambdaNoType g m enumv (mkCallSeqGenerated g m genElemTy (mkUnitDelayLambda g m (callNonOverloadedMethod g amap m "MoveNext" inpEnumTy [enume])) (mkInvisibleLet m v (callNonOverloadedMethod g amap m "get_Current" inpEnumTy [enume]) - body)))) + (mkCoerceIfNeeded g (mkSeqTy g genElemTy) (tyOfExpr g body) body)))) + Lower false isTailCall noDisposeContinuationLabel currentDisposeContinuationLabel reduction | SeqTryFinally(e1,compensation,m) -> // printfn "found Seq.try/finally" let innerDisposeContinuationLabel = IL.generateCodeLabel() - match Lower false false noDisposeContinuationLabel innerDisposeContinuationLabel e1 with + let resBody = Lower false false noDisposeContinuationLabel innerDisposeContinuationLabel e1 + match resBody with | Some res1 -> + let capturedVars = unionFreeVars res1.capturedVars (freeInExpr CollectLocals compensation) Some { phase2 = (fun ((pcv,_currv,_,pcMap) as ctxt) -> let generate1,dispose1,checkDispose1 = res1.phase2 ctxt let generate = @@ -353,7 +392,8 @@ let LowerSeqExpr g amap overallExpr = generate,dispose,checkDispose) labels = innerDisposeContinuationLabel :: res1.labels stateVars = res1.stateVars - significantClose = true } + significantClose = true + capturedVars = capturedVars } | _ -> None @@ -366,7 +406,8 @@ let LowerSeqExpr g amap overallExpr = generate,dispose,checkDispose) labels = [] stateVars = [] - significantClose = false } + significantClose = false + capturedVars = emptyFreeVars } | Expr.Sequential(x1,x2,NormalSeq,ty,m) -> match Lower false isTailCall noDisposeContinuationLabel currentDisposeContinuationLabel x2 with @@ -381,13 +422,18 @@ let LowerSeqExpr g amap overallExpr = generate,dispose,checkDispose) } | None -> None - | Expr.Let(bind,e2,m,_) + | Expr.Let(bind,bodyExpr,m,_) // Restriction: compilation of sequence expressions containing non-toplevel constrained generic functions is not supported when bind.Var.IsCompiledAsTopLevel || not (IsGenericValWithGenericContraints g bind.Var) -> - match Lower false isTailCall noDisposeContinuationLabel currentDisposeContinuationLabel e2 with + + let resBody = Lower false isTailCall noDisposeContinuationLabel currentDisposeContinuationLabel bodyExpr + match resBody with | Some res2 -> if bind.Var.IsCompiledAsTopLevel then Some (RepresentBindingsAsLifted (mkLetBind m bind) res2) + elif not (res2.capturedVars.FreeLocals.Contains(bind.Var)) then + // printfn "found state variable %s" bind.Var.DisplayName + Some (RepresentBindingAsLocal bind res2 m) else // printfn "found state variable %s" bind.Var.DisplayName Some (RepresentBindingAsStateMachineLocal bind res2 m) @@ -426,12 +472,18 @@ let LowerSeqExpr g amap overallExpr = *) | Expr.Match (spBind,exprm,pt,targets,m,ty) when targets |> Array.forall (fun (TTarget(vs,_e,_spTarget)) -> isNil vs) -> // lower all the targets. abandon if any fail to lower - let tgl = targets |> Array.map (fun (TTarget(_vs,e,_spTarget)) -> Lower false isTailCall noDisposeContinuationLabel currentDisposeContinuationLabel e) |> Array.toList + let tglArray = targets |> Array.map (fun (TTarget(_vs,targetExpr,_spTarget)) -> Lower false isTailCall noDisposeContinuationLabel currentDisposeContinuationLabel targetExpr) // LIMITATION: non-trivial pattern matches involving or-patterns or active patterns where bindings can't be // transferred to the r.h.s. are not yet compiled. - if tgl |> List.forall Option.isSome then - let tgl = List.map Option.get tgl + if tglArray |> Array.forall Option.isSome then + let tglArray = Array.map Option.get tglArray + let tgl = Array.toList tglArray let labs = tgl |> List.collect (fun res -> res.labels) + let (capturedVars, _) = + ((emptyFreeVars, false), Array.zip targets tglArray) + ||> Array.fold (fun (fvs, seenLabel) ((TTarget(_vs,e,_spTarget)), res) -> + if seenLabel then unionFreeVars fvs (freeInExpr CollectLocals e), true + else res.capturedVars, not res.labels.IsEmpty) let stateVars = tgl |> List.collect (fun res -> res.stateVars) let significantClose = tgl |> List.exists (fun res -> res.significantClose) Some { phase2 = (fun ctxt -> @@ -448,7 +500,8 @@ let LowerSeqExpr g amap overallExpr = generate,dispose,checkDispose) labels=labs stateVars = stateVars - significantClose = significantClose } + significantClose = significantClose + capturedVars = capturedVars } else None @@ -507,7 +560,8 @@ let LowerSeqExpr g amap overallExpr = generate,dispose,checkDispose) labels=[label] stateVars=[] - significantClose = false } + significantClose = false + capturedVars = emptyFreeVars } else let v,ve = mkCompGenLocal m "v" inpElemTy Lower false isTailCall noDisposeContinuationLabel currentDisposeContinuationLabel (mkCallSeqCollect g m inpElemTy inpElemTy (mkLambdaNoType g m v (mkCallSeqSingleton g m inpElemTy ve)) arbitrarySeqExpr) diff --git a/src/fsharp/MSBuildReferenceResolver.fs b/src/fsharp/MSBuildReferenceResolver.fs index e703df8101f..804c6b74088 100644 --- a/src/fsharp/MSBuildReferenceResolver.fs +++ b/src/fsharp/MSBuildReferenceResolver.fs @@ -108,7 +108,7 @@ module internal Microsoft.FSharp.Compiler.MSBuildReferenceResolver let GetPathToDotNetFrameworkReferenceAssemblies(version) = -#if NETSTANDARD1_6 +#if NETSTANDARD1_6 || NETSTANDARD2_0 ignore version let r : string list = [] r diff --git a/src/fsharp/MethodCalls.fs b/src/fsharp/MethodCalls.fs index 8221e808746..fa812694fd0 100644 --- a/src/fsharp/MethodCalls.fs +++ b/src/fsharp/MethodCalls.fs @@ -3,13 +3,8 @@ /// Logic associated with resolving method calls. module internal Microsoft.FSharp.Compiler.MethodCalls -open Internal.Utilities -open System.Text - open Microsoft.FSharp.Compiler -open Microsoft.FSharp.Compiler.AbstractIL open Microsoft.FSharp.Compiler.AbstractIL.IL -open Microsoft.FSharp.Compiler.AbstractIL.Internal open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library open Microsoft.FSharp.Compiler.Range open Microsoft.FSharp.Compiler.Ast @@ -18,21 +13,19 @@ open Microsoft.FSharp.Compiler.Lib open Microsoft.FSharp.Compiler.Infos open Microsoft.FSharp.Compiler.AccessibilityLogic open Microsoft.FSharp.Compiler.NameResolution -open Microsoft.FSharp.Compiler.PrettyNaming -open Microsoft.FSharp.Compiler.AbstractIL.Diagnostics open Microsoft.FSharp.Compiler.InfoReader open Microsoft.FSharp.Compiler.Tast open Microsoft.FSharp.Compiler.Tastops open Microsoft.FSharp.Compiler.Tastops.DebugPrint open Microsoft.FSharp.Compiler.TcGlobals open Microsoft.FSharp.Compiler.TypeRelations +open Microsoft.FSharp.Compiler.AttributeChecking #if !NO_EXTENSIONTYPING open Microsoft.FSharp.Compiler.ExtensionTyping #endif - //------------------------------------------------------------------------- // Sets of methods involved in overload resolution and trait constraint // satisfaction. @@ -52,31 +45,33 @@ open Microsoft.FSharp.Compiler.ExtensionTyping type CallerArg<'T> = /// CallerArg(ty, range, isOpt, exprInfo) | CallerArg of TType * range * bool * 'T - member x.Type = (let (CallerArg(ty,_,_,_)) = x in ty) - member x.Range = (let (CallerArg(_,m,_,_)) = x in m) - member x.IsOptional = (let (CallerArg(_,_,isOpt,_)) = x in isOpt) - member x.Expr = (let (CallerArg(_,_,_,expr)) = x in expr) + member x.Type = (let (CallerArg(ty, _, _, _)) = x in ty) + member x.Range = (let (CallerArg(_, m, _, _)) = x in m) + member x.IsOptional = (let (CallerArg(_, _, isOpt, _)) = x in isOpt) + member x.Expr = (let (CallerArg(_, _, _, expr)) = x in expr) /// Represents the information about an argument in the method being called type CalledArg = { Position: (int * int) IsParamArray : bool OptArgInfo : OptionalArgInfo - CallerInfoInfo : CallerInfoInfo + CallerInfo : CallerInfo + IsInArg: bool IsOutArg: bool ReflArgInfo: ReflectedArgInfo NameOpt: Ident option CalledArgumentType : TType } -let CalledArg(pos,isParamArray,optArgInfo,callerInfoInfo,isOutArg,nameOpt,reflArgInfo,calledArgTy) = +let CalledArg (pos, isParamArray, optArgInfo, callerInfo, isInArg, isOutArg, nameOpt, reflArgInfo, calledArgTy) = { Position=pos IsParamArray=isParamArray - OptArgInfo =optArgInfo - CallerInfoInfo = callerInfoInfo + OptArgInfo=optArgInfo + CallerInfo=callerInfo + IsInArg=isInArg IsOutArg=isOutArg ReflArgInfo=reflArgInfo NameOpt=nameOpt - CalledArgumentType = calledArgTy } + CalledArgumentType=calledArgTy } /// Represents a match between a caller argument and a called argument, arising from either /// a named argument or an unnamed argument. @@ -100,9 +95,9 @@ type AssignedItemSetter<'T> = AssignedItemSetter of Ident * AssignedItemSetterTa type CallerNamedArg<'T> = | CallerNamedArg of Ident * CallerArg<'T> - member x.Ident = (let (CallerNamedArg(id,_)) = x in id) + member x.Ident = (let (CallerNamedArg(id, _)) = x in id) member x.Name = x.Ident.idText - member x.CallerArg = (let (CallerNamedArg(_,a)) = x in a) + member x.CallerArg = (let (CallerNamedArg(_, a)) = x in a) //------------------------------------------------------------------------- // Callsite conversions @@ -122,7 +117,7 @@ type CallerNamedArg<'T> = // // 3. Two ways to pass a value where a byref is expected. The first (default) // is to use a reference cell, and the interior address is taken automatically -// The second is an explicit use of the "address-of" operator "&e". Here we detect the second case, +// The second is an explicit use of the "address-of" operator "&e". Here we detect the second case, // and record the presence of the syntax "&e" in the pre-inferred actual type for the method argument. // The function AdjustCalledArgType detects this and refuses to apply the default byref-to-ref transformation. // @@ -133,48 +128,63 @@ let AdjustCalledArgType (infoReader:InfoReader) isConstraint (calledArg: CalledA let calledArgTy = calledArg.CalledArgumentType let callerArgTy = callerArg.Type let m = callerArg.Range - if isConstraint then calledArgTy else - // If the called method argument is a byref type, then the caller may provide a byref or ref - if isByrefTy g calledArgTy then - if isByrefTy g callerArgTy then + if isConstraint then + calledArgTy + else + + // If the called method argument is an inref type, then the caller may provide a byref or value + if isInByrefTy g calledArgTy then +#if IMPLICIT_ADDRESS_OF + if isByrefTy g callerArgTy then + calledArgTy + else + destByrefTy g calledArgTy +#else calledArgTy +#endif + + // If the called method argument is a (non inref) byref type, then the caller may provide a byref or ref. + elif isByrefTy g calledArgTy then + if isByrefTy g callerArgTy then + calledArgTy + else + mkRefCellTy g (destByrefTy g calledArgTy) + else - mkRefCellTy g (destByrefTy g calledArgTy) - else - // If the called method argument is a delegate type, then the caller may provide a function - let calledArgTy = - let adjustDelegateTy calledTy = - let (SigOfFunctionForDelegate(_,delArgTys,_,fty)) = GetSigOfFunctionForDelegate infoReader calledTy m AccessibleFromSomewhere - let delArgTys = if isNil delArgTys then [g.unit_ty] else delArgTys - if (fst (stripFunTy g callerArgTy)).Length = delArgTys.Length - then fty - else calledArgTy - - if isDelegateTy g calledArgTy && isFunTy g callerArgTy then - adjustDelegateTy calledArgTy - - elif isLinqExpressionTy g calledArgTy && isFunTy g callerArgTy then - let origArgTy = calledArgTy - let calledArgTy = destLinqExpressionTy g calledArgTy - if isDelegateTy g calledArgTy then + // If the called method argument is a delegate type, then the caller may provide a function + let calledArgTy = + let adjustDelegateTy calledTy = + let (SigOfFunctionForDelegate(_, delArgTys, _, fty)) = GetSigOfFunctionForDelegate infoReader calledTy m AccessibleFromSomewhere + let delArgTys = if isNil delArgTys then [g.unit_ty] else delArgTys + if (fst (stripFunTy g callerArgTy)).Length = delArgTys.Length + then fty + else calledArgTy + + if isDelegateTy g calledArgTy && isFunTy g callerArgTy then adjustDelegateTy calledArgTy - else - // BUG 435170: called arg is Expr<'t> where 't is not delegate - such conversion is not legal -> return original type - origArgTy - - elif calledArg.ReflArgInfo.AutoQuote && isQuotedExprTy g calledArgTy && not (isQuotedExprTy g callerArgTy) then - destQuotedExprTy g calledArgTy - - else calledArgTy - - // Adjust the called argument type to take into account whether the caller's argument is M(?arg=Some(3)) or M(arg=1) - // If the called method argument is optional with type Option, then the caller may provide a T, unless their argument is propagating-optional (i.e. isOptCallerArg) - let calledArgTy = - match calledArg.OptArgInfo with - | NotOptional -> calledArgTy - | CalleeSide when not callerArg.IsOptional && isOptionTy g calledArgTy -> destOptionTy g calledArgTy - | CalleeSide | CallerSide _ -> calledArgTy - calledArgTy + + elif isLinqExpressionTy g calledArgTy && isFunTy g callerArgTy then + let origArgTy = calledArgTy + let calledArgTy = destLinqExpressionTy g calledArgTy + if isDelegateTy g calledArgTy then + adjustDelegateTy calledArgTy + else + // BUG 435170: called arg is Expr<'t> where 't is not delegate - such conversion is not legal -> return original type + origArgTy + + elif calledArg.ReflArgInfo.AutoQuote && isQuotedExprTy g calledArgTy && not (isQuotedExprTy g callerArgTy) then + destQuotedExprTy g calledArgTy + + else calledArgTy + + // Adjust the called argument type to take into account whether the caller's argument is M(?arg=Some(3)) or M(arg=1) + // If the called method argument is optional with type Option, then the caller may provide a T, unless their argument is propagating-optional (i.e. isOptCallerArg) + let calledArgTy = + match calledArg.OptArgInfo with + | NotOptional -> calledArgTy + | CalleeSide when not callerArg.IsOptional && isOptionTy g calledArgTy -> destOptionTy g calledArgTy + | CalleeSide | CallerSide _ -> calledArgTy + calledArgTy //------------------------------------------------------------------------- @@ -200,11 +210,12 @@ type CalledMethArgSet<'T> = let MakeCalledArgs amap m (minfo:MethInfo) minst = // Mark up the arguments with their position, so we can sort them back into order later let paramDatas = minfo.GetParamDatas(amap, m, minst) - paramDatas |> List.mapiSquared (fun i j (ParamData(isParamArrayArg,isOutArg,optArgInfo,callerInfoFlags,nmOpt,reflArgInfo,typeOfCalledArg)) -> + paramDatas |> List.mapiSquared (fun i j (ParamData(isParamArrayArg, isInArg, isOutArg, optArgInfo, callerInfoFlags, nmOpt, reflArgInfo, typeOfCalledArg)) -> { Position=(i,j) IsParamArray=isParamArrayArg OptArgInfo=optArgInfo - CallerInfoInfo = callerInfoFlags + CallerInfo = callerInfoFlags + IsInArg=isInArg IsOutArg=isOutArg ReflArgInfo=reflArgInfo NameOpt=nmOpt @@ -212,14 +223,14 @@ let MakeCalledArgs amap m (minfo:MethInfo) minst = /// Represents the syntactic matching between a caller of a method and the called method. /// -/// The constructor takes all the information about the caller and called side of a method, match up named arguments, property setters etc., +/// The constructor takes all the information about the caller and called side of a method, match up named arguments, property setters etc., /// and returns a CalledMeth object for further analysis. type CalledMeth<'T> (infoReader:InfoReader, nameEnv: NameResolutionEnv option, - isCheckingAttributeCall, - freshenMethInfo,// a function to help generate fresh type variables the property setters methods in generic classes - m, + isCheckingAttributeCall, + freshenMethInfo, // a function to help generate fresh type variables the property setters methods in generic classes + m, ad, // the access domain of the place where the call is taking place minfo:MethInfo, // the method we're attempting to call calledTyArgs, // the 'called type arguments', i.e. the fresh generic instantiation of the method we're attempting to call @@ -238,56 +249,56 @@ type CalledMeth<'T> do assert (fullCurriedCalledArgs.Length = fullCurriedCalledArgs.Length) let argSetInfos = - (curriedCallerArgs, fullCurriedCalledArgs) ||> List.map2 (fun (unnamedCallerArgs,namedCallerArgs) fullCalledArgs -> + (curriedCallerArgs, fullCurriedCalledArgs) ||> List.map2 (fun (unnamedCallerArgs, namedCallerArgs) fullCalledArgs -> // Find the arguments not given by name let unnamedCalledArgs = fullCalledArgs |> List.filter (fun calledArg -> match calledArg.NameOpt with - | Some nm -> namedCallerArgs |> List.forall (fun (CallerNamedArg(nm2,_e)) -> nm.idText <> nm2.idText) + | Some nm -> namedCallerArgs |> List.forall (fun (CallerNamedArg(nm2, _e)) -> nm.idText <> nm2.idText) | None -> true) // See if any of them are 'out' arguments being returned as part of a return tuple - let unnamedCalledArgs, unnamedCalledOptArgs, unnamedCalledOutArgs = + let minArgs, unnamedCalledArgs, unnamedCalledOptArgs, unnamedCalledOutArgs = let nUnnamedCallerArgs = unnamedCallerArgs.Length - if allowOutAndOptArgs && nUnnamedCallerArgs < unnamedCalledArgs.Length then - let unnamedCalledArgsTrimmed,unnamedCalledOptOrOutArgs = List.chop nUnnamedCallerArgs unnamedCalledArgs + let nUnnamedCalledArgs = unnamedCalledArgs.Length + if allowOutAndOptArgs && nUnnamedCallerArgs < nUnnamedCalledArgs then + let unnamedCalledArgsTrimmed, unnamedCalledOptOrOutArgs = List.splitAt nUnnamedCallerArgs unnamedCalledArgs // Check if all optional/out arguments are byref-out args if unnamedCalledOptOrOutArgs |> List.forall (fun x -> x.IsOutArg && isByrefTy g x.CalledArgumentType) then - unnamedCalledArgsTrimmed,[],unnamedCalledOptOrOutArgs + nUnnamedCallerArgs - 1, unnamedCalledArgsTrimmed, [], unnamedCalledOptOrOutArgs // Check if all optional/out arguments are optional args elif unnamedCalledOptOrOutArgs |> List.forall (fun x -> x.OptArgInfo.IsOptional) then - unnamedCalledArgsTrimmed,unnamedCalledOptOrOutArgs,[] + nUnnamedCallerArgs - 1, unnamedCalledArgsTrimmed, unnamedCalledOptOrOutArgs, [] // Otherwise drop them on the floor else - unnamedCalledArgs,[],[] + nUnnamedCalledArgs - 1, unnamedCalledArgs, [], [] else - unnamedCalledArgs,[],[] + nUnnamedCalledArgs - 1, unnamedCalledArgs, [], [] - let (unnamedCallerArgs,paramArrayCallerArgs),unnamedCalledArgs,paramArrayCalledArgOpt = - let minArgs = unnamedCalledArgs.Length - 1 + let (unnamedCallerArgs, paramArrayCallerArgs), unnamedCalledArgs, paramArrayCalledArgOpt = let supportsParamArgs = allowParamArgs && minArgs >= 0 && unnamedCalledArgs |> List.last |> (fun calledArg -> calledArg.IsParamArray && isArray1DTy g calledArg.CalledArgumentType) if supportsParamArgs && unnamedCallerArgs.Length >= minArgs then - let a,b = List.frontAndBack unnamedCalledArgs - List.chop minArgs unnamedCallerArgs, a, Some(b) + let a, b = List.frontAndBack unnamedCalledArgs + List.splitAt minArgs unnamedCallerArgs, a, Some(b) else - (unnamedCallerArgs, []),unnamedCalledArgs, None + (unnamedCallerArgs, []), unnamedCalledArgs, None let assignedNamedArgs = fullCalledArgs |> List.choose (fun calledArg -> match calledArg.NameOpt with | Some nm -> - namedCallerArgs |> List.tryPick (fun (CallerNamedArg(nm2,callerArg)) -> + namedCallerArgs |> List.tryPick (fun (CallerNamedArg(nm2, callerArg)) -> if nm.idText = nm2.idText then Some { NamedArgIdOpt = Some nm2; CallerArg=callerArg; CalledArg=calledArg } else None) | _ -> None) let unassignedNamedItems = - namedCallerArgs |> List.filter (fun (CallerNamedArg(nm,_e)) -> + namedCallerArgs |> List.filter (fun (CallerNamedArg(nm, _e)) -> fullCalledArgs |> List.forall (fun calledArg -> match calledArg.NameOpt with | Some nm2 -> nm.idText <> nm2.idText @@ -302,17 +313,17 @@ type CalledMeth<'T> else [] - let assignedNamedProps,unassignedNamedItems = - let returnedObjTy = if minfo.IsConstructor then minfo.EnclosingType else methodRetTy - unassignedNamedItems |> List.splitChoose (fun (CallerNamedArg(id,e) as arg) -> + let assignedNamedProps, unassignedNamedItems = + let returnedObjTy = if minfo.IsConstructor then minfo.ApparentEnclosingType else methodRetTy + unassignedNamedItems |> List.splitChoose (fun (CallerNamedArg(id, e) as arg) -> let nm = id.idText - let pinfos = GetIntrinsicPropInfoSetsOfType infoReader (Some(nm),ad,AllowMultiIntfInstantiations.Yes) IgnoreOverrides id.idRange returnedObjTy + let pinfos = GetIntrinsicPropInfoSetsOfType infoReader (Some(nm), ad, AllowMultiIntfInstantiations.Yes) IgnoreOverrides id.idRange returnedObjTy let pinfos = pinfos |> ExcludeHiddenOfPropInfos g infoReader.amap m match pinfos with | [pinfo] when pinfo.HasSetter && not pinfo.IsIndexer -> let pminfo = pinfo.SetterMethod let pminst = freshenMethInfo m pminfo - Choice1Of2(AssignedItemSetter(id,AssignedPropSetter(pinfo,pminfo, pminst), e)) + Choice1Of2(AssignedItemSetter(id, AssignedPropSetter(pinfo, pminfo, pminst), e)) | _ -> let epinfos = match nameEnv with @@ -322,41 +333,42 @@ type CalledMeth<'T> | [pinfo] when pinfo.HasSetter && not pinfo.IsIndexer -> let pminfo = pinfo.SetterMethod let pminst = match minfo with - | MethInfo.FSMeth(_,TType.TType_app(_,types),_,_) -> types + | MethInfo.FSMeth(_, TType.TType_app(_, types), _, _) -> types | _ -> freshenMethInfo m pminfo let pminst = match tyargsOpt with | Some(TType.TType_app(_, types)) -> types | _ -> pminst - Choice1Of2(AssignedItemSetter(id,AssignedPropSetter(pinfo,pminfo, pminst), e)) + Choice1Of2(AssignedItemSetter(id, AssignedPropSetter(pinfo, pminfo, pminst), e)) | _ -> - match infoReader.GetILFieldInfosOfType(Some(nm),ad,m,returnedObjTy) with + match infoReader.GetILFieldInfosOfType(Some(nm), ad, m, returnedObjTy) with | finfo :: _ -> - Choice1Of2(AssignedItemSetter(id,AssignedILFieldSetter(finfo), e)) + Choice1Of2(AssignedItemSetter(id, AssignedILFieldSetter(finfo), e)) | _ -> - match infoReader.TryFindRecdOrClassFieldInfoOfType(nm,m,returnedObjTy) with - | Some rfinfo -> - Choice1Of2(AssignedItemSetter(id,AssignedRecdFieldSetter(rfinfo), e)) - | None -> + match infoReader.TryFindRecdOrClassFieldInfoOfType(nm, m, returnedObjTy) with + | ValueSome rfinfo -> + Choice1Of2(AssignedItemSetter(id, AssignedRecdFieldSetter(rfinfo), e)) + | _ -> Choice2Of2(arg)) - let names = namedCallerArgs |> List.map (fun (CallerNamedArg(nm,_)) -> nm.idText) + let names = namedCallerArgs |> List.map (fun (CallerNamedArg(nm, _)) -> nm.idText) if (List.noRepeats String.order names).Length <> namedCallerArgs.Length then - errorR(Error(FSComp.SR.typrelNamedArgumentHasBeenAssignedMoreThenOnce(),m)) + errorR(Error(FSComp.SR.typrelNamedArgumentHasBeenAssignedMoreThenOnce(), m)) let argSet = { UnnamedCalledArgs=unnamedCalledArgs; UnnamedCallerArgs=unnamedCallerArgs; ParamArrayCalledArgOpt=paramArrayCalledArgOpt; ParamArrayCallerArgs=paramArrayCallerArgs; AssignedNamedArgs=assignedNamedArgs } - (argSet,assignedNamedProps,unassignedNamedItems,attributeAssignedNamedItems,unnamedCalledOptArgs,unnamedCalledOutArgs)) + (argSet, assignedNamedProps, unassignedNamedItems, attributeAssignedNamedItems, unnamedCalledOptArgs, unnamedCalledOutArgs)) - let argSets = argSetInfos |> List.map (fun (x,_,_,_,_,_) -> x) - let assignedNamedProps = argSetInfos |> List.collect (fun (_,x,_,_,_,_) -> x) - let unassignedNamedItems = argSetInfos |> List.collect (fun (_,_,x,_,_,_) -> x) - let attributeAssignedNamedItems = argSetInfos |> List.collect (fun (_,_,_,x,_,_) -> x) - let unnamedCalledOptArgs = argSetInfos |> List.collect (fun (_,_,_,_,x,_) -> x) - let unnamedCalledOutArgs = argSetInfos |> List.collect (fun (_,_,_,_,_,x) -> x) + let argSets = argSetInfos |> List.map (fun (x, _, _, _, _, _) -> x) + let assignedNamedProps = argSetInfos |> List.collect (fun (_, x, _, _, _, _) -> x) + let unassignedNamedItems = argSetInfos |> List.collect (fun (_, _, x, _, _, _) -> x) + let attributeAssignedNamedItems = argSetInfos |> List.collect (fun (_, _, _, x, _, _) -> x) + let unnamedCalledOptArgs = argSetInfos |> List.collect (fun (_, _, _, _, x, _) -> x) + let unnamedCalledOutArgs = argSetInfos |> List.collect (fun (_, _, _, _, _, x) -> x) member x.infoReader = infoReader + member x.amap = infoReader.amap /// the method we're attempting to call @@ -379,8 +391,20 @@ type CalledMeth<'T> /// The argument analysis for each set of curried arguments member x.ArgSets = argSets - /// return type - member x.ReturnType = methodRetTy + /// return type after implicit deference of byref returns is taken into account + member x.CalledReturnTypeAfterByrefDeref = + let retTy = methodRetTy + if isByrefTy g retTy then destByrefTy g retTy else retTy + + /// return type after tupling of out args is taken into account + member x.CalledReturnTypeAfterOutArgTupling = + let retTy = x.CalledReturnTypeAfterByrefDeref + if isNil unnamedCalledOutArgs then + retTy + else + let outArgTys = unnamedCalledOutArgs |> List.map (fun calledArg -> destByrefTy g calledArg.CalledArgumentType) + if isUnitTy g retTy then mkRefTupledTy g outArgTys + else mkRefTupledTy g (retTy :: outArgTys) /// named setters member x.AssignedItemSetters = assignedNamedProps @@ -402,19 +426,31 @@ type CalledMeth<'T> static member GetMethod (x:CalledMeth<'T>) = x.Method - member x.NumArgSets = x.ArgSets.Length + member x.NumArgSets = x.ArgSets.Length + + member x.HasOptArgs = not (isNil x.UnnamedCalledOptArgs) + + member x.HasOutArgs = not (isNil x.UnnamedCalledOutArgs) - member x.HasOptArgs = not (isNil x.UnnamedCalledOptArgs) - member x.HasOutArgs = not (isNil x.UnnamedCalledOutArgs) member x.UsesParamArrayConversion = x.ArgSets |> List.exists (fun argSet -> argSet.ParamArrayCalledArgOpt.IsSome) + member x.ParamArrayCalledArgOpt = x.ArgSets |> List.tryPick (fun argSet -> argSet.ParamArrayCalledArgOpt) + member x.ParamArrayCallerArgs = x.ArgSets |> List.tryPick (fun argSet -> if Option.isSome argSet.ParamArrayCalledArgOpt then Some argSet.ParamArrayCallerArgs else None ) + member x.ParamArrayElementType = assert (x.UsesParamArrayConversion) x.ParamArrayCalledArgOpt.Value.CalledArgumentType |> destArrayTy x.amap.g + member x.NumAssignedProps = x.AssignedItemSetters.Length - member x.CalledObjArgTys(m) = x.Method.GetObjArgTypes(x.amap, m, x.CalledTyArgs) + + member x.CalledObjArgTys(m) = + match x.Method.GetObjArgTypes(x.amap, m, x.CalledTyArgs) with + | [ thisArgTy ] when isByrefTy g thisArgTy -> [ destByrefTy g thisArgTy ] + | res -> res + member x.NumCalledTyArgs = x.CalledTyArgs.Length + member x.NumCallerTyArgs = x.CallerTyArgs.Length member x.AssignsAllNamedArgs = isNil x.UnassignedNamedArgs @@ -426,14 +462,14 @@ type CalledMeth<'T> member x.HasCorrectGenericArity = (x.NumCalledTyArgs = x.NumCallerTyArgs) - member x.IsAccessible(m,ad) = + member x.IsAccessible(m, ad) = IsMethInfoAccessible x.amap m ad x.Method member x.HasCorrectObjArgs(m) = x.CalledObjArgTys(m).Length = x.CallerObjArgTys.Length - member x.IsCandidate(m,ad) = - x.IsAccessible(m,ad) && + member x.IsCandidate(m, ad) = + x.IsAccessible(m, ad) && x.HasCorrectArity && x.HasCorrectObjArgs(m) && x.AssignsAllNamedArgs @@ -448,8 +484,11 @@ type CalledMeth<'T> x.ArgSets |> List.map (fun argSet -> argSet.AssignedNamedArgs) member x.AllUnnamedCalledArgs = x.ArgSets |> List.collect (fun x -> x.UnnamedCalledArgs) + member x.TotalNumUnnamedCalledArgs = x.ArgSets |> List.sumBy (fun x -> x.NumUnnamedCalledArgs) + member x.TotalNumUnnamedCallerArgs = x.ArgSets |> List.sumBy (fun x -> x.NumUnnamedCallerArgs) + member x.TotalNumAssignedNamedArgs = x.ArgSets |> List.sumBy (fun x -> x.NumAssignedNamedArgs) let NamesOfCalledArgs (calledArgs: CalledArg list) = @@ -468,7 +507,7 @@ type ArgumentAnalysis = let InferLambdaArgsForLambdaPropagation origRhsExpr = let rec loop e = match e with - | SynExpr.Lambda(_,_,_,rest,_) -> 1 + loop rest + | SynExpr.Lambda(_, _, _, rest, _) -> 1 + loop rest | SynExpr.MatchLambda _ -> 1 | _ -> 0 loop origRhsExpr @@ -476,13 +515,13 @@ let InferLambdaArgsForLambdaPropagation origRhsExpr = let ExamineArgumentForLambdaPropagation (infoReader:InfoReader) (arg: AssignedCalledArg) = let g = infoReader.g // Find the explicit lambda arguments of the caller. Ignore parentheses. - let argExpr = match arg.CallerArg.Expr with SynExpr.Paren(x,_,_,_) -> x | x -> x + let argExpr = match arg.CallerArg.Expr with SynExpr.Paren(x, _, _, _) -> x | x -> x let countOfCallerLambdaArg = InferLambdaArgsForLambdaPropagation argExpr - // Adjust for Expression<_>, Func<_,_>, ... + // Adjust for Expression<_>, Func<_, _>, ... let adjustedCalledArgTy = AdjustCalledArgType infoReader false arg.CalledArg arg.CallerArg if countOfCallerLambdaArg > 0 then // Decompose the explicit function type of the target - let calledLambdaArgTys,_calledLambdaRetTy = Tastops.stripFunTy g adjustedCalledArgTy + let calledLambdaArgTys, _calledLambdaRetTy = Tastops.stripFunTy g adjustedCalledArgTy if calledLambdaArgTys.Length >= countOfCallerLambdaArg then // success CallerLambdaHasArgTypes calledLambdaArgTys @@ -496,7 +535,7 @@ let ExamineMethodForLambdaPropagation (x:CalledMeth) = let unnamedInfo = x.AssignedUnnamedArgs |> List.mapSquared (ExamineArgumentForLambdaPropagation x.infoReader) let namedInfo = x.AssignedNamedArgs |> List.mapSquared (fun arg -> (arg.NamedArgIdOpt.Value, ExamineArgumentForLambdaPropagation x.infoReader arg)) if unnamedInfo |> List.existsSquared (function CallerLambdaHasArgTypes _ -> true | _ -> false) || - namedInfo |> List.existsSquared (function (_,CallerLambdaHasArgTypes _) -> true | _ -> false) then + namedInfo |> List.existsSquared (function (_, CallerLambdaHasArgTypes _) -> true | _ -> false) then Some (unnamedInfo, namedInfo) else None @@ -508,24 +547,24 @@ let ExamineMethodForLambdaPropagation (x:CalledMeth) = /// Is this a 'base' call (in the sense of C#) let IsBaseCall objArgs = match objArgs with - | [Expr.Val(v,_,_)] when v.BaseOrThisInfo = BaseVal -> true + | [Expr.Val(v, _, _)] when v.BaseOrThisInfo = BaseVal -> true | _ -> false /// Compute whether we insert a 'coerce' on the 'this' pointer for an object model call /// For example, when calling an interface method on a struct, or a method on a constrained /// variable type. -let ComputeConstrainedCallInfo g amap m (objArgs,minfo:MethInfo) = +let ComputeConstrainedCallInfo g amap m (objArgs, minfo:MethInfo) = match objArgs with | [objArgExpr] when not minfo.IsExtensionMember -> - let methObjTy = minfo.EnclosingType + let methObjTy = minfo.ApparentEnclosingType let objArgTy = tyOfExpr g objArgExpr if TypeDefinitelySubsumesTypeNoCoercion 0 g amap m methObjTy objArgTy // Constrained calls to class types can only ever be needed for the three class types that // are base types of value types || (isClassTy g methObjTy && - (not (typeEquiv g methObjTy g.system_Object_typ || - typeEquiv g methObjTy g.system_Value_typ || - typeEquiv g methObjTy g.system_Enum_typ))) then + (not (typeEquiv g methObjTy g.system_Object_ty || + typeEquiv g methObjTy g.system_Value_ty || + typeEquiv g methObjTy g.system_Enum_ty))) then None else // The object argument is a value type or variable type and the target method is an interface or System.Object @@ -538,33 +577,30 @@ let ComputeConstrainedCallInfo g amap m (objArgs,minfo:MethInfo) = /// Adjust the 'this' pointer before making a call /// Take the address of a struct, and coerce to an interface/base/constraint type if necessary let TakeObjAddrForMethodCall g amap (minfo:MethInfo) isMutable m objArgs f = - let ccallInfo = ComputeConstrainedCallInfo g amap m (objArgs,minfo) - let mustTakeAddress = - (minfo.IsStruct && not minfo.IsExtensionMember) // don't take the address of a struct when passing to an extension member - || - (match ccallInfo with - | Some _ -> true - | None -> false) - let wrap,objArgs = + let ccallInfo = ComputeConstrainedCallInfo g amap m (objArgs, minfo) + + let wrap, objArgs = match objArgs with - | [objArgExpr] -> + | [objArgExpr] -> + let hasCallInfo = ccallInfo.IsSome + let mustTakeAddress = hasCallInfo || minfo.ObjArgNeedsAddress(amap, m) let objArgTy = tyOfExpr g objArgExpr - let wrap,objArgExpr' = mkExprAddrOfExpr g mustTakeAddress (Option.isSome ccallInfo) isMutable objArgExpr None m + let wrap, objArgExpr', _readonly, _writeonly = mkExprAddrOfExpr g mustTakeAddress hasCallInfo isMutable objArgExpr None m // Extension members and calls to class constraints may need a coercion for their object argument let objArgExpr' = - if Option.isNone ccallInfo && // minfo.IsExtensionMember && minfo.IsStruct && - not (TypeDefinitelySubsumesTypeNoCoercion 0 g amap m minfo.EnclosingType objArgTy) then - mkCoerceExpr(objArgExpr',minfo.EnclosingType,m,objArgTy) + if not hasCallInfo && + not (TypeDefinitelySubsumesTypeNoCoercion 0 g amap m minfo.ApparentEnclosingType objArgTy) then + mkCoerceExpr(objArgExpr', minfo.ApparentEnclosingType, m, objArgTy) else objArgExpr' - wrap,[objArgExpr'] + wrap, [objArgExpr'] | _ -> - (fun x -> x), objArgs - let e,ety = f ccallInfo objArgs - wrap e,ety + id, objArgs + let e, ety = f ccallInfo objArgs + wrap e, ety //------------------------------------------------------------------------- // Build method calls. @@ -580,22 +616,22 @@ let BuildILMethInfoCall g amap m isProp (minfo:ILMethInfo) valUseFlags minst dir let valu = isStructTy g minfo.ApparentEnclosingType let ctor = minfo.IsConstructor if minfo.IsClassConstructor then - error (InternalError (minfo.ILName+": cannot call a class constructor",m)) + error (InternalError (minfo.ILName+": cannot call a class constructor", m)) let useCallvirt = not valu && not direct && minfo.IsVirtual let isProtected = minfo.IsProtectedAccessibility let ilMethRef = minfo.ILMethodRef let newobj = ctor && (match valUseFlags with NormalValUse -> true | _ -> false) let exprTy = if ctor then minfo.ApparentEnclosingType else minfo.GetFSharpReturnTy(amap, m, minst) - let retTy = (if not ctor && (ilMethRef.ReturnType = ILType.Void) then [] else [exprTy]) + let retTy = if not ctor && ilMethRef.ReturnType = ILType.Void then [] else [exprTy] let isDllImport = minfo.IsDllImport g - Expr.Op(TOp.ILCall(useCallvirt,isProtected,valu,newobj,valUseFlags,isProp,isDllImport,ilMethRef,minfo.DeclaringTypeInst,minst,retTy),[],args,m), + Expr.Op(TOp.ILCall(useCallvirt, isProtected, valu, newobj, valUseFlags, isProp, isDllImport, ilMethRef, minfo.DeclaringTypeInst, minst, retTy), [], args, m), exprTy /// Build a call to the System.Object constructor taking no arguments, let BuildObjCtorCall (g: TcGlobals) m = - let ilMethRef = (mkILCtorMethSpecForTy(g.ilg.typ_Object,[])).MethodRef - Expr.Op(TOp.ILCall(false,false,false,false,CtorValUsedAsSuperInit,false,true,ilMethRef,[],[],[g.obj_ty]),[],[],m) + let ilMethRef = (mkILCtorMethSpecForTy(g.ilg.typ_Object, [])).MethodRef + Expr.Op(TOp.ILCall(false, false, false, false, CtorValUsedAsSuperInit, false, true, ilMethRef, [], [], [g.obj_ty]), [], [], m) /// Build a call to an F# method. @@ -608,35 +644,33 @@ let BuildObjCtorCall (g: TcGlobals) m = let BuildFSharpMethodApp g m (vref: ValRef) vexp vexprty (args: Exprs) = let arities = (arityOfVal vref.Deref).AritiesOfArgs - let args3,(leftover,retTy) = - ((args,vexprty), arities) ||> List.mapFold (fun (args,fty) arity -> - match arity,args with - | (0|1),[] when typeEquiv g (domainOfFunTy g fty) g.unit_ty -> mkUnit g m, (args, rangeOfFunTy g fty) - | 0,(arg::argst)-> - - - warning(InternalError(sprintf "Unexpected zero arity, args = %s" (Layout.showL (Layout.sepListL (Layout.rightL (Layout.TaggedTextOps.tagText ";")) (List.map exprL args))),m)); + let args3, (leftover, retTy) = + ((args, vexprty), arities) ||> List.mapFold (fun (args, fty) arity -> + match arity, args with + | (0|1), [] when typeEquiv g (domainOfFunTy g fty) g.unit_ty -> mkUnit g m, (args, rangeOfFunTy g fty) + | 0, (arg::argst) -> + warning(InternalError(sprintf "Unexpected zero arity, args = %s" (Layout.showL (Layout.sepListL (Layout.rightL (Layout.TaggedTextOps.tagText ";")) (List.map exprL args))), m)); arg, (argst, rangeOfFunTy g fty) - | 1,(arg :: argst) -> arg, (argst, rangeOfFunTy g fty) - | 1,[] -> error(InternalError("expected additional arguments here",m)) + | 1, (arg :: argst) -> arg, (argst, rangeOfFunTy g fty) + | 1, [] -> error(InternalError("expected additional arguments here", m)) | _ -> - if args.Length < arity then error(InternalError("internal error in getting arguments, n = "+string arity+", #args = "+string args.Length,m)); - let tupargs,argst = List.chop arity args + if args.Length < arity then error(InternalError("internal error in getting arguments, n = "+string arity+", #args = "+string args.Length, m)); + let tupargs, argst = List.splitAt arity args let tuptys = tupargs |> List.map (tyOfExpr g) (mkRefTupled g m tupargs tuptys), (argst, rangeOfFunTy g fty) ) - if not leftover.IsEmpty then error(InternalError("Unexpected "+string(leftover.Length)+" remaining arguments in method application",m)) - mkApps g ((vexp,vexprty),[],args3,m), + if not leftover.IsEmpty then error(InternalError("Unexpected "+string(leftover.Length)+" remaining arguments in method application", m)) + mkApps g ((vexp, vexprty), [], args3, m), retTy /// Build a call to an F# method. -let BuildFSharpMethodCall g m (typ,vref:ValRef) valUseFlags minst args = - let vexp = Expr.Val (vref,valUseFlags,m) +let BuildFSharpMethodCall g m (ty, vref:ValRef) valUseFlags minst args = + let vexp = Expr.Val (vref, valUseFlags, m) let vexpty = vref.Type - let tpsorig,tau = vref.TypeScheme - let vtinst = argsOfAppTy g typ @ minst - if tpsorig.Length <> vtinst.Length then error(InternalError("BuildFSharpMethodCall: unexpected List.length mismatch",m)) - let expr = mkTyAppExpr m (vexp,vexpty) vtinst + let tpsorig, tau = vref.TypeScheme + let vtinst = argsOfAppTy g ty @ minst + if tpsorig.Length <> vtinst.Length then error(InternalError("BuildFSharpMethodCall: unexpected List.length mismatch", m)) + let expr = mkTyAppExpr m (vexp, vexpty) vtinst let exprty = instType (mkTyparInst tpsorig vtinst) tau BuildFSharpMethodApp g m vref expr exprty args @@ -646,16 +680,16 @@ let BuildFSharpMethodCall g m (typ,vref:ValRef) valUseFlags minst args = let MakeMethInfoCall amap m minfo minst args = let valUseFlags = NormalValUse // correct unless if we allow wild trait constraints like "T has a ctor and can be used as a parent class" match minfo with - | ILMeth(g,ilminfo,_) -> + | ILMeth(g, ilminfo, _) -> let direct = not minfo.IsVirtual let isProp = false // not necessarily correct, but this is only used post-creflect where this flag is irrelevant BuildILMethInfoCall g amap m isProp ilminfo valUseFlags minst direct args |> fst - | FSMeth(g,typ,vref,_) -> - BuildFSharpMethodCall g m (typ,vref) valUseFlags minst args |> fst - | DefaultStructCtor(_,typ) -> - mkDefault (m,typ) + | FSMeth(g, ty, vref, _) -> + BuildFSharpMethodCall g m (ty, vref) valUseFlags minst args |> fst + | DefaultStructCtor(_, ty) -> + mkDefault (m, ty) #if !NO_EXTENSIONTYPING - | ProvidedMeth(amap,mi,_,m) -> + | ProvidedMeth(amap, mi, _, m) -> let isProp = false // not necessarily correct, but this is only used post-creflect where this flag is irrelevant let ilMethodRef = Import.ImportProvidedMethodBaseAsILMethodRef amap m mi let isConstructor = mi.PUntaint((fun c -> c.IsConstructor), m) @@ -664,26 +698,25 @@ let MakeMethInfoCall amap m minfo minst args = let actualMethInst = [] // GENERIC TYPE PROVIDERS: for generics, we would have something here let ilReturnTys = Option.toList (minfo.GetCompiledReturnTy(amap, m, [])) // GENERIC TYPE PROVIDERS: for generics, we would have more here // REVIEW: Should we allow protected calls? - Expr.Op(TOp.ILCall(false,false, valu, isConstructor,valUseFlags,isProp,false,ilMethodRef,actualTypeInst,actualMethInst, ilReturnTys),[],args,m) + Expr.Op(TOp.ILCall(false, false, valu, isConstructor, valUseFlags, isProp, false, ilMethodRef, actualTypeInst, actualMethInst, ilReturnTys), [], args, m) #endif #if !NO_EXTENSIONTYPING // This imports a provided method, and checks if it is a known compiler intrinsic like "1 + 2" let TryImportProvidedMethodBaseAsLibraryIntrinsic (amap:Import.ImportMap, m:range, mbase: Tainted) = - let methodName = mbase.PUntaint((fun x -> x.Name),m) - let declaringType = Import.ImportProvidedType amap m (mbase.PApply((fun x -> x.DeclaringType),m)) + let methodName = mbase.PUntaint((fun x -> x.Name), m) + let declaringType = Import.ImportProvidedType amap m (mbase.PApply((fun x -> x.DeclaringType), m)) if isAppTy amap.g declaringType then let declaringEntity = tcrefOfAppTy amap.g declaringType if not declaringEntity.IsLocalRef && ccuEq declaringEntity.nlr.Ccu amap.g.fslibCcu then match amap.g.knownIntrinsics.TryGetValue ((declaringEntity.LogicalName, methodName)) with - | true,vref -> Some vref + | true, vref -> Some vref | _ -> match amap.g.knownFSharpCoreModules.TryGetValue(declaringEntity.LogicalName) with - | true,modRef -> - match modRef.ModuleOrNamespaceType.AllValsByLogicalName |> Seq.tryPick (fun (KeyValue(_,v)) -> if v.CompiledName = methodName then Some v else None) with - | Some v -> Some (mkNestedValRef modRef v) - | None -> None + | true, modRef -> + modRef.ModuleOrNamespaceType.AllValsByLogicalName + |> Seq.tryPick (fun (KeyValue(_, v)) -> if v.CompiledName = methodName then Some (mkNestedValRef modRef v) else None) | _ -> None else None @@ -701,13 +734,12 @@ let TryImportProvidedMethodBaseAsLibraryIntrinsic (amap:Import.ImportMap, m:rang // objArgs: the 'this' argument, if any // args: the arguments, if any let BuildMethodCall tcVal g amap isMutable m isProp minfo valUseFlags minst objArgs args = - let direct = IsBaseCall objArgs TakeObjAddrForMethodCall g amap minfo isMutable m objArgs (fun ccallInfo objArgs -> - let allArgs = (objArgs @ args) + let allArgs = objArgs @ args let valUseFlags = - if (direct && (match valUseFlags with NormalValUse -> true | _ -> false)) then + if direct && (match valUseFlags with NormalValUse -> true | _ -> false) then VSlotDirectCall else match ccallInfo with @@ -721,20 +753,20 @@ let BuildMethodCall tcVal g amap isMutable m isProp minfo valUseFlags minst objA #if !NO_EXTENSIONTYPING // By this time this is an erased method info, e.g. one returned from an expression // REVIEW: copied from tastops, which doesn't allow protected methods - | ProvidedMeth (amap,providedMeth,_,_) -> + | ProvidedMeth (amap, providedMeth, _, _) -> // TODO: there is a fair bit of duplication here with mk_il_minfo_call. We should be able to merge these /// Build an expression node that is a call to a extension method in a generated assembly - let enclTy = minfo.EnclosingType - // prohibit calls to methods that are declared in specific array types (Get,Set,Address) + let enclTy = minfo.ApparentEnclosingType + // prohibit calls to methods that are declared in specific array types (Get, Set, Address) // these calls are provided by the runtime and should not be called from the user code if isArrayTy g enclTy then let tpe = TypeProviderError(FSComp.SR.tcRuntimeSuppliedMethodCannotBeUsedInUserCode(minfo.DisplayName), providedMeth.TypeProviderDesignation, m) - error (tpe) + error tpe let valu = isStructTy g enclTy let isCtor = minfo.IsConstructor if minfo.IsClassConstructor then - error (InternalError (minfo.LogicalName ^": cannot call a class constructor",m)) + error (InternalError (minfo.LogicalName + ": cannot call a class constructor", m)) let useCallvirt = not valu && not direct && minfo.IsVirtual let isProtected = minfo.IsProtectedAccessiblity let exprTy = if isCtor then enclTy else minfo.GetFSharpReturnTy(amap, m, minst) @@ -755,15 +787,15 @@ let BuildMethodCall tcVal g amap isMutable m isProp minfo valUseFlags minst objA elif isFunTy g enclTy then [ domainOfFunTy g enclTy; rangeOfFunTy g enclTy ] // provided expressions can call Invoke else minfo.DeclaringTypeInst let actualMethInst = minst - let retTy = (if not isCtor && (ilMethRef.ReturnType = ILType.Void) then [] else [exprTy]) + let retTy = if not isCtor && (ilMethRef.ReturnType = ILType.Void) then [] else [exprTy] let noTailCall = false - let expr = Expr.Op(TOp.ILCall(useCallvirt,isProtected,valu,isNewObj,valUseFlags,isProp,noTailCall,ilMethRef,actualTypeInst,actualMethInst, retTy),[],allArgs,m) - expr,exprTy + let expr = Expr.Op(TOp.ILCall(useCallvirt, isProtected, valu, isNewObj, valUseFlags, isProp, noTailCall, ilMethRef, actualTypeInst, actualMethInst, retTy), [], allArgs, m) + expr, exprTy #endif // Build a call to a .NET method - | ILMeth(_,ilMethInfo,_) -> + | ILMeth(_, ilMethInfo, _) -> BuildILMethInfoCall g amap m isProp ilMethInfo valUseFlags minst direct allArgs // Build a call to an F# method @@ -775,10 +807,10 @@ let BuildMethodCall tcVal g amap isMutable m isProp minfo valUseFlags minst objA BuildFSharpMethodApp g m vref vexp vexpty allArgs // Build a 'call' to a struct default constructor - | DefaultStructCtor (g,typ) -> - if not (TypeHasDefaultValue g m typ) then - errorR(Error(FSComp.SR.tcDefaultStructConstructorCall(),m)) - mkDefault (m,typ), typ) + | DefaultStructCtor (g, ty) -> + if not (TypeHasDefaultValue g m ty) then + errorR(Error(FSComp.SR.tcDefaultStructConstructorCall(), m)) + mkDefault (m, ty), ty) //------------------------------------------------------------------------- // Build delegate constructions (lambdas/functions to delegates) @@ -787,8 +819,8 @@ let BuildMethodCall tcVal g amap isMutable m isProp minfo valUseFlags minst objA /// Implements the elaborated form of adhoc conversions from functions to delegates at member callsites let BuildNewDelegateExpr (eventInfoOpt:EventInfo option, g, amap, delegateTy, invokeMethInfo:MethInfo, delArgTys, f, fty, m) = let slotsig = invokeMethInfo.GetSlotSig(amap, m) - let delArgVals,expr = - let topValInfo = ValReprInfo([],List.replicate (max 1 (List.length delArgTys)) ValReprInfo.unnamedTopArg, ValReprInfo.unnamedRetVal) + let delArgVals, expr = + let topValInfo = ValReprInfo([], List.replicate (max 1 (List.length delArgTys)) ValReprInfo.unnamedTopArg, ValReprInfo.unnamedRetVal) // Try to pull apart an explicit lambda and use it directly // Don't do this in the case where we're adjusting the arguments of a function used to build a .NET-compatible event handler @@ -802,9 +834,9 @@ let BuildNewDelegateExpr (eventInfoOpt:EventInfo option, g, amap, delegateTy, in | None -> if List.exists (isByrefTy g) delArgTys then - error(Error(FSComp.SR.tcFunctionRequiresExplicitLambda(List.length delArgTys),m)) + error(Error(FSComp.SR.tcFunctionRequiresExplicitLambda(List.length delArgTys), m)) - let delArgVals = delArgTys |> List.mapi (fun i argty -> fst (mkCompGenLocal m ("delegateArg"^string i) argty)) + let delArgVals = delArgTys |> List.mapi (fun i argty -> fst (mkCompGenLocal m ("delegateArg" + string i) argty)) let expr = let args = match eventInfoOpt with @@ -815,18 +847,18 @@ let BuildNewDelegateExpr (eventInfoOpt:EventInfo option, g, amap, delegateTy, in | h :: t -> [exprForVal m h; mkRefTupledVars g m t] | None -> if isNil delArgTys then [mkUnit g m] else List.map (exprForVal m) delArgVals - mkApps g ((f,fty),[],args,m) - delArgVals,expr + mkApps g ((f, fty), [], args, m) + delArgVals, expr | Some _ -> - let _,_,_,vsl,body,_ = IteratedAdjustArityOfLambda g amap topValInfo f + let _, _, _, vsl, body, _ = IteratedAdjustArityOfLambda g amap topValInfo f List.concat vsl, body let meth = TObjExprMethod(slotsig, [], [], [delArgVals], expr, m) - mkObjExpr(delegateTy,None,BuildObjCtorCall g m,[meth],[],m) + mkObjExpr(delegateTy, None, BuildObjCtorCall g m, [meth], [], m) let CoerceFromFSharpFuncToDelegate g amap infoReader ad callerArgTy m callerArgExpr delegateTy = - let (SigOfFunctionForDelegate(invokeMethInfo,delArgTys,_,_)) = GetSigOfFunctionForDelegate infoReader delegateTy m ad + let (SigOfFunctionForDelegate(invokeMethInfo, delArgTys, _, _)) = GetSigOfFunctionForDelegate infoReader delegateTy m ad BuildNewDelegateExpr (None, g, amap, delegateTy, invokeMethInfo, delArgTys, callerArgExpr, callerArgTy, m) @@ -840,7 +872,7 @@ let CoerceFromFSharpFuncToDelegate g amap infoReader ad callerArgTy m callerArgE module ProvidedMethodCalls = let private convertConstExpr g amap m (constant : Tainted) = - let (obj,objTy) = constant.PApply2(id,m) + let (obj, objTy) = constant.PApply2(id, m) let ty = Import.ImportProvidedType amap m objTy let normTy = normalizeEnumTy g ty obj.PUntaint((fun v -> @@ -881,22 +913,22 @@ module ProvidedMethodCalls = /// Ideally we would implement this operation by converting to an F# TType using ImportSystemType, and then erasing, and then converting /// back to System.Type. However, there is currently no way to get from an arbitrary F# TType (even the TType for /// System.Object) to a System.Type to give to the type provider. - let eraseSystemType (amap,m,inputType) = + let eraseSystemType (amap, m, inputType) = let rec loop (st:Tainted) = - if st.PUntaint((fun st -> st.IsGenericParameter),m) then st - elif st.PUntaint((fun st -> st.IsArray),m) then - let et = st.PApply((fun st -> st.GetElementType()),m) - let rank = st.PUntaint((fun st -> st.GetArrayRank()),m) - (loop et).PApply((fun st -> ProvidedType.CreateNoContext(if rank = 1 then st.RawSystemType.MakeArrayType() else st.RawSystemType.MakeArrayType(rank))),m) - elif st.PUntaint((fun st -> st.IsByRef),m) then - let et = st.PApply((fun st -> st.GetElementType()),m) - (loop et).PApply((fun st -> ProvidedType.CreateNoContext(st.RawSystemType.MakeByRefType())),m) - elif st.PUntaint((fun st -> st.IsPointer),m) then - let et = st.PApply((fun st -> st.GetElementType()),m) - (loop et).PApply((fun st -> ProvidedType.CreateNoContext(st.RawSystemType.MakePointerType())),m) + if st.PUntaint((fun st -> st.IsGenericParameter), m) then st + elif st.PUntaint((fun st -> st.IsArray), m) then + let et = st.PApply((fun st -> st.GetElementType()), m) + let rank = st.PUntaint((fun st -> st.GetArrayRank()), m) + (loop et).PApply((fun st -> ProvidedType.CreateNoContext(if rank = 1 then st.RawSystemType.MakeArrayType() else st.RawSystemType.MakeArrayType(rank))), m) + elif st.PUntaint((fun st -> st.IsByRef), m) then + let et = st.PApply((fun st -> st.GetElementType()), m) + (loop et).PApply((fun st -> ProvidedType.CreateNoContext(st.RawSystemType.MakeByRefType())), m) + elif st.PUntaint((fun st -> st.IsPointer), m) then + let et = st.PApply((fun st -> st.GetElementType()), m) + (loop et).PApply((fun st -> ProvidedType.CreateNoContext(st.RawSystemType.MakePointerType())), m) else - let isGeneric = st.PUntaint((fun st -> st.IsGenericType),m) - let headType = if isGeneric then st.PApply((fun st -> st.GetGenericTypeDefinition()),m) else st + let isGeneric = st.PUntaint((fun st -> st.IsGenericType), m) + let headType = if isGeneric then st.PApply((fun st -> st.GetGenericTypeDefinition()), m) else st // We import in order to use IsProvidedErasedTycon, to make sure we at least don't reinvent that let headTypeAsFSharpType = Import.ImportProvidedNamedType amap m headType if headTypeAsFSharpType.IsProvidedErasedTycon then @@ -904,15 +936,15 @@ module ProvidedMethodCalls = st.PApply((fun st -> match st.BaseType with | null -> ProvidedType.CreateNoContext(typeof) // it might be an interface - | st -> st),m) + | st -> st), m) loop baseType else if isGeneric then - let genericArgs = st.PApplyArray((fun st -> st.GetGenericArguments()),"GetGenericArguments",m) + let genericArgs = st.PApplyArray((fun st -> st.GetGenericArguments()), "GetGenericArguments", m) let typars = headTypeAsFSharpType.Typars(m) // Drop the generic arguments that don't correspond to type arguments, i.e. are units-of-measure let genericArgs = - [| for (genericArg,tp) in Seq.zip genericArgs typars do + [| for (genericArg, tp) in Seq.zip genericArgs typars do if tp.Kind = TyparKind.Type then yield genericArg |] @@ -922,7 +954,7 @@ module ProvidedMethodCalls = let erasedArgTys = genericArgs |> Array.map loop headType.PApply((fun st -> let erasedArgTys = erasedArgTys |> Array.map (fun a -> a.PUntaintNoFailure (fun x -> x.RawSystemType)) - ProvidedType.CreateNoContext(st.RawSystemType.MakeGenericType erasedArgTys)),m) + ProvidedType.CreateNoContext(st.RawSystemType.MakeGenericType erasedArgTys)), m) else st loop inputType @@ -930,40 +962,40 @@ module ProvidedMethodCalls = let convertProvidedExpressionToExprAndWitness tcVal (thisArg:Expr option, allArgs:Exprs, paramVars:Tainted[], - g,amap,mut,isProp,isSuperInit,m, + g, amap, mut, isProp, isSuperInit, m, expr:Tainted) = let varConv = // note: using paramVars.Length as assumed initial size, but this might not // be the optimal value; this wasn't checked before obsoleting Dictionary.ofList let dict = Dictionary.newWithSize paramVars.Length - for v,e in Seq.zip (paramVars |> Seq.map (fun x -> x.PUntaint(id,m))) (Option.toList thisArg @ allArgs) do - dict.Add(v,(None,e)) + for v, e in Seq.zip (paramVars |> Seq.map (fun x -> x.PUntaint(id, m))) (Option.toList thisArg @ allArgs) do + dict.Add(v, (None, e)) dict let rec exprToExprAndWitness top (ea:Tainted) = - let fail() = error(Error(FSComp.SR.etUnsupportedProvidedExpression(ea.PUntaint((fun etree -> etree.UnderlyingExpressionString), m)),m)) + let fail() = error(Error(FSComp.SR.etUnsupportedProvidedExpression(ea.PUntaint((fun etree -> etree.UnderlyingExpressionString), m)), m)) match ea with - | Tainted.Null -> error(Error(FSComp.SR.etNullProvidedExpression(ea.TypeProviderDesignation),m)) + | Tainted.Null -> error(Error(FSComp.SR.etNullProvidedExpression(ea.TypeProviderDesignation), m)) | _ -> match ea.PApplyOption((function ProvidedTypeAsExpr x -> Some x | _ -> None), m) with | Some info -> - let (expr,targetTy) = info.PApply2(id,m) + let (expr, targetTy) = info.PApply2(id, m) let srcExpr = exprToExpr expr - let targetTy = Import.ImportProvidedType amap m (targetTy.PApply(id,m)) - let sourceTy = Import.ImportProvidedType amap m (expr.PApply((fun e -> e.Type),m)) + let targetTy = Import.ImportProvidedType amap m (targetTy.PApply(id, m)) + let sourceTy = Import.ImportProvidedType amap m (expr.PApply((fun e -> e.Type), m)) let te = mkCoerceIfNeeded g targetTy sourceTy srcExpr None, (te, tyOfExpr g te) | None -> match ea.PApplyOption((function ProvidedTypeTestExpr x -> Some x | _ -> None), m) with | Some info -> - let (expr,targetTy) = info.PApply2(id,m) + let (expr, targetTy) = info.PApply2(id, m) let srcExpr = exprToExpr expr - let targetTy = Import.ImportProvidedType amap m (targetTy.PApply(id,m)) + let targetTy = Import.ImportProvidedType amap m (targetTy.PApply(id, m)) let te = mkCallTypeTest g m targetTy srcExpr None, (te, tyOfExpr g te) | None -> match ea.PApplyOption((function ProvidedIfThenElseExpr x -> Some x | _ -> None), m) with | Some info -> - let test,thenBranch,elseBranch = info.PApply3(id,m) + let test, thenBranch, elseBranch = info.PApply3(id, m) let testExpr = exprToExpr test let ifTrueExpr = exprToExpr thenBranch let ifFalseExpr = exprToExpr elseBranch @@ -972,7 +1004,7 @@ module ProvidedMethodCalls = | None -> match ea.PApplyOption((function ProvidedVarExpr x -> Some x | _ -> None), m) with | Some info -> - let _,vTe = varToExpr info + let _, vTe = varToExpr info None, (vTe, tyOfExpr g vTe) | None -> match ea.PApplyOption((function ProvidedConstantExpr x -> Some x | _ -> None), m) with @@ -982,35 +1014,35 @@ module ProvidedMethodCalls = | None -> match ea.PApplyOption((function ProvidedNewTupleExpr x -> Some x | _ -> None), m) with | Some info -> - let elems = info.PApplyArray(id, "GetInvokerExpresson",m) + let elems = info.PApplyArray(id, "GetInvokerExpresson", m) let elemsT = elems |> Array.map exprToExpr |> Array.toList let exprT = mkRefTupledNoTypes g m elemsT None, (exprT, tyOfExpr g exprT) | None -> match ea.PApplyOption((function ProvidedNewArrayExpr x -> Some x | _ -> None), m) with | Some info -> - let ty,elems = info.PApply2(id,m) + let ty, elems = info.PApply2(id, m) let tyT = Import.ImportProvidedType amap m ty - let elems = elems.PApplyArray(id, "GetInvokerExpresson",m) + let elems = elems.PApplyArray(id, "GetInvokerExpresson", m) let elemsT = elems |> Array.map exprToExpr |> Array.toList - let exprT = Expr.Op(TOp.Array, [tyT],elemsT,m) + let exprT = Expr.Op(TOp.Array, [tyT], elemsT, m) None, (exprT, tyOfExpr g exprT) | None -> match ea.PApplyOption((function ProvidedTupleGetExpr x -> Some x | _ -> None), m) with | Some info -> - let inp,n = info.PApply2(id, m) + let inp, n = info.PApply2(id, m) let inpT = inp |> exprToExpr // if type of expression is erased type then we need convert it to the underlying base type let typeOfExpr = let t = tyOfExpr g inpT stripTyEqnsWrtErasure EraseMeasures g t let tupInfo, tysT = tryDestAnyTupleTy g typeOfExpr - let exprT = mkTupleFieldGet g (tupInfo, inpT, tysT, n.PUntaint(id,m), m) + let exprT = mkTupleFieldGet g (tupInfo, inpT, tysT, n.PUntaint(id, m), m) None, (exprT, tyOfExpr g exprT) | None -> match ea.PApplyOption((function ProvidedLambdaExpr x -> Some x | _ -> None), m) with | Some info -> - let v,b = info.PApply2(id, m) + let v, b = info.PApply2(id, m) let vT = addVar v let bT = exprToExpr b removeVar v @@ -1019,7 +1051,7 @@ module ProvidedMethodCalls = | None -> match ea.PApplyOption((function ProvidedLetExpr x -> Some x | _ -> None), m) with | Some info -> - let v,e,b = info.PApply3(id, m) + let v, e, b = info.PApply3(id, m) let eT = exprToExpr e let vT = addVar v let bT = exprToExpr b @@ -1029,9 +1061,9 @@ module ProvidedMethodCalls = | None -> match ea.PApplyOption((function ProvidedVarSetExpr x -> Some x | _ -> None), m) with | Some info -> - let v,e = info.PApply2(id, m) + let v, e = info.PApply2(id, m) let eT = exprToExpr e - let vTopt,_ = varToExpr v + let vTopt, _ = varToExpr v match vTopt with | None -> fail() @@ -1041,28 +1073,28 @@ module ProvidedMethodCalls = | None -> match ea.PApplyOption((function ProvidedWhileLoopExpr x -> Some x | _ -> None), m) with | Some info -> - let guardExpr,bodyExpr = info.PApply2(id, m) + let guardExpr, bodyExpr = info.PApply2(id, m) let guardExprT = exprToExpr guardExpr let bodyExprT = exprToExpr bodyExpr - let exprT = mkWhile g (SequencePointInfoForWhileLoop.NoSequencePointAtWhileLoop,SpecialWhileLoopMarker.NoSpecialWhileLoopMarker, guardExprT, bodyExprT, m) + let exprT = mkWhile g (SequencePointInfoForWhileLoop.NoSequencePointAtWhileLoop, SpecialWhileLoopMarker.NoSpecialWhileLoopMarker, guardExprT, bodyExprT, m) None, (exprT, tyOfExpr g exprT) | None -> match ea.PApplyOption((function ProvidedForIntegerRangeLoopExpr x -> Some x | _ -> None), m) with | Some info -> - let v,e1,e2,e3 = info.PApply4(id, m) + let v, e1, e2, e3 = info.PApply4(id, m) let e1T = exprToExpr e1 let e2T = exprToExpr e2 let vT = addVar v let e3T = exprToExpr e3 removeVar v - let exprT = mkFastForLoop g (SequencePointInfoForForLoop.NoSequencePointAtForLoop,m,vT,e1T,true,e2T,e3T) + let exprT = mkFastForLoop g (SequencePointInfoForForLoop.NoSequencePointAtForLoop, m, vT, e1T, true, e2T, e3T) None, (exprT, tyOfExpr g exprT) | None -> match ea.PApplyOption((function ProvidedNewDelegateExpr x -> Some x | _ -> None), m) with | Some info -> - let delegateTy,boundVars,delegateBodyExpr = info.PApply3(id, m) + let delegateTy, boundVars, delegateBodyExpr = info.PApply3(id, m) let delegateTyT = Import.ImportProvidedType amap m delegateTy - let vs = boundVars.PApplyArray(id, "GetInvokerExpresson",m) |> Array.toList + let vs = boundVars.PApplyArray(id, "GetInvokerExpresson", m) |> Array.toList let vsT = List.map addVar vs let delegateBodyExprT = exprToExpr delegateBodyExpr List.iter removeVar vs @@ -1076,7 +1108,7 @@ module ProvidedMethodCalls = match ea.PApplyOption((function ProvidedAddressOfExpr x -> Some x | _ -> None), m) with | Some e -> let eT = exprToExpr e - let wrap,ce = mkExprAddrOfExpr g true false DefinitelyMutates eT None m + let wrap,ce, _readonly, _writeonly = mkExprAddrOfExpr g true false DefinitelyMutates eT None m let ce = wrap ce None, (ce, tyOfExpr g ce) | None -> @@ -1093,7 +1125,7 @@ module ProvidedMethodCalls = | None -> match ea.PApplyOption((function ProvidedSequentialExpr c -> Some c | _ -> None), m) with | Some info -> - let e1,e2 = info.PApply2(id, m) + let e1, e2 = info.PApply2(id, m) let e1T = exprToExpr e1 let e2T = exprToExpr e2 let ce = mkCompGenSequential m e1T e2T @@ -1101,24 +1133,24 @@ module ProvidedMethodCalls = | None -> match ea.PApplyOption((function ProvidedTryFinallyExpr c -> Some c | _ -> None), m) with | Some info -> - let e1,e2 = info.PApply2(id, m) + let e1, e2 = info.PApply2(id, m) let e1T = exprToExpr e1 let e2T = exprToExpr e2 - let ce = mkTryFinally g (e1T,e2T,m,tyOfExpr g e1T,SequencePointInfoForTry.NoSequencePointAtTry,SequencePointInfoForFinally.NoSequencePointAtFinally) + let ce = mkTryFinally g (e1T, e2T, m, tyOfExpr g e1T, SequencePointInfoForTry.NoSequencePointAtTry, SequencePointInfoForFinally.NoSequencePointAtFinally) None, (ce, tyOfExpr g ce) | None -> match ea.PApplyOption((function ProvidedTryWithExpr c -> Some c | _ -> None), m) with | Some info -> - let bT = exprToExpr (info.PApply((fun (x,_,_,_,_) -> x), m)) - let v1 = info.PApply((fun (_,x,_,_,_) -> x), m) + let bT = exprToExpr (info.PApply((fun (x, _, _, _, _) -> x), m)) + let v1 = info.PApply((fun (_, x, _, _, _) -> x), m) let v1T = addVar v1 - let e1T = exprToExpr (info.PApply((fun (_,_,x,_,_) -> x), m)) + let e1T = exprToExpr (info.PApply((fun (_, _, x, _, _) -> x), m)) removeVar v1 - let v2 = info.PApply((fun (_,_,_,x,_) -> x), m) + let v2 = info.PApply((fun (_, _, _, x, _) -> x), m) let v2T = addVar v2 - let e2T = exprToExpr (info.PApply((fun (_,_,_,_,x) -> x), m)) + let e2T = exprToExpr (info.PApply((fun (_, _, _, _, x) -> x), m)) removeVar v2 - let ce = mkTryWith g (bT,v1T,e1T,v2T,e2T,m,tyOfExpr g bT,SequencePointInfoForTry.NoSequencePointAtTry,SequencePointInfoForWith.NoSequencePointAtWith) + let ce = mkTryWith g (bT, v1T, e1T, v2T, e2T, m, tyOfExpr g bT, SequencePointInfoForTry.NoSequencePointAtTry, SequencePointInfoForWith.NoSequencePointAtWith) None, (ce, tyOfExpr g ce) | None -> match ea.PApplyOption((function ProvidedNewObjectExpr c -> Some c | _ -> None), m) with @@ -1129,29 +1161,29 @@ module ProvidedMethodCalls = and ctorCallToExpr (ne:Tainted<_>) = - let (ctor,args) = ne.PApply2(id,m) - let targetMethInfo = ProvidedMeth(amap,ctor.PApply((fun ne -> upcast ne),m),None,m) + let (ctor, args) = ne.PApply2(id, m) + let targetMethInfo = ProvidedMeth(amap, ctor.PApply((fun ne -> upcast ne), m), None, m) let objArgs = [] let arguments = [ for ea in args.PApplyArray(id, "GetInvokerExpresson", m) -> exprToExpr ea ] let callExpr = BuildMethodCall tcVal g amap Mutates.PossiblyMutates m false targetMethInfo isSuperInit [] objArgs arguments callExpr and addVar (v:Tainted) = - let nm = v.PUntaint ((fun v -> v.Name),m) - let mut = v.PUntaint ((fun v -> v.IsMutable),m) - let vRaw = v.PUntaint (id,m) - let tyT = Import.ImportProvidedType amap m (v.PApply ((fun v -> v.Type),m)) - let vT,vTe = if mut then mkMutableCompGenLocal m nm tyT else mkCompGenLocal m nm tyT - varConv.[vRaw] <- (Some vT,vTe) + let nm = v.PUntaint ((fun v -> v.Name), m) + let mut = v.PUntaint ((fun v -> v.IsMutable), m) + let vRaw = v.PUntaint (id, m) + let tyT = Import.ImportProvidedType amap m (v.PApply ((fun v -> v.Type), m)) + let vT, vTe = if mut then mkMutableCompGenLocal m nm tyT else mkCompGenLocal m nm tyT + varConv.[vRaw] <- (Some vT, vTe) vT and removeVar (v:Tainted) = - let vRaw = v.PUntaint (id,m) + let vRaw = v.PUntaint (id, m) varConv.Remove vRaw |> ignore and methodCallToExpr top _origExpr (mce:Tainted<_>) = - let (objOpt,meth,args) = mce.PApply3(id,m) - let targetMethInfo = ProvidedMeth(amap,meth.PApply((fun mce -> upcast mce), m),None,m) + let (objOpt, meth, args) = mce.PApply3(id, m) + let targetMethInfo = ProvidedMeth(amap, meth.PApply((fun mce -> upcast mce), m), None, m) let objArgs = match objOpt.PApplyOption(id, m) with | None -> [] @@ -1174,11 +1206,12 @@ module ProvidedMethodCalls = and varToExpr (pe:Tainted) = // sub in the appropriate argument // REVIEW: "thisArg" pointer should be first, if present - let vRaw = pe.PUntaint(id,m) - if not (varConv.ContainsKey vRaw) then - let typeProviderDesignation = ExtensionTyping.DisplayNameOfTypeProvider (pe.TypeProvider, m) - error(NumberedError(FSComp.SR.etIncorrectParameterExpression(typeProviderDesignation,vRaw.Name), m)) - varConv.[vRaw] + let vRaw = pe.PUntaint(id, m) + match varConv.TryGetValue(vRaw) with + | true, v -> v + | _ -> + let typeProviderDesignation = ExtensionTyping.DisplayNameOfTypeProvider (pe.TypeProvider, m) + error(NumberedError(FSComp.SR.etIncorrectParameterExpression(typeProviderDesignation, vRaw.Name), m)) and exprToExpr expr = let _, (resExpr, _) = exprToExprAndWitness false expr @@ -1193,28 +1226,28 @@ module ProvidedMethodCalls = mi.PApplyArray((fun mi -> mi.GetParameters()), "GetParameters", m) let paramTys = parameters - |> Array.map (fun p -> p.PApply((fun st -> st.ParameterType),m)) + |> Array.map (fun p -> p.PApply((fun st -> st.ParameterType), m)) let erasedParamTys = paramTys - |> Array.map (fun pty -> eraseSystemType (amap,m,pty)) + |> Array.map (fun pty -> eraseSystemType (amap, m, pty)) let paramVars = erasedParamTys - |> Array.mapi (fun i erasedParamTy -> erasedParamTy.PApply((fun ty -> ProvidedVar.Fresh("arg" + i.ToString(),ty)),m)) + |> Array.mapi (fun i erasedParamTy -> erasedParamTy.PApply((fun ty -> ProvidedVar.Fresh("arg" + i.ToString(), ty)), m)) // encode "this" as the first ParameterExpression, if applicable let thisArg, paramVars = match objArgs with | [objArg] -> - let erasedThisTy = eraseSystemType (amap,m,mi.PApply((fun mi -> mi.DeclaringType),m)) + let erasedThisTy = eraseSystemType (amap, m, mi.PApply((fun mi -> mi.DeclaringType), m)) let thisVar = erasedThisTy.PApply((fun ty -> ProvidedVar.Fresh("this", ty)), m) Some objArg , Array.append [| thisVar |] paramVars | [] -> None , paramVars | _ -> failwith "multiple objArgs?" - let ea = mi.PApplyWithProvider((fun (methodInfo,provider) -> ExtensionTyping.GetInvokerExpression(provider, methodInfo, [| for p in paramVars -> p.PUntaintNoFailure id |])), m) + let ea = mi.PApplyWithProvider((fun (methodInfo, provider) -> ExtensionTyping.GetInvokerExpression(provider, methodInfo, [| for p in paramVars -> p.PUntaintNoFailure id |])), m) - convertProvidedExpressionToExprAndWitness tcVal (thisArg,allArgs,paramVars,g,amap,mut,isProp,isSuperInit,m,ea) + convertProvidedExpressionToExprAndWitness tcVal (thisArg, allArgs, paramVars, g, amap, mut, isProp, isSuperInit, m, ea) let BuildInvokerExpressionForProvidedMethodCall tcVal (g, amap, mi:Tainted, objArgs, mut, isProp, isSuperInit, allArgs, m) = @@ -1230,3 +1263,55 @@ module ProvidedMethodCalls = let methName = mi.PUntaint((fun mb -> mb.Name), m) raise( tpe.WithContext(typeName, methName) ) // loses original stack trace #endif + + + +let RecdFieldInstanceChecks g amap ad m (rfinfo:RecdFieldInfo) = + if rfinfo.IsStatic then error (Error (FSComp.SR.tcStaticFieldUsedWhenInstanceFieldExpected(), m)) + CheckRecdFieldInfoAttributes g rfinfo m |> CommitOperationResult + CheckRecdFieldInfoAccessible amap m ad rfinfo + +let ILFieldInstanceChecks g amap ad m (finfo :ILFieldInfo) = + if finfo.IsStatic then error (Error (FSComp.SR.tcStaticFieldUsedWhenInstanceFieldExpected(), m)) + CheckILFieldInfoAccessible g amap m ad finfo + CheckILFieldAttributes g finfo m + +let MethInfoChecks g amap isInstance tyargsOpt objArgs ad m (minfo:MethInfo) = + if minfo.IsInstance <> isInstance then + if isInstance then + error (Error (FSComp.SR.csMethodIsNotAnInstanceMethod(minfo.LogicalName), m)) + else + error (Error (FSComp.SR.csMethodIsNotAStaticMethod(minfo.LogicalName), m)) + + // keep the original accessibility domain to determine type accessibility + let adOriginal = ad + // Eliminate the 'protected' portion of the accessibility domain for instance accesses + let ad = + match objArgs, ad with + | [objArg], AccessibleFrom(paths, Some tcref) -> + let objArgTy = tyOfExpr g objArg + let ty = generalizedTyconRef tcref + // We get to keep our rights if the type we're in subsumes the object argument type + if TypeFeasiblySubsumesType 0 g amap m ty CanCoerce objArgTy then + ad + // We get to keep our rights if this is a base call + elif IsBaseCall objArgs then + ad + else + AccessibleFrom(paths, None) + | _ -> ad + + if not (IsTypeAndMethInfoAccessible amap m adOriginal ad minfo) then + error (Error (FSComp.SR.tcMethodNotAccessible(minfo.LogicalName), m)) + + if isAnyTupleTy g minfo.ApparentEnclosingType && not minfo.IsExtensionMember && + (minfo.LogicalName.StartsWithOrdinal("get_Item") || minfo.LogicalName.StartsWithOrdinal("get_Rest")) then + warning (Error (FSComp.SR.tcTupleMemberNotNormallyUsed(), m)) + + CheckMethInfoAttributes g m tyargsOpt minfo |> CommitOperationResult + +exception FieldNotMutable of DisplayEnv * Tast.RecdFieldRef * range + +let CheckRecdFieldMutation m denv (rfinfo:RecdFieldInfo) = + if not rfinfo.RecdField.IsMutable then error (FieldNotMutable(denv, rfinfo.RecdFieldRef, m)) + diff --git a/src/fsharp/MethodOverrides.fs b/src/fsharp/MethodOverrides.fs index a326248b553..77b98010d31 100644 --- a/src/fsharp/MethodOverrides.fs +++ b/src/fsharp/MethodOverrides.fs @@ -4,7 +4,6 @@ module internal Microsoft.FSharp.Compiler.MethodOverrides open Microsoft.FSharp.Compiler -open Microsoft.FSharp.Compiler.AbstractIL.Internal open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library open Microsoft.FSharp.Compiler.Ast open Microsoft.FSharp.Compiler.ErrorLogger @@ -84,7 +83,7 @@ module DispatchSlotChecking = let (CompiledSig (argTys,retTy,fmtps,ttpinst)) = CompiledSigOfMeth g amap m minfo let isFakeEventProperty = minfo.IsFSharpEventPropertyMethod - Override(parentType,tcrefOfAppTy g minfo.EnclosingType,mkSynId m nm, (fmtps,ttpinst),argTys,retTy,isFakeEventProperty,false) + Override(parentType, minfo.ApparentEnclosingTyconRef, mkSynId m nm, (fmtps,ttpinst),argTys,retTy,isFakeEventProperty,false) /// Get the override info for a value being used to implement a dispatch slot. let GetTypeMemberOverrideInfo g reqdTy (overrideBy:ValRef) = @@ -122,7 +121,7 @@ module DispatchSlotChecking = //CanImplementAnySlot <<----- Change to this to enable implicit interface implementation let isFakeEventProperty = overrideBy.IsFSharpEventProperty(g) - Override(implKind,overrideBy.MemberApparentParent, mkSynId overrideBy.Range nm, (memberMethodTypars,memberToParentInst),argTys,retTy,isFakeEventProperty, overrideBy.IsCompilerGenerated) + Override(implKind,overrideBy.MemberApparentEntity, mkSynId overrideBy.Range nm, (memberMethodTypars,memberToParentInst),argTys,retTy,isFakeEventProperty, overrideBy.IsCompilerGenerated) /// Get the override information for an object expression method being used to implement dispatch slots let GetObjectExprOverrideInfo g amap (implty, id:Ident, memberFlags, ty, arityInfo, bindingAttribs, rhsExpr) = @@ -158,24 +157,22 @@ module DispatchSlotChecking = let IsImplMatch g (dispatchSlot:MethInfo) (overrideBy: OverrideInfo) = // If the override is listed as only relevant to one type, and we're matching it against an abstract slot of an interface type, // then check that interface type is the right type. - (match overrideBy.CanImplement with - | CanImplementNoSlots -> false - | CanImplementAnySlot -> true - | CanImplementAnyClassHierarchySlot -> not (isInterfaceTy g dispatchSlot.EnclosingType) - //| CanImplementSpecificInterfaceSlot parentTy -> isInterfaceTy g dispatchSlot.EnclosingType && typeEquiv g parentTy dispatchSlot.EnclosingType - | CanImplementAnyInterfaceSlot -> isInterfaceTy g dispatchSlot.EnclosingType) + match overrideBy.CanImplement with + | CanImplementNoSlots -> false + | CanImplementAnySlot -> true + | CanImplementAnyClassHierarchySlot -> not (isInterfaceTy g dispatchSlot.ApparentEnclosingType) + | CanImplementAnyInterfaceSlot -> isInterfaceTy g dispatchSlot.ApparentEnclosingType /// Check if the kinds of type parameters match between a dispatch slot and an override. - let IsTyparKindMatch g amap m (dispatchSlot:MethInfo) (Override(_,_,_,(mtps,_),_,_,_,_)) = - let (CompiledSig(_,_,fvmtps,_)) = CompiledSigOfMeth g amap m dispatchSlot + let IsTyparKindMatch (CompiledSig(_,_,fvmtps,_)) (Override(_,_,_,(mtps,_),_,_,_,_)) = List.lengthsEqAndForall2 (fun (tp1:Typar) (tp2:Typar) -> tp1.Kind = tp2.Kind) mtps fvmtps /// Check if an override is a partial match for the requirements for a dispatch slot - let IsPartialMatch g amap m (dispatchSlot:MethInfo) (Override(_,_,_,(mtps,_),argTys,_retTy,_,_) as overrideBy) = + let IsPartialMatch g (dispatchSlot:MethInfo) compiledSig (Override(_,_,_,(mtps,_),argTys,_retTy,_,_) as overrideBy) = IsNameMatch dispatchSlot overrideBy && - let (CompiledSig (vargtys,_,fvmtps,_)) = CompiledSigOfMeth g amap m dispatchSlot + let (CompiledSig (vargtys,_,fvmtps,_)) = compiledSig mtps.Length = fvmtps.Length && - IsTyparKindMatch g amap m dispatchSlot overrideBy && + IsTyparKindMatch compiledSig overrideBy && argTys.Length = vargtys.Length && IsImplMatch g dispatchSlot overrideBy @@ -189,8 +186,9 @@ module DispatchSlotChecking = /// Check if an override exactly matches the requirements for a dispatch slot let IsExactMatch g amap m dispatchSlot (Override(_,_,_,(mtps,mtpinst),argTys,retTy,_,_) as overrideBy) = - IsPartialMatch g amap m dispatchSlot overrideBy && - let (CompiledSig (vargtys,vrty,fvmtps,ttpinst)) = CompiledSigOfMeth g amap m dispatchSlot + let compiledSig = CompiledSigOfMeth g amap m dispatchSlot + IsPartialMatch g dispatchSlot compiledSig overrideBy && + let (CompiledSig (vargtys,vrty,fvmtps,ttpinst)) = compiledSig // Compare the types. CompiledSigOfMeth, GetObjectExprOverrideInfo and GetTypeMemberOverrideInfo have already // applied all relevant substitutions except the renamings from fvtmps <-> mtps @@ -237,7 +235,7 @@ module DispatchSlotChecking = let OverrideImplementsDispatchSlot g amap m dispatchSlot availPriorOverride = IsExactMatch g amap m dispatchSlot availPriorOverride && // The override has to actually be in some subtype of the dispatch slot - ExistsHeadTypeInEntireHierarchy g amap m (generalizedTyconRef availPriorOverride.BoundingTyconRef) (tcrefOfAppTy g dispatchSlot.EnclosingType) + ExistsHeadTypeInEntireHierarchy g amap m (generalizedTyconRef availPriorOverride.BoundingTyconRef) dispatchSlot.DeclaringTyconRef /// Check if a dispatch slot is already implemented let DispatchSlotIsAlreadyImplemented g amap m availPriorOverridesKeyed (dispatchSlot: MethInfo) = @@ -275,19 +273,20 @@ module DispatchSlotChecking = sink |> ignore () | [] -> - if not isOptional && + if not isOptional && // Check that no available prior override implements this dispatch slot not (DispatchSlotIsAlreadyImplemented g amap m availPriorOverridesKeyed dispatchSlot) then - // error reporting path - let (CompiledSig (vargtys,_vrty,fvmtps,_)) = CompiledSigOfMeth g amap m dispatchSlot + // error reporting path + let compiledSig = CompiledSigOfMeth g amap m dispatchSlot + let noimpl() = if isReqdTyInterface then fail(Error(FSComp.SR.typrelNoImplementationGivenWithSuggestion(NicePrint.stringOfMethInfo amap m denv dispatchSlot), m)) else fail(Error(FSComp.SR.typrelNoImplementationGiven(NicePrint.stringOfMethInfo amap m denv dispatchSlot), m)) - - match overrides |> List.filter (IsPartialMatch g amap m dispatchSlot) with + + match overrides |> List.filter (IsPartialMatch g dispatchSlot compiledSig) with | [] -> let possibleOverrides = overrides @@ -302,16 +301,17 @@ module DispatchSlotChecking = |> List.filter (fun (RequiredSlot(dispatchSlot,_)) -> IsNameMatch dispatchSlot overrideBy && IsImplMatch g dispatchSlot overrideBy) |> isNilOrSingleton |> not - + + let (CompiledSig (vargtys,_,fvmtps,_)) = compiledSig + if moreThanOnePossibleDispatchSlot then - // Error will be reported below in CheckOverridesAreAllUsedOnce - () + noimpl() elif argTys.Length <> vargtys.Length then fail(Error(FSComp.SR.typrelMemberDoesNotHaveCorrectNumberOfArguments(FormatOverride denv overrideBy, FormatMethInfoSig g amap m denv dispatchSlot), overrideBy.Range)) elif mtps.Length <> fvmtps.Length then fail(Error(FSComp.SR.typrelMemberDoesNotHaveCorrectNumberOfTypeParameters(FormatOverride denv overrideBy, FormatMethInfoSig g amap m denv dispatchSlot), overrideBy.Range)) - elif not (IsTyparKindMatch g amap m dispatchSlot overrideBy) then + elif not (IsTyparKindMatch compiledSig overrideBy) then fail(Error(FSComp.SR.typrelMemberDoesNotHaveCorrectKindsOfGenericParameters(FormatOverride denv overrideBy, FormatMethInfoSig g amap m denv dispatchSlot), overrideBy.Range)) else fail(Error(FSComp.SR.typrelMemberCannotImplement(FormatOverride denv overrideBy, NicePrint.stringOfMethInfo amap m denv dispatchSlot, FormatMethInfoSig g amap m denv dispatchSlot), overrideBy.Range)) @@ -345,7 +345,7 @@ module DispatchSlotChecking = match relevantVirts |> List.filter (fun dispatchSlot -> OverrideImplementsDispatchSlot g amap m dispatchSlot overrideBy) with | [] -> // This is all error reporting - match relevantVirts |> List.filter (fun dispatchSlot -> IsPartialMatch g amap m dispatchSlot overrideBy) with + match relevantVirts |> List.filter (fun dispatchSlot -> IsPartialMatch g dispatchSlot (CompiledSigOfMeth g amap m dispatchSlot) overrideBy) with | [dispatchSlot] -> errorR(OverrideDoesntOverride(denv,overrideBy,Some dispatchSlot,g,amap,m)) | _ -> @@ -364,11 +364,11 @@ module DispatchSlotChecking = | [dispatchSlot] -> - if dispatchSlot.IsFinal && (isObjExpr || not (typeEquiv g reqdTy dispatchSlot.EnclosingType)) then + if dispatchSlot.IsFinal && (isObjExpr || not (typeEquiv g reqdTy dispatchSlot.ApparentEnclosingType)) then errorR(Error(FSComp.SR.typrelMethodIsSealed(NicePrint.stringOfMethInfo amap m denv dispatchSlot),m)) | dispatchSlots -> match dispatchSlots |> List.filter (fun dispatchSlot -> - isInterfaceTy g dispatchSlot.EnclosingType || + isInterfaceTy g dispatchSlot.ApparentEnclosingType || not (DispatchSlotIsAlreadyImplemented g amap m availPriorOverridesKeyed dispatchSlot)) with | h1 :: h2 :: _ -> errorR(Error(FSComp.SR.typrelOverrideImplementsMoreThenOneSlot((FormatOverride denv overrideBy), (NicePrint.stringOfMethInfo amap m denv h1), (NicePrint.stringOfMethInfo amap m denv h2)),m)) @@ -376,7 +376,7 @@ module DispatchSlotChecking = // dispatch slots are ordered from the derived classes to base // so we can check the topmost dispatch slot if it is final match dispatchSlots with - | meth::_ when meth.IsFinal -> errorR(Error(FSComp.SR.tcCannotOverrideSealedMethod((sprintf "%s::%s" (meth.EnclosingType.ToString()) (meth.LogicalName))), m)) + | meth::_ when meth.IsFinal -> errorR(Error(FSComp.SR.tcCannotOverrideSealedMethod((sprintf "%s::%s" (meth.ApparentEnclosingType.ToString()) (meth.LogicalName))), m)) | _ -> () @@ -453,6 +453,7 @@ module DispatchSlotChecking = // Is a member an abstract slot of one of the implied interface types? let isImpliedInterfaceType ty = + isAppTy g ty && isImpliedInterfaceTable.ContainsKey (tcrefOfAppTy g ty) && impliedTys |> List.exists (TypesFeasiblyEquiv 0 g amap reqdTyRange ty) @@ -476,7 +477,7 @@ module DispatchSlotChecking = // So here we get and yield all of those. for minfo in reqdTy |> GetIntrinsicMethInfosOfType infoReader (None,AccessibleFromSomewhere,AllowMultiIntfInstantiations.Yes) IgnoreOverrides reqdTyRange do if minfo.IsDispatchSlot then - yield RequiredSlot(minfo,(*isOptional=*)false) ] + yield RequiredSlot(minfo,(*isOptional=*) not minfo.IsAbstract) ] // Compute the methods that are available to implement abstract slots from the base class @@ -506,7 +507,7 @@ module DispatchSlotChecking = // We also collect up the properties. This is used for abstract slot inference when overriding properties let isRelevantRequiredProperty (x:PropInfo) = (x.IsVirtualProperty && not (isInterfaceTy g reqdTy)) || - isImpliedInterfaceType x.EnclosingType + isImpliedInterfaceType x.ApparentEnclosingType let reqdProperties = GetIntrinsicPropInfosOfType infoReader (None,AccessibleFromSomewhere,AllowMultiIntfInstantiations.Yes) IgnoreOverrides reqdTyRange reqdTy @@ -610,7 +611,7 @@ module DispatchSlotChecking = let overridenForThisSlotImplSet = [ for (RequiredSlot(dispatchSlot,_)) in NameMultiMap.find overrideByInfo.LogicalName dispatchSlotsKeyed do if OverrideImplementsDispatchSlot g amap m dispatchSlot overrideByInfo then - if tyconRefEq g overrideByInfo.BoundingTyconRef (tcrefOfAppTy g dispatchSlot.EnclosingType) then + if tyconRefEq g overrideByInfo.BoundingTyconRef dispatchSlot.DeclaringTyconRef then match dispatchSlot.ArbitraryValRef with | Some virtMember -> if virtMember.MemberInfo.Value.IsImplemented then errorR(Error(FSComp.SR.tcDefaultImplementationAlreadyExists(),overrideByInfo.Range)) @@ -710,7 +711,7 @@ let GetAbstractMethInfosForSynMethodDecl(infoReader:InfoReader,ad,memberName:Ide GetIntrinsicMethInfosOfType infoReader (Some(memberName.idText), ad, AllowMultiIntfInstantiations.Yes) IgnoreOverrides bindm ty let dispatchSlots = minfos |> List.filter (fun minfo -> minfo.IsDispatchSlot) let topValSynArities = SynInfo.AritiesOfArgs valSynData - let topValSynArities = if topValSynArities.Length > 0 then topValSynArities.Tail else topValSynArities + let topValSynArities = if List.isEmpty topValSynArities then topValSynArities else topValSynArities.Tail let dispatchSlotsArityMatch = dispatchSlots |> List.filter (fun minfo -> minfo.NumArgs = topValSynArities) dispatchSlots,dispatchSlotsArityMatch diff --git a/src/fsharp/NameResolution.fs b/src/fsharp/NameResolution.fs index e7326ac115a..28e6830c8eb 100644 --- a/src/fsharp/NameResolution.fs +++ b/src/fsharp/NameResolution.fs @@ -11,10 +11,8 @@ open Microsoft.FSharp.Compiler.Ast open Microsoft.FSharp.Compiler.ErrorLogger open Microsoft.FSharp.Compiler.Tast open Microsoft.FSharp.Compiler.Tastops -open Microsoft.FSharp.Compiler.Import open Microsoft.FSharp.Compiler.TcGlobals open Microsoft.FSharp.Compiler.Lib -open Microsoft.FSharp.Compiler.AbstractIL open Microsoft.FSharp.Compiler.AbstractIL.Internal open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library.ResultOrException @@ -116,8 +114,8 @@ let ActivePatternElemsOfModuleOrNamespace (modref:ModuleOrNamespaceRef) : NameMa /// Detect a use of a nominal type, including type abbreviations. /// /// When reporting symbols, we care about abbreviations, e.g. 'int' and 'int32' count as two separate symbols -let (|AbbrevOrAppTy|_|) (typ: TType) = - match stripTyparEqns typ with +let (|AbbrevOrAppTy|_|) (ty: TType) = + match stripTyparEqns ty with | TType_app (tcref,_) -> Some tcref | _ -> None @@ -251,8 +249,8 @@ type Item = let valRefHash (vref: ValRef) = match vref.TryDeref with - | VNone -> 0 - | VSome v -> LanguagePrimitives.PhysicalHash v + | ValueNone -> 0 + | ValueSome v -> LanguagePrimitives.PhysicalHash v [] /// Pairs an Item with a TyparInst showing how generic type variables of the item are instantiated at @@ -424,16 +422,15 @@ let private GetCSharpStyleIndexedExtensionMembersForTyconRef (amap:Import.Import // Type must be non-generic and have 'Extension' attribute if isNil(tcrefOfStaticClass.Typars(m)) && TyconRefHasAttribute g m g.attrib_ExtensionAttribute tcrefOfStaticClass then let pri = NextExtensionMethodPriority() - let typ = generalizedTyconRef tcrefOfStaticClass + let ty = generalizedTyconRef tcrefOfStaticClass // Get the 'plain' methods, not interpreted as extension methods - let minfos = GetImmediateIntrinsicMethInfosOfType (None, AccessorDomain.AccessibleFromSomeFSharpCode) g amap m typ + let minfos = GetImmediateIntrinsicMethInfosOfType (None, AccessorDomain.AccessibleFromSomeFSharpCode) g amap m ty [ for minfo in minfos do // Method must be static, have 'Extension' attribute, must not be curried, must have at least one argument if not minfo.IsInstance && not minfo.IsExtensionMember && - minfo.NumArgs.Length = 1 && - minfo.NumArgs.Head >= 1 && + (match minfo.NumArgs with [x] when x >= 1 -> true | _ -> false) && MethInfoHasAttribute g m g.attrib_ExtensionAttribute minfo then let ilExtMem = ILExtMem (tcrefOfStaticClass, minfo, pri) @@ -469,7 +466,7 @@ let private GetCSharpStyleIndexedExtensionMembersForTyconRef (amap:Import.Import // So we need to go and crack the type of the 'this' argument. let thisTy = minfo.GetParamTypes(amap,m,generalizeTypars minfo.FormalMethodTypars).Head.Head match thisTy with - | AppTy amap.g (tcrefOfTypeExtended, _) -> Some tcrefOfTypeExtended + | AppTy g (tcrefOfTypeExtended, _) when not (isByrefTy g thisTy) -> Some tcrefOfTypeExtended | _ -> None Some rs @@ -519,7 +516,7 @@ let AddValRefsToItems (bulkAddMode: BulkAdd) (eUnqualifiedItems: LayeredMap<_,_> /// Add an F# value to the table of available extension members, if necessary, as an FSharp-style extension member let AddValRefToExtensionMembers pri (eIndexedExtensionMembers: TyconRefMultiMap<_>) (vref:ValRef) = if vref.IsMember && vref.IsExtensionMember then - eIndexedExtensionMembers.Add (vref.MemberApparentParent, FSExtMem (vref,pri)) + eIndexedExtensionMembers.Add (vref.MemberApparentEntity, FSExtMem (vref,pri)) else eIndexedExtensionMembers @@ -570,7 +567,7 @@ let AddValRefToNameEnv nenv (vref:ValRef) = /// Add a set of active pattern result tags to the environment. let AddActivePatternResultTagsToNameEnv (apinfo: PrettyNaming.ActivePatternInfo) nenv ty m = - if apinfo.Names.Length = 0 then nenv else + if List.isEmpty apinfo.Names then nenv else let apresl = List.indexed apinfo.Names { nenv with eUnqualifiedItems = @@ -667,8 +664,8 @@ let private AddPartsOfTyconRefToNameEnv bulkAddMode ownDefinition (g:TcGlobals) protectAssemblyExploration false (fun () -> - let typ = generalizedTyconRef tcref - isClassTy g typ || isStructTy g typ) + let ty = generalizedTyconRef tcref + isClassTy g ty || isStructTy g ty) if mayHaveConstruction then tab.LinearTryModifyThenLaterFlatten (tcref.DisplayName, (fun prev -> @@ -677,13 +674,13 @@ let private AddPartsOfTyconRefToNameEnv bulkAddMode ownDefinition (g:TcGlobals) | _ -> Item.UnqualifiedType [tcref])) else tab - if isILOrRequiredQualifiedAccess || ucrefs.Length = 0 then + if isILOrRequiredQualifiedAccess || List.isEmpty ucrefs then tab else AddUnionCases2 bulkAddMode tab ucrefs let ePatItems = - if isILOrRequiredQualifiedAccess || ucrefs.Length = 0 then + if isILOrRequiredQualifiedAccess || List.isEmpty ucrefs then nenv.ePatItems else AddUnionCases1 nenv.ePatItems ucrefs @@ -695,9 +692,6 @@ let private AddPartsOfTyconRefToNameEnv bulkAddMode ownDefinition (g:TcGlobals) eIndexedExtensionMembers = eIndexedExtensionMembers eUnindexedExtensionMembers = eUnindexedExtensionMembers } -let TryFindPatternByName name {ePatItems = patternMap} = - NameMap.tryFind name patternMap - /// Add a set of type definitions to the name resolution environment let AddTyconRefsToNameEnv bulkAddMode ownDefinition g amap m root nenv tcrefs = if isNil tcrefs then nenv else @@ -855,7 +849,8 @@ let AddDeclaredTyparsToNameEnv check nenv typars = /// a fresh set of inference type variables for the type parameters of the union type. let FreshenTycon (ncenv: NameResolver) m (tcref:TyconRef) = let tinst = ncenv.InstantiationGenerator m (tcref.Typars m) - TType_app(tcref,tinst) + let improvedTy = ncenv.g.decompileType tcref tinst + improvedTy /// Convert a reference to a union case into a UnionCaseInfo that includes /// a fresh set of inference type variables for the type parameters of the union type. @@ -910,7 +905,6 @@ let AddResults res1 res2 = | Exception (Error _),Exception (UndefinedName _ as e2) -> Exception e2 | Exception e1,Exception _ -> Exception e1 -let (+++) x y = AddResults x y let NoResultsOrUsefulErrors = Result [] /// Indicates if we only need one result or all possible results from a resolution. @@ -945,7 +939,15 @@ let AtMostOneResult m res = match res with | Exception err -> raze err | Result [] -> raze (Error(FSComp.SR.nrInvalidModuleExprType(),m)) - | Result (res :: _) -> success res + | Result (res :: _) -> success res + +let AtMostOneResultQuery query2 res1 = + match res1 with + | Exception _ -> AddResults res1 (query2()) + | Result [] -> query2() + | _ -> res1 + +let inline (+++) res1 query2 = AtMostOneResultQuery query2 res1 //------------------------------------------------------------------------- // TypeNameResolutionInfo @@ -979,10 +981,8 @@ type TypeNameResolutionStaticArgsInfo = // Get the first possible mangled name of the type, assuming the args are generic args member x.MangledNameForType nm = - if IsMangledGenericName nm || x.NumStaticArgs = 0 then nm - else nm+"`"+string x.NumStaticArgs - - + if x.NumStaticArgs = 0 || TryDemangleGenericNameAndPos nm <> ValueNone then nm + else nm + "`" + string x.NumStaticArgs [] /// Represents information which guides name resolution of types. @@ -1005,17 +1005,21 @@ type TypeNameResolutionInfo = /// be used to qualify access if needed let LookupTypeNameInEntityHaveArity nm (staticResInfo: TypeNameResolutionStaticArgsInfo) (mty:ModuleOrNamespaceType) = let attempt1 = mty.TypesByMangledName.TryFind (staticResInfo.MangledNameForType nm) - match attempt1 with - | Some _ as r -> r + match attempt1 with | None -> mty.TypesByMangledName.TryFind nm + | _ -> attempt1 /// Unqualified lookups of type names where the number of generic arguments is known /// from context, e.g. List. Rebindings due to 'open' may have rebound identifiers. let LookupTypeNameInEnvHaveArity fq nm numTyArgs (nenv:NameResolutionEnv) = - let key = if IsMangledGenericName nm then DecodeGenericTypeName nm else NameArityPair(nm,numTyArgs) - match nenv.TyconsByDemangledNameAndArity(fq).TryFind(key) with - | Some res -> Some res + let key = + match TryDemangleGenericNameAndPos nm with + | ValueSome pos -> DecodeGenericTypeName pos nm + | _ -> NameArityPair(nm,numTyArgs) + + match nenv.TyconsByDemangledNameAndArity(fq).TryFind key with | None -> nenv.TyconsByAccessNames(fq).TryFind nm |> Option.map List.head + | res -> res /// Implements unqualified lookups of type names where the number of generic arguments is NOT known /// from context. @@ -1034,16 +1038,18 @@ let LookupTypeNameInEnvHaveArity fq nm numTyArgs (nenv:NameResolutionEnv) = // In theory the full names such as ``RecordType`1`` can // also be used to qualify access if needed, though this is almost never needed. -let LookupTypeNameNoArity nm (byDemangledNameAndArity: LayeredMap) (byAccessNames: LayeredMultiMap) = - if IsMangledGenericName nm then - match byDemangledNameAndArity.TryFind (DecodeGenericTypeName nm) with - | Some res -> [res] - | None -> - match byAccessNames.TryFind nm with - | Some res -> res - | None -> [] - else - byAccessNames.[nm] +let LookupTypeNameNoArity nm (byDemangledNameAndArity: LayeredMap) (byAccessNames: LayeredMultiMap) = + match TryDemangleGenericNameAndPos nm with + | ValueSome pos -> + let demangled = DecodeGenericTypeName pos nm + match byDemangledNameAndArity.TryGetValue demangled with + | true, res -> [res] + | _ -> + match byAccessNames.TryGetValue nm with + | true, res -> res + | _ -> [] + | _ -> + byAccessNames.[nm] /// Qualified lookup of type names in the environment let LookupTypeNameInEnvNoArity fq nm (nenv: NameResolutionEnv) = @@ -1090,7 +1096,7 @@ let AddEntityForProvidedType (amap: Import.ImportMap, modref: ModuleOrNamespaceR let tycon = Construct.NewProvidedTycon(resolutionEnvironment, st, importProvidedType, isSuppressRelocate, m) modref.ModuleOrNamespaceType.AddProvidedTypeEntity(tycon) let tcref = modref.NestedTyconRef tycon - System.Diagnostics.Debug.Assert modref.TryDeref.IsSome + System.Diagnostics.Debug.Assert(ValueOption.isSome modref.TryDeref) tcref @@ -1101,14 +1107,9 @@ let ResolveProvidedTypeNameInEntity (amap, m, typeName, modref: ModuleOrNamespac | TProvidedNamespaceExtensionPoint(resolutionEnvironment,resolvers) -> match modref.Deref.PublicPath with | Some(PubPath path) -> - let matches = resolvers |> List.map (fun r-> ExtensionTyping.TryResolveProvidedType(r,m,path,typeName)) - let tcrefs = - [ for st in matches do - match st with - | None -> () - | Some st -> - yield AddEntityForProvidedType (amap, modref, resolutionEnvironment, st, m) ] - tcrefs + resolvers + |> List.choose (fun r-> ExtensionTyping.TryResolveProvidedType(r,m,path,typeName)) + |> List.map (fun st -> AddEntityForProvidedType (amap, modref, resolutionEnvironment, st, m)) | None -> [] // We have a provided type, look up its nested types (populating them on-demand if necessary) @@ -1165,10 +1166,10 @@ let MakeNestedType (ncenv:NameResolver) (tinst:TType list) m (tcrefNested:TyconR mkAppTy tcrefNested (tinst @ tinstNested) /// Get all the accessible nested types of an existing type. -let GetNestedTypesOfType (ad, ncenv:NameResolver, optFilter, staticResInfo, checkForGenerated, m) typ = +let GetNestedTypesOfType (ad, ncenv:NameResolver, optFilter, staticResInfo, checkForGenerated, m) ty = let g = ncenv.g - ncenv.InfoReader.GetPrimaryTypeHierachy(AllowMultiIntfInstantiations.Yes,m,typ) |> List.collect (fun typ -> - match typ with + ncenv.InfoReader.GetPrimaryTypeHierachy(AllowMultiIntfInstantiations.Yes,m,ty) |> List.collect (fun ty -> + match ty with | AppTy g (tcref,tinst) -> let tycon = tcref.Deref let mty = tycon.ModuleOrNamespaceType @@ -1197,8 +1198,8 @@ let GetNestedTypesOfType (ad, ncenv:NameResolver, optFilter, staticResInfo, chec #endif mty.TypesByAccessNames.Values |> List.choose (fun entity -> - let typ = tcref.NestedTyconRef entity |> MakeNestedType ncenv tinst m - if IsTypeAccessible g ncenv.amap m ad typ then Some typ else None) + let ty = tcref.NestedTyconRef entity |> MakeNestedType ncenv tinst m + if IsTypeAccessible g ncenv.amap m ad ty then Some ty else None) | _ -> []) //------------------------------------------------------------------------- @@ -1223,6 +1224,8 @@ type ItemOccurence = | Implemented /// Result gets suppressed over this text range | RelatedText + /// This is a usage of a module or namespace name in open statement + | Open type OpenDeclaration = { LongId: Ident list @@ -1243,6 +1246,10 @@ type OpenDeclaration = AppliedScope = appliedScope IsOwnNamespace = isOwnNamespace } +type FormatStringCheckContext = + { NormalizedSource: string + LineEndPositions: int[] } + /// An abstract type for reporting the results of name resolution and type checking. type ITypecheckResultsSink = abstract NotifyEnvWithScope : range * NameResolutionEnv * AccessorDomain -> unit @@ -1251,6 +1258,7 @@ type ITypecheckResultsSink = abstract NotifyFormatSpecifierLocation : range * int -> unit abstract NotifyOpenDeclaration : OpenDeclaration -> unit abstract CurrentSource : string option + abstract FormatStringCheckContext : FormatStringCheckContext option let (|ValRefOfProp|_|) (pi : PropInfo) = pi.ArbitraryValRef let (|ValRefOfMeth|_|) (mi : MethInfo) = mi.ArbitraryValRef @@ -1299,7 +1307,7 @@ let (|EntityUse|_|) (item: Item) = | Item.DelegateCtor(AbbrevOrAppTy tcref) | Item.FakeInterfaceCtor(AbbrevOrAppTy tcref) -> Some tcref | Item.CtorGroup(_, ctor::_) -> - match ctor.EnclosingType with + match ctor.ApparentEnclosingType with | AbbrevOrAppTy tcref -> Some tcref | _ -> None | _ -> None @@ -1334,17 +1342,27 @@ let (|ActivePatternCaseUse|_|) (item:Item) = | Item.ActivePatternResult(ap, _, idx,_) -> Some (ap.Range, ap.Range, idx) | _ -> None +let tyconRefDefnHash (_g: TcGlobals) (eref1:EntityRef) = + hash eref1.LogicalName + let tyconRefDefnEq g (eref1:EntityRef) (eref2: EntityRef) = - tyconRefEq g eref1 eref2 + tyconRefEq g eref1 eref2 || + // Signature items considered equal to implementation items - || ((eref1.DefinitionRange = eref2.DefinitionRange || eref1.SigRange = eref2.SigRange) && - (eref1.LogicalName = eref2.LogicalName)) + eref1.DefinitionRange <> Range.rangeStartup && eref1.DefinitionRange <> Range.range0 && eref1.DefinitionRange <> Range.rangeCmdArgs && + (eref1.DefinitionRange = eref2.DefinitionRange || eref1.SigRange = eref2.SigRange) && + eref1.LogicalName = eref2.LogicalName + +let valRefDefnHash (_g: TcGlobals) (vref1:ValRef) = + hash vref1.DisplayName let valRefDefnEq g (vref1:ValRef) (vref2: ValRef) = - valRefEq g vref1 vref2 + valRefEq g vref1 vref2 || + // Signature items considered equal to implementation items - || ((vref1.DefinitionRange = vref2.DefinitionRange || vref1.SigRange = vref2.SigRange)) && - (vref1.LogicalName = vref2.LogicalName) + vref1.DefinitionRange <> Range.rangeStartup && vref1.DefinitionRange <> Range.range0 && vref1.DefinitionRange <> Range.rangeCmdArgs && + (vref1.DefinitionRange = vref2.DefinitionRange || vref1.SigRange = vref2.SigRange) && + vref1.LogicalName = vref2.LogicalName let unionCaseRefDefnEq g (uc1:UnionCaseRef) (uc2: UnionCaseRef) = uc1.CaseName = uc2.CaseName && tyconRefDefnEq g uc1.TyconRef uc2.TyconRef @@ -1414,6 +1432,23 @@ let ItemsAreEffectivelyEqual g orig other = | _ -> false +/// Given the Item 'orig' - returns function 'other : Item -> bool', that will yield true if other and orig represents the same item and false - otherwise +let ItemsAreEffectivelyEqualHash (g: TcGlobals) orig = + match orig with + | EntityUse tcref -> tyconRefDefnHash g tcref + | Item.TypeVar (nm,_)-> hash nm + | ValUse vref -> valRefDefnHash g vref + | ActivePatternCaseUse (_, _, idx)-> hash idx + | MethodUse minfo -> minfo.ComputeHashCode() + | PropertyUse pinfo -> pinfo.ComputeHashCode() + | Item.ArgName (id,_, _) -> hash id.idText + | ILFieldUse ilfinfo -> ilfinfo.ComputeHashCode() + | UnionCaseUse ucase -> hash ucase.CaseName + | RecordFieldUse (name, _) -> hash name + | EventUse einfo -> einfo.ComputeHashCode() + | Item.ModuleOrNamespaces (mref :: _) -> hash mref.DefinitionRange + | _ -> 389329 + [] type CapturedNameResolution(p:pos, i:Item, tpinst, io:ItemOccurence, de:DisplayEnv, nre:NameResolutionEnv, ad:AccessorDomain, m:range) = member this.Pos = p @@ -1451,24 +1486,25 @@ type TcSymbolUseData = Range: range } /// Represents container for all name resolutions that were met so far when typechecking some particular file +/// +/// This is a memory-critical data structure - allocations of this data structure and its immediate contents +/// is one of the highest memory long-lived data structures in typical uses of IDEs. Not many of these objects +/// are allocated (one per file), but they are large because the allUsesOfAllSymbols array is large. type TcSymbolUses(g, capturedNameResolutions : ResizeArray, formatSpecifierLocations: (range * int)[]) = // Make sure we only capture the information we really need to report symbol uses - let cnrs = [| for cnr in capturedNameResolutions -> { Item=cnr.Item; ItemOccurence=cnr.ItemOccurence; DisplayEnv=cnr.DisplayEnv; Range=cnr.Range } |] + let allUsesOfSymbols = [| for cnr in capturedNameResolutions -> { Item=cnr.Item; ItemOccurence=cnr.ItemOccurence; DisplayEnv=cnr.DisplayEnv; Range=cnr.Range } |] let capturedNameResolutions = () do ignore capturedNameResolutions // don't capture this! member this.GetUsesOfSymbol(item) = - [| for cnr in cnrs do - if protectAssemblyExploration false (fun () -> ItemsAreEffectivelyEqual g item cnr.Item) then - yield (cnr.ItemOccurence, cnr.DisplayEnv, cnr.Range) |] - - member this.GetAllUsesOfSymbols() = - [| for cnr in cnrs do - yield (cnr.Item, cnr.ItemOccurence, cnr.DisplayEnv, cnr.Range) |] + [| for symbolUse in allUsesOfSymbols do + if protectAssemblyExploration false (fun () -> ItemsAreEffectivelyEqual g item symbolUse.Item) then + yield symbolUse |] - member this.GetFormatSpecifierLocationsAndArity() = formatSpecifierLocations + member this.AllUsesOfSymbols = allUsesOfSymbols + member this.GetFormatSpecifierLocationsAndArity() = formatSpecifierLocations /// An accumulator for the results being emitted into the tcSink. type TcResultsSinkImpl(g, ?source: string) = @@ -1476,22 +1512,43 @@ type TcResultsSinkImpl(g, ?source: string) = let capturedExprTypings = ResizeArray<_>() let capturedNameResolutions = ResizeArray<_>() let capturedFormatSpecifierLocations = ResizeArray<_>() + let capturedNameResolutionIdentifiers = new System.Collections.Generic.HashSet ( { new IEqualityComparer<_> with member __.GetHashCode((p:pos,i)) = p.Line + 101 * p.Column + hash i member __.Equals((p1,i1),(p2,i2)) = posEq p1 p2 && i1 = i2 } ) + + let capturedModulesAndNamespaces = + new System.Collections.Generic.HashSet + ( { new IEqualityComparer with + member __.GetHashCode ((m, _)) = hash m + member __.Equals ((m1, item1), (m2, item2)) = m1 = m2 && ItemsAreEffectivelyEqual g item1 item2 } ) + let capturedMethodGroupResolutions = ResizeArray<_>() - let capturedOpenDeclarations = ResizeArray<_>() + let capturedOpenDeclarations = ResizeArray() let allowedRange (m:range) = not m.IsSynthetic + let formatStringCheckContext = + lazy + source |> Option.map (fun source -> + let source = source.Replace("\r\n", "\n").Replace("\r", "\n") + let positions = + source.Split('\n') + |> Seq.map (fun s -> String.length s + 1) + |> Seq.scan (+) 0 + |> Seq.toArray + { NormalizedSource = source + LineEndPositions = positions }) + member this.GetResolutions() = TcResolutions(capturedEnvs, capturedExprTypings, capturedNameResolutions, capturedMethodGroupResolutions) member this.GetSymbolUses() = TcSymbolUses(g, capturedNameResolutions, capturedFormatSpecifierLocations.ToArray()) - member this.OpenDeclarations = Seq.toList capturedOpenDeclarations + member this.GetOpenDeclarations() = + capturedOpenDeclarations |> Seq.distinctBy (fun x -> x.Range, x.AppliedScope, x.IsOwnNamespace) |> Seq.toArray interface ITypecheckResultsSink with member sink.NotifyEnvWithScope(m,nenv,ad) = @@ -1506,25 +1563,29 @@ type TcResultsSinkImpl(g, ?source: string) = // Desugaring some F# constructs (notably computation expressions with custom operators) // results in duplication of textual variables. So we ensure we never record two name resolutions // for the same identifier at the same location. - if allowedRange m then - let keyOpt = - match item with - | Item.Value vref -> Some (endPos, vref.DisplayName) - | Item.ArgName (id, _, _) -> Some (endPos, id.idText) - | _ -> None - - let alreadyDone = - match keyOpt with - | Some key -> not (capturedNameResolutionIdentifiers.Add key) - | _ -> false - + if allowedRange m then if replace then capturedNameResolutions.RemoveAll(fun cnr -> cnr.Range = m) |> ignore capturedMethodGroupResolutions.RemoveAll(fun cnr -> cnr.Range = m) |> ignore + else + let alreadyDone = + match item with + | Item.ModuleOrNamespaces _ -> + not (capturedModulesAndNamespaces.Add (m, item)) + | _ -> + let keyOpt = + match item with + | Item.Value vref -> Some (endPos, vref.DisplayName) + | Item.ArgName (id, _, _) -> Some (endPos, id.idText) + | _ -> None - if not alreadyDone then - capturedNameResolutions.Add(CapturedNameResolution(endPos,item,tpinst,occurenceType,denv,nenv,ad,m)) - capturedMethodGroupResolutions.Add(CapturedNameResolution(endPos,itemMethodGroup,[],occurenceType,denv,nenv,ad,m)) + match keyOpt with + | Some key -> not (capturedNameResolutionIdentifiers.Add key) + | _ -> false + + if not alreadyDone then + capturedNameResolutions.Add(CapturedNameResolution(endPos,item,tpinst,occurenceType,denv,nenv,ad,m)) + capturedMethodGroupResolutions.Add(CapturedNameResolution(endPos,itemMethodGroup,[],occurenceType,denv,nenv,ad,m)) member sink.NotifyFormatSpecifierLocation(m, numArgs) = capturedFormatSpecifierLocations.Add((m, numArgs)) @@ -1533,7 +1594,8 @@ type TcResultsSinkImpl(g, ?source: string) = capturedOpenDeclarations.Add(openDeclaration) member sink.CurrentSource = source - + + member sink.FormatStringCheckContext = formatStringCheckContext.Value /// An abstract type for reporting the results of name resolution and type checking, and which allows /// temporary suspension and/or redirection of reporting. @@ -1573,10 +1635,10 @@ let CallNameResolutionSinkReplacing (sink:TcResultsSink) (m:range,nenv,item,item | Some sink -> sink.NotifyNameResolution(m.End,item,itemMethodGroup,tpinst,occurenceType,denv,nenv,ad,m,true) /// Report a specific expression typing at a source range -let CallExprHasTypeSink (sink:TcResultsSink) (m:range,nenv,typ,denv,ad) = +let CallExprHasTypeSink (sink:TcResultsSink) (m:range,nenv,ty,denv,ad) = match sink.CurrentSink with | None -> () - | Some sink -> sink.NotifyExprHasType(m.End,typ,denv,nenv,ad,m) + | Some sink -> sink.NotifyExprHasType(m.End,ty,denv,nenv,ad,m) let CallOpenDeclarationSink (sink:TcResultsSink) (openDeclaration: OpenDeclaration) = match sink.CurrentSink with @@ -1597,7 +1659,7 @@ let CheckAllTyparsInferrable amap m item = | Item.Property(_,pinfos) -> pinfos |> List.forall (fun pinfo -> pinfo.IsExtensionMember || - let freeInDeclaringType = freeInType CollectTyparsNoCaching pinfo.EnclosingType + let freeInDeclaringType = freeInType CollectTyparsNoCaching pinfo.ApparentEnclosingType let freeInArgsAndRetType = accFreeInTypes CollectTyparsNoCaching (pinfo.GetParamTypes(amap,m)) (freeInType CollectTyparsNoCaching (pinfo.GetPropertyType(amap,m))) @@ -1608,7 +1670,7 @@ let CheckAllTyparsInferrable amap m item = minfos |> List.forall (fun minfo -> minfo.IsExtensionMember || let fminst = minfo.FormalMethodInst - let freeInDeclaringType = freeInType CollectTyparsNoCaching minfo.EnclosingType + let freeInDeclaringType = freeInType CollectTyparsNoCaching minfo.ApparentEnclosingType let freeInArgsAndRetType = List.foldBack (accFreeInTypes CollectTyparsNoCaching) (minfo.GetParamTypes(amap, m, fminst)) (accFreeInTypes CollectTyparsNoCaching (minfo.GetObjArgTypes(amap, m, fminst)) @@ -1712,14 +1774,14 @@ let CheckForTypeLegitimacyAndMultipleGenericTypeAmbiguities // no explicit type instantiation typeNameResInfo.StaticArgsInfo.HasNoStaticArgsInfo && // some type arguments required on all types (note sorted by typar count above) - tcref.Typars(m).Length > 0 && + not (List.isEmpty (tcref.Typars m)) && // plausible types have different arities (tcrefs |> Seq.distinctBy (fun (_,tcref) -> tcref.Typars(m).Length) |> Seq.length > 1) -> [ for (resInfo,tcref) in tcrefs do let resInfo = resInfo.AddWarning (fun _typarChecker -> errorR(Error(FSComp.SR.nrTypeInstantiationNeededToDisambiguateTypesWithSameName(tcref.DisplayName, tcref.DisplayNameWithStaticParametersAndUnderscoreTypars),m))) yield (resInfo,tcref) ] - | [(resInfo,tcref)] when typeNameResInfo.StaticArgsInfo.HasNoStaticArgsInfo && tcref.Typars(m).Length > 0 && typeNameResInfo.ResolutionFlag = ResolveTypeNamesToTypeRefs -> + | [(resInfo,tcref)] when typeNameResInfo.StaticArgsInfo.HasNoStaticArgsInfo && not (List.isEmpty (tcref.Typars m)) && typeNameResInfo.ResolutionFlag = ResolveTypeNamesToTypeRefs -> let resInfo = resInfo.AddWarning (fun (ResultTyparChecker typarChecker) -> if not (typarChecker()) then @@ -1745,17 +1807,14 @@ let CheckForTypeLegitimacyAndMultipleGenericTypeAmbiguities //------------------------------------------------------------------------- /// Perform name resolution for an identifier which must resolve to be a namespace or module. -let rec ResolveLongIndentAsModuleOrNamespace atMostOne amap m fullyQualified (nenv:NameResolutionEnv) ad (lid:Ident list) = - match lid with - | [] -> NoResultsOrUsefulErrors - - | id :: rest when id.idText = MangledGlobalName -> - if isNil rest then +let rec ResolveLongIndentAsModuleOrNamespace sink atMostOne amap m first fullyQualified (nenv:NameResolutionEnv) ad (id:Ident) (rest:Ident list) isOpenDecl = + if first && id.idText = MangledGlobalName then + match rest with + | [] -> error (Error(FSComp.SR.nrGlobalUsedOnlyAsFirstName(), id.idRange)) - else - ResolveLongIndentAsModuleOrNamespace atMostOne amap m FullyQualified nenv ad rest - - | id :: rest -> + | id2::rest2 -> + ResolveLongIndentAsModuleOrNamespace sink atMostOne amap m false FullyQualified nenv ad id2 rest2 isOpenDecl + else let moduleOrNamespaces = nenv.ModulesAndNamespaces fullyQualified let namespaceNotFound = lazy( let suggestModulesAndNamespaces() = @@ -1782,82 +1841,92 @@ let rec ResolveLongIndentAsModuleOrNamespace atMostOne amap m fullyQualified (ne moduleNotFoundErrorCache <- Some(id.idRange, error) error - match moduleOrNamespaces.TryFind id.idText with - | Some modrefs -> + let notifyNameResolution (modref: ModuleOrNamespaceRef) m = + let item = Item.ModuleOrNamespaces [modref] + let occurence = if isOpenDecl then ItemOccurence.Open else ItemOccurence.Use + CallNameResolutionSink sink (m, nenv, item, item, emptyTyparInst, occurence, nenv.DisplayEnv, ad) + + match moduleOrNamespaces.TryGetValue id.idText with + | true, modrefs -> /// Look through the sub-namespaces and/or modules let rec look depth (modref: ModuleOrNamespaceRef) (mty:ModuleOrNamespaceType) (lid:Ident list) = match lid with | [] -> success (depth,modref,mty) | id :: rest -> - match mty.ModulesAndNamespacesByDemangledName.TryFind id.idText with - | Some mspec -> + match mty.ModulesAndNamespacesByDemangledName.TryGetValue id.idText with + | true, mspec -> let subref = modref.NestedTyconRef mspec if IsEntityAccessible amap m ad subref then + notifyNameResolution subref id.idRange look (depth+1) subref mspec.ModuleOrNamespaceType rest else moduleNotFound modref mty id depth | _ -> moduleNotFound modref mty id depth + modrefs |> CollectResults2 atMostOne (fun modref -> - if IsEntityAccessible amap m ad modref then + if IsEntityAccessible amap m ad modref then + notifyNameResolution modref id.idRange look 1 modref modref.ModuleOrNamespaceType rest else raze (namespaceNotFound.Force())) - | None -> raze (namespaceNotFound.Force()) + | _ -> raze (namespaceNotFound.Force()) -let ResolveLongIndentAsModuleOrNamespaceThen atMostOne amap m fullyQualified (nenv:NameResolutionEnv) ad lid f = - match lid with - | [] -> NoResultsOrUsefulErrors - | id :: rest -> - match ResolveLongIndentAsModuleOrNamespace ResultCollectionSettings.AllResults amap m fullyQualified nenv ad [id] with - | Result modrefs -> - modrefs |> CollectResults2 atMostOne (fun (depth,modref,mty) -> - let resInfo = ResolutionInfo.Empty.AddEntity(id.idRange,modref) - f resInfo (depth+1) id.idRange modref mty rest) - | Exception err -> Exception err +let ResolveLongIndentAsModuleOrNamespaceThen sink atMostOne amap m fullyQualified (nenv:NameResolutionEnv) ad id rest isOpenDecl f = + match ResolveLongIndentAsModuleOrNamespace sink ResultCollectionSettings.AllResults amap m true fullyQualified nenv ad id [] isOpenDecl with + | Result modrefs -> + match rest with + | [] -> error(Error(FSComp.SR.nrUnexpectedEmptyLongId(),id.idRange)) + | id2::rest2 -> + modrefs + |> CollectResults2 atMostOne (fun (depth,modref,mty) -> + let resInfo = ResolutionInfo.Empty.AddEntity(id.idRange,modref) + f resInfo (depth+1) id.idRange modref mty id2 rest2) + | Exception err -> Exception err //------------------------------------------------------------------------- // Bind name used in "new Foo.Bar(...)" constructs //------------------------------------------------------------------------- -let private ResolveObjectConstructorPrim (ncenv:NameResolver) edenv resInfo m ad typ = +let private ResolveObjectConstructorPrim (ncenv:NameResolver) edenv resInfo m ad ty = let g = ncenv.g let amap = ncenv.amap - if isDelegateTy g typ then - success (resInfo,Item.DelegateCtor typ) + if isDelegateTy g ty then + success (resInfo,Item.DelegateCtor ty) else - let ctorInfos = GetIntrinsicConstructorInfosOfType ncenv.InfoReader m typ - if isNil ctorInfos && isInterfaceTy g typ then - success (resInfo, Item.FakeInterfaceCtor typ) + let ctorInfos = GetIntrinsicConstructorInfosOfType ncenv.InfoReader m ty + if isNil ctorInfos && isInterfaceTy g ty then + success (resInfo, Item.FakeInterfaceCtor ty) else let defaultStructCtorInfo = if (not (ctorInfos |> List.exists (fun x -> x.IsNullary)) && - isStructTy g typ && - not (isRecdTy g typ) && - not (isUnionTy g typ)) + isStructTy g ty && + not (isRecdTy g ty) && + not (isUnionTy g ty)) then - [DefaultStructCtor(g,typ)] + [DefaultStructCtor(g,ty)] else [] - if (isNil defaultStructCtorInfo && isNil ctorInfos) || not (isAppTy g typ) then - raze (Error(FSComp.SR.nrNoConstructorsAvailableForType(NicePrint.minimalStringOfType edenv typ),m)) + if (isNil defaultStructCtorInfo && isNil ctorInfos) || (not (isAppTy g ty) && not (isAnyTupleTy g ty)) then + raze (Error(FSComp.SR.nrNoConstructorsAvailableForType(NicePrint.minimalStringOfType edenv ty),m)) else let ctorInfos = ctorInfos |> List.filter (IsMethInfoAccessible amap m ad) - success (resInfo,Item.MakeCtorGroup ((tcrefOfAppTy g typ).LogicalName, (defaultStructCtorInfo@ctorInfos))) + let metadataTy = convertToTypeWithMetadataIfPossible g ty + success (resInfo,Item.MakeCtorGroup ((tcrefOfAppTy g metadataTy).LogicalName, (defaultStructCtorInfo@ctorInfos))) /// Perform name resolution for an identifier which must resolve to be an object constructor. -let ResolveObjectConstructor (ncenv:NameResolver) edenv m ad typ = - ResolveObjectConstructorPrim (ncenv:NameResolver) edenv [] m ad typ |?> (fun (_resInfo,item) -> item) +let ResolveObjectConstructor (ncenv:NameResolver) edenv m ad ty = + ResolveObjectConstructorPrim (ncenv:NameResolver) edenv [] m ad ty |?> (fun (_resInfo,item) -> item) //------------------------------------------------------------------------- // Bind the "." notation (member lookup or lookup in a type) //------------------------------------------------------------------------- /// Query the declared properties of a type (including inherited properties) -let IntrinsicPropInfosOfTypeInScope (infoReader:InfoReader) (optFilter, ad) findFlag m typ = +let IntrinsicPropInfosOfTypeInScope (infoReader:InfoReader) (optFilter, ad) findFlag m ty = let g = infoReader.g let amap = infoReader.amap - let pinfos = GetIntrinsicPropInfoSetsOfType infoReader (optFilter, ad, AllowMultiIntfInstantiations.Yes) findFlag m typ + let pinfos = GetIntrinsicPropInfoSetsOfType infoReader (optFilter, ad, AllowMultiIntfInstantiations.Yes) findFlag m ty let pinfos = pinfos |> ExcludeHiddenOfPropInfos g amap m pinfos @@ -1881,31 +1950,31 @@ let SelectPropInfosFromExtMembers (infoReader:InfoReader,ad,optFilter) declaring propCollector.Close() /// Query the available extension properties of a type (including extension properties for inherited types) -let ExtensionPropInfosOfTypeInScope (infoReader:InfoReader) (nenv: NameResolutionEnv) (optFilter, ad) m typ = +let ExtensionPropInfosOfTypeInScope (infoReader:InfoReader) (nenv: NameResolutionEnv) (optFilter, ad) m ty = let g = infoReader.g let extMemsFromHierarchy = - infoReader.GetEntireTypeHierachy(AllowMultiIntfInstantiations.Yes,m,typ) |> List.collect (fun typ -> - if (isAppTy g typ) then - let tcref = tcrefOfAppTy g typ + infoReader.GetEntireTypeHierachy(AllowMultiIntfInstantiations.Yes,m,ty) |> List.collect (fun ty -> + if isAppTy g ty then + let tcref = tcrefOfAppTy g ty let extMemInfos = nenv.eIndexedExtensionMembers.Find tcref - SelectPropInfosFromExtMembers (infoReader,ad,optFilter) typ m extMemInfos + SelectPropInfosFromExtMembers (infoReader,ad,optFilter) ty m extMemInfos else []) - let extMemsDangling = SelectPropInfosFromExtMembers (infoReader,ad,optFilter) typ m nenv.eUnindexedExtensionMembers + let extMemsDangling = SelectPropInfosFromExtMembers (infoReader,ad,optFilter) ty m nenv.eUnindexedExtensionMembers extMemsDangling @ extMemsFromHierarchy /// Get all the available properties of a type (both intrinsic and extension) -let AllPropInfosOfTypeInScope infoReader nenv (optFilter, ad) findFlag m typ = - IntrinsicPropInfosOfTypeInScope infoReader (optFilter, ad) findFlag m typ - @ ExtensionPropInfosOfTypeInScope infoReader nenv (optFilter, ad) m typ +let AllPropInfosOfTypeInScope infoReader nenv (optFilter, ad) findFlag m ty = + IntrinsicPropInfosOfTypeInScope infoReader (optFilter, ad) findFlag m ty + @ ExtensionPropInfosOfTypeInScope infoReader nenv (optFilter, ad) m ty /// Get the available methods of a type (both declared and inherited) -let IntrinsicMethInfosOfType (infoReader:InfoReader) (optFilter,ad,allowMultiIntfInst) findFlag m typ = +let IntrinsicMethInfosOfType (infoReader:InfoReader) (optFilter,ad,allowMultiIntfInst) findFlag m ty = let g = infoReader.g let amap = infoReader.amap - let minfos = GetIntrinsicMethInfoSetsOfType infoReader (optFilter,ad,allowMultiIntfInst) findFlag m typ + let minfos = GetIntrinsicMethInfoSetsOfType infoReader (optFilter,ad,allowMultiIntfInst) findFlag m ty let minfos = minfos |> ExcludeHiddenOfMethInfos g amap m minfos @@ -1944,22 +2013,22 @@ let SelectMethInfosFromExtMembers (infoReader:InfoReader) optFilter apparentTy m ] /// Query the available extension properties of a methods (including extension methods for inherited types) -let ExtensionMethInfosOfTypeInScope (infoReader:InfoReader) (nenv: NameResolutionEnv) optFilter m typ = - let extMemsDangling = SelectMethInfosFromExtMembers infoReader optFilter typ m nenv.eUnindexedExtensionMembers +let ExtensionMethInfosOfTypeInScope (infoReader:InfoReader) (nenv: NameResolutionEnv) optFilter m ty = + let extMemsDangling = SelectMethInfosFromExtMembers infoReader optFilter ty m nenv.eUnindexedExtensionMembers let extMemsFromHierarchy = - infoReader.GetEntireTypeHierachy(AllowMultiIntfInstantiations.Yes,m,typ) |> List.collect (fun typ -> + infoReader.GetEntireTypeHierachy(AllowMultiIntfInstantiations.Yes,m,ty) |> List.collect (fun ty -> let g = infoReader.g - if (isAppTy g typ) then - let tcref = tcrefOfAppTy g typ + if isAppTy g ty then + let tcref = tcrefOfAppTy g ty let extValRefs = nenv.eIndexedExtensionMembers.Find tcref - SelectMethInfosFromExtMembers infoReader optFilter typ m extValRefs + SelectMethInfosFromExtMembers infoReader optFilter ty m extValRefs else []) extMemsDangling @ extMemsFromHierarchy /// Get all the available methods of a type (both intrinsic and extension) -let AllMethInfosOfTypeInScope infoReader nenv (optFilter,ad) findFlag m typ = - IntrinsicMethInfosOfType infoReader (optFilter,ad,AllowMultiIntfInstantiations.Yes) findFlag m typ - @ ExtensionMethInfosOfTypeInScope infoReader nenv optFilter m typ +let AllMethInfosOfTypeInScope infoReader nenv (optFilter,ad) findFlag m ty = + IntrinsicMethInfosOfType infoReader (optFilter,ad,AllowMultiIntfInstantiations.Yes) findFlag m ty + @ ExtensionMethInfosOfTypeInScope infoReader nenv optFilter m ty /// Used to report an error condition where name resolution failed due to an indeterminate type @@ -1976,21 +2045,21 @@ type LookupKind = /// Try to find a union case of a type, with the given name -let TryFindUnionCaseOfType g typ nm = - if isAppTy g typ then - let tcref,tinst = destAppTy g typ +let TryFindUnionCaseOfType g ty nm = + match tryAppTy g ty with + | ValueSome(tcref,tinst) -> match tcref.GetUnionCaseByName nm with - | None -> None - | Some ucase -> Some(UnionCaseInfo(tinst,tcref.MakeNestedUnionCaseRef ucase)) - else - None + | None -> ValueNone + | Some ucase -> ValueSome(UnionCaseInfo(tinst,tcref.MakeNestedUnionCaseRef ucase)) + | _ -> + ValueNone let CoreDisplayName(pinfo:PropInfo) = match pinfo with | FSProp(_,_,_,Some set) -> set.CoreDisplayName | FSProp(_,_,Some get,_) -> get.CoreDisplayName | FSProp _ -> failwith "unexpected (property must have either getter or setter)" - | ILProp(_,ILPropInfo(_,def)) -> def.Name + | ILProp(ILPropInfo(_,def)) -> def.Name #if !NO_EXTENSIONTYPING | ProvidedProp(_,pi,m) -> pi.PUntaint((fun pi -> pi.Name), m) #endif @@ -1999,8 +2068,8 @@ let DecodeFSharpEvent (pinfos:PropInfo list) ad g (ncenv:NameResolver) m = match pinfos with | [pinfo] when pinfo.IsFSharpEventProperty -> let nm = CoreDisplayName(pinfo) - let minfos1 = GetImmediateIntrinsicMethInfosOfType (Some("add_"+nm),ad) g ncenv.amap m pinfo.EnclosingType - let minfos2 = GetImmediateIntrinsicMethInfosOfType (Some("remove_"+nm),ad) g ncenv.amap m pinfo.EnclosingType + let minfos1 = GetImmediateIntrinsicMethInfosOfType (Some("add_"+nm),ad) g ncenv.amap m pinfo.ApparentEnclosingType + let minfos2 = GetImmediateIntrinsicMethInfosOfType (Some("remove_"+nm),ad) g ncenv.amap m pinfo.ApparentEnclosingType match minfos1,minfos2 with | [FSMeth(_,_,addValRef,_)],[FSMeth(_,_,removeValRef,_)] -> // FOUND PROPERTY-AS-EVENT AND CORRESPONDING ADD/REMOVE METHODS @@ -2015,10 +2084,10 @@ let DecodeFSharpEvent (pinfos:PropInfo list) ad g (ncenv:NameResolver) m = None /// Returns all record label names for the given type. -let GetRecordLabelsForType g nenv typ = +let GetRecordLabelsForType g nenv ty = let result = HashSet() - if isRecdTy g typ then - let typeName = NicePrint.minimalStringOfType nenv.eDisplayEnv typ + if isRecdTy g ty then + let typeName = NicePrint.minimalStringOfType nenv.eDisplayEnv ty for KeyValue(k, v) in nenv.eFieldLabels do if v |> List.exists (fun r -> r.TyconRef.DisplayName = typeName) then result.Add k |> ignore @@ -2026,155 +2095,156 @@ let GetRecordLabelsForType g nenv typ = // REVIEW: this shows up on performance logs. Consider for example endless resolutions of "List.map" to // the empty set of results, or "x.Length" for a list or array type. This indicates it could be worth adding a cache here. -let rec ResolveLongIdentInTypePrim (ncenv:NameResolver) nenv lookupKind (resInfo:ResolutionInfo) depth m ad (lid:Ident list) findFlag (typeNameResInfo: TypeNameResolutionInfo) typ = +let rec ResolveLongIdentInTypePrim (ncenv:NameResolver) nenv lookupKind (resInfo:ResolutionInfo) depth m ad (id:Ident) (rest:Ident list) findFlag (typeNameResInfo: TypeNameResolutionInfo) ty = let g = ncenv.g - match lid with - | [] -> error(InternalError("ResolveLongIdentInTypePrim",m)) - | id :: rest -> - let m = unionRanges m id.idRange - let nm = id.idText // used to filter the searches of the tables - let optFilter = Some nm // used to filter the searches of the tables - let contentsSearchAccessible = - let unionCaseSearch = - match lookupKind with - | LookupKind.Expr | LookupKind.Pattern -> TryFindUnionCaseOfType g typ nm - | _ -> None - - // Lookup: datatype constructors take precedence - match unionCaseSearch with - | Some ucase -> - OneResult (success(resInfo,Item.UnionCase(ucase,false),rest)) - | None -> - let isLookUpExpr = lookupKind = LookupKind.Expr - match TryFindIntrinsicNamedItemOfType ncenv.InfoReader (nm,ad) findFlag m typ with - | Some (PropertyItem psets) when isLookUpExpr -> - let pinfos = psets |> ExcludeHiddenOfPropInfos g ncenv.amap m + let m = unionRanges m id.idRange + let nm = id.idText // used to filter the searches of the tables + let optFilter = Some nm // used to filter the searches of the tables + let contentsSearchAccessible = + let unionCaseSearch = + match lookupKind with + | LookupKind.Expr | LookupKind.Pattern -> TryFindUnionCaseOfType g ty nm + | _ -> ValueNone + + // Lookup: datatype constructors take precedence + match unionCaseSearch with + | ValueSome ucase -> + OneResult (success(resInfo,Item.UnionCase(ucase,false),rest)) + | _ -> + let isLookUpExpr = lookupKind = LookupKind.Expr + match TryFindIntrinsicNamedItemOfType ncenv.InfoReader (nm,ad) findFlag m ty with + | Some (PropertyItem psets) when isLookUpExpr -> + let pinfos = psets |> ExcludeHiddenOfPropInfos g ncenv.amap m - // fold the available extension members into the overload resolution - let extensionPropInfos = ExtensionPropInfosOfTypeInScope ncenv.InfoReader nenv (optFilter,ad) m typ + // fold the available extension members into the overload resolution + let extensionPropInfos = ExtensionPropInfosOfTypeInScope ncenv.InfoReader nenv (optFilter,ad) m ty - // make sure to keep the intrinsic pinfos before the extension pinfos in the list, - // since later on this logic is used when giving preference to intrinsic definitions - match DecodeFSharpEvent (pinfos@extensionPropInfos) ad g ncenv m with - | Some x -> success [resInfo, x, rest] - | None -> raze (UndefinedName (depth,FSComp.SR.undefinedNameFieldConstructorOrMember, id,NoSuggestions)) - | Some(MethodItem msets) when isLookUpExpr -> - let minfos = msets |> ExcludeHiddenOfMethInfos g ncenv.amap m + // make sure to keep the intrinsic pinfos before the extension pinfos in the list, + // since later on this logic is used when giving preference to intrinsic definitions + match DecodeFSharpEvent (pinfos@extensionPropInfos) ad g ncenv m with + | Some x -> success [resInfo, x, rest] + | None -> raze (UndefinedName (depth,FSComp.SR.undefinedNameFieldConstructorOrMember, id,NoSuggestions)) + | Some(MethodItem msets) when isLookUpExpr -> + let minfos = msets |> ExcludeHiddenOfMethInfos g ncenv.amap m - // fold the available extension members into the overload resolution - let extensionMethInfos = ExtensionMethInfosOfTypeInScope ncenv.InfoReader nenv optFilter m typ + // fold the available extension members into the overload resolution + let extensionMethInfos = ExtensionMethInfosOfTypeInScope ncenv.InfoReader nenv optFilter m ty - success [resInfo,Item.MakeMethGroup (nm,minfos@extensionMethInfos),rest] - | Some (ILFieldItem (finfo:: _)) when (match lookupKind with LookupKind.Expr | LookupKind.Pattern -> true | _ -> false) -> - success [resInfo,Item.ILField finfo,rest] + success [resInfo,Item.MakeMethGroup (nm,minfos@extensionMethInfos),rest] + | Some (ILFieldItem (finfo:: _)) when (match lookupKind with LookupKind.Expr | LookupKind.Pattern -> true | _ -> false) -> + success [resInfo,Item.ILField finfo,rest] - | Some (EventItem (einfo :: _)) when isLookUpExpr -> - success [resInfo,Item.Event einfo,rest] - | Some (RecdFieldItem (rfinfo)) when (match lookupKind with LookupKind.Expr | LookupKind.RecdField | LookupKind.Pattern -> true | _ -> false) -> - success [resInfo,Item.RecdField(rfinfo),rest] - | _ -> + | Some (EventItem (einfo :: _)) when isLookUpExpr -> + success [resInfo,Item.Event einfo,rest] + | Some (RecdFieldItem (rfinfo)) when (match lookupKind with LookupKind.Expr | LookupKind.RecdField | LookupKind.Pattern -> true | _ -> false) -> + success [resInfo,Item.RecdField(rfinfo),rest] + | _ -> - let pinfos = ExtensionPropInfosOfTypeInScope ncenv.InfoReader nenv (optFilter, ad) m typ - if not (isNil pinfos) && isLookUpExpr then OneResult(success (resInfo,Item.Property (nm,pinfos),rest)) else - let minfos = ExtensionMethInfosOfTypeInScope ncenv.InfoReader nenv optFilter m typ + let pinfos = ExtensionPropInfosOfTypeInScope ncenv.InfoReader nenv (optFilter, ad) m ty + if not (isNil pinfos) && isLookUpExpr then OneResult(success (resInfo,Item.Property (nm,pinfos),rest)) else + let minfos = ExtensionMethInfosOfTypeInScope ncenv.InfoReader nenv optFilter m ty - if not (isNil minfos) && isLookUpExpr then - success [resInfo,Item.MakeMethGroup (nm,minfos),rest] - elif isTyparTy g typ then raze (IndeterminateType(unionRanges m id.idRange)) - else NoResultsOrUsefulErrors + if not (isNil minfos) && isLookUpExpr then + success [resInfo,Item.MakeMethGroup (nm,minfos),rest] + elif isTyparTy g ty then raze (IndeterminateType(unionRanges m id.idRange)) + else NoResultsOrUsefulErrors - match contentsSearchAccessible with - | Result res when not (isNil res) -> contentsSearchAccessible - | Exception _ -> contentsSearchAccessible - | _ -> + match contentsSearchAccessible with + | Result res when not (isNil res) -> contentsSearchAccessible + | Exception _ -> contentsSearchAccessible + | _ -> - let nestedSearchAccessible = - let nestedTypes = GetNestedTypesOfType (ad, ncenv, Some nm, (if isNil rest then typeNameResInfo.StaticArgsInfo else TypeNameResolutionStaticArgsInfo.Indefinite), true, m) typ - if isNil rest then - if isNil nestedTypes then - NoResultsOrUsefulErrors - else - match typeNameResInfo.ResolutionFlag with - | ResolveTypeNamesToCtors -> - nestedTypes - |> CollectAtMostOneResult (ResolveObjectConstructorPrim ncenv nenv.eDisplayEnv resInfo m ad) - |> MapResults (fun (resInfo,item) -> (resInfo,item,[])) - | ResolveTypeNamesToTypeRefs -> - OneSuccess (resInfo,Item.Types (nm,nestedTypes),rest) + let nestedSearchAccessible = + match rest with + | [] -> + let nestedTypes = GetNestedTypesOfType (ad, ncenv, Some nm, typeNameResInfo.StaticArgsInfo, true, m) ty + if isNil nestedTypes then + NoResultsOrUsefulErrors else - ResolveLongIdentInNestedTypes ncenv nenv lookupKind resInfo (depth+1) id m ad rest findFlag typeNameResInfo nestedTypes - - match nestedSearchAccessible with - | Result res when not (isNil res) -> nestedSearchAccessible - | _ -> - let suggestMembers() = - let suggestions1 = - ExtensionPropInfosOfTypeInScope ncenv.InfoReader nenv (None, ad) m typ - |> List.map (fun p -> p.PropertyName) + match typeNameResInfo.ResolutionFlag with + | ResolveTypeNamesToCtors -> + nestedTypes + |> CollectAtMostOneResult (ResolveObjectConstructorPrim ncenv nenv.eDisplayEnv resInfo m ad) + |> MapResults (fun (resInfo,item) -> (resInfo,item,[])) + | ResolveTypeNamesToTypeRefs -> + OneSuccess (resInfo,Item.Types (nm,nestedTypes),rest) + | id2::rest2 -> + let nestedTypes = GetNestedTypesOfType (ad, ncenv, Some nm, TypeNameResolutionStaticArgsInfo.Indefinite, true, m) ty + ResolveLongIdentInNestedTypes ncenv nenv lookupKind resInfo (depth+1) id m ad id2 rest2 findFlag typeNameResInfo nestedTypes + + match nestedSearchAccessible with + | Result res when not (isNil res) -> nestedSearchAccessible + | _ -> + let suggestMembers() = + let suggestions1 = + ExtensionPropInfosOfTypeInScope ncenv.InfoReader nenv (None, ad) m ty + |> List.map (fun p -> p.PropertyName) - let suggestions2 = - ExtensionMethInfosOfTypeInScope ncenv.InfoReader nenv None m typ - |> List.map (fun m -> m.DisplayName) - - let suggestions3 = - GetIntrinsicPropInfosOfType ncenv.InfoReader (None, ad, AllowMultiIntfInstantiations.No) findFlag m typ - |> List.map (fun p -> p.PropertyName) - - let suggestions4 = - GetIntrinsicMethInfosOfType ncenv.InfoReader (None, ad, AllowMultiIntfInstantiations.No) findFlag m typ - |> List.filter (fun m -> not m.IsClassConstructor && not m.IsConstructor) - |> List.map (fun m -> m.DisplayName) - - let suggestions5 = GetRecordLabelsForType g nenv typ - - let suggestions6 = - match lookupKind with - | LookupKind.Expr | LookupKind.Pattern -> - if isAppTy g typ then - let tcref,_ = destAppTy g typ - tcref.UnionCasesArray - |> Array.map (fun uc -> uc.DisplayName) - else - [||] - | _ -> [||] + let suggestions2 = + ExtensionMethInfosOfTypeInScope ncenv.InfoReader nenv None m ty + |> List.map (fun m -> m.DisplayName) + + let suggestions3 = + GetIntrinsicPropInfosOfType ncenv.InfoReader (None, ad, AllowMultiIntfInstantiations.No) findFlag m ty + |> List.map (fun p -> p.PropertyName) + + let suggestions4 = + GetIntrinsicMethInfosOfType ncenv.InfoReader (None, ad, AllowMultiIntfInstantiations.No) findFlag m ty + |> List.filter (fun m -> not m.IsClassConstructor && not m.IsConstructor) + |> List.map (fun m -> m.DisplayName) + + let suggestions5 = GetRecordLabelsForType g nenv ty + + let suggestions6 = + match lookupKind with + | LookupKind.Expr | LookupKind.Pattern -> + if isAppTy g ty then + let tcref = tcrefOfAppTy g ty + tcref.UnionCasesArray + |> Array.map (fun uc -> uc.DisplayName) + else + [||] + | _ -> [||] - [ yield! suggestions1 - yield! suggestions2 - yield! suggestions3 - yield! suggestions4 - yield! suggestions5 - yield! suggestions6 ] - |> HashSet - - raze (UndefinedName (depth,FSComp.SR.undefinedNameFieldConstructorOrMember, id, suggestMembers)) + [ yield! suggestions1 + yield! suggestions2 + yield! suggestions3 + yield! suggestions4 + yield! suggestions5 + yield! suggestions6 ] + |> HashSet + + raze (UndefinedName (depth,FSComp.SR.undefinedNameFieldConstructorOrMember, id, suggestMembers)) -and ResolveLongIdentInNestedTypes (ncenv:NameResolver) nenv lookupKind resInfo depth id m ad lid findFlag typeNameResInfo typs = - typs |> CollectAtMostOneResult (fun typ -> - let resInfo = if isAppTy ncenv.g typ then resInfo.AddEntity(id.idRange,tcrefOfAppTy ncenv.g typ) else resInfo - ResolveLongIdentInTypePrim ncenv nenv lookupKind resInfo depth m ad lid findFlag typeNameResInfo typ +and ResolveLongIdentInNestedTypes (ncenv:NameResolver) nenv lookupKind resInfo depth id m ad (id2:Ident) (rest:Ident list) findFlag typeNameResInfo tys = + tys + |> CollectAtMostOneResult (fun ty -> + let resInfo = if isAppTy ncenv.g ty then resInfo.AddEntity(id.idRange,tcrefOfAppTy ncenv.g ty) else resInfo + ResolveLongIdentInTypePrim ncenv nenv lookupKind resInfo depth m ad id2 rest findFlag typeNameResInfo ty |> AtMostOneResult m) /// Resolve a long identifier using type-qualified name resolution. -let ResolveLongIdentInType sink ncenv nenv lookupKind m ad lid findFlag typeNameResInfo typ = - let resInfo,item,rest = - ResolveLongIdentInTypePrim (ncenv:NameResolver) nenv lookupKind ResolutionInfo.Empty 0 m ad lid findFlag typeNameResInfo typ +let ResolveLongIdentInType sink ncenv nenv lookupKind m ad id findFlag typeNameResInfo ty = + let resInfo,item,rest = + ResolveLongIdentInTypePrim (ncenv:NameResolver) nenv lookupKind ResolutionInfo.Empty 0 m ad id [] findFlag typeNameResInfo ty |> AtMostOneResult m |> ForceRaise + ResolutionInfo.SendEntityPathToSink (sink,ncenv,nenv,ItemOccurence.UseInType,ad,resInfo,ResultTyparChecker(fun () -> CheckAllTyparsInferrable ncenv.amap m item)) item,rest -let private ResolveLongIdentInTyconRef (ncenv:NameResolver) nenv lookupKind resInfo depth m ad lid typeNameResInfo tcref = +let private ResolveLongIdentInTyconRef (ncenv:NameResolver) nenv lookupKind resInfo depth m ad id rest typeNameResInfo tcref = #if !NO_EXTENSIONTYPING // No dotting through type generators to get to a member! CheckForDirectReferenceToGeneratedType (tcref, PermitDirectReferenceToGeneratedType.No, m) #endif - let typ = FreshenTycon ncenv m tcref - typ |> ResolveLongIdentInTypePrim ncenv nenv lookupKind resInfo depth m ad lid IgnoreOverrides typeNameResInfo + let ty = FreshenTycon ncenv m tcref + ty |> ResolveLongIdentInTypePrim ncenv nenv lookupKind resInfo depth m ad id rest IgnoreOverrides typeNameResInfo -let private ResolveLongIdentInTyconRefs atMostOne (ncenv:NameResolver) nenv lookupKind depth m ad lid typeNameResInfo idRange tcrefs = +let private ResolveLongIdentInTyconRefs atMostOne (ncenv:NameResolver) nenv lookupKind depth m ad id rest typeNameResInfo idRange tcrefs = tcrefs |> CollectResults2 atMostOne (fun (resInfo:ResolutionInfo,tcref) -> let resInfo = resInfo.AddEntity(idRange,tcref) - tcref |> ResolveLongIdentInTyconRef ncenv nenv lookupKind resInfo depth m ad lid typeNameResInfo |> AtMostOneResult m) + tcref |> ResolveLongIdentInTyconRef ncenv nenv lookupKind resInfo depth m ad id rest typeNameResInfo |> AtMostOneResult m) //------------------------------------------------------------------------- // ResolveExprLongIdentInModuleOrNamespace @@ -2184,116 +2254,112 @@ let (|AccessibleEntityRef|_|) amap m ad (modref: ModuleOrNamespaceRef) mspec = let eref = modref.NestedTyconRef mspec if IsEntityAccessible amap m ad eref then Some eref else None -let rec ResolveExprLongIdentInModuleOrNamespace (ncenv:NameResolver) nenv (typeNameResInfo: TypeNameResolutionInfo) ad resInfo depth m modref (mty:ModuleOrNamespaceType) (lid :Ident list) = +let rec ResolveExprLongIdentInModuleOrNamespace (ncenv:NameResolver) nenv (typeNameResInfo: TypeNameResolutionInfo) ad resInfo depth m modref (mty:ModuleOrNamespaceType) (id:Ident) (rest :Ident list) = // resInfo records the modules or namespaces actually relevant to a resolution - match lid with - | [] -> raze(Error(FSComp.SR.nrUnexpectedEmptyLongId(),m)) - | id :: rest -> - let m = unionRanges m id.idRange - match mty.AllValsByLogicalName.TryFind(id.idText) with - | Some vspec when IsValAccessible ad (mkNestedValRef modref vspec) -> - success(resInfo,Item.Value (mkNestedValRef modref vspec),rest) - | _-> - match mty.ExceptionDefinitionsByDemangledName.TryFind(id.idText) with - | Some excon when IsTyconReprAccessible ncenv.amap m ad (modref.NestedTyconRef excon) -> - success (resInfo,Item.ExnCase (modref.NestedTyconRef excon),rest) + let m = unionRanges m id.idRange + match mty.AllValsByLogicalName.TryGetValue id.idText with + | true, vspec when IsValAccessible ad (mkNestedValRef modref vspec) -> + success(resInfo,Item.Value (mkNestedValRef modref vspec),rest) + | _-> + match mty.ExceptionDefinitionsByDemangledName.TryGetValue id.idText with + | true, excon when IsTyconReprAccessible ncenv.amap m ad (modref.NestedTyconRef excon) -> + success (resInfo,Item.ExnCase (modref.NestedTyconRef excon),rest) + | _ -> + // Something in a discriminated union without RequireQualifiedAccess attribute? + let unionSearch,hasRequireQualifiedAccessAttribute = + match TryFindTypeWithUnionCase modref id with + | Some tycon when IsTyconReprAccessible ncenv.amap m ad (modref.NestedTyconRef tycon) -> + let ucref = mkUnionCaseRef (modref.NestedTyconRef tycon) id.idText + let ucinfo = FreshenUnionCaseRef ncenv m ucref + let hasRequireQualifiedAccessAttribute = HasFSharpAttribute ncenv.g ncenv.g.attrib_RequireQualifiedAccessAttribute tycon.Attribs + success [resInfo,Item.UnionCase(ucinfo,hasRequireQualifiedAccessAttribute),rest],hasRequireQualifiedAccessAttribute + | _ -> NoResultsOrUsefulErrors,false + + match unionSearch with + | Result (res :: _) when not hasRequireQualifiedAccessAttribute -> success res | _ -> - // Something in a discriminated union without RequireQualifiedAccess attribute? - let unionSearch,hasRequireQualifiedAccessAttribute = - match TryFindTypeWithUnionCase modref id with - | Some tycon when IsTyconReprAccessible ncenv.amap m ad (modref.NestedTyconRef tycon) -> - let ucref = mkUnionCaseRef (modref.NestedTyconRef tycon) id.idText - let ucinfo = FreshenUnionCaseRef ncenv m ucref - let hasRequireQualifiedAccessAttribute = HasFSharpAttribute ncenv.g ncenv.g.attrib_RequireQualifiedAccessAttribute tycon.Attribs - success [resInfo,Item.UnionCase(ucinfo,hasRequireQualifiedAccessAttribute),rest],hasRequireQualifiedAccessAttribute - | _ -> NoResultsOrUsefulErrors,false - - match unionSearch with - | Result (res :: _) when not hasRequireQualifiedAccessAttribute -> success res - | _ -> - // Something in a type? - let tyconSearch = - let tcrefs = LookupTypeNameInEntityMaybeHaveArity (ncenv.amap, id.idRange, ad, id.idText, (if isNil rest then typeNameResInfo.StaticArgsInfo else TypeNameResolutionStaticArgsInfo.Indefinite), modref) - if isNil tcrefs then NoResultsOrUsefulErrors else - let tcrefs = tcrefs |> List.map (fun tcref -> (resInfo,tcref)) - if not (isNil rest) then - let tcrefs = CheckForTypeLegitimacyAndMultipleGenericTypeAmbiguities (tcrefs, TypeNameResolutionInfo (ResolveTypeNamesToTypeRefs,TypeNameResolutionStaticArgsInfo.Indefinite), PermitDirectReferenceToGeneratedType.No, unionRanges m id.idRange) - ResolveLongIdentInTyconRefs ResultCollectionSettings.AtMostOneResult ncenv nenv LookupKind.Expr (depth+1) m ad rest typeNameResInfo id.idRange tcrefs - // Check if we've got some explicit type arguments - else - let tcrefs = CheckForTypeLegitimacyAndMultipleGenericTypeAmbiguities (tcrefs, typeNameResInfo, PermitDirectReferenceToGeneratedType.No, unionRanges m id.idRange) - match typeNameResInfo.ResolutionFlag with - | ResolveTypeNamesToTypeRefs -> - success [ for (resInfo,tcref) in tcrefs do - let typ = FreshenTycon ncenv m tcref - let item = (resInfo,Item.Types(id.idText,[typ]),[]) - yield item ] - | ResolveTypeNamesToCtors -> - tcrefs - |> List.map (fun (resInfo, tcref) -> resInfo, FreshenTycon ncenv m tcref) - |> CollectAtMostOneResult (fun (resInfo,typ) -> ResolveObjectConstructorPrim ncenv nenv.eDisplayEnv resInfo id.idRange ad typ) - |> MapResults (fun (resInfo,item) -> (resInfo,item,[])) - - match tyconSearch with - | Result (res :: _) -> success res + // Something in a type? + let tyconSearch = + let tcrefs = LookupTypeNameInEntityMaybeHaveArity (ncenv.amap, id.idRange, ad, id.idText, (if isNil rest then typeNameResInfo.StaticArgsInfo else TypeNameResolutionStaticArgsInfo.Indefinite), modref) + if isNil tcrefs then NoResultsOrUsefulErrors else + let tcrefs = tcrefs |> List.map (fun tcref -> (resInfo,tcref)) + match rest with + | id2::rest2 -> + let tcrefs = CheckForTypeLegitimacyAndMultipleGenericTypeAmbiguities (tcrefs, TypeNameResolutionInfo (ResolveTypeNamesToTypeRefs,TypeNameResolutionStaticArgsInfo.Indefinite), PermitDirectReferenceToGeneratedType.No, unionRanges m id.idRange) + ResolveLongIdentInTyconRefs ResultCollectionSettings.AtMostOneResult ncenv nenv LookupKind.Expr (depth+1) m ad id2 rest2 typeNameResInfo id.idRange tcrefs + // Check if we've got some explicit type arguments | _ -> + let tcrefs = CheckForTypeLegitimacyAndMultipleGenericTypeAmbiguities (tcrefs, typeNameResInfo, PermitDirectReferenceToGeneratedType.No, unionRanges m id.idRange) + match typeNameResInfo.ResolutionFlag with + | ResolveTypeNamesToTypeRefs -> + success [ for (resInfo,tcref) in tcrefs do + let ty = FreshenTycon ncenv m tcref + let item = (resInfo,Item.Types(id.idText,[ty]),[]) + yield item ] + | ResolveTypeNamesToCtors -> + tcrefs + |> List.map (fun (resInfo, tcref) -> resInfo, FreshenTycon ncenv m tcref) + |> CollectAtMostOneResult (fun (resInfo,ty) -> ResolveObjectConstructorPrim ncenv nenv.eDisplayEnv resInfo id.idRange ad ty) + |> MapResults (fun (resInfo,item) -> (resInfo,item,[])) + + + // Something in a sub-namespace or sub-module + let moduleSearch() = + match rest with + | id2::rest2 -> + match mty.ModulesAndNamespacesByDemangledName.TryGetValue id.idText with + | true, AccessibleEntityRef ncenv.amap m ad modref submodref -> + let resInfo = resInfo.AddEntity(id.idRange,submodref) - // Something in a sub-namespace or sub-module - let moduleSearch = - if not (isNil rest) then - match mty.ModulesAndNamespacesByDemangledName.TryFind(id.idText) with - | Some(AccessibleEntityRef ncenv.amap m ad modref submodref) -> - let resInfo = resInfo.AddEntity(id.idRange,submodref) - - OneResult (ResolveExprLongIdentInModuleOrNamespace ncenv nenv typeNameResInfo ad resInfo (depth+1) m submodref submodref.ModuleOrNamespaceType rest) - | _ -> - NoResultsOrUsefulErrors - else + OneResult (ResolveExprLongIdentInModuleOrNamespace ncenv nenv typeNameResInfo ad resInfo (depth+1) m submodref submodref.ModuleOrNamespaceType id2 rest2) + | _ -> NoResultsOrUsefulErrors + | _ -> + NoResultsOrUsefulErrors + + match tyconSearch +++ moduleSearch +++ (fun _ -> unionSearch) with + | Result [] -> + let suggestPossibleTypesAndNames() = + let types = + modref.ModuleOrNamespaceType.AllEntities + |> Seq.filter (fun e -> IsEntityAccessible ncenv.amap m ad (modref.NestedTyconRef e)) + |> Seq.map (fun e -> e.DisplayName) - match tyconSearch +++ moduleSearch +++ unionSearch with - | Result [] -> - let suggestPossibleTypesAndNames() = - let types = - modref.ModuleOrNamespaceType.AllEntities - |> Seq.filter (fun e -> IsEntityAccessible ncenv.amap m ad (modref.NestedTyconRef e)) - |> Seq.map (fun e -> e.DisplayName) - - let submodules = - mty.ModulesAndNamespacesByDemangledName - |> Seq.filter (fun kv -> IsEntityAccessible ncenv.amap m ad (modref.NestedTyconRef kv.Value)) - |> Seq.map (fun e -> e.Value.DisplayName) + let submodules = + mty.ModulesAndNamespacesByDemangledName + |> Seq.filter (fun kv -> IsEntityAccessible ncenv.amap m ad (modref.NestedTyconRef kv.Value)) + |> Seq.map (fun e -> e.Value.DisplayName) - let unions = - modref.ModuleOrNamespaceType.AllEntities - |> Seq.collect (fun tycon -> - let hasRequireQualifiedAccessAttribute = HasFSharpAttribute ncenv.g ncenv.g.attrib_RequireQualifiedAccessAttribute tycon.Attribs - if hasRequireQualifiedAccessAttribute then - [||] - else - tycon.UnionCasesArray) - |> Seq.map (fun uc -> uc.DisplayName) - - let vals = - modref.ModuleOrNamespaceType.AllValsByLogicalName - |> Seq.filter (fun e -> IsValAccessible ad (mkNestedValRef modref e.Value)) - |> Seq.map (fun e -> e.Value.DisplayName) + let unions = + modref.ModuleOrNamespaceType.AllEntities + |> Seq.collect (fun tycon -> + let hasRequireQualifiedAccessAttribute = HasFSharpAttribute ncenv.g ncenv.g.attrib_RequireQualifiedAccessAttribute tycon.Attribs + if hasRequireQualifiedAccessAttribute then + [||] + else + tycon.UnionCasesArray) + |> Seq.map (fun uc -> uc.DisplayName) + + let vals = + modref.ModuleOrNamespaceType.AllValsByLogicalName + |> Seq.filter (fun e -> IsValAccessible ad (mkNestedValRef modref e.Value)) + |> Seq.map (fun e -> e.Value.DisplayName) - let exns = - modref.ModuleOrNamespaceType.ExceptionDefinitionsByDemangledName - |> Seq.filter (fun e -> IsTyconReprAccessible ncenv.amap m ad (modref.NestedTyconRef e.Value)) - |> Seq.map (fun e -> e.Value.DisplayName) + let exns = + modref.ModuleOrNamespaceType.ExceptionDefinitionsByDemangledName + |> Seq.filter (fun e -> IsTyconReprAccessible ncenv.amap m ad (modref.NestedTyconRef e.Value)) + |> Seq.map (fun e -> e.Value.DisplayName) - [ yield! types - yield! submodules - yield! unions - yield! vals - yield! exns ] - |> HashSet + [ yield! types + yield! submodules + yield! unions + yield! vals + yield! exns ] + |> HashSet - raze (UndefinedName(depth,FSComp.SR.undefinedNameValueConstructorNamespaceOrType,id,suggestPossibleTypesAndNames)) - | results -> AtMostOneResult id.idRange results + raze (UndefinedName(depth,FSComp.SR.undefinedNameValueConstructorNamespaceOrType,id,suggestPossibleTypesAndNames)) + | results -> AtMostOneResult id.idRange results /// An identifier has resolved to a type name in an expression (corresponding to one or more TyconRefs). /// Return either a set of constructors (later refined by overload resolution), or a set of TyconRefs. @@ -2302,339 +2368,302 @@ let ChooseTyconRefInExpr (ncenv:NameResolver, m, ad, nenv, id:Ident, typeNameRes let tcrefs = CheckForTypeLegitimacyAndMultipleGenericTypeAmbiguities (tcrefs, typeNameResInfo, PermitDirectReferenceToGeneratedType.No, m) match typeNameResInfo.ResolutionFlag with | ResolveTypeNamesToCtors -> - let typs = tcrefs |> List.map (fun (resInfo,tcref) -> (resInfo,FreshenTycon ncenv m tcref)) - typs - |> CollectAtMostOneResult (fun (resInfo,typ) -> ResolveObjectConstructorPrim ncenv nenv.eDisplayEnv resInfo id.idRange ad typ) + let tys = tcrefs |> List.map (fun (resInfo,tcref) -> (resInfo,FreshenTycon ncenv m tcref)) + tys + |> CollectAtMostOneResult (fun (resInfo,ty) -> ResolveObjectConstructorPrim ncenv nenv.eDisplayEnv resInfo id.idRange ad ty) |> MapResults (fun (resInfo,item) -> (resInfo,item,[])) | ResolveTypeNamesToTypeRefs -> - let typs = tcrefs |> List.map (fun (resInfo,tcref) -> (resInfo,FreshenTycon ncenv m tcref)) - success (typs |> List.map (fun (resInfo,typ) -> (resInfo,Item.Types(id.idText,[typ]),[]))) + let tys = tcrefs |> List.map (fun (resInfo,tcref) -> (resInfo,FreshenTycon ncenv m tcref)) + success (tys |> List.map (fun (resInfo,ty) -> (resInfo,Item.Types(id.idText,[ty]),[]))) /// Resolve F# "A.B.C" syntax in expressions /// Not all of the sequence will necessarily be swallowed, i.e. we return some identifiers /// that may represent further actions, e.g. further lookups. -let rec ResolveExprLongIdentPrim sink (ncenv:NameResolver) fullyQualified m ad nenv (typeNameResInfo:TypeNameResolutionInfo) lid = +let rec ResolveExprLongIdentPrim sink (ncenv:NameResolver) first fullyQualified m ad nenv (typeNameResInfo:TypeNameResolutionInfo) (id:Ident) (rest:Ident list) isOpenDecl = let resInfo = ResolutionInfo.Empty - match lid with - | [] -> error (Error(FSComp.SR.nrInvalidExpression(textOfLid lid), m)) - - | [id] when id.idText = MangledGlobalName -> - error (Error(FSComp.SR.nrGlobalUsedOnlyAsFirstName(), id.idRange)) - - | [id;next] when id.idText = MangledGlobalName -> - ResolveExprLongIdentPrim sink ncenv fullyQualified m ad nenv typeNameResInfo [next] - - | id :: lid when id.idText = MangledGlobalName -> - ResolveExprLongIdentPrim sink ncenv FullyQualified m ad nenv typeNameResInfo lid - - | [id] when fullyQualified <> FullyQualified -> - let typeError = ref None - // Single identifier. Lookup the unqualified names in the environment - let envSearch = - match nenv.eUnqualifiedItems.TryFind(id.idText) with - - // The name is a type name and it has not been clobbered by some other name - | Some (Item.UnqualifiedType tcrefs) -> + if first && id.idText = MangledGlobalName then + match rest with + | [] -> + error (Error(FSComp.SR.nrGlobalUsedOnlyAsFirstName(), id.idRange)) + | [next] -> + ResolveExprLongIdentPrim sink ncenv false fullyQualified m ad nenv typeNameResInfo next [] isOpenDecl + | id2::rest2 -> + ResolveExprLongIdentPrim sink ncenv false FullyQualified m ad nenv typeNameResInfo id2 rest2 isOpenDecl + else + if isNil rest && fullyQualified <> FullyQualified then + let typeError = ref None + // Single identifier. Lookup the unqualified names in the environment + let envSearch = + match nenv.eUnqualifiedItems.TryGetValue id.idText with + + // The name is a type name and it has not been clobbered by some other name + | true, Item.UnqualifiedType tcrefs -> - // Do not use type names from the environment if an explicit type instantiation is - // given and the number of type parameters do not match - let tcrefs = - tcrefs |> List.filter (fun tcref -> - typeNameResInfo.StaticArgsInfo.HasNoStaticArgsInfo || - typeNameResInfo.StaticArgsInfo.NumStaticArgs = tcref.Typars(m).Length) + // Do not use type names from the environment if an explicit type instantiation is + // given and the number of type parameters do not match + let tcrefs = + tcrefs |> List.filter (fun tcref -> + typeNameResInfo.StaticArgsInfo.HasNoStaticArgsInfo || + typeNameResInfo.StaticArgsInfo.NumStaticArgs = tcref.Typars(m).Length) - let search = ChooseTyconRefInExpr (ncenv, m, ad, nenv, id, typeNameResInfo, resInfo, tcrefs) - match AtMostOneResult m search with - | Result _ as res -> - let resInfo,item,rest = ForceRaise res - ResolutionInfo.SendEntityPathToSink(sink,ncenv,nenv,ItemOccurence.Use,ad,resInfo,ResultTyparChecker(fun () -> CheckAllTyparsInferrable ncenv.amap m item)) - Some(item,rest) - | Exception e -> typeError := Some e; None - - | Some res -> - Some (FreshenUnqualifiedItem ncenv m res, []) - | None -> - None - - match envSearch with - | Some res -> res - | None -> - let innerSearch = - // Check if it's a type name, e.g. a constructor call or a type instantiation - let ctorSearch = - let tcrefs = LookupTypeNameInEnvMaybeHaveArity fullyQualified id.idText typeNameResInfo nenv - ChooseTyconRefInExpr (ncenv, m, ad, nenv, id, typeNameResInfo, resInfo, tcrefs) - - match ctorSearch with - | Result res when not (isNil res) -> ctorSearch - | _ -> - - let implicitOpSearch = - if IsMangledOpName id.idText then - success [(resInfo,Item.ImplicitOp(id, ref None),[])] - else - NoResultsOrUsefulErrors + let search = ChooseTyconRefInExpr (ncenv, m, ad, nenv, id, typeNameResInfo, resInfo, tcrefs) + match AtMostOneResult m search with + | Result _ as res -> + let resInfo,item,rest = ForceRaise res + ResolutionInfo.SendEntityPathToSink(sink,ncenv,nenv,ItemOccurence.Use,ad,resInfo,ResultTyparChecker(fun () -> CheckAllTyparsInferrable ncenv.amap m item)) + Some(item,rest) + | Exception e -> typeError := Some e; None + + | true, res -> + Some (FreshenUnqualifiedItem ncenv m res, []) + | _ -> + None - ctorSearch +++ implicitOpSearch + match envSearch with + | Some res -> res + | None -> + let innerSearch = + // Check if it's a type name, e.g. a constructor call or a type instantiation + let ctorSearch = + let tcrefs = LookupTypeNameInEnvMaybeHaveArity fullyQualified id.idText typeNameResInfo nenv + ChooseTyconRefInExpr (ncenv, m, ad, nenv, id, typeNameResInfo, resInfo, tcrefs) + + let implicitOpSearch() = + if IsMangledOpName id.idText then + success [(resInfo,Item.ImplicitOp(id, ref None),[])] + else + NoResultsOrUsefulErrors - let resInfo,item,rest = - match AtMostOneResult m innerSearch with - | Result _ as res -> ForceRaise res - | _ -> - let failingCase = - match !typeError with - | Some e -> raze e - | _ -> - let suggestNamesAndTypes() = - let suggestedNames = - nenv.eUnqualifiedItems - |> Seq.map (fun e -> e.Value.DisplayName) - - let suggestedTypes = - nenv.TyconsByDemangledNameAndArity fullyQualified - |> Seq.filter (fun e -> IsEntityAccessible ncenv.amap m ad e.Value) - |> Seq.map (fun e -> e.Value.DisplayName) - - let suggestedModulesAndNamespaces = - nenv.ModulesAndNamespaces fullyQualified - |> Seq.collect (fun kv -> kv.Value) - |> Seq.filter (fun modref -> IsEntityAccessible ncenv.amap m ad modref) - |> Seq.collect (fun e -> [e.DisplayName; e.DemangledModuleOrNamespaceName]) - - let unions = - // check if the user forgot to use qualified access - nenv.eTyconsByDemangledNameAndArity - |> Seq.choose (fun e -> - let hasRequireQualifiedAccessAttribute = HasFSharpAttribute ncenv.g ncenv.g.attrib_RequireQualifiedAccessAttribute e.Value.Attribs - if not hasRequireQualifiedAccessAttribute then - None - else - if e.Value.IsUnionTycon && e.Value.UnionCasesArray |> Array.exists (fun c -> c.DisplayName = id.idText) then - Some e.Value - else - None) - |> Seq.map (fun t -> t.DisplayName + "." + id.idText) + ctorSearch +++ implicitOpSearch + + let resInfo,item,rest = + match AtMostOneResult m innerSearch with + | Result _ as res -> ForceRaise res + | _ -> + let failingCase = + match !typeError with + | Some e -> raze e + | _ -> + let suggestNamesAndTypes() = + let suggestedNames = + nenv.eUnqualifiedItems + |> Seq.map (fun e -> e.Value.DisplayName) + + let suggestedTypes = + nenv.TyconsByDemangledNameAndArity fullyQualified + |> Seq.filter (fun e -> IsEntityAccessible ncenv.amap m ad e.Value) + |> Seq.map (fun e -> e.Value.DisplayName) + + let suggestedModulesAndNamespaces = + nenv.ModulesAndNamespaces fullyQualified + |> Seq.collect (fun kv -> kv.Value) + |> Seq.filter (fun modref -> IsEntityAccessible ncenv.amap m ad modref) + |> Seq.collect (fun e -> [e.DisplayName; e.DemangledModuleOrNamespaceName]) + + let unions = + // check if the user forgot to use qualified access + nenv.eTyconsByDemangledNameAndArity + |> Seq.choose (fun e -> + let hasRequireQualifiedAccessAttribute = HasFSharpAttribute ncenv.g ncenv.g.attrib_RequireQualifiedAccessAttribute e.Value.Attribs + if not hasRequireQualifiedAccessAttribute then + None + else + if e.Value.IsUnionTycon && e.Value.UnionCasesArray |> Array.exists (fun c -> c.DisplayName = id.idText) then + Some e.Value + else + None) + |> Seq.map (fun t -> t.DisplayName + "." + id.idText) - [ yield! suggestedNames - yield! suggestedTypes - yield! suggestedModulesAndNamespaces - yield! unions ] - |> HashSet + [ yield! suggestedNames + yield! suggestedTypes + yield! suggestedModulesAndNamespaces + yield! unions ] + |> HashSet - raze (UndefinedName(0,FSComp.SR.undefinedNameValueOfConstructor,id,suggestNamesAndTypes)) - ForceRaise failingCase + raze (UndefinedName(0,FSComp.SR.undefinedNameValueOfConstructor,id,suggestNamesAndTypes)) + ForceRaise failingCase - ResolutionInfo.SendEntityPathToSink(sink,ncenv,nenv,ItemOccurence.Use,ad,resInfo,ResultTyparChecker(fun () -> CheckAllTyparsInferrable ncenv.amap m item)) - item,rest + ResolutionInfo.SendEntityPathToSink(sink,ncenv,nenv,ItemOccurence.Use,ad,resInfo,ResultTyparChecker(fun () -> CheckAllTyparsInferrable ncenv.amap m item)) + item,rest - // A compound identifier. - // It still might be a value in the environment, or something in an F# module, namespace, type, or nested type - | id :: rest -> - - let m = unionRanges m id.idRange - // Values in the environment take total priority, but constructors do NOT for compound lookups, e.g. if someone in some imported - // module has defined a constructor "String" (common enough) then "String.foo" doesn't give an error saying 'constructors have no members' - // Instead we go lookup the String module or type. - let ValIsInEnv nm = - match fullyQualified with - | FullyQualified -> false - | _ -> - match nenv.eUnqualifiedItems.TryFind(nm) with - | Some(Item.Value _) -> true - | _ -> false - - if ValIsInEnv id.idText then - nenv.eUnqualifiedItems.[id.idText], rest - else - // Otherwise modules are searched first. REVIEW: modules and types should be searched together. - // For each module referenced by 'id', search the module as if it were an F# module and/or a .NET namespace. - let moduleSearch ad = - ResolveLongIndentAsModuleOrNamespaceThen ResultCollectionSettings.AtMostOneResult ncenv.amap m fullyQualified nenv ad lid - (ResolveExprLongIdentInModuleOrNamespace ncenv nenv typeNameResInfo ad) - - // REVIEW: somewhat surprisingly, this shows up on performance traces, with tcrefs non-nil. - // This seems strange since we would expect in the vast majority of cases tcrefs is empty here. - let tyconSearch ad = - let tcrefs = LookupTypeNameInEnvNoArity fullyQualified id.idText nenv - if isNil tcrefs then NoResultsOrUsefulErrors else - let tcrefs = tcrefs |> List.map (fun tcref -> (resInfo,tcref)) - let tcrefs = CheckForTypeLegitimacyAndMultipleGenericTypeAmbiguities (tcrefs, TypeNameResolutionInfo.ResolveToTypeRefs (TypeNameResolutionStaticArgsInfo.Indefinite), PermitDirectReferenceToGeneratedType.No, unionRanges m id.idRange) - ResolveLongIdentInTyconRefs ResultCollectionSettings.AtMostOneResult ncenv nenv LookupKind.Expr 1 m ad rest typeNameResInfo id.idRange tcrefs - - let search = - let moduleSearch = moduleSearch ad - - match moduleSearch with - | Result res when not (isNil res) -> moduleSearch - | _ -> - - let tyconSearch = tyconSearch ad - - match tyconSearch with - | Result res when not (isNil res) -> tyconSearch - | _ -> - - let envSearch = - match fullyQualified with - | FullyQualified -> - NoResultsOrUsefulErrors - | OpenQualified -> - match nenv.eUnqualifiedItems.TryFind id.idText with - | Some (Item.UnqualifiedType _) - | None -> NoResultsOrUsefulErrors - | Some res -> OneSuccess (resInfo,FreshenUnqualifiedItem ncenv m res,rest) - - moduleSearch +++ tyconSearch +++ envSearch - - let resInfo,item,rest = - match AtMostOneResult m search with - | Result _ as res -> ForceRaise res - | _ -> - let innerSearch = - let moduleSearch = moduleSearch AccessibleFromSomeFSharpCode - - match moduleSearch with - | Result res when not (isNil res) -> moduleSearch - | _ -> - - let tyconSearch = tyconSearch AccessibleFromSomeFSharpCode + // A compound identifier. + // It still might be a value in the environment, or something in an F# module, namespace, type, or nested type + else + let m = unionRanges m id.idRange + // Values in the environment take total priority, but constructors do NOT for compound lookups, e.g. if someone in some imported + // module has defined a constructor "String" (common enough) then "String.foo" doesn't give an error saying 'constructors have no members' + // Instead we go lookup the String module or type. + let ValIsInEnv nm = + match fullyQualified with + | FullyQualified -> false + | _ -> + match nenv.eUnqualifiedItems.TryGetValue nm with + | true, Item.Value _ -> true + | _ -> false - match tyconSearch with - | Result res when not (isNil res) -> tyconSearch - | _ -> + if ValIsInEnv id.idText then + nenv.eUnqualifiedItems.[id.idText], rest + else + // Otherwise modules are searched first. REVIEW: modules and types should be searched together. + // For each module referenced by 'id', search the module as if it were an F# module and/or a .NET namespace. + let moduleSearch ad () = + ResolveLongIndentAsModuleOrNamespaceThen sink ResultCollectionSettings.AtMostOneResult ncenv.amap m fullyQualified nenv ad id rest isOpenDecl + (ResolveExprLongIdentInModuleOrNamespace ncenv nenv typeNameResInfo ad) + + // REVIEW: somewhat surprisingly, this shows up on performance traces, with tcrefs non-nil. + // This seems strange since we would expect in the vast majority of cases tcrefs is empty here. + let tyconSearch ad () = + let tcrefs = LookupTypeNameInEnvNoArity fullyQualified id.idText nenv + if isNil tcrefs then NoResultsOrUsefulErrors else + match rest with + | id2::rest2 -> + let tcrefs = tcrefs |> List.map (fun tcref -> (resInfo,tcref)) + let tcrefs = CheckForTypeLegitimacyAndMultipleGenericTypeAmbiguities (tcrefs, TypeNameResolutionInfo.ResolveToTypeRefs (TypeNameResolutionStaticArgsInfo.Indefinite), PermitDirectReferenceToGeneratedType.No, unionRanges m id.idRange) + ResolveLongIdentInTyconRefs ResultCollectionSettings.AtMostOneResult ncenv nenv LookupKind.Expr 1 m ad id2 rest2 typeNameResInfo id.idRange tcrefs + | _ -> + NoResultsOrUsefulErrors - search +++ moduleSearch +++ tyconSearch + let search = + let envSearch () = + match fullyQualified with + | FullyQualified -> + NoResultsOrUsefulErrors + | OpenQualified -> + match nenv.eUnqualifiedItems.TryGetValue id.idText with + | true, Item.UnqualifiedType _ + | false, _ -> NoResultsOrUsefulErrors + | true, res -> OneSuccess (resInfo,FreshenUnqualifiedItem ncenv m res,rest) + + moduleSearch ad () +++ tyconSearch ad +++ envSearch - let suggestEverythingInScope() = - seq { yield! - nenv.ModulesAndNamespaces fullyQualified - |> Seq.collect (fun kv -> kv.Value) - |> Seq.filter (fun modref -> IsEntityAccessible ncenv.amap m ad modref) - |> Seq.collect (fun e -> [e.DisplayName; e.DemangledModuleOrNamespaceName]) + let resInfo,item,rest = + match AtMostOneResult m search with + | Result _ as res -> ForceRaise res + | _ -> + let innerSearch = search +++ (moduleSearch AccessibleFromSomeFSharpCode) +++ (tyconSearch AccessibleFromSomeFSharpCode) + + let suggestEverythingInScope() = + seq { yield! + nenv.ModulesAndNamespaces fullyQualified + |> Seq.collect (fun kv -> kv.Value) + |> Seq.filter (fun modref -> IsEntityAccessible ncenv.amap m ad modref) + |> Seq.collect (fun e -> [e.DisplayName; e.DemangledModuleOrNamespaceName]) - yield! - nenv.TyconsByDemangledNameAndArity fullyQualified - |> Seq.filter (fun e -> IsEntityAccessible ncenv.amap m ad e.Value) - |> Seq.map (fun e -> e.Value.DisplayName) - - yield! - nenv.eUnqualifiedItems - |> Seq.map (fun e -> e.Value.DisplayName) - } |> HashSet - - match innerSearch with - | Exception (UndefinedName(0,_,id1,suggestionsF)) when id.idRange = id1.idRange -> - let mergeSuggestions() = - let res = suggestEverythingInScope() - res.UnionWith(suggestionsF()) - res - - let failingCase = raze (UndefinedName(0,FSComp.SR.undefinedNameValueNamespaceTypeOrModule,id,mergeSuggestions)) - ForceRaise failingCase - | Exception err -> ForceRaise(Exception err) - | Result (res :: _) -> ForceRaise(Result res) - | Result [] -> - let failingCase = raze (UndefinedName(0,FSComp.SR.undefinedNameValueNamespaceTypeOrModule,id,suggestEverythingInScope)) - ForceRaise failingCase + yield! + nenv.TyconsByDemangledNameAndArity fullyQualified + |> Seq.filter (fun e -> IsEntityAccessible ncenv.amap m ad e.Value) + |> Seq.map (fun e -> e.Value.DisplayName) + + yield! + nenv.eUnqualifiedItems + |> Seq.map (fun e -> e.Value.DisplayName) + } |> HashSet + + match innerSearch with + | Exception (UndefinedName(0,_,id1,suggestionsF)) when id.idRange = id1.idRange -> + let mergeSuggestions() = + let res = suggestEverythingInScope() + res.UnionWith(suggestionsF()) + res + + let failingCase = raze (UndefinedName(0,FSComp.SR.undefinedNameValueNamespaceTypeOrModule,id,mergeSuggestions)) + ForceRaise failingCase + | Exception err -> ForceRaise(Exception err) + | Result (res :: _) -> ForceRaise(Result res) + | Result [] -> + let failingCase = raze (UndefinedName(0,FSComp.SR.undefinedNameValueNamespaceTypeOrModule,id,suggestEverythingInScope)) + ForceRaise failingCase - ResolutionInfo.SendEntityPathToSink(sink,ncenv,nenv,ItemOccurence.Use,ad,resInfo,ResultTyparChecker(fun () -> CheckAllTyparsInferrable ncenv.amap m item)) - item,rest + ResolutionInfo.SendEntityPathToSink(sink,ncenv,nenv,ItemOccurence.Use,ad,resInfo,ResultTyparChecker(fun () -> CheckAllTyparsInferrable ncenv.amap m item)) + item,rest let ResolveExprLongIdent sink (ncenv:NameResolver) m ad nenv typeNameResInfo lid = - ResolveExprLongIdentPrim sink ncenv OpenQualified m ad nenv typeNameResInfo lid + match lid with + | [] -> error (Error(FSComp.SR.nrInvalidExpression(textOfLid lid), m)) + | id::rest -> ResolveExprLongIdentPrim sink ncenv true OpenQualified m ad nenv typeNameResInfo id rest false //------------------------------------------------------------------------- // Resolve F#/IL "." syntax in patterns //------------------------------------------------------------------------- -let rec ResolvePatternLongIdentInModuleOrNamespace (ncenv:NameResolver) nenv numTyArgsOpt ad resInfo depth m modref (mty:ModuleOrNamespaceType) (lid: Ident list) = - match lid with - | [] -> raze (InternalError("ResolvePatternLongIdentInModuleOrNamespace",m)) - | id :: rest -> - let m = unionRanges m id.idRange - match TryFindTypeWithUnionCase modref id with - | Some tycon when IsTyconReprAccessible ncenv.amap m ad (modref.NestedTyconRef tycon) -> - let tcref = modref.NestedTyconRef tycon - let ucref = mkUnionCaseRef tcref id.idText - let showDeprecated = HasFSharpAttribute ncenv.g ncenv.g.attrib_RequireQualifiedAccessAttribute tycon.Attribs - let ucinfo = FreshenUnionCaseRef ncenv m ucref - success (resInfo,Item.UnionCase(ucinfo,showDeprecated),rest) - | _ -> - match mty.ExceptionDefinitionsByDemangledName.TryFind(id.idText) with - | Some exnc when IsEntityAccessible ncenv.amap m ad (modref.NestedTyconRef exnc) -> - success (resInfo,Item.ExnCase (modref.NestedTyconRef exnc),rest) - | _ -> - // An active pattern constructor in a module - match (ActivePatternElemsOfModuleOrNamespace modref).TryFind(id.idText) with - | Some ( APElemRef(_,vref,_) as apref) when IsValAccessible ad vref -> - success (resInfo,Item.ActivePatternCase apref,rest) - | _ -> - match mty.AllValsByLogicalName.TryFind(id.idText) with - | Some vspec when IsValAccessible ad (mkNestedValRef modref vspec) -> - success(resInfo,Item.Value (mkNestedValRef modref vspec),rest) +let rec ResolvePatternLongIdentInModuleOrNamespace (ncenv:NameResolver) nenv numTyArgsOpt ad resInfo depth m modref (mty:ModuleOrNamespaceType) (id:Ident) (rest: Ident list) = + let m = unionRanges m id.idRange + match TryFindTypeWithUnionCase modref id with + | Some tycon when IsTyconReprAccessible ncenv.amap m ad (modref.NestedTyconRef tycon) -> + let tcref = modref.NestedTyconRef tycon + let ucref = mkUnionCaseRef tcref id.idText + let showDeprecated = HasFSharpAttribute ncenv.g ncenv.g.attrib_RequireQualifiedAccessAttribute tycon.Attribs + let ucinfo = FreshenUnionCaseRef ncenv m ucref + success (resInfo,Item.UnionCase(ucinfo,showDeprecated),rest) + | _ -> + match mty.ExceptionDefinitionsByDemangledName.TryGetValue id.idText with + | true, exnc when IsEntityAccessible ncenv.amap m ad (modref.NestedTyconRef exnc) -> + success (resInfo,Item.ExnCase (modref.NestedTyconRef exnc),rest) + | _ -> + // An active pattern constructor in a module + match (ActivePatternElemsOfModuleOrNamespace modref).TryGetValue id.idText with + | true, (APElemRef(_,vref,_) as apref) when IsValAccessible ad vref -> + success (resInfo,Item.ActivePatternCase apref,rest) + | _ -> + match mty.AllValsByLogicalName.TryGetValue id.idText with + | true, vspec when IsValAccessible ad (mkNestedValRef modref vspec) -> + success(resInfo,Item.Value (mkNestedValRef modref vspec),rest) + | _ -> + let tcrefs = lazy ( + LookupTypeNameInEntityMaybeHaveArity (ncenv.amap, id.idRange, ad, id.idText, TypeNameResolutionStaticArgsInfo.Indefinite, modref) + |> List.map (fun tcref -> (resInfo,tcref))) + + // Something in a type? e.g. a literal field + let tyconSearch = + match rest with + | id2::rest2 -> + let tcrefs = tcrefs.Force() + ResolveLongIdentInTyconRefs ResultCollectionSettings.AtMostOneResult (ncenv:NameResolver) nenv LookupKind.Pattern (depth+1) m ad id2 rest2 numTyArgsOpt id.idRange tcrefs | _ -> - let tcrefs = lazy ( - LookupTypeNameInEntityMaybeHaveArity (ncenv.amap, id.idRange, ad, id.idText, TypeNameResolutionStaticArgsInfo.Indefinite, modref) - |> List.map (fun tcref -> (resInfo,tcref))) + NoResultsOrUsefulErrors - // Something in a type? e.g. a literal field - let tyconSearch = - match lid with - | _ :: rest when not (isNil rest) -> - let tcrefs = tcrefs.Force() - ResolveLongIdentInTyconRefs ResultCollectionSettings.AtMostOneResult (ncenv:NameResolver) nenv LookupKind.Pattern (depth+1) m ad rest numTyArgsOpt id.idRange tcrefs + // Constructor of a type? + let ctorSearch() = + if isNil rest then + tcrefs.Force() + |> List.map (fun (resInfo,tcref) -> (resInfo,FreshenTycon ncenv m tcref)) + |> CollectAtMostOneResult (fun (resInfo,ty) -> ResolveObjectConstructorPrim ncenv nenv.eDisplayEnv resInfo id.idRange ad ty) + |> MapResults (fun (resInfo,item) -> (resInfo,item,[])) + else + NoResultsOrUsefulErrors + + // Something in a sub-namespace or sub-module or nested-type + let moduleSearch() = + match rest with + | id2::rest2 -> + match mty.ModulesAndNamespacesByDemangledName.TryGetValue id.idText with + | true, AccessibleEntityRef ncenv.amap m ad modref submodref -> + let resInfo = resInfo.AddEntity(id.idRange,submodref) + OneResult (ResolvePatternLongIdentInModuleOrNamespace ncenv nenv numTyArgsOpt ad resInfo (depth+1) m submodref submodref.ModuleOrNamespaceType id2 rest2) | _ -> NoResultsOrUsefulErrors - - match tyconSearch with - | Result (res :: _) -> success res - | _ -> - - // Constructor of a type? - let ctorSearch = - if isNil rest then - tcrefs.Force() - |> List.map (fun (resInfo,tcref) -> (resInfo,FreshenTycon ncenv m tcref)) - |> CollectAtMostOneResult (fun (resInfo,typ) -> ResolveObjectConstructorPrim ncenv nenv.eDisplayEnv resInfo id.idRange ad typ) - |> MapResults (fun (resInfo,item) -> (resInfo,item,[])) - else - NoResultsOrUsefulErrors - - match ctorSearch with - | Result (res :: _) -> success res - | _ -> - - // Something in a sub-namespace or sub-module or nested-type - let moduleSearch = - if not (isNil rest) then - match mty.ModulesAndNamespacesByDemangledName.TryFind(id.idText) with - | Some(AccessibleEntityRef ncenv.amap m ad modref submodref) -> - let resInfo = resInfo.AddEntity(id.idRange,submodref) - OneResult (ResolvePatternLongIdentInModuleOrNamespace ncenv nenv numTyArgsOpt ad resInfo (depth+1) m submodref submodref.ModuleOrNamespaceType rest) - | _ -> - NoResultsOrUsefulErrors - else NoResultsOrUsefulErrors - - match tyconSearch +++ ctorSearch +++ moduleSearch with - | Result [] -> - let suggestPossibleTypes() = - let submodules = - mty.ModulesAndNamespacesByDemangledName - |> Seq.filter (fun kv -> IsEntityAccessible ncenv.amap m ad (modref.NestedTyconRef kv.Value)) - |> Seq.collect (fun e -> [e.Value.DisplayName; e.Value.DemangledModuleOrNamespaceName]) + | [] -> NoResultsOrUsefulErrors + + match tyconSearch +++ ctorSearch +++ moduleSearch with + | Result [] -> + let suggestPossibleTypes() = + let submodules = + mty.ModulesAndNamespacesByDemangledName + |> Seq.filter (fun kv -> IsEntityAccessible ncenv.amap m ad (modref.NestedTyconRef kv.Value)) + |> Seq.collect (fun e -> [e.Value.DisplayName; e.Value.DemangledModuleOrNamespaceName]) - let suggestedTypes = - nenv.TyconsByDemangledNameAndArity FullyQualifiedFlag.OpenQualified - |> Seq.filter (fun e -> IsEntityAccessible ncenv.amap m ad e.Value) - |> Seq.map (fun e -> e.Value.DisplayName) + let suggestedTypes = + nenv.TyconsByDemangledNameAndArity FullyQualifiedFlag.OpenQualified + |> Seq.filter (fun e -> IsEntityAccessible ncenv.amap m ad e.Value) + |> Seq.map (fun e -> e.Value.DisplayName) - [ yield! submodules - yield! suggestedTypes ] - |> HashSet + [ yield! submodules + yield! suggestedTypes ] + |> HashSet - raze (UndefinedName(depth,FSComp.SR.undefinedNameConstructorModuleOrNamespace,id,suggestPossibleTypes)) - | results -> AtMostOneResult id.idRange results + raze (UndefinedName(depth,FSComp.SR.undefinedNameConstructorModuleOrNamespace,id,suggestPossibleTypes)) + | results -> AtMostOneResult id.idRange results /// Used to report a warning condition for the use of upper-case identifiers in patterns exception UpperCaseIdentifierInPattern of range @@ -2643,59 +2672,66 @@ exception UpperCaseIdentifierInPattern of range type WarnOnUpperFlag = WarnOnUpperCase | AllIdsOK // Long ID in a pattern -let rec ResolvePatternLongIdentPrim sink (ncenv:NameResolver) fullyQualified warnOnUpper newDef m ad nenv numTyArgsOpt (lid:Ident list) = - match lid with - - | [id] when id.idText = MangledGlobalName -> - error (Error(FSComp.SR.nrGlobalUsedOnlyAsFirstName(), id.idRange)) - - | id :: lid when id.idText = MangledGlobalName -> - ResolvePatternLongIdentPrim sink ncenv FullyQualified warnOnUpper newDef m ad nenv numTyArgsOpt lid - - // Single identifiers in patterns - | [id] when fullyQualified <> FullyQualified -> - // Single identifiers in patterns - bind to constructors and active patterns - // For the special case of - // let C = x - match nenv.ePatItems.TryFind(id.idText) with - | Some res when not newDef -> FreshenUnqualifiedItem ncenv m res - | _ -> - // Single identifiers in patterns - variable bindings - if not newDef && - (warnOnUpper = WarnOnUpperCase) && - id.idText.Length >= 3 && - System.Char.ToLowerInvariant id.idText.[0] <> id.idText.[0] then - warning(UpperCaseIdentifierInPattern(m)) - Item.NewDef id - - // Long identifiers in patterns - | _ -> - let moduleSearch ad = - ResolveLongIndentAsModuleOrNamespaceThen ResultCollectionSettings.AtMostOneResult ncenv.amap m fullyQualified nenv ad lid - (ResolvePatternLongIdentInModuleOrNamespace ncenv nenv numTyArgsOpt ad) - let tyconSearch ad = - match lid with - | tn :: rest when not (isNil rest) -> - let tcrefs = LookupTypeNameInEnvNoArity fullyQualified tn.idText nenv - if isNil tcrefs then NoResultsOrUsefulErrors else - let tcrefs = tcrefs |> List.map (fun tcref -> (ResolutionInfo.Empty,tcref)) - ResolveLongIdentInTyconRefs ResultCollectionSettings.AtMostOneResult ncenv nenv LookupKind.Pattern 1 tn.idRange ad rest numTyArgsOpt tn.idRange tcrefs +let rec ResolvePatternLongIdentPrim sink (ncenv:NameResolver) fullyQualified warnOnUpper newDef m ad nenv numTyArgsOpt (id:Ident) (rest:Ident list) = + if id.idText = MangledGlobalName then + match rest with + | [] -> + error (Error(FSComp.SR.nrGlobalUsedOnlyAsFirstName(), id.idRange)) + | id2::rest2 -> + ResolvePatternLongIdentPrim sink ncenv FullyQualified warnOnUpper newDef m ad nenv numTyArgsOpt id2 rest2 + else + // Single identifiers in patterns + if isNil rest && fullyQualified <> FullyQualified then + // Single identifiers in patterns - bind to constructors and active patterns + // For the special case of + // let C = x + match nenv.ePatItems.TryGetValue id.idText with + | true, res when not newDef -> FreshenUnqualifiedItem ncenv m res | _ -> - NoResultsOrUsefulErrors - let resInfo,res,rest = - match AtMostOneResult m (tyconSearch ad +++ moduleSearch ad) with - | Result _ as res -> ForceRaise res - | _ -> - ForceRaise (AtMostOneResult m (tyconSearch AccessibleFromSomeFSharpCode +++ moduleSearch AccessibleFromSomeFSharpCode)) - ResolutionInfo.SendEntityPathToSink(sink,ncenv,nenv,ItemOccurence.Use,ad,resInfo,ResultTyparChecker(fun () -> true)) - - if not (isNil rest) then error(Error(FSComp.SR.nrIsNotConstructorOrLiteral(),(List.head rest).idRange)) - res + // Single identifiers in patterns - variable bindings + if not newDef && + (warnOnUpper = WarnOnUpperCase) && + id.idText.Length >= 3 && + System.Char.ToLowerInvariant id.idText.[0] <> id.idText.[0] then + warning(UpperCaseIdentifierInPattern(m)) + Item.NewDef id + + // Long identifiers in patterns + else + let moduleSearch ad () = + ResolveLongIndentAsModuleOrNamespaceThen sink ResultCollectionSettings.AtMostOneResult ncenv.amap m fullyQualified nenv ad id rest false + (ResolvePatternLongIdentInModuleOrNamespace ncenv nenv numTyArgsOpt ad) + + let tyconSearch ad = + match rest with + | id2 :: rest2 -> + let tcrefs = LookupTypeNameInEnvNoArity fullyQualified id.idText nenv + if isNil tcrefs then NoResultsOrUsefulErrors else + let tcrefs = tcrefs |> List.map (fun tcref -> (ResolutionInfo.Empty,tcref)) + ResolveLongIdentInTyconRefs ResultCollectionSettings.AtMostOneResult ncenv nenv LookupKind.Pattern 1 id.idRange ad id2 rest2 numTyArgsOpt id.idRange tcrefs + | _ -> + NoResultsOrUsefulErrors + let resInfo,res,rest = + match AtMostOneResult m (tyconSearch ad +++ (moduleSearch ad)) with + | Result _ as res -> ForceRaise res + | _ -> + + tyconSearch AccessibleFromSomeFSharpCode +++ (moduleSearch AccessibleFromSomeFSharpCode) + |> AtMostOneResult m + |> ForceRaise + + ResolutionInfo.SendEntityPathToSink(sink,ncenv,nenv,ItemOccurence.Use,ad,resInfo,ResultTyparChecker(fun () -> true)) + + match rest with + | [] -> res + | element :: _ -> error(Error(FSComp.SR.nrIsNotConstructorOrLiteral(),element.idRange)) /// Resolve a long identifier when used in a pattern. let ResolvePatternLongIdent sink (ncenv:NameResolver) warnOnUpper newDef m ad nenv numTyArgsOpt (lid:Ident list) = - ResolvePatternLongIdentPrim sink ncenv OpenQualified warnOnUpper newDef m ad nenv numTyArgsOpt lid + match lid with + | [] -> error(Error(FSComp.SR.nrUnexpectedEmptyLongId(),m)) + | id::rest -> ResolvePatternLongIdentPrim sink ncenv OpenQualified warnOnUpper newDef m ad nenv numTyArgsOpt id rest //------------------------------------------------------------------------- // Resolve F#/IL "." syntax in types @@ -2715,11 +2751,10 @@ let ResolveNestedTypeThroughAbbreviation (ncenv:NameResolver) (tcref: TyconRef) tcref /// Resolve a long identifier representing a type name -let rec ResolveTypeLongIdentInTyconRefPrim (ncenv:NameResolver) (typeNameResInfo:TypeNameResolutionInfo) ad resInfo genOk depth m (tcref: TyconRef) (lid: Ident list) = +let rec ResolveTypeLongIdentInTyconRefPrim (ncenv:NameResolver) (typeNameResInfo:TypeNameResolutionInfo) ad resInfo genOk depth m (tcref: TyconRef) (id:Ident) (rest: Ident list) = let tcref = ResolveNestedTypeThroughAbbreviation ncenv tcref m - match lid with - | [] -> error(Error(FSComp.SR.nrUnexpectedEmptyLongId(),m)) - | [id] -> + match rest with + | [] -> #if !NO_EXTENSIONTYPING // No dotting through type generators to get to a nested type! CheckForDirectReferenceToGeneratedType (tcref, PermitDirectReferenceToGeneratedType.No, m) @@ -2737,7 +2772,7 @@ let rec ResolveTypeLongIdentInTyconRefPrim (ncenv:NameResolver) (typeNameResInfo |> HashSet raze (UndefinedName(depth,FSComp.SR.undefinedNameType,id,suggestTypes)) - | id::rest -> + | id2::rest2 -> #if !NO_EXTENSIONTYPING // No dotting through type generators to get to a nested type! CheckForDirectReferenceToGeneratedType (tcref, PermitDirectReferenceToGeneratedType.No, m) @@ -2750,7 +2785,7 @@ let rec ResolveTypeLongIdentInTyconRefPrim (ncenv:NameResolver) (typeNameResInfo let tcrefs = tcrefs |> List.map (fun tcref -> (resInfo,tcref)) let tcrefs = CheckForTypeLegitimacyAndMultipleGenericTypeAmbiguities (tcrefs, typeNameResInfo.DropStaticArgsInfo, genOk, m) match tcrefs with - | _ :: _ -> tcrefs |> CollectAtMostOneResult (fun (resInfo,tcref) -> ResolveTypeLongIdentInTyconRefPrim ncenv typeNameResInfo ad resInfo genOk (depth+1) m tcref rest) + | _ :: _ -> tcrefs |> CollectAtMostOneResult (fun (resInfo,tcref) -> ResolveTypeLongIdentInTyconRefPrim ncenv typeNameResInfo ad resInfo genOk (depth+1) m tcref id2 rest2) | [] -> let suggestTypes() = tcref.ModuleOrNamespaceType.TypesByDemangledNameAndArity id.idRange @@ -2763,7 +2798,12 @@ let rec ResolveTypeLongIdentInTyconRefPrim (ncenv:NameResolver) (typeNameResInfo /// Resolve a long identifier representing a type name and report the result let ResolveTypeLongIdentInTyconRef sink (ncenv:NameResolver) nenv typeNameResInfo ad m tcref (lid: Ident list) = - let resInfo,tcref = ForceRaise (ResolveTypeLongIdentInTyconRefPrim ncenv typeNameResInfo ad ResolutionInfo.Empty PermitDirectReferenceToGeneratedType.No 0 m tcref lid) + let resInfo,tcref = + match lid with + | [] -> + error(Error(FSComp.SR.nrUnexpectedEmptyLongId(),m)) + | id::rest -> + ForceRaise (ResolveTypeLongIdentInTyconRefPrim ncenv typeNameResInfo ad ResolutionInfo.Empty PermitDirectReferenceToGeneratedType.No 0 m tcref id rest) ResolutionInfo.SendEntityPathToSink(sink,ncenv,nenv,ItemOccurence.Use,ad,resInfo,ResultTyparChecker(fun () -> true)) let item = Item.Types(tcref.DisplayName,[FreshenTycon ncenv m tcref]) CallNameResolutionSink sink (rangeOfLid lid,nenv,item,item,emptyTyparInst,ItemOccurence.UseInType,nenv.eDisplayEnv,ad) @@ -2781,22 +2821,23 @@ let SuggestTypeLongIdentInModuleOrNamespace depth (modref:ModuleOrNamespaceRef) UndefinedName(depth,errorTextF,id,suggestPossibleTypes) /// Resolve a long identifier representing a type in a module or namespace -let rec private ResolveTypeLongIdentInModuleOrNamespace (ncenv:NameResolver) (typeNameResInfo: TypeNameResolutionInfo) ad genOk (resInfo:ResolutionInfo) depth m modref _mty (lid: Ident list) = - match lid with - | [] -> error(Error(FSComp.SR.nrUnexpectedEmptyLongId(),m)) - | [id] -> +let rec private ResolveTypeLongIdentInModuleOrNamespace sink nenv (ncenv:NameResolver) (typeNameResInfo: TypeNameResolutionInfo) ad genOk (resInfo:ResolutionInfo) depth m modref _mty (id:Ident) (rest: Ident list) = + match rest with + | [] -> // On all paths except error reporting we have isSome(staticResInfo), hence get at most one result back let tcrefs = LookupTypeNameInEntityMaybeHaveArity (ncenv.amap, id.idRange, ad, id.idText, typeNameResInfo.StaticArgsInfo, modref) match tcrefs with | _ :: _ -> tcrefs |> CollectResults (fun tcref -> success(resInfo,tcref)) | [] -> raze (SuggestTypeLongIdentInModuleOrNamespace depth modref ncenv.amap ad m id) - | id::rest -> + | id2::rest2 -> let m = unionRanges m id.idRange let modulSearch = - match modref.ModuleOrNamespaceType.ModulesAndNamespacesByDemangledName.TryFind(id.idText) with - | Some(AccessibleEntityRef ncenv.amap m ad modref submodref) -> + match modref.ModuleOrNamespaceType.ModulesAndNamespacesByDemangledName.TryGetValue id.idText with + | true, AccessibleEntityRef ncenv.amap m ad modref submodref -> + let item = Item.ModuleOrNamespaces [submodref] + CallNameResolutionSink sink (id.idRange, nenv, item, item, emptyTyparInst, ItemOccurence.Use, nenv.DisplayEnv, ad) let resInfo = resInfo.AddEntity(id.idRange,submodref) - ResolveTypeLongIdentInModuleOrNamespace ncenv typeNameResInfo ad genOk resInfo (depth+1) m submodref submodref.ModuleOrNamespaceType rest + ResolveTypeLongIdentInModuleOrNamespace sink nenv ncenv typeNameResInfo ad genOk resInfo (depth+1) m submodref submodref.ModuleOrNamespaceType id2 rest2 | _ -> let suggestPossibleModules() = modref.ModuleOrNamespaceType.ModulesAndNamespacesByDemangledName @@ -2808,7 +2849,7 @@ let rec private ResolveTypeLongIdentInModuleOrNamespace (ncenv:NameResolver) (ty let tyconSearch = let tcrefs = LookupTypeNameInEntityMaybeHaveArity (ncenv.amap, id.idRange, ad, id.idText, TypeNameResolutionStaticArgsInfo.Indefinite, modref) match tcrefs with - | _ :: _ -> tcrefs |> CollectResults (fun tcref -> ResolveTypeLongIdentInTyconRefPrim ncenv typeNameResInfo ad resInfo genOk (depth+1) m tcref rest) + | _ :: _ -> tcrefs |> CollectResults (fun tcref -> ResolveTypeLongIdentInTyconRefPrim ncenv typeNameResInfo ad resInfo genOk (depth+1) m tcref id2 rest2) | [] -> let suggestTypes() = modref.ModuleOrNamespaceType.TypesByDemangledNameAndArity id.idRange @@ -2816,97 +2857,104 @@ let rec private ResolveTypeLongIdentInModuleOrNamespace (ncenv:NameResolver) (ty |> HashSet raze (UndefinedName(depth,FSComp.SR.undefinedNameType,id,suggestTypes)) - tyconSearch +++ modulSearch + + AddResults tyconSearch modulSearch /// Resolve a long identifier representing a type -let rec ResolveTypeLongIdentPrim (ncenv:NameResolver) occurence fullyQualified m nenv ad (lid: Ident list) (staticResInfo: TypeNameResolutionStaticArgsInfo) genOk = +let rec ResolveTypeLongIdentPrim sink (ncenv:NameResolver) occurence first fullyQualified m nenv ad (id:Ident) (rest: Ident list) (staticResInfo: TypeNameResolutionStaticArgsInfo) genOk = let typeNameResInfo = TypeNameResolutionInfo.ResolveToTypeRefs staticResInfo - match lid with - | [] -> error(Error(FSComp.SR.nrUnexpectedEmptyLongId(),m)) - - | [id] when id.idText = MangledGlobalName -> - error (Error(FSComp.SR.nrGlobalUsedOnlyAsFirstName(), id.idRange)) - - | id :: lid when id.idText = MangledGlobalName -> - ResolveTypeLongIdentPrim ncenv occurence FullyQualified m nenv ad lid staticResInfo genOk - - | [id] -> - match LookupTypeNameInEnvHaveArity fullyQualified id.idText staticResInfo.NumStaticArgs nenv with - | Some res -> - let res = CheckForTypeLegitimacyAndMultipleGenericTypeAmbiguities ([(ResolutionInfo.Empty,res)], typeNameResInfo, genOk, unionRanges m id.idRange) - assert (res.Length = 1) - success res.Head - | None -> - // For Good Error Reporting! - let tcrefs = LookupTypeNameInEnvNoArity fullyQualified id.idText nenv - match tcrefs with - | tcref :: _tcrefs -> - // Note: This path is only for error reporting - //CheckForTypeLegitimacyAndMultipleGenericTypeAmbiguities tcref rest typeNameResInfo m - success(ResolutionInfo.Empty,tcref) - | [] -> - let suggestPossibleTypes() = - nenv.TyconsByDemangledNameAndArity(fullyQualified) - |> Seq.filter (fun kv -> IsEntityAccessible ncenv.amap m ad kv.Value) - |> Seq.collect (fun e -> - match occurence with - | ItemOccurence.UseInAttribute -> - [yield e.Value.DisplayName - yield e.Value.DemangledModuleOrNamespaceName - if e.Value.DisplayName.EndsWith "Attribute" then - yield e.Value.DisplayName.Replace("Attribute","")] - | _ -> [e.Value.DisplayName; e.Value.DemangledModuleOrNamespaceName]) - |> HashSet - - raze (UndefinedName(0,FSComp.SR.undefinedNameType,id,suggestPossibleTypes)) - - | id::rest -> - let m = unionRanges m id.idRange - let tyconSearch = - match fullyQualified with - | FullyQualified -> - NoResultsOrUsefulErrors - | OpenQualified -> - match LookupTypeNameInEnvHaveArity fullyQualified id.idText staticResInfo.NumStaticArgs nenv with - | Some tcref when IsEntityAccessible ncenv.amap m ad tcref -> - OneResult (ResolveTypeLongIdentInTyconRefPrim ncenv typeNameResInfo ad ResolutionInfo.Empty genOk 1 m tcref rest) - | _ -> + if first && id.idText = MangledGlobalName then + match rest with + | [] -> + error (Error(FSComp.SR.nrGlobalUsedOnlyAsFirstName(), id.idRange)) + | id2::rest2 -> + ResolveTypeLongIdentPrim sink ncenv occurence false FullyQualified m nenv ad id2 rest2 staticResInfo genOk + else + match rest with + | [] -> + match LookupTypeNameInEnvHaveArity fullyQualified id.idText staticResInfo.NumStaticArgs nenv with + | Some res -> + let res = CheckForTypeLegitimacyAndMultipleGenericTypeAmbiguities ([(ResolutionInfo.Empty,res)], typeNameResInfo, genOk, unionRanges m id.idRange) + assert (res.Length = 1) + success res.Head + | None -> + // For Good Error Reporting! + let tcrefs = LookupTypeNameInEnvNoArity fullyQualified id.idText nenv + match tcrefs with + | tcref :: _tcrefs -> + // Note: This path is only for error reporting + //CheckForTypeLegitimacyAndMultipleGenericTypeAmbiguities tcref rest typeNameResInfo m + success(ResolutionInfo.Empty,tcref) + | [] -> + let suggestPossibleTypes() = + nenv.TyconsByDemangledNameAndArity(fullyQualified) + |> Seq.filter (fun kv -> IsEntityAccessible ncenv.amap m ad kv.Value) + |> Seq.collect (fun e -> + match occurence with + | ItemOccurence.UseInAttribute -> + [yield e.Value.DisplayName + yield e.Value.DemangledModuleOrNamespaceName + if e.Value.DisplayName.EndsWithOrdinal("Attribute") then + yield e.Value.DisplayName.Replace("Attribute","")] + | _ -> [e.Value.DisplayName; e.Value.DemangledModuleOrNamespaceName]) + |> HashSet + + raze (UndefinedName(0,FSComp.SR.undefinedNameType,id,suggestPossibleTypes)) + | id2::rest2 -> + let m2 = unionRanges m id.idRange + let tyconSearch = + match fullyQualified with + | FullyQualified -> NoResultsOrUsefulErrors + | OpenQualified -> + match LookupTypeNameInEnvHaveArity fullyQualified id.idText staticResInfo.NumStaticArgs nenv with + | Some tcref when IsEntityAccessible ncenv.amap m2 ad tcref -> + let resInfo = ResolutionInfo.Empty.AddEntity(id.idRange, tcref) + OneResult (ResolveTypeLongIdentInTyconRefPrim ncenv typeNameResInfo ad resInfo genOk 1 m2 tcref id2 rest2) + | _ -> + NoResultsOrUsefulErrors - let modulSearch = - ResolveLongIndentAsModuleOrNamespaceThen ResultCollectionSettings.AllResults ncenv.amap m fullyQualified nenv ad lid - (ResolveTypeLongIdentInModuleOrNamespace ncenv typeNameResInfo ad genOk) - |?> List.concat - - let modulSearchFailed() = - ResolveLongIndentAsModuleOrNamespaceThen ResultCollectionSettings.AllResults ncenv.amap m fullyQualified nenv AccessibleFromSomeFSharpCode lid - (ResolveTypeLongIdentInModuleOrNamespace ncenv typeNameResInfo.DropStaticArgsInfo AccessibleFromSomeFSharpCode genOk) - |?> List.concat - - let searchSoFar = tyconSearch +++ modulSearch - - match searchSoFar with - | Result results -> - // NOTE: we delay checking the CheckForTypeLegitimacyAndMultipleGenericTypeAmbiguities condition until right at the end after we've - // collected all possible resolutions of the type - let tcrefs = CheckForTypeLegitimacyAndMultipleGenericTypeAmbiguities (results, typeNameResInfo, genOk, rangeOfLid lid) - match tcrefs with - | (resInfo,tcref) :: _ -> - // We've already reported the ambiguity, possibly as an error. Now just take the first possible result. - success(resInfo,tcref) - | [] -> + let modulSearch = + ResolveLongIndentAsModuleOrNamespaceThen sink ResultCollectionSettings.AllResults ncenv.amap m2 fullyQualified nenv ad id rest false + (ResolveTypeLongIdentInModuleOrNamespace sink nenv ncenv typeNameResInfo ad genOk) + |?> List.concat + + let modulSearchFailed() = + ResolveLongIndentAsModuleOrNamespaceThen sink ResultCollectionSettings.AllResults ncenv.amap m2 fullyQualified nenv AccessibleFromSomeFSharpCode id rest false + (ResolveTypeLongIdentInModuleOrNamespace sink nenv ncenv typeNameResInfo.DropStaticArgsInfo AccessibleFromSomeFSharpCode genOk) + |?> List.concat + + let searchSoFar = AddResults tyconSearch modulSearch + + match searchSoFar with + | Result results -> + // NOTE: we delay checking the CheckForTypeLegitimacyAndMultipleGenericTypeAmbiguities condition until right at the end after we've + // collected all possible resolutions of the type + let tcrefs = CheckForTypeLegitimacyAndMultipleGenericTypeAmbiguities (results, typeNameResInfo, genOk, m) + match tcrefs with + | (resInfo,tcref) :: _ -> + // We've already reported the ambiguity, possibly as an error. Now just take the first possible result. + success(resInfo,tcref) + | [] -> + // failing case - report nice ambiguity errors even in this case + let r = AddResults searchSoFar (modulSearchFailed()) + AtMostOneResult m2 (r |?> (fun tcrefs -> CheckForTypeLegitimacyAndMultipleGenericTypeAmbiguities (tcrefs, typeNameResInfo, genOk, m))) + | _ -> // failing case - report nice ambiguity errors even in this case - AtMostOneResult m ((searchSoFar +++ modulSearchFailed()) |?> (fun tcrefs -> CheckForTypeLegitimacyAndMultipleGenericTypeAmbiguities (tcrefs, typeNameResInfo, genOk, rangeOfLid lid))) - - | _ -> - // failing case - report nice ambiguity errors even in this case - AtMostOneResult m ((searchSoFar +++ modulSearchFailed()) |?> (fun tcrefs -> CheckForTypeLegitimacyAndMultipleGenericTypeAmbiguities (tcrefs, typeNameResInfo, genOk, rangeOfLid lid))) + let r = AddResults searchSoFar (modulSearchFailed()) + AtMostOneResult m2 (r |?> (fun tcrefs -> CheckForTypeLegitimacyAndMultipleGenericTypeAmbiguities (tcrefs, typeNameResInfo, genOk, m))) /// Resolve a long identifier representing a type and report it let ResolveTypeLongIdent sink (ncenv:NameResolver) occurence fullyQualified nenv ad (lid: Ident list) staticResInfo genOk = let m = rangeOfLid lid - let res = ResolveTypeLongIdentPrim ncenv occurence fullyQualified m nenv ad lid staticResInfo genOk + let res = + match lid with + | [] -> + error(Error(FSComp.SR.nrUnexpectedEmptyLongId(),m)) + | id::rest -> + ResolveTypeLongIdentPrim sink ncenv occurence true fullyQualified m nenv ad id rest staticResInfo genOk + // Register the result as a name resolution match res with | Result (resInfo,tcref) -> @@ -2921,59 +2969,49 @@ let ResolveTypeLongIdent sink (ncenv:NameResolver) occurence fullyQualified nenv //------------------------------------------------------------------------- /// Resolve a long identifier representing a record field in a module or namespace -let rec ResolveFieldInModuleOrNamespace (ncenv:NameResolver) nenv ad (resInfo:ResolutionInfo) depth m (modref: ModuleOrNamespaceRef) _mty (lid: Ident list) = +let rec ResolveFieldInModuleOrNamespace (ncenv:NameResolver) nenv ad (resInfo:ResolutionInfo) depth m (modref: ModuleOrNamespaceRef) _mty (id:Ident) (rest: Ident list) = let typeNameResInfo = TypeNameResolutionInfo.Default - match lid with - | id::rest -> - let m = unionRanges m id.idRange - // search for module-qualified names, e.g. { Microsoft.FSharp.Core.contents = 1 } - let modulScopedFieldNames = - match TryFindTypeWithRecdField modref id with - | Some tycon when IsEntityAccessible ncenv.amap m ad (modref.NestedTyconRef tycon) -> - let showDeprecated = HasFSharpAttribute ncenv.g ncenv.g.attrib_RequireQualifiedAccessAttribute tycon.Attribs - success [resInfo, FieldResolution(modref.RecdFieldRefInNestedTycon tycon id,showDeprecated), rest] - | _ -> raze (UndefinedName(depth,FSComp.SR.undefinedNameRecordLabelOrNamespace,id,NoSuggestions)) - - match modulScopedFieldNames with - | Result (res :: _) -> success res - | _ -> - - // search for type-qualified names, e.g. { Microsoft.FSharp.Core.Ref.contents = 1 } - let tyconSearch = - match lid with - | _tn:: rest when not (isNil rest) -> - let tcrefs = LookupTypeNameInEntityMaybeHaveArity (ncenv.amap, id.idRange, ad, id.idText, TypeNameResolutionStaticArgsInfo.Indefinite, modref) - if isNil tcrefs then NoResultsOrUsefulErrors else - let tcrefs = tcrefs |> List.map (fun tcref -> (ResolutionInfo.Empty,tcref)) - let tyconSearch = ResolveLongIdentInTyconRefs ResultCollectionSettings.AllResults ncenv nenv LookupKind.RecdField (depth+1) m ad rest typeNameResInfo id.idRange tcrefs - // choose only fields - let tyconSearch = tyconSearch |?> List.choose (function (resInfo,Item.RecdField(RecdFieldInfo(_,rfref)),rest) -> Some(resInfo,FieldResolution(rfref,false),rest) | _ -> None) - tyconSearch - | _ -> - NoResultsOrUsefulErrors - - match tyconSearch with - | Result (res :: _) -> success res - | _ -> - - // search for names in nested modules, e.g. { Microsoft.FSharp.Core.contents = 1 } - let modulSearch = - if not (isNil rest) then - match modref.ModuleOrNamespaceType.ModulesAndNamespacesByDemangledName.TryFind(id.idText) with - | Some(AccessibleEntityRef ncenv.amap m ad modref submodref) -> - let resInfo = resInfo.AddEntity(id.idRange,submodref) - ResolveFieldInModuleOrNamespace ncenv nenv ad resInfo (depth+1) m submodref submodref.ModuleOrNamespaceType rest - |> OneResult - | _ -> raze (UndefinedName(depth,FSComp.SR.undefinedNameRecordLabelOrNamespace,id,NoSuggestions)) - else raze (UndefinedName(depth,FSComp.SR.undefinedNameRecordLabelOrNamespace,id,NoSuggestions)) + let m = unionRanges m id.idRange + // search for module-qualified names, e.g. { Microsoft.FSharp.Core.contents = 1 } + let modulScopedFieldNames = + match TryFindTypeWithRecdField modref id with + | Some tycon when IsEntityAccessible ncenv.amap m ad (modref.NestedTyconRef tycon) -> + let showDeprecated = HasFSharpAttribute ncenv.g ncenv.g.attrib_RequireQualifiedAccessAttribute tycon.Attribs + success [resInfo, FieldResolution(modref.RecdFieldRefInNestedTycon tycon id,showDeprecated), rest] + | _ -> raze (UndefinedName(depth,FSComp.SR.undefinedNameRecordLabelOrNamespace,id,NoSuggestions)) - AtMostOneResult m (modulScopedFieldNames +++ tyconSearch +++ modulSearch) - | [] -> - error(InternalError("ResolveFieldInModuleOrNamespace",m)) + // search for type-qualified names, e.g. { Microsoft.FSharp.Core.Ref.contents = 1 } + let tyconSearch() = + match rest with + | id2::rest2 -> + let tcrefs = LookupTypeNameInEntityMaybeHaveArity (ncenv.amap, id.idRange, ad, id.idText, TypeNameResolutionStaticArgsInfo.Indefinite, modref) + if isNil tcrefs then NoResultsOrUsefulErrors else + let tcrefs = tcrefs |> List.map (fun tcref -> (ResolutionInfo.Empty,tcref)) + let tyconSearch = ResolveLongIdentInTyconRefs ResultCollectionSettings.AllResults ncenv nenv LookupKind.RecdField (depth+1) m ad id2 rest2 typeNameResInfo id.idRange tcrefs + // choose only fields + let tyconSearch = tyconSearch |?> List.choose (function (resInfo,Item.RecdField(RecdFieldInfo(_,rfref)),rest) -> Some(resInfo,FieldResolution(rfref,false),rest) | _ -> None) + tyconSearch + | _ -> + NoResultsOrUsefulErrors + + // search for names in nested modules, e.g. { Microsoft.FSharp.Core.contents = 1 } + let modulSearch() = + match rest with + | id2::rest2 -> + match modref.ModuleOrNamespaceType.ModulesAndNamespacesByDemangledName.TryGetValue id.idText with + | true, AccessibleEntityRef ncenv.amap m ad modref submodref -> + let resInfo = resInfo.AddEntity(id.idRange,submodref) + ResolveFieldInModuleOrNamespace ncenv nenv ad resInfo (depth+1) m submodref submodref.ModuleOrNamespaceType id2 rest2 + |> OneResult + | _ -> raze (UndefinedName(depth,FSComp.SR.undefinedNameRecordLabelOrNamespace,id,NoSuggestions)) + | _ -> raze (UndefinedName(depth,FSComp.SR.undefinedNameRecordLabelOrNamespace,id,NoSuggestions)) + + modulScopedFieldNames +++ tyconSearch +++ modulSearch + |> AtMostOneResult m /// Suggest other labels of the same record -let SuggestOtherLabelsOfSameRecordType g (nenv:NameResolutionEnv) typ (id:Ident) (allFields:Ident list) = - let labelsOfPossibleRecord = GetRecordLabelsForType g nenv typ +let SuggestOtherLabelsOfSameRecordType g (nenv:NameResolutionEnv) ty (id:Ident) (allFields:Ident list) = + let labelsOfPossibleRecord = GetRecordLabelsForType g nenv ty let givenFields = allFields @@ -2995,9 +3033,9 @@ let SuggestLabelsOfRelatedRecords g (nenv:NameResolutionEnv) (id:Ident) (allFiel else let possibleRecords = [for fld in givenFields do - match Map.tryFind fld nenv.eFieldLabels with - | None -> () - | Some recordTypes -> yield! (recordTypes |> List.map (fun r -> r.TyconRef.DisplayName, fld)) ] + match nenv.eFieldLabels.TryGetValue fld with + | true, recordTypes -> yield! (recordTypes |> List.map (fun r -> r.TyconRef.DisplayName, fld)) + | _ -> () ] |> List.groupBy fst |> List.map (fun (r,fields) -> r, fields |> List.map snd) |> List.filter (fun (_,fields) -> givenFields.IsSubsetOf fields) @@ -3035,7 +3073,7 @@ let SuggestLabelsOfRelatedRecords g (nenv:NameResolutionEnv) (id:Ident) (allFiel UndefinedName(0,FSComp.SR.undefinedNameRecordLabel, id, suggestLabels) /// Resolve a long identifier representing a record field -let ResolveFieldPrim (ncenv:NameResolver) nenv ad typ (mp,id:Ident) allFields = +let ResolveFieldPrim sink (ncenv:NameResolver) nenv ad ty (mp,id:Ident) allFields = let typeNameResInfo = TypeNameResolutionInfo.Default let g = ncenv.g let m = id.idRange @@ -3053,14 +3091,14 @@ let ResolveFieldPrim (ncenv:NameResolver) nenv ad typ (mp,id:Ident) allFields = |> ListSet.setify (fun fref1 fref2 -> tyconRefEq g fref1.TyconRef fref2.TyconRef) |> List.map (fun x -> ResolutionInfo.Empty, FieldResolution(x,false)) - if isAppTy g typ then - match ncenv.InfoReader.TryFindRecdOrClassFieldInfoOfType(id.idText,m,typ) with - | Some (RecdFieldInfo(_,rfref)) -> [ResolutionInfo.Empty, FieldResolution(rfref,false)] - | None -> - if isRecdTy g typ then + if isAppTy g ty then + match ncenv.InfoReader.TryFindRecdOrClassFieldInfoOfType(id.idText,m,ty) with + | ValueSome (RecdFieldInfo(_,rfref)) -> [ResolutionInfo.Empty, FieldResolution(rfref,false)] + | _ -> + if isRecdTy g ty then // record label doesn't belong to record type -> suggest other labels of same record - let suggestLabels() = SuggestOtherLabelsOfSameRecordType g nenv typ id allFields - let typeName = NicePrint.minimalStringOfType nenv.eDisplayEnv typ + let suggestLabels() = SuggestOtherLabelsOfSameRecordType g nenv ty id allFields + let typeName = NicePrint.minimalStringOfType nenv.eDisplayEnv ty let errorText = FSComp.SR.nrRecordDoesNotContainSuchLabel(typeName,id.idText) error(ErrorWithSuggestions(errorText, m, id.idText, suggestLabels)) else @@ -3069,54 +3107,38 @@ let ResolveFieldPrim (ncenv:NameResolver) nenv ad typ (mp,id:Ident) allFields = lookup() | _ -> let lid = (mp@[id]) - let tyconSearch ad = + let tyconSearch ad () = match lid with - | tn:: (_ :: _ as rest) -> + | tn :: id2 :: rest2 -> let m = tn.idRange let tcrefs = LookupTypeNameInEnvNoArity OpenQualified tn.idText nenv if isNil tcrefs then NoResultsOrUsefulErrors else let tcrefs = tcrefs |> List.map (fun tcref -> (ResolutionInfo.Empty,tcref)) - let tyconSearch = ResolveLongIdentInTyconRefs ResultCollectionSettings.AllResults ncenv nenv LookupKind.RecdField 1 m ad rest typeNameResInfo tn.idRange tcrefs + let tyconSearch = ResolveLongIdentInTyconRefs ResultCollectionSettings.AllResults ncenv nenv LookupKind.RecdField 1 m ad id2 rest2 typeNameResInfo tn.idRange tcrefs // choose only fields let tyconSearch = tyconSearch |?> List.choose (function (resInfo,Item.RecdField(RecdFieldInfo(_,rfref)),rest) -> Some(resInfo,FieldResolution(rfref,false),rest) | _ -> None) tyconSearch | _ -> NoResultsOrUsefulErrors - let modulSearch ad = - ResolveLongIndentAsModuleOrNamespaceThen ResultCollectionSettings.AtMostOneResult ncenv.amap m OpenQualified nenv ad lid - (ResolveFieldInModuleOrNamespace ncenv nenv ad) - - let search = - let moduleSearch1 = modulSearch ad - - match moduleSearch1 with - | Result (res :: _) -> success res - | _ -> - - let tyconSearch1 = tyconSearch ad - - match tyconSearch1 with - | Result (res :: _) -> success res - | _ -> - - let moduleSearch2 = modulSearch AccessibleFromSomeFSharpCode - - match moduleSearch2 with - | Result (res :: _) -> success res - | _ -> - - let tyconSearch2 = tyconSearch AccessibleFromSomeFSharpCode + let modulSearch ad () = + match lid with + | [] -> NoResultsOrUsefulErrors + | id2::rest2 -> + ResolveLongIndentAsModuleOrNamespaceThen sink ResultCollectionSettings.AtMostOneResult ncenv.amap m OpenQualified nenv ad id2 rest2 false + (ResolveFieldInModuleOrNamespace ncenv nenv ad) - AtMostOneResult m (moduleSearch1 +++ tyconSearch1 +++ moduleSearch2 +++ tyconSearch2) + let resInfo,item,rest = + modulSearch ad () +++ tyconSearch ad +++ modulSearch AccessibleFromSomeFSharpCode +++ tyconSearch AccessibleFromSomeFSharpCode + |> AtMostOneResult m + |> ForceRaise - let resInfo,item,rest = ForceRaise search if not (isNil rest) then errorR(Error(FSComp.SR.nrInvalidFieldLabel(),(List.head rest).idRange)) [(resInfo,item)] -let ResolveField sink ncenv nenv ad typ (mp,id) allFields = - let res = ResolveFieldPrim ncenv nenv ad typ (mp,id) allFields +let ResolveField sink ncenv nenv ad ty (mp,id) allFields = + let res = ResolveFieldPrim sink ncenv nenv ad ty (mp,id) allFields // Register the results of any field paths "Module.Type" in "Module.Type.field" as a name resolution. (Note, the path resolution // info is only non-empty if there was a unique resolution of the field) let checker = ResultTyparChecker(fun () -> true) @@ -3130,7 +3152,6 @@ let FreshenRecdFieldRef (ncenv:NameResolver) m (rfref:RecdFieldRef) = Item.RecdField(RecdFieldInfo(ncenv.InstantiationGenerator m (rfref.Tycon.Typars m), rfref)) - /// Resolve F#/IL "." syntax in expressions (2). /// /// We have an expr. on the left, and we do an access, e.g. @@ -3140,36 +3161,31 @@ let FreshenRecdFieldRef (ncenv:NameResolver) m (rfref:RecdFieldRef) = /// determine any valid members // // QUERY (instantiationGenerator cleanup): it would be really nice not to flow instantiationGenerator to here. -let private ResolveExprDotLongIdent (ncenv:NameResolver) m ad nenv typ lid findFlag = +let private ResolveExprDotLongIdent (ncenv:NameResolver) m ad nenv ty (id:Ident) rest findFlag = let typeNameResInfo = TypeNameResolutionInfo.Default - let adhoctDotSearchAccessible = AtMostOneResult m (ResolveLongIdentInTypePrim ncenv nenv LookupKind.Expr ResolutionInfo.Empty 1 m ad lid findFlag typeNameResInfo typ) + let adhoctDotSearchAccessible = AtMostOneResult m (ResolveLongIdentInTypePrim ncenv nenv LookupKind.Expr ResolutionInfo.Empty 1 m ad id rest findFlag typeNameResInfo ty) match adhoctDotSearchAccessible with | Exception _ -> // If the dot is not resolved by adhoc overloading then look for a record field // that can resolve the name. let dotFieldIdSearch = // If the type is already known, we should not try to lookup a record field - if isAppTy ncenv.g typ then + if isAppTy ncenv.g ty then NoResultsOrUsefulErrors else - match lid with - // A unique record label access, e.g expr.field - | id::rest when nenv.eFieldLabels.ContainsKey(id.idText) -> - match nenv.eFieldLabels.[id.idText] with - | [] -> NoResultsOrUsefulErrors - | rfref :: _ -> - // NOTE (instantiationGenerator cleanup): we need to freshen here because we don't know the type. - // But perhaps the caller should freshen?? - let item = FreshenRecdFieldRef ncenv m rfref - OneSuccess (ResolutionInfo.Empty,item,rest) - | _ -> NoResultsOrUsefulErrors + match nenv.eFieldLabels.TryGetValue id.idText with + | true, rfref :: _ -> + // NOTE (instantiationGenerator cleanup): we need to freshen here because we don't know the type. + // But perhaps the caller should freshen?? + let item = FreshenRecdFieldRef ncenv m rfref + OneSuccess (ResolutionInfo.Empty,item,rest) + | _ -> NoResultsOrUsefulErrors - let search = dotFieldIdSearch - match AtMostOneResult m search with - | Result _ as res -> ForceRaise res - | _ -> - let adhocDotSearchAll = ResolveLongIdentInTypePrim ncenv nenv LookupKind.Expr ResolutionInfo.Empty 1 m AccessibleFromSomeFSharpCode lid findFlag typeNameResInfo typ - ForceRaise (AtMostOneResult m (search +++ adhocDotSearchAll)) + let adhocDotSearchAll () = ResolveLongIdentInTypePrim ncenv nenv LookupKind.Expr ResolutionInfo.Empty 1 m AccessibleFromSomeFSharpCode id rest findFlag typeNameResInfo ty + + dotFieldIdSearch +++ adhocDotSearchAll + |> AtMostOneResult m + |> ForceRaise | _ -> ForceRaise adhoctDotSearchAccessible @@ -3177,7 +3193,7 @@ let ComputeItemRange wholem (lid: Ident list) rest = match rest with | [] -> wholem | _ -> - let ids = List.take (max 0 (lid.Length - rest.Length)) lid + let ids = List.truncate (max 0 (lid.Length - rest.Length)) lid match ids with | [] -> wholem | _ -> rangeOfLid ids @@ -3199,9 +3215,9 @@ let NeedsWorkAfterResolution namedItem = | Item.CtorGroup(_,minfos) -> minfos.Length > 1 || minfos |> List.exists (fun minfo -> not (isNil minfo.FormalMethodInst)) | Item.Property(_,pinfos) -> pinfos.Length > 1 | Item.ImplicitOp(_, { contents = Some(TraitConstraintSln.FSMethSln(_, vref, _)) }) - | Item.Value vref | Item.CustomBuilder (_,vref) -> vref.Typars.Length > 0 + | Item.Value vref | Item.CustomBuilder (_,vref) -> not (List.isEmpty vref.Typars) | Item.CustomOperation (_,_,Some minfo) -> not (isNil minfo.FormalMethodInst) - | Item.ActivePatternCase apref -> apref.ActivePatternVal.Typars.Length > 0 + | Item.ActivePatternCase apref -> not (List.isEmpty apref.ActivePatternVal.Typars) | _ -> false /// Specifies additional work to do after an item has been processed further in type checking. @@ -3278,9 +3294,13 @@ let (|NonOverridable|_|) namedItem = /// Called for 'expression.Bar' - for VS IntelliSense, we can filter out static members from method groups /// Also called for 'GenericType.Bar' - for VS IntelliSense, we can filter out non-static members from method groups -let ResolveExprDotLongIdentAndComputeRange (sink:TcResultsSink) (ncenv:NameResolver) wholem ad nenv typ lid findFlag thisIsActuallyATyAppNotAnExpr = +let ResolveExprDotLongIdentAndComputeRange (sink:TcResultsSink) (ncenv:NameResolver) wholem ad nenv ty lid findFlag thisIsActuallyATyAppNotAnExpr = let resolveExpr findFlag = - let resInfo,item,rest = ResolveExprDotLongIdent ncenv wholem ad nenv typ lid findFlag + let resInfo,item,rest = + match lid with + | id::rest -> + ResolveExprDotLongIdent ncenv wholem ad nenv ty id rest findFlag + | _ -> error(InternalError("ResolveExprDotLongIdentAndComputeRange",wholem)) let itemRange = ComputeItemRange wholem lid rest resInfo,item,rest,itemRange // "true" resolution @@ -3383,33 +3403,31 @@ let ItemOfTy g x = let nm = if isAppTy g x then (tcrefOfAppTy g x).DisplayName else "?" Item.Types (nm,[x]) -// Filter out 'PrivateImplementationDetail' classes -let IsInterestingModuleName nm = - String.length nm >= 1 && - String.sub nm 0 1 <> "<" +// Filter out 'PrivateImplementationDetail' classes +let IsInterestingModuleName nm = not (System.String.IsNullOrEmpty nm) && nm.[0] <> '<' let rec PartialResolveLookupInModuleOrNamespaceAsModuleOrNamespaceThen f plid (modref:ModuleOrNamespaceRef) = let mty = modref.ModuleOrNamespaceType match plid with | [] -> f modref | id:: rest -> - match mty.ModulesAndNamespacesByDemangledName.TryFind(id) with - | Some mty -> PartialResolveLookupInModuleOrNamespaceAsModuleOrNamespaceThen f rest (modref.NestedTyconRef mty) - | None -> [] + match mty.ModulesAndNamespacesByDemangledName.TryGetValue id with + | true, mty -> PartialResolveLookupInModuleOrNamespaceAsModuleOrNamespaceThen f rest (modref.NestedTyconRef mty) + | _ -> [] let PartialResolveLongIndentAsModuleOrNamespaceThen (nenv:NameResolutionEnv) plid f = - match plid with + match plid with | id:: rest -> - match Map.tryFind id nenv.eModulesAndNamespaces with - | Some modrefs -> + match nenv.eModulesAndNamespaces.TryGetValue id with + | true, modrefs -> List.collect (PartialResolveLookupInModuleOrNamespaceAsModuleOrNamespaceThen f rest) modrefs - | None -> + | _ -> [] | [] -> [] /// Returns fields for the given class or record -let ResolveRecordOrClassFieldsOfType (ncenv: NameResolver) m ad typ statics = - ncenv.InfoReader.GetRecordOrClassFieldsOfType(None,ad,m,typ) +let ResolveRecordOrClassFieldsOfType (ncenv: NameResolver) m ad ty statics = + ncenv.InfoReader.GetRecordOrClassFieldsOfType(None,ad,m,ty) |> List.filter (fun rfref -> rfref.IsStatic = statics && IsFieldInfoAccessible ad rfref) |> List.map Item.RecdField @@ -3423,26 +3441,28 @@ type ResolveCompletionTargets = | SettablePropertiesAndFields -> false /// Resolve a (possibly incomplete) long identifier to a set of possible resolutions, qualified by type. -let ResolveCompletionsInType (ncenv: NameResolver) nenv (completionTargets: ResolveCompletionTargets) m ad statics typ = +let ResolveCompletionsInType (ncenv: NameResolver) nenv (completionTargets: ResolveCompletionTargets) m ad statics ty = protectAssemblyExploration [] <| fun () -> let g = ncenv.g let amap = ncenv.amap let rfinfos = - ncenv.InfoReader.GetRecordOrClassFieldsOfType(None,ad,m,typ) + ncenv.InfoReader.GetRecordOrClassFieldsOfType(None,ad,m,ty) |> List.filter (fun rfref -> rfref.IsStatic = statics && IsFieldInfoAccessible ad rfref) - let ucinfos = - if completionTargets.ResolveAll && statics && isAppTy g typ then - let tc,tinst = destAppTy g typ - tc.UnionCasesAsRefList - |> List.filter (IsUnionCaseUnseen ad g ncenv.amap m >> not) - |> List.map (fun ucref -> Item.UnionCase(UnionCaseInfo(tinst,ucref),false)) + let ucinfos = + if completionTargets.ResolveAll && statics then + match tryAppTy g ty with + | ValueSome (tc,tinst) -> + tc.UnionCasesAsRefList + |> List.filter (IsUnionCaseUnseen ad g ncenv.amap m >> not) + |> List.map (fun ucref -> Item.UnionCase(UnionCaseInfo(tinst,ucref),false)) + | _ -> [] else [] let einfos = if completionTargets.ResolveAll then - ncenv.InfoReader.GetEventInfosOfType(None,ad,m,typ) + ncenv.InfoReader.GetEventInfosOfType(None,ad,m,ty) |> List.filter (fun x -> IsStandardEventInfo ncenv.InfoReader m ad x && x.IsStatic = statics) @@ -3450,19 +3470,20 @@ let ResolveCompletionsInType (ncenv: NameResolver) nenv (completionTargets: Reso let nestedTypes = if completionTargets.ResolveAll && statics then - typ + ty |> GetNestedTypesOfType (ad, ncenv, None, TypeNameResolutionStaticArgsInfo.Indefinite, false, m) else [] let finfos = - ncenv.InfoReader.GetILFieldInfosOfType(None,ad,m,typ) + ncenv.InfoReader.GetILFieldInfosOfType(None,ad,m,ty) |> List.filter (fun x -> not x.IsSpecialName && x.IsStatic = statics && IsILFieldInfoAccessible g amap m ad x) + let pinfosIncludingUnseen = - AllPropInfosOfTypeInScope ncenv.InfoReader nenv (None,ad) PreferOverrides m typ + AllPropInfosOfTypeInScope ncenv.InfoReader nenv (None,ad) PreferOverrides m ty |> List.filter (fun x -> x.IsStatic = statics && IsPropInfoAccessible g amap m ad x) @@ -3484,56 +3505,57 @@ let ResolveCompletionsInType (ncenv: NameResolver) nenv (completionTargets: Reso let (SigOfFunctionForDelegate(invokeMethInfo,_,_,_)) = GetSigOfFunctionForDelegate ncenv.InfoReader delegateType m ad // Only events with void return types are suppressed in intellisense. if slotSigHasVoidReturnTy (invokeMethInfo.GetSlotSig(amap, m)) then - yield einfo.GetAddMethod().DisplayName - yield einfo.GetRemoveMethod().DisplayName ] + yield einfo.AddMethod.DisplayName + yield einfo.RemoveMethod.DisplayName ] else [] - let suppressedMethNames = Zset.ofList String.order (pinfoMethNames @ einfoMethNames) - let pinfos = pinfosIncludingUnseen |> List.filter (fun x -> not (PropInfoIsUnseen m x)) - let minfoFilter (minfo:MethInfo) = + let minfoFilter (suppressedMethNames:Zset<_>) (minfo:MethInfo) = let isApplicableMeth = match completionTargets with | ResolveCompletionTargets.All x -> x | _ -> failwith "internal error: expected completionTargets = ResolveCompletionTargets.All" + // Only show the Finalize, MemberwiseClose etc. methods on System.Object for values whose static type really is // System.Object. Few of these are typically used from F#. // // Don't show GetHashCode or Equals for F# types that admit equality as an abnormal operation let isUnseenDueToBasicObjRules = - not (isObjTy g typ) && + not (isObjTy g ty) && not minfo.IsExtensionMember && match minfo.LogicalName with | "GetType" -> false - | "GetHashCode" -> isObjTy g minfo.EnclosingType && not (AugmentWithHashCompare.TypeDefinitelyHasEquality g typ) + | "GetHashCode" -> isObjTy g minfo.ApparentEnclosingType && not (AugmentWithHashCompare.TypeDefinitelyHasEquality g ty) | "ToString" -> false | "Equals" -> - if not (isObjTy g minfo.EnclosingType) then + if not (isObjTy g minfo.ApparentEnclosingType) then // declaring type is not System.Object - show it false elif minfo.IsInstance then // System.Object has only one instance Equals method and we want to suppress it unless Augment.TypeDefinitelyHasEquality is true - not (AugmentWithHashCompare.TypeDefinitelyHasEquality g typ) + not (AugmentWithHashCompare.TypeDefinitelyHasEquality g ty) else // System.Object has only one static Equals method and we always want to suppress it true | _ -> // filter out self methods of obj type - isObjTy g minfo.EnclosingType + isObjTy g minfo.ApparentEnclosingType + let result = not isUnseenDueToBasicObjRules && not minfo.IsInstance = statics && IsMethInfoAccessible amap m ad minfo && - not (MethInfoIsUnseen g m typ minfo) && + not (MethInfoIsUnseen g m ty minfo) && not minfo.IsConstructor && not minfo.IsClassConstructor && not (minfo.LogicalName = ".cctor") && not (minfo.LogicalName = ".ctor") && - isApplicableMeth minfo typ && + isApplicableMeth minfo ty && not (suppressedMethNames.Contains minfo.LogicalName) + result let pinfoItems = @@ -3552,39 +3574,55 @@ let ResolveCompletionsInType (ncenv: NameResolver) nenv (completionTargets: Reso // REVIEW: add a name filter here in the common cases? let minfos = if completionTargets.ResolveAll then - let minfos = - AllMethInfosOfTypeInScope ncenv.InfoReader nenv (None,ad) PreferOverrides m typ - |> List.filter minfoFilter + let minfos = AllMethInfosOfTypeInScope ncenv.InfoReader nenv (None,ad) PreferOverrides m ty + if isNil minfos then + [] + else + let suppressedMethNames = Zset.ofList String.order (pinfoMethNames @ einfoMethNames) - let minfos = - let addersAndRemovers = - pinfoItems - |> List.collect (function Item.Event(FSEvent(_,_,addValRef,removeValRef)) -> [addValRef.LogicalName;removeValRef.LogicalName] | _ -> []) - |> set + let minfos = + minfos + |> List.filter (minfoFilter suppressedMethNames) - if addersAndRemovers.IsEmpty then minfos - else minfos |> List.filter (fun minfo -> not (addersAndRemovers.Contains minfo.LogicalName)) + if isNil minfos then + [] + else + let minfos = + let addersAndRemovers = + let hashSet = HashSet() + for item in pinfoItems do + match item with + | Item.Event(FSEvent(_,_,addValRef,removeValRef)) -> + hashSet.Add addValRef.LogicalName |> ignore + hashSet.Add removeValRef.LogicalName |> ignore + | _ -> () + hashSet + + if addersAndRemovers.Count = 0 then minfos + else minfos |> List.filter (fun minfo -> not (addersAndRemovers.Contains minfo.LogicalName)) #if !NO_EXTENSIONTYPING - // Filter out the ones with mangled names from applying static parameters - let minfos = - let methsWithStaticParams = - minfos - |> List.filter (fun minfo -> - match minfo.ProvidedStaticParameterInfo with - | Some (_methBeforeArguments, staticParams) -> staticParams.Length <> 0 - | _ -> false) - |> List.map (fun minfo -> minfo.DisplayName) - - if methsWithStaticParams.IsEmpty then minfos - else minfos |> List.filter (fun minfo -> - let nm = minfo.LogicalName - not (nm.Contains "," && methsWithStaticParams |> List.exists (fun m -> nm.StartsWith(m)))) + // Filter out the ones with mangled names from applying static parameters + let minfos = + let methsWithStaticParams = + minfos + |> List.filter (fun minfo -> + match minfo.ProvidedStaticParameterInfo with + | Some (_methBeforeArguments, staticParams) -> staticParams.Length <> 0 + | _ -> false) + |> List.map (fun minfo -> minfo.DisplayName) + + if methsWithStaticParams.IsEmpty then minfos + else minfos |> List.filter (fun minfo -> + let nm = minfo.LogicalName + not (nm.Contains "," && methsWithStaticParams |> List.exists (fun m -> nm.StartsWithOrdinal(m)))) #endif - minfos + minfos + + else + [] - else [] // Partition methods into overload sets let rec partitionl (l:MethInfo list) acc = match l with @@ -3603,39 +3641,37 @@ let ResolveCompletionsInType (ncenv: NameResolver) nenv (completionTargets: Reso List.map Item.MakeMethGroup (NameMap.toList (partitionl minfos Map.empty)) -let rec ResolvePartialLongIdentInType (ncenv: NameResolver) nenv isApplicableMeth m ad statics plid typ = +let rec ResolvePartialLongIdentInType (ncenv: NameResolver) nenv isApplicableMeth m ad statics plid ty = let g = ncenv.g let amap = ncenv.amap match plid with - | [] -> ResolveCompletionsInType ncenv nenv isApplicableMeth m ad statics typ + | [] -> ResolveCompletionsInType ncenv nenv isApplicableMeth m ad statics ty | id :: rest -> let rfinfos = - ncenv.InfoReader.GetRecordOrClassFieldsOfType(None,ad,m,typ) - |> List.filter (fun fref -> IsRecdFieldAccessible ncenv.amap m ad fref.RecdFieldRef) - |> List.filter (fun fref -> fref.RecdField.IsStatic = statics) + ncenv.InfoReader.GetRecordOrClassFieldsOfType(None,ad,m,ty) + |> List.filter (fun fref -> fref.Name = id && IsRecdFieldAccessible ncenv.amap m ad fref.RecdFieldRef && fref.RecdField.IsStatic = statics) let nestedTypes = - typ + ty |> GetNestedTypesOfType (ad, ncenv, Some id, TypeNameResolutionStaticArgsInfo.Indefinite, false, m) // e.g. .. - (rfinfos |> List.filter (fun x -> x.Name = id) - |> List.collect (fun x -> x.FieldType |> ResolvePartialLongIdentInType ncenv nenv isApplicableMeth m ad false rest)) @ + (rfinfos |> List.collect (fun x -> x.FieldType |> ResolvePartialLongIdentInType ncenv nenv isApplicableMeth m ad false rest)) @ // e.g. .. let FullTypeOfPinfo(pinfo:PropInfo) = - let rty = pinfo.GetPropertyType(amap,m) - let rty = if pinfo.IsIndexer then mkRefTupledTy g (pinfo.GetParamTypes(amap, m)) --> rty else rty - rty - (typ + let rty = pinfo.GetPropertyType(amap,m) + let rty = if pinfo.IsIndexer then mkRefTupledTy g (pinfo.GetParamTypes(amap, m)) --> rty else rty + rty + + (ty |> AllPropInfosOfTypeInScope ncenv.InfoReader nenv (Some id,ad) IgnoreOverrides m - |> List.filter (fun x -> x.IsStatic = statics) - |> List.filter (IsPropInfoAccessible g amap m ad) + |> List.filter (fun pinfo -> pinfo.IsStatic = statics && IsPropInfoAccessible g amap m ad pinfo) |> List.collect (fun pinfo -> (FullTypeOfPinfo pinfo) |> ResolvePartialLongIdentInType ncenv nenv isApplicableMeth m ad false rest)) @ // e.g. .. - (ncenv.InfoReader.GetEventInfosOfType(Some id,ad,m,typ) + (ncenv.InfoReader.GetEventInfosOfType(Some id,ad,m,ty) |> List.collect (PropTypOfEventInfo ncenv.InfoReader m ad >> ResolvePartialLongIdentInType ncenv nenv isApplicableMeth m ad false rest)) @ // nested types! @@ -3643,7 +3679,7 @@ let rec ResolvePartialLongIdentInType (ncenv: NameResolver) nenv isApplicableMet |> List.collect (ResolvePartialLongIdentInType ncenv nenv isApplicableMeth m ad statics rest)) @ // e.g. .. - (ncenv.InfoReader.GetILFieldInfosOfType(Some id,ad,m,typ) + (ncenv.InfoReader.GetILFieldInfosOfType(Some id,ad,m,ty) |> List.filter (fun x -> not x.IsSpecialName && x.IsStatic = statics && @@ -3657,17 +3693,18 @@ let InfosForTyconConstructors (ncenv:NameResolver) m ad (tcref:TyconRef) = if tcref.IsTypeAbbrev then [] else - let typ = FreshenTycon ncenv m tcref - match ResolveObjectConstructor ncenv (DisplayEnv.Empty g) m ad typ with + let ty = FreshenTycon ncenv m tcref + match ResolveObjectConstructor ncenv (DisplayEnv.Empty g) m ad ty with | Result item -> match item with | Item.FakeInterfaceCtor _ -> [] | Item.CtorGroup(nm,ctorInfos) -> let ctors = ctorInfos - |> List.filter (IsMethInfoAccessible amap m ad) - |> List.filter (MethInfoIsUnseen g m typ >> not) - match ctors with + |> List.filter (fun minfo -> + IsMethInfoAccessible amap m ad minfo && + not (MethInfoIsUnseen g m ty minfo)) + match ctors with | [] -> [] | _ -> [Item.MakeCtorGroup(nm,ctors)] | item -> @@ -3675,9 +3712,23 @@ let InfosForTyconConstructors (ncenv:NameResolver) m ad (tcref:TyconRef) = | Exception _ -> [] /// import.fs creates somewhat fake modules for nested members of types (so that -/// types never contain other types) -let notFakeContainerModule tyconNames nm = - not (Set.contains nm tyconNames) +/// types never contain other types) +let inline notFakeContainerModule (tyconNames:HashSet<_>) nm = + not (tyconNames.Contains nm) + +let getFakeContainerModulesFromTycons (tycons:#seq) = + let hashSet = HashSet() + for tycon in tycons do + if tycon.IsILTycon then + hashSet.Add tycon.DisplayName |> ignore + hashSet + +let getFakeContainerModulesFromTyconRefs (tyconRefs:#seq) = + let hashSet = HashSet() + for tyconRef in tyconRefs do + if tyconRef.IsILTycon then + hashSet.Add tyconRef.DisplayName |> ignore + hashSet /// Check is a namespace or module contains something accessible let rec private EntityRefContainsSomethingAccessible (ncenv: NameResolver) m ad (modref:ModuleOrNamespaceRef) = @@ -3721,21 +3772,34 @@ let rec ResolvePartialLongIdentInModuleOrNamespace (ncenv: NameResolver) nenv is match plid with | [] -> let tycons = - mty.TypeDefinitions - |> List.filter (fun tcref -> not (tcref.LogicalName.Contains(","))) - |> List.filter (fun tycon -> not (IsTyconUnseen ad g ncenv.amap m (modref.NestedTyconRef tycon))) + mty.TypeDefinitions |> List.filter (fun tcref -> + not (tcref.LogicalName.Contains(",")) && + not (IsTyconUnseen ad g ncenv.amap m (modref.NestedTyconRef tcref))) + + let accessibleSubModules = + let moduleOrNamespaces = + mty.ModulesAndNamespacesByDemangledName + |> NameMap.range - let ilTyconNames = - mty.TypesByAccessNames.Values - |> List.choose (fun (tycon:Tycon) -> if tycon.IsILTycon then Some tycon.DisplayName else None) - |> Set.ofList + if isNil moduleOrNamespaces then [] else + + let ilTyconNames = getFakeContainerModulesFromTycons mty.TypesByAccessNames.Values + + moduleOrNamespaces + |> List.filter (fun x -> + let demangledName = x.DemangledModuleOrNamespaceName + notFakeContainerModule ilTyconNames demangledName && IsInterestingModuleName demangledName) + |> List.map modref.NestedTyconRef + |> List.filter (fun tyref -> + not (IsTyconUnseen ad g ncenv.amap m tyref) && + EntityRefContainsSomethingAccessible ncenv m ad tyref) + |> List.map ItemForModuleOrNamespaceRef // Collect up the accessible values in the module, excluding the members (mty.AllValsAndMembers |> Seq.toList |> List.choose (TryMkValRefInModRef modref) // if the assembly load set is incomplete and we get a None value here, then ignore the value - |> List.filter (fun v -> not v.IsMember) - |> List.filter (IsValUnseen ad g m >> not) + |> List.filter (fun vref -> not vref.IsMember && not (IsValUnseen ad g m vref)) |> List.map Item.Value) // Collect up the accessible discriminated union cases in the module @@ -3757,16 +3821,7 @@ let rec ResolvePartialLongIdentInModuleOrNamespace (ncenv: NameResolver) nenv is |> List.filter (IsTyconUnseen ad g ncenv.amap m >> not) |> List.map Item.ExnCase) - // Collect up the accessible sub-modules - @ (mty.ModulesAndNamespacesByDemangledName - |> NameMap.range - |> List.filter (fun x -> - let demangledName = x.DemangledModuleOrNamespaceName - notFakeContainerModule ilTyconNames demangledName && IsInterestingModuleName demangledName) - |> List.map modref.NestedTyconRef - |> List.filter (IsTyconUnseen ad g ncenv.amap m >> not) - |> List.filter (EntityRefContainsSomethingAccessible ncenv m ad) - |> List.map ItemForModuleOrNamespaceRef) + @ accessibleSubModules // Get all the types and .NET constructor groups accessible from here @ (tycons @@ -3777,11 +3832,13 @@ let rec ResolvePartialLongIdentInModuleOrNamespace (ncenv: NameResolver) nenv is | id :: rest -> - (match mty.ModulesAndNamespacesByDemangledName.TryFind(id) with - | Some mspec - when not (IsTyconUnseenObsoleteSpec ad g ncenv.amap m (modref.NestedTyconRef mspec) allowObsolete) -> - let allowObsolete = rest <> [] && allowObsolete - ResolvePartialLongIdentInModuleOrNamespace ncenv nenv isApplicableMeth m ad (modref.NestedTyconRef mspec) rest allowObsolete + (match mty.ModulesAndNamespacesByDemangledName.TryGetValue id with + | true, mspec -> + let nested = modref.NestedTyconRef mspec + if IsTyconUnseenObsoleteSpec ad g ncenv.amap m nested allowObsolete then [] else + let allowObsolete = allowObsolete && not (isNil rest) + ResolvePartialLongIdentInModuleOrNamespace ncenv nenv isApplicableMeth m ad nested rest allowObsolete + | _ -> []) @ (LookupTypeNameInEntityNoArity m id modref.ModuleOrNamespaceType @@ -3799,30 +3856,27 @@ let TryToResolveLongIdentAsType (ncenv: NameResolver) (nenv: NameResolutionEnv) match List.tryLast plid with | Some id -> // Look for values called 'id' that accept the dot-notation - let typ, isItemVal = - (match nenv.eUnqualifiedItems |> Map.tryFind id with + let ty = + match nenv.eUnqualifiedItems.TryGetValue id with // v.lookup : member of a value - | Some v -> - match v with - | Item.Value x -> - let typ = x.Type - let typ = if x.BaseOrThisInfo = CtorThisVal && isRefCellTy g typ then destRefCellTy g typ else typ - Some typ, true - | _ -> None, false - | None -> None, false) - - if isItemVal then typ - else + | true, v -> + match v with + | Item.Value x -> + let ty = x.Type + let ty = if x.BaseOrThisInfo = CtorThisVal && isRefCellTy g ty then destRefCellTy g ty else ty + Some ty + | _ -> None + | _ -> None + + match ty with + | Some _ -> ty + | _ -> + // type.lookup : lookup a static something in a type LookupTypeNameInEnvNoArity OpenQualified id nenv - |> List.fold (fun resTyp tcref -> - // type.lookup : lookup a static something in a type + |> List.tryHead + |> Option.map (fun tcref -> let tcref = ResolveNestedTypeThroughAbbreviation ncenv tcref m - let typ = FreshenTycon ncenv m tcref - let resTyp = - match resTyp with - | Some _ -> resTyp - | None -> Some typ - resTyp) typ + FreshenTycon ncenv m tcref) | _ -> None /// allowObsolete - specifies whether we should return obsolete types & modules @@ -3837,10 +3891,6 @@ let rec ResolvePartialLongIdentPrim (ncenv: NameResolver) (nenv: NameResolutionE | [] -> - let ilTyconNames = - nenv.TyconsByAccessNames(fullyQualified).Values - |> List.choose (fun tyconRef -> if tyconRef.IsILTycon then Some tyconRef.DisplayName else None) - |> Set.ofList /// Include all the entries in the eUnqualifiedItems table. let unqualifiedItems = @@ -3862,21 +3912,28 @@ let rec ResolvePartialLongIdentPrim (ncenv: NameResolver) (nenv: NameResolutionE |> NameMap.range |> List.filter (function Item.ActivePatternCase _v -> true | _ -> false) - let moduleAndNamespaceItems = - nenv.ModulesAndNamespaces(fullyQualified) - |> NameMultiMap.range - |> List.filter (fun x -> - let demangledName = x.DemangledModuleOrNamespaceName - IsInterestingModuleName demangledName && notFakeContainerModule ilTyconNames demangledName) - |> List.filter (EntityRefContainsSomethingAccessible ncenv m ad) - |> List.filter (IsTyconUnseen ad g ncenv.amap m >> not) + let moduleAndNamespaceItems = + let moduleOrNamespaceRefs = + nenv.ModulesAndNamespaces fullyQualified + |> NameMultiMap.range + + if isNil moduleOrNamespaceRefs then [] else + let ilTyconNames = getFakeContainerModulesFromTyconRefs (nenv.TyconsByAccessNames(fullyQualified).Values) + + moduleOrNamespaceRefs + |> List.filter (fun modref -> + let demangledName = modref.DemangledModuleOrNamespaceName + IsInterestingModuleName demangledName && notFakeContainerModule ilTyconNames demangledName && + EntityRefContainsSomethingAccessible ncenv m ad modref && + not (IsTyconUnseen ad g ncenv.amap m modref)) |> List.map ItemForModuleOrNamespaceRef let tycons = nenv.TyconsByDemangledNameAndArity(fullyQualified).Values - |> List.filter (fun tcref -> not (tcref.LogicalName.Contains(","))) - |> List.filter (fun tcref -> not tcref.IsExceptionDecl) - |> List.filter (IsTyconUnseen ad g ncenv.amap m >> not) + |> List.filter (fun tcref -> + not (tcref.LogicalName.Contains(",")) && + not tcref.IsExceptionDecl && + not (IsTyconUnseen ad g ncenv.amap m tcref)) |> List.map (ItemOfTyconRef ncenv m) // Get all the constructors accessible from here @@ -3899,24 +3956,24 @@ let rec ResolvePartialLongIdentPrim (ncenv: NameResolver) (nenv: NameResolutionE []) // Look for values called 'id' that accept the dot-notation let values, isItemVal = - (match nenv.eUnqualifiedItems |> Map.tryFind id with + (match nenv.eUnqualifiedItems.TryGetValue id with // v.lookup : member of a value - | Some v -> + | true, v -> match v with | Item.Value x -> - let typ = x.Type - let typ = if x.BaseOrThisInfo = CtorThisVal && isRefCellTy g typ then destRefCellTy g typ else typ - (ResolvePartialLongIdentInType ncenv nenv isApplicableMeth m ad false rest typ), true + let ty = x.Type + let ty = if x.BaseOrThisInfo = CtorThisVal && isRefCellTy g ty then destRefCellTy g ty else ty + (ResolvePartialLongIdentInType ncenv nenv isApplicableMeth m ad false rest ty), true | _ -> [], false - | None -> [], false) + | _ -> [], false) let staticSometingInType = [ if not isItemVal then // type.lookup : lookup a static something in a type for tcref in LookupTypeNameInEnvNoArity OpenQualified id nenv do let tcref = ResolveNestedTypeThroughAbbreviation ncenv tcref m - let typ = FreshenTycon ncenv m tcref - yield! ResolvePartialLongIdentInType ncenv nenv isApplicableMeth m ad true rest typ ] + let ty = FreshenTycon ncenv m tcref + yield! ResolvePartialLongIdentInType ncenv nenv isApplicableMeth m ad true rest ty ] namespaces @ values @ staticSometingInType @@ -3934,43 +3991,52 @@ let rec ResolvePartialLongIdentInModuleOrNamespaceForRecordFields (ncenv: NameRe // get record type constructors let tycons = mty.TypeDefinitions - |> List.filter (fun tcref -> not (tcref.LogicalName.Contains(","))) - |> List.filter (fun tycon -> tycon.IsRecordTycon) - |> List.filter (fun tycon -> not (IsTyconUnseen ad g ncenv.amap m (modref.NestedTyconRef tycon))) - - let ilTyconNames = - mty.TypesByAccessNames.Values - |> List.choose (fun (tycon:Tycon) -> if tycon.IsILTycon then Some tycon.DisplayName else None) - |> Set.ofList + |> List.filter (fun tcref -> + not (tcref.LogicalName.Contains(",")) && + tcref.IsRecordTycon && + not (IsTyconUnseen ad g ncenv.amap m (modref.NestedTyconRef tcref))) + + + let accessibleSubModules = + let moduleOrNamespaces = + mty.ModulesAndNamespacesByDemangledName + |> NameMap.range + + if isNil moduleOrNamespaces then [] else + + let ilTyconNames = getFakeContainerModulesFromTycons mty.TypesByAccessNames.Values - // Collect up the accessible sub-modules - (mty.ModulesAndNamespacesByDemangledName - |> NameMap.range - |> List.filter (fun x -> - let demangledName = x.DemangledModuleOrNamespaceName - notFakeContainerModule ilTyconNames demangledName && IsInterestingModuleName demangledName) - |> List.map modref.NestedTyconRef - |> List.filter (IsTyconUnseen ad g ncenv.amap m >> not) - |> List.filter (EntityRefContainsSomethingAccessible ncenv m ad) - |> List.map ItemForModuleOrNamespaceRef) + moduleOrNamespaces + |> List.filter (fun x -> + let demangledName = x.DemangledModuleOrNamespaceName + notFakeContainerModule ilTyconNames demangledName && IsInterestingModuleName demangledName) + |> List.map modref.NestedTyconRef + |> List.filter (fun tcref -> + not (IsTyconUnseen ad g ncenv.amap m tcref) && + EntityRefContainsSomethingAccessible ncenv m ad tcref) + |> List.map ItemForModuleOrNamespaceRef + + accessibleSubModules // Collect all accessible record types @ (tycons |> List.map (modref.NestedTyconRef >> ItemOfTyconRef ncenv m) ) @ [ // accessible record fields for tycon in tycons do - if IsEntityAccessible ncenv.amap m ad (modref.NestedTyconRef tycon) then - let ttype = FreshenTycon ncenv m (modref.NestedTyconRef tycon) + let nested = modref.NestedTyconRef tycon + if IsEntityAccessible ncenv.amap m ad nested then + let ttype = FreshenTycon ncenv m nested yield! ncenv.InfoReader.GetRecordOrClassFieldsOfType(None, ad, m, ttype) |> List.map Item.RecdField ] | id :: rest -> - (match mty.ModulesAndNamespacesByDemangledName.TryFind(id) with - | Some mspec - when not (IsTyconUnseenObsoleteSpec ad g ncenv.amap m (modref.NestedTyconRef mspec) allowObsolete) -> - let allowObsolete = rest <> [] && allowObsolete - ResolvePartialLongIdentInModuleOrNamespaceForRecordFields ncenv nenv m ad (modref.NestedTyconRef mspec) rest allowObsolete + (match mty.ModulesAndNamespacesByDemangledName.TryGetValue id with + | true, mspec -> + let nested = modref.NestedTyconRef mspec + if IsTyconUnseenObsoleteSpec ad g ncenv.amap m nested allowObsolete then [] else + let allowObsolete = allowObsolete && not (isNil rest) + ResolvePartialLongIdentInModuleOrNamespaceForRecordFields ncenv nenv m ad nested rest allowObsolete | _ -> []) @ ( match rest with @@ -4002,26 +4068,31 @@ and ResolvePartialLongIdentToClassOrRecdFieldsImpl (ncenv: NameResolver) (nenv: | [] -> // empty plid - return namespaces\modules\record types\accessible fields - let iltyconNames = - nenv.TyconsByAccessNames(fullyQualified).Values - |> List.choose (fun tyconRef -> if tyconRef.IsILTycon then Some tyconRef.DisplayName else None) - |> Set.ofList + let mods = - nenv.ModulesAndNamespaces(fullyQualified) - |> NameMultiMap.range - |> List.filter (fun x -> - let demangledName = x.DemangledModuleOrNamespaceName - IsInterestingModuleName demangledName && notFakeContainerModule iltyconNames demangledName) - |> List.filter (EntityRefContainsSomethingAccessible ncenv m ad) - |> List.filter (IsTyconUnseen ad g ncenv.amap m >> not) + let moduleOrNamespaceRefs = + nenv.ModulesAndNamespaces fullyQualified + |> NameMultiMap.range + + if isNil moduleOrNamespaceRefs then [] else + + let ilTyconNames = getFakeContainerModulesFromTyconRefs (nenv.TyconsByAccessNames(fullyQualified).Values) + + moduleOrNamespaceRefs + |> List.filter (fun modref -> + let demangledName = modref.DemangledModuleOrNamespaceName + IsInterestingModuleName demangledName && notFakeContainerModule ilTyconNames demangledName && + EntityRefContainsSomethingAccessible ncenv m ad modref && + not (IsTyconUnseen ad g ncenv.amap m modref)) |> List.map ItemForModuleOrNamespaceRef let recdTyCons = nenv.TyconsByDemangledNameAndArity(fullyQualified).Values - |> List.filter (fun tcref -> not (tcref.LogicalName.Contains(","))) - |> List.filter (fun tcref -> tcref.IsRecordTycon) - |> List.filter (IsTyconUnseen ad g ncenv.amap m >> not) + |> List.filter (fun tcref -> + not (tcref.LogicalName.Contains(",")) && + tcref.IsRecordTycon && + not (IsTyconUnseen ad g ncenv.amap m tcref)) |> List.map (ItemOfTyconRef ncenv m) let recdFields = @@ -4056,7 +4127,7 @@ and ResolvePartialLongIdentToClassOrRecdFieldsImpl (ncenv: NameResolver) (nenv: | _-> [] modsOrNs @ qualifiedFields -let ResolveCompletionsInTypeForItem (ncenv: NameResolver) nenv m ad statics typ (item: Item) : seq = +let ResolveCompletionsInTypeForItem (ncenv: NameResolver) nenv m ad statics ty (item: Item) : seq = seq { let g = ncenv.g let amap = ncenv.amap @@ -4064,26 +4135,28 @@ let ResolveCompletionsInTypeForItem (ncenv: NameResolver) nenv m ad statics typ match item with | Item.RecdField _ -> yield! - ncenv.InfoReader.GetRecordOrClassFieldsOfType(None,ad,m,typ) + ncenv.InfoReader.GetRecordOrClassFieldsOfType(None,ad,m,ty) |> List.filter (fun rfref -> rfref.IsStatic = statics && IsFieldInfoAccessible ad rfref) |> List.map Item.RecdField | Item.UnionCase _ -> - if statics && isAppTy g typ then - let tc, tinst = destAppTy g typ - yield! - tc.UnionCasesAsRefList - |> List.filter (IsUnionCaseUnseen ad g ncenv.amap m >> not) - |> List.map (fun ucref -> Item.UnionCase(UnionCaseInfo(tinst,ucref),false)) + if statics then + match tryAppTy g ty with + | ValueSome(tc, tinst) -> + yield! + tc.UnionCasesAsRefList + |> List.filter (IsUnionCaseUnseen ad g ncenv.amap m >> not) + |> List.map (fun ucref -> Item.UnionCase(UnionCaseInfo(tinst,ucref),false)) + | _ -> () | Item.Event _ -> yield! - ncenv.InfoReader.GetEventInfosOfType(None,ad,m,typ) + ncenv.InfoReader.GetEventInfosOfType(None,ad,m,ty) |> List.filter (fun x -> IsStandardEventInfo ncenv.InfoReader m ad x && x.IsStatic = statics) |> List.map Item.Event | Item.ILField _ -> yield! - ncenv.InfoReader.GetILFieldInfosOfType(None,ad,m,typ) + ncenv.InfoReader.GetILFieldInfosOfType(None,ad,m,ty) |> List.filter (fun x -> not x.IsSpecialName && x.IsStatic = statics && @@ -4091,10 +4164,10 @@ let ResolveCompletionsInTypeForItem (ncenv: NameResolver) nenv m ad statics typ |> List.map Item.ILField | Item.Types _ -> if statics then - yield! typ |> GetNestedTypesOfType (ad, ncenv, None, TypeNameResolutionStaticArgsInfo.Indefinite, false, m) |> List.map (ItemOfTy g) + yield! ty |> GetNestedTypesOfType (ad, ncenv, None, TypeNameResolutionStaticArgsInfo.Indefinite, false, m) |> List.map (ItemOfTy g) | _ -> let pinfosIncludingUnseen = - AllPropInfosOfTypeInScope ncenv.InfoReader nenv (None,ad) PreferOverrides m typ + AllPropInfosOfTypeInScope ncenv.InfoReader nenv (None,ad) PreferOverrides m ty |> List.filter (fun x -> x.IsStatic = statics && IsPropInfoAccessible g amap m ad x) @@ -4111,7 +4184,7 @@ let ResolveCompletionsInTypeForItem (ncenv: NameResolver) nenv m ad statics typ let einfoMethNames = let einfos = - ncenv.InfoReader.GetEventInfosOfType(None,ad,m,typ) + ncenv.InfoReader.GetEventInfosOfType(None,ad,m,ty) |> List.filter (fun x -> IsStandardEventInfo ncenv.InfoReader m ad x && x.IsStatic = statics) @@ -4121,45 +4194,44 @@ let ResolveCompletionsInTypeForItem (ncenv: NameResolver) nenv m ad statics typ let (SigOfFunctionForDelegate(invokeMethInfo,_,_,_)) = GetSigOfFunctionForDelegate ncenv.InfoReader delegateType m ad // Only events with void return types are suppressed in intellisense. if slotSigHasVoidReturnTy (invokeMethInfo.GetSlotSig(amap, m)) then - yield einfo.GetAddMethod().DisplayName - yield einfo.GetRemoveMethod().DisplayName ] + yield einfo.AddMethod.DisplayName + yield einfo.RemoveMethod.DisplayName ] - let suppressedMethNames = Zset.ofList String.order (pinfoMethNames @ einfoMethNames) let pinfos = pinfosIncludingUnseen |> List.filter (fun x -> not (PropInfoIsUnseen m x)) - let minfoFilter (minfo: MethInfo) = + let minfoFilter (suppressedMethNames:Zset<_>) (minfo: MethInfo) = // Only show the Finalize, MemberwiseClose etc. methods on System.Object for values whose static type really is // System.Object. Few of these are typically used from F#. // // Don't show GetHashCode or Equals for F# types that admit equality as an abnormal operation let isUnseenDueToBasicObjRules = - not (isObjTy g typ) && + not (isObjTy g ty) && not minfo.IsExtensionMember && match minfo.LogicalName with | "GetType" -> false - | "GetHashCode" -> isObjTy g minfo.EnclosingType && not (AugmentWithHashCompare.TypeDefinitelyHasEquality g typ) + | "GetHashCode" -> isObjTy g minfo.ApparentEnclosingType && not (AugmentWithHashCompare.TypeDefinitelyHasEquality g ty) | "ToString" -> false | "Equals" -> - if not (isObjTy g minfo.EnclosingType) then + if not (isObjTy g minfo.ApparentEnclosingType) then // declaring type is not System.Object - show it false elif minfo.IsInstance then // System.Object has only one instance Equals method and we want to suppress it unless Augment.TypeDefinitelyHasEquality is true - not (AugmentWithHashCompare.TypeDefinitelyHasEquality g typ) + not (AugmentWithHashCompare.TypeDefinitelyHasEquality g ty) else // System.Object has only one static Equals method and we always want to suppress it true | _ -> // filter out self methods of obj type - isObjTy g minfo.EnclosingType + isObjTy g minfo.ApparentEnclosingType let result = not isUnseenDueToBasicObjRules && not minfo.IsInstance = statics && IsMethInfoAccessible amap m ad minfo && - not (MethInfoIsUnseen g m typ minfo) && + not (MethInfoIsUnseen g m ty minfo) && not minfo.IsConstructor && not minfo.IsClassConstructor && not (minfo.LogicalName = ".cctor") && @@ -4181,37 +4253,49 @@ let ResolveCompletionsInTypeForItem (ncenv: NameResolver) nenv m ad statics typ | Item.MethodGroup _ -> // REVIEW: add a name filter here in the common cases? let minfos = - let minfos = - AllMethInfosOfTypeInScope ncenv.InfoReader nenv (None,ad) PreferOverrides m typ - |> List.filter minfoFilter - + let minfos = AllMethInfosOfTypeInScope ncenv.InfoReader nenv (None,ad) PreferOverrides m ty + if isNil minfos then [] else + + let suppressedMethNames = Zset.ofList String.order (pinfoMethNames @ einfoMethNames) let minfos = - let addersAndRemovers = - pinfoItems - |> List.collect (function Item.Event(FSEvent(_,_,addValRef,removeValRef)) -> [addValRef.LogicalName;removeValRef.LogicalName] | _ -> []) - |> set + minfos + |> List.filter (minfoFilter suppressedMethNames) - if addersAndRemovers.IsEmpty then minfos - else minfos |> List.filter (fun minfo -> not (addersAndRemovers.Contains minfo.LogicalName)) + if isNil minfos then + [] + else + let minfos = + let addersAndRemovers = + let hashSet = HashSet() + for item in pinfoItems do + match item with + | Item.Event(FSEvent(_,_,addValRef,removeValRef)) -> + hashSet.Add addValRef.LogicalName |> ignore + hashSet.Add removeValRef.LogicalName |> ignore + | _ -> () + hashSet + + if addersAndRemovers.Count = 0 then minfos + else minfos |> List.filter (fun minfo -> not (addersAndRemovers.Contains minfo.LogicalName)) #if !NO_EXTENSIONTYPING - // Filter out the ones with mangled names from applying static parameters - let minfos = - let methsWithStaticParams = - minfos - |> List.filter (fun minfo -> - match minfo.ProvidedStaticParameterInfo with - | Some (_methBeforeArguments, staticParams) -> staticParams.Length <> 0 - | _ -> false) - |> List.map (fun minfo -> minfo.DisplayName) + // Filter out the ones with mangled names from applying static parameters + let minfos = + let methsWithStaticParams = + minfos + |> List.filter (fun minfo -> + match minfo.ProvidedStaticParameterInfo with + | Some (_methBeforeArguments, staticParams) -> staticParams.Length <> 0 + | _ -> false) + |> List.map (fun minfo -> minfo.DisplayName) - if methsWithStaticParams.IsEmpty then minfos - else minfos |> List.filter (fun minfo -> - let nm = minfo.LogicalName - not (nm.Contains "," && methsWithStaticParams |> List.exists (fun m -> nm.StartsWith(m)))) + if methsWithStaticParams.IsEmpty then minfos + else minfos |> List.filter (fun minfo -> + let nm = minfo.LogicalName + not (nm.Contains "," && methsWithStaticParams |> List.exists (fun m -> nm.StartsWithOrdinal(m)))) #endif - minfos + minfos // Partition methods into overload sets let rec partitionl (l:MethInfo list) acc = @@ -4225,26 +4309,24 @@ let ResolveCompletionsInTypeForItem (ncenv: NameResolver) nenv m ad statics typ | _ -> () } -let rec ResolvePartialLongIdentInTypeForItem (ncenv: NameResolver) nenv m ad statics plid (item: Item) typ = +let rec ResolvePartialLongIdentInTypeForItem (ncenv: NameResolver) nenv m ad statics plid (item: Item) ty = seq { let g = ncenv.g let amap = ncenv.amap match plid with - | [] -> yield! ResolveCompletionsInTypeForItem ncenv nenv m ad statics typ item + | [] -> yield! ResolveCompletionsInTypeForItem ncenv nenv m ad statics ty item | id :: rest -> let rfinfos = - ncenv.InfoReader.GetRecordOrClassFieldsOfType(None,ad,m,typ) - |> List.filter (fun fref -> IsRecdFieldAccessible ncenv.amap m ad fref.RecdFieldRef) - |> List.filter (fun fref -> fref.RecdField.IsStatic = statics) + ncenv.InfoReader.GetRecordOrClassFieldsOfType(None,ad,m,ty) + |> List.filter (fun fref -> fref.Name = id && IsRecdFieldAccessible ncenv.amap m ad fref.RecdFieldRef && fref.RecdField.IsStatic = statics) - let nestedTypes = typ |> GetNestedTypesOfType (ad, ncenv, Some id, TypeNameResolutionStaticArgsInfo.Indefinite, false, m) + let nestedTypes = ty |> GetNestedTypesOfType (ad, ncenv, Some id, TypeNameResolutionStaticArgsInfo.Indefinite, false, m) // e.g. .. for rfinfo in rfinfos do - if rfinfo.Name = id then - yield! ResolvePartialLongIdentInTypeForItem ncenv nenv m ad false rest item rfinfo.FieldType + yield! ResolvePartialLongIdentInTypeForItem ncenv nenv m ad false rest item rfinfo.FieldType // e.g. .. let fullTypeOfPinfo (pinfo: PropInfo) = @@ -4253,16 +4335,15 @@ let rec ResolvePartialLongIdentInTypeForItem (ncenv: NameResolver) nenv m ad sta rty let pinfos = - typ + ty |> AllPropInfosOfTypeInScope ncenv.InfoReader nenv (Some id,ad) IgnoreOverrides m - |> List.filter (fun x -> x.IsStatic = statics) - |> List.filter (IsPropInfoAccessible g amap m ad) + |> List.filter (fun pinfo -> pinfo.IsStatic = statics && IsPropInfoAccessible g amap m ad pinfo) for pinfo in pinfos do yield! (fullTypeOfPinfo pinfo) |> ResolvePartialLongIdentInTypeForItem ncenv nenv m ad false rest item // e.g. .. - for einfo in ncenv.InfoReader.GetEventInfosOfType(Some id, ad, m, typ) do + for einfo in ncenv.InfoReader.GetEventInfosOfType(Some id, ad, m, ty) do let tyinfo = PropTypOfEventInfo ncenv.InfoReader m ad einfo yield! ResolvePartialLongIdentInTypeForItem ncenv nenv m ad false rest item tyinfo @@ -4271,7 +4352,7 @@ let rec ResolvePartialLongIdentInTypeForItem (ncenv: NameResolver) nenv m ad sta yield! ResolvePartialLongIdentInTypeForItem ncenv nenv m ad statics rest item ty // e.g. .. - for finfo in ncenv.InfoReader.GetILFieldInfosOfType(Some id, ad, m, typ) do + for finfo in ncenv.InfoReader.GetILFieldInfosOfType(Some id, ad, m, ty) do if not finfo.IsSpecialName && finfo.IsStatic = statics && IsILFieldInfoAccessible g amap m ad finfo then yield! finfo.FieldType(amap, m) |> ResolvePartialLongIdentInTypeForItem ncenv nenv m ad false rest item } @@ -4290,8 +4371,7 @@ let rec ResolvePartialLongIdentInModuleOrNamespaceForItem (ncenv: NameResolver) mty.AllValsAndMembers |> Seq.toList |> List.choose (TryMkValRefInModRef modref) // if the assembly load set is incomplete and we get a None value here, then ignore the value - |> List.filter (fun v -> not v.IsMember) - |> List.filter (IsValUnseen ad g m >> not) + |> List.filter (fun vref -> not vref.IsMember && not (IsValUnseen ad g m vref)) |> List.map Item.Value | Item.UnionCase _ -> // Collect up the accessible discriminated union cases in the module @@ -4315,38 +4395,45 @@ let rec ResolvePartialLongIdentInModuleOrNamespaceForItem (ncenv: NameResolver) |> List.filter (IsTyconUnseen ad g ncenv.amap m >> not) |> List.map Item.ExnCase | _ -> - let ilTyconNames = - mty.TypesByAccessNames.Values - |> List.choose (fun (tycon:Tycon) -> if tycon.IsILTycon then Some tycon.DisplayName else None) - |> Set.ofList - // Collect up the accessible sub-modules. We must yield them even though `item` is not a module or namespace, // otherwise we would not resolve long idents which have modules and namespaces in the middle (i.e. all long idents) - yield! + + let moduleOrNamespaces = mty.ModulesAndNamespacesByDemangledName - |> NameMap.range - |> List.filter (fun x -> - let demangledName = x.DemangledModuleOrNamespaceName - notFakeContainerModule ilTyconNames demangledName && IsInterestingModuleName demangledName) - |> List.map modref.NestedTyconRef - |> List.filter (IsTyconUnseen ad g ncenv.amap m >> not) - |> List.filter (EntityRefContainsSomethingAccessible ncenv m ad) - |> List.map ItemForModuleOrNamespaceRef + |> NameMap.range + + if not (isNil moduleOrNamespaces) then + let ilTyconNames = getFakeContainerModulesFromTycons mty.TypesByAccessNames.Values + + yield! + moduleOrNamespaces + |> List.filter (fun x -> + let demangledName = x.DemangledModuleOrNamespaceName + notFakeContainerModule ilTyconNames demangledName && IsInterestingModuleName demangledName) + |> List.map modref.NestedTyconRef + |> List.filter (fun tcref -> + not (IsTyconUnseen ad g ncenv.amap m tcref) && + EntityRefContainsSomethingAccessible ncenv m ad tcref) + |> List.map ItemForModuleOrNamespaceRef + let tycons = mty.TypeDefinitions - |> List.filter (fun tcref -> not (tcref.LogicalName.Contains(","))) - |> List.filter (fun tycon -> not (IsTyconUnseen ad g ncenv.amap m (modref.NestedTyconRef tycon))) - - // Get all the types and .NET constructor groups accessible from here - yield! tycons |> List.map (modref.NestedTyconRef >> ItemOfTyconRef ncenv m) - yield! tycons |> List.collect (modref.NestedTyconRef >> InfosForTyconConstructors ncenv m ad) + |> List.filter (fun tcref -> + not (tcref.LogicalName.Contains(",")) && + not (IsTyconUnseen ad g ncenv.amap m (modref.NestedTyconRef tcref))) + + // Get all the types and .NET constructor groups accessible from here + let nestedTycons = tycons |> List.map modref.NestedTyconRef + yield! nestedTycons |> List.map (ItemOfTyconRef ncenv m) + yield! nestedTycons |> List.collect (InfosForTyconConstructors ncenv m ad) | id :: rest -> - match mty.ModulesAndNamespacesByDemangledName.TryFind(id) with - | Some mspec - when not (IsTyconUnseenObsoleteSpec ad g ncenv.amap m (modref.NestedTyconRef mspec) true) -> - yield! ResolvePartialLongIdentInModuleOrNamespaceForItem ncenv nenv m ad (modref.NestedTyconRef mspec) rest item + match mty.ModulesAndNamespacesByDemangledName.TryGetValue id with + | true, mspec -> + let nested = modref.NestedTyconRef mspec + if not (IsTyconUnseenObsoleteSpec ad g ncenv.amap m nested true) then + yield! ResolvePartialLongIdentInModuleOrNamespaceForItem ncenv nenv m ad nested rest item | _ -> () for tycon in LookupTypeNameInEntityNoArity m id modref.ModuleOrNamespaceType do @@ -4360,20 +4447,20 @@ let rec PartialResolveLookupInModuleOrNamespaceAsModuleOrNamespaceThenLazy f pli match plid with | [] -> f modref | id :: rest -> - match mty.ModulesAndNamespacesByDemangledName.TryFind id with - | Some mty -> + match mty.ModulesAndNamespacesByDemangledName.TryGetValue id with + | true, mty -> PartialResolveLookupInModuleOrNamespaceAsModuleOrNamespaceThenLazy f rest (modref.NestedTyconRef mty) - | None -> Seq.empty + | _ -> Seq.empty let PartialResolveLongIndentAsModuleOrNamespaceThenLazy (nenv:NameResolutionEnv) plid f = seq { match plid with | id :: rest -> - match Map.tryFind id nenv.eModulesAndNamespaces with - | Some modrefs -> + match nenv.eModulesAndNamespaces.TryGetValue id with + | true, modrefs -> for modref in modrefs do yield! PartialResolveLookupInModuleOrNamespaceAsModuleOrNamespaceThenLazy f rest modref - | None -> () + | _ -> () | [] -> () } @@ -4398,17 +4485,19 @@ let rec GetCompletionForItem (ncenv: NameResolver) (nenv: NameResolutionEnv) m a match item with | Item.ModuleOrNamespaces _ -> - let ilTyconNames = - nenv.TyconsByAccessNames(OpenQualified).Values - |> List.choose (fun tyconRef -> if tyconRef.IsILTycon then Some tyconRef.DisplayName else None) - |> Set.ofList + let moduleOrNamespaceRefs = + nenv.ModulesAndNamespaces OpenQualified + |> NameMultiMap.range - for ns in NameMultiMap.range (nenv.ModulesAndNamespaces(OpenQualified)) do - let demangledName = ns.DemangledModuleOrNamespaceName - if IsInterestingModuleName demangledName && notFakeContainerModule ilTyconNames demangledName - && EntityRefContainsSomethingAccessible ncenv m ad ns - && not (IsTyconUnseen ad g ncenv.amap m ns) - then yield ItemForModuleOrNamespaceRef ns + if not (isNil moduleOrNamespaceRefs) then + let ilTyconNames = getFakeContainerModulesFromTyconRefs (nenv.TyconsByAccessNames(OpenQualified).Values) + + for ns in moduleOrNamespaceRefs do + let demangledName = ns.DemangledModuleOrNamespaceName + if IsInterestingModuleName demangledName && notFakeContainerModule ilTyconNames demangledName + && EntityRefContainsSomethingAccessible ncenv m ad ns + && not (IsTyconUnseen ad g ncenv.amap m ns) + then yield ItemForModuleOrNamespaceRef ns | Item.Types _ -> for tcref in nenv.TyconsByDemangledNameAndArity(OpenQualified).Values do @@ -4444,43 +4533,39 @@ let rec GetCompletionForItem (ncenv: NameResolver) (nenv: NameResolutionEnv) m a else Seq.empty) // Look for values called 'id' that accept the dot-notation - let values, isItemVal = - (if nenv.eUnqualifiedItems.ContainsKey(id) then - // v.lookup : member of a value - let v = nenv.eUnqualifiedItems.[id] - match v with - | Item.Value x -> - let typ = x.Type - let typ = if x.BaseOrThisInfo = CtorThisVal && isRefCellTy g typ then destRefCellTy g typ else typ - (ResolvePartialLongIdentInTypeForItem ncenv nenv m ad false rest item typ), true - | _ -> Seq.empty, false - else Seq.empty, false) - - yield! values - - if not isItemVal then + match nenv.eUnqualifiedItems.TryGetValue id with + | true, Item.Value x -> + let ty = x.Type + let ty = if x.BaseOrThisInfo = CtorThisVal && isRefCellTy g ty then destRefCellTy g ty else ty + yield! ResolvePartialLongIdentInTypeForItem ncenv nenv m ad false rest item ty + | _ -> // type.lookup : lookup a static something in a type for tcref in LookupTypeNameInEnvNoArity OpenQualified id nenv do let tcref = ResolveNestedTypeThroughAbbreviation ncenv tcref m - let typ = FreshenTycon ncenv m tcref - yield! ResolvePartialLongIdentInTypeForItem ncenv nenv m ad true rest item typ + let ty = FreshenTycon ncenv m tcref + yield! ResolvePartialLongIdentInTypeForItem ncenv nenv m ad true rest item ty } let IsItemResolvable (ncenv: NameResolver) (nenv: NameResolutionEnv) m ad plid (item: Item) : bool = - protectAssemblyExploration false <| fun () -> - GetCompletionForItem ncenv nenv m ad plid item |> Seq.exists (ItemsAreEffectivelyEqual ncenv.g item) + protectAssemblyExploration false (fun () -> + GetCompletionForItem ncenv nenv m ad plid item + |> Seq.exists (ItemsAreEffectivelyEqual ncenv.g item) + ) let GetVisibleNamespacesAndModulesAtPoint (ncenv: NameResolver) (nenv: NameResolutionEnv) m ad = - protectAssemblyExploration [] <| fun () -> - let ilTyconNames = - nenv.TyconsByAccessNames(FullyQualifiedFlag.OpenQualified).Values - |> List.choose (fun tyconRef -> if tyconRef.IsILTycon then Some tyconRef.DisplayName else None) - |> Set.ofList - - nenv.ModulesAndNamespaces(FullyQualifiedFlag.OpenQualified) - |> NameMultiMap.range - |> List.filter (fun x -> - let demangledName = x.DemangledModuleOrNamespaceName - IsInterestingModuleName demangledName && notFakeContainerModule ilTyconNames demangledName - && EntityRefContainsSomethingAccessible ncenv m ad x - && not (IsTyconUnseen ad ncenv.g ncenv.amap m x)) + protectAssemblyExploration [] (fun () -> + let items = + nenv.ModulesAndNamespaces FullyQualifiedFlag.OpenQualified + |> NameMultiMap.range + + if isNil items then [] else + + let ilTyconNames = getFakeContainerModulesFromTyconRefs (nenv.TyconsByAccessNames(FullyQualifiedFlag.OpenQualified).Values) + + items + |> List.filter (fun x -> + let demangledName = x.DemangledModuleOrNamespaceName + IsInterestingModuleName demangledName && notFakeContainerModule ilTyconNames demangledName + && EntityRefContainsSomethingAccessible ncenv m ad x + && not (IsTyconUnseen ad ncenv.g ncenv.amap m x)) + ) diff --git a/src/fsharp/NameResolution.fsi b/src/fsharp/NameResolution.fsi index 93f0009ff8b..f381d1088dc 100755 --- a/src/fsharp/NameResolution.fsi +++ b/src/fsharp/NameResolution.fsi @@ -166,9 +166,6 @@ type FullyQualifiedFlag = [] type BulkAdd = Yes | No -/// Lookup patterns in name resolution environment -val internal TryFindPatternByName : string -> NameResolutionEnv -> Item option - /// Add extra items to the environment for Visual Studio, e.g. static members val internal AddFakeNamedValRefToNameEnv : string -> NameResolutionEnv -> ValRef -> NameResolutionEnv @@ -246,10 +243,14 @@ type internal ItemOccurence = | Pattern | Implemented | RelatedText + | Open /// Check for equality, up to signature matching val ItemsAreEffectivelyEqual : TcGlobals -> Item -> Item -> bool +/// Hash compatible with ItemsAreEffectivelyEqual +val ItemsAreEffectivelyEqualHash : TcGlobals -> Item -> int + [] type internal CapturedNameResolution = /// line and column @@ -297,15 +298,22 @@ type internal TcResolutions = static member Empty : TcResolutions +[] +type TcSymbolUseData = + { Item: Item + ItemOccurence: ItemOccurence + DisplayEnv: DisplayEnv + Range: range } + [] /// Represents container for all name resolutions that were met so far when typechecking some particular file type internal TcSymbolUses = /// Get all the uses of a particular item within the file - member GetUsesOfSymbol : Item -> (ItemOccurence * DisplayEnv * range)[] + member GetUsesOfSymbol : Item -> TcSymbolUseData[] - /// Get all the uses of all items within the file - member GetAllUsesOfSymbols : unit -> (Item * ItemOccurence * DisplayEnv * range)[] + /// All the uses of all items within the file + member AllUsesOfSymbols : TcSymbolUseData[] /// Get the locations of all the printf format specifiers in the file member GetFormatSpecifierLocationsAndArity : unit -> (range * int)[] @@ -330,6 +338,13 @@ type internal OpenDeclaration = /// Create a new instance of OpenDeclaration. static member Create : longId: Ident list * modules: ModuleOrNamespaceRef list * appliedScope: range * isOwnNamespace: bool -> OpenDeclaration +/// Line-end normalized source text and an array of line end positions, used for format string parsing +type FormatStringCheckContext = + { /// Line-end normalized source text + NormalizedSource: string + /// Array of line end positions + LineEndPositions: int[] } + /// An abstract type for reporting the results of name resolution and type checking type ITypecheckResultsSink = @@ -351,6 +366,9 @@ type ITypecheckResultsSink = /// Get the current source abstract CurrentSource : string option + /// Cached line-end normalized source text and an array of line end positions, used for format string parsing + abstract FormatStringCheckContext : FormatStringCheckContext option + /// An implementation of ITypecheckResultsSink to collect information during type checking type internal TcResultsSinkImpl = @@ -364,7 +382,7 @@ type internal TcResultsSinkImpl = member GetSymbolUses : unit -> TcSymbolUses /// Get all open declarations reported to the sink - member OpenDeclarations : OpenDeclaration list + member GetOpenDeclarations : unit -> OpenDeclaration[] interface ITypecheckResultsSink @@ -443,13 +461,13 @@ type ResultCollectionSettings = | AtMostOneResult /// Resolve a long identifier to a namespace or module. -val internal ResolveLongIndentAsModuleOrNamespace : ResultCollectionSettings -> Import.ImportMap -> range -> FullyQualifiedFlag -> NameResolutionEnv -> AccessorDomain -> Ident list -> ResultOrException<(int * ModuleOrNamespaceRef * ModuleOrNamespaceType) list > +val internal ResolveLongIndentAsModuleOrNamespace : TcResultsSink -> ResultCollectionSettings -> Import.ImportMap -> range -> bool -> FullyQualifiedFlag -> NameResolutionEnv -> AccessorDomain -> Ident -> Ident list -> isOpenDecl: bool -> ResultOrException<(int * ModuleOrNamespaceRef * ModuleOrNamespaceType) list > /// Resolve a long identifier to an object constructor. val internal ResolveObjectConstructor : NameResolver -> DisplayEnv -> range -> AccessorDomain -> TType -> ResultOrException /// Resolve a long identifier using type-qualified name resolution. -val internal ResolveLongIdentInType : TcResultsSink -> NameResolver -> NameResolutionEnv -> LookupKind -> range -> AccessorDomain -> Ident list -> FindMemberFlag -> TypeNameResolutionInfo -> TType -> Item * Ident list +val internal ResolveLongIdentInType : TcResultsSink -> NameResolver -> NameResolutionEnv -> LookupKind -> range -> AccessorDomain -> Ident -> FindMemberFlag -> TypeNameResolutionInfo -> TType -> Item * Ident list /// Resolve a long identifier when used in a pattern. val internal ResolvePatternLongIdent : TcResultsSink -> NameResolver -> WarnOnUpperFlag -> bool -> range -> AccessorDomain -> NameResolutionEnv -> TypeNameResolutionInfo -> Ident list -> Item diff --git a/src/fsharp/NicePrint.fs b/src/fsharp/NicePrint.fs index 258f12a520c..ef865b0afa3 100755 --- a/src/fsharp/NicePrint.fs +++ b/src/fsharp/NicePrint.fs @@ -27,11 +27,6 @@ open Microsoft.FSharp.Compiler.PrettyNaming open Microsoft.FSharp.Core.Printf -#if !NO_EXTENSIONTYPING -open Microsoft.FSharp.Compiler.ExtensionTyping -open Microsoft.FSharp.Core.CompilerServices -#endif - [] module internal PrintUtilities = let bracketIfL x lyt = if x then bracketL lyt else lyt @@ -76,9 +71,10 @@ module internal PrintUtilities = tcref.DisplayName // has no static params else tcref.DisplayName+"<...>" // shorten - if isAttribute then - defaultArg (String.tryDropSuffix name "Attribute") name - else name + if isAttribute && name.EndsWithOrdinal("Attribute") then + String.dropSuffix name "Attribute" + else + name let tyconTextL = tagEntityRefName tcref demangled |> mkNav tcref.DefinitionRange @@ -106,7 +102,7 @@ module private PrintIL = open Microsoft.FSharp.Compiler.AbstractIL.IL let fullySplitILTypeRef (tref:ILTypeRef) = - (List.collect IL.splitNamespace (tref.Enclosing @ [IL.ungenericizeTypeName tref.Name])) + (List.collect IL.splitNamespace (tref.Enclosing @ [PrettyNaming.DemangleGenericTypeName tref.Name])) let layoutILTypeRefName denv path = let path = @@ -174,10 +170,10 @@ module private PrintIL = match System.Int32.TryParse(rightMost, System.Globalization.NumberStyles.Integer, System.Globalization.CultureInfo.InvariantCulture) with | true, n -> n | false, _ -> 0 // looks like it's non-generic - ilTyparSubst |> List.rev |> List.take numParms |> List.rev + ilTyparSubst |> List.rev |> List.truncate numParms |> List.rev - let rec layoutILType (denv: DisplayEnv) (ilTyparSubst: layout list) (typ : ILType) : layout = - match typ with + let rec layoutILType (denv: DisplayEnv) (ilTyparSubst: layout list) (ty: ILType) : layout = + match ty with | ILType.Void -> WordL.structUnit // These are type-theoretically totally different type-theoretically `void` is Fin 0 and `unit` is Fin (S 0) ... but, this looks like as close as we can get. | ILType.Array (sh, t) -> layoutILType denv ilTyparSubst t ^^ layoutILArrayShape sh | ILType.Value t @@ -197,7 +193,7 @@ module private PrintIL = let args = signatur.ArgTypes |> List.map (layoutILType denv ilTyparSubst) let res = match cons with - | Some className -> layoutILTypeRefName denv (SplitNamesForILPath (ungenericizeTypeName className)) ^^ (pruneParms className ilTyparSubst |> paramsL) // special case for constructor return-type (viz., the class itself) + | Some className -> layoutILTypeRefName denv (SplitNamesForILPath (PrettyNaming.DemangleGenericTypeName className)) ^^ (pruneParms className ilTyparSubst |> paramsL) // special case for constructor return-type (viz., the class itself) | None -> signatur.ReturnType |> layoutILType denv ilTyparSubst match args with | [] -> WordL.structUnit ^^ WordL.arrow ^^ res @@ -230,7 +226,7 @@ module private PrintIL = // return type be passed along as the `cons` parameter.) let res = match cons with - | Some className -> layoutILTypeRefName denv (SplitNamesForILPath (ungenericizeTypeName className)) ^^ (pruneParms className ilTyparSubst |> paramsL) // special case for constructor return-type (viz., the class itself) + | Some className -> layoutILTypeRefName denv (SplitNamesForILPath (PrettyNaming.DemangleGenericTypeName className)) ^^ (pruneParms className ilTyparSubst |> paramsL) // special case for constructor return-type (viz., the class itself) | None -> retType |> layoutILType denv ilTyparSubst match parameters with | [] -> WordL.structUnit ^^ WordL.arrow ^^ res @@ -264,7 +260,7 @@ module private PrintIL = let staticL = if f.IsStatic then WordL.keywordStatic else emptyL let name = adjustILName f.Name let nameL = wordL (tagField name) - let typL = layoutILType denv ilTyparSubst f.Type + let typL = layoutILType denv ilTyparSubst f.FieldType staticL ^^ WordL.keywordVal ^^ nameL ^^ WordL.colon ^^ typL let private layoutILEventDef denv ilTyparSubst (e: ILEventDef) = @@ -272,7 +268,7 @@ module private PrintIL = let name = adjustILName e.Name let nameL = wordL (tagEvent name) let typL = - match e.Type with + match e.EventType with | Some t -> layoutILType denv ilTyparSubst t | _ -> emptyL staticL ^^ WordL.keywordEvent ^^ nameL ^^ WordL.colon ^^ typL @@ -299,16 +295,16 @@ module private PrintIL = let typL = match p.GetMethod, p.SetMethod with - | None, None -> layoutILType denv ilTyparSubst p.Type // shouldn't happen - | Some getterRef, _ -> layoutGetterType getterRef - | None, Some setterRef -> layoutSetterType setterRef + | None, None -> layoutILType denv ilTyparSubst p.PropertyType // shouldn't happen + | Some getterRef, _ -> layoutGetterType getterRef + | None, Some setterRef -> layoutSetterType setterRef let specGetSetL = match p.GetMethod, p.SetMethod with - | None,None - | Some _, None -> emptyL - | None, Some _ -> WordL.keywordWith ^^ WordL.keywordSet - | Some _, Some _ -> WordL.keywordWith ^^ WordL.keywordGet ^^ RightL.comma ^^ WordL.keywordSet + | None,None + | Some _, None -> emptyL + | None, Some _ -> WordL.keywordWith ^^ WordL.keywordSet + | Some _, Some _ -> WordL.keywordWith ^^ WordL.keywordGet ^^ RightL.comma ^^ WordL.keywordSet staticL ^^ WordL.keywordMember ^^ nameL ^^ WordL.colon ^^ typL ^^ specGetSetL let layoutILFieldInit x = @@ -321,9 +317,11 @@ module private PrintIL = then Some Literals.keywordTrue else Some Literals.keywordFalse | ILFieldInit.Char c -> ("'" + (char c).ToString () + "'") |> (tagStringLiteral >> Some) + | ILFieldInit.Int8 x -> ((x |> int32 |> string) + "y") |> (tagNumericLiteral >> Some) | ILFieldInit.Int16 x -> ((x |> int32 |> string) + "s") |> (tagNumericLiteral >> Some) | ILFieldInit.Int32 x -> x |> (string >> tagNumericLiteral >> Some) | ILFieldInit.Int64 x -> ((x |> string) + "L") |> (tagNumericLiteral >> Some) + | ILFieldInit.UInt8 x -> ((x |> int32 |> string) + "uy") |> (tagNumericLiteral >> Some) | ILFieldInit.UInt16 x -> ((x |> int32 |> string) + "us") |> (tagNumericLiteral >> Some) | ILFieldInit.UInt32 x -> (x |> int64 |> string) + "u" |> (tagNumericLiteral >> Some) | ILFieldInit.UInt64 x -> ((x |> int64 |> string) + "UL") |> (tagNumericLiteral >> Some) @@ -418,16 +416,11 @@ module private PrintIL = | None -> aboveListL body - match typeDef.tdKind with - | ILTypeDefKind.Class - | ILTypeDefKind.ValueType - | ILTypeDefKind.Interface -> + if typeDef.IsClass || typeDef.IsStruct || typeDef.IsInterface then let pre = - match typeDef.tdKind with - | ILTypeDefKind.Class -> None - | ILTypeDefKind.ValueType -> Some WordL.keywordStruct - | ILTypeDefKind.Interface -> None - | _ -> failwith "unreachable" + if typeDef.IsStruct then Some WordL.keywordStruct + else None + let baseT = match typeDef.Extends with | Some b -> @@ -437,15 +430,14 @@ module private PrintIL = else [] | None -> // for interface show inherited interfaces - match typeDef.tdKind with - | ILTypeDefKind.Interface -> + if typeDef.IsInterface then typeDef.Implements |> List.choose (fun b -> let baseName = layoutILType denv ilTyparSubst b if isShowBase baseName then Some (WordL.keywordInherit ^^ baseName) else None ) - | _ -> [] + else [] let memberBlockLs (fieldDefs:ILFieldDefs, methodDefs:ILMethodDefs, propertyDefs:ILPropertyDefs, eventDefs:ILEventDefs) = let ctors = @@ -512,7 +504,7 @@ module private PrintIL = let post = WordL.keywordEnd renderL pre (baseT @ body @ types ) post - | ILTypeDefKind.Enum -> + elif typeDef.IsEnum then let fldsL = typeDef.Fields.AsList |> List.filter isShowEnumField @@ -521,7 +513,7 @@ module private PrintIL = renderL None fldsL emptyL - | ILTypeDefKind.Delegate -> + else // Delegate let rhs = match typeDef.Methods.AsList |> List.filter (fun m -> m.Name = "Invoke") with // the delegate delegates to the type of `Invoke` | m :: _ -> layoutILCallingSignature denv ilTyparSubst None m.CallingSignature @@ -662,11 +654,12 @@ module private PrintTypes = match k with | ILAttrib ilMethRef -> let trimmedName = - let name = ilMethRef.EnclosingTypeRef.Name - match String.tryDropSuffix name "Attribute" with - | Some shortName -> shortName - | None -> name - let tref = ilMethRef.EnclosingTypeRef + let name = ilMethRef.DeclaringTypeRef.Name + if name.EndsWithOrdinal("Attribute") then + String.dropSuffix name "Attribute" + else + name + let tref = ilMethRef.DeclaringTypeRef let tref = ILTypeRef.Create(scope= tref.Scope, enclosing=tref.Enclosing, name=trimmedName) PrintIL.layoutILTypeRef denv tref ++ argsL | FSAttrib vref -> @@ -769,11 +762,11 @@ module private PrintTypes = let varL = if denv.showAttributes then layoutTyparAttribs denv typar.Kind typar.Attribs varL else varL match Zmap.tryFind typar env.inplaceConstraints with - | Some (typarConstrTyp) -> + | Some (typarConstraintTy) -> if Zset.contains typar env.singletons then - leftL (tagPunctuation "#") ^^ layoutTypeWithInfo denv env typarConstrTyp + leftL (tagPunctuation "#") ^^ layoutTypeWithInfo denv env typarConstraintTy else - (varL ^^ sepL (tagPunctuation ":>") ^^ layoutTypeWithInfo denv env typarConstrTyp) |> bracketL + (varL ^^ sepL (tagPunctuation ":>") ^^ layoutTypeWithInfo denv env typarConstraintTy) |> bracketL | _ -> varL @@ -913,15 +906,28 @@ module private PrintTypes = | [arg] -> layoutTypeWithInfoAndPrec denv env 2 arg ^^ tcL | args -> bracketIfL (prec <= 1) (bracketL (layoutTypesWithInfoAndPrec denv env 2 (sepL (tagPunctuation ",")) args) --- tcL) - /// Layout a type, taking precedence into account to insert brackets where needed *) - and layoutTypeWithInfoAndPrec denv env prec typ = + /// Layout a type, taking precedence into account to insert brackets where needed + and layoutTypeWithInfoAndPrec denv env prec ty = - match stripTyparEqns typ with + match stripTyparEqns ty with - // Layout a type application + // Always prefer to format 'byref' as 'inref' + | ty when isInByrefTy denv.g ty && (match ty with TType_app (tc, _) when denv.g.inref_tcr.CanDeref && tyconRefEq denv.g tc denv.g.byref2_tcr -> true | _ -> false) -> + layoutTypeWithInfoAndPrec denv env prec (mkInByrefTy denv.g (destByrefTy denv.g ty)) + + // Always prefer to format 'byref' as 'outref' + | ty when isOutByrefTy denv.g ty && (match ty with TType_app (tc, _) when denv.g.outref_tcr.CanDeref && tyconRefEq denv.g tc denv.g.byref2_tcr -> true | _ -> false) -> + layoutTypeWithInfoAndPrec denv env prec (mkOutByrefTy denv.g (destByrefTy denv.g ty)) + + // Always prefer to format 'byref' as 'byref' + | ty when isByrefTy denv.g ty && (match ty with TType_app (tc, _) when denv.g.byref_tcr.CanDeref && tyconRefEq denv.g tc denv.g.byref2_tcr -> true | _ -> false) -> + layoutTypeWithInfoAndPrec denv env prec (mkByrefTy denv.g (destByrefTy denv.g ty)) + + // Always prefer 'float' to 'float<1>' | TType_app (tc,args) when tc.IsMeasureableReprTycon && List.forall (isDimensionless denv.g) args -> layoutTypeWithInfoAndPrec denv env prec (reduceTyconRefMeasureableOrProvided denv.g tc args) + // Layout a type application | TType_app (tc,args) -> layoutTypeAppWithInfoAndPrec denv env (layoutTyconRef denv tc) prec tc.IsPrefixDisplay args @@ -949,7 +955,7 @@ module private PrintTypes = match stripTyparEqns ty with | TType_fun (dty,rty) -> loop (soFarL --- (layoutTypeWithInfoAndPrec denv env 4 dty ^^ wordL (tagPunctuation "->"))) rty | rty -> soFarL --- layoutTypeWithInfoAndPrec denv env 5 rty - bracketIfL (prec <= 4) (loop emptyL typ) + bracketIfL (prec <= 4) (loop emptyL ty) // Layout a type variable . | TType_var r -> @@ -962,11 +968,11 @@ module private PrintTypes = sepListL sep (List.map (layoutTypeWithInfoAndPrec denv env prec) typl) /// Layout a single type, taking TypeSimplificationInfo into account - and private layoutTypeWithInfo denv env typ = - layoutTypeWithInfoAndPrec denv env 5 typ + and private layoutTypeWithInfo denv env ty = + layoutTypeWithInfoAndPrec denv env 5 ty - and layoutType denv typ = - layoutTypeWithInfo denv SimplifyTypes.typeSimplificationInfo0 typ + and layoutType denv ty = + layoutTypeWithInfo denv SimplifyTypes.typeSimplificationInfo0 ty /// Layout a single type used as the type of a member or value let layoutTopType denv env argInfos rty cxs = @@ -985,7 +991,7 @@ module private PrintTypes = let isParamArray = HasFSharpAttribute denv.g denv.g.attrib_ParamArrayAttribute argInfo.Attribs match argInfo.Name, isOptionalArg, isParamArray, tryDestOptionTy denv.g ty with // Layout an optional argument - | Some(id), true, _, Some ty -> + | Some(id), true, _, ValueSome ty -> leftL (tagPunctuation "?") ^^ sepL (tagParameter id.idText) ^^ SepL.colon ^^ layoutTypeWithInfoAndPrec denv env 2 ty // Layout an unnamed argument | None, _,_, _ -> @@ -1050,7 +1056,7 @@ module private PrintTypes = let prettyLayoutOfCurriedMemberSig denv typarInst argInfos retTy parentTyparTys = let (prettyTyparInst, parentTyparTys,argInfos,retTy),cxs = PrettyTypes.PrettifyInstAndCurriedSig denv.g (typarInst, parentTyparTys, argInfos, retTy) // Filter out the parent typars, which don't get shown in the member signature - let cxs = cxs |> List.filter (fun (tp,_) -> not (parentTyparTys |> List.exists (fun ty -> match tryDestTyparTy denv.g ty with Some destTypar -> typarEq tp destTypar | None -> false))) + let cxs = cxs |> List.filter (fun (tp,_) -> not (parentTyparTys |> List.exists (fun ty -> match tryDestTyparTy denv.g ty with ValueSome destTypar -> typarEq tp destTypar | _ -> false))) prettyTyparInst, prettyLayoutOfTopTypeInfoAux denv argInfos retTy cxs // Layout: type spec - class, datatype, record, abbrev @@ -1087,18 +1093,18 @@ module private PrintTypes = nameL nameL ^^ wordL (tagPunctuation ":") ^^ tauL - let prettyLayoutOfType denv typ = - let typ,cxs = PrettyTypes.PrettifyType denv.g typ - let env = SimplifyTypes.CollectInfo true [typ] cxs + let prettyLayoutOfType denv ty = + let ty,cxs = PrettyTypes.PrettifyType denv.g ty + let env = SimplifyTypes.CollectInfo true [ty] cxs let cxsL = layoutConstraintsWithInfo denv env env.postfixConstraints - layoutTypeWithInfoAndPrec denv env 2 typ --- cxsL + layoutTypeWithInfoAndPrec denv env 2 ty --- cxsL - let prettyLayoutOfTypeNoConstraints denv typ = - let typ,_cxs = PrettyTypes.PrettifyType denv.g typ - layoutTypeWithInfoAndPrec denv SimplifyTypes.typeSimplificationInfo0 5 typ + let prettyLayoutOfTypeNoConstraints denv ty = + let ty,_cxs = PrettyTypes.PrettifyType denv.g ty + layoutTypeWithInfoAndPrec denv SimplifyTypes.typeSimplificationInfo0 5 ty - let layoutAssemblyName _denv (typ: TType) = - typ.GetAssemblyName() + let layoutAssemblyName _denv (ty: TType) = + ty.GetAssemblyName() /// Printing TAST objects module private PrintTastMemberOrVals = @@ -1114,7 +1120,7 @@ module private PrintTastMemberOrVals = DemangleOperatorNameAsLayout (tagFunction >> mkNav v.DefinitionRange) name let nameL = if denv.showMemberContainers then - layoutTyconRef denv v.MemberApparentParent ^^ SepL.dot ^^ nameL + layoutTyconRef denv v.MemberApparentEntity ^^ SepL.dot ^^ nameL else nameL let nameL = if denv.showTyparBinding then layoutTyparDecls denv nameL true niceMethodTypars else nameL @@ -1235,13 +1241,13 @@ module InfoMemberPrinting = /// Format the arguments of a method to a buffer. /// /// This uses somewhat "old fashioned" printf-style buffer printing. - let layoutParamData denv (ParamData(isParamArray, _isOutArg, optArgInfo, _callerInfoInfo, nmOpt, _reflArgInfo, pty)) = + let layoutParamData denv (ParamData(isParamArray, _isInArg, _isOutArg, optArgInfo, _callerInfo, nmOpt, _reflArgInfo, pty)) = let isOptArg = optArgInfo.IsOptional match isParamArray, nmOpt, isOptArg, tryDestOptionTy denv.g pty with // Layout an optional argument | _, Some nm, true, ptyOpt -> // detect parameter type, if ptyOpt is None - this is .NET style optional argument - let pty = defaultArg ptyOpt pty + let pty = match ptyOpt with ValueSome x -> x | _ -> pty SepL.questionMark ^^ wordL (tagParameter nm.idText) ^^ RightL.colon ^^ @@ -1284,7 +1290,7 @@ module InfoMemberPrinting = let paramDatas = minfo.GetParamDatas(amap, m, minst) let layout = layout ^^ - if isNil (List.concat paramDatas) then + if List.forall isNil paramDatas then WordL.structUnit else sepListL WordL.arrow (List.map ((List.map (layoutParamData denv)) >> sepListL WordL.star) paramDatas) @@ -1299,18 +1305,18 @@ module InfoMemberPrinting = // Container(argName1:argType1, ..., argNameN:argTypeN) : retType // Container.Method(argName1:argType1, ..., argNameN:argTypeN) : retType let private layoutMethInfoCSharpStyle amap m denv (minfo:MethInfo) minst = - let retTy = if minfo.IsConstructor then minfo.EnclosingType else minfo.GetFSharpReturnTy(amap, m, minst) + let retTy = if minfo.IsConstructor then minfo.ApparentEnclosingType else minfo.GetFSharpReturnTy(amap, m, minst) let layout = if minfo.IsExtensionMember then LeftL.leftParen ^^ wordL (tagKeyword (FSComp.SR.typeInfoExtension())) ^^ RightL.rightParen else emptyL let layout = layout ^^ - match tryDestAppTy amap.g minfo.EnclosingType with - | Some tcref -> + if isAppTy minfo.TcGlobals minfo.ApparentEnclosingAppType then + let tcref = minfo.ApparentEnclosingTyconRef PrintTypes.layoutTyconRef denv tcref - | None -> - PrintTypes.layoutType denv minfo.EnclosingType + else + emptyL let layout = layout ^^ if minfo.IsConstructor then @@ -1360,9 +1366,9 @@ module InfoMemberPrinting = // ApparentContainer.Method(argName1:argType1, ..., argNameN:argTypeN) : retType let prettyLayoutOfMethInfoFreeStyle (amap: Import.ImportMap) m denv typarInst methInfo = match methInfo with - | DefaultStructCtor(g,_typ) -> + | DefaultStructCtor _ -> let prettyTyparInst, _ = PrettyTypes.PrettifyInst amap.g typarInst - prettyTyparInst, PrintTypes.layoutTyconRef denv (tcrefOfAppTy g methInfo.EnclosingType) ^^ wordL (tagPunctuation "()") + prettyTyparInst, PrintTypes.layoutTyconRef denv methInfo.ApparentEnclosingTyconRef ^^ wordL (tagPunctuation "()") | FSMeth(_,_,vref,_) -> let prettyTyparInst, resL = PrintTastMemberOrVals.prettyLayoutOfValOrMember { denv with showMemberContainers=true } typarInst vref.Deref prettyTyparInst, resL @@ -1386,7 +1392,7 @@ module InfoMemberPrinting = | Some vref -> tagProperty >> mkNav vref.DefinitionRange let nameL = DemangleOperatorNameAsLayout tagProp pinfo.PropertyName wordL (tagText (FSComp.SR.typeInfoProperty())) ^^ - layoutTyconRef denv (tcrefOfAppTy g pinfo.EnclosingType) ^^ + layoutTyconRef denv pinfo.ApparentEnclosingTyconRef ^^ SepL.dot ^^ nameL ^^ RightL.colon ^^ @@ -1407,7 +1413,7 @@ module private TastDefinitionPrinting = open PrintTypes let layoutExtensionMember denv (v:Val) = - let tycon = v.MemberApparentParent.Deref + let tycon = v.MemberApparentEntity.Deref let nameL = tagMethod tycon.DisplayName |> mkNav v.DefinitionRange |> wordL let nameL = layoutAccessibility denv tycon.Accessibility nameL // "type-accessibility" let tps = @@ -1507,7 +1513,7 @@ module private TastDefinitionPrinting = /// Another re-implementation of type printing, this time based off provided info objects. let layoutProvidedTycon (denv:DisplayEnv) (infoReader:InfoReader) ad m start lhsL ty = let g = denv.g - let tcref,_ = destAppTy g ty + let tcref = tcrefOfAppTy g ty if isEnumTy g ty then let fieldLs = @@ -1560,8 +1566,8 @@ module private TastDefinitionPrinting = if p.HasGetter then yield p.GetterMethod.DisplayName if p.HasSetter then yield p.SetterMethod.DisplayName for e in events do - yield e.GetAddMethod().DisplayName - yield e.GetRemoveMethod().DisplayName ] + yield e.AddMethod.DisplayName + yield e.RemoveMethod.DisplayName ] with _ -> Set.empty let ctorLs = @@ -1834,11 +1840,11 @@ module private InferredSigPrinting = | TMDefLet _ -> true | TMDefDo _ -> true | TMDefs defs -> defs |> List.exists isConcreteNamespace - | TMAbstract(ModuleOrNamespaceExprWithSig(_,def,_)) -> isConcreteNamespace def + | TMAbstract(ModuleOrNamespaceExprWithSig(_, def, _)) -> isConcreteNamespace def - let rec imexprLP denv (ModuleOrNamespaceExprWithSig(_,def,_)) = imdefL denv def + let rec imexprLP denv (ModuleOrNamespaceExprWithSig(_, def, _)) = imdefL denv def - and imexprL denv (ModuleOrNamespaceExprWithSig(mty,def,m)) = imexprLP denv (ModuleOrNamespaceExprWithSig(mty,def,m)) + and imexprL denv (ModuleOrNamespaceExprWithSig(mty, def, m)) = imexprLP denv (ModuleOrNamespaceExprWithSig(mty, def, m)) and imdefsL denv x = aboveListL (x |> List.map (imdefL denv)) @@ -1933,6 +1939,8 @@ module private PrintData = let fields = tc.TrueInstanceFieldsAsList let lay fs x = (wordL (tagRecordField fs.rfield_id.idText) ^^ sepL (tagPunctuation "=")) --- (dataExprL denv x) leftL (tagPunctuation "{") ^^ semiListL (List.map2 lay fields xs) ^^ rightL (tagPunctuation "}") + | Expr.Op (TOp.ValFieldGet (RecdFieldRef.RFRef (tcref, name)), _, _, _) -> + (layoutTyconRef denv tcref) ^^ sepL (tagPunctuation ".") ^^ wordL (tagField name) | Expr.Op (TOp.Array,[_],xs,_) -> leftL (tagPunctuation "[|") ^^ semiListL (dataExprsL denv xs) ^^ RightL.rightBracketBar | _ -> wordL (tagPunctuation "?") and private dataExprsL denv xs = List.map (dataExprL denv) xs @@ -1980,6 +1988,7 @@ let isGeneratedExceptionField pos f = TastDefinitionPrinting.isGeneratedExce let stringOfTyparConstraint denv tpc = stringOfTyparConstraints denv [tpc] let stringOfTy denv x = x |> PrintTypes.layoutType denv |> showL let prettyLayoutOfType denv x = x |> PrintTypes.prettyLayoutOfType denv +let prettyLayoutOfTypeNoCx denv x = x |> PrintTypes.prettyLayoutOfTypeNoConstraints denv let prettyStringOfTy denv x = x |> PrintTypes.prettyLayoutOfType denv |> showL let prettyStringOfTyNoCx denv x = x |> PrintTypes.prettyLayoutOfTypeNoConstraints denv |> showL let stringOfRecdField denv x = x |> TastDefinitionPrinting.layoutRecdField false denv |> showL diff --git a/src/fsharp/Optimizer.fs b/src/fsharp/Optimizer.fs index 3ea19645b6b..043e9e4747f 100644 --- a/src/fsharp/Optimizer.fs +++ b/src/fsharp/Optimizer.fs @@ -10,7 +10,6 @@ module internal Microsoft.FSharp.Compiler.Optimizer open Internal.Utilities -open Microsoft.FSharp.Compiler.AbstractIL open Microsoft.FSharp.Compiler.AbstractIL.Diagnostics open Microsoft.FSharp.Compiler.AbstractIL.IL open Microsoft.FSharp.Compiler.AbstractIL.Internal @@ -20,13 +19,13 @@ open Microsoft.FSharp.Compiler open Microsoft.FSharp.Compiler.Lib open Microsoft.FSharp.Compiler.Range open Microsoft.FSharp.Compiler.Ast +open Microsoft.FSharp.Compiler.AttributeChecking open Microsoft.FSharp.Compiler.ErrorLogger open Microsoft.FSharp.Compiler.Infos open Microsoft.FSharp.Compiler.Tast open Microsoft.FSharp.Compiler.TastPickle open Microsoft.FSharp.Compiler.Tastops open Microsoft.FSharp.Compiler.Tastops.DebugPrint -open Microsoft.FSharp.Compiler.TypeChecker open Microsoft.FSharp.Compiler.TcGlobals open Microsoft.FSharp.Compiler.Layout open Microsoft.FSharp.Compiler.Layout.TaggedTextOps @@ -34,7 +33,7 @@ open Microsoft.FSharp.Compiler.TypeRelations open System.Collections.Generic -#if BUILDING_PROTO +#if DEBUG let verboseOptimizationInfo = try not (System.String.IsNullOrEmpty (System.Environment.GetEnvironmentVariable "FSHARP_verboseOptimizationInfo")) with _ -> false let verboseOptimizations = @@ -88,12 +87,12 @@ type ExprValueInfo = | ConstValue of Const * TType - /// CurriedLambdaValue(id, arity, sz, expr, typ) + /// CurriedLambdaValue(id, arity, sz, expr, ty) /// /// arities: The number of bunches of untupled args and type args, and /// the number of args in each bunch. NOTE: This include type arguments. /// expr: The value, a lambda term. - /// typ: The type of lamba term + /// ty: The type of lamba term | CurriedLambdaValue of Unique * int * int * Expr * TType /// ConstExprValue(size, value) @@ -135,14 +134,15 @@ type ValInfos(entries) = lazy ( let dict = Dictionary<_, _>() for (vref, _x) as p in entries do - dict.Add(vref.Deref.LinkagePartialKey, p) |> ignore + let vkey = vref.Deref.GetLinkagePartialKey() + dict.Add(vkey, p) |> ignore dict) member x.Entries = valInfoTable.Force().Values member x.Map f = ValInfos(Seq.map f x.Entries) member x.Filter f = ValInfos(Seq.filter f x.Entries) member x.TryFind (v:ValRef) = valInfoTable.Force().TryFind v.Deref - member x.TryFindForFslib (v:ValRef) = valInfosForFslib.Force().TryGetValue(v.Deref.LinkagePartialKey) + member x.TryFindForFslib (v:ValRef) = valInfosForFslib.Force().TryGetValue(v.Deref.GetLinkagePartialKey()) type ModuleInfo = { ValInfos: ValInfos @@ -455,8 +455,8 @@ let BindExternalLocalVal cenv (v:Val) vval env = // Passing an empty remap is sufficient for FSharp.Core.dll because it turns out the remapped type signature can // still be resolved. match tryRescopeVal cenv.g.fslibCcu Remap.Empty v with - | Some vref -> BindValueForFslib vref.nlr v vval env - | None -> env + | ValueSome vref -> BindValueForFslib vref.nlr v vval env + | _ -> env else env env @@ -593,7 +593,7 @@ let (|StripConstValue|_|) ev = let (|StripLambdaValue|_|) ev = match stripValue ev with - | CurriedLambdaValue (id, arity, sz, expr, typ) -> Some (id, arity, sz, expr, typ) + | CurriedLambdaValue (id, arity, sz, expr, ty) -> Some (id, arity, sz, expr, ty) | _ -> None let destTupleValue ev = @@ -1131,7 +1131,7 @@ let RemapOptimizationInfo g tmenv = | UnionCaseValue(cspec, vinfos) -> UnionCaseValue (remapUnionCaseRef tmenv.tyconRefRemap cspec, Array.map remapExprInfo vinfos) | SizeValue(_vdepth, vinfo) -> MakeSizedValueInfo (remapExprInfo vinfo) | UnknownValue -> UnknownValue - | CurriedLambdaValue (uniq, arity, sz, expr, typ) -> CurriedLambdaValue (uniq, arity, sz, remapExpr g CloneAll tmenv expr, remapPossibleForallTy g tmenv typ) + | CurriedLambdaValue (uniq, arity, sz, expr, ty) -> CurriedLambdaValue (uniq, arity, sz, remapExpr g CloneAll tmenv expr, remapPossibleForallTy g tmenv ty) | ConstValue (c, ty) -> ConstValue (c, remapPossibleForallTy g tmenv ty) | ConstExprValue (sz, expr) -> ConstExprValue (sz, remapExpr g CloneAll tmenv expr) @@ -1186,9 +1186,9 @@ let IsTyFuncValRefExpr = function | _ -> false /// Type applications of existing functions are always simple constants, with the exception of F# 'type functions' -/// REVIEW: we could also include any under-applied application here. let rec IsSmallConstExpr x = match x with + | Expr.Op (TOp.LValueOp (LAddrOf _, _), [], [], _) -> true // &x is always a constant | Expr.Val (v, _, _m) -> not v.IsMutable | Expr.App(fe, _, _tyargs, args, _) -> isNil args && not (IsTyFuncValRefExpr fe) && IsSmallConstExpr fe | _ -> false @@ -1202,11 +1202,29 @@ let ValueOfExpr expr = // Dead binding elimination //------------------------------------------------------------------------- +// Allow discard of "let v = *byref" if "v" is unused anywhere. The read effect +// can be discarded because it is always assumed that reading byref pointers (without using +// the value of the read) doesn't raise exceptions or cause other "interesting" side effects. +// +// This allows discarding the implicit deref when matching on struct unions, e.g. +// +// [] +// type SingleRec = +// | SingleUnion of int +// member x.Next = let (SingleUnion i) = x in SingleUnion (i+1) +// +// See https://github.com/Microsoft/visualfsharp/issues/5136 +let IsDiscardableEffectExpr expr = + match expr with + | Expr.Op (TOp.LValueOp (LByrefGet _, _), [], [], _) -> true + | _ -> false + +/// Checks is a value binding is non-discardable let ValueIsUsedOrHasEffect cenv fvs (b:Binding, binfo) = let v = b.Var not (cenv.settings.EliminateUnusedBindings()) || Option.isSome v.MemberInfo || - binfo.HasEffect || + (binfo.HasEffect && not (IsDiscardableEffectExpr b.Expr)) || v.IsFixed || Zset.contains v (fvs()) @@ -1248,7 +1266,7 @@ let rec ExprHasEffect g expr = | Expr.Const _ -> false /// type applications do not have effects, with the exception of type functions | Expr.App(f0, _, _, [], _) -> (IsTyFuncValRefExpr f0) || ExprHasEffect g f0 - | Expr.Op(op, _, args, _) -> ExprsHaveEffect g args || OpHasEffect g op + | Expr.Op(op, _, args, m) -> ExprsHaveEffect g args || OpHasEffect g m op | Expr.LetRec(binds, body, _, _) -> BindingsHaveEffect g binds || ExprHasEffect g body | Expr.Let(bind, body, _, _) -> BindingHasEffect g bind || ExprHasEffect g body // REVIEW: could add Expr.Obj on an interface type - these are similar to records of lambda expressions @@ -1256,35 +1274,35 @@ let rec ExprHasEffect g expr = and ExprsHaveEffect g exprs = List.exists (ExprHasEffect g) exprs and BindingsHaveEffect g binds = List.exists (BindingHasEffect g) binds and BindingHasEffect g bind = bind.Expr |> ExprHasEffect g -and OpHasEffect g op = +and OpHasEffect g m op = match op with | TOp.Tuple _ -> false | TOp.Recd (ctor, tcref) -> match ctor with | RecdExprIsObjInit -> true - | RecdExpr -> isRecdOrUnionOrStructTyconRefAllocObservable g tcref - | TOp.UnionCase ucref -> isRecdOrUnionOrStructTyconRefAllocObservable g ucref.TyconRef - | TOp.ExnConstr ecref -> isExnAllocObservable ecref - | TOp.Bytes _ | TOp.UInt16s _ | TOp.Array -> true (* alloc observable *) + | RecdExpr -> not (isRecdOrStructTyconRefReadOnly g m tcref) + | TOp.UnionCase ucref -> isRecdOrUnionOrStructTyconRefDefinitelyMutable ucref.TyconRef + | TOp.ExnConstr ecref -> isExnDefinitelyMutable ecref + | TOp.Bytes _ | TOp.UInt16s _ | TOp.Array -> true // mutable | TOp.UnionCaseTagGet _ -> false | TOp.UnionCaseProof _ -> false | TOp.UnionCaseFieldGet (ucref, n) -> isUnionCaseFieldMutable g ucref n | TOp.ILAsm(instrs, _) -> IlAssemblyCodeHasEffect instrs | TOp.TupleFieldGet(_) -> false | TOp.ExnFieldGet(ecref, n) -> isExnFieldMutable ecref n - | TOp.RefAddrGet -> false - | TOp.ValFieldGet rfref -> rfref.RecdField.IsMutable || (TryFindTyconRefBoolAttribute g Range.range0 g.attrib_AllowNullLiteralAttribute rfref.TyconRef = Some(true)) - | TOp.ValFieldGetAddr rfref -> rfref.RecdField.IsMutable (* data is immutable, so taking address is ok *) - | TOp.UnionCaseFieldGetAddr _ -> false (* data is immutable, so taking address is ok *) - | TOp.LValueOp (LGetAddr, lv) -> lv.IsMutable + | TOp.RefAddrGet _ -> false + | TOp.ValFieldGet rfref -> rfref.RecdField.IsMutable || (TryFindTyconRefBoolAttribute g Range.range0 g.attrib_AllowNullLiteralAttribute rfref.TyconRef = Some true) + | TOp.ValFieldGetAddr (rfref, _readonly) -> rfref.RecdField.IsMutable + | TOp.UnionCaseFieldGetAddr _ -> false // union case fields are immutable + | TOp.LValueOp (LAddrOf _, _) -> false // addresses of values are always constants | TOp.UnionCaseFieldSet _ | TOp.ExnFieldSet _ | TOp.Coerce | TOp.Reraise | TOp.For _ | TOp.While _ - | TOp.TryCatch _ - | TOp.TryFinally _ (* note: these really go through a different path anyway *) + | TOp.TryCatch _ (* conservative *) + | TOp.TryFinally _ (* conservative *) | TOp.TraitCall _ | TOp.Goto _ | TOp.Label _ @@ -1382,6 +1400,84 @@ let rec (|KnownValApp|_|) expr = | Expr.App(KnownValApp(vref, typeArgs1, otherArgs1), _, typeArgs2, otherArgs2, _) -> Some(vref, typeArgs1@typeArgs2, otherArgs1@otherArgs2) | _ -> None +/// Matches boolean decision tree: +/// check single case with bool const. +let (|TDBoolSwitch|_|) dtree = + match dtree with + | TDSwitch( expr, [TCase (DecisionTreeTest.Const(Const.Bool testBool), caseTree )], Some defaultTree, range) -> + Some (expr, testBool, caseTree, defaultTree, range) + | _ -> + None + +/// Check target that have a constant bool value +let (|ConstantBoolTarget|_|) target = + match target with + | TTarget([], Expr.Const (Const.Bool b,_,_),_) -> Some b + | _ -> None + +/// Is this a tree, where each decision is a two-way switch (to prevent later duplication of trees), and each branch returns or true/false, +/// apart from one branch which defers to another expression +let rec CountBoolLogicTree ((targets: DecisionTreeTarget[], costOuterCaseTree, costOuterDefaultTree, testBool) as data) tree = + match tree with + | TDSwitch (_expr, [case], Some defaultTree, _range) -> + let tc1,ec1 = CountBoolLogicTree data case.CaseTree + let tc2, ec2 = CountBoolLogicTree data defaultTree + tc1 + tc2, ec1 + ec2 + | TDSuccess([], idx) -> + match targets.[idx] with + | ConstantBoolTarget result -> (if result = testBool then costOuterCaseTree else costOuterDefaultTree), 0 + | TTarget([], _exp, _) -> costOuterCaseTree + costOuterDefaultTree, 10 + | _ -> 100, 100 + | _ -> 100, 100 + +/// Rewrite a decision tree for which CountBoolLogicTree returned a low number (see below). Produce a new decision +/// tree where at each ConstantBoolSuccessTree tip we replace with either outerCaseTree or outerDefaultTree +/// depending on whether the target result was true/false +let rec RewriteBoolLogicTree ((targets: DecisionTreeTarget[], outerCaseTree, outerDefaultTree, testBool) as data) tree = + match tree with + | TDSwitch (expr, cases, defaultTree, range) -> + let cases2 = cases |> List.map (RewriteBoolLogicCase data) + let defaultTree2 = defaultTree |> Option.map (RewriteBoolLogicTree data) + TDSwitch (expr, cases2, defaultTree2, range) + | TDSuccess([], idx) -> + match targets.[idx] with + | ConstantBoolTarget result -> if result = testBool then outerCaseTree else outerDefaultTree + | TTarget([], exp, _) -> mkBoolSwitch exp.Range exp (if testBool then outerCaseTree else outerDefaultTree) (if testBool then outerDefaultTree else outerCaseTree) + | _ -> failwith "CountBoolLogicTree should exclude this case" + | _ -> failwith "CountBoolLogicTree should exclude this case" + +and RewriteBoolLogicCase data (TCase(test, tree)) = + TCase(test, RewriteBoolLogicTree data tree) + +/// Repeatedly combine switch-over-match decision trees, see https://github.com/Microsoft/visualfsharp/issues/635. +/// The outer decision tree is doing a swithc over a boolean result, the inner match is producing only +/// constant boolean results in its targets. +let rec CombineBoolLogic expr = + + // try to find nested boolean switch + match expr with + | Expr.Match(outerSP, outerMatchRange, + TDBoolSwitch(Expr.Match(_innerSP, _innerMatchRange, innerTree, innerTargets, _innerDefaultRange, _innerMatchTy), + outerTestBool, outerCaseTree, outerDefaultTree, _outerSwitchRange ), + outerTargets, outerDefaultRange, outerMatchTy) -> + + let costOuterCaseTree = match outerCaseTree with TDSuccess _ -> 0 | _ -> 1 + let costOuterDefaultTree = match outerDefaultTree with TDSuccess _ -> 0 | _ -> 1 + let tc, ec = CountBoolLogicTree (innerTargets, costOuterCaseTree, costOuterDefaultTree, outerTestBool) innerTree + // At most one expression, no overall duplication of TSwitch nodes + if tc <= costOuterCaseTree + costOuterDefaultTree && ec <= 10 then + let newExpr = + Expr.Match(outerSP, outerMatchRange, + RewriteBoolLogicTree (innerTargets, outerCaseTree, outerDefaultTree, outerTestBool) innerTree, + outerTargets, outerDefaultRange, outerMatchTy) + + CombineBoolLogic newExpr + else + expr + | _ -> + expr + + //------------------------------------------------------------------------- // ExpandStructuralBinding // @@ -1514,7 +1610,7 @@ let (|AnyRefTupleTrans|) e = /// Look for any QueryBuilder.* operation and transform let (|AnyQueryBuilderOpTrans|_|) g = function | Expr.App((Expr.Val (vref, _, _) as v), vty, tyargs, [builder; AnyRefTupleTrans( (src::rest), replaceArgs) ], m) when - (match vref.ApparentParent with Parent tcref -> tyconRefEq g tcref g.query_builder_tcref | ParentNone -> false) -> + (match vref.ApparentEnclosingEntity with Parent tcref -> tyconRefEq g tcref g.query_builder_tcref | ParentNone -> false) -> Some (src, (fun newSource -> Expr.App(v, vty, tyargs, [builder; replaceArgs(newSource::rest)], m))) | _ -> None @@ -1691,7 +1787,7 @@ let rec OptimizeExpr cenv (env:IncrementalOptimizationEnv) expr = HasEffect = false MightMakeCriticalTailcall=false Info=UnknownValue } - | Expr.Obj (_, typ, basev, expr, overrides, iimpls, m) -> OptimizeObjectExpr cenv env (typ, basev, expr, overrides, iimpls, m) + | Expr.Obj (_, ty, basev, expr, overrides, iimpls, m) -> OptimizeObjectExpr cenv env (ty, basev, expr, overrides, iimpls, m) | Expr.Op (c, tyargs, args, m) -> OptimizeExprOp cenv env (c, tyargs, args, m) | Expr.App(f, fty, tyargs, argsl, m) -> // eliminate uses of query @@ -1705,7 +1801,7 @@ let rec OptimizeExpr cenv (env:IncrementalOptimizationEnv) expr = OptimizeLambdas None cenv env topValInfo expr ty | Expr.TyLambda(_lambdaId, tps, _body, _m, rty) -> let topValInfo = ValReprInfo (ValReprInfo.InferTyparInfo tps, [], ValReprInfo.unnamedRetVal) - let ty = tryMkForallTy tps rty + let ty = mkForallTyIfNeeded tps rty OptimizeLambdas None cenv env topValInfo expr ty | Expr.TyChoose _ -> OptimizeExpr cenv env (TypeRelations.ChooseTyparSolutionsForFreeChoiceTypars cenv.g cenv.amap expr) | Expr.Match(spMatch, exprm, dtree, targets, m, ty) -> OptimizeMatch cenv env (spMatch, exprm, dtree, targets, m, ty) @@ -1728,11 +1824,11 @@ let rec OptimizeExpr cenv (env:IncrementalOptimizationEnv) expr = // Optimize/analyze an object expression //------------------------------------------------------------------------- -and OptimizeObjectExpr cenv env (typ, baseValOpt, basecall, overrides, iimpls, m) = +and OptimizeObjectExpr cenv env (ty, baseValOpt, basecall, overrides, iimpls, m) = let basecall', basecallinfo = OptimizeExpr cenv env basecall let overrides', overrideinfos = OptimizeMethods cenv env baseValOpt overrides let iimpls', iimplsinfos = OptimizeInterfaceImpls cenv env baseValOpt iimpls - let expr'=mkObjExpr(typ, baseValOpt, basecall', overrides', iimpls', m) + let expr'=mkObjExpr(ty, baseValOpt, basecall', overrides', iimpls', m) expr', { TotalSize=closureTotalSize + basecallinfo.TotalSize + AddTotalSizes overrideinfos + AddTotalSizes iimplsinfos FunctionSize=1 (* a newobj *) HasEffect=true @@ -1778,7 +1874,7 @@ and OptimizeInterfaceImpl cenv env baseValOpt (ty, overrides) = and OptimizeExprOp cenv env (op, tyargs, args, m) = - (* Special cases *) + // Special cases match op, tyargs, args with | TOp.Coerce, [toty;fromty], [e] -> let e', einfo = OptimizeExpr cenv env e @@ -1790,34 +1886,46 @@ and OptimizeExprOp cenv env (op, tyargs, args, m) = HasEffect = true MightMakeCriticalTailcall=false Info=UnknownValue } - (* Handle addresses *) - | TOp.LValueOp (LGetAddr, lv), _, _ -> - let e, _ = OptimizeExpr cenv env (exprForValRef m lv) - let op' = - match e with + + // Handle address-of + | TOp.LValueOp ((LAddrOf _ as lop), lv), _, _ -> + let newVal, _ = OptimizeExpr cenv env (exprForValRef m lv) + let newOp = + match newVal with // Do not optimize if it's a top level static binding. - | Expr.Val (v, _, _) when not v.IsCompiledAsTopLevel -> TOp.LValueOp (LGetAddr, v) + | Expr.Val (v, _, _) when not v.IsCompiledAsTopLevel -> TOp.LValueOp (lop, v) | _ -> op - Expr.Op (op', tyargs, args, m), + let newExpr = Expr.Op (newOp, tyargs, args, m) + newExpr, { TotalSize = 1 FunctionSize = 1 - HasEffect = OpHasEffect cenv.g op' + HasEffect = OpHasEffect cenv.g m newOp MightMakeCriticalTailcall = false - Info = UnknownValue } - (* Handle these as special cases since mutables are allowed inside their bodies *) - | TOp.While (spWhile, marker), _, [Expr.Lambda(_, _, _, [_], e1, _, _);Expr.Lambda(_, _, _, [_], e2, _, _)] -> OptimizeWhileLoop cenv { env with inLoop=true } (spWhile, marker, e1, e2, m) - | TOp.For(spStart, dir), _, [Expr.Lambda(_, _, _, [_], e1, _, _);Expr.Lambda(_, _, _, [_], e2, _, _);Expr.Lambda(_, _, _, [v], e3, _, _)] -> OptimizeFastIntegerForLoop cenv { env with inLoop=true } (spStart, v, e1, dir, e2, e3, m) - | TOp.TryFinally(spTry, spFinally), [resty], [Expr.Lambda(_, _, _, [_], e1, _, _); Expr.Lambda(_, _, _, [_], e2, _, _)] -> OptimizeTryFinally cenv env (spTry, spFinally, e1, e2, m, resty) - | TOp.TryCatch(spTry, spWith), [resty], [Expr.Lambda(_, _, _, [_], e1, _, _); Expr.Lambda(_, _, _, [vf], ef, _, _); Expr.Lambda(_, _, _, [vh], eh, _, _)] -> OptimizeTryCatch cenv env (e1, vf, ef, vh, eh, m, resty, spTry, spWith) - | TOp.TraitCall(traitInfo), [], args -> OptimizeTraitCall cenv env (traitInfo, args, m) + Info = ValueOfExpr newExpr } + + // Handle these as special cases since mutables are allowed inside their bodies + | TOp.While (spWhile, marker), _, [Expr.Lambda(_, _, _, [_], e1, _, _);Expr.Lambda(_, _, _, [_], e2, _, _)] -> + OptimizeWhileLoop cenv { env with inLoop=true } (spWhile, marker, e1, e2, m) + + | TOp.For(spStart, dir), _, [Expr.Lambda(_, _, _, [_], e1, _, _);Expr.Lambda(_, _, _, [_], e2, _, _);Expr.Lambda(_, _, _, [v], e3, _, _)] -> + OptimizeFastIntegerForLoop cenv { env with inLoop=true } (spStart, v, e1, dir, e2, e3, m) + + | TOp.TryFinally(spTry, spFinally), [resty], [Expr.Lambda(_, _, _, [_], e1, _, _); Expr.Lambda(_, _, _, [_], e2, _, _)] -> + OptimizeTryFinally cenv env (spTry, spFinally, e1, e2, m, resty) + + | TOp.TryCatch(spTry, spWith), [resty], [Expr.Lambda(_, _, _, [_], e1, _, _); Expr.Lambda(_, _, _, [vf], ef, _, _); Expr.Lambda(_, _, _, [vh], eh, _, _)] -> + OptimizeTryCatch cenv env (e1, vf, ef, vh, eh, m, resty, spTry, spWith) + + | TOp.TraitCall(traitInfo), [], args -> + OptimizeTraitCall cenv env (traitInfo, args, m) // This code hooks arr.Length. The idea is to ensure loops end up in the "same shape"as the forms of loops that the .NET JIT // guarantees to optimize. | TOp.ILCall (_, _, _, _, _, _, _, mref, _enclTypeArgs, _methTypeArgs, _tys), _, [arg] - when (mref.EnclosingTypeRef.Scope.IsAssemblyRef && - mref.EnclosingTypeRef.Scope.AssemblyRef.Name = cenv.g.ilg.typ_Array.TypeRef.Scope.AssemblyRef.Name && - mref.EnclosingTypeRef.Name = cenv.g.ilg.typ_Array.TypeRef.Name && + when (mref.DeclaringTypeRef.Scope.IsAssemblyRef && + mref.DeclaringTypeRef.Scope.AssemblyRef.Name = cenv.g.ilg.typ_Array.TypeRef.Scope.AssemblyRef.Name && + mref.DeclaringTypeRef.Name = cenv.g.ilg.typ_Array.TypeRef.Name && mref.Name = "get_Length" && isArray1DTy cenv.g (tyOfExpr cenv.g arg)) -> OptimizeExpr cenv env (Expr.Op(TOp.ILAsm(i_ldlen, [cenv.g.int_ty]), [], [arg], m)) @@ -1828,20 +1936,20 @@ and OptimizeExprOp cenv env (op, tyargs, args, m) = | TOp.ILAsm([], [ty]), _, [a] when typeEquiv cenv.g (tyOfExpr cenv.g a) ty -> OptimizeExpr cenv env a | _ -> - (* Reductions *) - let args', arginfos = OptimizeExprsThenConsiderSplits cenv env args - let knownValue = - match op, arginfos with - | TOp.ValFieldGet (rf), [e1info] -> TryOptimizeRecordFieldGet cenv env (e1info, rf, tyargs, m) - | TOp.TupleFieldGet (tupInfo, n), [e1info] -> TryOptimizeTupleFieldGet cenv env (tupInfo, e1info, tyargs, n, m) - | TOp.UnionCaseFieldGet (cspec, n), [e1info] -> TryOptimizeUnionCaseGet cenv env (e1info, cspec, tyargs, n, m) - | _ -> None - match knownValue with - | Some valu -> - match TryOptimizeVal cenv env (false, valu, m) with - | Some res -> OptimizeExpr cenv env res (* discard e1 since guard ensures it has no effects *) - | None -> OptimizeExprOpFallback cenv env (op, tyargs, args', m) arginfos valu - | None -> OptimizeExprOpFallback cenv env (op, tyargs, args', m) arginfos UnknownValue + // Reductions + let args', arginfos = OptimizeExprsThenConsiderSplits cenv env args + let knownValue = + match op, arginfos with + | TOp.ValFieldGet (rf), [e1info] -> TryOptimizeRecordFieldGet cenv env (e1info, rf, tyargs, m) + | TOp.TupleFieldGet (tupInfo, n), [e1info] -> TryOptimizeTupleFieldGet cenv env (tupInfo, e1info, tyargs, n, m) + | TOp.UnionCaseFieldGet (cspec, n), [e1info] -> TryOptimizeUnionCaseGet cenv env (e1info, cspec, tyargs, n, m) + | _ -> None + match knownValue with + | Some valu -> + match TryOptimizeVal cenv env (false, valu, m) with + | Some res -> OptimizeExpr cenv env res (* discard e1 since guard ensures it has no effects *) + | None -> OptimizeExprOpFallback cenv env (op, tyargs, args', m) arginfos valu + | None -> OptimizeExprOpFallback cenv env (op, tyargs, args', m) arginfos UnknownValue and OptimizeExprOpFallback cenv env (op, tyargs, args', m) arginfos valu = @@ -1850,7 +1958,7 @@ and OptimizeExprOpFallback cenv env (op, tyargs, args', m) arginfos valu = let argsFSize = AddFunctionSizes arginfos let argEffects = OrEffects arginfos let argValues = List.map (fun x -> x.Info) arginfos - let effect = OpHasEffect cenv.g op + let effect = OpHasEffect cenv.g m op let cost, valu = match op with | TOp.UnionCase c -> 2, MakeValueInfoForUnionCase c (Array.ofList argValues) @@ -1882,7 +1990,7 @@ and OptimizeExprOpFallback cenv env (op, tyargs, args', m) arginfos valu = | TOp.ValFieldGetAddr _ | TOp.Array | TOp.For _ | TOp.While _ | TOp.TryCatch _ | TOp.TryFinally _ | TOp.ILCall _ | TOp.TraitCall _ | TOp.LValueOp _ | TOp.ValFieldSet _ - | TOp.UnionCaseFieldSet _ | TOp.RefAddrGet | TOp.Coerce | TOp.Reraise + | TOp.UnionCaseFieldSet _ | TOp.RefAddrGet _ | TOp.Coerce | TOp.Reraise | TOp.UnionCaseFieldGetAddr _ | TOp.ExnFieldSet _ -> 1, valu | TOp.Recd (ctorInfo, tcref) -> @@ -2167,7 +2275,7 @@ and OptimizeWhileLoop cenv env (spWhile, marker, e1, e2, m) = and OptimizeTraitCall cenv env (traitInfo, args, m) = // Resolve the static overloading early (during the compulsory rewrite phase) so we can inline. - match ConstraintSolver.CodegenWitnessThatTypSupportsTraitConstraint cenv.TcVal cenv.g cenv.amap m traitInfo args with + match ConstraintSolver.CodegenWitnessThatTypeSupportsTraitConstraint cenv.TcVal cenv.g cenv.amap m traitInfo args with | OkResult (_, Some expr) -> OptimizeExpr cenv env expr @@ -2210,8 +2318,11 @@ and TryOptimizeValInfo cenv env m vinfo = //------------------------------------------------------------------------- and AddValEqualityInfo g m (v:ValRef) info = - if v.IsMutable then - /// the env assumes known-values do not change + // ValValue is information that v = v2, where v2 does not change + // So we can't record this information for mutable values. An exception can be made + // for "outArg" values arising from method calls since they are only temporarily mutable + // when their address is passed to the method call. + if v.IsMutable && not (v.IsCompilerGenerated && v.DisplayName.StartsWith(PrettyNaming.outArgCompilerGeneratedName)) then info else {info with Info= MakeValueInfoForValue g m v info.Info} @@ -2253,11 +2364,13 @@ and OptimizeVal cenv env expr (v:ValRef, m) = //------------------------------------------------------------------------- and StripToNominalTyconRef cenv ty = - if isAppTy cenv.g ty then destAppTy cenv.g ty - elif isRefTupleTy cenv.g ty then - let tyargs = destRefTupleTy cenv.g ty - mkCompiledTupleTyconRef cenv.g false (List.length tyargs), tyargs - else failwith "StripToNominalTyconRef: unreachable" + match tryAppTy cenv.g ty with + | ValueSome x -> x + | _ -> + if isRefTupleTy cenv.g ty then + let tyargs = destRefTupleTy cenv.g ty + mkCompiledTupleTyconRef cenv.g false (List.length tyargs), tyargs + else failwith "StripToNominalTyconRef: unreachable" and CanDevirtualizeApplication cenv v vref ty args = valRefEq cenv.g v vref @@ -2273,11 +2386,11 @@ and TakeAddressOfStructArgumentIfNeeded cenv (vref:ValRef) ty args m = if vref.IsInstanceMember && isStructTy cenv.g ty then match args with | objArg::rest -> - // REVIEW: we set NeverMutates. This is valid because we only ever use DevirtualizeApplication to transform + // We set NeverMutates here, allowing more address-taking. This is valid because we only ever use DevirtualizeApplication to transform // known calls to known generated F# code for CompareTo, Equals and GetHashCode. // If we ever reuse DevirtualizeApplication to transform an arbitrary virtual call into a // direct call then this assumption is not valid. - let wrap, objArgAddress = mkExprAddrOfExpr cenv.g true false NeverMutates objArg None m + let wrap, objArgAddress, _readonly, _writeonly = mkExprAddrOfExpr cenv.g true false NeverMutates objArg None m wrap, (objArgAddress::rest) | _ -> // no wrapper, args stay the same @@ -2289,8 +2402,6 @@ and DevirtualizeApplication cenv env (vref:ValRef) ty tyargs args m = let wrap, args = TakeAddressOfStructArgumentIfNeeded cenv vref ty args m let transformedExpr = wrap (MakeApplicationAndBetaReduce cenv.g (exprForValRef m vref, vref.Type, (if isNil tyargs then [] else [tyargs]), args, m)) OptimizeExpr cenv env transformedExpr - - and TryDevirtualizeApplication cenv env (f, tyargs, args, m) = match f, tyargs, args with @@ -2508,7 +2619,7 @@ and TryInlineApplication cenv env finfo (tyargs: TType list, args: Expr list, m) false else true)))) -> - let isBaseCall = args.Length > 0 && + let isBaseCall = not (List.isEmpty args) && match args.[0] with | Expr.Val(vref, _, _) when vref.BaseOrThisInfo = BaseVal -> true | _ -> false @@ -2524,7 +2635,7 @@ and TryInlineApplication cenv env finfo (tyargs: TType list, args: Expr list, m) else match finfo.Info with | ValValue(vref, _) -> - match vref.ApparentParent with + match vref.ApparentEnclosingEntity with | Parent(tcr) when (tyconRefEq cenv.g cenv.g.lazy_tcr_canon tcr) -> match tcr.CompiledRepresentation with | CompiledTypeRepr.ILAsmNamed(iltr, _, _) -> iltr.Scope.AssemblyRef.Name = "FSharp.Core" @@ -2592,7 +2703,7 @@ and OptimizeApplication cenv env (f0, f0ty, tyargs, args, m) = let nDetupArgsL = detupArgsL.Length let nShapes = min nargs nDetupArgsL let detupArgsShapesL = - List.take nShapes detupArgsL + List.truncate nShapes detupArgsL |> List.map (fun detupArgs -> match detupArgs with | [] | [_] -> UnknownValue @@ -2760,7 +2871,7 @@ and OptimizeExprThenConsiderSplit cenv env e = // Decide whether to List.unzip a sub-expression into a new method //------------------------------------------------------------------------- -and ComputeSplitToMethodCondition flag threshold cenv env (e, einfo) = +and ComputeSplitToMethodCondition flag threshold cenv env (e:Expr, einfo) = flag && // REVIEW: The method splitting optimization is completely disabled if we are not taking tailcalls. // REVIEW: This should only apply to methods that actually make self-tailcalls (tested further below). @@ -2771,6 +2882,7 @@ and ComputeSplitToMethodCondition flag threshold cenv env (e, einfo) = // We can only split an expression out as a method if certain conditions are met. // It can't use any protected or base calls, rethrow(), byrefs etc. + let m = e.Range (let fvs = freeInExpr CollectLocals e not fvs.UsesUnboundRethrow && not fvs.UsesMethodLocalConstructs && @@ -2781,12 +2893,12 @@ and ComputeSplitToMethodCondition flag threshold cenv env (e, einfo) = // All the free variables (apart from things with an arity, i.e. compiled as methods) should be normal, i.e. not base/this etc. (v.BaseOrThisInfo = NormalVal && // None of them should be byrefs - not (isByrefLikeTy cenv.g v.Type) && + not (isByrefLikeTy cenv.g m v.Type) && // None of them should be local polymorphic constrained values not (IsGenericValWithGenericContraints cenv.g v) && // None of them should be mutable not v.IsMutable)))) && - not (isByrefLikeTy cenv.g (tyOfExpr cenv.g e)) + not (isByrefLikeTy cenv.g m (tyOfExpr cenv.g e)) and ConsiderSplitToMethod flag threshold cenv env (e, einfo) = if ComputeSplitToMethodCondition flag threshold cenv env (e, einfo) then @@ -2812,7 +2924,9 @@ and OptimizeMatch cenv env (spMatch, exprm, dtree, targets, m, ty) = // REVIEW: consider collecting, merging and using information flowing through each line of the decision tree to each target let dtree', dinfo = OptimizeDecisionTree cenv env m dtree let targets', tinfos = OptimizeDecisionTreeTargets cenv env m targets - RebuildOptimizedMatch (spMatch, exprm, m, ty, dtree', targets', dinfo, tinfos) + let newExpr, newInfo = RebuildOptimizedMatch (spMatch, exprm, m, ty, dtree', targets', dinfo, tinfos) + let newExpr2 = if not (cenv.settings.localOpt()) then newExpr else CombineBoolLogic newExpr + newExpr2, newInfo and CombineMatchInfos dinfo tinfo = { TotalSize = dinfo.TotalSize + tinfo.TotalSize @@ -2972,16 +3086,16 @@ and OptimizeBinding cenv isRec env (TBind(vref, expr, spBind)) = (vref.InlineInfo = ValInline.Never) || // MarshalByRef methods may not be inlined - (match vref.ActualParent with + (match vref.DeclaringEntity with | Parent tcref -> match cenv.g.system_MarshalByRefObject_tcref with | None -> false | Some mbrTyconRef -> // Check we can deref system_MarshalByRefObject_tcref. When compiling against the Silverlight mscorlib we can't - if mbrTyconRef.TryDeref.IsSome then + if ValueOption.isSome mbrTyconRef.TryDeref then // Check if this is a subtype of MarshalByRefObject - assert (cenv.g.system_MarshalByRefObject_typ.IsSome) - ExistsSameHeadTypeInHierarchy cenv.g cenv.amap vref.Range (generalizedTyconRef tcref) cenv.g.system_MarshalByRefObject_typ.Value + assert (cenv.g.system_MarshalByRefObject_ty.IsSome) + ExistsSameHeadTypeInHierarchy cenv.g cenv.amap vref.Range (generalizedTyconRef tcref) cenv.g.system_MarshalByRefObject_ty.Value else false | ParentNone -> false) || @@ -3155,7 +3269,7 @@ and OptimizeModuleDefs cenv (env, bindInfosColl) defs = let defs, minfos = List.unzip defs (defs, UnionOptimizationInfos minfos), (env, bindInfosColl) -and OptimizeImplFileInternal cenv env isIncrementalFragment hidden (TImplFile(qname, pragmas, (ModuleOrNamespaceExprWithSig(mty, _, _) as mexpr), hasExplicitEntryPoint, isScript)) = +and OptimizeImplFileInternal cenv env isIncrementalFragment hidden (TImplFile(qname, pragmas, mexpr, hasExplicitEntryPoint, isScript)) = let env, mexpr', minfo = match mexpr with // FSI: FSI compiles everything as if you're typing incrementally into one module @@ -3171,7 +3285,7 @@ and OptimizeImplFileInternal cenv env isIncrementalFragment hidden (TImplFile(qn let env = { env with localExternalVals=env.localExternalVals.MarkAsCollapsible() } // take the chance to flatten to a dictionary env, mexpr', minfo - let hidden = ComputeHidingInfoAtAssemblyBoundary mty hidden + let hidden = ComputeHidingInfoAtAssemblyBoundary mexpr.Type hidden let minfo = AbstractLazyModulInfoByHiding true hidden minfo env, TImplFile(qname, pragmas, mexpr', hasExplicitEntryPoint, isScript), minfo, hidden @@ -3202,12 +3316,12 @@ let OptimizeImplFile(settings, ccu, tcGlobals, tcVal, importMap, optEnv, isIncre let rec p_ExprValueInfo x st = match x with - | ConstValue (c, ty) -> p_byte 0 st; p_tup2 p_const p_typ (c, ty) st + | ConstValue (c, ty) -> p_byte 0 st; p_tup2 p_const p_ty (c, ty) st | UnknownValue -> p_byte 1 st | ValValue (a, b) -> p_byte 2 st; p_tup2 (p_vref "optval") p_ExprValueInfo (a, b) st | TupleValue a -> p_byte 3 st; p_array p_ExprValueInfo a st | UnionCaseValue (a, b) -> p_byte 4 st; p_tup2 p_ucref (p_array p_ExprValueInfo) (a, b) st - | CurriedLambdaValue (_, b, c, d, e) -> p_byte 5 st; p_tup4 p_int p_int p_expr p_typ (b, c, d, e) st + | CurriedLambdaValue (_, b, c, d, e) -> p_byte 5 st; p_tup4 p_int p_int p_expr p_ty (b, c, d, e) st | ConstExprValue (a, b) -> p_byte 6 st; p_tup2 p_int p_expr (a, b) st | RecdValue (tcref, a) -> p_byte 7 st; p_tup2 (p_tcref "opt data") (p_array p_ExprValueInfo) (tcref, a) st | SizeValue (_adepth, a) -> p_ExprValueInfo a st @@ -3230,12 +3344,12 @@ let rec u_ExprInfo st = let rec loop st = let tag = u_byte st match tag with - | 0 -> u_tup2 u_const u_typ st |> (fun (c, ty) -> ConstValue(c, ty)) + | 0 -> u_tup2 u_const u_ty st |> (fun (c, ty) -> ConstValue(c, ty)) | 1 -> UnknownValue | 2 -> u_tup2 u_vref loop st |> (fun (a, b) -> ValValue (a, b)) | 3 -> u_array loop st |> (fun a -> TupleValue a) | 4 -> u_tup2 u_ucref (u_array loop) st |> (fun (a, b) -> UnionCaseValue (a, b)) - | 5 -> u_tup4 u_int u_int u_expr u_typ st |> (fun (b, c, d, e) -> CurriedLambdaValue (newUnique(), b, c, d, e)) + | 5 -> u_tup4 u_int u_int u_expr u_ty st |> (fun (b, c, d, e) -> CurriedLambdaValue (newUnique(), b, c, d, e)) | 6 -> u_tup2 u_int u_expr st |> (fun (a, b) -> ConstExprValue (a, b)) | 7 -> u_tup2 u_tcref (u_array loop) st |> (fun (a, b) -> RecdValue (a, b)) | _ -> failwith "loop" diff --git a/src/fsharp/Optimizer.fsi b/src/fsharp/Optimizer.fsi index cbdf1a9c803..d99d3703589 100644 --- a/src/fsharp/Optimizer.fsi +++ b/src/fsharp/Optimizer.fsi @@ -2,13 +2,10 @@ module internal Microsoft.FSharp.Compiler.Optimizer -open Internal.Utilities open Microsoft.FSharp.Compiler open Microsoft.FSharp.Compiler.Tast open Microsoft.FSharp.Compiler.Tastops open Microsoft.FSharp.Compiler.TcGlobals -open Microsoft.FSharp.Compiler.AbstractIL -open Microsoft.FSharp.Compiler.AbstractIL.Internal type OptimizationSettings = { abstractBigTargets : bool diff --git a/src/fsharp/PatternMatchCompilation.fs b/src/fsharp/PatternMatchCompilation.fs index f85e25914bf..625b23a70d0 100644 --- a/src/fsharp/PatternMatchCompilation.fs +++ b/src/fsharp/PatternMatchCompilation.fs @@ -4,8 +4,7 @@ module internal Microsoft.FSharp.Compiler.PatternMatchCompilation open System.Collections.Generic open Microsoft.FSharp.Compiler -open Microsoft.FSharp.Compiler.AbstractIL -open Microsoft.FSharp.Compiler.AbstractIL.Internal +open Microsoft.FSharp.Compiler.AbstractIL.IL open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library open Microsoft.FSharp.Compiler.AbstractIL.Diagnostics open Microsoft.FSharp.Compiler.Range @@ -21,47 +20,48 @@ open Microsoft.FSharp.Compiler.Lib exception MatchIncomplete of bool * (string * bool) option * range exception RuleNeverMatched of range +exception EnumMatchIncomplete of bool * (string * bool) option * range type ActionOnFailure = - | ThrowIncompleteMatchException - | IgnoreWithWarning - | Throw - | Rethrow - | FailFilter + | ThrowIncompleteMatchException + | IgnoreWithWarning + | Throw + | Rethrow + | FailFilter [] /// Represents type-checked patterns type Pattern = - | TPat_const of Const * range - | TPat_wild of range (* note = TPat_disjs([],m), but we haven't yet removed that duplication *) - | TPat_as of Pattern * PatternValBinding * range (* note: can be replaced by TPat_var, i.e. equals TPat_conjs([TPat_var; pat]) *) - | TPat_disjs of Pattern list * range - | TPat_conjs of Pattern list * range - | TPat_query of (Expr * TType list * (ValRef * TypeInst) option * int * ActivePatternInfo) * Pattern * range - | TPat_unioncase of UnionCaseRef * TypeInst * Pattern list * range - | TPat_exnconstr of TyconRef * Pattern list * range - | TPat_tuple of TupInfo * Pattern list * TType list * range - | TPat_array of Pattern list * TType * range - | TPat_recd of TyconRef * TypeInst * Pattern list * range - | TPat_range of char * char * range - | TPat_null of range - | TPat_isinst of TType * TType * PatternValBinding option * range - member this.Range = - match this with - | TPat_const(_,m) -> m - | TPat_wild m -> m - | TPat_as(_,_,m) -> m - | TPat_disjs(_,m) -> m - | TPat_conjs(_,m) -> m - | TPat_query(_,_,m) -> m - | TPat_unioncase(_,_,_,m) -> m - | TPat_exnconstr(_,_,m) -> m - | TPat_tuple(_,_,_,m) -> m - | TPat_array(_,_,m) -> m - | TPat_recd(_,_,_,m) -> m - | TPat_range(_,_,m) -> m - | TPat_null(m) -> m - | TPat_isinst(_,_,_,m) -> m + | TPat_const of Const * range + | TPat_wild of range (* note = TPat_disjs([],m), but we haven't yet removed that duplication *) + | TPat_as of Pattern * PatternValBinding * range (* note: can be replaced by TPat_var, i.e. equals TPat_conjs([TPat_var; pat]) *) + | TPat_disjs of Pattern list * range + | TPat_conjs of Pattern list * range + | TPat_query of (Expr * TType list * (ValRef * TypeInst) option * int * ActivePatternInfo) * Pattern * range + | TPat_unioncase of UnionCaseRef * TypeInst * Pattern list * range + | TPat_exnconstr of TyconRef * Pattern list * range + | TPat_tuple of TupInfo * Pattern list * TType list * range + | TPat_array of Pattern list * TType * range + | TPat_recd of TyconRef * TypeInst * Pattern list * range + | TPat_range of char * char * range + | TPat_null of range + | TPat_isinst of TType * TType * PatternValBinding option * range + member this.Range = + match this with + | TPat_const(_,m) -> m + | TPat_wild m -> m + | TPat_as(_,_,m) -> m + | TPat_disjs(_,m) -> m + | TPat_conjs(_,m) -> m + | TPat_query(_,_,m) -> m + | TPat_unioncase(_,_,_,m) -> m + | TPat_exnconstr(_,_,m) -> m + | TPat_tuple(_,_,_,m) -> m + | TPat_array(_,_,m) -> m + | TPat_recd(_,_,_,m) -> m + | TPat_range(_,_,m) -> m + | TPat_null(m) -> m + | TPat_isinst(_,_,_,m) -> m and PatternValBinding = PBind of Val * TypeScheme @@ -106,11 +106,11 @@ let BindSubExprOfInput g amap gtps (PBind(v,tyscheme)) m (SubExpr(accessf,(ve2,v let tyargs = let someSolved = ref false let freezeVar gtp = - if isBeingGeneralized gtp tyscheme then - mkTyparTy gtp - else - someSolved := true - TypeRelations.ChooseTyparSolution g amap gtp + if isBeingGeneralized gtp tyscheme then + mkTyparTy gtp + else + someSolved := true + TypeRelations.ChooseTyparSolution g amap gtp let solutions = List.map freezeVar gtps if !someSolved then @@ -170,6 +170,25 @@ type RefutedSet = let notNullText = "some-non-null-value" let otherSubtypeText = "some-other-subtype" +/// Create a TAST const value from an IL-initialized field read from .NET metadata +// (Originally moved from TcFieldInit in TypeChecker.fs -- feel free to move this somewhere more appropriate) +let ilFieldToTastConst lit = + match lit with + | ILFieldInit.String s -> Const.String s + | ILFieldInit.Null -> Const.Zero + | ILFieldInit.Bool b -> Const.Bool b + | ILFieldInit.Char c -> Const.Char (char (int c)) + | ILFieldInit.Int8 x -> Const.SByte x + | ILFieldInit.Int16 x -> Const.Int16 x + | ILFieldInit.Int32 x -> Const.Int32 x + | ILFieldInit.Int64 x -> Const.Int64 x + | ILFieldInit.UInt8 x -> Const.Byte x + | ILFieldInit.UInt16 x -> Const.UInt16 x + | ILFieldInit.UInt32 x -> Const.UInt32 x + | ILFieldInit.UInt64 x -> Const.UInt64 x + | ILFieldInit.Single f -> Const.Single f + | ILFieldInit.Double f -> Const.Double f + exception CannotRefute let RefuteDiscrimSet g m path discrims = let mkUnknown ty = snd(mkCompGenLocal m "_" ty) @@ -177,149 +196,176 @@ let RefuteDiscrimSet g m path discrims = match path with | PathQuery _ -> raise CannotRefute | PathConj (p,_j) -> - go p tm + go p tm | PathTuple (p,tys,j) -> - go p (fun _ -> mkRefTupled g m (mkOneKnown tm j tys) tys) + let k, eCoversVals = mkOneKnown tm j tys + go p (fun _ -> mkRefTupled g m k tys, eCoversVals) | PathRecd (p,tcref,tinst,j) -> - let flds = tcref |> actualTysOfInstanceRecdFields (mkTyconRefInst tcref tinst) |> mkOneKnown tm j - go p (fun _ -> Expr.Op(TOp.Recd(RecdExpr, tcref),tinst, flds,m)) + let flds, eCoversVals = tcref |> actualTysOfInstanceRecdFields (mkTyconRefInst tcref tinst) |> mkOneKnown tm j + go p (fun _ -> Expr.Op(TOp.Recd(RecdExpr, tcref),tinst, flds,m), eCoversVals) | PathUnionConstr (p,ucref,tinst,j) -> - let flds = ucref |> actualTysOfUnionCaseFields (mkTyconRefInst ucref.TyconRef tinst)|> mkOneKnown tm j - go p (fun _ -> Expr.Op(TOp.UnionCase(ucref),tinst, flds,m)) + let flds, eCoversVals = ucref |> actualTysOfUnionCaseFields (mkTyconRefInst ucref.TyconRef tinst)|> mkOneKnown tm j + go p (fun _ -> Expr.Op(TOp.UnionCase(ucref),tinst, flds,m), eCoversVals) | PathArray (p,ty,len,n) -> - go p (fun _ -> Expr.Op(TOp.Array,[ty], mkOneKnown tm n (List.replicate len ty) ,m)) + let flds, eCoversVals = mkOneKnown tm n (List.replicate len ty) + go p (fun _ -> Expr.Op(TOp.Array,[ty], flds ,m), eCoversVals) | PathExnConstr (p,ecref,n) -> - let flds = ecref |> recdFieldTysOfExnDefRef |> mkOneKnown tm n - go p (fun _ -> Expr.Op(TOp.ExnConstr(ecref),[], flds,m)) + let flds, eCoversVals = ecref |> recdFieldTysOfExnDefRef |> mkOneKnown tm n + go p (fun _ -> Expr.Op(TOp.ExnConstr(ecref),[], flds,m), eCoversVals) | PathEmpty(ty) -> tm ty - and mkOneKnown tm n tys = List.mapi (fun i ty -> if i = n then tm ty else mkUnknown ty) tys - and mkUnknowns tys = List.map mkUnknown tys - - let tm ty = - match discrims with - | [DecisionTreeTest.IsNull] -> - snd(mkCompGenLocal m notNullText ty) - | [DecisionTreeTest.IsInst (_,_)] -> - snd(mkCompGenLocal m otherSubtypeText ty) - | (DecisionTreeTest.Const c :: rest) -> + and mkOneKnown tm n tys = + let flds = List.mapi (fun i ty -> if i = n then tm ty else (mkUnknown ty, false)) tys + List.map fst flds, List.fold (fun acc (_, eCoversVals) -> eCoversVals || acc) false flds + and mkUnknowns tys = List.map (fun x -> mkUnknown x) tys + + let tm ty = + match discrims with + | [DecisionTreeTest.IsNull] -> + snd(mkCompGenLocal m notNullText ty), false + | [DecisionTreeTest.IsInst (_,_)] -> + snd(mkCompGenLocal m otherSubtypeText ty), false + | (DecisionTreeTest.Const c :: rest) -> let consts = Set.ofList (c :: List.choose (function DecisionTreeTest.Const(c) -> Some c | _ -> None) rest) - let c' = + let c' = Seq.tryFind (fun c -> not (consts.Contains(c))) - (match c with - | Const.Bool _ -> [ true; false ] |> List.toSeq |> Seq.map (fun v -> Const.Bool(v)) - | Const.SByte _ -> Seq.append (seq { 0y .. System.SByte.MaxValue }) (seq { System.SByte.MinValue .. 0y })|> Seq.map (fun v -> Const.SByte(v)) - | Const.Int16 _ -> Seq.append (seq { 0s .. System.Int16.MaxValue }) (seq { System.Int16.MinValue .. 0s }) |> Seq.map (fun v -> Const.Int16(v)) - | Const.Int32 _ -> Seq.append (seq { 0 .. System.Int32.MaxValue }) (seq { System.Int32.MinValue .. 0 })|> Seq.map (fun v -> Const.Int32(v)) - | Const.Int64 _ -> Seq.append (seq { 0L .. System.Int64.MaxValue }) (seq { System.Int64.MinValue .. 0L })|> Seq.map (fun v -> Const.Int64(v)) - | Const.IntPtr _ -> Seq.append (seq { 0L .. System.Int64.MaxValue }) (seq { System.Int64.MinValue .. 0L })|> Seq.map (fun v -> Const.IntPtr(v)) - | Const.Byte _ -> seq { 0uy .. System.Byte.MaxValue } |> Seq.map (fun v -> Const.Byte(v)) - | Const.UInt16 _ -> seq { 0us .. System.UInt16.MaxValue } |> Seq.map (fun v -> Const.UInt16(v)) - | Const.UInt32 _ -> seq { 0u .. System.UInt32.MaxValue } |> Seq.map (fun v -> Const.UInt32(v)) - | Const.UInt64 _ -> seq { 0UL .. System.UInt64.MaxValue } |> Seq.map (fun v -> Const.UInt64(v)) - | Const.UIntPtr _ -> seq { 0UL .. System.UInt64.MaxValue } |> Seq.map (fun v -> Const.UIntPtr(v)) - | Const.Double _ -> seq { 0 .. System.Int32.MaxValue } |> Seq.map (fun v -> Const.Double(float v)) - | Const.Single _ -> seq { 0 .. System.Int32.MaxValue } |> Seq.map (fun v -> Const.Single(float32 v)) - | Const.Char _ -> seq { 32us .. System.UInt16.MaxValue } |> Seq.map (fun v -> Const.Char(char v)) - | Const.String _ -> seq { 1 .. System.Int32.MaxValue } |> Seq.map (fun v -> Const.String(new System.String('a',v))) - | Const.Decimal _ -> seq { 1 .. System.Int32.MaxValue } |> Seq.map (fun v -> Const.Decimal(decimal v)) - | _ -> - raise CannotRefute) - - (* REVIEW: we could return a better enumeration literal field here if a field matches one of the enumeration cases *) - + (match c with + | Const.Bool _ -> [ true; false ] |> List.toSeq |> Seq.map (fun v -> Const.Bool(v)) + | Const.SByte _ -> Seq.append (seq { 0y .. System.SByte.MaxValue }) (seq { System.SByte.MinValue .. 0y })|> Seq.map (fun v -> Const.SByte(v)) + | Const.Int16 _ -> Seq.append (seq { 0s .. System.Int16.MaxValue }) (seq { System.Int16.MinValue .. 0s }) |> Seq.map (fun v -> Const.Int16(v)) + | Const.Int32 _ -> Seq.append (seq { 0 .. System.Int32.MaxValue }) (seq { System.Int32.MinValue .. 0 })|> Seq.map (fun v -> Const.Int32(v)) + | Const.Int64 _ -> Seq.append (seq { 0L .. System.Int64.MaxValue }) (seq { System.Int64.MinValue .. 0L })|> Seq.map (fun v -> Const.Int64(v)) + | Const.IntPtr _ -> Seq.append (seq { 0L .. System.Int64.MaxValue }) (seq { System.Int64.MinValue .. 0L })|> Seq.map (fun v -> Const.IntPtr(v)) + | Const.Byte _ -> seq { 0uy .. System.Byte.MaxValue } |> Seq.map (fun v -> Const.Byte(v)) + | Const.UInt16 _ -> seq { 0us .. System.UInt16.MaxValue } |> Seq.map (fun v -> Const.UInt16(v)) + | Const.UInt32 _ -> seq { 0u .. System.UInt32.MaxValue } |> Seq.map (fun v -> Const.UInt32(v)) + | Const.UInt64 _ -> seq { 0UL .. System.UInt64.MaxValue } |> Seq.map (fun v -> Const.UInt64(v)) + | Const.UIntPtr _ -> seq { 0UL .. System.UInt64.MaxValue } |> Seq.map (fun v -> Const.UIntPtr(v)) + | Const.Double _ -> seq { 0 .. System.Int32.MaxValue } |> Seq.map (fun v -> Const.Double(float v)) + | Const.Single _ -> seq { 0 .. System.Int32.MaxValue } |> Seq.map (fun v -> Const.Single(float32 v)) + | Const.Char _ -> seq { 32us .. System.UInt16.MaxValue } |> Seq.map (fun v -> Const.Char(char v)) + | Const.String _ -> seq { 1 .. System.Int32.MaxValue } |> Seq.map (fun v -> Const.String(new System.String('a',v))) + | Const.Decimal _ -> seq { 1 .. System.Int32.MaxValue } |> Seq.map (fun v -> Const.Decimal(decimal v)) + | _ -> + raise CannotRefute) + match c' with | None -> raise CannotRefute - | Some c -> Expr.Const(c,m,ty) + | Some c -> + match tryDestAppTy g ty with + | ValueSome tcref when tcref.IsEnumTycon -> + // We must distinguish between F#-defined enums and other .NET enums, as they are represented differently in the TAST + let enumValues = + if tcref.IsILEnumTycon then + let (TILObjectReprData(_, _, tdef)) = tcref.ILTyconInfo + tdef.Fields.AsList + |> Seq.choose (fun ilField -> + if ilField.IsStatic then + ilField.LiteralValue |> Option.map (fun ilValue -> + ilField.Name, ilFieldToTastConst ilValue) + else None) + else + tcref.AllFieldsArray |> Seq.choose (fun fsField -> + match fsField.rfield_const, fsField.rfield_static with + | Some fsFieldValue, true -> Some (fsField.rfield_id.idText, fsFieldValue) + | _ -> None) + + let nonCoveredEnumValues = Seq.tryFind (fun (_, fldValue) -> not (consts.Contains fldValue)) enumValues + + match nonCoveredEnumValues with + | None -> Expr.Const(c,m,ty), true + | Some (fldName, _) -> + let v = RecdFieldRef.RFRef(tcref, fldName) + Expr.Op(TOp.ValFieldGet v, [ty], [], m), false + | _ -> Expr.Const(c,m,ty), false - | (DecisionTreeTest.UnionCase (ucref1,tinst) :: rest) -> - let ucrefs = ucref1 :: List.choose (function DecisionTreeTest.UnionCase(ucref,_) -> Some ucref | _ -> None) rest - let tcref = ucref1.TyconRef - (* Choose the first ucref based on ordering of names *) - let others = - tcref.UnionCasesAsRefList - |> List.filter (fun ucref -> not (List.exists (g.unionCaseRefEq ucref) ucrefs)) - |> List.sortBy (fun ucref -> ucref.CaseName) - match others with - | [] -> raise CannotRefute - | ucref2 :: _ -> - let flds = ucref2 |> actualTysOfUnionCaseFields (mkTyconRefInst tcref tinst) |> mkUnknowns - Expr.Op(TOp.UnionCase(ucref2),tinst, flds,m) + | (DecisionTreeTest.UnionCase (ucref1,tinst) :: rest) -> + let ucrefs = ucref1 :: List.choose (function DecisionTreeTest.UnionCase(ucref,_) -> Some ucref | _ -> None) rest + let tcref = ucref1.TyconRef + (* Choose the first ucref based on ordering of names *) + let others = + tcref.UnionCasesAsRefList + |> List.filter (fun ucref -> not (List.exists (g.unionCaseRefEq ucref) ucrefs)) + |> List.sortBy (fun ucref -> ucref.CaseName) + match others with + | [] -> raise CannotRefute + | ucref2 :: _ -> + let flds = ucref2 |> actualTysOfUnionCaseFields (mkTyconRefInst tcref tinst) |> mkUnknowns + Expr.Op(TOp.UnionCase(ucref2),tinst, flds,m), false - | [DecisionTreeTest.ArrayLength (n,ty)] -> - Expr.Op(TOp.Array,[ty], mkUnknowns (List.replicate (n+1) ty) ,m) + | [DecisionTreeTest.ArrayLength (n,ty)] -> + Expr.Op(TOp.Array,[ty], mkUnknowns (List.replicate (n+1) ty) ,m), false | _ -> raise CannotRefute go path tm let rec CombineRefutations g r1 r2 = - match r1,r2 with - | Expr.Val(vref,_,_), other | other, Expr.Val(vref,_,_) when vref.LogicalName = "_" -> other - | Expr.Val(vref,_,_), other | other, Expr.Val(vref,_,_) when vref.LogicalName = notNullText -> other - | Expr.Val(vref,_,_), other | other, Expr.Val(vref,_,_) when vref.LogicalName = otherSubtypeText -> other + match r1,r2 with + | Expr.Val(vref,_,_), other | other, Expr.Val(vref,_,_) when vref.LogicalName = "_" -> other + | Expr.Val(vref,_,_), other | other, Expr.Val(vref,_,_) when vref.LogicalName = notNullText -> other + | Expr.Val(vref,_,_), other | other, Expr.Val(vref,_,_) when vref.LogicalName = otherSubtypeText -> other - | Expr.Op((TOp.ExnConstr(ecref1) as op1), tinst1,flds1,m1), Expr.Op(TOp.ExnConstr(ecref2), _,flds2,_) when tyconRefEq g ecref1 ecref2 -> + | Expr.Op((TOp.ExnConstr(ecref1) as op1), tinst1,flds1,m1), Expr.Op(TOp.ExnConstr(ecref2), _,flds2,_) when tyconRefEq g ecref1 ecref2 -> Expr.Op(op1, tinst1,List.map2 (CombineRefutations g) flds1 flds2,m1) - | Expr.Op((TOp.UnionCase(ucref1) as op1), tinst1,flds1,m1), - Expr.Op(TOp.UnionCase(ucref2), _,flds2,_) -> - if g.unionCaseRefEq ucref1 ucref2 then - Expr.Op(op1, tinst1,List.map2 (CombineRefutations g) flds1 flds2,m1) - (* Choose the greater of the two ucrefs based on name ordering *) - elif ucref1.CaseName < ucref2.CaseName then - r2 - else - r1 + | Expr.Op((TOp.UnionCase(ucref1) as op1), tinst1,flds1,m1), Expr.Op(TOp.UnionCase(ucref2), _,flds2,_) -> + if g.unionCaseRefEq ucref1 ucref2 then + Expr.Op(op1, tinst1,List.map2 (CombineRefutations g) flds1 flds2,m1) + (* Choose the greater of the two ucrefs based on name ordering *) + elif ucref1.CaseName < ucref2.CaseName then + r2 + else + r1 - | Expr.Op(op1, tinst1,flds1,m1), Expr.Op(_, _,flds2,_) -> + | Expr.Op(op1, tinst1,flds1,m1), Expr.Op(_, _,flds2,_) -> Expr.Op(op1, tinst1,List.map2 (CombineRefutations g) flds1 flds2,m1) - | Expr.Const(c1, m1, ty1), Expr.Const(c2,_,_) -> - let c12 = - - // Make sure longer strings are greater, not the case in the default ordinal comparison - // This is needed because the individual counter examples make longer strings - let MaxStrings s1 s2 = - let c = compare (String.length s1) (String.length s2) - if c < 0 then s2 - elif c > 0 then s1 - elif s1 < s2 then s2 - else s1 - - match c1,c2 with - | Const.String(s1), Const.String(s2) -> Const.String(MaxStrings s1 s2) - | Const.Decimal(s1), Const.Decimal(s2) -> Const.Decimal(max s1 s2) - | _ -> max c1 c2 - - (* REVIEW: we could return a better enumeration literal field here if a field matches one of the enumeration cases *) - Expr.Const(c12, m1, ty1) - - | _ -> r1 - -let ShowCounterExample g denv m refuted = - try - let refutations = refuted |> List.collect (function RefutedWhenClause -> [] | (RefutedInvestigation(path,discrim)) -> [RefuteDiscrimSet g m path discrim]) - let counterExample = - match refutations with - | [] -> raise CannotRefute - | h :: t -> - if verbose then dprintf "h = %s\n" (Layout.showL (exprL h)) - List.fold (CombineRefutations g) h t - let text = Layout.showL (NicePrint.dataExprL denv counterExample) - let failingWhenClause = refuted |> List.exists (function RefutedWhenClause -> true | _ -> false) - Some(text,failingWhenClause) - - with - | CannotRefute -> - None - | e -> - warning(InternalError(sprintf "" (e.ToString()),m)) - None + | Expr.Const(c1, m1, ty1), Expr.Const(c2,_,_) -> + let c12 = + + // Make sure longer strings are greater, not the case in the default ordinal comparison + // This is needed because the individual counter examples make longer strings + let MaxStrings s1 s2 = + let c = compare (String.length s1) (String.length s2) + if c < 0 then s2 + elif c > 0 then s1 + elif s1 < s2 then s2 + else s1 + + match c1,c2 with + | Const.String(s1), Const.String(s2) -> Const.String(MaxStrings s1 s2) + | Const.Decimal(s1), Const.Decimal(s2) -> Const.Decimal(max s1 s2) + | _ -> max c1 c2 + + Expr.Const(c12, m1, ty1) + + | _ -> r1 + +let ShowCounterExample g denv m refuted = + try + let refutations = refuted |> List.collect (function RefutedWhenClause -> [] | (RefutedInvestigation(path,discrim)) -> [RefuteDiscrimSet g m path discrim]) + let counterExample, enumCoversKnown = + match refutations with + | [] -> raise CannotRefute + | (r, eck) :: t -> + if verbose then dprintf "r = %s (enumCoversKnownValue = %b)\n" (Layout.showL (exprL r)) eck + List.fold (fun (rAcc, eckAcc) (r, eck) -> + CombineRefutations g rAcc r, eckAcc || eck) (r, eck) t + let text = Layout.showL (NicePrint.dataExprL denv counterExample) + let failingWhenClause = refuted |> List.exists (function RefutedWhenClause -> true | _ -> false) + Some(text,failingWhenClause,enumCoversKnown) + + with + | CannotRefute -> + None + | e -> + warning(InternalError(sprintf "" (e.ToString()),m)) + None //--------------------------------------------------------------------------- // Basic problem specification @@ -372,8 +418,8 @@ let getDiscrimOfPattern (g: TcGlobals) tpinst t = Some(DecisionTreeTest.UnionCase (c,instTypes tpinst tyargs')) | TPat_array (args,ty,_m) -> Some(DecisionTreeTest.ArrayLength (args.Length,ty)) - | TPat_query ((pexp,resTys,apatVrefOpt,idx,apinfo),_,_m) -> - Some(DecisionTreeTest.ActivePatternCase (pexp, instTypes tpinst resTys, apatVrefOpt, idx, apinfo)) + | TPat_query ((activePatExpr,resTys,apatVrefOpt,idx,apinfo),_,_m) -> + Some(DecisionTreeTest.ActivePatternCase (activePatExpr, instTypes tpinst resTys, apatVrefOpt, idx, apinfo)) | _ -> None let constOfDiscrim discrim = @@ -533,8 +579,8 @@ let rec BuildSwitch inpExprOpt g expr edges dflt m = let testexpr = match discrim with | DecisionTreeTest.ArrayLength(n,_) -> - let _v,vexp,bind = mkCompGenLocalAndInvisbleBind g "testExpr" m testexpr - mkLetBind m bind (mkLazyAnd g m (mkNonNullTest g m vexp) (mkILAsmCeq g m (mkLdlen g m vexp) (mkInt g m n))) + let _v,vExpr,bind = mkCompGenLocalAndInvisbleBind g "testExpr" m testexpr + mkLetBind m bind (mkLazyAnd g m (mkNonNullTest g m vExpr) (mkILAsmCeq g m (mkLdlen g m vExpr) (mkInt g m n))) | DecisionTreeTest.Const (Const.String _ as c) -> mkCallEqualsOperator g m g.string_ty testexpr (Expr.Const(c,m,g.string_ty)) | DecisionTreeTest.Const (Const.Decimal _ as c) -> @@ -670,7 +716,7 @@ let CompilePatternBasic warnOnUnused warnOnIncomplete actionOnFailure - (topv,topgtvs) + (origInputVal, origInputValTypars, _origInputExprOpt: Expr option) (clausesL: TypedMatchClause list) inputTy resultTy = @@ -678,7 +724,7 @@ let CompilePatternBasic // Note the input expression has already been evaluated and saved into a variable. // Hence no need for a new sequence point. let mbuilder = new MatchBuilder(NoSequencePointAtInvisibleBinding,exprm) - clausesL |> List.iteri (fun _i c -> mbuilder.AddTarget c.Target |> ignore) + clausesL |> List.iteri (fun _i c -> mbuilder.AddTarget c.Target |> ignore) // Add the incomplete or rethrow match clause on demand, printing a // warning if necessary (only if it is ever exercised) @@ -691,10 +737,15 @@ let CompilePatternBasic (* Emit the incomplete match warning *) if warnOnIncomplete then match actionOnFailure with - | ThrowIncompleteMatchException -> - warning (MatchIncomplete (false,ShowCounterExample g denv matchm refuted, matchm)) - | IgnoreWithWarning -> - warning (MatchIncomplete (true,ShowCounterExample g denv matchm refuted, matchm)) + | ThrowIncompleteMatchException | IgnoreWithWarning -> + let ignoreWithWarning = (actionOnFailure = IgnoreWithWarning) + match ShowCounterExample g denv matchm refuted with + | Some(text,failingWhenClause,true) -> + warning (EnumMatchIncomplete(ignoreWithWarning, Some(text,failingWhenClause), matchm)) + | Some(text,failingWhenClause,false) -> + warning (MatchIncomplete(ignoreWithWarning, Some(text,failingWhenClause), matchm)) + | None -> + warning (MatchIncomplete(ignoreWithWarning, None, matchm)) | _ -> () @@ -713,7 +764,7 @@ let CompilePatternBasic // We throw instead of rethrow on unmatched try-catch in a computation expression. But why? // Because this isn't a real .NET exception filter/handler but just a function we're passing // to a computation expression builder to simulate one. - mkThrow matchm resultTy (exprForVal matchm topv) + mkThrow matchm resultTy (exprForVal matchm origInputVal) | ThrowIncompleteMatchException -> mkThrow matchm resultTy @@ -758,9 +809,9 @@ let CompilePatternBasic // Build versions of these functions which apply a dummy instantiation to the overall type arguments let GetSubExprOfInput,getDiscrimOfPattern = - let tyargs = List.map (fun _ -> g.unit_ty) topgtvs - let unit_tpinst = mkTyparInst topgtvs tyargs - GetSubExprOfInput g (topgtvs,tyargs,unit_tpinst), + let tyargs = List.map (fun _ -> g.unit_ty) origInputValTypars + let unit_tpinst = mkTyparInst origInputValTypars tyargs + GetSubExprOfInput g (origInputValTypars,tyargs,unit_tpinst), getDiscrimOfPattern g unit_tpinst // The main recursive loop of the pattern match compiler @@ -799,7 +850,7 @@ let CompilePatternBasic // OK, build the whole tree and whack on the binding if any let finalDecisionTree = - let inpExprToSwitch = (match inpExprOpt with Some vexp -> vexp | None -> GetSubExprOfInput subexpr) + let inpExprToSwitch = (match inpExprOpt with Some vExpr -> vExpr | None -> GetSubExprOfInput subexpr) let tree = BuildSwitch inpExprOpt g inpExprToSwitch simulSetOfCases defaultTreeOpt matchm match bindOpt with | None -> tree @@ -856,6 +907,11 @@ let CompilePatternBasic else None,true) + and IsCopyableInputExpr origInputExpr = + match origInputExpr with + | Expr.Op (TOp.LValueOp (LByrefGet, v), [], [], _) when not v.IsMutable -> true + | _ -> false + and ChoosePreBinder simulSetOfEdgeDiscrims subexpr = match simulSetOfEdgeDiscrims with // Very simple 'isinst' tests: put the result of 'isinst' in a local variable @@ -871,27 +927,32 @@ let CompilePatternBasic | EdgeDiscrim(_i',(DecisionTreeTest.IsInst (_srcty,tgty)),m) :: _rest (* check we can use a simple 'isinst' instruction *) - when canUseTypeTestFast g tgty && isNil topgtvs -> + when canUseTypeTestFast g tgty && isNil origInputValTypars -> - let v,vexp = mkCompGenLocal m "typeTestResult" tgty - if topv.IsMemberOrModuleBinding then - AdjustValToTopVal v topv.ActualParent ValReprInfo.emptyValData - let argexp = GetSubExprOfInput subexpr - let appexp = mkIsInst tgty argexp matchm - Some(vexp),Some(mkInvisibleBind v appexp) + let v,vExpr = mkCompGenLocal m "typeTestResult" tgty + if origInputVal.IsMemberOrModuleBinding then + AdjustValToTopVal v origInputVal.DeclaringEntity ValReprInfo.emptyValData + let argExpr = GetSubExprOfInput subexpr + let appExpr = mkIsInst tgty argExpr matchm + Some vExpr, Some(mkInvisibleBind v appExpr) - // Any match on a struct union must take the address of its input + // Any match on a struct union must take the address of its input. + // We can shortcut the addrof when the original input is a deref of a byref value. | EdgeDiscrim(_i',(DecisionTreeTest.UnionCase (ucref, _)),_) :: _rest - when isNil topgtvs && ucref.Tycon.IsStructRecordOrUnionTycon -> - - let argexp = GetSubExprOfInput subexpr - let vOpt,addrexp = mkExprAddrOfExprAux g true false NeverMutates argexp None matchm + when isNil origInputValTypars && ucref.Tycon.IsStructRecordOrUnionTycon -> + + let argExpr = GetSubExprOfInput subexpr + let argExpr = + match argExpr, _origInputExprOpt with + | Expr.Val(v1, _, _), Some origInputExpr when valEq origInputVal v1.Deref && IsCopyableInputExpr origInputExpr -> origInputExpr + | _ -> argExpr + let vOpt, addrExp, _readonly, _writeonly = mkExprAddrOfExprAux g true false NeverMutates argExpr None matchm match vOpt with - | None -> Some addrexp, None + | None -> Some addrExp, None | Some (v,e) -> - if topv.IsMemberOrModuleBinding then - AdjustValToTopVal v topv.ActualParent ValReprInfo.emptyValData - Some addrexp, Some (mkInvisibleBind v e) + if origInputVal.IsMemberOrModuleBinding then + AdjustValToTopVal v origInputVal.DeclaringEntity ValReprInfo.emptyValData + Some addrExp, Some (mkInvisibleBind v e) @@ -901,29 +962,29 @@ let CompilePatternBasic | [EdgeDiscrim(_, ListConsDiscrim g tinst, m)] | [EdgeDiscrim(_, ListEmptyDiscrim g tinst, m)] (* check we can use a simple 'isinst' instruction *) - when isNil topgtvs -> + when isNil origInputValTypars -> let ucaseTy = (mkProvenUnionCaseTy g.cons_ucref tinst) - let v,vexp = mkCompGenLocal m "unionTestResult" ucaseTy - if topv.IsMemberOrModuleBinding then - AdjustValToTopVal v topv.ActualParent ValReprInfo.emptyValData - let argexp = GetSubExprOfInput subexpr - let appexp = mkIsInst ucaseTy argexp matchm - Some vexp,Some (mkInvisibleBind v appexp) + let v,vExpr = mkCompGenLocal m "unionTestResult" ucaseTy + if origInputVal.IsMemberOrModuleBinding then + AdjustValToTopVal v origInputVal.DeclaringEntity ValReprInfo.emptyValData + let argExpr = GetSubExprOfInput subexpr + let appExpr = mkIsInst ucaseTy argExpr matchm + Some vExpr,Some (mkInvisibleBind v appExpr) #endif // Active pattern matches: create a variable to hold the results of executing the active pattern. - | (EdgeDiscrim(_,(DecisionTreeTest.ActivePatternCase(pexp,resTys,_,_,apinfo)),m) :: _) -> + | (EdgeDiscrim(_,(DecisionTreeTest.ActivePatternCase(activePatExpr,resTys,_,_,apinfo)),m) :: _) -> - if not (isNil topgtvs) then error(InternalError("Unexpected generalized type variables when compiling an active pattern",m)) - let rty = apinfo.ResultType g m resTys - let v,vexp = mkCompGenLocal m ("activePatternResult"^string (newUnique())) rty - if topv.IsMemberOrModuleBinding then - AdjustValToTopVal v topv.ActualParent ValReprInfo.emptyValData - let argexp = GetSubExprOfInput subexpr - let appexp = mkApps g ((pexp,tyOfExpr g pexp), [], [argexp],m) + if not (isNil origInputValTypars) then error(InternalError("Unexpected generalized type variables when compiling an active pattern",m)) + let resTy = apinfo.ResultType g m resTys + let v,vExpr = mkCompGenLocal m ("activePatternResult" + string (newUnique())) resTy + if origInputVal.IsMemberOrModuleBinding then + AdjustValToTopVal v origInputVal.DeclaringEntity ValReprInfo.emptyValData + let argExpr = GetSubExprOfInput subexpr + let appExpr = mkApps g ((activePatExpr, tyOfExpr g activePatExpr), [], [argExpr],m) - Some(vexp),Some(mkInvisibleBind v appexp) + Some(vExpr),Some(mkInvisibleBind v appExpr) | _ -> None,None @@ -952,16 +1013,16 @@ let CompilePatternBasic #if OPTIMIZE_LIST_MATCHING isNone inpExprOpt && #endif - (isNil topgtvs && - not topv.IsMemberOrModuleBinding && + (isNil origInputValTypars && + not origInputVal.IsMemberOrModuleBinding && not ucref.Tycon.IsStructRecordOrUnionTycon && ucref.UnionCase.RecdFields.Length >= 1 && ucref.Tycon.UnionCasesArray.Length > 1) -> - let v,vexp = mkCompGenLocal m "unionCase" (mkProvenUnionCaseTy ucref tinst) - let argexp = GetSubExprOfInput subexpr - let appexp = mkUnionCaseProof (argexp, ucref,tinst,m) - Some vexp,Some(mkInvisibleBind v appexp) + let v,vExpr = mkCompGenLocal m "unionCase" (mkProvenUnionCaseTy ucref tinst) + let argExpr = GetSubExprOfInput subexpr + let appExpr = mkUnionCaseProof (argExpr, ucref,tinst,m) + Some vExpr,Some(mkInvisibleBind v appExpr) | _ -> None,None @@ -1083,7 +1144,7 @@ let CompilePatternBasic | None -> let exprIn = match inpExprOpt with - | Some addrexp -> addrexp + | Some addrExp -> addrExp | None -> accessf tpinst exprIn mkUnionCaseFieldGetUnprovenViaExprAddr (exprIn,ucref1,instTypes tpinst tyargs,j,exprm) @@ -1129,7 +1190,7 @@ let CompilePatternBasic // Otherwise call the helper mkCallUnboxFast g exprm (instType tpinst tgtTy1) (accessf tpinst exprIn) - let (v,exprIn) = BindSubExprOfInput g amap topgtvs pbind exprm (SubExpr(accessf',ve)) + let (v,exprIn) = BindSubExprOfInput g amap origInputValTypars pbind exprm (SubExpr(accessf',ve)) [Frontier (i, active', valMap.Add v exprIn )] | None -> [Frontier (i, active', valMap)] @@ -1169,7 +1230,7 @@ let CompilePatternBasic | TPat_wild _ -> BindProjectionPatterns [] s | TPat_as(p',pbind,m) -> - let (v,subExpr') = BindSubExprOfInput g amap topgtvs pbind m subExpr + let (v,subExpr') = BindSubExprOfInput g amap origInputValTypars pbind m subExpr BindProjectionPattern (Active(path,subExpr,p')) (accActive,accValMap.Add v subExpr' ) | TPat_tuple(tupInfo,ps,tyargs,_m) -> let accessf' j tpinst subExpr' = mkTupleFieldGet g (tupInfo,accessf tpinst subExpr',instTypes tpinst tyargs,j,exprm) @@ -1212,7 +1273,7 @@ let CompilePatternBasic let frontiers = ((clausesL |> List.mapi (fun i c -> - let initialSubExpr = SubExpr((fun _tpinst x -> x),(exprForVal topv.Range topv,topv)) + let initialSubExpr = SubExpr((fun _tpinst x -> x),(exprForVal origInputVal.Range origInputVal,origInputVal)) let investigations = BindProjectionPattern (Active(PathEmpty(inputTy),initialSubExpr,c.Pattern)) ([],ValMap<_>.Empty) mkFrontiers investigations i) |> List.concat) @@ -1238,7 +1299,7 @@ let CompilePatternBasic let isPartialOrWhenClause (c:TypedMatchClause) = isPatternPartial c.Pattern || c.GuardExpr.IsSome -let rec CompilePattern g denv amap exprm matchm warnOnUnused actionOnFailure (topv,topgtvs) (clausesL: TypedMatchClause list) inputTy resultTy = +let rec CompilePattern g denv amap exprm matchm warnOnUnused actionOnFailure (origInputVal,origInputValTypars,origInputExprOpt) (clausesL: TypedMatchClause list) inputTy resultTy = match clausesL with | _ when List.exists isPartialOrWhenClause clausesL -> // Partial clauses cause major code explosion if treated naively @@ -1248,13 +1309,13 @@ let rec CompilePattern g denv amap exprm matchm warnOnUnused actionOnFailure (t let warnOnUnused = false in (* we can't turn this on since we're pretending all partial's fail in order to control the complexity of this. *) let warnOnIncomplete = true let clausesPretendAllPartialFail = List.collect (fun (TClause(p,whenOpt,tg,m)) -> [TClause(erasePartialPatterns p,whenOpt,tg,m)]) clausesL - let _ = CompilePatternBasic g denv amap exprm matchm warnOnUnused warnOnIncomplete actionOnFailure (topv,topgtvs) clausesPretendAllPartialFail inputTy resultTy + let _ = CompilePatternBasic g denv amap exprm matchm warnOnUnused warnOnIncomplete actionOnFailure (origInputVal,origInputValTypars,origInputExprOpt) clausesPretendAllPartialFail inputTy resultTy let warnOnIncomplete = false let rec atMostOnePartialAtATime clauses = match List.takeUntil isPartialOrWhenClause clauses with | l,[] -> - CompilePatternBasic g denv amap exprm matchm warnOnUnused warnOnIncomplete actionOnFailure (topv,topgtvs) l inputTy resultTy + CompilePatternBasic g denv amap exprm matchm warnOnUnused warnOnIncomplete actionOnFailure (origInputVal,origInputValTypars,origInputExprOpt) l inputTy resultTy | l,(h :: t) -> // Add the partial clause doGroupWithAtMostOnePartial (l @ [h]) t @@ -1276,12 +1337,10 @@ let rec CompilePattern g denv amap exprm matchm warnOnUnused actionOnFailure (t // Make the clause that represents the remaining cases of the pattern match let clauseForRestOfMatch = TClause(TPat_wild matchm,None,TTarget(List.empty,expr,spTarget),matchm) - CompilePatternBasic - g denv amap exprm matchm warnOnUnused warnOnIncomplete actionOnFailure (topv,topgtvs) - (group @ [clauseForRestOfMatch]) inputTy resultTy + CompilePatternBasic g denv amap exprm matchm warnOnUnused warnOnIncomplete actionOnFailure (origInputVal,origInputValTypars,origInputExprOpt) (group @ [clauseForRestOfMatch]) inputTy resultTy atMostOnePartialAtATime clausesL | _ -> - CompilePatternBasic g denv amap exprm matchm warnOnUnused true actionOnFailure (topv,topgtvs) (clausesL: TypedMatchClause list) inputTy resultTy + CompilePatternBasic g denv amap exprm matchm warnOnUnused true actionOnFailure (origInputVal,origInputValTypars,origInputExprOpt) clausesL inputTy resultTy diff --git a/src/fsharp/PatternMatchCompilation.fsi b/src/fsharp/PatternMatchCompilation.fsi index 302d72ed24f..d4fbba2588c 100644 --- a/src/fsharp/PatternMatchCompilation.fsi +++ b/src/fsharp/PatternMatchCompilation.fsi @@ -2,10 +2,8 @@ module internal Microsoft.FSharp.Compiler.PatternMatchCompilation -open Internal.Utilities +open Microsoft.FSharp.Compiler.AbstractIL.IL open Microsoft.FSharp.Compiler -open Microsoft.FSharp.Compiler.AbstractIL -open Microsoft.FSharp.Compiler.AbstractIL.Internal open Microsoft.FSharp.Compiler.Tast open Microsoft.FSharp.Compiler.Tastops open Microsoft.FSharp.Compiler.TcGlobals @@ -45,6 +43,8 @@ and PatternValBinding = and TypedMatchClause = | TClause of Pattern * Expr option * DecisionTreeTarget * range +val ilFieldToTastConst : ILFieldInit -> Tast.Const + /// Compile a pattern into a decision tree and a set of targets. val internal CompilePattern : TcGlobals -> @@ -57,8 +57,9 @@ val internal CompilePattern : // warn on unused? bool -> ActionOnFailure -> - // the value being matched against, perhaps polymorphic - Val * Typars -> + // the value being matched against, perhaps polymorphic. Optionally includes the + // input expression, only for the case of immediate matching on a byref pointer + Val * Typars * Expr option -> // input type-checked syntax of pattern matching TypedMatchClause list -> // input type @@ -70,3 +71,4 @@ val internal CompilePattern : exception internal MatchIncomplete of bool * (string * bool) option * range exception internal RuleNeverMatched of range +exception internal EnumMatchIncomplete of bool * (string * bool) option * range \ No newline at end of file diff --git a/src/fsharp/PostInferenceChecks.fs b/src/fsharp/PostInferenceChecks.fs index 8906c9a4e8f..5e2755dcaac 100644 --- a/src/fsharp/PostInferenceChecks.fs +++ b/src/fsharp/PostInferenceChecks.fs @@ -4,10 +4,10 @@ /// is complete. module internal Microsoft.FSharp.Compiler.PostTypeCheckSemanticChecks +open System open System.Collections.Generic open Microsoft.FSharp.Compiler -open Microsoft.FSharp.Compiler.AbstractIL open Microsoft.FSharp.Compiler.AbstractIL.IL open Microsoft.FSharp.Compiler.AbstractIL.Internal open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library @@ -25,8 +25,6 @@ open Microsoft.FSharp.Compiler.PrettyNaming open Microsoft.FSharp.Compiler.InfoReader open Microsoft.FSharp.Compiler.TypeRelations - - //-------------------------------------------------------------------------- // TestHooks - for dumping range to support source transforms //-------------------------------------------------------------------------- @@ -43,51 +41,6 @@ let testHookMemberBody (membInfo: ValMemberInfo) (expr:Expr) = m.EndLine m.EndColumn -//-------------------------------------------------------------------------- -// NOTES: byref safety checks -// -// The .NET runtime has safety requirements on the use of byrefs. -// These include: -// A1: No generic type/method can be instantiated with byref types (meaning contains byref type). -// A2: No object field may be byref typed. -// -// In F# TAST level, byref types can be introduced/consumed at: -// B1: lambda ... (v:byref) ... -- binding sites for values. -// B2: &m -- address of operator, where m is local mutable or reference cell. -// B3: ms.M() -- method calls on mutable structs. -// B4: *br -- dereference byref -// B5: br <- x -- assign byref -// B6: expr@[byrefType] -- any type instantiation could introduce byref types. -// B7: asm -- TExpr_asm forms that create/consume byrefs. -// a) I_ldfld expr -// b) I_stfld -// -// Closures imply objects. -// Closures are either: -// a) explicit lambda expressions. -// b) functions partially applied below their known arity. -// -// Checks: -// C1: check no instantiation can contain byref types. -// C2: check type declarations to ensure no object field will have byref type. -// C3: check no explicit lambda expressions capture any free byref typed expression. -// C4: check byref type expr occur only as: -// C4.a) arg to functions occurring within their known arity. -// C4.b) arg to IL method calls, e.g. arising from calls to instance methods on mutable structs. -// C4.c) arg to property getter on mutable struct (record field projection) -// C4.d) rhs of byref typed binding (aliasing). -// Note [1] aliasing should not effect safety. The restrictions on RHS byref will also apply to alias. -// Note [2] aliasing happens in the generated hash/compare code. -// C5: when is a byref-typed-binding acceptable? -// a) if it will be a method local, ok. -// b) if it will be a top-level value stored as a field, then no. [These should have arity info]. -// -// Check commentary: -// The C4 checks ensure byref expressions are only passed directly as method arguments (or aliased). -// The C3 check ensures byref expressions are never captured, e.g. passed as direct method arg under a capturing thunk. -// The C2 checks no type can store byrefs (C4 ensures F# code would never actually store them). -// The C1 checks no generic type could be instanced to store byrefs. - //-------------------------------------------------------------------------- // NOTES: reraise safety checks //-------------------------------------------------------------------------- @@ -127,19 +80,33 @@ let testHookMemberBody (membInfo: ValMemberInfo) (expr:Expr) = //-------------------------------------------------------------------------- type env = - { boundTyparNames: string list + { + /// The bound type parameter names in scope + boundTyparNames: string list + + /// The bound type parameters in scope boundTypars: TyparMap + + /// The set of arguments to this method/function argVals: ValMap + /// "module remap info", i.e. hiding information down the signature chain, used to compute what's hidden by a signature sigToImplRemapInfo: (Remap * SignatureHidingInfo) list + /// Constructor limited - are we in the prelude of a constructor, prior to object initialization - limited: bool + ctorLimitedZone: bool + /// Are we in a quotation? quote : bool + /// Are we under []? reflect : bool + /// Are we in an extern declaration? - external : bool } + external : bool + + /// Current return scope of the expr. + returnScope : int } let BindTypar env (tp:Typar) = { env with @@ -158,11 +125,78 @@ let BindTypars g env (tps:Typar list) = /// Set the set of vals which are arguments in the active lambda. We are allowed to return /// byref arguments as byref returns. -let SetArgVals env (vs: Val list) = +let BindArgVals env (vs: Val list) = { env with argVals = ValMap.OfList (List.map (fun v -> (v,())) vs) } +/// Limit flags represent a type(s) returned from checking an expression(s) that is interesting to impose rules on. +[] +type LimitFlags = + | None = 0b00000 + | ByRef = 0b00001 + | ByRefOfSpanLike = 0b00011 + | ByRefOfStackReferringSpanLike = 0b00101 + | SpanLike = 0b01000 + | StackReferringSpanLike = 0b10000 + +[] +type Limit = + { + scope: int + flags: LimitFlags + } + + member this.IsLocal = this.scope >= 1 + +/// Check if the limit has the target limit. +let inline HasLimitFlag targetLimit (limit: Limit) = + limit.flags &&& targetLimit = targetLimit + +let NoLimit = { scope = 0; flags = LimitFlags.None } + +// Combining two limits will result in both limit flags merged. +// If none of the limits are limited by a by-ref or a stack referring span-like +// the scope will be 0. +let CombineTwoLimits limit1 limit2 = + let isByRef1 = HasLimitFlag LimitFlags.ByRef limit1 + let isByRef2 = HasLimitFlag LimitFlags.ByRef limit2 + let isStackSpan1 = HasLimitFlag LimitFlags.StackReferringSpanLike limit1 + let isStackSpan2 = HasLimitFlag LimitFlags.StackReferringSpanLike limit2 + let isLimited1 = isByRef1 || isStackSpan1 + let isLimited2 = isByRef2 || isStackSpan2 + + // A limit that has a stack referring span-like but not a by-ref, + // we force the scope to 1. This is to handle call sites + // that return a by-ref and have stack referring span-likes as arguments. + // This is to ensure we can only prevent out of scope at the method level rather than visibility. + let limit1 = + if isStackSpan1 && not isByRef1 then + { limit1 with scope = 1 } + else + limit1 + + let limit2 = + if isStackSpan2 && not isByRef2 then + { limit2 with scope = 1 } + else + limit2 + + match isLimited1, isLimited2 with + | false, false -> + { scope = 0; flags = limit1.flags ||| limit2.flags } + | true, true -> + { scope = Math.Max(limit1.scope, limit2.scope); flags = limit1.flags ||| limit2.flags } + | true, false -> + { limit1 with flags = limit1.flags ||| limit2.flags } + | false, true -> + { limit2 with flags = limit1.flags ||| limit2.flags } + +let CombineLimits limits = + (NoLimit, limits) + ||> List.fold CombineTwoLimits + type cenv = - { boundVals: Dictionary // really a hash set + { boundVals: Dictionary // really a hash set + limitVals: Dictionary mutable potentialUnboundUsesOfVals: StampMap g: TcGlobals amap: Import.ImportMap @@ -173,10 +207,76 @@ type cenv = viewCcu : CcuThunk reportErrors: bool isLastCompiland : bool*bool + isInternalTestSpanStackReferring: bool // outputs mutable usesQuotations : bool mutable entryPointGiven:bool } +/// Check if the value is an argument of a function +let IsValArgument env (v: Val) = + env.argVals.ContainsVal(v) + +/// Check if the value is a local, not an argument of a function. +let IsValLocal env (v: Val) = + v.ValReprInfo.IsNone && not (IsValArgument env v) + +/// Get the limit of the val. +let GetLimitVal cenv env m (v: Val) = + let limit = + match cenv.limitVals.TryGetValue(v.Stamp) with + | true, limit -> limit + | _ -> + if IsValLocal env v then + { scope = 1; flags = LimitFlags.None } + else + NoLimit + + if isSpanLikeTy cenv.g m v.Type then + // The value is a limited Span or might have become one through mutation + let isMutable = v.IsMutable && cenv.isInternalTestSpanStackReferring + let isLimited = HasLimitFlag LimitFlags.StackReferringSpanLike limit + + if isMutable || isLimited then + { limit with flags = LimitFlags.StackReferringSpanLike } + else + { limit with flags = LimitFlags.SpanLike } + + elif isByrefTy cenv.g v.Type then + let isByRefOfSpanLike = isSpanLikeTy cenv.g m (destByrefTy cenv.g v.Type) + + if isByRefOfSpanLike then + if HasLimitFlag LimitFlags.ByRefOfStackReferringSpanLike limit then + { limit with flags = LimitFlags.ByRefOfStackReferringSpanLike } + else + { limit with flags = LimitFlags.ByRefOfSpanLike } + else + { limit with flags = LimitFlags.ByRef } + + else + { limit with flags = LimitFlags.None } + +/// Get the limit of the val by reference. +let GetLimitValByRef cenv env m v = + let limit = GetLimitVal cenv env m v + + let scope = + // Getting the address of an argument will always be a scope of 1. + if IsValArgument env v then 1 + else limit.scope + + let flags = + if HasLimitFlag LimitFlags.StackReferringSpanLike limit then + LimitFlags.ByRefOfStackReferringSpanLike + elif HasLimitFlag LimitFlags.SpanLike limit then + LimitFlags.ByRefOfSpanLike + else + LimitFlags.ByRef + + { scope = scope; flags = flags } + +let LimitVal cenv (v:Val) limit = + cenv.limitVals.[v.Stamp] <- limit + let BindVal cenv env (v:Val) = //printfn "binding %s..." v.DisplayName let alreadyDone = cenv.boundVals.ContainsKey v.Stamp @@ -186,7 +286,7 @@ let BindVal cenv env (v:Val) = cenv.reportErrors && not v.HasBeenReferenced && not v.IsCompiledAsTopLevel && - not (v.DisplayName.StartsWith("_", System.StringComparison.Ordinal)) && + not (v.DisplayName.StartsWithOrdinal("_")) && not v.IsCompilerGenerated then match v.BaseOrThisInfo with @@ -201,7 +301,7 @@ let BindVals cenv env vs = List.iter (BindVal cenv env) vs // approx walk of type //-------------------------------------------------------------------------- -let rec CheckTypeDeep ((visitTyp,visitTyconRefOpt,visitAppTyOpt,visitTraitSolutionOpt, visitTyparOpt) as f) g env typ = +let rec CheckTypeDeep ((visitTy,visitTyconRefOpt,visitAppTyOpt,visitTraitSolutionOpt, visitTyarOpt) as f) g env isInner ty = // We iterate the _solved_ constraints as well, to pick up any record of trait constraint solutions // This means we walk _all_ the constraints _everywhere_ in a type, including // those attached to _solved_ type variables. This is used by PostTypeCheckSemanticChecks to detect uses of @@ -209,7 +309,7 @@ let rec CheckTypeDeep ((visitTyp,visitTyconRefOpt,visitAppTyOpt,visitTraitSoluti // The only record of these solutions is in the _solved_ constraints of types. // In an ideal world we would, instead, record the solutions to these constraints as "witness variables" in expressions, // rather than solely in types. - match typ with + match ty with | TType_var tp when tp.Solution.IsSome -> tp.Constraints |> List.iter (fun cx -> match cx with @@ -220,19 +320,19 @@ let rec CheckTypeDeep ((visitTyp,visitTyconRefOpt,visitAppTyOpt,visitTraitSoluti | _ -> ()) | _ -> () - let typ = stripTyparEqns typ - visitTyp typ + let ty = stripTyparEqns ty + visitTy ty - match typ with + match ty with | TType_forall (tps,body) -> let env = BindTypars g env tps - CheckTypeDeep f g env body + CheckTypeDeep f g env isInner body tps |> List.iter (fun tp -> tp.Constraints |> List.iter (CheckTypeConstraintDeep f g env)) | TType_measure _ -> () | TType_app (tcref,tinst) -> match visitTyconRefOpt with - | Some visitTyconRef -> visitTyconRef tcref + | Some visitTyconRef -> visitTyconRef isInner tcref | None -> () CheckTypesDeep f g env tinst match visitAppTyOpt with @@ -240,25 +340,26 @@ let rec CheckTypeDeep ((visitTyp,visitTyconRefOpt,visitAppTyOpt,visitTraitSoluti | None -> () | TType_ucase (_,tinst) -> CheckTypesDeep f g env tinst - | TType_tuple (_,typs) -> CheckTypesDeep f g env typs - | TType_fun (s,t) -> CheckTypeDeep f g env s; CheckTypeDeep f g env t + | TType_tuple (_,tys) -> CheckTypesDeep f g env tys + | TType_fun (s,t) -> CheckTypeDeep f g env true s; CheckTypeDeep f g env true t | TType_var tp -> if not tp.IsSolved then - match visitTyparOpt with + match visitTyarOpt with | None -> () - | Some visitTypar -> - visitTypar (env,tp) + | Some visitTyar -> + visitTyar (env,tp) -and CheckTypesDeep f g env tys = List.iter (CheckTypeDeep f g env) tys +and CheckTypesDeep f g env tys = + tys |> List.iter (CheckTypeDeep f g env true) and CheckTypeConstraintDeep f g env x = match x with - | TyparConstraint.CoercesTo(ty,_) -> CheckTypeDeep f g env ty + | TyparConstraint.CoercesTo(ty,_) -> CheckTypeDeep f g env true ty | TyparConstraint.MayResolveMember(traitInfo,_) -> CheckTraitInfoDeep f g env traitInfo - | TyparConstraint.DefaultsTo(_,ty,_) -> CheckTypeDeep f g env ty + | TyparConstraint.DefaultsTo(_,ty,_) -> CheckTypeDeep f g env true ty | TyparConstraint.SimpleChoice(tys,_) -> CheckTypesDeep f g env tys - | TyparConstraint.IsEnum(uty,_) -> CheckTypeDeep f g env uty - | TyparConstraint.IsDelegate(aty,bty,_) -> CheckTypeDeep f g env aty; CheckTypeDeep f g env bty + | TyparConstraint.IsEnum(uty,_) -> CheckTypeDeep f g env true uty + | TyparConstraint.IsDelegate(aty,bty,_) -> CheckTypeDeep f g env true aty; CheckTypeDeep f g env true bty | TyparConstraint.SupportsComparison _ | TyparConstraint.SupportsEquality _ | TyparConstraint.SupportsNull _ @@ -266,60 +367,59 @@ and CheckTypeConstraintDeep f g env x = | TyparConstraint.IsUnmanaged _ | TyparConstraint.IsReferenceType _ | TyparConstraint.RequiresDefaultConstructor _ -> () -and CheckTraitInfoDeep ((_,_,_,visitTraitSolutionOpt,_) as f) g env (TTrait(typs,_,_,argtys,rty,soln)) = - CheckTypesDeep f g env typs + +and CheckTraitInfoDeep ((_,_,_,visitTraitSolutionOpt,_) as f) g env (TTrait(tys,_,_,argtys,rty,soln)) = + CheckTypesDeep f g env tys CheckTypesDeep f g env argtys - Option.iter (CheckTypeDeep f g env) rty + Option.iter (CheckTypeDeep f g env true ) rty match visitTraitSolutionOpt, !soln with | Some visitTraitSolution, Some sln -> visitTraitSolution sln | _ -> () -//-------------------------------------------------------------------------- -// check for byref types -//-------------------------------------------------------------------------- +/// Check for byref-like types +let CheckForByrefLikeType cenv env m ty check = + CheckTypeDeep (ignore, Some (fun _deep tcref -> if isByrefLikeTyconRef cenv.g m tcref then check()), None, None, None) cenv.g env false ty -let CheckForByrefLikeType cenv env typ check = - CheckTypeDeep (ignore, Some (fun tcref -> if isByrefLikeTyconRef cenv.g tcref then check()), None, None, None) cenv.g env typ +/// Check for byref types +let CheckForByrefType cenv env ty check = + CheckTypeDeep (ignore, Some (fun _deep tcref -> if isByrefTyconRef cenv.g tcref then check()), None, None, None) cenv.g env false ty - -//-------------------------------------------------------------------------- -// check captures under lambdas -//-------------------------------------------------------------------------- - +/// check captures under lambdas +/// /// This is the definition of what can/can't be free in a lambda expression. This is checked at lambdas OR TBind(v,e) nodes OR TObjExprMethod nodes. /// For TBind(v,e) nodes we may know an 'arity' which gives as a larger set of legitimate syntactic arguments for a lambda. /// For TObjExprMethod(v,e) nodes we always know the legitimate syntactic arguments. let CheckEscapes cenv allowProtected m syntacticArgs body = (* m is a range suited to error reporting *) if cenv.reportErrors then - let cantBeFree v = - // First, if v is a syntactic argument, then it can be free since it was passed in. + let cantBeFree (v: Val) = + // If v is a syntactic argument, then it can be free since it was passed in. // The following can not be free: // a) BaseVal can never escape. // b) Byref typed values can never escape. // Note that: Local mutables can be free, as they will be boxed later. // These checks must correspond to the tests governing the error messages below. - let passedIn = ListSet.contains valEq v syntacticArgs - if passedIn then - false - else - (v.BaseOrThisInfo = BaseVal) || - (isByrefLikeTy cenv.g v.Type) + ((v.BaseOrThisInfo = BaseVal) || (isByrefLikeTy cenv.g m v.Type)) && + not (ListSet.contains valEq v syntacticArgs) let frees = freeInExpr CollectLocals body let fvs = frees.FreeLocals + if not allowProtected && frees.UsesMethodLocalConstructs then errorR(Error(FSComp.SR.chkProtectedOrBaseCalled(), m)) elif Zset.exists cantBeFree fvs then let v = List.find cantBeFree (Zset.elements fvs) - (* byref error before mutable error (byrefs are mutable...). *) - if (isByrefLikeTy cenv.g v.Type) then + + // byref error before mutable error (byrefs are mutable...). + if (isByrefLikeTy cenv.g m v.Type) then // Inner functions are not guaranteed to compile to method with a predictable arity (number of arguments). // As such, partial applications involving byref arguments could lead to closures containing byrefs. // For safety, such functions are assumed to have no known arity, and so can not accept byrefs. errorR(Error(FSComp.SR.chkByrefUsedInInvalidWay(v.DisplayName), m)) + elif v.BaseOrThisInfo = BaseVal then errorR(Error(FSComp.SR.chkBaseUsedInInvalidWay(), m)) + else (* Should be dead code, unless governing tests change *) errorR(InternalError(FSComp.SR.chkVariableUsedInInvalidWay(v.DisplayName), m)) @@ -328,43 +428,40 @@ let CheckEscapes cenv allowProtected m syntacticArgs body = (* m is a range suit None -//-------------------------------------------------------------------------- -// check type access -//-------------------------------------------------------------------------- - +/// Check type access let AccessInternalsVisibleToAsInternal thisCompPath internalsVisibleToPaths access = - // Each internalsVisibleToPath is a compPath for the internals of some assembly. - // Replace those by the compPath for the internals of this assembly. - // This makes those internals visible here, but still internal. Bug://3737 - (access,internalsVisibleToPaths) ||> List.fold (fun access internalsVisibleToPath -> - accessSubstPaths (thisCompPath,internalsVisibleToPath) access) + // Each internalsVisibleToPath is a compPath for the internals of some assembly. + // Replace those by the compPath for the internals of this assembly. + // This makes those internals visible here, but still internal. Bug://3737 + (access,internalsVisibleToPaths) ||> List.fold (fun access internalsVisibleToPath -> + accessSubstPaths (thisCompPath,internalsVisibleToPath) access) let CheckTypeForAccess (cenv:cenv) env objName valAcc m ty = if cenv.reportErrors then - let visitType ty = + let visitTye ty = // We deliberately only check the fully stripped type for accessibility, // because references to private type abbreviations are permitted match tryDestAppTy cenv.g ty with - | None -> () - | Some tcref -> + | ValueNone -> () + | ValueSome tcref -> let thisCompPath = compPathOfCcu cenv.viewCcu let tyconAcc = tcref.Accessibility |> AccessInternalsVisibleToAsInternal thisCompPath cenv.internalsVisibleToPaths if isLessAccessible tyconAcc valAcc then errorR(Error(FSComp.SR.chkTypeLessAccessibleThanType(tcref.DisplayName, (objName())), m)) - CheckTypeDeep (visitType, None, None, None, None) cenv.g env ty + CheckTypeDeep (visitTye, None, None, None, None) cenv.g env false ty let WarnOnWrongTypeForAccess (cenv:cenv) env objName valAcc m ty = if cenv.reportErrors then - let visitType ty = + let visitTye ty = // We deliberately only check the fully stripped type for accessibility, // because references to private type abbreviations are permitted match tryDestAppTy cenv.g ty with - | None -> () - | Some tcref -> + | ValueNone -> () + | ValueSome tcref -> let thisCompPath = compPathOfCcu cenv.viewCcu let tyconAcc = tcref.Accessibility |> AccessInternalsVisibleToAsInternal thisCompPath cenv.internalsVisibleToPaths if isLessAccessible tyconAcc valAcc then @@ -372,38 +469,120 @@ let WarnOnWrongTypeForAccess (cenv:cenv) env objName valAcc m ty = let warningText = errorText + System.Environment.NewLine + FSComp.SR.tcTypeAbbreviationsCheckedAtCompileTime() warning(AttributeChecking.ObsoleteWarning(warningText, m)) - CheckTypeDeep (visitType, None, None, None, None) cenv.g env ty + CheckTypeDeep (visitTye, None, None, None, None) cenv.g env false ty -//-------------------------------------------------------------------------- -// check type instantiations -//-------------------------------------------------------------------------- +/// Indicates whether a byref or byref-like type is permitted at a particular location +[] +type PermitByRefType = + /// Don't permit any byref or byref-like types + | None + + /// Permit only a Span or IsByRefLike type + | SpanLike + + /// Permit all byref and byref-like types + | All + + +/// Indicates whether an address-of operation is permitted at a particular location +[] +type PermitByRefExpr = + /// Permit a tuple of arguments where elements can be byrefs + | YesTupleOfArgs of int + + /// Context allows for byref typed expr. + | Yes + + /// Context allows for byref typed expr, but the byref must be returnable + | YesReturnable + + /// Context allows for byref typed expr, but the byref must be returnable and a non-local + | YesReturnableNonLocal + + /// General (address-of expr and byref values not allowed) + | No + + member context.Disallow = + match context with + | PermitByRefExpr.Yes + | PermitByRefExpr.YesReturnable + | PermitByRefExpr.YesReturnableNonLocal -> false + | _ -> true + + member context.PermitOnlyReturnable = + match context with + | PermitByRefExpr.YesReturnable + | PermitByRefExpr.YesReturnableNonLocal -> true + | _ -> false + + member context.PermitOnlyReturnableNonLocal = + match context with + | PermitByRefExpr.YesReturnableNonLocal -> true + | _ -> false + +let inline IsLimitEscapingScope env (context: PermitByRefExpr) limit = + (limit.scope >= env.returnScope || (limit.IsLocal && context.PermitOnlyReturnableNonLocal)) + +let mkArgsPermit n = + if n=1 then PermitByRefExpr.Yes + else PermitByRefExpr.YesTupleOfArgs n + +/// Work out what byref-values are allowed at input positions to named F# functions or members +let mkArgsForAppliedVal isBaseCall (vref:ValRef) argsl = + match vref.ValReprInfo with + | Some topValInfo -> + let argArities = topValInfo.AritiesOfArgs + let argArities = if isBaseCall && argArities.Length >= 1 then List.tail argArities else argArities + // Check for partial applications: arguments to partial applciations don't get to use byrefs + if List.length argsl >= argArities.Length then + List.map mkArgsPermit argArities + else + [] + | None -> [] + +/// Work out what byref-values are allowed at input positions to functions +let rec mkArgsForAppliedExpr isBaseCall argsl x = + match stripExpr x with + // recognise val + | Expr.Val (vref,_,_) -> mkArgsForAppliedVal isBaseCall vref argsl + // step through instantiations + | Expr.App(f,_fty,_tyargs,[],_) -> mkArgsForAppliedExpr isBaseCall argsl f + // step through subsumption coercions + | Expr.Op(TOp.Coerce,_,[f],_) -> mkArgsForAppliedExpr isBaseCall argsl f + | _ -> [] /// Check types occurring in the TAST. -let CheckType permitByrefs (cenv:cenv) env m ty = +let CheckType permitByRefLike (cenv:cenv) env m ty = if cenv.reportErrors then - let visitTypar (env,tp) = + let visitTyar (env,tp) = if not (env.boundTypars.ContainsKey tp) then if tp.IsCompilerGenerated then errorR (Error(FSComp.SR.checkNotSufficientlyGenericBecauseOfScopeAnon(),m)) else errorR (Error(FSComp.SR.checkNotSufficientlyGenericBecauseOfScope(tp.DisplayName),m)) - let visitTyconRef tcref = - if not permitByrefs && isByrefLikeTyconRef cenv.g tcref then + let visitTyconRef _isInner tcref = + + match permitByRefLike with + | PermitByRefType.None when isByrefLikeTyconRef cenv.g m tcref -> + errorR(Error(FSComp.SR.chkErrorUseOfByref(), m)) + | PermitByRefType.SpanLike when isByrefTyconRef cenv.g tcref -> errorR(Error(FSComp.SR.chkErrorUseOfByref(), m)) + | _ -> () + if tyconRefEq cenv.g cenv.g.system_Void_tcref tcref then errorR(Error(FSComp.SR.chkSystemVoidOnlyInTypeof(), m)) // check if T contains byref types in case of byref let visitAppTy (tcref,tinst) = - if isByrefLikeTyconRef cenv.g tcref then - let visitType ty0 = + if isByrefLikeTyconRef cenv.g m tcref then + let visitTye ty0 = match tryDestAppTy cenv.g ty0 with - | None -> () - | Some tcref -> - if isByrefLikeTyconRef cenv.g tcref then + | ValueNone -> () + | ValueSome tcref2 -> + if isByrefTyconRef cenv.g tcref2 then errorR(Error(FSComp.SR.chkNoByrefsOfByrefs(NicePrint.minimalStringOfType cenv.denv ty), m)) - CheckTypesDeep (visitType, None, None, None, None) cenv.g env tinst + CheckTypesDeep (visitTye, None, None, None, None) cenv.g env tinst let visitTraitSolution info = match info with @@ -414,58 +593,25 @@ let CheckType permitByrefs (cenv:cenv) env m ty = cenv.potentialUnboundUsesOfVals <- cenv.potentialUnboundUsesOfVals.Add(vref.Stamp,m) | _ -> () - CheckTypeDeep (ignore, Some visitTyconRef, Some visitAppTy, Some visitTraitSolution, Some visitTypar) cenv.g env ty + CheckTypeDeep (ignore, Some visitTyconRef, Some visitAppTy, Some visitTraitSolution, Some visitTyar) cenv.g env false ty /// Check types occurring in TAST (like CheckType) and additionally reject any byrefs. /// The additional byref checks are to catch "byref instantiations" - one place were byref are not permitted. -let CheckTypeNoByrefs (cenv:cenv) env m ty = CheckType false cenv env m ty -let CheckTypePermitByrefs (cenv:cenv) env m ty = CheckType true cenv env m ty - -let CheckTypeInstNoByrefs cenv env m tyargs = - tyargs |> List.iter (CheckTypeNoByrefs cenv env m) +let CheckTypeNoByrefs (cenv:cenv) env m ty = CheckType PermitByRefType.None cenv env m ty -let CheckTypeInstPermitByrefs cenv env m tyargs = - tyargs |> List.iter (CheckType true cenv env m) - - -//-------------------------------------------------------------------------- -// check exprs etc -//-------------------------------------------------------------------------- - -type ByrefContext = - /// Tuple of arguments where elements can be byrefs - | TupleOfArgsPermitByrefs of int - /// Context allows for byref typed expr. Flag indicates if this is a byref-return position - | PermitByref of isReturn: bool - /// General (byref type expr not allowed) - | NoByrefs +/// Check types occurring in TAST but allow a Span or similar +let CheckTypePermitSpanLike (cenv:cenv) env m ty = CheckType PermitByRefType.SpanLike cenv env m ty -let noByrefs context = match context with PermitByref _ -> false | _ -> true +/// Check types occurring in TAST but allow all byrefs. Only used on internally-generated types +let CheckTypePermitAllByrefs (cenv:cenv) env m ty = CheckType PermitByRefType.All cenv env m ty -let mkArgsPermitByrefs isByrefReturnCall n = - if n=1 then PermitByref isByrefReturnCall - else TupleOfArgsPermitByrefs n +let CheckTypeInstNoByrefs cenv env m tyargs = + tyargs |> List.iter (CheckTypeNoByrefs cenv env m) -/// Work out what byref-values are allowed at input positions to named F# functions or members -let mkArgsForAppliedVal isByrefReturnCall (vref:ValRef) = - match vref.ValReprInfo with - | Some topValInfo -> List.map (mkArgsPermitByrefs isByrefReturnCall) topValInfo.AritiesOfArgs - | None -> [] +let CheckTypeInstPermitAllByrefs cenv env m tyargs = + tyargs |> List.iter (CheckTypePermitAllByrefs cenv env m) -/// Work out what byref-values are allowed at input positions to functions -let rec mkArgsForAppliedExpr isByrefReturnCall x = - match x with - // recognise val - | Expr.Val (vref,_,_) -> mkArgsForAppliedVal isByrefReturnCall vref - // step through reclink - | Expr.Link eref -> mkArgsForAppliedExpr isByrefReturnCall !eref - // step through instantiations - | Expr.App(f,_fty,_tyargs,[],_) -> mkArgsForAppliedExpr isByrefReturnCall f - // step through subsumption coercions - | Expr.Op(TOp.Coerce,_,[f],_) -> mkArgsForAppliedExpr isByrefReturnCall f - | _ -> [] - /// Applied functions get wrapped in coerce nodes for subsumption coercions let (|OptionalCoerce|) = function | Expr.Op(TOp.Coerce _, _, [Expr.App(f, _, _, [], _)], _) -> f @@ -501,111 +647,301 @@ let CheckMultipleInterfaceInstantiations cenv interfaces m = errorR(Error(FSComp.SR.chkMultipleGenericInterfaceInstantiations((NicePrint.minimalStringOfType cenv.denv typ1), (NicePrint.minimalStringOfType cenv.denv typ2)),m)) /// Check an expression, where the expression is in a position where byrefs can be generated -let rec CheckExprNoByrefs (cenv:cenv) (env:env) expr = - CheckExpr cenv env expr NoByrefs +let rec CheckExprNoByrefs cenv env expr = + CheckExpr cenv env expr PermitByRefExpr.No |> ignore /// Check a value -and CheckVal (cenv:cenv) (env:env) v m context = +and CheckValRef (cenv:cenv) (env:env) v m (context: PermitByRefExpr) = + if cenv.reportErrors then if isSpliceOperator cenv.g v && not env.quote then errorR(Error(FSComp.SR.chkSplicingOnlyInQuotations(), m)) if isSpliceOperator cenv.g v then errorR(Error(FSComp.SR.chkNoFirstClassSplicing(), m)) if valRefEq cenv.g v cenv.g.addrof_vref then errorR(Error(FSComp.SR.chkNoFirstClassAddressOf(), m)) if valRefEq cenv.g v cenv.g.reraise_vref then errorR(Error(FSComp.SR.chkNoFirstClassRethrow(), m)) - if noByrefs context && isByrefLikeTy cenv.g v.Type then - // byref typed val can only occur in permitting contexts + + // ByRefLike-typed values can only occur in permitting contexts + if context.Disallow && isByrefLikeTy cenv.g m v.Type then errorR(Error(FSComp.SR.chkNoByrefAtThisPoint(v.DisplayName), m)) - CheckTypePermitByrefs cenv env m v.Type + + CheckTypePermitAllByrefs cenv env m v.Type // the byref checks are done at the actual binding of the value + +/// Check a use of a value +and CheckValUse (cenv: cenv) (env: env) (vref: ValRef, vFlags, m) (context: PermitByRefExpr) = + + let g = cenv.g + + let limit = GetLimitVal cenv env m vref.Deref + + if cenv.reportErrors then + + if vref.BaseOrThisInfo = BaseVal then + errorR(Error(FSComp.SR.chkLimitationsOfBaseKeyword(), m)) + + let isCallOfConstructorOfAbstractType = + (match vFlags with NormalValUse -> true | _ -> false) && + vref.IsConstructor && + (match vref.DeclaringEntity with Parent tcref -> isAbstractTycon tcref.Deref | _ -> false) + + if isCallOfConstructorOfAbstractType then + errorR(Error(FSComp.SR.tcAbstractTypeCannotBeInstantiated(),m)) + + // This is used to handle this case: + // let x = 1 + // let y = &x + // &y + let isReturnExprBuiltUsingStackReferringByRefLike = + context.PermitOnlyReturnable && + ((HasLimitFlag LimitFlags.ByRef limit && IsLimitEscapingScope env context limit) || + HasLimitFlag LimitFlags.StackReferringSpanLike limit) + + if isReturnExprBuiltUsingStackReferringByRefLike then + let isSpanLike = isSpanLikeTy g m vref.Type + let isCompGen = vref.IsCompilerGenerated + match isSpanLike, isCompGen with + | true, true -> errorR(Error(FSComp.SR.chkNoSpanLikeValueFromExpression(), m)) + | true, false -> errorR(Error(FSComp.SR.chkNoSpanLikeVariable(vref.DisplayName), m)) + | false, true -> errorR(Error(FSComp.SR.chkNoByrefAddressOfValueFromExpression(), m)) + | false, false -> errorR(Error(FSComp.SR.chkNoByrefAddressOfLocal(vref.DisplayName), m)) + + let isReturnOfStructThis = + context.PermitOnlyReturnable && + isByrefTy g vref.Type && + (vref.BaseOrThisInfo = MemberThisVal) + + if isReturnOfStructThis then + errorR(Error(FSComp.SR.chkStructsMayNotReturnAddressesOfContents(), m)) + + CheckValRef cenv env vref m context + + limit /// Check an expression, given information about the position of the expression -and CheckExpr (cenv:cenv) (env:env) expr (context:ByrefContext) = +and CheckForOverAppliedExceptionRaisingPrimitive (cenv:cenv) expr = + let g = cenv.g + let expr = stripExpr expr + + // Some things are more easily checked prior to NormalizeAndAdjustPossibleSubsumptionExprs + match expr with + | Expr.App(f,_fty,_tyargs,argsl,_m) -> + + if cenv.reportErrors then + + // Special diagnostics for `raise`, `failwith`, `failwithf`, `nullArg`, `invalidOp` library intrinsics commonly used to raise exceptions + // to warn on over-application. + match f with + | OptionalCoerce(Expr.Val(v, _, funcRange)) + when (valRefEq g v g.raise_vref || valRefEq g v g.failwith_vref || valRefEq g v g.null_arg_vref || valRefEq g v g.invalid_op_vref) -> + match argsl with + | [] | [_] -> () + | _ :: _ :: _ -> + warning(Error(FSComp.SR.checkRaiseFamilyFunctionArgumentCount(v.DisplayName, 1, argsl.Length), funcRange)) + + | OptionalCoerce(Expr.Val(v, _, funcRange)) when valRefEq g v g.invalid_arg_vref -> + match argsl with + | [] | [_] | [_; _] -> () + | _ :: _ :: _ :: _ -> + warning(Error(FSComp.SR.checkRaiseFamilyFunctionArgumentCount(v.DisplayName, 2, argsl.Length), funcRange)) + + | OptionalCoerce(Expr.Val(failwithfFunc, _, funcRange)) when valRefEq g failwithfFunc g.failwithf_vref -> + match argsl with + | Expr.App (Expr.Val(newFormat, _, _), _, [_; typB; typC; _; _], [Expr.Const(Const.String formatString, formatRange, _)], _) :: xs when valRefEq g newFormat g.new_format_vref -> + match CheckFormatStrings.TryCountFormatStringArguments formatRange g formatString typB typC with + | Some n -> + let expected = n + 1 + let actual = List.length xs + 1 + if expected < actual then + warning(Error(FSComp.SR.checkRaiseFamilyFunctionArgumentCount(failwithfFunc.DisplayName, expected, actual), funcRange)) + | None -> () + | _ -> () + | _ -> () + | _ -> () + +and CheckCallLimitArgs cenv env m returnTy limitArgs (context: PermitByRefExpr) = + let isReturnByref = isByrefTy cenv.g returnTy + let isReturnSpanLike = isSpanLikeTy cenv.g m returnTy + + // If return is a byref, and being used as a return, then a single argument cannot be a local-byref or a stack referring span-like. + let isReturnLimitedByRef = + isReturnByref && + (HasLimitFlag LimitFlags.ByRef limitArgs || + HasLimitFlag LimitFlags.StackReferringSpanLike limitArgs) + + // If return is a byref, and being used as a return, then a single argument cannot be a stack referring span-like or a local-byref of a stack referring span-like. + let isReturnLimitedSpanLike = + isReturnSpanLike && + (HasLimitFlag LimitFlags.StackReferringSpanLike limitArgs || + HasLimitFlag LimitFlags.ByRefOfStackReferringSpanLike limitArgs) + + if cenv.reportErrors then + if context.PermitOnlyReturnable && ((isReturnLimitedByRef && IsLimitEscapingScope env context limitArgs) || isReturnLimitedSpanLike) then + if isReturnLimitedSpanLike then + errorR(Error(FSComp.SR.chkNoSpanLikeValueFromExpression(), m)) + else + errorR(Error(FSComp.SR.chkNoByrefAddressOfValueFromExpression(), m)) + + // You cannot call a function that takes a byref of a span-like (not stack referring) and + // either a stack referring spanlike or a local-byref of a stack referring span-like. + let isCallLimited = + HasLimitFlag LimitFlags.ByRefOfSpanLike limitArgs && + (HasLimitFlag LimitFlags.StackReferringSpanLike limitArgs || + HasLimitFlag LimitFlags.ByRefOfStackReferringSpanLike limitArgs) + + if isCallLimited then + errorR(Error(FSComp.SR.chkNoByrefLikeFunctionCall(), m)) + + if isReturnLimitedByRef then + if isSpanLikeTy cenv.g m (destByrefTy cenv.g returnTy) then + let isStackReferring = + HasLimitFlag LimitFlags.StackReferringSpanLike limitArgs || + HasLimitFlag LimitFlags.ByRefOfStackReferringSpanLike limitArgs + if isStackReferring then + { limitArgs with flags = LimitFlags.ByRefOfStackReferringSpanLike } + else + { limitArgs with flags = LimitFlags.ByRefOfSpanLike } + else + { limitArgs with flags = LimitFlags.ByRef } + + elif isReturnLimitedSpanLike then + { scope = 1; flags = LimitFlags.StackReferringSpanLike } + + elif isReturnByref then + if isSpanLikeTy cenv.g m (destByrefTy cenv.g returnTy) then + { limitArgs with flags = LimitFlags.ByRefOfSpanLike } + else + { limitArgs with flags = LimitFlags.ByRef } + + elif isReturnSpanLike then + { scope = 1; flags = LimitFlags.SpanLike } + + else + { scope = 1; flags = LimitFlags.None } + +/// Check call arguments, including the return argument. +and CheckCall cenv env m returnTy args contexts context = + let limitArgs = CheckExprs cenv env args contexts + CheckCallLimitArgs cenv env m returnTy limitArgs context + +/// Check call arguments, including the return argument. The receiver argument is handled differently. +and CheckCallWithReceiver cenv env m returnTy args contexts context = + match args with + | [] -> failwith "CheckCallWithReceiver: Argument list is empty." + | receiverArg :: args -> + + let receiverContext, contexts = + match contexts with + | [] -> PermitByRefExpr.No, [] + | context :: contexts -> context, contexts + + let receiverLimit = CheckExpr cenv env receiverArg receiverContext + let limitArgs = + let limitArgs = CheckExprs cenv env args contexts + // We do not include the receiver's limit in the limit args unless the receiver is a stack referring span-like. + if HasLimitFlag LimitFlags.ByRefOfStackReferringSpanLike receiverLimit then + // Scope is 1 to ensure any by-refs returned can only be prevented for out of scope of the function/method, not visibility. + CombineTwoLimits limitArgs { receiverLimit with scope = 1 } + else + limitArgs + CheckCallLimitArgs cenv env m returnTy limitArgs context + +/// Check an expression, given information about the position of the expression +and CheckExpr (cenv:cenv) (env:env) origExpr (context:PermitByRefExpr) : Limit = + let g = cenv.g + + let origExpr = stripExpr origExpr + + // CheckForOverAppliedExceptionRaisingPrimitive is more easily checked prior to NormalizeAndAdjustPossibleSubsumptionExprs + CheckForOverAppliedExceptionRaisingPrimitive cenv origExpr + let expr = NormalizeAndAdjustPossibleSubsumptionExprs g origExpr let expr = stripExpr expr match expr with | Expr.Sequential (e1,e2,dir,_,_) -> CheckExprNoByrefs cenv env e1 match dir with - | NormalSeq -> CheckExpr cenv env e2 context // carry context into _;RHS (normal sequencing only) - | ThenDoSeq -> CheckExprNoByrefs cenv {env with limited=false} e2 + | NormalSeq -> + CheckExpr cenv env e2 context // carry context into _;RHS (normal sequencing only) + | ThenDoSeq -> + CheckExprNoByrefs cenv {env with ctorLimitedZone=false} e2 + NoLimit + + | Expr.Let ((TBind(v,_bindRhs,_) as bind),body,_,_) -> + let isByRef = isByrefTy cenv.g v.Type + + let bindingContext = + if isByRef then + PermitByRefExpr.YesReturnable + else + PermitByRefExpr.Yes - | Expr.Let (bind,body,_,_) -> - CheckBinding cenv env false bind - BindVal cenv env bind.Var + let limit = CheckBinding cenv { env with returnScope = env.returnScope + 1 } false bindingContext bind + BindVal cenv env v + LimitVal cenv v { limit with scope = if isByRef then limit.scope else env.returnScope } CheckExpr cenv env body context | Expr.Const (_,m,ty) -> - CheckTypePermitByrefs cenv env m ty + CheckTypePermitAllByrefs cenv env m ty + NoLimit - | Expr.Val (v,vFlags,m) -> - if cenv.reportErrors then - if v.BaseOrThisInfo = BaseVal then - errorR(Error(FSComp.SR.chkLimitationsOfBaseKeyword(), m)) - if (match vFlags with NormalValUse -> true | _ -> false) && - v.IsConstructor && - (match v.ActualParent with Parent tcref -> isAbstractTycon tcref.Deref | _ -> false) then - errorR(Error(FSComp.SR.tcAbstractTypeCannotBeInstantiated(),m)) - - if isByrefTy cenv.g v.Type && - // A byref return location... - (match context with PermitByref isReturn -> isReturn | _ -> false) && - // The value is a local.... - v.ValReprInfo.IsNone && - // The value is not an argument... - not (env.argVals.ContainsVal(v.Deref)) then - errorR(Error(FSComp.SR.chkNoByrefReturnOfLocal(v.DisplayName), m)) - - CheckVal cenv env v m context + | Expr.Val (vref,vFlags,m) -> + CheckValUse cenv env (vref, vFlags, m) context | Expr.Quote(ast,savedConv,_isFromQueryExpression,m,ty) -> - CheckExprNoByrefs cenv {env with quote=true} ast - if cenv.reportErrors then - cenv.usesQuotations <- true - try - let qscope = QuotationTranslator.QuotationGenerationScope.Create (cenv.g,cenv.amap,cenv.viewCcu, QuotationTranslator.IsReflectedDefinition.No) - let qdata = QuotationTranslator.ConvExprPublic qscope QuotationTranslator.QuotationTranslationEnv.Empty ast - let typeDefs,spliceTypes,spliceExprs = qscope.Close() - match savedConv.Value with - | None -> savedConv:= Some (typeDefs, List.map fst spliceTypes, List.map fst spliceExprs, qdata) - | Some _ -> () - with QuotationTranslator.InvalidQuotedTerm e -> - errorRecovery e m + CheckExprNoByrefs cenv {env with quote=true} ast + if cenv.reportErrors then + cenv.usesQuotations <- true + + // Translate to quotation data + try + let qscope = QuotationTranslator.QuotationGenerationScope.Create (g,cenv.amap,cenv.viewCcu, QuotationTranslator.IsReflectedDefinition.No) + let qdata = QuotationTranslator.ConvExprPublic qscope QuotationTranslator.QuotationTranslationEnv.Empty ast + let typeDefs,spliceTypes,spliceExprs = qscope.Close() + match savedConv.Value with + | None -> savedConv:= Some (typeDefs, List.map fst spliceTypes, List.map fst spliceExprs, qdata) + | Some _ -> () + with QuotationTranslator.InvalidQuotedTerm e -> + errorRecovery e m - CheckTypeNoByrefs cenv env m ty - - | Expr.Obj (_,typ,basev,superInitCall,overrides,iimpls,m) -> - CheckExprNoByrefs cenv env superInitCall - CheckMethods cenv env basev overrides - CheckInterfaceImpls cenv env basev iimpls - CheckTypePermitByrefs cenv env m typ - let interfaces = - [ if isInterfaceTy cenv.g typ then - yield! AllSuperTypesOfType cenv.g cenv.amap m AllowMultiIntfInstantiations.Yes typ - for (ty,_) in iimpls do - yield! AllSuperTypesOfType cenv.g cenv.amap m AllowMultiIntfInstantiations.Yes ty ] - |> List.filter (isInterfaceTy cenv.g) - CheckMultipleInterfaceInstantiations cenv interfaces m + CheckTypeNoByrefs cenv env m ty + NoLimit + + | Expr.Obj (_,ty,basev,superInitCall,overrides,iimpls,m) -> + CheckExprNoByrefs cenv env superInitCall + CheckMethods cenv env basev overrides + CheckInterfaceImpls cenv env basev iimpls + CheckTypeNoByrefs cenv env m ty + + let interfaces = + [ if isInterfaceTy g ty then + yield! AllSuperTypesOfType g cenv.amap m AllowMultiIntfInstantiations.Yes ty + for (ty,_) in iimpls do + yield! AllSuperTypesOfType g cenv.amap m AllowMultiIntfInstantiations.Yes ty ] + |> List.filter (isInterfaceTy g) + + CheckMultipleInterfaceInstantiations cenv interfaces m + NoLimit // Allow base calls to F# methods - | Expr.App((InnerExprPat(ExprValWithPossibleTypeInst(v,vFlags,_,_) as f)),fty,tyargs,(Expr.Val(baseVal,_,_) :: rest),m) + | Expr.App((InnerExprPat(ExprValWithPossibleTypeInst(v,vFlags,_,_) as f)),_fty,tyargs,(Expr.Val(baseVal,_,_) :: rest),m) when ((match vFlags with VSlotDirectCall -> true | _ -> false) && baseVal.BaseOrThisInfo = BaseVal) -> - // dprintfn "GOT BASE VAL USE" + let memberInfo = Option.get v.MemberInfo if memberInfo.MemberFlags.IsDispatchSlot then errorR(Error(FSComp.SR.tcCannotCallAbstractBaseMember(v.DisplayName),m)) + NoLimit else - CheckVal cenv env v m NoByrefs - CheckVal cenv env baseVal m NoByrefs - CheckTypePermitByrefs cenv env m fty - CheckTypeInstPermitByrefs cenv env m tyargs - CheckExprs cenv env rest (List.tail (mkArgsForAppliedExpr false f)) + CheckValRef cenv env v m PermitByRefExpr.No + CheckValRef cenv env baseVal m PermitByRefExpr.No + CheckTypeInstNoByrefs cenv env m tyargs + CheckExprs cenv env rest (mkArgsForAppliedExpr true rest f) // Allow base calls to IL methods | Expr.Op (TOp.ILCall (virt,_,_,_,_,_,_,mref,enclTypeArgs,methTypeArgs,tys),tyargs,(Expr.Val(baseVal,_,_)::rest),m) when not virt && baseVal.BaseOrThisInfo = BaseVal -> // Disallow calls to abstract base methods on IL types. - match tryDestAppTy cenv.g baseVal.Type with - | Some tcref when tcref.IsILTycon -> + match tryDestAppTy g baseVal.Type with + | ValueSome tcref when tcref.IsILTycon -> try // This is awkward - we have to explicitly re-resolve back to the IL metadata to determine if the method is abstract. // We believe this may be fragile in some situations, since we are using the Abstract IL code to compare @@ -616,86 +952,65 @@ and CheckExpr (cenv:cenv) (env:env) expr (context:ByrefContext) = errorR(Error(FSComp.SR.tcCannotCallAbstractBaseMember(mdef.Name),m)) with _ -> () // defensive coding | _ -> () + CheckTypeInstNoByrefs cenv env m tyargs CheckTypeInstNoByrefs cenv env m enclTypeArgs CheckTypeInstNoByrefs cenv env m methTypeArgs CheckTypeInstNoByrefs cenv env m tys - CheckVal cenv env baseVal m NoByrefs - CheckExprsPermitByrefs cenv env rest + CheckValRef cenv env baseVal m PermitByRefExpr.No + CheckExprsPermitByRefLike cenv env rest | Expr.Op (c,tyargs,args,m) -> - CheckExprOp cenv env (c,tyargs,args,m) context expr + CheckExprOp cenv env (c,tyargs,args,m) context expr // Allow 'typeof' calls as a special case, the only accepted use of System.Void! - | TypeOfExpr cenv.g ty when isVoidTy cenv.g ty -> - () // typeof allowed. Special case. No further checks. + | TypeOfExpr g ty when isVoidTy g ty -> + NoLimit - | TypeDefOfExpr cenv.g ty when isVoidTy cenv.g ty -> - () // typedefof allowed. Special case. No further checks. + // Allow 'typedefof' calls as a special case, the only accepted use of System.Void! + | TypeDefOfExpr g ty when isVoidTy g ty -> + NoLimit // Allow '%expr' in quotations - | Expr.App(Expr.Val(vref,_,_),_,tinst,[arg],m) when isSpliceOperator cenv.g vref && env.quote -> - CheckTypeInstPermitByrefs cenv env m tinst + | Expr.App(Expr.Val(vref,_,_),_,tinst,[arg],m) when isSpliceOperator g vref && env.quote -> + CheckTypeInstPermitAllByrefs cenv env m tinst // it's the splice operator, a byref instantiation is allowed CheckExprNoByrefs cenv env arg + NoLimit - | Expr.App(f,fty,tyargs,argsl,m) -> - if cenv.reportErrors then - let g = cenv.g - match f with - | OptionalCoerce(Expr.Val(v, _, funcRange)) - when (valRefEq g v g.raise_vref || valRefEq g v g.failwith_vref || valRefEq g v g.null_arg_vref || valRefEq g v g.invalid_op_vref) -> - match argsl with - | [] | [_] -> () - | _ :: _ :: _ -> - warning(Error(FSComp.SR.checkRaiseFamilyFunctionArgumentCount(v.DisplayName, 1, List.length argsl), funcRange)) - | OptionalCoerce(Expr.Val(v, _, funcRange)) when valRefEq g v g.invalid_arg_vref -> - match argsl with - | [] | [_] | [_; _] -> () - | _ :: _ :: _ :: _ -> - warning(Error(FSComp.SR.checkRaiseFamilyFunctionArgumentCount(v.DisplayName, 2, List.length argsl), funcRange)) - | OptionalCoerce(Expr.Val(failwithfFunc, _, funcRange)) when valRefEq g failwithfFunc g.failwithf_vref -> - match argsl with - | Expr.App (Expr.Val(newFormat, _, _), _, [_; typB; typC; _; _], [Expr.Const(Const.String formatString, formatRange, _)], _) :: xs when valRefEq g newFormat g.new_format_vref -> - match CheckFormatStrings.TryCountFormatStringArguments formatRange g formatString typB typC with - | Some n -> - let expected = n + 1 - let actual = List.length xs + 1 - if expected < actual then - warning(Error(FSComp.SR.checkRaiseFamilyFunctionArgumentCount(failwithfFunc.DisplayName, expected, actual), funcRange)) - | None -> () - | _ -> - () - | _ -> - () - + // Check an application + | Expr.App(f,_fty,tyargs,argsl,m) -> CheckTypeInstNoByrefs cenv env m tyargs - CheckTypePermitByrefs cenv env m fty - CheckTypeInstPermitByrefs cenv env m tyargs CheckExprNoByrefs cenv env f - let isByrefReturnCall = - // if return is a byref, and being used as a return, then all arguments must be usable as byref returns - match context with - | PermitByref true when isByrefTy cenv.g (tyOfExpr cenv.g expr) -> true + + let hasReceiver = + match f with + | Expr.Val(vref, _, _) when vref.IsInstanceMember && not argsl.IsEmpty -> true | _ -> false - CheckExprs cenv env argsl (mkArgsForAppliedExpr isByrefReturnCall f) - // REVIEW: fold the next two cases together + let returnTy = tyOfExpr g expr + let contexts = mkArgsForAppliedExpr false argsl f + if hasReceiver then + CheckCallWithReceiver cenv env m returnTy argsl contexts context + else + CheckCall cenv env m returnTy argsl contexts context + | Expr.Lambda(_,_ctorThisValOpt,_baseValOpt,argvs,_,m,rty) -> let topValInfo = ValReprInfo ([],[argvs |> List.map (fun _ -> ValReprInfo.unnamedTopArg1)],ValReprInfo.unnamedRetVal) let ty = mkMultiLambdaTy m argvs rty in - CheckLambdas false None cenv env false topValInfo false expr m ty + CheckLambdas false None cenv env false topValInfo false expr m ty PermitByRefExpr.Yes | Expr.TyLambda(_,tps,_,m,rty) -> let topValInfo = ValReprInfo (ValReprInfo.InferTyparInfo tps,[],ValReprInfo.unnamedRetVal) - let ty = tryMkForallTy tps rty in - CheckLambdas false None cenv env false topValInfo false expr m ty + let ty = mkForallTyIfNeeded tps rty in + CheckLambdas false None cenv env false topValInfo false expr m ty PermitByRefExpr.Yes | Expr.TyChoose(tps,e1,_) -> - let env = BindTypars cenv.g env tps + let env = BindTypars g env tps CheckExprNoByrefs cenv env e1 + NoLimit | Expr.Match(_,_,dtree,targets,m,ty) -> - CheckTypePermitByrefs cenv env m ty // computed byrefs allowed at each branch + CheckTypePermitAllByrefs cenv env m ty // computed byrefs allowed at each branch CheckDecisionTree cenv env dtree CheckDecisionTreeTargets cenv env targets context @@ -703,6 +1018,7 @@ and CheckExpr (cenv:cenv) (env:env) expr (context:ByrefContext) = BindVals cenv env (valsOfBinds binds) CheckBindings cenv env binds CheckExprNoByrefs cenv env e + NoLimit | Expr.StaticOptimization (constraints,e2,e3,m) -> CheckExprNoByrefs cenv env e2 @@ -713,20 +1029,22 @@ and CheckExpr (cenv:cenv) (env:env) expr (context:ByrefContext) = CheckTypeNoByrefs cenv env m ty2 | TTyconIsStruct(ty1) -> CheckTypeNoByrefs cenv env m ty1) + NoLimit | Expr.Link _ -> failwith "Unexpected reclink" -and CheckMethods cenv env baseValOpt l = - l |> List.iter (CheckMethod cenv env baseValOpt) +and CheckMethods cenv env baseValOpt methods = + methods |> List.iter (CheckMethod cenv env baseValOpt) and CheckMethod cenv env baseValOpt (TObjExprMethod(_,attribs,tps,vs,body,m)) = let env = BindTypars cenv.g env tps let vs = List.concat vs + let env = BindArgVals env vs CheckAttribs cenv env attribs CheckNoReraise cenv None body CheckEscapes cenv true m (match baseValOpt with Some x -> x:: vs | None -> vs) body |> ignore - CheckExprPermitByref cenv env body + CheckExpr cenv { env with returnScope = env.returnScope + 1 } body PermitByRefExpr.YesReturnableNonLocal |> ignore and CheckInterfaceImpls cenv env baseValOpt l = l |> List.iter (CheckInterfaceImpl cenv env baseValOpt) @@ -735,200 +1053,293 @@ and CheckInterfaceImpl cenv env baseValOpt (_ty,overrides) = CheckMethods cenv env baseValOpt overrides and CheckExprOp cenv env (op,tyargs,args,m) context expr = - let limitedCheck() = - if env.limited then errorR(Error(FSComp.SR.chkObjCtorsCantUseExceptionHandling(), m)) - List.iter (CheckTypePermitByrefs cenv env m) tyargs + let g = cenv.g + let ctorLimitedZoneCheck() = + if env.ctorLimitedZone then errorR(Error(FSComp.SR.chkObjCtorsCantUseExceptionHandling(), m)) + (* Special cases *) match op,tyargs,args with // Handle these as special cases since mutables are allowed inside their bodies | TOp.While _,_,[Expr.Lambda(_,_,_,[_],e1,_,_);Expr.Lambda(_,_,_,[_],e2,_,_)] -> CheckTypeInstNoByrefs cenv env m tyargs - CheckExprsNoByrefs cenv env [e1;e2] + CheckExprsNoByRefLike cenv env [e1;e2] | TOp.TryFinally _,[_],[Expr.Lambda(_,_,_,[_],e1,_,_); Expr.Lambda(_,_,_,[_],e2,_,_)] -> - CheckTypeInstPermitByrefs cenv env m tyargs // result of a try/finally can be a byref - limitedCheck() - CheckExpr cenv env e1 context // result of a try/finally can be a byref if in a position where the overall expression is can be a byref + CheckTypeInstPermitAllByrefs cenv env m tyargs // result of a try/finally can be a byref + ctorLimitedZoneCheck() + let limit = CheckExpr cenv env e1 context // result of a try/finally can be a byref if in a position where the overall expression is can be a byref CheckExprNoByrefs cenv env e2 + limit | TOp.For(_),_,[Expr.Lambda(_,_,_,[_],e1,_,_);Expr.Lambda(_,_,_,[_],e2,_,_);Expr.Lambda(_,_,_,[_],e3,_,_)] -> CheckTypeInstNoByrefs cenv env m tyargs - CheckExprsNoByrefs cenv env [e1;e2;e3] + CheckExprsNoByRefLike cenv env [e1;e2;e3] | TOp.TryCatch _,[_],[Expr.Lambda(_,_,_,[_],e1,_,_); Expr.Lambda(_,_,_,[_],_e2,_,_); Expr.Lambda(_,_,_,[_],e3,_,_)] -> - CheckTypeInstPermitByrefs cenv env m tyargs // result of a try/catch can be a byref - limitedCheck() - CheckExpr cenv env e1 context // result of a try/catch can be a byref if in a position where the overall expression is can be a byref + CheckTypeInstPermitAllByrefs cenv env m tyargs // result of a try/catch can be a byref + ctorLimitedZoneCheck() + let limit1 = CheckExpr cenv env e1 context // result of a try/catch can be a byref if in a position where the overall expression is can be a byref // [(* e2; -- don't check filter body - duplicates logic in 'catch' body *) e3] - CheckExpr cenv env e3 context // result of a try/catch can be a byref if in a position where the overall expression is can be a byref + let limit2 = CheckExpr cenv env e3 context // result of a try/catch can be a byref if in a position where the overall expression is can be a byref + CombineTwoLimits limit1 limit2 - | TOp.ILCall (_,_,_,_,_,_,_,_,enclTypeArgs,methTypeArgs,tys),_,_ -> + | TOp.ILCall (_,_,_,_,_,_,_,methRef,enclTypeArgs,methTypeArgs,tys),_,_ -> CheckTypeInstNoByrefs cenv env m tyargs CheckTypeInstNoByrefs cenv env m enclTypeArgs CheckTypeInstNoByrefs cenv env m methTypeArgs - CheckTypeInstPermitByrefs cenv env m tys // permit byref returns + CheckTypeInstPermitAllByrefs cenv env m tys // permit byref returns + + let hasReceiver = + (methRef.CallingConv.IsInstance || methRef.CallingConv.IsInstanceExplicit) && + not args.IsEmpty - // if return is a byref, and being used as a return, then all arguments must be usable as byref returns - match context,tys with - | PermitByref true, [ty] when isByrefTy cenv.g ty -> CheckExprsPermitByrefReturns cenv env args - | _ -> CheckExprsPermitByrefs cenv env args + let returnTy = tyOfExpr g expr + let argContexts = List.init args.Length (fun _ -> PermitByRefExpr.Yes) + + match tys with + | [ty] when context.PermitOnlyReturnable && isByrefLikeTy g m ty -> + if hasReceiver then + CheckCallWithReceiver cenv env m returnTy args argContexts context + else + CheckCall cenv env m returnTy args argContexts context + | _ -> + if hasReceiver then + CheckCallWithReceiver cenv env m returnTy args argContexts PermitByRefExpr.Yes + else + CheckCall cenv env m returnTy args argContexts PermitByRefExpr.Yes | TOp.Tuple tupInfo,_,_ when not (evalTupInfoIsStruct tupInfo) -> match context with - | TupleOfArgsPermitByrefs nArity -> + | PermitByRefExpr.YesTupleOfArgs nArity -> if cenv.reportErrors then if args.Length <> nArity then errorR(InternalError("Tuple arity does not correspond to planned function argument arity",m)) // This tuple should not be generated. The known function arity // means it just bundles arguments. - CheckExprsPermitByrefs cenv env args + CheckExprsPermitByRefLike cenv env args | _ -> CheckTypeInstNoByrefs cenv env m tyargs - CheckExprsNoByrefs cenv env args + CheckExprsNoByRefLike cenv env args + + | TOp.LValueOp(LAddrOf _,vref),_,_ -> + let limit1 = GetLimitValByRef cenv env m vref.Deref + let limit2 = CheckExprsNoByRefLike cenv env args + let limit = CombineTwoLimits limit1 limit2 - | TOp.LValueOp(LGetAddr,v),_,_ -> if cenv.reportErrors then - if noByrefs context && cenv.reportErrors then - errorR(Error(FSComp.SR.chkNoAddressOfAtThisPoint(v.DisplayName), m)) - elif (// The context is a byref return.... - match context with PermitByref isReturn -> isReturn | _ -> false) && - // The value is a local.... - v.ValReprInfo.IsNone && - // The value is not an argument... - not (env.argVals.ContainsVal(v.Deref)) then - errorR(Error(FSComp.SR.chkNoByrefReturnOfLocal(v.DisplayName), m)) - - // Address-of operator generates byref, and context permits this. - CheckExprsNoByrefs cenv env args + + if context.Disallow then + errorR(Error(FSComp.SR.chkNoAddressOfAtThisPoint(vref.DisplayName), m)) + + let returningAddrOfLocal = + context.PermitOnlyReturnable && + HasLimitFlag LimitFlags.ByRef limit && + IsLimitEscapingScope env context limit + + if returningAddrOfLocal then + if vref.IsCompilerGenerated then + errorR(Error(FSComp.SR.chkNoByrefAddressOfValueFromExpression(), m)) + else + errorR(Error(FSComp.SR.chkNoByrefAddressOfLocal(vref.DisplayName), m)) + + limit + + | TOp.LValueOp(LByrefSet,vref),_,[arg] -> + let limit = GetLimitVal cenv env m vref.Deref + let isVrefLimited = not (HasLimitFlag LimitFlags.ByRefOfStackReferringSpanLike limit) + let isArgLimited = HasLimitFlag LimitFlags.StackReferringSpanLike (CheckExprPermitByRefLike cenv env arg) + if isVrefLimited && isArgLimited then + errorR(Error(FSComp.SR.chkNoWriteToLimitedSpan(vref.DisplayName), m)) + NoLimit + + | TOp.LValueOp(LByrefGet,vref),_,[] -> + let limit = GetLimitVal cenv env m vref.Deref + if HasLimitFlag LimitFlags.ByRefOfStackReferringSpanLike limit then + + if cenv.reportErrors && context.PermitOnlyReturnable then + if vref.IsCompilerGenerated then + errorR(Error(FSComp.SR.chkNoSpanLikeValueFromExpression(), m)) + else + errorR(Error(FSComp.SR.chkNoSpanLikeVariable(vref.DisplayName), m)) + + { scope = 1; flags = LimitFlags.StackReferringSpanLike } + elif HasLimitFlag LimitFlags.ByRefOfSpanLike limit then + { scope = 1; flags = LimitFlags.SpanLike } + else + { scope = 1; flags = LimitFlags.None } + + | TOp.LValueOp(LSet _, vref),_,[arg] -> + let isVrefLimited = not (HasLimitFlag LimitFlags.StackReferringSpanLike (GetLimitVal cenv env m vref.Deref)) + let isArgLimited = HasLimitFlag LimitFlags.StackReferringSpanLike (CheckExprPermitByRefLike cenv env arg) + if isVrefLimited && isArgLimited then + errorR(Error(FSComp.SR.chkNoWriteToLimitedSpan(vref.DisplayName), m)) + NoLimit | TOp.TupleFieldGet _,_,[arg1] -> CheckTypeInstNoByrefs cenv env m tyargs - CheckExprsPermitByrefs cenv env [arg1] (* Compiled pattern matches on immutable value structs come through here. *) + CheckExprsPermitByRefLike cenv env [arg1] (* Compiled pattern matches on immutable value structs come through here. *) | TOp.ValFieldGet _rf,_,[arg1] -> CheckTypeInstNoByrefs cenv env m tyargs //See mkRecdFieldGetViaExprAddr -- byref arg1 when #args =1 // Property getters on mutable structs come through here. - CheckExprsPermitByrefs cenv env [arg1] + CheckExprsPermitByRefLike cenv env [arg1] - | TOp.ValFieldSet _rf,_,[arg1;arg2] -> + | TOp.ValFieldSet rf,_,[arg1;arg2] -> CheckTypeInstNoByrefs cenv env m tyargs // See mkRecdFieldSetViaExprAddr -- byref arg1 when #args=2 // Field setters on mutable structs come through here - CheckExprsPermitByrefs cenv env [arg1] - CheckExprsNoByrefs cenv env [arg2] - - | TOp.Coerce,[_ty1;_ty2],[x] -> - // Subsumption coercions of functions may involve byrefs in other argument positions - CheckTypeInstPermitByrefs cenv env m tyargs - CheckExpr cenv env x context + let limit1 = CheckExprPermitByRefLike cenv env arg1 + let limit2 = CheckExprPermitByRefLike cenv env arg2 + + let isLhsLimited = not (HasLimitFlag LimitFlags.ByRefOfStackReferringSpanLike limit1) + let isRhsLimited = HasLimitFlag LimitFlags.StackReferringSpanLike limit2 + if isLhsLimited && isRhsLimited then + errorR(Error(FSComp.SR.chkNoWriteToLimitedSpan(rf.FieldName), m)) + NoLimit + + | TOp.Coerce,[tgty;srcty],[x] -> + if TypeRelations.TypeDefinitelySubsumesTypeNoCoercion 0 g cenv.amap m tgty srcty then + CheckExpr cenv env x context + else + CheckTypeInstNoByrefs cenv env m tyargs + CheckExprNoByrefs cenv env x + NoLimit | TOp.Reraise,[_ty1],[] -> - CheckTypeInstNoByrefs cenv env m tyargs + CheckTypeInstNoByrefs cenv env m tyargs + NoLimit - | TOp.ValFieldGetAddr rfref,tyargs,[] -> - if noByrefs context && cenv.reportErrors && isByrefLikeTy cenv.g (tyOfExpr cenv.g expr) then + // Check get of static field + | TOp.ValFieldGetAddr (rfref, _readonly),tyargs,[] -> + + if context.Disallow && cenv.reportErrors && isByrefLikeTy g m (tyOfExpr g expr) then errorR(Error(FSComp.SR.chkNoAddressStaticFieldAtThisPoint(rfref.FieldName), m)) + CheckTypeInstNoByrefs cenv env m tyargs - // NOTE: there are no arg exprs to check in this case + NoLimit + + // Check get of instance field + | TOp.ValFieldGetAddr (rfref, _readonly),tyargs,[obj] -> - | TOp.ValFieldGetAddr rfref,tyargs,[rx] -> - if noByrefs context && cenv.reportErrors && isByrefLikeTy cenv.g (tyOfExpr cenv.g expr) then + if context.Disallow && cenv.reportErrors && isByrefLikeTy g m (tyOfExpr g expr) then errorR(Error(FSComp.SR.chkNoAddressFieldAtThisPoint(rfref.FieldName), m)) + + // C# applies a rule where the APIs to struct types can't return the addresses of fields in that struct. + // There seems no particular reason for this given that other protections in the language, though allowing + // it would mean "readonly" on a struct doesn't imply immutabality-of-contents - it only implies + if context.PermitOnlyReturnable && (match obj with Expr.Val(vref, _, _) -> vref.BaseOrThisInfo = MemberThisVal | _ -> false) && isByrefTy g (tyOfExpr g obj) then + errorR(Error(FSComp.SR.chkStructsMayNotReturnAddressesOfContents(), m)) + + if context.Disallow && cenv.reportErrors && isByrefLikeTy g m (tyOfExpr g expr) then + errorR(Error(FSComp.SR.chkNoAddressFieldAtThisPoint(rfref.FieldName), m)) + // This construct is used for &(rx.rfield) and &(rx->rfield). Relax to permit byref types for rx. [See Bug 1263]. CheckTypeInstNoByrefs cenv env m tyargs - CheckExprPermitByref cenv env rx + + // Recursively check in same context, e.g. if at PermitOnlyReturnable the obj arg must also be returnable + CheckExpr cenv env obj context | TOp.UnionCaseFieldGet _,_,[arg1] -> CheckTypeInstNoByrefs cenv env m tyargs - CheckExprPermitByref cenv env arg1 + CheckExprPermitByRefLike cenv env arg1 | TOp.UnionCaseTagGet _,_,[arg1] -> CheckTypeInstNoByrefs cenv env m tyargs - CheckExprPermitByref cenv env arg1 // allow byref - it may be address-of-struct + CheckExprPermitByRefLike cenv env arg1 // allow byref - it may be address-of-struct + + | TOp.UnionCaseFieldGetAddr (uref, _idx, _readonly),tyargs,[obj] -> - | TOp.UnionCaseFieldGetAddr (uref, _idx),tyargs,[rx] -> - if noByrefs context && cenv.reportErrors && isByrefLikeTy cenv.g (tyOfExpr cenv.g expr) then + if context.Disallow && cenv.reportErrors && isByrefLikeTy g m (tyOfExpr g expr) then errorR(Error(FSComp.SR.chkNoAddressFieldAtThisPoint(uref.CaseName), m)) + + if context.PermitOnlyReturnable && (match obj with Expr.Val(vref, _, _) -> vref.BaseOrThisInfo = MemberThisVal | _ -> false) && isByrefTy g (tyOfExpr g obj) then + errorR(Error(FSComp.SR.chkStructsMayNotReturnAddressesOfContents(), m)) + CheckTypeInstNoByrefs cenv env m tyargs - // allow rx to be byref here, for struct unions - CheckExprPermitByref cenv env rx + + // Recursively check in same context, e.g. if at PermitOnlyReturnable the obj arg must also be returnable + CheckExpr cenv env obj context | TOp.ILAsm (instrs,tys),_,_ -> - CheckTypeInstPermitByrefs cenv env m tys + CheckTypeInstPermitAllByrefs cenv env m tys CheckTypeInstNoByrefs cenv env m tyargs match instrs,args with - | [ I_stfld (_alignment,_vol,_fspec) ],[lhs;rhs] -> + // Write a .NET instance field + | [ I_stfld (_alignment,_vol,_fspec) ],_ -> // permit byref for lhs lvalue - CheckExprPermitByref cenv env lhs - CheckExprNoByrefs cenv env rhs - | [ I_ldfld (_alignment,_vol,_fspec) ],[lhs] -> + // permit byref for rhs lvalue (field would have to have ByRefLike type, i.e. be a field in another ByRefLike type) + CheckExprsPermitByRefLike cenv env args + + // Read a .NET instance field + | [ I_ldfld (_alignment,_vol,_fspec) ],_ -> // permit byref for lhs lvalue - CheckExprPermitByref cenv env lhs - | [ I_ldfld (_alignment,_vol,_fspec); AI_nop ],[lhs] -> + CheckExprsPermitByRefLike cenv env args + + // Read a .NET instance field + | [ I_ldfld (_alignment,_vol,_fspec); AI_nop ],_ -> // permit byref for lhs lvalue of readonly value - CheckExprPermitByref cenv env lhs - | [ I_ldflda (fspec) | I_ldsflda (fspec) ],[lhs] -> - if noByrefs context && cenv.reportErrors && isByrefLikeTy cenv.g (tyOfExpr cenv.g expr) then + CheckExprsPermitByRefLike cenv env args + + | [ I_ldsflda (fspec) ], [] -> + if context.Disallow && cenv.reportErrors && isByrefLikeTy g m (tyOfExpr g expr) then + errorR(Error(FSComp.SR.chkNoAddressFieldAtThisPoint(fspec.Name), m)) + + NoLimit + + | [ I_ldflda (fspec) ], [obj] -> + if context.Disallow && cenv.reportErrors && isByrefLikeTy g m (tyOfExpr g expr) then errorR(Error(FSComp.SR.chkNoAddressFieldAtThisPoint(fspec.Name), m)) - // permit byref for lhs lvalue - CheckExprPermitByref cenv env lhs + + // Recursively check in same context, e.g. if at PermitOnlyReturnable the obj arg must also be returnable + CheckExpr cenv env obj context + | [ I_ldelema (_,isNativePtr,_,_) ],lhsArray::indices -> - if noByrefs context && cenv.reportErrors && not isNativePtr && isByrefLikeTy cenv.g (tyOfExpr cenv.g expr) then + if context.Disallow && cenv.reportErrors && not isNativePtr && isByrefLikeTy g m (tyOfExpr g expr) then errorR(Error(FSComp.SR.chkNoAddressOfArrayElementAtThisPoint(), m)) // permit byref for lhs lvalue - CheckExprPermitByref cenv env lhsArray - CheckExprsNoByrefs cenv env indices + let limit = CheckExprPermitByRefLike cenv env lhsArray + CheckExprsNoByRefLike cenv env indices |> ignore + limit + | [ AI_conv _ ],_ -> // permit byref for args to conv - CheckExprsPermitByrefs cenv env args + CheckExprsPermitByRefLike cenv env args + | _ -> - CheckExprsNoByrefs cenv env args + CheckExprsNoByRefLike cenv env args | TOp.TraitCall _,_,_ -> CheckTypeInstNoByrefs cenv env m tyargs // allow args to be byref here - CheckExprsPermitByrefs cenv env args - - | ( TOp.Tuple _ - | TOp.UnionCase _ - | TOp.ExnConstr _ - | TOp.Array - | TOp.Bytes _ - | TOp.UInt16s _ - | TOp.Recd _ - | TOp.ValFieldSet _ - | TOp.UnionCaseTagGet _ - | TOp.UnionCaseProof _ - | TOp.UnionCaseFieldGet _ - | TOp.UnionCaseFieldSet _ - | TOp.ExnFieldGet _ - | TOp.ExnFieldSet _ - | TOp.TupleFieldGet _ - | TOp.RefAddrGet - | _ (* catch all! *) - ),_,_ -> + CheckExprsPermitByRefLike cenv env args + + | TOp.Recd(_, _), _, _ -> + CheckTypeInstNoByrefs cenv env m tyargs + CheckExprsPermitByRefLike cenv env args + + | _ -> CheckTypeInstNoByrefs cenv env m tyargs - CheckExprsNoByrefs cenv env args + CheckExprsNoByRefLike cenv env args -and CheckLambdas isTop (memInfo: ValMemberInfo option) cenv env inlined topValInfo alwaysCheckNoReraise e m ety = +and CheckLambdas isTop (memInfo: ValMemberInfo option) cenv env inlined topValInfo alwaysCheckNoReraise e m ety context = + let g = cenv.g // The topValInfo here says we are _guaranteeing_ to compile a function value // as a .NET method with precisely the corresponding argument counts. match e with | Expr.TyChoose(tps,e1,m) -> - let env = BindTypars cenv.g env tps - CheckLambdas isTop memInfo cenv env inlined topValInfo alwaysCheckNoReraise e1 m ety + let env = BindTypars g env tps + CheckLambdas isTop memInfo cenv env inlined topValInfo alwaysCheckNoReraise e1 m ety context | Expr.Lambda (_,_,_,_,_,m,_) | Expr.TyLambda(_,_,_,m,_) -> - - let tps,ctorThisValOpt,baseValOpt,vsl,body,bodyty = destTopLambda cenv.g cenv.amap topValInfo (e, ety) in - let env = BindTypars cenv.g env tps + let tps,ctorThisValOpt,baseValOpt,vsl,body,bodyty = destTopLambda g cenv.amap topValInfo (e, ety) in + let env = BindTypars g env tps let thisAndBase = Option.toList ctorThisValOpt @ Option.toList baseValOpt let restArgs = List.concat vsl let syntacticArgs = thisAndBase @ restArgs - let env = SetArgVals env restArgs + let env = BindArgVals env restArgs match memInfo with | None -> () @@ -940,7 +1351,7 @@ and CheckLambdas isTop (memInfo: ValMemberInfo option) cenv env inlined topValIn | true, firstArg::_ -> firstArg.SetHasBeenReferenced() | _ -> () // any byRef arguments are considered used, as they may be 'out's - restArgs |> List.iter (fun arg -> if isByrefTy cenv.g arg.Type then arg.SetHasBeenReferenced()) + restArgs |> List.iter (fun arg -> if isByrefTy g arg.Type then arg.SetHasBeenReferenced()) syntacticArgs |> List.iter (CheckValSpec cenv env) syntacticArgs |> List.iter (BindVal cenv env) @@ -951,67 +1362,82 @@ and CheckLambdas isTop (memInfo: ValMemberInfo option) cenv env inlined topValIn | Some membInfo -> testHookMemberBody membInfo body // Check escapes in the body. Allow access to protected things within members. - let freesOpt = CheckEscapes cenv (Option.isSome memInfo) m syntacticArgs body + let freesOpt = CheckEscapes cenv memInfo.IsSome m syntacticArgs body // no reraise under lambda expression CheckNoReraise cenv freesOpt body // Check the body of the lambda - if (not (isNil tps) || not (isNil vsl)) && isTop && not cenv.g.compilingFslib && isByrefTy cenv.g bodyty then - // allow byref to occur as return position for byref-typed top level function or method - CheckExprPermitByrefReturn cenv env body + if isTop && not g.compilingFslib && isByrefLikeTy g m bodyty then + // allow byref to occur as return position for byref-typed top level function or method + CheckExprPermitReturnableByRef cenv env body |> ignore else CheckExprNoByrefs cenv env body // Check byref return types if cenv.reportErrors then - if (not inlined && (isNil tps && isNil vsl)) || not isTop then - CheckForByrefLikeType cenv env bodyty (fun () -> + if not isTop then + CheckForByrefLikeType cenv env m bodyty (fun () -> errorR(Error(FSComp.SR.chkFirstClassFuncNoByref(), m))) - elif not cenv.g.compilingFslib && isByrefTy cenv.g bodyty then + elif not g.compilingFslib && isByrefTy g bodyty then // check no byrefs-in-the-byref - CheckForByrefLikeType cenv env (destByrefTy cenv.g bodyty) (fun () -> + CheckForByrefType cenv env (destByrefTy g bodyty) (fun () -> errorR(Error(FSComp.SR.chkReturnTypeNoByref(), m))) for tp in tps do - if tp.Constraints |> List.sumBy (function TyparConstraint.CoercesTo(ty,_) when isClassTy cenv.g ty -> 1 | _ -> 0) > 1 then + if tp.Constraints |> List.sumBy (function TyparConstraint.CoercesTo(ty,_) when isClassTy g ty -> 1 | _ -> 0) > 1 then errorR(Error(FSComp.SR.chkTyparMultipleClassConstraints(), m)) + + NoLimit // This path is for expression bindings that are not actually lambdas | _ -> // Permit byrefs for let x = ... - CheckTypePermitByrefs cenv env m ety - if not inlined && (isByrefLikeTy cenv.g ety || isNativePtrTy cenv.g ety) then - // allow byref to occur as RHS of byref binding. - CheckExprPermitByref cenv env e - else - CheckExprNoByrefs cenv env e + CheckTypePermitAllByrefs cenv env m ety + let limit = + if not inlined && (isByrefLikeTy g m ety || isNativePtrTy g ety) then + // allow byref to occur as RHS of byref binding. + CheckExpr cenv env e context + else + CheckExprNoByrefs cenv env e + NoLimit + if alwaysCheckNoReraise then CheckNoReraise cenv None e + limit -and CheckExprs cenv env exprs contexts = +and CheckExprs cenv env exprs contexts : Limit = let contexts = Array.ofList contexts - let argArity i = if i < contexts.Length then contexts.[i] else NoByrefs - exprs |> List.iteri (fun i exp -> CheckExpr cenv env exp (argArity i)) + let argArity i = if i < contexts.Length then contexts.[i] else PermitByRefExpr.No + exprs + |> List.mapi (fun i exp -> CheckExpr cenv env exp (argArity i)) + |> CombineLimits -and CheckExprsNoByrefs cenv env exprs = +and CheckExprsNoByRefLike cenv env exprs : Limit = exprs |> List.iter (CheckExprNoByrefs cenv env) + NoLimit -and CheckExprsPermitByrefs cenv env exprs = - exprs |> List.iter (CheckExprPermitByref cenv env) +and CheckExprsPermitByRefLike cenv env exprs = + exprs + |> List.map (CheckExprPermitByRefLike cenv env) + |> CombineLimits -and CheckExprsPermitByrefReturns cenv env exprs = - exprs |> List.iter (CheckExprPermitByrefReturn cenv env) +and CheckExprsPermitReturnableByRef cenv env exprs : Limit = + exprs + |> List.map (CheckExprPermitReturnableByRef cenv env) + |> CombineLimits -and CheckExprPermitByref cenv env expr = - CheckExpr cenv env expr (PermitByref false) +and CheckExprPermitByRefLike cenv env expr : Limit = + CheckExpr cenv env expr PermitByRefExpr.Yes -and CheckExprPermitByrefReturn cenv env expr = - CheckExpr cenv env expr (PermitByref true) +and CheckExprPermitReturnableByRef cenv env expr : Limit = + CheckExpr cenv env expr PermitByRefExpr.YesReturnable and CheckDecisionTreeTargets cenv env targets context = - targets |> Array.iter (CheckDecisionTreeTarget cenv env context) + targets + |> Array.map (CheckDecisionTreeTarget cenv env context) + |> (CombineLimits << List.ofArray) and CheckDecisionTreeTarget cenv env context (TTarget(vs,e,_)) = BindVals cenv env vs @@ -1020,22 +1446,26 @@ and CheckDecisionTreeTarget cenv env context (TTarget(vs,e,_)) = and CheckDecisionTree cenv env x = match x with - | TDSuccess (es,_) -> CheckExprsNoByrefs cenv env es - | TDBind(bind,rest) -> CheckBinding cenv env false bind; CheckDecisionTree cenv env rest - | TDSwitch (e,cases,dflt,m) -> CheckDecisionTreeSwitch cenv env (e,cases,dflt,m) + | TDSuccess (es,_) -> + CheckExprsNoByRefLike cenv env es |> ignore + | TDBind(bind,rest) -> + CheckBinding cenv env false PermitByRefExpr.Yes bind |> ignore + CheckDecisionTree cenv env rest + | TDSwitch (e,cases,dflt,m) -> + CheckDecisionTreeSwitch cenv env (e,cases,dflt,m) and CheckDecisionTreeSwitch cenv env (e,cases,dflt,m) = - CheckExprPermitByref cenv env e // can be byref for struct union switch + CheckExprPermitByRefLike cenv env e |> ignore// can be byref for struct union switch cases |> List.iter (fun (TCase(discrim,e)) -> CheckDecisionTreeTest cenv env m discrim; CheckDecisionTree cenv env e) dflt |> Option.iter (CheckDecisionTree cenv env) and CheckDecisionTreeTest cenv env m discrim = match discrim with - | DecisionTreeTest.UnionCase (_,tinst) -> CheckTypeInstPermitByrefs cenv env m tinst - | DecisionTreeTest.ArrayLength (_,typ) -> CheckTypePermitByrefs cenv env m typ + | DecisionTreeTest.UnionCase (_,tinst) -> CheckTypeInstPermitAllByrefs cenv env m tinst + | DecisionTreeTest.ArrayLength (_,ty) -> CheckTypePermitAllByrefs cenv env m ty | DecisionTreeTest.Const _ -> () | DecisionTreeTest.IsNull -> () - | DecisionTreeTest.IsInst (srcTyp,dstTyp) -> CheckTypePermitByrefs cenv env m srcTyp; CheckTypePermitByrefs cenv env m dstTyp + | DecisionTreeTest.IsInst (srcTy,tgtTy) -> CheckTypePermitAllByrefs cenv env m srcTy; CheckTypePermitAllByrefs cenv env m tgtTy | DecisionTreeTest.ActivePatternCase (exp,_,_,_,_) -> CheckExprNoByrefs cenv env exp and CheckAttrib cenv env (Attrib(_,_,args,props,_,_,_)) = @@ -1049,6 +1479,7 @@ and CheckAttribExpr cenv env (AttribExpr(expr,vexpr)) = CheckAttribArgExpr cenv env vexpr and CheckAttribArgExpr cenv env expr = + let g = cenv.g match expr with // Detect standard constants @@ -1075,15 +1506,15 @@ and CheckAttribArgExpr cenv env expr = | Expr.Op(TOp.Array,[_elemTy],args,_m) -> List.iter (CheckAttribArgExpr cenv env) args - | TypeOfExpr cenv.g _ -> + | TypeOfExpr g _ -> () - | TypeDefOfExpr cenv.g _ -> + | TypeDefOfExpr g _ -> () | Expr.Op(TOp.Coerce,_,[arg],_) -> CheckAttribArgExpr cenv env arg - | EnumExpr cenv.g arg1 -> + | EnumExpr g arg1 -> CheckAttribArgExpr cenv env arg1 - | AttribBitwiseOrExpr cenv.g (arg1,arg2) -> + | AttribBitwiseOrExpr g (arg1,arg2) -> CheckAttribArgExpr cenv env arg1 CheckAttribArgExpr cenv env arg2 | _ -> @@ -1121,7 +1552,7 @@ and CheckArgInfo cenv env (argInfo : ArgReprInfo) = and CheckValSpec cenv env (v:Val) = v.Attribs |> CheckAttribs cenv env v.ValReprInfo |> Option.iter (CheckValInfo cenv env) - v.Type |> CheckTypePermitByrefs cenv env v.Range + v.Type |> CheckTypePermitAllByrefs cenv env v.Range and AdjustAccess isHidden (cpath: unit -> CompilationPath) access = if isHidden then @@ -1132,16 +1563,17 @@ and AdjustAccess isHidden (cpath: unit -> CompilationPath) access = else access -and CheckBinding cenv env alwaysCheckNoReraise (TBind(v,bindRhs,_) as bind) = +and CheckBinding cenv env alwaysCheckNoReraise context (TBind(v,bindRhs,_) as bind) : Limit = + let g = cenv.g let isTop = Option.isSome bind.Var.ValReprInfo //printfn "visiting %s..." v.DisplayName - let env = { env with external = env.external || cenv.g.attrib_DllImportAttribute |> Option.exists (fun attr -> HasFSharpAttribute cenv.g attr v.Attribs) } + let env = { env with external = env.external || g.attrib_DllImportAttribute |> Option.exists (fun attr -> HasFSharpAttribute g attr v.Attribs) } // Check that active patterns don't have free type variables in their result match TryGetActivePatternInfo (mkLocalValRef v) with | Some _apinfo when _apinfo.ActiveTags.Length > 1 -> - if doesActivePatternHaveFreeTypars cenv.g (mkLocalValRef v) then + if doesActivePatternHaveFreeTypars g (mkLocalValRef v) then errorR(Error(FSComp.SR.activePatternChoiceHasFreeTypars(v.LogicalName),v.Range)) | _ -> () @@ -1152,26 +1584,28 @@ and CheckBinding cenv env alwaysCheckNoReraise (TBind(v,bindRhs,_) as bind) = errorR(Error(FSComp.SR.chkMemberUsedInInvalidWay(nm, nm, stringOfRange m), v.Range)) // Byrefs allowed for x in 'let x = ...' - v.Type |> CheckTypePermitByrefs cenv env v.Range + v.Type |> CheckTypePermitAllByrefs cenv env v.Range v.Attribs |> CheckAttribs cenv env v.ValReprInfo |> Option.iter (CheckValInfo cenv env) // Check accessibility if (v.IsMemberOrModuleBinding || v.IsMember) && not v.IsIncrClassGeneratedMember then - let access = AdjustAccess (IsHiddenVal env.sigToImplRemapInfo v) (fun () -> v.TopValActualParent.CompilationPath) v.Accessibility + let access = AdjustAccess (IsHiddenVal env.sigToImplRemapInfo v) (fun () -> v.TopValDeclaringEntity.CompilationPath) v.Accessibility CheckTypeForAccess cenv env (fun () -> NicePrint.stringOfQualifiedValOrMember cenv.denv v) access v.Range v.Type - let env = if v.IsConstructor && not v.IsIncrClassConstructor then { env with limited=true } else env + let env = if v.IsConstructor && not v.IsIncrClassConstructor then { env with ctorLimitedZone=true } else env if cenv.reportErrors then // Check top-level let-bound values match bind.Var.ValReprInfo with | Some info when info.HasNoArgs -> - CheckForByrefLikeType cenv env v.Type (fun () -> errorR(Error(FSComp.SR.chkNoByrefAsTopValue(),v.Range))) + CheckForByrefLikeType cenv env v.Range v.Type (fun () -> errorR(Error(FSComp.SR.chkNoByrefAsTopValue(),v.Range))) | _ -> () - if Option.isSome v.PublicPath then + match v.PublicPath with + | None -> () + | _ -> if // Don't support implicit [] on generated members, except the implicit members // for 'let' bound functions in classes. @@ -1180,32 +1614,32 @@ and CheckBinding cenv env alwaysCheckNoReraise (TBind(v,bindRhs,_) as bind) = (// Check the attributes on any enclosing module env.reflect || // Check the attributes on the value - HasFSharpAttribute cenv.g cenv.g.attrib_ReflectedDefinitionAttribute v.Attribs || + HasFSharpAttribute g g.attrib_ReflectedDefinitionAttribute v.Attribs || // Also check the enclosing type for members - for historical reasons, in the TAST member values // are stored in the entity that encloses the type, hence we will not have noticed the ReflectedDefinition // on the enclosing type at this point. - HasFSharpAttribute cenv.g cenv.g.attrib_ReflectedDefinitionAttribute v.TopValActualParent.Attribs) then + HasFSharpAttribute g g.attrib_ReflectedDefinitionAttribute v.TopValDeclaringEntity.Attribs) then - if v.IsInstanceMember && v.MemberApparentParent.IsStructOrEnumTycon then + if v.IsInstanceMember && v.MemberApparentEntity.IsStructOrEnumTycon then errorR(Error(FSComp.SR.chkNoReflectedDefinitionOnStructMember(),v.Range)) cenv.usesQuotations <- true // If we've already recorded a definition then skip this match v.ReflectedDefinition with - | None -> v.val_defn <- Some bindRhs + | None -> v.SetValDefn bindRhs | Some _ -> () // Run the conversion process over the reflected definition to report any errors in the // front end rather than the back end. We currently re-run this during ilxgen.fs but there's // no real need for that except that it helps us to bundle all reflected definitions up into // one blob for pickling to the binary format try - let ety = tyOfExpr cenv.g bindRhs + let ety = tyOfExpr g bindRhs let tps,taue,_ = match bindRhs with - | Expr.TyLambda (_,tps,b,_,_) -> tps,b,applyForallTy cenv.g ety (List.map mkTyparTy tps) + | Expr.TyLambda (_,tps,b,_,_) -> tps,b,applyForallTy g ety (List.map mkTyparTy tps) | _ -> [],bindRhs,ety let env = QuotationTranslator.QuotationTranslationEnv.Empty.BindTypars tps - let qscope = QuotationTranslator.QuotationGenerationScope.Create (cenv.g,cenv.amap,cenv.viewCcu, QuotationTranslator.IsReflectedDefinition.Yes) + let qscope = QuotationTranslator.QuotationGenerationScope.Create (g,cenv.amap,cenv.viewCcu, QuotationTranslator.IsReflectedDefinition.Yes) QuotationTranslator.ConvExprPublic qscope env taue |> ignore let _,_,argExprs = qscope.Close() if not (isNil argExprs) then @@ -1220,8 +1654,8 @@ and CheckBinding cenv env alwaysCheckNoReraise (TBind(v,bindRhs,_) as bind) = match memberInfo.MemberFlags.MemberKind with | (MemberKind.PropertySet | MemberKind.PropertyGet) -> // These routines raise errors for ill-formed properties - v |> ReturnTypeOfPropertyVal cenv.g |> ignore - v |> ArgInfosOfPropertyVal cenv.g |> ignore + v |> ReturnTypeOfPropertyVal g |> ignore + v |> ArgInfosOfPropertyVal g |> ignore | _ -> () @@ -1229,13 +1663,15 @@ and CheckBinding cenv env alwaysCheckNoReraise (TBind(v,bindRhs,_) as bind) = let topValInfo = match bind.Var.ValReprInfo with Some info -> info | _ -> ValReprInfo.emptyValData - CheckLambdas isTop v.MemberInfo cenv env v.MustInline topValInfo alwaysCheckNoReraise bindRhs v.Range v.Type + CheckLambdas isTop v.MemberInfo cenv env v.MustInline topValInfo alwaysCheckNoReraise bindRhs v.Range v.Type context -and CheckBindings cenv env xs = List.iter (CheckBinding cenv env false) xs +and CheckBindings cenv env xs = + xs |> List.iter (CheckBinding cenv env false PermitByRefExpr.Yes >> ignore) // Top binds introduce expression, check they are reraise free. let CheckModuleBinding cenv env (TBind(v,e,_) as bind) = - let isExplicitEntryPoint = HasFSharpAttribute cenv.g cenv.g.attrib_EntryPointAttribute v.Attribs + let g = cenv.g + let isExplicitEntryPoint = HasFSharpAttribute g g.attrib_EntryPointAttribute v.Attribs if isExplicitEntryPoint then cenv.entryPointGiven <- true let isLastCompiland = fst cenv.isLastCompiland @@ -1246,13 +1682,14 @@ let CheckModuleBinding cenv env (TBind(v,e,_) as bind) = if // Mutable values always have fields not v.IsMutable && // Literals always have fields - not (HasFSharpAttribute cenv.g cenv.g.attrib_LiteralAttribute v.Attribs) && - not (HasFSharpAttributeOpt cenv.g cenv.g.attrib_ThreadStaticAttribute v.Attribs) && - not (HasFSharpAttributeOpt cenv.g cenv.g.attrib_ContextStaticAttribute v.Attribs) && + not (HasFSharpAttribute g g.attrib_LiteralAttribute v.Attribs) && + not (HasFSharpAttributeOpt g g.attrib_ThreadStaticAttribute v.Attribs) && + not (HasFSharpAttributeOpt g g.attrib_ContextStaticAttribute v.Attribs) && // Having a field makes the binding a static initialization trigger - IsSimpleSyntacticConstantExpr cenv.g e && + IsSimpleSyntacticConstantExpr g e && // Check the thing is actually compiled as a property - IsCompiledAsStaticProperty cenv.g v + IsCompiledAsStaticProperty g v || + (g.compilingFslib && v.Attribs |> List.exists(fun (Attrib(tc,_,_,_,_,_,_)) -> tc.CompiledName = "ValueAsStaticPropertyAttribute")) then v.SetIsCompiledAsStaticPropertyWithoutField() @@ -1263,15 +1700,15 @@ let CheckModuleBinding cenv env (TBind(v,e,_) as bind) = // Skip compiler generated values if v.IsCompilerGenerated then () else // Skip explicit implementations of interface methods - if ValIsExplicitImpl cenv.g v then () else + if ValIsExplicitImpl g v then () else - match v.ActualParent with + match v.DeclaringEntity with | ParentNone -> () // this case can happen after error recovery from earlier error | Parent _ -> - let tcref = v.TopValActualParent + let tcref = v.TopValDeclaringEntity let hasDefaultAugmentation = tcref.IsUnionTycon && - match TryFindFSharpAttribute cenv.g cenv.g.attrib_DefaultAugmentationAttribute tcref.Attribs with + match TryFindFSharpAttribute g g.attrib_DefaultAugmentationAttribute tcref.Attribs with | Some(Attrib(_,_,[ AttribBoolArg(b) ],_,_,_,_)) -> b | _ -> true (* not hiddenRepr *) @@ -1311,14 +1748,14 @@ let CheckModuleBinding cenv env (TBind(v,e,_) as bind) = // Default augmentation contains the nasty 'Case' etc. let prefix = "New" - if nm.StartsWith prefix then + if nm.StartsWithOrdinal(prefix) then match tcref.GetUnionCaseByName(nm.[prefix.Length ..]) with | Some(uc) -> error(NameClash(nm,kind,v.DisplayName,v.Range, FSComp.SR.chkUnionCaseCompiledForm(),uc.DisplayName,uc.Range)) | None -> () // Default augmentation contains the nasty 'Is' etc. let prefix = "Is" - if nm.StartsWith prefix && hasDefaultAugmentation then + if nm.StartsWithOrdinal(prefix) && hasDefaultAugmentation then match tcref.GetUnionCaseByName(nm.[prefix.Length ..]) with | Some(uc) -> error(NameClash(nm,kind,v.DisplayName,v.Range, FSComp.SR.chkUnionCaseDefaultAugmentation(),uc.DisplayName,uc.Range)) | None -> () @@ -1335,10 +1772,10 @@ let CheckModuleBinding cenv env (TBind(v,e,_) as bind) = if v.IsExtensionMember then tcref.ModuleOrNamespaceType.AllValsAndMembersByLogicalNameUncached.[v.LogicalName] |> List.iter (fun v2 -> if v2.IsExtensionMember && not (valEq v v2) && v.CompiledName = v2.CompiledName then - let minfo1 = FSMeth(cenv.g, generalizedTyconRef tcref, mkLocalValRef v, Some 0UL) - let minfo2 = FSMeth(cenv.g, generalizedTyconRef tcref, mkLocalValRef v2, Some 0UL) - if tyconRefEq cenv.g v.MemberApparentParent v2.MemberApparentParent && - MethInfosEquivByNameAndSig EraseAll true cenv.g cenv.amap v.Range minfo1 minfo2 then + let minfo1 = FSMeth(g, generalizedTyconRef tcref, mkLocalValRef v, Some 0UL) + let minfo2 = FSMeth(g, generalizedTyconRef tcref, mkLocalValRef v2, Some 0UL) + if tyconRefEq g v.MemberApparentEntity v2.MemberApparentEntity && + MethInfosEquivByNameAndSig EraseAll true g cenv.amap v.Range minfo1 minfo2 then errorR(Duplicate(kind,v.DisplayName,v.Range))) @@ -1346,10 +1783,10 @@ let CheckModuleBinding cenv env (TBind(v,e,_) as bind) = // Properties get 'get_X', only if there are no args // Properties get 'get_X' match v.ValReprInfo with - | Some arity when arity.NumCurriedArgs = 0 && arity.NumTypars = 0 -> check false ("get_"^v.DisplayName) + | Some arity when arity.NumCurriedArgs = 0 && arity.NumTypars = 0 -> check false ("get_" + v.DisplayName) | _ -> () match v.ValReprInfo with - | Some arity when v.IsMutable && arity.NumCurriedArgs = 0 && arity.NumTypars = 0 -> check false ("set_"^v.DisplayName) + | Some arity when v.IsMutable && arity.NumCurriedArgs = 0 && arity.NumTypars = 0 -> check false ("set_" + v.DisplayName) | _ -> () match TryChopPropertyName v.DisplayName with | Some res -> check true res @@ -1357,44 +1794,64 @@ let CheckModuleBinding cenv env (TBind(v,e,_) as bind) = with e -> errorRecovery e v.Range end - CheckBinding cenv env true bind + CheckBinding cenv { env with returnScope = 1 } true PermitByRefExpr.Yes bind |> ignore -let CheckModuleBindings cenv env binds = List.iter (CheckModuleBinding cenv env) binds +let CheckModuleBindings cenv env binds = + binds |> List.iter (CheckModuleBinding cenv env) //-------------------------------------------------------------------------- // check tycons //-------------------------------------------------------------------------- let CheckRecdField isUnion cenv env (tycon:Tycon) (rfield:RecdField) = + let g = cenv.g + let tcref = mkLocalTyconRef tycon + let m = rfield.Range + let fieldTy = stripTyEqns cenv.g rfield.FormalType let isHidden = IsHiddenTycon env.sigToImplRemapInfo tycon || IsHiddenTyconRepr env.sigToImplRemapInfo tycon || - (not isUnion && IsHiddenRecdField env.sigToImplRemapInfo ((mkLocalTyconRef tycon).MakeNestedRecdFieldRef rfield)) + (not isUnion && IsHiddenRecdField env.sigToImplRemapInfo (tcref.MakeNestedRecdFieldRef rfield)) let access = AdjustAccess isHidden (fun () -> tycon.CompilationPath) rfield.Accessibility - CheckTypeForAccess cenv env (fun () -> rfield.Name) access rfield.Range rfield.FormalType - CheckTypeNoByrefs cenv env rfield.Range rfield.FormalType + CheckTypeForAccess cenv env (fun () -> rfield.Name) access m fieldTy + + if TyconRefHasAttribute g m g.attrib_IsByRefLikeAttribute tcref then + // Permit Span fields in IsByRefLike types + CheckTypePermitSpanLike cenv env m fieldTy + if cenv.reportErrors then + CheckForByrefType cenv env fieldTy (fun () -> errorR(Error(FSComp.SR.chkCantStoreByrefValue(), tycon.Range))) + else + CheckTypeNoByrefs cenv env m fieldTy + if cenv.reportErrors then + CheckForByrefLikeType cenv env m fieldTy (fun () -> errorR(Error(FSComp.SR.chkCantStoreByrefValue(), tycon.Range))) + CheckAttribs cenv env rfield.PropertyAttribs CheckAttribs cenv env rfield.FieldAttribs - if cenv.reportErrors then - CheckForByrefLikeType cenv env rfield.FormalType (fun () -> errorR(Error(FSComp.SR.chkCantStoreByrefValue(), tycon.Range))) let CheckEntityDefn cenv env (tycon:Entity) = #if !NO_EXTENSIONTYPING if not tycon.IsProvidedGeneratedTycon then #endif - let env = { env with reflect = env.reflect || HasFSharpAttribute cenv.g cenv.g.attrib_ReflectedDefinitionAttribute tycon.Attribs } + let g = cenv.g let m = tycon.Range - let env = BindTypars cenv.g env (tycon.Typars(m)) + let tcref = mkLocalTyconRef tycon + let ty = generalizedTyconRef tcref + + let env = { env with reflect = env.reflect || HasFSharpAttribute g g.attrib_ReflectedDefinitionAttribute tycon.Attribs } + let env = BindTypars g env (tycon.Typars(m)) + CheckAttribs cenv env tycon.Attribs + match tycon.TypeAbbrev with | Some abbrev -> WarnOnWrongTypeForAccess cenv env (fun () -> tycon.CompiledName) tycon.Accessibility tycon.Range abbrev | _ -> () if cenv.reportErrors then + if not tycon.IsTypeAbbrev then - let typ = generalizedTyconRef (mkLocalTyconRef tycon) + let allVirtualMethsInParent = - match GetSuperTypeOfType cenv.g cenv.amap m typ with + match GetSuperTypeOfType g cenv.amap m ty with | Some super -> GetIntrinsicMethInfosOfType cenv.infoReader (None,AccessibleFromSomewhere,AllowMultiIntfInstantiations.Yes) IgnoreOverrides m super |> List.filter (fun minfo -> minfo.IsVirtual) @@ -1404,17 +1861,19 @@ let CheckEntityDefn cenv env (tycon:Entity) = let methodUniquenessIncludesReturnType (minfo:MethInfo) = List.contains minfo.LogicalName namesOfMethodsThatMayDifferOnlyInReturnType let MethInfosEquivWrtUniqueness eraseFlag m minfo minfo2 = if methodUniquenessIncludesReturnType minfo - then MethInfosEquivByNameAndSig eraseFlag true cenv.g cenv.amap m minfo minfo2 - else MethInfosEquivByNameAndPartialSig eraseFlag true cenv.g cenv.amap m minfo minfo2 (* partial ignores return type *) + then MethInfosEquivByNameAndSig eraseFlag true g cenv.amap m minfo minfo2 + else MethInfosEquivByNameAndPartialSig eraseFlag true g cenv.amap m minfo minfo2 (* partial ignores return type *) let immediateMeths = - [ for v in tycon.AllGeneratedValues do yield FSMeth (cenv.g,typ,v,None) - yield! GetImmediateIntrinsicMethInfosOfType (None,AccessibleFromSomewhere) cenv.g cenv.amap m typ ] + [ for v in tycon.AllGeneratedValues do yield FSMeth (g,ty,v,None) + yield! GetImmediateIntrinsicMethInfosOfType (None,AccessibleFromSomewhere) g cenv.amap m ty ] - let immediateProps = GetImmediateIntrinsicPropInfosOfType (None,AccessibleFromSomewhere) cenv.g cenv.amap m typ + let immediateProps = GetImmediateIntrinsicPropInfosOfType (None,AccessibleFromSomewhere) g cenv.amap m ty - let getHash (hash:Dictionary) nm = - if hash.ContainsKey(nm) then hash.[nm] else [] + let getHash (hash:Dictionary) nm = + match hash.TryGetValue(nm) with + | true, h -> h + | _ -> [] // precompute methods grouped by MethInfo.LogicalName let hashOfImmediateMeths = @@ -1453,45 +1912,46 @@ let CheckEntityDefn cenv env (tycon:Entity) = if others |> List.exists (checkForDup EraseAll) then if others |> List.exists (checkForDup EraseNone) then - errorR(Error(FSComp.SR.chkDuplicateMethod(nm, NicePrint.minimalStringOfType cenv.denv typ),m)) + errorR(Error(FSComp.SR.chkDuplicateMethod(nm, NicePrint.minimalStringOfType cenv.denv ty),m)) else - errorR(Error(FSComp.SR.chkDuplicateMethodWithSuffix(nm, NicePrint.minimalStringOfType cenv.denv typ),m)) + errorR(Error(FSComp.SR.chkDuplicateMethodWithSuffix(nm, NicePrint.minimalStringOfType cenv.denv ty),m)) let numCurriedArgSets = minfo.NumArgs.Length if numCurriedArgSets > 1 && others |> List.exists (fun minfo2 -> not (IsAbstractDefaultPair2 minfo minfo2)) then - errorR(Error(FSComp.SR.chkDuplicateMethodCurried(nm, NicePrint.minimalStringOfType cenv.denv typ),m)) + errorR(Error(FSComp.SR.chkDuplicateMethodCurried(nm, NicePrint.minimalStringOfType cenv.denv ty),m)) if numCurriedArgSets > 1 && (minfo.GetParamDatas(cenv.amap, m, minfo.FormalMethodInst) - |> List.existsSquared (fun (ParamData(isParamArrayArg, isOutArg, optArgInfo, callerInfoInfo, _, reflArgInfo, ty)) -> - isParamArrayArg || isOutArg || reflArgInfo.AutoQuote || optArgInfo.IsOptional || callerInfoInfo <> NoCallerInfo || isByrefTy cenv.g ty)) then + |> List.existsSquared (fun (ParamData(isParamArrayArg, _isInArg, isOutArg, optArgInfo, callerInfo, _, reflArgInfo, ty)) -> + isParamArrayArg || isOutArg || reflArgInfo.AutoQuote || optArgInfo.IsOptional || callerInfo <> NoCallerInfo || isByrefLikeTy g m ty)) then errorR(Error(FSComp.SR.chkCurriedMethodsCantHaveOutParams(), m)) if numCurriedArgSets = 1 then minfo.GetParamDatas(cenv.amap, m, minfo.FormalMethodInst) - |> List.iterSquared (fun (ParamData(_, _, optArgInfo, callerInfoInfo, _, _, ty)) -> - match (optArgInfo, callerInfoInfo) with + |> List.iterSquared (fun (ParamData(_, isInArg, _, optArgInfo, callerInfo, _, _, ty)) -> + ignore isInArg + match (optArgInfo, callerInfo) with | _, NoCallerInfo -> () - | NotOptional, _ -> errorR(Error(FSComp.SR.tcCallerInfoNotOptional(callerInfoInfo.ToString()),m)) + | NotOptional, _ -> errorR(Error(FSComp.SR.tcCallerInfoNotOptional(callerInfo.ToString()),m)) | CallerSide(_), CallerLineNumber -> - if not (typeEquiv cenv.g cenv.g.int32_ty ty) then - errorR(Error(FSComp.SR.tcCallerInfoWrongType(callerInfoInfo.ToString(), "int", NicePrint.minimalStringOfType cenv.denv ty),m)) + if not (typeEquiv g g.int32_ty ty) then + errorR(Error(FSComp.SR.tcCallerInfoWrongType(callerInfo.ToString(), "int", NicePrint.minimalStringOfType cenv.denv ty),m)) | CalleeSide, CallerLineNumber -> - if not ((isOptionTy cenv.g ty) && (typeEquiv cenv.g cenv.g.int32_ty (destOptionTy cenv.g ty))) then - errorR(Error(FSComp.SR.tcCallerInfoWrongType(callerInfoInfo.ToString(), "int", NicePrint.minimalStringOfType cenv.denv (destOptionTy cenv.g ty)),m)) + if not ((isOptionTy g ty) && (typeEquiv g g.int32_ty (destOptionTy g ty))) then + errorR(Error(FSComp.SR.tcCallerInfoWrongType(callerInfo.ToString(), "int", NicePrint.minimalStringOfType cenv.denv (destOptionTy g ty)),m)) | CallerSide(_), CallerFilePath -> - if not (typeEquiv cenv.g cenv.g.string_ty ty) then - errorR(Error(FSComp.SR.tcCallerInfoWrongType(callerInfoInfo.ToString(), "string", NicePrint.minimalStringOfType cenv.denv ty),m)) + if not (typeEquiv g g.string_ty ty) then + errorR(Error(FSComp.SR.tcCallerInfoWrongType(callerInfo.ToString(), "string", NicePrint.minimalStringOfType cenv.denv ty),m)) | CalleeSide, CallerFilePath -> - if not ((isOptionTy cenv.g ty) && (typeEquiv cenv.g cenv.g.string_ty (destOptionTy cenv.g ty))) then - errorR(Error(FSComp.SR.tcCallerInfoWrongType(callerInfoInfo.ToString(), "string", NicePrint.minimalStringOfType cenv.denv (destOptionTy cenv.g ty)),m)) + if not ((isOptionTy g ty) && (typeEquiv g g.string_ty (destOptionTy g ty))) then + errorR(Error(FSComp.SR.tcCallerInfoWrongType(callerInfo.ToString(), "string", NicePrint.minimalStringOfType cenv.denv (destOptionTy g ty)),m)) | CallerSide(_), CallerMemberName -> - if not (typeEquiv cenv.g cenv.g.string_ty ty) then - errorR(Error(FSComp.SR.tcCallerInfoWrongType(callerInfoInfo.ToString(), "string", NicePrint.minimalStringOfType cenv.denv ty),m)) + if not (typeEquiv g g.string_ty ty) then + errorR(Error(FSComp.SR.tcCallerInfoWrongType(callerInfo.ToString(), "string", NicePrint.minimalStringOfType cenv.denv ty),m)) | CalleeSide, CallerMemberName -> - if not ((isOptionTy cenv.g ty) && (typeEquiv cenv.g cenv.g.string_ty (destOptionTy cenv.g ty))) then - errorR(Error(FSComp.SR.tcCallerInfoWrongType(callerInfoInfo.ToString(), "string", NicePrint.minimalStringOfType cenv.denv (destOptionTy cenv.g ty)),m))) + if not ((isOptionTy g ty) && (typeEquiv g g.string_ty (destOptionTy g ty))) then + errorR(Error(FSComp.SR.tcCallerInfoWrongType(callerInfo.ToString(), "string", NicePrint.minimalStringOfType cenv.denv (destOptionTy g ty)),m))) for pinfo in immediateProps do let nm = pinfo.PropertyName @@ -1501,12 +1961,12 @@ let CheckEntityDefn cenv env (tycon:Entity) = | Some vref -> vref.DefinitionRange if hashOfImmediateMeths.ContainsKey nm then - errorR(Error(FSComp.SR.chkPropertySameNameMethod(nm, NicePrint.minimalStringOfType cenv.denv typ),m)) + errorR(Error(FSComp.SR.chkPropertySameNameMethod(nm, NicePrint.minimalStringOfType cenv.denv ty),m)) let others = getHash hashOfImmediateProps nm if pinfo.HasGetter && pinfo.HasSetter && pinfo.GetterMethod.IsVirtual <> pinfo.SetterMethod.IsVirtual then - errorR(Error(FSComp.SR.chkGetterSetterDoNotMatchAbstract(nm, NicePrint.minimalStringOfType cenv.denv typ),m)) + errorR(Error(FSComp.SR.chkGetterSetterDoNotMatchAbstract(nm, NicePrint.minimalStringOfType cenv.denv ty),m)) let checkForDup erasureFlag pinfo2 = // abstract/default pairs of duplicate properties are OK @@ -1514,13 +1974,13 @@ let CheckEntityDefn cenv env (tycon:Entity) = x.IsDispatchSlot && y.IsDefiniteFSharpOverride not (IsAbstractDefaultPair pinfo pinfo2 || IsAbstractDefaultPair pinfo2 pinfo) - && PropInfosEquivByNameAndPartialSig erasureFlag cenv.g cenv.amap m pinfo pinfo2 (* partial ignores return type *) + && PropInfosEquivByNameAndPartialSig erasureFlag g cenv.amap m pinfo pinfo2 (* partial ignores return type *) if others |> List.exists (checkForDup EraseAll) then if others |> List.exists (checkForDup EraseNone) then - errorR(Error(FSComp.SR.chkDuplicateProperty(nm, NicePrint.minimalStringOfType cenv.denv typ) ,m)) + errorR(Error(FSComp.SR.chkDuplicateProperty(nm, NicePrint.minimalStringOfType cenv.denv ty) ,m)) else - errorR(Error(FSComp.SR.chkDuplicatePropertyWithSuffix(nm, NicePrint.minimalStringOfType cenv.denv typ) ,m)) + errorR(Error(FSComp.SR.chkDuplicatePropertyWithSuffix(nm, NicePrint.minimalStringOfType cenv.denv ty) ,m)) // Check to see if one is an indexer and one is not if ( (pinfo.HasGetter && @@ -1532,7 +1992,7 @@ let CheckEntityDefn cenv env (tycon:Entity) = (let nargs = pinfo.GetParamTypes(cenv.amap,m).Length others |> List.exists (fun pinfo2 -> (isNil(pinfo2.GetParamTypes(cenv.amap,m))) <> (nargs = 0)))) then - errorR(Error(FSComp.SR.chkPropertySameNameIndexer(nm, NicePrint.minimalStringOfType cenv.denv typ),m)) + errorR(Error(FSComp.SR.chkPropertySameNameIndexer(nm, NicePrint.minimalStringOfType cenv.denv ty),m)) // Check to see if the signatures of the both getter and the setter imply the same property type @@ -1544,7 +2004,7 @@ let CheckEntityDefn cenv env (tycon:Entity) = hashOfImmediateProps.[nm] <- pinfo::others - if not (isInterfaceTy cenv.g typ) then + if not (isInterfaceTy g ty) then let hashOfAllVirtualMethsInParent = new Dictionary() for minfo in allVirtualMethsInParent do let nm = minfo.LogicalName @@ -1555,7 +2015,7 @@ let CheckEntityDefn cenv env (tycon:Entity) = let nm = minfo.LogicalName let m = (match minfo.ArbitraryValRef with None -> m | Some vref -> vref.DefinitionRange) let parentMethsOfSameName = getHash hashOfAllVirtualMethsInParent nm - let checkForDup erasureFlag (minfo2:MethInfo) = minfo2.IsDispatchSlot && MethInfosEquivByNameAndSig erasureFlag true cenv.g cenv.amap m minfo minfo2 + let checkForDup erasureFlag (minfo2:MethInfo) = minfo2.IsDispatchSlot && MethInfosEquivByNameAndSig erasureFlag true g cenv.amap m minfo minfo2 match parentMethsOfSameName |> List.tryFind (checkForDup EraseAll) with | None -> () | Some minfo -> @@ -1570,7 +2030,7 @@ let CheckEntityDefn cenv env (tycon:Entity) = let nm = minfo.LogicalName let m = (match minfo.ArbitraryValRef with None -> m | Some vref -> vref.DefinitionRange) let parentMethsOfSameName = getHash hashOfAllVirtualMethsInParent nm - let checkForDup erasureFlag minfo2 = MethInfosEquivByNameAndSig erasureFlag true cenv.g cenv.amap m minfo minfo2 + let checkForDup erasureFlag minfo2 = MethInfosEquivByNameAndSig erasureFlag true g cenv.amap m minfo minfo2 //if minfo.NumArgs.Length > 1 then // warning(Error(sprintf "Abstract methods taking curried arguments Duplicate method. The method '%s' has curried arguments but has the same name as another method in this type. Methods with curried arguments may not be overloaded" nm,(match minfo.ArbitraryValRef with None -> m | Some vref -> vref.DefinitionRange))) if parentMethsOfSameName |> List.exists (checkForDup EraseAll) then @@ -1578,17 +2038,34 @@ let CheckEntityDefn cenv env (tycon:Entity) = errorR(Error(FSComp.SR.chkDuplicateMethodInheritedType(nm),m)) else errorR(Error(FSComp.SR.chkDuplicateMethodInheritedTypeWithSuffix(nm),m)) + + if TyconRefHasAttribute g m g.attrib_IsByRefLikeAttribute tcref && not tycon.IsStructOrEnumTycon then + errorR(Error(FSComp.SR.tcByRefLikeNotStruct(), tycon.Range)) + + if TyconRefHasAttribute g m g.attrib_IsReadOnlyAttribute tcref && not tycon.IsStructOrEnumTycon then + errorR(Error(FSComp.SR.tcIsReadOnlyNotStruct(), tycon.Range)) + // Considers TFSharpObjectRepr, TRecdRepr and TUnionRepr. // [Review] are all cases covered: TILObjectRepr,TAsmRepr. [Yes - these are FSharp.Core.dll only] tycon.AllFieldsArray |> Array.iter (CheckRecdField false cenv env tycon) // Abstract slots can have byref arguments and returns - abstractSlotValsOfTycons [tycon] |> List.iter (typeOfVal >> CheckTypePermitByrefs cenv env m) + for vref in abstractSlotValsOfTycons [tycon] do + match vref.ValReprInfo with + | Some topValInfo -> + let tps, argtysl, rty, _ = GetTopValTypeInFSharpForm g topValInfo vref.Type m + let env = BindTypars g env tps + for argtys in argtysl do + for (argty, _) in argtys do + CheckTypePermitAllByrefs cenv env m argty + CheckTypePermitAllByrefs cenv env m rty + + | None -> () - // Interface slots can have byref arguments and returns - tycon.ImmediateInterfaceTypesOfFSharpTycon |> List.iter (CheckTypePermitByrefs cenv env m) + // Supported interface may not have byrefs + tycon.ImmediateInterfaceTypesOfFSharpTycon |> List.iter (CheckTypeNoByrefs cenv env m) - superOfTycon cenv.g tycon |> CheckTypeNoByrefs cenv env m + superOfTycon g tycon |> CheckTypeNoByrefs cenv env m if tycon.IsUnionTycon then tycon.UnionCasesAsList |> List.iter (fun uc -> @@ -1597,12 +2074,14 @@ let CheckEntityDefn cenv env (tycon:Entity) = // Access checks let access = AdjustAccess (IsHiddenTycon env.sigToImplRemapInfo tycon) (fun () -> tycon.CompilationPath) tycon.Accessibility - let visitType ty = CheckTypeForAccess cenv env (fun () -> tycon.DisplayNameWithStaticParametersAndUnderscoreTypars) access tycon.Range ty - abstractSlotValsOfTycons [tycon] |> List.iter (typeOfVal >> visitType) - superOfTycon cenv.g tycon |> visitType + let visitTye ty = CheckTypeForAccess cenv env (fun () -> tycon.DisplayNameWithStaticParametersAndUnderscoreTypars) access tycon.Range ty + + abstractSlotValsOfTycons [tycon] |> List.iter (typeOfVal >> visitTye) + + superOfTycon g tycon |> visitTye // We do not have to check access of interface implementations. See FSharp 1.0 5042 - //implements_of_tycon cenv.g tycon |> List.iter visitType + //implements_of_tycon g tycon |> List.iter visitTye if tycon.IsFSharpDelegateTycon then match tycon.TypeReprInfo with | TFSharpObjectRepr r -> @@ -1610,26 +2089,28 @@ let CheckEntityDefn cenv env (tycon:Entity) = | TTyconDelegate ss -> //ss.ClassTypars //ss.MethodTypars - ss.FormalReturnType |> Option.iter visitType - ss.FormalParams |> List.iterSquared (fun (TSlotParam(_,ty,_,_,_,_)) -> visitType ty) + ss.FormalReturnType |> Option.iter visitTye + ss.FormalParams |> List.iterSquared (fun (TSlotParam(_,ty,_,_,_,_)) -> visitTye ty) | _ -> () | _ -> () let interfaces = - AllSuperTypesOfType cenv.g cenv.amap tycon.Range AllowMultiIntfInstantiations.Yes (generalizedTyconRef (mkLocalTyconRef tycon)) - |> List.filter (isInterfaceTy cenv.g) + AllSuperTypesOfType g cenv.amap tycon.Range AllowMultiIntfInstantiations.Yes ty + |> List.filter (isInterfaceTy g) if tycon.IsFSharpInterfaceTycon then - List.iter visitType interfaces // Check inherited interface is as accessible + List.iter visitTye interfaces // Check inherited interface is as accessible + + if not (isRecdOrStructTyconRefAssumedImmutable g tcref) && isRecdOrStructTyconRefReadOnly g m tcref then + errorR(Error(FSComp.SR.readOnlyAttributeOnStructWithMutableField(),m)) if cenv.reportErrors then if not tycon.IsTypeAbbrev then - let typ = generalizedTyconRef (mkLocalTyconRef tycon) - let immediateInterfaces = GetImmediateInterfacesOfType SkipUnrefInterfaces.Yes cenv.g cenv.amap m typ + let immediateInterfaces = GetImmediateInterfacesOfType SkipUnrefInterfaces.Yes g cenv.amap m ty let interfaces = [ for ty in immediateInterfaces do - yield! AllSuperTypesOfType cenv.g cenv.amap m AllowMultiIntfInstantiations.Yes ty ] + yield! AllSuperTypesOfType g cenv.amap m AllowMultiIntfInstantiations.Yes ty ] CheckMultipleInterfaceInstantiations cenv interfaces m // Check struct fields. We check these late because we have to have first checked that the structs are @@ -1637,17 +2118,18 @@ let CheckEntityDefn cenv env (tycon:Entity) = if tycon.IsStructOrEnumTycon then for f in tycon.AllInstanceFieldsAsList do // Check if it's marked unsafe - let zeroInitUnsafe = TryFindFSharpBoolAttribute cenv.g cenv.g.attrib_DefaultValueAttribute f.FieldAttribs + let zeroInitUnsafe = TryFindFSharpBoolAttribute g g.attrib_DefaultValueAttribute f.FieldAttribs if zeroInitUnsafe = Some(true) then - let ty' = generalizedTyconRef (mkLocalTyconRef tycon) - if not (TypeHasDefaultValue cenv.g m ty') then + if not (TypeHasDefaultValue g m ty) then errorR(Error(FSComp.SR.chkValueWithDefaultValueMustHaveDefaultValue(), m)) // Check type abbreviations match tycon.TypeAbbrev with | None -> () - | Some typ -> - CheckForByrefLikeType cenv env typ (fun () -> errorR(Error(FSComp.SR.chkNoByrefInTypeAbbrev(), tycon.Range))) + | Some ty -> + // Library-defined outref<'T> and inref<'T> contain byrefs on the r.h.s. + if not g.compilingFslib then + CheckForByrefType cenv env ty (fun () -> errorR(Error(FSComp.SR.chkNoByrefInTypeAbbrev(), tycon.Range))) let CheckEntityDefns cenv env tycons = tycons |> List.iter (CheckEntityDefn cenv env) @@ -1658,7 +2140,7 @@ let CheckEntityDefns cenv env tycons = let rec CheckModuleExpr cenv env x = match x with - | ModuleOrNamespaceExprWithSig(mty,def,_) -> + | ModuleOrNamespaceExprWithSig(mty, def, _) -> let (rpi,mhi) = ComputeRemappingFromImplementationToSignature cenv.g def mty let env = { env with sigToImplRemapInfo = (mkRepackageRemapping rpi,mhi) :: env.sigToImplRemapInfo } CheckDefnInModule cenv env def @@ -1698,11 +2180,12 @@ and CheckModuleSpec cenv env x = let env = { env with reflect = env.reflect || HasFSharpAttribute cenv.g cenv.g.attrib_ReflectedDefinitionAttribute mspec.Attribs } CheckDefnInModule cenv env rhs -let CheckTopImpl (g,amap,reportErrors,infoReader,internalsVisibleToPaths,viewCcu,denv ,mexpr,extraAttribs,(isLastCompiland:bool*bool)) = +let CheckTopImpl (g,amap,reportErrors,infoReader,internalsVisibleToPaths,viewCcu,denv ,mexpr,extraAttribs,(isLastCompiland:bool*bool),isInternalTestSpanStackReferring) = let cenv = { g =g reportErrors=reportErrors boundVals= new Dictionary<_,_>(100, HashIdentity.Structural) + limitVals= new Dictionary<_,_>(100, HashIdentity.Structural) potentialUnboundUsesOfVals=Map.empty usesQuotations=false infoReader=infoReader @@ -1710,32 +2193,34 @@ let CheckTopImpl (g,amap,reportErrors,infoReader,internalsVisibleToPaths,viewCcu amap=amap denv=denv viewCcu= viewCcu - isLastCompiland=isLastCompiland + isLastCompiland=isLastCompiland + isInternalTestSpanStackReferring = isInternalTestSpanStackReferring entryPointGiven=false} // Certain type equality checks go faster if these TyconRefs are pre-resolved. // This is because pre-resolving allows tycon equality to be determined by pointer equality on the entities. // See primEntityRefEq. - cenv.g.system_Void_tcref.TryDeref |> ignore - cenv.g.byref_tcr.TryDeref |> ignore + g.system_Void_tcref.TryDeref |> ignore + g.byref_tcr.TryDeref |> ignore let resolve = function Some(t : TyconRef) -> ignore(t.TryDeref) | _ -> () - resolve cenv.g.system_TypedReference_tcref - resolve cenv.g.system_ArgIterator_tcref - resolve cenv.g.system_RuntimeArgumentHandle_tcref + resolve g.system_TypedReference_tcref + resolve g.system_ArgIterator_tcref + resolve g.system_RuntimeArgumentHandle_tcref let env = { sigToImplRemapInfo=[] quote=false - limited=false + ctorLimitedZone=false boundTyparNames=[] argVals = ValMap.Empty boundTypars= TyparMap.Empty reflect=false - external=false } + external=false + returnScope = 0 } CheckModuleExpr cenv env mexpr CheckAttribs cenv env extraAttribs - if cenv.usesQuotations && QuotationTranslator.QuotationGenerationScope.ComputeQuotationFormat(cenv.g) = QuotationTranslator.QuotationSerializationFormat.FSharp_20_Plus then + if cenv.usesQuotations && QuotationTranslator.QuotationGenerationScope.ComputeQuotationFormat(g) = QuotationTranslator.QuotationSerializationFormat.FSharp_20_Plus then viewCcu.UsesFSharp20PlusQuotations <- true cenv.entryPointGiven diff --git a/src/fsharp/PostInferenceChecks.fsi b/src/fsharp/PostInferenceChecks.fsi index 6784c072b8c..970c1431551 100644 --- a/src/fsharp/PostInferenceChecks.fsi +++ b/src/fsharp/PostInferenceChecks.fsi @@ -4,9 +4,11 @@ /// is complete. module internal Microsoft.FSharp.Compiler.PostTypeCheckSemanticChecks -open Microsoft.FSharp.Compiler -open Microsoft.FSharp.Compiler.TcGlobals +open Microsoft.FSharp.Compiler.Import open Microsoft.FSharp.Compiler.InfoReader +open Microsoft.FSharp.Compiler.Tast +open Microsoft.FSharp.Compiler.Tastops +open Microsoft.FSharp.Compiler.TcGlobals val testFlagMemberBody : bool ref -val CheckTopImpl : TcGlobals * Import.ImportMap * bool * InfoReader * Tast.CompilationPath list * Tast.CcuThunk * Tastops.DisplayEnv * Tast.ModuleOrNamespaceExprWithSig * Tast.Attribs * (bool * bool) -> bool +val CheckTopImpl : TcGlobals * ImportMap * bool * InfoReader * CompilationPath list * CcuThunk * DisplayEnv * ModuleOrNamespaceExprWithSig * Attribs * (bool * bool) * isInternalTestSpanStackReferring: bool -> bool diff --git a/src/fsharp/PrettyNaming.fs b/src/fsharp/PrettyNaming.fs index 1ab013976cb..923be2ccea3 100755 --- a/src/fsharp/PrettyNaming.fs +++ b/src/fsharp/PrettyNaming.fs @@ -5,11 +5,7 @@ //-------------------------------------------------------------------------- /// Anything to do with special names of identifiers and other lexical rules -#if COMPILER_PUBLIC_API module public Microsoft.FSharp.Compiler.PrettyNaming -#else -module internal Microsoft.FSharp.Compiler.PrettyNaming -#endif open System open System.Collections.Generic open System.Collections.Concurrent @@ -140,13 +136,15 @@ module internal Microsoft.FSharp.Compiler.PrettyNaming /// Returns `true` if given string is an operator display name, e.g. ( |>> ) let IsOperatorName (name: string) = - let name = if name.StartsWith "( " && name.EndsWith " )" then name.[2..name.Length - 3] else name + let name = + if name.StartsWithOrdinal("( ") && name.EndsWithOrdinal(" )") then + name.[2 .. name.Length - 3] + else name // there is single operator containing a space - range operator with step: `.. ..` - let res = name = ".. .." || name |> Seq.forall (fun c -> opCharSet.Contains c && c <> ' ') - res + name = ".. .." || name |> Seq.forall (fun c -> c <> ' ' && opCharSet.Contains c) let IsMangledOpName (n:string) = - n.StartsWith (opNamePrefix, StringComparison.Ordinal) + n.StartsWithOrdinal(opNamePrefix) /// Compiles a custom operator into a mangled operator name. /// For example, "!%" becomes "op_DereferencePercent". @@ -431,7 +429,7 @@ module internal Microsoft.FSharp.Compiler.PrettyNaming // This function recognises these "infix operator" names. let s = DecompileOpName s let skipIgnoredChars = s.TrimStart(ignoredChars) - let afterSkipStartsWith prefix = skipIgnoredChars.StartsWith(prefix,StringComparison.Ordinal) + let afterSkipStartsWith prefix = skipIgnoredChars.StartsWithOrdinal(prefix) let afterSkipStarts prefixes = Array.exists afterSkipStartsWith prefixes // The following conditions follow the declExpr infix clauses. // The test corresponds to the lexer definition for the token. @@ -472,7 +470,7 @@ module internal Microsoft.FSharp.Compiler.PrettyNaming if IsCompilerGeneratedName nm then nm else nm+compilerGeneratedMarker let GetBasicNameOfPossibleCompilerGeneratedName (name:string) = - match name.IndexOf compilerGeneratedMarker with + match name.IndexOf(compilerGeneratedMarker, StringComparison.Ordinal) with | -1 | 0 -> name | n -> name.[0..n-1] @@ -486,30 +484,36 @@ module internal Microsoft.FSharp.Compiler.PrettyNaming let [] private mangledGenericTypeNameSym = '`' - let IsMangledGenericName (n:string) = - n.IndexOf mangledGenericTypeNameSym <> -1 && + let TryDemangleGenericNameAndPos (n:string) = (* check what comes after the symbol is a number *) - let m = n.LastIndexOf mangledGenericTypeNameSym - let mutable res = m < n.Length - 1 - for i = m + 1 to n.Length - 1 do - res <- res && n.[i] >= '0' && n.[i] <= '9' - res + let pos = n.LastIndexOf mangledGenericTypeNameSym + if pos = -1 then ValueNone else + let mutable res = pos < n.Length - 1 + let mutable i = pos + 1 + while res && i < n.Length do + let char = n.[i] + if not (char >= '0' && char <= '9') then + res <- false + i <- i + 1 + if res then + ValueSome pos + else + ValueNone type NameArityPair = NameArityPair of string * int - let DecodeGenericTypeName n = - if IsMangledGenericName n then - let pos = n.LastIndexOf mangledGenericTypeNameSym - let res = n.Substring(0,pos) - let num = n.Substring(pos+1,n.Length - pos - 1) - NameArityPair(res, int32 num) - else NameArityPair(n,0) + let DecodeGenericTypeName pos (mangledName:string) = + let res = mangledName.Substring(0,pos) + let num = mangledName.Substring(pos+1,mangledName.Length - pos - 1) + NameArityPair(res, int32 num) + + let DemangleGenericTypeNameWithPos pos (mangledName:string) = + mangledName.Substring(0,pos) - let DemangleGenericTypeName n = - if IsMangledGenericName n then - let pos = n.LastIndexOf mangledGenericTypeNameSym - n.Substring(0,pos) - else n + let DemangleGenericTypeName (mangledName:string) = + match TryDemangleGenericNameAndPos mangledName with + | ValueSome pos -> DemangleGenericTypeNameWithPos pos mangledName + | _ -> mangledName let private chopStringTo (s:string) (c:char) = match s.IndexOf c with @@ -522,13 +526,13 @@ module internal Microsoft.FSharp.Compiler.PrettyNaming let TryChopPropertyName (s: string) = // extract the logical name from any mangled name produced by MakeMemberDataAndMangledNameForMemberVal if s.Length <= 4 then None else - if s.StartsWith("get_", StringComparison.Ordinal) || - s.StartsWith("set_", StringComparison.Ordinal) + if s.StartsWithOrdinal("get_") || + s.StartsWithOrdinal("set_") then Some (s.Substring(4, s.Length - 4)) else let s = chopStringTo s '.' - if s.StartsWith("get_", StringComparison.Ordinal) || - s.StartsWith("set_", StringComparison.Ordinal) + if s.StartsWithOrdinal("get_") || + s.StartsWithOrdinal("set_") then Some (s.Substring(4, s.Length - 4)) else None @@ -541,26 +545,36 @@ module internal Microsoft.FSharp.Compiler.PrettyNaming | Some res -> res let SplitNamesForILPath (s : string) : string list = - if s.StartsWith("``",StringComparison.Ordinal) && s.EndsWith("``",StringComparison.Ordinal) && s.Length > 4 then [s.Substring(2, s.Length-4)] // identifier is enclosed in `` .. ``, so it is only a single element (this is very approximate) + if s.StartsWithOrdinal("``") && s.EndsWithOrdinal("``") && s.Length > 4 then [s.Substring(2, s.Length-4)] // identifier is enclosed in `` .. ``, so it is only a single element (this is very approximate) else s.Split [| '.' ; '`' |] |> Array.toList // '.' chops members / namespaces / modules; '`' chops generic parameters for .NET types /// Return a string array delimited by the given separator. /// Note that a quoted string is not going to be mangled into pieces. + let inline private isNotQuotedQuotation (text: string) n = n > 0 && text.[n-1] <> '\\' let private splitAroundQuotation (text:string) (separator:char) = let length = text.Length - let isNotQuotedQuotation n = n > 0 && text.[n-1] <> '\\' - let rec split (i, cur, group, insideQuotation) = - if i>=length then List.rev (cur::group) else + let result = ResizeArray() + let mutable insideQuotation = false + let mutable start = 0 + for i = 0 to length - 1 do match text.[i], insideQuotation with // split when seeing a separator - | c, false when c = separator -> split (i+1, "", cur::group, false) + | c, false when c = separator -> + result.Add(text.Substring(start, i - start)) + insideQuotation <- false + start <- i + 1 + | _, _ when i = length - 1 -> + result.Add(text.Substring(start, i - start + 1)) // keep reading if a separator is inside quotation - | c, true when c = separator -> split (i+1, cur+(Char.ToString c), group, true) - // open or close quotation - | '\"', _ when isNotQuotedQuotation i -> split (i+1, cur+"\"", group, not insideQuotation) + | c, true when c = separator -> + insideQuotation <- true + // open or close quotation + | '\"', _ when isNotQuotedQuotation text i -> + insideQuotation <- not insideQuotation // keep reading - | c, _ -> split (i+1, cur+(Char.ToString c), group, insideQuotation) - split (0, "", [], false) |> Array.ofList + | _ -> () + + result.ToArray() /// Return a string array delimited by the given separator up to the maximum number. /// Note that a quoted string is not going to be mangled into pieces. @@ -686,3 +700,5 @@ module internal Microsoft.FSharp.Compiler.PrettyNaming | Some v when v = actualArgValue -> None | _ -> Some (defaultArgName, actualArgValue)) mangleProvidedTypeName (nm, nonDefaultArgs) + + let outArgCompilerGeneratedName = "outArg" \ No newline at end of file diff --git a/src/fsharp/QueueList.fs b/src/fsharp/QueueList.fs index 9d75e5f4ae2..be38afa9ac0 100644 --- a/src/fsharp/QueueList.fs +++ b/src/fsharp/QueueList.fs @@ -34,7 +34,11 @@ type internal QueueList<'T>(firstElementsIn:'T list, lastElementsRevIn: 'T list, /// This operation is O(1), unless a push happens, which is rare. member x.AppendOne(y) = QueueList(firstElements, y :: lastElementsRev, numLastElements+1) - member x.Append(ys:seq<_>) = QueueList(firstElements, (List.rev (Seq.toList ys) @ lastElementsRev), numLastElements+1) + member x.Append(ys:seq<_>) = + let newElements = Seq.toList ys + let newLength = List.length newElements + let lastElementsRevIn = List.rev newElements @ lastElementsRev + QueueList(firstElements, lastElementsRevIn, numLastElementsIn + newLength) /// This operation is O(n) anyway, so executing ToList() here is OK interface IEnumerable<'T> with diff --git a/src/fsharp/QuotationTranslator.fs b/src/fsharp/QuotationTranslator.fs index 0f599ff60fd..d37be61d8d8 100644 --- a/src/fsharp/QuotationTranslator.fs +++ b/src/fsharp/QuotationTranslator.fs @@ -4,9 +4,7 @@ module internal Microsoft.FSharp.Compiler.QuotationTranslator open Internal.Utilities open Microsoft.FSharp.Compiler -open Microsoft.FSharp.Compiler.AbstractIL open Microsoft.FSharp.Compiler.AbstractIL.IL -open Microsoft.FSharp.Compiler.AbstractIL.Internal open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library open Microsoft.FSharp.Compiler.AbstractIL.Diagnostics open Microsoft.FSharp.Compiler.Tast @@ -16,26 +14,23 @@ open Microsoft.FSharp.Compiler.Ast open Microsoft.FSharp.Compiler.PrettyNaming open Microsoft.FSharp.Compiler.ErrorLogger open Microsoft.FSharp.Compiler.TcGlobals -open Microsoft.FSharp.Compiler.TypeRelations open Microsoft.FSharp.Compiler.Range open System.Collections.Generic module QP = Microsoft.FSharp.Compiler.QuotationPickler - let verboseCReflect = condition "VERBOSE_CREFLECT" - [] type IsReflectedDefinition = -| Yes -| No + | Yes + | No [] type QuotationSerializationFormat = -/// Indicates that type references are emitted as integer indexes into a supplied table -| FSharp_40_Plus -| FSharp_20_Plus + /// Indicates that type references are emitted as integer indexes into a supplied table + | FSharp_40_Plus + | FSharp_20_Plus type QuotationGenerationScope = { g: TcGlobals @@ -71,16 +66,16 @@ type QuotationGenerationScope = static member ComputeQuotationFormat g = let deserializeExValRef = ValRefForIntrinsic g.deserialize_quoted_FSharp_40_plus_info - if deserializeExValRef.TryDeref.IsSome then + if ValueOption.isSome deserializeExValRef.TryDeref then QuotationSerializationFormat.FSharp_40_Plus else QuotationSerializationFormat.FSharp_20_Plus type QuotationTranslationEnv = - { //Map from Val to binding index + { /// Map from Val to binding index vs: ValMap nvs: int - //Map from typar stamps to binding index + /// Map from typar stamps to binding index tyvs: StampMap // Map for values bound by the // 'let v = isinst e in .... if nonnull v then ...v .... ' @@ -133,7 +128,7 @@ let (|ModuleValueOrMemberUse|_|) g expr = Some(vref,vFlags,f,fty,tyargs,actualArgs @ args) | Expr.App(f,_fty,[],actualArgs,_) -> loop f (actualArgs @ args) - | (Expr.Val(vref,vFlags,_m) as f) when (match vref.ActualParent with ParentNone -> false | _ -> true) -> + | (Expr.Val(vref,vFlags,_m) as f) when (match vref.DeclaringEntity with ParentNone -> false | _ -> true) -> let fty = tyOfExpr g f Some(vref,vFlags,f,fty,[],args) | _ -> @@ -166,7 +161,7 @@ let (|ObjectInitializationCheck|_|) g expr = [| TTarget([], Expr.App(Expr.Val(failInitRef, _, _), _, _, _, _), _); _ |], _, resultTy ) when IsCompilerGeneratedName name && - name.StartsWith "init" && + name.StartsWithOrdinal("init") && selfRef.BaseOrThisInfo = MemberThisVal && valRefEq g failInitRef (ValRefForIntrinsic g.fail_init_info) && isUnitTy g resultTy -> Some() @@ -258,15 +253,16 @@ and private ConvExprCore cenv (env : QuotationTranslationEnv) (expr: Expr) : QP. match takesInstanceArg,curriedArgs with | false,curriedArgs -> [],curriedArgs | true,(objArg::curriedArgs) -> [objArg],curriedArgs - | true,[] -> wfail(InternalError("warning: unexpected missing object argument when generating quotation for call to F# object member "^vref.LogicalName,m)) + | true,[] -> wfail(InternalError("warning: unexpected missing object argument when generating quotation for call to F# object member " + vref.LogicalName,m)) if verboseCReflect then dprintfn "vref.DisplayName = %A, #objArgs = %A, #curriedArgs = %A" vref.DisplayName objArgs.Length curriedArgs.Length // Check to see if there aren't enough arguments or if there is a tuple-arity mismatch // If so, adjust and try again - if curriedArgs.Length < curriedArgInfos.Length || - ((List.take curriedArgInfos.Length curriedArgs,curriedArgInfos) ||> List.exists2 (fun arg argInfo -> + let nCurriedArgInfos = curriedArgInfos.Length + if curriedArgs.Length < nCurriedArgInfos || + ((List.truncate nCurriedArgInfos curriedArgs,curriedArgInfos) ||> List.exists2 (fun arg argInfo -> (argInfo.Length > (tryDestRefTupleExpr arg).Length))) then if verboseCReflect then @@ -275,14 +271,14 @@ and private ConvExprCore cenv (env : QuotationTranslationEnv) (expr: Expr) : QP. // partially applied arguments to 'let' bindings let topValInfo = match vref.ValReprInfo with - | None -> error(InternalError("no arity information found for F# value "^vref.LogicalName,vref.Range)) + | None -> error(InternalError("no arity information found for F# value " + vref.LogicalName,vref.Range)) | Some a -> a let expr,exprty = AdjustValForExpectedArity cenv.g m vref vFlags topValInfo ConvExpr cenv env (MakeApplicationAndBetaReduce cenv.g (expr,exprty,[tyargs],curriedArgs,m)) else // Too many arguments? Chop - let (curriedArgs:Expr list ),laterArgs = List.chop curriedArgInfos.Length curriedArgs + let (curriedArgs:Expr list ),laterArgs = List.splitAt nCurriedArgInfos curriedArgs let callR = // We now have the right number of arguments, w.r.t. currying and tupling. @@ -304,7 +300,7 @@ and private ConvExprCore cenv (env : QuotationTranslationEnv) (expr: Expr) : QP. // We only count one argument block for these. let callArgs = (objArgs::untupledCurriedArgs) |> List.concat - let parentTyconR = ConvTyconRef cenv vref.TopValActualParent m + let parentTyconR = ConvTyconRef cenv vref.TopValDeclaringEntity m let isNewObj = isNewObj || valUseFlags || isSelfInit // The signature types are w.r.t. to the formal context let envinner = BindFormalTypars env tps @@ -397,7 +393,7 @@ and private ConvExprCore cenv (env : QuotationTranslationEnv) (expr: Expr) : QP. // initialization check | Expr.Sequential(ObjectInitializationCheck cenv.g, x1, NormalSeq, _, _) -> ConvExpr cenv env x1 | Expr.Sequential (x0,x1,NormalSeq,_,_) -> QP.mkSequential(ConvExpr cenv env x0, ConvExpr cenv env x1) - | Expr.Obj (_,typ,_,_,[TObjExprMethod(TSlotSig(_,ctyp, _,_,_,_),_,tps,[tmvs],e,_) as tmethod],_,m) when isDelegateTy cenv.g typ -> + | Expr.Obj (_,ty,_,_,[TObjExprMethod(TSlotSig(_,ctyp, _,_,_,_),_,tps,[tmvs],e,_) as tmethod],_,m) when isDelegateTy cenv.g ty -> let f = mkLambdas m tps tmvs (e,GetFSharpViewOfReturnType cenv.g (returnTyOfMethod cenv.g tmethod)) let fR = ConvExpr cenv env f let tyargR = ConvType cenv env m ctyp @@ -431,7 +427,7 @@ and private ConvExprCore cenv (env : QuotationTranslationEnv) (expr: Expr) : QP. | TOp.UnionCaseFieldGet (ucref,n),tyargs,[e] -> ConvUnionFieldGet cenv env m ucref n tyargs e - | TOp.ValFieldGetAddr(_rfref),_tyargs,_ -> + | TOp.ValFieldGetAddr(_rfref, _readonly),_tyargs,_ -> wfail(Error(FSComp.SR.crefQuotationsCantContainAddressOf(), m)) | TOp.UnionCaseFieldGetAddr _,_tyargs,_ -> @@ -456,7 +452,7 @@ and private ConvExprCore cenv (env : QuotationTranslationEnv) (expr: Expr) : QP. | TOp.ILAsm([ I_stfld(_,_,fspec) | I_stsfld (_,fspec) ],_),enclTypeArgs,args -> let tyargsR = ConvTypes cenv env m enclTypeArgs - let parentTyconR = ConvILTypeRefUnadjusted cenv m fspec.EnclosingTypeRef + let parentTyconR = ConvILTypeRefUnadjusted cenv m fspec.DeclaringTypeRef let argsR = ConvLValueArgs cenv env args QP.mkFieldSet( (parentTyconR, fspec.Name),tyargsR, argsR) @@ -523,7 +519,7 @@ and private ConvExprCore cenv (env : QuotationTranslationEnv) (expr: Expr) : QP. // rebuild reraise() and Convert mkReraiseLibCall cenv.g toTy m |> ConvExpr cenv env - | TOp.LValueOp(LGetAddr,vref),[],[] -> + | TOp.LValueOp(LAddrOf _,vref),[],[] -> QP.mkAddressOf(ConvValRef false cenv env m vref []) | TOp.LValueOp(LByrefSet,vref),[],[e] -> @@ -531,7 +527,7 @@ and private ConvExprCore cenv (env : QuotationTranslationEnv) (expr: Expr) : QP. | TOp.LValueOp(LSet,vref),[],[e] -> // Sets of module values become property sets - match vref.ActualParent with + match vref.DeclaringEntity with | Parent tcref when IsCompiledAsStaticProperty cenv.g vref.Deref -> let parentTyconR = ConvTyconRef cenv tcref m let propName = vref.CompiledName @@ -561,13 +557,13 @@ and private ConvExprCore cenv (env : QuotationTranslationEnv) (expr: Expr) : QP. | _ -> wfail(Error(FSComp.SR.crefQuotationsCantContainDescendingForLoops(), m)) | TOp.ILCall(_,_,_,isNewObj,valUseFlags,isProp,_,ilMethRef,enclTypeArgs,methTypeArgs,_tys),[],callArgs -> - let parentTyconR = ConvILTypeRefUnadjusted cenv m ilMethRef.EnclosingTypeRef + let parentTyconR = ConvILTypeRefUnadjusted cenv m ilMethRef.DeclaringTypeRef let isNewObj = isNewObj || (match valUseFlags with CtorValUsedAsSuperInit | CtorValUsedAsSelfInit -> true | _ -> false) let methArgTypesR = List.map (ConvILType cenv env m) ilMethRef.ArgTypes let methRetTypeR = ConvILType cenv env m ilMethRef.ReturnType let methName = ilMethRef.Name - let isPropGet = isProp && methName.StartsWith("get_",System.StringComparison.Ordinal) - let isPropSet = isProp && methName.StartsWith("set_",System.StringComparison.Ordinal) + let isPropGet = isProp && methName.StartsWithOrdinal("get_") + let isPropSet = isProp && methName.StartsWithOrdinal("set_") let tyargs = (enclTypeArgs@methTypeArgs) ConvObjectModelCall cenv env m (isPropGet,isPropSet,isNewObj,parentTyconR,methArgTypesR,methRetTypeR,methName,tyargs,methTypeArgs.Length,callArgs) @@ -591,7 +587,7 @@ and private ConvExprCore cenv (env : QuotationTranslationEnv) (expr: Expr) : QP. | TOp.UnionCaseTagGet _tycr,_tinst,[_cx] -> wfail(Error(FSComp.SR.crefQuotationsCantFetchUnionIndexes(), m)) | TOp.UnionCaseFieldSet (_c,_i),_tinst,[_cx;_x] -> wfail(Error(FSComp.SR.crefQuotationsCantSetUnionFields(), m)) | TOp.ExnFieldSet(_tcref,_i),[],[_ex;_x] -> wfail(Error(FSComp.SR.crefQuotationsCantSetExceptionFields(), m)) - | TOp.RefAddrGet,_,_ -> wfail(Error(FSComp.SR.crefQuotationsCantRequireByref(), m)) + | TOp.RefAddrGet _,_,_ -> wfail(Error(FSComp.SR.crefQuotationsCantRequireByref(), m)) | TOp.TraitCall (_ss),_,_ -> wfail(Error(FSComp.SR.crefQuotationsCantCallTraitMembers(), m)) | _ -> wfail(InternalError( "Unexpected expression shape",m)) @@ -601,7 +597,7 @@ and private ConvExprCore cenv (env : QuotationTranslationEnv) (expr: Expr) : QP. and ConvLdfld cenv env m (fspec: ILFieldSpec) enclTypeArgs args = let tyargsR = ConvTypes cenv env m enclTypeArgs - let parentTyconR = ConvILTypeRefUnadjusted cenv m fspec.EnclosingTypeRef + let parentTyconR = ConvILTypeRefUnadjusted cenv m fspec.DeclaringTypeRef let argsR = ConvLValueArgs cenv env args QP.mkFieldGet( (parentTyconR, fspec.Name),tyargsR, argsR) @@ -670,9 +666,9 @@ and ConvLValueExprCore cenv env expr = match expr with | Expr.Op(op,tyargs,args,m) -> match op, args, tyargs with - | TOp.LValueOp(LGetAddr,vref),_,_ -> ConvValRef false cenv env m vref [] - | TOp.ValFieldGetAddr(rfref),_,_ -> ConvClassOrRecdFieldGet cenv env m rfref tyargs args - | TOp.UnionCaseFieldGetAddr(ucref,n),[e],_ -> ConvUnionFieldGet cenv env m ucref n tyargs e + | TOp.LValueOp(LAddrOf _,vref),_,_ -> ConvValRef false cenv env m vref [] + | TOp.ValFieldGetAddr(rfref, _),_,_ -> ConvClassOrRecdFieldGet cenv env m rfref tyargs args + | TOp.UnionCaseFieldGetAddr(ucref,n, _),[e],_ -> ConvUnionFieldGet cenv env m ucref n tyargs e | TOp.ILAsm([ I_ldflda(fspec) ],_rtys),_,_ -> ConvLdfld cenv env m fspec tyargs args | TOp.ILAsm([ I_ldsflda(fspec) ],_rtys),_,_ -> ConvLdfld cenv env m fspec tyargs args | TOp.ILAsm(([ I_ldelema(_ro,_isNativePtr,shape,_tyarg) ] ),_), (arr::idxs), [elemty] -> @@ -719,7 +715,7 @@ and ConvModuleValueApp cenv env m (vref:ValRef) tyargs (args: Expr list list) = EmitDebugInfoIfNecessary cenv env m (ConvModuleValueAppCore cenv env m vref tyargs args) and ConvModuleValueAppCore cenv env m (vref:ValRef) tyargs (args: Expr list list) = - match vref.ActualParent with + match vref.DeclaringEntity with | ParentNone -> failwith "ConvModuleValueApp" | Parent(tcref) -> let isProperty = IsCompiledAsStaticProperty cenv.g vref.Deref @@ -750,7 +746,7 @@ and private ConvValRefCore holeOk cenv env m (vref:ValRef) tyargs = QP.mkThisVar(ConvType cenv env m v.Type) else let vty = v.Type - match v.ActualParent with + match v.DeclaringEntity with | ParentNone -> // References to local values are embedded by value if not holeOk then wfail(Error(FSComp.SR.crefNoSetOfHole(),m)) @@ -795,8 +791,8 @@ and ConvTyparRef cenv env m (tp:Typar) = and FilterMeasureTyargs tys = tys |> List.filter (fun ty -> match ty with TType_measure _ -> false | _ -> true) -and ConvType cenv env m typ = - match stripTyEqnsAndMeasureEqns cenv.g typ with +and ConvType cenv env m ty = + match stripTyEqnsAndMeasureEqns cenv.g ty with | TType_app(tcref,[tyarg]) when isArrayTyconRef cenv.g tcref -> QP.mkArrayTy(rankOfArrayTyconRef cenv.g tcref,ConvType cenv env m tyarg) @@ -815,8 +811,8 @@ and ConvType cenv env m typ = | TType_forall(_spec,_ty) -> wfail(Error(FSComp.SR.crefNoInnerGenericsInQuotations(),m)) | _ -> wfail(Error (FSComp.SR.crefQuotationsCantContainThisType(),m)) -and ConvTypes cenv env m typs = - List.map (ConvType cenv env m) (FilterMeasureTyargs typs) +and ConvTypes cenv env m tys = + List.map (ConvType cenv env m) (FilterMeasureTyargs tys) and ConvConst cenv env m c ty = match TryEliminateDesugaredConstants cenv.g m c with @@ -1033,14 +1029,14 @@ let ConvExprPublic cenv env e = let ConvMethodBase cenv env (methName, v:Val) = let m = v.Range - let parentTyconR = ConvTyconRef cenv v.TopValActualParent m + let parentTyconR = ConvTyconRef cenv v.TopValDeclaringEntity m match v.MemberInfo with | Some vspr when not v.IsExtensionMember -> let vref = mkLocalValRef v let tps,argInfos,retTy,_ = GetTypeOfMemberInMemberForm cenv.g vref - let numEnclTypeArgs = vref.MemberApparentParent.TyparsNoRange.Length + let numEnclTypeArgs = vref.MemberApparentEntity.TyparsNoRange.Length let argTys = argInfos |> List.concat |> List.map fst let isNewObj = (vspr.MemberFlags.MemberKind = MemberKind.Constructor) diff --git a/src/fsharp/QuotationTranslator.fsi b/src/fsharp/QuotationTranslator.fsi index 39ad830041e..2558b6f7680 100755 --- a/src/fsharp/QuotationTranslator.fsi +++ b/src/fsharp/QuotationTranslator.fsi @@ -9,7 +9,6 @@ open Microsoft.FSharp.Compiler.Range open Microsoft.FSharp.Compiler.Import open Microsoft.FSharp.Compiler.Tast open Microsoft.FSharp.Compiler.TcGlobals -open Microsoft.FSharp.Compiler.Tastops open Microsoft.FSharp.Compiler.AbstractIL.IL [] diff --git a/src/fsharp/ReferenceResolver.fs b/src/fsharp/ReferenceResolver.fs index dd4ca025a52..62fe8c22f6a 100644 --- a/src/fsharp/ReferenceResolver.fs +++ b/src/fsharp/ReferenceResolver.fs @@ -2,11 +2,7 @@ namespace Microsoft.FSharp.Compiler -#if COMPILER_PUBLIC_API module public ReferenceResolver = -#else -module internal ReferenceResolver = -#endif exception internal ResolutionFailure diff --git a/src/fsharp/SignatureConformance.fs b/src/fsharp/SignatureConformance.fs index 21d2fd06132..8b0981451ef 100644 --- a/src/fsharp/SignatureConformance.fs +++ b/src/fsharp/SignatureConformance.fs @@ -147,7 +147,7 @@ type Checker(g, amap, denv, remapInfo: SignatureRepackageInfo, checkingSig) = (errorR(Error(FSComp.SR.typrelSigImplNotCompatibleConstraintsDifferRemove(sigTypar.Name, Layout.showL(NicePrint.layoutTyparConstraint denv (sigTypar,sigTyparCx))),m)); false) else true) && - (not checkingSig || checkAttribs aenv implTypar.Attribs sigTypar.Attribs (fun attribs -> implTypar.typar_attribs <- attribs))) + (not checkingSig || checkAttribs aenv implTypar.Attribs sigTypar.Attribs (fun attribs -> implTypar.SetAttribs attribs))) and checkTypeDef (aenv: TypeEquivEnv) (implTycon:Tycon) (sigTycon:Tycon) = let m = implTycon.Range @@ -183,7 +183,8 @@ type Checker(g, amap, denv, remapInfo: SignatureRepackageInfo, checkingSig) = let unimpl = ListSet.subtract (fun fity aity -> typeAEquiv g aenv aity fity) fintfs aintfs (unimpl |> List.forall (fun ity -> errorR (Error (FSComp.SR.DefinitionsInSigAndImplNotCompatibleMissingInterface(implTycon.TypeOrMeasureKind.ToString(),implTycon.DisplayName, NicePrint.minimalStringOfType denv ity),m)); false)) && let hidden = ListSet.subtract (typeAEquiv g aenv) aintfsUser fintfs - hidden |> List.iter (fun ity -> (if implTycon.IsFSharpInterfaceTycon then error else warning) (InterfaceNotRevealed(denv,ity,implTycon.Range))) + let warningOrError = if implTycon.IsFSharpInterfaceTycon then error else warning + hidden |> List.iter (fun ity -> warningOrError (InterfaceNotRevealed(denv,ity,implTycon.Range))) let aNull = IsUnionTypeWithNullAsTrueValue g implTycon let fNull = IsUnionTypeWithNullAsTrueValue g sigTycon @@ -231,14 +232,15 @@ type Checker(g, amap, denv, remapInfo: SignatureRepackageInfo, checkingSig) = | Some (ValReprInfo (implTyparNames,implArgInfos,implRetInfo) as implValInfo), Some (ValReprInfo (sigTyparNames,sigArgInfos,sigRetInfo) as sigValInfo) -> let ntps = implTyparNames.Length let mtps = sigTyparNames.Length + let nSigArgInfos = sigArgInfos.Length if ntps <> mtps then err(fun(x, y, z) -> FSComp.SR.ValueNotContainedMutabilityGenericParametersDiffer(x, y, z, string mtps, string ntps)) elif implValInfo.KindsOfTypars <> sigValInfo.KindsOfTypars then err(FSComp.SR.ValueNotContainedMutabilityGenericParametersAreDifferentKinds) - elif not (sigArgInfos.Length <= implArgInfos.Length && List.forall2 (fun x y -> List.length x <= List.length y) sigArgInfos (fst (List.chop sigArgInfos.Length implArgInfos))) then - err(fun(x, y, z) -> FSComp.SR.ValueNotContainedMutabilityAritiesDiffer(x, y, z, id.idText, string sigArgInfos.Length, id.idText, id.idText)) + elif not (nSigArgInfos <= implArgInfos.Length && List.forall2 (fun x y -> List.length x <= List.length y) sigArgInfos (fst (List.splitAt nSigArgInfos implArgInfos))) then + err(fun(x, y, z) -> FSComp.SR.ValueNotContainedMutabilityAritiesDiffer(x, y, z, id.idText, string nSigArgInfos, id.idText, id.idText)) else - let implArgInfos = implArgInfos |> List.take sigArgInfos.Length + let implArgInfos = implArgInfos |> List.truncate nSigArgInfos let implArgInfos = (implArgInfos, sigArgInfos) ||> List.map2 (fun l1 l2 -> l1 |> List.take l2.Length) // Propagate some information signature to implementation. @@ -291,7 +293,7 @@ type Checker(g, amap, denv, remapInfo: SignatureRepackageInfo, checkingSig) = elif not (checkValInfo aenv (err denv) implVal sigVal) then false elif not (implVal.IsExtensionMember = sigVal.IsExtensionMember) then err denv (FSComp.SR.ValueNotContainedMutabilityExtensionsDiffer) elif not (checkMemberDatasConform (err denv) (implVal.Attribs, implVal,implVal.MemberInfo) (sigVal.Attribs,sigVal,sigVal.MemberInfo)) then false - else checkAttribs aenv implVal.Attribs sigVal.Attribs (fun attribs -> implVal.val_attribs <- attribs) + else checkAttribs aenv implVal.Attribs sigVal.Attribs (fun attribs -> implVal.SetAttribs attribs) and checkExnInfo err aenv implTypeRepr sigTypeRepr = @@ -550,9 +552,11 @@ type Checker(g, amap, denv, remapInfo: SignatureRepackageInfo, checkingSig) = Printf.bprintf os "%s" fx.DisplayName),m)) let valuesPartiallyMatch (av:Val) (fv:Val) = - (av.LinkagePartialKey.MemberParentMangledName = fv.LinkagePartialKey.MemberParentMangledName) && - (av.LinkagePartialKey.LogicalName = fv.LinkagePartialKey.LogicalName) && - (av.LinkagePartialKey.TotalArgCount = fv.LinkagePartialKey.TotalArgCount) + let akey = av.GetLinkagePartialKey() + let fkey = fv.GetLinkagePartialKey() + (akey.MemberParentMangledName = fkey.MemberParentMangledName) && + (akey.LogicalName = fkey.LogicalName) && + (akey.TotalArgCount = fkey.TotalArgCount) (implModType.AllValsAndMembersByLogicalNameUncached, signModType.AllValsAndMembersByLogicalNameUncached) ||> NameMap.suball2 diff --git a/src/fsharp/SimulatedMSBuildReferenceResolver.fs b/src/fsharp/SimulatedMSBuildReferenceResolver.fs index c53c14fabce..1668cdc09d0 100644 --- a/src/fsharp/SimulatedMSBuildReferenceResolver.fs +++ b/src/fsharp/SimulatedMSBuildReferenceResolver.fs @@ -3,7 +3,7 @@ #if INTERACTIVE #load "../utils/ResizeArray.fs" "../absil/illib.fs" "../fsharp/ReferenceResolver.fs" #else -module internal Microsoft.FSharp.Compiler.SimulatedMSBuildReferenceResolver +module internal Microsoft.FSharp.Compiler.SimulatedMSBuildReferenceResolver #endif open System @@ -15,22 +15,28 @@ open Microsoft.FSharp.Compiler.ReferenceResolver open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library let internal SimulatedMSBuildResolver = + let supportedFrameworks = [| + "v4.7.2"; + "v4.7.1"; + "v4.7"; + "v4.6.2"; + "v4.6.1"; + "v4.6"; + "v4.5.1"; + "v4.5"; + "v4.0" + |] { new Resolver with - member x.HighestInstalledNetFrameworkVersion() = + member x.HighestInstalledNetFrameworkVersion() = + let root = x.DotNetFrameworkReferenceAssembliesRootDirectory - if Directory.Exists(Path.Combine(root,"v4.7")) then "v4.7" - elif Directory.Exists(Path.Combine(root,"v4.6.2")) then "v4.6.2" - elif Directory.Exists(Path.Combine(root,"v4.6.1")) then "v4.6.1" - elif Directory.Exists(Path.Combine(root,"v4.6")) then "v4.6" - elif Directory.Exists(Path.Combine(root,"v4.5.1")) then "v4.5.1" - elif Directory.Exists(Path.Combine(root,"v4.5")) then "v4.5" - elif Directory.Exists(Path.Combine(root,"v4.0")) then "v4.0" - else "v4.5" - - member __.DotNetFrameworkReferenceAssembliesRootDirectory = -#if FX_RESHAPED_MSBUILD - "" -#else + let fwOpt = supportedFrameworks |> Seq.tryFind(fun fw -> Directory.Exists(Path.Combine(root, fw) )) + match fwOpt with + | Some fw -> fw + | None -> "v4.5" + + member __.DotNetFrameworkReferenceAssembliesRootDirectory = +#if !FX_RESHAPED_MSBUILD if System.Environment.OSVersion.Platform = System.PlatformID.Win32NT then let PF = match Environment.GetEnvironmentVariable("ProgramFiles(x86)") with @@ -38,13 +44,13 @@ let internal SimulatedMSBuildResolver = | s -> s PF + @"\Reference Assemblies\Microsoft\Framework\.NETFramework" else - "" #endif + "" - member __.Resolve(resolutionEnvironment, references, targetFrameworkVersion, targetFrameworkDirectories, targetProcessorArchitecture, + member __.Resolve(resolutionEnvironment, references, targetFrameworkVersion, targetFrameworkDirectories, targetProcessorArchitecture, fsharpCoreDir, explicitIncludeDirs, implicitIncludeDir, logMessage, logWarningOrError) = -#if !FX_RESHAPED_MSBUILD +#if !FX_NO_WIN_REGISTRY let registrySearchPaths() = [ let registryKey = @"Software\Microsoft\.NetFramework"; use key = Registry.LocalMachine.OpenSubKey(registryKey) @@ -79,7 +85,7 @@ let internal SimulatedMSBuildResolver = yield! explicitIncludeDirs yield fsharpCoreDir yield implicitIncludeDir -#if !FX_RESHAPED_MSBUILD +#if !FX_NO_WIN_REGISTRY if System.Environment.OSVersion.Platform = System.PlatformID.Win32NT then yield! registrySearchPaths() #endif @@ -103,7 +109,7 @@ let internal SimulatedMSBuildResolver = #if !FX_RESHAPED_MSBUILD // For this one we need to get the version search exactly right, without doing a load try - if not found && r.StartsWith("FSharp.Core, Version=") && Environment.OSVersion.Platform = PlatformID.Win32NT then + if not found && r.StartsWithOrdinal("FSharp.Core, Version=") && Environment.OSVersion.Platform = PlatformID.Win32NT then let n = AssemblyName(r) let fscoreDir0 = let PF = diff --git a/src/fsharp/TastOps.fs b/src/fsharp/TastOps.fs index d2d378508de..cfbb8e195ed 100644 --- a/src/fsharp/TastOps.fs +++ b/src/fsharp/TastOps.fs @@ -43,6 +43,10 @@ type TyparMap<'T> = let (TPMap m) = tm m.ContainsKey(v.Stamp) + member tm.TryFind (v: Typar) = + let (TPMap m) = tm + m.TryFind(v.Stamp) + member tm.Add (v: Typar, x) = let (TPMap m) = tm TPMap (m.Add(v.Stamp, x)) @@ -208,13 +212,14 @@ and remapMeasureAux tyenv unt = | Measure.RationalPower(u, q) -> Measure.RationalPower(remapMeasureAux tyenv u, q) | Measure.Inv u -> Measure.Inv(remapMeasureAux tyenv u) | Measure.Var tp as unt -> - match tp.Solution with + match tp.Solution with | None -> - if ListAssoc.containsKey typarEq tp tyenv.tpinst then - match ListAssoc.find typarEq tp tyenv.tpinst with + match ListAssoc.tryFind typarEq tp tyenv.tpinst with + | Some v -> + match v with | TType_measure unt -> unt | _ -> failwith "remapMeasureAux: incorrect kinds" - else unt + | None -> unt | Some (TType_measure unt) -> remapMeasureAux tyenv unt | Some ty -> failwithf "incorrect kinds: %A" ty @@ -224,7 +229,7 @@ and remapTupInfoAux _tyenv unt = and remapTypesAux tyenv types = List.mapq (remapTypeAux tyenv) types and remapTyparConstraintsAux tyenv cs = - cs |> List.choose (fun x -> + cs |> List.choose (fun x -> match x with | TyparConstraint.CoercesTo(ty, m) -> Some(TyparConstraint.CoercesTo (remapTypeAux tyenv ty, m)) @@ -244,7 +249,7 @@ and remapTyparConstraintsAux tyenv cs = | TyparConstraint.IsReferenceType _ | TyparConstraint.RequiresDefaultConstructor _ -> Some(x)) -and remapTraitAux tyenv (TTrait(typs, nm, mf, argtys, rty, slnCell)) = +and remapTraitAux tyenv (TTrait(tys, nm, mf, argtys, rty, slnCell)) = let slnCell = match !slnCell with | None -> None @@ -252,10 +257,10 @@ and remapTraitAux tyenv (TTrait(typs, nm, mf, argtys, rty, slnCell)) = | Some sln -> let sln = match sln with - | ILMethSln(typ, extOpt, ilMethRef, minst) -> - ILMethSln(remapTypeAux tyenv typ, extOpt, ilMethRef, remapTypesAux tyenv minst) - | FSMethSln(typ, vref, minst) -> - FSMethSln(remapTypeAux tyenv typ, remapValRef tyenv vref, remapTypesAux tyenv minst) + | ILMethSln(ty, extOpt, ilMethRef, minst) -> + ILMethSln(remapTypeAux tyenv ty, extOpt, ilMethRef, remapTypesAux tyenv minst) + | FSMethSln(ty, vref, minst) -> + FSMethSln(remapTypeAux tyenv ty, remapValRef tyenv vref, remapTypesAux tyenv minst) | FSRecdFieldSln(tinst, rfref, isSet) -> FSRecdFieldSln(remapTypesAux tyenv tinst, remapRecdFieldRef tyenv.tyconRefRemap rfref, isSet) | BuiltInSln -> @@ -271,7 +276,7 @@ and remapTraitAux tyenv (TTrait(typs, nm, mf, argtys, rty, slnCell)) = // The danger here is that a solution for one syntactic occurrence of a trait constraint won't // be propagated to other, "linked" solutions. However trait constraints don't appear in any algebra // in the same way as types - TTrait(remapTypesAux tyenv typs, nm, mf, remapTypesAux tyenv argtys, Option.map (remapTypeAux tyenv) rty, ref slnCell) + TTrait(remapTypesAux tyenv tys, nm, mf, remapTypesAux tyenv argtys, Option.map (remapTypeAux tyenv) rty, ref slnCell) and bindTypars tps tyargs tpinst = match tps with @@ -287,8 +292,8 @@ and copyAndRemapAndBindTyparsFull remapAttrib tyenv tps = let tps' = copyTypars tps let tyenv = { tyenv with tpinst = bindTypars tps (generalizeTypars tps') tyenv.tpinst } (tps, tps') ||> List.iter2 (fun tporig tp -> - tp.FixupConstraints (remapTyparConstraintsAux tyenv tporig.Constraints) - tp.typar_attribs <- tporig.typar_attribs |> remapAttrib) + tp.SetConstraints (remapTyparConstraintsAux tyenv tporig.Constraints) + tp.SetAttribs (tporig.Attribs |> remapAttrib)) tps', tyenv // copies bound typars, extends tpinst @@ -349,16 +354,16 @@ let remapTypeFull remapAttrib tyenv ty = | _ -> remapType tyenv ty -let remapParam tyenv (TSlotParam(nm, typ, fl1, fl2, fl3, attribs) as x) = +let remapParam tyenv (TSlotParam(nm, ty, fl1, fl2, fl3, attribs) as x) = if isRemapEmpty tyenv then x else - TSlotParam(nm, remapTypeAux tyenv typ, fl1, fl2, fl3, attribs) + TSlotParam(nm, remapTypeAux tyenv ty, fl1, fl2, fl3, attribs) -let remapSlotSig remapAttrib tyenv (TSlotSig(nm, typ, ctps, methTypars, paraml, rty) as x) = +let remapSlotSig remapAttrib tyenv (TSlotSig(nm, ty, ctps, methTypars, paraml, rty) as x) = if isRemapEmpty tyenv then x else - let typ' = remapTypeAux tyenv typ + let ty' = remapTypeAux tyenv ty let ctps', tyenvinner = copyAndRemapAndBindTyparsFull remapAttrib tyenv ctps let methTypars', tyenvinner = copyAndRemapAndBindTyparsFull remapAttrib tyenvinner methTypars - TSlotSig(nm, typ', ctps', methTypars', List.mapSquared (remapParam tyenvinner) paraml, Option.map (remapTypeAux tyenvinner) rty) + TSlotSig(nm, ty', ctps', methTypars', List.mapSquared (remapParam tyenvinner) paraml, Option.map (remapTypeAux tyenvinner) rty) let mkInstRemap tpinst = { tyconRefRemap = emptyTyconRefRemap @@ -555,8 +560,45 @@ let tryNormalizeMeasureInType g ty = // Some basic type builders //--------------------------------------------------------------------------- -let mkNativePtrTy (g:TcGlobals) ty = TType_app (g.nativeptr_tcr, [ty]) -let mkByrefTy (g:TcGlobals) ty = TType_app (g.byref_tcr, [ty]) +let mkNativePtrTy (g:TcGlobals) ty = + assert g.nativeptr_tcr.CanDeref // this should always be available, but check anyway + TType_app (g.nativeptr_tcr, [ty]) + +let mkByrefTy (g:TcGlobals) ty = + assert g.byref_tcr.CanDeref // this should always be available, but check anyway + TType_app (g.byref_tcr, [ty]) + +let mkInByrefTy (g:TcGlobals) ty = + if g.inref_tcr.CanDeref then // If not using sufficient FSharp.Core, then inref = byref, see RFC FS-1053.md + TType_app (g.inref_tcr, [ty]) + else + mkByrefTy g ty + +let mkOutByrefTy (g:TcGlobals) ty = + if g.outref_tcr.CanDeref then // If not using sufficient FSharp.Core, then outref = byref, see RFC FS-1053.md + TType_app (g.outref_tcr, [ty]) + else + mkByrefTy g ty + +let mkByrefTyWithFlag g readonly ty = + if readonly then + mkInByrefTy g ty + else + mkByrefTy g ty + +let mkByref2Ty (g:TcGlobals) ty1 ty2 = + assert g.byref2_tcr.CanDeref // check we are using sufficient FSharp.Core, caller should check this + TType_app (g.byref2_tcr, [ty1; ty2]) + +let mkVoidPtrTy (g:TcGlobals) = + assert g.voidptr_tcr.CanDeref // check we are using sufficient FSharp.Core , caller should check this + TType_app (g.voidptr_tcr, []) + +let mkByrefTyWithInference (g:TcGlobals) ty1 ty2 = + if g.byref2_tcr.CanDeref then // If not using sufficient FSharp.Core, then inref = byref, see RFC FS-1053.md + TType_app (g.byref2_tcr, [ty1; ty2]) + else + TType_app (g.byref_tcr, [ty1]) let mkArrayTy (g:TcGlobals) rank ty m = if rank < 1 || rank > 32 then @@ -601,13 +643,32 @@ let mkCompiledTupleTyconRef (g:TcGlobals) isStruct n = elif n = 8 then (if isStruct then g.struct_tuple8_tcr else g.ref_tuple8_tcr) else failwithf "mkCompiledTupleTyconRef, n = %d" n -let rec mkCompiledTupleTy g isStruct tys = - let n = List.length tys - if n < maxTuple then TType_app (mkCompiledTupleTyconRef g isStruct n, tys) +/// Convert from F# tuple types to .NET tuple types +let rec mkCompiledTupleTy g isStruct tupElemTys = + let n = List.length tupElemTys + if n < maxTuple then + TType_app (mkCompiledTupleTyconRef g isStruct n, tupElemTys) else - let tysA, tysB = List.splitAfter goodTupleFields tys + let tysA, tysB = List.splitAfter goodTupleFields tupElemTys TType_app ((if isStruct then g.struct_tuple8_tcr else g.ref_tuple8_tcr), tysA@[mkCompiledTupleTy g isStruct tysB]) +/// Convert from F# tuple types to .NET tuple types, but only the outermost level +let mkOuterCompiledTupleTy g isStruct tupElemTys = + let n = List.length tupElemTys + if n < maxTuple then + TType_app (mkCompiledTupleTyconRef g isStruct n, tupElemTys) + else + let tysA, tysB = List.splitAfter goodTupleFields tupElemTys + let tcref = (if isStruct then g.struct_tuple8_tcr else g.ref_tuple8_tcr) + // In the case of an 8-tuple we add the Tuple<_> marker. For other sizes we keep the type + // as a regular F# tuple type. + match tysB with + | [ tyB ] -> + let marker = TType_app (mkCompiledTupleTyconRef g isStruct 1, [tyB]) + TType_app (tcref, tysA@[marker]) + | _ -> + TType_app (tcref, tysA@[TType_tuple (TupInfo.Const isStruct, tysB)]) + //--------------------------------------------------------------------------- // Remove inference equations and abbreviations from types //--------------------------------------------------------------------------- @@ -651,7 +712,16 @@ let rec stripTyEqnsA g canShortcut ty = | Some abbrevTy -> stripTyEqnsA g canShortcut (applyTyconAbbrev abbrevTy tycon tinst) | None -> - if tycon.IsMeasureableReprTycon && List.forall (isDimensionless g) tinst then + // This is the point where we get to add additional coditional normalizing equations + // into the type system. Such power! + // + // Add the equation byref<'T> = byref<'T, ByRefKinds.InOut> for when using sufficient FSharp.Core + // See RFC FS-1053.md + if tyconRefEq g tcref g.byref_tcr && g.byref2_tcr.CanDeref && g.byrefkind_InOut_tcr.CanDeref then + mkByref2Ty g tinst.[0] (TType_app(g.byrefkind_InOut_tcr, [])) + + // Add the equation double<1> = double for units of measure. + elif tycon.IsMeasureableReprTycon && List.forall (isDimensionless g) tinst then stripTyEqnsA g canShortcut (reduceTyconMeasureableOrProvided g tycon tinst) else ty @@ -729,48 +799,61 @@ let isProvenUnionCaseTy ty = match ty with TType_ucase _ -> true | _ -> false let mkAppTy tcref tyargs = TType_app(tcref, tyargs) let mkProvenUnionCaseTy ucref tyargs = TType_ucase(ucref, tyargs) let isAppTy g ty = ty |> stripTyEqns g |> (function TType_app _ -> true | _ -> false) +let tryAppTy g ty = ty |> stripTyEqns g |> (function TType_app(tcref, tinst) -> ValueSome (tcref, tinst) | _ -> ValueNone) let destAppTy g ty = ty |> stripTyEqns g |> (function TType_app(tcref, tinst) -> tcref, tinst | _ -> failwith "destAppTy") let tcrefOfAppTy g ty = ty |> stripTyEqns g |> (function TType_app(tcref, _) -> tcref | _ -> failwith "tcrefOfAppTy") let argsOfAppTy g ty = ty |> stripTyEqns g |> (function TType_app(_, tinst) -> tinst | _ -> []) -let tryDestTyparTy g ty = ty |> stripTyEqns g |> (function TType_var v -> Some v | _ -> None) -let tryDestFunTy g ty = ty |> stripTyEqns g |> (function TType_fun (tyv, tau) -> Some(tyv, tau) | _ -> None) -let tryDestAppTy g ty = ty |> stripTyEqns g |> (function TType_app(tcref, _) -> Some tcref | _ -> None) -let tryAnyParTy g ty = ty |> stripTyEqns g |> (function TType_var v -> Some v | TType_measure unt when isUnitParMeasure g unt -> Some(destUnitParMeasure g unt) | _ -> None) +let tryDestTyparTy g ty = ty |> stripTyEqns g |> (function TType_var v -> ValueSome v | _ -> ValueNone) +let tryDestFunTy g ty = ty |> stripTyEqns g |> (function TType_fun (tyv, tau) -> ValueSome(tyv, tau) | _ -> ValueNone) +let tryDestAppTy g ty = ty |> stripTyEqns g |> (function TType_app(tcref, _) -> ValueSome tcref | _ -> ValueNone) + +let tryAnyParTy g ty = ty |> stripTyEqns g |> (function TType_var v -> ValueSome v | TType_measure unt when isUnitParMeasure g unt -> ValueSome(destUnitParMeasure g unt) | _ -> ValueNone) +let tryAnyParTyOption g ty = ty |> stripTyEqns g |> (function TType_var v -> Some v | TType_measure unt when isUnitParMeasure g unt -> Some(destUnitParMeasure g unt) | _ -> None) let (|AppTy|_|) g ty = ty |> stripTyEqns g |> (function TType_app(tcref, tinst) -> Some (tcref, tinst) | _ -> None) let (|RefTupleTy|_|) g ty = ty |> stripTyEqns g |> (function TType_tuple(tupInfo, tys) when not (evalTupInfoIsStruct tupInfo) -> Some tys | _ -> None) let (|FunTy|_|) g ty = ty |> stripTyEqns g |> (function TType_fun(dty, rty) -> Some (dty, rty) | _ -> None) let tryNiceEntityRefOfTy ty = let ty = stripTyparEqnsAux false ty - match ty with + match ty with + | TType_app (tcref, _) -> ValueSome tcref + | TType_measure (Measure.Con tcref) -> ValueSome tcref + | _ -> ValueNone + +let tryNiceEntityRefOfTyOption ty = + let ty = stripTyparEqnsAux false ty + match ty with | TType_app (tcref, _) -> Some tcref | TType_measure (Measure.Con tcref) -> Some tcref | _ -> None - -let (|NullableTy|_|) g ty = - match ty with - | AppTy g (tcr, [tyarg]) when tyconRefEq g tcr g.system_Nullable_tcref -> Some tyarg +let (|NullableTy|_|) g ty = + match tryAppTy g ty with + | ValueSome (tcr, [tyarg]) when tyconRefEq g tcr g.system_Nullable_tcref -> Some tyarg | _ -> None let (|StripNullableTy|) g ty = - match ty with - | AppTy g (tcr, [tyarg]) when tyconRefEq g tcr g.system_Nullable_tcref -> tyarg + match tryAppTy g ty with + | ValueSome (tcr, [tyarg]) when tyconRefEq g tcr g.system_Nullable_tcref -> tyarg | _ -> ty -let (|ByrefTy|_|) g ty = - match ty with - | AppTy g (tcr, [tyarg]) when tyconRefEq g tcr g.byref_tcr -> Some tyarg - | _ -> None - -let mkInstForAppTy g typ = - match typ with - | AppTy g (tcref, tinst) -> mkTyconRefInst tcref tinst +let mkInstForAppTy g ty = + match tryAppTy g ty with + | ValueSome (tcref, tinst) -> mkTyconRefInst tcref tinst | _ -> [] -let domainOfFunTy g ty = fst(destFunTy g ty) -let rangeOfFunTy g ty = snd(destFunTy g ty) +let domainOfFunTy g ty = fst (destFunTy g ty) +let rangeOfFunTy g ty = snd (destFunTy g ty) +let convertToTypeWithMetadataIfPossible g ty = + if isAnyTupleTy g ty then + let (tupInfo, tupElemTys) = destAnyTupleTy g ty + mkOuterCompiledTupleTy g (evalTupInfoIsStruct tupInfo) tupElemTys + elif isFunTy g ty then + let (a,b) = destFunTy g ty + mkAppTy g.fastFunc_tcr [a; b] + else ty + //--------------------------------------------------------------------------- // Equivalence of types up to alpha-equivalence //--------------------------------------------------------------------------- @@ -802,10 +885,10 @@ type TypeEquivEnv with static member FromEquivTypars tps1 tps2 = TypeEquivEnv.Empty.BindEquivTypars tps1 tps2 -let rec traitsAEquivAux erasureFlag g aenv (TTrait(typs1, nm, mf1, argtys, rty, _)) (TTrait(typs2, nm2, mf2, argtys2, rty2, _)) = +let rec traitsAEquivAux erasureFlag g aenv (TTrait(tys1, nm, mf1, argtys, rty, _)) (TTrait(tys2, nm2, mf2, argtys2, rty2, _)) = mf1 = mf2 && nm = nm2 && - ListSet.equals (typeAEquivAux erasureFlag g aenv) typs1 typs2 && + ListSet.equals (typeAEquivAux erasureFlag g aenv) tys1 tys2 && returnTypesAEquivAux erasureFlag g aenv rty rty2 && List.lengthsEqAndForall2 (typeAEquivAux erasureFlag g aenv) argtys argtys2 @@ -860,7 +943,7 @@ and typarsAEquivAux erasureFlag g (aenv: TypeEquivEnv) tps1 tps2 = and tcrefAEquiv g aenv tc1 tc2 = tyconRefEq g tc1 tc2 || - (aenv.EquivTycons.ContainsKey tc1 && tyconRefEq g aenv.EquivTycons.[tc1] tc2) + (match aenv.EquivTycons.TryFind tc1 with Some v -> tyconRefEq g v tc2 | None -> false) and typeAEquivAux erasureFlag g aenv ty1 ty2 = let ty1 = stripTyEqnsWrtErasure erasureFlag g ty1 @@ -870,8 +953,10 @@ and typeAEquivAux erasureFlag g aenv ty1 ty2 = typarsAEquivAux erasureFlag g aenv tps1 tps2 && typeAEquivAux erasureFlag g (aenv.BindEquivTypars tps1 tps2) rty1 rty2 | TType_var tp1, TType_var tp2 when typarEq tp1 tp2 -> true - | TType_var tp1, _ when aenv.EquivTypars.ContainsKey tp1 -> - typeEquivAux erasureFlag g aenv.EquivTypars.[tp1] ty2 + | TType_var tp1, _ -> + match aenv.EquivTypars.TryFind tp1 with + | Some v -> typeEquivAux erasureFlag g v ty2 + | None -> false | TType_app (tc1, b1) , TType_app (tc2, b2) -> tcrefAEquiv g aenv tc1 tc2 && typesAEquivAux erasureFlag g aenv b1 b2 @@ -970,8 +1055,8 @@ let unionCaseRefOrder = let mkFunTy d r = TType_fun (d, r) let (-->) d r = mkFunTy d r let mkForallTy d r = TType_forall (d, r) -let tryMkForallTy d r = if isNil d then r else mkForallTy d r -let (+->) d r = tryMkForallTy d r +let mkForallTyIfNeeded d r = if isNil d then r else mkForallTy d r +let (+->) d r = mkForallTyIfNeeded d r let mkIteratedFunTy dl r = List.foldBack (-->) dl r let mkLambdaArgTy m tys = @@ -982,7 +1067,7 @@ let mkLambdaArgTy m tys = let typeOfLambdaArg m vs = mkLambdaArgTy m (typesOfVals vs) let mkMultiLambdaTy m vs rty = mkFunTy (typeOfLambdaArg m vs) rty -let mkLambdaTy tps tys rty = tryMkForallTy tps (mkIteratedFunTy tys rty) +let mkLambdaTy tps tys rty = mkForallTyIfNeeded tps (mkIteratedFunTy tys rty) /// When compiling FSharp.Core.dll we have to deal with the non-local references into /// the library arising from env.fs. Part of this means that we have to be able to resolve these @@ -1151,8 +1236,8 @@ let NormalizeDeclaredTyparsForEquiRecursiveInference g tps = tps |> List.map (fun tp -> let ty = mkTyparTy tp match tryAnyParTy g ty with - | Some anyParTy -> anyParTy - | None -> tp) + | ValueSome anyParTy -> anyParTy + | ValueNone -> tp) type TypeScheme = TypeScheme of Typars * TType @@ -1196,13 +1281,14 @@ let mkExnExpr(uc, args, m) = Expr.Op (TOp.ExnConstr uc, let mkTupleFieldGetViaExprAddr(tupInfo, e, tinst, i, m) = Expr.Op (TOp.TupleFieldGet(tupInfo, i), tinst, [e], m) let mkRecdFieldGetViaExprAddr(e, fref, tinst, m) = Expr.Op (TOp.ValFieldGet(fref), tinst, [e], m) -let mkRecdFieldGetAddrViaExprAddr(e, fref, tinst, m) = Expr.Op (TOp.ValFieldGetAddr(fref), tinst, [e], m) +let mkRecdFieldGetAddrViaExprAddr(readonly, e, fref, tinst, m) = Expr.Op (TOp.ValFieldGetAddr(fref, readonly), tinst, [e], m) -let mkStaticRecdFieldGetAddr(fref, tinst, m) = Expr.Op (TOp.ValFieldGetAddr(fref), tinst, [], m) +let mkStaticRecdFieldGetAddr(readonly, fref, tinst, m) = Expr.Op (TOp.ValFieldGetAddr(fref, readonly), tinst, [], m) let mkStaticRecdFieldGet(fref, tinst, m) = Expr.Op (TOp.ValFieldGet(fref), tinst, [], m) let mkStaticRecdFieldSet(fref, tinst, e, m) = Expr.Op (TOp.ValFieldSet(fref), tinst, [e], m) -let mkArrayElemAddress g (readonly, isNativePtr, shape, elemTy, aexpr, nexpr, m) = Expr.Op (TOp.ILAsm ([IL.I_ldelema(readonly, isNativePtr, shape, mkILTyvarTy 0us)], [mkByrefTy g elemTy]), [elemTy], [aexpr;nexpr], m) +let mkArrayElemAddress g (readonly, ilInstrReadOnlyAnnotation, isNativePtr, shape, elemTy, exprs, m) = + Expr.Op (TOp.ILAsm ([IL.I_ldelema(ilInstrReadOnlyAnnotation, isNativePtr, shape, mkILTyvarTy 0us)], [mkByrefTyWithFlag g readonly elemTy]), [elemTy], exprs, m) let mkRecdFieldSetViaExprAddr (e1, fref, tinst, e2, m) = Expr.Op (TOp.ValFieldSet(fref), tinst, [e1;e2], m) @@ -1219,7 +1305,7 @@ let mkUnionCaseFieldGetProvenViaExprAddr (e1, cref, tinst, j, m) = Expr.Op (TO /// Build a 'TOp.UnionCaseFieldGetAddr' expression for a field of a union when we've already determined the value to be a particular union case. For ref-unions, /// the input expression has 'TType_ucase', which is an F# compiler internal "type" corresponding to the union case. For struct-unions, /// the input should be the address of the expression. -let mkUnionCaseFieldGetAddrProvenViaExprAddr (e1, cref, tinst, j, m) = Expr.Op (TOp.UnionCaseFieldGetAddr(cref, j), tinst, [e1], m) +let mkUnionCaseFieldGetAddrProvenViaExprAddr (readonly, e1, cref, tinst, j, m) = Expr.Op (TOp.UnionCaseFieldGetAddr(cref, j, readonly), tinst, [e1], m) /// Build a 'get' expression for something we've already determined to be a particular union case, but where /// the static type of the input is not yet proven to be that particular union case. This requires a type @@ -1252,7 +1338,7 @@ let mkDefault (m, ty) = Expr.Const(Const.Zero, m, ty) let mkValSet m v e = Expr.Op (TOp.LValueOp (LSet, v), [], [e], m) let mkAddrSet m v e = Expr.Op (TOp.LValueOp (LByrefSet, v), [], [e], m) let mkAddrGet m v = Expr.Op (TOp.LValueOp (LByrefGet, v), [], [], m) -let mkValAddr m v = Expr.Op (TOp.LValueOp (LGetAddr, v), [], [], m) +let mkValAddr m readonly v = Expr.Op (TOp.LValueOp (LAddrOf readonly, v), [], [], m) //-------------------------------------------------------------------------- // Maps tracking extra information for values @@ -1280,14 +1366,21 @@ type ValHash<'T> = [] type ValMultiMap<'T>(contents: StampMap<'T list>) = + + member m.ContainsKey (v: Val) = + contents.ContainsKey v.Stamp + member m.Find (v: Val) = match contents |> Map.tryFind v.Stamp with | Some vals -> vals | _ -> [] member m.Add (v:Val, x) = ValMultiMap<'T>(contents.Add (v.Stamp, x :: m.Find v)) + member m.Remove (v: Val) = ValMultiMap<'T>(contents.Remove v.Stamp) + member m.Contents = contents + static member Empty = ValMultiMap<'T>(Map.empty) [] @@ -1307,14 +1400,13 @@ type TyconRefMultiMap<'T>(contents: TyconRefMap<'T list>) = //-------------------------------------------------------------------------- /// Try to create a EntityRef suitable for accessing the given Entity from another assembly -let tryRescopeEntity viewedCcu (entity:Entity) : EntityRef option = +let tryRescopeEntity viewedCcu (entity:Entity) : ValueOption = match entity.PublicPath with - | Some pubpath -> Some (ERefNonLocal (rescopePubPath viewedCcu pubpath)) - | None -> None - + | Some pubpath -> ValueSome (ERefNonLocal (rescopePubPath viewedCcu pubpath)) + | None -> ValueNone /// Try to create a ValRef suitable for accessing the given Val from another assembly -let tryRescopeVal viewedCcu (entityRemap:Remap) (vspec:Val) : ValRef option = +let tryRescopeVal viewedCcu (entityRemap:Remap) (vspec:Val) : ValueOption = match vspec.PublicPath with | Some (ValPubPath(p, fullLinkageKey)) -> // The type information in the val linkage doesn't need to keep any information to trait solutions. @@ -1329,9 +1421,8 @@ let tryRescopeVal viewedCcu (entityRemap:Remap) (vspec:Val) : ValRef option = mkNonLocalValRef (rescopePubPathToParent viewedCcu p) fullLinkageKey else mkNonLocalValRef (rescopePubPath viewedCcu p) fullLinkageKey - Some vref - | None -> None - + ValueSome vref + | _ -> ValueNone //--------------------------------------------------------------------------- // Type information about records, constructors etc. @@ -1425,7 +1516,7 @@ let tryDestRefTupleTy g ty = type UncurriedArgInfos = (TType * ArgReprInfo) list type CurriedArgInfos = (TType * ArgReprInfo) list list -// A 'tau' type is one with its type paramaeters stripped off +// A 'tau' type is one with its type parameters stripped off let GetTopTauTypeInFSharpForm g (curriedArgInfos: ArgReprInfo list list) tau m = let nArgInfos = curriedArgInfos.Length let argtys, rty = stripFunTyN g nArgInfos tau @@ -1485,26 +1576,20 @@ let rankOfArrayTyconRef (g:TcGlobals) tcr = //------------------------------------------------------------------------- let destArrayTy (g:TcGlobals) ty = - match ty with - | AppTy g (tcref, [ty]) when isArrayTyconRef g tcref -> ty + match tryAppTy g ty with + | ValueSome (tcref, [ty]) when isArrayTyconRef g tcref -> ty | _ -> failwith "destArrayTy" let destListTy (g:TcGlobals) ty = - match ty with - | AppTy g (tcref, [ty]) when tyconRefEq g tcref g.list_tcr_canon -> ty + match tryAppTy g ty with + | ValueSome (tcref, [ty]) when tyconRefEq g tcref g.list_tcr_canon -> ty | _ -> failwith "destListTy" -let isTypeConstructorEqualToOptional g tcOpt tc = +let tyconRefEqOpt g tcOpt tc = match tcOpt with | None -> false | Some tc2 -> tyconRefEq g tc2 tc -let isByrefLikeTyconRef g tcref = - tyconRefEq g g.byref_tcr tcref || - isTypeConstructorEqualToOptional g g.system_TypedReference_tcref tcref || - isTypeConstructorEqualToOptional g g.system_ArgIterator_tcref tcref || - isTypeConstructorEqualToOptional g g.system_RuntimeArgumentHandle_tcref tcref - let isStringTy g ty = ty |> stripTyEqns g |> (function TType_app(tcref, _) -> tyconRefEq g tcref g.system_String_tcref | _ -> false) let isListTy g ty = ty |> stripTyEqns g |> (function TType_app(tcref, _) -> tyconRefEq g tcref g.list_tcr_canon | _ -> false) let isArrayTy g ty = ty |> stripTyEqns g |> (function TType_app(tcref, _) -> isArrayTyconRef g tcref | _ -> false) @@ -1514,8 +1599,25 @@ let isObjTy g ty = ty |> stripTyEqns g |> (function TType_app(tcref, _) -> let isVoidTy g ty = ty |> stripTyEqns g |> (function TType_app(tcref, _) -> tyconRefEq g g.system_Void_tcref tcref | _ -> false) let isILAppTy g ty = ty |> stripTyEqns g |> (function TType_app(tcref, _) -> tcref.IsILTycon | _ -> false) let isNativePtrTy g ty = ty |> stripTyEqns g |> (function TType_app(tcref, _) -> tyconRefEq g g.nativeptr_tcr tcref | _ -> false) -let isByrefTy g ty = ty |> stripTyEqns g |> (function TType_app(tcref, _) -> tyconRefEq g g.byref_tcr tcref | _ -> false) -let isByrefLikeTy g ty = ty |> stripTyEqns g |> (function TType_app(tcref, _) -> isByrefLikeTyconRef g tcref | _ -> false) + +let isByrefTy g ty = + ty |> stripTyEqns g |> (function + | TType_app(tcref, _) when g.byref2_tcr.CanDeref -> tyconRefEq g g.byref2_tcr tcref + | TType_app(tcref, _) -> tyconRefEq g g.byref_tcr tcref + | _ -> false) + +let isInByrefTag g ty = ty |> stripTyEqns g |> (function TType_app(tcref, []) -> tyconRefEq g g.byrefkind_In_tcr tcref | _ -> false) +let isInByrefTy g ty = + ty |> stripTyEqns g |> (function + | TType_app(tcref, [_; tag]) when g.byref2_tcr.CanDeref -> tyconRefEq g g.byref2_tcr tcref && isInByrefTag g tag + | _ -> false) + +let isOutByrefTag g ty = ty |> stripTyEqns g |> (function TType_app(tcref, []) -> tyconRefEq g g.byrefkind_Out_tcr tcref | _ -> false) +let isOutByrefTy g ty = + ty |> stripTyEqns g |> (function + | TType_app(tcref, [_; tag]) when g.byref2_tcr.CanDeref -> tyconRefEq g g.byref2_tcr tcref && isOutByrefTag g tag + | _ -> false) + #if !NO_EXTENSIONTYPING let extensionInfoOfTy g ty = ty |> stripTyEqns g |> (function TType_app(tcref, _) -> tcref.TypeReprInfo | _ -> TNoRepr) #endif @@ -1565,31 +1667,31 @@ let isILInterfaceTycon (tycon:Tycon) = #if !NO_EXTENSIONTYPING | ProvidedTypeMetadata info -> info.IsInterface #endif - | ILTypeMetadata (TILObjectReprData(_, _, td)) -> (td.tdKind = ILTypeDefKind.Interface) + | ILTypeMetadata (TILObjectReprData(_, _, td)) -> td.IsInterface | FSharpOrArrayOrByrefOrTupleOrExnTypeMetadata -> false let rankOfArrayTy g ty = rankOfArrayTyconRef g (tcrefOfAppTy g ty) let isFSharpObjModelRefTy g ty = isFSharpObjModelTy g ty && - let tcr, _ = destAppTy g ty + let tcr = tcrefOfAppTy g ty match tcr.FSharpObjectModelTypeInfo.fsobjmodel_kind with | TTyconClass | TTyconInterface | TTyconDelegate _ -> true | TTyconStruct | TTyconEnum -> false let isFSharpClassTy g ty = match tryDestAppTy g ty with - | Some tcref -> tcref.Deref.IsFSharpClassTycon + | ValueSome tcref -> tcref.Deref.IsFSharpClassTycon | _ -> false let isFSharpStructTy g ty = match tryDestAppTy g ty with - | Some tcref -> tcref.Deref.IsFSharpStructOrEnumTycon + | ValueSome tcref -> tcref.Deref.IsFSharpStructOrEnumTycon | _ -> false let isFSharpInterfaceTy g ty = match tryDestAppTy g ty with - | Some tcref -> tcref.Deref.IsFSharpInterfaceTycon + | ValueSome tcref -> tcref.Deref.IsFSharpInterfaceTycon | _ -> false let isDelegateTy g ty = @@ -1597,10 +1699,10 @@ let isDelegateTy g ty = #if !NO_EXTENSIONTYPING | ProvidedTypeMetadata info -> info.IsDelegate () #endif - | ILTypeMetadata (TILObjectReprData(_, _, td)) -> (td.tdKind = ILTypeDefKind.Delegate) + | ILTypeMetadata (TILObjectReprData(_, _, td)) -> td.IsDelegate | FSharpOrArrayOrByrefOrTupleOrExnTypeMetadata -> match tryDestAppTy g ty with - | Some tcref -> tcref.Deref.IsFSharpDelegateTycon + | ValueSome tcref -> tcref.Deref.IsFSharpDelegateTycon | _ -> false let isInterfaceTy g ty = @@ -1608,7 +1710,7 @@ let isInterfaceTy g ty = #if !NO_EXTENSIONTYPING | ProvidedTypeMetadata info -> info.IsInterface #endif - | ILTypeMetadata (TILObjectReprData(_, _, td)) -> (td.tdKind = ILTypeDefKind.Interface) + | ILTypeMetadata (TILObjectReprData(_, _, td)) -> td.IsInterface | FSharpOrArrayOrByrefOrTupleOrExnTypeMetadata -> isFSharpInterfaceTy g ty let isClassTy g ty = @@ -1616,25 +1718,25 @@ let isClassTy g ty = #if !NO_EXTENSIONTYPING | ProvidedTypeMetadata info -> info.IsClass #endif - | ILTypeMetadata (TILObjectReprData(_, _, td)) -> (td.tdKind = ILTypeDefKind.Class) + | ILTypeMetadata (TILObjectReprData(_, _, td)) -> td.IsClass | FSharpOrArrayOrByrefOrTupleOrExnTypeMetadata -> isFSharpClassTy g ty let isStructOrEnumTyconTy g ty = match tryDestAppTy g ty with - | Some tcref -> tcref.Deref.IsStructOrEnumTycon + | ValueSome tcref -> tcref.Deref.IsStructOrEnumTycon | _ -> false let isStructRecordOrUnionTyconTy g ty = match tryDestAppTy g ty with - | Some tcref -> tcref.Deref.IsStructRecordOrUnionTycon + | ValueSome tcref -> tcref.Deref.IsStructRecordOrUnionTycon | _ -> false let isStructTy g ty = match tryDestAppTy g ty with - | Some tcref -> + | ValueSome tcref -> let tycon = tcref.Deref tycon.IsStructRecordOrUnionTycon || tycon.IsStructOrEnumTycon - | _ -> false + | _ -> isStructTupleTy g ty let isRefTy g ty = not (isStructOrEnumTyconTy g ty) && @@ -1661,7 +1763,7 @@ let isRefTy g ty = let rec isUnmanagedTy g ty = let ty = stripTyEqnsAndMeasureEqns g ty match tryDestAppTy g ty with - | Some tcref -> + | ValueSome tcref -> let isEq tcref2 = tyconRefEq g tcref tcref2 if isEq g.nativeptr_tcr || isEq g.nativeint_tcr || isEq g.sbyte_tcr || isEq g.byte_tcr || @@ -1683,7 +1785,7 @@ let rec isUnmanagedTy g ty = | [] -> tycon.AllInstanceFieldsAsList |> List.forall (fun r -> isUnmanagedTy g r.rfield_type) | _ -> false // generic structs are never else false - | None -> + | ValueNone -> false let isInterfaceTycon x = @@ -1693,8 +1795,8 @@ let isInterfaceTyconRef (tcref: TyconRef) = isInterfaceTycon tcref.Deref let isEnumTy g ty = match tryDestAppTy g ty with - | None -> false - | Some tcref -> tcref.IsEnumTycon + | ValueNone -> false + | ValueSome tcref -> tcref.IsEnumTycon let actualReturnTyOfSlotSig parentTyInst methTyInst (TSlotSig(_, _, parentFormalTypars, methFormalTypars, _, formalRetTy)) = let methTyInst = mkTyparInst methFormalTypars methTyInst @@ -1779,6 +1881,10 @@ let emptyFreeTyvars = FreeTraitSolutions = emptyFreeLocals FreeTypars = emptyFreeTypars} +let isEmptyFreeTyvars ftyvs = + Zset.isEmpty ftyvs.FreeTypars && + Zset.isEmpty ftyvs.FreeTycons + let unionFreeTyvars fvs1 fvs2 = if fvs1 === emptyFreeTyvars then fvs2 else if fvs2 === emptyFreeTyvars then fvs1 else @@ -1883,7 +1989,7 @@ and accFreeInTyparConstraints opts cxs acc = and accFreeInTyparConstraint opts tpc acc = match tpc with - | TyparConstraint.CoercesTo(typ, _) -> accFreeInType opts typ acc + | TyparConstraint.CoercesTo(ty, _) -> accFreeInType opts ty acc | TyparConstraint.MayResolveMember (traitInfo, _) -> accFreeInTrait opts traitInfo acc | TyparConstraint.DefaultsTo(_, rty, _) -> accFreeInType opts rty acc | TyparConstraint.SimpleChoice(tys, _) -> accFreeInTypes opts tys acc @@ -1897,19 +2003,19 @@ and accFreeInTyparConstraint opts tpc acc = | TyparConstraint.IsUnmanaged _ | TyparConstraint.RequiresDefaultConstructor _ -> acc -and accFreeInTrait opts (TTrait(typs, _, _, argtys, rty, sln)) acc = +and accFreeInTrait opts (TTrait(tys, _, _, argtys, rty, sln)) acc = Option.foldBack (accFreeInTraitSln opts) sln.Value - (accFreeInTypes opts typs + (accFreeInTypes opts tys (accFreeInTypes opts argtys (Option.foldBack (accFreeInType opts) rty acc))) and accFreeInTraitSln opts sln acc = match sln with - | ILMethSln(typ, _, _, minst) -> - accFreeInType opts typ + | ILMethSln(ty, _, _, minst) -> + accFreeInType opts ty (accFreeInTypes opts minst acc) - | FSMethSln(typ, vref, minst) -> - accFreeInType opts typ + | FSMethSln(ty, vref, minst) -> + accFreeInType opts ty (accFreeValRefInTraitSln opts vref (accFreeInTypes opts minst acc)) | FSRecdFieldSln(tinst, _rfref, _isSet) -> @@ -1967,6 +2073,12 @@ let freeInVal opts v = accFreeInVal opts v emptyFreeTyvars let freeInTyparConstraints opts v = accFreeInTyparConstraints opts v emptyFreeTyvars let accFreeInTypars opts tps acc = List.foldBack (accFreeTyparRef opts) tps acc +let rec addFreeInModuleTy (mtyp:ModuleOrNamespaceType) acc = + QueueList.foldBack (typeOfVal >> accFreeInType CollectAllNoCaching) mtyp.AllValsAndMembers + (QueueList.foldBack (fun (mspec:ModuleOrNamespace) acc -> addFreeInModuleTy mspec.ModuleOrNamespaceType acc) mtyp.AllEntities acc) + +let freeInModuleTy mtyp = addFreeInModuleTy mtyp emptyFreeTyvars + //-------------------------------------------------------------------------- // Free in type, left-to-right order preserved. This is used to determine the @@ -1988,7 +2100,7 @@ and accFreeInTyparConstraintsLeftToRight g cxFlag thruFlag acc cxs = and accFreeInTyparConstraintLeftToRight g cxFlag thruFlag acc tpc = match tpc with - | TyparConstraint.CoercesTo(typ, _) -> accFreeInTypeLeftToRight g cxFlag thruFlag acc typ + | TyparConstraint.CoercesTo(ty, _) -> accFreeInTypeLeftToRight g cxFlag thruFlag acc ty | TyparConstraint.MayResolveMember (traitInfo, _) -> accFreeInTraitLeftToRight g cxFlag thruFlag acc traitInfo | TyparConstraint.DefaultsTo(_, rty, _) -> accFreeInTypeLeftToRight g cxFlag thruFlag acc rty | TyparConstraint.SimpleChoice(tys, _) -> accFreeInTypesLeftToRight g cxFlag thruFlag acc tys @@ -2002,8 +2114,8 @@ and accFreeInTyparConstraintLeftToRight g cxFlag thruFlag acc tpc = | TyparConstraint.IsReferenceType _ | TyparConstraint.RequiresDefaultConstructor _ -> acc -and accFreeInTraitLeftToRight g cxFlag thruFlag acc (TTrait(typs, _, _, argtys, rty, _)) = - let acc = accFreeInTypesLeftToRight g cxFlag thruFlag acc typs +and accFreeInTraitLeftToRight g cxFlag thruFlag acc (TTrait(tys, _, _, argtys, rty, _)) = + let acc = accFreeInTypesLeftToRight g cxFlag thruFlag acc tys let acc = accFreeInTypesLeftToRight g cxFlag thruFlag acc argtys let acc = Option.fold (accFreeInTypeLeftToRight g cxFlag thruFlag) acc rty acc @@ -2077,8 +2189,8 @@ let checkMemberVal membInfo arity m = let checkMemberValRef (vref:ValRef) = checkMemberVal vref.MemberInfo vref.ValReprInfo vref.Range -let GetTopValTypeInCompiledForm g topValInfo typ m = - let tps, paramArgInfos, rty, retInfo = GetTopValTypeInFSharpForm g topValInfo typ m +let GetTopValTypeInCompiledForm g topValInfo ty m = + let tps, paramArgInfos, rty, retInfo = GetTopValTypeInFSharpForm g topValInfo ty m // Eliminate lone single unit arguments let paramArgInfos = match paramArgInfos, topValInfo.ArgInfos with @@ -2103,8 +2215,8 @@ let GetTopValTypeInCompiledForm g topValInfo typ m = // This is used not only for the compiled form - it's also used for all type checking and object model // logic such as determining if abstract methods have been implemented or not, and how // many arguments the method takes etc. -let GetMemberTypeInMemberForm g memberFlags topValInfo typ m = - let tps, paramArgInfos, rty, retInfo = GetMemberTypeInFSharpForm g memberFlags topValInfo typ m +let GetMemberTypeInMemberForm g memberFlags topValInfo ty m = + let tps, paramArgInfos, rty, retInfo = GetMemberTypeInFSharpForm g memberFlags topValInfo ty m // Eliminate lone single unit arguments let paramArgInfos = match paramArgInfos, topValInfo.ArgInfos with @@ -2135,11 +2247,11 @@ let PartitionValTyparsForApparentEnclosingType g (v:Val) = | None -> error(InternalError("PartitionValTypars: not a top value", v.Range)) | Some arities -> let fullTypars, _ = destTopForallTy g arities v.Type - let parent = v.MemberApparentParent + let parent = v.MemberApparentEntity let parentTypars = parent.TyparsNoRange let nparentTypars = parentTypars.Length if nparentTypars <= fullTypars.Length then - let memberParentTypars, memberMethodTypars = List.chop nparentTypars fullTypars + let memberParentTypars, memberMethodTypars = List.splitAt nparentTypars fullTypars let memberToParentInst, tinst = mkTyparToTyparRenaming memberParentTypars parentTypars Some(parentTypars, memberParentTypars, memberMethodTypars, memberToParentInst, tinst) else None @@ -2247,7 +2359,7 @@ module PrettyTypes = let niceTypars = List.map2 newPrettyTypar tps names let tl, _tt = mkTyparToTyparRenaming tps niceTypars in let renaming = renaming @ tl - (tps, niceTypars) ||> List.iter2 (fun tp tpnice -> tpnice.FixupConstraints (instTyparConstraints renaming tp.Constraints)) ; + (tps, niceTypars) ||> List.iter2 (fun tp tpnice -> tpnice.SetConstraints (instTyparConstraints renaming tp.Constraints)) ; niceTypars, renaming // We choose names for type parameters from 'a'..'t' @@ -2256,7 +2368,7 @@ module PrettyTypes = // Finally, we skip any names already in use let NeedsPrettyTyparName (tp:Typar) = tp.IsCompilerGenerated && - tp.typar_il_name.IsNone && + tp.ILName.IsNone && (tp.typar_id.idText = unassignedTyparName) let PrettyTyparNames pred alreadyInUse tps = @@ -2348,7 +2460,7 @@ module PrettyTypes = // Badly formed code may instantiate rigid declared typars to types. // Hence we double check here that the thing is really a type variable - let safeDestAnyParTy orig g ty = match tryAnyParTy g ty with None -> orig | Some x -> x + let safeDestAnyParTy orig g ty = match tryAnyParTy g ty with ValueNone -> orig | ValueSome x -> x let tee f x = f x x let foldUnurriedArgInfos f z (x: UncurriedArgInfos) = List.fold (fold1Of2 f) z x @@ -2408,14 +2520,14 @@ module PrettyTypes = module SimplifyTypes = // CAREFUL! This function does NOT walk constraints - let rec foldTypeButNotConstraints f z typ = - let typ = stripTyparEqns typ - let z = f z typ - match typ with + let rec foldTypeButNotConstraints f z ty = + let ty = stripTyparEqns ty + let z = f z ty + match ty with | TType_forall (_, body) -> foldTypeButNotConstraints f z body | TType_app (_, tinst) -> List.fold (foldTypeButNotConstraints f) z tinst | TType_ucase (_, tinst) -> List.fold (foldTypeButNotConstraints f) z tinst - | TType_tuple (_, typs) -> List.fold (foldTypeButNotConstraints f) z typs + | TType_tuple (_, tys) -> List.fold (foldTypeButNotConstraints f) z tys | TType_fun (s, t) -> foldTypeButNotConstraints f (foldTypeButNotConstraints f z s) t | TType_var _ -> z | TType_measure _ -> z @@ -2424,9 +2536,9 @@ module SimplifyTypes = if Zmap.mem x m then Zmap.add x (1 + Zmap.find x m) m else Zmap.add x 1 m - let accTyparCounts z typ = + let accTyparCounts z ty = // Walk type to determine typars and their counts (for pprinting decisions) - foldTypeButNotConstraints (fun z typ -> match typ with | TType_var tp when tp.Rigidity = TyparRigidity.Rigid -> incM tp z | _ -> z) z typ + foldTypeButNotConstraints (fun z ty -> match ty with | TType_var tp when tp.Rigidity = TyparRigidity.Rigid -> incM tp z | _ -> z) z ty let emptyTyparCounts = Zmap.empty typarOrder @@ -2545,30 +2657,30 @@ let layoutOfPath p = let fullNameOfParentOfPubPath pp = match pp with - | PubPath([| _ |]) -> None - | pp -> Some(textOfPath pp.EnclosingPath) + | PubPath([| _ |]) -> ValueNone + | pp -> ValueSome(textOfPath pp.EnclosingPath) let fullNameOfParentOfPubPathAsLayout pp = match pp with - | PubPath([| _ |]) -> None - | pp -> Some(layoutOfPath (Array.toList pp.EnclosingPath)) + | PubPath([| _ |]) -> ValueNone + | pp -> ValueSome(layoutOfPath (Array.toList pp.EnclosingPath)) let fullNameOfPubPath (PubPath(p)) = textOfPath p let fullNameOfPubPathAsLayout (PubPath(p)) = layoutOfPath (Array.toList p) let fullNameOfParentOfNonLocalEntityRef (nlr: NonLocalEntityRef) = - if nlr.Path.Length < 2 then None - else Some (textOfPath nlr.EnclosingMangledPath) // <--- BAD BAD BAD: this is a mangled path. This is wrong for nested modules + if nlr.Path.Length < 2 then ValueNone + else ValueSome (textOfPath nlr.EnclosingMangledPath) // <--- BAD BAD BAD: this is a mangled path. This is wrong for nested modules let fullNameOfParentOfNonLocalEntityRefAsLayout (nlr: NonLocalEntityRef) = - if nlr.Path.Length < 2 then None - else Some (layoutOfPath (List.ofArray nlr.EnclosingMangledPath)) // <--- BAD BAD BAD: this is a mangled path. This is wrong for nested modules + if nlr.Path.Length < 2 then ValueNone + else ValueSome (layoutOfPath (List.ofArray nlr.EnclosingMangledPath)) // <--- BAD BAD BAD: this is a mangled path. This is wrong for nested modules let fullNameOfParentOfEntityRef eref = match eref with | ERefLocal x -> match x.PublicPath with - | None -> None + | None -> ValueNone | Some ppath -> fullNameOfParentOfPubPath ppath | ERefNonLocal nlr -> fullNameOfParentOfNonLocalEntityRef nlr @@ -2576,14 +2688,14 @@ let fullNameOfParentOfEntityRefAsLayout eref = match eref with | ERefLocal x -> match x.PublicPath with - | None -> None + | None -> ValueNone | Some ppath -> fullNameOfParentOfPubPathAsLayout ppath | ERefNonLocal nlr -> fullNameOfParentOfNonLocalEntityRefAsLayout nlr let fullNameOfEntityRef nmF xref = - match fullNameOfParentOfEntityRef xref with - | None -> nmF xref - | Some pathText -> pathText +.+ nmF xref + match fullNameOfParentOfEntityRef xref with + | ValueNone -> nmF xref + | ValueSome pathText -> pathText +.+ nmF xref let tagEntityRefName (xref: EntityRef) name = if xref.IsNamespace then tagNamespace name @@ -2605,26 +2717,26 @@ let fullNameOfEntityRefAsLayout nmF (xref: EntityRef) = |> mkNav xref.DefinitionRange |> wordL match fullNameOfParentOfEntityRefAsLayout xref with - | None -> navigableText - | Some pathText -> pathText ^^ SepL.dot ^^ navigableText + | ValueNone -> navigableText + | ValueSome pathText -> pathText ^^ SepL.dot ^^ navigableText let fullNameOfParentOfValRef vref = match vref with | VRefLocal x -> match x.PublicPath with - | None -> None - | Some (ValPubPath(pp, _)) -> Some(fullNameOfPubPath pp) + | None -> ValueNone + | Some (ValPubPath(pp, _)) -> ValueSome(fullNameOfPubPath pp) | VRefNonLocal nlr -> - Some (fullNameOfEntityRef (fun (x:EntityRef) -> x.DemangledModuleOrNamespaceName) nlr.EnclosingEntity) + ValueSome (fullNameOfEntityRef (fun (x:EntityRef) -> x.DemangledModuleOrNamespaceName) nlr.EnclosingEntity) let fullNameOfParentOfValRefAsLayout vref = match vref with | VRefLocal x -> match x.PublicPath with - | None -> None - | Some (ValPubPath(pp, _)) -> Some(fullNameOfPubPathAsLayout pp) + | None -> ValueNone + | Some (ValPubPath(pp, _)) -> ValueSome(fullNameOfPubPathAsLayout pp) | VRefNonLocal nlr -> - Some (fullNameOfEntityRefAsLayout (fun (x:EntityRef) -> x.DemangledModuleOrNamespaceName) nlr.EnclosingEntity) + ValueSome (fullNameOfEntityRefAsLayout (fun (x:EntityRef) -> x.DemangledModuleOrNamespaceName) nlr.EnclosingEntity) let fullDisplayTextOfParentOfModRef r = fullNameOfParentOfEntityRef r @@ -2637,12 +2749,12 @@ let fullDisplayTextOfExnRefAsLayout r = fullNameOfEntityRefAsLayout (fun (tc:Ty let fullDisplayTextOfUnionCaseRef (ucref:UnionCaseRef) = fullDisplayTextOfTyconRef ucref.TyconRef +.+ ucref.CaseName let fullDisplayTextOfRecdFieldRef (rfref:RecdFieldRef) = fullDisplayTextOfTyconRef rfref.TyconRef +.+ rfref.FieldName -let fullDisplayTextOfValRef (vref:ValRef) = +let fullDisplayTextOfValRef (vref:ValRef) = match fullNameOfParentOfValRef vref with - | None -> vref.DisplayName - | Some pathText -> pathText +.+ vref.DisplayName + | ValueNone -> vref.DisplayName + | ValueSome pathText -> pathText +.+ vref.DisplayName -let fullDisplayTextOfValRefAsLayout (vref:ValRef) = +let fullDisplayTextOfValRefAsLayout (vref:ValRef) = let n = match vref.MemberInfo with | None -> @@ -2657,8 +2769,8 @@ let fullDisplayTextOfValRefAsLayout (vref:ValRef) = | MemberKind.Constructor -> tagMethod vref.DisplayName | MemberKind.Member -> tagMember vref.DisplayName match fullNameOfParentOfValRefAsLayout vref with - | None -> wordL n - | Some pathText -> + | ValueNone -> wordL n + | ValueSome pathText -> pathText ^^ SepL.dot ^^ wordL n //pathText +.+ vref.DisplayName @@ -2706,10 +2818,10 @@ let superOfTycon (g:TcGlobals) (tycon:Tycon) = // AbsIL view of attributes (we read these from .NET binaries) let isILAttribByName (tencl:string list, tname: string) (attr: ILAttribute) = - (attr.Method.EnclosingType.TypeSpec.Name = tname) && - (attr.Method.EnclosingType.TypeSpec.Enclosing = tencl) + (attr.Method.DeclaringType.TypeSpec.Name = tname) && + (attr.Method.DeclaringType.TypeSpec.Enclosing = tencl) -// AbsIL view of attributes (we read these from .NET binaries) +// AbsIL view of attributes (we read these from .NET binaries). The comparison is done by name. let isILAttrib (tref:ILTypeRef) (attr: ILAttribute) = isILAttribByName (tref.Enclosing, tref.Name) attr @@ -2717,18 +2829,12 @@ let isILAttrib (tref:ILTypeRef) (attr: ILAttribute) = // These linear iterations cost us a fair bit when there are lots of attributes // on imported types. However this is fairly rare and can also be solved by caching the // results of attribute lookups in the TAST -let HasILAttribute tref (attrs: ILAttributes) = Array.exists (isILAttrib tref) attrs.AsArray - -let HasILAttributeByName tname (attrs: ILAttributes) = Array.exists (isILAttribByName ([], tname)) attrs.AsArray +let HasILAttribute tref (attrs: ILAttributes) = + attrs.AsArray |> Array.exists (isILAttrib tref) let TryDecodeILAttribute (g:TcGlobals) tref (attrs: ILAttributes) = attrs.AsArray |> Array.tryPick (fun x -> if isILAttrib tref x then Some(decodeILAttribData g.ilg x) else None) -// This one is done by name to ensure the compiler doesn't take a dependency on dereferencing a type that only exists in .NET 3.5 -let ILThingHasExtensionAttribute (attrs : ILAttributes) = - attrs.AsArray - |> Array.exists (fun attr -> attr.Method.EnclosingType.TypeSpec.Name = "System.Runtime.CompilerServices.ExtensionAttribute") - // F# view of attributes (these get converted to AbsIL attributes in ilxgen) let IsMatchingFSharpAttribute g (AttribInfo(_, tcref)) (Attrib(tcref2, _, _, _, _, _, _)) = tyconRefEq g tcref tcref2 let HasFSharpAttribute g tref attrs = List.exists (IsMatchingFSharpAttribute g tref) attrs @@ -2836,15 +2942,52 @@ let TyconRefHasAttribute g m attribSpec tcref = (fun _ -> Some ()) |> Option.isSome +let isByrefTyconRef (g: TcGlobals) (tcref: TyconRef) = + (g.byref_tcr.CanDeref && tyconRefEq g g.byref_tcr tcref) || + (g.byref2_tcr.CanDeref && tyconRefEq g g.byref2_tcr tcref) || + (g.inref_tcr.CanDeref && tyconRefEq g g.inref_tcr tcref) || + (g.outref_tcr.CanDeref && tyconRefEq g g.outref_tcr tcref) || + tyconRefEqOpt g g.system_TypedReference_tcref tcref || + tyconRefEqOpt g g.system_ArgIterator_tcref tcref || + tyconRefEqOpt g g.system_RuntimeArgumentHandle_tcref tcref + +// See RFC FS-1053.md +let isByrefLikeTyconRef (g: TcGlobals) m (tcref: TyconRef) = + tcref.CanDeref && + match tcref.TryIsByRefLike with + | Some res -> res + | None -> + let res = + isByrefTyconRef g tcref || + TyconRefHasAttribute g m g.attrib_IsByRefLikeAttribute tcref + tcref.SetIsByRefLike res + res + +let isSpanLikeTyconRef g m tcref = + isByrefLikeTyconRef g m tcref && + not (isByrefTyconRef g tcref) + +let isByrefLikeTy g m ty = + ty |> stripTyEqns g |> (function TType_app(tcref, _) -> isByrefLikeTyconRef g m tcref | _ -> false) + +let isSpanLikeTy g m ty = + isByrefLikeTy g m ty && + not (isByrefTy g ty) + //------------------------------------------------------------------------- // List and reference types... //------------------------------------------------------------------------- let destByrefTy g ty = match ty |> stripTyEqns g with - | TType_app(tcref, [x]) when tyconRefEq g g.byref_tcr tcref -> x + | TType_app(tcref, [x; _]) when g.byref2_tcr.CanDeref && tyconRefEq g g.byref2_tcr tcref -> x // Check sufficient FSharp.Core + | TType_app(tcref, [x]) when tyconRefEq g g.byref_tcr tcref -> x // all others | _ -> failwith "destByrefTy: not a byref type" +let (|ByrefTy|_|) g ty = + // Because of byref = byref2 it is better to write this using is/dest + if isByrefTy g ty then Some (destByrefTy g ty) else None + let destNativePtrTy g ty = match ty |> stripTyEqns g with | TType_app(tcref, [x]) when tyconRefEq g g.nativeptr_tcr tcref -> x @@ -2852,8 +2995,8 @@ let destNativePtrTy g ty = let isRefCellTy g ty = match tryDestAppTy g ty with - | None -> false - | Some tcref -> tyconRefEq g g.refcell_tcr_canon tcref + | ValueNone -> false + | ValueSome tcref -> tyconRefEq g g.refcell_tcr_canon tcref let destRefCellTy g ty = match ty |> stripTyEqns g with @@ -2877,23 +3020,23 @@ let mkListTy (g:TcGlobals) ty = TType_app (g.list_tcr_nice, [ty]) let isOptionTy (g:TcGlobals) ty = match tryDestAppTy g ty with - | None -> false - | Some tcref -> tyconRefEq g g.option_tcr_canon tcref + | ValueNone -> false + | ValueSome tcref -> tyconRefEq g g.option_tcr_canon tcref let tryDestOptionTy g ty = match argsOfAppTy g ty with - | [ty1] when isOptionTy g ty -> Some ty1 - | _ -> None + | [ty1] when isOptionTy g ty -> ValueSome ty1 + | _ -> ValueNone let destOptionTy g ty = match tryDestOptionTy g ty with - | Some ty -> ty - | None -> failwith "destOptionTy: not an option type" + | ValueSome ty -> ty + | ValueNone -> failwith "destOptionTy: not an option type" let isLinqExpressionTy g ty = match tryDestAppTy g ty with - | None -> false - | Some tcref -> tyconRefEq g g.system_LinqExpression_tcref tcref + | ValueNone -> false + | ValueSome tcref -> tyconRefEq g g.system_LinqExpression_tcref tcref let tryDestLinqExpressionTy g ty = match argsOfAppTy g ty with @@ -3017,7 +3160,7 @@ module DebugPrint = begin let lvalopL x = match x with - | LGetAddr -> wordL (tagText "LGetAddr") + | LAddrOf readonly -> wordL (tagText (sprintf "LAddrOf(%b)" readonly)) | LByrefGet -> wordL (tagText "LByrefGet") | LSet -> wordL (tagText "LSet") | LByrefSet -> wordL (tagText "LByrefSet") @@ -3039,9 +3182,9 @@ module DebugPrint = begin let layoutTyconRef (tc:TyconRef) = wordL (tagText tc.DisplayNameWithStaticParameters) |> stampL tc.Stamp - let rec auxTypeL env typ = auxTypeWrapL env false typ + let rec auxTypeL env ty = auxTypeWrapL env false ty - and auxTypeAtomL env typ = auxTypeWrapL env true typ + and auxTypeAtomL env ty = auxTypeWrapL env true ty and auxTyparsL env tcL prefix tinst = match tinst with @@ -3057,9 +3200,9 @@ module DebugPrint = begin else tupleL tinstL ^^ tcL - and auxTypeWrapL env isAtomic typ = + and auxTypeWrapL env isAtomic ty = let wrap x = bracketIfL isAtomic x in // wrap iff require atomic expr - match stripTyparEqns typ with + match stripTyparEqns ty with | TType_forall (typars, rty) -> (leftL (tagText "!") ^^ layoutTyparDecls typars --- auxTypeL env rty) |> wrap | TType_ucase (UCRef(tcref, _), tinst) @@ -3067,7 +3210,7 @@ module DebugPrint = begin let prefix = tcref.IsPrefixDisplay let tcL = layoutTyconRef tcref auxTyparsL env tcL prefix tinst - | TType_tuple (_tupInfo, typs) -> sepListL (wordL (tagText "*")) (List.map (auxTypeAtomL env) typs) |> wrap + | TType_tuple (_tupInfo, tys) -> sepListL (wordL (tagText "*")) (List.map (auxTypeAtomL env) tys) |> wrap | TType_fun (f, x) -> ((auxTypeAtomL env f ^^ wordL (tagText "->")) --- auxTypeL env x) |> wrap | TType_var typar -> auxTyparWrapL env isAtomic typar | TType_measure unt -> @@ -3080,7 +3223,7 @@ module DebugPrint = begin let sortCons (cs:(TyconRef * Rational) list) = cs |> List.sortBy (fun (c, _) -> c.DisplayName) let negvs, posvs = ListMeasureVarOccsWithNonZeroExponents unt |> sortVars |> List.partition (fun (_, e) -> SignRational e < 0) let negcs, poscs = ListMeasureConOccsWithNonZeroExponents g false unt |> sortCons |> List.partition (fun (_, e) -> SignRational e < 0) - let unparL (uv:Typar) = wordL (tagText ("'" ^ uv.DisplayName)) + let unparL (uv:Typar) = wordL (tagText ("'" + uv.DisplayName)) let unconL tc = layoutTyconRef tc let rationalL e = wordL (tagText(RationalToString e)) let measureToPowerL x e = if e = OneRational then x else x -- wordL (tagText "^") -- rationalL e @@ -3112,11 +3255,11 @@ module DebugPrint = begin let varL = tpL |> stampL typar.Stamp match Zmap.tryFind typar env.inplaceConstraints with - | Some (typarConstrTyp) -> + | Some (typarConstraintTy) -> if Zset.contains typar env.singletons then - leftL (tagText "#") ^^ auxTyparConstraintTypL env typarConstrTyp + leftL (tagText "#") ^^ auxTyparConstraintTypL env typarConstraintTy else - (varL ^^ sepL (tagText ":>") ^^ auxTyparConstraintTypL env typarConstrTyp) |> wrap + (varL ^^ sepL (tagText ":>") ^^ auxTyparConstraintTypL env typarConstraintTy) |> wrap | _ -> varL and auxTypar2L env typar = auxTyparWrapL env false typar @@ -3145,8 +3288,8 @@ module DebugPrint = begin and auxTyparConstraintL env (tp, tpc) = let constraintPrefix l = auxTypar2L env tp ^^ wordL (tagText ":") ^^ l match tpc with - | TyparConstraint.CoercesTo(typarConstrTyp, _) -> - auxTypar2L env tp ^^ wordL (tagText ":>") --- auxTyparConstraintTypL env typarConstrTyp + | TyparConstraint.CoercesTo(typarConstraintTy, _) -> + auxTypar2L env tp ^^ wordL (tagText ":>") --- auxTyparConstraintTypL env typarConstraintTy | TyparConstraint.MayResolveMember(traitInfo, _) -> auxTypar2L env tp ^^ wordL (tagText ":") --- auxTraitL env traitInfo | TyparConstraint.DefaultsTo(_, ty, _) -> @@ -3242,18 +3385,18 @@ module DebugPrint = begin ^^ wordL (tagText ":")) -- typeL v.Type - let tslotparamL(TSlotParam(nmOpt, typ, inFlag, outFlag, _, _)) = - (optionL (tagText >> wordL) nmOpt) ^^ wordL(tagText ":") ^^ typeL typ ^^ (if inFlag then wordL(tagText "[in]") else emptyL) ^^ (if outFlag then wordL(tagText "[out]") else emptyL) ^^ (if inFlag then wordL(tagText "[opt]") else emptyL) + let tslotparamL(TSlotParam(nmOpt, ty, inFlag, outFlag, _, _)) = + (optionL (tagText >> wordL) nmOpt) ^^ wordL(tagText ":") ^^ typeL ty ^^ (if inFlag then wordL(tagText "[in]") else emptyL) ^^ (if outFlag then wordL(tagText "[out]") else emptyL) ^^ (if inFlag then wordL(tagText "[opt]") else emptyL) let slotSigL (slotsig:SlotSig) = #if DEBUG - let (TSlotSig(nm, typ, tps1, tps2, pms, rty)) = slotsig + let (TSlotSig(nm, ty, tps1, tps2, pms, rty)) = slotsig match !global_g with | None -> wordL(tagText "") | Some g -> let rty = GetFSharpViewOfReturnType g rty - (wordL(tagText "slot") --- (wordL (tagText nm)) ^^ wordL(tagText "@") ^^ typeL typ) -- + (wordL(tagText "slot") --- (wordL (tagText nm)) ^^ wordL(tagText "@") ^^ typeL ty) -- (wordL(tagText "LAM") --- spaceListL (List.map typarL tps1) ^^ rightL(tagText ".")) --- (wordL(tagText "LAM") --- spaceListL (List.map typarL tps2) ^^ rightL(tagText ".")) --- (commaListL (List.map (List.map tslotparamL >> tupleL) pms)) ^^ (wordL(tagText "-> ")) --- (typeL rty) @@ -3494,22 +3637,22 @@ module DebugPrint = begin (atomL rx ^^ rightL(tagText ".#") ^^ recdFieldRefL rf) | Expr.Op (TOp.ValFieldGet rf, _, [], _) -> recdFieldRefL rf - | Expr.Op (TOp.ValFieldGetAddr rf, _, [rx], _) -> + | Expr.Op (TOp.ValFieldGetAddr (rf, _), _, [rx], _) -> leftL(tagText "&") ^^ bracketL (atomL rx ^^ rightL(tagText ".!") ^^ recdFieldRefL rf) - | Expr.Op (TOp.ValFieldGetAddr rf, _, [], _) -> + | Expr.Op (TOp.ValFieldGetAddr (rf, _), _, [], _) -> leftL(tagText "&") ^^ (recdFieldRefL rf) | Expr.Op (TOp.UnionCaseTagGet tycr, _, [x], _) -> - wordL (tagText ("#" ^ tycr.LogicalName ^ ".tag")) ^^ atomL x + wordL (tagText ("#" + tycr.LogicalName + ".tag")) ^^ atomL x | Expr.Op (TOp.UnionCaseProof c, _, [x], _) -> - wordL (tagText ("#" ^ c.CaseName^ ".cast")) ^^ atomL x + wordL (tagText ("#" + c.CaseName + ".cast")) ^^ atomL x | Expr.Op (TOp.UnionCaseFieldGet (c, i), _, [x], _) -> - wordL (tagText ("#" ^ c.CaseName ^ "." ^ string i)) --- atomL x + wordL (tagText ("#" + c.CaseName + "." + string i)) --- atomL x | Expr.Op (TOp.UnionCaseFieldSet (c, i), _, [x;y], _) -> - ((atomL x --- (rightL (tagText ("#" ^ c.CaseName ^ "." ^ string i)))) ^^ wordL(tagText ":=")) --- exprL y + ((atomL x --- (rightL (tagText ("#" + c.CaseName + "." + string i)))) ^^ wordL(tagText ":=")) --- exprL y | Expr.Op (TOp.TupleFieldGet (_, i), _, [x], _) -> - wordL (tagText ("#" ^ string i)) --- atomL x - | Expr.Op (TOp.Coerce, [typ;_], [x], _) -> - atomL x --- (wordL(tagText ":>") ^^ typeL typ) + wordL (tagText ("#" + string i)) --- atomL x + | Expr.Op (TOp.Coerce, [ty;_], [x], _) -> + atomL x --- (wordL(tagText ":>") ^^ typeL ty) | Expr.Op (TOp.Reraise, [_], [], _) -> wordL(tagText "Rethrow!") | Expr.Op (TOp.ILAsm (a, tys), tyargs, args, _) -> @@ -3521,7 +3664,7 @@ module DebugPrint = begin (lvalopL lvop ^^ valRefL vr --- bracketL (commaListL (List.map atomL args))) |> wrap | Expr.Op (TOp.ILCall (_isVirtCall, _isProtectedCall, _valu, _isNewObjCall, _valUseFlags, _isProperty, _noTailCall, ilMethRef, tinst, minst, _tys), tyargs, args, _) -> let meth = ilMethRef.Name - wordL(tagText "ILCall") ^^ aboveListL [wordL(tagText "meth ") --- wordL (tagText ilMethRef.EnclosingTypeRef.FullName) ^^ sepL(tagText ".") ^^ wordL (tagText meth); + wordL(tagText "ILCall") ^^ aboveListL [wordL(tagText "meth ") --- wordL (tagText ilMethRef.DeclaringTypeRef.FullName) ^^ sepL(tagText ".") ^^ wordL (tagText meth); wordL(tagText "tinst ") --- listL typeL tinst; wordL(tagText "minst ") --- listL typeL minst; wordL(tagText "tyargs") --- listL typeL tyargs; @@ -3539,7 +3682,7 @@ module DebugPrint = begin | Expr.Op (TOp.Bytes _, _ , _ , _) -> wordL(tagText "bytes++") | Expr.Op (TOp.UInt16s _, _ , _ , _) -> wordL(tagText "uint16++") - | Expr.Op (TOp.RefAddrGet, _tyargs, _args, _) -> wordL(tagText "GetRefLVal...") + | Expr.Op (TOp.RefAddrGet _, _tyargs, _args, _) -> wordL(tagText "GetRefLVal...") | Expr.Op (TOp.TraitCall _, _tyargs, _args, _) -> wordL(tagText "traitcall...") | Expr.Op (TOp.ExnFieldGet _, _tyargs, _args, _) -> wordL(tagText "TOp.ExnFieldGet...") | Expr.Op (TOp.ExnFieldSet _, _tyargs, _args, _) -> wordL(tagText "TOp.ExnFieldSet...") @@ -3547,8 +3690,8 @@ module DebugPrint = begin | Expr.Op (TOp.TryCatch _, _tyargs, _args, _) -> wordL(tagText "TOp.TryCatch...") | Expr.Op (_, _tys, args, _) -> wordL(tagText "Expr.Op ...") ^^ bracketL (commaListL (List.map atomL args)) | Expr.Quote (a, _, _, _, _) -> leftL(tagText "<@") ^^ atomL a ^^ rightL(tagText "@>") - | Expr.Obj (_lambdaId, typ, basev, ccall, overrides, iimpls, _) -> - wordL(tagText "OBJ:") ^^ aboveListL [typeL typ; + | Expr.Obj (_lambdaId, ty, basev, ccall, overrides, iimpls, _) -> + wordL(tagText "OBJ:") ^^ aboveListL [typeL ty; exprL ccall; optionL vspecAtBindL basev; aboveListL (List.map overrideL overrides); @@ -3626,7 +3769,7 @@ module DebugPrint = begin | (DecisionTreeTest.ArrayLength (n, ty)) -> wordL(tagText "length") ^^ intL n ^^ typeL ty | (DecisionTreeTest.Const c ) -> wordL(tagText "is") ^^ constL c | (DecisionTreeTest.IsNull ) -> wordL(tagText "isnull") - | (DecisionTreeTest.IsInst (_, typ) ) -> wordL(tagText "isinst") ^^ typeL typ + | (DecisionTreeTest.IsInst (_, ty) ) -> wordL(tagText "isinst") ^^ typeL ty | (DecisionTreeTest.ActivePatternCase (exp, _, _, _, _)) -> wordL(tagText "query") ^^ exprL exp and targetL i (TTarget (argvs, body, _)) = leftL(tagText "T") ^^ intL i ^^ tupleL (flatValsL argvs) ^^ rightL(tagText ":") --- exprL body @@ -3638,7 +3781,7 @@ module DebugPrint = begin (wordL(tagText "meth-lam") --- tupleL (List.map (List.map vspecAtBindL >> tupleL) vs) ^^ rightL(tagText ".")) --- (atomL e) and overrideL tmeth = wordL(tagText "with") ^^ tmethodL tmeth - and iimplL (typ, tmeths) = wordL(tagText "impl") ^^ aboveListL (typeL typ :: List.map tmethodL tmeths) + and iimplL (ty, tmeths) = wordL(tagText "impl") ^^ aboveListL (typeL ty :: List.map tmethodL tmeths) let showType x = Layout.showL (typeL x) let showExpr x = Layout.showL (exprL x) @@ -3666,6 +3809,7 @@ let wrapModuleOrNamespaceExprInNamespace (id :Ident) cpath mexpr = // cleanup: make this a property let SigTypeOfImplFile (TImplFile(_, _, mexpr, _, _)) = mexpr.Type + //-------------------------------------------------------------------------- // Data structures representing what gets hidden and what gets remapped (i.e. renamed or alpha-converted) // when a module signature is applied to a module. @@ -3763,13 +3907,14 @@ let accSubEntityRemap (msigty:ModuleOrNamespaceType) (entity:Entity) (mrpi, mhi) (mrpi, mhi) let valLinkageAEquiv g aenv (v1:Val) (v2:Val) = - (v1.LinkagePartialKey = v2.LinkagePartialKey) && + (v1.GetLinkagePartialKey() = v2.GetLinkagePartialKey()) && (if v1.IsMember && v2.IsMember then typeAEquivAux EraseAll g aenv v1.Type v2.Type else true) let accValRemap g aenv (msigty:ModuleOrNamespaceType) (implVal:Val) (mrpi, mhi) = + let implValKey = implVal.GetLinkagePartialKey() let sigValOpt = msigty.AllValsAndMembersByPartialLinkageKey - |> MultiMap.find implVal.LinkagePartialKey + |> MultiMap.find implValKey |> List.tryFind (fun sigVal -> valLinkageAEquiv g aenv implVal sigVal) let vref = mkLocalValRef implVal @@ -4194,11 +4339,11 @@ and accFreeInExprNonLinear opts x acc = unionFreeVars (freeVarsCacheCompute opts cache (fun () -> List.foldBack (bindLhs opts) binds (List.foldBack (accBindRhs opts) binds (freeInExpr opts e)))) acc | Expr.Let _ -> failwith "unreachable - linear expr" - | Expr.Obj (_, typ, basev, basecall, overrides, iimpls, _) -> + | Expr.Obj (_, ty, basev, basecall, overrides, iimpls, _) -> unionFreeVars (boundProtect (Option.foldBack (boundLocalVal opts) basev - (accFreeVarsInTy opts typ + (accFreeVarsInTy opts ty (accFreeInExpr opts basecall (accFreeInMethods opts overrides (List.foldBack (accFreeInInterfaceImpl opts) iimpls emptyFreeVars)))))) @@ -4260,7 +4405,7 @@ and accFreeInOp opts op acc = | TOp.TryFinally _ | TOp.For _ | TOp.Coerce - | TOp.RefAddrGet + | TOp.RefAddrGet _ | TOp.Array | TOp.While _ | TOp.Goto _ | TOp.Label _ | TOp.Return @@ -4273,7 +4418,7 @@ and accFreeInOp opts op acc = // Things containing just a union case reference | TOp.UnionCaseProof cr | TOp.UnionCase cr - | TOp.UnionCaseFieldGetAddr (cr, _) + | TOp.UnionCaseFieldGetAddr (cr, _, _) | TOp.UnionCaseFieldGet (cr, _) | TOp.UnionCaseFieldSet (cr, _) -> accFreeUnionCaseRef opts cr acc @@ -4283,7 +4428,7 @@ and accFreeInOp opts op acc = | TOp.ExnFieldSet (ecr, _) -> accFreeExnRef ecr acc | TOp.ValFieldGet fr - | TOp.ValFieldGetAddr fr + | TOp.ValFieldGetAddr (fr, _) | TOp.ValFieldSet fr -> accFreeRecdFieldRef opts fr acc | TOp.Recd (kind, tcr) -> @@ -4325,7 +4470,7 @@ and accFreeInExprs opts (es: Exprs) acc = // tailcall - e.g. Cons(x, Cons(x2, .......Cons(x1000000, Nil))) and [| x1; .... ; x1000000 |] accFreeInExprs opts t acc -and accFreeInSlotSig opts (TSlotSig(_, typ, _, _, _, _)) acc = accFreeVarsInTy opts typ acc +and accFreeInSlotSig opts (TSlotSig(_, ty, _, _, _, _)) acc = accFreeVarsInTy opts ty acc and freeInDecisionTree opts e = accFreeInDecisionTree opts e emptyFreeVars and freeInExpr opts e = accFreeInExpr opts e emptyFreeVars @@ -4440,9 +4585,9 @@ let InferArityOfExprBinding g allowTypeDirectedDetupling (v:Val) e = // implementations //------------------------------------------------------------------------- -let underlyingTypeOfEnumTy (g: TcGlobals) typ = - assert(isEnumTy g typ) - match metadataOfTy g typ with +let underlyingTypeOfEnumTy (g: TcGlobals) ty = + assert(isEnumTy g ty) + match metadataOfTy g ty with #if !NO_EXTENSIONTYPING | ProvidedTypeMetadata info -> info.UnderlyingTypeOfEnum() #endif @@ -4465,7 +4610,7 @@ let underlyingTypeOfEnumTy (g: TcGlobals) typ = | "System.Boolean" -> g.bool_ty | _ -> g.int32_ty | FSharpOrArrayOrByrefOrTupleOrExnTypeMetadata -> - let tycon = (tcrefOfAppTy g typ).Deref + let tycon = (tcrefOfAppTy g ty).Deref match tycon.GetFieldByName "value__" with | Some rf -> rf.FormalType | None -> error(InternalError("no 'value__' field found for enumeration type "^tycon.LogicalName, tycon.Range)) @@ -4521,8 +4666,8 @@ let decideStaticOptimizationConstraint g c = | TTyconIsStruct a -> let a = normalizeEnumTy g (stripTyEqnsAndMeasureEqns g a) match tryDestAppTy g a with - | Some tcref1 -> if tcref1.IsStructOrEnumTycon then StaticOptimizationAnswer.Yes else StaticOptimizationAnswer.No - | None -> StaticOptimizationAnswer.Unknown + | ValueSome tcref1 -> if tcref1.IsStructOrEnumTycon then StaticOptimizationAnswer.Yes else StaticOptimizationAnswer.No + | ValueNone -> StaticOptimizationAnswer.Unknown let rec DecideStaticOptimizations g cs = match cs with @@ -4606,14 +4751,23 @@ and remapValReprInfo g tmenv (ValReprInfo(tpNames, arginfosl, retInfo)) = and remapValData g tmenv (d: ValData) = let ty = d.val_type - let topValInfo = d.val_repr_info - let ty' = ty |> remapPossibleForallTy g tmenv + let topValInfo = d.ValReprInfo + let tyR = ty |> remapPossibleForallTy g tmenv + let declaringEntityR = d.DeclaringEntity |> remapParentRef tmenv + let reprInfoR = d.ValReprInfo |> Option.map (remapValReprInfo g tmenv) + let memberInfoR = d.MemberInfo |> Option.map (remapMemberInfo g d.val_range topValInfo ty tyR tmenv) + let attribsR = d.Attribs |> remapAttribs g tmenv { d with - val_type = ty'; - val_actual_parent = d.val_actual_parent |> remapParentRef tmenv; - val_repr_info = d.val_repr_info |> Option.map (remapValReprInfo g tmenv); - val_member_info = d.val_member_info |> Option.map (remapMemberInfo g d.val_range topValInfo ty ty' tmenv); - val_attribs = d.val_attribs |> remapAttribs g tmenv } + val_type = tyR + val_opt_data = + match d.val_opt_data with + | Some dd -> + Some { dd with + val_declaring_entity = declaringEntityR + val_repr_info = reprInfoR + val_member_info = memberInfoR + val_attribs = attribsR } + | None -> None } and remapParentRef tyenv p = match p with @@ -4688,9 +4842,9 @@ and remapExpr (g: TcGlobals) (compgen:ValCopyFlag) (tmenv:Remap) x = Expr.Quote (remapExpr g compgen tmenv a, {contents=Some(typeDefs, remapTypesAux tmenv argTypes, remapExprs g compgen tmenv argExprs, data)}, isFromQueryExpression, m, remapType tmenv ty) | Expr.Quote (a, {contents=None}, isFromQueryExpression, m, ty) -> Expr.Quote (remapExpr g (fixValCopyFlagForQuotations compgen) tmenv a, {contents=None}, isFromQueryExpression, m, remapType tmenv ty) - | Expr.Obj (_, typ, basev, basecall, overrides, iimpls, m) -> + | Expr.Obj (_, ty, basev, basecall, overrides, iimpls, m) -> let basev', tmenvinner = Option.mapFold (copyAndRemapAndBindVal g compgen) tmenv basev - mkObjExpr(remapType tmenv typ, basev', + mkObjExpr(remapType tmenv ty, basev', remapExpr g compgen tmenv basecall, List.map (remapMethod g compgen tmenvinner) overrides, List.map (remapInterfaceImpl g compgen tmenvinner) iimpls, m) @@ -4700,23 +4854,23 @@ and remapExpr (g: TcGlobals) (compgen:ValCopyFlag) (tmenv:Remap) x = // of a temporary local, e.g. // &(E.RF) --> let mutable v = E.RF in &v - | Expr.Op (TOp.ValFieldGetAddr rfref, tinst, [arg], m) when + | Expr.Op (TOp.ValFieldGetAddr (rfref, readonly), tinst, [arg], m) when not rfref.RecdField.IsMutable && not (entityRefInThisAssembly g.compilingFslib rfref.TyconRef) -> let tinst = remapTypes tmenv tinst let arg = remapExpr g compgen tmenv arg let tmp, _ = mkMutableCompGenLocal m "copyOfStruct" (actualTyOfRecdFieldRef rfref tinst) - mkCompGenLet m tmp (mkRecdFieldGetViaExprAddr(arg, rfref, tinst, m)) (mkValAddr m (mkLocalValRef tmp)) + mkCompGenLet m tmp (mkRecdFieldGetViaExprAddr(arg, rfref, tinst, m)) (mkValAddr m readonly (mkLocalValRef tmp)) - | Expr.Op (TOp.UnionCaseFieldGetAddr (uref, cidx), tinst, [arg], m) when + | Expr.Op (TOp.UnionCaseFieldGetAddr (uref, cidx, readonly), tinst, [arg], m) when not (uref.FieldByIndex(cidx).IsMutable) && not (entityRefInThisAssembly g.compilingFslib uref.TyconRef) -> let tinst = remapTypes tmenv tinst let arg = remapExpr g compgen tmenv arg let tmp, _ = mkMutableCompGenLocal m "copyOfStruct" (actualTyOfUnionFieldRef uref cidx tinst) - mkCompGenLet m tmp (mkUnionCaseFieldGetProvenViaExprAddr(arg, uref, tinst, cidx, m)) (mkValAddr m (mkLocalValRef tmp)) + mkCompGenLet m tmp (mkUnionCaseFieldGetProvenViaExprAddr(arg, uref, tinst, cidx, m)) (mkValAddr m readonly (mkLocalValRef tmp)) | Expr.Op (op, tinst, args, m) -> let op' = remapOp tmenv op @@ -4786,8 +4940,9 @@ and remapOp tmenv op = | TOp.ExnFieldSet(ec, n) -> TOp.ExnFieldSet(remapTyconRef tmenv.tyconRefRemap ec, n) | TOp.ValFieldSet rfref -> TOp.ValFieldSet(remapRecdFieldRef tmenv.tyconRefRemap rfref) | TOp.ValFieldGet rfref -> TOp.ValFieldGet(remapRecdFieldRef tmenv.tyconRefRemap rfref) - | TOp.ValFieldGetAddr rfref -> TOp.ValFieldGetAddr(remapRecdFieldRef tmenv.tyconRefRemap rfref) + | TOp.ValFieldGetAddr (rfref, readonly) -> TOp.ValFieldGetAddr(remapRecdFieldRef tmenv.tyconRefRemap rfref, readonly) | TOp.UnionCaseFieldGet(ucref, n) -> TOp.UnionCaseFieldGet(remapUnionCaseRef tmenv.tyconRefRemap ucref, n) + | TOp.UnionCaseFieldGetAddr(ucref, n, readonly) -> TOp.UnionCaseFieldGetAddr(remapUnionCaseRef tmenv.tyconRefRemap ucref, n, readonly) | TOp.UnionCaseFieldSet(ucref, n) -> TOp.UnionCaseFieldSet(remapUnionCaseRef tmenv.tyconRefRemap ucref, n) | TOp.ILAsm (instrs, tys) -> let tys2 = remapTypes tmenv tys @@ -4928,7 +5083,7 @@ and remapMemberInfo g m topValInfo ty ty' tmenv x = let renaming, _ = mkTyparToTyparRenaming tpsOrig tps let tmenv = { tmenv with tpinst = tmenv.tpinst @ renaming } { x with - ApparentParent = x.ApparentParent |> remapTyconRef tmenv.tyconRefRemap ; + ApparentEnclosingEntity = x.ApparentEnclosingEntity |> remapTyconRef tmenv.tyconRefRemap ; ImplementedSlotSigs = x.ImplementedSlotSigs |> List.map (remapSlotSig (remapAttribs g tmenv) tmenv); } @@ -4995,14 +5150,19 @@ and copyAndRemapAndBindTyconsAndVals g compgen tmenv tycons vs = (tycons, tycons') ||> List.iter2 (fun tcd tcd' -> let tps', tmenvinner2 = tmenvCopyRemapAndBindTypars (remapAttribs g tmenvinner) tmenvinner (tcd.entity_typars.Force(tcd.entity_range)) - tcd'.entity_typars <- LazyWithContext.NotLazy tps'; - tcd'.entity_attribs <- tcd.entity_attribs |> remapAttribs g tmenvinner2; - tcd'.entity_tycon_repr <- tcd.entity_tycon_repr |> remapTyconRepr g tmenvinner2; - tcd'.entity_tycon_abbrev <- tcd.entity_tycon_abbrev |> Option.map (remapType tmenvinner2) ; - tcd'.entity_tycon_tcaug <- tcd.entity_tycon_tcaug |> remapTyconAug tmenvinner2 ; + tcd'.entity_typars <- LazyWithContext.NotLazy tps' + tcd'.entity_attribs <- tcd.entity_attribs |> remapAttribs g tmenvinner2 + tcd'.entity_tycon_repr <- tcd.entity_tycon_repr |> remapTyconRepr g tmenvinner2 + let typeAbbrevR = tcd.TypeAbbrev |> Option.map (remapType tmenvinner2) + tcd'.entity_tycon_tcaug <- tcd.entity_tycon_tcaug |> remapTyconAug tmenvinner2 tcd'.entity_modul_contents <- MaybeLazy.Strict (tcd.entity_modul_contents.Value - |> mapImmediateValsAndTycons lookupTycon lookupVal); - tcd'.entity_exn_info <- tcd.entity_exn_info |> remapTyconExnInfo g tmenvinner2) ; + |> mapImmediateValsAndTycons lookupTycon lookupVal) + let exnInfoR = tcd.ExceptionInfo |> remapTyconExnInfo g tmenvinner2 + match tcd'.entity_opt_data with + | Some optData -> tcd'.entity_opt_data <- Some { optData with entity_tycon_abbrev = typeAbbrevR; entity_exn_info = exnInfoR } + | _ -> + tcd'.SetTypeAbbrev typeAbbrevR + tcd'.SetExceptionInfo exnInfoR) tycons', vs', tmenvinner @@ -5047,12 +5207,12 @@ and allValsOfModDef mdef = | TMAbstract(ModuleOrNamespaceExprWithSig(mty, _, _)) -> yield! allValsOfModuleOrNamespaceTy mty } -and remapAndBindModExpr g compgen tmenv (ModuleOrNamespaceExprWithSig(mty, mdef, m)) = +and remapAndBindModuleOrNamespaceExprWithSig g compgen tmenv (ModuleOrNamespaceExprWithSig(mty, mdef, m)) = let mdef = copyAndRemapModDef g compgen tmenv mdef let mty, tmenv = copyAndRemapAndBindModTy g compgen tmenv mty ModuleOrNamespaceExprWithSig(mty, mdef, m), tmenv -and remapModExpr g compgen tmenv (ModuleOrNamespaceExprWithSig(mty, mdef, m)) = +and remapModuleOrNamespaceExprWithSig g compgen tmenv (ModuleOrNamespaceExprWithSig(mty, mdef, m)) = let mdef = copyAndRemapModDef g compgen tmenv mdef let mty = remapModTy g compgen tmenv mty ModuleOrNamespaceExprWithSig(mty, mdef, m) @@ -5084,7 +5244,7 @@ and remapAndRenameModDef g compgen tmenv mdef = let defs = remapAndRenameModDefs g compgen tmenv defs TMDefs defs | TMAbstract mexpr -> - let mexpr = remapModExpr g compgen tmenv mexpr + let mexpr = remapModuleOrNamespaceExprWithSig g compgen tmenv mexpr TMAbstract mexpr and remapAndRenameModBind g compgen tmenv x = @@ -5099,7 +5259,7 @@ and remapAndRenameModBind g compgen tmenv x = ModuleOrNamespaceBinding.Module(mspec, def) and remapImplFile g compgen tmenv mv = - mapAccImplFile (remapAndBindModExpr g compgen) tmenv mv + mapAccImplFile (remapAndBindModuleOrNamespaceExprWithSig g compgen) tmenv mv let copyModuleOrNamespaceType g compgen mtyp = copyAndRemapAndBindModTy g compgen Remap.Empty mtyp |> fst let copyExpr g compgen e = remapExpr g compgen Remap.Empty e @@ -5122,8 +5282,8 @@ let rec remarkExpr m x = | Expr.Match (_, _, pt, targets, _, ty) -> primMkMatch (NoSequencePointAtInvisibleBinding, m, remarkDecisionTree m pt, Array.map (fun (TTarget(vs, e, _)) ->TTarget(vs, remarkExpr m e, SuppressSequencePointAtTarget)) targets, m, ty) | Expr.Val (x, valUseFlags, _) -> Expr.Val (x, valUseFlags, m) | Expr.Quote (a, conv, isFromQueryExpression, _, ty) -> Expr.Quote (remarkExpr m a, conv, isFromQueryExpression, m, ty) - | Expr.Obj (n, typ, basev, basecall, overrides, iimpls, _) -> - Expr.Obj (n, typ, basev, remarkExpr m basecall, + | Expr.Obj (n, ty, basev, basecall, overrides, iimpls, _) -> + Expr.Obj (n, ty, basev, remarkExpr m basecall, List.map (remarkObjExprMethod m) overrides, List.map (remarkInterfaceImpl m) iimpls, m) | Expr.Op (op, tinst, args, _) -> @@ -5167,33 +5327,35 @@ and remarkBind m (TBind(v, repr, _)) = //-------------------------------------------------------------------------- -// Reference semantics? +// Mutability analysis //-------------------------------------------------------------------------- -let isRecdOrStructFieldAllocObservable (f:RecdField) = not f.IsStatic && f.IsMutable -let isUnionCaseAllocObservable (uc:UnionCase) = uc.FieldTable.FieldsByIndex |> Array.exists isRecdOrStructFieldAllocObservable -let isUnionCaseRefAllocObservable (uc:UnionCaseRef) = uc.UnionCase |> isUnionCaseAllocObservable +let isRecdOrStructFieldDefinitelyMutable (f:RecdField) = not f.IsStatic && f.IsMutable +let isUnionCaseDefinitelyMutable (uc:UnionCase) = uc.FieldTable.FieldsByIndex |> Array.exists isRecdOrStructFieldDefinitelyMutable +let isUnionCaseRefDefinitelyMutable (uc:UnionCaseRef) = uc.UnionCase |> isUnionCaseDefinitelyMutable -let isRecdOrUnionOrStructTyconAllocObservable (_g:TcGlobals) (tycon:Tycon) = +/// This is an incomplete check for .NET struct types. Returning 'false' doesn't mean the thing is immutable. +let isRecdOrUnionOrStructTyconRefDefinitelyMutable (tcref: TyconRef) = + let tycon = tcref.Deref if tycon.IsUnionTycon then - tycon.UnionCasesArray |> Array.exists isUnionCaseAllocObservable + tycon.UnionCasesArray |> Array.exists isUnionCaseDefinitelyMutable elif tycon.IsRecordTycon || tycon.IsStructOrEnumTycon then - tycon.AllFieldsArray |> Array.exists isRecdOrStructFieldAllocObservable + // Note: This only looks at the F# fields, causing oddities. + // See https://github.com/Microsoft/visualfsharp/pull/4576 + tycon.AllFieldsArray |> Array.exists isRecdOrStructFieldDefinitelyMutable else false - -let isRecdOrUnionOrStructTyconRefAllocObservable g (tcr : TyconRef) = isRecdOrUnionOrStructTyconAllocObservable g tcr.Deref // Although from the pure F# perspective exception values cannot be changed, the .NET // implementation of exception objects attaches a whole bunch of stack information to // each raised object. Hence we treat exception objects as if they have identity -let isExnAllocObservable (_ecref:TyconRef) = true +let isExnDefinitelyMutable (_ecref:TyconRef) = true // Some of the implementations of library functions on lists use mutation on the tail // of the cons cell. These cells are always private, i.e. not accessible by any other // code until the construction of the entire return list has been completed. // However, within the implementation code reads of the tail cell must in theory be treated -// with caution. Hence we are conservative and within fslib we don't treat list +// with caution. Hence we are conservative and within FSharp.Core we don't treat list // reads as if they were pure. let isUnionCaseFieldMutable (g: TcGlobals) (ucref:UnionCaseRef) n = (g.compilingFslib && tyconRefEq g ucref.TyconRef g.list_tcr_canon && n = 1) || @@ -5214,8 +5376,8 @@ let ComputeFieldName tycon f = // Helpers for building code contained in the initial environment //------------------------------------------------------------------------- -let isQuotedExprTy g ty = match ty with AppTy g (tcref, _) -> tyconRefEq g tcref g.expr_tcr | _ -> false -let destQuotedExprTy g ty = match ty with AppTy g (_, [ty]) -> ty | _ -> failwith "destQuotedExprTy" +let isQuotedExprTy g ty = match tryAppTy g ty with ValueSome (tcref, _) -> tyconRefEq g tcref g.expr_tcr | _ -> false +let destQuotedExprTy g ty = match tryAppTy g ty with ValueSome (_, [ty]) -> ty | _ -> failwith "destQuotedExprTy" let mkQuotedExprTy (g:TcGlobals) ty = TType_app(g.expr_tcr, [ty]) let mkRawQuotedExprTy (g:TcGlobals) = TType_app(g.raw_expr_tcr, []) @@ -5269,16 +5431,16 @@ let rec tyOfExpr g e = | (TOp.For _ | TOp.While _) -> g.unit_ty | TOp.Array -> (match tinst with [ty] -> mkArrayType g ty | _ -> failwith "bad TOp.Array node") | (TOp.TryCatch _ | TOp.TryFinally _) -> (match tinst with [ty] -> ty | _ -> failwith "bad TOp_try node") - | TOp.ValFieldGetAddr(fref) -> mkByrefTy g (actualTyOfRecdFieldRef fref tinst) + | TOp.ValFieldGetAddr(fref, readonly) -> mkByrefTyWithFlag g readonly (actualTyOfRecdFieldRef fref tinst) | TOp.ValFieldGet(fref) -> actualTyOfRecdFieldRef fref tinst | (TOp.ValFieldSet _ | TOp.UnionCaseFieldSet _ | TOp.ExnFieldSet _ | TOp.LValueOp ((LSet | LByrefSet), _)) ->g.unit_ty | TOp.UnionCaseTagGet _ -> g.int_ty - | TOp.UnionCaseFieldGetAddr(cref, j) -> mkByrefTy g (actualTyOfRecdField (mkTyconRefInst cref.TyconRef tinst) (cref.FieldByIndex j)) + | TOp.UnionCaseFieldGetAddr(cref, j, readonly) -> mkByrefTyWithFlag g readonly (actualTyOfRecdField (mkTyconRefInst cref.TyconRef tinst) (cref.FieldByIndex j)) | TOp.UnionCaseFieldGet(cref, j) -> actualTyOfRecdField (mkTyconRefInst cref.TyconRef tinst) (cref.FieldByIndex j) | TOp.ExnFieldGet(ecref, j) -> recdFieldTyOfExnDefRefByIdx ecref j | TOp.LValueOp (LByrefGet, v) -> destByrefTy g v.Type - | TOp.LValueOp (LGetAddr, v) -> mkByrefTy g v.Type - | TOp.RefAddrGet -> (match tinst with [ty] -> mkByrefTy g ty | _ -> failwith "bad TOp.RefAddrGet node") + | TOp.LValueOp (LAddrOf readonly, v) -> mkByrefTyWithFlag g readonly v.Type + | TOp.RefAddrGet readonly -> (match tinst with [ty] -> mkByrefTyWithFlag g readonly ty | _ -> failwith "bad TOp.RefAddrGet node") | TOp.TraitCall (TTrait(_, _, _, _, ty, _)) -> GetFSharpViewOfReturnType g ty | TOp.Reraise -> (match tinst with [rtn_ty] -> rtn_ty | _ -> failwith "bad TOp.Reraise node") | TOp.Goto _ | TOp.Label _ | TOp.Return -> @@ -5503,16 +5665,38 @@ let mkAndSimplifyMatch spBind exprm matchm ty tree targets = // mkExprAddrOfExprAux //------------------------------------------------------------------------- -type Mutates = DefinitelyMutates | PossiblyMutates | NeverMutates +type Mutates = AddressOfOp | DefinitelyMutates | PossiblyMutates | NeverMutates exception DefensiveCopyWarning of string * range -let isRecdOrStructTyImmutable g ty = +let isRecdOrStructTyconRefAssumedImmutable (g: TcGlobals) (tcref: TyconRef) = + tcref.CanDeref && + not (isRecdOrUnionOrStructTyconRefDefinitelyMutable tcref) || + tyconRefEq g tcref g.decimal_tcr || + tyconRefEq g tcref g.date_tcr + +let isRecdOrStructTyconRefReadOnly (g: TcGlobals) m (tcref: TyconRef) = + tcref.CanDeref && + match tcref.TryIsReadOnly with + | Some res -> res + | None -> + let isImmutable = isRecdOrStructTyconRefAssumedImmutable g tcref + let hasAttrib = TyconRefHasAttribute g m g.attrib_IsReadOnlyAttribute tcref + let res = isImmutable || hasAttrib + tcref.SetIsReadOnly res + res + +let isRecdOrStructTyReadOnly (g: TcGlobals) m ty = match tryDestAppTy g ty with - | None -> false - | Some tcref -> - not (isRecdOrUnionOrStructTyconRefAllocObservable g tcref) || - tyconRefEq g tcref g.decimal_tcr || - tyconRefEq g tcref g.date_tcr + | ValueNone -> false + | ValueSome tcref -> isRecdOrStructTyconRefReadOnly g m tcref + + +let CanTakeAddressOf g m ty mut = + match mut with + | NeverMutates -> true + | PossiblyMutates -> isRecdOrStructTyReadOnly g m ty + | DefinitelyMutates -> false + | AddressOfOp -> true // you can take the address but you might get a (readonly) inref as a result // We can take the address of values of struct type even if the value is immutable // under certain conditions @@ -5525,151 +5709,208 @@ let isRecdOrStructTyImmutable g ty = // let g1 = A.G(1) // (fun () -> g1.x1) // -// Note: isRecdOrStructTyImmutable implies PossiblyMutates or NeverMutates +// Note: isRecdOrStructTyReadOnly implies PossiblyMutates or NeverMutates // // We only do this for true local or closure fields because we can't take addresses of immutable static // fields across assemblies. -let CanTakeAddressOfImmutableVal g (v:ValRef) mut = +let CanTakeAddressOfImmutableVal (g: TcGlobals) m (vref:ValRef) mut = // We can take the address of values of struct type if the operation doesn't mutate // and the value is a true local or closure field. - not v.IsMutable && - not v.IsMemberOrModuleBinding && - (match mut with - | NeverMutates -> true - | PossiblyMutates -> isRecdOrStructTyImmutable g v.Type - | DefinitelyMutates -> false) - -let MustTakeAddressOfVal (g:TcGlobals) (v:ValRef) = - v.IsMutable && + not vref.IsMutable && + not vref.IsMemberOrModuleBinding && + // Note: We can't add this: + // || valRefInThisAssembly g.compilingFslib vref + // This is because we don't actually guarantee to generate static backing fields for all values like these, e.g. simple constants "let x = 1". + // We always generate a static property but there is no field to take an address of + CanTakeAddressOf g m vref.Type mut + +let MustTakeAddressOfVal (g:TcGlobals) (vref:ValRef) = + vref.IsMutable && // We can only take the address of mutable values in the same assembly - valRefInThisAssembly g.compilingFslib v + valRefInThisAssembly g.compilingFslib vref -let MustTakeAddressOfRecdField (rf: RecdField) = +let MustTakeAddressOfByrefGet (g:TcGlobals) (vref:ValRef) = + isByrefTy g vref.Type && not (isInByrefTy g vref.Type) + +let CanTakeAddressOfByrefGet (g:TcGlobals) (vref:ValRef) mut = + isInByrefTy g vref.Type && + CanTakeAddressOf g vref.Range (destByrefTy g vref.Type) mut + +let MustTakeAddressOfRecdField (rfref: RecdField) = // Static mutable fields must be private, hence we don't have to take their address - not rf.IsStatic && - rf.IsMutable + not rfref.IsStatic && + rfref.IsMutable let MustTakeAddressOfRecdFieldRef (rfref: RecdFieldRef) = MustTakeAddressOfRecdField rfref.RecdField -let CanTakeAddressOfRecdFieldRef (g:TcGlobals) (rfref: RecdFieldRef) mut tinst = - mut <> DefinitelyMutates && +let CanTakeAddressOfRecdFieldRef (g:TcGlobals) m (rfref: RecdFieldRef) tinst mut = // We only do this if the field is defined in this assembly because we can't take addresses across assemblies for immutable fields entityRefInThisAssembly g.compilingFslib rfref.TyconRef && - isRecdOrStructTyImmutable g (actualTyOfRecdFieldRef rfref tinst) + not rfref.RecdField.IsMutable && + CanTakeAddressOf g m (actualTyOfRecdFieldRef rfref tinst) mut -let CanTakeAddressOfUnionFieldRef (g:TcGlobals) (uref: UnionCaseRef) mut tinst cidx = - mut <> DefinitelyMutates && +let CanTakeAddressOfUnionFieldRef (g:TcGlobals) m (uref: UnionCaseRef) cidx tinst mut = // We only do this if the field is defined in this assembly because we can't take addresses across assemblies for immutable fields entityRefInThisAssembly g.compilingFslib uref.TyconRef && - isRecdOrStructTyImmutable g (actualTyOfUnionFieldRef uref cidx tinst) - - -let rec mkExprAddrOfExprAux g mustTakeAddress useReadonlyForGenericArrayAddress mut e addrExprVal m = - if not mustTakeAddress then None, e else - match e with - // LVALUE: "x" where "x" is byref - | Expr.Op (TOp.LValueOp (LByrefGet, v), _, [], m) -> - None, exprForValRef m v - // LVALUE: "x" where "x" is mutable local, mutable intra-assembly module/static binding, or operation doesn't mutate - // Note: we can always take the address of mutable values - | Expr.Val(v, _, m) when MustTakeAddressOfVal g v || CanTakeAddressOfImmutableVal g v mut -> - None, mkValAddr m v - // LVALUE: "x" where "e.x" is record field. - | Expr.Op (TOp.ValFieldGet rfref, tinst, [e], m) when MustTakeAddressOfRecdFieldRef rfref || CanTakeAddressOfRecdFieldRef g rfref mut tinst -> - let exprty = tyOfExpr g e - let wrap, expra = mkExprAddrOfExprAux g (isStructTy g exprty) false mut e None m - wrap, mkRecdFieldGetAddrViaExprAddr(expra, rfref, tinst, m) - // LVALUE: "x" where "e.x" is union field - | Expr.Op (TOp.UnionCaseFieldGet (uref, cidx), tinst, [e], m) when MustTakeAddressOfRecdField (uref.FieldByIndex(cidx)) || CanTakeAddressOfUnionFieldRef g uref mut tinst cidx -> - let exprty = tyOfExpr g e - let wrap, expra = mkExprAddrOfExprAux g (isStructTy g exprty) false mut e None m - wrap, mkUnionCaseFieldGetAddrProvenViaExprAddr(expra, uref, tinst, cidx, m) - - // LVALUE: "x" where "e.x" is a .NET static field. - | Expr.Op (TOp.ILAsm ([IL.I_ldsfld(_vol, fspec)], [ty2]), tinst, [], m) -> - None, Expr.Op (TOp.ILAsm ([IL.I_ldsflda(fspec)], [mkByrefTy g ty2]), tinst, [], m) - - // LVALUE: "x" where "e.x" is a .NET instance field. "e" may be an lvalue - | Expr.Op (TOp.ILAsm ([IL.I_ldfld(_align, _vol, fspec)], [ty2]), tinst, [e], m) - -> - let exprty = tyOfExpr g e - let wrap, expra = mkExprAddrOfExprAux g (isStructTy g exprty) false mut e None m - wrap, Expr.Op (TOp.ILAsm ([IL.I_ldflda(fspec)], [mkByrefTy g ty2]), tinst, [expra], m) - - // LVALUE: "x" where "x" is mutable static field. - | Expr.Op (TOp.ValFieldGet rfref, tinst, [], m) when MustTakeAddressOfRecdFieldRef rfref || CanTakeAddressOfRecdFieldRef g rfref mut tinst -> - None, mkStaticRecdFieldGetAddr(rfref, tinst, m) - - // LVALUE: "e.[n]" where e is an array of structs - | Expr.App(Expr.Val(vf, _, _), _, [elemTy], [aexpr;nexpr], _) - when (valRefEq g vf g.array_get_vref) -> + let rfref = uref.FieldByIndex cidx + not rfref.IsMutable && + CanTakeAddressOf g m (actualTyOfUnionFieldRef uref cidx tinst) mut + +/// Make the address-of expression and return a wrapper that adds any allocated locals at an appropriate scope. +/// Also return a flag that indicates if the resulting pointer is a not a pointer where writing is allowed and will +/// have intended effect (i.e. is a readonly pointer and/or a defensive copy). +let rec mkExprAddrOfExprAux g mustTakeAddress useReadonlyForGenericArrayAddress mut expr addrExprVal m = + if mustTakeAddress then + match expr with + // LVALUE of "*x" where "x" is byref is just the byref itself + | Expr.Op (TOp.LValueOp (LByrefGet, vref), _, [], m) when MustTakeAddressOfByrefGet g vref || CanTakeAddressOfByrefGet g vref mut -> + let readonly = not (MustTakeAddressOfByrefGet g vref) + let writeonly = isOutByrefTy g vref.Type + None, exprForValRef m vref, readonly, writeonly + + // LVALUE of "x" where "x" is mutable local, mutable intra-assembly module/static binding, or operation doesn't mutate. + // Note: we can always take the address of mutable intra-assembly values + | Expr.Val(vref, _, m) when MustTakeAddressOfVal g vref || CanTakeAddressOfImmutableVal g m vref mut -> + let readonly = not (MustTakeAddressOfVal g vref) + let writeonly = false + None, mkValAddr m readonly vref, readonly, writeonly + + // LVALUE of "e.f" where "f" is an instance F# field or record field. + | Expr.Op (TOp.ValFieldGet rfref, tinst, [objExpr], m) when MustTakeAddressOfRecdFieldRef rfref || CanTakeAddressOfRecdFieldRef g m rfref tinst mut -> + let objTy = tyOfExpr g objExpr + let takeAddrOfObjExpr = isStructTy g objTy // It seems this will always be false - the address will already have been taken + let wrap, expra, readonly, writeonly = mkExprAddrOfExprAux g takeAddrOfObjExpr false mut objExpr None m + let readonly = readonly || isInByrefTy g objTy || not (MustTakeAddressOfRecdFieldRef rfref) + let writeonly = writeonly || isOutByrefTy g objTy + wrap, mkRecdFieldGetAddrViaExprAddr(readonly, expra, rfref, tinst, m), readonly, writeonly + + // LVALUE of "f" where "f" is a static F# field. + | Expr.Op (TOp.ValFieldGet rfref, tinst, [], m) when MustTakeAddressOfRecdFieldRef rfref || CanTakeAddressOfRecdFieldRef g m rfref tinst mut -> + let readonly = not (MustTakeAddressOfRecdFieldRef rfref) + let writeonly = false + None, mkStaticRecdFieldGetAddr(readonly, rfref, tinst, m), readonly, writeonly + + // LVALUE of "e.f" where "f" is an F# union field. + | Expr.Op (TOp.UnionCaseFieldGet (uref, cidx), tinst, [objExpr], m) when MustTakeAddressOfRecdField (uref.FieldByIndex(cidx)) || CanTakeAddressOfUnionFieldRef g m uref cidx tinst mut -> + let objTy = tyOfExpr g objExpr + let takeAddrOfObjExpr = isStructTy g objTy // It seems this will always be false - the address will already have been taken + let wrap, expra, readonly, writeonly = mkExprAddrOfExprAux g takeAddrOfObjExpr false mut objExpr None m + let readonly = readonly || isInByrefTy g objTy || not (MustTakeAddressOfRecdField (uref.FieldByIndex(cidx))) + let writeonly = writeonly || isOutByrefTy g objTy + wrap, mkUnionCaseFieldGetAddrProvenViaExprAddr(readonly, expra, uref, tinst, cidx, m), readonly, writeonly + + // LVALUE of "f" where "f" is a .NET static field. + | Expr.Op (TOp.ILAsm ([IL.I_ldsfld(_vol, fspec)], [ty2]), tinst, [], m) -> + let readonly = false // we never consider taking the address of a .NET static field to give an inref pointer + let writeonly = false + None, Expr.Op (TOp.ILAsm ([IL.I_ldsflda(fspec)], [mkByrefTy g ty2]), tinst, [], m), readonly, writeonly + + // LVALUE of "e.f" where "f" is a .NET instance field. + | Expr.Op (TOp.ILAsm ([IL.I_ldfld(_align, _vol, fspec)], [ty2]), tinst, [objExpr], m) -> + let objTy = tyOfExpr g objExpr + let takeAddrOfObjExpr = isStructTy g objTy // It seems this will always be false - the address will already have been taken + // we never consider taking the address of an .NET instance field to give an inref pointer, unless the object pointer is an inref pointer + let wrap, expra, readonly, writeonly = mkExprAddrOfExprAux g takeAddrOfObjExpr false mut objExpr None m + let readonly = readonly || isInByrefTy g objTy + let writeonly = writeonly || isOutByrefTy g objTy + wrap, Expr.Op (TOp.ILAsm ([IL.I_ldflda(fspec)], [mkByrefTyWithFlag g readonly ty2]), tinst, [expra], m), readonly, writeonly + + // LVALUE of "e.[n]" where e is an array of structs + | Expr.App(Expr.Val(vf, _, _), _, [elemTy], [aexpr;nexpr], _) when (valRefEq g vf g.array_get_vref) -> - let shape = ILArrayShape.SingleDimensional - let readonly = if isTyparTy g elemTy && useReadonlyForGenericArrayAddress then ReadonlyAddress else NormalAddress - let isNativePtr = - match addrExprVal with - | Some(vf) -> valRefEq g vf g.addrof2_vref - | _ -> false - None, mkArrayElemAddress g (readonly, isNativePtr, shape, elemTy, aexpr, nexpr, m) - - // LVALUE: "e.[n1, n2]", "e.[n1, n2, n3]", "e.[n1, n2, n3, n4]" where e is an array of structs - | Expr.App(Expr.Val(vf, _, _), _, [elemTy], (aexpr::args), _) - when (valRefEq g vf g.array2D_get_vref || valRefEq g vf g.array3D_get_vref || valRefEq g vf g.array4D_get_vref) -> + let readonly = false // array address is never forced to be readonly + let writeonly = false + let shape = ILArrayShape.SingleDimensional + let ilInstrReadOnlyAnnotation = if isTyparTy g elemTy && useReadonlyForGenericArrayAddress then ReadonlyAddress else NormalAddress + let isNativePtr = + match addrExprVal with + | Some(vf) -> valRefEq g vf g.addrof2_vref + | _ -> false + None, mkArrayElemAddress g (readonly, ilInstrReadOnlyAnnotation, isNativePtr, shape, elemTy, [aexpr; nexpr], m), readonly, writeonly + + // LVALUE of "e.[n1, n2]", "e.[n1, n2, n3]", "e.[n1, n2, n3, n4]" where e is an array of structs + | Expr.App(Expr.Val(vref, _, _), _, [elemTy], (aexpr::args), _) + when (valRefEq g vref g.array2D_get_vref || valRefEq g vref g.array3D_get_vref || valRefEq g vref g.array4D_get_vref) -> - let shape = ILArrayShape.FromRank args.Length - let readonly = if isTyparTy g elemTy && useReadonlyForGenericArrayAddress then ReadonlyAddress else NormalAddress - let isNativePtr = - match addrExprVal with - | Some(vf) -> valRefEq g vf g.addrof2_vref - | _ -> false + let readonly = false // array address is never forced to be readonly + let writeonly = false + let shape = ILArrayShape.FromRank args.Length + let ilInstrReadOnlyAnnotation = if isTyparTy g elemTy && useReadonlyForGenericArrayAddress then ReadonlyAddress else NormalAddress + let isNativePtr = + match addrExprVal with + | Some(vf) -> valRefEq g vf g.addrof2_vref + | _ -> false - None, Expr.Op (TOp.ILAsm ([IL.I_ldelema(readonly, isNativePtr, shape, mkILTyvarTy 0us)], [mkByrefTy g elemTy]), [elemTy], (aexpr::args), m) - - // Give a nice error message for DefinitelyMutates on immutable values, or mutable values in other assemblies - | Expr.Val(v, _, m) when mut = DefinitelyMutates - -> - if isByrefTy g v.Type then error(Error(FSComp.SR.tastUnexpectedByRef(), m)); - if v.IsMutable then - error(Error(FSComp.SR.tastInvalidAddressOfMutableAcrossAssemblyBoundary(), m)); - else - error(Error(FSComp.SR.tastValueMustBeLocalAndMutable(), m)); + None, mkArrayElemAddress g (readonly, ilInstrReadOnlyAnnotation, isNativePtr, shape, elemTy, (aexpr::args), m), readonly, writeonly + + // LVALUE: "&meth(args)" where meth has a byref or inref return. Includes "&span.[idx]". + | Expr.Let(TBind(vref, e, _), Expr.Op(TOp.LValueOp (LByrefGet, vref2), _, _, _), _, _) when (valRefEq g (mkLocalValRef vref) vref2) && (MustTakeAddressOfByrefGet g vref2 || CanTakeAddressOfByrefGet g vref2 mut) -> + let ty = tyOfExpr g e + let readonly = isInByrefTy g ty + let writeonly = isOutByrefTy g ty + None, e, readonly, writeonly + + // Give a nice error message for address-of-byref + | Expr.Val(vref, _, m) when isByrefTy g vref.Type -> + error(Error(FSComp.SR.tastUnexpectedByRef(), m)) + + // Give a nice error message for DefinitelyMutates of address-of on mutable values in other assemblies + | Expr.Val(vref, _, m) when (mut = DefinitelyMutates || mut = AddressOfOp) && vref.IsMutable -> + error(Error(FSComp.SR.tastInvalidAddressOfMutableAcrossAssemblyBoundary(), m)) + + // Give a nice error message for AddressOfOp on immutable values + | Expr.Val _ when mut = AddressOfOp -> + error(Error(FSComp.SR.tastValueMustBeLocal(), m)) - | _ -> - let ty = tyOfExpr g e - if isStructTy g ty then - match mut with - | NeverMutates -> () - | DefinitelyMutates -> - errorR(Error(FSComp.SR.tastInvalidMutationOfConstant(), m)); - | PossiblyMutates -> - warning(DefensiveCopyWarning(FSComp.SR.tastValueHasBeenCopied(), m)); - let tmp, _ = - match mut with - | NeverMutates -> mkCompGenLocal m "copyOfStruct" ty - | _ -> mkMutableCompGenLocal m "copyOfStruct" ty - Some (tmp, e), (mkValAddr m (mkLocalValRef tmp)) + // Give a nice error message for mutating a value we can't take the address of + | Expr.Val _ when mut = DefinitelyMutates -> + error(Error(FSComp.SR.tastValueMustBeMutable(), m)) + + | _ -> + let ty = tyOfExpr g expr + if isStructTy g ty then + match mut with + | NeverMutates -> () + | AddressOfOp -> + // we get an inref + errorR(Error(FSComp.SR.tastCantTakeAddressOfExpression(), m)) + | DefinitelyMutates -> + // Give a nice error message for mutating something we can't take the address of + errorR(Error(FSComp.SR.tastInvalidMutationOfConstant(), m)) + | PossiblyMutates -> + // Warn on defensive copy of something we can't take the address of + warning(DefensiveCopyWarning(FSComp.SR.tastValueHasBeenCopied(), m)) + // Take a defensive copy + let tmp, _ = + match mut with + | NeverMutates -> mkCompGenLocal m "copyOfStruct" ty + | _ -> mkMutableCompGenLocal m "copyOfStruct" ty + let readonly = true + let writeonly = false + Some (tmp, expr), (mkValAddr m readonly (mkLocalValRef tmp)), readonly, writeonly + else + None, expr, false, false let mkExprAddrOfExpr g mustTakeAddress useReadonlyForGenericArrayAddress mut e addrExprVal m = - let optBind, addre = mkExprAddrOfExprAux g mustTakeAddress useReadonlyForGenericArrayAddress mut e addrExprVal m + let optBind, addre, readonly, writeonly = mkExprAddrOfExprAux g mustTakeAddress useReadonlyForGenericArrayAddress mut e addrExprVal m match optBind with - | None -> (fun x -> x), addre - | Some (tmp, rval) -> (fun x -> mkCompGenLet m tmp rval x), addre + | None -> (fun x -> x), addre, readonly, writeonly + | Some (tmp, rval) -> (fun x -> mkCompGenLet m tmp rval x), addre, readonly, writeonly let mkTupleFieldGet g (tupInfo, e, tinst, i, m) = - let wrap, e' = mkExprAddrOfExpr g (evalTupInfoIsStruct tupInfo) false NeverMutates e None m + let wrap, e', _readonly, _writeonly = mkExprAddrOfExpr g (evalTupInfoIsStruct tupInfo) false NeverMutates e None m wrap (mkTupleFieldGetViaExprAddr(tupInfo, e', tinst, i, m)) let mkRecdFieldGet g (e, fref:RecdFieldRef, tinst, m) = assert (not (isByrefTy g (tyOfExpr g e))) - let wrap, e' = mkExprAddrOfExpr g fref.Tycon.IsStructOrEnumTycon false NeverMutates e None m + let wrap, e', _readonly, _writeonly = mkExprAddrOfExpr g fref.Tycon.IsStructOrEnumTycon false NeverMutates e None m wrap (mkRecdFieldGetViaExprAddr(e', fref, tinst, m)) let mkUnionCaseFieldGetUnproven g (e, cref:UnionCaseRef, tinst, j, m) = assert (not (isByrefTy g (tyOfExpr g e))) - let wrap, e' = mkExprAddrOfExpr g cref.Tycon.IsStructOrEnumTycon false NeverMutates e None m + let wrap, e', _readonly, _writeonly = mkExprAddrOfExpr g cref.Tycon.IsStructOrEnumTycon false NeverMutates e None m wrap (mkUnionCaseFieldGetUnprovenViaExprAddr (e', cref, tinst, j, m)) - let mkArray (argty, args, m) = Expr.Op(TOp.Array, [argty], args, m) //--------------------------------------------------------------------------- @@ -5910,7 +6151,7 @@ let ExprStats x = let count = ref 0 let folders = {ExprFolder0 with exprIntercept = (fun _ _ _ -> (count := !count + 1; None))} let () = FoldExpr folders () x - string !count ^ " TExpr nodes" + string !count + " TExpr nodes" #endif //------------------------------------------------------------------------- @@ -5933,7 +6174,7 @@ let mkMinusOne g m = mkInt g m (-1) let destInt32 = function Expr.Const(Const.Int32 n, _, _) -> Some n | _ -> None -let isIDelegateEventType g ty = isAppTy g ty && tyconRefEq g g.fslib_IDelegateEvent_tcr (tcrefOfAppTy g ty) +let isIDelegateEventType g ty = match tryDestAppTy g ty with ValueSome tcref -> tyconRefEq g g.fslib_IDelegateEvent_tcr tcref | _ -> false let destIDelegateEventType g ty = if isIDelegateEventType g ty then match argsOfAppTy g ty with @@ -6008,14 +6249,14 @@ let liftAllBefore sigma = /// Put record field assignments in order. // -let permuteExprList (sigma:int[]) (exprs: Expr list) (typ: TType list) (names:string list) = - let typ, names = (Array.ofList typ, Array.ofList names) +let permuteExprList (sigma:int[]) (exprs: Expr list) (ty: TType list) (names:string list) = + let ty, names = (Array.ofList ty, Array.ofList names) let liftLim = liftAllBefore sigma let rewrite rbinds (i, expri:Expr) = if i < liftLim then - let tmpvi, tmpei = mkCompGenLocal expri.Range names.[i] typ.[i] + let tmpvi, tmpei = mkCompGenLocal expri.Range names.[i] ty.[i] let bindi = mkCompGenBind tmpvi expri tmpei, bindi :: rbinds else @@ -6047,9 +6288,9 @@ let mkRecordExpr g (lnk, tcref, tinst, rfrefs:RecdFieldRef list, args, m) = if sigma.[i] <> -1 then error(InternalError("bad permutation", m)) sigma.[i] <- j) rfrefsArray - let argTyps = List.map (fun rfref -> actualTyOfRecdFieldRef rfref tinst) rfrefs - let names = rfrefs |> List.map (fun rfref -> rfref.FieldName) - let binds, args = permuteExprList sigma args argTyps names + let argTys = List.map (fun rfref -> actualTyOfRecdFieldRef rfref tinst) rfrefs + let names = rfrefs |> List.map (fun rfref -> rfref.FieldName) + let binds, args = permuteExprList sigma args argTys names mkLetsBind m binds (Expr.Op (TOp.Recd(lnk, tcref), tinst, args, m)) @@ -6114,22 +6355,84 @@ let mkCallNewQuerySource (g:TcGlobals) m ty1 ty2 e1 = m let mkCallCreateEvent (g:TcGlobals) m ty1 ty2 e1 e2 e3 = mkApps g (typedExprForIntrinsic g m g.create_event_info, [[ty1;ty2]], [ e1;e2;e3 ], m) let mkCallGenericComparisonWithComparerOuter (g:TcGlobals) m ty comp e1 e2 = mkApps g (typedExprForIntrinsic g m g.generic_comparison_withc_outer_info, [[ty]], [ comp;e1;e2 ], m) -let mkCallEqualsOperator (g:TcGlobals) m ty e1 e2 = mkApps g (typedExprForIntrinsic g m g.equals_operator_info, [[ty]], [ e1;e2 ], m) let mkCallGenericEqualityEROuter (g:TcGlobals) m ty e1 e2 = mkApps g (typedExprForIntrinsic g m g.generic_equality_er_outer_info, [[ty]], [ e1;e2 ], m) let mkCallGenericEqualityWithComparerOuter (g:TcGlobals) m ty comp e1 e2 = mkApps g (typedExprForIntrinsic g m g.generic_equality_withc_outer_info, [[ty]], [comp;e1;e2], m) let mkCallGenericHashWithComparerOuter (g:TcGlobals) m ty comp e1 = mkApps g (typedExprForIntrinsic g m g.generic_hash_withc_outer_info, [[ty]], [comp;e1], m) -let mkCallSubtractionOperator (g:TcGlobals) m ty e1 e2 = mkApps g (typedExprForIntrinsic g m g.unchecked_subtraction_info, [[ty; ty; ty]], [e1;e2], m) +let mkCallEqualsOperator (g:TcGlobals) m ty e1 e2 = mkApps g (typedExprForIntrinsic g m g.equals_operator_info, [[ty]], [ e1;e2 ], m) +let mkCallNotEqualsOperator (g:TcGlobals) m ty e1 e2 = mkApps g (typedExprForIntrinsic g m g.not_equals_operator, [[ty]], [ e1;e2 ], m) +let mkCallLessThanOperator (g:TcGlobals) m ty e1 e2 = mkApps g (typedExprForIntrinsic g m g.less_than_operator, [[ty]], [ e1;e2 ], m) +let mkCallLessThanOrEqualsOperator (g:TcGlobals) m ty e1 e2 = mkApps g (typedExprForIntrinsic g m g.less_than_or_equals_operator, [[ty]], [ e1;e2 ], m) +let mkCallGreaterThanOperator (g:TcGlobals) m ty e1 e2 = mkApps g (typedExprForIntrinsic g m g.greater_than_operator, [[ty]], [ e1;e2 ], m) +let mkCallGreaterThanOrEqualsOperator (g:TcGlobals) m ty e1 e2 = mkApps g (typedExprForIntrinsic g m g.greater_than_or_equals_operator, [[ty]], [ e1;e2 ], m) -let mkCallArrayLength (g:TcGlobals) m ty el = mkApps g (typedExprForIntrinsic g m g.array_length_info, [[ty]], [el], m) -let mkCallArrayGet (g:TcGlobals) m ty e1 e2 = mkApps g (typedExprForIntrinsic g m g.array_get_info, [[ty]], [ e1 ; e2 ], m) +let mkCallAdditionOperator (g:TcGlobals) m ty e1 e2 = mkApps g (typedExprForIntrinsic g m g.unchecked_addition_info, [[ty; ty; ty]], [e1;e2], m) +let mkCallSubtractionOperator (g:TcGlobals) m ty e1 e2 = mkApps g (typedExprForIntrinsic g m g.unchecked_subtraction_info, [[ty; ty; ty]], [e1;e2], m) +let mkCallMultiplyOperator (g:TcGlobals) m ty e1 e2 = mkApps g (typedExprForIntrinsic g m g.unchecked_multiply_info, [[ty; ty; ty]], [e1;e2], m) +let mkCallDivisionOperator (g:TcGlobals) m ty e1 e2 = mkApps g (typedExprForIntrinsic g m g.unchecked_division_info, [[ty; ty; ty]], [e1;e2], m) +let mkCallModulusOperator (g:TcGlobals) m ty e1 e2 = mkApps g (typedExprForIntrinsic g m g.unchecked_modulus_info, [[ty; ty; ty]], [e1;e2], m) +let mkCallBitwiseAndOperator (g:TcGlobals) m ty e1 e2 = mkApps g (typedExprForIntrinsic g m g.bitwise_and_info, [[ty]], [e1;e2], m) +let mkCallBitwiseOrOperator (g:TcGlobals) m ty e1 e2 = mkApps g (typedExprForIntrinsic g m g.bitwise_or_info, [[ty]], [e1;e2], m) +let mkCallBitwiseXorOperator (g:TcGlobals) m ty e1 e2 = mkApps g (typedExprForIntrinsic g m g.bitwise_xor_info, [[ty]], [e1;e2], m) +let mkCallShiftLeftOperator (g:TcGlobals) m ty e1 e2 = mkApps g (typedExprForIntrinsic g m g.bitwise_shift_left_info, [[ty]], [e1;e2], m) +let mkCallShiftRightOperator (g:TcGlobals) m ty e1 e2 = mkApps g (typedExprForIntrinsic g m g.bitwise_shift_right_info, [[ty]], [e1;e2], m) + +let mkCallUnaryNegOperator (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.unchecked_unary_minus_info, [[ty]], [e1], m) +let mkCallUnaryNotOperator (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.bitwise_unary_not_info, [[ty]], [e1], m) + +let mkCallAdditionChecked (g:TcGlobals) m ty e1 e2 = mkApps g (typedExprForIntrinsic g m g.checked_addition_info, [[ty; ty; ty]], [e1;e2], m) +let mkCallSubtractionChecked (g:TcGlobals) m ty e1 e2 = mkApps g (typedExprForIntrinsic g m g.checked_subtraction_info, [[ty; ty; ty]], [e1;e2], m) +let mkCallMultiplyChecked (g:TcGlobals) m ty e1 e2 = mkApps g (typedExprForIntrinsic g m g.checked_multiply_info, [[ty; ty; ty]], [e1;e2], m) +let mkCallUnaryNegChecked (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.checked_unary_minus_info, [[ty]], [e1], m) + +let mkCallToByteChecked (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.byte_checked_info, [[ty]], [e1], m) +let mkCallToSByteChecked (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.sbyte_checked_info, [[ty]], [e1], m) +let mkCallToInt16Checked (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.int16_checked_info, [[ty]], [e1], m) +let mkCallToUInt16Checked (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.uint16_checked_info, [[ty]], [e1], m) +let mkCallToIntChecked (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.int_checked_info, [[ty]], [e1], m) +let mkCallToInt32Checked (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.int32_checked_info, [[ty]], [e1], m) +let mkCallToUInt32Checked (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.uint32_checked_info, [[ty]], [e1], m) +let mkCallToInt64Checked (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.int64_checked_info, [[ty]], [e1], m) +let mkCallToUInt64Checked (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.uint64_checked_info, [[ty]], [e1], m) +let mkCallToIntPtrChecked (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.nativeint_checked_info, [[ty]], [e1], m) +let mkCallToUIntPtrChecked (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.unativeint_checked_info, [[ty]], [e1], m) + +let mkCallToByteOperator (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.byte_operator_info, [[ty]], [e1], m) +let mkCallToSByteOperator (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.sbyte_operator_info, [[ty]], [e1], m) +let mkCallToInt16Operator (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.int16_operator_info, [[ty]], [e1], m) +let mkCallToUInt16Operator (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.uint16_operator_info, [[ty]], [e1], m) +let mkCallToIntOperator (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.int_operator_info, [[ty]], [e1], m) +let mkCallToInt32Operator (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.int32_operator_info, [[ty]], [e1], m) +let mkCallToUInt32Operator (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.uint32_operator_info, [[ty]], [e1], m) +let mkCallToInt64Operator (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.int64_operator_info, [[ty]], [e1], m) +let mkCallToUInt64Operator (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.uint64_operator_info, [[ty]], [e1], m) +let mkCallToSingleOperator (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.float32_operator_info, [[ty]], [e1], m) +let mkCallToDoubleOperator (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.float_operator_info, [[ty]], [e1], m) +let mkCallToIntPtrOperator (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.nativeint_operator_info, [[ty]], [e1], m) +let mkCallToUIntPtrOperator (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.unativeint_operator_info, [[ty]], [e1], m) + +let mkCallToCharOperator (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.char_operator_info, [[ty]], [e1], m) +let mkCallToEnumOperator (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.enum_operator_info, [[ty]], [e1], m) + +let mkCallArrayLength (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.array_length_info, [[ty]], [e1], m) +let mkCallArrayGet (g:TcGlobals) m ty e1 idx1 = mkApps g (typedExprForIntrinsic g m g.array_get_info, [[ty]], [ e1 ; idx1 ], m) let mkCallArray2DGet (g:TcGlobals) m ty e1 idx1 idx2 = mkApps g (typedExprForIntrinsic g m g.array2D_get_info, [[ty]], [ e1 ; idx1; idx2 ], m) let mkCallArray3DGet (g:TcGlobals) m ty e1 idx1 idx2 idx3 = mkApps g (typedExprForIntrinsic g m g.array3D_get_info, [[ty]], [ e1 ; idx1; idx2; idx3 ], m) let mkCallArray4DGet (g:TcGlobals) m ty e1 idx1 idx2 idx3 idx4 = mkApps g (typedExprForIntrinsic g m g.array4D_get_info, [[ty]], [ e1 ; idx1; idx2; idx3; idx4 ], m) +let mkCallArraySet (g:TcGlobals) m ty e1 idx1 v = mkApps g (typedExprForIntrinsic g m g.array_set_info, [[ty]], [ e1 ; idx1; v ], m) +let mkCallArray2DSet (g:TcGlobals) m ty e1 idx1 idx2 v = mkApps g (typedExprForIntrinsic g m g.array2D_set_info, [[ty]], [ e1 ; idx1; idx2; v ], m) +let mkCallArray3DSet (g:TcGlobals) m ty e1 idx1 idx2 idx3 v = mkApps g (typedExprForIntrinsic g m g.array3D_set_info, [[ty]], [ e1 ; idx1; idx2; idx3; v ], m) +let mkCallArray4DSet (g:TcGlobals) m ty e1 idx1 idx2 idx3 idx4 v = mkApps g (typedExprForIntrinsic g m g.array4D_set_info, [[ty]], [ e1 ; idx1; idx2; idx3; idx4; v ], m) + +let mkCallHash (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.hash_info, [[ty]], [ e1 ], m) +let mkCallBox (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.box_info, [[ty]], [ e1 ], m) +let mkCallIsNull (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.isnull_info, [[ty]], [ e1 ], m) +let mkCallIsNotNull (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.isnotnull_info, [[ty]], [ e1 ], m) +let mkCallRaise (g:TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.raise_info, [[ty]], [ e1 ], m) + let mkCallNewDecimal (g:TcGlobals) m (e1, e2, e3, e4, e5) = mkApps g (typedExprForIntrinsic g m g.new_decimal_info, [], [ e1;e2;e3;e4;e5 ], m) let mkCallNewFormat (g:TcGlobals) m aty bty cty dty ety e1 = mkApps g (typedExprForIntrinsic g m g.new_format_info, [[aty;bty;cty;dty;ety]], [ e1 ], m) -let mkCallRaise (g:TcGlobals) m aty e1 = mkApps g (typedExprForIntrinsic g m g.raise_info, [[aty]], [ e1 ], m) let TryEliminateDesugaredConstants g m c = match c with @@ -6201,9 +6504,9 @@ let mkCallLiftValueWithName (g:TcGlobals) m ty nm e1 = let vref = ValRefForIntrinsic g.lift_value_with_name_info // Use "Expr.ValueWithName" if it exists in FSharp.Core match vref.TryDeref with - | VSome _ -> + | ValueSome _ -> mkApps g (typedExprForIntrinsic g m g.lift_value_with_name_info , [[ty]], [mkRefTupledNoTypes g m [e1; mkString g m nm]], m) - | VNone -> + | ValueNone -> mkApps g (typedExprForIntrinsic g m g.lift_value_info , [[ty]], [e1], m) let mkCallLiftValueWithDefn g m qty e1 = @@ -6212,11 +6515,11 @@ let mkCallLiftValueWithDefn g m qty e1 = let vref = ValRefForIntrinsic g.lift_value_with_defn_info // Use "Expr.WithValue" if it exists in FSharp.Core match vref.TryDeref with - | VSome _ -> + | ValueSome _ -> let copyOfExpr = copyExpr g ValCopyFlag.CloneAll e1 let quoteOfCopyOfExpr = Expr.Quote(copyOfExpr, ref None, false, m, qty) mkApps g (typedExprForIntrinsic g m g.lift_value_with_defn_info , [[ty]], [mkRefTupledNoTypes g m [e1; quoteOfCopyOfExpr]], m) - | VNone -> + | ValueNone -> Expr.Quote(e1, ref None, false, m, qty) let mkCallCheckThis g m ty e1 = @@ -6330,7 +6633,7 @@ let mkCompilationMappingAttrForQuotationResource (g:TcGlobals) (nm, tys: ILTypeR //---------------------------------------------------------------------------- let isTypeProviderAssemblyAttr (cattr:ILAttribute) = - cattr.Method.EnclosingType.BasicQualifiedName = typeof.FullName + cattr.Method.DeclaringType.BasicQualifiedName = typeof.FullName let TryDecodeTypeProviderAssemblyAttr ilg (cattr:ILAttribute) = if isTypeProviderAssemblyAttr cattr then @@ -6539,7 +6842,7 @@ let MakeArgsForTopArgs _g m argtysl tpenv = let ty = instType tpenv argty let nm = match argInfo.Name with - | None -> CompilerGeneratedName ("arg"^ string i^ string j) + | None -> CompilerGeneratedName ("arg" + string i + string j) | Some id -> id.idText fst (mkCompGenLocal m nm ty))) @@ -6656,19 +6959,21 @@ let AdjustPossibleSubsumptionExpr g (expr: Expr) (suppliedArgs: Expr list) : (Ex argtysl |> List.mapi (fun i argtys -> argtys |> List.mapi (fun j (_, argInfo) -> match argInfo.Name with - | None -> CompilerGeneratedName ("arg" ^ string i ^string j) + | None -> CompilerGeneratedName ("arg" + string i ^string j) | Some id -> id.idText)) | _ -> [] - - assert (curriedActualArgTys.Length >= curriedNiceNames.Length) + + let nCurriedNiceNames = curriedNiceNames.Length + assert (curriedActualArgTys.Length >= nCurriedNiceNames) let argTysWithNiceNames, argTysWithoutNiceNames = - List.chop curriedNiceNames.Length argTys + List.splitAt nCurriedNiceNames argTys /// Only consume 'suppliedArgs' up to at most the number of nice arguments - let suppliedArgs, droppedSuppliedArgs = - List.chop (min suppliedArgs.Length curriedNiceNames.Length) suppliedArgs + let nSuppliedArgs = min suppliedArgs.Length nCurriedNiceNames + let suppliedArgs, droppedSuppliedArgs = + List.splitAt nSuppliedArgs suppliedArgs /// The relevant range for any expressions and applications includes the arguments let appm = (m, suppliedArgs) ||> List.fold (fun m e -> unionRanges m (e.Range)) @@ -6679,7 +6984,7 @@ let AdjustPossibleSubsumptionExpr g (expr: Expr) (suppliedArgs: Expr list) : (Ex // is a classic case. Here we generate // let tmp = (effect;4) in // (fun v -> Seq.take tmp (v :> seq<_>)) - let buildingLambdas = suppliedArgs.Length <> curriedNiceNames.Length + let buildingLambdas = nSuppliedArgs <> nCurriedNiceNames /// Given a tuple of argument variables that has a tuple type that satisfies the input argument types, /// coerce it to a tuple that satisfies the matching coerced argument type(s). @@ -6805,17 +7110,15 @@ let AdjustPossibleSubsumptionExpr g (expr: Expr) (suppliedArgs: Expr list) : (Ex argTysWithoutNiceNames (resVar, resVarAsExpr, retTy) - - // Mark the up as Some/None - let suppliedArgs = List.map Some suppliedArgs @ List.ofArray (Array.create (curriedNiceNames.Length - suppliedArgs.Length) None) - - assert (suppliedArgs.Length = curriedNiceNames.Length) - - let exprForAllArgs = - + let exprForAllArgs = if isNil argTysWithNiceNames then mkCompGenLet appm cloVar exprWithActualTy exprForOtherArgs else + // Mark the up as Some/None + let suppliedArgs = List.map Some suppliedArgs @ List.replicate (nCurriedNiceNames - nSuppliedArgs) None + + assert (suppliedArgs.Length = nCurriedNiceNames) + let lambdaBuilders, binderBuilders, inpsAsArgs = (argTysWithNiceNames, curriedNiceNames, suppliedArgs) |||> List.map3 (fun (_, inpArgTy, actualArgTys) niceNames suppliedArg -> @@ -6909,8 +7212,8 @@ let etaExpandTypeLambda g m tps (tm, ty) = if isNil tps then tm else mkTypeLambda m tps (mkApps g ((tm, ty), [(List.map mkTyparTy tps)], [], m), ty) let AdjustValToTopVal (tmp:Val) parent valData = - tmp.SetValReprInfo (Some valData); - tmp.val_actual_parent <- parent; + tmp.SetValReprInfo (Some valData) + tmp.SetDeclaringEntity parent tmp.SetIsMemberOrModuleBinding() /// For match with only one non-failing target T0, the other targets, T1... failing (say, raise exception). @@ -6978,18 +7281,18 @@ let LinearizeTopMatch g parent = function let commaEncs strs = String.concat "," strs -let angleEnc str = "{" ^ str ^ "}" +let angleEnc str = "{" + str + "}" let ticksAndArgCountTextOfTyconRef (tcref:TyconRef) = - // Generic type names are (name ^ "`" ^ digits) where name does not contain "`". + // Generic type names are (name + "`" + digits) where name does not contain "`". let path = Array.toList (fullMangledPathToTyconRef tcref) @ [tcref.CompiledName] textOfPath path let typarEnc _g (gtpsType, gtpsMethod) typar = match List.tryFindIndex (typarEq typar) gtpsType with - | Some idx -> "`" ^ string idx // single-tick-index for typar from type + | Some idx -> "`" + string idx // single-tick-index for typar from type | None -> match List.tryFindIndex (typarEq typar) gtpsMethod with - | Some idx -> "``" ^ string idx // double-tick-index for typar from method + | Some idx -> "``" + string idx // double-tick-index for typar from method | None -> warning(InternalError("Typar not found during XmlDoc generation", typar.Range)) "``0" // REVIEW: this should be ERROR not WARNING? @@ -7013,29 +7316,29 @@ let rec typeEnc g (gtpsType, gtpsMethod) ty = | 3 -> "[0:, 0:, 0:]" | 4 -> "[0:, 0:, 0:, 0:]" | _ -> failwith "impossible: rankOfArrayTyconRef: unsupported array rank" - typeEnc g (gtpsType, gtpsMethod) (List.head tinst) ^ arraySuffix + typeEnc g (gtpsType, gtpsMethod) (List.head tinst) + arraySuffix | TType_ucase (UCRef(tcref, _), tinst) | TType_app (tcref, tinst) -> if tyconRefEq g g.byref_tcr tcref then - typeEnc g (gtpsType, gtpsMethod) (List.head tinst) ^ "@" + typeEnc g (gtpsType, gtpsMethod) (List.head tinst) + "@" elif tyconRefEq g tcref g.nativeptr_tcr then - typeEnc g (gtpsType, gtpsMethod) (List.head tinst) ^ "*" + typeEnc g (gtpsType, gtpsMethod) (List.head tinst) + "*" else let tyName = let ty = stripTyEqnsAndMeasureEqns g ty match ty with | TType_app (tcref, _tinst) -> - // Generic type names are (name ^ "`" ^ digits) where name does not contain "`". + // Generic type names are (name + "`" + digits) where name does not contain "`". // In XML doc, when used in type instances, these do not use the ticks. let path = Array.toList (fullMangledPathToTyconRef tcref) @ [tcref.CompiledName] textOfPath (List.map DemangleGenericTypeName path) | _ -> assert(false); failwith "impossible" tyName + tyargsEnc g (gtpsType, gtpsMethod) tinst - | TType_tuple (tupInfo, typs) -> + | TType_tuple (tupInfo, tys) -> if evalTupInfoIsStruct tupInfo then - sprintf "System.ValueTuple%s"(tyargsEnc g (gtpsType, gtpsMethod) typs) + sprintf "System.ValueTuple%s"(tyargsEnc g (gtpsType, gtpsMethod) tys) else - sprintf "System.Tuple%s"(tyargsEnc g (gtpsType, gtpsMethod) typs) + sprintf "System.Tuple%s"(tyargsEnc g (gtpsType, gtpsMethod) tys) | TType_fun (f, x) -> "Microsoft.FSharp.Core.FSharpFunc" + tyargsEnc g (gtpsType, gtpsMethod) [f;x] | TType_var typar -> @@ -7079,7 +7382,7 @@ let XmlDocSigOfVal g path (v:Val) = | MemberKind.PropertyGetSet | MemberKind.PropertySet | MemberKind.PropertyGet -> "P:", v.PropertyName - let path = if v.HasTopValActualParent then prependPath path v.TopValActualParent.CompiledName else path + let path = if v.HasDeclaringEntity then prependPath path v.TopValDeclaringEntity.CompiledName else path let parentTypars, methTypars = match PartitionValTypars g v with | Some(_, memberParentTypars, memberMethodTypars, _, _) -> memberParentTypars, memberMethodTypars @@ -7164,16 +7467,16 @@ let TypeNullNever g ty = let TypeNullIsExtraValue g m ty = if isILReferenceTy g ty || isDelegateTy g ty then // Putting AllowNullLiteralAttribute(false) on an IL or provided type means 'null' can't be used with that type - not (isAppTy g ty && TryFindTyconRefBoolAttribute g m g.attrib_AllowNullLiteralAttribute (tcrefOfAppTy g ty) = Some(false)) + not (match tryDestAppTy g ty with ValueSome tcref -> TryFindTyconRefBoolAttribute g m g.attrib_AllowNullLiteralAttribute tcref = Some false | _ -> false) elif TypeNullNever g ty then false else // Putting AllowNullLiteralAttribute(true) on an F# type means 'null' can be used with that type - isAppTy g ty && TryFindTyconRefBoolAttribute g m g.attrib_AllowNullLiteralAttribute (tcrefOfAppTy g ty) = Some(true) + match tryDestAppTy g ty with ValueSome tcref -> TryFindTyconRefBoolAttribute g m g.attrib_AllowNullLiteralAttribute tcref = Some true | _ -> false let TypeNullIsTrueValue g ty = (match tryDestAppTy g ty with - | Some tcref -> IsUnionTypeWithNullAsTrueValue g tcref.Deref + | ValueSome tcref -> IsUnionTypeWithNullAsTrueValue g tcref.Deref | _ -> false) || (isUnitTy g ty) let TypeNullNotLiked g m ty = @@ -7213,8 +7516,8 @@ let (|SpecialComparableHeadType|_|) g ty = let _tupInfo, elemTys = destAnyTupleTy g ty Some elemTys else - match ty with - | AppTy g (tcref, tinst) -> + match tryAppTy g ty with + | ValueSome (tcref, tinst) -> if isArrayTyconRef g tcref || tyconRefEq g tcref g.system_UIntPtr_tcref || tyconRefEq g tcref g.system_IntPtr_tcref then @@ -7323,17 +7626,16 @@ let isSealedTy g ty = | ProvidedTypeMetadata st -> st.IsSealed #endif | ILTypeMetadata (TILObjectReprData(_, _, td)) -> td.IsSealed - | FSharpOrArrayOrByrefOrTupleOrExnTypeMetadata -> - + | FSharpOrArrayOrByrefOrTupleOrExnTypeMetadata -> if (isFSharpInterfaceTy g ty || isFSharpClassTy g ty) then - let tcref, _ = destAppTy g ty - (TryFindFSharpBoolAttribute g g.attrib_SealedAttribute tcref.Attribs = Some(true)) + let tcref = tcrefOfAppTy g ty + TryFindFSharpBoolAttribute g g.attrib_SealedAttribute tcref.Attribs = Some true else // All other F# types, array, byref, tuple types are sealed true let isComInteropTy g ty = - let tcr, _ = destAppTy g ty + let tcr = tcrefOfAppTy g ty match g.attrib_ComImportAttribute with | None -> false | Some attr -> TryFindFSharpBoolAttribute g attr tcr.Attribs = Some(true) @@ -7341,10 +7643,10 @@ let isComInteropTy g ty = let ValSpecIsCompiledAsInstance g (v:Val) = match v.MemberInfo with | Some(membInfo) -> - // Note it doesn't matter if we pass 'v.TopValActualParent' or 'v.MemberApparentParent' here. + // Note it doesn't matter if we pass 'v.TopValDeclaringEntity' or 'v.MemberApparentEntity' here. // These only differ if the value is an extension member, and in that case MemberIsCompiledAsInstance always returns // false anyway - MemberIsCompiledAsInstance g v.MemberApparentParent v.IsExtensionMember membInfo v.Attribs + MemberIsCompiledAsInstance g v.MemberApparentEntity v.IsExtensionMember membInfo v.Attribs | _ -> false let ValRefIsCompiledAsInstanceMember g (vref: ValRef) = ValSpecIsCompiledAsInstance g vref.Deref @@ -7357,7 +7659,7 @@ let ValRefIsCompiledAsInstanceMember g (vref: ValRef) = ValSpecIsCompiledAsInsta let GetMemberCallInfo g (vref:ValRef, vFlags) = match vref.MemberInfo with | Some(membInfo) when not vref.IsExtensionMember -> - let numEnclTypeArgs = vref.MemberApparentParent.TyparsNoRange.Length + let numEnclTypeArgs = vref.MemberApparentEntity.TyparsNoRange.Length let virtualCall = (membInfo.MemberFlags.IsOverrideOrExplicitImpl || membInfo.MemberFlags.IsDispatchSlot) && @@ -7607,7 +7909,6 @@ and rewriteObjExprInterfaceImpl env (ty, overrides) = and rewriteModuleOrNamespaceExpr env x = match x with - (* | ModuleOrNamespaceExprWithSig(mty, e, m) -> ModuleOrNamespaceExprWithSig(mty, rewriteModuleOrNamespaceExpr env e, m) *) | ModuleOrNamespaceExprWithSig(mty, def, m) -> ModuleOrNamespaceExprWithSig(mty, rewriteModuleOrNamespaceDef env def, m) and rewriteModuleOrNamespaceDefs env x = List.map (rewriteModuleOrNamespaceDef env) x @@ -7640,9 +7941,9 @@ let MakeExportRemapping viewedCcu (mspec:ModuleOrNamespace) = let accEntityRemap (entity:Entity) acc = match tryRescopeEntity viewedCcu entity with - | Some eref -> + | ValueSome eref -> addTyconRefRemap (mkLocalTyconRef entity) eref acc - | None -> + | _ -> if entity.IsNamespace then acc else @@ -7651,9 +7952,9 @@ let MakeExportRemapping viewedCcu (mspec:ModuleOrNamespace) = let accValRemap (vspec:Val) acc = // The acc contains the entity remappings match tryRescopeVal viewedCcu acc vspec with - | Some vref -> + | ValueSome vref -> {acc with valRemap=acc.valRemap.Add vspec vref } - | None -> + | _ -> error(InternalError("Unexpected value without a pubpath when remapping assembly data", vspec.Range)) let mty = mspec.ModuleOrNamespaceType @@ -7676,17 +7977,26 @@ let MakeExportRemapping viewedCcu (mspec:ModuleOrNamespace) = let rec remapEntityDataToNonLocal g tmenv (d: Entity) = let tps', tmenvinner = tmenvCopyRemapAndBindTypars (remapAttribs g tmenv) tmenv (d.entity_typars.Force(d.entity_range)) - + let typarsR = LazyWithContext.NotLazy tps' + let attribsR = d.entity_attribs |> remapAttribs g tmenvinner + let tyconReprR = d.entity_tycon_repr |> remapTyconRepr g tmenvinner + let tyconAbbrevR = d.TypeAbbrev |> Option.map (remapType tmenvinner) + let tyconTcaugR = d.entity_tycon_tcaug |> remapTyconAug tmenvinner + let modulContentsR = + MaybeLazy.Strict (d.entity_modul_contents.Value + |> mapImmediateValsAndTycons (remapTyconToNonLocal g tmenv) (remapValToNonLocal g tmenv)) + let exnInfoR = d.ExceptionInfo |> remapTyconExnInfo g tmenvinner { d with - entity_typars = LazyWithContext.NotLazy tps'; - entity_attribs = d.entity_attribs |> remapAttribs g tmenvinner; - entity_tycon_repr = d.entity_tycon_repr |> remapTyconRepr g tmenvinner; - entity_tycon_abbrev = d.entity_tycon_abbrev |> Option.map (remapType tmenvinner) ; - entity_tycon_tcaug = d.entity_tycon_tcaug |> remapTyconAug tmenvinner ; - entity_modul_contents = - MaybeLazy.Strict (d.entity_modul_contents.Value - |> mapImmediateValsAndTycons (remapTyconToNonLocal g tmenv) (remapValToNonLocal g tmenv)); - entity_exn_info = d.entity_exn_info |> remapTyconExnInfo g tmenvinner} + entity_typars = typarsR + entity_attribs = attribsR + entity_tycon_repr = tyconReprR + entity_tycon_tcaug = tyconTcaugR + entity_modul_contents = modulContentsR + entity_opt_data = + match d.entity_opt_data with + | Some dd -> + Some { dd with entity_tycon_abbrev = tyconAbbrevR; entity_exn_info = exnInfoR } + | _ -> None } and remapTyconToNonLocal g tmenv x = x |> NewModifiedTycon (remapEntityDataToNonLocal g tmenv) @@ -7981,17 +8291,17 @@ let rec mkCompiledTuple g isStruct (argtys, args, m) = let argtysAB = argtysA @ [ty8] (mkCompiledTupleTyconRef g isStruct (List.length argtysAB), argtysAB, argsA @ [v8], m) -let mkILMethodSpecForTupleItem (_g : TcGlobals) (typ:ILType) n = - mkILNonGenericInstanceMethSpecInTy(typ, (if n < goodTupleFields then "get_Item"+(n+1).ToString() else "get_Rest"), [], mkILTyvarTy (uint16 n)) +let mkILMethodSpecForTupleItem (_g : TcGlobals) (ty:ILType) n = + mkILNonGenericInstanceMethSpecInTy(ty, (if n < goodTupleFields then "get_Item"+(n+1).ToString() else "get_Rest"), [], mkILTyvarTy (uint16 n)) -let mkILFieldSpecForTupleItem (typ:ILType) n = - mkILFieldSpecInTy (typ, (if n < goodTupleFields then "Item"+(n+1).ToString() else "Rest"), mkILTyvarTy (uint16 n)) +let mkILFieldSpecForTupleItem (ty:ILType) n = + mkILFieldSpecInTy (ty, (if n < goodTupleFields then "Item"+(n+1).ToString() else "Rest"), mkILTyvarTy (uint16 n)) -let mkGetTupleItemN g m n (typ:ILType) isStruct te retty = +let mkGetTupleItemN g m n (ty:ILType) isStruct te retty = if isStruct then - mkAsmExpr([mkNormalLdfld (mkILFieldSpecForTupleItem typ n) ], [], [te], [retty], m) + mkAsmExpr([mkNormalLdfld (mkILFieldSpecForTupleItem ty n) ], [], [te], [retty], m) else - mkAsmExpr([IL.mkNormalCall(mkILMethodSpecForTupleItem g typ n)], [], [te], [retty], m) + mkAsmExpr([IL.mkNormalCall(mkILMethodSpecForTupleItem g ty n)], [], [te], [retty], m) /// Match an Int32 constant expression let (|Int32Expr|_|) expr = match expr with @@ -8163,3 +8473,12 @@ let BindUnitVars g (mvs:Val list, paramInfos:ArgReprInfo list, body) = | _ -> mvs, body +let isThreadOrContextStatic g attrs = + HasFSharpAttributeOpt g g.attrib_ThreadStaticAttribute attrs || + HasFSharpAttributeOpt g g.attrib_ContextStaticAttribute attrs + +let mkUnitDelayLambda (g: TcGlobals) m e = + let uv, _ = mkCompGenLocal m "unitVar" g.unit_ty + mkLambda m uv (e, tyOfExpr g e) + + diff --git a/src/fsharp/TastOps.fsi b/src/fsharp/TastOps.fsi index 04410eae1c1..6723cb84c2e 100755 --- a/src/fsharp/TastOps.fsi +++ b/src/fsharp/TastOps.fsi @@ -9,6 +9,7 @@ open Internal.Utilities open Microsoft.FSharp.Compiler.AbstractIL open Microsoft.FSharp.Compiler.AbstractIL.IL open Microsoft.FSharp.Compiler.AbstractIL.Internal +open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library open Microsoft.FSharp.Compiler open Microsoft.FSharp.Compiler.Range open Microsoft.FSharp.Compiler.Rational @@ -29,36 +30,52 @@ open Microsoft.FSharp.Compiler.ExtensionTyping type Erasure = EraseAll | EraseMeasures | EraseNone +/// Check the equivalence of two types up to an erasure flag val typeEquivAux : Erasure -> TcGlobals -> TType -> TType -> bool + +/// Check the equivalence of two types val typeEquiv : TcGlobals -> TType -> TType -> bool + +/// Check the equivalence of two units-of-measure val measureEquiv : TcGlobals -> Measure -> Measure -> bool + +/// Reduce a type to its more anonical form subject to an erasure flag, inference equations and abbreviations val stripTyEqnsWrtErasure: Erasure -> TcGlobals -> TType -> TType //------------------------------------------------------------------------- // Build common types //------------------------------------------------------------------------- +/// Build a function type val mkFunTy : TType -> TType -> TType + +/// Build a function type val ( --> ) : TType -> TType -> TType -val tryMkForallTy : Typars -> TType -> TType + +/// Build a type-forall anonymous generic type if necessary +val mkForallTyIfNeeded : Typars -> TType -> TType + val ( +-> ) : Typars -> TType -> TType + +/// Build a curried function type val mkIteratedFunTy : TTypes -> TType -> TType + +/// Get the natural type of a single argument amongst a set of curried arguments val typeOfLambdaArg : range -> Val list -> TType + +/// Get the curried type corresponding to a lambda val mkMultiLambdaTy : range -> Val list -> TType -> TType -val mkLambdaTy : Typars -> TTypes -> TType -> TType -//------------------------------------------------------------------------- -// Module publication, used while compiling fslib. -//------------------------------------------------------------------------- +/// Get the curried type corresponding to a lambda +val mkLambdaTy : Typars -> TTypes -> TType -> TType +/// Module publication, used while compiling fslib. val ensureCcuHasModuleOrNamespaceAtPath : CcuThunk -> Ident list -> CompilationPath -> XmlDoc -> unit -//------------------------------------------------------------------------- -// Miscellaneous accessors on terms -//------------------------------------------------------------------------- - +/// Ignore 'Expr.Link' in an expression val stripExpr : Expr -> Expr +/// Get the values for a set of bindings val valsOfBinds : Bindings -> Vals val (|ExprValWithPossibleTypeInst|_|) : Expr -> (ValRef * ValUseFlag * TType list * range) option @@ -136,6 +153,7 @@ val mkMultiLambdaBind : Val -> SequencePointInfoForBinding -> range -> Typars -> val mkCompGenBind : Val -> Expr -> Binding val mkCompGenBinds : Val list -> Exprs -> Bindings val mkCompGenLet : range -> Val -> Expr -> Expr -> Expr +val mkCompGenLetIn: range -> string -> TType -> Expr -> (Val * Expr -> Expr) -> Expr // Invisible bindings are never given a sequence point and should never have side effects val mkInvisibleLet : range -> Val -> Expr -> Expr -> Expr @@ -163,6 +181,9 @@ val isBeingGeneralized : Typar -> TypeScheme -> bool val mkLazyAnd : TcGlobals -> range -> Expr -> Expr -> Expr val mkLazyOr : TcGlobals -> range -> Expr -> Expr -> Expr val mkByrefTy : TcGlobals -> TType -> TType +val mkByrefTyWithInference : TcGlobals -> TType -> TType -> TType +val mkInByrefTy : TcGlobals -> TType -> TType +val mkOutByrefTy : TcGlobals -> TType -> TType //------------------------------------------------------------------------- // Make construction operations @@ -181,12 +202,12 @@ val mkReraiseLibCall : TcGlobals -> TType -> range -> Expr //------------------------------------------------------------------------- val mkTupleFieldGet : TcGlobals -> TupInfo * Expr * TypeInst * int * range -> Expr -val mkRecdFieldGetViaExprAddr : Expr * RecdFieldRef * TypeInst * range -> Expr -val mkRecdFieldGetAddrViaExprAddr : Expr * RecdFieldRef * TypeInst * range -> Expr -val mkStaticRecdFieldGet : RecdFieldRef * TypeInst * range -> Expr -val mkStaticRecdFieldSet : RecdFieldRef * TypeInst * Expr * range -> Expr -val mkStaticRecdFieldGetAddr : RecdFieldRef * TypeInst * range -> Expr -val mkRecdFieldSetViaExprAddr : Expr * RecdFieldRef * TypeInst * Expr * range -> Expr +val mkRecdFieldGetViaExprAddr : Expr * RecdFieldRef * TypeInst * range -> Expr +val mkRecdFieldGetAddrViaExprAddr : readonly: bool * Expr * RecdFieldRef * TypeInst * range -> Expr +val mkStaticRecdFieldGet : RecdFieldRef * TypeInst * range -> Expr +val mkStaticRecdFieldSet : RecdFieldRef * TypeInst * Expr * range -> Expr +val mkStaticRecdFieldGetAddr : readonly: bool * RecdFieldRef * TypeInst * range -> Expr +val mkRecdFieldSetViaExprAddr : Expr * RecdFieldRef * TypeInst * Expr * range -> Expr val mkUnionCaseTagGetViaExprAddr : Expr * TyconRef * TypeInst * range -> Expr /// Make a 'TOp.UnionCaseProof' expression, which proves a union value is over a particular case (used only for ref-unions, not struct-unions) @@ -200,7 +221,7 @@ val mkUnionCaseFieldGetProvenViaExprAddr : Expr * UnionCaseRef * TypeInst * in /// Build a 'TOp.UnionCaseFieldGetAddr' expression for a field of a union when we've already determined the value to be a particular union case. For ref-unions, /// the input expression has 'TType_ucase', which is an F# compiler internal "type" corresponding to the union case. For struct-unions, /// the input should be the address of the expression. -val mkUnionCaseFieldGetAddrProvenViaExprAddr : Expr * UnionCaseRef * TypeInst * int * range -> Expr +val mkUnionCaseFieldGetAddrProvenViaExprAddr : readonly: bool * Expr * UnionCaseRef * TypeInst * int * range -> Expr /// Build a 'TOp.UnionCaseFieldGetAddr' expression for a field of a union when we've already determined the value to be a particular union case. For ref-unions, /// the input expression has 'TType_ucase', which is an F# compiler internal "type" corresponding to the union case. For struct-unions, @@ -218,22 +239,42 @@ val mkUnionCaseFieldGetUnproven : TcGlobals -> Expr * UnionCaseRef * TypeIn val mkExnCaseFieldGet : Expr * TyconRef * int * range -> Expr val mkExnCaseFieldSet : Expr * TyconRef * int * Expr * range -> Expr -val mkArrayElemAddress : TcGlobals -> ILReadonly * bool * ILArrayShape * TType * Expr * Expr * range -> Expr +val mkArrayElemAddress : TcGlobals -> readonly: bool * ILReadonly * bool * ILArrayShape * TType * Expr list * range -> Expr //------------------------------------------------------------------------- // Compiled view of tuples //------------------------------------------------------------------------- +/// The largest tuple before we start encoding, i.e. 7 val maxTuple : int + +/// The number of fields in the largest tuple before we start encoding, i.e. 7 val goodTupleFields : int + +/// Check if a TyconRef is for a .NET tuple type. Currently this includes Tuple`1 even though +/// that' not really part of the target set of TyconRef used to represent F# tuples. val isCompiledTupleTyconRef : TcGlobals -> TyconRef -> bool + +/// Get a TyconRef for a .NET tuple type val mkCompiledTupleTyconRef : TcGlobals -> bool -> int -> TyconRef + +/// Convert from F# tuple types to .NET tuple types. val mkCompiledTupleTy : TcGlobals -> bool -> TTypes -> TType + +/// Convert from F# tuple creation expression to .NET tuple creation expressions val mkCompiledTuple : TcGlobals -> bool -> TTypes * Exprs * range -> TyconRef * TTypes * Exprs * range + +/// Make a TAST expression representing getting an item fromm a tuple val mkGetTupleItemN : TcGlobals -> range -> int -> ILType -> bool -> Expr -> TType -> Expr +/// Evaluate the TupInfo to work out if it is a struct or a ref. Currently this is very simple +/// but TupInfo may later be used carry variables that infer structness. val evalTupInfoIsStruct : TupInfo -> bool +/// If it is a tuple type, ensure it's outermost type is a .NET tuple type, otherwise leave unchanged +val convertToTypeWithMetadataIfPossible : TcGlobals -> TType -> TType + + //------------------------------------------------------------------------- // Take the address of an expression, or force it into a mutable local. Any allocated // mutable local may need to be kept alive over a larger expression, hence we return @@ -242,9 +283,9 @@ val evalTupInfoIsStruct : TupInfo -> bool //------------------------------------------------------------------------- exception DefensiveCopyWarning of string * range -type Mutates = DefinitelyMutates | PossiblyMutates | NeverMutates -val mkExprAddrOfExprAux : TcGlobals -> bool -> bool -> Mutates -> Expr -> ValRef option -> range -> (Val * Expr) option * Expr -val mkExprAddrOfExpr : TcGlobals -> bool -> bool -> Mutates -> Expr -> ValRef option -> range -> (Expr -> Expr) * Expr +type Mutates = AddressOfOp | DefinitelyMutates | PossiblyMutates | NeverMutates +val mkExprAddrOfExprAux : TcGlobals -> bool -> bool -> Mutates -> Expr -> ValRef option -> range -> (Val * Expr) option * Expr * bool * bool +val mkExprAddrOfExpr : TcGlobals -> bool -> bool -> Mutates -> Expr -> ValRef option -> range -> (Expr -> Expr) * Expr * bool * bool //------------------------------------------------------------------------- // Tables keyed on values and/or type parameters @@ -275,40 +316,64 @@ type ValHash<'T> = /// Maps Val's to list of T based on stamp keys [] type ValMultiMap<'T> = + + member ContainsKey : Val -> bool + member Find : Val -> 'T list + member Add : Val * 'T -> ValMultiMap<'T> + member Remove : Val -> ValMultiMap<'T> + member Contents : StampMap<'T list> + static member Empty : ValMultiMap<'T> [] /// Maps Typar to T based on stamp keys type TyparMap<'T> = + member Item : Typar -> 'T with get + member ContainsKey : Typar -> bool + + member TryFind : Typar -> 'T option + member Add : Typar * 'T -> TyparMap<'T> + static member Empty : TyparMap<'T> [] /// Maps TyconRef to T based on stamp keys type TyconRefMap<'T> = + member Item : TyconRef -> 'T with get + member TryFind : TyconRef -> 'T option + member ContainsKey : TyconRef -> bool + member Add : TyconRef -> 'T -> TyconRefMap<'T> + member Remove : TyconRef -> TyconRefMap<'T> + member IsEmpty : bool + static member Empty : TyconRefMap<'T> + static member OfList : (TyconRef * 'T) list -> TyconRefMap<'T> /// Maps TyconRef to list of T based on stamp keys [] type TyconRefMultiMap<'T> = + member Find : TyconRef -> 'T list + member Add : TyconRef * 'T -> TyconRefMultiMap<'T> + static member Empty : TyconRefMultiMap<'T> - static member OfList : (TyconRef * 'T) list -> TyconRefMultiMap<'T> + static member OfList : (TyconRef * 'T) list -> TyconRefMultiMap<'T> //------------------------------------------------------------------------- // Orderings on Tycon, Val, RecdFieldRef, Typar @@ -418,7 +483,8 @@ val isFSharpStructOrEnumTy : TcGlobals -> TType -> bool val isFSharpEnumTy : TcGlobals -> TType -> bool val isTyparTy : TcGlobals -> TType -> bool val isAnyParTy : TcGlobals -> TType -> bool -val tryAnyParTy : TcGlobals -> TType -> Typar option +val tryAnyParTy : TcGlobals -> TType -> ValueOption +val tryAnyParTyOption : TcGlobals -> TType -> Typar option val isMeasureTy : TcGlobals -> TType -> bool val mkAppTy : TyconRef -> TypeInst -> TType @@ -427,16 +493,18 @@ val mkProvenUnionCaseTy : UnionCaseRef -> TypeInst -> TType val isProvenUnionCaseTy : TType -> bool val isAppTy : TcGlobals -> TType -> bool +val tryAppTy : TcGlobals -> TType -> ValueOption val destAppTy : TcGlobals -> TType -> TyconRef * TypeInst val tcrefOfAppTy : TcGlobals -> TType -> TyconRef -val tryDestAppTy : TcGlobals -> TType -> TyconRef option -val tryDestTyparTy : TcGlobals -> TType -> Typar option -val tryDestFunTy : TcGlobals -> TType -> (TType * TType) option +val tryDestAppTy : TcGlobals -> TType -> ValueOption +val tryDestTyparTy : TcGlobals -> TType -> ValueOption +val tryDestFunTy : TcGlobals -> TType -> ValueOption<(TType * TType)> val argsOfAppTy : TcGlobals -> TType -> TypeInst val mkInstForAppTy : TcGlobals -> TType -> TyparInst /// Try to get a TyconRef for a type without erasing type abbreviations -val tryNiceEntityRefOfTy : TType -> TyconRef option +val tryNiceEntityRefOfTy : TType -> ValueOption +val tryNiceEntityRefOfTyOption : TType -> TyconRef option val domainOfFunTy : TcGlobals -> TType -> TType @@ -500,6 +568,7 @@ val emptyFreeTycons : FreeTycons val unionFreeTycons : FreeTycons -> FreeTycons -> FreeTycons val emptyFreeTyvars : FreeTyvars +val isEmptyFreeTyvars : FreeTyvars -> bool val unionFreeTyvars : FreeTyvars -> FreeTyvars -> FreeTyvars val emptyFreeLocals : FreeLocals @@ -529,6 +598,7 @@ val freeInTypeLeftToRight : TcGlobals -> bool -> TType -> Typars val freeInTypesLeftToRight : TcGlobals -> bool -> TType list -> Typars val freeInTypesLeftToRightSkippingConstraints : TcGlobals -> TType list -> Typars +val freeInModuleTy: ModuleOrNamespaceType -> FreeTyvars val isDimensionless : TcGlobals -> TType -> bool @@ -663,7 +733,7 @@ val tagEntityRefName: xref: EntityRef -> name: string -> StructuredFormat.Tagged /// Return the full text for an item as we want it displayed to the user as a fully qualified entity val fullDisplayTextOfModRef : ModuleOrNamespaceRef -> string -val fullDisplayTextOfParentOfModRef : ModuleOrNamespaceRef -> string option +val fullDisplayTextOfParentOfModRef : ModuleOrNamespaceRef -> ValueOption val fullDisplayTextOfValRef : ValRef -> string val fullDisplayTextOfValRefAsLayout : ValRef -> StructuredFormat.Layout val fullDisplayTextOfTyconRef : TyconRef -> string @@ -817,8 +887,8 @@ val SigTypeOfImplFile : TypedImplFile -> ModuleOrNamespaceType //------------------------------------------------------------------------- -val tryRescopeEntity : CcuThunk -> Entity -> EntityRef option -val tryRescopeVal : CcuThunk -> Remap -> Val -> ValRef option +val tryRescopeEntity : CcuThunk -> Entity -> ValueOption +val tryRescopeVal : CcuThunk -> Remap -> Val -> ValueOption val MakeExportRemapping : CcuThunk -> ModuleOrNamespace -> Remap val ApplyExportRemappingToEntity : TcGlobals -> Remap -> ModuleOrNamespace -> ModuleOrNamespace @@ -850,7 +920,7 @@ val mkAddrSet : range -> ValRef -> Expr -> Expr /// *localv_ptr val mkAddrGet : range -> ValRef -> Expr /// &localv -val mkValAddr : range -> ValRef -> Expr +val mkValAddr : range -> readonly: bool -> ValRef -> Expr //------------------------------------------------------------------------- // Note these take the address of the record expression if it is a struct, and @@ -954,10 +1024,11 @@ val ExprStats : Expr -> string //------------------------------------------------------------------------- val mkNativePtrTy : TcGlobals -> TType -> TType +val mkVoidPtrTy : TcGlobals -> TType val mkArrayType : TcGlobals -> TType -> TType val isOptionTy : TcGlobals -> TType -> bool val destOptionTy : TcGlobals -> TType -> TType -val tryDestOptionTy : TcGlobals -> TType -> TType option +val tryDestOptionTy : TcGlobals -> TType -> ValueOption val isLinqExpressionTy : TcGlobals -> TType -> bool val destLinqExpressionTy : TcGlobals -> TType -> TType @@ -1070,11 +1141,14 @@ val TypeHasDefaultValue : TcGlobals -> range -> TType -> bool val isAbstractTycon : Tycon -> bool -val isUnionCaseRefAllocObservable : UnionCaseRef -> bool -val isRecdOrUnionOrStructTyconRefAllocObservable : TcGlobals -> TyconRef -> bool -val isExnAllocObservable : TyconRef -> bool +val isUnionCaseRefDefinitelyMutable : UnionCaseRef -> bool +val isRecdOrUnionOrStructTyconRefDefinitelyMutable : TyconRef -> bool +val isExnDefinitelyMutable : TyconRef -> bool val isUnionCaseFieldMutable : TcGlobals -> UnionCaseRef -> int -> bool val isExnFieldMutable : TyconRef -> int -> bool +val isRecdOrStructTyconRefReadOnly: TcGlobals -> range -> TyconRef -> bool +val isRecdOrStructTyconRefAssumedImmutable: TcGlobals -> TyconRef -> bool +val isRecdOrStructTyReadOnly: TcGlobals -> range -> TType -> bool val useGenuineField : Tycon -> RecdField -> bool val ComputeFieldName : Tycon -> RecdField -> string @@ -1201,15 +1275,77 @@ val mkCallArrayGet : TcGlobals -> range -> TType -> Expr -> Expr -> Ex val mkCallArray2DGet : TcGlobals -> range -> TType -> Expr -> Expr -> Expr -> Expr val mkCallArray3DGet : TcGlobals -> range -> TType -> Expr -> Expr -> Expr -> Expr -> Expr val mkCallArray4DGet : TcGlobals -> range -> TType -> Expr -> Expr -> Expr -> Expr -> Expr -> Expr +val mkCallArraySet : TcGlobals -> range -> TType -> Expr -> Expr -> Expr -> Expr +val mkCallArray2DSet : TcGlobals -> range -> TType -> Expr -> Expr -> Expr -> Expr -> Expr +val mkCallArray3DSet : TcGlobals -> range -> TType -> Expr -> Expr -> Expr -> Expr -> Expr -> Expr +val mkCallArray4DSet : TcGlobals -> range -> TType -> Expr -> Expr -> Expr -> Expr -> Expr -> Expr -> Expr + +val mkCallHash : TcGlobals -> range -> TType -> Expr -> Expr +val mkCallBox : TcGlobals -> range -> TType -> Expr -> Expr +val mkCallIsNull : TcGlobals -> range -> TType -> Expr -> Expr +val mkCallIsNotNull : TcGlobals -> range -> TType -> Expr -> Expr val mkCallRaise : TcGlobals -> range -> TType -> Expr -> Expr val mkCallGenericComparisonWithComparerOuter : TcGlobals -> range -> TType -> Expr -> Expr -> Expr -> Expr val mkCallGenericEqualityEROuter : TcGlobals -> range -> TType -> Expr -> Expr -> Expr -val mkCallEqualsOperator : TcGlobals -> range -> TType -> Expr -> Expr -> Expr -val mkCallSubtractionOperator : TcGlobals -> range -> TType -> Expr -> Expr -> Expr val mkCallGenericEqualityWithComparerOuter : TcGlobals -> range -> TType -> Expr -> Expr -> Expr -> Expr val mkCallGenericHashWithComparerOuter : TcGlobals -> range -> TType -> Expr -> Expr -> Expr +val mkCallEqualsOperator : TcGlobals -> range -> TType -> Expr -> Expr -> Expr +val mkCallNotEqualsOperator : TcGlobals -> range -> TType -> Expr -> Expr -> Expr +val mkCallLessThanOperator : TcGlobals -> range -> TType -> Expr -> Expr -> Expr +val mkCallLessThanOrEqualsOperator : TcGlobals -> range -> TType -> Expr -> Expr -> Expr +val mkCallGreaterThanOperator : TcGlobals -> range -> TType -> Expr -> Expr -> Expr +val mkCallGreaterThanOrEqualsOperator : TcGlobals -> range -> TType -> Expr -> Expr -> Expr + +val mkCallAdditionOperator : TcGlobals -> range -> TType -> Expr -> Expr -> Expr +val mkCallSubtractionOperator : TcGlobals -> range -> TType -> Expr -> Expr -> Expr +val mkCallMultiplyOperator : TcGlobals -> range -> TType -> Expr -> Expr -> Expr +val mkCallDivisionOperator : TcGlobals -> range -> TType -> Expr -> Expr -> Expr +val mkCallModulusOperator : TcGlobals -> range -> TType -> Expr -> Expr -> Expr +val mkCallBitwiseAndOperator : TcGlobals -> range -> TType -> Expr -> Expr -> Expr +val mkCallBitwiseOrOperator : TcGlobals -> range -> TType -> Expr -> Expr -> Expr +val mkCallBitwiseXorOperator : TcGlobals -> range -> TType -> Expr -> Expr -> Expr +val mkCallShiftLeftOperator : TcGlobals -> range -> TType -> Expr -> Expr -> Expr +val mkCallShiftRightOperator : TcGlobals -> range -> TType -> Expr -> Expr -> Expr + +val mkCallUnaryNegOperator : TcGlobals -> range -> TType -> Expr -> Expr +val mkCallUnaryNotOperator : TcGlobals -> range -> TType -> Expr -> Expr + +val mkCallAdditionChecked : TcGlobals -> range -> TType -> Expr -> Expr -> Expr +val mkCallSubtractionChecked : TcGlobals -> range -> TType -> Expr -> Expr -> Expr +val mkCallMultiplyChecked : TcGlobals -> range -> TType -> Expr -> Expr -> Expr +val mkCallUnaryNegChecked : TcGlobals -> range -> TType -> Expr -> Expr + +val mkCallToByteChecked : TcGlobals -> range -> TType -> Expr -> Expr +val mkCallToSByteChecked : TcGlobals -> range -> TType -> Expr -> Expr +val mkCallToInt16Checked : TcGlobals -> range -> TType -> Expr -> Expr +val mkCallToUInt16Checked : TcGlobals -> range -> TType -> Expr -> Expr +val mkCallToIntChecked : TcGlobals -> range -> TType -> Expr -> Expr +val mkCallToInt32Checked : TcGlobals -> range -> TType -> Expr -> Expr +val mkCallToUInt32Checked : TcGlobals -> range -> TType -> Expr -> Expr +val mkCallToInt64Checked : TcGlobals -> range -> TType -> Expr -> Expr +val mkCallToUInt64Checked : TcGlobals -> range -> TType -> Expr -> Expr +val mkCallToIntPtrChecked : TcGlobals -> range -> TType -> Expr -> Expr +val mkCallToUIntPtrChecked : TcGlobals -> range -> TType -> Expr -> Expr + +val mkCallToByteOperator : TcGlobals -> range -> TType -> Expr -> Expr +val mkCallToSByteOperator : TcGlobals -> range -> TType -> Expr -> Expr +val mkCallToInt16Operator : TcGlobals -> range -> TType -> Expr -> Expr +val mkCallToUInt16Operator : TcGlobals -> range -> TType -> Expr -> Expr +val mkCallToIntOperator : TcGlobals -> range -> TType -> Expr -> Expr +val mkCallToInt32Operator : TcGlobals -> range -> TType -> Expr -> Expr +val mkCallToUInt32Operator : TcGlobals -> range -> TType -> Expr -> Expr +val mkCallToInt64Operator : TcGlobals -> range -> TType -> Expr -> Expr +val mkCallToUInt64Operator : TcGlobals -> range -> TType -> Expr -> Expr +val mkCallToSingleOperator : TcGlobals -> range -> TType -> Expr -> Expr +val mkCallToDoubleOperator : TcGlobals -> range -> TType -> Expr -> Expr +val mkCallToIntPtrOperator : TcGlobals -> range -> TType -> Expr -> Expr +val mkCallToUIntPtrOperator : TcGlobals -> range -> TType -> Expr -> Expr + +val mkCallToCharOperator : TcGlobals -> range -> TType -> Expr -> Expr +val mkCallToEnumOperator : TcGlobals -> range -> TType -> Expr -> Expr + val mkCallDeserializeQuotationFSharp20Plus : TcGlobals -> range -> Expr -> Expr -> Expr -> Expr -> Expr val mkCallDeserializeQuotationFSharp40Plus : TcGlobals -> range -> Expr -> Expr -> Expr -> Expr -> Expr -> Expr val mkCallCastQuotation : TcGlobals -> range -> TType -> Expr -> Expr @@ -1291,7 +1427,6 @@ val TryFindAttributeUsageAttribute : TcGlobals -> range -> TyconRef -> bool opti val TryDecodeTypeProviderAssemblyAttr : ILGlobals -> ILAttribute -> string option #endif val IsSignatureDataVersionAttr : ILAttribute -> bool -val ILThingHasExtensionAttribute : ILAttributes -> bool val TryFindAutoOpenAttr : IL.ILGlobals -> ILAttribute -> string option val TryFindInternalsVisibleToAttr : IL.ILGlobals -> ILAttribute -> string option val IsMatchingSignatureDataVersionAttr : IL.ILGlobals -> ILVersionInfo -> ILAttribute -> bool @@ -1310,13 +1445,21 @@ val mkCompilerGeneratedAttr : TcGlobals -> int -> ILAtt // More common type construction //------------------------------------------------------------------------- +val isInByrefTy : TcGlobals -> TType -> bool +val isOutByrefTy : TcGlobals -> TType -> bool val isByrefTy : TcGlobals -> TType -> bool + val isNativePtrTy : TcGlobals -> TType -> bool val destByrefTy : TcGlobals -> TType -> TType val destNativePtrTy : TcGlobals -> TType -> TType -val isByrefLikeTyconRef : TcGlobals -> TyconRef -> bool -val isByrefLikeTy : TcGlobals -> TType -> bool +val isByrefTyconRef : TcGlobals -> TyconRef -> bool +val isByrefLikeTyconRef : TcGlobals -> range -> TyconRef -> bool +val isSpanLikeTyconRef : TcGlobals -> range -> TyconRef -> bool +val isByrefLikeTy : TcGlobals -> range -> TType -> bool + +/// Check if the type is a byref-like but not a byref. +val isSpanLikeTy : TcGlobals -> range -> TType -> bool //------------------------------------------------------------------------- // Tuple constructors/destructors @@ -1464,3 +1607,8 @@ val (|InnerExprPat|) : Expr -> Expr val allValsOfModDef : ModuleOrNamespaceExpr -> seq val BindUnitVars : TcGlobals -> (Val list * ArgReprInfo list * Expr) -> Val list * Expr + +val isThreadOrContextStatic: TcGlobals -> Attrib list -> bool + +val mkUnitDelayLambda: TcGlobals -> range -> Expr -> Expr + diff --git a/src/fsharp/TastPickle.fs b/src/fsharp/TastPickle.fs index 18307ce1559..3f184165ad2 100755 --- a/src/fsharp/TastPickle.fs +++ b/src/fsharp/TastPickle.fs @@ -119,7 +119,7 @@ type WriterState = ostrings: Table opubpaths: Table onlerefs: Table - osimpletyps: Table + osimpletys: Table oglobals : TcGlobals ofile : string /// Indicates if we are using in-memory format, where we store XML docs as well @@ -150,7 +150,7 @@ type ReaderState = istrings: InputTable ipubpaths: InputTable inlerefs: InputTable - isimpletyps: InputTable + isimpletys: InputTable ifile: string iILModule : ILModuleDef option // the Abstract IL metadata for the DLL being read } @@ -505,9 +505,13 @@ let p_maybe_lazy p (x: MaybeLazy<_>) st = p_lazy_impl p x.Value st let p_hole () = - let h = ref (None : 'T pickler option) + let h = ref (None : ('T -> WriterState -> unit) option) (fun f -> h := Some f),(fun x st -> match !h with Some f -> f x st | None -> pfailwith st "p_hole: unfilled hole") +let p_hole2 () = + let h = ref (None : ('Arg -> 'T -> WriterState -> unit) option) + (fun f -> h := Some f),(fun arg x st -> match !h with Some f -> f arg x st | None -> pfailwith st "p_hole2: unfilled hole") + let u_array_core f n st = let res = Array.zeroCreate n for i = 0 to n-1 do @@ -686,16 +690,16 @@ let p_nleref x st = p_int (encode_nleref st.occus st.ostrings st.onlerefs st.osc // Simple types are types like "int", represented as TType(Ref_nonlocal(...,"int"),[]). // A huge number of these occur in pickled F# data, so make them unique. let decode_simpletyp st _ccuTab _stringTab nlerefTab a = TType_app(ERefNonLocal (lookup_nleref st nlerefTab a),[]) -let lookup_simpletyp st simpletypTab x = lookup_uniq st simpletypTab x +let lookup_simpletyp st simpleTyTab x = lookup_uniq st simpleTyTab x let u_encoded_simpletyp st = u_int st -let u_simpletyp st = lookup_uniq st st.isimpletyps (u_int st) -let encode_simpletyp ccuTab stringTab nlerefTab simpletypTab thisCcu a = encode_uniq simpletypTab (encode_nleref ccuTab stringTab nlerefTab thisCcu a) +let u_simpletyp st = lookup_uniq st st.isimpletys (u_int st) +let encode_simpletyp ccuTab stringTab nlerefTab simpleTyTab thisCcu a = encode_uniq simpleTyTab (encode_nleref ccuTab stringTab nlerefTab thisCcu a) let p_encoded_simpletyp x st = p_int x st -let p_simpletyp x st = p_int (encode_simpletyp st.occus st.ostrings st.onlerefs st.osimpletyps st.oscope x) st +let p_simpletyp x st = p_int (encode_simpletyp st.occus st.ostrings st.onlerefs st.osimpletys st.oscope x) st type sizes = int * int * int let pickleObjWithDanglingCcus inMem file g scope p x = - let ccuNameTab,(sizes: sizes),stringTab,pubpathTab,nlerefTab,simpletypTab,phase1bytes = + let ccuNameTab,(sizes: sizes),stringTab,pubpathTab,nlerefTab,simpleTyTab,phase1bytes = let st1 = { os = ByteBuffer.Create 100000 oscope=scope @@ -706,7 +710,7 @@ let pickleObjWithDanglingCcus inMem file g scope p x = ostrings=Table<_>.Create "ostrings" onlerefs=Table<_>.Create "onlerefs" opubpaths=Table<_>.Create "opubpaths" - osimpletyps=Table<_>.Create "osimpletyps" + osimpletys=Table<_>.Create "osimpletys" oglobals=g ofile=file oInMem=inMem } @@ -715,8 +719,8 @@ let pickleObjWithDanglingCcus inMem file g scope p x = st1.otycons.Size, st1.otypars.Size, st1.ovals.Size - st1.occus, sizes, st1.ostrings, st1.opubpaths,st1.onlerefs, st1.osimpletyps, st1.os.Close() - let phase2data = (ccuNameTab.AsArray,sizes,stringTab.AsArray,pubpathTab.AsArray,nlerefTab.AsArray,simpletypTab.AsArray,phase1bytes) + st1.occus, sizes, st1.ostrings, st1.opubpaths,st1.onlerefs, st1.osimpletys, st1.os.Close() + let phase2data = (ccuNameTab.AsArray,sizes,stringTab.AsArray,pubpathTab.AsArray,nlerefTab.AsArray,simpleTyTab.AsArray,phase1bytes) let phase2bytes = let st2 = { os = ByteBuffer.Create 100000 @@ -728,7 +732,7 @@ let pickleObjWithDanglingCcus inMem file g scope p x = ostrings=Table<_>.Create "ostrings (fake)" opubpaths=Table<_>.Create "opubpaths (fake)" onlerefs=Table<_>.Create "onlerefs (fake)" - osimpletyps=Table<_>.Create "osimpletyps (fake)" + osimpletys=Table<_>.Create "osimpletys (fake)" oglobals=g ofile=file oInMem=inMem } @@ -762,7 +766,7 @@ let unpickleObjWithDanglingCcus file ilscope (iILModule:ILModuleDef option) u (p istrings = new_itbl "istrings (fake)" [| |] inlerefs = new_itbl "inlerefs (fake)" [| |] ipubpaths = new_itbl "ipubpaths (fake)" [| |] - isimpletyps = new_itbl "isimpletyps (fake)" [| |] + isimpletys = new_itbl "isimpletys (fake)" [| |] ifile=file iILModule = iILModule } let phase2data = @@ -774,12 +778,12 @@ let unpickleObjWithDanglingCcus file ilscope (iILModule:ILModuleDef option) u (p (u_array u_encoded_nleref) (u_array u_encoded_simpletyp) u_bytes st2 - let ccuNameTab,sizes,stringTab,pubpathTab,nlerefTab,simpletypTab,phase1bytes = phase2data + let ccuNameTab,sizes,stringTab,pubpathTab,nlerefTab,simpleTyTab,phase1bytes = phase2data let ccuTab = new_itbl "iccus" (Array.map (CcuThunk.CreateDelayed) ccuNameTab) let stringTab = new_itbl "istrings" (Array.map decode_string stringTab) let pubpathTab = new_itbl "ipubpaths" (Array.map (decode_pubpath st2 stringTab) pubpathTab) let nlerefTab = new_itbl "inlerefs" (Array.map (decode_nleref st2 ccuTab stringTab) nlerefTab) - let simpletypTab = new_itbl "isimpletyps" (Array.map (decode_simpletyp st2 ccuTab stringTab nlerefTab) simpletypTab) + let simpleTyTab = new_itbl "isimpletys" (Array.map (decode_simpletyp st2 ccuTab stringTab nlerefTab) simpleTyTab) let ((ntycons,ntypars,nvals) : sizes) = sizes let data = let st1 = @@ -792,7 +796,7 @@ let unpickleObjWithDanglingCcus file ilscope (iILModule:ILModuleDef option) u (p istrings = stringTab ipubpaths = pubpathTab inlerefs = nlerefTab - isimpletyps = simpletypTab + isimpletys = simpleTyTab ifile=file iILModule = iILModule } let res = u st1 @@ -948,13 +952,13 @@ and u_ILCallSig = u_wrap (fun (a,b,c) -> {CallingConv=a; ArgTypes=b; ReturnType= and u_ILTypeSpec st = let a,b = u_tup2 u_ILTypeRef u_ILTypes st in ILTypeSpec.Create(a,b) -let p_ILMethodRef (x: ILMethodRef) st = p_tup6 p_ILTypeRef p_ILCallConv p_int p_string p_ILTypes p_ILType (x.EnclosingTypeRef,x.CallingConv,x.GenericArity,x.Name,x.ArgTypes,x.ReturnType) st +let p_ILMethodRef (x: ILMethodRef) st = p_tup6 p_ILTypeRef p_ILCallConv p_int p_string p_ILTypes p_ILType (x.DeclaringTypeRef,x.CallingConv,x.GenericArity,x.Name,x.ArgTypes,x.ReturnType) st -let p_ILFieldRef (x: ILFieldRef) st = p_tup3 p_ILTypeRef p_string p_ILType (x.EnclosingTypeRef, x.Name, x.Type) st +let p_ILFieldRef (x: ILFieldRef) st = p_tup3 p_ILTypeRef p_string p_ILType (x.DeclaringTypeRef, x.Name, x.Type) st -let p_ILMethodSpec (x: ILMethodSpec) st = p_tup3 p_ILMethodRef p_ILType p_ILTypes (x.MethodRef, x.EnclosingType, x.GenericArgs) st +let p_ILMethodSpec (x: ILMethodSpec) st = p_tup3 p_ILMethodRef p_ILType p_ILTypes (x.MethodRef, x.DeclaringType, x.GenericArgs) st -let p_ILFieldSpec (x : ILFieldSpec) st = p_tup2 p_ILFieldRef p_ILType (x.FieldRef, x.EnclosingType) st +let p_ILFieldSpec (x : ILFieldSpec) st = p_tup2 p_ILFieldRef p_ILType (x.FieldRef, x.DeclaringType) st let p_ILBasicType x st = p_int (match x with @@ -982,7 +986,7 @@ let u_ILMethodRef st = let u_ILFieldRef st = let x1,x2,x3 = u_tup3 u_ILTypeRef u_string u_ILType st - {EnclosingTypeRef=x1;Name=x2;Type=x3} + {DeclaringTypeRef=x1;Name=x2;Type=x3} let u_ILMethodSpec st = let x1,x2,x3 = u_tup3 u_ILMethodRef u_ILType u_ILTypes st @@ -990,7 +994,7 @@ let u_ILMethodSpec st = let u_ILFieldSpec st = let x1,x2 = u_tup2 u_ILFieldRef u_ILType st - {FieldRef=x1;EnclosingType=x2} + {FieldRef=x1;DeclaringType=x2} let u_ILBasicType st = match u_int st with @@ -1263,11 +1267,20 @@ let u_rfref st = let a,b = u_tup2 u_tcref u_string st in RFRef(a,b) let u_tpref st = u_local_item_ref st.itypars st // forward reference -let fill_p_typ,p_typ = p_hole() -let p_typs = (p_list p_typ) +let fill_p_ty2,p_ty2 = p_hole2() + +let p_ty = p_ty2 false +let p_tys = (p_list p_ty) let fill_p_attribs,p_attribs = p_hole() +// In F# 4.5, the type of the "this" pointer for structs is considered to be inref for the purposes of checking the implementation +// of the struct. However for backwards compat reaons we can't serialize this as the type. +let checkForInRefStructThisArg st ty = + let g = st.oglobals + let _, tauTy = tryDestForallTy g ty + isFunTy g tauTy && isFunTy g (rangeOfFunTy g tauTy) && isInByrefTy g (domainOfFunTy g tauTy) + let p_nonlocal_val_ref (nlv:NonLocalValOrMemberRef) st = let a = nlv.EnclosingEntity let key = nlv.ItemKey @@ -1277,7 +1290,11 @@ let p_nonlocal_val_ref (nlv:NonLocalValOrMemberRef) st = p_bool pkey.MemberIsOverride st p_string pkey.LogicalName st p_int pkey.TotalArgCount st - p_option p_typ key.TypeForLinkage st + let isStructThisArgPos = + match key.TypeForLinkage with + | None -> false + | Some ty -> checkForInRefStructThisArg st ty + p_option (p_ty2 isStructThisArgPos) key.TypeForLinkage st let rec p_vref ctxt x st = match x with @@ -1286,8 +1303,8 @@ let rec p_vref ctxt x st = let p_vrefs ctxt = p_list (p_vref ctxt) -let fill_u_typ,u_typ = u_hole() -let u_typs = (u_list u_typ) +let fill_u_ty,u_ty = u_hole() +let u_tys = (u_list u_ty) let fill_u_attribs,u_attribs = u_hole() let u_nonlocal_val_ref st : NonLocalValOrMemberRef = @@ -1296,7 +1313,7 @@ let u_nonlocal_val_ref st : NonLocalValOrMemberRef = let b2 = u_bool st let b3 = u_string st let c = u_int st - let d = u_option u_typ st + let d = u_option u_ty st { EnclosingEntity = a ItemKey=ValLinkageFullKey({ MemberParentMangledName=b1; MemberIsOverride=b2;LogicalName=b3; TotalArgCount=c }, d) } @@ -1360,40 +1377,40 @@ let fill_p_Expr_hole,p_expr_fwd = p_hole() let p_trait_sln sln st = match sln with | ILMethSln(a,b,c,d) -> - p_byte 0 st; p_tup4 p_typ (p_option p_ILTypeRef) p_ILMethodRef p_typs (a,b,c,d) st + p_byte 0 st; p_tup4 p_ty (p_option p_ILTypeRef) p_ILMethodRef p_tys (a,b,c,d) st | FSMethSln(a,b,c) -> - p_byte 1 st; p_tup3 p_typ (p_vref "trait") p_typs (a,b,c) st + p_byte 1 st; p_tup3 p_ty (p_vref "trait") p_tys (a,b,c) st | BuiltInSln -> p_byte 2 st | ClosedExprSln expr -> p_byte 3 st; p_expr_fwd expr st | FSRecdFieldSln(a,b,c) -> - p_byte 4 st; p_tup3 p_typs p_rfref p_bool (a,b,c) st + p_byte 4 st; p_tup3 p_tys p_rfref p_bool (a,b,c) st let p_trait (TTrait(a,b,c,d,e,f)) st = - p_tup6 p_typs p_string p_MemberFlags p_typs (p_option p_typ) (p_option p_trait_sln) (a,b,c,d,e,!f) st + p_tup6 p_tys p_string p_MemberFlags p_tys (p_option p_ty) (p_option p_trait_sln) (a,b,c,d,e,!f) st // We have to store trait solutions since they can occur in optimization data let u_trait_sln st = let tag = u_byte st match tag with | 0 -> - let (a,b,c,d) = u_tup4 u_typ (u_option u_ILTypeRef) u_ILMethodRef u_typs st + let (a,b,c,d) = u_tup4 u_ty (u_option u_ILTypeRef) u_ILMethodRef u_tys st ILMethSln(a,b,c,d) | 1 -> - let (a,b,c) = u_tup3 u_typ u_vref u_typs st + let (a,b,c) = u_tup3 u_ty u_vref u_tys st FSMethSln(a,b,c) | 2 -> BuiltInSln | 3 -> ClosedExprSln (u_expr_fwd st) | 4 -> - let (a,b,c) = u_tup3 u_typs u_rfref u_bool st + let (a,b,c) = u_tup3 u_tys u_rfref u_bool st FSRecdFieldSln(a,b,c) | _ -> ufailwith st "u_trait_sln" let u_trait st = - let a,b,c,d,e,f = u_tup6 u_typs u_string u_MemberFlags u_typs (u_option u_typ) (u_option u_trait_sln) st + let a,b,c,d,e,f = u_tup6 u_tys u_string u_MemberFlags u_tys (u_option u_ty) (u_option u_trait_sln) st TTrait (a,b,c,d,e,ref f) @@ -1464,108 +1481,125 @@ let rec u_measure_expr st = | 5 -> let a = u_measure_expr st in let b = u_rational st in Measure.RationalPower (a,b) | _ -> ufailwith st "u_measure_expr" -let p_typar_constraint x st = +let p_tyar_constraint x st = match x with - | TyparConstraint.CoercesTo (a,_) -> p_byte 0 st; p_typ a st + | TyparConstraint.CoercesTo (a,_) -> p_byte 0 st; p_ty a st | TyparConstraint.MayResolveMember(traitInfo,_) -> p_byte 1 st; p_trait traitInfo st - | TyparConstraint.DefaultsTo(_,rty,_) -> p_byte 2 st; p_typ rty st + | TyparConstraint.DefaultsTo(_,rty,_) -> p_byte 2 st; p_ty rty st | TyparConstraint.SupportsNull _ -> p_byte 3 st | TyparConstraint.IsNonNullableStruct _ -> p_byte 4 st | TyparConstraint.IsReferenceType _ -> p_byte 5 st | TyparConstraint.RequiresDefaultConstructor _ -> p_byte 6 st - | TyparConstraint.SimpleChoice(tys,_) -> p_byte 7 st; p_typs tys st - | TyparConstraint.IsEnum(ty,_) -> p_byte 8 st; p_typ ty st - | TyparConstraint.IsDelegate(aty,bty,_) -> p_byte 9 st; p_typ aty st; p_typ bty st + | TyparConstraint.SimpleChoice(tys,_) -> p_byte 7 st; p_tys tys st + | TyparConstraint.IsEnum(ty,_) -> p_byte 8 st; p_ty ty st + | TyparConstraint.IsDelegate(aty,bty,_) -> p_byte 9 st; p_ty aty st; p_ty bty st | TyparConstraint.SupportsComparison _ -> p_byte 10 st | TyparConstraint.SupportsEquality _ -> p_byte 11 st | TyparConstraint.IsUnmanaged _ -> p_byte 12 st -let p_typar_constraints = (p_list p_typar_constraint) +let p_tyar_constraints = (p_list p_tyar_constraint) -let u_typar_constraint st = +let u_tyar_constraint st = let tag = u_byte st match tag with - | 0 -> u_typ st |> (fun a _ -> TyparConstraint.CoercesTo (a,range0) ) + | 0 -> u_ty st |> (fun a _ -> TyparConstraint.CoercesTo (a,range0) ) | 1 -> u_trait st |> (fun a _ -> TyparConstraint.MayResolveMember(a,range0)) - | 2 -> u_typ st |> (fun a ridx -> TyparConstraint.DefaultsTo(ridx,a,range0)) + | 2 -> u_ty st |> (fun a ridx -> TyparConstraint.DefaultsTo(ridx,a,range0)) | 3 -> (fun _ -> TyparConstraint.SupportsNull range0) | 4 -> (fun _ -> TyparConstraint.IsNonNullableStruct range0) | 5 -> (fun _ -> TyparConstraint.IsReferenceType range0) | 6 -> (fun _ -> TyparConstraint.RequiresDefaultConstructor range0) - | 7 -> u_typs st |> (fun a _ -> TyparConstraint.SimpleChoice(a,range0)) - | 8 -> u_typ st |> (fun a _ -> TyparConstraint.IsEnum(a,range0)) - | 9 -> u_tup2 u_typ u_typ st |> (fun (a,b) _ -> TyparConstraint.IsDelegate(a,b,range0)) + | 7 -> u_tys st |> (fun a _ -> TyparConstraint.SimpleChoice(a,range0)) + | 8 -> u_ty st |> (fun a _ -> TyparConstraint.IsEnum(a,range0)) + | 9 -> u_tup2 u_ty u_ty st |> (fun (a,b) _ -> TyparConstraint.IsDelegate(a,b,range0)) | 10 -> (fun _ -> TyparConstraint.SupportsComparison range0) | 11 -> (fun _ -> TyparConstraint.SupportsEquality range0) | 12 -> (fun _ -> TyparConstraint.IsUnmanaged range0) - | _ -> ufailwith st "u_typar_constraint" + | _ -> ufailwith st "u_tyar_constraint" -let u_typar_constraints = (u_list_revi u_typar_constraint) +let u_tyar_constraints = (u_list_revi u_tyar_constraint) -let p_typar_spec_data (x:Typar) st = +let p_tyar_spec_data (x:Typar) st = p_tup5 p_ident p_attribs p_int64 - p_typar_constraints + p_tyar_constraints p_xmldoc - (x.typar_id,x.typar_attribs,int64 x.typar_flags.PickledBits,x.typar_constraints,x.typar_xmldoc) st + (x.typar_id,x.Attribs,int64 x.typar_flags.PickledBits,x.Constraints,x.XmlDoc) st -let p_typar_spec (x:Typar) st = - //Disabled, workaround for bug 2721: if x.Rigidity <> TyparRigidity.Rigid then warning(Error(sprintf "p_typar_spec: typar#%d is not rigid" x.Stamp, x.Range)) - if x.IsFromError then warning(Error((0,"p_typar_spec: from error"), x.Range)) - p_osgn_decl st.otypars p_typar_spec_data x st +let p_tyar_spec (x:Typar) st = + //Disabled, workaround for bug 2721: if x.Rigidity <> TyparRigidity.Rigid then warning(Error(sprintf "p_tyar_spec: typar#%d is not rigid" x.Stamp, x.Range)) + if x.IsFromError then warning(Error((0,"p_tyar_spec: from error"), x.Range)) + p_osgn_decl st.otypars p_tyar_spec_data x st -let p_typar_specs = (p_list p_typar_spec) +let p_tyar_specs = (p_list p_tyar_spec) -let u_typar_spec_data st = - let a,c,d,e,g = u_tup5 u_ident u_attribs u_int64 u_typar_constraints u_xmldoc st +let u_tyar_spec_data st = + let a,c,d,e,g = u_tup5 u_ident u_attribs u_int64 u_tyar_constraints u_xmldoc st { typar_id=a - typar_il_name=None typar_stamp=newStamp() - typar_attribs=c typar_flags=TyparFlags(int32 d) - typar_constraints=e typar_solution=None - typar_xmldoc=g - typar_astype= Unchecked.defaultof<_> } + typar_astype= Unchecked.defaultof<_> + typar_opt_data= + match g, e, c with + | XmlDoc [||], [], [] -> None + | _ -> Some { typar_il_name = None; typar_xmldoc = g; typar_constraints = e; typar_attribs = c } } -let u_typar_spec st = - u_osgn_decl st.itypars u_typar_spec_data st +let u_tyar_spec st = + u_osgn_decl st.itypars u_tyar_spec_data st -let u_typar_specs = (u_list u_typar_spec) +let u_tyar_specs = (u_list u_tyar_spec) -let _ = fill_p_typ (fun ty st -> +let _ = fill_p_ty2 (fun isStructThisArgPos ty st -> let ty = stripTyparEqns ty + + // See comment on 'checkForInRefStructThisArg' + let ty = + if isInByrefTy st.oglobals ty && isStructThisArgPos then + // Convert the inref to a byref + mkByrefTy st.oglobals (destByrefTy st.oglobals ty) + else + ty + match ty with | TType_tuple (tupInfo,l) -> if evalTupInfoIsStruct tupInfo then - p_byte 8 st; p_typs l st + p_byte 8 st; p_tys l st else - p_byte 0 st; p_typs l st + p_byte 0 st; p_tys l st | TType_app(ERefNonLocal nleref,[]) -> p_byte 1 st; p_simpletyp nleref st - | TType_app (tc,tinst) -> p_byte 2 st; p_tup2 (p_tcref "typ") p_typs (tc,tinst) st - | TType_fun (d,r) -> p_byte 3 st; p_tup2 p_typ p_typ (d,r) st + | TType_app (tc,tinst) -> p_byte 2 st; p_tup2 (p_tcref "typ") p_tys (tc,tinst) st + | TType_fun (d,r) -> + p_byte 3 st + // Note, the "this" argument may be found in the domain position of a function type, so propagate the isStructThisArgPos value + p_ty2 isStructThisArgPos d st + p_ty r st | TType_var r -> p_byte 4 st; p_tpref r st - | TType_forall (tps,r) -> p_byte 5 st; p_tup2 p_typar_specs p_typ (tps,r) st + | TType_forall (tps,r) -> + p_byte 5 st + p_tyar_specs tps st + // Note, the "this" argument may be found in the body of a generic forall type, so propagate the isStructThisArgPos value + p_ty2 isStructThisArgPos r st | TType_measure unt -> p_byte 6 st; p_measure_expr unt st - | TType_ucase (uc,tinst) -> p_byte 7 st; p_tup2 p_ucref p_typs (uc,tinst) st) + | TType_ucase (uc,tinst) -> p_byte 7 st; p_tup2 p_ucref p_tys (uc,tinst) st) -let _ = fill_u_typ (fun st -> +let _ = fill_u_ty (fun st -> let tag = u_byte st match tag with - | 0 -> let l = u_typs st in TType_tuple (tupInfoRef, l) + | 0 -> let l = u_tys st in TType_tuple (tupInfoRef, l) | 1 -> u_simpletyp st - | 2 -> let tc = u_tcref st in let tinst = u_typs st in TType_app (tc,tinst) - | 3 -> let d = u_typ st in let r = u_typ st in TType_fun (d,r) + | 2 -> let tc = u_tcref st in let tinst = u_tys st in TType_app (tc,tinst) + | 3 -> let d = u_ty st in let r = u_ty st in TType_fun (d,r) | 4 -> let r = u_tpref st in r.AsType - | 5 -> let tps = u_typar_specs st in let r = u_typ st in TType_forall (tps,r) + | 5 -> let tps = u_tyar_specs st in let r = u_ty st in TType_forall (tps,r) | 6 -> let unt = u_measure_expr st in TType_measure unt - | 7 -> let uc = u_ucref st in let tinst = u_typs st in TType_ucase (uc,tinst) - | 8 -> let l = u_typs st in TType_tuple (tupInfoStruct, l) - | _ -> ufailwith st "u_typ") + | 7 -> let uc = u_ucref st in let tinst = u_tys st in TType_ucase (uc,tinst) + | 8 -> let l = u_tys st in TType_tuple (tupInfoStruct, l) + | _ -> ufailwith st "u_ty") let fill_p_binds,p_binds = p_hole() @@ -1644,7 +1678,7 @@ and p_tycon_repr x st = | TUnionRepr x -> p_byte 1 st; p_byte 1 st; p_list p_unioncase_spec (Array.toList x.CasesTable.CasesByIndex) st; false | TAsmRepr ilty -> p_byte 1 st; p_byte 2 st; p_ILType ilty st; false | TFSharpObjectRepr r -> p_byte 1 st; p_byte 3 st; p_tycon_objmodel_data r st; false - | TMeasureableRepr ty -> p_byte 1 st; p_byte 4 st; p_typ ty st; false + | TMeasureableRepr ty -> p_byte 1 st; p_byte 4 st; p_ty ty st; false | TNoRepr -> p_byte 0 st; false #if !NO_EXTENSIONTYPING | TProvidedTypeExtensionPoint info -> @@ -1666,7 +1700,7 @@ and p_attribs_ext f x st = p_list_ext f p_attrib x st and p_unioncase_spec x st = p_rfield_table x.FieldTable st - p_typ x.ReturnType st + p_ty x.ReturnType st p_string x.CompiledName st p_ident x.Id st // The XmlDoc are only written for the extended in-memory format. We encode their presence using a marker bit here @@ -1690,7 +1724,7 @@ and p_access (TAccess n) st = p_list p_cpath n st and p_recdfield_spec x st = p_bool x.rfield_mutable st p_bool x.rfield_volatile st - p_typ x.rfield_type st + p_ty x.rfield_type st p_bool x.rfield_static st p_bool x.rfield_secret st p_option p_const x.rfield_const st @@ -1704,25 +1738,25 @@ and p_rfield_table x st = p_list p_recdfield_spec (Array.toList x.FieldsByIndex) st and p_entity_spec_data (x:Entity) st = - p_typar_specs (x.entity_typars.Force(x.entity_range)) st + p_tyar_specs (x.entity_typars.Force(x.entity_range)) st p_string x.entity_logical_name st - p_option p_string x.entity_compiled_name st + p_option p_string x.EntityCompiledName st p_range x.entity_range st p_option p_pubpath x.entity_pubpath st - p_access x.entity_accessiblity st - p_access x.entity_tycon_repr_accessibility st + p_access x.Accessibility st + p_access x.TypeReprAccessibility st p_attribs x.entity_attribs st let flagBit = p_tycon_repr x.entity_tycon_repr st - p_option p_typ x.entity_tycon_abbrev st + p_option p_ty x.TypeAbbrev st p_tcaug x.entity_tycon_tcaug st - p_string x.entity_xmldocsig st - p_kind x.entity_kind st + p_string System.String.Empty st + p_kind x.TypeOrMeasureKind st p_int64 (x.entity_flags.PickledBits ||| (if flagBit then EntityFlags.ReservedBitForPickleFormatTyconReprFlag else 0L)) st p_option p_cpath x.entity_cpath st p_maybe_lazy p_modul_typ x.entity_modul_contents st - p_exnc_repr x.entity_exn_info st + p_exnc_repr x.ExceptionInfo st if st.oInMem then - p_used_space1 (p_xmldoc x.entity_xmldoc) st + p_used_space1 (p_xmldoc x.XmlDoc) st else p_space 1 () st @@ -1734,8 +1768,8 @@ and p_tcaug p st = (p_option (p_tup3 (p_vref "hash_obj") (p_vref "hash_withc") (p_vref "equals_withc"))) (p_option (p_tup2 (p_vref "hash") (p_vref "equals"))) (p_list (p_tup2 p_string (p_vref "adhoc"))) - (p_list (p_tup3 p_typ p_bool p_dummy_range)) - (p_option p_typ) + (p_list (p_tup3 p_ty p_bool p_dummy_range)) + (p_option p_ty) p_bool (p_space 1) (p.tcaug_compare, @@ -1774,11 +1808,11 @@ and p_attrib_expr (AttribExpr(e1,e2)) st = p_tup2 p_expr p_expr (e1,e2) st and p_attrib_arg (AttribNamedArg(a,b,c,d)) st = - p_tup4 p_string p_typ p_bool p_attrib_expr (a,b,c,d) st + p_tup4 p_string p_ty p_bool p_attrib_expr (a,b,c,d) st and p_member_info (x:ValMemberInfo) st = p_tup4 (p_tcref "member_info") p_MemberFlags (p_list p_slotsig) p_bool - (x.ApparentParent,x.MemberFlags,x.ImplementedSlotSigs,x.IsImplemented) st + (x.ApparentEnclosingEntity,x.MemberFlags,x.ImplementedSlotSigs,x.IsImplemented) st and p_tycon_objmodel_kind x st = match x with @@ -1807,25 +1841,28 @@ and p_vrefFlags x st = | NormalValUse -> p_byte 0 st | CtorValUsedAsSuperInit -> p_byte 1 st | CtorValUsedAsSelfInit -> p_byte 2 st - | PossibleConstrainedCall ty -> p_byte 3 st; p_typ ty st + | PossibleConstrainedCall ty -> p_byte 3 st; p_ty ty st | VSlotDirectCall -> p_byte 4 st and p_ValData x st = p_string x.val_logical_name st - p_option p_string x.val_compiled_name st + p_option p_string x.ValCompiledName st // only keep range information on published values, not on optimization data - p_ranges (if x.val_repr_info.IsSome then Some(x.val_range, x.DefinitionRange) else None) st - p_typ x.val_type st + p_ranges (x.ValReprInfo |> Option.map (fun _ -> x.val_range, x.DefinitionRange)) st + + let isStructThisArgPos = x.IsMember && checkForInRefStructThisArg st x.Type + p_ty2 isStructThisArgPos x.val_type st + p_int64 x.val_flags.PickledBits st - p_option p_member_info x.val_member_info st - p_attribs x.val_attribs st - p_option p_ValReprInfo x.val_repr_info st - p_string x.val_xmldocsig st - p_access x.val_access st - p_parentref x.val_actual_parent st - p_option p_const x.val_const st + p_option p_member_info x.MemberInfo st + p_attribs x.Attribs st + p_option p_ValReprInfo x.ValReprInfo st + p_string x.XmlDocSig st + p_access x.Accessibility st + p_parentref x.DeclaringEntity st + p_option p_const x.LiteralValue st if st.oInMem then - p_used_space1 (p_xmldoc x.val_xmldoc) st + p_used_space1 (p_xmldoc x.XmlDoc) st else p_space 1 () st @@ -1881,7 +1918,7 @@ and u_tycon_repr st = let v = u_tycon_objmodel_data st (fun _flagBit -> TFSharpObjectRepr v) | 4 -> - let v = u_typ st + let v = u_ty st (fun _flagBit -> TMeasureableRepr v) | _ -> ufailwith st "u_tycon_repr" | _ -> ufailwith st "u_tycon_repr" @@ -1893,7 +1930,7 @@ and u_tycon_objmodel_data st = and u_attribs_ext extraf st = u_list_ext extraf u_attrib st and u_unioncase_spec st = let a = u_rfield_table st - let b = u_typ st + let b = u_ty st let c = u_string st let d = u_ident st // The XmlDoc is only present in the extended in-memory format. We detect its presence using a marker bit here @@ -1931,7 +1968,7 @@ and u_access st = and u_recdfield_spec st = let a = u_bool st let b = u_bool st - let c1 = u_typ st + let c1 = u_ty st let c2 = u_bool st let c2b = u_bool st let c3 = u_option u_const st @@ -1953,14 +1990,15 @@ and u_recdfield_spec st = rfield_xmldoc= defaultArg xmldoc XmlDoc.Empty rfield_xmldocsig=f rfield_access=g + rfield_name_generated = false rfield_other_range = None } and u_rfield_table st = MakeRecdFieldsTable (u_list u_recdfield_spec st) and u_entity_spec_data st : Entity = - let x1,x2a,x2b,x2c,x3,(x4a,x4b),x6,x7f,x8,x9,x10,x10b,x11,x12,x13,x14,x15 = + let x1,x2a,x2b,x2c,x3,(x4a,x4b),x6,x7f,x8,x9,_x10,x10b,x11,x12,x13,x14,x15 = u_tup17 - u_typar_specs + u_tyar_specs u_string (u_option u_string) u_range @@ -1968,7 +2006,7 @@ and u_entity_spec_data st : Entity = (u_tup2 u_access u_access) u_attribs u_tycon_repr - (u_option u_typ) + (u_option u_ty) u_tcaug u_string u_kind @@ -1985,25 +2023,20 @@ and u_entity_spec_data st : Entity = { entity_typars=LazyWithContext.NotLazy x1 entity_stamp=newStamp() entity_logical_name=x2a - entity_compiled_name=x2b entity_range=x2c - entity_other_range=None entity_pubpath=x3 - entity_accessiblity=x4a - entity_tycon_repr_accessibility=x4b entity_attribs=x6 entity_tycon_repr=x7 - entity_tycon_abbrev=x8 entity_tycon_tcaug=x9 - entity_xmldoc= defaultArg x15 XmlDoc.Empty - entity_xmldocsig=x10 - entity_kind=x10b entity_flags=EntityFlags(x11) entity_cpath=x12 entity_modul_contents=MaybeLazy.Lazy x13 - entity_exn_info=x14 entity_il_repr_cache=newCache() - } + entity_opt_data= + match x2b, x10b, x15, x8, x4a, x4b, x14 with + | None, TyparKind.Type, None, None, TAccess [], TAccess [], TExnNone -> None + | _ -> Some { Entity.EmptyEntityOptData with entity_compiled_name = x2b; entity_kind = x10b; entity_xmldoc= defaultArg x15 XmlDoc.Empty; entity_xmldocsig = System.String.Empty; entity_tycon_abbrev = x8; entity_accessiblity = x4a; entity_tycon_repr_accessibility = x4b; entity_exn_info = x14 } + } and u_tcaug st = let a1,a2,a3,b2,c,d,e,g,_space = @@ -2013,8 +2046,8 @@ and u_tcaug st = (u_option (u_tup3 u_vref u_vref u_vref)) (u_option (u_tup2 u_vref u_vref)) (u_list (u_tup2 u_string u_vref)) - (u_list (u_tup3 u_typ u_bool u_dummy_range)) - (u_option u_typ) + (u_list (u_tup3 u_ty u_bool u_dummy_range)) + (u_option u_ty) u_bool (u_space 1) st @@ -2058,12 +2091,12 @@ and u_attrib_expr st = AttribExpr(a,b) and u_attrib_arg st = - let a,b,c,d = u_tup4 u_string u_typ u_bool u_attrib_expr st + let a,b,c,d = u_tup4 u_string u_ty u_bool u_attrib_expr st AttribNamedArg(a,b,c,d) and u_member_info st : ValMemberInfo = let x2,x3,x4,x5 = u_tup4 u_tcref u_MemberFlags (u_list u_slotsig) u_bool st - { ApparentParent=x2 + { ApparentEnclosingEntity=x2 MemberFlags=x3 ImplementedSlotSigs=x4 IsImplemented=x5 } @@ -2099,7 +2132,7 @@ and u_vrefFlags st = | 0 -> NormalValUse | 1 -> CtorValUsedAsSuperInit | 2 -> CtorValUsedAsSelfInit - | 3 -> PossibleConstrainedCall (u_typ st) + | 3 -> PossibleConstrainedCall (u_ty st) | 4 -> VSlotDirectCall | _ -> ufailwith st "u_vrefFlags" @@ -2109,7 +2142,7 @@ and u_ValData st = u_string (u_option u_string) u_ranges - u_typ + u_ty u_int64 (u_option u_member_info) u_attribs @@ -2120,22 +2153,27 @@ and u_ValData st = (u_option u_const) (u_used_space1 u_xmldoc) st - { val_logical_name=x1 - val_compiled_name=x1z - val_range=(match x1a with None -> range0 | Some(a,_) -> a) - val_other_range=(match x1a with None -> None | Some(_,b) -> Some(b,true)) - val_type=x2 - val_stamp=newStamp() - val_flags=ValFlags(x4) - val_defn = None - val_member_info=x8 - val_attribs=x9 - val_repr_info=x10 - val_xmldoc= defaultArg x15 XmlDoc.Empty - val_xmldocsig=x12 - val_access=x13 - val_actual_parent=x13b - val_const=x14 + + { val_logical_name = x1 + val_range = (match x1a with None -> range0 | Some(a,_) -> a) + val_type = x2 + val_stamp = newStamp() + val_flags = ValFlags(x4) + val_opt_data = + match x1z, x1a, x10, x14, x13, x15, x8, x13b, x12, x9 with + | None, None, None, None, TAccess [], None, None, ParentNone, "", [] -> None + | _ -> + Some { val_compiled_name = x1z + val_other_range = (match x1a with None -> None | Some(_,b) -> Some(b,true)) + val_defn = None + val_repr_info = x10 + val_const = x14 + val_access = x13 + val_xmldoc = defaultArg x15 XmlDoc.Empty + val_member_info = x8 + val_declaring_entity = x13b + val_xmldocsig = x12 + val_attribs = x9 } } and u_Val st = u_osgn_decl st.ivals u_ValData st @@ -2209,18 +2247,18 @@ and p_dtree_case (TCase(a,b)) st = p_tup2 p_dtree_discrim p_dtree (a,b) st and p_dtree_discrim x st = match x with - | DecisionTreeTest.UnionCase (ucref,tinst) -> p_byte 0 st; p_tup2 p_ucref p_typs (ucref,tinst) st + | DecisionTreeTest.UnionCase (ucref,tinst) -> p_byte 0 st; p_tup2 p_ucref p_tys (ucref,tinst) st | DecisionTreeTest.Const c -> p_byte 1 st; p_const c st | DecisionTreeTest.IsNull -> p_byte 2 st - | DecisionTreeTest.IsInst (srcty,tgty) -> p_byte 3 st; p_typ srcty st; p_typ tgty st - | DecisionTreeTest.ArrayLength (n,ty) -> p_byte 4 st; p_tup2 p_int p_typ (n,ty) st + | DecisionTreeTest.IsInst (srcty,tgty) -> p_byte 3 st; p_ty srcty st; p_ty tgty st + | DecisionTreeTest.ArrayLength (n,ty) -> p_byte 4 st; p_tup2 p_int p_ty (n,ty) st | DecisionTreeTest.ActivePatternCase _ -> pfailwith st "DecisionTreeTest.ActivePatternCase: only used during pattern match compilation" and p_target (TTarget(a,b,_)) st = p_tup2 p_Vals p_expr (a,b) st and p_bind (TBind(a,b,_)) st = p_tup2 p_Val p_expr (a,b) st and p_lval_op_kind x st = - p_byte (match x with LGetAddr -> 0 | LByrefGet -> 1 | LSet -> 2 | LByrefSet -> 3) st + p_byte (match x with LAddrOf _ -> 0 | LByrefGet -> 1 | LSet -> 2 | LByrefSet -> 3) st and p_recdInfo x st = match x with @@ -2240,11 +2278,11 @@ and u_dtree_case st = let a,b = u_tup2 u_dtree_discrim u_dtree st in (TCase(a,b) and u_dtree_discrim st = let tag = u_byte st match tag with - | 0 -> u_tup2 u_ucref u_typs st |> DecisionTreeTest.UnionCase + | 0 -> u_tup2 u_ucref u_tys st |> DecisionTreeTest.UnionCase | 1 -> u_const st |> DecisionTreeTest.Const | 2 -> DecisionTreeTest.IsNull - | 3 -> u_tup2 u_typ u_typ st |> DecisionTreeTest.IsInst - | 4 -> u_tup2 u_int u_typ st |> DecisionTreeTest.ArrayLength + | 3 -> u_tup2 u_ty u_ty st |> DecisionTreeTest.IsInst + | 4 -> u_tup2 u_int u_ty st |> DecisionTreeTest.ArrayLength | _ -> ufailwith st "u_dtree_discrim" and u_target st = let a,b = u_tup2 u_Vals u_expr st in (TTarget(a,b,SuppressSequencePointAtTarget)) @@ -2253,7 +2291,7 @@ and u_bind st = let a = u_Val st in let b = u_expr st in TBind(a,b,NoSequencePoi and u_lval_op_kind st = match u_byte st with - | 0 -> LGetAddr + | 0 -> LAddrOf false | 1 -> LByrefGet | 2 -> LSet | 3 -> LByrefSet @@ -2282,24 +2320,24 @@ and p_op x st = p_byte 30 st; p_int a st else p_byte 11 st; p_int a st - | TOp.ILAsm (a,b) -> p_byte 12 st; p_tup2 (p_list p_ILInstr) p_typs (a,b) st - | TOp.RefAddrGet -> p_byte 13 st + | TOp.ILAsm (a,b) -> p_byte 12 st; p_tup2 (p_list p_ILInstr) p_tys (a,b) st + | TOp.RefAddrGet _ -> p_byte 13 st | TOp.UnionCaseProof (a) -> p_byte 14 st; p_ucref a st | TOp.Coerce -> p_byte 15 st | TOp.TraitCall (b) -> p_byte 16 st; p_trait b st | TOp.LValueOp (a,b) -> p_byte 17 st; p_tup2 p_lval_op_kind (p_vref "lval") (a,b) st | TOp.ILCall (a1,a2,a3,a4,a5,a7,a8,a9,b,c,d) - -> p_byte 18 st; p_tup11 p_bool p_bool p_bool p_bool p_vrefFlags p_bool p_bool p_ILMethodRef p_typs p_typs p_typs (a1,a2,a3,a4,a5,a7,a8,a9,b,c,d) st + -> p_byte 18 st; p_tup11 p_bool p_bool p_bool p_bool p_vrefFlags p_bool p_bool p_ILMethodRef p_tys p_tys p_tys (a1,a2,a3,a4,a5,a7,a8,a9,b,c,d) st | TOp.Array -> p_byte 19 st | TOp.While _ -> p_byte 20 st | TOp.For(_,dir) -> p_byte 21 st; p_int (match dir with FSharpForLoopUp -> 0 | CSharpForLoopUp -> 1 | FSharpForLoopDown -> 2) st | TOp.Bytes bytes -> p_byte 22 st; p_bytes bytes st | TOp.TryCatch _ -> p_byte 23 st | TOp.TryFinally _ -> p_byte 24 st - | TOp.ValFieldGetAddr (a) -> p_byte 25 st; p_rfref a st + | TOp.ValFieldGetAddr (a, _) -> p_byte 25 st; p_rfref a st | TOp.UInt16s arr -> p_byte 26 st; p_array p_uint16 arr st | TOp.Reraise -> p_byte 27 st - | TOp.UnionCaseFieldGetAddr (a,b) -> p_byte 28 st; p_tup2 p_ucref p_int (a,b) st + | TOp.UnionCaseFieldGetAddr (a,b, _) -> p_byte 28 st; p_tup2 p_ucref p_int (a,b) st // Note tag byte 29 is taken for struct tuples, see above // Note tag byte 30 is taken for struct tuples, see above | TOp.Goto _ | TOp.Label _ | TOp.Return -> failwith "unexpected backend construct in pickled TAST" @@ -2335,9 +2373,9 @@ and u_op st = | 11 -> let a = u_int st TOp.TupleFieldGet (tupInfoRef, a) | 12 -> let a = (u_list u_ILInstr) st - let b = u_typs st + let b = u_tys st TOp.ILAsm (a,b) - | 13 -> TOp.RefAddrGet + | 13 -> TOp.RefAddrGet false // ok to set the 'readonly' flag on these operands to false on re-read since the flag is only used for typechecking purposes | 14 -> let a = u_ucref st TOp.UnionCaseProof a | 15 -> TOp.Coerce @@ -2347,9 +2385,9 @@ and u_op st = let b = u_vref st TOp.LValueOp (a,b) | 18 -> let (a1,a2,a3,a4,a5,a7,a8,a9) = (u_tup8 u_bool u_bool u_bool u_bool u_vrefFlags u_bool u_bool u_ILMethodRef) st - let b = u_typs st - let c = u_typs st - let d = u_typs st + let b = u_tys st + let c = u_tys st + let d = u_tys st TOp.ILCall (a1,a2,a3,a4,a5,a7,a8,a9,b,c,d) | 19 -> TOp.Array | 20 -> TOp.While (NoSequencePointAtWhileLoop, NoSpecialWhileLoopMarker) @@ -2359,12 +2397,12 @@ and u_op st = | 23 -> TOp.TryCatch(NoSequencePointAtTry,NoSequencePointAtWith) | 24 -> TOp.TryFinally(NoSequencePointAtTry,NoSequencePointAtFinally) | 25 -> let a = u_rfref st - TOp.ValFieldGetAddr a + TOp.ValFieldGetAddr (a, false) | 26 -> TOp.UInt16s (u_array u_uint16 st) | 27 -> TOp.Reraise | 28 -> let a = u_ucref st let b = u_int st - TOp.UnionCaseFieldGetAddr (a,b) + TOp.UnionCaseFieldGetAddr (a,b, false) | 29 -> TOp.Tuple tupInfoStruct | 30 -> let a = u_int st TOp.TupleFieldGet (tupInfoStruct, a) @@ -2373,34 +2411,34 @@ and u_op st = and p_expr expr st = match expr with | Expr.Link e -> p_expr !e st - | Expr.Const (x,m,ty) -> p_byte 0 st; p_tup3 p_const p_dummy_range p_typ (x,m,ty) st + | Expr.Const (x,m,ty) -> p_byte 0 st; p_tup3 p_const p_dummy_range p_ty (x,m,ty) st | Expr.Val (a,b,m) -> p_byte 1 st; p_tup3 (p_vref "val") p_vrefFlags p_dummy_range (a,b,m) st - | Expr.Op(a,b,c,d) -> p_byte 2 st; p_tup4 p_op p_typs p_Exprs p_dummy_range (a,b,c,d) st + | Expr.Op(a,b,c,d) -> p_byte 2 st; p_tup4 p_op p_tys p_Exprs p_dummy_range (a,b,c,d) st | Expr.Sequential (a,b,c,_,d) -> p_byte 3 st; p_tup4 p_expr p_expr p_int p_dummy_range (a,b,(match c with NormalSeq -> 0 | ThenDoSeq -> 1),d) st - | Expr.Lambda (_,a1,b0,b1,c,d,e) -> p_byte 4 st; p_tup6 (p_option p_Val) (p_option p_Val) p_Vals p_expr p_dummy_range p_typ (a1,b0,b1,c,d,e) st - | Expr.TyLambda (_,b,c,d,e) -> p_byte 5 st; p_tup4 p_typar_specs p_expr p_dummy_range p_typ (b,c,d,e) st - | Expr.App (a1,a2,b,c,d) -> p_byte 6 st; p_tup5 p_expr p_typ p_typs p_Exprs p_dummy_range (a1,a2,b,c,d) st + | Expr.Lambda (_,a1,b0,b1,c,d,e) -> p_byte 4 st; p_tup6 (p_option p_Val) (p_option p_Val) p_Vals p_expr p_dummy_range p_ty (a1,b0,b1,c,d,e) st + | Expr.TyLambda (_,b,c,d,e) -> p_byte 5 st; p_tup4 p_tyar_specs p_expr p_dummy_range p_ty (b,c,d,e) st + | Expr.App (a1,a2,b,c,d) -> p_byte 6 st; p_tup5 p_expr p_ty p_tys p_Exprs p_dummy_range (a1,a2,b,c,d) st | Expr.LetRec (a,b,c,_) -> p_byte 7 st; p_tup3 p_binds p_expr p_dummy_range (a,b,c) st | Expr.Let (a,b,c,_) -> p_byte 8 st; p_tup3 p_bind p_expr p_dummy_range (a,b,c) st - | Expr.Match (_,a,b,c,d,e) -> p_byte 9 st; p_tup5 p_dummy_range p_dtree p_targets p_dummy_range p_typ (a,b,c,d,e) st - | Expr.Obj(_,b,c,d,e,f,g) -> p_byte 10 st; p_tup6 p_typ (p_option p_Val) p_expr p_methods p_intfs p_dummy_range (b,c,d,e,f,g) st + | Expr.Match (_,a,b,c,d,e) -> p_byte 9 st; p_tup5 p_dummy_range p_dtree p_targets p_dummy_range p_ty (a,b,c,d,e) st + | Expr.Obj(_,b,c,d,e,f,g) -> p_byte 10 st; p_tup6 p_ty (p_option p_Val) p_expr p_methods p_intfs p_dummy_range (b,c,d,e,f,g) st | Expr.StaticOptimization(a,b,c,d) -> p_byte 11 st; p_tup4 p_constraints p_expr p_expr p_dummy_range (a,b,c,d) st - | Expr.TyChoose (a,b,c) -> p_byte 12 st; p_tup3 p_typar_specs p_expr p_dummy_range (a,b,c) st - | Expr.Quote(ast,_,_,m,ty) -> p_byte 13 st; p_tup3 p_expr p_dummy_range p_typ (ast,m,ty) st + | Expr.TyChoose (a,b,c) -> p_byte 12 st; p_tup3 p_tyar_specs p_expr p_dummy_range (a,b,c) st + | Expr.Quote(ast,_,_,m,ty) -> p_byte 13 st; p_tup3 p_expr p_dummy_range p_ty (ast,m,ty) st and u_expr st = let tag = u_byte st match tag with | 0 -> let a = u_const st let b = u_dummy_range st - let c = u_typ st + let c = u_ty st Expr.Const (a,b,c) | 1 -> let a = u_vref st let b = u_vrefFlags st let c = u_dummy_range st Expr.Val (a,b,c) | 2 -> let a = u_op st - let b = u_typs st + let b = u_tys st let c = u_Exprs st let d = u_dummy_range st Expr.Op (a,b,c,d) @@ -2414,16 +2452,16 @@ and u_expr st = let b1 = u_Vals st let c = u_expr st let d = u_dummy_range st - let e = u_typ st + let e = u_ty st Expr.Lambda (newUnique(),a0,b0,b1,c,d,e) - | 5 -> let b = u_typar_specs st + | 5 -> let b = u_tyar_specs st let c = u_expr st let d = u_dummy_range st - let e = u_typ st + let e = u_ty st Expr.TyLambda (newUnique(),b,c,d,e) | 6 -> let a1 = u_expr st - let a2 = u_typ st - let b = u_typs st + let a2 = u_ty st + let b = u_tys st let c = u_Exprs st let d = u_dummy_range st Expr.App (a1,a2,b,c,d) @@ -2439,9 +2477,9 @@ and u_expr st = let b = u_dtree st let c = u_targets st let d = u_dummy_range st - let e = u_typ st + let e = u_ty st Expr.Match (NoSequencePointAtStickyBinding,a,b,c,d,e) - | 10 -> let b = u_typ st + | 10 -> let b = u_ty st let c = (u_option u_Val) st let d = u_expr st let e = u_methods st @@ -2453,50 +2491,50 @@ and u_expr st = let c = u_expr st let d = u_dummy_range st Expr.StaticOptimization (a,b,c,d) - | 12 -> let a = u_typar_specs st + | 12 -> let a = u_tyar_specs st let b = u_expr st let c = u_dummy_range st Expr.TyChoose (a,b,c) | 13 -> let b = u_expr st let c = u_dummy_range st - let d = u_typ st + let d = u_ty st Expr.Quote (b,ref None,false,c,d) // isFromQueryExpression=false | _ -> ufailwith st "u_expr" and p_static_optimization_constraint x st = match x with - | TTyconEqualsTycon (a,b) -> p_byte 0 st; p_tup2 p_typ p_typ (a,b) st - | TTyconIsStruct(a) -> p_byte 1 st; p_typ a st + | TTyconEqualsTycon (a,b) -> p_byte 0 st; p_tup2 p_ty p_ty (a,b) st + | TTyconIsStruct(a) -> p_byte 1 st; p_ty a st -and p_slotparam (TSlotParam (a,b,c,d,e,f)) st = p_tup6 (p_option p_string) p_typ p_bool p_bool p_bool p_attribs (a,b,c,d,e,f) st -and p_slotsig (TSlotSig (a,b,c,d,e,f)) st = p_tup6 p_string p_typ p_typar_specs p_typar_specs (p_list (p_list p_slotparam)) (p_option p_typ) (a,b,c,d,e,f) st -and p_method (TObjExprMethod (a,b,c,d,e,f)) st = p_tup6 p_slotsig p_attribs p_typar_specs (p_list p_Vals) p_expr p_dummy_range (a,b,c,d,e,f) st +and p_slotparam (TSlotParam (a,b,c,d,e,f)) st = p_tup6 (p_option p_string) p_ty p_bool p_bool p_bool p_attribs (a,b,c,d,e,f) st +and p_slotsig (TSlotSig (a,b,c,d,e,f)) st = p_tup6 p_string p_ty p_tyar_specs p_tyar_specs (p_list (p_list p_slotparam)) (p_option p_ty) (a,b,c,d,e,f) st +and p_method (TObjExprMethod (a,b,c,d,e,f)) st = p_tup6 p_slotsig p_attribs p_tyar_specs (p_list p_Vals) p_expr p_dummy_range (a,b,c,d,e,f) st and p_methods x st = p_list p_method x st -and p_intf x st = p_tup2 p_typ p_methods x st +and p_intf x st = p_tup2 p_ty p_methods x st and p_intfs x st = p_list p_intf x st and u_static_optimization_constraint st = let tag = u_byte st match tag with - | 0 -> u_tup2 u_typ u_typ st |> TTyconEqualsTycon - | 1 -> u_typ st |> TTyconIsStruct + | 0 -> u_tup2 u_ty u_ty st |> TTyconEqualsTycon + | 1 -> u_ty st |> TTyconIsStruct | _ -> ufailwith st "u_static_optimization_constraint" and u_slotparam st = - let a,b,c,d,e,f = u_tup6 (u_option u_string) u_typ u_bool u_bool u_bool u_attribs st + let a,b,c,d,e,f = u_tup6 (u_option u_string) u_ty u_bool u_bool u_bool u_attribs st TSlotParam(a,b,c,d,e,f) and u_slotsig st = - let a,b,c,d,e,f = u_tup6 u_string u_typ u_typar_specs u_typar_specs (u_list (u_list u_slotparam)) (u_option u_typ) st + let a,b,c,d,e,f = u_tup6 u_string u_ty u_tyar_specs u_tyar_specs (u_list (u_list u_slotparam)) (u_option u_ty) st TSlotSig(a,b,c,d,e,f) and u_method st = - let a,b,c,d,e,f = u_tup6 u_slotsig u_attribs u_typar_specs (u_list u_Vals) u_expr u_dummy_range st + let a,b,c,d,e,f = u_tup6 u_slotsig u_attribs u_tyar_specs (u_list u_Vals) u_expr u_dummy_range st TObjExprMethod(a,b,c,d,e,f) and u_methods st = u_list u_method st -and u_intf st = u_tup2 u_typ u_methods st +and u_intf st = u_tup2 u_ty u_methods st and u_intfs st = u_list u_intf st @@ -2522,7 +2560,7 @@ let _ = fill_u_Vals (u_list u_Val) //--------------------------------------------------------------------------- let pickleModuleOrNamespace mspec st = p_tycon_spec mspec st -let pickleCcuInfo minfo st = +let pickleCcuInfo (minfo: PickledCcuInfo) st = p_tup4 pickleModuleOrNamespace p_string p_bool (p_space 3) (minfo.mspec, minfo.compileTimeWorkingDir, minfo.usesQuotations,()) st let unpickleModuleOrNamespace st = u_tycon_spec st diff --git a/src/fsharp/TastPickle.fsi b/src/fsharp/TastPickle.fsi index 59aa8709899..4bf6aca3ef1 100644 --- a/src/fsharp/TastPickle.fsi +++ b/src/fsharp/TastPickle.fsi @@ -76,7 +76,7 @@ val internal p_ucref : pickler val internal p_expr : pickler /// Serialize a TAST type -val internal p_typ : pickler +val internal p_ty : pickler /// Serialize a TAST description of a compilation unit val internal pickleCcuInfo : pickler @@ -136,7 +136,7 @@ val internal u_ucref : unpickler val internal u_expr : unpickler /// Deserialize a TAST type -val internal u_typ : unpickler +val internal u_ty : unpickler /// Deserialize a TAST description of a compilation unit val internal unpickleCcuInfo : ReaderState -> PickledCcuInfo diff --git a/src/fsharp/TcGlobals.fs b/src/fsharp/TcGlobals.fs index 0e126f3469b..d6fb7cd3c73 100755 --- a/src/fsharp/TcGlobals.fs +++ b/src/fsharp/TcGlobals.fs @@ -8,7 +8,9 @@ /// comparison and hashing functions. module internal Microsoft.FSharp.Compiler.TcGlobals -open Internal.Utilities +open System.Collections.Generic +open System.Diagnostics + open Microsoft.FSharp.Compiler open Microsoft.FSharp.Compiler.AbstractIL open Microsoft.FSharp.Compiler.AbstractIL.IL @@ -21,13 +23,25 @@ open Microsoft.FSharp.Compiler.Ast open Microsoft.FSharp.Compiler.Lib open Microsoft.FSharp.Compiler.PrettyNaming -open System.Collections.Generic +open Internal.Utilities let internal DummyFileNameForRangesWithoutASpecificLocation = "startup" let private envRange = rangeN DummyFileNameForRangesWithoutASpecificLocation 0 -type public IntrinsicValRef = IntrinsicValRef of NonLocalEntityRef * string * bool * TType * ValLinkageFullKey +/// Represents an intrinsic value from FSharp.Core known to the compiler +[] +type IntrinsicValRef = + | IntrinsicValRef of NonLocalEntityRef * string * bool * TType * ValLinkageFullKey + member x.Name = (let (IntrinsicValRef(_, nm, _, _, _)) = x in nm) + + /// For debugging + [] + member x.DebugText = x.ToString() + + /// For debugging + override x.ToString() = x.Name + let ValRefForIntrinsic (IntrinsicValRef(mvr, _, _, _, key)) = mkNonLocalValRef mvr key //------------------------------------------------------------------------- @@ -37,7 +51,6 @@ let ValRefForIntrinsic (IntrinsicValRef(mvr, _, _, _, key)) = mkNonLocalValRef [] module FSharpLib = - let CoreOperatorsName = FSharpLib.Root + ".Core.Operators" let CoreOperatorsCheckedName = FSharpLib.Root + ".Core.Operators.Checked" let ControlName = FSharpLib.Root + ".Control" let LinqName = FSharpLib.Root + ".Linq" @@ -47,22 +60,18 @@ module FSharpLib = let LinqRuntimeHelpersName = FSharpLib.Root + ".Linq.RuntimeHelpers" let RuntimeHelpersName = FSharpLib.Root + ".Core.CompilerServices.RuntimeHelpers" let ExtraTopLevelOperatorsName = FSharpLib.Root + ".Core.ExtraTopLevelOperators" - let HashCompareName = FSharpLib.Root + ".Core.LanguagePrimitives.HashCompare" + let NativeInteropName = FSharpLib.Root + ".NativeInterop" let QuotationsName = FSharpLib.Root + ".Quotations" - let OperatorsPath = IL.splitNamespace CoreOperatorsName |> Array.ofList - let OperatorsCheckedPath = IL.splitNamespace CoreOperatorsCheckedName |> Array.ofList let ControlPath = IL.splitNamespace ControlName let LinqPath = IL.splitNamespace LinqName let CollectionsPath = IL.splitNamespace CollectionsName - let LanguagePrimitivesPath = IL.splitNamespace LanguagePrimitivesName |> Array.ofList - let HashComparePath = IL.splitNamespace HashCompareName |> Array.ofList + let NativeInteropPath = IL.splitNamespace NativeInteropName |> Array.ofList let CompilerServicesPath = IL.splitNamespace CompilerServicesName |> Array.ofList let LinqRuntimeHelpersPath = IL.splitNamespace LinqRuntimeHelpersName |> Array.ofList let RuntimeHelpersPath = IL.splitNamespace RuntimeHelpersName |> Array.ofList let QuotationsPath = IL.splitNamespace QuotationsName |> Array.ofList - let ExtraTopLevelOperatorsPath = IL.splitNamespace ExtraTopLevelOperatorsName |> Array.ofList let RootPathArray = FSharpLib.RootPath |> Array.ofList let CorePathArray = FSharpLib.CorePath |> Array.ofList @@ -87,11 +96,23 @@ let mk_MFRuntimeHelpers_tcref ccu n = mkNonLocalTyconRef2 ccu FSharpLib.Runtim let mk_MFControl_tcref ccu n = mkNonLocalTyconRef2 ccu FSharpLib.ControlPathArray n -type public BuiltinAttribInfo = +type + [] + BuiltinAttribInfo = | AttribInfo of ILTypeRef * TyconRef + member this.TyconRef = let (AttribInfo(_, tcref)) = this in tcref + member this.TypeRef = let (AttribInfo(tref, _)) = this in tref + /// For debugging + [] + member x.DebugText = x.ToString() + + /// For debugging + override x.ToString() = x.TyconRef.ToString() + + [] let tname_DebuggerNonUserCodeAttribute = "System.Diagnostics.DebuggerNonUserCodeAttribute" [] @@ -201,7 +222,11 @@ type public TcGlobals(compilingFslib: bool, ilg:ILGlobals, fslibCcu: CcuThunk, d let v_pint16_tcr = mk_MFCore_tcref fslibCcu "int16`1" let v_pint64_tcr = mk_MFCore_tcref fslibCcu "int64`1" let v_byref_tcr = mk_MFCore_tcref fslibCcu "byref`1" + let v_byref2_tcr = mk_MFCore_tcref fslibCcu "byref`2" + let v_outref_tcr = mk_MFCore_tcref fslibCcu "outref`1" + let v_inref_tcr = mk_MFCore_tcref fslibCcu "inref`1" let v_nativeptr_tcr = mk_MFCore_tcref fslibCcu "nativeptr`1" + let v_voidptr_tcr = mk_MFCore_tcref fslibCcu "voidptr" let v_ilsigptr_tcr = mk_MFCore_tcref fslibCcu "ilsigptr`1" let v_fastFunc_tcr = mk_MFCore_tcref fslibCcu "FSharpFunc`2" let v_refcell_tcr_canon = mk_MFCore_tcref fslibCcu "Ref`1" @@ -290,18 +315,31 @@ type public TcGlobals(compilingFslib: bool, ilg:ILGlobals, fslibCcu: CcuThunk, d else "[" + (String.replicate (rank - 1) ",") + "]`1" mk_MFCore_tcref fslibCcu type_sig) + let v_byte_ty = mkNonGenericTy v_byte_tcr + let v_sbyte_ty = mkNonGenericTy v_sbyte_tcr + let v_int16_ty = mkNonGenericTy v_int16_tcr + let v_uint16_ty = mkNonGenericTy v_uint16_tcr + let v_int_ty = mkNonGenericTy v_int_tcr + let v_int32_ty = mkNonGenericTy v_int32_tcr + let v_uint32_ty = mkNonGenericTy v_uint32_tcr + let v_int64_ty = mkNonGenericTy v_int64_tcr + let v_uint64_ty = mkNonGenericTy v_uint64_tcr + let v_float32_ty = mkNonGenericTy v_float32_tcr + let v_float_ty = mkNonGenericTy v_float_tcr + let v_nativeint_ty = mkNonGenericTy v_nativeint_tcr + let v_unativeint_ty = mkNonGenericTy v_unativeint_tcr + + let v_enum_ty = mkNonGenericTy v_int_tcr let v_bool_ty = mkNonGenericTy v_bool_tcr - let v_int_ty = mkNonGenericTy v_int_tcr let v_char_ty = mkNonGenericTy v_char_tcr let v_obj_ty = mkNonGenericTy v_obj_tcr let v_string_ty = mkNonGenericTy v_string_tcr - let v_byte_ty = mkNonGenericTy v_byte_tcr let v_decimal_ty = mkSysNonGenericTy sys "Decimal" let v_unit_ty = mkNonGenericTy v_unit_tcr_nice - let v_system_Type_typ = mkSysNonGenericTy sys "Type" + let v_system_Type_ty = mkSysNonGenericTy sys "Type" - let v_system_Reflection_MethodInfo_typ = mkSysNonGenericTy ["System";"Reflection"] "MethodInfo" + let v_system_Reflection_MethodInfo_ty = mkSysNonGenericTy ["System";"Reflection"] "MethodInfo" let v_nullable_tcr = findSysTyconRef sys "Nullable`1" (* local helpers to build value infos *) @@ -310,15 +348,15 @@ type public TcGlobals(compilingFslib: bool, ilg:ILGlobals, fslibCcu: CcuThunk, d let mkNativePtrTy ty = TType_app(v_nativeptr_tcr, [ty]) let mkFunTy d r = TType_fun (d, r) let (-->) d r = mkFunTy d r - let mkIteratedFunTy dl r = List.foldBack (-->) dl r + let mkIteratedFunTy dl r = List.foldBack mkFunTy dl r let mkSmallRefTupledTy l = match l with [] -> v_unit_ty | [h] -> h | tys -> mkRawRefTupleTy tys - let tryMkForallTy d r = match d with [] -> r | tps -> TType_forall(tps, r) + let mkForallTyIfNeeded d r = match d with [] -> r | tps -> TType_forall(tps, r) // A table of all intrinsics that the compiler cares about let v_knownIntrinsics = Dictionary<(string*string), ValRef>(HashIdentity.Structural) let makeIntrinsicValRef (enclosingEntity, logicalName, memberParentName, compiledNameOpt, typars, (argtys, rty)) = - let ty = tryMkForallTy typars (mkIteratedFunTy (List.map mkSmallRefTupledTy argtys) rty) + let ty = mkForallTyIfNeeded typars (mkIteratedFunTy (List.map mkSmallRefTupledTy argtys) rty) let isMember = Option.isSome memberParentName let argCount = if isMember then List.sum (List.map List.length argtys) else 0 let linkageType = if isMember then Some ty else None @@ -332,7 +370,7 @@ type public TcGlobals(compilingFslib: bool, ilg:ILGlobals, fslibCcu: CcuThunk, d let v_IComparer_ty = mkSysNonGenericTy sysCollections "IComparer" let v_IEqualityComparer_ty = mkSysNonGenericTy sysCollections "IEqualityComparer" - let v_system_RuntimeMethodHandle_typ = mkSysNonGenericTy sys "RuntimeMethodHandle" + let v_system_RuntimeMethodHandle_ty = mkSysNonGenericTy sys "RuntimeMethodHandle" let mk_unop_ty ty = [[ty]], ty let mk_binop_ty ty = [[ty]; [ty]], ty @@ -371,12 +409,14 @@ type public TcGlobals(compilingFslib: bool, ilg:ILGlobals, fslibCcu: CcuThunk, d let fslib_MFCompilerServices_nleref = mkNonLocalEntityRef fslibCcu FSharpLib.CompilerServicesPath let fslib_MFLinqRuntimeHelpers_nleref = mkNonLocalEntityRef fslibCcu FSharpLib.LinqRuntimeHelpersPath let fslib_MFControl_nleref = mkNonLocalEntityRef fslibCcu FSharpLib.ControlPathArray + let fslib_MFNativeInterop_nleref = mkNonLocalEntityRef fslibCcu FSharpLib.NativeInteropPath let fslib_MFLanguagePrimitives_nleref = mkNestedNonLocalEntityRef fslib_MFCore_nleref "LanguagePrimitives" let fslib_MFIntrinsicOperators_nleref = mkNestedNonLocalEntityRef fslib_MFLanguagePrimitives_nleref "IntrinsicOperators" let fslib_MFIntrinsicFunctions_nleref = mkNestedNonLocalEntityRef fslib_MFLanguagePrimitives_nleref "IntrinsicFunctions" let fslib_MFHashCompare_nleref = mkNestedNonLocalEntityRef fslib_MFLanguagePrimitives_nleref "HashCompare" let fslib_MFOperators_nleref = mkNestedNonLocalEntityRef fslib_MFCore_nleref "Operators" + let fslib_MFByRefKinds_nleref = mkNestedNonLocalEntityRef fslib_MFCore_nleref "ByRefKinds" let fslib_MFOperatorIntrinsics_nleref = mkNestedNonLocalEntityRef fslib_MFOperators_nleref "OperatorIntrinsics" let fslib_MFOperatorsUnchecked_nleref = mkNestedNonLocalEntityRef fslib_MFOperators_nleref "Unchecked" let fslib_MFOperatorsChecked_nleref = mkNestedNonLocalEntityRef fslib_MFOperators_nleref "Checked" @@ -395,6 +435,7 @@ type public TcGlobals(compilingFslib: bool, ilg:ILGlobals, fslibCcu: CcuThunk, d let fslib_MFSetModule_nleref = mkNestedNonLocalEntityRef fslib_MFCollections_nleref "SetModule" let fslib_MFMapModule_nleref = mkNestedNonLocalEntityRef fslib_MFCollections_nleref "MapModule" let fslib_MFStringModule_nleref = mkNestedNonLocalEntityRef fslib_MFCollections_nleref "StringModule" + let fslib_MFNativePtrModule_nleref = mkNestedNonLocalEntityRef fslib_MFNativeInterop_nleref "NativePtrModule" let fslib_MFOptionModule_nleref = mkNestedNonLocalEntityRef fslib_MFCore_nleref "OptionModule" let fslib_MFRuntimeHelpers_nleref = mkNestedNonLocalEntityRef fslib_MFCompilerServices_nleref "RuntimeHelpers" let fslib_MFQuotations_nleref = mkNestedNonLocalEntityRef fslib_MF_nleref "Quotations" @@ -458,22 +499,35 @@ type public TcGlobals(compilingFslib: bool, ilg:ILGlobals, fslibCcu: CcuThunk, d fslib_MFSetModule_nleref fslib_MFMapModule_nleref fslib_MFStringModule_nleref + fslib_MFNativePtrModule_nleref fslib_MFOptionModule_nleref fslib_MFRuntimeHelpers_nleref ] do yield nleref.LastItemMangledName, ERefNonLocal nleref ] - let decodeTupleTy tupInfo l = + let tryDecodeTupleTy tupInfo l = match l with | [t1;t2;t3;t4;t5;t6;t7;marker] -> match marker with - | TType_app(tcref, [t8]) when tyconRefEq tcref v_ref_tuple1_tcr -> mkRawRefTupleTy [t1;t2;t3;t4;t5;t6;t7;t8] - | TType_app(tcref, [t8]) when tyconRefEq tcref v_struct_tuple1_tcr -> mkRawStructTupleTy [t1;t2;t3;t4;t5;t6;t7;t8] - | TType_tuple (_structness2, t8plus) -> TType_tuple (tupInfo, [t1;t2;t3;t4;t5;t6;t7] @ t8plus) - | _ -> TType_tuple (tupInfo, l) - | _ -> TType_tuple (tupInfo, l) + | TType_app(tcref, [t8]) when tyconRefEq tcref v_ref_tuple1_tcr -> mkRawRefTupleTy [t1;t2;t3;t4;t5;t6;t7;t8] |> Some + | TType_app(tcref, [t8]) when tyconRefEq tcref v_struct_tuple1_tcr -> mkRawStructTupleTy [t1;t2;t3;t4;t5;t6;t7;t8] |> Some + | TType_tuple (_structness2, t8plus) -> TType_tuple (tupInfo, [t1;t2;t3;t4;t5;t6;t7] @ t8plus) |> Some + | _ -> None + | [] -> None + | [_] -> None + | _ -> TType_tuple (tupInfo, l) |> Some + let decodeTupleTy tupInfo l = + match tryDecodeTupleTy tupInfo l with + | Some ty -> ty + | None -> failwith "couldn't decode tuple ty" + + let decodeTupleTyIfPossible tcref tupInfo l = + match tryDecodeTupleTy tupInfo l with + | Some ty -> ty + | None -> TType_app(tcref, l) + let mk_MFCore_attrib nm : BuiltinAttribInfo = AttribInfo(mkILTyRef(IlxSettings.ilxFsharpCoreLibScopeRef (), FSharpLib.Core + "." + nm), mk_MFCore_tcref fslibCcu nm) @@ -498,7 +552,7 @@ type public TcGlobals(compilingFslib: bool, ilg:ILGlobals, fslibCcu: CcuThunk, d let v_greater_than_operator_info = makeIntrinsicValRef(fslib_MFOperators_nleref, CompileOpName ">" , None , None , [vara], mk_rel_sig varaTy) let v_greater_than_or_equals_operator_info = makeIntrinsicValRef(fslib_MFOperators_nleref, CompileOpName ">=" , None , None , [vara], mk_rel_sig varaTy) - let v_enumOfValue_info = makeIntrinsicValRef(fslib_MFLanguagePrimitives_nleref, "EnumOfValue" , None , None , [vara; varb], ([[varaTy]], varbTy)) + let v_enumOfValue_info = makeIntrinsicValRef(fslib_MFLanguagePrimitives_nleref, "EnumOfValue" , None , None , [vara; varb], ([[varaTy]], varbTy)) let v_generic_comparison_withc_outer_info = makeIntrinsicValRef(fslib_MFLanguagePrimitives_nleref, "GenericComparisonWithComparer" , None , None , [vara], mk_compare_withc_sig varaTy) let v_generic_hash_withc_tuple2_info = makeIntrinsicValRef(fslib_MFHashCompare_nleref, "FastHashTuple2" , None , None , [vara;varb], mk_hash_withc_sig (decodeTupleTy tupInfoRef [varaTy; varbTy])) @@ -554,10 +608,50 @@ type public TcGlobals(compilingFslib: bool, ilg:ILGlobals, fslibCcu: CcuThunk, d let v_unchecked_addition_info = makeIntrinsicValRef(fslib_MFOperators_nleref, "op_Addition" , None , None , [vara;varb;varc], mk_binop_ty3 varaTy varbTy varcTy) let v_unchecked_subtraction_info = makeIntrinsicValRef(fslib_MFOperators_nleref, "op_Subtraction" , None , None , [vara;varb;varc], mk_binop_ty3 varaTy varbTy varcTy) let v_unchecked_multiply_info = makeIntrinsicValRef(fslib_MFOperators_nleref, "op_Multiply" , None , None , [vara;varb;varc], mk_binop_ty3 varaTy varbTy varcTy) + let v_unchecked_division_info = makeIntrinsicValRef(fslib_MFOperators_nleref, "op_Division" , None , None , [vara;varb;varc], mk_binop_ty3 varaTy varbTy varcTy) + let v_unchecked_modulus_info = makeIntrinsicValRef(fslib_MFOperators_nleref, "op_Modulus" , None , None , [vara;varb;varc], mk_binop_ty3 varaTy varbTy varcTy) let v_unchecked_unary_plus_info = makeIntrinsicValRef(fslib_MFOperators_nleref, "op_UnaryPlus" , None , None , [vara], mk_unop_ty varaTy) let v_unchecked_unary_minus_info = makeIntrinsicValRef(fslib_MFOperators_nleref, "op_UnaryNegation" , None , None , [vara], mk_unop_ty varaTy) let v_unchecked_unary_not_info = makeIntrinsicValRef(fslib_MFOperators_nleref, "not" , None , Some "Not" , [], mk_unop_ty v_bool_ty) + let v_checked_addition_info = makeIntrinsicValRef(fslib_MFOperatorsChecked_nleref, "op_Addition" , None , None , [vara;varb;varc], mk_binop_ty3 varaTy varbTy varcTy) + let v_checked_subtraction_info = makeIntrinsicValRef(fslib_MFOperatorsChecked_nleref, "op_Subtraction" , None , None , [vara;varb;varc], mk_binop_ty3 varaTy varbTy varcTy) + let v_checked_multiply_info = makeIntrinsicValRef(fslib_MFOperatorsChecked_nleref, "op_Multiply" , None , None , [vara;varb;varc], mk_binop_ty3 varaTy varbTy varcTy) + let v_checked_unary_minus_info = makeIntrinsicValRef(fslib_MFOperatorsChecked_nleref, "op_UnaryNegation" , None , None , [vara], mk_unop_ty varaTy) + + let v_byte_checked_info = makeIntrinsicValRef(fslib_MFOperatorsChecked_nleref, "byte" , None , Some "ToByte", [vara], ([[varaTy]], v_byte_ty)) + let v_sbyte_checked_info = makeIntrinsicValRef(fslib_MFOperatorsChecked_nleref, "sbyte" , None , Some "ToSByte", [vara], ([[varaTy]], v_sbyte_ty)) + let v_int16_checked_info = makeIntrinsicValRef(fslib_MFOperatorsChecked_nleref, "int16" , None , Some "ToInt16", [vara], ([[varaTy]], v_int16_ty)) + let v_uint16_checked_info = makeIntrinsicValRef(fslib_MFOperatorsChecked_nleref, "uint16" , None , Some "ToUInt16", [vara], ([[varaTy]], v_uint16_ty)) + let v_int_checked_info = makeIntrinsicValRef(fslib_MFOperatorsChecked_nleref, "int" , None , Some "ToInt", [vara], ([[varaTy]], v_int_ty)) + let v_int32_checked_info = makeIntrinsicValRef(fslib_MFOperatorsChecked_nleref, "int32" , None , Some "ToInt32", [vara], ([[varaTy]], v_int32_ty)) + let v_uint32_checked_info = makeIntrinsicValRef(fslib_MFOperatorsChecked_nleref, "uint32" , None , Some "ToUInt32", [vara], ([[varaTy]], v_uint32_ty)) + let v_int64_checked_info = makeIntrinsicValRef(fslib_MFOperatorsChecked_nleref, "int64" , None , Some "ToInt64", [vara], ([[varaTy]], v_int64_ty)) + let v_uint64_checked_info = makeIntrinsicValRef(fslib_MFOperatorsChecked_nleref, "uint64" , None , Some "ToUInt64", [vara], ([[varaTy]], v_uint64_ty)) + let v_nativeint_checked_info = makeIntrinsicValRef(fslib_MFOperatorsChecked_nleref, "nativeint" , None , Some "ToIntPtr", [vara], ([[varaTy]], v_nativeint_ty)) + let v_unativeint_checked_info = makeIntrinsicValRef(fslib_MFOperatorsChecked_nleref, "unativeint" , None , Some "ToUIntPtr", [vara], ([[varaTy]], v_unativeint_ty)) + + let v_byte_operator_info = makeIntrinsicValRef(fslib_MFOperators_nleref, "byte" , None , Some "ToByte", [vara], ([[varaTy]], v_byte_ty)) + let v_sbyte_operator_info = makeIntrinsicValRef(fslib_MFOperators_nleref, "sbyte" , None , Some "ToSByte", [vara], ([[varaTy]], v_sbyte_ty)) + let v_int16_operator_info = makeIntrinsicValRef(fslib_MFOperators_nleref, "int16" , None , Some "ToInt16", [vara], ([[varaTy]], v_int16_ty)) + let v_uint16_operator_info = makeIntrinsicValRef(fslib_MFOperators_nleref, "uint16" , None , Some "ToUInt16", [vara], ([[varaTy]], v_uint16_ty)) + let v_int_operator_info = makeIntrinsicValRef(fslib_MFOperators_nleref, "int" , None , Some "ToInt", [vara], ([[varaTy]], v_int_ty)) + let v_int32_operator_info = makeIntrinsicValRef(fslib_MFOperators_nleref, "int32" , None , Some "ToInt32", [vara], ([[varaTy]], v_int32_ty)) + let v_uint32_operator_info = makeIntrinsicValRef(fslib_MFOperators_nleref, "uint32" , None , Some "ToUInt32", [vara], ([[varaTy]], v_uint32_ty)) + let v_int64_operator_info = makeIntrinsicValRef(fslib_MFOperators_nleref, "int64" , None , Some "ToInt64", [vara], ([[varaTy]], v_int64_ty)) + let v_uint64_operator_info = makeIntrinsicValRef(fslib_MFOperators_nleref, "uint64" , None , Some "ToUInt64", [vara], ([[varaTy]], v_uint64_ty)) + let v_float32_operator_info = makeIntrinsicValRef(fslib_MFOperators_nleref, "float32" , None , Some "ToSingle", [vara], ([[varaTy]], v_float32_ty)) + let v_float_operator_info = makeIntrinsicValRef(fslib_MFOperators_nleref, "float" , None , Some "ToDouble", [vara], ([[varaTy]], v_float_ty)) + let v_nativeint_operator_info = makeIntrinsicValRef(fslib_MFOperators_nleref, "nativeint" , None , Some "ToIntPtr", [vara], ([[varaTy]], v_nativeint_ty)) + let v_unativeint_operator_info = makeIntrinsicValRef(fslib_MFOperators_nleref, "unativeint" , None , Some "ToUIntPtr", [vara], ([[varaTy]], v_unativeint_ty)) + + let v_char_operator_info = makeIntrinsicValRef(fslib_MFOperators_nleref, "char" , None , Some "ToChar", [vara], ([[varaTy]], v_char_ty)) + let v_enum_operator_info = makeIntrinsicValRef(fslib_MFOperators_nleref, "enum" , None , Some "ToEnum", [vara], ([[varaTy]], v_enum_ty)) + + let v_hash_info = makeIntrinsicValRef(fslib_MFOperators_nleref, "hash" , None , Some "Hash" , [vara], ([[varaTy]], v_int_ty)) + let v_box_info = makeIntrinsicValRef(fslib_MFOperators_nleref, "box" , None , Some "Box" , [vara], ([[varaTy]], v_obj_ty)) + let v_isnull_info = makeIntrinsicValRef(fslib_MFOperators_nleref, "isNull" , None , Some "IsNull" , [vara], ([[varaTy]], v_bool_ty)) + let v_isnotnull_info = makeIntrinsicValRef(fslib_MFOperators_nleref, "isNotNull" , None , Some "IsNotNull" , [vara], ([[varaTy]], v_bool_ty)) let v_raise_info = makeIntrinsicValRef(fslib_MFOperators_nleref, "raise" , None , Some "Raise" , [vara], ([[mkSysNonGenericTy sys "Exception"]], varaTy)) let v_failwith_info = makeIntrinsicValRef(fslib_MFOperators_nleref, "failwith" , None , Some "FailWith" , [vara], ([[v_string_ty]], varaTy)) let v_invalid_arg_info = makeIntrinsicValRef(fslib_MFOperators_nleref, "invalidArg" , None , Some "InvalidArg" , [vara], ([[v_string_ty]; [v_string_ty]], varaTy)) @@ -566,18 +660,26 @@ type public TcGlobals(compilingFslib: bool, ilg:ILGlobals, fslibCcu: CcuThunk, d let v_failwithf_info = makeIntrinsicValRef(fslib_MFExtraTopLevelOperators_nleref, "failwithf" , None, Some "PrintFormatToStringThenFail" , [vara;varb], ([[mk_format4_ty varaTy v_unit_ty v_string_ty v_string_ty]], varaTy)) let v_reraise_info = makeIntrinsicValRef(fslib_MFOperators_nleref, "reraise" , None , Some "Reraise", [vara], ([[v_unit_ty]], varaTy)) - let v_typeof_info = makeIntrinsicValRef(fslib_MFOperators_nleref, "typeof" , None , Some "TypeOf" , [vara], ([], v_system_Type_typ)) - let v_methodhandleof_info = makeIntrinsicValRef(fslib_MFOperators_nleref, "methodhandleof" , None , Some "MethodHandleOf", [vara;varb], ([[varaTy --> varbTy]], v_system_RuntimeMethodHandle_typ)) + let v_typeof_info = makeIntrinsicValRef(fslib_MFOperators_nleref, "typeof" , None , Some "TypeOf" , [vara], ([], v_system_Type_ty)) + let v_methodhandleof_info = makeIntrinsicValRef(fslib_MFOperators_nleref, "methodhandleof" , None , Some "MethodHandleOf", [vara;varb], ([[varaTy --> varbTy]], v_system_RuntimeMethodHandle_ty)) let v_sizeof_info = makeIntrinsicValRef(fslib_MFOperators_nleref, "sizeof" , None , Some "SizeOf" , [vara], ([], v_int_ty)) let v_unchecked_defaultof_info = makeIntrinsicValRef(fslib_MFOperatorsUnchecked_nleref, "defaultof" , None , Some "DefaultOf", [vara], ([], varaTy)) - let v_typedefof_info = makeIntrinsicValRef(fslib_MFOperators_nleref, "typedefof" , None , Some "TypeDefOf", [vara], ([], v_system_Type_typ)) - let v_enum_info = makeIntrinsicValRef(fslib_MFOperators_nleref, "enum" , None , Some "ToEnum" , [vara], ([[v_int_ty]], varaTy)) + let v_typedefof_info = makeIntrinsicValRef(fslib_MFOperators_nleref, "typedefof" , None , Some "TypeDefOf", [vara], ([], v_system_Type_ty)) let v_range_op_info = makeIntrinsicValRef(fslib_MFOperators_nleref, "op_Range" , None , None , [vara], ([[varaTy];[varaTy]], mkSeqTy varaTy)) let v_range_step_op_info = makeIntrinsicValRef(fslib_MFOperators_nleref, "op_RangeStep" , None , None , [vara;varb], ([[varaTy];[varbTy];[varaTy]], mkSeqTy varaTy)) let v_range_int32_op_info = makeIntrinsicValRef(fslib_MFOperatorIntrinsics_nleref, "RangeInt32" , None , None , [], ([[v_int_ty];[v_int_ty];[v_int_ty]], mkSeqTy v_int_ty)) + + let v_array_length_info = makeIntrinsicValRef(fslib_MFArrayModule_nleref, "length" , None , Some "Length" , [vara], ([[mkArrayType 1 varaTy]], v_int_ty)) + let v_array_get_info = makeIntrinsicValRef(fslib_MFIntrinsicFunctions_nleref, "GetArray" , None , None , [vara], ([[mkArrayType 1 varaTy]; [v_int_ty]], varaTy)) let v_array2D_get_info = makeIntrinsicValRef(fslib_MFIntrinsicFunctions_nleref, "GetArray2D" , None , None , [vara], ([[mkArrayType 2 varaTy];[v_int_ty]; [v_int_ty]], varaTy)) let v_array3D_get_info = makeIntrinsicValRef(fslib_MFIntrinsicFunctions_nleref, "GetArray3D" , None , None , [vara], ([[mkArrayType 3 varaTy];[v_int_ty]; [v_int_ty]; [v_int_ty]], varaTy)) let v_array4D_get_info = makeIntrinsicValRef(fslib_MFIntrinsicFunctions_nleref, "GetArray4D" , None , None , [vara], ([[mkArrayType 4 varaTy];[v_int_ty]; [v_int_ty]; [v_int_ty]; [v_int_ty]], varaTy)) + let v_array_set_info = makeIntrinsicValRef(fslib_MFIntrinsicFunctions_nleref, "SetArray" , None , None , [vara], ([[mkArrayType 1 varaTy]; [v_int_ty]; [varaTy]], v_unit_ty)) + let v_array2D_set_info = makeIntrinsicValRef(fslib_MFIntrinsicFunctions_nleref, "SetArray2D" , None , None , [vara], ([[mkArrayType 2 varaTy];[v_int_ty]; [v_int_ty]; [varaTy]], v_unit_ty)) + let v_array3D_set_info = makeIntrinsicValRef(fslib_MFIntrinsicFunctions_nleref, "SetArray3D" , None , None , [vara], ([[mkArrayType 3 varaTy];[v_int_ty]; [v_int_ty]; [v_int_ty]; [varaTy]], v_unit_ty)) + let v_array4D_set_info = makeIntrinsicValRef(fslib_MFIntrinsicFunctions_nleref, "SetArray4D" , None , None , [vara], ([[mkArrayType 4 varaTy];[v_int_ty]; [v_int_ty]; [v_int_ty]; [v_int_ty]; [varaTy]], v_unit_ty)) + + let v_nativeptr_tobyref_info = makeIntrinsicValRef(fslib_MFNativePtrModule_nleref, "toByRef" , None , Some "ToByRefInlined", [vara], ([[mkNativePtrTy varaTy]], mkByrefTy varaTy)) let v_seq_collect_info = makeIntrinsicValRef(fslib_MFSeqModule_nleref, "collect" , None , Some "Collect", [vara;varb;varc], ([[varaTy --> varbTy]; [mkSeqTy varaTy]], mkSeqTy varcTy)) let v_seq_delay_info = makeIntrinsicValRef(fslib_MFSeqModule_nleref, "delay" , None , Some "Delay" , [varb], ([[v_unit_ty --> mkSeqTy varbTy]], mkSeqTy varbTy)) @@ -604,14 +706,12 @@ type public TcGlobals(compilingFslib: bool, ilg:ILGlobals, fslibCcu: CcuThunk, d let v_splice_expr_info = makeIntrinsicValRef(fslib_MFExtraTopLevelOperators_nleref, "op_Splice" , None , None , [vara], ([[mkQuotedExprTy varaTy]], varaTy)) let v_splice_raw_expr_info = makeIntrinsicValRef(fslib_MFExtraTopLevelOperators_nleref, "op_SpliceUntyped" , None , None , [vara], ([[mkRawQuotedExprTy]], varaTy)) let v_new_decimal_info = makeIntrinsicValRef(fslib_MFIntrinsicFunctions_nleref, "MakeDecimal" , None , None , [], ([[v_int_ty]; [v_int_ty]; [v_int_ty]; [v_bool_ty]; [v_byte_ty]], v_decimal_ty)) - let v_array_get_info = makeIntrinsicValRef(fslib_MFIntrinsicFunctions_nleref, "GetArray" , None , None , [vara], ([[mkArrayType 1 varaTy]; [v_int_ty]], varaTy)) - let v_array_length_info = makeIntrinsicValRef(fslib_MFArrayModule_nleref, "length" , None , Some "Length" , [vara], ([[mkArrayType 1 varaTy]], v_int_ty)) - let v_deserialize_quoted_FSharp_20_plus_info = makeIntrinsicValRef(fslib_MFQuotations_nleref, "Deserialize" , Some "Expr" , None , [], ([[v_system_Type_typ ;mkListTy v_system_Type_typ ;mkListTy mkRawQuotedExprTy ; mkArrayType 1 v_byte_ty]], mkRawQuotedExprTy )) - let v_deserialize_quoted_FSharp_40_plus_info = makeIntrinsicValRef(fslib_MFQuotations_nleref, "Deserialize40" , Some "Expr" , None , [], ([[v_system_Type_typ ;mkArrayType 1 v_system_Type_typ; mkArrayType 1 v_system_Type_typ; mkArrayType 1 mkRawQuotedExprTy; mkArrayType 1 v_byte_ty]], mkRawQuotedExprTy )) + let v_deserialize_quoted_FSharp_20_plus_info = makeIntrinsicValRef(fslib_MFQuotations_nleref, "Deserialize" , Some "Expr" , None , [], ([[v_system_Type_ty ;mkListTy v_system_Type_ty ;mkListTy mkRawQuotedExprTy ; mkArrayType 1 v_byte_ty]], mkRawQuotedExprTy )) + let v_deserialize_quoted_FSharp_40_plus_info = makeIntrinsicValRef(fslib_MFQuotations_nleref, "Deserialize40" , Some "Expr" , None , [], ([[v_system_Type_ty ;mkArrayType 1 v_system_Type_ty; mkArrayType 1 v_system_Type_ty; mkArrayType 1 mkRawQuotedExprTy; mkArrayType 1 v_byte_ty]], mkRawQuotedExprTy )) let v_cast_quotation_info = makeIntrinsicValRef(fslib_MFQuotations_nleref, "Cast" , Some "Expr" , None , [vara], ([[mkRawQuotedExprTy]], mkQuotedExprTy varaTy)) let v_lift_value_info = makeIntrinsicValRef(fslib_MFQuotations_nleref, "Value" , Some "Expr" , None , [vara], ([[varaTy]], mkRawQuotedExprTy)) let v_lift_value_with_name_info = makeIntrinsicValRef(fslib_MFQuotations_nleref, "ValueWithName" , Some "Expr" , None , [vara], ([[varaTy; v_string_ty]], mkRawQuotedExprTy)) - let v_lift_value_with_defn_info = makeIntrinsicValRef(fslib_MFQuotations_nleref, "WithValue" , Some "Expr" , None , [vara], ([[varaTy; mkQuotedExprTy varaTy]], mkQuotedExprTy varaTy)) + let v_lift_value_with_defn_info = makeIntrinsicValRef(fslib_MFQuotations_nleref, "WithValue" , Some "Expr" , None , [vara], ([[varaTy; mkQuotedExprTy varaTy]], mkQuotedExprTy varaTy)) let v_query_value_info = makeIntrinsicValRef(fslib_MFExtraTopLevelOperators_nleref, "query" , None , None , [], ([], mkQueryBuilderTy) ) let v_query_run_value_info = makeIntrinsicValRef(fslib_MFQueryRunExtensionsLowPriority_nleref, "Run" , Some "QueryBuilder" , None , [vara], ([[mkQueryBuilderTy];[mkQuotedExprTy varaTy]], varaTy) ) let v_query_run_enumerable_info = makeIntrinsicValRef(fslib_MFQueryRunExtensionsHighPriority_nleref, "Run" , Some "QueryBuilder" , None , [vara], ([[mkQueryBuilderTy];[mkQuotedExprTy (mkQuerySourceTy varaTy (mkNonGenericTy v_tcref_System_Collections_IEnumerable)) ]], mkSeqTy varaTy) ) @@ -650,9 +750,9 @@ type public TcGlobals(compilingFslib: bool, ilg:ILGlobals, fslibCcu: CcuThunk, d | res -> res mkILCustomAttrs (attrs.AsList @ attribs) - let addMethodGeneratedAttrs (mdef:ILMethodDef) = {mdef with CustomAttrs = addGeneratedAttrs mdef.CustomAttrs} - let addPropertyGeneratedAttrs (pdef:ILPropertyDef) = {pdef with CustomAttrs = addGeneratedAttrs pdef.CustomAttrs} - let addFieldGeneratedAttrs (fdef:ILFieldDef) = {fdef with CustomAttrs = addGeneratedAttrs fdef.CustomAttrs} + let addMethodGeneratedAttrs (mdef:ILMethodDef) = mdef.With(customAttrs = addGeneratedAttrs mdef.CustomAttrs) + let addPropertyGeneratedAttrs (pdef:ILPropertyDef) = pdef.With(customAttrs = addGeneratedAttrs pdef.CustomAttrs) + let addFieldGeneratedAttrs (fdef:ILFieldDef) = fdef.With(customAttrs = addGeneratedAttrs fdef.CustomAttrs) let tref_DebuggerBrowsableAttribute n = let typ_DebuggerBrowsableState = @@ -669,11 +769,11 @@ type public TcGlobals(compilingFslib: bool, ilg:ILGlobals, fslibCcu: CcuThunk, d | Some res -> res let addNeverAttrs (attrs: ILAttributes) = mkILCustomAttrs (attrs.AsList @ [mkDebuggerBrowsableNeverAttribute()]) - let addPropertyNeverAttrs (pdef:ILPropertyDef) = {pdef with CustomAttrs = addNeverAttrs pdef.CustomAttrs} - let addFieldNeverAttrs (fdef:ILFieldDef) = {fdef with CustomAttrs = addNeverAttrs fdef.CustomAttrs} + let addPropertyNeverAttrs (pdef:ILPropertyDef) = pdef.With(customAttrs = addNeverAttrs pdef.CustomAttrs) + let addFieldNeverAttrs (fdef:ILFieldDef) = fdef.With(customAttrs = addNeverAttrs fdef.CustomAttrs) let mkDebuggerTypeProxyAttribute (ty : ILType) = mkILCustomAttribute ilg (findSysILTypeRef tname_DebuggerTypeProxyAttribute, [ilg.typ_Type], [ILAttribElem.TypeRef (Some ty.TypeRef)], []) - let entries1 = + let betterTyconEntries = [| "Int32" , v_int_tcr "IntPtr" , v_nativeint_tcr "UIntPtr" , v_unativeint_tcr @@ -696,7 +796,7 @@ type public TcGlobals(compilingFslib: bool, ilg:ILGlobals, fslibCcu: CcuThunk, d let ty = mkNonGenericTy tcr nm, findSysTyconRef sys nm, (fun _ -> ty)) - let entries2 = + let decompileTyconEntries = [| "FSharpFunc`2" , v_fastFunc_tcr , (fun tinst -> mkFunTy (List.item 0 tinst) (List.item 1 tinst)) "Tuple`2" , v_ref_tuple2_tcr , decodeTupleTy tupInfoRef @@ -705,62 +805,90 @@ type public TcGlobals(compilingFslib: bool, ilg:ILGlobals, fslibCcu: CcuThunk, d "Tuple`5" , v_ref_tuple5_tcr , decodeTupleTy tupInfoRef "Tuple`6" , v_ref_tuple6_tcr , decodeTupleTy tupInfoRef "Tuple`7" , v_ref_tuple7_tcr , decodeTupleTy tupInfoRef - "Tuple`8" , v_ref_tuple8_tcr , decodeTupleTy tupInfoRef + "Tuple`8" , v_ref_tuple8_tcr , decodeTupleTyIfPossible v_ref_tuple8_tcr tupInfoRef "ValueTuple`2" , v_struct_tuple2_tcr , decodeTupleTy tupInfoStruct "ValueTuple`3" , v_struct_tuple3_tcr , decodeTupleTy tupInfoStruct "ValueTuple`4" , v_struct_tuple4_tcr , decodeTupleTy tupInfoStruct "ValueTuple`5" , v_struct_tuple5_tcr , decodeTupleTy tupInfoStruct "ValueTuple`6" , v_struct_tuple6_tcr , decodeTupleTy tupInfoStruct "ValueTuple`7" , v_struct_tuple7_tcr , decodeTupleTy tupInfoStruct - "ValueTuple`8" , v_struct_tuple8_tcr , decodeTupleTy tupInfoStruct |] - - // Build a map that uses the "canonical" F# type names and TyconRef's for these - // in preference to the .NET type names. Doing this normalization is a fairly performance critical - // piece of code as it is frequently invoked in the process of converting .NET metadata to F# internal - // compiler data structures (see import.fs). - let buildTyconMapper (entries: (string * TyconRef * _)[]) = + "ValueTuple`8" , v_struct_tuple8_tcr , decodeTupleTyIfPossible v_struct_tuple8_tcr tupInfoStruct |] + + let betterEntries = Array.append betterTyconEntries decompileTyconEntries + + let mutable decompileTypeDict = null + let mutable betterTypeDict1 = null + let mutable betterTypeDict2 = null + + /// This map is indexed by stamps and lazy to avoid dereferencing while setting up the base imports. + let getDecompileTypeDict () = + match decompileTypeDict with + | null -> + let entries = decompileTyconEntries + let t = Dictionary.newWithSize entries.Length + for _, tcref, builder in entries do + if tcref.CanDeref then + t.Add(tcref.Stamp, builder) + decompileTypeDict <- t + t + | t -> t + + /// This map is for use when building FSharp.Core.dll. The backing Tycon's may not yet exist for + /// the TyconRef's we have in our hands, hence we can't dereference them to find their stamps. + /// So this dictionary is indexed by names. Make it lazy to avoid dereferencing while setting up the base imports. + let getBetterTypeDict1 () = + match betterTypeDict1 with + | null -> + let entries = betterEntries + let t = Dictionary.newWithSize entries.Length + for nm, tcref, builder in entries do + t.Add(nm, fun tcref2 tinst2 -> if tyconRefEq tcref tcref2 then builder tinst2 else TType_app (tcref2, tinst2)) + betterTypeDict1 <- t + t + | t -> t + + /// This map is for use in normal times (not building FSharp.Core.dll). It is indexed by stamps + /// and lazy to avoid dereferencing while setting up the base imports. + let getBetterTypeDict2 () = + match betterTypeDict2 with + | null -> + let entries = betterEntries + let t = Dictionary.newWithSize entries.Length + for _, tcref, builder in entries do + if tcref.CanDeref then + t.Add(tcref.Stamp, builder) + betterTypeDict2 <- t + t + | t -> t + + /// For logical purposes equate some F# types with .NET types, e.g. TType_tuple == System.Tuple/ValueTuple. + /// Doing this normalization is a fairly performance critical piece of code as it is frequently invoked + /// in the process of converting .NET metadata to F# internal compiler data structures (see import.fs). + let decompileTy (tcref: EntityRef) tinst = + if compilingFslib then + // No need to decompile when compiling FSharp.Core.dll + TType_app (tcref, tinst) + else + let dict = getDecompileTypeDict() + let mutable builder = Unchecked.defaultof<_> + if dict.TryGetValue(tcref.Stamp, &builder) then builder tinst + else TType_app (tcref, tinst) + + /// For cosmetic purposes "improve" some .NET types, e.g. Int32 --> int32. + /// Doing this normalization is a fairly performance critical piece of code as it is frequently invoked + /// in the process of converting .NET metadata to F# internal compiler data structures (see import.fs). + let improveTy (tcref: EntityRef) tinst = if compilingFslib then - // This map is for use when building FSharp.Core.dll. The backing Tycon's may not yet exist for - // the TyconRef's we have in our hands, hence we can't dereference them to find their stamps. - - // So this dictionary is indexed by names. - // - // Make it lazy to avoid dereferencing while setting up the base imports. - let dict = - lazy ( - let dict = Dictionary.newWithSize entries.Length - for nm, tcref, builder in entries do - dict.Add(nm, fun tcref2 tinst -> if tyconRefEq tcref tcref2 then Some(builder tinst) else None) - dict - ) - (fun (tcref: EntityRef) tinst -> - let dict = dict.Value - let key = tcref.LogicalName - if dict.ContainsKey key then dict.[key] tcref tinst - else None ) + let dict = getBetterTypeDict1() + let mutable builder = Unchecked.defaultof<_> + if dict.TryGetValue(tcref.LogicalName, &builder) then builder tcref tinst + else TType_app (tcref, tinst) else - // This map is for use in normal times (not building FSharp.Core.dll). It is indexed by tcref stamp which is - // faster than the indexing technique used in the case above. - // - // So this dictionary is indexed by integers. - // - // Make it lazy to avoid dereferencing while setting up the base imports. - let dict = - lazy - let dict = Dictionary.newWithSize entries.Length - for _, tcref, builder in entries do - if tcref.CanDeref then - dict.Add(tcref.Stamp, builder) - dict - (fun tcref2 tinst -> - let dict = dict.Value - let key = tcref2.Stamp - if dict.ContainsKey key then Some(dict.[key] tinst) - else None) - - let betterTyconRefMapper = buildTyconMapper (Array.append entries1 entries2) - - let decodeTyconRefMapper = buildTyconMapper entries2 + let dict = getBetterTypeDict2() + let mutable builder = Unchecked.defaultof<_> + if dict.TryGetValue(tcref.Stamp, &builder) then builder tinst + else TType_app (tcref, tinst) + override x.ToString() = "" member __.ilg=ilg @@ -791,6 +919,8 @@ type public TcGlobals(compilingFslib: bool, ilg:ILGlobals, fslibCcu: CcuThunk, d member __.expr_tcr = v_expr_tcr member __.raw_expr_tcr = v_raw_expr_tcr member __.nativeint_tcr = v_nativeint_tcr + member __.unativeint_tcr = v_unativeint_tcr + member __.int_tcr = v_int_tcr member __.int32_tcr = v_int32_tcr member __.int16_tcr = v_int16_tcr member __.int64_tcr = v_int64_tcr @@ -816,7 +946,11 @@ type public TcGlobals(compilingFslib: bool, ilg:ILGlobals, fslibCcu: CcuThunk, d member __.pint16_tcr = v_pint16_tcr member __.pint64_tcr = v_pint64_tcr member __.byref_tcr = v_byref_tcr + member __.byref2_tcr = v_byref2_tcr + member __.outref_tcr = v_outref_tcr + member __.inref_tcr = v_inref_tcr member __.nativeptr_tcr = v_nativeptr_tcr + member __.voidptr_tcr = v_voidptr_tcr member __.ilsigptr_tcr = v_ilsigptr_tcr member __.fastFunc_tcr = v_fastFunc_tcr member __.tcref_IQueryable = v_tcref_IQueryable @@ -826,6 +960,9 @@ type public TcGlobals(compilingFslib: bool, ilg:ILGlobals, fslibCcu: CcuThunk, d member __.fslib_IDelegateEvent_tcr = v_fslib_IDelegateEvent_tcr member __.seq_tcr = v_seq_tcr member val seq_base_tcr = mk_MFCompilerServices_tcref fslibCcu "GeneratedSequenceBase`1" + member val byrefkind_In_tcr = mkNonLocalTyconRef fslib_MFByRefKinds_nleref "In" + member val byrefkind_Out_tcr = mkNonLocalTyconRef fslib_MFByRefKinds_nleref "Out" + member val byrefkind_InOut_tcr = mkNonLocalTyconRef fslib_MFByRefKinds_nleref "InOut" member val measureproduct_tcr = mk_MFCompilerServices_tcref fslibCcu "MeasureProduct`2" member val measureinverse_tcr = mk_MFCompilerServices_tcref fslibCcu "MeasureInverse`1" member val measureone_tcr = mk_MFCompilerServices_tcref fslibCcu "MeasureOne" @@ -852,15 +989,15 @@ type public TcGlobals(compilingFslib: bool, ilg:ILGlobals, fslibCcu: CcuThunk, d member __.choice5_tcr = v_choice5_tcr member __.choice6_tcr = v_choice6_tcr member __.choice7_tcr = v_choice7_tcr - member val nativeint_ty = mkNonGenericTy v_nativeint_tcr - member val unativeint_ty = mkNonGenericTy v_unativeint_tcr - member val int32_ty = mkNonGenericTy v_int32_tcr - member val int16_ty = mkNonGenericTy v_int16_tcr - member val int64_ty = mkNonGenericTy v_int64_tcr - member val uint16_ty = mkNonGenericTy v_uint16_tcr - member val uint32_ty = mkNonGenericTy v_uint32_tcr - member val uint64_ty = mkNonGenericTy v_uint64_tcr - member val sbyte_ty = mkNonGenericTy v_sbyte_tcr + member val nativeint_ty = v_nativeint_ty + member val unativeint_ty = v_unativeint_ty + member val int32_ty = v_int32_ty + member val int16_ty = v_int16_ty + member val int64_ty = v_int64_ty + member val uint16_ty = v_uint16_ty + member val uint32_ty = v_uint32_ty + member val uint64_ty = v_uint64_ty + member val sbyte_ty = v_sbyte_ty member __.byte_ty = v_byte_ty member __.bool_ty = v_bool_ty member __.int_ty = v_int_ty @@ -871,24 +1008,24 @@ type public TcGlobals(compilingFslib: bool, ilg:ILGlobals, fslibCcu: CcuThunk, d member __.decimal_ty = v_decimal_ty member val exn_ty = mkNonGenericTy v_exn_tcr - member val float_ty = mkNonGenericTy v_float_tcr - member val float32_ty = mkNonGenericTy v_float32_tcr + member val float_ty = v_float_ty + member val float32_ty = v_float32_ty /// Memoization table to help minimize the number of ILSourceDocument objects we create member __.memoize_file x = v_memoize_file.Apply x - member val system_Array_typ = mkSysNonGenericTy sys "Array" - member val system_Object_typ = mkSysNonGenericTy sys "Object" - member val system_IDisposable_typ = mkSysNonGenericTy sys "IDisposable" - member val system_RuntimeHelpers_typ = mkSysNonGenericTy sysCompilerServices "RuntimeHelpers" - member val system_Value_typ = mkSysNonGenericTy sys "ValueType" - member val system_Delegate_typ = mkSysNonGenericTy sys "Delegate" - member val system_MulticastDelegate_typ = mkSysNonGenericTy sys "MulticastDelegate" - member val system_Enum_typ = mkSysNonGenericTy sys "Enum" - member val system_Exception_typ = mkSysNonGenericTy sys "Exception" + member val system_Array_ty = mkSysNonGenericTy sys "Array" + member val system_Object_ty = mkSysNonGenericTy sys "Object" + member val system_IDisposable_ty = mkSysNonGenericTy sys "IDisposable" + member val system_RuntimeHelpers_ty = mkSysNonGenericTy sysCompilerServices "RuntimeHelpers" + member val system_Value_ty = mkSysNonGenericTy sys "ValueType" + member val system_Delegate_ty = mkSysNonGenericTy sys "Delegate" + member val system_MulticastDelegate_ty = mkSysNonGenericTy sys "MulticastDelegate" + member val system_Enum_ty = mkSysNonGenericTy sys "Enum" + member val system_Exception_ty = mkSysNonGenericTy sys "Exception" member val system_String_typ = mkSysNonGenericTy sys "String" member val system_String_tcref = findSysTyconRef sys "String" - member val system_Int32_typ = mkSysNonGenericTy sys "Int32" - member __.system_Type_typ = v_system_Type_typ + member val system_Int32_ty = mkSysNonGenericTy sys "Int32" + member __.system_Type_ty = v_system_Type_ty member val system_TypedReference_tcref = tryFindSysTyconRef sys "TypedReference" member val system_ArgIterator_tcref = tryFindSysTyconRef sys "ArgIterator" member val system_RuntimeArgumentHandle_tcref = tryFindSysTyconRef sys "RuntimeArgumentHandle" @@ -907,13 +1044,13 @@ type public TcGlobals(compilingFslib: bool, ilg:ILGlobals, fslibCcu: CcuThunk, d member val system_UIntPtr_tcref = findSysTyconRef sys "UIntPtr" member val system_Single_tcref = findSysTyconRef sys "Single" member val system_Double_tcref = findSysTyconRef sys "Double" - member val system_RuntimeTypeHandle_typ = mkSysNonGenericTy sys "RuntimeTypeHandle" - member __.system_RuntimeMethodHandle_typ = v_system_RuntimeMethodHandle_typ + member val system_RuntimeTypeHandle_ty = mkSysNonGenericTy sys "RuntimeTypeHandle" + member __.system_RuntimeMethodHandle_ty = v_system_RuntimeMethodHandle_ty member val system_MarshalByRefObject_tcref = tryFindSysTyconRef sys "MarshalByRefObject" - member val system_MarshalByRefObject_typ = tryMkSysNonGenericTy sys "MarshalByRefObject" + member val system_MarshalByRefObject_ty = tryMkSysNonGenericTy sys "MarshalByRefObject" - member __.system_Reflection_MethodInfo_typ = v_system_Reflection_MethodInfo_typ + member __.system_Reflection_MethodInfo_ty = v_system_Reflection_MethodInfo_ty member val system_Array_tcref = findSysTyconRef sys "Array" member val system_Object_tcref = findSysTyconRef sys "Object" @@ -974,6 +1111,11 @@ type public TcGlobals(compilingFslib: bool, ilg:ILGlobals, fslibCcu: CcuThunk, d member val attrib_ParamArrayAttribute = findSysAttrib "System.ParamArrayAttribute" member val attrib_IDispatchConstantAttribute = tryFindSysAttrib "System.Runtime.CompilerServices.IDispatchConstantAttribute" member val attrib_IUnknownConstantAttribute = tryFindSysAttrib "System.Runtime.CompilerServices.IUnknownConstantAttribute" + + // We use 'findSysAttrib' here because lookup on attribute is done by name comparison, and can proceed + // even if the type is not found in a system assembly. + member val attrib_IsByRefLikeAttribute = findSysAttrib "System.Runtime.CompilerServices.IsByRefLikeAttribute" + member val attrib_IsReadOnlyAttribute = findSysAttrib "System.Runtime.CompilerServices.IsReadOnlyAttribute" member val attrib_SystemObsolete = findSysAttrib "System.ObsoleteAttribute" member val attrib_DllImportAttribute = tryFindSysAttrib "System.Runtime.InteropServices.DllImportAttribute" @@ -983,7 +1125,7 @@ type public TcGlobals(compilingFslib: bool, ilg:ILGlobals, fslibCcu: CcuThunk, d member val attrib_ComImportAttribute = tryFindSysAttrib "System.Runtime.InteropServices.ComImportAttribute" member val attrib_FieldOffsetAttribute = findSysAttrib "System.Runtime.InteropServices.FieldOffsetAttribute" member val attrib_MarshalAsAttribute = tryFindSysAttrib "System.Runtime.InteropServices.MarshalAsAttribute" - member val attrib_InAttribute = tryFindSysAttrib "System.Runtime.InteropServices.InAttribute" + member val attrib_InAttribute = findSysAttrib "System.Runtime.InteropServices.InAttribute" member val attrib_OutAttribute = findSysAttrib "System.Runtime.InteropServices.OutAttribute" member val attrib_OptionalAttribute = tryFindSysAttrib "System.Runtime.InteropServices.OptionalAttribute" member val attrib_DefaultParameterValueAttribute = tryFindSysAttrib "System.Runtime.InteropServices.DefaultParameterValueAttribute" @@ -1005,7 +1147,6 @@ type public TcGlobals(compilingFslib: bool, ilg:ILGlobals, fslibCcu: CcuThunk, d member val attrib_ProjectionParameterAttribute = mk_MFCore_attrib "ProjectionParameterAttribute" member val attrib_CustomOperationAttribute = mk_MFCore_attrib "CustomOperationAttribute" member val attrib_NonSerializedAttribute = tryFindSysAttrib "System.NonSerializedAttribute" - member val attrib_SerializableAttribute = tryFindSysAttrib "System.SerializableAttribute" member val attrib_AutoSerializableAttribute = mk_MFCore_attrib "AutoSerializableAttribute" member val attrib_RequireQualifiedAccessAttribute = mk_MFCore_attrib "RequireQualifiedAccessAttribute" @@ -1052,8 +1193,10 @@ type public TcGlobals(compilingFslib: bool, ilg:ILGlobals, fslibCcu: CcuThunk, d member val attrib_SecuritySafeCriticalAttribute = findSysAttrib "System.Security.SecuritySafeCriticalAttribute" member val attrib_ComponentModelEditorBrowsableAttribute = findSysAttrib "System.ComponentModel.EditorBrowsableAttribute" - member __.betterTyconRefMap = betterTyconRefMapper - member __.decodeTyconRefMap = decodeTyconRefMapper + member g.improveType tcref tinst = improveTy tcref tinst + + member g.decompileType tcref tinst = decompileTy tcref tinst + member __.new_decimal_info = v_new_decimal_info member __.seq_info = v_seq_info member val seq_vref = (ValRefForIntrinsic v_seq_info) @@ -1093,7 +1236,56 @@ type public TcGlobals(compilingFslib: bool, ilg:ILGlobals, fslibCcu: CcuThunk, d member val unchecked_subtraction_vref = ValRefForIntrinsic v_unchecked_subtraction_info member val unchecked_multiply_vref = ValRefForIntrinsic v_unchecked_multiply_info member val unchecked_defaultof_vref = ValRefForIntrinsic v_unchecked_defaultof_info + + member __.bitwise_or_info = v_bitwise_or_info + member __.bitwise_and_info = v_bitwise_and_info + member __.bitwise_xor_info = v_bitwise_xor_info + member __.bitwise_unary_not_info = v_bitwise_unary_not_info + member __.bitwise_shift_left_info = v_bitwise_shift_left_info + member __.bitwise_shift_right_info = v_bitwise_shift_right_info + member __.unchecked_addition_info = v_unchecked_addition_info member __.unchecked_subtraction_info = v_unchecked_subtraction_info + member __.unchecked_multiply_info = v_unchecked_multiply_info + member __.unchecked_division_info = v_unchecked_division_info + member __.unchecked_modulus_info = v_unchecked_modulus_info + member __.unchecked_unary_plus_info = v_unchecked_unary_plus_info + member __.unchecked_unary_minus_info = v_unchecked_unary_minus_info + member __.unchecked_unary_not_info = v_unchecked_unary_not_info + + member __.checked_addition_info = v_checked_addition_info + member __.checked_subtraction_info = v_checked_subtraction_info + member __.checked_multiply_info = v_checked_multiply_info + member __.checked_unary_minus_info = v_checked_unary_minus_info + + member __.byte_checked_info = v_byte_checked_info + member __.sbyte_checked_info = v_sbyte_checked_info + member __.int16_checked_info = v_int16_checked_info + member __.uint16_checked_info = v_uint16_checked_info + member __.int_checked_info = v_int_checked_info + member __.int32_checked_info = v_int32_checked_info + member __.uint32_checked_info = v_uint32_checked_info + member __.int64_checked_info = v_int64_checked_info + member __.uint64_checked_info = v_uint64_checked_info + member __.nativeint_checked_info = v_nativeint_checked_info + member __.unativeint_checked_info = v_unativeint_checked_info + + member __.byte_operator_info = v_byte_operator_info + member __.sbyte_operator_info = v_sbyte_operator_info + member __.int16_operator_info = v_int16_operator_info + member __.uint16_operator_info = v_uint16_operator_info + member __.int_operator_info = v_int_operator_info + member __.int32_operator_info = v_int32_operator_info + member __.uint32_operator_info = v_uint32_operator_info + member __.int64_operator_info = v_int64_operator_info + member __.uint64_operator_info = v_uint64_operator_info + member __.float32_operator_info = v_float32_operator_info + member __.float_operator_info = v_float_operator_info + member __.nativeint_operator_info = v_nativeint_operator_info + member __.unativeint_operator_info = v_unativeint_operator_info + + member __.char_operator_info = v_char_operator_info + member __.enum_operator_info = v_enum_operator_info + member val compare_operator_vref = ValRefForIntrinsic v_compare_operator_info member val equals_operator_vref = ValRefForIntrinsic v_equals_operator_info member val equals_nullable_operator_vref = ValRefForIntrinsic v_equals_nullable_operator_info @@ -1112,7 +1304,17 @@ type public TcGlobals(compilingFslib: bool, ilg:ILGlobals, fslibCcu: CcuThunk, d member val invalid_op_vref = ValRefForIntrinsic v_invalid_op_info member val failwithf_vref = ValRefForIntrinsic v_failwithf_info - member __.equals_operator_info = v_equals_operator_info + member __.equals_operator_info = v_equals_operator_info + member __.not_equals_operator = v_not_equals_operator_info + member __.less_than_operator = v_less_than_operator_info + member __.less_than_or_equals_operator = v_less_than_or_equals_operator_info + member __.greater_than_operator = v_greater_than_operator_info + member __.greater_than_or_equals_operator = v_greater_than_or_equals_operator_info + + member __.hash_info = v_hash_info + member __.box_info = v_box_info + member __.isnull_info = v_isnull_info + member __.isnotnull_info = v_isnotnull_info member __.raise_info = v_raise_info member __.failwith_info = v_failwith_info member __.invalid_arg_info = v_invalid_arg_info @@ -1123,14 +1325,13 @@ type public TcGlobals(compilingFslib: bool, ilg:ILGlobals, fslibCcu: CcuThunk, d member __.methodhandleof_info = v_methodhandleof_info member __.typeof_info = v_typeof_info member __.typedefof_info = v_typedefof_info - member __.array_length_info = v_array_length_info member val reraise_vref = ValRefForIntrinsic v_reraise_info member val methodhandleof_vref = ValRefForIntrinsic v_methodhandleof_info member val typeof_vref = ValRefForIntrinsic v_typeof_info member val sizeof_vref = ValRefForIntrinsic v_sizeof_info member val typedefof_vref = ValRefForIntrinsic v_typedefof_info - member val enum_vref = ValRefForIntrinsic v_enum_info + member val enum_vref = ValRefForIntrinsic v_enum_operator_info member val enumOfValue_vref = ValRefForIntrinsic v_enumOfValue_info member val range_op_vref = ValRefForIntrinsic v_range_op_info member val range_step_op_vref = ValRefForIntrinsic v_range_step_op_info @@ -1141,6 +1342,7 @@ type public TcGlobals(compilingFslib: bool, ilg:ILGlobals, fslibCcu: CcuThunk, d member val array4D_get_vref = ValRefForIntrinsic v_array4D_get_info member val seq_singleton_vref = ValRefForIntrinsic v_seq_singleton_info member val seq_collect_vref = ValRefForIntrinsic v_seq_collect_info + member val nativeptr_tobyref_vref = ValRefForIntrinsic v_nativeptr_tobyref_info member val seq_using_vref = ValRefForIntrinsic v_seq_using_info member val seq_delay_vref = ValRefForIntrinsic v_seq_delay_info member val seq_append_vref = ValRefForIntrinsic v_seq_append_info @@ -1192,10 +1394,17 @@ type public TcGlobals(compilingFslib: bool, ilg:ILGlobals, fslibCcu: CcuThunk, d member __.create_event_info = v_create_event_info member __.seq_to_list_info = v_seq_to_list_info member __.seq_to_array_info = v_seq_to_array_info + + member __.array_length_info = v_array_length_info member __.array_get_info = v_array_get_info - member __.array2D_get_info = v_array2D_get_info - member __.array3D_get_info = v_array3D_get_info - member __.array4D_get_info = v_array4D_get_info + member __.array2D_get_info = v_array2D_get_info + member __.array3D_get_info = v_array3D_get_info + member __.array4D_get_info = v_array4D_get_info + member __.array_set_info = v_array_set_info + member __.array2D_set_info = v_array2D_set_info + member __.array3D_set_info = v_array3D_set_info + member __.array4D_set_info = v_array4D_set_info + member __.deserialize_quoted_FSharp_20_plus_info = v_deserialize_quoted_FSharp_20_plus_info member __.deserialize_quoted_FSharp_40_plus_info = v_deserialize_quoted_FSharp_40_plus_info member __.cast_quotation_info = v_cast_quotation_info @@ -1257,10 +1466,11 @@ type public TcGlobals(compilingFslib: bool, ilg:ILGlobals, fslibCcu: CcuThunk, d member __.mkDebuggableAttributeV2(jitTracking, ignoreSymbolStoreSequencePoints, jitOptimizerDisabled, enableEnC) = - let debuggingMode = (if jitTracking then 1 else 0) ||| - (if jitOptimizerDisabled then 256 else 0) ||| - (if ignoreSymbolStoreSequencePoints then 2 else 0) ||| - (if enableEnC then 4 else 0) + let debuggingMode = + (if jitTracking then 1 else 0) ||| + (if jitOptimizerDisabled then 256 else 0) ||| + (if ignoreSymbolStoreSequencePoints then 2 else 0) ||| + (if enableEnC then 4 else 0) let tref_DebuggableAttribute_DebuggingModes = mkILTyRefInTyRef (tref_DebuggableAttribute, tname_DebuggableAttribute_DebuggingModes) mkILCustomAttribute ilg (tref_DebuggableAttribute, [mkILNonGenericValueTy tref_DebuggableAttribute_DebuggingModes], @@ -1269,16 +1479,9 @@ type public TcGlobals(compilingFslib: bool, ilg:ILGlobals, fslibCcu: CcuThunk, d member __.CompilerGeneratedAttribute = mkCompilerGeneratedAttribute () - member __.eraseClassUnionDef = EraseUnions.mkClassUnionDef (addMethodGeneratedAttrs, addPropertyGeneratedAttrs, addPropertyNeverAttrs, addFieldGeneratedAttrs, addFieldNeverAttrs, mkDebuggerTypeProxyAttribute) ilg -(* - (cenv.ilg.findSysILTypeRef "System.Runtime.InteropServices.StructLayoutAttribute", - [mkILNonGenericValueTy (cenv.ilg.findSysILTypeRef "System.Runtime.InteropServices.LayoutKind") ], -*) - - #if DEBUG // This global is only used during debug output let global_g = ref (None : TcGlobals option) diff --git a/src/fsharp/TypeChecker.fs b/src/fsharp/TypeChecker.fs index 1a3d98740fe..c558602ffa9 100755 --- a/src/fsharp/TypeChecker.fs +++ b/src/fsharp/TypeChecker.fs @@ -8,7 +8,6 @@ open System open System.Collections.Generic open Internal.Utilities -open Internal.Utilities.Collections open Microsoft.FSharp.Compiler.AbstractIL open Microsoft.FSharp.Compiler.AbstractIL.IL @@ -24,11 +23,9 @@ open Microsoft.FSharp.Compiler.Ast open Microsoft.FSharp.Compiler.ErrorLogger open Microsoft.FSharp.Compiler.Tast open Microsoft.FSharp.Compiler.Tastops -open Microsoft.FSharp.Compiler.Tastops.DebugPrint open Microsoft.FSharp.Compiler.PatternMatchCompilation open Microsoft.FSharp.Compiler.TcGlobals open Microsoft.FSharp.Compiler.Lib -open Microsoft.FSharp.Compiler.Layout open Microsoft.FSharp.Compiler.Infos open Microsoft.FSharp.Compiler.AccessibilityLogic open Microsoft.FSharp.Compiler.AttributeChecking @@ -48,22 +45,9 @@ open Microsoft.FSharp.Compiler.ExtensionTyping // Helpers that should be elsewhere //------------------------------------------------------------------------- -let isThreadOrContextStatic g attrs = - HasFSharpAttributeOpt g g.attrib_ThreadStaticAttribute attrs || - HasFSharpAttributeOpt g g.attrib_ContextStaticAttribute attrs - let mkNilListPat (g: TcGlobals) m ty = TPat_unioncase(g.nil_ucref, [ty], [], m) let mkConsListPat (g: TcGlobals) ty ph pt = TPat_unioncase(g.cons_ucref, [ty], [ph;pt], unionRanges ph.Range pt.Range) -let mkCompGenLetIn m nm ty e f = - let v, ve = mkCompGenLocal m nm ty - mkCompGenLet m v e (f (v, ve)) - -let mkUnitDelayLambda (g: TcGlobals) m e = - let uv, _ = mkCompGenLocal m "unitVar" g.unit_ty - mkLambda m uv (e, tyOfExpr g e) - - //------------------------------------------------------------------------- // Errors. //------------------------------------------------------------------------- @@ -91,7 +75,6 @@ exception UnitTypeExpectedWithPossiblePropertySetter of DisplayEnv * TType * str exception UnionPatternsBindDifferentNames of range exception VarBoundTwice of Ident exception ValueRestriction of DisplayEnv * bool * Val * Typar * range -exception FieldNotMutable of DisplayEnv * Tast.RecdFieldRef * range exception ValNotMutable of DisplayEnv * ValRef * range exception ValNotLocal of DisplayEnv * ValRef * range exception InvalidRuntimeCoercion of DisplayEnv * TType * TType * range @@ -115,103 +98,37 @@ exception NonUniqueInferredAbstractSlot of TcGlobals * DisplayEnv * string * Met exception StandardOperatorRedefinitionWarning of string * range exception InvalidInternalsVisibleToAssemblyName of (*badName*)string * (*fileName option*) string option - -// Identify any security attributes -let IsSecurityAttribute (g: TcGlobals) amap (casmap : Dictionary) (Attrib(tcref, _, _, _, _, _, _)) m = - // There's no CAS on Silverlight, so we have to be careful here - match g.attrib_SecurityAttribute with - | None -> false - | Some attr -> - match attr.TyconRef.TryDeref with - | VSome _ -> - let tcs = tcref.Stamp - if casmap.ContainsKey(tcs) then - casmap.[tcs] - else - let exists = ExistsInEntireHierarchyOfType (fun t -> typeEquiv g t (mkAppTy attr.TyconRef [])) g amap m AllowMultiIntfInstantiations.Yes (mkAppTy tcref []) - casmap.[tcs] <- exists - exists - | VNone -> false - -let IsSecurityCriticalAttribute g (Attrib(tcref, _, _, _, _, _, _)) = - (tyconRefEq g tcref g.attrib_SecurityCriticalAttribute.TyconRef || tyconRefEq g tcref g.attrib_SecuritySafeCriticalAttribute.TyconRef) - -let RecdFieldInstanceChecks g amap ad m (rfinfo:RecdFieldInfo) = - if rfinfo.IsStatic then error (Error (FSComp.SR.tcStaticFieldUsedWhenInstanceFieldExpected(), m)) - CheckRecdFieldInfoAttributes g rfinfo m |> CommitOperationResult - CheckRecdFieldInfoAccessible amap m ad rfinfo - -let ILFieldInstanceChecks g amap ad m (finfo :ILFieldInfo) = - if finfo.IsStatic then error (Error (FSComp.SR.tcStaticFieldUsedWhenInstanceFieldExpected(), m)) - CheckILFieldInfoAccessible g amap m ad finfo - CheckILFieldAttributes g finfo m - -let MethInfoChecks g amap isInstance tyargsOpt objArgs ad m (minfo:MethInfo) = - if minfo.IsInstance <> isInstance then - if isInstance then - error (Error (FSComp.SR.csMethodIsNotAnInstanceMethod(minfo.LogicalName), m)) - else - error (Error (FSComp.SR.csMethodIsNotAStaticMethod(minfo.LogicalName), m)) - - // keep the original accessibility domain to determine type accessibility - let adOriginal = ad - // Eliminate the 'protected' portion of the accessibility domain for instance accesses - let ad = - match objArgs, ad with - | [objArg], AccessibleFrom(paths, Some tcref) -> - let objArgTy = tyOfExpr g objArg - let ty = generalizedTyconRef tcref - // We get to keep our rights if the type we're in subsumes the object argument type - if TypeFeasiblySubsumesType 0 g amap m ty CanCoerce objArgTy then - ad - // We get to keep our rights if this is a base call - elif IsBaseCall objArgs then - ad - else - AccessibleFrom(paths, None) - | _ -> ad - - if not (IsTypeAndMethInfoAccessible amap m adOriginal ad minfo) then - error (Error (FSComp.SR.tcMethodNotAccessible(minfo.LogicalName), m)) - CheckMethInfoAttributes g m tyargsOpt minfo |> CommitOperationResult - - -let CheckRecdFieldMutation m denv (rfinfo:RecdFieldInfo) = - if not rfinfo.RecdField.IsMutable then error (FieldNotMutable(denv, rfinfo.RecdFieldRef, m)) - -//------------------------------------------------------------------------- -// Information about object constructors -//------------------------------------------------------------------------- - +/// Represents information about the initialization field used to check that object constructors +/// have completed before fields are accessed. type SafeInitData = | SafeInitField of RecdFieldRef * RecdField | NoSafeInitInfo +/// Represents information about object constructors type CtorInfo = - { // Object model constructors have a very specific form to satisfy .NET limitations. - // For "new = \arg. { new C with ... }" - // ctor = 3 indicates about to type check "\arg. (body)", - // ctor = 2 indicates about to type check "body" - // ctor = 1 indicates actually type checking the body expression - // 0 indicates everywhere else, including auxiliary expressions such e1 in "let x = e1 in { new ... }" - // REVIEW: clean up this rather odd approach ... + { /// Object model constructors have a very specific form to satisfy .NET limitations. + /// For "new = \arg. { new C with ... }" + /// ctor = 3 indicates about to type check "\arg. (body)", + /// ctor = 2 indicates about to type check "body" + /// ctor = 1 indicates actually type checking the body expression + /// 0 indicates everywhere else, including auxiliary expressions such e1 in "let x = e1 in { new ... }" + /// REVIEW: clean up this rather odd approach ... ctorShapeCounter: int + /// A handle to the ref cell to hold results of 'this' for 'type X() as x = ...' and 'new() as x = ...' constructs /// in case 'x' is used in the arguments to the 'inherits' call. safeThisValOpt: Val option + /// A handle to the boolean ref cell to hold success of initialized 'this' for 'type X() as x = ...' constructs safeInitInfo: SafeInitData - ctorIsImplicit: bool + + /// Is the an implicit constructor or an explicit one? + ctorIsImplicit: bool } -//------------------------------------------------------------------------- -// Type environments. -// - Named items in scope (values) -// - Record of type variables that can't be generalized -// - Our 'location' as a concrete compilation path -// - mutable accumulator for the module type currently being accumulated -//------------------------------------------------------------------------- - +/// Represents an item in the environment that may restrict the automatic generalization of later +/// declarations because it refers to type inference variables. As type inference progresses +/// these type inference variables may get solved. [] type UngeneralizableItem(computeFreeTyvars : (unit -> FreeTyvars)) = @@ -220,8 +137,10 @@ type UngeneralizableItem(computeFreeTyvars : (unit -> FreeTyvars)) = // (a) it will _never_ have any free type inference variables as further constraints are added to the system. // (b) its set of FreeTycons will not change as further constraints are added to the system let mutable willNeverHaveFreeTypars = false + // If WillNeverHaveFreeTypars then we can cache the computation of FreeTycons, since they are invariant. let mutable cachedFreeLocalTycons = emptyFreeTycons + // If WillNeverHaveFreeTypars then we can cache the computation of FreeTraitSolutions, since they are invariant. let mutable cachedFreeTraitSolutions = emptyFreeLocals @@ -234,9 +153,14 @@ type UngeneralizableItem(computeFreeTyvars : (unit -> FreeTyvars)) = fvs member item.WillNeverHaveFreeTypars = willNeverHaveFreeTypars + member item.CachedFreeLocalTycons = cachedFreeLocalTycons + member item.CachedFreeTraitSolutions = cachedFreeTraitSolutions +/// Represents the type environment at a particular scope. Includes the name +/// resolution environment, the ungeneralizable items from earlier in the scope +/// and other information about the scope. [] type TcEnv = { /// Name resolution information @@ -261,8 +185,11 @@ type TcEnv = // Of the two, 'ePath' is the one that's barely used. It's only // used by UpdateAccModuleOrNamespaceType to modify the CCU while compiling FSharp.Core ePath: Ident list + eCompPath: CompilationPath + eAccessPath: CompilationPath + /// This field is computed from other fields, but we amortize the cost of computing it. eAccessRights: AccessorDomain @@ -284,10 +211,15 @@ type TcEnv = eCallerMemberName : string option } + member tenv.DisplayEnv = tenv.eNameResEnv.DisplayEnv + member tenv.NameEnv = tenv.eNameResEnv + member tenv.AccessRights = tenv.eAccessRights + override tenv.ToString() = "TcEnv(...)" + /// Compute the value of this computed, cached field let computeAccessRights eAccessPath eInternalsVisibleCompPaths eFamilyType = AccessibleFrom (eAccessPath :: eInternalsVisibleCompPaths, eFamilyType) // env.eAccessRights @@ -347,36 +279,28 @@ let GetRecdInfo env = match env.eCtorInfo with None -> RecdExpr | let AdjustCtorShapeCounter f env = {env with eCtorInfo = Option.map (fun ctorInfo -> { ctorInfo with ctorShapeCounter = f ctorInfo.ctorShapeCounter }) env.eCtorInfo } let ExitCtorShapeRegion env = AdjustCtorShapeCounter (fun _ -> 0) env -//------------------------------------------------------------------------- -// Add stuff to environments and register things as ungeneralizable. -//------------------------------------------------------------------------- - -let isEmptyFreeTyvars ftyvs = - Zset.isEmpty ftyvs.FreeTypars && - Zset.isEmpty ftyvs.FreeTycons - -let addFreeItemOfTy typ eUngeneralizableItems = - let fvs = freeInType CollectAllNoCaching typ +/// Add a type to the TcEnv, i.e. register it as ungeneralizable. +let addFreeItemOfTy ty eUngeneralizableItems = + let fvs = freeInType CollectAllNoCaching ty if isEmptyFreeTyvars fvs then eUngeneralizableItems - else UngeneralizableItem(fun () -> freeInType CollectAllNoCaching typ) :: eUngeneralizableItems - -let rec addFreeInModuleTy (mtyp:ModuleOrNamespaceType) acc = - QueueList.foldBack (typeOfVal >> accFreeInType CollectAllNoCaching) mtyp.AllValsAndMembers - (QueueList.foldBack (fun (mspec:ModuleOrNamespace) acc -> addFreeInModuleTy mspec.ModuleOrNamespaceType acc) mtyp.AllEntities acc) -let freeInModuleTy mtyp = addFreeInModuleTy mtyp emptyFreeTyvars + else UngeneralizableItem(fun () -> freeInType CollectAllNoCaching ty) :: eUngeneralizableItems +/// Add the contents of a module type to the TcEnv, i.e. register the contants as ungeneralizable. +/// Add a module type to the TcEnv, i.e. register it as ungeneralizable. let addFreeItemOfModuleTy mtyp eUngeneralizableItems = let fvs = freeInModuleTy mtyp if isEmptyFreeTyvars fvs then eUngeneralizableItems else UngeneralizableItem(fun () -> freeInModuleTy mtyp) :: eUngeneralizableItems +/// Add a table of values to the name resolution environment. let AddValMapToNameEnv vs nenv = NameMap.foldBackRange (fun v nenv -> AddValRefToNameEnv nenv (mkLocalValRef v)) vs nenv +/// Add a list of values to the name resolution environment. let AddValListToNameEnv vs nenv = List.foldBack (fun v nenv -> AddValRefToNameEnv nenv (mkLocalValRef v)) vs nenv - +/// Adjust the TcEnv to make more things 'InternalsVisibleTo' let addInternalsAccessibility env (ccu:CcuThunk) = let compPath = CompPath (ccu.ILScopeRef, []) let eInternalsVisibleCompPaths = compPath :: env.eInternalsVisibleCompPaths @@ -384,95 +308,83 @@ let addInternalsAccessibility env (ccu:CcuThunk) = eAccessRights = computeAccessRights env.eAccessPath eInternalsVisibleCompPaths env.eFamilyType // update this computed field eInternalsVisibleCompPaths = compPath :: env.eInternalsVisibleCompPaths } -let ModifyNameResEnv f env = { env with eNameResEnv = f env.eNameResEnv } - +/// Add a local value to TcEnv let AddLocalValPrimitive (v:Val) env = - let env = ModifyNameResEnv (fun nenv -> AddValRefToNameEnv nenv (mkLocalValRef v)) env - { env with eUngeneralizableItems = addFreeItemOfTy v.Type env.eUngeneralizableItems } - + { env with + eNameResEnv = AddValRefToNameEnv env.eNameResEnv (mkLocalValRef v) + eUngeneralizableItems = addFreeItemOfTy v.Type env.eUngeneralizableItems } +/// Add a table of local values to TcEnv let AddLocalValMap tcSink scopem (vals:Val NameMap) env = let env = if vals.IsEmpty then env else - let env = ModifyNameResEnv (AddValMapToNameEnv vals) env - { env with eUngeneralizableItems = NameMap.foldBackRange (typeOfVal >> addFreeItemOfTy) vals env.eUngeneralizableItems } + { env with + eNameResEnv = AddValMapToNameEnv vals env.eNameResEnv + eUngeneralizableItems = NameMap.foldBackRange (typeOfVal >> addFreeItemOfTy) vals env.eUngeneralizableItems } CallEnvSink tcSink (scopem, env.NameEnv, env.eAccessRights) env +/// Add a list of local values to TcEnv and report them to the sink let AddLocalVals tcSink scopem (vals:Val list) env = let env = if isNil vals then env else - let env = ModifyNameResEnv (AddValListToNameEnv vals) env - { env with eUngeneralizableItems = List.foldBack (typeOfVal >> addFreeItemOfTy) vals env.eUngeneralizableItems } + { env with + eNameResEnv = AddValListToNameEnv vals env.eNameResEnv + eUngeneralizableItems = List.foldBack (typeOfVal >> addFreeItemOfTy) vals env.eUngeneralizableItems } CallEnvSink tcSink (scopem, env.NameEnv, env.eAccessRights) env -let AddLocalVal tcSink scopem v env = - let env = ModifyNameResEnv (fun nenv -> AddValRefToNameEnv nenv (mkLocalValRef v)) env - let env = {env with eUngeneralizableItems = addFreeItemOfTy v.Type env.eUngeneralizableItems } +/// Add a local value to TcEnv and report it to the sink +let AddLocalVal tcSink scopem v env = + let env = { env with + eNameResEnv = AddValRefToNameEnv env.eNameResEnv (mkLocalValRef v) + eUngeneralizableItems = addFreeItemOfTy v.Type env.eUngeneralizableItems } CallEnvSink tcSink (scopem, env.NameEnv, env.eAccessRights) env +/// Add an exception definition to TcEnv and report it to the sink let AddLocalExnDefnAndReport tcSink scopem env (exnc:Tycon) = - let env = ModifyNameResEnv (fun nenv -> AddExceptionDeclsToNameEnv BulkAdd.No nenv (mkLocalEntityRef exnc)) env - (* Also make VisualStudio think there is an identifier in scope at the range of the identifier text of its binding location *) + let env = { env with eNameResEnv = AddExceptionDeclsToNameEnv BulkAdd.No env.eNameResEnv (mkLocalEntityRef exnc) } + // Also make VisualStudio think there is an identifier in scope at the range of the identifier text of its binding location CallEnvSink tcSink (exnc.Range, env.NameEnv, env.eAccessRights) CallEnvSink tcSink (scopem, env.NameEnv, env.eAccessRights) env +/// Add a list of type definitions to TcEnv let AddLocalTyconRefs ownDefinition g amap m tcrefs env = if isNil tcrefs then env else - env |> ModifyNameResEnv (fun nenv -> AddTyconRefsToNameEnv BulkAdd.No ownDefinition g amap m false nenv tcrefs) + { env with eNameResEnv = AddTyconRefsToNameEnv BulkAdd.No ownDefinition g amap m false env.eNameResEnv tcrefs } +/// Add a list of type definitions to TcEnv let AddLocalTycons g amap m (tycons: Tycon list) env = if isNil tycons then env else env |> AddLocalTyconRefs false g amap m (List.map mkLocalTyconRef tycons) +/// Add a list of type definitions to TcEnv and report them to the sink let AddLocalTyconsAndReport tcSink scopem g amap m tycons env = let env = AddLocalTycons g amap m tycons env CallEnvSink tcSink (scopem, env.NameEnv, env.eAccessRights) env -//------------------------------------------------------------------------- -// Open a structure or an IL namespace -//------------------------------------------------------------------------- - +/// Adjust the TcEnv to account for opening the set of modules and namespaces implied by an `open` declaration let OpenModulesOrNamespaces tcSink g amap scopem root env mvvs openDeclaration = let env = if isNil mvvs then env else - ModifyNameResEnv (fun nenv -> AddModulesAndNamespacesContentsToNameEnv g amap env.eAccessRights scopem root nenv mvvs) env + { env with eNameResEnv = AddModulesAndNamespacesContentsToNameEnv g amap env.eAccessRights scopem root env.eNameResEnv mvvs } CallEnvSink tcSink (scopem, env.NameEnv, env.eAccessRights) CallOpenDeclarationSink tcSink openDeclaration - match openDeclaration.Range with - | None -> () - | Some _ -> - let rec loop (acc: (Item * range) list) (idents: Ident list) = - match idents with - | [] -> acc - | [id] when id.idText = MangledGlobalName -> acc - | id :: rest -> - let idents = List.rev idents - let range = id.idRange - let acc = - match ResolveLongIndentAsModuleOrNamespace ResultCollectionSettings.AllResults amap range OpenQualified env.NameEnv env.eAccessRights idents with - | Result modrefs -> - (acc, modrefs) ||> List.fold (fun acc (_, modref, _) -> - (Item.ModuleOrNamespaces [modref], range) :: acc) - | _ -> acc - loop acc rest - - for item, range in loop [] (List.rev openDeclaration.LongId) do - CallNameResolutionSink tcSink (range, env.NameEnv, item, item, emptyTyparInst, ItemOccurence.Use, env.DisplayEnv, env.eAccessRights) env +/// Adjust the TcEnv to account for a new root Ccu being available, e.g. a referenced assembly let AddRootModuleOrNamespaceRefs g amap m env modrefs = if isNil modrefs then env else - ModifyNameResEnv (fun nenv -> AddModuleOrNamespaceRefsToNameEnv g amap m true env.eAccessRights nenv modrefs) env + { env with eNameResEnv = AddModuleOrNamespaceRefsToNameEnv g amap m true env.eAccessRights env.eNameResEnv modrefs } +/// Adjust the TcEnv to account for a new referenced assembly let AddNonLocalCcu g amap scopem env assemblyName (ccu:CcuThunk, internalsVisibleToAttributes) = let internalsVisible = @@ -485,64 +397,62 @@ let AddNonLocalCcu g amap scopem env assemblyName (ccu:CcuThunk, internalsVisib false) let env = if internalsVisible then addInternalsAccessibility env ccu else env + // Compute the top-rooted module or namespace references let modrefs = ccu.RootModulesAndNamespaces |> List.map (mkNonLocalCcuRootEntityRef ccu) + // Compute the top-rooted type definitions let tcrefs = ccu.RootTypeAndExceptionDefinitions |> List.map (mkNonLocalCcuRootEntityRef ccu) let env = AddRootModuleOrNamespaceRefs g amap scopem env modrefs let env = if isNil tcrefs then env else - ModifyNameResEnv (fun nenv -> AddTyconRefsToNameEnv BulkAdd.Yes false g amap scopem true nenv tcrefs) env - //CallEnvSink tcSink (scopem, env.NameEnv, env.eAccessRights) + { env with eNameResEnv = AddTyconRefsToNameEnv BulkAdd.Yes false g amap scopem true env.eNameResEnv tcrefs } env +/// Adjust the TcEnv to account for a fully processed "namespace" declaration in thie file let AddLocalRootModuleOrNamespace tcSink g amap scopem env (mtyp:ModuleOrNamespaceType) = // Compute the top-rooted module or namespace references let modrefs = mtyp.ModuleAndNamespaceDefinitions |> List.map mkLocalModRef // Compute the top-rooted type definitions let tcrefs = mtyp.TypeAndExceptionDefinitions |> List.map mkLocalTyconRef let env = AddRootModuleOrNamespaceRefs g amap scopem env modrefs - let env = - if isNil tcrefs then env else - ModifyNameResEnv (fun nenv -> AddTyconRefsToNameEnv BulkAdd.No false g amap scopem true nenv tcrefs) env - let env = { env with eUngeneralizableItems = addFreeItemOfModuleTy mtyp env.eUngeneralizableItems } + let env = { env with + eNameResEnv = if isNil tcrefs then env.eNameResEnv else AddTyconRefsToNameEnv BulkAdd.No false g amap scopem true env.eNameResEnv tcrefs + eUngeneralizableItems = addFreeItemOfModuleTy mtyp env.eUngeneralizableItems } CallEnvSink tcSink (scopem, env.NameEnv, env.eAccessRights) env +/// Add a "module X = Y" local module abbreviation to the TcEnv let AddModuleAbbreviationAndReport tcSink scopem id modrefs env = let env = if isNil modrefs then env else - ModifyNameResEnv (fun nenv -> AddModuleAbbrevToNameEnv id nenv modrefs) env + { env with eNameResEnv = AddModuleAbbrevToNameEnv id env.eNameResEnv modrefs } + CallEnvSink tcSink (scopem, env.NameEnv, env.eAccessRights) let item = Item.ModuleOrNamespaces modrefs CallNameResolutionSink tcSink (id.idRange, env.NameEnv, item, item, emptyTyparInst, ItemOccurence.Use, env.DisplayEnv, env.eAccessRights) env +/// Add a "module X = ..." definition to the TcEnv let AddLocalSubModule g amap m env (modul:ModuleOrNamespace) = - let env = ModifyNameResEnv (fun nenv -> AddModuleOrNamespaceRefToNameEnv g amap m false env.eAccessRights nenv (mkLocalModRef modul)) env - let env = { env with eUngeneralizableItems = addFreeItemOfModuleTy modul.ModuleOrNamespaceType env.eUngeneralizableItems } + let env = { env with + eNameResEnv = AddModuleOrNamespaceRefToNameEnv g amap m false env.eAccessRights env.eNameResEnv (mkLocalModRef modul) + eUngeneralizableItems = addFreeItemOfModuleTy modul.ModuleOrNamespaceType env.eUngeneralizableItems } env +/// Add a "module X = ..." definition to the TcEnv and report it to the sink let AddLocalSubModuleAndReport tcSink scopem g amap m env (modul:ModuleOrNamespace) = let env = AddLocalSubModule g amap m env modul CallEnvSink tcSink (scopem, env.NameEnv, env.eAccessRights) env -let RegisterDeclaredTypars typars env = +/// Add a set of explicitly declared type parameters as being available in the TcEnv +let AddDeclaredTypars check typars env = if isNil typars then env else + let env = { env with eNameResEnv = AddDeclaredTyparsToNameEnv check env.eNameResEnv typars } { env with eUngeneralizableItems = List.foldBack (mkTyparTy >> addFreeItemOfTy) typars env.eUngeneralizableItems } -let AddDeclaredTypars check typars env = - if isNil typars then env else - let env = ModifyNameResEnv (fun nenv -> AddDeclaredTyparsToNameEnv check nenv typars) env - RegisterDeclaredTypars typars env - -/// Compilation environment for typechecking a single file in an assembly. Contains the -/// F# and .NET modules loaded from disk, the search path, a table indicating -/// how to List.map F# modules to assembly names, and some nasty globals -/// related to type inference. These are: -/// - all the type variables generated for this compilation unit -/// - the set of active fixups for "letrec" type inference +/// Represents the compilation environment for typechecking a single file in an assembly. [] type cenv = { g: TcGlobals @@ -578,18 +488,30 @@ type cenv = /// Are we compiling the signature of a module from fslib? compilingCanonicalFslibModuleType: bool + + /// Is this a .fsi file? isSig: bool + + /// Does this .fs file have a .fsi file? haveSig: bool + /// Used to generate names niceNameGen: NiceNameGenerator + + /// Used to read and cache information about types and members infoReader: InfoReader + + /// Used to resolve names nameResolver: NameResolver + /// The set of active conditional defines conditionalDefines: string list + isInternalTestSpanStackReferring: bool } - static member Create (g, isScript, niceNameGen, amap, topCcu, isSig, haveSig, conditionalDefines, tcSink, tcVal) = + /// Create a new compilation environment + static member Create (g, isScript, niceNameGen, amap, topCcu, isSig, haveSig, conditionalDefines, tcSink, tcVal, isInternalTestSpanStackReferring) = let infoReader = new InfoReader(g, amap) let instantiationGenerator m tpsorig = ConstraintSolver.FreshenTypars m tpsorig let nameResolver = new NameResolver(g, amap, infoReader, instantiationGenerator) @@ -609,24 +531,24 @@ type cenv = isSig = isSig haveSig = haveSig compilingCanonicalFslibModuleType = (isSig || not haveSig) && g.compilingFslib - conditionalDefines = conditionalDefines } + conditionalDefines = conditionalDefines + isInternalTestSpanStackReferring = isInternalTestSpanStackReferring } + + override __.ToString() = "cenv(...)" let CopyAndFixupTypars m rigid tpsorig = ConstraintSolver.FreshenAndFixupTypars m rigid [] [] tpsorig -let UnifyTypes cenv (env: TcEnv) m expectedTy actualTy = - ConstraintSolver.AddCxTypeEqualsType env.eContextInfo env.DisplayEnv cenv.css m (tryNormalizeMeasureInType cenv.g expectedTy) (tryNormalizeMeasureInType cenv.g actualTy) - -//------------------------------------------------------------------------- -// Generate references to the module being generated - used for -// public items. -//------------------------------------------------------------------------- +let UnifyTypes cenv (env: TcEnv) m actualTy expectedTy = + ConstraintSolver.AddCxTypeEqualsType env.eContextInfo env.DisplayEnv cenv.css m (tryNormalizeMeasureInType cenv.g actualTy) (tryNormalizeMeasureInType cenv.g expectedTy) +/// Make the initial type checking environment for a single file with an empty accumulator for the overall contents for the file let MakeInitialEnv env = // Note: here we allocate a new module type accumulator let mtypeAcc = ref (NewEmptyModuleOrNamespaceType Namespace) { env with eModuleOrNamespaceTypeAccumulator = mtypeAcc }, mtypeAcc +/// Make an environment suitable for a module or namespace. Does not create a new accumulator but uses one we already have/ let MakeInnerEnvWithAcc env nm mtypeAcc modKind = let path = env.ePath @ [nm] let cpath = env.eCompPath.NestedCompPath nm.idText modKind @@ -638,13 +560,14 @@ let MakeInnerEnvWithAcc env nm mtypeAcc modKind = eNameResEnv = { env.eNameResEnv with eDisplayEnv = env.DisplayEnv.AddOpenPath (pathOfLid path) } eModuleOrNamespaceTypeAccumulator = mtypeAcc } +/// Make an environment suitable for a module or namespace, creating a new accumulator. let MakeInnerEnv env nm modKind = // Note: here we allocate a new module type accumulator let mtypeAcc = ref (NewEmptyModuleOrNamespaceType modKind) MakeInnerEnvWithAcc env nm mtypeAcc modKind, mtypeAcc - -let MakeInnerEnvForTyconRef _cenv env tcref isExtrinsicExtension = +/// Make an environment suitable for processing inside a type definition +let MakeInnerEnvForTyconRef env tcref isExtrinsicExtension = if isExtrinsicExtension then // Extension members don't get access to protected stuff env @@ -657,15 +580,19 @@ let MakeInnerEnvForTyconRef _cenv env tcref isExtrinsicExtension = eAccessRights = computeAccessRights eAccessPath env.eInternalsVisibleCompPaths env.eFamilyType // update this computed field eAccessPath = eAccessPath } -let MakeInnerEnvForMember cenv env (v:Val) = +/// Make an environment suitable for processing inside a member definition +let MakeInnerEnvForMember env (v:Val) = match v.MemberInfo with | None -> env - | Some _ -> MakeInnerEnvForTyconRef cenv env v.MemberApparentParent v.IsExtensionMember + | Some _ -> MakeInnerEnvForTyconRef env v.MemberApparentEntity v.IsExtensionMember +/// Get the current accumulator for the namespace/module we're in let GetCurrAccumulatedModuleOrNamespaceType env = !(env.eModuleOrNamespaceTypeAccumulator) + +/// Set the current accumulator for the namespace/module we're in, updating the inferred contents let SetCurrAccumulatedModuleOrNamespaceType env x = env.eModuleOrNamespaceTypeAccumulator := x -/// Set up the initial environment +/// Set up the initial environment accounting for the enclosing "namespace X.Y.Z" definition let LocateEnv ccu env enclosingNamespacePath = let cpath = compPathOfCcu ccu let env = @@ -678,6 +605,7 @@ let LocateEnv ccu env enclosingNamespacePath = let env = List.fold (fun env id -> MakeInnerEnv env id Namespace |> fst) env enclosingNamespacePath env +/// Given an inferred module type, place that inside a namespace path implied by a "namespace X.Y.Z" definition let BuildRootModuleType enclosingNamespacePath (cpath:CompilationPath) mtyp = (enclosingNamespacePath, (cpath, (mtyp, []))) ||> List.foldBack (fun id (cpath, (mtyp, mspecs)) -> @@ -685,21 +613,24 @@ let BuildRootModuleType enclosingNamespacePath (cpath:CompilationPath) mtyp = cpath.ParentCompPath, (a, b :: mspecs)) |> fun (_, (mtyp, mspecs)) -> mtyp, List.rev mspecs +/// Given a resulting module expression, place that inside a namespace path implied by a "namespace X.Y.Z" definition let BuildRootModuleExpr enclosingNamespacePath (cpath:CompilationPath) mexpr = (enclosingNamespacePath, (cpath, mexpr)) ||> List.foldBack (fun id (cpath, mexpr) -> (cpath.ParentCompPath, wrapModuleOrNamespaceExprInNamespace id cpath.ParentCompPath mexpr)) |> snd +/// Try to take the "FSINNN" prefix off a namespace path let TryStripPrefixPath (g:TcGlobals) (enclosingNamespacePath: Ident list) = match enclosingNamespacePath with | p::rest when g.isInteractive && not (isNil rest) && - p.idText.StartsWith(FsiDynamicModulePrefix, System.StringComparison.Ordinal) && + p.idText.StartsWithOrdinal(FsiDynamicModulePrefix) && p.idText.[FsiDynamicModulePrefix.Length..] |> String.forall System.Char.IsDigit -> Some(p, rest) | _ -> None +/// Inside "namespace X.Y.Z" there is an implicit open of "X.Y.Z" let ImplicitlyOpenOwnNamespace tcSink g amap scopem enclosingNamespacePath env = if isNil enclosingNamespacePath then env @@ -710,13 +641,16 @@ let ImplicitlyOpenOwnNamespace tcSink g amap scopem enclosingNamespacePath env = | Some(_, rest) -> rest | None -> enclosingNamespacePath - let ad = env.eAccessRights - match ResolveLongIndentAsModuleOrNamespace ResultCollectionSettings.AllResults amap scopem OpenQualified env.eNameResEnv ad enclosingNamespacePathToOpen with - | Result modrefs -> - let modrefs = List.map p23 modrefs - let openDecl = OpenDeclaration.Create (enclosingNamespacePathToOpen, modrefs, scopem, true) - OpenModulesOrNamespaces tcSink g amap scopem false env modrefs openDecl - | Exception _ -> env + match enclosingNamespacePathToOpen with + | id::rest -> + let ad = env.eAccessRights + match ResolveLongIndentAsModuleOrNamespace tcSink ResultCollectionSettings.AllResults amap scopem true OpenQualified env.eNameResEnv ad id rest true with + | Result modrefs -> + let modrefs = List.map p23 modrefs + let openDecl = OpenDeclaration.Create (enclosingNamespacePathToOpen, modrefs, scopem, true) + OpenModulesOrNamespaces tcSink g amap scopem false env modrefs openDecl + | Exception _ -> env + | _ -> env //------------------------------------------------------------------------- @@ -733,7 +667,8 @@ let ShrinkContext env oldRange newRange = | ContextInfo.ReturnInComputationExpression | ContextInfo.YieldInComputationExpression | ContextInfo.RuntimeTypeTest _ - | ContextInfo.DowncastUsedInsteadOfUpcast _ -> + | ContextInfo.DowncastUsedInsteadOfUpcast _ + | ContextInfo.SequenceExpression _ -> env | ContextInfo.CollectionElement (b,m) -> if m <> oldRange then env else @@ -789,35 +724,35 @@ let UnifyStructTupleType contextInfo cenv denv m ty ps = /// variables unnecessarily let UnifyFunctionTypeUndoIfFailed cenv denv m ty = match tryDestFunTy cenv.g ty with - | None -> + | ValueNone -> let domainTy = NewInferenceType () let resultTy = NewInferenceType () if AddCxTypeEqualsTypeUndoIfFailed denv cenv.css m ty (domainTy --> resultTy) then - Some(domainTy, resultTy) + ValueSome(domainTy, resultTy) else - None + ValueNone | r -> r /// Optimized unification routine that avoids creating new inference /// variables unnecessarily let UnifyFunctionType extraInfo cenv denv mFunExpr ty = match UnifyFunctionTypeUndoIfFailed cenv denv mFunExpr ty with - | Some res -> res - | None -> + | ValueSome res -> res + | ValueNone -> match extraInfo with | Some argm -> error (NotAFunction(denv, ty, mFunExpr, argm)) | None -> error (FunctionExpected(denv, ty, mFunExpr)) let ReportImplicitlyIgnoredBoolExpression denv m ty expr = - let checkExpr m exprOpt = - match exprOpt with + let checkExpr m expr = + match expr with | Expr.App(Expr.Val(vf, _, _), _, _, exprs, _) when vf.LogicalName = opNameEquals -> match exprs with | Expr.App(Expr.Val(propRef, _, _), _, _, Expr.Val(vf, _, _) :: _, _) :: _ -> if propRef.IsPropertyGetterMethod then let propertyName = propRef.PropertyName let hasCorrespondingSetter = - match propRef.ActualParent with + match propRef.DeclaringEntity with | Parent entityRef -> entityRef.MembersOfFSharpTyconSorted |> List.exists (fun valRef -> valRef.IsPropertySetterMethod && valRef.PropertyName = propertyName) @@ -829,7 +764,7 @@ let ReportImplicitlyIgnoredBoolExpression denv m ty expr = UnitTypeExpectedWithEquality (denv, ty, m) else UnitTypeExpectedWithEquality (denv, ty, m) - | Expr.Op(TOp.ILCall(_, _, _, _, _, _, _, methodRef, _, _, _), _, Expr.Val(vf, _, _) :: _, _) :: _ when methodRef.Name.StartsWith "get_"-> + | Expr.Op(TOp.ILCall(_, _, _, _, _, _, _, methodRef, _, _, _), _, Expr.Val(vf, _, _) :: _, _) :: _ when methodRef.Name.StartsWithOrdinal("get_") -> UnitTypeExpectedWithPossiblePropertySetter (denv, ty, vf.DisplayName, PrettyNaming.ChopPropertyName(methodRef.Name), m) | Expr.Val(vf, _, _) :: _ -> UnitTypeExpectedWithPossibleAssignment (denv, ty, vf.IsMutable, vf.DisplayName, m) @@ -837,17 +772,17 @@ let ReportImplicitlyIgnoredBoolExpression denv m ty expr = | _ -> UnitTypeExpected (denv, ty, m) match expr with - | Some(Expr.Let(_, Expr.Sequential(_, inner, _, _, _), _, _)) - | Some(Expr.Sequential(_, inner, _, _, _)) -> + | Expr.Let(_, Expr.Sequential(_, inner, _, _, _), _, _) + | Expr.Sequential(_, inner, _, _, _) -> let rec extractNext expr = match expr with | Expr.Sequential(_, inner, _, _, _) -> extractNext inner | _ -> checkExpr expr.Range expr extractNext inner - | Some expr -> checkExpr m expr - | _ -> UnitTypeExpected (denv, ty, m) + | expr -> checkExpr m expr -let UnifyUnitType cenv denv m ty exprOpt = +let UnifyUnitType cenv (env:TcEnv) m ty expr = + let denv = env.DisplayEnv if AddCxTypeEqualsTypeUndoIfFailed denv cenv.css m ty cenv.g.unit_ty then true else @@ -855,27 +790,37 @@ let UnifyUnitType cenv denv m ty exprOpt = let resultTy = NewInferenceType () if AddCxTypeEqualsTypeUndoIfFailed denv cenv.css m ty (domainTy --> resultTy) then warning (FunctionValueUnexpected(denv, ty, m)) - else - if not (typeEquiv cenv.g cenv.g.bool_ty ty) then - warning (UnitTypeExpected (denv, ty, m)) - else - warning (ReportImplicitlyIgnoredBoolExpression denv m ty exprOpt) - false + else + let reportImplicitlyDiscardError() = + if typeEquiv cenv.g cenv.g.bool_ty ty then + warning (ReportImplicitlyIgnoredBoolExpression denv m ty expr) + else + warning (UnitTypeExpected (denv, ty, m)) -//------------------------------------------------------------------------- -// Attribute target flags -//------------------------------------------------------------------------- + match env.eContextInfo with + | ContextInfo.SequenceExpression seqTy -> + let lifted = mkSeqTy cenv.g ty + if typeEquiv cenv.g seqTy lifted then + warning (Error (FSComp.SR.implicitlyDiscardedInSequenceExpression(NicePrint.prettyStringOfTy denv ty), m)) + else + if isListTy cenv.g ty || isArrayTy cenv.g ty || typeEquiv cenv.g seqTy ty then + warning (Error (FSComp.SR.implicitlyDiscardedSequenceInSequenceExpression(NicePrint.prettyStringOfTy denv ty), m)) + else + reportImplicitlyDiscardError() + | _ -> + reportImplicitlyDiscardError() + + false // Logically extends System.AttributeTargets module AttributeTargets = let FieldDecl = AttributeTargets.Field ||| AttributeTargets.Property let FieldDeclRestricted = AttributeTargets.Field - let UnionCaseDecl = AttributeTargets.Method ||| AttributeTargets.Property - let TyconDecl = AttributeTargets.Class ||| AttributeTargets.Interface ||| AttributeTargets.Delegate ||| AttributeTargets.Struct ||| AttributeTargets.Enum - let ExnDecl = AttributeTargets.Class + let UnionCaseDecl = AttributeTargets.Method ||| AttributeTargets.Property + let TyconDecl = AttributeTargets.Class ||| AttributeTargets.Interface ||| AttributeTargets.Delegate ||| AttributeTargets.Struct ||| AttributeTargets.Enum + let ExnDecl = AttributeTargets.Class let ModuleDecl = AttributeTargets.Class - let Top = AttributeTargets.Assembly ||| AttributeTargets.Module ||| AttributeTargets.Method - + let Top = AttributeTargets.Assembly ||| AttributeTargets.Module ||| AttributeTargets.Method let ForNewConstructors tcSink (env:TcEnv) mObjTy methodName meths = let origItem = Item.CtorGroup(methodName, meths) @@ -921,8 +866,9 @@ let TcConst cenv ty m env c = | SynMeasure.Anon _ -> error(Error(FSComp.SR.tcUnexpectedMeasureAnon(), m)) | SynMeasure.Var(_, m) -> error(Error(FSComp.SR.tcNonZeroConstantCannotHaveGenericUnit(), m)) - let unif ty2 = UnifyTypes cenv env m ty ty2 - let unif_measure_arg iszero tcr c = + let unif expected = UnifyTypes cenv env m ty expected + + let unifyMeasureArg iszero tcr c = let measureTy = match c with | SynConst.Measure(_, SynMeasure.Anon _) -> @@ -932,53 +878,36 @@ let TcConst cenv ty m env c = | _ -> mkAppTy tcr [TType_measure Measure.One] unif measureTy - match c with - | SynConst.Unit -> unif cenv.g.unit_ty; Const.Unit - | SynConst.Bool i -> unif cenv.g.bool_ty; Const.Bool i - | SynConst.SByte i -> unif cenv.g.sbyte_ty; Const.SByte i - | SynConst.Int16 i -> unif cenv.g.int16_ty; Const.Int16 i - | SynConst.Int32 i -> unif cenv.g.int_ty; Const.Int32 i - | SynConst.Int64 i -> unif cenv.g.int64_ty; Const.Int64 i - | SynConst.IntPtr i -> unif cenv.g.nativeint_ty; Const.IntPtr i - | SynConst.Byte i -> unif cenv.g.byte_ty; Const.Byte i - | SynConst.UInt16 i -> unif cenv.g.uint16_ty; Const.UInt16 i - | SynConst.UInt32 i -> unif cenv.g.uint32_ty; Const.UInt32 i - | SynConst.UInt64 i -> unif cenv.g.uint64_ty; Const.UInt64 i + | SynConst.Unit -> unif cenv.g.unit_ty; Const.Unit + | SynConst.Bool i -> unif cenv.g.bool_ty; Const.Bool i + | SynConst.SByte i -> unif cenv.g.sbyte_ty; Const.SByte i + | SynConst.Int16 i -> unif cenv.g.int16_ty; Const.Int16 i + | SynConst.Int32 i -> unif cenv.g.int_ty; Const.Int32 i + | SynConst.Int64 i -> unif cenv.g.int64_ty; Const.Int64 i + | SynConst.IntPtr i -> unif cenv.g.nativeint_ty; Const.IntPtr i + | SynConst.Byte i -> unif cenv.g.byte_ty; Const.Byte i + | SynConst.UInt16 i -> unif cenv.g.uint16_ty; Const.UInt16 i + | SynConst.UInt32 i -> unif cenv.g.uint32_ty; Const.UInt32 i + | SynConst.UInt64 i -> unif cenv.g.uint64_ty; Const.UInt64 i | SynConst.UIntPtr i -> unif cenv.g.unativeint_ty; Const.UIntPtr i - | SynConst.Measure(SynConst.Single f, _) | SynConst.Single f -> unif_measure_arg (f=0.0f) cenv.g.pfloat32_tcr c; Const.Single f - | SynConst.Measure(SynConst.Double f, _) | SynConst.Double f -> unif_measure_arg (f=0.0) cenv.g.pfloat_tcr c; Const.Double f - | SynConst.Measure(SynConst.Decimal s, _) | SynConst.Decimal s -> unif_measure_arg false cenv.g.pdecimal_tcr c; Const.Decimal s - | SynConst.Measure(SynConst.SByte i, _) | SynConst.SByte i -> unif_measure_arg (i=0y) cenv.g.pint8_tcr c; Const.SByte i - | SynConst.Measure(SynConst.Int16 i, _) | SynConst.Int16 i -> unif_measure_arg (i=0s) cenv.g.pint16_tcr c; Const.Int16 i - | SynConst.Measure(SynConst.Int32 i, _) | SynConst.Int32 i -> unif_measure_arg (i=0) cenv.g.pint_tcr c; Const.Int32 i - | SynConst.Measure(SynConst.Int64 i, _) | SynConst.Int64 i -> unif_measure_arg (i=0L) cenv.g.pint64_tcr c; Const.Int64 i - | SynConst.Char c -> unif cenv.g.char_ty; Const.Char c - | SynConst.String (s, _) -> unif cenv.g.string_ty; Const.String s - | SynConst.UserNum _ -> error(InternalError(FSComp.SR.tcUnexpectedBigRationalConstant(), m)) - | SynConst.Measure _ -> error(Error(FSComp.SR.tcInvalidTypeForUnitsOfMeasure(), m)) - - | SynConst.UInt16s _ -> error(InternalError(FSComp.SR.tcUnexpectedConstUint16Array(), m)) - | SynConst.Bytes _ -> error(InternalError(FSComp.SR.tcUnexpectedConstByteArray(), m)) + | SynConst.Measure(SynConst.Single f, _) | SynConst.Single f -> unifyMeasureArg (f=0.0f) cenv.g.pfloat32_tcr c; Const.Single f + | SynConst.Measure(SynConst.Double f, _) | SynConst.Double f -> unifyMeasureArg (f=0.0) cenv.g.pfloat_tcr c; Const.Double f + | SynConst.Measure(SynConst.Decimal s, _) | SynConst.Decimal s -> unifyMeasureArg false cenv.g.pdecimal_tcr c; Const.Decimal s + | SynConst.Measure(SynConst.SByte i, _) | SynConst.SByte i -> unifyMeasureArg (i=0y) cenv.g.pint8_tcr c; Const.SByte i + | SynConst.Measure(SynConst.Int16 i, _) | SynConst.Int16 i -> unifyMeasureArg (i=0s) cenv.g.pint16_tcr c; Const.Int16 i + | SynConst.Measure(SynConst.Int32 i, _) | SynConst.Int32 i -> unifyMeasureArg (i=0) cenv.g.pint_tcr c; Const.Int32 i + | SynConst.Measure(SynConst.Int64 i, _) | SynConst.Int64 i -> unifyMeasureArg (i=0L) cenv.g.pint64_tcr c; Const.Int64 i + | SynConst.Char c -> unif cenv.g.char_ty; Const.Char c + | SynConst.String (s, _) -> unif cenv.g.string_ty; Const.String s + | SynConst.UserNum _ -> error (InternalError(FSComp.SR.tcUnexpectedBigRationalConstant(), m)) + | SynConst.Measure _ -> error (Error(FSComp.SR.tcInvalidTypeForUnitsOfMeasure(), m)) + + | SynConst.UInt16s _ -> error (InternalError(FSComp.SR.tcUnexpectedConstUint16Array(), m)) + | SynConst.Bytes _ -> error (InternalError(FSComp.SR.tcUnexpectedConstByteArray(), m)) /// Convert an Abstract IL ILFieldInit value read from .NET metadata to a TAST constant -let TcFieldInit (_m:range) lit = - match lit with - | ILFieldInit.String s -> Const.String s - | ILFieldInit.Null -> Const.Zero - | ILFieldInit.Bool b -> Const.Bool b - | ILFieldInit.Char c -> Const.Char (char (int c)) - | ILFieldInit.Int8 x -> Const.SByte x - | ILFieldInit.Int16 x -> Const.Int16 x - | ILFieldInit.Int32 x -> Const.Int32 x - | ILFieldInit.Int64 x -> Const.Int64 x - | ILFieldInit.UInt8 x -> Const.Byte x - | ILFieldInit.UInt16 x -> Const.UInt16 x - | ILFieldInit.UInt32 x -> Const.UInt32 x - | ILFieldInit.UInt64 x -> Const.UInt64 x - | ILFieldInit.Single f -> Const.Single f - | ILFieldInit.Double f -> Const.Double f - +let TcFieldInit (_m:range) lit = PatternMatchCompilation.ilFieldToTastConst lit //------------------------------------------------------------------------- // Arities. These serve two roles in the system: @@ -1054,7 +983,6 @@ let ComputeLogicalName (id:Ident) memberFlags = /// ValMemberInfoTransient(memberInfo, logicalName, compiledName) type ValMemberInfoTransient = ValMemberInfoTransient of ValMemberInfo * string * string - /// Make the unique "name" for a member. // // optImplSlotTy = None (for classes) or Some ty (when implementing interface type ty) @@ -1062,7 +990,7 @@ let MakeMemberDataAndMangledNameForMemberVal(g, tcref, isExtrinsic, attrs, optIm let logicalName = ComputeLogicalName id memberFlags let optIntfSlotTys = if optImplSlotTys |> List.forall (isInterfaceTy g) then optImplSlotTys else [] let memberInfo : ValMemberInfo = - { ApparentParent=tcref + { ApparentEnclosingEntity=tcref MemberFlags=memberFlags IsImplemented=false // NOTE: This value is initially only set for interface implementations and those overrides @@ -1081,8 +1009,8 @@ let MakeMemberDataAndMangledNameForMemberVal(g, tcref, isExtrinsic, attrs, optIm if isExtrinsic then let tname = tcref.LogicalName let text = tname + "." + logicalName - let text = if memberFlags.MemberKind <> MemberKind.Constructor && memberFlags.MemberKind <> MemberKind.ClassConstructor && not memberFlags.IsInstance then text^".Static" else text - let text = if memberFlags.IsOverrideOrExplicitImpl then text^".Override" else text + let text = if memberFlags.MemberKind <> MemberKind.Constructor && memberFlags.MemberKind <> MemberKind.ClassConstructor && not memberFlags.IsInstance then text + ".Static" else text + let text = if memberFlags.IsOverrideOrExplicitImpl then text + ".Override" else text text else List.foldBack (tcrefOfAppTy g >> qualifiedMangledNameOfTyconRef) optIntfSlotTys logicalName @@ -1104,7 +1032,6 @@ let MakeMemberDataAndMangledNameForMemberVal(g, tcref, isExtrinsic, attrs, optIm ValMemberInfoTransient(memberInfo, logicalName, compiledName) - type OverridesOK = | OverridesOK | WarnOnOverrides @@ -1115,12 +1042,12 @@ type OverridesOK = /// /// The declared type parameters, e.g. let f<'a> (x:'a) = x, plus an indication /// of whether additional polymorphism may be inferred, e.g. let f<'a, ..> (x:'a) y = x -type ExplicitTyparInfo = ExplicitTyparInfo of Tast.Typars * Tast.Typars * bool +type ExplicitTyparInfo = ExplicitTyparInfo of Typars * Typars * bool let permitInferTypars = ExplicitTyparInfo ([], [], true) let dontInferTypars = ExplicitTyparInfo ([], [], false) -type ArgAndRetAttribs = ArgAndRetAttribs of Tast.Attribs list list * Tast.Attribs +type ArgAndRetAttribs = ArgAndRetAttribs of Attribs list list * Attribs let noArgOrRetAttribs = ArgAndRetAttribs ([], []) /// A flag to represent the sort of bindings are we processing. @@ -1132,12 +1059,17 @@ let noArgOrRetAttribs = ArgAndRetAttribs ([], []) /// i.e. module bindings get published to the implicitly accumulated module type, but expression 'let' bindings don't. type DeclKind = | ModuleOrMemberBinding + /// Extensions to a type within the same assembly | IntrinsicExtensionBinding + /// Extensions to a type in a different assembly | ExtrinsicExtensionBinding + | ClassLetBinding of (* isStatic *) bool + | ObjectExpressionOverrideBinding + | ExpressionBinding static member IsModuleOrMemberOrExtensionBinding x = @@ -1213,6 +1145,7 @@ type DeclKind = //------------------------------------------------------------------------- /// The results of preliminary pass over patterns to extract variables being declared. +// We should make this a record for cleaner code type PrelimValScheme1 = | PrelimValScheme1 of Ident * @@ -1226,10 +1159,13 @@ type PrelimValScheme1 = ArgAndRetAttribs * SynAccess option * bool + member x.Type = let (PrelimValScheme1(_, _, ty, _, _, _, _, _, _, _, _)) = x in ty + member x.Ident = let (PrelimValScheme1(id, _, _, _, _, _, _, _, _, _, _)) = x in id /// The results of applying let-style generalization after type checking. +// We should make this a record for cleaner code type PrelimValScheme2 = PrelimValScheme2 of Ident * @@ -1246,6 +1182,7 @@ type PrelimValScheme2 = /// The results of applying arity inference to PrelimValScheme2 +// We should make this a record for cleaner code type ValScheme = | ValScheme of Ident * @@ -1260,15 +1197,12 @@ type ValScheme = bool * // isIncrClass bool * // isTyFunc bool // hasDeclaredTypars + member x.GeneralizedTypars = let (ValScheme(_, TypeScheme(gtps, _), _, _, _, _, _, _, _, _, _, _)) = x in gtps + member x.TypeScheme = let (ValScheme(_, ts, _, _, _, _, _, _, _, _, _, _)) = x in ts -//------------------------------------------------------------------------- -// Data structures that track the whole process of taking a syntactic binding and -// checking it. -//------------------------------------------------------------------------- - -/// Translation of patterns is List.unzip into three phases. The first collects names. +/// Translation of patterns is split into three phases. The first collects names. /// The second is run after val_specs have been created for those names and inference /// has been resolved. The second phase is run by applying a function returned by the /// first phase. The input to the second phase is a List.map that gives the Val and type scheme @@ -1278,8 +1212,8 @@ type TcPatPhase2Input = // Get an input indicating we are no longer on the left-most path through a disjunctive "or" pattern member x.RightPath = (let (TcPatPhase2Input(a, _)) = x in TcPatPhase2Input(a, false)) -/// The first phase of checking and elaborating a binding leaves a whole goop of information. -/// This is a bit of a mess: much of this information is carried on a per-value basis by the +/// The first phase of checking and elaborating a binding leaves a goop of information. +/// This is a bit of a mess: much of this information is also carried on a per-value basis by the /// "NameMap". type CheckedBindingInfo = | CheckedBindingInfo of @@ -1300,14 +1234,12 @@ type CheckedBindingInfo = member x.Expr = let (CheckedBindingInfo(_, _, _, _, _, _, expr, _, _, _, _, _, _, _)) = x in expr member x.SeqPoint = let (CheckedBindingInfo(_, _, _, _, _, _, _, _, _, _, spBind, _, _, _)) = x in spBind -//------------------------------------------------------------------------- -// Helpers related to type schemes -//------------------------------------------------------------------------- - +/// Return the generalized type for a type scheme let GeneralizedTypeForTypeScheme typeScheme = let (TypeScheme(generalizedTypars, tau)) = typeScheme - tryMkForallTy generalizedTypars tau + mkForallTyIfNeeded generalizedTypars tau +/// Create a type scheme for somthing that is not generic let NonGenericTypeScheme ty = TypeScheme([], ty) //------------------------------------------------------------------------- @@ -1365,7 +1297,7 @@ let PublishValueDefn cenv env declKind (vspec:Val) = // // Static initializers don't get published to the tcaug // not (memberInfo.MemberFlags.MemberKind = MemberKind.ClassConstructor)) -> - let tcaug = vspec.MemberApparentParent.TypeContents + let tcaug = vspec.MemberApparentEntity.TypeContents let vref = mkLocalValRef vspec tcaug.tcaug_adhoc <- NameMultiMap.add vspec.LogicalName vref tcaug.tcaug_adhoc tcaug.tcaug_adhoc_list.Add (ValRefIsExplicitImpl cenv.g vref, vref) @@ -1405,32 +1337,34 @@ let ComputeAccessAndCompPath env declKindOpt m vis overrideVis actualParent = let cpath = if accessModPermitted then Some env.eCompPath else None vis, cpath -let CheckForAbnormalOperatorNames cenv (idRange:range) opName isMember = - if (idRange.EndColumn - idRange.StartColumn <= 5) && - not cenv.g.compilingFslib +let CheckForAbnormalOperatorNames cenv (idRange:range) coreDisplayName (memberInfoOpt: ValMemberInfo option) = + if (idRange.EndColumn - idRange.StartColumn <= 5) && + not cenv.g.compilingFslib then - match opName with + let opName = DecompileOpName coreDisplayName + let isMember = memberInfoOpt.IsSome + match opName with | PrettyNaming.Relational -> if isMember then - warning(StandardOperatorRedefinitionWarning(FSComp.SR.tcInvalidMethodNameForRelationalOperator(opName, (CompileOpName opName)), idRange)) + warning(StandardOperatorRedefinitionWarning(FSComp.SR.tcInvalidMethodNameForRelationalOperator(opName, coreDisplayName), idRange)) else - warning(StandardOperatorRedefinitionWarning(FSComp.SR.tcInvalidOperatorDefinitionRelational(opName), idRange)) + warning(StandardOperatorRedefinitionWarning(FSComp.SR.tcInvalidOperatorDefinitionRelational opName, idRange)) | PrettyNaming.Equality -> if isMember then - warning(StandardOperatorRedefinitionWarning(FSComp.SR.tcInvalidMethodNameForEquality(opName, (CompileOpName opName)), idRange)) + warning(StandardOperatorRedefinitionWarning(FSComp.SR.tcInvalidMethodNameForEquality(opName, coreDisplayName), idRange)) else - warning(StandardOperatorRedefinitionWarning(FSComp.SR.tcInvalidOperatorDefinitionEquality(opName), idRange)) + warning(StandardOperatorRedefinitionWarning(FSComp.SR.tcInvalidOperatorDefinitionEquality opName, idRange)) | PrettyNaming.Control -> if isMember then - warning(StandardOperatorRedefinitionWarning(FSComp.SR.tcInvalidMemberName(opName, (CompileOpName opName)), idRange)) + warning(StandardOperatorRedefinitionWarning(FSComp.SR.tcInvalidMemberName(opName, coreDisplayName), idRange)) else - warning(StandardOperatorRedefinitionWarning(FSComp.SR.tcInvalidOperatorDefinition(opName), idRange)) + warning(StandardOperatorRedefinitionWarning(FSComp.SR.tcInvalidOperatorDefinition opName, idRange)) | PrettyNaming.Indexer -> if not isMember then - error(StandardOperatorRedefinitionWarning(FSComp.SR.tcInvalidIndexOperatorDefinition(opName), idRange)) + error(StandardOperatorRedefinitionWarning(FSComp.SR.tcInvalidIndexOperatorDefinition opName, idRange)) | PrettyNaming.FixedTypes -> if isMember then - warning(StandardOperatorRedefinitionWarning(FSComp.SR.tcInvalidMemberNameFixedTypes(opName), idRange)) + warning(StandardOperatorRedefinitionWarning(FSComp.SR.tcInvalidMemberNameFixedTypes opName, idRange)) | PrettyNaming.Other -> () let MakeAndPublishVal cenv env (altActualParent, inSig, declKind, vrec, (ValScheme(id, typeScheme, topValData, memberInfoOpt, isMutable, inlineFlag, baseOrThis, vis, compgen, isIncrClass, isTyFunc, hasDeclaredTypars)), attrs, doc, konst, isGeneratedEventVal) = @@ -1450,7 +1384,7 @@ let MakeAndPublishVal cenv env (altActualParent, inSig, declKind, vrec, (ValSche // If it's an extrinsic extension member or not a member then use the containing module. match memberInfoOpt with | Some (ValMemberInfoTransient(memberInfo, _, _)) when not isExtrinsic -> - if memberInfo.ApparentParent.IsModuleOrNamespace then + if memberInfo.ApparentEnclosingEntity.IsModuleOrNamespace then errorR(InternalError(FSComp.SR.tcExpectModuleOrNamespaceParent(id.idText), m)) // Members of interface implementations have the accessibility of the interface @@ -1463,7 +1397,7 @@ let MakeAndPublishVal cenv env (altActualParent, inSig, declKind, vrec, (ValSche | _ -> None else None - Parent(memberInfo.ApparentParent), vis + Parent(memberInfo.ApparentEnclosingEntity), vis | _ -> altActualParent, None let vis, _ = ComputeAccessAndCompPath env (Some declKind) id.idRange vis overrideVis actualParent @@ -1537,7 +1471,7 @@ let MakeAndPublishVal cenv env (altActualParent, inSig, declKind, vrec, (ValSche (hasDeclaredTypars || inSig), isGeneratedEventVal, konst, actualParent) - CheckForAbnormalOperatorNames cenv id.idRange (DecompileOpName vspec.CoreDisplayName) (Option.isSome memberInfoOpt) + CheckForAbnormalOperatorNames cenv id.idRange vspec.CoreDisplayName memberInfoOpt PublishValueDefn cenv env declKind vspec @@ -1573,7 +1507,7 @@ let MakeAndPublishBaseVal cenv env baseIdOpt ty = let InstanceMembersNeedSafeInitCheck cenv m thisTy = ExistsInEntireHierarchyOfType - (fun ty -> not (isStructTy cenv.g ty) && (match tryDestAppTy cenv.g ty with Some tcref when tcref.HasSelfReferentialConstructor -> true | _ -> false)) + (fun ty -> not (isStructTy cenv.g ty) && (match tryDestAppTy cenv.g ty with ValueSome tcref when tcref.HasSelfReferentialConstructor -> true | _ -> false)) cenv.g cenv.amap m @@ -1583,7 +1517,7 @@ let InstanceMembersNeedSafeInitCheck cenv m thisTy = let MakeSafeInitField (g: TcGlobals) env m isStatic = let id = ident(globalNng.FreshCompilerGeneratedName("init", m), m) let taccess = TAccess [env.eAccessPath] - NewRecdField isStatic None id g.int_ty true true [] [] XmlDoc.Empty taccess true + NewRecdField isStatic None id false g.int_ty true true [] [] XmlDoc.Empty taccess true // Make the "delayed reference" boolean value recording the safe initialization of a type in a hierarchy where there is a HasSelfReferentialConstructor let ComputeInstanceSafeInitInfo cenv env m thisTy = @@ -1683,7 +1617,7 @@ let ChooseCanonicalDeclaredTyparsAfterInference g denv declaredTypars m = let declaredTypars = NormalizeDeclaredTyparsForEquiRecursiveInference g declaredTypars - if (ListSet.setify typarEq declaredTypars).Length <> declaredTypars.Length then + if ListSet.hasDuplicates typarEq declaredTypars then errorR(Error(FSComp.SR.tcConstrainedTypeVariableCannotBeGeneralized(), m)) declaredTypars @@ -1892,7 +1826,8 @@ let MakeAndPublishSimpleVals cenv env m names mergeNamesInOneNameresEnv = member this.NotifyExprHasType(_, _, _, _, _, _) = assert false // no expr typings in MakeSimpleVals member this.NotifyFormatSpecifierLocation(_, _) = () member this.NotifyOpenDeclaration(_) = () - member this.CurrentSource = None } + member this.CurrentSource = None + member this.FormatStringCheckContext = None } use _h = WithNewTypecheckResultsSink(sink, cenv.tcSink) MakeSimpleVals cenv env names @@ -1966,17 +1901,17 @@ let FreshenAbstractSlot g amap m synTyparDecls absMethInfo = isNil synTypars - let (CompiledSig (argtys, retTy, fmtps, _)) = CompiledSigOfMeth g amap m absMethInfo + let (CompiledSig (argTys, retTy, fmtps, _)) = CompiledSigOfMeth g amap m absMethInfo // If the virtual method is a generic method then copy its type parameters let typarsFromAbsSlot, typarInstFromAbsSlot, _ = let ttps = absMethInfo.GetFormalTyparsOfDeclaringType m - let ttinst = argsOfAppTy g absMethInfo.EnclosingType + let ttinst = argsOfAppTy g absMethInfo.ApparentEnclosingType let rigid = if typarsFromAbsSlotAreRigid then TyparRigidity.Rigid else TyparRigidity.Flexible ConstraintSolver.FreshenAndFixupTypars m rigid ttps ttinst fmtps // Work out the required type of the member - let argTysFromAbsSlot = argtys |> List.mapSquared (instType typarInstFromAbsSlot) + let argTysFromAbsSlot = argTys |> List.mapSquared (instType typarInstFromAbsSlot) let retTyFromAbsSlot = retTy |> GetFSharpViewOfReturnType g |> instType typarInstFromAbsSlot typarsFromAbsSlotAreRigid, typarsFromAbsSlot, argTysFromAbsSlot, retTyFromAbsSlot @@ -1988,6 +1923,7 @@ let FreshenAbstractSlot g amap m synTyparDecls absMethInfo = let BuildFieldMap cenv env isPartial ty flds m = let ad = env.eAccessRights if isNil flds then invalidArg "flds" "BuildFieldMap" + let fldCount = flds.Length let frefSets = let allFields = flds |> List.map (fun ((_, ident), _) -> ident) @@ -2007,7 +1943,7 @@ let BuildFieldMap cenv env isPartial ty flds m = warning (Error(FSComp.SR.tcFieldsDoNotDetermineUniqueRecordType(), m)) // try finding a record type with the same number of fields as the ones that are given. - match tcrefs |> List.tryFind (fun tc -> tc.TrueFieldsAsList.Length = flds.Length) with + match tcrefs |> List.tryFind (fun tc -> tc.TrueFieldsAsList.Length = fldCount) with | Some tcref -> tcref | _ -> // OK, there isn't a unique, good type dictated by the intersection for the field refs. @@ -2076,20 +2012,20 @@ let ApplyUnionCaseOrExnTypesForPat m cenv env overallTy c = ApplyUnionCaseOrExn ((fun (a, b) mArgs args -> TPat_unioncase(a, b, args, unionRanges m mArgs)), (fun a mArgs args -> TPat_exnconstr(a, args, unionRanges m mArgs))) m cenv env overallTy c -let UnionCaseOrExnCheck (env: TcEnv) nargtys nargs m = - if nargs <> nargtys then error (UnionCaseWrongArguments(env.DisplayEnv, nargtys, nargs, m)) +let UnionCaseOrExnCheck (env: TcEnv) numArgTys numArgs m = + if numArgs <> numArgTys then error (UnionCaseWrongArguments(env.DisplayEnv, numArgTys, numArgs, m)) let TcUnionCaseOrExnField cenv (env: TcEnv) ty1 m c n funcs = let ad = env.eAccessRights - let mkf, argtys, _argNames = + let mkf, argTys, _argNames = match ResolvePatternLongIdent cenv.tcSink cenv.nameResolver AllIdsOK false m ad env.eNameResEnv TypeNameResolutionInfo.Default c with | (Item.UnionCase _ | Item.ExnCase _) as item -> ApplyUnionCaseOrExn funcs m cenv env ty1 item | _ -> error(Error(FSComp.SR.tcUnknownUnion(), m)) - let argstysLength = List.length argtys + let argstysLength = List.length argTys if n >= argstysLength then error (UnionCaseWrongNumberOfArgs(env.DisplayEnv, argstysLength, n, m)) - let ty2 = List.item n argtys + let ty2 = List.item n argTys mkf, ty2 //------------------------------------------------------------------------- @@ -2152,32 +2088,37 @@ module GeneralizationHelpers = let rec IsGeneralizableValue g t = match t with - | Expr.Lambda _ | Expr.TyLambda _ | Expr.Const _ | Expr.Val _ -> true + | Expr.Lambda _ | Expr.TyLambda _ | Expr.Const _ -> true + + // let f(x: byref) = let v = &x in ... shouldn't generalize "v" + | Expr.Val (vref, _, m) -> not (isByrefLikeTy g m vref.Type) // Look through coercion nodes corresponding to introduction of subsumption | Expr.Op(TOp.Coerce, [inputTy;actualTy], [e1], _) when isFunTy g actualTy && isFunTy g inputTy -> IsGeneralizableValue g e1 | Expr.Op(op, _, args, _) -> - match op with - | TOp.Tuple _ -> true - | TOp.UnionCase uc -> not (isUnionCaseRefAllocObservable uc) - | TOp.Recd(ctorInfo, tcref) -> - match ctorInfo with - | RecdExpr -> not (isRecdOrUnionOrStructTyconRefAllocObservable g tcref) - | RecdExprIsObjInit -> false - | TOp.Array -> isNil args - | TOp.ExnConstr ec -> not (isExnAllocObservable ec) - | TOp.ILAsm([], _) -> true - - | _ -> false - && List.forall (IsGeneralizableValue g) args + let canGeneralizeOp = + match op with + | TOp.Tuple _ -> true + | TOp.UnionCase uc -> not (isUnionCaseRefDefinitelyMutable uc) + | TOp.Recd(ctorInfo, tcref) -> + match ctorInfo with + | RecdExpr -> not (isRecdOrUnionOrStructTyconRefDefinitelyMutable tcref) + | RecdExprIsObjInit -> false + | TOp.Array -> isNil args + | TOp.ExnConstr ec -> not (isExnDefinitelyMutable ec) + | TOp.ILAsm([], _) -> true + | _ -> false + + canGeneralizeOp && List.forall (IsGeneralizableValue g) args | Expr.LetRec(binds, body, _, _) -> binds |> List.forall (fun b -> not b.Var.IsMutable) && binds |> List.forall (fun b -> IsGeneralizableValue g b.Expr) && IsGeneralizableValue g body + | Expr.Let(bind, body, _, _) -> not bind.Var.IsMutable && IsGeneralizableValue g bind.Expr && @@ -2216,11 +2157,13 @@ module GeneralizationHelpers = // Some situations, e.g. implicit class constructions that represent functions as fields, // do not allow generalisation over constrained typars. (since they can not be represented as fields) + // + // Don't generalize IsCompatFlex type parameters to avoid changing inferred types. let generalizedTypars, ungeneralizableTypars3 = generalizedTypars |> List.partition (fun tp -> - genConstrainedTyparFlag = CanGeneralizeConstrainedTypars || - tp.Constraints.IsEmpty) + (genConstrainedTyparFlag = CanGeneralizeConstrainedTypars || tp.Constraints.IsEmpty) && + not tp.IsCompatFlex) if isNil ungeneralizableTypars1 && isNil ungeneralizableTypars2 && isNil ungeneralizableTypars3 then generalizedTypars, freeInEnv @@ -2262,11 +2205,11 @@ module GeneralizationHelpers = let lhsConstraintTypars = allUntupledArgTys |> List.collect (fun ty -> match tryDestTyparTy cenv.g ty with - | Some tp -> + | ValueSome tp -> match relevantUniqueSubtypeConstraint tp with | Some cxty -> freeInTypeLeftToRight cenv.g false cxty | None -> [] - | None -> []) + | _ -> []) let IsCondensationTypar (tp:Typar) = // A condensation typar may not a user-generated type variable nor has it been unified with any user type variable @@ -2278,7 +2221,7 @@ module GeneralizationHelpers = // A condensation typar can't be used in the constraints of any candidate condensation typars not (ListSet.contains typarEq tp lhsConstraintTypars) && // A condensation typar must occur precisely once in tyIJ, and must not occur free in any other tyIJ - (match allUntupledArgTysWithFreeVars |> List.partition (fun (ty, _) -> match tryDestTyparTy cenv.g ty with Some destTypar -> typarEq destTypar tp | _ -> false) with + (match allUntupledArgTysWithFreeVars |> List.partition (fun (ty, _) -> match tryDestTyparTy cenv.g ty with ValueSome destTypar -> typarEq destTypar tp | _ -> false) with | [_], rest -> not (rest |> List.exists (fun (_, fvs) -> ListSet.contains typarEq tp fvs)) | _ -> false) @@ -2647,7 +2590,7 @@ module EventDeclarationNormalization = if CompileAsEvent cenv.g bindingAttribs then let MakeOne (prefix, target) = - let declPattern = RenameBindingPattern (fun s -> prefix^s) declPattern + let declPattern = RenameBindingPattern (fun s -> prefix + s) declPattern let argName = "handler" // modify the rhs and argument data let bindingRhs, valSynData = @@ -2691,7 +2634,10 @@ let FreshenObjectArgType cenv m rigid tcref isExtrinsic declaredTyconTypars = // Struct members have a byref 'this' type (unless they are extrinsic extension members) let thisTy = if not isExtrinsic && tcref.IsStructOrEnumTycon then - mkByrefTy cenv.g objTy + if isRecdOrStructTyReadOnly cenv.g m objTy then + mkInByrefTy cenv.g objTy + else + mkByrefTy cenv.g objTy else objTy tcrefObjTy, enclosingDeclaredTypars, renaming, objTy, thisTy @@ -2810,7 +2756,7 @@ let TcVal checkAttributes cenv env tpenv (vref:ValRef) optInst optAfterResolutio // If we have got an explicit instantiation then use that | Some(vrefFlags, checkTys) -> let checkInst (tinst:TypeInst) = - if not v.IsMember && not v.PermitsExplicitTypeInstantiation && tinst.Length > 0 && v.Typars.Length > 0 then + if not v.IsMember && not v.PermitsExplicitTypeInstantiation && not (List.isEmpty tinst) && not (List.isEmpty v.Typars) then warning(Error(FSComp.SR.tcDoesNotAllowExplicitTypeArguments(v.DisplayName), m)) match vrec with | ValInRecScope false -> @@ -2890,12 +2836,15 @@ type ApplicableExpr = Expr * // is this the first in an application series bool + member x.Range = match x with | ApplicableExpr (_, e, _) -> e.Range + member x.Type = match x with | ApplicableExpr (cenv, e, _) -> tyOfExpr cenv.g e + member x.SupplyArgument(e2, m) = let (ApplicableExpr (cenv, fe, first)) = x let combinedExpr = @@ -2907,6 +2856,7 @@ type ApplicableExpr = | _ -> Expr.App(fe, tyOfExpr cenv.g fe, [], [e2], m) ApplicableExpr(cenv, combinedExpr, false) + member x.Expr = match x with | ApplicableExpr(_, e, _) -> e @@ -2974,49 +2924,47 @@ let MakeApplicableExprWithFlex cenv (env: TcEnv) expr = /// Checks, warnings and constraint assertions for downcasts -let TcRuntimeTypeTest isCast isOperator cenv denv m tgty srcTy = - if TypeDefinitelySubsumesTypeNoCoercion 0 cenv.g cenv.amap m tgty srcTy then +let TcRuntimeTypeTest isCast isOperator cenv denv m tgtTy srcTy = + if TypeDefinitelySubsumesTypeNoCoercion 0 cenv.g cenv.amap m tgtTy srcTy then warning(TypeTestUnnecessary(m)) - if isTyparTy cenv.g srcTy then - error(IndeterminateRuntimeCoercion(denv, srcTy, tgty, m)) + if isTyparTy cenv.g srcTy && not (destTyparTy cenv.g srcTy).IsCompatFlex then + error(IndeterminateRuntimeCoercion(denv, srcTy, tgtTy, m)) if isSealedTy cenv.g srcTy then error(RuntimeCoercionSourceSealed(denv, srcTy, m)) - if isSealedTy cenv.g tgty || isTyparTy cenv.g tgty || not (isInterfaceTy cenv.g srcTy) then + if isSealedTy cenv.g tgtTy || isTyparTy cenv.g tgtTy || not (isInterfaceTy cenv.g srcTy) then if isCast then - AddCxTypeMustSubsumeType (ContextInfo.RuntimeTypeTest isOperator) denv cenv.css m NoTrace srcTy tgty + AddCxTypeMustSubsumeType (ContextInfo.RuntimeTypeTest isOperator) denv cenv.css m NoTrace srcTy tgtTy else - AddCxTypeMustSubsumeType ContextInfo.NoContext denv cenv.css m NoTrace srcTy tgty + AddCxTypeMustSubsumeType ContextInfo.NoContext denv cenv.css m NoTrace srcTy tgtTy - if isErasedType cenv.g tgty then + if isErasedType cenv.g tgtTy then if isCast then - warning(Error(FSComp.SR.tcTypeCastErased(NicePrint.minimalStringOfType denv tgty, NicePrint.minimalStringOfType denv (stripTyEqnsWrtErasure EraseAll cenv.g tgty)), m)) + warning(Error(FSComp.SR.tcTypeCastErased(NicePrint.minimalStringOfType denv tgtTy, NicePrint.minimalStringOfType denv (stripTyEqnsWrtErasure EraseAll cenv.g tgtTy)), m)) else - error(Error(FSComp.SR.tcTypeTestErased(NicePrint.minimalStringOfType denv tgty, NicePrint.minimalStringOfType denv (stripTyEqnsWrtErasure EraseAll cenv.g tgty)), m)) + error(Error(FSComp.SR.tcTypeTestErased(NicePrint.minimalStringOfType denv tgtTy, NicePrint.minimalStringOfType denv (stripTyEqnsWrtErasure EraseAll cenv.g tgtTy)), m)) else - getErasedTypes cenv.g tgty |> + getErasedTypes cenv.g tgtTy |> List.iter (fun ety -> if isMeasureTy cenv.g ety then warning(Error(FSComp.SR.tcTypeTestLosesMeasures(NicePrint.minimalStringOfType denv ety), m)) else warning(Error(FSComp.SR.tcTypeTestLossy(NicePrint.minimalStringOfType denv ety, NicePrint.minimalStringOfType denv (stripTyEqnsWrtErasure EraseAll cenv.g ety)), m))) /// Checks, warnings and constraint assertions for upcasts -let TcStaticUpcast cenv denv m tgty srcTy = - if isTyparTy cenv.g tgty then - error(IndeterminateStaticCoercion(denv, srcTy, tgty, m)) +let TcStaticUpcast cenv denv m tgtTy srcTy = + if isTyparTy cenv.g tgtTy then + if not (destTyparTy cenv.g tgtTy).IsCompatFlex then + error(IndeterminateStaticCoercion(denv, srcTy, tgtTy, m)) + //else warning(UpcastUnnecessary(m)) - if isSealedTy cenv.g tgty then - warning(CoercionTargetSealed(denv, tgty, m)) + if isSealedTy cenv.g tgtTy && not (isTyparTy cenv.g tgtTy) then + warning(CoercionTargetSealed(denv, tgtTy, m)) - if typeEquiv cenv.g srcTy tgty then + if typeEquiv cenv.g srcTy tgtTy then warning(UpcastUnnecessary(m)) - AddCxTypeMustSubsumeType ContextInfo.NoContext denv cenv.css m NoTrace tgty srcTy - - - - + AddCxTypeMustSubsumeType ContextInfo.NoContext denv cenv.css m NoTrace tgtTy srcTy let BuildPossiblyConditionalMethodCall cenv env isMutable m isProp minfo valUseFlags minst objArgs args = @@ -3056,7 +3004,7 @@ let BuildDisposableCleanup cenv env m (v:Val) = v.SetHasBeenReferenced() let ad = env.eAccessRights let disposeMethod = - match TryFindIntrinsicOrExtensionMethInfo cenv env m ad "Dispose" cenv.g.system_IDisposable_typ with + match TryFindIntrinsicOrExtensionMethInfo cenv env m ad "Dispose" cenv.g.system_IDisposable_ty with | [x] -> x | _ -> error(InternalError(FSComp.SR.tcCouldNotFindIDisposable(), m)) @@ -3064,7 +3012,7 @@ let BuildDisposableCleanup cenv env m (v:Val) = // For struct types the test is simpler: we can determine if IDisposable is supported, and even when it is, we can avoid doing the type test // Note this affects the elaborated form seen by quotations etc. if isStructTy cenv.g v.Type then - if TypeFeasiblySubsumesType 0 cenv.g cenv.amap m cenv.g.system_IDisposable_typ CanCoerce v.Type then + if TypeFeasiblySubsumesType 0 cenv.g cenv.amap m cenv.g.system_IDisposable_ty CanCoerce v.Type then // We can use NeverMutates here because the variable is going out of scope, there is no need to take a defensive // copy of it. let disposeExpr, _ = BuildPossiblyConditionalMethodCall cenv env NeverMutates m false disposeMethod NormalValUse [] [exprForVal v.Range v] [] @@ -3072,16 +3020,16 @@ let BuildDisposableCleanup cenv env m (v:Val) = else mkUnit cenv.g m else - let disposeObjVar, disposeObjExpr = Tastops.mkCompGenLocal m "objectToDispose" cenv.g.system_IDisposable_typ + let disposeObjVar, disposeObjExpr = Tastops.mkCompGenLocal m "objectToDispose" cenv.g.system_IDisposable_ty let disposeExpr, _ = BuildPossiblyConditionalMethodCall cenv env PossiblyMutates m false disposeMethod NormalValUse [] [disposeObjExpr] [] let inpe = mkCoerceExpr(exprForVal v.Range v, cenv.g.obj_ty, m, v.Type) - mkIsInstConditional cenv.g m cenv.g.system_IDisposable_typ inpe disposeObjVar disposeExpr (mkUnit cenv.g m) + mkIsInstConditional cenv.g m cenv.g.system_IDisposable_ty inpe disposeObjVar disposeExpr (mkUnit cenv.g m) /// Build call to get_OffsetToStringData as part of 'fixed' let BuildOffsetToStringData cenv env m = let ad = env.eAccessRights let offsetToStringDataMethod = - match TryFindIntrinsicOrExtensionMethInfo cenv env m ad "get_OffsetToStringData" cenv.g.system_RuntimeHelpers_typ with + match TryFindIntrinsicOrExtensionMethInfo cenv env m ad "get_OffsetToStringData" cenv.g.system_RuntimeHelpers_ty with | [x] -> x | _ -> error(Error(FSComp.SR.tcCouldNotFindOffsetToStringData(), m)) @@ -3106,11 +3054,11 @@ let BuildILFieldGet g amap m objExpr (finfo:ILFieldInfo) = Expr.Const(TcFieldInit m lit, m, fieldType) | _ -> #endif - let wrap, objExpr = mkExprAddrOfExpr g isValueType false NeverMutates objExpr None m + let wrap, objExpr, _readonly, _writeonly = mkExprAddrOfExpr g isValueType false NeverMutates objExpr None m // The empty instantiation on the AbstractIL fspec is OK, since we make the correct fspec in IlxGen.GenAsm // This ensures we always get the type instantiation right when doing this from // polymorphic code, after inlining etc. * - let fspec = mkILFieldSpec(fref, mkILNamedTy valu fref.EnclosingTypeRef []) + let fspec = mkILFieldSpec(fref, mkILNamedTy valu fref.DeclaringTypeRef []) // Add an I_nop if this is an initonly field to make sure we never recognize it as an lvalue. See mkExprAddrOfExpr. wrap (mkAsmExpr (([ mkNormalLdfld fspec ] @ (if finfo.IsInitOnly then [ AI_nop ] else [])), tinst, [objExpr], [fieldType], m)) @@ -3122,9 +3070,9 @@ let BuildILFieldSet g m objExpr (finfo:ILFieldInfo) argExpr = // The empty instantiation on the AbstractIL fspec is OK, since we make the correct fspec in IlxGen.GenAsm // This ensures we always get the type instantiation right when doing this from // polymorphic code, after inlining etc. * - let fspec = mkILFieldSpec(fref, mkILNamedTy valu fref.EnclosingTypeRef []) + let fspec = mkILFieldSpec(fref, mkILNamedTy valu fref.DeclaringTypeRef []) if finfo.IsInitOnly then error (Error (FSComp.SR.tcFieldIsReadonly(), m)) - let wrap, objExpr = mkExprAddrOfExpr g isValueType false DefinitelyMutates objExpr None m + let wrap, objExpr, _readonly, _writeonly = mkExprAddrOfExpr g isValueType false DefinitelyMutates objExpr None m wrap (mkAsmExpr ([ mkNormalStfld fspec ], tinst, [objExpr; argExpr], [], m)) let BuildILStaticFieldSet m (finfo:ILFieldInfo) argExpr = @@ -3135,18 +3083,17 @@ let BuildILStaticFieldSet m (finfo:ILFieldInfo) argExpr = // The empty instantiation on the AbstractIL fspec is OK, since we make the correct fspec in IlxGen.GenAsm // This ensures we always get the type instantiation right when doing this from // polymorphic code, after inlining etc. - let fspec = mkILFieldSpec(fref, mkILNamedTy valu fref.EnclosingTypeRef []) + let fspec = mkILFieldSpec(fref, mkILNamedTy valu fref.DeclaringTypeRef []) if finfo.IsInitOnly then error (Error (FSComp.SR.tcFieldIsReadonly(), m)) mkAsmExpr ([ mkNormalStsfld fspec ], tinst, [argExpr], [], m) let BuildRecdFieldSet g m objExpr (rfinfo:RecdFieldInfo) argExpr = - let tgty = rfinfo.EnclosingType - let valu = isStructTy g tgty - let objExpr = if valu then objExpr else mkCoerceExpr(objExpr, tgty, m, tyOfExpr g objExpr) - let wrap, objExpr = mkExprAddrOfExpr g valu false DefinitelyMutates objExpr None m + let tgtTy = rfinfo.DeclaringType + let valu = isStructTy g tgtTy + let objExpr = if valu then objExpr else mkCoerceExpr(objExpr, tgtTy, m, tyOfExpr g objExpr) + let wrap, objExpr, _readonly, _writeonly = mkExprAddrOfExpr g valu false DefinitelyMutates objExpr None m wrap (mkRecdFieldSetViaExprAddr (objExpr, rfinfo.RecdFieldRef, rfinfo.TypeInst, argExpr, m) ) - //------------------------------------------------------------------------- // Helpers dealing with named and optional args at callsites //------------------------------------------------------------------------- @@ -3231,24 +3178,22 @@ let GetMethodArgs arg = // Helpers dealing with pattern match compilation //------------------------------------------------------------------------- -let CompilePatternForMatch cenv (env: TcEnv) mExpr matchm warnOnUnused actionOnFailure (v, generalizedTypars) clauses inputTy resultTy = - let dtree, targets = CompilePattern cenv.g env.DisplayEnv cenv.amap mExpr matchm warnOnUnused actionOnFailure (v, generalizedTypars) clauses inputTy resultTy +let CompilePatternForMatch cenv (env: TcEnv) mExpr matchm warnOnUnused actionOnFailure (inputVal, generalizedTypars, inputExprOpt) clauses inputTy resultTy = + let dtree, targets = CompilePattern cenv.g env.DisplayEnv cenv.amap mExpr matchm warnOnUnused actionOnFailure (inputVal, generalizedTypars, inputExprOpt) clauses inputTy resultTy mkAndSimplifyMatch NoSequencePointAtInvisibleBinding mExpr matchm resultTy dtree targets /// Compile a pattern -let CompilePatternForMatchClauses cenv env mExpr matchm warnOnUnused actionOnFailure inputTy resultTy tclauses = +let CompilePatternForMatchClauses cenv env mExpr matchm warnOnUnused actionOnFailure inputExprOpt inputTy resultTy tclauses = // Avoid creating a dummy in the common cases where we are about to bind a name for the expression // CLEANUP: avoid code duplication with code further below, i.e.all callers should call CompilePatternForMatch match tclauses with - | [TClause(TPat_as (pat1, PBind (v, TypeScheme(generalizedTypars, _)), _), None, TTarget(vs, e, spTarget), m2)] -> - let expr = CompilePatternForMatch cenv env mExpr matchm warnOnUnused actionOnFailure (v, generalizedTypars) [TClause(pat1, None, TTarget(ListSet.remove valEq v vs, e, spTarget), m2)] inputTy resultTy - v, expr + | [TClause(TPat_as (pat1, PBind (asVal, TypeScheme(generalizedTypars, _)), _), None, TTarget(vs, e, spTarget), m2)] -> + let expr = CompilePatternForMatch cenv env mExpr matchm warnOnUnused actionOnFailure (asVal, generalizedTypars, None) [TClause(pat1, None, TTarget(ListSet.remove valEq asVal vs, e, spTarget), m2)] inputTy resultTy + asVal, expr | _ -> - let idv, _ = Tastops.mkCompGenLocal mExpr "matchValue" inputTy - let expr = CompilePatternForMatch cenv env mExpr matchm warnOnUnused actionOnFailure (idv, []) tclauses inputTy resultTy - idv, expr - - + let matchValueTmp, _ = Tastops.mkCompGenLocal mExpr "matchValue" inputTy + let expr = CompilePatternForMatch cenv env mExpr matchm warnOnUnused actionOnFailure (matchValueTmp, [], inputExprOpt) tclauses inputTy resultTy + matchValueTmp, expr //------------------------------------------------------------------------- // Helpers dealing with sequence expressions @@ -3372,10 +3317,19 @@ let AnalyzeArbitraryExprAsEnumerable cenv (env: TcEnv) localAlloc m exprty expr let getEnumTy = mkRefCellTy cenv.g getEnumTy getEnumExpr, getEnumTy - let guardExpr , guardTy = BuildPossiblyConditionalMethodCall cenv env DefinitelyMutates m false moveNext_minfo NormalValUse moveNext_minst [enumeratorExpr] [] - let currentExpr, currentTy = BuildPossiblyConditionalMethodCall cenv env DefinitelyMutates m true get_Current_minfo NormalValUse get_Current_minst [enumeratorExpr] [] - let betterCurrentExpr = mkCoerceExpr(currentExpr, enumElemTy, currentExpr.Range, currentTy) - Result(enumeratorVar, enumeratorExpr, retTypeOfGetEnumerator, enumElemTy, getEnumExpr, getEnumTy, guardExpr, guardTy, betterCurrentExpr) + let guardExpr , guardTy = BuildPossiblyConditionalMethodCall cenv env DefinitelyMutates m false moveNext_minfo NormalValUse moveNext_minst [enumeratorExpr] [] + let currentExpr, currentTy = BuildPossiblyConditionalMethodCall cenv env DefinitelyMutates m true get_Current_minfo NormalValUse get_Current_minst [enumeratorExpr] [] + let currentExpr = mkCoerceExpr(currentExpr, enumElemTy, currentExpr.Range, currentTy) + let currentExpr, enumElemTy = + // Implicitly dereference byref for expr 'for x in ...' + if isByrefTy cenv.g enumElemTy then + let v, _ = mkCompGenLocal m "byrefReturn" enumElemTy + let expr = mkCompGenLet currentExpr.Range v currentExpr (mkAddrGet m (mkLocalValRef v)) + expr, destByrefTy cenv.g enumElemTy + else + currentExpr, enumElemTy + + Result(enumeratorVar, enumeratorExpr, retTypeOfGetEnumerator, enumElemTy, getEnumExpr, getEnumTy, guardExpr, guardTy, currentExpr) // First try the original known static type match (if isArray1DTy cenv.g exprty then Exception (Failure "") else tryType (expr, exprty)) with @@ -3438,7 +3392,7 @@ let mkSeqCollect cenv env m enumElemTy genTy lam enumExpr = mkCallSeqCollect cenv.g m enumElemTy genResultTy lam enumExpr let mkSeqUsing cenv (env: TcEnv) m resourceTy genTy resourceExpr lam = - AddCxTypeMustSubsumeType ContextInfo.NoContext env.DisplayEnv cenv.css m NoTrace cenv.g.system_IDisposable_typ resourceTy + AddCxTypeMustSubsumeType ContextInfo.NoContext env.DisplayEnv cenv.css m NoTrace cenv.g.system_IDisposable_ty resourceTy let genResultTy = NewInferenceType () UnifyTypes cenv env m genTy (mkSeqTy cenv.g genResultTy) mkCallSeqUsing cenv.g m resourceTy genResultTy resourceExpr lam @@ -3471,11 +3425,10 @@ let mkSeqFinally cenv env m genTy e1 e2 = let mkSeqExprMatchClauses (pat', vspecs) innerExpr = [TClause(pat', None, TTarget(vspecs, innerExpr, SequencePointAtTarget), pat'.Range) ] -let compileSeqExprMatchClauses cenv env inputExprMark (pat':Pattern, vspecs) innerExpr bindPatTy genInnerTy = - let patMark = pat'.Range - let tclauses = mkSeqExprMatchClauses (pat', vspecs) innerExpr - CompilePatternForMatchClauses cenv env inputExprMark patMark false ThrowIncompleteMatchException bindPatTy genInnerTy tclauses - +let compileSeqExprMatchClauses cenv env inputExprMark (pat:Pattern, vspecs) innerExpr inputExprOpt bindPatTy genInnerTy = + let patMark = pat.Range + let tclauses = mkSeqExprMatchClauses (pat, vspecs) innerExpr + CompilePatternForMatchClauses cenv env inputExprMark patMark false ThrowIncompleteMatchException inputExprOpt bindPatTy genInnerTy tclauses let elimFastIntegerForLoop (spBind, id, start, dir, finish, innerExpr, m) = let pseudoEnumExpr = @@ -3505,7 +3458,8 @@ let (|SimpleSemicolonSequence|_|) acceptDeprecated c = | SynExpr.Sequential (_, _, e1, e2, _) -> YieldFree e1 && YieldFree e2 | SynExpr.IfThenElse (_, e2, e3opt, _, _, _, _) -> YieldFree e2 && Option.forall YieldFree e3opt | SynExpr.TryWith (e1, _, clauses, _, _, _, _) -> YieldFree e1 && clauses |> List.forall (fun (Clause(_, _, e, _, _)) -> YieldFree e) - | SynExpr.Match (_, _, clauses, _, _) -> clauses |> List.forall (fun (Clause(_, _, e, _, _)) -> YieldFree e) + | (SynExpr.Match (_, _, clauses, _) | SynExpr.MatchBang (_, _, clauses, _)) -> + clauses |> List.forall (fun (Clause(_, _, e, _, _)) -> YieldFree e) | SynExpr.For (_, _, _, _, _, body, _) | SynExpr.TryFinally (body, _, _, _, _) | SynExpr.LetOrUse (_, _, _, body, _) @@ -3531,6 +3485,7 @@ let (|SimpleSemicolonSequence|_|) acceptDeprecated c = | SynExpr.YieldOrReturn _ | SynExpr.LetOrUse _ | SynExpr.Do _ + | SynExpr.MatchBang _ | SynExpr.LetOrUseBang _ | SynExpr.ImplicitZero _ | SynExpr.While _ -> false @@ -3998,29 +3953,84 @@ let CheckAndRewriteObjectCtor g env (ctorLambaExpr:Expr) = /// Post-typechecking normalizations to enforce semantic constraints /// lazy and, lazy or, rethrow, address-of -let buildApp cenv expr exprty arg m = +let buildApp cenv expr resultTy arg m = + let g = cenv.g match expr, arg with + + // Special rule for building applications of the 'x && y' operator | ApplicableExpr(_, Expr.App(Expr.Val(vf, _, _), _, _, [x0], _), _) , _ - when valRefEq cenv.g vf cenv.g.and_vref - || valRefEq cenv.g vf cenv.g.and2_vref -> - MakeApplicableExprNoFlex cenv (mkLazyAnd cenv.g m x0 arg) + when valRefEq g vf g.and_vref + || valRefEq g vf g.and2_vref -> + MakeApplicableExprNoFlex cenv (mkLazyAnd g m x0 arg), resultTy + + // Special rule for building applications of the 'x || y' operator | ApplicableExpr(_, Expr.App(Expr.Val(vf, _, _), _, _, [x0], _), _), _ - when valRefEq cenv.g vf cenv.g.or_vref - || valRefEq cenv.g vf cenv.g.or2_vref -> - MakeApplicableExprNoFlex cenv (mkLazyOr cenv.g m x0 arg ) + when valRefEq g vf g.or_vref + || valRefEq g vf g.or2_vref -> + MakeApplicableExprNoFlex cenv (mkLazyOr g m x0 arg ), resultTy + + // Special rule for building applications of the 'reraise' operator | ApplicableExpr(_, Expr.App(Expr.Val(vf, _, _), _, _, [], _), _), _ - when valRefEq cenv.g vf cenv.g.reraise_vref -> + when valRefEq g vf g.reraise_vref -> + // exprty is of type: "unit -> 'a". Break it and store the 'a type here, used later as return type. - let _unit_ty, rtn_ty = destFunTy cenv.g exprty - MakeApplicableExprNoFlex cenv (mkCompGenSequential m arg (mkReraise m rtn_ty)) + MakeApplicableExprNoFlex cenv (mkCompGenSequential m arg (mkReraise m resultTy)), resultTy + + // Special rules for NativePtr.ofByRef to generalize result. + // See RFC FS-1053.md + | ApplicableExpr(_, Expr.App(Expr.Val(vf, _, _), _, _, [], _), _), _ + when (valRefEq g vf g.nativeptr_tobyref_vref) -> + + let argty = NewInferenceType() + let resultTy = mkByrefTyWithInference g argty (NewByRefKindInferenceType g m) + expr.SupplyArgument(arg, m), resultTy + + // Special rules for building applications of the '&expr' operator, which gets the + // address of an expression. + // + // See also RFC FS-1053.md + | ApplicableExpr(_, Expr.App(Expr.Val(vf, _, _), _, _, [], _), _), _ + when valRefEq g vf g.addrof_vref -> + + let wrap, e1a', readonly, _writeonly = mkExprAddrOfExpr g true false AddressOfOp arg (Some(vf)) m + // Assert the result type to be readonly if we couldn't take the address + let resultTy = + let argTy = tyOfExpr g arg + if readonly then + mkInByrefTy g argTy + + // "`outref<'T>` types are never introduced implicitly by F#.", see rationale in RFC FS-1053 + // + // We do _not_ introduce outref here, e.g. '&x' where 'x' is outref<_> is _not_ outref. + // This effectively makes 'outref<_>' documentation-only. There is frequently a need to pass outref + // pointers to .NET library functions whose signatures are not tagged with [] + //elif writeonly then + // mkOutByrefTy g argTy + + else + mkByrefTyWithInference g argTy (NewByRefKindInferenceType g m) + + MakeApplicableExprNoFlex cenv (wrap(e1a')), resultTy + + // Special rules for building applications of the &&expr' operators, which gets the + // address of an expression. | ApplicableExpr(_, Expr.App(Expr.Val(vf, _, _), _, _, [], _), _), _ - when (valRefEq cenv.g vf cenv.g.addrof_vref || - valRefEq cenv.g vf cenv.g.addrof2_vref) -> - if valRefEq cenv.g vf cenv.g.addrof2_vref then warning(UseOfAddressOfOperator(m)) - let wrap, e1a' = mkExprAddrOfExpr cenv.g true false DefinitelyMutates arg (Some(vf)) m - MakeApplicableExprNoFlex cenv (wrap(e1a')) + when valRefEq g vf g.addrof2_vref -> + + warning(UseOfAddressOfOperator(m)) + let wrap, e1a', _readonly, _writeonly = mkExprAddrOfExpr g true false AddressOfOp arg (Some(vf)) m + MakeApplicableExprNoFlex cenv (wrap(e1a')), resultTy + + | _ when isByrefTy g resultTy -> + // Handle byref returns, byref-typed returns get implicitly dereferenced + let v, _ = mkCompGenLocal m "byrefReturn" resultTy + let expr = expr.SupplyArgument(arg, m) + let expr = mkCompGenLet m v expr.Expr (mkAddrGet m (mkLocalValRef v)) + let resultTy = destByrefTy g resultTy + MakeApplicableExprNoFlex cenv expr, resultTy + | _ -> - expr.SupplyArgument(arg, m) + expr.SupplyArgument(arg, m), resultTy //------------------------------------------------------------------------- // Additional data structures used by type checking @@ -4261,8 +4271,8 @@ let rec TcTyparConstraint ridx cenv newOk checkCxs occ (env: TcEnv) tpenv c = | WhereTyparSupportsMember(tps, memSpfn, m) -> let traitInfo, tpenv = TcPseudoMemberSpec cenv newOk env tps tpenv memSpfn m match traitInfo with - | TTrait(objtys, ".ctor", memberFlags, argtys, returnTy, _) when memberFlags.MemberKind = MemberKind.Constructor -> - match objtys, argtys with + | TTrait(objtys, ".ctor", memberFlags, argTys, returnTy, _) when memberFlags.MemberKind = MemberKind.Constructor -> + match objtys, argTys with | [ty], [] when typeEquiv cenv.g ty (GetFSharpViewOfReturnType cenv.g returnTy) -> AddCxTypeMustSupportDefaultCtor env.DisplayEnv cenv.css m NoTrace ty tpenv @@ -4290,14 +4300,14 @@ and TcPseudoMemberSpec cenv newOk env synTypes tpenv memSpfn m = let topValInfo = TranslatePartialArity memberConstraintTypars partialValReprInfo let _, curriedArgInfos, returnTy, _ = GetTopValTypeInCompiledForm cenv.g topValInfo memberConstraintTy m //if curriedArgInfos.Length > 1 then error(Error(FSComp.SR.tcInvalidConstraint(), m)) - let argtys = List.concat curriedArgInfos - let argtys = List.map fst argtys + let argTys = List.concat curriedArgInfos + let argTys = List.map fst argTys let logicalCompiledName = ComputeLogicalName id memberFlags let item = Item.ArgName (id, memberConstraintTy, None) CallNameResolutionSink cenv.tcSink (id.idRange, env.NameEnv, item, item, emptyTyparInst, ItemOccurence.Use, env.DisplayEnv, env.eAccessRights) - TTrait(tys, logicalCompiledName, memberFlags, argtys, returnTy, ref None), tpenv + TTrait(tys, logicalCompiledName, memberFlags, argTys, returnTy, ref None), tpenv | _ -> error(Error(FSComp.SR.tcInvalidConstraint(), m)) | _ -> error(Error(FSComp.SR.tcInvalidConstraint(), m)) @@ -4388,15 +4398,15 @@ and TcValSpec cenv env declKind newOk containerInfo memFlagsOpt thisTyOpt tpenv let ty' = if SynInfo.HasOptionalArgs valSynInfo then - let argtysl, returnTy = GetTopTauTypeInFSharpForm cenv.g argsData ty' m - let argtysl = - (List.zip (List.mapSquared fst argtysl) valSynInfo.ArgInfos) - |> List.map (fun (argtys, argInfos) -> - (List.zip argtys argInfos) + let curriedArgTys, returnTy = GetTopTauTypeInFSharpForm cenv.g argsData ty' m + let curriedArgTys = + (List.zip (List.mapSquared fst curriedArgTys) valSynInfo.ArgInfos) + |> List.map (fun (argTys, argInfos) -> + (List.zip argTys argInfos) |> List.map (fun (argty, argInfo) -> if SynInfo.IsOptionalArg argInfo then mkOptionTy cenv.g argty else argty)) - mkIteratedFunTy (List.map (mkRefTupledTy cenv.g) argtysl) returnTy + mkIteratedFunTy (List.map (mkRefTupledTy cenv.g) curriedArgTys) returnTy else ty' let memberInfoOpt = @@ -4461,9 +4471,9 @@ and TcTyparOrMeasurePar optKind cenv (env:TcEnv) newOk tpenv (Typar(id, _, _) as // CallNameResolutionSink cenv.tcSink (tp.Range.StartRange, env.NameEnv, item, item, ItemOccurence.UseInType, env.DisplayEnv, env.eAccessRights) res, tpenv let key = id.idText - match env.eNameResEnv.eTypars.TryFind key with - | Some res -> checkRes res - | None -> + match env.eNameResEnv.eTypars.TryGetValue key with + | true, res -> checkRes res + | _ -> match TryFindUnscopedTypar key tpenv with | Some res -> checkRes res | None -> @@ -4505,7 +4515,7 @@ and TcTyparDecl cenv env (TyparDecl(synAttrs, (Typar(id, _, _) as stp))) = let tp = NewTypar ((if hasMeasureAttr then TyparKind.Measure else TyparKind.Type), TyparRigidity.WarnIfNotRigid, stp, false, TyparDynamicReq.Yes, attrs, hasEqDepAttr, hasCompDepAttr) match TryFindFSharpStringAttribute cenv.g cenv.g.attrib_CompiledNameAttribute attrs with | Some compiledName -> - tp.typar_il_name <- Some compiledName + tp.SetILName (Some compiledName) | None -> () let item = Item.TypeVar(id.idText, tp) @@ -4637,13 +4647,13 @@ and TcTypeOrMeasure optKind cenv newOk checkCxs occ env (tpenv:SyntacticUnscoped NewErrorType (), tpenv - | SynType.MeasurePower(typ, exponent, m) -> + | SynType.MeasurePower(ty, exponent, m) -> match optKind with | Some TyparKind.Type -> errorR(Error(FSComp.SR.tcUnexpectedSymbolInTypeExpression("^"), m)) NewErrorType (), tpenv | _ -> - let ms, tpenv = TcMeasure cenv newOk checkCxs occ env tpenv typ m + let ms, tpenv = TcMeasure cenv newOk checkCxs occ env tpenv ty m TType_measure (Measure.RationalPower (ms, TcSynRationalConst exponent)), tpenv | SynType.MeasureDivide(typ1, typ2, m) -> @@ -4699,9 +4709,9 @@ and TcTypes cenv newOk checkCxs occ env tpenv args = and TcTypesAsTuple cenv newOk checkCxs occ env tpenv args m = match args with | [] -> error(InternalError("empty tuple type", m)) - | [(_, typ)] -> let typ, tpenv = TcTypeAndRecover cenv newOk checkCxs occ env tpenv typ in [typ], tpenv - | (isquot, typ)::args -> - let ty, tpenv = TcTypeAndRecover cenv newOk checkCxs occ env tpenv typ + | [(_, ty)] -> let ty, tpenv = TcTypeAndRecover cenv newOk checkCxs occ env tpenv ty in [ty], tpenv + | (isquot, ty)::args -> + let ty, tpenv = TcTypeAndRecover cenv newOk checkCxs occ env tpenv ty let tys, tpenv = TcTypesAsTuple cenv newOk checkCxs occ env tpenv args m if isquot then errorR(Error(FSComp.SR.tcUnexpectedSlashInType(), m)) ty::tys, tpenv @@ -4711,8 +4721,8 @@ and TcMeasuresAsTuple cenv newOk checkCxs occ env (tpenv:SyntacticUnscopedTyparE let rec gather args tpenv isquot acc = match args with | [] -> acc, tpenv - | (nextisquot, typ)::args -> - let ms1, tpenv = TcMeasure cenv newOk checkCxs occ env tpenv typ m + | (nextisquot, ty)::args -> + let ms1, tpenv = TcMeasure cenv newOk checkCxs occ env tpenv ty m gather args tpenv nextisquot (if isquot then Measure.Prod(acc, Measure.Inv ms1) else Measure.Prod(acc, ms1)) gather args tpenv false Measure.One @@ -4909,8 +4919,8 @@ and TcProvidedTypeApp cenv env tpenv tcref args m = if hasNoArgs then mkAppTy tcref [], tpenv else - let typ = Import.ImportProvidedType cenv.amap m providedTypeAfterStaticArguments - typ, tpenv + let ty = Import.ImportProvidedType cenv.amap m providedTypeAfterStaticArguments + ty, tpenv #endif /// Typecheck an application of a generic type to type arguments. @@ -4932,7 +4942,7 @@ and TcTypeApp cenv newOk checkCxs occ env tpenv m tcref pathTypeArgs (synArgTys: // If we're not checking constraints, i.e. when we first assert the super/interfaces of a type definition, then just // clear the constraint lists of the freshly generated type variables. A little ugly but fairly localized. - if checkCxs = NoCheckCxs then tps |> List.iter (fun tp -> tp.typar_constraints <- []) + if checkCxs = NoCheckCxs then tps |> List.iter (fun tp -> tp.SetConstraints []) if tinst.Length <> pathTypeArgs.Length + synArgTys.Length then error (TyconBadArgs(env.DisplayEnv, tcref, pathTypeArgs.Length + synArgTys.Length, m)) @@ -4949,11 +4959,7 @@ and TcTypeApp cenv newOk checkCxs occ env tpenv m tcref pathTypeArgs (synArgTys: List.iter2 (UnifyTypes cenv env m) tinst actualArgTys // Try to decode System.Tuple --> F~ tuple types etc. - let ty = - let decode = if cenv.g.compilingFslib then None else cenv.g.decodeTyconRefMap tcref actualArgTys - match decode with - | Some res -> res - | None -> mkAppTy tcref actualArgTys + let ty = cenv.g.decompileType tcref actualArgTys ty, tpenv @@ -4973,11 +4979,12 @@ and TcTypeOrMeasureAndRecover optKind cenv newOk checkCxs occ env tpenv ty = and TcTypeAndRecover cenv newOk checkCxs occ env tpenv ty = TcTypeOrMeasureAndRecover (Some TyparKind.Type) cenv newOk checkCxs occ env tpenv ty -and TcNestedTypeApplication cenv newOk checkCxs occ env tpenv mWholeTypeApp typ tyargs = - if not (isAppTy cenv.g typ) then error(Error(FSComp.SR.tcTypeHasNoNestedTypes(), mWholeTypeApp)) - match typ with +and TcNestedTypeApplication cenv newOk checkCxs occ env tpenv mWholeTypeApp ty tyargs = + let ty = convertToTypeWithMetadataIfPossible cenv.g ty + if not (isAppTy cenv.g ty) then error(Error(FSComp.SR.tcTypeHasNoNestedTypes(), mWholeTypeApp)) + match ty with | TType_app(tcref, tinst) -> - let pathTypeArgs = List.take (max (tinst.Length - tcref.Typars(mWholeTypeApp).Length) 0) tinst + let pathTypeArgs = List.truncate (max (tinst.Length - tcref.Typars(mWholeTypeApp).Length) 0) tinst TcTypeApp cenv newOk checkCxs occ env tpenv mWholeTypeApp tcref pathTypeArgs tyargs | _ -> error(InternalError("TcNestedTypeApplication: expected type application", mWholeTypeApp)) @@ -5095,22 +5102,22 @@ and TcPatBindingName cenv env id ty isMemberThis vis1 topValData (inlineFlag, de let names = Map.add id.idText (PrelimValScheme1(id, declaredTypars, ty, topValData, None, isMutable, inlineFlag, baseOrThis, argAttribs, vis, compgen)) names let takenNames = Set.add id.idText takenNames (fun (TcPatPhase2Input (values, isLeftMost)) -> - let (vspec, typeScheme) = - match values.TryFind id.idText with - | Some value -> - let name = id.idText + let (vspec, typeScheme) = + let name = id.idText + match values.TryGetValue name with + | true, value -> if not (String.IsNullOrEmpty name) && Char.IsLower(name.[0]) then - match TryFindPatternByName name env.eNameResEnv with - | Some (Item.Value vref) when vref.LiteralValue.IsSome -> - warning(Error(FSComp.SR.checkLowercaseLiteralBindingInPattern(id.idText), id.idRange)) - | Some _ | None -> () + match env.eNameResEnv.ePatItems.TryGetValue name with + | true, Item.Value vref when vref.LiteralValue.IsSome -> + warning(Error(FSComp.SR.checkLowercaseLiteralBindingInPattern name, id.idRange)) + | _ -> () value - | None -> error(Error(FSComp.SR.tcNameNotBoundInPattern(id.idText), id.idRange)) + | _ -> error(Error(FSComp.SR.tcNameNotBoundInPattern name, id.idRange)) // isLeftMost indicates we are processing the left-most path through a disjunctive or pattern. // For those binding locations, CallNameResolutionSink is called in MakeAndPublishValue, like all other bindings // For non-left-most paths, we register the name resolutions here - if not isLeftMost && not vspec.IsCompilerGenerated && not (String.hasPrefix vspec.LogicalName "_") then + if not isLeftMost && not vspec.IsCompilerGenerated && not (vspec.LogicalName.StartsWithOrdinal("_")) then let item = Item.Value(mkLocalValRef vspec) CallNameResolutionSink cenv.tcSink (id.idRange, env.NameEnv, item, item, emptyTyparInst, ItemOccurence.Binding, env.DisplayEnv, env.eAccessRights) @@ -5156,14 +5163,14 @@ and TcPat warnOnUpper cenv env topValInfo vFlags (tpenv, names, takenNames) ty p | SynPat.IsInst(cty, m) | SynPat.Named (SynPat.IsInst(cty, m), _, _, _, _) -> let srcTy = ty - let tgty, tpenv = TcTypeAndRecover cenv NewTyparsOKButWarnIfNotRigid CheckCxs ItemOccurence.UseInType env tpenv cty - TcRuntimeTypeTest (*isCast*)false (*isOperator*)true cenv env.DisplayEnv m tgty srcTy + let tgtTy, tpenv = TcTypeAndRecover cenv NewTyparsOKButWarnIfNotRigid CheckCxs ItemOccurence.UseInType env tpenv cty + TcRuntimeTypeTest (*isCast*)false (*isOperator*)true cenv env.DisplayEnv m tgtTy srcTy match pat with | SynPat.IsInst(_, m) -> - (fun _ -> TPat_isinst (srcTy, tgty, None, m)), (tpenv, names, takenNames) + (fun _ -> TPat_isinst (srcTy, tgtTy, None, m)), (tpenv, names, takenNames) | SynPat.Named (SynPat.IsInst _, id, isMemberThis, vis, m) -> - let bindf, names, takenNames = TcPatBindingName cenv env id tgty isMemberThis vis None vFlags (names, takenNames) - (fun values -> TPat_isinst (srcTy, tgty, Some(bindf values), m)), + let bindf, names, takenNames = TcPatBindingName cenv env id tgtTy isMemberThis vis None vFlags (names, takenNames) + (fun values -> TPat_isinst (srcTy, tgtTy, Some(bindf values), m)), (tpenv, names, takenNames) | _ -> failwith "TcPat" @@ -5192,10 +5199,10 @@ and TcPat warnOnUpper cenv env topValInfo vFlags (tpenv, names, takenNames) ty p // matching error (UnionPatternsBindDifferentNames m) names1 |> Map.iter (fun _ (PrelimValScheme1(id1, _, ty1, _, _, _, _, _, _, _, _)) -> - match Map.tryFind id1.idText names2 with - | None -> () - | Some (PrelimValScheme1(_, _, ty2, _, _, _, _, _, _, _, _)) -> - UnifyTypes cenv env m ty1 ty2) + match names2.TryGetValue id1.idText with + | true, PrelimValScheme1(_, _, ty2, _, _, _, _, _, _, _, _) -> + UnifyTypes cenv env m ty1 ty2 + | _ -> ()) (fun values -> TPat_disjs ([pat1' values;pat2' values.RightPath], m)), (tpenv, names1, takenNames1) | SynPat.Ands (pats, m) -> @@ -5210,11 +5217,11 @@ and TcPat warnOnUpper cenv env topValInfo vFlags (tpenv, names, takenNames) ty p | _ -> AllIdsOK let checkNoArgsForLiteral() = - let nargs = + let numArgs = match args with | SynConstructorArgs.Pats args -> args.Length | SynConstructorArgs.NamePatPairs (pairs, _) -> pairs.Length - if nargs <> 0 then error(Error(FSComp.SR.tcLiteralDoesNotTakeArguments(), m)) + if numArgs <> 0 then error(Error(FSComp.SR.tcLiteralDoesNotTakeArguments(), m)) match ResolvePatternLongIdent cenv.tcSink cenv.nameResolver warnOnUpperForId false m ad env.eNameResEnv TypeNameResolutionInfo.Default longId with | Item.NewDef id -> @@ -5259,7 +5266,7 @@ and TcPat warnOnUpper cenv env topValInfo vFlags (tpenv, names, takenNames) ty p let args = match args with SynConstructorArgs.Pats args -> args | _ -> failwith "impossible: active patterns can be used only with SynConstructorArgs.Pats" let e = if dotms.Length = longId.Length then - let e = SynExpr.LongIdent(false, LongIdentWithDots(longId, List.take (dotms.Length - 1) dotms), None, m) + let e = SynExpr.LongIdent(false, LongIdentWithDots(longId, List.truncate (dotms.Length - 1) dotms), None, m) SynExpr.DiscardAfterMissingQualificationAfterDot(e, unionRanges e.Range (List.last dotms)) else SynExpr.LongIdent(false, lidwd, None, m) List.fold (fun f x -> mkSynApp1 f (convSynPatToSynExpr x) m) e args @@ -5293,8 +5300,8 @@ and TcPat warnOnUpper cenv env topValInfo vFlags (tpenv, names, takenNames) ty p | (Item.UnionCase _ | Item.ExnCase _) as item -> // DATA MATCH CONSTRUCTORS - let mkf, argtys, argNames = ApplyUnionCaseOrExnTypesForPat m cenv env ty item - let nargtys = argtys.Length + let mkf, argTys, argNames = ApplyUnionCaseOrExnTypesForPat m cenv env ty item + let numArgTys = argTys.Length let args = match args with @@ -5305,16 +5312,18 @@ and TcPat warnOnUpper cenv env topValInfo vFlags (tpenv, names, takenNames) ty p // | Case(value = v) // will become // | Case(_, v) - let result = Array.zeroCreate nargtys + let result = Array.zeroCreate numArgTys for (id, pat) in pairs do match argNames |> List.tryFindIndex (fun id2 -> id.idText = id2.idText) with | None -> - let caseName = - match item with - | Item.UnionCase(uci, _) -> uci.Name - | Item.ExnCase tcref -> tcref.DisplayName - | _ -> failwith "impossible" - error(Error(FSComp.SR.tcUnionCaseConstructorDoesNotHaveFieldWithGivenName(caseName, id.idText), id.idRange)) + match item with + | Item.UnionCase(uci, _) -> + error(Error(FSComp.SR.tcUnionCaseConstructorDoesNotHaveFieldWithGivenName(uci.Name, id.idText), id.idRange)) + | Item.ExnCase tcref -> + error(Error(FSComp.SR.tcExceptionConstructorDoesNotHaveFieldWithGivenName(tcref.DisplayName, id.idText), id.idRange)) + | _ -> + error(Error(FSComp.SR.tcConstructorDoesNotHaveFieldWithGivenName(id.idText), id.idRange)) + | Some idx -> match box result.[idx] with | null -> @@ -5323,11 +5332,11 @@ and TcPat warnOnUpper cenv env topValInfo vFlags (tpenv, names, takenNames) ty p | Item.UnionCase(uci, _) -> Some(ArgumentContainer.UnionCase(uci)) | Item.ExnCase tref -> Some(ArgumentContainer.Type(tref)) | _ -> None - let argItem = Item.ArgName (argNames.[idx], argtys.[idx], argContainerOpt) + let argItem = Item.ArgName (argNames.[idx], argTys.[idx], argContainerOpt) CallNameResolutionSink cenv.tcSink (id.idRange, env.NameEnv, argItem, argItem, emptyTyparInst, ItemOccurence.Pattern, env.DisplayEnv, ad) | _ -> error(Error(FSComp.SR.tcUnionCaseFieldCannotBeUsedMoreThanOnce(id.idText), id.idRange)) - for i = 0 to nargtys - 1 do + for i = 0 to numArgTys - 1 do if isNull (box result.[i]) then result.[i] <- SynPat.Wild(m.MakeSynthetic()) @@ -5339,17 +5348,17 @@ and TcPat warnOnUpper cenv env topValInfo vFlags (tpenv, names, takenNames) ty p match args with | []-> [] // note: the next will always be parenthesized - | [SynPatErrorSkip(SynPat.Tuple (args, _)) | SynPatErrorSkip(SynPat.Paren(SynPatErrorSkip(SynPat.Tuple (args, _)), _))] when nargtys > 1 -> args + | [SynPatErrorSkip(SynPat.Tuple (args, _)) | SynPatErrorSkip(SynPat.Paren(SynPatErrorSkip(SynPat.Tuple (args, _)), _))] when numArgTys > 1 -> args // note: we allow both 'C _' and 'C (_)' regardless of number of argument of the pattern - | [SynPatErrorSkip(SynPat.Wild _ as e) | SynPatErrorSkip(SynPat.Paren(SynPatErrorSkip(SynPat.Wild _ as e), _))] -> Array.toList (Array.create nargtys e) + | [SynPatErrorSkip(SynPat.Wild _ as e) | SynPatErrorSkip(SynPat.Paren(SynPatErrorSkip(SynPat.Wild _ as e), _))] -> Array.toList (Array.create numArgTys e) | [arg] -> [arg] - | _ when nargtys = 0 -> error(Error(FSComp.SR.tcUnionCaseDoesNotTakeArguments(), m)) - | _ when nargtys = 1 -> error(Error(FSComp.SR.tcUnionCaseRequiresOneArgument(), m)) - | _ -> error(Error(FSComp.SR.tcUnionCaseExpectsTupledArguments(nargtys), m)) - UnionCaseOrExnCheck env nargtys args.Length m + | _ when numArgTys = 0 -> error(Error(FSComp.SR.tcUnionCaseDoesNotTakeArguments(), m)) + | _ when numArgTys = 1 -> error(Error(FSComp.SR.tcUnionCaseRequiresOneArgument(), m)) + | _ -> error(Error(FSComp.SR.tcUnionCaseExpectsTupledArguments(numArgTys), m)) + UnionCaseOrExnCheck env numArgTys args.Length m - let args', acc = TcPatterns warnOnUpper cenv env vFlags (tpenv, names, takenNames) argtys args + let args', acc = TcPatterns warnOnUpper cenv env vFlags (tpenv, names, takenNames) argTys args (fun values -> // Report information about the case occurrence to IDE CallNameResolutionSink cenv.tcSink (rangeOfLid longId, env.NameEnv, item, item, emptyTyparInst, ItemOccurence.Pattern, env.DisplayEnv, env.eAccessRights) @@ -5404,16 +5413,16 @@ and TcPat warnOnUpper cenv env topValInfo vFlags (tpenv, names, takenNames) ty p | SynPat.QuoteExpr(_, m) -> error (Error(FSComp.SR.tcInvalidPattern(), m)) | SynPat.Tuple (args, m) -> - let argtys = NewInferenceTypes args - UnifyTypes cenv env m ty (TType_tuple (tupInfoRef, argtys)) - let args', acc = TcPatterns warnOnUpper cenv env vFlags (tpenv, names, takenNames) argtys args - (fun values -> TPat_tuple(tupInfoRef, List.map (fun f -> f values) args', argtys, m)), acc + let argTys = NewInferenceTypes args + UnifyTypes cenv env m ty (TType_tuple (tupInfoRef, argTys)) + let args', acc = TcPatterns warnOnUpper cenv env vFlags (tpenv, names, takenNames) argTys args + (fun values -> TPat_tuple(tupInfoRef, List.map (fun f -> f values) args', argTys, m)), acc | SynPat.StructTuple (args, m) -> - let argtys = NewInferenceTypes args - UnifyTypes cenv env m ty (TType_tuple (tupInfoStruct, argtys)) - let args', acc = TcPatterns warnOnUpper cenv env vFlags (tpenv, names, takenNames) argtys args - (fun values -> TPat_tuple(tupInfoStruct, List.map (fun f -> f values) args', argtys, m)), acc + let argTys = NewInferenceTypes args + UnifyTypes cenv env m ty (TType_tuple (tupInfoStruct, argTys)) + let args', acc = TcPatterns warnOnUpper cenv env vFlags (tpenv, names, takenNames) argTys args + (fun values -> TPat_tuple(tupInfoStruct, List.map (fun f -> f values) args', argTys, m)), acc | SynPat.Paren (p, _) -> TcPat warnOnUpper cenv env None vFlags (tpenv, names, takenNames) ty p @@ -5436,9 +5445,9 @@ and TcPat warnOnUpper cenv env topValInfo vFlags (tpenv, names, takenNames) ty p let ftys = fields |> List.map (fun fsp -> actualTyOfRecdField inst fsp, fsp) let fldsmap', acc = ((tpenv, names, takenNames), ftys) ||> List.mapFold (fun s (ty, fsp) -> - match Map.tryFind fsp.rfield_id.idText fldsmap with - | Some v -> TcPat warnOnUpper cenv env None vFlags s ty v - | None -> (fun _ -> TPat_wild m), s) + match fldsmap.TryGetValue fsp.rfield_id.idText with + | true, v -> TcPat warnOnUpper cenv env None vFlags s ty v + | _ -> (fun _ -> TPat_wild m), s) (fun values -> TPat_recd (tcref, tinst, List.map (fun f -> f values) fldsmap', m)), acc @@ -5457,15 +5466,15 @@ and TcPat warnOnUpper cenv env topValInfo vFlags (tpenv, names, takenNames) ty p | SynPat.FromParseError (pat, _) -> suppressErrorReporting (fun () -> TcPatAndRecover warnOnUpper cenv env topValInfo vFlags (tpenv, names, takenNames) (NewErrorType()) pat) -and TcPatterns warnOnUpper cenv env vFlags s argtys args = - assert (List.length args = List.length argtys) - List.mapFold (fun s (ty, pat) -> TcPat warnOnUpper cenv env None vFlags s ty pat) s (List.zip argtys args) +and TcPatterns warnOnUpper cenv env vFlags s argTys args = + assert (List.length args = List.length argTys) + List.mapFold (fun s (ty, pat) -> TcPat warnOnUpper cenv env None vFlags s ty pat) s (List.zip argTys args) and solveTypAsError cenv denv m ty = let ty2 = NewErrorType () assert((destTyparTy cenv.g ty2).IsFromError) - SolveTypEqualsTypKeepAbbrevs (MakeConstraintSolverEnv ContextInfo.NoContext cenv.css m denv) 0 m NoTrace ty ty2 |> ignore + SolveTypeEqualsTypeKeepAbbrevs (MakeConstraintSolverEnv ContextInfo.NoContext cenv.css m denv) 0 m NoTrace ty ty2 |> ignore and RecordNameAndTypeResolutions_IdeallyWithoutHavingOtherEffects cenv env tpenv expr = // This function is motivated by cases like @@ -5510,9 +5519,11 @@ and TcExprOfUnknownType cenv env tpenv expr = let expr', tpenv = TcExpr cenv exprty env tpenv expr expr', exprty, tpenv -and TcExprFlex cenv flex ty (env: TcEnv) tpenv (e: SynExpr) = +and TcExprFlex cenv flex compat ty (env: TcEnv) tpenv (e: SynExpr) = if flex then let argty = NewInferenceType () + if compat then + (destTyparTy cenv.g argty).SetIsCompatFlex(true) AddCxTypeMustSubsumeType ContextInfo.NoContext env.DisplayEnv cenv.css e.Range NoTrace ty argty let e', tpenv = TcExpr cenv argty env tpenv e let e' = mkCoerceIfNeeded cenv.g ty argty e' @@ -5587,7 +5598,7 @@ and TcStmtThatCantBeCtorBody cenv env tpenv expr = and TcStmt cenv env tpenv synExpr = let expr, ty, tpenv = TcExprOfUnknownType cenv env tpenv synExpr let m = synExpr.Range - let wasUnit = UnifyUnitType cenv env.DisplayEnv m ty (Some expr) + let wasUnit = UnifyUnitType cenv env m ty expr if wasUnit then expr, tpenv else @@ -5642,12 +5653,12 @@ and TcExprThen cenv overallTy env tpenv synExpr delayed = and TcExprs cenv env m tpenv flexes argtys args = if List.length args <> List.length argtys then error(Error(FSComp.SR.tcExpressionCountMisMatch((List.length argtys), (List.length args)), m)) (tpenv, List.zip3 flexes argtys args) ||> List.mapFold (fun tpenv (flex, ty, e) -> - TcExprFlex cenv flex ty env tpenv e) + TcExprFlex cenv flex false ty env tpenv e) and CheckSuperInit cenv objTy m = // Check the type is not abstract match tryDestAppTy cenv.g objTy with - | Some tcref when isAbstractTycon tcref.Deref -> + | ValueSome tcref when isAbstractTycon tcref.Deref -> errorR(Error(FSComp.SR.tcAbstractTypeCannotBeInstantiated(), m)) | _ -> () @@ -5655,13 +5666,13 @@ and CheckSuperInit cenv objTy m = // TcExprUndelayed //------------------------------------------------------------------------- -and TcExprUndelayedNoType cenv env tpenv expr : Expr * TType * _ = - let exprty = NewInferenceType () - let expr', tpenv = TcExprUndelayed cenv exprty env tpenv expr - expr', exprty, tpenv +and TcExprUndelayedNoType cenv env tpenv synExpr : Expr * TType * _ = + let overallTy = NewInferenceType () + let expr, tpenv = TcExprUndelayed cenv overallTy env tpenv synExpr + expr, overallTy, tpenv -and TcExprUndelayed cenv overallTy env tpenv (expr: SynExpr) = - match expr with +and TcExprUndelayed cenv overallTy env tpenv (synExpr: SynExpr) = + match synExpr with | SynExpr.Paren (expr2, _, _, mWholeExprIncludingParentheses) -> // We invoke CallExprHasTypeSink for every construct which is atomic in the syntax, i.e. where a '.' immediately following the // construct is a dot-lookup for the result of the construct. @@ -5670,24 +5681,26 @@ and TcExprUndelayed cenv overallTy env tpenv (expr: SynExpr) = TcExpr cenv overallTy env tpenv expr2 | SynExpr.DotIndexedGet _ | SynExpr.DotIndexedSet _ - | SynExpr.TypeApp _ | SynExpr.Ident _ | SynExpr.LongIdent _ | SynExpr.App _ | SynExpr.DotGet _ -> error(Error(FSComp.SR.tcExprUndelayed(), expr.Range)) + | SynExpr.TypeApp _ | SynExpr.Ident _ | SynExpr.LongIdent _ | SynExpr.App _ | SynExpr.DotGet _ -> error(Error(FSComp.SR.tcExprUndelayed(), synExpr.Range)) | SynExpr.Const (SynConst.String (s, m), _) -> CallExprHasTypeSink cenv.tcSink (m, env.NameEnv, overallTy, env.DisplayEnv, env.eAccessRights) TcConstStringExpr cenv overallTy env m tpenv s - | SynExpr.Const (c, m) -> + | SynExpr.Const (synConst, m) -> CallExprHasTypeSink cenv.tcSink (m, env.NameEnv, overallTy, env.DisplayEnv, env.eAccessRights) - TcConstExpr cenv overallTy env m tpenv c + TcConstExpr cenv overallTy env m tpenv synConst - | SynExpr.Lambda _ -> TcIteratedLambdas cenv true env overallTy Set.empty tpenv expr + | SynExpr.Lambda _ -> + TcIteratedLambdas cenv true env overallTy Set.empty tpenv synExpr - | SynExpr.Match (spMatch, x, matches, isExnMatch, _m) -> + | SynExpr.Match (spMatch, synInputExpr, synClauses, _m) -> - let x', inputTy, tpenv = TcExprOfUnknownType cenv env tpenv x - let mExpr = x'.Range - let v, e, tpenv = TcAndPatternCompileMatchClauses mExpr mExpr (if isExnMatch then Throw else ThrowIncompleteMatchException) cenv inputTy overallTy env tpenv matches - (mkLet spMatch mExpr v x' e, tpenv) + let inputExpr, inputTy, tpenv = TcExprOfUnknownType cenv env tpenv synInputExpr + let mInputExpr = inputExpr.Range + let matchVal, matchExpr, tpenv = TcAndPatternCompileMatchClauses mInputExpr mInputExpr ThrowIncompleteMatchException cenv (Some inputExpr) inputTy overallTy env tpenv synClauses + let overallExpr = mkLet spMatch mInputExpr matchVal inputExpr matchExpr + overallExpr, tpenv // (function[spMatch] pat1 -> expr1 ... | patN -> exprN) // @@ -5699,12 +5712,12 @@ and TcExprUndelayed cenv overallTy env tpenv (expr: SynExpr) = // is // Lambda (_arg2, Let (x, _arg2, x)) - | SynExpr.MatchLambda (isExnMatch, argm, clauses, spMatch, m) -> // (spMatch, x, matches, isExnMatch, m) -> + | SynExpr.MatchLambda (isExnMatch, mArg, clauses, spMatch, m) -> let domainTy, resultTy = UnifyFunctionType None cenv env.DisplayEnv m overallTy - let idv1, idve1 = mkCompGenLocal argm (cenv.synArgNameGenerator.New()) domainTy + let idv1, idve1 = mkCompGenLocal mArg (cenv.synArgNameGenerator.New()) domainTy let envinner = ExitFamilyRegion env - let idv2, matchExpr, tpenv = TcAndPatternCompileMatchClauses m argm (if isExnMatch then Throw else ThrowIncompleteMatchException) cenv domainTy resultTy envinner tpenv clauses + let idv2, matchExpr, tpenv = TcAndPatternCompileMatchClauses m mArg (if isExnMatch then Throw else ThrowIncompleteMatchException) cenv None domainTy resultTy envinner tpenv clauses let overallExpr = mkMultiLambda m [idv1] ((mkLet spMatch m idv2 idve1 matchExpr), resultTy) overallExpr, tpenv @@ -5715,81 +5728,84 @@ and TcExprUndelayed cenv overallTy env tpenv (expr: SynExpr) = error(Error(FSComp.SR.tcFixedNotAllowed(), m)) // e : ty - | SynExpr.Typed (e, cty, m) -> - let tgty, tpenv = TcTypeAndRecover cenv NewTyparsOK CheckCxs ItemOccurence.UseInType env tpenv cty - UnifyTypes cenv env m overallTy tgty - let e', tpenv = TcExpr cenv overallTy env tpenv e - e', tpenv + | SynExpr.Typed (synBodyExpr, synType, m) -> + let tgtTy, tpenv = TcTypeAndRecover cenv NewTyparsOK CheckCxs ItemOccurence.UseInType env tpenv synType + UnifyTypes cenv env m overallTy tgtTy + let expr, tpenv = TcExpr cenv overallTy env tpenv synBodyExpr + expr, tpenv // e :? ty - | SynExpr.TypeTest (e, tgty, m) -> - let e', srcTy, tpenv = TcExprOfUnknownType cenv env tpenv e + | SynExpr.TypeTest (synInnerExpr, tgtTy, m) -> + let innerExpr, srcTy, tpenv = TcExprOfUnknownType cenv env tpenv synInnerExpr UnifyTypes cenv env m overallTy cenv.g.bool_ty - let tgty, tpenv = TcType cenv NewTyparsOK CheckCxs ItemOccurence.UseInType env tpenv tgty - TcRuntimeTypeTest (*isCast*)false (*isOperator*)true cenv env.DisplayEnv m tgty srcTy - let e' = mkCallTypeTest cenv.g m tgty e' - e', tpenv + let tgtTy, tpenv = TcType cenv NewTyparsOK CheckCxs ItemOccurence.UseInType env tpenv tgtTy + TcRuntimeTypeTest (*isCast*)false (*isOperator*)true cenv env.DisplayEnv m tgtTy srcTy + let expr = mkCallTypeTest cenv.g m tgtTy innerExpr + expr, tpenv // SynExpr.AddressOf is noted in the syntax ast in order to recognize it as concrete type information // during type checking, in particular prior to resolving overloads. This helps distinguish // its use at method calls from the use of the conflicting 'ref' mechanism for passing byref parameters - | SynExpr.AddressOf(byref, e, opm, m) -> - TcExpr cenv overallTy env tpenv (mkSynPrefix opm m (if byref then "~&" else "~&&") e) + | SynExpr.AddressOf(byref, synInnerExpr, opm, m) -> + TcExpr cenv overallTy env tpenv (mkSynPrefixPrim opm m (if byref then "~&" else "~&&") synInnerExpr) - | SynExpr.Upcast (e, _, m) | SynExpr.InferredUpcast (e, m) -> - let e', srcTy, tpenv = TcExprOfUnknownType cenv env tpenv e - let tgty, tpenv = - match expr with - | SynExpr.Upcast (_, tgty, m) -> - let tgty, tpenv = TcType cenv NewTyparsOK CheckCxs ItemOccurence.UseInType env tpenv tgty - UnifyTypes cenv env m tgty overallTy - tgty, tpenv + | SynExpr.Upcast (synInnerExpr, _, m) | SynExpr.InferredUpcast (synInnerExpr, m) -> + let innerExpr, srcTy, tpenv = TcExprOfUnknownType cenv env tpenv synInnerExpr + let tgtTy, tpenv = + match synExpr with + | SynExpr.Upcast (_, tgtTy, m) -> + let tgtTy, tpenv = TcType cenv NewTyparsOK CheckCxs ItemOccurence.UseInType env tpenv tgtTy + UnifyTypes cenv env m tgtTy overallTy + tgtTy, tpenv | SynExpr.InferredUpcast _ -> overallTy, tpenv | _ -> failwith "upcast" - TcStaticUpcast cenv env.DisplayEnv m tgty srcTy - mkCoerceExpr(e', tgty, m, srcTy), tpenv - - | SynExpr.Downcast(e, _, m) | SynExpr.InferredDowncast (e, m) -> - let e', srcTy, tpenv = TcExprOfUnknownType cenv env tpenv e - let tgty, tpenv, isOperator = - match expr with - | SynExpr.Downcast (_, tgty, m) -> - let tgty, tpenv = TcType cenv NewTyparsOK CheckCxs ItemOccurence.UseInType env tpenv tgty - UnifyTypes cenv env m tgty overallTy - tgty, tpenv, true + TcStaticUpcast cenv env.DisplayEnv m tgtTy srcTy + let expr = mkCoerceExpr(innerExpr, tgtTy, m, srcTy) + expr, tpenv + + | SynExpr.Downcast(synInnerExpr, _, m) | SynExpr.InferredDowncast (synInnerExpr, m) -> + let innerExpr, srcTy, tpenv = TcExprOfUnknownType cenv env tpenv synInnerExpr + let tgtTy, tpenv, isOperator = + match synExpr with + | SynExpr.Downcast (_, tgtTy, m) -> + let tgtTy, tpenv = TcType cenv NewTyparsOK CheckCxs ItemOccurence.UseInType env tpenv tgtTy + UnifyTypes cenv env m tgtTy overallTy + tgtTy, tpenv, true | SynExpr.InferredDowncast _ -> overallTy, tpenv, false | _ -> failwith "downcast" - TcRuntimeTypeTest (*isCast*)true isOperator cenv env.DisplayEnv m tgty srcTy + TcRuntimeTypeTest (*isCast*)true isOperator cenv env.DisplayEnv m tgtTy srcTy - // TcRuntimeTypeTest ensures tgty is a nominal type. Hence we can insert a check here + // TcRuntimeTypeTest ensures tgtTy is a nominal type. Hence we can insert a check here // based on the nullness semantics of the nominal type. - let e' = mkCallUnbox cenv.g m tgty e' - e', tpenv + let expr = mkCallUnbox cenv.g m tgtTy innerExpr + expr, tpenv | SynExpr.Null m -> AddCxTypeMustSupportNull env.DisplayEnv cenv.css m NoTrace overallTy mkNull m overallTy, tpenv - | SynExpr.Lazy (e, m) -> - let ety = NewInferenceType () - UnifyTypes cenv env m overallTy (mkLazyTy cenv.g ety) - let e', tpenv = TcExpr cenv ety env tpenv e - mkLazyDelayed cenv.g m ety (mkUnitDelayLambda cenv.g m e'), tpenv + | SynExpr.Lazy (synInnerExpr, m) -> + let innerTy = NewInferenceType () + UnifyTypes cenv env m overallTy (mkLazyTy cenv.g innerTy) + let innerExpr, tpenv = TcExpr cenv innerTy env tpenv synInnerExpr + let expr = mkLazyDelayed cenv.g m innerTy (mkUnitDelayLambda cenv.g m innerExpr) + expr, tpenv | SynExpr.Tuple (args, _, m) -> - let argtys = UnifyRefTupleType env.eContextInfo cenv env.DisplayEnv m overallTy args + let argTys = UnifyRefTupleType env.eContextInfo cenv env.DisplayEnv m overallTy args // No subsumption at tuple construction - let flexes = argtys |> List.map (fun _ -> false) - let args', tpenv = TcExprs cenv env m tpenv flexes argtys args - mkRefTupled cenv.g m args' argtys, tpenv + let flexes = argTys |> List.map (fun _ -> false) + let args', tpenv = TcExprs cenv env m tpenv flexes argTys args + let expr = mkRefTupled cenv.g m args' argTys + expr, tpenv | SynExpr.StructTuple (args, _, m) -> - let argtys = UnifyStructTupleType env.eContextInfo cenv env.DisplayEnv m overallTy args + let argTys = UnifyStructTupleType env.eContextInfo cenv env.DisplayEnv m overallTy args // No subsumption at tuple construction - let flexes = argtys |> List.map (fun _ -> false) - let args', tpenv = TcExprs cenv env m tpenv flexes argtys args - mkAnyTupled cenv.g m tupInfoStruct args' argtys, tpenv + let flexes = argTys |> List.map (fun _ -> false) + let args', tpenv = TcExprs cenv env m tpenv flexes argTys args + mkAnyTupled cenv.g m tupInfoStruct args' argTys, tpenv | SynExpr.ArrayOrList (isArray, args, m) -> CallExprHasTypeSink cenv.tcSink (m, env.NameEnv, overallTy, env.DisplayEnv, env.eAccessRights) @@ -5807,7 +5823,7 @@ and TcExprUndelayed cenv overallTy env tpenv (expr: SynExpr) = else { env with eContextInfo = ContextInfo.CollectionElement (isArray, m) } - let args', tpenv = List.mapFold (fun tpenv (x:SynExpr) -> TcExprFlex cenv flex argty (getInitEnv x.Range) tpenv x) tpenv args + let args', tpenv = List.mapFold (fun tpenv (x:SynExpr) -> TcExprFlex cenv flex false argty (getInitEnv x.Range) tpenv x) tpenv args let expr = if isArray then Expr.Op(TOp.Array, [argty], args', m) @@ -5827,16 +5843,16 @@ and TcExprUndelayed cenv overallTy env tpenv (expr: SynExpr) = CallExprHasTypeSink cenv.tcSink (mWholeExpr, env.NameEnv, overallTy, env.DisplayEnv, env.eAccessRights) TcRecdExpr cenv overallTy env tpenv (inherits, optOrigExpr, flds, mWholeExpr) - | SynExpr.While (spWhile, e1, e2, m) -> + | SynExpr.While (spWhile, synGuardExpr, synBodyExpr, m) -> UnifyTypes cenv env m overallTy cenv.g.unit_ty - let e1', tpenv = TcExpr cenv (cenv.g.bool_ty) env tpenv e1 - let e2', tpenv = TcStmt cenv env tpenv e2 - mkWhile cenv.g (spWhile, NoSpecialWhileLoopMarker, e1', e2', m), tpenv + let guardExpr, tpenv = TcExpr cenv cenv.g.bool_ty env tpenv synGuardExpr + let bodyExpr, tpenv = TcStmt cenv env tpenv synBodyExpr + mkWhile cenv.g (spWhile, NoSpecialWhileLoopMarker, guardExpr, bodyExpr, m), tpenv | SynExpr.For (spBind, id, start, dir, finish, body, m) -> UnifyTypes cenv env m overallTy cenv.g.unit_ty - let startExpr , tpenv = TcExpr cenv (cenv.g.int_ty) env tpenv start - let finishExpr, tpenv = TcExpr cenv (cenv.g.int_ty) env tpenv finish + let startExpr , tpenv = TcExpr cenv cenv.g.int_ty env tpenv start + let finishExpr, tpenv = TcExpr cenv cenv.g.int_ty env tpenv finish let idv, _ = mkLocal id.idRange id.idText cenv.g.int_ty let envinner = AddLocalVal cenv.tcSink m idv env @@ -5894,37 +5910,55 @@ and TcExprUndelayed cenv overallTy env tpenv (expr: SynExpr) = TcExprUndelayed cenv overallTy env tpenv replacementExpr | _ -> + let genCollElemTy = NewInferenceType () + let genCollTy = (if isArray then mkArrayType else mkListTy) cenv.g genCollElemTy + UnifyTypes cenv env m overallTy genCollTy - let exprty = NewInferenceType () - let genEnumTy = mkSeqTy cenv.g genCollElemTy - AddCxTypeMustSubsumeType ContextInfo.NoContext env.DisplayEnv cenv.css m NoTrace genEnumTy exprty + + let exprty = mkSeqTy cenv.g genCollElemTy + + // Check the comprehension let expr, tpenv = TcExpr cenv exprty env tpenv comp - let expr = mkCoerceIfNeeded cenv.g genEnumTy (tyOfExpr cenv.g expr) expr - (if isArray then mkCallSeqToArray else mkCallSeqToList) cenv.g m genCollElemTy - // We add a call to 'seq ... ' to make sure sequence expression compilation gets applied to the contents of the - // comprehension. But don't do this in FSharp.Core.dll since 'seq' may not yet be defined. - ((if cenv.g.compilingFslib then id else mkCallSeq cenv.g m genCollElemTy) - (mkCoerceExpr(expr, genEnumTy, expr.Range, exprty))), tpenv + + let expr = mkCoerceIfNeeded cenv.g exprty (tyOfExpr cenv.g expr) expr + + let expr = + if cenv.g.compilingFslib then + expr + else + // We add a call to 'seq ... ' to make sure sequence expression compilation gets applied to the contents of the + // comprehension. But don't do this in FSharp.Core.dll since 'seq' may not yet be defined. + mkCallSeq cenv.g m genCollElemTy expr + + let expr = mkCoerceExpr(expr, exprty, expr.Range, overallTy) + + let expr = + if isArray then + mkCallSeqToArray cenv.g m genCollElemTy expr + else + mkCallSeqToList cenv.g m genCollElemTy expr + + expr, tpenv | SynExpr.LetOrUse _ -> - TcLinearExprs (TcExprThatCanBeCtorBody cenv) cenv env overallTy tpenv false expr (fun x -> x) + TcLinearExprs (TcExprThatCanBeCtorBody cenv) cenv env overallTy tpenv false synExpr (fun x -> x) - | SynExpr.TryWith (e1, _mTryToWith, clauses, mWithToLast, mTryToLast, spTry, spWith) -> - let e1', tpenv = TcExpr cenv overallTy env tpenv e1 + | SynExpr.TryWith (synBodyExpr, _mTryToWith, synWithClauses, mWithToLast, mTryToLast, spTry, spWith) -> + let bodyExpr, tpenv = TcExpr cenv overallTy env tpenv synBodyExpr // Compile the pattern twice, once as a List.filter with all succeeding targets returning "1", and once as a proper catch block. - let filterClauses = clauses |> List.map (function (Clause(pat, optWhenExpr, _, m, _)) -> Clause(pat, optWhenExpr, (SynExpr.Const(SynConst.Int32 1, m)), m, SuppressSequencePointAtTarget)) + let filterClauses = synWithClauses |> List.map (function (Clause(pat, optWhenExpr, _, m, _)) -> Clause(pat, optWhenExpr, (SynExpr.Const(SynConst.Int32 1, m)), m, SuppressSequencePointAtTarget)) let checkedFilterClauses, tpenv = TcMatchClauses cenv cenv.g.exn_ty cenv.g.int_ty env tpenv filterClauses - let checkedHandlerClauses, tpenv = TcMatchClauses cenv cenv.g.exn_ty overallTy env tpenv clauses - let v1, filter_expr = CompilePatternForMatchClauses cenv env mWithToLast mWithToLast true FailFilter cenv.g.exn_ty cenv.g.int_ty checkedFilterClauses - let v2, handler_expr = CompilePatternForMatchClauses cenv env mWithToLast mWithToLast true Rethrow cenv.g.exn_ty overallTy checkedHandlerClauses - mkTryWith cenv.g (e1', v1, filter_expr, v2, handler_expr, mTryToLast, overallTy, spTry, spWith), tpenv + let checkedHandlerClauses, tpenv = TcMatchClauses cenv cenv.g.exn_ty overallTy env tpenv synWithClauses + let v1, filterExpr = CompilePatternForMatchClauses cenv env mWithToLast mWithToLast true FailFilter None cenv.g.exn_ty cenv.g.int_ty checkedFilterClauses + let v2, handlerExpr = CompilePatternForMatchClauses cenv env mWithToLast mWithToLast true Rethrow None cenv.g.exn_ty overallTy checkedHandlerClauses + mkTryWith cenv.g (bodyExpr, v1, filterExpr, v2, handlerExpr, mTryToLast, overallTy, spTry, spWith), tpenv - | SynExpr.TryFinally (e1, e2, mTryToLast, spTry, spFinally) -> - let e1', tpenv = TcExpr cenv overallTy env tpenv e1 - let e2', tpenv = TcStmt cenv env tpenv e2 - mkTryFinally cenv.g (e1', e2', mTryToLast, overallTy, spTry, spFinally), tpenv + | SynExpr.TryFinally (synBodyExpr, synFinallyExpr, mTryToLast, spTry, spFinally) -> + let bodyExpr, tpenv = TcExpr cenv overallTy env tpenv synBodyExpr + let finallyExpr, tpenv = TcStmt cenv env tpenv synFinallyExpr + mkTryFinally cenv.g (bodyExpr, finallyExpr, mTryToLast, overallTy, spTry, spFinally), tpenv | SynExpr.JoinIn(e1, mInToken, e2, mAll) -> errorR(Error(FSComp.SR.parsUnfinishedExpression("in"), mInToken)) @@ -5946,47 +5980,47 @@ and TcExprUndelayed cenv overallTy env tpenv (expr: SynExpr) = let _, tpenv = suppressErrorReporting (fun () -> TcExpr cenv overallTy env tpenv e1) mkDefault(m, overallTy), tpenv - | SynExpr.Sequential (sp, dir, e1, e2, m) -> + | SynExpr.Sequential (sp, dir, synExpr1, synExpr2, m) -> if dir then - TcLinearExprs (TcExprThatCanBeCtorBody cenv) cenv env overallTy tpenv false expr (fun x -> x) + TcLinearExprs (TcExprThatCanBeCtorBody cenv) cenv env overallTy tpenv false synExpr (fun x -> x) else // Constructors using "new (...) = then " - let e1', tpenv = TcExprThatCanBeCtorBody cenv overallTy env tpenv e1 + let expr1, tpenv = TcExprThatCanBeCtorBody cenv overallTy env tpenv synExpr1 if (GetCtorShapeCounter env) <> 1 then errorR(Error(FSComp.SR.tcExpressionFormRequiresObjectConstructor(), m)) - let e2', tpenv = TcStmtThatCantBeCtorBody cenv env tpenv e2 - Expr.Sequential(e1', e2', ThenDoSeq, sp, m), tpenv + let expr2, tpenv = TcStmtThatCantBeCtorBody cenv env tpenv synExpr2 + Expr.Sequential(expr1, expr2, ThenDoSeq, sp, m), tpenv - | SynExpr.Do (e1, m) -> - UnifyTypes cenv env m overallTy cenv.g.unit_ty - TcStmtThatCantBeCtorBody cenv env tpenv e1 + | SynExpr.Do (synInnerExpr, m) -> + UnifyTypes cenv env m overallTy cenv.g.unit_ty + TcStmtThatCantBeCtorBody cenv env tpenv synInnerExpr - | SynExpr.IfThenElse (e1, e2, e3opt, spIfToThen, isRecovery, mIfToThen, m) -> - let e1', tpenv = TcExprThatCantBeCtorBody cenv cenv.g.bool_ty env tpenv e1 - let e2', tpenv = + | SynExpr.IfThenElse (synBoolExpr, synThenExpr, synElseExprOpt, spIfToThen, isRecovery, mIfToThen, m) -> + let boolExpr, tpenv = TcExprThatCantBeCtorBody cenv cenv.g.bool_ty env tpenv synBoolExpr + let thenExpr, tpenv = let env = match env.eContextInfo with - | ContextInfo.ElseBranchResult _ -> { env with eContextInfo = ContextInfo.ElseBranchResult e2.Range } + | ContextInfo.ElseBranchResult _ -> { env with eContextInfo = ContextInfo.ElseBranchResult synThenExpr.Range } | _ -> - match e3opt with - | None -> { env with eContextInfo = ContextInfo.OmittedElseBranch e2.Range } - | _ -> { env with eContextInfo = ContextInfo.IfExpression e2.Range } + match synElseExprOpt with + | None -> { env with eContextInfo = ContextInfo.OmittedElseBranch synThenExpr.Range } + | _ -> { env with eContextInfo = ContextInfo.IfExpression synThenExpr.Range } - if not isRecovery && Option.isNone e3opt then + if not isRecovery && Option.isNone synElseExprOpt then UnifyTypes cenv env m cenv.g.unit_ty overallTy - TcExprThatCanBeCtorBody cenv overallTy env tpenv e2 + TcExprThatCanBeCtorBody cenv overallTy env tpenv synThenExpr - let e3', sp2, tpenv = - match e3opt with + let elseExpr, spElse, tpenv = + match synElseExprOpt with | None -> mkUnit cenv.g mIfToThen, SuppressSequencePointAtTarget, tpenv // the fake 'unit' value gets exactly the same range as spIfToThen - | Some e3 -> - let env = { env with eContextInfo = ContextInfo.ElseBranchResult e3.Range } - let e3', tpenv = TcExprThatCanBeCtorBody cenv overallTy env tpenv e3 - e3', SequencePointAtTarget, tpenv + | Some synElseExpr -> + let env = { env with eContextInfo = ContextInfo.ElseBranchResult synElseExpr.Range } + let elseExpr, tpenv = TcExprThatCanBeCtorBody cenv overallTy env tpenv synElseExpr + elseExpr, SequencePointAtTarget, tpenv - primMkCond spIfToThen SequencePointAtTarget sp2 m overallTy e1' e2' e3', tpenv + primMkCond spIfToThen SequencePointAtTarget spElse m overallTy boolExpr thenExpr elseExpr, tpenv // This is for internal use in the libraries only | SynExpr.LibraryOnlyStaticOptimization (constraints, e2, e3, m) -> @@ -6007,6 +6041,10 @@ and TcExprUndelayed cenv overallTy env tpenv (expr: SynExpr) = let mExprAndDotLookup = unionRanges e1.Range (rangeOfLid longId) TcExprThen cenv overallTy env tpenv e1 [DelayedDotLookup(longId, mExprAndDotLookup); MakeDelayedSet(e2, mStmt)] + /// e1 <- e2 + | SynExpr.Set (e1, e2, mStmt) -> + TcExprThen cenv overallTy env tpenv e1 [MakeDelayedSet(e2, mStmt)] + /// e1.longId(e2) <- e3, very rarely used named property setters | SynExpr.DotNamedIndexedPropertySet (e1, (LongIdentWithDots(longId, _) as lidwd), e2, e3, mStmt) -> if lidwd.ThereIsAnExtraDotAtTheEnd then @@ -6034,7 +6072,7 @@ and TcExprUndelayed cenv overallTy env tpenv (expr: SynExpr) = | SynExpr.TraitCall(tps, memSpfn, arg, m) -> let synTypes = tps |> List.map (fun tp -> SynType.Var(tp, m)) - let (TTrait(_, logicalCompiledName, _, argtys, returnTy, _) as traitInfo), tpenv = TcPseudoMemberSpec cenv NewTyparsOK env synTypes tpenv memSpfn m + let (TTrait(_, logicalCompiledName, _, argTys, returnTy, _) as traitInfo), tpenv = TcPseudoMemberSpec cenv NewTyparsOK env synTypes tpenv memSpfn m if BakedInTraitConstraintNames.Contains logicalCompiledName then warning(BakedInMemberConstraintName(logicalCompiledName, m)) @@ -6042,8 +6080,8 @@ and TcExprUndelayed cenv overallTy env tpenv (expr: SynExpr) = let args, namedCallerArgs = GetMethodArgs arg if not (isNil namedCallerArgs) then errorR(Error(FSComp.SR.tcNamedArgumentsCannotBeUsedInMemberTraits(), m)) // Subsumption at trait calls if arguments have nominal type prior to unification of any arguments or return type - let flexes = argtys |> List.map (isTyparTy cenv.g >> not) - let args', tpenv = TcExprs cenv env m tpenv flexes argtys args + let flexes = argTys |> List.map (isTyparTy cenv.g >> not) + let args', tpenv = TcExprs cenv env m tpenv flexes argTys args AddCxMethodConstraint env.DisplayEnv cenv.css m NoTrace traitInfo UnifyTypes cenv env m overallTy returnTy Expr.Op(TOp.TraitCall(traitInfo), [], args', m), tpenv @@ -6070,11 +6108,11 @@ and TcExprUndelayed cenv overallTy env tpenv (expr: SynExpr) = mkf n e2', tpenv | SynExpr.LibraryOnlyILAssembly (s, tyargs, args, rtys, m) -> - let argtys = NewInferenceTypes args + let argTys = NewInferenceTypes args let tyargs', tpenv = TcTypes cenv NewTyparsOK CheckCxs ItemOccurence.UseInType env tpenv tyargs // No subsumption at uses of IL assembly code - let flexes = argtys |> List.map (fun _ -> false) - let args', tpenv = TcExprs cenv env m tpenv flexes argtys args + let flexes = argTys |> List.map (fun _ -> false) + let args', tpenv = TcExprs cenv env m tpenv flexes argTys args let rtys', tpenv = TcTypes cenv NewTyparsOK CheckCxs ItemOccurence.UseInType env tpenv rtys let returnTy = match rtys' with @@ -6090,17 +6128,23 @@ and TcExprUndelayed cenv overallTy env tpenv (expr: SynExpr) = | SynExpr.YieldOrReturn ((isTrueYield, _), _, m) | SynExpr.YieldOrReturnFrom ((isTrueYield, _), _, m) when isTrueYield -> - error(Error(FSComp.SR.tcConstructRequiresListArrayOrSequence(), m)) + error(Error(FSComp.SR.tcConstructRequiresListArrayOrSequence(), m)) + | SynExpr.YieldOrReturn ((_, isTrueReturn), _, m) | SynExpr.YieldOrReturnFrom ((_, isTrueReturn), _, m) when isTrueReturn -> - error(Error(FSComp.SR.tcConstructRequiresComputationExpressions(), m)) + error(Error(FSComp.SR.tcConstructRequiresComputationExpressions(), m)) + | SynExpr.YieldOrReturn (_, _, m) | SynExpr.YieldOrReturnFrom (_, _, m) | SynExpr.ImplicitZero m -> - error(Error(FSComp.SR.tcConstructRequiresSequenceOrComputations(), m)) + error(Error(FSComp.SR.tcConstructRequiresSequenceOrComputations(), m)) + | SynExpr.DoBang (_, m) | SynExpr.LetOrUseBang (_, _, _, _, _, _, m) -> - error(Error(FSComp.SR.tcConstructRequiresComputationExpression(), m)) + error(Error(FSComp.SR.tcConstructRequiresComputationExpression(), m)) + + | SynExpr.MatchBang (_, _, _, m) -> + error(Error(FSComp.SR.tcConstructRequiresComputationExpression(), m)) /// Check lambdas as a group, to catch duplicate names in patterns and TcIteratedLambdas cenv isFirst (env: TcEnv) overallTy takenNames tpenv e = @@ -6119,6 +6163,7 @@ and TcIteratedLambdas cenv isFirst (env: TcEnv) overallTy takenNames tpenv e = | e -> // Dive into the expression to check for syntax errors and suppress them if they show. conditionallySuppressErrorReporting (not isFirst && synExprContainsError e) (fun () -> + //TcExprFlex cenv true true overallTy env tpenv e) TcExpr cenv overallTy env tpenv e) @@ -6136,14 +6181,14 @@ and TcIndexerThen cenv env overallTy mWholeExpr mDot tpenv wholeExpr e1 indexArg let propName = match indexArgs with | [SynIndexerArg.One _] -> - FoldPrimaryHierarchyOfType (fun typ acc -> + FoldPrimaryHierarchyOfType (fun ty acc -> match acc with | None -> - match tryDestAppTy cenv.g typ with - | Some tcref -> + match tryDestAppTy cenv.g ty with + | ValueSome tcref -> TryFindTyconRefStringAttribute cenv.g mWholeExpr cenv.g.attrib_DefaultMemberAttribute tcref - | None -> - match AllPropInfosOfTypeInScope cenv.infoReader env.NameEnv (Some "Item", ad) IgnoreOverrides mWholeExpr typ with + | _ -> + match AllPropInfosOfTypeInScope cenv.infoReader env.NameEnv (Some "Item", ad) IgnoreOverrides mWholeExpr ty with | [] -> None | _ -> Some "Item" | _ -> acc) @@ -6205,7 +6250,7 @@ and TcIndexerThen cenv env overallTy mWholeExpr mDot tpenv wholeExpr e1 indexArg let f, fty, tpenv = TcExprOfUnknownType cenv env tpenv operPath let domainTy, resultTy = UnifyFunctionType (Some mWholeExpr) cenv env.DisplayEnv mWholeExpr fty UnifyTypes cenv env mWholeExpr domainTy e1ty - let f' = buildApp cenv (MakeApplicableExprNoFlex cenv f) fty e1' mWholeExpr + let f', resultTy = buildApp cenv (MakeApplicableExprNoFlex cenv f) resultTy e1' mWholeExpr let delayed = List.foldBack (fun idx acc -> DelayedApp(ExprAtomicFlag.Atomic, idx, mWholeExpr) :: acc) indexArgs delayed // atomic, otherwise no ar.[1] <- xyz Some (PropagateThenTcDelayed cenv overallTy env tpenv mWholeExpr f' resultTy ExprAtomicFlag.Atomic delayed ) else None @@ -6254,7 +6299,7 @@ and TcNewExpr cenv env tpenv objTy mObjTyOpt superInit arg mWholeExprOrObjTy = mkCallCreateInstance cenv.g mWholeExprOrObjTy objTy , tpenv else - if not (isAppTy cenv.g objTy) then error(Error(FSComp.SR.tcNamedTypeRequired(if superInit then "inherit" else "new"), mWholeExprOrObjTy)) + if not (isAppTy cenv.g objTy) && not (isAnyTupleTy cenv.g objTy) then error(Error(FSComp.SR.tcNamedTypeRequired(if superInit then "inherit" else "new"), mWholeExprOrObjTy)) let item = ForceRaise (ResolveObjectConstructor cenv.nameResolver env.DisplayEnv mWholeExprOrObjTy ad objTy) TcCtorCall false cenv env tpenv objTy objTy mObjTyOpt item superInit [arg] mWholeExprOrObjTy [] None @@ -6271,7 +6316,7 @@ and TcCtorCall isNaked cenv env tpenv overallTy objTy mObjTyOpt item superInit a match item, args with | Item.CtorGroup(methodName, minfos), _ -> let meths = List.map (fun minfo -> minfo, None) minfos - if isNaked && TypeFeasiblySubsumesType 0 cenv.g cenv.amap mWholeCall cenv.g.system_IDisposable_typ NoCoerce objTy then + if isNaked && TypeFeasiblySubsumesType 0 cenv.g cenv.amap mWholeCall cenv.g.system_IDisposable_ty NoCoerce objTy then warning(Error(FSComp.SR.tcIDisposableTypeShouldUseNew(), mWholeCall)) // Check the type is not abstract @@ -6287,12 +6332,12 @@ and TcCtorCall isNaked cenv env tpenv overallTy objTy mObjTyOpt item superInit a TcMethodApplicationThen cenv env overallTy (Some objTy) tpenv None [] mWholeCall mItem methodName ad PossiblyMutates false meths afterResolution isSuperInit args ExprAtomicFlag.NonAtomic delayed - | Item.DelegateCtor typ, [arg] -> + | Item.DelegateCtor ty, [arg] -> // Re-record the name resolution since we now know it's a constructor call match mObjTyOpt with | Some mObjTy -> CallNameResolutionSink cenv.tcSink (mObjTy, env.NameEnv, item, item, emptyTyparInst, ItemOccurence.Use, env.DisplayEnv, env.eAccessRights) | None -> () - TcNewDelegateThen cenv objTy env tpenv mItem mWholeCall typ arg ExprAtomicFlag.NonAtomic delayed + TcNewDelegateThen cenv objTy env tpenv mItem mWholeCall ty arg ExprAtomicFlag.NonAtomic delayed | _ -> error(Error(FSComp.SR.tcSyntaxCanOnlyBeUsedToCreateObjectTypes(if superInit then "inherit" else "new"), mWholeCall)) @@ -6303,7 +6348,7 @@ and TcCtorCall isNaked cenv env tpenv overallTy objTy mObjTyOpt item superInit a //------------------------------------------------------------------------- // Check a record construction expression -and TcRecordConstruction cenv overallTy env tpenv optOrigExpr objTy fldsList m = +and TcRecordConstruction cenv overallTy env tpenv optOrigExprInfo objTy fldsList m = let tcref, tinst = destAppTy cenv.g objTy let tycon = tcref.Deref UnifyTypes cenv env m overallTy objTy @@ -6329,23 +6374,22 @@ and TcRecordConstruction cenv overallTy env tpenv optOrigExpr objTy fldsList m = let fldsList, tpenv = let env = { env with eContextInfo = ContextInfo.RecordFields } (tpenv, fldsList) ||> List.mapFold (fun tpenv (fname, fexpr, fty, flex) -> - let fieldExpr, tpenv = TcExprFlex cenv flex fty env tpenv fexpr + let fieldExpr, tpenv = TcExprFlex cenv flex false fty env tpenv fexpr (fname, fieldExpr), tpenv) // Add rebindings for unbound field when an "old value" is available // Effect order: mutable fields may get modified by other bindings... - let oldFldsList, wrap = - match optOrigExpr with - | None -> [], id - | Some (_, _, oldve) -> - let wrap, oldveaddr = mkExprAddrOfExpr cenv.g tycon.IsStructOrEnumTycon false NeverMutates oldve None m + let oldFldsList = + match optOrigExprInfo with + | None -> [] + | Some (_, _, oldvaddre) -> let fieldNameUnbound nom = List.forall (fun (name, _) -> name <> nom) fldsList let flds = fspecs |> List.choose (fun rfld -> if fieldNameUnbound rfld.Name && not rfld.IsZeroInit - then Some(rfld.Name, mkRecdFieldGetViaExprAddr (oldveaddr, tcref.MakeNestedRecdFieldRef rfld, tinst, m)) + then Some(rfld.Name, mkRecdFieldGetViaExprAddr (oldvaddre, tcref.MakeNestedRecdFieldRef rfld, tinst, m)) else None) - flds, wrap + flds let fldsList = fldsList @ oldFldsList @@ -6361,7 +6405,7 @@ and TcRecordConstruction cenv overallTy env tpenv optOrigExpr objTy fldsList m = let ns1 = NameSet.ofList (List.map fst fldsList) let ns2 = NameSet.ofList (List.map (fun x -> x.rfield_id.idText) fspecs) - if Option.isNone optOrigExpr && not (Zset.subset ns2 ns1) then + if optOrigExprInfo.IsNone && not (Zset.subset ns2 ns1) then error (MissingFields(Zset.elements (Zset.diff ns2 ns1), m)) if not (Zset.subset ns1 ns2) then @@ -6378,18 +6422,19 @@ and TcRecordConstruction cenv overallTy env tpenv optOrigExpr objTy fldsList m = let args = List.map snd fldsList - let expr = wrap (mkRecordExpr cenv.g (GetRecdInfo env, tcref, tinst, rfrefs, args, m)) + let expr = mkRecordExpr cenv.g (GetRecdInfo env, tcref, tinst, rfrefs, args, m) let expr = - match optOrigExpr with + match optOrigExprInfo with | None -> // '{ recd fields }'. // expr - | Some (old, oldv, _) -> + | Some (old, oldvaddr, _) -> // '{ recd with fields }'. // Assign the first object to a tmp and then construct - mkCompGenLet m oldv old expr + let wrap, oldaddr, _readonly, _writeonly = mkExprAddrOfExpr cenv.g tycon.IsStructOrEnumTycon false NeverMutates old None m + wrap (mkCompGenLet m oldvaddr oldaddr expr) expr, tpenv @@ -6608,14 +6653,14 @@ and ComputeObjectExprOverrides cenv (env: TcEnv) tpenv impls = overridesAndVirts, tpenv -and CheckSuperType cenv typ m = - if typeEquiv cenv.g typ cenv.g.system_Value_typ || - typeEquiv cenv.g typ cenv.g.system_Enum_typ || - typeEquiv cenv.g typ cenv.g.system_Array_typ || - typeEquiv cenv.g typ cenv.g.system_MulticastDelegate_typ || - typeEquiv cenv.g typ cenv.g.system_Delegate_typ then +and CheckSuperType cenv ty m = + if typeEquiv cenv.g ty cenv.g.system_Value_ty || + typeEquiv cenv.g ty cenv.g.system_Enum_ty || + typeEquiv cenv.g ty cenv.g.system_Array_ty || + typeEquiv cenv.g ty cenv.g.system_MulticastDelegate_ty || + typeEquiv cenv.g ty cenv.g.system_Delegate_ty then error(Error(FSComp.SR.tcPredefinedTypeCannotBeUsedAsSuperType(), m)) - if isErasedType cenv.g typ then + if isErasedType cenv.g ty then errorR(Error(FSComp.SR.tcCannotInheritFromErasedType(), m)) @@ -6624,8 +6669,8 @@ and TcObjectExpr cenv overallTy env tpenv (synObjTy, argopt, binds, extraImpls, let objTy, tpenv = TcType cenv NewTyparsOK CheckCxs ItemOccurence.UseInType env tpenv synObjTy match tryDestAppTy cenv.g objTy with - | None -> error(Error(FSComp.SR.tcNewMustBeUsedWithNamedType(), mNewExpr)) - | Some tcref -> + | ValueNone -> error(Error(FSComp.SR.tcNewMustBeUsedWithNamedType(), mNewExpr)) + | ValueSome tcref -> let isRecordTy = isRecdTy cenv.g objTy if not isRecordTy && not (isInterfaceTy cenv.g objTy) && isSealedTy cenv.g objTy then errorR(Error(FSComp.SR.tcCannotCreateExtensionOfSealedType(), mNewExpr)) @@ -6765,10 +6810,10 @@ and TcConstStringExpr cenv overallTy env m tpenv s = let ty' = mkPrintfFormatTy cenv.g aty bty cty dty ety if (not (isObjTy cenv.g overallTy) && AddCxTypeMustSubsumeTypeUndoIfFailed env.DisplayEnv cenv.css m overallTy ty') then // Parse the format string to work out the phantom types - let source = match cenv.tcSink.CurrentSink with None -> None | Some sink -> sink.CurrentSource + let formatStringCheckContext = match cenv.tcSink.CurrentSink with None -> None | Some sink -> sink.FormatStringCheckContext let normalizedString = (s.Replace("\r\n", "\n").Replace("\r", "\n")) - let (aty', ety'), specifierLocations = (try CheckFormatStrings.ParseFormatString m cenv.g source normalizedString bty cty dty with Failure s -> error (Error(FSComp.SR.tcUnableToParseFormatString(s), m))) + let (aty', ety'), specifierLocations = (try CheckFormatStrings.ParseFormatString m cenv.g formatStringCheckContext normalizedString bty cty dty with Failure s -> error (Error(FSComp.SR.tcUnableToParseFormatString(s), m))) match cenv.tcSink.CurrentSink with | None -> () @@ -6803,7 +6848,7 @@ and TcConstExpr cenv overallTy env m tpenv c = let expr = let modName = "NumericLiteral" + suffix let ad = env.eAccessRights - match ResolveLongIndentAsModuleOrNamespace ResultCollectionSettings.AtMostOneResult cenv.amap m OpenQualified env.eNameResEnv ad [ident (modName, m)] with + match ResolveLongIndentAsModuleOrNamespace cenv.tcSink ResultCollectionSettings.AtMostOneResult cenv.amap m true OpenQualified env.eNameResEnv ad (ident (modName, m)) [] false with | Result [] | Exception _ -> error(Error(FSComp.SR.tcNumericLiteralRequiresModule(modName), m)) | Result ((_, mref, _) :: _) -> @@ -6860,7 +6905,7 @@ and TcRecdExpr cenv overallTy env tpenv (inherits, optOrigExpr, flds, mWholeExpr let requiresCtor = (GetCtorShapeCounter env = 1) // Get special expression forms for constructors let haveCtor = Option.isSome inherits - let optOrigExpr, tpenv = + let optOrigExprInfo, tpenv = match optOrigExpr with | None -> None, tpenv | Some (origExpr, _) -> @@ -6868,10 +6913,10 @@ and TcRecdExpr cenv overallTy env tpenv (inherits, optOrigExpr, flds, mWholeExpr | Some (_, _, mInherits, _, _) -> error(Error(FSComp.SR.tcInvalidRecordConstruction(), mInherits)) | None -> let olde, tpenv = TcExpr cenv overallTy env tpenv origExpr - let oldv, oldve = mkCompGenLocal mWholeExpr "inputRecord" overallTy - Some (olde, oldv, oldve), tpenv + let oldvaddr, oldvaddre = mkCompGenLocal mWholeExpr "inputRecord" (if isStructTy cenv.g overallTy then mkByrefTy cenv.g overallTy else overallTy) + Some (olde, oldvaddr, oldvaddre), tpenv - let hasOrigExpr = Option.isSome optOrigExpr + let hasOrigExpr = optOrigExprInfo.IsSome let fldsList = let flds = @@ -6917,13 +6962,13 @@ and TcRecdExpr cenv overallTy env tpenv (inherits, optOrigExpr, flds, mWholeExpr let superTy, tpenv = match inherits, GetSuperTypeOfType cenv.g cenv.amap mWholeExpr overallTy with - | Some (superTyp, arg, m, _, _), Some realSuperTyp -> + | Some (superTy, arg, m, _, _), Some realSuperTy -> // Constructor expression, with an explicit 'inheritedTys clause. Check the inherits clause. - let e, tpenv = TcExpr cenv realSuperTyp env tpenv (SynExpr.New(true, superTyp, arg, m)) + let e, tpenv = TcExpr cenv realSuperTy env tpenv (SynExpr.New(true, superTy, arg, m)) Some e, tpenv - | None, Some realSuperTyp when requiresCtor -> + | None, Some realSuperTy when requiresCtor -> // Constructor expression, No 'inherited' clause, hence look for a default constructor - let e, tpenv = TcNewExpr cenv env tpenv realSuperTyp None true (SynExpr.Const (SynConst.Unit, mWholeExpr)) mWholeExpr + let e, tpenv = TcNewExpr cenv env tpenv realSuperTy None true (SynExpr.Const (SynConst.Unit, mWholeExpr)) mWholeExpr Some e, tpenv | None, _ -> None, tpenv @@ -6931,7 +6976,7 @@ and TcRecdExpr cenv overallTy env tpenv (inherits, optOrigExpr, flds, mWholeExpr errorR(InternalError("Unexpected failure in getting super type", mWholeExpr)) None, tpenv - let expr, tpenv = TcRecordConstruction cenv overallTy env tpenv optOrigExpr overallTy fldsList mWholeExpr + let expr, tpenv = TcRecordConstruction cenv overallTy env tpenv optOrigExprInfo overallTy fldsList mWholeExpr let expr = match superTy with @@ -7004,7 +7049,7 @@ and TcForEachExpr cenv overallTy env tpenv (pat, enumSynExpr, bodySynExpr, mWhol let bodyExpr = let valsDefinedByMatching = ListSet.remove valEq elemVar vspecs CompilePatternForMatch - cenv env enumSynExpr.Range pat.Range false IgnoreWithWarning (elemVar, []) + cenv env enumSynExpr.Range pat.Range false IgnoreWithWarning (elemVar, [], None) [TClause(pat, None, TTarget(valsDefinedByMatching, bodyExpr, SequencePointAtTarget), mForLoopStart)] enumElemTy overallTy @@ -7246,8 +7291,12 @@ and TcComputationExpression cenv env overallTy mWhole interpExpr builderTy tpenv /// for all custom operations. This adds them to the completion lists and prevents them being used as values inside /// the query. let env = - env |> ModifyNameResEnv (fun nenv -> (nenv, customOperationMethods) ||> Seq.fold (fun nenv (nm, _, _, _, _, _, _, _, methInfo) -> - AddFakeNameToNameEnv nm nenv (Item.CustomOperation (nm, (fun () -> customOpUsageText (ident (nm, mBuilderVal))), Some methInfo)))) + if List.isEmpty customOperationMethods then env else + { env with + eNameResEnv = + (env.eNameResEnv, customOperationMethods) + ||> Seq.fold (fun nenv (nm, _, _, _, _, _, _, _, methInfo) -> + AddFakeNameToNameEnv nm nenv (Item.CustomOperation (nm, (fun () -> customOpUsageText (ident (nm, mBuilderVal))), Some methInfo))) } // Environment is needed for completions CallEnvSink cenv.tcSink (comp.Range, env.NameEnv, ad) @@ -7496,13 +7545,13 @@ and TcComputationExpression cenv env overallTy mWhole interpExpr builderTy tpenv | StripApps(SingleIdent nm, [StripApps(SingleIdent nm2, args); arg2]) when PrettyNaming.IsInfixOperator nm.idText && expectedArgCountForCustomOperator nm2 > 0 && - args.Length > 0 -> + not (List.isEmpty args) -> let estimatedRangeOfIntendedLeftAndRightArguments = unionRanges (List.last args).Range arg2.Range errorR(Error(FSComp.SR.tcUnrecognizedQueryBinaryOperator(), estimatedRangeOfIntendedLeftAndRightArguments)) true | SynExpr.Tuple( (StripApps(SingleIdent nm2, args) :: _), _, m) when expectedArgCountForCustomOperator nm2 > 0 && - args.Length > 0 -> + not (List.isEmpty args) -> let estimatedRangeOfIntendedLeftAndRightArguments = unionRanges (List.last args).Range m.EndRange errorR(Error(FSComp.SR.tcUnrecognizedQueryBinaryOperator(), estimatedRangeOfIntendedLeftAndRightArguments)) true @@ -7887,7 +7936,7 @@ and TcComputationExpression cenv env overallTy mWhole interpExpr builderTy tpenv let m1 = match innerComp1 with | SynExpr.IfThenElse (_, _, _, _, _, mIfToThen, _m) -> mIfToThen - | SynExpr.Match (SequencePointAtBinding mMatch, _, _, _, _) -> mMatch + | SynExpr.Match (SequencePointAtBinding mMatch, _, _, _) -> mMatch | SynExpr.TryWith (_, _, _, _, _, SequencePointAtTry mTry, _) -> mTry | SynExpr.TryFinally (_, _, _, SequencePointAtTry mTry, _) -> mTry | SynExpr.For (SequencePointAtForLoop mBind, _, _, _, _, _, _) -> mBind @@ -8000,11 +8049,20 @@ and TcComputationExpression cenv env overallTy mWhole interpExpr builderTy tpenv | SynExpr.LetOrUseBang(_spBind, true, _isFromSource, pat, _rhsExpr, _innerComp, _) -> error(Error(FSComp.SR.tcInvalidUseBangBinding(), pat.Range)) - | SynExpr.Match (spMatch, expr, clauses, false, m) -> + | SynExpr.Match (spMatch, expr, clauses, m) -> let mMatch = match spMatch with SequencePointAtBinding mMatch -> mMatch | _ -> m if isQuery then error(Error(FSComp.SR.tcMatchMayNotBeUsedWithQuery(), mMatch)) let clauses = clauses |> List.map (fun (Clause(pat, cond, innerComp, patm, sp)) -> Clause(pat, cond, transNoQueryOps innerComp, patm, sp)) - Some(translatedCtxt (SynExpr.Match(spMatch, expr, clauses, false, m))) + Some(translatedCtxt (SynExpr.Match(spMatch, expr, clauses, m))) + + // 'match! expr with pats ...' --> build.Bind(e1, (function pats ...)) + | SynExpr.MatchBang (spMatch, expr, clauses, m) -> + let mMatch = match spMatch with SequencePointAtBinding mMatch -> mMatch | _ -> m + if isQuery then error(Error(FSComp.SR.tcMatchMayNotBeUsedWithQuery(), mMatch)) + if isNil (TryFindIntrinsicOrExtensionMethInfo cenv env mMatch ad "Bind" builderTy) then error(Error(FSComp.SR.tcRequireBuilderMethod("Bind"), mMatch)) + let clauses = clauses |> List.map (fun (Clause(pat, cond, innerComp, patm, sp)) -> Clause(pat, cond, transNoQueryOps innerComp, patm, sp)) + let consumeExpr = SynExpr.MatchLambda(false, mMatch, clauses, spMatch, mMatch) + Some(translatedCtxt (mkSynCall "Bind" mMatch [expr; consumeExpr])) | SynExpr.TryWith (innerComp, _mTryToWith, clauses, _mWithToLast, mTryToLast, spTry, _spWith) -> let mTry = match spTry with SequencePointAtTry(m) -> m | _ -> mTryToLast @@ -8114,211 +8172,237 @@ and TcComputationExpression cenv env overallTy mWhole interpExpr builderTy tpenv /// Also "ienumerable extraction" is performed on arguments to "for". and TcSequenceExpression cenv env tpenv comp overallTy m = - let mkDelayedExpr (coreExpr:Expr) = - let m = coreExpr.Range - let overallTy = tyOfExpr cenv.g coreExpr - mkSeqDelay cenv env m overallTy coreExpr + let genEnumElemTy = NewInferenceType () + UnifyTypes cenv env m overallTy (mkSeqTy cenv.g genEnumElemTy) - let rec tryTcSequenceExprBody env genOuterTy tpenv comp = - match comp with - | SynExpr.ForEach (_spBind, SeqExprOnly _seqExprOnly, _isFromSource, pat, pseudoEnumExpr, innerComp, m) -> - // This expression is not checked with the knowledge it is an IEnumerable, since we permit other enumerable types with GetEnumerator/MoveNext methods, as does C# - let pseudoEnumExpr, arb_ty, tpenv = TcExprOfUnknownType cenv env tpenv pseudoEnumExpr - let enumExpr, enumElemTy = ConvertArbitraryExprToEnumerable cenv arb_ty env pseudoEnumExpr - let pat', _, vspecs, envinner, tpenv = TcMatchPattern cenv enumElemTy env tpenv (pat, None) - let innerExpr, tpenv = tcSequenceExprBody envinner genOuterTy tpenv innerComp + // Allow subsumption at 'yield' if the element type is nominal prior to the analysis of the body of the sequence expression + let flex = not (isTyparTy cenv.g genEnumElemTy) + + let mkDelayedExpr (coreExpr:Expr) = + let m = coreExpr.Range + let overallTy = tyOfExpr cenv.g coreExpr + mkSeqDelay cenv env m overallTy coreExpr + + let rec tryTcSequenceExprBody env genOuterTy tpenv comp = + match comp with + | SynExpr.ForEach (_spBind, SeqExprOnly _seqExprOnly, _isFromSource, pat, pseudoEnumExpr, innerComp, m) -> + // This expression is not checked with the knowledge it is an IEnumerable, since we permit other enumerable types with GetEnumerator/MoveNext methods, as does C# + let pseudoEnumExpr, arb_ty, tpenv = TcExprOfUnknownType cenv env tpenv pseudoEnumExpr + let enumExpr, enumElemTy = ConvertArbitraryExprToEnumerable cenv arb_ty env pseudoEnumExpr + let pat', _, vspecs, envinner, tpenv = TcMatchPattern cenv enumElemTy env tpenv (pat, None) + let innerExpr, tpenv = tcSequenceExprBody envinner genOuterTy tpenv innerComp - match pat', vspecs, innerExpr with - // peephole optimization: "for x in e1 -> e2" == "e1 |> List.map (fun x -> e2)" *) - | (TPat_as (TPat_wild _, PBind (v, _), _), - vs, - Expr.App(Expr.Val(vf, _, _), _, [genEnumElemTy], [yexpr], _)) - when vs.Length = 1 && valRefEq cenv.g vf cenv.g.seq_singleton_vref -> + match pat', vspecs, innerExpr with + // peephole optimization: "for x in e1 -> e2" == "e1 |> List.map (fun x -> e2)" *) + | (TPat_as (TPat_wild _, PBind (v, _), _), + vs, + Expr.App(Expr.Val(vf, _, _), _, [genEnumElemTy], [yexpr], _)) + when vs.Length = 1 && valRefEq cenv.g vf cenv.g.seq_singleton_vref -> - let enumExprMark = enumExpr.Range - let lam = mkLambda enumExprMark v (yexpr, genEnumElemTy) + let enumExprMark = enumExpr.Range + let lam = mkLambda enumExprMark v (yexpr, genEnumElemTy) - // SEQUENCE POINTS: need to build a let here consuming spBind - let enumExpr = mkCoerceIfNeeded cenv.g (mkSeqTy cenv.g enumElemTy) (tyOfExpr cenv.g enumExpr) enumExpr - Some(mkCallSeqMap cenv.g m enumElemTy genEnumElemTy lam enumExpr, tpenv) + // SEQUENCE POINTS: need to build a let here consuming spBind + let enumExpr = mkCoerceIfNeeded cenv.g (mkSeqTy cenv.g enumElemTy) (tyOfExpr cenv.g enumExpr) enumExpr + Some(mkCallSeqMap cenv.g m enumElemTy genEnumElemTy lam enumExpr, tpenv) - | _ -> - let enumExprMark = enumExpr.Range + | _ -> + let enumExprMark = enumExpr.Range - // SEQUENCE POINTS: need to build a let here consuming spBind + // SEQUENCE POINTS: need to build a let here consuming spBind - let matchv, matchExpr = compileSeqExprMatchClauses cenv env enumExprMark (pat', vspecs) innerExpr enumElemTy genOuterTy - let lam = mkLambda enumExprMark matchv (matchExpr, tyOfExpr cenv.g matchExpr) - Some(mkSeqCollect cenv env m enumElemTy genOuterTy lam enumExpr , tpenv) + let matchv, matchExpr = compileSeqExprMatchClauses cenv env enumExprMark (pat', vspecs) innerExpr None enumElemTy genOuterTy + let lam = mkLambda enumExprMark matchv (matchExpr, tyOfExpr cenv.g matchExpr) + Some(mkSeqCollect cenv env m enumElemTy genOuterTy lam enumExpr , tpenv) - | SynExpr.For (spBind, id, start, dir, finish, innerComp, m) -> - Some(tcSequenceExprBody env genOuterTy tpenv (elimFastIntegerForLoop (spBind, id, start, dir, finish, innerComp, m))) + | SynExpr.For (spBind, id, start, dir, finish, innerComp, m) -> + Some(tcSequenceExprBody env genOuterTy tpenv (elimFastIntegerForLoop (spBind, id, start, dir, finish, innerComp, m))) - | SynExpr.While (_spWhile, guardExpr, innerComp, _m) -> - let guardExpr, tpenv = TcExpr cenv cenv.g.bool_ty env tpenv guardExpr - let innerExpr, tpenv = tcSequenceExprBody env genOuterTy tpenv innerComp + | SynExpr.While (_spWhile, guardExpr, innerComp, _m) -> + let guardExpr, tpenv = TcExpr cenv cenv.g.bool_ty env tpenv guardExpr + let innerExpr, tpenv = tcSequenceExprBody env genOuterTy tpenv innerComp - let guardExprMark = guardExpr.Range - let guardExpr = mkUnitDelayLambda cenv.g guardExprMark guardExpr - let innerExpr = mkDelayedExpr innerExpr - Some(mkSeqFromFunctions cenv env guardExprMark genOuterTy guardExpr innerExpr, tpenv) - - | SynExpr.TryFinally (innerComp, unwindExpr, _mTryToLast, _spTry, _spFinally) -> - let innerExpr, tpenv = tcSequenceExprBody env genOuterTy tpenv innerComp - let unwindExpr, tpenv = TcExpr cenv cenv.g.unit_ty env tpenv unwindExpr + let guardExprMark = guardExpr.Range + let guardExpr = mkUnitDelayLambda cenv.g guardExprMark guardExpr + let innerExpr = mkDelayedExpr innerExpr + Some(mkSeqFromFunctions cenv env guardExprMark genOuterTy guardExpr innerExpr, tpenv) + + | SynExpr.TryFinally (innerComp, unwindExpr, _mTryToLast, _spTry, _spFinally) -> + let innerExpr, tpenv = tcSequenceExprBody env genOuterTy tpenv innerComp + let unwindExpr, tpenv = TcExpr cenv cenv.g.unit_ty env tpenv unwindExpr - let unwindExprMark = unwindExpr.Range - let unwindExpr = mkUnitDelayLambda cenv.g unwindExprMark unwindExpr - let innerExpr = mkDelayedExpr innerExpr - let innerExprMark = innerExpr.Range + let unwindExprMark = unwindExpr.Range + let unwindExpr = mkUnitDelayLambda cenv.g unwindExprMark unwindExpr + let innerExpr = mkDelayedExpr innerExpr + let innerExprMark = innerExpr.Range - Some(mkSeqFinally cenv env innerExprMark genOuterTy innerExpr unwindExpr, tpenv) - | SynExpr.Paren (_, _, _, m) -> - error(Error(FSComp.SR.tcConstructIsAmbiguousInSequenceExpression(), m)) - - | SynExpr.ImplicitZero m -> - Some(mkSeqEmpty cenv env m genOuterTy, tpenv ) + Some(mkSeqFinally cenv env innerExprMark genOuterTy innerExpr unwindExpr, tpenv) + | SynExpr.Paren (_, _, _, m) -> + error(Error(FSComp.SR.tcConstructIsAmbiguousInSequenceExpression(), m)) - | SynExpr.DoBang(_rhsExpr, m) -> - error(Error(FSComp.SR.tcDoBangIllegalInSequenceExpression(), m)) + | SynExpr.ImplicitZero m -> + Some(mkSeqEmpty cenv env m genOuterTy, tpenv ) - | SynExpr.Sequential(sp, true, innerComp1, innerComp2, m) -> - // "expr; cexpr" is treated as sequential execution - // "cexpr; cexpr" is treated as append - match tryTcSequenceExprBody env genOuterTy tpenv innerComp1 with - | None -> - let innerExpr1, tpenv = TcStmtThatCantBeCtorBody cenv env tpenv innerComp1 - let innerExpr2, tpenv = tcSequenceExprBody env genOuterTy tpenv innerComp2 - - Some(Expr.Sequential(innerExpr1, innerExpr2, NormalSeq, sp, m), tpenv) - - | Some (innerExpr1, tpenv) -> - let innerExpr2, tpenv = tcSequenceExprBody env genOuterTy tpenv innerComp2 - let innerExpr2 = mkDelayedExpr innerExpr2 - Some(mkSeqAppend cenv env innerComp1.Range genOuterTy innerExpr1 innerExpr2, tpenv) - - | SynExpr.IfThenElse (guardExpr, thenComp, elseCompOpt, spIfToThen, _isRecovery, mIfToThen, mIfToEndOfElseBranch) -> - let guardExpr', tpenv = TcExpr cenv cenv.g.bool_ty env tpenv guardExpr - let thenExpr, tpenv = tcSequenceExprBody env genOuterTy tpenv thenComp - let elseComp = (match elseCompOpt with Some c -> c | None -> SynExpr.ImplicitZero mIfToThen) - let elseExpr, tpenv = tcSequenceExprBody env genOuterTy tpenv elseComp - Some(mkCond spIfToThen SequencePointAtTarget mIfToEndOfElseBranch genOuterTy guardExpr' thenExpr elseExpr, tpenv) - - // 'let x = expr in expr' - | SynExpr.LetOrUse (_, false (* not a 'use' binding *), _, _, _) -> - TcLinearExprs - (fun ty envinner tpenv e -> tcSequenceExprBody envinner ty tpenv e) - cenv env overallTy - tpenv - true - comp - (fun x -> x) |> Some - - // 'use x = expr in expr' - | SynExpr.LetOrUse (_isRec, true, [Binding (_vis, NormalBinding, _, _, _, _, _, pat, _, rhsExpr, _, _spBind)], innerComp, wholeExprMark) -> - - let bindPatTy = NewInferenceType () - let inputExprTy = NewInferenceType () - let pat', _, vspecs, envinner, tpenv = TcMatchPattern cenv bindPatTy env tpenv (pat, None) - UnifyTypes cenv env m inputExprTy bindPatTy - let inputExpr, tpenv = TcExpr cenv inputExprTy env tpenv rhsExpr - let innerExpr, tpenv = tcSequenceExprBody envinner genOuterTy tpenv innerComp - let inputExprMark = inputExpr.Range - let matchv, matchExpr = compileSeqExprMatchClauses cenv env inputExprMark (pat', vspecs) innerExpr bindPatTy genOuterTy - let consumeExpr = mkLambda wholeExprMark matchv (matchExpr, genOuterTy) - //SEQPOINT NEEDED - we must consume spBind on this path - Some(mkSeqUsing cenv env wholeExprMark bindPatTy genOuterTy inputExpr consumeExpr, tpenv) - - | SynExpr.LetOrUseBang(_, _, _, _, _, _, m) -> - error(Error(FSComp.SR.tcUseForInSequenceExpression(), m)) - - | SynExpr.Match (spMatch, expr, clauses, false, _) -> - let inputExpr, matchty, tpenv = TcExprOfUnknownType cenv env tpenv expr - let tclauses, tpenv = - List.mapFold - (fun tpenv (Clause(pat, cond, innerComp, _, sp)) -> - let pat', cond', vspecs, envinner, tpenv = TcMatchPattern cenv matchty env tpenv (pat, cond) - let innerExpr, tpenv = tcSequenceExprBody envinner genOuterTy tpenv innerComp - TClause(pat', cond', TTarget(vspecs, innerExpr, sp), pat'.Range), tpenv) - tpenv - clauses - let inputExprTy = tyOfExpr cenv.g inputExpr - let inputExprMark = inputExpr.Range - let matchv, matchExpr = CompilePatternForMatchClauses cenv env inputExprMark inputExprMark true ThrowIncompleteMatchException inputExprTy genOuterTy tclauses - Some(mkLet spMatch inputExprMark matchv inputExpr matchExpr, tpenv) - - | SynExpr.TryWith (_, mTryToWith, _, _, _, _, _) -> - error(Error(FSComp.SR.tcTryIllegalInSequenceExpression(), mTryToWith)) - - | SynExpr.YieldOrReturnFrom((isYield, _), yieldExpr, m) -> - let resultExpr, genExprTy, tpenv = TcExprOfUnknownType cenv env tpenv yieldExpr - - if not isYield then errorR(Error(FSComp.SR.tcUseYieldBangForMultipleResults(), m)) - - AddCxTypeMustSubsumeType ContextInfo.NoContext env.DisplayEnv cenv.css m NoTrace genOuterTy genExprTy - Some(mkCoerceExpr(resultExpr, genOuterTy, m, genExprTy), tpenv) - - | SynExpr.YieldOrReturn((isYield, _), yieldExpr, m) -> - let genResultTy = NewInferenceType () - if not isYield then errorR(Error(FSComp.SR.tcSeqResultsUseYield(), m)) - UnifyTypes cenv env m genOuterTy (mkSeqTy cenv.g genResultTy) - - let resultExpr, tpenv = TcExpr cenv genResultTy env tpenv yieldExpr - Some(mkCallSeqSingleton cenv.g m genResultTy resultExpr, tpenv ) + | SynExpr.DoBang(_rhsExpr, m) -> + error(Error(FSComp.SR.tcDoBangIllegalInSequenceExpression(), m)) - | _ -> None - - and tcSequenceExprBody env genOuterTy tpenv comp = - match tryTcSequenceExprBody env genOuterTy tpenv comp with - | Some e -> e + | SynExpr.Sequential(sp, true, innerComp1, innerComp2, m) -> + // "expr; cexpr" is treated as sequential execution + // "cexpr; cexpr" is treated as append + match tryTcSequenceExprBody env genOuterTy tpenv innerComp1 with | None -> - // seq { ...; expr } is treated as 'seq { ... ; expr; yield! Seq.empty }' - // Note this means seq { ...; () } is treated as 'seq { ... ; (); yield! Seq.empty }' - let m = comp.Range - let expr, tpenv = TcStmtThatCantBeCtorBody cenv env tpenv comp - Expr.Sequential(expr, mkSeqEmpty cenv env m genOuterTy, NormalSeq, SuppressSequencePointOnStmtOfSequential, m), tpenv + let innerExpr1, tpenv = TcStmtThatCantBeCtorBody cenv env tpenv innerComp1 + let innerExpr2, tpenv = tcSequenceExprBody env genOuterTy tpenv innerComp2 + + Some(Expr.Sequential(innerExpr1, innerExpr2, NormalSeq, sp, m), tpenv) + + | Some (innerExpr1, tpenv) -> + let innerExpr2, tpenv = tcSequenceExprBody env genOuterTy tpenv innerComp2 + let innerExpr2 = mkDelayedExpr innerExpr2 + Some(mkSeqAppend cenv env innerComp1.Range genOuterTy innerExpr1 innerExpr2, tpenv) + + | SynExpr.IfThenElse (guardExpr, thenComp, elseCompOpt, spIfToThen, _isRecovery, mIfToThen, mIfToEndOfElseBranch) -> + let guardExpr', tpenv = TcExpr cenv cenv.g.bool_ty env tpenv guardExpr + let thenExpr, tpenv = tcSequenceExprBody env genOuterTy tpenv thenComp + let elseComp = (match elseCompOpt with Some c -> c | None -> SynExpr.ImplicitZero mIfToThen) + let elseExpr, tpenv = tcSequenceExprBody env genOuterTy tpenv elseComp + Some(mkCond spIfToThen SequencePointAtTarget mIfToEndOfElseBranch genOuterTy guardExpr' thenExpr elseExpr, tpenv) + + // 'let x = expr in expr' + | SynExpr.LetOrUse (_, false (* not a 'use' binding *), _, _, _) -> + TcLinearExprs + (fun ty envinner tpenv e -> tcSequenceExprBody envinner ty tpenv e) + cenv env overallTy + tpenv + true + comp + (fun x -> x) |> Some + + // 'use x = expr in expr' + | SynExpr.LetOrUse (_isRec, true, [Binding (_vis, NormalBinding, _, _, _, _, _, pat, _, rhsExpr, _, _spBind)], innerComp, wholeExprMark) -> + + let bindPatTy = NewInferenceType () + let inputExprTy = NewInferenceType () + let pat', _, vspecs, envinner, tpenv = TcMatchPattern cenv bindPatTy env tpenv (pat, None) + UnifyTypes cenv env m inputExprTy bindPatTy + let inputExpr, tpenv = TcExpr cenv inputExprTy env tpenv rhsExpr + let innerExpr, tpenv = tcSequenceExprBody envinner genOuterTy tpenv innerComp + let inputExprMark = inputExpr.Range + let matchv, matchExpr = compileSeqExprMatchClauses cenv env inputExprMark (pat', vspecs) innerExpr (Some inputExpr) bindPatTy genOuterTy + let consumeExpr = mkLambda wholeExprMark matchv (matchExpr, genOuterTy) + //SEQPOINT NEEDED - we must consume spBind on this path + Some(mkSeqUsing cenv env wholeExprMark bindPatTy genOuterTy inputExpr consumeExpr, tpenv) + + | SynExpr.LetOrUseBang(_, _, _, _, _, _, m) -> + error(Error(FSComp.SR.tcUseForInSequenceExpression(), m)) + + | SynExpr.Match (spMatch, expr, clauses, _) -> + let inputExpr, matchty, tpenv = TcExprOfUnknownType cenv env tpenv expr + let tclauses, tpenv = + List.mapFold + (fun tpenv (Clause(pat, cond, innerComp, _, sp)) -> + let pat', cond', vspecs, envinner, tpenv = TcMatchPattern cenv matchty env tpenv (pat, cond) + let innerExpr, tpenv = tcSequenceExprBody envinner genOuterTy tpenv innerComp + TClause(pat', cond', TTarget(vspecs, innerExpr, sp), pat'.Range), tpenv) + tpenv + clauses + let inputExprTy = tyOfExpr cenv.g inputExpr + let inputExprMark = inputExpr.Range + let matchv, matchExpr = CompilePatternForMatchClauses cenv env inputExprMark inputExprMark true ThrowIncompleteMatchException (Some inputExpr) inputExprTy genOuterTy tclauses + Some(mkLet spMatch inputExprMark matchv inputExpr matchExpr, tpenv) + + | SynExpr.TryWith (_, mTryToWith, _, _, _, _, _) -> + error(Error(FSComp.SR.tcTryIllegalInSequenceExpression(), mTryToWith)) - let genEnumElemTy = NewInferenceType () - UnifyTypes cenv env m overallTy (mkSeqTy cenv.g genEnumElemTy) + | SynExpr.YieldOrReturnFrom((isYield, _), yieldExpr, m) -> + let resultExpr, genExprTy, tpenv = TcExprOfUnknownType cenv env tpenv yieldExpr - let coreExpr, tpenv = tcSequenceExprBody env overallTy tpenv comp - let delayedExpr = mkDelayedExpr coreExpr - delayedExpr, tpenv + if not isYield then errorR(Error(FSComp.SR.tcUseYieldBangForMultipleResults(), m)) -//------------------------------------------------------------------------- -// Typecheck "expr ... " constructs where "..." is a sequence of applications, -// type applications and dot-notation projections. First extract known -// type information from the "..." part to use during type checking. -// -// 'overallTy' is the type expected for the entire chain of expr + lookups. -// 'exprty' is the type of the expression on the left of the lookup chain. -// -// Unsophisticated applications can propagate information from the expected overall type 'overallTy' -// through to the leading function type 'exprty'. This is because the application -// unambiguously implies a function type -//------------------------------------------------------------------------- + AddCxTypeMustSubsumeType ContextInfo.NoContext env.DisplayEnv cenv.css m NoTrace genOuterTy genExprTy + Some(mkCoerceExpr(resultExpr, genOuterTy, m, genExprTy), tpenv) + + | SynExpr.YieldOrReturn((isYield, _), yieldExpr, m) -> + let genResultTy = NewInferenceType () + if not isYield then errorR(Error(FSComp.SR.tcSeqResultsUseYield(), m)) + UnifyTypes cenv env m genOuterTy (mkSeqTy cenv.g genResultTy) + let resultExpr, tpenv = TcExprFlex cenv flex true genResultTy env tpenv yieldExpr + Some(mkCallSeqSingleton cenv.g m genResultTy resultExpr, tpenv ) + + | _ -> None + + and tcSequenceExprBody env genOuterTy tpenv comp = + match tryTcSequenceExprBody env genOuterTy tpenv comp with + | Some e -> e + | None -> + // seq { ...; expr } is treated as 'seq { ... ; expr; yield! Seq.empty }' + // Note this means seq { ...; () } is treated as 'seq { ... ; (); yield! Seq.empty }' + let m = comp.Range + let env = { env with eContextInfo = ContextInfo.SequenceExpression genOuterTy } + let expr, tpenv = TcStmtThatCantBeCtorBody cenv env tpenv comp + Expr.Sequential(expr, mkSeqEmpty cenv env m genOuterTy, NormalSeq, SuppressSequencePointOnStmtOfSequential, m), tpenv + + let coreExpr, tpenv = tcSequenceExprBody env overallTy tpenv comp + let delayedExpr = mkDelayedExpr coreExpr + delayedExpr, tpenv + +/// When checking sequence of function applications, +/// type applications and dot-notation projections, first extract known +/// type information from the applications. +/// +/// 'overallTy' is the type expected for the entire chain of expr + lookups. +/// 'exprty' is the type of the expression on the left of the lookup chain. +/// +/// We propagate information from the expected overall type 'overallTy'. The use +/// of function application syntax unambiguously implies that 'overallTy' is a function type. and Propagate cenv overallTy env tpenv (expr: ApplicableExpr) exprty delayed = - let rec propagate delayedList mExpr exprty = + let rec propagate isAddrOf delayedList mExpr exprty = match delayedList with | [] -> - // Avoid unifying twice: we're about to unify in TcDelayed + if not (isNil delayed) then + + // We generate a tag inference parameter to the return type for "&x" and 'NativePtr.toByRef' + // See RFC FS-1053.md + let exprty = + if isAddrOf && isByrefTy cenv.g exprty then + mkByrefTyWithInference cenv.g (destByrefTy cenv.g exprty) (NewByRefKindInferenceType cenv.g mExpr) + elif isByrefTy cenv.g exprty then + // Implicit dereference on byref on return + if isByrefTy cenv.g overallTy then + errorR(Error(FSComp.SR.tcByrefReturnImplicitlyDereferenced(), mExpr)) + destByrefTy cenv.g exprty + else + exprty + UnifyTypesAndRecover cenv env mExpr overallTy exprty + | DelayedDot :: _ | DelayedSet _ :: _ | DelayedDotLookup _ :: _ -> () | DelayedTypeApp (_, _mTypeArgs, mExprAndTypeArgs) :: delayedList' -> // Note this case should not occur: would eventually give an "Unexpected type application" error in TcDelayed - propagate delayedList' mExprAndTypeArgs exprty + propagate isAddrOf delayedList' mExprAndTypeArgs exprty | DelayedApp (_, arg, mExprAndArg) :: delayedList' -> let denv = env.DisplayEnv match UnifyFunctionTypeUndoIfFailed cenv denv mExpr exprty with - | Some (_, resultTy) -> - propagate delayedList' mExprAndArg resultTy - | None -> + | ValueSome (_, resultTy) -> + + // We add tag parameter to the return type for "&x" and 'NativePtr.toByRef' + // See RFC FS-1053.md + let isAddrOf = + match expr with + | ApplicableExpr(_, Expr.App(Expr.Val(vf, _, _), _, _, [], _), _) + when (valRefEq cenv.g vf cenv.g.addrof_vref || + valRefEq cenv.g vf cenv.g.nativeptr_tobyref_vref) -> true + | _ -> false + + propagate isAddrOf delayedList' mExprAndArg resultTy + + | _ -> let mArg = arg.Range match arg with | SynExpr.CompExpr _ -> () @@ -8338,7 +8422,7 @@ and Propagate cenv overallTy env tpenv (expr: ApplicableExpr) exprty delayed = RecordNameAndTypeResolutions_IdeallyWithoutHavingOtherEffects_Delayed cenv env tpenv delayed error (NotAFunction(denv, overallTy, mExpr, mArg)) - propagate delayed expr.Range exprty + propagate false delayed expr.Range exprty and PropagateThenTcDelayed cenv overallTy env tpenv mExpr expr exprty (atomicFlag:ExprAtomicFlag) delayed = Propagate cenv overallTy env tpenv expr exprty delayed @@ -8363,15 +8447,23 @@ and TcDelayed cenv overallTy env tpenv mExpr expr exprty (atomicFlag:ExprAtomicF // expr.M(args) where x.M is a .NET method or index property // expr.M where x.M is a .NET method or index property | DelayedDotLookup (longId, mDotLookup) :: otherDelayed -> - TcLookupThen cenv overallTy env tpenv mExpr expr.Expr exprty longId otherDelayed mDotLookup + TcLookupThen cenv overallTy env tpenv mExpr expr.Expr exprty longId otherDelayed mDotLookup // f x | DelayedApp (hpa, arg, mExprAndArg) :: otherDelayed -> TcFunctionApplicationThen cenv overallTy env tpenv mExprAndArg expr exprty arg hpa otherDelayed // f | DelayedTypeApp (_, mTypeArgs, _mExprAndTypeArgs) :: _ -> error(Error(FSComp.SR.tcUnexpectedTypeArguments(), mTypeArgs)) - | DelayedSet _ :: _ -> - error(Error(FSComp.SR.tcInvalidAssignment(), mExpr)) + | DelayedSet (synExpr2, mStmt) :: otherDelayed -> + if not (isNil otherDelayed) then error(Error(FSComp.SR.tcInvalidAssignment(), mExpr)) + UnifyTypes cenv env mExpr overallTy cenv.g.unit_ty + let expr = expr.Expr + let _wrap, exprAddress, _readonly, _writeonly = mkExprAddrOfExpr cenv.g true false DefinitelyMutates expr None mExpr + let vty = tyOfExpr cenv.g expr + // Always allow subsumption on assignment to fields + let expr2, tpenv = TcExprFlex cenv true false vty env tpenv synExpr2 + let v, _ve = mkCompGenLocal mExpr "addr" (mkByrefTy cenv.g vty) + mkCompGenLet mStmt v exprAddress (mkAddrSet mStmt (mkLocalValRef v) expr2), tpenv /// Convert the delayed identifiers to a dot-lookup. @@ -8398,7 +8490,7 @@ and TcFunctionApplicationThen cenv overallTy env tpenv mExprAndArg expr exprty ( // If the type of 'synArg' unifies as a function type, then this is a function application, otherwise // it is an error or a computation expression match UnifyFunctionTypeUndoIfFailed cenv denv mFunExpr exprty with - | Some (domainTy, resultTy) -> + | ValueSome (domainTy, resultTy) -> // Notice the special case 'seq { ... }'. In this case 'seq' is actually a function in the F# library. // Set a flag in the syntax tree to say we noticed a leading 'seq' @@ -8413,9 +8505,9 @@ and TcFunctionApplicationThen cenv overallTy env tpenv mExprAndArg expr exprty ( | _ -> () let arg, tpenv = TcExpr cenv domainTy env tpenv synArg - let exprAndArg = buildApp cenv expr exprty arg mExprAndArg + let exprAndArg, resultTy = buildApp cenv expr resultTy arg mExprAndArg TcDelayed cenv overallTy env tpenv mExprAndArg exprAndArg resultTy atomicFlag delayed - | None -> + | _ -> // OK, 'expr' doesn't have function type, but perhaps 'expr' is a computation expression builder, and 'arg' is '{ ... }' match synArg with | SynExpr.CompExpr (false, _isNotNakedRefCell, comp, _m) -> @@ -8462,7 +8554,7 @@ and TcItemThen cenv overallTy env tpenv (item, mItem, rest, afterResolution) del | (Item.UnionCase _ | Item.ExnCase _ | Item.ActivePatternResult _) as item -> // ucaseAppTy is the type of the union constructor applied to its (optional) argument let ucaseAppTy = NewInferenceType () - let mkConstrApp, argtys, argNames = + let mkConstrApp, argTys, argNames = match item with | Item.ActivePatternResult(apinfo, _, n, _) -> let aparity = apinfo.Names.Length @@ -8477,16 +8569,16 @@ and TcItemThen cenv overallTy env tpenv (item, mItem, rest, afterResolution) del ApplyUnionCaseOrExnTypes mItem cenv env ucaseAppTy (Item.UnionCase(ucinfo, false)) | _ -> ApplyUnionCaseOrExnTypes mItem cenv env ucaseAppTy item - let nargtys = List.length argtys + let numArgTys = List.length argTys // Subsumption at data constructions if argument type is nominal prior to equations for any arguments or return types - let flexes = argtys |> List.map (isTyparTy cenv.g >> not) + let flexes = argTys |> List.map (isTyparTy cenv.g >> not) let (|FittedArgs|_|) arg = match arg with | SynExprParen(SynExpr.Tuple(args, _, _), _, _, _) - | SynExpr.Tuple(args, _, _) when nargtys > 1 -> Some args + | SynExpr.Tuple(args, _, _) when numArgTys > 1 -> Some args | SynExprParen(arg, _, _, _) - | arg when nargtys = 1 -> Some [arg] + | arg when numArgTys = 1 -> Some [arg] | _ -> None match delayed with @@ -8496,8 +8588,8 @@ and TcItemThen cenv overallTy env tpenv (item, mItem, rest, afterResolution) del if isNil otherDelayed then UnifyTypes cenv env mExprAndArg overallTy ucaseAppTy - let nargs = List.length args - UnionCaseOrExnCheck env nargtys nargs mExprAndArg + let numArgs = List.length args + UnionCaseOrExnCheck env numArgTys numArgs mExprAndArg // if we manage to get here - number of formal arguments = number of actual arguments // apply named parameters @@ -8508,7 +8600,7 @@ and TcItemThen cenv overallTy env tpenv (item, mItem, rest, afterResolution) del | [] -> args | _ -> - let fittedArgs = Array.zeroCreate nargtys + let fittedArgs = Array.zeroCreate numArgTys // first: put all positional arguments let mutable currentIndex = 0 @@ -8531,7 +8623,7 @@ and TcItemThen cenv overallTy env tpenv (item, mItem, rest, afterResolution) del | Item.UnionCase(uci, _) -> Some(ArgumentContainer.UnionCase(uci)) | Item.ExnCase tref -> Some(ArgumentContainer.Type(tref)) | _ -> None - let argItem = Item.ArgName (argNames.[i], argtys.[i], argContainerOpt) + let argItem = Item.ArgName (argNames.[i], argTys.[i], argContainerOpt) CallNameResolutionSink cenv.tcSink (id.idRange, env.NameEnv, argItem, argItem, emptyTyparInst, ItemOccurence.Use, env.DisplayEnv, ad) else error(Error(FSComp.SR.tcUnionCaseFieldCannotBeUsedMoreThanOnce(id.idText), id.idRange)) currentIndex <- SEEN_NAMED_ARGUMENT @@ -8544,8 +8636,8 @@ and TcItemThen cenv overallTy env tpenv (item, mItem, rest, afterResolution) del // then we'll favor old behavior and treat current argument as positional. let isSpecialCaseForBackwardCompatibility = (currentIndex <> SEEN_NAMED_ARGUMENT) && - (currentIndex < nargtys) && - match stripTyEqns cenv.g argtys.[currentIndex] with + (currentIndex < numArgTys) && + match stripTyEqns cenv.g argTys.[currentIndex] with | TType_app(tcref, _) -> tyconRefEq cenv.g cenv.g.bool_tcr tcref || tyconRefEq cenv.g cenv.g.system_Bool_tcref tcref | TType_var(_) -> true | _ -> false @@ -8554,18 +8646,21 @@ and TcItemThen cenv overallTy env tpenv (item, mItem, rest, afterResolution) del assert (isNull(box fittedArgs.[currentIndex])) fittedArgs.[currentIndex] <- List.item currentIndex args // grab original argument, not item from the list of named parameters currentIndex <- currentIndex + 1 - else - let caseName = - match item with - | Item.UnionCase(uci, _) -> uci.Name - | Item.ExnCase tcref -> tcref.DisplayName - | _ -> failwith "impossible" - error(Error(FSComp.SR.tcUnionCaseConstructorDoesNotHaveFieldWithGivenName(caseName, id.idText), id.idRange)) + else + match item with + | Item.UnionCase(uci, _) -> + error(Error(FSComp.SR.tcUnionCaseConstructorDoesNotHaveFieldWithGivenName(uci.Name, id.idText), id.idRange)) + | Item.ExnCase tcref -> + error(Error(FSComp.SR.tcExceptionConstructorDoesNotHaveFieldWithGivenName(tcref.DisplayName, id.idText), id.idRange)) + | Item.ActivePatternResult(_,_,_,_) -> + error(Error(FSComp.SR.tcActivePatternsDoNotHaveFields(), id.idRange)) + | _ -> + error(Error(FSComp.SR.tcConstructorDoesNotHaveFieldWithGivenName(id.idText), id.idRange)) assert (Seq.forall (box >> ((<>) null) ) fittedArgs) List.ofArray fittedArgs - let args', tpenv = TcExprs cenv env mExprAndArg tpenv flexes argtys args + let args', tpenv = TcExprs cenv env mExprAndArg tpenv flexes argTys args PropagateThenTcDelayed cenv overallTy env tpenv mExprAndArg (MakeApplicableExprNoFlex cenv (mkConstrApp mExprAndArg args')) ucaseAppTy atomicFlag otherDelayed | DelayedTypeApp (_x, mTypeArgs, _mExprAndTypeArgs) :: _delayed' -> @@ -8576,48 +8671,48 @@ and TcItemThen cenv overallTy env tpenv (item, mItem, rest, afterResolution) del // (or else we would be building an invalid expression) // Unit-taking active pattern result can be applied to no args - let nargs, mkExpr = + let numArgs, mkExpr = // This is where the constructor is an active pattern result applied to no argument // Unit-taking active pattern result can be applied to no args - if (nargtys = 1 && match item with Item.ActivePatternResult _ -> true | _ -> false) then - UnifyTypes cenv env mItem (List.head argtys) cenv.g.unit_ty + if (numArgTys = 1 && match item with Item.ActivePatternResult _ -> true | _ -> false) then + UnifyTypes cenv env mItem (List.head argTys) cenv.g.unit_ty 1, (fun () -> mkConstrApp mItem [mkUnit cenv.g mItem]) // This is where the constructor expects no arguments and is applied to no argument - elif nargtys = 0 then + elif numArgTys = 0 then 0, (fun () -> mkConstrApp mItem []) else // This is where the constructor expects arguments but is not applied to arguments, hence build a lambda - nargtys, + numArgTys, (fun () -> - let vs, args = argtys |> List.mapi (fun i ty -> mkCompGenLocal mItem ("arg" + string i) ty) |> List.unzip + let vs, args = argTys |> List.mapi (fun i ty -> mkCompGenLocal mItem ("arg" + string i) ty) |> List.unzip let constrApp = mkConstrApp mItem args let lam = mkMultiLambda mItem vs (constrApp, tyOfExpr cenv.g constrApp) lam) - UnionCaseOrExnCheck env nargtys nargs mItem + UnionCaseOrExnCheck env numArgTys numArgs mItem let expr = mkExpr() let exprTy = tyOfExpr cenv.g expr PropagateThenTcDelayed cenv overallTy env tpenv mItem (MakeApplicableExprNoFlex cenv expr) exprTy ExprAtomicFlag.Atomic delayed - | Item.Types(nm, (typ::_)) -> + | Item.Types(nm, (ty::_)) -> match delayed with | ((DelayedTypeApp(tyargs, _mTypeArgs, mExprAndTypeArgs))::(DelayedDotLookup (longId, mLongId))::otherDelayed) -> - // If Item.Types is returned then the typ will be of the form TType_app(tcref, genericTyargs) where tyargs + // If Item.Types is returned then the ty will be of the form TType_app(tcref, genericTyargs) where tyargs // is a fresh instantiation for tcref. TcNestedTypeApplication will chop off precisely #genericTyargs args // and replace them by 'tyargs' - let typ, tpenv = TcNestedTypeApplication cenv NewTyparsOK CheckCxs ItemOccurence.UseInType env tpenv mExprAndTypeArgs typ tyargs + let ty, tpenv = TcNestedTypeApplication cenv NewTyparsOK CheckCxs ItemOccurence.UseInType env tpenv mExprAndTypeArgs ty tyargs // Report information about the whole expression including type arguments to VS - let item = Item.Types(nm, [typ]) + let item = Item.Types(nm, [ty]) CallNameResolutionSink cenv.tcSink (mExprAndTypeArgs, env.NameEnv, item, item, emptyTyparInst, ItemOccurence.Use, env.DisplayEnv, env.eAccessRights) - TcItemThen cenv overallTy env tpenv (ResolveExprDotLongIdentAndComputeRange cenv.tcSink cenv.nameResolver (unionRanges mExprAndTypeArgs mLongId) ad env.eNameResEnv typ longId IgnoreOverrides true) otherDelayed + TcItemThen cenv overallTy env tpenv (ResolveExprDotLongIdentAndComputeRange cenv.tcSink cenv.nameResolver (unionRanges mExprAndTypeArgs mLongId) ad env.eNameResEnv ty longId IgnoreOverrides true) otherDelayed | ((DelayedTypeApp(tyargs, _mTypeArgs, mExprAndTypeArgs))::_delayed') -> // A case where we have an incomplete name e.g. 'Foo.' - we still want to report it to VS! - let typ, _ = TcNestedTypeApplication cenv NewTyparsOK CheckCxs ItemOccurence.UseInType env tpenv mExprAndTypeArgs typ tyargs - let item = Item.Types(nm, [typ]) + let ty, _ = TcNestedTypeApplication cenv NewTyparsOK CheckCxs ItemOccurence.UseInType env tpenv mExprAndTypeArgs ty tyargs + let item = Item.Types(nm, [ty]) CallNameResolutionSink cenv.tcSink (mExprAndTypeArgs, env.NameEnv, item, item, emptyTyparInst, ItemOccurence.Use, env.DisplayEnv, env.eAccessRights) // Same error as in the following case @@ -8678,7 +8773,7 @@ and TcItemThen cenv overallTy env tpenv (item, mItem, rest, afterResolution) del | Item.CtorGroup(nm, minfos) -> let objTy = match minfos with - | (minfo :: _) -> minfo.EnclosingType + | (minfo :: _) -> minfo.ApparentEnclosingType | [] -> error(Error(FSComp.SR.tcTypeHasNoAccessibleConstructor(), mItem)) match delayed with | ((DelayedApp (_, arg, mExprAndArg))::otherDelayed) -> @@ -8704,7 +8799,7 @@ and TcItemThen cenv overallTy env tpenv (item, mItem, rest, afterResolution) del #endif item, minfos - minfosAfterTyArgs |> List.iter (fun minfo -> UnifyTypes cenv env mExprAndTypeArgs minfo.EnclosingType objTyAfterTyArgs) + minfosAfterTyArgs |> List.iter (fun minfo -> UnifyTypes cenv env mExprAndTypeArgs minfo.ApparentEnclosingType objTyAfterTyArgs) TcCtorCall true cenv env tpenv overallTy objTyAfterTyArgs (Some mExprAndTypeArgs) itemAfterTyArgs false [arg] mExprAndArg otherDelayed (Some afterResolution) | ((DelayedTypeApp(tyargs, _mTypeArgs, mExprAndTypeArgs))::otherDelayed) -> @@ -8715,7 +8810,7 @@ and TcItemThen cenv overallTy env tpenv (item, mItem, rest, afterResolution) del let resolvedItem = Item.Types(nm, [objTy]) CallNameResolutionSink cenv.tcSink (mExprAndTypeArgs, env.NameEnv, resolvedItem, resolvedItem, emptyTyparInst, ItemOccurence.Use, env.DisplayEnv, env.eAccessRights) - minfos |> List.iter (fun minfo -> UnifyTypes cenv env mExprAndTypeArgs minfo.EnclosingType objTy) + minfos |> List.iter (fun minfo -> UnifyTypes cenv env mExprAndTypeArgs minfo.ApparentEnclosingType objTy) TcCtorCall true cenv env tpenv overallTy objTy (Some mExprAndTypeArgs) item false [] mExprAndTypeArgs otherDelayed (Some afterResolution) | _ -> @@ -8802,6 +8897,7 @@ and TcItemThen cenv overallTy env tpenv (item, mItem, rest, afterResolution) del | SynExpr.DotSet _ | SynExpr.DotIndexedSet _ | SynExpr.LongIdentSet _ + | SynExpr.Set _ | SynExpr.JoinIn _ | SynExpr.NamedIndexedPropertySet _ | SynExpr.DotNamedIndexedPropertySet _ @@ -8815,6 +8911,7 @@ and TcItemThen cenv overallTy env tpenv (item, mItem, rest, afterResolution) del | SynExpr.ImplicitZero _ | SynExpr.YieldOrReturn _ | SynExpr.YieldOrReturnFrom _ + | SynExpr.MatchBang _ | SynExpr.LetOrUseBang _ | SynExpr.DoBang _ | SynExpr.TraitCall _ @@ -8840,17 +8937,17 @@ and TcItemThen cenv overallTy env tpenv (item, mItem, rest, afterResolution) del resultExpr2, tpenv2 - | Item.DelegateCtor typ -> + | Item.DelegateCtor ty -> match delayed with | ((DelayedApp (atomicFlag, arg, mItemAndArg))::otherDelayed) -> - TcNewDelegateThen cenv overallTy env tpenv mItem mItemAndArg typ arg atomicFlag otherDelayed + TcNewDelegateThen cenv overallTy env tpenv mItem mItemAndArg ty arg atomicFlag otherDelayed | ((DelayedTypeApp(tyargs, _mTypeArgs, mItemAndTypeArgs))::(DelayedApp (atomicFlag, arg, mItemAndArg))::otherDelayed) -> - let typ, tpenv = TcNestedTypeApplication cenv NewTyparsOK CheckCxs ItemOccurence.UseInType env tpenv mItemAndTypeArgs typ tyargs + let ty, tpenv = TcNestedTypeApplication cenv NewTyparsOK CheckCxs ItemOccurence.UseInType env tpenv mItemAndTypeArgs ty tyargs // Report information about the whole expression including type arguments to VS - let item = Item.DelegateCtor typ + let item = Item.DelegateCtor ty CallNameResolutionSink cenv.tcSink (mItemAndTypeArgs, env.NameEnv, item, item, emptyTyparInst, ItemOccurence.Use, env.DisplayEnv, env.eAccessRights) - TcNewDelegateThen cenv overallTy env tpenv mItem mItemAndArg typ arg atomicFlag otherDelayed + TcNewDelegateThen cenv overallTy env tpenv mItem mItemAndArg ty arg atomicFlag otherDelayed | _ -> error(Error(FSComp.SR.tcInvalidUseOfDelegate(), mItem)) @@ -8872,12 +8969,15 @@ and TcItemThen cenv overallTy env tpenv (item, mItem, rest, afterResolution) del if not vref.IsMutable then error (ValNotMutable(env.DisplayEnv, vref, mStmt)) vty // Always allow subsumption on assignment to fields - let e2', tpenv = TcExprFlex cenv true vty2 env tpenv e2 + let e2', tpenv = TcExprFlex cenv true false vty2 env tpenv e2 let vexp = - if isByrefTy cenv.g vty then - mkAddrSet mStmt vref e2' + if isInByrefTy cenv.g vty then + errorR(Error(FSComp.SR.writeToReadOnlyByref(), mStmt)) + mkAddrSet mStmt vref e2' + elif isByrefTy cenv.g vty then + mkAddrSet mStmt vref e2' else - mkValSet mStmt vref e2' + mkValSet mStmt vref e2' PropagateThenTcDelayed cenv overallTy env tpenv mStmt (MakeApplicableExprNoFlex cenv vexp) (tyOfExpr cenv.g vexp) ExprAtomicFlag.NonAtomic otherDelayed @@ -8912,14 +9012,24 @@ and TcItemThen cenv overallTy env tpenv (item, mItem, rest, afterResolution) del if not pinfo.IsStatic then error (Error (FSComp.SR.tcPropertyIsNotStatic(nm), mItem)) match delayed with | DelayedSet(e2, mStmt) :: otherDelayed -> - let args = if pinfo.IsIndexer then args else [] if not (isNil otherDelayed) then error(Error(FSComp.SR.tcInvalidAssignment(), mStmt)) // Static Property Set (possibly indexer) UnifyTypes cenv env mStmt overallTy cenv.g.unit_ty let meths = pinfos |> SettersOfPropInfos - if isNil meths then error (Error (FSComp.SR.tcPropertyCannotBeSet1 nm, mItem)) - // Note: static calls never mutate a struct object argument - TcMethodApplicationThen cenv env overallTy None tpenv tyargsOpt [] mStmt mItem nm ad NeverMutates true meths afterResolution NormalValUse (args@[e2]) ExprAtomicFlag.NonAtomic otherDelayed + if meths.IsEmpty then + let meths = pinfos |> GettersOfPropInfos + let isByrefMethReturnSetter = meths |> List.exists (function (_,Some pinfo) -> isByrefTy cenv.g (pinfo.GetPropertyType(cenv.amap,mItem)) | _ -> false) + if isByrefMethReturnSetter then + // x.P <- ... byref setter + if isNil meths then error (Error (FSComp.SR.tcPropertyIsNotReadable(nm), mItem)) + TcMethodApplicationThen cenv env overallTy None tpenv tyargsOpt [] mItem mItem nm ad NeverMutates true meths afterResolution NormalValUse args ExprAtomicFlag.Atomic delayed + else + error (Error (FSComp.SR.tcPropertyCannotBeSet1 nm, mItem)) + else + let args = if pinfo.IsIndexer then args else [] + if isNil meths then error (Error (FSComp.SR.tcPropertyCannotBeSet1 nm, mItem)) + // Note: static calls never mutate a struct object argument + TcMethodApplicationThen cenv env overallTy None tpenv tyargsOpt [] mStmt mItem nm ad NeverMutates true meths afterResolution NormalValUse (args@[e2]) ExprAtomicFlag.NonAtomic otherDelayed | _ -> // Static Property Get (possibly indexer) let meths = pinfos |> GettersOfPropInfos @@ -8938,7 +9048,7 @@ and TcItemThen cenv overallTy env tpenv (item, mItem, rest, afterResolution) del | DelayedSet(e2, mStmt) :: _delayed' -> UnifyTypes cenv env mStmt overallTy cenv.g.unit_ty // Always allow subsumption on assignment to fields - let e2', tpenv = TcExprFlex cenv true exprty env tpenv e2 + let e2', tpenv = TcExprFlex cenv true false exprty env tpenv e2 let expr = BuildILStaticFieldSet mStmt finfo e2' expr, tpenv | _ -> @@ -8954,7 +9064,7 @@ and TcItemThen cenv overallTy env tpenv (item, mItem, rest, afterResolution) del // The empty instantiation on the fspec is OK, since we make the correct fspec in IlxGen.GenAsm // This ensures we always get the type instantiation right when doing this from // polymorphic code, after inlining etc. - let fspec = mkILFieldSpec(fref, mkILNamedTy valu fref.EnclosingTypeRef []) + let fspec = mkILFieldSpec(fref, mkILNamedTy valu fref.DeclaringTypeRef []) // Add an I_nop if this is an initonly field to make sure we never recognize it as an lvalue. See mkExprAddrOfExpr. mkAsmExpr ([ mkNormalLdsfld fspec ] @ (if finfo.IsInitOnly then [ AI_nop ] else []), finfo.TypeInst, [], [exprty], mItem) @@ -8976,7 +9086,7 @@ and TcItemThen cenv overallTy env tpenv (item, mItem, rest, afterResolution) del UnifyTypes cenv env mStmt overallTy cenv.g.unit_ty let fieldTy = rfinfo.FieldType // Always allow subsumption on assignment to fields - let e2', tpenv = TcExprFlex cenv true fieldTy env tpenv e2 + let e2', tpenv = TcExprFlex cenv true false fieldTy env tpenv e2 let expr = mkStaticRecdFieldSet (rfinfo.RecdFieldRef, rfinfo.TypeInst, e2', mStmt) expr, tpenv | _ -> @@ -9087,14 +9197,23 @@ and TcLookupThen cenv overallTy env tpenv mObjExpr objExpr objExprTy longId dela match delayed with | DelayedSet(e2, mStmt) :: otherDelayed -> - let args = if pinfo.IsIndexer then args else [] if not (isNil otherDelayed) then error(Error(FSComp.SR.tcInvalidAssignment(), mStmt)) // Instance property setter UnifyTypes cenv env mStmt overallTy cenv.g.unit_ty let meths = SettersOfPropInfos pinfos - if isNil meths then error (Error (FSComp.SR.tcPropertyCannotBeSet1 nm, mItem)) - let mut = (if isStructTy cenv.g (tyOfExpr cenv.g objExpr) then DefinitelyMutates else PossiblyMutates) - TcMethodApplicationThen cenv env overallTy None tpenv tyargsOpt objArgs mStmt mItem nm ad mut true meths afterResolution NormalValUse (args @ [e2]) atomicFlag [] + if meths.IsEmpty then + let meths = pinfos |> GettersOfPropInfos + let isByrefMethReturnSetter = meths |> List.exists (function (_,Some pinfo) -> isByrefTy cenv.g (pinfo.GetPropertyType(cenv.amap,mItem)) | _ -> false) + if isByrefMethReturnSetter then + // x.P <- ... byref setter + if isNil meths then error (Error (FSComp.SR.tcPropertyIsNotReadable(nm), mItem)) + TcMethodApplicationThen cenv env overallTy None tpenv tyargsOpt objArgs mExprAndItem mItem nm ad PossiblyMutates true meths afterResolution NormalValUse args atomicFlag delayed + else + error (Error (FSComp.SR.tcPropertyCannotBeSet1 nm, mItem)) + else + let args = if pinfo.IsIndexer then args else [] + let mut = (if isStructTy cenv.g (tyOfExpr cenv.g objExpr) then DefinitelyMutates else PossiblyMutates) + TcMethodApplicationThen cenv env overallTy None tpenv tyargsOpt objArgs mStmt mItem nm ad mut true meths afterResolution NormalValUse (args @ [e2]) atomicFlag [] | _ -> // Instance property getter let meths = GettersOfPropInfos pinfos @@ -9104,10 +9223,10 @@ and TcLookupThen cenv overallTy env tpenv mObjExpr objExpr objExprTy longId dela | Item.RecdField rfinfo -> // Get or set instance F# field or literal RecdFieldInstanceChecks cenv.g cenv.amap ad mItem rfinfo - let tgty = rfinfo.EnclosingType - let valu = isStructTy cenv.g tgty - AddCxTypeMustSubsumeType ContextInfo.NoContext env.DisplayEnv cenv.css mItem NoTrace tgty objExprTy - let objExpr = if valu then objExpr else mkCoerceExpr(objExpr, tgty, mExprAndItem, objExprTy) + let tgtTy = rfinfo.DeclaringType + let valu = isStructTy cenv.g tgtTy + AddCxTypeMustSubsumeType ContextInfo.NoContext env.DisplayEnv cenv.css mItem NoTrace tgtTy objExprTy + let objExpr = if valu then objExpr else mkCoerceExpr(objExpr, tgtTy, mExprAndItem, objExprTy) let fieldTy = rfinfo.FieldType match delayed with | DelayedSet(e2, mStmt) :: otherDelayed -> @@ -9116,7 +9235,7 @@ and TcLookupThen cenv overallTy env tpenv mObjExpr objExpr objExprTy longId dela CheckRecdFieldMutation mItem env.DisplayEnv rfinfo UnifyTypes cenv env mStmt overallTy cenv.g.unit_ty // Always allow subsumption on assignment to fields - let e2', tpenv = TcExprFlex cenv true fieldTy env tpenv e2 + let e2', tpenv = TcExprFlex cenv true false fieldTy env tpenv e2 BuildRecdFieldSet cenv.g mStmt objExpr rfinfo e2', tpenv | _ -> @@ -9135,7 +9254,7 @@ and TcLookupThen cenv overallTy env tpenv mObjExpr objExpr objExprTy longId dela | DelayedSet(e2, mStmt) :: _delayed' -> UnifyTypes cenv env mStmt overallTy cenv.g.unit_ty // Always allow subsumption on assignment to fields - let e2', tpenv = TcExprFlex cenv true exprty env tpenv e2 + let e2', tpenv = TcExprFlex cenv true false exprty env tpenv e2 let expr = BuildILFieldSet cenv.g mStmt objExpr finfo e2' expr, tpenv | _ -> @@ -9180,10 +9299,10 @@ and TcEventValueThen cenv overallTy env tpenv mItem mExprAndItem objDetails (ein // EventHelper ((fun d -> e.add_X(d)), (fun d -> e.remove_X(d)), (fun f -> new 'Delegate(f))) mkCallCreateEvent cenv.g mItem delegateType argsTy (let dv, de = mkCompGenLocal mItem "eventDelegate" delegateType - let callExpr, _ = BuildPossiblyConditionalMethodCall cenv env PossiblyMutates mItem false (einfo.GetAddMethod()) NormalValUse [] objVars [de] + let callExpr, _ = BuildPossiblyConditionalMethodCall cenv env PossiblyMutates mItem false einfo.AddMethod NormalValUse [] objVars [de] mkLambda mItem dv (callExpr, cenv.g.unit_ty)) (let dv, de = mkCompGenLocal mItem "eventDelegate" delegateType - let callExpr, _ = BuildPossiblyConditionalMethodCall cenv env PossiblyMutates mItem false (einfo.GetRemoveMethod()) NormalValUse [] objVars [de] + let callExpr, _ = BuildPossiblyConditionalMethodCall cenv env PossiblyMutates mItem false einfo.RemoveMethod NormalValUse [] objVars [de] mkLambda mItem dv (callExpr, cenv.g.unit_ty)) (let fvty = (cenv.g.obj_ty --> (argsTy --> cenv.g.unit_ty)) let fv, fe = mkCompGenLocal mItem "callback" fvty @@ -9248,7 +9367,7 @@ and TcMethodApplicationThen and GetNewInferenceTypeForMethodArg cenv env tpenv x = match x with | SynExprParen(a, _, _, _) -> GetNewInferenceTypeForMethodArg cenv env tpenv a - | SynExpr.AddressOf(true, a, _, _) -> mkByrefTy cenv.g (GetNewInferenceTypeForMethodArg cenv env tpenv a) + | SynExpr.AddressOf(true, a, _, m) -> mkByrefTyWithInference cenv.g (GetNewInferenceTypeForMethodArg cenv env tpenv a) (NewByRefKindInferenceType cenv.g m) | SynExpr.Lambda(_, _, _, a, _) -> mkFunTy (NewInferenceType ()) (GetNewInferenceTypeForMethodArg cenv env tpenv a) | SynExpr.Quote(_, raw, a, _, _) -> if raw then mkRawQuotedExprTy cenv.g @@ -9280,8 +9399,8 @@ and TcMethodApplication let denv = env.DisplayEnv - let isSimpleFormalArg (isParamArrayArg, isOutArg, optArgInfo: OptionalArgInfo, callerInfoInfo: CallerInfoInfo, _reflArgInfo: ReflectedArgInfo) = - not isParamArrayArg && not isOutArg && not optArgInfo.IsOptional && callerInfoInfo = NoCallerInfo + let isSimpleFormalArg (isParamArrayArg, _isInArg, isOutArg, optArgInfo: OptionalArgInfo, callerInfo: CallerInfo, _reflArgInfo: ReflectedArgInfo) = + not isParamArrayArg && not isOutArg && not optArgInfo.IsOptional && callerInfo = NoCallerInfo let callerObjArgTys = objArgs |> List.map (tyOfExpr cenv.g) @@ -9402,7 +9521,7 @@ and TcMethodApplication resultTy) curriedArgTys, returnTy - if isProp && Option.isNone curriedCallerArgsOpt then + if isProp && Option.isNone curriedCallerArgsOpt then error(Error(FSComp.SR.parsIndexerPropertyRequiresAtLeastOneArgument(), mItem)) // STEP 1. UnifyUniqueOverloading. This happens BEFORE we type check the arguments. @@ -9474,16 +9593,7 @@ and TcMethodApplication let uniquelyResolved = let csenv = MakeConstraintSolverEnv ContextInfo.NoContext cenv.css mMethExpr denv - let res = UnifyUniqueOverloading csenv callerArgCounts methodName ad preArgumentTypeCheckingCalledMethGroup returnTy - - match res with - | ErrorResult _ -> - match afterResolution with - | AfterResolution.DoNothing -> () - | AfterResolution.RecordResolution(_, _, _, onFailure) -> onFailure() - | _ -> () - - res |> CommitOperationResult + UnifyUniqueOverloading csenv callerArgCounts methodName ad preArgumentTypeCheckingCalledMethGroup returnTy uniquelyResolved, preArgumentTypeCheckingCalledMethGroup @@ -9516,7 +9626,7 @@ and TcMethodApplication else [domainTy] [argTys], returnTy - + let lambdaVarsAndExprs = curriedArgTys |> List.mapiSquared (fun i j ty -> mkCompGenLocal mMethExpr ("arg"+string i+string j) ty) let unnamedCurriedCallerArgs = lambdaVarsAndExprs |> List.mapSquared (fun (_, e) -> CallerArg(tyOfExpr cenv.g e, e.Range, false, e)) let namedCurriedCallerArgs = lambdaVarsAndExprs |> List.map (fun _ -> []) @@ -9550,6 +9660,16 @@ and TcMethodApplication let preArgumentTypeCheckingCalledMethGroup = preArgumentTypeCheckingCalledMethGroup |> List.map (fun cmeth -> (cmeth.Method, cmeth.CalledTyArgs, cmeth.AssociatedPropertyInfo, cmeth.UsesParamArrayConversion)) + let uniquelyResolved = + match uniquelyResolved with + | ErrorResult _ -> + match afterResolution with + | AfterResolution.DoNothing -> () + | AfterResolution.RecordResolution(_, _, _, onFailure) -> onFailure() + | _ -> () + + uniquelyResolved |> CommitOperationResult + // STEP 3. Resolve overloading /// Select the called method that's the result of overload resolution let finalCalledMeth = @@ -9588,7 +9708,7 @@ and TcMethodApplication match unrefinedItem with | Item.MethodGroup(_, overridenMeths, _) -> overridenMeths |> List.map (fun minfo -> minfo, None) | Item.Property(_, pinfos) -> - if result.Method.LogicalName.StartsWith ("set_") then + if result.Method.LogicalName.StartsWithOrdinal("set_") then SettersOfPropInfos pinfos else GettersOfPropInfos pinfos @@ -9648,20 +9768,20 @@ and TcMethodApplication // if (isInstance && finalCalledMethInfo.IsInstance && - typeEquiv cenv.g finalCalledMethInfo.EnclosingType cenv.g.obj_ty && + typeEquiv cenv.g finalCalledMethInfo.ApparentEnclosingType cenv.g.obj_ty && (finalCalledMethInfo.LogicalName = "GetHashCode" || finalCalledMethInfo.LogicalName = "Equals")) then objArgs |> List.iter (fun expr -> ConstraintSolver.AddCxTypeMustSupportEquality env.DisplayEnv cenv.css mMethExpr NoTrace (tyOfExpr cenv.g expr)) // Uses of a Dictionary() constructor without an IEqualityComparer argument imply an equality constraint // on the first type argument. - if HasHeadType cenv.g cenv.g.tcref_System_Collections_Generic_Dictionary finalCalledMethInfo.EnclosingType && + if HasHeadType cenv.g cenv.g.tcref_System_Collections_Generic_Dictionary finalCalledMethInfo.ApparentEnclosingType && finalCalledMethInfo.IsConstructor && not (finalCalledMethInfo.GetParamDatas(cenv.amap, mItem, finalCalledMeth.CalledTyArgs) - |> List.existsSquared (fun (ParamData(_, _, _, _, _, _, ty)) -> + |> List.existsSquared (fun (ParamData(_, _, _, _, _, _, _, ty)) -> HasHeadType cenv.g cenv.g.tcref_System_Collections_Generic_IEqualityComparer ty)) then - match argsOfAppTy cenv.g finalCalledMethInfo.EnclosingType with + match argsOfAppTy cenv.g finalCalledMethInfo.ApparentEnclosingType with | [dty; _] -> ConstraintSolver.AddCxTypeMustSupportEquality env.DisplayEnv cenv.css mMethExpr NoTrace dty | _ -> () end @@ -9693,53 +9813,67 @@ and TcMethodApplication // Handle adhoc argument conversions let coerceExpr isOutArg calledArgTy (reflArgInfo: ReflectedArgInfo) callerArgTy m callerArgExpr = + let g = cenv.g + + if isByrefTy g calledArgTy && isRefCellTy g callerArgTy then + None, Expr.Op(TOp.RefAddrGet false, [destRefCellTy g callerArgTy], [callerArgExpr], m) - if isByrefTy cenv.g calledArgTy && isRefCellTy cenv.g callerArgTy then - Expr.Op(TOp.RefAddrGet, [destRefCellTy cenv.g callerArgTy], [callerArgExpr], m) +#if IMPLICIT_ADDRESS_OF + elif isInByrefTy g calledArgTy && not (isByrefTy cenv.g callerArgTy) then + let wrap, callerArgExprAddress, _readonly, _writeonly = mkExprAddrOfExpr g true false NeverMutates callerArgExpr None m + Some wrap, callerArgExprAddress +#endif elif isDelegateTy cenv.g calledArgTy && isFunTy cenv.g callerArgTy then - CoerceFromFSharpFuncToDelegate cenv.g cenv.amap cenv.infoReader ad callerArgTy m callerArgExpr calledArgTy + None, CoerceFromFSharpFuncToDelegate cenv.g cenv.amap cenv.infoReader ad callerArgTy m callerArgExpr calledArgTy elif isLinqExpressionTy cenv.g calledArgTy && isDelegateTy cenv.g (destLinqExpressionTy cenv.g calledArgTy) && isFunTy cenv.g callerArgTy then let delegateTy = destLinqExpressionTy cenv.g calledArgTy let expr = CoerceFromFSharpFuncToDelegate cenv.g cenv.amap cenv.infoReader ad callerArgTy m callerArgExpr delegateTy - mkCallQuoteToLinqLambdaExpression cenv.g m delegateTy (Expr.Quote(expr, ref None, false, m, mkQuotedExprTy cenv.g delegateTy)) + None, mkCallQuoteToLinqLambdaExpression cenv.g m delegateTy (Expr.Quote(expr, ref None, false, m, mkQuotedExprTy cenv.g delegateTy)) // auto conversions to quotations (to match auto conversions to LINQ expressions) elif reflArgInfo.AutoQuote && isQuotedExprTy cenv.g calledArgTy && not (isQuotedExprTy cenv.g callerArgTy) then match reflArgInfo with | ReflectedArgInfo.Quote true -> - mkCallLiftValueWithDefn cenv.g m calledArgTy callerArgExpr + None, mkCallLiftValueWithDefn cenv.g m calledArgTy callerArgExpr | ReflectedArgInfo.Quote false -> - Expr.Quote(callerArgExpr, ref None, false, m, calledArgTy) + None, Expr.Quote(callerArgExpr, ref None, false, m, calledArgTy) | ReflectedArgInfo.None -> failwith "unreachable" // unreachable due to reflArgInfo.AutoQuote condition // Note: out args do not need to be coerced elif isOutArg then - callerArgExpr + None, callerArgExpr // Note: not all these casts are reported in quotations else - mkCoerceIfNeeded cenv.g calledArgTy callerArgTy callerArgExpr + None, mkCoerceIfNeeded cenv.g calledArgTy callerArgTy callerArgExpr - // Handle optional arguments - let optArgPreBinder, allArgs, outArgExprs, outArgTmpBinds = + // Handle param array and optional arguments + let optArgPreBinder, paramArrayPreBinders, allArgs, outArgExprs, outArgTmpBinds = let normalUnnamedArgs = (finalUnnamedCalledArgs, finalUnnamedCallerArgs) ||> List.map2 (fun called caller -> { NamedArgIdOpt = None; CalledArg=called; CallerArg=caller }) - let paramArrayArgs = - match finalCalledMeth.ParamArrayCalledArgOpt with - | None -> [] - | Some paramArrayCalledArg -> - let paramArrayCalledArgElementType = destArrayTy cenv.g paramArrayCalledArg.CalledArgumentType - - let es = - finalParamArrayCallerArgs |> List.map (fun callerArg -> - let (CallerArg(callerArgTy, m, isOutArg, callerArgExpr)) = callerArg - coerceExpr isOutArg paramArrayCalledArgElementType paramArrayCalledArg.ReflArgInfo callerArgTy m callerArgExpr) - - [ { NamedArgIdOpt = None; CalledArg=paramArrayCalledArg; CallerArg=CallerArg(paramArrayCalledArg.CalledArgumentType, mMethExpr, false, Expr.Op(TOp.Array, [paramArrayCalledArgElementType], es , mMethExpr)) } ] + let paramArrayPreBinders, paramArrayArgs = + match finalCalledMeth.ParamArrayCalledArgOpt with + | None -> + [], [] + | Some paramArrayCalledArg -> + let paramArrayCalledArgElementType = destArrayTy cenv.g paramArrayCalledArg.CalledArgumentType + + let paramArrayPreBinders, es = + finalParamArrayCallerArgs + |> List.map (fun callerArg -> + let (CallerArg(callerArgTy, m, isOutArg, callerArgExpr)) = callerArg + coerceExpr isOutArg paramArrayCalledArgElementType paramArrayCalledArg.ReflArgInfo callerArgTy m callerArgExpr) + |> List.unzip + + let arg = + [ { NamedArgIdOpt = None + CalledArg=paramArrayCalledArg + CallerArg=CallerArg(paramArrayCalledArg.CalledArgumentType, mMethExpr, false, Expr.Op(TOp.Array, [paramArrayCalledArgElementType], es , mMethExpr)) } ] + paramArrayPreBinders, arg // CLEANUP: Move all this code into some isolated file, e.g. "optional.fs" // @@ -9787,7 +9921,7 @@ and TcMethodApplication | ByrefTy cenv.g inst -> build inst (PassByRef(inst, currDfltVal)) | _ -> - match calledArg.CallerInfoInfo, env.eCallerMemberName with + match calledArg.CallerInfo, env.eCallerMemberName with | CallerLineNumber, _ when typeEquiv cenv.g currCalledArgTy cenv.g.int_ty -> emptyPreBinder, Expr.Const(Const.Int32(mMethExpr.StartLine), mMethExpr, currCalledArgTy) | CallerFilePath, _ when typeEquiv cenv.g currCalledArgTy cenv.g.string_ty -> @@ -9816,7 +9950,7 @@ and TcMethodApplication | PassByRef (ty, dfltVal2) -> let v, _ = mkCompGenLocal mMethExpr "defaultByrefArg" ty let wrapper2, rhs = build currCalledArgTy dfltVal2 - (wrapper2 >> mkCompGenLet mMethExpr v rhs), mkValAddr mMethExpr (mkLocalValRef v) + (wrapper2 >> mkCompGenLet mMethExpr v rhs), mkValAddr mMethExpr false (mkLocalValRef v) build calledArgTy dfltVal | CalleeSide -> let calledNonOptTy = @@ -9825,7 +9959,7 @@ and TcMethodApplication else calledArgTy // should be unreachable - match calledArg.CallerInfoInfo, env.eCallerMemberName with + match calledArg.CallerInfo, env.eCallerMemberName with | CallerLineNumber, _ when typeEquiv cenv.g calledNonOptTy cenv.g.int_ty -> let lineExpr = Expr.Const(Const.Int32(mMethExpr.StartLine), mMethExpr, calledNonOptTy) emptyPreBinder, mkUnionCaseExpr(mkSomeCase cenv.g, [calledNonOptTy], [lineExpr], mMethExpr) @@ -9881,9 +10015,9 @@ and TcMethodApplication finalUnnamedCalledOutArgs |> List.map (fun calledArg -> let calledArgTy = calledArg.CalledArgumentType let outArgTy = destByrefTy cenv.g calledArgTy - let outv, outArgExpr = mkMutableCompGenLocal mMethExpr "outArg" outArgTy // mutable! + let outv, outArgExpr = mkMutableCompGenLocal mMethExpr PrettyNaming.outArgCompilerGeneratedName outArgTy // mutable! let expr = mkDefault(mMethExpr, outArgTy) - let callerArg = CallerArg(calledArgTy, mMethExpr, false, mkValAddr mMethExpr (mkLocalValRef outv)) + let callerArg = CallerArg(calledArgTy, mMethExpr, false, mkValAddr mMethExpr false (mkLocalValRef outv)) let outArg = { NamedArgIdOpt=None;CalledArg=calledArg;CallerArg=callerArg } (outArg, outArgExpr), mkCompGenBind outv expr) |> List.unzip @@ -9900,7 +10034,7 @@ and TcMethodApplication let allArgs = allArgs |> List.sortBy (fun x -> x.Position) - optArgPreBinder, allArgs, outArgExprs, outArgTmpBinds + optArgPreBinder, paramArrayPreBinders, allArgs, outArgExprs, outArgTmpBinds let coerce (assignedArg: AssignedCalledArg<_>) = let isOutArg = assignedArg.CalledArg.IsOutArg @@ -9918,13 +10052,21 @@ and TcMethodApplication let item = Item.ArgName (defaultArg assignedArg.CalledArg.NameOpt id, assignedArg.CalledArg.CalledArgumentType, Some(ArgumentContainer.Method(finalCalledMethInfo))) CallNameResolutionSink cenv.tcSink (id.idRange, env.NameEnv, item, item, emptyTyparInst, ItemOccurence.Use, env.DisplayEnv, ad)) - let allArgsCoerced = List.map coerce allArgs - + let allArgsPreBinders, allArgsCoerced = List.map coerce allArgs |> List.unzip // Make the call expression let expr, exprty = BuildPossiblyConditionalMethodCall cenv env mut mMethExpr isProp finalCalledMethInfo isSuperInit finalCalledMethInst objArgs allArgsCoerced + // Handle byref returns + let expr = + // byref-typed returns get implicitly dereferenced + let vty = tyOfExpr cenv.g expr + if isByrefTy cenv.g vty then + let v, _ = mkCompGenLocal mMethExpr "byrefReturn" vty + mkCompGenLet mMethExpr v expr (mkAddrGet mMethExpr (mkLocalValRef v)) + else + expr // Bind "out" parameters as part of the result tuple let expr, exprty = @@ -9937,51 +10079,54 @@ and TcMethodApplication expr, tyOfExpr cenv.g expr // Handle post-hoc property assignments - let expr = - if isCheckingAttributeCall then expr else - if isNil finalAssignedItemSetters then expr else + let setterExprPrebinders, expr = + if isCheckingAttributeCall then + [], expr + elif isNil finalAssignedItemSetters then + [], expr + else // This holds the result of the call let objv, objExpr = mkMutableCompGenLocal mMethExpr "returnVal" exprty // mutable in case it's a struct // This expression mutates the properties on the result of the call - let propSetExpr = - (mkUnit cenv.g mMethExpr, finalAssignedItemSetters) ||> List.fold (fun acc (AssignedItemSetter(id, setter, CallerArg(callerArgTy, m, isOptCallerArg, argExpr))) -> + let setterExprPrebinders, propSetExpr = + (mkUnit cenv.g mMethExpr, finalAssignedItemSetters) ||> List.mapFold (fun acc (AssignedItemSetter(id, setter, CallerArg(callerArgTy, m, isOptCallerArg, argExpr))) -> if isOptCallerArg then error(Error(FSComp.SR.tcInvalidOptionalAssignmentToPropertyOrField(), m)) - let action, defnItem = + let argExprPrebinder, action, defnItem = match setter with | AssignedPropSetter (pinfo, pminfo, pminst) -> MethInfoChecks cenv.g cenv.amap true None [objExpr] ad m pminfo let calledArgTy = List.head (List.head (pminfo.GetParamTypes(cenv.amap, m, pminst))) - let argExpr = coerceExpr false calledArgTy ReflectedArgInfo.None callerArgTy m argExpr + let argExprPrebinder, argExpr = coerceExpr false calledArgTy ReflectedArgInfo.None callerArgTy m argExpr let mut = (if isStructTy cenv.g (tyOfExpr cenv.g objExpr) then DefinitelyMutates else PossiblyMutates) let action = BuildPossiblyConditionalMethodCall cenv env mut m true pminfo NormalValUse pminst [objExpr] [argExpr] |> fst - action, Item.Property (pinfo.PropertyName, [pinfo]) + argExprPrebinder, action, Item.Property (pinfo.PropertyName, [pinfo]) | AssignedILFieldSetter finfo -> // Get or set instance IL field ILFieldInstanceChecks cenv.g cenv.amap ad m finfo let calledArgTy = finfo.FieldType (cenv.amap, m) - let argExpr = coerceExpr false calledArgTy ReflectedArgInfo.None callerArgTy m argExpr + let argExprPrebinder, argExpr = coerceExpr false calledArgTy ReflectedArgInfo.None callerArgTy m argExpr let action = BuildILFieldSet cenv.g m objExpr finfo argExpr - action, Item.ILField finfo + argExprPrebinder, action, Item.ILField finfo | AssignedRecdFieldSetter rfinfo -> RecdFieldInstanceChecks cenv.g cenv.amap ad m rfinfo let calledArgTy = rfinfo.FieldType CheckRecdFieldMutation m denv rfinfo - let argExpr = coerceExpr false calledArgTy ReflectedArgInfo.None callerArgTy m argExpr + let argExprPrebinder, argExpr = coerceExpr false calledArgTy ReflectedArgInfo.None callerArgTy m argExpr let action = BuildRecdFieldSet cenv.g m objExpr rfinfo argExpr - action, Item.RecdField rfinfo + argExprPrebinder, action, Item.RecdField rfinfo // Record the resolution for the Language Service let item = Item.SetterArg (id, defnItem) CallNameResolutionSink cenv.tcSink (id.idRange, env.NameEnv, item, item, emptyTyparInst, ItemOccurence.Use, env.DisplayEnv, ad) - mkCompGenSequential m acc action) + argExprPrebinder, mkCompGenSequential m acc action) // now put them together let expr = mkCompGenLet mMethExpr objv expr (mkCompGenSequential mMethExpr propSetExpr objExpr) - expr + setterExprPrebinders, expr // Build the lambda expression if any let expr = @@ -10007,6 +10152,10 @@ and TcMethodApplication expr, tpenv // Apply the PreBinders, if any + let expr = (expr, setterExprPrebinders) ||> List.fold (fun expr argPreBinder -> match argPreBinder with None -> expr | Some f -> f expr) + let expr = (expr, paramArrayPreBinders) ||> List.fold (fun expr argPreBinder -> match argPreBinder with None -> expr | Some f -> f expr) + let expr = (expr, allArgsPreBinders) ||> List.fold (fun expr argPreBinder -> match argPreBinder with None -> expr | Some f -> f expr) + let expr = optArgPreBinder expr let expr = objArgPreBinder expr @@ -10060,16 +10209,18 @@ and TcMethodArg cenv env (lambdaPropagationInfo, tpenv) (lambdaPropagationInfo // The loop variable callerLambdaTyOpt becomes None if something failed. let rec loop callerLambdaTy lambdaVarNum = if lambdaVarNum < numLambdaVars then - let col = [ for row in prefixOfLambdaArgsForEachOverload -> row.[lambdaVarNum] ] - // Check if all the rows give the same argument type - if col |> ListSet.setify (typeEquiv cenv.g) |> isSingleton then - let calledLambdaArgTy = col.[0] - // Force the caller to be a function type. + let calledLambdaArgTy = prefixOfLambdaArgsForEachOverload.[0].[lambdaVarNum] + let allRowsGiveSameArgumentType = + prefixOfLambdaArgsForEachOverload + |> Array.forall (fun row -> typeEquiv cenv.g calledLambdaArgTy row.[lambdaVarNum]) + + if allRowsGiveSameArgumentType then + // Force the caller to be a function type. match UnifyFunctionTypeUndoIfFailed cenv env.DisplayEnv mArg callerLambdaTy with - | Some (callerLambdaDomainTy, callerLambdaRangeTy) -> + | ValueSome (callerLambdaDomainTy, callerLambdaRangeTy) -> if AddCxTypeEqualsTypeUndoIfFailed env.DisplayEnv cenv.css mArg calledLambdaArgTy callerLambdaDomainTy then loop callerLambdaRangeTy (lambdaVarNum + 1) - | None -> () + | _ -> () loop argTy 0 let e', tpenv = TcExpr cenv argTy env tpenv argExpr @@ -10158,10 +10309,10 @@ and TcLinearExprs bodyChecker cenv env overallTy tpenv isCompExpr expr cont = cont (bodyChecker overallTy env tpenv expr) /// Typecheck and compile pattern-matching constructs -and TcAndPatternCompileMatchClauses mExpr matchm actionOnFailure cenv inputTy resultTy env tpenv clauses = - let tclauses, tpenv = TcMatchClauses cenv inputTy resultTy env tpenv clauses - let v, expr = CompilePatternForMatchClauses cenv env mExpr matchm true actionOnFailure inputTy resultTy tclauses - v, expr, tpenv +and TcAndPatternCompileMatchClauses mExpr matchm actionOnFailure cenv inputExprOpt inputTy resultTy env tpenv synClauses = + let clauses, tpenv = TcMatchClauses cenv inputTy resultTy env tpenv synClauses + let matchVal, expr = CompilePatternForMatchClauses cenv env mExpr matchm true actionOnFailure inputExprOpt inputTy resultTy clauses + matchVal, expr, tpenv and TcMatchPattern cenv inputTy env tpenv (pat:SynPat, optWhenExpr) = let m = pat.Range @@ -10213,8 +10364,8 @@ and TcAndBuildFixedExpr cenv env (overallPatTy, fixedExpr, overallExprTy, mBindi match stripExpr fixedExpr with | Expr.Op (op, tyargs, args, _) -> match op, tyargs, args with - | TOp.ValFieldGetAddr rfref, _, [_] -> not rfref.Tycon.IsStructOrEnumTycon - | TOp.ILAsm ([ I_ldflda (fspec)], _), _, _ -> fspec.EnclosingType.Boxity = ILBoxity.AsObject + | TOp.ValFieldGetAddr (rfref, _), _, [_] -> not rfref.Tycon.IsStructOrEnumTycon + | TOp.ILAsm ([ I_ldflda (fspec)], _), _, _ -> fspec.DeclaringType.Boxity = ILBoxity.AsObject | TOp.ILAsm ([ I_ldelema _], _), _, _ -> true | TOp.RefAddrGet _, _, _ -> true | _ -> false @@ -10262,7 +10413,7 @@ and TcAndBuildFixedExpr cenv env (overallPatTy, fixedExpr, overallExprTy, mBindi // mkCompGenLetIn mBinding "tmpArray" overallExprTy fixedExpr (fun (_, ve) -> // This is &arr.[0] - let elemZeroAddress = mkArrayElemAddress cenv.g (ILReadonly.NormalAddress, false, ILArrayShape.SingleDimensional, elemTy, ve, mkInt32 cenv.g mBinding 0, mBinding) + let elemZeroAddress = mkArrayElemAddress cenv.g (false, ILReadonly.NormalAddress, false, ILArrayShape.SingleDimensional, elemTy, [ve; mkInt32 cenv.g mBinding 0], mBinding) // check for non-null and non-empty let zero = mkConvToNativeInt cenv.g (mkInt32 cenv.g mBinding 0) mBinding // This is arr.Length @@ -10410,7 +10561,7 @@ and TcNormalizedBinding declKind (cenv:cenv) env tpenv overallTy safeThisValOpt let item = Item.ActivePatternResult(apinfo, cenv.g.unit_ty, i, tagRange) CallNameResolutionSink cenv.tcSink (tagRange, env.NameEnv, item, item, emptyTyparInst, ItemOccurence.Binding, env.DisplayEnv, env.eAccessRights)) - ModifyNameResEnv (fun nenv -> AddActivePatternResultTagsToNameEnv apinfo nenv ty m) envinner + { envinner with eNameResEnv = AddActivePatternResultTagsToNameEnv apinfo envinner.eNameResEnv ty m } | None -> envinner @@ -10432,7 +10583,7 @@ and TcNormalizedBinding declKind (cenv:cenv) env tpenv overallTy safeThisValOpt else TcExprThatCantBeCtorBody cenv overallExprTy envinner tpenv rhsExpr) if bkind = StandaloneExpression && not cenv.isScript then - UnifyUnitType cenv env.DisplayEnv mBinding overallPatTy (Some rhsExprChecked) |> ignore + UnifyUnitType cenv env mBinding overallPatTy rhsExprChecked |> ignore // Fix up the r.h.s. expression for 'fixed' let rhsExprChecked = @@ -10607,6 +10758,7 @@ and TcAttribute canFail cenv (env: TcEnv) attrTgt (synAttr: SynAttribute) = | Exception _ when canFail -> [ ], true | res -> let item = ForceRaise res + if not (ExistsHeadTypeInEntireHierarchy cenv.g cenv.amap mAttr ty cenv.g.tcref_System_Attribute) then warning(Error(FSComp.SR.tcTypeDoesNotInheritAttribute(), mAttr)) let attrib = match item with | Item.CtorGroup(methodName, minfos) -> @@ -10624,13 +10776,13 @@ and TcAttribute canFail cenv (env: TcEnv) attrTgt (synAttr: SynAttribute) = attributeAssignedNamedItems |> List.map (fun (CallerNamedArg(id, CallerArg(argtyv, m, isOpt, callerArgExpr))) -> if isOpt then error(Error(FSComp.SR.tcOptionalArgumentsCannotBeUsedInCustomAttribute(), m)) let m = callerArgExpr.Range - let setterItem, _ = ResolveLongIdentInType cenv.tcSink cenv.nameResolver env.NameEnv LookupKind.Expr m ad [id] IgnoreOverrides TypeNameResolutionInfo.Default ty + let setterItem, _ = ResolveLongIdentInType cenv.tcSink cenv.nameResolver env.NameEnv LookupKind.Expr m ad id IgnoreOverrides TypeNameResolutionInfo.Default ty let nm, isProp, argty = match setterItem with | Item.Property (_, [pinfo]) -> if not pinfo.HasSetter then errorR(Error(FSComp.SR.tcPropertyCannotBeSet0(), m)) - id.idText, true, pinfo.GetPropertyType(cenv.amap, m) + id.idText, true, pinfo.GetPropertyType(cenv.amap, m) | Item.ILField finfo -> CheckILFieldInfoAccessible cenv.g cenv.amap m ad finfo CheckILFieldAttributes cenv.g finfo m @@ -10705,16 +10857,16 @@ and TcAttributes cenv env attrTgt synAttribs = // TcLetBinding //------------------------------------------------------------------------ -and TcLetBinding cenv isUse env containerInfo declKind tpenv (binds, bindsm, scopem) = +and TcLetBinding cenv isUse env containerInfo declKind tpenv (synBinds, synBindsRange, scopem) = // Typecheck all the bindings... - let binds', tpenv = List.mapFold (fun tpenv b -> TcNonRecursiveBinding declKind cenv env tpenv (NewInferenceType ()) b) tpenv binds + let checkedBinds, tpenv = List.mapFold (fun tpenv b -> TcNonRecursiveBinding declKind cenv env tpenv (NewInferenceType ()) b) tpenv synBinds let (ContainerInfo(altActualParent, _)) = containerInfo // Canonicalize constraints prior to generalization let denv = env.DisplayEnv - GeneralizationHelpers.CanonicalizePartialInferenceProblem (cenv, denv, bindsm) - (binds' |> List.collect (fun tbinfo -> + GeneralizationHelpers.CanonicalizePartialInferenceProblem (cenv, denv, synBindsRange) + (checkedBinds |> List.collect (fun tbinfo -> let (CheckedBindingInfo(_, _, _, _, flex, _, _, _, tauTy, _, _, _, _, _)) = tbinfo let (ExplicitTyparInfo(_, declaredTypars, _)) = flex let maxInferredTypars = (freeInTypeLeftToRight cenv.g false tauTy) @@ -10723,7 +10875,7 @@ and TcLetBinding cenv isUse env containerInfo declKind tpenv (binds, bindsm, sco let lazyFreeInEnv = lazy (GeneralizationHelpers.ComputeUngeneralizableTypars env) // Generalize the bindings... - (((fun x -> x), env, tpenv), binds') ||> List.fold (fun (mkf_sofar, env, tpenv) tbinfo -> + (((fun x -> x), env, tpenv), checkedBinds) ||> List.fold (fun (buildExpr, env, tpenv) tbinfo -> let (CheckedBindingInfo(inlineFlag, attrs, doc, tcPatPhase2, flex, nameToPrelimValSchemeMap, rhsExpr, _, tauTy, m, spBind, _, konst, isFixed)) = tbinfo let enclosingDeclaredTypars = [] let (ExplicitTyparInfo(_, declaredTypars, canInferTypars)) = flex @@ -10749,66 +10901,74 @@ and TcLetBinding cenv isUse env containerInfo declKind tpenv (binds, bindsm, sco let tpenv = HideUnscopedTypars generalizedTypars tpenv let valSchemes = NameMap.map (UseCombinedArity cenv.g declKind rhsExpr) prelimValSchemes2 let values = MakeAndPublishVals cenv env (altActualParent, false, declKind, ValNotInRecScope, valSchemes, attrs, doc, konst) - let pat' = tcPatPhase2 (TcPatPhase2Input (values, true)) + let checkedPat = tcPatPhase2 (TcPatPhase2Input (values, true)) let prelimRecValues = NameMap.map fst values // Now bind the r.h.s. to the l.h.s. let rhsExpr = mkTypeLambda m generalizedTypars (rhsExpr, tauTy) - match pat' with + match checkedPat with // Don't introduce temporary or 'let' for 'match against wild' or 'match against unit' | (TPat_wild _ | TPat_const (Const.Unit, _)) when not isUse && not isFixed && isNil generalizedTypars -> - let mk_seq_bind (tm, tmty) = (mkSequential SequencePointsAtSeq m rhsExpr tm, tmty) - (mk_seq_bind << mkf_sofar, env, tpenv) + let mkSequentialBind (tm, tmty) = (mkSequential SequencePointsAtSeq m rhsExpr tm, tmty) + (buildExpr >> mkSequentialBind , env, tpenv) | _ -> // nice: don't introduce awful temporary for r.h.s. in the 99% case where we know what we're binding it to - let tmp, pat'' = - match pat' with - // nice: don't introduce awful temporary for r.h.s. in the 99% case where we know what we're binding it to - | TPat_as (pat1, PBind(v, TypeScheme(generalizedTypars', _)), _) - when List.lengthsEqAndForall2 typarRefEq generalizedTypars generalizedTypars' -> + let patternInputTmp, checkedPat2 = + match checkedPat with + // nice: don't introduce awful temporary for r.h.s. in the 99% case where we know what we're binding it to + | TPat_as (pat, PBind(v, TypeScheme(generalizedTypars', _)), _) + when List.lengthsEqAndForall2 typarRefEq generalizedTypars generalizedTypars' -> - v, pat1 + v, pat + //Op (LValueOp (LByrefGet,x),[],[],C:\GitHub\dsyme\visualfsharp\a.fs (15,42--15,43) IsSynthetic=false) - | _ when inlineFlag.MustInline -> error(Error(FSComp.SR.tcInvalidInlineSpecification(), m)) + | _ when inlineFlag.MustInline -> + error(Error(FSComp.SR.tcInvalidInlineSpecification(), m)) - | _ -> - let tmp, _ = mkCompGenLocal m "patternInput" (generalizedTypars +-> tauTy) - if isUse || isFixed then - errorR(Error(FSComp.SR.tcInvalidUseBinding(), m)) + | _ -> + + let tmp, _ = mkCompGenLocal m "patternInput" (generalizedTypars +-> tauTy) + + if isUse || isFixed then + errorR(Error(FSComp.SR.tcInvalidUseBinding(), m)) - // This assignment forces representation as module value, to maintain the invariant from the - // type checker that anything related to binding module-level values is marked with an - // val_repr_info, val_actual_parent and is_topbind - if (DeclKind.MustHaveArity declKind) then - AdjustValToTopVal tmp altActualParent (InferArityOfExprBinding cenv.g AllowTypeDirectedDetupling.Yes tmp rhsExpr) - tmp, pat' + // If the overall declaration is declaring statics or a module value, then force the patternInputTmp to also + // have representation as module value. + if (DeclKind.MustHaveArity declKind) then + AdjustValToTopVal tmp altActualParent (InferArityOfExprBinding cenv.g AllowTypeDirectedDetupling.Yes tmp rhsExpr) + + tmp, checkedPat + // Add the bind "let patternInputTmp = rhsExpr" to the bodyExpr we get from mkPatBind let mkRhsBind (bodyExpr, bodyExprTy) = - let letExpr = mkLet spBind m tmp rhsExpr bodyExpr + let letExpr = mkLet spBind m patternInputTmp rhsExpr bodyExpr letExpr, bodyExprTy let allValsDefinedByPattern = NameMap.range prelimRecValues + + // Add the compilation of the pattern to the bodyExpr we get from mkCleanup let mkPatBind (bodyExpr, bodyExprTy) = - let valsDefinedByMatching = ListSet.remove valEq tmp allValsDefinedByPattern - let matchx = CompilePatternForMatch cenv env m m true ThrowIncompleteMatchException (tmp, generalizedTypars) [TClause(pat'', None, TTarget(valsDefinedByMatching, bodyExpr, SuppressSequencePointAtTarget), m)] tauTy bodyExprTy + let valsDefinedByMatching = ListSet.remove valEq patternInputTmp allValsDefinedByPattern + let matchx = CompilePatternForMatch cenv env m m true ThrowIncompleteMatchException (patternInputTmp, generalizedTypars, Some rhsExpr) [TClause(checkedPat2, None, TTarget(valsDefinedByMatching, bodyExpr, SuppressSequencePointAtTarget), m)] tauTy bodyExprTy let matchx = if (DeclKind.ConvertToLinearBindings declKind) then LinearizeTopMatch cenv.g altActualParent matchx else matchx matchx, bodyExprTy + // Add the dispose of any "use x = ..." to bodyExpr let mkCleanup (bodyExpr, bodyExprTy) = if isUse && not isFixed then (allValsDefinedByPattern, (bodyExpr, bodyExprTy)) ||> List.foldBack (fun v (bodyExpr, bodyExprTy) -> - AddCxTypeMustSubsumeType ContextInfo.NoContext denv cenv.css v.Range NoTrace cenv.g.system_IDisposable_typ v.Type + AddCxTypeMustSubsumeType ContextInfo.NoContext denv cenv.css v.Range NoTrace cenv.g.system_IDisposable_ty v.Type let cleanupE = BuildDisposableCleanup cenv env m v mkTryFinally cenv.g (bodyExpr, cleanupE, m, bodyExprTy, SequencePointInBodyOfTry, NoSequencePointAtFinally), bodyExprTy) else (bodyExpr, bodyExprTy) - - ((mkf_sofar >> mkCleanup >> mkPatBind >> mkRhsBind), - AddLocalValMap cenv.tcSink scopem prelimRecValues env, - tpenv)) + + let envInner = AddLocalValMap cenv.tcSink scopem prelimRecValues env + + ((buildExpr >> mkCleanup >> mkPatBind >> mkRhsBind), envInner, tpenv)) /// Return binds corresponding to the linearised let-bindings. /// This reveals the bound items, e.g. when the lets occur in incremental object defns. @@ -10895,7 +11055,12 @@ and ApplyAbstractSlotInference (cenv:cenv) (envinner:TcEnv) (bindingTy, m, synTy if memberFlags.IsOverrideOrExplicitImpl then // for error detection, we want to compare finality when testing for equivalence - let makeUniqueBySig meths = meths |> ListSet.setify (MethInfosEquivByNameAndSig EraseNone false cenv.g cenv.amap m) + let methInfosEquivByNameAndSig meths = + match meths with + | [] -> false + | head :: tail -> + tail |> List.forall (MethInfosEquivByNameAndSig EraseNone false cenv.g cenv.amap m head) + match memberFlags.MemberKind with | MemberKind.Member -> let dispatchSlots, dispatchSlotsArityMatch = @@ -10909,11 +11074,11 @@ and ApplyAbstractSlotInference (cenv:cenv) (envinner:TcEnv) (bindingTy, m, synTy | slots -> match dispatchSlotsArityMatch with - | meths when meths |> makeUniqueBySig |> isSingleton -> meths + | meths when methInfosEquivByNameAndSig meths -> meths | [] -> let details = slots - |> List.map (NicePrint.stringOfMethInfo cenv.amap m envinner.DisplayEnv) + |> Seq.map (NicePrint.stringOfMethInfo cenv.amap m envinner.DisplayEnv) |> Seq.map (sprintf "%s %s" System.Environment.NewLine) |> String.concat "" @@ -10950,7 +11115,7 @@ and ApplyAbstractSlotInference (cenv:cenv) (envinner:TcEnv) (bindingTy, m, synTy let optInferredImplSlotTys = match optIntfSlotTy with | Some (x, _) -> [x] - | None -> uniqueAbstractMethSigs |> List.map (fun x -> x.EnclosingType) + | None -> uniqueAbstractMethSigs |> List.map (fun x -> x.ApparentEnclosingType) optInferredImplSlotTys, declaredTypars @@ -11012,7 +11177,7 @@ and ApplyAbstractSlotInference (cenv:cenv) (envinner:TcEnv) (bindingTy, m, synTy let optInferredImplSlotTys = match optIntfSlotTy with | Some (x, _) -> [ x ] - | None -> uniqueAbstractPropSigs |> List.map (fun pinfo -> pinfo.EnclosingType) + | None -> uniqueAbstractPropSigs |> List.map (fun pinfo -> pinfo.ApparentEnclosingType) optInferredImplSlotTys, declaredTypars @@ -11059,7 +11224,7 @@ and AnalyzeRecursiveStaticMemberOrValDecl (cenv, envinner: TcEnv, tpenv, declKin let isExtrinsic = (declKind = ExtrinsicExtensionBinding) let _, enclosingDeclaredTypars, _, objTy, thisTy = FreshenObjectArgType cenv mBinding TyparRigidity.WillBeRigid tcref isExtrinsic declaredTyconTypars let envinner = AddDeclaredTypars CheckForDuplicateTypars enclosingDeclaredTypars envinner - let envinner = MakeInnerEnvForTyconRef cenv envinner tcref isExtrinsic + let envinner = MakeInnerEnvForTyconRef envinner tcref isExtrinsic let safeThisValOpt, baseValOpt = match memberFlags.MemberKind with @@ -11127,7 +11292,7 @@ and AnalyzeRecursiveInstanceMemberDecl (cenv, envinner: TcEnv, tpenv, declKind, let envinner = AddDeclaredTypars CheckForDuplicateTypars enclosingDeclaredTypars envinner // If private, the member's accessibility is related to 'tcref' - let envinner = MakeInnerEnvForTyconRef cenv envinner tcref isExtrinsic + let envinner = MakeInnerEnvForTyconRef envinner tcref isExtrinsic let baseValOpt = if tcref.IsFSharpObjectModelTycon then baseValOpt else None @@ -11253,7 +11418,7 @@ and AnalyzeAndMakeAndPublishRecursiveValue overridesOK isGeneratedEventVal cenv let prelimTyscheme = TypeScheme(enclosingDeclaredTypars@declaredTypars, ty) let partialValReprInfo = TranslateTopValSynInfo mBinding (TcAttributes cenv envinner) valSynInfo let topValInfo = UseSyntacticArity declKind prelimTyscheme partialValReprInfo - let hasDeclaredTypars = declaredTypars.Length > 0 + let hasDeclaredTypars = not (List.isEmpty declaredTypars) let prelimValScheme = ValScheme(bindingId, prelimTyscheme, topValInfo, memberInfoOpt, false, inlineFlag, NormalVal, vis, false, false, false, hasDeclaredTypars) // Check the literal r.h.s., if any @@ -11356,7 +11521,7 @@ and TcLetrecBinding let envRec = Option.foldBack (AddLocalVal cenv.tcSink scopem) safeThisValOpt envRec // Members can access protected members of parents of the type, and private members in the type - let envRec = MakeInnerEnvForMember cenv envRec vspec + let envRec = MakeInnerEnvForMember envRec vspec let checkedBind, tpenv = TcNormalizedBinding declKind cenv envRec tpenv tau safeThisValOpt safeInitInfo (enclosingDeclaredTypars, flex) rbind.SyntacticBinding @@ -11439,10 +11604,10 @@ and TcIncrementalLetRecGeneralization cenv scopem // pathological situations let freeInUncheckedRecBinds = lazy ((emptyFreeTyvars, cenv.recUses.Contents) ||> Map.fold (fun acc vStamp _ -> - if uncheckedRecBindsTable.ContainsKey vStamp then - let fwdBind = uncheckedRecBindsTable.[vStamp] - accFreeInType CollectAllNoCaching fwdBind.RecBindingInfo.Val.Type acc - else + match uncheckedRecBindsTable.TryGetValue vStamp with + | true, fwdBind -> + accFreeInType CollectAllNoCaching fwdBind.RecBindingInfo.Val.Type acc + | _ -> acc)) let rec loop (preGeneralizationRecBinds: PreGeneralizationRecursiveBinding list, @@ -11898,12 +12063,12 @@ module TcRecdUnionAndEnumDeclarations = begin | ParentNone -> vis | Parent tcref -> combineAccess vis tcref.TypeReprAccessibility - let MakeRecdFieldSpec _cenv env parent (isStatic, konst, ty', attrsForProperty, attrsForField, id, isMutable, vol, xmldoc, vis, m) = + let MakeRecdFieldSpec _cenv env parent (isStatic, konst, ty', attrsForProperty, attrsForField, id, nameGenerated, isMutable, vol, xmldoc, vis, m) = let vis, _ = ComputeAccessAndCompPath env None m vis None parent let vis = CombineReprAccess parent vis - NewRecdField isStatic konst id ty' isMutable vol attrsForProperty attrsForField xmldoc vis false + NewRecdField isStatic konst id nameGenerated ty' isMutable vol attrsForProperty attrsForField xmldoc vis false - let TcFieldDecl cenv env parent isIncrClass tpenv (isStatic, synAttrs, id, ty, isMutable, xmldoc, vis, m) = + let TcFieldDecl cenv env parent isIncrClass tpenv (isStatic, synAttrs, id, nameGenerated, ty, isMutable, xmldoc, vis, m) = let attrs, _ = TcAttributesWithPossibleTargets false cenv env AttributeTargets.FieldDecl synAttrs let attrsForProperty, attrsForField = attrs |> List.partition (fun (attrTargets, _) -> (attrTargets &&& AttributeTargets.Property) <> enum 0) let attrsForProperty = (List.map snd attrsForProperty) @@ -11922,7 +12087,7 @@ module TcRecdUnionAndEnumDeclarations = begin if isIncrClass && (not zeroInit || not isMutable) then errorR(Error(FSComp.SR.tcUninitializedValFieldsMustBeMutable(), m)) if isStatic && (not zeroInit || not isMutable || vis <> Some SynAccess.Private ) then errorR(Error(FSComp.SR.tcStaticValFieldsMustBeMutableAndPrivate(), m)) let konst = if zeroInit then Some Const.Zero else None - let rfspec = MakeRecdFieldSpec cenv env parent (isStatic, konst, ty', attrsForProperty, attrsForField, id, isMutable, isVolatile, xmldoc, vis, m) + let rfspec = MakeRecdFieldSpec cenv env parent (isStatic, konst, ty', attrsForProperty, attrsForField, id, nameGenerated, isMutable, isVolatile, xmldoc, vis, m) match parent with | Parent tcref when useGenuineField tcref.Deref rfspec -> // Recheck the attributes for errors if the definition only generates a field @@ -11933,7 +12098,7 @@ module TcRecdUnionAndEnumDeclarations = begin let TcAnonFieldDecl cenv env parent tpenv nm (Field(attribs, isStatic, idOpt, ty, isMutable, xmldoc, vis, m)) = let id = (match idOpt with None -> mkSynId m nm | Some id -> id) - let f = TcFieldDecl cenv env parent false tpenv (isStatic, attribs, id, ty, isMutable, xmldoc.ToXmlDoc(), vis, m) + let f = TcFieldDecl cenv env parent false tpenv (isStatic, attribs, id, idOpt.IsNone, ty, isMutable, xmldoc.ToXmlDoc(), vis, m) match idOpt with | None -> () | Some id -> @@ -11945,7 +12110,7 @@ module TcRecdUnionAndEnumDeclarations = begin let TcNamedFieldDecl cenv env parent isIncrClass tpenv (Field(attribs, isStatic, id, ty, isMutable, xmldoc, vis, m)) = match id with | None -> error (Error(FSComp.SR.tcFieldRequiresName(), m)) - | Some(id) -> TcFieldDecl cenv env parent isIncrClass tpenv (isStatic, attribs, id, ty, isMutable, xmldoc.ToXmlDoc(), vis, m) + | Some(id) -> TcFieldDecl cenv env parent isIncrClass tpenv (isStatic, attribs, id, false, ty, isMutable, xmldoc.ToXmlDoc(), vis, m) let TcNamedFieldDecls cenv env parent isIncrClass tpenv fields = fields |> List.map (TcNamedFieldDecl cenv env parent isIncrClass tpenv) @@ -12000,15 +12165,15 @@ module TcRecdUnionAndEnumDeclarations = begin rfields, thisTy | UnionCaseFullType (ty, arity) -> let ty', _ = TcTypeAndRecover cenv NoNewTypars CheckCxs ItemOccurence.UseInType env tpenv ty - let argtysl, recordTy = GetTopTauTypeInFSharpForm cenv.g (arity |> TranslateTopValSynInfo m (TcAttributes cenv env) |> TranslatePartialArity []).ArgInfos ty' m - if argtysl.Length > 1 then + let curriedArgTys, recordTy = GetTopTauTypeInFSharpForm cenv.g (arity |> TranslateTopValSynInfo m (TcAttributes cenv env) |> TranslatePartialArity []).ArgInfos ty' m + if curriedArgTys.Length > 1 then errorR(Error(FSComp.SR.tcIllegalFormForExplicitTypeDeclaration(), m)) - let argtys = argtysl |> List.concat - let nFields = argtys.Length + let argTys = curriedArgTys |> List.concat + let nFields = argTys.Length let rfields = - argtys |> List.mapi (fun i (argty, argInfo) -> + argTys |> List.mapi (fun i (argty, argInfo) -> let id = (match argInfo.Name with Some id -> id | None -> mkSynId m (mkName nFields i)) - MakeRecdFieldSpec cenv env parent (false, None, argty, [], [], id, false, false, XmlDoc.Empty, None, m)) + MakeRecdFieldSpec cenv env parent (false, None, argty, [], [], id, argInfo.Name.IsNone, false, false, XmlDoc.Empty, None, m)) if not (typeEquiv cenv.g recordTy thisTy) then error(Error(FSComp.SR.tcReturnTypesForUnionMustBeSameAsType(), m)) rfields, recordTy @@ -12030,7 +12195,7 @@ module TcRecdUnionAndEnumDeclarations = begin let vis, _ = ComputeAccessAndCompPath env None m None None parent let vis = CombineReprAccess parent vis if id.idText = "value__" then errorR(Error(FSComp.SR.tcNotValidEnumCaseName(), id.idRange)) - NewRecdField true (Some v) id thisTy false false [] attrs (xmldoc.ToXmlDoc()) vis false + NewRecdField true (Some v) id false thisTy false false [] attrs (xmldoc.ToXmlDoc()) vis false let TcEnumDecls cenv env parent thisTy enumCases = let fieldTy = NewInferenceType () @@ -12071,15 +12236,18 @@ let TcTyconMemberSpecs cenv env containerInfo declKind tpenv (augSpfn: SynMember // Bind 'open' declarations //------------------------------------------------------------------------- -let TcModuleOrNamespaceLidAndPermitAutoResolve env amap (longId : Ident list) = +let TcModuleOrNamespaceLidAndPermitAutoResolve tcSink env amap (longId : Ident list) = let ad = env.eAccessRights - let m = longId |> List.map (fun id -> id.idRange) |> List.reduce unionRanges - match ResolveLongIndentAsModuleOrNamespace ResultCollectionSettings.AllResults amap m OpenQualified env.eNameResEnv ad longId with - | Result res -> Result res - | Exception err -> raze err + match longId with + | [] -> Result [] + | id::rest -> + let m = longId |> List.map (fun id -> id.idRange) |> List.reduce unionRanges + match ResolveLongIndentAsModuleOrNamespace tcSink ResultCollectionSettings.AllResults amap m true OpenQualified env.eNameResEnv ad id rest true with + | Result res -> Result res + | Exception err -> raze err let TcOpenDecl tcSink (g:TcGlobals) amap m scopem env (longId : Ident list) = - let modrefs = ForceRaise (TcModuleOrNamespaceLidAndPermitAutoResolve env amap longId) + let modrefs = ForceRaise (TcModuleOrNamespaceLidAndPermitAutoResolve tcSink env amap longId) // validate opened namespace names for id in longId do @@ -12092,7 +12260,7 @@ let TcOpenDecl tcSink (g:TcGlobals) amap m scopem env (longId : Ident list) = let p = match p with | [] -> [] - | (h, _):: t -> if h.StartsWith(FsiDynamicModulePrefix, System.StringComparison.Ordinal) then t else p + | (h, _):: t -> if h.StartsWithOrdinal(FsiDynamicModulePrefix) then t else p // See https://fslang.uservoice.com/forums/245727-f-language/suggestions/6107641-make-microsoft-prefix-optional-when-using-core-f let isFSharpCoreSpecialCase = @@ -12285,7 +12453,7 @@ module IncrClassChecking = let taccess = TAccess [cpath] let isVolatile = HasFSharpAttribute g g.attrib_VolatileFieldAttribute v.Attribs - NewRecdField isStatic None id ty v.IsMutable isVolatile [(*no property attributes*)] v.Attribs v.XmlDoc taccess (*compiler generated:*)true + NewRecdField isStatic None id false ty v.IsMutable isVolatile [(*no property attributes*)] v.Attribs v.XmlDoc taccess (*compiler generated:*)true /// Indicates how is a 'let' bound value in a class with implicit construction is represented in /// the TAST ultimately produced by type checking. @@ -12360,7 +12528,7 @@ module IncrClassChecking = nm, takenFieldNames.Add(nm) let reportIfUnused() = - if not v.HasBeenReferenced && not v.IsCompiledAsTopLevel && not (v.DisplayName.StartsWith "_") && not v.IsCompilerGenerated then + if not v.HasBeenReferenced && not v.IsCompiledAsTopLevel && not (v.DisplayName.StartsWithOrdinal("_")) && not v.IsCompilerGenerated then warning (Error(FSComp.SR.chkUnusedValue(v.DisplayName), v.Range)) let repr = @@ -12442,6 +12610,12 @@ module IncrClassChecking = | InVar false -> true | _ -> false + member localRep.IsValRepresentedAsMethod (v:Val) = + localRep.IsValWithRepresentation(v) && + match localRep.LookupRepr(v) with + | InMethod _ -> true + | _ -> false + /// Make the elaborated expression that represents a use of a /// a "let v = ..." class binding member localRep.MakeValueLookup thisValOpt tinst safeStaticInitInfo v tyargs m = @@ -12487,19 +12661,19 @@ module IncrClassChecking = | InMethod _, _ -> error(InternalError("Local was given method storage, yet later it's been assigned to", m)) - member localRep.MakeValueGetAddress thisValOpt tinst safeStaticInitInfo v m = + member localRep.MakeValueGetAddress readonly thisValOpt tinst safeStaticInitInfo v m = let g = localRep.RepInfoTcGlobals match localRep.LookupRepr v, thisValOpt with | InField(false, _, rfref), Some(thisVal) -> let thise = exprForVal m thisVal - mkRecdFieldGetAddrViaExprAddr(thise, rfref, tinst, m) + mkRecdFieldGetAddrViaExprAddr(readonly, thise, rfref, tinst, m) | InField(false, _, _rfref), None -> error(InternalError("Unexpected missing 'this' variable in MakeValueGetAddress", m)) | InField(true, idx, rfref), _ -> - let expr = mkStaticRecdFieldGetAddr(rfref, tinst, m) + let expr = mkStaticRecdFieldGetAddr(readonly, rfref, tinst, m) MakeCheckSafeInit g tinst safeStaticInitInfo (mkInt g m idx) expr | InVar _, _ -> - mkValAddr m (mkLocalValRef v) + mkValAddr m readonly (mkLocalValRef v) | InMethod _, _ -> error(InternalError("Local was given method storage, yet later it's address was required", m)) @@ -12539,42 +12713,42 @@ module IncrClassChecking = /// Fix up the references to the locals, e.g. /// v -> this.fieldv /// f x -> this.method x - member localRep.FixupIncrClassExprPhase2C thisValOpt safeStaticInitInfo (thisTyInst:TypeInst) expr = + member localRep.FixupIncrClassExprPhase2C cenv thisValOpt safeStaticInitInfo (thisTyInst:TypeInst) expr = // fixup: intercept and expr rewrite let FixupExprNode rw e = //dprintfn "Fixup %s" (showL (exprL e)) + let g = localRep.RepInfoTcGlobals + let e = NormalizeAndAdjustPossibleSubsumptionExprs g e match e with // Rewrite references to applied let-bound-functions-compiled-as-methods - | Expr.App(Expr.Val (ValDeref(v), _, _), _, tyargs, args, m) - when (localRep.IsValWithRepresentation(v) && - (match localRep.LookupRepr(v) with - | InMethod _ -> true //(methodVal.Typars.Length > thisTyInst.Length) - | _ -> false )) -> - - //dprintfn "Found application of %s" v.LogicalName - let g = localRep.RepInfoTcGlobals + // Rewrite references to applied recursive let-bound-functions-compiled-as-methods + // Rewrite references to applied recursive generic let-bound-functions-compiled-as-methods + | Expr.App(Expr.Val (ValDeref v, _, _), _, tyargs, args, m) + | Expr.App(Expr.Link {contents = Expr.Val (ValDeref v, _, _) }, _, tyargs, args, m) + | Expr.App(Expr.Link {contents = Expr.App(Expr.Val (ValDeref v, _, _), _, tyargs, [], _) }, _, [], args, m) + when localRep.IsValRepresentedAsMethod(v) && not (cenv.recUses.ContainsKey v) -> + let expr = localRep.MakeValueLookup thisValOpt thisTyInst safeStaticInitInfo v tyargs m let args = args |> List.map rw Some (MakeApplicationAndBetaReduce g (expr, (tyOfExpr g expr), [], args, m)) - // Rewrite references to values stored as fields and first class uses of method values - | Expr.Val (ValDeref(v), _, m) + | Expr.Val (ValDeref v, _, m) when localRep.IsValWithRepresentation(v) -> //dprintfn "Found use of %s" v.LogicalName Some (localRep.MakeValueLookup thisValOpt thisTyInst safeStaticInitInfo v [] m) // Rewrite assignments to mutable values stored as fields - | Expr.Op(TOp.LValueOp (LSet, ValDeref(v)) , [], [arg], m) + | Expr.Op(TOp.LValueOp (LSet, ValDeref v) , [], [arg], m) when localRep.IsValWithRepresentation(v) -> let arg = rw arg Some (localRep.MakeValueAssign thisValOpt thisTyInst safeStaticInitInfo v arg m) // Rewrite taking the address of mutable values stored as fields - | Expr.Op(TOp.LValueOp (LGetAddr, ValDeref(v)), [], [] , m) + | Expr.Op(TOp.LValueOp (LAddrOf readonly, ValDeref v), [], [] , m) when localRep.IsValWithRepresentation(v) -> - Some (localRep.MakeValueGetAddress thisValOpt thisTyInst safeStaticInitInfo v m) + Some (localRep.MakeValueGetAddress readonly thisValOpt thisTyInst safeStaticInitInfo v m) | _ -> None Tastops.RewriteExpr { PreIntercept = Some FixupExprNode @@ -12616,7 +12790,7 @@ module IncrClassChecking = ctorDeclaredTypars |> List.iter (SetTyparRigid cenv.g env.DisplayEnv m) // Reconstitute the type with the correct quantified type variables. - ctorInfo.InstanceCtorVal.SetType (tryMkForallTy ctorDeclaredTypars ctorInfo.InstanceCtorVal.TauType) + ctorInfo.InstanceCtorVal.SetType (mkForallTyIfNeeded ctorDeclaredTypars ctorInfo.InstanceCtorVal.TauType) let freeChoiceTypars = ListSet.subtract typarEq generalizedTyparsForRecursiveBlock ctorDeclaredTypars @@ -12681,7 +12855,7 @@ module IncrClassChecking = let TransBind (reps:IncrClassReprInfo) (TBind(v, rhsExpr, spBind)) = if v.MustInline then error(Error(FSComp.SR.tcLocalClassBindingsCannotBeInline(), v.Range)) - let rhsExpr = reps.FixupIncrClassExprPhase2C (Some thisVal) safeStaticInitInfo thisTyInst rhsExpr + let rhsExpr = reps.FixupIncrClassExprPhase2C cenv (Some thisVal) safeStaticInitInfo thisTyInst rhsExpr // The initialization of the 'ref cell' variable for 'this' is the only binding which comes prior to the super init let isPriorToSuperInit = @@ -12698,7 +12872,8 @@ module IncrClassChecking = | Expr.TyLambda (_, tps, b, m, returnTy) -> tps, [], b, returnTy, m | e -> [], [], e, (tyOfExpr cenv.g e), e.Range - let chooseTps = chooseTps @ freeChoiceTypars + let chooseTps = chooseTps @ (ListSet.subtract typarEq freeChoiceTypars methodVal.Typars) + // Add the 'this' variable as an argument let tauExpr, tauTy = if isStatic then @@ -12706,6 +12881,7 @@ module IncrClassChecking = else let e = mkLambda m thisVal (tauExpr, tauTy) e, tyOfExpr cenv.g e + // Replace the type parameters that used to be on the rhs with // the full set of type parameters including the type parameters of the enclosing class let rhsExpr = mkTypeLambda m methodVal.Typars (mkTypeChoose m chooseTps tauExpr, tauTy) @@ -12731,7 +12907,7 @@ module IncrClassChecking = match safeStaticInitInfo with | SafeInitField (rfref, _) -> let setExpr = mkStaticRecdFieldSet (rfref, thisTyInst, mkInt cenv.g m idx, m) - let setExpr = reps.FixupIncrClassExprPhase2C (Some(thisVal)) NoSafeInitInfo thisTyInst setExpr + let setExpr = reps.FixupIncrClassExprPhase2C cenv (Some(thisVal)) NoSafeInitInfo thisTyInst setExpr Some setExpr | NoSafeInitInfo -> None @@ -12767,7 +12943,7 @@ module IncrClassChecking = ([], actions, methodBinds), reps | IncrClassDo (doExpr, isStatic) -> - let doExpr = reps.FixupIncrClassExprPhase2C (Some(thisVal)) safeStaticInitInfo thisTyInst doExpr + let doExpr = reps.FixupIncrClassExprPhase2C cenv (Some(thisVal)) safeStaticInitInfo thisTyInst doExpr let binder = (fun e -> mkSequential SequencePointsAtSeq doExpr.Range doExpr e) let isPriorToSuperInit = false if isStatic then @@ -12787,7 +12963,7 @@ module IncrClassChecking = | None -> () | Some v -> let setExpr = mkRefCellSet cenv.g m ctorInfo.InstanceCtorThisVal.Type (exprForVal m v) (exprForVal m ctorInfo.InstanceCtorThisVal) - let setExpr = reps.FixupIncrClassExprPhase2C (Some(thisVal)) safeStaticInitInfo thisTyInst setExpr + let setExpr = reps.FixupIncrClassExprPhase2C cenv (Some(thisVal)) safeStaticInitInfo thisTyInst setExpr let binder = (fun e -> mkSequential SequencePointsAtSeq setExpr.Range setExpr e) let isPriorToSuperInit = false yield (isPriorToSuperInit, binder) ] @@ -12801,7 +12977,7 @@ module IncrClassChecking = [ match ctorInfo.InstanceCtorSafeInitInfo with | SafeInitField (rfref, _) -> let setExpr = mkRecdFieldSetViaExprAddr (exprForVal m thisVal, rfref, thisTyInst, mkOne cenv.g m, m) - let setExpr = reps.FixupIncrClassExprPhase2C (Some(thisVal)) safeStaticInitInfo thisTyInst setExpr + let setExpr = reps.FixupIncrClassExprPhase2C cenv (Some(thisVal)) safeStaticInitInfo thisTyInst setExpr let binder = (fun e -> mkSequential SequencePointsAtSeq setExpr.Range setExpr e) let isPriorToSuperInit = false yield (isPriorToSuperInit, binder) @@ -12884,7 +13060,7 @@ module IncrClassChecking = // Rewrite the expression to convert it to a load of a field if needed. // We are allowed to load fields from our own object even though we haven't called // the super class constructor yet. - let ldexpr = reps.FixupIncrClassExprPhase2C (Some(thisVal)) safeStaticInitInfo thisTyInst (exprForVal m v) + let ldexpr = reps.FixupIncrClassExprPhase2C cenv (Some(thisVal)) safeStaticInitInfo thisTyInst (exprForVal m v) mkInvisibleLet m v ldexpr inheritsExpr | _ -> inheritsExpr @@ -12909,7 +13085,7 @@ module IncrClassChecking = let m = thisVal.Range let cctorArgs, cctorVal, _ = ctorInfo.StaticCtorValInfo.Force() // Reconstitute the type of the implicit class constructor with the correct quantified type variables. - cctorVal.SetType (tryMkForallTy ctorDeclaredTypars cctorVal.TauType) + cctorVal.SetType (mkForallTyIfNeeded ctorDeclaredTypars cctorVal.TauType) let cctorBody = mkMemberLambdas m [] None None [cctorArgs] (cctorInitAction, cenv.g.unit_ty) Some(cctorBody) @@ -12935,7 +13111,7 @@ module MutRecBindingChecking = | Phase2AIncrClassCtor of IncrClassCtorLhs /// An 'inherit' declaration in an incremental class /// - /// Phase2AInherit (typ, arg, baseValOpt, m) + /// Phase2AInherit (ty, arg, baseValOpt, m) | Phase2AInherit of SynType * SynExpr * Val option * range /// A set of value or function definitions in an incremental class /// @@ -13025,18 +13201,18 @@ module MutRecBindingChecking = | MutRecShape.Tycon (MutRecDefnsPhase2InfoForTycon(tyconOpt, tcref, declaredTyconTypars, declKind, binds, _)) -> // Class members can access protected members of the implemented type - // Class members can access private members in the typ + // Class members can access private members in the ty let isExtrinsic = (declKind = ExtrinsicExtensionBinding) - let innitalEnvForTycon = MakeInnerEnvForTyconRef cenv envForDecls tcref isExtrinsic + let initalEnvForTycon = MakeInnerEnvForTyconRef envForDecls tcref isExtrinsic // Re-add the type constructor to make it take precedence for record label field resolutions // This does not apply to extension members: in those cases the relationship between the record labels // and the type is too extruded let envForTycon = if isExtrinsic then - innitalEnvForTycon + initalEnvForTycon else - AddLocalTyconRefs true cenv.g cenv.amap tcref.Range [tcref] innitalEnvForTycon + AddLocalTyconRefs true cenv.g cenv.amap tcref.Range [tcref] initalEnvForTycon // Make fresh version of the class type for type checking the members and lets * let _, copyOfTyconTypars, _, objTy, thisTy = FreshenObjectArgType cenv tcref.Range TyparRigidity.WillBeRigid tcref isExtrinsic declaredTyconTypars @@ -13070,15 +13246,15 @@ module MutRecBindingChecking = [Phase2AIncrClassCtor incrClassCtorLhs], innerState - | SynMemberDefn.ImplicitInherit (typ, arg, _baseIdOpt, m), _ -> + | SynMemberDefn.ImplicitInherit (ty, arg, _baseIdOpt, m), _ -> if tcref.TypeOrMeasureKind = TyparKind.Measure then error(Error(FSComp.SR.tcMeasureDeclarationsRequireStaticMembers(), m)) - // Phase2A: inherit typ(arg) as base - pass through + // Phase2A: inherit ty(arg) as base - pass through // Phase2A: pick up baseValOpt! let baseValOpt = incrClassCtorLhsOpt |> Option.bind (fun x -> x.InstanceCtorBaseValOpt) let innerState = (incrClassCtorLhsOpt, envForTycon, tpenv, recBindIdx, uncheckedBindsRev) - [Phase2AInherit (typ, arg, baseValOpt, m); Phase2AIncrClassCtorJustAfterSuperInit], innerState + [Phase2AInherit (ty, arg, baseValOpt, m); Phase2AIncrClassCtorJustAfterSuperInit], innerState | SynMemberDefn.LetBindings (letBinds, isStatic, isRec, m), _ -> match tcref.TypeOrMeasureKind, isStatic with @@ -13227,7 +13403,7 @@ module MutRecBindingChecking = | MutRecShape.Tycon (TyconBindingsPhase2A(tyconOpt, declKind, _, tcref, copyOfTyconTypars, thisTy, defnAs)) -> let isExtrinsic = (declKind = ExtrinsicExtensionBinding) - let envForTycon = MakeInnerEnvForTyconRef cenv envForDecls tcref isExtrinsic + let envForTycon = MakeInnerEnvForTyconRef envForDecls tcref isExtrinsic let envForTycon = if isExtrinsic then envForTycon else AddLocalTyconRefs true cenv.g cenv.amap tcref.Range [tcref] envForTycon // Set up the environment so use-before-definition warnings are given, at least // until we reach a Phase2AIncrClassCtorJustAfterSuperInit. @@ -13269,6 +13445,7 @@ module MutRecBindingChecking = // Phase2B: typecheck the argument to an 'inherits' call and build the new object expr for the inherit-call | Phase2AInherit (synBaseTy, arg, baseValOpt, m) -> let baseTy, tpenv = TcType cenv NoNewTypars CheckCxs ItemOccurence.Use envInstance tpenv synBaseTy + let baseTy = baseTy |> convertToTypeWithMetadataIfPossible cenv.g let inheritsExpr, tpenv = TcNewExpr cenv envInstance tpenv baseTy (Some synBaseTy.Range) true arg m let envInstance = match baseValOpt with Some baseVal -> AddLocalVal cenv.tcSink scopem baseVal envInstance | None -> envInstance let envNonRec = match baseValOpt with Some baseVal -> AddLocalVal cenv.tcSink scopem baseVal envNonRec | None -> envNonRec @@ -13494,7 +13671,7 @@ module MutRecBindingChecking = let inheritsExpr, _ = TcNewExpr cenv envForDecls tpenv cenv.g.obj_ty None true (SynExpr.Const(SynConst.Unit, tcref.Range)) tcref.Range inheritsExpr, false, None, defnCs - let envForTycon = MakeInnerEnvForTyconRef cenv envForDecls tcref false + let envForTycon = MakeInnerEnvForTyconRef envForDecls tcref false // Compute the cpath used when creating the hidden fields let cpath = envForTycon.eAccessPath @@ -13555,9 +13732,9 @@ module MutRecBindingChecking = let thisValOpt = GetInstanceMemberThisVariable (v, x) // Members have at least as many type parameters as the enclosing class. Just grab the type variables for the type. - let thisTyInst = List.map mkTyparTy (List.take (tcref.Typars(v.Range).Length) v.Typars) + let thisTyInst = List.map mkTyparTy (List.truncate (tcref.Typars(v.Range).Length) v.Typars) - let x = localReps.FixupIncrClassExprPhase2C thisValOpt safeStaticInitInfo thisTyInst x + let x = localReps.FixupIncrClassExprPhase2C cenv thisValOpt safeStaticInitInfo thisTyInst x { pgrbind with Binding = TBind(v, x, spBind) } ) @@ -13571,16 +13748,21 @@ module MutRecBindingChecking = /// Check a "module X = A.B.C" module abbreviation declaration let TcModuleAbbrevDecl (cenv:cenv) scopem env (id, p, m) = let ad = env.eAccessRights - let mvvs = ForceRaise (ResolveLongIndentAsModuleOrNamespace ResultCollectionSettings.AllResults cenv.amap m OpenQualified env.eNameResEnv ad p) - let modrefs = mvvs |> List.map p23 - if modrefs.Length > 0 && modrefs |> List.forall (fun modref -> modref.IsNamespace) then + let resolved = + match p with + | [] -> Result [] + | id::rest -> ResolveLongIndentAsModuleOrNamespace cenv.tcSink ResultCollectionSettings.AllResults cenv.amap m true OpenQualified env.eNameResEnv ad id rest false + let mvvs = ForceRaise resolved + if isNil mvvs then env else + let modrefs = mvvs |> List.map p23 + if not (isNil modrefs) && modrefs |> List.forall (fun modref -> modref.IsNamespace) then errorR(Error(FSComp.SR.tcModuleAbbreviationForNamespace(fullDisplayTextOfModRef (List.head modrefs)), m)) let modrefs = modrefs |> List.filter (fun mvv -> not mvv.IsNamespace) + if isNil modrefs then env else modrefs |> List.iter (fun modref -> CheckEntityAttributes cenv.g modref m |> CommitOperationResult) - let env = (if modrefs.Length > 0 then AddModuleAbbreviationAndReport cenv.tcSink scopem id modrefs env else env) + let env = AddModuleAbbreviationAndReport cenv.tcSink scopem id modrefs env env - /// Update the contents accessible via the recursive namespace declaration, if any let TcMutRecDefns_UpdateNSContents mutRecNSInfo = match mutRecNSInfo with @@ -13784,7 +13966,7 @@ let TcMutRecDefns_Phase2 cenv envInitial bindsm scopem mutRecNSInfo (envMutRec: let overridesOK = DeclKind.CanOverrideOrImplement(declKind) members |> List.collect (function | SynMemberDefn.Interface(ity, defnOpt, _) -> - let _, typ = if tcref.Deref.IsExceptionDecl then [], cenv.g.exn_ty else generalizeTyconRef tcref + let _, ty = if tcref.Deref.IsExceptionDecl then [], cenv.g.exn_ty else generalizeTyconRef tcref let m = ity.Range if tcref.IsTypeAbbrev then error(Error(FSComp.SR.tcTypeAbbreviationsCannotHaveInterfaceDeclaration(), m)) if tcref.IsEnumTycon then error(Error(FSComp.SR.tcEnumerationsCannotHaveInterfaceDeclaration(), m)) @@ -13798,8 +13980,8 @@ let TcMutRecDefns_Phase2 cenv envInitial bindsm scopem mutRecNSInfo (envMutRec: error(Error(FSComp.SR.tcAllImplementedInterfacesShouldBeDeclared(), ity.Range)) if (typeEquiv cenv.g ity' cenv.g.mk_IComparable_ty && Option.isSome tcref.GeneratedCompareToValues) || (typeEquiv cenv.g ity' cenv.g.mk_IStructuralComparable_ty && Option.isSome tcref.GeneratedCompareToWithComparerValues) || - (typeEquiv cenv.g ity' ((mkAppTy cenv.g.system_GenericIComparable_tcref [typ])) && Option.isSome tcref.GeneratedCompareToValues) || - (typeEquiv cenv.g ity' ((mkAppTy cenv.g.system_GenericIEquatable_tcref [typ])) && Option.isSome tcref.GeneratedHashAndEqualsWithComparerValues) || + (typeEquiv cenv.g ity' ((mkAppTy cenv.g.system_GenericIComparable_tcref [ty])) && Option.isSome tcref.GeneratedCompareToValues) || + (typeEquiv cenv.g ity' ((mkAppTy cenv.g.system_GenericIEquatable_tcref [ty])) && Option.isSome tcref.GeneratedHashAndEqualsWithComparerValues) || (typeEquiv cenv.g ity' cenv.g.mk_IStructuralEquatable_ty && Option.isSome tcref.GeneratedHashAndEqualsWithComparerValues) then errorR(Error(FSComp.SR.tcDefaultImplementationForInterfaceHasAlreadyBeenAdded(), ity.Range)) if overridesOK = WarnOnOverrides then @@ -13887,16 +14069,16 @@ module AddAugmentationDeclarations = let tcaugHasNominalInterface g (tcaug: TyconAugmentation) tcref = tcaug.tcaug_interfaces |> List.exists (fun (x, _, _) -> match tryDestAppTy g x with - | Some tcref2 when tyconRefEq g tcref2 tcref -> true + | ValueSome tcref2 when tyconRefEq g tcref2 tcref -> true | _ -> false) let AddGenericCompareDeclarations cenv (env: TcEnv) (scSet:Set) (tycon:Tycon) = if AugmentWithHashCompare.TyconIsCandidateForAugmentationWithCompare cenv.g tycon && scSet.Contains tycon.Stamp then let tcref = mkLocalTyconRef tycon let tcaug = tycon.TypeContents - let _, typ = if tcref.Deref.IsExceptionDecl then [], cenv.g.exn_ty else generalizeTyconRef tcref + let _, ty = if tcref.Deref.IsExceptionDecl then [], cenv.g.exn_ty else generalizeTyconRef tcref let m = tycon.Range - let genericIComparableTy = mkAppTy cenv.g.system_GenericIComparable_tcref [typ] + let genericIComparableTy = mkAppTy cenv.g.system_GenericIComparable_tcref [ty] let hasExplicitIComparable = tycon.HasInterface cenv.g cenv.g.mk_IComparable_ty @@ -13979,7 +14161,7 @@ module AddAugmentationDeclarations = if AugmentWithHashCompare.TyconIsCandidateForAugmentationWithEquals cenv.g tycon then let tcref = mkLocalTyconRef tycon let tcaug = tycon.TypeContents - let _, typ = if tcref.Deref.IsExceptionDecl then [], cenv.g.exn_ty else generalizeTyconRef tcref + let _, ty = if tcref.Deref.IsExceptionDecl then [], cenv.g.exn_ty else generalizeTyconRef tcref let m = tycon.Range // Note: tycon.HasOverride only gives correct results after we've done the type augmentation @@ -13997,7 +14179,7 @@ module AddAugmentationDeclarations = let vspec1, vspec2 = AugmentWithHashCompare.MakeValsForEqualsAugmentation cenv.g tcref tcaug.SetEquals (mkLocalValRef vspec1, mkLocalValRef vspec2) if not tycon.IsExceptionDecl then - PublishInterface cenv env.DisplayEnv tcref m true (mkAppTy cenv.g.system_GenericIEquatable_tcref [typ]) + PublishInterface cenv env.DisplayEnv tcref m true (mkAppTy cenv.g.system_GenericIEquatable_tcref [ty]) PublishValueDefn cenv env ModuleOrMemberBinding vspec1 PublishValueDefn cenv env ModuleOrMemberBinding vspec2 AugmentWithHashCompare.MakeBindingsForEqualsAugmentation cenv.g tycon @@ -14035,7 +14217,7 @@ module TyconConstraintInference = // Is the field type a type parameter? match tryDestTyparTy cenv.g ty with - | Some tp -> + | ValueSome tp -> // Look for an explicit 'comparison' constraint if tp.Constraints |> List.exists (function TyparConstraint.SupportsComparison _ -> true | _ -> false) then true @@ -14048,7 +14230,7 @@ module TyconConstraintInference = else false - | None -> + | _ -> match ty with // Look for array, UIntPtr and IntPtr types | SpecialComparableHeadType g tinst -> @@ -14160,7 +14342,7 @@ module TyconConstraintInference = // and type parameters. let rec checkIfFieldTypeSupportsEquality (tycon:Tycon) (ty: TType) = match tryDestTyparTy cenv.g ty with - | Some tp -> + | ValueSome tp -> // Look for an explicit 'equality' constraint if tp.Constraints |> List.exists (function TyparConstraint.SupportsEquality _ -> true | _ -> false) then true @@ -14172,7 +14354,7 @@ module TyconConstraintInference = true else false - | None -> + | _ -> match ty with | SpecialEquatableHeadType g tinst -> tinst |> List.forall (checkIfFieldTypeSupportsEquality tycon) @@ -14213,7 +14395,7 @@ module TyconConstraintInference = // If the type was excluded, say why if not res then match TryFindFSharpBoolAttribute g g.attrib_StructuralEqualityAttribute tycon.Attribs with - | Some(true) -> + | Some true -> if AugmentWithHashCompare.TyconIsCandidateForAugmentationWithEquals cenv.g tycon then match structuralTypes |> List.tryFind (fst >> checkIfFieldTypeSupportsEquality tycon >> not) with | None -> @@ -14324,7 +14506,7 @@ module TcExceptionDeclarations = minfo.GenericArity = 0) match candidates with | [minfo] -> - match minfo.EnclosingType with + match minfo.ApparentEnclosingType with | AppTy cenv.g (tcref, _) as ety when (TypeDefinitelySubsumesTypeNoCoercion 0 cenv.g cenv.amap m cenv.g.exn_ty ety) -> let tref = tcref.CompiledRepresentationForNamedType TExnAsmRepr tref @@ -14337,7 +14519,7 @@ module TcExceptionDeclarations = | None -> TExnFresh (MakeRecdFieldsTable args') - exnc.entity_exn_info <- repr + exnc.SetExceptionInfo repr let item = Item.ExnCase(mkLocalTyconRef exnc) CallNameResolutionSink cenv.tcSink (id.idRange, env.NameEnv, item, item, emptyTyparInst, ItemOccurence.Binding, env.DisplayEnv, env.eAccessRights) @@ -14464,7 +14646,7 @@ module EstablishTypeDefinitionCores = let thisTyconRef = mkLocalTyconRef tycon let m = tycon.Range let env = AddDeclaredTypars CheckForDuplicateTypars (tycon.Typars(m)) env - let env = MakeInnerEnvForTyconRef cenv env thisTyconRef false + let env = MakeInnerEnvForTyconRef env thisTyconRef false [ match synTyconRepr with | SynTypeDefnSimpleRepr.None _ -> () | SynTypeDefnSimpleRepr.Union (_, unionCases, _) -> @@ -14477,11 +14659,11 @@ module EstablishTypeDefinitionCores = yield (ty', m) | UnionCaseFullType (ty, arity) -> let ty', _ = TcTypeAndRecover cenv NoNewTypars NoCheckCxs ItemOccurence.UseInType env tpenv ty - let argtysl, _ = GetTopTauTypeInFSharpForm cenv.g (arity |> TranslateTopValSynInfo m (TcAttributes cenv env) |> TranslatePartialArity []).ArgInfos ty' m - if argtysl.Length > 1 then + let curriedArgTys, _ = GetTopTauTypeInFSharpForm cenv.g (arity |> TranslateTopValSynInfo m (TcAttributes cenv env) |> TranslatePartialArity []).ArgInfos ty' m + if curriedArgTys.Length > 1 then errorR(Error(FSComp.SR.tcIllegalFormForExplicitTypeDeclaration(), m)) - for argtys in argtysl do - for (argty, _) in argtys do + for argTys in curriedArgTys do + for (argty, _) in argTys do yield (argty , m) | SynTypeDefnSimpleRepr.General (_, _, _, fields, _, _, implicitCtorSynPats, _) when tycon.IsFSharpStructOrEnumTycon -> // for structs @@ -14644,10 +14826,10 @@ module EstablishTypeDefinitionCores = tycon.SetIsStructRecordOrUnion isStructRecordOrUnionType // Set the compiled name, if any - tycon.entity_compiled_name <- TryFindFSharpStringAttribute cenv.g cenv.g.attrib_CompiledNameAttribute attrs + tycon.SetCompiledName (TryFindFSharpStringAttribute cenv.g cenv.g.attrib_CompiledNameAttribute attrs) if hasMeasureAttr then - tycon.entity_kind <- TyparKind.Measure + tycon.SetTypeOrMeasureKind TyparKind.Measure if not (isNil typars) then error(Error(FSComp.SR.tcMeasureDefinitionsCannotHaveTypeParameters(), m)) let repr = @@ -14929,7 +15111,7 @@ module EstablishTypeDefinitionCores = let hasMeasureAttr = HasFSharpAttribute cenv.g cenv.g.attrib_MeasureAttribute attrs let hasMeasureableAttr = HasFSharpAttribute cenv.g cenv.g.attrib_MeasureableAttribute attrs let envinner = AddDeclaredTypars CheckForDuplicateTypars (tycon.Typars(m)) envinner - let envinner = MakeInnerEnvForTyconRef cenv envinner thisTyconRef false + let envinner = MakeInnerEnvForTyconRef envinner thisTyconRef false match synTyconRepr with @@ -14969,7 +15151,7 @@ module EstablishTypeDefinitionCores = errorR(Deprecated(FSComp.SR.tcTypeAbbreviationHasTypeParametersMissingOnType(), tycon.Range)) if firstPass then - tycon.entity_tycon_abbrev <- Some ty + tycon.SetTypeAbbrev (Some ty) | _ -> () @@ -14991,7 +15173,7 @@ module EstablishTypeDefinitionCores = let m = tycon.Range let tcref = mkLocalTyconRef tycon let envinner = AddDeclaredTypars CheckForDuplicateTypars (tycon.Typars(m)) envinner - let envinner = MakeInnerEnvForTyconRef cenv envinner tcref false + let envinner = MakeInnerEnvForTyconRef envinner tcref false let implementedTys, _ = List.mapFold (mapFoldFst (TcTypeAndRecover cenv NoNewTypars checkCxs ItemOccurence.UseInType envinner)) tpenv explicitImplements @@ -15043,7 +15225,7 @@ module EstablishTypeDefinitionCores = | SynTypeDefnSimpleRepr.LibraryOnlyILAssembly _ -> None | SynTypeDefnSimpleRepr.Union _ | SynTypeDefnSimpleRepr.Record _ -> - if tycon.IsStructRecordOrUnionTycon then Some(cenv.g.system_Value_typ) + if tycon.IsStructRecordOrUnionTycon then Some(cenv.g.system_Value_ty) else None | SynTypeDefnSimpleRepr.General (kind, _, slotsigs, fields, isConcrete, _, _, _) -> let kind = InferTyconKind cenv.g (kind, attrs, slotsigs, fields, inSig, isConcrete, m) @@ -15051,8 +15233,8 @@ module EstablishTypeDefinitionCores = match inheritedTys with | [] -> match kind with - | TyconStruct -> Some(cenv.g.system_Value_typ) - | TyconDelegate _ -> Some(cenv.g.system_MulticastDelegate_typ ) + | TyconStruct -> Some(cenv.g.system_Value_ty) + | TyconDelegate _ -> Some(cenv.g.system_MulticastDelegate_ty ) | TyconHiddenRepr | TyconClass | TyconInterface -> None | _ -> error(InternalError("should have inferred tycon kind", m)) @@ -15070,7 +15252,16 @@ module EstablishTypeDefinitionCores = error(Error(FSComp.SR.tcTypesCannotInheritFromMultipleConcreteTypes(), m)) | SynTypeDefnSimpleRepr.Enum _ -> - Some(cenv.g.system_Enum_typ) + Some(cenv.g.system_Enum_ty) + + // Allow super type to be a function type but convert back to FSharpFunc to make sure it has metadata + // (We don't apply the same rule to tuple types, i.e. no F#-declared inheritors of those are permitted) + let super = + super |> Option.map (fun ty -> + if isFunTy cenv.g ty then + let (a,b) = destFunTy cenv.g ty + mkAppTy cenv.g.fastFunc_tcr [a; b] + else ty) // Publish the super type tycon.TypeContents.tcaug_super <- super @@ -15127,10 +15318,10 @@ module EstablishTypeDefinitionCores = if allowed then if kind = explicitKind then warning(PossibleUnverifiableCode(m)) - elif thisTyconRef.Typars(m).Length > 0 then - errorR (Error(FSComp.SR.tcGenericTypesCannotHaveStructLayout(), m)) - else + elif List.isEmpty (thisTyconRef.Typars m) then errorR (Error(FSComp.SR.tcOnlyStructsCanHaveStructLayout(), m)) + else + errorR (Error(FSComp.SR.tcGenericTypesCannotHaveStructLayout(), m)) | None -> () let hiddenReprChecks(hasRepr) = @@ -15156,7 +15347,7 @@ module EstablishTypeDefinitionCores = let envinner = AddDeclaredTypars CheckForDuplicateTypars (tycon.Typars(m)) envinner - let envinner = MakeInnerEnvForTyconRef cenv envinner thisTyconRef false + let envinner = MakeInnerEnvForTyconRef envinner thisTyconRef false // Notify the Language Service about field names in record/class declaration @@ -15288,7 +15479,7 @@ module EstablishTypeDefinitionCores = let ty = names.[arg].Type let id = names.[arg].Ident let taccess = TAccess [envinner.eAccessPath] - yield NewRecdField false None id ty false false [(*no property attributes*)] [(*no field attributes *)] XmlDoc.Empty taccess (*compiler generated:*)true ] + yield NewRecdField false None id false ty false false [(*no property attributes*)] [(*no field attributes *)] XmlDoc.Empty taccess (*compiler generated:*)true ] (userFields @ implicitStructFields) |> CheckDuplicates (fun f -> f.Id) "field" |> ignore writeFakeRecordFieldsToSink userFields @@ -15403,7 +15594,7 @@ module EstablishTypeDefinitionCores = noCLIMutableAttributeCheck() noSealedAttributeCheck FSComp.SR.tcTypesAreAlwaysSealedEnum noAllowNullLiteralAttributeCheck() - let vfld = NewRecdField false None (ident("value__", m)) fieldTy false false [] [] XmlDoc.Empty taccessPublic true + let vfld = NewRecdField false None (ident("value__", m)) false fieldTy false false [] [] XmlDoc.Empty taccessPublic true if not (ListSet.contains (typeEquiv cenv.g) fieldTy [ cenv.g.int32_ty; cenv.g.int16_ty; cenv.g.sbyte_ty; cenv.g.int64_ty; cenv.g.char_ty; cenv.g.bool_ty; cenv.g.uint32_ty; cenv.g.uint16_ty; cenv.g.byte_ty; cenv.g.uint64_ty ]) then errorR(Error(FSComp.SR.tcInvalidTypeForLiteralEnumeration(), m)) @@ -15486,7 +15677,7 @@ module EstablishTypeDefinitionCores = graph.IterateCycles (fun path -> let tycon = path.Head // The thing is cyclic. Set the abbreviation and representation to be "None" to stop later VS crashes - tycon.entity_tycon_abbrev <- None + tycon.SetTypeAbbrev None tycon.entity_tycon_repr <- TNoRepr errorR(Error(FSComp.SR.tcTypeDefinitionIsCyclic(), tycon.Range))) @@ -15538,9 +15729,9 @@ module EstablishTypeDefinitionCores = else acc // note: all edges added are (tycon, _) let insertEdgeToType ty acc = match tryDestAppTy cenv.g ty with - | Some tcref -> + | ValueSome tcref -> insertEdgeToTycon tcref.Deref acc - | None -> + | _ -> acc // collect edges from an a struct field (which is struct-contained in tycon) @@ -15562,9 +15753,9 @@ module EstablishTypeDefinitionCores = (structTycon === tycon2) && (structTyInst, tinst2) ||> List.lengthsEqAndForall2 (fun ty1 ty2 -> match tryDestTyparTy cenv.g ty1 with - | Some destTypar1 -> + | ValueSome destTypar1 -> match tryDestTyparTy cenv.g ty2 with - | Some destTypar2 -> typarEq destTypar1 destTypar2 + | ValueSome destTypar2 -> typarEq destTypar1 destTypar2 | _ -> false | _ -> false) if specialCaseStaticField then @@ -15621,7 +15812,7 @@ module EstablishTypeDefinitionCores = graph.IterateCycles (fun path -> let tycon = path.Head // The thing is cyclic. Set the abbreviation and representation to be "None" to stop later VS crashes - tycon.entity_tycon_abbrev <- None + tycon.SetTypeAbbrev None tycon.entity_tycon_repr <- TNoRepr errorR(Error(FSComp.SR.tcTypeDefinitionIsCyclicThroughInheritance(), tycon.Range))) @@ -15635,7 +15826,7 @@ module EstablishTypeDefinitionCores = let (ComponentInfo(_, _, synTyconConstraints, _, _, _, _, _)) = synTyconInfo let envForTycon = AddDeclaredTypars CheckForDuplicateTypars (tycon.Typars(m)) envForDecls let thisTyconRef = mkLocalTyconRef tycon - let envForTycon = MakeInnerEnvForTyconRef cenv envForTycon thisTyconRef false + let envForTycon = MakeInnerEnvForTyconRef envForTycon thisTyconRef false try TcTyparConstraints cenv NoNewTypars checkCxs ItemOccurence.UseInType envForTycon tpenv synTyconConstraints |> ignore with e -> errorRecovery e m | _ -> ()) @@ -15839,12 +16030,12 @@ module TcDeclarations = else let isInSameModuleOrNamespace = - match envForDecls.eModuleOrNamespaceTypeAccumulator.Value.TypesByMangledName.TryFind(tcref.LogicalName) with - | Some tycon -> (tyconOrder.Compare(tcref.Deref, tycon) = 0) - | None -> + match envForDecls.eModuleOrNamespaceTypeAccumulator.Value.TypesByMangledName.TryGetValue tcref.LogicalName with + | true, tycon -> tyconOrder.Compare(tcref.Deref, tycon) = 0 + | _ -> //false // There is a special case we allow when compiling FSharp.Core.dll which permits interface implementations across namespace fragments - (cenv.g.compilingFslib && tcref.LogicalName.StartsWith("Tuple`")) + cenv.g.compilingFslib && tcref.LogicalName.StartsWithOrdinal("Tuple`") let nReqTypars = reqTypars.Length @@ -16251,7 +16442,7 @@ module TcDeclarations = let declKind, tcref, declaredTyconTypars = ComputeTyconDeclKind tyconOpt isAtOriginalTyconDefn cenv envForDecls true m typars cs longPath let envForTycon = AddDeclaredTypars CheckForDuplicateTypars declaredTyconTypars envForDecls - let envForTycon = MakeInnerEnvForTyconRef cenv envForTycon tcref (declKind = ExtrinsicExtensionBinding) + let envForTycon = MakeInnerEnvForTyconRef envForTycon tcref (declKind = ExtrinsicExtensionBinding) TcTyconMemberSpecs cenv envForTycon (TyconContainerInfo(innerParent, tcref, declaredTyconTypars, NoSafeInitInfo)) declKind tpenv members) @@ -16286,7 +16477,11 @@ module TcDeclarations = (fun _binds -> [ (* no values are available yet *) ]) cenv true scopem m - let _ = TcMutRecSignatureDecls_Phase2 cenv scopem envMutRecPrelimWithReprs withEnvs + let mutRecDefnsAfterVals = TcMutRecSignatureDecls_Phase2 cenv scopem envMutRecPrelimWithReprs withEnvs + + // Updates the types of the modules to contain the contents so far, which now includes values and members + MutRecBindingChecking.TcMutRecDefns_UpdateModuleContents mutRecNSInfo mutRecDefnsAfterVals + envMutRec //------------------------------------------------------------------------- @@ -16354,20 +16549,23 @@ let rec TcSignatureElementNonMutRec cenv parent typeNames endm (env: TcEnv) synS | SynModuleSigDecl.ModuleAbbrev (id, p, m) -> let ad = env.eAccessRights - let mvvs = ForceRaise (ResolveLongIndentAsModuleOrNamespace ResultCollectionSettings.AllResults cenv.amap m OpenQualified env.eNameResEnv ad p) + let resolved = + match p with + | [] -> Result [] + | id::rest -> ResolveLongIndentAsModuleOrNamespace cenv.tcSink ResultCollectionSettings.AllResults cenv.amap m true OpenQualified env.eNameResEnv ad id rest false + let mvvs = ForceRaise resolved let scopem = unionRanges m endm let unfilteredModrefs = mvvs |> List.map p23 let modrefs = unfilteredModrefs |> List.filter (fun modref -> not modref.IsNamespace) - if unfilteredModrefs.Length > 0 && List.isEmpty modrefs then + if not (List.isEmpty unfilteredModrefs) && List.isEmpty modrefs then errorR(Error(FSComp.SR.tcModuleAbbreviationForNamespace(fullDisplayTextOfModRef (List.head unfilteredModrefs)), m)) + if List.isEmpty modrefs then return env else modrefs |> List.iter (fun modref -> CheckEntityAttributes cenv.g modref m |> CommitOperationResult) - let env = - if modrefs.Length > 0 then AddModuleAbbreviationAndReport cenv.tcSink scopem id modrefs env - else env + let env = AddModuleAbbreviationAndReport cenv.tcSink scopem id modrefs env return env | SynModuleSigDecl.HashDirective _ -> @@ -16905,8 +17103,8 @@ let ApplyAssemblyLevelAutoOpenAttributeToTcEnv g amap (ccu: CcuThunk) scopem env let h, t = List.frontAndBack p let modref = mkNonLocalTyconRef (mkNonLocalEntityRef ccu (Array.ofList h)) t match modref.TryDeref with - | VNone -> warn() - | VSome _ -> + | ValueNone -> warn() + | ValueSome _ -> let openDecl = OpenDeclaration.Create ([], [modref], scopem, false) OpenModulesOrNamespaces TcResultsSink.NoSink g amap scopem root env [modref] openDecl @@ -16982,7 +17180,7 @@ let ApplyDefaults cenv g denvAtEnd m mexpr extraAttribs = let ty1 = mkTyparTy tp if not tp.IsSolved && not (typeEquiv cenv.g ty1 ty2) then let csenv = MakeConstraintSolverEnv ContextInfo.NoContext cenv.css m denvAtEnd - TryD (fun () -> ConstraintSolver.SolveTyparEqualsTyp csenv 0 m NoTrace ty1 ty2) + TryD (fun () -> ConstraintSolver.SolveTyparEqualsType csenv 0 m NoTrace ty1 ty2) (fun e -> solveTypAsError cenv denvAtEnd m ty1 ErrorD(ErrorFromApplyingDefault(g, denvAtEnd, tp, ty2, e, m))) |> RaiseOperationResult @@ -17065,13 +17263,13 @@ let CheckModuleSignature g cenv m denvAtEnd rootSigOpt implFileTypePriorToSig im /// Typecheck, then close the inference scope and then check the file meets its signature (if any) let TypeCheckOneImplFile // checkForErrors: A function to help us stop reporting cascading errors - (g, niceNameGen, amap, topCcu, checkForErrors, conditionalDefines, tcSink) + (g, niceNameGen, amap, topCcu, checkForErrors, conditionalDefines, tcSink, isInternalTestSpanStackReferring) env (rootSigOpt : ModuleOrNamespaceType option) (ParsedImplFileInput(_, isScript, qualNameOfFile, scopedPragmas, _, implFileFrags, isLastCompiland)) = eventually { - let cenv = cenv.Create (g, isScript, niceNameGen, amap, topCcu, false, Option.isSome rootSigOpt, conditionalDefines, tcSink, (LightweightTcValForUsingInBuildMethodCall g)) + let cenv = cenv.Create (g, isScript, niceNameGen, amap, topCcu, false, Option.isSome rootSigOpt, conditionalDefines, tcSink, (LightweightTcValForUsingInBuildMethodCall g), isInternalTestSpanStackReferring) let envinner, mtypeAcc = MakeInitialEnv env @@ -17135,22 +17333,36 @@ let TypeCheckOneImplFile conditionallySuppressErrorReporting (checkForErrors()) (fun () -> try let reportErrors = not (checkForErrors()) - PostTypeCheckSemanticChecks.CheckTopImpl (g, cenv.amap, reportErrors, cenv.infoReader, env.eInternalsVisibleCompPaths, cenv.topCcu, envAtEnd.DisplayEnv, implFileExprAfterSig, extraAttribs, isLastCompiland) + PostTypeCheckSemanticChecks.CheckTopImpl (g, cenv.amap, reportErrors, cenv.infoReader, env.eInternalsVisibleCompPaths, cenv.topCcu, envAtEnd.DisplayEnv, implFileExprAfterSig, extraAttribs, isLastCompiland, isInternalTestSpanStackReferring) with e -> errorRecovery e m false) + // Warn on version attributes. + topAttrs.assemblyAttrs |> List.iter (function + | Attrib(tref, _, [ AttribExpr(Expr.Const (Const.String(version), range, _), _) ] , _, _, _, _) -> + let attrName = tref.CompiledRepresentationForNamedType.FullName + let isValid() = + try IL.parseILVersion version |> ignore; true + with _ -> false + match attrName with + | "System.Reflection.AssemblyFileVersionAttribute" //TODO compile error like c# compiler? + | "System.Reflection.AssemblyVersionAttribute" when not (isValid()) -> + warning(Error(FSComp.SR.fscBadAssemblyVersion(attrName, version), range)) + | _ -> () + | _ -> ()) + let implFile = TImplFile(qualNameOfFile, scopedPragmas, implFileExprAfterSig, hasExplicitEntryPoint, isScript) - return (topAttrs, implFile, envAtEnd, cenv.createsGeneratedProvidedTypes) + return (topAttrs, implFile, implFileTypePriorToSig, envAtEnd, cenv.createsGeneratedProvidedTypes) } /// Check an entire signature file -let TypeCheckOneSigFile (g, niceNameGen, amap, topCcu, checkForErrors, conditionalDefines, tcSink) tcEnv (ParsedSigFileInput(_, qualNameOfFile, _, _, sigFileFrags)) = +let TypeCheckOneSigFile (g, niceNameGen, amap, topCcu, checkForErrors, conditionalDefines, tcSink, isInternalTestSpanStackReferring) tcEnv (ParsedSigFileInput(_, qualNameOfFile, _, _, sigFileFrags)) = eventually { - let cenv = cenv.Create (g, false, niceNameGen, amap, topCcu, true, false, conditionalDefines, tcSink, (LightweightTcValForUsingInBuildMethodCall g)) + let cenv = cenv.Create (g, false, niceNameGen, amap, topCcu, true, false, conditionalDefines, tcSink, (LightweightTcValForUsingInBuildMethodCall g), isInternalTestSpanStackReferring) let envinner, mtypeAcc = MakeInitialEnv tcEnv let specs = [ for x in sigFileFrags -> SynModuleSigDecl.NamespaceFragment(x) ] diff --git a/src/fsharp/TypeChecker.fsi b/src/fsharp/TypeChecker.fsi index 2348a1ea4ac..3f84e1992fc 100644 --- a/src/fsharp/TypeChecker.fsi +++ b/src/fsharp/TypeChecker.fsi @@ -2,19 +2,14 @@ module internal Microsoft.FSharp.Compiler.TypeChecker -open Internal.Utilities open Microsoft.FSharp.Compiler -open Microsoft.FSharp.Compiler.AbstractIL open Microsoft.FSharp.Compiler.AbstractIL.IL -open Microsoft.FSharp.Compiler.AbstractIL.Internal open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library open Microsoft.FSharp.Compiler.AccessibilityLogic open Microsoft.FSharp.Compiler.Ast open Microsoft.FSharp.Compiler.Range -open Microsoft.FSharp.Compiler.ErrorLogger open Microsoft.FSharp.Compiler.Tast open Microsoft.FSharp.Compiler.Tastops -open Microsoft.FSharp.Compiler.Lib open Microsoft.FSharp.Compiler.Infos open Microsoft.FSharp.Compiler.Import open Microsoft.FSharp.Compiler.TcGlobals @@ -30,7 +25,7 @@ type TcEnv = val CreateInitialTcEnv : TcGlobals * ImportMap * range * assemblyName: string * (CcuThunk * string list * string list) list -> TcEnv val AddCcuToTcEnv : TcGlobals * ImportMap * range * TcEnv * assemblyName: string * ccu: CcuThunk * autoOpens: string list * internalsVisibleToAttributes: string list -> TcEnv val AddLocalRootModuleOrNamespace : NameResolution.TcResultsSink -> TcGlobals -> ImportMap -> range -> TcEnv -> ModuleOrNamespaceType -> TcEnv -val TcOpenDecl : NameResolution.TcResultsSink -> TcGlobals -> ImportMap -> range -> range -> TcEnv -> Ast.LongIdent -> TcEnv +val TcOpenDecl : NameResolution.TcResultsSink -> TcGlobals -> ImportMap -> range -> range -> TcEnv -> LongIdent -> TcEnv type TopAttribs = { mainMethodAttrs : Attribs; @@ -44,14 +39,14 @@ val EmptyTopAttrs : TopAttribs val CombineTopAttrs : TopAttribs -> TopAttribs -> TopAttribs val TypeCheckOneImplFile : - TcGlobals * NiceNameGenerator * ImportMap * CcuThunk * (unit -> bool) * ConditionalDefines * NameResolution.TcResultsSink + TcGlobals * NiceNameGenerator * ImportMap * CcuThunk * (unit -> bool) * ConditionalDefines * NameResolution.TcResultsSink * bool -> TcEnv -> Tast.ModuleOrNamespaceType option -> ParsedImplFileInput - -> Eventually + -> Eventually val TypeCheckOneSigFile : - TcGlobals * NiceNameGenerator * ImportMap * CcuThunk * (unit -> bool) * ConditionalDefines * NameResolution.TcResultsSink + TcGlobals * NiceNameGenerator * ImportMap * CcuThunk * (unit -> bool) * ConditionalDefines * NameResolution.TcResultsSink * bool -> TcEnv -> ParsedSigFileInput -> Eventually @@ -84,7 +79,6 @@ exception FunctionValueUnexpected of DisplayEnv * TType * range exception UnionPatternsBindDifferentNames of range exception VarBoundTwice of Ast.Ident exception ValueRestriction of DisplayEnv * bool * Val * Typar * range -exception FieldNotMutable of DisplayEnv * RecdFieldRef * range exception ValNotMutable of DisplayEnv * ValRef * range exception ValNotLocal of DisplayEnv * ValRef * range exception InvalidRuntimeCoercion of DisplayEnv * TType * TType * range @@ -112,6 +106,4 @@ exception InvalidInternalsVisibleToAssemblyName of (*badName*)string * (*fileNam val TcFieldInit : range -> ILFieldInit -> Tast.Const -val IsSecurityAttribute : TcGlobals -> ImportMap -> Dictionary -> Attrib -> range -> bool -val IsSecurityCriticalAttribute : TcGlobals -> Attrib -> bool val LightweightTcValForUsingInBuildMethodCall : g : TcGlobals -> vref:ValRef -> vrefFlags : ValUseFlag -> vrefTypeInst : TTypes -> m : range -> Expr * TType \ No newline at end of file diff --git a/src/fsharp/TypeRelations.fs b/src/fsharp/TypeRelations.fs index ceb8ca810b0..43944d7a92f 100755 --- a/src/fsharp/TypeRelations.fs +++ b/src/fsharp/TypeRelations.fs @@ -4,13 +4,11 @@ /// constraint solving and method overload resolution. module internal Microsoft.FSharp.Compiler.TypeRelations -open Microsoft.FSharp.Compiler open Microsoft.FSharp.Compiler.AbstractIL.Internal open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library open Microsoft.FSharp.Compiler.ErrorLogger open Microsoft.FSharp.Compiler.Tast open Microsoft.FSharp.Compiler.Tastops -open Microsoft.FSharp.Compiler.Tastops.DebugPrint open Microsoft.FSharp.Compiler.TcGlobals open Microsoft.FSharp.Compiler.Infos open Microsoft.FSharp.Compiler.PrettyNaming @@ -29,7 +27,7 @@ open Microsoft.FSharp.Compiler.PrettyNaming // ilxgen.fs: GenCoerce (omit unnecessary castclass or isinst instruction) // let rec TypeDefinitelySubsumesTypeNoCoercion ndeep g amap m ty1 ty2 = - if ndeep > 100 then error(InternalError("recursive class hierarchy (detected in TypeDefinitelySubsumesTypeNoCoercion), ty1 = "^(DebugPrint.showType ty1),m)) + if ndeep > 100 then error(InternalError("recursive class hierarchy (detected in TypeDefinitelySubsumesTypeNoCoercion), ty1 = " + (DebugPrint.showType ty1), m)) if ty1 === ty2 then true // QUERY : quadratic elif typeEquiv g ty1 ty2 then true @@ -68,7 +66,7 @@ type CanCoerce = CanCoerce | NoCoerce /// The feasible equivalence relation. Part of the language spec. let rec TypesFeasiblyEquiv ndeep g amap m ty1 ty2 = - if ndeep > 100 then error(InternalError("recursive class hierarchy (detected in TypeFeasiblySubsumesType), ty1 = "^(DebugPrint.showType ty1),m)); + if ndeep > 100 then error(InternalError("recursive class hierarchy (detected in TypeFeasiblySubsumesType), ty1 = " + (DebugPrint.showType ty1), m)); let ty1 = stripTyEqns g ty1 let ty2 = stripTyEqns g ty2 match ty1,ty2 with @@ -90,7 +88,7 @@ let rec TypesFeasiblyEquiv ndeep g amap m ty1 ty2 = /// The feasible coercion relation. Part of the language spec. let rec TypeFeasiblySubsumesType ndeep g amap m ty1 canCoerce ty2 = - if ndeep > 100 then error(InternalError("recursive class hierarchy (detected in TypeFeasiblySubsumesType), ty1 = "^(DebugPrint.showType ty1),m)) + if ndeep > 100 then error(InternalError("recursive class hierarchy (detected in TypeFeasiblySubsumesType), ty1 = " + (DebugPrint.showType ty1), m)) let ty1 = stripTyEqns g ty1 let ty2 = stripTyEqns g ty2 match ty1,ty2 with @@ -143,8 +141,7 @@ let ChooseTyparSolutionAndRange (g: TcGlobals) amap (tp:Typar) = match tpc with | TyparConstraint.CoercesTo(x,m) -> join m x,m - | TyparConstraint.MayResolveMember(TTrait(_,nm,_,_,_,_),m) -> - errorR(Error(FSComp.SR.typrelCannotResolveAmbiguityInOverloadedOperator(DemangleOperatorName nm),m)) + | TyparConstraint.MayResolveMember(TTrait(_,_,_,_,_,_),m) -> maxSoFar,m | TyparConstraint.SimpleChoice(_,m) -> errorR(Error(FSComp.SR.typrelCannotResolveAmbiguityInPrintf(),m)) diff --git a/src/fsharp/UnicodeLexing.fs b/src/fsharp/UnicodeLexing.fs index 254eb8dd338..b6013c0342d 100644 --- a/src/fsharp/UnicodeLexing.fs +++ b/src/fsharp/UnicodeLexing.fs @@ -47,7 +47,7 @@ let UnicodeFileAsLexbuf (filename,codePage : int option, retryLocked:bool) : Le use reader = match codePage with | None -> new StreamReader(stream,true) - | Some n -> new StreamReader(stream,System.Text.Encoding.GetEncodingShim(n)) + | Some n -> new StreamReader(stream,System.Text.Encoding.GetEncoding(n)) reader.ReadToEnd() with // We can get here if the file is locked--like when VS is saving a file--we don't have direct diff --git a/src/fsharp/ast.fs b/src/fsharp/ast.fs index 28420b5d98b..59dddd88122 100644 --- a/src/fsharp/ast.fs +++ b/src/fsharp/ast.fs @@ -1,10 +1,6 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -#if COMPILER_PUBLIC_API module public Microsoft.FSharp.Compiler.Ast -#else -module internal Microsoft.FSharp.Compiler.Ast -#endif open System.Collections.Generic open Internal.Utilities.Text.Lexing @@ -104,7 +100,7 @@ type XmlDoc = | (lineA::rest) as lines -> let lineAT = lineA.TrimStart([|' '|]) if lineAT = "" then processLines rest - else if String.hasPrefix lineAT "<" then lines + else if lineAT.StartsWithOrdinal("<") then lines else [""] @ (lines |> List.map (fun line -> Microsoft.FSharp.Core.XmlAdapters.escape(line))) @ [""] @@ -180,7 +176,7 @@ type LongIdentWithDots = | LongIdentWithDots([],_) -> failwith "rangeOfLidwd" | LongIdentWithDots([id],_) -> id.idRange | LongIdentWithDots(h::t,dotms) -> - let nonExtraDots = if dotms.Length = t.Length then dotms else List.take t.Length dotms + let nonExtraDots = if dotms.Length = t.Length then dotms else List.truncate t.Length dotms unionRanges h.idRange (List.last t).idRange |> unionRanges (List.last nonExtraDots) //------------------------------------------------------------------------ @@ -561,7 +557,7 @@ and | MatchLambda of isExnMatch:bool * range * SynMatchClause list * matchSeqPoint:SequencePointInfoForBinding * range:range /// F# syntax: match expr with pat1 -> expr | ... | patN -> exprN - | Match of matchSeqPoint:SequencePointInfoForBinding * expr:SynExpr * clauses:SynMatchClause list * isExnMatch:bool * range:range (* bool indicates if this is an exception match in a computation expression which throws unmatched exceptions *) + | Match of matchSeqPoint:SequencePointInfoForBinding * expr:SynExpr * clauses:SynMatchClause list * range:range (* bool indicates if this is an exception match in a computation expression which throws unmatched exceptions *) /// F# syntax: do expr | Do of expr:SynExpr * range:range @@ -633,6 +629,9 @@ and /// F# syntax: expr.ident...ident <- expr | DotSet of SynExpr * longDotId:LongIdentWithDots * SynExpr * range:range + /// F# syntax: expr <- expr + | Set of SynExpr * SynExpr * range:range + /// F# syntax: expr.[expr,...,expr] | DotIndexedGet of SynExpr * SynIndexerArg list * range * range:range @@ -696,6 +695,9 @@ and /// Computation expressions only | LetOrUseBang of bindSeqPoint:SequencePointInfoForBinding * isUse:bool * isFromSource:bool * SynPat * SynExpr * SynExpr * range:range + /// F# syntax: match! expr with pat1 -> expr | ... | patN -> exprN + | MatchBang of matchSeqPoint:SequencePointInfoForBinding * expr:SynExpr * clauses:SynMatchClause list * range:range (* bool indicates if this is an exception match in a computation expression which throws unmatched exceptions *) + /// F# syntax: do! expr /// Computation expressions only | DoBang of expr:SynExpr * range:range @@ -764,6 +766,7 @@ and | SynExpr.DotIndexedSet (range=m) | SynExpr.DotGet (range=m) | SynExpr.DotSet (range=m) + | SynExpr.Set (range=m) | SynExpr.DotNamedIndexedPropertySet (range=m) | SynExpr.LibraryOnlyUnionCaseFieldGet (range=m) | SynExpr.LibraryOnlyUnionCaseFieldSet (range=m) @@ -783,6 +786,7 @@ and | SynExpr.YieldOrReturn (range=m) | SynExpr.YieldOrReturnFrom (range=m) | SynExpr.LetOrUseBang (range=m) + | SynExpr.MatchBang (range=m) | SynExpr.DoBang (range=m) | SynExpr.Fixed (range=m) -> m | SynExpr.Ident id -> id.idRange @@ -824,6 +828,7 @@ and | SynExpr.DotIndexedGet (range=m) | SynExpr.DotIndexedSet (range=m) | SynExpr.DotSet (range=m) + | SynExpr.Set (range=m) | SynExpr.DotNamedIndexedPropertySet (range=m) | SynExpr.LibraryOnlyUnionCaseFieldGet (range=m) | SynExpr.LibraryOnlyUnionCaseFieldSet (range=m) @@ -843,6 +848,7 @@ and | SynExpr.YieldOrReturn (range=m) | SynExpr.YieldOrReturnFrom (range=m) | SynExpr.LetOrUseBang (range=m) + | SynExpr.MatchBang (range=m) | SynExpr.DoBang (range=m) -> m | SynExpr.DotGet (expr,_,lidwd,m) -> if lidwd.ThereIsAnExtraDotAtTheEnd then unionRanges expr.Range lidwd.RangeSansAnyExtraDot else m | SynExpr.LongIdent (_,lidwd,_,_) -> lidwd.RangeSansAnyExtraDot @@ -886,6 +892,7 @@ and | SynExpr.DotIndexedSet (range=m) | SynExpr.DotGet (range=m) | SynExpr.DotSet (range=m) + | SynExpr.Set (range=m) | SynExpr.DotNamedIndexedPropertySet (range=m) | SynExpr.LibraryOnlyUnionCaseFieldGet (range=m) | SynExpr.LibraryOnlyUnionCaseFieldSet (range=m) @@ -905,6 +912,7 @@ and | SynExpr.YieldOrReturn (range=m) | SynExpr.YieldOrReturnFrom (range=m) | SynExpr.LetOrUseBang (range=m) + | SynExpr.MatchBang (range=m) | SynExpr.DoBang (range=m) -> m // these are better than just .Range, and also commonly applicable inside queries | SynExpr.Paren(_,m,_,_) -> m @@ -1694,7 +1702,7 @@ let rec SimplePatOfPat (synArgNameGenerator: SynArgNameGenerator) p = SynSimplePat.Id (id,altNameRefCell,isCompGen,false,false,id.idRange), Some (fun e -> let clause = Clause(p,None,e,m,SuppressSequencePointAtTarget) - SynExpr.Match(NoSequencePointAtInvisibleBinding,item,[clause],false,clause.Range)) + SynExpr.Match(NoSequencePointAtInvisibleBinding,item,[clause],clause.Range)) let appFunOpt funOpt x = match funOpt with None -> x | Some f -> f x let composeFunOpt funOpt1 funOpt2 = match funOpt2 with None -> funOpt1 | Some f -> Some (fun x -> appFunOpt funOpt1 (f x)) @@ -1804,11 +1812,23 @@ let mkSynInfix opm (l:SynExpr) oper (r:SynExpr) = let firstTwoRange = unionRanges l.Range opm let wholeRange = unionRanges l.Range r.Range SynExpr.App (ExprAtomicFlag.NonAtomic, false, SynExpr.App (ExprAtomicFlag.NonAtomic, true, mkSynOperator opm oper, l, firstTwoRange), r, wholeRange) + let mkSynBifix m oper x1 x2 = SynExpr.App (ExprAtomicFlag.NonAtomic, false, SynExpr.App (ExprAtomicFlag.NonAtomic, true, mkSynOperator m oper,x1,m), x2,m) let mkSynTrifix m oper x1 x2 x3 = SynExpr.App (ExprAtomicFlag.NonAtomic, false, SynExpr.App (ExprAtomicFlag.NonAtomic, false, SynExpr.App (ExprAtomicFlag.NonAtomic, true, mkSynOperator m oper,x1,m), x2,m), x3,m) let mkSynQuadfix m oper x1 x2 x3 x4 = SynExpr.App (ExprAtomicFlag.NonAtomic, false, SynExpr.App (ExprAtomicFlag.NonAtomic, false, SynExpr.App (ExprAtomicFlag.NonAtomic, false, SynExpr.App (ExprAtomicFlag.NonAtomic, true, mkSynOperator m oper,x1,m), x2,m), x3,m),x4,m) let mkSynQuinfix m oper x1 x2 x3 x4 x5 = SynExpr.App (ExprAtomicFlag.NonAtomic, false, SynExpr.App (ExprAtomicFlag.NonAtomic, false, SynExpr.App (ExprAtomicFlag.NonAtomic, false, SynExpr.App (ExprAtomicFlag.NonAtomic, false, SynExpr.App (ExprAtomicFlag.NonAtomic, true, mkSynOperator m oper,x1,m), x2,m), x3,m),x4,m),x5,m) -let mkSynPrefix opm m oper x = SynExpr.App (ExprAtomicFlag.NonAtomic, false, mkSynOperator opm oper, x,m) + +let mkSynPrefixPrim opm m oper x = + SynExpr.App (ExprAtomicFlag.NonAtomic, false, mkSynOperator opm oper, x,m) + +let mkSynPrefix opm m oper x = + if oper = "~&" then + SynExpr.AddressOf(true,x,opm,m) + elif oper = "~&&" then + SynExpr.AddressOf(false,x,opm,m) + else + mkSynPrefixPrim opm m oper x + let mkSynCaseName m n = [mkSynId m (CompileOpName n)] let mkSynApp1 f x1 m = SynExpr.App(ExprAtomicFlag.NonAtomic,false,f,x1,m) @@ -1855,7 +1875,8 @@ let mkSynAssign (l: SynExpr) (r: SynExpr) = mkSynDotParenSet m a b r | SynExpr.App (_, _, SynExpr.LongIdent(false,v,None,_),x,_) -> SynExpr.NamedIndexedPropertySet (v,x,r,m) | SynExpr.App (_, _, SynExpr.DotGet(e,_,v,_),x,_) -> SynExpr.DotNamedIndexedPropertySet (e,v,x,r,m) - | _ -> errorR(Error(FSComp.SR.astInvalidExprLeftHandOfAssignment(), m)); l // return just the LHS, so the typechecker can see it and capture expression typings that may be useful for dot lookups + | l -> SynExpr.Set (l,r,m) + //| _ -> errorR(Error(FSComp.SR.astInvalidExprLeftHandOfAssignment(), m)); l // return just the LHS, so the typechecker can see it and capture expression typings that may be useful for dot lookups let rec mkSynDot dotm m l r = match l with @@ -2194,9 +2215,14 @@ type IParseState with member internal x.SynArgNameGenerator = let key = "SynArgNameGenerator" let bls = x.LexBuffer.BufferLocalStore - if not (bls.ContainsKey key) then - bls.[key] <- box (SynArgNameGenerator()) - bls.[key] :?> SynArgNameGenerator + let gen = + match bls.TryGetValue(key) with + | true, gen -> gen + | _ -> + let gen = box (SynArgNameGenerator()) + bls.[key] <- gen + gen + gen :?> SynArgNameGenerator /// Reset the generator used for compiler-generated argument names. member internal x.ResetSynArgNameGenerator() = x.SynArgNameGenerator.Reset() @@ -2212,18 +2238,25 @@ module LexbufLocalXmlDocStore = lexbuf.BufferLocalStore.[xmlDocKey] <- box (XmlDocCollector()) /// Called from the lexer to save a single line of XML doc comment. - let internal SaveXmlDocLine (lexbuf:Lexbuf, lineText, pos) = - if not (lexbuf.BufferLocalStore.ContainsKey(xmlDocKey)) then - lexbuf.BufferLocalStore.[xmlDocKey] <- box (XmlDocCollector()) - let collector = unbox(lexbuf.BufferLocalStore.[xmlDocKey]) - collector.AddXmlDocLine (lineText, pos) + let internal SaveXmlDocLine (lexbuf:Lexbuf, lineText, pos) = + let collector = + match lexbuf.BufferLocalStore.TryGetValue(xmlDocKey) with + | true, collector -> collector + | _ -> + let collector = box (XmlDocCollector()) + lexbuf.BufferLocalStore.[xmlDocKey] <- collector + collector + let collector = unbox(collector) + collector.AddXmlDocLine(lineText, pos) /// Called from the parser each time we parse a construct that marks the end of an XML doc comment range, /// e.g. a 'type' declaration. The markerRange is the range of the keyword that delimits the construct. - let internal GrabXmlDocBeforeMarker (lexbuf:Lexbuf, markerRange:range) = - if lexbuf.BufferLocalStore.ContainsKey(xmlDocKey) then - PreXmlDoc.CreateFromGrabPoint(unbox(lexbuf.BufferLocalStore.[xmlDocKey]),markerRange.End) - else + let internal GrabXmlDocBeforeMarker (lexbuf:Lexbuf, markerRange:range) = + match lexbuf.BufferLocalStore.TryGetValue(xmlDocKey) with + | true, collector -> + let collector = unbox(collector) + PreXmlDoc.CreateFromGrabPoint(collector, markerRange.End) + | _ -> PreXmlDoc.Empty @@ -2243,9 +2276,12 @@ type NiceNameGenerator() = member x.FreshCompilerGeneratedName (name,m:range) = lock lockObj (fun () -> let basicName = GetBasicNameOfPossibleCompilerGeneratedName name - let n = (if basicNameCounts.ContainsKey basicName then basicNameCounts.[basicName] else 0) + let n = + match basicNameCounts.TryGetValue(basicName) with + | true, count -> count + | _ -> 0 let nm = CompilerGeneratedNameSuffix basicName (string m.StartLine + (match n with 0 -> "" | n -> "-" + string n)) - basicNameCounts.[basicName] <- n+1 + basicNameCounts.[basicName] <- n + 1 nm) member x.Reset () = @@ -2269,17 +2305,21 @@ type StableNiceNameGenerator() = let basicNameCounts = new Dictionary(100) member x.GetUniqueCompilerGeneratedName (name,m:range,uniq) = - lock lockObj (fun () -> - let basicName = GetBasicNameOfPossibleCompilerGeneratedName name - if names.ContainsKey (basicName,uniq) then - names.[(basicName,uniq)] - else - let n = (if basicNameCounts.ContainsKey basicName then basicNameCounts.[basicName] else 0) - let nm = CompilerGeneratedNameSuffix basicName (string m.StartLine + (match n with 0 -> "" | n -> "-" + string n)) - names.[(basicName,uniq)] <- nm - basicNameCounts.[basicName] <- n+1 - nm - ) + lock lockObj (fun () -> + let basicName = GetBasicNameOfPossibleCompilerGeneratedName name + let key = basicName, uniq + match names.TryGetValue(key) with + | true, nm -> nm + | _ -> + let n = + match basicNameCounts.TryGetValue(basicName) with + | true, c -> c + | _ -> 0 + let nm = CompilerGeneratedNameSuffix basicName (string m.StartLine + (match n with 0 -> "" | n -> "-" + string n)) + names.[key] <- nm + basicNameCounts.[basicName] <- n + 1 + nm + ) member x.Reset () = lock lockObj (fun () -> @@ -2335,6 +2375,7 @@ let rec synExprContainsError inpExpr = | SynExpr.NamedIndexedPropertySet (_,e1,e2,_) | SynExpr.DotSet (e1,_,e2,_) + | SynExpr.Set (e1,e2,_) | SynExpr.LibraryOnlyUnionCaseFieldSet (e1,_,_,e2,_) | SynExpr.JoinIn (e1,_,e2,_) | SynExpr.App (_,_,e1,e2,_) -> @@ -2360,7 +2401,7 @@ let rec synExprContainsError inpExpr = walkMatchClauses cl | SynExpr.Lambda (_,_,_,e,_) -> walkExpr e - | SynExpr.Match (_,e,cl,_,_) -> + | SynExpr.Match (_,e,cl,_) -> walkExpr e || walkMatchClauses cl | SynExpr.LetOrUse (_,_,bs,e,_) -> walkBinds bs || walkExpr e @@ -2382,6 +2423,8 @@ let rec synExprContainsError inpExpr = | SynExpr.DotNamedIndexedPropertySet (e1,_,e2,e3,_) -> walkExpr e1 || walkExpr e2 || walkExpr e3 + | SynExpr.MatchBang (_,e,cl,_) -> + walkExpr e || walkMatchClauses cl | SynExpr.LetOrUseBang (_,_,_,_,e1,e2,_) -> walkExpr e1 || walkExpr e2 walkExpr inpExpr diff --git a/src/fsharp/autobox.fs b/src/fsharp/autobox.fs index 3bbdeec731f..4c929e006ce 100644 --- a/src/fsharp/autobox.fs +++ b/src/fsharp/autobox.fs @@ -2,10 +2,8 @@ module internal Microsoft.FSharp.Compiler.AutoBox -open Internal.Utilities open Microsoft.FSharp.Compiler.AbstractIL.Internal open Microsoft.FSharp.Compiler -open Microsoft.FSharp.Compiler.Range open Microsoft.FSharp.Compiler.ErrorLogger open Microsoft.FSharp.Compiler.Tast open Microsoft.FSharp.Compiler.Tastops @@ -34,7 +32,7 @@ let DecideLambda exprF cenv topValInfo expr ety z = match expr with | Expr.Lambda _ | Expr.TyLambda _ -> - let _tps,ctorThisValOpt,baseValOpt,vsl,body,_bodyty = destTopLambda cenv.g cenv.amap topValInfo (expr, ety) + let _tps, ctorThisValOpt, baseValOpt, vsl, body, _bodyty = destTopLambda cenv.g cenv.amap topValInfo (expr, ety) let snoc = fun x y -> y :: x let args = List.concat vsl let args = Option.fold snoc args baseValOpt @@ -46,20 +44,20 @@ let DecideLambda exprF cenv topValInfo expr ety z = | _ -> z ///Special cases where representation uses Lambda. -let DecideExprOp exprF z (op,tyargs,args) = +let DecideExprOp exprF z (op, tyargs, args) = (* Special cases *) - match op,tyargs,args with + match op, tyargs, args with // Handle these as special cases since mutables are allowed inside their bodies - | TOp.While _,_,[Expr.Lambda(_,_,_,[_],e1,_,_);Expr.Lambda(_,_,_,[_],e2,_,_)] -> + | TOp.While _, _, [Expr.Lambda(_, _, _, [_], e1, _, _);Expr.Lambda(_, _, _, [_], e2, _, _)] -> Some (exprF (exprF z e1) e2) - | TOp.TryFinally _,[_],[Expr.Lambda(_,_,_,[_],e1,_,_); Expr.Lambda(_,_,_,[_],e2,_,_)] -> + | TOp.TryFinally _, [_], [Expr.Lambda(_, _, _, [_], e1, _, _); Expr.Lambda(_, _, _, [_], e2, _, _)] -> Some (exprF (exprF z e1) e2) - | TOp.For(_),_,[Expr.Lambda(_,_,_,[_],e1,_,_);Expr.Lambda(_,_,_,[_],e2,_,_);Expr.Lambda(_,_,_,[_],e3,_,_)] -> + | TOp.For(_), _, [Expr.Lambda(_, _, _, [_], e1, _, _);Expr.Lambda(_, _, _, [_], e2, _, _);Expr.Lambda(_, _, _, [_], e3, _, _)] -> Some (exprF (exprF (exprF z e1) e2) e3) - | TOp.TryCatch _,[_],[Expr.Lambda(_,_,_,[_],e1,_,_); Expr.Lambda(_,_,_,[_],_e2,_,_); Expr.Lambda(_,_,_,[_],e3,_,_)] -> + | TOp.TryCatch _, [_], [Expr.Lambda(_, _, _, [_], e1, _, _); Expr.Lambda(_, _, _, [_], _e2, _, _); Expr.Lambda(_, _, _, [_], e3, _, _)] -> Some (exprF (exprF (exprF z e1) _e2) e3) // In Check code it said // e2; -- don't check filter body - duplicates logic in 'catch' body @@ -70,46 +68,46 @@ let DecideExprOp exprF z (op,tyargs,args) = /// Find all the mutable locals that escape a lambda expression or object expression let DecideExpr cenv exprF z expr = match expr with - | Expr.Lambda(_,_ctorThisValOpt,_baseValOpt,argvs,_,m,rty) -> - let topValInfo = ValReprInfo ([],[argvs |> List.map (fun _ -> ValReprInfo.unnamedTopArg1)],ValReprInfo.unnamedRetVal) + | Expr.Lambda(_, _ctorThisValOpt, _baseValOpt, argvs, _, m, rty) -> + let topValInfo = ValReprInfo ([], [argvs |> List.map (fun _ -> ValReprInfo.unnamedTopArg1)], ValReprInfo.unnamedRetVal) let ty = mkMultiLambdaTy m argvs rty let z = DecideLambda (Some exprF) cenv topValInfo expr ty z Some z - | Expr.TyLambda(_,tps,_,_m,rty) -> - let topValInfo = ValReprInfo (ValReprInfo.InferTyparInfo tps,[],ValReprInfo.unnamedRetVal) - let ty = tryMkForallTy tps rty + | Expr.TyLambda(_, tps, _, _m, rty) -> + let topValInfo = ValReprInfo (ValReprInfo.InferTyparInfo tps, [], ValReprInfo.unnamedRetVal) + let ty = mkForallTyIfNeeded tps rty let z = DecideLambda (Some exprF) cenv topValInfo expr ty z Some z - | Expr.Obj (_,_,baseValOpt,superInitCall,overrides,iimpls,_m) -> - let CheckMethod z (TObjExprMethod(_,_attribs,_tps,vs,body,_m)) = + | Expr.Obj (_, _, baseValOpt, superInitCall, overrides, iimpls, _m) -> + let CheckMethod z (TObjExprMethod(_, _attribs, _tps, vs, body, _m)) = let vs = List.concat vs let syntacticArgs = (match baseValOpt with Some x -> x:: vs | None -> vs) let z = Zset.union z (DecideEscapes syntacticArgs body) exprF z body - let CheckMethods z l = (z,l) ||> List.fold CheckMethod + let CheckMethods z l = (z, l) ||> List.fold CheckMethod - let CheckInterfaceImpl z (_ty,overrides) = CheckMethods z overrides + let CheckInterfaceImpl z (_ty, overrides) = CheckMethods z overrides let z = exprF z superInitCall let z = CheckMethods z overrides - let z = (z,iimpls) ||> List.fold CheckInterfaceImpl + let z = (z, iimpls) ||> List.fold CheckInterfaceImpl Some z - | Expr.Op (c,tyargs,args,_m) -> - DecideExprOp exprF z (c,tyargs,args) + | Expr.Op (c, tyargs, args, _m) -> + DecideExprOp exprF z (c, tyargs, args) | _ -> None /// Find all the mutable locals that escape a binding -let DecideBinding cenv z (TBind(v,expr,_m) as bind) = +let DecideBinding cenv z (TBind(v, expr, _m) as bind) = let topValInfo = match bind.Var.ValReprInfo with Some info -> info | _ -> ValReprInfo.emptyValData DecideLambda None cenv topValInfo expr v.Type z /// Find all the mutable locals that escape a set of bindings -let DecideBindings cenv z binds = (z,binds) ||> List.fold (DecideBinding cenv) +let DecideBindings cenv z binds = (z, binds) ||> List.fold (DecideBinding cenv) /// Find all the mutable locals to promote to reference cells in an implementation file let DecideImplFile g amap implFile = @@ -136,33 +134,33 @@ let TransformExpr g (nvs: ValMap<_>) exprF expr = match expr with // Rewrite uses of mutable values - | Expr.Val (ValDeref(v),_,m) when nvs.ContainsVal v -> + | Expr.Val (ValDeref(v), _, m) when nvs.ContainsVal v -> - let _nv,nve = nvs.[v] + let _nv, nve = nvs.[v] Some (mkRefCellGet g m v.Type nve) // Rewrite assignments to mutable values - | Expr.Op(TOp.LValueOp (LSet, ValDeref(v)) ,[],[arg],m) when nvs.ContainsVal v -> + | Expr.Op(TOp.LValueOp (LSet, ValDeref(v)), [], [arg], m) when nvs.ContainsVal v -> - let _nv,nve = nvs.[v] + let _nv, nve = nvs.[v] let arg = exprF arg Some (mkRefCellSet g m v.Type nve arg) // Rewrite taking the address of mutable values - | Expr.Op(TOp.LValueOp (LGetAddr,ValDeref(v)),[],[] ,m) when nvs.ContainsVal v -> + | Expr.Op(TOp.LValueOp (LAddrOf readonly, ValDeref(v)), [], [], m) when nvs.ContainsVal v -> let _nv,nve = nvs.[v] - Some (mkRecdFieldGetAddrViaExprAddr (nve,mkRefCellContentsRef g,[v.Type],m)) + Some (mkRecdFieldGetAddrViaExprAddr (readonly, nve, mkRefCellContentsRef g, [v.Type], m)) | _ -> None /// Rewrite bindings for mutable locals which we are transforming -let TransformBinding g (nvs: ValMap<_>) exprF (TBind(v,expr,m)) = +let TransformBinding g (nvs: ValMap<_>) exprF (TBind(v, expr, m)) = if nvs.ContainsVal v then - let nv,_nve = nvs.[v] + let nv, _nve = nvs.[v] let exprRange = expr.Range let expr = exprF expr - Some(TBind(nv, mkRefCell g exprRange v.Type expr,m)) + Some(TBind(nv, mkRefCell g exprRange v.Type expr, m)) else None @@ -173,7 +171,7 @@ let TransformImplFile g amap implFile = implFile else for fv in fvs do - warning (Error(FSComp.SR.abImplicitHeapAllocation(fv.DisplayName),fv.Range)) + warning (Error(FSComp.SR.abImplicitHeapAllocation(fv.DisplayName), fv.Range)) let nvs = [ for fv in fvs do @@ -185,9 +183,10 @@ let TransformImplFile g amap implFile = |> ValMap.OfList implFile |> - RewriteImplFile { PreIntercept = Some(TransformExpr g nvs) - PreInterceptBinding = Some(TransformBinding g nvs) - PostTransform = (fun _ -> None) - IsUnderQuotations = false } + RewriteImplFile + { PreIntercept = Some(TransformExpr g nvs) + PreInterceptBinding = Some(TransformBinding g nvs) + PostTransform = (fun _ -> None) + IsUnderQuotations = false } diff --git a/src/fsharp/fsc.fs b/src/fsharp/fsc.fs index e18f782dc21..e418b1bb9b1 100644 --- a/src/fsharp/fsc.fs +++ b/src/fsharp/fsc.fs @@ -30,11 +30,10 @@ open Internal.Utilities.Filename open Microsoft.FSharp.Compiler open Microsoft.FSharp.Compiler.AbstractIL open Microsoft.FSharp.Compiler.AbstractIL.IL +open Microsoft.FSharp.Compiler.AbstractIL.ILBinaryReader open Microsoft.FSharp.Compiler.AbstractIL.Internal -open Microsoft.FSharp.Compiler.AbstractIL.Extensions.ILX open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library open Microsoft.FSharp.Compiler.AbstractIL.Diagnostics -open Microsoft.FSharp.Compiler.AbstractIL.IL open Microsoft.FSharp.Compiler.IlxGen open Microsoft.FSharp.Compiler.AccessibilityLogic @@ -43,16 +42,13 @@ open Microsoft.FSharp.Compiler.Ast open Microsoft.FSharp.Compiler.CompileOps open Microsoft.FSharp.Compiler.CompileOptions open Microsoft.FSharp.Compiler.ErrorLogger -open Microsoft.FSharp.Compiler.Infos +open Microsoft.FSharp.Compiler.InfoReader open Microsoft.FSharp.Compiler.Lib -open Microsoft.FSharp.Compiler.DiagnosticMessage -open Microsoft.FSharp.Compiler.Optimizer open Microsoft.FSharp.Compiler.Range -open Microsoft.FSharp.Compiler.InfoReader -open Microsoft.FSharp.Compiler.TypeChecker open Microsoft.FSharp.Compiler.Tast open Microsoft.FSharp.Compiler.Tastops open Microsoft.FSharp.Compiler.TcGlobals +open Microsoft.FSharp.Compiler.TypeChecker #if !NO_EXTENSIONTYPING open Microsoft.FSharp.Compiler.ExtensionTyping @@ -171,10 +167,6 @@ type DisposablesTracker() = try i.Dispose() with _ -> () -//---------------------------------------------------------------------------- -// TypeCheck, AdjustForScriptCompile -//---------------------------------------------------------------------------- - let TypeCheck (ctok, tcConfig, tcImports, tcGlobals, errorLogger:ErrorLogger, assemblyName, niceNameGen, tcEnv0, inputs, exiter: Exiter) = try if isNil inputs then error(Error(FSComp.SR.fscNoImplementationFiles(), Range.rangeStartup)) @@ -210,7 +202,7 @@ let AdjustForScriptCompile(ctok, tcConfigB:TcConfigBuilder, commandLineSourceFil let AppendClosureInformation(filename) = if IsScript filename then - let closure = LoadClosure.ComputeClosureOfSourceFiles(ctok, tcConfig, [filename, rangeStartup], CodeContext.Compilation, lexResourceManager=lexResourceManager) + let closure = LoadClosure.ComputeClosureOfScriptFiles(ctok, tcConfig, [filename, rangeStartup], CodeContext.Compilation, lexResourceManager=lexResourceManager) // Record the references from the analysis of the script. The full resolutions are recorded as the corresponding #I paths used to resolve them // are local to the scripts and not added to the tcConfigB (they are added to localized clones of the tcConfigB). let references = closure.References |> List.collect snd |> List.filter (fun r->r.originalReference.Range<>range0 && r.originalReference.Range<>rangeStartup) @@ -219,7 +211,7 @@ let AdjustForScriptCompile(ctok, tcConfigB:TcConfigBuilder, commandLineSourceFil closure.SourceFiles |> List.map fst |> List.iter AddIfNotPresent closure.AllRootFileDiagnostics |> List.iter diagnosticSink - else AddIfNotPresent(filename) + else AddIfNotPresent(filename) // Find closure of .fsx files. commandLineSourceFiles |> List.iter AppendClosureInformation @@ -441,7 +433,7 @@ let EncodeInterfaceData(tcConfig: TcConfig, tcGlobals, exportRemapping, generate let useDataFiles = (tcConfig.useOptimizationDataFile || tcGlobals.compilingFslib) && not isIncrementalBuild if useDataFiles then let sigDataFileName = (Filename.chopExtension outfile)+".sigdata" - File.WriteAllBytes(sigDataFileName, resource.Bytes) + File.WriteAllBytes(sigDataFileName, resource.GetBytes()) let resources = [ resource ] let sigAttr = mkSignatureDataVersionAttr tcGlobals (IL.parseILVersion Internal.Utilities.FSharpEnvironment.FSharpBinaryMetadataFormatRevision) @@ -714,8 +706,8 @@ module AttributeHelpers = if deterministic && versionString.Contains("*") then errorR(Error(FSComp.SR.fscAssemblyWildcardAndDeterminism(attribName, versionString), Range.rangeStartup)) try Some (IL.parseILVersion versionString) - with e -> - warning(Error(FSComp.SR.fscBadAssemblyVersion(attribName, versionString), Range.rangeStartup)) + with e -> + // Warning will be reported by TypeChecker.fs None | _ -> None @@ -755,14 +747,8 @@ module MainModuleBuilder = // We want to write forwarders out for all injected types except for System.ITuple, which is internal // Forwarding System.ITuple will cause FxCop failures on 4.0 Set.union (Set.filter (fun t -> t <> "System.ITuple") injectedCompatTypes) typesForwardedToMscorlib |> - Seq.map (fun t -> - { ScopeRef = tcGlobals.ilg.primaryAssemblyScopeRef - Name = t - IsForwarder = true - Access = ILTypeDefAccess.Public - Nested = mkILNestedExportedTypes List.empty - CustomAttrs = mkILCustomAttrs List.empty }) |> - Seq.toList + Seq.map (fun t -> mkTypeForwarder (tcGlobals.ilg.primaryAssemblyScopeRef) t (mkILNestedExportedTypes List.empty) (mkILCustomAttrs List.empty) ILTypeDefAccess.Public ) + |> Seq.toList let createSystemNumericsExportList (tcConfig: TcConfig) (tcImports:TcImports) = let refNumericsDllName = @@ -780,33 +766,32 @@ module MainModuleBuilder = let systemNumericsAssemblyRef = ILAssemblyRef.Create(refNumericsDllName, aref.Hash, aref.PublicKey, aref.Retargetable, aref.Version, aref.Locale) typesForwardedToSystemNumerics |> Seq.map (fun t -> - { ScopeRef = ILScopeRef.Assembly(systemNumericsAssemblyRef) - Name = t - IsForwarder = true - Access = ILTypeDefAccess.Public - Nested = mkILNestedExportedTypes List.empty - CustomAttrs = mkILCustomAttrs List.empty }) |> + { ScopeRef = ILScopeRef.Assembly(systemNumericsAssemblyRef) + Name = t + Attributes = enum(0x00200000) ||| TypeAttributes.Public + Nested = mkILNestedExportedTypes [] + CustomAttrsStored = storeILCustomAttrs emptyILCustomAttrs + MetadataIndex = NoMetadataIdx }) |> Seq.toList | None -> [] - let fileVersion warn findStringAttr (assemblyVersion: ILVersionInfo) = + let fileVersion findStringAttr (assemblyVersion: ILVersionInfo) = let attrName = "System.Reflection.AssemblyFileVersionAttribute" match findStringAttr attrName with | None -> assemblyVersion | Some (AttributeHelpers.ILVersion(v)) -> v - | Some v -> - warn(Error(FSComp.SR.fscBadAssemblyVersion(attrName, v), Range.rangeStartup)) - //TODO compile error like c# compiler? + | Some _ -> + // Warning will be reported by TypeChecker.fs assemblyVersion - let productVersion warn findStringAttr (fileVersion: ILVersionInfo) = + let productVersion findStringAttr (fileVersion: ILVersionInfo) = let attrName = "System.Reflection.AssemblyInformationalVersionAttribute" let toDotted (v1, v2, v3, v4) = sprintf "%d.%d.%d.%d" v1 v2 v3 v4 match findStringAttr attrName with | None | Some "" -> fileVersion |> toDotted | Some (AttributeHelpers.ILVersion(v)) -> v |> toDotted | Some v -> - warn(Error(FSComp.SR.fscBadAssemblyVersion(attrName, v), Range.rangeStartup)) + // Warning will be reported by TypeChecker.fs v let productVersionToILVersionInfo (version: string) : ILVersionInfo = @@ -838,7 +823,7 @@ module MainModuleBuilder = let flags = match AttributeHelpers.TryFindIntAttribute tcGlobals "System.Reflection.AssemblyFlagsAttribute" topAttrs.assemblyAttrs with | Some f -> f | _ -> 0x0 // You're only allowed to set a locale if the assembly is a library - if (locale <> None && locale.Value <> "") && tcConfig.target <> Dll then + if (locale <> None && locale.Value <> "") && tcConfig.target <> CompilerTarget.Dll then error(Error(FSComp.SR.fscAssemblyCultureAttributeError(), rangeCmdArgs)) // Add the type forwarders to any .NET DLL post-.NET-2.0, to give binary compatibility @@ -850,7 +835,7 @@ module MainModuleBuilder = else [] - mkILSimpleModule assemblyName (GetGeneratedILModuleName tcConfig.target assemblyName) (tcConfig.target = Dll || tcConfig.target = Module) tcConfig.subsystemVersion tcConfig.useHighEntropyVA ilTypeDefs hashAlg locale flags (mkILExportedTypes exportedTypesList) metadataVersion + mkILSimpleModule assemblyName (GetGeneratedILModuleName tcConfig.target assemblyName) (tcConfig.target = CompilerTarget.Dll || tcConfig.target = CompilerTarget.Module) tcConfig.subsystemVersion tcConfig.useHighEntropyVA ilTypeDefs hashAlg locale flags (mkILExportedTypes exportedTypesList) metadataVersion let disableJitOptimizations = not (tcConfig.optSettings.jitOpt()) @@ -868,9 +853,10 @@ module MainModuleBuilder = [ ] let reflectedDefinitionResource = { Name=reflectedDefinitionResourceName - Location = ILResourceLocation.Local (fun () -> reflectedDefinitionBytes) + Location = ILResourceLocation.LocalOut reflectedDefinitionBytes Access= ILResourceAccess.Public - CustomAttrs = emptyILCustomAttrs } + CustomAttrsStored = storeILCustomAttrs emptyILCustomAttrs + MetadataIndex = NoMetadataIdx } reflectedDefinitionAttrs, reflectedDefinitionResource) |> List.unzip |> (fun (attrs, resource) -> List.concat attrs, resource) @@ -889,18 +875,18 @@ module MainModuleBuilder = // Make the manifest of the assembly let manifest = - if tcConfig.target = Module then None else + if tcConfig.target = CompilerTarget.Module then None else let man = mainModule.ManifestOfAssembly let ver = match assemVerFromAttrib with | None -> tcVersion | Some v -> v Some { man with Version= Some ver - CustomAttrs = manifestAttrs + CustomAttrsStored = storeILCustomAttrs manifestAttrs DisableJitOptimizations=disableJitOptimizations JitTracking= tcConfig.jitTracking IgnoreSymbolStoreSequencePoints = tcConfig.ignoreSymbolStoreSequencePoints - SecurityDecls=secDecls } + SecurityDeclsStored=storeILSecurityDecls secDecls } let resources = mkILResources @@ -911,9 +897,10 @@ module MainModuleBuilder = let bytes = FileSystem.ReadAllBytesShim file name, bytes, pub yield { Name=name - Location=ILResourceLocation.Local (fun () -> bytes) + Location=ILResourceLocation.LocalOut bytes Access=pub - CustomAttrs=emptyILCustomAttrs } + CustomAttrsStored=storeILCustomAttrs emptyILCustomAttrs + MetadataIndex = NoMetadataIdx } yield! reflectedDefinitionResources yield! intfDataResources @@ -923,7 +910,8 @@ module MainModuleBuilder = yield { Name=name Location=ILResourceLocation.File(ILModuleRef.Create(name=file, hasMetadata=false, hash=Some (sha1HashBytes (FileSystem.ReadAllBytesShim file))), 0) Access=pub - CustomAttrs=emptyILCustomAttrs } ] + CustomAttrsStored=storeILCustomAttrs emptyILCustomAttrs + MetadataIndex = NoMetadataIdx } ] let assemblyVersion = match tcConfig.version with @@ -945,9 +933,9 @@ module MainModuleBuilder = | Some text -> [(key, text)] | _ -> [] - let fileVersionInfo = fileVersion warning findAttr assemblyVersion + let fileVersionInfo = fileVersion findAttr assemblyVersion - let productVersionString = productVersion warning findAttr fileVersionInfo + let productVersionString = productVersion findAttr fileVersionInfo let stringFileInfo = // 000004b0: @@ -1024,30 +1012,31 @@ module MainModuleBuilder = #endif let nativeResources = [ for av in assemblyVersionResources findAttribute assemblyVersion do - yield Lazy<_>.CreateFromValue av + yield ILNativeResource.Out av if not(tcConfig.win32res = "") then - yield Lazy<_>.CreateFromValue (FileSystem.ReadAllBytesShim tcConfig.win32res) + yield ILNativeResource.Out (FileSystem.ReadAllBytesShim tcConfig.win32res) if tcConfig.includewin32manifest && not(win32Manifest = "") && not runningOnMono then - yield Lazy<_>.CreateFromValue [| yield! ResFileFormat.ResFileHeader() - yield! (ManifestResourceFormat.VS_MANIFEST_RESOURCE((FileSystem.ReadAllBytesShim win32Manifest), tcConfig.target = Dll)) |]] + yield ILNativeResource.Out [| yield! ResFileFormat.ResFileHeader() + yield! (ManifestResourceFormat.VS_MANIFEST_RESOURCE((FileSystem.ReadAllBytesShim win32Manifest), tcConfig.target = CompilerTarget.Dll)) |]] // Add attributes, version number, resources etc. {mainModule with StackReserveSize = tcConfig.stackReserveSize - Name = (if tcConfig.target = Module then Filename.fileNameOfPath outfile else mainModule.Name) - SubSystemFlags = (if tcConfig.target = WinExe then 2 else 3) + Name = (if tcConfig.target = CompilerTarget.Module then Filename.fileNameOfPath outfile else mainModule.Name) + SubSystemFlags = (if tcConfig.target = CompilerTarget.WinExe then 2 else 3) Resources= resources ImageBase = (match tcConfig.baseAddress with None -> 0x00400000l | Some b -> b) - IsDLL=(tcConfig.target = Dll || tcConfig.target=Module) + IsDLL=(tcConfig.target = CompilerTarget.Dll || tcConfig.target=CompilerTarget.Module) Platform = tcConfig.platform Is32Bit=(match tcConfig.platform with Some X86 -> true | _ -> false) Is64Bit=(match tcConfig.platform with Some AMD64 | Some IA64 -> true | _ -> false) Is32BitPreferred = if tcConfig.prefer32Bit && not tcConfig.target.IsExe then (error(Error(FSComp.SR.invalidPlatformTarget(), rangeCmdArgs))) else tcConfig.prefer32Bit - CustomAttrs= - mkILCustomAttrs - [ if tcConfig.target = Module then + CustomAttrsStored= + storeILCustomAttrs + (mkILCustomAttrs + [ if tcConfig.target = CompilerTarget.Module then yield! iattrs - yield! codegenResults.ilNetModuleAttrs ] + yield! codegenResults.ilNetModuleAttrs ]) NativeResources=nativeResources Manifest = manifest } @@ -1094,8 +1083,8 @@ module StaticLinker = [ for (_, depILModule) in dependentILModules do match depILModule.Manifest with | Some m -> - for ca in m.CustomAttrs.AsList do - if ca.Method.MethodRef.EnclosingTypeRef.FullName = typeof.FullName then + for ca in m.CustomAttrs.AsArray do + if ca.Method.MethodRef.DeclaringTypeRef.FullName = typeof.FullName then yield ca | _ -> () ] @@ -1133,7 +1122,6 @@ module StaticLinker = let moduls = ilxMainModule :: (List.map snd dependentILModules) - // NOTE: version resources from statically linked DLLs are dropped in the binary reader/writer let savedNativeResources = [ //yield! ilxMainModule.NativeResources for m in moduls do @@ -1152,8 +1140,8 @@ module StaticLinker = let ilxMainModule = { ilxMainModule with - Manifest = (let m = ilxMainModule.ManifestOfAssembly in Some {m with CustomAttrs = mkILCustomAttrs (m.CustomAttrs.AsList @ savedManifestAttrs) }) - CustomAttrs = mkILCustomAttrs [ for m in moduls do yield! m.CustomAttrs.AsList ] + Manifest = (let m = ilxMainModule.ManifestOfAssembly in Some {m with CustomAttrsStored = storeILCustomAttrs (mkILCustomAttrs (m.CustomAttrs.AsList @ savedManifestAttrs)) }) + CustomAttrsStored = storeILCustomAttrs (mkILCustomAttrs [ for m in moduls do yield! m.CustomAttrs.AsArray ]) TypeDefs = mkILTypeDefs (topTypeDef :: List.concat normalTypeDefs) Resources = mkILResources (savedResources @ ilxMainModule.Resources.AsList) NativeResources = savedNativeResources } @@ -1170,9 +1158,12 @@ module StaticLinker = let ilBinaryReader = let ilGlobals = mkILGlobals ILScopeRef.Local - let opts = { ILBinaryReader.mkDefault (ilGlobals) with - optimizeForMemory=tcConfig.optimizeForMemory - pdbPath = None } + let opts : ILReaderOptions = + { ilGlobals = ilGlobals + reduceMemoryUsage = tcConfig.reduceMemoryUsage + metadataOnly = MetadataOnlyFlag.No + tryGetMetadataSnapshot = (fun _ -> None) + pdbDirPath = None } ILBinaryReader.OpenILModuleReader mscorlib40 opts let tdefs1 = ilxMainModule.TypeDefs.AsList |> List.filter (fun td -> not (MainModuleBuilder.injectedCompatTypes.Contains(td.Name))) @@ -1199,14 +1190,14 @@ module StaticLinker = TypeDefs = mkILTypeDefs ([ for td in fakeModule.TypeDefs do - yield {td with - Methods = - td.Methods.AsList - |> List.map (fun md -> - {md with CustomAttrs = - mkILCustomAttrs (td.CustomAttrs.AsList |> List.filter (fun ilattr -> - ilattr.Method.EnclosingType.TypeRef.FullName <> "System.Runtime.TargetedPatchingOptOutAttribute") )}) - |> mkILMethods } ])} + let meths = td.Methods.AsList + |> List.map (fun md -> + md.With(customAttrs = + mkILCustomAttrs (td.CustomAttrs.AsList |> List.filter (fun ilattr -> + ilattr.Method.DeclaringType.TypeRef.FullName <> "System.Runtime.TargetedPatchingOptOutAttribute")))) + |> mkILMethods + let td = td.With(methods=meths) + yield td.With(methods=meths) ])} //ILAsciiWriter.output_module stdout fakeModule fakeModule.TypeDefs.AsList @@ -1225,7 +1216,7 @@ module StaticLinker = mutable visited: bool } // Find all IL modules that are to be statically linked given the static linking roots. - let FindDependentILModulesForStaticLinking (ctok, tcConfig:TcConfig, tcImports:TcImports, ilxMainModule) = + let FindDependentILModulesForStaticLinking (ctok, tcConfig:TcConfig, tcImports:TcImports, ilGlobals, ilxMainModule) = if not tcConfig.standalone && tcConfig.extraStaticLinkRoots.IsEmpty then [] else @@ -1256,7 +1247,31 @@ module StaticLinker = | ResolvedCcu ccu -> Some ccu | UnresolvedCcu(_ccuName) -> None - let modul = dllInfo.RawMetadata.TryGetRawILModule().Value + let fileName = dllInfo.FileName + let modul = + let pdbDirPathOption = + // We open the pdb file if one exists parallel to the binary we + // are reading, so that --standalone will preserve debug information. + if tcConfig.openDebugInformationForLaterStaticLinking then + let pdbDir = (try Filename.directoryName fileName with _ -> ".") + let pdbFile = (try Filename.chopExtension fileName with _ -> fileName)+".pdb" + if FileSystem.SafeExists pdbFile then + if verbose then dprintf "reading PDB file %s from directory %s during static linking\n" pdbFile pdbDir + Some pdbDir + else + None + else + None + + let opts : ILReaderOptions = + { ilGlobals = ilGlobals + metadataOnly = MetadataOnlyFlag.No // turn this off here as we need the actual IL code + reduceMemoryUsage = tcConfig.reduceMemoryUsage + pdbDirPath = pdbDirPathOption + tryGetMetadataSnapshot = (fun _ -> None) } + + let reader = ILBinaryReader.OpenILModuleReader dllInfo.FileName opts + reader.ILModuleDef let refs = if ilAssemRef.Name = GetFSharpCoreLibraryName() then @@ -1325,7 +1340,7 @@ module StaticLinker = | ResolvedCcu ccu -> Some ccu | UnresolvedCcu(_ccuName) -> None - let modul = dllInfo.RawMetadata.TryGetRawILModule().Value + let modul = dllInfo.RawMetadata.TryGetILModuleDef().Value yield (ccu, dllInfo.ILScopeRef, modul), (ilAssemRef.Name, provAssemStaticLinkInfo) | None -> () ] @@ -1357,7 +1372,7 @@ module StaticLinker = (fun ilxMainModule -> ReportTime tcConfig "Find assembly references" - let dependentILModules = FindDependentILModulesForStaticLinking (ctok, tcConfig, tcImports, ilxMainModule) + let dependentILModules = FindDependentILModulesForStaticLinking (ctok, tcConfig, tcImports, ilGlobals, ilxMainModule) ReportTime tcConfig "Static link" @@ -1416,17 +1431,20 @@ module StaticLinker = let generatedILTypeDefs = let rec buildRelocatedGeneratedType (ProviderGeneratedType(ilOrigTyRef, ilTgtTyRef, ch)) = let isNested = not (isNil ilTgtTyRef.Enclosing) - if allTypeDefsInProviderGeneratedAssemblies.ContainsKey ilOrigTyRef then - let ilOrigTypeDef = allTypeDefsInProviderGeneratedAssemblies.[ilOrigTyRef] + match allTypeDefsInProviderGeneratedAssemblies.TryGetValue(ilOrigTyRef) with + | true, ilOrigTypeDef -> if debugStaticLinking then printfn "Relocating %s to %s " ilOrigTyRef.QualifiedName ilTgtTyRef.QualifiedName - { ilOrigTypeDef with - Name = ilTgtTyRef.Name - Access = (match ilOrigTypeDef.Access with - | ILTypeDefAccess.Public when isNested -> ILTypeDefAccess.Nested ILMemberAccess.Public - | ILTypeDefAccess.Private when isNested -> ILTypeDefAccess.Nested ILMemberAccess.Assembly - | x -> x) - NestedTypes = mkILTypeDefs (List.map buildRelocatedGeneratedType ch) } - else + let ilOrigTypeDef = + if isNested then + ilOrigTypeDef + .WithAccess(match ilOrigTypeDef.Access with + | ILTypeDefAccess.Public -> ILTypeDefAccess.Nested ILMemberAccess.Public + | ILTypeDefAccess.Private -> ILTypeDefAccess.Nested ILMemberAccess.Private + | _ -> ilOrigTypeDef.Access) + else ilOrigTypeDef + ilOrigTypeDef.With(name = ilTgtTyRef.Name, + nestedTypes = mkILTypeDefs (List.map buildRelocatedGeneratedType ch)) + | _ -> // If there is no matching IL type definition, then make a simple container class if debugStaticLinking then printfn "Generating simple class '%s' because we didn't find an original type '%s' in a provider generated assembly" ilTgtTyRef.QualifiedName ilOrigTyRef.QualifiedName mkILSimpleClass ilGlobals (ilTgtTyRef.Name, (if isNested then ILTypeDefAccess.Nested ILMemberAccess.Public else ILTypeDefAccess.Public), emptyILMethods, emptyILFields, mkILTypeDefs (List.map buildRelocatedGeneratedType ch) , emptyILProperties, emptyILEvents, emptyILCustomAttrs, ILTypeInit.OnAny) @@ -1459,7 +1477,7 @@ module StaticLinker = (ltdefs, fresh, rtdefs) | (ltdefs, Some htd, rtdefs) -> (ltdefs, htd, rtdefs) - let htd = { htd with NestedTypes = implantTypeDef true htd.NestedTypes t td } + let htd = htd.With(nestedTypes = implantTypeDef true htd.NestedTypes t td) mkILTypeDefs (ltdefs @ [htd] @ rtdefs) let newTypeDefs = @@ -1478,7 +1496,7 @@ module StaticLinker = let ilOrigTyRef = mkILNestedTyRef (ilOrigScopeRef, enc, tdef.Name) if not (ilOrigTyRefsForProviderGeneratedTypesToRelocate.ContainsKey ilOrigTyRef) then if debugStaticLinking then printfn "Keep provided type %s in place because it wasn't relocated" ilOrigTyRef.QualifiedName - yield { tdef with NestedTypes = rw (enc@[tdef.Name]) tdef.NestedTypes } ] + yield tdef.With(nestedTypes = rw (enc@[tdef.Name]) tdef.NestedTypes) ] rw [] ilModule.TypeDefs (ccu, { ilModule with TypeDefs = ilTypeDefsAfterRemovingRelocatedTypes })) @@ -1622,7 +1640,7 @@ let CopyFSharpCore(outFile: string, referencedDlls: AssemblyReference list) = [] type Args<'T> = Args of 'T -let main0(ctok, argv, legacyReferenceResolver, bannerAlreadyPrinted, openBinariesInMemory:bool, defaultCopyFSharpCore: bool, exiter:Exiter, errorLoggerProvider : ErrorLoggerProvider, disposables : DisposablesTracker) = +let main0(ctok, argv, legacyReferenceResolver, bannerAlreadyPrinted, reduceMemoryUsage:ReduceMemoryFlag, defaultCopyFSharpCore: CopyFSharpCoreFlag, exiter:Exiter, errorLoggerProvider : ErrorLoggerProvider, disposables : DisposablesTracker) = // See Bug 735819 let lcidFromCodePage = @@ -1638,8 +1656,6 @@ let main0(ctok, argv, legacyReferenceResolver, bannerAlreadyPrinted, openBinarie let directoryBuildingFrom = Directory.GetCurrentDirectory() let setProcessThreadLocals tcConfigB = - tcConfigB.openBinariesInMemory <- openBinariesInMemory -#if PREFERRED_UI_LANG match tcConfigB.preferredUiLang with #if FX_RESHAPED_GLOBALIZATION | Some s -> System.Globalization.CultureInfo.CurrentUICulture <- new System.Globalization.CultureInfo(s) @@ -1647,11 +1663,6 @@ let main0(ctok, argv, legacyReferenceResolver, bannerAlreadyPrinted, openBinarie | Some s -> Thread.CurrentThread.CurrentUICulture <- new System.Globalization.CultureInfo(s) #endif | None -> () -#else - match tcConfigB.lcid with - | Some n -> Thread.CurrentThread.CurrentUICulture <- new CultureInfo(n) - | None -> () -#endif if tcConfigB.utf8output then Console.OutputEncoding <- Encoding.UTF8 @@ -1660,9 +1671,15 @@ let main0(ctok, argv, legacyReferenceResolver, bannerAlreadyPrinted, openBinarie if not bannerAlreadyPrinted then DisplayBannerText tcConfigB - let optimizeForMemory = false // optimizeForMemory - fsc.exe can use as much memory as it likes to try to compile as fast as possible + let tryGetMetadataSnapshot = (fun _ -> None) + + let tcConfigB = + TcConfigBuilder.CreateNew(legacyReferenceResolver, DefaultFSharpBinariesDir, + reduceMemoryUsage=reduceMemoryUsage, implicitIncludeDir=directoryBuildingFrom, + isInteractive=false, isInvalidationSupported=false, + defaultCopyFSharpCore=defaultCopyFSharpCore, + tryGetMetadataSnapshot=tryGetMetadataSnapshot) - let tcConfigB = TcConfigBuilder.CreateNew(legacyReferenceResolver, DefaultFSharpBinariesDir, optimizeForMemory, directoryBuildingFrom, isInteractive=false, isInvalidationSupported=false, defaultCopyFSharpCore=defaultCopyFSharpCore) // Preset: --optimize+ -g --tailcalls+ (see 4505) SetOptimizeSwitch tcConfigB OptionSwitch.On SetDebugSwitch tcConfigB None OptionSwitch.Off @@ -1691,7 +1708,6 @@ let main0(ctok, argv, legacyReferenceResolver, bannerAlreadyPrinted, openBinarie delayForFlagsLogger.ForwardDelayedDiagnostics(tcConfigB) exiter.Exit 1 - tcConfigB.sqmNumOfSourceFiles <- sourceFiles.Length tcConfigB.conditionalCompilationDefines <- "COMPILED" :: tcConfigB.conditionalCompilationDefines displayBannerIfNeeded tcConfigB @@ -1800,10 +1816,12 @@ let main0(ctok, argv, legacyReferenceResolver, bannerAlreadyPrinted, openBinarie Args (ctok, tcGlobals, tcImports, frameworkTcImports, tcState.Ccu, typedAssembly, topAttrs, tcConfig, outfile, pdbfile, assemblyName, errorLogger, exiter) -let main1(Args (ctok, tcGlobals, tcImports: TcImports, frameworkTcImports, generatedCcu, typedImplFiles, topAttrs, tcConfig: TcConfig, outfile, pdbfile, assemblyName, errorLogger, exiter: Exiter)) = +let main1(Args (ctok, tcGlobals, tcImports: TcImports, frameworkTcImports, generatedCcu: CcuThunk, typedImplFiles, topAttrs, tcConfig: TcConfig, outfile, pdbfile, assemblyName, errorLogger, exiter: Exiter)) = if tcConfig.typeCheckOnly then exiter.Exit 0 + generatedCcu.Contents.SetAttribs(generatedCcu.Contents.Attribs @ topAttrs.assemblyAttrs) + use unwindPhase = PushThreadBuildPhaseUntilUnwind BuildPhase.CodeGen let signingInfo = ValidateKeySigningAttributes (tcConfig, tcGlobals, topAttrs) @@ -1849,11 +1867,19 @@ let main1(Args (ctok, tcGlobals, tcImports: TcImports, frameworkTcImports, gener Args (ctok, tcConfig, tcImports, frameworkTcImports, tcGlobals, errorLogger, generatedCcu, outfile, typedImplFiles, topAttrs, pdbfile, assemblyName, assemVerFromAttrib, signingInfo, exiter) -// set up typecheck for given AST without parsing any command line parameters -let main1OfAst (ctok, legacyReferenceResolver, openBinariesInMemory, assemblyName, target, outfile, pdbFile, dllReferences, noframework, exiter, errorLoggerProvider: ErrorLoggerProvider, inputs : ParsedInput list) = +// This is for the compile-from-AST feature of FCS. +// TODO: consider removing this feature from FCS, which as far as I know is not used by anyone. +let main1OfAst (ctok, legacyReferenceResolver, reduceMemoryUsage, assemblyName, target, outfile, pdbFile, dllReferences, noframework, exiter, errorLoggerProvider: ErrorLoggerProvider, inputs : ParsedInput list) = + + let tryGetMetadataSnapshot = (fun _ -> None) + + let tcConfigB = + TcConfigBuilder.CreateNew(legacyReferenceResolver, DefaultFSharpBinariesDir, + reduceMemoryUsage=reduceMemoryUsage, implicitIncludeDir=Directory.GetCurrentDirectory(), + isInteractive=false, isInvalidationSupported=false, + defaultCopyFSharpCore=CopyFSharpCoreFlag.No, + tryGetMetadataSnapshot=tryGetMetadataSnapshot) - let tcConfigB = TcConfigBuilder.CreateNew(legacyReferenceResolver, DefaultFSharpBinariesDir, (*optimizeForMemory*) false, Directory.GetCurrentDirectory(), isInteractive=false, isInvalidationSupported=false, defaultCopyFSharpCore=false) - tcConfigB.openBinariesInMemory <- openBinariesInMemory tcConfigB.framework <- not noframework // Preset: --optimize+ -g --tailcalls+ (see 4505) SetOptimizeSwitch tcConfigB OptionSwitch.On @@ -1863,7 +1889,6 @@ let main1OfAst (ctok, legacyReferenceResolver, openBinariesInMemory, assemblyNam | None -> OptionSwitch.Off) SetTailcallSwitch tcConfigB OptionSwitch.On tcConfigB.target <- target - tcConfigB.sqmNumOfSourceFiles <- 1 let errorLogger = errorLoggerProvider.CreateErrorLoggerUpToMaxErrors (tcConfigB, exiter) @@ -1900,6 +1925,7 @@ let main1OfAst (ctok, legacyReferenceResolver, openBinariesInMemory, assemblyNam TypeCheck(ctok, tcConfig, tcImports, tcGlobals, errorLogger, assemblyName, NiceNameGenerator(), tcEnv0, inputs,exiter) let generatedCcu = tcState.Ccu + generatedCcu.Contents.SetAttribs(generatedCcu.Contents.Attribs @ topAttrs.assemblyAttrs) use unwindPhase = PushThreadBuildPhaseUntilUnwind (BuildPhase.CodeGen) let signingInfo = ValidateKeySigningAttributes (tcConfig, tcGlobals, topAttrs) @@ -1942,7 +1968,7 @@ let main2a(Args (ctok, tcConfig, tcImports, frameworkTcImports: TcImports, tcGlo let metadataVersion = match tcConfig.metadataVersion with | Some v -> v - | _ -> match (frameworkTcImports.DllTable.TryFind tcConfig.primaryAssembly.Name) with | Some ib -> ib.RawMetadata.TryGetRawILModule().Value.MetadataVersion | _ -> "" + | _ -> match (frameworkTcImports.DllTable.TryFind tcConfig.primaryAssembly.Name) with | Some ib -> ib.RawMetadata.TryGetILModuleDef().Value.MetadataVersion | _ -> "" let optimizedImpls, optimizationData, _ = ApplyAllOptimizations (tcConfig, tcGlobals, (LightweightTcValForUsingInBuildMethodCall tcGlobals), outfile, importMap, false, optEnv0, generatedCcu, typedImplFiles) AbortOnError(errorLogger, exiter) @@ -1972,26 +1998,24 @@ let main2b (tcImportsCapture,dynamicAssemblyCreator) (Args (ctok, tcConfig: TcCo use unwindBuildPhase = PushThreadBuildPhaseUntilUnwind BuildPhase.IlxGen let ilxGenerator = CreateIlxAssemblyGenerator (tcConfig, tcImports, tcGlobals, (LightweightTcValForUsingInBuildMethodCall tcGlobals), generatedCcu) - // Check if System.SerializableAttribute exists in mscorlib.dll, - // so that make sure the compiler only emits "serializable" bit into IL metadata when it is available. - // Note that SerializableAttribute may be relocated in the future but now resides in mscorlib. let codegenResults = GenerateIlxCode ((if Option.isSome dynamicAssemblyCreator then IlReflectBackend else IlWriteBackend), Option.isSome dynamicAssemblyCreator, false, tcConfig, topAttrs, optimizedImpls, generatedCcu.AssemblyName, ilxGenerator) let casApplied = new Dictionary() - let securityAttrs, topAssemblyAttrs = topAttrs.assemblyAttrs |> List.partition (fun a -> TypeChecker.IsSecurityAttribute tcGlobals (tcImports.GetImportMap()) casApplied a rangeStartup) + let securityAttrs, topAssemblyAttrs = topAttrs.assemblyAttrs |> List.partition (fun a -> IsSecurityAttribute tcGlobals (tcImports.GetImportMap()) casApplied a rangeStartup) + // remove any security attributes from the top-level assembly attribute list let topAttrs = {topAttrs with assemblyAttrs=topAssemblyAttrs} let permissionSets = ilxGenerator.CreatePermissionSets securityAttrs - let secDecls = if securityAttrs.Length > 0 then mkILSecurityDecls permissionSets else emptyILSecurityDecls + let secDecls = if List.isEmpty securityAttrs then emptyILSecurityDecls else mkILSecurityDecls permissionSets let ilxMainModule = MainModuleBuilder.CreateMainModule (ctok, tcConfig, tcGlobals, tcImports, pdbfile, assemblyName, outfile, topAttrs, idata, optDataResources, codegenResults, assemVerFromAttrib, metadataVersion, secDecls) AbortOnError(errorLogger, exiter) - + // Pass on only the minimum information required for the next phase - Args (ctok, tcConfig, tcGlobals, errorLogger, staticLinker, outfile, pdbfile, ilxMainModule, signingInfo, exiter) + Args (ctok, tcConfig, tcImports, tcGlobals, errorLogger, staticLinker, outfile, pdbfile, ilxMainModule, signingInfo, exiter) /// Phase 3: static linking -let main3(Args (ctok, tcConfig, tcGlobals, errorLogger: ErrorLogger, staticLinker, outfile, pdbfile, ilxMainModule, signingInfo, exiter:Exiter)) = +let main3(Args (ctok, tcConfig, tcImports, tcGlobals, errorLogger: ErrorLogger, staticLinker, outfile, pdbfile, ilxMainModule, signingInfo, exiter:Exiter)) = use unwindBuildPhase = PushThreadBuildPhaseUntilUnwind BuildPhase.Output @@ -2005,10 +2029,10 @@ let main3(Args (ctok, tcConfig, tcGlobals, errorLogger: ErrorLogger, staticLinke AbortOnError(errorLogger, exiter) // Pass on only the minimum information required for the next phase - Args (ctok, tcConfig, errorLogger, tcGlobals, ilxMainModule, outfile, pdbfile, signingInfo, exiter) + Args (ctok, tcConfig, tcImports, tcGlobals, errorLogger, ilxMainModule, outfile, pdbfile, signingInfo, exiter) /// Phase 4: write the binaries -let main4 dynamicAssemblyCreator (Args (ctok, tcConfig, errorLogger: ErrorLogger, tcGlobals: TcGlobals, ilxMainModule, outfile, pdbfile, signingInfo, exiter: Exiter)) = +let main4 dynamicAssemblyCreator (Args (ctok, tcConfig, tcImports: TcImports, tcGlobals: TcGlobals, errorLogger: ErrorLogger, ilxMainModule, outfile, pdbfile, signingInfo, exiter: Exiter)) = ReportTime tcConfig "Write .NET Binary" use unwindBuildPhase = PushThreadBuildPhaseUntilUnwind BuildPhase.Output let outfile = tcConfig.MakePathAbsolute outfile @@ -2017,6 +2041,14 @@ let main4 dynamicAssemblyCreator (Args (ctok, tcConfig, errorLogger: ErrorLogger let pdbfile = pdbfile |> Option.map (tcConfig.MakePathAbsolute >> Path.GetFullPath) + let normalizeAssemblyRefs (aref:ILAssemblyRef) = + match tcImports.TryFindDllInfo (ctok, Range.rangeStartup, aref.Name, lookupOnly=false) with + | Some dllInfo -> + match dllInfo.ILScopeRef with + | ILScopeRef.Assembly ref -> ref + | _ -> aref + | None -> aref + match dynamicAssemblyCreator with | None -> try @@ -2035,7 +2067,9 @@ let main4 dynamicAssemblyCreator (Args (ctok, tcConfig, errorLogger: ErrorLogger sourceLink = tcConfig.sourceLink signer = GetStrongNameSigner signingInfo dumpDebugInfo = tcConfig.dumpDebugInfo }, - ilxMainModule) + ilxMainModule, + normalizeAssemblyRefs + ) with Failure msg -> error(Error(FSComp.SR.fscProblemWritingBinary(outfile, msg), rangeCmdArgs)) with e -> @@ -2046,7 +2080,7 @@ let main4 dynamicAssemblyCreator (Args (ctok, tcConfig, errorLogger: ErrorLogger AbortOnError(errorLogger, exiter) // Don't copy referenced FSharp.core.dll if we are building FSharp.Core.dll - if tcConfig.copyFSharpCore && not tcConfig.compilingFslib && not tcConfig.standalone then + if (tcConfig.copyFSharpCore = CopyFSharpCoreFlag.Yes) && not tcConfig.compilingFslib && not tcConfig.standalone then CopyFSharpCore(outfile, tcConfig.referencedDLLs) ReportTime tcConfig "Exiting" @@ -2056,12 +2090,12 @@ let main4 dynamicAssemblyCreator (Args (ctok, tcConfig, errorLogger: ErrorLogger //----------------------------------------------------------------------------- /// Entry point typecheckAndCompile -let typecheckAndCompile (ctok, argv, legacyReferenceResolver, bannerAlreadyPrinted, openBinariesInMemory, defaultCopyFSharpCore, exiter:Exiter, errorLoggerProvider, tcImportsCapture, dynamicAssemblyCreator) = +let typecheckAndCompile (ctok, argv, legacyReferenceResolver, bannerAlreadyPrinted, reduceMemoryUsage, defaultCopyFSharpCore, exiter:Exiter, errorLoggerProvider, tcImportsCapture, dynamicAssemblyCreator) = use d = new DisposablesTracker() use e = new SaveAndRestoreConsoleEncoding() - main0(ctok, argv, legacyReferenceResolver, bannerAlreadyPrinted, openBinariesInMemory, defaultCopyFSharpCore, exiter, errorLoggerProvider, d) + main0(ctok, argv, legacyReferenceResolver, bannerAlreadyPrinted, reduceMemoryUsage, defaultCopyFSharpCore, exiter, errorLoggerProvider, d) |> main1 |> main2a |> main2b (tcImportsCapture,dynamicAssemblyCreator) @@ -2069,14 +2103,14 @@ let typecheckAndCompile (ctok, argv, legacyReferenceResolver, bannerAlreadyPrint |> main4 dynamicAssemblyCreator -let compileOfAst (ctok, legacyReferenceResolver, openBinariesInMemory, assemblyName, target, outFile, pdbFile, dllReferences, noframework, exiter, errorLoggerProvider, inputs, tcImportsCapture, dynamicAssemblyCreator) = - main1OfAst (ctok, legacyReferenceResolver, openBinariesInMemory, assemblyName, target, outFile, pdbFile, dllReferences, noframework, exiter, errorLoggerProvider, inputs) +let compileOfAst (ctok, legacyReferenceResolver, reduceMemoryUsage, assemblyName, target, outFile, pdbFile, dllReferences, noframework, exiter, errorLoggerProvider, inputs, tcImportsCapture, dynamicAssemblyCreator) = + main1OfAst (ctok, legacyReferenceResolver, reduceMemoryUsage, assemblyName, target, outFile, pdbFile, dllReferences, noframework, exiter, errorLoggerProvider, inputs) |> main2a |> main2b (tcImportsCapture, dynamicAssemblyCreator) |> main3 |> main4 dynamicAssemblyCreator -let mainCompile (ctok, argv, legacyReferenceResolver, bannerAlreadyPrinted, openBinariesInMemory, defaultCopyFSharpCore, exiter, errorLoggerProvider, tcImportsCapture, dynamicAssemblyCreator) = +let mainCompile (ctok, argv, legacyReferenceResolver, bannerAlreadyPrinted, reduceMemoryUsage, defaultCopyFSharpCore, exiter, errorLoggerProvider, tcImportsCapture, dynamicAssemblyCreator) = //System.Runtime.GCSettings.LatencyMode <- System.Runtime.GCLatencyMode.Batch - typecheckAndCompile(ctok, argv, legacyReferenceResolver, bannerAlreadyPrinted, openBinariesInMemory, defaultCopyFSharpCore, exiter, errorLoggerProvider, tcImportsCapture, dynamicAssemblyCreator) + typecheckAndCompile(ctok, argv, legacyReferenceResolver, bannerAlreadyPrinted, reduceMemoryUsage, defaultCopyFSharpCore, exiter, errorLoggerProvider, tcImportsCapture, dynamicAssemblyCreator) diff --git a/src/fsharp/fsc.fsi b/src/fsharp/fsc.fsi index 148d29c9f2b..2e20a700cd0 100755 --- a/src/fsharp/fsc.fsi +++ b/src/fsharp/fsc.fsi @@ -4,13 +4,12 @@ module internal Microsoft.FSharp.Compiler.Driver open Microsoft.FSharp.Compiler.Ast open Microsoft.FSharp.Compiler.AbstractIL.IL +open Microsoft.FSharp.Compiler.AbstractIL.ILBinaryReader open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library open Microsoft.FSharp.Compiler.AbstractIL open Microsoft.FSharp.Compiler.ErrorLogger open Microsoft.FSharp.Compiler.CompileOps open Microsoft.FSharp.Compiler.TcGlobals -open Microsoft.FSharp.Compiler.Tast -open Microsoft.FSharp.Compiler.TypeChecker [] type ErrorLoggerProvider = @@ -34,8 +33,8 @@ val typecheckAndCompile : argv : string[] * legacyReferenceResolver: ReferenceResolver.Resolver * bannerAlreadyPrinted : bool * - openBinariesInMemory: bool * - defaultCopyFSharpCore: bool * + reduceMemoryUsage: ReduceMemoryFlag * + defaultCopyFSharpCore: CopyFSharpCoreFlag * exiter : Exiter * loggerProvider: ErrorLoggerProvider * tcImportsCapture: (TcImports -> unit) option * @@ -47,8 +46,8 @@ val mainCompile : argv: string[] * legacyReferenceResolver: ReferenceResolver.Resolver * bannerAlreadyPrinted: bool * - openBinariesInMemory: bool * - defaultCopyFSharpCore: bool * + reduceMemoryUsage: ReduceMemoryFlag * + defaultCopyFSharpCore: CopyFSharpCoreFlag * exiter: Exiter * loggerProvider: ErrorLoggerProvider * tcImportsCapture: (TcImports -> unit) option * @@ -58,7 +57,7 @@ val mainCompile : val compileOfAst : ctok: CompilationThreadToken * legacyReferenceResolver: ReferenceResolver.Resolver * - openBinariesInMemory: bool * + reduceMemoryUsage: ReduceMemoryFlag * assemblyName:string * target:CompilerTarget * targetDll:string * @@ -88,6 +87,6 @@ type ConsoleLoggerProvider = // For unit testing module internal MainModuleBuilder = - val fileVersion: warn: (exn -> unit) -> findStringAttr: (string -> string option) -> assemblyVersion: ILVersionInfo -> ILVersionInfo - val productVersion: warn: (exn -> unit) -> findStringAttr: (string -> string option) -> fileVersion: ILVersionInfo -> string + val fileVersion: findStringAttr: (string -> string option) -> assemblyVersion: ILVersionInfo -> ILVersionInfo + val productVersion: findStringAttr: (string -> string option) -> fileVersion: ILVersionInfo -> string val productVersionToILVersionInfo: string -> ILVersionInfo diff --git a/src/fsharp/fscmain.fs b/src/fsharp/fscmain.fs index 9405af123bb..1d50e0c68de 100644 --- a/src/fsharp/fscmain.fs +++ b/src/fsharp/fscmain.fs @@ -9,7 +9,9 @@ open System.Reflection open System.Runtime.CompilerServices open Microsoft.FSharp.Compiler -open Microsoft.FSharp.Compiler.AbstractIL.IL // runningOnMono +open Microsoft.FSharp.Compiler.AbstractIL +open Microsoft.FSharp.Compiler.AbstractIL.IL +open Microsoft.FSharp.Compiler.AbstractIL.ILBinaryReader open Microsoft.FSharp.Compiler.ErrorLogger open Microsoft.FSharp.Compiler.Driver open Microsoft.FSharp.Compiler.Lib @@ -34,10 +36,18 @@ module Driver = let ctok = AssumeCompilationThreadWithoutEvidence () // Check for --pause as the very first step so that a compiler can be attached here. - if argv |> Array.exists (fun x -> x = "/pause" || x = "--pause") then + let pauseFlag = argv |> Array.exists (fun x -> x = "/pause" || x = "--pause") + if pauseFlag then System.Console.WriteLine("Press return to continue...") System.Console.ReadLine() |> ignore +#if !FX_NO_APP_DOMAINS + let timesFlag = argv |> Array.exists (fun x -> x = "/times" || x = "--times") + if timesFlag then + let stats = ILBinaryReader.GetStatistics() + AppDomain.CurrentDomain.ProcessExit.Add(fun _ -> printfn "STATS: #ByteArrayFile = %d, #MemoryMappedFileOpen = %d, #MemoryMappedFileClosed = %d, #RawMemoryFile = %d, #WeakByteArrayFile = %d" stats.byteFileCount stats.memoryMapFileOpenedCount stats.memoryMapFileClosedCount stats.rawMemoryFileCount stats.weakByteFileCount) +#endif + let quitProcessExiter = { new Exiter with member x.Exit(n) = @@ -48,7 +58,18 @@ module Driver = failwithf "%s" <| FSComp.SR.elSysEnvExitDidntExit() } - mainCompile (ctok, argv, MSBuildReferenceResolver.Resolver, (*bannerAlreadyPrinted*)false, (*openBinariesInMemory*)false, (*defaultCopyFSharpCore*)true, quitProcessExiter, ConsoleLoggerProvider(), None, None) + let legacyReferenceResolver = +#if CROSS_PLATFORM_COMPILER + SimulatedMSBuildReferenceResolver.SimulatedMSBuildResolver +#else + MSBuildReferenceResolver.Resolver +#endif + + // This is the only place where ReduceMemoryFlag.No is set. This is because fsc.exe is not a long-running process and + // thus we can use file-locking memory mapped files. + // + // This is also one of only two places where CopyFSharpCoreFlag.Yes is set. The other is in LegacyHostedCompilerForTesting. + mainCompile (ctok, argv, legacyReferenceResolver, (*bannerAlreadyPrinted*)false, ReduceMemoryFlag.No, CopyFSharpCoreFlag.Yes, quitProcessExiter, ConsoleLoggerProvider(), None, None) 0 [] diff --git a/src/fsharp/fsi/Fsi.fsproj b/src/fsharp/fsi/Fsi.fsproj index ea99ddf1486..ad16d0c0017 100644 --- a/src/fsharp/fsi/Fsi.fsproj +++ b/src/fsharp/fsi/Fsi.fsproj @@ -3,6 +3,9 @@ $(MSBuildProjectDirectory)\..\.. + FSharp + true + true @@ -18,7 +21,6 @@ $(NoWarn);62 fsi 0x0A000000 - COMPILER;$(DefineConstants) FSI_SHADOW_COPY_REFERENCES;$(DefineConstants) FSI_SERVER;$(DefineConstants) true @@ -27,18 +29,6 @@ v4.6 - - $(FSharpSourcesRoot)\..\loc\lcl\{Lang}\$(AssemblyName).exe.lcl - $(FSharpSourcesRoot)\..\loc\lci\$(AssemblyName).exe.lci - false - false - - - - - assemblyinfo.fsi.exe.fs - - console.fs @@ -80,14 +70,4 @@ True - - - - - - Microsoft - StrongName - - - \ No newline at end of file diff --git a/src/fsharp/fsi/app.config b/src/fsharp/fsi/app.config index 6ae94a8e653..e6feb514fab 100644 --- a/src/fsharp/fsi/app.config +++ b/src/fsharp/fsi/app.config @@ -5,12 +5,12 @@ - + + + + + - - - - diff --git a/src/fsharp/fsi/fsi.fs b/src/fsharp/fsi/fsi.fs index 3a178a5c185..eb926991dc1 100644 --- a/src/fsharp/fsi/fsi.fs +++ b/src/fsharp/fsi/fsi.fs @@ -23,6 +23,7 @@ open Microsoft.FSharp.Compiler open Microsoft.FSharp.Compiler.AbstractIL open Microsoft.FSharp.Compiler.AbstractIL.Diagnostics open Microsoft.FSharp.Compiler.AbstractIL.IL +open Microsoft.FSharp.Compiler.AbstractIL.ILBinaryReader open Microsoft.FSharp.Compiler.AbstractIL.Internal open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library open Microsoft.FSharp.Compiler.AbstractIL.Extensions.ILX @@ -866,7 +867,7 @@ type internal FsiConsolePrompt(fsiOptions: FsiCommandLineOptions, fsiConsoleOutp // A prompt can be skipped by "silent directives", e.g. ones sent to FSI by VS. let mutable dropPrompt = 0 // NOTE: SERVER-PROMPT is not user displayed, rather it's a prefix that code elsewhere - // uses to identify the prompt, see vs\FsPkgs\FSharp.VS.FSI\fsiSessionToolWindow.fs + // uses to identify the prompt, see service\FsPkgs\FSharp.VS.FSI\fsiSessionToolWindow.fs let prompt = if fsiOptions.IsInteractiveServer then "SERVER-PROMPT>\n" else "> " member __.Print() = if dropPrompt = 0 then fsiConsoleOutput.uprintf "%s" prompt else dropPrompt <- dropPrompt - 1 @@ -1000,11 +1001,11 @@ type internal FsiDynamicCompiler /// Add attributes let CreateModuleFragment (tcConfigB: TcConfigBuilder, assemblyName, codegenResults) = if !progress then fprintfn fsiConsoleOutput.Out "Creating main module..."; - let mainModule = mkILSimpleModule assemblyName (GetGeneratedILModuleName tcConfigB.target assemblyName) (tcConfigB.target = Dll) tcConfigB.subsystemVersion tcConfigB.useHighEntropyVA (mkILTypeDefs codegenResults.ilTypeDefs) None None 0x0 (mkILExportedTypes []) "" + let mainModule = mkILSimpleModule assemblyName (GetGeneratedILModuleName tcConfigB.target assemblyName) (tcConfigB.target = CompilerTarget.Dll) tcConfigB.subsystemVersion tcConfigB.useHighEntropyVA (mkILTypeDefs codegenResults.ilTypeDefs) None None 0x0 (mkILExportedTypes []) "" { mainModule with Manifest = (let man = mainModule.ManifestOfAssembly - Some { man with CustomAttrs = mkILCustomAttrs codegenResults.ilAssemAttrs }); } + Some { man with CustomAttrsStored = storeILCustomAttrs (mkILCustomAttrs codegenResults.ilAssemAttrs) }) } let ProcessInputs (ctok, errorLogger: ErrorLogger, istate: FsiDynamicCompilerState, inputs: ParsedInput list, showTypes: bool, isIncrementalFragment: bool, isInteractiveItExpr: bool, prefixPath: LongIdent) = let optEnv = istate.optEnv @@ -1161,11 +1162,12 @@ type internal FsiDynamicCompiler // Find all new declarations the EvaluationListener try - let contents = FSharpAssemblyContents(tcGlobals, tcState.Ccu, tcImports, declaredImpls) + let contents = FSharpAssemblyContents(tcGlobals, tcState.Ccu, Some tcState.CcuSig, tcImports, declaredImpls) let contentFile = contents.ImplementationFiles.[0] // Skip the "FSI_NNNN" match contentFile.Declarations with | [FSharpImplementationFileDeclaration.Entity (_eFakeModule,modDecls) ] -> + let cenv = SymbolEnv(newState.tcGlobals, newState.tcState.Ccu, Some newState.tcState.CcuSig, newState.tcImports) for decl in modDecls do match decl with | FSharpImplementationFileDeclaration.MemberOrFunctionOrValue (v,_,_) -> @@ -1176,16 +1178,16 @@ type internal FsiDynamicCompiler | Item.Value vref -> let optValue = newState.ilxGenerator.LookupGeneratedValue(valuePrinter.GetEvaluationContext(newState.emEnv), vref.Deref) match optValue with - | Some (res, typ) -> Some(FsiValue(res, typ, FSharpType(tcGlobals, newState.tcState.Ccu, newState.tcImports, vref.Type))) + | Some (res, ty) -> Some(FsiValue(res, ty, FSharpType(cenv, vref.Type))) | None -> None | _ -> None - let symbol = FSharpSymbol.Create(newState.tcGlobals, newState.tcState.Ccu, newState.tcImports, v.Item) + let symbol = FSharpSymbol.Create(cenv, v.Item) let symbolUse = FSharpSymbolUse(tcGlobals, newState.tcState.TcEnvFromImpls.DisplayEnv, symbol, ItemOccurence.Binding, v.DeclarationLocation) fsi.TriggerEvaluation (fsiValueOpt, symbolUse, decl) | FSharpImplementationFileDeclaration.Entity (e,_) -> // Report a top-level module or namespace definition - let symbol = FSharpSymbol.Create(newState.tcGlobals, newState.tcState.Ccu, newState.tcImports, e.Item) + let symbol = FSharpSymbol.Create(cenv, e.Item) let symbolUse = FSharpSymbolUse(tcGlobals, newState.tcState.TcEnvFromImpls.DisplayEnv, symbol, ItemOccurence.Binding, e.DeclarationLocation) fsi.TriggerEvaluation (None, symbolUse, decl) | FSharpImplementationFileDeclaration.InitAction _ -> @@ -1223,7 +1225,7 @@ type internal FsiDynamicCompiler // let optValue = istate.ilxGenerator.LookupGeneratedValue(valuePrinter.GetEvaluationContext(istate.emEnv), vref.Deref); match optValue with - | Some (res, typ) -> istate, Completed(Some(FsiValue(res, typ, FSharpType(tcGlobals, istate.tcState.Ccu, istate.tcImports, vref.Type)))) + | Some (res, ty) -> istate, Completed(Some(FsiValue(res, ty, FSharpType(tcGlobals, istate.tcState.Ccu, istate.tcState.CcuSig, istate.tcImports, vref.Type)))) | _ -> istate, Completed None // Return the interactive state. @@ -1292,7 +1294,8 @@ type internal FsiDynamicCompiler let sourceFiles = sourceFiles |> List.map (fun nm -> tcConfig.ResolveSourceFile(m, nm, tcConfig.implicitIncludeDir),m) // Close the #load graph on each file and gather the inputs from the scripts. - let closure = LoadClosure.ComputeClosureOfSourceFiles(ctok, TcConfig.Create(tcConfigB,validate=false), sourceFiles, CodeContext.CompilationAndEvaluation, lexResourceManager=lexResourceManager) + let tcConfig = TcConfig.Create(tcConfigB,validate=false) + let closure = LoadClosure.ComputeClosureOfScriptFiles(ctok, tcConfig, sourceFiles, CodeContext.CompilationAndEvaluation, lexResourceManager=lexResourceManager) // Intent "[Loading %s]\n" (String.concat "\n and " sourceFiles) fsiConsoleOutput.uprintf "[%s " (FSIstrings.SR.fsiLoadingFilesPrefixText()) @@ -1347,7 +1350,7 @@ type internal FsiDynamicCompiler } member __.CurrentPartialAssemblySignature(istate) = - FSharpAssemblySignature(istate.tcGlobals, istate.tcState.Ccu, istate.tcImports, None, istate.tcState.PartialAssemblySignature) + FSharpAssemblySignature(istate.tcGlobals, istate.tcState.Ccu, istate.tcState.CcuSig, istate.tcImports, None, istate.tcState.CcuSig) member __.FormatValue(obj:obj, objTy) = valuePrinter.FormatValue(obj, objTy) @@ -1593,7 +1596,7 @@ module internal MagicAssemblyResolution = // It is an explicit user trust decision to load an assembly with #r. Scripts are not run automatically (for example, by double-clicking in explorer). // We considered setting loadFromRemoteSources in fsi.exe.config but this would transitively confer unsafe loading to the code in the referenced // assemblies. Better to let those assemblies decide for themselves which is safer. -#if FSI_TODO_NETCORE +#if NETSTANDARD1_6 || NETSTANDARD2_0 Assembly.LoadFrom(path) #else Assembly.UnsafeLoadFrom(path) @@ -1601,7 +1604,7 @@ module internal MagicAssemblyResolution = let Install(tcConfigB, tcImports: TcImports, fsiDynamicCompiler: FsiDynamicCompiler, fsiConsoleOutput: FsiConsoleOutput) = -#if FSI_TODO_NETCORE +#if NETSTANDARD1_6 || NETSTANDARD2_0 ignore tcConfigB ignore tcImports ignore fsiDynamicCompiler @@ -2029,7 +2032,7 @@ type internal FsiInteractionProcessor // When the last declaration has a shape of DoExp (i.e., non-binding), // transform it to a shape of "let it = ", so we can refer it. - let defsA = if defsA.Length <= 1 || defsB.Length > 0 then defsA else + let defsA = if defsA.Length <= 1 || not (List.isEmpty defsB) then defsA else match List.headAndTail (List.rev defsA) with | SynModuleDecl.DoExpr(_,exp,_), rest -> (rest |> List.rev) @ (fsiDynamicCompiler.BuildItBinding exp) | _ -> defsA @@ -2340,7 +2343,7 @@ type internal FsiInteractionProcessor let nItems = NameResolution.ResolvePartialLongIdent ncenv nenv (ConstraintSolver.IsApplicableMethApprox istate.tcGlobals amap rangeStdin) rangeStdin ad lid false let names = nItems |> List.map (fun d -> d.DisplayName) - let names = names |> List.filter (fun name -> name.StartsWith(stem,StringComparison.Ordinal)) + let names = names |> List.filter (fun name -> name.StartsWithOrdinal(stem)) names member __.ParseAndCheckInteraction (ctok, legacyReferenceResolver, checker, istate, text:string) = @@ -2419,22 +2422,9 @@ type FsiEvaluationSession (fsi: FsiEvaluationSessionHostConfig, argv:string[], i // We later switch to doing interaction-by-interaction processing on the "event loop" thread. let ctokStartup = AssumeCompilationThreadWithoutEvidence () -#if FX_LCIDFROMCODEPAGE - - // See Bug 735819 - let lcidFromCodePage = - if (Console.OutputEncoding.CodePage <> 65001) && - (Console.OutputEncoding.CodePage <> Thread.CurrentThread.CurrentUICulture.TextInfo.OEMCodePage) && - (Console.OutputEncoding.CodePage <> Thread.CurrentThread.CurrentUICulture.TextInfo.ANSICodePage) then - Thread.CurrentThread.CurrentUICulture <- new CultureInfo("en-US") - Some 1033 - else - None -#endif - let timeReporter = FsiTimeReporter(outWriter) -#if !FX_RESHAPED_CONSOLE +#if !FX_REDUCED_CONSOLE //---------------------------------------------------------------------------- // Console coloring //---------------------------------------------------------------------------- @@ -2450,6 +2440,7 @@ type FsiEvaluationSession (fsi: FsiEvaluationSessionHostConfig, argv:string[], i //---------------------------------------------------------------------------- let currentDirectory = Directory.GetCurrentDirectory() + let tryGetMetadataSnapshot = (fun _ -> None) let defaultFSharpBinariesDir = FSharpEnvironment.BinFolderOfDefaultFSharpCompiler(FSharpEnvironment.tryCurrentDomain()).Value @@ -2458,12 +2449,21 @@ type FsiEvaluationSession (fsi: FsiEvaluationSessionHostConfig, argv:string[], i | None -> SimulatedMSBuildReferenceResolver.GetBestAvailableResolver() | Some rr -> rr - let tcConfigB = TcConfigBuilder.CreateNew(legacyReferenceResolver, defaultFSharpBinariesDir=defaultFSharpBinariesDir, optimizeForMemory=true, implicitIncludeDir=currentDirectory, isInteractive=true, isInvalidationSupported=false, defaultCopyFSharpCore=false) + let tcConfigB = + TcConfigBuilder.CreateNew(legacyReferenceResolver, + defaultFSharpBinariesDir=defaultFSharpBinariesDir, + reduceMemoryUsage=ReduceMemoryFlag.Yes, + implicitIncludeDir=currentDirectory, + isInteractive=true, + isInvalidationSupported=false, + defaultCopyFSharpCore=CopyFSharpCoreFlag.No, + tryGetMetadataSnapshot=tryGetMetadataSnapshot) + let tcConfigP = TcConfigProvider.BasedOnMutableBuilder(tcConfigB) do tcConfigB.resolutionEnvironment <- ResolutionEnvironment.CompilationAndEvaluation // See Bug 3608 do tcConfigB.useFsiAuxLib <- fsi.UseFsiAuxLib -#if FSI_TODO_NETCORE +#if NETSTANDARD1_6 || NETSTANDARD2_0 do tcConfigB.useSimpleResolution <- true do SetTargetProfile tcConfigB "netcore" // always assume System.Runtime codegen #endif @@ -2473,7 +2473,7 @@ type FsiEvaluationSession (fsi: FsiEvaluationSessionHostConfig, argv:string[], i do SetDebugSwitch tcConfigB (Some "pdbonly") OptionSwitch.On do SetTailcallSwitch tcConfigB OptionSwitch.On -#if !FSI_TODO_NETCORE +#if NETSTANDARD1_6 || NETSTANDARD2_0 // set platform depending on whether the current process is a 64-bit process. // BUG 429882 : FsiAnyCPU.exe issues warnings (x64 v MSIL) when referencing 64-bit assemblies do tcConfigB.platform <- if IntPtr.Size = 8 then Some AMD64 else Some X86 @@ -2494,19 +2494,14 @@ type FsiEvaluationSession (fsi: FsiEvaluationSessionHostConfig, argv:string[], i let fsiOptions = FsiCommandLineOptions(fsi, argv, tcConfigB, fsiConsoleOutput) let fsiConsolePrompt = FsiConsolePrompt(fsiOptions, fsiConsoleOutput) - // Check if we have a codepage from the console -#if FX_LCIDFROMCODEPAGE do - match fsiOptions.FsiLCID with - | Some _ -> () - | None -> tcConfigB.lcid <- lcidFromCodePage - - // Set the ui culture - do - match fsiOptions.FsiLCID with - | Some(n) -> Thread.CurrentThread.CurrentUICulture <- new CultureInfo(n) - | None -> () + match tcConfigB.preferredUiLang with +#if FX_RESHAPED_GLOBALIZATION + | Some s -> System.Globalization.CultureInfo.CurrentUICulture <- new System.Globalization.CultureInfo(s) +#else + | Some s -> Thread.CurrentThread.CurrentUICulture <- new System.Globalization.CultureInfo(s) #endif + | None -> () #if !FX_NO_SERVERCODEPAGES do diff --git a/src/fsharp/fsi/fsi.fsi b/src/fsharp/fsi/fsi.fsi index 7f8a36befb7..894635e338b 100644 --- a/src/fsharp/fsi/fsi.fsi +++ b/src/fsharp/fsi/fsi.fsi @@ -1,11 +1,7 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -#if COMPILER_PUBLIC_API module public Microsoft.FSharp.Compiler.Interactive.Shell -#else -module internal Microsoft.FSharp.Compiler.Interactive.Shell -#endif open System.IO open Microsoft.FSharp.Compiler diff --git a/src/fsharp/fsi/fsimain.fs b/src/fsharp/fsi/fsimain.fs index b87c795a605..92a2f722709 100644 --- a/src/fsharp/fsi/fsimain.fs +++ b/src/fsharp/fsi/fsimain.fs @@ -22,6 +22,7 @@ open System.Windows.Forms #endif open Microsoft.FSharp.Compiler +open Microsoft.FSharp.Compiler.AbstractIL open Microsoft.FSharp.Compiler.Lib open Microsoft.FSharp.Compiler.Interactive.Shell open Microsoft.FSharp.Compiler.Interactive @@ -235,6 +236,12 @@ let evaluateSession(argv: string[]) = None #endif + let legacyReferenceResolver = +#if CROSS_PLATFORM_COMPILER + SimulatedMSBuildReferenceResolver.SimulatedMSBuildResolver +#else + MSBuildReferenceResolver.Resolver +#endif // Update the configuration to include 'StartServer', WinFormsEventLoop and 'GetOptionalConsoleReadLine()' let rec fsiConfig = { new FsiEvaluationSessionHostConfig () with @@ -251,21 +258,21 @@ let evaluateSession(argv: string[]) = member __.ReportUserCommandLineArgs args = fsiConfig0.ReportUserCommandLineArgs args member __.EventLoopRun() = #if !FX_NO_WINFORMS - match fsiWinFormsLoop.Value with + match (if fsiSession.IsGui then fsiWinFormsLoop.Value else None) with | Some l -> (l :> IEventLoop).Run() | _ -> #endif fsiConfig0.EventLoopRun() member __.EventLoopInvoke(f) = #if !FX_NO_WINFORMS - match fsiWinFormsLoop.Value with + match (if fsiSession.IsGui then fsiWinFormsLoop.Value else None) with | Some l -> (l :> IEventLoop).Invoke(f) | _ -> #endif fsiConfig0.EventLoopInvoke(f) member __.EventLoopScheduleRestart() = #if !FX_NO_WINFORMS - match fsiWinFormsLoop.Value with + match (if fsiSession.IsGui then fsiWinFormsLoop.Value else None) with | Some l -> (l :> IEventLoop).ScheduleRestart() | _ -> #endif @@ -279,7 +286,7 @@ let evaluateSession(argv: string[]) = member __.GetOptionalConsoleReadLine(probe) = getConsoleReadLine(probe) } // Create the console - and fsiSession = FsiEvaluationSession.Create (fsiConfig, argv, Console.In, Console.Out, Console.Error, collectible=false, legacyReferenceResolver=MSBuildReferenceResolver.Resolver) + and fsiSession : FsiEvaluationSession = FsiEvaluationSession.Create (fsiConfig, argv, Console.In, Console.Out, Console.Error, collectible=false, legacyReferenceResolver=legacyReferenceResolver) #if !FX_NO_WINFORMS @@ -325,6 +332,14 @@ let MainMain argv = let argv = System.Environment.GetCommandLineArgs() use e = new SaveAndRestoreConsoleEncoding() +#if !FX_NO_APP_DOMAINS + let timesFlag = argv |> Array.exists (fun x -> x = "/times" || x = "--times") + if timesFlag then + AppDomain.CurrentDomain.ProcessExit.Add(fun _ -> + let stats = ILBinaryReader.GetStatistics() + printfn "STATS: #ByteArrayFile = %d, #MemoryMappedFileOpen = %d, #MemoryMappedFileClosed = %d, #RawMemoryFile = %d, #WeakByteArrayFile = %d" stats.byteFileCount stats.memoryMapFileOpenedCount stats.memoryMapFileClosedCount stats.rawMemoryFileCount stats.weakByteFileCount) +#endif + #if FSI_SHADOW_COPY_REFERENCES let isShadowCopy x = (x = "/shadowcopyreferences" || x = "--shadowcopyreferences" || x = "/shadowcopyreferences+" || x = "--shadowcopyreferences+") if AppDomain.CurrentDomain.IsDefaultAppDomain() && argv |> Array.exists isShadowCopy then diff --git a/src/fsharp/fsi/project.json b/src/fsharp/fsi/project.json index 8c336a3e67a..8fdb41c7a8e 100644 --- a/src/fsharp/fsi/project.json +++ b/src/fsharp/fsi/project.json @@ -8,7 +8,7 @@ "System.Reflection.TypeExtensions": "4.3.0", "System.Runtime.Loader": "4.3.0", "System.Threading.Thread": "4.3.0", - "System.Reflection.Metadata": "1.4.2" + "System.Reflection.Metadata": "1.6.0" }, "runtimes": { "win7-x86": { }, diff --git a/src/fsharp/fsi/xlf/FSIstrings.txt.cs.xlf b/src/fsharp/fsi/xlf/FSIstrings.txt.cs.xlf new file mode 100644 index 00000000000..d4667e04c08 --- /dev/null +++ b/src/fsharp/fsi/xlf/FSIstrings.txt.cs.xlf @@ -0,0 +1,272 @@ + + + + + + Stopped due to error\n + Zastavilo se kvůli chybě.\n + + + + Usage: {0} <options> [script.fsx [<arguments>]] + Použití: {0} <parametry> [skript.fsx [<argumenty>]] + + + + - INPUT FILES - + - VSTUPNÍ SOUBORY - + + + + - CODE GENERATION - + - GENEROVÁNÍ KÓDU - + + + + - ERRORS AND WARNINGS - + - CHYBY A UPOZORNĚNÍ - + + + + - LANGUAGE - + - JAZYK - + + + + - MISCELLANEOUS - + - RŮZNÉ - + + + + - ADVANCED - + - UPŘESNIT - + + + + Exception raised when starting remoting server.\n{0} + Při spouštění serveru vzdálené komunikace se vyvolala výjimka.\n{0} + + + + Use the given file on startup as initial input + Použít při spuštění zadaný soubor jako počáteční vstup + + + + #load the given file on startup + #load zadaného souboru při spuštění + + + + Treat remaining arguments as command line arguments, accessed using fsi.CommandLineArgs + Zpracovat zbývající argumenty jako argumenty příkazového řádku, ke kterým se přistupuje pomocí fsi.CommandLineArgs + + + + Display this usage message (Short form: -?) + Zobrazí tuto zprávu o použití (krátký tvar: -?). + + + + Exit fsi after loading the files or running the .fsx script given on the command line + Ukončit soubor fsi po načtení souborů nebo spuštění skriptu .fsx zadaného na příkazovém řádku + + + + Execute interactions on a Windows Forms event loop (on by default) + Provést interakce u smyčky událostí modelu Windows Forms (ve výchozím nastavení zapnuté) + + + + Suppress fsi writing to stdout + Potlačit zapisování fsi do stdout + + + + Support TAB completion in console (on by default) + Podpora dokončování pomocí tabulátorů v konzole (ve výchozím nastavení zapnuté) + + + + Emit debug information in quotations + Generovat ladicí informace v uvozovkách + + + + For help type #help;; + Nápovědu zobrazíte zadáním #help;; + + + + A problem occurred starting the F# Interactive process. This may be due to a known problem with background process console support for Unicode-enabled applications on some Windows systems. Try selecting Tools->Options->F# Interactive for Visual Studio and enter '--fsi-server-no-unicode'. + Při spuštění procesu F# Interactive se vyskytl problém. Ten mohly způsobit známé potíže s podporou konzoly procesu na pozadí pro aplikace umožňující kódování Unicode v některých systémech Windows. V případě Visual Studia zkuste vybrat Nástroje->Možnosti->F# Interactive a zadat: --fsi-server-no-unicode. + + + + '{0}' is not a valid assembly name + {0} není platný název sestavení. + + + + Directory '{0}' doesn't exist + Adresář {0} neexistuje. + + + + Invalid directive '#{0} {1}' + Neplatná direktiva #{0} {1} + + + + Warning: line too long, ignoring some characters\n + Upozornění: řádek je příliš dlouhý, některé znaky se ignorují.\n + + + + Real: {0}, CPU: {1}, GC {2} + Real: {0}, CPU: {1}, GC {2} + + + + gen + obec + + + + \n\nException raised during pretty printing.\nPlease report this so it can be fixed.\nTrace: {0}\n + \n\nFunkce přehledného výpisu vyvolala výjimku.\nNahlaste prosím tento problém, abychom ho mohli opravit.\nTrasování: {0}\n + + + + F# Interactive directives: + Direktivy F# Interactive: + + + + Reference (dynamically load) the given DLL + Odkazovat (dynamicky načíst) zadanou knihovnu DLL + + + + Add the given search path for referenced DLLs + Přidat zadanou cestu hledání pro odkazované knihovny DLL + + + + Load the given file(s) as if compiled and referenced + Načíst zadané soubory, jako by byly zkompilované a odkazované + + + + Toggle timing on/off + Přepnout časování do polohy zapnuto nebo vypnuto + + + + Display help + Zobrazí nápovědu. + + + + Exit + Ukončit + + + + F# Interactive command line options: + Možnosti příkazového řádku F# Interactive: + + + + See '{0}' for options + Možnosti viz {0} + + + + Loading + Načítání + + + + \n- Interrupt\n + \n- Přerušit\n + + + + \n- Exit...\n + \n- Ukončit...\n + + + + - Aborting main thread... + – Ukončuje se hlavní vlákno... + + + + Failed to install ctrl-c handler - Ctrl-C handling will not be available. Error was:\n\t{0} + Nepovedlo se nainstalovat obslužnou rutinu ctrl-c. Obslužná rutina Ctrl-C nebude dostupná. Vyskytla se tato chyba:\n\t{0} + + + + --> Referenced '{0}' + --> Odkazovaný soubor {0} + + + + --> Referenced '{0}' (file may be locked by F# Interactive process) + --> Odkazovaný soubor {0} (Soubor musí být procesem F# Interactive uzamčený.) + + + + --> Referenced '{0}' (an assembly with a different timestamp has already been referenced from this location, reset fsi to load the updated assembly) + --> Odkazováno {0} (na sestavení s odlišným časovým razítkem se už z tohoto umístění odkazovalo, pro načtení aktualizovaného sestavení obnovte soubor fsi) + + + + --> Added '{0}' to library include path + --> Soubory přidané do knihovny ({0}) zahrnují cestu. + + + + --> Timing now on + --> Časování je teď zapnuté. + + + + --> Timing now off + --> Časování je teď vypnuté. + + + + - Unexpected ThreadAbortException (Ctrl-C) during event handling: Trying to restart... + - Při zpracování události se vyvolala neočekávaná výjimka ThreadAbortException (Ctrl-C): Pokus o restartování... + + + + Failed to resolve assembly '{0}' + Nepovedlo se přeložit sestavení {0}. + + + + Binding session to '{0}'... + Relace se váže na {0}... + + + + Microsoft (R) F# Interactive version {0} + Microsoft (R) F# Interactive verze {0} + + + + F# Interactive for F# {0} + F# Interactive pro F# {0} + + + + Prevents references from being locked by the F# Interactive process + Znemožňuje zamknutí referencí procesem nástroje F# Interactive. + + + + + \ No newline at end of file diff --git a/src/fsharp/fsi/xlf/FSIstrings.txt.de.xlf b/src/fsharp/fsi/xlf/FSIstrings.txt.de.xlf new file mode 100644 index 00000000000..f87d3361f21 --- /dev/null +++ b/src/fsharp/fsi/xlf/FSIstrings.txt.de.xlf @@ -0,0 +1,272 @@ + + + + + + Stopped due to error\n + Aufgrund eines Fehlers beendet\n + + + + Usage: {0} <options> [script.fsx [<arguments>]] + Verwendung: {0} <Optionen> [script.fsx [<Argumente>]] + + + + - INPUT FILES - + - EINGABEDATEIEN - + + + + - CODE GENERATION - + - CODEGENERIERUNG - + + + + - ERRORS AND WARNINGS - + - FEHLER UND WARNUNGEN - + + + + - LANGUAGE - + - SPRACHE - + + + + - MISCELLANEOUS - + - VERSCHIEDENES - + + + + - ADVANCED - + - ERWEITERT - + + + + Exception raised when starting remoting server.\n{0} + Ausnahme beim Starten des Remoteservers.\n{0} + + + + Use the given file on startup as initial input + Die angegebene Datei beim Start als ursprüngliche Eingabe verwenden + + + + #load the given file on startup + #load der angegebenen Datei beim Start + + + + Treat remaining arguments as command line arguments, accessed using fsi.CommandLineArgs + Verbleibende Argumente als Befehlszeilenargumente (Zugriff mithilfe von fsi.CommandLineArgs) behandeln + + + + Display this usage message (Short form: -?) + Diesen Hilfetext anzeigen (Kurzform: -?) + + + + Exit fsi after loading the files or running the .fsx script given on the command line + FSI nach Laden der Dateien oder Ausführen des in der Befehlszeile angegebenen .fsx-Skripts beenden + + + + Execute interactions on a Windows Forms event loop (on by default) + Interaktionen in einer Windows Forms-Ereignisschleife ausführen (standardmäßig aktiviert) + + + + Suppress fsi writing to stdout + Schreiben von FSI in stdout unterdrücken + + + + Support TAB completion in console (on by default) + Vervollständigung mit der TAB-TASTE in der Konsole unterstützen (standardmäßig aktiviert) + + + + Emit debug information in quotations + Debugginginformationen in Anführungszeichen ausgeben + + + + For help type #help;; + Um Hilfe zu erhalten, geben Sie "#help;;" ein. + + + + A problem occurred starting the F# Interactive process. This may be due to a known problem with background process console support for Unicode-enabled applications on some Windows systems. Try selecting Tools->Options->F# Interactive for Visual Studio and enter '--fsi-server-no-unicode'. + Beim Starten des F# Interactive-Prozesses ist ein Fehler aufgetreten. Ursache hierfür kann ein bekanntes Problem mit der Hintergrundprozess-Konsolenunterstützung für Unicode-aktivierte Anwendungen unter manchen Windows-Systemen sein. Wählen Sie "Tools" -> "Optionen" -> "F# Interactive für Visual Studio" aus, und geben Sie "--fsi-server-no-unicode" ein. + + + + '{0}' is not a valid assembly name + {0} ist kein gültiger Assemblyname. + + + + Directory '{0}' doesn't exist + Das Verzeichnis "{0}" ist nicht vorhanden. + + + + Invalid directive '#{0} {1}' + Ungültige Direktive "#{0} {1}" + + + + Warning: line too long, ignoring some characters\n + Warnung: Die Zeile ist zu lang, einige Zeichen werden ignoriert.\n + + + + Real: {0}, CPU: {1}, GC {2} + Real: {0}, CPU: {1}, GC {2} + + + + gen + Gen + + + + \n\nException raised during pretty printing.\nPlease report this so it can be fixed.\nTrace: {0}\n + \n\nAusnahme beim Schöndruck.\nMelden Sie dies, damit das Problem behoben werden kann.\nAblaufverfolgung: {0}\n + + + + F# Interactive directives: + F# Interactive-Direktiven: + + + + Reference (dynamically load) the given DLL + Auf die angegebene DLL verweisen (dynamisch laden) + + + + Add the given search path for referenced DLLs + Angegebenen Suchpfad für DLLs, auf die verwiesen wird, hinzufügen + + + + Load the given file(s) as if compiled and referenced + Angegebene Datei(en) laden, als wären sie kompiliert und würden Verweise aufweisen + + + + Toggle timing on/off + Zeitliche Steuerung ein/aus + + + + Display help + Hilfe anzeigen + + + + Exit + Beenden + + + + F# Interactive command line options: + F# Interactive-Befehlszeilenoptionen: + + + + See '{0}' for options + Optionen finden Sie unter "{0}". + + + + Loading + Laden + + + + \n- Interrupt\n + \n- Unterbrechen\n + + + + \n- Exit...\n + \n- Beenden...\n + + + + - Aborting main thread... + - Hauptthread wird abgebrochen... + + + + Failed to install ctrl-c handler - Ctrl-C handling will not be available. Error was:\n\t{0} + Fehler beim Installieren des STRG-C-Handlers. STRG-C-Behandlung ist nicht verfügbar. Fehler:\n\t{0} + + + + --> Referenced '{0}' + --> Auf "{0}" wurde verwiesen + + + + --> Referenced '{0}' (file may be locked by F# Interactive process) + --> Auf "{0}" wurde verwiesen (die Datei wird möglicherweise vom F# Interactive-Prozess gesperrt) + + + + --> Referenced '{0}' (an assembly with a different timestamp has already been referenced from this location, reset fsi to load the updated assembly) + --> Auf "{0}" wurde verwiesen (eine Assembly mit einem anderen Zeitstempel wurde bereits von diesem Ort verwiesen; stellen Sie fsi wieder her, um die aktualisierte Assembly zu laden) + + + + --> Added '{0}' to library include path + --> "{0}" wurde zum Bibliotheksincludepfad hinzugefügt + + + + --> Timing now on + --> Zeitliche Steuerung jetzt ein + + + + --> Timing now off + --> Zeitliche Steuerung jetzt aus + + + + - Unexpected ThreadAbortException (Ctrl-C) during event handling: Trying to restart... + - Unerwartete ThreadAbortException (Ctrl-C) während der Ereignisbehandlung: Es wird versucht, neu zu starten... + + + + Failed to resolve assembly '{0}' + Fehler beim Auflösen der Assembly "{0}" + + + + Binding session to '{0}'... + Sitzung wird an "{0}" gebunden... + + + + Microsoft (R) F# Interactive version {0} + Microsoft (R) F# Interactive, Version {0} + + + + F# Interactive for F# {0} + F# Interactive für F# {0} + + + + Prevents references from being locked by the F# Interactive process + Verhindert, dass Verweise vom F# Interactive-Prozess gesperrt werden + + + + + \ No newline at end of file diff --git a/src/fsharp/fsi/xlf/FSIstrings.txt.en.xlf b/src/fsharp/fsi/xlf/FSIstrings.txt.en.xlf new file mode 100644 index 00000000000..b34138d7721 --- /dev/null +++ b/src/fsharp/fsi/xlf/FSIstrings.txt.en.xlf @@ -0,0 +1,272 @@ + + + + + + Stopped due to error\n + Stopped due to error\n + + + + Usage: {0} <options> [script.fsx [<arguments>]] + Usage: {0} <options> [script.fsx [<arguments>]] + + + + - INPUT FILES - + - INPUT FILES - + + + + - CODE GENERATION - + - CODE GENERATION - + + + + - ERRORS AND WARNINGS - + - ERRORS AND WARNINGS - + + + + - LANGUAGE - + - LANGUAGE - + + + + - MISCELLANEOUS - + - MISCELLANEOUS - + + + + - ADVANCED - + - ADVANCED - + + + + Exception raised when starting remoting server.\n{0} + Exception raised when starting remoting server.\n{0} + + + + Use the given file on startup as initial input + Use the given file on startup as initial input + + + + #load the given file on startup + #load the given file on startup + + + + Treat remaining arguments as command line arguments, accessed using fsi.CommandLineArgs + Treat remaining arguments as command line arguments, accessed using fsi.CommandLineArgs + + + + Display this usage message (Short form: -?) + Display this usage message (Short form: -?) + + + + Exit fsi after loading the files or running the .fsx script given on the command line + Exit fsi after loading the files or running the .fsx script given on the command line + + + + Execute interactions on a Windows Forms event loop (on by default) + Execute interactions on a Windows Forms event loop (on by default) + + + + Suppress fsi writing to stdout + Suppress fsi writing to stdout + + + + Support TAB completion in console (on by default) + Support TAB completion in console (on by default) + + + + Emit debug information in quotations + Emit debug information in quotations + + + + For help type #help;; + For help type #help;; + + + + A problem occurred starting the F# Interactive process. This may be due to a known problem with background process console support for Unicode-enabled applications on some Windows systems. Try selecting Tools->Options->F# Interactive for Visual Studio and enter '--fsi-server-no-unicode'. + A problem occurred starting the F# Interactive process. This may be due to a known problem with background process console support for Unicode-enabled applications on some Windows systems. Try selecting Tools->Options->F# Interactive for Visual Studio and enter '--fsi-server-no-unicode'. + + + + '{0}' is not a valid assembly name + '{0}' is not a valid assembly name + + + + Directory '{0}' doesn't exist + Directory '{0}' doesn't exist + + + + Invalid directive '#{0} {1}' + Invalid directive '#{0} {1}' + + + + Warning: line too long, ignoring some characters\n + Warning: line too long, ignoring some characters\n + + + + Real: {0}, CPU: {1}, GC {2} + Real: {0}, CPU: {1}, GC {2} + + + + gen + gen + + + + \n\nException raised during pretty printing.\nPlease report this so it can be fixed.\nTrace: {0}\n + \n\nException raised during pretty printing.\nPlease report this so it can be fixed.\nTrace: {0}\n + + + + F# Interactive directives: + F# Interactive directives: + + + + Reference (dynamically load) the given DLL + Reference (dynamically load) the given DLL + + + + Add the given search path for referenced DLLs + Add the given search path for referenced DLLs + + + + Load the given file(s) as if compiled and referenced + Load the given file(s) as if compiled and referenced + + + + Toggle timing on/off + Toggle timing on/off + + + + Display help + Display help + + + + Exit + Exit + + + + F# Interactive command line options: + F# Interactive command line options: + + + + See '{0}' for options + See '{0}' for options + + + + Loading + Loading + + + + \n- Interrupt\n + \n- Interrupt\n + + + + \n- Exit...\n + \n- Exit...\n + + + + - Aborting main thread... + - Aborting main thread... + + + + Failed to install ctrl-c handler - Ctrl-C handling will not be available. Error was:\n\t{0} + Failed to install ctrl-c handler - Ctrl-C handling will not be available. Error was:\n\t{0} + + + + --> Referenced '{0}' + --> Referenced '{0}' + + + + --> Referenced '{0}' (file may be locked by F# Interactive process) + --> Referenced '{0}' (file may be locked by F# Interactive process) + + + + --> Referenced '{0}' (an assembly with a different timestamp has already been referenced from this location, reset fsi to load the updated assembly) + --> Referenced '{0}' (an assembly with a different timestamp has already been referenced from this location, reset fsi to load the updated assembly) + + + + --> Added '{0}' to library include path + --> Added '{0}' to library include path + + + + --> Timing now on + --> Timing now on + + + + --> Timing now off + --> Timing now off + + + + - Unexpected ThreadAbortException (Ctrl-C) during event handling: Trying to restart... + - Unexpected ThreadAbortException (Ctrl-C) during event handling: Trying to restart... + + + + Failed to resolve assembly '{0}' + Failed to resolve assembly '{0}' + + + + Binding session to '{0}'... + Binding session to '{0}'... + + + + Microsoft (R) F# Interactive version {0} + Microsoft (R) F# Interactive version {0} + + + + F# Interactive for F# {0} + F# Interactive for F# {0} + + + + Prevents references from being locked by the F# Interactive process + Prevents references from being locked by the F# Interactive process + + + + + \ No newline at end of file diff --git a/src/fsharp/fsi/xlf/FSIstrings.txt.es.xlf b/src/fsharp/fsi/xlf/FSIstrings.txt.es.xlf new file mode 100644 index 00000000000..6af67db2550 --- /dev/null +++ b/src/fsharp/fsi/xlf/FSIstrings.txt.es.xlf @@ -0,0 +1,272 @@ + + + + + + Stopped due to error\n + Detenido debido a un error.\n + + + + Usage: {0} <options> [script.fsx [<arguments>]] + Uso: {0} <opciones> [script.fsx [<argumentos>]] + + + + - INPUT FILES - + - ARCHIVOS DE ENTRADA - + + + + - CODE GENERATION - + - GENERACIÓN DE CÓDIGO - + + + + - ERRORS AND WARNINGS - + - ERRORES Y ADVERTENCIAS - + + + + - LANGUAGE - + - LENGUAJE - + + + + - MISCELLANEOUS - + - VARIOS - + + + + - ADVANCED - + - AVANZADAS - + + + + Exception raised when starting remoting server.\n{0} + Se generó una excepción al iniciar el servidor remoto.\n{0} + + + + Use the given file on startup as initial input + Usar el archivo proporcionado al inicio como entrada inicial + + + + #load the given file on startup + #load Cargar el archivo proporcionado al inicio + + + + Treat remaining arguments as command line arguments, accessed using fsi.CommandLineArgs + Tratar los demás argumentos como argumentos de la línea de comandos, a los que se obtiene acceso con fsi.CommandLineArgs + + + + Display this usage message (Short form: -?) + Muestra este mensaje de uso (forma corta: -?) + + + + Exit fsi after loading the files or running the .fsx script given on the command line + Salir de fsi después de cargar los archivos o ejecutar el script .fsx proporcionado en la línea de comandos + + + + Execute interactions on a Windows Forms event loop (on by default) + Ejecutar interacciones en un bucle de evento de Windows Forms (activado de forma predeterminada) + + + + Suppress fsi writing to stdout + Suprimir escritura fsi en stdout + + + + Support TAB completion in console (on by default) + Admitir finalización con TAB en la consola (activada de forma predeterminada) + + + + Emit debug information in quotations + Emitir información de depuración en expresiones de código delimitadas + + + + For help type #help;; + Para obtener ayuda, escriba #help;; + + + + A problem occurred starting the F# Interactive process. This may be due to a known problem with background process console support for Unicode-enabled applications on some Windows systems. Try selecting Tools->Options->F# Interactive for Visual Studio and enter '--fsi-server-no-unicode'. + Se produjo un problema al iniciar el proceso de F# interactivo. Esto puede deberse a un problema conocido de compatibilidad de la consola de procesos en segundo plano con aplicaciones habilitadas para Unicode en algunos sistemas Windows. Pruebe lo siguiente: seleccione Herramientas->Opciones->F# interactivo para Visual Studio y escriba “--fsi-server-no-unicode”. + + + + '{0}' is not a valid assembly name + '{0}' no es un nombre de ensamblado válido. + + + + Directory '{0}' doesn't exist + El directorio '{0}' no existe. + + + + Invalid directive '#{0} {1}' + Directiva '#{0} {1}' no válida. + + + + Warning: line too long, ignoring some characters\n + Advertencia: línea demasiado larga, omitiendo algunos caracteres.\n + + + + Real: {0}, CPU: {1}, GC {2} + Real: {0}, CPU: {1}, GC: {2} + + + + gen + gen + + + + \n\nException raised during pretty printing.\nPlease report this so it can be fixed.\nTrace: {0}\n + \n\nSe generó una excepción durante la impresión con sangría.\nComuníquelo para poder corregirlo.\nSeguimiento: {0}\n + + + + F# Interactive directives: + Directivas de F# interactivo: + + + + Reference (dynamically load) the given DLL + Hacer referencia (cargada dinámicamente) al archivo DLL proporcionado + + + + Add the given search path for referenced DLLs + Agregar la ruta de acceso de búsqueda proporcionada para archivos DLL a los que se hace referencia + + + + Load the given file(s) as if compiled and referenced + Cargar los archivos proporcionados como si estuvieran compilados y referenciados + + + + Toggle timing on/off + Activar o desactivar el control de tiempo + + + + Display help + Mostrar ayuda + + + + Exit + Salir + + + + F# Interactive command line options: + Opciones de la línea de comandos de F# interactivo: + + + + See '{0}' for options + Vea '{0}' para conocer las opciones + + + + Loading + Cargando + + + + \n- Interrupt\n + \n- Interrumpir\n + + + + \n- Exit...\n + \n- Salir...\n + + + + - Aborting main thread... + - Anulando el subproceso principal... + + + + Failed to install ctrl-c handler - Ctrl-C handling will not be available. Error was:\n\t{0} + No se pudo instalar el controlador ctrl-c. No estará disponible, por tanto, el control mediante Ctrl-C. El error es:\n\t{0} + + + + --> Referenced '{0}' + --> '{0}' referenciado + + + + --> Referenced '{0}' (file may be locked by F# Interactive process) + --> “{0}” al que se hace referencia (el archivo puede estar bloqueado por un proceso de F# interactivo) + + + + --> Referenced '{0}' (an assembly with a different timestamp has already been referenced from this location, reset fsi to load the updated assembly) + --> Se hace referencia a '{0}' (ya se ha hecho referencia a un ensamblado con una marca de tiempo distinta desde esta ubicación, restablecer fsi para cargar el ensamblado actualizado) + + + + --> Added '{0}' to library include path + --> Se agregó '{0}' a la ruta de acceso de inclusión de biblioteca + + + + --> Timing now on + --> Control de tiempo activado + + + + --> Timing now off + --> Control de tiempo desactivado + + + + - Unexpected ThreadAbortException (Ctrl-C) during event handling: Trying to restart... + - ThreadAbortException inesperado (Ctrl-C) durante el control de eventos: intentando reiniciar... + + + + Failed to resolve assembly '{0}' + No se pudo resolver el ensamblado '{0}'. + + + + Binding session to '{0}'... + Enlazando sesión con '{0}'... + + + + Microsoft (R) F# Interactive version {0} + Microsoft (R) F# interactivo, versión {0} + + + + F# Interactive for F# {0} + F# interactivo para F# {0} + + + + Prevents references from being locked by the F# Interactive process + Impide que el proceso de F# interactivo bloquee las referencias + + + + + \ No newline at end of file diff --git a/src/fsharp/fsi/xlf/FSIstrings.txt.fr.xlf b/src/fsharp/fsi/xlf/FSIstrings.txt.fr.xlf new file mode 100644 index 00000000000..917a17f4352 --- /dev/null +++ b/src/fsharp/fsi/xlf/FSIstrings.txt.fr.xlf @@ -0,0 +1,272 @@ + + + + + + Stopped due to error\n + Arrêt en raison d'une erreur\n + + + + Usage: {0} <options> [script.fsx [<arguments>]] + Utilisation : {0} <options> [script.fsx [<arguments>]] + + + + - INPUT FILES - + - FICHIERS D'ENTRÉE - + + + + - CODE GENERATION - + - GÉNÉRATION DE CODE - + + + + - ERRORS AND WARNINGS - + - ERREURS ET AVERTISSEMENTS - + + + + - LANGUAGE - + - LANGAGE - + + + + - MISCELLANEOUS - + - DIVERS - + + + + - ADVANCED - + - AVANCÉ - + + + + Exception raised when starting remoting server.\n{0} + Exception déclenchée lors du démarrage du serveur de communication à distance.\n{0} + + + + Use the given file on startup as initial input + Utilise le fichier spécifié au démarrage en tant qu'entrée initiale + + + + #load the given file on startup + #load le fichier spécifié au démarrage + + + + Treat remaining arguments as command line arguments, accessed using fsi.CommandLineArgs + Traite les arguments restants en tant qu'arguments de ligne de commande, accessibles via fsi.CommandLineArgs + + + + Display this usage message (Short form: -?) + Affiche ce message d'utilisation (forme abrégée : -?) + + + + Exit fsi after loading the files or running the .fsx script given on the command line + Sortie de fsi après le chargement des fichiers ou l'exécution du script .fsx spécifié dans la ligne de commande + + + + Execute interactions on a Windows Forms event loop (on by default) + Exécute des interactions dans une boucle d'événements Windows Forms (activé par default) + + + + Suppress fsi writing to stdout + Supprime l'écriture de fsi dans stdout + + + + Support TAB completion in console (on by default) + Prend en charge la saisie semi-automatique via la touche Tab dans la console (activée par défaut) + + + + Emit debug information in quotations + Émettre les informations de débogage entre quotations + + + + For help type #help;; + Pour obtenir de l'aide, tapez #help;; + + + + A problem occurred starting the F# Interactive process. This may be due to a known problem with background process console support for Unicode-enabled applications on some Windows systems. Try selecting Tools->Options->F# Interactive for Visual Studio and enter '--fsi-server-no-unicode'. + Un problème s'est produit lors du démarrage du processus F# Interactive. Cela peut être dû à un problème connu lié à la prise en charge par la console des processus en arrière-plan pour les applications Unicode sur certains systèmes Windows. Essayez de sélectionner Outils->Options->F# Interactive pour Visual Studio, puis entrez '--fsi-server-no-unicode'. + + + + '{0}' is not a valid assembly name + '{0}' n'est pas un nom d'assembly valide + + + + Directory '{0}' doesn't exist + Le répertoire '{0}' n'existe pas + + + + Invalid directive '#{0} {1}' + Directive non valide '#{0} {1}' + + + + Warning: line too long, ignoring some characters\n + Avertissement : ligne trop longue, certains caractères sont ignorés\n + + + + Real: {0}, CPU: {1}, GC {2} + Réel : {0}, Processeur : {1}, GC {2} + + + + gen + gén + + + + \n\nException raised during pretty printing.\nPlease report this so it can be fixed.\nTrace: {0}\n + \n\nException déclenchée durant l'impression en mode Pretty.\nSignalez ce problème afin qu'il soit corrigé.\nTrace : {0}\n + + + + F# Interactive directives: + Directives F# Interactive : + + + + Reference (dynamically load) the given DLL + Référence (charger dynamiquement) la DLL spécifiée + + + + Add the given search path for referenced DLLs + Ajoute le chemin de recherche spécifié pour les DLL référencées + + + + Load the given file(s) as if compiled and referenced + Charge le ou les fichiers spécifiés comme s'ils étaient compilés et référencés + + + + Toggle timing on/off + Minutage activé/désactivé + + + + Display help + Afficher l'aide + + + + Exit + Quitter + + + + F# Interactive command line options: + Options de ligne de commande F# Interactive : + + + + See '{0}' for options + Consulter '{0}' pour les options + + + + Loading + Chargement en cours + + + + \n- Interrupt\n + \n- Interrompre\n + + + + \n- Exit...\n + \n- Quitter...\n + + + + - Aborting main thread... + - Abandon du thread principal... + + + + Failed to install ctrl-c handler - Ctrl-C handling will not be available. Error was:\n\t{0} + Impossible d'installer le gestionnaire ctrl-c - La gestion Ctrl-C n'est pas disponible. L'erreur était :\n\t{0} + + + + --> Referenced '{0}' + --> Référencement de '{0}' + + + + --> Referenced '{0}' (file may be locked by F# Interactive process) + --> Référencement de '{0}' (le fichier est peut-être verrouillé par le processus F# Interactive) + + + + --> Referenced '{0}' (an assembly with a different timestamp has already been referenced from this location, reset fsi to load the updated assembly) + --> Référencement de '{0}' (un assembly avec un horodatage différent a déjà été référencé à partir de cet emplacement, réinitialisez fsi pour charger l'assembly mis à jour) + + + + --> Added '{0}' to library include path + --> Ajout de '{0}' au chemin d'accès Include de la bibliothèque + + + + --> Timing now on + --> Minutage activé + + + + --> Timing now off + --> Minutage désactivé + + + + - Unexpected ThreadAbortException (Ctrl-C) during event handling: Trying to restart... + - ThreadAbortException inattendu (Ctrl-C) durant la gestion des événements : tentative de redémarrage... + + + + Failed to resolve assembly '{0}' + Échec de la résolution de l'assembly '{0}' + + + + Binding session to '{0}'... + Liaison de la session à '{0}'... + + + + Microsoft (R) F# Interactive version {0} + Microsoft (R) F# Interactive version {0} + + + + F# Interactive for F# {0} + F# Interactive pour F# {0} + + + + Prevents references from being locked by the F# Interactive process + Empêche le blocage des références par le processus de F# Interactive + + + + + \ No newline at end of file diff --git a/src/fsharp/fsi/xlf/FSIstrings.txt.it.xlf b/src/fsharp/fsi/xlf/FSIstrings.txt.it.xlf new file mode 100644 index 00000000000..d7f05d6aa96 --- /dev/null +++ b/src/fsharp/fsi/xlf/FSIstrings.txt.it.xlf @@ -0,0 +1,272 @@ + + + + + + Stopped due to error\n + Interruzione a causa di un errore\n + + + + Usage: {0} <options> [script.fsx [<arguments>]] + Sintassi: {0} <opzioni> [script.fsx [<argomenti>]] + + + + - INPUT FILES - + - FILE DI INPUT - + + + + - CODE GENERATION - + - GENERAZIONE CODICE - + + + + - ERRORS AND WARNINGS - + - ERRORI E AVVISI - + + + + - LANGUAGE - + - LINGUAGGIO - + + + + - MISCELLANEOUS - + - VARIE - + + + + - ADVANCED - + - AVANZATE - + + + + Exception raised when starting remoting server.\n{0} + Eccezione all'avvio del server remoto.\n{0} + + + + Use the given file on startup as initial input + Usa il file specificato all'avvio come input iniziale + + + + #load the given file on startup + #load file specificato all'avvio + + + + Treat remaining arguments as command line arguments, accessed using fsi.CommandLineArgs + Tratta gli argomenti rimanenti come argomenti della riga di comando accessibili mediante fsi.CommandLineArgs + + + + Display this usage message (Short form: -?) + Visualizza questo messaggio relativo all'uso (forma breve: -?) + + + + Exit fsi after loading the files or running the .fsx script given on the command line + Uscita da fsi dopo il caricamento dei file o l'esecuzione dello script .fsx specificato nella riga di comando + + + + Execute interactions on a Windows Forms event loop (on by default) + Esegue interazioni in un ciclo di eventi di Windows Forms (abilitata per impostazione predefinita) + + + + Suppress fsi writing to stdout + Impedisci scrittura fsi su stdout + + + + Support TAB completion in console (on by default) + Supporta completamento con tasto TAB in console (abilitata per impostazione predefinita) + + + + Emit debug information in quotations + Crea informazioni di debug in quotation + + + + For help type #help;; + Per informazioni, digitare #help;; + + + + A problem occurred starting the F# Interactive process. This may be due to a known problem with background process console support for Unicode-enabled applications on some Windows systems. Try selecting Tools->Options->F# Interactive for Visual Studio and enter '--fsi-server-no-unicode'. + Si è verificato un problema durante l'avvio del processo F# Interactive. Può trattarsi di un problema noto del supporto della console dei processi in background per le applicazioni abilitate per Unicode in alcuni sistemi Windows. Provare a scegliere Strumenti->Opzioni->F# Interactive per Visual Studio e immettere '--fsi-server-no-unicode'. + + + + '{0}' is not a valid assembly name + '{0}' non è un nome di assembly valido + + + + Directory '{0}' doesn't exist + La directory '{0}' non esiste + + + + Invalid directive '#{0} {1}' + Direttiva '#{0} {1}' non valida + + + + Warning: line too long, ignoring some characters\n + Avviso: riga troppo lunga; alcuni caratteri verranno ignorati\n + + + + Real: {0}, CPU: {1}, GC {2} + Reale: {0}, CPU: {1}, GC {2} + + + + gen + gen + + + + \n\nException raised during pretty printing.\nPlease report this so it can be fixed.\nTrace: {0}\n + \n\nEccezione durante la riformattazione.\nSegnalare il problema affinché possa essere risolto.\nTraccia: {0}\n + + + + F# Interactive directives: + Direttive F# Interactive: + + + + Reference (dynamically load) the given DLL + Aggiunge riferimento alla DLL specificata (caricamento dinamico) + + + + Add the given search path for referenced DLLs + Aggiunge il percorso di ricerca specificato per le DLL a cui viene fatto riferimento + + + + Load the given file(s) as if compiled and referenced + Carica il file (o i file) specificati come se compilati ed aggiunti come riferimento + + + + Toggle timing on/off + Attiva/disattiva la temporizzazione + + + + Display help + Visualizza la guida + + + + Exit + Esci + + + + F# Interactive command line options: + Opzioni della riga di comando F# Interactive: + + + + See '{0}' for options + Vedere '{0}' per le opzioni + + + + Loading + Caricamento + + + + \n- Interrupt\n + \n- Interrupt\n + + + + \n- Exit...\n + \n- Esci...\n + + + + - Aborting main thread... + - Interruzione del thread principale... + + + + Failed to install ctrl-c handler - Ctrl-C handling will not be available. Error was:\n\t{0} + Non è stato possibile installare il gestore di CTRL+C. La gestione di CTRL+C non sarà disponibile. Errore:\n\t{0} + + + + --> Referenced '{0}' + --> Riferimento a '{0}' + + + + --> Referenced '{0}' (file may be locked by F# Interactive process) + --> Riferimento a '{0}' (il file potrebbe essere bloccato dal processo di F# Interactive) + + + + --> Referenced '{0}' (an assembly with a different timestamp has already been referenced from this location, reset fsi to load the updated assembly) + --> Riferimento già presente a '{0}' (un assembly con timestamp diverso è già presente come riferimento in questa posizione. Reimpostare fsi per caricare l'assembly aggiornato) + + + + --> Added '{0}' to library include path + --> Aggiunto '{0}' al percorso di inclusione della libreria + + + + --> Timing now on + --> Temporizzazione attivata + + + + --> Timing now off + --> Temporizzazione disattivata + + + + - Unexpected ThreadAbortException (Ctrl-C) during event handling: Trying to restart... + - Eccezione ThreadAbortException (Ctrl-C) imprevista durante la gestione dell'evento. Verrà effettuato un tentativo di riavvio... + + + + Failed to resolve assembly '{0}' + Non è stato possibile risolvere l'assembly '{0}' + + + + Binding session to '{0}'... + Binding della sessione a '{0}'... + + + + Microsoft (R) F# Interactive version {0} + Microsoft (R) F# Interactive versione {0} + + + + F# Interactive for F# {0} + F# Interactive per F# {0} + + + + Prevents references from being locked by the F# Interactive process + Impedisce che i riferimenti vengano bloccati dal processo F# Interactive + + + + + \ No newline at end of file diff --git a/src/fsharp/fsi/xlf/FSIstrings.txt.ja.xlf b/src/fsharp/fsi/xlf/FSIstrings.txt.ja.xlf new file mode 100644 index 00000000000..0751b4601e4 --- /dev/null +++ b/src/fsharp/fsi/xlf/FSIstrings.txt.ja.xlf @@ -0,0 +1,272 @@ + + + + + + Stopped due to error\n + エラーのため停止しました\n + + + + Usage: {0} <options> [script.fsx [<arguments>]] + 使い方: {0} <オプション> [script.fsx [<引数>]] + + + + - INPUT FILES - + - 入力ファイル - + + + + - CODE GENERATION - + - コード生成 - + + + + - ERRORS AND WARNINGS - + - エラーと警告 - + + + + - LANGUAGE - + - 言語 - + + + + - MISCELLANEOUS - + - その他 - + + + + - ADVANCED - + - 詳細 - + + + + Exception raised when starting remoting server.\n{0} + サーバーのリモート処理の開始中に例外が発生しました。\n{0} + + + + Use the given file on startup as initial input + 指定されたファイルをスタートアップ時の初期入力として使用します + + + + #load the given file on startup + #load: 指定されたファイルをスタートアップ時に読み込みます + + + + Treat remaining arguments as command line arguments, accessed using fsi.CommandLineArgs + 残りの引数は、fsi.CommandLineArgs を使用してアクセスするコマンド ライン引数として扱います + + + + Display this usage message (Short form: -?) + この使用方法に関するメッセージを表示します (短い形式: -?) + + + + Exit fsi after loading the files or running the .fsx script given on the command line + コマンド ライン上で指定されたファイルの読み込みまたは .fsx スクリプトの実行後、fsi を終了します + + + + Execute interactions on a Windows Forms event loop (on by default) + Windows フォーム イベント ループでの対話の実行 (既定でオン) + + + + Suppress fsi writing to stdout + fsi の stdout への書き込みの抑止 + + + + Support TAB completion in console (on by default) + コンソールでの TAB 補完のサポート (既定でオン) + + + + Emit debug information in quotations + デバッグ情報を引用符で囲んで生成します + + + + For help type #help;; + ヘルプを表示するには次を入力してください: #help;; + + + + A problem occurred starting the F# Interactive process. This may be due to a known problem with background process console support for Unicode-enabled applications on some Windows systems. Try selecting Tools->Options->F# Interactive for Visual Studio and enter '--fsi-server-no-unicode'. + F# インタラクティブのプロセスの開始中に問題が発生しました。この原因は、一部の Windows システム上での Unicode 対応アプリケーションのバックグラウンド プロセス コンソールのサポートに関する既知の問題にある可能性があります。[ツール]5D; の [オプション]5D; から [F# Interactive for Visual Studio]5D; を選択し、「--fsi-server-no-unicode」と入力してください。 + + + + '{0}' is not a valid assembly name + '{0}' は有効なアセンブリ名ではありません + + + + Directory '{0}' doesn't exist + ディレクトリ "{0}" は存在しません + + + + Invalid directive '#{0} {1}' + 無効なディレクティブ '#{0} {1}' + + + + Warning: line too long, ignoring some characters\n + 警告: 行が長すぎます。一部の文字は無視されます\n + + + + Real: {0}, CPU: {1}, GC {2} + リアル: {0}、CPU: {1}、GC {2} + + + + gen + gen + + + + \n\nException raised during pretty printing.\nPlease report this so it can be fixed.\nTrace: {0}\n + \n\n再フォーマット中に例外が発生しました。\nこの問題を解決できるように報告してください。\nトレース: {0}\n + + + + F# Interactive directives: + F# インタラクティブ ディレクティブ: + + + + Reference (dynamically load) the given DLL + 指定された DLL を参照します (動的読み込み) + + + + Add the given search path for referenced DLLs + 参照されている DLL に対し、指定された検索パスを追加します + + + + Load the given file(s) as if compiled and referenced + コンパイルおよび参照されているように、指定されたファイルを読み込みます + + + + Toggle timing on/off + タイミングのオンとオフを切り替えます + + + + Display help + ヘルプの表示 + + + + Exit + 終了 + + + + F# Interactive command line options: + F# インタラクティブ コマンド ライン オプション: + + + + See '{0}' for options + オプションについては '{0}' を参照してください + + + + Loading + 読み込み中 + + + + \n- Interrupt\n + \n- 割り込み\n + + + + \n- Exit...\n + \n- 終了...\n + + + + - Aborting main thread... + - メイン スレッドを中止しています... + + + + Failed to install ctrl-c handler - Ctrl-C handling will not be available. Error was:\n\t{0} + ctrl-c ハンドラーをインストールできませんでした - Ctrl-C 処理を使用できるようになりません。エラー:\n\t{0} + + + + --> Referenced '{0}' + --> '{0}' を参照しました + + + + --> Referenced '{0}' (file may be locked by F# Interactive process) + --> '{0}' を参照しました (ファイルが F# インタラクティブのプロセスによってロックされている可能性があります) + + + + --> Referenced '{0}' (an assembly with a different timestamp has already been referenced from this location, reset fsi to load the updated assembly) + --> 参照された '{0}' (タイムスタンプが異なるアセンブリが既にこの場所から参照されています。fsi をリセットして更新されたアセンブリを読み込んでください) + + + + --> Added '{0}' to library include path + --> ライブラリのインクルード パスに '{0}' を追加しました + + + + --> Timing now on + --> 現在タイミングはオンです + + + + --> Timing now off + --> 現在タイミングはオフです + + + + - Unexpected ThreadAbortException (Ctrl-C) during event handling: Trying to restart... + - イベント処理中に予期しない ThreadAbortException (Ctrl-C) が発生しました: 再開を試行しています... + + + + Failed to resolve assembly '{0}' + アセンブリ '{0}' を解決できませんでした + + + + Binding session to '{0}'... + セッションを '{0}' にバインドしています... + + + + Microsoft (R) F# Interactive version {0} + Microsoft (R) F# インタラクティブ バージョン {0} + + + + F# Interactive for F# {0} + F# {0} の F# インタラクティブ + + + + Prevents references from being locked by the F# Interactive process + 参照が F# インタラクティブ プロセスによってロックされないようにします。 + + + + + \ No newline at end of file diff --git a/src/fsharp/fsi/xlf/FSIstrings.txt.ko.xlf b/src/fsharp/fsi/xlf/FSIstrings.txt.ko.xlf new file mode 100644 index 00000000000..69a5d3b5352 --- /dev/null +++ b/src/fsharp/fsi/xlf/FSIstrings.txt.ko.xlf @@ -0,0 +1,272 @@ + + + + + + Stopped due to error\n + 오류 때문에 중지되었습니다.\n + + + + Usage: {0} <options> [script.fsx [<arguments>]] + 사용법: {0} <options> [script.fsx [<arguments>]] + + + + - INPUT FILES - + - 입력 파일 - + + + + - CODE GENERATION - + - 코드 생성 - + + + + - ERRORS AND WARNINGS - + - 오류 및 경고 - + + + + - LANGUAGE - + - 언어 - + + + + - MISCELLANEOUS - + - 기타 - + + + + - ADVANCED - + - 고급 - + + + + Exception raised when starting remoting server.\n{0} + 원격 서버를 시작하는 동안 예외가 발생했습니다.\n{0} + + + + Use the given file on startup as initial input + 시작 시 지정된 파일을 초기 입력으로 사용합니다. + + + + #load the given file on startup + #load: 시작할 때 지정된 파일을 로드합니다. + + + + Treat remaining arguments as command line arguments, accessed using fsi.CommandLineArgs + 나머지 인수를 fsi.CommandLineArgs를 사용하여 액세스하는 명령줄 인수로 처리합니다. + + + + Display this usage message (Short form: -?) + 이 사용법 메시지를 표시합니다(약식: -?). + + + + Exit fsi after loading the files or running the .fsx script given on the command line + 파일을 로드한 후 또는 명령줄에 지정된 .fsx 스크립트를 실행한 후 fsi를 종료하세요. + + + + Execute interactions on a Windows Forms event loop (on by default) + Windows Forms 이벤트 루프에서 상호 작용을 실행합니다(기본값: 설정). + + + + Suppress fsi writing to stdout + fsi에서 stdout에 쓰지 않습니다. + + + + Support TAB completion in console (on by default) + 콘솔에서 Tab 키 완성 기능을 지원합니다(기본값: 설정). + + + + Emit debug information in quotations + 인용구의 디버그 정보를 내보냅니다. + + + + For help type #help;; + 도움말을 보려면 #help;;를 입력하세요. + + + + A problem occurred starting the F# Interactive process. This may be due to a known problem with background process console support for Unicode-enabled applications on some Windows systems. Try selecting Tools->Options->F# Interactive for Visual Studio and enter '--fsi-server-no-unicode'. + F# 대화형 프로세스를 시작하는 동안 오류가 발생했습니다. 일부 Windows 시스템에서 나타나는 유니코드 기반 응용 프로그램의 백그라운드 프로세스 콘솔 지원과 관련된 알려진 문제가 원인일 수 있습니다. [도구]5D;->[옵션]5D;->[Visual Studio용 F# 대화형]5D;를 선택하고 '--fsi-server-no-unicode'를 입력해 보세요. + + + + '{0}' is not a valid assembly name + '{0}'은(는) 올바른 어셈블리 이름이 아닙니다. + + + + Directory '{0}' doesn't exist + '{0}' 디렉터리가 없습니다. + + + + Invalid directive '#{0} {1}' + 잘못된 지시문 '#{0} {1}' + + + + Warning: line too long, ignoring some characters\n + 경고: 줄이 너무 길어 일부 문자가 무시됩니다.\n + + + + Real: {0}, CPU: {1}, GC {2} + 실제: {0}, CPU: {1}, GC {2} + + + + gen + gen + + + + \n\nException raised during pretty printing.\nPlease report this so it can be fixed.\nTrace: {0}\n + \n\n자동 서식 지정 중 예외가 발생했습니다.\n문제를 해결할 수 있도록 보고하세요.\n추적: {0}\n + + + + F# Interactive directives: + F# 대화형 지시문: + + + + Reference (dynamically load) the given DLL + 지정된 DLL을 참조(동적 로드)합니다. + + + + Add the given search path for referenced DLLs + 참조된 DLL에 대해 지정된 검색 경로를 추가합니다. + + + + Load the given file(s) as if compiled and referenced + 지정된 파일이 컴파일되고 참조된 것으로 간주하여 해당 파일을 로드합니다. + + + + Toggle timing on/off + 타이밍을 설정/해제합니다. + + + + Display help + 도움말을 표시합니다. + + + + Exit + 끝내기 + + + + F# Interactive command line options: + F# 대화형 명령줄 옵션: + + + + See '{0}' for options + 옵션에 대해서는 '{0}'을(를) 참조하세요. + + + + Loading + 로드 + + + + \n- Interrupt\n + \n- 중단\n + + + + \n- Exit...\n + \n- 끝내기...\n + + + + - Aborting main thread... + - 주 스레드를 중단하는 중... + + + + Failed to install ctrl-c handler - Ctrl-C handling will not be available. Error was:\n\t{0} + Ctrl-C 처리기를 설치하지 못했습니다. Ctrl-C 처리를 사용할 수 없습니다. 오류는 다음과 같습니다.\n\t{0} + + + + --> Referenced '{0}' + --> '{0}'이(가) 참조되었습니다. + + + + --> Referenced '{0}' (file may be locked by F# Interactive process) + --> '{0}' 참조됨(파일은 F# 대화형 프로세스에 의해 잠길 수 있음) + + + + --> Referenced '{0}' (an assembly with a different timestamp has already been referenced from this location, reset fsi to load the updated assembly) + --> 참조된 '{0}'(다른 타임스탬프가 포함된 어셈블리가 이 위치에서 이미 참조되었습니다. fsi를 다시 설정하여 업데이트된 어셈블리를 로드하세요.) + + + + --> Added '{0}' to library include path + --> 라이브러리 포함 경로에 '{0}'을(를) 추가했습니다. + + + + --> Timing now on + --> 타이밍이 설정되었습니다. + + + + --> Timing now off + --> 타이밍이 해제되었습니다. + + + + - Unexpected ThreadAbortException (Ctrl-C) during event handling: Trying to restart... + - 이벤트를 처리하는 동안 예기치 않은 ThreadAbortException(Ctrl-C)이 발생했습니다. 다시 시작합니다... + + + + Failed to resolve assembly '{0}' + 어셈블리 '{0}'을(를) 확인하지 못했습니다. + + + + Binding session to '{0}'... + 세션을 '{0}'에 바인딩하는 중... + + + + Microsoft (R) F# Interactive version {0} + Microsoft (R) F# 대화형 버전 {0} + + + + F# Interactive for F# {0} + F# {0}에 대한 F# 대화형 + + + + Prevents references from being locked by the F# Interactive process + 참조가 F# 대화형 프로세스에 의해 잠기지 않도록 합니다. + + + + + \ No newline at end of file diff --git a/src/fsharp/fsi/xlf/FSIstrings.txt.pl.xlf b/src/fsharp/fsi/xlf/FSIstrings.txt.pl.xlf new file mode 100644 index 00000000000..82960cad8fd --- /dev/null +++ b/src/fsharp/fsi/xlf/FSIstrings.txt.pl.xlf @@ -0,0 +1,272 @@ + + + + + + Stopped due to error\n + Zatrzymano ze względu na błąd\n + + + + Usage: {0} <options> [script.fsx [<arguments>]] + Składnia: {0} <opcje> [script.fsx [<argumenty>]] + + + + - INPUT FILES - + - PLIKI WEJŚCIOWE - + + + + - CODE GENERATION - + - GENEROWANIE KODU - + + + + - ERRORS AND WARNINGS - + - BŁĘDY I OSTRZEŻENIA - + + + + - LANGUAGE - + - JĘZYK - + + + + - MISCELLANEOUS - + - RÓŻNE - + + + + - ADVANCED - + - ZAAWANSOWANE - + + + + Exception raised when starting remoting server.\n{0} + Wystąpił wyjątek podczas uruchamiania serwera usług zdalnych.\n{0} + + + + Use the given file on startup as initial input + Użyj danego pliku przy uruchamianiu jako początkowych danych wejściowych + + + + #load the given file on startup + #load załaduj dany plik przy uruchamianiu + + + + Treat remaining arguments as command line arguments, accessed using fsi.CommandLineArgs + Traktuj pozostałe argumenty jak argumenty wiersza polecenia, do których uzyskano dostęp przy użyciu elementu fsi.CommandLineArgs + + + + Display this usage message (Short form: -?) + Wyświetl ten komunikat dotyczący składni (krótka wersja: -?) + + + + Exit fsi after loading the files or running the .fsx script given on the command line + Po załadowaniu plików lub uruchomieniu skryptu .fsx podanego w wierszu polecenia zakończ działanie programu fsi + + + + Execute interactions on a Windows Forms event loop (on by default) + Wykonaj interakcje w pętli zdarzenia Windows Forms (domyślnie włączone) + + + + Suppress fsi writing to stdout + Pomiń zapisywanie przez program fsi w stdout + + + + Support TAB completion in console (on by default) + Obsługa uzupełniania po naciśnięciu klawisza TAB w konsoli (domyślnie włączona) + + + + Emit debug information in quotations + Emituj informacje debugowania w cudzysłowach + + + + For help type #help;; + Aby uzyskać pomoc, wpisz #help;; + + + + A problem occurred starting the F# Interactive process. This may be due to a known problem with background process console support for Unicode-enabled applications on some Windows systems. Try selecting Tools->Options->F# Interactive for Visual Studio and enter '--fsi-server-no-unicode'. + Wystąpił problem podczas uruchamiania procesu narzędzia F# Interactive. Taka sytuacja może być spowodowana znanym problemem z obsługą konsoli procesu w tle dla aplikacji obsługujących kodowanie Unicode w niektórych systemach Windows. Spróbuj wybrać kolejno opcje Narzędzia->Opcje->F# Interactive dla Visual Studio i wprowadź „--fsi-server-no-unicode”. + + + + '{0}' is not a valid assembly name + Nazwa „{0}” nie jest prawidłową nazwą zestawu + + + + Directory '{0}' doesn't exist + Katalog „{0}” nie istnieje + + + + Invalid directive '#{0} {1}' + Nieprawidłowa dyrektywa „#{0} {1}” + + + + Warning: line too long, ignoring some characters\n + Ostrzeżenie: wiersz jest zbyt długi, niektóre znaki zostaną zignorowane\n + + + + Real: {0}, CPU: {1}, GC {2} + Czas rzeczywisty: {0}, czas procesora: {1}, operacje odzyskiwania pamięci: {2} + + + + gen + generacja + + + + \n\nException raised during pretty printing.\nPlease report this so it can be fixed.\nTrace: {0}\n + \n\nWystąpił wyjątek podczas formatowania kodu.\nZgłoś go, aby można było rozwiązać ten problem.\nŚlad: {0}\n + + + + F# Interactive directives: + Dyrektywy narzędzia F# Interactive: + + + + Reference (dynamically load) the given DLL + Przywołaj (załaduj dynamicznie) daną bibliotekę DLL + + + + Add the given search path for referenced DLLs + Dodaj daną ścieżkę wyszukiwania dla przywoływanych bibliotek DLL + + + + Load the given file(s) as if compiled and referenced + Załaduj dane pliki tak, jakby były skompilowane i przywoływane + + + + Toggle timing on/off + Włącz/wyłącz funkcję chronometrażu + + + + Display help + Wyświetl pomoc + + + + Exit + Zakończ + + + + F# Interactive command line options: + Opcje wiersza polecenia narzędzia F# Interactive: + + + + See '{0}' for options + Aby uzyskać informacje o opcjach, zobacz „{0}” + + + + Loading + Ładowanie + + + + \n- Interrupt\n + \n- Przerwanie\n + + + + \n- Exit...\n + \n- Trwa kończenie działania...\n + + + + - Aborting main thread... + - Trwa przerywanie głównego wątku... + + + + Failed to install ctrl-c handler - Ctrl-C handling will not be available. Error was:\n\t{0} + Nie powiodło się zainstalowanie procedury obsługi ctrl-c. Obsługa Ctrl-C będzie niedostępna. Błąd:\n\t{0} + + + + --> Referenced '{0}' + --> Przywołano element „{0}” + + + + --> Referenced '{0}' (file may be locked by F# Interactive process) + --> Przywołano element „{0}” (plik może być zablokowany przez proces narzędzia F# Interactive) + + + + --> Referenced '{0}' (an assembly with a different timestamp has already been referenced from this location, reset fsi to load the updated assembly) + --> Zestaw „{0}” występujący w odwołaniu (zestaw z inną sygnaturą czasową występuje już w odwołaniu z tej lokalizacji; zresetuj narzędzie fsi, aby załadować zaktualizowany zestaw) + + + + --> Added '{0}' to library include path + --> Dodano element „{0}” do ścieżki dołączenia biblioteki + + + + --> Timing now on + --> Funkcja chronometrażu została włączona + + + + --> Timing now off + --> Funkcja chronometrażu została wyłączona + + + + - Unexpected ThreadAbortException (Ctrl-C) during event handling: Trying to restart... + - Nieoczekiwany element ThreadAbortException (Ctrl-C) podczas obsługi zdarzenia: trwa próba ponownego uruchomienia... + + + + Failed to resolve assembly '{0}' + Nie powiodło się rozpoznanie zestawu „{0}” + + + + Binding session to '{0}'... + Trwa tworzenie powiązania sesji z „{0}”... + + + + Microsoft (R) F# Interactive version {0} + Microsoft (R) F# Interactive, wersja {0} + + + + F# Interactive for F# {0} + F# Interactive dla języka F# {0} + + + + Prevents references from being locked by the F# Interactive process + Uniemożliwia blokowanie odwołań przez proces narzędzia F# Interactive + + + + + \ No newline at end of file diff --git a/src/fsharp/fsi/xlf/FSIstrings.txt.pt-BR.xlf b/src/fsharp/fsi/xlf/FSIstrings.txt.pt-BR.xlf new file mode 100644 index 00000000000..d35388b4cb9 --- /dev/null +++ b/src/fsharp/fsi/xlf/FSIstrings.txt.pt-BR.xlf @@ -0,0 +1,272 @@ + + + + + + Stopped due to error\n + Interrompido devido a erro\n + + + + Usage: {0} <options> [script.fsx [<arguments>]] + Uso: {0} <opções> [script.fsx [<argumentos>]] + + + + - INPUT FILES - + - ARQUIVOS DE ENTRADA - + + + + - CODE GENERATION - + - GERAÇÃO DE CÓDIGO - + + + + - ERRORS AND WARNINGS - + - ERROS E AVISOS - + + + + - LANGUAGE - + - LINGUAGEM - + + + + - MISCELLANEOUS - + - DIVERSOS - + + + + - ADVANCED - + - AVANÇADO - + + + + Exception raised when starting remoting server.\n{0} + Exceção levantadas ao iniciar o servidor remoto.\n{0} + + + + Use the given file on startup as initial input + Use o arquivo fornecido na inicialização como entrada inicial + + + + #load the given file on startup + #load o arquivo dado na inicialização + + + + Treat remaining arguments as command line arguments, accessed using fsi.CommandLineArgs + Tratar argumentos restantes como argumentos de linha de comando acessados através de fsi.CommandLineArgs + + + + Display this usage message (Short form: -?) + Exibir esta mensagem de uso (Forma abreviada: -?) + + + + Exit fsi after loading the files or running the .fsx script given on the command line + Feche fsi após o carregamento dos arquivos ou execução do script .fsx fornecido na linha de comando + + + + Execute interactions on a Windows Forms event loop (on by default) + Execute interações em um loop de eventos do Windows Forms (por padrão) + + + + Suppress fsi writing to stdout + Suprimir fsi gravando ao stdout + + + + Support TAB completion in console (on by default) + Suportar a conclusão TAB no console (por padrão) + + + + Emit debug information in quotations + Emitir informações de depuração entre aspas + + + + For help type #help;; + Para ajuda digite #help;; + + + + A problem occurred starting the F# Interactive process. This may be due to a known problem with background process console support for Unicode-enabled applications on some Windows systems. Try selecting Tools->Options->F# Interactive for Visual Studio and enter '--fsi-server-no-unicode'. + Um problema ocorreu na inicialização do processo F# Interativo. Isto pode ter ocorrido devido a um problema conhecido com processo de fundo do console de apoio pelo aplicativos habilitados Unicode em alguns sistemas do Windows. Tente Ferramentas->Opções->F# Interativo para Visual Studio e insira '--fsi-server-no-unicode'. + + + + '{0}' is not a valid assembly name + '{0}' não é um nome de assembly válido + + + + Directory '{0}' doesn't exist + O diretório '{0}' não existe + + + + Invalid directive '#{0} {1}' + Diretriz inválida '#{0} {1}' + + + + Warning: line too long, ignoring some characters\n + Aviso: linha muito longa, ignore alguns caracteres\n + + + + Real: {0}, CPU: {1}, GC {2} + Real: {0}, CPU: {1}, GC {2} + + + + gen + gen + + + + \n\nException raised during pretty printing.\nPlease report this so it can be fixed.\nTrace: {0}\n + \n\nExceção levantadas durante a reformatação automática.\nReporte esta exceção para ela que possa ser corrigida.\nRastrear: {0}\n + + + + F# Interactive directives: + Diretrizes F# Interativo: + + + + Reference (dynamically load) the given DLL + Referenciar (carregar dinamicamente) o DLL dado + + + + Add the given search path for referenced DLLs + Adicionar o caminho pesquisado dado aos DLLs referenciados + + + + Load the given file(s) as if compiled and referenced + Carregar os arquivo(s) como se compilados e referenciados + + + + Toggle timing on/off + Liga/desliga medição de tempo + + + + Display help + Exibir ajuda + + + + Exit + Sair + + + + F# Interactive command line options: + Opções de linha de comando F# Interativo: + + + + See '{0}' for options + Consulte '{0}' para obter opções + + + + Loading + Carregando + + + + \n- Interrupt\n + \n- Interrupção\n + + + + \n- Exit...\n + \n- Sair...\n + + + + - Aborting main thread... + – Anulando o thread principal... + + + + Failed to install ctrl-c handler - Ctrl-C handling will not be available. Error was:\n\t{0} + Falha ao instalar o manipulador ctrl-c - As manipulações Ctrl-C não estarão disponíveis. O erro foi:\n\t{0} + + + + --> Referenced '{0}' + --> Referenciado '{0}' + + + + --> Referenced '{0}' (file may be locked by F# Interactive process) + --> Referenciado '{0}' (o arquivo pode ter sido bloqueado pelo processo F# Interativo) + + + + --> Referenced '{0}' (an assembly with a different timestamp has already been referenced from this location, reset fsi to load the updated assembly) + --> '{0}' referenciado (um assembly com um carimbo de data/hora diferente já foi referenciado deste local, redefina o fsi para carregar o assembly atualizado) + + + + --> Added '{0}' to library include path + --> '{0}' foi adicionado à biblioteca de caminho de inclusão + + + + --> Timing now on + --> Timing ligado agora + + + + --> Timing now off + --> Timing desligado agora + + + + - Unexpected ThreadAbortException (Ctrl-C) during event handling: Trying to restart... + - Inesperada ThreadAbortException (Ctrl-C) durante o manuseio do evento: Tentando reiniciar... + + + + Failed to resolve assembly '{0}' + Falha ao resolver assembly '{0}' + + + + Binding session to '{0}'... + Associando sessão a '{0}'... + + + + Microsoft (R) F# Interactive version {0} + Microsoft (R) F# Interativo versão {0} + + + + F# Interactive for F# {0} + F# Interativo para F# {0} + + + + Prevents references from being locked by the F# Interactive process + Impede que as referências sejam bloqueadas pelo processo de F# Interativo + + + + + \ No newline at end of file diff --git a/src/fsharp/fsi/xlf/FSIstrings.txt.ru.xlf b/src/fsharp/fsi/xlf/FSIstrings.txt.ru.xlf new file mode 100644 index 00000000000..6e40ee07dd5 --- /dev/null +++ b/src/fsharp/fsi/xlf/FSIstrings.txt.ru.xlf @@ -0,0 +1,272 @@ + + + + + + Stopped due to error\n + Остановлено из-за ошибки\n + + + + Usage: {0} <options> [script.fsx [<arguments>]] + Использование: {0} <параметры> [script.fsx [<аргументы>]] + + + + - INPUT FILES - + - ВХОДНЫЕ ФАЙЛЫ - + + + + - CODE GENERATION - + - ФОРМИРОВАНИЕ КОДА - + + + + - ERRORS AND WARNINGS - + - ОШИБКИ И ПРЕДУПРЕЖДЕНИЯ - + + + + - LANGUAGE - + - ЯЗЫК - + + + + - MISCELLANEOUS - + - ПРОЧЕЕ - + + + + - ADVANCED - + - ДОПОЛНИТЕЛЬНО - + + + + Exception raised when starting remoting server.\n{0} + При запуске удаленного сервера возникло исключение.\n{0} + + + + Use the given file on startup as initial input + Использование данного файла при запуске в качестве начальных входных данных + + + + #load the given file on startup + #load: загружать данный файл при запуске + + + + Treat remaining arguments as command line arguments, accessed using fsi.CommandLineArgs + Обрабатывать остальные аргументы как аргументы командной строки с использованием fsi.CommandLineArgs + + + + Display this usage message (Short form: -?) + Вывод данного сообщения об использовании (краткая форма: -?) + + + + Exit fsi after loading the files or running the .fsx script given on the command line + Выход из FSI после загрузки файлов или выполнение скрипта .fsx, указанного в командной строке + + + + Execute interactions on a Windows Forms event loop (on by default) + Выполнение взаимодействий при зацикливании события Windows Forms (включено по умолчанию) + + + + Suppress fsi writing to stdout + Запретить fsi запись в stdout + + + + Support TAB completion in console (on by default) + Поддержка заполнения нажатием клавиши TAB в консоли (включено по умолчанию) + + + + Emit debug information in quotations + Вывод отладочной информации в кавычках + + + + For help type #help;; + Для получения справки введите #help;; + + + + A problem occurred starting the F# Interactive process. This may be due to a known problem with background process console support for Unicode-enabled applications on some Windows systems. Try selecting Tools->Options->F# Interactive for Visual Studio and enter '--fsi-server-no-unicode'. + Возникла проблема при запуске процесса F# Interactive. Это может быть вызвано известной проблемой с поддержкой консоли фонового процесса для приложений с поддержкой Юникода в некоторых системах Windows. Попробуйте выбрать "Сервис" -> "Параметры" -> "F# Interactive для Visual Studio" и ввести "--fsi-server-no-unicode". + + + + '{0}' is not a valid assembly name + {0} не является допустимым именем сборки + + + + Directory '{0}' doesn't exist + Каталог "{0}" не существует + + + + Invalid directive '#{0} {1}' + Недопустимая директива "#{0} {1}" + + + + Warning: line too long, ignoring some characters\n + Предупреждение: слишком длинная строка, некоторые знаки игнорируются\n + + + + Real: {0}, CPU: {1}, GC {2} + Real: {0}, ЦП: {1}, GC {2} + + + + gen + gen + + + + \n\nException raised during pretty printing.\nPlease report this so it can be fixed.\nTrace: {0}\n + \n\nВозникло исключение при автоматическом форматировании.\nОтправьте отчет об этой неполадке для ее устранения.\nТрассировка: {0}\n + + + + F# Interactive directives: + Директивы F# Interactive: + + + + Reference (dynamically load) the given DLL + Ссылка на (динамическая загрузка) данную библиотеку DLL + + + + Add the given search path for referenced DLLs + Добавление данного пути поиска для указанных библиотек DLL + + + + Load the given file(s) as if compiled and referenced + Загрузка данных файлов как скомпилированных и указанных ссылками + + + + Toggle timing on/off + Включение и отключение таймера + + + + Display help + Отображать справку + + + + Exit + Выход + + + + F# Interactive command line options: + Параметры командной строки F# Interactive: + + + + See '{0}' for options + Параметры см. в "{0}" + + + + Loading + Загрузка + + + + \n- Interrupt\n + \n- Interrupt\n + + + + \n- Exit...\n + \n- Выход...\n + + + + - Aborting main thread... + — Отменяется главный поток… + + + + Failed to install ctrl-c handler - Ctrl-C handling will not be available. Error was:\n\t{0} + Не удалось установить обработчик ctrl-c - обработка Ctrl-C будет недоступна. Ошибка:\n\t{0} + + + + --> Referenced '{0}' + --> Задана ссылка на "{0}" + + + + --> Referenced '{0}' (file may be locked by F# Interactive process) + --> Задана ссылка на "{0}" (возможно, файл заблокирован процессом F# Interactive) + + + + --> Referenced '{0}' (an assembly with a different timestamp has already been referenced from this location, reset fsi to load the updated assembly) + --> "{0}" с заданной ссылкой (из этого расположения уже задана ссылка на сборку с другой меткой времени, выполните сброс fsi, чтобы загрузить обновленную сборку) + + + + --> Added '{0}' to library include path + --> Выполнено добавление "{0}" по пути включения в библиотеку + + + + --> Timing now on + --> Таймер включен + + + + --> Timing now off + --> Таймер отключен + + + + - Unexpected ThreadAbortException (Ctrl-C) during event handling: Trying to restart... + - Непредвиденное ThreadAbortException (Ctrl-C) в ходе обработки события: Попытка перезапуска... + + + + Failed to resolve assembly '{0}' + Не удалось выполнить разрешение сборки ''{0}'' + + + + Binding session to '{0}'... + Привязка сеанса к "{0}"... + + + + Microsoft (R) F# Interactive version {0} + Microsoft (R) F# Interactive, версия {0} + + + + F# Interactive for F# {0} + F# Interactive для F# {0} + + + + Prevents references from being locked by the F# Interactive process + Предотвращает блокировку ссылок процессом F# Interactive. + + + + + \ No newline at end of file diff --git a/src/fsharp/fsi/xlf/FSIstrings.txt.tr.xlf b/src/fsharp/fsi/xlf/FSIstrings.txt.tr.xlf new file mode 100644 index 00000000000..6497500a1f1 --- /dev/null +++ b/src/fsharp/fsi/xlf/FSIstrings.txt.tr.xlf @@ -0,0 +1,272 @@ + + + + + + Stopped due to error\n + Hata nedeniyle durduruldu\n + + + + Usage: {0} <options> [script.fsx [<arguments>]] + Kullanım: {0} <seçenekler> [script.fsx [<bağımsız değişkenler>]] + + + + - INPUT FILES - + - GİRİŞ DOSYALARI - + + + + - CODE GENERATION - + - KOD ÜRETİMİ - + + + + - ERRORS AND WARNINGS - + - HATALAR VE UYARILAR - + + + + - LANGUAGE - + - DİL - + + + + - MISCELLANEOUS - + - ÇEŞİTLİ - + + + + - ADVANCED - + - GELİŞMİŞ - + + + + Exception raised when starting remoting server.\n{0} + Uzaktan iletişim sunucusu başlatılırken özel durum tetiklendi.\n{0} + + + + Use the given file on startup as initial input + Verilen dosyayı başlangıçta ilk giriş olarak kullan + + + + #load the given file on startup + #load verilen dosyayı başlangıçta + + + + Treat remaining arguments as command line arguments, accessed using fsi.CommandLineArgs + Kalan bağımsız değişkenlere fsi.CommandLineArgs kullanılarak erişilen komut satırı bağımsız değişkenleri gibi davran + + + + Display this usage message (Short form: -?) + Bu kullanım iletisini görüntüle (Kısa biçimi: -?) + + + + Exit fsi after loading the files or running the .fsx script given on the command line + Dosyaları yükledikten veya komut satırında verilen .fsx betiğini çalıştırdıktan sonra fsi'den çık + + + + Execute interactions on a Windows Forms event loop (on by default) + Etkileşimleri Windows Forms olay döngüsünde yürüt (varsayılan seçenek olarak açık) + + + + Suppress fsi writing to stdout + stdout yazdırırken fsi'yi gizle + + + + Support TAB completion in console (on by default) + Konsolda SEKME ile tamamlamayı destekle (varsayılan seçenek olarak açık) + + + + Emit debug information in quotations + Tırnak içindeki hata ayıklama bilgilerini yay + + + + For help type #help;; + Yardım için #help yazın;; + + + + A problem occurred starting the F# Interactive process. This may be due to a known problem with background process console support for Unicode-enabled applications on some Windows systems. Try selecting Tools->Options->F# Interactive for Visual Studio and enter '--fsi-server-no-unicode'. + F# Etkileşimli işlemi başlatılırken bir sorun oluştu. Bu durum, bazı Windows sistemlerindeki Unicode kullanan uygulamalara yönelik arka plan işlemi konsol desteğinde bilinen bir soruna bağlı olabilir. Visual Studio için Araçlar->Seçenekler->F# Etkileşimli'yi seçmeyi deneyin ve '--fsi-server-no-unicode' girin. + + + + '{0}' is not a valid assembly name + '{0}' geçerli bir bütünleştirilmiş kod adı değil + + + + Directory '{0}' doesn't exist + '{0}' dizini yok + + + + Invalid directive '#{0} {1}' + Geçersiz yönerge '#{0} {1}' + + + + Warning: line too long, ignoring some characters\n + Uyarı: satır çok uzun, bazı karakterler yok sayılıyor\n + + + + Real: {0}, CPU: {1}, GC {2} + Gerçek: {0}, CPU: {1}, GC {2} + + + + gen + olş + + + + \n\nException raised during pretty printing.\nPlease report this so it can be fixed.\nTrace: {0}\n + \n\nDüzgün yazdırma sırasında özel durum tetiklendi.\nDüzeltilebilmesi için lütfen bunu bildirin.\nİz: {0}\n + + + + F# Interactive directives: + F# Etkileşimli yönergeleri: + + + + Reference (dynamically load) the given DLL + Verilen DLL'ye başvur (dinamik olarak yükle) + + + + Add the given search path for referenced DLLs + Başvurulan DLL'ler için verilen arama yolunu ekle + + + + Load the given file(s) as if compiled and referenced + Verilen dosyaları derlenmiş ve başvurulmuş gibi yükle + + + + Toggle timing on/off + Zamanlamayı aç/kapat + + + + Display help + Yardımı göster + + + + Exit + Çıkış + + + + F# Interactive command line options: + F# Etkileşimli komut satırı seçenekleri: + + + + See '{0}' for options + Seçenekler için bkz. '{0}' + + + + Loading + Yükleniyor + + + + \n- Interrupt\n + \n- Kesme\n + + + + \n- Exit...\n + \n- Çıkış...\n + + + + - Aborting main thread... + - Ana iş parçacığı iptal ediliyor... + + + + Failed to install ctrl-c handler - Ctrl-C handling will not be available. Error was:\n\t{0} + ctrl-c işleyicisi yüklenemedi - Ctrl-C işlemi kullanılamayacak. Hata:\n\t{0} + + + + --> Referenced '{0}' + --> '{0}' öğesine başvuruldu + + + + --> Referenced '{0}' (file may be locked by F# Interactive process) + --> '{0}' öğesine başvuruldu (dosya F# Etkileşimli işlemi tarafından kilitlenmiş olabilir) + + + + --> Referenced '{0}' (an assembly with a different timestamp has already been referenced from this location, reset fsi to load the updated assembly) + --> Başvurulan '{0}' (farklı bir zaman damgası olan bir bütünleştirilmiş koda bu konumdan zaten başvuruldu; güncelleştirilen bütünleştirilmiş kodu yüklemek için fsi'yi sıfırlayın) + + + + --> Added '{0}' to library include path + --> Kitaplık ekleme yoluna '{0}' eklendi + + + + --> Timing now on + --> Zamanlama şimdi açık + + + + --> Timing now off + --> Zamanlama şimdi kapalı + + + + - Unexpected ThreadAbortException (Ctrl-C) during event handling: Trying to restart... + - Olay işlenirken beklenmeyen ThreadAbortException (Ctrl-C): Yeniden başlatma deneniyor... + + + + Failed to resolve assembly '{0}' + '{0}' bütünleştirilmiş kodu çözümlenemedi + + + + Binding session to '{0}'... + Oturum '{0}' öğesine bağlanıyor... + + + + Microsoft (R) F# Interactive version {0} + Microsoft (R) F# Etkileşimli sürüm {0} + + + + F# Interactive for F# {0} + F# {0} için F# Etkileşimli + + + + Prevents references from being locked by the F# Interactive process + Başvuruların F# Etkileşimli işlemi tarafından kilitlenmesini engeller + + + + + \ No newline at end of file diff --git a/src/fsharp/fsi/xlf/FSIstrings.txt.zh-Hans.xlf b/src/fsharp/fsi/xlf/FSIstrings.txt.zh-Hans.xlf new file mode 100644 index 00000000000..6089715c683 --- /dev/null +++ b/src/fsharp/fsi/xlf/FSIstrings.txt.zh-Hans.xlf @@ -0,0 +1,272 @@ + + + + + + Stopped due to error\n + 已因出错而停止\n + + + + Usage: {0} <options> [script.fsx [<arguments>]] + 用法: {0} <选项> [script.fsx [<参数>]] + + + + - INPUT FILES - + - 输入文件 - + + + + - CODE GENERATION - + - 代码生成 - + + + + - ERRORS AND WARNINGS - + - 错误和警告 - + + + + - LANGUAGE - + - 语言 - + + + + - MISCELLANEOUS - + - 杂项 - + + + + - ADVANCED - + - 高级 - + + + + Exception raised when starting remoting server.\n{0} + 启动远程处理服务器时发生异常。\n{0} + + + + Use the given file on startup as initial input + 在启动时使用给定文件作为初始输入 + + + + #load the given file on startup + #load 在启动时给定的文件 + + + + Treat remaining arguments as command line arguments, accessed using fsi.CommandLineArgs + 将剩余参数视为可使用 fsi.CommandLineArgs 访问的命令行参数 + + + + Display this usage message (Short form: -?) + 显示此用法消息(缩写为: -?) + + + + Exit fsi after loading the files or running the .fsx script given on the command line + 在加载文件或在命令行上运行给定的 .fsx 脚本之后退出 fsi + + + + Execute interactions on a Windows Forms event loop (on by default) + 在 Windows 窗体事件循环中执行交互(默认情况下启用) + + + + Suppress fsi writing to stdout + 禁止 fsi 写入到 stdout + + + + Support TAB completion in console (on by default) + 支持控制台中的 Tab 完成操作(默认情况下启用) + + + + Emit debug information in quotations + 发出用引号引起来的调试信息 + + + + For help type #help;; + 若要获得帮助,请键入 #help;; + + + + A problem occurred starting the F# Interactive process. This may be due to a known problem with background process console support for Unicode-enabled applications on some Windows systems. Try selecting Tools->Options->F# Interactive for Visual Studio and enter '--fsi-server-no-unicode'. + 启动 F# 交互窗口进程时发生问题。此情况可能是由一个已知问题导致的,即某些 Windows 系统上的后台进程控制台不支持启用了 Unicode 的应用程序。请尝试选择“工具”->“选项”->“适用于 Visual Studio 的 F# 交互窗口”,然后输入“--fsi-server-no-unicode”。 + + + + '{0}' is not a valid assembly name + “{0}”不是有效的程序集名称 + + + + Directory '{0}' doesn't exist + 目录“{0}”不存在 + + + + Invalid directive '#{0} {1}' + 无效的指令“#{0} {1}” + + + + Warning: line too long, ignoring some characters\n + 警告: 由于行太长,将忽略某些字符\n + + + + Real: {0}, CPU: {1}, GC {2} + Real: {0},CPU: {1},GC {2} + + + + gen + gen + + + + \n\nException raised during pretty printing.\nPlease report this so it can be fixed.\nTrace: {0}\n + \n\n在整齐打印期间发生异常。\n请报告此异常,以便能够将其修复。\n跟踪: {0}\n + + + + F# Interactive directives: + F# 交互窗口指令: + + + + Reference (dynamically load) the given DLL + 引用(动态加载)给定的 DLL + + + + Add the given search path for referenced DLLs + 为被引用的 DLL 添加给定搜索路径 + + + + Load the given file(s) as if compiled and referenced + 像已编译和被引用的文件一样加载给定的文件 + + + + Toggle timing on/off + 启用/停止计时 + + + + Display help + 显示帮助 + + + + Exit + 退出 + + + + F# Interactive command line options: + F# 交互窗口命令行选项: + + + + See '{0}' for options + 请参阅“{0}”以了解各个选项 + + + + Loading + 正在加载 + + + + \n- Interrupt\n + \n- 中断\n + + + + \n- Exit...\n + \n- 退出...\n + + + + - Aborting main thread... + - 正在中止主线程... + + + + Failed to install ctrl-c handler - Ctrl-C handling will not be available. Error was:\n\t{0} + 未能安装 ctrl-c 处理程序,Ctrl-C 处理将不可用。错误为:\n\t{0} + + + + --> Referenced '{0}' + --> 已引用“{0}” + + + + --> Referenced '{0}' (file may be locked by F# Interactive process) + --> 已引用“{0}”(文件可能由 F# 交互窗口进程锁定) + + + + --> Referenced '{0}' (an assembly with a different timestamp has already been referenced from this location, reset fsi to load the updated assembly) + ->引用“{0}”(具有不同时间戳的程序集已经从该位置引用并重置 fsi 以加载更新的程序集) + + + + --> Added '{0}' to library include path + --> 已将“{0}”添加到库包含路径 + + + + --> Timing now on + --> 现在已启用计时 + + + + --> Timing now off + --> 现在已关闭计时 + + + + - Unexpected ThreadAbortException (Ctrl-C) during event handling: Trying to restart... + - 在事件处理过程中出现意外 ThreadAbortException (Ctrl-C): 正在尝试重新启动... + + + + Failed to resolve assembly '{0}' + 未能解析程序集“{0}” + + + + Binding session to '{0}'... + 正在将会话绑定到“{0}”... + + + + Microsoft (R) F# Interactive version {0} + Microsoft(R) F# 交互窗口版本 {0} + + + + F# Interactive for F# {0} + 适用于 F# {0} 的 F# 交互窗口 + + + + Prevents references from being locked by the F# Interactive process + 防止引用被 F# 交互窗口进程锁定 + + + + + \ No newline at end of file diff --git a/src/fsharp/fsi/xlf/FSIstrings.txt.zh-Hant.xlf b/src/fsharp/fsi/xlf/FSIstrings.txt.zh-Hant.xlf new file mode 100644 index 00000000000..1752c12240a --- /dev/null +++ b/src/fsharp/fsi/xlf/FSIstrings.txt.zh-Hant.xlf @@ -0,0 +1,272 @@ + + + + + + Stopped due to error\n + 已因錯誤而停止\n + + + + Usage: {0} <options> [script.fsx [<arguments>]] + 使用方式: {0} <選項> [script.fsx [<引數>]] + + + + - INPUT FILES - + - 輸入檔 - + + + + - CODE GENERATION - + - 程式碼產生 - + + + + - ERRORS AND WARNINGS - + - 錯誤和警告 - + + + + - LANGUAGE - + - 語言 - + + + + - MISCELLANEOUS - + - 其他 - + + + + - ADVANCED - + - 進階 - + + + + Exception raised when starting remoting server.\n{0} + 啟動遠端處理伺服器時發生例外狀況。\n{0} + + + + Use the given file on startup as initial input + 啟動時使用所指定的檔案做為初始輸入 + + + + #load the given file on startup + #load 啟動時指定的檔案 + + + + Treat remaining arguments as command line arguments, accessed using fsi.CommandLineArgs + 將其餘引數視為命令列引數,使用 fsi.CommandLineArgs 存取 + + + + Display this usage message (Short form: -?) + 顯示此訊息 (簡短形式: -?) + + + + Exit fsi after loading the files or running the .fsx script given on the command line + 載入檔案或執行命令列上指定的 .fsx 指令碼後結束 fsi + + + + Execute interactions on a Windows Forms event loop (on by default) + 在 Windows Form 事件迴圈上執行互動 (預設為開啟) + + + + Suppress fsi writing to stdout + 禁止 fsi 寫入 stdout + + + + Support TAB completion in console (on by default) + 支援主控台中的 TAB 鍵自動完成 (預設為開啟) + + + + Emit debug information in quotations + 發出在引號內的偵錯資訊 + + + + For help type #help;; + 如需說明,請輸入 #help;; + + + + A problem occurred starting the F# Interactive process. This may be due to a known problem with background process console support for Unicode-enabled applications on some Windows systems. Try selecting Tools->Options->F# Interactive for Visual Studio and enter '--fsi-server-no-unicode'. + 啟動 F# 互動處理序時發生問題。這可能是因為背景處理序主控台對於支援某些 Windows 系統上具備 Unicode 支援功能之應用程式的已知問題所造成。請嘗試選取 [工具]5D; -> [選項]5D; -> [F# Interactive for Visual Studio]5D;,然後輸入 '--fsi-server-no-unicode'。 + + + + '{0}' is not a valid assembly name + '{0}' 不是有效的組件名稱 + + + + Directory '{0}' doesn't exist + 目錄 '{0}' 不存在 + + + + Invalid directive '#{0} {1}' + 無效的指示詞 '#{0} {1}' + + + + Warning: line too long, ignoring some characters\n + 警告: 行太長,將忽略某些字元\n + + + + Real: {0}, CPU: {1}, GC {2} + 實際: {0},CPU: {1},GC {2} + + + + gen + gen + + + + \n\nException raised during pretty printing.\nPlease report this so it can be fixed.\nTrace: {0}\n + \n\n美化顯示期間發生例外狀況。\n請回報此問題以便修正。\n追蹤: {0}\n + + + + F# Interactive directives: + F# 互動指示詞: + + + + Reference (dynamically load) the given DLL + 參考 (以動態方式載入) 所指定的 DLL + + + + Add the given search path for referenced DLLs + 加入所參考 DLL 的指定搜尋路徑 + + + + Load the given file(s) as if compiled and referenced + 載入指定的檔案,視為已編譯及已參考 + + + + Toggle timing on/off + 切換計時開/關 + + + + Display help + 顯示說明 + + + + Exit + 結束 + + + + F# Interactive command line options: + F# 互動命令列選項: + + + + See '{0}' for options + 相關選項請參閱 '{0}' + + + + Loading + 正在載入 + + + + \n- Interrupt\n + \n- 中斷\n + + + + \n- Exit...\n + \n- 結束...\n + + + + - Aborting main thread... + - 正在中止主要執行緒... + + + + Failed to install ctrl-c handler - Ctrl-C handling will not be available. Error was:\n\t{0} + 無法安裝 ctrl-c 處理常式,Ctrl-C 處理將無法使用。錯誤為:\n\t{0} + + + + --> Referenced '{0}' + --> 參考的 '{0}' + + + + --> Referenced '{0}' (file may be locked by F# Interactive process) + --> 參考的 '{0}' (檔案可能已被 F# 互動處理序鎖定) + + + + --> Referenced '{0}' (an assembly with a different timestamp has already been referenced from this location, reset fsi to load the updated assembly) + --> 已參考 '{0}' (已經從這個位置參考有不同時間戳記的組件,請重設 fsi 以載入更新的組件) + + + + --> Added '{0}' to library include path + --> 已將 '{0}' 加入程式庫 Include 路徑 + + + + --> Timing now on + --> 計時現已開啟 + + + + --> Timing now off + --> 計時現已關閉 + + + + - Unexpected ThreadAbortException (Ctrl-C) during event handling: Trying to restart... + - 事件處理時發生未預期的 ThreadAbortException (Ctrl-C): 正嘗試重新啟動... + + + + Failed to resolve assembly '{0}' + 無法解析組件 '{0}' + + + + Binding session to '{0}'... + 正在將工作階段繫結到 '{0}'... + + + + Microsoft (R) F# Interactive version {0} + Microsoft (R) F# 互動版本 {0} + + + + F# Interactive for F# {0} + 適用於 F# {0} 的 F# 互動 + + + + Prevents references from being locked by the F# Interactive process + 避免參考遭 F# 互動處理序封鎖 + + + + + \ No newline at end of file diff --git a/src/fsharp/fsiAnyCpu/FsiAnyCPU.fsproj b/src/fsharp/fsiAnyCpu/FsiAnyCPU.fsproj index ff1fe0c1176..894178d18bd 100644 --- a/src/fsharp/fsiAnyCpu/FsiAnyCPU.fsproj +++ b/src/fsharp/fsiAnyCpu/FsiAnyCPU.fsproj @@ -3,6 +3,9 @@ $(MSBuildProjectDirectory)\..\.. + FSharp + true + true @@ -13,7 +16,6 @@ $(NoWarn);62 fsiAnyCpu 0x0A000000 - COMPILER;$(DefineConstants) FSI_SHADOW_COPY_REFERENCES;$(DefineConstants) FSI_SERVER;$(DefineConstants) true @@ -22,17 +24,6 @@ v4.6 - - $(FSharpSourcesRoot)\..\loc\lcl\{Lang}\$(AssemblyName).exe.lcl - $(FSharpSourcesRoot)\..\loc\lci\$(AssemblyName).exe.lci - false - false - - - - - assemblyinfo.fsi.exe.fs - console.fs @@ -64,15 +55,4 @@ FSharp.Core - - - - - - - Microsoft - StrongName - - - \ No newline at end of file diff --git a/src/fsharp/fsiAnyCpu/app.config b/src/fsharp/fsiAnyCpu/app.config index 1308027da2c..a7514bd602e 100644 --- a/src/fsharp/fsiAnyCpu/app.config +++ b/src/fsharp/fsiAnyCpu/app.config @@ -6,12 +6,12 @@ - + + + + + - - - - diff --git a/src/fsharp/import.fs b/src/fsharp/import.fs index 9d89864908c..c5b1041a970 100644 --- a/src/fsharp/import.fs +++ b/src/fsharp/import.fs @@ -4,8 +4,8 @@ module internal Microsoft.FSharp.Compiler.Import open System.Reflection +open System.Collections.Concurrent open System.Collections.Generic -open Internal.Utilities open Microsoft.FSharp.Compiler.AbstractIL.IL open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library @@ -13,7 +13,6 @@ open Microsoft.FSharp.Compiler open Microsoft.FSharp.Compiler.Range open Microsoft.FSharp.Compiler.Tast open Microsoft.FSharp.Compiler.Tastops -open Microsoft.FSharp.Compiler.AbstractIL.IL open Microsoft.FSharp.Compiler.TcGlobals open Microsoft.FSharp.Compiler.Ast open Microsoft.FSharp.Compiler.ErrorLogger @@ -54,7 +53,7 @@ type AssemblyLoader = /// serves as an interface through to the tables stored in the primary TcImports structures defined in CompileOps.fs. [] type ImportMap(g:TcGlobals,assemblyLoader:AssemblyLoader) = - let typeRefToTyconRefCache = new System.Collections.Generic.Dictionary() + let typeRefToTyconRefCache = ConcurrentDictionary() member this.g = g member this.assemblyLoader = assemblyLoader member this.ILTypeRefToTyconRefCache = typeRefToTyconRefCache @@ -110,8 +109,8 @@ let ImportTypeRefData (env:ImportMap) m (scoref,path,typeName) = () #endif match tryRescopeEntity ccu tycon with - | None -> error (Error(FSComp.SR.impImportedAssemblyUsesNotPublicType(String.concat "." (Array.toList path@[typeName])),m)) - | Some tcref -> tcref + | ValueNone -> error (Error(FSComp.SR.impImportedAssemblyUsesNotPublicType(String.concat "." (Array.toList path@[typeName])),m)) + | ValueSome tcref -> tcref /// Import a reference to a type definition, given an AbstractIL ILTypeRef, without caching @@ -135,9 +134,9 @@ let ImportILTypeRefUncached (env:ImportMap) m (tref:ILTypeRef) = /// Import a reference to a type definition, given an AbstractIL ILTypeRef, with caching let ImportILTypeRef (env:ImportMap) m (tref:ILTypeRef) = - if env.ILTypeRefToTyconRefCache.ContainsKey(tref) then - env.ILTypeRefToTyconRefCache.[tref] - else + match env.ILTypeRefToTyconRefCache.TryGetValue(tref) with + | true, tcref -> tcref + | _ -> let tcref = ImportILTypeRefUncached env m tref env.ILTypeRefToTyconRefCache.[tref] <- tcref tcref @@ -151,13 +150,11 @@ let CanImportILTypeRef (env:ImportMap) m (tref:ILTypeRef) = /// Prefer the F# abbreviation for some built-in types, e.g. 'string' rather than /// 'System.String', since we prefer the F# abbreviation to the .NET equivalents. let ImportTyconRefApp (env:ImportMap) tcref tyargs = - match env.g.betterTyconRefMap tcref tyargs with - | Some res -> res - | None -> TType_app (tcref,tyargs) + env.g.improveType tcref tyargs /// Import an IL type as an F# type. -let rec ImportILType (env:ImportMap) m tinst typ = - match typ with +let rec ImportILType (env:ImportMap) m tinst ty = + match ty with | ILType.Void -> env.g.unit_ty @@ -171,7 +168,9 @@ let rec ImportILType (env:ImportMap) m tinst typ = let inst = tspec.GenericArgs |> List.map (ImportILType env m tinst) ImportTyconRefApp env tcref inst + | ILType.Modified(_,tref,ILType.Byref ty) when tref.Name = "System.Runtime.InteropServices.InAttribute" -> mkInByrefTy env.g (ImportILType env m tinst ty) | ILType.Byref ty -> mkByrefTy env.g (ImportILType env m tinst ty) + | ILType.Ptr ILType.Void when env.g.voidptr_tcr.CanDeref -> mkVoidPtrTy env.g | ILType.Ptr ty -> mkNativePtrTy env.g (ImportILType env m tinst ty) | ILType.FunctionPointer _ -> env.g.nativeint_ty (* failwith "cannot import this kind of type (ptr, fptr)" *) | ILType.Modified(_,_,ty) -> @@ -182,17 +181,17 @@ let rec ImportILType (env:ImportMap) m tinst typ = with _ -> error(Error(FSComp.SR.impNotEnoughTypeParamsInScopeWhileImporting(),m)) -let rec CanImportILType (env:ImportMap) m typ = - match typ with +let rec CanImportILType (env:ImportMap) m ty = + match ty with | ILType.Void -> true - | ILType.Array(_bounds,ty) -> CanImportILType env m ty + | ILType.Array(_bounds, ety) -> CanImportILType env m ety | ILType.Boxed tspec | ILType.Value tspec -> CanImportILTypeRef env m tspec.TypeRef && tspec.GenericArgs |> List.forall (CanImportILType env m) - | ILType.Byref ty -> CanImportILType env m ty - | ILType.Ptr ty -> CanImportILType env m ty + | ILType.Byref ety -> CanImportILType env m ety + | ILType.Ptr ety -> CanImportILType env m ety | ILType.FunctionPointer _ -> true - | ILType.Modified(_,_,ty) -> CanImportILType env m ty + | ILType.Modified(_,_,ety) -> CanImportILType env m ety | ILType.TypeVar _u16 -> true #if !NO_EXTENSIONTYPING @@ -263,7 +262,10 @@ let rec ImportProvidedType (env:ImportMap) (m:range) (* (tinst:TypeInst) *) (st: mkByrefTy g elemTy elif st.PUntaint((fun st -> st.IsPointer),m) then let elemTy = (ImportProvidedType env m (* tinst *) (st.PApply((fun st -> st.GetElementType()),m))) - mkNativePtrTy g elemTy + if isUnitTy g elemTy || isVoidTy g elemTy && g.voidptr_tcr.CanDeref then + mkVoidPtrTy g + else + mkNativePtrTy g elemTy else // REVIEW: Extension type could try to be its own generic arg (or there could be a type loop) @@ -410,7 +412,7 @@ let ImportILGenericParameters amap m scoref tinst (gps: ILGenericParameterDefs) let constraints = if gp.HasReferenceTypeConstraint then (TyparConstraint.IsReferenceType(m)::constraints) else constraints let constraints = if gp.HasNotNullableValueTypeConstraint then (TyparConstraint.IsNonNullableStruct(m)::constraints) else constraints let constraints = if gp.HasDefaultConstructorConstraint then (TyparConstraint.RequiresDefaultConstructor(m)::constraints) else constraints - tp.FixupConstraints constraints) + tp.SetConstraints constraints) tps @@ -433,8 +435,11 @@ let multisetDiscriminateAndMap nodef tipf (items: ('Key list * 'Value) list) = for (keylist,v) in items do match keylist with | [] -> () - | key::rest -> - buckets.[key] <- (rest,v) :: (if buckets.ContainsKey key then buckets.[key] else []) + | key :: rest -> + buckets.[key] <- + match buckets.TryGetValue(key) with + | true, b -> (rest,v) :: b + | _ -> (rest,v) :: [] [ for (KeyValue(key,items)) in buckets -> nodef key items ] @@ -476,8 +481,8 @@ and ImportILTypeDefList amap m (cpath:CompilationPath) enc items = let modty = lazy (ImportILTypeDefList amap m (cpath.NestedCompPath n Namespace) enc tgs) NewModuleOrNamespace (Some cpath) taccessPublic (mkSynId m n) XmlDoc.Empty [] (MaybeLazy.Lazy modty)) (fun (n,info:Lazy<_>) -> - let (scoref2,_,lazyTypeDef:Lazy) = info.Force() - ImportILTypeDef amap m scoref2 cpath enc n (lazyTypeDef.Force())) + let (scoref2,_,lazyTypeDef:ILPreTypeDef) = info.Force() + ImportILTypeDef amap m scoref2 cpath enc n (lazyTypeDef.GetTypeDef())) let kind = match enc with [] -> Namespace | _ -> ModuleOrType NewModuleOrNamespaceType kind entities [] @@ -486,8 +491,8 @@ and ImportILTypeDefList amap m (cpath:CompilationPath) enc items = /// and ImportILTypeDefs amap m scoref cpath enc (tdefs: ILTypeDefs) = // We be very careful not to force a read of the type defs here - tdefs.AsArrayOfLazyTypeDefs - |> Array.map (fun (ns,n,attrs,lazyTypeDef) -> (ns,(n,notlazy(scoref,attrs,lazyTypeDef)))) + tdefs.AsArrayOfPreTypeDefs + |> Array.map (fun pre -> (pre.Namespace,(pre.Name,notlazy(scoref,pre.MetadataIndex,pre)))) |> Array.toList |> ImportILTypeDefList amap m cpath enc @@ -505,19 +510,20 @@ let ImportILAssemblyExportedType amap m auxModLoader (scoref:ILScopeRef) (export if exportedType.IsForwarder then [] else + let ns,n = splitILTypeName exportedType.Name let info = lazy (match (try let modul = auxModLoader exportedType.ScopeRef - Some (lazy modul.TypeDefs.FindByName exportedType.Name) - with :? System.Collections.Generic.KeyNotFoundException -> None) + let ptd = mkILPreTypeDefComputed (ns, n, (fun () -> modul.TypeDefs.FindByName exportedType.Name)) + Some ptd + with :? KeyNotFoundException -> None) with | None -> error(Error(FSComp.SR.impReferenceToDllRequiredByAssembly(exportedType.ScopeRef.QualifiedName, scoref.QualifiedName, exportedType.Name),m)) - | Some lazyTypeDef -> - scoref,exportedType.CustomAttrs,lazyTypeDef) + | Some preTypeDef -> + scoref,-1,preTypeDef) - let ns,n = splitILTypeName exportedType.Name [ ImportILTypeDefList amap m (CompPath(scoref,[])) [] [(ns,(n,info))] ] /// Import the "exported types" table for multi-module assemblies. @@ -555,10 +561,10 @@ let ImportILAssemblyTypeForwarders (amap, m, exportedTypes:ILExportedTypesAndFor /// Import an IL assembly as a new TAST CCU -let ImportILAssembly(amap:(unit -> ImportMap),m,auxModuleLoader,sref,sourceDir,filename,ilModule:ILModuleDef,invalidateCcu:IEvent) = +let ImportILAssembly(amap:(unit -> ImportMap), m, auxModuleLoader, ilScopeRef, sourceDir, filename, ilModule:ILModuleDef, invalidateCcu:IEvent) = invalidateCcu |> ignore let aref = - match sref with + match ilScopeRef with | ILScopeRef.Assembly aref -> aref | _ -> error(InternalError("ImportILAssembly: cannot reference .NET netmodules directly, reference the containing assembly instead",m)) let nm = aref.Name @@ -571,13 +577,14 @@ let ImportILAssembly(amap:(unit -> ImportMap),m,auxModuleLoader,sref,sourceDir,f IsProviderGenerated = false ImportProvidedType = (fun ty -> ImportProvidedType (amap()) m ty) #endif - QualifiedName= Some sref.QualifiedName - Contents = NewCcuContents sref m nm mty - ILScopeRef = sref + QualifiedName= Some ilScopeRef.QualifiedName + Contents = NewCcuContents ilScopeRef m nm mty + ILScopeRef = ilScopeRef Stamp = newStamp() SourceCodeDirectory = sourceDir // note: not an accurate value, but IL assemblies don't give us this information in any attributes. FileName = filename MemberSignatureEquality= (fun ty1 ty2 -> Tastops.typeEquivAux EraseAll (amap()).g ty1 ty2) + TryGetILModuleDef = (fun () -> Some ilModule) TypeForwarders = (match ilModule.Manifest with | None -> Map.empty diff --git a/src/fsharp/infos.fs b/src/fsharp/infos.fs index 5ac157c8d42..2a7d82d8afd 100755 --- a/src/fsharp/infos.fs +++ b/src/fsharp/infos.fs @@ -6,11 +6,8 @@ module internal Microsoft.FSharp.Compiler.Infos -open Internal.Utilities open Microsoft.FSharp.Compiler.AbstractIL -open Microsoft.FSharp.Compiler.AbstractIL.Diagnostics open Microsoft.FSharp.Compiler.AbstractIL.IL -open Microsoft.FSharp.Compiler.AbstractIL.Internal open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library open Microsoft.FSharp.Compiler open Microsoft.FSharp.Compiler.Range @@ -25,7 +22,6 @@ open Microsoft.FSharp.Core.Printf #if !NO_EXTENSIONTYPING open Microsoft.FSharp.Compiler.ExtensionTyping -open Microsoft.FSharp.Core.CompilerServices #endif #if FX_RESHAPED_REFLECTION @@ -49,19 +45,19 @@ let CanImportILType scoref amap m ilty = //------------------------------------------------------------------------- /// Indicates if an F# type is the type associated with an F# exception declaration -let isExnDeclTy g typ = - isAppTy g typ && (tcrefOfAppTy g typ).IsExceptionDecl +let isExnDeclTy g ty = + isAppTy g ty && (tcrefOfAppTy g ty).IsExceptionDecl /// Get the base type of a type, taking into account type instantiations. Return None if the /// type has no base type. -let GetSuperTypeOfType g amap m typ = +let GetSuperTypeOfType g amap m ty = #if !NO_EXTENSIONTYPING - let typ = (if isAppTy g typ && (tcrefOfAppTy g typ).IsProvided then stripTyEqns g typ else stripTyEqnsAndMeasureEqns g typ) + let ty = (if isAppTy g ty && (tcrefOfAppTy g ty).IsProvided then stripTyEqns g ty else stripTyEqnsAndMeasureEqns g ty) #else - let typ = stripTyEqnsAndMeasureEqns g typ + let ty = stripTyEqnsAndMeasureEqns g ty #endif - match metadataOfTy g typ with + match metadataOfTy g ty with #if !NO_EXTENSIONTYPING | ProvidedTypeMetadata info -> let st = info.ProvidedType @@ -71,28 +67,27 @@ let GetSuperTypeOfType g amap m typ = | Some super -> Some(Import.ImportProvidedType amap m super) #endif | ILTypeMetadata (TILObjectReprData(scoref,_,tdef)) -> - let _,tinst = destAppTy g typ + let tinst = argsOfAppTy g ty match tdef.Extends with | None -> None | Some ilty -> Some (ImportILType scoref amap m tinst ilty) | FSharpOrArrayOrByrefOrTupleOrExnTypeMetadata -> - - if isFSharpObjModelTy g typ || isExnDeclTy g typ then - let tcref,_tinst = destAppTy g typ - Some (instType (mkInstForAppTy g typ) (superOfTycon g tcref.Deref)) - elif isArrayTy g typ then - Some g.system_Array_typ - elif isRefTy g typ && not (isObjTy g typ) then + if isFSharpObjModelTy g ty || isExnDeclTy g ty then + let tcref = tcrefOfAppTy g ty + Some (instType (mkInstForAppTy g ty) (superOfTycon g tcref.Deref)) + elif isArrayTy g ty then + Some g.system_Array_ty + elif isRefTy g ty && not (isObjTy g ty) then Some g.obj_ty - elif isStructTupleTy g typ then + elif isStructTupleTy g ty then Some g.obj_ty - elif isFSharpStructOrEnumTy g typ then - if isFSharpEnumTy g typ then - Some(g.system_Enum_typ) + elif isFSharpStructOrEnumTy g ty then + if isFSharpEnumTy g ty then + Some(g.system_Enum_ty) else - Some (g.system_Value_typ) - elif isRecdTy g typ || isUnionTy g typ then + Some (g.system_Value_ty) + elif isRecdTy g ty || isUnionTy g ty then Some g.obj_ty else None @@ -107,10 +102,10 @@ type SkipUnrefInterfaces = Yes | No /// Collect the set of immediate declared interface types for an F# type, but do not /// traverse the type hierarchy to collect further interfaces. -let rec GetImmediateInterfacesOfType skipUnref g amap m typ = +let rec GetImmediateInterfacesOfType skipUnref g amap m ty = let itys = - if isAppTy g typ then - let tcref,tinst = destAppTy g typ + match tryAppTy g ty with + | ValueSome(tcref,tinst) -> if tcref.IsMeasureableReprTycon then [ match tcref.TypeReprInfo with | TMeasureableRepr reprTy -> @@ -121,10 +116,10 @@ let rec GetImmediateInterfacesOfType skipUnref g amap m typ = not (tyconRefEq g itcref g.system_GenericIEquatable_tcref) then yield ity | _ -> () - yield mkAppTy g.system_GenericIComparable_tcref [typ] - yield mkAppTy g.system_GenericIEquatable_tcref [typ]] + yield mkAppTy g.system_GenericIComparable_tcref [ty] + yield mkAppTy g.system_GenericIEquatable_tcref [ty]] else - match metadataOfTy g typ with + match metadataOfTy g ty with #if !NO_EXTENSIONTYPING | ProvidedTypeMetadata info -> [ for ity in info.ProvidedType.PApplyArray((fun st -> st.GetInterfaces()), "GetInterfaces", m) do @@ -145,14 +140,13 @@ let rec GetImmediateInterfacesOfType skipUnref g amap m typ = else None) | FSharpOrArrayOrByrefOrTupleOrExnTypeMetadata -> - tcref.ImmediateInterfaceTypesOfFSharpTycon |> List.map (instType (mkInstForAppTy g typ)) - else - [] + tcref.ImmediateInterfaceTypesOfFSharpTycon |> List.map (instType (mkInstForAppTy g ty)) + | _ -> [] // .NET array types are considered to implement IList let itys = - if isArray1DTy g typ then - mkSystemCollectionsGenericIListTy g (destArrayTy g typ) :: itys + if isArray1DTy g ty then + mkSystemCollectionsGenericIListTy g (destArrayTy g ty) :: itys else itys itys @@ -163,35 +157,35 @@ type AllowMultiIntfInstantiations = Yes | No /// Traverse the type hierarchy, e.g. f D (f C (f System.Object acc)). /// Visit base types and interfaces first. -let private FoldHierarchyOfTypeAux followInterfaces allowMultiIntfInst skipUnref visitor g amap m typ acc = - let rec loop ndeep typ ((visitedTycon,visited:TyconRefMultiMap<_>,acc) as state) = +let private FoldHierarchyOfTypeAux followInterfaces allowMultiIntfInst skipUnref visitor g amap m ty acc = + let rec loop ndeep ty ((visitedTycon,visited:TyconRefMultiMap<_>,acc) as state) = - let seenThisTycon = isAppTy g typ && Set.contains (tcrefOfAppTy g typ).Stamp visitedTycon + let seenThisTycon = isAppTy g ty && Set.contains (tcrefOfAppTy g ty).Stamp visitedTycon // Do not visit the same type twice. Could only be doing this if we've seen this tycon - if seenThisTycon && List.exists (typeEquiv g typ) (visited.Find (tcrefOfAppTy g typ)) then state else + if seenThisTycon && List.exists (typeEquiv g ty) (visited.Find (tcrefOfAppTy g ty)) then state else // Do not visit the same tycon twice, e.g. I and I, collect I only, unless directed to allow this if seenThisTycon && allowMultiIntfInst = AllowMultiIntfInstantiations.No then state else let state = - if isAppTy g typ then - let tcref = tcrefOfAppTy g typ + if isAppTy g ty then + let tcref = tcrefOfAppTy g ty let visitedTycon = Set.add tcref.Stamp visitedTycon - visitedTycon, visited.Add (tcref,typ), acc + visitedTycon, visited.Add (tcref,ty), acc else state - if ndeep > 100 then (errorR(Error((FSComp.SR.recursiveClassHierarchy (showType typ)),m)); (visitedTycon,visited,acc)) else + if ndeep > 100 then (errorR(Error((FSComp.SR.recursiveClassHierarchy (showType ty)),m)); (visitedTycon,visited,acc)) else let visitedTycon,visited,acc = - if isInterfaceTy g typ then + if isInterfaceTy g ty then List.foldBack (loop (ndeep+1)) - (GetImmediateInterfacesOfType skipUnref g amap m typ) + (GetImmediateInterfacesOfType skipUnref g amap m ty) (loop ndeep g.obj_ty state) else - match tryDestTyparTy g typ with - | Some tp -> + match tryDestTyparTy g ty with + | ValueSome tp -> let state = loop (ndeep+1) g.obj_ty state List.foldBack (fun x vacc -> @@ -212,49 +206,49 @@ let private FoldHierarchyOfTypeAux followInterfaces allowMultiIntfInst skipUnref loop (ndeep + 1) cty vacc) tp.Constraints state - | None -> + | _ -> let state = if followInterfaces then List.foldBack (loop (ndeep+1)) - (GetImmediateInterfacesOfType skipUnref g amap m typ) + (GetImmediateInterfacesOfType skipUnref g amap m ty) state else state let state = Option.foldBack (loop (ndeep+1)) - (GetSuperTypeOfType g amap m typ) + (GetSuperTypeOfType g amap m ty) state state - let acc = visitor typ acc + let acc = visitor ty acc (visitedTycon,visited,acc) - loop 0 typ (Set.empty,TyconRefMultiMap<_>.Empty,acc) |> p33 + loop 0 ty (Set.empty,TyconRefMultiMap<_>.Empty,acc) |> p33 /// Fold, do not follow interfaces (unless the type is itself an interface) -let FoldPrimaryHierarchyOfType f g amap m allowMultiIntfInst typ acc = - FoldHierarchyOfTypeAux false allowMultiIntfInst SkipUnrefInterfaces.No f g amap m typ acc +let FoldPrimaryHierarchyOfType f g amap m allowMultiIntfInst ty acc = + FoldHierarchyOfTypeAux false allowMultiIntfInst SkipUnrefInterfaces.No f g amap m ty acc /// Fold, following interfaces. Skipping interfaces that lie outside the referenced assembly set is allowed. -let FoldEntireHierarchyOfType f g amap m allowMultiIntfInst typ acc = - FoldHierarchyOfTypeAux true allowMultiIntfInst SkipUnrefInterfaces.Yes f g amap m typ acc +let FoldEntireHierarchyOfType f g amap m allowMultiIntfInst ty acc = + FoldHierarchyOfTypeAux true allowMultiIntfInst SkipUnrefInterfaces.Yes f g amap m ty acc /// Iterate, following interfaces. Skipping interfaces that lie outside the referenced assembly set is allowed. -let IterateEntireHierarchyOfType f g amap m allowMultiIntfInst typ = - FoldHierarchyOfTypeAux true allowMultiIntfInst SkipUnrefInterfaces.Yes (fun ty () -> f ty) g amap m typ () +let IterateEntireHierarchyOfType f g amap m allowMultiIntfInst ty = + FoldHierarchyOfTypeAux true allowMultiIntfInst SkipUnrefInterfaces.Yes (fun ty () -> f ty) g amap m ty () /// Search for one element satisfying a predicate, following interfaces -let ExistsInEntireHierarchyOfType f g amap m allowMultiIntfInst typ = - FoldHierarchyOfTypeAux true allowMultiIntfInst SkipUnrefInterfaces.Yes (fun ty acc -> acc || f ty ) g amap m typ false +let ExistsInEntireHierarchyOfType f g amap m allowMultiIntfInst ty = + FoldHierarchyOfTypeAux true allowMultiIntfInst SkipUnrefInterfaces.Yes (fun ty acc -> acc || f ty ) g amap m ty false /// Search for one element where a function returns a 'Some' result, following interfaces -let SearchEntireHierarchyOfType f g amap m typ = +let SearchEntireHierarchyOfType f g amap m ty = FoldHierarchyOfTypeAux true AllowMultiIntfInstantiations.Yes SkipUnrefInterfaces.Yes (fun ty acc -> match acc with | None -> if f ty then Some(ty) else None | Some _ -> acc) - g amap m typ None + g amap m ty None /// Get all super types of the type, including the type itself let AllSuperTypesOfType g amap m allowMultiIntfInst ty = @@ -298,8 +292,8 @@ let ImportReturnTypeFromMetaData amap m ty scoref tinst minst = /// Copy constraints. If the constraint comes from a type parameter associated /// with a type constructor then we are simply renaming type variables. If it comes -/// from a generic method in a generic class (e.g. typ.M<_>) then we may be both substituting the -/// instantiation associated with 'typ' as well as copying the type parameters associated with +/// from a generic method in a generic class (e.g. ty.M<_>) then we may be both substituting the +/// instantiation associated with 'ty' as well as copying the type parameters associated with /// M and instantiating their constraints /// /// Note: this now looks identical to constraint instantiation. @@ -349,7 +343,7 @@ let FixupNewTypars m (formalEnclosingTypars:Typars) (tinst: TType list) (tpsorig // The real code.. let renaming,tptys = mkTyparToTyparRenaming tpsorig tps let tprefInst = mkTyparInst formalEnclosingTypars tinst @ renaming - (tpsorig,tps) ||> List.iter2 (fun tporig tp -> tp.FixupConstraints (CopyTyparConstraints m tprefInst tporig)) + (tpsorig,tps) ||> List.iter2 (fun tporig tp -> tp.SetConstraints (CopyTyparConstraints m tprefInst tporig)) renaming,tptys @@ -405,8 +399,8 @@ let GetCompiledReturnTyOfProvidedMethodInfo amap m (mi:Tainted mi.IsConstructor),m) then mi.PApply((fun mi -> mi.DeclaringType),m) else mi.Coerce(m).PApply((fun mi -> mi.ReturnType),m) - let typ = Import.ImportProvidedType amap m returnType - if isVoidTy amap.g typ then None else Some typ + let ty = Import.ImportProvidedType amap m returnType + if isVoidTy amap.g ty then None else Some ty #endif /// The slotsig returned by methInfo.GetSlotSig is in terms of the type parameters on the parent type of the overriding method. @@ -414,7 +408,7 @@ let GetCompiledReturnTyOfProvidedMethodInfo amap m (mi:Tainted - let parentToMemberInst,_ = mkTyparToTyparRenaming (ovByMethValRef.MemberApparentParent.Typars(m)) enclosingTypars + let parentToMemberInst,_ = mkTyparToTyparRenaming (ovByMethValRef.MemberApparentEntity.Typars(m)) enclosingTypars let res = instSlotSig parentToMemberInst slotsig res | None -> @@ -426,7 +420,7 @@ let ReparentSlotSigToUseMethodTypars g m ovByMethValRef slotsig = let MakeSlotParam (ty,argInfo:ArgReprInfo) = TSlotParam(Option.map textOfId argInfo.Name, ty, false,false,false,argInfo.Attribs) /// Construct the data representing the signature of an abstract method slot -let MakeSlotSig (nm,typ,ctps,mtps,paraml,retTy) = copySlotSig (TSlotSig(nm,typ,ctps,mtps,paraml,retTy)) +let MakeSlotSig (nm,ty,ctps,mtps,paraml,retTy) = copySlotSig (TSlotSig(nm,ty,ctps,mtps,paraml,retTy)) /// Split the type of an F# member value into @@ -434,13 +428,13 @@ let MakeSlotSig (nm,typ,ctps,mtps,paraml,retTy) = copySlotSig (TSlotSig(nm,typ,c /// - the type parameters associated with a generic method /// - the return type of the method /// - the actual type arguments of the enclosing type. -let private AnalyzeTypeOfMemberVal isCSharpExt g (typ,vref:ValRef) = +let private AnalyzeTypeOfMemberVal isCSharpExt g (ty,vref:ValRef) = let memberAllTypars,_,retTy,_ = GetTypeOfMemberInMemberForm g vref if isCSharpExt || vref.IsExtensionMember then [],memberAllTypars,retTy,[] else - let parentTyArgs = argsOfAppTy g typ - let memberParentTypars,memberMethodTypars = List.chop parentTyArgs.Length memberAllTypars + let parentTyArgs = argsOfAppTy g ty + let memberParentTypars,memberMethodTypars = List.splitAt parentTyArgs.Length memberAllTypars memberParentTypars,memberMethodTypars,retTy,parentTyArgs /// Get the object type for a member value which is an extension method (C#-style or F#-style) @@ -463,8 +457,8 @@ let private CombineMethInsts ttps mtps tinst minst = (mkTyparInst ttps tinst @ m /// /// The 'methTyArgs' is the instantiation of any generic method type parameters (this instantiation is /// not included in the MethInfo objects, but carried separately). -let private GetInstantiationForMemberVal g isCSharpExt (typ, vref, methTyArgs: TypeInst) = - let memberParentTypars,memberMethodTypars,_retTy,parentTyArgs = AnalyzeTypeOfMemberVal isCSharpExt g (typ,vref) +let private GetInstantiationForMemberVal g isCSharpExt (ty, vref, methTyArgs: TypeInst) = + let memberParentTypars,memberMethodTypars,_retTy,parentTyArgs = AnalyzeTypeOfMemberVal isCSharpExt g (ty,vref) /// In some recursive inference cases involving constraints this may need to be /// fixed up - we allow uniform generic recursion but nothing else. /// See https://github.com/Microsoft/visualfsharp/issues/3038#issuecomment-309429410 @@ -476,8 +470,8 @@ let private GetInstantiationForMemberVal g isCSharpExt (typ, vref, methTyArgs: T CombineMethInsts memberParentTypars memberMethodTypars parentTyArgs methTyArgsFixedUp /// Work out the instantiation relevant to interpret the backing metadata for a property. -let private GetInstantiationForPropertyVal g (typ,vref) = - let memberParentTypars,memberMethodTypars,_retTy,parentTyArgs = AnalyzeTypeOfMemberVal false g (typ,vref) +let private GetInstantiationForPropertyVal g (ty,vref) = + let memberParentTypars,memberMethodTypars,_retTy,parentTyArgs = AnalyzeTypeOfMemberVal false g (ty,vref) CombineMethInsts memberParentTypars memberMethodTypars parentTyArgs (generalizeTypars memberMethodTypars) /// Describes the sequence order of the introduction of an extension method. Extension methods that are introduced @@ -546,7 +540,7 @@ type OptionalArgInfo = | Some (Expr.Const (ConstToILFieldInit fi,_,_)) -> Some fi | _ -> None -type CallerInfoInfo = +type CallerInfo = | NoCallerInfo | CallerLineNumber | CallerMemberName @@ -576,8 +570,8 @@ type ParamNameAndType = [] /// Full information about a parameter returned for use by the type checker and language service. type ParamData = - /// ParamData(isParamArray, isOut, optArgInfo, callerInfoInfo, nameOpt, reflArgInfo, ttype) - ParamData of bool * bool * OptionalArgInfo * CallerInfoInfo * Ident option * ReflectedArgInfo * TType + /// ParamData(isParamArray, isOut, optArgInfo, callerInfo, nameOpt, reflArgInfo, ttype) + ParamData of bool * bool * bool * OptionalArgInfo * CallerInfo * Ident option * ReflectedArgInfo * TType //------------------------------------------------------------------------- @@ -663,30 +657,50 @@ let ArbitraryMethodInfoOfPropertyInfo (pi:Tainted) m = [] type ILTypeInfo = /// ILTypeInfo (tyconRef, ilTypeRef, typeArgs, ilTypeDef). - | ILTypeInfo of TyconRef * ILTypeRef * TypeInst * ILTypeDef + | ILTypeInfo of TcGlobals * TType * ILTypeRef * ILTypeDef + + member x.TcGlobals = let (ILTypeInfo(g,_,_,_)) = x in g + + member x.ILTypeRef = let (ILTypeInfo(_,_,tref,_)) = x in tref - member x.TyconRef = let (ILTypeInfo(tcref,_,_,_)) = x in tcref - member x.ILTypeRef = let (ILTypeInfo(_,tref,_,_)) = x in tref - member x.TypeInst = let (ILTypeInfo(_,_,tinst,_)) = x in tinst member x.RawMetadata = let (ILTypeInfo(_,_,_,tdef)) = x in tdef - member x.ToType = TType_app(x.TyconRef,x.TypeInst) + + member x.ToType = let (ILTypeInfo(_,ty,_,_)) = x in ty + + /// Get the compiled nominal type. In the case of tuple types, this is a .NET tuple type + member x.ToAppType = convertToTypeWithMetadataIfPossible x.TcGlobals x.ToType + + member x.TyconRefOfRawMetadata = tcrefOfAppTy x.TcGlobals x.ToAppType + + member x.TypeInstOfRawMetadata = argsOfAppTy x.TcGlobals x.ToAppType + member x.ILScopeRef = x.ILTypeRef.Scope + member x.Name = x.ILTypeRef.Name + member x.IsValueType = x.RawMetadata.IsStructOrEnum - member x.Instantiate inst = - let (ILTypeInfo(tcref,tref,tinst,tdef)) = x - ILTypeInfo(tcref,tref,instTypes inst tinst,tdef) - member x.FormalTypars m = x.TyconRef.Typars m + member x.Instantiate inst = + let (ILTypeInfo(g,ty,tref,tdef)) = x + ILTypeInfo(g,instType inst ty,tref,tdef) static member FromType g ty = - if isILAppTy g ty then - let tcref,tinst = destAppTy g ty - let (TILObjectReprData(scoref,enc,tdef)) = tcref.ILTyconInfo + if isAnyTupleTy g ty then + // When getting .NET metadata for the properties and methods + // of an F# tuple type, use the compiled nominal type, which is a .NET tuple type + let metadataTy = convertToTypeWithMetadataIfPossible g ty + assert (isILAppTy g metadataTy) + let metadataTyconRef = tcrefOfAppTy g metadataTy + let (TILObjectReprData(scoref, enc, tdef)) = metadataTyconRef.ILTyconInfo + let metadataILTypeRef = mkRefForNestedILTypeDef scoref (enc,tdef) + ILTypeInfo(g, ty, metadataILTypeRef, tdef) + elif isILAppTy g ty then + let tcref = tcrefOfAppTy g ty + let (TILObjectReprData(scoref, enc, tdef)) = tcref.ILTyconInfo let tref = mkRefForNestedILTypeDef scoref (enc,tdef) - ILTypeInfo(tcref,tref,tinst,tdef) + ILTypeInfo(g, ty, tref, tdef) else - failwith "ILTypeInfo.FromType" + failwith "ILTypeInfo.FromType - no IL metadata for type" //------------------------------------------------------------------------- // ILMethInfo @@ -706,12 +720,15 @@ type ILMethInfo = member x.TcGlobals = match x with ILMethInfo(g,_,_,_,_) -> g /// Get the apparent declaring type of the method as an F# type. - /// If this is an C#-style extension method then this is the type which the method + /// If this is a C#-style extension method then this is the type which the method /// appears to extend. This may be a variable type. member x.ApparentEnclosingType = match x with ILMethInfo(_,ty,_,_,_) -> ty + /// Like ApparentEnclosingType but use the compiled nominal type if this is a method on a tuple type + member x.ApparentEnclosingAppType = convertToTypeWithMetadataIfPossible x.TcGlobals x.ApparentEnclosingType + /// Get the declaring type associated with an extension member, if any. - member x.DeclaringTyconRefOption = match x with ILMethInfo(_,_,tcrefOpt,_,_) -> tcrefOpt + member x.ILExtensionMethodDeclaringTyconRef = match x with ILMethInfo(_,_,tcrefOpt,_,_) -> tcrefOpt /// Get the Abstract IL metadata associated with the method. member x.RawMetadata = match x with ILMethInfo(_,_,_,md,_) -> md @@ -723,20 +740,21 @@ type ILMethInfo = member x.ILName = x.RawMetadata.Name /// Indicates if the method is an extension method - member x.IsILExtensionMethod = x.DeclaringTyconRefOption.IsSome + member x.IsILExtensionMethod = x.ILExtensionMethodDeclaringTyconRef.IsSome /// Get the declaring type of the method. If this is an C#-style extension method then this is the IL type /// holding the static member that is the extension method. member x.DeclaringTyconRef = - match x.DeclaringTyconRefOption with + match x.ILExtensionMethodDeclaringTyconRef with | Some tcref -> tcref - | None -> tcrefOfAppTy x.TcGlobals x.ApparentEnclosingType + | None -> tcrefOfAppTy x.TcGlobals x.ApparentEnclosingAppType /// Get the instantiation of the declaring type of the method. /// If this is an C#-style extension method then this is empty because extension members /// are never in generic classes. member x.DeclaringTypeInst = - if x.IsILExtensionMethod then [] else argsOfAppTy x.TcGlobals x.ApparentEnclosingType + if x.IsILExtensionMethod then [] + else argsOfAppTy x.TcGlobals x.ApparentEnclosingAppType /// Get the Abstract IL scope information associated with interpreting the Abstract IL metadata that backs this method. member x.MetadataScope = x.DeclaringTyconRef.CompiledRepresentationForNamedType.Scope @@ -770,10 +788,7 @@ type ILMethInfo = member x.IsFinal = x.RawMetadata.IsFinal /// Indicates if the IL method is marked abstract. - member x.IsAbstract = - match x.RawMetadata.mdKind with - | MethodKind.Virtual vinfo -> vinfo.IsAbstract - | _ -> false + member x.IsAbstract = x.RawMetadata.IsAbstract /// Does it appear to the user as a static method? member x.IsStatic = @@ -781,10 +796,7 @@ type ILMethInfo = x.RawMetadata.CallingConv.IsStatic /// Does it have the .NET IL 'newslot' flag set, and is also a virtual? - member x.IsNewSlot = - match x.RawMetadata.mdKind with - | MethodKind.Virtual vinfo -> vinfo.IsNewSlot - | _ -> false + member x.IsNewSlot = x.RawMetadata.IsNewSlot /// Does it appear to the user as an instance method? member x.IsInstance = not x.IsConstructor && not x.IsStatic @@ -849,7 +861,7 @@ type ILMethInfo = /// Describes an F# use of a method [] type MethInfo = - /// FSMeth(tcGlobals, declaringType, valRef, extensionMethodPriority). + /// FSMeth(tcGlobals, enclosingType, valRef, extensionMethodPriority). /// /// Describes a use of a method declared in F# code and backed by F# metadata. | FSMeth of TcGlobals * TType * ValRef * ExtensionMethodPriority option @@ -871,24 +883,31 @@ type MethInfo = /// /// If this is an extension member, then this is the apparent parent, i.e. the type the method appears to extend. /// This may be a variable type. - member x.EnclosingType = + member x.ApparentEnclosingType = match x with - | ILMeth(_g,ilminfo,_) -> ilminfo.ApparentEnclosingType - | FSMeth(_g,typ,_,_) -> typ - | DefaultStructCtor(_g,typ) -> typ + | ILMeth(_,ilminfo,_) -> ilminfo.ApparentEnclosingType + | FSMeth(_,ty,_,_) -> ty + | DefaultStructCtor(_,ty) -> ty #if !NO_EXTENSIONTYPING | ProvidedMeth(amap,mi,_,m) -> Import.ImportProvidedType amap m (mi.PApply((fun mi -> mi.DeclaringType),m)) #endif + /// Get the enclosing type of the method info, using a nominal type for tuple types + member x.ApparentEnclosingAppType = + convertToTypeWithMetadataIfPossible x.TcGlobals x.ApparentEnclosingType + + member x.ApparentEnclosingTyconRef = + tcrefOfAppTy x.TcGlobals x.ApparentEnclosingAppType + /// Get the declaring type or module holding the method. If this is an C#-style extension method then this is the type /// holding the static member that is the extension method. If this is an F#-style extension method it is the logical module /// holding the value for the extension method. - member x.DeclaringEntityRef = + member x.DeclaringTyconRef = match x with | ILMeth(_,ilminfo,_) when x.IsExtensionMember -> ilminfo.DeclaringTyconRef - | FSMeth(_,_,vref,_) when x.IsExtensionMember && vref.HasTopValActualParent -> vref.TopValActualParent - | _ -> tcrefOfAppTy x.TcGlobals x.EnclosingType + | FSMeth(_,_,vref,_) when x.IsExtensionMember && vref.HasDeclaringEntity -> vref.TopValDeclaringEntity + | _ -> x.ApparentEnclosingTyconRef /// Get the information about provided static parameters, if any member x.ProvidedStaticParameterInfo = @@ -958,13 +977,13 @@ type MethInfo = #endif | _ -> false - override x.ToString() = x.EnclosingType.ToString() + x.LogicalName + override x.ToString() = x.ApparentEnclosingType.ToString() + x.LogicalName /// Get the actual type instantiation of the declaring type associated with this use of the method. /// /// For extension members this is empty (the instantiation of the declaring type). member x.DeclaringTypeInst = - if x.IsExtensionMember then [] else argsOfAppTy x.TcGlobals x.EnclosingType + if x.IsExtensionMember then [] else argsOfAppTy x.TcGlobals x.ApparentEnclosingAppType /// Get the TcGlobals value that governs the method declaration member x.TcGlobals = @@ -982,8 +1001,9 @@ type MethInfo = member x.FormalMethodTypars = match x with | ILMeth(_,ilmeth,_) -> ilmeth.FormalMethodTypars - | FSMeth(g,typ,vref,_) -> - let _,memberMethodTypars,_,_ = AnalyzeTypeOfMemberVal x.IsCSharpStyleExtensionMember g (typ,vref) + | FSMeth(g,_,vref,_) -> + let ty = x.ApparentEnclosingAppType + let _,memberMethodTypars,_,_ = AnalyzeTypeOfMemberVal x.IsCSharpStyleExtensionMember g (ty,vref) memberMethodTypars | DefaultStructCtor _ -> [] #if !NO_EXTENSIONTYPING @@ -1073,7 +1093,7 @@ type MethInfo = | ILMeth(_,ilmeth,_) -> ilmeth.IsClassConstructor | FSMeth(_,_,vref,_) -> match vref.TryDeref with - | VSome x -> x.IsClassConstructor + | ValueSome x -> x.IsClassConstructor | _ -> false | DefaultStructCtor _ -> false #if !NO_EXTENSIONTYPING @@ -1084,7 +1104,7 @@ type MethInfo = match x with | ILMeth(_g,ilmeth,_) -> ilmeth.IsVirtual | FSMeth(g,_,vref,_) as x -> - isInterfaceTy g x.EnclosingType || + isInterfaceTy g x.ApparentEnclosingType || vref.MemberInfo.Value.MemberFlags.IsDispatchSlot | DefaultStructCtor _ -> false #if !NO_EXTENSIONTYPING @@ -1111,14 +1131,14 @@ type MethInfo = member minfo.IsAbstract = match minfo with | ILMeth(_,ilmeth,_) -> ilmeth.IsAbstract - | FSMeth(g,_,vref,_) -> isInterfaceTy g minfo.EnclosingType || vref.IsDispatchSlotMember + | FSMeth(g,_,vref,_) -> isInterfaceTy g minfo.ApparentEnclosingType || vref.IsDispatchSlotMember | DefaultStructCtor _ -> false #if !NO_EXTENSIONTYPING | ProvidedMeth(_,mi,_,m) -> mi.PUntaint((fun mi -> mi.IsAbstract), m) #endif member x.IsNewSlot = - isInterfaceTy x.TcGlobals x.EnclosingType || + isInterfaceTy x.TcGlobals x.ApparentEnclosingType || (x.IsVirtual && (match x with | ILMeth(_,x,_) -> x.IsNewSlot @@ -1154,7 +1174,18 @@ type MethInfo = | _ -> failwith "not supported" /// Indicates if this is an extension member. - member x.IsExtensionMember = x.IsCSharpStyleExtensionMember || x.IsFSharpStyleExtensionMember + member x.IsExtensionMember = + match x with + | FSMeth (_,_,vref,pri) -> pri.IsSome || vref.IsExtensionMember + | ILMeth (_,_,Some _) -> true + | _ -> false + + /// Indicates if this is an extension member (e.g. on a struct) that takes a byref arg + member x.ObjArgNeedsAddress (amap: Import.ImportMap, m) = + (x.IsStruct && not x.IsExtensionMember) || + match x.GetObjArgTypes (amap, m, x.FormalMethodInst) with + | [h] -> isByrefTy amap.g h + | _ -> false /// Indicates if this is an F# extension member. member x.IsFSharpStyleExtensionMember = @@ -1162,8 +1193,10 @@ type MethInfo = /// Indicates if this is an C#-style extension member. member x.IsCSharpStyleExtensionMember = - x.ExtensionMemberPriorityOption.IsSome && - (match x with ILMeth _ -> true | FSMeth (_,_,vref,_) -> not vref.IsExtensionMember | _ -> false) + match x with + | FSMeth (_,_,vref,Some _) -> not vref.IsExtensionMember + | ILMeth (_,_,Some _) -> true + | _ -> false /// Add the actual type instantiation of the apparent type of an F# extension method. // @@ -1177,7 +1210,7 @@ type MethInfo = // but is compiled as a generic methods with two type arguments // Map<'T,'U>(this: List<'T>, f : 'T -> 'U) member x.AdjustUserTypeInstForFSharpStyleIndexedExtensionMembers(tyargs) = - (if x.IsFSharpStyleExtensionMember then argsOfAppTy x.TcGlobals x.EnclosingType else []) @ tyargs + (if x.IsFSharpStyleExtensionMember then argsOfAppTy x.TcGlobals x.ApparentEnclosingAppType else []) @ tyargs /// Indicates if this method is a generated method associated with an F# CLIEvent property compiled as a .NET event member x.IsFSharpEventPropertyMethod = @@ -1195,13 +1228,13 @@ type MethInfo = /// /// For an extension method, this indicates if the method extends a struct type. member x.IsStruct = - isStructTy x.TcGlobals x.EnclosingType + isStructTy x.TcGlobals x.ApparentEnclosingType /// Build IL method infos. - static member CreateILMeth (amap:Import.ImportMap, m, typ:TType, md: ILMethodDef) = - let tinfo = ILTypeInfo.FromType amap.g typ - let mtps = Import.ImportILGenericParameters (fun () -> amap) m tinfo.ILScopeRef tinfo.TypeInst md.GenericParams - ILMeth (amap.g,ILMethInfo(amap.g,tinfo.ToType,None,md,mtps),None) + static member CreateILMeth (amap:Import.ImportMap, m, ty:TType, md: ILMethodDef) = + let tinfo = ILTypeInfo.FromType amap.g ty + let mtps = Import.ImportILGenericParameters (fun () -> amap) m tinfo.ILScopeRef tinfo.TypeInstOfRawMetadata md.GenericParams + ILMeth (amap.g,ILMethInfo(amap.g, ty, None, md, mtps),None) /// Build IL method infos for a C#-style extension method static member CreateILExtensionMeth (amap, m, apparentTy:TType, declaringTyconRef:TyconRef, extMethPri, md: ILMethodDef) = @@ -1211,18 +1244,18 @@ type MethInfo = /// Tests whether two method infos have the same underlying definition. /// Used to merge operator overloads collected from left and right of an operator constraint. + /// Must be compatible with ItemsAreEffectivelyEqual relation. static member MethInfosUseIdenticalDefinitions x1 x2 = match x1,x2 with | ILMeth(_,x1,_), ILMeth(_,x2,_) -> (x1.RawMetadata === x2.RawMetadata) | FSMeth(g,_,vref1,_), FSMeth(_,_,vref2,_) -> valRefEq g vref1 vref2 - | DefaultStructCtor(g,ty1), DefaultStructCtor(_,ty2) -> tyconRefEq g (tcrefOfAppTy g ty1) (tcrefOfAppTy g ty2) + | DefaultStructCtor _, DefaultStructCtor _ -> tyconRefEq x1.TcGlobals x1.DeclaringTyconRef x2.DeclaringTyconRef #if !NO_EXTENSIONTYPING | ProvidedMeth(_,mi1,_,_),ProvidedMeth(_,mi2,_,_) -> ProvidedMethodBase.TaintedEquals (mi1, mi2) #endif | _ -> false - /// Calculates a hash code of method info. Note: this is a very imperfect implementation, - /// but it works decently for comparing methods in the language service... + /// Calculates a hash code of method info. Must be compatible with ItemsAreEffectivelyEqual relation. member x.ComputeHashCode() = match x with | ILMeth(_,x1,_) -> hash x1.RawMetadata.Name @@ -1238,10 +1271,10 @@ type MethInfo = match x with | ILMeth(_g,ilminfo,pri) -> match ilminfo with - | ILMethInfo(_,typ,None,md,_) -> MethInfo.CreateILMeth(amap, m, instType inst typ, md) - | ILMethInfo(_,typ,Some declaringTyconRef,md,_) -> MethInfo.CreateILExtensionMeth(amap, m, instType inst typ, declaringTyconRef, pri, md) - | FSMeth(g,typ,vref,pri) -> FSMeth(g,instType inst typ,vref,pri) - | DefaultStructCtor(g,typ) -> DefaultStructCtor(g,instType inst typ) + | ILMethInfo(_,ty,None,md,_) -> MethInfo.CreateILMeth(amap, m, instType inst ty, md) + | ILMethInfo(_,ty,Some declaringTyconRef,md,_) -> MethInfo.CreateILExtensionMeth(amap, m, instType inst ty, declaringTyconRef, pri, md) + | FSMeth(g,ty,vref,pri) -> FSMeth(g,instType inst ty,vref,pri) + | DefaultStructCtor(g,ty) -> DefaultStructCtor(g,instType inst ty) #if !NO_EXTENSIONTYPING | ProvidedMeth _ -> match inst with @@ -1254,9 +1287,10 @@ type MethInfo = match x with | ILMeth(_g,ilminfo,_) -> ilminfo.GetCompiledReturnTy(amap, m, minst) - | FSMeth(g,typ,vref,_) -> - let inst = GetInstantiationForMemberVal g x.IsCSharpStyleExtensionMember (typ,vref,minst) - let _,_,retTy,_ = AnalyzeTypeOfMemberVal x.IsCSharpStyleExtensionMember g (typ,vref) + | FSMeth(g,_,vref,_) -> + let ty = x.ApparentEnclosingAppType + let inst = GetInstantiationForMemberVal g x.IsCSharpStyleExtensionMember (ty,vref,minst) + let _,_,retTy,_ = AnalyzeTypeOfMemberVal x.IsCSharpStyleExtensionMember g (ty,vref) retTy |> Option.map (instType inst) | DefaultStructCtor _ -> None #if !NO_EXTENSIONTYPING @@ -1274,9 +1308,9 @@ type MethInfo = | ILMeth(_g,ilminfo,_) -> // A single group of tupled arguments [ ilminfo.GetParamTypes(amap,m,minst) ] - | FSMeth(g,typ,vref,_) -> + | FSMeth(g,ty,vref,_) -> let paramTypes = ParamNameAndType.FromMember x.IsCSharpStyleExtensionMember g vref - let inst = GetInstantiationForMemberVal g x.IsCSharpStyleExtensionMember (typ,vref,minst) + let inst = GetInstantiationForMemberVal g x.IsCSharpStyleExtensionMember (ty,vref,minst) paramTypes |> List.mapSquared (fun (ParamNameAndType(_,ty)) -> instType inst ty) | DefaultStructCtor _ -> [] #if !NO_EXTENSIONTYPING @@ -1291,15 +1325,16 @@ type MethInfo = member x.GetObjArgTypes (amap, m, minst) = match x with | ILMeth(_,ilminfo,_) -> ilminfo.GetObjArgTypes(amap, m, minst) - | FSMeth(g,typ,vref,_) -> + | FSMeth(g,_,vref,_) -> if x.IsInstance then + let ty = x.ApparentEnclosingAppType // The 'this' pointer of an extension member can depend on the minst if x.IsExtensionMember then - let inst = GetInstantiationForMemberVal g x.IsCSharpStyleExtensionMember (typ,vref,minst) + let inst = GetInstantiationForMemberVal g x.IsCSharpStyleExtensionMember (ty,vref,minst) let rawObjTy = GetObjTypeOfInstanceExtensionMethod g vref [ rawObjTy |> instType inst ] else - [ typ ] + [ ty ] else [] | DefaultStructCtor _ -> [] #if !NO_EXTENSIONTYPING @@ -1320,6 +1355,7 @@ type MethInfo = | Some _ -> ReflectedArgInfo.Quote false | _ -> ReflectedArgInfo.None let isOutArg = (p.IsOut && not p.IsIn) + let isInArg = (p.IsIn && not p.IsOut) // Note: we get default argument values from VB and other .NET language metadata let optArgInfo = OptionalArgInfo.FromILParameter g amap m ilMethInfo.MetadataScope ilMethInfo.DeclaringTypeInst p @@ -1327,7 +1363,7 @@ type MethInfo = let isCallerFilePathArg = TryFindILAttribute g.attrib_CallerFilePathAttribute p.CustomAttrs let isCallerMemberNameArg = TryFindILAttribute g.attrib_CallerMemberNameAttribute p.CustomAttrs - let callerInfoInfo = + let callerInfo = match isCallerLineNumberArg, isCallerFilePathArg, isCallerMemberNameArg with | false, false, false -> NoCallerInfo | true, false, false -> CallerLineNumber @@ -1339,7 +1375,7 @@ type MethInfo = if p.Type.TypeRef.FullName = "System.Int32" then CallerFilePath else CallerLineNumber - yield (isParamArrayArg, isOutArg, optArgInfo, callerInfoInfo, reflArgInfo) ] ] + yield (isParamArrayArg, isInArg, isOutArg, optArgInfo, callerInfo, reflArgInfo) ] ] | FSMeth(g,_,vref,_) -> GetArgInfosOfMember x.IsCSharpStyleExtensionMember g vref @@ -1349,7 +1385,8 @@ type MethInfo = match TryFindFSharpBoolAttributeAssumeFalse g g.attrib_ReflectedDefinitionAttribute argInfo.Attribs with | Some b -> ReflectedArgInfo.Quote b | None -> ReflectedArgInfo.None - let isOutArg = HasFSharpAttribute g g.attrib_OutAttribute argInfo.Attribs && isByrefTy g ty + let isOutArg = (HasFSharpAttribute g g.attrib_OutAttribute argInfo.Attribs && isByrefTy g ty) || isOutByrefTy g ty + let isInArg = (HasFSharpAttribute g g.attrib_InAttribute argInfo.Attribs && isByrefTy g ty) || isInByrefTy g ty let isCalleeSideOptArg = HasFSharpAttribute g g.attrib_OptionalArgumentAttribute argInfo.Attribs let isCallerSideOptArg = HasFSharpAttributeOpt g g.attrib_OptionalAttribute argInfo.Attribs let optArgInfo = @@ -1365,7 +1402,7 @@ type MethInfo = | Some attr -> let defaultValue = OptionalArgInfo.ValueOfDefaultParameterValueAttrib attr match defaultValue with - | Some (Expr.Const (_, m, typ)) when not (typeEquiv g typ ty) -> + | Some (Expr.Const (_, m, ty2)) when not (typeEquiv g ty2 ty) -> // the type of the default value does not match the type of the argument. // Emit a warning, and ignore the DefaultParameterValue argument altogether. warning(Error(FSComp.SR.DefaultParameterValueNotAppropriateForArgument(), m)) @@ -1383,7 +1420,7 @@ type MethInfo = let isCallerFilePathArg = HasFSharpAttribute g g.attrib_CallerFilePathAttribute argInfo.Attribs let isCallerMemberNameArg = HasFSharpAttribute g g.attrib_CallerMemberNameAttribute argInfo.Attribs - let callerInfoInfo = + let callerInfo = match isCallerLineNumberArg, isCallerFilePathArg, isCallerMemberNameArg with | false, false, false -> NoCallerInfo | true, false, false -> CallerLineNumber @@ -1397,10 +1434,10 @@ type MethInfo = // if multiple caller info attributes are specified, pick the "wrong" one here // so that we get an error later match tryDestOptionTy g ty with - | Some optTy when typeEquiv g g.int32_ty optTy -> CallerFilePath + | ValueSome optTy when typeEquiv g g.int32_ty optTy -> CallerFilePath | _ -> CallerLineNumber - (isParamArrayArg, isOutArg, optArgInfo, callerInfoInfo, reflArgInfo)) + (isParamArrayArg, isInArg, isOutArg, optArgInfo, callerInfo, reflArgInfo)) | DefaultStructCtor _ -> [[]] @@ -1416,7 +1453,9 @@ type MethInfo = | Some ([ Some (:? bool as b) ], _) -> ReflectedArgInfo.Quote b | Some _ -> ReflectedArgInfo.Quote false | None -> ReflectedArgInfo.None - yield (isParamArrayArg, p.PUntaint((fun p -> p.IsOut), m), optArgInfo, NoCallerInfo, reflArgInfo)] ] + let isOutArg = p.PUntaint((fun p -> p.IsOut && not p.IsIn), m) + let isInArg = p.PUntaint((fun p -> p.IsIn && not p.IsOut), m) + yield (isParamArrayArg, isInArg, isOutArg, optArgInfo, NoCallerInfo, reflArgInfo)] ] #endif @@ -1427,7 +1466,7 @@ type MethInfo = // The FSMeth, ILMeth+ProvidedMeth paths can probably be unified too. member x.GetSlotSig(amap, m) = match x with - | FSMeth(g,typ,vref,_) -> + | FSMeth(g,_,vref,_) -> match vref.RecursiveValInfo with | ValInRecScope(false) -> error(Error((FSComp.SR.InvalidRecursiveReferenceToAbstractSlot()),m)) | _ -> () @@ -1435,14 +1474,14 @@ type MethInfo = let allTyparsFromMethod,_,retTy,_ = GetTypeOfMemberInMemberForm g vref // A slot signature is w.r.t. the type variables of the type it is associated with. // So we have to rename from the member type variables to the type variables of the type. - let formalEnclosingTypars = (tcrefOfAppTy g typ).Typars(m) - let formalEnclosingTyparsFromMethod,formalMethTypars = List.chop formalEnclosingTypars.Length allTyparsFromMethod + let formalEnclosingTypars = x.ApparentEnclosingTyconRef.Typars(m) + let formalEnclosingTyparsFromMethod,formalMethTypars = List.splitAt formalEnclosingTypars.Length allTyparsFromMethod let methodToParentRenaming,_ = mkTyparToTyparRenaming formalEnclosingTyparsFromMethod formalEnclosingTypars let formalParams = GetArgInfosOfMember x.IsCSharpStyleExtensionMember g vref |> List.mapSquared (map1Of2 (instType methodToParentRenaming) >> MakeSlotParam ) let formalRetTy = Option.map (instType methodToParentRenaming) retTy - MakeSlotSig(x.LogicalName, x.EnclosingType, formalEnclosingTypars, formalMethTypars, formalParams, formalRetTy) + MakeSlotSig(x.LogicalName, x.ApparentEnclosingType, formalEnclosingTypars, formalMethTypars, formalParams, formalRetTy) | DefaultStructCtor _ -> error(InternalError("no slotsig for DefaultStructCtor",m)) | _ -> let g = x.TcGlobals @@ -1452,7 +1491,7 @@ type MethInfo = // happens to make the return type 'unit' (i.e. it was originally a variable type // then that does not correspond to a slotsig compiled as a 'void' return type. // REVIEW: should we copy down attributes to slot params? - let tcref = tcrefOfAppTy g x.EnclosingType + let tcref = tcrefOfAppTy g x.ApparentEnclosingAppType let formalEnclosingTyparsOrig = tcref.Typars(m) let formalEnclosingTypars = copyTypars formalEnclosingTyparsOrig let _,formalEnclosingTyparTys = FixupNewTypars m [] [] formalEnclosingTyparsOrig formalEnclosingTypars @@ -1462,10 +1501,10 @@ type MethInfo = match x with | ILMeth(_,ilminfo,_) -> let ftinfo = ILTypeInfo.FromType g (TType_app(tcref,formalEnclosingTyparTys)) - let formalRetTy = ImportReturnTypeFromMetaData amap m ilminfo.RawMetadata.Return.Type ftinfo.ILScopeRef ftinfo.TypeInst formalMethTyparTys + let formalRetTy = ImportReturnTypeFromMetaData amap m ilminfo.RawMetadata.Return.Type ftinfo.ILScopeRef ftinfo.TypeInstOfRawMetadata formalMethTyparTys let formalParams = [ [ for p in ilminfo.RawMetadata.Parameters do - let paramType = ImportILTypeFromMetadata amap m ftinfo.ILScopeRef ftinfo.TypeInst formalMethTyparTys p.Type + let paramType = ImportILTypeFromMetadata amap m ftinfo.ILScopeRef ftinfo.TypeInstOfRawMetadata formalMethTyparTys p.Type yield TSlotParam(p.Name, paramType, p.IsIn, p.IsOut, p.IsOptional, []) ] ] formalRetTy, formalParams #if !NO_EXTENSIONTYPING @@ -1484,7 +1523,7 @@ type MethInfo = formalRetTy, formalParams #endif | _ -> failwith "unreachable" - MakeSlotSig(x.LogicalName, x.EnclosingType, formalEnclosingTypars, formalMethTypars,formalParams, formalRetTy) + MakeSlotSig(x.LogicalName, x.ApparentEnclosingType, formalEnclosingTypars, formalMethTypars,formalParams, formalRetTy) /// Get the ParamData objects for the parameters of a MethInfo member x.GetParamDatas(amap, m, minst) = @@ -1492,9 +1531,10 @@ type MethInfo = match x with | ILMeth(_g,ilminfo,_) -> [ ilminfo.GetParamNamesAndTypes(amap,m,minst) ] - | FSMeth(g,typ,vref,_) -> + | FSMeth(g,_,vref,_) -> + let ty = x.ApparentEnclosingAppType let items = ParamNameAndType.FromMember x.IsCSharpStyleExtensionMember g vref - let inst = GetInstantiationForMemberVal g x.IsCSharpStyleExtensionMember (typ,vref,minst) + let inst = GetInstantiationForMemberVal g x.IsCSharpStyleExtensionMember (ty,vref,minst) items |> ParamNameAndType.InstantiateCurried inst | DefaultStructCtor _ -> [[]] @@ -1506,21 +1546,21 @@ type MethInfo = match p.PUntaint((fun p -> p.Name), m) with | null -> None | name -> Some (mkSynId m name) - let ptyp = + let pty = match p.PApply((fun p -> p.ParameterType), m) with | Tainted.Null -> amap.g.unit_ty | parameterType -> Import.ImportProvidedType amap m parameterType - yield ParamNameAndType(pname,ptyp) ] ] + yield ParamNameAndType(pname,pty) ] ] #endif let paramAttribs = x.GetParamAttribs(amap, m) - (paramAttribs,paramNamesAndTypes) ||> List.map2 (List.map2 (fun (isParamArrayArg,isOutArg,optArgInfo,callerInfoInfo,reflArgInfo) (ParamNameAndType(nmOpt,pty)) -> - ParamData(isParamArrayArg,isOutArg,optArgInfo,callerInfoInfo,nmOpt,reflArgInfo,pty))) + (paramAttribs,paramNamesAndTypes) ||> List.map2 (List.map2 (fun (isParamArrayArg, isInArg, isOutArg, optArgInfo, callerInfo, reflArgInfo) (ParamNameAndType(nmOpt,pty)) -> + ParamData(isParamArrayArg, isInArg, isOutArg, optArgInfo, callerInfo, nmOpt, reflArgInfo, pty))) /// Get the ParamData objects for the parameters of a MethInfo member x.HasParamArrayArg(amap, m, minst) = - x.GetParamDatas(amap, m, minst) |> List.existsSquared (fun (ParamData(isParamArrayArg,_,_,_,_,_,_)) -> isParamArrayArg) + x.GetParamDatas(amap, m, minst) |> List.existsSquared (fun (ParamData(isParamArrayArg,_,_,_,_,_,_,_)) -> isParamArrayArg) /// Select all the type parameters of the declaring type of a method. @@ -1532,16 +1572,12 @@ type MethInfo = if x.IsExtensionMember then [] else match x with - | ILMeth(_,ilminfo,_) -> ilminfo.DeclaringTyconRef.Typars m - | FSMeth(g,typ,vref,_) -> - let memberParentTypars,_,_,_ = AnalyzeTypeOfMemberVal false g (typ,vref) + | FSMeth(g,_,vref,_) -> + let ty = x.ApparentEnclosingAppType + let memberParentTypars,_,_,_ = AnalyzeTypeOfMemberVal false g (ty,vref) memberParentTypars - | DefaultStructCtor(g,typ) -> - (tcrefOfAppTy g typ).Typars(m) -#if !NO_EXTENSIONTYPING - | ProvidedMeth (amap,_,_,_) -> - (tcrefOfAppTy amap.g x.EnclosingType).Typars(m) -#endif + | _ -> + x.DeclaringTyconRef.Typars(m) //------------------------------------------------------------------------- // ILFieldInfo @@ -1558,13 +1594,26 @@ type ILFieldInfo = #endif /// Get the enclosing ("parent"/"declaring") type of the field. - member x.EnclosingType = + member x.ApparentEnclosingType = match x with | ILFieldInfo(tinfo,_) -> tinfo.ToType #if !NO_EXTENSIONTYPING | ProvidedField(amap,fi,m) -> (Import.ImportProvidedType amap m (fi.PApply((fun fi -> fi.DeclaringType),m))) #endif + member x.ApparentEnclosingAppType = x.ApparentEnclosingType + + member x.ApparentEnclosingTyconRef = tcrefOfAppTy x.TcGlobals x.ApparentEnclosingAppType + + member x.DeclaringTyconRef = x.ApparentEnclosingTyconRef + + member x.TcGlobals = + match x with + | ILFieldInfo(tinfo,_) -> tinfo.TcGlobals +#if !NO_EXTENSIONTYPING + | ProvidedField(amap,_,_) -> amap.g +#endif + /// Get a reference to the declaring type of the field as an ILTypeRef member x.ILTypeRef = match x with @@ -1576,10 +1625,10 @@ type ILFieldInfo = /// Get the scope used to interpret IL metadata member x.ScopeRef = x.ILTypeRef.Scope - /// Get the type instantiation of the declaring type of the field + /// Get the type instantiation of the declaring type of the field member x.TypeInst = match x with - | ILFieldInfo(tinfo,_) -> tinfo.TypeInst + | ILFieldInfo(tinfo,_) -> tinfo.TypeInstOfRawMetadata #if !NO_EXTENSIONTYPING | ProvidedField _ -> [] /// GENERIC TYPE PROVIDERS #endif @@ -1605,7 +1654,7 @@ type ILFieldInfo = match x with | ILFieldInfo(tinfo,_) -> tinfo.IsValueType #if !NO_EXTENSIONTYPING - | ProvidedField(amap,_,_) -> isStructTy amap.g x.EnclosingType + | ProvidedField(amap,_,_) -> isStructTy amap.g x.ApparentEnclosingType #endif /// Indicates if the field is static @@ -1639,7 +1688,7 @@ type ILFieldInfo = /// Get the type of the field as an IL type member x.ILFieldType = match x with - | ILFieldInfo (_,fdef) -> fdef.Type + | ILFieldInfo (_,fdef) -> fdef.FieldType #if !NO_EXTENSIONTYPING | ProvidedField(amap,fi,m) -> Import.ImportProvidedTypeAsILType amap m (fi.PApply((fun fi -> fi.FieldType),m)) #endif @@ -1647,11 +1696,13 @@ type ILFieldInfo = /// Get the type of the field as an F# type member x.FieldType(amap,m) = match x with - | ILFieldInfo (tinfo,fdef) -> ImportILTypeFromMetadata amap m tinfo.ILScopeRef tinfo.TypeInst [] fdef.Type + | ILFieldInfo (tinfo,fdef) -> ImportILTypeFromMetadata amap m tinfo.ILScopeRef tinfo.TypeInstOfRawMetadata [] fdef.FieldType #if !NO_EXTENSIONTYPING | ProvidedField(amap,fi,m) -> Import.ImportProvidedType amap m (fi.PApply((fun fi -> fi.FieldType),m)) #endif + /// Tests whether two infos have the same underlying definition. + /// Must be compatible with ItemsAreEffectivelyEqual relation. static member ILFieldInfosUseIdenticalDefinitions x1 x2 = match x1,x2 with | ILFieldInfo(_, x1), ILFieldInfo(_, x2) -> (x1 === x2) @@ -1661,6 +1712,10 @@ type ILFieldInfo = #endif /// Get an (uninstantiated) reference to the field as an Abstract IL ILFieldRef member x.ILFieldRef = rescopeILFieldRef x.ScopeRef (mkILFieldRef(x.ILTypeRef,x.FieldName,x.ILFieldType)) + + /// Calculates a hash code of field info. Must be compatible with ItemsAreEffectivelyEqual relation. + member x.ComputeHashCode() = hash x.FieldName + override x.ToString() = x.FieldName @@ -1697,7 +1752,7 @@ type RecdFieldInfo = member x.FieldType = actualTyOfRecdFieldRef x.RecdFieldRef x.TypeInst /// Get the enclosing (declaring) type of the field in an F#-declared record, class or struct type - member x.EnclosingType = TType_app (x.RecdFieldRef.TyconRef,x.TypeInst) + member x.DeclaringType = TType_app (x.RecdFieldRef.TyconRef,x.TypeInst) override x.ToString() = x.TyconRef.ToString() + "::" + x.Name @@ -1735,26 +1790,37 @@ type UnionCaseInfo = type ILPropInfo = | ILPropInfo of ILTypeInfo * ILPropertyDef + /// Get the TcGlobals governing this value + member x.TcGlobals = match x with ILPropInfo(tinfo,_) -> tinfo.TcGlobals + /// Get the declaring IL type of the IL property, including any generic instantiation - member x.ILTypeInfo = match x with (ILPropInfo(tinfo,_)) -> tinfo + member x.ILTypeInfo = match x with ILPropInfo(tinfo,_) -> tinfo + + /// Get the apparent declaring type of the method as an F# type. + /// If this is a C#-style extension method then this is the type which the method + /// appears to extend. This may be a variable type. + member x.ApparentEnclosingType = match x with ILPropInfo(tinfo,_) -> tinfo.ToType + + /// Like ApparentEnclosingType but use the compiled nominal type if this is a method on a tuple type + member x.ApparentEnclosingAppType = convertToTypeWithMetadataIfPossible x.TcGlobals x.ApparentEnclosingType /// Get the raw Abstract IL metadata for the IL property - member x.RawMetadata = match x with (ILPropInfo(_,pd)) -> pd + member x.RawMetadata = match x with ILPropInfo(_,pd) -> pd /// Get the name of the IL property member x.PropertyName = x.RawMetadata.Name /// Gets the ILMethInfo of the 'get' method for the IL property - member x.GetterMethod(g) = + member x.GetterMethod = assert x.HasGetter let mdef = resolveILMethodRef x.ILTypeInfo.RawMetadata x.RawMetadata.GetMethod.Value - ILMethInfo(g,x.ILTypeInfo.ToType,None,mdef,[]) + ILMethInfo(x.TcGlobals,x.ILTypeInfo.ToType,None,mdef,[]) /// Gets the ILMethInfo of the 'set' method for the IL property - member x.SetterMethod(g) = + member x.SetterMethod = assert x.HasSetter let mdef = resolveILMethodRef x.ILTypeInfo.RawMetadata x.RawMetadata.SetMethod.Value - ILMethInfo(g,x.ILTypeInfo.ToType,None,mdef,[]) + ILMethInfo(x.TcGlobals,x.ILTypeInfo.ToType,None,mdef,[]) /// Indicates if the IL property has a 'get' method member x.HasGetter = Option.isSome x.RawMetadata.GetMethod @@ -1766,35 +1832,35 @@ type ILPropInfo = member x.IsStatic = (x.RawMetadata.CallingConv = ILThisConvention.Static) /// Indicates if the IL property is virtual - member x.IsVirtual(g) = - (x.HasGetter && x.GetterMethod(g).IsVirtual) || - (x.HasSetter && x.SetterMethod(g).IsVirtual) + member x.IsVirtual = + (x.HasGetter && x.GetterMethod.IsVirtual) || + (x.HasSetter && x.SetterMethod.IsVirtual) /// Indicates if the IL property is logically a 'newslot', i.e. hides any previous slots of the same name. - member x.IsNewSlot(g) = - (x.HasGetter && x.GetterMethod(g).IsNewSlot) || - (x.HasSetter && x.SetterMethod(g).IsNewSlot) + member x.IsNewSlot = + (x.HasGetter && x.GetterMethod.IsNewSlot) || + (x.HasSetter && x.SetterMethod.IsNewSlot) /// Get the names and types of the indexer arguments associated with the IL property. /// /// Any type parameters of the enclosing type are instantiated in the type returned. member x.GetParamNamesAndTypes(amap,m) = let (ILPropInfo (tinfo,pdef)) = x - pdef.Args |> List.map (fun ty -> ParamNameAndType(None, ImportILTypeFromMetadata amap m tinfo.ILScopeRef tinfo.TypeInst [] ty) ) + pdef.Args |> List.map (fun ty -> ParamNameAndType(None, ImportILTypeFromMetadata amap m tinfo.ILScopeRef tinfo.TypeInstOfRawMetadata [] ty) ) /// Get the types of the indexer arguments associated with the IL property. /// /// Any type parameters of the enclosing type are instantiated in the type returned. member x.GetParamTypes(amap,m) = let (ILPropInfo (tinfo,pdef)) = x - pdef.Args |> List.map (fun ty -> ImportILTypeFromMetadata amap m tinfo.ILScopeRef tinfo.TypeInst [] ty) + pdef.Args |> List.map (fun ty -> ImportILTypeFromMetadata amap m tinfo.ILScopeRef tinfo.TypeInstOfRawMetadata [] ty) /// Get the return type of the IL property. /// /// Any type parameters of the enclosing type are instantiated in the type returned. member x.GetPropertyType (amap,m) = let (ILPropInfo (tinfo,pdef)) = x - ImportILTypeFromMetadata amap m tinfo.ILScopeRef tinfo.TypeInst [] pdef.Type + ImportILTypeFromMetadata amap m tinfo.ILScopeRef tinfo.TypeInstOfRawMetadata [] pdef.PropertyType override x.ToString() = x.ILTypeInfo.ToString() + "::" + x.PropertyName @@ -1806,14 +1872,43 @@ type PropInfo = /// An F# use of a property backed by F#-declared metadata | FSProp of TcGlobals * TType * ValRef option * ValRef option /// An F# use of a property backed by Abstract IL metadata - | ILProp of TcGlobals * ILPropInfo + | ILProp of ILPropInfo #if !NO_EXTENSIONTYPING /// An F# use of a property backed by provided metadata | ProvidedProp of Import.ImportMap * Tainted * range #endif + /// Get the enclosing type of the property. + /// + /// If this is an extension member, then this is the apparent parent, i.e. the type the property appears to extend. + member x.ApparentEnclosingType = + match x with + | ILProp ilpinfo -> ilpinfo.ILTypeInfo.ToType + | FSProp(_,ty,_,_) -> ty +#if !NO_EXTENSIONTYPING + | ProvidedProp(amap,pi,m) -> + Import.ImportProvidedType amap m (pi.PApply((fun pi -> pi.DeclaringType),m)) +#endif + + /// Get the enclosing type of the method info, using a nominal type for tuple types + member x.ApparentEnclosingAppType = + match x with + | ILProp ilpinfo -> ilpinfo.ApparentEnclosingAppType + | _ -> x.ApparentEnclosingType + + member x.ApparentEnclosingTyconRef = tcrefOfAppTy x.TcGlobals x.ApparentEnclosingAppType + + /// Get the declaring type or module holding the method. + /// Note that C#-style extension properties don't exist in the C# design as yet. + /// If this is an F#-style extension method it is the logical module + /// holding the value for the extension method. + member x.DeclaringTyconRef = + match x.ArbitraryValRef with + | Some vref when x.IsExtensionMember && vref.HasDeclaringEntity -> vref.TopValDeclaringEntity + | _ -> x.ApparentEnclosingTyconRef + /// Try to get an arbitrary F# ValRef associated with the member. This is to determine if the member is virtual, amongst other things. - member x.ArbitraryValRef = + member x.ArbitraryValRef : ValRef option = match x with | FSProp(_,_,Some vref,_) | FSProp(_,_,_, Some vref) -> Some vref @@ -1833,7 +1928,7 @@ type PropInfo = /// Get the logical name of the property. member x.PropertyName = match x with - | ILProp(_,x) -> x.PropertyName + | ILProp ilpinfo -> ilpinfo.PropertyName | FSProp(_,_,Some vref,_) | FSProp(_,_,_, Some vref) -> vref.PropertyName #if !NO_EXTENSIONTYPING @@ -1844,7 +1939,7 @@ type PropInfo = /// Indicates if this property has an associated getter method. member x.HasGetter = match x with - | ILProp(_,x) -> x.HasGetter + | ILProp ilpinfo-> ilpinfo.HasGetter | FSProp(_,_,x,_) -> Option.isSome x #if !NO_EXTENSIONTYPING | ProvidedProp(_,pi,m) -> pi.PUntaint((fun pi -> pi.CanRead),m) @@ -1853,33 +1948,24 @@ type PropInfo = /// Indicates if this property has an associated setter method. member x.HasSetter = match x with - | ILProp(_,x) -> x.HasSetter + | ILProp ilpinfo -> ilpinfo.HasSetter | FSProp(_,_,_,x) -> Option.isSome x #if !NO_EXTENSIONTYPING | ProvidedProp(_,pi,m) -> pi.PUntaint((fun pi -> pi.CanWrite),m) #endif - /// Get the enclosing type of the property. - /// - /// If this is an extension member, then this is the apparent parent, i.e. the type the property appears to extend. - member x.EnclosingType = - match x with - | ILProp(_,x) -> x.ILTypeInfo.ToType - | FSProp(_,typ,_,_) -> typ -#if !NO_EXTENSIONTYPING - | ProvidedProp(amap,pi,m) -> - Import.ImportProvidedType amap m (pi.PApply((fun pi -> pi.DeclaringType),m)) -#endif /// Indicates if this is an extension member member x.IsExtensionMember = - match x.ArbitraryValRef with Some vref -> vref.IsExtensionMember | _ -> false + match x.ArbitraryValRef with + | Some vref -> vref.IsExtensionMember + | _ -> false /// True if the getter (or, if absent, the setter) is a virtual method // REVIEW: for IL properties this is getter OR setter. For F# properties it is getter ELSE setter member x.IsVirtualProperty = match x with - | ILProp(g,x) -> x.IsVirtual(g) + | ILProp ilpinfo -> ilpinfo.IsVirtual | FSProp(_,_,Some vref,_) | FSProp(_,_,_, Some vref) -> vref.IsVirtualMember | FSProp _-> failwith "unreachable" @@ -1892,7 +1978,7 @@ type PropInfo = /// Indicates if the property is logically a 'newslot', i.e. hides any previous slots of the same name. member x.IsNewSlot = match x with - | ILProp(g,x) -> x.IsNewSlot(g) + | ILProp ilpinfo -> ilpinfo.IsNewSlot | FSProp(_,_,Some vref,_) | FSProp(_,_,_, Some vref) -> vref.IsDispatchSlotMember | FSProp(_,_,None,None) -> failwith "unreachable" @@ -1907,10 +1993,10 @@ type PropInfo = // REVIEW: for IL properties this is getter OR setter. For F# properties it is getter ELSE setter member x.IsDispatchSlot = match x with - | ILProp(g,x) -> x.IsVirtual(g) - | FSProp(g,typ,Some vref,_) - | FSProp(g,typ,_, Some vref) -> - isInterfaceTy g typ || (vref.MemberInfo.Value.MemberFlags.IsDispatchSlot) + | ILProp ilpinfo -> ilpinfo.IsVirtual + | FSProp(g,ty,Some vref,_) + | FSProp(g,ty,_, Some vref) -> + isInterfaceTy g ty || (vref.MemberInfo.Value.MemberFlags.IsDispatchSlot) | FSProp _ -> failwith "unreachable" #if !NO_EXTENSIONTYPING | ProvidedProp(_,pi,m) -> @@ -1921,7 +2007,7 @@ type PropInfo = /// Indicates if this property is static. member x.IsStatic = match x with - | ILProp(_,x) -> x.IsStatic + | ILProp ilpinfo -> ilpinfo.IsStatic | FSProp(_,_,Some vref,_) | FSProp(_,_,_, Some vref) -> not vref.IsInstanceMember | FSProp(_,_,None,None) -> failwith "unreachable" @@ -1948,7 +2034,7 @@ type PropInfo = /// Indicates if this property is an indexer property, i.e. a property with arguments. member x.IsIndexer = match x with - | ILProp(_,ILPropInfo(_,pdef)) -> pdef.Args.Length <> 0 + | ILProp(ILPropInfo(_,pdef)) -> pdef.Args.Length <> 0 | FSProp(g,_,Some vref,_) -> // A getter has signature { OptionalObjectType } -> Unit -> PropertyType // A getter indexer has signature { OptionalObjectType } -> TupledIndexerArguments -> PropertyType @@ -1981,14 +2067,14 @@ type PropInfo = /// When checking consistency we split these apart member x.DropSetter = match x with - | FSProp(g,typ,Some vref,_) -> FSProp(g,typ,Some vref,None) + | FSProp(g,ty,Some vref,_) -> FSProp(g,ty,Some vref,None) | _ -> x /// Return a new property info where there is no associated getter, only an associated setter. member x.DropGetter = match x with - | FSProp(g,typ,_,Some vref) -> FSProp(g,typ,None,Some vref) + | FSProp(g,ty,_,Some vref) -> FSProp(g,ty,None,Some vref) | _ -> x /// Get the intra-assembly XML documentation for the property. @@ -2006,7 +2092,7 @@ type PropInfo = /// Get the TcGlobals associated with the object member x.TcGlobals = match x with - | ILProp(g,_) -> g + | ILProp ilpinfo -> ilpinfo.TcGlobals | FSProp(g,_,_,_) -> g #if !NO_EXTENSIONTYPING | ProvidedProp(amap,_,_) -> amap.g @@ -2015,16 +2101,17 @@ type PropInfo = /// Indicates if the enclosing type for the property is a value type. /// /// For an extension property, this indicates if the property extends a struct type. - member x.IsValueType = isStructTy x.TcGlobals x.EnclosingType + member x.IsValueType = isStructTy x.TcGlobals x.ApparentEnclosingType /// Get the result type of the property member x.GetPropertyType (amap,m) = match x with - | ILProp (_,ilpinfo) -> ilpinfo.GetPropertyType (amap,m) - | FSProp (g,typ,Some vref,_) - | FSProp (g,typ,_,Some vref) -> - let inst = GetInstantiationForPropertyVal g (typ,vref) + | ILProp ilpinfo -> ilpinfo.GetPropertyType (amap,m) + | FSProp (g,_,Some vref,_) + | FSProp (g,_,_,Some vref) -> + let ty = x.ApparentEnclosingAppType + let inst = GetInstantiationForPropertyVal g (ty,vref) ReturnTypeOfPropertyVal g vref.Deref |> instType inst | FSProp _ -> failwith "unreachable" @@ -2039,10 +2126,10 @@ type PropInfo = /// If the property is in a generic type, then the type parameters are instantiated in the types returned. member x.GetParamNamesAndTypes(amap,m) = match x with - | ILProp (_,ilpinfo) -> ilpinfo.GetParamNamesAndTypes(amap,m) - | FSProp (g,typ,Some vref,_) - | FSProp (g,typ,_,Some vref) -> - let inst = GetInstantiationForPropertyVal g (typ,vref) + | ILProp ilpinfo -> ilpinfo.GetParamNamesAndTypes(amap,m) + | FSProp (g,ty,Some vref,_) + | FSProp (g,ty,_,Some vref) -> + let inst = GetInstantiationForPropertyVal g (ty,vref) ArgInfosOfPropertyVal g vref.Deref |> List.map (ParamNameAndType.FromArgInfo >> ParamNameAndType.Instantiate inst) | FSProp _ -> failwith "unreachable" #if !NO_EXTENSIONTYPING @@ -2056,7 +2143,7 @@ type PropInfo = /// Get the details of the indexer parameters associated with the property member x.GetParamDatas(amap,m) = x.GetParamNamesAndTypes(amap,m) - |> List.map (fun (ParamNameAndType(nmOpt,pty)) -> ParamData(false, false, NotOptional, NoCallerInfo, nmOpt, ReflectedArgInfo.None, pty)) + |> List.map (fun (ParamNameAndType(nmOpt,pty)) -> ParamData(false, false, false, NotOptional, NoCallerInfo, nmOpt, ReflectedArgInfo.None, pty)) /// Get the types of the indexer parameters associated with the property member x.GetParamTypes(amap,m) = @@ -2065,8 +2152,8 @@ type PropInfo = /// Get a MethInfo for the 'getter' method associated with the property member x.GetterMethod = match x with - | ILProp(g,x) -> ILMeth(g,x.GetterMethod(g),None) - | FSProp(g,typ,Some vref,_) -> FSMeth(g,typ,vref,None) + | ILProp ilpinfo -> ILMeth(x.TcGlobals, ilpinfo.GetterMethod, None) + | FSProp(g,ty,Some vref,_) -> FSMeth(g,ty,vref,None) #if !NO_EXTENSIONTYPING | ProvidedProp(amap,pi,m) -> let meth = GetAndSanityCheckProviderMethod m pi (fun pi -> pi.GetGetMethod()) FSComp.SR.etPropertyCanReadButHasNoGetter @@ -2078,8 +2165,8 @@ type PropInfo = /// Get a MethInfo for the 'setter' method associated with the property member x.SetterMethod = match x with - | ILProp(g,x) -> ILMeth(g,x.SetterMethod(g),None) - | FSProp(g,typ,_,Some vref) -> FSMeth(g,typ,vref,None) + | ILProp ilpinfo -> ILMeth(x.TcGlobals, ilpinfo.SetterMethod, None) + | FSProp(g,ty,_,Some vref) -> FSMeth(g,ty,vref,None) #if !NO_EXTENSIONTYPING | ProvidedProp(amap,pi,m) -> let meth = GetAndSanityCheckProviderMethod m pi (fun pi -> pi.GetSetMethod()) FSComp.SR.etPropertyCanWriteButHasNoSetter @@ -2088,15 +2175,15 @@ type PropInfo = | FSProp _ -> failwith "no setter method" /// Test whether two property infos have the same underlying definition. - /// /// Uses the same techniques as 'MethInfosUseIdenticalDefinitions'. + /// Must be compatible with ItemsAreEffectivelyEqual relation. static member PropInfosUseIdenticalDefinitions x1 x2 = let optVrefEq g = function | Some(v1), Some(v2) -> valRefEq g v1 v2 | None, None -> true | _ -> false match x1,x2 with - | ILProp(_, x1), ILProp(_, x2) -> (x1.RawMetadata === x2.RawMetadata) + | ILProp ilpinfo1, ILProp ilpinfo2 -> (ilpinfo1.RawMetadata === ilpinfo2.RawMetadata) | FSProp(g, _, vrefa1, vrefb1), FSProp(_, _, vrefa2, vrefb2) -> (optVrefEq g (vrefa1, vrefa2)) && (optVrefEq g (vrefb1, vrefb2)) #if !NO_EXTENSIONTYPING @@ -2104,10 +2191,10 @@ type PropInfo = #endif | _ -> false - /// Calculates a hash code of property info (similar as previous) + /// Calculates a hash code of property info. Must be compatible with ItemsAreEffectivelyEqual relation. member pi.ComputeHashCode() = match pi with - | ILProp(_, x1) -> hash x1.RawMetadata.Name + | ILProp ilpinfo -> hash ilpinfo.RawMetadata.Name | FSProp(_,_,vrefOpt1, vrefOpt2) -> // Hash on option*option let vth = (vrefOpt1 |> Option.map (fun vr -> vr.LogicalName), (vrefOpt2 |> Option.map (fun vr -> vr.LogicalName))) @@ -2125,21 +2212,32 @@ type PropInfo = type ILEventInfo = | ILEventInfo of ILTypeInfo * ILEventDef + /// Get the enclosing ("parent"/"declaring") type of the field. + member x.ApparentEnclosingType = match x with ILEventInfo(tinfo,_) -> tinfo.ToType + + // Note: events are always associated with nominal types + member x.ApparentEnclosingAppType = x.ApparentEnclosingType + + // Note: IL Events are never extension members as C# has no notion of extension events as yet + member x.DeclaringTyconRef = tcrefOfAppTy x.TcGlobals x.ApparentEnclosingAppType + + member x.TcGlobals = match x with ILEventInfo(tinfo,_) -> tinfo.TcGlobals + /// Get the raw Abstract IL metadata for the event - member x.RawMetadata = match x with (ILEventInfo(_,ed)) -> ed + member x.RawMetadata = match x with ILEventInfo(_,ed) -> ed /// Get the declaring IL type of the event as an ILTypeInfo - member x.ILTypeInfo = match x with (ILEventInfo(tinfo,_)) -> tinfo + member x.ILTypeInfo = match x with ILEventInfo(tinfo,_) -> tinfo /// Get the ILMethInfo describing the 'add' method associated with the event - member x.AddMethod(g) = + member x.AddMethod = let mdef = resolveILMethodRef x.ILTypeInfo.RawMetadata x.RawMetadata.AddMethod - ILMethInfo(g,x.ILTypeInfo.ToType,None,mdef,[]) + ILMethInfo(x.TcGlobals,x.ILTypeInfo.ToType,None,mdef,[]) /// Get the ILMethInfo describing the 'remove' method associated with the event - member x.RemoveMethod(g) = + member x.RemoveMethod = let mdef = resolveILMethodRef x.ILTypeInfo.RawMetadata x.RawMetadata.RemoveMethod - ILMethInfo(g,x.ILTypeInfo.ToType,None,mdef,[]) + ILMethInfo(x.TcGlobals,x.ILTypeInfo.ToType,None,mdef,[]) /// Get the declaring type of the event as an ILTypeRef member x.TypeRef = x.ILTypeInfo.ILTypeRef @@ -2148,7 +2246,7 @@ type ILEventInfo = member x.Name = x.RawMetadata.Name /// Indicates if the property is static - member x.IsStatic(g) = x.AddMethod(g).IsStatic + member x.IsStatic = x.AddMethod.IsStatic override x.ToString() = x.ILTypeInfo.ToString() + "::" + x.Name //------------------------------------------------------------------------- @@ -2190,7 +2288,7 @@ type EventInfo = /// An F# use of an event backed by F#-declared metadata | FSEvent of TcGlobals * PropInfo * ValRef * ValRef /// An F# use of an event backed by .NET metadata - | ILEvent of TcGlobals * ILEventInfo + | ILEvent of ILEventInfo #if !NO_EXTENSIONTYPING /// An F# use of an event backed by provided metadata | ProvidedEvent of Import.ImportMap * Tainted * range @@ -2199,13 +2297,30 @@ type EventInfo = /// Get the enclosing type of the event. /// /// If this is an extension member, then this is the apparent parent, i.e. the type the event appears to extend. - member x.EnclosingType = + member x.ApparentEnclosingType = match x with - | ILEvent(_,e) -> e.ILTypeInfo.ToType - | FSEvent (_,p,_,_) -> p.EnclosingType + | ILEvent ileinfo -> ileinfo.ApparentEnclosingType + | FSEvent (_,p,_,_) -> p.ApparentEnclosingType #if !NO_EXTENSIONTYPING | ProvidedEvent (amap,ei,m) -> Import.ImportProvidedType amap m (ei.PApply((fun ei -> ei.DeclaringType),m)) #endif + /// Get the enclosing type of the method info, using a nominal type for tuple types + member x.ApparentEnclosingAppType = + match x with + | ILEvent ileinfo -> ileinfo.ApparentEnclosingAppType + | _ -> x.ApparentEnclosingType + + member x.ApparentEnclosingTyconRef = tcrefOfAppTy x.TcGlobals x.ApparentEnclosingAppType + + /// Get the declaring type or module holding the method. + /// Note that C#-style extension properties don't exist in the C# design as yet. + /// If this is an F#-style extension method it is the logical module + /// holding the value for the extension method. + member x.DeclaringTyconRef = + match x.ArbitraryValRef with + | Some vref when x.IsExtensionMember && vref.HasDeclaringEntity -> vref.TopValDeclaringEntity + | _ -> x.ApparentEnclosingTyconRef + /// Indicates if this event has an associated XML comment authored in this assembly. member x.HasDirectXmlComment = @@ -2229,7 +2344,7 @@ type EventInfo = /// Get the logical name of the event. member x.EventName = match x with - | ILEvent(_,e) -> e.Name + | ILEvent ileinfo -> ileinfo.Name | FSEvent (_,p,_,_) -> p.PropertyName #if !NO_EXTENSIONTYPING | ProvidedEvent (_,ei,m) -> ei.PUntaint((fun ei -> ei.Name), m) @@ -2238,7 +2353,7 @@ type EventInfo = /// Indicates if this property is static. member x.IsStatic = match x with - | ILEvent(g,e) -> e.IsStatic(g) + | ILEvent ileinfo -> ileinfo.IsStatic | FSEvent (_,p,_,_) -> p.IsStatic #if !NO_EXTENSIONTYPING | ProvidedEvent (_,ei,m) -> @@ -2246,10 +2361,19 @@ type EventInfo = meth.PUntaint((fun mi -> mi.IsStatic), m) #endif + /// Indicates if this is an extension member + member x.IsExtensionMember = + match x with + | ILEvent _ -> false + | FSEvent (_,p,_,_) -> p.IsExtensionMember +#if !NO_EXTENSIONTYPING + | ProvidedEvent _ -> false +#endif + /// Get the TcGlobals associated with the object member x.TcGlobals = match x with - | ILEvent(g,_) -> g + | ILEvent ileinfo -> ileinfo.TcGlobals | FSEvent(g,_,_,_) -> g #if !NO_EXTENSIONTYPING | ProvidedEvent (amap,_,_) -> amap.g @@ -2258,13 +2382,13 @@ type EventInfo = /// Indicates if the enclosing type for the event is a value type. /// /// For an extension event, this indicates if the event extends a struct type. - member x.IsValueType = isStructTy x.TcGlobals x.EnclosingType + member x.IsValueType = isStructTy x.TcGlobals x.ApparentEnclosingType /// Get the 'add' method associated with an event - member x.GetAddMethod() = + member x.AddMethod = match x with - | ILEvent(g,e) -> ILMeth(g,e.AddMethod(g),None) - | FSEvent(g,p,addValRef,_) -> FSMeth(g,p.EnclosingType,addValRef,None) + | ILEvent ileinfo -> ILMeth(ileinfo.TcGlobals, ileinfo.AddMethod, None) + | FSEvent(g,p,addValRef,_) -> FSMeth(g,p.ApparentEnclosingType,addValRef,None) #if !NO_EXTENSIONTYPING | ProvidedEvent (amap,ei,m) -> let meth = GetAndSanityCheckProviderMethod m ei (fun ei -> ei.GetAddMethod()) FSComp.SR.etEventNoAdd @@ -2272,10 +2396,10 @@ type EventInfo = #endif /// Get the 'remove' method associated with an event - member x.GetRemoveMethod() = + member x.RemoveMethod = match x with - | ILEvent(g,e) -> ILMeth(g,e.RemoveMethod(g),None) - | FSEvent(g,p,_,removeValRef) -> FSMeth(g,p.EnclosingType,removeValRef,None) + | ILEvent ileinfo -> ILMeth(x.TcGlobals, ileinfo.RemoveMethod, None) + | FSEvent(g,p,_,removeValRef) -> FSMeth(g,p.ApparentEnclosingType,removeValRef,None) #if !NO_EXTENSIONTYPING | ProvidedEvent (amap,ei,m) -> let meth = GetAndSanityCheckProviderMethod m ei (fun ei -> ei.GetRemoveMethod()) FSComp.SR.etEventNoRemove @@ -2283,7 +2407,7 @@ type EventInfo = #endif /// Try to get an arbitrary F# ValRef associated with the member. This is to determine if the member is virtual, amongst other things. - member x.ArbitraryValRef = + member x.ArbitraryValRef: ValRef option = match x with | FSEvent(_,_,addValRef,_) -> Some addValRef | _ -> None @@ -2291,11 +2415,11 @@ type EventInfo = /// Get the delegate type associated with the event. member x.GetDelegateType(amap,m) = match x with - | ILEvent(_,ILEventInfo(tinfo,edef)) -> + | ILEvent(ILEventInfo(tinfo,edef)) -> // Get the delegate type associated with an IL event, taking into account the instantiation of the // declaring type. - if Option.isNone edef.Type then error (nonStandardEventError x.EventName m) - ImportILTypeFromMetadata amap m tinfo.ILScopeRef tinfo.TypeInst [] edef.Type.Value + if Option.isNone edef.EventType then error (nonStandardEventError x.EventName m) + ImportILTypeFromMetadata amap m tinfo.ILScopeRef tinfo.TypeInstOfRawMetadata [] edef.EventType.Value | FSEvent(g,p,_,_) -> FindDelegateTypeOfPropertyEvent g amap x.EventName m (p.GetPropertyType(amap,m)) @@ -2306,20 +2430,22 @@ type EventInfo = /// Test whether two event infos have the same underlying definition. + /// Must be compatible with ItemsAreEffectivelyEqual relation. static member EventInfosUseIdenticalDefintions x1 x2 = match x1, x2 with | FSEvent(g, pi1, vrefa1, vrefb1), FSEvent(_, pi2, vrefa2, vrefb2) -> PropInfo.PropInfosUseIdenticalDefinitions pi1 pi2 && valRefEq g vrefa1 vrefa2 && valRefEq g vrefb1 vrefb2 - | ILEvent(_, x1), ILEvent(_, x2) -> (x1.RawMetadata === x2.RawMetadata) + | ILEvent ileinfo1, ILEvent ileinfo2 -> (ileinfo1.RawMetadata === ileinfo2.RawMetadata) #if !NO_EXTENSIONTYPING | ProvidedEvent (_,ei1,_), ProvidedEvent (_,ei2,_) -> ProvidedEventInfo.TaintedEquals (ei1, ei2) #endif | _ -> false /// Calculates a hash code of event info (similar as previous) + /// Must be compatible with ItemsAreEffectivelyEqual relation. member ei.ComputeHashCode() = match ei with - | ILEvent(_, x1) -> hash x1.RawMetadata.Name + | ILEvent ileinfo -> hash ileinfo.RawMetadata.Name | FSEvent(_, pi, vref1, vref2) -> hash ( pi.ComputeHashCode(), vref1.LogicalName, vref2.LogicalName) #if !NO_EXTENSIONTYPING | ProvidedEvent (_,ei,_) -> ProvidedEventInfo.TaintedGetHashCode(ei) @@ -2345,7 +2471,7 @@ let CompiledSigOfMeth g amap m (minfo:MethInfo) = // of the enclosing type. For example, they may have constraints involving the _formal_ type parameters // of the enclosing type. This instantiations can be used to interpret those type parameters let fmtpinst = - let parentTyArgs = argsOfAppTy g minfo.EnclosingType + let parentTyArgs = argsOfAppTy g minfo.ApparentEnclosingAppType let memberParentTypars = minfo.GetFormalTyparsOfDeclaringType m mkTyparInst memberParentTypars parentTyArgs diff --git a/src/fsharp/layout.fs b/src/fsharp/layout.fs index 4b857113131..0a59e85582a 100644 --- a/src/fsharp/layout.fs +++ b/src/fsharp/layout.fs @@ -10,15 +10,9 @@ open Microsoft.FSharp.Core.Printf #nowarn "62" // This construct is for ML compatibility. -#if COMPILER_PUBLIC_API type layout = Internal.Utilities.StructuredFormat.Layout type LayoutTag = Internal.Utilities.StructuredFormat.LayoutTag type TaggedText = Internal.Utilities.StructuredFormat.TaggedText -#else -type internal layout = Internal.Utilities.StructuredFormat.Layout -type internal LayoutTag = Internal.Utilities.StructuredFormat.LayoutTag -type internal TaggedText = Internal.Utilities.StructuredFormat.TaggedText -#endif type NavigableTaggedText(taggedText: TaggedText, range: Range.range) = member val Range = range diff --git a/src/fsharp/layout.fsi b/src/fsharp/layout.fsi index 1db59647ff7..e2d1bcc7a3b 100644 --- a/src/fsharp/layout.fsi +++ b/src/fsharp/layout.fsi @@ -1,10 +1,6 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -#if COMPILER_PUBLIC_API module public Microsoft.FSharp.Compiler.Layout -#else -module internal Microsoft.FSharp.Compiler.Layout -#endif open System.Text open System.Collections.Generic diff --git a/src/fsharp/lex.fsl b/src/fsharp/lex.fsl index cffda3b3ccb..f3842f908e2 100644 --- a/src/fsharp/lex.fsl +++ b/src/fsharp/lex.fsl @@ -238,6 +238,8 @@ rule token args skip = parse { YIELD_BANG(true) } | "return!" { YIELD_BANG(false) } + | "match!" + { MATCH_BANG } | ident '!' { let tok = Keywords.KeywordOrIdentifierToken args lexbuf (lexemeTrimRight lexbuf 1) match tok with diff --git a/src/fsharp/lexhelp.fs b/src/fsharp/lexhelp.fs index 6f0c26c2f7b..b7603baf15f 100644 --- a/src/fsharp/lexhelp.fs +++ b/src/fsharp/lexhelp.fs @@ -43,7 +43,7 @@ type LightSyntaxStatus(initial:bool,warn:bool) = /// Manage lexer resources (string interning) [] type LexResourceManager() = - let strings = new System.Collections.Generic.Dictionary(100) + let strings = new System.Collections.Generic.Dictionary(1024) member x.InternIdentifierToken(s) = let mutable res = Unchecked.defaultof<_> let ok = strings.TryGetValue(s, &res) @@ -355,7 +355,10 @@ module Keywords = /// Quote identifier with double backticks if needed, remove unnecessary double backticks quotation. let NormalizeIdentifierBackticks (s : string) : string = - let s = if s.StartsWith "``" && s.EndsWith "``" then s.[2..s.Length - 3] else s + let s = + if s.StartsWithOrdinal("``") && s.EndsWithOrdinal("``") then + s.[2..s.Length - 3] + else s QuoteIdentifierIfNeeded s /// Keywords paired with their descriptions. Used in completion and quick info. @@ -394,6 +397,7 @@ module Keywords = "let", FSComp.SR.keywordDescriptionLet() "let!", FSComp.SR.keywordDescriptionLetBang() "match", FSComp.SR.keywordDescriptionMatch() + "match!", FSComp.SR.keywordDescriptionMatchBang() "member", FSComp.SR.keywordDescriptionMember() "module", FSComp.SR.keywordDescriptionModule() "mutable", FSComp.SR.keywordDescriptionMutable() diff --git a/src/fsharp/lib.fs b/src/fsharp/lib.fs index ac44bd844ce..18404ba377d 100755 --- a/src/fsharp/lib.fs +++ b/src/fsharp/lib.fs @@ -16,8 +16,8 @@ let verbose = false let progress = ref false let tracking = ref false // intended to be a general hook to control diagnostic output when tracking down bugs -let condition _s = - try (System.Environment.GetEnvironmentVariable(_s) <> null) with _ -> false +let condition s = + try (System.Environment.GetEnvironmentVariable(s) <> null) with _ -> false let GetEnvInteger e dflt = match System.Environment.GetEnvironmentVariable(e) with null -> dflt | t -> try int t with _ -> dflt @@ -155,7 +155,7 @@ module IntMap = // Library: generalized association lists //------------------------------------------------------------------------ -module ListAssoc = +module ListAssoc = /// Treat a list of key-value pairs as a lookup collection. /// This function looks up a value based on a match from the supplied @@ -166,12 +166,12 @@ module ListAssoc = | (x',y)::t -> if f x x' then y else find f x t /// Treat a list of key-value pairs as a lookup collection. - /// This function returns true if two keys are the same according to the predicate - /// function passed in. - let rec containsKey (f:'key->'key->bool) (x:'key) (l:('key*'value) list) : bool = - match l with - | [] -> false - | (x',_y)::t -> f x x' || containsKey f x t + /// This function looks up a value based on a match from the supplied + /// predicate function and returns None if value does not exist. + let rec tryFind (f:'key->'key->bool) (x:'key) (l:('key*'value) list) : 'value option = + match l with + | [] -> None + | (x',y)::t -> if f x x' then Some y else tryFind f x t //------------------------------------------------------------------------- // Library: lists as generalized sets @@ -226,9 +226,25 @@ module ListSet = | (h::t) -> if contains f h l1 then h::intersect f l1 t else intersect f l1 t | [] -> [] - (* NOTE: quadratic! *) // Note: if duplicates appear, keep the ones toward the _front_ of the list - let setify f l = List.foldBack (insert f) (List.rev l) [] |> List.rev + let setify f l = List.fold (fun acc x -> insert f x acc) [] l |> List.rev + + let hasDuplicates f l = + match l with + | [] -> false + | [_] -> false + | [x; y] -> f x y + | x::rest -> + let rec loop acc l = + match l with + | [] -> false + | x::rest -> + if contains f x acc then + true + else + loop (x::acc) rest + + loop [x] rest //------------------------------------------------------------------------- // Library: pairs diff --git a/src/fsharp/pars.fsy b/src/fsharp/pars.fsy index c36b1886418..9ca12c58e5f 100644 --- a/src/fsharp/pars.fsy +++ b/src/fsharp/pars.fsy @@ -193,7 +193,7 @@ let rangeOfLongIdent(lid:LongIdent) = %token BAR_BAR UPCAST DOWNCAST NULL RESERVED MODULE NAMESPACE DELEGATE CONSTRAINT BASE %token AND AS ASSERT OASSERT ASR BEGIN DO DONE DOWNTO ELSE ELIF END DOT_DOT %token EXCEPTION FALSE FOR FUN FUNCTION IF IN JOIN_IN FINALLY DO_BANG -%token LAZY OLAZY MATCH MUTABLE NEW OF +%token LAZY OLAZY MATCH MATCH_BANG MUTABLE NEW OF %token OPEN OR REC THEN TO TRUE TRY TYPE VAL INLINE INTERFACE INSTANCE CONST %token WHEN WHILE WITH HASH AMP AMP_AMP QUOTE LPAREN RPAREN RPAREN_COMING_SOON RPAREN_IS_HERE STAR COMMA RARROW GREATER_BAR_RBRACK LPAREN_STAR_RPAREN %token QMARK QMARK_QMARK DOT COLON COLON_COLON COLON_GREATER COLON_QMARK_GREATER COLON_QMARK COLON_EQUALS SEMICOLON @@ -3044,12 +3044,23 @@ declExpr: { let mMatch = (rhs parseState 1) let mWith,(clauses,mLast) = $3 let spBind = SequencePointAtBinding(unionRanges mMatch mWith) - SynExpr.Match(spBind, $2,clauses,false,unionRanges mMatch mLast) } + SynExpr.Match(spBind, $2,clauses,unionRanges mMatch mLast) } | MATCH typedSeqExpr recover %prec expr_match { if not $3 then reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnexpectedEndOfFileMatch()) // Produce approximate expression during error recovery exprFromParseError $2 } + + | MATCH_BANG typedSeqExpr withClauses %prec expr_match + { let mMatch = (rhs parseState 1) + let mWith,(clauses,mLast) = $3 + let spBind = SequencePointAtBinding(unionRanges mMatch mWith) + SynExpr.MatchBang(spBind, $2,clauses,unionRanges mMatch mLast) } + + | MATCH_BANG typedSeqExpr recover %prec expr_match + { if not $3 then reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnexpectedEndOfFileMatch()) + // Produce approximate expression during error recovery + exprFromParseError $2 } | TRY typedSeqExprBlockR withClauses %prec expr_try { let mTry = (rhs parseState 1) @@ -3489,71 +3500,86 @@ ifExprThen: ifExprElifs: | { None } + | ELSE declExpr { Some $2 } + | OELSE OBLOCKBEGIN typedSeqExpr oblockend { Some $3 } + | OELSE OBLOCKBEGIN typedSeqExpr recover { if not $4 then reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnexpectedEndOfFileElse()) Some (exprFromParseError $3) } + | ELIF declExpr ifExprCases { let mElif = rhs parseState 1 Some ($3 $2 mElif) } + | ELIF declExpr recover { Some (exprFromParseError $2) } tupleExpr: | tupleExpr COMMA declExpr { let exprs,commas = $1 in ($3 :: exprs),((rhs parseState 2)::commas) } + | tupleExpr COMMA ends_coming_soon_or_recover { if not $3 then reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsExpectedExpressionAfterToken()) let exprs,commas = $1 let zeroWidthAtNextToken = (rhs parseState 3).StartRange ((arbExpr("tupleExpr1",zeroWidthAtNextToken)) :: exprs), (rhs parseState 2)::commas } + | declExpr COMMA ends_coming_soon_or_recover { if not $3 then reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsExpectedExpressionAfterToken()) let zeroWidthAtNextToken = (rhs parseState 3).StartRange ((arbExpr("tupleExpr2",zeroWidthAtNextToken)) :: [$1]), [rhs parseState 2] } + | declExpr COMMA declExpr { [$3 ; $1], [rhs parseState 2] } minusExpr: | MINUS minusExpr %prec expr_prefix_plus_minus { mkSynPrefix (rhs parseState 1) (unionRanges (rhs parseState 1) $2.Range) "~-" $2 } + | PLUS_MINUS_OP minusExpr { if not (IsValidPrefixOperatorUse $1) then reportParseErrorAt $2.Range (FSComp.SR.parsInvalidPrefixOperator()) mkSynPrefix (rhs parseState 1) (unionRanges (rhs parseState 1) $2.Range) ("~"^($1)) $2 } + | ADJACENT_PREFIX_OP minusExpr { if not (IsValidPrefixOperatorUse $1) then reportParseErrorAt $2.Range (FSComp.SR.parsInvalidPrefixOperator()) - if $1 = "&" then - SynExpr.AddressOf(true,$2,rhs parseState 1,unionRanges (rhs parseState 1) $2.Range) - elif $1 = "&&" then - SynExpr.AddressOf(false,$2,rhs parseState 1,unionRanges (rhs parseState 1) $2.Range) - else - mkSynPrefix (rhs parseState 1) (unionRanges (rhs parseState 1) $2.Range) ("~"^($1)) $2 } + mkSynPrefix (rhs parseState 1) (unionRanges (rhs parseState 1) $2.Range) ("~"^($1)) $2 } + | PERCENT_OP minusExpr { if not (IsValidPrefixOperatorUse $1) then reportParseErrorAt $2.Range (FSComp.SR.parsInvalidPrefixOperator()) mkSynPrefix (rhs parseState 1) (unionRanges (rhs parseState 1) $2.Range) ("~"^($1)) $2 } + | AMP minusExpr { SynExpr.AddressOf(true,$2,rhs parseState 1,unionRanges (rhs parseState 1) $2.Range) } + | AMP_AMP minusExpr { SynExpr.AddressOf(false,$2,rhs parseState 1, unionRanges (rhs parseState 1) $2.Range) } + | NEW appTypeNonAtomicDeprecated opt_HIGH_PRECEDENCE_APP atomicExprAfterType { SynExpr.New(false,$2,$4,unionRanges (rhs parseState 1) $4.Range) } + | NEW appTypeNonAtomicDeprecated opt_HIGH_PRECEDENCE_APP error { SynExpr.New(false,$2,arbExpr("minusExpr",(rhs parseState 4)),unionRanges (rhs parseState 1) ($2).Range) } + | NEW error { arbExpr("minusExpr2",(rhs parseState 1)) } + | UPCAST minusExpr { SynExpr.InferredUpcast($2,unionRanges (rhs parseState 1) $2.Range) } + | DOWNCAST minusExpr { SynExpr.InferredDowncast($2,unionRanges (rhs parseState 1) $2.Range)} + | appExpr { $1 } appExpr: | appExpr argExpr %prec expr_app { SynExpr.App (ExprAtomicFlag.NonAtomic, false, $1,$2,unionRanges $1.Range $2.Range) } + | atomicExpr { let arg,_ = $1 arg } @@ -3564,12 +3590,12 @@ argExpr: if not (IsValidPrefixOperatorUse $1) then reportParseErrorAt arg2.Range (FSComp.SR.parsInvalidPrefixOperator()) if hpa2 then reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsSuccessiveArgsShouldBeSpacedOrTupled()) mkSynPrefix (rhs parseState 1) (unionRanges (rhs parseState 1) arg2.Range) ("~"^($1)) arg2 } + | atomicExpr { let arg,hpa = $1 if hpa then reportParseErrorAt arg.Range (FSComp.SR.parsSuccessiveArgsShouldBeSpacedOrTupled()) arg } - atomicExpr: | atomicExpr HIGH_PRECEDENCE_BRACK_APP atomicExpr { let arg1,_ = $1 @@ -3590,40 +3616,52 @@ atomicExpr: | PREFIX_OP atomicExpr { let arg2,hpa2 = $2 if not (IsValidPrefixOperatorUse $1) then reportParseErrorAt arg2.Range (FSComp.SR.parsInvalidPrefixOperator()) - mkSynPrefix (rhs parseState 1) (unionRanges (rhs parseState 1) arg2.Range) $1 arg2,hpa2 } + mkSynPrefixPrim (rhs parseState 1) (unionRanges (rhs parseState 1) arg2.Range) $1 arg2,hpa2 } | atomicExpr DOT atomicExprQualification { let arg1,hpa1 = $1 $3 arg1 (lhs parseState) (rhs parseState 2),hpa1 } + | BASE DOT atomicExprQualification { let arg1 = SynExpr.Ident(ident("base",rhs parseState 1)) $3 arg1 (lhs parseState) (rhs parseState 2),false } + | QMARK nameop { SynExpr.LongIdent (true,LongIdentWithDots([$2],[]),None,rhs parseState 2),false } + | atomicExpr QMARK dynamicArg { let arg1,hpa1 = $1 mkSynInfix (rhs parseState 2) arg1 "?" $3, hpa1 } + | GLOBAL { SynExpr.Ident (ident(MangledGlobalName,rhs parseState 1)), false } + | nameop { SynExpr.Ident ($1),false } + | LBRACK listExprElements RBRACK { $2 (lhs parseState) false,false } + | LBRACK listExprElements recover { reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnmatchedBracket()) exprFromParseError ($2 (rhs2 parseState 1 2) false), false } + | LBRACK error RBRACK { // silent recovery SynExpr.ArrayOrList(false,[ ], lhs parseState),false } + | LBRACK recover { reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnmatchedBracket()) // silent recovery exprFromParseError (SynExpr.ArrayOrList(false,[ ], rhs parseState 1)),false } + | STRUCT LPAREN tupleExpr rparen { let exprs,commas = $3 in SynExpr.StructTuple(List.rev exprs, List.rev commas, (commas.Head, exprs) ||> unionRangeWithListBy (fun e -> e.Range) ), false } + | STRUCT LPAREN tupleExpr recover { reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsUnmatchedBracket()); let exprs,commas = $3 in SynExpr.StructTuple(List.rev exprs, List.rev commas, (commas.Head, exprs) ||> unionRangeWithListBy (fun e -> e.Range) ), false } + | atomicExprAfterType { $1,false } @@ -3631,6 +3669,13 @@ atomicExprQualification: | identOrOp { let idm = rhs parseState 1 (fun e lhsm dotm -> mkSynDot dotm lhsm e $1) } + + | GLOBAL + { (fun e lhsm dotm -> + reportParseErrorAt (rhs parseState 3) (FSComp.SR.nrGlobalUsedOnlyAsFirstName()) + let fixedLhsm = mkRange lhsm.FileName lhsm.Start dotm.End // previous lhsm is wrong after 'recover' + mkSynDotMissing dotm fixedLhsm e) } + | /* empty */ { (fun e lhsm dotm -> reportParseErrorAt dotm (FSComp.SR.parsMissingQualificationAfterDot()) @@ -3682,12 +3727,16 @@ optRangeSeqExpr: optRange: | declExpr DOT_DOT declExpr { SynIndexerArg.Two(mkSynOptionalExpr (rhs parseState 1) (Some $1), mkSynOptionalExpr (rhs parseState 3) (Some $3)) } + | declExpr DOT_DOT { SynIndexerArg.Two(mkSynOptionalExpr (rhs parseState 1) (Some $1), mkSynOptionalExpr (rhs parseState 2) None) } + | DOT_DOT declExpr { SynIndexerArg.Two(mkSynOptionalExpr (rhs parseState 1) None, mkSynOptionalExpr (rhs parseState 2) (Some $2)) } + | STAR { SynIndexerArg.Two(mkSynOptionalExpr (rhs parseState 1) None, mkSynOptionalExpr (rhs parseState 1) None) } + | declExpr %prec slice_expr { SynIndexerArg.One($1) } diff --git a/src/fsharp/range.fs b/src/fsharp/range.fs index aed660be56c..8649b700867 100755 --- a/src/fsharp/range.fs +++ b/src/fsharp/range.fs @@ -3,6 +3,7 @@ /// Anything to do with special names of identifiers and other lexical rules module Microsoft.FSharp.Compiler.Range +open System open System.IO open System.Collections.Generic open Microsoft.FSharp.Core.Printf @@ -45,6 +46,7 @@ type pos(code:int32) = static member Decode (code:int32) : pos = pos code override p.Equals(obj) = match obj with :? pos as p2 -> code = p2.Encoding | _ -> false override p.GetHashCode() = hash code + override p.ToString() = sprintf "(%d,%d)" p.Line p.Column [] let fileIndexBitCount = 14 @@ -140,7 +142,11 @@ let fileOfFileIndex n = fileIndexTable.IndexToFile(n) let mkPos l c = pos (l, c) [] +#if DEBUG +[ {DebugCode}")>] +#else [] +#endif type range(code:int64) = static member Zero = range(0L) new (fidx, bl, bc, el, ec) = @@ -163,6 +169,19 @@ type range(code:int64) = member m.StartRange = range (m.FileIndex, m.Start, m.Start) member m.EndRange = range (m.FileIndex, m.End, m.End) member r.FileName = fileOfFileIndex r.FileIndex +#if DEBUG + member r.DebugCode = + try + let endCol = r.EndColumn - 1 + let startCol = r.StartColumn - 1 + File.ReadAllLines(r.FileName) + |> Seq.skip (r.StartLine - 1) + |> Seq.take (r.EndLine - r.StartLine + 1) + |> String.concat "\n" + |> fun s -> s.Substring(startCol + 1, s.LastIndexOf("\n", StringComparison.Ordinal) + 1 - startCol + endCol) + with e -> + e.ToString() +#endif member r.MakeSynthetic() = range(code ||| isSyntheticMask) override r.ToString() = sprintf "%s (%d,%d--%d,%d) IsSynthetic=%b" r.FileName r.StartLine r.StartColumn r.EndLine r.EndColumn r.IsSynthetic member r.ToShortString() = sprintf "(%d,%d--%d,%d)" r.StartLine r.StartColumn r.EndLine r.EndColumn diff --git a/src/fsharp/range.fsi b/src/fsharp/range.fsi index 8384c6ee666..c3805f4659a 100755 --- a/src/fsharp/range.fsi +++ b/src/fsharp/range.fsi @@ -1,10 +1,6 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -#if COMPILER_PUBLIC_API module public Microsoft.FSharp.Compiler.Range -#else -module internal Microsoft.FSharp.Compiler.Range -#endif open System.Text open System.Collections.Generic diff --git a/src/fsharp/vs/ExternalSymbol.fs b/src/fsharp/service/ExternalSymbol.fs similarity index 100% rename from src/fsharp/vs/ExternalSymbol.fs rename to src/fsharp/service/ExternalSymbol.fs diff --git a/src/fsharp/vs/ExternalSymbol.fsi b/src/fsharp/service/ExternalSymbol.fsi similarity index 100% rename from src/fsharp/vs/ExternalSymbol.fsi rename to src/fsharp/service/ExternalSymbol.fsi diff --git a/src/fsharp/vs/IncrementalBuild.fs b/src/fsharp/service/IncrementalBuild.fs similarity index 94% rename from src/fsharp/vs/IncrementalBuild.fs rename to src/fsharp/service/IncrementalBuild.fs index 6145eabe330..7065d72a6f0 100755 --- a/src/fsharp/vs/IncrementalBuild.fs +++ b/src/fsharp/service/IncrementalBuild.fs @@ -14,7 +14,7 @@ open Microsoft.FSharp.Compiler.Tastops open Microsoft.FSharp.Compiler.Lib open Microsoft.FSharp.Compiler.AbstractIL open Microsoft.FSharp.Compiler.AbstractIL.IL -open Microsoft.FSharp.Compiler.AbstractIL.Internal +open Microsoft.FSharp.Compiler.AbstractIL.ILBinaryReader open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library open Microsoft.FSharp.Compiler.CompileOps open Microsoft.FSharp.Compiler.CompileOptions @@ -25,10 +25,8 @@ open Microsoft.FSharp.Compiler.TypeChecker open Microsoft.FSharp.Compiler.Tast open Microsoft.FSharp.Compiler.Range open Microsoft.FSharp.Compiler.SourceCodeServices -open Internal.Utilities open Internal.Utilities.Collections - [] module internal IncrementalBuild = @@ -1027,13 +1025,26 @@ type TypeCheckAccumulator = tcGlobals:TcGlobals tcConfig:TcConfig tcEnvAtEndOfFile: TcEnv - tcResolutions: TcResolutions list - tcSymbolUses: TcSymbolUses list - tcOpenDeclarations: OpenDeclaration list + + /// Accumulated resolutions, last file first + tcResolutionsRev: TcResolutions list + + /// Accumulated symbol uses, last file first + tcSymbolUsesRev: TcSymbolUses list + + /// Accumulated 'open' declarations, last file first + tcOpenDeclarationsRev: OpenDeclaration[] list topAttribs:TopAttribs option - typedImplFiles:TypedImplFile list + + /// Result of checking most recent file, if any + latestImplFile:TypedImplFile option + + latestCcuSigForFile: ModuleOrNamespaceType option + tcDependencyFiles: string list - tcErrors:(PhasedDiagnostic * FSharpErrorSeverity) list } // errors=true, warnings=false + + /// Accumulated errors, last file first + tcErrorsRev:(PhasedDiagnostic * FSharpErrorSeverity)[] list } /// Global service state @@ -1101,14 +1112,27 @@ type PartialCheckResults = TcGlobals: TcGlobals TcConfig: TcConfig TcEnvAtEnd: TcEnv - Errors: (PhasedDiagnostic * FSharpErrorSeverity) list - TcResolutions: TcResolutions list - TcSymbolUses: TcSymbolUses list - TcOpenDeclarations: OpenDeclaration list + + /// Kept in a stack so that each incremental update shares storage with previous files + TcErrorsRev: (PhasedDiagnostic * FSharpErrorSeverity)[] list + + /// Kept in a stack so that each incremental update shares storage with previous files + TcResolutionsRev: TcResolutions list + + /// Kept in a stack so that each incremental update shares storage with previous files + TcSymbolUsesRev: TcSymbolUses list + + /// Kept in a stack so that each incremental update shares storage with previous files + TcOpenDeclarationsRev: OpenDeclaration[] list + TcDependencyFiles: string list TopAttribs: TopAttribs option - TimeStamp: System.DateTime - ImplementationFiles: TypedImplFile list } + TimeStamp: DateTime + LatestImplementationFile: TypedImplFile option + LastestCcuSigForFile: ModuleOrNamespaceType option } + + member x.TcErrors = Array.concat (List.rev x.TcErrorsRev) + member x.TcSymbolUses = List.rev x.TcSymbolUsesRev static member Create (tcAcc: TypeCheckAccumulator, timestamp) = { TcState = tcAcc.tcState @@ -1116,14 +1140,15 @@ type PartialCheckResults = TcGlobals = tcAcc.tcGlobals TcConfig = tcAcc.tcConfig TcEnvAtEnd = tcAcc.tcEnvAtEndOfFile - Errors = tcAcc.tcErrors - TcResolutions = tcAcc.tcResolutions - TcSymbolUses = tcAcc.tcSymbolUses - TcOpenDeclarations = tcAcc.tcOpenDeclarations + TcErrorsRev = tcAcc.tcErrorsRev + TcResolutionsRev = tcAcc.tcResolutionsRev + TcSymbolUsesRev = tcAcc.tcSymbolUsesRev + TcOpenDeclarationsRev = tcAcc.tcOpenDeclarationsRev TcDependencyFiles = tcAcc.tcDependencyFiles TopAttribs = tcAcc.topAttribs TimeStamp = timestamp - ImplementationFiles = tcAcc.typedImplFiles } + LatestImplementationFile = tcAcc.latestImplFile + LastestCcuSigForFile = tcAcc.latestCcuSigForFile } [] @@ -1140,8 +1165,6 @@ module Utilities = /// a virtualized view of the assembly contents as computed by background checking. type RawFSharpAssemblyDataBackedByLanguageService (tcConfig, tcGlobals, tcState:TcState, outfile, topAttrs, assemblyName, ilAssemRef) = - /// Try to find an attribute that takes a string argument - let generatedCcu = tcState.Ccu let exportRemapping = MakeExportRemapping generatedCcu generatedCcu.Contents @@ -1149,18 +1172,14 @@ type RawFSharpAssemblyDataBackedByLanguageService (tcConfig, tcGlobals, tcState: let _sigDataAttributes, sigDataResources = Driver.EncodeInterfaceData(tcConfig, tcGlobals, exportRemapping, generatedCcu, outfile, true) [ for r in sigDataResources do let ccuName = GetSignatureDataResourceName r - let bytes = - match r.Location with - | ILResourceLocation.Local b -> b() - | _ -> assert false; failwith "unreachable" - yield (ccuName, bytes) ] + yield (ccuName, (fun () -> r.GetBytes())) ] let autoOpenAttrs = topAttrs.assemblyAttrs |> List.choose (List.singleton >> TryFindFSharpStringAttribute tcGlobals tcGlobals.attrib_AutoOpenAttribute) let ivtAttrs = topAttrs.assemblyAttrs |> List.choose (List.singleton >> TryFindFSharpStringAttribute tcGlobals tcGlobals.attrib_InternalsVisibleToAttribute) interface IRawFSharpAssemblyData with member __.GetAutoOpenAttributes(_ilg) = autoOpenAttrs member __.GetInternalsVisibleToAttributes(_ilg) = ivtAttrs - member __.TryGetRawILModule() = None + member __.TryGetILModuleDef() = None member __.GetRawFSharpSignatureData(_m, _ilShortAssemName, _filename) = sigData member __.GetRawFSharpOptimizationData(_m, _ilShortAssemName, _filename) = [ ] member __.GetRawTypeForwarders() = mkILExportedTypes [] // TODO: cross-project references with type forwarders @@ -1323,19 +1342,21 @@ type IncrementalBuilder(tcGlobals, frameworkTcImports, nonFrameworkAssemblyInput for (err, isError) in inp.MetaCommandDiagnostics do yield err, (if isError then FSharpErrorSeverity.Error else FSharpErrorSeverity.Warning) ] + let initialErrors = Array.append (Array.ofList loadClosureErrors) (errorLogger.GetErrors()) let tcAcc = { tcGlobals=tcGlobals tcImports=tcImports tcState=tcState tcConfig=tcConfig tcEnvAtEndOfFile=tcInitial - tcResolutions=[] - tcSymbolUses=[] - tcOpenDeclarations=[] + tcResolutionsRev=[] + tcSymbolUsesRev=[] + tcOpenDeclarationsRev=[] topAttribs=None - typedImplFiles=[] + latestImplFile=None + latestCcuSigForFile=None tcDependencyFiles=basicDependencies - tcErrors = loadClosureErrors @ errorLogger.GetErrors() } + tcErrorsRev = [ initialErrors ] } return tcAcc } /// This is a build task function that gets placed into the build rules as the computation for a Vector.ScanLeft @@ -1354,9 +1375,9 @@ type IncrementalBuilder(tcGlobals, frameworkTcImports, nonFrameworkAssemblyInput ApplyMetaCommandsFromInputToTcConfig (tcConfig, input, Path.GetDirectoryName filename) |> ignore let sink = TcResultsSinkImpl(tcAcc.tcGlobals) - let hadParseErrors = not (List.isEmpty parseErrors) + let hadParseErrors = not (Array.isEmpty parseErrors) - let! (tcEnvAtEndOfFile, topAttribs, typedImplFiles), tcState = + let! (tcEnvAtEndOfFile, topAttribs, implFile, ccuSigForFile), tcState = TypeCheckOneInputEventually ((fun () -> hadParseErrors || errorLogger.ErrorCount > 0), tcConfig, tcAcc.tcImports, @@ -1366,7 +1387,7 @@ type IncrementalBuilder(tcGlobals, frameworkTcImports, nonFrameworkAssemblyInput tcAcc.tcState, input) /// Only keep the typed interface files when doing a "full" build for fsc.exe, otherwise just throw them away - let typedImplFiles = if keepAssemblyContents then typedImplFiles else [] + let implFile = if keepAssemblyContents then implFile else None let tcResolutions = if keepAllBackgroundResolutions then sink.GetResolutions() else TcResolutions.Empty let tcEnvAtEndOfFile = (if keepAllBackgroundResolutions then tcEnvAtEndOfFile else tcState.TcEnvFromImpls) let tcSymbolUses = sink.GetSymbolUses() @@ -1374,14 +1395,16 @@ type IncrementalBuilder(tcGlobals, frameworkTcImports, nonFrameworkAssemblyInput RequireCompilationThread ctok // Note: events get raised on the CompilationThread fileChecked.Trigger (filename) + let newErrors = Array.append parseErrors (capturingErrorLogger.GetErrors()) return {tcAcc with tcState=tcState tcEnvAtEndOfFile=tcEnvAtEndOfFile topAttribs=Some topAttribs - typedImplFiles=typedImplFiles - tcResolutions=tcAcc.tcResolutions @ [tcResolutions] - tcSymbolUses=tcAcc.tcSymbolUses @ [tcSymbolUses] - tcOpenDeclarations=tcAcc.tcOpenDeclarations @ sink.OpenDeclarations - tcErrors = tcAcc.tcErrors @ parseErrors @ capturingErrorLogger.GetErrors() + latestImplFile=implFile + latestCcuSigForFile=Some ccuSigForFile + tcResolutionsRev=tcResolutions :: tcAcc.tcResolutionsRev + tcSymbolUsesRev=tcSymbolUses :: tcAcc.tcSymbolUsesRev + tcOpenDeclarationsRev = sink.GetOpenDeclarations() :: tcAcc.tcOpenDeclarationsRev + tcErrorsRev = newErrors :: tcAcc.tcErrorsRev tcDependencyFiles = filename :: tcAcc.tcDependencyFiles } } @@ -1419,16 +1442,16 @@ type IncrementalBuilder(tcGlobals, frameworkTcImports, nonFrameworkAssemblyInput let finalAcc = tcStates.[tcStates.Length-1] // Finish the checking - let (_tcEnvAtEndOfLastFile, topAttrs, mimpls), tcState = - let results = tcStates |> List.ofArray |> List.map (fun acc-> acc.tcEnvAtEndOfFile, defaultArg acc.topAttribs EmptyTopAttrs, acc.typedImplFiles) + let (_tcEnvAtEndOfLastFile, topAttrs, mimpls, _), tcState = + let results = tcStates |> List.ofArray |> List.map (fun acc-> acc.tcEnvAtEndOfFile, defaultArg acc.topAttribs EmptyTopAttrs, acc.latestImplFile, acc.latestCcuSigForFile) TypeCheckMultipleInputsFinish (results, finalAcc.tcState) let ilAssemRef, tcAssemblyDataOpt, tcAssemblyExprOpt = try - // TypeCheckClosedInputSetFinish fills in tcState.Ccu but in incremental scenarios we don't want this, - // so we make this temporary here - let oldContents = tcState.Ccu.Deref.Contents - try + // TypeCheckClosedInputSetFinish fills in tcState.Ccu but in incremental scenarios we don't want this, + // so we make this temporary here + let oldContents = tcState.Ccu.Deref.Contents + try let tcState, tcAssemblyExpr = TypeCheckClosedInputSetFinish (mimpls, tcState) // Compute the identity of the generated assembly based on attributes, options etc. @@ -1476,7 +1499,7 @@ type IncrementalBuilder(tcGlobals, frameworkTcImports, nonFrameworkAssemblyInput let finalAccWithErrors = { finalAcc with - tcErrors = finalAcc.tcErrors @ errorLogger.GetErrors() + tcErrorsRev = errorLogger.GetErrors() :: finalAcc.tcErrorsRev topAttribs = Some topAttrs } return ilAssemRef, tcAssemblyDataOpt, tcAssemblyExprOpt, finalAccWithErrors @@ -1700,15 +1723,17 @@ type IncrementalBuilder(tcGlobals, frameworkTcImports, nonFrameworkAssemblyInput /// CreateIncrementalBuilder (for background type checking). Note that fsc.fs also /// creates an incremental builder used by the command line compiler. - static member TryCreateBackgroundBuilderForProjectOptions (ctok, legacyReferenceResolver, defaultFSharpBinariesDir, frameworkTcImportsCache: FrameworkImportsCache, loadClosureOpt:LoadClosure option, sourceFiles:string list, commandLineArgs:string list, projectReferences, projectDirectory, useScriptResolutionRules, keepAssemblyContents, keepAllBackgroundResolutions, maxTimeShareMilliseconds) = - let targetProfileSwitch = "--targetprofile:" + static member TryCreateBackgroundBuilderForProjectOptions (ctok, legacyReferenceResolver, defaultFSharpBinariesDir, frameworkTcImportsCache: FrameworkImportsCache, loadClosureOpt:LoadClosure option, sourceFiles:string list, commandLineArgs:string list, projectReferences, projectDirectory, useScriptResolutionRules, keepAssemblyContents, keepAllBackgroundResolutions, maxTimeShareMilliseconds, tryGetMetadataSnapshot) = let useSimpleResolutionSwitch = "--simpleresolution" cancellable { // Trap and report warnings and errors from creation. - use errorScope = new ErrorScope() - let! builderOpt = + let delayedLogger = CapturingErrorLogger("IncrementalBuilderCreation") + use _unwindEL = PushErrorLoggerPhaseUntilUnwind (fun _ -> delayedLogger) + use _unwindBP = PushThreadBuildPhaseUntilUnwind BuildPhase.Parameter + + let! builderOpt = cancellable { try @@ -1720,16 +1745,20 @@ type IncrementalBuilder(tcGlobals, frameworkTcImports, nonFrameworkAssemblyInput let tcConfigB, sourceFilesNew = let getSwitchValue switchstring = - match commandLineArgs |> Seq.tryFindIndex(fun s -> s.StartsWith(switchstring)) with + match commandLineArgs |> Seq.tryFindIndex(fun s -> s.StartsWithOrdinal(switchstring)) with | Some idx -> Some(commandLineArgs.[idx].Substring(switchstring.Length)) | _ -> None // see also fsc.fs:runFromCommandLineToImportingAssemblies(), as there are many similarities to where the PS creates a tcConfigB - let tcConfigB = TcConfigBuilder.CreateNew(legacyReferenceResolver, defaultFSharpBinariesDir, implicitIncludeDir=projectDirectory, optimizeForMemory=true, isInteractive=false, isInvalidationSupported=true, defaultCopyFSharpCore=false) - - // The following uses more memory but means we don't take read-exclusions on the DLLs we reference - // Could detect well-known assemblies--ie System.dll--and open them with read-locks - tcConfigB.openBinariesInMemory <- true + let tcConfigB = + TcConfigBuilder.CreateNew(legacyReferenceResolver, + defaultFSharpBinariesDir, + implicitIncludeDir=projectDirectory, + reduceMemoryUsage=ReduceMemoryFlag.Yes, + isInteractive=false, + isInvalidationSupported=true, + defaultCopyFSharpCore=CopyFSharpCoreFlag.No, + tryGetMetadataSnapshot=tryGetMetadataSnapshot) tcConfigB.resolutionEnvironment <- (ReferenceResolver.ResolutionEnvironment.EditingOrCompilation true) @@ -1744,22 +1773,12 @@ type IncrementalBuilder(tcGlobals, frameworkTcImports, nonFrameworkAssemblyInput #else tcConfigB.useSimpleResolution <- (getSwitchValue useSimpleResolutionSwitch) |> Option.isSome #endif - match (getSwitchValue targetProfileSwitch) with - | Some v -> - let _s = v - CompileOptions.SetTargetProfile tcConfigB v - | None -> () - // Apply command-line arguments and collect more source files if they are in the arguments let sourceFilesNew = ApplyCommandLineArgs(tcConfigB, sourceFiles, commandLineArgs) // Never open PDB files for the language service, even if --standalone is specified tcConfigB.openDebugInformationForLaterStaticLinking <- false - match commandLineArgs |> Seq.tryFind(fun s -> s.StartsWith(targetProfileSwitch)) with - | Some arg -> - let profile = arg.Substring(targetProfileSwitch.Length) - CompileOptions.SetTargetProfile tcConfigB profile - | _ -> () + tcConfigB, sourceFilesNew match loadClosureOpt with @@ -1828,7 +1847,18 @@ type IncrementalBuilder(tcGlobals, frameworkTcImports, nonFrameworkAssemblyInput return None } - return builderOpt, errorScope.Diagnostics + let diagnostics = + match builderOpt with + | Some builder -> + let errorSeverityOptions = builder.TcConfig.errorSeverityOptions + let errorLogger = CompilationErrorLogger("IncrementalBuilderCreation", errorSeverityOptions) + delayedLogger.CommitDelayedDiagnostics(errorLogger) + errorLogger.GetErrors() |> Array.map (fun (d, severity) -> d, severity = FSharpErrorSeverity.Error) + | _ -> + Array.ofList delayedLogger.Diagnostics + |> Array.map (fun (d, isError) -> FSharpErrorInfo.CreateFromException(d, isError, range.Zero)) + + return builderOpt, diagnostics } static member KeepBuilderAlive (builderOpt: IncrementalBuilder option) = match builderOpt with diff --git a/src/fsharp/vs/IncrementalBuild.fsi b/src/fsharp/service/IncrementalBuild.fsi similarity index 93% rename from src/fsharp/vs/IncrementalBuild.fsi rename to src/fsharp/service/IncrementalBuild.fsi index e664cadc78b..b6b64a7ffd0 100755 --- a/src/fsharp/vs/IncrementalBuild.fsi +++ b/src/fsharp/service/IncrementalBuild.fsi @@ -3,8 +3,6 @@ namespace Microsoft.FSharp.Compiler open System -open System.Threading -open System.Threading.Tasks open Microsoft.FSharp.Compiler open Microsoft.FSharp.Compiler.Range open Microsoft.FSharp.Compiler.ErrorLogger @@ -46,16 +44,16 @@ type internal PartialCheckResults = TcEnvAtEnd : TypeChecker.TcEnv /// Represents the collected errors from type checking - Errors : (PhasedDiagnostic * FSharpErrorSeverity) list + TcErrorsRev : (PhasedDiagnostic * FSharpErrorSeverity)[] list /// Represents the collected name resolutions from type checking - TcResolutions: TcResolutions list + TcResolutionsRev: TcResolutions list /// Represents the collected uses of symbols from type checking - TcSymbolUses: TcSymbolUses list + TcSymbolUsesRev: TcSymbolUses list /// Represents open declarations - TcOpenDeclarations: OpenDeclaration list + TcOpenDeclarationsRev: OpenDeclaration[] list TcDependencyFiles: string list @@ -64,8 +62,16 @@ type internal PartialCheckResults = TimeStamp: DateTime - /// Represents complete typechecked implementation files, including thier typechecked signatures if any. - ImplementationFiles: TypedImplFile list } + /// Represents latest complete typechecked implementation file, including its typechecked signature if any. + /// Empty for a signature file. + LatestImplementationFile: TypedImplFile option + + /// Represents latest inferred signature contents. + LastestCcuSigForFile: ModuleOrNamespaceType option} + + member TcErrors: (PhasedDiagnostic * FSharpErrorSeverity)[] + + member TcSymbolUses: TcSymbolUses list /// Manages an incremental build graph for the build of an F# project [] @@ -153,9 +159,9 @@ type internal IncrementalBuilder = /// Await the untyped parse results for a particular slot in the vector of parse results. /// /// This may be a marginally long-running operation (parses are relatively quick, only one file needs to be parsed) - member GetParseResultsForFile : CompilationThreadToken * filename:string -> Cancellable + member GetParseResultsForFile : CompilationThreadToken * filename:string -> Cancellable - static member TryCreateBackgroundBuilderForProjectOptions : CompilationThreadToken * ReferenceResolver.Resolver * defaultFSharpBinariesDir: string * FrameworkImportsCache * scriptClosureOptions:LoadClosure option * sourceFiles:string list * commandLineArgs:string list * projectReferences: IProjectReference list * projectDirectory:string * useScriptResolutionRules:bool * keepAssemblyContents: bool * keepAllBackgroundResolutions: bool * maxTimeShareMilliseconds: int64 -> Cancellable + static member TryCreateBackgroundBuilderForProjectOptions : CompilationThreadToken * ReferenceResolver.Resolver * defaultFSharpBinariesDir: string * FrameworkImportsCache * scriptClosureOptions:LoadClosure option * sourceFiles:string list * commandLineArgs:string list * projectReferences: IProjectReference list * projectDirectory:string * useScriptResolutionRules:bool * keepAssemblyContents: bool * keepAllBackgroundResolutions: bool * maxTimeShareMilliseconds: int64 * tryGetMetadataSnapshot: ILBinaryReader.ILReaderTryGetMetadataSnapshot -> Cancellable /// Increment the usage count on the IncrementalBuilder by 1. This initial usage count is 0 so immediately after creation /// a call to KeepBuilderAlive should be made. The returns an IDisposable which will diff --git a/src/fsharp/vs/QuickParse.fs b/src/fsharp/service/QuickParse.fs similarity index 98% rename from src/fsharp/vs/QuickParse.fs rename to src/fsharp/service/QuickParse.fs index 1530759307b..9e851fef05f 100644 --- a/src/fsharp/vs/QuickParse.fs +++ b/src/fsharp/service/QuickParse.fs @@ -3,6 +3,7 @@ namespace Microsoft.FSharp.Compiler open System +open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library open Microsoft.FSharp.Compiler.SourceCodeServices /// Qualified long name. @@ -46,7 +47,8 @@ module QuickParse = // Adjusts the token tag for the given identifier // - if we're inside active pattern name (at the bar), correct the token TAG to be an identifier let CorrectIdentifierToken (tokenText: string) (tokenTag: int) = - if tokenText.EndsWith "|" then Microsoft.FSharp.Compiler.Parser.tagOfToken (Microsoft.FSharp.Compiler.Parser.token.IDENT tokenText) + if tokenText.EndsWithOrdinal("|") then + Microsoft.FSharp.Compiler.Parser.tagOfToken (Microsoft.FSharp.Compiler.Parser.token.IDENT tokenText) else tokenTag let rec isValidStrippedName (name:string) idx = @@ -61,9 +63,7 @@ module QuickParse = let private isValidActivePatternName (name: string) = // Strip the surrounding bars (e.g. from "|xyz|_|") to get "xyz" - match name.StartsWith("|", System.StringComparison.Ordinal), - name.EndsWith("|_|", System.StringComparison.Ordinal), - name.EndsWith("|", System.StringComparison.Ordinal) with + match name.StartsWithOrdinal("|"), name.EndsWithOrdinal("|_|"), name.EndsWithOrdinal("|") with | true, true, _ when name.Length > 4 -> isValidStrippedName (name.Substring(1, name.Length - 4)) 0 | true, _, true when name.Length > 2 -> isValidStrippedName (name.Substring(1, name.Length - 2)) 0 | _ -> false diff --git a/src/fsharp/vs/QuickParse.fsi b/src/fsharp/service/QuickParse.fsi similarity index 95% rename from src/fsharp/vs/QuickParse.fsi rename to src/fsharp/service/QuickParse.fsi index 78bfa2b39f3..7857f94d4cc 100644 --- a/src/fsharp/vs/QuickParse.fsi +++ b/src/fsharp/service/QuickParse.fsi @@ -6,11 +6,7 @@ open System open Microsoft.FSharp.Compiler.SourceCodeServices /// Qualified long name. -#if COMPILER_PUBLIC_API -type PartialLongName = -#else -type internal PartialLongName = -#endif +type public PartialLongName = { /// Qualifying idents, prior to the last dot, not including the last part. QualifyingIdents: string list @@ -42,11 +38,7 @@ type internal PartialLongName = /// It's also surprising how hard even the job of getting long identifier islands can be. For example the code /// below is inaccurate for long identifier chains involving ``...`` identifiers. And there are special cases /// for active pattern names and so on. -#if COMPILER_PUBLIC_API -module QuickParse = -#else -module internal QuickParse = -#endif +module public QuickParse = /// Puts us after the last character. val MagicalAdjustmentConstant : int diff --git a/src/fsharp/vs/Reactor.fs b/src/fsharp/service/Reactor.fs similarity index 99% rename from src/fsharp/vs/Reactor.fs rename to src/fsharp/service/Reactor.fs index cc14a3d2fc0..d2b8bda7ea6 100755 --- a/src/fsharp/vs/Reactor.fs +++ b/src/fsharp/service/Reactor.fs @@ -6,9 +6,7 @@ open System.Diagnostics open System.Globalization open System.Threading open Microsoft.FSharp.Control -open Microsoft.FSharp.Compiler open Microsoft.FSharp.Compiler.Lib -open Microsoft.FSharp.Compiler.ErrorLogger open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library /// Represents the capability to schedule work in the compiler service operations queue for the compilation thread diff --git a/src/fsharp/vs/Reactor.fsi b/src/fsharp/service/Reactor.fsi similarity index 98% rename from src/fsharp/vs/Reactor.fsi rename to src/fsharp/service/Reactor.fsi index 9272dba0cbe..b4bd46d167e 100755 --- a/src/fsharp/vs/Reactor.fsi +++ b/src/fsharp/service/Reactor.fsi @@ -3,7 +3,6 @@ namespace Microsoft.FSharp.Compiler.SourceCodeServices open System.Threading -open Microsoft.FSharp.Compiler.ErrorLogger open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library /// Represents the capability to schedule work in the compiler service operations queue for the compilation thread diff --git a/src/fsharp/service/ServiceAnalysis.fs b/src/fsharp/service/ServiceAnalysis.fs new file mode 100644 index 00000000000..69049bc28fc --- /dev/null +++ b/src/fsharp/service/ServiceAnalysis.fs @@ -0,0 +1,220 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace Microsoft.FSharp.Compiler.SourceCodeServices + +open Microsoft.FSharp.Compiler +open Microsoft.FSharp.Compiler.Ast +open Microsoft.FSharp.Compiler.Range +open Microsoft.FSharp.Compiler.PrettyNaming +open System.Collections.Generic +open System.Runtime.CompilerServices +open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library + +module UnusedOpens = + + let symbolHash = HashIdentity.FromFunctions (fun (x: FSharpSymbol) -> x.GetEffectivelySameAsHash()) (fun x y -> x.IsEffectivelySameAs(y)) + + /// Represents one namespace or module opened by an 'open' statement + type OpenedModule(entity: FSharpEntity, isNestedAutoOpen: bool) = + + /// Compute an indexed table of the set of symbols revealed by 'open', on-demand + let revealedSymbols : Lazy> = + lazy + let symbols = + [| for ent in entity.NestedEntities do + yield ent :> FSharpSymbol + + if ent.IsFSharpRecord then + for rf in ent.FSharpFields do + yield rf :> FSharpSymbol + + if ent.IsFSharpUnion && not (Symbol.hasAttribute ent.Attributes) then + for unionCase in ent.UnionCases do + yield unionCase :> FSharpSymbol + + if Symbol.hasAttribute ent.Attributes then + for fv in ent.MembersFunctionsAndValues do + // fv.IsExtensionMember is always false for C# extension methods returning by `MembersFunctionsAndValues`, + // so we have to check Extension attribute instead. + // (note: fv.IsExtensionMember has proper value for symbols returning by GetAllUsesOfAllSymbolsInFile though) + if Symbol.hasAttribute fv.Attributes then + yield fv :> FSharpSymbol + + for apCase in entity.ActivePatternCases do + yield apCase :> FSharpSymbol + + // The IsNamespace and IsFSharpModule cases are handled by looking at DeclaringEntity below + if not entity.IsNamespace && not entity.IsFSharpModule then + for fv in entity.MembersFunctionsAndValues do + yield fv :> FSharpSymbol |] + + HashSet<_>(symbols, symbolHash) + + member __.Entity = entity + member __.IsNestedAutoOpen = isNestedAutoOpen + member __.RevealedSymbolsContains(symbol) = revealedSymbols.Force().Contains symbol + + type OpenedModuleGroup = + { OpenedModules: OpenedModule list } + + static member Create (modul: FSharpEntity) = + let rec getModuleAndItsAutoOpens (isNestedAutoOpen: bool) (modul: FSharpEntity) = + [ yield OpenedModule (modul, isNestedAutoOpen) + for ent in modul.NestedEntities do + if ent.IsFSharpModule && Symbol.hasAttribute ent.Attributes then + yield! getModuleAndItsAutoOpens true ent ] + { OpenedModules = getModuleAndItsAutoOpens false modul } + + /// Represents single open statement. + type OpenStatement = + { /// All namespaces and modules which this open declaration effectively opens, including the AutoOpen ones + OpenedGroups: OpenedModuleGroup list + + /// The range of open statement itself + Range: range + + /// The scope on which this open declaration is applied + AppliedScope: range } + + /// Gets the open statements, their scopes and their resolutions + let getOpenStatements (openDeclarations: FSharpOpenDeclaration[]) : OpenStatement[] = + openDeclarations + |> Array.filter (fun x -> not x.IsOwnNamespace) + |> Array.choose (fun openDecl -> + match openDecl.LongId, openDecl.Range with + | firstId :: _, Some range -> + if firstId.idText = MangledGlobalName then + None + else + Some { OpenedGroups = openDecl.Modules |> List.map OpenedModuleGroup.Create + Range = range + AppliedScope = openDecl.AppliedScope } + | _ -> None) + + /// Only consider symbol uses which are the first part of a long ident, i.e. with no qualifying identifiers + let filterSymbolUses (getSourceLineStr: int -> string) (symbolUses: FSharpSymbolUse[]) : FSharpSymbolUse[] = + symbolUses + |> Array.filter (fun su -> + match su.Symbol with + | :? FSharpMemberOrFunctionOrValue as fv when fv.IsExtensionMember -> + // Extension members should be taken into account even though they have a prefix (as they do most of the time) + true + | :? FSharpMemberOrFunctionOrValue as fv when not fv.IsModuleValueOrMember -> + // Local values can be ignored + false + | :? FSharpMemberOrFunctionOrValue when su.IsFromDefinition -> + // Value definitions should be ignored + false + | :? FSharpGenericParameter -> + // Generic parameters can be ignored, they never come into scope via 'open' + false + | :? FSharpUnionCase when su.IsFromDefinition -> + false + | _ -> + // For the rest of symbols we pick only those which are the first part of a long ident, because it's they which are + // contained in opened namespaces / modules. For example, we pick `IO` from long ident `IO.File.OpenWrite` because + // it's `open System` which really brings it into scope. + let partialName = QuickParse.GetPartialLongNameEx (getSourceLineStr su.RangeAlternate.StartLine, su.RangeAlternate.EndColumn - 1) + List.isEmpty partialName.QualifyingIdents) + + /// Split symbol uses into cases that are easy to handle (via DeclaringEntity) and those that don't have a good DeclaringEntity + let splitSymbolUses (symbolUses: FSharpSymbolUse[]) : FSharpSymbolUse[] * FSharpSymbolUse[] = + symbolUses |> Array.partition (fun symbolUse -> + let symbol = symbolUse.Symbol + match symbol with + | :? FSharpMemberOrFunctionOrValue as f -> + match f.DeclaringEntity with + | Some ent when ent.IsNamespace || ent.IsFSharpModule -> true + | _ -> false + | _ -> false) + + /// Given an 'open' statement, find fresh modules/namespaces referred to by that statement where there is some use of a revealed symbol + /// in the scope of the 'open' is from that module. + /// + /// Performance will be roughly NumberOfOpenStatements x NumberOfSymbolUses + let isOpenStatementUsed (symbolUses2: FSharpSymbolUse[]) (symbolUsesRangesByDeclaringEntity: Dictionary) + (usedModules: Dictionary) (openStatement: OpenStatement) = + + // Don't re-check modules whose symbols are already known to have been used + let openedGroupsToExamine = + openStatement.OpenedGroups |> List.choose (fun openedGroup -> + let openedEntitiesToExamine = + openedGroup.OpenedModules + |> List.filter (fun openedEntity -> + not (usedModules.BagExistsValueForKey(openedEntity.Entity, fun scope -> rangeContainsRange scope openStatement.AppliedScope))) + + match openedEntitiesToExamine with + | [] -> None + | _ when openedEntitiesToExamine |> List.exists (fun x -> not x.IsNestedAutoOpen) -> Some { OpenedModules = openedEntitiesToExamine } + | _ -> None) + + // Find the opened groups that are used by some symbol use + let newlyUsedOpenedGroups = + openedGroupsToExamine |> List.filter (fun openedGroup -> + openedGroup.OpenedModules |> List.exists (fun openedEntity -> + symbolUsesRangesByDeclaringEntity.BagExistsValueForKey(openedEntity.Entity, fun symbolUseRange -> + rangeContainsRange openStatement.AppliedScope symbolUseRange && + Range.posGt symbolUseRange.Start openStatement.Range.End) || + + symbolUses2 |> Array.exists (fun symbolUse -> + rangeContainsRange openStatement.AppliedScope symbolUse.RangeAlternate && + Range.posGt symbolUse.RangeAlternate.Start openStatement.Range.End && + openedEntity.RevealedSymbolsContains symbolUse.Symbol))) + + // Return them as interim used entities + let newlyOpenedModules = newlyUsedOpenedGroups |> List.collect (fun openedGroup -> openedGroup.OpenedModules) + for openedModule in newlyOpenedModules do + let scopes = + match usedModules.TryGetValue openedModule.Entity with + | true, scopes -> openStatement.AppliedScope :: scopes + | _ -> [openStatement.AppliedScope] + usedModules.[openedModule.Entity] <- scopes + newlyOpenedModules.Length > 0 + + /// Incrementally filter out the open statements one by one. Filter those whose contents are referred to somewhere in the symbol uses. + /// Async to allow cancellation. + let rec filterOpenStatementsIncremental symbolUses2 (symbolUsesRangesByDeclaringEntity: Dictionary) (openStatements: OpenStatement list) + (usedModules: Dictionary) acc = + async { + match openStatements with + | openStatement :: rest -> + if isOpenStatementUsed symbolUses2 symbolUsesRangesByDeclaringEntity usedModules openStatement then + return! filterOpenStatementsIncremental symbolUses2 symbolUsesRangesByDeclaringEntity rest usedModules acc + else + // The open statement has not been used, include it in the results + return! filterOpenStatementsIncremental symbolUses2 symbolUsesRangesByDeclaringEntity rest usedModules (openStatement :: acc) + | [] -> return List.rev acc + } + + let entityHash = HashIdentity.FromFunctions (fun (x: FSharpEntity) -> x.GetEffectivelySameAsHash()) (fun x y -> x.IsEffectivelySameAs(y)) + + /// Filter out the open statements whose contents are referred to somewhere in the symbol uses. + /// Async to allow cancellation. + let filterOpenStatements (symbolUses1: FSharpSymbolUse[], symbolUses2: FSharpSymbolUse[]) openStatements = + async { + // the key is a namespace or module, the value is a list of FSharpSymbolUse range of symbols defined in the + // namespace or module. So, it's just symbol uses ranges groupped by namespace or module where they are _defined_. + let symbolUsesRangesByDeclaringEntity = Dictionary(entityHash) + for symbolUse in symbolUses1 do + match symbolUse.Symbol with + | :? FSharpMemberOrFunctionOrValue as f -> + match f.DeclaringEntity with + | Some entity when entity.IsNamespace || entity.IsFSharpModule -> + symbolUsesRangesByDeclaringEntity.BagAdd(entity, symbolUse.RangeAlternate) + | _ -> () + | _ -> () + + let! results = filterOpenStatementsIncremental symbolUses2 symbolUsesRangesByDeclaringEntity (List.ofArray openStatements) (Dictionary(entityHash)) [] + return results |> List.map (fun os -> os.Range) + } + + /// Get the open statements whose contents are not referred to anywhere in the symbol uses. + /// Async to allow cancellation. + let getUnusedOpens (checkFileResults: FSharpCheckFileResults, getSourceLineStr: int -> string) : Async = + async { + let! symbolUses = checkFileResults.GetAllUsesOfAllSymbolsInFile() + let symbolUses = filterSymbolUses getSourceLineStr symbolUses + let symbolUses = splitSymbolUses symbolUses + let openStatements = getOpenStatements checkFileResults.OpenDeclarations + return! filterOpenStatements symbolUses openStatements + } \ No newline at end of file diff --git a/src/fsharp/vs/ServiceAnalysis.fsi b/src/fsharp/service/ServiceAnalysis.fsi similarity index 84% rename from src/fsharp/vs/ServiceAnalysis.fsi rename to src/fsharp/service/ServiceAnalysis.fsi index 6290c5d43e5..cafaab2955b 100644 --- a/src/fsharp/vs/ServiceAnalysis.fsi +++ b/src/fsharp/service/ServiceAnalysis.fsi @@ -6,10 +6,6 @@ open Microsoft.FSharp.Compiler.Ast open Microsoft.FSharp.Compiler.NameResolution open Microsoft.FSharp.Compiler.Range -#if COMPILER_PUBLIC_API -module UnusedOpens = -#else -module internal UnusedOpens = -#endif +module public UnusedOpens = /// Get all unused open declarations in a file val getUnusedOpens : checkFileResults: FSharpCheckFileResults * getSourceLineStr: (int -> string) -> Async \ No newline at end of file diff --git a/src/fsharp/vs/ServiceAssemblyContent.fs b/src/fsharp/service/ServiceAssemblyContent.fs similarity index 93% rename from src/fsharp/vs/ServiceAssemblyContent.fs rename to src/fsharp/service/ServiceAssemblyContent.fs index 8f0363e3856..673fe03e060 100644 --- a/src/fsharp/vs/ServiceAssemblyContent.fs +++ b/src/fsharp/service/ServiceAssemblyContent.fs @@ -66,7 +66,7 @@ module Extensions = try x.MembersFunctionsAndValues with _ -> [||] :> _ let isOperator (name: string) = - name.StartsWith "( " && name.EndsWith " )" && name.Length > 4 + name.StartsWithOrdinal("( ") && name.EndsWithOrdinal(" )") && name.Length > 4 && name.Substring (2, name.Length - 4) |> String.forall (fun c -> c <> ' ' && not (Char.IsLetter c)) @@ -88,7 +88,7 @@ module Extensions = member x.TryGetFullCompiledOperatorNameIdents() : Idents option = // For operator ++ displayName is ( ++ ) compiledName is op_PlusPlus if isOperator x.DisplayName && x.DisplayName <> x.CompiledName then - x.EnclosingEntity + x.DeclaringEntity |> Option.bind (fun e -> e.TryGetFullName()) |> Option.map (fun enclosingEntityFullName -> Array.append (enclosingEntityFullName.Split '.') [| x.CompiledName |]) @@ -111,7 +111,8 @@ type AssemblySymbol = TopRequireQualifiedAccessParent: Idents option AutoOpenParent: Idents option Symbol: FSharpSymbol - Kind: LookupType -> EntityKind } + Kind: LookupType -> EntityKind + UnresolvedSymbol: UnresolvedSymbol } override x.ToString() = sprintf "%A" x type AssemblyPath = string @@ -157,10 +158,10 @@ type Parent = else ident) let removeModuleSuffix (idents: Idents) = - if entity.IsFSharpModule && idents.Length > 0 && Symbol.hasModuleSuffixAttribute entity then + if entity.IsFSharpModule && idents.Length > 0 then let lastIdent = idents.[idents.Length - 1] - if lastIdent.EndsWith "Module" then - idents |> Array.replace (idents.Length - 1) (lastIdent.Substring(0, lastIdent.Length - 6)) + if lastIdent <> entity.DisplayName then + idents |> Array.replace (idents.Length - 1) entity.DisplayName else idents else idents @@ -186,14 +187,33 @@ type IAssemblyContentCache = module AssemblyContentProvider = open System.IO - let private createEntity ns (parent: Parent) (entity: FSharpEntity) = + let unresolvedSymbol (topRequireQualifiedAccessParent: Idents option) (cleanedIdents: Idents) (fullName: string) = + let getNamespace (idents: Idents) = + if idents.Length > 1 then Some idents.[..idents.Length - 2] else None + + let ns = + topRequireQualifiedAccessParent + |> Option.bind getNamespace + |> Option.orElseWith (fun () -> getNamespace cleanedIdents) + |> Option.defaultValue [||] + + let displayName = + let nameIdents = if cleanedIdents.Length > ns.Length then cleanedIdents |> Array.skip ns.Length else cleanedIdents + nameIdents |> String.concat "." + + { FullName = fullName + DisplayName = displayName + Namespace = ns } + + let createEntity ns (parent: Parent) (entity: FSharpEntity) = parent.FormatEntityFullName entity |> Option.map (fun (fullName, cleanIdents) -> + let topRequireQualifiedAccessParent = parent.TopRequiresQualifiedAccess false |> Option.map parent.FixParentModuleSuffix { FullName = fullName CleanedIdents = cleanIdents Namespace = ns NearestRequireQualifiedAccessParent = parent.ThisRequiresQualifiedAccess false |> Option.map parent.FixParentModuleSuffix - TopRequireQualifiedAccessParent = parent.TopRequiresQualifiedAccess false |> Option.map parent.FixParentModuleSuffix + TopRequireQualifiedAccessParent = topRequireQualifiedAccessParent AutoOpenParent = parent.AutoOpen |> Option.map parent.FixParentModuleSuffix Symbol = entity Kind = fun lookupType -> @@ -208,21 +228,26 @@ module AssemblyContentProvider = match entity with | Symbol.Attribute -> EntityKind.Attribute | _ -> EntityKind.Type + UnresolvedSymbol = unresolvedSymbol topRequireQualifiedAccessParent cleanIdents fullName }) - let private traverseMemberFunctionAndValues ns (parent: Parent) (membersFunctionsAndValues: seq) = + let traverseMemberFunctionAndValues ns (parent: Parent) (membersFunctionsAndValues: seq) = + let topRequireQualifiedAccessParent = parent.TopRequiresQualifiedAccess true |> Option.map parent.FixParentModuleSuffix + let autoOpenParent = parent.AutoOpen |> Option.map parent.FixParentModuleSuffix membersFunctionsAndValues |> Seq.filter (fun x -> not x.IsInstanceMember && not x.IsPropertyGetterMethod && not x.IsPropertySetterMethod) |> Seq.collect (fun func -> let processIdents fullName idents = + let cleanedIdentes = parent.FixParentModuleSuffix idents { FullName = fullName - CleanedIdents = parent.FixParentModuleSuffix idents + CleanedIdents = cleanedIdentes Namespace = ns NearestRequireQualifiedAccessParent = parent.ThisRequiresQualifiedAccess true |> Option.map parent.FixParentModuleSuffix - TopRequireQualifiedAccessParent = parent.TopRequiresQualifiedAccess true |> Option.map parent.FixParentModuleSuffix - AutoOpenParent = parent.AutoOpen |> Option.map parent.FixParentModuleSuffix + TopRequireQualifiedAccessParent = topRequireQualifiedAccessParent + AutoOpenParent = autoOpenParent Symbol = func - Kind = fun _ -> EntityKind.FunctionOrValue func.IsActivePattern } + Kind = fun _ -> EntityKind.FunctionOrValue func.IsActivePattern + UnresolvedSymbol = unresolvedSymbol topRequireQualifiedAccessParent cleanedIdentes fullName } [ yield! func.TryGetFullDisplayName() |> Option.map (fun fullDisplayName -> processIdents func.FullName (fullDisplayName.Split '.')) @@ -241,7 +266,7 @@ module AssemblyContentProvider = processIdents (fullCompiledIdents |> String.concat ".") fullCompiledIdents) |> Option.toList ]) - let rec private traverseEntity contentType (parent: Parent) (entity: FSharpEntity) = + let rec traverseEntity contentType (parent: Parent) (entity: FSharpEntity) = seq { #if !NO_EXTENSIONTYPING @@ -275,7 +300,7 @@ module AssemblyContentProvider = | false, _ -> None WithModuleSuffix = - if entity.IsFSharpModule && Symbol.hasModuleSuffixAttribute entity then + if entity.IsFSharpModule && (Symbol.hasModuleSuffixAttribute entity || entity.CompiledName <> entity.DisplayName) then currentEntity |> Option.map (fun e -> e.CleanedIdents) else parent.WithModuleSuffix @@ -308,7 +333,7 @@ module AssemblyContentProvider = |> Seq.distinctBy (fun {FullName = fullName; CleanedIdents = cleanIdents} -> (fullName, cleanIdents)) |> Seq.toList - let private getAssemblySignaturesContent contentType (assemblies: FSharpAssembly list) = + let getAssemblySignaturesContent contentType (assemblies: FSharpAssembly list) = assemblies |> List.collect (fun asm -> getAssemblySignatureContent contentType asm.Contents) let getAssemblyContent (withCache: (IAssemblyContentCache -> _) -> _) contentType (fileName: string option) (assemblies: FSharpAssembly list) = @@ -643,7 +668,7 @@ module ParsedInput = List.iter walkExpr [e1; e2] | SynExpr.MatchLambda (_, _, synMatchClauseList, _, _) -> List.iter walkClause synMatchClauseList - | SynExpr.Match (_, e, synMatchClauseList, _, _) -> + | SynExpr.Match (_, e, synMatchClauseList, _) -> walkExpr e List.iter walkClause synMatchClauseList | SynExpr.TypeApp (e, _, tys, _, _, _, _) -> @@ -663,6 +688,9 @@ module ParsedInput = walkExpr e1 addLongIdentWithDots idents walkExpr e2 + | SynExpr.Set (e1, e2, _) -> + walkExpr e1 + walkExpr e2 | SynExpr.DotIndexedGet (e, args, _, _) -> walkExpr e List.iter walkIndexerArg args @@ -979,7 +1007,8 @@ module ParsedInput = if ctx.Pos.Line > 1 then // it's an implicit module without any open declarations let line = getLineStr (ctx.Pos.Line - 2) - let isImpliciteTopLevelModule = not (line.StartsWith "module" && not (line.EndsWith "=")) + let isImpliciteTopLevelModule = + not (line.StartsWithOrdinal("module") && not (line.EndsWithOrdinal("="))) if isImpliciteTopLevelModule then 1 else ctx.Pos.Line else 1 | ScopeKind.Namespace -> @@ -988,7 +1017,7 @@ module ParsedInput = [0..ctx.Pos.Line - 1] |> List.mapi (fun i line -> i, getLineStr line) |> List.tryPick (fun (i, lineStr) -> - if lineStr.StartsWith "namespace" then Some i + if lineStr.StartsWithOrdinal("namespace") then Some i else None) |> function // move to the next line below "namespace" and convert it to F# 1-based line number @@ -999,8 +1028,11 @@ module ParsedInput = mkPos line ctx.Pos.Column - let tryFindNearestPointToInsertOpenDeclaration (currentLine: int) (ast: ParsedInput) (entity: Idents) (insertionPoint: OpenStatementInsertionPoint) = + let findNearestPointToInsertOpenDeclaration (currentLine: int) (ast: ParsedInput) (entity: Idents) (insertionPoint: OpenStatementInsertionPoint) = match tryFindNearestPointAndModules currentLine ast insertionPoint with | Some (scope, _, point), modules -> - Some (findBestPositionToInsertOpenDeclaration modules scope point entity) - | _ -> None \ No newline at end of file + findBestPositionToInsertOpenDeclaration modules scope point entity + | _ -> + // we failed to find insertion point because ast is empty for some reason, return top left point in this case + { ScopeKind = ScopeKind.TopModule + Pos = mkPos 1 0 } \ No newline at end of file diff --git a/src/fsharp/vs/ServiceAssemblyContent.fsi b/src/fsharp/service/ServiceAssemblyContent.fsi similarity index 76% rename from src/fsharp/vs/ServiceAssemblyContent.fsi rename to src/fsharp/service/ServiceAssemblyContent.fsi index 03e8ccfa81a..10c9dc4baa3 100644 --- a/src/fsharp/vs/ServiceAssemblyContent.fsi +++ b/src/fsharp/service/ServiceAssemblyContent.fsi @@ -10,69 +10,37 @@ open Microsoft.FSharp.Compiler open Microsoft.FSharp.Compiler.Range /// Assembly content type. -#if COMPILER_PUBLIC_API -type AssemblyContentType = -#else -type internal AssemblyContentType = -#endif +type public AssemblyContentType = /// Public assembly content only. | Public /// All assembly content. | Full /// Short identifier, i.e. an identifier that contains no dots. -#if COMPILER_PUBLIC_API -type ShortIdent = string -#else -type internal ShortIdent = string -#endif +type public ShortIdent = string /// An array of `ShortIdent`. -#if COMPILER_PUBLIC_API -type Idents = ShortIdent[] -#else -type internal Idents = ShortIdent[] -#endif +type public Idents = ShortIdent[] /// `ShortIdent` with a flag indicating if it's resolved in some scope. -#if COMPILER_PUBLIC_API -type MaybeUnresolvedIdent = -#else -type internal MaybeUnresolvedIdent = -#endif +type public MaybeUnresolvedIdent = { Ident: ShortIdent; Resolved: bool } /// Array of `MaybeUnresolvedIdent`. -#if COMPILER_PUBLIC_API -type MaybeUnresolvedIdents = MaybeUnresolvedIdent[] -#else -type internal MaybeUnresolvedIdents = MaybeUnresolvedIdent[] -#endif +type public MaybeUnresolvedIdents = MaybeUnresolvedIdent[] /// Entity lookup type. [] -#if COMPILER_PUBLIC_API -type LookupType = -#else -type internal LookupType = -#endif +type public LookupType = | Fuzzy | Precise /// Assembly path. -#if COMPILER_PUBLIC_API -type AssemblyPath = string -#else -type internal AssemblyPath = string -#endif +type public AssemblyPath = string /// Represents type, module, member, function or value in a compiled assembly. [] -#if COMPILER_PUBLIC_API -type AssemblySymbol = -#else -type internal AssemblySymbol = -#endif +type public AssemblySymbol = { /// Full entity name as it's seen in compiled code (raw FSharpEntity.FullName, FSharpValueOrFunction.FullName). FullName: string /// Entity name parts with removed module suffixes (Ns.M1Module.M2Module.M3.entity -> Ns.M1.M2.M3.entity) @@ -89,7 +57,9 @@ type internal AssemblySymbol = AutoOpenParent: Idents option Symbol: FSharpSymbol /// Function that returns `EntityKind` based of given `LookupKind`. - Kind: LookupType -> EntityKind } + Kind: LookupType -> EntityKind + /// Cache display name and namespace, used for completion. + UnresolvedSymbol: UnresolvedSymbol } /// `RawEntity` list retrieved from an assembly. type internal AssemblyContentCacheEntry = @@ -102,22 +72,14 @@ type internal AssemblyContentCacheEntry = /// Assembly content cache. [] -#if COMPILER_PUBLIC_API -type IAssemblyContentCache = -#else -type internal IAssemblyContentCache = -#endif +type public IAssemblyContentCache = /// Try get an assembly cached content. abstract TryGet: AssemblyPath -> AssemblyContentCacheEntry option /// Store an assembly content. abstract Set: AssemblyPath -> AssemblyContentCacheEntry -> unit /// Thread safe wrapper over `IAssemblyContentCache`. -#if COMPILER_PUBLIC_API -type EntityCache = -#else -type internal EntityCache = -#endif +type public EntityCache = interface IAssemblyContentCache new : unit -> EntityCache /// Clears the cache. @@ -126,18 +88,10 @@ type internal EntityCache = member Locking : (IAssemblyContentCache -> 'T) -> 'T /// Lond identifier (i.e. it may contain dots). -#if COMPILER_PUBLIC_API -type StringLongIdent = string -#else -type internal StringLongIdent = string -#endif +type public StringLongIdent = string /// Helper data structure representing a symbol, sutable for implementing unresolved identifiers resolution code fixes. -#if COMPILER_PUBLIC_API -type Entity = -#else -type internal Entity = -#endif +type public Entity = { /// Full name, relative to the current scope. FullRelativeName: StringLongIdent /// Ident parts needed to append to the current ident to make it resolvable in current scope. @@ -150,11 +104,7 @@ type internal Entity = LastIdent: string } /// Provides assembly content. -#if COMPILER_PUBLIC_API -module AssemblyContentProvider = -#else -module internal AssemblyContentProvider = -#endif +module public AssemblyContentProvider = /// Given a `FSharpAssemblySignature`, returns assembly content. val getAssemblySignatureContent : AssemblyContentType -> FSharpAssemblySignature -> AssemblySymbol list @@ -167,11 +117,7 @@ module internal AssemblyContentProvider = -> AssemblySymbol list /// Kind of lexical scope. -#if COMPILER_PUBLIC_API -type ScopeKind = -#else -type internal ScopeKind = -#endif +type public ScopeKind = | Namespace | TopModule | NestedModule @@ -179,31 +125,19 @@ type internal ScopeKind = | HashDirective /// Insert open namespace context. -#if COMPILER_PUBLIC_API -type InsertContext = -#else -type internal InsertContext = -#endif +type public InsertContext = { /// Current scope kind. ScopeKind: ScopeKind /// Current position (F# compiler line number). Pos: pos } /// Where open statements should be added. -#if COMPILER_PUBLIC_API -type OpenStatementInsertionPoint = -#else -type internal OpenStatementInsertionPoint = -#endif +type public OpenStatementInsertionPoint = | TopLevel | Nearest /// Parse AST helpers. -#if COMPILER_PUBLIC_API -module ParsedInput = -#else -module internal ParsedInput = -#endif +module public ParsedInput = /// Returns `InsertContext` based on current position and symbol idents. val tryFindInsertionContext : @@ -213,7 +147,7 @@ module internal ParsedInput = (( (* requiresQualifiedAccessParent: *) Idents option * (* autoOpenParent: *) Idents option * (* entityNamespace *) Idents option * (* entity: *) Idents) -> (Entity * InsertContext)[]) /// Returns `InsertContext` based on current position and symbol idents. - val tryFindNearestPointToInsertOpenDeclaration : currentLine: int -> ast: Ast.ParsedInput -> entity: Idents -> insertionPoint: OpenStatementInsertionPoint -> InsertContext option + val findNearestPointToInsertOpenDeclaration : currentLine: int -> ast: Ast.ParsedInput -> entity: Idents -> insertionPoint: OpenStatementInsertionPoint -> InsertContext /// Returns lond identifier at position. val getLongIdentAt : ast: Ast.ParsedInput -> pos: Range.pos -> Ast.LongIdent option @@ -222,11 +156,7 @@ module internal ParsedInput = val adjustInsertionPoint : getLineStr: (int -> string) -> ctx: InsertContext -> pos [] -#if COMPILER_PUBLIC_API -module Extensions = -#else -module internal Extensions = -#endif +module public Extensions = type FSharpEntity with /// Safe version of `FullName`. member TryGetFullName : unit -> string option diff --git a/src/fsharp/vs/ServiceConstants.fs b/src/fsharp/service/ServiceConstants.fs similarity index 100% rename from src/fsharp/vs/ServiceConstants.fs rename to src/fsharp/service/ServiceConstants.fs diff --git a/src/fsharp/vs/ServiceDeclarationLists.fs b/src/fsharp/service/ServiceDeclarationLists.fs similarity index 91% rename from src/fsharp/vs/ServiceDeclarationLists.fs rename to src/fsharp/service/ServiceDeclarationLists.fs index 1a9a90c83c7..fc87de946d1 100644 --- a/src/fsharp/vs/ServiceDeclarationLists.fs +++ b/src/fsharp/service/ServiceDeclarationLists.fs @@ -7,18 +7,11 @@ namespace Microsoft.FSharp.Compiler.SourceCodeServices -open System -open System.Collections.Generic -open System.IO - -open Microsoft.FSharp.Core.Printf open Microsoft.FSharp.Compiler open Microsoft.FSharp.Compiler.AbstractIL.IL open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library open Microsoft.FSharp.Compiler.AbstractIL.Diagnostics - open Microsoft.FSharp.Compiler.AccessibilityLogic -open Microsoft.FSharp.Compiler.Ast open Microsoft.FSharp.Compiler.ErrorLogger open Microsoft.FSharp.Compiler.Layout open Microsoft.FSharp.Compiler.Layout.TaggedTextOps @@ -27,7 +20,6 @@ open Microsoft.FSharp.Compiler.PrettyNaming open Microsoft.FSharp.Compiler.Range open Microsoft.FSharp.Compiler.Tast open Microsoft.FSharp.Compiler.Tastops -open Microsoft.FSharp.Compiler.TcGlobals open Microsoft.FSharp.Compiler.Infos open Microsoft.FSharp.Compiler.NameResolution open Microsoft.FSharp.Compiler.InfoReader @@ -63,8 +55,8 @@ type FSharpMethodGroupItemParameter(name: string, canonicalTypeTextForSorting: s [] module internal DescriptionListsImpl = - let isFunction g typ = - let _,tau = tryDestForallTy g typ + let isFunction g ty = + let _,tau = tryDestForallTy g ty isFunTy g tau let printCanonicalizedTypeName g (denv:DisplayEnv) tau = @@ -92,14 +84,14 @@ module internal DescriptionListsImpl = else // TODO: in this case ucinst is ignored - it gives the instantiation of the type parameters of // the union type containing this case. - NicePrint.layoutOfParamData denv (ParamData(false, false, NotOptional, NoCallerInfo, Some f.Id, ReflectedArgInfo.None, f.FormalType)) + NicePrint.layoutOfParamData denv (ParamData(false, false, false, NotOptional, NoCallerInfo, Some f.Id, ReflectedArgInfo.None, f.FormalType)) FSharpMethodGroupItemParameter( name=initial.ParameterName, canonicalTypeTextForSorting=initial.CanonicalTypeTextForSorting, display=display, isOptional=false) - let ParamOfParamData g denv (ParamData(_isParamArrayArg, _isOutArg, optArgInfo, _callerInfoInfo, nmOpt, _reflArgInfo, pty) as paramData) = + let ParamOfParamData g denv (ParamData(_isParamArrayArg, _isInArg, _isOutArg, optArgInfo, _callerInfo, nmOpt, _reflArgInfo, pty) as paramData) = FSharpMethodGroupItemParameter( name = (match nmOpt with None -> "" | Some pn -> pn.idText), canonicalTypeTextForSorting = printCanonicalizedTypeName g denv pty, @@ -110,14 +102,14 @@ module internal DescriptionListsImpl = let PrettyParamsOfParamDatas g denv typarInst (paramDatas:ParamData list) rty = let paramInfo,paramTypes = paramDatas - |> List.map (fun (ParamData(isParamArrayArg, _isOutArg, optArgInfo, _callerInfoInfo, nmOpt, _reflArgInfo, pty)) -> + |> List.map (fun (ParamData(isParamArrayArg, _isInArg, _isOutArg, optArgInfo, _callerInfo, nmOpt, _reflArgInfo, pty)) -> let isOptArg = optArgInfo.IsOptional match nmOpt, isOptArg, tryDestOptionTy denv.g pty with // Layout an optional argument | Some id, true, ptyOpt -> let nm = id.idText // detect parameter type, if ptyOpt is None - this is .NET style optional argument - let pty = defaultArg ptyOpt pty + let pty = match ptyOpt with ValueSome x -> x | _ -> pty (nm, isOptArg, SepL.questionMark ^^ (wordL (TaggedTextOps.tagParameter nm))), pty // Layout an unnamed argument | None, _,_ -> @@ -186,8 +178,8 @@ module internal DescriptionListsImpl = | SymbolHelpers.ItemIsWithStaticArguments m g staticParameters -> staticParameters |> Array.map (fun sp -> - let typ = Import.ImportProvidedType amap m (sp.PApply((fun x -> x.ParameterType),m)) - let spKind = NicePrint.prettyLayoutOfType denv typ + let ty = Import.ImportProvidedType amap m (sp.PApply((fun x -> x.ParameterType),m)) + let spKind = NicePrint.prettyLayoutOfType denv ty let spName = sp.PUntaint((fun sp -> sp.Name), m) let spOpt = sp.PUntaint((fun sp -> sp.IsOptional), m) FSharpMethodGroupItemParameter( @@ -212,13 +204,13 @@ module internal DescriptionListsImpl = let getPrettyParamsOfTypes() = let tau = vref.TauType match tryDestFunTy denv.g tau with - | Some(arg,rtau) -> + | ValueSome(arg,rtau) -> let args = tryDestRefTupleTy denv.g arg let _prettyTyparInst, prettyParams, prettyRetTyL, _prettyConstraintsL = PrettyParamsOfTypes g denv item.TyparInst args rtau // FUTURE: prettyTyparInst is the pretty version of the known instantiations of type parameters in the output. It could be returned // for display as part of the method group prettyParams, prettyRetTyL - | None -> + | _ -> let _prettyTyparInst, prettyTyL = NicePrint.prettyLayoutOfUncurriedSig denv item.TyparInst [] tau [], prettyTyL @@ -244,13 +236,13 @@ module internal DescriptionListsImpl = let firstCurriedParamDatas = firstCurriedArgInfo |> List.map ParamNameAndType.FromArgInfo - |> List.map (fun (ParamNameAndType(nmOpt, pty)) -> ParamData(false, false, NotOptional, NoCallerInfo, nmOpt, ReflectedArgInfo.None, pty)) + |> List.map (fun (ParamNameAndType(nmOpt, pty)) -> ParamData(false, false, false, NotOptional, NoCallerInfo, nmOpt, ReflectedArgInfo.None, pty)) // Adjust the return type so it only strips the first argument let curriedRetTy = match tryDestFunTy denv.g vref.TauType with - | Some(_,rtau) -> rtau - | None -> lastRetTy + | ValueSome(_,rtau) -> rtau + | _ -> lastRetTy let _prettyTyparInst, prettyFirstCurriedParams, prettyCurriedRetTyL, prettyConstraintsL = PrettyParamsOfParamDatas g denv item.TyparInst firstCurriedParamDatas curriedRetTy @@ -328,7 +320,7 @@ module internal DescriptionListsImpl = | None -> let argNamesAndTys = SymbolHelpers.ParamNameAndTypesOfUnaryCustomOperation g minfo let argTys, _ = PrettyTypes.PrettifyTypes g (argNamesAndTys |> List.map (fun (ParamNameAndType(_,ty)) -> ty)) - let paramDatas = (argNamesAndTys, argTys) ||> List.map2 (fun (ParamNameAndType(nmOpt, _)) argTy -> ParamData(false, false, NotOptional, NoCallerInfo, nmOpt, ReflectedArgInfo.None,argTy)) + let paramDatas = (argNamesAndTys, argTys) ||> List.map2 (fun (ParamNameAndType(nmOpt, _)) argTy -> ParamData(false, false, false, NotOptional, NoCallerInfo, nmOpt, ReflectedArgInfo.None,argTy)) let rty = minfo.GetFSharpReturnTy(amap, m, minfo.FormalMethodInst) let _prettyTyparInst, prettyParams, prettyRetTyL, _prettyConstraintsL = PrettyParamsOfParamDatas g denv item.TyparInst paramDatas rty @@ -341,15 +333,15 @@ module internal DescriptionListsImpl = let _prettyTyparInst, prettyRetTyL = NicePrint.prettyLayoutOfUncurriedSig denv item.TyparInst [] rty [], prettyRetTyL // no parameter data available for binary operators like 'zip', 'join' and 'groupJoin' since they use bespoke syntax - | Item.FakeInterfaceCtor typ -> - let _prettyTyparInst, prettyRetTyL = NicePrint.prettyLayoutOfUncurriedSig denv item.TyparInst [] typ + | Item.FakeInterfaceCtor ty -> + let _prettyTyparInst, prettyRetTyL = NicePrint.prettyLayoutOfUncurriedSig denv item.TyparInst [] ty [], prettyRetTyL | Item.DelegateCtor delty -> let (SigOfFunctionForDelegate(_, _, _, fty)) = GetSigOfFunctionForDelegate infoReader delty m AccessibleFromSomewhere // No need to pass more generic type information in here since the instanitations have already been applied - let _prettyTyparInst, prettyParams, prettyRetTyL, _prettyConstraintsL = PrettyParamsOfParamDatas g denv item.TyparInst [ParamData(false, false, NotOptional, NoCallerInfo, None, ReflectedArgInfo.None, fty)] delty + let _prettyTyparInst, prettyParams, prettyRetTyL, _prettyConstraintsL = PrettyParamsOfParamDatas g denv item.TyparInst [ParamData(false, false, false, NotOptional, NoCallerInfo, None, ReflectedArgInfo.None, fty)] delty // FUTURE: prettyTyparInst is the pretty version of the known instantiations of type parameters in the output. It could be returned // for display as part of the method group @@ -374,12 +366,11 @@ module internal DescriptionListsImpl = | TRecdRepr _ -> FSharpGlyph.Type | TUnionRepr _ -> FSharpGlyph.Union | TILObjectRepr (TILObjectReprData (_,_,td)) -> - match td.tdKind with - | ILTypeDefKind.Class -> FSharpGlyph.Class - | ILTypeDefKind.ValueType -> FSharpGlyph.Struct - | ILTypeDefKind.Interface -> FSharpGlyph.Interface - | ILTypeDefKind.Enum -> FSharpGlyph.Enum - | ILTypeDefKind.Delegate -> FSharpGlyph.Delegate + if td.IsClass then FSharpGlyph.Class + elif td.IsStruct then FSharpGlyph.Struct + elif td.IsInterface then FSharpGlyph.Interface + elif td.IsEnum then FSharpGlyph.Enum + else FSharpGlyph.Delegate | TAsmRepr _ -> FSharpGlyph.Typedef | TMeasureableRepr _-> FSharpGlyph.Typedef #if !NO_EXTENSIONTYPING @@ -389,15 +380,15 @@ module internal DescriptionListsImpl = | TNoRepr -> FSharpGlyph.Class /// Find the glyph for the given type representation. - let typeToGlyph typ = - if isAppTy denv.g typ then - let tcref = tcrefOfAppTy denv.g typ - tcref.TypeReprInfo |> reprToGlyph - elif isStructTupleTy denv.g typ then FSharpGlyph.Struct - elif isRefTupleTy denv.g typ then FSharpGlyph.Class - elif isFunction denv.g typ then FSharpGlyph.Delegate - elif isTyparTy denv.g typ then FSharpGlyph.Struct - else FSharpGlyph.Typedef + let typeToGlyph ty = + match tryDestAppTy denv.g ty with + | ValueSome tcref -> tcref.TypeReprInfo |> reprToGlyph + | _ -> + if isStructTupleTy denv.g ty then FSharpGlyph.Struct + elif isRefTupleTy denv.g ty then FSharpGlyph.Class + elif isFunction denv.g ty then FSharpGlyph.Delegate + elif isTyparTy denv.g ty then FSharpGlyph.Struct + else FSharpGlyph.Typedef // This may explore assemblies that are not in the reference set, // e.g. for type abbreviations to types not in the reference set. @@ -408,7 +399,7 @@ module internal DescriptionListsImpl = if isFunction denv.g vref.Type then FSharpGlyph.Method elif vref.LiteralValue.IsSome then FSharpGlyph.Constant else FSharpGlyph.Variable - | Item.Types(_,typ::_) -> typeToGlyph (stripTyEqns denv.g typ) + | Item.Types(_,ty::_) -> typeToGlyph (stripTyEqns denv.g ty) | Item.UnionCase _ | Item.ActivePatternCase _ -> FSharpGlyph.EnumMember | Item.ExnCase _ -> FSharpGlyph.Exception @@ -438,7 +429,7 @@ module internal DescriptionListsImpl = if tydef.IsInterface then FSharpGlyph.Interface elif tydef.IsDelegate then FSharpGlyph.Delegate elif tydef.IsEnum then FSharpGlyph.Enum - elif tydef.IsStructOrEnum then FSharpGlyph.Struct + elif tydef.IsStruct then FSharpGlyph.Struct else FSharpGlyph.Class else FSharpGlyph.Class | Item.ModuleOrNamespaces(modref::_) -> @@ -556,6 +547,8 @@ type FSharpDeclarationListItem(name: string, nameInCode: string, fullName: strin /// A table of declarations for Intellisense completion [] type FSharpDeclarationListInfo(declarations: FSharpDeclarationListItem[], isForType: bool, isError: bool) = + static let fsharpNamespace = [|"Microsoft"; "FSharp"|] + member __.Items = declarations member __.IsForType = isForType member __.IsError = isError @@ -567,9 +560,9 @@ type FSharpDeclarationListInfo(declarations: FSharpDeclarationListItem[], isForT let items = items |> SymbolHelpers.RemoveExplicitlySuppressedCompletionItems g let tyconRefOptEq tref1 tref2 = - match tref1 with - | Some tref1 -> tyconRefEq g tref1 tref2 - | None -> false + match tref1, tref2 with + | Some tref1, tref2 -> tyconRefEq g tref1 tref2 + | _ -> false // Adjust items priority. Sort by name. For things with the same name, // - show types with fewer generic parameters first @@ -583,10 +576,10 @@ type FSharpDeclarationListInfo(declarations: FSharpDeclarationListItem[], isForT | Item.FakeInterfaceCtor (TType_app(tcref,_)) | Item.DelegateCtor (TType_app(tcref,_)) -> { x with MinorPriority = 1000 + tcref.TyparsNoRange.Length } // Put type ctors after types, sorted by #typars. RemoveDuplicateItems will remove DefaultStructCtors if a type is also reported with this name - | Item.CtorGroup (_, (cinfo :: _)) -> { x with MinorPriority = 1000 + 10 * (tcrefOfAppTy g cinfo.EnclosingType).TyparsNoRange.Length } - | Item.MethodGroup(_, minfo :: _, _) -> { x with IsOwnMember = tyconRefOptEq x.Type minfo.DeclaringEntityRef } - | Item.Property(_, pinfo :: _) -> { x with IsOwnMember = tyconRefOptEq x.Type (tcrefOfAppTy g pinfo.EnclosingType) } - | Item.ILField finfo -> { x with IsOwnMember = tyconRefOptEq x.Type (tcrefOfAppTy g finfo.EnclosingType) } + | Item.CtorGroup (_, (cinfo :: _)) -> { x with MinorPriority = 1000 + 10 * cinfo.DeclaringTyconRef.TyparsNoRange.Length } + | Item.MethodGroup(_, minfo :: _, _) -> { x with IsOwnMember = tyconRefOptEq x.Type minfo.DeclaringTyconRef } + | Item.Property(_, pinfo :: _) -> { x with IsOwnMember = tyconRefOptEq x.Type pinfo.DeclaringTyconRef } + | Item.ILField finfo -> { x with IsOwnMember = tyconRefOptEq x.Type finfo.DeclaringTyconRef } | _ -> x) |> List.sortBy (fun x -> x.MinorPriority) |> List.fold (fun (prevRealPrior, prevNormalizedPrior, acc) x -> @@ -622,15 +615,23 @@ type FSharpDeclarationListInfo(declarations: FSharpDeclarationListItem[], isForT | None -> item.Item.DisplayName name, items) - // Filter out operators (and list) + // Filter out operators, active patterns (as values) and the empty list let items = // Check whether this item looks like an operator. let isOperatorItem(name, items: CompletionItem list) = match items |> List.map (fun x -> x.Item) with | [Item.Value _ | Item.MethodGroup _ | Item.UnionCase _] -> IsOperatorName name | _ -> false - let isFSharpList name = (name = "[]") // list shows up as a Type and a UnionCase, only such entity with a symbolic name, but want to filter out of intellisense - items |> List.filter (fun (displayName, items) -> not (isOperatorItem(displayName, items)) && not (isFSharpList displayName)) + + let isActivePatternItem (items: CompletionItem list) = + match items |> List.map (fun x -> x.Item) with + | [Item.Value vref] -> IsActivePatternName vref.CompiledName + | _ -> false + + items |> List.filter (fun (displayName, items) -> + not (isOperatorItem(displayName, items)) && + not (displayName = "[]") && // list shows up as a Type and a UnionCase, only such entity with a symbolic name, but want to filter out of intellisense + not (isActivePatternItem items)) let decls = items @@ -648,7 +649,7 @@ type FSharpDeclarationListInfo(declarations: FSharpDeclarationListItem[], isForT let glyph = GlyphOfItem(denv, item.Item) let name, nameInCode = - if displayName.StartsWith "( " && displayName.EndsWith " )" then + if displayName.StartsWithOrdinal("( ") && displayName.EndsWithOrdinal(" )") then let cleanName = displayName.[2..displayName.Length - 3] cleanName, if IsOperatorName displayName then cleanName else "``" + cleanName + "``" @@ -658,22 +659,26 @@ type FSharpDeclarationListInfo(declarations: FSharpDeclarationListItem[], isForT | Some _ -> displayName | None -> Lexhelp.Keywords.QuoteIdentifierIfNeeded displayName - let isAttribute = SymbolHelpers.IsAttribute infoReader item.Item - + let isAttributeItem = lazy (SymbolHelpers.IsAttribute infoReader item.Item) + let cutAttributeSuffix (name: string) = - if isAttributeApplicationContext && isAttribute && name <> "Attribute" && name.EndsWith "Attribute" then + if isAttributeApplicationContext && name <> "Attribute" && name.EndsWithOrdinal("Attribute") && isAttributeItem.Value then name.[0..name.Length - "Attribute".Length - 1] else name let name = cutAttributeSuffix name let nameInCode = cutAttributeSuffix nameInCode - let fullName = SymbolHelpers.FullNameOfItem g item.Item + + let fullName = + match item.Unresolved with + | Some x -> x.FullName + | None -> SymbolHelpers.FullNameOfItem g item.Item let namespaceToOpen = item.Unresolved |> Option.map (fun x -> x.Namespace) |> Option.bind (fun ns -> - if ns |> Array.startsWith [|"Microsoft"; "FSharp"|] then None + if ns |> Array.startsWith fsharpNamespace then None else Some ns) |> Option.map (fun ns -> match currentNamespaceOrModule with @@ -684,7 +689,7 @@ type FSharpDeclarationListInfo(declarations: FSharpDeclarationListItem[], isForT | None -> ns) |> Option.bind (function | [||] -> None - | ns -> Some (ns |> String.concat ".")) + | ns -> Some (System.String.Join(".", ns))) FSharpDeclarationListItem( name, nameInCode, fullName, glyph, Choice1Of2 (items, infoReader, m, denv, reactor, checkAlive), getAccessibility item.Item, @@ -744,7 +749,7 @@ type FSharpMethodGroup( name: string, unsortedMethods: FSharpMethodGroupItem[] ) // BUG 413009 : [ParameterInfo] takes about 3 seconds to move from one overload parameter to another // cache allows to avoid recomputing parameterinfo for the same item #if !FX_NO_WEAKTABLE - static let methodOverloadsCache = System.Runtime.CompilerServices.ConditionalWeakTable() + static let methodOverloadsCache = System.Runtime.CompilerServices.ConditionalWeakTable() #endif let methods = diff --git a/src/fsharp/vs/ServiceDeclarationLists.fsi b/src/fsharp/service/ServiceDeclarationLists.fsi similarity index 88% rename from src/fsharp/vs/ServiceDeclarationLists.fsi rename to src/fsharp/service/ServiceDeclarationLists.fsi index 1ed6e5d4e11..2beee7024f9 100644 --- a/src/fsharp/vs/ServiceDeclarationLists.fsi +++ b/src/fsharp/service/ServiceDeclarationLists.fsi @@ -5,13 +5,9 @@ namespace Microsoft.FSharp.Compiler.SourceCodeServices -open Microsoft.FSharp.Compiler open Microsoft.FSharp.Compiler.Range -open Microsoft.FSharp.Compiler.TcGlobals -open Microsoft.FSharp.Compiler.Infos open Microsoft.FSharp.Compiler.NameResolution open Microsoft.FSharp.Compiler.InfoReader -open Microsoft.FSharp.Compiler.Tast open Microsoft.FSharp.Compiler.Tastops @@ -20,11 +16,7 @@ open Microsoft.FSharp.Compiler.Tastops /// Returned by GetDeclarations. // // Note: this type holds a weak reference to compiler resources. -#if COMPILER_PUBLIC_API -type FSharpDeclarationListItem = -#else -type internal FSharpDeclarationListItem = -#endif +type public FSharpDeclarationListItem = /// Get the display name for the declaration. member Name : string @@ -66,11 +58,7 @@ type internal FSharpDeclarationListItem = /// Returned by GetDeclarations. // // Note: this type holds a weak reference to compiler resources. -#if COMPILER_PUBLIC_API -type FSharpDeclarationListInfo = -#else -type internal FSharpDeclarationListInfo = -#endif +type public FSharpDeclarationListInfo = member Items : FSharpDeclarationListItem[] @@ -87,11 +75,7 @@ type internal FSharpDeclarationListInfo = /// Represents one parameter for one method (or other item) in a group. [] -#if COMPILER_PUBLIC_API -type FSharpMethodGroupItemParameter = -#else -type internal FSharpMethodGroupItemParameter = -#endif +type public FSharpMethodGroupItemParameter = /// The name of the parameter. member ParameterName: string @@ -113,11 +97,7 @@ type internal FSharpMethodGroupItemParameter = /// Represents one method (or other item) in a method group. The item may represent either a method or /// a single, non-overloaded item such as union case or a named function value. [] -#if COMPILER_PUBLIC_API -type FSharpMethodGroupItem = -#else -type internal FSharpMethodGroupItem = -#endif +type public FSharpMethodGroupItem = /// The documentation for the item member XmlDoc : FSharpXmlDoc @@ -148,11 +128,7 @@ type internal FSharpMethodGroupItem = /// Represents a group of methods (or other items) returned by GetMethods. [] -#if COMPILER_PUBLIC_API -type FSharpMethodGroup = -#else -type internal FSharpMethodGroup = -#endif +type public FSharpMethodGroup = internal new : string * FSharpMethodGroupItem[] -> FSharpMethodGroup diff --git a/src/fsharp/vs/ServiceInterfaceStubGenerator.fs b/src/fsharp/service/ServiceInterfaceStubGenerator.fs similarity index 93% rename from src/fsharp/vs/ServiceInterfaceStubGenerator.fs rename to src/fsharp/service/ServiceInterfaceStubGenerator.fs index 4f62581f1bf..dccb9a91db9 100644 --- a/src/fsharp/vs/ServiceInterfaceStubGenerator.fs +++ b/src/fsharp/service/ServiceInterfaceStubGenerator.fs @@ -107,14 +107,14 @@ type internal InterfaceData = | ObjExpr of SynType * SynBinding list member x.Range = match x with - | InterfaceData.Interface(typ, _) -> - typ.Range - | InterfaceData.ObjExpr(typ, _) -> - typ.Range + | InterfaceData.Interface(ty, _) -> + ty.Range + | InterfaceData.ObjExpr(ty, _) -> + ty.Range member x.TypeParameters = match x with - | InterfaceData.Interface(typ, _) - | InterfaceData.ObjExpr(typ, _) -> + | InterfaceData.Interface(ty, _) + | InterfaceData.ObjExpr(ty, _) -> let rec (|RationalConst|) = function | SynRationalConst.Integer i -> string i @@ -161,7 +161,7 @@ type internal InterfaceData = Some (sprintf "%s/%s" numerator denominator) | _ -> None - match typ with + match ty with | SynType.App(_, _, ts, _, _, _, _) | SynType.LongIdentApp(_, _, _, ts, _, _, _) -> ts |> Seq.choose (|TypeIdent|_|) |> Seq.toArray @@ -203,8 +203,8 @@ module internal InterfaceStubGenerator = let internal bracket (str: string) = if str.Contains(" ") then "(" + str + ")" else str - let internal formatType ctx (typ: FSharpType) = - let genericDefinition = typ.Instantiate(Seq.toList ctx.ArgInstantiations).Format(ctx.DisplayContext) + let internal formatType ctx (ty: FSharpType) = + let genericDefinition = ty.Instantiate(Seq.toList ctx.ArgInstantiations).Format(ctx.DisplayContext) (genericDefinition, ctx.TypeInstantations) ||> Map.fold (fun s k v -> s.Replace(k, v)) @@ -213,7 +213,7 @@ module internal InterfaceStubGenerator = let nm = match arg.Name with | None -> - if arg.Type.HasTypeDefinition && arg.Type.TypeDefinition.XmlDocSig = "T:Microsoft.FSharp.Core.unit" then "()" + if arg.Type.HasTypeDefinition && arg.Type.TypeDefinition.CompiledName = "unit" && arg.Type.TypeDefinition.Namespace = Some "Microsoft.FSharp.Core" then "()" else sprintf "arg%d" (namesWithIndices |> Map.toSeq |> Seq.map snd |> Seq.sumBy Set.count |> max 1) | Some x -> x @@ -269,11 +269,11 @@ module internal InterfaceStubGenerator = let retType = match retType with - | Some typ -> - let coreType = formatType ctx typ + | Some ty -> + let coreType = formatType ctx ty if v.IsEvent then let isEventHandler = - typ.BaseType + ty.BaseType |> Option.bind (fun t -> if t.HasTypeDefinition then t.TypeDefinition.TryGetFullName() @@ -289,8 +289,8 @@ module internal InterfaceStubGenerator = /// Convert a getter/setter to its canonical form let internal normalizePropertyName (v: FSharpMemberOrFunctionOrValue) = let displayName = v.DisplayName - if (v.IsPropertyGetterMethod && displayName.StartsWith("get_")) || - (v.IsPropertySetterMethod && displayName.StartsWith("set_")) then + if (v.IsPropertyGetterMethod && displayName.StartsWithOrdinal("get_")) || + (v.IsPropertySetterMethod && displayName.StartsWithOrdinal("set_")) then displayName.[4..] else displayName @@ -302,12 +302,13 @@ module internal InterfaceStubGenerator = let args, namesWithIndices = match argInfos with | [[x]] when v.IsPropertyGetterMethod && x.Name.IsNone - && x.Type.TypeDefinition.XmlDocSig = "T:Microsoft.FSharp.Core.unit" -> + && x.Type.TypeDefinition.CompiledName = "unit" + && x.Type.TypeDefinition.Namespace = Some "Microsoft.FSharp.Core" -> "", Map.ofList [ctx.ObjectIdent, Set.empty] | _ -> formatArgsUsage ctx verboseMode v argInfos if String.IsNullOrWhiteSpace(args) then "" - elif args.StartsWith("(") then args + elif args.StartsWithOrdinal("(") then args elif v.CurriedParameterGroups.Count > 1 && (not verboseMode) then " " + args else sprintf "(%s)" args , namesWithIndices @@ -320,12 +321,12 @@ module internal InterfaceStubGenerator = | _, _, ".ctor", _ -> "new" + parArgs // Properties (skipping arguments) | _, true, _, name when v.IsPropertyGetterMethod || v.IsPropertySetterMethod -> - if name.StartsWith("get_") || name.StartsWith("set_") then name.[4..] else name + if name.StartsWithOrdinal("get_") || name.StartsWithOrdinal("set_") then name.[4..] else name // Ordinary instance members | _, true, _, name -> name + parArgs // Ordinary functions or values | false, _, _, name when - not (Symbol.hasAttribute v.LogicalEnclosingEntity.Attributes) -> + not (Symbol.hasAttribute v.ApparentEnclosingEntity.Attributes) -> name + " " + parArgs // Ordinary static members or things (?) that require fully qualified access | _, _, _, name -> name + parArgs @@ -434,31 +435,31 @@ module internal InterfaceStubGenerator = writer |> closeDeclaration writer |> writeImplementation - let rec internal getNonAbbreviatedType (typ: FSharpType) = - if typ.HasTypeDefinition && typ.TypeDefinition.IsFSharpAbbreviation then - getNonAbbreviatedType typ.AbbreviatedType - else typ + let rec internal getNonAbbreviatedType (ty: FSharpType) = + if ty.HasTypeDefinition && ty.TypeDefinition.IsFSharpAbbreviation then + getNonAbbreviatedType ty.AbbreviatedType + else ty // Sometimes interface members are stored in the form of `IInterface<'T> -> ...`, // so we need to get the 2nd generic argument - let internal (|MemberFunctionType|_|) (typ: FSharpType) = - if typ.IsFunctionType && typ.GenericArguments.Count = 2 then - Some typ.GenericArguments.[1] + let internal (|MemberFunctionType|_|) (ty: FSharpType) = + if ty.IsFunctionType && ty.GenericArguments.Count = 2 then + Some ty.GenericArguments.[1] else None let internal (|TypeOfMember|_|) (m: FSharpMemberOrFunctionOrValue) = match m.FullTypeSafe with - | Some (MemberFunctionType typ) when m.IsProperty && m.EnclosingEntity.IsSome && m.EnclosingEntity.Value.IsFSharp -> - Some typ - | Some typ -> Some typ + | Some (MemberFunctionType ty) when m.IsProperty && m.DeclaringEntity.IsSome && m.DeclaringEntity.Value.IsFSharp -> + Some ty + | Some ty -> Some ty | None -> None - let internal (|EventFunctionType|_|) (typ: FSharpType) = - match typ with - | MemberFunctionType typ -> - if typ.IsFunctionType && typ.GenericArguments.Count = 2 then - let retType = typ.GenericArguments.[0] - let argType = typ.GenericArguments.[1] + let internal (|EventFunctionType|_|) (ty: FSharpType) = + match ty with + | MemberFunctionType ty -> + if ty.IsFunctionType && ty.GenericArguments.Count = 2 then + let retType = ty.GenericArguments.[0] + let argType = ty.GenericArguments.[1] if argType.GenericArguments.Count = 2 then Some (argType.GenericArguments.[0], retType) else None @@ -472,9 +473,9 @@ module internal InterfaceStubGenerator = /// Filter out duplicated interfaces in inheritance chain let rec internal getInterfaces (e: FSharpEntity) = seq { for iface in e.AllInterfaces -> - let typ = getNonAbbreviatedType iface + let ty = getNonAbbreviatedType iface // Argument should be kept lazy so that it is only evaluated when instantiating a new type - typ.TypeDefinition, Seq.zip typ.TypeDefinition.GenericParameters typ.GenericArguments + ty.TypeDefinition, Seq.zip ty.TypeDefinition.GenericParameters ty.GenericArguments } |> Seq.distinct @@ -508,10 +509,10 @@ module internal InterfaceStubGenerator = let internal (|MemberNameAndRange|_|) = function | Binding(_access, _bindingKind, _isInline, _isMutable, _attrs, _xmldoc, SynValData(Some mf, _, _), LongIdentPattern(name, range), _retTy, _expr, _bindingRange, _seqPoint) when mf.MemberKind = MemberKind.PropertyGet -> - if name.StartsWith("get_") then Some(name, range) else Some("get_" + name, range) + if name.StartsWithOrdinal("get_") then Some(name, range) else Some("get_" + name, range) | Binding(_access, _bindingKind, _isInline, _isMutable, _attrs, _xmldoc, SynValData(Some mf, _, _), LongIdentPattern(name, range), _retTy, _expr, _bindingRange, _seqPoint) when mf.MemberKind = MemberKind.PropertySet -> - if name.StartsWith("set_") then Some(name, range) else Some("set_" + name, range) + if name.StartsWithOrdinal("set_") then Some(name, range) else Some("set_" + name, range) | Binding(_access, _bindingKind, _isInline, _isMutable, _attrs, _xmldoc, _valData, LongIdentPattern(name, range), _retTy, _expr, _bindingRange, _seqPoint) -> Some(name, range) @@ -534,8 +535,8 @@ module internal InterfaceStubGenerator = let internal normalizeEventName (m: FSharpMemberOrFunctionOrValue) = let name = m.DisplayName - if name.StartsWith("add_") then name.[4..] - elif name.StartsWith("remove_") then name.[7..] + if name.StartsWithOrdinal("add_") then name.[4..] + elif name.StartsWithOrdinal("remove_") then name.[7..] else name /// Ideally this info should be returned in error symbols from FCS. @@ -552,8 +553,8 @@ module internal InterfaceStubGenerator = // Events don't have overloads so we use only display names for comparison let signature = normalizeEventName m Some [signature] - | Some typ -> - let signature = removeWhitespace (sprintf "%s:%s" m.DisplayName (typ.Format(displayContext))) + | Some ty -> + let signature = removeWhitespace (sprintf "%s:%s" m.DisplayName (ty.Format(displayContext))) Some [signature] | None -> None @@ -589,9 +590,9 @@ module internal InterfaceStubGenerator = |> Map.ofSeq // A simple hack to handle instantiation of type alias if e.IsFSharpAbbreviation then - let typ = getNonAbbreviatedType e.AbbreviatedType - (typ.TypeDefinition.GenericParameters |> Seq.map getTypeParameterName, - typ.GenericArguments |> Seq.map (fun typ -> typ.Format(displayContext))) + let ty = getNonAbbreviatedType e.AbbreviatedType + (ty.TypeDefinition.GenericParameters |> Seq.map getTypeParameterName, + ty.GenericArguments |> Seq.map (fun ty -> ty.Format(displayContext))) ||> Seq.zip |> Seq.fold (fun acc (x, y) -> Map.add x y acc) insts else insts @@ -603,8 +604,8 @@ module internal InterfaceStubGenerator = match m with | _ when isEventMember m -> Some (normalizeEventName m) - | TypeOfMember typ -> - let signature = removeWhitespace (sprintf "%s:%s" m.DisplayName (formatType { ctx with ArgInstantiations = insts } typ)) + | TypeOfMember ty -> + let signature = removeWhitespace (sprintf "%s:%s" m.DisplayName (formatType { ctx with ArgInstantiations = insts } ty)) Some signature | _ -> //debug "FullType throws exceptions due to bugs in FCS." @@ -801,7 +802,7 @@ module internal InterfaceStubGenerator = | SynExpr.MatchLambda(_isExnMatch, _argm, synMatchClauseList, _spBind, _wholem) -> synMatchClauseList |> List.tryPick (fun (Clause(_, _, e, _, _)) -> walkExpr e) - | SynExpr.Match(_sequencePointInfoForBinding, synExpr, synMatchClauseList, _, _range) -> + | SynExpr.Match(_sequencePointInfoForBinding, synExpr, synMatchClauseList, _range) -> walkExpr synExpr |> Option.orElse (synMatchClauseList |> List.tryPick (fun (Clause(_, _, e, _, _)) -> walkExpr e)) @@ -839,17 +840,22 @@ module internal InterfaceStubGenerator = | SynExpr.Ident(_ident) -> None + | SynExpr.LongIdent(_, _longIdent, _altNameRefCell, _range) -> None | SynExpr.LongIdentSet(_longIdent, synExpr, _range) -> walkExpr synExpr + | SynExpr.DotGet(synExpr, _dotm, _longIdent, _range) -> walkExpr synExpr | SynExpr.DotSet(synExpr1, _longIdent, synExpr2, _range) -> List.tryPick walkExpr [synExpr1; synExpr2] + | SynExpr.Set(synExpr1, synExpr2, _range) -> + List.tryPick walkExpr [synExpr1; synExpr2] + | SynExpr.DotIndexedGet(synExpr, IndexerArgList synExprList, _range, _range2) -> Option.orElse (walkExpr synExpr) (List.tryPick walkExpr synExprList) diff --git a/src/fsharp/vs/ServiceInterfaceStubGenerator.fsi b/src/fsharp/service/ServiceInterfaceStubGenerator.fsi similarity index 100% rename from src/fsharp/vs/ServiceInterfaceStubGenerator.fsi rename to src/fsharp/service/ServiceInterfaceStubGenerator.fsi diff --git a/src/fsharp/vs/ServiceLexing.fs b/src/fsharp/service/ServiceLexing.fs similarity index 96% rename from src/fsharp/vs/ServiceLexing.fs rename to src/fsharp/service/ServiceLexing.fs index 347dc72ef8f..abf3cde1c70 100755 --- a/src/fsharp/vs/ServiceLexing.fs +++ b/src/fsharp/service/ServiceLexing.fs @@ -7,12 +7,10 @@ namespace Microsoft.FSharp.Compiler.SourceCodeServices open System -open System.IO open System.Collections.Generic open Microsoft.FSharp.Compiler.AbstractIL.Internal open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library open Microsoft.FSharp.Compiler -open Microsoft.FSharp.Compiler.AbstractIL.Diagnostics open Microsoft.FSharp.Compiler.Parser open Microsoft.FSharp.Compiler.Range open Microsoft.FSharp.Compiler.Ast @@ -81,6 +79,9 @@ module FSharpTokenTag = let STRUCT = tagOfToken STRUCT let CLASS = tagOfToken CLASS let TRY = tagOfToken TRY + let NEW = tagOfToken NEW + let WITH = tagOfToken WITH + let OWITH = tagOfToken OWITH /// This corresponds to a token categorization originally used in Visual Studio 2003. @@ -260,7 +261,7 @@ module internal TokenClassifications = | ELIF | RARROW | LARROW | SIG | STRUCT | UPCAST | DOWNCAST | NULL | RESERVED | MODULE | AND | AS | ASSERT | ASR | DOWNTO | EXCEPTION | FALSE | FOR | FUN | FUNCTION - | FINALLY | LAZY | MATCH | MUTABLE | NEW | OF | OPEN | OR | VOID | EXTERN + | FINALLY | LAZY | MATCH | MATCH_BANG | MUTABLE | NEW | OF | OPEN | OR | VOID | EXTERN | INTERFACE | REC | TO | TRUE | TRY | TYPE | VAL | INLINE | WHEN | WHILE | WITH | IF | THEN | ELSE | DO | DONE | LET(_) | IN (*| NAMESPACE*) | CONST | HIGH_PRECEDENCE_PAREN_APP | FIXED @@ -378,7 +379,13 @@ module internal LexerStateEncoding = let bitOfBool b = if b then 1 else 0 let boolOfBit n = (n = 1L) - + + let inline colorStateOfLexState (state: FSharpTokenizerLexState) = + enum (int32 ((state &&& lexstateMask) >>> lexstateStart)) + + let inline lexStateOfColorState (state: FSharpTokenizerColorState) = + (int64 state <<< lexstateStart) &&& lexstateMask + let encodeLexCont (colorState:FSharpTokenizerColorState) ncomments (b:pos) ifdefStack light = let mutable ifdefStackCount = 0 let mutable ifdefStackBits = 0 @@ -389,8 +396,7 @@ module internal LexerStateEncoding = ifdefStackBits <- (ifdefStackBits ||| (1 <<< ifdefStackCount)) ifdefStackCount <- ifdefStackCount + 1 - let lexstate = int64 colorState - ((lexstate <<< lexstateStart) &&& lexstateMask) + lexStateOfColorState colorState ||| ((ncomments <<< ncommentsStart) &&& ncommentsMask) ||| ((resize32 b.Encoding <<< startPosStart) &&& startPosMask) ||| ((resize32 (bitOfBool light) <<< hardwhitePosStart) &&& hardwhitePosMask) @@ -407,7 +413,7 @@ module internal LexerStateEncoding = let mask = 1 <<< bit let ifDef = (if ifdefStack &&& mask = 0 then IfDefIf else IfDefElse) ifDefs<-(ifDef,range0)::ifDefs - enum (int32 ((state &&& lexstateMask) >>> lexstateStart)), + colorStateOfLexState state, (int32) ((state &&& ncommentsMask) >>> ncommentsStart), pos.Decode (int32 ((state &&& startPosMask) >>> startPosStart)), ifDefs, @@ -512,7 +518,7 @@ type FSharpLineTokenizer(lexbuf: UnicodeLexing.Lexbuf, // Process: anywhite* # let processDirective (str:string) directiveLength delay cont = - let hashIdx = str.IndexOf("#") + let hashIdx = str.IndexOf("#", StringComparison.Ordinal) if (hashIdx <> 0) then delay(WHITESPACE cont, 0, hashIdx - 1) delay(HASH_IF(range0, "", cont), hashIdx, hashIdx + directiveLength) hashIdx + directiveLength + 1 @@ -624,34 +630,34 @@ type FSharpLineTokenizer(lexbuf: UnicodeLexing.Lexbuf, delayToken(greaters.[i] false, leftc + i, rightc - opstr.Length + i + 1) false, (greaters.[0] false, leftc, rightc - opstr.Length + 1) // break up any operators that start with '.' so that we can get auto-popup-completion for e.g. "x.+1" when typing the dot - | INFIX_STAR_STAR_OP opstr when opstr.StartsWith(".") -> + | INFIX_STAR_STAR_OP opstr when opstr.StartsWithOrdinal(".") -> delayToken(INFIX_STAR_STAR_OP(opstr.Substring(1)), leftc+1, rightc) false, (DOT, leftc, leftc) - | PLUS_MINUS_OP opstr when opstr.StartsWith(".") -> + | PLUS_MINUS_OP opstr when opstr.StartsWithOrdinal(".") -> delayToken(PLUS_MINUS_OP(opstr.Substring(1)), leftc+1, rightc) false, (DOT, leftc, leftc) - | INFIX_COMPARE_OP opstr when opstr.StartsWith(".") -> + | INFIX_COMPARE_OP opstr when opstr.StartsWithOrdinal(".") -> delayToken(INFIX_COMPARE_OP(opstr.Substring(1)), leftc+1, rightc) false, (DOT, leftc, leftc) - | INFIX_AT_HAT_OP opstr when opstr.StartsWith(".") -> + | INFIX_AT_HAT_OP opstr when opstr.StartsWithOrdinal(".") -> delayToken(INFIX_AT_HAT_OP(opstr.Substring(1)), leftc+1, rightc) false, (DOT, leftc, leftc) - | INFIX_BAR_OP opstr when opstr.StartsWith(".") -> + | INFIX_BAR_OP opstr when opstr.StartsWithOrdinal(".") -> delayToken(INFIX_BAR_OP(opstr.Substring(1)), leftc+1, rightc) false, (DOT, leftc, leftc) - | PREFIX_OP opstr when opstr.StartsWith(".") -> + | PREFIX_OP opstr when opstr.StartsWithOrdinal(".") -> delayToken(PREFIX_OP(opstr.Substring(1)), leftc+1, rightc) false, (DOT, leftc, leftc) - | INFIX_STAR_DIV_MOD_OP opstr when opstr.StartsWith(".") -> + | INFIX_STAR_DIV_MOD_OP opstr when opstr.StartsWithOrdinal(".") -> delayToken(INFIX_STAR_DIV_MOD_OP(opstr.Substring(1)), leftc+1, rightc) false, (DOT, leftc, leftc) - | INFIX_AMP_OP opstr when opstr.StartsWith(".") -> + | INFIX_AMP_OP opstr when opstr.StartsWithOrdinal(".") -> delayToken(INFIX_AMP_OP(opstr.Substring(1)), leftc+1, rightc) false, (DOT, leftc, leftc) - | ADJACENT_PREFIX_OP opstr when opstr.StartsWith(".") -> + | ADJACENT_PREFIX_OP opstr when opstr.StartsWithOrdinal(".") -> delayToken(ADJACENT_PREFIX_OP(opstr.Substring(1)), leftc+1, rightc) false, (DOT, leftc, leftc) - | FUNKY_OPERATOR_NAME opstr when opstr.StartsWith(".") -> + | FUNKY_OPERATOR_NAME opstr when opstr.StartsWithOrdinal(".") -> delayToken(FUNKY_OPERATOR_NAME(opstr.Substring(1)), leftc+1, rightc) false, (DOT, leftc, leftc) | _ -> false, (token, leftc, rightc) @@ -739,16 +745,11 @@ type FSharpLineTokenizer(lexbuf: UnicodeLexing.Lexbuf, tokenDataOption, lexintFinal - static member ColorStateOfLexState (lexState: FSharpTokenizerLexState) = - let tag,_ncomments,_position,_ifdefStack,_lightSyntaxStatusInital = LexerStateEncoding.decodeLexCont lexState - tag + static member ColorStateOfLexState(lexState: FSharpTokenizerLexState) = + LexerStateEncoding.colorStateOfLexState lexState - static member LexStateOfColorState (colorState: FSharpTokenizerColorState) = - let ncomments = 0L - let position = pos0 - let ifdefStack = [] - let light = true - LexerStateEncoding.encodeLexCont colorState ncomments position ifdefStack light + static member LexStateOfColorState(colorState: FSharpTokenizerColorState) = + LexerStateEncoding.lexStateOfColorState colorState [] type FSharpSourceTokenizer(defineConstants : string list, filename : Option) = diff --git a/src/fsharp/vs/ServiceLexing.fsi b/src/fsharp/service/ServiceLexing.fsi similarity index 97% rename from src/fsharp/vs/ServiceLexing.fsi rename to src/fsharp/service/ServiceLexing.fsi index 8714de5e760..1501f45415b 100755 --- a/src/fsharp/vs/ServiceLexing.fsi +++ b/src/fsharp/service/ServiceLexing.fsi @@ -2,9 +2,7 @@ namespace Microsoft.FSharp.Compiler.SourceCodeServices -open System.Collections.Generic open Microsoft.FSharp.Compiler -open Microsoft.FSharp.Compiler.Range type Position = int * int type Range = Position * Position @@ -184,6 +182,12 @@ module FSharpTokenTag = val CLASS : int /// Indicates the token is keyword `try` val TRY : int + /// Indicates the token is keyword `with` + val WITH : int + /// Indicates the token is keyword `with` in #light + val OWITH : int + /// Indicates the token is keyword `new` + val NEW : int /// Information about a particular token from the tokenizer type FSharpTokenInfo = diff --git a/src/fsharp/vs/ServiceNavigation.fs b/src/fsharp/service/ServiceNavigation.fs similarity index 99% rename from src/fsharp/vs/ServiceNavigation.fs rename to src/fsharp/service/ServiceNavigation.fs index 2407e3dbd5a..24d83f532bd 100755 --- a/src/fsharp/vs/ServiceNavigation.fs +++ b/src/fsharp/service/ServiceNavigation.fs @@ -7,7 +7,6 @@ namespace Microsoft.FSharp.Compiler.SourceCodeServices -open Microsoft.FSharp.Compiler open Microsoft.FSharp.Compiler.Range open Microsoft.FSharp.Compiler.Ast diff --git a/src/fsharp/vs/ServiceNavigation.fsi b/src/fsharp/service/ServiceNavigation.fsi similarity index 81% rename from src/fsharp/vs/ServiceNavigation.fsi rename to src/fsharp/service/ServiceNavigation.fsi index e9198ab33ba..2f7464ba215 100755 --- a/src/fsharp/vs/ServiceNavigation.fsi +++ b/src/fsharp/service/ServiceNavigation.fsi @@ -10,11 +10,7 @@ namespace Microsoft.FSharp.Compiler.SourceCodeServices open Microsoft.FSharp.Compiler /// Indicates a kind of item to show in an F# navigation bar -#if COMPILER_PUBLIC_API -type FSharpNavigationDeclarationItemKind = -#else -type internal FSharpNavigationDeclarationItemKind = -#endif +type public FSharpNavigationDeclarationItemKind = | NamespaceDecl | ModuleFileDecl | ExnDecl @@ -26,11 +22,7 @@ type internal FSharpNavigationDeclarationItemKind = | OtherDecl [] -#if COMPILER_PUBLIC_API -type FSharpEnclosingEntityKind = -#else -type internal FSharpEnclosingEntityKind = -#endif +type public FSharpEnclosingEntityKind = | Namespace | Module | Class @@ -42,11 +34,7 @@ type internal FSharpEnclosingEntityKind = /// Represents an item to be displayed in the navigation bar [] -#if COMPILER_PUBLIC_API -type FSharpNavigationDeclarationItem = -#else -type internal FSharpNavigationDeclarationItem = -#endif +type public FSharpNavigationDeclarationItem = member Name : string member UniqueName : string member Glyph : FSharpGlyph @@ -61,11 +49,7 @@ type internal FSharpNavigationDeclarationItem = /// Represents top-level declarations (that should be in the type drop-down) /// with nested declarations (that can be shown in the member drop-down) [] -#if COMPILER_PUBLIC_API -type FSharpNavigationTopLevelDeclaration = -#else -type internal FSharpNavigationTopLevelDeclaration = -#endif +type public FSharpNavigationTopLevelDeclaration = { Declaration : FSharpNavigationDeclarationItem Nested : FSharpNavigationDeclarationItem[] } @@ -73,11 +57,7 @@ type internal FSharpNavigationTopLevelDeclaration = /// all the members and currently selected indices. First level correspond to /// types & modules and second level are methods etc. [] -#if COMPILER_PUBLIC_API -type FSharpNavigationItems = -#else -type internal FSharpNavigationItems = -#endif +type public FSharpNavigationItems = member Declarations : FSharpNavigationTopLevelDeclaration[] // implementation details used by other code in the compiler @@ -87,11 +67,7 @@ module internal NavigationImpl = val internal getNavigation : Ast.ParsedInput -> FSharpNavigationItems val internal empty : FSharpNavigationItems -#if COMPILER_PUBLIC_API -module NavigateTo = -#else -module internal NavigateTo = -#endif +module public NavigateTo = [] type NavigableItemKind = | Module diff --git a/src/fsharp/vs/ServiceParamInfoLocations.fs b/src/fsharp/service/ServiceParamInfoLocations.fs similarity index 92% rename from src/fsharp/vs/ServiceParamInfoLocations.fs rename to src/fsharp/service/ServiceParamInfoLocations.fs index 987d10c2de7..23681498fb7 100755 --- a/src/fsharp/vs/ServiceParamInfoLocations.fs +++ b/src/fsharp/service/ServiceParamInfoLocations.fs @@ -144,17 +144,27 @@ module internal NoteworthyParamInfoLocationsImpl = NotFound, Some inner | _ -> NotFound, Some inner - + let (|StaticParameters|_|) pos synType = + match synType with + | SynType.App(SynType.LongIdent(LongIdentWithDots(lid, _) as lidwd), Some(openm), args, commas, closemOpt, _pf, wholem) -> + let lidm = lidwd.Range + let betweenTheBrackets = mkRange wholem.FileName openm.Start wholem.End + if AstTraversal.rangeContainsPosEdgesExclusive betweenTheBrackets pos && args |> List.forall isStaticArg then + let commasAndCloseParen = [ for c in commas -> c.End ] @ [ wholem.End ] + Some (FSharpNoteworthyParamInfoLocations(pathOfLid lid, lidm, openm.Start, commasAndCloseParen, closemOpt.IsSome, args |> List.map digOutIdentFromStaticArg)) + else + None + | _ -> + None let traverseInput(pos, parseTree) = - AstTraversal.Traverse(pos, parseTree, { new AstTraversal.AstVisitorBase<_>() with member this.VisitExpr(_path, traverseSynExpr, defaultTraverse, expr) = let expr = expr // fix debug locals match expr with // new LID(...) and error recovery of these - | SynExpr.New(_, synType, synExpr, _range) -> + | SynExpr.New(_, synType, synExpr, _) -> let constrArgsResult, cacheOpt = searchSynArgExpr traverseSynExpr pos synExpr match constrArgsResult, cacheOpt with | Found(parenLoc, args, isThereACloseParen), _ -> @@ -163,7 +173,9 @@ module internal NoteworthyParamInfoLocationsImpl = | NotFound, Some cache -> cache | _ -> - traverseSynExpr synExpr + match synType with + | StaticParameters pos loc -> Some loc + | _ -> traverseSynExpr synExpr // EXPR< = error recovery of a form of half-written TypeApp | SynExpr.App(_, _, SynExpr.App(_, true, SynExpr.Ident op, synExpr, openm), SynExpr.ArbitraryAfterError _, wholem) when op.idText = "op_LessThan" -> @@ -221,18 +233,10 @@ module internal NoteworthyParamInfoLocationsImpl = | _ -> defaultTraverse expr - member this.VisitTypeAbbrev(tyAbbrevRhs, _m) = + member this.VisitTypeAbbrev(tyAbbrevRhs, _m) = match tyAbbrevRhs with - | SynType.App(SynType.LongIdent(LongIdentWithDots(lid, _) as lidwd), Some(openm), args, commas, closemOpt, _pf, wholem) -> - let lidm = lidwd.Range - let betweenTheBrackets = mkRange wholem.FileName openm.Start wholem.End - if AstTraversal.rangeContainsPosEdgesExclusive betweenTheBrackets pos && args |> List.forall isStaticArg then - let commasAndCloseParen = [ for c in commas -> c.End ] @ [ wholem.End ] - Some (FSharpNoteworthyParamInfoLocations(pathOfLid lid, lidm, openm.Start, commasAndCloseParen, closemOpt.IsSome, args |> List.map digOutIdentFromStaticArg)) - else - None - | _ -> - None + | StaticParameters pos loc -> Some loc + | _ -> None member this.VisitImplicitInherit(defaultTraverse, ty, expr, m) = match defaultTraverse expr with diff --git a/src/fsharp/vs/ServiceParamInfoLocations.fsi b/src/fsharp/service/ServiceParamInfoLocations.fsi similarity index 92% rename from src/fsharp/vs/ServiceParamInfoLocations.fsi rename to src/fsharp/service/ServiceParamInfoLocations.fsi index d72e6330b74..6f9282c520f 100755 --- a/src/fsharp/vs/ServiceParamInfoLocations.fsi +++ b/src/fsharp/service/ServiceParamInfoLocations.fsi @@ -12,11 +12,7 @@ open Microsoft.FSharp.Compiler.Range /// Represents the locations relevant to activating parameter info in an IDE [] -#if COMPILER_PUBLIC_API -type FSharpNoteworthyParamInfoLocations = -#else -type internal FSharpNoteworthyParamInfoLocations = -#endif +type public FSharpNoteworthyParamInfoLocations = /// The text of the long identifier prior to the open-parentheses member LongId : string list diff --git a/src/fsharp/vs/ServiceParseTreeWalk.fs b/src/fsharp/service/ServiceParseTreeWalk.fs similarity index 95% rename from src/fsharp/vs/ServiceParseTreeWalk.fs rename to src/fsharp/service/ServiceParseTreeWalk.fs index 9dddedb6276..fbd173b1bd2 100755 --- a/src/fsharp/vs/ServiceParseTreeWalk.fs +++ b/src/fsharp/service/ServiceParseTreeWalk.fs @@ -7,17 +7,12 @@ namespace Microsoft.FSharp.Compiler.SourceCodeServices -open Microsoft.FSharp.Compiler open Microsoft.FSharp.Compiler.Range open Microsoft.FSharp.Compiler.Ast /// A range of utility functions to assist with traversing an AST -#if COMPILER_PUBLIC_API -module AstTraversal = -#else -module internal AstTraversal = -#endif +module public AstTraversal = // treat ranges as though they are half-open: [,) let rangeContainsPosLeftEdgeInclusive (m1:range) p = if posEq m1.Start m1.End then @@ -88,8 +83,8 @@ module internal AstTraversal = abstract VisitComponentInfo : SynComponentInfo -> 'T option default this.VisitComponentInfo (_) = None /// VisitLetOrUse allows overriding behavior when visiting module or local let or use bindings - abstract VisitLetOrUse : SynBinding list * range -> 'T option - default this.VisitLetOrUse (_, _) = None + abstract VisitLetOrUse : TraversePath * (SynBinding -> 'T option) * SynBinding list * range -> 'T option + default this.VisitLetOrUse (_, _, _, _) = None /// VisitType allows overriding behavior when visiting simple pats abstract VisitSimplePats : SynSimplePat list -> 'T option default this.VisitSimplePats (_) = None @@ -163,7 +158,7 @@ module internal AstTraversal = | SynModuleDecl.ModuleAbbrev(_ident, _longIdent, _range) -> None | SynModuleDecl.NestedModule(_synComponentInfo, _isRec, synModuleDecls, _, _range) -> synModuleDecls |> List.map (fun x -> dive x x.Range (traverseSynModuleDecl path)) |> pick decl | SynModuleDecl.Let(_, synBindingList, range) -> - match visitor.VisitLetOrUse(synBindingList, range) with + match visitor.VisitLetOrUse(path, traverseSynBinding path, synBindingList, range) with | Some x -> Some x | None -> synBindingList |> List.map (fun x -> dive x x.RangeOfBindingAndRhs (traverseSynBinding path)) |> pick decl | SynModuleDecl.DoExpr(_sequencePointInfoForBinding, synExpr, _range) -> traverseSynExpr path synExpr @@ -317,8 +312,9 @@ module internal AstTraversal = dive synExpr2 synExpr2.Range traverseSynExpr dive synExpr3 synExpr3.Range traverseSynExpr] |> pick expr - | SynExpr.ForEach(_sequencePointInfoForForLoop, _seqExprOnly, _isFromSource, _synPat, synExpr, synExpr2, _range) -> - [dive synExpr synExpr.Range traverseSynExpr + | SynExpr.ForEach(_sequencePointInfoForForLoop, _seqExprOnly, _isFromSource, synPat, synExpr, synExpr2, _range) -> + [dive synPat synPat.Range traversePat + dive synExpr synExpr.Range traverseSynExpr dive synExpr2 synExpr2.Range traverseSynExpr] |> pick expr | SynExpr.ArrayOrListOfSeqExpr(_, synExpr, _range) -> traverseSynExpr synExpr @@ -350,7 +346,7 @@ module internal AstTraversal = synMatchClauseList |> List.map (fun x -> dive x x.Range (traverseSynMatchClause path)) |> pick expr - | SynExpr.Match(_sequencePointInfoForBinding, synExpr, synMatchClauseList, _, _range) -> + | SynExpr.Match(_sequencePointInfoForBinding, synExpr, synMatchClauseList, _range) -> [yield dive synExpr synExpr.Range traverseSynExpr yield! synMatchClauseList |> List.map (fun x -> dive x x.RangeOfGuardAndRhs (traverseSynMatchClause path))] |> pick expr @@ -368,7 +364,7 @@ module internal AstTraversal = |> pick expr | SynExpr.TypeApp(synExpr, _, _synTypeList, _commas, _, _, _range) -> traverseSynExpr synExpr | SynExpr.LetOrUse(_, _, synBindingList, synExpr, range) -> - match visitor.VisitLetOrUse(synBindingList, range) with + match visitor.VisitLetOrUse(path, traverseSynBinding path, synBindingList, range) with | Some x -> Some x | None -> [yield! synBindingList |> List.map (fun x -> dive x x.RangeOfBindingAndRhs (traverseSynBinding path)) @@ -398,7 +394,8 @@ module internal AstTraversal = | SynExpr.LongIdent(_, _longIdent, _altNameRefCell, _range) -> None | SynExpr.LongIdentSet(_longIdent, synExpr, _range) -> traverseSynExpr synExpr | SynExpr.DotGet(synExpr, _dotm, _longIdent, _range) -> traverseSynExpr synExpr - | SynExpr.DotSet(synExpr, _longIdent, synExpr2, _range) -> + | SynExpr.Set(synExpr, synExpr2, _) + | SynExpr.DotSet(synExpr, _, synExpr2, _) -> [dive synExpr synExpr.Range traverseSynExpr dive synExpr2 synExpr2.Range traverseSynExpr] |> pick expr @@ -439,10 +436,15 @@ module internal AstTraversal = | SynExpr.ImplicitZero(_range) -> None | SynExpr.YieldOrReturn(_, synExpr, _range) -> traverseSynExpr synExpr | SynExpr.YieldOrReturnFrom(_, synExpr, _range) -> traverseSynExpr synExpr - | SynExpr.LetOrUseBang(_sequencePointInfoForBinding, _, _, _synPat, synExpr, synExpr2, _range) -> - [dive synExpr synExpr.Range traverseSynExpr + | SynExpr.LetOrUseBang(_sequencePointInfoForBinding, _, _, synPat, synExpr, synExpr2, _range) -> + [dive synPat synPat.Range traversePat + dive synExpr synExpr.Range traverseSynExpr dive synExpr2 synExpr2.Range traverseSynExpr] |> pick expr + | SynExpr.MatchBang(_sequencePointInfoForBinding, synExpr, synMatchClauseList, _range) -> + [yield dive synExpr synExpr.Range traverseSynExpr + yield! synMatchClauseList |> List.map (fun x -> dive x x.RangeOfGuardAndRhs (traverseSynMatchClause path))] + |> pick expr | SynExpr.DoBang(synExpr, _range) -> traverseSynExpr synExpr | SynExpr.LibraryOnlyILAssembly _ -> None | SynExpr.LibraryOnlyStaticOptimization _ -> None @@ -584,7 +586,7 @@ module internal AstTraversal = ] |> pick m | SynMemberDefn.AutoProperty(_attribs, _isStatic, _id, _tyOpt, _propKind, _, _xmlDoc, _access, synExpr, _, _) -> traverseSynExpr path synExpr | SynMemberDefn.LetBindings(synBindingList, _, _, range) -> - match visitor.VisitLetOrUse(synBindingList, range) with + match visitor.VisitLetOrUse(path, traverseSynBinding path, synBindingList, range) with | Some x -> Some x | None -> synBindingList |> List.map (fun x -> dive x x.RangeOfBindingAndRhs (traverseSynBinding path)) |> pick m | SynMemberDefn.AbstractSlot(_synValSig, _memberFlags, _range) -> None @@ -603,13 +605,17 @@ module internal AstTraversal = let path = TraverseStep.MatchClause mc :: path let defaultTraverse mc = match mc with - | (SynMatchClause.Clause(_synPat, synExprOption, synExpr, _range, _sequencePointInfoForTarget) as all) -> - [ + | (SynMatchClause.Clause(synPat, synExprOption, synExpr, _range, _sequencePointInfoForTarget) as all) -> + [dive synPat synPat.Range traversePat] + @ + ([ match synExprOption with | None -> () | Some guard -> yield guard yield synExpr - ] |> List.map (fun x -> dive x x.Range (traverseSynExpr path)) |> pick all.Range all + ] + |> List.map (fun x -> dive x x.Range (traverseSynExpr path)) + )|> pick all.Range all visitor.VisitMatchClause(defaultTraverse,mc) and traverseSynBinding path b = diff --git a/src/fsharp/vs/ServiceStructure.fs b/src/fsharp/service/ServiceStructure.fs similarity index 98% rename from src/fsharp/vs/ServiceStructure.fs rename to src/fsharp/service/ServiceStructure.fs index ffe2461d959..242c3e74dae 100644 --- a/src/fsharp/vs/ServiceStructure.fs +++ b/src/fsharp/service/ServiceStructure.fs @@ -2,8 +2,8 @@ namespace Microsoft.FSharp.Compiler.SourceCodeServices +open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library open Microsoft.FSharp.Compiler.Ast -open System.Collections.Generic open Microsoft.FSharp.Compiler open Microsoft.FSharp.Compiler.Range @@ -102,6 +102,7 @@ module Structure = | For | While | Match + | MatchBang | MatchLambda | MatchClause | Lambda @@ -150,6 +151,7 @@ module Structure = | For -> "For" | While -> "While" | Match -> "Match" + | MatchBang -> "MatchBang" | MatchLambda -> "MatchLambda" | MatchClause -> "MatchClause" | Lambda -> "Lambda" @@ -223,10 +225,14 @@ module Structure = | SynExpr.InferredUpcast (e,_) | SynExpr.DotGet (e,_,_,_) | SynExpr.Do (e,_) - | SynExpr.DotSet (e,_,_,_) | SynExpr.Typed (e,_,_) - | SynExpr.DotIndexedGet (e,_,_,_) - | SynExpr.DotIndexedSet (e,_,_,_,_,_) -> parseExpr e + | SynExpr.DotIndexedGet (e,_,_,_) -> + parseExpr e + | SynExpr.Set (e1,e2,_) + | SynExpr.DotSet (e1,_,e2,_) + | SynExpr.DotIndexedSet (e1,_,e2,_,_,_) -> + parseExpr e1 + parseExpr e2 | SynExpr.New (_,_,expr,r) -> rcheck Scope.New Collapse.Below r expr.Range parseExpr expr @@ -254,7 +260,8 @@ module Structure = | SynExpr.LetOrUse (_,_,bindings, body, _) -> parseBindings bindings parseExpr body - | SynExpr.Match (seqPointAtBinding,_expr,clauses,_,r) -> + | SynExpr.Match (seqPointAtBinding,_expr,clauses,r) + | SynExpr.MatchBang (seqPointAtBinding, _expr, clauses, r) -> match seqPointAtBinding with | SequencePointAtBinding sr -> let collapse = Range.endToEnd sr r @@ -620,8 +627,8 @@ module Structure = /// Determine if a line is a single line or xml docummentation comment let (|Comment|_|) (line: string) = - if line.StartsWith "///" then Some XmlDoc - elif line.StartsWith "//" then Some SingleLine + if line.StartsWithOrdinal("///") then Some XmlDoc + elif line.StartsWithOrdinal("//") then Some SingleLine else None let getCommentRanges (lines: string[]) = diff --git a/src/fsharp/vs/ServiceStructure.fsi b/src/fsharp/service/ServiceStructure.fsi similarity index 93% rename from src/fsharp/vs/ServiceStructure.fsi rename to src/fsharp/service/ServiceStructure.fsi index 4c85cd9784d..a7a054a411f 100644 --- a/src/fsharp/vs/ServiceStructure.fsi +++ b/src/fsharp/service/ServiceStructure.fsi @@ -3,15 +3,10 @@ namespace Microsoft.FSharp.Compiler.SourceCodeServices open Microsoft.FSharp.Compiler.Ast -open System.Collections.Generic -open Microsoft.FSharp.Compiler open Microsoft.FSharp.Compiler.Range -#if COMPILER_PUBLIC_API -module Structure = -#else -module internal Structure = -#endif +module public Structure = + /// Collapse indicates the way a range/snapshot should be collapsed. `Same` is for a scope inside /// some kind of scope delimiter, e.g. `[| ... |]`, `[ ... ]`, `{ ... }`, etc. `Below` is for expressions /// following a binding or the right hand side of a pattern, e.g. `let x = ...` @@ -45,6 +40,7 @@ module internal Structure = | For | While | Match + | MatchBang | MatchLambda | MatchClause | Lambda diff --git a/src/fsharp/vs/ServiceUntypedParse.fs b/src/fsharp/service/ServiceUntypedParse.fs similarity index 92% rename from src/fsharp/vs/ServiceUntypedParse.fs rename to src/fsharp/service/ServiceUntypedParse.fs index dff684fe526..e60364e4ddf 100755 --- a/src/fsharp/vs/ServiceUntypedParse.fs +++ b/src/fsharp/service/ServiceUntypedParse.fs @@ -41,8 +41,8 @@ module SourceFileImpl = 0 = String.Compare(".fsi",ext,StringComparison.OrdinalIgnoreCase) /// Additional #defines that should be in place when editing a file in a file editor such as VS. - let AdditionalDefinesForUseInEditor(filename) = - if CompileOps.IsScript(filename) then ["INTERACTIVE";"EDITING"] // This is still used by the foreground parse + let AdditionalDefinesForUseInEditor(isInteractive: bool) = + if isInteractive then ["INTERACTIVE";"EDITING"] // This is still used by the foreground parse else ["COMPILED";"EDITING"] type CompletionPath = string list * string option // plid * residue @@ -212,6 +212,7 @@ type FSharpParseFileResults(errors: FSharpErrorInfo[], input: Ast.ParsedInput op | SynExpr.NamedIndexedPropertySet (_,e1,e2,_) | SynExpr.DotSet (e1,_,e2,_) + | SynExpr.Set (e1,e2,_) | SynExpr.LibraryOnlyUnionCaseFieldSet (e1,_,_,e2,_) | SynExpr.App (_,_,e1,e2,_) -> yield! walkExpr false e1 @@ -228,38 +229,49 @@ type FSharpParseFileResults(errors: FSharpErrorInfo[], input: Ast.ParsedInput op | None -> () yield! walkExprs (List.map (fun (_, v, _) -> v) fs |> List.choose id) - | SynExpr.ObjExpr (_,_,bs,is,_,_) -> + | SynExpr.ObjExpr (_,args,bs,is,_,_) -> + match args with + | None -> () + | Some (arg,_) -> yield! walkExpr false arg yield! walkBinds bs for (InterfaceImpl(_,bs,_)) in is do yield! walkBinds bs + | SynExpr.While (spWhile,e1,e2,_) -> yield! walkWhileSeqPt spWhile yield! walkExpr false e1 yield! walkExpr true e2 + | SynExpr.JoinIn(e1, _range, e2, _range2) -> yield! walkExpr false e1 yield! walkExpr false e2 + | SynExpr.For (spFor,_,e1,_,e2,e3,_) -> yield! walkForSeqPt spFor yield! walkExpr false e1 yield! walkExpr true e2 yield! walkExpr true e3 + | SynExpr.ForEach (spFor,_,_,_,e1,e2,_) -> yield! walkForSeqPt spFor yield! walkExpr false e1 yield! walkExpr true e2 + | SynExpr.MatchLambda(_isExnMatch,_argm,cl,spBind,_wholem) -> yield! walkBindSeqPt spBind for (Clause(_,whenExpr,e,_,_)) in cl do yield! walkExprOpt false whenExpr yield! walkExpr true e + | SynExpr.Lambda (_,_,_,e,_) -> yield! walkExpr true e - | SynExpr.Match (spBind,e,cl,_,_) -> + + | SynExpr.Match (spBind,e,cl,_) -> yield! walkBindSeqPt spBind yield! walkExpr false e for (Clause(_,whenExpr,e,_,_)) in cl do yield! walkExprOpt false whenExpr yield! walkExpr true e + | SynExpr.LetOrUse (_,_,bs,e,_) -> yield! walkBinds bs yield! walkExpr true e @@ -275,21 +287,26 @@ type FSharpParseFileResults(errors: FSharpErrorInfo[], input: Ast.ParsedInput op yield! walkExpr true e2 yield! walkTrySeqPt spTry yield! walkFinallySeqPt spFinally + | SynExpr.Sequential (spSeq,_,e1,e2,_) -> yield! walkExpr (match spSeq with SuppressSequencePointOnStmtOfSequential -> false | _ -> true) e1 yield! walkExpr (match spSeq with SuppressSequencePointOnExprOfSequential -> false | _ -> true) e2 + | SynExpr.IfThenElse (e1,e2,e3opt,spBind,_,_,_) -> yield! walkBindSeqPt spBind yield! walkExpr false e1 yield! walkExpr true e2 yield! walkExprOpt true e3opt + | SynExpr.DotIndexedGet (e1,es,_,_) -> yield! walkExpr false e1 yield! walkExprs [ for e in es do yield! e.Exprs ] + | SynExpr.DotIndexedSet (e1,es,e2,_,_,_) -> yield! walkExpr false e1 yield! walkExprs [ for e in es do yield! e.Exprs ] yield! walkExpr false e2 + | SynExpr.DotNamedIndexedPropertySet (e1,_,e2,e3,_) -> yield! walkExpr false e1 yield! walkExpr false e2 @@ -298,7 +315,14 @@ type FSharpParseFileResults(errors: FSharpErrorInfo[], input: Ast.ParsedInput op | SynExpr.LetOrUseBang (spBind,_,_,_,e1,e2,_) -> yield! walkBindSeqPt spBind yield! walkExpr true e1 - yield! walkExpr true e2 ] + yield! walkExpr true e2 + + | SynExpr.MatchBang (spBind,e,cl,_) -> + yield! walkBindSeqPt spBind + yield! walkExpr false e + for (Clause(_,whenExpr,e,_,_)) in cl do + yield! walkExprOpt false whenExpr + yield! walkExpr true e ] // Process a class declaration or F# type declaration let rec walkTycon (TypeDefn(ComponentInfo(_, _, _, _, _, _, _, _), repr, membDefns, m)) = @@ -321,6 +345,10 @@ type FSharpParseFileResults(errors: FSharpErrorInfo[], input: Ast.ParsedInput op | SynMemberDefn.Inherit(_, _, m) -> // can break on the "inherit" clause yield! checkRange m + | SynMemberDefn.ImplicitInherit(_, arg, _, m) -> + // can break on the "inherit" clause + yield! checkRange m + yield! walkExpr true arg | _ -> () ] // Process declarations nested in a module that should be displayed in the left dropdown @@ -411,6 +439,8 @@ type EntityKind = override x.ToString() = sprintf "%A" x module UntypedParseImpl = + open System.Text.RegularExpressions + open Microsoft.FSharp.Compiler.PrettyNaming let emptyStringSet = HashSet() @@ -451,6 +481,13 @@ module UntypedParseImpl = else // see comment below for SynExpr.DotSet Some((unionRanges synExpr.Range r)) + | SynExpr.Set(synExpr, synExpr2, range) -> + if AstTraversal.rangeContainsPosLeftEdgeInclusive synExpr.Range pos then + traverseSynExpr synExpr + elif AstTraversal.rangeContainsPosLeftEdgeInclusive synExpr2.Range pos then + traverseSynExpr synExpr2 + else + Some(range) | SynExpr.DotSet(synExpr, LongIdentWithDots(longIdent,_), synExpr2, _range) -> if AstTraversal.rangeContainsPosLeftEdgeInclusive synExpr.Range pos then traverseSynExpr synExpr @@ -613,6 +650,10 @@ module UntypedParseImpl = dive lidwd lidwd.Range (traverseLidOrElse(Some exprLeft)) dive exprRhs exprRhs.Range traverseSynExpr ] |> pick expr + | SynExpr.Set(exprLeft, exprRhs, _m) -> + [ dive exprLeft exprLeft.Range traverseSynExpr + dive exprRhs exprRhs.Range traverseSynExpr + ] |> pick expr | SynExpr.NamedIndexedPropertySet(lidwd, exprIndexer, exprRhs, _m) -> [ dive lidwd lidwd.Range (traverseLidOrElse None) dive exprIndexer exprIndexer.Range traverseSynExpr @@ -796,7 +837,7 @@ module UntypedParseImpl = | SynExpr.Lambda(_, _, _, e, _) -> walkExprWithKind parentKind e | SynExpr.MatchLambda(_, _, synMatchClauseList, _, _) -> List.tryPick walkClause synMatchClauseList - | SynExpr.Match(_, e, synMatchClauseList, _, _) -> + | SynExpr.Match(_, e, synMatchClauseList, _) -> walkExprWithKind parentKind e |> Option.orElse (List.tryPick walkClause synMatchClauseList) | SynExpr.Do(e, _) -> walkExprWithKind parentKind e | SynExpr.Assert(e, _) -> walkExprWithKind parentKind e @@ -814,6 +855,7 @@ module UntypedParseImpl = | SynExpr.LongIdentSet(_, e, _) -> walkExprWithKind parentKind e | SynExpr.DotGet(e, _, _, _) -> walkExprWithKind parentKind e | SynExpr.DotSet(e, _, _, _) -> walkExprWithKind parentKind e + | SynExpr.Set(e, _, _) -> walkExprWithKind parentKind e | SynExpr.DotIndexedGet(e, args, _, _) -> walkExprWithKind parentKind e |> Option.orElse (List.tryPick walkIndexerArg args) | SynExpr.DotIndexedSet(e, args, _, _, _, _) -> walkExprWithKind parentKind e |> Option.orElse (List.tryPick walkIndexerArg args) | SynExpr.NamedIndexedPropertySet(_, e1, e2, _) -> List.tryPick (walkExprWithKind parentKind) [e1; e2] @@ -827,6 +869,9 @@ module UntypedParseImpl = | SynExpr.JoinIn(e1, _, e2, _) -> List.tryPick (walkExprWithKind parentKind) [e1; e2] | SynExpr.YieldOrReturn(_, e, _) -> walkExprWithKind parentKind e | SynExpr.YieldOrReturnFrom(_, e, _) -> walkExprWithKind parentKind e + | SynExpr.Match(_, e, synMatchClauseList, _) + | SynExpr.MatchBang(_, e, synMatchClauseList, _) -> + walkExprWithKind parentKind e |> Option.orElse (List.tryPick walkClause synMatchClauseList) | SynExpr.LetOrUseBang(_, _, _, _, e1, e2, _) -> List.tryPick (walkExprWithKind parentKind) [e1; e2] | SynExpr.DoBang(e, _) -> walkExprWithKind parentKind e | SynExpr.TraitCall (ts, sign, e, _) -> @@ -932,20 +977,13 @@ module UntypedParseImpl = | ParsedInput.ImplFile input -> walkImplFileInput input type internal TS = AstTraversal.TraverseStep + /// Matches the most nested [< and >] pair. + let insideAttributeApplicationRegex = Regex(@"(?<=\[\<)(?(.*?))(?=\>\])", RegexOptions.Compiled ||| RegexOptions.ExplicitCapture) /// Try to determine completion context for the given pair (row, columns) - let TryGetCompletionContext (pos, untypedParseOpt: FSharpParseFileResults option, lineStr: string) : CompletionContext option = - let parsedInputOpt = - match untypedParseOpt with - | Some upi -> upi.ParseTree - | None -> None - - match parsedInputOpt with - | None -> None - | Some pt -> + let TryGetCompletionContext (pos, parsedInput: ParsedInput, lineStr: string) : CompletionContext option = - - match GetEntityKind(pos, pt) with + match GetEntityKind(pos, parsedInput) with | Some EntityKind.Attribute -> Some CompletionContext.AttributeApplication | _ -> @@ -995,7 +1033,7 @@ module UntypedParseImpl = | (SynAttr "AbstractClass")::xs -> getKind true isInterface isStruct xs | (SynAttr "Interface")::xs -> getKind isClass true isStruct xs | (SynAttr "Struct")::xs -> getKind isClass isInterface true xs - | _::xs -> getKind isClass isInterface isInterface xs + | _::xs -> getKind isClass isInterface isStruct xs match getKind false false false synAttributes with | false, false, false -> Unknown @@ -1211,6 +1249,9 @@ module UntypedParseImpl = | _ -> defaultTraverse synBinding match headPat with + | SynPat.LongIdent(longDotId = lidwd) when rangeContainsPos lidwd.Range pos -> + // let fo|o x = () + Some CompletionContext.Invalid | SynPat.LongIdent(_,_,_,ctorArgs,_,_) -> match ctorArgs with | SynConstructorArgs.Pats(pats) -> @@ -1227,6 +1268,9 @@ module UntypedParseImpl = | _ -> visitParam pat ) | _ -> defaultTraverse synBinding + | SynPat.Named(range = range) when rangeContainsPos range pos -> + // let fo|o = 1 + Some CompletionContext.Invalid | _ -> defaultTraverse synBinding member __.VisitHashDirective(range) = @@ -1246,7 +1290,7 @@ module UntypedParseImpl = if rangeContainsPos range pos then Some CompletionContext.Invalid else None - member __.VisitLetOrUse(bindings, range) = + member __.VisitLetOrUse(_, _, bindings, range) = match bindings with | [] when range.StartLine = pos.Line -> Some CompletionContext.Invalid | _ -> None @@ -1282,7 +1326,48 @@ module UntypedParseImpl = | _ -> defaultTraverse ty } - AstTraversal.Traverse(pos, pt, walker) + AstTraversal.Traverse(pos, parsedInput, walker) + // Uncompleted attribute applications are not presented in the AST in any way. So, we have to parse source string. + |> Option.orElseWith (fun _ -> + let cutLeadingAttributes (str: string) = + // cut off leading attributes, i.e. we cut "[]" to " >]" + match str.LastIndexOf ';' with + | -1 -> str + | idx when idx < str.Length -> str.[idx + 1..].TrimStart() + | _ -> "" + + let isLongIdent = Seq.forall (fun c -> IsIdentifierPartCharacter c || c = '.' || c = ':') // ':' may occur in "[]" + + // match the most nested paired [< and >] first + let matches = + insideAttributeApplicationRegex.Matches(lineStr) + |> Seq.cast + |> Seq.filter (fun m -> m.Index <= pos.Column && m.Index + m.Length >= pos.Column) + |> Seq.toArray + + if not (Array.isEmpty matches) then + matches + |> Seq.tryPick (fun m -> + let g = m.Groups.["attribute"] + let col = pos.Column - g.Index + if col >= 0 && col < g.Length then + let str = g.Value.Substring(0, col).TrimStart() // cut other rhs attributes + let str = cutLeadingAttributes str + if isLongIdent str then + Some CompletionContext.AttributeApplication + else None + else None) + else + // Paired [< and >] were not found, try to determine that we are after [< without closing >] + match lineStr.LastIndexOf("[<", StringComparison.Ordinal) with + | -1 -> None + | openParenIndex when pos.Column >= openParenIndex + 2 -> + let str = lineStr.[openParenIndex + 2..pos.Column - 1].TrimStart() + let str = cutLeadingAttributes str + if isLongIdent str then + Some CompletionContext.AttributeApplication + else None + | _ -> None) /// Check if we are at an "open" declaration let GetFullNameOfSmallestModuleOrNamespaceAtPoint (parsedInput: ParsedInput, pos: pos) = diff --git a/src/fsharp/service/ServiceUntypedParse.fsi b/src/fsharp/service/ServiceUntypedParse.fsi new file mode 100755 index 00000000000..40339e85f96 --- /dev/null +++ b/src/fsharp/service/ServiceUntypedParse.fsi @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +//---------------------------------------------------------------------------- +// API to the compiler as an incremental service for parsing, +// type checking and intellisense-like environment-reporting. +//---------------------------------------------------------------------------- + +namespace Microsoft.FSharp.Compiler.SourceCodeServices + +open System.Collections.Generic +open Microsoft.FSharp.Compiler +open Microsoft.FSharp.Compiler.Ast +open Microsoft.FSharp.Compiler.Range +open Microsoft.FSharp.Compiler.ErrorLogger + +[] +/// Represents the results of parsing an F# file +type public FSharpParseFileResults = + + /// The syntax tree resulting from the parse + member ParseTree : Ast.ParsedInput option + + /// Notable parse info for ParameterInfo at a given location + member FindNoteworthyParamInfoLocations : pos:pos -> FSharpNoteworthyParamInfoLocations option + + /// Name of the file for which this information were created + member FileName : string + + /// Get declared items and the selected item at the specified location + member GetNavigationItems : unit -> FSharpNavigationItems + + /// Return the inner-most range associated with a possible breakpoint location + member ValidateBreakpointLocation : pos:pos -> range option + + /// When these files change then the build is invalid + member DependencyFiles : string[] + + /// Get the errors and warnings for the parse + member Errors : FSharpErrorInfo[] + + /// Indicates if any errors occurred during the parse + member ParseHadErrors : bool + + internal new: errors: FSharpErrorInfo[] * input: Ast.ParsedInput option * parseHadErrors: bool * dependencyFiles: string[] -> FSharpParseFileResults + +/// Information about F# source file names +module public SourceFile = + + /// Whether or not this file is compilable + val IsCompilable : string -> bool + + /// Whether or not this file should be a single-file project + val MustBeSingleFileProject : string -> bool + +type public CompletionPath = string list * string option // plid * residue + +[] +type public InheritanceContext = + | Class + | Interface + | Unknown + +[] +type public RecordContext = + | CopyOnUpdate of range * CompletionPath // range + | Constructor of string // typename + | New of CompletionPath + +[] +type public CompletionContext = + + /// completion context cannot be determined due to errors + | Invalid + + /// completing something after the inherit keyword + | Inherit of InheritanceContext * CompletionPath + + /// completing records field + | RecordField of RecordContext + + | RangeOperator + + /// completing named parameters\setters in parameter list of constructor\method calls + /// end of name ast node * list of properties\parameters that were already set + | ParameterList of pos * HashSet + + | AttributeApplication + + | OpenDeclaration + + /// completing pattern type (e.g. foo (x: |)) + | PatternType + +type public ModuleKind = { IsAutoOpen: bool; HasModuleSuffix: bool } + +[] +type public EntityKind = + | Attribute + | Type + | FunctionOrValue of isActivePattern:bool + | Module of ModuleKind + +// implementation details used by other code in the compiler +module public UntypedParseImpl = + val TryFindExpressionASTLeftOfDotLeftOfCursor : pos * ParsedInput option -> (pos * bool) option + val GetRangeOfExprLeftOfDot : pos * ParsedInput option -> range option + val TryFindExpressionIslandInPosition : pos * ParsedInput option -> string option + val TryGetCompletionContext : pos * ParsedInput * lineStr: string -> CompletionContext option + val GetEntityKind: pos * ParsedInput -> EntityKind option + val GetFullNameOfSmallestModuleOrNamespaceAtPoint : ParsedInput * pos -> string[] + +// implementation details used by other code in the compiler +module internal SourceFileImpl = + val IsInterfaceFile : string -> bool + val AdditionalDefinesForUseInEditor: isInteractive: bool -> string list + diff --git a/src/fsharp/vs/ServiceXmlDocParser.fs b/src/fsharp/service/ServiceXmlDocParser.fs similarity index 99% rename from src/fsharp/vs/ServiceXmlDocParser.fs rename to src/fsharp/service/ServiceXmlDocParser.fs index 187c84bdd0a..92535f0cecf 100644 --- a/src/fsharp/vs/ServiceXmlDocParser.fs +++ b/src/fsharp/service/ServiceXmlDocParser.fs @@ -165,7 +165,7 @@ module XmlDocComment = Some (res, pos + (s.Length - res.Length)) let private str (prefix: string) (s: string, pos) = - match s.StartsWith prefix with + match s.StartsWithOrdinal(prefix) with | true -> let res = s.Substring prefix.Length Some (res, pos + (s.Length - res.Length)) diff --git a/src/fsharp/service/ServiceXmlDocParser.fsi b/src/fsharp/service/ServiceXmlDocParser.fsi new file mode 100644 index 00000000000..7ba0ae6e7ba --- /dev/null +++ b/src/fsharp/service/ServiceXmlDocParser.fsi @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace Microsoft.FSharp.Compiler.SourceCodeServices + +open Microsoft.FSharp.Compiler +open Microsoft.FSharp.Compiler.Range +open Microsoft.FSharp.Compiler.Ast + +/// Represent an Xml documentation block in source code +type public XmlDocable = + | XmlDocable of line:int * indent:int * paramNames:string list + +module public XmlDocComment = + + /// if it's a blank XML comment with trailing "<", returns Some (index of the "<"), otherwise returns None + val isBlank : string -> int option + +module public XmlDocParser = + /// Get the list of Xml documentation from current source code + val getXmlDocables : sourceCodeOfTheFile : string * input : Ast.ParsedInput option -> XmlDocable list + \ No newline at end of file diff --git a/src/fsharp/vs/service.fs b/src/fsharp/service/service.fs similarity index 86% rename from src/fsharp/vs/service.fs rename to src/fsharp/service/service.fs index f40cc61dc46..be7157ddde7 100644 --- a/src/fsharp/vs/service.fs +++ b/src/fsharp/service/service.fs @@ -17,6 +17,7 @@ open Microsoft.FSharp.Core.Printf open Microsoft.FSharp.Compiler open Microsoft.FSharp.Compiler.AbstractIL open Microsoft.FSharp.Compiler.AbstractIL.IL +open Microsoft.FSharp.Compiler.AbstractIL.ILBinaryReader open Microsoft.FSharp.Compiler.AbstractIL.Diagnostics open Microsoft.FSharp.Compiler.AbstractIL.Internal open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library @@ -58,7 +59,7 @@ module EnvMisc = let maxTypeCheckErrorsOutOfProjectContext = GetEnvInteger "FCS_MaxErrorsOutOfProjectContext" 3 let braceMatchCacheSize = GetEnvInteger "FCS_BraceMatchCacheSize" 5 let parseFileCacheSize = GetEnvInteger "FCS_ParseFileCacheSize" 2 - let checkFileInProjectCacheSize = GetEnvInteger "FCS_CheckFileInProjectCacheSize" 5 + let checkFileInProjectCacheSize = GetEnvInteger "FCS_CheckFileInProjectCacheSize" 10 let projectCacheSizeDefault = GetEnvInteger "FCS_ProjectCacheSizeDefault" 3 let frameworkTcImportsCacheStrongSize = GetEnvInteger "FCS_frameworkTcImportsCacheStrongSizeDefault" 8 @@ -151,7 +152,7 @@ type TypeCheckInfo _sTcConfig: TcConfig, g: TcGlobals, // The signature of the assembly being checked, up to and including the current file - ccuSig: ModuleOrNamespaceType, + ccuSigForFile: ModuleOrNamespaceType, thisCcu: CcuThunk, tcImports: TcImports, tcAccessRights: AccessorDomain, @@ -165,8 +166,8 @@ type TypeCheckInfo reactorOps : IReactorOperations, checkAlive : (unit -> bool), textSnapshotInfo:obj option, - implementationFiles: TypedImplFile list, - openDeclarations: OpenDeclaration list) = + implFileOpt: TypedImplFile option, + openDeclarations: OpenDeclaration[]) = let textSnapshotInfo = defaultArg textSnapshotInfo null let (|CNR|) (cnr:CapturedNameResolution) = @@ -182,6 +183,7 @@ type TypeCheckInfo let amap = tcImports.GetImportMap() let infoReader = new InfoReader(g,amap) let ncenv = new NameResolver(g,amap,infoReader,NameResolution.FakeInstantiationGenerator) + let cenv = SymbolEnv(g, thisCcu, Some ccuSigForFile, tcImports, amap, infoReader) /// Find the most precise naming environment for the given line and column let GetBestEnvForPos cursorPos = @@ -287,8 +289,8 @@ type TypeCheckInfo // If we're looking for members using a residue, we'd expect only // a single item (pick the first one) and we need the residue (which may be "") - | CNR(_,Item.Types(_,(typ::_)), _, denv, nenv, ad, m)::_, Some _ -> - let items = ResolveCompletionsInType ncenv nenv (ResolveCompletionTargets.All(ConstraintSolver.IsApplicableMethApprox g amap m)) m ad true typ + | CNR(_,Item.Types(_,(ty::_)), _, denv, nenv, ad, m)::_, Some _ -> + let items = ResolveCompletionsInType ncenv nenv (ResolveCompletionTargets.All(ConstraintSolver.IsApplicableMethApprox g amap m)) m ad true ty let items = List.map ItemWithNoInst items ReturnItemsOfType items g denv m filterCtors hasTextChangedSinceLastTypecheck @@ -351,7 +353,7 @@ type TypeCheckInfo methods |> List.collect (fun meth -> match meth.GetParamDatas(amap, m, meth.FormalMethodInst) with - | x::_ -> x |> List.choose(fun (ParamData(_isParamArray, _isOut, _optArgInfo, _callerInfoInfo, name, _, ty)) -> + | x::_ -> x |> List.choose(fun (ParamData(_isParamArray, _isInArg, _isOutArg, _optArgInfo, _callerInfo, name, _, ty)) -> match name with | Some n -> Some (Item.ArgName(n, ty, Some (ArgumentContainer.Method meth))) | None -> None @@ -364,7 +366,7 @@ type TypeCheckInfo let result = match cnrs with | CNR(_, Item.CtorGroup(_, ((ctor::_) as ctors)), _, denv, nenv, ad, m) ::_ -> - let props = ResolveCompletionsInType ncenv nenv ResolveCompletionTargets.SettablePropertiesAndFields m ad false ctor.EnclosingType + let props = ResolveCompletionsInType ncenv nenv ResolveCompletionTargets.SettablePropertiesAndFields m ad false ctor.ApparentEnclosingType let parameters = CollectParameters ctors amap m let items = props @ parameters Some (denv, m, items) @@ -391,13 +393,13 @@ type TypeCheckInfo let GetExprTypingForPosition(endOfExprPos) = let quals = sResolutions.CapturedExpressionTypings - |> Seq.filter (fun (pos,typ,denv,_,_,_) -> + |> Seq.filter (fun (pos,ty,denv,_,_,_) -> // We only want expression types that end at the particular position in the file we are looking at. let isLocationWeCareAbout = posEq pos endOfExprPos // Get rid of function types. True, given a 2-arg curried function "f x y", it is legal to do "(f x).GetType()", // but you almost never want to do this in practice, and we choose not to offer up any intellisense for // F# function types. - let isFunction = isFunTy denv.g typ + let isFunction = isFunTy denv.g ty isLocationWeCareAbout && not isFunction) |> Seq.toArray @@ -405,7 +407,7 @@ type TypeCheckInfo // filter out errors let quals = quals - |> Array.filter (fun (_,typ,denv,_,_,_) -> not (isTyparTy denv.g typ && (destTyparTy denv.g typ).IsFromError)) + |> Array.filter (fun (_,ty,denv,_,_,_) -> not (isTyparTy denv.g ty && (destTyparTy denv.g ty).IsFromError)) thereWereSomeQuals, quals /// obtains captured typing for the given position @@ -420,8 +422,8 @@ type TypeCheckInfo ignore(r) // for breakpoint posEq r.Start rq.Start) match bestQual with - | Some (_,typ,denv,_nenv,ad,m) when isRecdTy denv.g typ -> - let items = NameResolution.ResolveRecordOrClassFieldsOfType ncenv m ad typ false + | Some (_,ty,denv,_nenv,ad,m) when isRecdTy denv.g ty -> + let items = NameResolution.ResolveRecordOrClassFieldsOfType ncenv m ad ty false Some (items, denv, m) | _ -> None @@ -464,13 +466,13 @@ type TypeCheckInfo match bestQual with | Some bestQual -> - let (_,typ,denv,nenv,ad,m) = bestQual - let items = ResolveCompletionsInType ncenv nenv (ResolveCompletionTargets.All(ConstraintSolver.IsApplicableMethApprox g amap m)) m ad false typ + let (_,ty,denv,nenv,ad,m) = bestQual + let items = ResolveCompletionsInType ncenv nenv (ResolveCompletionTargets.All(ConstraintSolver.IsApplicableMethApprox g amap m)) m ad false ty let items = items |> List.map ItemWithNoInst let items = items |> RemoveDuplicateItems g let items = items |> RemoveExplicitlySuppressed g let items = items |> FilterItemsForCtors filterCtors - GetPreciseCompletionListFromExprTypingsResult.Some((items,denv,m), typ) + GetPreciseCompletionListFromExprTypingsResult.Some((items,denv,m), ty) | None -> if textChanged then GetPreciseCompletionListFromExprTypingsResult.NoneBecauseTypecheckIsStaleAndTextChanged else GetPreciseCompletionListFromExprTypingsResult.None @@ -516,14 +518,23 @@ type TypeCheckInfo | Item.Types(_, ty::_) when (isInterfaceTy g ty) -> true | _ -> false + // Return only items with the specified name let FilterDeclItemsByResidue (getItem: 'a -> Item) residue (items: 'a list) = + let attributedResidue = residue + "Attribute" + let nameMatchesResidue name = (residue = name) || (attributedResidue = name) + items |> List.filter (fun x -> let item = getItem x let n1 = item.DisplayName match item with - | Item.Types _ | Item.CtorGroup _ -> residue + "Attribute" = n1 || residue = n1 - | _ -> residue = n1 ) + | Item.Types _ -> nameMatchesResidue n1 + | Item.CtorGroup (_, meths) -> + nameMatchesResidue n1 || + meths |> List.exists (fun meth -> + let tcref = meth.ApparentEnclosingTyconRef + tcref.IsProvided || nameMatchesResidue tcref.DisplayName) + | _ -> residue = n1) /// Post-filter items to make sure they have precisely the right name /// This also checks that there are some remaining results @@ -557,7 +568,7 @@ type TypeCheckInfo p <- p - 1 if p >= 0 then Some p else None - let CompletionItem (ty: TyconRef option) (unresolvedEntity: AssemblySymbol option) (item: ItemWithInst) = + let CompletionItem (ty: ValueOption) (assemblySymbol: ValueOption) (item: ItemWithInst) = let kind = match item.Item with | Item.MethodGroup (_, minfo :: _, _) -> CompletionItemKind.Method minfo.IsExtensionMember @@ -566,33 +577,17 @@ type TypeCheckInfo | Item.Event _ -> CompletionItemKind.Event | Item.ILField _ | Item.Value _ -> CompletionItemKind.Field + | Item.CustomOperation _ -> CompletionItemKind.CustomOperation | _ -> CompletionItemKind.Other - let getNamespace (idents: Idents) = - if idents.Length > 1 then Some idents.[..idents.Length - 2] else None - - let unresolved = - unresolvedEntity - |> Option.map (fun x -> - let ns = - x.TopRequireQualifiedAccessParent - |> Option.bind getNamespace - |> Option.orElseWith (fun () -> getNamespace x.CleanedIdents) - |> Option.defaultValue [||] - - let displayName = x.CleanedIdents |> Array.skip ns.Length |> String.concat "." - - { DisplayName = displayName - Namespace = ns }) - { ItemWithInst = item MinorPriority = 0 Kind = kind IsOwnMember = false - Type = ty - Unresolved = unresolved } + Type = match ty with ValueSome x -> Some x | _ -> None + Unresolved = match assemblySymbol with ValueSome x -> Some x.UnresolvedSymbol | _ -> None } - let DefaultCompletionItem item = CompletionItem None None item + let DefaultCompletionItem item = CompletionItem ValueNone ValueNone item let getItem (x: ItemWithInst) = x.Item let GetDeclaredItems (parseResultsOpt: FSharpParseFileResults option, lineStr: string, origLongIdentOpt, colAtEndOfNamesAndResidue, residueOpt, lastDotPos, line, loc, @@ -640,29 +635,27 @@ type TypeCheckInfo let pos = mkPos line loc let (nenv, ad), m = GetBestEnvForPos pos - let getType() = - let tref = - match NameResolution.TryToResolveLongIdentAsType ncenv nenv m plid with - | Some x -> Some x - | None -> - match lastDotPos |> Option.orElseWith (fun _ -> FindFirstNonWhitespacePosition lineStr (colAtEndOfNamesAndResidue - 1)) with - | Some p when lineStr.[p] = '.' -> - match FindFirstNonWhitespacePosition lineStr (p - 1) with - | Some colAtEndOfNames -> - let colAtEndOfNames = colAtEndOfNames + 1 // convert 0-based to 1-based - let tyconRef = TryGetTypeFromNameResolution(line, colAtEndOfNames, residueOpt, resolveOverloads) - tyconRef - | None -> None - | _ -> None - - tref |> Option.bind (tryDestAppTy g) + let getType() = + match NameResolution.TryToResolveLongIdentAsType ncenv nenv m plid with + | Some x -> tryDestAppTy g x + | None -> + match lastDotPos |> Option.orElseWith (fun _ -> FindFirstNonWhitespacePosition lineStr (colAtEndOfNamesAndResidue - 1)) with + | Some p when lineStr.[p] = '.' -> + match FindFirstNonWhitespacePosition lineStr (p - 1) with + | Some colAtEndOfNames -> + let colAtEndOfNames = colAtEndOfNames + 1 // convert 0-based to 1-based + match TryGetTypeFromNameResolution(line, colAtEndOfNames, residueOpt, resolveOverloads) with + | Some x -> tryDestAppTy g x + | _ -> ValueNone + | None -> ValueNone + | _ -> ValueNone match nameResItems with | NameResResult.TypecheckStaleAndTextChanged -> None // second-chance intellisense will try again | NameResResult.Cancel(denv,m) -> Some([], denv, m) | NameResResult.Members(FilterRelevantItems getItem exactMatchResidueOpt (items, denv, m)) -> // lookup based on name resolution results successful - Some (items |> List.map (CompletionItem (getType()) None), denv, m) + Some (items |> List.map (CompletionItem (getType()) ValueNone), denv, m) | _ -> match origLongIdentOpt with | None -> None @@ -695,9 +688,9 @@ type TypeCheckInfo // These come through as an empty plid and residue "". Otherwise we try an environment lookup // and then return to the qualItems. This is because the expression typings are a little inaccurate, primarily because // it appears we're getting some typings recorded for non-atomic expressions like "f x" - when (match plid with [] -> true | _ -> false) -> + when isNil plid -> // lookup based on expression typings successful - Some (items |> List.map (CompletionItem (tryDestAppTy g ty) None), denv, m) + Some (items |> List.map (CompletionItem (tryDestAppTy g ty) ValueNone), denv, m) | GetPreciseCompletionListFromExprTypingsResult.NoneBecauseThereWereTypeErrors, _ -> // There was an error, e.g. we have "." and there is an error determining the type of // In this case, we don't want any of the fallback logic, rather, we want to produce zero results. @@ -705,7 +698,7 @@ type TypeCheckInfo | GetPreciseCompletionListFromExprTypingsResult.NoneBecauseTypecheckIsStaleAndTextChanged, _ -> // we want to report no result and let second-chance intellisense kick in None - | _, true when (match plid with [] -> true | _ -> false) -> + | _, true when isNil plid -> // If the user just pressed '.' after an _expression_ (not a plid), it is never right to show environment-lookup top-level completions. // The user might by typing quickly, and the LS didn't have an expression type right before the dot yet. // Second-chance intellisense will bring up the correct list in a moment. @@ -720,19 +713,19 @@ type TypeCheckInfo // First, use unfiltered name resolution items, if they're not empty | NameResResult.Members(items, denv, m), _, _ when not (isNil items) -> // lookup based on name resolution results successful - Some(items |> List.map (CompletionItem (getType()) None), denv, m) + ValueSome(items |> List.map (CompletionItem (getType()) ValueNone), denv, m) // If we have nonempty items from environment that were resolved from a type, then use them... // (that's better than the next case - here we'd return 'int' as a type) | _, FilterRelevantItems getItem exactMatchResidueOpt (items, denv, m), _ when not (isNil items) -> // lookup based on name and environment successful - Some(items |> List.map (CompletionItem (getType()) None), denv, m) + ValueSome(items |> List.map (CompletionItem (getType()) ValueNone), denv, m) // Try again with the qualItems | _, _, GetPreciseCompletionListFromExprTypingsResult.Some(FilterRelevantItems getItem exactMatchResidueOpt (items, denv, m), ty) -> - Some(items |> List.map (CompletionItem (tryDestAppTy g ty) None), denv, m) + ValueSome(items |> List.map (CompletionItem (tryDestAppTy g ty) ValueNone), denv, m) - | _ -> None + | _ -> ValueNone let globalResult = match origLongIdentOpt with @@ -750,16 +743,16 @@ type TypeCheckInfo match globalItems, denv, m with | FilterRelevantItems getItem exactMatchResidueOpt (globalItemsFiltered, denv, m) when not (isNil globalItemsFiltered) -> globalItemsFiltered - |> List.map(fun globalItem -> CompletionItem (getType()) (Some globalItem) (ItemWithNoInst globalItem.Symbol.Item)) - |> fun r -> Some(r, denv, m) - | _ -> None - | _ -> None // do not return unresolved items after dot + |> List.map(fun globalItem -> CompletionItem (getType()) (ValueSome globalItem) (ItemWithNoInst globalItem.Symbol.Item)) + |> fun r -> ValueSome(r, denv, m) + | _ -> ValueNone + | _ -> ValueNone // do not return unresolved items after dot match envResult, globalResult with - | Some (items, denv, m), Some (gItems,_,_) -> Some (items @ gItems, denv, m) - | Some x, None -> Some x - | None, Some y -> Some y - | None, None -> None + | ValueSome (items, denv, m), ValueSome (gItems,_,_) -> Some (items @ gItems, denv, m) + | ValueSome x, ValueNone -> Some x + | ValueNone, ValueSome y -> Some y + | ValueNone, ValueNone -> None let toCompletionItems (items: ItemWithInst list, denv: DisplayEnv, m: range ) = @@ -780,7 +773,11 @@ type TypeCheckInfo | otherwise -> otherwise - 1 // Look for a "special" completion context - let completionContext = UntypedParseImpl.TryGetCompletionContext(mkPos line colAtEndOfNamesAndResidue, parseResultsOpt, lineStr) + let completionContext = + parseResultsOpt + |> Option.bind (fun x -> x.ParseTree) + |> Option.bind (fun parseTree -> UntypedParseImpl.TryGetCompletionContext(mkPos line colAtEndOfNamesAndResidue, parseTree, lineStr)) + let res = match completionContext with // Invalid completion locations @@ -904,6 +901,9 @@ type TypeCheckInfo match item with | Item.Types _ | Item.ModuleOrNamespaces _ -> true | _ -> false + + /// Find the most precise display context for the given line and column. + member __.GetBestDisplayEnvForPos cursorPos = GetBestEnvForPos cursorPos member __.GetVisibleNamespacesAndModulesAtPosition(cursorPos: pos) : ModuleOrNamespaceRef list = let (nenv, ad), m = GetBestEnvForPos cursorPos @@ -926,15 +926,15 @@ type TypeCheckInfo scope.IsRelativeNameResolvable(cursorPos, plid, symbol.Item) /// Get the auto-complete items at a location - member __.GetDeclarations (ctok, parseResultsOpt, line, lineStr, partialName, getAllSymbols, hasTextChangedSinceLastTypecheck) = + member __.GetDeclarations (ctok, parseResultsOpt, line, lineStr, partialName, getAllEntities, hasTextChangedSinceLastTypecheck) = let isInterfaceFile = SourceFileImpl.IsInterfaceFile mainInputFileName ErrorScope.Protect Range.range0 (fun () -> - match GetDeclItemsForNamesAtPosition(ctok, parseResultsOpt, Some partialName.QualifyingIdents, Some partialName.PartialIdent, partialName.LastDotPos, line, lineStr, partialName.EndColumn + 1, ResolveTypeNamesToCtors, ResolveOverloads.Yes, getAllSymbols, hasTextChangedSinceLastTypecheck) with + match GetDeclItemsForNamesAtPosition(ctok, parseResultsOpt, Some partialName.QualifyingIdents, Some partialName.PartialIdent, partialName.LastDotPos, line, lineStr, partialName.EndColumn + 1, ResolveTypeNamesToCtors, ResolveOverloads.Yes, getAllEntities, hasTextChangedSinceLastTypecheck) with | None -> FSharpDeclarationListInfo.Empty - | Some (items, denv, ctx, m) -> + | Some (items, denv, ctx, m) -> let items = if isInterfaceFile then items |> List.filter (fun x -> IsValidSignatureFileItem x.Item) else items - let getAccessibility item = FSharpSymbol.GetAccessibility (FSharpSymbol.Create(g, thisCcu, tcImports, item)) + let getAccessibility item = FSharpSymbol.GetAccessibility (FSharpSymbol.Create(cenv, item)) let currentNamespaceOrModule = parseResultsOpt |> Option.bind (fun x -> x.ParseTree) @@ -946,11 +946,11 @@ type TypeCheckInfo FSharpDeclarationListInfo.Error msg) /// Get the symbols for auto-complete items at a location - member __.GetDeclarationListSymbols (ctok, parseResultsOpt, line, lineStr, partialName, hasTextChangedSinceLastTypecheck) = + member __.GetDeclarationListSymbols (ctok, parseResultsOpt, line, lineStr, partialName, getAllEntities, hasTextChangedSinceLastTypecheck) = let isInterfaceFile = SourceFileImpl.IsInterfaceFile mainInputFileName ErrorScope.Protect Range.range0 (fun () -> - match GetDeclItemsForNamesAtPosition(ctok, parseResultsOpt, Some partialName.QualifyingIdents, Some partialName.PartialIdent, partialName.LastDotPos, line, lineStr, partialName.EndColumn + 1, ResolveTypeNamesToCtors, ResolveOverloads.Yes, (fun () -> []), hasTextChangedSinceLastTypecheck) with + match GetDeclItemsForNamesAtPosition(ctok, parseResultsOpt, Some partialName.QualifyingIdents, Some partialName.PartialIdent, partialName.LastDotPos, line, lineStr, partialName.EndColumn + 1, ResolveTypeNamesToCtors, ResolveOverloads.Yes, getAllEntities, hasTextChangedSinceLastTypecheck) with | None -> List.Empty | Some (items, denv, _, m) -> let items = if isInterfaceFile then items |> List.filter (fun x -> IsValidSignatureFileItem x.Item) else items @@ -962,7 +962,7 @@ type TypeCheckInfo // - show types with fewer generic parameters first // - show types before over other related items - they usually have very useful XmlDocs let items = - items |> List.sortBy (fun d -> + items |> List.sortBy (fun d -> let n = match d.Item with | Item.Types (_,(TType_app(tcref,_) :: _)) -> 1 + tcref.TyparsNoRange.Length @@ -970,15 +970,26 @@ type TypeCheckInfo | Item.FakeInterfaceCtor (TType_app(tcref,_)) | Item.DelegateCtor (TType_app(tcref,_)) -> 1000 + tcref.TyparsNoRange.Length // Put type ctors after types, sorted by #typars. RemoveDuplicateItems will remove DefaultStructCtors if a type is also reported with this name - | Item.CtorGroup (_, (cinfo :: _)) -> 1000 + 10 * (tcrefOfAppTy g cinfo.EnclosingType).TyparsNoRange.Length + | Item.CtorGroup (_, (cinfo :: _)) -> 1000 + 10 * cinfo.DeclaringTyconRef.TyparsNoRange.Length | _ -> 0 (d.Item.DisplayName,n)) // Remove all duplicates. We've put the types first, so this removes the DelegateCtor and DefaultStructCtor's. let items = items |> RemoveDuplicateCompletionItems g - // Group by display name - let items = items |> List.groupBy (fun d -> d.Item.DisplayName) + // Group by compiled name for types, display name for functions + // (We don't want types with the same display name to be grouped as overloads) + let items = + items |> List.groupBy (fun d -> + match d.Item with + | Item.Types (_,(TType_app(tcref,_) :: _)) + | Item.ExnCase tcref -> tcref.LogicalName + | Item.UnqualifiedType(tcref :: _) + | Item.FakeInterfaceCtor (TType_app(tcref,_)) + | Item.DelegateCtor (TType_app(tcref,_)) -> tcref.CompiledName + | Item.CtorGroup (_, (cinfo :: _)) -> + cinfo.ApparentEnclosingTyconRef.CompiledName + | _ -> d.Item.DisplayName) // Filter out operators (and list) let items = @@ -994,7 +1005,6 @@ type TypeCheckInfo items |> List.filter (fun (nm,items) -> not (isOpItem(nm,items)) && not(isFSharpList nm)) - let items = // Filter out duplicate names items |> List.map (fun (_nm,itemsWithSameName) -> @@ -1002,7 +1012,7 @@ type TypeCheckInfo | [] -> failwith "Unexpected empty bag" | items -> items - |> List.map (fun item -> let symbol = FSharpSymbol.Create(g, thisCcu, tcImports, item.Item) + |> List.map (fun item -> let symbol = FSharpSymbol.Create(cenv, item.Item) FSharpSymbolUse(g, denv, symbol, ItemOccurence.Use, m))) //end filtering @@ -1081,20 +1091,20 @@ type TypeCheckInfo GetF1Keyword g item.Item | _ -> // handle new Type() - let allTypes, constr, typ = + let allTypes, constr, ty = List.fold - (fun (allTypes,constr,typ) (item: CompletionItem) -> - match item.Item, constr, typ with + (fun (allTypes,constr,ty) (item: CompletionItem) -> + match item.Item, constr, ty with | (Item.Types _) as t, _, None -> allTypes, constr, Some t - | (Item.Types _), _, _ -> allTypes, constr, typ - | (Item.CtorGroup _), None, _ -> allTypes, Some item.Item, typ + | (Item.Types _), _, _ -> allTypes, constr, ty + | (Item.CtorGroup _), None, _ -> allTypes, Some item.Item, ty | _ -> false, None, None) (true,None,None) items - match allTypes, constr, typ with + match allTypes, constr, ty with | true, Some (Item.CtorGroup(_, _) as item), _ -> GetF1Keyword g item - | true, _, Some typ - -> GetF1Keyword g typ + | true, _, Some ty + -> GetF1Keyword g ty | _ -> None ) (fun msg -> @@ -1106,7 +1116,15 @@ type TypeCheckInfo (fun () -> match GetDeclItemsForNamesAtPosition(ctok, None,namesOpt,None,None,line,lineStr,colAtEndOfNames,ResolveTypeNamesToCtors,ResolveOverloads.No,(fun() -> []),fun _ -> false) with | None -> FSharpMethodGroup("",[| |]) - | Some (items, denv, _, m) -> FSharpMethodGroup.Create(infoReader, m, denv, items |> List.map (fun x -> x.ItemWithInst))) + | Some (items, denv, _, m) -> + // GetDeclItemsForNamesAtPosition returns Items.Types and Item.CtorGroup for `new T(|)`, + // the Item.Types is not needed here as it duplicates (at best) parameterless ctor. + let ctors = items |> List.filter (fun x -> match x.Item with Item.CtorGroup _ -> true | _ -> false) + let items = + match ctors with + | [] -> items + | ctors -> ctors + FSharpMethodGroup.Create(infoReader, m, denv, items |> List.map (fun x -> x.ItemWithInst))) (fun msg -> Trace.TraceInformation(sprintf "FCS: recovering from error in GetMethods: '%s'" msg) FSharpMethodGroup(msg,[| |])) @@ -1118,14 +1136,14 @@ type TypeCheckInfo | None | Some ([],_,_,_) -> None | Some (items, denv, _, m) -> let allItems = items |> List.collect (fun item -> SymbolHelpers.FlattenItems g m item.Item) - let symbols = allItems |> List.map (fun item -> FSharpSymbol.Create(g, thisCcu, tcImports, item)) + let symbols = allItems |> List.map (fun item -> FSharpSymbol.Create(cenv, item)) Some (symbols, denv, m) ) (fun msg -> Trace.TraceInformation(sprintf "FCS: recovering from error in GetMethodsAsSymbols: '%s'" msg) None) - member scope.GetDeclarationLocation (ctok, line, lineStr, colAtEndOfNames, names, preferFlag) = + member __.GetDeclarationLocation (ctok, line, lineStr, colAtEndOfNames, names, preferFlag) = ErrorScope.Protect Range.range0 (fun () -> match GetDeclItemsForNamesAtPosition (ctok, None,Some(names), None, None, line, lineStr, colAtEndOfNames, ResolveTypeNamesToCtors,ResolveOverloads.Yes,(fun() -> []), fun _ -> false) with @@ -1134,7 +1152,7 @@ type TypeCheckInfo | Some (item :: _, _, _, _) -> let getTypeVarNames (ilinfo: ILMethInfo) = let classTypeParams = ilinfo.DeclaringTyconRef.ILTyconRawMetadata.GenericParams |> List.map (fun paramDef -> paramDef.Name) - let methodTypeParams = ilinfo.FormalMethodTypars |> List.map (fun typ -> typ.Name) + let methodTypeParams = ilinfo.FormalMethodTypars |> List.map (fun ty -> ty.Name) classTypeParams @ methodTypeParams |> Array.ofList let result = @@ -1145,7 +1163,7 @@ type TypeCheckInfo let typeVarNames = getTypeVarNames ilinfo ParamTypeSymbol.tryOfILTypes typeVarNames ilinfo.ILMethodRef.ArgTypes |> Option.map (fun args -> - let externalSym = ExternalSymbol.Constructor (ilinfo.ILMethodRef.EnclosingTypeRef.FullName, args) + let externalSym = ExternalSymbol.Constructor (ilinfo.ILMethodRef.DeclaringTypeRef.FullName, args) FSharpFindDeclResult.ExternalDecl (assref.Name, externalSym)) | _ -> None @@ -1155,33 +1173,33 @@ type TypeCheckInfo let typeVarNames = getTypeVarNames ilinfo ParamTypeSymbol.tryOfILTypes typeVarNames ilinfo.ILMethodRef.ArgTypes |> Option.map (fun args -> - let externalSym = ExternalSymbol.Method (ilinfo.ILMethodRef.EnclosingTypeRef.FullName, name, args, ilinfo.ILMethodRef.GenericArity) + let externalSym = ExternalSymbol.Method (ilinfo.ILMethodRef.DeclaringTypeRef.FullName, name, args, ilinfo.ILMethodRef.GenericArity) FSharpFindDeclResult.ExternalDecl (assref.Name, externalSym)) | _ -> None - | Item.Property (name, ILProp (_, propInfo) :: _) -> + | Item.Property (name, ILProp propInfo :: _) -> let methInfo = - if propInfo.HasGetter then Some (propInfo.GetterMethod g) - elif propInfo.HasSetter then Some (propInfo.SetterMethod g) + if propInfo.HasGetter then Some propInfo.GetterMethod + elif propInfo.HasSetter then Some propInfo.SetterMethod else None match methInfo with | Some methInfo -> match methInfo.MetadataScope with | ILScopeRef.Assembly assref -> - let externalSym = ExternalSymbol.Property (methInfo.ILMethodRef.EnclosingTypeRef.FullName, name) + let externalSym = ExternalSymbol.Property (methInfo.ILMethodRef.DeclaringTypeRef.FullName, name) Some (FSharpFindDeclResult.ExternalDecl (assref.Name, externalSym)) | _ -> None | None -> None - | Item.ILField (ILFieldInfo (ILTypeInfo (tr, _, _, _) & typeInfo, fieldDef)) when not tr.IsLocalRef -> + | Item.ILField (ILFieldInfo (typeInfo, fieldDef)) when not typeInfo.TyconRefOfRawMetadata.IsLocalRef -> match typeInfo.ILScopeRef with | ILScopeRef.Assembly assref -> let externalSym = ExternalSymbol.Field (typeInfo.ILTypeRef.FullName, fieldDef.Name) Some (FSharpFindDeclResult.ExternalDecl (assref.Name, externalSym)) | _ -> None - | Item.Event (ILEvent (_, ILEventInfo (ILTypeInfo (tr, _, _, _) & typeInfo, eventDef))) when not tr.IsLocalRef -> + | Item.Event (ILEvent (ILEventInfo (typeInfo, eventDef))) when not typeInfo.TyconRefOfRawMetadata.IsLocalRef -> match typeInfo.ILScopeRef with | ILScopeRef.Assembly assref -> let externalSym = ExternalSymbol.Event (typeInfo.ILTypeRef.FullName, eventDef.Name) @@ -1192,58 +1210,57 @@ type TypeCheckInfo //Item.Value(vref) None - | Item.Types (_, [AppTy g (tr, _)]) when not tr.IsLocalRef -> + | Item.Types (_, TType_app (tr, _) :: _) when tr.IsLocalRef && tr.IsTypeAbbrev -> None + + | Item.Types (_, [ AppTy g (tr, _) ]) when not tr.IsLocalRef -> match tr.TypeReprInfo, tr.PublicPath with | TILObjectRepr(TILObjectReprData (ILScopeRef.Assembly assref, _, _)), Some (PubPath parts) -> let fullName = parts |> String.concat "." Some (FSharpFindDeclResult.ExternalDecl (assref.Name, ExternalSymbol.Type fullName)) | _ -> None | _ -> None - match result with | Some x -> x - | None -> - let fail defaultReason = - match item.Item with + | None -> + match rangeOfItem g preferFlag item.Item with + | Some itemRange -> + let projectDir = Filename.directoryName (if projectFileName = "" then mainInputFileName else projectFileName) + let range = fileNameOfItem g (Some projectDir) itemRange item.Item + mkRange range itemRange.Start itemRange.End + |> FSharpFindDeclResult.DeclFound + | None -> + match item.Item with #if !NO_EXTENSIONTYPING - | SymbolHelpers.ItemIsProvidedType g (tcref) -> FSharpFindDeclResult.DeclNotFound (FSharpFindDeclFailureReason.ProvidedType(tcref.DisplayName)) - | Item.CtorGroup(name, ProvidedMeth(_)::_) - | Item.MethodGroup(name, ProvidedMeth(_)::_, _) - | Item.Property(name, ProvidedProp(_)::_) -> FSharpFindDeclResult.DeclNotFound (FSharpFindDeclFailureReason.ProvidedMember(name)) - | Item.Event(ProvidedEvent(_) as e) -> FSharpFindDeclResult.DeclNotFound (FSharpFindDeclFailureReason.ProvidedMember(e.EventName)) - | Item.ILField(ProvidedField(_) as f) -> FSharpFindDeclResult.DeclNotFound (FSharpFindDeclFailureReason.ProvidedMember(f.FieldName)) +// provided items may have TypeProviderDefinitionLocationAttribute that binds them to some location + | Item.CtorGroup (name, ProvidedMeth (_)::_ ) + | Item.MethodGroup(name, ProvidedMeth (_)::_, _) + | Item.Property (name, ProvidedProp (_)::_ ) -> FSharpFindDeclFailureReason.ProvidedMember name + | Item.Event ( ProvidedEvent(_) as e ) -> FSharpFindDeclFailureReason.ProvidedMember e.EventName + | Item.ILField ( ProvidedField(_) as f ) -> FSharpFindDeclFailureReason.ProvidedMember f.FieldName + | SymbolHelpers.ItemIsProvidedType g (tcref) -> FSharpFindDeclFailureReason.ProvidedType tcref.DisplayName #endif - | _ -> FSharpFindDeclResult.DeclNotFound defaultReason - - match rangeOfItem g preferFlag item.Item with - | None -> fail (FSharpFindDeclFailureReason.Unknown "") - | Some itemRange -> - - let projectDir = Filename.directoryName (if projectFileName = "" then mainInputFileName else projectFileName) - let filename = fileNameOfItem g (Some projectDir) itemRange item.Item - if FileSystem.SafeExists filename then - FSharpFindDeclResult.DeclFound (mkRange filename itemRange.Start itemRange.End) - else - fail FSharpFindDeclFailureReason.NoSourceCode // provided items may have TypeProviderDefinitionLocationAttribute that binds them to some location + | _ -> FSharpFindDeclFailureReason.Unknown "" + |> FSharpFindDeclResult.DeclNotFound ) (fun msg -> Trace.TraceInformation(sprintf "FCS: recovering from error in GetDeclarationLocation: '%s'" msg) FSharpFindDeclResult.DeclNotFound (FSharpFindDeclFailureReason.Unknown msg)) - member scope.GetSymbolUseAtLocation (ctok, line, lineStr, colAtEndOfNames, names) = + member __.GetSymbolUseAtLocation (ctok, line, lineStr, colAtEndOfNames, names) = ErrorScope.Protect Range.range0 (fun () -> match GetDeclItemsForNamesAtPosition (ctok, None,Some(names), None, None, line, lineStr, colAtEndOfNames, ResolveTypeNamesToCtors, ResolveOverloads.Yes,(fun() -> []), fun _ -> false) with | None | Some ([], _, _, _) -> None | Some (item :: _, denv, _, m) -> - let symbol = FSharpSymbol.Create(g, thisCcu, tcImports, item.Item) + let symbol = FSharpSymbol.Create(cenv, item.Item) Some (symbol, denv, m) ) (fun msg -> Trace.TraceInformation(sprintf "FCS: recovering from error in GetSymbolUseAtLocation: '%s'" msg) None) - member scope.PartialAssemblySignature() = FSharpAssemblySignature(g, thisCcu, tcImports, None, ccuSig) + member __.PartialAssemblySignatureForFile = + FSharpAssemblySignature(g, thisCcu, ccuSigForFile, tcImports, None, ccuSigForFile) member __.AccessRights = tcAccessRights @@ -1298,7 +1315,22 @@ type TypeCheckInfo sResolutions.CapturedNameResolutions :> seq<_> let isDisposableTy (ty: TType) = - Infos.ExistsHeadTypeInEntireHierarchy g amap range0 ty g.tcref_System_IDisposable + protectAssemblyExplorationNoReraise false false (fun () -> Infos.ExistsHeadTypeInEntireHierarchy g amap range0 ty g.tcref_System_IDisposable) + + let isStructTyconRef (tyconRef: TyconRef) = + let ty = generalizedTyconRef tyconRef + let underlyingTy = stripTyEqnsAndMeasureEqns g ty + isStructTy g underlyingTy + + let isValRefMutable (vref: ValRef) = + // Mutable values, ref cells, and non-inref byrefs are mutable. + vref.IsMutable + || Tastops.isRefCellTy g vref.Type + || (Tastops.isByrefTy g vref.Type && not (Tastops.isInByrefTy g vref.Type)) + + let isRecdFieldMutable (rfinfo: RecdFieldInfo) = + (rfinfo.RecdField.IsMutable && rfinfo.LiteralValue.IsNone) + || Tastops.isRefCellTy g rfinfo.RecdField.FormalType resolutions |> Seq.choose (fun cnr -> @@ -1306,7 +1338,7 @@ type TypeCheckInfo // 'seq' in 'seq { ... }' gets colored as keywords | CNR(_, (Item.Value vref), ItemOccurence.Use, _, _, _, m) when valRefEq g g.seq_vref vref -> Some (m, SemanticClassificationType.ComputationExpression) - | CNR(_, (Item.Value vref), _, _, _, _, m) when vref.IsMutable || Tastops.isRefCellTy g vref.Type -> + | CNR(_, (Item.Value vref), _, _, _, _, m) when isValRefMutable vref -> Some (m, SemanticClassificationType.MutableVar) | CNR(_, Item.Value KeywordIntrinsicValue, ItemOccurence.Use, _, _, _, m) -> Some (m, SemanticClassificationType.IntrinsicFunction) @@ -1319,7 +1351,7 @@ type TypeCheckInfo Some (m, SemanticClassificationType.Operator) else Some (m, SemanticClassificationType.Function) - | CNR(_, Item.RecdField rfinfo, _, _, _, _, m) when rfinfo.RecdField.IsMutable && rfinfo.LiteralValue.IsNone -> + | CNR(_, Item.RecdField rfinfo, _, _, _, _, m) when isRecdFieldMutable rfinfo -> Some (m, SemanticClassificationType.MutableVar) | CNR(_, Item.RecdField rfinfo, _, _, _, _, m) when isFunction g rfinfo.FieldType -> Some (m, SemanticClassificationType.Function) @@ -1338,6 +1370,8 @@ type TypeCheckInfo Some (m, SemanticClassificationType.Interface) | CNR(_, Item.Types(_, types), LegitTypeOccurence, _, _, _, m) when types |> List.exists (isStructTy g) -> Some (m, SemanticClassificationType.ValueType) + | CNR(_, Item.Types(_, TType_app(tyconRef, TType_measure _ :: _) :: _), LegitTypeOccurence, _, _, _, m) when isStructTyconRef tyconRef -> + Some (m, SemanticClassificationType.ValueType) | CNR(_, Item.Types(_, types), LegitTypeOccurence, _, _, _, m) when types |> List.exists isDisposableTy -> Some (m, SemanticClassificationType.Disposable) | CNR(_, Item.Types _, LegitTypeOccurence, _, _, _, m) -> @@ -1349,7 +1383,7 @@ type TypeCheckInfo Some (m, SemanticClassificationType.ValueType) else Some (m, SemanticClassificationType.ReferenceType) | CNR(_, Item.CtorGroup(_, minfos), LegitTypeOccurence, _, _, _, m) -> - if minfos |> List.exists (fun minfo -> isStructTy g minfo.EnclosingType) then + if minfos |> List.exists (fun minfo -> isStructTy g minfo.ApparentEnclosingType) then Some (m, SemanticClassificationType.ValueType) else Some (m, SemanticClassificationType.ReferenceType) | CNR(_, Item.ExnCase _, LegitTypeOccurence, _, _, _, m) -> @@ -1377,27 +1411,28 @@ type TypeCheckInfo member __.TcImports = tcImports /// The inferred signature of the file - member __.CcuSig = ccuSig + member __.CcuSigForFile = ccuSigForFile /// The assembly being analyzed member __.ThisCcu = thisCcu - member __.ImplementationFiles = implementationFiles + member __.ImplementationFile = implFileOpt /// All open declarations in the file, including auto open modules member __.OpenDeclarations = openDeclarations + member __.SymbolEnv = cenv + override __.ToString() = "TypeCheckInfo(" + mainInputFileName + ")" type FSharpParsingOptions = - { - SourceFiles: string [] + { SourceFiles: string [] ConditionalCompilationDefines: string list ErrorSeverityOptions: FSharpErrorSeverityOptions + IsInteractive: bool LightSyntax: bool option CompilingFsLib: bool - IsExe: bool - } + IsExe: bool } member x.LastFileName = Debug.Assert(not (Array.isEmpty x.SourceFiles), "Parsing options don't contain any file") @@ -1407,26 +1442,26 @@ type FSharpParsingOptions = { SourceFiles = Array.empty ConditionalCompilationDefines = [] ErrorSeverityOptions = FSharpErrorSeverityOptions.Default + IsInteractive = false LightSyntax = None CompilingFsLib = false - IsExe = false - } + IsExe = false } - static member FromTcConfig(tcConfig: TcConfig, sourceFiles) = - { - SourceFiles = sourceFiles + static member FromTcConfig(tcConfig: TcConfig, sourceFiles, isInteractive: bool) = + { SourceFiles = sourceFiles ConditionalCompilationDefines = tcConfig.conditionalCompilationDefines ErrorSeverityOptions = tcConfig.errorSeverityOptions + IsInteractive = isInteractive LightSyntax = tcConfig.light CompilingFsLib = tcConfig.compilingFslib - IsExe = tcConfig.target.IsExe - } + IsExe = tcConfig.target.IsExe } - static member FromTcConfigBuidler(tcConfigB: TcConfigBuilder, sourceFiles) = + static member FromTcConfigBuidler(tcConfigB: TcConfigBuilder, sourceFiles, isInteractive: bool) = { SourceFiles = sourceFiles ConditionalCompilationDefines = tcConfigB.conditionalCompilationDefines ErrorSeverityOptions = tcConfigB.errorSeverityOptions + IsInteractive = isInteractive LightSyntax = tcConfigB.light CompilingFsLib = tcConfigB.compilingFslib IsExe = tcConfigB.target.IsExe @@ -1498,7 +1533,7 @@ module internal Parser = // If we're editing a script then we define INTERACTIVE otherwise COMPILED. // Since this parsing for intellisense we always define EDITING. - let defines = SourceFileImpl.AdditionalDefinesForUseInEditor(fileName) @ options.ConditionalCompilationDefines + let defines = (SourceFileImpl.AdditionalDefinesForUseInEditor options.IsInteractive) @ options.ConditionalCompilationDefines // Note: we don't really attempt to intern strings across a large scope. let lexResourceManager = new Lexhelp.LexResourceManager() @@ -1516,7 +1551,17 @@ module internal Parser = if source.Length = 0 || not (source.[source.Length - 1] = '\n') then source + "\n" else source let matchBraces(source, fileName, options: FSharpParsingOptions, userOpName: string) = + let delayedLogger = CapturingErrorLogger("matchBraces") + use _unwindEL = PushErrorLoggerPhaseUntilUnwind (fun _ -> delayedLogger) + use _unwindBP = PushThreadBuildPhaseUntilUnwind BuildPhase.Parse + Trace.TraceInformation("FCS: {0}.{1} ({2})", userOpName, "matchBraces", fileName) + + // Make sure there is an ErrorLogger installed whenever we do stuff that might record errors, even if we ultimately ignore the errors + let delayedLogger = CapturingErrorLogger("matchBraces") + use _unwindEL = PushErrorLoggerPhaseUntilUnwind (fun _ -> delayedLogger) + use _unwindBP = PushThreadBuildPhaseUntilUnwind BuildPhase.Parse + let matchingBraces = new ResizeArray<_>() Lexhelp.usingLexbufForParsing(UnicodeLexing.StringAsLexbuf(addNewLine source), fileName) (fun lexbuf -> let errHandler = ErrorHandler(false, fileName, options.ErrorSeverityOptions, source) @@ -1581,7 +1626,7 @@ module internal Parser = tcState: TcState, loadClosure: LoadClosure option, // These are the errors and warnings seen by the background compiler for the entire antecedent - backgroundDiagnostics: (PhasedDiagnostic * FSharpErrorSeverity) list, + backgroundDiagnostics: (PhasedDiagnostic * FSharpErrorSeverity)[], reactorOps: IReactorOperations, // Used by 'FSharpDeclarationListInfo' to check the IncrementalBuilder is still alive. checkAlive : (unit -> bool), @@ -1589,6 +1634,8 @@ module internal Parser = userOpName: string) = async { + use _logBlock = Logger.LogBlock LogCompilerFunctionId.Service_CheckOneFile + match parseResults.ParseTree with // When processing the following cases, we don't need to type-check | None -> return [||], TypeCheckAborted.Yes @@ -1631,7 +1678,7 @@ module internal Parser = let hashLoadBackgroundDiagnostics, otherBackgroundDiagnostics = backgroundDiagnostics - |> List.partition (fun backgroundError -> + |> Array.partition (fun backgroundError -> hashLoadsInFile |> List.exists (fst >> sameFile (fileOfBackgroundError backgroundError))) @@ -1639,17 +1686,17 @@ module internal Parser = // Group errors and warnings by file name. let hashLoadBackgroundDiagnosticsGroupedByFileName = hashLoadBackgroundDiagnostics - |> List.map(fun err -> fileOfBackgroundError err,err) - |> List.groupByFirst // fileWithErrors, error list + |> Array.map(fun err -> fileOfBackgroundError err,err) + |> Array.groupBy fst // fileWithErrors, error list // Join the sets and report errors. // It is by-design that these messages are only present in the language service. A true build would report the errors at their // spots in the individual source files. for (fileOfHashLoad, rangesOfHashLoad) in hashLoadsInFile do - for errorGroupedByFileName in hashLoadBackgroundDiagnosticsGroupedByFileName do - if sameFile (fst errorGroupedByFileName) fileOfHashLoad then + for (file, errorGroupedByFileName) in hashLoadBackgroundDiagnosticsGroupedByFileName do + if sameFile file fileOfHashLoad then for rangeOfHashLoad in rangesOfHashLoad do // Handle the case of two #loads of the same file - let diagnostics = snd errorGroupedByFileName |> List.map(fun (pe,f)->pe.Exception,f) // Strip the build phase here. It will be replaced, in total, with TypeCheck + let diagnostics = errorGroupedByFileName |> Array.map(fun (_,(pe,f)) -> pe.Exception,f) // Strip the build phase here. It will be replaced, in total, with TypeCheck let errors = [ for (err,sev) in diagnostics do if sev = FSharpErrorSeverity.Error then yield err ] let warnings = [ for (err,sev) in diagnostics do if sev = FSharpErrorSeverity.Warning then yield err ] @@ -1676,7 +1723,7 @@ module internal Parser = let sink = TcResultsSinkImpl(tcGlobals, source = source) let! ct = Async.CancellationToken - let! tcEnvAtEndOpt = + let! resOpt = async { try let checkForErrors() = (parseResults.ParseHadErrors || errHandler.ErrorCount > 0) @@ -1698,35 +1745,33 @@ module internal Parser = cancellable.Return(res) )) - return result |> Option.map (fun ((tcEnvAtEnd, _, typedImplFiles), tcState) -> tcEnvAtEnd, typedImplFiles, tcState) - with - | e -> + return result |> Option.map (fun ((tcEnvAtEnd, _, implFiles, ccuSigsForFiles), tcState) -> tcEnvAtEnd, implFiles, ccuSigsForFiles, tcState) + with e -> errorR e - return Some(tcState.TcEnvFromSignatures, [], tcState) + return Some(tcState.TcEnvFromSignatures, [], [NewEmptyModuleOrNamespaceType Namespace], tcState) } let errors = errHandler.CollectedDiagnostics - match tcEnvAtEndOpt with - | Some (tcEnvAtEnd, typedImplFiles, tcState) -> + match resOpt with + | Some (tcEnvAtEnd, implFiles, ccuSigsForFiles, tcState) -> let scope = TypeCheckInfo(tcConfig, tcGlobals, - tcState.PartialAssemblySignature, - tcState.Ccu, - tcImports, - tcEnvAtEnd.AccessRights, - //typedImplFiles, - projectFileName, - mainInputFileName, - sink.GetResolutions(), - sink.GetSymbolUses(), - tcEnvAtEnd.NameEnv, - loadClosure, - reactorOps, - checkAlive, - textSnapshotInfo, - typedImplFiles, - sink.OpenDeclarations) + List.head ccuSigsForFiles, + tcState.Ccu, + tcImports, + tcEnvAtEnd.AccessRights, + projectFileName, + mainInputFileName, + sink.GetResolutions(), + sink.GetSymbolUses(), + tcEnvAtEnd.NameEnv, + loadClosure, + reactorOps, + checkAlive, + textSnapshotInfo, + List.tryHead implFiles, + sink.GetOpenDeclarations()) return errors, TypeCheckAborted.No scope | None -> return errors, TypeCheckAborted.Yes @@ -1738,6 +1783,7 @@ type UnresolvedReferencesSet = UnresolvedReferencesSet of UnresolvedAssemblyRefe type FSharpProjectOptions = { ProjectFileName: string + ProjectId: string option SourceFiles: string[] OtherOptions: string[] ReferencedProjects: (string * FSharpProjectOptions)[] @@ -1751,15 +1797,20 @@ type FSharpProjectOptions = } member x.ProjectOptions = x.OtherOptions /// Whether the two parse options refer to the same project. - static member UseSameProjectFileName(options1,options2) = - options1.ProjectFileName = options2.ProjectFileName + static member UseSameProject(options1,options2) = + match options1.ProjectId, options2.ProjectId with + | Some(projectId1), Some(projectId2) when not (String.IsNullOrWhiteSpace(projectId1)) && not (String.IsNullOrWhiteSpace(projectId2)) -> + projectId1 = projectId2 + | Some(_), Some(_) + | None, None -> options1.ProjectFileName = options2.ProjectFileName + | _ -> false /// Compare two options sets with respect to the parts of the options that are important to building. static member AreSameForChecking(options1,options2) = match options1.Stamp, options2.Stamp with | Some x, Some y -> (x = y) | _ -> - options1.ProjectFileName = options2.ProjectFileName && + FSharpProjectOptions.UseSameProject(options1, options2) && options1.SourceFiles = options2.SourceFiles && options1.OtherOptions = options2.OtherOptions && options1.UnresolvedReferences = options2.UnresolvedReferences && @@ -1786,11 +1837,17 @@ type FSharpProjectContext(thisCcu: CcuThunk, assemblies: FSharpAssembly list, ad [] // 'details' is an option because the creation of the tcGlobals etc. for the project may have failed. -type FSharpCheckProjectResults(projectFileName:string, keepAssemblyContents, errors: FSharpErrorInfo[], details:(TcGlobals*TcImports*CcuThunk*ModuleOrNamespaceType*TcSymbolUses list*TopAttribs option*CompileOps.IRawFSharpAssemblyData option * ILAssemblyRef * AccessorDomain * TypedImplFile list option * string[]) option, _reactorOps: IReactorOperations) = +type FSharpCheckProjectResults(projectFileName:string, tcConfigOption, keepAssemblyContents, errors: FSharpErrorInfo[], + details:(TcGlobals * TcImports * CcuThunk * ModuleOrNamespaceType * TcSymbolUses list * TopAttribs option * CompileOps.IRawFSharpAssemblyData option * ILAssemblyRef * AccessorDomain * TypedImplFile list option * string[]) option) = let getDetails() = match details with - | None -> invalidOp ("The project has no results due to critical errors in the project options. Check the HasCriticalErrors before accessing the detaild results. Errors: " + String.concat "\n" [ for e in errors -> e.Message ]) + | None -> invalidOp ("The project has no results due to critical errors in the project options. Check the HasCriticalErrors before accessing the detailed results. Errors: " + String.concat "\n" [ for e in errors -> e.Message ]) + | Some d -> d + + let getTcConfig() = + match tcConfigOption with + | None -> invalidOp ("The project has no results due to critical errors in the project options. Check the HasCriticalErrors before accessing the detailed results. Errors: " + String.concat "\n" [ for e in errors -> e.Message ]) | Some d -> d member info.Errors = errors @@ -1799,55 +1856,85 @@ type FSharpCheckProjectResults(projectFileName:string, keepAssemblyContents, err member info.AssemblySignature = let (tcGlobals, tcImports, thisCcu, ccuSig, _tcSymbolUses, topAttribs, _tcAssemblyData, _ilAssemRef, _ad, _tcAssemblyExpr, _dependencyFiles) = getDetails() - FSharpAssemblySignature(tcGlobals, thisCcu, tcImports, topAttribs, ccuSig) + FSharpAssemblySignature(tcGlobals, thisCcu, ccuSig, tcImports, topAttribs, ccuSig) - member info.AssemblyContents = + member info.TypedImplementionFiles = if not keepAssemblyContents then invalidOp "The 'keepAssemblyContents' flag must be set to true on the FSharpChecker in order to access the checked contents of assemblies" let (tcGlobals, tcImports, thisCcu, _ccuSig, _tcSymbolUses, _topAttribs, _tcAssemblyData, _ilAssemRef, _ad, tcAssemblyExpr, _dependencyFiles) = getDetails() let mimpls = match tcAssemblyExpr with | None -> [] | Some mimpls -> mimpls - FSharpAssemblyContents(tcGlobals, thisCcu, tcImports, mimpls) + tcGlobals, thisCcu, tcImports, mimpls + + member info.AssemblyContents = + if not keepAssemblyContents then invalidOp "The 'keepAssemblyContents' flag must be set to true on the FSharpChecker in order to access the checked contents of assemblies" + let (tcGlobals, tcImports, thisCcu, ccuSig, _tcSymbolUses, _topAttribs, _tcAssemblyData, _ilAssemRef, _ad, tcAssemblyExpr, _dependencyFiles) = getDetails() + let mimpls = + match tcAssemblyExpr with + | None -> [] + | Some mimpls -> mimpls + FSharpAssemblyContents(tcGlobals, thisCcu, Some ccuSig, tcImports, mimpls) + + member info.GetOptimizedAssemblyContents() = + if not keepAssemblyContents then invalidOp "The 'keepAssemblyContents' flag must be set to true on the FSharpChecker in order to access the checked contents of assemblies" + let (tcGlobals, tcImports, thisCcu, ccuSig, _tcSymbolUses, _topAttribs, _tcAssemblyData, _ilAssemRef, _ad, tcAssemblyExpr, _dependencyFiles) = getDetails() + let mimpls = + match tcAssemblyExpr with + | None -> [] + | Some mimpls -> mimpls + let outfile = "" // only used if tcConfig.writeTermsToFiles is true + let importMap = tcImports.GetImportMap() + let optEnv0 = GetInitialOptimizationEnv (tcImports, tcGlobals) + let tcConfig = getTcConfig() + let optimizedImpls, _optimizationData, _ = ApplyAllOptimizations (tcConfig, tcGlobals, (LightweightTcValForUsingInBuildMethodCall tcGlobals), outfile, importMap, false, optEnv0, thisCcu, mimpls) + let mimpls = + match optimizedImpls with + | TypedAssemblyAfterOptimization files -> + files |> List.map fst + + FSharpAssemblyContents(tcGlobals, thisCcu, Some ccuSig, tcImports, mimpls) // Not, this does not have to be a SyncOp, it can be called from any thread member info.GetUsesOfSymbol(symbol:FSharpSymbol) = let (tcGlobals, _tcImports, _thisCcu, _ccuSig, tcSymbolUses, _topAttribs, _tcAssemblyData, _ilAssemRef, _ad, _tcAssemblyExpr, _dependencyFiles) = getDetails() - [| for r in tcSymbolUses do yield! r.GetUsesOfSymbol(symbol.Item) |] - |> Seq.distinctBy (fun (itemOcc,_denv,m) -> itemOcc, m) - |> Seq.filter (fun (itemOcc,_,_) -> itemOcc <> ItemOccurence.RelatedText) - |> Seq.map (fun (itemOcc,denv,m) -> FSharpSymbolUse(tcGlobals, denv, symbol, itemOcc, m)) + tcSymbolUses + |> Seq.collect (fun r -> r.GetUsesOfSymbol symbol.Item) + |> Seq.distinctBy (fun symbolUse -> symbolUse.ItemOccurence, symbolUse.Range) + |> Seq.filter (fun symbolUse -> symbolUse.ItemOccurence <> ItemOccurence.RelatedText) + |> Seq.map (fun symbolUse -> FSharpSymbolUse(tcGlobals, symbolUse.DisplayEnv, symbol, symbolUse.ItemOccurence, symbolUse.Range)) |> Seq.toArray |> async.Return // Not, this does not have to be a SyncOp, it can be called from any thread - member info.GetAllUsesOfAllSymbols() = - let (tcGlobals, tcImports, thisCcu, _ccuSig, tcSymbolUses, _topAttribs, _tcAssemblyData, _ilAssemRef, _ad, _tcAssemblyExpr, _dependencyFiles) = getDetails() - - [| for r in tcSymbolUses do - for (item,itemOcc,denv,m) in r.GetAllUsesOfSymbols() do - if itemOcc <> ItemOccurence.RelatedText then - let symbol = FSharpSymbol.Create(tcGlobals, thisCcu, tcImports, item) - yield FSharpSymbolUse(tcGlobals, denv, symbol, itemOcc, m) |] + member __.GetAllUsesOfAllSymbols() = + let (tcGlobals, tcImports, thisCcu, ccuSig, tcSymbolUses, _topAttribs, _tcAssemblyData, _ilAssemRef, _ad, _tcAssemblyExpr, _dependencyFiles) = getDetails() + let cenv = SymbolEnv(tcGlobals, thisCcu, Some ccuSig, tcImports) + + [| for r in tcSymbolUses do + for symbolUse in r.AllUsesOfSymbols do + if symbolUse.ItemOccurence <> ItemOccurence.RelatedText then + let symbol = FSharpSymbol.Create(cenv, symbolUse.Item) + yield FSharpSymbolUse(tcGlobals, symbolUse.DisplayEnv, symbol, symbolUse.ItemOccurence, symbolUse.Range) |] |> async.Return - member info.ProjectContext = + member __.ProjectContext = let (tcGlobals, tcImports, thisCcu, _ccuSig, _tcSymbolUses, _topAttribs, _tcAssemblyData, _ilAssemRef, ad, _tcAssemblyExpr, _dependencyFiles) = getDetails() let assemblies = [ for x in tcImports.GetImportedAssemblies() do yield FSharpAssembly(tcGlobals, tcImports, x.FSharpViewOfMetadata) ] FSharpProjectContext(thisCcu, assemblies, ad) - member info.RawFSharpAssemblyData = + member __.RawFSharpAssemblyData = let (_tcGlobals, _tcImports, _thisCcu, _ccuSig, _tcSymbolUses, _topAttribs, tcAssemblyData, _ilAssemRef, _ad, _tcAssemblyExpr, _dependencyFiles) = getDetails() tcAssemblyData - member info.DependencyFiles = + member __.DependencyFiles = let (_tcGlobals, _tcImports, _thisCcu, _ccuSig, _tcSymbolUses, _topAttribs, _tcAssemblyData, _ilAssemRef, _ad, _tcAssemblyExpr, dependencyFiles) = getDetails() dependencyFiles - member info.AssemblyFullName = + member __.AssemblyFullName = let (_tcGlobals, _tcImports, _thisCcu, _ccuSig, _tcSymbolUses, _topAttribs, _tcAssemblyData, ilAssemRef, _ad, _tcAssemblyExpr, _dependencyFiles) = getDetails() ilAssemRef.QualifiedName @@ -1915,16 +2002,18 @@ type FSharpCheckFileResults(filename: string, errors: FSharpErrorInfo[], scopeOp member info.HasFullTypeCheckInfo = details.IsSome /// Intellisense autocompletions - member info.GetDeclarationListInfo(parseResultsOpt, line, lineStr, partialName, getAllEntities, ?hasTextChangedSinceLastTypecheck, ?userOpName: string) = + member info.GetDeclarationListInfo(parseResultsOpt, line, lineStr, partialName, ?getAllEntities, ?hasTextChangedSinceLastTypecheck, ?userOpName: string) = let userOpName = defaultArg userOpName "Unknown" + let getAllEntities = defaultArg getAllEntities (fun() -> []) let hasTextChangedSinceLastTypecheck = defaultArg hasTextChangedSinceLastTypecheck (fun _ -> false) reactorOp userOpName "GetDeclarations" FSharpDeclarationListInfo.Empty (fun ctok scope -> scope.GetDeclarations(ctok, parseResultsOpt, line, lineStr, partialName, getAllEntities, hasTextChangedSinceLastTypecheck)) - member info.GetDeclarationListSymbols(parseResultsOpt, line, lineStr, partialName, ?hasTextChangedSinceLastTypecheck, ?userOpName: string) = + member info.GetDeclarationListSymbols(parseResultsOpt, line, lineStr, partialName, ?getAllEntities, ?hasTextChangedSinceLastTypecheck, ?userOpName: string) = let userOpName = defaultArg userOpName "Unknown" let hasTextChangedSinceLastTypecheck = defaultArg hasTextChangedSinceLastTypecheck (fun _ -> false) - reactorOp userOpName "GetDeclarationListSymbols" List.empty (fun ctok scope -> scope.GetDeclarationListSymbols(ctok, parseResultsOpt, line, lineStr, partialName, hasTextChangedSinceLastTypecheck)) + let getAllEntities = defaultArg getAllEntities (fun() -> []) + reactorOp userOpName "GetDeclarationListSymbols" List.empty (fun ctok scope -> scope.GetDeclarationListSymbols(ctok, parseResultsOpt, line, lineStr, partialName, getAllEntities, hasTextChangedSinceLastTypecheck)) /// Resolve the names at the given location to give a data tip member info.GetStructuredToolTipText(line, colAtEndOfNames, lineStr, names, tokenTag, ?userOpName: string) = @@ -1938,6 +2027,7 @@ type FSharpCheckFileResults(filename: string, errors: FSharpErrorInfo[], scopeOp | _ -> async.Return dflt + member info.GetToolTipText(line, colAtEndOfNames, lineStr, names, tokenTag, userOpName) = info.GetStructuredToolTipText(line, colAtEndOfNames, lineStr, names, tokenTag, ?userOpName=userOpName) |> Tooltips.Map Tooltips.ToFSharpToolTipText @@ -1984,51 +2074,52 @@ type FSharpCheckFileResults(filename: string, errors: FSharpErrorInfo[], scopeOp member info.GetFormatSpecifierLocationsAndArity() = threadSafeOp - (fun () -> [| |]) - (fun scope -> - // This operation is not asynchronous - GetFormatSpecifierLocationsAndArity can be run on the calling thread - scope.GetFormatSpecifierLocationsAndArity()) + (fun () -> [| |]) + (fun scope -> + // This operation is not asynchronous - GetFormatSpecifierLocationsAndArity can be run on the calling thread + scope.GetFormatSpecifierLocationsAndArity()) - member info.GetSemanticClassification(range: range option) = + member __.GetSemanticClassification(range: range option) = threadSafeOp - (fun () -> [| |]) - (fun scope -> - // This operation is not asynchronous - GetSemanticClassification can be run on the calling thread - scope.GetSemanticClassification(range)) + (fun () -> [| |]) + (fun scope -> + // This operation is not asynchronous - GetSemanticClassification can be run on the calling thread + scope.GetSemanticClassification(range)) - member info.PartialAssemblySignature = + member __.PartialAssemblySignature = threadSafeOp (fun () -> failwith "not available") (fun scope -> - // This operation is not asynchronous - PartialAssemblySignature can be run on the calling thread - scope.PartialAssemblySignature()) + // This operation is not asynchronous - PartialAssemblySignature can be run on the calling thread + scope.PartialAssemblySignatureForFile) - member info.ProjectContext = + member __.ProjectContext = threadSafeOp (fun () -> failwith "not available") (fun scope -> - // This operation is not asynchronous - GetReferencedAssemblies can be run on the calling thread + // This operation is not asynchronous - GetReferencedAssemblies can be run on the calling thread FSharpProjectContext(scope.ThisCcu, scope.GetReferencedAssemblies(), scope.AccessRights)) - member info.DependencyFiles = dependencyFiles + member __.DependencyFiles = dependencyFiles member info.GetAllUsesOfAllSymbolsInFile() = threadSafeOp - (fun () -> [| |]) - (fun scope -> - [| for (item,itemOcc,denv,m) in scope.ScopeSymbolUses.GetAllUsesOfSymbols() do - if itemOcc <> ItemOccurence.RelatedText then - let symbol = FSharpSymbol.Create(scope.TcGlobals, scope.ThisCcu, scope.TcImports, item) - yield FSharpSymbolUse(scope.TcGlobals, denv, symbol, itemOcc, m) |]) + (fun () -> [| |]) + (fun scope -> + let cenv = scope.SymbolEnv + [| for symbolUse in scope.ScopeSymbolUses.AllUsesOfSymbols do + if symbolUse.ItemOccurence <> ItemOccurence.RelatedText then + let symbol = FSharpSymbol.Create(cenv, symbolUse.Item) + yield FSharpSymbolUse(scope.TcGlobals, symbolUse.DisplayEnv, symbol, symbolUse.ItemOccurence, symbolUse.Range) |]) |> async.Return member info.GetUsesOfSymbolInFile(symbol:FSharpSymbol) = threadSafeOp (fun () -> [| |]) (fun scope -> - [| for (itemOcc,denv,m) in scope.ScopeSymbolUses.GetUsesOfSymbol(symbol.Item) |> Seq.distinctBy (fun (itemOcc,_denv,m) -> itemOcc, m) do - if itemOcc <> ItemOccurence.RelatedText then - yield FSharpSymbolUse(scope.TcGlobals, denv, symbol, itemOcc, m) |]) + [| for symbolUse in scope.ScopeSymbolUses.GetUsesOfSymbol(symbol.Item) |> Seq.distinctBy (fun symbolUse -> symbolUse.ItemOccurence, symbolUse.Range) do + if symbolUse.ItemOccurence <> ItemOccurence.RelatedText then + yield FSharpSymbolUse(scope.TcGlobals, symbolUse.DisplayEnv, symbol, symbolUse.ItemOccurence, symbolUse.Range) |]) |> async.Return member info.GetVisibleNamespacesAndModulesAtPoint(pos: pos) = @@ -2049,25 +2140,27 @@ type FSharpCheckFileResults(filename: string, errors: FSharpErrorInfo[], scopeOp RequireCompilationThread ctok scope.IsRelativeNameResolvableFromSymbol(pos, plid, symbol)) - member info.ImplementationFiles = + member info.GetDisplayEnvForPos(pos: pos) : Async = + let userOpName = "CodeLens" + reactorOp userOpName "GetDisplayContextAtPos" None (fun ctok scope -> + DoesNotRequireCompilerThreadTokenAndCouldPossiblyBeMadeConcurrent ctok + let (nenv, _), _ = scope.GetBestDisplayEnvForPos pos + Some nenv.DisplayEnv) + + member info.ImplementationFile = if not keepAssemblyContents then invalidOp "The 'keepAssemblyContents' flag must be set to true on the FSharpChecker in order to access the checked contents of assemblies" scopeOptX |> Option.map (fun scope -> - let cenv = Impl.cenv(scope.TcGlobals, scope.ThisCcu, scope.TcImports) - [ for mimpl in scope.ImplementationFiles -> FSharpImplementationFileContents(cenv, mimpl)]) + let cenv = SymbolEnv(scope.TcGlobals, scope.ThisCcu, Some scope.CcuSigForFile, scope.TcImports) + scope.ImplementationFile |> Option.map (fun implFile -> FSharpImplementationFileContents(cenv, implFile))) + |> Option.defaultValue None member info.OpenDeclarations = scopeOptX |> Option.map (fun scope -> - let cenv = Impl.cenv(scope.TcGlobals, scope.ThisCcu, scope.TcImports) - scope.OpenDeclarations |> List.map (fun x -> - { LongId = x.LongId - Range = x.Range - Modules = x.Modules |> List.map (fun x -> FSharpEntity(cenv, x)) - AppliedScope = x.AppliedScope - IsOwnNamespace = x.IsOwnNamespace } - : FSharpOpenDeclaration )) - |> Option.defaultValue [] + let cenv = scope.SymbolEnv + scope.OpenDeclarations |> Array.map (fun x -> FSharpOpenDeclaration(x.LongId, x.Range, (x.Modules |> List.map (fun x -> FSharpEntity(cenv, x))), x.AppliedScope, x.IsOwnNamespace))) + |> Option.defaultValue [| |] override info.ToString() = "FSharpCheckFileResults(" + filename + ")" @@ -2101,7 +2194,7 @@ module Helpers = /// Determine whether two (fileName,options) keys should be identical w.r.t. resource usage let AreSubsumable2((fileName1:string,o1:FSharpProjectOptions),(fileName2:string,o2:FSharpProjectOptions)) = (fileName1 = fileName2) - && FSharpProjectOptions.UseSameProjectFileName(o1,o2) + && FSharpProjectOptions.UseSameProject(o1,o2) /// Determine whether two (fileName,sourceText,options) keys should be identical w.r.t. parsing let AreSameForParsing((fileName1: string, source1: string, options1), (fileName2, source2, options2)) = @@ -2119,7 +2212,7 @@ module Helpers = /// Determine whether two (fileName,sourceText,options) keys should be identical w.r.t. resource usage let AreSubsumable3((fileName1:string,_,o1:FSharpProjectOptions),(fileName2:string,_,o2:FSharpProjectOptions)) = (fileName1 = fileName2) - && FSharpProjectOptions.UseSameProjectFileName(o1,o2) + && FSharpProjectOptions.UseSameProject(o1,o2) module CompileHelpers = let mkCompilationErorHandlers() = @@ -2158,7 +2251,7 @@ module CompileHelpers = let errors, errorLogger, loggerProvider = mkCompilationErorHandlers() let result = tryCompile errorLogger (fun exiter -> - mainCompile (ctok, argv, legacyReferenceResolver, (*bannerAlreadyPrinted*)true, (*openBinariesInMemory*)true, (*defaultCopyFSharpCore*)false, exiter, loggerProvider, tcImportsCapture, dynamicAssemblyCreator) ) + mainCompile (ctok, argv, legacyReferenceResolver, (*bannerAlreadyPrinted*)true, ReduceMemoryFlag.Yes, CopyFSharpCoreFlag.No, exiter, loggerProvider, tcImportsCapture, dynamicAssemblyCreator) ) errors.ToArray(), result @@ -2171,7 +2264,7 @@ module CompileHelpers = let result = tryCompile errorLogger (fun exiter -> - compileOfAst (ctok, legacyReferenceResolver, (*openBinariesInMemory=*)true, assemblyName, target, outFile, pdbFile, dependencies, noframework, exiter, loggerProvider, asts, tcImportsCapture, dynamicAssemblyCreator)) + compileOfAst (ctok, legacyReferenceResolver, ReduceMemoryFlag.Yes, assemblyName, target, outFile, pdbFile, dependencies, noframework, exiter, loggerProvider, asts, tcImportsCapture, dynamicAssemblyCreator)) errors.ToArray(), result @@ -2217,7 +2310,7 @@ module CompileHelpers = // Register the reflected definitions for the dynamically generated assembly for resource in ilxMainModule.Resources.AsList do if IsReflectedDefinitionsResource resource then - Quotations.Expr.RegisterReflectedDefinitions(assemblyBuilder, moduleBuilder.Name, resource.Bytes) + Quotations.Expr.RegisterReflectedDefinitions(assemblyBuilder, moduleBuilder.Name, resource.GetBytes()) // Save the result assemblyBuilderRef := Some assemblyBuilder @@ -2242,7 +2335,7 @@ type ScriptClosureCacheToken() = interface LockToken // There is only one instance of this type, held in FSharpChecker -type BackgroundCompiler(legacyReferenceResolver, projectCacheSize, keepAssemblyContents, keepAllBackgroundResolutions) as self = +type BackgroundCompiler(legacyReferenceResolver, projectCacheSize, keepAssemblyContents, keepAllBackgroundResolutions, tryGetMetadataSnapshot) as self = // STATIC ROOT: FSharpLanguageServiceTestable.FSharpChecker.backgroundCompiler.reactor: The one and only Reactor let reactor = Reactor.Singleton let beforeFileChecked = Event() @@ -2262,7 +2355,7 @@ type BackgroundCompiler(legacyReferenceResolver, projectCacheSize, keepAssemblyC let scriptClosureCache = MruCache(projectCacheSize, areSame=FSharpProjectOptions.AreSameForChecking, - areSimilar=FSharpProjectOptions.UseSameProjectFileName) + areSimilar=FSharpProjectOptions.UseSameProject) let scriptClosureCacheLock = Lock() let frameworkTcImportsCache = FrameworkImportsCache(frameworkTcImportsCacheStrongSize) @@ -2298,7 +2391,8 @@ type BackgroundCompiler(legacyReferenceResolver, projectCacheSize, keepAssemblyC IncrementalBuilder.TryCreateBackgroundBuilderForProjectOptions (ctok, legacyReferenceResolver, defaultFSharpBinariesDir, frameworkTcImportsCache, loadClosure, Array.toList options.SourceFiles, Array.toList options.OtherOptions, projectReferences, options.ProjectDirectory, - options.UseScriptResolutionRules, keepAssemblyContents, keepAllBackgroundResolutions, maxTimeShareMilliseconds) + options.UseScriptResolutionRules, keepAssemblyContents, keepAllBackgroundResolutions, maxTimeShareMilliseconds, + tryGetMetadataSnapshot) // We're putting the builder in the cache, so increment its count. let decrement = IncrementalBuilder.KeepBuilderAlive builderOpt @@ -2331,10 +2425,10 @@ type BackgroundCompiler(legacyReferenceResolver, projectCacheSize, keepAssemblyC // /// Cache of builds keyed by options. let incrementalBuildersCache = - MruCache + MruCache (keepStrongly=projectCacheSize, keepMax=projectCacheSize, areSame = FSharpProjectOptions.AreSameForChecking, - areSimilar = FSharpProjectOptions.UseSameProjectFileName, + areSimilar = FSharpProjectOptions.UseSameProject, requiredToKeep=(fun (builderOpt,_,_) -> match builderOpt with None -> false | Some (b:IncrementalBuilder) -> b.IsBeingKeptAliveApartFromCacheEntry), onDiscard = (fun (_, _, decrement:IDisposable) -> decrement.Dispose())) @@ -2343,9 +2437,11 @@ type BackgroundCompiler(legacyReferenceResolver, projectCacheSize, keepAssemblyC RequireCompilationThread ctok match incrementalBuildersCache.TryGet (ctok, options) with | Some (builderOpt,creationErrors,_) -> + Logger.Log LogCompilerFunctionId.Service_IncrementalBuildersCache_BuildingNewCache let decrement = IncrementalBuilder.KeepBuilderAlive builderOpt return builderOpt,creationErrors, decrement | None -> + Logger.Log LogCompilerFunctionId.Service_IncrementalBuildersCache_GettingCache let! (builderOpt,creationErrors,_) as info = CreateOneIncrementalBuilder (ctok, options, userOpName) incrementalBuildersCache.Set (ctok, options, info) let decrement = IncrementalBuilder.KeepBuilderAlive builderOpt @@ -2390,7 +2486,7 @@ type BackgroundCompiler(legacyReferenceResolver, projectCacheSize, keepAssemblyC static let mutable foregroundTypeCheckCount = 0 let MakeCheckFileResultsEmpty(filename, creationErrors) = - FSharpCheckFileResults (filename, Array.ofList creationErrors, None, [| |], None, reactorOps, keepAssemblyContents) + FSharpCheckFileResults (filename, creationErrors, None, [| |], None, reactorOps, keepAssemblyContents) let MakeCheckFileResults(filename, options:FSharpProjectOptions, builder, scope, dependencyFiles, creationErrors, parseErrors, tcErrors) = let errors = @@ -2442,7 +2538,7 @@ type BackgroundCompiler(legacyReferenceResolver, projectCacheSize, keepAssemblyC let! builderOpt, creationErrors, decrement = getOrCreateBuilderAndKeepAlive (ctok, options, userOpName) use _unwind = decrement match builderOpt with - | None -> return FSharpParseFileResults(List.toArray creationErrors, None, true, [| |]) + | None -> return FSharpParseFileResults(creationErrors, None, true, [| |]) | Some builder -> let! parseTreeOpt,_,_,parseErrors = builder.GetParseResultsForFile (ctok, filename) let errors = [| yield! creationErrors; yield! ErrorHelpers.CreateErrorInfos (builder.TcConfig.errorSeverityOptions, false, filename, parseErrors) |] @@ -2484,11 +2580,11 @@ type BackgroundCompiler(legacyReferenceResolver, projectCacheSize, keepAssemblyC source: string, fileName: string, options: FSharpProjectOptions, - textSnapshotInfo : obj option, - fileVersion : int, - builder : IncrementalBuilder, - tcPrior : PartialCheckResults, - creationErrors : FSharpErrorInfo list, + textSnapshotInfo: obj option, + fileVersion: int, + builder: IncrementalBuilder, + tcPrior: PartialCheckResults, + creationErrors: FSharpErrorInfo[], userOpName: string) = async { @@ -2509,8 +2605,8 @@ type BackgroundCompiler(legacyReferenceResolver, projectCacheSize, keepAssemblyC let loadClosure = scriptClosureCacheLock.AcquireLock (fun ltok -> scriptClosureCache.TryGet (ltok, options)) let! tcErrors, tcFileResult = Parser.CheckOneFile(parseResults, source, fileName, options.ProjectFileName, tcPrior.TcConfig, tcPrior.TcGlobals, tcPrior.TcImports, - tcPrior.TcState, loadClosure, tcPrior.Errors, reactorOps, (fun () -> builder.IsAlive), textSnapshotInfo, userOpName) - let parsingOptions = FSharpParsingOptions.FromTcConfig(tcPrior.TcConfig, Array.ofList builder.SourceFiles) + tcPrior.TcState, loadClosure, tcPrior.TcErrors, reactorOps, (fun () -> builder.IsAlive), textSnapshotInfo, userOpName) + let parsingOptions = FSharpParsingOptions.FromTcConfig(tcPrior.TcConfig, Array.ofList builder.SourceFiles, options.UseScriptResolutionRules) let checkAnswer = MakeCheckFileAnswer(fileName, tcFileResult, options, builder, Array.ofList tcPrior.TcDependencyFiles, creationErrors, parseResults.Errors, tcErrors) bc.RecordTypeCheckFileInProjectResults(fileName, options, parsingOptions, parseResults, fileVersion, tcPrior.TimeStamp, Some checkAnswer, source) return checkAnswer @@ -2603,32 +2699,44 @@ type BackgroundCompiler(legacyReferenceResolver, projectCacheSize, keepAssemblyC let execWithReactorAsync action = reactor.EnqueueAndAwaitOpAsync(userOpName, "ParseAndCheckFileInProject", filename, action) async { try + let strGuid = "_ProjectId=" + (options.ProjectId |> Option.defaultValue "null") + Logger.LogBlockMessageStart (filename + strGuid) LogCompilerFunctionId.Service_ParseAndCheckFileInProject + if implicitlyStartBackgroundWork then + Logger.LogMessage (filename + strGuid + "-Cancelling background work") LogCompilerFunctionId.Service_ParseAndCheckFileInProject reactor.CancelBackgroundOp() // cancel the background work, since we will start new work after we're done + let! builderOpt,creationErrors,decrement = execWithReactorAsync (fun ctok -> getOrCreateBuilderAndKeepAlive (ctok, options, userOpName)) use _unwind = decrement match builderOpt with | None -> - let parseResults = FSharpParseFileResults(List.toArray creationErrors, None, true, [| |]) + Logger.LogBlockMessageStop (filename + strGuid + "-Failed_Aborted") LogCompilerFunctionId.Service_ParseAndCheckFileInProject + + let parseResults = FSharpParseFileResults(creationErrors, None, true, [| |]) return (parseResults, FSharpCheckFileAnswer.Aborted) | Some builder -> let cachedResults = bc.GetCachedCheckFileResult(builder, filename, source, options) match cachedResults with - | Some (parseResults, checkResults) -> return parseResults, FSharpCheckFileAnswer.Succeeded checkResults + | Some (parseResults, checkResults) -> + Logger.LogBlockMessageStop (filename + strGuid + "-Successful_Cached") LogCompilerFunctionId.Service_ParseAndCheckFileInProject + + return parseResults, FSharpCheckFileAnswer.Succeeded checkResults | _ -> - Trace.TraceInformation("FCS: {0}.{1} ({2})", userOpName, "ParseAndCheckFileInProject.CacheMiss", filename) // todo this blocks the Reactor queue until all files up to the current are type checked. It's OK while editing the file, // but results with non cooperative blocking when a firts file from a project opened. let! tcPrior = execWithReactorAsync <| fun ctok -> builder.GetCheckResultsBeforeFileInProject (ctok, filename) // Do the parsing. - let parsingOptions = FSharpParsingOptions.FromTcConfig(builder.TcConfig, Array.ofList (builder.SourceFiles)) + let parsingOptions = FSharpParsingOptions.FromTcConfig(builder.TcConfig, Array.ofList (builder.SourceFiles), options.UseScriptResolutionRules) let parseErrors, parseTreeOpt, anyErrors = Parser.parseFile (source, filename, parsingOptions, userOpName) let parseTreeOpt = parseTreeOpt |> Option.map builder.DeduplicateParsedInputModuleNameInProject let parseResults = FSharpParseFileResults(parseErrors, parseTreeOpt, anyErrors, builder.AllDependenciesDeprecated) let! checkResults = bc.CheckOneFileImpl(parseResults, source, filename, options, textSnapshotInfo, fileVersion, builder, tcPrior, creationErrors, userOpName) + + Logger.LogBlockMessageStop (filename + strGuid + "-Successful") LogCompilerFunctionId.Service_ParseAndCheckFileInProject + return parseResults, checkResults finally bc.ImplicitlyStartCheckProjectInBackground(options, userOpName) @@ -2642,7 +2750,7 @@ type BackgroundCompiler(legacyReferenceResolver, projectCacheSize, keepAssemblyC use _unwind = decrement match builderOpt with | None -> - let parseResults = FSharpParseFileResults(Array.ofList creationErrors, None, true, [| |]) + let parseResults = FSharpParseFileResults(creationErrors, None, true, [| |]) let typedResults = MakeCheckFileResultsEmpty(filename, creationErrors) return (parseResults, typedResults) | Some builder -> @@ -2650,18 +2758,20 @@ type BackgroundCompiler(legacyReferenceResolver, projectCacheSize, keepAssemblyC let! tcProj = builder.GetCheckResultsAfterFileInProject (ctok, filename) let errorOptions = builder.TcConfig.errorSeverityOptions let untypedErrors = [| yield! creationErrors; yield! ErrorHelpers.CreateErrorInfos (errorOptions, false, filename, untypedErrors) |] - let tcErrors = [| yield! creationErrors; yield! ErrorHelpers.CreateErrorInfos (errorOptions, false, filename, tcProj.Errors) |] + let tcErrors = [| yield! creationErrors; yield! ErrorHelpers.CreateErrorInfos (errorOptions, false, filename, tcProj.TcErrors) |] let parseResults = FSharpParseFileResults(errors = untypedErrors, input = parseTreeOpt, parseHadErrors = false, dependencyFiles = builder.AllDependenciesDeprecated) let loadClosure = scriptClosureCacheLock.AcquireLock (fun ltok -> scriptClosureCache.TryGet (ltok, options) ) let scope = - TypeCheckInfo(tcProj.TcConfig, tcProj.TcGlobals, tcProj.TcState.PartialAssemblySignature, tcProj.TcState.Ccu, tcProj.TcImports, tcProj.TcEnvAtEnd.AccessRights, + TypeCheckInfo(tcProj.TcConfig, tcProj.TcGlobals, + Option.get tcProj.LastestCcuSigForFile, + tcProj.TcState.Ccu, tcProj.TcImports, tcProj.TcEnvAtEnd.AccessRights, options.ProjectFileName, filename, - List.last tcProj.TcResolutions, - List.last tcProj.TcSymbolUses, + List.head tcProj.TcResolutionsRev, + List.head tcProj.TcSymbolUsesRev, tcProj.TcEnvAtEnd.NameEnv, loadClosure, reactorOps, (fun () -> builder.IsAlive), None, - tcProj.ImplementationFiles, - tcProj.TcOpenDeclarations) + tcProj.LatestImplementationFile, + List.head tcProj.TcOpenDeclarationsRev) let typedResults = MakeCheckFileResults(filename, options, builder, scope, Array.ofList tcProj.TcDependencyFiles, creationErrors, parseResults.Errors, tcErrors) return (parseResults, typedResults) }) @@ -2674,7 +2784,7 @@ type BackgroundCompiler(legacyReferenceResolver, projectCacheSize, keepAssemblyC parseCacheLock.AcquireLock (fun ltok -> match checkFileInProjectCache.TryGet(ltok,(filename,sourceText,options)) with | Some (a,b,c,_) -> Some (a,b,c) - | None -> None) + | None -> parseCacheLock.AcquireLock (fun ltok -> checkFileInProjectCachePossiblyStale.TryGet(ltok,(filename,options)))) | None -> parseCacheLock.AcquireLock (fun ltok -> checkFileInProjectCachePossiblyStale.TryGet(ltok,(filename,options))) /// Parse and typecheck the whole project (the implementation, called recursively as project graph is evaluated) @@ -2684,13 +2794,16 @@ type BackgroundCompiler(legacyReferenceResolver, projectCacheSize, keepAssemblyC use _unwind = decrement match builderOpt with | None -> - return FSharpCheckProjectResults (options.ProjectFileName, keepAssemblyContents, Array.ofList creationErrors, None, reactorOps) + return FSharpCheckProjectResults (options.ProjectFileName, None, keepAssemblyContents, creationErrors, None) | Some builder -> let! (tcProj, ilAssemRef, tcAssemblyDataOpt, tcAssemblyExprOpt) = builder.GetCheckResultsAndImplementationsForProject(ctok) let errorOptions = tcProj.TcConfig.errorSeverityOptions let fileName = TcGlobals.DummyFileNameForRangesWithoutASpecificLocation - let errors = [| yield! creationErrors; yield! ErrorHelpers.CreateErrorInfos (errorOptions, true, fileName, tcProj.Errors) |] - return FSharpCheckProjectResults (options.ProjectFileName, keepAssemblyContents, errors, Some(tcProj.TcGlobals, tcProj.TcImports, tcProj.TcState.Ccu, tcProj.TcState.PartialAssemblySignature, tcProj.TcSymbolUses, tcProj.TopAttribs, tcAssemblyDataOpt, ilAssemRef, tcProj.TcEnvAtEnd.AccessRights, tcAssemblyExprOpt, Array.ofList tcProj.TcDependencyFiles), reactorOps) + let errors = [| yield! creationErrors; yield! ErrorHelpers.CreateErrorInfos (errorOptions, true, fileName, tcProj.TcErrors) |] + return FSharpCheckProjectResults (options.ProjectFileName, Some tcProj.TcConfig, keepAssemblyContents, errors, + Some(tcProj.TcGlobals, tcProj.TcImports, tcProj.TcState.Ccu, tcProj.TcState.CcuSig, + tcProj.TcSymbolUses, tcProj.TopAttribs, tcAssemblyDataOpt, ilAssemRef, + tcProj.TcEnvAtEnd.AccessRights, tcAssemblyExprOpt, Array.ofList tcProj.TcDependencyFiles)) } /// Get the timestamp that would be on the output if fully built immediately @@ -2720,8 +2833,12 @@ type BackgroundCompiler(legacyReferenceResolver, projectCacheSize, keepAssemblyC reactor.EnqueueAndAwaitOpAsync (userOpName, "GetProjectOptionsFromScript", filename, fun ctok -> cancellable { use errors = new ErrorScope() + // Do we add a reference to FSharp.Compiler.Interactive.Settings by default? let useFsiAuxLib = defaultArg useFsiAuxLib true + + let reduceMemoryUsage = ReduceMemoryFlag.Yes + // Do we assume .NET Framework references for scripts? let assumeDotNetFramework = defaultArg assumeDotNetFramework true let otherFlags = defaultArg otherFlags [| |] @@ -2735,16 +2852,26 @@ type BackgroundCompiler(legacyReferenceResolver, projectCacheSize, keepAssemblyC let applyCompilerOptions tcConfigB = let fsiCompilerOptions = CompileOptions.GetCoreFsiCompilerOptions tcConfigB CompileOptions.ParseCompilerOptions (ignore, fsiCompilerOptions, Array.toList otherFlags) - let loadClosure = LoadClosure.ComputeClosureOfSourceText(ctok, legacyReferenceResolver, defaultFSharpBinariesDir, filename, source, CodeContext.Editing, useSimpleResolution, useFsiAuxLib, new Lexhelp.LexResourceManager(), applyCompilerOptions, assumeDotNetFramework) + + let loadClosure = + LoadClosure.ComputeClosureOfScriptText(ctok, legacyReferenceResolver, + defaultFSharpBinariesDir, filename, source, + CodeContext.Editing, useSimpleResolution, useFsiAuxLib, new Lexhelp.LexResourceManager(), + applyCompilerOptions, assumeDotNetFramework, + tryGetMetadataSnapshot=tryGetMetadataSnapshot, + reduceMemoryUsage=reduceMemoryUsage) + let otherFlags = [| yield "--noframework"; yield "--warn:3"; yield! otherFlags for r in loadClosure.References do yield "-r:" + fst r for (code,_) in loadClosure.NoWarns do yield "--nowarn:" + code |] + let options = { ProjectFileName = filename + ".fsproj" // Make a name that is unique in this directory. + ProjectId = None SourceFiles = loadClosure.SourceFiles |> List.map fst |> List.toArray OtherOptions = otherFlags ReferencedProjects= [| |] @@ -2858,9 +2985,9 @@ type BackgroundCompiler(legacyReferenceResolver, projectCacheSize, keepAssemblyC [] [] // There is typically only one instance of this type in a Visual Studio process. -type FSharpChecker(legacyReferenceResolver, projectCacheSize, keepAssemblyContents, keepAllBackgroundResolutions) = +type FSharpChecker(legacyReferenceResolver, projectCacheSize, keepAssemblyContents, keepAllBackgroundResolutions, tryGetMetadataSnapshot) = - let backgroundCompiler = BackgroundCompiler(legacyReferenceResolver, projectCacheSize, keepAssemblyContents, keepAllBackgroundResolutions) + let backgroundCompiler = BackgroundCompiler(legacyReferenceResolver, projectCacheSize, keepAssemblyContents, keepAllBackgroundResolutions, tryGetMetadataSnapshot) static let globalInstance = lazy FSharpChecker.Create() @@ -2876,7 +3003,7 @@ type FSharpChecker(legacyReferenceResolver, projectCacheSize, keepAssemblyConten let maxMemEvent = new Event() /// Instantiate an interactive checker. - static member Create(?projectCacheSize, ?keepAssemblyContents, ?keepAllBackgroundResolutions, ?legacyReferenceResolver) = + static member Create(?projectCacheSize, ?keepAssemblyContents, ?keepAllBackgroundResolutions, ?legacyReferenceResolver, ?tryGetMetadataSnapshot) = let legacyReferenceResolver = match legacyReferenceResolver with @@ -2886,7 +3013,8 @@ type FSharpChecker(legacyReferenceResolver, projectCacheSize, keepAssemblyConten let keepAssemblyContents = defaultArg keepAssemblyContents false let keepAllBackgroundResolutions = defaultArg keepAllBackgroundResolutions true let projectCacheSizeReal = defaultArg projectCacheSize projectCacheSizeDefault - new FSharpChecker(legacyReferenceResolver, projectCacheSizeReal,keepAssemblyContents, keepAllBackgroundResolutions) + let tryGetMetadataSnapshot = defaultArg tryGetMetadataSnapshot (fun _ -> None) + new FSharpChecker(legacyReferenceResolver, projectCacheSizeReal,keepAssemblyContents, keepAllBackgroundResolutions, tryGetMetadataSnapshot) member ic.ReferenceResolver = legacyReferenceResolver @@ -2904,7 +3032,7 @@ type FSharpChecker(legacyReferenceResolver, projectCacheSize, keepAssemblyConten member ic.GetParsingOptionsFromProjectOptions(options): FSharpParsingOptions * _ = let sourceFiles = List.ofArray options.SourceFiles let argv = List.ofArray options.OtherOptions - ic.GetParsingOptionsFromCommandLineArgs(sourceFiles, argv) + ic.GetParsingOptionsFromCommandLineArgs(sourceFiles, argv, options.UseScriptResolutionRules) member ic.MatchBraces(filename, source, options: FSharpProjectOptions, ?userOpName: string) = let userOpName = defaultArg userOpName "Unknown" @@ -3096,6 +3224,7 @@ type FSharpChecker(legacyReferenceResolver, projectCacheSize, keepAssemblyConten member ic.GetProjectOptionsFromCommandLineArgs(projectFileName, argv, ?loadedTimeStamp, ?extraProjectInfo: obj) = let loadedTimeStamp = defaultArg loadedTimeStamp DateTime.MaxValue // Not 'now', we don't want to force reloading { ProjectFileName = projectFileName + ProjectId = None SourceFiles = [| |] // the project file names will be inferred from the ProjectOptions OtherOptions = argv ReferencedProjects= [| |] @@ -3107,16 +3236,17 @@ type FSharpChecker(legacyReferenceResolver, projectCacheSize, keepAssemblyConten ExtraProjectInfo=extraProjectInfo Stamp = None } - member ic.GetParsingOptionsFromCommandLineArgs(initialSourceFiles, argv) = + member ic.GetParsingOptionsFromCommandLineArgs(initialSourceFiles, argv, ?isInteractive) = + let isInteractive = defaultArg isInteractive false use errorScope = new ErrorScope() let tcConfigBuilder = TcConfigBuilder.Initial // Apply command-line arguments and collect more source files if they are in the arguments let sourceFilesNew = ApplyCommandLineArgs(tcConfigBuilder, initialSourceFiles, argv) - FSharpParsingOptions.FromTcConfigBuidler(tcConfigBuilder, Array.ofList sourceFilesNew), errorScope.Diagnostics + FSharpParsingOptions.FromTcConfigBuidler(tcConfigBuilder, Array.ofList sourceFilesNew, isInteractive), errorScope.Diagnostics - member ic.GetParsingOptionsFromCommandLineArgs(argv) = - ic.GetParsingOptionsFromCommandLineArgs([], argv) + member ic.GetParsingOptionsFromCommandLineArgs(argv, ?isInteractive: bool) = + ic.GetParsingOptionsFromCommandLineArgs([], argv, ?isInteractive=isInteractive) /// Begin background parsing the given project. member ic.StartBackgroundCompile(options, ?userOpName) = @@ -3187,28 +3317,32 @@ type FsiInteractiveChecker(legacyReferenceResolver, reactorOps: IReactorOperatio let userOpName = defaultArg userOpName "Unknown" let filename = Path.Combine(tcConfig.implicitIncludeDir, "stdin.fsx") // Note: projectSourceFiles is only used to compute isLastCompiland, and is ignored if Build.IsScript(mainInputFileName) is true (which it is in this case). - let parsingOptions = FSharpParsingOptions.FromTcConfig(tcConfig, [| filename |]) + let parsingOptions = FSharpParsingOptions.FromTcConfig(tcConfig, [| filename |], true) let parseErrors, parseTreeOpt, anyErrors = Parser.parseFile (source, filename, parsingOptions, userOpName) let dependencyFiles = [| |] // interactions have no dependencies let parseResults = FSharpParseFileResults(parseErrors, parseTreeOpt, parseHadErrors = anyErrors, dependencyFiles = dependencyFiles) - let backgroundDiagnostics = [] - + let backgroundDiagnostics = [| |] + let reduceMemoryUsage = ReduceMemoryFlag.Yes let assumeDotNetFramework = true let applyCompilerOptions tcConfigB = let fsiCompilerOptions = CompileOptions.GetCoreFsiCompilerOptions tcConfigB CompileOptions.ParseCompilerOptions (ignore, fsiCompilerOptions, [ ]) - let loadClosure = LoadClosure.ComputeClosureOfSourceText(ctok, legacyReferenceResolver, defaultFSharpBinariesDir, filename, source, CodeContext.Editing, tcConfig.useSimpleResolution, tcConfig.useFsiAuxLib, new Lexhelp.LexResourceManager(), applyCompilerOptions, assumeDotNetFramework) + let loadClosure = LoadClosure.ComputeClosureOfScriptText(ctok, legacyReferenceResolver, defaultFSharpBinariesDir, filename, source, CodeContext.Editing, tcConfig.useSimpleResolution, tcConfig.useFsiAuxLib, new Lexhelp.LexResourceManager(), applyCompilerOptions, assumeDotNetFramework, tryGetMetadataSnapshot=(fun _ -> None), reduceMemoryUsage=reduceMemoryUsage) let! tcErrors, tcFileResult = Parser.CheckOneFile(parseResults, source, filename, "project", tcConfig, tcGlobals, tcImports, tcState, Some loadClosure, backgroundDiagnostics, reactorOps, (fun () -> true), None, userOpName) return match tcFileResult with - | Parser.TypeCheckAborted.No scope -> + | Parser.TypeCheckAborted.No tcFileInfo -> let errors = [| yield! parseErrors; yield! tcErrors |] - let typeCheckResults = FSharpCheckFileResults (filename, errors, Some scope, dependencyFiles, None, reactorOps, false) - let projectResults = FSharpCheckProjectResults (filename, keepAssemblyContents, errors, Some(tcGlobals, tcImports, scope.ThisCcu, scope.CcuSig, [scope.ScopeSymbolUses], None, None, mkSimpleAssRef "stdin", tcState.TcEnvFromImpls.AccessRights, None, dependencyFiles), reactorOps) + let typeCheckResults = FSharpCheckFileResults (filename, errors, Some tcFileInfo, dependencyFiles, None, reactorOps, false) + let projectResults = + FSharpCheckProjectResults (filename, Some tcConfig, keepAssemblyContents, errors, + Some(tcGlobals, tcImports, tcFileInfo.ThisCcu, tcFileInfo.CcuSigForFile, + [tcFileInfo.ScopeSymbolUses], None, None, mkSimpleAssRef "stdin", + tcState.TcEnvFromImpls.AccessRights, None, dependencyFiles)) parseResults, typeCheckResults, projectResults | _ -> failwith "unexpected aborted" @@ -3230,8 +3364,8 @@ module CompilerEnvironment = let DefaultReferencesForOrphanSources(assumeDotNetFramework) = DefaultReferencesForScriptsAndOutOfProjectSources(assumeDotNetFramework) /// Publish compiler-flags parsing logic. Must be fast because its used by the colorizer. - let GetCompilationDefinesForEditing(filename:string, parsingOptions: FSharpParsingOptions) = - SourceFileImpl.AdditionalDefinesForUseInEditor(filename) @ + let GetCompilationDefinesForEditing (parsingOptions: FSharpParsingOptions) = + SourceFileImpl.AdditionalDefinesForUseInEditor(parsingOptions.IsInteractive) @ parsingOptions.ConditionalCompilationDefines /// Return true if this is a subcategory of error or warning message that the language service can emit diff --git a/src/fsharp/vs/service.fsi b/src/fsharp/service/service.fsi similarity index 93% rename from src/fsharp/vs/service.fsi rename to src/fsharp/service/service.fsi index 1e7005bff08..5ccb31e4502 100755 --- a/src/fsharp/vs/service.fsi +++ b/src/fsharp/service/service.fsi @@ -10,7 +10,10 @@ open System open System.IO open System.Collections.Generic +open Microsoft.FSharp.Compiler.AbstractIL open Microsoft.FSharp.Compiler.AbstractIL.IL +open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library +open Microsoft.FSharp.Compiler.AbstractIL.ILBinaryReader open Microsoft.FSharp.Compiler open Microsoft.FSharp.Compiler.Ast open Microsoft.FSharp.Compiler.Driver @@ -19,23 +22,14 @@ open Microsoft.FSharp.Compiler.Range open Microsoft.FSharp.Compiler.TcGlobals open Microsoft.FSharp.Compiler.NameResolution open Microsoft.FSharp.Compiler.CompileOps -open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library -open Microsoft.FSharp.Compiler -open Microsoft.FSharp.Compiler.Range -open Microsoft.FSharp.Compiler.TcGlobals open Microsoft.FSharp.Compiler.Infos -open Microsoft.FSharp.Compiler.NameResolution open Microsoft.FSharp.Compiler.InfoReader open Microsoft.FSharp.Compiler.Tast open Microsoft.FSharp.Compiler.Tastops /// Represents the reason why the GetDeclarationLocation operation failed. [] -#if COMPILER_PUBLIC_API -type FSharpFindDeclFailureReason = -#else -type internal FSharpFindDeclFailureReason = -#endif +type public FSharpFindDeclFailureReason = /// Generic reason: no particular information about error apart from a message | Unknown of message: string @@ -51,11 +45,7 @@ type internal FSharpFindDeclFailureReason = /// Represents the result of the GetDeclarationLocation operation. [] -#if COMPILER_PUBLIC_API -type FSharpFindDeclResult = -#else -type internal FSharpFindDeclResult = -#endif +type public FSharpFindDeclResult = /// Indicates a declaration location was not found, with an additional reason | DeclNotFound of FSharpFindDeclFailureReason /// Indicates a declaration location was found @@ -65,11 +55,7 @@ type internal FSharpFindDeclResult = /// Represents the checking context implied by the ProjectOptions [] -#if COMPILER_PUBLIC_API -type FSharpProjectContext = -#else -type internal FSharpProjectContext = -#endif +type public FSharpProjectContext = /// Get the resolution and full contents of the assemblies referenced by the project options member GetReferencedAssemblies : unit -> FSharpAssembly list @@ -78,11 +64,7 @@ type internal FSharpProjectContext = [] -#if COMPILER_PUBLIC_API -type SemanticClassificationType = -#else -type internal SemanticClassificationType = -#endif +type public SemanticClassificationType = | ReferenceType | ValueType | UnionCase @@ -101,11 +83,7 @@ type internal SemanticClassificationType = /// A handle to the results of CheckFileInProject. [] -#if COMPILER_PUBLIC_API -type FSharpCheckFileResults = -#else -type internal FSharpCheckFileResults = -#endif +type public FSharpCheckFileResults = /// The errors returned by parsing a source file. member Errors : FSharpErrorInfo[] @@ -139,8 +117,8 @@ type internal FSharpCheckFileResults = /// The text of the line where the completion is happening. This is only used to make a couple /// of adhoc corrections to completion accuracy (e.g. checking for "..") /// - /// - /// Function that returns all symbols from current and referenced assemblies. + /// + /// Function that returns all entities from current and referenced assemblies. /// /// /// If text has been used from a captured name resolution from the typecheck, then @@ -148,7 +126,7 @@ type internal FSharpCheckFileResults = /// and assume that we're going to repeat the operation later on. /// /// An optional string used for tracing compiler operations associated with this request. - member GetDeclarationListInfo : ParsedFileResultsOpt:FSharpParseFileResults option * line: int * lineText:string * partialName: PartialLongName * getAllSymbols: (unit -> AssemblySymbol list) * ?hasTextChangedSinceLastTypecheck: (obj * range -> bool) * ?userOpName: string -> Async + member GetDeclarationListInfo : ParsedFileResultsOpt:FSharpParseFileResults option * line: int * lineText:string * partialName: PartialLongName * ?getAllEntities: (unit -> AssemblySymbol list) * ?hasTextChangedSinceLastTypecheck: (obj * range -> bool) * ?userOpName: string -> Async /// Get the items for a declaration list in FSharpSymbol format /// @@ -165,8 +143,8 @@ type internal FSharpCheckFileResults = /// The text of the line where the completion is happening. This is only used to make a couple /// of adhoc corrections to completion accuracy (e.g. checking for "..") /// - /// - /// Function that returns all symbols from current and referenced assemblies. + /// + /// Function that returns all entities from current and referenced assemblies. /// /// /// If text has been used from a captured name resolution from the typecheck, then @@ -174,7 +152,7 @@ type internal FSharpCheckFileResults = /// and assume that we're going to repeat the operation later on. /// /// An optional string used for tracing compiler operations associated with this request. - member GetDeclarationListSymbols : ParsedFileResultsOpt:FSharpParseFileResults option * line: int * lineText:string * partialName: PartialLongName * ?hasTextChangedSinceLastTypecheck: (obj * range -> bool) * ?userOpName: string -> Async + member GetDeclarationListSymbols : ParsedFileResultsOpt:FSharpParseFileResults option * line: int * lineText:string * partialName: PartialLongName * ?getAllEntities: (unit -> AssemblySymbol list) * ?hasTextChangedSinceLastTypecheck: (obj * range -> bool) * ?userOpName: string -> Async /// Compute a formatted tooltip for the given location @@ -262,6 +240,9 @@ type internal FSharpCheckFileResults = member internal GetVisibleNamespacesAndModulesAtPoint : pos -> Async + /// Find the most precise display environment for the given line and column. + member internal GetDisplayEnvForPos : pos : pos -> Async + /// Determines if a long ident is resolvable at a specific point. /// An optional string used for tracing compiler operations associated with this request. member internal IsRelativeNameResolvable: cursorPos : pos * plid : string list * item: Item * ?userOpName: string -> Async @@ -270,19 +251,15 @@ type internal FSharpCheckFileResults = /// An optional string used for tracing compiler operations associated with this request. member IsRelativeNameResolvableFromSymbol: cursorPos : pos * plid : string list * symbol: FSharpSymbol * ?userOpName: string -> Async - /// Represents complete typechecked implementation files, including thier typechecked signatures if any. - member ImplementationFiles: FSharpImplementationFileContents list option + /// Represents complete typechecked implementation file, including its typechecked signatures if any. + member ImplementationFile: FSharpImplementationFileContents option /// Open declarations in the file, including auto open modules. - member OpenDeclarations: FSharpOpenDeclaration list + member OpenDeclarations: FSharpOpenDeclaration[] /// A handle to the results of CheckFileInProject. [] -#if COMPILER_PUBLIC_API -type FSharpCheckProjectResults = -#else -type internal FSharpCheckProjectResults = -#endif +type public FSharpCheckProjectResults = /// The errors returned by processing the project member Errors: FSharpErrorInfo[] @@ -293,6 +270,9 @@ type internal FSharpCheckProjectResults = /// Get a view of the overall contents of the assembly. Only valid to use if HasCriticalErrors is false. member AssemblyContents: FSharpAssemblyContents + /// Get an optimized view of the overall contents of the assembly. Only valid to use if HasCriticalErrors is false. + member GetOptimizedAssemblyContents: unit -> FSharpAssemblyContents + /// Get the resolution of the ProjectOptions member ProjectContext: FSharpProjectContext @@ -311,22 +291,15 @@ type internal FSharpCheckProjectResults = member DependencyFiles: string[] /// Unused in this API -#if COMPILER_PUBLIC_API -type UnresolvedReferencesSet -#else -type internal UnresolvedReferencesSet -#endif +type public UnresolvedReferencesSet /// Options used to determine active --define conditionals and other options relevant to parsing files in a project -#if COMPILER_PUBLIC_API -type FSharpParsingOptions = -#else -type internal FSharpParsingOptions = -#endif +type public FSharpParsingOptions = { SourceFiles: string[] ConditionalCompilationDefines: string list ErrorSeverityOptions: FSharpErrorSeverityOptions + IsInteractive: bool LightSyntax: bool option CompilingFsLib: bool IsExe: bool @@ -334,15 +307,14 @@ type internal FSharpParsingOptions = static member Default: FSharpParsingOptions /// A set of information describing a project or script build configuration. -#if COMPILER_PUBLIC_API -type FSharpProjectOptions = -#else -type internal FSharpProjectOptions = -#endif +type public FSharpProjectOptions = { // Note that this may not reduce to just the project directory, because there may be two projects in the same directory. ProjectFileName: string + /// This is the unique identifier for the project, it is case sensitive. If it's None, will key off of ProjectFileName in our caching. + ProjectId: string option + /// The files in the project SourceFiles: string[] @@ -383,21 +355,13 @@ type internal FSharpProjectOptions = /// The result of calling TypeCheckResult including the possibility of abort and background compiler not caught up. [] -#if COMPILER_PUBLIC_API -type FSharpCheckFileAnswer = -#else -type internal FSharpCheckFileAnswer = -#endif +type public FSharpCheckFileAnswer = | Aborted // because cancellation caused an abandonment of the operation | Succeeded of FSharpCheckFileResults [] /// Used to parse and check F# source code. -#if COMPILER_PUBLIC_API -type FSharpChecker = -#else -type internal FSharpChecker = -#endif +type public FSharpChecker = /// /// Create an instance of an FSharpChecker. /// @@ -406,7 +370,8 @@ type internal FSharpChecker = /// Keep the checked contents of projects. /// If false, do not keep full intermediate checking results from background checking suitable for returning from GetBackgroundCheckResultsForFileInProject. This reduces memory usage. /// An optional resolver for non-file references, for legacy purposes - static member Create : ?projectCacheSize: int * ?keepAssemblyContents: bool * ?keepAllBackgroundResolutions: bool * ?legacyReferenceResolver: ReferenceResolver.Resolver -> FSharpChecker + /// An optional resolver to access the contents of .NET binaries in a memory-efficient way + static member Create : ?projectCacheSize: int * ?keepAssemblyContents: bool * ?keepAllBackgroundResolutions: bool * ?legacyReferenceResolver: ReferenceResolver.Resolver * ?tryGetMetadataSnapshot: ILReaderTryGetMetadataSnapshot -> FSharpChecker /// /// Parse a source code file, returning information about brace matching in the file. @@ -577,14 +542,14 @@ type internal FSharpChecker = /// /// Initial source files list. Additional files may be added during argv evaluation. /// The command line arguments for the project build. - member GetParsingOptionsFromCommandLineArgs: sourceFiles: string list * argv: string list -> FSharpParsingOptions * FSharpErrorInfo list + member GetParsingOptionsFromCommandLineArgs: sourceFiles: string list * argv: string list * ?isInteractive: bool -> FSharpParsingOptions * FSharpErrorInfo list /// /// Get the FSharpParsingOptions implied by a set of command line arguments. /// /// /// The command line arguments for the project build. - member GetParsingOptionsFromCommandLineArgs: argv: string list -> FSharpParsingOptions * FSharpErrorInfo list + member GetParsingOptionsFromCommandLineArgs: argv: string list * ?isInteractive: bool -> FSharpParsingOptions * FSharpErrorInfo list /// /// Get the FSharpParsingOptions implied by a FSharpProjectOptions. @@ -761,46 +726,31 @@ type internal FsiInteractiveChecker = member internal ParseAndCheckInteraction : CompilationThreadToken * source:string * ?userOpName: string -> Async /// Information about the compilation environment -#if COMPILER_PUBLIC_API -type [] CompilerEnvironment = -#else -type [] internal CompilerEnvironment = -#endif +[] +type public CompilerEnvironment = /// The default location of FSharp.Core.dll and fsc.exe based on the version of fsc.exe that is running static member BinFolderOfDefaultFSharpCompiler : ?probePoint: string -> string option /// Information about the compilation environment [] -#if COMPILER_PUBLIC_API -module CompilerEnvironment = -#else -module internal CompilerEnvironment = -#endif +module public CompilerEnvironment = /// These are the names of assemblies that should be referenced for .fs or .fsi files that /// are not associated with a project. - val DefaultReferencesForOrphanSources : assumeDotNetFramework: bool -> string list + val DefaultReferencesForOrphanSources: assumeDotNetFramework: bool -> string list /// Return the compilation defines that should be used when editing the given file. - val GetCompilationDefinesForEditing : filename : string * parsingOptions : FSharpParsingOptions -> string list + val GetCompilationDefinesForEditing: parsingOptions: FSharpParsingOptions -> string list /// Return true if this is a subcategory of error or warning message that the language service can emit - val IsCheckerSupportedSubcategory : string -> bool + val IsCheckerSupportedSubcategory: string -> bool /// Information about the debugging environment -#if COMPILER_PUBLIC_API -module DebuggerEnvironment = -#else -module internal DebuggerEnvironment = -#endif +module public DebuggerEnvironment = /// Return the language ID, which is the expression evaluator id that the /// debugger will use. val GetLanguageID : unit -> Guid /// A set of helpers related to naming of identifiers -#if COMPILER_PUBLIC_API -module PrettyNaming = -#else -module internal PrettyNaming = -#endif +module public PrettyNaming = val IsIdentifierPartCharacter : char -> bool val IsLongIdentifierPartCharacter : char -> bool diff --git a/src/fsharp/symbols/Exprs.fs b/src/fsharp/symbols/Exprs.fs index 76f3dad6d7c..f6213ef2ff6 100644 --- a/src/fsharp/symbols/Exprs.fs +++ b/src/fsharp/symbols/Exprs.fs @@ -9,11 +9,9 @@ open Microsoft.FSharp.Compiler.Lib open Microsoft.FSharp.Compiler.Infos open Microsoft.FSharp.Compiler.Range open Microsoft.FSharp.Compiler.Tast -open Microsoft.FSharp.Compiler.TcGlobals open Microsoft.FSharp.Compiler.Tastops open Microsoft.FSharp.Compiler.QuotationTranslator open Microsoft.FSharp.Compiler.TypeRelations -open Internal.Utilities [] module ExprTranslationImpl = @@ -185,7 +183,7 @@ module FSharpExprConvert = rfref.RecdField.IsCompilerGenerated && rfref.RecdField.IsStatic && rfref.RecdField.IsMutable && - rfref.RecdField.Name.StartsWith "init" + rfref.RecdField.Name.StartsWithOrdinal("init") // Match "if [AI_clt](init@41, 6) then IntrinsicFunctions.FailStaticInit () else ()" let (|StaticInitializationCheck|_|) e = @@ -199,23 +197,115 @@ module FSharpExprConvert = | Expr.Op(TOp.ValFieldSet rfref, _, _, _) when IsStaticInitializationField rfref -> Some () | _ -> None - let ConvType cenv typ = FSharpType(cenv, typ) - let ConvTypes cenv typs = List.map (ConvType cenv) typs - let ConvILTypeRefApp (cenv:Impl.cenv) m tref tyargs = + let (|ILUnaryOp|_|) e = + match e with + | AI_neg -> Some mkCallUnaryNegOperator + | AI_not -> Some mkCallUnaryNotOperator + | _ -> None + + let (|ILBinaryOp|_|) e = + match e with + | AI_add -> Some mkCallAdditionOperator + | AI_add_ovf + | AI_add_ovf_un -> Some mkCallAdditionChecked + | AI_sub -> Some mkCallSubtractionOperator + | AI_sub_ovf + | AI_sub_ovf_un -> Some mkCallSubtractionChecked + | AI_mul -> Some mkCallMultiplyOperator + | AI_mul_ovf + | AI_mul_ovf_un -> Some mkCallMultiplyChecked + | AI_div + | AI_div_un -> Some mkCallDivisionOperator + | AI_rem + | AI_rem_un -> Some mkCallModulusOperator + | AI_ceq -> Some mkCallEqualsOperator + | AI_clt + | AI_clt_un -> Some mkCallLessThanOperator + | AI_cgt + | AI_cgt_un -> Some mkCallGreaterThanOperator + | AI_and -> Some mkCallBitwiseAndOperator + | AI_or -> Some mkCallBitwiseOrOperator + | AI_xor -> Some mkCallBitwiseXorOperator + | AI_shl -> Some mkCallShiftLeftOperator + | AI_shr + | AI_shr_un -> Some mkCallShiftRightOperator + | _ -> None + + let (|ILConvertOp|_|) e = + match e with + | AI_conv basicTy -> + match basicTy with + | DT_R -> Some mkCallToDoubleOperator + | DT_I1 -> Some mkCallToSByteOperator + | DT_U1 -> Some mkCallToByteOperator + | DT_I2 -> Some mkCallToInt16Operator + | DT_U2 -> Some mkCallToUInt16Operator + | DT_I4 -> Some mkCallToInt32Operator + | DT_U4 -> Some mkCallToUInt32Operator + | DT_I8 -> Some mkCallToInt64Operator + | DT_U8 -> Some mkCallToUInt64Operator + | DT_R4 -> Some mkCallToSingleOperator + | DT_R8 -> Some mkCallToDoubleOperator + | DT_I -> Some mkCallToIntPtrOperator + | DT_U -> Some mkCallToUIntPtrOperator + | DT_REF -> None + | AI_conv_ovf basicTy + | AI_conv_ovf_un basicTy -> + match basicTy with + | DT_R -> Some mkCallToDoubleOperator + | DT_I1 -> Some mkCallToSByteChecked + | DT_U1 -> Some mkCallToByteChecked + | DT_I2 -> Some mkCallToInt16Checked + | DT_U2 -> Some mkCallToUInt16Checked + | DT_I4 -> Some mkCallToInt32Checked + | DT_U4 -> Some mkCallToUInt32Checked + | DT_I8 -> Some mkCallToInt64Checked + | DT_U8 -> Some mkCallToUInt64Checked + | DT_R4 -> Some mkCallToSingleOperator + | DT_R8 -> Some mkCallToDoubleOperator + | DT_I -> Some mkCallToIntPtrChecked + | DT_U -> Some mkCallToUIntPtrChecked + | DT_REF -> None + | _ -> None + + let (|TTypeConvOp|_|) (cenv:SymbolEnv) ty = + let g = cenv.g + match ty with + | TType_app (tcref,_) -> + match tcref with + | _ when tyconRefEq g tcref g.sbyte_tcr -> Some mkCallToSByteOperator + | _ when tyconRefEq g tcref g.byte_tcr -> Some mkCallToByteOperator + | _ when tyconRefEq g tcref g.int16_tcr -> Some mkCallToInt16Operator + | _ when tyconRefEq g tcref g.uint16_tcr -> Some mkCallToUInt16Operator + | _ when tyconRefEq g tcref g.int_tcr -> Some mkCallToIntOperator + | _ when tyconRefEq g tcref g.int32_tcr -> Some mkCallToInt32Operator + | _ when tyconRefEq g tcref g.uint32_tcr -> Some mkCallToUInt32Operator + | _ when tyconRefEq g tcref g.int64_tcr -> Some mkCallToInt64Operator + | _ when tyconRefEq g tcref g.uint64_tcr -> Some mkCallToUInt64Operator + | _ when tyconRefEq g tcref g.float32_tcr -> Some mkCallToSingleOperator + | _ when tyconRefEq g tcref g.float_tcr -> Some mkCallToDoubleOperator + | _ when tyconRefEq g tcref g.nativeint_tcr -> Some mkCallToIntPtrOperator + | _ when tyconRefEq g tcref g.unativeint_tcr -> Some mkCallToUIntPtrOperator + | _ -> None + | _ -> None + + let ConvType cenv ty = FSharpType(cenv, ty) + let ConvTypes cenv tys = List.map (ConvType cenv) tys + let ConvILTypeRefApp (cenv:SymbolEnv) m tref tyargs = let tcref = Import.ImportILTypeRef cenv.amap m tref ConvType cenv (mkAppTy tcref tyargs) let ConvUnionCaseRef cenv (ucref:UnionCaseRef) = FSharpUnionCase(cenv, ucref) let ConvRecdFieldRef cenv (rfref:RecdFieldRef) = FSharpField(cenv, rfref ) - let rec exprOfExprAddr (cenv:Impl.cenv) expr = + let rec exprOfExprAddr (cenv:SymbolEnv) expr = match expr with | Expr.Op(op, tyargs, args, m) -> match op, args, tyargs with - | TOp.LValueOp(LGetAddr, vref), _, _ -> exprForValRef m vref - | TOp.ValFieldGetAddr(rfref), [], _ -> mkStaticRecdFieldGet(rfref, tyargs, m) - | TOp.ValFieldGetAddr(rfref), [arg], _ -> mkRecdFieldGetViaExprAddr(exprOfExprAddr cenv arg, rfref, tyargs, m) - | TOp.UnionCaseFieldGetAddr(uref, n), [arg], _ -> mkUnionCaseFieldGetProvenViaExprAddr(exprOfExprAddr cenv arg, uref, tyargs, n, m) + | TOp.LValueOp(LAddrOf _, vref), _, _ -> exprForValRef m vref + | TOp.ValFieldGetAddr(rfref, _), [], _ -> mkStaticRecdFieldGet(rfref, tyargs, m) + | TOp.ValFieldGetAddr(rfref, _), [arg], _ -> mkRecdFieldGetViaExprAddr(exprOfExprAddr cenv arg, rfref, tyargs, m) + | TOp.UnionCaseFieldGetAddr(uref, n, _), [arg], _ -> mkUnionCaseFieldGetProvenViaExprAddr(exprOfExprAddr cenv arg, uref, tyargs, n, m) | TOp.ILAsm([ I_ldflda(fspec) ], rtys), [arg], _ -> mkAsmExpr([ mkNormalLdfld(fspec) ], tyargs, [exprOfExprAddr cenv arg], rtys, m) | TOp.ILAsm([ I_ldsflda(fspec) ], rtys), _, _ -> mkAsmExpr([ mkNormalLdsfld(fspec) ], tyargs, args, rtys, m) | TOp.ILAsm(([ I_ldelema(_ro, _isNativePtr, shape, _tyarg) ] ), _), (arr::idxs), [elemty] -> @@ -233,7 +323,7 @@ module FSharpExprConvert = let Mk2 cenv (orig:Expr) e = FSharpExpr(cenv, None, e, orig.Range, tyOfExpr cenv.g orig) - let rec ConvLValueExpr (cenv:Impl.cenv) env expr = ConvExpr cenv env (exprOfExprAddr cenv expr) + let rec ConvLValueExpr (cenv:SymbolEnv) env expr = ConvExpr cenv env (exprOfExprAddr cenv expr) and ConvExpr cenv env expr = Mk2 cenv expr (ConvExprPrim cenv env expr) @@ -301,7 +391,7 @@ module FSharpExprConvert = /// A nasty function copied from creflect.fs. Made nastier by taking a continuation to process the /// arguments to the call in a tail-recursive fashion. - and ConvModuleValueOrMemberUseLinear (cenv:Impl.cenv) env (expr:Expr, vref, vFlags, tyargs, curriedArgs) contf = + and ConvModuleValueOrMemberUseLinear (cenv:SymbolEnv) env (expr:Expr, vref, vFlags, tyargs, curriedArgs) contf = let m = expr.Range let (numEnclTypeArgs, _, isNewObj, _valUseFlags, _isSelfInit, takesInstanceArg, _isPropGet, _isPropSet) = @@ -332,7 +422,7 @@ module FSharpExprConvert = // Check to see if there aren't enough arguments or if there is a tuple-arity mismatch // If so, adjust and try again if curriedArgs.Length < curriedArgInfos.Length || - ((List.take curriedArgInfos.Length curriedArgs, curriedArgInfos) ||> List.exists2 (fun arg argInfo -> (argInfo.Length > (tryDestRefTupleExpr arg).Length))) then + ((List.truncate curriedArgInfos.Length curriedArgs, curriedArgInfos) ||> List.exists2 (fun arg argInfo -> (argInfo.Length > (tryDestRefTupleExpr arg).Length))) then // Too few arguments or incorrect tupling? Convert to a lambda and beta-reduce the // partially applied arguments to 'let' bindings @@ -347,7 +437,7 @@ module FSharpExprConvert = ConvExprPrimLinear cenv env splitCallExpr contf else - let curriedArgs, laterArgs = List.chop curriedArgInfos.Length curriedArgs + let curriedArgs, laterArgs = List.splitAt curriedArgInfos.Length curriedArgs // detuple the args let untupledCurriedArgs = @@ -372,7 +462,7 @@ module FSharpExprConvert = // tailcall ConvObjectModelCallLinear cenv env (false, v, [], tyargs, List.concat untupledCurriedArgs) contf2 - and ConvExprPrim (cenv:Impl.cenv) (env:ExprTranslationEnv) expr = + and ConvExprPrim (cenv:SymbolEnv) (env:ExprTranslationEnv) expr = // Eliminate integer 'for' loops let expr = DetectAndOptimizeForExpression cenv.g OptimizeIntRangesOnly expr @@ -433,7 +523,7 @@ module FSharpExprConvert = let env = env.BindTypars (Seq.zip tps gps |> Seq.toList) E.TypeLambda(gps, ConvExpr cenv env b) - | Expr.Obj (_, typ, _, _, [TObjExprMethod(TSlotSig(_, ctyp, _, _, _, _), _, tps, [tmvs], e, _) as tmethod], _, m) when isDelegateTy cenv.g typ -> + | Expr.Obj (_, ty, _, _, [TObjExprMethod(TSlotSig(_, ctyp, _, _, _, _), _, tps, [tmvs], e, _) as tmethod], _, m) when isDelegateTy cenv.g ty -> let f = mkLambdas m tps tmvs (e, GetFSharpViewOfReturnType cenv.g (returnTyOfMethod cenv.g tmethod)) let fR = ConvExpr cenv env f let tyargR = ConvType cenv ctyp @@ -445,7 +535,7 @@ module FSharpExprConvert = | Expr.TyChoose _ -> ConvExprPrim cenv env (ChooseTyparSolutionsForFreeChoiceTypars cenv.g cenv.amap expr) - | Expr.Obj (_lambdaId, typ, _basev, basecall, overrides, iimpls, _m) -> + | Expr.Obj (_lambdaId, ty, _basev, basecall, overrides, iimpls, _m) -> let basecallR = ConvExpr cenv env basecall let ConvertMethods methods = [ for (TObjExprMethod(slotsig, _, tps, tmvs, body, _)) in methods -> @@ -457,9 +547,9 @@ module FSharpExprConvert = let bodyR = ConvExpr cenv env body FSharpObjectExprOverride(sgn, tpsR, vslR, bodyR) ] let overridesR = ConvertMethods overrides - let iimplsR = List.map (fun (ty, impls) -> ConvType cenv ty, ConvertMethods impls) iimpls + let iimplsR = List.map (fun (ity, impls) -> ConvType cenv ity, ConvertMethods impls) iimpls - E.ObjectExpr(ConvType cenv typ, basecallR, overridesR, iimplsR) + E.ObjectExpr(ConvType cenv ty, basecallR, overridesR, iimplsR) | Expr.Op(op, tyargs, args, m) -> match op, tyargs, args with @@ -491,10 +581,10 @@ module FSharpExprConvert = let projR = FSharpField(cenv, ucref, n) E.UnionCaseSet(ConvExpr cenv env e1, typR, mkR, projR, ConvExpr cenv env e2) - | TOp.UnionCaseFieldGetAddr (_ucref, _n), _tyargs, _ -> + | TOp.UnionCaseFieldGetAddr _, _tyargs, _ -> E.AddressOf(ConvLValueExpr cenv env expr) - | TOp.ValFieldGetAddr(_rfref), _tyargs, _ -> + | TOp.ValFieldGetAddr _, _tyargs, _ -> E.AddressOf(ConvLValueExpr cenv env expr) | TOp.ValFieldGet(rfref), tyargs, [] -> @@ -513,30 +603,108 @@ module FSharpExprConvert = E.TupleGet(tyR, n, ConvExpr cenv env e) | TOp.ILAsm([ I_ldfld(_, _, fspec) ], _), enclTypeArgs, [obj] -> - let typR = ConvILTypeRefApp cenv m fspec.EnclosingTypeRef enclTypeArgs + let typR = ConvILTypeRefApp cenv m fspec.DeclaringTypeRef enclTypeArgs let objR = ConvLValueExpr cenv env obj E.ILFieldGet(Some objR, typR, fspec.Name) | TOp.ILAsm(( [ I_ldsfld (_, fspec) ] | [ I_ldsfld (_, fspec); AI_nop ]), _), enclTypeArgs, [] -> - let typR = ConvILTypeRefApp cenv m fspec.EnclosingTypeRef enclTypeArgs + let typR = ConvILTypeRefApp cenv m fspec.DeclaringTypeRef enclTypeArgs E.ILFieldGet(None, typR, fspec.Name) | TOp.ILAsm([ I_stfld(_, _, fspec) ], _), enclTypeArgs, [obj;arg] -> - let typR = ConvILTypeRefApp cenv m fspec.EnclosingTypeRef enclTypeArgs + let typR = ConvILTypeRefApp cenv m fspec.DeclaringTypeRef enclTypeArgs let objR = ConvLValueExpr cenv env obj let argR = ConvExpr cenv env arg E.ILFieldSet(Some objR, typR, fspec.Name, argR) | TOp.ILAsm([ I_stsfld(_, fspec) ], _), enclTypeArgs, [arg] -> - let typR = ConvILTypeRefApp cenv m fspec.EnclosingTypeRef enclTypeArgs + let typR = ConvILTypeRefApp cenv m fspec.DeclaringTypeRef enclTypeArgs let argR = ConvExpr cenv env arg E.ILFieldSet(None, typR, fspec.Name, argR) - - | TOp.ILAsm([ AI_ceq ], _), _, [arg1;arg2] -> + | TOp.ILAsm([ ], [tty]), _, [arg] -> + match tty with + | TTypeConvOp cenv convOp -> + let ty = tyOfExpr cenv.g arg + let op = convOp cenv.g m ty arg + ConvExprPrim cenv env op + | _ -> + ConvExprPrim cenv env arg + + | TOp.ILAsm([ I_box _ ], _), [ty], [arg] -> + let op = mkCallBox cenv.g m ty arg + ConvExprPrim cenv env op + + | TOp.ILAsm([ I_unbox_any _ ], _), [ty], [arg] -> + let op = mkCallUnbox cenv.g m ty arg + ConvExprPrim cenv env op + + | TOp.ILAsm([ I_isinst _ ], _), [ty], [arg] -> + let op = mkCallTypeTest cenv.g m ty arg + ConvExprPrim cenv env op + + | TOp.ILAsm ([ I_call (Normalcall, mspec, None) ], _), _, [arg] + when mspec.MethodRef.DeclaringTypeRef.Name = "System.String" && mspec.Name = "GetHashCode" -> + let ty = tyOfExpr cenv.g arg + let op = mkCallHash cenv.g m ty arg + ConvExprPrim cenv env op + + | TOp.ILCall(_, _, _, _, _, _, _, mref, _, _, _), [], + [Expr.Op(TOp.ILAsm([ I_ldtoken (ILToken.ILType _) ], _), [ty], _, _)] + when mref.DeclaringTypeRef.Name = "System.Type" && mref.Name = "GetTypeFromHandle" -> + let op = mkCallTypeOf cenv.g m ty + ConvExprPrim cenv env op + + | TOp.ILAsm([ EI_ilzero _ ], _), [ty], _ -> + E.DefaultValue (ConvType cenv ty) + + | TOp.ILAsm([ AI_ldnull; AI_cgt_un ], _), _, [arg] -> + let elemTy = tyOfExpr cenv.g arg + let nullVal = mkNull m elemTy + let op = mkCallNotEqualsOperator cenv.g m elemTy arg nullVal + ConvExprPrim cenv env op + + | TOp.ILAsm([ I_ldlen; AI_conv DT_I4 ], _), _, [arr] -> + let arrayTy = tyOfExpr cenv.g arr + let elemTy = destArrayTy cenv.g arrayTy + let op = mkCallArrayLength cenv.g m elemTy arr + ConvExprPrim cenv env op + + | TOp.ILAsm([ I_newarr (ILArrayShape [(Some 0, None)], _)], _), [elemTy], xa -> + E.NewArray(ConvType cenv elemTy, ConvExprs cenv env xa) + + | TOp.ILAsm([ I_ldelem_any (ILArrayShape [(Some 0, None)], _)], _), [elemTy], [arr; idx1] -> + let op = mkCallArrayGet cenv.g m elemTy arr idx1 + ConvExprPrim cenv env op + + | TOp.ILAsm([ I_stelem_any (ILArrayShape [(Some 0, None)], _)], _), [elemTy], [arr; idx1; v] -> + let op = mkCallArraySet cenv.g m elemTy arr idx1 v + ConvExprPrim cenv env op + + | TOp.ILAsm([ ILUnaryOp unaryOp ], _), _, [arg] -> + let ty = tyOfExpr cenv.g arg + let op = unaryOp cenv.g m ty arg + ConvExprPrim cenv env op + + | TOp.ILAsm([ ILBinaryOp binaryOp ], _), _, [arg1;arg2] -> let ty = tyOfExpr cenv.g arg1 - let eq = mkCallEqualsOperator cenv.g m ty arg1 arg2 - ConvExprPrim cenv env eq + let op = binaryOp cenv.g m ty arg1 arg2 + ConvExprPrim cenv env op + + | TOp.ILAsm([ ILConvertOp convertOp1; ILConvertOp convertOp2 ], _), _, [arg] -> + let ty1 = tyOfExpr cenv.g arg + let op1 = convertOp1 cenv.g m ty1 arg + let ty2 = tyOfExpr cenv.g op1 + let op2 = convertOp2 cenv.g m ty2 op1 + ConvExprPrim cenv env op2 + + | TOp.ILAsm([ ILConvertOp convertOp ], [TType_app (tcref,_)]), _, [arg] -> + let ty = tyOfExpr cenv.g arg + let op = + if tyconRefEq cenv.g tcref cenv.g.char_tcr + then mkCallToCharOperator cenv.g m ty arg + else convertOp cenv.g m ty arg + ConvExprPrim cenv env op | TOp.ILAsm([ I_throw ], _), _, [arg1] -> let raiseExpr = mkCallRaise cenv.g m (tyOfExpr cenv.g expr) arg1 @@ -587,7 +755,7 @@ module FSharpExprConvert = // rebuild reraise() and Convert mkReraiseLibCall cenv.g toTy m |> ConvExprPrim cenv env - | TOp.LValueOp(LGetAddr, vref), [], [] -> + | TOp.LValueOp(LAddrOf _, vref), [], [] -> E.AddressOf(ConvExpr cenv env (exprForValRef m vref)) | TOp.LValueOp(LByrefSet, vref), [], [e] -> @@ -605,17 +773,18 @@ module FSharpExprConvert = | TOp.While _, [], [Expr.Lambda(_, _, _, [_], test, _, _);Expr.Lambda(_, _, _, [_], body, _, _)] -> E.WhileLoop(ConvExpr cenv env test, ConvExpr cenv env body) - | TOp.For(_, (FSharpForLoopUp |FSharpForLoopDown as dir) ), [], [Expr.Lambda(_, _, _, [_], lim0, _, _); Expr.Lambda(_, _, _, [_], SimpleArrayLoopUpperBound, lm, _); SimpleArrayLoopBody cenv.g (arr, elemTy, body)] -> + | TOp.For(_, dir), [], [Expr.Lambda(_, _, _, [_], lim0, _, _); Expr.Lambda(_, _, _, [_], SimpleArrayLoopUpperBound, lm, _); SimpleArrayLoopBody cenv.g (arr, elemTy, body)] -> let lim1 = let len = mkCallArrayLength cenv.g lm elemTy arr // Array.length arr - mkCallSubtractionOperator cenv.g lm cenv.g.int32_ty len (Expr.Const(Const.Int32 1, m, cenv.g.int32_ty)) // len - 1 - E.FastIntegerForLoop(ConvExpr cenv env lim0, ConvExpr cenv env lim1, ConvExpr cenv env body, (dir = FSharpForLoopUp)) + mkCallSubtractionOperator cenv.g lm cenv.g.int32_ty len (mkOne cenv.g lm) // len - 1 + E.FastIntegerForLoop(ConvExpr cenv env lim0, ConvExpr cenv env lim1, ConvExpr cenv env body, dir <> FSharpForLoopDown) - | TOp.For(_, dir), [], [Expr.Lambda(_, _, _, [_], lim0, _, _);Expr.Lambda(_, _, _, [_], lim1, _, _);body] -> - match dir with - | FSharpForLoopUp -> E.FastIntegerForLoop(ConvExpr cenv env lim0, ConvExpr cenv env lim1, ConvExpr cenv env body, true) - | FSharpForLoopDown -> E.FastIntegerForLoop(ConvExpr cenv env lim0, ConvExpr cenv env lim1, ConvExpr cenv env body, false) - | _ -> failwith "unexpected for-loop form" + | TOp.For(_, dir), [], [Expr.Lambda(_, _, _, [_], lim0, _, _); Expr.Lambda(_, _, _, [_], lim1, lm, _); body] -> + let lim1 = + if dir = CSharpForLoopUp then + mkCallSubtractionOperator cenv.g lm cenv.g.int32_ty lim1 (mkOne cenv.g lm) // len - 1 + else lim1 + E.FastIntegerForLoop(ConvExpr cenv env lim0, ConvExpr cenv env lim1, ConvExpr cenv env body, dir <> FSharpForLoopDown) | TOp.ILCall(_, _, _, isNewObj, valUseFlags, _isProp, _, ilMethRef, enclTypeArgs, methTypeArgs, _tys), [], callArgs -> ConvILCall cenv env (isNewObj, valUseFlags, ilMethRef, enclTypeArgs, methTypeArgs, callArgs, m) @@ -646,8 +815,8 @@ module FSharpExprConvert = let argsR = ConvExprs cenv env args E.TraitCall(tysR, nm, memFlags, argtysR, tyargsR, argsR) - | TOp.RefAddrGet, [ty], [e] -> - let replExpr = mkRecdFieldGetAddrViaExprAddr(e, mkRefCellContentsRef cenv.g, [ty], m) + | TOp.RefAddrGet readonly, [ty], [e] -> + let replExpr = mkRecdFieldGetAddrViaExprAddr(readonly, e, mkRefCellContentsRef cenv.g, [ty], m) ConvExprPrim cenv env replExpr | _ -> wfail (sprintf "unhandled construct in AST", m) @@ -685,20 +854,20 @@ module FSharpExprConvert = let envinner = env.BindVal v Some(vR, rhsR), envinner - and ConvILCall (cenv:Impl.cenv) env (isNewObj, valUseFlags, ilMethRef, enclTypeArgs, methTypeArgs, callArgs, m) = + and ConvILCall (cenv:SymbolEnv) env (isNewObj, valUseFlags, ilMethRef, enclTypeArgs, methTypeArgs, callArgs, m) = let isNewObj = (isNewObj || (match valUseFlags with CtorValUsedAsSuperInit | CtorValUsedAsSelfInit -> true | _ -> false)) let methName = ilMethRef.Name - let isPropGet = methName.StartsWith("get_", System.StringComparison.Ordinal) - let isPropSet = methName.StartsWith("set_", System.StringComparison.Ordinal) + let isPropGet = methName.StartsWithOrdinal("get_") + let isPropSet = methName.StartsWithOrdinal("set_") let isProp = isPropGet || isPropSet let tcref, subClass = // this does not matter currently, type checking fails to resolve it when a TP references a union case subclass try // if the type is an union case class, lookup will fail - Import.ImportILTypeRef cenv.amap m ilMethRef.EnclosingTypeRef, None + Import.ImportILTypeRef cenv.amap m ilMethRef.DeclaringTypeRef, None with _ -> - let e = ilMethRef.EnclosingTypeRef + let e = ilMethRef.DeclaringTypeRef let parent = ILTypeRef.Create(e.Scope, e.Enclosing.Tail, e.Enclosing.Head) Import.ImportILTypeRef cenv.amap m parent, Some e.Name @@ -738,7 +907,7 @@ module FSharpExprConvert = enclosingEntity.ModuleOrNamespaceType.AllValsAndMembers |> Seq.filter (fun v -> v.CompiledName = vName && - match v.ActualParent with + match v.DeclaringEntity with | Parent p -> p.PublicPath = enclosingEntity.PublicPath | _ -> false ) |> List.ofSeq @@ -747,8 +916,8 @@ module FSharpExprConvert = let vr = VRefLocal v makeFSCall isMember vr | [] -> - let isPropGet = vName.StartsWith("get_", System.StringComparison.Ordinal) - let isPropSet = vName.StartsWith("set_", System.StringComparison.Ordinal) + let isPropGet = vName.StartsWithOrdinal("get_") + let isPropSet = vName.StartsWithOrdinal("set_") if isPropGet || isPropSet then let name = PrettyNaming.ChopPropertyName vName let findByName = @@ -787,12 +956,12 @@ module FSharpExprConvert = if vName = "GetTag" || vName = "get_Tag" then let objR = ConvExpr cenv env callArgs.Head E.UnionCaseTag(objR, typR) - elif vName.StartsWith("New") then + elif vName.StartsWithOrdinal("New") then let name = vName.Substring(3) let mkR = ConvUnionCaseRef cenv (UCRef(tcref, name)) let argsR = ConvExprs cenv env callArgs E.NewUnionCase(typR, mkR, argsR) - elif vName.StartsWith("Is") then + elif vName.StartsWithOrdinal("Is") then let name = vName.Substring(2) let mkR = ConvUnionCaseRef cenv (UCRef(tcref, name)) let objR = ConvExpr cenv env callArgs.Head @@ -845,7 +1014,7 @@ module FSharpExprConvert = let logicalName = ilMethRef.Name let isMember = memberParentName.IsSome if isMember then - match ilMethRef.Name, ilMethRef.EnclosingTypeRef.Name with + match ilMethRef.Name, ilMethRef.DeclaringTypeRef.Name with | "Invoke", "Microsoft.FSharp.Core.FSharpFunc`2" -> let objR = ConvLValueExpr cenv env callArgs.Head let argR = ConvExpr cenv env callArgs.Tail.Head @@ -854,7 +1023,7 @@ module FSharpExprConvert = | _ -> let isCtor = (ilMethRef.Name = ".ctor") let isStatic = isCtor || ilMethRef.CallingConv.IsStatic - let scoref = ilMethRef.EnclosingTypeRef.Scope + let scoref = ilMethRef.DeclaringTypeRef.Scope let typars1 = tcref.Typars(m) let typars2 = [ 1 .. ilMethRef.GenericArity ] |> List.map (fun _ -> NewRigidTypar "T" m) let tinst1 = typars1 |> generalizeTypars @@ -871,7 +1040,7 @@ module FSharpExprConvert = let linkageType = let ty = mkIteratedFunTy (List.map (mkRefTupledTy cenv.g) argtys) rty let ty = if isStatic then ty else mkFunTy enclosingType ty - tryMkForallTy (typars1 @ typars2) ty + mkForallTyIfNeeded (typars1 @ typars2) ty let argCount = List.sum (List.map List.length argtys) + (if isStatic then 0 else 1) let key = ValLinkageFullKey({ MemberParentMangledName=memberParentName; MemberIsOverride=false; LogicalName=logicalName; TotalArgCount= argCount }, Some linkageType) @@ -1041,9 +1210,9 @@ module FSharpExprConvert = /// The contents of the F# assembly as provided through the compiler API -type FSharpAssemblyContents(cenv: Impl.cenv, mimpls: TypedImplFile list) = +type FSharpAssemblyContents(cenv: SymbolEnv, mimpls: TypedImplFile list) = - new (g, thisCcu, tcImports, mimpls) = FSharpAssemblyContents(Impl.cenv(g, thisCcu, tcImports), mimpls) + new (g, thisCcu, thisCcuType, tcImports, mimpls) = FSharpAssemblyContents(SymbolEnv(g, thisCcu, thisCcuType, tcImports), mimpls) member __.ImplementationFiles = [ for mimpl in mimpls -> FSharpImplementationFileContents(cenv, mimpl)] @@ -1054,7 +1223,7 @@ and FSharpImplementationFileDeclaration = | InitAction of FSharpExpr and FSharpImplementationFileContents(cenv, mimpl) = - let (TImplFile(qname, _pragmas, ModuleOrNamespaceExprWithSig(_mty, mdef, _), hasExplicitEntryPoint, isScript)) = mimpl + let (TImplFile(qname, _pragmas, ModuleOrNamespaceExprWithSig(_, mdef, _), hasExplicitEntryPoint, isScript)) = mimpl let rec getDecls2 (ModuleOrNamespaceExprWithSig(_mty, def, _m)) = getDecls def and getBind (bind: Binding) = let v = bind.Var diff --git a/src/fsharp/symbols/Exprs.fsi b/src/fsharp/symbols/Exprs.fsi index 7aa34ed00d5..c9049b33c1a 100644 --- a/src/fsharp/symbols/Exprs.fsi +++ b/src/fsharp/symbols/Exprs.fsi @@ -2,7 +2,6 @@ namespace Microsoft.FSharp.Compiler.SourceCodeServices -open System.Collections.Generic open Microsoft.FSharp.Compiler open Microsoft.FSharp.Compiler.TcGlobals open Microsoft.FSharp.Compiler.Tast @@ -11,24 +10,16 @@ open Microsoft.FSharp.Compiler.CompileOps /// Represents the definitional contents of an assembly, as seen by the F# language -#if COMPILER_PUBLIC_API type public FSharpAssemblyContents = -#else -type internal FSharpAssemblyContents = -#endif - internal new : tcGlobals: TcGlobals * thisCcu: CcuThunk * tcImports: TcImports * mimpls: TypedImplFile list -> FSharpAssemblyContents + internal new : tcGlobals: TcGlobals * thisCcu: CcuThunk * thisCcuType: ModuleOrNamespaceType option * tcImports: TcImports * mimpls: TypedImplFile list -> FSharpAssemblyContents /// The contents of the implementation files in the assembly member ImplementationFiles: FSharpImplementationFileContents list /// Represents the definitional contents of a single file or fragment in an assembly, as seen by the F# language -#if COMPILER_PUBLIC_API -and [] FSharpImplementationFileContents = -#else -and [] internal FSharpImplementationFileContents = -#endif - internal new : cenv: Impl.cenv * mimpl: TypedImplFile -> FSharpImplementationFileContents +and [] public FSharpImplementationFileContents = + internal new : cenv: SymbolEnv * mimpl: TypedImplFile -> FSharpImplementationFileContents /// The qualified name acts to fully-qualify module specifications and implementations member QualifiedName: string @@ -46,16 +37,15 @@ and [] internal FSharpImplementationFileContents = member HasExplicitEntryPoint: bool /// Represents a declaration in an implementation file, as seen by the F# language -#if COMPILER_PUBLIC_API -and FSharpImplementationFileDeclaration = -#else -and internal FSharpImplementationFileDeclaration = -#endif -/// Represents the declaration of a type +and public FSharpImplementationFileDeclaration = + + /// Represents the declaration of a type | Entity of FSharpEntity * FSharpImplementationFileDeclaration list + /// Represents the declaration of a member, function or value, including the parameters and body of the member | MemberOrFunctionOrValue of FSharpMemberOrFunctionOrValue * FSharpMemberOrFunctionOrValue list list * FSharpExpr /// Represents the declaration of a static initialization action + | InitAction of FSharpExpr /// Represents a checked and reduced expression, as seen by the F# language. The active patterns @@ -63,11 +53,7 @@ and internal FSharpImplementationFileDeclaration = /// /// Pattern matching is reduced to decision trees and conditional tests. Some other /// constructs may be represented in reduced form. -#if COMPILER_PUBLIC_API -and [] FSharpExpr = -#else -and [] internal FSharpExpr = -#endif +and [] public FSharpExpr = /// The range of the expression member Range : range @@ -78,11 +64,7 @@ and [] internal FSharpExpr = member ImmediateSubExpressions : FSharpExpr list /// Represents a checked method in an object expression, as seen by the F# language. -#if COMPILER_PUBLIC_API -and [] FSharpObjectExprOverride = -#else -and [] internal FSharpObjectExprOverride = -#endif +and [] public FSharpObjectExprOverride = /// The signature of the implemented abstract slot member Signature : FSharpAbstractSignature @@ -96,11 +78,7 @@ and [] internal FSharpObjectExprOverride = member Body : FSharpExpr /// A collection of active patterns to analyze expressions -#if COMPILER_PUBLIC_API -module BasicPatterns = -#else -module internal BasicPatterns = -#endif +module public BasicPatterns = /// Matches expressions which are uses of values val (|Value|_|) : FSharpExpr -> FSharpMemberOrFunctionOrValue option diff --git a/src/fsharp/symbols/SymbolHelpers.fs b/src/fsharp/symbols/SymbolHelpers.fs index e95870cb976..aa3ecc7cab5 100644 --- a/src/fsharp/symbols/SymbolHelpers.fs +++ b/src/fsharp/symbols/SymbolHelpers.fs @@ -13,7 +13,6 @@ open System.IO open Microsoft.FSharp.Core.Printf open Microsoft.FSharp.Compiler -open Microsoft.FSharp.Compiler.AbstractIL.IL open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library open Microsoft.FSharp.Compiler.AbstractIL.Diagnostics @@ -31,7 +30,6 @@ open Microsoft.FSharp.Compiler.TcGlobals open Microsoft.FSharp.Compiler.Infos open Microsoft.FSharp.Compiler.NameResolution open Microsoft.FSharp.Compiler.InfoReader -open Microsoft.FSharp.Compiler.ErrorLogger open Microsoft.FSharp.Compiler.CompileOps module EnvMisc2 = @@ -152,15 +150,14 @@ type internal CompilationErrorLogger (debugName: string, options: FSharpErrorSev override x.DiagnosticSink(exn, isError) = if isError || ReportWarningAsError options exn then - diagnostics.Add(exn, isError) + diagnostics.Add(exn, FSharpErrorSeverity.Error) errorCount <- errorCount + 1 else if ReportWarning options exn then - diagnostics.Add(exn, isError) + diagnostics.Add(exn, FSharpErrorSeverity.Warning) override x.ErrorCount = errorCount - member x.GetErrors() = - [ for (e, isError) in diagnostics -> e, (if isError then FSharpErrorSeverity.Error else FSharpErrorSeverity.Warning) ] + member x.GetErrors() = diagnostics.ToArray() /// This represents the global state established as each task function runs as part of the build. @@ -201,11 +198,7 @@ module ErrorHelpers = //---------------------------------------------------------------------------- // Object model for tooltips and helpers for their generation from items -#if COMPILER_PUBLIC_API -type Layout = Internal.Utilities.StructuredFormat.Layout -#else -type internal Layout = Internal.Utilities.StructuredFormat.Layout -#endif +type public Layout = Internal.Utilities.StructuredFormat.Layout /// Describe a comment as either a block of text or a file+signature reference into an intellidoc file. [] @@ -241,32 +234,19 @@ type FSharpToolTipElement<'T> = Group [ FSharpToolTipElementData<'T>.Create(layout, xml, ?typeMapping=typeMapping, ?paramName=paramName, ?remarks=remarks) ] /// A single data tip display element with where text is expressed as string -#if COMPILER_PUBLIC_API -type FSharpToolTipElement = FSharpToolTipElement -#else -type internal FSharpToolTipElement = FSharpToolTipElement -#endif +type public FSharpToolTipElement = FSharpToolTipElement /// A single data tip display element with where text is expressed as -#if COMPILER_PUBLIC_API -type FSharpStructuredToolTipElement = FSharpToolTipElement -#else -type internal FSharpStructuredToolTipElement = FSharpToolTipElement -#endif +type public FSharpStructuredToolTipElement = FSharpToolTipElement /// Information for building a data tip box. type FSharpToolTipText<'T> = /// A list of data tip elements to display. | FSharpToolTipText of FSharpToolTipElement<'T> list -#if COMPILER_PUBLIC_API -type FSharpToolTipText = FSharpToolTipText -type FSharpStructuredToolTipText = FSharpToolTipText -#else -type internal FSharpToolTipText = FSharpToolTipText -type internal FSharpStructuredToolTipText = FSharpToolTipText -#endif +type public FSharpToolTipText = FSharpToolTipText +type public FSharpStructuredToolTipText = FSharpToolTipText module Tooltips = let ToFSharpToolTipElement tooltip = @@ -295,10 +275,12 @@ type CompletionItemKind = | Method of isExtension : bool | Event | Argument + | CustomOperation | Other type UnresolvedSymbol = - { DisplayName: string + { FullName: string + DisplayName: string Namespace: string[] } type CompletionItem = @@ -314,8 +296,8 @@ type CompletionItem = [] module internal SymbolHelpers = - let isFunction g typ = - let _, tau = tryDestForallTy g typ + let isFunction g ty = + let _, tau = tryDestForallTy g ty isFunTy g tau let OutputFullName isListItem ppF fnF r = @@ -383,7 +365,7 @@ module internal SymbolHelpers = | Item.Event einfo -> rangeOfEventInfo preferFlag einfo | Item.ILField _ -> None | Item.Property(_, pinfos) -> rangeOfPropInfo preferFlag pinfos.Head - | Item.Types(_, typs) -> typs |> List.tryPick (tryNiceEntityRefOfTy >> Option.map (rangeOfEntityRef preferFlag)) + | Item.Types(_, tys) -> tys |> List.tryPick (tryNiceEntityRefOfTyOption >> Option.map (rangeOfEntityRef preferFlag)) | Item.CustomOperation (_, _, Some minfo) -> rangeOfMethInfo g preferFlag minfo | Item.TypeVar (_, tp) -> Some tp.Range | Item.ModuleOrNamespaces(modrefs) -> modrefs |> List.tryPick (rangeOfEntityRef preferFlag >> Some) @@ -396,8 +378,8 @@ module internal SymbolHelpers = | Item.ImplicitOp (_, {contents = Some(TraitConstraintSln.FSMethSln(_, vref, _))}) -> Some vref.Range | Item.ImplicitOp _ -> None | Item.UnqualifiedType tcrefs -> tcrefs |> List.tryPick (rangeOfEntityRef preferFlag >> Some) - | Item.DelegateCtor typ - | Item.FakeInterfaceCtor typ -> typ |> tryNiceEntityRefOfTy |> Option.map (rangeOfEntityRef preferFlag) + | Item.DelegateCtor ty + | Item.FakeInterfaceCtor ty -> ty |> tryNiceEntityRefOfTyOption |> Option.map (rangeOfEntityRef preferFlag) | Item.NewDef _ -> None // Provided type definitions do not have a useful F# CCU for the purposes of goto-definition. @@ -413,7 +395,7 @@ module internal SymbolHelpers = | _ -> minfo.ArbitraryValRef |> Option.bind ccuOfValRef - |> Option.orElseWith (fun () -> minfo.DeclaringEntityRef |> computeCcuOfTyconRef) + |> Option.orElseWith (fun () -> minfo.DeclaringTyconRef |> computeCcuOfTyconRef) let rec ccuOfItem (g:TcGlobals) d = @@ -423,13 +405,13 @@ module internal SymbolHelpers = | Item.ActivePatternCase apref -> ccuOfValRef apref.ActivePatternVal | Item.ExnCase tcref -> computeCcuOfTyconRef tcref | Item.RecdField rfinfo -> computeCcuOfTyconRef rfinfo.RecdFieldRef.TyconRef - | Item.Event einfo -> einfo.EnclosingType |> tcrefOfAppTy g |> computeCcuOfTyconRef - | Item.ILField finfo -> finfo.EnclosingType |> tcrefOfAppTy g |> computeCcuOfTyconRef + | Item.Event einfo -> einfo.DeclaringTyconRef |> computeCcuOfTyconRef + | Item.ILField finfo -> finfo.DeclaringTyconRef |> computeCcuOfTyconRef | Item.Property(_, pinfos) -> pinfos |> List.tryPick (fun pinfo -> pinfo.ArbitraryValRef |> Option.bind ccuOfValRef - |> Option.orElseWith (fun () -> pinfo.EnclosingType |> tcrefOfAppTy g |> computeCcuOfTyconRef)) + |> Option.orElseWith (fun () -> pinfo.DeclaringTyconRef |> computeCcuOfTyconRef)) | Item.ArgName (_, _, Some (ArgumentContainer.Method minfo)) -> ccuOfMethInfo g minfo @@ -437,7 +419,7 @@ module internal SymbolHelpers = | Item.CtorGroup(_, minfos) -> minfos |> List.tryPick (ccuOfMethInfo g) | Item.CustomOperation (_, _, Some minfo) -> ccuOfMethInfo g minfo - | Item.Types(_, typs) -> typs |> List.tryPick (tryNiceEntityRefOfTy >> Option.bind computeCcuOfTyconRef) + | Item.Types(_, tys) -> tys |> List.tryPick (tryNiceEntityRefOfTyOption >> Option.bind computeCcuOfTyconRef) | Item.ArgName (_, _, Some (ArgumentContainer.Type eref)) -> computeCcuOfTyconRef eref @@ -518,8 +500,15 @@ module internal SymbolHelpers = let GetXmlDocSigOfScopedValRef g (tcref:TyconRef) (vref:ValRef) = let ccuFileName = libFileOfEntityRef tcref let v = vref.Deref - if v.XmlDocSig = "" && v.HasTopValActualParent then - v.XmlDocSig <- XmlDocSigOfVal g (buildAccessPath vref.TopValActualParent.CompilationPathOpt) v + if v.XmlDocSig = "" && v.HasDeclaringEntity then + let ap = buildAccessPath vref.TopValDeclaringEntity.CompilationPathOpt + let path = + if vref.TopValDeclaringEntity.IsModule then + let sep = if ap.Length > 0 then "." else "" + ap + sep + vref.TopValDeclaringEntity.CompiledName + else + ap + v.XmlDocSig <- XmlDocSigOfVal g path v Some (ccuFileName, v.XmlDocSig) let GetXmlDocSigOfRecdFieldInfo (rfinfo:RecdFieldInfo) = @@ -540,7 +529,7 @@ module internal SymbolHelpers = let amap = infoReader.amap match minfo with | FSMeth (g, _, vref, _) -> - GetXmlDocSigOfScopedValRef g minfo.DeclaringEntityRef vref + GetXmlDocSigOfScopedValRef g minfo.DeclaringTyconRef vref | ILMeth (g, ilminfo, _) -> let actualTypeName = ilminfo.DeclaringTyconRef.CompiledRepresentationForNamedType.FullName let fmtps = ilminfo.FormalMethodTypars @@ -569,25 +558,24 @@ module internal SymbolHelpers = if not vref.IsLocalRef then let ccuFileName = vref.nlr.Ccu.FileName let v = vref.Deref - if v.XmlDocSig = "" && v.HasTopValActualParent then - v.XmlDocSig <- XmlDocSigOfVal g vref.TopValActualParent.CompiledRepresentationForNamedType.Name v + if v.XmlDocSig = "" && v.HasDeclaringEntity then + v.XmlDocSig <- XmlDocSigOfVal g vref.TopValDeclaringEntity.CompiledRepresentationForNamedType.Name v Some (ccuFileName, v.XmlDocSig) else None - let GetXmlDocSigOfProp infoReader m pinfo = + let GetXmlDocSigOfProp infoReader m (pinfo: PropInfo) = + let g = pinfo.TcGlobals match pinfo with #if !NO_EXTENSIONTYPING | ProvidedProp _ -> None // No signature is possible. If an xml comment existed it would have been returned by PropInfo.XmlDoc in infos.fs #endif - | FSProp (g, typ, _, _) as fspinfo -> - let tcref = tcrefOfAppTy g typ + | FSProp _ as fspinfo -> match fspinfo.ArbitraryValRef with | None -> None - | Some vref -> GetXmlDocSigOfScopedValRef g tcref vref - | ILProp(g, (ILPropInfo(tinfo, pdef))) -> - let tcref = tinfo.TyconRef - match metaInfoOfEntityRef infoReader m tcref with + | Some vref -> GetXmlDocSigOfScopedValRef g pinfo.DeclaringTyconRef vref + | ILProp(ILPropInfo(_, pdef)) -> + match metaInfoOfEntityRef infoReader m pinfo.DeclaringTyconRef with | Some (ccuFileName, formalTypars, formalTypeInfo) -> let filpinfo = ILPropInfo(formalTypeInfo, pdef) Some (ccuFileName, "P:"+formalTypeInfo.ILTypeRef.FullName+"."+pdef.Name+XmlDocArgsEnc g (formalTypars, []) (filpinfo.GetParamTypes(infoReader.amap, m))) @@ -595,17 +583,15 @@ module internal SymbolHelpers = let GetXmlDocSigOfEvent infoReader m (einfo:EventInfo) = match einfo with - | ILEvent(_, ilEventInfo) -> - let tinfo = ilEventInfo.ILTypeInfo - let tcref = tinfo.TyconRef - match metaInfoOfEntityRef infoReader m tcref with + | ILEvent _ -> + match metaInfoOfEntityRef infoReader m einfo.DeclaringTyconRef with | Some (ccuFileName, _, formalTypeInfo) -> Some(ccuFileName, "E:"+formalTypeInfo.ILTypeRef.FullName+"."+einfo.EventName) | _ -> None | _ -> None let GetXmlDocSigOfILFieldInfo infoReader m (finfo:ILFieldInfo) = - match metaInfoOfEntityRef infoReader m (tcrefOfAppTy infoReader.g finfo.EnclosingType) with + match metaInfoOfEntityRef infoReader m finfo.DeclaringTyconRef with | Some (ccuFileName, _, formalTypeInfo) -> Some(ccuFileName, "F:"+formalTypeInfo.ILTypeRef.FullName+"."+finfo.FieldName) | _ -> None @@ -726,21 +712,25 @@ module internal SymbolHelpers = // This may explore assemblies that are not in the reference set. // In this case just bail out and assume items are not equal protectAssemblyExploration false (fun () -> - let equalTypes(ty1, ty2) = - if isAppTy g ty1 && isAppTy g ty2 then tyconRefEq g (tcrefOfAppTy g ty1) (tcrefOfAppTy g ty2) - else typeEquiv g ty1 ty2 + let equalHeadTypes(ty1, ty2) = + match tryDestAppTy g ty1 with + | ValueSome tcref1 -> + match tryDestAppTy g ty2 with + | ValueSome tcref2 -> tyconRefEq g tcref1 tcref2 + | _ -> typeEquiv g ty1 ty2 + | _ -> typeEquiv g ty1 ty2 ItemsAreEffectivelyEqual g item1 item2 || // Much of this logic is already covered by 'ItemsAreEffectivelyEqual' match item1, item2 with - | Item.DelegateCtor(ty1), Item.DelegateCtor(ty2) -> equalTypes(ty1, ty2) + | Item.DelegateCtor(ty1), Item.DelegateCtor(ty2) -> equalHeadTypes(ty1, ty2) | Item.Types(dn1, [ty1]), Item.Types(dn2, [ty2]) -> // Bug 4403: We need to compare names as well, because 'int' and 'Int32' are physically the same type, but we want to show both - dn1 = dn2 && equalTypes(ty1, ty2) + dn1 = dn2 && equalHeadTypes(ty1, ty2) // Prefer a type to a DefaultStructCtor, a DelegateCtor and a FakeInterfaceCtor - | ItemWhereTypIsPreferred(ty1), ItemWhereTypIsPreferred(ty2) -> equalTypes(ty1, ty2) + | ItemWhereTypIsPreferred(ty1), ItemWhereTypIsPreferred(ty2) -> equalHeadTypes(ty1, ty2) | Item.ExnCase(tcref1), Item.ExnCase(tcref2) -> tyconRefEq g tcref1 tcref2 | Item.ILField(ILFieldInfo(_, fld1)), Item.ILField(ILFieldInfo(_, fld2)) -> @@ -782,8 +772,9 @@ module internal SymbolHelpers = protectAssemblyExploration 1027 (fun () -> match item with | ItemWhereTypIsPreferred ty -> - if isAppTy g ty then hash (tcrefOfAppTy g ty).LogicalName - else 1010 + match tryDestAppTy g ty with + | ValueSome tcref -> hash (tcref).LogicalName + | _ -> 1010 | Item.ILField(ILFieldInfo(_, fld)) -> System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode fld // hash on the object identity of the AbstractIL metadata blob for the field | Item.TypeVar (nm, _tp) -> hash nm @@ -841,16 +832,16 @@ module internal SymbolHelpers = protectAssemblyExploration true (fun () -> match item with | Item.Types(it, [ty]) -> + isAppTy g ty && g.suppressed_types |> List.exists (fun supp -> - if isAppTy g ty then - // check if they are the same logical type (after removing all abbreviations) - let tcr1 = tcrefOfAppTy g ty - let tcr2 = tcrefOfAppTy g (generalizedTyconRef supp) - tyconRefEq g tcr1 tcr2 && - // check the display name is precisely the one we're suppressing - it = supp.DisplayName - else false) + let generalizedSupp = generalizedTyconRef supp + // check the display name is precisely the one we're suppressing + isAppTy g generalizedSupp && it = supp.DisplayName && + // check if they are the same logical type (after removing all abbreviations) + let tcr1 = tcrefOfAppTy g ty + let tcr2 = tcrefOfAppTy g generalizedSupp + tyconRefEq g tcr1 tcr2) | _ -> false) /// Filter types that are explicitly suppressed from the IntelliSense (such as uppercase "FSharpList", "Option", etc.) @@ -881,18 +872,18 @@ module internal SymbolHelpers = | Item.RecdField rfinfo -> fullDisplayTextOfRecdFieldRef rfinfo.RecdFieldRef | Item.NewDef id -> id.idText | Item.ILField finfo -> bufs (fun os -> NicePrint.outputILTypeRef denv os finfo.ILTypeRef; bprintf os ".%s" finfo.FieldName) - | Item.Event einfo -> bufs (fun os -> NicePrint.outputTyconRef denv os (tcrefOfAppTy g einfo.EnclosingType); bprintf os ".%s" einfo.EventName) - | Item.Property(_, (pinfo::_)) -> bufs (fun os -> NicePrint.outputTyconRef denv os (tcrefOfAppTy g pinfo.EnclosingType); bprintf os ".%s" pinfo.PropertyName) + | Item.Event einfo -> bufs (fun os -> NicePrint.outputTyconRef denv os einfo.DeclaringTyconRef; bprintf os ".%s" einfo.EventName) + | Item.Property(_, (pinfo::_)) -> bufs (fun os -> NicePrint.outputTyconRef denv os pinfo.DeclaringTyconRef; bprintf os ".%s" pinfo.PropertyName) | Item.CustomOperation (customOpName, _, _) -> customOpName - | Item.CtorGroup(_, minfo :: _) -> bufs (fun os -> NicePrint.outputTyconRef denv os minfo.DeclaringEntityRef) - | Item.MethodGroup(_, _, Some minfo) -> bufs (fun os -> NicePrint.outputTyconRef denv os minfo.DeclaringEntityRef; bprintf os ".%s" minfo.DisplayName) - | Item.MethodGroup(_, minfo :: _, _) -> bufs (fun os -> NicePrint.outputTyconRef denv os minfo.DeclaringEntityRef; bprintf os ".%s" minfo.DisplayName) + | Item.CtorGroup(_, minfo :: _) -> bufs (fun os -> NicePrint.outputTyconRef denv os minfo.DeclaringTyconRef) + | Item.MethodGroup(_, _, Some minfo) -> bufs (fun os -> NicePrint.outputTyconRef denv os minfo.DeclaringTyconRef; bprintf os ".%s" minfo.DisplayName) + | Item.MethodGroup(_, minfo :: _, _) -> bufs (fun os -> NicePrint.outputTyconRef denv os minfo.DeclaringTyconRef; bprintf os ".%s" minfo.DisplayName) | Item.UnqualifiedType (tcref :: _) -> bufs (fun os -> NicePrint.outputTyconRef denv os tcref) - | Item.FakeInterfaceCtor typ - | Item.DelegateCtor typ - | Item.Types(_, typ:: _) -> - match tryDestAppTy g typ with - | Some tcref -> bufs (fun os -> NicePrint.outputTyconRef denv os tcref) + | Item.FakeInterfaceCtor ty + | Item.DelegateCtor ty + | Item.Types(_, ty:: _) -> + match tryDestAppTy g ty with + | ValueSome tcref -> bufs (fun os -> NicePrint.outputTyconRef denv os tcref) | _ -> "" | Item.ModuleOrNamespaces((modref :: _) as modrefs) -> let definiteNamespace = modrefs |> List.forall (fun modref -> modref.IsNamespace) @@ -982,7 +973,8 @@ module internal SymbolHelpers = let g = infoReader.g let amap = infoReader.amap match item with - | Item.Types(_, ((TType_app(tcref, _)):: _)) -> + | Item.Types(_, ((TType_app(tcref, _)):: _)) + | Item.UnqualifiedType(tcref :: _) -> let ty = generalizedTyconRef tcref Infos.ExistsHeadTypeInEntireHierarchy g amap range0 ty g.tcref_System_Attribute | _ -> false @@ -1102,7 +1094,7 @@ module internal SymbolHelpers = let rty, _cxs = PrettyTypes.PrettifyType g rty let layout = wordL (tagText (FSComp.SR.typeInfoEvent())) ^^ - NicePrint.layoutTyconRef denv (tcrefOfAppTy g einfo.EnclosingType) ^^ + NicePrint.layoutTyconRef denv einfo.ApparentEnclosingTyconRef ^^ SepL.dot ^^ wordL (tagEvent einfo.EventName) ^^ RightL.colon ^^ @@ -1133,7 +1125,7 @@ module internal SymbolHelpers = ) ^^ SepL.lineBreak ^^ SepL.lineBreak ^^ wordL (tagText (FSComp.SR.typeInfoCallsWord())) ^^ - NicePrint.layoutTyconRef denv (tcrefOfAppTy g minfo.EnclosingType) ^^ + NicePrint.layoutTyconRef denv minfo.ApparentEnclosingTyconRef ^^ SepL.dot ^^ wordL (tagMethod minfo.DisplayName) @@ -1149,9 +1141,9 @@ module internal SymbolHelpers = // type IFoo = abstract F : int // type II = IFoo // remove 'type II = ' and quickly hover over IFoo before it gets squiggled for 'invalid use of interface type' // and in that case we'll just show the interface type name. - | Item.FakeInterfaceCtor typ -> - let typ, _ = PrettyTypes.PrettifyType g typ - let layout = NicePrint.layoutTyconRef denv (tcrefOfAppTy g typ) + | Item.FakeInterfaceCtor ty -> + let ty, _ = PrettyTypes.PrettifyType g ty + let layout = NicePrint.layoutTyconRef denv (tcrefOfAppTy g ty) FSharpStructuredToolTipElement.Single(layout, xml) // The 'fake' representation of constructors of .NET delegate types @@ -1193,7 +1185,7 @@ module internal SymbolHelpers = ([], modrefs) ||> Seq.fold (fun st modref -> match fullDisplayTextOfParentOfModRef modref with - | Some(txt) -> txt::st + | ValueSome txt -> txt::st | _ -> st) |> Seq.mapi (fun i x -> i, x) |> Seq.toList @@ -1293,7 +1285,7 @@ module internal SymbolHelpers = let getKeywordForMethInfo (minfo : MethInfo) = match minfo with | FSMeth(_, _, vref, _) -> - match vref.ActualParent with + match vref.DeclaringEntity with | Parent tcref -> (tcref |> ticksAndArgCountTextOfTyconRef)+"."+vref.CompiledName|> Some | ParentNone -> None @@ -1313,8 +1305,8 @@ module internal SymbolHelpers = match item with | Item.Value vref | Item.CustomBuilder (_, vref) -> let v = vref.Deref - if v.IsModuleBinding && v.HasTopValActualParent then - let tyconRef = v.TopValActualParent + if v.IsModuleBinding && v.HasDeclaringEntity then + let tyconRef = v.TopValDeclaringEntity let paramsString = match v.Typars with | [] -> "" @@ -1336,7 +1328,7 @@ module internal SymbolHelpers = | Item.ILField finfo -> match finfo with | ILFieldInfo(tinfo, fdef) -> - (tinfo.TyconRef |> ticksAndArgCountTextOfTyconRef)+"."+fdef.Name |> Some + (tinfo.TyconRefOfRawMetadata |> ticksAndArgCountTextOfTyconRef)+"."+fdef.Name |> Some #if !NO_EXTENSIONTYPING | ProvidedField _ -> None #endif @@ -1382,13 +1374,13 @@ module internal SymbolHelpers = | FSProp(_, _, Some vref, _) | FSProp(_, _, _, Some vref) -> // per spec, extension members in F1 keywords are qualified with definition class - match vref.ActualParent with + match vref.DeclaringEntity with | Parent tcref -> (tcref |> ticksAndArgCountTextOfTyconRef)+"."+vref.PropertyName|> Some | ParentNone -> None - | ILProp(_, (ILPropInfo(tinfo, pdef))) -> - let tcref = tinfo.TyconRef + | ILProp(ILPropInfo(tinfo, pdef)) -> + let tcref = tinfo.TyconRefOfRawMetadata (tcref |> ticksAndArgCountTextOfTyconRef)+"."+pdef.Name |> Some | FSProp _ -> None #if !NO_EXTENSIONTYPING @@ -1398,15 +1390,14 @@ module internal SymbolHelpers = | Item.Event einfo -> match einfo with - | ILEvent(_, ilEventInfo) -> - let tinfo = ilEventInfo.ILTypeInfo - let tcref = tinfo.TyconRef + | ILEvent _ -> + let tcref = einfo.DeclaringTyconRef (tcref |> ticksAndArgCountTextOfTyconRef)+"."+einfo.EventName |> Some | FSEvent(_, pinfo, _, _) -> match pinfo.ArbitraryValRef with | Some vref -> // per spec, members in F1 keywords are qualified with definition class - match vref.ActualParent with + match vref.DeclaringEntity with | Parent tcref -> (tcref |> ticksAndArgCountTextOfTyconRef)+"."+vref.PropertyName|> Some | ParentNone -> None | None -> None @@ -1417,18 +1408,15 @@ module internal SymbolHelpers = match minfos with | [] -> None | FSMeth(_, _, vref, _) :: _ -> - match vref.ActualParent with + match vref.DeclaringEntity with | Parent tcref -> (tcref |> ticksAndArgCountTextOfTyconRef) + ".#ctor"|> Some | ParentNone -> None - | (ILMeth (_, minfo, _)) :: _ -> - let tcref = minfo.DeclaringTyconRef - (tcref |> ticksAndArgCountTextOfTyconRef)+".#ctor" |> Some - | (DefaultStructCtor (g, typ) :: _) -> - let tcref = tcrefOfAppTy g typ - (ticksAndArgCountTextOfTyconRef tcref) + ".#ctor" |> Some #if !NO_EXTENSIONTYPING | ProvidedMeth _::_ -> None #endif + | minfo :: _ -> + let tcref = minfo.DeclaringTyconRef + (tcref |> ticksAndArgCountTextOfTyconRef)+".#ctor" |> Some | Item.CustomOperation (_, _, Some minfo) -> getKeywordForMethInfo minfo | Item.MethodGroup(_, _, Some minfo) -> getKeywordForMethInfo minfo | Item.MethodGroup(_, minfo :: _, _) -> getKeywordForMethInfo minfo diff --git a/src/fsharp/symbols/SymbolHelpers.fsi b/src/fsharp/symbols/SymbolHelpers.fsi index 1d1762a7f4f..cbc351baf58 100755 --- a/src/fsharp/symbols/SymbolHelpers.fsi +++ b/src/fsharp/symbols/SymbolHelpers.fsi @@ -14,7 +14,6 @@ open Microsoft.FSharp.Compiler.Infos open Microsoft.FSharp.Compiler.NameResolution open Microsoft.FSharp.Compiler.InfoReader open Microsoft.FSharp.Compiler.Tast -open Microsoft.FSharp.Compiler.CompileOps open Microsoft.FSharp.Compiler.Tastops open Microsoft.FSharp.Compiler.ErrorLogger @@ -23,20 +22,12 @@ open Microsoft.FSharp.Compiler.ErrorLogger [] -#if COMPILER_PUBLIC_API -type FSharpErrorSeverity = -#else -type internal FSharpErrorSeverity = -#endif +type public FSharpErrorSeverity = | Warning | Error [] -#if COMPILER_PUBLIC_API -type FSharpErrorInfo = -#else -type internal FSharpErrorInfo = -#endif +type public FSharpErrorInfo = member FileName: string member StartLineAlternate:int member EndLineAlternate:int @@ -56,11 +47,7 @@ type internal FSharpErrorInfo = // // Note: instances of this type do not hold any references to any compiler resources. [] -#if COMPILER_PUBLIC_API -type FSharpXmlDoc = -#else -type internal FSharpXmlDoc = -#endif +type public FSharpXmlDoc = /// No documentation is available | None @@ -70,19 +57,11 @@ type internal FSharpXmlDoc = /// Indicates that the text for the documentation can be found in a .xml documentation file, using the given signature key | XmlDocFileSignature of (*File:*) string * (*Signature:*)string -#if COMPILER_PUBLIC_API -type Layout = Internal.Utilities.StructuredFormat.Layout -#else -type internal Layout = Internal.Utilities.StructuredFormat.Layout -#endif +type public Layout = Internal.Utilities.StructuredFormat.Layout /// A single data tip display element [] -#if COMPILER_PUBLIC_API -type FSharpToolTipElementData<'T> = -#else -type internal FSharpToolTipElementData<'T> = -#endif +type public FSharpToolTipElementData<'T> = { MainDescription: 'T XmlDoc: FSharpXmlDoc /// typar insantiation text, to go after xml @@ -96,11 +75,7 @@ type internal FSharpToolTipElementData<'T> = // // Note: instances of this type do not hold any references to any compiler resources. [] -#if COMPILER_PUBLIC_API -type FSharpToolTipElement<'T> = -#else -type internal FSharpToolTipElement<'T> = -#endif +type public FSharpToolTipElement<'T> = | None /// A single type, method, etc with comment. May represent a method overload group. @@ -111,58 +86,39 @@ type internal FSharpToolTipElement<'T> = static member Single : 'T * FSharpXmlDoc * ?typeMapping: 'T list * ?paramName: string * ?remarks : 'T -> FSharpToolTipElement<'T> /// A single data tip display element with where text is expressed as string -#if COMPILER_PUBLIC_API -type FSharpToolTipElement = FSharpToolTipElement -#else -type internal FSharpToolTipElement = FSharpToolTipElement -#endif +type public FSharpToolTipElement = FSharpToolTipElement /// A single data tip display element with where text is expressed as -#if COMPILER_PUBLIC_API -type FSharpStructuredToolTipElement = FSharpToolTipElement -#else -type internal FSharpStructuredToolTipElement = FSharpToolTipElement -#endif +type public FSharpStructuredToolTipElement = FSharpToolTipElement /// Information for building a tool tip box. // // Note: instances of this type do not hold any references to any compiler resources. -#if COMPILER_PUBLIC_API -type FSharpToolTipText<'T> = -#else -type internal FSharpToolTipText<'T> = -#endif +type public FSharpToolTipText<'T> = /// A list of data tip elements to display. | FSharpToolTipText of FSharpToolTipElement<'T> list -#if COMPILER_PUBLIC_API -type FSharpToolTipText = FSharpToolTipText -type FSharpStructuredToolTipText = FSharpToolTipText -#else -type internal FSharpToolTipText = FSharpToolTipText -type internal FSharpStructuredToolTipText = FSharpToolTipText -#endif +type public FSharpToolTipText = FSharpToolTipText +type public FSharpStructuredToolTipText = FSharpToolTipText //---------------------------------------------------------------------------- // Object model for completion list entries (one of several in the API...) [] -#if COMPILER_PUBLIC_API -type CompletionItemKind = -#else -type internal CompletionItemKind = -#endif +type public CompletionItemKind = | Field | Property | Method of isExtension : bool | Event | Argument + | CustomOperation | Other -type internal UnresolvedSymbol = - { DisplayName: string +type UnresolvedSymbol = + { FullName: string + DisplayName: string Namespace: string[] } type internal CompletionItem = @@ -174,11 +130,7 @@ type internal CompletionItem = Unresolved: UnresolvedSymbol option } member Item : Item -#if COMPILER_PUBLIC_API -module Tooltips = -#else -module internal Tooltips = -#endif +module public Tooltips = val ToFSharpToolTipElement: FSharpStructuredToolTipElement -> FSharpToolTipElement val ToFSharpToolTipText: FSharpStructuredToolTipText -> FSharpToolTipText val Map: f: ('T1 -> 'T2) -> a: Async<'T1> -> Async<'T2> @@ -238,7 +190,7 @@ type internal CompilationErrorLogger = new: debugName:string * options: FSharpErrorSeverityOptions -> CompilationErrorLogger /// Get the captured errors - member GetErrors: unit -> (PhasedDiagnostic * FSharpErrorSeverity) list + member GetErrors: unit -> (PhasedDiagnostic * FSharpErrorSeverity)[] /// This represents the global state established as each task function runs as part of the build. /// diff --git a/src/fsharp/symbols/SymbolPatterns.fs b/src/fsharp/symbols/SymbolPatterns.fs index 8ae4b90bf9d..74b9bcf60c6 100644 --- a/src/fsharp/symbols/SymbolPatterns.fs +++ b/src/fsharp/symbols/SymbolPatterns.fs @@ -5,8 +5,9 @@ namespace Microsoft.FSharp.Compiler.SourceCodeServices /// Patterns over FSharpSymbol and derivatives. [] module Symbol = - open System.Text.RegularExpressions open System + open System.Text.RegularExpressions + open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library let isAttribute<'T> (attribute: FSharpAttribute) = // CompiledName throws exception on DataContractAttribute generated by SQLProvider @@ -36,7 +37,7 @@ module Symbol = |> Option.isSome let isOperator (name: string) = - name.StartsWith "( " && name.EndsWith " )" && name.Length > 4 + name.StartsWithOrdinal("( ") && name.EndsWithOrdinal(" )") && name.Length > 4 && name.Substring (2, name.Length - 4) |> String.forall (fun c -> c <> ' ' && not (Char.IsLetter c)) @@ -202,12 +203,12 @@ module Symbol = /// Constructor (enclosingEntity) let (|Constructor|_|) (func: FSharpMemberOrFunctionOrValue) = match func.CompiledName with - | ".ctor" | ".cctor" -> func.EnclosingEntity + | ".ctor" | ".cctor" -> func.DeclaringEntity | _ -> None let (|Function|_|) excluded (func: FSharpMemberOrFunctionOrValue) = - try let typ = func.FullType |> getAbbreviatedType - if typ.IsFunctionType + try let ty = func.FullType |> getAbbreviatedType + if ty.IsFunctionType && not func.IsPropertyGetterMethod && not func.IsPropertySetterMethod && not excluded diff --git a/src/fsharp/symbols/SymbolPatterns.fsi b/src/fsharp/symbols/SymbolPatterns.fsi index 4499e3098c8..9b86aa3a54c 100644 --- a/src/fsharp/symbols/SymbolPatterns.fsi +++ b/src/fsharp/symbols/SymbolPatterns.fsi @@ -3,13 +3,8 @@ namespace Microsoft.FSharp.Compiler.SourceCodeServices [] -#if COMPILER_PUBLIC_API -module Symbol = -#else -module internal Symbol = -#endif - open System.Text.RegularExpressions - open System +/// Patterns over FSharpSymbol and derivatives. +module public Symbol = val isAttribute<'T> : FSharpAttribute -> bool val tryGetAttribute<'T> : seq -> FSharpAttribute option diff --git a/src/fsharp/symbols/Symbols.fs b/src/fsharp/symbols/Symbols.fs index c97b62e9d48..0df99aa034a 100644 --- a/src/fsharp/symbols/Symbols.fs +++ b/src/fsharp/symbols/Symbols.fs @@ -18,7 +18,6 @@ open Microsoft.FSharp.Compiler.NameResolution open Microsoft.FSharp.Compiler.TcGlobals open Microsoft.FSharp.Compiler.Lib open Microsoft.FSharp.Compiler.Tastops -open Microsoft.FSharp.Compiler.PrettyNaming open Internal.Utilities type FSharpAccessibility(a:Accessibility, ?isProtected) = @@ -50,6 +49,20 @@ type FSharpAccessibility(a:Accessibility, ?isProtected) = let mangledTextOfCompPath (CompPath(scoref, path)) = getNameOfScopeRef scoref + "/" + textOfPath (List.map fst path) String.concat ";" (List.map mangledTextOfCompPath paths) +type SymbolEnv(g: TcGlobals, thisCcu: CcuThunk, thisCcuTy: ModuleOrNamespaceType option, tcImports: TcImports, amapV: Import.ImportMap, infoReaderV: InfoReader) = + + new(g: TcGlobals, thisCcu: CcuThunk, thisCcuTy: ModuleOrNamespaceType option, tcImports: TcImports) = + let amap = tcImports.GetImportMap() + let infoReader = InfoReader(g, amap) + SymbolEnv(g, thisCcu, thisCcuTy, tcImports, amap, infoReader) + + member __.g = g + member __.amap = amapV + member __.thisCcu = thisCcu + member __.thisCcuTy = thisCcuTy + member __.infoReader = infoReaderV + member __.tcImports = tcImports + [] module Impl = let protect f = @@ -59,7 +72,7 @@ module Impl = let makeReadOnlyCollection (arr: seq<'T>) = System.Collections.ObjectModel.ReadOnlyCollection<_>(Seq.toArray arr) :> IList<_> - + let makeXmlDoc (XmlDoc x) = makeReadOnlyCollection (x) let rescopeEntity optViewedCcu (entity: Entity) = @@ -67,13 +80,13 @@ module Impl = | None -> mkLocalEntityRef entity | Some viewedCcu -> match tryRescopeEntity viewedCcu entity with - | None -> mkLocalEntityRef entity - | Some eref -> eref + | ValueNone -> mkLocalEntityRef entity + | ValueSome eref -> eref let entityIsUnresolved(entity:EntityRef) = match entity with | ERefNonLocal(NonLocalEntityRef(ccu, _)) -> - ccu.IsUnresolvedReference && entity.TryDeref.IsNone + ccu.IsUnresolvedReference && ValueOption.isNone entity.TryDeref | _ -> false let checkEntityIsResolved(entity:EntityRef) = @@ -110,11 +123,11 @@ module Impl = /// Convert an IL member accessibility into an F# accessibility let getApproxFSharpAccessibilityOfMember (declaringEntity: EntityRef) (ilAccess: ILMemberAccess) = match ilAccess with + | ILMemberAccess.CompilerControlled | ILMemberAccess.FamilyAndAssembly | ILMemberAccess.Assembly -> taccessPrivate (CompPath(declaringEntity.CompilationPath.ILScopeRef, [])) - | ILMemberAccess.CompilerControlled | ILMemberAccess.Private -> taccessPrivate declaringEntity.CompilationPath @@ -168,16 +181,7 @@ module Impl = | None -> None - type cenv(g:TcGlobals, thisCcu: CcuThunk , tcImports: TcImports) = - let amapV = tcImports.GetImportMap() - let infoReaderV = InfoReader(g, amapV) - member __.g = g - member __.amap = amapV - member __.thisCcu = thisCcu - member __.infoReader = infoReaderV - member __.tcImports = tcImports - - let getXmlDocSigForEntity (cenv: cenv) (ent:EntityRef)= + let getXmlDocSigForEntity (cenv: SymbolEnv) (ent:EntityRef)= match SymbolHelpers.GetXmlDocSigOfEntityRef cenv.infoReader ent.Range ent with | Some (_, docsig) -> docsig | _ -> "" @@ -188,7 +192,7 @@ type FSharpDisplayContext(denv: TcGlobals -> DisplayEnv) = // delay the realization of 'item' in case it is unresolved -type FSharpSymbol(cenv:cenv, item: (unit -> Item), access: (FSharpSymbol -> CcuThunk -> AccessorDomain -> bool)) = +type FSharpSymbol(cenv: SymbolEnv, item: (unit -> Item), access: (FSharpSymbol -> CcuThunk -> AccessorDomain -> bool)) = member x.Assembly = let ccu = defaultArg (SymbolHelpers.ccuOfItem cenv.g x.Item) cenv.thisCcu @@ -209,6 +213,8 @@ type FSharpSymbol(cenv:cenv, item: (unit -> Item), access: (FSharpSymbol -> CcuT member x.IsEffectivelySameAs(y:FSharpSymbol) = x.Equals(y) || ItemsAreEffectivelyEqual cenv.g x.Item y.Item + member x.GetEffectivelySameAsHash() = ItemsAreEffectivelyEqualHash cenv.g x.Item + member internal x.Item = item() member x.DisplayName = item().DisplayName @@ -225,8 +231,88 @@ type FSharpSymbol(cenv:cenv, item: (unit -> Item), access: (FSharpSymbol -> CcuT override x.ToString() = "symbol " + (try item().DisplayName with _ -> "?") + // TODO: there are several cases where we may need to report more interesting + // symbol information below. By default we return a vanilla symbol. + static member Create(g, thisCcu, thisCcuTye, tcImports, item): FSharpSymbol = + FSharpSymbol.Create(SymbolEnv(g, thisCcu, Some thisCcuTye, tcImports), item) + + static member Create(cenv, item): FSharpSymbol = + let dflt() = FSharpSymbol(cenv, (fun () -> item), (fun _ _ _ -> true)) + match item with + | Item.Value v -> FSharpMemberOrFunctionOrValue(cenv, V v, item) :> _ + | Item.UnionCase (uinfo, _) -> FSharpUnionCase(cenv, uinfo.UnionCaseRef) :> _ + | Item.ExnCase tcref -> FSharpEntity(cenv, tcref) :>_ + | Item.RecdField rfinfo -> FSharpField(cenv, RecdOrClass rfinfo.RecdFieldRef) :> _ + + | Item.ILField finfo -> FSharpField(cenv, ILField finfo) :> _ + + | Item.Event einfo -> + FSharpMemberOrFunctionOrValue(cenv, E einfo, item) :> _ + + | Item.Property(_, pinfo :: _) -> + FSharpMemberOrFunctionOrValue(cenv, P pinfo, item) :> _ + + | Item.MethodGroup(_, minfo :: _, _) -> + FSharpMemberOrFunctionOrValue(cenv, M minfo, item) :> _ + + | Item.CtorGroup(_, cinfo :: _) -> + FSharpMemberOrFunctionOrValue(cenv, C cinfo, item) :> _ + + | Item.DelegateCtor (AbbrevOrAppTy tcref) -> + FSharpEntity(cenv, tcref) :>_ + + | Item.UnqualifiedType(tcref :: _) + | Item.Types(_, AbbrevOrAppTy tcref :: _) -> + FSharpEntity(cenv, tcref) :>_ + + | Item.ModuleOrNamespaces(modref :: _) -> + FSharpEntity(cenv, modref) :> _ + + | Item.SetterArg (_id, item) -> FSharpSymbol.Create(cenv, item) + + | Item.CustomOperation (_customOpName, _, Some minfo) -> + FSharpMemberOrFunctionOrValue(cenv, M minfo, item) :> _ + + | Item.CustomBuilder (_, vref) -> + FSharpMemberOrFunctionOrValue(cenv, V vref, item) :> _ + + | Item.TypeVar (_, tp) -> + FSharpGenericParameter(cenv, tp) :> _ + + | Item.ActivePatternCase apref -> + FSharpActivePatternCase(cenv, apref.ActivePatternInfo, apref.ActivePatternVal.Type, apref.CaseIndex, Some apref.ActivePatternVal, item) :> _ + + | Item.ActivePatternResult (apinfo, ty, n, _) -> + FSharpActivePatternCase(cenv, apinfo, ty, n, None, item) :> _ + + | Item.ArgName(id, ty, _) -> + FSharpParameter(cenv, ty, {Attribs=[]; Name=Some id}, Some id.idRange, isParamArrayArg=false, isInArg=false, isOutArg=false, isOptionalArg=false) :> _ + + // TODO: the following don't currently return any interesting subtype + | Item.ImplicitOp _ + | Item.ILField _ + | Item.FakeInterfaceCtor _ + | Item.NewDef _ -> dflt() + // These cases cover unreachable cases + | Item.CustomOperation (_, _, None) + | Item.UnqualifiedType [] + | Item.ModuleOrNamespaces [] + | Item.Property (_, []) + | Item.MethodGroup (_, [], _) + | Item.CtorGroup (_, []) + // These cases cover misc. corned cases (non-symbol types) + | Item.Types _ + | Item.DelegateCtor _ -> dflt() -and FSharpEntity(cenv:cenv, entity:EntityRef) = + static member GetAccessibility (symbol: FSharpSymbol) = + match symbol with + | :? FSharpEntity as x -> Some x.Accessibility + | :? FSharpField as x -> Some x.Accessibility + | :? FSharpUnionCase as x -> Some x.Accessibility + | :? FSharpMemberFunctionOrValue as x -> Some x.Accessibility + | _ -> None + +and FSharpEntity(cenv: SymbolEnv, entity:EntityRef) = inherit FSharpSymbol(cenv, (fun () -> checkEntityIsResolved(entity); @@ -276,6 +362,21 @@ and FSharpEntity(cenv:cenv, entity:EntityRef) = | Some (CompPath(_, [])) -> "global" | Some cp -> buildAccessPath (Some cp) + member x.DeclaringEntity = + match entity.CompilationPathOpt with + | None -> None + | Some (CompPath(_, [])) -> None + | Some cp -> + match x.Assembly.Contents.FindEntityByPath cp.MangledPath with + | Some res -> Some res + | None -> + // The declaring entity may be in this assembly, including a type possibly hidden by a signature. + match cenv.thisCcuTy with + | Some t -> + let s = FSharpAssemblySignature(cenv, None, None, t) + s.FindEntityByPath cp.MangledPath + | None -> None + member __.Namespace = checkIsResolved() match entity.CompilationPathOpt with @@ -369,12 +470,12 @@ and FSharpEntity(cenv:cenv, entity:EntityRef) = #if !NO_EXTENSIONTYPING | ProvidedTypeMetadata info -> info.IsClass #endif - | ILTypeMetadata (TILObjectReprData(_, _, td)) -> (td.tdKind = ILTypeDefKind.Class) + | ILTypeMetadata (TILObjectReprData(_, _, td)) -> td.IsClass | FSharpOrArrayOrByrefOrTupleOrExnTypeMetadata -> entity.Deref.IsFSharpClassTycon member __.IsByRef = isResolved() && - tyconRefEq cenv.g cenv.g.byref_tcr entity + isByrefTyconRef cenv.g entity member __.IsOpaque = isResolved() && @@ -390,7 +491,7 @@ and FSharpEntity(cenv:cenv, entity:EntityRef) = #if !NO_EXTENSIONTYPING | ProvidedTypeMetadata info -> info.IsDelegate () #endif - | ILTypeMetadata (TILObjectReprData(_, _, td)) -> (td.tdKind = ILTypeDefKind.Delegate) + | ILTypeMetadata (TILObjectReprData(_, _, td)) -> td.IsDelegate | FSharpOrArrayOrByrefOrTupleOrExnTypeMetadata -> entity.IsFSharpDelegateTycon member __.IsEnum = @@ -430,7 +531,6 @@ and FSharpEntity(cenv:cenv, entity:EntityRef) = member __.Accessibility = if isUnresolved() then FSharpAccessibility(taccessPublic) else - FSharpAccessibility(getApproxFSharpAccessibilityOfEntity entity) member __.RepresentationAccessibility = @@ -473,7 +573,9 @@ and FSharpEntity(cenv:cenv, entity:EntityRef) = not (isResolvedAndFSharp()) || entity.Deref.IsPrefixDisplay member x.IsNamespace = entity.IsNamespace + member x.MembersOrValues = x.MembersFunctionsAndValues + member x.MembersFunctionsAndValues = if isUnresolved() then makeReadOnlyCollection[] else protect <| fun () -> @@ -492,7 +594,7 @@ and FSharpEntity(cenv:cenv, entity:EntityRef) = else for minfo in GetImmediateIntrinsicMethInfosOfType (None, AccessibleFromSomeFSharpCode) cenv.g cenv.amap range0 entityTy do yield createMember minfo - let props = GetImmediateIntrinsicPropInfosOfType (None, AccessibleFromSomeFSharpCode) cenv.g cenv.amap range0 entityTy + let props = GetImmediateIntrinsicPropInfosOfType (None, AccessibleFromSomeFSharpCode) cenv.g cenv.amap range0 entityTy let events = cenv.infoReader.GetImmediateIntrinsicEventsOfType (None, AccessibleFromSomeFSharpCode, range0, entityTy) for pinfo in props do yield FSharpMemberOrFunctionOrValue(cenv, P pinfo, Item.Property (pinfo.PropertyName, [pinfo])) @@ -506,7 +608,7 @@ and FSharpEntity(cenv:cenv, entity:EntityRef) = // For F#-declared extension members, yield a value-backed member and a property info if possible let vref = mkNestedValRef entity v yield FSharpMemberOrFunctionOrValue(cenv, V vref, Item.Value vref) - match v.MemberInfo.Value.MemberFlags.MemberKind, v.ApparentParent with + match v.MemberInfo.Value.MemberFlags.MemberKind, v.ApparentEnclosingEntity with | MemberKind.PropertyGet, Parent p -> let pinfo = FSProp(cenv.g, generalizedTyconRef p, Some vref, None) yield FSharpMemberOrFunctionOrValue(cenv, P pinfo, Item.Property (pinfo.PropertyName, [pinfo])) @@ -555,6 +657,7 @@ and FSharpEntity(cenv:cenv, entity:EntityRef) = |> makeReadOnlyCollection member x.RecordFields = x.FSharpFields + member x.FSharpFields = if isUnresolved() then makeReadOnlyCollection[] else @@ -566,7 +669,7 @@ and FSharpEntity(cenv:cenv, entity:EntityRef) = let formalTypeInfo = ILTypeInfo.FromType cenv.g ty tdef.Fields.AsList |> List.map (fun tdef -> let ilFieldInfo = ILFieldInfo(formalTypeInfo, tdef) - FSharpField(cenv, FSharpFieldData.ILField(cenv.g, ilFieldInfo) )) + FSharpField(cenv, FSharpFieldData.ILField(ilFieldInfo) )) |> makeReadOnlyCollection else @@ -601,7 +704,7 @@ and FSharpEntity(cenv:cenv, entity:EntityRef) = | [] -> [[path]] | _ -> paths |> List.map (fun x -> path :: x) - let walkParts (parts: (string * ModuleOrNamespaceKind) list) = //: string list list = + let walkParts (parts: (string * ModuleOrNamespaceKind) list) = let rec loop (currentPaths: string list list) parts = match parts with | [] -> currentPaths @@ -651,10 +754,10 @@ and FSharpUnionCase(cenv, v: UnionCaseRef) = let isUnresolved() = - entityIsUnresolved v.TyconRef || v.TryUnionCase.IsNone + entityIsUnresolved v.TyconRef || ValueOption.isNone v.TryUnionCase let checkIsResolved() = checkEntityIsResolved v.TyconRef - if v.TryUnionCase.IsNone then + if ValueOption.isNone v.TryUnionCase then invalidOp (sprintf "The union case '%s' could not be found in the target type" v.CaseName) member __.IsUnresolved = @@ -712,21 +815,23 @@ and FSharpUnionCase(cenv, v: UnionCaseRef) = and FSharpFieldData = - | ILField of TcGlobals * ILFieldInfo + | ILField of ILFieldInfo | RecdOrClass of RecdFieldRef | Union of UnionCaseRef * int + member x.TryRecdField = match x with | RecdOrClass v -> v.RecdField |> Choice1Of2 | Union (v, n) -> v.FieldByIndex(n) |> Choice1Of2 - | ILField (_, f) -> f |> Choice2Of2 + | ILField f -> f |> Choice2Of2 + member x.DeclaringTyconRef = match x with | RecdOrClass v -> v.TyconRef | Union (v, _) -> v.TyconRef - | ILField (g, f) -> tcrefOfAppTy g f.EnclosingType + | ILField f -> f.DeclaringTyconRef -and FSharpField(cenv: cenv, d: FSharpFieldData) = +and FSharpField(cenv: SymbolEnv, d: FSharpFieldData) = inherit FSharpSymbol (cenv, (fun () -> match d with @@ -736,8 +841,8 @@ and FSharpField(cenv: cenv, d: FSharpFieldData) = | Union (v, _) -> // This is not correct: there is no "Item" for a named union case field Item.UnionCase(UnionCaseInfo(generalizeTypars v.TyconRef.TyparsNoRange, v), false) - | ILField (_, f) -> - Item.ILField(f)), + | ILField f -> + Item.ILField f), (fun this thisCcu2 ad -> checkForCrossProjectAccessibility (thisCcu2, ad) (cenv.thisCcu, (this :?> FSharpField).Accessibility.Contents)) //&& @@ -749,22 +854,23 @@ and FSharpField(cenv: cenv, d: FSharpFieldData) = let isUnresolved() = entityIsUnresolved d.DeclaringTyconRef || match d with - | RecdOrClass v -> v.TryRecdField.IsNone - | Union (v, _) -> v.TryUnionCase.IsNone + | RecdOrClass v -> ValueOption.isNone v.TryRecdField + | Union (v, _) -> ValueOption.isNone v.TryUnionCase | ILField _ -> false let checkIsResolved() = checkEntityIsResolved d.DeclaringTyconRef match d with | RecdOrClass v -> - if v.TryRecdField.IsNone then + if ValueOption.isNone v.TryRecdField then invalidOp (sprintf "The record field '%s' could not be found in the target type" v.FieldName) | Union (v, _) -> - if v.TryUnionCase.IsNone then + if ValueOption.isNone v.TryUnionCase then invalidOp (sprintf "The union case '%s' could not be found in the target type" v.CaseName) | ILField _ -> () new (cenv, ucref, n) = FSharpField(cenv, FSharpFieldData.Union(ucref, n)) + new (cenv, rfref) = FSharpField(cenv, FSharpFieldData.RecdOrClass(rfref)) member __.DeclaringEntity = @@ -813,7 +919,7 @@ and FSharpField(cenv: cenv, d: FSharpFieldData) = | Union (v, _) -> let unionCase = UnionCaseInfo(generalizeTypars v.TyconRef.TyparsNoRange, v) SymbolHelpers.GetXmlDocSigOfUnionCaseInfo unionCase - | ILField (_, f) -> + | ILField f -> SymbolHelpers.GetXmlDocSigOfILFieldInfo cenv.infoReader range0 f match xmlsig with | Some (_, docsig) -> docsig @@ -852,6 +958,12 @@ and FSharpField(cenv: cenv, d: FSharpFieldData) = | Choice1Of2 r -> r.IsCompilerGenerated | Choice2Of2 _ -> false + member __.IsNameGenerated = + if isUnresolved() then false else + match d.TryRecdField with + | Choice1Of2 r -> r.rfield_name_generated + | _ -> false + member __.DeclarationLocation = checkIsResolved() match d.TryRecdField with @@ -881,6 +993,7 @@ and FSharpField(cenv: cenv, d: FSharpFieldData) = FSharpAccessibility(access) member private x.V = d + override x.Equals(other: obj) = box x === other || match other with @@ -892,16 +1005,17 @@ and FSharpField(cenv: cenv, d: FSharpFieldData) = | _ -> false override x.GetHashCode() = hash x.Name + override x.ToString() = "field " + x.Name and [] FSharpRecordField = FSharpField and [] FSharpAccessibilityRights(thisCcu: CcuThunk, ad:AccessorDomain) = member internal __.ThisCcu = thisCcu - member internal __.Contents = ad + member internal __.Contents = ad -and FSharpActivePatternCase(cenv, apinfo: PrettyNaming.ActivePatternInfo, typ, n, valOpt: ValRef option, item) = +and FSharpActivePatternCase(cenv, apinfo: PrettyNaming.ActivePatternInfo, ty, n, valOpt: ValRef option, item) = inherit FSharpSymbol (cenv, (fun () -> item), @@ -909,9 +1023,11 @@ and FSharpActivePatternCase(cenv, apinfo: PrettyNaming.ActivePatternInfo, typ, n member __.Name = apinfo.ActiveTags.[n] + member __.Index = n + member __.DeclarationLocation = snd apinfo.ActiveTagsWithRanges.[n] - member __.Group = FSharpActivePatternGroup(cenv, apinfo, typ, valOpt) + member __.Group = FSharpActivePatternGroup(cenv, apinfo, ty, valOpt) member __.XmlDoc = defaultArg (valOpt |> Option.map (fun vref -> vref.XmlDoc)) XmlDoc.Empty @@ -926,18 +1042,20 @@ and FSharpActivePatternCase(cenv, apinfo: PrettyNaming.ActivePatternInfo, typ, n | Some (_, docsig) -> docsig | _ -> "" -and FSharpActivePatternGroup(cenv, apinfo:PrettyNaming.ActivePatternInfo, typ, valOpt) = - +and FSharpActivePatternGroup(cenv, apinfo:PrettyNaming.ActivePatternInfo, ty, valOpt) = + + member __.Name = valOpt |> Option.map (fun vref -> vref.LogicalName) + member __.Names = makeReadOnlyCollection apinfo.Names member __.IsTotal = apinfo.IsTotal - member __.OverallType = FSharpType(cenv, typ) + member __.OverallType = FSharpType(cenv, ty) - member __.EnclosingEntity = + member __.DeclaringEntity = valOpt |> Option.bind (fun vref -> - match vref.ActualParent with + match vref.DeclaringEntity with | ParentNone -> None | Parent p -> Some (FSharpEntity(cenv, p))) @@ -946,13 +1064,18 @@ and FSharpGenericParameter(cenv, v:Typar) = inherit FSharpSymbol (cenv, (fun () -> Item.TypeVar(v.Name, v)), (fun _ _ _ad -> true)) + member __.Name = v.DisplayName + member __.DeclarationLocation = v.Range + member __.IsCompilerGenerated = v.IsCompilerGenerated member __.IsMeasure = (v.Kind = TyparKind.Measure) - member __.XmlDoc = v.typar_xmldoc |> makeXmlDoc + member __.XmlDoc = v.XmlDoc |> makeXmlDoc + member __.IsSolveAtCompileTime = (v.StaticReq = TyparStaticReq.HeadTypeStaticReq) + member __.Attributes = // INCOMPLETENESS: If the type parameter comes from .NET then the .NET metadata for the type parameter // has been lost (it is not accessible via Typar). So we can't easily report the attributes in this @@ -1054,8 +1177,8 @@ and FSharpGenericParameterMemberConstraint(cenv, info: TraitConstraintInfo) = override x.ToString() = "" -and FSharpGenericParameterDelegateConstraint(cenv, tupledArgTyp: TType, rty: TType) = - member __.DelegateTupledArgumentType = FSharpType(cenv, tupledArgTyp) +and FSharpGenericParameterDelegateConstraint(cenv, tupledArgTy: TType, rty: TType) = + member __.DelegateTupledArgumentType = FSharpType(cenv, tupledArgTy) member __.DelegateReturnType = FSharpType(cenv, rty) override x.ToString() = "" @@ -1208,7 +1331,7 @@ and FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) = let isUnresolved() = match fsharpInfo() with | None -> false - | Some v -> v.TryDeref.IsNone + | Some v -> ValueOption.isNone v.TryDeref let checkIsResolved() = if isUnresolved() then @@ -1255,14 +1378,25 @@ and FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) = | Some v -> v | None -> failwith "DeclarationLocation property not available" - member __.LogicalEnclosingEntity = + member __.DeclaringEntity = + checkIsResolved() + match d with + | E e -> FSharpEntity(cenv, e.DeclaringTyconRef) |> Some + | P p -> FSharpEntity(cenv, p.DeclaringTyconRef) |> Some + | M m | C m -> FSharpEntity(cenv, m.DeclaringTyconRef) |> Some + | V v -> + match v.DeclaringEntity with + | ParentNone -> None + | Parent p -> FSharpEntity(cenv, p) |> Some + + member __.ApparentEnclosingEntity = checkIsResolved() match d with - | E m -> FSharpEntity(cenv, tcrefOfAppTy cenv.g m.EnclosingType) - | P m -> FSharpEntity(cenv, tcrefOfAppTy cenv.g m.EnclosingType) - | M m | C m -> FSharpEntity(cenv, tcrefOfAppTy cenv.g m.EnclosingType) + | E e -> FSharpEntity(cenv, e.ApparentEnclosingTyconRef) + | P p -> FSharpEntity(cenv, p.ApparentEnclosingTyconRef) + | M m | C m -> FSharpEntity(cenv, m.ApparentEnclosingTyconRef) | V v -> - match v.ApparentParent with + match v.ApparentEnclosingEntity with | ParentNone -> invalidOp "the value or member doesn't have a logical parent" | Parent p -> FSharpEntity(cenv, p) @@ -1293,7 +1427,7 @@ and FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) = if isUnresolved() then false else match d with - | P m -> m.HasGetter + | P p -> p.HasGetter | E _ | M _ | C _ @@ -1302,19 +1436,35 @@ and FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) = member __.GetterMethod = checkIsResolved() match d with - | P m -> mkMethSym m.GetterMethod + | P p -> mkMethSym p.GetterMethod | E _ | M _ | C _ | V _ -> invalidOp "the value or member doesn't have an associated getter method" + member __.HasSetterMethod = + if isUnresolved() then false + else + match d with + | P p -> p.HasSetter + | E _ + | M _ + | C _ + | V _ -> false + + member __.SetterMethod = + checkIsResolved() + match d with + | P p -> mkMethSym p.SetterMethod + | E _ | M _ | C _ | V _ -> invalidOp "the value or member doesn't have an associated setter method" + member __.EventAddMethod = checkIsResolved() match d with - | E e -> mkMethSym (e.GetAddMethod()) + | E e -> mkMethSym e.AddMethod | P _ | M _ | C _ | V _ -> invalidOp "the value or member doesn't have an associated add method" member __.EventRemoveMethod = checkIsResolved() match d with - | E e -> mkMethSym (e.GetRemoveMethod()) + | E e -> mkMethSym e.RemoveMethod | P _ | M _ | C _ | V _ -> invalidOp "the value or member doesn't have an associated remove method" member __.EventDelegateType = @@ -1328,36 +1478,9 @@ and FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) = match d with | E e -> let dty = e.GetDelegateType(cenv.amap, range0) - TryDestStandardDelegateTyp cenv.infoReader range0 AccessibleFromSomewhere dty |> Option.isSome + TryDestStandardDelegateType cenv.infoReader range0 AccessibleFromSomewhere dty |> Option.isSome | P _ | M _ | C _ | V _ -> invalidOp "the value or member is not an event" - member __.HasSetterMethod = - if isUnresolved() then false - else - match d with - | P m -> m.HasSetter - | E _ - | M _ - | C _ - | V _ -> false - - member __.SetterMethod = - checkIsResolved() - match d with - | P m -> mkMethSym m.SetterMethod - | E _ | M _ | C _ | V _ -> invalidOp "the value or member doesn't have an associated setter method" - - member __.EnclosingEntity = - checkIsResolved() - match d with - | E m -> FSharpEntity(cenv, tcrefOfAppTy cenv.g m.EnclosingType) |> Some - | P m -> FSharpEntity(cenv, tcrefOfAppTy cenv.g m.EnclosingType) |> Some - | M m | C m -> FSharpEntity(cenv, m.DeclaringEntityRef) |> Some - | V v -> - match v.ActualParent with - | ParentNone -> None - | Parent p -> FSharpEntity(cenv, p) |> Some - member __.IsCompilerGenerated = if isUnresolved() then false else match fsharpInfo() with @@ -1397,7 +1520,7 @@ and FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) = member __.IsDispatchSlot = if isUnresolved() then false else match d with - | E e -> e.GetAddMethod().IsDispatchSlot + | E e -> e.AddMethod.IsDispatchSlot | P p -> p.IsDispatchSlot | M m | C m -> m.IsDispatchSlot | V v -> v.IsDispatchSlot @@ -1415,8 +1538,8 @@ and FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) = member x.EventForFSharpProperty = match d with | P p when p.IsFSharpEventProperty -> - let minfos1 = GetImmediateIntrinsicMethInfosOfType (Some("add_"+p.PropertyName), AccessibleFromSomeFSharpCode) cenv.g cenv.amap range0 p.EnclosingType - let minfos2 = GetImmediateIntrinsicMethInfosOfType (Some("remove_"+p.PropertyName), AccessibleFromSomeFSharpCode) cenv.g cenv.amap range0 p.EnclosingType + let minfos1 = GetImmediateIntrinsicMethInfosOfType (Some("add_"+p.PropertyName), AccessibleFromSomeFSharpCode) cenv.g cenv.amap range0 p.ApparentEnclosingType + let minfos2 = GetImmediateIntrinsicMethInfosOfType (Some("remove_"+p.PropertyName), AccessibleFromSomeFSharpCode) cenv.g cenv.amap range0 p.ApparentEnclosingType match minfos1, minfos2 with | [addMeth], [removeMeth] -> match addMeth.ArbitraryValRef, removeMeth.ArbitraryValRef with @@ -1428,11 +1551,12 @@ and FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) = member __.IsEventAddMethod = if isUnresolved() then false else match d with - | M m when m.LogicalName.StartsWith("add_") -> + | M m when m.LogicalName.StartsWithOrdinal("add_") -> let eventName = m.LogicalName.[4..] - let entityTy = generalizedTyconRef m.DeclaringEntityRef + let entityTy = generalizedTyconRef m.DeclaringTyconRef not (isNil (cenv.infoReader.GetImmediateIntrinsicEventsOfType (Some eventName, AccessibleFromSomeFSharpCode, range0, entityTy))) || - match GetImmediateIntrinsicPropInfosOfType(Some eventName, AccessibleFromSomeFSharpCode) cenv.g cenv.amap range0 (generalizedTyconRef m.DeclaringEntityRef) with + let declaringTy = generalizedTyconRef m.DeclaringTyconRef + match GetImmediateIntrinsicPropInfosOfType (Some eventName, AccessibleFromSomeFSharpCode) cenv.g cenv.amap range0 declaringTy with | pinfo :: _ -> pinfo.IsFSharpEventProperty | _ -> false @@ -1441,11 +1565,12 @@ and FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) = member __.IsEventRemoveMethod = if isUnresolved() then false else match d with - | M m when m.LogicalName.StartsWith("remove_") -> + | M m when m.LogicalName.StartsWithOrdinal("remove_") -> let eventName = m.LogicalName.[7..] - let entityTy = generalizedTyconRef m.DeclaringEntityRef + let entityTy = generalizedTyconRef m.DeclaringTyconRef not (isNil (cenv.infoReader.GetImmediateIntrinsicEventsOfType (Some eventName, AccessibleFromSomeFSharpCode, range0, entityTy))) || - match GetImmediateIntrinsicPropInfosOfType(Some eventName, AccessibleFromSomeFSharpCode) cenv.g cenv.amap range0 (generalizedTyconRef m.DeclaringEntityRef) with + let declaringTy = generalizedTyconRef m.DeclaringTyconRef + match GetImmediateIntrinsicPropInfosOfType (Some eventName, AccessibleFromSomeFSharpCode) cenv.g cenv.amap range0 declaringTy with | pinfo :: _ -> pinfo.IsFSharpEventProperty | _ -> false | _ -> false @@ -1467,9 +1592,10 @@ and FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) = member __.IsPropertyGetterMethod = if isUnresolved() then false else match d with - | M m when m.LogicalName.StartsWith("get_") -> + | M m when m.LogicalName.StartsWithOrdinal("get_") -> let propName = PrettyNaming.ChopPropertyName(m.LogicalName) - not (isNil (GetImmediateIntrinsicPropInfosOfType(Some propName, AccessibleFromSomeFSharpCode) cenv.g cenv.amap range0 (generalizedTyconRef m.DeclaringEntityRef))) + let declaringTy = generalizedTyconRef m.DeclaringTyconRef + not (isNil (GetImmediateIntrinsicPropInfosOfType (Some propName, AccessibleFromSomeFSharpCode) cenv.g cenv.amap range0 declaringTy)) | V v -> v.IsPropertyGetterMethod | _ -> false @@ -1477,9 +1603,10 @@ and FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) = if isUnresolved() then false else match d with // Look for a matching property with the right name. - | M m when m.LogicalName.StartsWith("set_") -> + | M m when m.LogicalName.StartsWithOrdinal("set_") -> let propName = PrettyNaming.ChopPropertyName(m.LogicalName) - not (isNil (GetImmediateIntrinsicPropInfosOfType(Some propName, AccessibleFromSomeFSharpCode) cenv.g cenv.amap range0 (generalizedTyconRef m.DeclaringEntityRef))) + let declaringTy = generalizedTyconRef m.DeclaringTyconRef + not (isNil (GetImmediateIntrinsicPropInfosOfType (Some propName, AccessibleFromSomeFSharpCode) cenv.g cenv.amap range0 declaringTy)) | V v -> v.IsPropertySetterMethod | _ -> false @@ -1491,9 +1618,9 @@ and FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) = | M m | C m -> m.IsInstance | V v -> v.IsInstanceMember - member v.IsInstanceMemberInCompiledCode = + member x.IsInstanceMemberInCompiledCode = if isUnresolved() then false else - v.IsInstanceMember && + x.IsInstanceMember && match d with | E e -> match e.ArbitraryValRef with Some vref -> ValRefIsCompiledAsInstanceMember cenv.g vref | None -> true | P p -> match p.ArbitraryValRef with Some vref -> ValRefIsCompiledAsInstanceMember cenv.g vref | None -> true @@ -1503,17 +1630,18 @@ and FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) = member __.IsExtensionMember = if isUnresolved() then false else match d with - | E e -> e.GetAddMethod().IsExtensionMember + | E e -> e.AddMethod.IsExtensionMember | P p -> p.IsExtensionMember | M m -> m.IsExtensionMember | V v -> v.IsExtensionMember | C _ -> false - member this.IsOverrideOrExplicitMember = this.IsOverrideOrExplicitInterfaceImplementation + member x.IsOverrideOrExplicitMember = x.IsOverrideOrExplicitInterfaceImplementation + member __.IsOverrideOrExplicitInterfaceImplementation = if isUnresolved() then false else match d with - | E e -> e.GetAddMethod().IsDefiniteFSharpOverride + | E e -> e.AddMethod.IsDefiniteFSharpOverride | P p -> p.IsDefiniteFSharpOverride | M m -> m.IsDefiniteFSharpOverride | V v -> @@ -1523,7 +1651,7 @@ and FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) = member __.IsExplicitInterfaceImplementation = if isUnresolved() then false else match d with - | E e -> e.GetAddMethod().IsFSharpExplicitInterfaceImplementation + | E e -> e.AddMethod.IsFSharpExplicitInterfaceImplementation | P p -> p.IsFSharpExplicitInterfaceImplementation | M m -> m.IsFSharpExplicitInterfaceImplementation | V v -> v.IsFSharpExplicitInterfaceImplementation cenv.g @@ -1533,7 +1661,7 @@ and FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) = checkIsResolved() let sigs = match d with - | E e -> e.GetAddMethod().ImplementedSlotSignatures + | E e -> e.AddMethod.ImplementedSlotSignatures | P p -> p.ImplementedSlotSignatures | M m | C m -> m.ImplementedSlotSignatures | V v -> v.ImplementedSlotSignatures @@ -1600,7 +1728,7 @@ and FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) = | Some (_, docsig) -> docsig | _ -> "" | V v -> - match v.ActualParent with + match v.DeclaringEntity with | Parent entityRef -> match SymbolHelpers.GetXmlDocSigOfScopedValRef cenv.g entityRef v with | Some (_, docsig) -> docsig @@ -1620,11 +1748,11 @@ and FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) = match d with | P p -> - [ [ for (ParamData(isParamArrayArg, isOutArg, optArgInfo, _callerInfoInfo, nmOpt, _reflArgInfo, pty)) in p.GetParamDatas(cenv.amap, range0) do + [ [ for (ParamData(isParamArrayArg, isInArg, isOutArg, optArgInfo, _callerInfo, nmOpt, _reflArgInfo, pty)) in p.GetParamDatas(cenv.amap, range0) do // INCOMPLETENESS: Attribs is empty here, so we can't look at attributes for // either .NET or F# parameters let argInfo: ArgReprInfo = { Name=nmOpt; Attribs= [] } - yield FSharpParameter(cenv, pty, argInfo, x.DeclarationLocationOpt, isParamArrayArg, isOutArg, optArgInfo.IsOptional) ] + yield FSharpParameter(cenv, pty, argInfo, x.DeclarationLocationOpt, isParamArrayArg, isInArg, isOutArg, optArgInfo.IsOptional) ] |> makeReadOnlyCollection ] |> makeReadOnlyCollection @@ -1632,11 +1760,11 @@ and FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) = | M m | C m -> [ for argtys in m.GetParamDatas(cenv.amap, range0, m.FormalMethodInst) do yield - [ for (ParamData(isParamArrayArg, isOutArg, optArgInfo, _callerInfoInfo, nmOpt, _reflArgInfo, pty)) in argtys do + [ for (ParamData(isParamArrayArg, isInArg, isOutArg, optArgInfo, _callerInfo, nmOpt, _reflArgInfo, pty)) in argtys do // INCOMPLETENESS: Attribs is empty here, so we can't look at attributes for // either .NET or F# parameters let argInfo: ArgReprInfo = { Name=nmOpt; Attribs= [] } - yield FSharpParameter(cenv, pty, argInfo, x.DeclarationLocationOpt, isParamArrayArg, isOutArg, optArgInfo.IsOptional) ] + yield FSharpParameter(cenv, pty, argInfo, x.DeclarationLocationOpt, isParamArrayArg, isInArg, isOutArg, optArgInfo.IsOptional) ] |> makeReadOnlyCollection ] |> makeReadOnlyCollection @@ -1646,14 +1774,14 @@ and FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) = let _, tau = v.TypeScheme if isFunTy cenv.g tau then let argtysl, _typ = stripFunTy cenv.g tau - [ for typ in argtysl do + [ for ty in argtysl do let allArguments = - if isRefTupleTy cenv.g typ - then tryDestRefTupleTy cenv.g typ - else [typ] + if isRefTupleTy cenv.g ty + then tryDestRefTupleTy cenv.g ty + else [ty] yield allArguments - |> List.map (fun arg -> FSharpParameter(cenv, arg, { Name=None; Attribs= [] }, x.DeclarationLocationOpt, false, false, false)) + |> List.map (fun arg -> FSharpParameter(cenv, arg, { Name=None; Attribs= [] }, x.DeclarationLocationOpt, false, false, false, false)) |> makeReadOnlyCollection ] |> makeReadOnlyCollection else makeReadOnlyCollection [] @@ -1665,9 +1793,10 @@ and FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) = yield [ for argty, argInfo in argtys do let isParamArrayArg = HasFSharpAttribute cenv.g cenv.g.attrib_ParamArrayAttribute argInfo.Attribs + let isInArg = HasFSharpAttribute cenv.g cenv.g.attrib_InAttribute argInfo.Attribs && isByrefTy cenv.g argty let isOutArg = HasFSharpAttribute cenv.g cenv.g.attrib_OutAttribute argInfo.Attribs && isByrefTy cenv.g argty let isOptionalArg = HasFSharpAttribute cenv.g cenv.g.attrib_OptionalArgumentAttribute argInfo.Attribs - yield FSharpParameter(cenv, argty, argInfo, x.DeclarationLocationOpt, isParamArrayArg, isOutArg, isOptionalArg) ] + yield FSharpParameter(cenv, argty, argInfo, x.DeclarationLocationOpt, isParamArrayArg, isInArg, isOutArg, isOptionalArg) ] |> makeReadOnlyCollection ] |> makeReadOnlyCollection @@ -1683,29 +1812,29 @@ and FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) = // For non-standard events, just use the delegate type as the ReturnParameter type e.GetDelegateType(cenv.amap, range0) - FSharpParameter(cenv, rty, retInfo, x.DeclarationLocationOpt, isParamArrayArg=false, isOutArg=false, isOptionalArg=false) + FSharpParameter(cenv, rty, retInfo, x.DeclarationLocationOpt, isParamArrayArg=false, isInArg=false, isOutArg=false, isOptionalArg=false) | P p -> // INCOMPLETENESS: Attribs is empty here, so we can't look at return attributes for .NET or F# methods let retInfo: ArgReprInfo = { Name=None; Attribs= [] } let rty = p.GetPropertyType(cenv.amap, range0) - FSharpParameter(cenv, rty, retInfo, x.DeclarationLocationOpt, isParamArrayArg=false, isOutArg=false, isOptionalArg=false) + FSharpParameter(cenv, rty, retInfo, x.DeclarationLocationOpt, isParamArrayArg=false, isInArg=false, isOutArg=false, isOptionalArg=false) | M m | C m -> // INCOMPLETENESS: Attribs is empty here, so we can't look at return attributes for .NET or F# methods let retInfo: ArgReprInfo = { Name=None; Attribs= [] } let rty = m.GetFSharpReturnTy(cenv.amap, range0, m.FormalMethodInst) - FSharpParameter(cenv, rty, retInfo, x.DeclarationLocationOpt, isParamArrayArg=false, isOutArg=false, isOptionalArg=false) + FSharpParameter(cenv, rty, retInfo, x.DeclarationLocationOpt, isParamArrayArg=false, isInArg=false, isOutArg=false, isOptionalArg=false) | V v -> match v.ValReprInfo with | None -> let _, tau = v.TypeScheme let _argtysl, rty = stripFunTy cenv.g tau let empty: ArgReprInfo = { Name=None; Attribs= [] } - FSharpParameter(cenv, rty, empty, x.DeclarationLocationOpt, isParamArrayArg=false, isOutArg=false, isOptionalArg=false) + FSharpParameter(cenv, rty, empty, x.DeclarationLocationOpt, isParamArrayArg=false, isInArg=false, isOutArg=false, isOptionalArg=false) | Some (ValReprInfo(_typars, argInfos, retInfo)) -> let tau = v.TauType let _c, rty = GetTopTauTypeInFSharpForm cenv.g argInfos tau range0 - FSharpParameter(cenv, rty, retInfo, x.DeclarationLocationOpt, isParamArrayArg=false, isOutArg=false, isOptionalArg=false) + FSharpParameter(cenv, rty, retInfo, x.DeclarationLocationOpt, isParamArrayArg=false, isInArg=false, isOutArg=false, isOptionalArg=false) member __.Attributes = @@ -1763,9 +1892,9 @@ and FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) = // For IL events, we get an approximate accessiblity that at least reports "internal" as "internal" and "private" as "private" let access = match e with - | ILEvent (_, x) -> - let ilAccess = AccessibilityLogic.GetILAccessOfILEventInfo x - getApproxFSharpAccessibilityOfMember this.EnclosingEntity.Value.Entity ilAccess + | ILEvent ileinfo -> + let ilAccess = AccessibilityLogic.GetILAccessOfILEventInfo ileinfo + getApproxFSharpAccessibilityOfMember this.DeclaringEntity.Value.Entity ilAccess | _ -> taccessPublic FSharpAccessibility(access) @@ -1774,9 +1903,9 @@ and FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) = // For IL properties, we get an approximate accessiblity that at least reports "internal" as "internal" and "private" as "private" let access = match p with - | ILProp (_, x) -> - let ilAccess = AccessibilityLogic.GetILAccessOfILPropInfo x - getApproxFSharpAccessibilityOfMember this.EnclosingEntity.Value.Entity ilAccess + | ILProp ilpinfo -> + let ilAccess = AccessibilityLogic.GetILAccessOfILPropInfo ilpinfo + getApproxFSharpAccessibilityOfMember this.DeclaringEntity.Value.Entity ilAccess | _ -> taccessPublic FSharpAccessibility(access) @@ -1806,6 +1935,11 @@ and FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) = | V valRef -> IlxGen.IsValCompiledAsMethod cenv.g valRef.Deref | _ -> false + member x.IsValue = + match d with + | V valRef -> not (SymbolHelpers.isFunction cenv.g valRef.Type) + | _ -> false + override x.Equals(other: obj) = box x === other || match other with @@ -1825,12 +1959,29 @@ and FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) = prefix + x.LogicalName with _ -> "??" - -and FSharpType(cenv, typ:TType) = + member x.FormatLayout (denv:FSharpDisplayContext) = + match x.IsMember, d with + | true, V v -> + NicePrint.prettyLayoutOfValOrMemberNoInst { (denv.Contents cenv.g) with showMemberContainers=true } v.Deref + | _,_ -> + checkIsResolved() + let ty = + match d with + | E e -> e.GetDelegateType(cenv.amap, range0) + | P p -> p.GetPropertyType(cenv.amap, range0) + | M m | C m -> + let rty = m.GetFSharpReturnTy(cenv.amap, range0, m.FormalMethodInst) + let argtysl = m.GetParamTypes(cenv.amap, range0, m.FormalMethodInst) + mkIteratedFunTy (List.map (mkRefTupledTy cenv.g) argtysl) rty + | V v -> v.TauType + NicePrint.prettyLayoutOfTypeNoCx (denv.Contents cenv.g) ty + + +and FSharpType(cenv, ty:TType) = let isUnresolved() = ErrorLogger.protectAssemblyExploration true <| fun () -> - match stripTyparEqns typ with + match stripTyparEqns ty with | TType_app (tcref, _) -> FSharpEntity(cenv, tcref).IsUnresolved | TType_measure (Measure.Con tcref) -> FSharpEntity(cenv, tcref).IsUnresolved | TType_measure (Measure.Prod _) -> FSharpEntity(cenv, cenv.g.measureproduct_tcr).IsUnresolved @@ -1840,28 +1991,28 @@ and FSharpType(cenv, typ:TType) = let isResolved() = not (isUnresolved()) - new (g, thisCcu, tcImports, typ) = FSharpType(cenv(g, thisCcu, tcImports), typ) + new (g, thisCcu, thisCcuTy, tcImports, ty) = FSharpType(SymbolEnv(g, thisCcu, Some thisCcuTy, tcImports), ty) member __.IsUnresolved = isUnresolved() member __.HasTypeDefinition = isResolved() && protect <| fun () -> - match stripTyparEqns typ with + match stripTyparEqns ty with | TType_app _ | TType_measure (Measure.Con _ | Measure.Prod _ | Measure.Inv _ | Measure.One _) -> true | _ -> false member __.IsTupleType = isResolved() && protect <| fun () -> - match stripTyparEqns typ with + match stripTyparEqns ty with | TType_tuple _ -> true | _ -> false member __.IsStructTupleType = isResolved() && protect <| fun () -> - match stripTyparEqns typ with + match stripTyparEqns ty with | TType_tuple (tupInfo, _) -> evalTupInfoIsStruct tupInfo | _ -> false @@ -1870,7 +2021,7 @@ and FSharpType(cenv, typ:TType) = member __.TypeDefinition = protect <| fun () -> - match stripTyparEqns typ with + match stripTyparEqns ty with | TType_app (tcref, _) -> FSharpEntity(cenv, tcref) | TType_measure (Measure.Con tcref) -> FSharpEntity(cenv, tcref) | TType_measure (Measure.Prod _) -> FSharpEntity(cenv, cenv.g.measureproduct_tcr) @@ -1880,7 +2031,7 @@ and FSharpType(cenv, typ:TType) = member __.GenericArguments = protect <| fun () -> - match stripTyparEqns typ with + match stripTyparEqns ty with | TType_app (_, tyargs) | TType_tuple (_, tyargs) -> (tyargs |> List.map (fun ty -> FSharpType(cenv, ty)) |> makeReadOnlyCollection) | TType_fun(d, r) -> [| FSharpType(cenv, d); FSharpType(cenv, r) |] |> makeReadOnlyCollection @@ -1899,29 +2050,29 @@ and FSharpType(cenv, typ:TType) = error(Error(FSComp.SR.etProvidedTypeReferenceInvalidText(piece), range0)) *) - member typ.IsAbbreviation = - isResolved() && typ.HasTypeDefinition && typ.TypeDefinition.IsFSharpAbbreviation + member ty.IsAbbreviation = + isResolved() && ty.HasTypeDefinition && ty.TypeDefinition.IsFSharpAbbreviation member __.AbbreviatedType = - protect <| fun () -> FSharpType(cenv, stripTyEqns cenv.g typ) + protect <| fun () -> FSharpType(cenv, stripTyEqns cenv.g ty) member __.IsFunctionType = isResolved() && protect <| fun () -> - match stripTyparEqns typ with + match stripTyparEqns ty with | TType_fun _ -> true | _ -> false member __.IsGenericParameter = protect <| fun () -> - match stripTyparEqns typ with + match stripTyparEqns ty with | TType_var _ -> true | TType_measure (Measure.Var _) -> true | _ -> false member __.GenericParameter = protect <| fun () -> - match stripTyparEqns typ with + match stripTyparEqns ty with | TType_var tp | TType_measure (Measure.Var tp) -> FSharpGenericParameter (cenv, tp) @@ -1929,36 +2080,36 @@ and FSharpType(cenv, typ:TType) = member x.AllInterfaces = if isUnresolved() then makeReadOnlyCollection [] else - [ for ty in AllInterfacesOfType cenv.g cenv.amap range0 AllowMultiIntfInstantiations.Yes typ do + [ for ty in AllInterfacesOfType cenv.g cenv.amap range0 AllowMultiIntfInstantiations.Yes ty do yield FSharpType(cenv, ty) ] |> makeReadOnlyCollection member x.BaseType = - GetSuperTypeOfType cenv.g cenv.amap range0 typ + GetSuperTypeOfType cenv.g cenv.amap range0 ty |> Option.map (fun ty -> FSharpType(cenv, ty)) member x.Instantiate(instantiation:(FSharpGenericParameter * FSharpType) list) = - let typI = instType (instantiation |> List.map (fun (tyv, typ) -> tyv.V, typ.V)) typ + let typI = instType (instantiation |> List.map (fun (tyv, ty) -> tyv.V, ty.V)) ty FSharpType(cenv, typI) - member private x.V = typ + member private x.V = ty member private x.cenv = cenv - member private typ.AdjustType(t) = - FSharpType(typ.cenv, t) + member private ty.AdjustType(t) = + FSharpType(ty.cenv, t) // Note: This equivalence relation is modulo type abbreviations override x.Equals(other: obj) = box x === other || match other with - | :? FSharpType as t -> typeEquiv cenv.g typ t.V + | :? FSharpType as t -> typeEquiv cenv.g ty t.V | _ -> false // Note: This equivalence relation is modulo type abbreviations. The hash is less than perfect. override x.GetHashCode() = - let rec hashType typ = - let typ = stripTyEqnsWrtErasure EraseNone cenv.g typ - match typ with + let rec hashType ty = + let ty = stripTyEqnsWrtErasure EraseNone cenv.g ty + match ty with | TType_forall _ -> 10000 | TType_var tp -> 10100 + int32 tp.Stamp | TType_app (tc1, b1) -> 10200 + int32 tc1.Stamp + List.sumBy hashType b1 @@ -1966,33 +2117,37 @@ and FSharpType(cenv, typ:TType) = | TType_tuple (_, l1) -> 10400 + List.sumBy hashType l1 | TType_fun (dty, rty) -> 10500 + hashType dty + hashType rty | TType_measure _ -> 10600 - hashType typ + hashType ty member x.Format(denv: FSharpDisplayContext) = protect <| fun () -> - NicePrint.prettyStringOfTyNoCx (denv.Contents cenv.g) typ + NicePrint.prettyStringOfTyNoCx (denv.Contents cenv.g) ty + + member x.FormatLayout(denv: FSharpDisplayContext) = + protect <| fun () -> + NicePrint.prettyLayoutOfTypeNoCx (denv.Contents cenv.g) ty override x.ToString() = protect <| fun () -> - "type " + NicePrint.prettyStringOfTyNoCx (DisplayEnv.Empty(cenv.g)) typ + "type " + NicePrint.prettyStringOfTyNoCx (DisplayEnv.Empty(cenv.g)) ty - static member Prettify(typ: FSharpType) = - let ty = PrettyTypes.PrettifyType typ.cenv.g typ.V |> fst - typ.AdjustType ty + static member Prettify(ty: FSharpType) = + let prettyTy = PrettyTypes.PrettifyType ty.cenv.g ty.V |> fst + ty.AdjustType prettyTy - static member Prettify(typs: IList) = - let xs = typs |> List.ofSeq + static member Prettify(tys: IList) = + let xs = tys |> List.ofSeq match xs with | [] -> [] | h :: _ -> let cenv = h.cenv - let prettyTyps = PrettyTypes.PrettifyTypes cenv.g [ for t in xs -> t.V ] |> fst - (xs, prettyTyps) ||> List.map2 (fun p pty -> p.AdjustType(pty)) + let prettyTys = PrettyTypes.PrettifyTypes cenv.g [ for t in xs -> t.V ] |> fst + (xs, prettyTys) ||> List.map2 (fun p pty -> p.AdjustType(pty)) |> makeReadOnlyCollection static member Prettify(parameter: FSharpParameter) = - let prettyTyp = parameter.V |> PrettyTypes.PrettifyType parameter.cenv.g |> fst - parameter.AdjustType(prettyTyp) + let prettyTy = parameter.V |> PrettyTypes.PrettifyType parameter.cenv.g |> fst + parameter.AdjustType(prettyTy) static member Prettify(parameters: IList) = let parameters = parameters |> List.ofSeq @@ -2000,8 +2155,8 @@ and FSharpType(cenv, typ:TType) = | [] -> [] | h :: _ -> let cenv = h.cenv - let prettyTyps = parameters |> List.map (fun p -> p.V) |> PrettyTypes.PrettifyTypes cenv.g |> fst - (parameters, prettyTyps) ||> List.map2 (fun p pty -> p.AdjustType(pty)) + let prettyTys = parameters |> List.map (fun p -> p.V) |> PrettyTypes.PrettifyTypes cenv.g |> fst + (parameters, prettyTys) ||> List.map2 (fun p pty -> p.AdjustType(pty)) |> makeReadOnlyCollection static member Prettify(parameters: IList>) = @@ -2011,18 +2166,18 @@ and FSharpType(cenv, typ:TType) = | None -> xs | Some h -> let cenv = h.cenv - let prettyTyps = xs |> List.mapSquared (fun p -> p.V) |> PrettyTypes.PrettifyCurriedTypes cenv.g |> fst - (xs, prettyTyps) ||> List.map2 (List.map2 (fun p pty -> p.AdjustType(pty))) + let prettyTys = xs |> List.mapSquared (fun p -> p.V) |> PrettyTypes.PrettifyCurriedTypes cenv.g |> fst + (xs, prettyTys) ||> List.map2 (List.map2 (fun p pty -> p.AdjustType(pty))) |> List.map makeReadOnlyCollection |> makeReadOnlyCollection static member Prettify(parameters: IList>, returnParameter: FSharpParameter) = let xs = parameters |> List.ofSeq |> List.map List.ofSeq let cenv = returnParameter.cenv - let prettyTyps, prettyRetTy = xs |> List.mapSquared (fun p -> p.V) |> (fun tys -> PrettyTypes.PrettifyCurriedSigTypes cenv.g (tys, returnParameter.V) )|> fst - let ps = (xs, prettyTyps) ||> List.map2 (List.map2 (fun p pty -> p.AdjustType(pty))) |> List.map makeReadOnlyCollection |> makeReadOnlyCollection + let prettyTys, prettyRetTy = xs |> List.mapSquared (fun p -> p.V) |> (fun tys -> PrettyTypes.PrettifyCurriedSigTypes cenv.g (tys, returnParameter.V) )|> fst + let ps = (xs, prettyTys) ||> List.map2 (List.map2 (fun p pty -> p.AdjustType(pty))) |> List.map makeReadOnlyCollection |> makeReadOnlyCollection ps, returnParameter.AdjustType(prettyRetTy) -and FSharpAttribute(cenv: cenv, attrib: AttribInfo) = +and FSharpAttribute(cenv: SymbolEnv, attrib: AttribInfo) = let rec resolveArgObj (arg: obj) = match arg with @@ -2052,7 +2207,7 @@ and FSharpAttribute(cenv: cenv, attrib: AttribInfo) = NicePrint.stringOfFSAttrib (denv.Contents g) attrib | AttribInfo.ILAttribInfo (g, _, _scoref, cattr, _) -> let parms, _args = decodeILAttribData g.ilg cattr - NicePrint.stringOfILAttrib (denv.Contents g) (cattr.Method.EnclosingType, parms) + NicePrint.stringOfILAttrib (denv.Contents g) (cattr.Method.DeclaringType, parms) override __.ToString() = if entityIsUnresolved attrib.TyconRef then "attribute ???" else "attribute " + attrib.TyconRef.CompiledName + "(...)" @@ -2074,8 +2229,8 @@ and FSharpStaticParameter(cenv, sp: Tainted< ExtensionTyping.ProvidedParameterIn member __.Kind = protect <| fun () -> - let typ = Import.ImportProvidedType cenv.amap m (sp.PApply((fun x -> x.ParameterType), m)) - FSharpType(cenv, typ) + let ty = Import.ImportProvidedType cenv.amap m (sp.PApply((fun x -> x.ParameterType), m)) + FSharpType(cenv, ty) member __.IsOptional = protect <| fun () -> sp.PUntaint((fun x -> x.IsOptional), m) @@ -2096,25 +2251,37 @@ and FSharpStaticParameter(cenv, sp: Tainted< ExtensionTyping.ProvidedParameterIn override x.ToString() = "static parameter " + x.Name #endif -and FSharpParameter(cenv, typ:TType, topArgInfo:ArgReprInfo, mOpt, isParamArrayArg, isOutArg, isOptionalArg) = +and FSharpParameter(cenv, paramTy:TType, topArgInfo:ArgReprInfo, mOpt, isParamArrayArg, isInArg, isOutArg, isOptionalArg) = inherit FSharpSymbol(cenv, (fun () -> let m = match mOpt with Some m -> m | None -> range0 - Item.ArgName((match topArgInfo.Name with None -> mkSynId m "" | Some v -> v), typ, None)), + Item.ArgName((match topArgInfo.Name with None -> mkSynId m "" | Some v -> v), paramTy, None)), (fun _ _ _ -> true)) let attribs = topArgInfo.Attribs let idOpt = topArgInfo.Name let m = match mOpt with Some m -> m | None -> range0 + member __.Name = match idOpt with None -> None | Some v -> Some v.idText - member __.cenv: cenv = cenv - member __.AdjustType(t) = FSharpParameter(cenv, t, topArgInfo, mOpt, isParamArrayArg, isOutArg, isOptionalArg) - member __.Type: FSharpType = FSharpType(cenv, typ) - member __.V = typ + + member __.cenv: SymbolEnv = cenv + + member __.AdjustType(t) = FSharpParameter(cenv, t, topArgInfo, mOpt, isParamArrayArg, isInArg, isOutArg, isOptionalArg) + + member __.Type: FSharpType = FSharpType(cenv, paramTy) + + member __.V = paramTy + member __.DeclarationLocation = match idOpt with None -> m | Some v -> v.idRange + member __.Attributes = attribs |> List.map (fun a -> FSharpAttribute(cenv, AttribInfo.FSAttribInfo(cenv.g, a))) |> makeReadOnlyCollection + member __.IsParamArrayArg = isParamArrayArg + + member __.IsInArg = isInArg + member __.IsOutArg = isOutArg + member __.IsOptionalArg = isOptionalArg member private x.ValReprInfo = topArgInfo @@ -2126,16 +2293,20 @@ and FSharpParameter(cenv, typ:TType, topArgInfo:ArgReprInfo, mOpt, isParamArrayA | _ -> false override x.GetHashCode() = hash (box topArgInfo) + override x.ToString() = "parameter " + (match x.Name with None -> " s) -and FSharpAssemblySignature private (cenv, topAttribs: TypeChecker.TopAttribs option, optViewedCcu: CcuThunk option, mtyp: ModuleOrNamespaceType) = +and FSharpAssemblySignature (cenv, topAttribs: TypeChecker.TopAttribs option, optViewedCcu: CcuThunk option, mtyp: ModuleOrNamespaceType) = // Assembly signature for a referenced/linked assembly - new (cenv, ccu: CcuThunk) = FSharpAssemblySignature((if ccu.IsUnresolvedReference then cenv else (new cenv(cenv.g, ccu, cenv.tcImports))), None, Some ccu, ccu.Contents.ModuleOrNamespaceType) + new (cenv: SymbolEnv, ccu: CcuThunk) = + let cenv = if ccu.IsUnresolvedReference then cenv else SymbolEnv(cenv.g, ccu, None, cenv.tcImports) + FSharpAssemblySignature(cenv, None, Some ccu, ccu.Contents.ModuleOrNamespaceType) // Assembly signature for an assembly produced via type-checking. - new (g, thisCcu, tcImports, topAttribs, mtyp) = FSharpAssemblySignature(cenv(g, thisCcu, tcImports), topAttribs, None, mtyp) + new (g, thisCcu, thisCcuTy, tcImports, topAttribs, mtyp) = + FSharpAssemblySignature(SymbolEnv(g, thisCcu, Some thisCcuTy, tcImports), topAttribs, None, mtyp) member __.Entities = @@ -2150,21 +2321,36 @@ and FSharpAssemblySignature private (cenv, topAttribs: TypeChecker.TopAttribs op loop mtyp |> makeReadOnlyCollection member __.Attributes = - match topAttribs with - | None -> makeReadOnlyCollection [] - | Some tA -> - tA.assemblyAttrs - |> List.map (fun a -> FSharpAttribute(cenv, AttribInfo.FSAttribInfo(cenv.g, a))) |> makeReadOnlyCollection + [ match optViewedCcu with + | Some ccu -> + match ccu.TryGetILModuleDef() with + | Some ilModule -> + match ilModule.Manifest with + | None -> () + | Some manifest -> + for a in AttribInfosOfIL cenv.g cenv.amap cenv.thisCcu.ILScopeRef range0 manifest.CustomAttrs do + yield FSharpAttribute(cenv, a) + | None -> + // If no module is available, then look in the CCU contents. + if ccu.IsFSharp then + for a in ccu.Contents.Attribs do + yield FSharpAttribute(cenv, FSAttribInfo (cenv.g, a)) + | None -> + match topAttribs with + | None -> () + | Some tA -> for a in tA.assemblyAttrs do yield FSharpAttribute(cenv, AttribInfo.FSAttribInfo(cenv.g, a)) ] + |> makeReadOnlyCollection member __.FindEntityByPath path = - let inline findNested name = function - | Some (e: Entity) when e.IsModuleOrNamespace -> - e.ModuleOrNamespaceType.AllEntitiesByCompiledAndLogicalMangledNames.TryFind name + let findNested name entity = + match entity with + | Some (e: Entity) ->e.ModuleOrNamespaceType.AllEntitiesByCompiledAndLogicalMangledNames.TryFind name | _ -> None match path with | hd :: tl -> - List.fold (fun a x -> findNested x a) (mtyp.AllEntitiesByCompiledAndLogicalMangledNames.TryFind hd) tl + (mtyp.AllEntitiesByCompiledAndLogicalMangledNames.TryFind hd, tl) + ||> List.fold (fun a x -> findNested x a) |> Option.map (fun e -> FSharpEntity(cenv, rescopeEntity optViewedCcu e)) | _ -> None @@ -2172,120 +2358,60 @@ and FSharpAssemblySignature private (cenv, topAttribs: TypeChecker.TopAttribs op and FSharpAssembly internal (cenv, ccu: CcuThunk) = - new (g, tcImports, ccu) = FSharpAssembly(cenv(g, ccu, tcImports), ccu) + new (g, tcImports, ccu: CcuThunk) = + FSharpAssembly(SymbolEnv(g, ccu, None, tcImports), ccu) member __.RawCcuThunk = ccu + member __.QualifiedName = match ccu.QualifiedName with None -> "" | Some s -> s + member __.CodeLocation = ccu.SourceCodeDirectory + member __.FileName = ccu.FileName + member __.SimpleName = ccu.AssemblyName - #if !NO_EXTENSIONTYPING - member __.IsProviderGenerated = ccu.IsProviderGenerated - #endif - member __.Contents = FSharpAssemblySignature(cenv, ccu) - - override x.ToString() = x.QualifiedName -type FSharpSymbol with - // TODO: there are several cases where we may need to report more interesting - // symbol information below. By default we return a vanilla symbol. - static member Create(g, thisCcu, tcImports, item): FSharpSymbol = - FSharpSymbol.Create (cenv(g, thisCcu, tcImports), item) +#if !NO_EXTENSIONTYPING + member __.IsProviderGenerated = ccu.IsProviderGenerated +#endif - static member Create(cenv, item): FSharpSymbol = - let dflt() = FSharpSymbol(cenv, (fun () -> item), (fun _ _ _ -> true)) - match item with - | Item.Value v -> FSharpMemberOrFunctionOrValue(cenv, V v, item) :> _ - | Item.UnionCase (uinfo, _) -> FSharpUnionCase(cenv, uinfo.UnionCaseRef) :> _ - | Item.ExnCase tcref -> FSharpEntity(cenv, tcref) :>_ - | Item.RecdField rfinfo -> FSharpField(cenv, RecdOrClass rfinfo.RecdFieldRef) :> _ + member __.Contents : FSharpAssemblySignature = FSharpAssemblySignature(cenv, ccu) + + override x.ToString() = ccu.ILScopeRef.QualifiedName - | Item.ILField finfo -> FSharpField(cenv, ILField (cenv.g, finfo)) :> _ - - | Item.Event einfo -> - FSharpMemberOrFunctionOrValue(cenv, E einfo, item) :> _ - - | Item.Property(_, pinfo :: _) -> - FSharpMemberOrFunctionOrValue(cenv, P pinfo, item) :> _ - - | Item.MethodGroup(_, minfo :: _, _) -> - FSharpMemberOrFunctionOrValue(cenv, M minfo, item) :> _ +/// Represents open declaration in F# code. +[] +type FSharpOpenDeclaration(longId: Ident list, range: range option, modules: FSharpEntity list, appliedScope: range, isOwnNamespace: bool) = - | Item.CtorGroup(_, cinfo :: _) -> - FSharpMemberOrFunctionOrValue(cenv, C cinfo, item) :> _ + member __.LongId = longId - | Item.DelegateCtor (AbbrevOrAppTy tcref) -> - FSharpEntity(cenv, tcref) :>_ + member __.Range = range - | Item.UnqualifiedType(tcref :: _) - | Item.Types(_, AbbrevOrAppTy tcref :: _) -> - FSharpEntity(cenv, tcref) :>_ + member __.Modules = modules - | Item.ModuleOrNamespaces(modref :: _) -> - FSharpEntity(cenv, modref) :> _ + member __.AppliedScope = appliedScope - | Item.SetterArg (_id, item) -> FSharpSymbol.Create(cenv, item) + member __.IsOwnNamespace = isOwnNamespace - | Item.CustomOperation (_customOpName, _, Some minfo) -> - FSharpMemberOrFunctionOrValue(cenv, M minfo, item) :> _ +[] +type FSharpSymbolUse(g:TcGlobals, denv: DisplayEnv, symbol:FSharpSymbol, itemOcc, range: range) = - | Item.CustomBuilder (_, vref) -> - FSharpMemberOrFunctionOrValue(cenv, V vref, item) :> _ + member __.Symbol = symbol - | Item.TypeVar (_, tp) -> - FSharpGenericParameter(cenv, tp) :> _ + member __.DisplayContext = FSharpDisplayContext(fun _ -> denv) - | Item.ActivePatternCase apref -> - FSharpActivePatternCase(cenv, apref.ActivePatternInfo, apref.ActivePatternVal.Type, apref.CaseIndex, Some apref.ActivePatternVal, item) :> _ + member x.IsDefinition = x.IsFromDefinition - | Item.ActivePatternResult (apinfo, typ, n, _) -> - FSharpActivePatternCase(cenv, apinfo, typ, n, None, item) :> _ + member __.IsFromDefinition = itemOcc = ItemOccurence.Binding - | Item.ArgName(id, ty, _) -> - FSharpParameter(cenv, ty, {Attribs=[]; Name=Some id}, Some id.idRange, isParamArrayArg=false, isOutArg=false, isOptionalArg=false) :> _ + member __.IsFromPattern = itemOcc = ItemOccurence.Pattern - // TODO: the following don't currently return any interesting subtype - | Item.ImplicitOp _ - | Item.ILField _ - | Item.FakeInterfaceCtor _ - | Item.NewDef _ -> dflt() - // These cases cover unreachable cases - | Item.CustomOperation (_, _, None) - | Item.UnqualifiedType [] - | Item.ModuleOrNamespaces [] - | Item.Property (_, []) - | Item.MethodGroup (_, [], _) - | Item.CtorGroup (_, []) - // These cases cover misc. corned cases (non-symbol types) - | Item.Types _ - | Item.DelegateCtor _ -> dflt() + member __.IsFromType = itemOcc = ItemOccurence.UseInType - static member GetAccessibility (symbol: FSharpSymbol) = - match symbol with - | :? FSharpEntity as x -> Some x.Accessibility - | :? FSharpField as x -> Some x.Accessibility - | :? FSharpUnionCase as x -> Some x.Accessibility - | :? FSharpMemberFunctionOrValue as x -> Some x.Accessibility - | _ -> None + member __.IsFromAttribute = itemOcc = ItemOccurence.UseInAttribute -/// Represents open declaration in F# code. -type FSharpOpenDeclaration = - { LongId: Ident list - Range: range option - Modules: FSharpEntity list - AppliedScope: range - IsOwnNamespace: bool } + member __.IsFromDispatchSlotImplementation = itemOcc = ItemOccurence.Implemented -[] -type FSharpSymbolUse(g:TcGlobals, denv: DisplayEnv, symbol:FSharpSymbol, itemOcc, range: range) = - member __.Symbol = symbol - member __.DisplayContext = FSharpDisplayContext(fun _ -> denv) - member x.IsDefinition = x.IsFromDefinition - member __.IsFromDefinition = (match itemOcc with ItemOccurence.Binding -> true | _ -> false) - member __.IsFromPattern = (match itemOcc with ItemOccurence.Pattern -> true | _ -> false) - member __.IsFromType = (match itemOcc with ItemOccurence.UseInType -> true | _ -> false) - member __.IsFromAttribute = (match itemOcc with ItemOccurence.UseInAttribute -> true | _ -> false) - member __.IsFromDispatchSlotImplementation = (match itemOcc with ItemOccurence.Implemented -> true | _ -> false) member __.IsFromComputationExpression = match symbol.Item, itemOcc with // 'seq' in 'seq { ... }' gets colored as keywords @@ -2294,7 +2420,12 @@ type FSharpSymbolUse(g:TcGlobals, denv: DisplayEnv, symbol:FSharpSymbol, itemOcc | (Item.CustomBuilder _ | Item.CustomOperation _), ItemOccurence.Use -> true | _ -> false + member __.IsFromOpenStatement = itemOcc = ItemOccurence.Open + member __.FileName = range.FileName + member __.Range = Range.toZ range + member __.RangeAlternate = range + override __.ToString() = sprintf "%O, %O, %O" symbol itemOcc range diff --git a/src/fsharp/symbols/Symbols.fsi b/src/fsharp/symbols/Symbols.fsi index 2cfd8a2f47e..7b7f565fdcf 100644 --- a/src/fsharp/symbols/Symbols.fsi +++ b/src/fsharp/symbols/Symbols.fsi @@ -6,6 +6,8 @@ open System.Collections.Generic open Microsoft.FSharp.Compiler open Microsoft.FSharp.Compiler.AccessibilityLogic open Microsoft.FSharp.Compiler.CompileOps +open Microsoft.FSharp.Compiler.Import +open Microsoft.FSharp.Compiler.InfoReader open Microsoft.FSharp.Compiler.Range open Microsoft.FSharp.Compiler.Ast open Microsoft.FSharp.Compiler.Tast @@ -13,18 +15,14 @@ open Microsoft.FSharp.Compiler.TcGlobals open Microsoft.FSharp.Compiler.NameResolution // Implementation details used by other code in the compiler -module internal Impl = - type internal cenv = - new : TcGlobals * thisCcu:CcuThunk * tcImports: TcImports -> cenv - member amap: Import.ImportMap - member g: TcGlobals +type internal SymbolEnv = + new: TcGlobals * thisCcu:CcuThunk * thisCcuTyp: ModuleOrNamespaceType option * tcImports: TcImports -> SymbolEnv + new: TcGlobals * thisCcu:CcuThunk * thisCcuTyp: ModuleOrNamespaceType option * tcImports: TcImports * amap: ImportMap * infoReader: InfoReader -> SymbolEnv + member amap: ImportMap + member g: TcGlobals /// Indicates the accessibility of a symbol, as seen by the F# language -#if COMPILER_PUBLIC_API -type FSharpAccessibility = -#else -type internal FSharpAccessibility = -#endif +type public FSharpAccessibility = internal new: Accessibility * ?isProtected: bool -> FSharpAccessibility /// Indicates the symbol has public accessibility @@ -45,11 +43,7 @@ type internal FSharpAccessibility = /// /// Acquired via GetDisplayEnvAtLocationAlternate and similar methods. May be passed /// to the Format method on FSharpType and other methods. -#if COMPILER_PUBLIC_API -type [] FSharpDisplayContext = -#else -type [] internal FSharpDisplayContext = -#endif +type [] public FSharpDisplayContext = internal new : denv: (TcGlobals -> Tastops.DisplayEnv) -> FSharpDisplayContext static member Empty: FSharpDisplayContext @@ -58,13 +52,9 @@ type [] internal FSharpDisplayContext = /// The subtype of the symbol may reveal further information and can be one of FSharpEntity, FSharpUnionCase /// FSharpField, FSharpGenericParameter, FSharpStaticParameter, FSharpMemberOrFunctionOrValue, FSharpParameter, /// or FSharpActivePatternCase. -#if COMPILER_PUBLIC_API -type [] FSharpSymbol = -#else -type [] internal FSharpSymbol = -#endif - /// Internal use only. - static member internal Create : g:TcGlobals * thisCcu: CcuThunk * tcImports: TcImports * item:NameResolution.Item -> FSharpSymbol +type [] public FSharpSymbol = + static member internal Create: g: TcGlobals * thisCcu: CcuThunk * thisCcuTyp: ModuleOrNamespaceType * tcImports: TcImports * item: NameResolution.Item -> FSharpSymbol + static member internal Create: cenv: SymbolEnv * item: NameResolution.Item -> FSharpSymbol /// Computes if the symbol is accessible for the given accessibility rights member IsAccessible: FSharpAccessibilityRights -> bool @@ -98,15 +88,16 @@ type [] internal FSharpSymbol = /// /// This is the relation used by GetUsesOfSymbol and GetUsesOfSymbolInFile. member IsEffectivelySameAs : other: FSharpSymbol -> bool + + /// A hash compatible with the IsEffectivelySameAs relation + member GetEffectivelySameAsHash : unit -> int + member IsExplicitlySuppressed : bool + static member GetAccessibility : FSharpSymbol -> FSharpAccessibility option /// Represents an assembly as seen by the F# language -#if COMPILER_PUBLIC_API -and [] FSharpAssembly = -#else -and [] internal FSharpAssembly = -#endif +and [] public FSharpAssembly = internal new : tcGlobals: TcGlobals * tcImports: TcImports * ccu: CcuThunk -> FSharpAssembly @@ -130,13 +121,9 @@ and [] internal FSharpAssembly = #endif /// Represents an inferred signature of part of an assembly as seen by the F# language -#if COMPILER_PUBLIC_API -and [] FSharpAssemblySignature = -#else -and [] internal FSharpAssemblySignature = -#endif +and [] public FSharpAssemblySignature = - internal new : tcGlobals: TcGlobals * thisCcu: CcuThunk * tcImports: TcImports * topAttribs: TypeChecker.TopAttribs option * contents: ModuleOrNamespaceType -> FSharpAssemblySignature + internal new : tcGlobals: TcGlobals * thisCcu: CcuThunk * thisCcuTyp: ModuleOrNamespaceType * tcImports: TcImports * topAttribs: TypeChecker.TopAttribs option * contents: ModuleOrNamespaceType -> FSharpAssemblySignature /// The (non-nested) module and type definitions in this signature member Entities: IList @@ -150,18 +137,14 @@ and [] internal FSharpAssemblySignature = /// A subtype of FSharpSymbol that represents a type definition or module as seen by the F# language -#if COMPILER_PUBLIC_API -and [] FSharpEntity = -#else -and [] internal FSharpEntity = -#endif +and [] public FSharpEntity = inherit FSharpSymbol - internal new : Impl.cenv * EntityRef -> FSharpEntity - - // /// Return the FSharpEntity corresponding to a .NET type - // static member FromType : System.Type -> FSharpEntity + internal new : SymbolEnv * EntityRef -> FSharpEntity + /// Get the enclosing entity for the definition + member DeclaringEntity : FSharpEntity option + /// Get the name of the type or module, possibly with `n mangling member LogicalName: string @@ -317,7 +300,6 @@ and [] internal FSharpEntity = /// Get the cases of a union type member UnionCases : IList - /// Indicates if the type is a delegate with the given Invoke signature member FSharpDelegateSignature : FSharpDelegateSignature @@ -334,11 +316,7 @@ and [] internal FSharpEntity = member ActivePatternCases : FSharpActivePatternCase list /// Represents a delegate signature in an F# symbol -#if COMPILER_PUBLIC_API -and [] FSharpDelegateSignature = -#else -and [] internal FSharpDelegateSignature = -#endif +and [] public FSharpDelegateSignature = /// Get the argument types of the delegate signature member DelegateArguments : IList @@ -346,11 +324,7 @@ and [] internal FSharpDelegateSignature = member DelegateReturnType : FSharpType /// Represents a parameter in an abstract method of a class or interface -#if COMPILER_PUBLIC_API -and [] FSharpAbstractParameter = -#else -and [] internal FSharpAbstractParameter = -#endif +and [] public FSharpAbstractParameter = /// The optional name of the parameter member Name : string option @@ -371,12 +345,8 @@ and [] internal FSharpAbstractParameter = member Attributes : IList /// Represents the signature of an abstract slot of a class or interface -#if COMPILER_PUBLIC_API -and [] FSharpAbstractSignature = -#else -and [] internal FSharpAbstractSignature = -#endif - internal new : Impl.cenv * SlotSig -> FSharpAbstractSignature +and [] public FSharpAbstractSignature = + internal new : SymbolEnv * SlotSig -> FSharpAbstractSignature /// Get the arguments of the abstract slot member AbstractArguments : IList> @@ -397,13 +367,9 @@ and [] internal FSharpAbstractSignature = member DeclaringType : FSharpType /// A subtype of FSharpSymbol that represents a union case as seen by the F# language -#if COMPILER_PUBLIC_API -and [] FSharpUnionCase = -#else -and [] internal FSharpUnionCase = -#endif +and [] public FSharpUnionCase = inherit FSharpSymbol - internal new : Impl.cenv * UnionCaseRef -> FSharpUnionCase + internal new : SymbolEnv * UnionCaseRef -> FSharpUnionCase /// Get the name of the union case member Name: string @@ -438,15 +404,11 @@ and [] internal FSharpUnionCase = /// A subtype of FSharpSymbol that represents a record or union case field as seen by the F# language -#if COMPILER_PUBLIC_API -and [] FSharpField = -#else -and [] internal FSharpField = -#endif +and [] public FSharpField = inherit FSharpSymbol - internal new : Impl.cenv * RecdFieldRef -> FSharpField - internal new : Impl.cenv * UnionCaseRef * int -> FSharpField + internal new : SymbolEnv * RecdFieldRef -> FSharpField + internal new : SymbolEnv * UnionCaseRef * int -> FSharpField /// Get the declaring entity of this field member DeclaringEntity: FSharpEntity @@ -469,6 +431,10 @@ and [] internal FSharpField = /// Indicates a compiler generated field, not visible to Intellisense or name resolution member IsCompilerGenerated: bool + /// Indicates if the field name was generated by compiler (e.g. ItemN names in union cases and DataN in exceptions). + /// This API returns true for source defined symbols only. + member IsNameGenerated: bool + /// Get the in-memory XML documentation for the field, used when code is checked in-memory member XmlDoc: IList @@ -500,23 +466,15 @@ and [] internal FSharpField = member IsUnresolved : bool /// Represents the rights of a compilation to access symbols -#if COMPILER_PUBLIC_API -and [] FSharpAccessibilityRights = -#else -and [] internal FSharpAccessibilityRights = -#endif +and [] public FSharpAccessibilityRights = internal new : CcuThunk * AccessorDomain -> FSharpAccessibilityRights member internal Contents : AccessorDomain /// A subtype of FSharpSymbol that represents a generic parameter for an FSharpSymbol -#if COMPILER_PUBLIC_API -and [] FSharpGenericParameter = -#else -and [] internal FSharpGenericParameter = -#endif +and [] public FSharpGenericParameter = inherit FSharpSymbol - internal new : Impl.cenv * Typar -> FSharpGenericParameter + internal new : SymbolEnv * Typar -> FSharpGenericParameter /// Get the name of the generic parameter member Name: string @@ -545,11 +503,7 @@ and [] internal FSharpGenericParameter = #if !NO_EXTENSIONTYPING /// A subtype of FSharpSymbol that represents a static parameter to an F# type provider -#if COMPILER_PUBLIC_API -and [] FSharpStaticParameter = -#else -and [] internal FSharpStaticParameter = -#endif +and [] public FSharpStaticParameter = inherit FSharpSymbol @@ -573,11 +527,7 @@ and [] internal FSharpStaticParameter = #endif /// Represents further information about a member constraint on a generic type parameter -#if COMPILER_PUBLIC_API -and [] FSharpGenericParameterMemberConstraint = -#else -and [] internal FSharpGenericParameterMemberConstraint = -#endif +and [] public FSharpGenericParameterMemberConstraint = /// Get the types that may be used to satisfy the constraint member MemberSources : IList @@ -595,11 +545,7 @@ and [] internal FSharpGenericParameterMemberCon member MemberReturnType : FSharpType /// Represents further information about a delegate constraint on a generic type parameter -#if COMPILER_PUBLIC_API -and [] FSharpGenericParameterDelegateConstraint = -#else -and [] internal FSharpGenericParameterDelegateConstraint = -#endif +and [] public FSharpGenericParameterDelegateConstraint = /// Get the tupled argument type required by the constraint member DelegateTupledArgumentType : FSharpType @@ -608,11 +554,7 @@ and [] internal FSharpGenericParameterDelegateC member DelegateReturnType : FSharpType /// Represents further information about a 'defaults to' constraint on a generic type parameter -#if COMPILER_PUBLIC_API -and [] FSharpGenericParameterDefaultsToConstraint = -#else -and [] internal FSharpGenericParameterDefaultsToConstraint = -#endif +and [] public FSharpGenericParameterDefaultsToConstraint = /// Get the priority off the 'defaults to' constraint member DefaultsToPriority : int @@ -621,11 +563,8 @@ and [] internal FSharpGenericParameterDefaultsT member DefaultsToTarget : FSharpType /// Represents a constraint on a generic type parameter -#if COMPILER_PUBLIC_API -and [] FSharpGenericParameterConstraint = -#else -and [] internal FSharpGenericParameterConstraint = -#endif +and [] public FSharpGenericParameterConstraint = + /// Indicates a constraint that a type is a subtype of the given type member IsCoercesToConstraint : bool @@ -684,39 +623,39 @@ and [] internal FSharpGenericParameterConstrain member DelegateConstraintData : FSharpGenericParameterDelegateConstraint -#if COMPILER_PUBLIC_API -and [] FSharpInlineAnnotation = -#else -and [] internal FSharpInlineAnnotation = -#endif +and [] public FSharpInlineAnnotation = + /// Indicates the value is inlined and compiled code for the function does not exist | PseudoValue + /// Indicates the value is inlined but compiled code for the function still exists, e.g. to satisfy interfaces on objects, but that it is also always inlined | AlwaysInline + /// Indicates the value is optionally inlined | OptionalInline + /// Indicates the value is never inlined | NeverInline + /// Indicates the value is aggressively inlined by the .NET runtime | AggressiveInline /// A subtype of F# symbol that represents an F# method, property, event, function or value, including extension members. -#if COMPILER_PUBLIC_API -and [] FSharpMemberOrFunctionOrValue = -#else -and [] internal FSharpMemberOrFunctionOrValue = -#endif +and [] public FSharpMemberOrFunctionOrValue = inherit FSharpSymbol - internal new : Impl.cenv * ValRef -> FSharpMemberOrFunctionOrValue - internal new : Impl.cenv * Infos.MethInfo -> FSharpMemberOrFunctionOrValue + internal new : SymbolEnv * ValRef -> FSharpMemberOrFunctionOrValue + internal new : SymbolEnv * Infos.MethInfo -> FSharpMemberOrFunctionOrValue /// Indicates if the member, function or value is in an unresolved assembly member IsUnresolved : bool /// Get the enclosing entity for the definition - member EnclosingEntity : FSharpEntity option + member DeclaringEntity : FSharpEntity option + /// Get the logical enclosing entity, which for an extension member is type being extended + member ApparentEnclosingEntity: FSharpEntity + /// Get the declaration location of the member, function or value member DeclarationLocation: range @@ -842,9 +781,6 @@ and [] internal FSharpMemberOrFunctionOrValue = /// Get the logical name of the member member LogicalName: string - /// Get the logical enclosing entity, which for an extension member is type being extended - member LogicalEnclosingEntity: FSharpEntity - /// Get the name as presented in F# error messages and documentation member DisplayName : string @@ -883,17 +819,20 @@ and [] internal FSharpMemberOrFunctionOrValue = /// Indicated if this is a value compiled to a method member IsValCompiledAsMethod : bool + + /// Indicated if this is a value + member IsValue : bool /// Indicates if this is a constructor. member IsConstructor : bool + + /// Format the type using the rules of the given display context + member FormatLayout : context: FSharpDisplayContext -> Layout /// A subtype of FSharpSymbol that represents a parameter -#if COMPILER_PUBLIC_API -and [] FSharpParameter = -#else -and [] internal FSharpParameter = -#endif +and [] public FSharpParameter = + inherit FSharpSymbol /// The optional name of the parameter @@ -914,21 +853,23 @@ and [] internal FSharpParameter = /// Indicate this is an out argument member IsOutArg: bool + /// Indicate this is an in argument + member IsInArg: bool + /// Indicate this is an optional argument member IsOptionalArg: bool /// A subtype of FSharpSymbol that represents a single case within an active pattern -#if COMPILER_PUBLIC_API -and [] FSharpActivePatternCase = -#else -and [] internal FSharpActivePatternCase = -#endif +and [] public FSharpActivePatternCase = inherit FSharpSymbol /// The name of the active pattern case - member Name: string + member Name: string + + /// Index of the case in the pattern group + member Index: int /// The location of declaration of the active pattern case member DeclarationLocation : range @@ -943,11 +884,11 @@ and [] internal FSharpActivePatternCase = member XmlDocSig: string /// Represents all cases within an active pattern -#if COMPILER_PUBLIC_API -and [] FSharpActivePatternGroup = -#else -and [] internal FSharpActivePatternGroup = -#endif +and [] public FSharpActivePatternGroup = + + /// The whole group name + member Name: string option + /// The names of the active pattern cases member Names: IList @@ -957,17 +898,14 @@ and [] internal FSharpActivePatternGroup = /// Get the type indicating signature of the active pattern member OverallType : FSharpType - /// Try to get the enclosing entity of the active pattern - member EnclosingEntity : FSharpEntity option + /// Try to get the entity in which the active pattern is declared + member DeclaringEntity : FSharpEntity option + +and [] public FSharpType = -#if COMPILER_PUBLIC_API -and [] FSharpType = -#else -and [] internal FSharpType = -#endif /// Internal use only. Create a ground type. - internal new : g:TcGlobals * thisCcu: CcuThunk * tcImports: TcImports * typ:TType -> FSharpType - internal new : Impl.cenv * typ:TType -> FSharpType + internal new : g:TcGlobals * thisCcu: CcuThunk * thisCcuTyp: ModuleOrNamespaceType * tcImports: TcImports * ty:TType -> FSharpType + internal new : SymbolEnv * ty:TType -> FSharpType /// Indicates this is a named type in an unresolved assembly member IsUnresolved : bool @@ -1005,6 +943,9 @@ and [] internal FSharpType = /// Format the type using the rules of the given display context member Format : context: FSharpDisplayContext -> string + /// Format the type using the rules of the given display context + member FormatLayout : context: FSharpDisplayContext -> Layout + /// Instantiate generic type parameters in a type member Instantiate : (FSharpGenericParameter * FSharpType) list -> FSharpType @@ -1018,7 +959,7 @@ and [] internal FSharpType = /// Adjust the type by removing any occurrences of type inference variables, replacing them /// systematically with lower-case type inference variables such as 'a. - static member Prettify : typ:FSharpType -> FSharpType + static member Prettify : ty:FSharpType -> FSharpType /// Adjust a group of types by removing any occurrences of type inference variables, replacing them /// systematically with lower-case type inference variables such as 'a. @@ -1048,11 +989,7 @@ and [] internal FSharpType = /// Represents a custom attribute attached to F# source code or a compiler .NET component -#if COMPILER_PUBLIC_API -and [] FSharpAttribute = -#else -and [] internal FSharpAttribute = -#endif +and [] public FSharpAttribute = /// The type of the attribute member AttributeType : FSharpEntity @@ -1070,33 +1007,30 @@ and [] internal FSharpAttribute = member Format : context: FSharpDisplayContext -> string /// Represents open declaration in F# code. -#if COMPILER_PUBLIC_API -type FSharpOpenDeclaration = -#else -type internal FSharpOpenDeclaration = -#endif - { /// Idents. - LongId: Ident list +[] +type public FSharpOpenDeclaration = + + internal new : longId: Ident list * range: range option * modules: FSharpEntity list * appliedScope: range * isOwnNamespace: bool -> FSharpOpenDeclaration + + /// Idents. + member LongId: Ident list - /// Range of the open declaration. - Range: range option + /// Range of the open declaration. + member Range: range option - /// Modules or namespaces which is opened with this declaration. - Modules: FSharpEntity list + /// Modules or namespaces which is opened with this declaration. + member Modules: FSharpEntity list - /// Scope in which open declaration is visible. - AppliedScope: range + /// Scope in which open declaration is visible. + member AppliedScope: range - /// If it's `namespace Xxx.Yyy` declaration. - IsOwnNamespace: bool } + /// If it's `namespace Xxx.Yyy` declaration. + member IsOwnNamespace: bool /// Represents the use of an F# symbol from F# source code [] -#if COMPILER_PUBLIC_API -type FSharpSymbolUse = -#else -type internal FSharpSymbolUse = -#endif +type public FSharpSymbolUse = + // For internal use only internal new : g:TcGlobals * denv: Tastops.DisplayEnv * symbol:FSharpSymbol * itemOcc:ItemOccurence * range: range -> FSharpSymbolUse @@ -1125,6 +1059,9 @@ type internal FSharpSymbolUse = /// Indicates if the reference is either a builder or a custom operation in a computation expression member IsFromComputationExpression : bool + /// Indicates if the reference is in open statement + member IsFromOpenStatement : bool + /// The file name the reference occurs in member FileName: string diff --git a/src/fsharp/tast.fs b/src/fsharp/tast.fs old mode 100755 new mode 100644 index 8e5ba69dcd7..d03c0114dc7 --- a/src/fsharp/tast.fs +++ b/src/fsharp/tast.fs @@ -8,6 +8,7 @@ module internal Microsoft.FSharp.Compiler.Tast open System open System.Collections.Generic +open System.Diagnostics open System.Reflection open Internal.Utilities open Microsoft.FSharp.Compiler.AbstractIL @@ -58,12 +59,16 @@ type StampMap<'T> = Map [] type ValInline = + /// Indicates the value must always be inlined and no .NET IL code is generated for the value/function | PseudoVal + /// Indicates the value is inlined but the .NET IL code for the function still exists, e.g. to satisfy interfaces on objects, but that it is also always inlined | Always + /// Indicates the value may optionally be inlined by the optimizer | Optional + /// Indicates the value must never be inlined by the optimizer | Never @@ -76,8 +81,10 @@ type ValInline = /// A flag associated with values that indicates whether the recursive scope of the value is currently being processed, and /// if the value has been generalized or not as yet. type ValRecursiveScopeInfo = + /// Set while the value is within its recursive scope. The flag indicates if the value has been eagerly generalized and accepts generic-recursive calls | ValInRecScope of bool + /// The normal value for this flag when the value is not within its recursive scope | ValNotInRecScope @@ -88,27 +95,30 @@ type ValMutability = [] /// Indicates if a type parameter is needed at runtime and may not be eliminated type TyparDynamicReq = + /// Indicates the type parameter is not needed at runtime and may be eliminated | No + /// Indicates the type parameter is needed at runtime and may not be eliminated | Yes type ValBaseOrThisInfo = + /// Indicates a ref-cell holding 'this' or the implicit 'this' used throughout an /// implicit constructor to access and set values | CtorThisVal + /// Indicates the value called 'base' available for calling base class members | BaseVal + /// Indicates a normal value | NormalVal + /// Indicates the 'this' value specified in a memberm e.g. 'x' in 'member x.M() = 1' | MemberThisVal -//--------------------------------------------------------------------------- -// Flags on values -//--------------------------------------------------------------------------- - [] +/// Flags on values type ValFlags(flags:int64) = new (recValInfo, baseOrThis, isCompGen, inlineInfo, isMutable, isModuleOrMemberBinding, isExtensionMember, isIncrClassSpecialMember, isTyFunc, allowTypeInst, isGeneratedEventVal) = @@ -198,11 +208,13 @@ type ValFlags(flags:int64) = | _ -> failwith "unreachable" - member x.SetIsMemberOrModuleBinding = ValFlags(flags ||| 0b0000000000010000000L) + member x.WithIsMemberOrModuleBinding = ValFlags(flags ||| 0b0000000000010000000L) member x.IsExtensionMember = (flags &&& 0b0000000000100000000L) <> 0L + member x.IsIncrClassSpecialMember = (flags &&& 0b0000000001000000000L) <> 0L + member x.IsTypeFunction = (flags &&& 0b0000000010000000000L) <> 0L member x.RecursiveValInfo = match (flags &&& 0b0000001100000000000L) with @@ -211,7 +223,7 @@ type ValFlags(flags:int64) = | 0b0000001000000000000L -> ValInRecScope(false) | _ -> failwith "unreachable" - member x.SetRecursiveValInfo(recValInfo) = + member x.WithRecursiveValInfo(recValInfo) = let flags = (flags &&& ~~~0b0000001100000000000L) ||| (match recValInfo with @@ -222,24 +234,23 @@ type ValFlags(flags:int64) = member x.MakesNoCriticalTailcalls = (flags &&& 0b0000010000000000000L) <> 0L - member x.SetMakesNoCriticalTailcalls = ValFlags(flags ||| 0b0000010000000000000L) + member x.WithMakesNoCriticalTailcalls = ValFlags(flags ||| 0b0000010000000000000L) member x.PermitsExplicitTypeInstantiation = (flags &&& 0b0000100000000000000L) <> 0L + member x.HasBeenReferenced = (flags &&& 0b0001000000000000000L) <> 0L - member x.SetHasBeenReferenced = ValFlags(flags ||| 0b0001000000000000000L) + member x.WithHasBeenReferenced = ValFlags(flags ||| 0b0001000000000000000L) member x.IsCompiledAsStaticPropertyWithoutField = (flags &&& 0b0010000000000000000L) <> 0L - member x.SetIsCompiledAsStaticPropertyWithoutField = ValFlags(flags ||| 0b0010000000000000000L) - + member x.WithIsCompiledAsStaticPropertyWithoutField = ValFlags(flags ||| 0b0010000000000000000L) member x.IsGeneratedEventVal = (flags &&& 0b0100000000000000000L) <> 0L member x.IsFixed = (flags &&& 0b1000000000000000000L) <> 0L - member x.SetIsFixed = ValFlags(flags ||| 0b1000000000000000000L) - + member x.WithIsFixed = ValFlags(flags ||| 0b1000000000000000000L) /// Get the flags as included in the F# binary metadata member x.PickledBits = @@ -250,17 +261,22 @@ type ValFlags(flags:int64) = (flags &&& ~~~0b0011001100000000000L) /// Represents the kind of a type parameter -[] +[] type TyparKind = + | Type + | Measure member x.AttrName = match x with - | TyparKind.Type -> None - | TyparKind.Measure -> Some "Measure" + | TyparKind.Type -> ValueNone + | TyparKind.Measure -> ValueSome "Measure" - override x.ToString() = + //[] + //member x.DebugText = x.ToString() + + override x.ToString() = match x with | TyparKind.Type -> "type" | TyparKind.Measure -> "measure" @@ -269,19 +285,27 @@ type TyparKind = /// Indicates if the type variable can be solved or given new constraints. The status of a type variable /// evolves towards being either rigid or solved. type TyparRigidity = + /// Indicates the type parameter can't be solved | Rigid + /// Indicates the type parameter can't be solved, but the variable is not set to "rigid" until after inference is complete | WillBeRigid + /// Indicates we give a warning if the type parameter is ever solved | WarnIfNotRigid + /// Indicates the type parameter is an inference variable may be solved | Flexible + /// Indicates the type parameter derives from an '_' anonymous type /// For units-of-measure, we give a warning if this gets solved to '1' | Anon + member x.ErrorIfUnified = match x with TyparRigidity.Rigid -> true | _ -> false + member x.WarnIfUnified = match x with TyparRigidity.WillBeRigid | TyparRigidity.WarnIfNotRigid -> true | _ -> false + member x.WarnIfMissingConstraint = match x with TyparRigidity.WillBeRigid -> true | _ -> false @@ -290,71 +314,84 @@ type TyparRigidity = type TyparFlags(flags:int32) = new (kind:TyparKind, rigidity:TyparRigidity, isFromError:bool, isCompGen:bool, staticReq:TyparStaticReq, dynamicReq:TyparDynamicReq, equalityDependsOn: bool, comparisonDependsOn: bool) = - TyparFlags((if isFromError then 0b0000000000010 else 0) ||| - (if isCompGen then 0b0000000000100 else 0) ||| + TyparFlags((if isFromError then 0b00000000000000010 else 0) ||| + (if isCompGen then 0b00000000000000100 else 0) ||| (match staticReq with - | NoStaticReq -> 0b0000000000000 - | HeadTypeStaticReq -> 0b0000000001000) ||| + | NoStaticReq -> 0b00000000000000000 + | HeadTypeStaticReq -> 0b00000000000001000) ||| (match rigidity with - | TyparRigidity.Rigid -> 0b0000000000000 - | TyparRigidity.WillBeRigid -> 0b0000000100000 - | TyparRigidity.WarnIfNotRigid -> 0b0000001000000 - | TyparRigidity.Flexible -> 0b0000001100000 - | TyparRigidity.Anon -> 0b0000010000000) ||| + | TyparRigidity.Rigid -> 0b00000000000000000 + | TyparRigidity.WillBeRigid -> 0b00000000000100000 + | TyparRigidity.WarnIfNotRigid -> 0b00000000001000000 + | TyparRigidity.Flexible -> 0b00000000001100000 + | TyparRigidity.Anon -> 0b00000000010000000) ||| (match kind with - | TyparKind.Type -> 0b0000000000000 - | TyparKind.Measure -> 0b0000100000000) ||| + | TyparKind.Type -> 0b00000000000000000 + | TyparKind.Measure -> 0b00000000100000000) ||| (if comparisonDependsOn then - 0b0001000000000 else 0) ||| + 0b00000001000000000 else 0) ||| (match dynamicReq with - | TyparDynamicReq.No -> 0b0000000000000 - | TyparDynamicReq.Yes -> 0b0010000000000) ||| + | TyparDynamicReq.No -> 0b00000000000000000 + | TyparDynamicReq.Yes -> 0b00000010000000000) ||| (if equalityDependsOn then - 0b0100000000000 else 0)) + 0b00000100000000000 else 0)) /// Indicates if the type inference variable was generated after an error when type checking expressions or patterns - member x.IsFromError = (flags &&& 0b0000000000010) <> 0x0 + member x.IsFromError = (flags &&& 0b00000000000000010) <> 0x0 + /// Indicates if the type variable is compiler generated, i.e. is an implicit type inference variable - member x.IsCompilerGenerated = (flags &&& 0b0000000000100) <> 0x0 + member x.IsCompilerGenerated = (flags &&& 0b00000000000000100) <> 0x0 + /// Indicates if the type variable has a static "head type" requirement, i.e. ^a variables used in FSharp.Core and member constraints. member x.StaticReq = - match (flags &&& 0b0000000001000) with - | 0b0000000000000 -> NoStaticReq - | 0b0000000001000 -> HeadTypeStaticReq + match (flags &&& 0b00000000000001000) with + | 0b00000000000000000 -> NoStaticReq + | 0b00000000000001000 -> HeadTypeStaticReq | _ -> failwith "unreachable" /// Indicates if the type variable can be solved or given new constraints. The status of a type variable /// generally always evolves towards being either rigid or solved. member x.Rigidity = - match (flags &&& 0b0000011100000) with - | 0b0000000000000 -> TyparRigidity.Rigid - | 0b0000000100000 -> TyparRigidity.WillBeRigid - | 0b0000001000000 -> TyparRigidity.WarnIfNotRigid - | 0b0000001100000 -> TyparRigidity.Flexible - | 0b0000010000000 -> TyparRigidity.Anon + match (flags &&& 0b00000000011100000) with + | 0b00000000000000000 -> TyparRigidity.Rigid + | 0b00000000000100000 -> TyparRigidity.WillBeRigid + | 0b00000000001000000 -> TyparRigidity.WarnIfNotRigid + | 0b00000000001100000 -> TyparRigidity.Flexible + | 0b00000000010000000 -> TyparRigidity.Anon | _ -> failwith "unreachable" /// Indicates whether a type variable can be instantiated by types or units-of-measure. member x.Kind = - match (flags &&& 0b1000100000000) with - | 0b0000000000000 -> TyparKind.Type - | 0b0000100000000 -> TyparKind.Measure + match (flags &&& 0b00001000100000000) with + | 0b00000000000000000 -> TyparKind.Type + | 0b00000000100000000 -> TyparKind.Measure | _ -> failwith "unreachable" /// Indicates that whether or not a generic type definition satisfies the comparison constraint is dependent on whether this type variable satisfies the comparison constraint. member x.ComparisonConditionalOn = - (flags &&& 0b0001000000000) <> 0x0 + (flags &&& 0b00000001000000000) <> 0x0 + /// Indicates if a type parameter is needed at runtime and may not be eliminated member x.DynamicReq = - match (flags &&& 0b0010000000000) with - | 0b0000000000000 -> TyparDynamicReq.No - | 0b0010000000000 -> TyparDynamicReq.Yes + match (flags &&& 0b00000010000000000) with + | 0b00000000000000000 -> TyparDynamicReq.No + | 0b00000010000000000 -> TyparDynamicReq.Yes | _ -> failwith "unreachable" + /// Indicates that whether or not a generic type definition satisfies the equality constraint is dependent on whether this type variable satisfies the equality constraint. member x.EqualityConditionalOn = - (flags &&& 0b0100000000000) <> 0x0 + (flags &&& 0b00000100000000000) <> 0x0 + + /// Indicates that whether this type parameter is a compat-flex type parameter (i.e. where "expr :> tp" only emits an optional warning) + member x.IsCompatFlex = + (flags &&& 0b00010000000000000) <> 0x0 + member x.WithCompatFlex(b) = + if b then + TyparFlags(flags ||| 0b00010000000000000) + else + TyparFlags(flags &&& ~~~0b00010000000000000) /// Get the flags as included in the F# binary metadata. We pickle this as int64 to allow for future expansion member x.PickledBits = flags @@ -364,32 +401,67 @@ type TyparFlags(flags:int32) = type EntityFlags(flags:int64) = new (usesPrefixDisplay, isModuleOrNamespace, preEstablishedHasDefaultCtor, hasSelfReferentialCtor, isStructRecordOrUnionType) = - EntityFlags((if isModuleOrNamespace then 0b00000000001L else 0L) ||| - (if usesPrefixDisplay then 0b00000000010L else 0L) ||| - (if preEstablishedHasDefaultCtor then 0b00000000100L else 0L) ||| - (if hasSelfReferentialCtor then 0b00000001000L else 0L) ||| - (if isStructRecordOrUnionType then 0b00000100000L else 0L)) - - member x.IsModuleOrNamespace = (flags &&& 0b00000000001L) <> 0x0L - member x.IsPrefixDisplay = (flags &&& 0b00000000010L) <> 0x0L + EntityFlags((if isModuleOrNamespace then 0b000000000000001L else 0L) ||| + (if usesPrefixDisplay then 0b000000000000010L else 0L) ||| + (if preEstablishedHasDefaultCtor then 0b000000000000100L else 0L) ||| + (if hasSelfReferentialCtor then 0b000000000001000L else 0L) ||| + (if isStructRecordOrUnionType then 0b000000000100000L else 0L)) + + /// Indicates the Entity is actually a module or namespace, not a type definition + member x.IsModuleOrNamespace = (flags &&& 0b000000000000001L) <> 0x0L + + /// Indicates the type prefers the "tycon" syntax for display etc. + member x.IsPrefixDisplay = (flags &&& 0b000000000000010L) <> 0x0L // This bit is not pickled, only used while establishing a type constructor. It is needed because the type constructor // is known to satisfy the default constructor constraint even before any of its members have been established. - member x.PreEstablishedHasDefaultConstructor = (flags &&& 0b00000000100L) <> 0x0L + member x.PreEstablishedHasDefaultConstructor = (flags &&& 0b000000000000100L) <> 0x0L // This bit represents an F# specific condition where a type has at least one constructor that may access // the 'this' pointer prior to successful initialization of the partial contents of the object. In this // case sub-classes must protect themselves against early access to their contents. - member x.HasSelfReferentialConstructor = (flags &&& 0b00000001000L) <> 0x0L + member x.HasSelfReferentialConstructor = (flags &&& 0b000000000001000L) <> 0x0L + + /// This bit is reserved for us in the pickle format, see pickle.fs, it's being listed here to stop it ever being used for anything else + static member ReservedBitForPickleFormatTyconReprFlag = 0b000000000010000L /// This bit represents a F# record that is a value type, or a struct record. - member x.IsStructRecordOrUnionType = (flags &&& 0b00000100000L) <> 0x0L + member x.IsStructRecordOrUnionType = (flags &&& 0b000000000100000L) <> 0x0L - /// This bit is reserved for us in the pickle format, see pickle.fs, it's being listed here to stop it ever being used for anything else - static member ReservedBitForPickleFormatTyconReprFlag = 0b00000010000L + /// These two bits represents the on-demand analysis about whether the entity has the IsByRefLike attribute + member x.TryIsByRefLike = (flags &&& 0b000000011000000L) + |> function + | 0b000000011000000L -> Some true + | 0b000000010000000L -> Some false + | _ -> None + + /// Adjust the on-demand analysis about whether the entity has the IsByRefLike attribute + member x.WithIsByRefLike(flag) = + let flags = + (flags &&& ~~~0b000000011000000L) ||| + (match flag with + | true -> 0b000000011000000L + | false -> 0b000000010000000L) + EntityFlags(flags) + + /// These two bits represents the on-demand analysis about whether the entity has the IsReadOnly attribute or is otherwise determined to be a readonly struct + member x.TryIsReadOnly = (flags &&& 0b000001100000000L) + |> function + | 0b000001100000000L -> Some true + | 0b000001000000000L -> Some false + | _ -> None + + /// Adjust the on-demand analysis about whether the entity has the IsReadOnly attribute or is otherwise determined to be a readonly struct + member x.WithIsReadOnly(flag) = + let flags = + (flags &&& ~~~0b000001100000000L) ||| + (match flag with + | true -> 0b000001100000000L + | false -> 0b000001000000000L) + EntityFlags(flags) /// Get the flags as included in the F# binary metadata - member x.PickledBits = (flags &&& ~~~0b00000000100L) + member x.PickledBits = (flags &&& ~~~0b000001111000100L) #if DEBUG @@ -398,7 +470,6 @@ assert (sizeof = 8) assert (sizeof = 4) #endif - let unassignedTyparName = "?" exception UndefinedName of int * (* error func that expects identifier name *)(string -> string) * Ident * ErrorLogger.Suggestions @@ -409,22 +480,42 @@ let KeyTyconByDemangledNameAndArity nm (typars: _ list) x = /// Generic types can be accessed either by 'List' or 'List`1'. This lists both keys. The second form should really be deprecated. let KeyTyconByAccessNames nm x = - if IsMangledGenericName nm then - let dnm = DemangleGenericTypeName nm + match TryDemangleGenericNameAndPos nm with + | ValueSome pos -> + let dnm = DemangleGenericTypeNameWithPos pos nm [| KeyValuePair(nm,x); KeyValuePair(dnm,x) |] - else + | _ -> [| KeyValuePair(nm,x) |] type ModuleOrNamespaceKind = + /// Indicates that a module is compiled to a class with the "Module" suffix added. | FSharpModuleWithSuffix + /// Indicates that a module is compiled to a class with the same name as the original module | ModuleOrType + /// Indicates that a 'module' is really a namespace | Namespace +let getNameOfScopeRef sref = + match sref with + | ILScopeRef.Local -> "" + | ILScopeRef.Module mref -> mref.Name + | ILScopeRef.Assembly aref -> aref.Name - +#if !NO_EXTENSIONTYPING +let ComputeDefinitionLocationOfProvidedItem (p : Tainted<#IProvidedCustomAttributeProvider>) = + let attrs = p.PUntaintNoFailure(fun x -> x.GetDefinitionLocationAttribute(p.TypeProvider.PUntaintNoFailure(id))) + match attrs with + | None | Some (null, _, _) -> None + | Some (filePath, line, column) -> + // Coordinates from type provider are 1-based for lines and columns + // Coordinates internally in the F# compiler are 1-based for lines and 0-based for columns + let pos = Range.mkPos line (max 0 (column - 1)) + Range.mkRange filePath pos pos |> Some + +#endif /// A public path records where a construct lives within the global namespace /// of a CCU. @@ -465,35 +556,57 @@ type CompilationPath = -let getNameOfScopeRef sref = - match sref with - | ILScopeRef.Local -> "" - | ILScopeRef.Module mref -> mref.Name - | ILScopeRef.Assembly aref -> aref.Name +[] +type EntityOptionalData = + { + /// The name of the type, possibly with `n mangling + // MUTABILITY; used only when establishing tycons. + mutable entity_compiled_name: string option + + // MUTABILITY: the signature is adjusted when it is checked + /// If this field is populated, this is the implementation range for an item in a signature, otherwise it is + /// the signature range for an item in an implementation + mutable entity_other_range: (range * bool) option + // MUTABILITY; used only when establishing tycons. + mutable entity_kind : TyparKind -#if !NO_EXTENSIONTYPING -let ComputeDefinitionLocationOfProvidedItem (p : Tainted<#IProvidedCustomAttributeProvider>) = - let attrs = p.PUntaintNoFailure(fun x -> x.GetDefinitionLocationAttribute(p.TypeProvider.PUntaintNoFailure(id))) - match attrs with - | None | Some (null, _, _) -> None - | Some (filePath, line, column) -> - // Coordinates from type provider are 1-based for lines and columns - // Coordinates internally in the F# compiler are 1-based for lines and 0-based for columns - let pos = Range.mkPos line (max 0 (column - 1)) - Range.mkRange filePath pos pos |> Some - -#endif + /// The declared documentation for the type or module + // MUTABILITY: only for unpickle linkage + mutable entity_xmldoc : XmlDoc + + /// The XML document signature for this entity + mutable entity_xmldocsig : string + + /// If non-None, indicates the type is an abbreviation for another type. + // + // MUTABILITY; used only during creation and remapping of tycons + mutable entity_tycon_abbrev: TType option + + /// The declared accessibility of the representation, not taking signatures into account + mutable entity_tycon_repr_accessibility: Accessibility + + /// Indicates how visible is the entity is. + // MUTABILITY: only for unpickle linkage + mutable entity_accessiblity: Accessibility + + /// Field used when the 'tycon' is really an exception definition + // + // MUTABILITY; used only during creation and remapping of tycons + mutable entity_exn_info: ExceptionInfo + } + + [] + member x.DebugText = x.ToString() -/// Represents a type definition, exception definition, module definition or namespace definition. -[] -type Entity = + override x.ToString() = "EntityOptionalData(...)" + +and /// Represents a type definition, exception definition, module definition or namespace definition. + [] + Entity = { /// The declared type parameters of the type // MUTABILITY; used only during creation and remapping of tycons mutable entity_typars: LazyWithContext - - // MUTABILITY; used only when establishing tycons. - mutable entity_kind : TyparKind mutable entity_flags : EntityFlags @@ -505,21 +618,9 @@ type Entity = // MUTABILITY: only for unpickle linkage mutable entity_logical_name: string - /// The name of the type, possibly with `n mangling - // MUTABILITY; used only when establishing tycons. - mutable entity_compiled_name: string option - /// The declaration location for the type constructor mutable entity_range: range - // MUTABILITY: the signature is adjusted when it is checked - /// If this field is populated, this is the implementation range for an item in a signature, otherwise it is - /// the signature range for an item in an implementation - mutable entity_other_range: (range * bool) option - - /// The declared accessibility of the representation, not taking signatures into account - mutable entity_tycon_repr_accessibility: Accessibility - /// The declared attributes for the type // MUTABILITY; used during creation and remapping of tycons // MUTABILITY; used when propagating signature attributes into the implementation. @@ -529,43 +630,22 @@ type Entity = // // MUTABILITY; used only during creation and remapping of tycons mutable entity_tycon_repr: TyconRepresentation - - /// If non-None, indicates the type is an abbreviation for another type. - // - // MUTABILITY; used only during creation and remapping of tycons - mutable entity_tycon_abbrev: TType option /// The methods and properties of the type // // MUTABILITY; used only during creation and remapping of tycons mutable entity_tycon_tcaug: TyconAugmentation - /// Field used when the 'tycon' is really an exception definition - // - // MUTABILITY; used only during creation and remapping of tycons - mutable entity_exn_info: ExceptionInfo - /// This field is used when the 'tycon' is really a module definition. It holds statically nested type definitions and nested modules // // MUTABILITY: only used during creation and remapping of tycons and // when compiling fslib to fixup compiler forward references to internal items mutable entity_modul_contents: MaybeLazy - /// The declared documentation for the type or module - // MUTABILITY: only for unpickle linkage - mutable entity_xmldoc : XmlDoc - - /// The XML document signature for this entity - mutable entity_xmldocsig : string - /// The stable path to the type, e.g. Microsoft.FSharp.Core.FSharpFunc`2 // REVIEW: it looks like entity_cpath subsumes this // MUTABILITY: only for unpickle linkage mutable entity_pubpath : PublicPath option - - /// Indicates how visible is the entity is. - // MUTABILITY: only for unpickle linkage - mutable entity_accessiblity: Accessibility /// The stable path to the type, e.g. Microsoft.FSharp.Core.FSharpFunc`2 // MUTABILITY: only for unpickle linkage @@ -574,12 +654,30 @@ type Entity = /// Used during codegen to hold the ILX representation indicating how to access the type // MUTABILITY: only for unpickle linkage and caching mutable entity_il_repr_cache : CompiledTypeRepr cache + + mutable entity_opt_data : EntityOptionalData option } + + static member EmptyEntityOptData = { entity_compiled_name = None; entity_other_range = None; entity_kind = TyparKind.Type; entity_xmldoc = XmlDoc.Empty; entity_xmldocsig = ""; entity_tycon_abbrev = None; entity_tycon_repr_accessibility = TAccess []; entity_accessiblity = TAccess []; entity_exn_info = TExnNone } + /// The name of the namespace, module or type, possibly with mangling, e.g. List`1, List or FailureException member x.LogicalName = x.entity_logical_name /// The compiled name of the namespace, module or type, e.g. FSharpList`1, ListModule or FailureException - member x.CompiledName = match x.entity_compiled_name with None -> x.LogicalName | Some s -> s + member x.CompiledName = + match x.entity_opt_data with + | Some { entity_compiled_name = Some s } -> s + | _ -> x.LogicalName + + member x.EntityCompiledName = + match x.entity_opt_data with + | Some optData -> optData.entity_compiled_name + | _ -> None + + member x.SetCompiledName(name) = + match x.entity_opt_data with + | Some optData -> optData.entity_compiled_name <- name + | _ -> x.entity_opt_data <- Some { Entity.EmptyEntityOptData with entity_compiled_name = name } /// The display name of the namespace, module or type, e.g. List instead of List`1, and no static parameters member x.DisplayName = x.GetDisplayName(false, false) @@ -604,7 +702,7 @@ type Entity = | [] -> nm | tps -> let nm = DemangleGenericTypeName nm - if withUnderscoreTypars && tps.Length > 0 then + if withUnderscoreTypars && not (List.isEmpty tps) then nm + "<" + String.concat "," (Array.create tps.Length "_") + ">" else nm @@ -638,16 +736,19 @@ type Entity = /// The range in the implementation, adjusted for an item in a signature member x.DefinitionRange = - match x.entity_other_range with - | Some (r, true) -> r + match x.entity_opt_data with + | Some { entity_other_range = Some (r, true) } -> r | _ -> x.Range member x.SigRange = - match x.entity_other_range with - | Some (r, false) -> r + match x.entity_opt_data with + | Some { entity_other_range = Some (r, false) } -> r | _ -> x.Range - member x.SetOtherRange m = x.entity_other_range <- Some m + member x.SetOtherRange m = + match x.entity_opt_data with + | Some optData -> optData.entity_other_range <- Some m + | _ -> x.entity_opt_data <- Some { Entity.EmptyEntityOptData with entity_other_range = Some m } /// A unique stamp for this module, namespace or type definition within the context of this compilation. /// Note that because of signatures, there are situations where in a single compilation the "same" @@ -668,13 +769,21 @@ type Entity = | TProvidedTypeExtensionPoint info -> XmlDoc (info.ProvidedType.PUntaintNoFailure(fun st -> (st :> IProvidedCustomAttributeProvider).GetXmlDocAttributes(info.ProvidedType.TypeProvider.PUntaintNoFailure(id)))) | _ -> #endif - x.entity_xmldoc + match x.entity_opt_data with + | Some optData -> optData.entity_xmldoc + | _ -> XmlDoc.Empty /// The XML documentation sig-string of the entity, if any, to use to lookup an .xml doc file. This also acts /// as a cache for this sig-string computation. member x.XmlDocSig - with get() = x.entity_xmldocsig - and set v = x.entity_xmldocsig <- v + with get() = + match x.entity_opt_data with + | Some optData -> optData.entity_xmldocsig + | _ -> "" + and set v = + match x.entity_opt_data with + | Some optData -> optData.entity_xmldocsig <- v + | _ -> x.entity_opt_data <- Some { Entity.EmptyEntityOptData with entity_xmldocsig = v } /// The logical contents of the entity when it is a module or namespace fragment. member x.ModuleOrNamespaceType = x.entity_modul_contents.Force() @@ -683,7 +792,15 @@ type Entity = member x.TypeContents = x.entity_tycon_tcaug /// The kind of the type definition - is it a measure definition or a type definition? - member x.TypeOrMeasureKind = x.entity_kind + member x.TypeOrMeasureKind = + match x.entity_opt_data with + | Some optData -> optData.entity_kind + | _ -> TyparKind.Type + + member x.SetTypeOrMeasureKind kind = + match x.entity_opt_data with + | Some optData -> optData.entity_kind <- kind + | _ -> x.entity_opt_data <- Some { Entity.EmptyEntityOptData with entity_kind = kind } /// The identifier at the point of declaration of the type definition. member x.Id = ident(x.LogicalName, x.Range) @@ -692,7 +809,15 @@ type Entity = member x.TypeReprInfo = x.entity_tycon_repr /// The information about the r.h.s. of an F# exception definition, if any. - member x.ExceptionInfo = x.entity_exn_info + member x.ExceptionInfo = + match x.entity_opt_data with + | Some optData -> optData.entity_exn_info + | _ -> TExnNone + + member x.SetExceptionInfo exn_info = + match x.entity_opt_data with + | Some optData -> optData.entity_exn_info <- exn_info + | _ -> x.entity_opt_data <- Some { Entity.EmptyEntityOptData with entity_exn_info = exn_info } /// Indicates if the entity represents an F# exception declaration. member x.IsExceptionDecl = match x.ExceptionInfo with TExnNone -> false | _ -> true @@ -710,13 +835,24 @@ type Entity = member x.TyparsNoRange = x.Typars x.Range /// Get the type abbreviated by this type definition, if it is an F# type abbreviation definition - member x.TypeAbbrev = x.entity_tycon_abbrev + member x.TypeAbbrev = + match x.entity_opt_data with + | Some optData -> optData.entity_tycon_abbrev + | _ -> None + + member x.SetTypeAbbrev tycon_abbrev = + match x.entity_opt_data with + | Some optData -> optData.entity_tycon_abbrev <- tycon_abbrev + | _ -> x.entity_opt_data <- Some { Entity.EmptyEntityOptData with entity_tycon_abbrev = tycon_abbrev } /// Indicates if this entity is an F# type abbreviation definition member x.IsTypeAbbrev = x.TypeAbbrev.IsSome /// Get the value representing the accessibility of the r.h.s. of an F# type definition. - member x.TypeReprAccessibility = x.entity_tycon_repr_accessibility + member x.TypeReprAccessibility = + match x.entity_opt_data with + | Some optData -> optData.entity_tycon_repr_accessibility + | _ -> TAccess [] /// Get the cache of the compiled ILTypeRef representation of this module or type. member x.CompiledReprCache = x.entity_il_repr_cache @@ -725,12 +861,15 @@ type Entity = member x.PublicPath = x.entity_pubpath /// Get the value representing the accessibility of an F# type definition or module. - member x.Accessibility = x.entity_accessiblity + member x.Accessibility = + match x.entity_opt_data with + | Some optData -> optData.entity_accessiblity + | _ -> TAccess [] /// Indicates the type prefers the "tycon" syntax for display etc. member x.IsPrefixDisplay = x.entity_flags.IsPrefixDisplay - /// Indicates the "tycon blob" is actually a module + /// Indicates the Entity is actually a module or namespace, not a type definition member x.IsModuleOrNamespace = x.entity_flags.IsModuleOrNamespace /// Indicates if the entity is a namespace @@ -827,14 +966,14 @@ type Entity = /// Get the union cases and other union-type information for a type, if any member x.UnionTypeInfo = match x.TypeReprInfo with - | TUnionRepr x -> Some x - | _ -> None + | TUnionRepr x -> ValueSome x + | _ -> ValueNone /// Get the union cases for a type, if any member x.UnionCasesArray = match x.UnionTypeInfo with - | Some x -> x.CasesTable.CasesByIndex - | None -> [| |] + | ValueSome x -> x.CasesTable.CasesByIndex + | ValueNone -> [| |] /// Get the union cases for a type, if any, as a list member x.UnionCasesAsList = x.UnionCasesArray |> Array.toList @@ -842,33 +981,25 @@ type Entity = /// Get a union case of a type by name member x.GetUnionCaseByName n = match x.UnionTypeInfo with - | Some x -> NameMap.tryFind n x.CasesTable.CasesByName - | None -> None + | ValueSome x -> NameMap.tryFind n x.CasesTable.CasesByName + | ValueNone -> None /// Create a new entity with empty, unlinked data. Only used during unpickling of F# metadata. static member NewUnlinked() : Entity = { entity_typars = Unchecked.defaultof<_> - entity_kind = Unchecked.defaultof<_> entity_flags = Unchecked.defaultof<_> entity_stamp = Unchecked.defaultof<_> entity_logical_name = Unchecked.defaultof<_> - entity_compiled_name = Unchecked.defaultof<_> entity_range = Unchecked.defaultof<_> - entity_other_range = Unchecked.defaultof<_> - entity_tycon_repr_accessibility = Unchecked.defaultof<_> entity_attribs = Unchecked.defaultof<_> entity_tycon_repr= Unchecked.defaultof<_> - entity_tycon_abbrev= Unchecked.defaultof<_> entity_tycon_tcaug= Unchecked.defaultof<_> - entity_exn_info= Unchecked.defaultof<_> entity_modul_contents= Unchecked.defaultof<_> - entity_xmldoc = Unchecked.defaultof<_> - entity_xmldocsig = Unchecked.defaultof<_> entity_pubpath = Unchecked.defaultof<_> - entity_accessiblity= Unchecked.defaultof<_> entity_cpath = Unchecked.defaultof<_> - entity_il_repr_cache = Unchecked.defaultof<_> } + entity_il_repr_cache = Unchecked.defaultof<_> + entity_opt_data = Unchecked.defaultof<_>} /// Create a new entity with the given backing data. Only used during unpickling of F# metadata. static member New _reason (data: Entity) : Entity = data @@ -876,45 +1007,38 @@ type Entity = /// Link an entity based on empty, unlinked data to the given data. Only used during unpickling of F# metadata. member x.Link (tg: EntityData) = x.entity_typars <- tg.entity_typars - x.entity_kind <- tg.entity_kind x.entity_flags <- tg.entity_flags x.entity_stamp <- tg.entity_stamp x.entity_logical_name <- tg.entity_logical_name - x.entity_compiled_name <- tg.entity_compiled_name x.entity_range <- tg.entity_range - x.entity_other_range <- tg.entity_other_range - x.entity_tycon_repr_accessibility <- tg.entity_tycon_repr_accessibility x.entity_attribs <- tg.entity_attribs x.entity_tycon_repr <- tg.entity_tycon_repr - x.entity_tycon_abbrev <- tg.entity_tycon_abbrev x.entity_tycon_tcaug <- tg.entity_tycon_tcaug - x.entity_exn_info <- tg.entity_exn_info x.entity_modul_contents <- tg.entity_modul_contents - x.entity_xmldoc <- tg.entity_xmldoc - x.entity_xmldocsig <- tg.entity_xmldocsig x.entity_pubpath <- tg.entity_pubpath - x.entity_accessiblity <- tg.entity_accessiblity x.entity_cpath <- tg.entity_cpath x.entity_il_repr_cache <- tg.entity_il_repr_cache + match tg.entity_opt_data with + | Some tg -> + x.entity_opt_data <- Some { entity_compiled_name = tg.entity_compiled_name; entity_other_range = tg.entity_other_range; entity_kind = tg.entity_kind; entity_xmldoc = tg.entity_xmldoc; entity_xmldocsig = tg.entity_xmldocsig; entity_tycon_abbrev = tg.entity_tycon_abbrev; entity_tycon_repr_accessibility = tg.entity_tycon_repr_accessibility; entity_accessiblity = tg.entity_accessiblity; entity_exn_info = tg.entity_exn_info } + | None -> () /// Indicates if the entity is linked to backing data. Only used during unpickling of F# metadata. member x.IsLinked = match box x.entity_attribs with null -> false | _ -> true - override x.ToString() = x.LogicalName - /// Get the blob of information associated with an F# object-model type definition, i.e. class, interface, struct etc. member x.FSharpObjectModelTypeInfo = match x.TypeReprInfo with | TFSharpObjectRepr x -> x - | _ -> assert false; failwith "not an F# object model type definition" + | _ -> failwith "not an F# object model type definition" /// Indicate if this is a type definition backed by Abstract IL metadata. member x.IsILTycon = match x.TypeReprInfo with | TILObjectRepr _ -> true | _ -> false /// Get the Abstract IL scope, nesting and metadata for this /// type definition, assuming it is backed by Abstract IL metadata. - member x.ILTyconInfo = match x.TypeReprInfo with | TILObjectRepr data -> data | _ -> assert false; failwith "not a .NET type definition" + member x.ILTyconInfo = match x.TypeReprInfo with | TILObjectRepr data -> data | _ -> failwith "not a .NET type definition" /// Get the Abstract IL metadata for this type definition, assuming it is backed by Abstract IL metadata. member x.ILTyconRawMetadata = let (TILObjectReprData(_,_,td)) = x.ILTyconInfo in td @@ -925,6 +1049,18 @@ type Entity = /// Indicates if this is an F# type definition whose r.h.s. is known to be a record type definition that is a value type. member x.IsStructRecordOrUnionTycon = match x.TypeReprInfo with TRecdRepr _ | TUnionRepr _ -> x.entity_flags.IsStructRecordOrUnionType | _ -> false + /// The on-demand analysis about whether the entity has the IsByRefLike attribute + member x.TryIsByRefLike = x.entity_flags.TryIsByRefLike + + /// Set the on-demand analysis about whether the entity has the IsByRefLike attribute + member x.SetIsByRefLike b = x.entity_flags <- x.entity_flags.WithIsByRefLike b + + /// These two bits represents the on-demand analysis about whether the entity has the IsReadOnly attribute or is otherwise determined to be a readonly struct + member x.TryIsReadOnly = x.entity_flags.TryIsReadOnly + + /// Set the on-demand analysis about whether the entity has the IsReadOnly attribute or is otherwise determined to be a readonly struct + member x.SetIsReadOnly b = x.entity_flags <- x.entity_flags.WithIsReadOnly b + /// Indicates if this is an F# type definition whose r.h.s. is known to be some kind of F# object model definition member x.IsFSharpObjectModelTycon = match x.TypeReprInfo with | TFSharpObjectRepr _ -> true | _ -> false @@ -980,9 +1116,7 @@ type Entity = /// Indicates if this is a .NET-defined struct or enum type definition , i.e. a value type definition member x.IsILStructOrEnumTycon = x.IsILTycon && - match x.ILTyconRawMetadata.tdKind with - | ILTypeDefKind.ValueType | ILTypeDefKind.Enum -> true - | _ -> false + x.ILTyconRawMetadata.IsStructOrEnum /// Indicates if this is a struct or enum type definition , i.e. a value type definition member x.IsStructOrEnumTycon = @@ -1081,7 +1215,7 @@ type Entity = | TExnAsmRepr tref -> CompiledTypeRepr.ILAsmNamed(tref, AsObject, Some (mkILTy AsObject (mkILTySpec (tref,[])))) | _ -> match x.TypeReprInfo with - | TAsmRepr typ -> CompiledTypeRepr.ILAsmOpen typ + | TAsmRepr ty -> CompiledTypeRepr.ILAsmOpen ty | _ -> let boxity = if x.IsStructOrEnumTycon then AsValue else AsObject let ilTypeRef = @@ -1114,25 +1248,33 @@ type Entity = /// Sets the structness of a record or union type definition member x.SetIsStructRecordOrUnion b = let flags = x.entity_flags in x.entity_flags <- EntityFlags(flags.IsPrefixDisplay, flags.IsModuleOrNamespace, flags.PreEstablishedHasDefaultConstructor, flags.HasSelfReferentialConstructor, b) + [] + member x.DebugText = x.ToString() + + override x.ToString() = x.LogicalName + and [] MaybeLazy<'T> = | Strict of 'T | Lazy of Lazy<'T> + member this.Value : 'T = match this with | Strict x -> x | Lazy x -> x.Value + member this.Force() : 'T = match this with | Strict x -> x | Lazy x -> x.Force() and EntityData = Entity + and ParentRef = | Parent of EntityRef | ParentNone and - [] + [] TyconAugmentation = { /// This is the value implementing the auto-generated comparison /// semantics if any. It is not present if the type defines its own implementation @@ -1180,9 +1322,13 @@ and } member tcaug.SetCompare x = tcaug.tcaug_compare <- Some x + member tcaug.SetCompareWith x = tcaug.tcaug_compare_withc <- Some x + member tcaug.SetEquals x = tcaug.tcaug_equals <- Some x + member tcaug.SetHashAndEqualsWith x = tcaug.tcaug_hash_and_equals_withc <- Some x + member tcaug.SetHasObjectGetHashCode b = tcaug.tcaug_hasObjectGetHashCode <- b static member Create() = @@ -1197,8 +1343,14 @@ and tcaug_interfaces=[] tcaug_closed=false tcaug_abstract=false } + + [] + member x.DebugText = x.ToString() + + override x.ToString() = "TyconAugmentation(...)" + and - [] + [] /// The information for the contents of a type. Also used for a provided namespace. TyconRepresentation = @@ -1242,61 +1394,80 @@ and /// The information for exception definitions should be folded into here. | TNoRepr + //[] + //member x.DebugText = x.ToString() + + override x.ToString() = sprintf "%+A" x + and - [] + [] /// TILObjectReprData(scope, nesting, definition) - TILObjectReprData = TILObjectReprData of ILScopeRef * ILTypeDef list * ILTypeDef + TILObjectReprData = + | TILObjectReprData of ILScopeRef * ILTypeDef list * ILTypeDef + + [] + member x.DebugText = x.ToString() + + override x.ToString() = "TILObjectReprData(...)" + #if !NO_EXTENSIONTYPING and - [] + [] /// The information kept about a provided type TProvidedTypeInfo = - { /// The parameters given to the provider that provided to this type. - ResolutionEnvironment : ExtensionTyping.ResolutionEnvironment + { /// The parameters given to the provider that provided to this type. + ResolutionEnvironment : ExtensionTyping.ResolutionEnvironment + + /// The underlying System.Type (wrapped as a ProvidedType to make sure we don't call random things on + /// System.Type, and wrapped as Tainted to make sure we track which provider this came from, for reporting + /// error messages) + ProvidedType: Tainted + + /// The base type of the type. We use it to compute the compiled representation of the type for erased types. + /// Reading is delayed, since it does an import on the underlying type + LazyBaseType: LazyWithContext - /// The underlying System.Type (wrapped as a ProvidedType to make sure we don't call random things on - /// System.Type, and wrapped as Tainted to make sure we track which provider this came from, for reporting - /// error messages) - ProvidedType: Tainted + /// A flag read eagerly from the provided type and used to compute basic properties of the type definition. + IsClass: bool - /// The base type of the type. We use it to compute the compiled representation of the type for erased types. - /// Reading is delayed, since it does an import on the underlying type - LazyBaseType: LazyWithContext + /// A flag read eagerly from the provided type and used to compute basic properties of the type definition. + IsSealed: bool - /// A flag read eagerly from the provided type and used to compute basic properties of the type definition. - IsClass: bool + /// A flag read eagerly from the provided type and used to compute basic properties of the type definition. + IsInterface: bool - /// A flag read eagerly from the provided type and used to compute basic properties of the type definition. - IsSealed: bool + /// A flag read eagerly from the provided type and used to compute basic properties of the type definition. + IsStructOrEnum: bool - /// A flag read eagerly from the provided type and used to compute basic properties of the type definition. - IsInterface: bool - /// A flag read eagerly from the provided type and used to compute basic properties of the type definition. - IsStructOrEnum: bool + /// A flag read eagerly from the provided type and used to compute basic properties of the type definition. + IsEnum: bool - /// A flag read eagerly from the provided type and used to compute basic properties of the type definition. - IsEnum: bool + /// A type read from the provided type and used to compute basic properties of the type definition. + /// Reading is delayed, since it does an import on the underlying type + UnderlyingTypeOfEnum: (unit -> TType) - /// A type read from the provided type and used to compute basic properties of the type definition. - /// Reading is delayed, since it does an import on the underlying type - UnderlyingTypeOfEnum: (unit -> TType) + /// A flag read from the provided type and used to compute basic properties of the type definition. + /// Reading is delayed, since it looks at the .BaseType + IsDelegate: (unit -> bool) - /// A flag read from the provided type and used to compute basic properties of the type definition. - /// Reading is delayed, since it looks at the .BaseType - IsDelegate: (unit -> bool) + /// Indicates the type is erased + IsErased: bool - /// Indicates the type is erased - IsErased: bool + /// Indicates the type is generated, but type-relocation is suppressed + IsSuppressRelocate : bool } - /// Indicates the type is generated, but type-relocation is suppressed - IsSuppressRelocate : bool } + member info.IsGenerated = not info.IsErased - member info.IsGenerated = not info.IsErased - member info.BaseTypeForErased (m,objTy) = + member info.BaseTypeForErased (m,objTy) = if info.IsErased then info.LazyBaseType.Force (m,objTy) - else assert false; failwith "expect erased type" + else failwith "expect erased type" + + [] + member x.DebugText = x.ToString() + + override x.ToString() = "TProvidedTypeInfo(...)" #endif @@ -1323,7 +1494,7 @@ and | TTyconStruct | TTyconEnum -> true and - [] + [] TyconObjModelData = { /// Indicates whether the type declaration is a class, interface, enum, delegate or struct fsobjmodel_kind: TyconObjModelKind @@ -1334,8 +1505,13 @@ and /// The fields of the class, struct or enum fsobjmodel_rfields: TyconRecdFields } + [] + member x.DebugText = x.ToString() + + override x.ToString() = "TyconObjModelData(...)" + and - [] + [] TyconRecdFields = { /// The fields of the record, in declaration order. FieldsByIndex: RecdField[] @@ -1348,12 +1524,20 @@ and else failwith "FieldByIndex" member x.FieldByName n = x.FieldsByName.TryFind(n) + member x.AllFieldsAsList = x.FieldsByIndex |> Array.toList + member x.TrueFieldsAsList = x.AllFieldsAsList |> List.filter (fun f -> not f.IsCompilerGenerated) + member x.TrueInstanceFieldsAsList = x.AllFieldsAsList |> List.filter (fun f -> not f.IsStatic && not f.IsCompilerGenerated) + [] + member x.DebugText = x.ToString() + + override x.ToString() = "TyconRecdFields(...)" + and - [] + [] TyconUnionCases = { /// The cases of the discriminated union, in declaration order. CasesByIndex: UnionCase[] @@ -1366,19 +1550,29 @@ and member x.UnionCasesAsList = x.CasesByIndex |> Array.toList + [] + member x.DebugText = x.ToString() + + override x.ToString() = "TyconUnionCases(...)" + and - [] + [] TyconUnionData = { /// The cases contained in the discriminated union. CasesTable: TyconUnionCases /// The ILX data structure representing the discriminated union. CompiledRepresentation: IlxUnionRef cache } + member x.UnionCasesAsList = x.CasesTable.CasesByIndex |> Array.toList + [] + member x.DebugText = x.ToString() + + override x.ToString() = "TyconUnionData(...)" + and - [] - [] + [] UnionCase = { /// Data carried by the case. FieldTable: TyconRecdFields @@ -1423,15 +1617,24 @@ and | _ -> uc.Range member uc.DisplayName = uc.Id.idText + member uc.RecdFieldsArray = uc.FieldTable.FieldsByIndex + member uc.RecdFields = uc.FieldTable.FieldsByIndex |> Array.toList + member uc.GetFieldByName nm = uc.FieldTable.FieldByName nm + member uc.IsNullary = (uc.FieldTable.FieldsByIndex.Length = 0) + [] + member x.DebugText = x.ToString() + + override x.ToString() = "UnionCase(" + x.DisplayName + ")" + and /// This may represent a "field" in either a struct, class, record or union /// It is normally compiled to a property. - [] + [] RecdField = { /// Is the field declared mutable in F#? rfield_mutable: bool @@ -1469,7 +1672,9 @@ and mutable rfield_fattribs: Attribs /// Name/declaration-location of the field - rfield_id: Ident + rfield_id: Ident + + rfield_name_generated: bool /// If this field is populated, this is the implementation range for an item in a signature, otherwise it is /// the signature range for an item in an implementation @@ -1541,7 +1746,14 @@ and | Some Const.Zero -> true | _ -> false -and ExceptionInfo = + [] + member x.DebugText = x.ToString() + + override x.ToString() = x.Name + +and + [] + ExceptionInfo = /// Indicates that an exception is an abbreviation for the given exception | TExnAbbrevRepr of TyconRef @@ -1554,177 +1766,187 @@ and ExceptionInfo = /// Indicates that an exception is abstract, i.e. is in a signature file, and we do not know the representation | TExnNone -and - [] + // %+A formatting is used, so this is not needed + //[] + //member x.DebugText = x.ToString() + + override x.ToString() = sprintf "%+A" x + +and [] ModuleOrNamespaceType(kind: ModuleOrNamespaceKind, vals: QueueList, entities: QueueList) = - /// Mutation used during compilation of FSharp.Core.dll - let mutable entities = entities + /// Mutation used during compilation of FSharp.Core.dll + let mutable entities = entities - // Lookup tables keyed the way various clients expect them to be keyed. - // We attach them here so we don't need to store lookup tables via any other technique. - // - // The type option ref is used because there are a few functions that treat these as first class values. - // We should probably change to 'mutable'. - // - // We do not need to lock this mutable state this it is only ever accessed from the compiler thread. - let activePatternElemRefCache : NameMap option ref = ref None - let modulesByDemangledNameCache : NameMap option ref = ref None - let exconsByDemangledNameCache : NameMap option ref = ref None - let tyconsByDemangledNameAndArityCache: LayeredMap option ref = ref None - let tyconsByAccessNamesCache : LayeredMultiMap option ref = ref None - let tyconsByMangledNameCache : NameMap option ref = ref None - let allEntitiesByMangledNameCache : NameMap option ref = ref None - let allValsAndMembersByPartialLinkageKeyCache : MultiMap option ref = ref None - let allValsByLogicalNameCache : NameMap option ref = ref None + // Lookup tables keyed the way various clients expect them to be keyed. + // We attach them here so we don't need to store lookup tables via any other technique. + // + // The type option ref is used because there are a few functions that treat these as first class values. + // We should probably change to 'mutable'. + // + // We do not need to lock this mutable state this it is only ever accessed from the compiler thread. + let activePatternElemRefCache : NameMap option ref = ref None + let modulesByDemangledNameCache : NameMap option ref = ref None + let exconsByDemangledNameCache : NameMap option ref = ref None + let tyconsByDemangledNameAndArityCache: LayeredMap option ref = ref None + let tyconsByAccessNamesCache : LayeredMultiMap option ref = ref None + let tyconsByMangledNameCache : NameMap option ref = ref None + let allEntitiesByMangledNameCache : NameMap option ref = ref None + let allValsAndMembersByPartialLinkageKeyCache : MultiMap option ref = ref None + let allValsByLogicalNameCache : NameMap option ref = ref None - /// Namespace or module-compiled-as-type? - member mtyp.ModuleOrNamespaceKind = kind + /// Namespace or module-compiled-as-type? + member mtyp.ModuleOrNamespaceKind = kind - /// Values, including members in F# types in this module-or-namespace-fragment. - member mtyp.AllValsAndMembers = vals + /// Values, including members in F# types in this module-or-namespace-fragment. + member mtyp.AllValsAndMembers = vals - /// Type, mapping mangled name to Tycon, e.g. - //// "Dictionary`2" --> Tycon - //// "ListModule" --> Tycon with module info - //// "FooException" --> Tycon with exception info - member mtyp.AllEntities = entities + /// Type, mapping mangled name to Tycon, e.g. + //// "Dictionary`2" --> Tycon + //// "ListModule" --> Tycon with module info + //// "FooException" --> Tycon with exception info + member mtyp.AllEntities = entities - /// Mutation used during compilation of FSharp.Core.dll - member mtyp.AddModuleOrNamespaceByMutation(modul:ModuleOrNamespace) = - entities <- QueueList.appendOne entities modul - modulesByDemangledNameCache := None - allEntitiesByMangledNameCache := None + /// Mutation used during compilation of FSharp.Core.dll + member mtyp.AddModuleOrNamespaceByMutation(modul:ModuleOrNamespace) = + entities <- QueueList.appendOne entities modul + modulesByDemangledNameCache := None + allEntitiesByMangledNameCache := None #if !NO_EXTENSIONTYPING - /// Mutation used in hosting scenarios to hold the hosted types in this module or namespace - member mtyp.AddProvidedTypeEntity(entity:Entity) = - entities <- QueueList.appendOne entities entity - tyconsByMangledNameCache := None - tyconsByDemangledNameAndArityCache := None - tyconsByAccessNamesCache := None - allEntitiesByMangledNameCache := None + /// Mutation used in hosting scenarios to hold the hosted types in this module or namespace + member mtyp.AddProvidedTypeEntity(entity:Entity) = + entities <- QueueList.appendOne entities entity + tyconsByMangledNameCache := None + tyconsByDemangledNameAndArityCache := None + tyconsByAccessNamesCache := None + allEntitiesByMangledNameCache := None #endif - /// Return a new module or namespace type with an entity added. - member mtyp.AddEntity(tycon:Tycon) = - ModuleOrNamespaceType(kind, vals, entities.AppendOne tycon) + /// Return a new module or namespace type with an entity added. + member mtyp.AddEntity(tycon:Tycon) = + ModuleOrNamespaceType(kind, vals, entities.AppendOne tycon) - /// Return a new module or namespace type with a value added. - member mtyp.AddVal(vspec:Val) = - ModuleOrNamespaceType(kind, vals.AppendOne vspec, entities) + /// Return a new module or namespace type with a value added. + member mtyp.AddVal(vspec:Val) = + ModuleOrNamespaceType(kind, vals.AppendOne vspec, entities) - /// Get a table of the active patterns defined in this module. - member mtyp.ActivePatternElemRefLookupTable = activePatternElemRefCache + /// Get a table of the active patterns defined in this module. + member mtyp.ActivePatternElemRefLookupTable = activePatternElemRefCache - /// Get a list of types defined within this module, namespace or type. - member mtyp.TypeDefinitions = entities |> Seq.filter (fun x -> not x.IsExceptionDecl && not x.IsModuleOrNamespace) |> Seq.toList + /// Get a list of types defined within this module, namespace or type. + member mtyp.TypeDefinitions = entities |> Seq.filter (fun x -> not x.IsExceptionDecl && not x.IsModuleOrNamespace) |> Seq.toList - /// Get a list of F# exception definitions defined within this module, namespace or type. - member mtyp.ExceptionDefinitions = entities |> Seq.filter (fun x -> x.IsExceptionDecl) |> Seq.toList + /// Get a list of F# exception definitions defined within this module, namespace or type. + member mtyp.ExceptionDefinitions = entities |> Seq.filter (fun x -> x.IsExceptionDecl) |> Seq.toList - /// Get a list of module and namespace definitions defined within this module, namespace or type. - member mtyp.ModuleAndNamespaceDefinitions = entities |> Seq.filter (fun x -> x.IsModuleOrNamespace) |> Seq.toList + /// Get a list of module and namespace definitions defined within this module, namespace or type. + member mtyp.ModuleAndNamespaceDefinitions = entities |> Seq.filter (fun x -> x.IsModuleOrNamespace) |> Seq.toList - /// Get a list of type and exception definitions defined within this module, namespace or type. - member mtyp.TypeAndExceptionDefinitions = entities |> Seq.filter (fun x -> not x.IsModuleOrNamespace) |> Seq.toList + /// Get a list of type and exception definitions defined within this module, namespace or type. + member mtyp.TypeAndExceptionDefinitions = entities |> Seq.filter (fun x -> not x.IsModuleOrNamespace) |> Seq.toList - /// Get a table of types defined within this module, namespace or type. The - /// table is indexed by both name and generic arity. This means that for generic - /// types "List`1", the entry (List,1) will be present. - member mtyp.TypesByDemangledNameAndArity m = + /// Get a table of types defined within this module, namespace or type. The + /// table is indexed by both name and generic arity. This means that for generic + /// types "List`1", the entry (List,1) will be present. + member mtyp.TypesByDemangledNameAndArity m = cacheOptRef tyconsByDemangledNameAndArityCache (fun () -> LayeredMap.Empty.AddAndMarkAsCollapsible( mtyp.TypeAndExceptionDefinitions |> List.map (fun (tc:Tycon) -> KeyTyconByDemangledNameAndArity tc.LogicalName (tc.Typars m) tc) |> List.toArray)) - /// Get a table of types defined within this module, namespace or type. The - /// table is indexed by both name and, for generic types, also by mangled name. - member mtyp.TypesByAccessNames = - cacheOptRef tyconsByAccessNamesCache (fun () -> + /// Get a table of types defined within this module, namespace or type. The + /// table is indexed by both name and, for generic types, also by mangled name. + member mtyp.TypesByAccessNames = + cacheOptRef tyconsByAccessNamesCache (fun () -> LayeredMultiMap.Empty.AddAndMarkAsCollapsible (mtyp.TypeAndExceptionDefinitions |> List.toArray |> Array.collect (fun (tc:Tycon) -> KeyTyconByAccessNames tc.LogicalName tc))) - // REVIEW: we can remove this lookup and use AllEntitiedByMangledName instead? - member mtyp.TypesByMangledName = - let addTyconByMangledName (x:Tycon) tab = NameMap.add x.LogicalName x tab - cacheOptRef tyconsByMangledNameCache (fun () -> + // REVIEW: we can remove this lookup and use AllEntitiedByMangledName instead? + member mtyp.TypesByMangledName = + let addTyconByMangledName (x:Tycon) tab = NameMap.add x.LogicalName x tab + cacheOptRef tyconsByMangledNameCache (fun () -> List.foldBack addTyconByMangledName mtyp.TypeAndExceptionDefinitions Map.empty) - /// Get a table of entities indexed by both logical and compiled names - member mtyp.AllEntitiesByCompiledAndLogicalMangledNames : NameMap = - let addEntityByMangledName (x:Entity) tab = - let name1 = x.LogicalName - let name2 = x.CompiledName - let tab = NameMap.add name1 x tab - if name1 = name2 then tab - else NameMap.add name2 x tab + /// Get a table of entities indexed by both logical and compiled names + member mtyp.AllEntitiesByCompiledAndLogicalMangledNames : NameMap = + let addEntityByMangledName (x:Entity) tab = + let name1 = x.LogicalName + let name2 = x.CompiledName + let tab = NameMap.add name1 x tab + if name1 = name2 then tab + else NameMap.add name2 x tab - cacheOptRef allEntitiesByMangledNameCache (fun () -> + cacheOptRef allEntitiesByMangledNameCache (fun () -> QueueList.foldBack addEntityByMangledName entities Map.empty) - /// Get a table of entities indexed by both logical name - member mtyp.AllEntitiesByLogicalMangledName : NameMap = - let addEntityByMangledName (x:Entity) tab = NameMap.add x.LogicalName x tab - QueueList.foldBack addEntityByMangledName entities Map.empty - - /// Get a table of values and members indexed by partial linkage key, which includes name, the mangled name of the parent type (if any), - /// and the method argument count (if any). - member mtyp.AllValsAndMembersByPartialLinkageKey = - let addValByMangledName (x:Val) tab = - if x.IsCompiledAsTopLevel then - MultiMap.add x.LinkagePartialKey x tab - else - tab - cacheOptRef allValsAndMembersByPartialLinkageKeyCache (fun () -> + /// Get a table of entities indexed by both logical name + member mtyp.AllEntitiesByLogicalMangledName : NameMap = + let addEntityByMangledName (x:Entity) tab = NameMap.add x.LogicalName x tab + QueueList.foldBack addEntityByMangledName entities Map.empty + + /// Get a table of values and members indexed by partial linkage key, which includes name, the mangled name of the parent type (if any), + /// and the method argument count (if any). + member mtyp.AllValsAndMembersByPartialLinkageKey = + let addValByMangledName (x:Val) tab = + if x.IsCompiledAsTopLevel then + let key = x.GetLinkagePartialKey() + MultiMap.add key x tab + else + tab + cacheOptRef allValsAndMembersByPartialLinkageKeyCache (fun () -> QueueList.foldBack addValByMangledName vals MultiMap.empty) - /// Try to find the member with the given linkage key in the given module. - member mtyp.TryLinkVal(ccu:CcuThunk,key:ValLinkageFullKey) = - mtyp.AllValsAndMembersByPartialLinkageKey - |> MultiMap.find key.PartialKey - |> List.tryFind (fun v -> match key.TypeForLinkage with - | None -> true - | Some keyTy -> ccu.MemberSignatureEquality(keyTy,v.Type)) - |> ValueOption.ofOption - - /// Get a table of values indexed by logical name - member mtyp.AllValsByLogicalName = - let addValByName (x:Val) tab = - // Note: names may occur twice prior to raising errors about this in PostTypeCheckSemanticChecks - // Earlier ones take precedence since we report errors about the later ones - if not x.IsMember && not x.IsCompilerGenerated then - NameMap.add x.LogicalName x tab - else - tab - cacheOptRef allValsByLogicalNameCache (fun () -> - QueueList.foldBack addValByName vals Map.empty) - - /// Compute a table of values and members indexed by logical name. - member mtyp.AllValsAndMembersByLogicalNameUncached = - let addValByName (x:Val) tab = - if not x.IsCompilerGenerated then - MultiMap.add x.LogicalName x tab - else - tab - QueueList.foldBack addValByName vals MultiMap.empty - - /// Get a table of F# exception definitions indexed by demangled name, so 'FailureException' is indexed by 'Failure' - member mtyp.ExceptionDefinitionsByDemangledName = - let add (tycon:Tycon) acc = NameMap.add tycon.LogicalName tycon acc - cacheOptRef exconsByDemangledNameCache (fun () -> - List.foldBack add mtyp.ExceptionDefinitions Map.empty) - - /// Get a table of nested module and namespace fragments indexed by demangled name (so 'ListModule' becomes 'List') - member mtyp.ModulesAndNamespacesByDemangledName = - let add (entity:Entity) acc = - if entity.IsModuleOrNamespace then - NameMap.add entity.DemangledModuleOrNamespaceName entity acc - else acc - cacheOptRef modulesByDemangledNameCache (fun () -> - QueueList.foldBack add entities Map.empty) + /// Try to find the member with the given linkage key in the given module. + member mtyp.TryLinkVal(ccu:CcuThunk,key:ValLinkageFullKey) = + mtyp.AllValsAndMembersByPartialLinkageKey + |> MultiMap.find key.PartialKey + |> List.tryFind (fun v -> match key.TypeForLinkage with + | None -> true + | Some keyTy -> ccu.MemberSignatureEquality(keyTy,v.Type)) + |> ValueOption.ofOption + + /// Get a table of values indexed by logical name + member mtyp.AllValsByLogicalName = + let addValByName (x:Val) tab = + // Note: names may occur twice prior to raising errors about this in PostTypeCheckSemanticChecks + // Earlier ones take precedence since we report errors about the later ones + if not x.IsMember && not x.IsCompilerGenerated then + NameMap.add x.LogicalName x tab + else + tab + cacheOptRef allValsByLogicalNameCache (fun () -> + QueueList.foldBack addValByName vals Map.empty) + + /// Compute a table of values and members indexed by logical name. + member mtyp.AllValsAndMembersByLogicalNameUncached = + let addValByName (x:Val) tab = + if not x.IsCompilerGenerated then + MultiMap.add x.LogicalName x tab + else + tab + QueueList.foldBack addValByName vals MultiMap.empty + + /// Get a table of F# exception definitions indexed by demangled name, so 'FailureException' is indexed by 'Failure' + member mtyp.ExceptionDefinitionsByDemangledName = + let add (tycon:Tycon) acc = NameMap.add tycon.LogicalName tycon acc + cacheOptRef exconsByDemangledNameCache (fun () -> + List.foldBack add mtyp.ExceptionDefinitions Map.empty) + + /// Get a table of nested module and namespace fragments indexed by demangled name (so 'ListModule' becomes 'List') + member mtyp.ModulesAndNamespacesByDemangledName = + let add (entity:Entity) acc = + if entity.IsModuleOrNamespace then + NameMap.add entity.DemangledModuleOrNamespaceName entity acc + else acc + cacheOptRef modulesByDemangledNameCache (fun () -> + QueueList.foldBack add entities Map.empty) + + [] + member x.DebugText = x.ToString() + + override x.ToString() = "ModuleOrNamespaceType(...)" and ModuleOrNamespace = Entity and Tycon = Entity - /// A set of static methods for constructing types. and Construct = @@ -1809,26 +2031,21 @@ and Construct = Tycon.New "tycon" { entity_stamp=stamp entity_logical_name=name - entity_compiled_name=None - entity_kind=kind entity_range=m - entity_other_range=None entity_flags=EntityFlags(usesPrefixDisplay=false, isModuleOrNamespace=false,preEstablishedHasDefaultCtor=false, hasSelfReferentialCtor=false, isStructRecordOrUnionType=false) entity_attribs=[] // fetched on demand via est.fs API entity_typars= LazyWithContext.NotLazy [] - entity_tycon_abbrev = None entity_tycon_repr = repr - entity_tycon_repr_accessibility = TAccess([]) - entity_exn_info=TExnNone entity_tycon_tcaug=TyconAugmentation.Create() entity_modul_contents = MaybeLazy.Lazy (lazy new ModuleOrNamespaceType(Namespace, QueueList.ofList [], QueueList.ofList [])) // Generated types get internal accessibility - entity_accessiblity= access - entity_xmldoc = XmlDoc [||] // fetched on demand via est.fs API - entity_xmldocsig="" entity_pubpath = Some pubpath entity_cpath = Some cpath - entity_il_repr_cache = newCache() } + entity_il_repr_cache = newCache() + entity_opt_data = + match kind, access with + | TyparKind.Type, TAccess [] -> None + | _ -> Some { Entity.EmptyEntityOptData with entity_kind = kind; entity_accessiblity = access } } #endif static member NewModuleOrNamespace cpath access (id:Ident) xml attribs mtype = @@ -1836,47 +2053,64 @@ and Construct = // Put the module suffix on if needed Tycon.New "mspec" { entity_logical_name=id.idText - entity_compiled_name=None entity_range = id.idRange - entity_other_range = None entity_stamp=stamp - entity_kind=TyparKind.Type entity_modul_contents = mtype entity_flags=EntityFlags(usesPrefixDisplay=false, isModuleOrNamespace=true, preEstablishedHasDefaultCtor=false, hasSelfReferentialCtor=false,isStructRecordOrUnionType=false) entity_typars=LazyWithContext.NotLazy [] - entity_tycon_abbrev = None entity_tycon_repr = TNoRepr - entity_tycon_repr_accessibility = access - entity_exn_info=TExnNone entity_tycon_tcaug=TyconAugmentation.Create() entity_pubpath=cpath |> Option.map (fun (cp:CompilationPath) -> cp.NestedPublicPath id) entity_cpath=cpath - entity_accessiblity=access entity_attribs=attribs - entity_xmldoc=xml - entity_xmldocsig="" - entity_il_repr_cache = newCache() } + entity_il_repr_cache = newCache() + entity_opt_data = + match xml, access with + | XmlDoc [||], TAccess [] -> None + | _ -> Some { Entity.EmptyEntityOptData with entity_xmldoc = xml; entity_tycon_repr_accessibility = access; entity_accessiblity = access } } -and Accessibility = +and + [] + Accessibility = /// Indicates the construct can only be accessed from any code in the given type constructor, module or assembly. [] indicates global scope. | TAccess of CompilationPath list + [] + member x.DebugText = x.ToString() + + override x.ToString() = "Accessibility(...)" + +and + [] + TyparOptionalData = + { + /// MUTABILITY: we set the names of generalized inference type parameters to make the look nice for IL code generation + mutable typar_il_name: string option + + /// The documentation for the type parameter. Empty for type inference variables. + /// MUTABILITY: for linking when unpickling + mutable typar_xmldoc : XmlDoc + + /// The inferred constraints for the type inference variable + mutable typar_constraints: TyparConstraint list + + /// The declared attributes of the type parameter. Empty for type inference variables. + mutable typar_attribs: Attribs + } + + [] + member x.DebugText = x.ToString() + + override __.ToString() = sprintf "TyparOptionalData(...)" + and TyparData = Typar + and - [] - [] + [] /// A declared generic type/measure parameter, or a type/measure inference variable. Typar = // Backing data for type parameters and type inference variables // - // MEMORY PERF: TyparData objects are common. They could be reduced to a record of 4-5 words in - // the common case of inference type variables, e.g. - // - // TyparDataCommon = - // typar_details: TyparDataUncommon // null indicates standard values for uncommon data - // typar_stamp: Stamp - // typar_solution: TType option - // typar_constraints: TyparConstraint list // where the "common" settings are // kind=TyparKind.Type, rigid=TyparRigidity.Flexible, id=compgen_id, staticReq=NoStaticReq, isCompGen=true, isFromError=false, // dynamicReq=TyparDynamicReq.No, attribs=[], eqDep=false, compDep=false @@ -1884,30 +2118,19 @@ and { /// MUTABILITY: we set the names of generalized inference type parameters to make the look nice for IL code generation mutable typar_id: Ident - /// MUTABILITY: we set the names of generalized inference type parameters to make the look nice for IL code generation - mutable typar_il_name: string option - mutable typar_flags: TyparFlags /// The unique stamp of the typar blob. /// MUTABILITY: for linking when unpickling - mutable typar_stamp: Stamp - - /// The documentation for the type parameter. Empty for type inference variables. - /// MUTABILITY: for linking when unpickling - mutable typar_xmldoc : XmlDoc - - /// The declared attributes of the type parameter. Empty for type inference variables. - mutable typar_attribs: Attribs + mutable typar_stamp: Stamp /// An inferred equivalence for a type inference variable. mutable typar_solution: TType option - - /// The inferred constraints for the type inference variable - mutable typar_constraints: TyparConstraint list /// A cached TAST type used when this type variable is used as type. - mutable typar_astype: TType } + mutable typar_astype: TType + + mutable typar_opt_data: TyparOptionalData option } /// The name of the type parameter member x.Name = x.typar_id.idText @@ -1925,7 +2148,10 @@ and member x.Solution = x.typar_solution /// The inferred constraints for the type inference variable, if any - member x.Constraints = x.typar_constraints + member x.Constraints = + match x.typar_opt_data with + | Some optData -> optData.typar_constraints + | _ -> [] /// Indicates if the type variable is compiler generated, i.e. is an implicit type inference variable member x.IsCompilerGenerated = x.typar_flags.IsCompilerGenerated @@ -1949,6 +2175,12 @@ and /// Indicates if the type inference variable was generated after an error when type checking expressions or patterns member x.IsFromError = x.typar_flags.IsFromError + /// Indicates that whether this type parameter is a compat-flex type parameter (i.e. where "expr :> tp" only emits an optional warning) + member x.IsCompatFlex = x.typar_flags.IsCompatFlex + + /// Set whether this type parameter is a compat-flex type parameter (i.e. where "expr :> tp" only emits an optional warning) + member x.SetIsCompatFlex(b) = x.typar_flags <- x.typar_flags.WithCompatFlex(b) + /// Indicates whether a type variable can be instantiated by types or units-of-measure. member x.Kind = x.typar_flags.Kind @@ -1956,27 +2188,55 @@ and member x.IsErased = match x.Kind with TyparKind.Type -> false | _ -> true /// The declared attributes of the type parameter. Empty for type inference variables and parameters from .NET - member x.Attribs = x.typar_attribs + member x.Attribs = + match x.typar_opt_data with + | Some optData -> optData.typar_attribs + | _ -> [] + + member x.SetAttribs attribs = + match attribs, x.typar_opt_data with + | [], None -> () + | [], Some { typar_il_name = None; typar_xmldoc = XmlDoc [||]; typar_constraints = [] } -> + x.typar_opt_data <- None + | _, Some optData -> optData.typar_attribs <- attribs + | _ -> x.typar_opt_data <- Some { typar_il_name = None; typar_xmldoc = XmlDoc.Empty; typar_constraints = []; typar_attribs = attribs } + + member x.XmlDoc = + match x.typar_opt_data with + | Some optData -> optData.typar_xmldoc + | _ -> XmlDoc.Empty + + member x.ILName = + match x.typar_opt_data with + | Some optData -> optData.typar_il_name + | _ -> None + + member x.SetILName il_name = + match x.typar_opt_data with + | Some optData -> optData.typar_il_name <- il_name + | _ -> x.typar_opt_data <- Some { typar_il_name = il_name; typar_xmldoc = XmlDoc.Empty; typar_constraints = []; typar_attribs = [] } /// Indicates the display name of a type variable member x.DisplayName = if x.Name = "?" then "?"+string x.Stamp else x.Name /// Adjusts the constraints associated with a type variable - member x.FixupConstraints cs = - x.typar_constraints <- cs + member x.SetConstraints cs = + match cs, x.typar_opt_data with + | [], None -> () + | [], Some { typar_il_name = None; typar_xmldoc = XmlDoc [||]; typar_attribs = [] } -> + x.typar_opt_data <- None + | _, Some optData -> optData.typar_constraints <- cs + | _ -> x.typar_opt_data <- Some { typar_il_name = None; typar_xmldoc = XmlDoc.Empty; typar_constraints = cs; typar_attribs = [] } /// Creates a type variable that contains empty data, and is not yet linked. Only used during unpickling of F# metadata. static member NewUnlinked() : Typar = { typar_id = Unchecked.defaultof<_> - typar_il_name = Unchecked.defaultof<_> typar_flags = Unchecked.defaultof<_> - typar_stamp = Unchecked.defaultof<_> - typar_xmldoc = Unchecked.defaultof<_> - typar_attribs = Unchecked.defaultof<_> + typar_stamp = -1L typar_solution = Unchecked.defaultof<_> - typar_constraints = Unchecked.defaultof<_> - typar_astype = Unchecked.defaultof<_> } + typar_astype = Unchecked.defaultof<_> + typar_opt_data = Unchecked.defaultof<_> } /// Creates a type variable based on the given data. Only used during unpickling of F# metadata. static member New (data: TyparData) : Typar = data @@ -1984,13 +2244,14 @@ and /// Links a previously unlinked type variable to the given data. Only used during unpickling of F# metadata. member x.Link (tg: TyparData) = x.typar_id <- tg.typar_id - x.typar_il_name <- tg.typar_il_name x.typar_flags <- tg.typar_flags x.typar_stamp <- tg.typar_stamp - x.typar_xmldoc <- tg.typar_xmldoc - x.typar_attribs <- tg.typar_attribs x.typar_solution <- tg.typar_solution - x.typar_constraints <- tg.typar_constraints + match tg.typar_opt_data with + | Some tg -> + let optData = { typar_il_name = tg.typar_il_name; typar_xmldoc = tg.typar_xmldoc; typar_constraints = tg.typar_constraints; typar_attribs = tg.typar_attribs } + x.typar_opt_data <- Some optData + | None -> () /// Links a previously unlinked type variable to the given data. Only used during unpickling of F# metadata. member x.AsType = @@ -2003,7 +2264,7 @@ and | _ -> ty /// Indicates if a type variable has been linked. Only used during unpickling of F# metadata. - member x.IsLinked = match box x.typar_attribs with null -> false | _ -> true + member x.IsLinked = x.typar_stamp <> -1L /// Indicates if a type variable has been solved. member x.IsSolved = @@ -2016,21 +2277,29 @@ and /// Sets the rigidity of a type variable member x.SetRigidity b = let flags = x.typar_flags in x.typar_flags <- TyparFlags(flags.Kind, b, flags.IsFromError, flags.IsCompilerGenerated, flags.StaticReq, flags.DynamicReq, flags.EqualityConditionalOn, flags.ComparisonConditionalOn) + /// Sets whether a type variable is compiler generated member x.SetCompilerGenerated b = let flags = x.typar_flags in x.typar_flags <- TyparFlags(flags.Kind, flags.Rigidity, flags.IsFromError, b, flags.StaticReq, flags.DynamicReq, flags.EqualityConditionalOn, flags.ComparisonConditionalOn) + /// Sets whether a type variable has a static requirement member x.SetStaticReq b = let flags = x.typar_flags in x.typar_flags <- TyparFlags(flags.Kind, flags.Rigidity, flags.IsFromError, flags.IsCompilerGenerated, b, flags.DynamicReq, flags.EqualityConditionalOn, flags.ComparisonConditionalOn) + /// Sets whether a type variable is required at runtime member x.SetDynamicReq b = let flags = x.typar_flags in x.typar_flags <- TyparFlags(flags.Kind, flags.Rigidity, flags.IsFromError, flags.IsCompilerGenerated, flags.StaticReq, b , flags.EqualityConditionalOn, flags.ComparisonConditionalOn) + /// Sets whether the equality constraint of a type definition depends on this type variable member x.SetEqualityDependsOn b = let flags = x.typar_flags in x.typar_flags <- TyparFlags(flags.Kind, flags.Rigidity, flags.IsFromError, flags.IsCompilerGenerated, flags.StaticReq, flags.DynamicReq, b , flags.ComparisonConditionalOn) + /// Sets whether the comparison constraint of a type definition depends on this type variable member x.SetComparisonDependsOn b = let flags = x.typar_flags in x.typar_flags <- TyparFlags(flags.Kind, flags.Rigidity, flags.IsFromError, flags.IsCompilerGenerated, flags.StaticReq, flags.DynamicReq, flags.EqualityConditionalOn, b) + [] + member x.DebugText = x.ToString() + override x.ToString() = x.Name and - [] + [] TyparConstraint = /// Indicates a constraint that a type is a subtype of the given type | CoercesTo of TType * range @@ -2072,10 +2341,16 @@ and /// Indicates a constraint that a type is .NET unmanaged type | IsUnmanaged of range + + // %+A formatting is used, so this is not needed + //[] + //member x.DebugText = x.ToString() + + override x.ToString() = sprintf "%+A" x /// The specification of a member constraint that must be solved and - [] + [] TraitConstraintInfo = /// TTrait(tys,nm,memFlags,argtys,rty,colution) @@ -2086,22 +2361,29 @@ and /// Get the member name associated with the member constraint. member x.MemberName = (let (TTrait(_,nm,_,_,_,_)) = x in nm) + /// Get the return type recorded in the member constraint. member x.ReturnType = (let (TTrait(_,_,_,_,ty,_)) = x in ty) + /// Get or set the solution of the member constraint during inference member x.Solution with get() = (let (TTrait(_,_,_,_,_,sln)) = x in sln.Value) and set v = (let (TTrait(_,_,_,_,_,sln)) = x in sln.Value <- v) + + [] + member x.DebugText = x.ToString() + + override x.ToString() = "TTrait(" + x.MemberName + ")" and - [] + [] /// Indicates the solution of a member constraint during inference. TraitConstraintSln = - /// FSMethSln(typ, vref, minst) + /// FSMethSln(ty, vref, minst) /// /// Indicates a trait is solved by an F# method. - /// typ -- the type and its instantiation + /// ty -- the type and its instantiation /// vref -- the method that solves the trait constraint /// minst -- the generic method instantiation | FSMethSln of TType * ValRef * TypeInst @@ -2114,10 +2396,10 @@ and /// isSetProp -- indicates if this is a set of a record field | FSRecdFieldSln of TypeInst * RecdFieldRef * bool - /// ILMethSln(typ, extOpt, ilMethodRef, minst) + /// ILMethSln(ty, extOpt, ilMethodRef, minst) /// /// Indicates a trait is solved by a .NET method. - /// typ -- the type and its instantiation + /// ty -- the type and its instantiation /// extOpt -- information about an extension member, if any /// ilMethodRef -- the method that solves the trait constraint /// minst -- the generic method instantiation @@ -2131,8 +2413,14 @@ and /// Indicates a trait is solved by a 'fake' instance of an operator, like '+' on integers | BuiltInSln + // %+A formatting is used, so this is not needed + //[] + //member x.DebugText = x.ToString() + + override x.ToString() = sprintf "%+A" x + /// The partial information used to index the methods of all those in a ModuleOrNamespace. -and [] +and [] ValLinkagePartialKey = { /// The name of the type with which the member is associated. None for non-member values. MemberParentMangledName : string option @@ -2146,9 +2434,16 @@ and [] /// Indicates the total argument count of the member. TotalArgCount: int } + [] + member x.DebugText = x.ToString() + + override x.ToString() = "ValLinkagePartialKey(" + x.LogicalName + ")" + /// The full information used to identify a specific overloaded method /// amongst all those in a ModuleOrNamespace. -and ValLinkageFullKey(partialKey: ValLinkagePartialKey, typeForLinkage:TType option) = +and + [< (* NoEquality; NoComparison; *) StructuredFormatDisplay("{DebugText}")>] + ValLinkageFullKey(partialKey: ValLinkagePartialKey, typeForLinkage:TType option) = /// The partial information used to index the value in a ModuleOrNamespace. member x.PartialKey = partialKey @@ -2156,56 +2451,27 @@ and ValLinkageFullKey(partialKey: ValLinkagePartialKey, typeForLinkage:TType op /// The full type of the value for the purposes of linking. May be None for non-members, since they can't be overloaded. member x.TypeForLinkage = typeForLinkage + [] + member x.DebugText = x.ToString() -and ValData = Val -and [] - Val = - // ValData is 19 words!! CONSIDER THIS TINY FORMAT, for all local, immutable, attribute-free values - // val_logical_name: string - // val_range: range - // mutable val_type: TType - // val_stamp: Stamp - - { - /// MUTABILITY: for unpickle linkage - mutable val_logical_name: string + override x.ToString() = "ValLinkageFullKey(" + partialKey.LogicalName + ")" +and + [] + ValOptionalData = + { /// MUTABILITY: for unpickle linkage mutable val_compiled_name: string option - /// MUTABILITY: for unpickle linkage - mutable val_range: range - /// If this field is populated, this is the implementation range for an item in a signature, otherwise it is /// the signature range for an item in an implementation - mutable val_other_range: (range * bool) option - - mutable val_type: TType - - /// MUTABILITY: for unpickle linkage - mutable val_stamp: Stamp - - /// See vflags section further below for encoding/decodings here - mutable val_flags: ValFlags - - mutable val_const: Const option - - /// What is the original, unoptimized, closed-term definition, if any? - /// Used to implement [] - mutable val_defn: Expr option - - /// How visible is this? - /// MUTABILITY: for unpickle linkage - mutable val_access: Accessibility - - /// Is the value actually an instance method/property/event that augments - /// a type, and if so what name does it take in the IL? - /// MUTABILITY: for unpickle linkage - mutable val_member_info: ValMemberInfo option + mutable val_other_range: (range * bool) option - /// Custom attributes attached to the value. These contain references to other values (i.e. constructors in types). Mutable to fixup - /// these value references after copying a collection of values. - mutable val_attribs: Attribs + mutable val_const: Const option + + /// What is the original, unoptimized, closed-term definition, if any? + /// Used to implement [] + mutable val_defn: Expr option // MUTABILITY CLEANUP: mutability of this field is used by // -- adjustAllUsesOfRecValue @@ -2216,29 +2482,70 @@ and [] // type-checked expression. mutable val_repr_info: ValReprInfo option + /// How visible is this? + /// MUTABILITY: for unpickle linkage + mutable val_access: Accessibility + + /// XML documentation attached to a value. + /// MUTABILITY: for unpickle linkage + mutable val_xmldoc : XmlDoc + + /// Is the value actually an instance method/property/event that augments + /// a type, and if so what name does it take in the IL? + /// MUTABILITY: for unpickle linkage + mutable val_member_info: ValMemberInfo option + // MUTABILITY CLEANUP: mutability of this field is used by // -- LinearizeTopMatch // // The fresh temporary should just be created with the right parent - mutable val_actual_parent: ParentRef + mutable val_declaring_entity: ParentRef - /// XML documentation attached to a value. - /// MUTABILITY: for unpickle linkage - mutable val_xmldoc : XmlDoc - /// XML documentation signature for the value - mutable val_xmldocsig : string } + mutable val_xmldocsig : string + + /// Custom attributes attached to the value. These contain references to other values (i.e. constructors in types). Mutable to fixup + /// these value references after copying a collection of values. + mutable val_attribs: Attribs + } + + [] + member x.DebugText = x.ToString() + + override x.ToString() = "ValOptionalData(...)" + +and ValData = Val +and [] + Val = + { + /// Mutable for unpickle linkage + mutable val_logical_name: string + + /// Mutable for unpickle linkage + mutable val_range: range + + mutable val_type: TType + + /// Mutable for unpickle linkage + mutable val_stamp: Stamp + + /// See vflags section further below for encoding/decodings here + mutable val_flags: ValFlags + + mutable val_opt_data : ValOptionalData option } + + static member EmptyValOptData = { val_compiled_name = None; val_other_range = None; val_const = None; val_defn = None; val_repr_info = None; val_access = TAccess []; val_xmldoc = XmlDoc.Empty; val_member_info = None; val_declaring_entity = ParentNone; val_xmldocsig = String.Empty; val_attribs = [] } /// Range of the definition (implementation) of the value, used by Visual Studio member x.DefinitionRange = - match x.val_other_range with - | Some (m,true) -> m + match x.val_opt_data with + | Some { val_other_range = Some(m,true) } -> m | _ -> x.val_range /// Range of the definition (signature) of the value, used by Visual Studio member x.SigRange = - match x.val_other_range with - | Some (m,false) -> m + match x.val_opt_data with + | Some { val_other_range = Some(m,false) } -> m | _ -> x.val_range /// The place where the value was defined. @@ -2255,10 +2562,16 @@ and [] member x.Type = x.val_type /// How visible is this value, function or member? - member x.Accessibility = x.val_access + member x.Accessibility = + match x.val_opt_data with + | Some optData -> optData.val_access + | _ -> TAccess [] /// The value of a value or member marked with [] - member x.LiteralValue = x.val_const + member x.LiteralValue = + match x.val_opt_data with + | Some optData -> optData.val_const + | _ -> None /// Records the "extra information" for a value compiled as a method. /// @@ -2275,7 +2588,10 @@ and [] /// /// TLR also sets this for inner bindings that it wants to /// represent as "top level" bindings. - member x.ValReprInfo : ValReprInfo option = x.val_repr_info + member x.ValReprInfo : ValReprInfo option = + match x.val_opt_data with + | Some optData -> optData.val_repr_info + | _ -> None member x.Id = ident(x.LogicalName,x.Range) @@ -2289,20 +2605,19 @@ and [] /// 'let x = let y = 1 in y + y' (NOTE: check this, don't take it as gospel) member x.IsCompiledAsTopLevel = x.ValReprInfo.IsSome - /// The partial information used to index the methods of all those in a ModuleOrNamespace. - member x.LinkagePartialKey : ValLinkagePartialKey = + member x.GetLinkagePartialKey() : ValLinkagePartialKey = assert x.IsCompiledAsTopLevel { LogicalName = x.LogicalName - MemberParentMangledName = (if x.IsMember then Some x.MemberApparentParent.LogicalName else None) + MemberParentMangledName = (if x.IsMember then Some x.MemberApparentEntity.LogicalName else None) MemberIsOverride = x.IsOverrideOrExplicitImpl TotalArgCount = if x.IsMember then x.ValReprInfo.Value.TotalArgCount else 0 } /// The full information used to identify a specific overloaded method amongst all those in a ModuleOrNamespace. - member x.LinkageFullKey : ValLinkageFullKey = + member x.GetLinkageFullKey() : ValLinkageFullKey = assert x.IsCompiledAsTopLevel - ValLinkageFullKey(x.LinkagePartialKey, (if x.IsMember then Some x.Type else None)) - + let key = x.GetLinkagePartialKey() + ValLinkageFullKey(key, (if x.IsMember then Some x.Type else None)) /// Is this a member definition or module definition? member x.IsMemberOrModuleBinding = x.val_flags.IsMemberOrModuleBinding @@ -2311,13 +2626,19 @@ and [] member x.IsExtensionMember = x.val_flags.IsExtensionMember /// The quotation expression associated with a value given the [] tag - member x.ReflectedDefinition = x.val_defn + member x.ReflectedDefinition = + match x.val_opt_data with + | Some optData -> optData.val_defn + | _ -> None /// Is this a member, if so some more data about the member. /// /// Note, the value may still be (a) an extension member or (b) and abstract slot without /// a true body. These cases are often causes of bugs in the compiler. - member x.MemberInfo = x.val_member_info + member x.MemberInfo = + match x.val_opt_data with + | Some optData -> optData.val_member_info + | _ -> None /// Indicates if this is a member member x.IsMember = x.MemberInfo.IsSome @@ -2365,7 +2686,9 @@ and [] member x.HasBeenReferenced = x.val_flags.HasBeenReferenced /// Indicates if the backing field for a static value is suppressed. - member x.IsCompiledAsStaticPropertyWithoutField = x.val_flags.IsCompiledAsStaticPropertyWithoutField + member x.IsCompiledAsStaticPropertyWithoutField = + let hasValueAsStaticProperty = x.Attribs |> List.exists(fun (Attrib(tc,_,_,_,_,_,_)) -> tc.CompiledName = "ValueAsStaticPropertyAttribute") + x.val_flags.IsCompiledAsStaticPropertyWithoutField || hasValueAsStaticProperty /// Indicates if the value is pinned/fixed member x.IsFixed = x.val_flags.IsFixed @@ -2401,37 +2724,52 @@ and [] member x.IsCompilerGenerated = x.val_flags.IsCompilerGenerated /// Get the declared attributes for the value - member x.Attribs = x.val_attribs + member x.Attribs = + match x.val_opt_data with + | Some optData -> optData.val_attribs + | _ -> [] /// Get the declared documentation for the value - member x.XmlDoc = x.val_xmldoc + member x.XmlDoc = + match x.val_opt_data with + | Some optData -> optData.val_xmldoc + | _ -> XmlDoc.Empty ///Get the signature for the value's XML documentation member x.XmlDocSig - with get() = x.val_xmldocsig - and set(v) = x.val_xmldocsig <- v + with get() = + match x.val_opt_data with + | Some optData -> optData.val_xmldocsig + | _ -> String.Empty + and set(v) = + match x.val_opt_data with + | Some optData -> optData.val_xmldocsig <- v + | _ -> x.val_opt_data <- Some { Val.EmptyValOptData with val_xmldocsig = v } /// The parent type or module, if any (None for expression bindings and parameters) - member x.ActualParent = x.val_actual_parent + member x.DeclaringEntity = + match x.val_opt_data with + | Some optData -> optData.val_declaring_entity + | _ -> ParentNone /// Get the actual parent entity for the value (a module or a type), i.e. the entity under which the /// value will appear in compiled code. For extension members this is the module where the extension member /// is declared. - member x.TopValActualParent = - match x.ActualParent with + member x.TopValDeclaringEntity = + match x.DeclaringEntity with | Parent tcref -> tcref - | ParentNone -> error(InternalError("TopValActualParent: does not have a parent",x.Range)) + | ParentNone -> error(InternalError("TopValDeclaringEntity: does not have a parent",x.Range)) - member x.HasTopValActualParent = - match x.ActualParent with + member x.HasDeclaringEntity = + match x.DeclaringEntity with | Parent _ -> true | ParentNone -> false /// Get the apparent parent entity for a member - member x.MemberApparentParent : TyconRef = + member x.MemberApparentEntity : TyconRef = match x.MemberInfo with - | Some membInfo -> membInfo.ApparentParent - | None -> error(InternalError("MemberApparentParent",x.Range)) + | Some membInfo -> membInfo.ApparentEnclosingEntity + | None -> error(InternalError("MemberApparentEntity",x.Range)) /// Get the number of 'this'/'self' object arguments for the member. Instance extension members return '1'. member v.NumObjArgs = @@ -2442,10 +2780,10 @@ and [] /// Get the apparent parent entity for the value, i.e. the entity under with which the /// value is associated. For extension members this is the nominal type the member extends. /// For other values it is just the actual parent. - member x.ApparentParent = + member x.ApparentEnclosingEntity = match x.MemberInfo with - | Some membInfo -> Parent(membInfo.ApparentParent) - | None -> x.ActualParent + | Some membInfo -> Parent(membInfo.ApparentEnclosingEntity) + | None -> x.DeclaringEntity /// Get the public path to the value, if any? Should be set if and only if /// IsMemberOrModuleBinding is set. @@ -2453,17 +2791,17 @@ and [] // We use it here: // - in opt.fs : when compiling fslib, we bind an entry for the value in a global table (see bind_escaping_local_vspec) // - in ilxgen.fs: when compiling fslib, we bind an entry for the value in a global table (see bind_escaping_local_vspec) - // - in opt.fs : (fullDisplayTextOfValRef) for error reporting of non-inlinable values + // - in opt.fs : (fullDebugTextOfValRef) for error reporting of non-inlinable values // - in service.fs (boutput_item_description): to display the full text of a value's binding location // - in check.fs: as a boolean to detect public values for saving quotations // - in ilxgen.fs: as a boolean to detect public values for saving quotations // - in MakeExportRemapping, to build non-local references for values member x.PublicPath = - match x.ActualParent with + match x.DeclaringEntity with | Parent eref -> match eref.PublicPath with | None -> None - | Some p -> Some(ValPubPath(p,x.LinkageFullKey)) + | Some p -> Some(ValPubPath(p,x.GetLinkageFullKey())) | ParentNone -> None @@ -2503,6 +2841,11 @@ and [] | slotsig :: _ -> slotsig.Name | _ -> x.val_logical_name + member x.ValCompiledName = + match x.val_opt_data with + | Some optData -> optData.val_compiled_name + | _ -> None + /// The name of the method in compiled code (with some exceptions where ilxgen.fs decides not to use a method impl) /// - If this is a property then this is 'get_Foo' or 'set_Foo' /// - If this is an implementation of an abstract slot then this may be a mangled name @@ -2510,9 +2853,9 @@ and [] /// - If this is an operator then this is 'op_Addition' member x.CompiledName = let givenName = - match x.val_compiled_name with - | Some n -> n - | None -> x.LogicalName + match x.val_opt_data with + | Some { val_compiled_name = Some n } -> n + | _ -> x.LogicalName // These cases must get stable unique names for their static field & static property. This name // must be stable across quotation generation and IL code generation (quotations can refer to the // properties implicit in these) @@ -2532,14 +2875,13 @@ and [] else givenName - - /// - If this is a property then this is 'Foo' - /// - If this is an implementation of an abstract slot then this is the name of the property implemented by the abstract slot + /// The name of the property. + /// - If this is a property then this is 'Foo' + /// - If this is an implementation of an abstract slot then this is the name of the property implemented by the abstract slot member x.PropertyName = let logicalName = x.LogicalName ChopPropertyName logicalName - /// The name of the method. /// - If this is a property then this is 'Foo' /// - If this is an implementation of an abstract slot then this is the name of the method implemented by the abstract slot @@ -2562,34 +2904,58 @@ and [] member x.DisplayName = DemangleOperatorName x.CoreDisplayName - member x.SetValRec b = x.val_flags <- x.val_flags.SetRecursiveValInfo b - member x.SetIsMemberOrModuleBinding() = x.val_flags <- x.val_flags.SetIsMemberOrModuleBinding - member x.SetMakesNoCriticalTailcalls() = x.val_flags <- x.val_flags.SetMakesNoCriticalTailcalls - member x.SetHasBeenReferenced() = x.val_flags <- x.val_flags.SetHasBeenReferenced - member x.SetIsCompiledAsStaticPropertyWithoutField() = x.val_flags <- x.val_flags.SetIsCompiledAsStaticPropertyWithoutField - member x.SetIsFixed() = x.val_flags <- x.val_flags.SetIsFixed - member x.SetValReprInfo info = x.val_repr_info <- info + member x.SetValRec b = x.val_flags <- x.val_flags.WithRecursiveValInfo b + + member x.SetIsMemberOrModuleBinding() = x.val_flags <- x.val_flags.WithIsMemberOrModuleBinding + + member x.SetMakesNoCriticalTailcalls() = x.val_flags <- x.val_flags.WithMakesNoCriticalTailcalls + + member x.SetHasBeenReferenced() = x.val_flags <- x.val_flags.WithHasBeenReferenced + + member x.SetIsCompiledAsStaticPropertyWithoutField() = x.val_flags <- x.val_flags.WithIsCompiledAsStaticPropertyWithoutField + + member x.SetIsFixed() = x.val_flags <- x.val_flags.WithIsFixed + + member x.SetValReprInfo info = + match x.val_opt_data with + | Some optData -> optData.val_repr_info <- info + | _ -> x.val_opt_data <- Some { Val.EmptyValOptData with val_repr_info = info } + member x.SetType ty = x.val_type <- ty - member x.SetOtherRange m = x.val_other_range <- Some m + + member x.SetOtherRange m = + match x.val_opt_data with + | Some optData -> optData.val_other_range <- Some m + | _ -> x.val_opt_data <- Some { Val.EmptyValOptData with val_other_range = Some m } + + member x.SetDeclaringEntity parent = + match x.val_opt_data with + | Some optData -> optData.val_declaring_entity <- parent + | _ -> x.val_opt_data <- Some { Val.EmptyValOptData with val_declaring_entity = parent } + + member x.SetAttribs attribs = + match x.val_opt_data with + | Some optData -> optData.val_attribs <- attribs + | _ -> x.val_opt_data <- Some { Val.EmptyValOptData with val_attribs = attribs } + + member x.SetMemberInfo member_info = + match x.val_opt_data with + | Some optData -> optData.val_member_info <- Some member_info + | _ -> x.val_opt_data <- Some { Val.EmptyValOptData with val_member_info = Some member_info } + + member x.SetValDefn val_defn = + match x.val_opt_data with + | Some optData -> optData.val_defn <- Some val_defn + | _ -> x.val_opt_data <- Some { Val.EmptyValOptData with val_defn = Some val_defn } /// Create a new value with empty, unlinked data. Only used during unpickling of F# metadata. static member NewUnlinked() : Val = { val_logical_name = Unchecked.defaultof<_> - val_compiled_name = Unchecked.defaultof<_> val_range = Unchecked.defaultof<_> - val_other_range = Unchecked.defaultof<_> val_type = Unchecked.defaultof<_> val_stamp = Unchecked.defaultof<_> val_flags = Unchecked.defaultof<_> - val_const = Unchecked.defaultof<_> - val_defn = Unchecked.defaultof<_> - val_access = Unchecked.defaultof<_> - val_member_info = Unchecked.defaultof<_> - val_attribs = Unchecked.defaultof<_> - val_repr_info = Unchecked.defaultof<_> - val_actual_parent = Unchecked.defaultof<_> - val_xmldoc = Unchecked.defaultof<_> - val_xmldocsig = Unchecked.defaultof<_> } + val_opt_data = Unchecked.defaultof<_> } /// Create a new value with the given backing data. Only used during unpickling of F# metadata. @@ -2601,33 +2967,29 @@ and [] /// Set all the data on a value member x.SetData (tg: ValData) = x.val_logical_name <- tg.val_logical_name - x.val_compiled_name <- tg.val_compiled_name x.val_range <- tg.val_range - x.val_other_range <- tg.val_other_range x.val_type <- tg.val_type x.val_stamp <- tg.val_stamp x.val_flags <- tg.val_flags - x.val_const <- tg.val_const - x.val_defn <- tg.val_defn - x.val_access <- tg.val_access - x.val_member_info <- tg.val_member_info - x.val_attribs <- tg.val_attribs - x.val_repr_info <- tg.val_repr_info - x.val_actual_parent <- tg.val_actual_parent - x.val_xmldoc <- tg.val_xmldoc - x.val_xmldocsig <- tg.val_xmldocsig + match tg.val_opt_data with + | Some tg -> x.val_opt_data <- Some { val_compiled_name = tg.val_compiled_name; val_other_range = tg.val_other_range; val_const = tg.val_const; val_defn = tg.val_defn; val_repr_info = tg.val_repr_info; val_access = tg.val_access; val_xmldoc = tg.val_xmldoc; val_member_info = tg.val_member_info; val_declaring_entity = tg.val_declaring_entity; val_xmldocsig = tg.val_xmldocsig; val_attribs = tg.val_attribs } + | None -> () /// Indicates if a value is linked to backing data yet. Only used during unpickling of F# metadata. - member x.IsLinked = match box x.val_attribs with null -> false | _ -> true + member x.IsLinked = match box x.val_logical_name with null -> false | _ -> true + + [] + member x.DebugText = x.ToString() override x.ToString() = x.LogicalName and - [] + /// Represents the extra information stored for a member + [] ValMemberInfo = { /// The parent type. For an extension member this is the type being extended - ApparentParent: TyconRef + ApparentEnclosingEntity: TyconRef /// Updated with the full implemented slotsig after interface implementation relation is checked mutable ImplementedSlotSigs: SlotSig list @@ -2637,9 +2999,13 @@ and MemberFlags: MemberFlags } + [] + member x.DebugText = x.ToString() + + override x.ToString() = "ValMemberInfo(...)" and - [] + [] NonLocalValOrMemberRef = { /// A reference to the entity containing the value or member. This will always be a non-local reference EnclosingEntity : EntityRef @@ -2647,29 +3013,45 @@ and /// The name of the value, or the full signature of the member ItemKey: ValLinkageFullKey } + /// Get the thunk for the assembly referred to member x.Ccu = x.EnclosingEntity.nlr.Ccu + + /// Get the name of the assembly referred to member x.AssemblyName = x.EnclosingEntity.nlr.AssemblyName - member x.Display = x.ToString() + + /// For debugging + [] + member x.DebugText = x.ToString() + + /// For debugging override x.ToString() = x.EnclosingEntity.nlr.ToString() + "::" + x.ItemKey.PartialKey.LogicalName -and ValPublicPath = +and + [] + ValPublicPath = | ValPubPath of PublicPath * ValLinkageFullKey + [] + member x.DebugText = x.ToString() + + override __.ToString() = sprintf "ValPubPath(...)" + /// Index into the namespace/module structure of a particular CCU -and NonLocalEntityRef = +and + [] + NonLocalEntityRef = | NonLocalEntityRef of CcuThunk * string[] /// Try to find the entity corresponding to the given path in the given CCU static member TryDerefEntityPath(ccu: CcuThunk, path:string[], i:int, entity:Entity) = - if i >= path.Length then VSome entity + if i >= path.Length then ValueSome entity else - let next = entity.ModuleOrNamespaceType.AllEntitiesByCompiledAndLogicalMangledNames.TryFind(path.[i]) - match next with - | Some res -> NonLocalEntityRef.TryDerefEntityPath(ccu, path, (i+1), res) + match entity.ModuleOrNamespaceType.AllEntitiesByCompiledAndLogicalMangledNames.TryGetValue path.[i] with + | true, res -> NonLocalEntityRef.TryDerefEntityPath(ccu, path, (i+1), res) #if !NO_EXTENSIONTYPING - | None -> NonLocalEntityRef.TryDerefEntityPathViaProvidedType(ccu, path, i, entity) + | _ -> NonLocalEntityRef.TryDerefEntityPathViaProvidedType(ccu, path, i, entity) #else - | None -> VNone + | _ -> ValueNone #endif #if !NO_EXTENSIONTYPING @@ -2687,11 +3069,11 @@ and NonLocalEntityRef = // types until i = path.Length-1. Create the Tycon's as needed let rec tryResolveNestedTypeOf(parentEntity:Entity,resolutionEnvironment,st:Tainted,i) = match st.PApply((fun st -> st.GetNestedType path.[i]),m) with - | Tainted.Null -> VNone + | Tainted.Null -> ValueNone | st -> let newEntity = Construct.NewProvidedTycon(resolutionEnvironment, st, ccu.ImportProvidedType, false, m) parentEntity.ModuleOrNamespaceType.AddProvidedTypeEntity(newEntity) - if i = path.Length-1 then VSome(newEntity) + if i = path.Length-1 then ValueSome(newEntity) else tryResolveNestedTypeOf(newEntity,resolutionEnvironment,st,i+1) tryResolveNestedTypeOf(entity,resolutionEnvironment,st,i) @@ -2749,18 +3131,18 @@ and NonLocalEntityRef = // newEntity is at 'j' NonLocalEntityRef.TryDerefEntityPath(ccu, path, (j+1), newEntity) - | [] -> VNone + | [] -> ValueNone | _ -> failwith "Unexpected" let rec tryResolvePrefixes j = - if j >= path.Length then VNone + if j >= path.Length then ValueNone else match tryResolvePrefix j with - | VNone -> tryResolvePrefixes (j+1) - | VSome res -> VSome res + | ValueNone -> tryResolvePrefixes (j+1) + | ValueSome res -> ValueSome res tryResolvePrefixes i - | _ -> VNone + | _ -> ValueNone #endif /// Try to link a non-local entity reference to an actual entity @@ -2769,11 +3151,11 @@ and NonLocalEntityRef = if canError then ccu.EnsureDerefable(path) - if ccu.IsUnresolvedReference then VNone else + if ccu.IsUnresolvedReference then ValueNone else match NonLocalEntityRef.TryDerefEntityPath(ccu, path, 0, ccu.Contents) with - | VSome _ as r -> r - | VNone -> + | ValueSome _ as r -> r + | ValueNone -> // OK, the lookup failed. Check if we can redirect through a type forwarder on this assembly. // Look for a forwarder for each prefix-path let rec tryForwardPrefixPath i = @@ -2783,7 +3165,7 @@ and NonLocalEntityRef = | Some tcref -> NonLocalEntityRef.TryDerefEntityPath(ccu, path, (i+1), tcref.Deref) | None -> tryForwardPrefixPath (i+1) else - VNone + ValueNone tryForwardPrefixPath 0 /// Get the CCU referenced by the nonlocal reference. @@ -2815,8 +3197,8 @@ and NonLocalEntityRef = /// Dereference the nonlocal reference, and raise an error if this fails. member nleref.Deref = match nleref.TryDeref(canError=true) with - | VSome res -> res - | VNone -> + | ValueSome res -> res + | ValueNone -> errorR (InternalUndefinedItemRef (FSComp.SR.tastUndefinedItemRefModuleNamespace, nleref.DisplayName, nleref.AssemblyName, "")) raise (KeyNotFoundException()) @@ -2824,11 +3206,13 @@ and NonLocalEntityRef = member nleref.ModuleOrNamespaceType = nleref.Deref.ModuleOrNamespaceType + [] + member x.DebugText = x.ToString() + override x.ToString() = x.DisplayName and - [] - [] + [] EntityRef = { /// Indicates a reference to something bound in this CCU mutable binding: NonNullSlot @@ -2846,9 +3230,9 @@ and member private tcr.Resolve(canError) = let res = tcr.nlr.TryDeref(canError) match res with - | VSome r -> + | ValueSome r -> tcr.binding <- nullableSlotFull r - | VNone -> + | ValueNone -> () /// Dereference the TyconRef to a Tycon. Amortize the cost of doing this. @@ -2869,20 +3253,14 @@ and | null -> tcr.Resolve(canError=false) match box tcr.binding with - | null -> VNone - | _ -> VSome tcr.binding + | null -> ValueNone + | _ -> ValueSome tcr.binding | _ -> - VSome tcr.binding + ValueSome tcr.binding /// Is the destination assembly available? - member tcr.CanDeref = tcr.TryDeref.IsSome - - override x.ToString() = - if x.IsLocalRef then - x.ResolvedTarget.DisplayName - else - x.nlr.DisplayName + member tcr.CanDeref = ValueOption.isSome tcr.TryDeref /// Gets the data indicating the compiled representation of a type or module in terms of Abstract IL data structures. member x.CompiledRepresentation = x.Deref.CompiledRepresentation @@ -3123,6 +3501,18 @@ and /// Indicates if this is an F# type definition whose r.h.s. is known to be some kind of F# object model definition member x.IsFSharpObjectModelTycon = x.Deref.IsFSharpObjectModelTycon + /// The on-demand analysis about whether the entity has the IsByRefLike attribute + member x.TryIsByRefLike = x.Deref.TryIsByRefLike + + /// Set the on-demand analysis about whether the entity has the IsByRefLike attribute + member x.SetIsByRefLike b = x.Deref.SetIsByRefLike b + + /// The on-demand analysis about whether the entity has the IsByRefLike attribute + member x.TryIsReadOnly = x.Deref.TryIsReadOnly + + /// Set the on-demand analysis about whether the entity has the IsReadOnly attribute or is otherwise determined to be a readonly struct + member x.SetIsReadOnly b = x.Deref.SetIsReadOnly b + /// Indicates if this is an F# type definition whose r.h.s. definition is unknown (i.e. a traditional ML 'abstract' type in a signature, /// which in F# is called a 'unknown representation' type). member x.IsHiddenReprTycon = x.Deref.IsHiddenReprTycon @@ -3164,6 +3554,15 @@ and member x.MakeNestedUnionCaseRef (uc: UnionCase) = UCRef (x, uc.Id.idText) + [] + member x.DebugText = x.ToString() + + override x.ToString() = + if x.IsLocalRef then + x.ResolvedTarget.DisplayName + else + x.nlr.DisplayName + /// note: ModuleOrNamespaceRef and TyconRef are type equivalent and ModuleOrNamespaceRef = EntityRef @@ -3172,8 +3571,7 @@ and TyconRef = EntityRef /// References are either local or nonlocal and - [] - [] + [] ValRef = { /// Indicates a reference to something bound in this CCU mutable binding: NonNullSlot @@ -3196,8 +3594,8 @@ and let e = nlr.EnclosingEntity.Deref let possible = e.ModuleOrNamespaceType.TryLinkVal(nlr.EnclosingEntity.nlr.Ccu, nlr.ItemKey) match possible with - | VNone -> error (InternalUndefinedItemRef (FSComp.SR.tastUndefinedItemRefVal, e.DisplayNameWithStaticParameters, nlr.AssemblyName, sprintf "%+A" nlr.ItemKey.PartialKey)) - | VSome h -> h + | ValueNone -> error (InternalUndefinedItemRef (FSComp.SR.tastUndefinedItemRefVal, e.DisplayNameWithStaticParameters, nlr.AssemblyName, sprintf "%+A" nlr.ItemKey.PartialKey)) + | ValueSome h -> h vr.binding <- nullableSlotFull res res else vr.binding @@ -3207,14 +3605,14 @@ and if obj.ReferenceEquals(vr.binding, null) then let resOpt = match vr.nlr.EnclosingEntity.TryDeref with - | VNone -> VNone - | VSome e -> e.ModuleOrNamespaceType.TryLinkVal(vr.nlr.EnclosingEntity.nlr.Ccu, vr.nlr.ItemKey) + | ValueNone -> ValueNone + | ValueSome e -> e.ModuleOrNamespaceType.TryLinkVal(vr.nlr.EnclosingEntity.nlr.Ccu, vr.nlr.ItemKey) match resOpt with - | VNone -> () - | VSome res -> + | ValueNone -> () + | ValueSome res -> vr.binding <- nullableSlotFull res resOpt - else VSome vr.binding + else ValueSome vr.binding /// The type of the value. May be a TType_forall for a generic value. /// May be a type variable or type containing type variables during type inference. @@ -3240,12 +3638,12 @@ and member x.Accessibility = x.Deref.Accessibility /// The parent type or module, if any (None for expression bindings and parameters) - member x.ActualParent = x.Deref.ActualParent + member x.DeclaringEntity = x.Deref.DeclaringEntity /// Get the apparent parent entity for the value, i.e. the entity under with which the /// value is associated. For extension members this is the nominal type the member extends. /// For other values it is just the actual parent. - member x.ApparentParent = x.Deref.ApparentParent + member x.ApparentEnclosingEntity = x.Deref.ApparentEnclosingEntity member x.DefinitionRange = x.Deref.DefinitionRange @@ -3373,23 +3771,28 @@ and /// Get the actual parent entity for the value (a module or a type), i.e. the entity under which the /// value will appear in compiled code. For extension members this is the module where the extension member /// is declared. - member x.TopValActualParent = x.Deref.TopValActualParent + member x.TopValDeclaringEntity = x.Deref.TopValDeclaringEntity // Can be false for members after error recovery - member x.HasTopValActualParent = x.Deref.HasTopValActualParent + member x.HasDeclaringEntity = x.Deref.HasDeclaringEntity /// Get the apparent parent entity for a member - member x.MemberApparentParent = x.Deref.MemberApparentParent + member x.MemberApparentEntity = x.Deref.MemberApparentEntity /// Get the number of 'this'/'self' object arguments for the member. Instance extension members return '1'. member x.NumObjArgs = x.Deref.NumObjArgs + [] + member x.DebugText = x.ToString() + override x.ToString() = if x.IsLocalRef then x.ResolvedTarget.DisplayName else x.nlr.ToString() /// Represents a reference to a case of a union type -and UnionCaseRef = +and + [] + UnionCaseRef = | UCRef of TyconRef * string /// Get a reference to the type containing this union case @@ -3408,7 +3811,7 @@ and UnionCaseRef = | None -> error(InternalError(sprintf "union case %s not found in type %s" x.CaseName x.TyconRef.LogicalName, x.TyconRef.Range)) /// Try to dereference the reference - member x.TryUnionCase = x.TyconRef.TryDeref |> ValueOption.bind (fun tcref -> tcref.GetUnionCaseByName x.CaseName |> ValueOption.ofOption) + member x.TryUnionCase = x.TyconRef.TryDeref |> ValueOption.bind (fun tcref -> tcref.GetUnionCaseByName x.CaseName |> ValueOption.ofOption) /// Get the attributes associated with the union case member x.Attribs = x.UnionCase.Attribs @@ -3439,8 +3842,15 @@ and UnionCaseRef = /// Get a field of the union case by index member x.FieldByIndex n = x.UnionCase.FieldTable.FieldByIndex n + [] + member x.DebugText = x.ToString() + + override x.ToString() = x.CaseName + /// Represents a reference to a field in a record, class or struct -and RecdFieldRef = +and + [] + RecdFieldRef = | RFRef of TyconRef * string /// Get a reference to the type containing this union case @@ -3482,9 +3892,14 @@ and RecdFieldRef = with :? KeyNotFoundException -> error(InternalError(sprintf "field %s not found in type %s" id tcref.LogicalName, tcref.Range)) + [] + member x.DebugText = x.ToString() + + override x.ToString() = x.FieldName + and /// The algebra of types - [] + [] TType = /// TType_forall(typars, bodyTy). @@ -3520,20 +3935,6 @@ and /// Indicates the type is a unit-of-measure expression being used as an argument to a type or member | TType_measure of Measure - override x.ToString() = - match x with - | TType_forall (_tps,ty) -> "forall _. " + ty.ToString() - | TType_app (tcref, tinst) -> tcref.DisplayName + (match tinst with [] -> "" | tys -> "<" + String.concat "," (List.map string tys) + ">") - | TType_tuple (tupInfo, tinst) -> - (match tupInfo with - | TupInfo.Const false -> "" - | TupInfo.Const true -> "struct ") - + String.concat "," (List.map string tinst) + ")" - | TType_fun (d,r) -> "(" + string d + " -> " + string r + ")" - | TType_ucase (uc,tinst) -> "union case type " + uc.CaseName + (match tinst with [] -> "" | tys -> "<" + String.concat "," (List.map string tys) + ">") - | TType_var tp -> tp.DisplayName - | TType_measure ms -> sprintf "%A" ms - /// For now, used only as a discriminant in error message. /// See https://github.com/Microsoft/visualfsharp/issues/2561 member x.GetAssemblyName() = @@ -3548,14 +3949,37 @@ and let (TILObjectReprData(scope,_nesting,_definition)) = _uc.Tycon.ILTyconInfo scope.QualifiedName + [] + member x.DebugText = x.ToString() + + override x.ToString() = + match x with + | TType_forall (_tps,ty) -> "forall ... " + ty.ToString() + | TType_app (tcref, tinst) -> tcref.DisplayName + (match tinst with [] -> "" | tys -> "<" + String.concat "," (List.map string tys) + ">") + | TType_tuple (tupInfo, tinst) -> + (match tupInfo with + | TupInfo.Const false -> "" + | TupInfo.Const true -> "struct ") + + String.concat "," (List.map string tinst) + ")" + | TType_fun (d,r) -> "(" + string d + " -> " + string r + ")" + | TType_ucase (uc,tinst) -> "ucase " + uc.CaseName + (match tinst with [] -> "" | tys -> "<" + String.concat "," (List.map string tys) + ">") + | TType_var tp -> + match tp.Solution with + | None -> tp.DisplayName + | Some _ -> tp.DisplayName + " (solved)" + | TType_measure ms -> ms.ToString() + and TypeInst = TType list + and TTypes = TType list and [] TupInfo = /// Some constant, e.g. true or false for tupInfo | Const of bool -and [] Measure = +and + [] + Measure = /// A variable unit-of-measure | Var of Typar @@ -3574,9 +3998,14 @@ and [] Measure = /// Raising a measure to a rational power | RationalPower of Measure * Rational + // %+A formatting is used, so this is not needed + //[] + //member x.DebugText = x.ToString() + + override x.ToString() = sprintf "%+A" x and - [] + [] CcuData = { /// Holds the filename for the DLL, if any FileName: string option @@ -3615,6 +4044,10 @@ and // NOTE: may contain transient state during typechecking mutable Contents: ModuleOrNamespace + /// A helper function used to link method signatures using type equality. This is effectively a forward call to the type equality + /// logic in tastops.fs + TryGetILModuleDef: (unit -> ILModuleDef option) + /// A helper function used to link method signatures using type equality. This is effectively a forward call to the type equality /// logic in tastops.fs MemberSignatureEquality : (TType -> TType -> bool) @@ -3622,6 +4055,11 @@ and /// The table of .NET CLI type forwarders for this assembly TypeForwarders : CcuTypeForwarderTable } + [] + member x.DebugText = x.ToString() + + override x.ToString() = sprintf "CcuData(%A)" x.FileName + /// Represents a table of .NET CLI type forwarders for an assembly and CcuTypeForwarderTable = Map> @@ -3646,7 +4084,9 @@ and CcuReference = string // ILAssemblyRef /// by ccu-thunks. Ultimately, a ccu-thunk is either a (named) element of /// the data structure, or it is a delayed fixup, i.e. an invalid dangling /// reference that has not had an appropriate fixup applied. -and CcuThunk = +and + [] + CcuThunk = { mutable target: CcuData /// ccu.orphanfixup is true when a reference is missing in the transitive closure of static references that @@ -3687,6 +4127,9 @@ and CcuThunk = /// Holds the filename for the DLL, if any member ccu.FileName = ccu.Deref.FileName + /// Try to get the .NET Assembly, if known. May not be present for `IsFSharp` for in-memory cross-project references + member ccu.TryGetILModuleDef() = ccu.Deref.TryGetILModuleDef() + #if !NO_EXTENSIONTYPING /// Is the CCu an EST injected assembly member ccu.IsProviderGenerated = ccu.Deref.IsProviderGenerated @@ -3755,30 +4198,52 @@ and CcuThunk = /// Try to resolve a path into the CCU by referencing the .NET/CLI type forwarder table of the CCU member ccu.TryForward(nlpath:string[],item:string) : EntityRef option = ccu.EnsureDerefable(nlpath) - match ccu.TypeForwarders.TryFind(nlpath,item) with - | Some entity -> Some(entity.Force()) - | None -> None + let key = nlpath,item + match ccu.TypeForwarders.TryGetValue key with + | true, entity -> Some(entity.Force()) + | _ -> None //printfn "trying to forward %A::%s from ccu '%s', res = '%A'" p n ccu.AssemblyName res.IsSome /// Used to make forward calls into the type/assembly loader when comparing member signatures during linking member ccu.MemberSignatureEquality(ty1:TType, ty2:TType) = ccu.Deref.MemberSignatureEquality ty1 ty2 + [] + member x.DebugText = x.ToString() + override ccu.ToString() = ccu.AssemblyName /// The result of attempting to resolve an assembly name to a full ccu. /// UnresolvedCcu will contain the name of the assembly that could not be resolved. -and CcuResolutionResult = +and + [] + CcuResolutionResult = + | ResolvedCcu of CcuThunk + | UnresolvedCcu of string + [] + member x.DebugText = x.ToString() + + override x.ToString() = match x with ResolvedCcu ccu -> ccu.ToString() | UnresolvedCcu s -> "unresolved " + s + /// Represents the information saved in the assembly signature data resource for an F# assembly -and PickledCcuInfo = - { mspec: ModuleOrNamespace +and + [] + PickledCcuInfo = + { mspec: ModuleOrNamespace + + compileTimeWorkingDir: string + + usesQuotations : bool } + + [] + member x.DebugText = x.ToString() + + override __.ToString() = "PickledCcuInfo(...)" - compileTimeWorkingDir: string - usesQuotations : bool } //--------------------------------------------------------------------------- // Attributes @@ -3786,25 +4251,60 @@ and PickledCcuInfo = and Attribs = Attrib list -and AttribKind = +and + [] + AttribKind = + /// Indicates an attribute refers to a type defined in an imported .NET assembly | ILAttrib of ILMethodRef + /// Indicates an attribute refers to a type defined in an imported F# assembly | FSAttrib of ValRef + // %+A formatting is used, so this is not needed + //[] + //member x.DebugText = x.ToString() + + override x.ToString() = sprintf "%+A" x + /// Attrib(kind,unnamedArgs,propVal,appliedToAGetterOrSetter,targetsOpt,range) -and Attrib = +and + [] + Attrib = + | Attrib of TyconRef * AttribKind * AttribExpr list * AttribNamedArg list * bool * AttributeTargets option * range + [] + member x.DebugText = x.ToString() + + member x.TyconRef = (let (Attrib(tcref, _, _, _, _, _, _)) = x in tcref) + + override x.ToString() = "attrib" + x.TyconRef.ToString() + /// We keep both source expression and evaluated expression around to help intellisense and signature printing -and AttribExpr = +and + [] + AttribExpr = + /// AttribExpr(source, evaluated) | AttribExpr of Expr * Expr + [] + member x.DebugText = x.ToString() + + override x.ToString() = sprintf "AttribExpr(...)" + /// AttribNamedArg(name,type,isField,value) -and AttribNamedArg = +and + [] + AttribNamedArg = | AttribNamedArg of (string*TType*bool*AttribExpr) + [] + member x.DebugText = x.ToString() + + override x.ToString() = sprintf "AttribNamedArg(...)" + /// Constants in expressions and [] Const = @@ -3822,18 +4322,18 @@ and [] | Single of single | Double of double | Char of char - | String of string // in unicode + | String of string | Decimal of Decimal | Unit | Zero // null/zero-bit-pattern - /// Decision trees. Pattern matching has been compiled down to /// a decision tree by this point. The right-hand-sides (actions) of +/// a decision tree by this point. The right-hand-sides (actions) of /// the decision tree are labelled by integers that are unique for that /// particular tree. and - [] + [] DecisionTree = /// TDSwitch(input, cases, default, range) @@ -3862,8 +4362,16 @@ and /// body -- the rest of the decision tree | TDBind of Binding * DecisionTree + // %+A formatting is used, so this is not needed + //[] + //member x.DebugText = x.ToString() + + override x.ToString() = sprintf "%+A" x + /// Represents a test and a subsequent decision tree -and DecisionTreeCase = +and + [] + DecisionTreeCase = | TCase of DecisionTreeTest * DecisionTree /// Get the discriminator associated with the case @@ -3872,8 +4380,13 @@ and DecisionTreeCase = /// Get the decision tree or a successful test member x.CaseTree = let (TCase(_,d)) = x in d + [] + member x.DebugText = x.ToString() + + override x.ToString() = sprintf "DecisionTreeCase(...)" + and - [] + [] DecisionTreeTest = /// Test if the input to a decision tree matches the given union case | UnionCase of UnionCaseRef * TypeInst @@ -3903,16 +4416,30 @@ and /// activePatternInfo -- The extracted info for the active pattern. | ActivePatternCase of Expr * TTypes * (ValRef * TypeInst) option * int * ActivePatternInfo + // %+A formatting is used, so this is not needed + //[] + //member x.DebugText = x.ToString() + + override x.ToString() = sprintf "%+A" x /// A target of a decision tree. Can be thought of as a little function, though is compiled as a local block. -and DecisionTreeTarget = +and + [] + DecisionTreeTarget = | TTarget of Vals * Expr * SequencePointInfoForTarget + [] + member x.DebugText = x.ToString() + + override x.ToString() = sprintf "DecisionTreeTarget(...)" + /// A collection of simultaneous bindings and Bindings = Binding list /// A binding of a variable to an expression, as in a `let` binding or similar -and Binding = +and + [] + Binding = | TBind of Val * Expr * SequencePointInfoForBinding /// The value being bound @@ -3923,10 +4450,17 @@ and Binding = /// The information about whether to emit a sequence point for the binding member x.SequencePointInfo = (let (TBind(_,_,sp)) = x in sp) - + + [] + member x.DebugText = x.ToString() + + override x.ToString() = sprintf "TBind(%s, ...)" x.Var.CompiledName + /// Represents a reference to an active pattern element. The /// integer indicates which choice in the target set is being selected by this item. -and ActivePatternElemRef = +and + [] + ActivePatternElemRef = | APElemRef of ActivePatternInfo * ValRef * int /// Get the full information about the active pattern being referred to @@ -3938,9 +4472,16 @@ and ActivePatternElemRef = /// Get the index of the active pattern element within the overall active pattern member x.CaseIndex = (let (APElemRef(_,_,n)) = x in n) + [] + member x.DebugText = x.ToString() + + override __.ToString() = "ActivePatternElemRef(...)" + /// Records the "extra information" for a value compiled as a method (rather /// than a closure or a local), including argument names, attributes etc. -and ValReprInfo = +and + [] + ValReprInfo = /// ValReprInfo (numTypars, args, result) | ValReprInfo of TyparReprInfo list * ArgReprInfo list list * ArgReprInfo @@ -3964,7 +4505,7 @@ and ValReprInfo = /// Get the total number of arguments member x.TotalArgCount = - let (ValReprInfo(_,args,_)) = x in + let (ValReprInfo(_,args,_)) = x // This is List.sumBy List.length args // We write this by hand as it can be a performance bottleneck in LinkagePartialKey let rec loop (args:ArgReprInfo list list) acc = @@ -3975,10 +4516,15 @@ and ValReprInfo = | (_::_::h)::t -> loop t (acc + h.Length + 2) loop args 0 + [] + member x.DebugText = x.ToString() + + override __.ToString() = "ValReprInfo(...)" + /// Records the "extra information" for an argument compiled as a real /// method argument, specifically the argument name and attributes. and - [] + [] ArgReprInfo = { // MUTABILITY: used when propagating signature attributes into the implementation. @@ -3987,6 +4533,11 @@ and // MUTABILITY: used when propagating names of parameters from signature into the implementation. mutable Name : Ident option } + [] + member x.DebugText = x.ToString() + + override __.ToString() = "ArgReprInfo(...)" + /// Records the extra metadata stored about typars for type parameters /// compiled as "real" IL type parameters, specifically for values with /// ValReprInfo. Any information here is propagated from signature through @@ -4001,7 +4552,7 @@ and Vals = Val list /// The big type of expressions. and - [] + [] Expr = /// A constant expression. | Const of Const * range * TType @@ -4041,7 +4592,7 @@ and // The base object type might be a delegate type. | Obj of (* unique *) Unique * - (* object typ *) TType * (* <-- NOTE: specifies type parameters for base type *) + (* object type *) TType * (* <-- NOTE: specifies type parameters for base type *) (* base val *) Val option * (* ctor call *) Expr * (* overrides *) ObjExprMethod list * @@ -4081,8 +4632,14 @@ and /// appropriate type instantiation. These are immediately eliminated on subsequent rewrites. | Link of Expr ref + // Prefer to use the default formatting of this union type + //[] + //member x.DebugText = x.ToString() + // + //override __.ToString() = "Expr(...)" + and - [] + [] TOp = /// An operation representing the creation of a union value of the particular union case @@ -4128,7 +4685,7 @@ and | ValFieldGet of RecdFieldRef /// An operation representing getting the address of a record field - | ValFieldGetAddr of RecdFieldRef + | ValFieldGetAddr of RecdFieldRef * readonly: bool /// An operation representing getting an integer tag for a union value representing the union case number | UnionCaseTagGet of TyconRef @@ -4141,7 +4698,7 @@ and | UnionCaseFieldGet of UnionCaseRef * int /// An operation representing a field-get from a union value, where that value has been proven to be of the corresponding union case. - | UnionCaseFieldGetAddr of UnionCaseRef * int + | UnionCaseFieldGetAddr of UnionCaseRef * int * readonly: bool /// An operation representing a field-get from a union value. The value is not assumed to have been proven to be of the corresponding union case. | UnionCaseFieldSet of UnionCaseRef * int @@ -4159,7 +4716,7 @@ and | ILAsm of ILInstr list * TTypes /// Generate a ldflda on an 'a ref. - | RefAddrGet + | RefAddrGet of bool /// Conversion node, compiled via type-directed translation or to box/unbox | Coerce @@ -4193,6 +4750,11 @@ and /// retTy -- the types of pushed values, if any | ILCall of bool * bool * bool * bool * ValUseFlag * bool * bool * ILMethodRef * TypeInst * TypeInst * TTypes + // Prefer to use the default formatting of this union type + //[] + //member x.DebugText = x.ToString() + // + //override __.ToString() = "TOp(...)" /// Indicates the kind of record construction operation. and RecordConstructionInfo = @@ -4202,7 +4764,6 @@ and RecordConstructionInfo = /// Normal record construction | RecdExpr - /// If this is Some(ty) then it indicates that a .NET 2.0 constrained call is required, with the given type as the /// static type of the object argument. @@ -4230,12 +4791,12 @@ and ForLoopStyle = /// Indicates what kind of pointer operation this is. and LValueOperation = /// In C syntax this is: &localv - | LGetAddr + | LAddrOf of readonly: bool /// In C syntax this is: *localv_ptr | LByrefGet - /// In C syntax this is: localv = e , note == *(&localv) = e == LGetAddr; LByrefSet + /// In C syntax this is: localv = e , note == *(&localv) = e == LAddrOf; LByrefSet | LSet /// In C syntax this is: *localv_ptr = e @@ -4271,62 +4832,118 @@ and ValUseFlag = /// Indicates the kind of an F# core library static optimization construct and StaticOptimization = + | TTyconEqualsTycon of TType * TType + | TTyconIsStruct of TType /// A representation of a method in an object expression. /// /// TObjExprMethod(slotsig,attribs,methTyparsOfOverridingMethod,methodParams,methodBodyExpr,m) -and ObjExprMethod = +and + [] + ObjExprMethod = + | TObjExprMethod of SlotSig * Attribs * Typars * Val list list * Expr * range + member x.Id = let (TObjExprMethod(slotsig,_,_,_,_,m)) = x in mkSynId m slotsig.Name + [] + member x.DebugText = x.ToString() + + override x.ToString() = sprintf "TObjExprMethod(%s, ...)" x.Id.idText + /// Represents an abstract method slot, or delegate signature. /// /// TSlotSig(methodName,declaringType,declaringTypeParameters,methodTypeParameters,slotParameters,returnTy) -and SlotSig = +and + [] + SlotSig = + | TSlotSig of string * TType * Typars * Typars * SlotParam list list * TType option + member ss.Name = let (TSlotSig(nm,_,_,_,_,_)) = ss in nm + member ss.ImplementedType = let (TSlotSig(_,ty,_,_,_,_)) = ss in ty + member ss.ClassTypars = let (TSlotSig(_,_,ctps,_,_,_)) = ss in ctps + member ss.MethodTypars = let (TSlotSig(_,_,_,mtps,_,_)) = ss in mtps + member ss.FormalParams = let (TSlotSig(_,_,_,_,ps,_)) = ss in ps + member ss.FormalReturnType = let (TSlotSig(_,_,_,_,_,rt)) = ss in rt + [] + member x.DebugText = x.ToString() + + override ss.ToString() = sprintf "TSlotSig(%s, ...)" ss.Name + /// Represents a parameter to an abstract method slot. /// /// TSlotParam(nm,ty,inFlag,outFlag,optionalFlag,attribs) -and SlotParam = +and + [] + SlotParam = | TSlotParam of string option * TType * bool (* in *) * bool (* out *) * bool (* optional *) * Attribs + member x.Type = let (TSlotParam(_,ty,_,_,_,_)) = x in ty + [] + member x.DebugText = x.ToString() + + override x.ToString() = "TSlotParam(...)" + /// A type for a module-or-namespace-fragment and the actual definition of the module-or-namespace-fragment -and ModuleOrNamespaceExprWithSig = +/// The first ModuleOrNamespaceType is the signature and is a binder. However the bindings are not used in the ModuleOrNamespaceExpr: it is only referenced from the 'outside' +/// is for use by FCS only to report the "hidden" contents of the assembly prior to applying the signature. +and + [] + ModuleOrNamespaceExprWithSig = | ModuleOrNamespaceExprWithSig of - /// The ModuleOrNamespaceType is a binder. However it is not used in the ModuleOrNamespaceExpr: it is only referenced from the 'outside' ModuleOrNamespaceType * ModuleOrNamespaceExpr * range + member x.Type = let (ModuleOrNamespaceExprWithSig(mtyp,_,_)) = x in mtyp + [] + member x.DebugText = x.ToString() + + override x.ToString() = "ModuleOrNamespaceExprWithSig(...)" + /// The contents of a module-or-namespace-fragment definition -and ModuleOrNamespaceExpr = +and + [] + ModuleOrNamespaceExpr = /// Indicates the module is a module with a signature | TMAbstract of ModuleOrNamespaceExprWithSig + /// Indicates the module fragment is made of several module fragments in succession | TMDefs of ModuleOrNamespaceExpr list + /// Indicates the module fragment is a 'let' definition | TMDefLet of Binding * range + /// Indicates the module fragment is an evaluation of expression for side-effects | TMDefDo of Expr * range + /// Indicates the module fragment is a 'rec' or 'non-rec' definition of types and modules | TMDefRec of isRec:bool * Tycon list * ModuleOrNamespaceBinding list * range + // %+A formatting is used, so this is not needed + //[] + member x.DebugText = x.ToString() + + override x.ToString() = sprintf "%+A" x + /// A named module-or-namespace-fragment definition -and [] +and + [] ModuleOrNamespaceBinding = - //| Do of Expr + | Binding of Binding + | Module of /// This ModuleOrNamespace that represents the compilation of a module as a class. /// The same set of tycons etc. are bound in the ModuleOrNamespace as in the ModuleOrNamespaceExpr @@ -4334,15 +4951,35 @@ and [] /// This is the body of the module/namespace ModuleOrNamespaceExpr + [] + member x.DebugText = x.ToString() + + override __.ToString() = "ModuleOrNamespaceBinding(...)" /// Represents a complete typechecked implementation file, including its typechecked signature if any. /// /// TImplFile(qualifiedNameOfFile,pragmas,implementationExpressionWithSignature,hasExplicitEntryPoint,isScript) -and TypedImplFile = TImplFile of QualifiedNameOfFile * ScopedPragma list * ModuleOrNamespaceExprWithSig * bool * bool +and + [] + TypedImplFile = + | TImplFile of QualifiedNameOfFile * ScopedPragma list * ModuleOrNamespaceExprWithSig * bool * bool + + [] + member x.DebugText = x.ToString() + + override x.ToString() = "TImplFile(...)" /// Represents a complete typechecked assembly, made up of multiple implementation files. /// -and TypedAssemblyAfterOptimization = TypedAssemblyAfterOptimization of (TypedImplFile * (* optimizeDuringCodeGen: *) (Expr -> Expr)) list +and + [] + TypedAssemblyAfterOptimization = + | TypedAssemblyAfterOptimization of (TypedImplFile * (* optimizeDuringCodeGen: *) (Expr -> Expr)) list + + [] + member x.DebugText = x.ToString() + + override x.ToString() = "TypedAssemblyAfterOptimization(...)" //--------------------------------------------------------------------------- // Freevars. Computed and cached by later phases (never computed type checking). Cached in terms. Not pickled. @@ -4367,7 +5004,9 @@ and FreeUnionCases = Zset /// Represents a set of 'free' type-related elements, including named types, trait solutions, union cases and /// record fields. -and FreeTyvars = +and + [] + FreeTyvars = { /// The summary of locally defined type definitions used in the expression. These may be made private by a signature /// and we have to check various conditions associated with that. FreeTycons: FreeTycons @@ -4379,12 +5018,18 @@ and FreeTyvars = /// and we have to check various conditions associated with that. FreeTypars: FreeTypars } + [] + member x.DebugText = x.ToString() + + override x.ToString() = "FreeTyvars(...)" /// Represents an amortized computation of the free variables in an expression and FreeVarsCache = FreeVars cache /// Represents the set of free variables in an expression -and FreeVars = +and + [] + FreeVars = { /// The summary of locally defined variables used in the expression. These may be hidden at let bindings etc. /// or made private by a signature or marked 'internal' or 'private', and we have to check various conditions associated with that. FreeLocals: FreeLocals @@ -4412,11 +5057,17 @@ and FreeVars = /// See FreeTyvars above. FreeTyvars: FreeTyvars } + [] + member x.DebugText = x.ToString() + + override x.ToString() = "FreeVars(...)" + /// Specifies the compiled representations of type and exception definitions. Basically /// just an ILTypeRef. Computed and cached by later phases. Stored in /// type and exception definitions. Not pickled. Store an optional ILType object for /// non-generic types. -and [] +and + [] CompiledTypeRepr = /// An AbstractIL type representation that is just the name of a type. @@ -4440,6 +5091,11 @@ and [] // type ilsigptr<'T> = (# "!0*" #) | ILAsmOpen of ILType + [] + member x.DebugText = x.ToString() + + override x.ToString() = "CompiledTypeRepr(...)" + //--------------------------------------------------------------------------- // Basic properties on type definitions //--------------------------------------------------------------------------- @@ -4448,16 +5104,25 @@ and [] /// Metadata on values (names of arguments etc. [] module ValReprInfo = + let unnamedTopArg1 : ArgReprInfo = { Attribs=[]; Name=None } + let unnamedTopArg = [unnamedTopArg1] + let unitArgData : ArgReprInfo list list = [[]] + let unnamedRetVal : ArgReprInfo = { Attribs = []; Name=None } + let selfMetadata = unnamedTopArg + let emptyValData = ValReprInfo([],[],unnamedRetVal) let InferTyparInfo (tps:Typar list) = tps |> List.map (fun tp -> TyparReprInfo(tp.Id, tp.Kind)) + let InferArgReprInfo (v:Val) : ArgReprInfo = { Attribs = []; Name= Some v.Id } + let InferArgReprInfos (vs:Val list list) = ValReprInfo([],List.mapSquared InferArgReprInfo vs,unnamedRetVal) + let HasNoArgs (ValReprInfo(n,args,_)) = n.IsEmpty && args.IsEmpty //--------------------------------------------------------------------------- @@ -4582,7 +5247,16 @@ let mkTyparTy (tp:Typar) = | TyparKind.Type -> tp.AsType | TyparKind.Measure -> TType_measure (Measure.Var tp) -let copyTypar (tp: Typar) = Typar.New { tp with typar_stamp=newStamp(); typar_astype=Unchecked.defaultof<_> } +let copyTypar (tp: Typar) = + let optData = tp.typar_opt_data |> Option.map (fun tg -> { typar_il_name = tg.typar_il_name; typar_xmldoc = tg.typar_xmldoc; typar_constraints = tg.typar_constraints; typar_attribs = tg.typar_attribs }) + Typar.New { typar_id = tp.typar_id + typar_flags = tp.typar_flags + typar_stamp = newStamp() + typar_solution = tp.typar_solution + typar_astype = Unchecked.defaultof<_> + // Be careful to clone the mutable optional data too + typar_opt_data = optData } + let copyTypars tps = List.map copyTypar tps //-------------------------------------------------------------------------- @@ -4651,7 +5325,9 @@ let mkNonLocalCcuRootEntityRef ccu (x:Entity) = mkNonLocalTyconRefPreResolved x let mkNestedValRef (cref:EntityRef) (v:Val) : ValRef = match cref with | ERefLocal _ -> mkLocalValRef v - | ERefNonLocal nlr -> mkNonLocalValRefPreResolved v nlr v.LinkageFullKey + | ERefNonLocal nlr -> + let key = v.GetLinkageFullKey() + mkNonLocalValRefPreResolved v nlr key /// From Ref_private to Ref_nonlocal when exporting data. let rescopePubPathToParent viewedCcu (PubPath(p)) = NonLocalEntityRef(viewedCcu, p.[0..p.Length-2]) @@ -4747,7 +5423,7 @@ let fslibValRefEq fslibCcu vref1 vref2 = // is not significant nlr1.ItemKey.PartialKey = nm2.PartialKey && fslibRefEq nlr1.EnclosingEntity.nlr pp2 - | None -> + | _ -> false // Note: I suspect this private-to-private reference comparison is not needed | (VRefLocal e1, VRefLocal e2) -> @@ -4771,9 +5447,9 @@ let primEntityRefEq compilingFslib fslibCcu (x : EntityRef) (y : EntityRef) = // The tcrefs may have forwarders. If they may possibly be equal then resolve them to get their canonical references // and compare those using pointer equality. (not (nonLocalRefDefinitelyNotEq x.nlr y.nlr) && - let v1 = x.TryDeref - let v2 = y.TryDeref - v1.IsSome && v2.IsSome && v1.Value === v2.Value)) then + match x.TryDeref with + | ValueSome v1 -> match y.TryDeref with ValueSome v2 -> v1 === v2 | _ -> false + | _ -> match y.TryDeref with ValueNone -> true | _ -> false)) then true else compilingFslib && fslibEntityRefEq fslibCcu x y @@ -4797,9 +5473,9 @@ let primValRefEq compilingFslib fslibCcu (x : ValRef) (y : ValRef) = else (// Use TryDeref to guard against the platforms/times when certain F# language features aren't available, // e.g. CompactFramework doesn't have support for quotations. - let v1 = x.TryDeref - let v2 = y.TryDeref - v1.IsSome && v2.IsSome && v1.Value === v2.Value) + match x.TryDeref with + | ValueSome v1 -> match y.TryDeref with ValueSome v2 -> v1 === v2 | _ -> false + | _ -> match y.TryDeref with ValueNone -> true | _ -> false) || (if compilingFslib then fslibValRefEq fslibCcu x y else false) //--------------------------------------------------------------------------- @@ -4867,14 +5543,14 @@ let MakeUnionRepr ucs = TUnionRepr (MakeUnionCases ucs) let NewTypar (kind,rigid,Typar(id,staticReq,isCompGen),isFromError,dynamicReq,attribs,eqDep,compDep) = Typar.New { typar_id = id - typar_il_name = None typar_stamp = newStamp() typar_flags= TyparFlags(kind,rigid,isFromError,isCompGen,staticReq,dynamicReq,eqDep,compDep) - typar_attribs= attribs typar_solution = None - typar_constraints=[] - typar_xmldoc = XmlDoc.Empty - typar_astype = Unchecked.defaultof<_>} + typar_astype = Unchecked.defaultof<_> + typar_opt_data = + match attribs with + | [] -> None + | _ -> Some { typar_il_name = None; typar_xmldoc = XmlDoc.Empty; typar_constraints = []; typar_attribs = attribs } } let NewRigidTypar nm m = NewTypar (TyparKind.Type,TyparRigidity.Rigid,Typar(mkSynId m nm,NoStaticReq,true),false,TyparDynamicReq.Yes,[],false,false) @@ -4899,28 +5575,23 @@ let NewExn cpath (id:Ident) access repr attribs doc = Tycon.New "exnc" { entity_stamp=newStamp() entity_attribs=attribs - entity_kind=TyparKind.Type entity_logical_name=id.idText - entity_compiled_name=None entity_range=id.idRange - entity_other_range=None - entity_exn_info= repr entity_tycon_tcaug=TyconAugmentation.Create() - entity_xmldoc=doc - entity_xmldocsig="" entity_pubpath=cpath |> Option.map (fun (cp:CompilationPath) -> cp.NestedPublicPath id) - entity_accessiblity=access - entity_tycon_repr_accessibility=access entity_modul_contents = MaybeLazy.Strict (NewEmptyModuleOrNamespaceType ModuleOrType) entity_cpath= cpath entity_typars=LazyWithContext.NotLazy [] - entity_tycon_abbrev = None entity_tycon_repr = TNoRepr entity_flags=EntityFlags(usesPrefixDisplay=false, isModuleOrNamespace=false, preEstablishedHasDefaultCtor=false, hasSelfReferentialCtor=false, isStructRecordOrUnionType=false) - entity_il_repr_cache= newCache() } + entity_il_repr_cache= newCache() + entity_opt_data = + match doc, access, repr with + | XmlDoc [||], TAccess [], TExnNone -> None + | _ -> Some { Entity.EmptyEntityOptData with entity_xmldoc = doc; entity_accessiblity = access; entity_tycon_repr_accessibility = access; entity_exn_info = repr } } /// Create a new TAST RecdField node for an F# class, struct or record field -let NewRecdField stat konst id ty isMutable isVolatile pattribs fattribs docOption access secret = +let NewRecdField stat konst id nameGenerated ty isMutable isVolatile pattribs fattribs docOption access secret = { rfield_mutable=isMutable rfield_pattribs=pattribs rfield_fattribs=fattribs @@ -4932,7 +5603,8 @@ let NewRecdField stat konst id ty isMutable isVolatile pattribs fattribs docOpt rfield_secret = secret rfield_xmldoc = docOption rfield_xmldocsig = "" - rfield_id=id + rfield_id=id + rfield_name_generated = nameGenerated rfield_other_range = None } @@ -4941,25 +5613,20 @@ let NewTycon (cpath, nm, m, access, reprAccess, kind, typars, docOption, usesPre Tycon.New "tycon" { entity_stamp=stamp entity_logical_name=nm - entity_compiled_name=None - entity_kind=kind entity_range=m - entity_other_range=None entity_flags=EntityFlags(usesPrefixDisplay=usesPrefixDisplay, isModuleOrNamespace=false,preEstablishedHasDefaultCtor=preEstablishedHasDefaultCtor, hasSelfReferentialCtor=hasSelfReferentialCtor, isStructRecordOrUnionType=false) entity_attribs=[] // fixed up after entity_typars=typars - entity_tycon_abbrev = None entity_tycon_repr = TNoRepr - entity_tycon_repr_accessibility = reprAccess - entity_exn_info=TExnNone entity_tycon_tcaug=TyconAugmentation.Create() entity_modul_contents = mtyp - entity_accessiblity=access - entity_xmldoc = docOption - entity_xmldocsig="" entity_pubpath=cpath |> Option.map (fun (cp:CompilationPath) -> cp.NestedPublicPath (mkSynId m nm)) entity_cpath = cpath - entity_il_repr_cache = newCache() } + entity_il_repr_cache = newCache() + entity_opt_data = + match kind, docOption, reprAccess, access with + | TyparKind.Type, XmlDoc [||], TAccess [], TAccess [] -> None + | _ -> Some { Entity.EmptyEntityOptData with entity_kind = kind; entity_xmldoc = docOption; entity_tycon_repr_accessibility = reprAccess; entity_accessiblity=access } } let NewILTycon nlpath (nm,m) tps (scoref:ILScopeRef, enc, tdef:ILTypeDef) mtyp = @@ -4979,24 +5646,27 @@ exception FullAbstraction of string * range let NewModuleOrNamespace cpath access (id:Ident) xml attribs mtype = Construct.NewModuleOrNamespace cpath access id xml attribs mtype let NewVal (logicalName:string,m:range,compiledName,ty,isMutable,isCompGen,arity,access,recValInfo,specialRepr,baseOrThis,attribs,inlineInfo,doc,isModuleOrMemberBinding,isExtensionMember,isIncrClassSpecialMember,isTyFunc,allowTypeInst,isGeneratedEventVal,konst,actualParent) : Val = - let stamp = newStamp() + let stamp = newStamp() Val.New - { val_stamp = stamp - val_logical_name=logicalName - val_compiled_name= (match compiledName with Some v when v <> logicalName -> compiledName | _ -> None) - val_range=m - val_other_range=None - val_defn=None - val_repr_info= arity - val_actual_parent= actualParent - val_flags = ValFlags(recValInfo,baseOrThis,isCompGen,inlineInfo,isMutable,isModuleOrMemberBinding,isExtensionMember,isIncrClassSpecialMember,isTyFunc,allowTypeInst,isGeneratedEventVal) - val_const= konst - val_access=access - val_member_info=specialRepr - val_attribs=attribs - val_type = ty - val_xmldoc = doc - val_xmldocsig = ""} + { val_stamp = stamp + val_logical_name = logicalName + val_range = m + val_flags = ValFlags(recValInfo,baseOrThis,isCompGen,inlineInfo,isMutable,isModuleOrMemberBinding,isExtensionMember,isIncrClassSpecialMember,isTyFunc,allowTypeInst,isGeneratedEventVal) + val_type = ty + val_opt_data = + match compiledName, arity, konst, access, doc, specialRepr, actualParent, attribs with + | None, None, None, TAccess [], XmlDoc [||], None, ParentNone, [] -> None + | _ -> + Some { Val.EmptyValOptData with + val_compiled_name = (match compiledName with Some v when v <> logicalName -> compiledName | _ -> None) + val_repr_info = arity + val_const = konst + val_access = access + val_xmldoc = doc + val_member_info = specialRepr + val_declaring_entity = actualParent + val_attribs = attribs } + } let NewCcuContents sref m nm mty = @@ -5049,13 +5719,13 @@ let CombineCcuContentFragments m l = let tab2 = mty2.AllEntitiesByLogicalMangledName let entities = [ for e1 in mty1.AllEntities do - match tab2.TryFind e1.LogicalName with - | Some e2 -> yield CombineEntites path e1 e2 - | None -> yield e1 + match tab2.TryGetValue e1.LogicalName with + | true, e2 -> yield CombineEntites path e1 e2 + | _ -> yield e1 for e2 in mty2.AllEntities do - match tab1.TryFind e2.LogicalName with - | Some _ -> () - | None -> yield e2 ] + match tab1.TryGetValue e2.LogicalName with + | true, _ -> () + | _ -> yield e2 ] let vals = QueueList.append mty1.AllValsAndMembers mty2.AllValsAndMembers @@ -5072,10 +5742,14 @@ let CombineCcuContentFragments m l = match entity1.IsModuleOrNamespace, entity2.IsModuleOrNamespace with | true,true -> entity1 |> NewModifiedTycon (fun data1 -> + let xml = XmlDoc.Merge entity1.XmlDoc entity2.XmlDoc { data1 with - entity_xmldoc = XmlDoc.Merge entity1.XmlDoc entity2.XmlDoc entity_attribs = entity1.Attribs @ entity2.Attribs - entity_modul_contents = MaybeLazy.Lazy (lazy (CombineModuleOrNamespaceTypes (path@[entity2.DemangledModuleOrNamespaceName]) entity2.Range entity1.ModuleOrNamespaceType entity2.ModuleOrNamespaceType)) }) + entity_modul_contents = MaybeLazy.Lazy (lazy (CombineModuleOrNamespaceTypes (path@[entity2.DemangledModuleOrNamespaceName]) entity2.Range entity1.ModuleOrNamespaceType entity2.ModuleOrNamespaceType)) + entity_opt_data = + match data1.entity_opt_data with + | Some optData -> Some { optData with entity_xmldoc = xml } + | _ -> Some { Entity.EmptyEntityOptData with entity_xmldoc = xml } }) | false,false -> error(Error(FSComp.SR.tastDuplicateTypeDefinitionInAssembly(entity2.LogicalName, textOfPath path),entity2.Range)) | _,_ -> diff --git a/src/fsharp/test.snk b/src/fsharp/test.snk new file mode 100644 index 00000000000..c16543bdc48 Binary files /dev/null and b/src/fsharp/test.snk differ diff --git a/src/fsharp/vs/ServiceAnalysis.fs b/src/fsharp/vs/ServiceAnalysis.fs deleted file mode 100644 index 5923459c031..00000000000 --- a/src/fsharp/vs/ServiceAnalysis.fs +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. - -namespace Microsoft.FSharp.Compiler.SourceCodeServices - -open Microsoft.FSharp.Compiler -open Microsoft.FSharp.Compiler.Ast -open Microsoft.FSharp.Compiler.Range - -module UnusedOpens = - open Microsoft.FSharp.Compiler.PrettyNaming - open System.Runtime.CompilerServices - - type Module = - { Entity: FSharpEntity - IsNestedAutoOpen: bool } - - member this.ChildSymbols = - seq { for ent in this.Entity.NestedEntities do - yield ent :> FSharpSymbol - - if ent.IsFSharpRecord then - for rf in ent.FSharpFields do - yield upcast rf - - if ent.IsFSharpUnion && not (Symbol.hasAttribute ent.Attributes) then - for unionCase in ent.UnionCases do - yield upcast unionCase - - if Symbol.hasAttribute ent.Attributes then - for fv in ent.MembersFunctionsAndValues do - // fv.IsExtensionMember is always false for C# extension methods returning by `MembersFunctionsAndValues`, - // so we have to check Extension attribute instead. - // (note: fv.IsExtensionMember has proper value for symbols returning by GetAllUsesOfAllSymbolsInFile though) - if Symbol.hasAttribute fv.Attributes then - yield upcast fv - - for apCase in this.Entity.ActivePatternCases do - yield upcast apCase - - for fv in this.Entity.MembersFunctionsAndValues do - yield upcast fv - } |> Seq.cache - - type ModuleGroup = - { Modules: Module list } - - static member Create (modul: FSharpEntity) = - let rec getModuleAndItsAutoOpens (isNestedAutoOpen: bool) (modul: FSharpEntity) = - [ yield { Entity = modul; IsNestedAutoOpen = isNestedAutoOpen } - for ent in modul.NestedEntities do - if ent.IsFSharpModule && Symbol.hasAttribute ent.Attributes then - yield! getModuleAndItsAutoOpens true ent ] - { Modules = getModuleAndItsAutoOpens false modul } - - /// Represents single open statement. - type OpenStatement = - { /// All modules which this open declaration effectively opens, _not_ including auto open ones. - Modules: ModuleGroup list - /// Range of open statement itself. - Range: range - /// Scope on which this open declaration is applied. - AppliedScope: range } - - let getOpenStatements (openDeclarations: FSharpOpenDeclaration list) : OpenStatement list = - openDeclarations - |> List.filter (fun x -> not x.IsOwnNamespace) - |> List.choose (fun openDecl -> - match openDecl.LongId, openDecl.Range with - | firstId :: _, Some range -> - if firstId.idText = MangledGlobalName then - None - else - Some { Modules = openDecl.Modules |> List.map ModuleGroup.Create - Range = range - AppliedScope = openDecl.AppliedScope } - | _ -> None) - - let filterSymbolUses (getSourceLineStr: int -> string) (symbolUses: FSharpSymbolUse[]) : FSharpSymbolUse[] = - symbolUses - |> Array.filter (fun su -> - match su.Symbol with - | :? FSharpMemberOrFunctionOrValue as fv when fv.IsExtensionMember -> - // extension members should be taken into account even though they have a prefix (as they do most of the time) - true - | _ -> - let partialName = QuickParse.GetPartialLongNameEx (getSourceLineStr su.RangeAlternate.StartLine, su.RangeAlternate.EndColumn - 1) - // for the rest of symbols we pick only those which are the first part of a long idend, because it's they which are - // conteined in opened namespaces / modules. For example, we pick `IO` from long ident `IO.File.OpenWrite` because - // it's `open System` which really brings it into scope. - partialName.QualifyingIdents = []) - - type UsedModule = - { Module: FSharpEntity - AppliedScope: range } - - let getUnusedOpens (checkFileResults: FSharpCheckFileResults, getSourceLineStr: int -> string) : Async = - - let filterOpenStatements (openStatements: OpenStatement list) (symbolUses: FSharpSymbolUse[]) : OpenStatement list = - - let rec filterInner acc (openStatements: OpenStatement list) (usedModules: UsedModule list) = - - let getUsedModules (openStatement: OpenStatement) = - let notAlreadyUsedModuleGroups = - openStatement.Modules - |> List.choose (fun x -> - let notUsedModules = - x.Modules - |> List.filter (fun x -> - not (usedModules - |> List.exists (fun used -> - rangeContainsRange used.AppliedScope openStatement.AppliedScope && - used.Module.IsEffectivelySameAs x.Entity))) - - match notUsedModules with - | [] -> None - | _ when notUsedModules |> List.exists (fun x -> not x.IsNestedAutoOpen) -> - Some { Modules = notUsedModules } - | _ -> None) - - match notAlreadyUsedModuleGroups with - | [] -> [] - | _ -> - let symbolUsesInScope = symbolUses |> Array.filter (fun symbolUse -> rangeContainsRange openStatement.AppliedScope symbolUse.RangeAlternate) - notAlreadyUsedModuleGroups - |> List.filter (fun modulGroup -> - modulGroup.Modules - |> List.exists (fun modul -> - symbolUsesInScope - |> Array.exists (fun symbolUse -> - let usedByEnclosingEntity = - match symbolUse.Symbol with - | :? FSharpMemberOrFunctionOrValue as f -> - match f.EnclosingEntity with - | Some ent when ent.IsNamespace || ent.IsFSharpModule -> - Some (ent.IsEffectivelySameAs modul.Entity) - | _ -> None - | _ -> None - match usedByEnclosingEntity with - | Some x -> x - | None -> modul.ChildSymbols |> Seq.exists (fun x -> x.IsEffectivelySameAs symbolUse.Symbol) - ))) - |> List.collect (fun mg -> - mg.Modules |> List.map (fun x -> { Module = x.Entity; AppliedScope = openStatement.AppliedScope })) - - match openStatements with - | os :: xs -> - match getUsedModules os with - | [] -> filterInner (os :: acc) xs usedModules - | um -> filterInner acc xs (um @ usedModules) - | [] -> List.rev acc - - filterInner [] openStatements [] - - async { - let! symbolUses = checkFileResults.GetAllUsesOfAllSymbolsInFile() - let symbolUses = filterSymbolUses getSourceLineStr symbolUses - let openStatements = getOpenStatements checkFileResults.OpenDeclarations - return filterOpenStatements openStatements symbolUses |> List.map (fun os -> os.Range) - } \ No newline at end of file diff --git a/src/fsharp/vs/ServiceUntypedParse.fsi b/src/fsharp/vs/ServiceUntypedParse.fsi deleted file mode 100755 index 62485fdefa2..00000000000 --- a/src/fsharp/vs/ServiceUntypedParse.fsi +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. - -//---------------------------------------------------------------------------- -// API to the compiler as an incremental service for parsing, -// type checking and intellisense-like environment-reporting. -//---------------------------------------------------------------------------- - -namespace Microsoft.FSharp.Compiler.SourceCodeServices - -open System.Collections.Generic -open Microsoft.FSharp.Compiler -open Microsoft.FSharp.Compiler.Ast -open Microsoft.FSharp.Compiler.Range -open Microsoft.FSharp.Compiler.ErrorLogger - -[] -/// Represents the results of parsing an F# file -#if COMPILER_PUBLIC_API -type FSharpParseFileResults = -#else -type internal FSharpParseFileResults = -#endif - - /// The syntax tree resulting from the parse - member ParseTree : Ast.ParsedInput option - - /// Notable parse info for ParameterInfo at a given location - member FindNoteworthyParamInfoLocations : pos:pos -> FSharpNoteworthyParamInfoLocations option - - /// Name of the file for which this information were created - member FileName : string - - /// Get declared items and the selected item at the specified location - member GetNavigationItems : unit -> FSharpNavigationItems - - /// Return the inner-most range associated with a possible breakpoint location - member ValidateBreakpointLocation : pos:pos -> range option - - /// When these files change then the build is invalid - member DependencyFiles : string[] - - /// Get the errors and warnings for the parse - member Errors : FSharpErrorInfo[] - - /// Indicates if any errors occurred during the parse - member ParseHadErrors : bool - - internal new: errors: FSharpErrorInfo[] * input: Ast.ParsedInput option * parseHadErrors: bool * dependencyFiles: string[] -> FSharpParseFileResults - -/// Information about F# source file names -#if COMPILER_PUBLIC_API -module SourceFile = -#else -module internal SourceFile = -#endif - - /// Whether or not this file is compilable - val IsCompilable : string -> bool - - /// Whether or not this file should be a single-file project - val MustBeSingleFileProject : string -> bool - -#if COMPILER_PUBLIC_API -type CompletionPath = string list * string option // plid * residue -#else -type internal CompletionPath = string list * string option // plid * residue -#endif - -[] -#if COMPILER_PUBLIC_API -type InheritanceContext = -#else -type internal InheritanceContext = -#endif - | Class - | Interface - | Unknown - -[] -#if COMPILER_PUBLIC_API -type RecordContext = -#else -type internal RecordContext = -#endif - | CopyOnUpdate of range * CompletionPath // range - | Constructor of string // typename - | New of CompletionPath - -[] -#if COMPILER_PUBLIC_API -type CompletionContext = -#else -type internal CompletionContext = -#endif - // completion context cannot be determined due to errors - | Invalid - // completing something after the inherit keyword - | Inherit of InheritanceContext * CompletionPath - // completing records field - | RecordField of RecordContext - | RangeOperator - // completing named parameters\setters in parameter list of constructor\method calls - // end of name ast node * list of properties\parameters that were already set - | ParameterList of pos * HashSet - | AttributeApplication - | OpenDeclaration - /// completing pattern type (e.g. foo (x: |)) - | PatternType - -#if COMPILER_PUBLIC_API -type ModuleKind = { IsAutoOpen: bool; HasModuleSuffix: bool } -#else -type internal ModuleKind = { IsAutoOpen: bool; HasModuleSuffix: bool } -#endif - -[] -#if COMPILER_PUBLIC_API -type EntityKind = -#else -type internal EntityKind = -#endif - | Attribute - | Type - | FunctionOrValue of isActivePattern:bool - | Module of ModuleKind - -// implementation details used by other code in the compiler -#if COMPILER_PUBLIC_API -module UntypedParseImpl = -#else -module internal UntypedParseImpl = -#endif - val TryFindExpressionASTLeftOfDotLeftOfCursor : pos * ParsedInput option -> (pos * bool) option - val GetRangeOfExprLeftOfDot : pos * ParsedInput option -> range option - val TryFindExpressionIslandInPosition : pos * ParsedInput option -> string option - val TryGetCompletionContext : pos * FSharpParseFileResults option * lineStr: string -> CompletionContext option - val GetEntityKind: pos * ParsedInput -> EntityKind option - val GetFullNameOfSmallestModuleOrNamespaceAtPoint : ParsedInput * pos -> string[] - -// implementation details used by other code in the compiler -module internal SourceFileImpl = - val IsInterfaceFile : string -> bool - val AdditionalDefinesForUseInEditor : string -> string list - diff --git a/src/fsharp/vs/ServiceXmlDocParser.fsi b/src/fsharp/vs/ServiceXmlDocParser.fsi deleted file mode 100644 index f43f9bcf697..00000000000 --- a/src/fsharp/vs/ServiceXmlDocParser.fsi +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. - -namespace Microsoft.FSharp.Compiler.SourceCodeServices - -open Microsoft.FSharp.Compiler -open Microsoft.FSharp.Compiler.Range -open Microsoft.FSharp.Compiler.Ast - -/// Represent an Xml documentation block in source code -#if COMPILER_PUBLIC_API -type XmlDocable = -#else -type internal XmlDocable = -#endif - | XmlDocable of line:int * indent:int * paramNames:string list - -#if COMPILER_PUBLIC_API -module XmlDocComment = -#else -module internal XmlDocComment = -#endif - - /// if it's a blank XML comment with trailing "<", returns Some (index of the "<"), otherwise returns None - val isBlank : string -> int option - -#if COMPILER_PUBLIC_API -module XmlDocParser = -#else -module internal XmlDocParser = -#endif - /// Get the list of Xml documentation from current source code - val getXmlDocables : sourceCodeOfTheFile : string * input : Ast.ParsedInput option -> XmlDocable list - \ No newline at end of file diff --git a/src/fsharp/xlf/FSComp.txt.cs.xlf b/src/fsharp/xlf/FSComp.txt.cs.xlf new file mode 100644 index 00000000000..1c840d2c66e --- /dev/null +++ b/src/fsharp/xlf/FSComp.txt.cs.xlf @@ -0,0 +1,7087 @@ + + + + + + The namespace '{0}' is not defined. + Není definovaný obor názvů {0}. + + + + The namespace or module '{0}' is not defined. + Není definovaný obor názvů nebo modul {0}. + + + + The field, constructor or member '{0}' is not defined. + Není definované pole, konstruktor nebo člen {0}. + + + + The value, constructor, namespace or type '{0}' is not defined. + Není definovaný konstruktor, hodnota, obor názvů nebo typ {0}. + + + + The value or constructor '{0}' is not defined. + Není definovaná hodnota nebo konstruktor {0}. + + + + The value, namespace, type or module '{0}' is not defined. + Není definovaný obor názvů, hodnota, typ nebo modul {0}. + + + + The constructor, module or namespace '{0}' is not defined. + Není definovaný konstruktor, modul nebo obor názvů {0}. + + + + The type '{0}' is not defined. + Není definovaný typ {0}. + + + + The type '{0}' is not defined in '{1}'. + Typ {0} není definovaný v {1}. + + + + The record label or namespace '{0}' is not defined. + Není definovaný popisek záznamů nebo obor názvů {0}. + + + + The record label '{0}' is not defined. + Nemáte definovaný popisek záznamů {0}. + + + + Maybe you want one of the following: + Možná budete potřebovat něco z tohoto: + + + + The type parameter {0} is not defined. + Není definovaný parametr typu {0}. + + + + The pattern discriminator '{0}' is not defined. + Není definovaný rozlišovací prvek vzorů {0}. + + + + Replace with '{0}' + Nahradit návrhem: {0} + + + + Add . for indexer access. + Přidejte . pro přístup indexeru. + + + + All elements of a list must be of the same type as the first element, which here is '{0}'. This element has type '{1}'. + Všechny elementy výrazu konstruktoru seznamu musí mít stejný typ. Očekávalo se, že tento výraz bude mít typ {0}, ale tady je typu {1}. + + + + All elements of an array must be of the same type as the first element, which here is '{0}'. This element has type '{1}'. + Všechny elementy výrazu konstruktoru pole musí mít stejný typ. Očekávalo se, že tento výraz bude mít typ {0}, ale tady je typu {1}. + + + + This 'if' expression is missing an 'else' branch. Because 'if' is an expression, and not a statement, add an 'else' branch which also returns a value of type '{0}'. + Ve výrazu if chybí větev else. Větev then je typu {0}. Protože if je výraz a ne příkaz, přidejte větev else, která vrátí hodnotu stejného typu. + + + + The 'if' expression needs to have type '{0}' to satisfy context type requirements. It currently has type '{1}'. + Aby se splnily požadavky na typ kontextu, musí mít výraz if typ {0}. V tuto chvíli má typ {1}. + + + + All branches of an 'if' expression must return values of the same type as the first branch, which here is '{0}'. This branch returns a value of type '{1}'. + Všechny větve výrazu if musí mít stejný typ. Očekávalo se, že tento výraz bude mít typ {0}, ale tady je typu {1}. + + + + All branches of a pattern match expression must return values of the same type as the first branch, which here is '{0}'. This branch returns a value of type '{1}'. + Všechny větve výrazu porovnání vzorů musí vracet hodnoty stejného typu. První větev vrátila hodnotu typu {0}, ale tato větev vrátila hodnotu typu {1}. + + + + A pattern match guard must be of type 'bool', but this 'when' expression is of type '{0}'. + Ochrana porovnání vzorů musí být typu bool, ale tento výraz when je typu {0}. + + + + A ';' is used to separate field values in records. Consider replacing ',' with ';'. + Pro oddělení hodnot v záznamech se používá znak ; (středník). Zvažte nahrazení znaků , (čárka) znaky ; (středník). + + + + The '!' operator is used to dereference a ref cell. Consider using 'not expr' here. + Operátor ! se používá k přístupu k buňce ref přes ukazatel. Zvažte možnost použít tady not expr. + + + + The non-generic type '{0}' does not expect any type arguments, but here is given {1} type argument(s) + U typu {0}, který není obecný, se neočekávají žádné argumenty typu, ale tady se mu argumenty typu předávají ({1}). + + + + Consider using 'return!' instead of 'return'. + Zvažte použití parametru return! namísto return. + + + + Consider using 'yield!' instead of 'yield'. + Zvažte použití parametru yield! namísto yield. + + + + \nA tuple type is required for one or more arguments. Consider wrapping the given arguments in additional parentheses or review the definition of the interface. + \nPro jeden nebo více argumentů se vyžaduje typ řazené kolekce členů. Zvažte možnost uzavřít dané argumenty do dodatečných závorek nebo zkontrolovat definici rozhraní. + + + + Invalid warning number '{0}' + Neplatné číslo upozornění {0} + + + + Invalid version string '{0}' + Neplatný řetězec verze {0} + + + + Invalid version file '{0}' + Neplatný soubor verze {0} + + + + Microsoft (R) F# Compiler version {0} + Microsoft (R) F# Compiler verze {0} + + + + F# Compiler for F# {0} + Kompilátor jazyka F# pro F# {0} + + + + Problem with filename '{0}': {1} + Problém s názvem souboru {0}: {1} + + + + No inputs specified + Nezadali jste žádné vstupy. + + + + The '--pdb' option requires the '--debug' option to be used + Možnost --pdb vyžaduje použití možnosti --debug. + + + + The search directory '{0}' is invalid + Adresář hledání {0} není platný. + + + + The search directory '{0}' could not be found + Adresář hledání {0} se nedal najít. + + + + '{0}' is not a valid filename + {0} není platný název souboru. + + + + '{0}' is not a valid assembly name + {0} není platný název sestavení. + + + + Unrecognized privacy setting '{0}' for managed resource, valid options are 'public' and 'private' + Nerozpoznané nastavení ochrany osobních údajů {0} pro spravovaný prostředek. Platné možnosti jsou public a private. + + + + Multiple references to '{0}.dll' are not permitted + Víc odkazů na knihovnu {0}.dll se nepovoluje. + + + + Could not read version from mscorlib.dll + Nedala se přečíst verze souboru mscorlib.dll. + + + + Unable to read assembly '{0}' + Sestavení {0} se nedá přečíst. + + + + Assembly resolution failure at or near this location + Došlo k selhání překladu sestavení na této pozici nebo blízko ní. + + + + The declarations in this file will be placed in an implicit module '{0}' based on the file name '{1}'. However this is not a valid F# identifier, so the contents will not be accessible from other files. Consider renaming the file or adding a 'module' or 'namespace' declaration at the top of the file. + Deklarace z tohoto souboru se umístí do implicitního modulu {0} založeného na názvu souboru {1}. To ale není platný identifikátor F#, takže obsah nebude dostupný z jiných souborů. Zvažte přejmenování souboru nebo přidání deklarace modulu nebo oboru názvů na jeho začátek. + + + + Files in libraries or multiple-file applications must begin with a namespace or module declaration, e.g. 'namespace SomeNamespace.SubNamespace' or 'module SomeNamespace.SomeModule'. Only the last source file of an application may omit such a declaration. + Soubory v knihovnách nebo aplikacích s víc soubory musí začínat deklarací oboru názvů nebo modulu, třeba namespace SomeNamespace.SubNamespace nebo module SomeNamespace.SomeModule. Tato deklarace se dá vynechat jenom u posledního zdrojového souboru aplikace. + + + + Files in libraries or multiple-file applications must begin with a namespace or module declaration. When using a module declaration at the start of a file the '=' sign is not allowed. If this is a top-level module, consider removing the = to resolve this error. + Soubory v knihovnách nebo aplikacích s víc soubory musí začínat deklarací oboru názvů nebo modulu. Pokud na začátku souboru použijete deklaraci modulu, není povolený znak =. Pokud to je modul nejvyšší úrovně, zvažte odebrání znaku = pro vyřešení této chyby. + + + + This file contains multiple declarations of the form 'module SomeNamespace.SomeModule'. Only one declaration of this form is permitted in a file. Change your file to use an initial namespace declaration and/or use 'module ModuleName = ...' to define your modules. + Tento soubor obsahuje víc deklarací v podobě module SomeNamespace.SomeModule. V souboru se povoluje jenom jedna deklarace v této podobě. Upravte soubor tak, aby používal počáteční deklaraci oboru názvů, nebo použijte k definování modulů deklaraci v podobě module ModuleName = ... + + + + Option requires parameter: {0} + Možnost vyžaduje parametr: {0} + + + + Source file '{0}' could not be found + Zdrojový soubor {0} se nenašel. + + + + The file extension of '{0}' is not recognized. Source files must have extension .fs, .fsi, .fsx, .fsscript, .ml or .mli. + Soubor {0} má nerozpoznanou příponu. Zdrojový soubor musí mít příponu .fs, .fsi, .fsx, .fsscript, .ml nebo .mli. + + + + Could not resolve assembly '{0}' + Sestavení {0} se nedalo přeložit. + + + + Could not resolve assembly '{0}' required by '{1}' + Sestavení {0} požadované souborem {1} se nedalo přeložit. + + + + Error opening binary file '{0}': {1} + Chyba při otevírání binárního souboru {0}: {1} + + + + The F#-compiled DLL '{0}' needs to be recompiled to be used with this version of F# + Aby se knihovna DLL {0} zkompilovaná v F# dala použít v této verzi F#, musí se znovu zkompilovat. + + + + Invalid directive. Expected '#I \"<path>\"'. + Neplatná direktiva. Očekávaná direktiva je #I \"<cesta>\". + + + + Invalid directive. Expected '#r \"<file-or-assembly>\"'. + Neplatná direktiva. Očekávaná direktiva je #r \"<file-or-assembly>\". + + + + Invalid directive. Expected '#load \"<file>\" ... \"<file>\"'. + Neplatná direktiva. Očekávaná direktiva je #load \"<soubor>\" ... \"<soubor>\". + + + + Invalid directive. Expected '#time', '#time \"on\"' or '#time \"off\"'. + Neplatná direktiva. Očekávaná direktiva je #time, #time \"on\" nebo #time \"off\". + + + + Directives inside modules are ignored + Direktivy uvnitř modulů se ignorují. + + + + A signature for the file or module '{0}' has already been specified + Signatura pro soubor nebo modul {0} už je zadaná. + + + + An implementation of file or module '{0}' has already been given. Compilation order is significant in F# because of type inference. You may need to adjust the order of your files to place the signature file before the implementation. In Visual Studio files are type-checked in the order they appear in the project file, which can be edited manually or adjusted using the solution explorer. + Implementace souboru nebo modulu {0} už je zadaná. V F# záleží na pořadí kompilace, a to kvůli odvození typů proměnných. Pořadí souborů můžete upravit a podpisový soubor umístit před implementaci. Ve Visual Studiu se typ souborů kontroluje v tom pořadí, ve kterém se soubory objeví v souboru projektu, který se dá upravit ručně nebo pomocí Průzkumníka řešení. + + + + An implementation of the file or module '{0}' has already been given + Implementace souboru nebo modulu {0} už je zadaná. + + + + The signature file '{0}' does not have a corresponding implementation file. If an implementation file exists then check the 'module' and 'namespace' declarations in the signature and implementation files match. + Podpisový soubor {0} nemá odpovídající implementační soubor. Pokud implementační soubor existuje, zkontrolujte, jestli se deklarace module a namespace v podpisovém a implementačním souboru shodují. + + + + '{0}' is not a valid integer argument + {0} není platný celočíselný argument. + + + + '{0}' is not a valid floating point argument + {0} není platný argument s plovoucí desetinnou čárkou. + + + + Unrecognized option: '{0}' + Nerozpoznaná možnost: {0} + + + + Invalid module or namespace name + Neplatný název modulu nebo oboru názvů + + + + Error reading/writing metadata for the F# compiled DLL '{0}'. Was the DLL compiled with an earlier version of the F# compiler? (error: '{1}'). + Chyba čtení nebo zápisu metadat pro knihovnu DLL {0} zkompilovanou v F#. Byla knihovna DLL zkompilovaná ve starší verzi kompilátoru F#? (chyba: {1}). + + + + The type/module '{0}' is not a concrete module or type + Typ nebo modul {0} není konkrétním modulem nebo typem. + + + + The type '{0}' has an inline assembly code representation + Typ {0} má reprezentaci vloženého kódu sestavení. + + + + A namespace and a module named '{0}' both occur in two parts of this assembly + Obor názvů a modul s názvem {0} se oba vyskytují ve dvou částech tohoto sestavení. + + + + Two modules named '{0}' occur in two parts of this assembly + Dva moduly s názvem {0} se vyskytují ve dvou částech tohoto sestavení. + + + + Two type definitions named '{0}' occur in namespace '{1}' in two parts of this assembly + Dvě definice typu s názvem {0} se vyskytují v oboru názvů {1} ve dvou částech tohoto sestavení. + + + + A module and a type definition named '{0}' occur in namespace '{1}' in two parts of this assembly + Modul a definice typu s názvem {0} se vyskytují v oboru názvů {1} ve dvou částech tohoto sestavení. + + + + Invalid member signature encountered because of an earlier error + Zjistila se neplatná signatura člena kvůli dřívější chybě. + + + + This value does not have a valid property setter type + Tato hodnota nemá platný typ metody set vlastnosti. + + + + Invalid form for a property getter. At least one '()' argument is required when using the explicit syntax. + Neplatná notace pro metodu getter vlastnosti. Při použití explicitní syntaxe se vyžaduje aspoň jeden argument (). + + + + Invalid form for a property setter. At least one argument is required. + Neplatná notace pro metodu set vlastnosti. Vyžaduje se aspoň jeden argument. + + + + Unexpected use of a byref-typed variable + Neočekávané použití proměnné typu ByRef. + + + + Invalid mutation of a constant expression. Consider copying the expression to a mutable local, e.g. 'let mutable x = ...'. + Neplatná mutace konstantního výrazu. Zvažte možnost zkopírovat výraz do lokální proměnné, třeba let mutable x = ... + + + + The value has been copied to ensure the original is not mutated by this operation or because the copy is implicit when returning a struct from a member and another member is then accessed + Hodnota se zkopírovala pro případ, že by se v důsledku této operace původní hodnota změnila. + + + + Recursively defined values cannot appear directly as part of the construction of a tuple value within a recursive binding + Rekurzivně definované hodnoty se nedají použít přímo jako součást konstrukce hodnoty řazené kolekce členů v rekurzivní vazbě. + + + + Recursive values cannot appear directly as a construction of the type '{0}' within a recursive binding. This feature has been removed from the F# language. Consider using a record instead. + Rekurzivní hodnoty nejde použít přímo jako konstrukce typu {0} v rekurzivní vazbě. Tato funkce je už z jazyka F# odebraná. Zvažte možnost použít místo ní záznam. + + + + Recursive values cannot be directly assigned to the non-mutable field '{0}' of the type '{1}' within a recursive binding. Consider using a mutable field instead. + Rekurzivní hodnoty se nedají přímo přiřadit k neproměnlivému poli {0} typu {1} v rekurzivní vazbě. Zvažte možnost použít místo toho proměnlivé pole. + + + + Unexpected decode of AutoOpenAttribute + Neočekávané dekódování AutoOpenAttribute + + + + Unexpected decode of InternalsVisibleToAttribute + Neočekávané dekódování InternalsVisibleToAttribute + + + + Unexpected decode of InterfaceDataVersionAttribute + Neočekávané dekódování InterfaceDataVersionAttribute + + + + Active patterns cannot return more than 7 possibilities + Aktivní vzory nemůžou vracet víc než 7 možností. + + + + This is not a valid constant expression or custom attribute value + Toto není platný konstantní výraz nebo hodnota vlastního atributu. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe mutability attributes differ + Modul {0} obsahuje hodnotu\n {1}, \nale jeho signatura definuje hodnotu\n {2}. \nLiší se atributy proměnlivosti. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe names differ + Modul {0} obsahuje hodnotu\n {1}, \nale jeho signatura definuje hodnotu\n {2}. \nLiší se názvy. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe compiled names differ + Modul {0} obsahuje hodnotu\n {1}, \nale jeho signatura definuje hodnotu\n {2}. \nLiší se zkompilovanými názvy. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe display names differ + Modul {0} obsahuje hodnotu\n {1}, \nale jeho signatura definuje hodnotu\n {2}. \nLiší se zobrazované názvy. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe accessibility specified in the signature is more than that specified in the implementation + Modul {0} obsahuje hodnotu\n {1}, \nale jeho signatura definuje hodnotu\n {2}. \nDostupnost zadaná v signatuře přesahuje dostupnost zadanou v implementaci. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe inline flags differ + Modul {0} obsahuje hodnotu\n {1}, \nale jeho signatura definuje hodnotu\n {2}. \nLiší se vloženými příznaky. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe literal constant values and/or attributes differ + Modul {0} obsahuje hodnotu\n {1}, \nale jeho signatura definuje hodnotu\n {2}. \nHodnoty nebo atributy literálové konstanty se liší. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is a type function and the other is not. The signature requires explicit type parameters if they are present in the implementation. + Modul {0} obsahuje hodnotu\n {1}, \nale jeho signatura definuje hodnotu\n {2}. \nJedna je funkcí typu a druhá ne. Signatura vyžaduje explicitní parametry typu (pokud se v implementaci vyskytují). + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe respective type parameter counts differ + Modul {0} obsahuje hodnotu\n {1}, \nale jeho signatura definuje hodnotu\n {2}. \nLiší se odpovídajícím počtem parametrů typu. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe types differ + Modul {0} obsahuje hodnotu\n {1}, \nale jeho signatura definuje hodnotu\n {2}. \nLiší se typy. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is an extension member and the other is not + Modul {0} obsahuje hodnotu\n {1}, \nale jeho signatura definuje hodnotu\n {2}. \nJedna je členem rozšíření a druhá ne. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nAn arity was not inferred for this value + Modul {0} obsahuje hodnotu\n {1}, \nale jeho signatura definuje hodnotu\n {2}. \nPro tuto hodnotu se neodvodila arita. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe number of generic parameters in the signature and implementation differ (the signature declares {3} but the implementation declares {4} + Modul {0} obsahuje hodnotu\n {1}, \nale jeho signatura definuje hodnotu\n {2}. \nPočet obecných parametrů v signatuře a implementaci se liší (signatura deklaruje {3}, ale implementace {4}). + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe generic parameters in the signature and implementation have different kinds. Perhaps there is a missing [<Measure>] attribute. + Modul {0} obsahuje hodnotu\n {1}, \nale jeho signatura definuje hodnotu\n {2}. \nObecné parametry v signatuře a implementaci jsou různých druhů. Je možné, že chybí atribut [<Measure>]. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe arities in the signature and implementation differ. The signature specifies that '{3}' is function definition or lambda expression accepting at least {4} argument(s), but the implementation is a computed function value. To declare that a computed function value is a permitted implementation simply parenthesize its type in the signature, e.g.\n\tval {5}: int -> (int -> int)\ninstead of\n\tval {6}: int -> int -> int. + Modul {0} obsahuje hodnotu\n {1}, \nale jeho signatura definuje hodnotu\n {2}. \nArity v signatuře a implementaci se liší. Signatura určuje, že {3} je definice funkce nebo výraz lambda přijímající argumenty aspoň v počtu {4}, ale implementace je vypočítaná hodnota funkce. Pokud chcete deklarovat vypočítanou hodnotu funkce jako povolenou implementaci, jednoduše ohraničte její typ v signatuře závorkami, třeba pomocí notace\n\tval {5}: int -> (int -> int),\nkterá nahradí notaci\n\tval {6}: int -> int -> int. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe CLI member names differ + Modul {0} obsahuje hodnotu\n {1}, \nale jeho signatura definuje hodnotu\n {2}. \nLiší se názvy členů CLI. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is static and the other isn't + Modul {0} obsahuje hodnotu\n {1}, \nale jeho signatura definuje hodnotu\n {2}. \nJedna je statická a druhá ne. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is virtual and the other isn't + Modul {0} obsahuje hodnotu\n {1}, \nale jeho signatura definuje hodnotu\n {2}. \nJedna je virtuální a druhá ne. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is abstract and the other isn't + Modul {0} obsahuje hodnotu\n {1}, \nale jeho signatura definuje hodnotu\n {2}. \nJedna je abstraktní a druhá ne. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is final and the other isn't + Modul {0} obsahuje hodnotu\n {1}, \nale jeho signatura definuje hodnotu\n {2}. \nJedna z nich je finální a druhá ne. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is marked as an override and the other isn't + Modul {0} obsahuje hodnotu\n {1}, \nale jeho signatura definuje hodnotu\n {2}. \nJedna je označená jako přepsání a druhá ne. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is a constructor/property and the other is not + Modul {0} obsahuje hodnotu\n {1}, \nale jeho signatura definuje hodnotu\n {2}. \nJedna je konstruktorem nebo vlastností a druhá ne. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe compiled representation of this method is as a static member but the signature indicates its compiled representation is as an instance member + Modul {0} obsahuje hodnotu\n {1}, \nale jeho signatura definuje hodnotu\n {2}. \nZkompilovaná reprezentace této metody je statickým členem, ale signatura určuje její zkompilovanou reprezentaci jako člena instance. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe compiled representation of this method is as an instance member, but the signature indicates its compiled representation is as a static member + Modul {0} obsahuje hodnotu\n {1}, \nale jeho signatura definuje hodnotu\n {2}. \nZkompilovaná reprezentace této metody je členem instance, ale signatura určuje její zkompilovanou reprezentaci jako statického člena. + + + + The {0} definitions in the signature and implementation are not compatible because the names differ. The type is called '{1}' in the signature file but '{2}' in implementation. + Definice {0} v signatuře a implementaci nejsou kompatibilní, protože se liší názvy. Typ se v souboru signatury nazývá {1}, ale v implementaci se nazývá {2}. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the respective type parameter counts differ + Definice {0} pro typ {1} v signatuře a implementaci nejsou kompatibilní, protože se liší odpovídajícím počtem parametrů typu. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the accessibility specified in the signature is more than that specified in the implementation + Definice {0} pro typ {1} v signatuře a implementaci nejsou kompatibilní, protože dostupnost zadaná v signatuře přesahuje dostupnost zadanou v implementaci. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature requires that the type supports the interface {2} but the interface has not been implemented + Definice {0} pro typ {1} v signatuře a implementaci nejsou kompatibilní, protože signatura vyžaduje, aby typ podporoval rozhraní {2}, které se ale neimplementovalo. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation says this type may use nulls as a representation but the signature does not + Definice {0} pro typ {1} v signatuře a implementaci nejsou kompatibilní, protože implementace uvádí, že tento typ může jako reprezentaci používat null, ale signatura to neuvádí. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation says this type may use nulls as an extra value but the signature does not + Definice {0} pro typ {1} v signatuře a implementaci nejsou kompatibilní, protože implementace uvádí, že tento typ může jako hodnotu navíc používat null, ale signatura to neuvádí. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature says this type may use nulls as a representation but the implementation does not + Definice {0} pro typ {1} v signatuře a implementaci nejsou kompatibilní, protože signatura uvádí, že tento typ může jako reprezentaci používat null, ale implementace to neuvádí. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature says this type may use nulls as an extra value but the implementation does not + Definice {0} pro typ {1} v signatuře a implementaci nejsou kompatibilní, protože signatura uvádí, že tento typ může jako hodnotu navíc používat null, ale implementace to neuvádí. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation type is sealed but the signature implies it is not. Consider adding the [<Sealed>] attribute to the signature. + Definice {0} pro typ {1} v signatuře a implementaci nejsou kompatibilní, protože typ implementace je zapečetěný, ale ze signatury vyplývá, že není. Zvažte možnost přidat k signatuře atribut [<Sealed>]. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation type is not sealed but signature implies it is. Consider adding the [<Sealed>] attribute to the implementation. + Definice {0} pro typ {1} v signatuře a implementaci nejsou kompatibilní, protože typ implementace není zapečetěný, ale ze signatury vyplývá, že je. Zvažte možnost přidat k implementaci atribut [<Sealed>]. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation is an abstract class but the signature is not. Consider adding the [<AbstractClass>] attribute to the signature. + Definice {0} pro typ {1} v signatuře a implementaci nejsou kompatibilní, protože implementace je abstraktní třída, ale signatura ne. Zvažte možnost přidat k signatuře atribut [<AbstractClass>]. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature is an abstract class but the implementation is not. Consider adding the [<AbstractClass>] attribute to the implementation. + Definice {0} pro typ {1} v signatuře a implementaci nejsou kompatibilní, protože signatura je abstraktní třída, ale implementace ne. Zvažte možnost přidat k implementaci atribut [<AbstractClass>]. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the types have different base types + Definice {0} pro typ {1} v signatuře a implementaci nejsou kompatibilní, protože jejich typy mají odlišné základní typy. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the number of {2}s differ + Definice {0} pro typ {1} v signatuře a implementaci nejsou kompatibilní, protože se liší počet {2}. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature defines the {2} '{3}' but the implementation does not (or does, but not in the same order) + Definice {0} pro typ {1} v signatuře a implementaci nejsou kompatibilní, protože signatura definuje {2} {3}, ale implementace ne (anebo ano, ale ne ve stejném pořadí). + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation defines the {2} '{3}' but the signature does not (or does, but not in the same order) + Definice {0} pro typ {1} v signatuře a implementaci nejsou kompatibilní, protože implementace definuje {2} {3}, ale signatura ne (anebo ano, ale ne ve stejném pořadí). + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation defines a struct but the signature defines a type with a hidden representation + Definice {0} pro typ {1} v signatuře a implementaci nejsou kompatibilní, protože implementace definuje strukturu, zatímco signatura typ se skrytou reprezentací. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because a CLI type representation is being hidden by a signature + Definice {0} pro typ {1} v signatuře a implementaci nejsou kompatibilní, protože signatura skrývá reprezentaci typu CLI. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because a type representation is being hidden by a signature + Definice {0} pro typ {1} v signatuře a implementaci nejsou kompatibilní, protože signatura skrývá reprezentaci typu. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the types are of different kinds + Definice {0} pro typ {1} v signatuře a implementaci nejsou kompatibilní, protože typy jsou různého druhu. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the IL representations differ + Definice {0} pro typ {1} v signatuře a implementaci nejsou kompatibilní, protože se liší reprezentace IL. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the representations differ + Definice {0} pro typ {1} v signatuře a implementaci nejsou kompatibilní, protože se liší reprezentace. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the field {2} was present in the implementation but not in the signature + Definice {0} pro typ {1} v signatuře a implementaci nejsou kompatibilní, protože pole {2} se nacházelo v implementaci, ale v signatuře ne. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the order of the fields is different in the signature and implementation + Definice {0} pro typ {1} v signatuře a implementaci nejsou kompatibilní, protože se signatura a implementace liší pořadím polí. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the field {2} was required by the signature but was not specified by the implementation + Definice {0} pro typ {1} v signatuře a implementaci nejsou kompatibilní, protože signatura vyžadovala pole {2}, které ale v implementaci zadané nebylo. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the field '{2}' was present in the implementation but not in the signature. Struct types must now reveal their fields in the signature for the type, though the fields may still be labelled 'private' or 'internal'. + Definice {0} pro typ {1} v signatuře a implementaci nejsou kompatibilní, protože pole {2} se nacházelo v implementaci, ale v signatuře ne. Typy Struct teď musí zobrazovat svoje pole v signatuře typu. Přesto můžou mít pole označení private nebo internal. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the abstract member '{2}' was required by the signature but was not specified by the implementation + Definice {0} pro typ {1} v signatuře a implementaci nejsou kompatibilní, protože signatura vyžadovala abstraktního člena {2}, který ale v implementaci zadaný nebyl. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the abstract member '{2}' was present in the implementation but not in the signature + Definice {0} pro typ {1} v signatuře a implementaci nejsou kompatibilní, protože abstraktní člen {2} se nacházel v implementaci, ale v signatuře ne. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature declares a {2} while the implementation declares a {3} + Definice {0} pro typ {1} v signatuře a implementaci nejsou kompatibilní, protože signatura deklaruje {2}, ale implementace deklaruje {3}. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the abbreviations differ: {2} versus {3} + Definice {0} pro typ {1} v signatuře a implementaci nejsou kompatibilní, protože se liší zkratky: {2} oproti {3} + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because an abbreviation is being hidden by a signature. The abbreviation must be visible to other CLI languages. Consider making the abbreviation visible in the signature. + Definice {0} pro typ {1} v signatuře a implementaci nejsou kompatibilní, protože signatura skrývá zkratku. Zkratka musí být viditelná pro ostatní jazyky CLI. Zvažte zviditelnění zkratky v signatuře. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature has an abbreviation while the implementation does not + Definice {0} pro typ {1} v signatuře a implementaci nejsou kompatibilní, protože signatura má zkratku, ale implementace ne. + + + + The module contains the constructor\n {0} \nbut its signature specifies\n {1} \nThe names differ + Modul obsahuje konstruktor\n {0}, \nale jeho signatura definuje\n {1}. \nLiší se názvy. + + + + The module contains the constructor\n {0} \nbut its signature specifies\n {1} \nThe respective number of data fields differ + Modul obsahuje konstruktor\n {0}, \nale jeho signatura definuje\n {1}. \nLiší se odpovídající počty datových polí. + + + + The module contains the constructor\n {0} \nbut its signature specifies\n {1} \nThe types of the fields differ + Modul obsahuje konstruktor\n {0}, \nale jeho signatura definuje\n {1}. \nLiší se typy polí. + + + + The module contains the constructor\n {0} \nbut its signature specifies\n {1} \nthe accessibility specified in the signature is more than that specified in the implementation + Modul obsahuje konstruktor\n {0}, \nale jeho signatura definuje\n {1}. \nDostupnost zadaná v signatuře přesahuje dostupnost zadanou v implementaci. + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe names differ + Modul obsahuje pole\n {0}, \nale jeho signatura definuje\n {1}. \nLiší se názvy. + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nthe accessibility specified in the signature is more than that specified in the implementation + Modul obsahuje pole\n {0}, \nale jeho signatura definuje\n {1}. \nDostupnost zadaná v signatuře přesahuje dostupnost zadanou v implementaci. + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe 'static' modifiers differ + Modul obsahuje pole\n {0}, \nale jeho signatura definuje\n {1}. \nLiší se modifikátory static. + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe 'mutable' modifiers differ + Modul obsahuje pole\n {0}, \nale jeho signatura definuje\n {1}. \nLiší se modifikátory mutable. + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe 'literal' modifiers differ + Modul obsahuje pole\n {0}, \nale jeho signatura definuje\n {1}. \nLiší se modifikátory literal. + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe types differ + Modul obsahuje pole\n {0}, \nale jeho signatura definuje\n {1}. \nLiší se typy. + + + + The implicit instantiation of a generic construct at or near this point could not be resolved because it could resolve to multiple unrelated types, e.g. '{0}' and '{1}'. Consider using type annotations to resolve the ambiguity + Nepovedlo se přeložit implicitní vytvoření instance obecného konstruktoru na této pozici nebo blízko ní, protože by se dala přeložit na víc nesouvisejících typů, třeba {0} a {1}. Tuto nejednoznačnost můžete vyřešit pomocí poznámek typu. + + + + Could not resolve the ambiguity inherent in the use of a 'printf'-style format string + Nepovedlo se vyřešit nejednoznačnost vyplývající z použití formátovacího řetězce ve stylu printf. + + + + Could not resolve the ambiguity in the use of a generic construct with an 'enum' constraint at or near this position + Nepovedlo se vyřešit nejednoznačnost v použití obecného konstruktoru s omezením enum na této pozici nebo blízko ní. + + + + Could not resolve the ambiguity in the use of a generic construct with a 'delegate' constraint at or near this position + Nepovedlo se vyřešit nejednoznačnost v použití obecného konstruktoru s omezením delegate na této pozici nebo blízko ní. + + + + Invalid value + Neplatná hodnota + + + + The signature and implementation are not compatible because the respective type parameter counts differ + Signatura a implementace nejsou kompatibilní, protože se liší počtem příslušných parametrů typu. + + + + The signature and implementation are not compatible because the type parameter in the class/signature has a different compile-time requirement to the one in the member/implementation + Signatura a implementace nejsou kompatibilní, protože parametr typu v třídě nebo signatuře má jiný požadavek za kompilace než parametr u člena nebo implementace. + + + + The signature and implementation are not compatible because the declaration of the type parameter '{0}' requires a constraint of the form {1} + Signatura a implementace nejsou kompatibilní, protože deklarace parametru typu {0} vyžaduje omezení v podobě {1}. + + + + The signature and implementation are not compatible because the type parameter '{0}' has a constraint of the form {1} but the implementation does not. Either remove this constraint from the signature or add it to the implementation. + Signatura a implementace nejsou kompatibilní, protože parametr typu {0} má omezení v podobě {1}, ale implementace ne. Buď toto omezení odeberte ze signatury, nebo ho přidejte do implementace. + + + + The type '{0}' implements 'System.IComparable'. Consider also adding an explicit override for 'Object.Equals' + Typ {0} implementuje rozhraní System.IComparable. Zvažte možnost přidat taky explicitní přepsání Object.Equals. + + + + The type '{0}' implements 'System.IComparable' explicitly but provides no corresponding override for 'Object.Equals'. An implementation of 'Object.Equals' has been automatically provided, implemented via 'System.IComparable'. Consider implementing the override 'Object.Equals' explicitly + Typ {0} má explicitní implementaci rozhraní System.IComparable, ale neposkytuje žádné odpovídající přepsání Object.Equals. Implementace Object.Equals se poskytla automaticky prostřednictvím rozhraní System.IComparable. Zvažte možnost implementovat přepsání Object.Equals explicitně. + + + + The struct, record or union type '{0}' has an explicit implementation of 'Object.GetHashCode' or 'Object.Equals'. You must apply the 'CustomEquality' attribute to the type + Typ struktura, záznam nebo sjednocení {0} explicitně implementuje Object.GetHashCode nebo Object.Equals. U tohoto typu musíte použít atribut CustomEquality. + + + + The struct, record or union type '{0}' has an explicit implementation of 'Object.GetHashCode'. Consider implementing a matching override for 'Object.Equals(obj)' + Typ struktura, záznam nebo sjednocení {0} explicitně implementuje Object.GetHashCode. Zvažte implementaci odpovídajícího přepsání pro Object.Equals(obj). + + + + The struct, record or union type '{0}' has an explicit implementation of 'Object.Equals'. Consider implementing a matching override for 'Object.GetHashCode()' + Typ struktura, záznam nebo sjednocení {0} explicitně implementuje Object.Equals. Zvažte možnost implementace odpovídajícího přepsání pro Object.GetHashCode(). + + + + The exception definitions are not compatible because a CLI exception mapping is being hidden by a signature. The exception mapping must be visible to other modules. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1} + Definice výjimek nejsou kompatibilní, protože signatura skrývá mapování výjimky CLI. Mapování výjimky musí být viditelné pro ostatní moduly. Modul obsahuje definici výjimky\n {0}, \nale jeho signatura definuje\n\t{1}. + + + + The exception definitions are not compatible because the CLI representations differ. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1} + Definice výjimek nejsou kompatibilní, protože se liší reprezentace CLI. Modul obsahuje definici výjimky\n {0}, \nale jeho signatura definuje\n\t{1}. + + + + The exception definitions are not compatible because the exception abbreviation is being hidden by the signature. The abbreviation must be visible to other CLI languages. Consider making the abbreviation visible in the signature. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1}. + Definice výjimek nejsou kompatibilní, protože signatura skrývá zkratku výjimky. Zkratka musí být viditelná pro ostatní jazyky CLI. Zvažte zviditelnění zkratky v signatuře. Modul obsahuje definici výjimky\n {0}, \nale jeho signatura definuje\n\t{1}. + + + + The exception definitions are not compatible because the exception abbreviations in the signature and implementation differ. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1}. + Definice výjimek nejsou kompatibilní, protože zkratky výjimek v signatuře a implementaci se liší. Modul obsahuje definici výjimky\n {0}, \nale jeho signatura definuje\n\t{1}. + + + + The exception definitions are not compatible because the exception declarations differ. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1}. + Definice výjimek nejsou kompatibilní, protože se liší deklarace výjimek. Modul obsahuje definici výjimky\n {0}, \nale jeho signatura definuje\n\t{1}. + + + + The exception definitions are not compatible because the field '{0}' was required by the signature but was not specified by the implementation. The module contains the exception definition\n {1} \nbut its signature specifies\n\t{2}. + Definice výjimek nejsou kompatibilní, protože signatura vyžadovala pole {0}, které ale implementace nedefinuje. Modul obsahuje definici výjimky\n {1}, \nale jeho signatura definuje \n\t{2}. + + + + The exception definitions are not compatible because the field '{0}' was present in the implementation but not in the signature. The module contains the exception definition\n {1} \nbut its signature specifies\n\t{2}. + Definice výjimek nejsou kompatibilní, protože pole {0} se nacházelo v implementaci, ale v signatuře ne. Modul obsahuje definici výjimky\n {1}, \nale jeho signatura definuje\n\t{2}. + + + + The exception definitions are not compatible because the order of the fields is different in the signature and implementation. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1}. + Definice výjimek nejsou kompatibilní, protože se signatura a implementace liší pořadím polí. Modul obsahuje definici výjimky\n {0}, \nale jeho signatura definuje\n\t{1}. + + + + The namespace or module attributes differ between signature and implementation + Atributy oboru názvů nebo modulu se v signatuře a implementaci liší. + + + + This method is over-constrained in its type parameters + Tato metoda je v parametrech typu příliš omezená. + + + + No implementations of '{0}' had the correct number of arguments and type parameters. The required signature is '{1}'. + Žádná implementace {0} nemá správný počet argumentů a parametrů typu. Požadovaná signatura je {1}. + + + + The override for '{0}' was ambiguous + Přepsání {0} bylo nejednoznačné. + + + + More than one override implements '{0}' + Víc než jedno přepsání implementuje {0}. + + + + The method '{0}' is sealed and cannot be overridden + Metoda {0} je zapečetěná a nedá se přepisovat. + + + + The override '{0}' implements more than one abstract slot, e.g. '{1}' and '{2}' + Přepsání {0} implementuje víc než jednu abstraktní datovou oblast, třeba {1} a {2}. + + + + Duplicate or redundant interface + Duplicitní nebo nadbytečné rozhraní + + + + The interface '{0}' is included in multiple explicitly implemented interface types. Add an explicit implementation of this interface. + Rozhraní {0} je zahrnuté v několika explicitně implementovaných typech rozhraní. Přidejte explicitní implementaci tohoto rozhraní. + + + + A named argument has been assigned more than one value + Pojmenovaný argument má přiřazenou víc než jednu hodnotu. + + + + No implementation was given for '{0}' + {0} nemá žádnou implementaci. + + + + No implementation was given for '{0}'. Note that all interface members must be implemented and listed under an appropriate 'interface' declaration, e.g. 'interface ... with member ...'. + {0} nemá žádnou implementaci. Všechny členy rozhraní je potřeba implementovat a uvést pod příslušnou deklarací interface, třeba takto: interface ... with member ... + + + + The member '{0}' does not have the correct number of arguments. The required signature is '{1}'. + Člen {0} nemá správný počet argumentů. Požadovaná signatura je {1}. + + + + The member '{0}' does not have the correct number of method type parameters. The required signature is '{1}'. + Člen {0} nemá správný počet parametrů typu metody. Požadovaná signatura je {1}. + + + + The member '{0}' does not have the correct kinds of generic parameters. The required signature is '{1}'. + Člen {0} nemá správný druh obecných parametrů. Požadovaná signatura je {1}. + + + + The member '{0}' cannot be used to implement '{1}'. The required signature is '{2}'. + Člen {0} se k implementaci {1} použít nedá. Požadovaná signatura je {2}. + + + + Error while parsing embedded IL + Chyba při analýze vloženého kódu IL + + + + Error while parsing embedded IL type + Chyba při analýze vloženého typu IL + + + + This indexer notation has been removed from the F# language + Tato notace indexeru se už v jazyce F# nepoužívá. + + + + Invalid expression on left of assignment + Neplatný výraz nalevo od přiřazení + + + + The 'ReferenceEquality' attribute cannot be used on structs. Consider using the 'StructuralEquality' attribute instead, or implement an override for 'System.Object.Equals(obj)'. + Atribut ReferenceEquality se u struktur použít nedá. Zvažte, jestli byste místo něho neměli použít atribut StructuralEquality nebo implementovat přepsání pro System.Object.Equals(obj). + + + + This type uses an invalid mix of the attributes 'NoEquality', 'ReferenceEquality', 'StructuralEquality', 'NoComparison' and 'StructuralComparison' + Tento typ používá neplatnou kombinaci atributů NoEquality, ReferenceEquality, StructuralEquality, NoComparison a StructuralComparison. + + + + The 'NoEquality' attribute must be used in conjunction with the 'NoComparison' attribute + Atribut NoEquality je potřeba použít ve spojení s atributem NoComparison. + + + + The 'StructuralComparison' attribute must be used in conjunction with the 'StructuralEquality' attribute + Atribut StructuralComparison je potřeba použít ve spojení s atributem StructuralEquality. + + + + The 'StructuralEquality' attribute must be used in conjunction with the 'NoComparison' or 'StructuralComparison' attributes + Atribut StructuralEquality je potřeba použít ve spojení s atributem NoComparison nebo StructuralComparison. + + + + A type cannot have both the 'ReferenceEquality' and 'StructuralEquality' or 'StructuralComparison' attributes + Typ nemůže mít zároveň atribut ReferenceEquality a StructuralEquality nebo StructuralComparison. + + + + Only record, union, exception and struct types may be augmented with the 'ReferenceEquality', 'StructuralEquality' and 'StructuralComparison' attributes + O atributy ReferenceEquality, StructuralEquality a StructuralComparison se dají rozšířit jenom typy záznam, sjednocení, výjimka a struktura. + + + + A type with attribute 'ReferenceEquality' cannot have an explicit implementation of 'Object.Equals(obj)', 'System.IEquatable<_>' or 'System.Collections.IStructuralEquatable' + Typ s atributem ReferenceEquality nemůže mít explicitní implementaci Object.Equals(obj), System.IEquatable<_> nebo System.Collections.IStructuralEquatable. + + + + A type with attribute 'CustomEquality' must have an explicit implementation of at least one of 'Object.Equals(obj)', 'System.IEquatable<_>' or 'System.Collections.IStructuralEquatable' + Typ s atributem CustomEquality musí mít explicitní implementaci aspoň jednoho z následujících: Object.Equals(obj), System.IEquatable<_>, nebo System.Collections.IStructuralEquatable. + + + + A type with attribute 'CustomComparison' must have an explicit implementation of at least one of 'System.IComparable' or 'System.Collections.IStructuralComparable' + Typ s atributem CustomComparison musí mít explicitní implementaci buď aspoň System.IComparable, nebo aspoň System.Collections.IStructuralComparable. + + + + A type with attribute 'NoEquality' should not usually have an explicit implementation of 'Object.Equals(obj)'. Disable this warning if this is intentional for interoperability purposes + Není běžné, aby typ s atributem NoEquality měl explicitní implementaci Object.Equals(obj). Pokud je to záměr s cílem dosáhnout interoperability, pak toto upozornění vypněte. + + + + A type with attribute 'NoComparison' should not usually have an explicit implementation of 'System.IComparable', 'System.IComparable<_>' or 'System.Collections.IStructuralComparable'. Disable this warning if this is intentional for interoperability purposes + Není běžné, aby typ s atributem NoComparison měl explicitní implementaci System.IComparable, System.IComparable<_> nebo System.Collections.IStructuralComparable. Pokud je to záměr s cílem dosáhnout interoperability, pak toto upozornění vypněte. + + + + The 'CustomEquality' attribute must be used in conjunction with the 'NoComparison' or 'CustomComparison' attributes + Atribut CustomEquality je potřeba použít ve spojení s atributem NoComparison nebo CustomComparison. + + + + Positional specifiers are not permitted in format strings + Specifikátory pozice nejsou v řetězcích formátu povolené. + + + + Missing format specifier + Chybí specifikátor formátu. + + + + '{0}' flag set twice + Příznak {0} je nastavený dvakrát. + + + + Prefix flag (' ' or '+') set twice + Příznak předpony (mezera nebo znaménko plus) je nastavený dvakrát. + + + + The # formatting modifier is invalid in F# + Modifikátor formátu # je v jazyce F# neplatný. + + + + Bad precision in format specifier + Chybná přesnost ve specifikátoru formátu + + + + Bad width in format specifier + Chybná šířka ve specifikátoru formátu + + + + '{0}' format does not support '0' flag + Formát {0} nepodporuje příznak 0. + + + + Precision missing after the '.' + Za tečkou chybí určení přesnosti. + + + + '{0}' format does not support precision + Formát {0} nepodporuje přesnost. + + + + Bad format specifier (after l or L): Expected ld,li,lo,lu,lx or lX. In F# code you can use %d, %x, %o or %u instead, which are overloaded to work with all basic integer types. + Špatný specifikátor formátu (po l nebo L): Očekávaný specifikátor je ld, li, lo, lu, lx nebo lX. V kódu F# můžete místo toho použít %d, %x, %o nebo %u: tyto specifikátory formátu jsou přetěžované, takže fungují se všemi základními celočíselnými typy. + + + + The 'l' or 'L' in this format specifier is unnecessary. In F# code you can use %d, %x, %o or %u instead, which are overloaded to work with all basic integer types. + Použití l nebo L je u tohoto specifikátoru formátu nadbytečné. V kódu F# můžete místo toho použít %d, %x, %o nebo %u: tyto specifikátory formátu jsou přetěžované, takže fungují se všemi základními celočíselnými typy. + + + + The 'h' or 'H' in this format specifier is unnecessary. You can use %d, %x, %o or %u instead, which are overloaded to work with all basic integer types. + U tohoto specifikátoru formátu není nutné používat h nebo H. Místo toho můžete použít %d, %x, %o nebo %u. Tyto specifikátory formátu se přetěžují, aby fungovaly se všemi základními celočíselnými typy. + + + + '{0}' does not support prefix '{1}' flag + {0} nepodporuje příznak předpony {1}. + + + + Bad format specifier: '{0}' + Špatný specifikátor formátu: {0} + + + + System.Environment.Exit did not exit + Metoda System.Environment.Exit neprovedla ukončení. + + + + The treatment of this operator is now handled directly by the F# compiler and its meaning cannot be redefined + Zpracování tohoto operátoru teď provádí přímo kompilátor F# a jeho význam se nedá předefinovat. + + + + A protected member is called or 'base' is being used. This is only allowed in the direct implementation of members since they could escape their object scope. + Volá se chráněný člen nebo se používá base. To je povolené jenom u přímé implementace členů, protože by se tak mohly dostat mimo definiční obor objektu. + + + + The byref-typed variable '{0}' is used in an invalid way. Byrefs cannot be captured by closures or passed to inner functions. + Proměnná {0} typu ByRef se používá neplatným způsobem. Proměnné typu ByRef nejde zachytávat ukončením nebo předávat vnitřní funkci. + + + + The 'base' keyword is used in an invalid way. Base calls cannot be used in closures. Consider using a private member to make base calls. + Klíčové slovo base je použité neplatným způsobem. Volání base se u ukončení použít nedají. K volání base se dá použít privátní člen. + + + + The variable '{0}' is used in an invalid way + Proměnná {0} je použitá neplatným způsobem. + + + + The type '{0}' is less accessible than the value, member or type '{1}' it is used in. + Typ {0} je méně dostupný než hodnota, člen nebo typ {1}, ve kterém se používá. + + + + 'System.Void' can only be used as 'typeof<System.Void>' in F# + System.Void se dá v F# použít jenom jako typeof<System.Void>. + + + + A type instantiation involves a byref type. This is not permitted by the rules of Common IL. + Vytvoření instance typu zahrnuje typ ByRef. To ale pravidla Common IL nepovolují. + + + + Calls to 'reraise' may only occur directly in a handler of a try-with + Volání reraise se může vyskytovat jenom přímo v obslužné rutině try-with. + + + + Expression-splicing operators may only be used within quotations + Operátory spojení výrazů je možné použít jenom uvnitř citace. + + + + First-class uses of the expression-splicing operator are not permitted + Použití operátoru spojení výrazů se u první třídy nepovoluje. + + + + First-class uses of the address-of operators are not permitted + Použití operátorů address-of jako výrazů první třídy není povolené. + + + + First-class uses of the 'reraise' function is not permitted + Použití funkce reraise jako výrazu první třídy není povolené. + + + + The byref typed value '{0}' cannot be used at this point + Hodnota typu ByRef {0} se na tomto místě použít nedá. + + + + 'base' values may only be used to make direct calls to the base implementations of overridden members + Hodnoty base se dají použít jenom k přímému volání implementací base přepsaných členů. + + + + Object constructors cannot directly use try/with and try/finally prior to the initialization of the object. This includes constructs such as 'for x in ...' that may elaborate to uses of these constructs. This is a limitation imposed by Common IL. + Konstruktory objektu nemůžou použít try/with a try/finally přímo, dokud se objekt neinicializuje. To zahrnuje i konstrukce, jako je třeba for x in ..., které se dají na použití těchto konstruktorů rozpracovat. Toto je omezení mezijazyka Common IL. + + + + The address of the variable '{0}' cannot be used at this point + Adresa proměnné {0} se na tomto místě použít nedá. + + + + The address of the static field '{0}' cannot be used at this point + Adresa statického pole {0} se na tomto místě použít nedá. + + + + The address of the field '{0}' cannot be used at this point + Adresa pole {0} se na tomto místě použít nedá. + + + + The address of an array element cannot be used at this point + Adresa prvku pole se na tomto místě použít nedá. + + + + The type of a first-class function cannot contain byrefs + Typ funkce první třídy nemůže obsahovat parametry typu ByRef. + + + + A method return type would contain byrefs which is not permitted + Návratový typ metody by obsahoval parametry ByRef a to není povolené. + + + + Invalid custom attribute value (not a constant or literal) + Neplatná hodnota vlastního atributu (není to konstanta nebo literál) + + + + The attribute type '{0}' has 'AllowMultiple=false'. Multiple instances of this attribute cannot be attached to a single language element. + Typ atributu {0} má nastavení AllowMultiple=false. K elementu s jedním jazykem se nedá připojit víc instancí tohoto atributu. + + + + The member '{0}' is used in an invalid way. A use of '{1}' has been inferred prior to its definition at or near '{2}'. This is an invalid forward reference. + Člen {0} je použitý neplatným způsobem. Použití členu {1} se odvozuje před jeho definicí na pozici {2} nebo blízko ní. To je neplatný dopředný odkaz. + + + + A byref typed value would be stored here. Top-level let-bound byref values are not permitted. + Hodnota typu ByRef by se uložila tady. Hodnoty ByRef s vazbou na let na nejvyšší úrovni nejsou povolené. + + + + [<ReflectedDefinition>] terms cannot contain uses of the prefix splice operator '%' + Výrazy [<ReflectedDefinition>] nemůžou obsahovat použití operátoru spojení předpon %. + + + + A function labeled with the 'EntryPointAttribute' attribute must be the last declaration in the last file in the compilation sequence. + Funkce označená atributem EntryPointAttribute musí být poslední deklarací v posledním souboru v sekvenci kompilace. + + + + compiled form of the union case + Zkompilovaná forma případu typu union + + + + default augmentation of the union case + Výchozí rozšíření případu typu union + + + + The property '{0}' has the same name as a method in type '{1}'. + Vlastnost {0} má stejný název jako metoda v typu {1}. + + + + The property '{0}' of type '{1}' has a getter and a setter that do not match. If one is abstract then the other must be as well. + Metody get a set vlastnosti {0} typu {1} si neodpovídají. Pokud je jedna z nich abstraktní, musí být abstraktní i ta druhá. + + + + The property '{0}' has the same name as another property in type '{1}', but one takes indexer arguments and the other does not. You may be missing an indexer argument to one of your properties. + Vlastnost {0} má stejný název jako jiná vlastnost v typu {1}, ale jedna z nich přebírá argumenty indexeru a druhá ne. Je možné, že u jedné z vlastností chybí argument indexeru. + + + + A type would store a byref typed value. This is not permitted by Common IL. + Typ by uložil hodnotu typu ByRef. To ale Common IL nepovoluje. + + + + Duplicate method. The method '{0}' has the same name and signature as another method in type '{1}'. + Duplicitní metoda. Metoda {0} má stejný název a signaturu jako jiná metoda v typu {1}. + + + + Duplicate method. The method '{0}' has the same name and signature as another method in type '{1}' once tuples, functions, units of measure and/or provided types are erased. + Duplicitní metoda. Metoda {0} má po vymazání řazených kolekcí členů, funkcí, měrných jednotek a poskytnutých typů stejný název a signaturu jako jiná metoda v typu {1}. + + + + The method '{0}' has curried arguments but has the same name as another method in type '{1}'. Methods with curried arguments cannot be overloaded. Consider using a method taking tupled arguments. + Metoda {0} má curryfikované argumenty, ale má stejný název jako jiná metoda v typu {1}. Metody s curryfikovanými argumenty se nedají přetěžovat. Zvažte použití metody, která přebírá argumenty s řazenou kolekcí členů. + + + + Methods with curried arguments cannot declare 'out', 'ParamArray', 'optional', 'ReflectedDefinition', 'byref', 'CallerLineNumber', 'CallerMemberName', or 'CallerFilePath' arguments + Metody s curryfikovanými argumenty nemůžou deklarovat argumenty out, ParamArray, optional, ReflectedDefiniton, byref, CallerLineNumber, CallerMemberName a CallerFilePath. + + + + Duplicate property. The property '{0}' has the same name and signature as another property in type '{1}'. + Duplicitní vlastnost. Vlastnost {0} má stejný název a signaturu jako jiná vlastnost v typu {1}. + + + + Duplicate property. The property '{0}' has the same name and signature as another property in type '{1}' once tuples, functions, units of measure and/or provided types are erased. + Duplicitní vlastnost. Vlastnost {0} má po vymazání řazených kolekcí členů, funkcí, měrných jednotek a poskytnutých typů stejný název a signaturu jako jiná vlastnost v typu {1}. + + + + Duplicate method. The abstract method '{0}' has the same name and signature as an abstract method in an inherited type. + Duplicitní metoda. Abstraktní metoda {0} má stejný název a signaturu jako abstraktní metoda ve zděděném typu. + + + + Duplicate method. The abstract method '{0}' has the same name and signature as an abstract method in an inherited type once tuples, functions, units of measure and/or provided types are erased. + Duplicitní metoda. Abstraktní metoda {0} má po vymazání řazených kolekcí členů, funkcí, měrných jednotek a poskytnutých typů stejný název a signaturu jako abstraktní metoda ve zděděném typu. + + + + This type implements the same interface at different generic instantiations '{0}' and '{1}'. This is not permitted in this version of F#. + Tento typ implementuje stejné rozhraní u různých obecných instancí {0} a {1}. To není v této verzi F# povolené. + + + + The type of a field using the 'DefaultValue' attribute must admit default initialization, i.e. have 'null' as a proper value or be a struct type whose fields all admit default initialization. You can use 'DefaultValue(false)' to disable this check + Typ pole, které používá atribut DefaultValue, musí připouštět výchozí inicializaci, tj. mít null jako správnou hodnotu nebo být typu struktura, jejíž všechna pole připouštějí výchozí inicializaci. Tuto kontrolu můžete vypnout pomocí DefaultValue(false). + + + + The type abbreviation contains byrefs. This is not permitted by F#. + Zkratka typu obsahuje parametry Byref. To F# nepovoluje. + + + + The variable '{0}' is bound in a quotation but is used as part of a spliced expression. This is not permitted since it may escape its scope. + Proměnná {0} je vázaná v citaci, ale používá se jako součást spojeného výrazu. To není povolené, protože se tak proměnná může dostat mimo definiční obor. + + + + Quotations cannot contain uses of generic expressions + Citace nemůžou obsahovat použití obecných výrazů. + + + + Quotations cannot contain function definitions that are inferred or declared to be generic. Consider adding some type constraints to make this a valid quoted expression. + Citace nemůžou obsahovat definice funkcí, které jsou odvozené nebo deklarované jako obecné. Zvažte přidání některých omezení typu, abyste vytvořili platný citovaný výraz. + + + + Quotations cannot contain object expressions + Citace nemůžou obsahovat objektové výrazy. + + + + Quotations cannot contain expressions that take the address of a field + Citace nemůžou obsahovat výrazy, které přebírají adresu pole. + + + + Quotations cannot contain expressions that fetch static fields + Citace nemůžou obsahovat výrazy, které načítají statická pole. + + + + Quotations cannot contain inline assembly code or pattern matching on arrays + Citace nemůžou obsahovat vložený kód sestavení nebo porovnávání vzorů polí. + + + + Quotations cannot contain descending for loops + Citace nemůžou obsahovat sestupné smyčky for. + + + + Quotations cannot contain expressions that fetch union case indexes + Citace nemůžou obsahovat výrazy, které načítají indexy případů typu union. + + + + Quotations cannot contain expressions that set union case fields + Citace nemůžou obsahovat výrazy, které nastavují pole případů typu union. + + + + Quotations cannot contain expressions that set fields in exception values + Citace nemůžou obsahovat výrazy, které u polí nastavují výjimečné hodnoty. + + + + Quotations cannot contain expressions that require byref pointers + Citace nemůžou obsahovat výrazy, které vyžadují ukazatele na parametry ByRef. + + + + Quotations cannot contain expressions that make member constraint calls, or uses of operators that implicitly resolve to a member constraint call + Citace nemůže zahrnovat výrazy, které volají omezení členů, ani nemůže používat operátory, které se na volání omezení členů implicitně překládají. + + + + Quotations cannot contain this kind of constant + Citace nemůžou obsahovat tento druh konstanty. + + + + Quotations cannot contain this kind of pattern match + Citace nemůžou obsahovat tento druh porovnávání vzorů. + + + + Quotations cannot contain array pattern matching + V citacích nemůže být zahrnuté porovnávání vzorů polí. + + + + Quotations cannot contain this kind of type + Citace nemůžou obsahovat tento druh typu. + + + + The declared type parameter '{0}' cannot be used here since the type parameter cannot be resolved at compile time + Parametr deklarovaného typu {0} se tady použít nedá, protože parametr typu nejde přeložit za kompilace. + + + + This code is less generic than indicated by its annotations. A unit-of-measure specified using '_' has been determined to be '1', i.e. dimensionless. Consider making the code generic, or removing the use of '_'. + Tento kód je míň obecný, než udávají jeho poznámky. U měrné jednotky specifikované pomocí podtržítka (_) se určila hodnota 1, tj. bezrozměrná. Zvažte zobecnění kódu nebo odebrání podtržítka (_). + + + + Type inference problem too complicated (maximum iteration depth reached). Consider adding further type annotations. + Problém s odvozením typu proměnných: příliš složité (dosáhli jste maximální možné hloubky iterace). Zvažte přidání dalších poznámek typu. + + + + Expected arguments to an instance member + Očekávaly se argumenty člena instance. + + + + This indexer expects {0} arguments but is here given {1} + Počet argumentů, které tento indexer očekává, je {0}, ale počet těch, které se mu tady předávají, je {1}. + + + + Expecting a type supporting the operator '{0}' but given a function type. You may be missing an argument to a function. + Očekává se typ podporující operátor {0}, ale předává se typ funkce. Možná, že u funkce chybí argument. + + + + Expecting a type supporting the operator '{0}' but given a tuple type + Očekává se typ podporující operátor {0}, ale předává se typ řazené kolekce členů. + + + + None of the types '{0}' support the operator '{1}' + Žádný z typů {0} nepodporuje operátor {1}. + + + + The type '{0}' does not support the operator '{1}' + Typ {0} nepodporuje operátor {1}. + + + + None of the types '{0}' support the operator '{1}'. Consider opening the module 'Microsoft.FSharp.Linq.NullableOperators'. + Žádný z typů {0} nepodporuje operátor {1}. Zvažte otevření modulu Microsoft.FSharp.Linq.NullableOperators. + + + + The type '{0}' does not support the operator '{1}'. Consider opening the module 'Microsoft.FSharp.Linq.NullableOperators'. + Typ {0} nepodporuje operátor {1}. Zvažte otevření modulu Microsoft.FSharp.Linq.NullableOperators. + + + + The type '{0}' does not support a conversion to the type '{1}' + Typ {0} nepodporuje převod na typ {1}. + + + + The type '{0}' has a method '{1}' (full name '{2}'), but the method is static + Typ {0} má metodu {1} (celý název je {2}), ale ta je statická. + + + + The type '{0}' has a method '{1}' (full name '{2}'), but the method is not static + Typ {0} má metodu {1} (celý název je {2}), ale ta není statická. + + + + The constraints 'struct' and 'not struct' are inconsistent + Omezení struct a not struct jsou nekonzistentní. + + + + The type '{0}' does not have 'null' as a proper value + Typ {0} nemá null jako správnou hodnotu. + + + + The type '{0}' does not have 'null' as a proper value. To create a null value for a Nullable type use 'System.Nullable()'. + Typ {0} nemá null jako správnou hodnotu. Pokud chcete u typu s možnou hodnotou null vytvořit hodnotu null, použijte System.Nullable(). + + + + The type '{0}' does not support the 'comparison' constraint because it has the 'NoComparison' attribute + Typ {0} nepodporuje omezení comparison, protože má atribut NoComparison. + + + + The type '{0}' does not support the 'comparison' constraint. For example, it does not support the 'System.IComparable' interface + Typ {0} nepodporuje omezení comparison. Nepodporuje třeba rozhraní System.IComparable. + + + + The type '{0}' does not support the 'comparison' constraint because it is a record, union or struct with one or more structural element types which do not support the 'comparison' constraint. Either avoid the use of comparison with this type, or add the 'StructuralComparison' attribute to the type to determine which field type does not support comparison + Typ {0} nepodporuje omezení comparison, protože je to záznam, sjednocení nebo struktura aspoň s jedním strukturálním typem prvků, který nepodporuje omezení comparison. Buď se u tohoto typu vyhněte použití comparison, nebo k němu přidejte atribut StructuralComparison a s jeho pomocí určete, který typ pole nepodporuje comparison. + + + + The type '{0}' does not support the 'equality' constraint because it has the 'NoEquality' attribute + Typ {0} nepodporuje omezení equality, protože má atribut NoEquality. + + + + The type '{0}' does not support the 'equality' constraint because it is a function type + Typ {0} nepodporuje omezení equality, protože je to typ funkce. + + + + The type '{0}' does not support the 'equality' constraint because it is a record, union or struct with one or more structural element types which do not support the 'equality' constraint. Either avoid the use of equality with this type, or add the 'StructuralEquality' attribute to the type to determine which field type does not support equality + Typ {0} nepodporuje omezení equality, protože je to záznam, sjednocení nebo struktura aspoň s jedním strukturálním typem prvků, který nepodporuje omezení equality. Buď se u tohoto typu vyhněte použití equality, nebo k němu přidejte atribut StructuralEquality a s jeho pomocí určete, který typ pole nepodporuje equality. + + + + The type '{0}' is not a CLI enum type + Typ {0} není typu výčtu CLI. + + + + The type '{0}' has a non-standard delegate type + Typ {0} má nestandardní typ delegáta. + + + + The type '{0}' is not a CLI delegate type + Typ {0} není delegátem CLI. + + + + This type parameter cannot be instantiated to 'Nullable'. This is a restriction imposed in order to ensure the meaning of 'null' in some CLI languages is not confusing when used in conjunction with 'Nullable' values. + U tohoto parametru typu se nedá vytvořit instance Nullable. Toto omezení má zabránit situaci, ve které by byl význam null v některých jazycích CLI zavádějící v případě, že se použije ve spojení s hodnotami Nullable. + + + + A generic construct requires that the type '{0}' is a CLI or F# struct type + Obecný konstruktor vyžaduje, aby byl typ {0} typem struktura CLI nebo F#. + + + + A generic construct requires that the type '{0}' is an unmanaged type + Obecný konstruktor vyžaduje, aby byl typ {0} nespravovaným typem. + + + + The type '{0}' is not compatible with any of the types {1}, arising from the use of a printf-style format string + Typ {0} není v důsledku použití formátovacího řetězce ve stylu printf kompatibilní s žádným z typů {1}. + + + + A generic construct requires that the type '{0}' have reference semantics, but it does not, i.e. it is a struct + Obecný konstruktor vyžaduje, aby měl typ {0} sémantiku odkazu. To ale nemá: je to struktura. + + + + A generic construct requires that the type '{0}' be non-abstract + Obecný konstruktor vyžaduje, aby byl typ {0} neabstraktní. + + + + A generic construct requires that the type '{0}' have a public default constructor + Obecný konstruktor vyžaduje, aby měl typ {0} veřejný výchozí konstruktor. + + + + Type instantiation length mismatch + Neshoda v délce instance typu + + + + Optional arguments not permitted here + Nepovinné argumenty tady nejsou povolené. + + + + {0} is not a static member + {0} není statický člen. + + + + {0} is not an instance member + {0} není člen instance. + + + + Argument length mismatch + Neshoda v délce argumentů + + + + The argument types don't match + Typy argumentů se neshodují. + + + + This method expects a CLI 'params' parameter in this position. 'params' is a way of passing a variable number of arguments to a method in languages such as C#. Consider passing an array for this argument + Tato metoda očekává na této pozici parametr CLI params. Použití parametru params umožňuje předat proměnlivý počet argumentů metodě v jazycích, jako je C#. Zvažte možnost předat tomuto argumentu pole. + + + + The member or object constructor '{0}' is not {1} + Konstruktor členu nebo objektu {0} není {1}. + + + + The member or object constructor '{0}' is not {1}. Private members may only be accessed from within the declaring type. Protected members may only be accessed from an extending type and cannot be accessed from inner lambda expressions. + Konstruktor členu nebo objektu {0} není {1}. K soukromým členům se dá přistupovat jenom z deklarujícího typu. K chráněným členům se dá přistupovat jenom z rozšiřujícího typu a nedá se k nim přistupovat z vnitřních výrazů lambda. + + + + {0} is not a static method + {0} není statická metoda. + + + + {0} is not an instance method + {0} není metoda instance. + + + + The member or object constructor '{0}' has no argument or settable return property '{1}'. {2}. + Konstruktor členu nebo objektu {0} nemá žádný argument nebo nastavitelnou návratovou vlastnost {1}. {2}. + + + + The object constructor '{0}' has no argument or settable return property '{1}'. {2}. + Konstruktor objektu {0} nemá žádné argumenty nebo návratovou vlastnost {1}, která by šla nastavit. {2}. + + + + The required signature is {0} + Požadovaná signatura je {0}. + + + + The member or object constructor '{0}' requires {1} argument(s). The required signature is '{2}'. + Konstruktor členu nebo objektu {0} vyžaduje argumenty ({1}). Požadovaná signatura je {2}. + + + + The member or object constructor '{0}' requires {1} additional argument(s). The required signature is '{2}'. + Konstruktor členu nebo objektu {0} vyžaduje další argumenty ({1}). Požadovaná signatura je {2}. + + + + The member or object constructor '{0}' requires {1} argument(s). The required signature is '{2}'. Some names for missing arguments are {3}. + Konstruktor členu nebo objektu {0} vyžaduje argumenty ({1}). Požadovaná signatura je {2}. Některé názvy chybějících argumentů jsou {3}. + + + + The member or object constructor '{0}' requires {1} additional argument(s). The required signature is '{2}'. Some names for missing arguments are {3}. + Konstruktor členu nebo objektu {0} vyžaduje další argumenty ({1}). Požadovaná signatura je {2}. Některé názvy chybějících argumentů jsou {3}. + + + + The member or object constructor '{0}' requires {1} argument(s) but is here given {2} unnamed and {3} named argument(s). The required signature is '{4}'. + Počet argumentů, které konstruktor členu nebo objektu {0} vyžaduje, je {1}, ale počet těch, které se mu tady předávají, je {2} (nepojmenované) a {3} (pojmenované). Požadovaná signatura je {4}. + + + + The member or object constructor '{0}' takes {1} argument(s) but is here given {2}. The required signature is '{3}'. + Počet argumentů, které přebírá konstruktor členu nebo objektu {0}, je {1}, ale počet těch, které se mu tady předávají, je {2}. Požadovaná signatura je {3}. + + + + The object constructor '{0}' takes {1} argument(s) but is here given {2}. The required signature is '{3}'. + Konstruktor objektu {0} přebírá tento počet argumentů: {1}. Tady ale získal jen tento počet: {2}. Vyžadovaná signatura: {3}. + + + + The object constructor '{0}' takes {1} argument(s) but is here given {2}. The required signature is '{3}'. If some of the arguments are meant to assign values to properties, consider separating those arguments with a comma (','). + Konstruktor objektu {0} přebírá tento počet argumentů: {1}. Tady ale získal jen tento počet: {2}. Vyžadovaná signatura: {3}. Pokud je účelem některých argumentů přiřazování hodnot k vlastnostem, zvažte oddělení těchto argumentů čárkou (,). + + + + The member or object constructor '{0}' takes {1} type argument(s) but is here given {2}. The required signature is '{3}'. + Počet argumentů typu, které konstruktor členu nebo objektu {0} přebírá, je {1}, ale počet těch, které se mu tady předávají, je {2}. Požadovaná signatura je {3}. + + + + A member or object constructor '{0}' taking {1} arguments is not accessible from this code location. All accessible versions of method '{2}' take {3} arguments. + Konstruktor členu nebo objektu {0}, který přebírá argumenty ({1}), není na tomto místě v kódu dostupný. Počet argumentů přebíraných všemi přístupnými verzemi metody {2} je {3}. + + + + Incorrect generic instantiation. No {0} member named '{1}' takes {2} generic arguments. + Nesprávná obecná instance. Žádný člen {0} s názvem {1} nepřebírá obecné argumenty v počtu {2}. + + + + The member or object constructor '{0}' does not take {1} argument(s). An overload was found taking {2} arguments. + Konstruktor členu nebo objektu {0} nepřebírá argumenty ({1}). Zjistilo se, že počet argumentů přebíraných přetížením je {2}. + + + + No {0} member or object constructor named '{1}' takes {2} arguments + Žádný konstruktor členu nebo objektu {0} s názvem {1} nepřebírá argumenty v počtu {2}. + + + + No {0} member or object constructor named '{1}' takes {2} arguments. Note the call to this member also provides {3} named arguments. + Žádný konstruktor členu nebo objektu {0} s názvem {1} nepřebírá argumenty v počtu {2}. Kromě toho poskytuje volání tohoto členu taky pojmenované argumenty ({3}). + + + + No {0} member or object constructor named '{1}' takes {2} arguments. The named argument '{3}' doesn't correspond to any argument or settable return property for any overload. + Žádný konstruktor členu nebo objektu {0} s názvem {1} nepřebírá argumenty v počtu {2}. Pojmenovaný argument {3} neodpovídá žádnému argumentu ani nastavitelné návratové vlastnosti u žádného přetížení. + + + + Method or object constructor '{0}' not found + Konstruktor metody nebo objektu {0} se nenašel. + + + + No overloads match for method '{0}'. + Metodě {0} neodpovídají žádná přetížení. + + + + A unique overload for method '{0}' could not be determined based on type information prior to this program point. A type annotation may be needed. + Unikátní přetížení u metody {0} se nedalo určit podle informací o typu před tímto místem v programu. Možná bude potřeba doplnit k typu poznámku. + + + + Candidates: {0} + Kandidáti: {0} + + + + The available overloads are shown below. + Dostupná přetížení jsou zobrazena níže. + + + + Accessibility modifiers are not permitted on 'do' bindings, but '{0}' was given. + Modifikátory dostupnosti nejsou u vazeb do povolené, ale předal se modifikátor {0}. + + + + End of file in #if section begun at or after here + Konec souboru začal v oddílu #if na této pozici nebo za ní. + + + + End of file in string begun at or before here + Konec souboru začal v řetězci na této pozici nebo před ní. + + + + End of file in verbatim string begun at or before here + Konec souboru začal v doslovném řetězci na této pozici nebo před ní. + + + + End of file in comment begun at or before here + Konec souboru začal v komentáři na této pozici nebo před ní. + + + + End of file in string embedded in comment begun at or before here + Konec souboru začal v řetězci vloženém do komentáře na této pozici nebo před ní. + + + + End of file in verbatim string embedded in comment begun at or before here + Konec souboru začal v doslovném řetězci vloženém do komentáře na této pozici nebo před ní. + + + + End of file in IF-OCAML section begun at or before here + Konec souboru začal v oddílu IF-OCAML na této pozici nebo před ní. + + + + End of file in directive begun at or before here + Konec souboru začal v direktivě na této pozici nebo před ní. + + + + No #endif found for #if or #else + Pro direktivu #if nebo #else se nenašla žádná direktiva #endif. + + + + Attributes have been ignored in this construct + Atributy v tomto konstruktoru se ignorovaly. + + + + 'use' bindings are not permitted in primary constructors + U primárních konstruktorů nejsou vazby use povolené. + + + + 'use' bindings are not permitted in modules and are treated as 'let' bindings + V modulech nejsou vazby use povolené. Zpracují se jako vazby let. + + + + An integer for loop must use a simple identifier + Celočíselná smyčka for musí používat jednoduchý identifikátor. + + + + At most one 'with' augmentation is permitted + Povoluje se nanejvýš jedno rozšíření with. + + + + A semicolon is not expected at this point + Středník se na této pozici neočekává. + + + + Unexpected end of input + Neočekávaný konec vstupu + + + + Accessibility modifiers are not permitted here, but '{0}' was given. + Modifikátory dostupnosti tady nejsou povolené, ale předal se modifikátor {0}. + + + + Only '#' compiler directives may occur prior to the first 'namespace' declaration + Před první deklarací namespace se dají použít jenom direktivy kompilátoru #. + + + + Accessibility modifiers should come immediately prior to the identifier naming a construct + Modifikátory dostupnosti by se měly umístit bezprostředně před identifikátor, který pojmenovává konstruktor. + + + + Files should begin with either a namespace or module declaration, e.g. 'namespace SomeNamespace.SubNamespace' or 'module SomeNamespace.SomeModule', but not both. To define a module within a namespace use 'module SomeModule = ...' + Soubory by měly začínat buď oborem názvů, nebo deklarací modulu, třeba namespace SomeNamespace.SubNamespace nebo module SomeNamespace.SomeModule, nejde ale použít obojí. Pokud chcete definovat modul uvnitř oboru názvů, použijte syntaxi module SomeModule = ... + + + + A module abbreviation must be a simple name, not a path + Jako zkratku modulu musíte zadat jednoduchý název, ne cestu. + + + + Ignoring attributes on module abbreviation + Atributy u zkratky modulu se ignorují. + + + + The '{0}' accessibility attribute is not allowed on module abbreviation. Module abbreviations are always private. + Atribut přístupu {0} se u zkratky modulu nepovoluje. Zkratky modulu jsou vždycky privátní. + + + + The '{0}' visibility attribute is not allowed on module abbreviation. Module abbreviations are always private. + Atribut viditelnosti {0} se u zkratky modulu nepovoluje. Zkratky modulu jsou vždycky privátní. + + + + Unclosed block + Neuzavřený blok + + + + Unmatched 'begin' or 'struct' + Nespárované klíčové slovo begin nebo struct + + + + A module name must be a simple name, not a path + Jako název modulu musíte zadat jednoduchý název, ne cestu. + + + + Unexpected empty type moduleDefn list + Neočekávaný prázdný seznam typu moduleDefn + + + + Attributes should be placed before 'val' + Správné umístění atributů je před val. + + + + Attributes are not permitted on interface implementations + Atributy nejsou u implementací rozhraní povolené. + + + + Syntax error + Chyba syntaxe + + + + Augmentations are not permitted on delegate type moduleDefns + Rozšíření nejsou u typu delegáta moduleDefns povolená. + + + + Unmatched 'class', 'interface' or 'struct' + Nespárované klíčové slovo class, interface nebo struct + + + + A type definition requires one or more members or other declarations. If you intend to define an empty class, struct or interface, then use 'type ... = class end', 'interface end' or 'struct end'. + Definice typu vyžaduje jeden nebo víc členů nebo jiné deklarace. Pokud máte v úmyslu definovat prázdnou třídu, strukturu nebo rozhraní, použijte formulaci type ... = class end, interface end nebo struct end. + + + + Unmatched 'with' or badly formatted 'with' block + Nespárovaný nebo špatně formátovaný blok with + + + + 'get', 'set' or 'get,set' required + Vyžaduje se metoda get, set nebo get,set. + + + + Only class types may take value arguments + Argumenty hodnoty můžou přebírat jenom typy třídy. + + + + Unmatched 'begin' + Nespárované klíčové slovo begin + + + + Invalid declaration syntax + Neplatná syntaxe deklarace + + + + 'get' and/or 'set' required + Vyžaduje se metoda get nebo set. + + + + Type annotations on property getters and setters must be given after the 'get()' or 'set(v)', e.g. 'with get() : string = ...' + Poznámky typu u metod getter nebo setter vlastnosti se musí předávat až po get() nebo set(v). Příklad: with get() : string = + + + + A getter property is expected to be a function, e.g. 'get() = ...' or 'get(index) = ...' + Očekává se, že vlastnost getter bude funkcí, třeba get() = ... nebo get(index) = ... + + + + Multiple accessibilities given for property getter or setter + Zadali jste víc dostupností pro metodu getter nebo setter vlastnosti. + + + + Property setters must be defined using 'set value = ', 'set idx value = ' or 'set (idx1,...,idxN) value = ... ' + Metody set vlastnosti musí být definované pomocí syntaxe set value = , set idx value = nebo set (idx1,...,idxN) value = ... + + + + Interfaces always have the same visibility as the enclosing type + Rozhraní mají vždycky stejnou viditelnost jako nadřazený typ. + + + + Accessibility modifiers are not allowed on this member. Abstract slots always have the same visibility as the enclosing type. + Modifikátory dostupnosti nejsou u tohoto člena povolené. Abstraktní datové oblasti mají vždycky stejnou viditelnost jako nadřazený typ. + + + + Attributes are not permitted on 'inherit' declarations + Atributy u deklarací inherit nejsou povolené. + + + + Accessibility modifiers are not permitted on an 'inherits' declaration + Modifikátory dostupnosti nejsou v deklaracích inherits povolené. + + + + 'inherit' declarations cannot have 'as' bindings. To access members of the base class when overriding a method, the syntax 'base.SomeMember' may be used; 'base' is a keyword. Remove this 'as' binding. + Deklarace inherit nemůžou mít vazby as. Pro přístup ke členům základní třídy při přepisování metody se dá použít syntaxe base.SomeMember, kde base je klíčové slovo. Tuto vazbu as odeberte. + + + + Attributes are not allowed here + Tady atributy nejsou povolené. + + + + Accessibility modifiers are not permitted in this position for type abbreviations + Modifikátory dostupnosti nejsou na této pozici pro zkratky typu povolené. + + + + Accessibility modifiers are not permitted in this position for enum types + Modifikátory dostupnosti nejsou na této pozici pro typy výčtu povolené. + + + + All enum fields must be given values + Všem polím výčtového typu se musí předat hodnota. + + + + Accessibility modifiers are not permitted on inline assembly code types + Modifikátory dostupnosti nejsou u typů kódu vložených sestavení povolené. + + + + Unexpected identifier: '{0}' + Neočekávaný identifikátor: {0} + + + + Accessibility modifiers are not permitted on union cases. Use 'type U = internal ...' or 'type U = private ...' to give an accessibility to the whole representation. + Modifikátory dostupnosti nejsou u případů typu union povolené. Pomocí notace type U = internal ... nebo type U = private ... předejte dostupnost celé reprezentaci. + + + + Accessibility modifiers are not permitted on enumeration fields + Modifikátory dostupnosti nejsou u polí výčtového typu povolené. + + + + Consider using a separate record type instead + Zvažte možnost použít místo toho samostatný typ záznamu. + + + + Accessibility modifiers are not permitted on record fields. Use 'type R = internal ...' or 'type R = private ...' to give an accessibility to the whole representation. + Modifikátory dostupnosti nejsou v polích záznamů povolené. Pomocí type R = internal ... nebo type R = private ... předejte dostupnost celé reprezentaci. + + + + The declaration form 'let ... and ...' for non-recursive bindings is not used in F# code. Consider using a sequence of 'let' bindings + Notace deklarace let ... and ... se pro nerekurzivní vazby v kódu F# nepoužívá. Zvažte použití posloupnosti vazeb let. + + + + Unmatched '(' + Nespárovaná závorka ( + + + + Successive patterns should be separated by spaces or tupled + Po sobě jdoucí vzory by měly být oddělené mezerami nebo by měly být řazenou kolekcí členů. + + + + No matching 'in' found for this 'let' + Pro tuto klauzuli let se nenašel žádný odpovídající výraz in. + + + + Error in the return expression for this 'let'. Possible incorrect indentation. + Chyba ve vráceném výrazu pro tuto klauzuli let. Důvodem může být nesprávné odsazení. + + + + The block following this '{0}' is unfinished. Every code block is an expression and must have a result. '{1}' cannot be the final code element in a block. Consider giving this block an explicit result. + Blok, který následuje po tomto {0}, není dokončený. Každý blok kódu je výraz a musí mít výsledek. {1} nemůže být konečný element kódu v bloku. Zvažte, že tomuto bloku dáte explicitní výsledek. + + + + Incomplete conditional. Expected 'if <expr> then <expr>' or 'if <expr> then <expr> else <expr>'. + Neúplná podmínka. Očekávaná notace je if <výraz> then <výraz> nebo if <výraz> then <výraz> else <výraz>. + + + + 'assert' may not be used as a first class value. Use 'assert <expr>' instead. + Metoda assert se nedá použít jako hodnota první třídy. Použijte místo ní assert <výraz>. + + + + Identifier expected + Očekával se identifikátor. + + + + 'in' or '=' expected + Očekává se in nebo =. + + + + The use of '->' in sequence and computation expressions is limited to the form 'for pat in expr -> expr'. Use the syntax 'for ... in ... do ... yield...' to generate elements in more complex sequence expressions. + Použití -> ve výrazech pořadí a výpočtu je omezené na formu for pat in expr -> expr. Ke generování prvků v komplexnějších výrazech pořadí použijte syntaxi for ... in ... do ... yield... + + + + Successive arguments should be separated by spaces or tupled, and arguments involving function or method applications should be parenthesized + Po sobě jdoucí argumenty by měly být oddělené mezerami nebo by měly být řazenou kolekcí členů a argumenty zahrnující použití funkcí nebo metod by měly být v závorkách. + + + + Unmatched '[' + Nespárovaná závorka [ + + + + Missing qualification after '.' + Za tečkou chybí kvalifikace. + + + + In F# code you may use 'expr.[expr]'. A type annotation may be required to indicate the first expression is an array + V kódu F# můžete použít expr.[expr]. Je možné, že bude potřeba zadáním anotace typu vyznačit první výraz v poli. + + + + Mismatched quotation, beginning with '{0}' + Neshoda v citaci, která začíná na {0} + + + + Unmatched '{0}' + Nespárovaný výraz {0} + + + + Unmatched '[|' + Nespárovaná dvojice znaků [| + + + + Unmatched '{{' + Nespárovaná dvojice závorek {{ + + + + Field bindings must have the form 'id = expr;' + Vazba pole musí být v podobě id = expr; + + + + This member is not permitted in an object implementation + Tento člen není u implementace objektu povolený. + + + + Missing function body + Chybí tělo funkce. + + + + Syntax error in labelled type argument + Chyba syntaxe v argumentu typu s popiskem + + + + Unexpected infix operator in type expression + Neočekávaný operátor vpony ve výrazu typu + + + + The syntax '(typ,...,typ) ident' is not used in F# code. Consider using 'ident<typ,...,typ>' instead + Syntaxe (typ,...,typ) ident se v kódu F# nepoužívá. Zvažte možnost použít místo ní syntaxi ident<typ,...,typ>. + + + + Invalid literal in type + Neplatný literál v typu + + + + Unexpected infix operator in unit-of-measure expression. Legal operators are '*', '/' and '^'. + Neočekávaný operátor vpony ve výrazu měrné jednotky. Platnými operátory jsou znaky *, / a ^. + + + + Unexpected integer literal in unit-of-measure expression + Neočekávaný celočíselný literál ve výrazu měrné jednotky + + + + Syntax error: unexpected type parameter specification + Chyba syntaxe: neočekávaná specifikace parametru typu + + + + Mismatched quotation operator name, beginning with '{0}' + Neshoda v názvu operátoru citace (začíná na {0}) + + + + Active pattern case identifiers must begin with an uppercase letter + Identifikátory velikosti písmen aktivního vzoru musí začínat velkým písmenem. + + + + The '|' character is not permitted in active pattern case identifiers + Znak | není u identifikátorů velikosti písmen aktivních vzorů povolený. + + + + Denominator must not be 0 in unit-of-measure exponent + Jmenovatel nesmí být 0 v exponentu měrné jednotky. + + + + No '=' symbol should follow a 'namespace' declaration + Po deklaraci namespace nemůže následovat symbol =. + + + + The syntax 'module ... = struct .. end' is not used in F# code. Consider using 'module ... = begin .. end' + Syntaxe module ... = struct ... end se v kódu F# nepoužívá. Zvažte použití syntaxe module ... = begin ... end. + + + + The syntax 'module ... : sig .. end' is not used in F# code. Consider using 'module ... = begin .. end' + Syntaxe module ... : sig .. end se v kódu F# nepoužívá. Zvažte použití syntaxe module ... = begin ... end. + + + + A static field was used where an instance field is expected + Použili jste statické pole tam, kde se očekává pole instance. + + + + Method '{0}' is not accessible from this code location + Metoda {0} není na tomto místě v kódu dostupná. + + + + Implicit product of measures following / + Za lomítkem (/) následuje implicitní vytvoření míry. + + + + Unexpected SynMeasure.Anon + Neočekávalo se SynMeasure.Anon. + + + + Non-zero constants cannot have generic units. For generic zero, write 0.0<_>. + U nenulových konstant nemůžou být obecné jednotky. Obecný nulový zápis je 0.0<_>. + + + + In sequence expressions, results are generated using 'yield' + Ve výrazech pořadí se výsledky generují pomocí yield. + + + + Unexpected big rational constant + Neočekávaná rozměrná racionální konstanta + + + + Units-of-measure supported only on float, float32, decimal and signed integer types + Měrné jednotky se podporují jenom u typů float, float32, decimal a signed integer. + + + + Unexpected Const_uint16array + Const_uint16array se neočekávalo. + + + + Unexpected Const_bytearray + Const_bytearray se neočekávalo. + + + + A parameter with attributes must also be given a name, e.g. '[<Attribute>] Name : Type' + Parametr s atributy vyžaduje rovněž název, například [<atribut>] Název : Typ. + + + + Return values cannot have names + Návratové hodnoty nemůžou mít názvy. + + + + MemberKind.PropertyGetSet only expected in parse trees + MemberKind.PropertyGetSet se očekává jenom ve stromech pro analýzu. + + + + Namespaces cannot contain values. Consider using a module to hold your value declarations. + Obory názvů nemůžou obsahovat hodnoty. K uložení deklarací hodnot můžete použít modul. + + + + Namespaces cannot contain extension members except in the same file and namespace declaration group where the type is defined. Consider using a module to hold declarations of extension members. + Obory názvů nemůžou obsahovat členy rozšíření (to jde jenom ve stejném souboru a skupině deklarací oboru názvů, kde je definovaný i typ). K uložení deklarací členů rozšíření můžete použít modul. + + + + Multiple visibility attributes have been specified for this identifier + Pro tento identifikátor jste zadali víc atributů viditelnosti. + + + + Multiple visibility attributes have been specified for this identifier. 'let' bindings in classes are always private, as are any 'let' bindings inside expressions. + Pro tento identifikátor jste zadali víc atributů viditelnosti. Vazby let ve třídách jsou vždycky privátní, stejně jako kterákoli vazba let ve výrazu. + + + + The name '({0})' 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 '{1}' instead. + ({0}) není vhodný název pro člena. Pokud chcete definovat sémantiku porovnání pro typ, implementujte rozhraní System.IComparable. Pokud definujete statického člena, který se má použít z jiných jazyků CLI, použijte místo toho název {1}. + + + + The name '({0})' 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 '{1}' instead. + ({0}) není vhodný název pro člena. Pokud chcete definovat sémantiku rovnosti pro typ, přepište člena Object.Equals. Pokud definujete statického člena, který se má použít z jiných jazyků CLI, použijte místo toho název {1}. + + + + The name '({0})' should not be used as a member name. If defining a static member for use from other CLI languages then use the name '{1}' instead. + ({0}) není vhodný název pro člena. Pokud definujete statického člena, který se má použít z jiných jazyků CLI, použijte místo toho název {1}. + + + + The name '({0})' should not be used as a member name because it is given a standard definition in the F# library over fixed types + ({0}) není vhodný název pro člena, protože se mu v knihovně F# prostřednictvím pevných typů předává standardní definice. + + + + The '{0}' operator should not normally be redefined. To define overloaded comparison semantics for a particular type, implement the 'System.IComparable' interface in the definition of that type. + Operátor {0} se nedoporučuje předefinovávat. Pokud chcete definovat přetíženou sémantiku porovnání pro určitý typ, implementujte rozhraní System.IComparable v definici tohoto typu. + + + + The '{0}' operator should not normally be redefined. To define equality semantics for a type, override the 'Object.Equals' member in the definition of that type. + Operátor {0} se nedoporučuje předefinovávat. Pokud chcete definovat sémantiku rovnosti pro typ, přepište člena Object.Equals v definici tohoto typu. + + + + The '{0}' operator should not normally be redefined. Consider using a different operator name + Operátor {0} se nedoporučuje předefinovávat. Zvažte použití jiného názvu operátoru. + + + + The '{0}' operator cannot be redefined. Consider using a different operator name + Operátor {0} se nedá předefinovat. Zvažte možnost použití jiného názvu operátoru. + + + + Expected module or namespace parent {0} + Očekával se nadřazený prvek modulu nebo oboru názvů {0}. + + + + The struct, record or union type '{0}' implements the interface 'System.IComparable' explicitly. You must apply the 'CustomComparison' attribute to the type. + Typ struktura, záznam nebo sjednocení {0} implementuje explicitně rozhraní System.IComparable. Pro tento typ musíte použít atribut CustomComparison. + + + + The struct, record or union type '{0}' implements the interface 'System.IComparable<_>' explicitly. You must apply the 'CustomComparison' attribute to the type, and should also provide a consistent implementation of the non-generic interface System.IComparable. + Typ struktura, záznam nebo sjednocení {0} implementuje explicitně rozhraní System.IComparable<_>. Pro tento typ musíte použít atribut CustomComparison a vytvořit konzistentní implementaci rozhraní System.IComparable, které není obecné. + + + + The struct, record or union type '{0}' implements the interface 'System.IStructuralComparable' explicitly. Apply the 'CustomComparison' attribute to the type. + Typ struktura, záznam nebo sjednocení {0} implementuje explicitně rozhraní System.IStructuralComparable. Použijte pro tento typ atribut CustomComparison. + + + + This record contains fields from inconsistent types + Tento záznam obsahuje pole z nekonzistentních typů. + + + + DLLImport stubs cannot be inlined + Provizorní kódy DLLImport nemůžou být vložené. + + + + Structs may only bind a 'this' parameter at member declarations + Struktury můžou u deklarací členů vázat jenom parametr this. + + + + Unexpected expression at recursive inference point + Neočekávaný výraz v místě rekurzivního odvození + + + + This code is less generic than required by its annotations because the explicit type variable '{0}' could not be generalized. It was constrained to be '{1}'. + Tento kód je míň obecný, než požadují jeho poznámky, protože proměnná explicitního typu {0} se nedá zobecnit. Kód se omezil na {1}. + + + + One or more of the explicit class or function type variables for this binding could not be generalized, because they were constrained to other types + Jedna nebo víc proměnných explicitní třídy nebo typu funkce pro tuto vazbu se nedala zobecnit, protože má omezení na jiné typy. + + + + A generic type parameter has been used in a way that constrains it to always be '{0}' + Parametr obecného typu se použil tak, že ho to omezuje, aby vždycky byl {0}. + + + + This type parameter has been used in a way that constrains it to always be '{0}' + Tento parametr typu se použil způsobem, který ho omezuje v tom smyslu, že musí být vždycky {0}. + + + + The type parameters inferred for this value are not stable under the erasure of type abbreviations. This is due to the use of type abbreviations which drop or reorder type parameters, e.g. \n\ttype taggedInt<'a> = int or\n\ttype swap<'a,'b> = 'b * 'a.\nConsider declaring the type parameters for this value explicitly, e.g.\n\tlet f<'a,'b> ((x,y) : swap<'b,'a>) : swap<'a,'b> = (y,x). + Parametry typu odvozené pro tuto hodnotu nejsou v případě vymazání zkratek typů stabilní. To je způsobené použitím zkratek typu, které vypouštějí nebo mění pořadí parametrů typu, třeba pomocí notace\n\ttype taggedInt<'a> = int nebo\n\ttype swap<'a,'b> = 'b * 'a.\nZvažte deklarování parametrů typu pro tuto hodnotu explicitně, třeba pomocí notace\n\tlet f<'a,'b> ((x,y) : swap<'b,'a>) : swap<'a,'b> = (y,x). + + + + Explicit type parameters may only be used on module or member bindings + Explicitní parametry typu se dají použít jenom u vazeb modulu nebo člena. + + + + You must explicitly declare either all or no type parameters when overriding a generic abstract method + Při přepisování obecné abstraktní metody musíte explicitně deklarovat buď všechny, nebo žádné parametry typu. + + + + The field labels and expected type of this record expression or pattern do not uniquely determine a corresponding record type + Tyto popisky pole a očekávaný typ tohoto výrazu záznamu nebo vzoru neurčují jednoznačně odpovídající typ záznamu. + + + + The field '{0}' appears twice in this record expression or pattern + Pole {0} se v tomto výrazu záznamu nebo vzoru vyskytuje dvakrát. + + + + Unknown union case + Neznámý případ typu union + + + + This code is not sufficiently generic. The type variable {0} could not be generalized because it would escape its scope. + Tento kód není dostatečně obecný. Proměnná typu {0} se nedá zobecnit, protože by se tak dostala mimo svůj definiční obor. + + + + A property cannot have explicit type parameters. Consider using a method instead. + Vlastnost nemůže mít explicitní parametry typu. Zvažte místo toho možnost použití metody. + + + + A constructor cannot have explicit type parameters. Consider using a static construction method instead. + Konstruktor nemůže mít parametry explicitního typu. Zvažte možnost použít místo toho metodu statické konstrukce. + + + + This instance member needs a parameter to represent the object being invoked. Make the member static or use the notation 'member x.Member(args) = ...'. + Tento člen instance vyžaduje, aby parametr představoval objekt, který se vyvolává. Upravte člena tak, aby byl statický, nebo použijte notaci member x.Member(args) = + + + + Unexpected source-level property specification in syntax tree + Ve stromu syntaxe se neočekávala specifikace vlastnosti na úrovni zdroje. + + + + A static initializer requires an argument + Statický inicializátor vyžaduje argument. + + + + An object constructor requires an argument + Konstruktor objektu vyžaduje argument. + + + + This static member should not have a 'this' parameter. Consider using the notation 'member Member(args) = ...'. + Tento statický člen by neměl mít parametr this. Zvažte použití notace member Member(args) = ... + + + + An explicit static initializer should use the syntax 'static new(args) = expr' + Explicitní statický inicializátor by měl používat syntaxi static new(args) = expr. + + + + An explicit object constructor should use the syntax 'new(args) = expr' + Explicitní konstruktor objektu by měl používat syntaxi new(args) = expr. + + + + Unexpected source-level property specification + Neočekávaná specifikace vlastnosti na úrovni zdroje + + + + This form of object expression is not used in F#. Use 'member this.MemberName ... = ...' to define member implementations in object expressions. + Tato notace objektového výrazu se v F# nepoužívá. K definování implementací členů v objektových výrazech použijte member this.MemberName ... = ... + + + + Invalid declaration + Neplatná deklarace + + + + Attributes are not allowed within patterns + Atributy nejsou ve vzorech se povolené. + + + + The generic function '{0}' must be given explicit type argument(s) + Obecné funkci {0} se musí předávat explicitní argumenty typu. + + + + The method or function '{0}' should not be given explicit type argument(s) because it does not declare its type parameters explicitly + Metodě nebo funkci {0} by se neměly předávat argumenty explicitního typu, protože svoje parametry typu nedeklaruje explicitně. + + + + This value, type or method expects {0} type parameter(s) but was given {1} + Tato hodnota, typ nebo metoda očekává parametry typu v počtu {0}, ale počet předaných je {1}. + + + + The default, zero-initializing constructor of a struct type may only be used if all the fields of the struct type admit default initialization + Výchozí konstruktor s nulovou inicializací typu struktura se dá použít jenom v případě, že všechna pole typu struktura připouštějí výchozí inicializaci. + + + + Couldn't find Dispose on IDisposable, or it was overloaded + V rozhraní IDisposable se nenašla metoda Dispose nebo je tato metoda přetížená. + + + + This value is not a literal and cannot be used in a pattern + Tato hodnota není literálová a nedá se ve vzoru použít. + + + + This field is readonly + Toto pole je jen pro čtení. + + + + Named arguments must appear after all other arguments + Pojmenované argumenty musí být umístěné až za všemi ostatními argumenty. + + + + This function value is being used to construct a delegate type whose signature includes a byref argument. You must use an explicit lambda expression taking {0} arguments. + Tato hodnota funkce se používá k vytvoření typu delegáta, jehož signatura obsahuje argument ByRef. Musíte použít explicitní výraz lambda, který přebírá argumenty v počtu {0}. + + + + The type '{0}' is not a type whose values can be enumerated with this syntax, i.e. is not compatible with either seq<_>, IEnumerable<_> or IEnumerable and does not have a GetEnumerator method + Typ {0} není typem, u kterého by se dal pomocí této syntaxe vytvořit výčet hodnot, tj. není kompatibilní s seq<_>, IEnumerable<_> ani IEnumerable a nemá metodu GetEnumerator. + + + + This recursive binding uses an invalid mixture of recursive forms + Tato rekurzivní vazba používá neplatnou kombinaci rekurzivních tvarů. + + + + This is not a valid object construction expression. Explicit object constructors must either call an alternate constructor or initialize all fields of the object and specify a call to a super class constructor. + Toto není platný výraz konstruktoru objektu. Explicitní konstruktor objektu musí buď volat alternativní konstruktor, nebo inicializovat všechna pole objektu a specifikovat volání konstruktoru nadřazené třídy. + + + + Invalid constraint + Neplatné omezení + + + + Invalid constraint: the type used for the constraint is sealed, which means the constraint could only be satisfied by at most one solution + Neplatné omezení: Typ použitý pro toto omezení je zapečetěný. Znamená to, že tomuto omezení může vyhovovat maximálně jedno řešení. + + + + An 'enum' constraint must be of the form 'enum<type>' + Omezení enum musí mít notaci enum<type>. + + + + 'new' constraints must take one argument of type 'unit' and return the constructed type + Omezení new musí přebírat jeden argument typu unit a vracet konstruovaný typ. + + + + This property has an invalid type. Properties taking multiple indexer arguments should have types of the form 'ty1 * ty2 -> ty3'. Properties returning functions should have types of the form '(ty1 -> ty2)'. + Tato vlastnost je neplatného typu. Vlastnosti, které přebírají víc argumentů indexeru, by měly mít typy s notací ty1 * ty2 -> ty3. Vlastnosti, které vrací funkce, by měly mít typy s notací (ty1 -> ty2). + + + + Expected unit-of-measure parameter, not type parameter. Explicit unit-of-measure parameters must be marked with the [<Measure>] attribute. + Očekával se parametr měrné jednotky, ne parametr typu. Explicitní parametry měrných jednotek musí být označené atributem [<Measure>]. + + + + Expected type parameter, not unit-of-measure parameter + Očekával se parametr typu, ne parametr měrné jednotky. + + + + Expected type, not unit-of-measure + Očekával se typ, ne měrná jednotka. + + + + Expected unit-of-measure, not type + Očekávala se měrná jednotka, ne typ. + + + + Units-of-measure cannot be used as prefix arguments to a type. Rewrite as postfix arguments in angle brackets. + Měrné jednotky se nedají použít jako argumenty předpony typu. Přepište je na argumenty přípony v lomených závorkách. + + + + Unit-of-measure cannot be used in type constructor application + Měrná jednotka se v použití konstruktoru typu použít nedá. + + + + This control construct may only be used if the computation expression builder defines a '{0}' method + Tento řídicí konstruktor se dá použít jenom v případě, že tvůrce výrazu výpočtu definuje metodu {0}. + + + + This type has no nested types + Tento typ nemá žádné vnořené typy. + + + + Unexpected {0} in type expression + Neočekávalo se {0} ve výrazu typu. + + + + Type parameter cannot be used as type constructor + Parametr typu se jako konstruktor typu použít nedá. + + + + Illegal syntax in type expression + Neplatná syntaxe ve výrazu typu + + + + Anonymous unit-of-measure cannot be nested inside another unit-of-measure expression + Anonymní měrná jednotka se nedá vnořit do jiného výrazu měrné jednotky. + + + + Anonymous type variables are not permitted in this declaration + Anonymní typy proměnných nejsou v této deklaraci povolené. + + + + Unexpected / in type + V typu se neočekávalo lomítko (/). + + + + Unexpected type arguments + Neočekávané argumenty typu + + + + Optional arguments are only permitted on type members + Nepovinné argumenty jsou povolené jenom u členů typu. + + + + Name '{0}' not bound in pattern context + Název {0} nemá vazbu v kontextu vzoru. + + + + Non-primitive numeric literal constants cannot be used in pattern matches because they can be mapped to multiple different types through the use of a NumericLiteral module. Consider using replacing with a variable, and use 'when <variable> = <constant>' at the end of the match clause. + Konstanty číselných literálů, které nejsou primitivní, se nedají použít u porovnání vzorů, protože můžou být během použití modulu NumericLiteral mapované na víc různých typů. Zvažte možnost nahrazení proměnnou a na konci klauzule porovnání použijte when <variable> = <constant>. + + + + Type arguments cannot be specified here + Argumenty typu tady nejde zadat. + + + + Only active patterns returning exactly one result may accept arguments + Argumenty můžou přebírat jenom aktivní vzory, které vracejí právě jeden výsledek. + + + + Invalid argument to parameterized pattern label + Neplatný argument popisku parametrizovaného vzoru + + + + Internal error. Invalid index into active pattern array + Vnitřní chyba. Neplatný index pro pole aktivního vzoru + + + + This union case does not take arguments + Tento případ typu union nepřebírá argumenty. + + + + This union case takes one argument + Tento případ typu union přebírá jeden argument. + + + + This union case expects {0} arguments in tupled form + Tento případ typu union očekává argumenty v počtu {0} v podobě řazené kolekce členů. + + + + Field '{0}' is not static + Pole {0} není statické. + + + + This field is not a literal and cannot be used in a pattern + Toto pole není literál a nedá se použít ve vzoru. + + + + This is not a variable, constant, active recognizer or literal + Toto není proměnná, konstanta, aktivní rozlišovač nebo literál. + + + + This is not a valid pattern + Toto není platný vzor. + + + + Character range matches have been removed in F#. Consider using a 'when' pattern guard instead. + Porovnání rozsahu znaků se už v F# nepoužívá. Zvažte možnost použít místo toho ochrannou vazbu vzoru when. + + + + Illegal pattern + Neplatný vzor + + + + Syntax error - unexpected '?' symbol + Chyba syntaxe: neočekávaný symbol ? + + + + Expected {0} expressions, got {1} + Očekávaný počet výrazů je {0}. Počet předaných je {1}. + + + + TcExprUndelayed: delayed + TcExprUndelayed: zpožděné + + + + This expression form may only be used in sequence and computation expressions + Tato notace výrazu se dá použít jenom ve výrazech pořadí a výpočtu. + + + + Invalid object expression. Objects without overrides or interfaces should use the expression form 'new Type(args)' without braces. + Neplatný objektový výraz. U objektů bez přepsání nebo rozhraní by se měl výraz formulovat pomocí notace new Type(args) bez složených závorek. + + + + Invalid object, sequence or record expression + Neplatný výraz objektu, pořadí nebo záznamu + + + + Invalid record, sequence or computation expression. Sequence expressions should be of the form 'seq {{ ... }}' + Neplatný výraz záznamu, pořadí nebo výpočtu. Výrazy pořadí by měly mít notaci seq {{ ... }}. + + + + This list or array expression includes an element of the form 'if ... then ... else'. Parenthesize this expression to indicate it is an individual element of the list or array, to disambiguate this from a list generated using a sequence expression + Tento výraz seznamu nebo pole zahrnuje element s formulací if ... then ... else. Ohraničte tento výraz závorkami, aby bylo jasné, že jde o samostatný prvek seznamu nebo pole. Odlišíte ho tak od seznamu generovaného pomocí výrazu pořadí. + + + + Unable to parse format string '{0}' + Formátovací řetězec {0} se nedá parsovat. + + + + This list expression exceeds the maximum size for list literals. Use an array for larger literals and call Array.ToList. + Tento výraz seznamu překračuje maximální velikost literálů seznamu. Použijte pole pro rozsáhlejší literály a volejte metodu Array.ToList. + + + + The expression form 'expr then expr' may only be used as part of an explicit object constructor + Notace expr then expr se dá ve výrazu použít jenom v rámci explicitního konstruktoru objektu. + + + + Named arguments cannot be given to member trait calls + Pojmenované argumenty nejde předávat voláním vlastností členů. + + + + This is not a valid name for an enumeration case + Toto není platný název případu výčtu. + + + + This field is not mutable + Toto pole není měnitelné. + + + + This construct may only be used within list, array and sequence expressions, e.g. expressions of the form 'seq {{ ... }}', '[ ... ]' or '[| ... |]'. These use the syntax 'for ... in ... do ... yield...' to generate elements + Tento konstruktor se dá použít jenom ve výrazech seznamů, polí a posloupností, například ve výrazech ve formě seq {{ ... }}, [ ... ] nebo [| ... |]. Tyto výrazy používají syntaxi for ... in ... do ... yield... ke generování elementů. + + + + This construct may only be used within computation expressions. To return a value from an ordinary function simply write the expression without 'return'. + Tento konstruktor se dá použít jenom ve výrazech výpočtu. Pokud chcete vracet hodnotu z běžné funkce, napište jednoduše výraz bez return. + + + + This construct may only be used within sequence or computation expressions + Tento konstruktor se dá použít jenom ve výrazech pořadí nebo výpočtu. + + + + This construct may only be used within computation expressions + Tento konstruktor se dá použít jenom ve výrazech výpočtu. + + + + Invalid indexer expression + Neplatný výraz indexeru + + + + The operator 'expr.[idx]' has been used on an object of indeterminate type based on information prior to this program point. Consider adding further type constraints + Operátor expr.[idx] se používá u objektu neurčitého typu založeného na informacích před tímto místem v programu. Zvažte přidání dalších omezení typu. + + + + Cannot inherit from a variable type + Z typu proměnné se nedá dědit. + + + + Calls to object constructors on type parameters cannot be given arguments + Volání konstruktorů objektu u parametrů typu se nedají předávat argumenty. + + + + The 'CompiledName' attribute cannot be used with this language element + Atribut CompiledName se nedá u tohoto elementu jazyka použít. + + + + '{0}' may only be used with named types + {0} se dá použít jenom u pojmenovaných typů. + + + + 'inherit' cannot be used on interface types. Consider implementing the interface by using 'interface ... with ... end' instead. + Deklarace inherit se nedá použít u typů rozhraní. Zvažte místo toho možnost implementovat rozhraní pomocí interface ... with ... end. + + + + 'new' cannot be used on interface types. Consider using an object expression '{{ new ... with ... }}' instead. + U typů rozhraní se new použít nedá. Zvažte možnost použít místo toho objektový výraz {{ new ... with ... }}. + + + + Instances of this type cannot be created since it has been marked abstract or not all methods have been given implementations. Consider using an object expression '{{ new ... with ... }}' instead. + Instance tohoto typu se nedají vytvořit, a to buď proto, že je tento typ označený jako abstraktní, nebo proto, že jste neimplementovali všechny metody. Zvažte možnost použít místo toho objektový výraz {{ new ... with ... }}. + + + + It is recommended that objects supporting the IDisposable interface are created using the syntax 'new Type(args)', rather than 'Type(args)' or 'Type' as a function value representing the constructor, to indicate that resources may be owned by the generated value + Doporučuje se, aby se objekty, které podporují rozhraní IDisposable, vytvářely pomocí syntaxe new Type(args) a ne Type(args) nebo Type jako hodnota funkce představující konstruktor. Tím se určí, že prostředky může vlastnit generovaná hodnota. + + + + '{0}' may only be used to construct object types + {0} se dá použít jenom k vytvoření objektových typů. + + + + Constructors for the type '{0}' must directly or indirectly call its implicit object constructor. Use a call to the implicit object constructor instead of a record expression. + Konstruktory pro typ {0} musí přímo nebo nepřímo volat svoje implicitní konstruktory objektu. Místo výrazu záznamu použijte volání implicitního konstruktoru objektu. + + + + The field '{0}' has been given a value, but is not present in the type '{1}' + Poli {0} se předala hodnota, která se ale nenachází v typu {1}. + + + + No assignment given for field '{0}' of type '{1}' + Poli {0} typu {1} se nepředalo žádné přiřazení. + + + + Extraneous fields have been given values + Nadbytečným polím se předaly hodnoty. + + + + Only overrides of abstract and virtual members may be specified in object expressions + V objektových výrazech se dají specifikovat jenom přepsání abstraktních a virtuálních členů. + + + + The member '{0}' does not correspond to any abstract or virtual method available to override or implement. + Člen {0} neodpovídá žádné abstraktní ani virtuální metodě, která by se dala přepsat nebo implementovat. + + + + The type {0} contains the member '{1}' but it is not a virtual or abstract method that is available to override or implement. + Typ {0} obsahuje člen {1}, ale není to virtuální nebo abstraktní metoda, která by se dala přepsat nebo implementovat. + + + + The member '{0}' does not accept the correct number of arguments. {1} argument(s) are expected, but {2} were given. The required signature is '{3}'.{4} + Člen {0} nepřijímá správný počet argumentů. Očekávaný počet argumentů je {1}, ale předalo se jich {2}. Požadovaná signatura je {3}.{4} + + + + The member '{0}' does not accept the correct number of arguments. One overload accepts {1} arguments, but {2} were given. The required signature is '{3}'.{4} + Člen {0} nepřijímá správný počet argumentů. Počet argumentů přijímaných jedním přetížením je {1}, ale předalo se jich {2}. Požadovaná signatura je {3}.{4} + + + + A simple method name is required here + Tady se vyžaduje jednoduchý název metody. + + + + The types System.ValueType, System.Enum, System.Delegate, System.MulticastDelegate and System.Array cannot be used as super types in an object expression or class + Typy System.ValueType, System.Enum, System.Delegate, System.MulticastDelegate a System.Array se v objektovém výrazu nebo ve třídě objektu nedají použít jako nadřazené. + + + + 'new' must be used with a named type + U new se musí použít pojmenovaný typ. + + + + Cannot create an extension of a sealed type + Nejde vytvořit rozšíření zapečetěného typu. + + + + No arguments may be given when constructing a record value + Při vytváření hodnoty záznamu nejde zadávat argumenty. + + + + Interface implementations cannot be given on construction expressions + Implementace rozhraní se s výrazy konstrukcí nedají předávat. + + + + Object construction expressions may only be used to implement constructors in class types + Výrazy konstruktoru objektu se dají použít jenom k implementaci konstruktorů v typech tříd. + + + + Only simple bindings of the form 'id = expr' can be used in construction expressions + Ve výrazech konstrukcí se dají použít jenom jednoduché vazby s notací id = expr. + + + + Objects must be initialized by an object construction expression that calls an inherited object constructor and assigns a value to each field + Objekty se musí inicializovat pomocí výrazu konstruktoru objektu, který volá zděděný konstruktor objektu a přiřazuje hodnoty ke všem polím. + + + + Expected an interface type + Očekával se typ rozhraní. + + + + Constructor expressions for interfaces do not take arguments + Výrazy konstruktorů pro rozhraní nepřebírají argumenty. + + + + This object constructor requires arguments + Tento konstruktor objektu vyžaduje argumenty. + + + + 'new' may only be used with object constructors + Klíčové slovo new se dá použít jenom s konstruktory objektů. + + + + At least one override did not correctly implement its corresponding abstract member + Nejmíň jedno přepsání neimplementovalo správně odpovídající abstraktní člen. + + + + This numeric literal requires that a module '{0}' defining functions FromZero, FromOne, FromInt32, FromInt64 and FromString be in scope + Tento číselný literál vyžaduje, aby modul {0} definující funkce FromZero, FromOne, FromInt32, FromInt64 a FromString byl v definičním oboru. + + + + Invalid record construction + Neplatná konstrukce záznamu + + + + The expression form {{ expr with ... }} may only be used with record types. To build object types use {{ new Type(...) with ... }} + Notace {{ expr with ... }} se dá ve výrazech použít jenom u typů záznamu. Pokud chcete vytvořit objektové typy, použijte formulaci {{ new Type(...) with ... }}. + + + + The inherited type is not an object model type + Zděděný typ není typem objektového modelu. + + + + Object construction expressions (i.e. record expressions with inheritance specifications) may only be used to implement constructors in object model types. Use 'new ObjectType(args)' to construct instances of object model types outside of constructors + Výrazy konstruktoru objektu (třeba výrazy záznamu se specifikací dědičnosti) se dají použít jenom k implementaci konstruktorů v typech objektového modelu. K vytvoření instancí typů objektového modelu mimo konstruktory použijte new ObjectType(args). + + + + '{{ }}' is not a valid expression. Records must include at least one field. Empty sequences are specified by using Seq.empty or an empty list '[]'. + {{ }} není platný výraz. Záznamy musí obsahovat alespoň jedno pole. Prázdné posloupnosti se specifikují pomocí Seq.empty nebo prázdného seznamu []. + + + + This type is not a record type. Values of class and struct types must be created using calls to object constructors. + Tento typ není typem záznamu. Hodnoty typů třída a struktura se musí vytvořit pomocí volání konstruktorů objektu. + + + + This type is not a record type + Tento typ není typem záznamu. + + + + This construct is ambiguous as part of a computation expression. Nested expressions may be written using 'let _ = (...)' and nested computations using 'let! res = builder {{ ... }}'. + Tento konstruktor je jako součást výrazu výpočtu nejednoznačný. Vnořené výrazy jde zapsat pomocí notace let _ = (...) a vnořené výpočty pomocí notace let! res = builder {{ ... }}. + + + + This construct is ambiguous as part of a sequence expression. Nested expressions may be written using 'let _ = (...)' and nested sequences using 'yield! seq {{... }}'. + Tento konstruktor je jako součást výrazu pořadí nejednoznačný. Vnořené výrazy jde zapsat pomocí notace let _ = (...) a vnořená pořadí pomocí notace yield! seq {{... }}. + + + + 'do!' cannot be used within sequence expressions + Klíčové slovo do! se ve výrazech pořadí nedá použít. + + + + The use of 'let! x = coll' in sequence expressions is not permitted. Use 'for x in coll' instead. + Použití notace let! x = coll ve výrazech pořadí není povolené. Použijte místo ní notaci for x in coll. + + + + 'try'/'with' cannot be used within sequence expressions + Výrazy try/with se u výrazů pořadí použít nedají. + + + + In sequence expressions, multiple results are generated using 'yield!' + Ve výrazech pořadí se víc výsledků generuje pomocí yield!. + + + + Invalid assignment + Neplatné přiřazení + + + + Invalid use of a type name + Neplatné použití názvu typu + + + + This type has no accessible object constructors + Pro tento typ nejsou dostupné žádné konstruktory objektu. + + + + Invalid use of an interface type + Neplatné použití typu rozhraní + + + + Invalid use of a delegate constructor. Use the syntax 'new Type(args)' or just 'Type(args)'. + Neplatné použití konstruktoru delegáta. Použijte syntaxi new Type(args) nebo jenom Type(args). + + + + Property '{0}' is not static + Vlastnost {0} není statická. + + + + Property '{0}' is not readable + Vlastnost {0} se nedá přečíst. + + + + This lookup cannot be used here + Toto vyhledávání se tady nedá použít. + + + + Property '{0}' is static + Vlastnost {0} je statická. + + + + Property '{0}' cannot be set + Vlastnost {0} se nedá nastavit. + + + + Constructors must be applied to arguments and cannot be used as first-class values. If necessary use an anonymous function '(fun arg1 ... argN -> new Type(arg1,...,argN))'. + Konstruktory se musí použít pro argumenty a nejde je použít jako hodnoty první třídy. V případě potřeby použijte anonymní funkci (fun arg1 ... argN -> new Type(arg1,...,argN)). + + + + The syntax 'expr.id' may only be used with record labels, properties and fields + Syntaxe expr.id se dá použít jenom u vlastností, polí a popisků záznamů. + + + + Event '{0}' is static + Událost {0} je statická. + + + + Event '{0}' is not static + Událost {0} není statická. + + + + The named argument '{0}' did not match any argument or mutable property + Pojmenovaný argument {0} neodpovídá žádnému argumentu nebo měnitelné vlastnosti. + + + + One or more of the overloads of this method has curried arguments. Consider redesigning these members to take arguments in tupled form. + Minimálně jedno přetížení této metody má curryfikované argumenty. Zvažte úpravu návrhu těchto členů tak, aby přebíraly argumenty v podobě řazené kolekce členů. + + + + The unnamed arguments do not form a prefix of the arguments of the method called + Nepojmenované argumenty netvoří předponu argumentů volané metody. + + + + Static optimization conditionals are only for use within the F# library + Podmínky statické optimalizace se používají jenom v knihovně F#. + + + + The corresponding formal argument is not optional + Odpovídající formální argument není nepovinný. + + + + Invalid optional assignment to a property or field + Neplatné nepovinné přiřazení k vlastnosti nebo poli + + + + A delegate constructor must be passed a single function value + Konstruktoru delegáta se musí předávat jediná hodnota funkce. + + + + A binding cannot be marked both 'use' and 'rec' + Vazba nemůže mít současně označení use i rec. + + + + The 'VolatileField' attribute may only be used on 'let' bindings in classes + Atribut VolatileField se dá v třídách použít jenom u vazeb let. + + + + Attributes are not permitted on 'let' bindings in expressions + Atributy nejsou u vazeb Let ve výrazech povolené. + + + + The 'DefaultValue' attribute may only be used on 'val' declarations + Atribut DefaultValue se dá použít jenom u deklarací val. + + + + The 'ConditionalAttribute' attribute may only be used on members + Atribut ConditionalAttribute se dá použít jenom u členů. + + + + This is not a valid name for an active pattern + Toto není platný název aktivního vzoru. + + + + The 'EntryPointAttribute' attribute may only be used on function definitions in modules + Atribut EntryPointAttribute se dá použít jenom u definic funkcí v modulech. + + + + Mutable values cannot be marked 'inline' + Označení inline se u proměnlivých hodnot použít nedá. + + + + Mutable values cannot have generic parameters + Proměnlivé hodnoty nemůžou mít obecné parametry. + + + + Mutable function values should be written 'let mutable f = (fun args -> ...)' + Zápis proměnlivých hodnot funkcí by měl být let mutable f = (fun args -> ...). + + + + Only functions may be marked 'inline' + Označení inline můžou mít jenom funkce. + + + + A literal value cannot be given the [<ThreadStatic>] or [<ContextStatic>] attributes + Hodnotě literálu se nedají předávat atributy [<ThreadStatic>] nebo [<ContextStatic>]. + + + + A literal value cannot be marked 'mutable' + Hodnota literálu nemůže mít označení mutable. + + + + A literal value cannot be marked 'inline' + Hodnota literálu nemůže mít označení inline. + + + + Literal values cannot have generic parameters + Hodnota literálu nemůže mít obecné parametry. + + + + This is not a valid constant expression + Toto není platný konstantní výraz. + + + + This type is not accessible from this code location + Tento typ není na tomto místě v kódu dostupný. + + + + Unexpected condition in imported assembly: failed to decode AttributeUsage attribute + Neočekávaná podmínka v importovaném sestavení: nepovedlo se dekódovat atribut AttributeUsage. + + + + Unrecognized attribute target. Valid attribute targets are 'assembly', 'module', 'type', 'method', 'property', 'return', 'param', 'field', 'event', 'constructor'. + Nerozpoznaný cíl atributu. Platné cíle atributu jsou assembly, module, type, method, property, return, param, field, event a constructor. + + + + This attribute is not valid for use on this language element. Assembly attributes should be attached to a 'do ()' declaration, if necessary within an F# module. + Tento atribut není platný pro použití u tohoto elementu jazyka. Atributy sestavení by měly být připojené k deklaraci do (), v případě potřeby v modulu F#. + + + + This attribute is not valid for use on this language element + Tento atribut není platný pro použití u tohoto elementu jazyka. + + + + Optional arguments cannot be used in custom attributes + Nepovinné argumenty se u vlastních atributů použít nedají. + + + + This property cannot be set + Tato vlastnost se nedá nastavit. + + + + This property or field was not found on this custom attribute type + Tato vlastnost nebo pole se u tohoto typu vlastního atributu nenašla. + + + + A custom attribute must be a reference type + Vlastní atribut musí být odkazového typu. + + + + The number of args for a custom attribute does not match the expected number of args for the attribute constructor + Počet argumentů pro vlastní atribut neodpovídá očekávanému počtu argumentů pro konstruktor atributu. + + + + A custom attribute must invoke an object constructor + Vlastní atribut musí vyvolat konstruktor objektu. + + + + Attribute expressions must be calls to object constructors + Výrazy atributu musí být volání konstruktorů objektů. + + + + This attribute cannot be used in this version of F# + Tento atribut se v této verzi F# nedá použít. + + + + Invalid inline specification + Neplatná vložená specifikace + + + + 'use' bindings must be of the form 'use <var> = <expr>' + Vazby use musí mít notaci use <var> = <expr>. + + + + Abstract members are not permitted in an augmentation - they must be defined as part of the type itself + Abstraktní členové se v rozšíření nepovolují – musí se definovat v samotném typu. + + + + Method overrides and interface implementations are not permitted here + Přepsání metod a implementace rozhraní tady nejsou povolené. + + + + No abstract or interface member was found that corresponds to this override + Nenašel se žádný abstraktní člen nebo člen rozhraní, který by odpovídal tomuto přepsání. + + + + This override takes a different number of arguments to the corresponding abstract member. The following abstract members were found:{0} + Toto přepsání přebírá jiný počet argumentů vzhledem k odpovídajícímu abstraktnímu členovi. Našli se následující abstraktní členové: {0} + + + + This method already has a default implementation + Tato metoda už má výchozí implementaci. + + + + The method implemented by this default is ambiguous + Metoda implementovaná touto výchozí třídou je nejednoznačná. + + + + No abstract property was found that corresponds to this override + Nenašla se žádná abstraktní vlastnost, která by odpovídala tomuto přepsání. + + + + This property overrides or implements an abstract property but the abstract property doesn't have a corresponding {0} + Tato hodnota přepisuje nebo implementuje abstraktní vlastnost, která ale nemá odpovídající metodu {0}. + + + + Invalid signature for set member + Neplatná signatura pro člena sady + + + + This new member hides the abstract member '{0}'. Rename the member or use 'override' instead. + Tento nový člen skrývá abstraktní člen {0}. Změňte jeho název nebo místo toho použijte klíčové slovo override. + + + + This new member hides the abstract member '{0}' once tuples, functions, units of measure and/or provided types are erased. Rename the member or use 'override' instead. + Tento nový člen skrývá po vymazání řazených kolekcí členů, funkcí, měrných jednotek a poskytnutých typů abstraktní člen {0}. Změňte jeho název nebo místo toho použijte klíčové slovo override. + + + + Interfaces cannot contain definitions of static initializers + Rozhraní nemůžou obsahovat definice statických inicializátorů. + + + + Interfaces cannot contain definitions of object constructors + Rozhraní nemůžou obsahovat definice konstruktorů objektu. + + + + Interfaces cannot contain definitions of member overrides + Rozhraní nemůžou obsahovat definice přepsání členů. + + + + Interfaces cannot contain definitions of concrete members. You may need to define a constructor on your type to indicate that the type is a class. + Rozhraní nemůžou obsahovat definice konkrétních členů. Možná bude potřeba definovat u typu konstruktor, který bude vyjadřovat, že jde o třídu. + + + + Constructors cannot be specified in exception augmentations + V rozšířeních výjimky nejde zadávat konstruktory. + + + + Structs cannot have an object constructor with no arguments. This is a restriction imposed on all CLI languages as structs automatically support a default constructor. + Struktury nemůžou mít konstruktor objektu bez argumentů. Toto je omezení, které platí u všech jazyků CLI vzhledem k tomu, že struktury automaticky podporují výchozí konstruktor. + + + + Constructors cannot be defined for this type + Pro tento typ nejde definovat konstruktory. + + + + Recursive bindings that include member specifications can only occur as a direct augmentation of a type + Rekurzivní vazby, které obsahují specifikace členů, se dají použít jenom jako přímé rozšíření typu. + + + + Only simple variable patterns can be bound in 'let rec' constructs + Vazbu v konstruktorech let rec můžou mít jenom vzory s jednoduchými proměnnými. + + + + Only record fields and simple, non-recursive 'let' bindings may be marked mutable + Označení mutable můžou mít jenom pole záznamu a jednoduché, nerekurzivní vazby let. + + + + This member is not sufficiently generic + Tento člen není dostatečně obecný. + + + + A declaration may only be the [<Literal>] attribute if a constant value is also given, e.g. 'val x : int = 1' + Pokud se předává také hodnota konstanty, například val x : int = 1, může být deklarací jenom atribut [<Literal>]. + + + + A declaration may only be given a value in a signature if the declaration has the [<Literal>] attribute + Deklaraci se může v signatuře předávat hodnota jenom v případě, že má deklarace atribut [<Literal>]. + + + + Thread-static and context-static variables must be static and given the [<DefaultValue>] attribute to indicate that the value is initialized to the default value on each new thread + Proměnné, které jsou statické na úrovni vlákna nebo kontextu, musí být statické a musí se jim předávat atribut [<DefaultValue>]. Tím se určí, že se hodnota v každém novém vláknu inicializuje na výchozí hodnotu. + + + + Volatile fields must be marked 'mutable' and cannot be thread-static + Pole s modifikátorem volatile musí mít označení mutable a nemůžou být statická na úrovni vlákna. + + + + Uninitialized 'val' fields must be mutable and marked with the '[<DefaultValue>]' attribute. Consider using a 'let' binding instead of a 'val' field. + Neinicializovaná pole val musí být měnitelná a označená atributem [<DefaultValue>]. Zvažte možnost použít místo pole val vazbu let. + + + + Static 'val' fields in types must be mutable, private and marked with the '[<DefaultValue>]' attribute. They are initialized to the 'null' or 'zero' value for their type. Consider also using a 'static let mutable' binding in a class type. + Statická pole val v typech musí být měnitelná, privátní a označená atributem [<DefaultValue>]. Inicializují se na hodnotu null nebo zero podle jejich typu. Zvažte možnost použít v typu třídy také vazbu static let mutable. + + + + This field requires a name + Toto pole vyžaduje název. + + + + Invalid namespace, module, type or union case name + Neplatný název oboru názvů, modulu, typu nebo případu typu union + + + + Explicit type declarations for constructors must be of the form 'ty1 * ... * tyN -> resTy'. Parentheses may be required around 'resTy' + Explicitní deklarace typu pro konstruktory musí mít formulaci ty1 * ... * tyN -> resTy. Je možné, že výraz resTy bude potřeba uzavřít do závorek. + + + + Return types of union cases must be identical to the type being defined, up to abbreviations + Návratové typy případů typu union musí být identické s typem, který se definuje, a to až po zkratky. + + + + This is not a valid value for an enumeration literal + Toto není platná hodnota pro literál výčtu. + + + + The type '{0}' is not an interface type + Typ {0} není typ rozhraní. + + + + Duplicate specification of an interface + Duplicitní specifikace rozhraní + + + + A field/val declaration is not permitted here + Deklarace pole nebo hodnoty tady není povolená. + + + + A inheritance declaration is not permitted here + Zděděná deklarace tady není povolená. + + + + This declaration opens the module '{0}', which is marked as 'RequireQualifiedAccess'. Adjust your code to use qualified references to the elements of the module instead, e.g. 'List.map' instead of 'map'. This change will ensure that your code is robust as new constructs are added to libraries. + Tato deklarace otevírá modul {0}, který má označení RequireQualifiedAccess. Upravte kód tak, aby místo toho používal kvalifikované odkazy na elementy modulu, třeba místo map použijte List.map. Touto změnou zajistíte, že bude kód funkční i v případě, že se budou do knihoven přidávat nové konstruktory. + + + + This declaration opens the namespace or module '{0}' through a partially qualified path. Adjust this code to use the full path of the namespace. This change will make your code more robust as new constructs are added to the F# and CLI libraries. + Tato deklarace otevírá obor názvů nebo modul {0} prostřednictvím částečně kvalifikované cesty. Upravte tento kód tak, aby používal úplnou cestu oboru názvů. Touto změnou zajistíte, že bude kód funkční i v případě, že se budou do knihoven F# a CLI přidávat nové konstruktory. + + + + Local class bindings cannot be marked inline. Consider lifting the definition out of the class or else do not mark it as inline. + Vazby lokální třídy nemůžou mít označení inline. Zvažte možnost rozšíření definice mimo třídu. V opačném případě neoznačujte jako inline. + + + + Type abbreviations cannot have members + Zkratky typů nemůžou mít členy. + + + + As of F# 4.1, the accessibility of type abbreviations is checked at compile-time. Consider changing the accessibility of the type abbreviation. Ignoring this warning might lead to runtime errors. + Od jazyka F# 4.1 se dostupnost zkratek typů kontroluje při kompilaci. Zvažte možnost změnit dostupnost zkratek typů. Pokud budete toto upozornění ignorovat, může to mít za následek chyby za běhu. + + + + Enumerations cannot have members + Výčty nemůžou mít členy. + + + + Measure declarations may have only static members + Deklarace míry můžou mít jenom statické členy. + + + + Structs cannot contain 'do' bindings because the default constructor for structs would not execute these bindings + Struktury nemůžou obsahovat vazby do, protože výchozí konstruktor pro struktury by tyto vazby neprovedl. + + + + Structs cannot contain value definitions because the default constructor for structs will not execute these bindings. Consider adding additional arguments to the primary constructor for the type. + Struktury nemůžou obsahovat definice hodnot, protože výchozí konstruktor pro struktury tyto vazby neprovede. Zvažte možnost přidat k primárnímu konstruktoru pro tento typ další argumenty. + + + + Static value definitions may only be used in types with a primary constructor. Consider adding arguments to the type definition, e.g. 'type X(args) = ...'. + Statické definice hodnot se dají použít jenom u typů s primárním konstruktorem. Zvažte přidání argumentů do definice typu, třeba type X(args) = ... + + + + Measure declarations may have only static members: constructors are not available + Deklarace míry můžou mít jenom statické členy: Konstruktory dostupné nejsou. + + + + A member and a local class binding both have the name '{0}' + Vazba členské i lokální třídy má název {0}. + + + + Type abbreviations cannot have interface declarations + Zkratky typů nemůžou mít deklarace rozhraní. + + + + Enumerations cannot have interface declarations + Výčty nemůžou mít deklarace rozhraní. + + + + This type is not an interface type + Tento typ není typem rozhraní. + + + + All implemented interfaces should be declared on the initial declaration of the type + Všechna implementovaná rozhraní by se měla deklarovat při počáteční deklaraci typu. + + + + A default implementation of this interface has already been added because the explicit implementation of the interface was not specified at the definition of the type + Výchozí implementace tohoto rozhraní už se přidala, protože jste v definici typu nezadali explicitní implementaci tohoto rozhraní. + + + + This member is not permitted in an interface implementation + Tento člen není v implementaci rozhraní povolený. + + + + This declaration element is not permitted in an augmentation + Tento element deklarace není u rozšíření povolený. + + + + Types cannot contain nested type definitions + Typy nemůžou obsahovat definice vnořených typů. + + + + type, exception or module + typ, výjimka nebo modul + + + + type or module + typ nebo modul + + + + The struct, record or union type '{0}' implements the interface 'System.IStructuralEquatable' explicitly. Apply the 'CustomEquality' attribute to the type. + Typ struktura, záznam nebo sjednocení {0} implementuje explicitně rozhraní System.IStructuralEquatable. Použijte pro tento typ atribut CustomEquality. + + + + The struct, record or union type '{0}' implements the interface 'System.IEquatable<_>' explicitly. Apply the 'CustomEquality' attribute to the type and provide a consistent implementation of the non-generic override 'System.Object.Equals(obj)'. + Typ struktura, záznam nebo sjednocení {0} implementuje explicitně rozhraní System.IEquatable<_>. Použijte pro tento typ atribut CustomEquality a vytvořte konzistentní implementaci přepsání System.Object.Equals(obj), které není obecné. + + + + Explicit type specifications cannot be used for exception constructors + Explicitní specifikace typu se nedají použít u konstruktorů výjimek. + + + + Exception abbreviations should not have argument lists + Zkratky výjimek by neměly mít seznamy argumentů. + + + + Abbreviations for Common IL exceptions cannot take arguments + Zkratky pro výjimky Common IL nemůžou přebírat argumenty. + + + + Exception abbreviations must refer to existing exceptions or F# types deriving from System.Exception + Zkratky výjimek musí odkazovat na existující výjimky nebo typy F# odvozené od třídy System.Exception. + + + + Abbreviations for Common IL exception types must have a matching object constructor + Zkratky pro typy výjimek Common IL musí mít odpovídající konstruktor objektu. + + + + Not an exception + Není výjimka. + + + + Invalid module name + Neplatný název modulu + + + + Invalid type extension + Neplatné rozšíření typu + + + + The attributes of this type specify multiple kinds for the type + Atributy tohoto typu určují pro typ víc druhů. + + + + The kind of the type specified by its attributes does not match the kind implied by its definition + Druh typu určeného jeho atributy se neshoduje s druhem odvozeným jeho definicí. + + + + Measure definitions cannot have type parameters + Definice míry nemůžou mít parametry typu. + + + + This type requires a definition + Teto typ vyžaduje definici. + + + + This type abbreviation has one or more declared type parameters that do not appear in the type being abbreviated. Type abbreviations must use all declared type parameters in the type being abbreviated. Consider removing one or more type parameters, or use a concrete type definition that wraps an underlying type, such as 'type C<'a> = C of ...'. + Tato zkratka typu má aspoň jeden parametr deklarovaného typu, který se u zkracovaného typu nevyskytuje. Při zkracování typů se musí použít všechny parametry deklarovaného typu. Zvažte možnost odebrání jednoho nebo víc parametrů typu, nebo použijte konkrétní definici typu, která zabaluje nadřízený typ, třeba type C<'a> = C f ... + + + + Structs, interfaces, enums and delegates cannot inherit from other types + Struktury, rozhraní, výčty ani delegáti nemůžou dědit z jiných typů. + + + + Types cannot inherit from multiple concrete types + Typy nemůžou dědit od více konkrétních typů. + + + + Records, union, abbreviations and struct types cannot have the 'AllowNullLiteral' attribute + Typy záznam, sjednocení, zkratka a struktura nemůžou mít atribut AllowNullLiteral. + + + + Types with the 'AllowNullLiteral' attribute may only inherit from or implement types which also allow the use of the null literal + Typy s atributem AllowNullLiteral můžou dědit jenom od typů, které umožňují použít taky literál s hodnotou null, nebo tyto typy můžou implementovat. + + + + Generic types cannot be given the 'StructLayout' attribute + Obecným typům se nemůže předávat atribut StructLayout. + + + + Only structs and classes without primary constructors may be given the 'StructLayout' attribute + Atribut StructLayout se dá předávat jenom strukturám a třídám bez primárních konstruktorů. + + + + The representation of this type is hidden by the signature. It must be given an attribute such as [<Sealed>], [<Class>] or [<Interface>] to indicate the characteristics of the type. + Signatura skrývá reprezentaci tohoto typu. Charakteristiku typu je potřeba určit pomocí atributu, jako je [<Sealed>], [<Class>] nebo [<Interface>]. + + + + Only classes may be given the 'AbstractClass' attribute + Atribut AbstractClass se dá předávat jenom třídám. + + + + Only types representing units-of-measure may be given the 'Measure' attribute + Atribut Measure se dá předávat jenom typům, které představují měrné jednotky. + + + + Accessibility modifiers are not permitted on overrides or interface implementations + Modifikátory dostupnosti nejsou u implementací rozhraní nebo přepsání povolené. + + + + Discriminated union types are always sealed + Typy rozlišených sjednocení jsou vždycky zapečetěné. + + + + Record types are always sealed + Typy záznamu jsou vždycky zapečetěné. + + + + Assembly code types are always sealed + Typy kódu sestavení jsou vždycky zapečetěné. + + + + Struct types are always sealed + Typy struktury jsou vždycky zapečetěné. + + + + Delegate types are always sealed + Typy delegátů jsou vždycky zapečetěné. + + + + Enum types are always sealed + Typy výčtu jsou vždycky zapečetěné. + + + + Interface types and delegate types cannot contain fields + Typy rozhraní a typy delegátů nemůžou obsahovat pole. + + + + Abbreviated types cannot be given the 'Sealed' attribute + Zkráceným typům se nedá předávat atribut Sealed. + + + + Cannot inherit a sealed type + Zapečetěný typ nejde zdědit. + + + + Cannot inherit from interface type. Use interface ... with instead. + Nejde dědit z typu rozhraní. Použijte místo toho výraz interface ... with. + + + + Struct types cannot contain abstract members + Typy struktury nemůžou obsahovat abstraktní členy. + + + + Interface types cannot be sealed + Typy rozhraní nemůžou být zapečetěné. + + + + Delegate specifications must be of the form 'typ -> typ' + Určení delegátů musí mít notaci typ -> typ. + + + + Delegate specifications must not be curried types. Use 'typ * ... * typ -> typ' for multi-argument delegates, and 'typ -> (typ -> typ)' for delegates returning function values. + Specifikace delegátů nesmí být curryfikované typy. Pro delegáty, kteří mají víc argumentů, použijte typ * ... * typ -> typ a pro delegáty, kteří vrací hodnoty funkcí, použijte typ -> (typ -> typ). + + + + Literal enumerations must have type int, uint, int16, uint16, int64, uint64, byte, sbyte or char + Literálový výčet musí být typu int, uint, int16, uint16, int64, uint64, byte, sbyte nebo char. + + + + This type definition involves an immediate cyclic reference through an abbreviation + Tato definice typu zahrnuje okamžitý cyklický odkaz zprostředkovaný zkratkou. + + + + This type definition involves an immediate cyclic reference through a struct field or inheritance relation + Tato definice typu zahrnuje okamžitý cyklický odkaz zprostředkovaný polem struktury nebo vztahem dědičnosti. + + + + The syntax 'type X with ...' is reserved for augmentations. Types whose representations are hidden but which have members are now declared in signatures using 'type X = ...'. You may also need to add the '[<Sealed>] attribute to the type definition in the signature + Syntaxe type X with ... je rezervovaná pro rozšíření. Typy, které mají skrytou reprezentaci, ale mají členy, se teď v signaturách deklarují pomocí notace type X = ... Je možné, že k definici typu v signatuře budete muset přidat také atribut [<Sealed>]. + + + + Members that extend interface, delegate or enum types must be placed in a module separate to the definition of the type. This module must either have the AutoOpen attribute or be opened explicitly by client code to bring the extension members into scope. + Členové, kteří rozšiřují typy rozhraní, delegáta nebo výčtu, musí být umístěné v modulu odděleně od definice typu. Tento modul musí mít buď atribut AutoOpen, nebo musí být otevřený explicitně klientským kódem, aby se člen rozšíření vložil do oboru. + + + + One or more of the declared type parameters for this type extension have a missing or wrong type constraint not matching the original type constraints on '{0}' + Minimálně jeden parametr deklarovaného typu u tohoto rozšíření typu neobsahuje omezení typu nebo má nesprávné omezení typu, které se neshoduje s původními omezeními typu na {0}. + + + + Type definitions may only have one 'inherit' specification and it must be the first declaration + Definice typu může mít jenom jednu specifikaci inherit a ta musí být první deklarací. + + + + 'let' and 'do' bindings must come before member and interface definitions in type definitions + Vazby let a do se musí v definicích typů umístit před definice členů a rozhraní. + + + + This 'inherit' declaration specifies the inherited type but no arguments. Consider supplying arguments, e.g. 'inherit BaseType(args)'. + Tato deklarace inherit specifikuje zděděný typ, ale ne argumenty. Zvažte možnost poskytnutí argumentů, třeba inherit BaseType(args). + + + + This 'inherit' declaration has arguments, but is not in a type with a primary constructor. Consider adding arguments to your type definition, e.g. 'type X(args) = ...'. + Deklarace inherit má argumenty, ale není v typu s primárním konstruktorem. Zvažte možnost přidat do definice typu argumenty, třeba type X(args) = ... + + + + This definition may only be used in a type with a primary constructor. Consider adding arguments to your type definition, e.g. 'type X(args) = ...'. + Tato definice se dá použít jenom u typu s primárním konstruktorem. Zvažte možnost přidat do definice typu argumenty, třeba type X(args) = ... + + + + Type abbreviations cannot have augmentations + Zkratky typů nemůžou mít rozšíření. + + + + The path '{0}' is a namespace. A module abbreviation may not abbreviate a namespace. + Cesta {0} je obor názvů. Zkratka modulu nemůže zkracovat obor názvů. + + + + The type '{0}' is used in an invalid way. A value prior to '{1}' has an inferred type involving '{2}', which is an invalid forward reference. + Typ {0} se používá neplatným způsobem. Hodnota před pozicí {1} má odvozený typ zahrnující {2}: to je neplatný dopředný odkaz. + + + + The member '{0}' is used in an invalid way. A use of '{1}' has been inferred prior to the definition of '{2}', which is an invalid forward reference. + Člen {0} se používá neplatným způsobem. Použití {1} se odvozuje před definicí {2}. To je neplatný dopředný odkaz. + + + + The attribute 'AutoOpen(\"{0}\")' in the assembly '{1}' did not refer to a valid module or namespace in that assembly and has been ignored + Atribut AutoOpen(\"{0}\") v sestavení {1} neodkazoval na platný modul nebo obor názvů v tomto sestavení a ignoroval se. + + + + Undefined value '{0}' + Nedefinovaná hodnota {0} + + + + Label {0} not found + Popisek {0} se nenašel. + + + + Incorrect number of type arguments to local call + Nesprávný počet argumentů typu pro místní volání + + + + Dynamic invocation of {0} is not supported + Dynamické vyvolání {0} se nepodporuje. + + + + Taking the address of a literal field is invalid + Přebírání adresy pole literálu je neplatné. + + + + This operation involves taking the address of a value '{0}' represented using a local variable or other special representation. This is invalid. + Tato operace zahrnuje převzetí adresy hodnoty {0} vyjádřené pomocí lokální proměnné nebo jiného speciálního způsobu vyjádření. Tato akce je neplatná. + + + + Custom marshallers cannot be specified in F# code. Consider using a C# helper function. + V kódu F# se nedají zadat vlastní marshallery. Zvažte použití pomocné funkce v C#. + + + + The MarshalAs attribute could not be decoded + Atribut MarshalAs se nedal dekódovat. + + + + The signature for this external function contains type parameters. Constrain the argument and return types to indicate the types of the corresponding C function. + Signatura pro tuto externí funkci obsahuje parametry typu. Omezte argument a návratové typy tak, aby zahrnovaly typy odpovídající funkce C. + + + + The DllImport attribute could not be decoded + Atribut DllImport se nedal dekódovat. + + + + Literal fields cannot be set + Pole literálů se nedají nastavit. + + + + GenSetStorage: {0} was represented as a static method but was not an appropriate lambda expression + GenSetStorage: metoda {0} byla vyjádřená jako statická, ale není to odpovídající výraz lambda. + + + + Mutable variables cannot escape their method + Měnitelné proměnné nemůžou opustit svoji metodu. + + + + Compiler error: unexpected unrealized value + Chyba kompilátoru: neočekávaná nerealizovaná hodnota + + + + Main module of program is empty: nothing will happen when it is run + Hlavní modul programu je prázdný: při jeho spuštění se nic nestane. + + + + This type cannot be used for a literal field + Tento typ se pro pole literálu použít nedá. + + + + Unexpected GetSet annotation on a property + Neočekávaná poznámka GetSet u vlastnosti + + + + The FieldOffset attribute could not be decoded + Atribut FieldOffset se nedal dekódovat. + + + + The StructLayout attribute could not be decoded + Atribut StructLayout se nedal dekódovat. + + + + The DefaultAugmentation attribute could not be decoded + Atribut DefaultAugmentation se nedal dekódovat. + + + + Reflected definitions cannot contain uses of the prefix splice operator '%' + Reflektované definice nemůžou obsahovat použití operátoru spojení předpon %. + + + + Problem with codepage '{0}': {1} + Problém se znakovou stránkou {0}: {1} + + + + Copyright (c) Microsoft Corporation. All Rights Reserved. + Copyright (c) Microsoft Corporation. Všechna práva vyhrazena. + + + + Freely distributed under the MIT Open Source License. https://github.com/Microsoft/visualfsharp/blob/master/License.txt + Volně distribuováno v rámci licence MIT Open Source. https://github.com/Microsoft/visualfsharp/blob/master/License.txt + + + + Name of the output file (Short form: -o) + Název výstupního souboru (krátký tvar: -o) + + + + Build a console executable + Vytvoří spustitelný soubor konzoly. + + + + Build a Windows executable + Vytvoří spustitelný soubor systému Windows. + + + + Build a library (Short form: -a) + Vytvoří knihovnu (krátký tvar: -a). + + + + Build a module that can be added to another assembly + Vytvoří modul, který se dá přidat do jiného sestavení + + + + Delay-sign the assembly using only the public portion of the strong name key + Vytvoří zpožděný podpis sestavení jenom s využitím veřejné části klíče silného názvu. + + + + Public-sign the assembly using only the public portion of the strong name key, and mark the assembly as signed + Vytvoří veřejný podpis sestavení jenom s využitím veřejné části klíče silného názvu a označí sestavení jako podepsané. + + + + Write the xmldoc of the assembly to the given file + Zapsat xmldoc sestavení do daného souboru + + + + Specify a strong name key file + Určuje soubor klíče se silným názvem. + + + + Specify a strong name key container + Určuje kontejner klíče se silným názvem. + + + + Limit which platforms this code can run on: x86, Itanium, x64, anycpu32bitpreferred, or anycpu. The default is anycpu. + Omezuje platformy, na kterých je možné tento kód spustit: x86, Itanium, x64, anycpu32bitpreferred a anycpu. Výchozí je anycpu. + + + + Only include optimization information essential for implementing inlined constructs. Inhibits cross-module inlining but improves binary compatibility. + Zahrňte jenom informace o optimalizaci nutné k implementaci vložených konstruktorů. Deaktivuje se vkládání napříč moduly, ale zlepší se kompatibilita binárních souborů. + + + + Don't add a resource to the generated assembly containing F#-specific metadata + Nepřidávat prostředek do generovaného sestavení, které obsahuje metadata specifická pro F# + + + + Print the inferred interface of the assembly to a file + Vytisknout odvozené rozhraní sestavení do souboru + + + + Reference an assembly (Short form: -r) + Odkazovat na sestavení (krátký tvar: -r) + + + + Specify a Win32 resource file (.res) + Určuje soubor prostředků Win32 (.res). + + + + Specify a Win32 manifest file + Zadat soubor manifestu Win32 + + + + Do not include the default Win32 manifest + Nezahrnovat výchozí manifest Win32 + + + + Embed all source files in the portable PDB file + Vložit všechny zdrojové soubory do souboru PDB typu Portable + + + + Embed specific source files in the portable PDB file + Vloží konkrétní zdrojové soubory do přenosného souboru PDB. + + + + Source link information file to embed in the portable PDB file + Informační soubor zdrojového odkazu, který se má vložit do souboru PDB typu Portable + + + + --embed switch only supported when emitting a Portable PDB (--debug:portable or --debug:embedded) + Přepínač --embed se podporuje jenom při generování souboru PDB typu Portable (--debug:portable nebo --debug:embedded). + + + + --sourcelink switch only supported when emitting a Portable PDB (--debug:portable or --debug:embedded) + Přepínač --sourcelink se podporuje jenom při generování souboru PDB typu Portable (--debug:portable nebo --debug:embedded). + + + + Source file is too large to embed in a portable PDB + Zdrojový soubor je příliš velký pro vložený do souboru PDB typu Portable. + + + + Embed the specified managed resource + Vložit zadaný spravovaný prostředek + + + + Link the specified resource to this assembly where the resinfo format is <file>[,<string name>[,public|private]] + Propojí zadaný prostředek s tímto sestavením, kde formát resinfo je <soubor>[,<název řetězce>[,public|private]]. + + + + Emit debug information (Short form: -g) + Generuje ladicí informace (krátký tvar: -g). + + + + Specify debugging type: full, portable, embedded, pdbonly. ('{0}' is the default if no debuggging type specified and enables attaching a debugger to a running program, 'portable' is a cross-platform format, 'embedded' is a cross-platform format embedded into the output file). + Zadejte typ ladění: full, portable, embedded, pdbonly. ({0} je výchozí hodnota v případě, že není zadaný žádný typ ladění, a umožňuje připojení ladicího programu ke spuštěnému programu, portable je formát pro různé platformy, embedded je formát pro různé platformy vložený do výstupního souboru). + + + + Enable optimizations (Short form: -O) + Povolit optimalizace (krátký tvar: -O) + + + + Enable or disable tailcalls + Zapnout nebo vypnout volání funkce Tail + + + + Produce a deterministic assembly (including module version GUID and timestamp) + Vytvoří deterministické sestavení (včetně GUID verze modulu a časového razítka). + + + + Enable or disable cross-module optimizations + Povoluje nebo zakazuje optimalizaci mezi moduly. + + + + Report all warnings as errors + Oznamovat všechna upozornění jako chyby + + + + Report specific warnings as errors + Oznamovat konkrétní upozornění jako chyby + + + + Set a warning level (0-5) + Nastavit úroveň pro upozornění (0–5) + + + + Disable specific warning messages + Zakázat specifická upozornění + + + + Enable specific warnings that may be off by default + Povolit specifická upozornění, která můžou být ve výchozím nastavení vypnutá + + + + Generate overflow checks + Generovat kontroly přetečení + + + + Define conditional compilation symbols (Short form: -d) + Definuje symboly podmíněné kompilace (krátký tvar: -d). + + + + Ignore ML compatibility warnings + Ignoruje upozornění na kompatibilitu s ML. + + + + + Display this usage message (Short form: -?) + Zobrazí tuto zprávu o použití (krátký tvar: -?). + + + + Read response file for more options + Další možnosti najdete v souboru odpovědi. + + + + Specify the codepage used to read source files + Určuje znakovou stránku, která se používá ke čtení zdrojových souborů. + + + + Output messages in UTF-8 encoding + Výstupní zprávy v kódování UTF-8 + + + + Output messages with fully qualified paths + Výstupní zprávy s plně kvalifikovanou cestou + + + + Specify a directory for the include path which is used to resolve source files and assemblies (Short form: -I) + Určuje adresář pro cestu vložených souborů, který se použije k překladu zdrojových souborů a sestavení (krátký tvar: -I). + + + + Base address for the library to be built + Základní adresa knihovny, která se má vytvořit + + + + Do not reference the default CLI assemblies by default + Neodkazovat ve výchozím nastavení na výchozí sestavení CLI + + + + Statically link the F# library and all referenced DLLs that depend on it into the assembly being generated + Staticky propojit knihovnu F# a všechny odkazované knihovny DLL, které jsou na ní závislé, do právě generovaného sestavení + + + + Statically link the given assembly and all referenced DLLs that depend on this assembly. Use an assembly name e.g. mylib, not a DLL name. + Staticky propojit zadané sestavení a všechny odkazované knihovny DLL, které jsou na tomto sestavení závislé. Použít název sestavení, třeba mylib, ne název knihovny DLL + + + + Use a resident background compilation service to improve compiler startup times. + Použít rezidentní službu kompilace na pozadí ke zlepšení časů spuštění kompilátoru + + + + Name the output debug file + Pojmenovat výstupní ladicí soubor + + + + Resolve assembly references using directory-based rules rather than MSBuild resolution + Přeložit odkazy na sestavení pomocí pravidel založených na adresáři, ne pomocí MSBuild + + + + Unrecognized target '{0}', expected 'exe', 'winexe', 'library' or 'module' + Nerozpoznaný cíl {0}. Očekávané jsou exe, winexe, library nebo module. + + + + Unrecognized debug type '{0}', expected 'pdbonly' or 'full' + Nerozpoznaný typ ladění {0}. Očekávané typy jsou pdbonly nebo full. + + + + Invalid warning level '{0}' + Neplatná úroveň pro upozornění {0} + + + + Short form of '{0}' + Krátký tvar pro {0} + + + + The command-line option '--cliroot' has been deprecated. Use an explicit reference to a specific copy of mscorlib.dll instead. + Možnost příkazového řádku --cliroot je zastaralá. Použijte místo ní explicitní odkaz na specifickou kopii knihovny mscorlib.dll. + + + + Use to override where the compiler looks for mscorlib.dll and framework components + Používá se k přepsání umístění, kde kompilátor hledá knihovnu mscorlib.dll a komponenty rozhraní. + + + + - OUTPUT FILES - + - VÝSTUPNÍ SOUBORY - + + + + - INPUT FILES - + - VSTUPNÍ SOUBORY - + + + + - RESOURCES - + - PROSTŘEDKY - + + + + - CODE GENERATION - + - GENEROVÁNÍ KÓDU - + + + + - ADVANCED - + - UPŘESNIT - + + + + - MISCELLANEOUS - + - RŮZNÉ - + + + + - LANGUAGE - + - JAZYK - + + + + - ERRORS AND WARNINGS - + - CHYBY A UPOZORNĚNÍ - + + + + Unknown --test argument: '{0}' + Neznámý argument --test: {0} + + + + Unrecognized platform '{0}', valid values are 'x86', 'x64', 'Itanium', 'anycpu32bitpreferred', and 'anycpu' + Nerozpoznaná platforma {0}. Platné hodnoty jsou x86, x64, Itanium, anycpu32bitpreferred a anycpu. + + + + The command-line option '{0}' is for test purposes only + Možnost příkazového řádku {0} je určená jenom pro testovací účely. + + + + The command-line option '{0}' has been deprecated + Možnost příkazového řádku {0} je zastaralá. + + + + The command-line option '{0}' has been deprecated. Use '{1}' instead. + Možnost příkazového řádku {0} je zastaralá. Použijte místo ní {1}. + + + + The command-line option '{0}' has been deprecated. HTML document generation is now part of the F# Power Pack, via the tool FsHtmlDoc.exe. + Možnost příkazového řádku {0} je zastaralá. Generování dokumentu HTML je teď součástí knihovny F# Power Pack a je přístupné prostřednictvím nástroje FsHtmlDoc.exe. + + + + Output warning and error messages in color + Barevně rozlišená upozornění výstupu a chybové zprávy + + + + Enable high-entropy ASLR + Povolit technologii ASLR s vysokou entropií + + + + Specify subsystem version of this assembly + Zadejte verzi subsystému tohoto sestavení. + + + + Specify target framework profile of this assembly. Valid values are mscorlib, netcore or netstandard. Default - mscorlib + Zadejte profil cílového rozhraní tohoto sestavení. Platné hodnoty jsou mscorlib, netcore nebo netstandard. Výchozí je mscorlib. + + + + Emit debug information in quotations + Generovat ladicí informace v uvozovkách + + + + Specify the preferred output language culture name (e.g. es-ES, ja-JP) + Zadejte preferovaný název jazykové verze (např. es-ES, ja-JP). + + + + Don't copy FSharp.Core.dll along the produced binaries + Nekopírujte FSharp.Core.dll k vytvářeným binárním souborům. + + + + Invalid version '{0}' for '--subsystemversion'. The version must be 4.00 or greater. + Neplatná verze {0} pro --subsystemversion. Správná verze je 4.00 nebo vyšší. + + + + Invalid value '{0}' for '--targetprofile', valid values are 'mscorlib', 'netcore' or 'netstandard'. + Neplatná hodnota {0} pro --targetprofile. Platné hodnoty jsou mscorlib, netcore nebo netstandard. + + + + Full name + Úplný název + + + + and {0} other overloads + a další přetížení ({0}) + + + + union case + případ typu union + + + + active pattern result + výsledek aktivního vzoru + + + + active recognizer + aktivní rozlišovač + + + + field + pole + + + + event + událost + + + + property + vlastnost + + + + extension + rozšíření + + + + custom operation + vlastní operace + + + + argument + argument + + + + patvar + proměnná vzoru + + + + namespace + obor názvů + + + + module + modul + + + + namespace/module + obor názvů nebo modul + + + + from {0} + z: {0} + + + + also from {0} + taky z: {0} + + + + generated property + generovaná vlastnost + + + + generated type + generovaný typ + + + + Found by AssemblyFolders registry key + Nalezené klíčem registru AssemblyFolders + + + + Found by AssemblyFoldersEx registry key + Nalezené klíčem registru AssemblyFoldersEx + + + + .NET Framework + .NET Framework + + + + Global Assembly Cache + Globální mezipaměť sestavení + + + + Recursive class hierarchy in type '{0}' + Rekurzivní hierarchie tříd u typu {0} + + + + Invalid recursive reference to an abstract slot + Neplatný rekurzivní odkaz na abstraktní datovou oblast + + + + The event '{0}' has a non-standard type. If this event is declared in another CLI language, you may need to access this event using the explicit {1} and {2} methods for the event. If this event is declared in F#, make the type of the event an instantiation of either 'IDelegateEvent<_>' or 'IEvent<_,_>'. + Událost {0} je nestandardního typu. Pokud je tato událost deklarovaná v jiném jazyce CLI, bude možná potřeba k této události přistoupit pomocí jejích explicitních metod {1} a {2}. Pokud je tato událost deklarovaná v jazyce F#, vytvořte její typ jako instanci buď IDelegateEvent<_>, nebo IEvent<_,_>. + + + + The type '{0}' is not accessible from this code location + Typ {0} není z tohoto místa v kódu dostupný. + + + + The union cases or fields of the type '{0}' are not accessible from this code location + Případy typu union nebo pole typu {0} nejsou z tohoto místa v kódu dostupné. + + + + The value '{0}' is not accessible from this code location + Hodnota {0} není z tohoto místa v kódu dostupná. + + + + The union case '{0}' is not accessible from this code location + Případ typu union {0} není z tohoto místa v kódu dostupný. + + + + The record, struct or class field '{0}' is not accessible from this code location + Pole záznamu, struktury nebo třídy {0} není z tohoto místa v kódu dostupné. + + + + The struct or class field '{0}' is not accessible from this code location + Pole struktury nebo třídy {0} není na tomto místě v kódu dostupné. + + + + This construct is experimental + Tento konstruktor je experimentální. + + + + No Invoke methods found for delegate type + Pro typ delegáta se nenašly žádné metody Invoke. + + + + More than one Invoke method found for delegate type + Pro typ delegáta se našla víc než jedna metoda Invoke. + + + + Delegates are not allowed to have curried signatures + Delegáti nemůžou mít curryfikované signatury. + + + + Unexpected Expr.TyChoose + Neočekávaný výraz Expr.TyChoose + + + + Note: Lambda-lifting optimizations have not been applied because of the use of this local constrained generic function as a first class value. Adding type constraints may resolve this condition. + Poznámka: Optimalizace rozšiřující výraz lambda se kvůli použití této lokálně omezené obecné funkce jako hodnoty první třídy nepoužily. Tuto podmínku můžete ošetřit přidáním omezení typu. + + + + Identifiers containing '@' are reserved for use in F# code generation + Identifikátory obsahující znak @ jsou vyhrazené pro použití při generování kódu F#. + + + + The identifier '{0}' is reserved for future use by F# + Identifikátor {0} je vyhrazený pro budoucí použití v jazyce F#. + + + + Missing variable '{0}' + Chybějící proměnná {0} + + + + Partial active patterns may only generate one result + Částečné aktivní vzory můžou generovat jenom jeden výsledek. + + + + The type '{0}' is required here and is unavailable. You must add a reference to assembly '{1}'. + Tady se vyžaduje typ {0}, který ale není dostupný. Je potřeba přidat odkaz na sestavení {1}. + + + + A reference to the type '{0}' in assembly '{1}' was found, but the type could not be found in that assembly + Odkaz na typ {0} se v sestavení {1} našel, ale tento typ se v něm najít nepovedlo. + + + + Internal error or badly formed metadata: not enough type parameters were in scope while importing + Vnitřní chyba nebo chybně vytvořená metadata: při importu byl v rozsahu nedostatečný počet parametrů typu. + + + + A reference to the DLL {0} is required by assembly {1}. The imported type {2} is located in the first assembly and could not be resolved. + Sestavení {1} vyžaduje odkaz na knihovnu DLL {0}. Importovaný typ {2} se nachází v prvním sestavení a nedal se přeložit. + + + + An imported assembly uses the type '{0}' but that type is not public + Importované sestavení používá typ {0}, který ale není veřejný. + + + + The value '{0}' was marked inline but its implementation makes use of an internal or private function which is not sufficiently accessible + Hodnota {0} má označení inline, ale její implementace využívá interní nebo privátní funkci, ke které není dostatečný přístup. + + + + The value '{0}' was marked inline but was not bound in the optimization environment + Hodnota {0} má označení inline, ale není svázaná s prostředím optimalizace. + + + + Local value {0} not found during optimization + Lokální hodnota {0} se během optimalizace nenašla. + + + + A value marked as 'inline' has an unexpected value + Hodnota s označením inline má neočekávanou hodnotu. + + + + A value marked as 'inline' could not be inlined + Hodnota s označením inline se nedá vložit. + + + + Failed to inline the value '{0}' marked 'inline', perhaps because a recursive value was marked 'inline' + Nepovedlo se vložit hodnotu {0} s označením inline: možná proto, že jste jako inline označili rekurzivní hodnotu. + + + + Recursive ValValue {0} + Rekurzivní hodnota ValValue {0} + + + + The indentation of this 'in' token is incorrect with respect to the corresponding 'let' + Odsazení tohoto tokenu in není ve vztahu k odpovídající klauzuli let správné. + + + + Possible incorrect indentation: this token is offside of context started at position {0}. Try indenting this token further or using standard formatting conventions. + Je možné, že máte nesprávné odsazení: tento token leží mimo odsazení kontextu, který začíná na pozici {0}. Zkuste tento token odsadit víc nebo použijte standardní konvence formátování. + + + + The '|' tokens separating rules of this pattern match are misaligned by one column. Consider realigning your code or using further indentation. + Tokeny | oddělující pravidla tohoto porovnávacího vzoru nejsou zarovnané o jeden sloupec. Zvažte úpravu zarovnání kódu nebo použití většího odsazení. + + + + Invalid module/expression/type + Neplatný modul/výraz/typ + + + + Multiple types exist called '{0}', taking different numbers of generic parameters. Provide a type instantiation to disambiguate the type resolution, e.g. '{1}'. + Existuje víc typů s názvem {0}, které přebírají různý počet obecných parametrů. Pro jednoznačné rozlišení typu vytvořte instanci typu, třeba {1}. + + + + The instantiation of the generic type '{0}' is missing and can't be inferred from the arguments or return type of this member. Consider providing a type instantiation when accessing this type, e.g. '{1}'. + Instance obecného typu {0} chybí a nedá se ani odvodit od argumentů nebo návratového typu tohoto člena. Zvažte vytvoření instance typu při přístupu k tomuto typu, třeba {1}. + + + + 'global' may only be used as the first name in a qualified path + Výraz global se dá použít jenom jako první název v kvalifikované cestě. + + + + This is not a constructor or literal, or a constructor is being used incorrectly + Toto není konstruktor nebo literál, anebo se konstruktor používá nesprávně. + + + + Unexpected empty long identifier + Neočekávaný prázdný dlouhý identifikátor + + + + The record type '{0}' does not contain a label '{1}'. + Typ záznamu {0} neobsahuje popisek {1}. + + + + Invalid field label + Neplatný popisek pole + + + + Invalid expression '{0}' + Neplatný výraz {0} + + + + No constructors are available for the type '{0}' + Pro typ {0} nejsou k dispozici žádné konstruktory. + + + + The union type for union case '{0}' was defined with the RequireQualifiedAccessAttribute. Include the name of the union type ('{1}') in the name you are using. + Typ sjednocení pro případ sjednocení {0} se definoval pomocí atributu RequireQualifiedAccessAttribute. Do jména, které používáte, přidejte název typu sjednocení ({1}). + + + + The record type for the record field '{0}' was defined with the RequireQualifiedAccessAttribute. Include the name of the record type ('{1}') in the name you are using. + Typ záznamu pro pole záznamu {0} se definoval pomocí atributu RequireQualifiedAccessAttribute. Do jména, které používáte, přidejte název typu záznamu ({1}). + + + + Unexpected error creating debug information file '{0}' + Při vytváření souboru ladicích informací {0} došlo k neočekávané chybě. + + + + This number is outside the allowable range for this integer type + Toto číslo je mimo povolený rozsah pro tento celočíselný typ. + + + + '{0}' is not permitted as a character in operator names and is reserved for future use + Znak {0} není v názvech operátorů povolený: je vyhrazený pro budoucí použití. + + + + Unexpected character '{0}' + Neočekávaný znak {0} + + + + This byte array literal contains characters that do not encode as a single byte + Tento literál bajtového pole obsahuje znaky, které se nekódují jako jednobajtové. + + + + Identifiers followed by '{0}' are reserved for future use + Identifikátory, po kterých následuje {0}, jsou vyhrazené pro budoucí použití. + + + + This number is outside the allowable range for 8-bit signed integers + Toto číslo je mimo povolený rozsah pro 8bitová celá čísla se znaménkem. + + + + This number is outside the allowable range for hexadecimal 8-bit signed integers + Toto číslo je mimo povolený rozsah pro šestnáctková 8bitová celá čísla se znaménkem. + + + + This number is outside the allowable range for 8-bit unsigned integers + Toto číslo je mimo povolený rozsah pro 8bitová celá čísla bez znaménka. + + + + This number is outside the allowable range for 16-bit signed integers + Toto číslo je mimo povolený rozsah pro 16bitová celá čísla se znaménkem. + + + + This number is outside the allowable range for 16-bit unsigned integers + Toto číslo je mimo povolený rozsah pro 16bitová celá čísla bez znaménka. + + + + This number is outside the allowable range for 32-bit signed integers + Toto číslo je mimo povolený rozsah pro 32bitová celá čísla se znaménkem. + + + + This number is outside the allowable range for 32-bit unsigned integers + Toto číslo je mimo povolený rozsah pro 32bitová celá čísla bez znaménka. + + + + This number is outside the allowable range for 64-bit signed integers + Toto číslo je mimo povolený rozsah pro 64bitová celá čísla se znaménkem. + + + + This number is outside the allowable range for 64-bit unsigned integers + Toto číslo je mimo povolený rozsah pro 64bitová celá čísla bez znaménka. + + + + This number is outside the allowable range for signed native integers + Toto číslo je mimo povolený rozsah pro nativní celá čísla se znaménkem. + + + + This number is outside the allowable range for unsigned native integers + Toto číslo je mimo povolený rozsah pro nativní celá čísla bez znaménka. + + + + Invalid floating point number + Neplatné číslo s plovoucí desetinnou čárkou + + + + This number is outside the allowable range for decimal literals + Toto číslo je mimo povolený rozsah pro desítkové literály. + + + + This number is outside the allowable range for 32-bit floats + Toto číslo je mimo povolený rozsah pro 32bitové číslo s plovoucí desetinnou čárkou. + + + + This is not a valid numeric literal. Valid numeric literals include 1, 0x1, 0b0001 (int), 1u (uint32), 1L (int64), 1UL (uint64), 1s (int16), 1y (sbyte), 1uy (byte), 1.0 (float), 1.0f (float32), 1.0m (decimal), 1I (BigInteger). + Toto není platný číselný literál. Mezi platné číselné literály patří 1, 0x1, 0b0001 (int), 1u (uint32), 1L (int64), 1UL (uint64), 1s (int16), 1y (sbyte), 1uy (byte), 1.0 (float), 1.0f (float32), 1.0m (decimal), 1I (BigInteger). + + + + This is not a valid byte literal + Toto není platný bajtový literál. + + + + This is not a valid character literal + Toto není platný znakový literál. + + + + This Unicode encoding is only valid in string literals + Toto kódování Unicode je platné jenom u řetězcových literálů. + + + + This token is reserved for future use + Tento token je vyhrazený pro budoucí použití. + + + + TABs are not allowed in F# code unless the #indent \"off\" option is used + Výraz tabulátoru není v kódu F# povolený, pokud se nepoužije možnost #indent \"off\". + + + + Invalid line number: '{0}' + Neplatné číslo řádku: {0} + + + + #if directive must appear as the first non-whitespace character on a line + Direktiva #if musí být uvedená jako první neprázdný znak na řádku. + + + + #else has no matching #if + Direktivě #else neodpovídá žádná direktiva #if. + + + + #endif required for #else + Pro direktivu #else se vyžaduje direktiva #endif. + + + + #else directive must appear as the first non-whitespace character on a line + Direktiva #else musí být uvedená jako první neprázdný znak na řádku. + + + + #endif has no matching #if + Direktivě #endif neodpovídá žádná direktiva #if. + + + + #endif directive must appear as the first non-whitespace character on a line + Direktiva #endif musí být uvedená jako první neprázdný znak na řádku. + + + + #if directive should be immediately followed by an identifier + Za direktivou #if by měl bezprostředně následovat identifikátor. + + + + Syntax error. Wrong nested #endif, unexpected tokens before it. + Chyba syntaxe. Chybně vnořená direktiva #endif. Před výrazem it jsou neočekávané tokeny. + + + + #! may only appear as the first line at the start of a file. + #! by se mělo objevit jenom jako první řádek na začátku souboru. + + + + Expected single line comment or end of line + Očekával se jednořádkový komentář nebo konec řádku. + + + + Infix operator member '{0}' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ... + Člen operátoru vpony {0} nemá žádné argumenty. Očekávala se řazená kolekce členů se dvěma argumenty, třeba statický člen (+) (x,y) = ... + + + + Infix operator member '{0}' has {1} initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ... + Člen operátoru vpony {0} má počáteční argumenty v počtu {1}. Očekávala se řazená kolekce členů se dvěma argumenty, třeba statický člen (+) (x,y) = ... + + + + Infix operator member '{0}' has extra curried arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ... + Člen operátoru vpony {0} má curryfikované argumenty navíc. Očekávala se řazená kolekce členů se dvěma argumenty, třeba statický člen (+) (x,y) = ... + + + + All record, union and struct types in FSharp.Core.dll must be explicitly labelled with 'StructuralComparison' or 'NoComparison' + Všechny typy záznam, sjednocení a struktura v knihovně FSharp.Core.dll musí mít explicitní označení StructuralComparison nebo NoComparison. + + + + The struct, record or union type '{0}' has the 'StructuralComparison' attribute but the type parameter '{1}' does not satisfy the 'comparison' constraint. Consider adding the 'comparison' constraint to the type parameter + Typ struktura, záznam nebo sjednocení {0} má atribut StructuralComparison, ale parametr typu {1} nevyhovuje omezení comparison. Zvažte možnost přidat k parametru typu omezení comparison. + + + + The struct, record or union type '{0}' has the 'StructuralComparison' attribute but the component type '{1}' does not satisfy the 'comparison' constraint + Typ struktura, záznam nebo sjednocení {0} má atribut StructuralComparison, ale typ komponenty {1} nevyhovuje omezení comparison. + + + + The struct, record or union type '{0}' is not structurally comparable because the type parameter {1} does not satisfy the 'comparison' constraint. Consider adding the 'NoComparison' attribute to the type '{2}' to clarify that the type is not comparable + Typ struktura, záznam nebo sjednocení {0} se nedá strukturálně porovnávat, protože parametr typu {1} nevyhovuje omezení comparison. Zvažte možnost přidat k typu {2} atribut NoComparisonto: tak bude jasné, že se typ nedá porovnávat. + + + + The struct, record or union type '{0}' is not structurally comparable because the type '{1}' does not satisfy the 'comparison' constraint. Consider adding the 'NoComparison' attribute to the type '{2}' to clarify that the type is not comparable + Typ struktura, záznam nebo sjednocení {0} se nedá strukturálně porovnávat, protože typ {1} nevyhovuje omezení comparison. Zvažte možnost přidat k typu {2} atribut NoComparisonto: tak bude jasné, že se typ nedá porovnávat. + + + + The struct, record or union type '{0}' does not support structural equality because the type parameter {1} does not satisfy the 'equality' constraint. Consider adding the 'NoEquality' attribute to the type '{2}' to clarify that the type does not support structural equality + Typ struktura, záznam nebo sjednocení {0} nepodporuje strukturální rovnost, protože parametr typu {1} nevyhovuje omezení equality. Zvažte možnost přidat k typu {2} atribut NoEquality: tak bude jasné, že typ nepodporuje strukturální rovnost. + + + + The struct, record or union type '{0}' does not support structural equality because the type '{1}' does not satisfy the 'equality' constraint. Consider adding the 'NoEquality' attribute to the type '{2}' to clarify that the type does not support structural equality + Typ struktura, záznam nebo sjednocení {0} nepodporuje strukturální rovnost, protože typ {1} nevyhovuje omezení equality. Zvažte možnost přidat k typu {2} atribut NoEquality: tak bude jasné, že typ nepodporuje strukturální rovnost. + + + + The struct, record or union type '{0}' has the 'StructuralEquality' attribute but the type parameter '{1}' does not satisfy the 'equality' constraint. Consider adding the 'equality' constraint to the type parameter + Typ struktura, záznam nebo sjednocení {0} má atribut StructuralEquality, ale parametr typu {1} nevyhovuje omezení equality. Zvažte možnost přidat k parametru typu omezení equality. + + + + The struct, record or union type '{0}' has the 'StructuralEquality' attribute but the component type '{1}' does not satisfy the 'equality' constraint + Typ struktura, záznam nebo sjednocení {0} má atribut StructuralEquality, ale typ komponenty {1} nevyhovuje omezení equality. + + + + Each argument of the primary constructor for a struct must be given a type, for example 'type S(x1:int, x2: int) = ...'. These arguments determine the fields of the struct. + Všem argumentům primárního konstruktoru pro strukturu se musí předávat typ, třeba pomocí notace type S(x1:int, x2: int) = ... Tyto argumenty určují pole struktury. + + + + The value '{0}' is unused + Hodnota {0} se nepoužívá. + + + + The recursive object reference '{0}' is unused. The presence of a recursive object reference adds runtime initialization checks to members in this and derived types. Consider removing this recursive object reference. + Rekurzivní odkaz na objekt {0} se nepoužívá. Přítomnost rekurzivního odkazu na objekt přidává ke členům tohoto a odvozených typů kontroly inicializace za běhu. Zvažte odebrání tohoto rekurzivního odkazu na objekt. + + + + A getter property may have at most one argument group + Vlastnost getter může mít maximálně jednu skupinu argumentů. + + + + A setter property may have at most two argument groups + Vlastnost setter může mít maximálně dvě skupiny argumentů. + + + + Invalid property getter or setter + Neplatná metoda getter nebo setter vlastnosti + + + + An indexer property must be given at least one argument + Vlastnosti indexeru se musí předávat aspoň jeden argument. + + + + This operation accesses a mutable top-level value defined in another assembly in an unsupported way. The value cannot be accessed through its address. Consider copying the expression to a mutable local, e.g. 'let mutable x = ...', and if necessary assigning the value back after the completion of the operation + Tato operace přistupuje k proměnlivé hodnotě na nejvyšší úrovni definované v jiném sestavení nepodporovaným způsobem. K hodnotě se nedá přistupovat prostřednictvím její adresy. Zvažte následující postup: zkopírujte výraz do lokální proměnné, třeba let mutable x = ..., a po dokončení operace přiřaďte v případě potřeby znovu původní hodnotu. + + + + Remove spaces between the type name and type parameter, e.g. \"type C<'T>\", not type \"C <'T>\". Type parameters must be placed directly adjacent to the type name. + Parametry typu je potřeba zadat bezprostředně za název typu, třeba \"type C<'T>\", ne type \"C <'T>\". + + + + Remove spaces between the type name and type parameter, e.g. \"C<'T>\", not \"C <'T>\". Type parameters must be placed directly adjacent to the type name. + Argumenty typu je potřeba zadat bezprostředně za název typu, třeba \"C<'T>\", ne \"C <'T>\". + + + + The use of the type syntax 'int C' and 'C <int>' is not permitted here. Consider adjusting this type to be written in the form 'C<int>' + Použití syntaxe typu int C nebo C <int> tady není povolené. Zvažte zapsání tohoto typu v podobě C<int>. + + + + The module/namespace '{0}' from compilation unit '{1}' did not contain the module/namespace '{2}' + Modul nebo obor názvů {0} z kompilační jednotky {1} neobsahoval modul nebo obor názvů {2}. + + + + The module/namespace '{0}' from compilation unit '{1}' did not contain the val '{2}' + Modul nebo obor názvů {0} z kompilační jednotky {1} neobsahoval hodnotu {2}. + + + + The module/namespace '{0}' from compilation unit '{1}' did not contain the namespace, module or type '{2}' + Modul nebo obor názvů {0} z kompilační jednotky {1} neobsahoval obor názvů, modul nebo typ {2}. + + + + The 'UseNullAsTrueValue' attribute flag may only be used with union types that have one nullary case and at least one non-nullary case + Příznak atributu UseNullAsTrueValue se dá použít jenom s typy sjednocení, které mají jeden prázdný případ a aspoň jeden neprázdný případ. + + + + The parameter '{0}' was inferred to have byref type. Parameters of byref type must be given an explicit type annotation, e.g. 'x1: byref<int>'. When used, a byref parameter is implicitly dereferenced. + Parametr {0} je odvozený jako parametr typu ByRef. Parametrům typu ByRef se musí předávat explicitní poznámka typu, třeba x1: byref<int>. V případě jejího použití se k parametru typu ByRef přistoupí implicitně přes ukazatel. + + + + The generic member '{0}' has been used at a non-uniform instantiation prior to this program point. Consider reordering the members so this member occurs first. Alternatively, specify the full type of the member explicitly, including argument types, return type and any additional generic parameters and constraints. + Použili jste obecný člen {0} v neuniformní instanci před tímto místem v programu. Zvažte možnost změnit pořadí členů tak, aby se tento uvedl jako první. Případně specifikujte úplný typ člena explicitně, včetně typů argumentů, návratového typu a všech dalších obecných parametrů a omezení. + + + + The attribute '{0}' appears in both the implementation and the signature, but the attribute arguments differ. Only the attribute from the signature will be included in the compiled code. + Atribut {0} se vyskytuje jak v implementaci, tak v signatuře, ale argumenty atributu se liší. Do kompilovaného kódu se zahrne jenom atribut ze signatury. + + + + Cannot call an abstract base member: '{0}' + Nejde volat abstraktní základní člen: {0}. + + + + Could not resolve the ambiguity in the use of a generic construct with an 'unmanaged' constraint at or near this position + Nepovedlo se vyřešit nejednoznačnost v použití obecného konstruktoru s omezením unmanaged na této pozici nebo blízko ní. + + + + This construct is for ML compatibility. {0}. You can disable this warning by using '--mlcompatibility' or '--nowarn:62'. + Tento konstruktor je určený pro kompatibilitu ML. {0}. Toto upozornění můžete pomocí --mlcompatibility nebo --nowarn:62 vypnout. + + + + The type '{0}' has been marked as having an Explicit layout, but the field '{1}' has not been marked with the 'FieldOffset' attribute + Typ {0} je označený jako typ s explicitním rozložením, ale u pole {1} chybí atribut FieldOffset. + + + + Interfaces inherited by other interfaces should be declared using 'inherit ...' instead of 'interface ...' + Rozhraní zděděná jinými rozhraními by se měla deklarovat pomocí inherit ... a ne pomocí interface... + + + + Invalid prefix operator + Neplatný operátor předpony + + + + Invalid operator definition. Prefix operator definitions must use a valid prefix operator name. + Neplatná definice operátora. Definice operátorů předpon musí používat platné názvy těchto operátorů. + + + + The file extensions '.ml' and '.mli' are for ML compatibility + Přípony .ml a .mli zajišťují kompatibilitu s ML. + + + + Consider using a file with extension '.ml' or '.mli' instead + Zvažte možnost použít místo toho soubor s příponou .ml nebo .mli. + + + + Active pattern '{0}' is not a function + Aktivní vzor {0} není funkce. + + + + Active pattern '{0}' 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' + Typ výsledku aktivního vzoru {0} obsahuje proměnné typu, které nejsou určené vstupem. Příčinou je obvykle chybějící zmínka o rozlišení velkých a malých písmen výsledku, třeba výraz let (|A|B|) (x:int) = A x. Dá se to opravit omezením typu, třeba použitím výrazu let (|A|B|) (x:int) : Choice<int,jednotka> = A x. + + + + The FieldOffset attribute can only be placed on members of types marked with the StructLayout(LayoutKind.Explicit) + Atribut FieldOffset jde použít jenom pro členy typů s deklarací StructLayout(LayoutKind.Explicit). + + + + Optional arguments must come at the end of the argument list, after any non-optional arguments + Nepovinné argumenty musí být uvedené na konci seznamu argumentů, tj. až po všech povinných argumentech. + + + + Attribute 'System.Diagnostics.ConditionalAttribute' is only valid on methods or attribute classes + Atribut System.Diagnostics.ConditionalAttribute je platný jenom u metod nebo tříd atributů. + + + + Extension members cannot provide operator overloads. Consider defining the operator as part of the type definition instead. + Členové rozšíření nemůžou poskytovat přetížení operátorů. Zvažte možnost definovat místo toho operátor v definici typu. + + + + The name of the MDB file must be <assembly-file-name>.mdb. The --pdb option will be ignored. + Název souboru MDB musí být <název-souboru-sestavení>.mdb. Možnost --pdb se bude ignorovat. + + + + MDB generation failed. Could not find compatible member {0} + Generování souboru MDB selhalo. Nenašel se kompatibilní člen {0}. + + + + Cannot generate MDB debug information. Failed to load the 'MonoSymbolWriter' type from the 'Mono.CompilerServices.SymbolWriter.dll' assembly. + Nedají se vygenerovat ladicí informace MDB. Načtení typu MonoSymbolWriter ze sestavení Mono.CompilerServices.SymbolWriter.dll selhalo. + + + + The union case named '{0}' conflicts with the generated type '{1}' + Případ typu union s názvem {0} koliduje s generovaným typem {1}. + + + + ReflectedDefinitionAttribute may not be applied to an instance member on a struct type, because the instance member takes an implicit 'this' byref parameter + ReflectedDefinitionAttribute se nedá použít pro člena instance u typu struktura, protože člen instance přebírá implicitní parametr this typu ByRef. + + + + DLLImport bindings must be static members in a class or function definitions in a module + Vazby DLLImport musí být statickými členy v definici třídy nebo funkce v modulu. + + + + When mscorlib.dll or FSharp.Core.dll is explicitly referenced the {0} option must also be passed + Pokud se na knihovnu mscorlib.dll nebo FSharp.Core.dll odkazuje explicitně, musí se předávat taky možnost {0}. + + + + FSharp.Core.sigdata not found alongside FSharp.Core. File expected in {0}. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required. + V FSharp.Core se nenašel soubor FSharp.Core.sigdata. Soubor se očekával v {0}. Zvažte upgrade na novější verzi FSharp.Core, kde se tento soubor už nevyžaduje. + + + + File '{0}' not found alongside FSharp.Core. File expected in {1}. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required. + U souboru FSharp.Core se nenašel soubor {0}. Soubor se očekával v {1}. Zvažte upgrade na novější verzi souboru FSharp.Core, kde se tento soubor už nevyžaduje. + + + + Filename '{0}' contains invalid character '{1}' + V názvu soboru {0} je neplatný znak {1}. + + + + 'use!' bindings must be of the form 'use! <var> = <expr>' + Vazby use! musí mít notaci use! <var> = <expr>. + + + + Inner generic functions are not permitted in quoted expressions. Consider adding some type constraints until this function is no longer generic. + Vnitřní obecné funkce nejsou ve výrazech v uvozovkách povolené. Dokud bude tato funkce obecná, zvažte přidání některých omezení typu. + + + + The type '{0}' is not a valid enumerator type , i.e. does not have a 'MoveNext()' method returning a bool, and a 'Current' property + Typ {0} není platným výčtovým typem, to znamená, že u něj chybí metoda MoveNext(), která by vracela logickou hodnotu, a vlastnost Current. + + + + End of file in triple-quote string begun at or before here + Konec souboru začal v řetězci v trojitých uvozovkách na této pozici nebo před ní. + + + + End of file in triple-quote string embedded in comment begun at or before here + Konec souboru začal v řetězci v trojitých uvozovkách vloženém do komentáře na této pozici nebo před ní. + + + + This type test or downcast will ignore the unit-of-measure '{0}' + Test tohoto typu nebo jeho přetypování směrem dolů bude ignorovat měrnou jednotku {0}. + + + + Expected type argument or static argument + Očekával se argument typu nebo statický argument. + + + + Unmatched '<'. Expected closing '>' + Nespárovaná levá závorka <. Očekává se pravá závorka >. + + + + Unexpected quotation operator '<@' in type definition. If you intend to pass a verbatim string as a static argument to a type provider, put a space between the '<' and '@' characters. + Neočekávaný operátor citace <@ v definici typu. Pokud chcete zprostředkovateli typu předávat doslovný řetězec jako statický argument, vložte mezi znaky < a @ mezeru. + + + + Attempted to parse this as an operator name, but failed + Proběhl pokus o analýzu jako názvu operátoru, ale tento pokus selhal. + + + + \U{0} is not a valid Unicode character escape sequence + \U{0} není platná znaková řídicí sekvence Unicode. + + + + '{0}' must be applied to an argument of type '{1}', but has been applied to an argument of type '{2}' + {0} se musí použít pro argument typu {1}, ale použil se pro argument typu {2}. + + + + '{0}' can only be applied to optional arguments + {0} se dá použít jenom u volitelných argumentů. + + + + The specified .NET Framework version '{0}' is not supported. Please specify a value from the enumeration Microsoft.Build.Utilities.TargetDotNetFrameworkVersion. + Zadaná verze rozhraní .NET Framework {0} není podporovaná. Zadejte hodnotu z výčtu Microsoft.Build.Utilities.TargetDotNetFrameworkVersion. + + + + Invalid Magic value in CLR Header + Neplatná hodnota Magic v záhlaví CLR + + + + Bad image format + Chybný formát image + + + + Private key expected + Očekává se privátní klíč + + + + RSA key expected + Očekává se klíč RSA + + + + Invalid bit Length + Neplatná bitová délka + + + + Invalid RSAParameters structure - '{{0}}' expected + Neplatná struktura parametru RSAParameters – očekává se {{0}} + + + + Invalid algId - 'Exponent' expected + Neplatné algId – očekává se Exponent + + + + Invalid signature size + Neplatná velikost podpisu + + + + No signature directory + Žádný adresář podpisu + + + + Invalid Public Key blob + Neplatný objekt blob veřejného klíče + + + + Exiting - too many errors + Ukončení – příliš mnoho chyb + + + + The documentation file has no .xml suffix + Soubor dokumentace nemá příponu .xml. + + + + No implementation files specified + Nezadali jste žádné implementační soubory. + + + + The attribute {0} specified version '{1}', but this value is invalid and has been ignored + Atribut {0} určoval verzi {1}, ale tato hodnota není platná a ignoruje se. + + + + Conflicting options specified: 'win32manifest' and 'win32res'. Only one of these can be used. + Zadali jste kolidující možnosti: win32manifest a win32res. Dá se použít jenom jedna z nich. + + + + The code in assembly '{0}' makes uses of quotation literals. Static linking may not include components that make use of quotation literals unless all assemblies are compiled with at least F# 4.0. + Kód v sestavení {0} využívá literály citace. Je možné, že při statickém propojování se komponenty využívající literály citace nezahrnou, pokud nejsou všechna sestavení zkompilovaná v F# ve verzi alespoň 4.0. + + + + Code in this assembly makes uses of quotation literals. Static linking may not include components that make use of quotation literals unless all assemblies are compiled with at least F# 4.0. + Kód v tomto sestavení využívá literály citace. Je možné, že při statickém propojování se komponenty využívající literály citace nezahrnou, pokud nejsou všechna sestavení zkompilovaná v F# ve verzi alespoň 4.0. + + + + Static linking may not include a .EXE + Je možné, že se při statickém propojování nezahrne soubor .exe. + + + + Static linking may not include a mixed managed/unmanaged DLL + Je možné, že se při statickém propojování nezahrne kombinovaná spravovaná nebo nespravovaná knihovna DLL. + + + + Ignoring mixed managed/unmanaged assembly '{0}' during static linking + Při statickém propojování se ignoruje kombinované spravované nebo nespravované sestavení {0}. + + + + Assembly '{0}' was referenced transitively and the assembly could not be resolved automatically. Static linking will assume this DLL has no dependencies on the F# library or other statically linked DLLs. Consider adding an explicit reference to this DLL. + Na sestavení {0} se odkazovalo přechodně a nedalo se přeložit automaticky. Statické propojování bude předpokládat, že tato knihovna DLL nemá žádné závislosti na knihovně F# nebo jiných staticky propojených knihovnách DLL. Zvažte možnost přidat explicitní odkaz na tuto knihovnu DLL. + + + + Assembly '{0}' not found in dependency set of target binary. Statically linked roots should be specified using an assembly name, without a DLL or EXE extension. If this assembly was referenced explicitly then it is possible the assembly was not actually required by the generated binary, in which case it should not be statically linked. + Sestavení {0} se v sadě závislostí cílového binárního souboru nenašlo. Staticky propojená kořenová umístění by se měla specifikovat pomocí názvu sestavení bez přípony DLL nebo EXE. Pokud se na toto sestavení odkazovalo explicitně, pak je možné, že ho generovaný binární soubor ve skutečnosti nevyžadoval, a v tom případě by se nemělo propojovat staticky. + + + + The key file '{0}' could not be opened + Soubor klíče {0} se nedal otevřít. + + + + A problem occurred writing the binary '{0}': {1} + Při zapisování binárního souboru {0} došlo k potížím: {1} + + + + The 'AssemblyVersionAttribute' has been ignored because a version was given using a command line option + Třída AssemblyVersionAttribute se ignorovala, protože jste verzi zadali pomocí možnosti příkazového řádku. + + + + Error emitting 'System.Reflection.AssemblyCultureAttribute' attribute -- 'Executables cannot be satellite assemblies, Culture should always be empty' + Chyba při generování atributu System.Reflection.AssemblyCultureAttribute: Spustitelné soubory nemůžou být satelitní sestavení. Jazyková verze by měla být vždycky prázdná. + + + + Option '--delaysign' overrides attribute 'System.Reflection.AssemblyDelaySignAttribute' given in a source file or added module + Možnost --delaysign přepisuje atribut System.Reflection.AssemblyDelaySignAttribute předaný ve zdrojovém souboru nebo přidaném modulu. + + + + Option '--keyfile' overrides attribute 'System.Reflection.AssemblyKeyFileAttribute' given in a source file or added module + Možnost --keyfile přepisuje atribut System.Reflection.AssemblyKeyFileAttribute předaný ve zdrojovém souboru nebo přidaném modulu. + + + + Option '--keycontainer' overrides attribute 'System.Reflection.AssemblyNameAttribute' given in a source file or added module + Možnost --keycontainer přepisuje atribut System.Reflection.AssemblyNameAttribute předaný ve zdrojovém souboru nebo přidaném modulu. + + + + The assembly '{0}' is listed on the command line. Assemblies should be referenced using a command line flag such as '-r'. + Sestavení {0} je uvedené na příkazovém řádku. Sestavení by se měla odkazovat pomocí příznaků příkazového řádku, jako je třeba -r. + + + + The resident compilation service was not used because a problem occured in communicating with the server. + Rezidentní kompilační služba se nepoužila, protože došlo k potížím při komunikaci se serverem. + + + + Problem with filename '{0}': Illegal characters in path. + Potíže s názvem souboru {0}: neplatné znaky v cestě + + + + Passing a .resx file ({0}) as a source file to the compiler is deprecated. Use resgen.exe to transform the .resx file into a .resources file to pass as a --resource option. If you are using MSBuild, this can be done via an <EmbeddedResource> item in the .fsproj project file. + Předávat kompilátoru soubor .resx ({0}) jako zdrojový soubor je zastaralý postup. Pomocí souboru resgen.exe převeďte soubor .resx na soubor .resources, aby se předával jako možnost --resource. Pokud používáte MSBuild, dá se to udělat prostřednictvím položky <EmbeddedResource> v souboru projektu .fsproj. + + + + Static linking may not be used on an assembly referencing mscorlib (e.g. a .NET Framework assembly) when generating an assembly that references System.Runtime (e.g. a .NET Core or Portable assembly). + Když se generuje sestavení, které se odkazuje na System.Runtime (třeba sestavení .NET Core nebo přenosné sestavení), nejde pro sestavení, které se odkazuje na knihovnu mscorlib (třeba sestavení rozhraní .NET Framework), použít statické propojování. + + + + An {0} specified version '{1}', but this value is a wildcard, and you have requested a deterministic build, these are in conflict. + Zadaná verze {0} je {1}, ale tato hodnota představuje zástupný znak a vy jste požádali o deterministické sestavení, což je v konfliktu. + + + + Determinstic builds only support portable PDBs (--debug:portable or --debug:embedded) + Deterministická sestavení podporují jenom soubory PDB typu Portable (--debug:portable nebo --debug:embedded). + + + + Character '{0}' is not allowed in provided namespace name '{1}' + Znak {0} není v názvu poskytnutého oboru názvů {1} povolený. + + + + The provided type '{0}' returned a member with a null or empty member name + Poskytnutý typ {0} vrátil člena, jehož název je prázdný nebo null. + + + + The provided type '{0}' returned a null member + Poskytnutý typ {0} vrátil člena s hodnotou null. + + + + The provided type '{0}' member info '{1}' has null declaring type + U informací o členu {1} poskytnutého typu {0} má deklarující typ hodnotu null. + + + + The provided type '{0}' has member '{1}' which has declaring type '{2}'. Expected declaring type to be the same as provided type. + Poskytnutý typ {0} má člena {1} s deklarujícím typem {2}. Očekává se, že deklarující typ bude stejný jako poskytnutý typ. + + + + Referenced assembly '{0}' has assembly level attribute '{1}' but no public type provider classes were found + Odkazované sestavení {0} má atribut {1} na úrovní sestavení, ale nenašly se žádné třídy veřejného zprostředkovatele typu. + + + + Type '{0}' from type provider '{1}' has an empty namespace. Use 'null' for the global namespace. + Typ {0} od zprostředkovatele typu {1} má prázdný obor názvů. Pro globální obor názvů použijte null. + + + + Empty namespace found from the type provider '{0}'. Use 'null' for the global namespace. + Našel se prázdný obor názvů od zprostředkovatele typu {0}. Pro globální obor názvů použijte null. + + + + Provided type '{0}' has 'IsGenericType' as true, but generic types are not supported. + Vlastnost IsGenericType poskytnutého typu {0} má hodnotu true. Obecné typy se ale nepodporují. + + + + Provided type '{0}' has 'IsArray' as true, but array types are not supported. + Vlastnost IsArray poskytnutého typu {0} má hodnotu true. Typy polí se ale nepodporují. + + + + Invalid member '{0}' on provided type '{1}'. Provided type members must be public, and not be generic, virtual, or abstract. + Neplatný člen {0} u poskytnutého typu {1}. Členové poskytnutého typu musí být veřejné,ne obecné, virtuální nebo abstraktní. + + + + Invalid member '{0}' on provided type '{1}'. Only properties, methods and constructors are allowed + Neplatný člen {0} u poskytnutého typu {1}. Povolují se jenom vlastnosti, metody a konstruktory. + + + + Property '{0}' on provided type '{1}' has CanRead=true but there was no value from GetGetMethod() + Vlastnost {0} u poskytnutého typu {1} má CanRead s hodnotou true, ale metoda GetGetMethod() nevrátila žádnou hodnotu. + + + + Property '{0}' on provided type '{1}' has CanRead=false but GetGetMethod() returned a method + Vlastnost {0} u poskytnutého typu {1} má CanRead s hodnotou false, ale metoda GetGetMethod() vrátila metodu. + + + + Property '{0}' on provided type '{1}' has CanWrite=true but there was no value from GetSetMethod() + Vlastnost {0} u poskytnutého typu {1} má CanWrite s hodnotou true, ale metoda GetSetMethod() nevrátila žádnou hodnotu. + + + + Property '{0}' on provided type '{1}' has CanWrite=false but GetSetMethod() returned a method + Vlastnost {0} u poskytnutého typu {1} má CanWrite s hodnotou false, ale metoda GetSetMethod() vrátila metodu. + + + + One or more errors seen during provided type setup + Při nastavení poskytnutého typu se vyskytla nejmíň jedna chyba. + + + + Unexpected exception from provided type '{0}' member '{1}': {2} + U poskytnutého typu {0}, člena {1} došlo k neočekávané výjimce: {2} + + + + Unsupported constant type '{0}'. Quotations provided by type providers can only contain simple constants. The implementation of the type provider may need to be adjusted by moving a value declared outside a provided quotation literal to be a 'let' binding inside the quotation literal. + Nepodporovaný typ konstanty {0}. Citace poskytované zprostředkovateli typu můžou obsahovat jenom jednoduché konstanty. Implementaci zprostředkovatele typu možná bude potřeba upravit přesunutím hodnoty deklarované mimo poskytnutý literál citace do vazby let v literálu citace. + + + + Unsupported expression '{0}' from type provider. If you are the author of this type provider, consider adjusting it to provide a different provided expression. + U zprostředkovatele typu se vyskytl neplatný výraz {0}. Pokud jste autorem tohoto zprostředkovatele typu, zvažte možnost upravit ho tak, aby poskytoval jiný poskytnutý výraz. + + + + Expected provided type named '{0}' but provided type has 'Name' with value '{1}' + Očekával se poskytnutý typ s názvem {0}, ale Name u poskytnutého typu má hodnotu {1}. + + + + Event '{0}' on provided type '{1}' has no value from GetAddMethod() + Událost {0} u poskytnutého typu {1} nepřebírá žádnou hodnotu od GetAddMethod(). + + + + Event '{0}' on provided type '{1}' has no value from GetRemoveMethod() + Událost {0} u poskytnutého typu {1} nepřebírá žádnou hodnotu od GetRemoveMethod(). + + + + Assembly attribute '{0}' refers to a designer assembly '{1}' which cannot be loaded or doesn't exist. {2} + Atribut sestavení {0} odkazuje na navržené sestavení {1}, které se nedá načíst nebo neexistuje. {2} + + + + The type provider does not have a valid constructor. A constructor taking either no arguments or one argument of type 'TypeProviderConfig' was expected. + Zprostředkovatel typu nemá platný konstruktor. Očekávaný konstruktor nemá přebírat buď žádné argumenty, nebo jeden argument typu TypeProviderConfig. + + + + The type provider '{0}' reported an error: {1} + Zprostředkovatel typu {0} oznámil chybu: {1} + + + + The type provider '{0}' used an invalid parameter in the ParameterExpression: {1} + Zprostředkovatel typu {0} použil ve výrazu ParameterExpression neplatný parametr: {1} + + + + The type provider '{0}' provided a method with a name '{1}' and metadata token '{2}', which is not reported among its methods of its declaring type '{3}' + Zprostředkovatel typu {0} poskytnul metodu s názvem {1} a tokenem metadat {2}, která není uvedená mezi metodami jeho deklarujícího typu {3}. + + + + The type provider '{0}' provided a constructor which is not reported among the constructors of its declaring type '{1}' + Zprostředkovatel typu {0} poskytnul konstruktor, který není uvedený mezi konstruktory jeho deklarujícího typu {1}. + + + + A direct reference to the generated type '{0}' is not permitted. Instead, use a type definition, e.g. 'type TypeAlias = <path>'. This indicates that a type provider adds generated types to your assembly. + Přímý odkaz na generovaný typ {0} není povolený. Místo něj použijte definici typu, třeba type TypeAlias = <cesta>. Ta označuje, že zprostředkovatel typu přidává k sestavení generované typy. + + + + Expected provided type with path '{0}' but provided type has path '{1}' + Očekával se poskytnutý typ s cestou {0}, ale cesta poskytnutého typu je {1}. + + + + Unexpected 'null' return value from provided type '{0}' member '{1}' + Poskytnutý typ {0}, člen {1} vrátil neočekávanou návratovou hodnotu null. + + + + Unexpected exception from member '{0}' of provided type '{1}' member '{2}': {3} + U člena {0} poskytnutého typu {1}, člena {2} došlo k neočekávané výjimce: {3} + + + + Nested provided types do not take static arguments or generic parameters + Vnořené poskytnuté typy nepřebírají statické argumenty ani obecné parametry. + + + + Invalid static argument to provided type. Expected an argument of kind '{0}'. + Neplatný statický argument poskytnutého typu. Očekávaný druh argumentu je {0}. + + + + An error occured applying the static arguments to a provided type + Při použití statických argumentů u poskytnutého typu došlo k chybě. + + + + Unknown static argument kind '{0}' when resolving a reference to a provided type or method '{1}' + Při překladu odkazu na poskytnutý typ nebo metodu {1} se objevil neznámý druh statického argumentu {0}. + + + + invalid namespace for provided type + Neplatný obor názvů pro poskytnutý typ + + + + invalid full name for provided type + Neplatný úplný název poskytnutého typu + + + + The type provider returned 'null', which is not a valid return value from '{0}' + Zprostředkovatel typu vrátil hodnotu null, která není platnou návratovou hodnotou {0}. + + + + The type provider constructor has thrown an exception: {0} + Konstruktor zprostředkovatele typu vyvolal výjimku: {0} + + + + Type provider '{0}' returned null from GetInvokerExpression. + Zprostředkovatel typu {0} vrátil u metody GetInvokerExpression hodnotu null. + + + + The type provider '{0}' returned an invalid type from 'ApplyStaticArguments'. A type with name '{1}' was expected, but a type with name '{2}' was returned. + Zprostředkovatel typu {0} vrátil u metody ApplyStaticArguments neplatný typ. Očekával se typ s názvem {1}, ale vrácený typ má název {2}. + + + + The type provider '{0}' returned an invalid method from 'ApplyStaticArgumentsForMethod'. A method with name '{1}' was expected, but a method with name '{2}' was returned. + Zprostředkovatel typu {0} vrátil z metody ApplyStaticArgumentsForMethod neplatnou metodu. Očekávala se metoda s názvem {1}, ale vrátila se metoda s názvem {2}. + + + + This type test or downcast will erase the provided type '{0}' to the type '{1}' + Test tohoto typu nebo jeho přetypování směrem dolů vymaže poskytnutý typ {0} na typ {1}. + + + + This downcast will erase the provided type '{0}' to the type '{1}'. + Toto přetypování směrem dolů vymaže typ {0} poskytnutý typu {1}. + + + + This type test with a provided type '{0}' is not allowed because this provided type will be erased to '{1}' at runtime. + Test tohoto typu s poskytnutým typem {0} není povolený, protože tento poskytnutý typ se při běhu vymaže na {1}. + + + + Cannot inherit from erased provided type + Nejde dědit z vymazaného poskytnutého typu. + + + + Assembly '{0}' hase TypeProviderAssembly attribute with invalid value '{1}'. The value should be a valid assembly name + Základní atribut TypeProviderAssembly sestavení {0} má neplatnou hodnotu {1}. Hodnotou by měl být platný název sestavení. + + + + Invalid member name. Members may not have name '.ctor' or '.cctor' + Neplatný název člena. Členové nemůžou mít název .ctor nebo .cctor. + + + + The function or member '{0}' is used in a way that requires further type annotations at its definition to ensure consistency of inferred types. The inferred signature is '{1}'. + Funkce nebo člen {0} se používá způsobem, který vyžaduje, aby se k jeho definici doplnily další poznámky typu. Je to kvůli zajištění konzistence odvozených typů. Odvozená signatura je {1}. + + + + The number of type arguments did not match: '{0}' given, '{1}' expected. This may be related to a previously reported error. + Počet argumentů typu se neshodoval: počet předaných je {0}, ale počet očekávaných je {1}. Může to souviset s dřív hlášenou chybou. + + + + Cannot override inherited member '{0}' because it is sealed + Zděděný člen {0} se nedá přepsat, protože je zapečetěný. + + + + The type provider '{0}' reported an error in the context of provided type '{1}', member '{2}'. The error: {3} + Zprostředkovatel typu {0} oznámil chybu v kontextu poskytnutého typu {1} a člena {2}: {3} + + + + An exception occurred when accessing the '{0}' of a provided type: {1} + Při přístupu k {0} poskytnutého typu došlo k výjimce: {1} + + + + The '{0}' of a provided type was null or empty. + Název {0} poskytnutého typu má hodnotu null nebo je prázdný. + + + + Character '{0}' is not allowed in provided type name '{1}' + Znak {0} není v názvu poskytnutého typu {1} povolený. + + + + In queries, '{0}' must use a simple pattern + V dotazech musí {0} použít jednoduchý vzor. + + + + A custom query operation for '{0}' is required but not specified + Vyžaduje se operace vlastního dotazu pro {0}, která ale není zadaná. + + + + Named static arguments must come after all unnamed static arguments + Pojmenované statické argumenty se musí umístit až za všechny nepojmenované statické argumenty. + + + + The static parameter '{0}' of the provided type or method '{1}' requires a value. Static parameters to type providers may be optionally specified using named arguments, e.g. '{2}<{3}=...>'. + Statický parametr {0} poskytnutého typu nebo metody {1} vyžaduje hodnotu. Statické parametry pro zprostředkovatele typů je případně možné zadat pomocí pojmenovaných argumentů, třeba {2}<{3}=...>. + + + + No static parameter exists with name '{0}' + Neexistuje žádný statický parametr s názvem {0}. + + + + The static parameter '{0}' has already been given a value + Statický parametr {0} už hodnotu převzal. + + + + Multiple static parameters exist with name '{0}' + Existuje víc statických parametrů s názvem {0}. + + + + A custom operation may not be used in conjunction with a non-value or recursive 'let' binding in another part of this computation expression + Vlastní operace se nedají použít ve spojení s vazbou let, která je bez hodnoty nebo rekurzivní a nachází se v jiné části tohoto výrazu výpočtu. + + + + A custom operation may not be used in conjunction with 'use', 'try/with', 'try/finally', 'if/then/else' or 'match' operators within this computation expression + Vlastní operace se ve spojení s operátory use, try/with, try/finally, if/then/else nebo match v tomto výrazu výpočtu použít nedají. + + + + The custom operation '{0}' refers to a method which is overloaded. The implementations of custom operations may not be overloaded. + Vlastní operace {0} odkazuje na metodu, která je přetěžovaná. Implementace vlastních operací se nemůžou přetěžovat. + + + + An if/then/else expression may not be used within queries. Consider using either an if/then expression, or use a sequence expression instead. + Výraz if/then/else se nedá použít v dotazech. Zvažte možnost použít místo toho výraz if/then nebo výraz pořadí. + + + + Invalid argument to 'methodhandleof' during codegen + Neplatný argument pro methodhandleof při generování kódu + + + + A reference to a provided type was missing a value for the static parameter '{0}'. You may need to recompile one or more referenced assemblies. + U odkazu na poskytnutý typ chybí hodnota pro statický parametr {0}. Možná bude potřeba znovu zkompilovat jedno nebo víc odkazovaných sestavení. + + + + A reference to a provided type had an invalid value '{0}' for a static parameter. You may need to recompile one or more referenced assemblies. + U odkazu na poskytnutý typ je hodnota {0} pro statický parametr neplatná. Možná bude potřeba znovu zkompilovat jedno nebo víc odkazovaných sestavení. + + + + '{0}' is not used correctly. This is a custom operation in this query or computation expression. + {0} se nepoužívá správně. Toto je vlastní operace v tomto výrazu dotazu nebo výpočtu. + + + + '{0}' is not used correctly. Usage: {1}. This is a custom operation in this query or computation expression. + {0} se nepoužívá správně. Použití: {1}. Toto je vlastní operace v tomto výrazu dotazu nebo výpočtu. + + + + {0} var in collection {1} (outerKey = innerKey). Note that parentheses are required after '{2}' + {0} proměnná v kolekci {1} (outerKey = innerKey). Poznámka: Za {2} se vyžadují závorky. + + + + {0} var in collection {1} (outerKey = innerKey) into group. Note that parentheses are required after '{2}' + {0} proměnná v kolekci {1} (outerKey = innerKey) do skupiny. Poznámka: Za {2} se vyžadují závorky. + + + + {0} var in collection + {0} proměnná v kolekci + + + + '{0}' must be followed by a variable name. Usage: {1}. + Po {0} musí následovat název proměnné. Použití: {1}. + + + + Incorrect syntax for '{0}'. Usage: {1}. + Neplatná syntaxe pro {0}. Použití: {1}. + + + + '{0}' must come after a 'for' selection clause and be followed by the rest of the query. Syntax: ... {1} ... + {0} se musí umístit za klauzuli výběru for a pak musí následovat zbytek dotazu. Syntaxe: ... {1} ... + + + + '{0}' is used with an incorrect number of arguments. This is a custom operation in this query or computation expression. Expected {1} argument(s), but given {2}. + {0} se používá s nesprávným počtem argumentů. Toto je vlastní operace v tomto výrazu dotazu nebo výpočtu. Očekávaný počet argumentů je {1}, ale počet předávaných je {2}. + + + + Expected an expression after this point + Za touto pozicí se očekává výraz. + + + + Expected a type after this point + Za touto pozicí se očekával typ. + + + + Unmatched '[<'. Expected closing '>]' + Nespárovaný výraz [<. Očekává se výraz >]. + + + + Unexpected end of input in 'match' expression. Expected 'match <expr> with | <pat> -> <expr> | <pat> -> <expr> ...'. + Neočekávaný konec vstupu ve výrazu match. Očekávaná notace je match <výraz> with | <cesta> -> <výraz> | <cesta> -> <výraz> + + + + Unexpected end of input in 'try' expression. Expected 'try <expr> with <rules>' or 'try <expr> finally <expr>'. + Neočekávaný konec vstupu ve výrazu try. Očekávaná notace je try <výraz> with <pravidla> nebo try <výraz> finally <výraz>. + + + + Unexpected end of input in 'while' expression. Expected 'while <expr> do <expr>'. + Neočekávaný konec vstupu ve výrazu while. Očekávaná notace je while <výraz> do <výraz>. + + + + Unexpected end of input in 'for' expression. Expected 'for <pat> in <expr> do <expr>'. + Neočekávaný konec vstupu ve výrazu for. Očekávaná notace je for <vzor> in <výraz> do <výraz>. + + + + Unexpected end of input in 'match' or 'try' expression + Neočekávaný konec vstupu ve výrazu match nebo try + + + + Unexpected end of input in 'then' branch of conditional expression. Expected 'if <expr> then <expr>' or 'if <expr> then <expr> else <expr>'. + Neočekávaný konec vstupu ve větvi then podmínky. Očekávaná notace je if <výraz> then <výraz> nebo if <výraz> then <výraz> else <výraz>. + + + + Unexpected end of input in 'else' branch of conditional expression. Expected 'if <expr> then <expr>' or 'if <expr> then <expr> else <expr>'. + Neočekávaný konec vstupu ve větvi else podmínky. Očekávaná notace je if <výraz> then <výraz> nebo if <výraz> then <výraz> else <výraz>. + + + + Unexpected end of input in body of lambda expression. Expected 'fun <pat> ... <pat> -> <expr>'. + Neočekávaný konec vstupu v těle výrazu lambda. Očekávaná notace je fun <cesta> ... <cesta> -> <výraz>. + + + + Unexpected end of input in type arguments + Neočekávaný konec vstupu v argumentech typu + + + + Unexpected end of input in type signature + Neočekávaný konec vstupu v signatuře typu + + + + Unexpected end of input in type definition + Neočekávaný konec vstupu v definici typu + + + + Unexpected end of input in object members + Neočekávaný konec vstupu u členů objektu + + + + Unexpected end of input in value, function or member definition + Neočekávaný konec vstupu v definici hodnoty, funkce nebo člena + + + + Unexpected end of input in expression + Neočekávaný konec vstupu ve výrazu + + + + Unexpected end of type. Expected a name after this point. + Neočekávaný konec typu. Za touto pozicí se očekává název. + + + + Incomplete value or function definition. If this is in an expression, the body of the expression must be indented to the same column as the 'let' keyword. + Neúplná definice hodnoty nebo funkce. Pokud je tato definice ve výrazu, musí být tělo tohoto výrazu odsazené na stejnou úroveň jako klíčové slovo let. + + + + Incomplete value definition. If this is in an expression, the body of the expression must be indented to the same column as the 'let!' keyword. + Neúplná definice hodnoty. Pokud je tato definice ve výrazu, musí být tělo tohoto výrazu odsazené na stejnou úroveň jako klíčové slovo let!. + + + + Incomplete value definition. If this is in an expression, the body of the expression must be indented to the same column as the 'use!' keyword. + Neúplná definice hodnoty. Pokud je tato definice ve výrazu, musí být tělo tohoto výrazu odsazené na stejnou úroveň jako klíčové slovo use!. + + + + Incomplete value definition. If this is in an expression, the body of the expression must be indented to the same column as the 'use' keyword. + Neúplná definice hodnoty. Pokud je tato definice ve výrazu, musí být tělo tohoto výrazu odsazené na stejnou úroveň jako klíčové slovo use. + + + + Missing 'do' in 'while' expression. Expected 'while <expr> do <expr>'. + Ve výrazu while chybí do. Očekávaná notace je while <výraz> do <výraz>. + + + + Missing 'do' in 'for' expression. Expected 'for <pat> in <expr> do <expr>'. + Ve výrazu for chybí klíčové slovo do. Očekávaná notace je for <cesta> in <výraz> do <výraz>. + + + + Invalid join relation in '{0}'. Expected 'expr <op> expr', where <op> is =, =?, ?= or ?=?. + Neplatná relace spojení v {0}. Očekávaná notace je expr <op> expr, kde <op> je =, =?, ?= nebo ?=?. + + + + Calls + Počet volání + + + + Invalid number of generic arguments to type '{0}' in provided type. Expected '{1}' arguments, given '{2}'. + Neplatný počet obecných argumentů pro typ {0} u poskytnutého typu. Očekávaný počet argumentů je: {1}, počet předaných je: {2}. + + + + Invalid value '{0}' for unit-of-measure parameter '{1}' + Neplatná hodnota {0} pro parametr měrné jednotky {1} + + + + Invalid value unit-of-measure parameter '{0}' + Neplatná hodnota parametru měrné jednotky {0} + + + + Property '{0}' on provided type '{1}' is neither readable nor writable as it has CanRead=false and CanWrite=false + Vlastnost {0} u poskytnutého typu {1} není ani čitelná ani zapisovatelná, protože má CanRead s hodnotou false a CanWrite s hodnotou false. + + + + A use of 'into' must be followed by the remainder of the computation + Za použitím into musí následovat zbytek výpočtu. + + + + The operator '{0}' does not accept the use of 'into' + Operátor {0} nepodporuje použití klíčového slova into. + + + + The definition of the custom operator '{0}' does not use a valid combination of attribute flags + Definice vlastního operátoru {0} nepoužívá platnou kombinaci příznaků atributu. + + + + This type definition may not have the 'CLIMutable' attribute. Only record types may have this attribute. + Tato definice typu nemůže mít atribut CLIMutable. Ten můžou mít jenom typy záznamu. + + + + 'member val' definitions are only permitted in types with a primary constructor. Consider adding arguments to your type definition, e.g. 'type X(args) = ...'. + Definice member val jsou povolené jenom u typů s primárním konstruktorem. Zvažte možnost přidat do definice typu argumenty, třeba type X(args) = ... + + + + Property definitions may not be declared mutable. To indicate that this property can be set, use 'member val PropertyName = expr with get,set'. + Definice vlastností se nedají deklarovat jako měnitelné. Pokud chcete tuto vlastnost definovat jako nastavitelnou, použijte syntaxi member val PropertyName = expr with get,set. + + + + To indicate that this property can be set, use 'member val PropertyName = expr with get,set'. + Pokud chcete tuto vlastnost definovat jako nastavitelnou, použijte syntaxi member val PropertyName = expr with get,set. + + + + Type '{0}' is illegal because in byref<T>, T cannot contain byref types. + Typ {0} je neplatný, protože T v byref<T> nemůže obsahovat typy ByRef. + + + + F# supports array ranks between 1 and 32. The value {0} is not allowed. + F# podporuje rozměry polí od 1 do 32. Hodnota {0} není povolená. + + + + In queries, use the form 'for x in n .. m do ...' for ranging over integers + V dotazech použijte notaci for x in n ... m do ..., která zajistí rozsah napříč celočíselnými typy. + + + + 'while' expressions may not be used in queries + Výraz while se v dotazu použít nedá. + + + + 'try/finally' expressions may not be used in queries + Výraz try/finally se nedá použít v dotazech. + + + + 'use' expressions may not be used in queries + Výrazy use se v dotazech použít nedají. + + + + 'let!', 'use!' and 'do!' expressions may not be used in queries + Výrazy let!, use! a do! se v dotazech použít nedají. + + + + 'return' and 'return!' may not be used in queries + V dotazech se nedá použít return! ani return. + + + + This is not a known query operator. Query operators are identifiers such as 'select', 'where', 'sortBy', 'thenBy', 'groupBy', 'groupValBy', 'join', 'groupJoin', 'sumBy' and 'averageBy', defined using corresponding methods on the 'QueryBuilder' type. + Toto je neznámý operátor dotazu. Operátory dotazu jsou identifikátory jako třeba select, where, sortBy, thenBy, groupBy, groupValBy, join, groupJoin, sumBy nebo averageBy, které jsou definované pomocí odpovídajících metod v typu QueryBuilder. + + + + 'try/with' expressions may not be used in queries + Výrazy try/with se u dotazů použít nedají. + + + + This 'let' definition may not be used in a query. Only simple value definitions may be used in queries. + Tato definice let se v dotazu použít nedá. V dotazech je možné použít jenom definice jednoduchých hodnot. + + + + Too many static parameters. Expected at most {0} parameters, but got {1} unnamed and {2} named parameters. + Příliš mnoho statických parametrů. Maximální očekávaný počet parametrů je {0}, ale počet přijatých parametrů je {1} (nepojmenované) a {2} (pojmenované). + + + + Invalid provided literal value '{0}' + Neplatná hodnota poskytnutého literálu {0} + + + + The 'anycpu32bitpreferred' platform can only be used with EXE targets. You must use 'anycpu' instead. + Platforma anycpu32bitpreferred se dá použít jenom s cíli EXE. Místo ní je potřeba použít anycpu. + + + + This member, function or value declaration may not be declared 'inline' + Člen, funkce nebo hodnota se nedá deklarovat jako inline. + + + + The provider '{0}' returned a non-generated type '{1}' in the context of a set of generated types. Consider adjusting the type provider to only return generated types. + Poskytovatel {0} vrátil negenerovaný typ {1} v kontextu sady generovaných typů. Zvažte možnost upravit zprostředkovatele typu tak, aby vracel jenom generované typy. + + + + Arguments to query operators may require parentheses, e.g. 'where (x > y)' or 'groupBy (x.Length / 10)' + Argumenty operátorů dotazu můžou vyžadovat použití závorek, třeba where (x > y) nebo groupBy (x.Length / 10). + + + + A quotation may not involve an assignment to or taking the address of a captured local variable + Citace nemůže zahrnovat přiřazení k adrese zachycené lokální proměnné nebo její přebírání. + + + + + 1 overload + + 1 přetížení + + + + + {0} overloads + + {0} přetížení + + + + Erased to + Vymazáno + + + + Unexpected token '{0}' or incomplete expression + Neočekávaný token {0} nebo neúplný výraz + + + + Cannot find code target for this attribute, possibly because the code after the attribute is incomplete. + Nedá se najít cíl kódu pro tento atribut. Možná je to proto, že kód za tímto atributem je neúplný. + + + + Type name cannot be empty. + Název typu nemůže být prázdný. + + + + Problem reading assembly '{0}': {1} + Problém při čtení sestavení {0}: {1} + + + + Invalid provided field. Provided fields of erased provided types must be literals. + Neplatné poskytnuté pole. Poskytnutá pole vymazaných poskytnutých typů musí být literálová. + + + + (loading description...) + (Načítá se popis...) + + + + (description unavailable...) + (popis není dostupný...) + + + + A type variable has been constrained by multiple different class types. A type variable may only have one class constraint. + Proměnná typu je omezená více různými typy tříd. Proměnná typu může mít jenom jedno omezení třídy. + + + + 'match' expressions may not be used in queries + Výrazy match se nedají v dotazech použít. + + + + Infix operator member '{0}' has {1} initial argument(s). Expected a tuple of 3 arguments + Člen operátoru vpony {0} má počáteční argumenty v počtu {1}. Očekávala se řazená kolekce členů se třemi argumenty. + + + + The operator '{0}' cannot be resolved. Consider opening the module 'Microsoft.FSharp.Linq.NullableOperators'. + Operátor {0} se nedá přeložit. Zvažte možnost otevření modulu Microsoft.FSharp.Linq.NullableOperators. + + + + '{0}' must be followed by 'in'. Usage: {1}. + Po {0} musí následovat in. Použití: {1}. + + + + Neither 'member val' nor 'override val' definitions are permitted in object expressions. + U objektových výrazů se nepovolují definice member val ani override val. + + + + Copy-and-update record expressions must include at least one field. + Výrazy záznamu zkopírování a aktualizace musí zahrnovat aspoň jedno pole. + + + + '_' cannot be used as field name + Podtržítko se pro název pole použít nedá. + + + + The provided types generated by this use of a type provider may not be used from other F# assemblies and should be marked internal or private. Consider using 'type internal TypeName = ...' or 'type private TypeName = ...'. + Poskytnuté typy generované tímto použitím zprostředkovatele typu možná nepůjde použít v jiných sestaveních F# a měly by se označit jako interní nebo privátní. Zvažte použití notace type internal TypeName = ... nebo type private TypeName = ... + + + + A property's getter and setter must have the same type. Property '{0}' has getter of type '{1}' but setter of type '{2}'. + Metody getter a setter vlastnosti musí být stejného typu. Vlastnost {0} má metodu get typu {1}, ale metodu set typu {2}. + + + + Array method '{0}' is supplied by the runtime and cannot be directly used in code. For operations with array elements consider using family of GetArray/SetArray functions from LanguagePrimitives.IntrinsicFunctions module. + Metodu pole {0} poskytuje modul runtime a nedá se v kódu použít přímo. U operací s prvky polí zvažte možnost použití skupiny funkcí GetArray/SetArray z modulu LanguagePrimitives.IntrinsicFunctions. + + + + The union case '{0}' does not have a field named '{1}'. + Výjimka nebo případ typu union {0} nemá pole s názvem {1}. + + + + Union case/exception field '{0}' cannot be used more than once. + Pole {0} výjimky nebo případu typu union se nedá použít víc než jednou. + + + + Named field '{0}' is used more than once. + Pojmenované pole {0} se používá víc než jednou. + + + + Named field '{0}' conflicts with autogenerated name for anonymous field. + Pojmenované pole {0} koliduje s automaticky generovaným názvem anonymního pole. + + + + This literal expression or attribute argument results in an arithmetic overflow. + Tento literálový výraz nebo argument atributu má za následek přetečení aritmetické operace. + + + + This is not valid literal expression. The [<Literal>] attribute will be ignored. + Toto není platný literálový výraz. Atribut [<Literal>] se bude ignorovat. + + + + System.Runtime.InteropServices assembly is required to use UnknownWrapper\DispatchWrapper classes. + Aby bylo možné použít třídy UnknownWrapper\DispatchWrapper, vyžaduje se sestavení System.Runtime.InteropServices. + + + + The mutable local '{0}' is implicitly allocated as a reference cell because it has been captured by a closure. This warning is for informational purposes only to indicate where implicit allocations are performed. + Místní proměnná {0} se implicitně přiděluje jako odkazovaná buňka, protože ji zachytilo zavření. Toto upozornění slouží jenom k informativním účelům a ukazuje, kde k implicitním přidělením dochází. + + + + A type provider implemented GetStaticParametersForMethod, but ApplyStaticArgumentsForMethod was not implemented or invalid + Zprostředkovatel typu implementuje metodu GetStaticParametersForMethod, ale metoda ApplyStaticArgumentsForMethod se neimplementovala nebo je neplatná. + + + + An error occured applying the static arguments to a provided method + Při použití statických argumentů u poskytnuté metody došlo k chybě. + + + + Unexpected character '{0}' in preprocessor expression + Neočekávaný znak {0} ve výrazu preprocesoru + + + + Unexpected token '{0}' in preprocessor expression + Neočekávaný token {0} ve výrazu preprocesoru + + + + Incomplete preprocessor expression + Neúplný výraz preprocesoru + + + + Missing token '{0}' in preprocessor expression + Chybějící token {0} ve výrazu preprocesoru + + + + An error occurred while reading the F# metadata node at position {0} in table '{1}' of assembly '{2}'. The node had no matching declaration. Please report this warning. You may need to recompile the F# assembly you are using. + Nastala chyba při čtení uzlu metadat F# na pozici {0} v tabulce {1} sestavení {2}. Tento uzel nemá žádnou odpovídající deklaraci. Předejte toto upozornění dál. Sestavení F#, které používáte, může být potřeba znovu kompilovat. + + + + Type inference caused the type variable {0} to escape its scope. Consider adding an explicit type parameter declaration or adjusting your code to be less generic. + Odvození typu proměnné způsobilo, že se proměnná typu {0} dostala mimo svůj rozsah. Zvažte přidání explicitní deklarace parametru typu nebo upravení kódu, aby byl méně obecný. + + + + Type inference caused an inference type variable to escape its scope. Consider adding type annotations to make your code less generic. + Odvození typu proměnné způsobilo, že se proměnná typu odvození dostala mimo svůj rozsah. Zvažte přidání anotací typu, aby byl kód méně obecný. + + + + Redundant arguments are being ignored in function '{0}'. Expected {1} but got {2} arguments. + Redundantní argumenty se ve funkci {0} ignorují. Očekávalo se tolik argumentů: {1}, ale bylo jich {2}. + + + + Lowercase literal '{0}' is being shadowed by a new pattern with the same name. Only uppercase and module-prefixed literals can be used as named patterns. + Literál malými písmeny {0} je zastíněný novým vzorem se stejným názvem. Jako pojmenované vzory se dají používat literály velkými písmeny, kterým předchází modul. + + + + This literal pattern does not take arguments + V tomto vzoru literálu se nedají zadat argumenty. + + + + Constructors are not permitted as extension members - they must be defined as part of the original definition of the type + Konstruktory nejsou povolené jako členy rozšíření – musí být definované v rámci původní definice typu. + + + + Invalid response file '{0}' ( '{1}' ) + Neplatný soubor odpovědi {0} ({1}) + + + + Response file '{0}' not found in '{1}' + Soubor odpovědi {0} se nenašel v {1}. + + + + Response file name '{0}' is empty, contains invalid characters, has a drive specification without an absolute path, or is too long + Název souboru odpovědi {0} je prázdný, obsahuje neplatné znaky, má jednotku zadanou bez absolutní cesty nebo je moc dlouhý. + + + + Cannot find FSharp.Core.dll in compiler's directory + Nepovedlo se najít FSharp.Core.dll v adresáři kompilátoru. + + + + One tuple type is a struct tuple, the other is a reference tuple + Jeden typ řazené kolekce členů je struktura, ten druhý je řazená kolekce členů odkazu. + + + + This provided method requires static parameters + Tato zadaná metoda vyžaduje statické parametry. + + + + The conversion from {0} to {1} is a compile-time safe upcast, not a downcast. Consider using 'upcast' instead of 'downcast'. + Převod z {0} na {1} je přetypování nahoru bezpečné v době kompilace, ne přetypování dolů. Zvažte použití parametru upcast namísto downcast. + + + + The conversion from {0} to {1} is a compile-time safe upcast, not a downcast. Consider using the :> (upcast) operator instead of the :?> (downcast) operator. + Převod z {0} na {1} je přetypování nahoru bezpečné v době kompilace, ne přetypování dolů. Zvažte použití operátoru :> (upcast) namísto :?> (downcast). + + + + The 'rec' on this module is implied by an outer 'rec' declaration and is being ignored + Klíčové slovo rec je v tomto modulu odvozené od vnější deklarace rec a ignoruje se. + + + + In a recursive declaration group, 'open' declarations must come first in each module + Ve skupině rekurzivních deklarací musí být deklarace open v každém modulu první. + + + + In a recursive declaration group, module abbreviations must come after all 'open' declarations and before other declarations + Ve skupině rekurzivních deklarací se musí zkratky modulu nacházet za deklaracemi open a před ostatními deklaracemi. + + + + This declaration is not supported in recursive declaration groups + Tato deklarace se ve skupinách rekurzivních deklarací nepodporuje. + + + + Invalid use of 'rec' keyword + Neplatné použití klíčového slova rec + + + + If a union type has more than one case and is a struct, then all fields within the union type must be given unique names. + Pokud je typ sjednocení struktura a obsahuje více než jeden případ, všem polím v tomto typu sjednocení se musí přiřadit jedinečný název. + + + + The CallerMemberNameAttribute applied to parameter '{0}' will have no effect. It is overridden by the CallerFilePathAttribute. + Atribut CallerMemberNameAttribute použitý pro parametr {0} nebude mít žádný účinek. Přepisuje ho atribut CallerFilePathAttribute. + + + + Invalid use of 'fixed'. 'fixed' may only be used in a declaration of the form 'use x = fixed expr' where the expression is an array, the address of a field, the address of an array element or a string' + Neplatné použití fixed. fixed se dá použít jenom v deklaraci ve tvaru use x = fixed expr, kde výraz je pole, adresa pole nebo adresa prvku pole nebo řetězce. + + + + Could not find method System.Runtime.CompilerServices.OffsetToStringData in references when building 'fixed' expression. + Při sestavování výrazu fixed se mezi odkazy nepovedlo najít metodu System.Runtime.CompilerServices.OffsetToStringData. + + + + {0} is an active pattern and cannot be treated as a discriminated union case with named fields. + {0} je aktivní vzorek a není možné s ním zacházet jako s rozlišeným případem typu union s pojmenovanými poli. + + + + The default value does not have the same type as the argument. The DefaultParameterValue attribute and any Optional attribute will be ignored. Note: 'null' needs to be annotated with the correct type, e.g. 'DefaultParameterValue(null:obj)'. + Výchozí hodnota má jiný typ než argument. Atribut DefaultParameterValue a případné volitelné atributy se budou ignorovat. Poznámka: null je potřeba anotovat správným typem, např. DefaultParameterValue(null:obj). + + + + The system type '{0}' was required but no referenced system DLL contained this type + Požadoval se systémový typ {0}, ale žádná odkazovaná systémová knihovna DLL tento typ neobsahovala. + + + + The member '{0}' matches multiple overloads of the same method.\nPlease restrict it to one of the following:{1}. + Člen {0} odpovídá více přetížením stejné metody.\nOmezte ho prosím na jedno z následujících: {1}. + + + + Method or object constructor '{0}' is not static + Metoda nebo konstruktor objektu {0} nejsou statické. + + + + Unexpected symbol '=' in expression. Did you intend to use 'for x in y .. z do' instead? + Neočekávaný symbol = ve výrazu. Neměli jste v úmyslu použít místo toho for x in y ... z do? + + + + Indicates a method that either has no implementation in the type in which it is declared or that is virtual and has a default implementation. + Označuje metodu, která buď nemá implementaci v typu, ve kterém je deklarovaná, nebo která je virtuální a má výchozí implementaci. + + + + Used in mutually recursive bindings, in property declarations, and with multiple constraints on generic parameters. + Používá se ve vzájemně rekurzivních vazbách, v deklaracích vlastností a s několika omezeními u generických parametrů. + + + + Used to give the current class object an object name. Also used to give a name to a whole pattern within a pattern match. + Slouží k pojmenování objektu aktuální třídy. Používá se také k pojmenování celého vzoru v rámci porovnávání vzorů. + + + + Used to verify code during debugging. + Slouží k ověření kódu během ladění. + + + + Used as the name of the base class object. + Používá se jako název objektu základní třídy. + + + + In verbose syntax, indicates the start of a code block. + V podrobné syntaxi označuje začátek bloku kódu. + + + + In verbose syntax, indicates the start of a class definition. + V podrobné syntaxi označuje začátek definice třídy. + + + + Indicates an implementation of an abstract method; used together with an abstract method declaration to create a virtual method. + Označuje implementaci abstraktní metody; společně s deklarací abstraktní metody se používá k vytvoření virtuální metody. + + + + Used to declare a delegate. + Slouží k deklaraci delegáta. + + + + Used in looping constructs or to execute imperative code. + Používá se v konstruktorech cyklů nebo k provádění imperativního kódu. + + + + In verbose syntax, indicates the end of a block of code in a looping expression. + V podrobné syntaxi označuje konec bloku kódu ve výrazu cyklu. + + + + Used to convert to a type that is lower in the inheritance chain. + Slouží k převodu na typ, který je na nižší pozici v řetězu dědičnosti. + + + + In a for expression, used when counting in reverse. + Slouží k počítání pozpátku ve výrazu for. + + + + Used in conditional branching. A short form of else if. + Používá se v podmíněném větvení. Krátká forma výrazu else if. + + + + Used in conditional branching. + Používá se v podmíněném větvení. + + + + In type definitions and type extensions, indicates the end of a section of member definitions. In verbose syntax, used to specify the end of a code block that starts with the begin keyword. + Označuje konec sekce definic členů v definicích typů a rozšířeních typů. V podrobné syntaxi se používá k určení konce bloku kódu, který začíná klíčovým slovem begin. + + + + Used to declare an exception type. + Slouží k deklaraci typu výjimky. + + + + Indicates that a declared program element is defined in another binary or assembly. + Označuje, že deklarovaný element programu je definovaný v jiném binárním souboru nebo sestavení. + + + + Used as a Boolean literal. + Používá se jako logický literál. + + + + Used together with try to introduce a block of code that executes regardless of whether an exception occurs. + Používá se společně s try k uvození bloku kódu, který se provede bez ohledu na to, jestli dojde k výjimce. + + + + Used in looping constructs. + Používá se v konstruktorech cyklů. + + + + Used in lambda expressions, also known as anonymous functions. + Používá se ve výrazech lambda, známých také pod označením anonymní funkce. + + + + Used as a shorter alternative to the fun keyword and a match expression in a lambda expression that has pattern matching on a single argument. + Používá se jako kratší alternativa klíčového slova fun a jako porovnávací výraz ve výrazu lambda s porovnáváním vzoru u jednoho argumentu. + + + + Used to reference the top-level .NET namespace. + Slouží k odkazu na obor názvů .NET na nejvyšší úrovni. + + + + Used in conditional branching constructs. + Používá se v konstruktorech podmíněného větvení. + + + + Used for sequence expressions and, in verbose syntax, to separate expressions from bindings. + Používá se ve výrazech pořadí a v podrobné syntaxi k oddělení výrazů od vazeb. + + + + Used to specify a base class or base interface. + Slouží k určení základní třídy nebo základního rozhraní. + + + + Used to indicate a function that should be integrated directly into the caller's code. + Slouží k označení funkce, která se má integrovat přímo do kódu volajícího. + + + + Used to declare and implement interfaces. + Slouží k deklaraci a implementaci rozhraní. + + + + Used to specify that a member is visible inside an assembly but not outside it. + Umožňuje určit, že je člen viditelný uvnitř sestavení, ale ne mimo toto sestavení. + + + + Used to specify a computation that is to be performed only when a result is needed. + Slouží k určení výpočtu, který se má provést jen v případě, kdy je zapotřebí výsledek. + + + + Used to associate, or bind, a name to a value or function. + Slouží k přidružení (neboli svázání) názvu k hodnotě nebo funkci. + + + + Used in computation expressions to bind a name to the result of another computation expression. + Slouží v asynchronních pracovních postupech k vytvoření vazby názvu s výsledkem asynchronního výpočtu. V jiných výrazech výpočtu se používá k vytvoření vazby názvu s výsledkem, který je výpočetního typu. + + + + Used to branch by comparing a value to a pattern. + Používá se k větvení porovnáním hodnoty s určitým vzorem. + + + + Used to declare a property or method in an object type. + Slouží k deklaraci vlastnosti nebo metody v objektovém typu. + + + + Used to associate a name with a group of related types, values, and functions, to logically separate it from other code. + Slouží k přidružení názvu ke skupině souvisejících typů, hodnot a funkcí a jeho logickému oddělení od jiného kódu. + + + + Used to declare a variable, that is, a value that can be changed. + Slouží k deklaraci proměnné, což je hodnota, která se může měnit. + + + + Used to associate a name with a group of related types and modules, to logically separate it from other code. + Slouží k přidružení názvu ke skupině souvisejících typů a modulů a jeho logickému oddělení od jiného kódu. + + + + Used to declare, define, or invoke a constructor that creates or that can create an object. Also used in generic parameter constraints to indicate that a type must have a certain constructor. + Slouží k deklaraci, definici nebo vyvolání konstruktoru, který vytvoří nebo dokáže vytvořit objekt. V omezeních obecných parametrů označuje, že nějaký typ musí mít určitý konstruktor. + + + + Not actually a keyword. However, not struct in combination is used as a generic parameter constraint. + Ve skutečnosti nejde o klíčové slovo. Kombinace not struct se ale používá jako omezení obecného parametru. + + + + Indicates the absence of an object. Also used in generic parameter constraints. + Označuje absenci objektu. Používá se také v omezeních obecných parametrů. + + + + Used in discriminated unions to indicate the type of categories of values, and in delegate and exception declarations. + Slouží k označení typu kategorií hodnot v rozlišených sjednoceních a v deklaracích delegování a výjimek. + + + + Used to make the contents of a namespace or module available without qualification. + Slouží ke zpřístupnění obsahu oboru názvů nebo modulu bez kvalifikace. + + + + Used with Boolean conditions as a Boolean or operator. Equivalent to ||. Also used in member constraints. + Používá se v logických podmínkách jako logický operátor or. Ekvivalent ||. Používá se také v omezeních členů. + + + + Used to implement a version of an abstract or virtual method that differs from the base version. + Slouží k implementaci verze abstraktní nebo virtuální metody, která se odlišuje od základní verze. + + + + Restricts access to a member to code in the same type or module. + Omezuje přístup k členovi na kód ve stejném typu nebo modulu. + + + + Allows access to a member from outside the type. + Umožňuje přístup ke členovi zvnějška typu. + + + + Used to indicate that a function is recursive. + Slouží k označení toho, že funkce je rekurzivní. + + + + Used to provide a value for the result of the containing computation expression. + Slouží k označení hodnoty, která vznikne jako výsledek výrazu výpočtu. + + + + Used to provide a value for the result of the containing computation expression, where that value itself comes from the result another computation expression. + Slouží k označení výrazu výpočtu, který po vyhodnocení poskytne výsledek obsahujícího výrazu výpočtu. + + + + Used in query expressions to specify what fields or columns to extract. Note that this is a contextual keyword, which means that it is not actually a reserved word and it only acts like a keyword in appropriate context. + Používá se ve výrazech dotazu k určení, která pole nebo sloupce se mají extrahovat. Toto klíčové slovo je kontextové, což znamená, že se ve skutečnosti nejedná o rezervované slovo a jako klíčové slovo funguje jen v příslušném kontextu. + + + + Used to indicate a method or property that can be called without an instance of a type, or a value member that is shared among all instances of a type. + Slouží k označení metody nebo vlastnosti, kterou lze volat bez instance typu, nebo člena hodnoty, který se sdílí mezi všemi instancemi typu. + + + + Used to declare a structure type. Also used in generic parameter constraints. Used for OCaml compatibility in module definitions. + Slouží k deklaraci typu struktury. Používá se také v omezeních obecných parametrů. V definicích modulů se používá kvůli kompatibilitě s OCaml. + + + + Used in conditional expressions. Also used to perform side effects after object construction. + Používá se podmíněných výrazech. Slouží rovněž k provedení vedlejších efektů po konstrukci objektu. + + + + Used in for loops to indicate a range. + Slouží k označení rozsahu v cyklech. + + + + Used to introduce a block of code that might generate an exception. Used together with with or finally. + Slouží k uvození bloku kódu, který může vygenerovat výjimku. Používá se společně s with nebo finally. + + + + Used to declare a class, record, structure, discriminated union, enumeration type, unit of measure, or type abbreviation. + Slouží k deklaraci třídy, záznamu, struktury, rozlišeného sjednocení, výčtového typu, měrné jednotky nebo zkratky typu. + + + + Used to convert to a type that is higher in the inheritance chain. + Slouží k převodu na typ, který je na vyšší pozici v řetězu dědičnosti. + + + + Used instead of let for values that implement IDisposable" + Používá se místo výrazu let u hodnot, které k uvolnění prostředků vyžadují volání funkce Dispose. + + + + Used instead of let! in computation expressions for computation expression results that implement IDisposable. + Používá se místo výrazu let! v asynchronních pracovních postupech a jiných výrazech výpočtu pro hodnoty, které k uvolnění prostředků vyžadují volání funkce Dispose. + + + + Used in a signature to indicate a value, or in a type to declare a member, in limited situations. + Slouží k označení hodnoty v signatuře nebo v určitých situacích k deklarování člena v daném typu. + + + + Indicates the .NET void type. Used when interoperating with other .NET languages. + Označuje prázdný typ .NET. Používá se při vzájemné spolupráci s jinými jazyky .NET. + + + + Used for Boolean conditions (when guards) on pattern matches and to introduce a constraint clause for a generic type parameter. + Používá se pro logické podmínky (klauzule when) u porovnávání vzorů a k uvození klauzule omezení parametru obecného typu. + + + + Introduces a looping construct. + Uvozuje konstruktor cyklu. + + + + Used together with the match keyword in pattern matching expressions. Also used in object expressions, record copying expressions, and type extensions to introduce member definitions, and to introduce exception handlers. + Používá se společně s klíčovým slovem match ve výrazech porovnávání vzorů. Ve výrazech objektů, výrazech kopírování záznamů a rozšířeních typů slouží také k uvození definice člena a obslužných rutin výjimek. + + + + Used in a sequence expression to produce a value for a sequence. + Používá se ve výrazu pořadí k vytvoření hodnoty pořadí. + + + + Used in a computation expression to append the result of a given computation expression to a collection of results for the containing computation expression. + Používá se ve výrazu výpočtu k připojení výsledku daného výpočetního výrazu ke kolekci výsledků obsahujícího výrazu výpočtu. + + + + In function types, delimits arguments and return values. Yields an expression (in sequence expressions); equivalent to the yield keyword. Used in match expressions + Odděluje argumenty a návratové hodnoty v typech funkcí. Nabývá výrazu (ve výrazech pořadí); ekvivalent klíčového slova yield. Používá se v porovnávacích výrazech. + + + + Assigns a value to a variable. + Přiřadí hodnotu k proměnné. + + + + Converts a type to type that is higher in the hierarchy. + Převede daný typ na typ, který je výše v hierarchii. + + + + Converts a type to a type that is lower in the hierarchy. + Převede daný typ na typ, který je níže v hierarchii. + + + + Delimits a typed code quotation. + Odděluje citaci typového kódu. + + + + Delimits a untyped code quotation. + Odděluje citaci netypového kódu + + + + {0} '{1}' not found in assembly '{2}'. A possible cause may be a version incompatibility. You may need to explicitly reference the correct version of this assembly to allow all referenced components to use the correct version. + {0} {1} – nenašlo se v sestavení {2}. Možnou příčinou může být nekompatibilita verzí. Možná budete muset vytvořit explicitní odkaz na správnou verzi tohoto sestavení, abyste zajistili, že ji budou používat všechny odkazované součásti. + + + + {0} '{1}' not found in type '{2}' from assembly '{3}'. A possible cause may be a version incompatibility. You may need to explicitly reference the correct version of this assembly to allow all referenced components to use the correct version. + {0} {1} – nenašlo se v typu {2} ze sestavení {3}. Možnou příčinou může být nekompatibilita verzí. Možná budete muset vytvořit explicitní odkaz na správnou verzi tohoto sestavení, abyste zajistili, že ji budou používat všechny odkazované součásti. + + + + is + je + + + + This value is not a function and cannot be applied. + Tato hodnota není funkcí a nedá se použít. + + + + This value is not a function and cannot be applied. Did you intend to access the indexer via {0}.[index] instead? + Tato hodnota není funkcí a nedá se použít. Nechtěli jste místo toho získat k indexeru přístup přes {0}.[index]? + + + + This expression is not a function and cannot be applied. Did you intend to access the indexer via expr.[index] instead? + Tento výraz není funkcí a nedá se použít. Nechtěli jste místo toho získat k indexeru přístup přes expr.[index]? + + + + This value is not a function and cannot be applied. Did you forget to terminate a declaration? + Tato hodnota není funkce a nedá se použít. Nezapomněli jste ukončit deklaraci? + + + + The argument names in the signature '{0}' and implementation '{1}' do not match. The argument name from the signature file will be used. This may cause problems when debugging or profiling. + Názvy argumentů v signatuře {0} a implementaci {1} si neodpovídají. Použije se název argumentu ze souboru signatury. To může způsobit problémy při ladění nebo profilování. + + + + An error occurred while reading the F# metadata of assembly '{0}'. A reserved construct was utilized. You may need to upgrade your F# compiler or use an earlier version of the assembly that doesn't make use of a specific construct. + Při čtení metadat jazyka F# sestavení {0} došlo k chybě. Byl použit rezervovaný konstruktor. Je možné, že budete muset upgradovat kompilátor jazyka F# nebo použít dřívější verzi sestavení, ve které se nevyužívá konkrétní konstruktor. + + + + This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. + Tato metoda nebo vlastnost se obvykle z kódu F# nepoužívá, použijte místo toho pro dekonstrukci explicitní vzor řazené kolekce členů. + + + + This expression returns a value of type '{0}' but is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to use the expression as a value in the sequence then use an explicit 'yield'. + Tento výraz vrátí hodnotu typu {0}, ale implicitně se zahodí. Zvažte vytvoření vazby mezi výsledkem a názvem pomocí klíčového slova let, např. let výsledek = výraz. Pokud jste chtěli výraz použít jako hodnotu v sekvenci, použijte explicitní klíčové slovo yield. + + + + This expression returns a value of type '{0}' but is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to use the expression as a value in the sequence then use an explicit 'yield!'. + Tento výraz vrátí hodnotu typu {0}, ale implicitně se zahodí. Zvažte vytvoření vazby mezi výsledkem a názvem pomocí klíčového slova let, např. let výsledek = výraz. Pokud jste chtěli výraz použít jako hodnotu v sekvenci, použijte explicitní klíčové slovo yield!. + + + + Used in computation expressions to pattern match directly over the result of another computation expression. + Používá se ve výrazech výpočtu k přímému porovnání vzorů s výsledkem jiného výrazu výpočtu. + + + + The file '{0}' changed on disk unexpectedly, please reload. + Soubor {0} se na disku neočekávaně změnil, opakujte prosím načtení. + + + + The byref pointer is readonly, so this write is not permitted. + Ukazatel byref je jen pro čtení, proto tento zápis není povolený. + + + + A value must be mutable in order to mutate the contents or take the address of a value type, e.g. 'let mutable x = ...' + Hodnota musí být proměnlivá, aby se dal změnit obsah nebo aby se dala převzít adresa typu hodnoty, třeba let mutable x = ... + + + + A ReadOnly attribute has been applied to a struct type with a mutable field. + Atribut ReadOnly byl použit na typ struktury s měnitelným (proměnlivým) polem. + + + + A byref pointer returned by a function or method is implicitly dereferenced as of F# 4.5. To acquire the return value as a pointer, use the address-of operator, e.g. '&f(x)' or '&obj.Method(arg1, arg2)'. + Přes ukazatel byref vrácený funkcí nebo metodou se ve výchozím nastavení přistupuje od verze F# 4.5. Pokud chcete získat vrácenou hodnotu jako ukazatel, použijte operátor address-of, např. &f(x) nebo &obj.Method(arg1, arg2). + + + + A type annotated with IsByRefLike must also be a struct. Consider adding the [<Struct>] attribute to the type. + Typ s přidanou poznámkou IsByRefLike musí být také struktura. Bylo by vhodné přidat do typu atribut [<Struct>]. + + + + The address of the variable '{0}' or a related expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + Adresa proměnné {0} nebo související výraz nejde v tomto bodě použít. Je tím zajištěno, aby adresa lokální hodnoty neunikla ze svého rozsahu. + + + + This value can't be assigned because the target '{0}' may refer to non-stack-local memory, while the expression being assigned is assessed to potentially refer to stack-local memory. This is to help prevent pointers to stack-bound memory escaping their scope. + Tuto hodnotu nejde přiřadit, protože cíl {0} může odkazovat na paměť, která nepoužívá lokální zásobník (non-stack-local), zatímco přiřazovaný výraz je vyhodnocený tak, že může případně odkazovat na paměť s lokálním zásobníkem (stack-local). Díky tomu se zabraňuje, aby ukazatele na paměť svázanou se zásobníkem (stack-bound) unikly ze svého rozsahu. + + + + A value defined in a module must be mutable in order to take its address, e.g. 'let mutable x = ...' + Hodnot definovaná v modulu musí být měnitelná, aby se mohla převzít její adresa, např. let mutable x = ... + + + + A type annotated with IsReadOnly must also be a struct. Consider adding the [<Struct>] attribute to the type. + Typ s přidanou poznámkou IsReadOnly musí být také struktura. Bylo by vhodné přidat do typu atribut [<Struct>]. + + + + Struct members cannot return the address of fields of the struct by reference + Členové struktury nemůžou vrátit adresu polí struktury podle odkazu. + + + + The function or method call cannot be used at this point, because one argument that is a byref of a non-stack-local Span or IsByRefLike type is used with another argument that is a stack-local Span or IsByRefLike type. This is to ensure the address of the local value does not escape its scope. + Volání funkce nebo metody nejde v tomto bodě použít, protože jeden argument, který je byref typu Span nebo IsByRefLike, který nepoužívá lokální zásobník (non-stack-local), je použitý s jiným argumentem, který je typu Span nebo IsByRefLike, který používá lokální zásobník (stack-local). Je tím zajištěno, aby adresa lokální hodnoty neunikla ze svého rozsahu. + + + + The address of a value returned from the expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + Adresa hodnoty vrácené z výrazu nejde v tomto bodě použít. Je tím zajištěno, aby adresa lokální hodnoty neunikla ze svého rozsahu. + + + + The Span or IsByRefLike variable '{0}' cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + Proměnná Span nebo IsByRefLike {0} nejde v tomto bodě použít. Je tím zajištěno, aby adresa lokální hodnoty neunikla ze svého rozsahu. + + + + A Span or IsByRefLike value returned from the expression cannot be used at ths point. This is to ensure the address of the local value does not escape its scope. + Hodnota Span nebo IsByRefLike vrácená z výrazu nejde v tomto bodě použít. Je tím zajištěno, aby adresa lokální hodnoty neunikla ze svého rozsahu. + + + + Cannot take the address of the value returned from the expression. Assign the returned value to a let-bound value before taking the address. + Adresa hodnoty vrácená výrazem nejde převzít. Před převzetím adresy přiřaďte vrácenou hodnotu hodnotě s vazbou na klauzuli Let. + + + + The Span or IsByRefLike expression cannot be returned from this function or method, because it is composed using elements that may escape their scope. + The Span or IsByRefLike expression cannot be returned from this function or method, because it is composed using elements that may escape their scope. + + + + This type does not inherit Attribute, it will not work correctly with other .NET languages. + This type does not inherit Attribute, it will not work correctly with other .NET languages. + + + + The exception '{0}' does not have a field named '{1}'. + The exception '{0}' does not have a field named '{1}'. + + + + The constructor does not have a field named '{0}'. + The constructor does not have a field named '{0}'. + + + + Active patterns do not have fields. This syntax is invalid. + Active patterns do not have fields. This syntax is invalid. + + + + + \ No newline at end of file diff --git a/src/fsharp/xlf/FSComp.txt.de.xlf b/src/fsharp/xlf/FSComp.txt.de.xlf new file mode 100644 index 00000000000..cd09b539e4b --- /dev/null +++ b/src/fsharp/xlf/FSComp.txt.de.xlf @@ -0,0 +1,7087 @@ + + + + + + The namespace '{0}' is not defined. + Der Namespace "{0}" ist nicht definiert. + + + + The namespace or module '{0}' is not defined. + Der Namespace oder das Modul "{0}" ist nicht definiert. + + + + The field, constructor or member '{0}' is not defined. + Das Feld, der Konstruktor oder der Member "{0}" ist nicht definiert. + + + + The value, constructor, namespace or type '{0}' is not defined. + Der Wert, Konstruktor, Namespace oder Typ "{0}" ist nicht definiert. + + + + The value or constructor '{0}' is not defined. + Der Wert oder Konstruktor "{0}" ist nicht definiert. + + + + The value, namespace, type or module '{0}' is not defined. + Der Wert, Namespace, Typ oder das Modul "{0}" ist nicht definiert. + + + + The constructor, module or namespace '{0}' is not defined. + Der Konstruktor, das Modul oder der Namespace "{0}" ist nicht definiert. + + + + The type '{0}' is not defined. + Der Typ "{0}" ist nicht definiert. + + + + The type '{0}' is not defined in '{1}'. + Der Typ "{0}" ist nicht in "{1}" definiert. + + + + The record label or namespace '{0}' is not defined. + Die Datensatzbezeichnung oder der Namespace "{0}" ist nicht definiert. + + + + The record label '{0}' is not defined. + Die Datensatzbezeichnung "{0}" ist nicht definiert. + + + + Maybe you want one of the following: + Vielleicht möchten Sie eine der folgenden Bezeichnungen verwenden: + + + + The type parameter {0} is not defined. + Der Typparameter "{0}" ist nicht definiert. + + + + The pattern discriminator '{0}' is not defined. + Der Musterdiskriminator "{0}" ist nicht definiert. + + + + Replace with '{0}' + Durch "{0}" ersetzen + + + + Add . for indexer access. + Fügen Sie . für Indexerzugriff hinzu. + + + + All elements of a list must be of the same type as the first element, which here is '{0}'. This element has type '{1}'. + Alle Elemente eines Listenkonstruktorausdrucks müssen den gleichen Typ aufweisen. Es wurde erwartet, dass dieser Ausdruck den Typ "{0}" aufweist, hier liegt aber der Typ "{1}" vor. + + + + All elements of an array must be of the same type as the first element, which here is '{0}'. This element has type '{1}'. + Alle Elemente eines Arraykonstruktorausdrucks müssen den gleichen Typ aufweisen. Es wurde erwartet, dass dieser Ausdruck den Typ "{0}" aufweist, hier liegt aber der Typ "{1}" vor. + + + + This 'if' expression is missing an 'else' branch. Because 'if' is an expression, and not a statement, add an 'else' branch which also returns a value of type '{0}'. + Dem if-Ausdruck fehlt ein else-Branch. Der then-Branch weist den Typ "{0}" auf. Da "if" ein Ausdruck und keine Anweisung ist, fügen Sie einen else-Branch hinzu, der einen Wert des gleichen Typs zurückgibt. + + + + The 'if' expression needs to have type '{0}' to satisfy context type requirements. It currently has type '{1}'. + Der if-Ausdruck muss Typ "{0}" aufweisen, damit die Kontexttypanforderungen erfüllt sind. Derzeit weist er Typ "{1}" auf. + + + + All branches of an 'if' expression must return values of the same type as the first branch, which here is '{0}'. This branch returns a value of type '{1}'. + Alle Branches eines if-Ausdrucks müssen den gleichen Typ aufweisen. Es wurde erwartet, dass dieser Ausdruck den Typ "{0}" aufweist, hier liegt aber der Typ "{1}" vor. + + + + All branches of a pattern match expression must return values of the same type as the first branch, which here is '{0}'. This branch returns a value of type '{1}'. + Alle Branches eines Musterübereinstimmungsausdrucks müssen Werte des gleichen Typs zurückgeben. Der erste Branch hat einen Wert vom Typ "{0}" zurückgegeben, aber dieser Branch gab einen Wert vom Typ "{1}" zurück. + + + + A pattern match guard must be of type 'bool', but this 'when' expression is of type '{0}'. + Ein Musterübereinstimmungswächter muss den Typ "bool" aufweisen, dieser when-Ausdruck hat hingegen den Typ "{0}". + + + + A ';' is used to separate field values in records. Consider replacing ',' with ';'. + Das Zeichen ";" wird verwendet, um Feldwerte in Datensätzen zu trennen. Ersetzen Sie "," ggf. durch ";". + + + + The '!' operator is used to dereference a ref cell. Consider using 'not expr' here. + Der Operator "!" wird zum Dereferenzieren einer Verweiszelle verwendet. Verwenden Sie hier ggf. "not expr". + + + + The non-generic type '{0}' does not expect any type arguments, but here is given {1} type argument(s) + Der nicht generische Typ "{0}" erwartet keine Typargumente; hier wird/werden jedoch {1} Typargument(e) übergeben. + + + + Consider using 'return!' instead of 'return'. + Verwenden Sie ggf. "return!" anstelle von "return". + + + + Consider using 'yield!' instead of 'yield'. + Verwenden Sie ggf. "yield!" anstelle von "yield". + + + + \nA tuple type is required for one or more arguments. Consider wrapping the given arguments in additional parentheses or review the definition of the interface. + \nEin Tupeltyp ist für mindestens ein Argument erforderlich. Schließen Sie die angegebenen Argumente ggf. in zusätzliche Klammern ein, oder überprüfen Sie die Definition der Schnittstelle. + + + + Invalid warning number '{0}' + Ungültige Warnungsnummer "{0}". + + + + Invalid version string '{0}' + Ungültige Versionszeichenfolge "{0}". + + + + Invalid version file '{0}' + Ungültige Versionsdatei "{0}". + + + + Microsoft (R) F# Compiler version {0} + Microsoft (R) F# Compiler, Version {0} + + + + F# Compiler for F# {0} + F# Compiler für F# {0} + + + + Problem with filename '{0}': {1} + Problem mit Dateinamen "{0}": {1} + + + + No inputs specified + Keine Eingaben angegeben. + + + + The '--pdb' option requires the '--debug' option to be used + Die Option "--pdb" macht die Verwendung der Option "--debug" erforderlich. + + + + The search directory '{0}' is invalid + Das Suchverzeichnis "{0}" ist ungültig. + + + + The search directory '{0}' could not be found + Das Suchverzeichnis "{0}" wurde nicht gefunden. + + + + '{0}' is not a valid filename + {0} ist kein gültiger Dateiname. + + + + '{0}' is not a valid assembly name + {0} ist kein gültiger Assemblyname. + + + + Unrecognized privacy setting '{0}' for managed resource, valid options are 'public' and 'private' + Unbekannte Datenschutzeinstellung "{0}" für verwaltete Ressource; gültige Optionen sind "public" und "private". + + + + Multiple references to '{0}.dll' are not permitted + Mehrere Verweise auf "{0}.dll" sind nicht zulässig + + + + Could not read version from mscorlib.dll + Version konnte nicht aus "mscorlib.dll" gelesen werden. + + + + Unable to read assembly '{0}' + Assembly "{0}" kann nicht gelesen werden. + + + + Assembly resolution failure at or near this location + Fehler bei Assemblyauflösung an dieser Position oder in ihrer Nähe. + + + + The declarations in this file will be placed in an implicit module '{0}' based on the file name '{1}'. However this is not a valid F# identifier, so the contents will not be accessible from other files. Consider renaming the file or adding a 'module' or 'namespace' declaration at the top of the file. + Die Deklarationen in dieser Datei werden anhand des Dateinamens "{1}" im impliziten Modul "{0}" platziert. Dies ist jedoch kein gültiger F#-Bezeichner, sodass von anderen Dateien aus kein Zugriff auf die Inhalte möglich ist. Benennen Sie die Datei um, oder fügen Sie oben in der Datei eine module- oder namespace-Deklaration hinzu. + + + + Files in libraries or multiple-file applications must begin with a namespace or module declaration, e.g. 'namespace SomeNamespace.SubNamespace' or 'module SomeNamespace.SomeModule'. Only the last source file of an application may omit such a declaration. + Dateien in Bibliotheken oder Anwendungen mit mehreren Dateien müssen mit einer Namespace- oder Moduldeklaration beginnen. Beispiel: "namespace SomeNamespace.SubNamespace" oder "module SomeNamespace.SomeModule". Nur in der letzten Quelldatei einer Anwendung darf eine solche Deklaration ausgelassen werden. + + + + Files in libraries or multiple-file applications must begin with a namespace or module declaration. When using a module declaration at the start of a file the '=' sign is not allowed. If this is a top-level module, consider removing the = to resolve this error. + Dateien in Bibliotheken oder Anwendungen mit mehreren Dateien müssen mit einem Namespace oder einer Moduldeklaration beginnen. Wenn eine Moduldeklaration am Anfang einer Datei verwendet wird, ist das Zeichen "=" unzulässig. Wenn es sich um ein Modul der obersten Ebene handelt, sollten Sie ggf. das Zeichen "=" entfernen, um diesen Fehler zu beheben. + + + + This file contains multiple declarations of the form 'module SomeNamespace.SomeModule'. Only one declaration of this form is permitted in a file. Change your file to use an initial namespace declaration and/or use 'module ModuleName = ...' to define your modules. + Diese Datei enthält mehrere Deklarationen im Format "module SomeNamespace.SomeModule". Pro Datei ist nur eine Deklaration in diesem Format zulässig. Verwenden Sie eine Namespacedeklaration am Dateianfang und/oder "module ModuleName = ..." zur Definition der Module. + + + + Option requires parameter: {0} + Option erfordert einen Parameter: {0} + + + + Source file '{0}' could not be found + Quelldatei "{0}" wurde nicht gefunden. + + + + The file extension of '{0}' is not recognized. Source files must have extension .fs, .fsi, .fsx, .fsscript, .ml or .mli. + Die Dateierweiterung "{0}" wurde nicht erkannt. Quelldateien müssen die Erweiterung .fs, .fsi, .fsx, .fsscript, .ml oder .mli haben. + + + + Could not resolve assembly '{0}' + Assembly "{0}" konnte nicht aufgelöst werden. + + + + Could not resolve assembly '{0}' required by '{1}' + Die für "{1}" erforderliche Assembly "{0}" konnte nicht aufgelöst werden. + + + + Error opening binary file '{0}': {1} + Fehler beim Öffnen der Binärdatei "{0}": {1} + + + + The F#-compiled DLL '{0}' needs to be recompiled to be used with this version of F# + Die kompilierte F#-DLL "{0}" muss erneut kompiliert werden, damit sie mit dieser Version von F# verwendet werden kann. + + + + Invalid directive. Expected '#I \"<path>\"'. + Ungültige Direktive. Erwartet wurde "#I \"<Pfad>\"". + + + + Invalid directive. Expected '#r \"<file-or-assembly>\"'. + Ungültige Direktive. Erwartet wurde "#r \"<Datei-oder-Assembly>\"". + + + + Invalid directive. Expected '#load \"<file>\" ... \"<file>\"'. + Ungültige Direktive. Erwartet wurde "#load \"<Datei>\" ... \"<Datei>\"". + + + + Invalid directive. Expected '#time', '#time \"on\"' or '#time \"off\"'. + Ungültige Direktive. Erwartet wurde "#time", "#time \"on\"" oder '#time \"off\"". + + + + Directives inside modules are ignored + Direktiven innerhalb von Modulen werden ignoriert. + + + + A signature for the file or module '{0}' has already been specified + Für Datei oder Modul "{0}" wurde bereits eine Signatur angegeben. + + + + An implementation of file or module '{0}' has already been given. Compilation order is significant in F# because of type inference. You may need to adjust the order of your files to place the signature file before the implementation. In Visual Studio files are type-checked in the order they appear in the project file, which can be edited manually or adjusted using the solution explorer. + Eine Implementierung der Datei oder des Moduls "{0}" wurde bereits angegeben. Die Kompilierungsreihenfolge ist in F# aufgrund des Typrückschlusses von Bedeutung. Möglicherweise müssen Sie die Reihenfolge der Dateien anpassen, um die Signaturdatei vor der Implementierung zu platzieren. In Visual Studio erfolgt die Typprüfung der Dateien in der Reihenfolge, in der sie in der Projektdatei aufgeführt sind; diese kann manuell bearbeitet oder im Projektmappen-Explorer angepasst werden. + + + + An implementation of the file or module '{0}' has already been given + Eine Implementierung der Datei oder des Moduls "{0}" wurde bereits angegeben. + + + + The signature file '{0}' does not have a corresponding implementation file. If an implementation file exists then check the 'module' and 'namespace' declarations in the signature and implementation files match. + Für die Signaturdatei "{0}" ist keine entsprechende Implementierungsdatei vorhanden. Falls eine Implementierungsdatei existiert, stellen Sie sicher, dass die module- und namespace-Deklarationen in der Signatur- und der Implementierungsdatei übereinstimmen. + + + + '{0}' is not a valid integer argument + {0} ist kein gültiges Integer-Argument. + + + + '{0}' is not a valid floating point argument + {0} ist kein gültiges Gleitkommaargument. + + + + Unrecognized option: '{0}' + Unbekannte Option: "{0}" + + + + Invalid module or namespace name + Ungültiger Modul- oder Namespacename. + + + + Error reading/writing metadata for the F# compiled DLL '{0}'. Was the DLL compiled with an earlier version of the F# compiler? (error: '{1}'). + Fehler beim Lesen/Schreiben von Metadaten für die kompilierte F#-DLL "{0}". Wurde die DLL mit einer früheren Version des F#-Compilers kompiliert? (Fehler: "{1}"). + + + + The type/module '{0}' is not a concrete module or type + Der Typ bzw. das Modul "{0}" ist kein konkretes Modul bzw. kein konkreter Typ. + + + + The type '{0}' has an inline assembly code representation + Der Typ "{0}" besitzt eine Inlineassembly-Codedarstellung. + + + + A namespace and a module named '{0}' both occur in two parts of this assembly + Ein Namespace und ein Modul namens "{0}" sind beide in zwei Teilen dieser Assembly vorhanden. + + + + Two modules named '{0}' occur in two parts of this assembly + Zwei Module namens "{0}" treten in zwei Teilen dieser Assembly auf. + + + + Two type definitions named '{0}' occur in namespace '{1}' in two parts of this assembly + Zwei Typdefinitionen namens "{0}" erscheinen im Namespace "{1}" in zwei Teilen dieser Assembly. + + + + A module and a type definition named '{0}' occur in namespace '{1}' in two parts of this assembly + Ein Modul und eine Typdefinition namens "{0}" erscheinen im Namespace "{1}" in zwei Teilen dieser Assembly. + + + + Invalid member signature encountered because of an earlier error + Ungültige Membersignatur aufgrund eines früheren Fehlers. + + + + This value does not have a valid property setter type + Für diesen Wert ist kein gültiger Eigenschaftensettertyp vorhanden. + + + + Invalid form for a property getter. At least one '()' argument is required when using the explicit syntax. + Ungültiges Format für einen Eigenschaftengetter. Mindestens ein ()-Argument ist bei Verwendung der expliziten Syntax erforderlich. + + + + Invalid form for a property setter. At least one argument is required. + Ungültiges Format für einen Eigenschaftensetter. Mindestens ein Argument ist erforderlich. + + + + Unexpected use of a byref-typed variable + Unerwartete Verwendung einer Variablen vom Typ "byref". + + + + Invalid mutation of a constant expression. Consider copying the expression to a mutable local, e.g. 'let mutable x = ...'. + Ungültige Mutation eines konstanten Ausdrucks. Kopieren Sie den Ausdruck in eine änderbare lokale Variable, z.B. "let mutable x = ...". + + + + The value has been copied to ensure the original is not mutated by this operation or because the copy is implicit when returning a struct from a member and another member is then accessed + Dieser Wert wurde kopiert, damit das Original von diesem Vorgang nicht verändert wird. + + + + Recursively defined values cannot appear directly as part of the construction of a tuple value within a recursive binding + Rekursiv definierte Werte können nicht direkt als Teil der Konstruktion eines Tupelwerts innerhalb einer rekursiven Bindung auftreten. + + + + Recursive values cannot appear directly as a construction of the type '{0}' within a recursive binding. This feature has been removed from the F# language. Consider using a record instead. + Rekursive Werte können nicht direkt als Konstruktion vom Typ "{0}" innerhalb einer rekursiven Bindung auftreten. Diese Funktion wurde aus der Programmiersprache F# entfernt. Verwenden Sie stattdessen einen Datensatz. + + + + Recursive values cannot be directly assigned to the non-mutable field '{0}' of the type '{1}' within a recursive binding. Consider using a mutable field instead. + Rekursive Werte können dem nicht änderbaren Feld "{0}" vom Typ "{1}" innerhalb einer rekursiven Bindung nicht direkt zugewiesen werden. Verwenden Sie stattdessen ein änderbares Feld. + + + + Unexpected decode of AutoOpenAttribute + Unerwartete Decodierung von AutoOpenAttribute. + + + + Unexpected decode of InternalsVisibleToAttribute + Unerwartete Decodierung von InternalsVisibleToAttribute. + + + + Unexpected decode of InterfaceDataVersionAttribute + Unerwartete Decodierung von InterfaceDataVersionAttribute. + + + + Active patterns cannot return more than 7 possibilities + Aktive Muster können maximal 7 Möglichkeiten zurückgeben. + + + + This is not a valid constant expression or custom attribute value + Dies ist kein gültiger konstanter Ausdruck oder benutzerdefinierter Attributwert. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe mutability attributes differ + Das Modul "{0}" enthält\n {1} \nDie Signatur gibt aber Folgendes an:\n {2} \nDie Änderbarkeitsattribute sind unterschiedlich. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe names differ + Das Modul "{0}" enthält\n {1} \nDie Signatur gibt aber Folgendes an:\n {2} \nDie Namen sind unterschiedlich. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe compiled names differ + Das Modul "{0}" enthält\n {1}, \n doch die Signatur gibt\n {2} an.\nDie kompilierten Namen unterscheiden sich + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe display names differ + Modul "{0}" enthält\n {1}, \ndoch die Signatur gibt\n {2} an.\nDie Anzeigenamen unterscheiden sich + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe accessibility specified in the signature is more than that specified in the implementation + Das Modul "{0}" enthält\n {1} \nDie Signatur gibt aber Folgendes an:\n {2} \nIn der Signatur ist eine höhere Zugreifbarkeit angegeben als in der Implementierung. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe inline flags differ + Das Modul "{0}" enthält\n {1} \nDie Signatur gibt aber Folgendes an:\n {2} \nDie inline-Flags sind unterschiedlich. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe literal constant values and/or attributes differ + Das Modul "{0}" enthält\n {1} \nDie Signatur gibt aber Folgendes an:\n {2} \nDie Werte und/oder Attribute der literalen Konstanten sind unterschiedlich. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is a type function and the other is not. The signature requires explicit type parameters if they are present in the implementation. + Das Modul "{0}" enthält\n {1} \nDie Signatur gibt aber Folgendes an:\n {2} \nEine Angabe ist eine Typfunktion, die andere nicht. Die Signatur erfordert explizite Typparameter, falls diese in der Implementierung vorhanden sind. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe respective type parameter counts differ + Das Modul "{0}" enthält\n {1} \nDie Signatur gibt aber Folgendes an:\n {2} \nDie Anzahl der entsprechenden Typparameter ist unterschiedlich. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe types differ + Das Modul "{0}" enthält\n {1} \nDie Signatur gibt aber Folgendes an:\n {2} \nDie Typen sind unterschiedlich. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is an extension member and the other is not + Das Modul "{0}" enthält\n {1} \nDie Signatur gibt aber Folgendes an:\n {2} \nEine Angabe ist ein Erweiterungsmember, die andere nicht. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nAn arity was not inferred for this value + Das Modul "{0}" enthält\n {1} \nDie Signatur gibt aber Folgendes an:\n {2} \nFür diesen Wert wurde keine Stelligkeit per Rückschluss abgeleitet. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe number of generic parameters in the signature and implementation differ (the signature declares {3} but the implementation declares {4} + Das Modul "{0}" enthält\n {1} \nDie Signatur gibt aber Folgendes an:\n {2} \nDie Anzahl der generischen Parameter in der Signatur und in der Implementierung ist unterschiedlich (in der Signatur werden {3} deklariert, in der Implementierung {4}). + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe generic parameters in the signature and implementation have different kinds. Perhaps there is a missing [<Measure>] attribute. + Das Modul "{0}" enthält\n {1} \nDie Signatur gibt aber Folgendes an:\n {2} \nDie generischen Parameter in der Signatur und in der Implementierung haben einen unterschiedlichen Typ. Möglicherweise fehlt ein [<Measure>]-Attribut. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe arities in the signature and implementation differ. The signature specifies that '{3}' is function definition or lambda expression accepting at least {4} argument(s), but the implementation is a computed function value. To declare that a computed function value is a permitted implementation simply parenthesize its type in the signature, e.g.\n\tval {5}: int -> (int -> int)\ninstead of\n\tval {6}: int -> int -> int. + Das Modul "{0}" enthält\n {1} \nDie Signatur gibt aber Folgendes an:\n {2} \nDie Stelligkeit in der Signatur und in der Implementierung ist unterschiedlich. Laut Signatur ist "{3}" eine Funktionsdefinition oder ein lambda-Ausdruck, die bzw. der mindestens {4} Argument(e) akzeptiert, bei der Implementierung handelt es sich allerdings um einen berechneten Funktionswert. Um einen berechneten Funktionswert als zulässige Implementierung zu deklarieren, setzen Sie den Typ in der Signatur einfach in Klammern, z.B.\n\tval {5}: int -> (int -> int)\nanstatt\n\tval {6}: int -> int -> int. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe CLI member names differ + Das Modul "{0}" enthält\n {1} \nDie Signatur gibt aber Folgendes an:\n {2} \nDie CLI-Membernamen sind unterschiedlich. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is static and the other isn't + Das Modul "{0}" enthält\n {1} \nDie Signatur gibt aber Folgendes an:\n {2} \nEine statische Angabe steht einer nicht statischen gegenüber. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is virtual and the other isn't + Das Modul "{0}" enthält\n {1} \nDie Signatur gibt aber Folgendes an:\n {2} \nEine virtuelle Angabe steht einer nicht virtuellen gegenüber. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is abstract and the other isn't + Das Modul "{0}" enthält\n {1} \nDie Signatur gibt aber Folgendes an:\n {2} \nEine abstrakte Angabe steht einer nicht abstrakten gegenüber. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is final and the other isn't + Das Modul "{0}" enthält\n {1} \nDie Signatur gibt aber Folgendes an:\n {2} \nEine finale Angabe steht einer nicht finalen gegenüber. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is marked as an override and the other isn't + Das Modul "{0}" enthält\n {1} \nDie Signatur gibt aber Folgendes an:\n {2} \nEine Angabe ist als Überschreibung markiert, die andere nicht. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is a constructor/property and the other is not + Das Modul "{0}" enthält\n {1} \nDie Signatur gibt aber Folgendes an:\n {2} \nEine Angabe ist ein Konstruktor bzw. eine Eigenschaft, die andere nicht. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe compiled representation of this method is as a static member but the signature indicates its compiled representation is as an instance member + Das Modul "{0}" enthält\n {1} \nDie Signatur gibt aber Folgendes an:\n {2} \nDie kompilierte Darstellung dieser Methode ist ein statischer Member, laut Signatur ist sie aber eine kompilierte Darstellung als Instanzmember. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe compiled representation of this method is as an instance member, but the signature indicates its compiled representation is as a static member + Das Modul "{0}" enthält\n {1} \nDie Signatur gibt aber Folgendes an:\n {2} \nDie kompilierte Darstellung dieser Methode ist ein Instanzmember, laut Signatur ist sie aber eine kompilierte Darstellung als statischer Member. + + + + The {0} definitions in the signature and implementation are not compatible because the names differ. The type is called '{1}' in the signature file but '{2}' in implementation. + Die {0} Definitionen in der Signatur und in der Implementierung sind nicht kompatibel, weil die Namen unterschiedlich sind. Der Typ heißt "{1}" in der Signaturdatei, aber "{2}" in der Implementierung. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the respective type parameter counts differ + Die {0} Definitionen für den Typ "{1}" in der Signatur und in der Implementierung sind nicht kompatibel, weil die Anzahl der entsprechenden Typparameter unterschiedlich ist. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the accessibility specified in the signature is more than that specified in the implementation + Die {0} Definitionen für den Typ "{1}" in der Signatur und in der Implementierung sind nicht kompatibel, weil in der Signatur eine höhere Zugreifbarkeit angegeben ist als in der Implementierung. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature requires that the type supports the interface {2} but the interface has not been implemented + Die {0} Definitionen für den Typ "{1}" in der Signatur und in der Implementierung sind nicht kompatibel, weil die Signatur erfordert, dass der Typ die {2}-Schnittstelle unterstützt; diese Schnittstelle ist aber nicht implementiert. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation says this type may use nulls as a representation but the signature does not + Die {0} Definitionen für den Typ "{1}" in der Signatur und in der Implementierung sind nicht kompatibel, weil dieser Typ laut Implementierung NULL als Darstellung verwenden darf, laut Signatur aber nicht. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation says this type may use nulls as an extra value but the signature does not + Die {0} Definitionen für den Typ "{1}" in der Signatur und in der Implementierung sind nicht kompatibel, weil dieser Typ laut Implementierung NULL als zusätzlichen Wert verwenden darf, laut Signatur aber nicht. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature says this type may use nulls as a representation but the implementation does not + Die {0} Definitionen für den Typ "{1}" in der Signatur und in der Implementierung sind nicht kompatibel, weil dieser Typ laut Signatur NULL als Darstellung verwenden darf, laut Implementierung aber nicht. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature says this type may use nulls as an extra value but the implementation does not + Die {0} Definitionen für den Typ "{1}" in der Signatur und in der Implementierung sind nicht kompatibel, weil dieser Typ laut Signatur NULL als zusätzlichen Wert verwenden darf, laut Implementierung aber nicht. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation type is sealed but the signature implies it is not. Consider adding the [<Sealed>] attribute to the signature. + Die {0} Definitionen für den Typ "{1}" in der Signatur und in der Implementierung sind nicht kompatibel, weil der Implementierungstyp versiegelt ist, laut Signatur aber nicht versiegelt sein sollte. Fügen Sie der Signatur ggf. das [<Sealed>]-Attribut hinzu. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation type is not sealed but signature implies it is. Consider adding the [<Sealed>] attribute to the implementation. + Die {0} Definitionen für den Typ "{1}" in der Signatur und in der Implementierung sind nicht kompatibel, weil der Implementierungstyp nicht versiegelt ist, laut Signatur aber versiegelt sein sollte. Fügen Sie der Implementierung ggf. das [<Sealed>]-Attribut hinzu. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation is an abstract class but the signature is not. Consider adding the [<AbstractClass>] attribute to the signature. + Die {0} Definitionen für den Typ "{1}" in der Signatur und in der Implementierung sind nicht kompatibel, weil es sich bei der Implementierung um eine abstrakte Klasse handelt, bei der Signatur hingegen nicht. Fügen Sie der Signatur ggf. das [<AbstractClass>]-Attribut hinzu. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature is an abstract class but the implementation is not. Consider adding the [<AbstractClass>] attribute to the implementation. + Die {0} Definitionen für den Typ "{1}" in der Signatur und in der Implementierung sind nicht kompatibel, weil es sich bei der Signatur um eine abstrakte Klasse handelt, bei der Implementierung hingegen nicht. Fügen Sie der Implementierung ggf. das [<AbstractClass>]-Attribut hinzu. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the types have different base types + Die {0} Definitionen für den Typ "{1}" in der Signatur und in der Implementierung sind nicht kompatibel, weil die Typen unterschiedliche Basistypen aufweisen. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the number of {2}s differ + Die {0} Definitionen für den Typ "{1}" in der Signatur und in der Implementierung sind nicht kompatibel, weil die {2}-Anzahl unterschiedlich ist. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature defines the {2} '{3}' but the implementation does not (or does, but not in the same order) + Die {0} Definitionen für den Typ "{1}" in der Signatur und in der Implementierung sind nicht kompatibel, weil in der Signatur {2} "{3}" definiert ist, in der Implementierung aber nicht (oder nicht in der gleichen Reihenfolge). + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation defines the {2} '{3}' but the signature does not (or does, but not in the same order) + Die {0} Definitionen für den Typ "{1}" in der Signatur und in der Implementierung sind nicht kompatibel, weil in der Implementierung {2} "{3}" definiert ist, in der Signatur aber nicht (oder nicht in der gleichen Reihenfolge). + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation defines a struct but the signature defines a type with a hidden representation + Die {0} Definitionen für den Typ "{1}" in der Signatur und in der Implementierung sind nicht kompatibel, weil in der Implementierung eine Struktur definiert ist, in der Signatur hingegen ein Typ mit einer verborgenen Darstellung. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because a CLI type representation is being hidden by a signature + Die {0} Definitionen für den Typ "{1}" in der Signatur und in der Implementierung sind nicht kompatibel, weil eine CLI-Typdarstellung von einer Signatur verdeckt wird. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because a type representation is being hidden by a signature + Die {0} Definitionen für den Typ "{1}" in der Signatur und in der Implementierung sind nicht kompatibel, weil eine Typdarstellung von einer Signatur verdeckt wird. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the types are of different kinds + Die {0} Definitionen für den Typ "{1}" in der Signatur und in der Implementierung sind nicht kompatibel, weil die Typen unterschiedlich sind. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the IL representations differ + Die {0} Definitionen für den Typ "{1}" in der Signatur und in der Implementierung sind nicht kompatibel, weil die IL-Darstellungen unterschiedlich sind. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the representations differ + Die {0} Definitionen für den Typ "{1}" in der Signatur und in der Implementierung sind nicht kompatibel, weil die Darstellungen unterschiedlich sind. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the field {2} was present in the implementation but not in the signature + Die {0} Definitionen für den Typ "{1}" in der Signatur und in der Implementierung sind nicht kompatibel, weil das Feld "{2}" in der Implementierung vorhanden war, nicht aber in der Signatur. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the order of the fields is different in the signature and implementation + Die {0} Definitionen für den Typ "{1}" in der Signatur und in der Implementierung sind nicht kompatibel, weil die Reihenfolge der Felder in der Signatur und in der Implementierung unterschiedlich ist. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the field {2} was required by the signature but was not specified by the implementation + Die {0} Definitionen für den Typ "{1}" in der Signatur und in der Implementierung sind nicht kompatibel, weil das Feld "{2}" für die Signatur erforderlich war, in der Implementierung aber nicht angegeben wurde. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the field '{2}' was present in the implementation but not in the signature. Struct types must now reveal their fields in the signature for the type, though the fields may still be labelled 'private' or 'internal'. + Die {0} Definitionen für den Typ "{1}" in der Signatur und in der Implementierung sind nicht kompatibel, weil das Feld "{2}" in der Implementierung vorhanden war, nicht aber in der Signatur. Strukturtypen müssen jetzt ihre Felder in der Signatur für den Typ offen legen, auch wenn die Felder möglicherweise noch als "private" oder "internal" bezeichnet werden. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the abstract member '{2}' was required by the signature but was not specified by the implementation + Die {0} Definitionen für den Typ "{1}" in der Signatur und in der Implementierung sind nicht kompatibel, weil der abstrakte Member "{2}" für die Signatur erforderlich war, in der Implementierung aber nicht angegeben wurde. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the abstract member '{2}' was present in the implementation but not in the signature + Die {0} Definitionen für den Typ "{1}" in der Signatur und in der Implementierung sind nicht kompatibel, weil der abstrakte Member "{2}" in der Implementierung vorhanden war, nicht aber in der Signatur. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature declares a {2} while the implementation declares a {3} + Die {0} Definitionen für den Typ "{1}" in der Signatur und Implementierung sind nicht kompatibel, weil in der Signatur "{2}", in der Implementierung hingegen "{3}" deklariert wird. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the abbreviations differ: {2} versus {3} + Die {0} Definitionen für den Typ "{1}" in der Signatur und in der Implementierung sind aufgrund unterschiedlicher Abkürzungen nicht kompatibel: {2} und {3}. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because an abbreviation is being hidden by a signature. The abbreviation must be visible to other CLI languages. Consider making the abbreviation visible in the signature. + Die {0} Definitionen für den Typ "{1}" in der Signatur und in der Implementierung sind nicht kompatibel, weil eine Abkürzung von einer Signatur verdeckt wird. Die Abkürzung muss für andere CLI-Sprachen sichtbar sein. Sorgen Sie dafür, dass die Abkürzung in der Signatur sichtbar ist. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature has an abbreviation while the implementation does not + Die {0} Definitionen für den Typ "{1}" in der Signatur und in der Implementierung sind nicht kompatibel, weil die Signatur eine Abkürzung enthält, die Implementierung hingegen nicht. + + + + The module contains the constructor\n {0} \nbut its signature specifies\n {1} \nThe names differ + Das Modul enthält den Konstruktor\n {0} \nDie Signatur gibt aber Folgendes an:\n {1} \nDie Namen sind unterschiedlich. + + + + The module contains the constructor\n {0} \nbut its signature specifies\n {1} \nThe respective number of data fields differ + Das Modul enthält den Konstruktor\n {0} \nDie Signatur gibt aber Folgendes an:\n {1} \nDie entsprechende Anzahl von Datenfeldern ist unterschiedlich. + + + + The module contains the constructor\n {0} \nbut its signature specifies\n {1} \nThe types of the fields differ + Das Modul enthält den Konstruktor\n {0} \nDie Signatur gibt aber Folgendes an:\n {1} \nDie Typen der Felder sind unterschiedlich. + + + + The module contains the constructor\n {0} \nbut its signature specifies\n {1} \nthe accessibility specified in the signature is more than that specified in the implementation + Das Modul enthält den Konstruktor\n {0} \nDie Signatur gibt aber Folgendes an:\n {1} \nIn der Signatur ist eine höhere Zugreifbarkeit angegeben als in der Implementierung. + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe names differ + Das Modul enthält das Feld\n {0} \nDie Signatur gibt aber Folgendes an:\n {1} \nDie Namen sind unterschiedlich. + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nthe accessibility specified in the signature is more than that specified in the implementation + Das Modul enthält das Feld\n {0} \nDie Signatur gibt aber Folgendes an:\n {1} \nIn der Signatur ist eine höhere Zugreifbarkeit angegeben als in der Implementierung. + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe 'static' modifiers differ + Das Modul enthält das Feld\n {0} \nDie Signatur gibt aber Folgendes an:\n {1} \nDie static-Modifizierer sind unterschiedlich. + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe 'mutable' modifiers differ + Das Modul enthält das Feld\n {0} \nDie Signatur gibt aber Folgendes an:\n {1} \nDie mutable-Modifizierer sind unterschiedlich. + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe 'literal' modifiers differ + Das Modul enthält das Feld\n {0} \nDie Signatur gibt aber Folgendes an:\n {1} \nDie literal-Modifizierer sind unterschiedlich. + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe types differ + Das Modul enthält das Feld\n {0} \nDie Signatur gibt aber Folgendes an:\n {1} \nDie Typen sind unterschiedlich. + + + + The implicit instantiation of a generic construct at or near this point could not be resolved because it could resolve to multiple unrelated types, e.g. '{0}' and '{1}'. Consider using type annotations to resolve the ambiguity + Die implizite Instanziierung eines generischen Konstrukts an diesem Punkt oder in dessen Umgebung konnte nicht aufgelöst werden, weil sie zu mehreren unzusammenhängenden Typen aufgelöst werden könnte, z.B. "{0}" und "{1}". Verwenden Sie Typanmerkungen, um die Mehrdeutigkeit aufzulösen. + + + + Could not resolve the ambiguity inherent in the use of a 'printf'-style format string + Die inhärente Mehrdeutigkeit bei der Verwendung einer printf-Formatzeichenfolge konnte nicht aufgelöst werden. + + + + Could not resolve the ambiguity in the use of a generic construct with an 'enum' constraint at or near this position + Die Mehrdeutigkeit bei der Verwendung eines generischen Konstrukts mit einer enum-Einschränkung an dieser Position oder in ihrer Umgebung konnte nicht aufgelöst werden. + + + + Could not resolve the ambiguity in the use of a generic construct with a 'delegate' constraint at or near this position + Die Mehrdeutigkeit bei der Verwendung eines generischen Konstrukts mit einer delegate-Einschränkung an dieser Position oder in ihrer Umgebung konnte nicht aufgelöst werden. + + + + Invalid value + Ungültiger Wert. + + + + The signature and implementation are not compatible because the respective type parameter counts differ + Die Signatur und die Implementierung sind nicht kompatibel, da die Anzahl der entsprechenden Typparameter unterschiedlich ist. + + + + The signature and implementation are not compatible because the type parameter in the class/signature has a different compile-time requirement to the one in the member/implementation + Die Signatur und die Implementierung sind nicht kompatibel, da der Typparameter in der Klasse/Signatur eine andere Kompilierzeitanforderung stellt als der Member bzw. die Implementierung. + + + + The signature and implementation are not compatible because the declaration of the type parameter '{0}' requires a constraint of the form {1} + Die Signatur und die Implementierung sind nicht kompatibel, da die Deklaration des Typparameters "{0}" eine Einschränkung im Format "{1}" erfordert. + + + + The signature and implementation are not compatible because the type parameter '{0}' has a constraint of the form {1} but the implementation does not. Either remove this constraint from the signature or add it to the implementation. + Die Signatur und die Implementierung sind nicht kompatibel, da der Typparameter "{0}" eine Einschränkung im Format "{1}" aufweist, die Implementierung aber nicht. Entfernen Sie diese Einschränkung entweder aus der Signatur, oder fügen Sie sie der Implementierung hinzu. + + + + The type '{0}' implements 'System.IComparable'. Consider also adding an explicit override for 'Object.Equals' + Der Typ "{0}" implementiert "System.IComparable". Sie sollten ebenfalls eine explizite Überschreibung für "Object.Equals" hinzufügen. + + + + The type '{0}' implements 'System.IComparable' explicitly but provides no corresponding override for 'Object.Equals'. An implementation of 'Object.Equals' has been automatically provided, implemented via 'System.IComparable'. Consider implementing the override 'Object.Equals' explicitly + Der Typ "{0}" implementiert "System.IComparable" explizit, stellt aber keine entsprechende Überschreibung für "Object.Equals" bereit. Eine Implementierung von "Object.Equals" wurde automatisch über "System.IComparable" bereitgestellt. Implementieren Sie die Überschreibung "Object.Equals" explizit. + + + + The struct, record or union type '{0}' has an explicit implementation of 'Object.GetHashCode' or 'Object.Equals'. You must apply the 'CustomEquality' attribute to the type + Der Struktur-, Datensatz- oder Union-Typ "{0}" umfasst eine explizite Implementierung von "Object.GetHashCode" oder "Object.Equals". Sie müssen das CustomEquality-Attribut auf den Typ anwenden. + + + + The struct, record or union type '{0}' has an explicit implementation of 'Object.GetHashCode'. Consider implementing a matching override for 'Object.Equals(obj)' + Der Struktur-, Datensatz- oder Union-Typ "{0}" umfasst eine explizite Implementierung von "Object.GetHashCode". Implementieren Sie eine entsprechende Überschreibung für "Object.Equals(obj)". + + + + The struct, record or union type '{0}' has an explicit implementation of 'Object.Equals'. Consider implementing a matching override for 'Object.GetHashCode()' + Der Struktur-, Datensatz- oder Union-Typ "{0}" umfasst eine explizite Implementierung von "Object.Equals". Implementieren Sie eine entsprechende Überschreibung für "Object.GetHashCode()". + + + + The exception definitions are not compatible because a CLI exception mapping is being hidden by a signature. The exception mapping must be visible to other modules. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1} + Die Ausnahmedefinitionen sind nicht kompatibel, weil eine CLI-Ausnahmezuordnung von einer Signatur verdeckt wird. Die Ausnahmezuordnung muss für andere Module sichtbar sein. Das Modul enthält die Ausnahmedefinition\n {0} \nDie Signatur gibt aber Folgendes an:\n\t{1}. + + + + The exception definitions are not compatible because the CLI representations differ. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1} + Die Ausnahmedefinitionen sind nicht kompatibel, weil die CLI-Darstellungen unterschiedlich sind. Das Modul enthält die Ausnahmedefinition\n {0} \nDie Signatur gibt aber Folgendes an:\n\t{1}. + + + + The exception definitions are not compatible because the exception abbreviation is being hidden by the signature. The abbreviation must be visible to other CLI languages. Consider making the abbreviation visible in the signature. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1}. + Die Ausnahmedefinitionen sind nicht kompatibel, weil die Ausnahmeabkürzung von der Signatur verdeckt wird. Die Abkürzung muss für andere CLI-Sprachen sichtbar sein. Sorgen Sie dafür, dass die Abkürzung in der Signatur sichtbar ist. Das Modul enthält die Ausnahmedefinition\n {0} \nDie Signatur gibt aber Folgendes an:\n\t{1}. + + + + The exception definitions are not compatible because the exception abbreviations in the signature and implementation differ. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1}. + Die Ausnahmedefinitionen sind nicht kompatibel, weil die Ausnahmeabkürzungen in der Signatur und in der Implementierung unterschiedlich sind. Das Modul enthält die Ausnahmedefinition\n {0} \nDie Signatur gibt aber Folgendes an:\n\t{1}. + + + + The exception definitions are not compatible because the exception declarations differ. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1}. + Die Ausnahmedefinitionen sind nicht kompatibel, weil die Ausnahmedeklarationen unterschiedlich sind. Das Modul enthält die Ausnahmedefinition\n {0} \nDie Signatur gibt aber Folgendes an:\n\t{1}. + + + + The exception definitions are not compatible because the field '{0}' was required by the signature but was not specified by the implementation. The module contains the exception definition\n {1} \nbut its signature specifies\n\t{2}. + Die Ausnahmedefinitionen sind nicht kompatibel, weil das Feld "{0}" für die Signatur erforderlich war, in der Implementierung aber nicht angegeben wurde. Das Modul enthält die Ausnahmedefinition\n {1} \nDie Signatur gibt aber Folgendes an:\n\t{2}. + + + + The exception definitions are not compatible because the field '{0}' was present in the implementation but not in the signature. The module contains the exception definition\n {1} \nbut its signature specifies\n\t{2}. + Die Ausnahmedefinitionen sind nicht kompatibel, weil das Feld "{0}" in der Implementierung vorhanden war, aber nicht in der Signatur. Das Modul enthält die Ausnahmedefinition\n {1} \nDie Signatur gibt aber Folgendes an:\n\t{2}. + + + + The exception definitions are not compatible because the order of the fields is different in the signature and implementation. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1}. + Die Ausnahmedefinitionen sind nicht kompatibel, weil die Reihenfolge der Felder in der Signatur und in der Implementierung unterschiedlich ist. Das Modul enthält die Ausnahmedefinition\n {0} \nDie Signatur gibt aber Folgendes an:\n\t{1}. + + + + The namespace or module attributes differ between signature and implementation + Die Namespace- oder Modulattribute sind in Signatur und Implementierung unterschiedlich. + + + + This method is over-constrained in its type parameters + Diese Methode ist durch ihre Typparameter übermäßig eingeschränkt. + + + + No implementations of '{0}' had the correct number of arguments and type parameters. The required signature is '{1}'. + Keine Implementierung von "{0}" wies die richtige Anzahl von Argumenten und Typparametern auf. Die erforderliche Signatur lautet "{1}". + + + + The override for '{0}' was ambiguous + Die Überschreibung für "{0}" war mehrdeutig. + + + + More than one override implements '{0}' + {0} wird von mehr als einer Überschreibung implementiert. + + + + The method '{0}' is sealed and cannot be overridden + Die {0}-Methode ist versiegelt und kann nicht überschrieben werden. + + + + The override '{0}' implements more than one abstract slot, e.g. '{1}' and '{2}' + Die Überschreibung "{0}" implementiert mehr als einen abstrakten Umsetzungsplatz, z.B. "{1}" und "{2}". + + + + Duplicate or redundant interface + Doppelte oder redundante Schnittstelle. + + + + The interface '{0}' is included in multiple explicitly implemented interface types. Add an explicit implementation of this interface. + Die {0}-Schnittstelle ist in mehreren explizit implementierten Schnittstellentypen enthalten. Fügen Sie eine explizite Implementierung dieser Schnittstelle hinzu. + + + + A named argument has been assigned more than one value + Einem benannten Argument wurde mehr als ein Wert zugewiesen. + + + + No implementation was given for '{0}' + Für "{0}" wurde keine Implementierung angegeben. + + + + No implementation was given for '{0}'. Note that all interface members must be implemented and listed under an appropriate 'interface' declaration, e.g. 'interface ... with member ...'. + Für "{0}" wurde keine Implementierung angegeben. Alle Schnittstellenmember müssen implementiert und unter einer entsprechenden interface-Deklaration aufgeführt werden, z.B. "interface ... with member ...". + + + + The member '{0}' does not have the correct number of arguments. The required signature is '{1}'. + Der Member "{0}" weist nicht die richtige Anzahl von Argumenten auf. Die erforderliche Signatur lautet "{1}". + + + + The member '{0}' does not have the correct number of method type parameters. The required signature is '{1}'. + Der Member "{0}" weist nicht die richtige Anzahl von Methodentypparametern auf. Die erforderliche Signatur lautet "{1}". + + + + The member '{0}' does not have the correct kinds of generic parameters. The required signature is '{1}'. + Der Member "{0}" weist nicht die richtigen Arten von generischen Parametern auf. Die erforderliche Signatur lautet "{1}". + + + + The member '{0}' cannot be used to implement '{1}'. The required signature is '{2}'. + Der Member "{0}" kann nicht zur Implementierung von "{1}" verwendet werden. Die erforderliche Signatur lautet "{2}". + + + + Error while parsing embedded IL + Fehler beim Analysieren der eingebetteten IL. + + + + Error while parsing embedded IL type + Fehler beim Analysieren des eingebetteten IL-Typs. + + + + This indexer notation has been removed from the F# language + Diese Indexernotation wurde aus der Programmiersprache F# entfernt. + + + + Invalid expression on left of assignment + Ungültiger Ausdruck auf der linken Seite der Zuweisung. + + + + The 'ReferenceEquality' attribute cannot be used on structs. Consider using the 'StructuralEquality' attribute instead, or implement an override for 'System.Object.Equals(obj)'. + Das ReferenceEquality-Attribut darf nicht für Strukturen verwendet werden. Verwenden Sie stattdessen das StructuralEquality-Attribut, oder implementieren Sie eine Überschreibung für "System.Object.Equals(obj)". + + + + This type uses an invalid mix of the attributes 'NoEquality', 'ReferenceEquality', 'StructuralEquality', 'NoComparison' and 'StructuralComparison' + Dieser Typ verwendet eine unzulässige Kombination der Attribute "NoEquality", "ReferenceEquality", "StructuralEquality", "NoComparison" und "StructuralComparison". + + + + The 'NoEquality' attribute must be used in conjunction with the 'NoComparison' attribute + Das NoEquality-Attribut muss in Verbindung mit dem NoComparison-Attribut verwendet werden. + + + + The 'StructuralComparison' attribute must be used in conjunction with the 'StructuralEquality' attribute + Das StructuralComparison-Attribut muss in Verbindung mit dem StructuralEquality-Attribut verwendet werden. + + + + The 'StructuralEquality' attribute must be used in conjunction with the 'NoComparison' or 'StructuralComparison' attributes + Das StructuralEquality-Attribut muss in Verbindung mit den Attributen "NoComparison" oder "StructuralComparison" verwendet werden. + + + + A type cannot have both the 'ReferenceEquality' and 'StructuralEquality' or 'StructuralComparison' attributes + Ein Typ darf nicht gleichzeitig das ReferenceEquality-Attribut und die Attribute "StructuralEquality" oder "StructuralComparison" aufweisen. + + + + Only record, union, exception and struct types may be augmented with the 'ReferenceEquality', 'StructuralEquality' and 'StructuralComparison' attributes + Nur Datensatz-, Union-, Ausnahme- und Strukturtypen können mit den Attributen "ReferenceEquality", "StructuralEquality" und "StructuralComparison" augmentiert werden. + + + + A type with attribute 'ReferenceEquality' cannot have an explicit implementation of 'Object.Equals(obj)', 'System.IEquatable<_>' or 'System.Collections.IStructuralEquatable' + Ein Typ mit dem ReferenceEquality-Attribut darf keine explizite Implementierung von "Object.Equals(obj)", "System.IEquatable<_>" und/oder "System.Collections.IStructuralEquatable" aufweisen. + + + + A type with attribute 'CustomEquality' must have an explicit implementation of at least one of 'Object.Equals(obj)', 'System.IEquatable<_>' or 'System.Collections.IStructuralEquatable' + Ein Typ mit dem CustomEquality-Attribut erfordert die explizite Implementierung von "Object.Equals(obj)", "System.IEquatable<_>" und/oder "System.Collections.IStructuralEquatable". + + + + A type with attribute 'CustomComparison' must have an explicit implementation of at least one of 'System.IComparable' or 'System.Collections.IStructuralComparable' + Ein Typ mit dem CustomComparison-Attribut erfordert die explizite Implementierung von "System.IComparable" und/oder "System.Collections.IStructuralComparable". + + + + A type with attribute 'NoEquality' should not usually have an explicit implementation of 'Object.Equals(obj)'. Disable this warning if this is intentional for interoperability purposes + Ein Typ mit dem NoEquality-Attribut sollte in der Regel keine explizite Implementierung von "Object.Equals(obj)" aufweisen. Deaktivieren Sie diese Warnung, wenn diese Implementierung aus Interoperabilitätsgründen beabsichtigt ist. + + + + A type with attribute 'NoComparison' should not usually have an explicit implementation of 'System.IComparable', 'System.IComparable<_>' or 'System.Collections.IStructuralComparable'. Disable this warning if this is intentional for interoperability purposes + Ein Typ mit dem NoComparison-Attribut sollte in der Regel keine explizite Implementierung von "System.IComparable", "System.IComparable<_>" oder "System.Collections.IStructuralComparable" aufweisen. Deaktivieren Sie diese Warnung, wenn diese Implementierung aus Interoperabilitätsgründen beabsichtigt ist. + + + + The 'CustomEquality' attribute must be used in conjunction with the 'NoComparison' or 'CustomComparison' attributes + Das CustomEquality-Attribut muss in Verbindung mit den Attributen "NoComparison" oder "CustomComparison" verwendet werden. + + + + Positional specifiers are not permitted in format strings + Positionsspezifizierer sind in Formatzeichenfolgen nicht zulässig. + + + + Missing format specifier + Der Formatbezeichner fehlt. + + + + '{0}' flag set twice + {0}-Flag doppelt festgelegt. + + + + Prefix flag (' ' or '+') set twice + Präfixflag (" " oder "+") doppelt festgelegt. + + + + The # formatting modifier is invalid in F# + Der #-Formatierungsmodifizierer ist in F# ungültig. + + + + Bad precision in format specifier + Unzulässige Genauigkeitsangaben in Formatbezeichner. + + + + Bad width in format specifier + Unzulässige Breite in Formatbezeichner. + + + + '{0}' format does not support '0' flag + Das Format "{0}" unterstützt kein 0-Flag. + + + + Precision missing after the '.' + Genauigkeitsangaben nach dem "." fehlen. + + + + '{0}' format does not support precision + Das Format "{0}" unterstützt keine Genauigkeitsangaben. + + + + Bad format specifier (after l or L): Expected ld,li,lo,lu,lx or lX. In F# code you can use %d, %x, %o or %u instead, which are overloaded to work with all basic integer types. + Ungültiger Formatbezeichner (nach l oder L): Erwartet wurde ld, li, lo, lu, lx oder lX. In F#-Code können Sie stattdessen %d, %x, %o oder %u verwenden; diese Bezeichner sind überladen und funktionieren mit allen grundlegenden Integer-Typen. + + + + The 'l' or 'L' in this format specifier is unnecessary. In F# code you can use %d, %x, %o or %u instead, which are overloaded to work with all basic integer types. + Die Angabe von "l" oder "L" ist in diesem Formatbezeichner nicht erforderlich. In F#-Code können Sie stattdessen %d, %x, %o oder %u verwenden; diese Bezeichner sind überladen und funktionieren mit allen grundlegenden Integer-Typen. + + + + The 'h' or 'H' in this format specifier is unnecessary. You can use %d, %x, %o or %u instead, which are overloaded to work with all basic integer types. + Die Angabe von "h" oder "H" ist in diesem Formatbezeichner nicht erforderlich. Sie können stattdessen %d, %x, %o oder %u verwenden. Diese Bezeichner sind überladen und funktionieren mit allen grundlegenden Integertypen. + + + + '{0}' does not support prefix '{1}' flag + "{0}" unterstützt kein {1}-Präfixflag. + + + + Bad format specifier: '{0}' + Ungültiger Formatbezeichner: '{0}' + + + + System.Environment.Exit did not exit + System.Environment.Exit war nicht vorhanden. + + + + The treatment of this operator is now handled directly by the F# compiler and its meaning cannot be redefined + Die Behandlung dieses Operators erfolgt jetzt direkt durch den F#-Compiler; die Bedeutung kann nicht mehr geändert werden. + + + + A protected member is called or 'base' is being used. This is only allowed in the direct implementation of members since they could escape their object scope. + Entweder wird ein geschützter Member aufgerufen oder "base" verwendet. Dies ist nur bei der direkten Implementierung von Membern zulässig, da diese ihren Objektbereich mit Escapevorgängen außer Kraft setzen könnten. + + + + The byref-typed variable '{0}' is used in an invalid way. Byrefs cannot be captured by closures or passed to inner functions. + Die Verwendung der Variablen "{0}" vom Typ "byref" ist ungültig. Byrefs können nicht von Abschlüssen erfasst oder an innere Funktionen übergeben werden. + + + + The 'base' keyword is used in an invalid way. Base calls cannot be used in closures. Consider using a private member to make base calls. + Die Verwendung des Schlüsselworts "base" ist ungültig. Base-Aufrufe können nicht in Abschlüssen verwendet werden. Verwenden Sie einen privaten Member für base-Aufrufe. + + + + The variable '{0}' is used in an invalid way + Die Verwendung der Variablen "{0}" ist ungültig. + + + + The type '{0}' is less accessible than the value, member or type '{1}' it is used in. + Der Typ "{0}" ist weniger zugreifbar als der Wert, Member oder Typ "{1}", in dem er verwendet wird. + + + + 'System.Void' can only be used as 'typeof<System.Void>' in F# + System.Void kann in F# nur als "typeof<System.Void>" verwendet werden. + + + + A type instantiation involves a byref type. This is not permitted by the rules of Common IL. + Eine Typinstanziierung enthält einen byref-Typ. Dies ist nach den Regeln der Common IL nicht zulässig. + + + + Calls to 'reraise' may only occur directly in a handler of a try-with + Aufrufe von "reraise" dürfen nicht direkt in einem Handler für "try-with" auftreten. + + + + Expression-splicing operators may only be used within quotations + Splice-Operatoren für Ausdrücke dürfen nur in Anführungszeichen verwendet werden. + + + + First-class uses of the expression-splicing operator are not permitted + Die Verwendung des expression-splicing-Operators in der ersten Klasse ist nicht zulässig. + + + + First-class uses of the address-of operators are not permitted + Die Verwendung der address-of-Operatoren in der ersten Klasse ist nicht zulässig. + + + + First-class uses of the 'reraise' function is not permitted + Die Verwendung der reraise-Funktion in der ersten Klasse ist nicht zulässig. + + + + The byref typed value '{0}' cannot be used at this point + Der Wert "{0}" vom Typ "byref" kann an diesem Punkt nicht verwendet werden. + + + + 'base' values may only be used to make direct calls to the base implementations of overridden members + base-Werte dürfen nur für direkte Aufrufe der Basisimplementierungen von überschriebenen Membern verwendet werden. + + + + Object constructors cannot directly use try/with and try/finally prior to the initialization of the object. This includes constructs such as 'for x in ...' that may elaborate to uses of these constructs. This is a limitation imposed by Common IL. + Objektkonstruktoren dürfen "try/with" und "try/finally" vor der Initialisierung des Objekts nicht direkt verwenden. Dies umfasst Konstrukte wie "for x in ...", bei denen diese Konstrukte u.U. verwendet werden. Dies ist eine Einschränkung der Common IL. + + + + The address of the variable '{0}' cannot be used at this point + Die Adresse der Variablen "{0}" kann an diesem Punkt nicht verwendet werden. + + + + The address of the static field '{0}' cannot be used at this point + Die Adresse des statischen Felds "{0}" kann an diesem Punkt nicht verwendet werden. + + + + The address of the field '{0}' cannot be used at this point + Die Adresse des Felds "{0}" kann an diesem Punkt nicht verwendet werden. + + + + The address of an array element cannot be used at this point + Die Adresse eines Arrayelements kann an diesem Punkt nicht verwendet werden. + + + + The type of a first-class function cannot contain byrefs + Der Typ einer Funktion erster Klasse darf keine Byrefs enthalten. + + + + A method return type would contain byrefs which is not permitted + Ein Methodenrückgabetyp würde Byrefs enthalten; das ist nicht zulässig. + + + + Invalid custom attribute value (not a constant or literal) + Ungültiger benutzerdefinierter Attributwert (keine Konstante und kein Literal). + + + + The attribute type '{0}' has 'AllowMultiple=false'. Multiple instances of this attribute cannot be attached to a single language element. + Für den Attributtyp "{0}" ist "AllowMultiple=false" festgelegt. Mehrere Instanzen dieses Attributs können nicht einem einzigen Sprachelement angefügt werden. + + + + The member '{0}' is used in an invalid way. A use of '{1}' has been inferred prior to its definition at or near '{2}'. This is an invalid forward reference. + Die Verwendung des Members "{0}" ist ungültig. Die Verwendung von "{1}" wurde vor der Definition bei oder in der Nähe von "{2}" per Rückschluss abgeleitet. Dies ist ein ungültiger Vorwärtsverweis. + + + + A byref typed value would be stored here. Top-level let-bound byref values are not permitted. + Ein Wert vom Typ "byref" würde hier gespeichert werden. byref-Werte der obersten Ebene vom Typ "let-bound" sind nicht zulässig. + + + + [<ReflectedDefinition>] terms cannot contain uses of the prefix splice operator '%' + [<ReflectedDefinition>]-Begriffe dürfen keinen Präfix-Splice-Operator "%" enthalten. + + + + A function labeled with the 'EntryPointAttribute' attribute must be the last declaration in the last file in the compilation sequence. + Eine Funktion mit dem EntryPointAttribute-Attribut muss die letzte Deklaration in der letzten Datei der Kompilierungssequenz sein. + + + + compiled form of the union case + kompilierte Form des Union-Falls + + + + default augmentation of the union case + Standardaugmentation des Union-Falls + + + + The property '{0}' has the same name as a method in type '{1}'. + Die Eigenschaft "{0}" hat denselben Namen wie eine Methode im Typ "{1}". + + + + The property '{0}' of type '{1}' has a getter and a setter that do not match. If one is abstract then the other must be as well. + Der Getter und der Setter der Eigenschaft "{0}" vom Typ "{1}" stimmen nicht überein. Wenn einer abstrakt ist, muss es der andere ebenfalls sein. + + + + The property '{0}' has the same name as another property in type '{1}', but one takes indexer arguments and the other does not. You may be missing an indexer argument to one of your properties. + Die Eigenschaft "{0}" hat denselben Namen wie eine andere Eigenschaft im Typ "{1}", allerdings akzeptiert eine Eigenschaft Indexerargumente und die andere nicht. Möglicherweise fehlt ein Indexerargument für eine der Eigenschaften. + + + + A type would store a byref typed value. This is not permitted by Common IL. + In einem Typ würde ein Wert vom Typ "byref" gespeichert werden. Dies ist mit der Common IL nicht zulässig. + + + + Duplicate method. The method '{0}' has the same name and signature as another method in type '{1}'. + Doppelte Methode. Die Methode "{0}" hat denselben Namen und dieselbe Signatur wie eine andere Methode im Typ "{1}". + + + + Duplicate method. The method '{0}' has the same name and signature as another method in type '{1}' once tuples, functions, units of measure and/or provided types are erased. + Doppelte Methode. Die Methode "{0}" hat denselben Namen und dieselbe Signatur wie eine andere Methode im Typ "{1}", nachdem Tupel, Funktionen, Maßeinheiten und/oder angegebene Typen gelöscht wurden. + + + + The method '{0}' has curried arguments but has the same name as another method in type '{1}'. Methods with curried arguments cannot be overloaded. Consider using a method taking tupled arguments. + Die Methode "{0}" enthält Curryargumente, hat aber denselben Namen wie eine andere Methode im Typ "{1}". Methoden mit Curryargumenten dürfen nicht überladen werden. Verwenden Sie ggf. eine Methode, die Tupelargumente akzeptiert. + + + + Methods with curried arguments cannot declare 'out', 'ParamArray', 'optional', 'ReflectedDefinition', 'byref', 'CallerLineNumber', 'CallerMemberName', or 'CallerFilePath' arguments + Methoden mit Curry-Argumenten dürfen keine out-, ParamArray-, optional-, ReflectedDefinition-, byref-, CallerLineNumber-, CallerMemberName- oder CallerFilePath-Argumente deklarieren. + + + + Duplicate property. The property '{0}' has the same name and signature as another property in type '{1}'. + Doppelte Eigenschaft. Die Eigenschaft "{0}" hat denselben Namen und dieselbe Signatur wie eine andere Eigenschaft im Typ "{1}". + + + + Duplicate property. The property '{0}' has the same name and signature as another property in type '{1}' once tuples, functions, units of measure and/or provided types are erased. + Doppelte Eigenschaft. Die Eigenschaft "{0}" hat denselben Namen und dieselbe Signatur wie in eine andere Eigenschaft im Typ "{1}", nachdem Tupel, Funktionen, Maßeinheiten und/oder angegebene Typen gelöscht wurden. + + + + Duplicate method. The abstract method '{0}' has the same name and signature as an abstract method in an inherited type. + Doppelte Methode. Die abstrakte {0}-Methode hat denselben Namen und dieselbe Signatur wie eine abstrakte Methode in einem geerbten Typ. + + + + Duplicate method. The abstract method '{0}' has the same name and signature as an abstract method in an inherited type once tuples, functions, units of measure and/or provided types are erased. + Doppelte Methode. Die abstrakte {0}-Methode hat denselben Namen und dieselbe Signatur wie in eine abstrakte Methode in einem geerbten Typ, nachdem Tupel, Funktionen, Maßeinheiten und/oder angegebene Typen gelöscht wurden. + + + + This type implements the same interface at different generic instantiations '{0}' and '{1}'. This is not permitted in this version of F#. + Dieser Typ implementiert dieselbe Schnittstelle mit den unterschiedlichen generischen Instanziierungen "{0}" und "{1}". Dies ist in dieser Version von F# nicht zulässig. + + + + The type of a field using the 'DefaultValue' attribute must admit default initialization, i.e. have 'null' as a proper value or be a struct type whose fields all admit default initialization. You can use 'DefaultValue(false)' to disable this check + Der Typ eines Felds mit dem DefaultValue-Attribut muss die Standardinitialisierung zulassen, also NULL als eigenen Wert aufweisen oder ein Strukturtyp sein, dessen Felder alle die Standardinitialisierung zulassen. Mit "DefaultValue(false)" können Sie diese Prüfung deaktivieren. + + + + The type abbreviation contains byrefs. This is not permitted by F#. + Die Typabkürzung enthält Byrefs. Dies ist in F# nicht zulässig. + + + + The variable '{0}' is bound in a quotation but is used as part of a spliced expression. This is not permitted since it may escape its scope. + Die Variable "{0}" ist in Anführungszeichen gebunden, wird aber in einem Splice-Ausdruck verwendet. Dies ist nicht zulässig, da dadurch der Bereich mittels Escapevorgängen außer Kraft gesetzt werden kann. + + + + Quotations cannot contain uses of generic expressions + Anführungszeichen dürfen keine generischen Ausdrücke enthalten. + + + + Quotations cannot contain function definitions that are inferred or declared to be generic. Consider adding some type constraints to make this a valid quoted expression. + Anführungszeichen dürfen keine Funktionsdefinitionen enthalten, die per Rückschluss abgeleitet sind oder als generisch deklariert werden. Fügen Sie Typeinschränkungen hinzu, damit dieser Ausdruck in Anführungszeichen gültig wird. + + + + Quotations cannot contain object expressions + Anführungszeichen dürfen keine Objektausdrücke enthalten. + + + + Quotations cannot contain expressions that take the address of a field + Anführungszeichen dürfen keine Ausdrücke enthalten, die die Adresse eines Felds aufnehmen. + + + + Quotations cannot contain expressions that fetch static fields + Anführungszeichen dürfen keine Ausdrücke enthalten, die statische Felder abrufen. + + + + Quotations cannot contain inline assembly code or pattern matching on arrays + Anführungszeichen dürfen keinen Inlineassemblycode oder Mustervergleich für Arrays enthalten. + + + + Quotations cannot contain descending for loops + Anführungszeichen dürfen keine absteigenden For-Schleifen enthalten. + + + + Quotations cannot contain expressions that fetch union case indexes + Anführungszeichen dürfen keine Ausdrücke enthalten, die Union-Fallindizes abrufen. + + + + Quotations cannot contain expressions that set union case fields + Anführungszeichen dürfen keine Ausdrücke enthalten, die Union-Fallfelder festlegen. + + + + Quotations cannot contain expressions that set fields in exception values + Anführungszeichen dürfen keine Ausdrücke enthalten, die Felder in Ausnahmewerten festlegen. + + + + Quotations cannot contain expressions that require byref pointers + Anführungszeichen dürfen keine Ausdrücke enthalten, die byref-Zeiger erfordern. + + + + Quotations cannot contain expressions that make member constraint calls, or uses of operators that implicitly resolve to a member constraint call + Anführungszeichen dürfen keine Ausdrücke, die Membereinschränkungsaufrufe durchführen, oder Operatorverwendungen enthalten, die implizit in einen Membereinschränkungsaufruf aufgelöst werden. + + + + Quotations cannot contain this kind of constant + Anführungszeichen dürfen diese Art von Konstante nicht enthalten. + + + + Quotations cannot contain this kind of pattern match + Anführungszeichen dürfen diese Art von Mustervergleich nicht enthalten. + + + + Quotations cannot contain array pattern matching + Anführungszeichen dürfen keinen Arraymustervergleich enthalten. + + + + Quotations cannot contain this kind of type + Anführungszeichen dürfen diese Art von Typ nicht enthalten. + + + + The declared type parameter '{0}' cannot be used here since the type parameter cannot be resolved at compile time + Der deklarierte Typparameter "{0}" kann an dieser Stelle nicht verwendet werden, weil der Typparameter zur Kompilierzeit nicht aufgelöst werden kann. + + + + This code is less generic than indicated by its annotations. A unit-of-measure specified using '_' has been determined to be '1', i.e. dimensionless. Consider making the code generic, or removing the use of '_'. + Dieser Code ist weniger generisch, als aus seinen Anmerkungen hervorgeht. Eine mit "_" angegebene Maßeinheit ist "1", also ohne Dimension. Machen Sie den Code generisch, oder entfernen Sie "_". + + + + Type inference problem too complicated (maximum iteration depth reached). Consider adding further type annotations. + Problem beim Rückschluss von Typen ist zu komplex (maximale Iterationstiefe erreicht). Fügen Sie ggf. weitere Typanmerkungen hinzu. + + + + Expected arguments to an instance member + Argumente für einen Instanzmember wurden erwartet. + + + + This indexer expects {0} arguments but is here given {1} + Dieser Indexer erwartet {0} Argumente, erhält hier aber {1}. + + + + Expecting a type supporting the operator '{0}' but given a function type. You may be missing an argument to a function. + Ein unterstützender Typ für den Operator "{0}" wurde erwartet, aber ein Funktionstyp wurde empfangen. Möglicherweise fehlt ein Argument für eine Funktion. + + + + Expecting a type supporting the operator '{0}' but given a tuple type + Ein unterstützender Typ für den Operator '{0}' wurde erwartet, aber ein Tupeltyp wurde empfangen + + + + None of the types '{0}' support the operator '{1}' + Der Operator '{1}' wird von keinem der Typen '{0}' unterstützt + + + + The type '{0}' does not support the operator '{1}' + Der Operator '{1}' wird vom Typ '{0}' nicht unterstützt + + + + None of the types '{0}' support the operator '{1}'. Consider opening the module 'Microsoft.FSharp.Linq.NullableOperators'. + Der Operator '{1}' wird von keinem der Typen '{0}' unterstützt. Möglicherweise sollte das Modul 'Microsoft.FSharp.Linq.NullableOperators' geöffnet werden. + + + + The type '{0}' does not support the operator '{1}'. Consider opening the module 'Microsoft.FSharp.Linq.NullableOperators'. + Der Operator '{1}' wird vom Typ '{0}' nicht unterstützt. Möglicherweise sollte das Modul 'Microsoft.FSharp.Linq.NullableOperators' geöffnet werden. + + + + The type '{0}' does not support a conversion to the type '{1}' + Der Typ "{0}" unterstützt die Konvertierung in den Typ "{1}" nicht. + + + + The type '{0}' has a method '{1}' (full name '{2}'), but the method is static + Der Typ "{0}" enthält die {1}-Methode (vollständiger Name "{2}"), die Methode ist aber statisch. + + + + The type '{0}' has a method '{1}' (full name '{2}'), but the method is not static + Der Typ "{0}" enthält die {1}-Methode (vollständiger Name "{2}"), die Methode ist aber nicht statisch. + + + + The constraints 'struct' and 'not struct' are inconsistent + Die Einschränkungen "struct" und "not struct" sind nicht konsistent. + + + + The type '{0}' does not have 'null' as a proper value + Der Typ "{0}" weist nicht NULL als eigenen Wert auf. + + + + The type '{0}' does not have 'null' as a proper value. To create a null value for a Nullable type use 'System.Nullable()'. + Der Typ '{0}' weist nicht NULL als eigenen Wert auf. Zum Erstellen eines NULL-Werts für einen Typ, der NULL-Werte zulässt, 'System.Nullable()' verwenden. + + + + The type '{0}' does not support the 'comparison' constraint because it has the 'NoComparison' attribute + Der Typ "{0}" unterstützt die comparison-Einschränkung nicht, weil er das NoComparison-Attribut aufweist. + + + + The type '{0}' does not support the 'comparison' constraint. For example, it does not support the 'System.IComparable' interface + Der Typ "{0}" unterstützt die comparison-Einschränkung nicht. Beispielsweise unterstützt er die System.IComparable-Schnittstelle nicht. + + + + The type '{0}' does not support the 'comparison' constraint because it is a record, union or struct with one or more structural element types which do not support the 'comparison' constraint. Either avoid the use of comparison with this type, or add the 'StructuralComparison' attribute to the type to determine which field type does not support comparison + Der Typ "{0}" unterstützt die comparison-Einschränkung nicht, weil es sich um einen Datensatz, eine Union oder Struktur mit mindestens einem Strukturelementtyp handelt, der die comparison-Einschränkung nicht unterstützt. Verwenden Sie entweder keinen Vergleich in Verbindung mit diesem Typ, oder fügen Sie dem Typ das StructuralComparison-Attribut hinzu, um festzustellen, von welchem Feldtyp der Vergleich nicht unterstützt wird. + + + + The type '{0}' does not support the 'equality' constraint because it has the 'NoEquality' attribute + Der Typ "{0}" unterstützt die equality-Einschränkung nicht, weil er das NoEquality-Attribut aufweist. + + + + The type '{0}' does not support the 'equality' constraint because it is a function type + Der Typ "{0}" unterstützt die equality-Einschränkung nicht, weil es sich um einen Funktionstyp handelt. + + + + The type '{0}' does not support the 'equality' constraint because it is a record, union or struct with one or more structural element types which do not support the 'equality' constraint. Either avoid the use of equality with this type, or add the 'StructuralEquality' attribute to the type to determine which field type does not support equality + Der Typ "{0}" unterstützt die equality-Einschränkung nicht, weil es sich um einen Datensatz, eine Union oder Struktur mit mindestens einem Strukturelementtyp handelt, der die equality-Einschränkung nicht unterstützt. Verwenden Sie entweder keine Gleichheit in Verbindung mit diesem Typ, oder fügen Sie dem Typ das StructuralEquality-Attribut hinzu, um festzustellen, von welchem Feldtyp die Gleichheit nicht unterstützt wird. + + + + The type '{0}' is not a CLI enum type + Der Typ "{0}" ist kein CLI-Enumerationstyp. + + + + The type '{0}' has a non-standard delegate type + Der Typ "{0}" hat einen nicht standardmäßigen Delegattyp. + + + + The type '{0}' is not a CLI delegate type + Der Typ "{0}" ist kein CLI-Delegattyp. + + + + This type parameter cannot be instantiated to 'Nullable'. This is a restriction imposed in order to ensure the meaning of 'null' in some CLI languages is not confusing when used in conjunction with 'Nullable' values. + Dieser Typparameter kann nicht auf "Nullable" instanziiert werden. Diese Einschränkung soll sicherstellen, dass die Bedeutung von NULL in manchen CLI-Sprachen in Verbindung mit Nullable-Werten nicht verwirrend ist. + + + + A generic construct requires that the type '{0}' is a CLI or F# struct type + Für ein generisches Konstrukt muss der Typ "{0}" ein CLI- oder F#-Strukturtyp sein. + + + + A generic construct requires that the type '{0}' is an unmanaged type + Für ein generisches Konstrukt muss es sich beim Typ "{0}" um einen nicht verwalteten Typ handeln. + + + + The type '{0}' is not compatible with any of the types {1}, arising from the use of a printf-style format string + Der Typ "{0}" ist mit keinem der Typen "{1}" kompatibel; dies ist die Folge der Verwendung einer printf-Formatzeichenfolge. + + + + A generic construct requires that the type '{0}' have reference semantics, but it does not, i.e. it is a struct + Für ein generisches Konstrukt muss der Typ "{0}" Verweissemantik aufweisen; dies ist aber nicht der Fall, es handelt sich also um eine Struktur. + + + + A generic construct requires that the type '{0}' be non-abstract + Für ein generisches Konstrukt muss der Typ "{0}" nicht abstrakt sein. + + + + A generic construct requires that the type '{0}' have a public default constructor + Für ein generisches Konstrukt muss der Typ "{0}" einen öffentlichen Standardkonstruktor aufweisen. + + + + Type instantiation length mismatch + Typinstanziierungslänge stimmt nicht überein. + + + + Optional arguments not permitted here + Optionale Argumente sind hier nicht zulässig. + + + + {0} is not a static member + {0} ist kein statischer Member. + + + + {0} is not an instance member + {0} ist kein Instanzmember. + + + + Argument length mismatch + Argumentlänge stimmt nicht überein. + + + + The argument types don't match + Argumenttypen stimmen nicht überein. + + + + This method expects a CLI 'params' parameter in this position. 'params' is a way of passing a variable number of arguments to a method in languages such as C#. Consider passing an array for this argument + Diese Methode erwartet an dieser Position den CLI-Parameter "params". Mit "params" kann in Programmiersprachen wie C# eine variable Zahl von Argumenten an eine Methode übergeben werden. Übergeben Sie ein Array für dieses Argument. + + + + The member or object constructor '{0}' is not {1} + Der Member oder Objektkonstruktor "{0}" ist nicht {1}. + + + + The member or object constructor '{0}' is not {1}. Private members may only be accessed from within the declaring type. Protected members may only be accessed from an extending type and cannot be accessed from inner lambda expressions. + Der Member oder Objektkonstruktor "{0}" ist nicht {1}. Auf private Member darf nur innerhalb des deklarierenden Typs zugegriffen werden. Auf geschützte Member darf nur von einem erweiternden Typ zugegriffen werden; der Zugriff von inneren lambda-Ausdrücken ist nicht zulässig. + + + + {0} is not a static method + {0} ist keine statische Methode. + + + + {0} is not an instance method + {0} ist keine Instanzmethode. + + + + The member or object constructor '{0}' has no argument or settable return property '{1}'. {2}. + Der Member oder Objektkonstruktor "{0}" enthält kein Argument und keine festlegbare Rückgabeeigenschaft "{1}". {2}. + + + + The object constructor '{0}' has no argument or settable return property '{1}'. {2}. + Der Objektkonstruktor "{0}" besitzt kein Argument oder keine festlegbare Rückgabeeigenschaft "{1}". {2}. + + + + The required signature is {0} + Die erforderliche Signatur ist {0}. + + + + The member or object constructor '{0}' requires {1} argument(s). The required signature is '{2}'. + Der Member oder Objektkonstruktor "{0}" erfordert {1} Argument(e). Die erforderliche Signatur lautet "{2}". + + + + The member or object constructor '{0}' requires {1} additional argument(s). The required signature is '{2}'. + Der Member oder Objektkonstruktor "{0}" erfordert {1} zusätzliche(s) Argument(e). Die erforderliche Signatur lautet "{2}". + + + + The member or object constructor '{0}' requires {1} argument(s). The required signature is '{2}'. Some names for missing arguments are {3}. + Der Member oder Objektkonstruktor "{0}" erfordert {1} Argument(e). Die erforderliche Signatur lautet "{2}". Einige fehlende Argumente sind {3}. + + + + The member or object constructor '{0}' requires {1} additional argument(s). The required signature is '{2}'. Some names for missing arguments are {3}. + Der Member oder Objektkonstruktor "{0}" erfordert {1} zusätzliche(s) Argument(e). Die erforderliche Signatur lautet "{2}". Einige fehlende Argumente sind {3}. + + + + The member or object constructor '{0}' requires {1} argument(s) but is here given {2} unnamed and {3} named argument(s). The required signature is '{4}'. + Der Member oder Objektkonstruktor "{0}" erfordert {1} Argument(e), erhält hier aber {2} unbenannte(s) und {3} benannte(s) Argument(e). Die erforderliche Signatur lautet "{4}". + + + + The member or object constructor '{0}' takes {1} argument(s) but is here given {2}. The required signature is '{3}'. + Der Member oder Objektkonstruktor "{0}" akzeptiert {1} Argument(e), erhält hier aber {2}. Die erforderliche Signatur lautet "{3}". + + + + The object constructor '{0}' takes {1} argument(s) but is here given {2}. The required signature is '{3}'. + Der Objektkonstruktor "{0}" akzeptiert {1} Argument(e), erhält hier aber {2}. Die erforderliche Signatur ist "{3}". + + + + The object constructor '{0}' takes {1} argument(s) but is here given {2}. The required signature is '{3}'. If some of the arguments are meant to assign values to properties, consider separating those arguments with a comma (','). + Der Objektkonstruktor "{0}" akzeptiert {1} Argument(e), erhält hier aber {2}. Die erforderliche Signatur ist "{3}". Wenn bestimmte Argumente Eigenschaften Werte zuordnen sollen, trennen Sie diese Argumente mit einem Komma (","). + + + + The member or object constructor '{0}' takes {1} type argument(s) but is here given {2}. The required signature is '{3}'. + Der Member oder Objektkonstruktor "{0}" akzeptiert {1} Typargument(e), erhält hier aber {2}. Die erforderliche Signatur lautet "{3}". + + + + A member or object constructor '{0}' taking {1} arguments is not accessible from this code location. All accessible versions of method '{2}' take {3} arguments. + Auf einen Member oder Objektkonstruktor "{0}", der {1} Argumente akzeptiert, kann von dieser Position im Code nicht zugegriffen werden. Alle zugreifbaren Versionen der {2}-Methode nehmen {3} Argumente an. + + + + Incorrect generic instantiation. No {0} member named '{1}' takes {2} generic arguments. + Fehlerhafte generische Instanziierung. Kein {0}-Member namens "{1}" akzeptiert {2} generische Argumente. + + + + The member or object constructor '{0}' does not take {1} argument(s). An overload was found taking {2} arguments. + Der Member oder Objektkonstruktor "{0}" akzeptiert {1} Argument(e) nicht. Eine Überladung wurde gefunden, die {2} Argumente akzeptiert. + + + + No {0} member or object constructor named '{1}' takes {2} arguments + Kein {0}-Member oder -Objektkonstruktor namens "{1}" akzeptiert {2} Argumente. + + + + No {0} member or object constructor named '{1}' takes {2} arguments. Note the call to this member also provides {3} named arguments. + Kein {0}-Member oder -Objektkonstruktor namens "{1}" akzeptiert {2} Argumente. Beachten Sie, dass ein Aufruf dieses Members ebenfalls {3} benannte Argumente bereitstellt. + + + + No {0} member or object constructor named '{1}' takes {2} arguments. The named argument '{3}' doesn't correspond to any argument or settable return property for any overload. + Kein {0}-Member oder -Objektkonstruktor namens "{1}" akzeptiert {2} Argumente. Das benannte Argument "{3}" entspricht keinem Argument und keiner festlegbaren Rückgabeeigenschaft für eine Überladung. + + + + Method or object constructor '{0}' not found + Methode oder Objektkonstruktor "{0}" wurde nicht gefunden. + + + + No overloads match for method '{0}'. + Keine passenden Überladungen für die Methode '{0}' vorhanden. + + + + A unique overload for method '{0}' could not be determined based on type information prior to this program point. A type annotation may be needed. + Eine eindeutige Überladung für Methode '{0}' konnte nicht auf Basis von Typinformationen vor diesem Programmpunkt bestimmt werden. Unter Umständen ist eine Typanmerkung erforderlich. + + + + Candidates: {0} + Kandidaten: {0} + + + + The available overloads are shown below. + Die verfügbaren Überladungen werden unten angezeigt. + + + + Accessibility modifiers are not permitted on 'do' bindings, but '{0}' was given. + Zugriffsmodifizierer sind für "do"-Bindungen nicht zulässig, "{0}" wurde jedoch angegeben. + + + + End of file in #if section begun at or after here + Dateiende in einem #if-Abschnitt, der an oder vor dieser Stelle begonnen wurde. + + + + End of file in string begun at or before here + Dateiende in einer Zeichenfolge, die an oder vor dieser Stelle begonnen wurde. + + + + End of file in verbatim string begun at or before here + Dateiende in einer ausführlichen Zeichenfolge, die an oder vor dieser Stelle begonnen wurde. + + + + End of file in comment begun at or before here + Dateiende in einem Kommentar, der an oder vor dieser Stelle begonnen wurde. + + + + End of file in string embedded in comment begun at or before here + Dateiende in einer in den Kommentar eingebetteten Zeichenfolge, die an oder vor dieser Stelle begonnen wurde. + + + + End of file in verbatim string embedded in comment begun at or before here + Dateiende in einer in den Kommentar eingebetteten ausführlichen Zeichenfolge, die an oder vor dieser Stelle begonnen wurde. + + + + End of file in IF-OCAML section begun at or before here + Dateiende in einem IF-OCAML-Abschnitt, der an oder vor dieser Stelle begonnen wurde. + + + + End of file in directive begun at or before here + Dateiende in einer Direktive, die an oder vor dieser Stelle begonnen wurde. + + + + No #endif found for #if or #else + Kein #endif für #if oder #else gefunden. + + + + Attributes have been ignored in this construct + Attribute wurden in diesem Konstrukt ignoriert. + + + + 'use' bindings are not permitted in primary constructors + use-Bindungen sind in primären Konstruktoren unzulässig. + + + + 'use' bindings are not permitted in modules and are treated as 'let' bindings + use-Bindungen sind in Modulen nicht zulässig und werden als let-Bindungen behandelt. + + + + An integer for loop must use a simple identifier + Eine Integer-for-Schleife muss einen einfachen Bezeichner verwenden. + + + + At most one 'with' augmentation is permitted + Es ist maximal eine with-Augmentation zulässig. + + + + A semicolon is not expected at this point + An dieser Stelle wird kein Semikolon erwartet. + + + + Unexpected end of input + Unerwartetes Ende der Eingabe + + + + Accessibility modifiers are not permitted here, but '{0}' was given. + Zugriffsmodifizierer sind an dieser Stelle nicht zulässig, "{0}" wurde jedoch angegeben. + + + + Only '#' compiler directives may occur prior to the first 'namespace' declaration + Nur #-Compilerdirektiven dürfen vor der ersten namespace-Deklaration auftreten. + + + + Accessibility modifiers should come immediately prior to the identifier naming a construct + Zugriffsmodifizierer sollten unmittelbar vor dem Bezeichner eines Konstrukts aufgeführt sein. + + + + Files should begin with either a namespace or module declaration, e.g. 'namespace SomeNamespace.SubNamespace' or 'module SomeNamespace.SomeModule', but not both. To define a module within a namespace use 'module SomeModule = ...' + Dateien sollten mit einer Namespace- oder einer Moduldeklaration beginnen, z.B. "namespace SomeNamespace.SubNamespace" oder "module SomeNamespace.SomeModule", aber nicht mit beidem. Verwenden Sie "module SomeModule = ...", um ein Modul in einem Namespace zu definieren. + + + + A module abbreviation must be a simple name, not a path + Eine Modulabkürzung muss ein einfacher Name sein, kein Pfad. + + + + Ignoring attributes on module abbreviation + Attribute für Modulabkürzung werden ignoriert. + + + + The '{0}' accessibility attribute is not allowed on module abbreviation. Module abbreviations are always private. + Das Zugriffsattribut "{0}" ist für die Modulabkürzung nicht zulässig. Modulabkürzungen sind immer privat. + + + + The '{0}' visibility attribute is not allowed on module abbreviation. Module abbreviations are always private. + Das Sichtbarkeitsattribut "{0}" ist für die Modulabkürzung nicht zulässig. Modulabkürzungen sind immer privat. + + + + Unclosed block + Nicht geschlossener Block. + + + + Unmatched 'begin' or 'struct' + Keine Entsprechung für "begin" oder "struct". + + + + A module name must be a simple name, not a path + Ein Modulname muss ein einfacher Name sein, kein Pfad. + + + + Unexpected empty type moduleDefn list + Unerwartete moduleDefn-Liste mit leerem Typ. + + + + Attributes should be placed before 'val' + Attribute sollten vor "val" platziert werden. + + + + Attributes are not permitted on interface implementations + Attribute sind für Schnittstellenimplementierungen nicht zulässig. + + + + Syntax error + Syntaxfehler + + + + Augmentations are not permitted on delegate type moduleDefns + Augmentationen sind für den Delegattyp "moduleDefns" nicht zulässig. + + + + Unmatched 'class', 'interface' or 'struct' + Keine Entsprechung für "class", "interface" oder "struct". + + + + A type definition requires one or more members or other declarations. If you intend to define an empty class, struct or interface, then use 'type ... = class end', 'interface end' or 'struct end'. + Eine Typdefinition erfordert mindestens eine Member- oder andere Deklaration. Wenn Sie eine leere Klasse, Struktur oder Schnittstelle definieren möchten, sollten Sie stattdessen "type ... = class end", "interface end" oder "struct end" verwenden. + + + + Unmatched 'with' or badly formatted 'with' block + Keine Entsprechung für "with" oder fehlerhaft formatierter with-Block. + + + + 'get', 'set' or 'get,set' required + get, "set" oder "get,set" erforderlich. + + + + Only class types may take value arguments + Nur Klassentypen können Wertargumente akzeptieren. + + + + Unmatched 'begin' + Keine Entsprechung für "begin". + + + + Invalid declaration syntax + Ungültige Deklarationssyntax. + + + + 'get' and/or 'set' required + get und/oder "set" erforderlich. + + + + Type annotations on property getters and setters must be given after the 'get()' or 'set(v)', e.g. 'with get() : string = ...' + Typanmerkungen für Eigenschaftengetter und -setter müssen nach "get()" oder "set(v)" angegeben werden, z.B. "with get() : string = ...". + + + + A getter property is expected to be a function, e.g. 'get() = ...' or 'get(index) = ...' + Eine Getter-Eigenschaft muss eine Funktion sein, z.B. "get() = ..." oder "get(index) = ...". + + + + Multiple accessibilities given for property getter or setter + Für den Getter oder Setter der Eigenschaft wurden mehrere Zugriffsebenen angegeben. + + + + Property setters must be defined using 'set value = ', 'set idx value = ' or 'set (idx1,...,idxN) value = ... ' + Eigenschaftensetter müssen mit "set value = ", "set idx value = " oder "set (idx1,...,idxN) value = ... " definiert werden. + + + + Interfaces always have the same visibility as the enclosing type + Schnittstellen weisen immer die gleiche Sichtbarkeit auf wie der einschließende Typ. + + + + Accessibility modifiers are not allowed on this member. Abstract slots always have the same visibility as the enclosing type. + Zugriffsmodifizierer sind für diesen Member nicht zulässig. Abstrakte Umsetzungsplätze weisen immer die gleiche Sichtbarkeit auf wie der einschließende Typ. + + + + Attributes are not permitted on 'inherit' declarations + Attribute sind für inherit-Deklarationen nicht zulässig. + + + + Accessibility modifiers are not permitted on an 'inherits' declaration + Zugriffsmodifizierer sind für eine inherits-Deklaration nicht zulässig. + + + + 'inherit' declarations cannot have 'as' bindings. To access members of the base class when overriding a method, the syntax 'base.SomeMember' may be used; 'base' is a keyword. Remove this 'as' binding. + Deklarationen vom Typ 'inherit' dürfen keine as-Bindungen aufweisen. Für den Zugriff auf Member der Basisklasse beim Überschreiben einer Methode kann die Syntax 'base.SomeMember' verwendet werden; 'base' ist ein Schlüsselwort. Entfernen Sie diese as-Bindung. + + + + Attributes are not allowed here + Attribute sind an dieser Stelle nicht zulässig. + + + + Accessibility modifiers are not permitted in this position for type abbreviations + Zugriffsmodifizierer sind an dieser Stelle für Typabkürzungen nicht zulässig. + + + + Accessibility modifiers are not permitted in this position for enum types + Zugriffsmodifizierer sind an dieser Stelle für Enumerationstypen nicht zulässig. + + + + All enum fields must be given values + Alle Enumerationsfelder müssen Werte erhalten. + + + + Accessibility modifiers are not permitted on inline assembly code types + Zugriffsmodifizierer sind für Inlineassembly-Codetypen nicht zulässig. + + + + Unexpected identifier: '{0}' + Unerwarteter Bezeichner: '{0}' + + + + Accessibility modifiers are not permitted on union cases. Use 'type U = internal ...' or 'type U = private ...' to give an accessibility to the whole representation. + Zugriffsmodifizierer sind für Union-Fälle nicht zulässig. Verwenden Sie "type U = internal ..." oder "type U = private ...", um die Zugreifbarkeit für die vollständige Darstellung anzugeben. + + + + Accessibility modifiers are not permitted on enumeration fields + Zugriffsmodifizierer sind für Enumerationsfelder nicht zulässig. + + + + Consider using a separate record type instead + Verwenden Sie stattdessen einen separaten Datensatztyp. + + + + Accessibility modifiers are not permitted on record fields. Use 'type R = internal ...' or 'type R = private ...' to give an accessibility to the whole representation. + Zugriffsmodifizierer sind für Datensatzfelder nicht zulässig. Verwenden Sie "type R = internal ..." oder "type R = private ...", um die Zugreifbarkeit für die vollständige Darstellung anzugeben. + + + + The declaration form 'let ... and ...' for non-recursive bindings is not used in F# code. Consider using a sequence of 'let' bindings + Im F#-Code wird das Deklarationsformat "let ... and ..." für nicht rekursive Bindungen nicht verwendet. Verwenden Sie eine Reihe aus let-Bindungen. + + + + Unmatched '(' + Keine Entsprechung für "(". + + + + Successive patterns should be separated by spaces or tupled + Aufeinanderfolgende Muster sollten durch Leerzeichen getrennt oder als Tupel angegeben werden. + + + + No matching 'in' found for this 'let' + Kein übereinstimmendes "in" für dieses "let" gefunden. + + + + Error in the return expression for this 'let'. Possible incorrect indentation. + Fehler im Rückgabeausdruck für dieses "let". Möglicherweise falscher Einzug. + + + + The block following this '{0}' is unfinished. Every code block is an expression and must have a result. '{1}' cannot be the final code element in a block. Consider giving this block an explicit result. + Der Block, der auf dieses {0}-Element folgt, ist unvollständig. Jeder Codeblock ist ein Ausdruck und muss ein Ergebnis besitzen. "{1}" kann nicht das letzte Codeelement in einem Block sein. Weisen Sie diesem Block ggf. ein explizites Ergebnis zu. + + + + Incomplete conditional. Expected 'if <expr> then <expr>' or 'if <expr> then <expr> else <expr>'. + Unvollständiger bedingter Ausdruck. Es wurde 'if <expr> then <expr>' or 'if <expr> then <expr> else <expr>' erwartet. + + + + 'assert' may not be used as a first class value. Use 'assert <expr>' instead. + assert darf nicht als Wert der ersten Klasse verwendet werden. Verwenden Sie stattdessen "assert <Ausdruck>". + + + + Identifier expected + Bezeichner erwartet. + + + + 'in' or '=' expected + 'in' oder '=' erwartet + + + + The use of '->' in sequence and computation expressions is limited to the form 'for pat in expr -> expr'. Use the syntax 'for ... in ... do ... yield...' to generate elements in more complex sequence expressions. + Die Verwendung von "->" in Sequenz- und Berechnungsausdrücken ist auf das Format "for pat in expr -> expr" beschränkt. Verwenden Sie die Syntax "for ... in ... do ... yield...", um Elemente in komplexeren Sequenzausdrücken zu generieren. + + + + Successive arguments should be separated by spaces or tupled, and arguments involving function or method applications should be parenthesized + Aufeinanderfolgende Argumente sollten durch Leerzeichen getrennt oder als Tupel angegeben werden, und Argumente mit Funktions- oder Methodenanwendungen sollten in Klammern gesetzt werden. + + + + Unmatched '[' + Keine Entsprechung für "[". + + + + Missing qualification after '.' + Fehlende Qualifikation nach ".". + + + + In F# code you may use 'expr.[expr]'. A type annotation may be required to indicate the first expression is an array + Im F#-Code kann "expr.[expr]" verwendet werden. Möglicherweise ist eine Typanmerkung erforderlich, um den ersten Ausdruck in einem Array anzugeben. + + + + Mismatched quotation, beginning with '{0}' + Anführungszeichen stimmen nicht überein, beginnt mit "{0}". + + + + Unmatched '{0}' + Keine Entsprechung für "{0}". + + + + Unmatched '[|' + Keine Entsprechung für "[|". + + + + Unmatched '{{' + Keine Entsprechung für "{{". + + + + Field bindings must have the form 'id = expr;' + Feldbindungen müssen das Format "id = expr;" aufweisen. + + + + This member is not permitted in an object implementation + Dieser Member ist in einer Objektimplementierung unzulässig. + + + + Missing function body + Fehlender Funktionsrumpf. + + + + Syntax error in labelled type argument + Syntaxfehler in Typargument mit Bezeichnung. + + + + Unexpected infix operator in type expression + Unerwarteter infix-Operator in Typenausdruck. + + + + The syntax '(typ,...,typ) ident' is not used in F# code. Consider using 'ident<typ,...,typ>' instead + Die Syntax "(typ,...,typ) ident" wird im F#-Code nicht verwendet. Verwenden Sie stattdessen "ident<typ,...,typ>". + + + + Invalid literal in type + Ungültiges Literal im Typ + + + + Unexpected infix operator in unit-of-measure expression. Legal operators are '*', '/' and '^'. + Unerwarteter infix-Operator in Maßeinheitenausdruck. Zulässige Operatoren sind "*", "/" und "^". + + + + Unexpected integer literal in unit-of-measure expression + Unerwartetes Integer-Literal in Maßeinheitenausdruck. + + + + Syntax error: unexpected type parameter specification + Syntaxfehler: Unerwartete Typparameterangabe. + + + + Mismatched quotation operator name, beginning with '{0}' + Anführungszeichen-Operatorname stimmt nicht überein, beginnt mit "{0}". + + + + Active pattern case identifiers must begin with an uppercase letter + Schreibweisenbezeichner für das aktive Muster müssen mit einem Großbuchstaben beginnen. + + + + The '|' character is not permitted in active pattern case identifiers + Das Zeichen '|' ist nicht in Schreibweisenbezeichnern für das aktive Muster zulässig + + + + Denominator must not be 0 in unit-of-measure exponent + Nenner darf in der Maßeinheit des Exponenten nicht 0 sein + + + + No '=' symbol should follow a 'namespace' declaration + Auf eine namespace-Deklaration darf kein "="-Zeichen folgen. + + + + The syntax 'module ... = struct .. end' is not used in F# code. Consider using 'module ... = begin .. end' + Die Syntax "module ... = struct .. end" wird im F#-Code nicht verwendet. Verwenden Sie stattdessen "module ... = begin .. end". + + + + The syntax 'module ... : sig .. end' is not used in F# code. Consider using 'module ... = begin .. end' + Die Syntax "module ... : sig .. end" wird im F#-Code nicht verwendet. Verwenden Sie stattdessen "module ... = begin .. end". + + + + A static field was used where an instance field is expected + Ein statisches Feld wurde an einer Stelle verwendet, an der ein Instanzfeld erwartet wurde. + + + + Method '{0}' is not accessible from this code location + Auf die {0}-Methode kann von dieser Position im Code nicht zugegriffen werden. + + + + Implicit product of measures following / + Implizites Produktmaß nach "/". + + + + Unexpected SynMeasure.Anon + Unerwartetes SynMeasure.Anon + + + + Non-zero constants cannot have generic units. For generic zero, write 0.0<_>. + Konstanten ungleich null dürfen keine generischen Einheiten aufweisen. Für eine generische Null schreiben Sie "0.0<_>". + + + + In sequence expressions, results are generated using 'yield' + In Sequenzausdrücken werden Ergebnisse mithilfe von "yield" erzeugt. + + + + Unexpected big rational constant + Unerwartete große rationale Konstante. + + + + Units-of-measure supported only on float, float32, decimal and signed integer types + Maßeinheiten werden nur für die Typen "float", "float32", "decimal" und "signed integer" unterstützt. + + + + Unexpected Const_uint16array + Unerwartetes "Const_uint16array". + + + + Unexpected Const_bytearray + Unerwartetes "Const_bytearray". + + + + A parameter with attributes must also be given a name, e.g. '[<Attribute>] Name : Type' + Ein Parameter mit Attributen muss auch einen Namen erhalten, z.B. "[<Attribut>] Name : Type". + + + + Return values cannot have names + Rückgabetypen dürfen keinen Namen aufweisen. + + + + MemberKind.PropertyGetSet only expected in parse trees + MemberKind.PropertyGetSet wird nur in Analysestrukturen erwartet. + + + + Namespaces cannot contain values. Consider using a module to hold your value declarations. + Namespaces dürfen keine Werte enthalten. Verwenden Sie ein eigenes Modul für Ihre Wertdeklarationen. + + + + Namespaces cannot contain extension members except in the same file and namespace declaration group where the type is defined. Consider using a module to hold declarations of extension members. + Namespaces dürfen Erweiterungsmember nur in der gleichen Datei und Namespace-Deklarationsgruppe enthalten, in denen der Typ definiert ist. Verwenden Sie ggf. ein eigenes Modul für Deklarationen von Erweiterungsmembern. + + + + Multiple visibility attributes have been specified for this identifier + Für diesen Bezeichner wurden mehrere Sichtbarkeitsattribute angegeben. + + + + Multiple visibility attributes have been specified for this identifier. 'let' bindings in classes are always private, as are any 'let' bindings inside expressions. + Für diesen Bezeichner wurden mehrere Sichtbarkeitsattribute angegeben. Bindungen vom Typ 'let' in Klassen sind immer privat, wie alle Bindungen vom Typ 'let' innerhalb von Ausdrücken. + + + + The name '({0})' 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 '{1}' instead. + Der Name "({0})" sollte nicht als Membername verwendet werden. Implementieren Sie zum Definieren der Vergleichssemantik für einen Typ die System.IComparable-Schnittstelle. Verwenden Sie zum Definieren eines statischen Members für die Verwendung durch andere CLI-Sprachen stattdessen den Namen "{1}". + + + + The name '({0})' 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 '{1}' instead. + Der Name "({0})" sollte nicht als Membername verwendet werden. Überschreiben Sie zum Definieren der Gleichheitssemantik für einen Typ den Object.Equals-Member. Verwenden Sie zum Definieren eines statischen Members für die Verwendung durch andere CLI-Sprachen stattdessen den Namen "{1}". + + + + The name '({0})' should not be used as a member name. If defining a static member for use from other CLI languages then use the name '{1}' instead. + Der Name "({0})" sollte nicht als Membername verwendet werden. Verwenden Sie zum Definieren eines statischen Members für die Verwendung durch andere CLI-Sprachen stattdessen den Namen "{1}". + + + + The name '({0})' should not be used as a member name because it is given a standard definition in the F# library over fixed types + Der Name "({0})" sollte nicht als Membername verwendet werden, weil in der F#-Bibliothek eine Standarddefinition für feste Typen dafür vergeben wird. + + + + The '{0}' operator should not normally be redefined. To define overloaded comparison semantics for a particular type, implement the 'System.IComparable' interface in the definition of that type. + Der {0}-Operator sollte normalerweise nicht umdefiniert werden. Implementieren Sie zum Definieren der überladenen Vergleichssemantik für einen bestimmten Typ die System.IComparable-Schnittstelle in der Definition dieses Typs. + + + + The '{0}' operator should not normally be redefined. To define equality semantics for a type, override the 'Object.Equals' member in the definition of that type. + Der {0}-Operator sollte normalerweise nicht umdefiniert werden. Überschreiben Sie zum Definieren der Gleichheitssemantik für einen Typ den Object.Equals-Member in der Definition dieses Typs. + + + + The '{0}' operator should not normally be redefined. Consider using a different operator name + Der {0}-Operator sollte normalerweise nicht umdefiniert werden. Verwenden Sie einen anderen Operatornamen. + + + + The '{0}' operator cannot be redefined. Consider using a different operator name + Der {0}-Operator kann nicht umdefiniert werden. Verwenden Sie einen anderen Operatornamen. + + + + Expected module or namespace parent {0} + Ein übergeordnetes Modul oder ein übergeordneter Namespace "{0}" wurde erwartet. + + + + The struct, record or union type '{0}' implements the interface 'System.IComparable' explicitly. You must apply the 'CustomComparison' attribute to the type. + Der Struktur-, Datensatz- oder Union-Typ "{0}" implementiert die System.IComparable-Schnittstelle explizit. Sie müssen das CustomComparison-Attribut auf den Typ anwenden. + + + + The struct, record or union type '{0}' implements the interface 'System.IComparable<_>' explicitly. You must apply the 'CustomComparison' attribute to the type, and should also provide a consistent implementation of the non-generic interface System.IComparable. + Der Struktur-, Datensatz- oder Union-Typ "{0}" implementiert die System.IComparable<_>-Schnittstelle explizit. Sie müssen das CustomComparison-Attribut auf den Typ anwenden und sollten außerdem eine einheitliche Implementierung der nicht generischen System.IComparable-Schnittstelle bereitstellen. + + + + The struct, record or union type '{0}' implements the interface 'System.IStructuralComparable' explicitly. Apply the 'CustomComparison' attribute to the type. + Der Struktur-, Datensatz- oder Union-Typ "{0}" implementiert die System.IStructuralComparable-Schnittstelle explizit. Wenden Sie das CustomComparison-Attribut auf den Typ an. + + + + This record contains fields from inconsistent types + Dieser Datensatz enthält Felder aus inkonsistenten Typen. + + + + DLLImport stubs cannot be inlined + DLLImport-Stubs können nicht inline gesetzt werden. + + + + Structs may only bind a 'this' parameter at member declarations + Strukturen dürfen einen this-Parameter nur in Memberdeklarationen binden. + + + + Unexpected expression at recursive inference point + Unerwarteter Ausdruck bei rekursivem Rückschlusspunkt. + + + + This code is less generic than required by its annotations because the explicit type variable '{0}' could not be generalized. It was constrained to be '{1}'. + Dieser Code ist weniger generisch, als dies laut Anmerkungen erforderlich ist, weil die explizite Typvariable "{0}" nicht generalisiert werden konnte. Einschränkung auf "{1}". + + + + One or more of the explicit class or function type variables for this binding could not be generalized, because they were constrained to other types + Mindestens eine der expliziten Klassen- oder Funktionstypvariablen für diese Bindung konnte nicht generalisiert werden, weil eine Einschränkung für andere Typen vorlag. + + + + A generic type parameter has been used in a way that constrains it to always be '{0}' + Ein generischer Typparameter wurde auf eine Weise verwendet, durch die er immer "{0}" sein muss. + + + + This type parameter has been used in a way that constrains it to always be '{0}' + Dieser Typparameter wurde auf eine Weise verwendet, durch die er immer "{0}" sein muss. + + + + The type parameters inferred for this value are not stable under the erasure of type abbreviations. This is due to the use of type abbreviations which drop or reorder type parameters, e.g. \n\ttype taggedInt<'a> = int or\n\ttype swap<'a,'b> = 'b * 'a.\nConsider declaring the type parameters for this value explicitly, e.g.\n\tlet f<'a,'b> ((x,y) : swap<'b,'a>) : swap<'a,'b> = (y,x). + Die für diesen Wert per Rückschluss abgeleiteten Typparameter sind beim Löschen von Typabkürzungen nicht stabil. Dies ist auf die Verwendung von Typabkürzungen zurückzuführen, die Typparameter löschen oder neu anordnen, z.B. \n\ttype taggedInt<'a> = int oder\n\ttype swap<'a,'b> = 'b * 'a.\nDeklarieren Sie die Typparameter für diesen Wert explizit, z.B.\n\tlet f<'a,'b> ((x,y) : swap<'b,'a>) : swap<'a,'b> = (y,x). + + + + Explicit type parameters may only be used on module or member bindings + Explizite Typparameter dürfen nur für Modul- oder Memberbindungen verwendet werden. + + + + You must explicitly declare either all or no type parameters when overriding a generic abstract method + Sie müssen entweder alle Typparameter oder keinen Typparameter explizit deklarieren, wenn Sie eine generische abstrakte Methode überschreiben. + + + + The field labels and expected type of this record expression or pattern do not uniquely determine a corresponding record type + Anhand der Feldbezeichnungen und des erwarteten Typs dieses Datensatzausdrucks oder Musters lässt sich kein eindeutiger Datensatztyp bestimmen. + + + + The field '{0}' appears twice in this record expression or pattern + Das Feld "{0}" ist in diesem Datensatzausdruck oder Muster zweimal vorhanden. + + + + Unknown union case + Unbekannter Union-Fall. + + + + This code is not sufficiently generic. The type variable {0} could not be generalized because it would escape its scope. + Dieser Code ist nicht generisch genug. Die Typvariable "{0}" konnte nicht generalisiert werden, weil sie sonst aus dem Bereich fallen würde. + + + + A property cannot have explicit type parameters. Consider using a method instead. + Eine Eigenschaft darf keine expliziten Typparameter aufweisen. Verwenden Sie stattdessen eine Methode. + + + + A constructor cannot have explicit type parameters. Consider using a static construction method instead. + Ein Konstruktor darf keine expliziten Typparameter aufweisen. Verwenden Sie stattdessen eine statische Konstruktionsmethode. + + + + This instance member needs a parameter to represent the object being invoked. Make the member static or use the notation 'member x.Member(args) = ...'. + Dieser Instanzmember erfordert einen Parameter, der das aufgerufene Objekt darstellt. Definieren Sie den Member als statisch, oder verwenden Sie die Notation "member x.Member(args) = ...". + + + + Unexpected source-level property specification in syntax tree + Unerwartete Eigenschaftenspezifikation auf Quellcodeebene in der Syntaxstruktur. + + + + A static initializer requires an argument + Ein statischer Initialisierer erfordert ein Argument. + + + + An object constructor requires an argument + Ein Objektkonstruktor erfordert ein Argument. + + + + This static member should not have a 'this' parameter. Consider using the notation 'member Member(args) = ...'. + Dieser statische Member sollte keinen this-Parameter aufweisen. Verwenden Sie die Notation "member Member(args) = ...". + + + + An explicit static initializer should use the syntax 'static new(args) = expr' + Ein expliziter statischer Initialisierer sollte die Syntax "static new(args) = expr" verwenden. + + + + An explicit object constructor should use the syntax 'new(args) = expr' + Ein expliziter Objektkonstruktor sollte die Syntax "new(args) = expr" verwenden. + + + + Unexpected source-level property specification + Unerwartete Eigenschaftenspezifikation auf Quellcodeebene. + + + + This form of object expression is not used in F#. Use 'member this.MemberName ... = ...' to define member implementations in object expressions. + Dieses Format eines Objektausdrucks wird in F# nicht verwendet. Verwenden Sie "member this.MemberName ... = ...", um Memberimplementierungen in Objektausdrücken zu definieren. + + + + Invalid declaration + Ungültige Deklaration. + + + + Attributes are not allowed within patterns + Attribute sind innerhalb von Mustern nicht zulässig. + + + + The generic function '{0}' must be given explicit type argument(s) + Die generische Funktion "{0}" muss explizite Typargumente erhalten. + + + + The method or function '{0}' should not be given explicit type argument(s) because it does not declare its type parameters explicitly + Der Methode oder Funktion "{0}" sollten keine expliziten Typargumente zugewiesen werden, weil sie ihre Typparameter nicht explizit deklariert. + + + + This value, type or method expects {0} type parameter(s) but was given {1} + Dieser Wert, dieser Typ oder diese Methode erwartet {0} Typparameter, es wurde(n) aber {1} übergeben. + + + + The default, zero-initializing constructor of a struct type may only be used if all the fields of the struct type admit default initialization + Der mit null initialisierte Standardkonstruktor eines Strukturtyps darf nur verwendet werden, wenn alle Felder des Strukturtyps die Standardinitialisierung zulassen. + + + + Couldn't find Dispose on IDisposable, or it was overloaded + Dispose für "IDisposable" wurde nicht gefunden oder war überladen. + + + + This value is not a literal and cannot be used in a pattern + Dieser Wert ist kein Literal und kann nicht als Muster verwendet werden. + + + + This field is readonly + Dieses Feld ist schreibgeschützt. + + + + Named arguments must appear after all other arguments + Benannte Argumente müssen nach allen anderen Argumenten aufgeführt werden. + + + + This function value is being used to construct a delegate type whose signature includes a byref argument. You must use an explicit lambda expression taking {0} arguments. + Dieser Funktionswert dient zum Erstellen eines Delegattyps, dessen Signatur ein Byref-Argument umfasst. Sie müssen einen expliziten lambda-Ausdruck mit {0} Argumenten verwenden. + + + + The type '{0}' is not a type whose values can be enumerated with this syntax, i.e. is not compatible with either seq<_>, IEnumerable<_> or IEnumerable and does not have a GetEnumerator method + Der Typ "{0}" ist kein Typ, dessen Werte mit dieser Syntax aufgelistet werden können, er ist daher weder mit "seq<_>" noch mit "IEnumerable<_>" oder "IEnumerable" kompatibel und verfügt über keine GetEnumerator-Methode. + + + + This recursive binding uses an invalid mixture of recursive forms + Diese rekursive Bindung verwendet eine unzulässige Mischung von rekursiven Formaten. + + + + This is not a valid object construction expression. Explicit object constructors must either call an alternate constructor or initialize all fields of the object and specify a call to a super class constructor. + Dies ist kein gültiger Objektkonstruktionsausdruck. Explizite Objektkonstruktoren müssen entweder einen alternativen Konstruktor aufrufen oder alle Felder des Objekts initialisieren und einen Aufruf an einen übergeordneten Klassenkonstruktor angegeben. + + + + Invalid constraint + Ungültige Einschränkung. + + + + Invalid constraint: the type used for the constraint is sealed, which means the constraint could only be satisfied by at most one solution + Ungültige Einschränkung: Der für diese Einschränkung verwendete Typ ist versiegelt; das bedeutet, die Einschränkung wurde von höchstens einer Projektmappe erfüllt. + + + + An 'enum' constraint must be of the form 'enum<type>' + Eine enum-Einschränkung muss das Format "enum<Typ>" aufweisen. + + + + 'new' constraints must take one argument of type 'unit' and return the constructed type + New-Einschränkungen müssen ein Argument vom Typ "unit" annehmen und den konstruierten Typ zurückgeben. + + + + This property has an invalid type. Properties taking multiple indexer arguments should have types of the form 'ty1 * ty2 -> ty3'. Properties returning functions should have types of the form '(ty1 -> ty2)'. + Diese Eigenschaft hat einen ungültigen Typ. Eigenschaften, die mehrere Indexerargumente akzeptieren, sollten Typen im Format "ty1 * ty2 -> ty3" aufweisen. Eigenschaften, die Funktionen zurückgeben, sollten Typen im Format "(ty1 -> ty2)" aufweisen. + + + + Expected unit-of-measure parameter, not type parameter. Explicit unit-of-measure parameters must be marked with the [<Measure>] attribute. + Ein Maßeinheitenparameter wurde erwartet, kein Typparameter. Explizite Maßeinheitenparameter müssen mit dem [<Measure>]-Attribut markiert werden. + + + + Expected type parameter, not unit-of-measure parameter + Ein Typparameter wurde erwartet, kein Maßeinheitenparameter. + + + + Expected type, not unit-of-measure + Ein Typ wurde erwartet, keine Maßeinheit. + + + + Expected unit-of-measure, not type + Eine Maßeinheit wurde erwartet, kein Typ. + + + + Units-of-measure cannot be used as prefix arguments to a type. Rewrite as postfix arguments in angle brackets. + Maßeinheiten dürfen nicht als Präfixargumente für einen Typ verwendet werden. Ändern Sie sie in Postfixargumente in spitzen Klammern. + + + + Unit-of-measure cannot be used in type constructor application + Eine Maßeinheit kann nicht in einer Typkonstruktoranwendung verwendet werden. + + + + This control construct may only be used if the computation expression builder defines a '{0}' method + Dieses Steuerkonstrukt darf nur verwendet werden, wenn vom Berechnungsausdrucks-Generator eine {0}-Methode definiert wird. + + + + This type has no nested types + Dieser Typ enthält keine geschachtelten Typen. + + + + Unexpected {0} in type expression + Unerwartetes {0} in Typenausdruck. + + + + Type parameter cannot be used as type constructor + Der Typparameter kann nicht als Typkonstruktor verwendet werden. + + + + Illegal syntax in type expression + Unzulässige Syntax in Typenausdruck. + + + + Anonymous unit-of-measure cannot be nested inside another unit-of-measure expression + Anonyme Maßeinheiten können nicht innerhalb eines anderen Maßeinheitenausdrucks geschachtelt werden. + + + + Anonymous type variables are not permitted in this declaration + Anonyme Typvariablen sind in dieser Deklaration nicht zulässig. + + + + Unexpected / in type + Unerwarteter Schrägstrich ("/") im Typ. + + + + Unexpected type arguments + Unerwartete Typargumente. + + + + Optional arguments are only permitted on type members + Optionale Argumente sind nur für Typmember zulässig. + + + + Name '{0}' not bound in pattern context + Der Name "{0}" ist im Musterkontext nicht gebunden. + + + + Non-primitive numeric literal constants cannot be used in pattern matches because they can be mapped to multiple different types through the use of a NumericLiteral module. Consider using replacing with a variable, and use 'when <variable> = <constant>' at the end of the match clause. + Nicht primitive numerische Literalkonstanten können nicht für Mustervergleiche verwendet werden, weil sie mithilfe eines NumericLiteral-Moduls mehreren verschiedenen Typen zugeordnet werden können. Ersetzen Sie sie durch eine Variable, und verwenden Sie am Ende der Vergleichsklausel "<Variable> = <Konstante>". + + + + Type arguments cannot be specified here + Typargumente können an dieser Stelle nicht angegeben werden. + + + + Only active patterns returning exactly one result may accept arguments + Nur aktive Muster, die genau ein Ergebnis zurückgeben, dürfen Argumente akzeptieren. + + + + Invalid argument to parameterized pattern label + Ungültiges Argument für parametrisierte Musterbezeichnung. + + + + Internal error. Invalid index into active pattern array + Interner Fehler. Ungültiger Index für aktives Musterarray. + + + + This union case does not take arguments + Dieser Union-Fall akzeptiert keine Argumente. + + + + This union case takes one argument + Dieser Union-Fall akzeptiert ein Argument. + + + + This union case expects {0} arguments in tupled form + Dieser Union-Fall erwartet {0} Argumente als Tupel. + + + + Field '{0}' is not static + Das Feld "{0}" ist nicht statisch. + + + + This field is not a literal and cannot be used in a pattern + Dieses Feld ist kein Literal und kann nicht als Muster verwendet werden. + + + + This is not a variable, constant, active recognizer or literal + Hierbei handelt es sich nicht um eine Variable, Konstante, eine aktive Erkennung oder ein Literal. + + + + This is not a valid pattern + Dies ist kein gültiges Muster. + + + + Character range matches have been removed in F#. Consider using a 'when' pattern guard instead. + Der Abgleich von Zeichenbereichen wurde in F# entfernt. Verwenden Sie stattdessen einen when-Musterwächter. + + + + Illegal pattern + Unzulässiges Muster. + + + + Syntax error - unexpected '?' symbol + Syntaxfehler - unerwartetes Symbol "?". + + + + Expected {0} expressions, got {1} + Es wurden {0} Ausdrücke erwartet, aber {1} empfangen. + + + + TcExprUndelayed: delayed + TcExprUndelayed: verzögert + + + + This expression form may only be used in sequence and computation expressions + Dieses Ausdrucksformat darf nur in Sequenz- und Berechnungsausdrücken verwendet werden. + + + + Invalid object expression. Objects without overrides or interfaces should use the expression form 'new Type(args)' without braces. + Ungültiger Objektausdruck. Objekte ohne Überschreibungen oder Schnittstellen sollten das Ausdrucksformat "new Type(args)" ohne geschweifte Klammern verwenden. + + + + Invalid object, sequence or record expression + Ungültiger Objekt-, Sequenz- oder Datensatzausdruck. + + + + Invalid record, sequence or computation expression. Sequence expressions should be of the form 'seq {{ ... }}' + Ungültiger Datensatz-, Sequenz- oder Berechnungsausdruck. Sequenzausdrücke müssen das Format "seq {{ ... }}" besitzen. + + + + This list or array expression includes an element of the form 'if ... then ... else'. Parenthesize this expression to indicate it is an individual element of the list or array, to disambiguate this from a list generated using a sequence expression + Dieser Listen- oder Arrayausdruck enthält ein Element im Format "if ... then ... else". Setzen Sie diesen Ausdruck in Klammern, um ihn als einzelnes Element der Liste oder des Arrays zu kenntlich zu machen und den Ausdruck von einer Liste zu unterscheiden, die mithilfe eines Sequenzausdrucks erzeugt wurde. + + + + Unable to parse format string '{0}' + Formatzeichenfolge "{0}" kann nicht analysiert werden. + + + + This list expression exceeds the maximum size for list literals. Use an array for larger literals and call Array.ToList. + Dieser Listenausdruck übersteigt die maximale Größe für Listenliterale. Verwenden Sie für umfangreichere Literale ein Array, und rufen Sie "Array.ToList" auf. + + + + The expression form 'expr then expr' may only be used as part of an explicit object constructor + Das Ausdrucksformat 'expr then expr' darf nur als Teil eines expliziten Objektkonstruktors verwendet werden. + + + + Named arguments cannot be given to member trait calls + Benannte Argumente dürfen nicht an Aufrufe für Membermerkmale übergeben werden. + + + + This is not a valid name for an enumeration case + Dies ist kein gültiger Name für einen Enumerationsfall. + + + + This field is not mutable + Dieses Feld ist nicht änderbar. + + + + This construct may only be used within list, array and sequence expressions, e.g. expressions of the form 'seq {{ ... }}', '[ ... ]' or '[| ... |]'. These use the syntax 'for ... in ... do ... yield...' to generate elements + Dieses Konstrukt darf nur innerhalb von Listen-, Array- und Sequenzausdrücken verwendet werden, also Ausdrücken im Format "seq {{ ... }}", "[ ... ]" oder "[| ... |]". Bei diesen wird zum Generieren von Elementen die Syntax "for ... in ... do ... yield..." verwendet. + + + + This construct may only be used within computation expressions. To return a value from an ordinary function simply write the expression without 'return'. + Dieses Konstrukt darf nur innerhalb von Berechnungsausdrücken verwendet werden. Wenn ein Wert von einer normalen Funktion zurückgegeben werden soll, lassen Sie einfach "return" im Ausdruck weg. + + + + This construct may only be used within sequence or computation expressions + Dieses Konstrukt darf nur innerhalb von Sequenz- oder Berechnungsausdrücken verwendet werden. + + + + This construct may only be used within computation expressions + Dieses Konstrukt darf nur innerhalb von Berechnungsausdrücken verwendet werden. + + + + Invalid indexer expression + Ungültiger Indexerausdruck. + + + + The operator 'expr.[idx]' has been used on an object of indeterminate type based on information prior to this program point. Consider adding further type constraints + Der expr.[idx]-Operator hat auf Grundlage von Informationen vor diesem Programmpunkt ein Objekt unbestimmten Typs verwendet. Fügen Sie ggf. weitere Typeinschränkungen hinzu. + + + + Cannot inherit from a variable type + Von einem Variablentyp kann nicht geerbt werden. + + + + Calls to object constructors on type parameters cannot be given arguments + Aufrufe von Objektkonstruktoren auf Typparametern dürfen keine Argumente erhalten. + + + + The 'CompiledName' attribute cannot be used with this language element + Das CompiledName-Attribut kann nicht mit diesem Sprachelement verwendet werden. + + + + '{0}' may only be used with named types + {0} darf nur für benannte Typen verwendet werden. + + + + 'inherit' cannot be used on interface types. Consider implementing the interface by using 'interface ... with ... end' instead. + inherit kann nicht für Schnittstellentypen verwendet werden. Implementieren Sie die Schnittstelle stattdessen mit "interface ... with ... end". + + + + 'new' cannot be used on interface types. Consider using an object expression '{{ new ... with ... }}' instead. + new kann nicht für Schnittstellentypen verwendet werden. Verwenden Sie stattdessen einen Objektausdruck "{{ new ... with ... }}". + + + + Instances of this type cannot be created since it has been marked abstract or not all methods have been given implementations. Consider using an object expression '{{ new ... with ... }}' instead. + Instanzen dieses Typs können nicht erstellt werden, da er als "abstract" markiert wurde oder nicht für alle Methoden Implementierungen vorhanden sind. Verwenden Sie stattdessen einen Objektausdruck "{{ new ... with ... }}". + + + + It is recommended that objects supporting the IDisposable interface are created using the syntax 'new Type(args)', rather than 'Type(args)' or 'Type' as a function value representing the constructor, to indicate that resources may be owned by the generated value + Objekte, die die IDisposable-Schnittstelle unterstützen, sollten mit der Syntax "new Type(args)" statt mit "Type(args)" oder "Type" als Funktionswert für den Konstruktor erstellt werden, um anzugeben, dass die Ressourcen sich möglicherweise im Besitz des generierten Werts befinden. + + + + '{0}' may only be used to construct object types + {0} darf nur für Konstruktobjekttypen verwendet werden. + + + + Constructors for the type '{0}' must directly or indirectly call its implicit object constructor. Use a call to the implicit object constructor instead of a record expression. + Konstruktoren für den Typ "{0}" müssen den impliziten Objektkonstruktor direkt oder indirekt aufrufen. Verwenden Sie den Aufruf des impliziten Objektkonstruktors anstelle eines Datensatzausdrucks. + + + + The field '{0}' has been given a value, but is not present in the type '{1}' + Das Feld "{0}" hat einen Wert erhalten, ist aber im Typ "{1}" nicht vorhanden. + + + + No assignment given for field '{0}' of type '{1}' + Keine Zuweisung für Feld "{0}" vom Typ "{1}" angegeben. + + + + Extraneous fields have been given values + Zusätzliche Felder haben Werte erhalten. + + + + Only overrides of abstract and virtual members may be specified in object expressions + Nur Überschreibungen von abstrakten und virtuellen Membern dürfen in Objektausdrücken angegeben werden. + + + + The member '{0}' does not correspond to any abstract or virtual method available to override or implement. + Der Member "{0}" entspricht keiner abstrakten oder virtuellen Methode, die zum Überschreiben oder Implementieren zur Verfügung steht. + + + + The type {0} contains the member '{1}' but it is not a virtual or abstract method that is available to override or implement. + Der Typ {0} enthält den Member "{1}", entspricht aber keiner virtuellen oder abstrakten Methode, die zum Überschreiben oder Implementieren verfügbar ist. + + + + The member '{0}' does not accept the correct number of arguments. {1} argument(s) are expected, but {2} were given. The required signature is '{3}'.{4} + Der Member "{0}" akzeptiert nicht die richtige Anzahl von Argumenten. {1} Argumente werden erwartet, es wurden aber {2} Argumente angegeben. Die erforderliche Signatur ist "{3}".{4} + + + + The member '{0}' does not accept the correct number of arguments. One overload accepts {1} arguments, but {2} were given. The required signature is '{3}'.{4} + Der Member "{0}" akzeptiert nicht die richtige Anzahl von Argumenten. Eine Überladung akzeptiert {1} Argumente, es wurden aber {2} Argumente angegeben. Die erforderliche Signatur ist "{3}".{4} + + + + A simple method name is required here + An dieser Stelle ist ein einfacher Methodenname erforderlich. + + + + The types System.ValueType, System.Enum, System.Delegate, System.MulticastDelegate and System.Array cannot be used as super types in an object expression or class + Die Typen "System.ValueType", "System.Enum", "System.Delegate", "System.MulticastDelegate" und "System.Array" dürfen nicht als übergeordnete Typen in einem Objektausdruck oder einer Klasse verwendet werden. + + + + 'new' must be used with a named type + new muss für einen benannten Typ verwendet werden. + + + + Cannot create an extension of a sealed type + Erweiterung eines versiegelten Typs kann nicht erstellt werden. + + + + No arguments may be given when constructing a record value + Beim Erstellen eines Datensatzwerts dürfen keine Argumente angegeben werden. + + + + Interface implementations cannot be given on construction expressions + Schnittstellenimplementierungen dürfen nicht für Konstruktionsausdrücke verwendet werden. + + + + Object construction expressions may only be used to implement constructors in class types + Objektkonstruktionsausdrücke dürfen nur zur Implementierung von Konstruktoren in Klassentypen verwendet werden. + + + + Only simple bindings of the form 'id = expr' can be used in construction expressions + In Konstruktionsausdrücken dürfen nur einfache Bindungen im Format "id = expr" verwendet werden. + + + + Objects must be initialized by an object construction expression that calls an inherited object constructor and assigns a value to each field + Objekte müssen von einem Objektkonstruktionsausdruck initialisiert werden, der einen geerbten Objektkonstruktor aufruft und jedem Feld einen Wert zuweist. + + + + Expected an interface type + Ein Schnittstellentyp wurde erwartet. + + + + Constructor expressions for interfaces do not take arguments + Konstruktorausdrücke für Schnittstellen akzeptieren keine Argumente. + + + + This object constructor requires arguments + Dieser Objektkonstruktor erfordert Argumente. + + + + 'new' may only be used with object constructors + new darf nur für Objektkonstruktoren verwendet werden. + + + + At least one override did not correctly implement its corresponding abstract member + In mindestens einer Überschreibung ist der entsprechende abstrakte Member nicht korrekt implementiert. + + + + This numeric literal requires that a module '{0}' defining functions FromZero, FromOne, FromInt32, FromInt64 and FromString be in scope + Für dieses numerische Literal muss sich das Modul "{0}" im Bereich befinden, das die Funktionen "FromZero", "FromOne", "FromInt32", "FromInt64" und "FromString" definiert. + + + + Invalid record construction + Ungültige Datensatzkonstruktion. + + + + The expression form {{ expr with ... }} may only be used with record types. To build object types use {{ new Type(...) with ... }} + Das Ausdrucksformat {{ expr with ... }} darf nur für Datensatztypen verwendet werden. Verwenden Sie zum Erstellen von Objekttypen {{ new Type(...) with ... }}. + + + + The inherited type is not an object model type + Der geerbte Typ ist kein Objektmodelltyp. + + + + Object construction expressions (i.e. record expressions with inheritance specifications) may only be used to implement constructors in object model types. Use 'new ObjectType(args)' to construct instances of object model types outside of constructors + Objektkonstruktionsausdrücke (also Datensatzausdrücke mit Vererbungsspezifikationen) dürfen nur zur Implementierung von Konstruktoren in Objektmodelltypen verwendet werden. Verwenden Sie "new ObjectType(args)", um Instanzen von Objektmodelltypen außerhalb von Konstruktoren zu erstellen. + + + + '{{ }}' is not a valid expression. Records must include at least one field. Empty sequences are specified by using Seq.empty or an empty list '[]'. + {{ }} ist kein gültiger Ausdruck. Datensätze müssen mindestens ein Feld umfassen. Leere Sequenzen werden mit "Seq.empty" oder einer leeren Liste "[]" angegeben. + + + + This type is not a record type. Values of class and struct types must be created using calls to object constructors. + Dieser Typ ist kein Datensatztyp. Werte von Klassen- und Strukturtypen müssen mithilfe von Aufrufen an Objektkonstruktoren erstellt werden. + + + + This type is not a record type + Dieser Typ ist kein Datensatztyp. + + + + This construct is ambiguous as part of a computation expression. Nested expressions may be written using 'let _ = (...)' and nested computations using 'let! res = builder {{ ... }}'. + Dieses Konstrukt ist als Teil eines Berechnungsausdrucks nicht eindeutig. Geschachtelte Ausdrücke können mit "let _ = (...)", geschachtelte Berechnungen mit "let! res = builder {{ ... }}" ausgedrückt werden. + + + + This construct is ambiguous as part of a sequence expression. Nested expressions may be written using 'let _ = (...)' and nested sequences using 'yield! seq {{... }}'. + Dieses Konstrukt ist als Teil eines Sequenzausdrucks nicht eindeutig. Geschachtelte Ausdrücke können mit "let _ = (...)", geschachtelte Sequenzen mit "yield! seq {{... }}" ausgedrückt werden. + + + + 'do!' cannot be used within sequence expressions + do! kann nicht in Sequenzausdrücken verwendet werden. + + + + The use of 'let! x = coll' in sequence expressions is not permitted. Use 'for x in coll' instead. + Die Verwendung von "let! x = coll" in Sequenzausdrücken ist nicht zulässig. Verwenden Sie stattdessen "for x in coll". + + + + 'try'/'with' cannot be used within sequence expressions + 'try'/'with' kann nicht in Sequenzausdrücken verwendet werden. + + + + In sequence expressions, multiple results are generated using 'yield!' + In Sequenzausdrücken werden mehrere Ergebnisse mithilfe von "yield!" erzeugt. + + + + Invalid assignment + Ungültige Zuweisung. + + + + Invalid use of a type name + Unzulässige Verwendung eines Typnamens. + + + + This type has no accessible object constructors + Dieser Typ verfügt über keine zugreifbaren Objektkonstruktoren. + + + + Invalid use of an interface type + Unzulässige Verwendung eines Schnittstellentyps. + + + + Invalid use of a delegate constructor. Use the syntax 'new Type(args)' or just 'Type(args)'. + Unzulässige Verwendung eines Delegatkonstruktors. Verwenden Sie die Syntax "new Type(args)" oder einfach nur "Type(args)". + + + + Property '{0}' is not static + Die {0}-Eigenschaft ist nicht statisch. + + + + Property '{0}' is not readable + Die {0}-Eigenschaft ist nicht lesbar. + + + + This lookup cannot be used here + Dieses Lookup kann an dieser Stelle nicht verwendet werden. + + + + Property '{0}' is static + Die {0}-Eigenschaft ist statisch. + + + + Property '{0}' cannot be set + Die {0}-Eigenschaft kann nicht festgelegt werden. + + + + Constructors must be applied to arguments and cannot be used as first-class values. If necessary use an anonymous function '(fun arg1 ... argN -> new Type(arg1,...,argN))'. + Konstruktoren müssen auf Argumente angewendet werden und dürfen nicht als Werte der ersten Klasse verwendet werden. Verwenden Sie bei Bedarf eine anonyme Funktion "(fun arg1 ... argN -> new Type(arg1,...,argN))". + + + + The syntax 'expr.id' may only be used with record labels, properties and fields + Die Syntax "expr.id" darf nur für Datensatzbezeichnungen, Eigenschaften und Felder verwendet werden. + + + + Event '{0}' is static + Das {0}-Ereignis ist statisch. + + + + Event '{0}' is not static + Das {0}-Ereignis ist nicht statisch. + + + + The named argument '{0}' did not match any argument or mutable property + Das benannte Argument "{0}" stimmt mit keinem Argument und keiner änderbaren Eigenschaft überein. + + + + One or more of the overloads of this method has curried arguments. Consider redesigning these members to take arguments in tupled form. + Mindestens eine der Überladungen dieser Methode besitzt Curryargumente. Definieren Sie diese Member so um, dass sie Argumente als Tupel akzeptieren. + + + + The unnamed arguments do not form a prefix of the arguments of the method called + Die unbenannten Argumente bilden kein Präfix der Argumente der aufgerufenen Methode. + + + + Static optimization conditionals are only for use within the F# library + Statische bedingte Optimierungsausdrücke sind nur für die Verwendung innerhalb der F#-Bibliothek vorgesehen. + + + + The corresponding formal argument is not optional + Das entsprechende Formalargument ist nicht optional. + + + + Invalid optional assignment to a property or field + Ungültige optionale Zuweisung zu einer Eigenschaft oder einem Feld. + + + + A delegate constructor must be passed a single function value + Einem Delegatkonstruktor muss ein einzelner Funktionswert übergeben werden. + + + + A binding cannot be marked both 'use' and 'rec' + Eine Bindung kann nicht gleichzeitig als "use" und "rec" markiert werden. + + + + The 'VolatileField' attribute may only be used on 'let' bindings in classes + Das VolatileField-Attribut kann nur für let-Bindungen in Klassen verwendet werden. + + + + Attributes are not permitted on 'let' bindings in expressions + Attribute sind für let-Bindungen in Ausdrücken nicht zulässig. + + + + The 'DefaultValue' attribute may only be used on 'val' declarations + Das DefaultValue-Attribut darf nur für val-Deklarationen verwendet werden. + + + + The 'ConditionalAttribute' attribute may only be used on members + Das ConditionalAttribute-Attribut darf nur für Member verwendet werden. + + + + This is not a valid name for an active pattern + Dies ist kein gültiger Name für ein aktives Muster. + + + + The 'EntryPointAttribute' attribute may only be used on function definitions in modules + Das EntryPointAttribute-Attribut darf nur für Funktionsdefinitionen in Modulen verwendet werden. + + + + Mutable values cannot be marked 'inline' + Änderbare Werte können nicht als "inline" markiert werden. + + + + Mutable values cannot have generic parameters + Änderbare Werte dürfen keine generischen Parameter aufweisen. + + + + Mutable function values should be written 'let mutable f = (fun args -> ...)' + Änderbare Funktionswerte sollten im Format "let mutable f = (fun args -> ...)" angegeben werden. + + + + Only functions may be marked 'inline' + Nur Funktionen dürfen als "inline" markiert werden. + + + + A literal value cannot be given the [<ThreadStatic>] or [<ContextStatic>] attributes + Ein Literalwert kann nicht mit den Attributen "[<ThreadStatic>]" oder "[<ContextStatic>]" versehen werden. + + + + A literal value cannot be marked 'mutable' + Ein Literalwert kann nicht als "mutable" markiert werden. + + + + A literal value cannot be marked 'inline' + Ein Literalwert kann nicht als "inline" markiert werden. + + + + Literal values cannot have generic parameters + Literalwerte dürfen keine generischen Parameter aufweisen. + + + + This is not a valid constant expression + Dies ist kein gültiger konstanter Ausdruck. + + + + This type is not accessible from this code location + Auf diesen Typ kann von dieser Position im Code nicht zugegriffen werden. + + + + Unexpected condition in imported assembly: failed to decode AttributeUsage attribute + Unerwartete Bedingung in importierter Assembly: Fehler beim Decodieren des AttributeUsage-Attributs. + + + + Unrecognized attribute target. Valid attribute targets are 'assembly', 'module', 'type', 'method', 'property', 'return', 'param', 'field', 'event', 'constructor'. + Unbekanntes Attributziel. Gültige Attributziele sind "assembly", "module", "type", "method", "property", "return", "param", "field", "event", "constructor". + + + + This attribute is not valid for use on this language element. Assembly attributes should be attached to a 'do ()' declaration, if necessary within an F# module. + Dieses Attribut ist für dieses Sprachelement nicht gültig. Assemblyattribute sollten an eine "do ()"-Deklaration angefügt werden, falls notwendig innerhalb eines F#-Moduls. + + + + This attribute is not valid for use on this language element + Dieses Attribut ist für dieses Sprachelement nicht gültig. + + + + Optional arguments cannot be used in custom attributes + Optionale Argumente dürfen nicht für benutzerdefinierte Attribute verwendet werden. + + + + This property cannot be set + Diese Eigenschaft kann nicht festgelegt werden. + + + + This property or field was not found on this custom attribute type + Diese Eigenschaft bzw. dieses Feld wurde in diesem benutzerdefinierten Attributtyp nicht gefunden. + + + + A custom attribute must be a reference type + Ein benutzerdefiniertes Attribut muss ein Verweistyp sein. + + + + The number of args for a custom attribute does not match the expected number of args for the attribute constructor + Die Anzahl der Argumente für ein benutzerdefiniertes Attribut stimmt nicht mit der erwarteten Argumentzahl für den Attributkonstruktor überein. + + + + A custom attribute must invoke an object constructor + Ein benutzerdefiniertes Attribut muss einen Objektkonstruktor aufrufen. + + + + Attribute expressions must be calls to object constructors + Attributausdrücke müssen Aufrufe von Objektkonstruktoren sein. + + + + This attribute cannot be used in this version of F# + Dieses Attribut kann in dieser Version von F# nicht verwendet werden. + + + + Invalid inline specification + Ungültige Inlinespezifikation + + + + 'use' bindings must be of the form 'use <var> = <expr>' + Use-Bindungen müssen das Format "use <var> = <Ausdruck>" aufweisen. + + + + Abstract members are not permitted in an augmentation - they must be defined as part of the type itself + Abstrakte Member sind in einer Augmentation nicht zulässig, sondern müssen als Teil des Typs selbst definiert werden. + + + + Method overrides and interface implementations are not permitted here + Methodenüberschreibungen und Schnittstellenimplementierungen sind an dieser Stelle nicht zulässig. + + + + No abstract or interface member was found that corresponds to this override + Es wurde keine abstrakter Member und kein Schnittstellenmember gefunden, der dieser Überschreibung entspricht. + + + + This override takes a different number of arguments to the corresponding abstract member. The following abstract members were found:{0} + Diese Überschreibung akzeptiert eine andere Anzahl von Argumenten als der entsprechende abstrakte Member. Die folgenden abstrakten Members wurden gefunden: {0} + + + + This method already has a default implementation + Für diese Methode ist bereits eine Standardimplementierung vorhanden. + + + + The method implemented by this default is ambiguous + Die von dieser Standardimplementierung implementierte Methode ist nicht eindeutig. + + + + No abstract property was found that corresponds to this override + Es wurde kein abstrakte Eigenschaft gefunden, die dieser Überschreibung entspricht. + + + + This property overrides or implements an abstract property but the abstract property doesn't have a corresponding {0} + Diese Eigenschaft überschreibt oder implementiert eine abstrakte Eigenschaft, aber für die abstrakte Eigenschaft ist kein(e) entsprechende(r/s) {0} vorhanden. + + + + Invalid signature for set member + Ungültige Signatur für festgelegten Member. + + + + This new member hides the abstract member '{0}'. Rename the member or use 'override' instead. + Dieser neue Member verbirgt den abstrakten Member "{0}". Benennen Sie den Member um, oder verwenden Sie stattdessen "override". + + + + This new member hides the abstract member '{0}' once tuples, functions, units of measure and/or provided types are erased. Rename the member or use 'override' instead. + Dieser neue Member verbirgt den abstrakten Member "{0}", nachdem alle Tupel, Funktionen, Maßeinheiten und/oder angegebene Typen gelöscht wurden. Benennen Sie den Member um, oder verwenden Sie stattdessen "override". + + + + Interfaces cannot contain definitions of static initializers + Schnittstellen dürfen keine Definitionen von statischen Initialisierern enthalten. + + + + Interfaces cannot contain definitions of object constructors + Schnittstellen dürfen keine Definitionen von Objektkonstruktoren enthalten. + + + + Interfaces cannot contain definitions of member overrides + Schnittstellen dürfen keine Definitionen von Memberüberschreibungen enthalten. + + + + Interfaces cannot contain definitions of concrete members. You may need to define a constructor on your type to indicate that the type is a class. + Schnittstellen dürfen keine Definitionen konkreter Member enthalten. Sie müssen ggf. einen Konstruktor für den Typ definieren, um anzugeben, dass es sich bei dem Typ um eine Klasse handelt. + + + + Constructors cannot be specified in exception augmentations + Konstruktoren können nicht in Ausnahmeaugmentationen angegeben werden. + + + + Structs cannot have an object constructor with no arguments. This is a restriction imposed on all CLI languages as structs automatically support a default constructor. + Strukturen dürfen keinen Objektkonstruktor ohne Argumente aufweisen. Diese Einschränkung gilt für alle CLI-Sprachen, da Strukturen automatisch einen Standardkonstruktor unterstützen. + + + + Constructors cannot be defined for this type + Für diesen Typ können keine Konstruktoren definiert werden. + + + + Recursive bindings that include member specifications can only occur as a direct augmentation of a type + Rekursive Bindungen mit Memberspezifikationen dürfen nur als direkte Augmentation eines Typs auftreten. + + + + Only simple variable patterns can be bound in 'let rec' constructs + In "let rec"-Konstrukten können nur einfache Variablenmuster gebunden werden. + + + + Only record fields and simple, non-recursive 'let' bindings may be marked mutable + Nur Datensatzfelder und einfache, nicht rekursive let-Bindungen dürfen als "mutable" markiert werden. + + + + This member is not sufficiently generic + Dieser Member ist nicht generisch genug. + + + + A declaration may only be the [<Literal>] attribute if a constant value is also given, e.g. 'val x : int = 1' + Eine Deklaration darf nur dann als [<Literal>]-Attribut verwendet werden, wenn auch ein Konstantenwert angegeben wird, z.B. "val x : int = 1". + + + + A declaration may only be given a value in a signature if the declaration has the [<Literal>] attribute + Einer Deklaration kann nur dann ein Wert in einer Signatur zugewiesen werden, wenn die Deklaration mit dem [<Literal>]-Attribut versehen ist. + + + + Thread-static and context-static variables must be static and given the [<DefaultValue>] attribute to indicate that the value is initialized to the default value on each new thread + Threadstatische und kontextstatische Variablen müssen statisch sein und mit dem [<DefaultValue>]-Attribut versehen werden, um anzugeben, dass der Wert bei jedem neuen Thread mit dem Standardwert initialisiert wird. + + + + Volatile fields must be marked 'mutable' and cannot be thread-static + Flüchtige Felder müssen als "mutable" markiert werden und können nicht threadstatisch sein. + + + + Uninitialized 'val' fields must be mutable and marked with the '[<DefaultValue>]' attribute. Consider using a 'let' binding instead of a 'val' field. + Nicht initialisierte val-Felder müssen änderbar sein und mit dem [<DefaultValue>]-Attribut versehen werden. Verwenden Sie eine let-Bindung anstelle eines val-Felds. + + + + Static 'val' fields in types must be mutable, private and marked with the '[<DefaultValue>]' attribute. They are initialized to the 'null' or 'zero' value for their type. Consider also using a 'static let mutable' binding in a class type. + Statische val-Felder in Typen müssen änderbar und privat sein und mit dem [<DefaultValue>]-Attribut versehen werden. Sie werden mit dem NULL- oder 0-Wert für ihren Typ initialisiert. Verwenden Sie ggf. zusätzlich eine "static let mutable"-Bindung in einem Klassentyp. + + + + This field requires a name + Für dieses Feld ist ein Name erforderlich. + + + + Invalid namespace, module, type or union case name + Ungültiger Namespace-, Modul-, Typ- oder Union-Fallname. + + + + Explicit type declarations for constructors must be of the form 'ty1 * ... * tyN -> resTy'. Parentheses may be required around 'resTy' + Explizite Typdeklarationen für Konstruktoren müssen im Format "ty1 * ... * tyN -> resTy" angegeben werden. Möglicherweise muss "resTy" in Klammern gesetzt werden. + + + + Return types of union cases must be identical to the type being defined, up to abbreviations + Rückgabetypen von Union-Fällen müssen genau mit dem definierten Typ übereinstimmen, bis hin zu den Abkürzungen. + + + + This is not a valid value for an enumeration literal + Dies ist kein gültiger Wert für ein Enumerationsliteral. + + + + The type '{0}' is not an interface type + Der Typ "{0}" ist kein Schnittstellentyp. + + + + Duplicate specification of an interface + Doppelte Schnittstellenspezifikation. + + + + A field/val declaration is not permitted here + Eine Feld/Wert-Deklaration ist an dieser Stelle nicht zulässig. + + + + A inheritance declaration is not permitted here + Eine Vererbungsdeklaration ist an dieser Stelle nicht zulässig. + + + + This declaration opens the module '{0}', which is marked as 'RequireQualifiedAccess'. Adjust your code to use qualified references to the elements of the module instead, e.g. 'List.map' instead of 'map'. This change will ensure that your code is robust as new constructs are added to libraries. + Diese Deklaration öffnet das Modul "{0}", das als "RequireQualifiedAccess" markiert ist. Passen Sie den Code an, indem Sie stattdessen qualifizierte Verweise auf die Modulelemente verwenden. Beispiel: "List.map" anstelle von "map". Durch diese Änderung stellen Sie sicher, dass der Code auch dann stabil bleibt, wenn die Bibliotheken um neue Konstrukte ergänzt werden. + + + + This declaration opens the namespace or module '{0}' through a partially qualified path. Adjust this code to use the full path of the namespace. This change will make your code more robust as new constructs are added to the F# and CLI libraries. + Mit dieser Deklaration wird der Namespace oder das Modul "{0}" über einen teilweise qualifizierten Pfad geöffnet. Passen Sie den Code an, und fügen Sie den vollständigen Pfad des Namespace hinzu. Durch diese Änderung bleibt der Code auch dann stabil, wenn die F#- und CLI-Bibliotheken um neue Konstrukte ergänzt werden. + + + + Local class bindings cannot be marked inline. Consider lifting the definition out of the class or else do not mark it as inline. + Lokale Klassenbindungen können nicht als "inline" markiert werden. Entfernen Sie die Definition aus der Klasse, oder markieren Sie sie nicht als "inline". + + + + Type abbreviations cannot have members + Typabkürzungen dürfen keine Member aufweisen. + + + + As of F# 4.1, the accessibility of type abbreviations is checked at compile-time. Consider changing the accessibility of the type abbreviation. Ignoring this warning might lead to runtime errors. + Ab F# 4.1 wird die Zugreifbarkeit von Typabkürzungen zur Kompilierzeit überprüft. Sie sollten die Zugreifbarkeit der Typabkürzung ggf. ändern. Das Ignorieren dieser Warnung führt möglicherweise zu Laufzeitfehlern. + + + + Enumerations cannot have members + Enumerationen dürfen keine Member aufweisen. + + + + Measure declarations may have only static members + Maßeinheitendeklarationen dürfen nur statische Member enthalten. + + + + Structs cannot contain 'do' bindings because the default constructor for structs would not execute these bindings + Strukturen dürfen keine do-Bindungen enthalten, da der Standardkonstruktor für Strukturen diese Bindungen nicht ausführen würde. + + + + Structs cannot contain value definitions because the default constructor for structs will not execute these bindings. Consider adding additional arguments to the primary constructor for the type. + Strukturen dürfen keine Wertdefinitionen enthalten, da der Standardkonstruktor für Strukturen diese Bindungen nicht ausführt. Fügen Sie dem primären Konstruktor für diesen Typ ggf. zusätzliche Argumente hinzu. + + + + Static value definitions may only be used in types with a primary constructor. Consider adding arguments to the type definition, e.g. 'type X(args) = ...'. + Statische Wertdefinitionen dürfen nur in Typen mit einem primären Konstruktor verwendet werden. Ziehen Sie in Betracht, Argumente zur Typdefinition hinzuzufügen, z. B. "type X(args) = ...". + + + + Measure declarations may have only static members: constructors are not available + Maßeinheitendeklarationen dürfen nur statische Member enthalten: Konstruktoren sind nicht verfügbar. + + + + A member and a local class binding both have the name '{0}' + Ein Member und eine lokale Klassenbindung haben beide den Namen "{0}". + + + + Type abbreviations cannot have interface declarations + Typabkürzungen dürfen keine Schnittstellendeklarationen aufweisen. + + + + Enumerations cannot have interface declarations + Enumerationen dürfen keine Schnittstellendeklarationen aufweisen. + + + + This type is not an interface type + Dieser Typ ist kein Schnittstellentyp. + + + + All implemented interfaces should be declared on the initial declaration of the type + Alle implementierten Schnittstellen sollten in der anfänglichen Deklaration des Typs deklariert werden. + + + + A default implementation of this interface has already been added because the explicit implementation of the interface was not specified at the definition of the type + Es wurde bereits eine Standardimplementierung dieser Schnittstelle hinzugefügt, weil die explizite Implementierung der Schnittstelle nicht in der Typdefinition angegeben war. + + + + This member is not permitted in an interface implementation + Dieser Member ist in einer Schnittstellenimplementierung unzulässig. + + + + This declaration element is not permitted in an augmentation + Dieses Deklarationselement ist in einer Augmentation nicht zulässig. + + + + Types cannot contain nested type definitions + Typen dürfen keine geschachtelten Typdefinitionen enthalten. + + + + type, exception or module + Typ, Ausnahme oder Modul + + + + type or module + Typ oder Modul + + + + The struct, record or union type '{0}' implements the interface 'System.IStructuralEquatable' explicitly. Apply the 'CustomEquality' attribute to the type. + Der Struktur-, Datensatz- oder Union-Typ "{0}" implementiert die System.IStructuralEquatable-Schnittstelle explizit. Wenden Sie das CustomEquality-Attribut auf den Typ an. + + + + The struct, record or union type '{0}' implements the interface 'System.IEquatable<_>' explicitly. Apply the 'CustomEquality' attribute to the type and provide a consistent implementation of the non-generic override 'System.Object.Equals(obj)'. + Der Struktur-, Datensatz- oder Union-Typ "{0}" implementiert die System.IEquatable<_>-Schnittstelle explizit. Wenden Sie das CustomEquality-Attribut auf den Typ an, und stellen Sie eine einheitliche Implementierung der nicht generischen System.Object.Equals(obj)-Überschreibung bereit. + + + + Explicit type specifications cannot be used for exception constructors + Explizite Typspezifikationen dürfen nicht für Ausnahmekonstruktoren verwendet werden. + + + + Exception abbreviations should not have argument lists + Ausnahmeabkürzungen sollten keine Argumentlisten aufweisen. + + + + Abbreviations for Common IL exceptions cannot take arguments + Abkürzungen für Common IL-Ausnahmen können keine Argumente akzeptieren. + + + + Exception abbreviations must refer to existing exceptions or F# types deriving from System.Exception + Ausnahmeabkürzungen müssen auf vorhandene Ausnahmen oder F#-Typen verweisen, die von "System.Exception" abgeleitet sind. + + + + Abbreviations for Common IL exception types must have a matching object constructor + Abkürzungen für Common IL-Ausnahmetypen müssen einen entsprechenden Objektkonstruktor aufweisen. + + + + Not an exception + Keine Ausnahme. + + + + Invalid module name + Ungültiger Modulname. + + + + Invalid type extension + Ungültige Typerweiterung. + + + + The attributes of this type specify multiple kinds for the type + Die Attribute dieses Typs geben mehrere Arten für den Typ an. + + + + The kind of the type specified by its attributes does not match the kind implied by its definition + Der von den Attributen angegebene Typ stimmt nicht mit der von der Definition implizierten Art überein. + + + + Measure definitions cannot have type parameters + Maßeinheitendefinitionen dürfen keine Typparameter aufweisen. + + + + This type requires a definition + Dieser Typ erfordert eine Definition. + + + + This type abbreviation has one or more declared type parameters that do not appear in the type being abbreviated. Type abbreviations must use all declared type parameters in the type being abbreviated. Consider removing one or more type parameters, or use a concrete type definition that wraps an underlying type, such as 'type C<'a> = C of ...'. + Für diese Typabkürzung ist mindestens ein Typparameter deklariert, der in dem abgekürzten Typ nicht erscheint. Typabkürzungen müssen alle deklarierten Typparameter im abgekürzten Typ verwenden. Entfernen Sie mindestens einen Typparameter, oder verwenden Sie eine konkrete Typdefinition, die einen zugrundeliegenden Typ umschließt, z.B. "type C<'a> = C of ...". + + + + Structs, interfaces, enums and delegates cannot inherit from other types + Strukturen, Schnittstellen, Enumerationen und Delegaten können nicht von anderen Typen erben. + + + + Types cannot inherit from multiple concrete types + Typen können nicht von mehreren konkreten Typen erben. + + + + Records, union, abbreviations and struct types cannot have the 'AllowNullLiteral' attribute + Datensatz, Union-, Abkürzungs- und Strukturtypen dürfen nicht das AllowNullLiteral-Attribut aufweisen. + + + + Types with the 'AllowNullLiteral' attribute may only inherit from or implement types which also allow the use of the null literal + Typen mit dem AllowNullLiteral-Attribut können nur von Typen erben bzw. diese implementieren, die die Verwendung des NULL-Literals ebenfalls zulassen. + + + + Generic types cannot be given the 'StructLayout' attribute + Generische Typen können nicht mit dem StructLayout-Attribut versehen werden. + + + + Only structs and classes without primary constructors may be given the 'StructLayout' attribute + Nur Strukturen und Klassen ohne primäre Konstruktoren dürfen das StructLayout-Attribut erhalten. + + + + The representation of this type is hidden by the signature. It must be given an attribute such as [<Sealed>], [<Class>] or [<Interface>] to indicate the characteristics of the type. + Die Darstellung dieses Typs ist hinter der Signatur verborgen. Sie muss mit einem Attribut wie "[<Sealed>]", "[<Class>]" oder "[<Interface>]" versehen werden, um die Merkmale des Typs anzugeben. + + + + Only classes may be given the 'AbstractClass' attribute + Nur Klassen dürfen das AbstractClass-Attribut erhalten. + + + + Only types representing units-of-measure may be given the 'Measure' attribute + Nur Typen, die Maßeinheiten darstellen, dürfen das Measure-Attribut erhalten. + + + + Accessibility modifiers are not permitted on overrides or interface implementations + Zugriffsmodifizierer sind für Überschreibungen oder Schnittstellenimplementierungen nicht zulässig. + + + + Discriminated union types are always sealed + Diskriminierte Union-Typen sind immer versiegelt. + + + + Record types are always sealed + Datensatztypen sind immer versiegelt. + + + + Assembly code types are always sealed + Assemblycodetypen sind immer versiegelt. + + + + Struct types are always sealed + Strukturtypen sind immer versiegelt. + + + + Delegate types are always sealed + Delegattypen sind immer versiegelt. + + + + Enum types are always sealed + Enumerationstypen sind immer versiegelt. + + + + Interface types and delegate types cannot contain fields + Schnittstellentypen und Delegattypen dürfen keine Felder enthalten. + + + + Abbreviated types cannot be given the 'Sealed' attribute + Abgekürzte Typen können nicht mit dem Sealed-Attribut versehen werden. + + + + Cannot inherit a sealed type + Von einem versiegelten Typ kann nicht geerbt werden. + + + + Cannot inherit from interface type. Use interface ... with instead. + Vom Schnittstellentyp kann nicht geerbt werden. Verwenden Sie stattdessen "interface ... with". + + + + Struct types cannot contain abstract members + Strukturtypen dürfen keine abstrakten Member enthalten. + + + + Interface types cannot be sealed + Schnittstellentypen dürfen nicht versiegelt sein. + + + + Delegate specifications must be of the form 'typ -> typ' + Delegatspezifikationen müssen das Format "typ -> typ" aufweisen. + + + + Delegate specifications must not be curried types. Use 'typ * ... * typ -> typ' for multi-argument delegates, and 'typ -> (typ -> typ)' for delegates returning function values. + Delegatspezifikationen dürfen keine Currytypen sein. Verwenden Sie "typ * ... * typ -> typ" für Delegaten mit mehreren Argumenten und "typ -> (typ -> typ)" für Delegaten, die Funktionswerte zurückgeben. + + + + Literal enumerations must have type int, uint, int16, uint16, int64, uint64, byte, sbyte or char + Literalenumerationen müssen den Typ "int", "uint", "int16", "uint16", "int64", "uint64", "byte", "sbyte" oder "char" aufweisen. + + + + This type definition involves an immediate cyclic reference through an abbreviation + Diese Typdefinition umfasst einen sofortigen zyklischen Verweis über eine Abkürzung. + + + + This type definition involves an immediate cyclic reference through a struct field or inheritance relation + Diese Typdefinition umfasst einen sofortigen zyklischen Verweis über ein Strukturfeld oder eine Vererbungsbeziehung. + + + + The syntax 'type X with ...' is reserved for augmentations. Types whose representations are hidden but which have members are now declared in signatures using 'type X = ...'. You may also need to add the '[<Sealed>] attribute to the type definition in the signature + Die Syntax "type X with ..." ist für Augmentationen reserviert. Typen, deren Darstellung verborgen ist, die aber Member aufweisen, werden jetzt mithilfe von "type X = ..." in Signaturen deklariert. Möglicherweise müssen Sie der Typdefinition in der Signatur auch das [<Sealed>]-Attribut hinzufügen. + + + + Members that extend interface, delegate or enum types must be placed in a module separate to the definition of the type. This module must either have the AutoOpen attribute or be opened explicitly by client code to bring the extension members into scope. + Member, die Schnittstellen-, Delegat- oder Enumerationstypen erweitern, müssen in einem von der Typdefinition getrennten eigenen Modul platziert werden. Dieses Modul muss entweder mit dem AutoOpen-Attribut versehen oder vom Clientcode explizit geöffnet werden, um die Erweiterungsmember in den Bereich einzubinden. + + + + One or more of the declared type parameters for this type extension have a missing or wrong type constraint not matching the original type constraints on '{0}' + Mindestens ein deklarierter Typparameter für diese Typerweiterung verfügt über keine oder eine falsche Typeinschränkung, die nicht mit der ursprünglichen Typeinschränkung "{0}" übereinstimmt. + + + + Type definitions may only have one 'inherit' specification and it must be the first declaration + Typdefinitionen dürfen nur eine inherit-Angabe aufweisen, und diese muss die erste Deklaration sein. + + + + 'let' and 'do' bindings must come before member and interface definitions in type definitions + let- und "do"-Bindungen müssen in Typdefinitionen vor Member- und Schnittstellendefinitionen kommen. + + + + This 'inherit' declaration specifies the inherited type but no arguments. Consider supplying arguments, e.g. 'inherit BaseType(args)'. + Diese inherit-Deklaration gibt zwar den geerbten Typ an, aber keine Argumente. Stellen Sie ggf. Argumente bereit, z.B. "inherit BaseType(args)". + + + + This 'inherit' declaration has arguments, but is not in a type with a primary constructor. Consider adding arguments to your type definition, e.g. 'type X(args) = ...'. + Diese "inherit"-Daklaration hat Argumente, ist jedoch nicht in einem Typ mit einem primären Konstruktor. Ziehen Sie in Betracht, Argumente zur Typdefinition hinzuzufügen, z. B. "type X(args) = ...". + + + + This definition may only be used in a type with a primary constructor. Consider adding arguments to your type definition, e.g. 'type X(args) = ...'. + Diese Definition kann nur in einem Typ mit einem primären Konstruktor verwendet werden. Ziehen Sie in Betracht, Argumente zur Typdefinition hinzuzufügen, z. B. "type X(args) = ...". + + + + Type abbreviations cannot have augmentations + Typabkürzungen dürfen keine Augmentationen aufweisen. + + + + The path '{0}' is a namespace. A module abbreviation may not abbreviate a namespace. + Der Pfad "{0}" ist ein Namespace. Eine Modulabkürzung darf nicht zum Abkürzen von Namespaces verwendet werden. + + + + The type '{0}' is used in an invalid way. A value prior to '{1}' has an inferred type involving '{2}', which is an invalid forward reference. + Die Verwendung des Typs "{0}" ist ungültig. Ein Wert vor "{1}" hat einen per Rückschluss abgeleiteten Typ mit "{2}"; dies ist ein ungültiger Vorwärtsverweis. + + + + The member '{0}' is used in an invalid way. A use of '{1}' has been inferred prior to the definition of '{2}', which is an invalid forward reference. + Die Verwendung des Members "{0}" ist ungültig. Die Verwendung von "{1}" wurde vor der Definition von "{2}" per Rückschluss abgeleitet; dies ist ein ungültiger Vorwärtsverweis. + + + + The attribute 'AutoOpen(\"{0}\")' in the assembly '{1}' did not refer to a valid module or namespace in that assembly and has been ignored + Das AutoOpen(\"{0}\")-Attribut in der Assembly "{1}" verweist nicht auf ein gültiges Modul oder einen gültigen Namespace in der Assembly; es wird deshalb ignoriert. + + + + Undefined value '{0}' + Nicht definierter Wert "{0}". + + + + Label {0} not found + Bezeichnung "{0}" nicht gefunden. + + + + Incorrect number of type arguments to local call + Fehlerhafte Anzahl von Typargumenten für lokalen Aufruf. + + + + Dynamic invocation of {0} is not supported + Der dynamische Aufruf von {0} wird nicht unterstützt. + + + + Taking the address of a literal field is invalid + Das Übernehmen der Adresse eines Literalfelds ist unzulässig. + + + + This operation involves taking the address of a value '{0}' represented using a local variable or other special representation. This is invalid. + Bei diesem Vorgang wird die Adresse eines Werts "{0}" übernommen, der durch eine lokale Variable oder eine andere Spezialdarstellung dargestellt wird. Dies ist unzulässig. + + + + Custom marshallers cannot be specified in F# code. Consider using a C# helper function. + Benutzerdefinierte Marshaller dürfen im F#-Code nicht angegeben werden. Verwenden Sie eine C#-Hilfsfunktion. + + + + The MarshalAs attribute could not be decoded + Das MarshalAs-Attribut konnte nicht decodiert werden. + + + + The signature for this external function contains type parameters. Constrain the argument and return types to indicate the types of the corresponding C function. + Die Signatur für diese externe Funktion enthält Typparameter. Schränken Sie das Argument und die Rückgabetypen ein, und geben Sie die Typen der entsprechenden C-Funktion an. + + + + The DllImport attribute could not be decoded + Das DllImport-Attribut konnte nicht decodiert werden. + + + + Literal fields cannot be set + Literalfelder können nicht festgelegt werden. + + + + GenSetStorage: {0} was represented as a static method but was not an appropriate lambda expression + GenSetStorage: {0} wurde als statische Methode dargestellt, war aber kein geeigneter lambda-Ausdruck. + + + + Mutable variables cannot escape their method + Änderbare Variablen können ihre Methode nicht mit Escapevorgängen außer Kraft setzen. + + + + Compiler error: unexpected unrealized value + Compilerfehler: unerwarteter nicht realisierter Wert. + + + + Main module of program is empty: nothing will happen when it is run + Das Hauptmodul des Programms ist leer: Beim Ausführen erfolgt keinerlei Aktion. + + + + This type cannot be used for a literal field + Dieser Typ kann nicht für ein Literalfeld verwendet werden. + + + + Unexpected GetSet annotation on a property + Unerwartete GetSet-Anmerkung für eine Eigenschaft. + + + + The FieldOffset attribute could not be decoded + Das FieldOffset-Attribut konnte nicht decodiert werden. + + + + The StructLayout attribute could not be decoded + Das StructLayout-Attribut konnte nicht decodiert werden. + + + + The DefaultAugmentation attribute could not be decoded + Das DefaultAugmentation-Attribut konnte nicht decodiert werden. + + + + Reflected definitions cannot contain uses of the prefix splice operator '%' + Reflektierte Definitionen dürfen keinen Präfix-Splice-Operator "%" enthalten. + + + + Problem with codepage '{0}': {1} + Problem mit Codepage "{0}": {1} + + + + Copyright (c) Microsoft Corporation. All Rights Reserved. + Copyright (c) Microsoft Corporation. Alle Rechte vorbehalten. + + + + Freely distributed under the MIT Open Source License. https://github.com/Microsoft/visualfsharp/blob/master/License.txt + Freie Verteilung unter der MIT-Open Source-Lizenz. https://github.com/Microsoft/visualfsharp/blob/master/License.txt + + + + Name of the output file (Short form: -o) + Name der Ausgabedatei (Kurzform: -o) + + + + Build a console executable + Ausführbare Konsolendatei erstellen + + + + Build a Windows executable + Ausführbare Windows-Datei erstellen + + + + Build a library (Short form: -a) + Bibliothek erstellen (Kurzform: -a) + + + + Build a module that can be added to another assembly + Modul erstellen, das einer anderen Assembly hinzugefügt werden kann + + + + Delay-sign the assembly using only the public portion of the strong name key + Assembly nur mit dem öffentlichen Teil des Schlüssels für einen starken Namen verzögert signieren + + + + Public-sign the assembly using only the public portion of the strong name key, and mark the assembly as signed + Assembly mithilfe nur des öffentlichen Teils des Schlüssels für einen starken Namen öffentlich signieren und als signiert markieren + + + + Write the xmldoc of the assembly to the given file + XmlDoc der Assembly in angegebene Datei schreiben + + + + Specify a strong name key file + Datei mit einem Schlüssel für einen starken Namen angeben + + + + Specify a strong name key container + Container mit einem Schlüssel für einen starken Namen angeben + + + + Limit which platforms this code can run on: x86, Itanium, x64, anycpu32bitpreferred, or anycpu. The default is anycpu. + Schränken Sie ein, auf welchen Plattformen dieser Code ausgeführt werden kann: "x86", "Itanium", "x64", "anycpu32bitpreferred" oder "anycpu". Der Standard ist "anycpu". + + + + Only include optimization information essential for implementing inlined constructs. Inhibits cross-module inlining but improves binary compatibility. + Binden Sie nur Optimierungsinformationen ein, die für die Implementierung von Inlinekonstrukten unbedingt erforderlich sind. Dies verhindert zwar modulübergreifende Inlinekonstrukte, verbessert aber die Binärkompatibilität. + + + + Don't add a resource to the generated assembly containing F#-specific metadata + Der generierten Assembly mit F#-spezifischen Metadaten keine Ressource hinzufügen + + + + Print the inferred interface of the assembly to a file + Per Rückschluss abgeleitete Schnittstelle der Assembly in Datei ausgeben + + + + Reference an assembly (Short form: -r) + Auf eine Assembly verweisen (Kurzform: -r) + + + + Specify a Win32 resource file (.res) + Win32-Ressourcendatei (.res) angeben + + + + Specify a Win32 manifest file + Win32-Manifestdatei angeben + + + + Do not include the default Win32 manifest + Win32-Standardmanifest nicht einschließen + + + + Embed all source files in the portable PDB file + Alle Quelldateien in der portablen PDB-Datei einbetten + + + + Embed specific source files in the portable PDB file + Bestimmte Quelldateien in der portablen PDB-Datei einbetten + + + + Source link information file to embed in the portable PDB file + Die Datei mit Quelllinkinformationen, die in die portable PDB-Datei eingebettet werden soll + + + + --embed switch only supported when emitting a Portable PDB (--debug:portable or --debug:embedded) + Die Option "--embed" wird nur bei der Ausgabe einer portablen PDB unterstützt (--debug:portable oder --debug:embedded). + + + + --sourcelink switch only supported when emitting a Portable PDB (--debug:portable or --debug:embedded) + Die Option "--sourcelink" wird nur bei der Ausgabe einer portablen PDB unterstützt (--debug:portable oder --debug:embedded). + + + + Source file is too large to embed in a portable PDB + Die Quelldatei ist zu groß, um in eine portable PDB eingebettet zu werden. + + + + Embed the specified managed resource + Angegebene verwaltete Ressource einbetten + + + + Link the specified resource to this assembly where the resinfo format is <file>[,<string name>[,public|private]] + Angegebene Ressource mit dieser Assembly verknüpfen; Resinfo-Format: <Datei>[,<Zeichenfolgenname>[,public|private]] + + + + Emit debug information (Short form: -g) + Debuginformationen ausgeben (Kurzform: -g) + + + + Specify debugging type: full, portable, embedded, pdbonly. ('{0}' is the default if no debuggging type specified and enables attaching a debugger to a running program, 'portable' is a cross-platform format, 'embedded' is a cross-platform format embedded into the output file). + Geben Sie den Debugtyp an: vollständig, portabel, eingebettet, pdbonly. ("{0}" ist der Standardwert, wenn kein Debugtyp angegeben wird, und ermöglicht das Anfügen eines Debuggers an ein aktuell ausgeführtes Programm. "Portabel" ist ein plattformübergreifendes Format, "eingebettet" ein plattformübergreifendes, in die Ausgabedatei eingebettetes Format). + + + + Enable optimizations (Short form: -O) + Optimierungen aktivieren (Kurzform: -O) + + + + Enable or disable tailcalls + Endeaufrufe aktivieren oder deaktivieren + + + + Produce a deterministic assembly (including module version GUID and timestamp) + Deterministische Assembly erstellen (einschließlich Modulversions-GUID und Zeitstempel) + + + + Enable or disable cross-module optimizations + Modulübergreifende Optimierungen aktivieren oder deaktivieren + + + + Report all warnings as errors + Alle Warnungen als Fehler melden + + + + Report specific warnings as errors + Bestimmte Warnungen als Fehler melden + + + + Set a warning level (0-5) + Warnstufe (0-5) bestimmen + + + + Disable specific warning messages + Bestimmte Warnmeldungen deaktivieren + + + + Enable specific warnings that may be off by default + Spezifische Warnungen aktivieren, die möglicherweise standardmäßig deaktiviert sind + + + + Generate overflow checks + Überlaufprüfungen generieren + + + + Define conditional compilation symbols (Short form: -d) + Bedingte Kompilierungssymbole definieren (Kurzform: -d) + + + + Ignore ML compatibility warnings + ML-Kompatibilitätswarnungen ignorieren + + + + + Display this usage message (Short form: -?) + Diesen Hilfetext anzeigen (Kurzform: -?) + + + + Read response file for more options + Antwortdatei lesen, um weitere Optionen zu ermitteln + + + + Specify the codepage used to read source files + Codepage zum Lesen von Quelldateien angeben + + + + Output messages in UTF-8 encoding + Ausgabemeldungen in UTF-8-Codierung + + + + Output messages with fully qualified paths + Ausgabemeldungen mit vollqualifiziertem Pfad + + + + Specify a directory for the include path which is used to resolve source files and assemblies (Short form: -I) + Verzeichnis für den Includepfad angeben, der zum Auflösen von Quelldateien und -assemblys verwendet wird (Kurzform: -I) + + + + Base address for the library to be built + Basisadresse für die zu erstellende Bibliothek + + + + Do not reference the default CLI assemblies by default + Standardmäßig nicht auf die CLI-Standardassemblys verweisen + + + + Statically link the F# library and all referenced DLLs that depend on it into the assembly being generated + F#-Bibliothek und alle davon abhängigen DLLs, auf die verwiesen wird, statisch mit der generierten Assembly verknüpfen + + + + Statically link the given assembly and all referenced DLLs that depend on this assembly. Use an assembly name e.g. mylib, not a DLL name. + Die angegebene Assembly und alle davon abhängigen DLLs, auf die verwiesen wird, statisch verknüpfen. Hierfür ist ein Assemblyname wie "mylib" zu verwenden, kein DLL-Name. + + + + Use a resident background compilation service to improve compiler startup times. + Verwenden Sie einen residenten Hintergrundkompilierungsdienst, um die Startzeiten des Compilers zu verbessern. + + + + Name the output debug file + Ausgabedebugdatei benennen + + + + Resolve assembly references using directory-based rules rather than MSBuild resolution + Assemblyverweise mithilfe von verzeichnisbasierten Regeln anstelle von MSBuild-Auflösung auflösen + + + + Unrecognized target '{0}', expected 'exe', 'winexe', 'library' or 'module' + Unbekanntes Ziel "{0}", "exe", "winexe", "library" oder "module" wurde erwartet. + + + + Unrecognized debug type '{0}', expected 'pdbonly' or 'full' + Unbekannter Debugtyp "{0}", "pdbonly" oder "full" wurde erwartet. + + + + Invalid warning level '{0}' + Ungültige Warnstufe "{0}". + + + + Short form of '{0}' + Kurzform von "{0}" + + + + The command-line option '--cliroot' has been deprecated. Use an explicit reference to a specific copy of mscorlib.dll instead. + Die Befehlszeilenoption "--cliroot" ist veraltet. Verwenden Sie stattdessen einen expliziten Verweis auf eine bestimmte Kopie von "mscorlib.dll". + + + + Use to override where the compiler looks for mscorlib.dll and framework components + Dient zum Überschreiben des Speicherorts, an dem der Compiler nach "mscorlib.dll" und den Frameworkkomponenten sucht. + + + + - OUTPUT FILES - + - AUSGABEDATEIEN - + + + + - INPUT FILES - + - EINGABEDATEIEN - + + + + - RESOURCES - + - RESSOURCEN - + + + + - CODE GENERATION - + - CODEGENERIERUNG - + + + + - ADVANCED - + - ERWEITERT - + + + + - MISCELLANEOUS - + - VERSCHIEDENES - + + + + - LANGUAGE - + - SPRACHE - + + + + - ERRORS AND WARNINGS - + - FEHLER UND WARNUNGEN - + + + + Unknown --test argument: '{0}' + Unbekannt - Testargument: '{0}' + + + + Unrecognized platform '{0}', valid values are 'x86', 'x64', 'Itanium', 'anycpu32bitpreferred', and 'anycpu' + Unbekannte Plattform "{0}", gültige Werte sind "x86", "x64", "Itanium", "anycpu32bitpreferred" und "anycpu". + + + + The command-line option '{0}' is for test purposes only + Die Befehlszeilenoption "{0}" ist ausschließlich für Testzwecke bestimmt. + + + + The command-line option '{0}' has been deprecated + Die Befehlszeilenoption "{0}" ist veraltet. + + + + The command-line option '{0}' has been deprecated. Use '{1}' instead. + Die Befehlszeilenoption "{0}" ist veraltet. Verwenden Sie stattdessen "{1}". + + + + The command-line option '{0}' has been deprecated. HTML document generation is now part of the F# Power Pack, via the tool FsHtmlDoc.exe. + Die Befehlszeilenoption "{0}" ist veraltet. Das Generieren von HTML-Dokumenten ist jetzt über das Tool "FsHtmlDoc.exe" Bestandteil des F# Power Packs. + + + + Output warning and error messages in color + Warnungen und Fehlermeldungen farbig ausgeben + + + + Enable high-entropy ASLR + ASLR mit hoher Entropie aktivieren + + + + Specify subsystem version of this assembly + Subsystemversion für diese Assembly festlegen + + + + Specify target framework profile of this assembly. Valid values are mscorlib, netcore or netstandard. Default - mscorlib + Geben Sie das Profil des Zielframeworks dieser Assembly an. Gültige Werte sind "mscorlib", "netcore" oder "netstandard". Standard – "mscorlib". + + + + Emit debug information in quotations + Debugginginformationen in Anführungszeichen ausgeben + + + + Specify the preferred output language culture name (e.g. es-ES, ja-JP) + Namen der bevorzugten Ausgabesprachenkultur angeben (z. B. "es-ES", "ja-JP") + + + + Don't copy FSharp.Core.dll along the produced binaries + FSharp.Core.dll nicht zusammen mit den generierten Binärdateien kopieren + + + + Invalid version '{0}' for '--subsystemversion'. The version must be 4.00 or greater. + Ungültige Version '{0}' für '--subsystemversion'. Die Version muss 4.00 oder höher sein. + + + + Invalid value '{0}' for '--targetprofile', valid values are 'mscorlib', 'netcore' or 'netstandard'. + Ungültiger Wert "{0}" für "--targetprofile", gültige Werte sind "mscorlib", "netcore" oder "netstandard". + + + + Full name + Vollständiger Name + + + + and {0} other overloads + und {0} weitere Überladungen + + + + union case + Union-Fall + + + + active pattern result + aktives Musterergebnis + + + + active recognizer + aktive Erkennung + + + + field + Feld + + + + event + Ereignis + + + + property + Eigenschaft + + + + extension + Erweiterung + + + + custom operation + Benutzerdefinierter Vorgang + + + + argument + Argument + + + + patvar + patvar + + + + namespace + Namespace + + + + module + Modul + + + + namespace/module + Namespace/Modul + + + + from {0} + aus {0} + + + + also from {0} + ebenfalls von {0} + + + + generated property + Generierte Eigenschaft + + + + generated type + Generierter Typ + + + + Found by AssemblyFolders registry key + Von AssemblyFolders-Registrierungsschlüssel gefunden + + + + Found by AssemblyFoldersEx registry key + Von AssemblyFoldersEx-Registrierungsschlüssel gefunden + + + + .NET Framework + .NET Framework + + + + Global Assembly Cache + Globaler Assemblycache + + + + Recursive class hierarchy in type '{0}' + Rekursive Klassenhierarchie in Typ "{0}". + + + + Invalid recursive reference to an abstract slot + Ungültiger rekursiver Verweis auf einen abstrakten Umsetzungsplatz. + + + + The event '{0}' has a non-standard type. If this event is declared in another CLI language, you may need to access this event using the explicit {1} and {2} methods for the event. If this event is declared in F#, make the type of the event an instantiation of either 'IDelegateEvent<_>' or 'IEvent<_,_>'. + Das {0}-Ereignis hat einen nicht standardmäßigen Typ. Falls dieses Ereignis in einer anderen CLI-Sprache deklariert wurde, müssen Sie ggf. mithilfe der expliziten {1}- und {2}-Methoden für das Ereignis darauf zugreifen. Falls das Ereignis in F# deklariert wurde, definieren Sie den Ereignistyp als Instanziierung von "IDelegateEvent<_>" oder "IEvent<_,_>". + + + + The type '{0}' is not accessible from this code location + Auf den Typ "{0}" kann von dieser Position im Code nicht zugegriffen werden. + + + + The union cases or fields of the type '{0}' are not accessible from this code location + Auf die Union-Fälle oder Felder des Typs "{0}" kann von dieser Position im Code nicht zugegriffen werden. + + + + The value '{0}' is not accessible from this code location + Auf den Wert "{0}" kann von dieser Position im Code nicht zugegriffen werden. + + + + The union case '{0}' is not accessible from this code location + Auf den Union-Fall "{0}" kann von dieser Position im Code nicht zugegriffen werden. + + + + The record, struct or class field '{0}' is not accessible from this code location + Auf das Datensatz-, Struktur- oder Klassenfeld "{0}" kann von dieser Position im Code nicht zugegriffen werden. + + + + The struct or class field '{0}' is not accessible from this code location + Auf das Struktur- oder Klassenfeld "{0}" kann von dieser Position im Code nicht zugegriffen werden. + + + + This construct is experimental + Dieses Konstrukt ist experimentell. + + + + No Invoke methods found for delegate type + Es wurden keine Invoke-Methoden für den Delegattyp gefunden. + + + + More than one Invoke method found for delegate type + Es wurde mehr als eine Invoke-Methode für den Delegattyp gefunden. + + + + Delegates are not allowed to have curried signatures + Delegaten dürfen keine Currysignaturen aufweisen. + + + + Unexpected Expr.TyChoose + Unerwartetes Expr.TyChoose + + + + Note: Lambda-lifting optimizations have not been applied because of the use of this local constrained generic function as a first class value. Adding type constraints may resolve this condition. + Hinweis: Auf Lambda-Lifting-Optimierungen wurde verzichtet, weil diese lokal eingeschränkte generische Funktion als Wert der ersten Klasse verwendet wird. Durch Hinzufügen von Typeinschränkungen lässt sich diese Bedingung möglicherweise auflösen. + + + + Identifiers containing '@' are reserved for use in F# code generation + Bezeichner mit "@" sind für die F#-Codegenerierung reserviert. + + + + The identifier '{0}' is reserved for future use by F# + Der Bezeichner "{0}" ist für die zukünftige Verwendung durch F# reserviert. + + + + Missing variable '{0}' + Fehlende Variable "{0}". + + + + Partial active patterns may only generate one result + Teilweise aktive Muster können nur ein Ergebnis erzeugen. + + + + The type '{0}' is required here and is unavailable. You must add a reference to assembly '{1}'. + Der Typ "{0}" ist hier erforderlich, aber nicht verfügbar. Sie müssen einen Verweis auf Assembly "{1}" hinzufügen. + + + + A reference to the type '{0}' in assembly '{1}' was found, but the type could not be found in that assembly + Ein Verweis auf den Typ "{0}" in Assembly "{1}" wurde gefunden, der Typ ist aber nicht in der Assembly vorhanden. + + + + Internal error or badly formed metadata: not enough type parameters were in scope while importing + Interner Fehler oder falsch formatierte Metadaten: Während des Imports befanden sich nicht genügend Typparameter im Bereich. + + + + A reference to the DLL {0} is required by assembly {1}. The imported type {2} is located in the first assembly and could not be resolved. + Ein Verweis auf die DLL "{0}" ist für die Assembly "{1}" erforderlich. Der importierte Typ "{2}" befindet sich in der ersten Assembly und konnte nicht aufgelöst werden. + + + + An imported assembly uses the type '{0}' but that type is not public + Eine importierte Assembly verwendet den Typ "{0}"; dieser Typ ist aber nicht öffentlich. + + + + The value '{0}' was marked inline but its implementation makes use of an internal or private function which is not sufficiently accessible + Der Wert "{0}" war als inline markiert, die Implementierung verwendet aber eine interne oder private Funktion, die keine ausreichende Zugreifbarkeit bietet. + + + + The value '{0}' was marked inline but was not bound in the optimization environment + Der Wert "{0}" war als inline markiert, aber nicht in der Optimierungsumgebung gebunden. + + + + Local value {0} not found during optimization + Der lokale Wert "{0}" wurde während der Optimierung nicht gefunden. + + + + A value marked as 'inline' has an unexpected value + Ein als "inline" markierter Wert hat einen unerwarteten Wert. + + + + A value marked as 'inline' could not be inlined + Ein als "inline" markierter Wert konnte nicht inline gestellt werden. + + + + Failed to inline the value '{0}' marked 'inline', perhaps because a recursive value was marked 'inline' + Der als "inline" markierte Wert "{0}" konnte nicht inline gestellt werden, möglicherweise, weil ein rekursiver Wert als "inline" markiert war. + + + + Recursive ValValue {0} + Rekursiver ValValue "{0}" + + + + The indentation of this 'in' token is incorrect with respect to the corresponding 'let' + Der Einzug dieses in-Tokens ist im Hinblick auf das entsprechende "let" fehlerhaft. + + + + Possible incorrect indentation: this token is offside of context started at position {0}. Try indenting this token further or using standard formatting conventions. + Möglicherweise falscher Einzug: Dieses Token ist gegenüber dem bei Position {0} beginnenden Kontext verschoben. Erhöhen Sie den Einzug für dieses Token, oder verwenden Sie die standardmäßigen Formatierungskonventionen. + + + + The '|' tokens separating rules of this pattern match are misaligned by one column. Consider realigning your code or using further indentation. + Die Trennregeln des |-Tokens für diesen Mustervergleich sind um eine Spalte verschoben. Richten Sie den Code neu aus, oder verwenden Sie weitere Einzüge. + + + + Invalid module/expression/type + Ungültiges Modul bzw. ungültiger Ausdruck/Typ. + + + + Multiple types exist called '{0}', taking different numbers of generic parameters. Provide a type instantiation to disambiguate the type resolution, e.g. '{1}'. + Es sind mehrere Typen mit dem Namen "{0}" vorhanden, die eine unterschiedliche Anzahl von generischen Parametern akzeptieren. Stellen Sie eine Typinstanziierung bereit, um eine eindeutige Typauflösung zu ermöglichen, z.B. "{1}". + + + + The instantiation of the generic type '{0}' is missing and can't be inferred from the arguments or return type of this member. Consider providing a type instantiation when accessing this type, e.g. '{1}'. + Die Instanziierung des generischen Typs "{0}" fehlt und kann nicht per Rückschluss von den Argumenten oder dem Rückgabetyp dieses Members abgeleitet werden. Stellen Sie beim Zugriff auf diesen Typ eine Typinstanziierung bereit, z.B. "{1}". + + + + 'global' may only be used as the first name in a qualified path + global darf nur als erster Name in einem qualifizierten Pfad verwendet werden. + + + + This is not a constructor or literal, or a constructor is being used incorrectly + Dies ist kein Konstruktor oder Literal, oder ein Konstruktor wird nicht ordnungsgemäß verwendet. + + + + Unexpected empty long identifier + Unerwarteter leerer langer Bezeichner. + + + + The record type '{0}' does not contain a label '{1}'. + Der Datensatztyp "{0}" enthält keine Bezeichnung "{1}". + + + + Invalid field label + Ungültige Feldbezeichnung. + + + + Invalid expression '{0}' + Ungültiger Ausdruck "{0}". + + + + No constructors are available for the type '{0}' + Für den Typ "{0}" sind keine Konstruktoren verfügbar. + + + + The union type for union case '{0}' was defined with the RequireQualifiedAccessAttribute. Include the name of the union type ('{1}') in the name you are using. + Der Union-Typ für Union-Fall "{0}" wurde mit RequireQualifiedAccessAttribute definiert. Fügen Sie den Union-Typnamen ("{1}") in den verwendeten Namen ein. + + + + The record type for the record field '{0}' was defined with the RequireQualifiedAccessAttribute. Include the name of the record type ('{1}') in the name you are using. + Der Datensatztyp für das Feld "{0}" wurde mit RequireQualifiedAccessAttribute definiert. Fügen Sie den Namen des Datensatztyps ("{1}") in den verwendeten Namen ein. + + + + Unexpected error creating debug information file '{0}' + Unerwarteter Fehler beim Erstellen der Debuginformationsdatei "{0}". + + + + This number is outside the allowable range for this integer type + Diese Zahl liegt außerhalb des zulässigen Bereichs für diesen Integer-Typ. + + + + '{0}' is not permitted as a character in operator names and is reserved for future use + {0} darf nicht in Operatornamen verwendet werden und ist für eine zukünftige Verwendung reserviert. + + + + Unexpected character '{0}' + Unerwartetes Zeichen "{0}". + + + + This byte array literal contains characters that do not encode as a single byte + Dieses Bytearrayliteral enthält Zeichen, die sich nicht als einzelnes Byte codieren lassen. + + + + Identifiers followed by '{0}' are reserved for future use + Bezeichner, auf die "{0}" folgt, sind für die zukünftige Verwendung reserviert. + + + + This number is outside the allowable range for 8-bit signed integers + Diese Zahl liegt außerhalb des zulässigen Bereichs für 8-Bit-Integer mit Vorzeichen. + + + + This number is outside the allowable range for hexadecimal 8-bit signed integers + Diese Zahl liegt außerhalb des zulässigen Bereichs für hexadezimale 8-Bit-Integer mit Vorzeichen. + + + + This number is outside the allowable range for 8-bit unsigned integers + Diese Zahl liegt außerhalb des zulässigen Bereichs für 8-Bit-Integer ohne Vorzeichen. + + + + This number is outside the allowable range for 16-bit signed integers + Diese Zahl liegt außerhalb des zulässigen Bereichs für 16-Bit-Integer mit Vorzeichen. + + + + This number is outside the allowable range for 16-bit unsigned integers + Diese Zahl liegt außerhalb des zulässigen Bereichs für 16-Bit-Integer ohne Vorzeichen. + + + + This number is outside the allowable range for 32-bit signed integers + Diese Zahl liegt außerhalb des zulässigen Bereichs für 32-Bit-Integer mit Vorzeichen. + + + + This number is outside the allowable range for 32-bit unsigned integers + Diese Zahl liegt außerhalb des zulässigen Bereichs für 32-Bit-Integer ohne Vorzeichen. + + + + This number is outside the allowable range for 64-bit signed integers + Diese Zahl liegt außerhalb des zulässigen Bereichs für 64-Bit-Integer mit Vorzeichen. + + + + This number is outside the allowable range for 64-bit unsigned integers + Diese Zahl liegt außerhalb des zulässigen Bereichs für 64-Bit-Integer ohne Vorzeichen. + + + + This number is outside the allowable range for signed native integers + Diese Zahl liegt außerhalb des zulässigen Bereichs für native Integer mit Vorzeichen. + + + + This number is outside the allowable range for unsigned native integers + Diese Zahl liegt außerhalb des zulässigen Bereichs für native Integer ohne Vorzeichen. + + + + Invalid floating point number + Ungültige Gleitkommazahl. + + + + This number is outside the allowable range for decimal literals + Diese Zahl liegt außerhalb des zulässigen Bereichs für Dezimalliterale. + + + + This number is outside the allowable range for 32-bit floats + Diese Zahl liegt außerhalb des zulässigen Bereichs für 32-Bit-Gleitkommastellen. + + + + This is not a valid numeric literal. Valid numeric literals include 1, 0x1, 0b0001 (int), 1u (uint32), 1L (int64), 1UL (uint64), 1s (int16), 1y (sbyte), 1uy (byte), 1.0 (float), 1.0f (float32), 1.0m (decimal), 1I (BigInteger). + Dies ist kein gültiges numerisches Literal. Die folgenden numerischen Literale sind z. B. gültig: 1, 0x1, 0b0001 (int), 1u (uint32), 1L (int64), 1UL (uint64), 1s (int16), 1y (sbyte), 1uy (byte), 1.0 (float), 1.0f (float32), 1.0m (decimal), 1I (BigInteger). + + + + This is not a valid byte literal + Dies ist kein gültiges Byteliteral. + + + + This is not a valid character literal + Dies ist kein gültiges Zeichenliteral. + + + + This Unicode encoding is only valid in string literals + Diese Unicode-Codierung ist nur für Zeichenfolgenliterale zulässig. + + + + This token is reserved for future use + Dieses Token ist für die zukünftige Verwendung reserviert. + + + + TABs are not allowed in F# code unless the #indent \"off\" option is used + Tabulatorzeichen sind in F#-Code nur zulässig, wenn die Option "#indent \"off\"" verwendet wird. + + + + Invalid line number: '{0}' + Ungültige Zeilennummer: '{0}' + + + + #if directive must appear as the first non-whitespace character on a line + Die #if-Direktive muss das erste Zeichen in einer Zeile sein, das keine Leerstelle ist. + + + + #else has no matching #if + Kein passendes #if für #else vorhanden. + + + + #endif required for #else + #endif für #else erforderlich. + + + + #else directive must appear as the first non-whitespace character on a line + Die #else-Direktive muss das erste Zeichen in einer Zeile sein, das keine Leerstelle ist. + + + + #endif has no matching #if + Kein passendes #if für #endif vorhanden. + + + + #endif directive must appear as the first non-whitespace character on a line + Die #endif-Direktive muss das erste Zeichen in einer Zeile sein, das keine Leerstelle ist. + + + + #if directive should be immediately followed by an identifier + Auf die #if-Direktive sollte sofort ein Bezeichner folgen. + + + + Syntax error. Wrong nested #endif, unexpected tokens before it. + Syntaxfehler. Falsches geschachteltes #endif, unerwartete Token davor. + + + + #! may only appear as the first line at the start of a file. + #! kann nur als erste Zeile zu Beginn einer Datei angezeigt werden. + + + + Expected single line comment or end of line + Einzeiliger Kommentar oder Zeilenende erwartet. + + + + Infix operator member '{0}' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ... + Infix-Operatormember "{0}" weist keine Argumente auf. Erwartet wurde ein Tupel mit 2 Argumenten, z.B. statischer Member (+) (x,y) = ... + + + + Infix operator member '{0}' has {1} initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ... + Infix-Operatormember "{0}" weist {1} anfängliche(s) Argument(e) auf. Erwartet wurde ein Tupel mit 2 Argumenten, z.B. statischer Member (+) (x,y) = ... + + + + Infix operator member '{0}' has extra curried arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ... + Infix-Operatormember "{0}" weist zusätzliche Curryargumente auf. Erwartet wurde ein Tupel mit 2 Argumenten, z.B. statischer Member (+) (x,y) = ... + + + + All record, union and struct types in FSharp.Core.dll must be explicitly labelled with 'StructuralComparison' or 'NoComparison' + Alle Datensatz-, Union- und Strukturtypen in "FSharp.Core.dll" müssen explizit mit "StructuralComparison" oder "NoComparison" bezeichnet werden. + + + + The struct, record or union type '{0}' has the 'StructuralComparison' attribute but the type parameter '{1}' does not satisfy the 'comparison' constraint. Consider adding the 'comparison' constraint to the type parameter + Der Struktur-, Datensatz- oder Union-Typ "{0}" ist mit dem StructuralComparison-Attribut versehen, aber der Typparameter "{1}" erfüllt die comparison-Einschränkung nicht. Fügen Sie dem Typparameter die comparison-Einschränkung hinzu. + + + + The struct, record or union type '{0}' has the 'StructuralComparison' attribute but the component type '{1}' does not satisfy the 'comparison' constraint + Der Struktur-, Datensatz- oder Union-Typ "{0}" ist mit dem StructuralComparison-Attribut versehen, aber der Komponententyp "{1}" erfüllt die comparison-Einschränkung nicht. + + + + The struct, record or union type '{0}' is not structurally comparable because the type parameter {1} does not satisfy the 'comparison' constraint. Consider adding the 'NoComparison' attribute to the type '{2}' to clarify that the type is not comparable + Der Struktur-, Datensatz- oder Union-Typ "{0}" ist strukturell nicht vergleichbar, weil der Typparameter "{1}" die comparison-Einschränkung nicht erfüllt. Fügen Sie dem Typ "{2}" das NoComparison-Attribut hinzu, um eindeutig anzugeben, dass der Typ nicht verglichen werden kann. + + + + The struct, record or union type '{0}' is not structurally comparable because the type '{1}' does not satisfy the 'comparison' constraint. Consider adding the 'NoComparison' attribute to the type '{2}' to clarify that the type is not comparable + Der Struktur-, Datensatz- oder Union-Typ "{0}" ist strukturell nicht vergleichbar, weil der Typ "{1}" die comparison-Einschränkung nicht erfüllt. Fügen Sie dem Typ "{2}" das NoComparison-Attribut hinzu, um eindeutig anzugeben, dass der Typ nicht verglichen werden kann. + + + + The struct, record or union type '{0}' does not support structural equality because the type parameter {1} does not satisfy the 'equality' constraint. Consider adding the 'NoEquality' attribute to the type '{2}' to clarify that the type does not support structural equality + Der Struktur-, Datensatz- oder Union-Typ "{0}" unterstützt keine strukturelle Gleichheit, weil der Typparameter "{1}" die equality-Einschränkung nicht erfüllt. Fügen Sie dem Typ "{2}" das NoEquality-Attribut hinzu, um eindeutig anzugeben, dass der Typ keine strukturelle Gleichheit unterstützt. + + + + The struct, record or union type '{0}' does not support structural equality because the type '{1}' does not satisfy the 'equality' constraint. Consider adding the 'NoEquality' attribute to the type '{2}' to clarify that the type does not support structural equality + Der Struktur-, Datensatz- oder Union-Typ "{0}" unterstützt keine strukturelle Gleichheit, weil der Typ "{1}" die equality-Einschränkung nicht erfüllt. Fügen Sie dem Typ "{2}" das NoEquality-Attribut hinzu, um eindeutig anzugeben, dass der Typ keine strukturelle Gleichheit unterstützt. + + + + The struct, record or union type '{0}' has the 'StructuralEquality' attribute but the type parameter '{1}' does not satisfy the 'equality' constraint. Consider adding the 'equality' constraint to the type parameter + Der Struktur-, Datensatz- oder Union-Typ "{0}" ist mit dem StructuralEquality-Attribut versehen, aber der Typparameter "{1}" erfüllt die equality-Einschränkung nicht. Fügen Sie dem Typparameter die equality-Einschränkung hinzu. + + + + The struct, record or union type '{0}' has the 'StructuralEquality' attribute but the component type '{1}' does not satisfy the 'equality' constraint + Der Struktur-, Datensatz- oder Union-Typ "{0}" ist mit dem StructuralEquality-Attribut versehen, aber der Komponententyp "{1}" erfüllt die equality-Einschränkung nicht. + + + + Each argument of the primary constructor for a struct must be given a type, for example 'type S(x1:int, x2: int) = ...'. These arguments determine the fields of the struct. + Jedes Argument des primären Konstruktors für eine Struktur muss einen Typ erhalten, z.B. "type S(x1:int, x2: int) = ...". Diese Argumente bestimmen die Felder der Struktur. + + + + The value '{0}' is unused + Der Wert "{0}" wird nicht verwendet. + + + + The recursive object reference '{0}' is unused. The presence of a recursive object reference adds runtime initialization checks to members in this and derived types. Consider removing this recursive object reference. + Der rekursive Objektverweis "{0}" wird nicht verwendet. Ist ein rekursiver Objektverweis vorhanden, werden Membern in diesem Typ und in abgeleiteten Typen Laufzeitinitialisierungsprüfungen hinzugefügt. Entfernen Sie diesen rekursiven Objektverweis. + + + + A getter property may have at most one argument group + Eine Getter-Eigenschaft darf maximal eine Argumentgruppe aufweisen. + + + + A setter property may have at most two argument groups + Eine Setter-Eigenschaft darf maximal zwei Argumentgruppen aufweisen. + + + + Invalid property getter or setter + Ungültiger Getter oder Setter für Eigenschaft. + + + + An indexer property must be given at least one argument + Eine Indexereigenschaft muss mindestens ein Argument erhalten. + + + + This operation accesses a mutable top-level value defined in another assembly in an unsupported way. The value cannot be accessed through its address. Consider copying the expression to a mutable local, e.g. 'let mutable x = ...', and if necessary assigning the value back after the completion of the operation + Bei diesem Vorgang wird auf eine nicht unterstützte Weise auf einen nicht änderbaren Wert der obersten Ebene zugegriffen, der in einer anderen Assembly definiert ist. Der Zugriff auf den Wert über seine Adresse ist nicht möglich. Kopieren Sie den Ausdruck in eine änderbare lokale Variable, z.B. "let mutable x = ...", und weisen Sie den Wert ggf. im Anschluss an diesen Vorgang erneut zu. + + + + Remove spaces between the type name and type parameter, e.g. \"type C<'T>\", not type \"C <'T>\". Type parameters must be placed directly adjacent to the type name. + Typparameter müssen direkt neben dem Typnamen platziert werden, z.B. \"type C<'T>\", nicht type \"C <'T>\". + + + + Remove spaces between the type name and type parameter, e.g. \"C<'T>\", not \"C <'T>\". Type parameters must be placed directly adjacent to the type name. + Typargumente müssen direkt neben dem Typnamen platziert werden. Beispiel: \"C<'T>\", nicht \"C <'T>\". + + + + The use of the type syntax 'int C' and 'C <int>' is not permitted here. Consider adjusting this type to be written in the form 'C<int>' + Die Verwendung der Typsyntax "int C" und "C <int>" ist an dieser Stelle nicht zulässig. Passen Sie die Typangabe im Format "C<int>" an. + + + + The module/namespace '{0}' from compilation unit '{1}' did not contain the module/namespace '{2}' + Das Modul bzw. der Namespace "{0}" aus der Kompilierungseinheit "{1}" enthielt nicht das Modul bzw. den Namespace "{2}". + + + + The module/namespace '{0}' from compilation unit '{1}' did not contain the val '{2}' + Das Modul bzw. der Namespace "{0}" aus der Kompilierungseinheit "{1}" enthielt nicht den Wert "{2}". + + + + The module/namespace '{0}' from compilation unit '{1}' did not contain the namespace, module or type '{2}' + Das Modul bzw. der Namespace "{0}" aus der Kompilierungseinheit "{1}" enthielt nicht den Namespace, das Modul oder den Typ "{2}". + + + + The 'UseNullAsTrueValue' attribute flag may only be used with union types that have one nullary case and at least one non-nullary case + Das UseNullAsTrueValue-Attributflag darf nur für Union-Typen verwendet werden, die einen nullären Fall und mindestens einen nicht nullären Fall aufweisen. + + + + The parameter '{0}' was inferred to have byref type. Parameters of byref type must be given an explicit type annotation, e.g. 'x1: byref<int>'. When used, a byref parameter is implicitly dereferenced. + Beim Parameter "{0}" wird angenommen, dass er über den byref-Typ verfügt. Für Parameter mit dem byref-Typ muss eine explizite Typanmerkung angegeben werden. Beispiel: "x1: byref<int>". Wenn er verwendet wird, wird ein byref-Parameter implizit dereferenziert. + + + + The generic member '{0}' has been used at a non-uniform instantiation prior to this program point. Consider reordering the members so this member occurs first. Alternatively, specify the full type of the member explicitly, including argument types, return type and any additional generic parameters and constraints. + Der generische Member "{0}" wurde bei einer nicht einheitlichen Instanziierung vor diesem Programmpunkt verwendet. Ordnen Sie die Member ggf. neu an, damit dieser Member zuerst angezeigt wird. Sie können auch explizit den vollständigen Typ des Members angeben, einschließlich Argumenttypen, des Rückgabetyps und aller zusätzlichen generischen Parametern und Einschränkungen. + + + + The attribute '{0}' appears in both the implementation and the signature, but the attribute arguments differ. Only the attribute from the signature will be included in the compiled code. + Das Attribut "{0}" ist sowohl in der Implementierung als auch in der Signatur enthalten, die Attributargumente unterscheiden sich jedoch. In den kompilierten Code wird nur das Attribut aus der Signatur eingefügt. + + + + Cannot call an abstract base member: '{0}' + Ein abstrakter Basismember kann nicht aufgerufen werden: "{0}" + + + + Could not resolve the ambiguity in the use of a generic construct with an 'unmanaged' constraint at or near this position + Die Mehrdeutigkeit bei der Verwendung eines generischen Konstrukts mit einer unmanaged-Einschränkung an dieser Position oder in ihrer Umgebung konnte nicht aufgelöst werden. + + + + This construct is for ML compatibility. {0}. You can disable this warning by using '--mlcompatibility' or '--nowarn:62'. + Dieses Konstrukt dient der ML-Kompatibilität. {0}. Die Warnung lässt sich mit "--mlcompatibility" oder "--nowarn:62" deaktivieren. + + + + The type '{0}' has been marked as having an Explicit layout, but the field '{1}' has not been marked with the 'FieldOffset' attribute + Der Typ "{0}" wurde als Typ mit explizitem Layout markiert, das Feld "{1}" wurde jedoch nicht mit dem FieldOffset-Attribut versehen. + + + + Interfaces inherited by other interfaces should be declared using 'inherit ...' instead of 'interface ...' + Von anderen Schnittstellen geerbte Schnittstellen müssen mit "inherit ..." (und nicht mit "interface ...") deklariert werden. + + + + Invalid prefix operator + Ungültiger Präfixoperator + + + + Invalid operator definition. Prefix operator definitions must use a valid prefix operator name. + Ungültige Operatordefinition. Für Präfixoperatordefinitionen muss ein gültiger Präfixoperatorname verwendet werden. + + + + The file extensions '.ml' and '.mli' are for ML compatibility + Die Dateierweiterungen ".ml" und ".mli" dienen der ML-Kompatibilität. + + + + Consider using a file with extension '.ml' or '.mli' instead + Verwenden Sie stattdessen eine Datei mit der Erweiterung ".ml" oder ".mli". + + + + Active pattern '{0}' is not a function + Das aktive Muster "{0}" ist keine Funktion. + + + + Active pattern '{0}' 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' + Das aktive Muster "{0}" besitzt einen Ergebnistyp mit Typvariablen, die nicht von der Eingabe bestimmt werden. Häufige Ursache: Es ist kein Ergebnisfall angegeben. Beispiel: "let (|A|B|) (x:int) = A x". Dieses Problem kann mithilfe einer Typeinschränkung behoben werden. Beispiel: "let (|A|B|) (x:int) : Choice<int,unit> = A x" + + + + The FieldOffset attribute can only be placed on members of types marked with the StructLayout(LayoutKind.Explicit) + Das FieldOffset-Attribut kann nur für Member des mit "StructLayout(LayoutKind.Explicit)" markierten Typs festgelegt werden. + + + + Optional arguments must come at the end of the argument list, after any non-optional arguments + Optionale Argumente müssen am Ende der Argumentliste stehen, ggf. nach den nicht optionalen Argumenten. + + + + Attribute 'System.Diagnostics.ConditionalAttribute' is only valid on methods or attribute classes + Das Attribut "System.Diagnostics.ConditionalAttribute" ist nur bei Methoden oder Attributklassen gültig. + + + + Extension members cannot provide operator overloads. Consider defining the operator as part of the type definition instead. + Erweiterungsmember können keine Operatorüberladungen bereitstellen. Definieren Sie den Operator stattdessen als Teil der Typdefinition. + + + + The name of the MDB file must be <assembly-file-name>.mdb. The --pdb option will be ignored. + Der Name der MDB-Datei muss <assembly-datei-name>.mdb lauten. Die --pdb-Option wird ignoriert. + + + + MDB generation failed. Could not find compatible member {0} + Fehler bei der MDB-Generierung. Kompatibler Member {0} wurde nicht gefunden. + + + + Cannot generate MDB debug information. Failed to load the 'MonoSymbolWriter' type from the 'Mono.CompilerServices.SymbolWriter.dll' assembly. + Es können keine MDB-Debuginformationen generiert werden. Fehler beim Laden des Typs 'MonoSymbolWriter' aus der 'Mono.CompilerServices.SymbolWriter.dll'-Assembly. + + + + The union case named '{0}' conflicts with the generated type '{1}' + Der Union-Fall mit dem Namen '{0}' befindet sich in einem Konflikt mit dem generierten Typ '{1}'. + + + + ReflectedDefinitionAttribute may not be applied to an instance member on a struct type, because the instance member takes an implicit 'this' byref parameter + ReflectedDefinitionAttribute kann nicht auf einen Instanzmember eines struct-Typs angewendet werden, da der Instanzmember einen impliziten 'this'-byref-Parameter akzeptiert. + + + + DLLImport bindings must be static members in a class or function definitions in a module + Bei DLLImport-Bindungen muss es sich um statische Member von Klassen- oder Funktionsdefinitionen eines Moduls handeln. + + + + When mscorlib.dll or FSharp.Core.dll is explicitly referenced the {0} option must also be passed + Wenn explizit auf "mscorlib.dll" oder "FSharp.Core.dll" verwiesen wird, muss auch die Option "{0}" übergeben werden. + + + + FSharp.Core.sigdata not found alongside FSharp.Core. File expected in {0}. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required. + FSharp.Core.sigdata wurde nicht neben "FSharp.Core" gefunden. Die Datei wurde in {0} erwartet. Erwägen Sie ein Upgrade auf eine aktuellere Version von "FSharp.Core", in der die Datei nicht mehr erforderlich ist. + + + + File '{0}' not found alongside FSharp.Core. File expected in {1}. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required. + Die Datei "{0}" wurde nicht neben "FSharp.Core" gefunden. Die Datei wurde in {1} erwartet. Erwägen Sie ein Upgrade auf eine aktuellere Version von "FSharp.Core", in der die Datei nicht mehr erforderlich ist. + + + + Filename '{0}' contains invalid character '{1}' + Der Dateiname '{0}' enthält das ungültige Zeichen '{1}'. + + + + 'use!' bindings must be of the form 'use! <var> = <expr>' + 'Use!'-Bindungen müssen das Format 'use! <pat> -> <expr>' aufweisen. + + + + Inner generic functions are not permitted in quoted expressions. Consider adding some type constraints until this function is no longer generic. + In Ausdrücken in Anführungszeichen sind innere generische Funktionen nicht zulässig. Fügen Sie Typeinschränkungen hinzu, bis diese Funktion nicht mehr generisch ist. + + + + The type '{0}' is not a valid enumerator type , i.e. does not have a 'MoveNext()' method returning a bool, and a 'Current' property + Beim Typ '{0}' handelt es sich nicht um einen gültigen Enumeratortyp, d. h. er verfügt über keine 'MoveNext()'-Methode, die einen booleschen Wert zurückgibt, und keine 'Current'-Eigenschaft. + + + + End of file in triple-quote string begun at or before here + Dateiende in einer Zeichenfolge mit dreifachen Anführungszeichen, die an oder vor dieser Stelle begonnen wurde + + + + End of file in triple-quote string embedded in comment begun at or before here + Dateiende in einer in den Kommentar eingebetteten Zeichenfolge mit dreifachen Anführungszeichen, die an oder vor dieser Stelle begonnen wurde + + + + This type test or downcast will ignore the unit-of-measure '{0}' + Bei diesem Typtest oder der Typumwandlung wird die Maßeinheit '{0}' ignoriert. + + + + Expected type argument or static argument + Es wurde ein Typ- oder statisches Argument erwartet. + + + + Unmatched '<'. Expected closing '>' + Keine Entsprechung für '<'. Schließendes '>' erwartet + + + + Unexpected quotation operator '<@' in type definition. If you intend to pass a verbatim string as a static argument to a type provider, put a space between the '<' and '@' characters. + Unerwarteter Anführungszeichen-Operator '<@' in der Typdefinition. Wenn eine ausführliche Zeichenfolge als statisches Argument an einen Typanbieter übergeben werden soll, fügen Sie zwischen den Zeichen '<' und '@' eine Leerstelle ein. + + + + Attempted to parse this as an operator name, but failed + Versuchte Analyse als Operatornamen, jedoch Analysefehler + + + + \U{0} is not a valid Unicode character escape sequence + \U{0} ist keine gültige Unicode-Zeichen-Escapesequenz + + + + '{0}' must be applied to an argument of type '{1}', but has been applied to an argument of type '{2}' + "{0}" muss auf ein Argument vom Typ "{1}" angewendet werden, wurde aber auf ein Argument vom Typ "{2}" angewendet. + + + + '{0}' can only be applied to optional arguments + {0} kann nur auf optionale Argumente angewendet werden. + + + + The specified .NET Framework version '{0}' is not supported. Please specify a value from the enumeration Microsoft.Build.Utilities.TargetDotNetFrameworkVersion. + Die angegebene .NET Framework-Version "{0}" wird nicht unterstützt. Geben Sie einen Wert aus der Enumeration "Microsoft.Build.Utilities.TargetDotNetFrameworkVersion" an. + + + + Invalid Magic value in CLR Header + Ungültiger Magic-Wert im CLR-Header. + + + + Bad image format + Ungültiges Bildformat. + + + + Private key expected + Ein privater Schlüssel wurde erwartet. + + + + RSA key expected + Ein RSA-Schlüssel wurde erwartet. + + + + Invalid bit Length + Ungültige Bitlänge. + + + + Invalid RSAParameters structure - '{{0}}' expected + Ungültige RSAParameters-Struktur – "{{0}}" wurde erwartet. + + + + Invalid algId - 'Exponent' expected + Ungültige "algId" – "Exponent" wurde erwartet. + + + + Invalid signature size + Ungültige Signaturgröße. + + + + No signature directory + Kein Signaturverzeichnis + + + + Invalid Public Key blob + Ungültiger öffentlicher Schlüssel-BLOB. + + + + Exiting - too many errors + Der Vorgang wird aufgrund zu vieler Fehler beendet. + + + + The documentation file has no .xml suffix + Die Dokumentationsdatei weist kein XML-Suffix auf. + + + + No implementation files specified + Es wurden keine Implementierungsdateien angegeben. + + + + The attribute {0} specified version '{1}', but this value is invalid and has been ignored + Das Attribut "{0}" hat Version "{1}" angegeben, dieser Wert ist jedoch ungültig und wurde ignoriert. + + + + Conflicting options specified: 'win32manifest' and 'win32res'. Only one of these can be used. + Es wurden widersprüchliche Optionen angegeben: 'win32manifest' und 'win32res'. Nur eine dieser Optionen kann verwendet werden. + + + + The code in assembly '{0}' makes uses of quotation literals. Static linking may not include components that make use of quotation literals unless all assemblies are compiled with at least F# 4.0. + Der Code in der Assembly "{0}" verwendet Quotation-Literale. Statische Verknüpfungen schließen unter Umständen Komponenten nicht ein, die Quotation-Literale verwenden, sofern nicht alle Assemblys mindestens mit F# 4.0 kompiliert sind. + + + + Code in this assembly makes uses of quotation literals. Static linking may not include components that make use of quotation literals unless all assemblies are compiled with at least F# 4.0. + Der Code in dieser Assembly verwendet Quotation-Literale. Statische Verknüpfungen schließen unter Umständen Komponenten nicht ein, die Quotation-Literale verwenden, sofern nicht alle Assemblys mindestens mit F# kompiliert sind. + + + + Static linking may not include a .EXE + Die statische Verknüpfung darf keine EXE-Datei einschließen. + + + + Static linking may not include a mixed managed/unmanaged DLL + Eine statische Verknüpfung darf eine gemischte verwaltete/nicht verwaltete DLL nicht einschließen. + + + + Ignoring mixed managed/unmanaged assembly '{0}' during static linking + Die gemischte verwaltete/nicht verwaltete Assembly '{0}' wird während der statischen Verknüpfung ignoriert. + + + + Assembly '{0}' was referenced transitively and the assembly could not be resolved automatically. Static linking will assume this DLL has no dependencies on the F# library or other statically linked DLLs. Consider adding an explicit reference to this DLL. + Auf die Assembly '{0}' wurde transitiv verwiesen, und sie konnte nicht automatisch aufgelöst werden. Bei einer statischen Verknüpfung wird davon ausgegangen, dass diese DLL keine Abhängigkeiten in der F#-Bibliothek oder anderen statisch verknüpften DLLs aufweist. Fügen Sie dieser DLL einen expliziten Verweis hinzu. + + + + Assembly '{0}' not found in dependency set of target binary. Statically linked roots should be specified using an assembly name, without a DLL or EXE extension. If this assembly was referenced explicitly then it is possible the assembly was not actually required by the generated binary, in which case it should not be statically linked. + Assembly '{0}' wurde im Abhängigkeitssatz der Zielbinärdatei nicht gefunden. Statistisch verknüpfte Stämme müssen mithilfe eines Assemblynamen angegeben werden, ohne DLL- oder EXE-Erweiterung. Wenn explizit auf diese Assembly verwiesen wurde, ist es möglich, dass die Assembly nicht wirklich für die erzeugte Binärdatei erforderlich war. In diesem Fall sollte sie nicht statisch verknüpft sein. + + + + The key file '{0}' could not be opened + Die Schlüsseldatei '{0}' konnte nicht geöffnet werden. + + + + A problem occurred writing the binary '{0}': {1} + Fehler beim Schreiben der Binärdatei '{0}': {1} + + + + The 'AssemblyVersionAttribute' has been ignored because a version was given using a command line option + Das 'AssemblyVersionAttribute' wurde ignoriert, da eine Version mithilfe einer Befehlszeilenoption angegeben wurde. + + + + Error emitting 'System.Reflection.AssemblyCultureAttribute' attribute -- 'Executables cannot be satellite assemblies, Culture should always be empty' + Fehler beim Ausgeben des 'System.Reflection.AssemblyCultureAttribute'-Attributs -- "Ausführbare Dateien können keine Satellitenassemblys sein, Kulturen sollten immer leer sein". + + + + Option '--delaysign' overrides attribute 'System.Reflection.AssemblyDelaySignAttribute' given in a source file or added module + Die Option '--delaysign' überschreibt das Attribut 'System.Reflection.AssemblyDelaySignAttribute', das in einer Quelldatei oder einem hinzugefügten Modul angegeben wurde. + + + + Option '--keyfile' overrides attribute 'System.Reflection.AssemblyKeyFileAttribute' given in a source file or added module + Die Option '--keyfile' überschreibt das Attribut 'System.Reflection.AssemblyKeyFileAttribute', das in einer Quelldatei oder einem hinzugefügten Modul angegeben wurde. + + + + Option '--keycontainer' overrides attribute 'System.Reflection.AssemblyNameAttribute' given in a source file or added module + Die Option '--keycontainer' überschreibt das Attribut 'System.Reflection.AssemblyNameAttribute', das in einer Quelldatei oder einem hinzugefügten Modul angegeben wurde. + + + + The assembly '{0}' is listed on the command line. Assemblies should be referenced using a command line flag such as '-r'. + Die Assembly '{0}' ist an der Befehlszeile aufgeführt. Auf Assemblys muss mithilfe eines Befehlszeilenflags wie '-r' verwiesen werden. + + + + The resident compilation service was not used because a problem occured in communicating with the server. + Der residente Kompilierungsdienst wurde nicht verwendet, da bei der Kommunikation mit dem Server ein Problem aufgetreten ist. + + + + Problem with filename '{0}': Illegal characters in path. + Problem mit Dateinamen '{0}': Ungültige Zeichen im Pfad. + + + + Passing a .resx file ({0}) as a source file to the compiler is deprecated. Use resgen.exe to transform the .resx file into a .resources file to pass as a --resource option. If you are using MSBuild, this can be done via an <EmbeddedResource> item in the .fsproj project file. + Das Übergeben einer RESX-Datei ({0}) als Quelldatei an den Compiler ist veraltet. Verwenden Sie "resgen.exe", um die RESX-Datei in eine RESOURCES-Datei zu transformieren, um eine --resource-Option zu übergeben. Bei der Verwendung von MSBuild kann dies über ein <EmbeddedResource>-Element in der .fsproj-Projektdatei erfolgen. + + + + Static linking may not be used on an assembly referencing mscorlib (e.g. a .NET Framework assembly) when generating an assembly that references System.Runtime (e.g. a .NET Core or Portable assembly). + Statische Verknüpfungen dürfen beim Generieren einer Assembly mit Verweis auf System.Runtime (z. B. eine .NET Core- oder eine portierbare Assembly) nicht für eine Assembly verwendet werden, die auf mscorlib verweist (z. B. eine .NET Framework-Assembly). + + + + An {0} specified version '{1}', but this value is a wildcard, and you have requested a deterministic build, these are in conflict. + {0} hat Version "{1}" angegeben, dieser Wert ist jedoch ein Platzhalter, und Sie haben einen deterministischen Build angefordert. Zwischen diesen besteht ein Konflikt. + + + + Determinstic builds only support portable PDBs (--debug:portable or --debug:embedded) + Deterministische Builds unterstützen nur portierbare PDbs ("--debug:portable" oder "--debug:embedded"). + + + + Character '{0}' is not allowed in provided namespace name '{1}' + Das Zeichen '{0}' ist im angegebenen Namespacenamen '{1}' nicht zulässig. + + + + The provided type '{0}' returned a member with a null or empty member name + Der angegebene Typ '{0}' hat einen Member mit einem NULL- oder leeren Membernamen zurückgegeben. + + + + The provided type '{0}' returned a null member + Der Typanbieter '{0}' hat einen NULL-Member zurückgegeben. + + + + The provided type '{0}' member info '{1}' has null declaring type + Die Memberinformationen '{1}' des angegebenen Typs '{0}' verfügen über einen NULL-Deklarierungstyp. + + + + The provided type '{0}' has member '{1}' which has declaring type '{2}'. Expected declaring type to be the same as provided type. + Der angegebene Typ '{0}' verfügt über einen Member '{1}' mit dem deklarierenden Typ '{2}'. Es wurde als deklarierender Typ derselbe wie der angegebene Typ erwartet. + + + + Referenced assembly '{0}' has assembly level attribute '{1}' but no public type provider classes were found + Die referenzierte Assembly '{0}' verfügt über das Attribut '{1}' auf Assemblyebene, es wurden jedoch keine öffentlichen Typanbieterklassen gefunden. + + + + Type '{0}' from type provider '{1}' has an empty namespace. Use 'null' for the global namespace. + Typ '{0}' von Typanbieter '{1}' verfügt über einen leeren Namespace. Verwenden Sie für den globalen Namespace 'null'. + + + + Empty namespace found from the type provider '{0}'. Use 'null' for the global namespace. + Leerer Namespace gefunden von Typanbieter '{0}'. Verwenden Sie für den globalen Namespace 'null'. + + + + Provided type '{0}' has 'IsGenericType' as true, but generic types are not supported. + Für den angegebenen Typ '{0}' ist 'IsGenericType' auf true festgelegt, es werden jedoch keine generischen Typen unterstützt. + + + + Provided type '{0}' has 'IsArray' as true, but array types are not supported. + Für den angegebenen Typ '{0}' ist 'IsArray' auf true festgelegt, es werden jedoch keine Arraytypen unterstützt. + + + + Invalid member '{0}' on provided type '{1}'. Provided type members must be public, and not be generic, virtual, or abstract. + Ungültiger Member '{0}' für Anbietertyp '{1}'. Die angegebenen Typmember müssen öffentlich, nicht jedoch generisch, virtuell oder abstrakt sein. + + + + Invalid member '{0}' on provided type '{1}'. Only properties, methods and constructors are allowed + Ungültiger Member '{0}' für Anbietertyp '{1}'. Es sind nur Eigenschaften, Methoden und Konstruktoren zulässig. + + + + Property '{0}' on provided type '{1}' has CanRead=true but there was no value from GetGetMethod() + Die '{0}'-Eigenschaft des angegebenen Typs '{1}' ist auf CanRead=true festgelegt, es gab jedoch keinen Wert von GetGetMethod(). + + + + Property '{0}' on provided type '{1}' has CanRead=false but GetGetMethod() returned a method + Die '{0}'-Eigenschaft des angegebenen Typs '{1}' ist auf CanRead=false festgelegt, GetGetMethod() hat jedoch eine Methode zurückgegeben. + + + + Property '{0}' on provided type '{1}' has CanWrite=true but there was no value from GetSetMethod() + Die '{0}'-Eigenschaft des angegebenen Typs '{1}' ist auf CanWrite=true festgelegt, es gab jedoch keinen Wert von GetSetMethod(). + + + + Property '{0}' on provided type '{1}' has CanWrite=false but GetSetMethod() returned a method + Die '{0}'-Eigenschaft des angegebenen Typs '{1}' ist auf CanWrite=false festgelegt, GetSetMethod() hat jedoch eine Methode zurückgegeben. + + + + One or more errors seen during provided type setup + Beim Setup des angegebenen Typs ist mindestens ein Fehler aufgetreten. + + + + Unexpected exception from provided type '{0}' member '{1}': {2} + Unerwartete Ausnahme vom angegebenen Typ '{0}' Member '{1}': {2} + + + + Unsupported constant type '{0}'. Quotations provided by type providers can only contain simple constants. The implementation of the type provider may need to be adjusted by moving a value declared outside a provided quotation literal to be a 'let' binding inside the quotation literal. + Nicht unterstützter Konstantentyp "{0}". Vom Typanbieter bereitgestellte Quotations dürfen nur einfache Konstanten enthalten. Die Implementierung des Typanbieters muss unter Umständen angepasst werden, indem ein Wert, der außerhalb eines bereitgestellten Quotation-Literals daklariert wird, mittels Verschieben in eine let-Bindung innerhalb eines Quotation-Literals umgewandelt wird. + + + + Unsupported expression '{0}' from type provider. If you are the author of this type provider, consider adjusting it to provide a different provided expression. + Nicht unterstützter Ausdruck '{0}' des Typanbieters. Wenn Sie der Autor dieses Typanbieters sind, sollten Sie ihn möglicherweise so anpassen, dass ein anderer unterstützter Ausdruck bereitgestellt wird. + + + + Expected provided type named '{0}' but provided type has 'Name' with value '{1}' + Es wurde ein angegebener Type mit dem Namen '{0}' erwartet, der angegebene Typ verfügt jedoch über 'Name' mit dem Wert '{1}' + + + + Event '{0}' on provided type '{1}' has no value from GetAddMethod() + Ereignis '{0}' des angegebenen Typs '{1}' verfügt nicht über einen Wert von GetAddMethod() + + + + Event '{0}' on provided type '{1}' has no value from GetRemoveMethod() + Ereignis '{0}' des angegebenen Typs '{1}' verfügt nicht über einen Wert von GetRemoveMethod() + + + + Assembly attribute '{0}' refers to a designer assembly '{1}' which cannot be loaded or doesn't exist. {2} + Das Assemblyattribut '{0}' bezieht sich auf eine Designerassembly '{1}', die entweder nicht geladen werden kann oder nicht vorhanden ist. {2} + + + + The type provider does not have a valid constructor. A constructor taking either no arguments or one argument of type 'TypeProviderConfig' was expected. + Der Typanbieter verfügt über keinen gültigen Konstruktor. Es wurde ein Konstruktor erwartet, der entweder keine Argumente oder ein Argument des Typs 'TypeProviderConfig' akzeptiert. + + + + The type provider '{0}' reported an error: {1} + Der Typanbieter '{0}' hat einen Fehler gemeldet: {1} + + + + The type provider '{0}' used an invalid parameter in the ParameterExpression: {1} + Der Typanbieter '{0}' hat in ParameterExpression einen ungültigen Parameter verwendet: {1} + + + + The type provider '{0}' provided a method with a name '{1}' and metadata token '{2}', which is not reported among its methods of its declaring type '{3}' + Der Typanbieter '{0}' hat eine Methode mit dem Namen '{1}' und dem Metadatentoken '{2}' angegeben, die nicht zu den Methoden des deklarierenden Typs '{3}' gehört + + + + The type provider '{0}' provided a constructor which is not reported among the constructors of its declaring type '{1}' + Der Typanbieter '{0}' hat einen Konstruktor bereitgestellt, der nicht zu den Konstruktoren des deklarierten Typs '{1}' gehört + + + + A direct reference to the generated type '{0}' is not permitted. Instead, use a type definition, e.g. 'type TypeAlias = <path>'. This indicates that a type provider adds generated types to your assembly. + Es ist kein direkter Verweis zum generierten Typ '{0}' zulässig. Verwenden Sie stattdessen eine Typdefinition, z. B. TypeAlias = <path>. Dies weist darauf hin, dass ein Typanbieter Ihrer Assembly generierte Typen hinzufügt. + + + + Expected provided type with path '{0}' but provided type has path '{1}' + Es wurde ein angegebener Type mit dem Pfad '{0}' erwartet, der angegebene Typ verfügt jedoch über den Pfad '{1}'. + + + + Unexpected 'null' return value from provided type '{0}' member '{1}' + Unerwarteter NULL-Rückgabewert vom angegebenen Typ '{0}' Member '{1}': + + + + Unexpected exception from member '{0}' of provided type '{1}' member '{2}': {3} + Unerwartete Ausnahme von Member '{0}' des angegebenen Typs '{1}' von Member '{2}': {3} + + + + Nested provided types do not take static arguments or generic parameters + Die geschachtelten angegebenen Typen akzeptieren keine statischen Argumente oder generische Parameter. + + + + Invalid static argument to provided type. Expected an argument of kind '{0}'. + Ungültiges statisches Argument für angegebenen Typ. Es wurde ein Argument der Art '{0}' erwartet. + + + + An error occured applying the static arguments to a provided type + Fehler beim Anwenden des statischen Arguments auf einen angegebenen Typ. + + + + Unknown static argument kind '{0}' when resolving a reference to a provided type or method '{1}' + Unbekannte Art des statischen Arguments "{0}" beim Auflösen eines Verweises zum angegebenen Typ oder zur angegebenen Methode "{1}". + + + + invalid namespace for provided type + Ungültiger Namespace für den angegebenen Typ + + + + invalid full name for provided type + Ungültiger vollständiger Name für den angegebenen Typ + + + + The type provider returned 'null', which is not a valid return value from '{0}' + Der Typanbieter hat NULL zurückgegeben, wobei es sich nicht um einen gültigen Rückgabewert von '{0}' handelt. + + + + The type provider constructor has thrown an exception: {0} + Der Typanbieterkonstruktor hat eine Ausnahme ausgelöst: {0} + + + + Type provider '{0}' returned null from GetInvokerExpression. + Typanbieter '{0}' hat von GetInvokerExpression NULL zurückgegeben. + + + + The type provider '{0}' returned an invalid type from 'ApplyStaticArguments'. A type with name '{1}' was expected, but a type with name '{2}' was returned. + Der Typanbieter '{0}' hat von 'ApplyStaticArguments' einen ungültigen Typ zurückgegeben. Es wurde ein Typ mit dem Namen '{1}' erwartet, es wurde jedoch ein Typ mit dem Namen '{2}' zurückgegeben. + + + + The type provider '{0}' returned an invalid method from 'ApplyStaticArgumentsForMethod'. A method with name '{1}' was expected, but a method with name '{2}' was returned. + Der Typanbieter "{0}" hat von "ApplyStaticArgumentsForMethod" eine ungültige Methode zurückgegeben. Es wurde eine Methode mit dem Namen "{1}" erwartet, es wurde jedoch eine Methode mit dem Namen "{2}" zurückgegeben. + + + + This type test or downcast will erase the provided type '{0}' to the type '{1}' + Mit diesem Typtest oder der Typumwandlung wird der angegebene Typ '{0}' in den Typ '{1}' geändert. + + + + This downcast will erase the provided type '{0}' to the type '{1}'. + Mit dieser Typumwandlung wird der angegebene Typ '{0}' in den Typ '{1}' geändert. + + + + This type test with a provided type '{0}' is not allowed because this provided type will be erased to '{1}' at runtime. + Dieser Typetest mit dem angegeben Typ '{0}' ist nicht zulässig, da dieser angegebene Typ zur Laufzeit in '{1}' gelöscht wird. + + + + Cannot inherit from erased provided type + Von einem gelöschten angegebenen Typ kann nicht geerbt werden. + + + + Assembly '{0}' hase TypeProviderAssembly attribute with invalid value '{1}'. The value should be a valid assembly name + Assembly '{0}' verfügt über ein TypeProviderAssembly-Attribut mit dem ungültigen Wert '{1}'. Beim Wert sollte es sich um einen gültigen Assemblynamen handeln. + + + + Invalid member name. Members may not have name '.ctor' or '.cctor' + Ungültiger Membername. Member dürfen nicht die Namen '.ctor' oder '.cctor' haben. + + + + The function or member '{0}' is used in a way that requires further type annotations at its definition to ensure consistency of inferred types. The inferred signature is '{1}'. + Die Funktion oder der Member '{0}' wird auf eine Weise verwendet, die in den Definitionen zusätzliche Typanmerkungen erfordert, um die Konsistenz der abgeleiteten Typen sicherzustellen. Die abgeleitete Signatur lautet '{1}'. + + + + The number of type arguments did not match: '{0}' given, '{1}' expected. This may be related to a previously reported error. + Die Anzahl der Typargumente stimmte nicht überein: Es wurde {1} erwartet, jedoch {0} ausgegeben. Dies kann mit einem zuvor gemeldeten Fehler zusammenhängen. + + + + Cannot override inherited member '{0}' because it is sealed + Der geerbte Member '{0}' kann nicht überschrieben werden, da er versiegelt ist. + + + + The type provider '{0}' reported an error in the context of provided type '{1}', member '{2}'. The error: {3} + Der Typanbieter '{0}' hat einen Fehler im Kontext des angegebenen Typs '{1}', Member '{2}' gemeldet. Fehler: {3} + + + + An exception occurred when accessing the '{0}' of a provided type: {1} + Beim Zugreifen auf '{0}' eines angegebenen Typs ist eine Ausnahme aufgetreten: {1} + + + + The '{0}' of a provided type was null or empty. + '{0}' eines angegebenen Typs war NULL oder leer. + + + + Character '{0}' is not allowed in provided type name '{1}' + Das Zeichen '{0}' ist im angegebenen Typnamen '{1}' nicht zulässig. + + + + In queries, '{0}' must use a simple pattern + In Abfragen muss '{0}' ein einfaches Muster verwenden. + + + + A custom query operation for '{0}' is required but not specified + Für '{0}' ist ein benutzerdefinierter Abfragevorgang erforderlich, der jedoch nicht angegeben wurde. + + + + Named static arguments must come after all unnamed static arguments + Die benannten statischen Argumente müssen auf alle unbenannten statischen Argumente folgen. + + + + The static parameter '{0}' of the provided type or method '{1}' requires a value. Static parameters to type providers may be optionally specified using named arguments, e.g. '{2}<{3}=...>'. + Der statische Parameter "{0}" vom angegebenen Typ oder der angegebenen Methode "{1}" benötigt einen Wert. Statische Parameter zu Typanbietern können optional mithilfe von benannten Argumenten angegeben werden, z. B. "{2}<{3}=...>". + + + + No static parameter exists with name '{0}' + Es sind keine statische Parameter mit dem Namen '{0}' vorhanden. + + + + The static parameter '{0}' has already been given a value + Der statische Parameter '{0}' verfügt bereits über einen Wert. + + + + Multiple static parameters exist with name '{0}' + Es sind mehrere statische Parameter mit dem Namen '{0}' vorhanden. + + + + A custom operation may not be used in conjunction with a non-value or recursive 'let' binding in another part of this computation expression + Ein benutzerdefinierter Vorgang darf in einem anderen Teil dieses Berechnungsausdrucks nicht in Verbindung mit einem Nicht-Wert oder einer rekursiven 'let'-Bindung verwendet werden. + + + + A custom operation may not be used in conjunction with 'use', 'try/with', 'try/finally', 'if/then/else' or 'match' operators within this computation expression + Ein benutzerdefinierter Vorgang darf in diesem Berechnungsausdruck nicht in Verbindung mit den Operatoren 'use', 'try/with', 'try/finally', 'if/then/else' oder 'match' verwendet werden. + + + + The custom operation '{0}' refers to a method which is overloaded. The implementations of custom operations may not be overloaded. + Der benutzerdefinierte Vorgang '{0}' bezieht sich auf eine überladene Methode. Die Implementierungen der benutzerdefinierten Vorgänge sind möglicherweise nicht überladen. + + + + An if/then/else expression may not be used within queries. Consider using either an if/then expression, or use a sequence expression instead. + In Abfragen dürfen if/then/else-Ausdrücke nicht verwendet werden. Verwenden Sie stattdessen entweder einen if/then-Ausdruck oder einen Sequenzausdruck. + + + + Invalid argument to 'methodhandleof' during codegen + Ungültiges Argument für 'methodhandleof' bei der Codegenerierung + + + + A reference to a provided type was missing a value for the static parameter '{0}'. You may need to recompile one or more referenced assemblies. + Einem Verweis auf einen angegebenen Typ fehlte ein Wert für den statischen Parameter '{0}'. Es müssen möglicherweise eine oder mehrere referenzierte Assemblys erneut kompiliert werden. + + + + A reference to a provided type had an invalid value '{0}' for a static parameter. You may need to recompile one or more referenced assemblies. + Ein Verweis auf einen angegebenen Typ hatte für einen statischen Parameter den ungültigen Wert '{0}'. Es müssen möglicherweise eine oder mehrere referenzierte Assemblys erneut kompiliert werden. + + + + '{0}' is not used correctly. This is a custom operation in this query or computation expression. + '{0}' wird nicht ordnungsgemäß verwendet. Hierbei handelt es sich um einen benutzerdefinierten Vorgang in dieser Abfrage oder im Berechnungsausdruck. + + + + '{0}' is not used correctly. Usage: {1}. This is a custom operation in this query or computation expression. + "{0}" wird nicht ordnungsgemäß verwendet. Verwendung: {1}. Hierbei handelt es sich um einen benutzerdefinierten Vorgang in dieser Abfrage oder im Berechnungsausdruck. + + + + {0} var in collection {1} (outerKey = innerKey). Note that parentheses are required after '{2}' + {0}-Variable in der Sammlung {1} (outerKey = innerKey). Nach "{2}" sind Klammern erforderlich. + + + + {0} var in collection {1} (outerKey = innerKey) into group. Note that parentheses are required after '{2}' + {0}-Variable in der Sammlung {1} (outerKey = innerKey) in der Gruppe. Nach "{2}" sind Klammern erforderlich. + + + + {0} var in collection + {0}-Variable in der Sammlung + + + + '{0}' must be followed by a variable name. Usage: {1}. + "{0}" muss von einem Variablennamen gefolgt werden. Verwendung: {1}. + + + + Incorrect syntax for '{0}'. Usage: {1}. + Fehlerhafte Syntax für '{0}'. Verwendung: {1}. + + + + '{0}' must come after a 'for' selection clause and be followed by the rest of the query. Syntax: ... {1} ... + "{0}" muss auf eine for-Auswahlklausel folgen und vom Rest der Abfrage gefolgt werden. Syntax: ... {1} ... + + + + '{0}' is used with an incorrect number of arguments. This is a custom operation in this query or computation expression. Expected {1} argument(s), but given {2}. + "{0}" wird mit einer unzulässigen Anzahl von Argumenten verwendet. Hierbei handelt es sich um einen benutzerdefinierten Vorgang in dieser Abfrage oder im Berechnungsausdruck. {1} Argument(e) erwartet, jedoch {2} erhalten. + + + + Expected an expression after this point + Nach diesem Punkt wurde ein Ausdruck erwartet. + + + + Expected a type after this point + Nach diesem Punkt wurde ein Typ erwartet. + + + + Unmatched '[<'. Expected closing '>]' + Keine Entsprechung für "[<". Schließendes ">]" erwartet + + + + Unexpected end of input in 'match' expression. Expected 'match <expr> with | <pat> -> <expr> | <pat> -> <expr> ...'. + Unerwartetes Eingabeende im 'match'-Ausdruck. Es wurde 'match <expr> with | <pat> -> <expr> | <pat> -> <expr> ...' erwartet. + + + + Unexpected end of input in 'try' expression. Expected 'try <expr> with <rules>' or 'try <expr> finally <expr>'. + Unerwartetes Eingabeende im 'try'-Ausdruck. Es wurde 'try <expr> with <rules>' or 'try <expr> finally <expr>' erwartet. + + + + Unexpected end of input in 'while' expression. Expected 'while <expr> do <expr>'. + Unerwartetes Eingabeende im 'while'-Ausdruck. Es wurde 'while <expr> do <expr>' erwartet. + + + + Unexpected end of input in 'for' expression. Expected 'for <pat> in <expr> do <expr>'. + Unerwartetes Eingabeende im 'for'-Ausdruck. Es wurde 'for <pat> in <expr> do <expr>' erwartet. + + + + Unexpected end of input in 'match' or 'try' expression + Unerwartetes Eingabeende im 'match'- oder 'try'-Ausdruck + + + + Unexpected end of input in 'then' branch of conditional expression. Expected 'if <expr> then <expr>' or 'if <expr> then <expr> else <expr>'. + Unerwartetes Eingabeende in der 'then'-Verzweigung des bedingten Ausdrucks. Es wurde 'if <expr> then <expr>' or 'if <expr> then <expr> else <expr>' erwartet. + + + + Unexpected end of input in 'else' branch of conditional expression. Expected 'if <expr> then <expr>' or 'if <expr> then <expr> else <expr>'. + Unerwartetes Eingabeende in der 'else'-Verzweigung des bedingten Ausdrucks. Es wurde 'if <expr> then <expr>' or 'if <expr> then <expr> else <expr>' erwartet. + + + + Unexpected end of input in body of lambda expression. Expected 'fun <pat> ... <pat> -> <expr>'. + Unerwartetes Eingabeende im Text des lambda-Ausdrucks. Es wurde 'fun <pat> ... <pat> -> <expr>' erwartet. + + + + Unexpected end of input in type arguments + Unerwartetes Eingabeende in den Typargumenten + + + + Unexpected end of input in type signature + Unerwartetes Eingabeende in der Typsignatur + + + + Unexpected end of input in type definition + Unerwartetes Eingabeende in der Typdefinition + + + + Unexpected end of input in object members + Unerwartetes Eingabeende in Objektmembern + + + + Unexpected end of input in value, function or member definition + Unerwartetes Eingabeende im Wert, der Funktion oder der Memberdefinition + + + + Unexpected end of input in expression + Unerwartetes Eingabeende im Ausdruck + + + + Unexpected end of type. Expected a name after this point. + Unerwartetes Typende. Nach diesem Punkt wurde ein Name erwartet. + + + + Incomplete value or function definition. If this is in an expression, the body of the expression must be indented to the same column as the 'let' keyword. + Unvollständiger Wert oder unvollständige Funktionsdefinition. Wenn es sich hierbei um einen Ausdruck handelt, muss der Text des Ausdrucks in dieselbe Spalte wie das Schlüsselwort 'let' eingezogen werden. + + + + Incomplete value definition. If this is in an expression, the body of the expression must be indented to the same column as the 'let!' keyword. + Unvollständige Wertdefinition. Wenn es sich hierbei um einen Ausdruck handelt, muss der Text des Ausdrucks in dieselbe Spalte wie das Schlüsselwort 'let!' eingezogen werden. + + + + Incomplete value definition. If this is in an expression, the body of the expression must be indented to the same column as the 'use!' keyword. + Unvollständige Wertdefinition. Wenn es sich hierbei um einen Ausdruck handelt, muss der Text des Ausdrucks in dieselbe Spalte wie das Schlüsselwort 'use!' eingezogen werden. + + + + Incomplete value definition. If this is in an expression, the body of the expression must be indented to the same column as the 'use' keyword. + Unvollständige Wertdefinition. Wenn es sich hierbei um einen Ausdruck handelt, muss der Text des Ausdrucks in dieselbe Spalte wie das Schlüsselwort 'use' eingezogen werden. + + + + Missing 'do' in 'while' expression. Expected 'while <expr> do <expr>'. + Fehlendes 'do' in 'while'-Ausdruck. Es wurde 'while <expr> do <expr>' erwartet. + + + + Missing 'do' in 'for' expression. Expected 'for <pat> in <expr> do <expr>'. + Fehlendes 'do' in 'for'-Ausdruck. Es wurde 'for <pat> in <expr> do <expr>' erwartet. + + + + Invalid join relation in '{0}'. Expected 'expr <op> expr', where <op> is =, =?, ?= or ?=?. + Ungültige Joinbeziehung in '{0}'. Es wurde 'expr <op> expr' erwartet, wobei <op> =, =?, ?= oder ?=? ist. + + + + Calls + Aufrufe + + + + Invalid number of generic arguments to type '{0}' in provided type. Expected '{1}' arguments, given '{2}'. + Ungültige Anzahl generischer Argumente für Typ '{0}' im angegebenen Typ. Es wurden '{1}' Argumente erwartet, jedoch '{2}' ausgegeben. + + + + Invalid value '{0}' for unit-of-measure parameter '{1}' + Ungültiger Wert '{0}' für Maßeinheitenparameter '{1}' + + + + Invalid value unit-of-measure parameter '{0}' + Ungültiger Wert für Maßeinheitenparameter '{0}' + + + + Property '{0}' on provided type '{1}' is neither readable nor writable as it has CanRead=false and CanWrite=false + Die '{0}'-Eigenschaft des angegebenen Typs '{1}' kann weder gelesen noch geschrieben werden, da sie auf CanRead=false und CanWrite=false festgelegt ist. + + + + A use of 'into' must be followed by the remainder of the computation + Bei der Verwendung von 'into' muss der Rest der Berechnung folgen. + + + + The operator '{0}' does not accept the use of 'into' + Der Operator '{0}' lässt die Verwendung von 'into' nicht zu. + + + + The definition of the custom operator '{0}' does not use a valid combination of attribute flags + Für die Definition des benutzerdefinierten Operatoren '{0}' wird keine gültige Kombination von Attributflags verwendet. + + + + This type definition may not have the 'CLIMutable' attribute. Only record types may have this attribute. + Diese Typdefinition darf nicht über das 'CLIMutable'-Attribut verfügen. Nur Datensatztypen dürfen über dieses Attribut verfügen. + + + + 'member val' definitions are only permitted in types with a primary constructor. Consider adding arguments to your type definition, e.g. 'type X(args) = ...'. + 'member val'-Definitionen sind nur in Typen mit einem primären Konstruktor zulässig. Möglicherweise sollten Sie Ihrer Typdefinition Argumente hinzufügen, z. B. 'type X(args) = ...'. + + + + Property definitions may not be declared mutable. To indicate that this property can be set, use 'member val PropertyName = expr with get,set'. + Eigenschaftsdefinitionen können nicht änderbar deklariert werden. Um anzugeben, dass diese Eigenschaft festgelegt werden kann, verwenden Sie 'member val PropertyName = expr with get,set'. + + + + To indicate that this property can be set, use 'member val PropertyName = expr with get,set'. + Um anzugeben, dass diese Eigenschaft festgelegt werden kann, verwenden Sie "'member val PropertyName = expr with get,set". + + + + Type '{0}' is illegal because in byref<T>, T cannot contain byref types. + Typ '{0}' ist unzulässig, da T in byref<T> keine byref-Typen enthalten darf. + + + + F# supports array ranks between 1 and 32. The value {0} is not allowed. + F# unterstützt einen Arrayrang zwischen 1 und 32. Der Wert {0} ist nicht zulässig. + + + + In queries, use the form 'for x in n .. m do ...' for ranging over integers + Verwenden Sie in Abfragen die Form 'for x in n .. m do ...' für bereichsübergreifende Integer. + + + + 'while' expressions may not be used in queries + 'while'-Ausdrücke dürfen in Abfragen nicht verwendet werden. + + + + 'try/finally' expressions may not be used in queries + 'try/finally'-Ausdrücke dürfen in Abfragen nicht verwendet werden. + + + + 'use' expressions may not be used in queries + 'use'-Ausdrücke dürfen in Abfragen nicht verwendet werden. + + + + 'let!', 'use!' and 'do!' expressions may not be used in queries + Die 'let!'-, 'use!'- und 'do!'-Ausdrücke dürfen in Abfragen nicht verwendet werden. + + + + 'return' and 'return!' may not be used in queries + 'return'- und 'return!'-Ausdrücke dürfen in Abfragen nicht verwendet werden. + + + + This is not a known query operator. Query operators are identifiers such as 'select', 'where', 'sortBy', 'thenBy', 'groupBy', 'groupValBy', 'join', 'groupJoin', 'sumBy' and 'averageBy', defined using corresponding methods on the 'QueryBuilder' type. + Dies ist kein bekannter Abfrageoperator. Abfrageoperatoren sind Bezeichner wie z. B. 'select', 'where', 'sortBy', 'thenBy', 'groupBy', 'groupValBy', 'join', 'groupJoin', 'sumBy' und 'averageBy', die mithilfe der entsprechenden Methoden für den Typ 'QueryBuilder' definiert werden. + + + + 'try/with' expressions may not be used in queries + 'try/with'-Ausdrücke dürfen in Abfragen nicht verwendet werden. + + + + This 'let' definition may not be used in a query. Only simple value definitions may be used in queries. + Diese 'let'-Definition darf in einer Abfrage nicht verwendet werden. In Abfragen dürfen nur einfache Wertdefinitionen verwendet werden. + + + + Too many static parameters. Expected at most {0} parameters, but got {1} unnamed and {2} named parameters. + Zu viele statische Parameter. Es wurden höchstens {0} Parameter erwartet, zurückgegeben wurden jedoch {1} unbenannte und {2} benannte Parameter. + + + + Invalid provided literal value '{0}' + Ungültiger angegebener Literalwert '{0}' + + + + The 'anycpu32bitpreferred' platform can only be used with EXE targets. You must use 'anycpu' instead. + Die Plattform 'anycpu32bitpreferred' kann nur mit EXE-Zielen verwendet werden. Stattdessen muss 'anycpu' verwendet werden. + + + + This member, function or value declaration may not be declared 'inline' + Diese Member-, Funktions- oder der Wertdeklaration darf nicht mit 'inline' deklariert werden. + + + + The provider '{0}' returned a non-generated type '{1}' in the context of a set of generated types. Consider adjusting the type provider to only return generated types. + Der Anbieter "{0}" hat einen nicht generierten Typ "{1}" im Kontext einer Reihe von generierten Typen zurückgegeben. Ziehen Sie eine Anpassung des Typanbieters in Betracht, damit dieser nur generierte Typen zurückgibt. + + + + Arguments to query operators may require parentheses, e.g. 'where (x > y)' or 'groupBy (x.Length / 10)' + Argumente für Abfrageoperatoren erfordern möglicherweise Klammern, z. B. 'where (x > y)' oder 'groupBy (x.Length / 10)'. + + + + A quotation may not involve an assignment to or taking the address of a captured local variable + Eine Quotation darf keine Zuweisung zu einer erfassten lokalen Variable enthalten oder deren Adresse übernehmen + + + + + 1 overload + + 1 Überladung + + + + + {0} overloads + + {0} Überladungen + + + + Erased to + Gelöscht zu + + + + Unexpected token '{0}' or incomplete expression + Unerwartetes Token "{0}" oder unvollständiger Ausdruck + + + + Cannot find code target for this attribute, possibly because the code after the attribute is incomplete. + Codeziel für dieses Attribut kann nicht gefunden werden. Möglicherweise ist der Code nach dem Attribut unvollständig. + + + + Type name cannot be empty. + Der Typname darf nicht leer sein. + + + + Problem reading assembly '{0}': {1} + Problem beim Lesen von Assembly "{0}": {1} + + + + Invalid provided field. Provided fields of erased provided types must be literals. + Ungültiges angegebenes Feld. Die angegebenen Felder von gelöschten angegebenen Typen müssen Literale sein. + + + + (loading description...) + (Die Beschreibung wird geladen…) + + + + (description unavailable...) + (Die Beschreibung ist nicht verfügbar...) + + + + A type variable has been constrained by multiple different class types. A type variable may only have one class constraint. + Eine Typvariable wurde durch mehrere unterschiedliche Klassentypen eingeschränkt. Eine Typvariable weist möglicherweise nur eine Klasseneinschränkung auf. + + + + 'match' expressions may not be used in queries + 'match'-Ausdrücke dürfen in Abfragen nicht verwendet werden. + + + + Infix operator member '{0}' has {1} initial argument(s). Expected a tuple of 3 arguments + Infix-Operatormember '{0}' weist {1} anfängliche(s) Argument(e) auf. Erwartet wurde ein Tupel mit 3 Argumenten + + + + The operator '{0}' cannot be resolved. Consider opening the module 'Microsoft.FSharp.Linq.NullableOperators'. + Der Operator '{0}' konnte nicht aufgelöst werden. Möglicherweise sollte das Modul 'Microsoft.FSharp.Linq.NullableOperators' geöffnet werden. + + + + '{0}' must be followed by 'in'. Usage: {1}. + "{0}" muss von "in" gefolgt werden. Verwendung: {1}. + + + + Neither 'member val' nor 'override val' definitions are permitted in object expressions. + Weder die Definition 'member val' noch die Definition 'override val' ist in Objektausdrücken zulässig. + + + + Copy-and-update record expressions must include at least one field. + Copy-and-Update-Datensatzausdrücke müssen mindestens ein Feld enthalten. + + + + '_' cannot be used as field name + '_' kann nicht als Feldname verwendet werden + + + + The provided types generated by this use of a type provider may not be used from other F# assemblies and should be marked internal or private. Consider using 'type internal TypeName = ...' or 'type private TypeName = ...'. + Die angegebenen Typen, die durch diese Verwendung eines Typanbieters generiert wurden, können von anderen F#-Assemblys nicht verwendet werden und sollten als intern oder privat markiert werden. Verwenden Sie stattdessen 'type internal TypeName = ...' oder 'type private TypeName = ...'. + + + + A property's getter and setter must have the same type. Property '{0}' has getter of type '{1}' but setter of type '{2}'. + Getter und Setter einer Eigenschaft müssen denselben Typ aufweisen. Eigenschaft '{0}' hat einen Getter vom Typ '{1}', jedoch einen Setter vom Typ '{2}'. + + + + Array method '{0}' is supplied by the runtime and cannot be directly used in code. For operations with array elements consider using family of GetArray/SetArray functions from LanguagePrimitives.IntrinsicFunctions module. + Die Arraymethode '{0}' wird von der Laufzeit bereitgestellt und kann nicht direkt in Code verwendet werden. Ziehen Sie bei Vorgängen mit Arrayelementen die Familie der GetArray/SetArray-Funktionen aus dem LanguagePrimitives.IntrinsicFunctions-Modul in Erwägung. + + + + The union case '{0}' does not have a field named '{1}'. + Union-Fall/Ausnahme '{0}' verfügt nicht über ein Feld mit dem Namen '{1}'. + + + + Union case/exception field '{0}' cannot be used more than once. + Feld für Union-Fall/Ausnahme '{0}' kann nicht mehrmals verwendet werden. + + + + Named field '{0}' is used more than once. + Das Feld mit dem Namen '{0}' wird mehrmals verwendet. + + + + Named field '{0}' conflicts with autogenerated name for anonymous field. + Das Feld mit dem Namen '{0}' steht in Konflikt mit dem automatisch generierten Namen für ein anonymes Feld. + + + + This literal expression or attribute argument results in an arithmetic overflow. + Dieser literale Ausdruck oder dieses Attributargument führt zu einem arithmetischen Überlauf. + + + + This is not valid literal expression. The [<Literal>] attribute will be ignored. + Dies ist kein gültiger literaler Ausdruck. Das [<Literal>]-Attribut wird ignoriert. + + + + System.Runtime.InteropServices assembly is required to use UnknownWrapper\DispatchWrapper classes. + System.Runtime.InteropServices-Assembly erfordert Verwendung von UnknownWrapper\DispatchWrapper-Klassen. + + + + The mutable local '{0}' is implicitly allocated as a reference cell because it has been captured by a closure. This warning is for informational purposes only to indicate where implicit allocations are performed. + Die änderbare lokale Variable "{0}" ist implizit als Verweiszelle zugewiesen, da sie von einem Abschluss erfasst wurde. Diese Warnung dient nur zur Information und soll auf die Ausführungsorte impliziter Zuweisungen hinweisen. + + + + A type provider implemented GetStaticParametersForMethod, but ApplyStaticArgumentsForMethod was not implemented or invalid + Von einem Typanbieter wurde "GetStaticParametersForMethod" implementiert, aber "ApplyStaticArgumentsForMethod" wurde nicht implementiert oder war ungültig. + + + + An error occured applying the static arguments to a provided method + Fehler beim Anwenden der statischen Argumente auf eine angegebene Methode. + + + + Unexpected character '{0}' in preprocessor expression + Unerwartetes Zeichen "{0}" im Präprozessorausdruck. + + + + Unexpected token '{0}' in preprocessor expression + Unerwartetes Token "{0}" im Präprozessorausdruck. + + + + Incomplete preprocessor expression + Unvollständiger Präprozessorausdruck. + + + + Missing token '{0}' in preprocessor expression + Fehlendes Token "{0}" im Präprozessorausdruck. + + + + An error occurred while reading the F# metadata node at position {0} in table '{1}' of assembly '{2}'. The node had no matching declaration. Please report this warning. You may need to recompile the F# assembly you are using. + Beim Lesen des F#-Metadatenknotens an Position {0} in Tabelle "{1}" von Assembly "{2}" ist ein Fehler aufgetreten. Der Knoten besaß keine übereinstimmende Deklarierung. Melden Sie diese Warnung. Sie müssen die von Ihnen verwendete F#-Assembly möglicherweise neu kompilieren. + + + + Type inference caused the type variable {0} to escape its scope. Consider adding an explicit type parameter declaration or adjusting your code to be less generic. + Ein Typrückschluss hat bewirkt, dass die Typvariable '{0}' ihren Bereich verlassen hat. Fügen Sie ggf. eine explizite Typparameterdeklaration hinzu, oder passen Sie Ihren Code so an, dass er weniger generisch ist. + + + + Type inference caused an inference type variable to escape its scope. Consider adding type annotations to make your code less generic. + Ein Typrückschluss hat bewirkt, dass eine Variable vom Rückschlusstyp ihren Bereich verlassen hat. Fügen Sie ggf. Typanmerkungen hinzu, damit Ihr Code weniger generisch ist. + + + + Redundant arguments are being ignored in function '{0}'. Expected {1} but got {2} arguments. + Redundante Argumente werden in der Funktion '{0}' ignoriert. Erwartet wurden {1} Argumente, abgerufen jedoch {2} Argumente. + + + + Lowercase literal '{0}' is being shadowed by a new pattern with the same name. Only uppercase and module-prefixed literals can be used as named patterns. + Das Literal in Kleinbuchstaben '{0}' verursacht einen Konflikt mit einem neuen Muster mit dem gleichen Namen. Nur Literale in Großbuchstaben und Literale mit Modulpräfix können als benannte Muster verwendet werden. + + + + This literal pattern does not take arguments + Dieses Literalmuster nimmt keine Argumente an. + + + + Constructors are not permitted as extension members - they must be defined as part of the original definition of the type + Konstruktoren sind als Erweiterungsmember unzulässig. Sie müssen als Teil der ursprünglichen Definition des Typs definiert werden. + + + + Invalid response file '{0}' ( '{1}' ) + Ungültige Antwortdatei "{0}" ("{1}"). + + + + Response file '{0}' not found in '{1}' + Die Antwortdatei "{0}" wurde in "{1}" nicht gefunden. + + + + Response file name '{0}' is empty, contains invalid characters, has a drive specification without an absolute path, or is too long + Der Antwortdateiname "{0}" ist leer, enthält ungültige Zeichen, weist eine Laufwerkspezifikation ohne einen absoluten Pfad auf oder ist zu lang. + + + + Cannot find FSharp.Core.dll in compiler's directory + FSharp.Core.dll wurde im Verzeichnis des Compilers nicht gefunden. + + + + One tuple type is a struct tuple, the other is a reference tuple + Ein Tupeltyp ist ein Strukturtupel, der andere Typ ein Verweistupel. + + + + This provided method requires static parameters + Diese angegebene Methode erfordert statische Parameter. + + + + The conversion from {0} to {1} is a compile-time safe upcast, not a downcast. Consider using 'upcast' instead of 'downcast'. + Die Konvertierung aus {0} in {1} ist ein sicherer Ausdruck zur Umwandlung in eine Basisklasse zur Kompilierungszeit und kein Ausdruck zur Umwandlung in eine abgeleitet Klasse. Verwenden Sie ggf. "upcast" anstelle von "downcast". + + + + The conversion from {0} to {1} is a compile-time safe upcast, not a downcast. Consider using the :> (upcast) operator instead of the :?> (downcast) operator. + Die Konvertierung aus {0} in {1} ist ein sicherer Ausdruck zur Umwandlung in eine Basisklasse zur Kompilierungszeit und kein Ausdruck zur Umwandlung in eine abgeleitet Klasse. Verwenden Sie ggf. den Operator :> (Ausdruck zur Umwandlung in eine Basisklasse) anstelle des Operators :?> (Ausdruck zur Umwandlung in eine abgeleitet Klasse). + + + + The 'rec' on this module is implied by an outer 'rec' declaration and is being ignored + rec für dieses Modul wird implizit durch eine äußere rec-Deklaration angegeben und daher ignoriert. + + + + In a recursive declaration group, 'open' declarations must come first in each module + In einer rekursiven Deklarationsgruppe müssen open-Deklarationen in jedem Modul an erster Stelle auftreten. + + + + In a recursive declaration group, module abbreviations must come after all 'open' declarations and before other declarations + In einer rekursiven Deklarationsgruppe müssen Modulabkürzungen nach allen open-Deklarationen und vor anderen Deklarationen auftreten. + + + + This declaration is not supported in recursive declaration groups + Diese Deklaration wird in rekursiven Deklarationsgruppen nicht unterstützt. + + + + Invalid use of 'rec' keyword + Ungültige Verwendung des Schlüsselworts "rec". + + + + If a union type has more than one case and is a struct, then all fields within the union type must be given unique names. + Wenn ein Union-Typ mehrere case-Anweisungen aufweist und eine Struktur ist, müssen für alle Felder im Union-Typ eindeutige Namen angegeben werden. + + + + The CallerMemberNameAttribute applied to parameter '{0}' will have no effect. It is overridden by the CallerFilePathAttribute. + Das auf Parameter "{0}" angewendete CallerMemberNameAttribute hat keine Auswirkung. Es wird vom CallerFilePathAttribute überschrieben. + + + + Invalid use of 'fixed'. 'fixed' may only be used in a declaration of the form 'use x = fixed expr' where the expression is an array, the address of a field, the address of an array element or a string' + Ungültige Verwendung von "fixed". "fixed" darf ausschließlich in einer Deklaration der Form "use x = fixed expr" verwendet werden. Dabei ist der Ausdruck ein Array, die Adresse eines Felds, die Adresse eines Arrayelements oder eine Zeichenfolge. + + + + Could not find method System.Runtime.CompilerServices.OffsetToStringData in references when building 'fixed' expression. + Die Methode "System.Runtime.CompilerServices.OffsetToStringData" wurde beim Erstellen des fixed-Ausdrucks in den Verweisen nicht gefunden. + + + + {0} is an active pattern and cannot be treated as a discriminated union case with named fields. + {0} ist ein aktives Muster und kann nicht als ein diskriminierter Union-Fall mit benannten Feldern behandelt werden. + + + + The default value does not have the same type as the argument. The DefaultParameterValue attribute and any Optional attribute will be ignored. Note: 'null' needs to be annotated with the correct type, e.g. 'DefaultParameterValue(null:obj)'. + Der Standardwert hat nicht den gleichen Typ wie das Argument. Das DefaultParameterValue-Attribut sowie ggf. vorhandene optionale Attribute werden ignoriert. Hinweis: "null" muss mit dem richtigen Typ gekennzeichnet sein. Beispiel: DefaultParameterValue(null:obj). + + + + The system type '{0}' was required but no referenced system DLL contained this type + Der Systemtyp "{0}" war erforderlich, aber in keiner referenzierten System-DLL vorhanden. + + + + The member '{0}' matches multiple overloads of the same method.\nPlease restrict it to one of the following:{1}. + Der Member "{0}" entspricht mehreren Überladungen der gleichen Methode.\nBeschränken Sie ihn auf eine der folgenden Optionen: {1}. + + + + Method or object constructor '{0}' is not static + Methode oder Objektkonstruktor "{0}" ist nicht statisch. + + + + Unexpected symbol '=' in expression. Did you intend to use 'for x in y .. z do' instead? + Unerwartetes Symbol "=" im Ausdruck. Wollten Sie stattdessen "for x in y .. z do" verwenden? + + + + Indicates a method that either has no implementation in the type in which it is declared or that is virtual and has a default implementation. + Gibt eine Methode an, die entweder im Typ, in dem sie deklariert wird, über keine Implementierung verfügt oder die virtuell ist und über eine Standardimplementierung verfügt. + + + + Used in mutually recursive bindings, in property declarations, and with multiple constraints on generic parameters. + Wird in gegenseitig rekursiven Bindungen, in Eigenschaftendeklarationen und bei mehreren Beschränkungen in Bezug auf generische Parameter verwendet. + + + + Used to give the current class object an object name. Also used to give a name to a whole pattern within a pattern match. + Wird verwendet, um für das aktuelle Klassenobjekt einen Objektnamen zu vergeben. Wird auch verwendet, um für ein gesamtes Muster innerhalb eines Musterabgleichs einen Namen zu vergeben. + + + + Used to verify code during debugging. + Wird verwendet, um den Code während des Debuggens zu überprüfen. + + + + Used as the name of the base class object. + Wird als Name des Basisklassenobjekts verwendet. + + + + In verbose syntax, indicates the start of a code block. + Gibt in ausführlicher Syntax den Start eines Codeblocks an. + + + + In verbose syntax, indicates the start of a class definition. + Gibt in ausführlicher Syntax den Beginn einer Klassendefinition an. + + + + Indicates an implementation of an abstract method; used together with an abstract method declaration to create a virtual method. + Gibt eine Implementierung einer abstrakten Methode an; wird gemeinsam mit einer abstrakten Methodendeklaration zum Erstellen einer virtuellen Methode verwendet. + + + + Used to declare a delegate. + Wird verwendet, um einen Delegaten zu deklarieren. + + + + Used in looping constructs or to execute imperative code. + Wird in Schleifenkonstrukten oder zum Ausführen von imperativem Code verwendet. + + + + In verbose syntax, indicates the end of a block of code in a looping expression. + Gibt in ausführlicher Syntax das Ende eines Codeblocks in einem Schleifenausdruck an. + + + + Used to convert to a type that is lower in the inheritance chain. + Wird zum Konvertieren in einen Typ verwendet, der in Vererbungskette niedriger ist. + + + + In a for expression, used when counting in reverse. + Wird in einem for-Ausdruck beim Rückwährtszählen verwendet. + + + + Used in conditional branching. A short form of else if. + Wird in Verzweigungskonstrukten verwendet. Eine Kurzform von "else if". + + + + Used in conditional branching. + Wird in Verzweigungskonstrukten verwendet. + + + + In type definitions and type extensions, indicates the end of a section of member definitions. In verbose syntax, used to specify the end of a code block that starts with the begin keyword. + Gibt in Typendefinitionen und Typerweiterungen das Ende eines Abschnitts von Memberdefinitionen an. Wird in ausführlicher Syntax verwendet, um das Ende eines Codeblocks festzulegen, der mit dem Anfangsschlüsselwort beginnt. + + + + Used to declare an exception type. + Wird verwendet, um einen Ausnahmetyp zu deklarieren. + + + + Indicates that a declared program element is defined in another binary or assembly. + Gibt an, dass ein deklariertes Programmelement in einem anderen Binär oder einer anderen Assembly definiert ist. + + + + Used as a Boolean literal. + Wird als boolesches Literal verwendet. + + + + Used together with try to introduce a block of code that executes regardless of whether an exception occurs. + Wird zusammen mit "try" verwendet, um einen Codeblock bereitzustellen, der unabhängig davon ausgeführt wird, ob eine Ausnahme auftritt. + + + + Used in looping constructs. + Wird in Schleifenkonstrukten verwendet. + + + + Used in lambda expressions, also known as anonymous functions. + Wird in Lambdaausdrücken verwendet, auch als anonyme Funktionen bekannt. + + + + Used as a shorter alternative to the fun keyword and a match expression in a lambda expression that has pattern matching on a single argument. + Wird als kürzere Alternative zum fun-Schlüsselwort und einen Vergleichsausdruck in einem Lambdaausdruck verwendet, der über Musterabgleich für ein einzelnes Argument verfügt. + + + + Used to reference the top-level .NET namespace. + Wird verwendet, um auf den .NET-Namespace der obersten Ebene zu verweisen. + + + + Used in conditional branching constructs. + Wird in bedingten Verzweigungskonstrukten verwendet. + + + + Used for sequence expressions and, in verbose syntax, to separate expressions from bindings. + Wird für Sequenzausdrücke und in ausführlicher Syntax zum Trennen von Ausdrücken aus Bindungen verwendet. + + + + Used to specify a base class or base interface. + Wird verwendet, um eine Basisklasse oder Basisschnittstelle festzulegen. + + + + Used to indicate a function that should be integrated directly into the caller's code. + Wird verwendet, um eine Funktion anzugeben, die direkt in den Code der aufrufenden Funktion integriert werden soll. + + + + Used to declare and implement interfaces. + Wird verwendet, um Schnittstellen zu deklarieren und implementieren. + + + + Used to specify that a member is visible inside an assembly but not outside it. + Wird verwendet, um festzulegen, dass ein Member innerhalb einer Assembly sichtbar ist, außerhalb jedoch nicht. + + + + Used to specify a computation that is to be performed only when a result is needed. + Wird verwendet, um eine Berechnung festzulegen, die nur ausgeführt wird, wenn ein Ergebnis erforderlich ist. + + + + Used to associate, or bind, a name to a value or function. + Wird verwendet, um einen Namen einem Wert oder einer Funktion zuzuordnen oder daran zu binden. + + + + Used in computation expressions to bind a name to the result of another computation expression. + Wird in asynchronen Workflows verwendet, um einen Namen an das Ergebnis einer asynchronen Berechnung zu binden, oder in anderen Berechnungsausdrücken, um einen Namen an ein Ergebnis vom Berechnungstyp zu binden. + + + + Used to branch by comparing a value to a pattern. + Wird zum Verzweigen verwendet, indem ein Wert mit einem Muster verglichen wird. + + + + Used to declare a property or method in an object type. + Wird verwendet, um eine Eigenschaft oder Methode in einem Objekttypen zu deklarieren. + + + + Used to associate a name with a group of related types, values, and functions, to logically separate it from other code. + Wird verwendet, um einen Namen einer Gruppe zugehöriger Typen, Werte und Funktionen zuzuordnen, um ihn logisch von anderem Code zu trennen. + + + + Used to declare a variable, that is, a value that can be changed. + Wird verwendet, um eine Variable zu deklarieren, d. h. einen veränderlichen Wert. + + + + Used to associate a name with a group of related types and modules, to logically separate it from other code. + Wird verwendet, um einen Namen einer Gruppe zugehöriger Typen und Module zuzuordnen, um ihn logisch von anderem Code zu trennen. + + + + Used to declare, define, or invoke a constructor that creates or that can create an object. Also used in generic parameter constraints to indicate that a type must have a certain constructor. + Wird verwendet, um einen Konstruktor zu deklarieren, definieren oder aufzurufen, der ein Objekt erstellt oder erstellen kann. Wird auch in generischen Parameterbeschränkungen verwendet, um anzugeben, dass ein Typ über einen bestimmten Konstruktor verfügen muss. + + + + Not actually a keyword. However, not struct in combination is used as a generic parameter constraint. + Kein tatsächliches Schlüsselwort. "not struct" wird in Kombination als generische Parametereinschränkung verwendet. + + + + Indicates the absence of an object. Also used in generic parameter constraints. + Gibt die Abwesenheit eines Objekts an. Wird auch in generischen Parameterbeschränkungen verwendet. + + + + Used in discriminated unions to indicate the type of categories of values, and in delegate and exception declarations. + Wird in Unterscheidungs-Unions verwenden, um den Typ der Wertekategorien anzugeben, sowie in Delegaten und Ausnahmedeklarationen. + + + + Used to make the contents of a namespace or module available without qualification. + Wird verwendet, um den Inhalt eines Namespace oder Moduls ohne Qualifizierung verfügbar zu machen. + + + + Used with Boolean conditions as a Boolean or operator. Equivalent to ||. Also used in member constraints. + Wird mit booleschen Bedingungen als boolescher Wert oder Operator verwendet. Entspricht ||. Wird auch in Memberbeschränkungen verwendet. + + + + Used to implement a version of an abstract or virtual method that differs from the base version. + Wird verwendet, um eine Version einer abstrakten oder virtuellen Methode zu implementieren, die sich von der Basisversion unterscheidet. + + + + Restricts access to a member to code in the same type or module. + Beschränkt den Zugriff eines Element auf Code im gleichen Typ oder Modul. + + + + Allows access to a member from outside the type. + Lässt von einer Position außerhalb des Typs den Zugriff auf ein Member zu. + + + + Used to indicate that a function is recursive. + Wird verwendet, um anzugeben, dass eine Funktion rekursiv ist. + + + + Used to provide a value for the result of the containing computation expression. + Wird verwendet, um einen Wert anzugeben, der als Ergebnis eines Berechnungsausdrucks auszugeben ist. + + + + Used to provide a value for the result of the containing computation expression, where that value itself comes from the result another computation expression. + Wird verwendet, um einen Berechnungsausdruck anzugeben, der bei der Auswertung das Ergebnis ausgibt, welches den Berechnungsausdruck enthält. + + + + Used in query expressions to specify what fields or columns to extract. Note that this is a contextual keyword, which means that it is not actually a reserved word and it only acts like a keyword in appropriate context. + Wird in Abfrageausdrücken verwendet, um festzulegen, welche Felder oder Spalten extrahiert werden. Dies ist kontextabhängiges Schlüsselwort, d. h. es ist kein reserviertes Wort und funktioniert nur im entsprechenden Kontext als Schlüsselwort. + + + + Used to indicate a method or property that can be called without an instance of a type, or a value member that is shared among all instances of a type. + Wird verwendet, um eine Methode oder Eigenschaft anzugeben, die ohne eine Instanz eines Typs aufgerufen werden kann, oder einen Wertemember, der für alle Instanzen eines Typs freigegeben wird. + + + + Used to declare a structure type. Also used in generic parameter constraints. Used for OCaml compatibility in module definitions. + Wird verwendet, um einen Strukturtyp zu deklarieren. Wird auch in generischen Parameterbeschränkungen verwendet. Wird für die OCaml-Kompatibilität in Moduldefinitionen verwendet. + + + + Used in conditional expressions. Also used to perform side effects after object construction. + Wird in Bedingungsausdrücken verwendet. Wird auch verwendet, um nach der Objektkonstruktion Nebeneffekte auszuführen. + + + + Used in for loops to indicate a range. + Wird in for-Schleifen zum Angeben eines Bereichs verwendet. + + + + Used to introduce a block of code that might generate an exception. Used together with with or finally. + Wird verwendet, um einen Codeblock einzuführen, der unter Umständen eine Ausnahme generiert. Wird zusammen mit "with" oder "finally" verwendet. + + + + Used to declare a class, record, structure, discriminated union, enumeration type, unit of measure, or type abbreviation. + Wird verwendet, um Klassen, Datensätze, Strukturen, Unterscheidungs-Unions, Enumerationstypen, Maßeinheiten oder Typenabkürzungen zu deklarieren. + + + + Used to convert to a type that is higher in the inheritance chain. + Wird zum Konvertieren in einen Typ verwendet, der in Vererbungskette höher ist. + + + + Used instead of let for values that implement IDisposable" + Wird anstelle von "let" für Werte verwendet, bei denen die "Dispose" zum Freigeben von Ressourcen erforderlich ist. + + + + Used instead of let! in computation expressions for computation expression results that implement IDisposable. + Wird anstelle von "let!" in asynchronen Workflows und anderen Berechnungsausdrücken für Werte verwendet, bei denen die "Dispose" zum Freigeben von Ressourcen erforderlich ist. + + + + Used in a signature to indicate a value, or in a type to declare a member, in limited situations. + Wird in einer Signatur verwendet, um einen Wert anzugeben, oder in wenigen Situationen in einem Typ, um einen Member zu deklarieren. + + + + Indicates the .NET void type. Used when interoperating with other .NET languages. + Gibt den .NET-void-Typ an. Wird bei der Interaktion mit anderen .NET-Sprachen verwendet. + + + + Used for Boolean conditions (when guards) on pattern matches and to introduce a constraint clause for a generic type parameter. + Wird für boolesche Bedingungen (when-Klausel) bei Musterabgleichen sowie zum Einführen einer Einschränkungsklausel für einen generischen Typparameterparameter verwendet. + + + + Introduces a looping construct. + Führt ein Schleifenkonstrukt ein. + + + + Used together with the match keyword in pattern matching expressions. Also used in object expressions, record copying expressions, and type extensions to introduce member definitions, and to introduce exception handlers. + Wird zusammen mit dem Vergleichsschlüsselwort in Musterabgleichsausdrücken verwendet. Wird auch in Objektausdrücken, Datensatzkopierausdrücken und Typerweiterungen verwendet, um Memberdefinitionen und Ausnahmehandler bereitzustellen. + + + + Used in a sequence expression to produce a value for a sequence. + Wird in einem Sequenzausdruck zum Generieren eines Werts für eine Sequenz verwendet. + + + + Used in a computation expression to append the result of a given computation expression to a collection of results for the containing computation expression. + Wird in einem Berechnungsausdruck zum Anhängen des Ergebnisses eines bestimmten Berechnungsausdrucks für eine Ergebnissammlung für den enthaltenden Berechnungsausdruck verwendet. + + + + In function types, delimits arguments and return values. Yields an expression (in sequence expressions); equivalent to the yield keyword. Used in match expressions + Begrenzt Argumente und Rückgabewerte in Funktionstypen. Ergibt einen Ausdruck (in Sequenzausdrücken); entspricht dem Yield-Schlüsselwort. Wird in Vergleichsausdrücken verwendet. + + + + Assigns a value to a variable. + Weist einen Wert einer Variablen zu. + + + + Converts a type to type that is higher in the hierarchy. + Konvertiert einen Typ in einen Typen, der in der Hierarchie höher ist. + + + + Converts a type to a type that is lower in the hierarchy. + Konvertiert einen Typ in einen Typen, der in der Hierarchie niedriger ist. + + + + Delimits a typed code quotation. + Begrenzt ein typisiertes Codezitat. + + + + Delimits a untyped code quotation. + Begrenzt ein nicht typisiertes Codezitat. + + + + {0} '{1}' not found in assembly '{2}'. A possible cause may be a version incompatibility. You may need to explicitly reference the correct version of this assembly to allow all referenced components to use the correct version. + {0} "{1}" wurde in Assembly "{2}" nicht gefunden. Mögliche Ursache ist eine Versionsinkompatibilität. Möglicherweise müssen Sie die richtige Version dieser Assembly explizit referenzieren, damit alle referenzierten Komponenten die richtige Version benutzen können. + + + + {0} '{1}' not found in type '{2}' from assembly '{3}'. A possible cause may be a version incompatibility. You may need to explicitly reference the correct version of this assembly to allow all referenced components to use the correct version. + {0} "{1}" wurde in Typ "{2} von Assembly "{3}" nicht gefunden. Mögliche Ursache ist eine Versionsinkompatibilität. Möglicherweise müssen Sie die richtige Version dieser Assembly explizit referenzieren, damit alle referenzierten Komponenten die richtige Version benutzen können. + + + + is + ist + + + + This value is not a function and cannot be applied. + Dieser Wert ist keine Funktion und kann nicht angewendet werden. + + + + This value is not a function and cannot be applied. Did you intend to access the indexer via {0}.[index] instead? + Dieser Wert ist keine Funktion und kann nicht angewendet werden. Wollten Sie auf den Indexer stattdessen über "{0}.[index]" zugreifen? + + + + This expression is not a function and cannot be applied. Did you intend to access the indexer via expr.[index] instead? + Dieser Ausdruck ist keine Funktion und kann nicht angewendet werden. Wollten Sie auf den Indexer stattdessen über "expr.[index]" zugreifen? + + + + This value is not a function and cannot be applied. Did you forget to terminate a declaration? + Dieser Wert ist keine Funktion und kann nicht angewendet werden. Wurde möglicherweise eine Deklaration nicht abgeschlossen? + + + + The argument names in the signature '{0}' and implementation '{1}' do not match. The argument name from the signature file will be used. This may cause problems when debugging or profiling. + Die Argumentnamen in Signatur "{0}" und Implementierung "{1}" stimmen nicht überein. Der Argumentname aus der Signaturdatei wird verwendet. Dadurch können Probleme beim Debuggen oder bei der Profilerstellung auftreten. + + + + An error occurred while reading the F# metadata of assembly '{0}'. A reserved construct was utilized. You may need to upgrade your F# compiler or use an earlier version of the assembly that doesn't make use of a specific construct. + Fehler beim Lesen der F#-Metadaten der Assembly "{0}". Es wurde ein reserviertes Konstrukt verwendet. Möglicherweise müssen Sie Ihren F#-Compiler aktualisieren oder eine frühere Version der Assembly verwenden, die dieses spezielle Konstrukt nicht verwendet. + + + + This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. + Diese Methode oder Eigenschaft wird normalerweise nicht im F#-Code verwendet. Nutzen Sie stattdessen zur Dekonstruktion ein explizites Tupelmuster. + + + + This expression returns a value of type '{0}' but is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to use the expression as a value in the sequence then use an explicit 'yield'. + Dieser Ausdruck gibt einen Wert des Typs "{0}" zurück, wird aber implizit verworfen. Verwenden Sie ggf. "let", um das Ergebnis an einen Namen zu binden. Beispiel: "let Ergebnis = Ausdruck". Falls Sie den Ausdruck als Wert in der Sequenz einsetzen möchten, verwenden Sie explizit "yield". + + + + This expression returns a value of type '{0}' but is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to use the expression as a value in the sequence then use an explicit 'yield!'. + Dieser Ausdruck gibt einen Wert des Typs "{0}" zurück, wird aber implizit verworfen. Verwenden Sie ggf. "let", um das Ergebnis an einen Namen zu binden. Beispiel: "let Ergebnis = Ausdruck". Falls Sie den Ausdruck als Wert in der Sequenz einsetzen möchten, verwenden Sie explizit "yield!". + + + + Used in computation expressions to pattern match directly over the result of another computation expression. + Wird in Berechnungsausdrücken zur Musterübereinstimmung direkt über dem Ergebnis eines anderen Berechnungsausdrucks verwendet. + + + + The file '{0}' changed on disk unexpectedly, please reload. + Die Datei "{0}" wurde auf dem Datenträger unerwartet geändert. Laden Sie sie erneut. + + + + The byref pointer is readonly, so this write is not permitted. + Der byref-Zeiger ist schreibgeschützt, daher ist dieser Schreibvorgang unzulässig. + + + + A value must be mutable in order to mutate the contents or take the address of a value type, e.g. 'let mutable x = ...' + Ein Wert muss änderbar sein, um die Inhalte eines Werttyps zu mutieren oder seine Adresse zu übernehmen, z.B. "let mutable x = ...". + + + + A ReadOnly attribute has been applied to a struct type with a mutable field. + Auf einen Strukturtyp mit einem veränderbaren Feld wurde ein ReadOnly-Attribut angewendet. + + + + A byref pointer returned by a function or method is implicitly dereferenced as of F# 4.5. To acquire the return value as a pointer, use the address-of operator, e.g. '&f(x)' or '&obj.Method(arg1, arg2)'. + Ein von einer Funktion oder Methode zurückgegebener byref-Zeiger wird ab F# 4.5 implizit dereferenziert. Um den Rückgabewert als Zeiger abzurufen, verwenden Sie den Operator "address-of", z. B. "&f(x)" oder "&obj.Method(arg1, arg2)". + + + + A type annotated with IsByRefLike must also be a struct. Consider adding the [<Struct>] attribute to the type. + Ein Typ mit der Anmerkung "IsByRefLike" muss auch eine Struktur sein. Ziehen Sie in Betracht, dem Typ das Attribut "[<Struct>]" hinzuzufügen. + + + + The address of the variable '{0}' or a related expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + Die Adresse der Variablen "{0}" oder ein entsprechender Ausdruck kann zu diesem Zeitpunkt nicht verwendet werden. Hierdurch wird sichergestellt, dass die Adresse des lokalen Werts den zugehörigen Bereich nicht verlässt. + + + + This value can't be assigned because the target '{0}' may refer to non-stack-local memory, while the expression being assigned is assessed to potentially refer to stack-local memory. This is to help prevent pointers to stack-bound memory escaping their scope. + Dieser Wert kann nicht zugewiesen werden, weil das Ziel "{0}" möglicherweise auf einen lokalen Nicht-Stapel-Arbeitsspeicher verweist, während der zugewiesene Ausdruck laut Auswertung möglicherweise auf einen lokalen Stapelarbeitsspeicher verweist. So wird verhindert, dass Zeiger auf stapelgebundenen Arbeitsspeicher ihren Bereich verlassen. + + + + A value defined in a module must be mutable in order to take its address, e.g. 'let mutable x = ...' + Ein in einem Modul definierter Wert muss änderbar sein, um die Adresse anzunehmen, z. B. "let mutable x = ...". + + + + A type annotated with IsReadOnly must also be a struct. Consider adding the [<Struct>] attribute to the type. + Ein Typ mit der Anmerkung "IsReadOnly" muss auch eine Struktur sein. Ziehen Sie in Betracht, dem Typ das Attribut "[<Struct>]" hinzuzufügen. + + + + Struct members cannot return the address of fields of the struct by reference + Strukturmember können die Adresse von Feldern der Struktur nicht per Referenz zurückgeben. + + + + The function or method call cannot be used at this point, because one argument that is a byref of a non-stack-local Span or IsByRefLike type is used with another argument that is a stack-local Span or IsByRefLike type. This is to ensure the address of the local value does not escape its scope. + Der Funktions- oder Methodenaufruf kann zu diesem Zeitpunkt nicht verwendet werden, weil ein Argument, das ein byref-Zeiger eines lokalen Nicht-Stapel-Span- oder -IsByRefLike-Typs ist, mit einem anderen Argument verwendet wird, das ein lokaler Stapel-Span oder -IsByRefLike-Typ ist. Hierdurch wird sichergestellt, dass die Adresse des lokalen Werts den zugehörigen Bereich nicht verlässt. + + + + The address of a value returned from the expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + Die Adresse eines vom Ausdruck zurückgegebenen Werts kann zu diesem Zeitpunkt nicht verwendet werden. Hierdurch wird sichergestellt, dass die Adresse des lokalen Werts den zugehörigen Bereich nicht verlässt. + + + + The Span or IsByRefLike variable '{0}' cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + Die Span- oder IsByRefLike-Variable "{0}" kann zu diesem Zeitpunkt nicht verwendet werden. Hierdurch wird sichergestellt, dass die Adresse des lokalen Werts den zugehörigen Bereich nicht verlässt. + + + + A Span or IsByRefLike value returned from the expression cannot be used at ths point. This is to ensure the address of the local value does not escape its scope. + Ein vom Ausdruck zurückgegebener Span- oder IsByRefLike-Wert kann zu diesem Zeitpunkt nicht verwendet werden. Hierdurch wird sichergestellt, dass die Adresse des lokalen Werts den zugehörigen Bereich nicht verlässt. + + + + Cannot take the address of the value returned from the expression. Assign the returned value to a let-bound value before taking the address. + Die Adresse des über den Ausdruck zurückgegebenen Werts kann nicht abgerufen werden. Weisen Sie den zurückgegebenen Wert einem let-bound-Wert zu, bevor Sie die Adresse abrufen. + + + + The Span or IsByRefLike expression cannot be returned from this function or method, because it is composed using elements that may escape their scope. + The Span or IsByRefLike expression cannot be returned from this function or method, because it is composed using elements that may escape their scope. + + + + This type does not inherit Attribute, it will not work correctly with other .NET languages. + This type does not inherit Attribute, it will not work correctly with other .NET languages. + + + + The exception '{0}' does not have a field named '{1}'. + The exception '{0}' does not have a field named '{1}'. + + + + The constructor does not have a field named '{0}'. + The constructor does not have a field named '{0}'. + + + + Active patterns do not have fields. This syntax is invalid. + Active patterns do not have fields. This syntax is invalid. + + + + + \ No newline at end of file diff --git a/src/fsharp/xlf/FSComp.txt.en.xlf b/src/fsharp/xlf/FSComp.txt.en.xlf new file mode 100644 index 00000000000..69e90b775be --- /dev/null +++ b/src/fsharp/xlf/FSComp.txt.en.xlf @@ -0,0 +1,7087 @@ + + + + + + The namespace '{0}' is not defined. + The namespace '{0}' is not defined. + + + + The namespace or module '{0}' is not defined. + The namespace or module '{0}' is not defined. + + + + The field, constructor or member '{0}' is not defined. + The field, constructor or member '{0}' is not defined. + + + + The value, constructor, namespace or type '{0}' is not defined. + The value, constructor, namespace or type '{0}' is not defined. + + + + The value or constructor '{0}' is not defined. + The value or constructor '{0}' is not defined. + + + + The value, namespace, type or module '{0}' is not defined. + The value, namespace, type or module '{0}' is not defined. + + + + The constructor, module or namespace '{0}' is not defined. + The constructor, module or namespace '{0}' is not defined. + + + + The type '{0}' is not defined. + The type '{0}' is not defined. + + + + The type '{0}' is not defined in '{1}'. + The type '{0}' is not defined in '{1}'. + + + + The record label or namespace '{0}' is not defined. + The record label or namespace '{0}' is not defined. + + + + The record label '{0}' is not defined. + The record label '{0}' is not defined. + + + + Maybe you want one of the following: + Maybe you want one of the following: + + + + The type parameter {0} is not defined. + The type parameter {0} is not defined. + + + + The pattern discriminator '{0}' is not defined. + The pattern discriminator '{0}' is not defined. + + + + Replace with '{0}' + Replace with '{0}' + + + + Add . for indexer access. + Add . for indexer access. + + + + All elements of a list must be of the same type as the first element, which here is '{0}'. This element has type '{1}'. + All elements of a list must be of the same type as the first element, which here is '{0}'. This element has type '{1}'. + + + + All elements of an array must be of the same type as the first element, which here is '{0}'. This element has type '{1}'. + All elements of an array must be of the same type as the first element, which here is '{0}'. This element has type '{1}'. + + + + This 'if' expression is missing an 'else' branch. Because 'if' is an expression, and not a statement, add an 'else' branch which also returns a value of type '{0}'. + This 'if' expression is missing an 'else' branch. Because 'if' is an expression, and not a statement, add an 'else' branch which also returns a value of type '{0}'. + + + + The 'if' expression needs to have type '{0}' to satisfy context type requirements. It currently has type '{1}'. + The 'if' expression needs to have type '{0}' to satisfy context type requirements. It currently has type '{1}'. + + + + All branches of an 'if' expression must return values of the same type as the first branch, which here is '{0}'. This branch returns a value of type '{1}'. + All branches of an 'if' expression must return values of the same type as the first branch, which here is '{0}'. This branch returns a value of type '{1}'. + + + + All branches of a pattern match expression must return values of the same type as the first branch, which here is '{0}'. This branch returns a value of type '{1}'. + All branches of a pattern match expression must return values of the same type as the first branch, which here is '{0}'. This branch returns a value of type '{1}'. + + + + A pattern match guard must be of type 'bool', but this 'when' expression is of type '{0}'. + A pattern match guard must be of type 'bool', but this 'when' expression is of type '{0}'. + + + + A ';' is used to separate field values in records. Consider replacing ',' with ';'. + A ';' is used to separate field values in records. Consider replacing ',' with ';'. + + + + The '!' operator is used to dereference a ref cell. Consider using 'not expr' here. + The '!' operator is used to dereference a ref cell. Consider using 'not expr' here. + + + + The non-generic type '{0}' does not expect any type arguments, but here is given {1} type argument(s) + The non-generic type '{0}' does not expect any type arguments, but here is given {1} type argument(s) + + + + Consider using 'return!' instead of 'return'. + Consider using 'return!' instead of 'return'. + + + + Consider using 'yield!' instead of 'yield'. + Consider using 'yield!' instead of 'yield'. + + + + \nA tuple type is required for one or more arguments. Consider wrapping the given arguments in additional parentheses or review the definition of the interface. + \nA tuple type is required for one or more arguments. Consider wrapping the given arguments in additional parentheses or review the definition of the interface. + + + + Invalid warning number '{0}' + Invalid warning number '{0}' + + + + Invalid version string '{0}' + Invalid version string '{0}' + + + + Invalid version file '{0}' + Invalid version file '{0}' + + + + Microsoft (R) F# Compiler version {0} + Microsoft (R) F# Compiler version {0} + + + + F# Compiler for F# {0} + F# Compiler for F# {0} + + + + Problem with filename '{0}': {1} + Problem with filename '{0}': {1} + + + + No inputs specified + No inputs specified + + + + The '--pdb' option requires the '--debug' option to be used + The '--pdb' option requires the '--debug' option to be used + + + + The search directory '{0}' is invalid + The search directory '{0}' is invalid + + + + The search directory '{0}' could not be found + The search directory '{0}' could not be found + + + + '{0}' is not a valid filename + '{0}' is not a valid filename + + + + '{0}' is not a valid assembly name + '{0}' is not a valid assembly name + + + + Unrecognized privacy setting '{0}' for managed resource, valid options are 'public' and 'private' + Unrecognized privacy setting '{0}' for managed resource, valid options are 'public' and 'private' + + + + Multiple references to '{0}.dll' are not permitted + Multiple references to '{0}.dll' are not permitted + + + + Could not read version from mscorlib.dll + Could not read version from mscorlib.dll + + + + Unable to read assembly '{0}' + Unable to read assembly '{0}' + + + + Assembly resolution failure at or near this location + Assembly resolution failure at or near this location + + + + The declarations in this file will be placed in an implicit module '{0}' based on the file name '{1}'. However this is not a valid F# identifier, so the contents will not be accessible from other files. Consider renaming the file or adding a 'module' or 'namespace' declaration at the top of the file. + The declarations in this file will be placed in an implicit module '{0}' based on the file name '{1}'. However this is not a valid F# identifier, so the contents will not be accessible from other files. Consider renaming the file or adding a 'module' or 'namespace' declaration at the top of the file. + + + + Files in libraries or multiple-file applications must begin with a namespace or module declaration, e.g. 'namespace SomeNamespace.SubNamespace' or 'module SomeNamespace.SomeModule'. Only the last source file of an application may omit such a declaration. + Files in libraries or multiple-file applications must begin with a namespace or module declaration, e.g. 'namespace SomeNamespace.SubNamespace' or 'module SomeNamespace.SomeModule'. Only the last source file of an application may omit such a declaration. + + + + Files in libraries or multiple-file applications must begin with a namespace or module declaration. When using a module declaration at the start of a file the '=' sign is not allowed. If this is a top-level module, consider removing the = to resolve this error. + Files in libraries or multiple-file applications must begin with a namespace or module declaration. When using a module declaration at the start of a file the '=' sign is not allowed. If this is a top-level module, consider removing the = to resolve this error. + + + + This file contains multiple declarations of the form 'module SomeNamespace.SomeModule'. Only one declaration of this form is permitted in a file. Change your file to use an initial namespace declaration and/or use 'module ModuleName = ...' to define your modules. + This file contains multiple declarations of the form 'module SomeNamespace.SomeModule'. Only one declaration of this form is permitted in a file. Change your file to use an initial namespace declaration and/or use 'module ModuleName = ...' to define your modules. + + + + Option requires parameter: {0} + Option requires parameter: {0} + + + + Source file '{0}' could not be found + Source file '{0}' could not be found + + + + The file extension of '{0}' is not recognized. Source files must have extension .fs, .fsi, .fsx, .fsscript, .ml or .mli. + The file extension of '{0}' is not recognized. Source files must have extension .fs, .fsi, .fsx, .fsscript, .ml or .mli. + + + + Could not resolve assembly '{0}' + Could not resolve assembly '{0}' + + + + Could not resolve assembly '{0}' required by '{1}' + Could not resolve assembly '{0}' required by '{1}' + + + + Error opening binary file '{0}': {1} + Error opening binary file '{0}': {1} + + + + The F#-compiled DLL '{0}' needs to be recompiled to be used with this version of F# + The F#-compiled DLL '{0}' needs to be recompiled to be used with this version of F# + + + + Invalid directive. Expected '#I \"<path>\"'. + Invalid directive. Expected '#I \"<path>\"'. + + + + Invalid directive. Expected '#r \"<file-or-assembly>\"'. + Invalid directive. Expected '#r \"<file-or-assembly>\"'. + + + + Invalid directive. Expected '#load \"<file>\" ... \"<file>\"'. + Invalid directive. Expected '#load \"<file>\" ... \"<file>\"'. + + + + Invalid directive. Expected '#time', '#time \"on\"' or '#time \"off\"'. + Invalid directive. Expected '#time', '#time \"on\"' or '#time \"off\"'. + + + + Directives inside modules are ignored + Directives inside modules are ignored + + + + A signature for the file or module '{0}' has already been specified + A signature for the file or module '{0}' has already been specified + + + + An implementation of file or module '{0}' has already been given. Compilation order is significant in F# because of type inference. You may need to adjust the order of your files to place the signature file before the implementation. In Visual Studio files are type-checked in the order they appear in the project file, which can be edited manually or adjusted using the solution explorer. + An implementation of file or module '{0}' has already been given. Compilation order is significant in F# because of type inference. You may need to adjust the order of your files to place the signature file before the implementation. In Visual Studio files are type-checked in the order they appear in the project file, which can be edited manually or adjusted using the solution explorer. + + + + An implementation of the file or module '{0}' has already been given + An implementation of the file or module '{0}' has already been given + + + + The signature file '{0}' does not have a corresponding implementation file. If an implementation file exists then check the 'module' and 'namespace' declarations in the signature and implementation files match. + The signature file '{0}' does not have a corresponding implementation file. If an implementation file exists then check the 'module' and 'namespace' declarations in the signature and implementation files match. + + + + '{0}' is not a valid integer argument + '{0}' is not a valid integer argument + + + + '{0}' is not a valid floating point argument + '{0}' is not a valid floating point argument + + + + Unrecognized option: '{0}' + Unrecognized option: '{0}' + + + + Invalid module or namespace name + Invalid module or namespace name + + + + Error reading/writing metadata for the F# compiled DLL '{0}'. Was the DLL compiled with an earlier version of the F# compiler? (error: '{1}'). + Error reading/writing metadata for the F# compiled DLL '{0}'. Was the DLL compiled with an earlier version of the F# compiler? (error: '{1}'). + + + + The type/module '{0}' is not a concrete module or type + The type/module '{0}' is not a concrete module or type + + + + The type '{0}' has an inline assembly code representation + The type '{0}' has an inline assembly code representation + + + + A namespace and a module named '{0}' both occur in two parts of this assembly + A namespace and a module named '{0}' both occur in two parts of this assembly + + + + Two modules named '{0}' occur in two parts of this assembly + Two modules named '{0}' occur in two parts of this assembly + + + + Two type definitions named '{0}' occur in namespace '{1}' in two parts of this assembly + Two type definitions named '{0}' occur in namespace '{1}' in two parts of this assembly + + + + A module and a type definition named '{0}' occur in namespace '{1}' in two parts of this assembly + A module and a type definition named '{0}' occur in namespace '{1}' in two parts of this assembly + + + + Invalid member signature encountered because of an earlier error + Invalid member signature encountered because of an earlier error + + + + This value does not have a valid property setter type + This value does not have a valid property setter type + + + + Invalid form for a property getter. At least one '()' argument is required when using the explicit syntax. + Invalid form for a property getter. At least one '()' argument is required when using the explicit syntax. + + + + Invalid form for a property setter. At least one argument is required. + Invalid form for a property setter. At least one argument is required. + + + + Unexpected use of a byref-typed variable + Unexpected use of a byref-typed variable + + + + Invalid mutation of a constant expression. Consider copying the expression to a mutable local, e.g. 'let mutable x = ...'. + Invalid mutation of a constant expression. Consider copying the expression to a mutable local, e.g. 'let mutable x = ...'. + + + + The value has been copied to ensure the original is not mutated by this operation or because the copy is implicit when returning a struct from a member and another member is then accessed + The value has been copied to ensure the original is not mutated by this operation or because the copy is implicit when returning a struct from a member and another member is then accessed + + + + Recursively defined values cannot appear directly as part of the construction of a tuple value within a recursive binding + Recursively defined values cannot appear directly as part of the construction of a tuple value within a recursive binding + + + + Recursive values cannot appear directly as a construction of the type '{0}' within a recursive binding. This feature has been removed from the F# language. Consider using a record instead. + Recursive values cannot appear directly as a construction of the type '{0}' within a recursive binding. This feature has been removed from the F# language. Consider using a record instead. + + + + Recursive values cannot be directly assigned to the non-mutable field '{0}' of the type '{1}' within a recursive binding. Consider using a mutable field instead. + Recursive values cannot be directly assigned to the non-mutable field '{0}' of the type '{1}' within a recursive binding. Consider using a mutable field instead. + + + + Unexpected decode of AutoOpenAttribute + Unexpected decode of AutoOpenAttribute + + + + Unexpected decode of InternalsVisibleToAttribute + Unexpected decode of InternalsVisibleToAttribute + + + + Unexpected decode of InterfaceDataVersionAttribute + Unexpected decode of InterfaceDataVersionAttribute + + + + Active patterns cannot return more than 7 possibilities + Active patterns cannot return more than 7 possibilities + + + + This is not a valid constant expression or custom attribute value + This is not a valid constant expression or custom attribute value + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe mutability attributes differ + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe mutability attributes differ + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe names differ + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe names differ + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe compiled names differ + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe compiled names differ + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe display names differ + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe display names differ + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe accessibility specified in the signature is more than that specified in the implementation + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe accessibility specified in the signature is more than that specified in the implementation + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe inline flags differ + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe inline flags differ + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe literal constant values and/or attributes differ + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe literal constant values and/or attributes differ + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is a type function and the other is not. The signature requires explicit type parameters if they are present in the implementation. + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is a type function and the other is not. The signature requires explicit type parameters if they are present in the implementation. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe respective type parameter counts differ + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe respective type parameter counts differ + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe types differ + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe types differ + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is an extension member and the other is not + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is an extension member and the other is not + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nAn arity was not inferred for this value + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nAn arity was not inferred for this value + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe number of generic parameters in the signature and implementation differ (the signature declares {3} but the implementation declares {4} + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe number of generic parameters in the signature and implementation differ (the signature declares {3} but the implementation declares {4} + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe generic parameters in the signature and implementation have different kinds. Perhaps there is a missing [<Measure>] attribute. + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe generic parameters in the signature and implementation have different kinds. Perhaps there is a missing [<Measure>] attribute. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe arities in the signature and implementation differ. The signature specifies that '{3}' is function definition or lambda expression accepting at least {4} argument(s), but the implementation is a computed function value. To declare that a computed function value is a permitted implementation simply parenthesize its type in the signature, e.g.\n\tval {5}: int -> (int -> int)\ninstead of\n\tval {6}: int -> int -> int. + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe arities in the signature and implementation differ. The signature specifies that '{3}' is function definition or lambda expression accepting at least {4} argument(s), but the implementation is a computed function value. To declare that a computed function value is a permitted implementation simply parenthesize its type in the signature, e.g.\n\tval {5}: int -> (int -> int)\ninstead of\n\tval {6}: int -> int -> int. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe CLI member names differ + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe CLI member names differ + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is static and the other isn't + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is static and the other isn't + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is virtual and the other isn't + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is virtual and the other isn't + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is abstract and the other isn't + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is abstract and the other isn't + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is final and the other isn't + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is final and the other isn't + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is marked as an override and the other isn't + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is marked as an override and the other isn't + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is a constructor/property and the other is not + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is a constructor/property and the other is not + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe compiled representation of this method is as a static member but the signature indicates its compiled representation is as an instance member + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe compiled representation of this method is as a static member but the signature indicates its compiled representation is as an instance member + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe compiled representation of this method is as an instance member, but the signature indicates its compiled representation is as a static member + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe compiled representation of this method is as an instance member, but the signature indicates its compiled representation is as a static member + + + + The {0} definitions in the signature and implementation are not compatible because the names differ. The type is called '{1}' in the signature file but '{2}' in implementation. + The {0} definitions in the signature and implementation are not compatible because the names differ. The type is called '{1}' in the signature file but '{2}' in implementation. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the respective type parameter counts differ + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the respective type parameter counts differ + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the accessibility specified in the signature is more than that specified in the implementation + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the accessibility specified in the signature is more than that specified in the implementation + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature requires that the type supports the interface {2} but the interface has not been implemented + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature requires that the type supports the interface {2} but the interface has not been implemented + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation says this type may use nulls as a representation but the signature does not + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation says this type may use nulls as a representation but the signature does not + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation says this type may use nulls as an extra value but the signature does not + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation says this type may use nulls as an extra value but the signature does not + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature says this type may use nulls as a representation but the implementation does not + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature says this type may use nulls as a representation but the implementation does not + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature says this type may use nulls as an extra value but the implementation does not + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature says this type may use nulls as an extra value but the implementation does not + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation type is sealed but the signature implies it is not. Consider adding the [<Sealed>] attribute to the signature. + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation type is sealed but the signature implies it is not. Consider adding the [<Sealed>] attribute to the signature. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation type is not sealed but signature implies it is. Consider adding the [<Sealed>] attribute to the implementation. + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation type is not sealed but signature implies it is. Consider adding the [<Sealed>] attribute to the implementation. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation is an abstract class but the signature is not. Consider adding the [<AbstractClass>] attribute to the signature. + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation is an abstract class but the signature is not. Consider adding the [<AbstractClass>] attribute to the signature. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature is an abstract class but the implementation is not. Consider adding the [<AbstractClass>] attribute to the implementation. + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature is an abstract class but the implementation is not. Consider adding the [<AbstractClass>] attribute to the implementation. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the types have different base types + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the types have different base types + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the number of {2}s differ + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the number of {2}s differ + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature defines the {2} '{3}' but the implementation does not (or does, but not in the same order) + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature defines the {2} '{3}' but the implementation does not (or does, but not in the same order) + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation defines the {2} '{3}' but the signature does not (or does, but not in the same order) + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation defines the {2} '{3}' but the signature does not (or does, but not in the same order) + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation defines a struct but the signature defines a type with a hidden representation + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation defines a struct but the signature defines a type with a hidden representation + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because a CLI type representation is being hidden by a signature + The {0} definitions for type '{1}' in the signature and implementation are not compatible because a CLI type representation is being hidden by a signature + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because a type representation is being hidden by a signature + The {0} definitions for type '{1}' in the signature and implementation are not compatible because a type representation is being hidden by a signature + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the types are of different kinds + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the types are of different kinds + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the IL representations differ + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the IL representations differ + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the representations differ + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the representations differ + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the field {2} was present in the implementation but not in the signature + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the field {2} was present in the implementation but not in the signature + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the order of the fields is different in the signature and implementation + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the order of the fields is different in the signature and implementation + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the field {2} was required by the signature but was not specified by the implementation + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the field {2} was required by the signature but was not specified by the implementation + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the field '{2}' was present in the implementation but not in the signature. Struct types must now reveal their fields in the signature for the type, though the fields may still be labelled 'private' or 'internal'. + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the field '{2}' was present in the implementation but not in the signature. Struct types must now reveal their fields in the signature for the type, though the fields may still be labelled 'private' or 'internal'. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the abstract member '{2}' was required by the signature but was not specified by the implementation + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the abstract member '{2}' was required by the signature but was not specified by the implementation + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the abstract member '{2}' was present in the implementation but not in the signature + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the abstract member '{2}' was present in the implementation but not in the signature + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature declares a {2} while the implementation declares a {3} + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature declares a {2} while the implementation declares a {3} + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the abbreviations differ: {2} versus {3} + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the abbreviations differ: {2} versus {3} + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because an abbreviation is being hidden by a signature. The abbreviation must be visible to other CLI languages. Consider making the abbreviation visible in the signature. + The {0} definitions for type '{1}' in the signature and implementation are not compatible because an abbreviation is being hidden by a signature. The abbreviation must be visible to other CLI languages. Consider making the abbreviation visible in the signature. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature has an abbreviation while the implementation does not + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature has an abbreviation while the implementation does not + + + + The module contains the constructor\n {0} \nbut its signature specifies\n {1} \nThe names differ + The module contains the constructor\n {0} \nbut its signature specifies\n {1} \nThe names differ + + + + The module contains the constructor\n {0} \nbut its signature specifies\n {1} \nThe respective number of data fields differ + The module contains the constructor\n {0} \nbut its signature specifies\n {1} \nThe respective number of data fields differ + + + + The module contains the constructor\n {0} \nbut its signature specifies\n {1} \nThe types of the fields differ + The module contains the constructor\n {0} \nbut its signature specifies\n {1} \nThe types of the fields differ + + + + The module contains the constructor\n {0} \nbut its signature specifies\n {1} \nthe accessibility specified in the signature is more than that specified in the implementation + The module contains the constructor\n {0} \nbut its signature specifies\n {1} \nthe accessibility specified in the signature is more than that specified in the implementation + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe names differ + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe names differ + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nthe accessibility specified in the signature is more than that specified in the implementation + The module contains the field\n {0} \nbut its signature specifies\n {1} \nthe accessibility specified in the signature is more than that specified in the implementation + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe 'static' modifiers differ + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe 'static' modifiers differ + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe 'mutable' modifiers differ + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe 'mutable' modifiers differ + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe 'literal' modifiers differ + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe 'literal' modifiers differ + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe types differ + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe types differ + + + + The implicit instantiation of a generic construct at or near this point could not be resolved because it could resolve to multiple unrelated types, e.g. '{0}' and '{1}'. Consider using type annotations to resolve the ambiguity + The implicit instantiation of a generic construct at or near this point could not be resolved because it could resolve to multiple unrelated types, e.g. '{0}' and '{1}'. Consider using type annotations to resolve the ambiguity + + + + Could not resolve the ambiguity inherent in the use of a 'printf'-style format string + Could not resolve the ambiguity inherent in the use of a 'printf'-style format string + + + + Could not resolve the ambiguity in the use of a generic construct with an 'enum' constraint at or near this position + Could not resolve the ambiguity in the use of a generic construct with an 'enum' constraint at or near this position + + + + Could not resolve the ambiguity in the use of a generic construct with a 'delegate' constraint at or near this position + Could not resolve the ambiguity in the use of a generic construct with a 'delegate' constraint at or near this position + + + + Invalid value + Invalid value + + + + The signature and implementation are not compatible because the respective type parameter counts differ + The signature and implementation are not compatible because the respective type parameter counts differ + + + + The signature and implementation are not compatible because the type parameter in the class/signature has a different compile-time requirement to the one in the member/implementation + The signature and implementation are not compatible because the type parameter in the class/signature has a different compile-time requirement to the one in the member/implementation + + + + The signature and implementation are not compatible because the declaration of the type parameter '{0}' requires a constraint of the form {1} + The signature and implementation are not compatible because the declaration of the type parameter '{0}' requires a constraint of the form {1} + + + + The signature and implementation are not compatible because the type parameter '{0}' has a constraint of the form {1} but the implementation does not. Either remove this constraint from the signature or add it to the implementation. + The signature and implementation are not compatible because the type parameter '{0}' has a constraint of the form {1} but the implementation does not. Either remove this constraint from the signature or add it to the implementation. + + + + The type '{0}' implements 'System.IComparable'. Consider also adding an explicit override for 'Object.Equals' + The type '{0}' implements 'System.IComparable'. Consider also adding an explicit override for 'Object.Equals' + + + + The type '{0}' implements 'System.IComparable' explicitly but provides no corresponding override for 'Object.Equals'. An implementation of 'Object.Equals' has been automatically provided, implemented via 'System.IComparable'. Consider implementing the override 'Object.Equals' explicitly + The type '{0}' implements 'System.IComparable' explicitly but provides no corresponding override for 'Object.Equals'. An implementation of 'Object.Equals' has been automatically provided, implemented via 'System.IComparable'. Consider implementing the override 'Object.Equals' explicitly + + + + The struct, record or union type '{0}' has an explicit implementation of 'Object.GetHashCode' or 'Object.Equals'. You must apply the 'CustomEquality' attribute to the type + The struct, record or union type '{0}' has an explicit implementation of 'Object.GetHashCode' or 'Object.Equals'. You must apply the 'CustomEquality' attribute to the type + + + + The struct, record or union type '{0}' has an explicit implementation of 'Object.GetHashCode'. Consider implementing a matching override for 'Object.Equals(obj)' + The struct, record or union type '{0}' has an explicit implementation of 'Object.GetHashCode'. Consider implementing a matching override for 'Object.Equals(obj)' + + + + The struct, record or union type '{0}' has an explicit implementation of 'Object.Equals'. Consider implementing a matching override for 'Object.GetHashCode()' + The struct, record or union type '{0}' has an explicit implementation of 'Object.Equals'. Consider implementing a matching override for 'Object.GetHashCode()' + + + + The exception definitions are not compatible because a CLI exception mapping is being hidden by a signature. The exception mapping must be visible to other modules. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1} + The exception definitions are not compatible because a CLI exception mapping is being hidden by a signature. The exception mapping must be visible to other modules. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1} + + + + The exception definitions are not compatible because the CLI representations differ. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1} + The exception definitions are not compatible because the CLI representations differ. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1} + + + + The exception definitions are not compatible because the exception abbreviation is being hidden by the signature. The abbreviation must be visible to other CLI languages. Consider making the abbreviation visible in the signature. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1}. + The exception definitions are not compatible because the exception abbreviation is being hidden by the signature. The abbreviation must be visible to other CLI languages. Consider making the abbreviation visible in the signature. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1}. + + + + The exception definitions are not compatible because the exception abbreviations in the signature and implementation differ. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1}. + The exception definitions are not compatible because the exception abbreviations in the signature and implementation differ. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1}. + + + + The exception definitions are not compatible because the exception declarations differ. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1}. + The exception definitions are not compatible because the exception declarations differ. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1}. + + + + The exception definitions are not compatible because the field '{0}' was required by the signature but was not specified by the implementation. The module contains the exception definition\n {1} \nbut its signature specifies\n\t{2}. + The exception definitions are not compatible because the field '{0}' was required by the signature but was not specified by the implementation. The module contains the exception definition\n {1} \nbut its signature specifies\n\t{2}. + + + + The exception definitions are not compatible because the field '{0}' was present in the implementation but not in the signature. The module contains the exception definition\n {1} \nbut its signature specifies\n\t{2}. + The exception definitions are not compatible because the field '{0}' was present in the implementation but not in the signature. The module contains the exception definition\n {1} \nbut its signature specifies\n\t{2}. + + + + The exception definitions are not compatible because the order of the fields is different in the signature and implementation. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1}. + The exception definitions are not compatible because the order of the fields is different in the signature and implementation. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1}. + + + + The namespace or module attributes differ between signature and implementation + The namespace or module attributes differ between signature and implementation + + + + This method is over-constrained in its type parameters + This method is over-constrained in its type parameters + + + + No implementations of '{0}' had the correct number of arguments and type parameters. The required signature is '{1}'. + No implementations of '{0}' had the correct number of arguments and type parameters. The required signature is '{1}'. + + + + The override for '{0}' was ambiguous + The override for '{0}' was ambiguous + + + + More than one override implements '{0}' + More than one override implements '{0}' + + + + The method '{0}' is sealed and cannot be overridden + The method '{0}' is sealed and cannot be overridden + + + + The override '{0}' implements more than one abstract slot, e.g. '{1}' and '{2}' + The override '{0}' implements more than one abstract slot, e.g. '{1}' and '{2}' + + + + Duplicate or redundant interface + Duplicate or redundant interface + + + + The interface '{0}' is included in multiple explicitly implemented interface types. Add an explicit implementation of this interface. + The interface '{0}' is included in multiple explicitly implemented interface types. Add an explicit implementation of this interface. + + + + A named argument has been assigned more than one value + A named argument has been assigned more than one value + + + + No implementation was given for '{0}' + No implementation was given for '{0}' + + + + No implementation was given for '{0}'. Note that all interface members must be implemented and listed under an appropriate 'interface' declaration, e.g. 'interface ... with member ...'. + No implementation was given for '{0}'. Note that all interface members must be implemented and listed under an appropriate 'interface' declaration, e.g. 'interface ... with member ...'. + + + + The member '{0}' does not have the correct number of arguments. The required signature is '{1}'. + The member '{0}' does not have the correct number of arguments. The required signature is '{1}'. + + + + The member '{0}' does not have the correct number of method type parameters. The required signature is '{1}'. + The member '{0}' does not have the correct number of method type parameters. The required signature is '{1}'. + + + + The member '{0}' does not have the correct kinds of generic parameters. The required signature is '{1}'. + The member '{0}' does not have the correct kinds of generic parameters. The required signature is '{1}'. + + + + The member '{0}' cannot be used to implement '{1}'. The required signature is '{2}'. + The member '{0}' cannot be used to implement '{1}'. The required signature is '{2}'. + + + + Error while parsing embedded IL + Error while parsing embedded IL + + + + Error while parsing embedded IL type + Error while parsing embedded IL type + + + + This indexer notation has been removed from the F# language + This indexer notation has been removed from the F# language + + + + Invalid expression on left of assignment + Invalid expression on left of assignment + + + + The 'ReferenceEquality' attribute cannot be used on structs. Consider using the 'StructuralEquality' attribute instead, or implement an override for 'System.Object.Equals(obj)'. + The 'ReferenceEquality' attribute cannot be used on structs. Consider using the 'StructuralEquality' attribute instead, or implement an override for 'System.Object.Equals(obj)'. + + + + This type uses an invalid mix of the attributes 'NoEquality', 'ReferenceEquality', 'StructuralEquality', 'NoComparison' and 'StructuralComparison' + This type uses an invalid mix of the attributes 'NoEquality', 'ReferenceEquality', 'StructuralEquality', 'NoComparison' and 'StructuralComparison' + + + + The 'NoEquality' attribute must be used in conjunction with the 'NoComparison' attribute + The 'NoEquality' attribute must be used in conjunction with the 'NoComparison' attribute + + + + The 'StructuralComparison' attribute must be used in conjunction with the 'StructuralEquality' attribute + The 'StructuralComparison' attribute must be used in conjunction with the 'StructuralEquality' attribute + + + + The 'StructuralEquality' attribute must be used in conjunction with the 'NoComparison' or 'StructuralComparison' attributes + The 'StructuralEquality' attribute must be used in conjunction with the 'NoComparison' or 'StructuralComparison' attributes + + + + A type cannot have both the 'ReferenceEquality' and 'StructuralEquality' or 'StructuralComparison' attributes + A type cannot have both the 'ReferenceEquality' and 'StructuralEquality' or 'StructuralComparison' attributes + + + + Only record, union, exception and struct types may be augmented with the 'ReferenceEquality', 'StructuralEquality' and 'StructuralComparison' attributes + Only record, union, exception and struct types may be augmented with the 'ReferenceEquality', 'StructuralEquality' and 'StructuralComparison' attributes + + + + A type with attribute 'ReferenceEquality' cannot have an explicit implementation of 'Object.Equals(obj)', 'System.IEquatable<_>' or 'System.Collections.IStructuralEquatable' + A type with attribute 'ReferenceEquality' cannot have an explicit implementation of 'Object.Equals(obj)', 'System.IEquatable<_>' or 'System.Collections.IStructuralEquatable' + + + + A type with attribute 'CustomEquality' must have an explicit implementation of at least one of 'Object.Equals(obj)', 'System.IEquatable<_>' or 'System.Collections.IStructuralEquatable' + A type with attribute 'CustomEquality' must have an explicit implementation of at least one of 'Object.Equals(obj)', 'System.IEquatable<_>' or 'System.Collections.IStructuralEquatable' + + + + A type with attribute 'CustomComparison' must have an explicit implementation of at least one of 'System.IComparable' or 'System.Collections.IStructuralComparable' + A type with attribute 'CustomComparison' must have an explicit implementation of at least one of 'System.IComparable' or 'System.Collections.IStructuralComparable' + + + + A type with attribute 'NoEquality' should not usually have an explicit implementation of 'Object.Equals(obj)'. Disable this warning if this is intentional for interoperability purposes + A type with attribute 'NoEquality' should not usually have an explicit implementation of 'Object.Equals(obj)'. Disable this warning if this is intentional for interoperability purposes + + + + A type with attribute 'NoComparison' should not usually have an explicit implementation of 'System.IComparable', 'System.IComparable<_>' or 'System.Collections.IStructuralComparable'. Disable this warning if this is intentional for interoperability purposes + A type with attribute 'NoComparison' should not usually have an explicit implementation of 'System.IComparable', 'System.IComparable<_>' or 'System.Collections.IStructuralComparable'. Disable this warning if this is intentional for interoperability purposes + + + + The 'CustomEquality' attribute must be used in conjunction with the 'NoComparison' or 'CustomComparison' attributes + The 'CustomEquality' attribute must be used in conjunction with the 'NoComparison' or 'CustomComparison' attributes + + + + Positional specifiers are not permitted in format strings + Positional specifiers are not permitted in format strings + + + + Missing format specifier + Missing format specifier + + + + '{0}' flag set twice + '{0}' flag set twice + + + + Prefix flag (' ' or '+') set twice + Prefix flag (' ' or '+') set twice + + + + The # formatting modifier is invalid in F# + The # formatting modifier is invalid in F# + + + + Bad precision in format specifier + Bad precision in format specifier + + + + Bad width in format specifier + Bad width in format specifier + + + + '{0}' format does not support '0' flag + '{0}' format does not support '0' flag + + + + Precision missing after the '.' + Precision missing after the '.' + + + + '{0}' format does not support precision + '{0}' format does not support precision + + + + Bad format specifier (after l or L): Expected ld,li,lo,lu,lx or lX. In F# code you can use %d, %x, %o or %u instead, which are overloaded to work with all basic integer types. + Bad format specifier (after l or L): Expected ld,li,lo,lu,lx or lX. In F# code you can use %d, %x, %o or %u instead, which are overloaded to work with all basic integer types. + + + + The 'l' or 'L' in this format specifier is unnecessary. In F# code you can use %d, %x, %o or %u instead, which are overloaded to work with all basic integer types. + The 'l' or 'L' in this format specifier is unnecessary. In F# code you can use %d, %x, %o or %u instead, which are overloaded to work with all basic integer types. + + + + The 'h' or 'H' in this format specifier is unnecessary. You can use %d, %x, %o or %u instead, which are overloaded to work with all basic integer types. + The 'h' or 'H' in this format specifier is unnecessary. You can use %d, %x, %o or %u instead, which are overloaded to work with all basic integer types. + + + + '{0}' does not support prefix '{1}' flag + '{0}' does not support prefix '{1}' flag + + + + Bad format specifier: '{0}' + Bad format specifier: '{0}' + + + + System.Environment.Exit did not exit + System.Environment.Exit did not exit + + + + The treatment of this operator is now handled directly by the F# compiler and its meaning cannot be redefined + The treatment of this operator is now handled directly by the F# compiler and its meaning cannot be redefined + + + + A protected member is called or 'base' is being used. This is only allowed in the direct implementation of members since they could escape their object scope. + A protected member is called or 'base' is being used. This is only allowed in the direct implementation of members since they could escape their object scope. + + + + The byref-typed variable '{0}' is used in an invalid way. Byrefs cannot be captured by closures or passed to inner functions. + The byref-typed variable '{0}' is used in an invalid way. Byrefs cannot be captured by closures or passed to inner functions. + + + + The 'base' keyword is used in an invalid way. Base calls cannot be used in closures. Consider using a private member to make base calls. + The 'base' keyword is used in an invalid way. Base calls cannot be used in closures. Consider using a private member to make base calls. + + + + The variable '{0}' is used in an invalid way + The variable '{0}' is used in an invalid way + + + + The type '{0}' is less accessible than the value, member or type '{1}' it is used in. + The type '{0}' is less accessible than the value, member or type '{1}' it is used in. + + + + 'System.Void' can only be used as 'typeof<System.Void>' in F# + 'System.Void' can only be used as 'typeof<System.Void>' in F# + + + + A type instantiation involves a byref type. This is not permitted by the rules of Common IL. + A type instantiation involves a byref type. This is not permitted by the rules of Common IL. + + + + Calls to 'reraise' may only occur directly in a handler of a try-with + Calls to 'reraise' may only occur directly in a handler of a try-with + + + + Expression-splicing operators may only be used within quotations + Expression-splicing operators may only be used within quotations + + + + First-class uses of the expression-splicing operator are not permitted + First-class uses of the expression-splicing operator are not permitted + + + + First-class uses of the address-of operators are not permitted + First-class uses of the address-of operators are not permitted + + + + First-class uses of the 'reraise' function is not permitted + First-class uses of the 'reraise' function is not permitted + + + + The byref typed value '{0}' cannot be used at this point + The byref typed value '{0}' cannot be used at this point + + + + 'base' values may only be used to make direct calls to the base implementations of overridden members + 'base' values may only be used to make direct calls to the base implementations of overridden members + + + + Object constructors cannot directly use try/with and try/finally prior to the initialization of the object. This includes constructs such as 'for x in ...' that may elaborate to uses of these constructs. This is a limitation imposed by Common IL. + Object constructors cannot directly use try/with and try/finally prior to the initialization of the object. This includes constructs such as 'for x in ...' that may elaborate to uses of these constructs. This is a limitation imposed by Common IL. + + + + The address of the variable '{0}' cannot be used at this point + The address of the variable '{0}' cannot be used at this point + + + + The address of the static field '{0}' cannot be used at this point + The address of the static field '{0}' cannot be used at this point + + + + The address of the field '{0}' cannot be used at this point + The address of the field '{0}' cannot be used at this point + + + + The address of an array element cannot be used at this point + The address of an array element cannot be used at this point + + + + The type of a first-class function cannot contain byrefs + The type of a first-class function cannot contain byrefs + + + + A method return type would contain byrefs which is not permitted + A method return type would contain byrefs which is not permitted + + + + Invalid custom attribute value (not a constant or literal) + Invalid custom attribute value (not a constant or literal) + + + + The attribute type '{0}' has 'AllowMultiple=false'. Multiple instances of this attribute cannot be attached to a single language element. + The attribute type '{0}' has 'AllowMultiple=false'. Multiple instances of this attribute cannot be attached to a single language element. + + + + The member '{0}' is used in an invalid way. A use of '{1}' has been inferred prior to its definition at or near '{2}'. This is an invalid forward reference. + The member '{0}' is used in an invalid way. A use of '{1}' has been inferred prior to its definition at or near '{2}'. This is an invalid forward reference. + + + + A byref typed value would be stored here. Top-level let-bound byref values are not permitted. + A byref typed value would be stored here. Top-level let-bound byref values are not permitted. + + + + [<ReflectedDefinition>] terms cannot contain uses of the prefix splice operator '%' + [<ReflectedDefinition>] terms cannot contain uses of the prefix splice operator '%' + + + + A function labeled with the 'EntryPointAttribute' attribute must be the last declaration in the last file in the compilation sequence. + A function labeled with the 'EntryPointAttribute' attribute must be the last declaration in the last file in the compilation sequence. + + + + compiled form of the union case + compiled form of the union case + + + + default augmentation of the union case + default augmentation of the union case + + + + The property '{0}' has the same name as a method in type '{1}'. + The property '{0}' has the same name as a method in type '{1}'. + + + + The property '{0}' of type '{1}' has a getter and a setter that do not match. If one is abstract then the other must be as well. + The property '{0}' of type '{1}' has a getter and a setter that do not match. If one is abstract then the other must be as well. + + + + The property '{0}' has the same name as another property in type '{1}', but one takes indexer arguments and the other does not. You may be missing an indexer argument to one of your properties. + The property '{0}' has the same name as another property in type '{1}', but one takes indexer arguments and the other does not. You may be missing an indexer argument to one of your properties. + + + + A type would store a byref typed value. This is not permitted by Common IL. + A type would store a byref typed value. This is not permitted by Common IL. + + + + Duplicate method. The method '{0}' has the same name and signature as another method in type '{1}'. + Duplicate method. The method '{0}' has the same name and signature as another method in type '{1}'. + + + + Duplicate method. The method '{0}' has the same name and signature as another method in type '{1}' once tuples, functions, units of measure and/or provided types are erased. + Duplicate method. The method '{0}' has the same name and signature as another method in type '{1}' once tuples, functions, units of measure and/or provided types are erased. + + + + The method '{0}' has curried arguments but has the same name as another method in type '{1}'. Methods with curried arguments cannot be overloaded. Consider using a method taking tupled arguments. + The method '{0}' has curried arguments but has the same name as another method in type '{1}'. Methods with curried arguments cannot be overloaded. Consider using a method taking tupled arguments. + + + + Methods with curried arguments cannot declare 'out', 'ParamArray', 'optional', 'ReflectedDefinition', 'byref', 'CallerLineNumber', 'CallerMemberName', or 'CallerFilePath' arguments + Methods with curried arguments cannot declare 'out', 'ParamArray', 'optional', 'ReflectedDefinition', 'byref', 'CallerLineNumber', 'CallerMemberName', or 'CallerFilePath' arguments + + + + Duplicate property. The property '{0}' has the same name and signature as another property in type '{1}'. + Duplicate property. The property '{0}' has the same name and signature as another property in type '{1}'. + + + + Duplicate property. The property '{0}' has the same name and signature as another property in type '{1}' once tuples, functions, units of measure and/or provided types are erased. + Duplicate property. The property '{0}' has the same name and signature as another property in type '{1}' once tuples, functions, units of measure and/or provided types are erased. + + + + Duplicate method. The abstract method '{0}' has the same name and signature as an abstract method in an inherited type. + Duplicate method. The abstract method '{0}' has the same name and signature as an abstract method in an inherited type. + + + + Duplicate method. The abstract method '{0}' has the same name and signature as an abstract method in an inherited type once tuples, functions, units of measure and/or provided types are erased. + Duplicate method. The abstract method '{0}' has the same name and signature as an abstract method in an inherited type once tuples, functions, units of measure and/or provided types are erased. + + + + This type implements the same interface at different generic instantiations '{0}' and '{1}'. This is not permitted in this version of F#. + This type implements the same interface at different generic instantiations '{0}' and '{1}'. This is not permitted in this version of F#. + + + + The type of a field using the 'DefaultValue' attribute must admit default initialization, i.e. have 'null' as a proper value or be a struct type whose fields all admit default initialization. You can use 'DefaultValue(false)' to disable this check + The type of a field using the 'DefaultValue' attribute must admit default initialization, i.e. have 'null' as a proper value or be a struct type whose fields all admit default initialization. You can use 'DefaultValue(false)' to disable this check + + + + The type abbreviation contains byrefs. This is not permitted by F#. + The type abbreviation contains byrefs. This is not permitted by F#. + + + + The variable '{0}' is bound in a quotation but is used as part of a spliced expression. This is not permitted since it may escape its scope. + The variable '{0}' is bound in a quotation but is used as part of a spliced expression. This is not permitted since it may escape its scope. + + + + Quotations cannot contain uses of generic expressions + Quotations cannot contain uses of generic expressions + + + + Quotations cannot contain function definitions that are inferred or declared to be generic. Consider adding some type constraints to make this a valid quoted expression. + Quotations cannot contain function definitions that are inferred or declared to be generic. Consider adding some type constraints to make this a valid quoted expression. + + + + Quotations cannot contain object expressions + Quotations cannot contain object expressions + + + + Quotations cannot contain expressions that take the address of a field + Quotations cannot contain expressions that take the address of a field + + + + Quotations cannot contain expressions that fetch static fields + Quotations cannot contain expressions that fetch static fields + + + + Quotations cannot contain inline assembly code or pattern matching on arrays + Quotations cannot contain inline assembly code or pattern matching on arrays + + + + Quotations cannot contain descending for loops + Quotations cannot contain descending for loops + + + + Quotations cannot contain expressions that fetch union case indexes + Quotations cannot contain expressions that fetch union case indexes + + + + Quotations cannot contain expressions that set union case fields + Quotations cannot contain expressions that set union case fields + + + + Quotations cannot contain expressions that set fields in exception values + Quotations cannot contain expressions that set fields in exception values + + + + Quotations cannot contain expressions that require byref pointers + Quotations cannot contain expressions that require byref pointers + + + + Quotations cannot contain expressions that make member constraint calls, or uses of operators that implicitly resolve to a member constraint call + Quotations cannot contain expressions that make member constraint calls, or uses of operators that implicitly resolve to a member constraint call + + + + Quotations cannot contain this kind of constant + Quotations cannot contain this kind of constant + + + + Quotations cannot contain this kind of pattern match + Quotations cannot contain this kind of pattern match + + + + Quotations cannot contain array pattern matching + Quotations cannot contain array pattern matching + + + + Quotations cannot contain this kind of type + Quotations cannot contain this kind of type + + + + The declared type parameter '{0}' cannot be used here since the type parameter cannot be resolved at compile time + The declared type parameter '{0}' cannot be used here since the type parameter cannot be resolved at compile time + + + + This code is less generic than indicated by its annotations. A unit-of-measure specified using '_' has been determined to be '1', i.e. dimensionless. Consider making the code generic, or removing the use of '_'. + This code is less generic than indicated by its annotations. A unit-of-measure specified using '_' has been determined to be '1', i.e. dimensionless. Consider making the code generic, or removing the use of '_'. + + + + Type inference problem too complicated (maximum iteration depth reached). Consider adding further type annotations. + Type inference problem too complicated (maximum iteration depth reached). Consider adding further type annotations. + + + + Expected arguments to an instance member + Expected arguments to an instance member + + + + This indexer expects {0} arguments but is here given {1} + This indexer expects {0} arguments but is here given {1} + + + + Expecting a type supporting the operator '{0}' but given a function type. You may be missing an argument to a function. + Expecting a type supporting the operator '{0}' but given a function type. You may be missing an argument to a function. + + + + Expecting a type supporting the operator '{0}' but given a tuple type + Expecting a type supporting the operator '{0}' but given a tuple type + + + + None of the types '{0}' support the operator '{1}' + None of the types '{0}' support the operator '{1}' + + + + The type '{0}' does not support the operator '{1}' + The type '{0}' does not support the operator '{1}' + + + + None of the types '{0}' support the operator '{1}'. Consider opening the module 'Microsoft.FSharp.Linq.NullableOperators'. + None of the types '{0}' support the operator '{1}'. Consider opening the module 'Microsoft.FSharp.Linq.NullableOperators'. + + + + The type '{0}' does not support the operator '{1}'. Consider opening the module 'Microsoft.FSharp.Linq.NullableOperators'. + The type '{0}' does not support the operator '{1}'. Consider opening the module 'Microsoft.FSharp.Linq.NullableOperators'. + + + + The type '{0}' does not support a conversion to the type '{1}' + The type '{0}' does not support a conversion to the type '{1}' + + + + The type '{0}' has a method '{1}' (full name '{2}'), but the method is static + The type '{0}' has a method '{1}' (full name '{2}'), but the method is static + + + + The type '{0}' has a method '{1}' (full name '{2}'), but the method is not static + The type '{0}' has a method '{1}' (full name '{2}'), but the method is not static + + + + The constraints 'struct' and 'not struct' are inconsistent + The constraints 'struct' and 'not struct' are inconsistent + + + + The type '{0}' does not have 'null' as a proper value + The type '{0}' does not have 'null' as a proper value + + + + The type '{0}' does not have 'null' as a proper value. To create a null value for a Nullable type use 'System.Nullable()'. + The type '{0}' does not have 'null' as a proper value. To create a null value for a Nullable type use 'System.Nullable()'. + + + + The type '{0}' does not support the 'comparison' constraint because it has the 'NoComparison' attribute + The type '{0}' does not support the 'comparison' constraint because it has the 'NoComparison' attribute + + + + The type '{0}' does not support the 'comparison' constraint. For example, it does not support the 'System.IComparable' interface + The type '{0}' does not support the 'comparison' constraint. For example, it does not support the 'System.IComparable' interface + + + + The type '{0}' does not support the 'comparison' constraint because it is a record, union or struct with one or more structural element types which do not support the 'comparison' constraint. Either avoid the use of comparison with this type, or add the 'StructuralComparison' attribute to the type to determine which field type does not support comparison + The type '{0}' does not support the 'comparison' constraint because it is a record, union or struct with one or more structural element types which do not support the 'comparison' constraint. Either avoid the use of comparison with this type, or add the 'StructuralComparison' attribute to the type to determine which field type does not support comparison + + + + The type '{0}' does not support the 'equality' constraint because it has the 'NoEquality' attribute + The type '{0}' does not support the 'equality' constraint because it has the 'NoEquality' attribute + + + + The type '{0}' does not support the 'equality' constraint because it is a function type + The type '{0}' does not support the 'equality' constraint because it is a function type + + + + The type '{0}' does not support the 'equality' constraint because it is a record, union or struct with one or more structural element types which do not support the 'equality' constraint. Either avoid the use of equality with this type, or add the 'StructuralEquality' attribute to the type to determine which field type does not support equality + The type '{0}' does not support the 'equality' constraint because it is a record, union or struct with one or more structural element types which do not support the 'equality' constraint. Either avoid the use of equality with this type, or add the 'StructuralEquality' attribute to the type to determine which field type does not support equality + + + + The type '{0}' is not a CLI enum type + The type '{0}' is not a CLI enum type + + + + The type '{0}' has a non-standard delegate type + The type '{0}' has a non-standard delegate type + + + + The type '{0}' is not a CLI delegate type + The type '{0}' is not a CLI delegate type + + + + This type parameter cannot be instantiated to 'Nullable'. This is a restriction imposed in order to ensure the meaning of 'null' in some CLI languages is not confusing when used in conjunction with 'Nullable' values. + This type parameter cannot be instantiated to 'Nullable'. This is a restriction imposed in order to ensure the meaning of 'null' in some CLI languages is not confusing when used in conjunction with 'Nullable' values. + + + + A generic construct requires that the type '{0}' is a CLI or F# struct type + A generic construct requires that the type '{0}' is a CLI or F# struct type + + + + A generic construct requires that the type '{0}' is an unmanaged type + A generic construct requires that the type '{0}' is an unmanaged type + + + + The type '{0}' is not compatible with any of the types {1}, arising from the use of a printf-style format string + The type '{0}' is not compatible with any of the types {1}, arising from the use of a printf-style format string + + + + A generic construct requires that the type '{0}' have reference semantics, but it does not, i.e. it is a struct + A generic construct requires that the type '{0}' have reference semantics, but it does not, i.e. it is a struct + + + + A generic construct requires that the type '{0}' be non-abstract + A generic construct requires that the type '{0}' be non-abstract + + + + A generic construct requires that the type '{0}' have a public default constructor + A generic construct requires that the type '{0}' have a public default constructor + + + + Type instantiation length mismatch + Type instantiation length mismatch + + + + Optional arguments not permitted here + Optional arguments not permitted here + + + + {0} is not a static member + {0} is not a static member + + + + {0} is not an instance member + {0} is not an instance member + + + + Argument length mismatch + Argument length mismatch + + + + The argument types don't match + The argument types don't match + + + + This method expects a CLI 'params' parameter in this position. 'params' is a way of passing a variable number of arguments to a method in languages such as C#. Consider passing an array for this argument + This method expects a CLI 'params' parameter in this position. 'params' is a way of passing a variable number of arguments to a method in languages such as C#. Consider passing an array for this argument + + + + The member or object constructor '{0}' is not {1} + The member or object constructor '{0}' is not {1} + + + + The member or object constructor '{0}' is not {1}. Private members may only be accessed from within the declaring type. Protected members may only be accessed from an extending type and cannot be accessed from inner lambda expressions. + The member or object constructor '{0}' is not {1}. Private members may only be accessed from within the declaring type. Protected members may only be accessed from an extending type and cannot be accessed from inner lambda expressions. + + + + {0} is not a static method + {0} is not a static method + + + + {0} is not an instance method + {0} is not an instance method + + + + The member or object constructor '{0}' has no argument or settable return property '{1}'. {2}. + The member or object constructor '{0}' has no argument or settable return property '{1}'. {2}. + + + + The object constructor '{0}' has no argument or settable return property '{1}'. {2}. + The object constructor '{0}' has no argument or settable return property '{1}'. {2}. + + + + The required signature is {0} + The required signature is {0} + + + + The member or object constructor '{0}' requires {1} argument(s). The required signature is '{2}'. + The member or object constructor '{0}' requires {1} argument(s). The required signature is '{2}'. + + + + The member or object constructor '{0}' requires {1} additional argument(s). The required signature is '{2}'. + The member or object constructor '{0}' requires {1} additional argument(s). The required signature is '{2}'. + + + + The member or object constructor '{0}' requires {1} argument(s). The required signature is '{2}'. Some names for missing arguments are {3}. + The member or object constructor '{0}' requires {1} argument(s). The required signature is '{2}'. Some names for missing arguments are {3}. + + + + The member or object constructor '{0}' requires {1} additional argument(s). The required signature is '{2}'. Some names for missing arguments are {3}. + The member or object constructor '{0}' requires {1} additional argument(s). The required signature is '{2}'. Some names for missing arguments are {3}. + + + + The member or object constructor '{0}' requires {1} argument(s) but is here given {2} unnamed and {3} named argument(s). The required signature is '{4}'. + The member or object constructor '{0}' requires {1} argument(s) but is here given {2} unnamed and {3} named argument(s). The required signature is '{4}'. + + + + The member or object constructor '{0}' takes {1} argument(s) but is here given {2}. The required signature is '{3}'. + The member or object constructor '{0}' takes {1} argument(s) but is here given {2}. The required signature is '{3}'. + + + + The object constructor '{0}' takes {1} argument(s) but is here given {2}. The required signature is '{3}'. + The object constructor '{0}' takes {1} argument(s) but is here given {2}. The required signature is '{3}'. + + + + The object constructor '{0}' takes {1} argument(s) but is here given {2}. The required signature is '{3}'. If some of the arguments are meant to assign values to properties, consider separating those arguments with a comma (','). + The object constructor '{0}' takes {1} argument(s) but is here given {2}. The required signature is '{3}'. If some of the arguments are meant to assign values to properties, consider separating those arguments with a comma (','). + + + + The member or object constructor '{0}' takes {1} type argument(s) but is here given {2}. The required signature is '{3}'. + The member or object constructor '{0}' takes {1} type argument(s) but is here given {2}. The required signature is '{3}'. + + + + A member or object constructor '{0}' taking {1} arguments is not accessible from this code location. All accessible versions of method '{2}' take {3} arguments. + A member or object constructor '{0}' taking {1} arguments is not accessible from this code location. All accessible versions of method '{2}' take {3} arguments. + + + + Incorrect generic instantiation. No {0} member named '{1}' takes {2} generic arguments. + Incorrect generic instantiation. No {0} member named '{1}' takes {2} generic arguments. + + + + The member or object constructor '{0}' does not take {1} argument(s). An overload was found taking {2} arguments. + The member or object constructor '{0}' does not take {1} argument(s). An overload was found taking {2} arguments. + + + + No {0} member or object constructor named '{1}' takes {2} arguments + No {0} member or object constructor named '{1}' takes {2} arguments + + + + No {0} member or object constructor named '{1}' takes {2} arguments. Note the call to this member also provides {3} named arguments. + No {0} member or object constructor named '{1}' takes {2} arguments. Note the call to this member also provides {3} named arguments. + + + + No {0} member or object constructor named '{1}' takes {2} arguments. The named argument '{3}' doesn't correspond to any argument or settable return property for any overload. + No {0} member or object constructor named '{1}' takes {2} arguments. The named argument '{3}' doesn't correspond to any argument or settable return property for any overload. + + + + Method or object constructor '{0}' not found + Method or object constructor '{0}' not found + + + + No overloads match for method '{0}'. + No overloads match for method '{0}'. + + + + A unique overload for method '{0}' could not be determined based on type information prior to this program point. A type annotation may be needed. + A unique overload for method '{0}' could not be determined based on type information prior to this program point. A type annotation may be needed. + + + + Candidates: {0} + Candidates: {0} + + + + The available overloads are shown below. + The available overloads are shown below. + + + + Accessibility modifiers are not permitted on 'do' bindings, but '{0}' was given. + Accessibility modifiers are not permitted on 'do' bindings, but '{0}' was given. + + + + End of file in #if section begun at or after here + End of file in #if section begun at or after here + + + + End of file in string begun at or before here + End of file in string begun at or before here + + + + End of file in verbatim string begun at or before here + End of file in verbatim string begun at or before here + + + + End of file in comment begun at or before here + End of file in comment begun at or before here + + + + End of file in string embedded in comment begun at or before here + End of file in string embedded in comment begun at or before here + + + + End of file in verbatim string embedded in comment begun at or before here + End of file in verbatim string embedded in comment begun at or before here + + + + End of file in IF-OCAML section begun at or before here + End of file in IF-OCAML section begun at or before here + + + + End of file in directive begun at or before here + End of file in directive begun at or before here + + + + No #endif found for #if or #else + No #endif found for #if or #else + + + + Attributes have been ignored in this construct + Attributes have been ignored in this construct + + + + 'use' bindings are not permitted in primary constructors + 'use' bindings are not permitted in primary constructors + + + + 'use' bindings are not permitted in modules and are treated as 'let' bindings + 'use' bindings are not permitted in modules and are treated as 'let' bindings + + + + An integer for loop must use a simple identifier + An integer for loop must use a simple identifier + + + + At most one 'with' augmentation is permitted + At most one 'with' augmentation is permitted + + + + A semicolon is not expected at this point + A semicolon is not expected at this point + + + + Unexpected end of input + Unexpected end of input + + + + Accessibility modifiers are not permitted here, but '{0}' was given. + Accessibility modifiers are not permitted here, but '{0}' was given. + + + + Only '#' compiler directives may occur prior to the first 'namespace' declaration + Only '#' compiler directives may occur prior to the first 'namespace' declaration + + + + Accessibility modifiers should come immediately prior to the identifier naming a construct + Accessibility modifiers should come immediately prior to the identifier naming a construct + + + + Files should begin with either a namespace or module declaration, e.g. 'namespace SomeNamespace.SubNamespace' or 'module SomeNamespace.SomeModule', but not both. To define a module within a namespace use 'module SomeModule = ...' + Files should begin with either a namespace or module declaration, e.g. 'namespace SomeNamespace.SubNamespace' or 'module SomeNamespace.SomeModule', but not both. To define a module within a namespace use 'module SomeModule = ...' + + + + A module abbreviation must be a simple name, not a path + A module abbreviation must be a simple name, not a path + + + + Ignoring attributes on module abbreviation + Ignoring attributes on module abbreviation + + + + The '{0}' accessibility attribute is not allowed on module abbreviation. Module abbreviations are always private. + The '{0}' accessibility attribute is not allowed on module abbreviation. Module abbreviations are always private. + + + + The '{0}' visibility attribute is not allowed on module abbreviation. Module abbreviations are always private. + The '{0}' visibility attribute is not allowed on module abbreviation. Module abbreviations are always private. + + + + Unclosed block + Unclosed block + + + + Unmatched 'begin' or 'struct' + Unmatched 'begin' or 'struct' + + + + A module name must be a simple name, not a path + A module name must be a simple name, not a path + + + + Unexpected empty type moduleDefn list + Unexpected empty type moduleDefn list + + + + Attributes should be placed before 'val' + Attributes should be placed before 'val' + + + + Attributes are not permitted on interface implementations + Attributes are not permitted on interface implementations + + + + Syntax error + Syntax error + + + + Augmentations are not permitted on delegate type moduleDefns + Augmentations are not permitted on delegate type moduleDefns + + + + Unmatched 'class', 'interface' or 'struct' + Unmatched 'class', 'interface' or 'struct' + + + + A type definition requires one or more members or other declarations. If you intend to define an empty class, struct or interface, then use 'type ... = class end', 'interface end' or 'struct end'. + A type definition requires one or more members or other declarations. If you intend to define an empty class, struct or interface, then use 'type ... = class end', 'interface end' or 'struct end'. + + + + Unmatched 'with' or badly formatted 'with' block + Unmatched 'with' or badly formatted 'with' block + + + + 'get', 'set' or 'get,set' required + 'get', 'set' or 'get,set' required + + + + Only class types may take value arguments + Only class types may take value arguments + + + + Unmatched 'begin' + Unmatched 'begin' + + + + Invalid declaration syntax + Invalid declaration syntax + + + + 'get' and/or 'set' required + 'get' and/or 'set' required + + + + Type annotations on property getters and setters must be given after the 'get()' or 'set(v)', e.g. 'with get() : string = ...' + Type annotations on property getters and setters must be given after the 'get()' or 'set(v)', e.g. 'with get() : string = ...' + + + + A getter property is expected to be a function, e.g. 'get() = ...' or 'get(index) = ...' + A getter property is expected to be a function, e.g. 'get() = ...' or 'get(index) = ...' + + + + Multiple accessibilities given for property getter or setter + Multiple accessibilities given for property getter or setter + + + + Property setters must be defined using 'set value = ', 'set idx value = ' or 'set (idx1,...,idxN) value = ... ' + Property setters must be defined using 'set value = ', 'set idx value = ' or 'set (idx1,...,idxN) value = ... ' + + + + Interfaces always have the same visibility as the enclosing type + Interfaces always have the same visibility as the enclosing type + + + + Accessibility modifiers are not allowed on this member. Abstract slots always have the same visibility as the enclosing type. + Accessibility modifiers are not allowed on this member. Abstract slots always have the same visibility as the enclosing type. + + + + Attributes are not permitted on 'inherit' declarations + Attributes are not permitted on 'inherit' declarations + + + + Accessibility modifiers are not permitted on an 'inherits' declaration + Accessibility modifiers are not permitted on an 'inherits' declaration + + + + 'inherit' declarations cannot have 'as' bindings. To access members of the base class when overriding a method, the syntax 'base.SomeMember' may be used; 'base' is a keyword. Remove this 'as' binding. + 'inherit' declarations cannot have 'as' bindings. To access members of the base class when overriding a method, the syntax 'base.SomeMember' may be used; 'base' is a keyword. Remove this 'as' binding. + + + + Attributes are not allowed here + Attributes are not allowed here + + + + Accessibility modifiers are not permitted in this position for type abbreviations + Accessibility modifiers are not permitted in this position for type abbreviations + + + + Accessibility modifiers are not permitted in this position for enum types + Accessibility modifiers are not permitted in this position for enum types + + + + All enum fields must be given values + All enum fields must be given values + + + + Accessibility modifiers are not permitted on inline assembly code types + Accessibility modifiers are not permitted on inline assembly code types + + + + Unexpected identifier: '{0}' + Unexpected identifier: '{0}' + + + + Accessibility modifiers are not permitted on union cases. Use 'type U = internal ...' or 'type U = private ...' to give an accessibility to the whole representation. + Accessibility modifiers are not permitted on union cases. Use 'type U = internal ...' or 'type U = private ...' to give an accessibility to the whole representation. + + + + Accessibility modifiers are not permitted on enumeration fields + Accessibility modifiers are not permitted on enumeration fields + + + + Consider using a separate record type instead + Consider using a separate record type instead + + + + Accessibility modifiers are not permitted on record fields. Use 'type R = internal ...' or 'type R = private ...' to give an accessibility to the whole representation. + Accessibility modifiers are not permitted on record fields. Use 'type R = internal ...' or 'type R = private ...' to give an accessibility to the whole representation. + + + + The declaration form 'let ... and ...' for non-recursive bindings is not used in F# code. Consider using a sequence of 'let' bindings + The declaration form 'let ... and ...' for non-recursive bindings is not used in F# code. Consider using a sequence of 'let' bindings + + + + Unmatched '(' + Unmatched '(' + + + + Successive patterns should be separated by spaces or tupled + Successive patterns should be separated by spaces or tupled + + + + No matching 'in' found for this 'let' + No matching 'in' found for this 'let' + + + + Error in the return expression for this 'let'. Possible incorrect indentation. + Error in the return expression for this 'let'. Possible incorrect indentation. + + + + The block following this '{0}' is unfinished. Every code block is an expression and must have a result. '{1}' cannot be the final code element in a block. Consider giving this block an explicit result. + The block following this '{0}' is unfinished. Every code block is an expression and must have a result. '{1}' cannot be the final code element in a block. Consider giving this block an explicit result. + + + + Incomplete conditional. Expected 'if <expr> then <expr>' or 'if <expr> then <expr> else <expr>'. + Incomplete conditional. Expected 'if <expr> then <expr>' or 'if <expr> then <expr> else <expr>'. + + + + 'assert' may not be used as a first class value. Use 'assert <expr>' instead. + 'assert' may not be used as a first class value. Use 'assert <expr>' instead. + + + + Identifier expected + Identifier expected + + + + 'in' or '=' expected + 'in' or '=' expected + + + + The use of '->' in sequence and computation expressions is limited to the form 'for pat in expr -> expr'. Use the syntax 'for ... in ... do ... yield...' to generate elements in more complex sequence expressions. + The use of '->' in sequence and computation expressions is limited to the form 'for pat in expr -> expr'. Use the syntax 'for ... in ... do ... yield...' to generate elements in more complex sequence expressions. + + + + Successive arguments should be separated by spaces or tupled, and arguments involving function or method applications should be parenthesized + Successive arguments should be separated by spaces or tupled, and arguments involving function or method applications should be parenthesized + + + + Unmatched '[' + Unmatched '[' + + + + Missing qualification after '.' + Missing qualification after '.' + + + + In F# code you may use 'expr.[expr]'. A type annotation may be required to indicate the first expression is an array + In F# code you may use 'expr.[expr]'. A type annotation may be required to indicate the first expression is an array + + + + Mismatched quotation, beginning with '{0}' + Mismatched quotation, beginning with '{0}' + + + + Unmatched '{0}' + Unmatched '{0}' + + + + Unmatched '[|' + Unmatched '[|' + + + + Unmatched '{{' + Unmatched '{{' + + + + Field bindings must have the form 'id = expr;' + Field bindings must have the form 'id = expr;' + + + + This member is not permitted in an object implementation + This member is not permitted in an object implementation + + + + Missing function body + Missing function body + + + + Syntax error in labelled type argument + Syntax error in labelled type argument + + + + Unexpected infix operator in type expression + Unexpected infix operator in type expression + + + + The syntax '(typ,...,typ) ident' is not used in F# code. Consider using 'ident<typ,...,typ>' instead + The syntax '(typ,...,typ) ident' is not used in F# code. Consider using 'ident<typ,...,typ>' instead + + + + Invalid literal in type + Invalid literal in type + + + + Unexpected infix operator in unit-of-measure expression. Legal operators are '*', '/' and '^'. + Unexpected infix operator in unit-of-measure expression. Legal operators are '*', '/' and '^'. + + + + Unexpected integer literal in unit-of-measure expression + Unexpected integer literal in unit-of-measure expression + + + + Syntax error: unexpected type parameter specification + Syntax error: unexpected type parameter specification + + + + Mismatched quotation operator name, beginning with '{0}' + Mismatched quotation operator name, beginning with '{0}' + + + + Active pattern case identifiers must begin with an uppercase letter + Active pattern case identifiers must begin with an uppercase letter + + + + The '|' character is not permitted in active pattern case identifiers + The '|' character is not permitted in active pattern case identifiers + + + + Denominator must not be 0 in unit-of-measure exponent + Denominator must not be 0 in unit-of-measure exponent + + + + No '=' symbol should follow a 'namespace' declaration + No '=' symbol should follow a 'namespace' declaration + + + + The syntax 'module ... = struct .. end' is not used in F# code. Consider using 'module ... = begin .. end' + The syntax 'module ... = struct .. end' is not used in F# code. Consider using 'module ... = begin .. end' + + + + The syntax 'module ... : sig .. end' is not used in F# code. Consider using 'module ... = begin .. end' + The syntax 'module ... : sig .. end' is not used in F# code. Consider using 'module ... = begin .. end' + + + + A static field was used where an instance field is expected + A static field was used where an instance field is expected + + + + Method '{0}' is not accessible from this code location + Method '{0}' is not accessible from this code location + + + + Implicit product of measures following / + Implicit product of measures following / + + + + Unexpected SynMeasure.Anon + Unexpected SynMeasure.Anon + + + + Non-zero constants cannot have generic units. For generic zero, write 0.0<_>. + Non-zero constants cannot have generic units. For generic zero, write 0.0<_>. + + + + In sequence expressions, results are generated using 'yield' + In sequence expressions, results are generated using 'yield' + + + + Unexpected big rational constant + Unexpected big rational constant + + + + Units-of-measure supported only on float, float32, decimal and signed integer types + Units-of-measure supported only on float, float32, decimal and signed integer types + + + + Unexpected Const_uint16array + Unexpected Const_uint16array + + + + Unexpected Const_bytearray + Unexpected Const_bytearray + + + + A parameter with attributes must also be given a name, e.g. '[<Attribute>] Name : Type' + A parameter with attributes must also be given a name, e.g. '[<Attribute>] Name : Type' + + + + Return values cannot have names + Return values cannot have names + + + + MemberKind.PropertyGetSet only expected in parse trees + MemberKind.PropertyGetSet only expected in parse trees + + + + Namespaces cannot contain values. Consider using a module to hold your value declarations. + Namespaces cannot contain values. Consider using a module to hold your value declarations. + + + + Namespaces cannot contain extension members except in the same file and namespace declaration group where the type is defined. Consider using a module to hold declarations of extension members. + Namespaces cannot contain extension members except in the same file and namespace declaration group where the type is defined. Consider using a module to hold declarations of extension members. + + + + Multiple visibility attributes have been specified for this identifier + Multiple visibility attributes have been specified for this identifier + + + + Multiple visibility attributes have been specified for this identifier. 'let' bindings in classes are always private, as are any 'let' bindings inside expressions. + Multiple visibility attributes have been specified for this identifier. 'let' bindings in classes are always private, as are any 'let' bindings inside expressions. + + + + The name '({0})' 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 '{1}' instead. + The name '({0})' 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 '{1}' instead. + + + + The name '({0})' 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 '{1}' instead. + The name '({0})' 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 '{1}' instead. + + + + The name '({0})' should not be used as a member name. If defining a static member for use from other CLI languages then use the name '{1}' instead. + The name '({0})' should not be used as a member name. If defining a static member for use from other CLI languages then use the name '{1}' instead. + + + + The name '({0})' should not be used as a member name because it is given a standard definition in the F# library over fixed types + The name '({0})' should not be used as a member name because it is given a standard definition in the F# library over fixed types + + + + The '{0}' operator should not normally be redefined. To define overloaded comparison semantics for a particular type, implement the 'System.IComparable' interface in the definition of that type. + The '{0}' operator should not normally be redefined. To define overloaded comparison semantics for a particular type, implement the 'System.IComparable' interface in the definition of that type. + + + + The '{0}' operator should not normally be redefined. To define equality semantics for a type, override the 'Object.Equals' member in the definition of that type. + The '{0}' operator should not normally be redefined. To define equality semantics for a type, override the 'Object.Equals' member in the definition of that type. + + + + The '{0}' operator should not normally be redefined. Consider using a different operator name + The '{0}' operator should not normally be redefined. Consider using a different operator name + + + + The '{0}' operator cannot be redefined. Consider using a different operator name + The '{0}' operator cannot be redefined. Consider using a different operator name + + + + Expected module or namespace parent {0} + Expected module or namespace parent {0} + + + + The struct, record or union type '{0}' implements the interface 'System.IComparable' explicitly. You must apply the 'CustomComparison' attribute to the type. + The struct, record or union type '{0}' implements the interface 'System.IComparable' explicitly. You must apply the 'CustomComparison' attribute to the type. + + + + The struct, record or union type '{0}' implements the interface 'System.IComparable<_>' explicitly. You must apply the 'CustomComparison' attribute to the type, and should also provide a consistent implementation of the non-generic interface System.IComparable. + The struct, record or union type '{0}' implements the interface 'System.IComparable<_>' explicitly. You must apply the 'CustomComparison' attribute to the type, and should also provide a consistent implementation of the non-generic interface System.IComparable. + + + + The struct, record or union type '{0}' implements the interface 'System.IStructuralComparable' explicitly. Apply the 'CustomComparison' attribute to the type. + The struct, record or union type '{0}' implements the interface 'System.IStructuralComparable' explicitly. Apply the 'CustomComparison' attribute to the type. + + + + This record contains fields from inconsistent types + This record contains fields from inconsistent types + + + + DLLImport stubs cannot be inlined + DLLImport stubs cannot be inlined + + + + Structs may only bind a 'this' parameter at member declarations + Structs may only bind a 'this' parameter at member declarations + + + + Unexpected expression at recursive inference point + Unexpected expression at recursive inference point + + + + This code is less generic than required by its annotations because the explicit type variable '{0}' could not be generalized. It was constrained to be '{1}'. + This code is less generic than required by its annotations because the explicit type variable '{0}' could not be generalized. It was constrained to be '{1}'. + + + + One or more of the explicit class or function type variables for this binding could not be generalized, because they were constrained to other types + One or more of the explicit class or function type variables for this binding could not be generalized, because they were constrained to other types + + + + A generic type parameter has been used in a way that constrains it to always be '{0}' + A generic type parameter has been used in a way that constrains it to always be '{0}' + + + + This type parameter has been used in a way that constrains it to always be '{0}' + This type parameter has been used in a way that constrains it to always be '{0}' + + + + The type parameters inferred for this value are not stable under the erasure of type abbreviations. This is due to the use of type abbreviations which drop or reorder type parameters, e.g. \n\ttype taggedInt<'a> = int or\n\ttype swap<'a,'b> = 'b * 'a.\nConsider declaring the type parameters for this value explicitly, e.g.\n\tlet f<'a,'b> ((x,y) : swap<'b,'a>) : swap<'a,'b> = (y,x). + The type parameters inferred for this value are not stable under the erasure of type abbreviations. This is due to the use of type abbreviations which drop or reorder type parameters, e.g. \n\ttype taggedInt<'a> = int or\n\ttype swap<'a,'b> = 'b * 'a.\nConsider declaring the type parameters for this value explicitly, e.g.\n\tlet f<'a,'b> ((x,y) : swap<'b,'a>) : swap<'a,'b> = (y,x). + + + + Explicit type parameters may only be used on module or member bindings + Explicit type parameters may only be used on module or member bindings + + + + You must explicitly declare either all or no type parameters when overriding a generic abstract method + You must explicitly declare either all or no type parameters when overriding a generic abstract method + + + + The field labels and expected type of this record expression or pattern do not uniquely determine a corresponding record type + The field labels and expected type of this record expression or pattern do not uniquely determine a corresponding record type + + + + The field '{0}' appears twice in this record expression or pattern + The field '{0}' appears twice in this record expression or pattern + + + + Unknown union case + Unknown union case + + + + This code is not sufficiently generic. The type variable {0} could not be generalized because it would escape its scope. + This code is not sufficiently generic. The type variable {0} could not be generalized because it would escape its scope. + + + + A property cannot have explicit type parameters. Consider using a method instead. + A property cannot have explicit type parameters. Consider using a method instead. + + + + A constructor cannot have explicit type parameters. Consider using a static construction method instead. + A constructor cannot have explicit type parameters. Consider using a static construction method instead. + + + + This instance member needs a parameter to represent the object being invoked. Make the member static or use the notation 'member x.Member(args) = ...'. + This instance member needs a parameter to represent the object being invoked. Make the member static or use the notation 'member x.Member(args) = ...'. + + + + Unexpected source-level property specification in syntax tree + Unexpected source-level property specification in syntax tree + + + + A static initializer requires an argument + A static initializer requires an argument + + + + An object constructor requires an argument + An object constructor requires an argument + + + + This static member should not have a 'this' parameter. Consider using the notation 'member Member(args) = ...'. + This static member should not have a 'this' parameter. Consider using the notation 'member Member(args) = ...'. + + + + An explicit static initializer should use the syntax 'static new(args) = expr' + An explicit static initializer should use the syntax 'static new(args) = expr' + + + + An explicit object constructor should use the syntax 'new(args) = expr' + An explicit object constructor should use the syntax 'new(args) = expr' + + + + Unexpected source-level property specification + Unexpected source-level property specification + + + + This form of object expression is not used in F#. Use 'member this.MemberName ... = ...' to define member implementations in object expressions. + This form of object expression is not used in F#. Use 'member this.MemberName ... = ...' to define member implementations in object expressions. + + + + Invalid declaration + Invalid declaration + + + + Attributes are not allowed within patterns + Attributes are not allowed within patterns + + + + The generic function '{0}' must be given explicit type argument(s) + The generic function '{0}' must be given explicit type argument(s) + + + + The method or function '{0}' should not be given explicit type argument(s) because it does not declare its type parameters explicitly + The method or function '{0}' should not be given explicit type argument(s) because it does not declare its type parameters explicitly + + + + This value, type or method expects {0} type parameter(s) but was given {1} + This value, type or method expects {0} type parameter(s) but was given {1} + + + + The default, zero-initializing constructor of a struct type may only be used if all the fields of the struct type admit default initialization + The default, zero-initializing constructor of a struct type may only be used if all the fields of the struct type admit default initialization + + + + Couldn't find Dispose on IDisposable, or it was overloaded + Couldn't find Dispose on IDisposable, or it was overloaded + + + + This value is not a literal and cannot be used in a pattern + This value is not a literal and cannot be used in a pattern + + + + This field is readonly + This field is readonly + + + + Named arguments must appear after all other arguments + Named arguments must appear after all other arguments + + + + This function value is being used to construct a delegate type whose signature includes a byref argument. You must use an explicit lambda expression taking {0} arguments. + This function value is being used to construct a delegate type whose signature includes a byref argument. You must use an explicit lambda expression taking {0} arguments. + + + + The type '{0}' is not a type whose values can be enumerated with this syntax, i.e. is not compatible with either seq<_>, IEnumerable<_> or IEnumerable and does not have a GetEnumerator method + The type '{0}' is not a type whose values can be enumerated with this syntax, i.e. is not compatible with either seq<_>, IEnumerable<_> or IEnumerable and does not have a GetEnumerator method + + + + This recursive binding uses an invalid mixture of recursive forms + This recursive binding uses an invalid mixture of recursive forms + + + + This is not a valid object construction expression. Explicit object constructors must either call an alternate constructor or initialize all fields of the object and specify a call to a super class constructor. + This is not a valid object construction expression. Explicit object constructors must either call an alternate constructor or initialize all fields of the object and specify a call to a super class constructor. + + + + Invalid constraint + Invalid constraint + + + + Invalid constraint: the type used for the constraint is sealed, which means the constraint could only be satisfied by at most one solution + Invalid constraint: the type used for the constraint is sealed, which means the constraint could only be satisfied by at most one solution + + + + An 'enum' constraint must be of the form 'enum<type>' + An 'enum' constraint must be of the form 'enum<type>' + + + + 'new' constraints must take one argument of type 'unit' and return the constructed type + 'new' constraints must take one argument of type 'unit' and return the constructed type + + + + This property has an invalid type. Properties taking multiple indexer arguments should have types of the form 'ty1 * ty2 -> ty3'. Properties returning functions should have types of the form '(ty1 -> ty2)'. + This property has an invalid type. Properties taking multiple indexer arguments should have types of the form 'ty1 * ty2 -> ty3'. Properties returning functions should have types of the form '(ty1 -> ty2)'. + + + + Expected unit-of-measure parameter, not type parameter. Explicit unit-of-measure parameters must be marked with the [<Measure>] attribute. + Expected unit-of-measure parameter, not type parameter. Explicit unit-of-measure parameters must be marked with the [<Measure>] attribute. + + + + Expected type parameter, not unit-of-measure parameter + Expected type parameter, not unit-of-measure parameter + + + + Expected type, not unit-of-measure + Expected type, not unit-of-measure + + + + Expected unit-of-measure, not type + Expected unit-of-measure, not type + + + + Units-of-measure cannot be used as prefix arguments to a type. Rewrite as postfix arguments in angle brackets. + Units-of-measure cannot be used as prefix arguments to a type. Rewrite as postfix arguments in angle brackets. + + + + Unit-of-measure cannot be used in type constructor application + Unit-of-measure cannot be used in type constructor application + + + + This control construct may only be used if the computation expression builder defines a '{0}' method + This control construct may only be used if the computation expression builder defines a '{0}' method + + + + This type has no nested types + This type has no nested types + + + + Unexpected {0} in type expression + Unexpected {0} in type expression + + + + Type parameter cannot be used as type constructor + Type parameter cannot be used as type constructor + + + + Illegal syntax in type expression + Illegal syntax in type expression + + + + Anonymous unit-of-measure cannot be nested inside another unit-of-measure expression + Anonymous unit-of-measure cannot be nested inside another unit-of-measure expression + + + + Anonymous type variables are not permitted in this declaration + Anonymous type variables are not permitted in this declaration + + + + Unexpected / in type + Unexpected / in type + + + + Unexpected type arguments + Unexpected type arguments + + + + Optional arguments are only permitted on type members + Optional arguments are only permitted on type members + + + + Name '{0}' not bound in pattern context + Name '{0}' not bound in pattern context + + + + Non-primitive numeric literal constants cannot be used in pattern matches because they can be mapped to multiple different types through the use of a NumericLiteral module. Consider using replacing with a variable, and use 'when <variable> = <constant>' at the end of the match clause. + Non-primitive numeric literal constants cannot be used in pattern matches because they can be mapped to multiple different types through the use of a NumericLiteral module. Consider using replacing with a variable, and use 'when <variable> = <constant>' at the end of the match clause. + + + + Type arguments cannot be specified here + Type arguments cannot be specified here + + + + Only active patterns returning exactly one result may accept arguments + Only active patterns returning exactly one result may accept arguments + + + + Invalid argument to parameterized pattern label + Invalid argument to parameterized pattern label + + + + Internal error. Invalid index into active pattern array + Internal error. Invalid index into active pattern array + + + + This union case does not take arguments + This union case does not take arguments + + + + This union case takes one argument + This union case takes one argument + + + + This union case expects {0} arguments in tupled form + This union case expects {0} arguments in tupled form + + + + Field '{0}' is not static + Field '{0}' is not static + + + + This field is not a literal and cannot be used in a pattern + This field is not a literal and cannot be used in a pattern + + + + This is not a variable, constant, active recognizer or literal + This is not a variable, constant, active recognizer or literal + + + + This is not a valid pattern + This is not a valid pattern + + + + Character range matches have been removed in F#. Consider using a 'when' pattern guard instead. + Character range matches have been removed in F#. Consider using a 'when' pattern guard instead. + + + + Illegal pattern + Illegal pattern + + + + Syntax error - unexpected '?' symbol + Syntax error - unexpected '?' symbol + + + + Expected {0} expressions, got {1} + Expected {0} expressions, got {1} + + + + TcExprUndelayed: delayed + TcExprUndelayed: delayed + + + + This expression form may only be used in sequence and computation expressions + This expression form may only be used in sequence and computation expressions + + + + Invalid object expression. Objects without overrides or interfaces should use the expression form 'new Type(args)' without braces. + Invalid object expression. Objects without overrides or interfaces should use the expression form 'new Type(args)' without braces. + + + + Invalid object, sequence or record expression + Invalid object, sequence or record expression + + + + Invalid record, sequence or computation expression. Sequence expressions should be of the form 'seq {{ ... }}' + Invalid record, sequence or computation expression. Sequence expressions should be of the form 'seq {{ ... }}' + + + + This list or array expression includes an element of the form 'if ... then ... else'. Parenthesize this expression to indicate it is an individual element of the list or array, to disambiguate this from a list generated using a sequence expression + This list or array expression includes an element of the form 'if ... then ... else'. Parenthesize this expression to indicate it is an individual element of the list or array, to disambiguate this from a list generated using a sequence expression + + + + Unable to parse format string '{0}' + Unable to parse format string '{0}' + + + + This list expression exceeds the maximum size for list literals. Use an array for larger literals and call Array.ToList. + This list expression exceeds the maximum size for list literals. Use an array for larger literals and call Array.ToList. + + + + The expression form 'expr then expr' may only be used as part of an explicit object constructor + The expression form 'expr then expr' may only be used as part of an explicit object constructor + + + + Named arguments cannot be given to member trait calls + Named arguments cannot be given to member trait calls + + + + This is not a valid name for an enumeration case + This is not a valid name for an enumeration case + + + + This field is not mutable + This field is not mutable + + + + This construct may only be used within list, array and sequence expressions, e.g. expressions of the form 'seq {{ ... }}', '[ ... ]' or '[| ... |]'. These use the syntax 'for ... in ... do ... yield...' to generate elements + This construct may only be used within list, array and sequence expressions, e.g. expressions of the form 'seq {{ ... }}', '[ ... ]' or '[| ... |]'. These use the syntax 'for ... in ... do ... yield...' to generate elements + + + + This construct may only be used within computation expressions. To return a value from an ordinary function simply write the expression without 'return'. + This construct may only be used within computation expressions. To return a value from an ordinary function simply write the expression without 'return'. + + + + This construct may only be used within sequence or computation expressions + This construct may only be used within sequence or computation expressions + + + + This construct may only be used within computation expressions + This construct may only be used within computation expressions + + + + Invalid indexer expression + Invalid indexer expression + + + + The operator 'expr.[idx]' has been used on an object of indeterminate type based on information prior to this program point. Consider adding further type constraints + The operator 'expr.[idx]' has been used on an object of indeterminate type based on information prior to this program point. Consider adding further type constraints + + + + Cannot inherit from a variable type + Cannot inherit from a variable type + + + + Calls to object constructors on type parameters cannot be given arguments + Calls to object constructors on type parameters cannot be given arguments + + + + The 'CompiledName' attribute cannot be used with this language element + The 'CompiledName' attribute cannot be used with this language element + + + + '{0}' may only be used with named types + '{0}' may only be used with named types + + + + 'inherit' cannot be used on interface types. Consider implementing the interface by using 'interface ... with ... end' instead. + 'inherit' cannot be used on interface types. Consider implementing the interface by using 'interface ... with ... end' instead. + + + + 'new' cannot be used on interface types. Consider using an object expression '{{ new ... with ... }}' instead. + 'new' cannot be used on interface types. Consider using an object expression '{{ new ... with ... }}' instead. + + + + Instances of this type cannot be created since it has been marked abstract or not all methods have been given implementations. Consider using an object expression '{{ new ... with ... }}' instead. + Instances of this type cannot be created since it has been marked abstract or not all methods have been given implementations. Consider using an object expression '{{ new ... with ... }}' instead. + + + + It is recommended that objects supporting the IDisposable interface are created using the syntax 'new Type(args)', rather than 'Type(args)' or 'Type' as a function value representing the constructor, to indicate that resources may be owned by the generated value + It is recommended that objects supporting the IDisposable interface are created using the syntax 'new Type(args)', rather than 'Type(args)' or 'Type' as a function value representing the constructor, to indicate that resources may be owned by the generated value + + + + '{0}' may only be used to construct object types + '{0}' may only be used to construct object types + + + + Constructors for the type '{0}' must directly or indirectly call its implicit object constructor. Use a call to the implicit object constructor instead of a record expression. + Constructors for the type '{0}' must directly or indirectly call its implicit object constructor. Use a call to the implicit object constructor instead of a record expression. + + + + The field '{0}' has been given a value, but is not present in the type '{1}' + The field '{0}' has been given a value, but is not present in the type '{1}' + + + + No assignment given for field '{0}' of type '{1}' + No assignment given for field '{0}' of type '{1}' + + + + Extraneous fields have been given values + Extraneous fields have been given values + + + + Only overrides of abstract and virtual members may be specified in object expressions + Only overrides of abstract and virtual members may be specified in object expressions + + + + The member '{0}' does not correspond to any abstract or virtual method available to override or implement. + The member '{0}' does not correspond to any abstract or virtual method available to override or implement. + + + + The type {0} contains the member '{1}' but it is not a virtual or abstract method that is available to override or implement. + The type {0} contains the member '{1}' but it is not a virtual or abstract method that is available to override or implement. + + + + The member '{0}' does not accept the correct number of arguments. {1} argument(s) are expected, but {2} were given. The required signature is '{3}'.{4} + The member '{0}' does not accept the correct number of arguments. {1} argument(s) are expected, but {2} were given. The required signature is '{3}'.{4} + + + + The member '{0}' does not accept the correct number of arguments. One overload accepts {1} arguments, but {2} were given. The required signature is '{3}'.{4} + The member '{0}' does not accept the correct number of arguments. One overload accepts {1} arguments, but {2} were given. The required signature is '{3}'.{4} + + + + A simple method name is required here + A simple method name is required here + + + + The types System.ValueType, System.Enum, System.Delegate, System.MulticastDelegate and System.Array cannot be used as super types in an object expression or class + The types System.ValueType, System.Enum, System.Delegate, System.MulticastDelegate and System.Array cannot be used as super types in an object expression or class + + + + 'new' must be used with a named type + 'new' must be used with a named type + + + + Cannot create an extension of a sealed type + Cannot create an extension of a sealed type + + + + No arguments may be given when constructing a record value + No arguments may be given when constructing a record value + + + + Interface implementations cannot be given on construction expressions + Interface implementations cannot be given on construction expressions + + + + Object construction expressions may only be used to implement constructors in class types + Object construction expressions may only be used to implement constructors in class types + + + + Only simple bindings of the form 'id = expr' can be used in construction expressions + Only simple bindings of the form 'id = expr' can be used in construction expressions + + + + Objects must be initialized by an object construction expression that calls an inherited object constructor and assigns a value to each field + Objects must be initialized by an object construction expression that calls an inherited object constructor and assigns a value to each field + + + + Expected an interface type + Expected an interface type + + + + Constructor expressions for interfaces do not take arguments + Constructor expressions for interfaces do not take arguments + + + + This object constructor requires arguments + This object constructor requires arguments + + + + 'new' may only be used with object constructors + 'new' may only be used with object constructors + + + + At least one override did not correctly implement its corresponding abstract member + At least one override did not correctly implement its corresponding abstract member + + + + This numeric literal requires that a module '{0}' defining functions FromZero, FromOne, FromInt32, FromInt64 and FromString be in scope + This numeric literal requires that a module '{0}' defining functions FromZero, FromOne, FromInt32, FromInt64 and FromString be in scope + + + + Invalid record construction + Invalid record construction + + + + The expression form {{ expr with ... }} may only be used with record types. To build object types use {{ new Type(...) with ... }} + The expression form {{ expr with ... }} may only be used with record types. To build object types use {{ new Type(...) with ... }} + + + + The inherited type is not an object model type + The inherited type is not an object model type + + + + Object construction expressions (i.e. record expressions with inheritance specifications) may only be used to implement constructors in object model types. Use 'new ObjectType(args)' to construct instances of object model types outside of constructors + Object construction expressions (i.e. record expressions with inheritance specifications) may only be used to implement constructors in object model types. Use 'new ObjectType(args)' to construct instances of object model types outside of constructors + + + + '{{ }}' is not a valid expression. Records must include at least one field. Empty sequences are specified by using Seq.empty or an empty list '[]'. + '{{ }}' is not a valid expression. Records must include at least one field. Empty sequences are specified by using Seq.empty or an empty list '[]'. + + + + This type is not a record type. Values of class and struct types must be created using calls to object constructors. + This type is not a record type. Values of class and struct types must be created using calls to object constructors. + + + + This type is not a record type + This type is not a record type + + + + This construct is ambiguous as part of a computation expression. Nested expressions may be written using 'let _ = (...)' and nested computations using 'let! res = builder {{ ... }}'. + This construct is ambiguous as part of a computation expression. Nested expressions may be written using 'let _ = (...)' and nested computations using 'let! res = builder {{ ... }}'. + + + + This construct is ambiguous as part of a sequence expression. Nested expressions may be written using 'let _ = (...)' and nested sequences using 'yield! seq {{... }}'. + This construct is ambiguous as part of a sequence expression. Nested expressions may be written using 'let _ = (...)' and nested sequences using 'yield! seq {{... }}'. + + + + 'do!' cannot be used within sequence expressions + 'do!' cannot be used within sequence expressions + + + + The use of 'let! x = coll' in sequence expressions is not permitted. Use 'for x in coll' instead. + The use of 'let! x = coll' in sequence expressions is not permitted. Use 'for x in coll' instead. + + + + 'try'/'with' cannot be used within sequence expressions + 'try'/'with' cannot be used within sequence expressions + + + + In sequence expressions, multiple results are generated using 'yield!' + In sequence expressions, multiple results are generated using 'yield!' + + + + Invalid assignment + Invalid assignment + + + + Invalid use of a type name + Invalid use of a type name + + + + This type has no accessible object constructors + This type has no accessible object constructors + + + + Invalid use of an interface type + Invalid use of an interface type + + + + Invalid use of a delegate constructor. Use the syntax 'new Type(args)' or just 'Type(args)'. + Invalid use of a delegate constructor. Use the syntax 'new Type(args)' or just 'Type(args)'. + + + + Property '{0}' is not static + Property '{0}' is not static + + + + Property '{0}' is not readable + Property '{0}' is not readable + + + + This lookup cannot be used here + This lookup cannot be used here + + + + Property '{0}' is static + Property '{0}' is static + + + + Property '{0}' cannot be set + Property '{0}' cannot be set + + + + Constructors must be applied to arguments and cannot be used as first-class values. If necessary use an anonymous function '(fun arg1 ... argN -> new Type(arg1,...,argN))'. + Constructors must be applied to arguments and cannot be used as first-class values. If necessary use an anonymous function '(fun arg1 ... argN -> new Type(arg1,...,argN))'. + + + + The syntax 'expr.id' may only be used with record labels, properties and fields + The syntax 'expr.id' may only be used with record labels, properties and fields + + + + Event '{0}' is static + Event '{0}' is static + + + + Event '{0}' is not static + Event '{0}' is not static + + + + The named argument '{0}' did not match any argument or mutable property + The named argument '{0}' did not match any argument or mutable property + + + + One or more of the overloads of this method has curried arguments. Consider redesigning these members to take arguments in tupled form. + One or more of the overloads of this method has curried arguments. Consider redesigning these members to take arguments in tupled form. + + + + The unnamed arguments do not form a prefix of the arguments of the method called + The unnamed arguments do not form a prefix of the arguments of the method called + + + + Static optimization conditionals are only for use within the F# library + Static optimization conditionals are only for use within the F# library + + + + The corresponding formal argument is not optional + The corresponding formal argument is not optional + + + + Invalid optional assignment to a property or field + Invalid optional assignment to a property or field + + + + A delegate constructor must be passed a single function value + A delegate constructor must be passed a single function value + + + + A binding cannot be marked both 'use' and 'rec' + A binding cannot be marked both 'use' and 'rec' + + + + The 'VolatileField' attribute may only be used on 'let' bindings in classes + The 'VolatileField' attribute may only be used on 'let' bindings in classes + + + + Attributes are not permitted on 'let' bindings in expressions + Attributes are not permitted on 'let' bindings in expressions + + + + The 'DefaultValue' attribute may only be used on 'val' declarations + The 'DefaultValue' attribute may only be used on 'val' declarations + + + + The 'ConditionalAttribute' attribute may only be used on members + The 'ConditionalAttribute' attribute may only be used on members + + + + This is not a valid name for an active pattern + This is not a valid name for an active pattern + + + + The 'EntryPointAttribute' attribute may only be used on function definitions in modules + The 'EntryPointAttribute' attribute may only be used on function definitions in modules + + + + Mutable values cannot be marked 'inline' + Mutable values cannot be marked 'inline' + + + + Mutable values cannot have generic parameters + Mutable values cannot have generic parameters + + + + Mutable function values should be written 'let mutable f = (fun args -> ...)' + Mutable function values should be written 'let mutable f = (fun args -> ...)' + + + + Only functions may be marked 'inline' + Only functions may be marked 'inline' + + + + A literal value cannot be given the [<ThreadStatic>] or [<ContextStatic>] attributes + A literal value cannot be given the [<ThreadStatic>] or [<ContextStatic>] attributes + + + + A literal value cannot be marked 'mutable' + A literal value cannot be marked 'mutable' + + + + A literal value cannot be marked 'inline' + A literal value cannot be marked 'inline' + + + + Literal values cannot have generic parameters + Literal values cannot have generic parameters + + + + This is not a valid constant expression + This is not a valid constant expression + + + + This type is not accessible from this code location + This type is not accessible from this code location + + + + Unexpected condition in imported assembly: failed to decode AttributeUsage attribute + Unexpected condition in imported assembly: failed to decode AttributeUsage attribute + + + + Unrecognized attribute target. Valid attribute targets are 'assembly', 'module', 'type', 'method', 'property', 'return', 'param', 'field', 'event', 'constructor'. + Unrecognized attribute target. Valid attribute targets are 'assembly', 'module', 'type', 'method', 'property', 'return', 'param', 'field', 'event', 'constructor'. + + + + This attribute is not valid for use on this language element. Assembly attributes should be attached to a 'do ()' declaration, if necessary within an F# module. + This attribute is not valid for use on this language element. Assembly attributes should be attached to a 'do ()' declaration, if necessary within an F# module. + + + + This attribute is not valid for use on this language element + This attribute is not valid for use on this language element + + + + Optional arguments cannot be used in custom attributes + Optional arguments cannot be used in custom attributes + + + + This property cannot be set + This property cannot be set + + + + This property or field was not found on this custom attribute type + This property or field was not found on this custom attribute type + + + + A custom attribute must be a reference type + A custom attribute must be a reference type + + + + The number of args for a custom attribute does not match the expected number of args for the attribute constructor + The number of args for a custom attribute does not match the expected number of args for the attribute constructor + + + + A custom attribute must invoke an object constructor + A custom attribute must invoke an object constructor + + + + Attribute expressions must be calls to object constructors + Attribute expressions must be calls to object constructors + + + + This attribute cannot be used in this version of F# + This attribute cannot be used in this version of F# + + + + Invalid inline specification + Invalid inline specification + + + + 'use' bindings must be of the form 'use <var> = <expr>' + 'use' bindings must be of the form 'use <var> = <expr>' + + + + Abstract members are not permitted in an augmentation - they must be defined as part of the type itself + Abstract members are not permitted in an augmentation - they must be defined as part of the type itself + + + + Method overrides and interface implementations are not permitted here + Method overrides and interface implementations are not permitted here + + + + No abstract or interface member was found that corresponds to this override + No abstract or interface member was found that corresponds to this override + + + + This override takes a different number of arguments to the corresponding abstract member. The following abstract members were found:{0} + This override takes a different number of arguments to the corresponding abstract member. The following abstract members were found:{0} + + + + This method already has a default implementation + This method already has a default implementation + + + + The method implemented by this default is ambiguous + The method implemented by this default is ambiguous + + + + No abstract property was found that corresponds to this override + No abstract property was found that corresponds to this override + + + + This property overrides or implements an abstract property but the abstract property doesn't have a corresponding {0} + This property overrides or implements an abstract property but the abstract property doesn't have a corresponding {0} + + + + Invalid signature for set member + Invalid signature for set member + + + + This new member hides the abstract member '{0}'. Rename the member or use 'override' instead. + This new member hides the abstract member '{0}'. Rename the member or use 'override' instead. + + + + This new member hides the abstract member '{0}' once tuples, functions, units of measure and/or provided types are erased. Rename the member or use 'override' instead. + This new member hides the abstract member '{0}' once tuples, functions, units of measure and/or provided types are erased. Rename the member or use 'override' instead. + + + + Interfaces cannot contain definitions of static initializers + Interfaces cannot contain definitions of static initializers + + + + Interfaces cannot contain definitions of object constructors + Interfaces cannot contain definitions of object constructors + + + + Interfaces cannot contain definitions of member overrides + Interfaces cannot contain definitions of member overrides + + + + Interfaces cannot contain definitions of concrete members. You may need to define a constructor on your type to indicate that the type is a class. + Interfaces cannot contain definitions of concrete members. You may need to define a constructor on your type to indicate that the type is a class. + + + + Constructors cannot be specified in exception augmentations + Constructors cannot be specified in exception augmentations + + + + Structs cannot have an object constructor with no arguments. This is a restriction imposed on all CLI languages as structs automatically support a default constructor. + Structs cannot have an object constructor with no arguments. This is a restriction imposed on all CLI languages as structs automatically support a default constructor. + + + + Constructors cannot be defined for this type + Constructors cannot be defined for this type + + + + Recursive bindings that include member specifications can only occur as a direct augmentation of a type + Recursive bindings that include member specifications can only occur as a direct augmentation of a type + + + + Only simple variable patterns can be bound in 'let rec' constructs + Only simple variable patterns can be bound in 'let rec' constructs + + + + Only record fields and simple, non-recursive 'let' bindings may be marked mutable + Only record fields and simple, non-recursive 'let' bindings may be marked mutable + + + + This member is not sufficiently generic + This member is not sufficiently generic + + + + A declaration may only be the [<Literal>] attribute if a constant value is also given, e.g. 'val x : int = 1' + A declaration may only be the [<Literal>] attribute if a constant value is also given, e.g. 'val x : int = 1' + + + + A declaration may only be given a value in a signature if the declaration has the [<Literal>] attribute + A declaration may only be given a value in a signature if the declaration has the [<Literal>] attribute + + + + Thread-static and context-static variables must be static and given the [<DefaultValue>] attribute to indicate that the value is initialized to the default value on each new thread + Thread-static and context-static variables must be static and given the [<DefaultValue>] attribute to indicate that the value is initialized to the default value on each new thread + + + + Volatile fields must be marked 'mutable' and cannot be thread-static + Volatile fields must be marked 'mutable' and cannot be thread-static + + + + Uninitialized 'val' fields must be mutable and marked with the '[<DefaultValue>]' attribute. Consider using a 'let' binding instead of a 'val' field. + Uninitialized 'val' fields must be mutable and marked with the '[<DefaultValue>]' attribute. Consider using a 'let' binding instead of a 'val' field. + + + + Static 'val' fields in types must be mutable, private and marked with the '[<DefaultValue>]' attribute. They are initialized to the 'null' or 'zero' value for their type. Consider also using a 'static let mutable' binding in a class type. + Static 'val' fields in types must be mutable, private and marked with the '[<DefaultValue>]' attribute. They are initialized to the 'null' or 'zero' value for their type. Consider also using a 'static let mutable' binding in a class type. + + + + This field requires a name + This field requires a name + + + + Invalid namespace, module, type or union case name + Invalid namespace, module, type or union case name + + + + Explicit type declarations for constructors must be of the form 'ty1 * ... * tyN -> resTy'. Parentheses may be required around 'resTy' + Explicit type declarations for constructors must be of the form 'ty1 * ... * tyN -> resTy'. Parentheses may be required around 'resTy' + + + + Return types of union cases must be identical to the type being defined, up to abbreviations + Return types of union cases must be identical to the type being defined, up to abbreviations + + + + This is not a valid value for an enumeration literal + This is not a valid value for an enumeration literal + + + + The type '{0}' is not an interface type + The type '{0}' is not an interface type + + + + Duplicate specification of an interface + Duplicate specification of an interface + + + + A field/val declaration is not permitted here + A field/val declaration is not permitted here + + + + A inheritance declaration is not permitted here + A inheritance declaration is not permitted here + + + + This declaration opens the module '{0}', which is marked as 'RequireQualifiedAccess'. Adjust your code to use qualified references to the elements of the module instead, e.g. 'List.map' instead of 'map'. This change will ensure that your code is robust as new constructs are added to libraries. + This declaration opens the module '{0}', which is marked as 'RequireQualifiedAccess'. Adjust your code to use qualified references to the elements of the module instead, e.g. 'List.map' instead of 'map'. This change will ensure that your code is robust as new constructs are added to libraries. + + + + This declaration opens the namespace or module '{0}' through a partially qualified path. Adjust this code to use the full path of the namespace. This change will make your code more robust as new constructs are added to the F# and CLI libraries. + This declaration opens the namespace or module '{0}' through a partially qualified path. Adjust this code to use the full path of the namespace. This change will make your code more robust as new constructs are added to the F# and CLI libraries. + + + + Local class bindings cannot be marked inline. Consider lifting the definition out of the class or else do not mark it as inline. + Local class bindings cannot be marked inline. Consider lifting the definition out of the class or else do not mark it as inline. + + + + Type abbreviations cannot have members + Type abbreviations cannot have members + + + + As of F# 4.1, the accessibility of type abbreviations is checked at compile-time. Consider changing the accessibility of the type abbreviation. Ignoring this warning might lead to runtime errors. + As of F# 4.1, the accessibility of type abbreviations is checked at compile-time. Consider changing the accessibility of the type abbreviation. Ignoring this warning might lead to runtime errors. + + + + Enumerations cannot have members + Enumerations cannot have members + + + + Measure declarations may have only static members + Measure declarations may have only static members + + + + Structs cannot contain 'do' bindings because the default constructor for structs would not execute these bindings + Structs cannot contain 'do' bindings because the default constructor for structs would not execute these bindings + + + + Structs cannot contain value definitions because the default constructor for structs will not execute these bindings. Consider adding additional arguments to the primary constructor for the type. + Structs cannot contain value definitions because the default constructor for structs will not execute these bindings. Consider adding additional arguments to the primary constructor for the type. + + + + Static value definitions may only be used in types with a primary constructor. Consider adding arguments to the type definition, e.g. 'type X(args) = ...'. + Static value definitions may only be used in types with a primary constructor. Consider adding arguments to the type definition, e.g. 'type X(args) = ...'. + + + + Measure declarations may have only static members: constructors are not available + Measure declarations may have only static members: constructors are not available + + + + A member and a local class binding both have the name '{0}' + A member and a local class binding both have the name '{0}' + + + + Type abbreviations cannot have interface declarations + Type abbreviations cannot have interface declarations + + + + Enumerations cannot have interface declarations + Enumerations cannot have interface declarations + + + + This type is not an interface type + This type is not an interface type + + + + All implemented interfaces should be declared on the initial declaration of the type + All implemented interfaces should be declared on the initial declaration of the type + + + + A default implementation of this interface has already been added because the explicit implementation of the interface was not specified at the definition of the type + A default implementation of this interface has already been added because the explicit implementation of the interface was not specified at the definition of the type + + + + This member is not permitted in an interface implementation + This member is not permitted in an interface implementation + + + + This declaration element is not permitted in an augmentation + This declaration element is not permitted in an augmentation + + + + Types cannot contain nested type definitions + Types cannot contain nested type definitions + + + + type, exception or module + type, exception or module + + + + type or module + type or module + + + + The struct, record or union type '{0}' implements the interface 'System.IStructuralEquatable' explicitly. Apply the 'CustomEquality' attribute to the type. + The struct, record or union type '{0}' implements the interface 'System.IStructuralEquatable' explicitly. Apply the 'CustomEquality' attribute to the type. + + + + The struct, record or union type '{0}' implements the interface 'System.IEquatable<_>' explicitly. Apply the 'CustomEquality' attribute to the type and provide a consistent implementation of the non-generic override 'System.Object.Equals(obj)'. + The struct, record or union type '{0}' implements the interface 'System.IEquatable<_>' explicitly. Apply the 'CustomEquality' attribute to the type and provide a consistent implementation of the non-generic override 'System.Object.Equals(obj)'. + + + + Explicit type specifications cannot be used for exception constructors + Explicit type specifications cannot be used for exception constructors + + + + Exception abbreviations should not have argument lists + Exception abbreviations should not have argument lists + + + + Abbreviations for Common IL exceptions cannot take arguments + Abbreviations for Common IL exceptions cannot take arguments + + + + Exception abbreviations must refer to existing exceptions or F# types deriving from System.Exception + Exception abbreviations must refer to existing exceptions or F# types deriving from System.Exception + + + + Abbreviations for Common IL exception types must have a matching object constructor + Abbreviations for Common IL exception types must have a matching object constructor + + + + Not an exception + Not an exception + + + + Invalid module name + Invalid module name + + + + Invalid type extension + Invalid type extension + + + + The attributes of this type specify multiple kinds for the type + The attributes of this type specify multiple kinds for the type + + + + The kind of the type specified by its attributes does not match the kind implied by its definition + The kind of the type specified by its attributes does not match the kind implied by its definition + + + + Measure definitions cannot have type parameters + Measure definitions cannot have type parameters + + + + This type requires a definition + This type requires a definition + + + + This type abbreviation has one or more declared type parameters that do not appear in the type being abbreviated. Type abbreviations must use all declared type parameters in the type being abbreviated. Consider removing one or more type parameters, or use a concrete type definition that wraps an underlying type, such as 'type C<'a> = C of ...'. + This type abbreviation has one or more declared type parameters that do not appear in the type being abbreviated. Type abbreviations must use all declared type parameters in the type being abbreviated. Consider removing one or more type parameters, or use a concrete type definition that wraps an underlying type, such as 'type C<'a> = C of ...'. + + + + Structs, interfaces, enums and delegates cannot inherit from other types + Structs, interfaces, enums and delegates cannot inherit from other types + + + + Types cannot inherit from multiple concrete types + Types cannot inherit from multiple concrete types + + + + Records, union, abbreviations and struct types cannot have the 'AllowNullLiteral' attribute + Records, union, abbreviations and struct types cannot have the 'AllowNullLiteral' attribute + + + + Types with the 'AllowNullLiteral' attribute may only inherit from or implement types which also allow the use of the null literal + Types with the 'AllowNullLiteral' attribute may only inherit from or implement types which also allow the use of the null literal + + + + Generic types cannot be given the 'StructLayout' attribute + Generic types cannot be given the 'StructLayout' attribute + + + + Only structs and classes without primary constructors may be given the 'StructLayout' attribute + Only structs and classes without primary constructors may be given the 'StructLayout' attribute + + + + The representation of this type is hidden by the signature. It must be given an attribute such as [<Sealed>], [<Class>] or [<Interface>] to indicate the characteristics of the type. + The representation of this type is hidden by the signature. It must be given an attribute such as [<Sealed>], [<Class>] or [<Interface>] to indicate the characteristics of the type. + + + + Only classes may be given the 'AbstractClass' attribute + Only classes may be given the 'AbstractClass' attribute + + + + Only types representing units-of-measure may be given the 'Measure' attribute + Only types representing units-of-measure may be given the 'Measure' attribute + + + + Accessibility modifiers are not permitted on overrides or interface implementations + Accessibility modifiers are not permitted on overrides or interface implementations + + + + Discriminated union types are always sealed + Discriminated union types are always sealed + + + + Record types are always sealed + Record types are always sealed + + + + Assembly code types are always sealed + Assembly code types are always sealed + + + + Struct types are always sealed + Struct types are always sealed + + + + Delegate types are always sealed + Delegate types are always sealed + + + + Enum types are always sealed + Enum types are always sealed + + + + Interface types and delegate types cannot contain fields + Interface types and delegate types cannot contain fields + + + + Abbreviated types cannot be given the 'Sealed' attribute + Abbreviated types cannot be given the 'Sealed' attribute + + + + Cannot inherit a sealed type + Cannot inherit a sealed type + + + + Cannot inherit from interface type. Use interface ... with instead. + Cannot inherit from interface type. Use interface ... with instead. + + + + Struct types cannot contain abstract members + Struct types cannot contain abstract members + + + + Interface types cannot be sealed + Interface types cannot be sealed + + + + Delegate specifications must be of the form 'typ -> typ' + Delegate specifications must be of the form 'typ -> typ' + + + + Delegate specifications must not be curried types. Use 'typ * ... * typ -> typ' for multi-argument delegates, and 'typ -> (typ -> typ)' for delegates returning function values. + Delegate specifications must not be curried types. Use 'typ * ... * typ -> typ' for multi-argument delegates, and 'typ -> (typ -> typ)' for delegates returning function values. + + + + Literal enumerations must have type int, uint, int16, uint16, int64, uint64, byte, sbyte or char + Literal enumerations must have type int, uint, int16, uint16, int64, uint64, byte, sbyte or char + + + + This type definition involves an immediate cyclic reference through an abbreviation + This type definition involves an immediate cyclic reference through an abbreviation + + + + This type definition involves an immediate cyclic reference through a struct field or inheritance relation + This type definition involves an immediate cyclic reference through a struct field or inheritance relation + + + + The syntax 'type X with ...' is reserved for augmentations. Types whose representations are hidden but which have members are now declared in signatures using 'type X = ...'. You may also need to add the '[<Sealed>] attribute to the type definition in the signature + The syntax 'type X with ...' is reserved for augmentations. Types whose representations are hidden but which have members are now declared in signatures using 'type X = ...'. You may also need to add the '[<Sealed>] attribute to the type definition in the signature + + + + Members that extend interface, delegate or enum types must be placed in a module separate to the definition of the type. This module must either have the AutoOpen attribute or be opened explicitly by client code to bring the extension members into scope. + Members that extend interface, delegate or enum types must be placed in a module separate to the definition of the type. This module must either have the AutoOpen attribute or be opened explicitly by client code to bring the extension members into scope. + + + + One or more of the declared type parameters for this type extension have a missing or wrong type constraint not matching the original type constraints on '{0}' + One or more of the declared type parameters for this type extension have a missing or wrong type constraint not matching the original type constraints on '{0}' + + + + Type definitions may only have one 'inherit' specification and it must be the first declaration + Type definitions may only have one 'inherit' specification and it must be the first declaration + + + + 'let' and 'do' bindings must come before member and interface definitions in type definitions + 'let' and 'do' bindings must come before member and interface definitions in type definitions + + + + This 'inherit' declaration specifies the inherited type but no arguments. Consider supplying arguments, e.g. 'inherit BaseType(args)'. + This 'inherit' declaration specifies the inherited type but no arguments. Consider supplying arguments, e.g. 'inherit BaseType(args)'. + + + + This 'inherit' declaration has arguments, but is not in a type with a primary constructor. Consider adding arguments to your type definition, e.g. 'type X(args) = ...'. + This 'inherit' declaration has arguments, but is not in a type with a primary constructor. Consider adding arguments to your type definition, e.g. 'type X(args) = ...'. + + + + This definition may only be used in a type with a primary constructor. Consider adding arguments to your type definition, e.g. 'type X(args) = ...'. + This definition may only be used in a type with a primary constructor. Consider adding arguments to your type definition, e.g. 'type X(args) = ...'. + + + + Type abbreviations cannot have augmentations + Type abbreviations cannot have augmentations + + + + The path '{0}' is a namespace. A module abbreviation may not abbreviate a namespace. + The path '{0}' is a namespace. A module abbreviation may not abbreviate a namespace. + + + + The type '{0}' is used in an invalid way. A value prior to '{1}' has an inferred type involving '{2}', which is an invalid forward reference. + The type '{0}' is used in an invalid way. A value prior to '{1}' has an inferred type involving '{2}', which is an invalid forward reference. + + + + The member '{0}' is used in an invalid way. A use of '{1}' has been inferred prior to the definition of '{2}', which is an invalid forward reference. + The member '{0}' is used in an invalid way. A use of '{1}' has been inferred prior to the definition of '{2}', which is an invalid forward reference. + + + + The attribute 'AutoOpen(\"{0}\")' in the assembly '{1}' did not refer to a valid module or namespace in that assembly and has been ignored + The attribute 'AutoOpen(\"{0}\")' in the assembly '{1}' did not refer to a valid module or namespace in that assembly and has been ignored + + + + Undefined value '{0}' + Undefined value '{0}' + + + + Label {0} not found + Label {0} not found + + + + Incorrect number of type arguments to local call + Incorrect number of type arguments to local call + + + + Dynamic invocation of {0} is not supported + Dynamic invocation of {0} is not supported + + + + Taking the address of a literal field is invalid + Taking the address of a literal field is invalid + + + + This operation involves taking the address of a value '{0}' represented using a local variable or other special representation. This is invalid. + This operation involves taking the address of a value '{0}' represented using a local variable or other special representation. This is invalid. + + + + Custom marshallers cannot be specified in F# code. Consider using a C# helper function. + Custom marshallers cannot be specified in F# code. Consider using a C# helper function. + + + + The MarshalAs attribute could not be decoded + The MarshalAs attribute could not be decoded + + + + The signature for this external function contains type parameters. Constrain the argument and return types to indicate the types of the corresponding C function. + The signature for this external function contains type parameters. Constrain the argument and return types to indicate the types of the corresponding C function. + + + + The DllImport attribute could not be decoded + The DllImport attribute could not be decoded + + + + Literal fields cannot be set + Literal fields cannot be set + + + + GenSetStorage: {0} was represented as a static method but was not an appropriate lambda expression + GenSetStorage: {0} was represented as a static method but was not an appropriate lambda expression + + + + Mutable variables cannot escape their method + Mutable variables cannot escape their method + + + + Compiler error: unexpected unrealized value + Compiler error: unexpected unrealized value + + + + Main module of program is empty: nothing will happen when it is run + Main module of program is empty: nothing will happen when it is run + + + + This type cannot be used for a literal field + This type cannot be used for a literal field + + + + Unexpected GetSet annotation on a property + Unexpected GetSet annotation on a property + + + + The FieldOffset attribute could not be decoded + The FieldOffset attribute could not be decoded + + + + The StructLayout attribute could not be decoded + The StructLayout attribute could not be decoded + + + + The DefaultAugmentation attribute could not be decoded + The DefaultAugmentation attribute could not be decoded + + + + Reflected definitions cannot contain uses of the prefix splice operator '%' + Reflected definitions cannot contain uses of the prefix splice operator '%' + + + + Problem with codepage '{0}': {1} + Problem with codepage '{0}': {1} + + + + Copyright (c) Microsoft Corporation. All Rights Reserved. + Copyright (c) Microsoft Corporation. All Rights Reserved. + + + + Freely distributed under the MIT Open Source License. https://github.com/Microsoft/visualfsharp/blob/master/License.txt + Freely distributed under the MIT Open Source License. https://github.com/Microsoft/visualfsharp/blob/master/License.txt + + + + Name of the output file (Short form: -o) + Name of the output file (Short form: -o) + + + + Build a console executable + Build a console executable + + + + Build a Windows executable + Build a Windows executable + + + + Build a library (Short form: -a) + Build a library (Short form: -a) + + + + Build a module that can be added to another assembly + Build a module that can be added to another assembly + + + + Delay-sign the assembly using only the public portion of the strong name key + Delay-sign the assembly using only the public portion of the strong name key + + + + Public-sign the assembly using only the public portion of the strong name key, and mark the assembly as signed + Public-sign the assembly using only the public portion of the strong name key, and mark the assembly as signed + + + + Write the xmldoc of the assembly to the given file + Write the xmldoc of the assembly to the given file + + + + Specify a strong name key file + Specify a strong name key file + + + + Specify a strong name key container + Specify a strong name key container + + + + Limit which platforms this code can run on: x86, Itanium, x64, anycpu32bitpreferred, or anycpu. The default is anycpu. + Limit which platforms this code can run on: x86, Itanium, x64, anycpu32bitpreferred, or anycpu. The default is anycpu. + + + + Only include optimization information essential for implementing inlined constructs. Inhibits cross-module inlining but improves binary compatibility. + Only include optimization information essential for implementing inlined constructs. Inhibits cross-module inlining but improves binary compatibility. + + + + Don't add a resource to the generated assembly containing F#-specific metadata + Don't add a resource to the generated assembly containing F#-specific metadata + + + + Print the inferred interface of the assembly to a file + Print the inferred interface of the assembly to a file + + + + Reference an assembly (Short form: -r) + Reference an assembly (Short form: -r) + + + + Specify a Win32 resource file (.res) + Specify a Win32 resource file (.res) + + + + Specify a Win32 manifest file + Specify a Win32 manifest file + + + + Do not include the default Win32 manifest + Do not include the default Win32 manifest + + + + Embed all source files in the portable PDB file + Embed all source files in the portable PDB file + + + + Embed specific source files in the portable PDB file + Embed specific source files in the portable PDB file + + + + Source link information file to embed in the portable PDB file + Source link information file to embed in the portable PDB file + + + + --embed switch only supported when emitting a Portable PDB (--debug:portable or --debug:embedded) + --embed switch only supported when emitting a Portable PDB (--debug:portable or --debug:embedded) + + + + --sourcelink switch only supported when emitting a Portable PDB (--debug:portable or --debug:embedded) + --sourcelink switch only supported when emitting a Portable PDB (--debug:portable or --debug:embedded) + + + + Source file is too large to embed in a portable PDB + Source file is too large to embed in a portable PDB + + + + Embed the specified managed resource + Embed the specified managed resource + + + + Link the specified resource to this assembly where the resinfo format is <file>[,<string name>[,public|private]] + Link the specified resource to this assembly where the resinfo format is <file>[,<string name>[,public|private]] + + + + Emit debug information (Short form: -g) + Emit debug information (Short form: -g) + + + + Specify debugging type: full, portable, embedded, pdbonly. ('{0}' is the default if no debuggging type specified and enables attaching a debugger to a running program, 'portable' is a cross-platform format, 'embedded' is a cross-platform format embedded into the output file). + Specify debugging type: full, portable, embedded, pdbonly. ('{0}' is the default if no debuggging type specified and enables attaching a debugger to a running program, 'portable' is a cross-platform format, 'embedded' is a cross-platform format embedded into the output file). + + + + Enable optimizations (Short form: -O) + Enable optimizations (Short form: -O) + + + + Enable or disable tailcalls + Enable or disable tailcalls + + + + Produce a deterministic assembly (including module version GUID and timestamp) + Produce a deterministic assembly (including module version GUID and timestamp) + + + + Enable or disable cross-module optimizations + Enable or disable cross-module optimizations + + + + Report all warnings as errors + Report all warnings as errors + + + + Report specific warnings as errors + Report specific warnings as errors + + + + Set a warning level (0-5) + Set a warning level (0-5) + + + + Disable specific warning messages + Disable specific warning messages + + + + Enable specific warnings that may be off by default + Enable specific warnings that may be off by default + + + + Generate overflow checks + Generate overflow checks + + + + Define conditional compilation symbols (Short form: -d) + Define conditional compilation symbols (Short form: -d) + + + + Ignore ML compatibility warnings + Ignore ML compatibility warnings + + + + + Display this usage message (Short form: -?) + Display this usage message (Short form: -?) + + + + Read response file for more options + Read response file for more options + + + + Specify the codepage used to read source files + Specify the codepage used to read source files + + + + Output messages in UTF-8 encoding + Output messages in UTF-8 encoding + + + + Output messages with fully qualified paths + Output messages with fully qualified paths + + + + Specify a directory for the include path which is used to resolve source files and assemblies (Short form: -I) + Specify a directory for the include path which is used to resolve source files and assemblies (Short form: -I) + + + + Base address for the library to be built + Base address for the library to be built + + + + Do not reference the default CLI assemblies by default + Do not reference the default CLI assemblies by default + + + + Statically link the F# library and all referenced DLLs that depend on it into the assembly being generated + Statically link the F# library and all referenced DLLs that depend on it into the assembly being generated + + + + Statically link the given assembly and all referenced DLLs that depend on this assembly. Use an assembly name e.g. mylib, not a DLL name. + Statically link the given assembly and all referenced DLLs that depend on this assembly. Use an assembly name e.g. mylib, not a DLL name. + + + + Use a resident background compilation service to improve compiler startup times. + Use a resident background compilation service to improve compiler startup times. + + + + Name the output debug file + Name the output debug file + + + + Resolve assembly references using directory-based rules rather than MSBuild resolution + Resolve assembly references using directory-based rules rather than MSBuild resolution + + + + Unrecognized target '{0}', expected 'exe', 'winexe', 'library' or 'module' + Unrecognized target '{0}', expected 'exe', 'winexe', 'library' or 'module' + + + + Unrecognized debug type '{0}', expected 'pdbonly' or 'full' + Unrecognized debug type '{0}', expected 'pdbonly' or 'full' + + + + Invalid warning level '{0}' + Invalid warning level '{0}' + + + + Short form of '{0}' + Short form of '{0}' + + + + The command-line option '--cliroot' has been deprecated. Use an explicit reference to a specific copy of mscorlib.dll instead. + The command-line option '--cliroot' has been deprecated. Use an explicit reference to a specific copy of mscorlib.dll instead. + + + + Use to override where the compiler looks for mscorlib.dll and framework components + Use to override where the compiler looks for mscorlib.dll and framework components + + + + - OUTPUT FILES - + - OUTPUT FILES - + + + + - INPUT FILES - + - INPUT FILES - + + + + - RESOURCES - + - RESOURCES - + + + + - CODE GENERATION - + - CODE GENERATION - + + + + - ADVANCED - + - ADVANCED - + + + + - MISCELLANEOUS - + - MISCELLANEOUS - + + + + - LANGUAGE - + - LANGUAGE - + + + + - ERRORS AND WARNINGS - + - ERRORS AND WARNINGS - + + + + Unknown --test argument: '{0}' + Unknown --test argument: '{0}' + + + + Unrecognized platform '{0}', valid values are 'x86', 'x64', 'Itanium', 'anycpu32bitpreferred', and 'anycpu' + Unrecognized platform '{0}', valid values are 'x86', 'x64', 'Itanium', 'anycpu32bitpreferred', and 'anycpu' + + + + The command-line option '{0}' is for test purposes only + The command-line option '{0}' is for test purposes only + + + + The command-line option '{0}' has been deprecated + The command-line option '{0}' has been deprecated + + + + The command-line option '{0}' has been deprecated. Use '{1}' instead. + The command-line option '{0}' has been deprecated. Use '{1}' instead. + + + + The command-line option '{0}' has been deprecated. HTML document generation is now part of the F# Power Pack, via the tool FsHtmlDoc.exe. + The command-line option '{0}' has been deprecated. HTML document generation is now part of the F# Power Pack, via the tool FsHtmlDoc.exe. + + + + Output warning and error messages in color + Output warning and error messages in color + + + + Enable high-entropy ASLR + Enable high-entropy ASLR + + + + Specify subsystem version of this assembly + Specify subsystem version of this assembly + + + + Specify target framework profile of this assembly. Valid values are mscorlib, netcore or netstandard. Default - mscorlib + Specify target framework profile of this assembly. Valid values are mscorlib, netcore or netstandard. Default - mscorlib + + + + Emit debug information in quotations + Emit debug information in quotations + + + + Specify the preferred output language culture name (e.g. es-ES, ja-JP) + Specify the preferred output language culture name (e.g. es-ES, ja-JP) + + + + Don't copy FSharp.Core.dll along the produced binaries + Don't copy FSharp.Core.dll along the produced binaries + + + + Invalid version '{0}' for '--subsystemversion'. The version must be 4.00 or greater. + Invalid version '{0}' for '--subsystemversion'. The version must be 4.00 or greater. + + + + Invalid value '{0}' for '--targetprofile', valid values are 'mscorlib', 'netcore' or 'netstandard'. + Invalid value '{0}' for '--targetprofile', valid values are 'mscorlib', 'netcore' or 'netstandard'. + + + + Full name + Full name + + + + and {0} other overloads + and {0} other overloads + + + + union case + union case + + + + active pattern result + active pattern result + + + + active recognizer + active recognizer + + + + field + field + + + + event + event + + + + property + property + + + + extension + extension + + + + custom operation + custom operation + + + + argument + argument + + + + patvar + patvar + + + + namespace + namespace + + + + module + module + + + + namespace/module + namespace/module + + + + from {0} + from {0} + + + + also from {0} + also from {0} + + + + generated property + generated property + + + + generated type + generated type + + + + Found by AssemblyFolders registry key + Found by AssemblyFolders registry key + + + + Found by AssemblyFoldersEx registry key + Found by AssemblyFoldersEx registry key + + + + .NET Framework + .NET Framework + + + + Global Assembly Cache + Global Assembly Cache + + + + Recursive class hierarchy in type '{0}' + Recursive class hierarchy in type '{0}' + + + + Invalid recursive reference to an abstract slot + Invalid recursive reference to an abstract slot + + + + The event '{0}' has a non-standard type. If this event is declared in another CLI language, you may need to access this event using the explicit {1} and {2} methods for the event. If this event is declared in F#, make the type of the event an instantiation of either 'IDelegateEvent<_>' or 'IEvent<_,_>'. + The event '{0}' has a non-standard type. If this event is declared in another CLI language, you may need to access this event using the explicit {1} and {2} methods for the event. If this event is declared in F#, make the type of the event an instantiation of either 'IDelegateEvent<_>' or 'IEvent<_,_>'. + + + + The type '{0}' is not accessible from this code location + The type '{0}' is not accessible from this code location + + + + The union cases or fields of the type '{0}' are not accessible from this code location + The union cases or fields of the type '{0}' are not accessible from this code location + + + + The value '{0}' is not accessible from this code location + The value '{0}' is not accessible from this code location + + + + The union case '{0}' is not accessible from this code location + The union case '{0}' is not accessible from this code location + + + + The record, struct or class field '{0}' is not accessible from this code location + The record, struct or class field '{0}' is not accessible from this code location + + + + The struct or class field '{0}' is not accessible from this code location + The struct or class field '{0}' is not accessible from this code location + + + + This construct is experimental + This construct is experimental + + + + No Invoke methods found for delegate type + No Invoke methods found for delegate type + + + + More than one Invoke method found for delegate type + More than one Invoke method found for delegate type + + + + Delegates are not allowed to have curried signatures + Delegates are not allowed to have curried signatures + + + + Unexpected Expr.TyChoose + Unexpected Expr.TyChoose + + + + Note: Lambda-lifting optimizations have not been applied because of the use of this local constrained generic function as a first class value. Adding type constraints may resolve this condition. + Note: Lambda-lifting optimizations have not been applied because of the use of this local constrained generic function as a first class value. Adding type constraints may resolve this condition. + + + + Identifiers containing '@' are reserved for use in F# code generation + Identifiers containing '@' are reserved for use in F# code generation + + + + The identifier '{0}' is reserved for future use by F# + The identifier '{0}' is reserved for future use by F# + + + + Missing variable '{0}' + Missing variable '{0}' + + + + Partial active patterns may only generate one result + Partial active patterns may only generate one result + + + + The type '{0}' is required here and is unavailable. You must add a reference to assembly '{1}'. + The type '{0}' is required here and is unavailable. You must add a reference to assembly '{1}'. + + + + A reference to the type '{0}' in assembly '{1}' was found, but the type could not be found in that assembly + A reference to the type '{0}' in assembly '{1}' was found, but the type could not be found in that assembly + + + + Internal error or badly formed metadata: not enough type parameters were in scope while importing + Internal error or badly formed metadata: not enough type parameters were in scope while importing + + + + A reference to the DLL {0} is required by assembly {1}. The imported type {2} is located in the first assembly and could not be resolved. + A reference to the DLL {0} is required by assembly {1}. The imported type {2} is located in the first assembly and could not be resolved. + + + + An imported assembly uses the type '{0}' but that type is not public + An imported assembly uses the type '{0}' but that type is not public + + + + The value '{0}' was marked inline but its implementation makes use of an internal or private function which is not sufficiently accessible + The value '{0}' was marked inline but its implementation makes use of an internal or private function which is not sufficiently accessible + + + + The value '{0}' was marked inline but was not bound in the optimization environment + The value '{0}' was marked inline but was not bound in the optimization environment + + + + Local value {0} not found during optimization + Local value {0} not found during optimization + + + + A value marked as 'inline' has an unexpected value + A value marked as 'inline' has an unexpected value + + + + A value marked as 'inline' could not be inlined + A value marked as 'inline' could not be inlined + + + + Failed to inline the value '{0}' marked 'inline', perhaps because a recursive value was marked 'inline' + Failed to inline the value '{0}' marked 'inline', perhaps because a recursive value was marked 'inline' + + + + Recursive ValValue {0} + Recursive ValValue {0} + + + + The indentation of this 'in' token is incorrect with respect to the corresponding 'let' + The indentation of this 'in' token is incorrect with respect to the corresponding 'let' + + + + Possible incorrect indentation: this token is offside of context started at position {0}. Try indenting this token further or using standard formatting conventions. + Possible incorrect indentation: this token is offside of context started at position {0}. Try indenting this token further or using standard formatting conventions. + + + + The '|' tokens separating rules of this pattern match are misaligned by one column. Consider realigning your code or using further indentation. + The '|' tokens separating rules of this pattern match are misaligned by one column. Consider realigning your code or using further indentation. + + + + Invalid module/expression/type + Invalid module/expression/type + + + + Multiple types exist called '{0}', taking different numbers of generic parameters. Provide a type instantiation to disambiguate the type resolution, e.g. '{1}'. + Multiple types exist called '{0}', taking different numbers of generic parameters. Provide a type instantiation to disambiguate the type resolution, e.g. '{1}'. + + + + The instantiation of the generic type '{0}' is missing and can't be inferred from the arguments or return type of this member. Consider providing a type instantiation when accessing this type, e.g. '{1}'. + The instantiation of the generic type '{0}' is missing and can't be inferred from the arguments or return type of this member. Consider providing a type instantiation when accessing this type, e.g. '{1}'. + + + + 'global' may only be used as the first name in a qualified path + 'global' may only be used as the first name in a qualified path + + + + This is not a constructor or literal, or a constructor is being used incorrectly + This is not a constructor or literal, or a constructor is being used incorrectly + + + + Unexpected empty long identifier + Unexpected empty long identifier + + + + The record type '{0}' does not contain a label '{1}'. + The record type '{0}' does not contain a label '{1}'. + + + + Invalid field label + Invalid field label + + + + Invalid expression '{0}' + Invalid expression '{0}' + + + + No constructors are available for the type '{0}' + No constructors are available for the type '{0}' + + + + The union type for union case '{0}' was defined with the RequireQualifiedAccessAttribute. Include the name of the union type ('{1}') in the name you are using. + The union type for union case '{0}' was defined with the RequireQualifiedAccessAttribute. Include the name of the union type ('{1}') in the name you are using. + + + + The record type for the record field '{0}' was defined with the RequireQualifiedAccessAttribute. Include the name of the record type ('{1}') in the name you are using. + The record type for the record field '{0}' was defined with the RequireQualifiedAccessAttribute. Include the name of the record type ('{1}') in the name you are using. + + + + Unexpected error creating debug information file '{0}' + Unexpected error creating debug information file '{0}' + + + + This number is outside the allowable range for this integer type + This number is outside the allowable range for this integer type + + + + '{0}' is not permitted as a character in operator names and is reserved for future use + '{0}' is not permitted as a character in operator names and is reserved for future use + + + + Unexpected character '{0}' + Unexpected character '{0}' + + + + This byte array literal contains characters that do not encode as a single byte + This byte array literal contains characters that do not encode as a single byte + + + + Identifiers followed by '{0}' are reserved for future use + Identifiers followed by '{0}' are reserved for future use + + + + This number is outside the allowable range for 8-bit signed integers + This number is outside the allowable range for 8-bit signed integers + + + + This number is outside the allowable range for hexadecimal 8-bit signed integers + This number is outside the allowable range for hexadecimal 8-bit signed integers + + + + This number is outside the allowable range for 8-bit unsigned integers + This number is outside the allowable range for 8-bit unsigned integers + + + + This number is outside the allowable range for 16-bit signed integers + This number is outside the allowable range for 16-bit signed integers + + + + This number is outside the allowable range for 16-bit unsigned integers + This number is outside the allowable range for 16-bit unsigned integers + + + + This number is outside the allowable range for 32-bit signed integers + This number is outside the allowable range for 32-bit signed integers + + + + This number is outside the allowable range for 32-bit unsigned integers + This number is outside the allowable range for 32-bit unsigned integers + + + + This number is outside the allowable range for 64-bit signed integers + This number is outside the allowable range for 64-bit signed integers + + + + This number is outside the allowable range for 64-bit unsigned integers + This number is outside the allowable range for 64-bit unsigned integers + + + + This number is outside the allowable range for signed native integers + This number is outside the allowable range for signed native integers + + + + This number is outside the allowable range for unsigned native integers + This number is outside the allowable range for unsigned native integers + + + + Invalid floating point number + Invalid floating point number + + + + This number is outside the allowable range for decimal literals + This number is outside the allowable range for decimal literals + + + + This number is outside the allowable range for 32-bit floats + This number is outside the allowable range for 32-bit floats + + + + This is not a valid numeric literal. Valid numeric literals include 1, 0x1, 0b0001 (int), 1u (uint32), 1L (int64), 1UL (uint64), 1s (int16), 1y (sbyte), 1uy (byte), 1.0 (float), 1.0f (float32), 1.0m (decimal), 1I (BigInteger). + This is not a valid numeric literal. Valid numeric literals include 1, 0x1, 0b0001 (int), 1u (uint32), 1L (int64), 1UL (uint64), 1s (int16), 1y (sbyte), 1uy (byte), 1.0 (float), 1.0f (float32), 1.0m (decimal), 1I (BigInteger). + + + + This is not a valid byte literal + This is not a valid byte literal + + + + This is not a valid character literal + This is not a valid character literal + + + + This Unicode encoding is only valid in string literals + This Unicode encoding is only valid in string literals + + + + This token is reserved for future use + This token is reserved for future use + + + + TABs are not allowed in F# code unless the #indent \"off\" option is used + TABs are not allowed in F# code unless the #indent \"off\" option is used + + + + Invalid line number: '{0}' + Invalid line number: '{0}' + + + + #if directive must appear as the first non-whitespace character on a line + #if directive must appear as the first non-whitespace character on a line + + + + #else has no matching #if + #else has no matching #if + + + + #endif required for #else + #endif required for #else + + + + #else directive must appear as the first non-whitespace character on a line + #else directive must appear as the first non-whitespace character on a line + + + + #endif has no matching #if + #endif has no matching #if + + + + #endif directive must appear as the first non-whitespace character on a line + #endif directive must appear as the first non-whitespace character on a line + + + + #if directive should be immediately followed by an identifier + #if directive should be immediately followed by an identifier + + + + Syntax error. Wrong nested #endif, unexpected tokens before it. + Syntax error. Wrong nested #endif, unexpected tokens before it. + + + + #! may only appear as the first line at the start of a file. + #! may only appear as the first line at the start of a file. + + + + Expected single line comment or end of line + Expected single line comment or end of line + + + + Infix operator member '{0}' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ... + Infix operator member '{0}' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ... + + + + Infix operator member '{0}' has {1} initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ... + Infix operator member '{0}' has {1} initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ... + + + + Infix operator member '{0}' has extra curried arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ... + Infix operator member '{0}' has extra curried arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ... + + + + All record, union and struct types in FSharp.Core.dll must be explicitly labelled with 'StructuralComparison' or 'NoComparison' + All record, union and struct types in FSharp.Core.dll must be explicitly labelled with 'StructuralComparison' or 'NoComparison' + + + + The struct, record or union type '{0}' has the 'StructuralComparison' attribute but the type parameter '{1}' does not satisfy the 'comparison' constraint. Consider adding the 'comparison' constraint to the type parameter + The struct, record or union type '{0}' has the 'StructuralComparison' attribute but the type parameter '{1}' does not satisfy the 'comparison' constraint. Consider adding the 'comparison' constraint to the type parameter + + + + The struct, record or union type '{0}' has the 'StructuralComparison' attribute but the component type '{1}' does not satisfy the 'comparison' constraint + The struct, record or union type '{0}' has the 'StructuralComparison' attribute but the component type '{1}' does not satisfy the 'comparison' constraint + + + + The struct, record or union type '{0}' is not structurally comparable because the type parameter {1} does not satisfy the 'comparison' constraint. Consider adding the 'NoComparison' attribute to the type '{2}' to clarify that the type is not comparable + The struct, record or union type '{0}' is not structurally comparable because the type parameter {1} does not satisfy the 'comparison' constraint. Consider adding the 'NoComparison' attribute to the type '{2}' to clarify that the type is not comparable + + + + The struct, record or union type '{0}' is not structurally comparable because the type '{1}' does not satisfy the 'comparison' constraint. Consider adding the 'NoComparison' attribute to the type '{2}' to clarify that the type is not comparable + The struct, record or union type '{0}' is not structurally comparable because the type '{1}' does not satisfy the 'comparison' constraint. Consider adding the 'NoComparison' attribute to the type '{2}' to clarify that the type is not comparable + + + + The struct, record or union type '{0}' does not support structural equality because the type parameter {1} does not satisfy the 'equality' constraint. Consider adding the 'NoEquality' attribute to the type '{2}' to clarify that the type does not support structural equality + The struct, record or union type '{0}' does not support structural equality because the type parameter {1} does not satisfy the 'equality' constraint. Consider adding the 'NoEquality' attribute to the type '{2}' to clarify that the type does not support structural equality + + + + The struct, record or union type '{0}' does not support structural equality because the type '{1}' does not satisfy the 'equality' constraint. Consider adding the 'NoEquality' attribute to the type '{2}' to clarify that the type does not support structural equality + The struct, record or union type '{0}' does not support structural equality because the type '{1}' does not satisfy the 'equality' constraint. Consider adding the 'NoEquality' attribute to the type '{2}' to clarify that the type does not support structural equality + + + + The struct, record or union type '{0}' has the 'StructuralEquality' attribute but the type parameter '{1}' does not satisfy the 'equality' constraint. Consider adding the 'equality' constraint to the type parameter + The struct, record or union type '{0}' has the 'StructuralEquality' attribute but the type parameter '{1}' does not satisfy the 'equality' constraint. Consider adding the 'equality' constraint to the type parameter + + + + The struct, record or union type '{0}' has the 'StructuralEquality' attribute but the component type '{1}' does not satisfy the 'equality' constraint + The struct, record or union type '{0}' has the 'StructuralEquality' attribute but the component type '{1}' does not satisfy the 'equality' constraint + + + + Each argument of the primary constructor for a struct must be given a type, for example 'type S(x1:int, x2: int) = ...'. These arguments determine the fields of the struct. + Each argument of the primary constructor for a struct must be given a type, for example 'type S(x1:int, x2: int) = ...'. These arguments determine the fields of the struct. + + + + The value '{0}' is unused + The value '{0}' is unused + + + + The recursive object reference '{0}' is unused. The presence of a recursive object reference adds runtime initialization checks to members in this and derived types. Consider removing this recursive object reference. + The recursive object reference '{0}' is unused. The presence of a recursive object reference adds runtime initialization checks to members in this and derived types. Consider removing this recursive object reference. + + + + A getter property may have at most one argument group + A getter property may have at most one argument group + + + + A setter property may have at most two argument groups + A setter property may have at most two argument groups + + + + Invalid property getter or setter + Invalid property getter or setter + + + + An indexer property must be given at least one argument + An indexer property must be given at least one argument + + + + This operation accesses a mutable top-level value defined in another assembly in an unsupported way. The value cannot be accessed through its address. Consider copying the expression to a mutable local, e.g. 'let mutable x = ...', and if necessary assigning the value back after the completion of the operation + This operation accesses a mutable top-level value defined in another assembly in an unsupported way. The value cannot be accessed through its address. Consider copying the expression to a mutable local, e.g. 'let mutable x = ...', and if necessary assigning the value back after the completion of the operation + + + + Remove spaces between the type name and type parameter, e.g. \"type C<'T>\", not type \"C <'T>\". Type parameters must be placed directly adjacent to the type name. + Remove spaces between the type name and type parameter, e.g. \"type C<'T>\", not type \"C <'T>\". Type parameters must be placed directly adjacent to the type name. + + + + Remove spaces between the type name and type parameter, e.g. \"C<'T>\", not \"C <'T>\". Type parameters must be placed directly adjacent to the type name. + Remove spaces between the type name and type parameter, e.g. \"C<'T>\", not \"C <'T>\". Type parameters must be placed directly adjacent to the type name. + + + + The use of the type syntax 'int C' and 'C <int>' is not permitted here. Consider adjusting this type to be written in the form 'C<int>' + The use of the type syntax 'int C' and 'C <int>' is not permitted here. Consider adjusting this type to be written in the form 'C<int>' + + + + The module/namespace '{0}' from compilation unit '{1}' did not contain the module/namespace '{2}' + The module/namespace '{0}' from compilation unit '{1}' did not contain the module/namespace '{2}' + + + + The module/namespace '{0}' from compilation unit '{1}' did not contain the val '{2}' + The module/namespace '{0}' from compilation unit '{1}' did not contain the val '{2}' + + + + The module/namespace '{0}' from compilation unit '{1}' did not contain the namespace, module or type '{2}' + The module/namespace '{0}' from compilation unit '{1}' did not contain the namespace, module or type '{2}' + + + + The 'UseNullAsTrueValue' attribute flag may only be used with union types that have one nullary case and at least one non-nullary case + The 'UseNullAsTrueValue' attribute flag may only be used with union types that have one nullary case and at least one non-nullary case + + + + The parameter '{0}' was inferred to have byref type. Parameters of byref type must be given an explicit type annotation, e.g. 'x1: byref<int>'. When used, a byref parameter is implicitly dereferenced. + The parameter '{0}' was inferred to have byref type. Parameters of byref type must be given an explicit type annotation, e.g. 'x1: byref<int>'. When used, a byref parameter is implicitly dereferenced. + + + + The generic member '{0}' has been used at a non-uniform instantiation prior to this program point. Consider reordering the members so this member occurs first. Alternatively, specify the full type of the member explicitly, including argument types, return type and any additional generic parameters and constraints. + The generic member '{0}' has been used at a non-uniform instantiation prior to this program point. Consider reordering the members so this member occurs first. Alternatively, specify the full type of the member explicitly, including argument types, return type and any additional generic parameters and constraints. + + + + The attribute '{0}' appears in both the implementation and the signature, but the attribute arguments differ. Only the attribute from the signature will be included in the compiled code. + The attribute '{0}' appears in both the implementation and the signature, but the attribute arguments differ. Only the attribute from the signature will be included in the compiled code. + + + + Cannot call an abstract base member: '{0}' + Cannot call an abstract base member: '{0}' + + + + Could not resolve the ambiguity in the use of a generic construct with an 'unmanaged' constraint at or near this position + Could not resolve the ambiguity in the use of a generic construct with an 'unmanaged' constraint at or near this position + + + + This construct is for ML compatibility. {0}. You can disable this warning by using '--mlcompatibility' or '--nowarn:62'. + This construct is for ML compatibility. {0}. You can disable this warning by using '--mlcompatibility' or '--nowarn:62'. + + + + The type '{0}' has been marked as having an Explicit layout, but the field '{1}' has not been marked with the 'FieldOffset' attribute + The type '{0}' has been marked as having an Explicit layout, but the field '{1}' has not been marked with the 'FieldOffset' attribute + + + + Interfaces inherited by other interfaces should be declared using 'inherit ...' instead of 'interface ...' + Interfaces inherited by other interfaces should be declared using 'inherit ...' instead of 'interface ...' + + + + Invalid prefix operator + Invalid prefix operator + + + + Invalid operator definition. Prefix operator definitions must use a valid prefix operator name. + Invalid operator definition. Prefix operator definitions must use a valid prefix operator name. + + + + The file extensions '.ml' and '.mli' are for ML compatibility + The file extensions '.ml' and '.mli' are for ML compatibility + + + + Consider using a file with extension '.ml' or '.mli' instead + Consider using a file with extension '.ml' or '.mli' instead + + + + Active pattern '{0}' is not a function + Active pattern '{0}' is not a function + + + + Active pattern '{0}' 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' + Active pattern '{0}' 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' + + + + The FieldOffset attribute can only be placed on members of types marked with the StructLayout(LayoutKind.Explicit) + The FieldOffset attribute can only be placed on members of types marked with the StructLayout(LayoutKind.Explicit) + + + + Optional arguments must come at the end of the argument list, after any non-optional arguments + Optional arguments must come at the end of the argument list, after any non-optional arguments + + + + Attribute 'System.Diagnostics.ConditionalAttribute' is only valid on methods or attribute classes + Attribute 'System.Diagnostics.ConditionalAttribute' is only valid on methods or attribute classes + + + + Extension members cannot provide operator overloads. Consider defining the operator as part of the type definition instead. + Extension members cannot provide operator overloads. Consider defining the operator as part of the type definition instead. + + + + The name of the MDB file must be <assembly-file-name>.mdb. The --pdb option will be ignored. + The name of the MDB file must be <assembly-file-name>.mdb. The --pdb option will be ignored. + + + + MDB generation failed. Could not find compatible member {0} + MDB generation failed. Could not find compatible member {0} + + + + Cannot generate MDB debug information. Failed to load the 'MonoSymbolWriter' type from the 'Mono.CompilerServices.SymbolWriter.dll' assembly. + Cannot generate MDB debug information. Failed to load the 'MonoSymbolWriter' type from the 'Mono.CompilerServices.SymbolWriter.dll' assembly. + + + + The union case named '{0}' conflicts with the generated type '{1}' + The union case named '{0}' conflicts with the generated type '{1}' + + + + ReflectedDefinitionAttribute may not be applied to an instance member on a struct type, because the instance member takes an implicit 'this' byref parameter + ReflectedDefinitionAttribute may not be applied to an instance member on a struct type, because the instance member takes an implicit 'this' byref parameter + + + + DLLImport bindings must be static members in a class or function definitions in a module + DLLImport bindings must be static members in a class or function definitions in a module + + + + When mscorlib.dll or FSharp.Core.dll is explicitly referenced the {0} option must also be passed + When mscorlib.dll or FSharp.Core.dll is explicitly referenced the {0} option must also be passed + + + + FSharp.Core.sigdata not found alongside FSharp.Core. File expected in {0}. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required. + FSharp.Core.sigdata not found alongside FSharp.Core. File expected in {0}. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required. + + + + File '{0}' not found alongside FSharp.Core. File expected in {1}. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required. + File '{0}' not found alongside FSharp.Core. File expected in {1}. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required. + + + + Filename '{0}' contains invalid character '{1}' + Filename '{0}' contains invalid character '{1}' + + + + 'use!' bindings must be of the form 'use! <var> = <expr>' + 'use!' bindings must be of the form 'use! <var> = <expr>' + + + + Inner generic functions are not permitted in quoted expressions. Consider adding some type constraints until this function is no longer generic. + Inner generic functions are not permitted in quoted expressions. Consider adding some type constraints until this function is no longer generic. + + + + The type '{0}' is not a valid enumerator type , i.e. does not have a 'MoveNext()' method returning a bool, and a 'Current' property + The type '{0}' is not a valid enumerator type , i.e. does not have a 'MoveNext()' method returning a bool, and a 'Current' property + + + + End of file in triple-quote string begun at or before here + End of file in triple-quote string begun at or before here + + + + End of file in triple-quote string embedded in comment begun at or before here + End of file in triple-quote string embedded in comment begun at or before here + + + + This type test or downcast will ignore the unit-of-measure '{0}' + This type test or downcast will ignore the unit-of-measure '{0}' + + + + Expected type argument or static argument + Expected type argument or static argument + + + + Unmatched '<'. Expected closing '>' + Unmatched '<'. Expected closing '>' + + + + Unexpected quotation operator '<@' in type definition. If you intend to pass a verbatim string as a static argument to a type provider, put a space between the '<' and '@' characters. + Unexpected quotation operator '<@' in type definition. If you intend to pass a verbatim string as a static argument to a type provider, put a space between the '<' and '@' characters. + + + + Attempted to parse this as an operator name, but failed + Attempted to parse this as an operator name, but failed + + + + \U{0} is not a valid Unicode character escape sequence + \U{0} is not a valid Unicode character escape sequence + + + + '{0}' must be applied to an argument of type '{1}', but has been applied to an argument of type '{2}' + '{0}' must be applied to an argument of type '{1}', but has been applied to an argument of type '{2}' + + + + '{0}' can only be applied to optional arguments + '{0}' can only be applied to optional arguments + + + + The specified .NET Framework version '{0}' is not supported. Please specify a value from the enumeration Microsoft.Build.Utilities.TargetDotNetFrameworkVersion. + The specified .NET Framework version '{0}' is not supported. Please specify a value from the enumeration Microsoft.Build.Utilities.TargetDotNetFrameworkVersion. + + + + Invalid Magic value in CLR Header + Invalid Magic value in CLR Header + + + + Bad image format + Bad image format + + + + Private key expected + Private key expected + + + + RSA key expected + RSA key expected + + + + Invalid bit Length + Invalid bit Length + + + + Invalid RSAParameters structure - '{{0}}' expected + Invalid RSAParameters structure - '{{0}}' expected + + + + Invalid algId - 'Exponent' expected + Invalid algId - 'Exponent' expected + + + + Invalid signature size + Invalid signature size + + + + No signature directory + No signature directory + + + + Invalid Public Key blob + Invalid Public Key blob + + + + Exiting - too many errors + Exiting - too many errors + + + + The documentation file has no .xml suffix + The documentation file has no .xml suffix + + + + No implementation files specified + No implementation files specified + + + + The attribute {0} specified version '{1}', but this value is invalid and has been ignored + The attribute {0} specified version '{1}', but this value is invalid and has been ignored + + + + Conflicting options specified: 'win32manifest' and 'win32res'. Only one of these can be used. + Conflicting options specified: 'win32manifest' and 'win32res'. Only one of these can be used. + + + + The code in assembly '{0}' makes uses of quotation literals. Static linking may not include components that make use of quotation literals unless all assemblies are compiled with at least F# 4.0. + The code in assembly '{0}' makes uses of quotation literals. Static linking may not include components that make use of quotation literals unless all assemblies are compiled with at least F# 4.0. + + + + Code in this assembly makes uses of quotation literals. Static linking may not include components that make use of quotation literals unless all assemblies are compiled with at least F# 4.0. + Code in this assembly makes uses of quotation literals. Static linking may not include components that make use of quotation literals unless all assemblies are compiled with at least F# 4.0. + + + + Static linking may not include a .EXE + Static linking may not include a .EXE + + + + Static linking may not include a mixed managed/unmanaged DLL + Static linking may not include a mixed managed/unmanaged DLL + + + + Ignoring mixed managed/unmanaged assembly '{0}' during static linking + Ignoring mixed managed/unmanaged assembly '{0}' during static linking + + + + Assembly '{0}' was referenced transitively and the assembly could not be resolved automatically. Static linking will assume this DLL has no dependencies on the F# library or other statically linked DLLs. Consider adding an explicit reference to this DLL. + Assembly '{0}' was referenced transitively and the assembly could not be resolved automatically. Static linking will assume this DLL has no dependencies on the F# library or other statically linked DLLs. Consider adding an explicit reference to this DLL. + + + + Assembly '{0}' not found in dependency set of target binary. Statically linked roots should be specified using an assembly name, without a DLL or EXE extension. If this assembly was referenced explicitly then it is possible the assembly was not actually required by the generated binary, in which case it should not be statically linked. + Assembly '{0}' not found in dependency set of target binary. Statically linked roots should be specified using an assembly name, without a DLL or EXE extension. If this assembly was referenced explicitly then it is possible the assembly was not actually required by the generated binary, in which case it should not be statically linked. + + + + The key file '{0}' could not be opened + The key file '{0}' could not be opened + + + + A problem occurred writing the binary '{0}': {1} + A problem occurred writing the binary '{0}': {1} + + + + The 'AssemblyVersionAttribute' has been ignored because a version was given using a command line option + The 'AssemblyVersionAttribute' has been ignored because a version was given using a command line option + + + + Error emitting 'System.Reflection.AssemblyCultureAttribute' attribute -- 'Executables cannot be satellite assemblies, Culture should always be empty' + Error emitting 'System.Reflection.AssemblyCultureAttribute' attribute -- 'Executables cannot be satellite assemblies, Culture should always be empty' + + + + Option '--delaysign' overrides attribute 'System.Reflection.AssemblyDelaySignAttribute' given in a source file or added module + Option '--delaysign' overrides attribute 'System.Reflection.AssemblyDelaySignAttribute' given in a source file or added module + + + + Option '--keyfile' overrides attribute 'System.Reflection.AssemblyKeyFileAttribute' given in a source file or added module + Option '--keyfile' overrides attribute 'System.Reflection.AssemblyKeyFileAttribute' given in a source file or added module + + + + Option '--keycontainer' overrides attribute 'System.Reflection.AssemblyNameAttribute' given in a source file or added module + Option '--keycontainer' overrides attribute 'System.Reflection.AssemblyNameAttribute' given in a source file or added module + + + + The assembly '{0}' is listed on the command line. Assemblies should be referenced using a command line flag such as '-r'. + The assembly '{0}' is listed on the command line. Assemblies should be referenced using a command line flag such as '-r'. + + + + The resident compilation service was not used because a problem occured in communicating with the server. + The resident compilation service was not used because a problem occured in communicating with the server. + + + + Problem with filename '{0}': Illegal characters in path. + Problem with filename '{0}': Illegal characters in path. + + + + Passing a .resx file ({0}) as a source file to the compiler is deprecated. Use resgen.exe to transform the .resx file into a .resources file to pass as a --resource option. If you are using MSBuild, this can be done via an <EmbeddedResource> item in the .fsproj project file. + Passing a .resx file ({0}) as a source file to the compiler is deprecated. Use resgen.exe to transform the .resx file into a .resources file to pass as a --resource option. If you are using MSBuild, this can be done via an <EmbeddedResource> item in the .fsproj project file. + + + + Static linking may not be used on an assembly referencing mscorlib (e.g. a .NET Framework assembly) when generating an assembly that references System.Runtime (e.g. a .NET Core or Portable assembly). + Static linking may not be used on an assembly referencing mscorlib (e.g. a .NET Framework assembly) when generating an assembly that references System.Runtime (e.g. a .NET Core or Portable assembly). + + + + An {0} specified version '{1}', but this value is a wildcard, and you have requested a deterministic build, these are in conflict. + An {0} specified version '{1}', but this value is a wildcard, and you have requested a deterministic build, these are in conflict. + + + + Determinstic builds only support portable PDBs (--debug:portable or --debug:embedded) + Determinstic builds only support portable PDBs (--debug:portable or --debug:embedded) + + + + Character '{0}' is not allowed in provided namespace name '{1}' + Character '{0}' is not allowed in provided namespace name '{1}' + + + + The provided type '{0}' returned a member with a null or empty member name + The provided type '{0}' returned a member with a null or empty member name + + + + The provided type '{0}' returned a null member + The provided type '{0}' returned a null member + + + + The provided type '{0}' member info '{1}' has null declaring type + The provided type '{0}' member info '{1}' has null declaring type + + + + The provided type '{0}' has member '{1}' which has declaring type '{2}'. Expected declaring type to be the same as provided type. + The provided type '{0}' has member '{1}' which has declaring type '{2}'. Expected declaring type to be the same as provided type. + + + + Referenced assembly '{0}' has assembly level attribute '{1}' but no public type provider classes were found + Referenced assembly '{0}' has assembly level attribute '{1}' but no public type provider classes were found + + + + Type '{0}' from type provider '{1}' has an empty namespace. Use 'null' for the global namespace. + Type '{0}' from type provider '{1}' has an empty namespace. Use 'null' for the global namespace. + + + + Empty namespace found from the type provider '{0}'. Use 'null' for the global namespace. + Empty namespace found from the type provider '{0}'. Use 'null' for the global namespace. + + + + Provided type '{0}' has 'IsGenericType' as true, but generic types are not supported. + Provided type '{0}' has 'IsGenericType' as true, but generic types are not supported. + + + + Provided type '{0}' has 'IsArray' as true, but array types are not supported. + Provided type '{0}' has 'IsArray' as true, but array types are not supported. + + + + Invalid member '{0}' on provided type '{1}'. Provided type members must be public, and not be generic, virtual, or abstract. + Invalid member '{0}' on provided type '{1}'. Provided type members must be public, and not be generic, virtual, or abstract. + + + + Invalid member '{0}' on provided type '{1}'. Only properties, methods and constructors are allowed + Invalid member '{0}' on provided type '{1}'. Only properties, methods and constructors are allowed + + + + Property '{0}' on provided type '{1}' has CanRead=true but there was no value from GetGetMethod() + Property '{0}' on provided type '{1}' has CanRead=true but there was no value from GetGetMethod() + + + + Property '{0}' on provided type '{1}' has CanRead=false but GetGetMethod() returned a method + Property '{0}' on provided type '{1}' has CanRead=false but GetGetMethod() returned a method + + + + Property '{0}' on provided type '{1}' has CanWrite=true but there was no value from GetSetMethod() + Property '{0}' on provided type '{1}' has CanWrite=true but there was no value from GetSetMethod() + + + + Property '{0}' on provided type '{1}' has CanWrite=false but GetSetMethod() returned a method + Property '{0}' on provided type '{1}' has CanWrite=false but GetSetMethod() returned a method + + + + One or more errors seen during provided type setup + One or more errors seen during provided type setup + + + + Unexpected exception from provided type '{0}' member '{1}': {2} + Unexpected exception from provided type '{0}' member '{1}': {2} + + + + Unsupported constant type '{0}'. Quotations provided by type providers can only contain simple constants. The implementation of the type provider may need to be adjusted by moving a value declared outside a provided quotation literal to be a 'let' binding inside the quotation literal. + Unsupported constant type '{0}'. Quotations provided by type providers can only contain simple constants. The implementation of the type provider may need to be adjusted by moving a value declared outside a provided quotation literal to be a 'let' binding inside the quotation literal. + + + + Unsupported expression '{0}' from type provider. If you are the author of this type provider, consider adjusting it to provide a different provided expression. + Unsupported expression '{0}' from type provider. If you are the author of this type provider, consider adjusting it to provide a different provided expression. + + + + Expected provided type named '{0}' but provided type has 'Name' with value '{1}' + Expected provided type named '{0}' but provided type has 'Name' with value '{1}' + + + + Event '{0}' on provided type '{1}' has no value from GetAddMethod() + Event '{0}' on provided type '{1}' has no value from GetAddMethod() + + + + Event '{0}' on provided type '{1}' has no value from GetRemoveMethod() + Event '{0}' on provided type '{1}' has no value from GetRemoveMethod() + + + + Assembly attribute '{0}' refers to a designer assembly '{1}' which cannot be loaded or doesn't exist. {2} + Assembly attribute '{0}' refers to a designer assembly '{1}' which cannot be loaded or doesn't exist. {2} + + + + The type provider does not have a valid constructor. A constructor taking either no arguments or one argument of type 'TypeProviderConfig' was expected. + The type provider does not have a valid constructor. A constructor taking either no arguments or one argument of type 'TypeProviderConfig' was expected. + + + + The type provider '{0}' reported an error: {1} + The type provider '{0}' reported an error: {1} + + + + The type provider '{0}' used an invalid parameter in the ParameterExpression: {1} + The type provider '{0}' used an invalid parameter in the ParameterExpression: {1} + + + + The type provider '{0}' provided a method with a name '{1}' and metadata token '{2}', which is not reported among its methods of its declaring type '{3}' + The type provider '{0}' provided a method with a name '{1}' and metadata token '{2}', which is not reported among its methods of its declaring type '{3}' + + + + The type provider '{0}' provided a constructor which is not reported among the constructors of its declaring type '{1}' + The type provider '{0}' provided a constructor which is not reported among the constructors of its declaring type '{1}' + + + + A direct reference to the generated type '{0}' is not permitted. Instead, use a type definition, e.g. 'type TypeAlias = <path>'. This indicates that a type provider adds generated types to your assembly. + A direct reference to the generated type '{0}' is not permitted. Instead, use a type definition, e.g. 'type TypeAlias = <path>'. This indicates that a type provider adds generated types to your assembly. + + + + Expected provided type with path '{0}' but provided type has path '{1}' + Expected provided type with path '{0}' but provided type has path '{1}' + + + + Unexpected 'null' return value from provided type '{0}' member '{1}' + Unexpected 'null' return value from provided type '{0}' member '{1}' + + + + Unexpected exception from member '{0}' of provided type '{1}' member '{2}': {3} + Unexpected exception from member '{0}' of provided type '{1}' member '{2}': {3} + + + + Nested provided types do not take static arguments or generic parameters + Nested provided types do not take static arguments or generic parameters + + + + Invalid static argument to provided type. Expected an argument of kind '{0}'. + Invalid static argument to provided type. Expected an argument of kind '{0}'. + + + + An error occured applying the static arguments to a provided type + An error occured applying the static arguments to a provided type + + + + Unknown static argument kind '{0}' when resolving a reference to a provided type or method '{1}' + Unknown static argument kind '{0}' when resolving a reference to a provided type or method '{1}' + + + + invalid namespace for provided type + invalid namespace for provided type + + + + invalid full name for provided type + invalid full name for provided type + + + + The type provider returned 'null', which is not a valid return value from '{0}' + The type provider returned 'null', which is not a valid return value from '{0}' + + + + The type provider constructor has thrown an exception: {0} + The type provider constructor has thrown an exception: {0} + + + + Type provider '{0}' returned null from GetInvokerExpression. + Type provider '{0}' returned null from GetInvokerExpression. + + + + The type provider '{0}' returned an invalid type from 'ApplyStaticArguments'. A type with name '{1}' was expected, but a type with name '{2}' was returned. + The type provider '{0}' returned an invalid type from 'ApplyStaticArguments'. A type with name '{1}' was expected, but a type with name '{2}' was returned. + + + + The type provider '{0}' returned an invalid method from 'ApplyStaticArgumentsForMethod'. A method with name '{1}' was expected, but a method with name '{2}' was returned. + The type provider '{0}' returned an invalid method from 'ApplyStaticArgumentsForMethod'. A method with name '{1}' was expected, but a method with name '{2}' was returned. + + + + This type test or downcast will erase the provided type '{0}' to the type '{1}' + This type test or downcast will erase the provided type '{0}' to the type '{1}' + + + + This downcast will erase the provided type '{0}' to the type '{1}'. + This downcast will erase the provided type '{0}' to the type '{1}'. + + + + This type test with a provided type '{0}' is not allowed because this provided type will be erased to '{1}' at runtime. + This type test with a provided type '{0}' is not allowed because this provided type will be erased to '{1}' at runtime. + + + + Cannot inherit from erased provided type + Cannot inherit from erased provided type + + + + Assembly '{0}' hase TypeProviderAssembly attribute with invalid value '{1}'. The value should be a valid assembly name + Assembly '{0}' hase TypeProviderAssembly attribute with invalid value '{1}'. The value should be a valid assembly name + + + + Invalid member name. Members may not have name '.ctor' or '.cctor' + Invalid member name. Members may not have name '.ctor' or '.cctor' + + + + The function or member '{0}' is used in a way that requires further type annotations at its definition to ensure consistency of inferred types. The inferred signature is '{1}'. + The function or member '{0}' is used in a way that requires further type annotations at its definition to ensure consistency of inferred types. The inferred signature is '{1}'. + + + + The number of type arguments did not match: '{0}' given, '{1}' expected. This may be related to a previously reported error. + The number of type arguments did not match: '{0}' given, '{1}' expected. This may be related to a previously reported error. + + + + Cannot override inherited member '{0}' because it is sealed + Cannot override inherited member '{0}' because it is sealed + + + + The type provider '{0}' reported an error in the context of provided type '{1}', member '{2}'. The error: {3} + The type provider '{0}' reported an error in the context of provided type '{1}', member '{2}'. The error: {3} + + + + An exception occurred when accessing the '{0}' of a provided type: {1} + An exception occurred when accessing the '{0}' of a provided type: {1} + + + + The '{0}' of a provided type was null or empty. + The '{0}' of a provided type was null or empty. + + + + Character '{0}' is not allowed in provided type name '{1}' + Character '{0}' is not allowed in provided type name '{1}' + + + + In queries, '{0}' must use a simple pattern + In queries, '{0}' must use a simple pattern + + + + A custom query operation for '{0}' is required but not specified + A custom query operation for '{0}' is required but not specified + + + + Named static arguments must come after all unnamed static arguments + Named static arguments must come after all unnamed static arguments + + + + The static parameter '{0}' of the provided type or method '{1}' requires a value. Static parameters to type providers may be optionally specified using named arguments, e.g. '{2}<{3}=...>'. + The static parameter '{0}' of the provided type or method '{1}' requires a value. Static parameters to type providers may be optionally specified using named arguments, e.g. '{2}<{3}=...>'. + + + + No static parameter exists with name '{0}' + No static parameter exists with name '{0}' + + + + The static parameter '{0}' has already been given a value + The static parameter '{0}' has already been given a value + + + + Multiple static parameters exist with name '{0}' + Multiple static parameters exist with name '{0}' + + + + A custom operation may not be used in conjunction with a non-value or recursive 'let' binding in another part of this computation expression + A custom operation may not be used in conjunction with a non-value or recursive 'let' binding in another part of this computation expression + + + + A custom operation may not be used in conjunction with 'use', 'try/with', 'try/finally', 'if/then/else' or 'match' operators within this computation expression + A custom operation may not be used in conjunction with 'use', 'try/with', 'try/finally', 'if/then/else' or 'match' operators within this computation expression + + + + The custom operation '{0}' refers to a method which is overloaded. The implementations of custom operations may not be overloaded. + The custom operation '{0}' refers to a method which is overloaded. The implementations of custom operations may not be overloaded. + + + + An if/then/else expression may not be used within queries. Consider using either an if/then expression, or use a sequence expression instead. + An if/then/else expression may not be used within queries. Consider using either an if/then expression, or use a sequence expression instead. + + + + Invalid argument to 'methodhandleof' during codegen + Invalid argument to 'methodhandleof' during codegen + + + + A reference to a provided type was missing a value for the static parameter '{0}'. You may need to recompile one or more referenced assemblies. + A reference to a provided type was missing a value for the static parameter '{0}'. You may need to recompile one or more referenced assemblies. + + + + A reference to a provided type had an invalid value '{0}' for a static parameter. You may need to recompile one or more referenced assemblies. + A reference to a provided type had an invalid value '{0}' for a static parameter. You may need to recompile one or more referenced assemblies. + + + + '{0}' is not used correctly. This is a custom operation in this query or computation expression. + '{0}' is not used correctly. This is a custom operation in this query or computation expression. + + + + '{0}' is not used correctly. Usage: {1}. This is a custom operation in this query or computation expression. + '{0}' is not used correctly. Usage: {1}. This is a custom operation in this query or computation expression. + + + + {0} var in collection {1} (outerKey = innerKey). Note that parentheses are required after '{2}' + {0} var in collection {1} (outerKey = innerKey). Note that parentheses are required after '{2}' + + + + {0} var in collection {1} (outerKey = innerKey) into group. Note that parentheses are required after '{2}' + {0} var in collection {1} (outerKey = innerKey) into group. Note that parentheses are required after '{2}' + + + + {0} var in collection + {0} var in collection + + + + '{0}' must be followed by a variable name. Usage: {1}. + '{0}' must be followed by a variable name. Usage: {1}. + + + + Incorrect syntax for '{0}'. Usage: {1}. + Incorrect syntax for '{0}'. Usage: {1}. + + + + '{0}' must come after a 'for' selection clause and be followed by the rest of the query. Syntax: ... {1} ... + '{0}' must come after a 'for' selection clause and be followed by the rest of the query. Syntax: ... {1} ... + + + + '{0}' is used with an incorrect number of arguments. This is a custom operation in this query or computation expression. Expected {1} argument(s), but given {2}. + '{0}' is used with an incorrect number of arguments. This is a custom operation in this query or computation expression. Expected {1} argument(s), but given {2}. + + + + Expected an expression after this point + Expected an expression after this point + + + + Expected a type after this point + Expected a type after this point + + + + Unmatched '[<'. Expected closing '>]' + Unmatched '[<'. Expected closing '>]' + + + + Unexpected end of input in 'match' expression. Expected 'match <expr> with | <pat> -> <expr> | <pat> -> <expr> ...'. + Unexpected end of input in 'match' expression. Expected 'match <expr> with | <pat> -> <expr> | <pat> -> <expr> ...'. + + + + Unexpected end of input in 'try' expression. Expected 'try <expr> with <rules>' or 'try <expr> finally <expr>'. + Unexpected end of input in 'try' expression. Expected 'try <expr> with <rules>' or 'try <expr> finally <expr>'. + + + + Unexpected end of input in 'while' expression. Expected 'while <expr> do <expr>'. + Unexpected end of input in 'while' expression. Expected 'while <expr> do <expr>'. + + + + Unexpected end of input in 'for' expression. Expected 'for <pat> in <expr> do <expr>'. + Unexpected end of input in 'for' expression. Expected 'for <pat> in <expr> do <expr>'. + + + + Unexpected end of input in 'match' or 'try' expression + Unexpected end of input in 'match' or 'try' expression + + + + Unexpected end of input in 'then' branch of conditional expression. Expected 'if <expr> then <expr>' or 'if <expr> then <expr> else <expr>'. + Unexpected end of input in 'then' branch of conditional expression. Expected 'if <expr> then <expr>' or 'if <expr> then <expr> else <expr>'. + + + + Unexpected end of input in 'else' branch of conditional expression. Expected 'if <expr> then <expr>' or 'if <expr> then <expr> else <expr>'. + Unexpected end of input in 'else' branch of conditional expression. Expected 'if <expr> then <expr>' or 'if <expr> then <expr> else <expr>'. + + + + Unexpected end of input in body of lambda expression. Expected 'fun <pat> ... <pat> -> <expr>'. + Unexpected end of input in body of lambda expression. Expected 'fun <pat> ... <pat> -> <expr>'. + + + + Unexpected end of input in type arguments + Unexpected end of input in type arguments + + + + Unexpected end of input in type signature + Unexpected end of input in type signature + + + + Unexpected end of input in type definition + Unexpected end of input in type definition + + + + Unexpected end of input in object members + Unexpected end of input in object members + + + + Unexpected end of input in value, function or member definition + Unexpected end of input in value, function or member definition + + + + Unexpected end of input in expression + Unexpected end of input in expression + + + + Unexpected end of type. Expected a name after this point. + Unexpected end of type. Expected a name after this point. + + + + Incomplete value or function definition. If this is in an expression, the body of the expression must be indented to the same column as the 'let' keyword. + Incomplete value or function definition. If this is in an expression, the body of the expression must be indented to the same column as the 'let' keyword. + + + + Incomplete value definition. If this is in an expression, the body of the expression must be indented to the same column as the 'let!' keyword. + Incomplete value definition. If this is in an expression, the body of the expression must be indented to the same column as the 'let!' keyword. + + + + Incomplete value definition. If this is in an expression, the body of the expression must be indented to the same column as the 'use!' keyword. + Incomplete value definition. If this is in an expression, the body of the expression must be indented to the same column as the 'use!' keyword. + + + + Incomplete value definition. If this is in an expression, the body of the expression must be indented to the same column as the 'use' keyword. + Incomplete value definition. If this is in an expression, the body of the expression must be indented to the same column as the 'use' keyword. + + + + Missing 'do' in 'while' expression. Expected 'while <expr> do <expr>'. + Missing 'do' in 'while' expression. Expected 'while <expr> do <expr>'. + + + + Missing 'do' in 'for' expression. Expected 'for <pat> in <expr> do <expr>'. + Missing 'do' in 'for' expression. Expected 'for <pat> in <expr> do <expr>'. + + + + Invalid join relation in '{0}'. Expected 'expr <op> expr', where <op> is =, =?, ?= or ?=?. + Invalid join relation in '{0}'. Expected 'expr <op> expr', where <op> is =, =?, ?= or ?=?. + + + + Calls + Calls + + + + Invalid number of generic arguments to type '{0}' in provided type. Expected '{1}' arguments, given '{2}'. + Invalid number of generic arguments to type '{0}' in provided type. Expected '{1}' arguments, given '{2}'. + + + + Invalid value '{0}' for unit-of-measure parameter '{1}' + Invalid value '{0}' for unit-of-measure parameter '{1}' + + + + Invalid value unit-of-measure parameter '{0}' + Invalid value unit-of-measure parameter '{0}' + + + + Property '{0}' on provided type '{1}' is neither readable nor writable as it has CanRead=false and CanWrite=false + Property '{0}' on provided type '{1}' is neither readable nor writable as it has CanRead=false and CanWrite=false + + + + A use of 'into' must be followed by the remainder of the computation + A use of 'into' must be followed by the remainder of the computation + + + + The operator '{0}' does not accept the use of 'into' + The operator '{0}' does not accept the use of 'into' + + + + The definition of the custom operator '{0}' does not use a valid combination of attribute flags + The definition of the custom operator '{0}' does not use a valid combination of attribute flags + + + + This type definition may not have the 'CLIMutable' attribute. Only record types may have this attribute. + This type definition may not have the 'CLIMutable' attribute. Only record types may have this attribute. + + + + 'member val' definitions are only permitted in types with a primary constructor. Consider adding arguments to your type definition, e.g. 'type X(args) = ...'. + 'member val' definitions are only permitted in types with a primary constructor. Consider adding arguments to your type definition, e.g. 'type X(args) = ...'. + + + + Property definitions may not be declared mutable. To indicate that this property can be set, use 'member val PropertyName = expr with get,set'. + Property definitions may not be declared mutable. To indicate that this property can be set, use 'member val PropertyName = expr with get,set'. + + + + To indicate that this property can be set, use 'member val PropertyName = expr with get,set'. + To indicate that this property can be set, use 'member val PropertyName = expr with get,set'. + + + + Type '{0}' is illegal because in byref<T>, T cannot contain byref types. + Type '{0}' is illegal because in byref<T>, T cannot contain byref types. + + + + F# supports array ranks between 1 and 32. The value {0} is not allowed. + F# supports array ranks between 1 and 32. The value {0} is not allowed. + + + + In queries, use the form 'for x in n .. m do ...' for ranging over integers + In queries, use the form 'for x in n .. m do ...' for ranging over integers + + + + 'while' expressions may not be used in queries + 'while' expressions may not be used in queries + + + + 'try/finally' expressions may not be used in queries + 'try/finally' expressions may not be used in queries + + + + 'use' expressions may not be used in queries + 'use' expressions may not be used in queries + + + + 'let!', 'use!' and 'do!' expressions may not be used in queries + 'let!', 'use!' and 'do!' expressions may not be used in queries + + + + 'return' and 'return!' may not be used in queries + 'return' and 'return!' may not be used in queries + + + + This is not a known query operator. Query operators are identifiers such as 'select', 'where', 'sortBy', 'thenBy', 'groupBy', 'groupValBy', 'join', 'groupJoin', 'sumBy' and 'averageBy', defined using corresponding methods on the 'QueryBuilder' type. + This is not a known query operator. Query operators are identifiers such as 'select', 'where', 'sortBy', 'thenBy', 'groupBy', 'groupValBy', 'join', 'groupJoin', 'sumBy' and 'averageBy', defined using corresponding methods on the 'QueryBuilder' type. + + + + 'try/with' expressions may not be used in queries + 'try/with' expressions may not be used in queries + + + + This 'let' definition may not be used in a query. Only simple value definitions may be used in queries. + This 'let' definition may not be used in a query. Only simple value definitions may be used in queries. + + + + Too many static parameters. Expected at most {0} parameters, but got {1} unnamed and {2} named parameters. + Too many static parameters. Expected at most {0} parameters, but got {1} unnamed and {2} named parameters. + + + + Invalid provided literal value '{0}' + Invalid provided literal value '{0}' + + + + The 'anycpu32bitpreferred' platform can only be used with EXE targets. You must use 'anycpu' instead. + The 'anycpu32bitpreferred' platform can only be used with EXE targets. You must use 'anycpu' instead. + + + + This member, function or value declaration may not be declared 'inline' + This member, function or value declaration may not be declared 'inline' + + + + The provider '{0}' returned a non-generated type '{1}' in the context of a set of generated types. Consider adjusting the type provider to only return generated types. + The provider '{0}' returned a non-generated type '{1}' in the context of a set of generated types. Consider adjusting the type provider to only return generated types. + + + + Arguments to query operators may require parentheses, e.g. 'where (x > y)' or 'groupBy (x.Length / 10)' + Arguments to query operators may require parentheses, e.g. 'where (x > y)' or 'groupBy (x.Length / 10)' + + + + A quotation may not involve an assignment to or taking the address of a captured local variable + A quotation may not involve an assignment to or taking the address of a captured local variable + + + + + 1 overload + + 1 overload + + + + + {0} overloads + + {0} overloads + + + + Erased to + Erased to + + + + Unexpected token '{0}' or incomplete expression + Unexpected token '{0}' or incomplete expression + + + + Cannot find code target for this attribute, possibly because the code after the attribute is incomplete. + Cannot find code target for this attribute, possibly because the code after the attribute is incomplete. + + + + Type name cannot be empty. + Type name cannot be empty. + + + + Problem reading assembly '{0}': {1} + Problem reading assembly '{0}': {1} + + + + Invalid provided field. Provided fields of erased provided types must be literals. + Invalid provided field. Provided fields of erased provided types must be literals. + + + + (loading description...) + (loading description...) + + + + (description unavailable...) + (description unavailable...) + + + + A type variable has been constrained by multiple different class types. A type variable may only have one class constraint. + A type variable has been constrained by multiple different class types. A type variable may only have one class constraint. + + + + 'match' expressions may not be used in queries + 'match' expressions may not be used in queries + + + + Infix operator member '{0}' has {1} initial argument(s). Expected a tuple of 3 arguments + Infix operator member '{0}' has {1} initial argument(s). Expected a tuple of 3 arguments + + + + The operator '{0}' cannot be resolved. Consider opening the module 'Microsoft.FSharp.Linq.NullableOperators'. + The operator '{0}' cannot be resolved. Consider opening the module 'Microsoft.FSharp.Linq.NullableOperators'. + + + + '{0}' must be followed by 'in'. Usage: {1}. + '{0}' must be followed by 'in'. Usage: {1}. + + + + Neither 'member val' nor 'override val' definitions are permitted in object expressions. + Neither 'member val' nor 'override val' definitions are permitted in object expressions. + + + + Copy-and-update record expressions must include at least one field. + Copy-and-update record expressions must include at least one field. + + + + '_' cannot be used as field name + '_' cannot be used as field name + + + + The provided types generated by this use of a type provider may not be used from other F# assemblies and should be marked internal or private. Consider using 'type internal TypeName = ...' or 'type private TypeName = ...'. + The provided types generated by this use of a type provider may not be used from other F# assemblies and should be marked internal or private. Consider using 'type internal TypeName = ...' or 'type private TypeName = ...'. + + + + A property's getter and setter must have the same type. Property '{0}' has getter of type '{1}' but setter of type '{2}'. + A property's getter and setter must have the same type. Property '{0}' has getter of type '{1}' but setter of type '{2}'. + + + + Array method '{0}' is supplied by the runtime and cannot be directly used in code. For operations with array elements consider using family of GetArray/SetArray functions from LanguagePrimitives.IntrinsicFunctions module. + Array method '{0}' is supplied by the runtime and cannot be directly used in code. For operations with array elements consider using family of GetArray/SetArray functions from LanguagePrimitives.IntrinsicFunctions module. + + + + The union case '{0}' does not have a field named '{1}'. + The union case '{0}' does not have a field named '{1}'. + + + + Union case/exception field '{0}' cannot be used more than once. + Union case/exception field '{0}' cannot be used more than once. + + + + Named field '{0}' is used more than once. + Named field '{0}' is used more than once. + + + + Named field '{0}' conflicts with autogenerated name for anonymous field. + Named field '{0}' conflicts with autogenerated name for anonymous field. + + + + This literal expression or attribute argument results in an arithmetic overflow. + This literal expression or attribute argument results in an arithmetic overflow. + + + + This is not valid literal expression. The [<Literal>] attribute will be ignored. + This is not valid literal expression. The [<Literal>] attribute will be ignored. + + + + System.Runtime.InteropServices assembly is required to use UnknownWrapper\DispatchWrapper classes. + System.Runtime.InteropServices assembly is required to use UnknownWrapper\DispatchWrapper classes. + + + + The mutable local '{0}' is implicitly allocated as a reference cell because it has been captured by a closure. This warning is for informational purposes only to indicate where implicit allocations are performed. + The mutable local '{0}' is implicitly allocated as a reference cell because it has been captured by a closure. This warning is for informational purposes only to indicate where implicit allocations are performed. + + + + A type provider implemented GetStaticParametersForMethod, but ApplyStaticArgumentsForMethod was not implemented or invalid + A type provider implemented GetStaticParametersForMethod, but ApplyStaticArgumentsForMethod was not implemented or invalid + + + + An error occured applying the static arguments to a provided method + An error occured applying the static arguments to a provided method + + + + Unexpected character '{0}' in preprocessor expression + Unexpected character '{0}' in preprocessor expression + + + + Unexpected token '{0}' in preprocessor expression + Unexpected token '{0}' in preprocessor expression + + + + Incomplete preprocessor expression + Incomplete preprocessor expression + + + + Missing token '{0}' in preprocessor expression + Missing token '{0}' in preprocessor expression + + + + An error occurred while reading the F# metadata node at position {0} in table '{1}' of assembly '{2}'. The node had no matching declaration. Please report this warning. You may need to recompile the F# assembly you are using. + An error occurred while reading the F# metadata node at position {0} in table '{1}' of assembly '{2}'. The node had no matching declaration. Please report this warning. You may need to recompile the F# assembly you are using. + + + + Type inference caused the type variable {0} to escape its scope. Consider adding an explicit type parameter declaration or adjusting your code to be less generic. + Type inference caused the type variable {0} to escape its scope. Consider adding an explicit type parameter declaration or adjusting your code to be less generic. + + + + Type inference caused an inference type variable to escape its scope. Consider adding type annotations to make your code less generic. + Type inference caused an inference type variable to escape its scope. Consider adding type annotations to make your code less generic. + + + + Redundant arguments are being ignored in function '{0}'. Expected {1} but got {2} arguments. + Redundant arguments are being ignored in function '{0}'. Expected {1} but got {2} arguments. + + + + Lowercase literal '{0}' is being shadowed by a new pattern with the same name. Only uppercase and module-prefixed literals can be used as named patterns. + Lowercase literal '{0}' is being shadowed by a new pattern with the same name. Only uppercase and module-prefixed literals can be used as named patterns. + + + + This literal pattern does not take arguments + This literal pattern does not take arguments + + + + Constructors are not permitted as extension members - they must be defined as part of the original definition of the type + Constructors are not permitted as extension members - they must be defined as part of the original definition of the type + + + + Invalid response file '{0}' ( '{1}' ) + Invalid response file '{0}' ( '{1}' ) + + + + Response file '{0}' not found in '{1}' + Response file '{0}' not found in '{1}' + + + + Response file name '{0}' is empty, contains invalid characters, has a drive specification without an absolute path, or is too long + Response file name '{0}' is empty, contains invalid characters, has a drive specification without an absolute path, or is too long + + + + Cannot find FSharp.Core.dll in compiler's directory + Cannot find FSharp.Core.dll in compiler's directory + + + + One tuple type is a struct tuple, the other is a reference tuple + One tuple type is a struct tuple, the other is a reference tuple + + + + This provided method requires static parameters + This provided method requires static parameters + + + + The conversion from {0} to {1} is a compile-time safe upcast, not a downcast. Consider using 'upcast' instead of 'downcast'. + The conversion from {0} to {1} is a compile-time safe upcast, not a downcast. Consider using 'upcast' instead of 'downcast'. + + + + The conversion from {0} to {1} is a compile-time safe upcast, not a downcast. Consider using the :> (upcast) operator instead of the :?> (downcast) operator. + The conversion from {0} to {1} is a compile-time safe upcast, not a downcast. Consider using the :> (upcast) operator instead of the :?> (downcast) operator. + + + + The 'rec' on this module is implied by an outer 'rec' declaration and is being ignored + The 'rec' on this module is implied by an outer 'rec' declaration and is being ignored + + + + In a recursive declaration group, 'open' declarations must come first in each module + In a recursive declaration group, 'open' declarations must come first in each module + + + + In a recursive declaration group, module abbreviations must come after all 'open' declarations and before other declarations + In a recursive declaration group, module abbreviations must come after all 'open' declarations and before other declarations + + + + This declaration is not supported in recursive declaration groups + This declaration is not supported in recursive declaration groups + + + + Invalid use of 'rec' keyword + Invalid use of 'rec' keyword + + + + If a union type has more than one case and is a struct, then all fields within the union type must be given unique names. + If a union type has more than one case and is a struct, then all fields within the union type must be given unique names. + + + + The CallerMemberNameAttribute applied to parameter '{0}' will have no effect. It is overridden by the CallerFilePathAttribute. + The CallerMemberNameAttribute applied to parameter '{0}' will have no effect. It is overridden by the CallerFilePathAttribute. + + + + Invalid use of 'fixed'. 'fixed' may only be used in a declaration of the form 'use x = fixed expr' where the expression is an array, the address of a field, the address of an array element or a string' + Invalid use of 'fixed'. 'fixed' may only be used in a declaration of the form 'use x = fixed expr' where the expression is an array, the address of a field, the address of an array element or a string' + + + + Could not find method System.Runtime.CompilerServices.OffsetToStringData in references when building 'fixed' expression. + Could not find method System.Runtime.CompilerServices.OffsetToStringData in references when building 'fixed' expression. + + + + {0} is an active pattern and cannot be treated as a discriminated union case with named fields. + {0} is an active pattern and cannot be treated as a discriminated union case with named fields. + + + + The default value does not have the same type as the argument. The DefaultParameterValue attribute and any Optional attribute will be ignored. Note: 'null' needs to be annotated with the correct type, e.g. 'DefaultParameterValue(null:obj)'. + The default value does not have the same type as the argument. The DefaultParameterValue attribute and any Optional attribute will be ignored. Note: 'null' needs to be annotated with the correct type, e.g. 'DefaultParameterValue(null:obj)'. + + + + The system type '{0}' was required but no referenced system DLL contained this type + The system type '{0}' was required but no referenced system DLL contained this type + + + + The member '{0}' matches multiple overloads of the same method.\nPlease restrict it to one of the following:{1}. + The member '{0}' matches multiple overloads of the same method.\nPlease restrict it to one of the following:{1}. + + + + Method or object constructor '{0}' is not static + Method or object constructor '{0}' is not static + + + + Unexpected symbol '=' in expression. Did you intend to use 'for x in y .. z do' instead? + Unexpected symbol '=' in expression. Did you intend to use 'for x in y .. z do' instead? + + + + Indicates a method that either has no implementation in the type in which it is declared or that is virtual and has a default implementation. + Indicates a method that either has no implementation in the type in which it is declared or that is virtual and has a default implementation. + + + + Used in mutually recursive bindings, in property declarations, and with multiple constraints on generic parameters. + Used in mutually recursive bindings, in property declarations, and with multiple constraints on generic parameters. + + + + Used to give the current class object an object name. Also used to give a name to a whole pattern within a pattern match. + Used to give the current class object an object name. Also used to give a name to a whole pattern within a pattern match. + + + + Used to verify code during debugging. + Used to verify code during debugging. + + + + Used as the name of the base class object. + Used as the name of the base class object. + + + + In verbose syntax, indicates the start of a code block. + In verbose syntax, indicates the start of a code block. + + + + In verbose syntax, indicates the start of a class definition. + In verbose syntax, indicates the start of a class definition. + + + + Indicates an implementation of an abstract method; used together with an abstract method declaration to create a virtual method. + Indicates an implementation of an abstract method; used together with an abstract method declaration to create a virtual method. + + + + Used to declare a delegate. + Used to declare a delegate. + + + + Used in looping constructs or to execute imperative code. + Used in looping constructs or to execute imperative code. + + + + In verbose syntax, indicates the end of a block of code in a looping expression. + In verbose syntax, indicates the end of a block of code in a looping expression. + + + + Used to convert to a type that is lower in the inheritance chain. + Used to convert to a type that is lower in the inheritance chain. + + + + In a for expression, used when counting in reverse. + In a for expression, used when counting in reverse. + + + + Used in conditional branching. A short form of else if. + Used in conditional branching. A short form of else if. + + + + Used in conditional branching. + Used in conditional branching. + + + + In type definitions and type extensions, indicates the end of a section of member definitions. In verbose syntax, used to specify the end of a code block that starts with the begin keyword. + In type definitions and type extensions, indicates the end of a section of member definitions. In verbose syntax, used to specify the end of a code block that starts with the begin keyword. + + + + Used to declare an exception type. + Used to declare an exception type. + + + + Indicates that a declared program element is defined in another binary or assembly. + Indicates that a declared program element is defined in another binary or assembly. + + + + Used as a Boolean literal. + Used as a Boolean literal. + + + + Used together with try to introduce a block of code that executes regardless of whether an exception occurs. + Used together with try to introduce a block of code that executes regardless of whether an exception occurs. + + + + Used in looping constructs. + Used in looping constructs. + + + + Used in lambda expressions, also known as anonymous functions. + Used in lambda expressions, also known as anonymous functions. + + + + Used as a shorter alternative to the fun keyword and a match expression in a lambda expression that has pattern matching on a single argument. + Used as a shorter alternative to the fun keyword and a match expression in a lambda expression that has pattern matching on a single argument. + + + + Used to reference the top-level .NET namespace. + Used to reference the top-level .NET namespace. + + + + Used in conditional branching constructs. + Used in conditional branching constructs. + + + + Used for sequence expressions and, in verbose syntax, to separate expressions from bindings. + Used for sequence expressions and, in verbose syntax, to separate expressions from bindings. + + + + Used to specify a base class or base interface. + Used to specify a base class or base interface. + + + + Used to indicate a function that should be integrated directly into the caller's code. + Used to indicate a function that should be integrated directly into the caller's code. + + + + Used to declare and implement interfaces. + Used to declare and implement interfaces. + + + + Used to specify that a member is visible inside an assembly but not outside it. + Used to specify that a member is visible inside an assembly but not outside it. + + + + Used to specify a computation that is to be performed only when a result is needed. + Used to specify a computation that is to be performed only when a result is needed. + + + + Used to associate, or bind, a name to a value or function. + Used to associate, or bind, a name to a value or function. + + + + Used in computation expressions to bind a name to the result of another computation expression. + Used in asynchronous workflows to bind a name to the result of an asynchronous computation, or, in other computation expressions, used to bind a name to a result, which is of the computation type. + + + + Used to branch by comparing a value to a pattern. + Used to branch by comparing a value to a pattern. + + + + Used to declare a property or method in an object type. + Used to declare a property or method in an object type. + + + + Used to associate a name with a group of related types, values, and functions, to logically separate it from other code. + Used to associate a name with a group of related types, values, and functions, to logically separate it from other code. + + + + Used to declare a variable, that is, a value that can be changed. + Used to declare a variable, that is, a value that can be changed. + + + + Used to associate a name with a group of related types and modules, to logically separate it from other code. + Used to associate a name with a group of related types and modules, to logically separate it from other code. + + + + Used to declare, define, or invoke a constructor that creates or that can create an object. Also used in generic parameter constraints to indicate that a type must have a certain constructor. + Used to declare, define, or invoke a constructor that creates or that can create an object. Also used in generic parameter constraints to indicate that a type must have a certain constructor. + + + + Not actually a keyword. However, not struct in combination is used as a generic parameter constraint. + Not actually a keyword. However, not struct in combination is used as a generic parameter constraint. + + + + Indicates the absence of an object. Also used in generic parameter constraints. + Indicates the absence of an object. Also used in generic parameter constraints. + + + + Used in discriminated unions to indicate the type of categories of values, and in delegate and exception declarations. + Used in discriminated unions to indicate the type of categories of values, and in delegate and exception declarations. + + + + Used to make the contents of a namespace or module available without qualification. + Used to make the contents of a namespace or module available without qualification. + + + + Used with Boolean conditions as a Boolean or operator. Equivalent to ||. Also used in member constraints. + Used with Boolean conditions as a Boolean or operator. Equivalent to ||. Also used in member constraints. + + + + Used to implement a version of an abstract or virtual method that differs from the base version. + Used to implement a version of an abstract or virtual method that differs from the base version. + + + + Restricts access to a member to code in the same type or module. + Restricts access to a member to code in the same type or module. + + + + Allows access to a member from outside the type. + Allows access to a member from outside the type. + + + + Used to indicate that a function is recursive. + Used to indicate that a function is recursive. + + + + Used to provide a value for the result of the containing computation expression. + Used to indicate a value to provide as the result of a computation expression. + + + + Used to provide a value for the result of the containing computation expression, where that value itself comes from the result another computation expression. + Used to indicate a computation expression that, when evaluated, provides the result of the containing computation expression. + + + + Used in query expressions to specify what fields or columns to extract. Note that this is a contextual keyword, which means that it is not actually a reserved word and it only acts like a keyword in appropriate context. + Used in query expressions to specify what fields or columns to extract. Note that this is a contextual keyword, which means that it is not actually a reserved word and it only acts like a keyword in appropriate context. + + + + Used to indicate a method or property that can be called without an instance of a type, or a value member that is shared among all instances of a type. + Used to indicate a method or property that can be called without an instance of a type, or a value member that is shared among all instances of a type. + + + + Used to declare a structure type. Also used in generic parameter constraints. Used for OCaml compatibility in module definitions. + Used to declare a structure type. Also used in generic parameter constraints. Used for OCaml compatibility in module definitions. + + + + Used in conditional expressions. Also used to perform side effects after object construction. + Used in conditional expressions. Also used to perform side effects after object construction. + + + + Used in for loops to indicate a range. + Used in for loops to indicate a range. + + + + Used to introduce a block of code that might generate an exception. Used together with with or finally. + Used to introduce a block of code that might generate an exception. Used together with with or finally. + + + + Used to declare a class, record, structure, discriminated union, enumeration type, unit of measure, or type abbreviation. + Used to declare a class, record, structure, discriminated union, enumeration type, unit of measure, or type abbreviation. + + + + Used to convert to a type that is higher in the inheritance chain. + Used to convert to a type that is higher in the inheritance chain. + + + + Used instead of let for values that implement IDisposable" + Used instead of let for values that implement IDisposable" + + + + Used instead of let! in computation expressions for computation expression results that implement IDisposable. + Used instead of let! in computation expressions for computation expression results that implement IDisposable. + + + + Used in a signature to indicate a value, or in a type to declare a member, in limited situations. + Used in a signature to indicate a value, or in a type to declare a member, in limited situations. + + + + Indicates the .NET void type. Used when interoperating with other .NET languages. + Indicates the .NET void type. Used when interoperating with other .NET languages. + + + + Used for Boolean conditions (when guards) on pattern matches and to introduce a constraint clause for a generic type parameter. + Used for Boolean conditions (when guards) on pattern matches and to introduce a constraint clause for a generic type parameter. + + + + Introduces a looping construct. + Introduces a looping construct. + + + + Used together with the match keyword in pattern matching expressions. Also used in object expressions, record copying expressions, and type extensions to introduce member definitions, and to introduce exception handlers. + Used together with the match keyword in pattern matching expressions. Also used in object expressions, record copying expressions, and type extensions to introduce member definitions, and to introduce exception handlers. + + + + Used in a sequence expression to produce a value for a sequence. + Used in a sequence expression to produce a value for a sequence. + + + + Used in a computation expression to append the result of a given computation expression to a collection of results for the containing computation expression. + Used in a computation expression to append the result of a given computation expression to a collection of results for the containing computation expression. + + + + In function types, delimits arguments and return values. Yields an expression (in sequence expressions); equivalent to the yield keyword. Used in match expressions + In function types, delimits arguments and return values. Yields an expression (in sequence expressions); equivalent to the yield keyword. Used in match expressions + + + + Assigns a value to a variable. + Assigns a value to a variable. + + + + Converts a type to type that is higher in the hierarchy. + Converts a type to type that is higher in the hierarchy. + + + + Converts a type to a type that is lower in the hierarchy. + Converts a type to a type that is lower in the hierarchy. + + + + Delimits a typed code quotation. + Delimits a typed code quotation. + + + + Delimits a untyped code quotation. + Delimits a untyped code quotation. + + + + {0} '{1}' not found in assembly '{2}'. A possible cause may be a version incompatibility. You may need to explicitly reference the correct version of this assembly to allow all referenced components to use the correct version. + {0} '{1}' not found in assembly '{2}'. A possible cause may be a version incompatibility. You may need to explicitly reference the correct version of this assembly to allow all referenced components to use the correct version. + + + + {0} '{1}' not found in type '{2}' from assembly '{3}'. A possible cause may be a version incompatibility. You may need to explicitly reference the correct version of this assembly to allow all referenced components to use the correct version. + {0} '{1}' not found in type '{2}' from assembly '{3}'. A possible cause may be a version incompatibility. You may need to explicitly reference the correct version of this assembly to allow all referenced components to use the correct version. + + + + is + is + + + + This value is not a function and cannot be applied. + This value is not a function and cannot be applied. + + + + This value is not a function and cannot be applied. Did you intend to access the indexer via {0}.[index] instead? + This value is not a function and cannot be applied. Did you intend to access the indexer via {0}.[index] instead? + + + + This expression is not a function and cannot be applied. Did you intend to access the indexer via expr.[index] instead? + This expression is not a function and cannot be applied. Did you intend to access the indexer via expr.[index] instead? + + + + This value is not a function and cannot be applied. Did you forget to terminate a declaration? + This value is not a function and cannot be applied. Did you forget to terminate a declaration? + + + + The argument names in the signature '{0}' and implementation '{1}' do not match. The argument name from the signature file will be used. This may cause problems when debugging or profiling. + The argument names in the signature '{0}' and implementation '{1}' do not match. The argument name from the signature file will be used. This may cause problems when debugging or profiling. + + + + An error occurred while reading the F# metadata of assembly '{0}'. A reserved construct was utilized. You may need to upgrade your F# compiler or use an earlier version of the assembly that doesn't make use of a specific construct. + An error occurred while reading the F# metadata of assembly '{0}'. A reserved construct was utilized. You may need to upgrade your F# compiler or use an earlier version of the assembly that doesn't make use of a specific construct. + + + + This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. + This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. + + + + This expression returns a value of type '{0}' but is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to use the expression as a value in the sequence then use an explicit 'yield'. + This expression returns a value of type '{0}' but is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to use the expression as a value in the sequence then use an explicit 'yield'. + + + + This expression returns a value of type '{0}' but is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to use the expression as a value in the sequence then use an explicit 'yield!'. + This expression returns a value of type '{0}' but is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to use the expression as a value in the sequence then use an explicit 'yield!'. + + + + Used in computation expressions to pattern match directly over the result of another computation expression. + Used in computation expressions to pattern match directly over the result of another computation expression. + + + + The file '{0}' changed on disk unexpectedly, please reload. + The file '{0}' changed on disk unexpectedly, please reload. + + + + The byref pointer is readonly, so this write is not permitted. + The byref pointer is readonly, so this write is not permitted. + + + + A value must be mutable in order to mutate the contents or take the address of a value type, e.g. 'let mutable x = ...' + A value must be mutable in order to mutate the contents or take the address of a value type, e.g. 'let mutable x = ...' + + + + A ReadOnly attribute has been applied to a struct type with a mutable field. + A ReadOnly attribute has been applied to a struct type with a mutable field. + + + + A byref pointer returned by a function or method is implicitly dereferenced as of F# 4.5. To acquire the return value as a pointer, use the address-of operator, e.g. '&f(x)' or '&obj.Method(arg1, arg2)'. + A byref pointer returned by a function or method is implicitly dereferenced as of F# 4.5. To acquire the return value as a pointer, use the address-of operator, e.g. '&f(x)' or '&obj.Method(arg1, arg2)'. + + + + A type annotated with IsByRefLike must also be a struct. Consider adding the [<Struct>] attribute to the type. + A type annotated with IsByRefLike must also be a struct. Consider adding the [<Struct>] attribute to the type. + + + + The address of the variable '{0}' or a related expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + The address of the variable '{0}' or a related expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + + + + This value can't be assigned because the target '{0}' may refer to non-stack-local memory, while the expression being assigned is assessed to potentially refer to stack-local memory. This is to help prevent pointers to stack-bound memory escaping their scope. + This value can't be assigned because the target '{0}' may refer to non-stack-local memory, while the expression being assigned is assessed to potentially refer to stack-local memory. This is to help prevent pointers to stack-bound memory escaping their scope. + + + + A value defined in a module must be mutable in order to take its address, e.g. 'let mutable x = ...' + A value defined in a module must be mutable in order to take its address, e.g. 'let mutable x = ...' + + + + A type annotated with IsReadOnly must also be a struct. Consider adding the [<Struct>] attribute to the type. + A type annotated with IsReadOnly must also be a struct. Consider adding the [<Struct>] attribute to the type. + + + + Struct members cannot return the address of fields of the struct by reference + Struct members cannot return the address of fields of the struct by reference + + + + The function or method call cannot be used at this point, because one argument that is a byref of a non-stack-local Span or IsByRefLike type is used with another argument that is a stack-local Span or IsByRefLike type. This is to ensure the address of the local value does not escape its scope. + The function or method call cannot be used at this point, because one argument that is a byref of a non-stack-local Span or IsByRefLike type is used with another argument that is a stack-local Span or IsByRefLike type. This is to ensure the address of the local value does not escape its scope. + + + + The address of a value returned from the expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + The address of a value returned from the expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + + + + The Span or IsByRefLike variable '{0}' cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + The Span or IsByRefLike variable '{0}' cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + + + + A Span or IsByRefLike value returned from the expression cannot be used at ths point. This is to ensure the address of the local value does not escape its scope. + A Span or IsByRefLike value returned from the expression cannot be used at ths point. This is to ensure the address of the local value does not escape its scope. + + + + Cannot take the address of the value returned from the expression. Assign the returned value to a let-bound value before taking the address. + Cannot take the address of the value returned from the expression. Assign the returned value to a let-bound value before taking the address. + + + + The Span or IsByRefLike expression cannot be returned from this function or method, because it is composed using elements that may escape their scope. + The Span or IsByRefLike expression cannot be returned from this function or method, because it is composed using elements that may escape their scope. + + + + This type does not inherit Attribute, it will not work correctly with other .NET languages. + This type does not inherit Attribute, it will not work correctly with other .NET languages. + + + + The exception '{0}' does not have a field named '{1}'. + The exception '{0}' does not have a field named '{1}'. + + + + The constructor does not have a field named '{0}'. + The constructor does not have a field named '{0}'. + + + + Active patterns do not have fields. This syntax is invalid. + Active patterns do not have fields. This syntax is invalid. + + + + + \ No newline at end of file diff --git a/src/fsharp/xlf/FSComp.txt.es.xlf b/src/fsharp/xlf/FSComp.txt.es.xlf new file mode 100644 index 00000000000..cab140a050a --- /dev/null +++ b/src/fsharp/xlf/FSComp.txt.es.xlf @@ -0,0 +1,7087 @@ + + + + + + The namespace '{0}' is not defined. + El espacio de nombres "{0}" no está definido. + + + + The namespace or module '{0}' is not defined. + El espacio de nombres o módulo "{0}" no está definido. + + + + The field, constructor or member '{0}' is not defined. + El campo, constructor o miembro "{0}" no está definido. + + + + The value, constructor, namespace or type '{0}' is not defined. + El valor, constructor, espacio de nombres o tipo "{0}" no está definido. + + + + The value or constructor '{0}' is not defined. + El valor o constructor "{0}" no está definido. + + + + The value, namespace, type or module '{0}' is not defined. + El valor, espacio de nombres, tipo o módulo "{0}" no está definido. + + + + The constructor, module or namespace '{0}' is not defined. + El constructor, módulo o espacio de nombres "{0}" no está definido. + + + + The type '{0}' is not defined. + El tipo "{0}" no está definido. + + + + The type '{0}' is not defined in '{1}'. + El tipo '{0}' no está definido en '{1}'. + + + + The record label or namespace '{0}' is not defined. + La etiqueta de registro o el espacio de nombres "{0}" no está definido. + + + + The record label '{0}' is not defined. + La etiqueta de registro '{0}' no está definida. + + + + Maybe you want one of the following: + Puede elegir una de las opciones siguientes: + + + + The type parameter {0} is not defined. + El parámetro de tipo "{0}" no está definido. + + + + The pattern discriminator '{0}' is not defined. + El discriminador de patrones "{0}" no está definido. + + + + Replace with '{0}' + Reemplazar por "{0}" + + + + Add . for indexer access. + Agregar . para el acceso de indizador. + + + + All elements of a list must be of the same type as the first element, which here is '{0}'. This element has type '{1}'. + Todas las ramas de una expresión de constructor de lista deben tener el mismo tipo. Se esperaba que esta expresión tuviera el tipo "{0}", pero aquí tiene el tipo "{1}". + + + + All elements of an array must be of the same type as the first element, which here is '{0}'. This element has type '{1}'. + Todos los elementos de una expresión de constructor de matriz deben tener el mismo tipo. Se esperaba que esta expresión tuviera el tipo "{0}", pero aquí tiene el tipo "{1}". + + + + This 'if' expression is missing an 'else' branch. Because 'if' is an expression, and not a statement, add an 'else' branch which also returns a value of type '{0}'. + La expresión "if" no tiene una rama "else". La rama "then" tiene el tipo '{0}'. Dado que "if" es una expresión y no una instrucción, agregue una rama "else" que devuelva un valor del mismo tipo. + + + + The 'if' expression needs to have type '{0}' to satisfy context type requirements. It currently has type '{1}'. + La expresión "if" debe tener el tipo "{0}" para cumplir con los requisitos del tipo de contexto. Actualmente tiene el tipo "{1}". + + + + All branches of an 'if' expression must return values of the same type as the first branch, which here is '{0}'. This branch returns a value of type '{1}'. + Todas las ramas de una expresión "if" deben devolver el mismo tipo. Se esperaba que esta expresión tuviera el tipo "{0}", pero aquí tiene el tipo "{1}". + + + + All branches of a pattern match expression must return values of the same type as the first branch, which here is '{0}'. This branch returns a value of type '{1}'. + Todas las ramas de una expresión de coincidencia de patrón deben devolver valores del mismo tipo. La primera rama devolvió un valor de tipo "{0}", pero esta rama devolvió un valor de tipo "\{1 \}". + + + + A pattern match guard must be of type 'bool', but this 'when' expression is of type '{0}'. + Un protector de coincidencia de patrones debe ser del tipo "bool", pero esta expresión "when" es del tipo "{0}". + + + + A ';' is used to separate field values in records. Consider replacing ',' with ';'. + El carácter ";" se usa para separar los valores de los campos en los registros. Considere la posibilidad de reemplazar "," por ";". + + + + The '!' operator is used to dereference a ref cell. Consider using 'not expr' here. + El operador '!' se utiliza para desreferenciar una celda ref. Considere utilizar 'no expr' aquí. + + + + The non-generic type '{0}' does not expect any type arguments, but here is given {1} type argument(s) + El tipo no genérico '{0}' no espera ningún argumento de tipo, pero aquí se le proporcionan {1} argumentos de tipo. + + + + Consider using 'return!' instead of 'return'. + Considere la posibilidad de usar "return!" en lugar de "return". + + + + Consider using 'yield!' instead of 'yield'. + Considere la posibilidad de usar "yield!" en lugar de "yield". + + + + \nA tuple type is required for one or more arguments. Consider wrapping the given arguments in additional parentheses or review the definition of the interface. + \nSe requiere un tipo de tupla para uno o varios argumentos. Considere la posibilidad de incluir los argumentos dados entre paréntesis adicionales o revise la definición de la interfaz. + + + + Invalid warning number '{0}' + Número de advertencia '{0}' no válido. + + + + Invalid version string '{0}' + Cadena de versión '{0}' no válida. + + + + Invalid version file '{0}' + Archivo de versión '{0}' no válido. + + + + Microsoft (R) F# Compiler version {0} + Compilador de Microsoft (R) F#, versión {0} + + + + F# Compiler for F# {0} + Compilador F# para F# {0} + + + + Problem with filename '{0}': {1} + Problema con el nombre de archivo '{0}': {1}. + + + + No inputs specified + No se especificaron entradas + + + + The '--pdb' option requires the '--debug' option to be used + La opción '--pdb' requiere el uso de la opción '--debug'. + + + + The search directory '{0}' is invalid + El directorio de búsqueda '{0}' no es válido. + + + + The search directory '{0}' could not be found + No se encontró el directorio de búsqueda '{0}'. + + + + '{0}' is not a valid filename + '{0}' no es un nombre de archivo válido. + + + + '{0}' is not a valid assembly name + '{0}' no es un nombre de ensamblado válido. + + + + Unrecognized privacy setting '{0}' for managed resource, valid options are 'public' and 'private' + Configuración de privacidad '{0}' no reconocida para un recurso administrado. Las opciones válidas son 'public' y 'private'. + + + + Multiple references to '{0}.dll' are not permitted + No se permiten varias referencias a '{0}.dll'. + + + + Could not read version from mscorlib.dll + No se pudo leer la versión de mscorlib.dll. + + + + Unable to read assembly '{0}' + No se puede leer el ensamblado '{0}'. + + + + Assembly resolution failure at or near this location + Error de resolución de ensamblado en esta ubicación o cerca de ella. + + + + The declarations in this file will be placed in an implicit module '{0}' based on the file name '{1}'. However this is not a valid F# identifier, so the contents will not be accessible from other files. Consider renaming the file or adding a 'module' or 'namespace' declaration at the top of the file. + Las declaraciones de este archivo se pondrán en un módulo implícito '{0}' basado en el nombre de archivo '{1}'. Sin embargo, este no es un identificador de F# válido; por tanto, el contenido no será accesible desde otros archivos. Considere cambiar el nombre del archivo o agregar una declaración 'module' o 'namespace' al principio del archivo. + + + + Files in libraries or multiple-file applications must begin with a namespace or module declaration, e.g. 'namespace SomeNamespace.SubNamespace' or 'module SomeNamespace.SomeModule'. Only the last source file of an application may omit such a declaration. + Los archivos en bibliotecas o aplicaciones de varios archivos deben comenzar con una declaración de espacio de nombres o de módulo; por ejemplo, 'namespace SomeNamespace.SubNamespace' o 'module SomeNamespace.SomeModule'. Solamente el último archivo de código fuente de una aplicación puede omitir tal declaración. + + + + Files in libraries or multiple-file applications must begin with a namespace or module declaration. When using a module declaration at the start of a file the '=' sign is not allowed. If this is a top-level module, consider removing the = to resolve this error. + Los archivos en bibliotecas o aplicaciones de varios archivos deben comenzar con una declaración de espacio de nombres o de módulo. Cuando se usa una declaración de módulo al principio de un archivo, el signo "=" no se permite. Si se trata de un módulo de nivel superior, considere la posibilidad de quitar el signo = para resolver el error. + + + + This file contains multiple declarations of the form 'module SomeNamespace.SomeModule'. Only one declaration of this form is permitted in a file. Change your file to use an initial namespace declaration and/or use 'module ModuleName = ...' to define your modules. + Este archivo contiene varias declaraciones con el formato 'module SomeNamespace.SomeModule'. Solo se permite una declaración con este formato en un archivo. Cambie el archivo para usar una declaración de espacio de nombres inicial o use 'module ModuleName = ...' para definir los módulos. + + + + Option requires parameter: {0} + La opción requiere el parámetro: {0}. + + + + Source file '{0}' could not be found + No se encuentra el archivo de código fuente '{0}'. + + + + The file extension of '{0}' is not recognized. Source files must have extension .fs, .fsi, .fsx, .fsscript, .ml or .mli. + No se reconoce la extensión de archivo de '{0}'. Los archivos de código fuente deben tener la extensión .fs, .fsi, .fsx, .fsscript, .ml o .mli. + + + + Could not resolve assembly '{0}' + No se pudo resolver el ensamblado '{0}'. + + + + Could not resolve assembly '{0}' required by '{1}' + No se pudo resolver el ensamblado '{0}' requerido por '{1}'. + + + + Error opening binary file '{0}': {1} + Error al abrir el archivo binario '{0}': {1}. + + + + The F#-compiled DLL '{0}' needs to be recompiled to be used with this version of F# + El archivo DLL '{0}' compilado por F# debe recompilarse para poder usarlo con esta versión de F#. + + + + Invalid directive. Expected '#I \"<path>\"'. + Directiva no válida. Se esperaba '#I \"<ruta de acceso>\"'. + + + + Invalid directive. Expected '#r \"<file-or-assembly>\"'. + Directiva no válida. Se esperaba '#r \"<archivo-o-ensamblado>\"'. + + + + Invalid directive. Expected '#load \"<file>\" ... \"<file>\"'. + Directiva no válida. Se esperaba '#load \"<archivo>\" ... \"<archivo>\"'. + + + + Invalid directive. Expected '#time', '#time \"on\"' or '#time \"off\"'. + Directiva no válida. Se esperaba '#time', '#time \"on\"' o '#time \"off\"'. + + + + Directives inside modules are ignored + Las directivas dentro de módulos se omiten. + + + + A signature for the file or module '{0}' has already been specified + Ya se ha especificado una signatura para el archivo o módulo '{0}'. + + + + An implementation of file or module '{0}' has already been given. Compilation order is significant in F# because of type inference. You may need to adjust the order of your files to place the signature file before the implementation. In Visual Studio files are type-checked in the order they appear in the project file, which can be edited manually or adjusted using the solution explorer. + Ya se ha proporcionado una implementación del archivo o módulo '{0}'. El orden de compilación es importante en F# debido a la inferencia de tipos. Puede ser necesario ajustar el orden de los archivos para poner el archivo de signatura antes de la implementación. En Visual Studio, el tipo de los archivos se comprueba en el orden en que aparecen en el archivo del proyecto, que se puede editar manualmente o ajustarse con el Explorador de soluciones. + + + + An implementation of the file or module '{0}' has already been given + Ya se ha proporcionado una implementación del archivo o módulo '{0}'. + + + + The signature file '{0}' does not have a corresponding implementation file. If an implementation file exists then check the 'module' and 'namespace' declarations in the signature and implementation files match. + El archivo de signatura '{0}' no tiene un archivo de implementación correspondiente. Si existe un archivo de implementación, compruebe que coinciden las declaraciones 'module' y 'namespace' de los archivos de signatura e implementación. + + + + '{0}' is not a valid integer argument + '{0}' no es un argumento de entero válido. + + + + '{0}' is not a valid floating point argument + '{0}' no es un argumento de punto flotante válido. + + + + Unrecognized option: '{0}' + Opción no reconocida: '{0}'. + + + + Invalid module or namespace name + Nombre de módulo o espacio de nombres no válido. + + + + Error reading/writing metadata for the F# compiled DLL '{0}'. Was the DLL compiled with an earlier version of the F# compiler? (error: '{1}'). + Error al leer o escribir metadatos para el archivo DLL '{0}' compilado con F#. ¿Se había compilado el archivo DLL con una versión anterior del compilador de F#? (Error: '{1}'). + + + + The type/module '{0}' is not a concrete module or type + El tipo o modelo '{0}' no es un modelo o un tipo concreto. + + + + The type '{0}' has an inline assembly code representation + El tipo '{0}' tiene una representación de código de ensamblado alineado. + + + + A namespace and a module named '{0}' both occur in two parts of this assembly + Hay un espacio de nombres y un módulo con el nombre '{0}' en dos partes de este ensamblado. + + + + Two modules named '{0}' occur in two parts of this assembly + Hay dos módulos con el nombre '{0}' en dos partes de este ensamblado. + + + + Two type definitions named '{0}' occur in namespace '{1}' in two parts of this assembly + Hay dos definiciones de tipo con el nombre '{0}' en el espacio de nombres '{1}' en dos partes de este ensamblado. + + + + A module and a type definition named '{0}' occur in namespace '{1}' in two parts of this assembly + Hay un módulo y una definición de tipo con el nombre '{0}' en el espacio de nombres '{1}' en dos partes de este ensamblado. + + + + Invalid member signature encountered because of an earlier error + Se encontró una signatura de miembro no válida debido a un error anterior. + + + + This value does not have a valid property setter type + Este valor no tiene un tipo de establecedor de propiedad válido. + + + + Invalid form for a property getter. At least one '()' argument is required when using the explicit syntax. + Formato no válido para un captador de propiedad. Se necesita al menos un argumento '()' cuando se usa la sintaxis explícita. + + + + Invalid form for a property setter. At least one argument is required. + Formato no válido para un establecedor de propiedad. Se necesita la menos un argumento. + + + + Unexpected use of a byref-typed variable + Uso inesperado de una variable de tipo byref. + + + + Invalid mutation of a constant expression. Consider copying the expression to a mutable local, e.g. 'let mutable x = ...'. + Mutación no válida de una expresión constante. Considere copiar la expresión en un local mutable; por ejemplo, 'let mutable x = ...'. + + + + The value has been copied to ensure the original is not mutated by this operation or because the copy is implicit when returning a struct from a member and another member is then accessed + El valor se ha copiado para garantizar que esta operación no mute el original. + + + + Recursively defined values cannot appear directly as part of the construction of a tuple value within a recursive binding + Los valores definidos de forma recursiva no pueden aparecer directamente como parte de la construcción de un valor de tupla en un enlace recursivo. + + + + Recursive values cannot appear directly as a construction of the type '{0}' within a recursive binding. This feature has been removed from the F# language. Consider using a record instead. + Los valores recursivos no pueden aparecer directamente como una construcción del tipo '{0}' en un enlace recursivo. Esta característica se ha quitado del lenguaje F#. Considere el uso de un registro en su lugar. + + + + Recursive values cannot be directly assigned to the non-mutable field '{0}' of the type '{1}' within a recursive binding. Consider using a mutable field instead. + Los valores recursivos no se pueden asignar directamente al campo inmutable '{0}' del tipo '{1}' en un enlace recursivo. Considere el uso de un campo mutable en su lugar. + + + + Unexpected decode of AutoOpenAttribute + Descodificación inesperada de AutoOpenAttribute. + + + + Unexpected decode of InternalsVisibleToAttribute + Descodificación inesperada de InternalsVisibleToAttribute. + + + + Unexpected decode of InterfaceDataVersionAttribute + Descodificación inesperada de InterfaceDataVersionAttribute. + + + + Active patterns cannot return more than 7 possibilities + Los patrones activos no pueden devolver más de 7 posibilidades. + + + + This is not a valid constant expression or custom attribute value + Esta no es una expresión constante o un valor de atributo personalizado válido. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe mutability attributes differ + El módulo '{0}' contiene\n {1} \npero su signatura especifica\n {2} \nLos atributos de mutabilidad difieren. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe names differ + El módulo '{0}' contiene\n {1} \npero su signatura especifica\n {2} \nLos nombres difieren. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe compiled names differ + El módulo '{0}' contiene\n {1} \npero su signatura especifica\n {2} \nLos nombres compilados difieren. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe display names differ + El módulo '{0}' contiene\n {1} \npero su signatura especifica\n {2} \nLos nombres para mostrar difieren. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe accessibility specified in the signature is more than that specified in the implementation + El módulo '{0}' contiene\n {1} \npero su signatura especifica\n {2} \nLa accesibilidad especificada en la signatura es superior a la especificada en la implementación. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe inline flags differ + El módulo '{0}' contiene\n {1} \npero su signatura especifica\n {2} \nLas marcas insertadas difieren. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe literal constant values and/or attributes differ + El módulo '{0}' contiene\n {1} \npero su signatura especifica\n {2} \nLos valores constantes de literal y/o los atributos difieren. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is a type function and the other is not. The signature requires explicit type parameters if they are present in the implementation. + El módulo '{0}' contiene\n {1} \npero su signatura especifica\n {2} \nUno es una función de tipo y el otro no. La signatura requiere parámetros de tipo explícitos si están presentes en la implementación. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe respective type parameter counts differ + El módulo '{0}' contiene\n {1} \npero su signatura especifica\n {2} \nEl recuento de parámetros de tipo respectivos difieren. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe types differ + El módulo '{0}' contiene\n {1} \npero su signatura especifica\n {2} \nLos tipos difieren. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is an extension member and the other is not + El módulo '{0}' contiene\n {1} \npero su signatura especifica\n {2} \nUno es un miembro de extensión y el otro no. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nAn arity was not inferred for this value + El módulo '{0}' contiene\n {1} \npero la signatura especifica\n {2} \nNo se infirió una aridad para este valor. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe number of generic parameters in the signature and implementation differ (the signature declares {3} but the implementation declares {4} + El módulo '{0}' contiene\n {1} \npero su signatura especifica\n {2} \nEl número de parámetros genéricos en la signatura y la implementación difiere (la signatura declara {3} pero la implementación declara {4}). + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe generic parameters in the signature and implementation have different kinds. Perhaps there is a missing [<Measure>] attribute. + El módulo "{0}" contiene\n {1} \npero su signatura especifica\n {2} \nLos parámetros genéricos de la signatura y la implementación tienen tipos diferentes. Puede que falte un atributo [<Measure>]. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe arities in the signature and implementation differ. The signature specifies that '{3}' is function definition or lambda expression accepting at least {4} argument(s), but the implementation is a computed function value. To declare that a computed function value is a permitted implementation simply parenthesize its type in the signature, e.g.\n\tval {5}: int -> (int -> int)\ninstead of\n\tval {6}: int -> int -> int. + El módulo '{0}' contiene\n {1} \npero su signatura especifica\n {2} \nLas aridades de la signatura y la implementación difieren. La signatura especifica que '{3}' es una definición de función o una expresión lambda que acepta al menos {4} argumentos, pero la implementación es un valor de función calculado. Para declarar que un valor de función calculado es una implementación permitida, simplemente ponga entre paréntesis el tipo en la signatura; por ejemplo\n\tval {5}: int -> (int -> int)\nen lugar de\n\tval {6}: int -> int -> int. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe CLI member names differ + El módulo '{0}' contiene\n {1} \npero su signatura especifica\n {2} \nLos nombres de miembro CLI difieren. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is static and the other isn't + El módulo '{0}' contiene\n {1} \npero su signatura especifica\n {2} \nUno es estático y el otro no. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is virtual and the other isn't + El módulo '{0}' contiene\n {1} \npero su signatura especifica\n {2} \nUno es virtual y el otro no. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is abstract and the other isn't + El módulo '{0}' contiene\n {1} \npero su signatura especifica\n {2} \nUno es abstracto y el otro no. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is final and the other isn't + El módulo '{0}' contiene\n {1} \npero su signatura especifica\n {2} \nUno es final y el otro no. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is marked as an override and the other isn't + El módulo '{0}' contiene\n {1} \npero su signatura especifica\n {2} \nUno está marcado como invalidación y el otro no. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is a constructor/property and the other is not + El módulo '{0}' contiene\n {1} \npero su signatura especifica\n {2} \nUno es un constructor o propiedad y el otro no. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe compiled representation of this method is as a static member but the signature indicates its compiled representation is as an instance member + El módulo '{0}' contiene\n {1} \npero su signatura especifica\n {2} \nLa representación compilada de este método es como un miembro estático, pero la signatura indica que su representación compilada es como un miembro de instancia. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe compiled representation of this method is as an instance member, but the signature indicates its compiled representation is as a static member + El módulo '{0}' contiene\n {1} \npero su signatura especifica\n {2} \nLa representación compilada de este método es como un miembro de instancia, pero la signatura indica que su representación compilada es como un miembro estático. + + + + The {0} definitions in the signature and implementation are not compatible because the names differ. The type is called '{1}' in the signature file but '{2}' in implementation. + Las definiciones de {0} en la signatura y la implementación no son compatibles porque los nombres son diferentes. El tipo se denomina "{1}" en el archivo de la signatura pero "{2}" en la implementación. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the respective type parameter counts differ + Las definiciones de {0} para el tipo "{1}" en la signatura y la implementación no son compatibles porque los recuentos de parámetros de tipo respectivos difieren + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the accessibility specified in the signature is more than that specified in the implementation + Las definiciones de {0} para el tipo "{1}" en la signatura y la implementación no son compatibles porque la accesibilidad especificada en la signatura es superior a la especificada en la implementación + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature requires that the type supports the interface {2} but the interface has not been implemented + Las definiciones de {0} para el tipo "{1}" en la signatura y la implementación no son compatibles porque la signatura requiere que el tipo admita la interfaz {2}, pero esta interfaz no se ha implementado + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation says this type may use nulls as a representation but the signature does not + Las definiciones de {0} para el tipo "{1}" en la signatura y la implementación no son compatibles porque la implementación indica que este tipo puede usar valores NULL como una representación pero la signatura no + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation says this type may use nulls as an extra value but the signature does not + Las definiciones de {0} para el tipo "{1}" en la signatura y la implementación no son compatibles porque la implementación indica que este tipo puede usar valores NULL como un valor extra pero la signatura no + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature says this type may use nulls as a representation but the implementation does not + Las definiciones de {0} para el tipo "{1}" en la signatura y la implementación no son compatibles porque la signatura indica que este tipo puede usar valores NULL como una representación pero la implementación no + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature says this type may use nulls as an extra value but the implementation does not + Las definiciones de {0} para el tipo "{1}" en la signatura y la implementación no son compatibles porque la signatura indica que este tipo puede usar valores NULL como un valor extra pero la implementación no + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation type is sealed but the signature implies it is not. Consider adding the [<Sealed>] attribute to the signature. + Las definiciones de {0} para el tipo "{1}" en la signatura y la implementación no son compatibles porque el tipo de implementación está sellado y la signatura implica que no lo esté. Considere agregar el atributo [<Sealed>] a la signatura. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation type is not sealed but signature implies it is. Consider adding the [<Sealed>] attribute to the implementation. + Las definiciones de {0} para el tipo "{1}" en la signatura y la implementación no son compatibles porque el tipo de implementación no está sellado y la signatura implica que lo esté. Considere agregar el atributo [<Sealed>] a la implementación. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation is an abstract class but the signature is not. Consider adding the [<AbstractClass>] attribute to the signature. + Las definiciones de {0} para el tipo "{1}" en la signatura y la implementación no son compatibles porque la implementación es una clase abstracta pero la signatura no. Considere agregar el atributo [<AbstractClass>] a la signatura. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature is an abstract class but the implementation is not. Consider adding the [<AbstractClass>] attribute to the implementation. + Las definiciones de {0} para el tipo "{1}" en la signatura y la implementación no son compatibles porque la signatura es una clase abstracta pero la implementación no. Considere agregar el atributo [<AbstractClass>] a la implementación. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the types have different base types + Las definiciones de {0} para el tipo "{1}" en la signatura y la implementación no son compatibles porque los tipos tienen tipos base diferentes + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the number of {2}s differ + Las definiciones de {0} para el tipo "{1}" en la signatura y la implementación no son compatibles porque el número de {2}s difiere. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature defines the {2} '{3}' but the implementation does not (or does, but not in the same order) + Las definiciones de {0} para el tipo "{1}" en la signatura y la implementación no son compatibles porque la signatura define el {2} "{3}" pero la implementación no (o sí lo define pero en otro orden) + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation defines the {2} '{3}' but the signature does not (or does, but not in the same order) + Las definiciones de {0} para el tipo "{1}" en la signatura y la implementación no son compatibles porque la implementación define el {2} "{3}"' pero la signatura no (o sí lo define pero en otro orden) + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation defines a struct but the signature defines a type with a hidden representation + Las definiciones de {0} para el tipo "{1}" en la signatura y la implementación no son compatibles porque la implementación define un struct pero la signatura define un tipo con una representación oculta + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because a CLI type representation is being hidden by a signature + Las definiciones de {0} para el tipo "{1}" en la signatura y la implementación no son compatibles porque una signatura oculta una representación de tipo CLI + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because a type representation is being hidden by a signature + Las definiciones de {0} para el tipo "{1}" en la signatura y la implementación no son compatibles porque una signatura oculta una representación de tipo + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the types are of different kinds + Las definiciones de {0} para el tipo "{1}" en la signatura y la implementación no son compatibles porque los tipos son de tipo diferente + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the IL representations differ + Las definiciones de {0} para el tipo "{1}" en la signatura y la implementación no son compatibles porque las representaciones de IL difieren + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the representations differ + Las definiciones de {0} para el tipo "{1}" en la signatura y la implementación no son compatibles porque las representaciones difieren + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the field {2} was present in the implementation but not in the signature + Las definiciones de {0} para el tipo "{1}" en la signatura y la implementación no son compatibles porque el campo {2} estaba presente en la implementación pero no en la signatura + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the order of the fields is different in the signature and implementation + Las definiciones de {0} para el tipo "{1}" en la signatura y la implementación no son compatibles porque el orden de los campos es diferente en la signatura y la implementación + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the field {2} was required by the signature but was not specified by the implementation + Las definiciones de {0} para el tipo "{1}" de la signatura y la implementación no son compatibles porque la signatura requería el campo {2} pero la implementación no lo especificó + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the field '{2}' was present in the implementation but not in the signature. Struct types must now reveal their fields in the signature for the type, though the fields may still be labelled 'private' or 'internal'. + Las definiciones de {0} para el tipo "{1}" en la signatura y la implementación no son compatibles porque el campo "{2}" estaba presente en la implementación pero no en la signatura. Los tipos struct deben revelar ahora sus campos en la signatura del tipo, aunque los campos pueden continuar etiquetados como "private" o "internal". + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the abstract member '{2}' was required by the signature but was not specified by the implementation + Las definiciones de {0} para el tipo "{1}" de la signatura y la implementación no son compatibles porque la signatura requería el miembro abstracto "{2}" pero la implementación no lo especificó + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the abstract member '{2}' was present in the implementation but not in the signature + Las definiciones de {0} para el tipo "{1}" en la signatura y la implementación no son compatibles porque el miembro abstracto "{2}" estaba presente en la implementación pero no en la signatura + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature declares a {2} while the implementation declares a {3} + Las definiciones de {0} para el tipo "{1}" en la signatura y la implementación no son compatibles porque la signatura declara un {2} mientras la implementación declara un {3} + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the abbreviations differ: {2} versus {3} + Las definiciones de {0} para el tipo "{1}" de la signatura y la implementación no son compatibles porque las abreviaciones difieren: {2} frente a {3} + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because an abbreviation is being hidden by a signature. The abbreviation must be visible to other CLI languages. Consider making the abbreviation visible in the signature. + Las definiciones de {0} para el tipo "{1}" de la signatura y la implementación no son compatibles porque una signatura oculta una abreviación. La abreviación debe estar visible para otros lenguajes CLI. Considere hacer que la abreviación esté visible en la signatura. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature has an abbreviation while the implementation does not + Las definiciones de {0} para el tipo "{1}" en la signatura y la implementación no son compatibles porque la signatura tiene una abreviación y la implementación no + + + + The module contains the constructor\n {0} \nbut its signature specifies\n {1} \nThe names differ + El módulo contiene el constructor\n {0} \npero su signatura especifica\n {1} \nLos nombres difieren. + + + + The module contains the constructor\n {0} \nbut its signature specifies\n {1} \nThe respective number of data fields differ + El módulo contiene el constructor\n {0} \npero su signatura especifica\n {1} \nEl número respectivo de campos de datos difiere. + + + + The module contains the constructor\n {0} \nbut its signature specifies\n {1} \nThe types of the fields differ + El módulo contiene el constructor\n {0} \npero su signatura especifica\n {1} \nLos tipos de los campos difieren. + + + + The module contains the constructor\n {0} \nbut its signature specifies\n {1} \nthe accessibility specified in the signature is more than that specified in the implementation + El módulo contiene el constructor\n {0} \npero su signatura especifica\n {1} \nLa accesibilidad especificada en la signatura es superior a la especificada en la implementación. + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe names differ + El módulo contiene el campo\n {0} \npero su signatura especifica\n {1} \nLos nombres difieren. + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nthe accessibility specified in the signature is more than that specified in the implementation + El módulo contiene el campo\n {0} \npero su signatura especifica\n {1} \nLa accesibilidad especificada en la signatura es superior a la especificada en la implementación. + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe 'static' modifiers differ + El módulo contiene el campo\n {0} \npero su signatura especifica\n {1} \nLos modificadores 'static' difieren. + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe 'mutable' modifiers differ + El módulo contiene el campo\n {0} \npero su signatura especifica\n {1} \nLos modificadores 'mutable' difieren. + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe 'literal' modifiers differ + El módulo contiene el campo\n {0} \npero su signatura especifica\n {1} \nLos modificadores 'literal' difieren. + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe types differ + El módulo contiene el campo\n {0} \npero su signatura especifica\n {1} \nLos tipos difieren. + + + + The implicit instantiation of a generic construct at or near this point could not be resolved because it could resolve to multiple unrelated types, e.g. '{0}' and '{1}'. Consider using type annotations to resolve the ambiguity + No se pudo resolver la creación de instancia implícita de una construcción genérica en este punto o cerca de él porque se podía resolver en varios tipos no relacionados; por ejemplo, '{0}' y '{1}'. Considere el uso de anotaciones de tipo para resolver la ambigüedad. + + + + Could not resolve the ambiguity inherent in the use of a 'printf'-style format string + No se pudo resolver la ambigüedad inherente en el uso de una cadena de formato de tipo 'printf'. + + + + Could not resolve the ambiguity in the use of a generic construct with an 'enum' constraint at or near this position + No se pudo resolver la ambigüedad en el uso de una construcción genérica con una restricción 'enum' en esta posición o cerca de ella. + + + + Could not resolve the ambiguity in the use of a generic construct with a 'delegate' constraint at or near this position + No se pudo resolver la ambigüedad en el uso de una construcción genérica con una restricción 'delegate' en esta posición o cerca de ella. + + + + Invalid value + Valor no válido + + + + The signature and implementation are not compatible because the respective type parameter counts differ + La signatura y la implementación no son compatibles porque los recuentos de parámetros de tipo respectivos difieren. + + + + The signature and implementation are not compatible because the type parameter in the class/signature has a different compile-time requirement to the one in the member/implementation + La signatura y la implementación no son compatibles porque el parámetro de tipo de la clase o signatura tiene un requisito en tiempo de compilación diferente al del miembro o implementación. + + + + The signature and implementation are not compatible because the declaration of the type parameter '{0}' requires a constraint of the form {1} + La signatura y la implementación no son compatibles porque la declaración del parámetro de tipo '{0}' requiere una restricción con el formato {1}. + + + + The signature and implementation are not compatible because the type parameter '{0}' has a constraint of the form {1} but the implementation does not. Either remove this constraint from the signature or add it to the implementation. + La signatura y la implementación no son compatibles porque el parámetro de tipo '{0}' tiene una restricción con el formato {1}, pero la implementación no. Quite esta restricción de la signatura o agréguela en la implementación. + + + + The type '{0}' implements 'System.IComparable'. Consider also adding an explicit override for 'Object.Equals' + El tipo '{0}' implementa 'System.IComparable'. Considere también agregar una invalidación explícita para 'Object.Equals'. + + + + The type '{0}' implements 'System.IComparable' explicitly but provides no corresponding override for 'Object.Equals'. An implementation of 'Object.Equals' has been automatically provided, implemented via 'System.IComparable'. Consider implementing the override 'Object.Equals' explicitly + El tipo '{0}' implementa 'System.IComparable' de forma explícita, pero no proporciona la correspondiente invalidación para 'Object.Equals'. Se ha proporcionado automáticamente una implementación de 'Object.Equals', implementado a través de 'System.IComparable'. Considere implementar la invalidación 'Object.Equals' de forma explícita. + + + + The struct, record or union type '{0}' has an explicit implementation of 'Object.GetHashCode' or 'Object.Equals'. You must apply the 'CustomEquality' attribute to the type + El tipo de struct, registro o unión '{0}' tiene una implementación explícita de 'Object.GetHashCode' u 'Object.Equals'. Debe aplicar el atributo 'CustomEquality' al tipo. + + + + The struct, record or union type '{0}' has an explicit implementation of 'Object.GetHashCode'. Consider implementing a matching override for 'Object.Equals(obj)' + El tipo de struct, registro o unión '{0}' tiene una implementación explícita de 'Object.GetHashCode'. Considere implementar una invalidación coincidente para 'Object.Equals(obj)'. + + + + The struct, record or union type '{0}' has an explicit implementation of 'Object.Equals'. Consider implementing a matching override for 'Object.GetHashCode()' + El tipo de struct, registro o unión '{0}' tiene una implementación explícita de 'Object.Equals'. Considere implementar una invalidación coincidente para 'Object.GetHashCode()'. + + + + The exception definitions are not compatible because a CLI exception mapping is being hidden by a signature. The exception mapping must be visible to other modules. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1} + Las definiciones de excepción no son compatibles porque una signatura oculta una asignación de excepción de CLI. La asignación de excepción debe estar visible para otros módulos. El módulo contiene la definición de excepción\n {0} \npero su signatura especifica\n\t{1}. + + + + The exception definitions are not compatible because the CLI representations differ. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1} + Las definiciones de excepción no son compatibles porque las representaciones de CLI difieren. El módulo contiene la definición de excepción\n {0} \npero su signatura especifica\n\t{1}. + + + + The exception definitions are not compatible because the exception abbreviation is being hidden by the signature. The abbreviation must be visible to other CLI languages. Consider making the abbreviation visible in the signature. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1}. + Las definiciones de excepción no son compatibles porque la signatura oculta la abreviación de la excepción. La abreviación debe estar visible para otros lenguajes CLI. Considere hacer que la abreviación esté visible en la signatura. El módulo contiene la definición de excepción\n {0} \npero su signatura especifica\n\t{1}. + + + + The exception definitions are not compatible because the exception abbreviations in the signature and implementation differ. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1}. + Las definiciones de excepción no son compatibles porque las abreviaciones de excepción de la signatura y la implementación difieren. El módulo contiene la definición de excepción\n {0} \npero su signatura especifica\n\t{1}. + + + + The exception definitions are not compatible because the exception declarations differ. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1}. + Las definiciones de excepción no son compatibles porque las declaraciones de excepción difieren. El módulo contiene la definición de excepción\n {0} \npero su signatura especifica\n\t{1}. + + + + The exception definitions are not compatible because the field '{0}' was required by the signature but was not specified by the implementation. The module contains the exception definition\n {1} \nbut its signature specifies\n\t{2}. + Las definiciones de excepción no son compatibles porque la signatura requería el campo '{0}' pero la implementación no lo especificó. El módulo contiene la definición de excepción\n {1} \npero su signatura especifica\n\t{2}. + + + + The exception definitions are not compatible because the field '{0}' was present in the implementation but not in the signature. The module contains the exception definition\n {1} \nbut its signature specifies\n\t{2}. + Las definiciones de excepción no son compatibles porque el campo '{0}' estaba presente en la implementación pero no en la signatura. El módulo contiene la definición de excepción\n {1} \npero su signatura especifica\n\t{2}. + + + + The exception definitions are not compatible because the order of the fields is different in the signature and implementation. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1}. + Las definiciones de excepción no son compatibles porque el orden de los campos es diferente en la signatura y en la implementación. El módulo contiene la definición de excepción\n {0} \npero su signatura especifica\n\t{1}. + + + + The namespace or module attributes differ between signature and implementation + Los atributos del espacio de nombres o módulo difieren entre la signatura y la implementación. + + + + This method is over-constrained in its type parameters + Este método está sobrerrestringido en sus parámetros de tipo. + + + + No implementations of '{0}' had the correct number of arguments and type parameters. The required signature is '{1}'. + Ninguna implementación de '{0}' tenía el número correcto de argumentos y parámetros de tipo. La signatura necesaria es '{1}'. + + + + The override for '{0}' was ambiguous + La invalidación de '{0}' era ambigua. + + + + More than one override implements '{0}' + Más de una invalidación implementa '{0}'. + + + + The method '{0}' is sealed and cannot be overridden + El método '{0}' está sellado y no se puede invalidar. + + + + The override '{0}' implements more than one abstract slot, e.g. '{1}' and '{2}' + La invalidación '{0}' implementa más de una ranura abstracta; por ejemplo, '{1}' y '{2}'. + + + + Duplicate or redundant interface + Interfaz duplicada o redundante. + + + + The interface '{0}' is included in multiple explicitly implemented interface types. Add an explicit implementation of this interface. + La interfaz '{0}' está incluida en varios tipos de interfaz implementados de forma explícita. Agregue una implementación explícita de esta interfaz. + + + + A named argument has been assigned more than one value + Se ha asignado más de un valor a un argumento con nombre. + + + + No implementation was given for '{0}' + No se proporcionó ninguna implementación para '{0}'. + + + + No implementation was given for '{0}'. Note that all interface members must be implemented and listed under an appropriate 'interface' declaration, e.g. 'interface ... with member ...'. + No se proporcionó ninguna implementación para '{0}'. Tenga en cuenta que todos los miembros de interfaz deben implementarse y enumerarse en la correspondiente declaración 'interface'; por ejemplo, 'interface ... with member ...'. + + + + The member '{0}' does not have the correct number of arguments. The required signature is '{1}'. + El miembro '{0}' no tiene el número correcto de argumentos. La signatura necesaria es '{1}'. + + + + The member '{0}' does not have the correct number of method type parameters. The required signature is '{1}'. + El miembro '{0}' no tiene el número correcto de parámetros de tipo de método. La signatura necesaria es '{1}'. + + + + The member '{0}' does not have the correct kinds of generic parameters. The required signature is '{1}'. + El miembro '{0}' no tiene los tipos correctos de parámetros genéricos. La signatura necesaria es '{1}'. + + + + The member '{0}' cannot be used to implement '{1}'. The required signature is '{2}'. + El miembro '{0}' no se puede usar para implementar '{1}'. La signatura necesaria es '{2}'. + + + + Error while parsing embedded IL + Error al analizar el código IL incrustado. + + + + Error while parsing embedded IL type + Error al analizar el tipo IL incrustado. + + + + This indexer notation has been removed from the F# language + Esta notación de indizador se ha quitado del lenguaje F#. + + + + Invalid expression on left of assignment + Expresión no válida en la parte izquierda de la asignación. + + + + The 'ReferenceEquality' attribute cannot be used on structs. Consider using the 'StructuralEquality' attribute instead, or implement an override for 'System.Object.Equals(obj)'. + El atributo 'ReferenceEquality' no puede usarse en structs. Considere el uso del atributo 'StructuralEquality' en su lugar o implemente una invalidación para 'System.Object.Equals(obj)'. + + + + This type uses an invalid mix of the attributes 'NoEquality', 'ReferenceEquality', 'StructuralEquality', 'NoComparison' and 'StructuralComparison' + Este tipo usa una combinación no válida de los atributos "NoEquality", "ReferenceEquality", "StructuralEquality", "NoComparison" y "StructuralComparison". + + + + The 'NoEquality' attribute must be used in conjunction with the 'NoComparison' attribute + El atributo 'NoEquality' debe usarse junto con el atributo 'NoComparison'. + + + + The 'StructuralComparison' attribute must be used in conjunction with the 'StructuralEquality' attribute + El atributo 'StructuralComparison' debe usarse junto con el atributo 'StructuralEquality'. + + + + The 'StructuralEquality' attribute must be used in conjunction with the 'NoComparison' or 'StructuralComparison' attributes + El atributo 'StructuralEquality' debe usarse junto con los atributos 'NoComparison' o 'StructuralComparison'. + + + + A type cannot have both the 'ReferenceEquality' and 'StructuralEquality' or 'StructuralComparison' attributes + Un tipo no puede tener los atributos 'ReferenceEquality' y 'StructuralEquality' o 'StructuralComparison' a la vez. + + + + Only record, union, exception and struct types may be augmented with the 'ReferenceEquality', 'StructuralEquality' and 'StructuralComparison' attributes + Solo los tipos de registro, unión, excepción y struct se pueden aumentar con los atributos 'ReferenceEquality', 'StructuralEquality' y 'StructuralComparison'. + + + + A type with attribute 'ReferenceEquality' cannot have an explicit implementation of 'Object.Equals(obj)', 'System.IEquatable<_>' or 'System.Collections.IStructuralEquatable' + Un tipo con el atributo 'ReferenceEquality' no puede tener una implementación explícita de 'Object.Equals(obj)', 'System.IEquatable<_>' o 'System.Collections.IStructuralEquatable'. + + + + A type with attribute 'CustomEquality' must have an explicit implementation of at least one of 'Object.Equals(obj)', 'System.IEquatable<_>' or 'System.Collections.IStructuralEquatable' + Un tipo con el atributo 'CustomEquality' debe tener una implementación explícita de al menos uno de 'Object.Equals(obj)', 'System.IEquatable<_>' o 'System.Collections.IStructuralEquatable'. + + + + A type with attribute 'CustomComparison' must have an explicit implementation of at least one of 'System.IComparable' or 'System.Collections.IStructuralComparable' + Un tipo con el atributo 'CustomComparison' debe tener una implementación explícita de al menos uno de 'System.IComparable' o 'System.Collections.IStructuralComparable'. + + + + A type with attribute 'NoEquality' should not usually have an explicit implementation of 'Object.Equals(obj)'. Disable this warning if this is intentional for interoperability purposes + Normalmente, un tipo con el atributo 'NoEquality' no debe tener una implementación explícita de 'Object.Equals(obj)'. Deshabilite esta advertencia si esto es intencionado con fines de interoperabilidad. + + + + A type with attribute 'NoComparison' should not usually have an explicit implementation of 'System.IComparable', 'System.IComparable<_>' or 'System.Collections.IStructuralComparable'. Disable this warning if this is intentional for interoperability purposes + Normalmente, un tipo con el atributo 'NoComparison' no debe tener una implementación explícita de 'System.IComparable', 'System.IComparable<_>' o 'System.Collections.IStructuralComparable'. Deshabilite esta advertencia si esto es intencionado con fines de interoperabilidad. + + + + The 'CustomEquality' attribute must be used in conjunction with the 'NoComparison' or 'CustomComparison' attributes + El atributo 'CustomEquality' debe usarse junto con los atributos 'NoComparison' o 'CustomComparison'. + + + + Positional specifiers are not permitted in format strings + No se permiten especificadores posicionales en cadenas de formato + + + + Missing format specifier + Falta un especificador de formato. + + + + '{0}' flag set twice + Marca '{0}' establecida dos veces. + + + + Prefix flag (' ' or '+') set twice + Marca de prefijo (' ' o '+') establecida dos veces + + + + The # formatting modifier is invalid in F# + El modificador de formato # no es válido en F#. + + + + Bad precision in format specifier + Precisión incorrecta en especificador de formato. + + + + Bad width in format specifier + Ancho incorrecto en especificador de formato. + + + + '{0}' format does not support '0' flag + El formato '{0}' no admite la marca '0'. + + + + Precision missing after the '.' + Falta una precisión después de '.' + + + + '{0}' format does not support precision + El formato '{0}' no admite precisión. + + + + Bad format specifier (after l or L): Expected ld,li,lo,lu,lx or lX. In F# code you can use %d, %x, %o or %u instead, which are overloaded to work with all basic integer types. + Especificador de formato incorrecto (después de l o L): se esperaba ld, li, lo, lu, lx o lX. En el código de F#, puede usar %d, %x, %o o %u, que se sobrecargan para funcionar con todos los tipos de entero básicos. + + + + The 'l' or 'L' in this format specifier is unnecessary. In F# code you can use %d, %x, %o or %u instead, which are overloaded to work with all basic integer types. + La 'l' o 'L' en este especificador de formato es innecesaria. En el código de F#, puede usar %d, %x, %o o %u, que se sobrecargan para funcionar con todos los tipos de entero básicos. + + + + The 'h' or 'H' in this format specifier is unnecessary. You can use %d, %x, %o or %u instead, which are overloaded to work with all basic integer types. + La 'h' o 'H' en este especificador de formato es innecesaria. Puede usar %d, %x, %o o %u, que se sobrecargan para funcionar con todos los tipos de entero básicos. + + + + '{0}' does not support prefix '{1}' flag + "{0}" no admite la marca de prefijo "{1}" + + + + Bad format specifier: '{0}' + Especificador de formato incorrecto: '{0}'. + + + + System.Environment.Exit did not exit + System.Environment.Exit no salió. + + + + The treatment of this operator is now handled directly by the F# compiler and its meaning cannot be redefined + El tratamiento de este operador se controla ahora directamente con el compilador de F# y su significado no se puede redefinir. + + + + A protected member is called or 'base' is being used. This is only allowed in the direct implementation of members since they could escape their object scope. + Se llama a un miembro protegido o se usa 'base'. Esto sólo se permite en la implementación directa de miembros, ya que podrían escaparse de su ámbito de objetos. + + + + The byref-typed variable '{0}' is used in an invalid way. Byrefs cannot be captured by closures or passed to inner functions. + La variable '{0}' de tipo byref se usa de forma no válida. Los tipos byref no pueden ser capturados por clausuras ni pasados a funciones internas. + + + + The 'base' keyword is used in an invalid way. Base calls cannot be used in closures. Consider using a private member to make base calls. + La palabra clave 'base' se usa de forma no válida. No se pueden usar llamadas base en clausuras. Considere el uso de un miembro privado para realizar llamadas base. + + + + The variable '{0}' is used in an invalid way + La variable '{0}' se usa de una forma no válida. + + + + The type '{0}' is less accessible than the value, member or type '{1}' it is used in. + El tipo '{0}' es menos accesible que el valor, miembro o tipo '{1}' en el que se usa. + + + + 'System.Void' can only be used as 'typeof<System.Void>' in F# + 'System.Void' se puede usar sólo como 'typeof<System.Void>' en F#. + + + + A type instantiation involves a byref type. This is not permitted by the rules of Common IL. + La creación de una instancia de un tipo implica un tipo byref. Las reglas de Common IL no permiten esto. + + + + Calls to 'reraise' may only occur directly in a handler of a try-with + Las llamadas a 'reraise' se pueden realizar solo directamente en un controlador de un bloque try-with. + + + + Expression-splicing operators may only be used within quotations + Los operadores de inserción de expresión se pueden usar solo en expresiones de código delimitadas. + + + + First-class uses of the expression-splicing operator are not permitted + No se permiten usos de primera clase del operador de inserción de expresión. + + + + First-class uses of the address-of operators are not permitted + No se permiten usos de primera clase de operadores address-of. + + + + First-class uses of the 'reraise' function is not permitted + No se permiten usos de primera clase de la función 'reraise'. + + + + The byref typed value '{0}' cannot be used at this point + El valor '{0}' de tipo byref no se puede usar en este punto. + + + + 'base' values may only be used to make direct calls to the base implementations of overridden members + Los valores 'base' se pueden usar solo para realizar llamadas directas a las implementaciones base de miembros invalidados. + + + + Object constructors cannot directly use try/with and try/finally prior to the initialization of the object. This includes constructs such as 'for x in ...' that may elaborate to uses of these constructs. This is a limitation imposed by Common IL. + Los constructores de objetos no pueden usar directamente try/with y try/finally antes de la inicialización del objeto. Esto incluye constructores como 'for x in ...' que pueden dar lugar a usos de estos constructores. Esta es una limitación impuesta por Common IL. + + + + The address of the variable '{0}' cannot be used at this point + La dirección de la variable '{0}' no se puede usar en este punto. + + + + The address of the static field '{0}' cannot be used at this point + La dirección del campo estático '{0}' no se puede usar en este punto. + + + + The address of the field '{0}' cannot be used at this point + La dirección del campo '{0}' no se puede usar en este punto. + + + + The address of an array element cannot be used at this point + La dirección de un elemento de matriz no se puede usar en este punto. + + + + The type of a first-class function cannot contain byrefs + El tipo de una función de primera clase no puede contener byrefs. + + + + A method return type would contain byrefs which is not permitted + Un tipo de valor devuelto de método contenía byrefs y esto no se permite. + + + + Invalid custom attribute value (not a constant or literal) + Valor de atributo personalizado no válido (no es una constante ni un literal). + + + + The attribute type '{0}' has 'AllowMultiple=false'. Multiple instances of this attribute cannot be attached to a single language element. + El tipo de atributo '{0}' tiene 'AllowMultiple=false'. No se pueden asociar varias instancias de este atributo a un solo elemento de lenguaje. + + + + The member '{0}' is used in an invalid way. A use of '{1}' has been inferred prior to its definition at or near '{2}'. This is an invalid forward reference. + El miembro '{0}' se usa de forma no válida. Se ha inferido un uso de '{1}' antes de su definición en '{2}' o cerca. Esta es una referencia adelantada no válida. + + + + A byref typed value would be stored here. Top-level let-bound byref values are not permitted. + Aquí se almacenaría un valor de tipo byref. No se permiten valores byref enlazados a let de nivel superior. + + + + [<ReflectedDefinition>] terms cannot contain uses of the prefix splice operator '%' + Los términos [<ReflectedDefinition>] no pueden contener usos del operador de inserción de prefijo "%" + + + + A function labeled with the 'EntryPointAttribute' attribute must be the last declaration in the last file in the compilation sequence. + Una función etiquetada con el atributo "EntryPointAttribute" debe ser la última declaración en el último archivo de la secuencia de compilación. + + + + compiled form of the union case + forma compilada del caso de unión + + + + default augmentation of the union case + aumento predeterminado del caso de unión + + + + The property '{0}' has the same name as a method in type '{1}'. + La propiedad "{0}" tiene el mismo nombre que un método del tipo "{1}". + + + + The property '{0}' of type '{1}' has a getter and a setter that do not match. If one is abstract then the other must be as well. + La propiedad "{0}" de tipo "{1}" tiene un captador y un establecedor que no coinciden. Si uno es abstracto, el otro debe serlo también. + + + + The property '{0}' has the same name as another property in type '{1}', but one takes indexer arguments and the other does not. You may be missing an indexer argument to one of your properties. + La propiedad "{0}" tiene el mismo nombre que otra propiedad del tipo "{1}", pero una toma argumentos de indizador y la otra no. Puede que falte un argumento de indizador en una de las propiedades. + + + + A type would store a byref typed value. This is not permitted by Common IL. + Un tipo almacenaría un valor de tipo byref. Esto no se permite en Common IL. + + + + Duplicate method. The method '{0}' has the same name and signature as another method in type '{1}'. + Método duplicado. El método "{0}" tiene el mismo nombre y la misma signatura que otro método del tipo "{1}". + + + + Duplicate method. The method '{0}' has the same name and signature as another method in type '{1}' once tuples, functions, units of measure and/or provided types are erased. + Método duplicado. El método "{0}" tiene el mismo nombre y la misma signatura que otro método del tipo "{1}" una vez borradas las tuplas, funciones, unidades de medida o tipos proporcionados. + + + + The method '{0}' has curried arguments but has the same name as another method in type '{1}'. Methods with curried arguments cannot be overloaded. Consider using a method taking tupled arguments. + El método "{0}" tiene argumentos currificados, pero tiene el mismo nombre que otro método del tipo "{1}". Los métodos con argumentos currificados no se pueden sobrecargar. Considere la posibilidad de usar un método que tome argumentos en tuplas. + + + + Methods with curried arguments cannot declare 'out', 'ParamArray', 'optional', 'ReflectedDefinition', 'byref', 'CallerLineNumber', 'CallerMemberName', or 'CallerFilePath' arguments + Los métodos con argumentos currificados no pueden declarar argumentos 'out', 'ParamArray', 'optional', 'ReflectedDefinition', 'byref', 'CallerLineNumber', 'CallerMemberName' o 'CallerFilePath' + + + + Duplicate property. The property '{0}' has the same name and signature as another property in type '{1}'. + Propiedad duplicada. La propiedad "{0}" tiene el mismo nombre y la misma signatura que otra propiedad del tipo "{1}". + + + + Duplicate property. The property '{0}' has the same name and signature as another property in type '{1}' once tuples, functions, units of measure and/or provided types are erased. + Propiedad duplicada. La propiedad "{0}" tiene el mismo nombre y la misma signatura que otra propiedad del tipo "{1}" una vez borradas las tuplas, funciones, unidades de medida o tipos proporcionados. + + + + Duplicate method. The abstract method '{0}' has the same name and signature as an abstract method in an inherited type. + Método duplicado. El método abstracto '{0}' tiene el mismo nombre y la misma signatura que un método abstracto en un tipo heredado. + + + + Duplicate method. The abstract method '{0}' has the same name and signature as an abstract method in an inherited type once tuples, functions, units of measure and/or provided types are erased. + Método duplicado. El método abstracto '{0}' tiene el mismo nombre y la misma signatura que un método abstracto en un tipo heredado una vez borradas las tuplas, funciones, unidades de medida y/o los tipos proporcionados. + + + + This type implements the same interface at different generic instantiations '{0}' and '{1}'. This is not permitted in this version of F#. + Este tipo implementa la misma interfaz en diferentes creaciones de instancia genéricas: "{0}" y "{1}". Esta operación no se permite en esta versión de F#. + + + + The type of a field using the 'DefaultValue' attribute must admit default initialization, i.e. have 'null' as a proper value or be a struct type whose fields all admit default initialization. You can use 'DefaultValue(false)' to disable this check + El tipo de un campo que usa el atributo 'DefaultValue' debe admitir inicialización predeterminada, es decir, tener 'null' como un valor adecuado o ser un tipo struct cuyos campos admitan todos inicialización predeterminada. Puede usar 'DefaultValue(false)' para deshabilitar esta comprobación. + + + + The type abbreviation contains byrefs. This is not permitted by F#. + La abreviación de tipo contiene byrefs. Esto no se permite en F#. + + + + The variable '{0}' is bound in a quotation but is used as part of a spliced expression. This is not permitted since it may escape its scope. + La variable '{0}' está enlazada en una expresión de código delimitada, pero se usa como parte de una expresión insertada. Esto no se permite porque puede escaparse del ámbito. + + + + Quotations cannot contain uses of generic expressions + Las expresiones de código delimitadas no pueden contener usos de expresiones genéricas. + + + + Quotations cannot contain function definitions that are inferred or declared to be generic. Consider adding some type constraints to make this a valid quoted expression. + Las expresiones de código delimitadas no pueden contener definiciones de función que se infieran o declaren como genéricas. Considere agregar restricciones de tipo para que esta sea una expresión entre comillas válida. + + + + Quotations cannot contain object expressions + Las expresiones de código delimitadas no pueden contener expresiones de objeto. + + + + Quotations cannot contain expressions that take the address of a field + Las expresiones de código delimitadas no pueden contener expresiones que tomen la dirección de un campo. + + + + Quotations cannot contain expressions that fetch static fields + Las expresiones de código delimitadas no pueden contener expresiones que busquen campos estáticos. + + + + Quotations cannot contain inline assembly code or pattern matching on arrays + Las expresiones de código delimitadas no pueden contener código de ensamblado alineado ni detección de patrones en matrices. + + + + Quotations cannot contain descending for loops + Las expresiones de código delimitadas no pueden contener bucles for descendentes. + + + + Quotations cannot contain expressions that fetch union case indexes + Las expresiones de código delimitadas no pueden contener expresiones que busquen índices de caso de unión. + + + + Quotations cannot contain expressions that set union case fields + Las expresiones de código delimitadas no pueden contener expresiones que establezcan campos de caso de unión. + + + + Quotations cannot contain expressions that set fields in exception values + Las expresiones de código delimitadas no pueden contener expresiones que establezcan campos en valores de excepción. + + + + Quotations cannot contain expressions that require byref pointers + Las expresiones de código delimitadas no pueden contener expresiones que requieran punteros byref. + + + + Quotations cannot contain expressions that make member constraint calls, or uses of operators that implicitly resolve to a member constraint call + Las expresiones de código delimitadas no pueden contener expresiones que realicen llamadas de restricción de miembros ni usos de operadores que se resuelvan de forma implícita en una llamada de restricción de miembros. + + + + Quotations cannot contain this kind of constant + Las expresiones de código delimitadas no pueden contener este tipo de constante. + + + + Quotations cannot contain this kind of pattern match + Las expresiones de código delimitadas no pueden contener este tipo de detección de patrones. + + + + Quotations cannot contain array pattern matching + Las expresiones de código delimitadas no pueden contener detección de patrones de matriz. + + + + Quotations cannot contain this kind of type + Las expresiones de código delimitadas no pueden contener este tipo de tipo. + + + + The declared type parameter '{0}' cannot be used here since the type parameter cannot be resolved at compile time + El parámetro de tipo declarado '{0}' no se puede usar aquí porque no se puede resolver en tiempo de compilación. + + + + This code is less generic than indicated by its annotations. A unit-of-measure specified using '_' has been determined to be '1', i.e. dimensionless. Consider making the code generic, or removing the use of '_'. + Este código es menos genérico que lo indicado en sus anotaciones. Se ha determinado que una unidad de medida especificada con '_' sea '1', es decir, sin dimensión. Considere hacer genérico el código o quitar el uso de '_'. + + + + Type inference problem too complicated (maximum iteration depth reached). Consider adding further type annotations. + Problema de inferencia de tipos demasiado complicado (se alcanzó la profundidad de iteración máxima). Considere agregar más anotaciones de tipo. + + + + Expected arguments to an instance member + Se esperan argumentos en un miembro de instancia. + + + + This indexer expects {0} arguments but is here given {1} + Este indizador espera {0} argumentos pero aquí se le proporcionan {1}. + + + + Expecting a type supporting the operator '{0}' but given a function type. You may be missing an argument to a function. + Se espera un tipo que admita el operador '{0}', pero se ha proporcionado un tipo de función. Quizá falta un argumento en una función. + + + + Expecting a type supporting the operator '{0}' but given a tuple type + Se espera un tipo que admita el operador '{0}', pero se ha proporcionado un tipo de tupla. + + + + None of the types '{0}' support the operator '{1}' + Ninguno de los tipos '{0}' admite el operador '{1}' + + + + The type '{0}' does not support the operator '{1}' + El tipo '{0}' no admite el operador '{1}'. + + + + None of the types '{0}' support the operator '{1}'. Consider opening the module 'Microsoft.FSharp.Linq.NullableOperators'. + Ninguno de los tipos '{0}' admite el operador '{1}'. Considere abrir el módulo 'Microsoft.FSharp.Linq.NullableOperators'. + + + + The type '{0}' does not support the operator '{1}'. Consider opening the module 'Microsoft.FSharp.Linq.NullableOperators'. + El tipo '{0}' no admite el operador '{1}'. Considere abrir el módulo 'Microsoft.FSharp.Linq.NullableOperators'. + + + + The type '{0}' does not support a conversion to the type '{1}' + El tipo '{0}' no admite una conversión al tipo '{1}'. + + + + The type '{0}' has a method '{1}' (full name '{2}'), but the method is static + El tipo '{0}' tiene un método '{1}' (nombre completo '{2}'), pero el método es estático. + + + + The type '{0}' has a method '{1}' (full name '{2}'), but the method is not static + El tipo '{0}' tiene un método '{1}' (nombre completo '{2}'), pero el método no es estático. + + + + The constraints 'struct' and 'not struct' are inconsistent + Las restricciones 'struct' y 'not struct' son incoherentes. + + + + The type '{0}' does not have 'null' as a proper value + El tipo '{0}' no tiene 'null' como un valor apropiado. + + + + The type '{0}' does not have 'null' as a proper value. To create a null value for a Nullable type use 'System.Nullable()'. + El tipo '{0}' no tiene 'null' como un valor apropiado. Para crear un valor NULL para un tipo que acepta valores NULL, use 'System.Nullable()'. + + + + The type '{0}' does not support the 'comparison' constraint because it has the 'NoComparison' attribute + El tipo '{0}' no admite la restricción 'comparison' porque tiene el atributo 'NoComparison'. + + + + The type '{0}' does not support the 'comparison' constraint. For example, it does not support the 'System.IComparable' interface + El tipo '{0}' no admite la restricción 'comparison'. Por ejemplo, no admite la interfaz 'System.IComparable'. + + + + The type '{0}' does not support the 'comparison' constraint because it is a record, union or struct with one or more structural element types which do not support the 'comparison' constraint. Either avoid the use of comparison with this type, or add the 'StructuralComparison' attribute to the type to determine which field type does not support comparison + El tipo '{0}' no admite la restricción 'comparison' porque es un registro, una unión o un struct con uno o varios tipos de elemento estructural que no admiten la restricción 'comparison'. Evite el uso de la comparación con este tipo o agregue el atributo 'StructuralComparison' al tipo para determinar el tipo de campo que no admite comparación. + + + + The type '{0}' does not support the 'equality' constraint because it has the 'NoEquality' attribute + El tipo '{0}' no admite la restricción 'equality' porque tiene el atributo 'NoEquality'. + + + + The type '{0}' does not support the 'equality' constraint because it is a function type + El tipo '{0}' no admite la restricción 'equality' porque es un tipo de función. + + + + The type '{0}' does not support the 'equality' constraint because it is a record, union or struct with one or more structural element types which do not support the 'equality' constraint. Either avoid the use of equality with this type, or add the 'StructuralEquality' attribute to the type to determine which field type does not support equality + El tipo '{0}' no admite la restricción 'equality' porque es un registro, una unión o un struct con uno o varios tipos de elemento estructural que no admiten la restricción 'equality'. Evite el uso de igualdad con este tipo o agregue el atributo 'StructuralEquality' al tipo para determinar el tipo de campo que no admite igualdad. + + + + The type '{0}' is not a CLI enum type + “{0}” no es un tipo de enumeración CLI. + + + + The type '{0}' has a non-standard delegate type + El tipo '{0}' tiene un tipo de delegado no estándar. + + + + The type '{0}' is not a CLI delegate type + El tipo '{0}' no es un tipo de delegado CLI. + + + + This type parameter cannot be instantiated to 'Nullable'. This is a restriction imposed in order to ensure the meaning of 'null' in some CLI languages is not confusing when used in conjunction with 'Nullable' values. + No se puede crear una instancia de este parámetro de tipo como 'Nullable'. El motivo de esta restricción es garantizar que el significado de 'null' en algunos lenguajes CLI no sea confuso cuando se use junto con valores 'Nullable'. + + + + A generic construct requires that the type '{0}' is a CLI or F# struct type + Una construcción genérica requiere que el tipo '{0}' sea un tipo struct de CLI o F#. + + + + A generic construct requires that the type '{0}' is an unmanaged type + Una construcción genérica requiere que '{0}' sea un tipo no administrado. + + + + The type '{0}' is not compatible with any of the types {1}, arising from the use of a printf-style format string + El tipo '{0}' no es compatible con ninguno de los tipos {1}, producidos por el uso de una cadena de formato de tipo printf. + + + + A generic construct requires that the type '{0}' have reference semantics, but it does not, i.e. it is a struct + Una construcción genérica requiere que el tipo '{0}' tenga semántica de referencia, pero no la tiene, es decir, es un struct. + + + + A generic construct requires that the type '{0}' be non-abstract + Una construcción genérica requiere que el tipo '{0}' no sea abstracto. + + + + A generic construct requires that the type '{0}' have a public default constructor + Una construcción genérica requiere que el tipo '{0}' tenga un constructor predeterminado público. + + + + Type instantiation length mismatch + Incoherencia de longitud de creación de instancia de tipo. + + + + Optional arguments not permitted here + Aquí no se permiten argumentos opcionales. + + + + {0} is not a static member + {0} no es un miembro estático. + + + + {0} is not an instance member + {0} no es un miembro de instancia. + + + + Argument length mismatch + Incoherencia de longitud de argumentos. + + + + The argument types don't match + Los tipos de argumento no coinciden. + + + + This method expects a CLI 'params' parameter in this position. 'params' is a way of passing a variable number of arguments to a method in languages such as C#. Consider passing an array for this argument + Este método espera un parámetro CLI 'params' en esta posición. 'params' es una forma de pasar un número variable de argumentos a un método en lenguajes como C#. Considere pasar una matriz para este argumento. + + + + The member or object constructor '{0}' is not {1} + El constructor de objeto o miembro '{0}' no es {1}. + + + + The member or object constructor '{0}' is not {1}. Private members may only be accessed from within the declaring type. Protected members may only be accessed from an extending type and cannot be accessed from inner lambda expressions. + El constructor de objeto o miembro '{0}' no es {1}. Los miembros privados solo son accesibles desde el tipo que los declara. Los miembros protegidos solo son accesibles desde un tipo de extensión y no son accesibles desde expresiones lambda internas. + + + + {0} is not a static method + {0} no es un método estático. + + + + {0} is not an instance method + {0} no es un método de instancia. + + + + The member or object constructor '{0}' has no argument or settable return property '{1}'. {2}. + El constructor de objeto o miembro '{0}' no tiene ningún argumento o propiedad de valor devuelto '{1}' que se pueda establecer. {2}. + + + + The object constructor '{0}' has no argument or settable return property '{1}'. {2}. + El constructor de objeto "{0}" no tiene ningún argumento ni propiedad de valor devuelto "{1}" que se pueda establecer. {2}. + + + + The required signature is {0} + La signatura necesaria es {0}. + + + + The member or object constructor '{0}' requires {1} argument(s). The required signature is '{2}'. + El constructor de objeto o miembro '{0}' requiere {1} argumentos. La signatura necesaria es '{2}'. + + + + The member or object constructor '{0}' requires {1} additional argument(s). The required signature is '{2}'. + El constructor de objeto o miembro '{0}' requiere {1} argumentos adicionales. La signatura necesaria es '{2}'. + + + + The member or object constructor '{0}' requires {1} argument(s). The required signature is '{2}'. Some names for missing arguments are {3}. + El constructor de objeto o miembro '{0}' requiere {1} argumentos. La signatura necesaria es '{2}'. Algunos nombres de argumentos que faltan son {3}. + + + + The member or object constructor '{0}' requires {1} additional argument(s). The required signature is '{2}'. Some names for missing arguments are {3}. + El constructor de objeto o miembro '{0}' requiere {1} argumentos adicionales. La signatura necesaria es '{2}'. Algunos nombres de argumentos que faltan son {3}. + + + + The member or object constructor '{0}' requires {1} argument(s) but is here given {2} unnamed and {3} named argument(s). The required signature is '{4}'. + El constructor de objeto o miembro '{0}' requiere {1} argumentos, pero aquí se le proporcionan {2} sin nombre y {3} argumentos con nombre. La signatura necesaria es '{4}'. + + + + The member or object constructor '{0}' takes {1} argument(s) but is here given {2}. The required signature is '{3}'. + El constructor de objeto o miembro '{0}' toma {1} argumentos, pero aquí se le proporcionan {2}. La signatura necesaria es '{3}'. + + + + The object constructor '{0}' takes {1} argument(s) but is here given {2}. The required signature is '{3}'. + El constructor de objeto "{0}" toma {1} argumentos, pero aquí se le dan {2}. La signatura necesaria es "{3}". + + + + The object constructor '{0}' takes {1} argument(s) but is here given {2}. The required signature is '{3}'. If some of the arguments are meant to assign values to properties, consider separating those arguments with a comma (','). + El constructor de objeto "{0}" toma {1} argumentos, pero aquí se le dan {2}. La signatura necesaria es "{3}". Si algunos de los argumentos son para asignar valores a propiedades, considere separarlos con una coma (","). + + + + The member or object constructor '{0}' takes {1} type argument(s) but is here given {2}. The required signature is '{3}'. + El constructor de objeto o miembro '{0}' toma {1} argumentos de tipo, pero aquí se le proporcionan {2}. La signatura necesaria es '{3}'. + + + + A member or object constructor '{0}' taking {1} arguments is not accessible from this code location. All accessible versions of method '{2}' take {3} arguments. + Un constructor de objeto o miembro '{0}' que toma {1} argumentos no es accesible desde este lugar del código. Todas las versiones accesibles del método '{2}' toman {3} argumentos. + + + + Incorrect generic instantiation. No {0} member named '{1}' takes {2} generic arguments. + Creación de instancia genérica incorrecta. Ningún miembro de {0} con el nombre '{1}' toma {2} argumentos genéricos. + + + + The member or object constructor '{0}' does not take {1} argument(s). An overload was found taking {2} arguments. + El constructor de objeto o miembro '{0}' no toma {1} argumentos. Se encontró una sobrecarga que toma {2} argumentos. + + + + No {0} member or object constructor named '{1}' takes {2} arguments + Ningún miembro o constructor de objeto de {0} con el nombre '{1}' toma {2} argumentos. + + + + No {0} member or object constructor named '{1}' takes {2} arguments. Note the call to this member also provides {3} named arguments. + Ningún miembro o constructor de objeto de {0} con el nombre '{1}' toma {2} argumentos. Tenga en cuenta que la llamada a este miembro proporciona también {3} argumentos con nombre. + + + + No {0} member or object constructor named '{1}' takes {2} arguments. The named argument '{3}' doesn't correspond to any argument or settable return property for any overload. + Ningún miembro o constructor de objeto de {0} con el nombre '{1}' toma {2} argumentos. El argumento con nombre '{3}' no corresponde a ningún argumento o propiedad de valor devuelto que se pueda establecer para ninguna sobrecarga. + + + + Method or object constructor '{0}' not found + No se encontró el constructor de objeto o método '{0}'. + + + + No overloads match for method '{0}'. + No hay ninguna coincidencia de sobrecarga para el método '{0}'. + + + + A unique overload for method '{0}' could not be determined based on type information prior to this program point. A type annotation may be needed. + No se pudo determinar una sobrecarga única para el método '{0}' con la información de tipo anterior a este punto del programa. Puede ser necesaria una anotación de tipo. + + + + Candidates: {0} + Candidatos: {0} + + + + The available overloads are shown below. + Las sobrecargas disponibles se muestran a continuación. + + + + Accessibility modifiers are not permitted on 'do' bindings, but '{0}' was given. + No se permiten modificadores de accesibilidad en enlaces "do", pero se proporcionó "{0}". + + + + End of file in #if section begun at or after here + El final del archivo en la sección #if comenzaba aquí o después. + + + + End of file in string begun at or before here + El final del archivo en la cadena comenzaba aquí o antes. + + + + End of file in verbatim string begun at or before here + El final del archivo en la cadena textual comenzaba aquí o antes. + + + + End of file in comment begun at or before here + El final del archivo en el comentario comenzaba aquí o antes. + + + + End of file in string embedded in comment begun at or before here + El final del archivo en la cadena incrustada en el comentario comenzaba aquí o antes. + + + + End of file in verbatim string embedded in comment begun at or before here + El final del archivo en la cadena textual incrustada en el comentario comenzaba aquí o antes. + + + + End of file in IF-OCAML section begun at or before here + El final del archivo en la sección IF-OCAML comenzaba aquí o antes. + + + + End of file in directive begun at or before here + El final del archivo en la directiva comenzaba aquí o antes. + + + + No #endif found for #if or #else + No se encontró #endif para #if o #else. + + + + Attributes have been ignored in this construct + Se han omitido los atributos en esta construcción. + + + + 'use' bindings are not permitted in primary constructors + No se permiten enlaces 'use' en constructores principales. + + + + 'use' bindings are not permitted in modules and are treated as 'let' bindings + No se permiten enlaces 'use' en módulos y se tratan como enlaces 'let'. + + + + An integer for loop must use a simple identifier + Un bucle for de entero debe usar un identificador simple. + + + + At most one 'with' augmentation is permitted + Solo se permite un aumento 'with' como máximo. + + + + A semicolon is not expected at this point + No se espera un punto y coma en este punto. + + + + Unexpected end of input + Final de entrada inesperado. + + + + Accessibility modifiers are not permitted here, but '{0}' was given. + No se permiten modificadores de accesibilidad aquí, pero se proporcionó "{0}". + + + + Only '#' compiler directives may occur prior to the first 'namespace' declaration + Solo las directivas de compilador '#' pueden tener lugar antes de la primera declaración 'namespace'. + + + + Accessibility modifiers should come immediately prior to the identifier naming a construct + Los modificadores de accesibilidad deben ir inmediatamente delante del identificador que da nombre a una construcción. + + + + Files should begin with either a namespace or module declaration, e.g. 'namespace SomeNamespace.SubNamespace' or 'module SomeNamespace.SomeModule', but not both. To define a module within a namespace use 'module SomeModule = ...' + Los archivos deben comenzar con una declaración de espacio de nombres o de módulo; por ejemplo, 'namespace SomeNamespace.SubNamespace' o 'module SomeNamespace.SomeModule', pero no ambas. Para definir un módulo en un espacio de nombres, use 'module SomeModule = ...'. + + + + A module abbreviation must be a simple name, not a path + Una abreviación de módulo debe ser un nombre simple, no una ruta de acceso. + + + + Ignoring attributes on module abbreviation + Omitiendo los atributos en la abreviación de módulo. + + + + The '{0}' accessibility attribute is not allowed on module abbreviation. Module abbreviations are always private. + El atributo de accesibilidad "{0}" no se permite en la abreviación de módulo. Las abreviaciones de módulo son siempre privadas. + + + + The '{0}' visibility attribute is not allowed on module abbreviation. Module abbreviations are always private. + El atributo de visibilidad "{0}" no se permite en la abreviación de módulo. Las abreviaciones de módulo son siempre privadas. + + + + Unclosed block + Bloque sin cerrar. + + + + Unmatched 'begin' or 'struct' + 'begin' o 'struct' desemparejado. + + + + A module name must be a simple name, not a path + Un nombre de módulo debe ser un nombre simple, no una ruta de acceso. + + + + Unexpected empty type moduleDefn list + Lista inesperada de moduleDefn de tipos vacía. + + + + Attributes should be placed before 'val' + Los atributos deben ponerse delante de 'val'. + + + + Attributes are not permitted on interface implementations + No se permiten atributos en implementaciones de interfaz. + + + + Syntax error + Error de sintaxis + + + + Augmentations are not permitted on delegate type moduleDefns + No se permiten aumentos en moduleDefns de tipo de delegado. + + + + Unmatched 'class', 'interface' or 'struct' + 'class', 'interface' o 'struct' desemparejado. + + + + A type definition requires one or more members or other declarations. If you intend to define an empty class, struct or interface, then use 'type ... = class end', 'interface end' or 'struct end'. + Una definición de tipo requiere uno o varios miembros, u otras declaraciones. Si su intención es definir una clase, un struct o una interfaz vacía, use 'type ... = class end', 'interface end' o 'struct end'. + + + + Unmatched 'with' or badly formatted 'with' block + 'with' desemparejado o bloque 'with' mal formado. + + + + 'get', 'set' or 'get,set' required + Se requiere 'get', 'set' o 'get,set'. + + + + Only class types may take value arguments + Solo los tipos de clase pueden tomar argumentos de valor. + + + + Unmatched 'begin' + 'begin' desemparejado. + + + + Invalid declaration syntax + Sintaxis de declaración no válida. + + + + 'get' and/or 'set' required + Se requiere 'get' y/o 'set'. + + + + Type annotations on property getters and setters must be given after the 'get()' or 'set(v)', e.g. 'with get() : string = ...' + Las anotaciones en captadores y establecedores de propiedad se deben proporcionar después de 'get()' o 'set(v)'; por ejemplo, 'with get() : string = ...'. + + + + A getter property is expected to be a function, e.g. 'get() = ...' or 'get(index) = ...' + Se espera que una propiedad de captador sea una función; por ejemplo, 'get() = ...' o 'get(index) = ...'. + + + + Multiple accessibilities given for property getter or setter + Se proporcionaron varias accesibilidades para un captador o establecedor de propiedad. + + + + Property setters must be defined using 'set value = ', 'set idx value = ' or 'set (idx1,...,idxN) value = ... ' + Los establecedores de propiedad deben definirse con 'set value = ', 'set idx value = ' o 'set (idx1,...,idxN) value = ... '. + + + + Interfaces always have the same visibility as the enclosing type + Las interfaces tienen siempre la misma visibilidad que el tipo envolvente. + + + + Accessibility modifiers are not allowed on this member. Abstract slots always have the same visibility as the enclosing type. + No se permiten modificadores de accesibilidad en este miembro. Las ranuras abstractas tienen siempre la misma visibilidad que el tipo envolvente. + + + + Attributes are not permitted on 'inherit' declarations + No se permiten atributos en declaraciones 'inherit'. + + + + Accessibility modifiers are not permitted on an 'inherits' declaration + No se permiten modificadores de accesibilidad en una declaración 'inherits'. + + + + 'inherit' declarations cannot have 'as' bindings. To access members of the base class when overriding a method, the syntax 'base.SomeMember' may be used; 'base' is a keyword. Remove this 'as' binding. + Las declaraciones 'inherit' no pueden tener enlaces 'as'. Para obtener acceso a los miembros de la clase base al invalidar un método, se puede usar la sintaxis 'base.SomeMember'; 'base' es una palabra clave. Quite este enlace 'as'. + + + + Attributes are not allowed here + No se permiten atributos aquí. + + + + Accessibility modifiers are not permitted in this position for type abbreviations + No se permiten modificadores de accesibilidad en esta posición para abreviaciones de tipos. + + + + Accessibility modifiers are not permitted in this position for enum types + No se permiten modificadores de accesibilidad en esta posición para tipos de enumeración. + + + + All enum fields must be given values + Deben proporcionarse valores a todos los campos de enumeración. + + + + Accessibility modifiers are not permitted on inline assembly code types + No se permiten modificadores de accesibilidad en tipos de código de ensamblado alineado. + + + + Unexpected identifier: '{0}' + Identificador inesperado: '{0}'. + + + + Accessibility modifiers are not permitted on union cases. Use 'type U = internal ...' or 'type U = private ...' to give an accessibility to the whole representation. + No se permiten modificadores de accesibilidad en casos de unión. Use 'type U = internal ...' o 'type U = private ...' para proporcionar una accesibilidad a toda la representación. + + + + Accessibility modifiers are not permitted on enumeration fields + No se permiten modificadores de accesibilidad en campos de enumeración. + + + + Consider using a separate record type instead + Considere el uso de un tipo de registro diferente en su lugar. + + + + Accessibility modifiers are not permitted on record fields. Use 'type R = internal ...' or 'type R = private ...' to give an accessibility to the whole representation. + No se permiten modificadores de accesibilidad en campos de registro. Use 'type R = internal ...' o 'type R = private ...' para proporcionar una accesibilidad a toda la representación. + + + + The declaration form 'let ... and ...' for non-recursive bindings is not used in F# code. Consider using a sequence of 'let' bindings + El formato de declaración 'let ... and ...' para enlaces no recursivos no se usa en el código de F#. Considere el uso de una secuencia de enlaces 'let'. + + + + Unmatched '(' + '(' desemparejado. + + + + Successive patterns should be separated by spaces or tupled + Patrones sucesivos deben separarse con espacios u organizarse en tuplas. + + + + No matching 'in' found for this 'let' + No se encontró un 'in' correspondiente a este 'let'. + + + + Error in the return expression for this 'let'. Possible incorrect indentation. + Error en la expresión devuelta para este 'let'. Quizá tiene una sangría incorrecta. + + + + The block following this '{0}' is unfinished. Every code block is an expression and must have a result. '{1}' cannot be the final code element in a block. Consider giving this block an explicit result. + El bloque que sigue a este objeto '{0}' está sin finalizar. Cada bloque de código es una expresión y debe tener un resultado. '{1}' no puede ser el elemento de código final en un bloque. Considere la posibilidad de asignar a este bloque un resultado explícito. + + + + Incomplete conditional. Expected 'if <expr> then <expr>' or 'if <expr> then <expr> else <expr>'. + Condicional incompleto. Se esperaba 'if <expr> then <expr>' o 'if <expr> then <expr> else <expr>'. + + + + 'assert' may not be used as a first class value. Use 'assert <expr>' instead. + No se puede usar 'assert' como valor de primera clase. Use 'assert <expr>' en su lugar. + + + + Identifier expected + Se esperaba un identificador. + + + + 'in' or '=' expected + Se esperaba 'in' o '='. + + + + The use of '->' in sequence and computation expressions is limited to the form 'for pat in expr -> expr'. Use the syntax 'for ... in ... do ... yield...' to generate elements in more complex sequence expressions. + El uso de '->' en expresiones de secuencia y de cómputo está limitado a la forma 'for pat in expr -> expr'. Use la sintaxis 'for ... in ... do ... yield...' para generar elementos en expresiones de secuencia más complejas. + + + + Successive arguments should be separated by spaces or tupled, and arguments involving function or method applications should be parenthesized + Argumentos sucesivos deben separarse con espacios u organizarse en tuplas, y los argumentos que implican aplicaciones de función o método deben encerrarse entre paréntesis. + + + + Unmatched '[' + '[' desemparejado. + + + + Missing qualification after '.' + Falta una calificación después de '.' + + + + In F# code you may use 'expr.[expr]'. A type annotation may be required to indicate the first expression is an array + En el código de F#, puede usar "expr.[expr]". Puede ser necesaria una anotación de tipos para indicar que la primera expresión es una matriz. + + + + Mismatched quotation, beginning with '{0}' + Falta el elemento de cierre de una expresión de código delimitada que comienza con '{0}'. + + + + Unmatched '{0}' + '{0}' desemparejado. + + + + Unmatched '[|' + '[|' desemparejado. + + + + Unmatched '{{' + '{{' desemparejado. + + + + Field bindings must have the form 'id = expr;' + Los enlaces de campo deben tener el formato 'id = expr;'. + + + + This member is not permitted in an object implementation + No se permite este miembro en una implementación de objeto. + + + + Missing function body + Falta el cuerpo de la función. + + + + Syntax error in labelled type argument + Error de sintaxis en argumento de tipo con etiqueta. + + + + Unexpected infix operator in type expression + Operador de infijo inesperado en una expresión de tipo. + + + + The syntax '(typ,...,typ) ident' is not used in F# code. Consider using 'ident<typ,...,typ>' instead + La sintaxis '(typ,...,typ) ident' no se usa en el código de F#. Considere el uso de 'ident<typ,...,typ>' en su lugar. + + + + Invalid literal in type + Literal no válido en el tipo + + + + Unexpected infix operator in unit-of-measure expression. Legal operators are '*', '/' and '^'. + Operador de infijo inesperado en una expresión de unidad de medida. Los operadores válidos son '*', '/' y '^'. + + + + Unexpected integer literal in unit-of-measure expression + Literal entero inesperado en una expresión de unidad de medida. + + + + Syntax error: unexpected type parameter specification + Error de sintaxis: especificación de parámetro de tipo inesperada. + + + + Mismatched quotation operator name, beginning with '{0}' + Falta el elemento de clausura en un nombre de operador de expresión de código delimitada que comienza con '{0}'. + + + + Active pattern case identifiers must begin with an uppercase letter + Los identificadores de patrón activo deben comenzar con una letra mayúscula. + + + + The '|' character is not permitted in active pattern case identifiers + El carácter '|' no se permite en identificadores de modelo activo + + + + Denominator must not be 0 in unit-of-measure exponent + El denominador no debe ser 0 en el exponente de unidad de medida + + + + No '=' symbol should follow a 'namespace' declaration + Después de una declaración 'namespace' no puede haber un símbolo '='. + + + + The syntax 'module ... = struct .. end' is not used in F# code. Consider using 'module ... = begin .. end' + La sintaxis 'module ... = struct .. end' no se usa en el código de F#. Considere el uso de 'module ... = begin .. end'. + + + + The syntax 'module ... : sig .. end' is not used in F# code. Consider using 'module ... = begin .. end' + La sintaxis 'module ... : sig .. end' no se usa en el código de F#. Considere el uso de 'module ... = begin .. end'. + + + + A static field was used where an instance field is expected + Se usó un campo estático donde se espera un campo de instancia. + + + + Method '{0}' is not accessible from this code location + El método '{0}' no es accesible desde este lugar del código. + + + + Implicit product of measures following / + Producto de medidas implícito después de /. + + + + Unexpected SynMeasure.Anon + SynMeasure.Anon inesperado. + + + + Non-zero constants cannot have generic units. For generic zero, write 0.0<_>. + Las constantes distintas de cero no pueden tener unidades genéricas. Para un cero genérico, escriba 0.0<_>. + + + + In sequence expressions, results are generated using 'yield' + En expresiones de secuencia, los resultados se generan con 'yield'. + + + + Unexpected big rational constant + Constante racional grande inesperada. + + + + Units-of-measure supported only on float, float32, decimal and signed integer types + Solo se admiten unidades de medida en los tipos float, float32, decimal y de entero firmado. + + + + Unexpected Const_uint16array + Const_uint16array inesperado. + + + + Unexpected Const_bytearray + Const_bytearray inesperado. + + + + A parameter with attributes must also be given a name, e.g. '[<Attribute>] Name : Type' + A un parámetro con atributos se le debe dar también un nombre; por ejemplo, "[<Atributo>] Nombre : Tipo". + + + + Return values cannot have names + Los valores devueltos no pueden tener nombre. + + + + MemberKind.PropertyGetSet only expected in parse trees + MemberKind.PropertyGetSet se espera solo en árboles de análisis. + + + + Namespaces cannot contain values. Consider using a module to hold your value declarations. + Los espacios de nombres no pueden contener valores. Considere el uso de un módulo para albergar las declaraciones de valor. + + + + Namespaces cannot contain extension members except in the same file and namespace declaration group where the type is defined. Consider using a module to hold declarations of extension members. + Los espacios de nombres no pueden contener miembros de extensión, excepto en el mismo archivo y grupo de declaración del espacio de nombres donde se define el tipo. Considere la posibilidad de usar un módulo para albergar declaraciones de miembros de extensión. + + + + Multiple visibility attributes have been specified for this identifier + Se han especificado varios atributos de visibilidad para este identificador. + + + + Multiple visibility attributes have been specified for this identifier. 'let' bindings in classes are always private, as are any 'let' bindings inside expressions. + Se han especificado varios atributos de visibilidad para este identificador. Los enlaces 'let' en clases son siempre privados, igual que los enlaces 'let' en expresiones. + + + + The name '({0})' 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 '{1}' instead. + El nombre '({0})' no debe usarse como un nombre de miembro. Para definir semántica de comparación para un tipo, implemente la interfaz 'System.IComparable'. Si define un miembro estático para usarlo desde otros lenguajes CLI, use el nombre '{1}' en su lugar. + + + + The name '({0})' 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 '{1}' instead. + El nombre '({0})' no debe usarse como un nombre de miembro. Para definir semántica de igualdad para un tipo, invalide el miembro 'Object.Equals'. Si define un miembro estático para usarlo desde otros lenguajes CLI, use el nombre '{1}' en su lugar. + + + + The name '({0})' should not be used as a member name. If defining a static member for use from other CLI languages then use the name '{1}' instead. + El nombre '({0})' no debe usarse como un nombre de miembro. Si define un miembro estático para usarlo desde otros lenguajes CLI, use el nombre '{1}' en su lugar. + + + + The name '({0})' should not be used as a member name because it is given a standard definition in the F# library over fixed types + El nombre '({0})' no debe usarse como un nombre de miembro porque se le da una definición estándar en la biblioteca de F# sobre tipos fijos. + + + + The '{0}' operator should not normally be redefined. To define overloaded comparison semantics for a particular type, implement the 'System.IComparable' interface in the definition of that type. + Normalmente, el operador '{0}' no se debe redefinir. Para definir semántica de comparación sobrecargada para un tipo concreto, implemente la interfaz 'System.IComparable' en la definición de ese tipo. + + + + The '{0}' operator should not normally be redefined. To define equality semantics for a type, override the 'Object.Equals' member in the definition of that type. + Normalmente, el operador '{0}' no se debe redefinir. Para definir semántica de igualdad para un tipo, invalide el miembro 'Object.Equals' en la definición de ese tipo. + + + + The '{0}' operator should not normally be redefined. Consider using a different operator name + Normalmente, el operador '{0}' no se debe redefinir. Considere el uso de un nombre de operador diferente. + + + + The '{0}' operator cannot be redefined. Consider using a different operator name + El operador '{0}' no se puede redefinir. Considere el uso de un nombre de operador diferente. + + + + Expected module or namespace parent {0} + Se esperaba un primario de espacio de nombres o módulo {0}. + + + + The struct, record or union type '{0}' implements the interface 'System.IComparable' explicitly. You must apply the 'CustomComparison' attribute to the type. + El tipo de struct, registro o unión '{0}' implementa la interfaz 'System.IComparable' de forma explícita. Debe aplicar el atributo 'CustomComparison' al tipo. + + + + The struct, record or union type '{0}' implements the interface 'System.IComparable<_>' explicitly. You must apply the 'CustomComparison' attribute to the type, and should also provide a consistent implementation of the non-generic interface System.IComparable. + El tipo de struct, registro o unión '{0}' implementa la interfaz 'System.IComparable<_>' de forma explícita. Debe aplicar el atributo 'CustomComparison' al tipo y proporcionar también una implementación coherente de la interfaz no genérica System.IComparable. + + + + The struct, record or union type '{0}' implements the interface 'System.IStructuralComparable' explicitly. Apply the 'CustomComparison' attribute to the type. + El tipo de struct, registro o unión '{0}' implementa la interfaz 'System.IStructuralComparable' de forma explícita. Aplique el atributo 'CustomComparison' al tipo. + + + + This record contains fields from inconsistent types + Este registro contiene campos de tipos incoherentes. + + + + DLLImport stubs cannot be inlined + Los códigos auxiliares DLLImport no se pueden establecer como inline. + + + + Structs may only bind a 'this' parameter at member declarations + Los structs solo pueden enlazar un parámetro 'this' en declaraciones de miembro. + + + + Unexpected expression at recursive inference point + Expresión inesperada en punto de inferencia recursiva. + + + + This code is less generic than required by its annotations because the explicit type variable '{0}' could not be generalized. It was constrained to be '{1}'. + Este código es menos genérico que lo que requieren sus anotaciones, porque la variable de tipo explícito '{0}' no se pudo generalizar. Estaba restringida a ser '{1}'. + + + + One or more of the explicit class or function type variables for this binding could not be generalized, because they were constrained to other types + No se pudieron generalizar una o varias de las variables de clase explícita o de tipo de función para este enlace, porque estaban restringidas a otros tipos. + + + + A generic type parameter has been used in a way that constrains it to always be '{0}' + Se ha usado un parámetro de tipo genérico que lo restringe a ser siempre '{0}'. + + + + This type parameter has been used in a way that constrains it to always be '{0}' + Este parámetro de tipo se ha usado de forma que lo restringe a ser siempre '{0}'. + + + + The type parameters inferred for this value are not stable under the erasure of type abbreviations. This is due to the use of type abbreviations which drop or reorder type parameters, e.g. \n\ttype taggedInt<'a> = int or\n\ttype swap<'a,'b> = 'b * 'a.\nConsider declaring the type parameters for this value explicitly, e.g.\n\tlet f<'a,'b> ((x,y) : swap<'b,'a>) : swap<'a,'b> = (y,x). + Los parámetros de tipo inferidos para este valor no son estables al borrar las abreviaciones de tipo. Esto se debe al uso de abreviaciones de tipo que colocan o reordenan parámetros de tipo; por ejemplo: \n\ttype taggedInt<'a> = int or\n\ttype swap<'a,'b> = 'b * 'a.\nConsidere declarar los parámetros de tipo para este valor de forma explícita; por ejemplo: \n\tlet f<'a,'b> ((x,y) : swap<'b,'a>) : swap<'a,'b> = (y,x). + + + + Explicit type parameters may only be used on module or member bindings + Los parámetros de tipo explícitos se pueden usar solo en enlaces de módulo o miembro. + + + + You must explicitly declare either all or no type parameters when overriding a generic abstract method + Debe declarar de forma explícita todos o ninguno de los parámetros de tipo cuando se invalide un método abstracto genérico. + + + + The field labels and expected type of this record expression or pattern do not uniquely determine a corresponding record type + Las etiquetas de campo y el tipo esperado de este patrón o expresión de registro no determinan de forma única un tipo de registro correspondiente. + + + + The field '{0}' appears twice in this record expression or pattern + El campo '{0}' aparece dos veces en este patrón o expresión de registro. + + + + Unknown union case + Caso de unión desconocido. + + + + This code is not sufficiently generic. The type variable {0} could not be generalized because it would escape its scope. + Este código no es lo suficientemente genérico. La variable de tipo {0} no se pudo generalizar porque escaparía de su ámbito. + + + + A property cannot have explicit type parameters. Consider using a method instead. + Una propiedad no puede tener parámetros de tipo explícitos. Considere el uso de un método en su lugar. + + + + A constructor cannot have explicit type parameters. Consider using a static construction method instead. + Un constructor no puede tener parámetros de tipo explícitos. Considere el uso de un método de construcción estático en su lugar. + + + + This instance member needs a parameter to represent the object being invoked. Make the member static or use the notation 'member x.Member(args) = ...'. + Este miembro de instancia necesita un parámetro para representar el objeto que se va a invocar. Convierta el miembro en estático o use la notación 'member x.Member(args) = ...'. + + + + Unexpected source-level property specification in syntax tree + Especificación de propiedad de nivel de código fuente inesperada en árbol de sintaxis. + + + + A static initializer requires an argument + Un inicializador estático require un argumento. + + + + An object constructor requires an argument + Un constructor de objeto requiere un argumento. + + + + This static member should not have a 'this' parameter. Consider using the notation 'member Member(args) = ...'. + Este miembro estático no debería tener un parámetro 'this'. Considere el uso de la notación 'member Member(args) = ...'. + + + + An explicit static initializer should use the syntax 'static new(args) = expr' + Un inicializador estático explícito debe usar la sintaxis 'static new(args) = expr'. + + + + An explicit object constructor should use the syntax 'new(args) = expr' + Un constructor de objeto explícito debe usar la sintaxis 'new(args) = expr'. + + + + Unexpected source-level property specification + Especificación de propiedad de nivel de código fuente inesperada. + + + + This form of object expression is not used in F#. Use 'member this.MemberName ... = ...' to define member implementations in object expressions. + Este formato de expresión de objeto no se usa en F#. Use 'member this.MemberName ... = ...' para definir implementaciones de miembro en expresiones de objeto. + + + + Invalid declaration + Declaración no válida. + + + + Attributes are not allowed within patterns + No se permiten atributos en patrones. + + + + The generic function '{0}' must be given explicit type argument(s) + A la función genérica '{0}' se le deben proporcionar argumentos de tipo explícitos. + + + + The method or function '{0}' should not be given explicit type argument(s) because it does not declare its type parameters explicitly + Al método o función '{0}' no se le deberían proporcionar argumentos de tipo explícitos porque no declara sus parámetros de tipo de forma explícita. + + + + This value, type or method expects {0} type parameter(s) but was given {1} + Este valor, tipo o método espera {0} parámetros de tipo, pero se le proporcionaron {1}. + + + + The default, zero-initializing constructor of a struct type may only be used if all the fields of the struct type admit default initialization + El constructor de inicialización cero predeterminado de un tipo struct solo se puede usar si todos los campos del tipo struct admiten inicialización predeterminada. + + + + Couldn't find Dispose on IDisposable, or it was overloaded + No se encontró Dispose en IDisposable, o estaba sobrecargado. + + + + This value is not a literal and cannot be used in a pattern + Este valor no es un literal y no se puede usar en un patrón. + + + + This field is readonly + Este campo es de solo lectura. + + + + Named arguments must appear after all other arguments + Los argumentos con nombre deben aparecer después de todos los demás argumentos. + + + + This function value is being used to construct a delegate type whose signature includes a byref argument. You must use an explicit lambda expression taking {0} arguments. + Este valor de función se está usando para construir un tipo de delegado cuya signatura incluye un argumento byref. Debe usar una expresión lambda explícita que tome {0} argumentos. + + + + The type '{0}' is not a type whose values can be enumerated with this syntax, i.e. is not compatible with either seq<_>, IEnumerable<_> or IEnumerable and does not have a GetEnumerator method + El tipo '{0}' no es un tipo cuyos valores se puedan enumerar con esta sintaxis, es decir, no es compatible con seq<_>, IEnumerable<_> o IEnumerable y no tiene un método GetEnumerator. + + + + This recursive binding uses an invalid mixture of recursive forms + Este enlace recursivo usa una mezcla no válida de formatos recursivos. + + + + This is not a valid object construction expression. Explicit object constructors must either call an alternate constructor or initialize all fields of the object and specify a call to a super class constructor. + Esta no es una expresión de construcción de objeto válida. Los constructores de objeto explícitos deben llamar a un constructor alternativo o inicializar todos los campos del objeto y especificar una llamada a un constructor de superclase. + + + + Invalid constraint + Restricción no válida. + + + + Invalid constraint: the type used for the constraint is sealed, which means the constraint could only be satisfied by at most one solution + Restricción no válida: el tipo usado para la restricción está sellado, lo que significa que la restricción solo se podría satisfacer con una solución como máximo. + + + + An 'enum' constraint must be of the form 'enum<type>' + Una restricción 'enum' debe tener el formato 'enum<tipo>'. + + + + 'new' constraints must take one argument of type 'unit' and return the constructed type + Las restricciones 'new' deben tomar un argumento de tipo 'unit' y devolver el tipo construido. + + + + This property has an invalid type. Properties taking multiple indexer arguments should have types of the form 'ty1 * ty2 -> ty3'. Properties returning functions should have types of the form '(ty1 -> ty2)'. + Esta propiedad tiene un tipo no válido. Las propiedades que toman varios argumentos de indizador deben tener tipos con el formato 'ty1 * ty2 -> ty3'. Las propiedades que devuelven funciones deben tener tipos con el formato '(ty1 -> ty2)'. + + + + Expected unit-of-measure parameter, not type parameter. Explicit unit-of-measure parameters must be marked with the [<Measure>] attribute. + Se esperaba un parámetro de unidad de medida, no un parámetro de tipo. Los parámetros de unidad de medida explícitos deben marcarse con el atributo [<Measure>]. + + + + Expected type parameter, not unit-of-measure parameter + Se esperaba un parámetro de tipo, no un parámetro de unidad de medida. + + + + Expected type, not unit-of-measure + Se esperaba un tipo, no una unidad de medida. + + + + Expected unit-of-measure, not type + Se esperaba una unidad de medida, no un tipo. + + + + Units-of-measure cannot be used as prefix arguments to a type. Rewrite as postfix arguments in angle brackets. + No se pueden usar unidades de medida como argumentos de prefijo para un tipo. Escríbalo de nuevo con argumentos de postfijo entre paréntesis angulares. + + + + Unit-of-measure cannot be used in type constructor application + No se puede usar una unidad de medida en una aplicación de constructor de tipo. + + + + This control construct may only be used if the computation expression builder defines a '{0}' method + Esta construcción de control se puede usar solo si el generador de expresiones de cómputo define un método '{0}'. + + + + This type has no nested types + Este tipo no tiene tipos anidados. + + + + Unexpected {0} in type expression + {0} inesperado en la expresión de tipo. + + + + Type parameter cannot be used as type constructor + Un parámetro de tipo no se puede usar como constructor de tipo. + + + + Illegal syntax in type expression + Sintaxis no válida en expresión de tipo. + + + + Anonymous unit-of-measure cannot be nested inside another unit-of-measure expression + Una unidad de medida anónima no puede estar anidada en otra expresión de unidad de medida. + + + + Anonymous type variables are not permitted in this declaration + No se permiten variables de tipo anónimo en esta declaración. + + + + Unexpected / in type + Barra / inesperada en el tipo. + + + + Unexpected type arguments + Argumentos de tipo inesperados. + + + + Optional arguments are only permitted on type members + Los argumentos opcionales se permiten únicamente en miembros de tipo. + + + + Name '{0}' not bound in pattern context + El nombre '{0}' no está enlazado en el contexto del patrón. + + + + Non-primitive numeric literal constants cannot be used in pattern matches because they can be mapped to multiple different types through the use of a NumericLiteral module. Consider using replacing with a variable, and use 'when <variable> = <constant>' at the end of the match clause. + No se pueden usar constantes de literal numérico no primitivas en detecciones de patrones porque se pueden asignar a varios tipos diferentes mediante un módulo NumericLiteral. Considere el uso del reemplazo con una variable y use 'when <variable> = <constante>' al final de la cláusula de coincidencia. + + + + Type arguments cannot be specified here + Aquí no se pueden especificar argumentos de tipo. + + + + Only active patterns returning exactly one result may accept arguments + Solo los patrones activos que devuelven exactamente un resultado pueden aceptar argumentos. + + + + Invalid argument to parameterized pattern label + Argumento no válido para parametrizar una etiqueta de patrón. + + + + Internal error. Invalid index into active pattern array + Error interno. Índice no válido en una matriz de patrones activos. + + + + This union case does not take arguments + Este caso de unión no toma argumentos. + + + + This union case takes one argument + Este caso de unión toma un argumento. + + + + This union case expects {0} arguments in tupled form + Este caso de unión espera {0} argumentos en forma de tupla. + + + + Field '{0}' is not static + El campo '{0}' no es estático. + + + + This field is not a literal and cannot be used in a pattern + Este campo no es un literal y no se puede usar en un patrón. + + + + This is not a variable, constant, active recognizer or literal + Este elemento no es una variable, una constante, un reconocedor activo ni un literal. + + + + This is not a valid pattern + Este no es un patrón válido. + + + + Character range matches have been removed in F#. Consider using a 'when' pattern guard instead. + Las coincidencias de intervalo de caracteres se han quitado en F#. Considere el uso de una restricción de patrón 'when' en su lugar. + + + + Illegal pattern + Patrón no válido. + + + + Syntax error - unexpected '?' symbol + Error de sintaxis: símbolo '?' inesperado + + + + Expected {0} expressions, got {1} + Se esperaban {0} expresiones y se obtuvieron {1}. + + + + TcExprUndelayed: delayed + TcExprUndelayed: retrasado + + + + This expression form may only be used in sequence and computation expressions + Este formato de expresión se puede usar sólo en expresiones de secuencia y cómputo. + + + + Invalid object expression. Objects without overrides or interfaces should use the expression form 'new Type(args)' without braces. + Expresión de objeto no válida. Los objetos sin invalidaciones ni interfaces deben usar el formato de expresión 'new Type(args)' sin llaves. + + + + Invalid object, sequence or record expression + Expresión de objeto, secuencia o registro no válida. + + + + Invalid record, sequence or computation expression. Sequence expressions should be of the form 'seq {{ ... }}' + Expresión de registro, secuencia o cómputo no válida. Las expresiones de secuencia deben tener el formato 'seq {{ ... }}'. + + + + This list or array expression includes an element of the form 'if ... then ... else'. Parenthesize this expression to indicate it is an individual element of the list or array, to disambiguate this from a list generated using a sequence expression + Esta expresión de matriz o lista incluye un elemento con el formato 'if ... then ... else'. Ponga paréntesis a esta expresión para indicarla como elemento individual de la lista o matriz, con el fin de eliminar la ambigüedad respecto a una lista generada con una expresión de secuencia. + + + + Unable to parse format string '{0}' + No se puede analizar la cadena de formato '{0}'. + + + + This list expression exceeds the maximum size for list literals. Use an array for larger literals and call Array.ToList. + La expresión de lista supera el tamaño máximo para literales de lista. Use una matriz para literales de mayor tamaño y llame a Array.ToList. + + + + The expression form 'expr then expr' may only be used as part of an explicit object constructor + El formato de expresión 'expr then expr' se puede usar sólo como parte de un constructor de objeto explícito. + + + + Named arguments cannot be given to member trait calls + No se pueden dar argumentos con nombre a llamadas de cola de miembro. + + + + This is not a valid name for an enumeration case + Este no es un nombre válido para un caso de enumeración. + + + + This field is not mutable + Este campo no es mutable. + + + + This construct may only be used within list, array and sequence expressions, e.g. expressions of the form 'seq {{ ... }}', '[ ... ]' or '[| ... |]'. These use the syntax 'for ... in ... do ... yield...' to generate elements + Esta construcción solo se puede usar en expresiones de lista, matriz y secuencia; por ejemplo, expresiones con el formato "seq {{ ... }}", "[ ... ]" o "[| ... |]". Estas expresiones usan la sintaxis "for ... in ... do ... yield..." para generar elementos. + + + + This construct may only be used within computation expressions. To return a value from an ordinary function simply write the expression without 'return'. + Esta construcción se puede usar solo en expresiones de cómputo. Para devolver un valor desde una función ordinaria, simplemente escriba la expresión sin 'return'. + + + + This construct may only be used within sequence or computation expressions + Esta construcción solo se puede usar en expresiones de secuencia y cómputo. + + + + This construct may only be used within computation expressions + Esta construcción se puede usar solo en expresiones de cómputo. + + + + Invalid indexer expression + Expresión de indizador no válido. + + + + The operator 'expr.[idx]' has been used on an object of indeterminate type based on information prior to this program point. Consider adding further type constraints + Se ha usado el operador "expr.[idx]" en un objeto de tipo indeterminado basado en información anterior a este punto del programa. Considere agregar más restricciones de tipo. + + + + Cannot inherit from a variable type + No se puede heredar de un tipo de variable. + + + + Calls to object constructors on type parameters cannot be given arguments + No se pueden dar argumentos a llamadas a constructores de objeto en parámetros de tipo. + + + + The 'CompiledName' attribute cannot be used with this language element + No se puede usar el atributo 'CompiledName' con este elemento de lenguaje. + + + + '{0}' may only be used with named types + '{0}' se puede usar sólo con tipos con nombre. + + + + 'inherit' cannot be used on interface types. Consider implementing the interface by using 'interface ... with ... end' instead. + No se puede usar 'inherit' en tipos de interfaz. Considere implementar la interfaz usando 'interface ... with ... end' en su lugar. + + + + 'new' cannot be used on interface types. Consider using an object expression '{{ new ... with ... }}' instead. + No se puede usar 'new' en tipos de interfaz. Considere el uso de una expresión de objeto '{{ new ... with ... }}' en su lugar. + + + + Instances of this type cannot be created since it has been marked abstract or not all methods have been given implementations. Consider using an object expression '{{ new ... with ... }}' instead. + No se pueden crear instancias de este tipo porque se ha marcado como abstract o no se han proporcionado implementaciones a todos los métodos. Considere el uso de una expresión de objeto '{{ new ... with ... }}' en su lugar. + + + + It is recommended that objects supporting the IDisposable interface are created using the syntax 'new Type(args)', rather than 'Type(args)' or 'Type' as a function value representing the constructor, to indicate that resources may be owned by the generated value + Se recomienda que los objetos que admiten la interfaz IDisposable se creen con la sintaxis "new Type(args)", en lugar de con "Type(args)" o "Type" como valor de función que representa al constructor, para indicar que los recursos pueden ser propiedad del valor generado + + + + '{0}' may only be used to construct object types + '{0}' se puede usar sólo para construir tipos de objeto. + + + + Constructors for the type '{0}' must directly or indirectly call its implicit object constructor. Use a call to the implicit object constructor instead of a record expression. + Los constructores para el tipo '{0}' deben llamar directa o indirectamente a su constructor de objeto implícito. Use una llamada al constructor de objeto implícito en lugar de una expresión de registro. + + + + The field '{0}' has been given a value, but is not present in the type '{1}' + Se ha proporcionado un valor al campo '{0}', pero no está presente en el tipo '{1}'. + + + + No assignment given for field '{0}' of type '{1}' + No se proporcionó ninguna asignación para el campo '{0}' de tipo '{1}'. + + + + Extraneous fields have been given values + Se han proporcionado valores a unos campos extraños. + + + + Only overrides of abstract and virtual members may be specified in object expressions + Solo se pueden especificar invalidaciones de miembros abstractos y virtuales en expresiones de objeto. + + + + The member '{0}' does not correspond to any abstract or virtual method available to override or implement. + El miembro "{0}" no corresponde a ningún método abstracto o virtual disponible para invalidarlo o implementarlo. + + + + The type {0} contains the member '{1}' but it is not a virtual or abstract method that is available to override or implement. + El tipo {0} contiene el miembro "{1}", pero no es un método virtual o abstracto que esté disponible para invalidarlo o implementarlo. + + + + The member '{0}' does not accept the correct number of arguments. {1} argument(s) are expected, but {2} were given. The required signature is '{3}'.{4} + El miembro '{0}' no acepta el número correcto de argumentos. Se esperan {1} argumentos, pero se dieron {2}. La signatura necesaria es '{3}'.{4} + + + + The member '{0}' does not accept the correct number of arguments. One overload accepts {1} arguments, but {2} were given. The required signature is '{3}'.{4} + El miembro '{0}' no acepta el número correcto de argumentos. Una sobrecarga acepta {1} argumentos, pero se dieron {2}. La signatura necesaria es '{3}'.{4} + + + + A simple method name is required here + Aquí se requiere un nombre de método simple. + + + + The types System.ValueType, System.Enum, System.Delegate, System.MulticastDelegate and System.Array cannot be used as super types in an object expression or class + Los tipos System.ValueType, System.Enum, System.Delegate, System.MulticastDelegate y System.Array no se pueden usar como tipos superiores en una clase o expresión de objeto. + + + + 'new' must be used with a named type + 'new' debe usarse con un tipo con nombre. + + + + Cannot create an extension of a sealed type + No se puede crear una extensión de un tipo sellado. + + + + No arguments may be given when constructing a record value + No se pueden proporcionar argumentos cuando se construye un valor de registro. + + + + Interface implementations cannot be given on construction expressions + No se pueden proporcionar implementaciones de interfaz en expresiones de construcción. + + + + Object construction expressions may only be used to implement constructors in class types + Las expresiones de construcción de objeto se pueden usar solo para implementar constructores en tipos de clase. + + + + Only simple bindings of the form 'id = expr' can be used in construction expressions + Solo se pueden usar enlaces simples con el formato 'id = expr' en expresiones de construcción. + + + + Objects must be initialized by an object construction expression that calls an inherited object constructor and assigns a value to each field + Los objetos deben inicializarse con una expresión de construcción de objeto que llame a un constructor de objeto heredado y asigne un valor a cada campo. + + + + Expected an interface type + Se esperaba un tipo de interfaz. + + + + Constructor expressions for interfaces do not take arguments + Las expresiones de constructor para interfaces no toman argumentos. + + + + This object constructor requires arguments + Este constructor de objeto requiere argumentos. + + + + 'new' may only be used with object constructors + 'new' se puede usar sólo con constructores de objeto. + + + + At least one override did not correctly implement its corresponding abstract member + Al menos una invalidación no implementó correctamente su correspondiente miembro abstracto. + + + + This numeric literal requires that a module '{0}' defining functions FromZero, FromOne, FromInt32, FromInt64 and FromString be in scope + Este literal numérico requiere que un módulo '{0}' que define las funciones FromZero, FromOne, FromInt32, FromInt64 y FromString esté en el ámbito. + + + + Invalid record construction + Construcción de registro no válida. + + + + The expression form {{ expr with ... }} may only be used with record types. To build object types use {{ new Type(...) with ... }} + El formato de expresión {{ expr with ... }} se puede usar sólo con tipos de registro. Para compilar tipos de objeto, use {{ new Type(...) with ... }}. + + + + The inherited type is not an object model type + El tipo heredado no es un tipo de modelo de objeto. + + + + Object construction expressions (i.e. record expressions with inheritance specifications) may only be used to implement constructors in object model types. Use 'new ObjectType(args)' to construct instances of object model types outside of constructors + Las expresiones de construcción de objeto (es decir, expresiones de registro con especificaciones de herencia) se pueden usar solo para implementar constructores en tipos de modelo de objeto. Use 'new ObjectType(args)' para construir instancias de tipos de modelo de objeto fuera de los constructores. + + + + '{{ }}' is not a valid expression. Records must include at least one field. Empty sequences are specified by using Seq.empty or an empty list '[]'. + "{{ }}" no es una expresión válida. Los registros deben incluir al menos un campo. Las secuencias vacías se especifican con Seq.empty o una lista vacía "[]". + + + + This type is not a record type. Values of class and struct types must be created using calls to object constructors. + Este tipo no es un tipo de registro. Los valores de clase y los tipos de struct deben crearse usando llamadas a constructores de objeto. + + + + This type is not a record type + Este tipo no es un tipo de registro. + + + + This construct is ambiguous as part of a computation expression. Nested expressions may be written using 'let _ = (...)' and nested computations using 'let! res = builder {{ ... }}'. + Esta construcción es ambigua como parte de una expresión de cómputo. Las expresiones anidadas se pueden escribir usando 'let _ = (...)' y los cómputos anidados usando 'let! res = builder {{ ... }}'. + + + + This construct is ambiguous as part of a sequence expression. Nested expressions may be written using 'let _ = (...)' and nested sequences using 'yield! seq {{... }}'. + Esta construcción es ambigua como parte de una expresión de secuencia. Las expresiones anidadas se pueden escribir usando 'let _ = (...)' y las secuencias anidadas usando 'yield! seq {{... }}'. + + + + 'do!' cannot be used within sequence expressions + 'do!' no se puede usar en expresiones de secuencia. + + + + The use of 'let! x = coll' in sequence expressions is not permitted. Use 'for x in coll' instead. + No se permite el uso de 'let! x = coll' en expresiones de secuencia. Use 'for x in coll' en su lugar. + + + + 'try'/'with' cannot be used within sequence expressions + No se puede usar 'try'/'with' en expresiones de secuencia. + + + + In sequence expressions, multiple results are generated using 'yield!' + En expresiones de secuencia, se generan varios resultados con 'yield!'. + + + + Invalid assignment + Asignación no válida. + + + + Invalid use of a type name + Uso no válido de un nombre de tipo. + + + + This type has no accessible object constructors + Este tipo no tiene constructores de objeto accesibles. + + + + Invalid use of an interface type + Uso no válido de un tipo de interfaz. + + + + Invalid use of a delegate constructor. Use the syntax 'new Type(args)' or just 'Type(args)'. + Uso no válido de un constructor de delegado. Use la sintaxis 'new Type(args)' o simplemente 'Type(args)'. + + + + Property '{0}' is not static + La propiedad '{0}' no es estática. + + + + Property '{0}' is not readable + La propiedad '{0}' no se puede leer. + + + + This lookup cannot be used here + Aquí no se puede usar esta búsqueda. + + + + Property '{0}' is static + La propiedad '{0}' es estática. + + + + Property '{0}' cannot be set + La propiedad '{0}' no se puede establecer. + + + + Constructors must be applied to arguments and cannot be used as first-class values. If necessary use an anonymous function '(fun arg1 ... argN -> new Type(arg1,...,argN))'. + Los constructores deben aplicarse a argumentos y no pueden usarse como valores de primera clase. Si es necesario, use una función anónima '(fun arg1 ... argN -> new Type(arg1,...,argN))'. + + + + The syntax 'expr.id' may only be used with record labels, properties and fields + La sintaxis 'expr.id' se puede usar solo con propiedades, campos y etiquetas de registro. + + + + Event '{0}' is static + El evento '{0}' es estático. + + + + Event '{0}' is not static + El evento '{0}' no es estático. + + + + The named argument '{0}' did not match any argument or mutable property + El argumento con nombre '{0}' no coincidía con ningún argumento ni propiedad mutable. + + + + One or more of the overloads of this method has curried arguments. Consider redesigning these members to take arguments in tupled form. + Una o varias sobrecargas de este método tienen argumentos currificados. Considere rediseñar estos miembros para que tomen argumentos con forma de tupla. + + + + The unnamed arguments do not form a prefix of the arguments of the method called + Los argumentos sin nombre no forman un prefijo de los argumentos del método llamado. + + + + Static optimization conditionals are only for use within the F# library + Los condicionales de optimización estáticos son solo para usarlos en la biblioteca de F#. + + + + The corresponding formal argument is not optional + El argumento de formato correspondiente no es opcional. + + + + Invalid optional assignment to a property or field + Asignación opcional a una propiedad o un campo no válida. + + + + A delegate constructor must be passed a single function value + A un constructor delegado sólo debe pasársele un único valor de función. + + + + A binding cannot be marked both 'use' and 'rec' + Un enlace no se puede marcar como 'use' y 'rec' a la vez. + + + + The 'VolatileField' attribute may only be used on 'let' bindings in classes + El atributo 'VolatileField' se puede usar sólo en enlaces 'let' en clases. + + + + Attributes are not permitted on 'let' bindings in expressions + No se permiten atributos en enlaces 'let' en expresiones. + + + + The 'DefaultValue' attribute may only be used on 'val' declarations + El atributo 'DefaultValue' se puede usar sólo en declaraciones 'val'. + + + + The 'ConditionalAttribute' attribute may only be used on members + El atributo 'ConditionalAttribute' se puede usar sólo en miembros. + + + + This is not a valid name for an active pattern + Este no es un nombre válido para un patrón activo. + + + + The 'EntryPointAttribute' attribute may only be used on function definitions in modules + El atributo 'EntryPointAttribute' se puede usar sólo en definiciones de función en módulos. + + + + Mutable values cannot be marked 'inline' + Los valores mutables no se pueden marcar como 'inline'. + + + + Mutable values cannot have generic parameters + Los valores mutables no pueden tener parámetros genéricos. + + + + Mutable function values should be written 'let mutable f = (fun args -> ...)' + Los valores de función mutable deben escribirse con el formato 'let mutable f = (fun args -> ...)'. + + + + Only functions may be marked 'inline' + Solo las funciones se pueden marcar como 'inline'. + + + + A literal value cannot be given the [<ThreadStatic>] or [<ContextStatic>] attributes + A un valor de literal no se le pueden dar los atributos [<ThreadStatic>] o [<ContextStatic>]. + + + + A literal value cannot be marked 'mutable' + Un valor literal no se puede marcar como 'mutable'. + + + + A literal value cannot be marked 'inline' + Un valor literal no se puede marcar como 'inline'. + + + + Literal values cannot have generic parameters + Los valores literales no pueden tener parámetros genéricos. + + + + This is not a valid constant expression + Esta no es una expresión de constante válida. + + + + This type is not accessible from this code location + Este tipo no es accesible desde este lugar del código. + + + + Unexpected condition in imported assembly: failed to decode AttributeUsage attribute + Condición inesperada en ensamblado importado: no se pudo descodificar el atributo AttributeUsage. + + + + Unrecognized attribute target. Valid attribute targets are 'assembly', 'module', 'type', 'method', 'property', 'return', 'param', 'field', 'event', 'constructor'. + Destino de atributo no reconocido. Los destinos de atributo válidos son: 'assembly', 'module', 'type', 'method', 'property', 'return', 'param', 'field', 'event', 'constructor'. + + + + This attribute is not valid for use on this language element. Assembly attributes should be attached to a 'do ()' declaration, if necessary within an F# module. + Este atributo no es válido para usarlo en este elemento de lenguaje. Los atributos de ensamblado deben asociarse a una declaración 'do ()', si es necesario en un módulo de F#. + + + + This attribute is not valid for use on this language element + Este atributo no es válido para usarlo en este elemento de lenguaje. + + + + Optional arguments cannot be used in custom attributes + No se pueden usar argumentos opcionales en atributos personalizados. + + + + This property cannot be set + Esta propiedad no se puede establecer. + + + + This property or field was not found on this custom attribute type + No se encontró esta propiedad o campo en este tipo de atributo personalizado. + + + + A custom attribute must be a reference type + Un atributo personalizado debe ser un tipo de referencia. + + + + The number of args for a custom attribute does not match the expected number of args for the attribute constructor + El número de argumentos para un atributo personalizado no coincide con el número esperado de argumentos para el constructor de atributo. + + + + A custom attribute must invoke an object constructor + Un atributo personalizado debe invocar a un constructor de objeto. + + + + Attribute expressions must be calls to object constructors + Las expresiones de atributo deben ser llamadas a constructores de objeto. + + + + This attribute cannot be used in this version of F# + Este atributo no se puede usar en esta versión de F#. + + + + Invalid inline specification + Especificación inline no válida. + + + + 'use' bindings must be of the form 'use <var> = <expr>' + Los enlaces 'use' deben tener el formato 'use <var> = <expr>'. + + + + Abstract members are not permitted in an augmentation - they must be defined as part of the type itself + No se permiten miembros abstractos en un aumento; deben definirse como parte del propio tipo. + + + + Method overrides and interface implementations are not permitted here + Aquí no se permiten invalidaciones de método ni implementaciones de interfaz. + + + + No abstract or interface member was found that corresponds to this override + No se encontró ningún miembro abstracto o de interfaz que corresponda a esta invalidación. + + + + This override takes a different number of arguments to the corresponding abstract member. The following abstract members were found:{0} + Esta invalidación toma un número diferente de argumentos para el miembro abstracto correspondiente. Se han encontrado los siguientes miembros abstractos: {0} + + + + This method already has a default implementation + Este método ya tiene una implementación predeterminada. + + + + The method implemented by this default is ambiguous + El método implementado por este valor predeterminado es ambiguo. + + + + No abstract property was found that corresponds to this override + No se encontró ninguna propiedad abstracta que corresponda a esta invalidación. + + + + This property overrides or implements an abstract property but the abstract property doesn't have a corresponding {0} + Esta propiedad invalida o implementa una propiedad abstracta que no tiene un {0} correspondiente. + + + + Invalid signature for set member + Signatura no válida para un miembro set. + + + + This new member hides the abstract member '{0}'. Rename the member or use 'override' instead. + Este nuevo miembro oculta el miembro abstracto '{0}'. Cambie el nombre del miembro o use 'override' en su lugar. + + + + This new member hides the abstract member '{0}' once tuples, functions, units of measure and/or provided types are erased. Rename the member or use 'override' instead. + Este nuevo miembro oculta el miembro abstracto '{0}' una vez borradas las tuplas, funciones, unidades de medida y/o los tipos proporcionados. Cambie el nombre del miembro o use 'override' en su lugar. + + + + Interfaces cannot contain definitions of static initializers + Las interfaces no pueden contener definiciones de inicializadores estáticos. + + + + Interfaces cannot contain definitions of object constructors + Las interfaces no pueden contener definiciones de constructores de objeto. + + + + Interfaces cannot contain definitions of member overrides + Las interfaces no pueden contener definiciones de invalidaciones de miembro. + + + + Interfaces cannot contain definitions of concrete members. You may need to define a constructor on your type to indicate that the type is a class. + Las interfaces no pueden contener definiciones de miembros concretos. Puede ser necesario definir un constructor en el tipo para indicar que el tipo es una clase. + + + + Constructors cannot be specified in exception augmentations + No se pueden especificar constructores en aumentos de excepciones. + + + + Structs cannot have an object constructor with no arguments. This is a restriction imposed on all CLI languages as structs automatically support a default constructor. + Los structs no pueden tener un constructor de objeto sin argumentos. Esta es una restricción impuesta en todos los lenguajes CLI porque los structs admiten automáticamente un constructor predeterminado. + + + + Constructors cannot be defined for this type + No se pueden definir constructores para este tipo + + + + Recursive bindings that include member specifications can only occur as a direct augmentation of a type + Los enlaces recursivos que incluyen especificaciones de miembro pueden existir solo como aumento directo de un tipo. + + + + Only simple variable patterns can be bound in 'let rec' constructs + Solo se pueden enlazar patrones de variable simple en construcciones 'let rec'. + + + + Only record fields and simple, non-recursive 'let' bindings may be marked mutable + Solo los campos de registro y los enlaces 'let' sencillos no recursivos se pueden marcar como mutables + + + + This member is not sufficiently generic + Este miembro no es lo suficientemente genérico. + + + + A declaration may only be the [<Literal>] attribute if a constant value is also given, e.g. 'val x : int = 1' + Una declaración puede ser solo el atributo [<Literal>] si se proporciona también un valor constante; por ejemplo, "val x : int = 1". + + + + A declaration may only be given a value in a signature if the declaration has the [<Literal>] attribute + A una declaración se le puede dar solo un valor en una signatura si la declaración tiene el atributo [<Literal>]. + + + + Thread-static and context-static variables must be static and given the [<DefaultValue>] attribute to indicate that the value is initialized to the default value on each new thread + Las variables ThreadStatic y ContextStatic deben ser estáticas y se les debe proporcionar el atributo [<DefaultValue>] para indicar que el valor se inicializa con el valor predeterminado en cada nuevo subproceso. + + + + Volatile fields must be marked 'mutable' and cannot be thread-static + Los campos volátiles deben marcarse como 'mutable' y no pueden ser ThreadStatic. + + + + Uninitialized 'val' fields must be mutable and marked with the '[<DefaultValue>]' attribute. Consider using a 'let' binding instead of a 'val' field. + Los campos "val" no inicializados deben ser mutables y estar marcados con el atributo "[<DefaultValue>]". Considere el uso de un enlace "let" en lugar de un campo "val". + + + + Static 'val' fields in types must be mutable, private and marked with the '[<DefaultValue>]' attribute. They are initialized to the 'null' or 'zero' value for their type. Consider also using a 'static let mutable' binding in a class type. + Los campos "val" estáticos en tipos deben ser mutables, privados y estar marcados con el atributo "[<DefaultValue>]". Se inicializan con el valor "null" o "cero" para su tipo. Considere también el uso de un enlace "static let mutable" en un tipo de clase. + + + + This field requires a name + Este campo requiere un nombre. + + + + Invalid namespace, module, type or union case name + Nombre de espacio de nombres, módulo, tipo o caso de unión no válido. + + + + Explicit type declarations for constructors must be of the form 'ty1 * ... * tyN -> resTy'. Parentheses may be required around 'resTy' + Las declaraciones de tipos explícitos para constructores deben tener el formato 'ty1 * ... * tyN -> resTy'. Pueden ser necesarios paréntesis en 'resTy'. + + + + Return types of union cases must be identical to the type being defined, up to abbreviations + Los tipos devueltos de casos de unión deben ser idénticos al tipo que se va a definir, hasta las abreviaciones. + + + + This is not a valid value for an enumeration literal + Este no es un valor válido para un literal de enumeración. + + + + The type '{0}' is not an interface type + El tipo '{0}' no es un tipo de interfaz. + + + + Duplicate specification of an interface + Especificación duplicada en una interfaz. + + + + A field/val declaration is not permitted here + Aquí no se permite una declaración de campo o val. + + + + A inheritance declaration is not permitted here + Aquí no se permite una declaración de herencia. + + + + This declaration opens the module '{0}', which is marked as 'RequireQualifiedAccess'. Adjust your code to use qualified references to the elements of the module instead, e.g. 'List.map' instead of 'map'. This change will ensure that your code is robust as new constructs are added to libraries. + Esta declaración abre el módulo '{0}', que está marcado como 'RequireQualifiedAccess'. Ajuste el código para usar referencias completas a los elementos del módulo; por ejemplo, 'List.map' en lugar de 'map'. Este cambio garantizará la solidez del código conforme se agreguen nuevas construcciones a las bibliotecas. + + + + This declaration opens the namespace or module '{0}' through a partially qualified path. Adjust this code to use the full path of the namespace. This change will make your code more robust as new constructs are added to the F# and CLI libraries. + Esta declaración abre el espacio de nombres o modelo '{0}' a través de una ruta de acceso parcial. Ajuste este código para usar la ruta de acceso completa del espacio de nombres. Este cambio hará que el código sea más sólido conforme se agreguen nuevas construcciones a las bibliotecas de F# y CLI. + + + + Local class bindings cannot be marked inline. Consider lifting the definition out of the class or else do not mark it as inline. + Los enlaces de clase locales no se pueden marcar como 'inline'. Considere extraer la definición de la clase o no lo marque como 'inline'. + + + + Type abbreviations cannot have members + Las abreviaciones de tipo no pueden tener miembros. + + + + As of F# 4.1, the accessibility of type abbreviations is checked at compile-time. Consider changing the accessibility of the type abbreviation. Ignoring this warning might lead to runtime errors. + A partir de F# 4.1, la accesibilidad de las abreviaturas de tipo se comprueba en tiempo de compilación. Considere la posibilidad de cambiar la accesibilidad de la abreviatura de tipo. Si pasa por alto esta advertencia, se podrían producir errores de tiempo de ejecución. + + + + Enumerations cannot have members + Las enumeraciones no pueden tener miembros. + + + + Measure declarations may have only static members + Las declaraciones de medida solo pueden tener miembros estáticos. + + + + Structs cannot contain 'do' bindings because the default constructor for structs would not execute these bindings + Los structs no pueden contener enlaces 'do' porque el constructor predeterminado para structs no ejecutaría estos enlaces. + + + + Structs cannot contain value definitions because the default constructor for structs will not execute these bindings. Consider adding additional arguments to the primary constructor for the type. + Los structs no pueden contener definiciones de valor porque el constructor predeterminado para structs no ejecutará estos enlaces. Considere agregar argumentos adicionales al constructor principal para el tipo. + + + + Static value definitions may only be used in types with a primary constructor. Consider adding arguments to the type definition, e.g. 'type X(args) = ...'. + Las definiciones de valores estáticos se pueden usar solo en tipos con un constructor principal. Considere agregar argumentos a la definición de tipo, por ejemplo, 'type X(args) = ...'. + + + + Measure declarations may have only static members: constructors are not available + Las declaraciones de medida solo pueden tener miembros estáticos: no hay constructores disponibles. + + + + A member and a local class binding both have the name '{0}' + Un miembro y un enlace de clase local tienen el nombre '{0}'. + + + + Type abbreviations cannot have interface declarations + Las abreviaciones de tipo no pueden tener declaraciones de interfaz. + + + + Enumerations cannot have interface declarations + Las enumeraciones no pueden tener declaraciones de interfaz. + + + + This type is not an interface type + Este tipo no es un tipo de interfaz. + + + + All implemented interfaces should be declared on the initial declaration of the type + Todas las interfaces implementadas deben declararse en la declaración inicial del tipo. + + + + A default implementation of this interface has already been added because the explicit implementation of the interface was not specified at the definition of the type + Ya se ha agregado una implementación predeterminada de esta interfaz porque no se especificó la implementación explícita de la interfaz en la definición del tipo. + + + + This member is not permitted in an interface implementation + No se permite este miembro en una implementación de interfaz. + + + + This declaration element is not permitted in an augmentation + Este elemento de declaración no se permite en un aumento. + + + + Types cannot contain nested type definitions + Los tipos no pueden contener definiciones de tipo anidadas. + + + + type, exception or module + tipo, excepción o módulo + + + + type or module + tipo o módulo + + + + The struct, record or union type '{0}' implements the interface 'System.IStructuralEquatable' explicitly. Apply the 'CustomEquality' attribute to the type. + El tipo de struct, registro o unión '{0}' implementa la interfaz 'System.IStructuralEquatable' de forma explícita. Aplique el atributo 'CustomEquality' al tipo. + + + + The struct, record or union type '{0}' implements the interface 'System.IEquatable<_>' explicitly. Apply the 'CustomEquality' attribute to the type and provide a consistent implementation of the non-generic override 'System.Object.Equals(obj)'. + El tipo de struct, registro o unión '{0}' implementa la interfaz 'System.IEquatable<_>' de forma explícita. Aplique el atributo 'CustomEquality' al tipo y proporcione una implementación coherente de la invalidación no genérica 'System.Object.Equals(obj)'. + + + + Explicit type specifications cannot be used for exception constructors + No se pueden usar especificaciones de tipo explícitas para constructores de excepciones. + + + + Exception abbreviations should not have argument lists + Las abreviaciones de excepciones no deben tener listas de argumentos. + + + + Abbreviations for Common IL exceptions cannot take arguments + Las abreviaciones para excepciones de Common IL no pueden tomar argumentos. + + + + Exception abbreviations must refer to existing exceptions or F# types deriving from System.Exception + Las abreviaciones de excepciones deben hacer referencia a excepciones existentes o tipos de F# que se deriven de System.Exception. + + + + Abbreviations for Common IL exception types must have a matching object constructor + Las abreviaciones para tipos de excepción de Common IL deben tener un constructor de objeto coincidente. + + + + Not an exception + No es una excepción. + + + + Invalid module name + Nombre de módulo no válido. + + + + Invalid type extension + Extensión de tipo no válida. + + + + The attributes of this type specify multiple kinds for the type + Los atributos de este tipo especifican varios tipos para el tipo. + + + + The kind of the type specified by its attributes does not match the kind implied by its definition + El tipo del tipo especificado por sus atributos no coincide con el tipo que implica su definición. + + + + Measure definitions cannot have type parameters + Las definiciones de medida no pueden tener parámetros de tipo. + + + + This type requires a definition + Este tipo requiere una definición. + + + + This type abbreviation has one or more declared type parameters that do not appear in the type being abbreviated. Type abbreviations must use all declared type parameters in the type being abbreviated. Consider removing one or more type parameters, or use a concrete type definition that wraps an underlying type, such as 'type C<'a> = C of ...'. + Esta abreviación de tipo tiene uno o varios parámetros de tipo declarados que no aparecen en el tipo que se va a abreviar. Las abreviaciones de tipo deben usar todos los parámetros de tipo declarados en el tipo que se va a abreviar. Considere quitar uno o varios parámetros de tipo o use una definición de tipo concreto que contenga un tipo subyacente, como 'type C<'a> = C of ...'. + + + + Structs, interfaces, enums and delegates cannot inherit from other types + Los structs, interfaces, enumeraciones y delegados no pueden heredarse de otros tipos. + + + + Types cannot inherit from multiple concrete types + Los tipos no pueden heredarse de varios tipos concretos. + + + + Records, union, abbreviations and struct types cannot have the 'AllowNullLiteral' attribute + Los tipos de registro, unión, abreviación y struct no pueden tener el atributo 'AllowNullLiteral'. + + + + Types with the 'AllowNullLiteral' attribute may only inherit from or implement types which also allow the use of the null literal + Los tipos con el atributo 'AllowNullLiteral' pueden implementar o se pueden heredar solo de tipos que también permitan el uso del literal null. + + + + Generic types cannot be given the 'StructLayout' attribute + A los tipos genéricos no se les puede dar el atributo 'StructLayout'. + + + + Only structs and classes without primary constructors may be given the 'StructLayout' attribute + El atributo 'StructLayout' se puede dar solo a structs y clases sin constructores principales. + + + + The representation of this type is hidden by the signature. It must be given an attribute such as [<Sealed>], [<Class>] or [<Interface>] to indicate the characteristics of the type. + La signatura oculta la representación de este tipo. Debe proporcionársele un atributo como [<Sealed>], [<Class>] o [<Interface>] para indicar las características del tipo. + + + + Only classes may be given the 'AbstractClass' attribute + El atributo 'AbstractClass' se puede dar sólo a clases. + + + + Only types representing units-of-measure may be given the 'Measure' attribute + El atributo 'Measure' se puede dar solo a tipos que representen unidades de medida. + + + + Accessibility modifiers are not permitted on overrides or interface implementations + No se permiten modificadores de accesibilidad en invalidaciones o implementaciones de interfaz. + + + + Discriminated union types are always sealed + Los tipos de unión discriminada están siempre sellados. + + + + Record types are always sealed + Los tipos de registro están siempre sellados. + + + + Assembly code types are always sealed + Los tipos de código de ensamblado están siempre sellados. + + + + Struct types are always sealed + Los tipos de struct están siempre sellados. + + + + Delegate types are always sealed + Los tipos de delegado están siempre sellados. + + + + Enum types are always sealed + Los tipos de enumeración están siempre sellados. + + + + Interface types and delegate types cannot contain fields + Los tipos de interfaz y los tipos de delegado no pueden contener campos. + + + + Abbreviated types cannot be given the 'Sealed' attribute + A los tipos abreviados no se les puede dar el atributo 'Sealed'. + + + + Cannot inherit a sealed type + No se puede heredar un tipo sellado. + + + + Cannot inherit from interface type. Use interface ... with instead. + No se puede heredar de un tipo de interfaz. Use 'interface ... with' en su lugar. + + + + Struct types cannot contain abstract members + Los tipos de struct no pueden contener miembros abstractos. + + + + Interface types cannot be sealed + Los tipos de interfaz no pueden estar sellados. + + + + Delegate specifications must be of the form 'typ -> typ' + Las especificaciones de delegado deben tener el formato 'typ -> typ'. + + + + Delegate specifications must not be curried types. Use 'typ * ... * typ -> typ' for multi-argument delegates, and 'typ -> (typ -> typ)' for delegates returning function values. + Las especificaciones de delegado no deben ser tipos currificados. Use 'typ * ... * typ -> typ' para delegados con varios argumentos y, 'typ -> (typ -> typ)', para delegados que devuelven valores de función. + + + + Literal enumerations must have type int, uint, int16, uint16, int64, uint64, byte, sbyte or char + Las enumeraciones de literal deben tener el tipo int, uint, int16, uint16, int64, uint64, byte, sbyte o char. + + + + This type definition involves an immediate cyclic reference through an abbreviation + Esta definición de tipo implica una referencia cíclica inmediata a través de una abreviación. + + + + This type definition involves an immediate cyclic reference through a struct field or inheritance relation + Esta definición de tipo implica una referencia cíclica inmediata a través de un campo de struct o una relación de herencia. + + + + The syntax 'type X with ...' is reserved for augmentations. Types whose representations are hidden but which have members are now declared in signatures using 'type X = ...'. You may also need to add the '[<Sealed>] attribute to the type definition in the signature + La sintaxis "type X with ..." está reservada para aumentos. Los tipos cuyas representaciones están ocultas pero que tienen miembros se declaran ahora en signaturas con "type X = ...". También puede ser necesario agregar el atributo "[<Sealed>]" a la definición de tipos en la signatura. + + + + Members that extend interface, delegate or enum types must be placed in a module separate to the definition of the type. This module must either have the AutoOpen attribute or be opened explicitly by client code to bring the extension members into scope. + Los miembros que extienden tipos de interfaz, delegado o enumeración deben ponerse en un módulo separado de la definición del tipo. Este módulo debe tener el atributo AutoOpen, o bien código de cliente debe abrirlo de forma explícita para traer los miembros de extensión dentro del ámbito. + + + + One or more of the declared type parameters for this type extension have a missing or wrong type constraint not matching the original type constraints on '{0}' + Uno o varios parámetros de tipo declarados para esta extensión de tipo tienen una restricción de tipo ausente o errónea que no coincide con las restricciones de tipo original en "{0}" + + + + Type definitions may only have one 'inherit' specification and it must be the first declaration + Las definiciones de tipo pueden tener solo una especificación 'inherit' y debe ser la primera declaración. + + + + 'let' and 'do' bindings must come before member and interface definitions in type definitions + Los enlaces 'let' y 'do' deben preceder a las definiciones de miembro e interfaz en las definiciones de tipo. + + + + This 'inherit' declaration specifies the inherited type but no arguments. Consider supplying arguments, e.g. 'inherit BaseType(args)'. + Esta declaración 'inherit' especifica el tipo heredado pero no argumentos. Considere proporcionar argumentos; por ejemplo, 'inherit BaseType(args)'. + + + + This 'inherit' declaration has arguments, but is not in a type with a primary constructor. Consider adding arguments to your type definition, e.g. 'type X(args) = ...'. + Esta declaración 'inherit' tiene argumentos, pero no está en un tipo con un constructor principal. Considere agregar argumentos a la definición de tipo, por ejemplo, 'type X(args) = ...'. + + + + This definition may only be used in a type with a primary constructor. Consider adding arguments to your type definition, e.g. 'type X(args) = ...'. + Esta definición se puede usar solo en un tipo con un constructor principal. Considere agregar argumentos a la definición de tipo, por ejemplo, 'type X(args) = ...'. + + + + Type abbreviations cannot have augmentations + Las abreviaciones de tipo no pueden tener aumentos. + + + + The path '{0}' is a namespace. A module abbreviation may not abbreviate a namespace. + La ruta de acceso '{0}' es un espacio de nombres. Una abreviación de módulo no puede abreviar un espacio de nombres. + + + + The type '{0}' is used in an invalid way. A value prior to '{1}' has an inferred type involving '{2}', which is an invalid forward reference. + El tipo '{0}' se usa de un modo no válido. Un valor anterior a '{1}' tiene un tipo inferido que implica '{2}', que es una referencia adelantada no válida. + + + + The member '{0}' is used in an invalid way. A use of '{1}' has been inferred prior to the definition of '{2}', which is an invalid forward reference. + El miembro '{0}' se usa de forma no válida. Se ha inferido un uso de '{1}' antes que la definición de '{2}', que es una referencia adelantada no válida. + + + + The attribute 'AutoOpen(\"{0}\")' in the assembly '{1}' did not refer to a valid module or namespace in that assembly and has been ignored + El atributo 'AutoOpen(\"{0}\")' del ensamblado '{1}' no hacía referencia a un módulo o espacio de nombres válido en ese ensamblado y se ha omitido. + + + + Undefined value '{0}' + Valor no definido '{0}'. + + + + Label {0} not found + No se encontró la etiqueta {0}. + + + + Incorrect number of type arguments to local call + Número incorrecto de argumentos de tipo para una llamada local. + + + + Dynamic invocation of {0} is not supported + No se admite la invocación dinámica de {0}. + + + + Taking the address of a literal field is invalid + No se permite tomar la dirección de un campo literal. + + + + This operation involves taking the address of a value '{0}' represented using a local variable or other special representation. This is invalid. + Esta operación implica tomar la dirección de un valor '{0}' representado con una variable local u otra representación especial. Esto no es válido. + + + + Custom marshallers cannot be specified in F# code. Consider using a C# helper function. + En código de F#, no se pueden especificar los contadores de referencias personalizados. Considere el uso de una función auxiliar de C#. + + + + The MarshalAs attribute could not be decoded + No se pudo descodificar el atributo MarshalAs. + + + + The signature for this external function contains type parameters. Constrain the argument and return types to indicate the types of the corresponding C function. + La signatura de esta función externa contiene parámetros de tipo. Restrinja los tipos de argumento y valor devuelto para indicar los tipos de la función de C correspondiente. + + + + The DllImport attribute could not be decoded + No se pudo descodificar el atributo DllImport. + + + + Literal fields cannot be set + No se pueden establecer campos de literal. + + + + GenSetStorage: {0} was represented as a static method but was not an appropriate lambda expression + GenSetStorage: {0} se representó como un método estático pero no era una expresión lambda apropiada. + + + + Mutable variables cannot escape their method + Las variables mutables no pueden escapar de su método. + + + + Compiler error: unexpected unrealized value + Error del compilador: valor no realizado inesperado. + + + + Main module of program is empty: nothing will happen when it is run + El módulo principal del programa está vacío: no ocurrirá nada cuando se ejecute. + + + + This type cannot be used for a literal field + Este tipo no se puede usar para un campo literal. + + + + Unexpected GetSet annotation on a property + Anotación GetSet inesperada en una propiedad. + + + + The FieldOffset attribute could not be decoded + No se pudo descodificar el atributo FieldOffset. + + + + The StructLayout attribute could not be decoded + No se pudo descodificar el atributo StructLayout. + + + + The DefaultAugmentation attribute could not be decoded + No se pudo descodificar el atributo DefaultAugmentation. + + + + Reflected definitions cannot contain uses of the prefix splice operator '%' + Las definiciones reflejadas no pueden contener usos del operador de inserción de prefijo '%'. + + + + Problem with codepage '{0}': {1} + Problema con la página de códigos '{0}': {1} + + + + Copyright (c) Microsoft Corporation. All Rights Reserved. + (C) Microsoft Corporation. Todos los derechos reservados. + + + + Freely distributed under the MIT Open Source License. https://github.com/Microsoft/visualfsharp/blob/master/License.txt + Distribuido libremente bajo licencia de código abierto de MIT. https://github.com/Microsoft/visualfsharp/blob/master/License.txt + + + + Name of the output file (Short form: -o) + Nombre del archivo de salida (forma corta: -o) + + + + Build a console executable + Compilar un archivo ejecutable de consola + + + + Build a Windows executable + Compilar un archivo ejecutable de Windows + + + + Build a library (Short form: -a) + Compilar una biblioteca (forma corta: -a) + + + + Build a module that can be added to another assembly + Compilar un módulo que se pueda agregar a otro ensamblado + + + + Delay-sign the assembly using only the public portion of the strong name key + Retrasar la signatura del ensamblado usando solo la parte pública de la clave de nombre seguro + + + + Public-sign the assembly using only the public portion of the strong name key, and mark the assembly as signed + Firmar el ensamblado usando solo la parte pública de la clave de nombre seguro y marcarlo como firmado + + + + Write the xmldoc of the assembly to the given file + Escribir el xmldoc del ensamblado en el archivo dado + + + + Specify a strong name key file + Especificar un archivo de clave de nombre seguro + + + + Specify a strong name key container + Especificar un contenedor de claves de nombre seguro + + + + Limit which platforms this code can run on: x86, Itanium, x64, anycpu32bitpreferred, or anycpu. The default is anycpu. + Limitar las plataformas en las que se puede ejecutar este código: x86, Itanium, x64, anycpu32bitpreferred o anycpu. El valor predeterminado es anycpu. + + + + Only include optimization information essential for implementing inlined constructs. Inhibits cross-module inlining but improves binary compatibility. + Incluir solo información de optimización esencial para implementar construcciones inline. Inhibe la inserción entre módulos pero mejora la compatibilidad binaria. + + + + Don't add a resource to the generated assembly containing F#-specific metadata + No agregar un recurso al ensamblado generado que contiene metadatos específicos de F# + + + + Print the inferred interface of the assembly to a file + Imprimir la interfaz inferida del ensamblado en un archivo + + + + Reference an assembly (Short form: -r) + Referencia a un ensamblado (forma corta: -r) + + + + Specify a Win32 resource file (.res) + Especificar el archivo de recursos Win32 (.res) + + + + Specify a Win32 manifest file + Especificar un archivo de manifiesto Win32 + + + + Do not include the default Win32 manifest + No incluir el manifiesto Win32 predeterminado + + + + Embed all source files in the portable PDB file + Inserta todos los archivos de código fuente en el archivo PDB portátil. + + + + Embed specific source files in the portable PDB file + Inserta archivos de código fuente específicos en el archivo PDB portátil + + + + Source link information file to embed in the portable PDB file + Archivo de información de vínculos de origen para insertar en el archivo PDB portátil + + + + --embed switch only supported when emitting a Portable PDB (--debug:portable or --debug:embedded) + El modificador --embed solo se admite cuando se emite un archivo PDB portátil (--debug:portable o --debug:embedded) + + + + --sourcelink switch only supported when emitting a Portable PDB (--debug:portable or --debug:embedded) + El modificador --sourcelink solo se admite cuando se emite un archivo PDB portátil (--debug:portable o --debug:embedded) + + + + Source file is too large to embed in a portable PDB + El archivo de código fuente es demasiado grande para insertarlo en un archivo PDB portátil + + + + Embed the specified managed resource + Incrustar el recurso administrado especificado + + + + Link the specified resource to this assembly where the resinfo format is <file>[,<string name>[,public|private]] + Vincular el recurso especificado a este ensamblado donde el formato de resinfo es <archivo>[,<nombre de cadena>[,public|private]]. + + + + Emit debug information (Short form: -g) + Emitir información de depuración (forma corta: -g) + + + + Specify debugging type: full, portable, embedded, pdbonly. ('{0}' is the default if no debuggging type specified and enables attaching a debugger to a running program, 'portable' is a cross-platform format, 'embedded' is a cross-platform format embedded into the output file). + Especifique el tipo de depuración: full, portable, embedded, pdbonly. ('{0}' es el valor predeterminado si no se especifica ningún tipo de depuración y permite conectar un depurador a un programa en ejecución, 'portable' es un formato multiplataforma, 'embedded' es un formato multiplataforma insertado en el archivo de salida). + + + + Enable optimizations (Short form: -O) + Habilitar optimizaciones (forma corta: -O) + + + + Enable or disable tailcalls + Habilitar o deshabilitar llamadas de cola + + + + Produce a deterministic assembly (including module version GUID and timestamp) + Generar un ensamblado determinista (con el GUID y la marca de tiempo de la versión del módulo) + + + + Enable or disable cross-module optimizations + Habilitar o deshabilitar optimizaciones entre módulos + + + + Report all warnings as errors + Notificar todas las advertencias como errores + + + + Report specific warnings as errors + Notificar advertencias específicas como errores + + + + Set a warning level (0-5) + Establecer un nivel de advertencia (0-5) + + + + Disable specific warning messages + Deshabilitar mensajes de advertencia específicos + + + + Enable specific warnings that may be off by default + Habilitar advertencias específicas que pueden estar desactivadas de forma predeterminada + + + + Generate overflow checks + Generar comprobaciones de desbordamiento + + + + Define conditional compilation symbols (Short form: -d) + Definir símbolos de compilación condicionales (forma corta: -d) + + + + Ignore ML compatibility warnings + Omitir las advertencias de compatibilidad con ML + + + + + Display this usage message (Short form: -?) + Muestra este mensaje de uso (forma corta: -?) + + + + Read response file for more options + Leer el archivo de respuesta para ver más opciones + + + + Specify the codepage used to read source files + Especifique la página de códigos usada para leer archivos de código fuente. + + + + Output messages in UTF-8 encoding + Mensajes de salida con codificación UTF-8 + + + + Output messages with fully qualified paths + Mensajes de salida con rutas de acceso completas + + + + Specify a directory for the include path which is used to resolve source files and assemblies (Short form: -I) + Especifique un directorio para la ruta de acceso de inclusión que se usa para resolver los ensamblados y archivos de código fuente (forma corta: -I). + + + + Base address for the library to be built + Dirección base para la biblioteca que se compilará + + + + Do not reference the default CLI assemblies by default + No hacer referencia de forma predeterminada a los ensamblados de CLI predeterminados + + + + Statically link the F# library and all referenced DLLs that depend on it into the assembly being generated + Vincular de forma estática la biblioteca de F# y todos los archivos DLL a los que se hace referencia que dependen de ella en el ensamblado que se va a generar + + + + Statically link the given assembly and all referenced DLLs that depend on this assembly. Use an assembly name e.g. mylib, not a DLL name. + Vincular de forma estática el ensamblado dado y todos los archivos DLL a los que se hace referencia que dependen de este ensamblado. Use un nombre de ensamblado (por ejemplo, mylib), no un nombre de DLL. + + + + Use a resident background compilation service to improve compiler startup times. + Use un servicio de compilación en segundo plano residente para mejorar los tiempos de inicio del compilador. + + + + Name the output debug file + Nombre del archivo de depuración de salida + + + + Resolve assembly references using directory-based rules rather than MSBuild resolution + Resolver las referencias de ensamblado con reglas basadas en directorio en lugar de la resolución de MSBuild + + + + Unrecognized target '{0}', expected 'exe', 'winexe', 'library' or 'module' + '{0}' de destino no reconocido, se esperaba 'exe', 'winexe', 'library' o 'module'. + + + + Unrecognized debug type '{0}', expected 'pdbonly' or 'full' + Tipo de depuración '{0}' no reconocido, se esperaba 'pdbonly' o 'full'. + + + + Invalid warning level '{0}' + Nivel de advertencia no válido: '{0}'. + + + + Short form of '{0}' + Forma corta de '{0}' + + + + The command-line option '--cliroot' has been deprecated. Use an explicit reference to a specific copy of mscorlib.dll instead. + La opción de la línea de comandos '--cliroot' está en desuso. En su lugar, use una referencia explícita a una copia específica de mscorlib.dll. + + + + Use to override where the compiler looks for mscorlib.dll and framework components + Úselo para invalidar cuando el compilador busque mscorlib.dll y componentes del marco de trabajo. + + + + - OUTPUT FILES - + - ARCHIVOS DE SALIDA - + + + + - INPUT FILES - + - ARCHIVOS DE ENTRADA - + + + + - RESOURCES - + - RECURSOS - + + + + - CODE GENERATION - + - GENERACIÓN DE CÓDIGO - + + + + - ADVANCED - + - AVANZADAS - + + + + - MISCELLANEOUS - + - VARIOS - + + + + - LANGUAGE - + - LENGUAJE - + + + + - ERRORS AND WARNINGS - + - ERRORES Y ADVERTENCIAS - + + + + Unknown --test argument: '{0}' + Argumento --test desconocido: '{0}' + + + + Unrecognized platform '{0}', valid values are 'x86', 'x64', 'Itanium', 'anycpu32bitpreferred', and 'anycpu' + Plataforma '{0}' no reconocida. Los valores válidos son 'x86', 'x64', 'Itanium', 'anycpu32bitpreferred' y 'anycpu' + + + + The command-line option '{0}' is for test purposes only + La opción de la línea de comandos '{0}' es solo para uso de pruebas + + + + The command-line option '{0}' has been deprecated + La opción de la línea de comandos '{0}' está en desuso. + + + + The command-line option '{0}' has been deprecated. Use '{1}' instead. + La opción de la línea de comandos '{0}' está en desuso. Use '{1}' en su lugar. + + + + The command-line option '{0}' has been deprecated. HTML document generation is now part of the F# Power Pack, via the tool FsHtmlDoc.exe. + La opción de la línea de comandos '{0}' está en desuso. La generación de documentos HTML forma parte ahora de F# Power Pack, a través de la herramienta FsHtmlDoc.exe. + + + + Output warning and error messages in color + Advertencia de salida y mensajes de error en color + + + + Enable high-entropy ASLR + Habilitar ASLR de alta entropía + + + + Specify subsystem version of this assembly + Especificar la versión del subsistema de este ensamblado + + + + Specify target framework profile of this assembly. Valid values are mscorlib, netcore or netstandard. Default - mscorlib + Especifique el perfil de la plataforma de destino de este ensamblado. Los valores válidos son mscorlib, netcore o netstandard. Valor predeterminado: mscorlib. + + + + Emit debug information in quotations + Emitir información de depuración en expresiones de código delimitadas + + + + Specify the preferred output language culture name (e.g. es-ES, ja-JP) + Especifique la referencia cultural del idioma de salida que prefiera (por ejemplo, es-ES, ja-JP) + + + + Don't copy FSharp.Core.dll along the produced binaries + No copiar FSharp.Core.dll con los archivos binarios producidos + + + + Invalid version '{0}' for '--subsystemversion'. The version must be 4.00 or greater. + Versión '{0}' no válida de '--subsystemversion'. La versión debe ser 4.00 o posterior. + + + + Invalid value '{0}' for '--targetprofile', valid values are 'mscorlib', 'netcore' or 'netstandard'. + Valor "{0}" no válido para "--targetprofile", los valores válidos son "mscorlib", "netcore" o "netstandard". + + + + Full name + Nombre completo + + + + and {0} other overloads + y otras {0} sobrecargas + + + + union case + caso de unión + + + + active pattern result + resultado de patrón activo + + + + active recognizer + reconocedor activo + + + + field + campo + + + + event + evento + + + + property + propiedad + + + + extension + extensión + + + + custom operation + operación personalizada + + + + argument + argumento + + + + patvar + patvar + + + + namespace + espacio de nombres + + + + module + módulo + + + + namespace/module + espacio de nombres o módulo + + + + from {0} + desde {0} + + + + also from {0} + también desde {0} + + + + generated property + propiedad generada + + + + generated type + tipo generado + + + + Found by AssemblyFolders registry key + Encontrado por la clave del Registro AssemblyFolders. + + + + Found by AssemblyFoldersEx registry key + Encontrado por la clave del Registro AssemblyFoldersEx. + + + + .NET Framework + .NET Framework + + + + Global Assembly Cache + Caché global de ensamblados + + + + Recursive class hierarchy in type '{0}' + Jerarquía de clases recursiva en el tipo '{0}'. + + + + Invalid recursive reference to an abstract slot + Referencia recursiva no válida a una ranura abstracta. + + + + The event '{0}' has a non-standard type. If this event is declared in another CLI language, you may need to access this event using the explicit {1} and {2} methods for the event. If this event is declared in F#, make the type of the event an instantiation of either 'IDelegateEvent<_>' or 'IEvent<_,_>'. + El evento '{0}' tiene un tipo no estándar. Si este evento está declarado en otro lenguaje CLI, puede ser necesario obtener acceso a este evento usando los métodos explícitos {1} y {2} para el evento. Si este evento está declarado en F#, convierta el tipo del evento en una creación de instancia de 'IDelegateEvent<_>' o 'IEvent<_,_>'. + + + + The type '{0}' is not accessible from this code location + El tipo '{0}' no es accesible desde este lugar del código. + + + + The union cases or fields of the type '{0}' are not accessible from this code location + Los casos de unión o campos del tipo '{0}' no son accesibles desde este lugar del código. + + + + The value '{0}' is not accessible from this code location + El valor '{0}' no es accesible desde este lugar del código. + + + + The union case '{0}' is not accessible from this code location + El caso de unión '{0}' no es accesible desde este lugar del código. + + + + The record, struct or class field '{0}' is not accessible from this code location + El campo de clase, registro o struct '{0}' no es accesible desde este lugar del código. + + + + The struct or class field '{0}' is not accessible from this code location + El campo de clase o struct '{0}' no es accesible desde este lugar del código. + + + + This construct is experimental + Esta construcción es experimental. + + + + No Invoke methods found for delegate type + No se encontraron métodos Invoke para el tipo de delegado. + + + + More than one Invoke method found for delegate type + Se encontró más de un método Invoke para el tipo de delegado. + + + + Delegates are not allowed to have curried signatures + No se permite que los delegados tengan signaturas currificadas. + + + + Unexpected Expr.TyChoose + Expr.TyChoose inesperado. + + + + Note: Lambda-lifting optimizations have not been applied because of the use of this local constrained generic function as a first class value. Adding type constraints may resolve this condition. + Nota: no se han aplicado optimizaciones de elevación de expresiones lambda debido al uso de esta función genérica restringida local como valor de primera clase. Esta condición puede resolverse agregando restricciones de tipo. + + + + Identifiers containing '@' are reserved for use in F# code generation + Los identificadores que contienen '@' está reservados para usarlos en la generación de código de F#. + + + + The identifier '{0}' is reserved for future use by F# + El identificador '{0}' está reservado para uso futuro de F#. + + + + Missing variable '{0}' + Falta la variable '{0}'. + + + + Partial active patterns may only generate one result + Los patrones activos parciales solo pueden generar un resultado. + + + + The type '{0}' is required here and is unavailable. You must add a reference to assembly '{1}'. + Aquí se requiere el tipo '{0}' y no está disponible. Debe agregar una referencia al ensamblado '{1}'. + + + + A reference to the type '{0}' in assembly '{1}' was found, but the type could not be found in that assembly + Se encontró una referencia al tipo '{0}' en el ensamblado '{1}', pero no se encontró el tipo en ese ensamblado. + + + + Internal error or badly formed metadata: not enough type parameters were in scope while importing + Error interno o metadatos mal formados: no había suficientes parámetros de tipo en el ámbito durante la importación. + + + + A reference to the DLL {0} is required by assembly {1}. The imported type {2} is located in the first assembly and could not be resolved. + El ensamblado {1} requiere una referencia al archivo DLL {0}. El tipo {2} importado se encuentra en el primer ensamblado y no se pudo resolver. + + + + An imported assembly uses the type '{0}' but that type is not public + Un ensamblado importado usa el tipo '{0}', pero el tipo no es público. + + + + The value '{0}' was marked inline but its implementation makes use of an internal or private function which is not sufficiently accessible + El valor '{0}' estaba marcado como inline pero su implementación hace uso de una función interna o privada que no es lo suficientemente accesible. + + + + The value '{0}' was marked inline but was not bound in the optimization environment + El valor '{0}' estaba marcado como inline pero no estaba enlazado en el entorno de optimización. + + + + Local value {0} not found during optimization + No se encontró el valor local {0} durante la optimización. + + + + A value marked as 'inline' has an unexpected value + Un valor marcado como 'inline' tiene un valor inesperado. + + + + A value marked as 'inline' could not be inlined + No se pudo insertar un valor marcado como 'inline'. + + + + Failed to inline the value '{0}' marked 'inline', perhaps because a recursive value was marked 'inline' + No se pudo insertar el valor '{0}' marcado como 'inline', quizá porque un valor recursivo estaba marcado como 'inline'. + + + + Recursive ValValue {0} + ValValue {0} recursivo + + + + The indentation of this 'in' token is incorrect with respect to the corresponding 'let' + La sangría de este token 'in' es incorrecta con respecto al 'let' correspondiente. + + + + Possible incorrect indentation: this token is offside of context started at position {0}. Try indenting this token further or using standard formatting conventions. + Posible sangría incorrecta: este token está fuera del contexto iniciado en la posición {0}. Pruebe aplicando más sangría a este token o usando convenciones de formato estándar. + + + + The '|' tokens separating rules of this pattern match are misaligned by one column. Consider realigning your code or using further indentation. + Los tokens '|' que separan reglas de esta detección de patrones están desalineados en una columna. Considere realinear el código o usar más sangría. + + + + Invalid module/expression/type + Módulo, expresión o tipo no válidos. + + + + Multiple types exist called '{0}', taking different numbers of generic parameters. Provide a type instantiation to disambiguate the type resolution, e.g. '{1}'. + Existen varios tipos con el nombre '{0}' que toman números diferentes de parámetros genéricos. Proporcione una creación de instancia de tipo para eliminar la ambigüedad de la resolución de tipos; por ejemplo, '{1}'. + + + + The instantiation of the generic type '{0}' is missing and can't be inferred from the arguments or return type of this member. Consider providing a type instantiation when accessing this type, e.g. '{1}'. + Falta la creación de instancia del tipo genérico '{0}' y no se puede inferir de los argumentos o del tipo de valor devuelto de este miembro. Considere proporcionar una creación de instancia de tipo al obtener acceso a este tipo; por ejemplo, '{1}'. + + + + 'global' may only be used as the first name in a qualified path + 'global' se puede usar sólo como el primer nombre en una ruta de acceso completa. + + + + This is not a constructor or literal, or a constructor is being used incorrectly + Este no es un constructor o un literal, o se está usando un constructor de forma incorrecta. + + + + Unexpected empty long identifier + Identificador largo vacío inesperado. + + + + The record type '{0}' does not contain a label '{1}'. + El tipo de registro '{0}' no contiene una etiqueta '{1}'. + + + + Invalid field label + Etiqueta de campo no válida. + + + + Invalid expression '{0}' + Expresión '{0}' no válida. + + + + No constructors are available for the type '{0}' + No hay constructores disponibles para el tipo '{0}'. + + + + The union type for union case '{0}' was defined with the RequireQualifiedAccessAttribute. Include the name of the union type ('{1}') in the name you are using. + El tipo de unión del caso de unión "{0}" se definió con el atributo RequireQualifiedAccessAttribute. Incluya el nombre del tipo de unión ("{1}") en el nombre que esté usando. + + + + The record type for the record field '{0}' was defined with the RequireQualifiedAccessAttribute. Include the name of the record type ('{1}') in the name you are using. + El tipo de registro del campo de registro "{0}" se definió con el atributo RequireQualifiedAccessAttribute. Incluya el nombre del tipo de registro ("{1}") en el nombre que esté usando. + + + + Unexpected error creating debug information file '{0}' + Error inesperado al crear el archivo de información de depuración '{0}'. + + + + This number is outside the allowable range for this integer type + Este número está fuera del intervalo permitido para este tipo de entero. + + + + '{0}' is not permitted as a character in operator names and is reserved for future use + '{0}' no se permite como carácter en nombres de operador y está reservado para uso futuro. + + + + Unexpected character '{0}' + Carácter '{0}' inesperado. + + + + This byte array literal contains characters that do not encode as a single byte + Este literal de matriz de bytes contiene caracteres que no se codifican como un solo byte. + + + + Identifiers followed by '{0}' are reserved for future use + Los identificadores seguidos de '{0}' están reservados para uso futuro. + + + + This number is outside the allowable range for 8-bit signed integers + Este número está fuera del intervalo permitido para enteros firmados de 8 bits. + + + + This number is outside the allowable range for hexadecimal 8-bit signed integers + Este número está fuera del intervalo permitido para enteros firmados de 8 bits hexadecimales. + + + + This number is outside the allowable range for 8-bit unsigned integers + Este número está fuera del intervalo permitido para enteros no firmados de 8 bits. + + + + This number is outside the allowable range for 16-bit signed integers + Este número está fuera del intervalo permitido para enteros firmados de 16 bits. + + + + This number is outside the allowable range for 16-bit unsigned integers + Este número está fuera del intervalo permitido para enteros no firmados de 16 bits. + + + + This number is outside the allowable range for 32-bit signed integers + Este número está fuera del intervalo permitido para enteros firmados de 32 bits. + + + + This number is outside the allowable range for 32-bit unsigned integers + Este número está fuera del intervalo permitido para enteros no firmados de 32 bits. + + + + This number is outside the allowable range for 64-bit signed integers + Este número está fuera del intervalo permitido para enteros firmados de 64 bits. + + + + This number is outside the allowable range for 64-bit unsigned integers + Este número está fuera del intervalo permitido para enteros no firmados de 64 bits. + + + + This number is outside the allowable range for signed native integers + Este número está fuera del intervalo permitido para enteros nativos firmados. + + + + This number is outside the allowable range for unsigned native integers + Este número está fuera del intervalo permitido para enteros nativos no firmados. + + + + Invalid floating point number + número de punto flotante no válido. + + + + This number is outside the allowable range for decimal literals + Este número está fuera del intervalo permitido para literales decimales. + + + + This number is outside the allowable range for 32-bit floats + Este número está fuera del intervalo permitido para flotantes de 32 bits. + + + + This is not a valid numeric literal. Valid numeric literals include 1, 0x1, 0b0001 (int), 1u (uint32), 1L (int64), 1UL (uint64), 1s (int16), 1y (sbyte), 1uy (byte), 1.0 (float), 1.0f (float32), 1.0m (decimal), 1I (BigInteger). + Este literal numérico no es válido. Entre los literales numéricos válidos se incluyen 1, 0x1, 0b0001 (int), 1u (uint32), 1L (int64), 1UL (uint64), 1s (int16), 1y (sbyte), 1uy (byte), 1.0 (float), 1.0f (float32), 1.0m (decimal) y 1I (BigInteger). + + + + This is not a valid byte literal + Este no es un literal de byte válido. + + + + This is not a valid character literal + Este no es un literal de carácter válido. + + + + This Unicode encoding is only valid in string literals + Esta codificación Unicode es válida solo en literales de cadena. + + + + This token is reserved for future use + Este token está reservado para uso futuro. + + + + TABs are not allowed in F# code unless the #indent \"off\" option is used + No se permiten tabulaciones en código de F# a menos que se use la opción #indent \"off\". + + + + Invalid line number: '{0}' + Número de línea no válido: '{0}'. + + + + #if directive must appear as the first non-whitespace character on a line + La directiva #if debe aparecer como el primer carácter que no es un espacio en blanco en una línea. + + + + #else has no matching #if + #else no tiene el correspondiente #if. + + + + #endif required for #else + #endif requerido por #else. + + + + #else directive must appear as the first non-whitespace character on a line + La directiva #else debe aparecer como el primer carácter que no es un espacio en blanco en una línea. + + + + #endif has no matching #if + #endif no tiene el correspondiente #if. + + + + #endif directive must appear as the first non-whitespace character on a line + La directiva #endif debe aparecer como el primer carácter que no es un espacio en blanco en una línea. + + + + #if directive should be immediately followed by an identifier + La directiva #if debe ir seguida inmediatamente por un identificador. + + + + Syntax error. Wrong nested #endif, unexpected tokens before it. + Error de sintaxis. #endif anidado incorrecto, se esperaban tokens delante de él. + + + + #! may only appear as the first line at the start of a file. + #! solo puede aparecer como primera línea al principio de un archivo. + + + + Expected single line comment or end of line + Se esperaba un comentario de una sola línea o un final de línea + + + + Infix operator member '{0}' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ... + El miembro de operador de infijo '{0}' no tiene argumentos. Se esperaba una tupla de 2 argumentos; por ejemplo, el miembro estático (+) (x,y) = ... + + + + Infix operator member '{0}' has {1} initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ... + El miembro de operador de infijo '{0}' tiene {1} argumentos iniciales. Se esperaba una tupla de 2 argumentos; por ejemplo, el miembro estático (+) (x,y) = ... + + + + Infix operator member '{0}' has extra curried arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ... + El miembro de operador de infijo '{0}' tiene argumentos currificados extra. Se esperaba una tupla de 2 argumentos; por ejemplo, el miembro estático (+) (x,y) = ... + + + + All record, union and struct types in FSharp.Core.dll must be explicitly labelled with 'StructuralComparison' or 'NoComparison' + Todos los tipos de registro, unión y struct de FSharp.Core.dll deben estar etiquetados de forma explícita con 'StructuralComparison' o 'NoComparison'. + + + + The struct, record or union type '{0}' has the 'StructuralComparison' attribute but the type parameter '{1}' does not satisfy the 'comparison' constraint. Consider adding the 'comparison' constraint to the type parameter + El tipo de struct, registro o unión '{0}' tiene el atributo 'StructuralComparison', pero el parámetro de tipo '{1}' no satisface la restricción 'comparison'. Considere agregar la restricción 'comparison' al parámetro de tipo. + + + + The struct, record or union type '{0}' has the 'StructuralComparison' attribute but the component type '{1}' does not satisfy the 'comparison' constraint + El tipo de struct, registro o unión '{0}' tiene el atributo 'StructuralComparison', pero el tipo de componente '{1}' no satisface la restricción 'comparison'. + + + + The struct, record or union type '{0}' is not structurally comparable because the type parameter {1} does not satisfy the 'comparison' constraint. Consider adding the 'NoComparison' attribute to the type '{2}' to clarify that the type is not comparable + El tipo de struct, registro o unión '{0}' no es estructuralmente comparable porque el parámetro de tipo {1} no satisface la restricción 'comparison'. Considere agregar el atributo 'NoComparison' al tipo '{2}' para indicar que el tipo no es comparable. + + + + The struct, record or union type '{0}' is not structurally comparable because the type '{1}' does not satisfy the 'comparison' constraint. Consider adding the 'NoComparison' attribute to the type '{2}' to clarify that the type is not comparable + El tipo de struct, registro o unión '{0}' no es estructuralmente comparable porque el tipo '{1}' no satisface la restricción 'comparison'. Considere agregar el atributo 'NoComparison' al tipo '{2}' para indicar que el tipo no es comparable. + + + + The struct, record or union type '{0}' does not support structural equality because the type parameter {1} does not satisfy the 'equality' constraint. Consider adding the 'NoEquality' attribute to the type '{2}' to clarify that the type does not support structural equality + El tipo de struct, registro o unión '{0}' no admite igualdad estructural porque el parámetro de tipo {1} no satisface la restricción 'equality'. Considere agregar el atributo 'NoEquality' al tipo '{2}' para indicar que el tipo no admite igualdad estructural. + + + + The struct, record or union type '{0}' does not support structural equality because the type '{1}' does not satisfy the 'equality' constraint. Consider adding the 'NoEquality' attribute to the type '{2}' to clarify that the type does not support structural equality + El tipo de struct, registro o unión '{0}' no admite igualdad estructural porque el tipo '{1}' no satisface la restricción 'equality'. Considere agregar el atributo 'NoEquality' al tipo '{2}' para indicar que el tipo no admite igualdad estructural. + + + + The struct, record or union type '{0}' has the 'StructuralEquality' attribute but the type parameter '{1}' does not satisfy the 'equality' constraint. Consider adding the 'equality' constraint to the type parameter + El tipo de struct, registro o unión '{0}' tiene el atributo 'StructuralEquality', pero el parámetro de tipo '{1}' no satisface la restricción 'equality'. Considere agregar la restricción 'equality' al parámetro de tipo. + + + + The struct, record or union type '{0}' has the 'StructuralEquality' attribute but the component type '{1}' does not satisfy the 'equality' constraint + El tipo de struct, registro o unión '{0}' tiene el atributo 'StructuralEquality', pero el tipo de componente '{1}' no satisface la restricción 'equality'. + + + + Each argument of the primary constructor for a struct must be given a type, for example 'type S(x1:int, x2: int) = ...'. These arguments determine the fields of the struct. + A cada argumento del constructor principal de un struct debe proporcionársele un tipo; por ejemplo, 'type S(x1:int, x2: int) = ...'. Estos argumentos determinan los campos del struct. + + + + The value '{0}' is unused + El valor '{0}' no se usa. + + + + The recursive object reference '{0}' is unused. The presence of a recursive object reference adds runtime initialization checks to members in this and derived types. Consider removing this recursive object reference. + La referencia de objeto recursiva '{0}' no se usa. La presencia de una referencia de objeto recursiva agrega comprobaciones de inicialización en tiempo de ejecución a los miembros de este tipo y los tipos derivados. Considere quitar esta referencia de objeto recursiva. + + + + A getter property may have at most one argument group + Una propiedad de captador puede tener un grupo de argumentos como máximo. + + + + A setter property may have at most two argument groups + Una propiedad de establecedor puede tener como máximo dos grupos de argumentos. + + + + Invalid property getter or setter + Captador o establecedor de propiedad no válido. + + + + An indexer property must be given at least one argument + A una propiedad de indizador se le debe proporcionar al menos un argumento. + + + + This operation accesses a mutable top-level value defined in another assembly in an unsupported way. The value cannot be accessed through its address. Consider copying the expression to a mutable local, e.g. 'let mutable x = ...', and if necessary assigning the value back after the completion of the operation + Esta operación obtiene acceso a un valor de nivel superior mutable definido en otro ensamblado de forma no admitida. No se puede obtener acceso al valor con su dirección. Considere copiar la expresión en una varibale local mutable (por ejemplo, 'let mutable x = ...') y, si es necesario, asignar el valor de nuevo una vez completada la operación. + + + + Remove spaces between the type name and type parameter, e.g. \"type C<'T>\", not type \"C <'T>\". Type parameters must be placed directly adjacent to the type name. + Los parámetros de tipo se deben colocar directamente adyacentes al nombre de tipo; por ejemplo, \"type C<'T>\", no type \"C <'T>\". + + + + Remove spaces between the type name and type parameter, e.g. \"C<'T>\", not \"C <'T>\". Type parameters must be placed directly adjacent to the type name. + Los argumentos de tipo se deben colocar directamente adyacentes al nombre de tipo; por ejemplo, \"C<'T>\", no \"C <'T>\". + + + + The use of the type syntax 'int C' and 'C <int>' is not permitted here. Consider adjusting this type to be written in the form 'C<int>' + Aquí no se permite el uso de la sintaxis de tipos 'int C' y 'C <int>'. Considere ajustar este tipo para escribirlo con el formato 'C<int>'. + + + + The module/namespace '{0}' from compilation unit '{1}' did not contain the module/namespace '{2}' + El módulo o espacio de nombres '{0}' de la unidad de compilación '{1}' no contenía el módulo o espacio de nombres '{2}'. + + + + The module/namespace '{0}' from compilation unit '{1}' did not contain the val '{2}' + El módulo o espacio de nombres '{0}' de la unidad de compilación '{1}' no contenía el val '{2}'. + + + + The module/namespace '{0}' from compilation unit '{1}' did not contain the namespace, module or type '{2}' + El módulo o espacio de nombres '{0}' de la unidad de compilación '{1}' no contenía el espacio de nombres, módulo o tipo '{2}'. + + + + The 'UseNullAsTrueValue' attribute flag may only be used with union types that have one nullary case and at least one non-nullary case + La marca de atributo 'UseNullAsTrueValue' se puede usar solo con tipos de unión que tengan un caso que acepte valores NULL y al menos un caso que no acepte valores NULL. + + + + The parameter '{0}' was inferred to have byref type. Parameters of byref type must be given an explicit type annotation, e.g. 'x1: byref<int>'. When used, a byref parameter is implicitly dereferenced. + Se ha inferido que el parámetro '{0}' tiene el tipo byref. A los parámetros de tipo byref se les debe dar una anotación de tipo explícita; por ejemplo, 'x1: byref<int>'. Cuando se usa un parámetro byref, se desreferencia de forma implícita. + + + + The generic member '{0}' has been used at a non-uniform instantiation prior to this program point. Consider reordering the members so this member occurs first. Alternatively, specify the full type of the member explicitly, including argument types, return type and any additional generic parameters and constraints. + El miembro genérico '{0}' se ha usado en una creación de instancia no uniforme anterior a este punto del programa. Considere reordenar los miembros para que este miembro esté en primer lugar. También puede especificar el tipo completo del miembro de forma explícita, incluidos los tipos de argumento, el tipo de valor devuelto y posibles restricciones y parámetros genéricos adicionales. + + + + The attribute '{0}' appears in both the implementation and the signature, but the attribute arguments differ. Only the attribute from the signature will be included in the compiled code. + El atributo '{0}' aparece tanto en la implementación como en la signatura, pero los argumentos de atributo difieren. Solo se incluirá el atributo de la signatura en el código compilado. + + + + Cannot call an abstract base member: '{0}' + No se puede llamar a un miembro base abstracto: '{0}' + + + + Could not resolve the ambiguity in the use of a generic construct with an 'unmanaged' constraint at or near this position + No se pudo resolver la ambigüedad en el uso de una construcción genérica con una restricción 'unmanaged' en esta posición o cerca de ella. + + + + This construct is for ML compatibility. {0}. You can disable this warning by using '--mlcompatibility' or '--nowarn:62'. + Esta construcción es para la compatibilidad con ML. {0}. Puede deshabilitar esta advertencia usando '--mlcompatibility' o '--nowarn:62'. + + + + The type '{0}' has been marked as having an Explicit layout, but the field '{1}' has not been marked with the 'FieldOffset' attribute + El tipo '{0}' se ha marcado como que tiene un diseño explícito, pero el campo '{1}' no se ha marcado con el atributo 'FieldOffset'. + + + + Interfaces inherited by other interfaces should be declared using 'inherit ...' instead of 'interface ...' + Las interfaces heredadas por otras interfaces deben declararse con 'inherit ...' en lugar de 'interface ...'. + + + + Invalid prefix operator + Operador de prefijo no válido + + + + Invalid operator definition. Prefix operator definitions must use a valid prefix operator name. + Definición de operador no válida. Las definiciones de operador de prefijo deben usar un nombre de operador de prefijo válido. + + + + The file extensions '.ml' and '.mli' are for ML compatibility + Las extensiones de archivo '.ml' y '.mli' son para la compatibilidad con ML. + + + + Consider using a file with extension '.ml' or '.mli' instead + En su lugar, considere el uso de un archivo con la extensión '.ml' o '.mli'. + + + + Active pattern '{0}' is not a function + El patrón activo '{0}' no es una función + + + + Active pattern '{0}' 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' + El patrón activo '{0}' tiene un tipo de resultado que contiene variables de tipo no determinadas por la entrada. La causa habitual es que no se menciona un caso de resultado; por ejemplo, 'let (|A|B|) (x:int) = A x'. Esto se puede corregir con una restricción de tipo; por ejemplo, 'let (|A|B|) (x:int) : Choice<int,unit> = A x' + + + + The FieldOffset attribute can only be placed on members of types marked with the StructLayout(LayoutKind.Explicit) + El atributo FieldOffset sólo se puede colocar en miembros de tipos marcados con StructLayout(LayoutKind.Explicit) + + + + Optional arguments must come at the end of the argument list, after any non-optional arguments + Los argumentos opcionales deben estar al final de la lista de argumentos, después de todos los argumentos no opcionales. + + + + Attribute 'System.Diagnostics.ConditionalAttribute' is only valid on methods or attribute classes + El atributo 'System.Diagnostics.ConditionalAttribute' es válido sólo en métodos o clases de atributos. + + + + Extension members cannot provide operator overloads. Consider defining the operator as part of the type definition instead. + Los miembros de extensión no pueden proporcionar sobrecargas de operador. En su lugar, considere definir el operador como parte de la definición de tipo. + + + + The name of the MDB file must be <assembly-file-name>.mdb. The --pdb option will be ignored. + El nombre del archivo MDB debe ser <ensamblado-archivo-nombre>.mdb. La opción --pdb se omitirá. + + + + MDB generation failed. Could not find compatible member {0} + Error en la generación de MDB. No se encontró un miembro {0} compatible. + + + + Cannot generate MDB debug information. Failed to load the 'MonoSymbolWriter' type from the 'Mono.CompilerServices.SymbolWriter.dll' assembly. + No se puede generar información de depuración de MDB. No se pudo cargar el tipo 'MonoSymbolWriter' del ensamblado 'Mono.CompilerServices.SymbolWriter.dll'. + + + + The union case named '{0}' conflicts with the generated type '{1}' + El caso de unión denominado '{0}' entra en conflicto con el tipo generado '{1}'. + + + + ReflectedDefinitionAttribute may not be applied to an instance member on a struct type, because the instance member takes an implicit 'this' byref parameter + ReflectedDefinitionAttribute no se puede aplicar a un miembro de instancia en un tipo struct porque dicho miembro toma un parámetro byref 'this' implícito. + + + + DLLImport bindings must be static members in a class or function definitions in a module + Los enlaces DLLImport deben ser miembros estáticos en definiciones de función o clase dentro de un módulo. + + + + When mscorlib.dll or FSharp.Core.dll is explicitly referenced the {0} option must also be passed + Cuando se hace referencia de forma explícita a mscorlib.dll o FSharp.Core.dll, debe pasarse también la opción {0}. + + + + FSharp.Core.sigdata not found alongside FSharp.Core. File expected in {0}. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required. + No se encontró FSharp.Core.sigdata junto con FSharp.Core. Archivo esperado en {0}. Considere la posibilidad de actualizar a una versión más reciente de FSharp.Core en la que ya no se requiere el archivo. + + + + File '{0}' not found alongside FSharp.Core. File expected in {1}. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required. + No se encontró el archivo "{0}" junto con FSharp.Core. Archivo esperado en {1}. Considere la posibilidad de actualizar a una versión más reciente de FSharp.Core en la que ya no se requiere el archivo. + + + + Filename '{0}' contains invalid character '{1}' + El nombre de archivo '{0}' contiene el carácter '{1}' no válido. + + + + 'use!' bindings must be of the form 'use! <var> = <expr>' + Los enlaces 'use!' deben tener el formato 'use! <var> = <expr>'. + + + + Inner generic functions are not permitted in quoted expressions. Consider adding some type constraints until this function is no longer generic. + No se permiten funciones genéricas internas en expresiones entre comillas. Considere agregar restricciones de tipo hasta que esta función deje de ser genérica. + + + + The type '{0}' is not a valid enumerator type , i.e. does not have a 'MoveNext()' method returning a bool, and a 'Current' property + '{0}' no es un tipo de enumerador válido, es decir, no tiene un método 'MoveNext()' que devuelva un valor booleano y una propiedad 'Current'. + + + + End of file in triple-quote string begun at or before here + El final del archivo en la cadena de comillas triples comenzaba aquí o antes + + + + End of file in triple-quote string embedded in comment begun at or before here + El final del archivo en la cadena de comillas triples incrustada en el comentario comenzaba aquí o antes. + + + + This type test or downcast will ignore the unit-of-measure '{0}' + Esta prueba de tipo o conversión hacia abajo omitirá la unidad de medida '{0}'. + + + + Expected type argument or static argument + Se esperaba un argumento de tipo o estático. + + + + Unmatched '<'. Expected closing '>' + '<' desemparejado. Se esperaba un elemento '>' de cierre. + + + + Unexpected quotation operator '<@' in type definition. If you intend to pass a verbatim string as a static argument to a type provider, put a space between the '<' and '@' characters. + Operador de expresión de código delimitada '<@' inesperado en la definición de tipo. Si desea pasar una cadena textual como argumento estático a un proveedor de tipos, incluya un espacio entre los caracteres '<' y '@'. + + + + Attempted to parse this as an operator name, but failed + Se intentó analizar este elemento como nombre de operador, pero se produjo un error. + + + + \U{0} is not a valid Unicode character escape sequence + \U{0} no es una secuencia de escape de caracteres Unicode válida + + + + '{0}' must be applied to an argument of type '{1}', but has been applied to an argument of type '{2}' + "{0}" se debe aplicar a un argumento de tipo "{1}", pero se ha aplicado a un argumento de tipo "{2}" + + + + '{0}' can only be applied to optional arguments + '{0}' solo puede aplicarse a argumentos opcionales + + + + The specified .NET Framework version '{0}' is not supported. Please specify a value from the enumeration Microsoft.Build.Utilities.TargetDotNetFrameworkVersion. + La versión de .NET Framework especificada "{0}" no se admite. Especifique un valor de la enumeración Microsoft.Build.Utilities.TargetDotNetFrameworkVersion. + + + + Invalid Magic value in CLR Header + Valor mágico no válido en encabezado CLR + + + + Bad image format + Formato de imagen incorrecto + + + + Private key expected + Se esperaba una clave privada + + + + RSA key expected + Se esperaba una clave RSA + + + + Invalid bit Length + Longitud en bits no válida + + + + Invalid RSAParameters structure - '{{0}}' expected + Estructura RSAParameters no válida, se esperaba '{{0}}' + + + + Invalid algId - 'Exponent' expected + algId no válido, se esperaba 'Exponent' + + + + Invalid signature size + Tamaño de signatura no válido + + + + No signature directory + No es un directorio de signaturas + + + + Invalid Public Key blob + Blob de clave pública no válido + + + + Exiting - too many errors + Saliendo, demasiados errores. + + + + The documentation file has no .xml suffix + El archivo de documentación no tiene el sufijo .xml. + + + + No implementation files specified + No se especificaron archivos de implementación. + + + + The attribute {0} specified version '{1}', but this value is invalid and has been ignored + El atributo {0} ha especificado la versión "{1}", pero este valor no es válido y se ha omitido + + + + Conflicting options specified: 'win32manifest' and 'win32res'. Only one of these can be used. + Se especificaron opciones en conflicto: 'win32manifest' y 'win32res'. Solo se puede usar una de ellas. + + + + The code in assembly '{0}' makes uses of quotation literals. Static linking may not include components that make use of quotation literals unless all assemblies are compiled with at least F# 4.0. + El código del ensamblado "{0}" usa literales de expresiones de código delimitadas. La vinculación estática no puede incluir componentes que usen literales de expresiones de código delimitadas, a menos que todos los ensamblados se hayan compilado, como mínimo, con F# 4.0. + + + + Code in this assembly makes uses of quotation literals. Static linking may not include components that make use of quotation literals unless all assemblies are compiled with at least F# 4.0. + El código de este ensamblado usa literales de expresiones de código delimitadas. La vinculación estática no puede incluir componentes que usen literales de expresiones de código delimitadas, a menos que todos los ensamblados se hayan compilado, como mínimo, con F# 4.0. + + + + Static linking may not include a .EXE + La vinculación estática no puede incluir un archivo .EXE. + + + + Static linking may not include a mixed managed/unmanaged DLL + La vinculación estática no puede incluir un archivo DLL mixto administrado o no administrado. + + + + Ignoring mixed managed/unmanaged assembly '{0}' during static linking + Se omitirá el ensamblado mixto administrado o no administrado '{0}' durante la vinculación estática. + + + + Assembly '{0}' was referenced transitively and the assembly could not be resolved automatically. Static linking will assume this DLL has no dependencies on the F# library or other statically linked DLLs. Consider adding an explicit reference to this DLL. + Se hizo referencia al ensamblado '{0}' de forma transitiva y no se pudo resolver automáticamente. La vinculación estática asumirá que este archivo DLL no tiene dependencias de la biblioteca de F# u otros archivos DLL vinculados de forma estática. Considere agregar una referencia explícita a este archivo DLL. + + + + Assembly '{0}' not found in dependency set of target binary. Statically linked roots should be specified using an assembly name, without a DLL or EXE extension. If this assembly was referenced explicitly then it is possible the assembly was not actually required by the generated binary, in which case it should not be statically linked. + No se encontró el ensamblado '{0}' en el conjunto de dependencias del archivo binario de destino. Las raíces vinculadas de forma estática se deben especificar con un nombre de ensamblado, sin una extensión DLL o EXE. Si se hizo referencia a este ensamblado de forma explícita, es posible que el ensamblado no fuese realmente necesario para el archivo binario generado, en cuyo caso no debería haberse vinculado de forma estática. + + + + The key file '{0}' could not be opened + No se pudo abrir el archivo de clave '{0}'. + + + + A problem occurred writing the binary '{0}': {1} + Se produjo un problema al escribir el archivo binario '{0}': {1}. + + + + The 'AssemblyVersionAttribute' has been ignored because a version was given using a command line option + Se omitió el atributo 'AssemblyVersionAttribute' porque se proporcionó una versión con una opción de la línea de comandos. + + + + Error emitting 'System.Reflection.AssemblyCultureAttribute' attribute -- 'Executables cannot be satellite assemblies, Culture should always be empty' + Error al emitir el atributo 'System.Reflection.AssemblyCultureAttribute': 'Los archivos ejecutables no pueden ser ensamblados satélite y no deben tener referencia cultural'. + + + + Option '--delaysign' overrides attribute 'System.Reflection.AssemblyDelaySignAttribute' given in a source file or added module + La opción '--delaysign' invalida el atributo 'System.Reflection.AssemblyDelaySignAttribute' proporcionado en un archivo de código fuente o un módulo agregado. + + + + Option '--keyfile' overrides attribute 'System.Reflection.AssemblyKeyFileAttribute' given in a source file or added module + La opción '--keyfile' invalida el atributo 'System.Reflection.AssemblyKeyFileAttribute' proporcionado en un archivo de código fuente o un módulo agregado. + + + + Option '--keycontainer' overrides attribute 'System.Reflection.AssemblyNameAttribute' given in a source file or added module + La opción '--keycontainer' invalida el atributo 'System.Reflection.AssemblyNameAttribute' proporcionado en un archivo de código fuente o un módulo agregado. + + + + The assembly '{0}' is listed on the command line. Assemblies should be referenced using a command line flag such as '-r'. + El ensamblado '{0}' aparece en la línea de comandos. Para hacer referencia a ensamblados, debe usarse una marca de la línea de comandos como '-r'. + + + + The resident compilation service was not used because a problem occured in communicating with the server. + El servicio de compilación residente no se usó porque se produjo un problema en la comunicación con el servidor. + + + + Problem with filename '{0}': Illegal characters in path. + Problema con el nombre de archivo '{0}': caracteres no válidos en la ruta de acceso. + + + + Passing a .resx file ({0}) as a source file to the compiler is deprecated. Use resgen.exe to transform the .resx file into a .resources file to pass as a --resource option. If you are using MSBuild, this can be done via an <EmbeddedResource> item in the .fsproj project file. + El paso de un archivo .resx ({0}) como archivo de código fuente al compilador está en desuso. Use resgen.exe para transformar el archivo .resx en un archivo .resources, que se pasará como opción --resource. Si usa MSBuild, esta operación se puede realizar mediante un elemento <recursoIncrustado> en el archivo de proyecto .fsproj. + + + + Static linking may not be used on an assembly referencing mscorlib (e.g. a .NET Framework assembly) when generating an assembly that references System.Runtime (e.g. a .NET Core or Portable assembly). + No se puede usar la vinculación estática en un ensamblado que haga referencia a mscorlib (por ejemplo, un ensamblado de .NET Framework) al generar un ensamblado que haga referencia a System.Runtime (por ejemplo, un ensamblado portátil o de .NET Core). + + + + An {0} specified version '{1}', but this value is a wildcard, and you have requested a deterministic build, these are in conflict. + Un objeto {0} especificó la versión "{1}", pero este valor es un carácter comodín y ha solicitado una compilación determinista. Estas opciones están en conflicto. + + + + Determinstic builds only support portable PDBs (--debug:portable or --debug:embedded) + Las compilaciones deterministas solo admiten PDB portátiles (--debug:portable o --debug:embedded) + + + + Character '{0}' is not allowed in provided namespace name '{1}' + No se permite el carácter '{0}' en el nombre de espacio de nombres '{1}' proporcionado. + + + + The provided type '{0}' returned a member with a null or empty member name + El tipo '{0}' proporcionado devolvió un miembro con un nombre de miembro NULL o vacío. + + + + The provided type '{0}' returned a null member + El tipo '{0}' proporcionado devolvió un miembro NULL. + + + + The provided type '{0}' member info '{1}' has null declaring type + La información de miembro '{1}' del tipo '{0}' proporcionado tiene un tipo declarativo NULL. + + + + The provided type '{0}' has member '{1}' which has declaring type '{2}'. Expected declaring type to be the same as provided type. + El tipo '{0}' proporcionado tiene el miembro '{1}' con el tipo declarativo '{2}'. Se esperaba que el tipo declarativo coincidiera con el tipo proporcionado. + + + + Referenced assembly '{0}' has assembly level attribute '{1}' but no public type provider classes were found + El ensamblado '{0}' al que se hace referencia tiene el atributo '{1}' de nivel de ensamblado, pero no se encontró ninguna clase de proveedor de tipos públicos. + + + + Type '{0}' from type provider '{1}' has an empty namespace. Use 'null' for the global namespace. + El tipo '{0}' del proveedor de tipos '{1}' tiene un espacio de nombres vacío. Use 'null' para el espacio de nombres global. + + + + Empty namespace found from the type provider '{0}'. Use 'null' for the global namespace. + Se encontró un espacio de nombres vacío desde el proveedor de tipos '{0}'. Use 'null' para el espacio de nombres global. + + + + Provided type '{0}' has 'IsGenericType' as true, but generic types are not supported. + El tipo '{0}' proporcionado tiene 'IsGenericType' establecido como true, pero no se admiten los tipos genéricos. + + + + Provided type '{0}' has 'IsArray' as true, but array types are not supported. + El tipo '{0}' proporcionado tiene 'IsArray' establecido como true, pero no se admiten los tipos de matriz. + + + + Invalid member '{0}' on provided type '{1}'. Provided type members must be public, and not be generic, virtual, or abstract. + Miembro '{0}' no válido en el tipo '{1}' proporcionado. Los miembros de tipo proporcionados deben ser públicos y no genéricos, virtuales o abstractos. + + + + Invalid member '{0}' on provided type '{1}'. Only properties, methods and constructors are allowed + Miembro '{0}' no válido en el tipo '{1}' proporcionado. Solamente se admiten propiedades, métodos y constructores. + + + + Property '{0}' on provided type '{1}' has CanRead=true but there was no value from GetGetMethod() + La propiedad '{0}' del tipo '{1}' proporcionado tiene el valor CanRead=true, pero no se encontró ningún valor de GetGetMethod(). + + + + Property '{0}' on provided type '{1}' has CanRead=false but GetGetMethod() returned a method + La propiedad '{0}' del tipo '{1}' proporcionado tiene el valor CanRead=false, pero GetGetMethod() devolvió un método. + + + + Property '{0}' on provided type '{1}' has CanWrite=true but there was no value from GetSetMethod() + La propiedad '{0}' del tipo '{1}' proporcionado tiene el valor CanWrite=true, pero no se encontró ningún valor de GetSetMethod(). + + + + Property '{0}' on provided type '{1}' has CanWrite=false but GetSetMethod() returned a method + La propiedad '{0}' del tipo '{1}' proporcionado tiene el valor CanWrite=false, pero GetSetMethod() devolvió un método. + + + + One or more errors seen during provided type setup + Se encontraron uno o varios errores durante la configuración del tipo proporcionado. + + + + Unexpected exception from provided type '{0}' member '{1}': {2} + Excepción inesperada del tipo '{0}' proporcionado, miembro '{1}': {2}. + + + + Unsupported constant type '{0}'. Quotations provided by type providers can only contain simple constants. The implementation of the type provider may need to be adjusted by moving a value declared outside a provided quotation literal to be a 'let' binding inside the quotation literal. + Tipo de constante '{0}' no admitido. Las expresiones de código delimitadas que los proveedores de tipos proporcionan solo pueden contener constantes simples. Puede que sea necesario mover un valor declarado fuera de un literal de expresión de código delimitada para ser un enlace "let" dentro del literal indicado y ajustar así la implementación del proveedor de tipos. + + + + Unsupported expression '{0}' from type provider. If you are the author of this type provider, consider adjusting it to provide a different provided expression. + Expresión '{0}' no admitida del proveedor de tipo. Si es el autor de este proveedor de tipo, considere ajustarlo para que devuelva una expresión proporcionada distinta. + + + + Expected provided type named '{0}' but provided type has 'Name' with value '{1}' + Se esperaba un tipo proporcionado con el nombre '{0}', pero el tipo proporcionado tiene el valor '{1}' para 'Name'. + + + + Event '{0}' on provided type '{1}' has no value from GetAddMethod() + El evento '{0}' del tipo '{1}' proporcionado no tiene ningún valor de GetAddMethod(). + + + + Event '{0}' on provided type '{1}' has no value from GetRemoveMethod() + El evento '{0}' del tipo '{1}' proporcionado no tiene ningún valor de GetRemoveMethod(). + + + + Assembly attribute '{0}' refers to a designer assembly '{1}' which cannot be loaded or doesn't exist. {2} + El atributo de ensamblado '{0}' hace referencia a un ensamblado de diseñador '{1}' que no se puede cargar o no existe. {2} + + + + The type provider does not have a valid constructor. A constructor taking either no arguments or one argument of type 'TypeProviderConfig' was expected. + El proveedor de tipos no tiene un constructor válido. Se esperaba un constructor que no tome argumentos o bien que tome un argumento de tipo 'TypeProviderConfig'. + + + + The type provider '{0}' reported an error: {1} + El proveedor de tipos '{0}' informó de un error: {1} + + + + The type provider '{0}' used an invalid parameter in the ParameterExpression: {1} + El proveedor de tipos '{0}' usó un parámetro no válido en ParameterExpression: {1} + + + + The type provider '{0}' provided a method with a name '{1}' and metadata token '{2}', which is not reported among its methods of its declaring type '{3}' + El proveedor de tipos '{0}' proporcionó un método con un nombre '{1}' y el token de metadatos '{2}' que no se notifica entre los métodos de su tipo declarativo '{3}' + + + + The type provider '{0}' provided a constructor which is not reported among the constructors of its declaring type '{1}' + El proveedor de tipos '{0}' proporcionó un constructor que no se notifica entre los constructores de su tipo declarativo '{1}' + + + + A direct reference to the generated type '{0}' is not permitted. Instead, use a type definition, e.g. 'type TypeAlias = <path>'. This indicates that a type provider adds generated types to your assembly. + No se permite una referencia directa al tipo '{0}' generado. En su lugar, use una definición de tipo, por ejemplo, "type TypeAlias = <rutaAcceso>". Esto indica que un proveedor de tipos agrega tipos generados al ensamblado. + + + + Expected provided type with path '{0}' but provided type has path '{1}' + Se esperaba un tipo proporcionado con la ruta de acceso '{0}', pero el tipo proporcionado tiene la ruta de acceso '{1}' + + + + Unexpected 'null' return value from provided type '{0}' member '{1}' + Valor devuelto 'null' inesperado del tipo '{0}' proporcionado, miembro '{1}'. + + + + Unexpected exception from member '{0}' of provided type '{1}' member '{2}': {3} + Excepción inesperada de miembro '{0}' del tipo '{1}' proporcionado, miembro '{2}': {3}. + + + + Nested provided types do not take static arguments or generic parameters + Los tipos anidados proporcionados no toman argumentos estáticos o parámetros genéricos. + + + + Invalid static argument to provided type. Expected an argument of kind '{0}'. + Argumento estático no válido para el tipo proporcionado. Se esperaba un argumento del tipo '{0}'. + + + + An error occured applying the static arguments to a provided type + Error al aplicar los argumentos estáticos a un tipo proporcionado. + + + + Unknown static argument kind '{0}' when resolving a reference to a provided type or method '{1}' + Tipo de argumento estático "{0}" desconocido al resolver una referencia a un tipo o un método "{1}" proporcionado + + + + invalid namespace for provided type + espacio de nombres no válido para el tipo proporcionado + + + + invalid full name for provided type + nombre completo no válido para el tipo proporcionado + + + + The type provider returned 'null', which is not a valid return value from '{0}' + El proveedor de tipos devolvió 'null', que no es un valor devuelto válido de '{0}'. + + + + The type provider constructor has thrown an exception: {0} + El constructor de proveedores de tipos produjo una excepción: {0} + + + + Type provider '{0}' returned null from GetInvokerExpression. + El proveedor de tipos '{0}' devolvió NULL de GetInvokerExpression. + + + + The type provider '{0}' returned an invalid type from 'ApplyStaticArguments'. A type with name '{1}' was expected, but a type with name '{2}' was returned. + El proveedor de tipos '{0}' devolvió un tipo no válido de 'ApplyStaticArguments'. Se esperaba un tipo con el nombre '{1}', pero se devolvió uno denominado '{2}'. + + + + The type provider '{0}' returned an invalid method from 'ApplyStaticArgumentsForMethod'. A method with name '{1}' was expected, but a method with name '{2}' was returned. + El proveedor de tipos "{0}" devolvió un método no válido de "ApplyStaticArgumentsForMethod". Se esperaba un método con el nombre "{1}", pero se devolvió un método con el nombre "{2}". + + + + This type test or downcast will erase the provided type '{0}' to the type '{1}' + Esta prueba de tipo o conversión hacia abajo borrará el tipo '{0}' proporcionado para el tipo '{1}'. + + + + This downcast will erase the provided type '{0}' to the type '{1}'. + Esta conversión a tipo heredado borrará el tipo '{0}' proporcionado para el tipo '{1}'. + + + + This type test with a provided type '{0}' is not allowed because this provided type will be erased to '{1}' at runtime. + Esta prueba de tipo con un tipo '{0}' proporcionado no se permite porque el tipo proporcionado se borrará para '{1}' en tiempo de ejecución. + + + + Cannot inherit from erased provided type + No se puede heredar de un tipo proporcionado borrado. + + + + Assembly '{0}' hase TypeProviderAssembly attribute with invalid value '{1}'. The value should be a valid assembly name + El ensamblado '{0}' tiene el atributo TypeProviderAssembly con el valor '{1}' no válido. El valor debe ser un nombre de ensamblado válido. + + + + Invalid member name. Members may not have name '.ctor' or '.cctor' + Nombre de miembro no válido. Los miembros no pueden tener el nombre '.ctor' o '.cctor' + + + + The function or member '{0}' is used in a way that requires further type annotations at its definition to ensure consistency of inferred types. The inferred signature is '{1}'. + La función o miembro '{0}' se usa de forma que requiere más anotaciones de tipo en su definición para garantizar la coherencia de los tipos inferidos. La signatura inferida es '{1}'. + + + + The number of type arguments did not match: '{0}' given, '{1}' expected. This may be related to a previously reported error. + El número de argumentos de tipo no coincide. Argumentos proporcionados: '{0}'; se esperaban: '{1}'. Esto puede estar relacionado con un error notificado anteriormente. + + + + Cannot override inherited member '{0}' because it is sealed + No se puede invalidar el miembro heredado “{0}” porque está sellado. + + + + The type provider '{0}' reported an error in the context of provided type '{1}', member '{2}'. The error: {3} + El proveedor de tipos '{0}' informó de un error en el contexto del tipo '{1}' proporcionado, miembro '{2}'. El error: {3} + + + + An exception occurred when accessing the '{0}' of a provided type: {1} + Se produjo una excepción al obtener acceso al '{0}' de un tipo proporcionado: {1} + + + + The '{0}' of a provided type was null or empty. + El '{0}' de un tipo proporcionado era NULL o estaba vacío. + + + + Character '{0}' is not allowed in provided type name '{1}' + No se permite el carácter '{0}' en el nombre de tipo '{1}' proporcionado. + + + + In queries, '{0}' must use a simple pattern + En las consultas, '{0}' debe usar un patrón simple. + + + + A custom query operation for '{0}' is required but not specified + Se requiere una operación de consulta personalizada para '{0}', pero no se especifica. + + + + Named static arguments must come after all unnamed static arguments + Los argumentos estáticos con nombre deben aparecer después de todos los argumentos estáticos sin nombre. + + + + The static parameter '{0}' of the provided type or method '{1}' requires a value. Static parameters to type providers may be optionally specified using named arguments, e.g. '{2}<{3}=...>'. + El parámetro estático "{0}" del tipo o del método "{1}" proporcionado requiere un valor. Los parámetros estáticos para proveedores de tipo se pueden especificar opcionalmente mediante argumentos con nombre, p. ej. "{2}<{3}=...>". + + + + No static parameter exists with name '{0}' + No existe ningún parámetro estático con el nombre '{0}'. + + + + The static parameter '{0}' has already been given a value + Ya se ha asignado un valor al parámetro estático '{0}'. + + + + Multiple static parameters exist with name '{0}' + Existen varios parámetros estáticos con el nombre '{0}'. + + + + A custom operation may not be used in conjunction with a non-value or recursive 'let' binding in another part of this computation expression + Una operación personalizada no se puede usar junto con un enlace 'let' sin valor o recursivo en otra parte de esta expresión de cómputo. + + + + A custom operation may not be used in conjunction with 'use', 'try/with', 'try/finally', 'if/then/else' or 'match' operators within this computation expression + Una operación personalizada no se puede usar junto con los operadores 'use', 'try/with', 'try/finally', 'if/then/else' o 'match' dentro de esta expresión de cómputo. + + + + The custom operation '{0}' refers to a method which is overloaded. The implementations of custom operations may not be overloaded. + La operación personalizada '{0}' hace referencia a un método sobrecargado. Las implementaciones de operaciones personalizadas no pueden estar sobrecargadas. + + + + An if/then/else expression may not be used within queries. Consider using either an if/then expression, or use a sequence expression instead. + No se puede usar una expresión if/then/else en las consultas. Considere usar una expresión if/then o bien una expresión de secuencia en su lugar. + + + + Invalid argument to 'methodhandleof' during codegen + Argumento no válido para 'methodhandleof' durante la generación de código. + + + + A reference to a provided type was missing a value for the static parameter '{0}'. You may need to recompile one or more referenced assemblies. + Una referencia a un tipo proporcionado no contenía un valor para el parámetro estático '{0}'. Puede que sea necesario recompilar uno o varios de los ensamblados a los que se hace referencia. + + + + A reference to a provided type had an invalid value '{0}' for a static parameter. You may need to recompile one or more referenced assemblies. + Una referencia a un tipo proporcionado tenía un valor '{0}' no válido para un parámetro estático. Puede que sea necesario recompilar uno o varios de los ensamblados a los que se hace referencia. + + + + '{0}' is not used correctly. This is a custom operation in this query or computation expression. + '{0}' no se usa correctamente. Esta es una operación personalizada de esta expresión de consulta o cómputo. + + + + '{0}' is not used correctly. Usage: {1}. This is a custom operation in this query or computation expression. + "{0}" no se usa correctamente. Uso: {1}. Esta es una operación personalizada de esta expresión de consulta o cómputo. + + + + {0} var in collection {1} (outerKey = innerKey). Note that parentheses are required after '{2}' + Variable {0} de la colección {1} (outerKey = innerKey). Tenga en cuenta que, después de "{2}", se requieren paréntesis. + + + + {0} var in collection {1} (outerKey = innerKey) into group. Note that parentheses are required after '{2}' + Variable {0} de la colección {1} (outerKey = innerKey) en el grupo. Tenga en cuenta que, después de "{2}", se requieren paréntesis. + + + + {0} var in collection + Variable {0} de la colección + + + + '{0}' must be followed by a variable name. Usage: {1}. + "{0}" debe ir seguido de un nombre de variable. Uso: {1}. + + + + Incorrect syntax for '{0}'. Usage: {1}. + Sintaxis incorrecta de '{0}'. Uso: {1}. + + + + '{0}' must come after a 'for' selection clause and be followed by the rest of the query. Syntax: ... {1} ... + "{0}" debe aparecer después de una cláusula de selección "for" e ir seguido del resto de la consulta. Sintaxis: ... {1} ... + + + + '{0}' is used with an incorrect number of arguments. This is a custom operation in this query or computation expression. Expected {1} argument(s), but given {2}. + "{0}" se usa con un número de argumentos incorrecto. Esta es una operación personalizada de esta expresión de consulta o cómputo. Se esperaban {1} argumentos, pero se proporcionaron {2}. + + + + Expected an expression after this point + Se esperaba una expresión después de este punto. + + + + Expected a type after this point + Se esperaba un tipo después de este punto. + + + + Unmatched '[<'. Expected closing '>]' + "[<'' desemparejado. Se esperaba un elemento ">]" de cierre. + + + + Unexpected end of input in 'match' expression. Expected 'match <expr> with | <pat> -> <expr> | <pat> -> <expr> ...'. + Final de entrada inesperado en una expresión 'match'. Se esperaba 'match <expr> with | <pat> -> <expr> | <pat> -> <expr> ...'. + + + + Unexpected end of input in 'try' expression. Expected 'try <expr> with <rules>' or 'try <expr> finally <expr>'. + Final de entrada inesperado en la expresión 'try'. Se esperaba 'try <expr> with <reglas>' o 'try <expr> finally <expr>'. + + + + Unexpected end of input in 'while' expression. Expected 'while <expr> do <expr>'. + Final de entrada inesperado en la expresión 'while'. Se esperaba 'while <expr> do <expr>'. + + + + Unexpected end of input in 'for' expression. Expected 'for <pat> in <expr> do <expr>'. + Final de entrada inesperado en una expresión 'for'. Se esperaba 'for <pat> in <expr> do <expr>'. + + + + Unexpected end of input in 'match' or 'try' expression + Final de entrada inesperado en la expresión 'match' o 'try'. + + + + Unexpected end of input in 'then' branch of conditional expression. Expected 'if <expr> then <expr>' or 'if <expr> then <expr> else <expr>'. + Final de entrada inesperado en la bifurcación 'then' de la expresión condicional. Se esperaba 'if <expr> then <expr>' o 'if <expr> then <expr> else <expr>'. + + + + Unexpected end of input in 'else' branch of conditional expression. Expected 'if <expr> then <expr>' or 'if <expr> then <expr> else <expr>'. + Final de entrada inesperado en la bifurcación 'else' de la expresión condicional. Se esperaba 'if <expr> then <expr>' o 'if <expr> then <expr> else <expr>'. + + + + Unexpected end of input in body of lambda expression. Expected 'fun <pat> ... <pat> -> <expr>'. + Final de entrada inesperado en el cuerpo de una expresión lambda. Se esperaba 'fun <pat> ... <pat> -> <expr>'. + + + + Unexpected end of input in type arguments + Final de entrada inesperado en los argumentos de tipo. + + + + Unexpected end of input in type signature + Final de entrada inesperado en la signatura de tipo. + + + + Unexpected end of input in type definition + Final de entrada inesperado en la definición de tipo. + + + + Unexpected end of input in object members + Final de entrada inesperado en miembros de objetos. + + + + Unexpected end of input in value, function or member definition + Final de entrada inesperado en una definición de miembro, función o valor. + + + + Unexpected end of input in expression + Final de entrada inesperado en una expresión. + + + + Unexpected end of type. Expected a name after this point. + Final de tipo inesperado. Se esperaba un nombre después de este punto. + + + + Incomplete value or function definition. If this is in an expression, the body of the expression must be indented to the same column as the 'let' keyword. + Definición de valor o función incompleta. Si se encuentra en una expresión, se debe aplicar sangría al cuerpo de la expresión hasta la misma columna que la palabra clave 'let'. + + + + Incomplete value definition. If this is in an expression, the body of the expression must be indented to the same column as the 'let!' keyword. + Definición de valor incompleta. Si se encuentra en una expresión, se debe aplicar sangría al cuerpo de la expresión hasta la misma columna que la palabra clave 'let!'. + + + + Incomplete value definition. If this is in an expression, the body of the expression must be indented to the same column as the 'use!' keyword. + Definición de valor incompleta. Si se encuentra en una expresión, se debe aplicar sangría al cuerpo de la expresión hasta la misma columna que la palabra clave 'use!'. + + + + Incomplete value definition. If this is in an expression, the body of the expression must be indented to the same column as the 'use' keyword. + Definición de valor incompleta. Si se encuentra en una expresión, se debe aplicar sangría al cuerpo de la expresión hasta la misma columna que la palabra clave 'use'. + + + + Missing 'do' in 'while' expression. Expected 'while <expr> do <expr>'. + Falta 'do' en la expresión 'while'. Se esperaba 'while <expr> do <expr>'. + + + + Missing 'do' in 'for' expression. Expected 'for <pat> in <expr> do <expr>'. + Falta 'do' en la expresión 'for'. Se esperaba 'for <pat> in <expr> do <expr>'. + + + + Invalid join relation in '{0}'. Expected 'expr <op> expr', where <op> is =, =?, ?= or ?=?. + Relación de combinación no válida en '{0}'. Se esperaba 'expr <op> expr', donde <op> es =, =?, ?= o ?=?. + + + + Calls + Llamadas + + + + Invalid number of generic arguments to type '{0}' in provided type. Expected '{1}' arguments, given '{2}'. + Número no válido de argumentos genéricos para el tipo '{0}' en el tipo proporcionado. Se esperaban '{1}' argumentos y se proporcionaron '{2}'. + + + + Invalid value '{0}' for unit-of-measure parameter '{1}' + Valor '{0}' no válido para el parámetro '{1}' de unidad de medida. + + + + Invalid value unit-of-measure parameter '{0}' + Valor no válido del parámetro '{0}' de unidad de medida. + + + + Property '{0}' on provided type '{1}' is neither readable nor writable as it has CanRead=false and CanWrite=false + La propiedad '{0}' del tipo '{1}' proporcionado no se puede leer ni escribir, ya que tiene los valores CanRead=false y CanWrite=false. + + + + A use of 'into' must be followed by the remainder of the computation + El uso de 'into' debe ir seguido del resto del cómputo. + + + + The operator '{0}' does not accept the use of 'into' + El operador '{0}' no acepta el uso de 'into'. + + + + The definition of the custom operator '{0}' does not use a valid combination of attribute flags + La definición del operador personalizado '{0}' no usa una combinación válida de marcas de atributo. + + + + This type definition may not have the 'CLIMutable' attribute. Only record types may have this attribute. + Esta definición de tipo no puede tener el atributo 'CLIMutable'. Solamente los tipos de registro pueden tener este atributo. + + + + 'member val' definitions are only permitted in types with a primary constructor. Consider adding arguments to your type definition, e.g. 'type X(args) = ...'. + Las definiciones 'member val' se permiten únicamente en tipos con un constructor principal. Considere agregar argumentos a la definición de tipo, por ejemplo, 'type X(args) = ...'. + + + + Property definitions may not be declared mutable. To indicate that this property can be set, use 'member val PropertyName = expr with get,set'. + Las definiciones de propiedades no se pueden declarar como mutables. Para indicar que esta propiedad se puede establecer, use 'member val PropertyName = expr with get,set'. + + + + To indicate that this property can be set, use 'member val PropertyName = expr with get,set'. + Para indicar que esta propiedad se puede establecer, use 'member val PropertyName = expr with get,set'. + + + + Type '{0}' is illegal because in byref<T>, T cannot contain byref types. + El tipo '{0}' no es válido porque T no puede contener tipos byref en byref<T>. + + + + F# supports array ranks between 1 and 32. The value {0} is not allowed. + F# admite rangos de matrices entre 1 y 32. El valor {0} no se permite. + + + + In queries, use the form 'for x in n .. m do ...' for ranging over integers + En las consultas, use el formato 'for x in n .. m do ...' para abarcar los enteros. + + + + 'while' expressions may not be used in queries + Las expresiones 'while' no se pueden usar en las consultas. + + + + 'try/finally' expressions may not be used in queries + Las expresiones 'try/finally' no se pueden usar en las consultas. + + + + 'use' expressions may not be used in queries + Las expresiones 'use' no se pueden usar en las consultas. + + + + 'let!', 'use!' and 'do!' expressions may not be used in queries + Las expresiones 'let!', 'use!' y 'do!' no se pueden usar en las consultas. + + + + 'return' and 'return!' may not be used in queries + 'return' y 'return!' no se pueden usar en las consultas. + + + + This is not a known query operator. Query operators are identifiers such as 'select', 'where', 'sortBy', 'thenBy', 'groupBy', 'groupValBy', 'join', 'groupJoin', 'sumBy' and 'averageBy', defined using corresponding methods on the 'QueryBuilder' type. + Este no es un operador de consulta conocido. Los operadores de consulta son identificadores, como 'select', 'where', 'sortBy', 'thenBy', 'groupBy', 'groupValBy', 'join', 'groupJoin', 'sumBy' y 'averageBy', que se definen usando los métodos correspondientes en el tipo 'QueryBuilder'. + + + + 'try/with' expressions may not be used in queries + Las expresiones 'try/with' no se pueden usar en las consultas. + + + + This 'let' definition may not be used in a query. Only simple value definitions may be used in queries. + Esta definición 'let' no se puede usar en una consulta. En las consultas solo se pueden usar definiciones de valor simple. + + + + Too many static parameters. Expected at most {0} parameters, but got {1} unnamed and {2} named parameters. + Hay demasiados parámetros estáticos. Se esperaba un máximo de {0} parámetros, pero se obtuvieron {1} parámetros sin nombre y {2} con nombre. + + + + Invalid provided literal value '{0}' + Valor literal '{0}' proporcionado no válido. + + + + The 'anycpu32bitpreferred' platform can only be used with EXE targets. You must use 'anycpu' instead. + La plataforma 'anycpu32bitpreferred' solo se puede usar con destinos EXE. Debe usar 'anycpu' en su lugar. + + + + This member, function or value declaration may not be declared 'inline' + Esta declaración de miembro, función o valor no se puede declarar como 'inline'. + + + + The provider '{0}' returned a non-generated type '{1}' in the context of a set of generated types. Consider adjusting the type provider to only return generated types. + El proveedor '{0}' devolvió un tipo '{1}' no generado en el contexto de un conjunto de tipos generados. Considere ajustar el proveedor de tipos para que devuelva solamente tipos generados. + + + + Arguments to query operators may require parentheses, e.g. 'where (x > y)' or 'groupBy (x.Length / 10)' + Los argumentos para operadores de consulta pueden requerir paréntesis; por ejemplo, 'where (x > y)' o 'groupBy (x.Length / 10)'. + + + + A quotation may not involve an assignment to or taking the address of a captured local variable + Una expresión de código delimitada no puede incluir una asignación a una variable local capturada ni tomar la dirección de esta. + + + + + 1 overload + + 1 sobrecarga + + + + + {0} overloads + + {0} sobrecargas + + + + Erased to + Borrado para + + + + Unexpected token '{0}' or incomplete expression + Token '{0}' inesperado o expresión incompleta + + + + Cannot find code target for this attribute, possibly because the code after the attribute is incomplete. + No se encuentra el destino del código de este atributo, probablemente porque el código que aparece después del atributo está incompleto. + + + + Type name cannot be empty. + El nombre de tipo no puede estar vacío. + + + + Problem reading assembly '{0}': {1} + Problema al leer el ensamblado '{0}': {1} + + + + Invalid provided field. Provided fields of erased provided types must be literals. + Campo proporcionado no válido. Los campos proporcionados de los tipos proporcionados borrados deben ser literales. + + + + (loading description...) + (cargando descripción...) + + + + (description unavailable...) + (descripción no disponible...) + + + + A type variable has been constrained by multiple different class types. A type variable may only have one class constraint. + Una variable de tipo está restringida por varios tipos de clase distintos. Una variable de tipo solamente puede tener una restricción de clase. + + + + 'match' expressions may not be used in queries + Las expresiones 'match' no se pueden usar en las consultas. + + + + Infix operator member '{0}' has {1} initial argument(s). Expected a tuple of 3 arguments + El miembro de operador de infijo '{0}' tiene {1} argumentos iniciales. Se esperaba una tupla de 3 argumentos. + + + + The operator '{0}' cannot be resolved. Consider opening the module 'Microsoft.FSharp.Linq.NullableOperators'. + El operador '{0}' no se puede resolver. Considere abrir el módulo 'Microsoft.FSharp.Linq.NullableOperators'. + + + + '{0}' must be followed by 'in'. Usage: {1}. + "{0}" debe ir seguido de "in". Uso: {1}. + + + + Neither 'member val' nor 'override val' definitions are permitted in object expressions. + No se permiten las definiciones 'member val' ni 'override val' en las expresiones de objeto. + + + + Copy-and-update record expressions must include at least one field. + Las expresiones de registro de copiar y actualizar deben incluir al menos un campo. + + + + '_' cannot be used as field name + '_' no se puede usar como nombre de campo. + + + + The provided types generated by this use of a type provider may not be used from other F# assemblies and should be marked internal or private. Consider using 'type internal TypeName = ...' or 'type private TypeName = ...'. + Los tipos proporcionados generados por este uso de un proveedor de tipos no se pueden usar desde otros ensamblados de F# y deben marcarse como internos o privados. Considere usar 'type internal TypeName = ...' o 'type private TypeName = ...'. + + + + A property's getter and setter must have the same type. Property '{0}' has getter of type '{1}' but setter of type '{2}'. + El captador y el establecedor de una propiedad deben tener el mismo tipo. La propiedad '{0}' tiene un captador de tipo '{1}', pero el establecedor es de tipo '{2}'. + + + + Array method '{0}' is supplied by the runtime and cannot be directly used in code. For operations with array elements consider using family of GetArray/SetArray functions from LanguagePrimitives.IntrinsicFunctions module. + El método de matrices '{0}' se proporciona mediante el runtime y no se puede usar directamente en el código. Para las operaciones con elementos de matriz, considere el uso de la familia de funciones GetArray/SetArray del módulo LanguagePrimitives.IntrinsicFunctions. + + + + The union case '{0}' does not have a field named '{1}'. + La excepción o el caso de unión '{0}' no tiene un campo denominado '{1}'. + + + + Union case/exception field '{0}' cannot be used more than once. + El campo de excepción o caso de unión '{0}' no se puede usar más de una vez. + + + + Named field '{0}' is used more than once. + El campo denominado '{0}' se usa más de una vez. + + + + Named field '{0}' conflicts with autogenerated name for anonymous field. + El campo denominado '{0}' está en conflicto con el nombre generado automáticamente para el campo anónimo. + + + + This literal expression or attribute argument results in an arithmetic overflow. + Esta expresión literal o argumento de atributo da lugar a un desbordamiento aritmético. + + + + This is not valid literal expression. The [<Literal>] attribute will be ignored. + Esta no es una expresión literal válida. El atributo [<Literal>] se omitirá. + + + + System.Runtime.InteropServices assembly is required to use UnknownWrapper\DispatchWrapper classes. + El ensamblado System.Runtime.InteropServices es necesario para usar clases UnknownWrapper\DispatchWrapper. + + + + The mutable local '{0}' is implicitly allocated as a reference cell because it has been captured by a closure. This warning is for informational purposes only to indicate where implicit allocations are performed. + La variable local mutable "{0}" se asignó implícitamente como celda de referencia porque se capturó mediante una clausura. Esta advertencia solo tiene fines informativos e indica dónde se realizan las asignaciones implícitas. + + + + A type provider implemented GetStaticParametersForMethod, but ApplyStaticArgumentsForMethod was not implemented or invalid + Un proveedor de tipos implementó GetStaticParametersForMethod, pero ApplyStaticArgumentsForMethod no se implementó o no es válido + + + + An error occured applying the static arguments to a provided method + Se produjo un error al aplicar los argumentos estáticos a un método proporcionado + + + + Unexpected character '{0}' in preprocessor expression + Carácter inesperado "{0}" en la expresión de preprocesador + + + + Unexpected token '{0}' in preprocessor expression + Token inesperado "{0}" en la expresión de preprocesador + + + + Incomplete preprocessor expression + Expresión de preprocesador incompleta + + + + Missing token '{0}' in preprocessor expression + Falta el token "{0}" en la expresión de preprocesador + + + + An error occurred while reading the F# metadata node at position {0} in table '{1}' of assembly '{2}'. The node had no matching declaration. Please report this warning. You may need to recompile the F# assembly you are using. + Error al leer el nodo de metadatos de F# en la posición {0} de la tabla '{1}' del ensamblado '{2}'. El nodo no tiene ninguna declaración coincidente. Informe de esta advertencia. Es posible que necesite volver a compilar el ensamblado de F# que esté usando. + + + + Type inference caused the type variable {0} to escape its scope. Consider adding an explicit type parameter declaration or adjusting your code to be less generic. + La inferencia de tipos provocó que la variable de tipo {0} saliera de su alcance. Considere agregar una declaración de parámetros de tipo explícitos o ajuste el código para que sea menos genérico. + + + + Type inference caused an inference type variable to escape its scope. Consider adding type annotations to make your code less generic. + La inferencia de tipos provocó que una variable de tipo de inferencia saliera de su alcance. Considere agregar las anotaciones de tipo para que el código sea menos genérico. + + + + Redundant arguments are being ignored in function '{0}'. Expected {1} but got {2} arguments. + Los argumentos redundantes se omiten en la función "{0}". Se esperaban {1} argumentos, pero se recibieron {2}. + + + + Lowercase literal '{0}' is being shadowed by a new pattern with the same name. Only uppercase and module-prefixed literals can be used as named patterns. + Un patrón nuevo con el mismo nombre oculta el literal en minúsculas "{0}". Solo los literales en mayúsculas y con prefijo de módulo se pueden utilizar como patrones con nombre. + + + + This literal pattern does not take arguments + Este patrón de literal no toma argumentos. + + + + Constructors are not permitted as extension members - they must be defined as part of the original definition of the type + No se permiten constructores como miembros de extensión. Deben definirse como parte de la definición original del tipo. + + + + Invalid response file '{0}' ( '{1}' ) + Archivo de respuesta no válido: '{0}' ('{1}'). + + + + Response file '{0}' not found in '{1}' + No se encuentra el archivo de respuesta '{0}' en '{1}'. + + + + Response file name '{0}' is empty, contains invalid characters, has a drive specification without an absolute path, or is too long + El nombre del archivo de respuesta '{0}' está vacío, contiene caracteres no válidos, tiene una especificación de unidad sin ruta de acceso absoluta o es demasiado largo. + + + + Cannot find FSharp.Core.dll in compiler's directory + No se encuentra FSharp.Core.dll en el directorio del compilador. + + + + One tuple type is a struct tuple, the other is a reference tuple + Un tipo de tupla es una tupla de struct, el otro es una tupla de referencia + + + + This provided method requires static parameters + El método proporcionado requiere parámetros estáticos + + + + The conversion from {0} to {1} is a compile-time safe upcast, not a downcast. Consider using 'upcast' instead of 'downcast'. + La conversión de {0} a {1} es una conversión a tipo básico segura en tiempo de compilación, no una conversión a tipo heredado. Considere la posibilidad de usar "upcast" en lugar de "downcast". + + + + The conversion from {0} to {1} is a compile-time safe upcast, not a downcast. Consider using the :> (upcast) operator instead of the :?> (downcast) operator. + La conversión de {0} a {1} es una conversión a tipo básico segura en tiempo de compilación, no una conversión a tipo heredado. Considere la posibilidad de usar el operador :> (upcast) en lugar del operador :?> (downcast). + + + + The 'rec' on this module is implied by an outer 'rec' declaration and is being ignored + La palabra clave 'rec' en este módulo se da por supuesta en una declaración 'rec' externa y se omitirá + + + + In a recursive declaration group, 'open' declarations must come first in each module + En un grupo de declaraciones recursivas, las declaraciones 'abiertas' deben situarse primero en cada módulo + + + + In a recursive declaration group, module abbreviations must come after all 'open' declarations and before other declarations + En un grupo de declaraciones recursivas, las abreviaturas del módulo deben situarse después de todas las declaraciones 'abiertas' y antes que otras declaraciones + + + + This declaration is not supported in recursive declaration groups + Esta declaración no se admite en grupos de declaraciones recursivas + + + + Invalid use of 'rec' keyword + Uso no válido de la palabra clave 'rec' + + + + If a union type has more than one case and is a struct, then all fields within the union type must be given unique names. + Si un tipo de unión tiene más de un caso y un struct, a todos los campos dentro del tipo de unión se les deben dar nombres únicos. + + + + The CallerMemberNameAttribute applied to parameter '{0}' will have no effect. It is overridden by the CallerFilePathAttribute. + El CallerMemberNameAttribute aplicado al parámetro '{0}' no tendrá ningún efecto. Este se reemplaza por CallerFilePathAttribute. + + + + Invalid use of 'fixed'. 'fixed' may only be used in a declaration of the form 'use x = fixed expr' where the expression is an array, the address of a field, the address of an array element or a string' + Uso no válido de 'fixed'. 'fixed' debe utilizarse solo en una declaración del formulario 'use x = fixed expr' donde la expresión es una matriz, la dirección de un campo, la dirección de un elemento de matriz o una cadena' + + + + Could not find method System.Runtime.CompilerServices.OffsetToStringData in references when building 'fixed' expression. + No se pudo encontrar el método System.Runtime.CompilerServices.OffsetToStringData en las referencias al generar expresión 'fixed'. + + + + {0} is an active pattern and cannot be treated as a discriminated union case with named fields. + {0} es un modelo activo y no se puede tratar como un caso de unión discriminada con campos con nombre. + + + + The default value does not have the same type as the argument. The DefaultParameterValue attribute and any Optional attribute will be ignored. Note: 'null' needs to be annotated with the correct type, e.g. 'DefaultParameterValue(null:obj)'. + El valor predeterminado no tiene el mismo tipo que el argumento. El atributo DefaultParameterValue y los atributos Optional se omitirán. Nota: Debe anotarse el tipo correcto en "null". Por ejemplo, "DefaultParameterValue(null:obj)". + + + + The system type '{0}' was required but no referenced system DLL contained this type + Se requería el tipo de sistema '{0}', pero ningún archivo DLL del sistema al que se hacía referencia contenía este tipo. + + + + The member '{0}' matches multiple overloads of the same method.\nPlease restrict it to one of the following:{1}. + El miembro "{0}" coincide con varias sobrecargas del mismo método.\nRestrínjalo a una de las siguientes: {1}. + + + + Method or object constructor '{0}' is not static + El constructor de objeto o método "{0}" no es estático. + + + + Unexpected symbol '=' in expression. Did you intend to use 'for x in y .. z do' instead? + Símbolo "= " inesperado en la expresión. ¿Quería usar "for x in y .. z do" en su lugar? + + + + Indicates a method that either has no implementation in the type in which it is declared or that is virtual and has a default implementation. + Indica un método que no tiene ninguna implementación en el tipo en el que se declara o un método que es virtual y tiene una implementación predeterminada. + + + + Used in mutually recursive bindings, in property declarations, and with multiple constraints on generic parameters. + Se usa en enlaces mutuamente recursivos, en declaraciones de propiedad y con varias restricciones en parámetros genéricos. + + + + Used to give the current class object an object name. Also used to give a name to a whole pattern within a pattern match. + Se usa para asignar un nombre de objeto al objeto de clase actual. También se usa para asignar un nombre a un patrón completo en una coincidencia de patrones. + + + + Used to verify code during debugging. + Se usa para comprobar el código durante la depuración. + + + + Used as the name of the base class object. + Se usa como nombre del objeto de clase base. + + + + In verbose syntax, indicates the start of a code block. + En la sintaxis detallada, indica el inicio de un bloque de código. + + + + In verbose syntax, indicates the start of a class definition. + En la sintaxis detallada, indica el inicio de una definición de clase. + + + + Indicates an implementation of an abstract method; used together with an abstract method declaration to create a virtual method. + Indica una implementación de un método abstracto. Se usa junto con una declaración de método abstracto para crear un método virtual. + + + + Used to declare a delegate. + Se usa para declarar un delegado. + + + + Used in looping constructs or to execute imperative code. + Se usa en construcciones de bucle o para ejecutar código imperativo. + + + + In verbose syntax, indicates the end of a block of code in a looping expression. + En la sintaxis detallada, indica el final de un bloque de código en una expresión de bucle. + + + + Used to convert to a type that is lower in the inheritance chain. + Se usa para realizar la conversión a un tipo situado en un nivel inferior de la cadena de herencia. + + + + In a for expression, used when counting in reverse. + En una expresión for, se usa al contar en orden inverso. + + + + Used in conditional branching. A short form of else if. + Se usa en la creación de ramas condicional. Es una forma abreviada de else if. + + + + Used in conditional branching. + Se usa en la creación de ramas condicional. + + + + In type definitions and type extensions, indicates the end of a section of member definitions. In verbose syntax, used to specify the end of a code block that starts with the begin keyword. + En las definiciones de tipo y extensiones de tipo, indica el final de una sección de definiciones de miembro. En la sintaxis detallada, se usa para especificar el final de un bloque de código que comienza con la palabra clave begin. + + + + Used to declare an exception type. + Se usa para declarar un tipo de excepción. + + + + Indicates that a declared program element is defined in another binary or assembly. + Indica que un elemento de programa declarado está definido en otro binario o ensamblado. + + + + Used as a Boolean literal. + Se usa como literal booleano. + + + + Used together with try to introduce a block of code that executes regardless of whether an exception occurs. + Se usa junto con try para incluir un bloque de código que se ejecuta independientemente de que se produzca una excepción. + + + + Used in looping constructs. + Se usa en construcciones de bucle. + + + + Used in lambda expressions, also known as anonymous functions. + Se usa en expresiones lambda, que también se conocen como funciones anónimas. + + + + Used as a shorter alternative to the fun keyword and a match expression in a lambda expression that has pattern matching on a single argument. + Se usa como alternativa abreviada a la palabra clave fun y una expresión match en una expresión lambda que tiene coincidencia de patrones en un solo argumento. + + + + Used to reference the top-level .NET namespace. + Se usa para hacer referencia al espacio de nombres .NET de nivel superior. + + + + Used in conditional branching constructs. + Se usa en construcciones de creación de ramas condicional. + + + + Used for sequence expressions and, in verbose syntax, to separate expressions from bindings. + Se usa para las expresiones de secuencia y, en la sintaxis detallada, para separar las expresiones de los enlaces. + + + + Used to specify a base class or base interface. + Se usa para especificar una clase base o una interfaz base. + + + + Used to indicate a function that should be integrated directly into the caller's code. + Se usa para indicar una función que debe integrarse directamente en el código de llamada. + + + + Used to declare and implement interfaces. + Se usa para declarar e implementar interfaces. + + + + Used to specify that a member is visible inside an assembly but not outside it. + Se usa para especificar que un miembro está visible dentro de un ensamblado pero no fuera de él. + + + + Used to specify a computation that is to be performed only when a result is needed. + Se usa para especificar un cálculo que debe realizarse únicamente cuando se necesita un resultado. + + + + Used to associate, or bind, a name to a value or function. + Se usa para asociar o enlazar un nombre a un valor o una función. + + + + Used in computation expressions to bind a name to the result of another computation expression. + Se usa en flujos de trabajo asincrónicos para enlazar un nombre al resultado de un cálculo asincrónico o, en otras expresiones de cálculo, se usa para enlazar un nombre a un resultado, que es del tipo de cálculo. + + + + Used to branch by comparing a value to a pattern. + Se usa para crear una rama mediante la comparación de un valor con un patrón. + + + + Used to declare a property or method in an object type. + Se usa para declarar una propiedad o un método en un tipo de objeto. + + + + Used to associate a name with a group of related types, values, and functions, to logically separate it from other code. + Se usa para asociar un nombre a un grupo de tipos, valores y funciones relacionados, a fin de separarlo de forma lógica del resto del código. + + + + Used to declare a variable, that is, a value that can be changed. + Se usa para declarar una variable, es decir, un valor que se puede cambiar. + + + + Used to associate a name with a group of related types and modules, to logically separate it from other code. + Se usa para asociar un nombre a un grupo de módulos y tipos relacionados, a fin de separarlo de forma lógica del resto del código. + + + + Used to declare, define, or invoke a constructor that creates or that can create an object. Also used in generic parameter constraints to indicate that a type must have a certain constructor. + Se usa para declarar, definir o invocar un constructor que crea o que puede crear un objeto. También se usa en las restricciones de parámetro genérico para indicar que un tipo debe tener un constructor determinado. + + + + Not actually a keyword. However, not struct in combination is used as a generic parameter constraint. + No es una palabra clave propiamente dicha. Sin embargo, se usa la combinación not struct como restricción de parámetro genérico. + + + + Indicates the absence of an object. Also used in generic parameter constraints. + Indica la ausencia de un objeto. También se usa en las restricciones de parámetro genérico. + + + + Used in discriminated unions to indicate the type of categories of values, and in delegate and exception declarations. + Se usa en las uniones discriminadas para indicar el tipo de las categorías de valores, así como en declaraciones de delegado y de excepción. + + + + Used to make the contents of a namespace or module available without qualification. + Se usa para que el contenido de un espacio de nombres o de un módulo esté disponible sin tener que especificar el nombre completo. + + + + Used with Boolean conditions as a Boolean or operator. Equivalent to ||. Also used in member constraints. + Se usa con las condiciones booleanas como operador booleano or. Equivale a ||. También se usa en las restricciones de miembro. + + + + Used to implement a version of an abstract or virtual method that differs from the base version. + Se usa para implementar una versión de un método abstracto o virtual que se diferencia de la versión base. + + + + Restricts access to a member to code in the same type or module. + Restringe el acceso a un miembro a código del mismo tipo o módulo. + + + + Allows access to a member from outside the type. + Permite el acceso a un miembro desde fuera del tipo. + + + + Used to indicate that a function is recursive. + Se usa para indicar que una función es recursiva. + + + + Used to provide a value for the result of the containing computation expression. + Se usa para indicar un valor que se va a proporcionar como resultado de una expresión de cálculo. + + + + Used to provide a value for the result of the containing computation expression, where that value itself comes from the result another computation expression. + Se usa para indicar una expresión de cálculo que, cuando se evalúa, proporciona el resultado de la expresión de cálculo que contiene. + + + + Used in query expressions to specify what fields or columns to extract. Note that this is a contextual keyword, which means that it is not actually a reserved word and it only acts like a keyword in appropriate context. + Se usa en las expresiones de consulta para especificar los campos o columnas que se van a extraer. Tenga en cuenta que es una palabra clave contextual, es decir, no es una palabra reservada en realidad y actúa solo como palabra clave en el contexto adecuado. + + + + Used to indicate a method or property that can be called without an instance of a type, or a value member that is shared among all instances of a type. + Se usa para indicar un método o una propiedad que se puede llamar sin ninguna instancia de un tipo, o un miembro de valor que comparten todas las instancias de un tipo. + + + + Used to declare a structure type. Also used in generic parameter constraints. Used for OCaml compatibility in module definitions. + Se usa para declarar un tipo de estructura y también en las restricciones de parámetro genérico. Además, se usa en las definiciones de módulo por motivos de compatibilidad con OCaml. + + + + Used in conditional expressions. Also used to perform side effects after object construction. + Se usa en las expresiones condicionales y también para generar efectos secundarios después de la construcción de objetos. + + + + Used in for loops to indicate a range. + Se usa en los bucles for para indicar un intervalo. + + + + Used to introduce a block of code that might generate an exception. Used together with with or finally. + Se usa para incluir un bloque de código que puede generar una excepción. Se usa junto con with o finally. + + + + Used to declare a class, record, structure, discriminated union, enumeration type, unit of measure, or type abbreviation. + Se usa para declarar una clase, un registro, una estructura, una unión discriminada, un tipo de enumeración, una unidad de medida o una abreviatura de tipo. + + + + Used to convert to a type that is higher in the inheritance chain. + Se usa para realizar la conversión a un tipo situado en un nivel superior de la cadena de herencia. + + + + Used instead of let for values that implement IDisposable" + Se usa en lugar de let para los valores que requieren que se llame a Dispose para liberar recursos. + + + + Used instead of let! in computation expressions for computation expression results that implement IDisposable. + Se usa en lugar de let! en flujos de trabajo asincrónicos y otras expresiones de cálculo para los valores que requieren que se llame a Dispose para liberar recursos. + + + + Used in a signature to indicate a value, or in a type to declare a member, in limited situations. + Se usa en una signatura para indicar un valor o en un tipo para declarar un miembro, en situaciones muy concretas. + + + + Indicates the .NET void type. Used when interoperating with other .NET languages. + Indica el tipo void de .NET. Se usa al interoperar con otros lenguajes .NET. + + + + Used for Boolean conditions (when guards) on pattern matches and to introduce a constraint clause for a generic type parameter. + Se usa para condiciones booleanas (restricciones when) en coincidencias de patrones y para introducir una cláusula de restricción de un parámetro de tipo genérico. + + + + Introduces a looping construct. + Incluye una construcción de bucle. + + + + Used together with the match keyword in pattern matching expressions. Also used in object expressions, record copying expressions, and type extensions to introduce member definitions, and to introduce exception handlers. + Se usa junto con la palabra clave match en las expresiones de coincidencia de patrones. También se usa en las expresiones de objeto, expresiones de copia de registros y extensiones de tipo para incluir las definiciones de miembro y los controladores de excepciones. + + + + Used in a sequence expression to produce a value for a sequence. + Se usa en una expresión de secuencia a fin de generar un valor para una secuencia. + + + + Used in a computation expression to append the result of a given computation expression to a collection of results for the containing computation expression. + Se usa en una expresión de cálculo para anexar el resultado de una expresión de cálculo determinada a una colección de resultados para la expresión de cálculo que contiene. + + + + In function types, delimits arguments and return values. Yields an expression (in sequence expressions); equivalent to the yield keyword. Used in match expressions + En los tipos de función, delimita los argumentos y los valores devueltos. Genera una expresión (en expresiones de secuencia); es equivalente a la palabra clave yield. Se usa en expresiones de coincidencia. + + + + Assigns a value to a variable. + Asigna un valor a una variable. + + + + Converts a type to type that is higher in the hierarchy. + Convierte un tipo en otro de un nivel superior de la jerarquía. + + + + Converts a type to a type that is lower in the hierarchy. + Convierte un tipo en otro de un nivel inferior de la jerarquía. + + + + Delimits a typed code quotation. + Delimita una expresión de código con tipo. + + + + Delimits a untyped code quotation. + Delimita una expresión de código sin tipo. + + + + {0} '{1}' not found in assembly '{2}'. A possible cause may be a version incompatibility. You may need to explicitly reference the correct version of this assembly to allow all referenced components to use the correct version. + {0} "{1}" no se encuentra en el ensamblado "{2}". La razón puede ser una incompatibilidad de versiones. Es posible que tenga que hacer referencia explícitamente a la versión correcta de este ensamblado para permitir que todos los componentes a los que se hace referencia usen la versión correspondiente. + + + + {0} '{1}' not found in type '{2}' from assembly '{3}'. A possible cause may be a version incompatibility. You may need to explicitly reference the correct version of this assembly to allow all referenced components to use the correct version. + {0} "{1}" no se encuentra en el tipo "{2}" del ensamblado "{3}". La razón puede ser una incompatibilidad de versiones. Es posible que tenga que hacer referencia explícitamente a la versión correcta de este ensamblado para permitir que todos los componentes a los que se hace referencia usen la versión correspondiente. + + + + is + es + + + + This value is not a function and cannot be applied. + Este valor no es una función y no se puede aplicar. + + + + This value is not a function and cannot be applied. Did you intend to access the indexer via {0}.[index] instead? + Este valor no es una función y no se puede aplicar. ¿Pretendía tener acceso al indexador a través de {0}.[index] en su lugar? + + + + This expression is not a function and cannot be applied. Did you intend to access the indexer via expr.[index] instead? + Esta expresión no es una función y no se puede aplicar. ¿Pretendía tener acceso al indexador a través de expr.[index] en su lugar? + + + + This value is not a function and cannot be applied. Did you forget to terminate a declaration? + Este valor no es una función y no se puede aplicar. ¿Olvidó terminar una declaración? + + + + The argument names in the signature '{0}' and implementation '{1}' do not match. The argument name from the signature file will be used. This may cause problems when debugging or profiling. + Los nombres de argumento en la firma "{0}" y la implementación "{1}" no coinciden. Se utilizará el nombre del argumento desde el archivo de firma. Esto puede causar problemas durante la depuración o la generación de perfiles. + + + + An error occurred while reading the F# metadata of assembly '{0}'. A reserved construct was utilized. You may need to upgrade your F# compiler or use an earlier version of the assembly that doesn't make use of a specific construct. + Se produjo un error al leer los metadatos de F# del ensamblado "{0}". Se utilizó una construcción reservada. Puede que deba actualizar su compilador de F# o usar una versión anterior del ensamblado que no haga uso de una construcción específica. + + + + This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. + Este método o propiedad no se utiliza normalmente desde código F#, use un modelo de tupla explícito para la deconstrucción en su lugar. + + + + This expression returns a value of type '{0}' but is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to use the expression as a value in the sequence then use an explicit 'yield'. + Esta expresión devuelve un valor de tipo “{0}”, pero se descarta de forma implícita. Considere el uso de “let” para enlazar el resultado a un nombre; por ejemplo, “let result = expression”. Si su intención es utilizar la expresión como un valor en la secuencia, utilice “yield” de forma explícita. + + + + This expression returns a value of type '{0}' but is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to use the expression as a value in the sequence then use an explicit 'yield!'. + Esta expresión devuelve un valor de tipo “{0}”, pero se descarta de forma implícita. Considere el uso de “let” para enlazar el resultado a un nombre; por ejemplo, “let result = expression”. Si su intención es utilizar la expresión como un valor en la secuencia, utilice “yield” de forma explícita. + + + + Used in computation expressions to pattern match directly over the result of another computation expression. + Se utiliza en expresiones de cálculo para hacer coincidir patrones directamente sobre el resultado de otra expresión de cálculo. + + + + The file '{0}' changed on disk unexpectedly, please reload. + El archivo "{0}" cambió en el disco de manera inesperada; cárguelo de nuevo. + + + + The byref pointer is readonly, so this write is not permitted. + El puntero byref es de solo lectura, por lo que no se permite esta operación de escritura. + + + + A value must be mutable in order to mutate the contents or take the address of a value type, e.g. 'let mutable x = ...' + Un valor debe ser mutable para poder mutar el contenido o tomar la dirección de un tipo de valor; por ejemplo, 'let mutable x = ...' + + + + A ReadOnly attribute has been applied to a struct type with a mutable field. + Se ha aplicado el atributo ReadOnly a un tipo de estructura con un campo mutable. + + + + A byref pointer returned by a function or method is implicitly dereferenced as of F# 4.5. To acquire the return value as a pointer, use the address-of operator, e.g. '&f(x)' or '&obj.Method(arg1, arg2)'. + A partir de F# 4.5, un puntero byref devuelto por una función o un método se desreferencia de forma implícita. Para obtener el valor devuelto en forma de puntero, use el operador address-of; por ejemplo, “&f(x)” o “&obj.Method(arg1, arg2)”. + + + + A type annotated with IsByRefLike must also be a struct. Consider adding the [<Struct>] attribute to the type. + Un tipo anotado con IsByRefLike debe ser también una estructura. Considere la posibilidad de agregar el atributo [<Struct>] al tipo. + + + + The address of the variable '{0}' or a related expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + En este punto, no se puede usar la dirección de la variable “{0}” o una expresión relacionada. Esto es para asegurar que la dirección del valor local no escape de su ámbito. + + + + This value can't be assigned because the target '{0}' may refer to non-stack-local memory, while the expression being assigned is assessed to potentially refer to stack-local memory. This is to help prevent pointers to stack-bound memory escaping their scope. + No se puede asignar este valor porque el destino “{0}” puede hacer referencia a memoria local fuera de la pila, mientras que la expresión que se va a asignar podría hacer referencia a memoria local de la pila. Esto es para evitar que los punteros de memoria ligada a la pila escapen de su ámbito. + + + + A value defined in a module must be mutable in order to take its address, e.g. 'let mutable x = ...' + Un valor definido en un módulo debe ser mutable para tomar su dirección; por ejemplo, “let mutable x = ...” + + + + A type annotated with IsReadOnly must also be a struct. Consider adding the [<Struct>] attribute to the type. + Un tipo anotado con IsReadOnly debe ser también una estructura. Considere la posibilidad de agregar el atributo [<Struct>] al tipo. + + + + Struct members cannot return the address of fields of the struct by reference + Los miembros de estructura no pueden devolver la dirección de los campos de la estructura por referencia + + + + The function or method call cannot be used at this point, because one argument that is a byref of a non-stack-local Span or IsByRefLike type is used with another argument that is a stack-local Span or IsByRefLike type. This is to ensure the address of the local value does not escape its scope. + En este punto, no se puede usar la función o el método, porque un argumento que es un parámetro byref de un tipo local Span o IsByRefLike fuera de la pila se utiliza con otro argumento que es un tipo local Span o IsByRefLike de la pila. Esto es para asegurar que la dirección del valor local no escape de su ámbito. + + + + The address of a value returned from the expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + En este punto, no se puede usar la dirección de un valor devuelto por la expresión. Esto es para asegurar que la dirección del valor local no escape de su ámbito. + + + + The Span or IsByRefLike variable '{0}' cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + En este punto, no se puede usar la variable Span o IsByRefLike “{0}”. Esto es para asegurar que la dirección del valor local no escape de su ámbito. + + + + A Span or IsByRefLike value returned from the expression cannot be used at ths point. This is to ensure the address of the local value does not escape its scope. + En este punto, no se puede usar un valor Span o IsByRefLike devuelto por la expresión. Esto es para asegurar que la dirección del valor local no escape de su ámbito. + + + + Cannot take the address of the value returned from the expression. Assign the returned value to a let-bound value before taking the address. + No se puede tomar la dirección del valor devuelto de la expresión. Asigne el valor devuelto a un valor enlazado con let antes de tomar la dirección. + + + + The Span or IsByRefLike expression cannot be returned from this function or method, because it is composed using elements that may escape their scope. + The Span or IsByRefLike expression cannot be returned from this function or method, because it is composed using elements that may escape their scope. + + + + This type does not inherit Attribute, it will not work correctly with other .NET languages. + This type does not inherit Attribute, it will not work correctly with other .NET languages. + + + + The exception '{0}' does not have a field named '{1}'. + The exception '{0}' does not have a field named '{1}'. + + + + The constructor does not have a field named '{0}'. + The constructor does not have a field named '{0}'. + + + + Active patterns do not have fields. This syntax is invalid. + Active patterns do not have fields. This syntax is invalid. + + + + + \ No newline at end of file diff --git a/src/fsharp/xlf/FSComp.txt.fr.xlf b/src/fsharp/xlf/FSComp.txt.fr.xlf new file mode 100644 index 00000000000..0ef363d31e4 --- /dev/null +++ b/src/fsharp/xlf/FSComp.txt.fr.xlf @@ -0,0 +1,7087 @@ + + + + + + The namespace '{0}' is not defined. + L'espace de noms '{0}' n'est pas défini. + + + + The namespace or module '{0}' is not defined. + L'espace de noms ou le module '{0}' n'est pas défini. + + + + The field, constructor or member '{0}' is not defined. + Le champ, le constructeur ou le membre '{0}' n'est pas défini. + + + + The value, constructor, namespace or type '{0}' is not defined. + La valeur, le constructeur, l'espace de noms ou le type '{0}' n'est pas défini. + + + + The value or constructor '{0}' is not defined. + La valeur ou le constructeur '{0}' n'est pas défini. + + + + The value, namespace, type or module '{0}' is not defined. + La valeur, l'espace de noms, le type ou le module '{0}' n'est pas défini. + + + + The constructor, module or namespace '{0}' is not defined. + Le constructeur, le module ou l'espace de noms '{0}' n'est pas défini. + + + + The type '{0}' is not defined. + Le type '{0}' n'est pas défini. + + + + The type '{0}' is not defined in '{1}'. + Le type '{0}' n'est pas défini dans '{1}'. + + + + The record label or namespace '{0}' is not defined. + L'étiquette d'enregistrement ou l'espace de noms '{0}' n'est pas défini. + + + + The record label '{0}' is not defined. + L'étiquette d'enregistrement '{0}' n'est pas définie. + + + + Maybe you want one of the following: + Peut-être souhaitez-vous l'une des options suivantes : + + + + The type parameter {0} is not defined. + Le paramètre de type '{0}' n'est pas défini. + + + + The pattern discriminator '{0}' is not defined. + Le discriminateur de modèle '{0}' n'est pas défini. + + + + Replace with '{0}' + Remplacer par '{0}' + + + + Add . for indexer access. + Ajoutez un . pour l'accès à l'indexeur. + + + + All elements of a list must be of the same type as the first element, which here is '{0}'. This element has type '{1}'. + Tous les éléments d'une expression comportant un constructeur de liste doivent avoir le même type. Cette expression était censée avoir le type '{0}', mais elle a ici le type '{1}'. + + + + All elements of an array must be of the same type as the first element, which here is '{0}'. This element has type '{1}'. + Tous les éléments d'une expression comportant un constructeur de tableau doivent avoir le même type. Cette expression était censée avoir le type '{0}', mais elle a ici le type '{1}'. + + + + This 'if' expression is missing an 'else' branch. Because 'if' is an expression, and not a statement, add an 'else' branch which also returns a value of type '{0}'. + Il manque à l'expression 'if' une branche 'else'. La branche 'then' a le type '{0}'. Dans la mesure où 'if' est une expression, et non une instruction, ajoutez une branche 'else' qui retourne une valeur du même type. + + + + The 'if' expression needs to have type '{0}' to satisfy context type requirements. It currently has type '{1}'. + L'expression 'if' doit avoir le type '{0}' pour répondre aux exigences de type du contexte. Elle a le type '{1}'. + + + + All branches of an 'if' expression must return values of the same type as the first branch, which here is '{0}'. This branch returns a value of type '{1}'. + Toutes les branches d'une expression 'if' doivent avoir le même type. Cette expression était censée avoir le type '{0}', mais elle a ici le type '{1}'. + + + + All branches of a pattern match expression must return values of the same type as the first branch, which here is '{0}'. This branch returns a value of type '{1}'. + Toutes les branches d'une expression comportant des critères spéciaux doivent retourner des valeurs du même type. La première branche a retourné une valeur de type '{0}', mais cette branche a retourné une valeur de type '{1}'. + + + + A pattern match guard must be of type 'bool', but this 'when' expression is of type '{0}'. + Une protection de critères spéciaux doit être de type 'bool', mais cette expression 'when' est de type '{0}'. + + + + A ';' is used to separate field values in records. Consider replacing ',' with ';'. + Un ';' sert à séparer les valeurs de champs des enregistrements. Remplacez ',' par ';'. + + + + The '!' operator is used to dereference a ref cell. Consider using 'not expr' here. + L'opérateur '!' est utilisé pour déréférencer une cellule ref. Songez à utiliser 'not expr' ici. + + + + The non-generic type '{0}' does not expect any type arguments, but here is given {1} type argument(s) + Le type non générique '{0}' n'attend aucun argument de type mais reçoit ici {1} argument(s) de type + + + + Consider using 'return!' instead of 'return'. + Utilisez 'return!' à la place de 'return'. + + + + Consider using 'yield!' instead of 'yield'. + Utilisez 'yield!' à la place de 'yield'. + + + + \nA tuple type is required for one or more arguments. Consider wrapping the given arguments in additional parentheses or review the definition of the interface. + \nUn type de tuple est nécessaire pour un ou plusieurs arguments. Mettez des parenthèses supplémentaires autour des arguments fournis, ou passez en revue la définition de l'interface. + + + + Invalid warning number '{0}' + Numéro d'avertissement non valide '{0}' + + + + Invalid version string '{0}' + Chaîne de version non valide '{0}' + + + + Invalid version file '{0}' + Fichier de version non valide '{0}' + + + + Microsoft (R) F# Compiler version {0} + Compilateur F# Microsoft (R) version {0} + + + + F# Compiler for F# {0} + Compilateur F# pour F# {0} + + + + Problem with filename '{0}': {1} + Problème avec le nom de fichier '{0}' : {1} + + + + No inputs specified + Absence d'entrée spécifiée + + + + The '--pdb' option requires the '--debug' option to be used + L'option '--pdb' requiert l'utilisation de l'option '--debug' + + + + The search directory '{0}' is invalid + Le répertoire de recherche '{0}' n'est pas valide + + + + The search directory '{0}' could not be found + Le répertoire de recherche '{0}' est introuvable + + + + '{0}' is not a valid filename + '{0}' n'est pas un nom de fichier valide + + + + '{0}' is not a valid assembly name + '{0}' n'est pas un nom d'assembly valide + + + + Unrecognized privacy setting '{0}' for managed resource, valid options are 'public' and 'private' + Paramètre de confidentialité '{0}' non reconnu pour la ressource managée, les options valides sont 'public' et 'private' + + + + Multiple references to '{0}.dll' are not permitted + Les références multiples à '{0}.dll' ne sont pas autorisées + + + + Could not read version from mscorlib.dll + Impossible de lire la version à partir de mscorlib.dll + + + + Unable to read assembly '{0}' + Impossible de lire l'assembly '{0}' + + + + Assembly resolution failure at or near this location + Échec de la résolution de l'assembly à cet emplacement ou à proximité + + + + The declarations in this file will be placed in an implicit module '{0}' based on the file name '{1}'. However this is not a valid F# identifier, so the contents will not be accessible from other files. Consider renaming the file or adding a 'module' or 'namespace' declaration at the top of the file. + Les déclarations de ce fichier vont être placées dans un module implicite '{0}' en fonction du nom de fichier '{1}'. Toutefois, il ne s'agit pas d'un identificateur F# valide ; par conséquent, le contenu ne sera pas accessible à partir des autres fichiers. Renommez le fichier ou ajoutez une déclaration 'module' ou 'namespace' en haut du fichier. + + + + Files in libraries or multiple-file applications must begin with a namespace or module declaration, e.g. 'namespace SomeNamespace.SubNamespace' or 'module SomeNamespace.SomeModule'. Only the last source file of an application may omit such a declaration. + Les fichiers situés dans les bibliothèques ou les applications contenant plusieurs fichiers doivent commencer par une déclaration d'espace de noms ou de module, par exemple 'namespace SomeNamespace.SubNamespace' ou 'module SomeNamespace.SomeModule'. Seul le dernier fichier source d'une application peut omettre une telle déclaration. + + + + Files in libraries or multiple-file applications must begin with a namespace or module declaration. When using a module declaration at the start of a file the '=' sign is not allowed. If this is a top-level module, consider removing the = to resolve this error. + Les fichiers situés dans les bibliothèques ou les applications contenant plusieurs fichiers doivent commencer par une déclaration d'espace de noms ou de module. Quand vous utilisez une déclaration de module au début d'un fichier, le signe '=' n'est pas autorisé. S'il s'agit d'un module de niveau supérieur, supprimez le signe = pour résoudre l'erreur. + + + + This file contains multiple declarations of the form 'module SomeNamespace.SomeModule'. Only one declaration of this form is permitted in a file. Change your file to use an initial namespace declaration and/or use 'module ModuleName = ...' to define your modules. + Ce fichier contient plusieurs déclarations ayant la forme 'module SomeNamespace.SomeModule'. Seule une déclaration de cette forme est autorisée dans un fichier. Modifiez votre fichier pour utiliser une déclaration d'espace de noms initiale et/ou utilisez 'module ModuleName = ...' pour définir vos modules. + + + + Option requires parameter: {0} + L'option requiert un paramètre : {0} + + + + Source file '{0}' could not be found + Le fichier source '{0}' est introuvable + + + + The file extension of '{0}' is not recognized. Source files must have extension .fs, .fsi, .fsx, .fsscript, .ml or .mli. + L'extension de fichier de '{0}' n'est pas reconnue. Les fichiers sources doivent avoir l'extension .fs, .fsi, .fsx, .fsscript, .ml ou .mli. + + + + Could not resolve assembly '{0}' + Impossible de résoudre l'assembly '{0}' + + + + Could not resolve assembly '{0}' required by '{1}' + Impossible de résoudre l'assembly '{0}' requis par '{1}' + + + + Error opening binary file '{0}': {1} + Erreur lors de l'ouverture du fichier binaire '{0}' : {1} + + + + The F#-compiled DLL '{0}' needs to be recompiled to be used with this version of F# + La DLL compilée F# '{0}' doit être recompilée pour pouvoir être utilisée avec cette version de F# + + + + Invalid directive. Expected '#I \"<path>\"'. + Directive non valide. '#I \"<chemin>\"' attendu. + + + + Invalid directive. Expected '#r \"<file-or-assembly>\"'. + Directive non valide. '#r \"<fichier-ou-assembly>\"' attendu + + + + Invalid directive. Expected '#load \"<file>\" ... \"<file>\"'. + Directive non valide. '#load \"<fichier>\" ... \"<fichier>\"' attendu. + + + + Invalid directive. Expected '#time', '#time \"on\"' or '#time \"off\"'. + Directive non valide. '#time', '#time \"on\"' ou '#time \"off\"' attendu. + + + + Directives inside modules are ignored + Les directives contenues dans les modules sont ignorées + + + + A signature for the file or module '{0}' has already been specified + Une signature pour le fichier ou le module '{0}' a déjà été spécifiée + + + + An implementation of file or module '{0}' has already been given. Compilation order is significant in F# because of type inference. You may need to adjust the order of your files to place the signature file before the implementation. In Visual Studio files are type-checked in the order they appear in the project file, which can be edited manually or adjusted using the solution explorer. + Une implémentation du fichier ou du module '{0}' a déjà été fournie. L'ordre de compilation est significatif en F# en raison de l'inférence de type. Vous pouvez modifier l'ordre de vos fichiers pour placer le fichier de signature avant l'implémentation. Dans Visual Studio, les fichiers font l'objet d'une vérification de type dans l'ordre où ils apparaissent dans le fichier projet, lequel peut être modifié manuellement ou à l'aide de l'Explorateur de solutions. + + + + An implementation of the file or module '{0}' has already been given + Une implémentation du fichier ou du module '{0}' a déjà été fournie + + + + The signature file '{0}' does not have a corresponding implementation file. If an implementation file exists then check the 'module' and 'namespace' declarations in the signature and implementation files match. + Le fichier de signature '{0}' n'a pas de fichier d'implémentation correspondant. S'il existe un fichier d'implémentation, vérifiez que les déclarations 'module' et 'namespace' correspondent entre les fichiers de signature et d'implémentation. + + + + '{0}' is not a valid integer argument + '{0}' n'est pas un argument entier valide + + + + '{0}' is not a valid floating point argument + '{0}' n'est pas un argument à virgule flottante valide + + + + Unrecognized option: '{0}' + Option non reconnue : '{0}' + + + + Invalid module or namespace name + Nom de module ou d'espace de noms non valide + + + + Error reading/writing metadata for the F# compiled DLL '{0}'. Was the DLL compiled with an earlier version of the F# compiler? (error: '{1}'). + Erreur lors de la lecture/l'écriture des métadonnées de la DLL compilée F# '{0}'. Est-ce que la DLL a été compilée avec une version antérieure du compilateur F# ? (erreur : '{1}'). + + + + The type/module '{0}' is not a concrete module or type + Le type/module '{0}' n'est pas un module ou type concret + + + + The type '{0}' has an inline assembly code representation + Le type '{0}' a une représentation du code assembleur inline + + + + A namespace and a module named '{0}' both occur in two parts of this assembly + Un espace de noms et un module nommés tous les deux '{0}' sont présents dans deux parties de cet assembly + + + + Two modules named '{0}' occur in two parts of this assembly + Deux modules nommés '{0}' sont présents dans deux parties de cet assembly + + + + Two type definitions named '{0}' occur in namespace '{1}' in two parts of this assembly + Deux définitions de type nommées '{0}' sont présentes dans l'espace de noms '{1}' dans deux parties de cet assembly + + + + A module and a type definition named '{0}' occur in namespace '{1}' in two parts of this assembly + Une définition de module et une définition de type nommées '{0}' sont présentes dans l'espace de noms '{1}' dans deux parties de cet assembly + + + + Invalid member signature encountered because of an earlier error + Signature de membre non valide détectée en raison d'une erreur antérieure + + + + This value does not have a valid property setter type + Cette valeur n'a pas de type de méthode setter de propriété valide + + + + Invalid form for a property getter. At least one '()' argument is required when using the explicit syntax. + Forme non valide pour la méthode getter d'une propriété. Au moins un argument '()' est obligatoire lors de l'utilisation de la syntaxe explicite. + + + + Invalid form for a property setter. At least one argument is required. + Forme non valide pour la méthode setter d'une propriété. Au moins un argument est requis. + + + + Unexpected use of a byref-typed variable + Utilisation inattendue d'une variable typée byref + + + + Invalid mutation of a constant expression. Consider copying the expression to a mutable local, e.g. 'let mutable x = ...'. + Mutation non valide d'une expression constante. Copiez l'expression dans une variable locale mutable, par exemple 'let mutable x = ...'. + + + + The value has been copied to ensure the original is not mutated by this operation or because the copy is implicit when returning a struct from a member and another member is then accessed + La valeur a été copiée pour garantir que la valeur d'origine n'est pas mutée par cette opération + + + + Recursively defined values cannot appear directly as part of the construction of a tuple value within a recursive binding + Impossible de faire apparaître directement les valeurs définies de manière récursive dans le cadre de la construction d'une valeur basée sur un tuple dans une liaison récursive + + + + Recursive values cannot appear directly as a construction of the type '{0}' within a recursive binding. This feature has been removed from the F# language. Consider using a record instead. + Impossible de faire apparaître les valeurs récursives directement en tant que construction du type '{0}' dans une liaison récursive. Cette fonctionnalité a été supprimée du langage F#. Utilisez un type enregistrement à la place. + + + + Recursive values cannot be directly assigned to the non-mutable field '{0}' of the type '{1}' within a recursive binding. Consider using a mutable field instead. + Impossible d'assigner directement les valeurs récursives au champ non mutable '{0}' du type '{1}' dans une liaison récursive. Utilisez un champ mutable à la place. + + + + Unexpected decode of AutoOpenAttribute + Décodage inattendu de AutoOpenAttribute + + + + Unexpected decode of InternalsVisibleToAttribute + Décodage inattendu de InternalsVisibleToAttribute + + + + Unexpected decode of InterfaceDataVersionAttribute + Décodage inattendu de InterfaceDataVersionAttribute + + + + Active patterns cannot return more than 7 possibilities + Les modèles actifs ne peuvent pas retourner plus de 7 possibilités + + + + This is not a valid constant expression or custom attribute value + Il ne s'agit pas d'une expression constante valide ou d'une valeur d'attribut personnalisé valide + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe mutability attributes differ + Le module '{0}' contient\n {1} \nmais sa signature spécifie\n {2} \nLes attributs de mutabilité sont différents + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe names differ + Le module '{0}' contient\n {1} \nmais sa signature spécifie\n {2} \nLes noms sont différents + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe compiled names differ + Le module '{0}' contient\n {1} \nmais sa signature spécifie\n {2} \nLes noms compilés sont différents + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe display names differ + Le module '{0}' contient\n {1} \nmais sa signature spécifie\n {2} \nLes noms complets sont différents + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe accessibility specified in the signature is more than that specified in the implementation + Le module '{0}' contient\n {1} \nmais sa signature spécifie\n {2} \nL'accessibilité spécifiée dans la signature est supérieure à celle spécifiée dans l'implémentation + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe inline flags differ + Le module '{0}' contient\n {1} \nmais sa signature spécifie\n {2} \nLes indicateurs inline sont différents + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe literal constant values and/or attributes differ + Le module '{0}' contient\n {1} \nmais sa signature spécifie\n {2} \nLes valeurs et/ou attributs de constante littérale sont différents + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is a type function and the other is not. The signature requires explicit type parameters if they are present in the implementation. + Le module '{0}' contient\n {1} \nmais sa signature spécifie\n {2} \nL'un est une fonction de type mais pas l'autre. La signature requiert des paramètres de type explicite s'ils sont présents dans l'implémentation. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe respective type parameter counts differ + Le module '{0}' contient\n {1} \nmais sa signature spécifie\n {2} \nLe nombre de paramètres de type respectifs est différent + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe types differ + Le module '{0}' contient\n {1} \nmais sa signature spécifie\n {2} \nLes types sont différents + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is an extension member and the other is not + Le module '{0}' contient\n {1} \nmais sa signature spécifie\n {2} \nL'un est un membre d'extension mais pas l'autre + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nAn arity was not inferred for this value + Le module '{0}' contient\n {1} \nmais sa signature spécifie\n {2} \nAucune arité n'a été déduite pour cette valeur + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe number of generic parameters in the signature and implementation differ (the signature declares {3} but the implementation declares {4} + Le module '{0}' contient\n {1} \nmais sa signature spécifie\n {2} \nLe nombre de paramètres génériques est différent entre la signature et l'implémentation (la signature déclare {3} mais l'implémentation déclare {4} + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe generic parameters in the signature and implementation have different kinds. Perhaps there is a missing [<Measure>] attribute. + Le module '{0}' contient\n {1} \nmais sa signature spécifie\n {2} \nLes paramètres génériques ne sont pas du même genre entre la signature et l'implémentation. Il est possible que l'attribut [<Measure>] soit manquant. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe arities in the signature and implementation differ. The signature specifies that '{3}' is function definition or lambda expression accepting at least {4} argument(s), but the implementation is a computed function value. To declare that a computed function value is a permitted implementation simply parenthesize its type in the signature, e.g.\n\tval {5}: int -> (int -> int)\ninstead of\n\tval {6}: int -> int -> int. + Le module '{0}' contient\n {1} \nmais sa signature spécifie\n {2} \nLes arités sont différentes entre la signature et l'implémentation. La signature spécifie que '{3}' est une définition de fonction ou une expression lambda qui accepte au moins {4} argument(s) mais l'implémentation est une valeur de fonction calculée. Pour déclarer qu'une valeur de fonction calculée est une implémentation autorisée, mettez simplement son type entre parenthèses dans la signature, par exemple\n\tval {5}: int -> (int -> int)\nau lieu de\n\tval {6}: int -> int -> int. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe CLI member names differ + Le module '{0}' contient\n {1} \nmais sa signature spécifie\n {2} \nLes noms de membres CLI sont différents + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is static and the other isn't + Le module '{0}' contient\n {1} \nmais sa signature spécifie\n {2} \nL'un est statique mais pas l'autre + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is virtual and the other isn't + Le module '{0}' contient\n {1} \nmais sa signature spécifie\n {2} \nL'un est virtuel mais pas l'autre + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is abstract and the other isn't + Le module '{0}' contient\n {1} \nmais sa signature spécifie\n {2} \nL'un est abstrait mais pas l'autre + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is final and the other isn't + Le module '{0}' contient\n {1} \nmais sa signature spécifie\n {2} \nL'un est final mais pas l'autre + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is marked as an override and the other isn't + Le module '{0}' contient\n {1} \nmais sa signature spécifie\n {2} \nL'un est marqué en tant que substitution mais pas l'autre + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is a constructor/property and the other is not + Le module '{0}' contient\n {1} \nmais sa signature spécifie\n {2} \nL'un est un constructeur/une propriété mais pas l'autre + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe compiled representation of this method is as a static member but the signature indicates its compiled representation is as an instance member + Le module '{0}' contient\n {1} \nmais sa signature spécifie\n {2} \nLa représentation compilée de cette méthode est celle d'un membre statique, mais la signature indique que sa représentation compilée est celle d'un membre d'instance + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe compiled representation of this method is as an instance member, but the signature indicates its compiled representation is as a static member + Le module '{0}' contient\n {1} \nmais sa signature spécifie\n {2} \nLa représentation compilée de cette méthode est celle d'un membre d'instance, mais la signature indique que sa représentation compilée est celle d'un membre statique + + + + The {0} definitions in the signature and implementation are not compatible because the names differ. The type is called '{1}' in the signature file but '{2}' in implementation. + Les {0} définitions dans la signature et l'implémentation ne sont pas compatibles, car les noms sont différents. Le type est appelé '{1}' dans le fichier de signature et '{2}' dans l'implémentation. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the respective type parameter counts differ + Les {0} définitions pour le type '{1}' dans la signature et l'implémentation ne sont pas compatibles, car le nombre de paramètres de type respectifs est différent + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the accessibility specified in the signature is more than that specified in the implementation + Les {0} définitions pour le type '{1}' dans la signature et l'implémentation ne sont pas compatibles, car l'accessibilité spécifiée dans la signature est supérieure à celle spécifiée dans l'implémentation + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature requires that the type supports the interface {2} but the interface has not been implemented + Les {0} définitions pour le type '{1}' dans la signature et l'implémentation ne sont pas compatibles, car la signature requiert que le type prenne en charge l'interface {2} mais l'interface n'a pas été implémentée + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation says this type may use nulls as a representation but the signature does not + Les {0} définitions pour le type '{1}' dans la signature et l'implémentation ne sont pas compatibles, car l'implémentation indique que ce type peut utiliser des valeurs Null comme représentation, contrairement à la signature + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation says this type may use nulls as an extra value but the signature does not + Les {0} définitions pour le type '{1}' dans la signature et l'implémentation ne sont pas compatibles, car l'implémentation indique que ce type peut utiliser des valeurs Null comme valeurs supplémentaires, contrairement à la signature + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature says this type may use nulls as a representation but the implementation does not + Les {0} définitions pour le type '{1}' dans la signature et l'implémentation ne sont pas compatibles, car la signature indique que ce type peut utiliser des valeurs Null comme représentation, contrairement à l'implémentation + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature says this type may use nulls as an extra value but the implementation does not + Les {0} définitions pour le type '{1}' dans la signature et l'implémentation ne sont pas compatibles, car la signature indique que ce type peut utiliser des valeurs Null comme valeurs supplémentaires, contrairement à l'implémentation + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation type is sealed but the signature implies it is not. Consider adding the [<Sealed>] attribute to the signature. + Les {0} définitions du type '{1}' dans la signature et l'implémentation ne sont pas compatibles, car le type de l'implémentation est sealed alors que la signature implique le contraire. Ajoutez l'attribut [<Sealed>] à la signature. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation type is not sealed but signature implies it is. Consider adding the [<Sealed>] attribute to the implementation. + Les {0} définitions du type '{1}' dans la signature et l'implémentation ne sont pas compatibles, car le type de l'implémentation n'est pas sealed alors que la signature implique le contraire. Ajoutez l'attribut [<Sealed>] à l'implémentation. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation is an abstract class but the signature is not. Consider adding the [<AbstractClass>] attribute to the signature. + Les {0} définitions du type '{1}' de la signature et de l'implémentation ne sont pas compatibles, car l'implémentation est une classe abstraite, contrairement à la signature. Ajoutez l'attribut [<AbstractClass>] à la signature. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature is an abstract class but the implementation is not. Consider adding the [<AbstractClass>] attribute to the implementation. + Les {0} définitions du type '{1}' de la signature et de l'implémentation ne sont pas compatibles, car la signature est une classe abstraite, contrairement à l'implémentation. Ajoutez l'attribut [<AbstractClass>] à l'implémentation. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the types have different base types + Les {0} définitions pour le type '{1}' dans la signature et l'implémentation ne sont pas compatibles, car les types ont des types de base différents + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the number of {2}s differ + Les {0} définitions pour le type '{1}' dans la signature et l'implémentation ne sont pas compatibles, car le nombre de {2} est différent + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature defines the {2} '{3}' but the implementation does not (or does, but not in the same order) + Les {0} définitions pour le type '{1}' dans la signature et l'implémentation ne sont pas compatibles, car la signature définit le {2} '{3}' mais l'implémentation ne le fait pas (ou elle le fait mais dans un ordre différent) + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation defines the {2} '{3}' but the signature does not (or does, but not in the same order) + Les {0} définitions pour le type '{1}' dans la signature et l'implémentation ne sont pas compatibles, car l'implémentation définit le {2} '{3}' mais la signature ne le fait pas (ou elle le fait mais dans un ordre différent) + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation defines a struct but the signature defines a type with a hidden representation + Les {0} définitions pour le type '{1}' dans la signature et l'implémentation ne sont pas compatibles, car l'implémentation définit un struct alors que la signature définit un type avec une représentation masquée + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because a CLI type representation is being hidden by a signature + Les {0} définitions pour le type '{1}' dans la signature et l'implémentation ne sont pas compatibles, car une représentation de type CLI est masquée par une signature + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because a type representation is being hidden by a signature + Les {0} définitions pour le type '{1}' dans la signature et l'implémentation ne sont pas compatibles, car une représentation de type est masquée par une signature + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the types are of different kinds + Les {0} définitions pour le type '{1}' dans la signature et l'implémentation ne sont pas compatibles, car les types sont de différents genres + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the IL representations differ + Les {0} définitions pour le type '{1}' dans la signature et l'implémentation ne sont pas compatibles, car les représentations IL (Intermediate Language) sont différentes + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the representations differ + Les {0} définitions pour le type '{1}' dans la signature et l'implémentation ne sont pas compatibles, car les représentations sont différentes + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the field {2} was present in the implementation but not in the signature + Les {0} définitions pour le type '{1}' dans la signature et l'implémentation ne sont pas compatibles, car le champ {2} était présent dans l'implémentation mais pas dans la signature + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the order of the fields is different in the signature and implementation + Les {0} définitions pour le type '{1}' dans la signature et l'implémentation ne sont pas compatibles, car l'ordre des champs est différent entre la signature et l'implémentation + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the field {2} was required by the signature but was not specified by the implementation + Les {0} définitions pour le type '{1}' dans la signature et l'implémentation ne sont pas compatibles, car le champ {2} a été demandé par la signature mais n'a pas été spécifié par l'implémentation + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the field '{2}' was present in the implementation but not in the signature. Struct types must now reveal their fields in the signature for the type, though the fields may still be labelled 'private' or 'internal'. + Les {0} définitions pour le type '{1}' dans la signature et l'implémentation ne sont pas compatibles, car le champ '{2}' était présent dans l'implémentation mais pas dans la signature. Les types struct doivent désormais révéler leurs champs dans la signature relative au type ; toutefois, les champs peuvent continuer à être étiquetés 'private' ou 'internal'. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the abstract member '{2}' was required by the signature but was not specified by the implementation + Les {0} définitions pour le type '{1}' dans la signature et l'implémentation ne sont pas compatibles, car le membre abstrait '{2}' a été requis par la signature mais n'a pas été spécifié par l'implémentation + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the abstract member '{2}' was present in the implementation but not in the signature + Les {0} définitions pour le type '{1}' dans la signature et l'implémentation ne sont pas compatibles, car le membre abstrait '{2}' était présent dans l'implémentation mais pas dans la signature + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature declares a {2} while the implementation declares a {3} + Les {0} définitions pour le type '{1}' dans la signature et l'implémentation ne sont pas compatibles, car la signature déclare {2} alors que l'implémentation déclare {3} + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the abbreviations differ: {2} versus {3} + Les {0} définitions pour le type '{1}' dans la signature et l'implémentation ne sont pas compatibles, car les abréviations sont différentes : {2} par opposition à {3} + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because an abbreviation is being hidden by a signature. The abbreviation must be visible to other CLI languages. Consider making the abbreviation visible in the signature. + Les {0} définitions pour le type '{1}' dans la signature et l'implémentation ne sont pas compatibles, car une abréviation est masquée par une signature. L'abréviation doit être visible par les autres langages CLI. Rendez l'abréviation visible dans la signature. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature has an abbreviation while the implementation does not + Les {0} définitions pour le type '{1}' dans la signature et l'implémentation ne sont pas compatibles, car la signature a une abréviation, contrairement à l'implémentation + + + + The module contains the constructor\n {0} \nbut its signature specifies\n {1} \nThe names differ + Le module contient le constructeur\n {0} \nmais sa signature spécifie\n {1} \nLes noms sont différents + + + + The module contains the constructor\n {0} \nbut its signature specifies\n {1} \nThe respective number of data fields differ + Le module contient le constructeur\n {0} \nmais sa signature spécifie\n {1} \nLe nombre de champs de données respectifs est différent + + + + The module contains the constructor\n {0} \nbut its signature specifies\n {1} \nThe types of the fields differ + Le module contient le constructeur\n {0} \nmais sa signature spécifie\n {1} \nLes types des champs sont différents + + + + The module contains the constructor\n {0} \nbut its signature specifies\n {1} \nthe accessibility specified in the signature is more than that specified in the implementation + Le module contient le constructeur\n {0} \nmais sa signature spécifie\n {1} \nL'accessibilité spécifiée dans la signature est supérieure à celle spécifiée dans l'implémentation + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe names differ + Le module contient le champ\n {0} \nmais sa signature spécifie\n {1} \nLes noms sont différents + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nthe accessibility specified in the signature is more than that specified in the implementation + Le module contient le champ\n {0} \nmais sa signature spécifie\n {1} \nL'accessibilité spécifiée dans la signature est supérieure à celle spécifiée dans l'implémentation + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe 'static' modifiers differ + Le module contient le champ\n {0} \nmais sa signature spécifie\n {1} \nLes modificateurs 'static' sont différents + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe 'mutable' modifiers differ + Le module contient le champ\n {0} \nmais sa signature spécifie\n {1} \nLes modificateurs 'mutable' sont différents + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe 'literal' modifiers differ + Le module contient le champ\n {0} \nmais sa signature spécifie\n {1} \nLes modificateurs 'literal' sont différents + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe types differ + Le module contient le champ\n {0} \nmais sa signature spécifie\n {1} \nLes types sont différents + + + + The implicit instantiation of a generic construct at or near this point could not be resolved because it could resolve to multiple unrelated types, e.g. '{0}' and '{1}'. Consider using type annotations to resolve the ambiguity + Impossible de résoudre l'instanciation implicite d'une construction générique à cet emplacement ou à proximité, car elle peut être résolue en plusieurs types non liés, par exemple '{0}' et '{1}'. Utilisez des annotations de type pour résoudre l'ambigüité + + + + Could not resolve the ambiguity inherent in the use of a 'printf'-style format string + Impossible de résoudre l'ambigüité inhérente à l'utilisation d'une chaîne de format de style 'printf' + + + + Could not resolve the ambiguity in the use of a generic construct with an 'enum' constraint at or near this position + Impossible de résoudre l'ambigüité liée à l'utilisation d'une construction générique avec une contrainte 'enum' à cette position ou à proximité + + + + Could not resolve the ambiguity in the use of a generic construct with a 'delegate' constraint at or near this position + Impossible de résoudre l'ambigüité liée à l'utilisation d'une construction générique avec une contrainte 'delegate' à cette position ou à proximité + + + + Invalid value + Valeur non valide + + + + The signature and implementation are not compatible because the respective type parameter counts differ + La signature et l'implémentation ne sont pas compatibles, car le nombre de paramètres de type respectifs est différent + + + + The signature and implementation are not compatible because the type parameter in the class/signature has a different compile-time requirement to the one in the member/implementation + La signature et l'implémentation ne sont pas compatibles, car le paramètre de type de la classe/signature n'a pas la même exigence au moment de la compilation que celui du membre/de l'implémentation + + + + The signature and implementation are not compatible because the declaration of the type parameter '{0}' requires a constraint of the form {1} + La signature et l'implémentation ne sont pas compatibles, car la déclaration du paramètre de type '{0}' requiert une contrainte sous la forme {1} + + + + The signature and implementation are not compatible because the type parameter '{0}' has a constraint of the form {1} but the implementation does not. Either remove this constraint from the signature or add it to the implementation. + La signature et l'implémentation ne sont pas compatibles, car le paramètre de type '{0}' a une contrainte sous la forme {1} mais l'implémentation n'en a pas. Vous devez soit supprimer cette contrainte de la signature, soit l'ajouter à l'implémentation. + + + + The type '{0}' implements 'System.IComparable'. Consider also adding an explicit override for 'Object.Equals' + Le type '{0}' implémente 'System.IComparable'. Ajoutez également une substitution explicite pour 'Object.Equals' + + + + The type '{0}' implements 'System.IComparable' explicitly but provides no corresponding override for 'Object.Equals'. An implementation of 'Object.Equals' has been automatically provided, implemented via 'System.IComparable'. Consider implementing the override 'Object.Equals' explicitly + Le type '{0}' implémente explicitement 'System.IComparable' mais ne fournit aucune substitution correspondante pour 'Object.Equals'. Une implémentation de 'Object.Equals' a été fournie automatiquement, implémentée via 'System.IComparable'. Implémentez explicitement la substitution 'Object.Equals' + + + + The struct, record or union type '{0}' has an explicit implementation of 'Object.GetHashCode' or 'Object.Equals'. You must apply the 'CustomEquality' attribute to the type + Le type struct, enregistrement ou union '{0}' a une implémentation explicite de 'Object.GetHashCode' ou 'Object.Equals'. Vous devez appliquer l'attribut 'CustomEquality' au type + + + + The struct, record or union type '{0}' has an explicit implementation of 'Object.GetHashCode'. Consider implementing a matching override for 'Object.Equals(obj)' + Le type struct, enregistrement ou union '{0}' a une implémentation explicite de 'Object.GetHashCode'. Implémentez une substitution correspondante pour 'Object.Equals(obj)' + + + + The struct, record or union type '{0}' has an explicit implementation of 'Object.Equals'. Consider implementing a matching override for 'Object.GetHashCode()' + Le type struct, enregistrement ou union '{0}' a une implémentation explicite de 'Object.Equals'. Implémentez une substitution correspondante pour 'Object.GetHashCode()' + + + + The exception definitions are not compatible because a CLI exception mapping is being hidden by a signature. The exception mapping must be visible to other modules. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1} + Les définitions de l'exception ne sont pas compatibles, car le mappage d'une exception CLI est masqué par une signature. Le mappage de l'exception doit être visible par les autres modules. Le module contient la définition de l'exception\n {0} \nmais sa signature spécifie\n\t{1} + + + + The exception definitions are not compatible because the CLI representations differ. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1} + Les définitions de l'exception ne sont pas compatibles, car les représentations CLI sont différentes. Le module contient la définition de l'exception\n {0} \nmais sa signature spécifie\n\t{1} + + + + The exception definitions are not compatible because the exception abbreviation is being hidden by the signature. The abbreviation must be visible to other CLI languages. Consider making the abbreviation visible in the signature. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1}. + Les définitions de l'exception ne sont pas compatibles, car l'abréviation de l'exception est masquée par la signature. L'abréviation doit être visible par les autres langages CLI. Rendez l'abréviation visible dans la signature. Le module contient la définition de l'exception\n {0} \nmais sa signature spécifie\n\t{1}. + + + + The exception definitions are not compatible because the exception abbreviations in the signature and implementation differ. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1}. + Les définitions de l'exception ne sont pas compatibles, car les abréviations de l'exception sont différentes entre la signature et l'implémentation. Le module contient la définition de l'exception\n {0} \nmais sa signature spécifie\n\t{1}. + + + + The exception definitions are not compatible because the exception declarations differ. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1}. + Les définitions de l'exception ne sont pas compatibles, car les déclarations de l'exception sont différentes. Le module contient la définition de l'exception\n {0} \nmais sa signature spécifie\n\t{1}. + + + + The exception definitions are not compatible because the field '{0}' was required by the signature but was not specified by the implementation. The module contains the exception definition\n {1} \nbut its signature specifies\n\t{2}. + Les définitions de l'exception ne sont pas compatibles, car le champ '{0}' était requis par la signature mais n'était pas spécifiée par l'implémentation. Le module contient la définition de l'exception\n {1} \nmais sa signature spécifie\n\t{2}. + + + + The exception definitions are not compatible because the field '{0}' was present in the implementation but not in the signature. The module contains the exception definition\n {1} \nbut its signature specifies\n\t{2}. + Les définitions de l'exception ne sont pas compatibles, car le champ '{0}' était présent dans l'implémentation mais pas dans la signature. Le module contient la définition de l'exception\n {1} \nmais sa signature spécifie\n\t{2}. + + + + The exception definitions are not compatible because the order of the fields is different in the signature and implementation. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1}. + Les définitions de l'exception ne sont pas compatibles, car l'ordre des champs est différent entre la signature et l'implémentation. Le module contient la définition de l'exception\n {0} \nmais sa signature spécifie\n\t{1}. + + + + The namespace or module attributes differ between signature and implementation + Les attributs de l'espace de noms ou du module sont différents entre la signature et l'implémentation + + + + This method is over-constrained in its type parameters + Cette méthode est contrainte de manière excessive dans ses paramètres de type + + + + No implementations of '{0}' had the correct number of arguments and type parameters. The required signature is '{1}'. + Aucune implémentation de '{0}' n'avait le nombre approprié d'arguments et de paramètres de type. La signature requise est '{1}'. + + + + The override for '{0}' was ambiguous + La substitution pour '{0}' était ambigüe + + + + More than one override implements '{0}' + Plusieurs substitutions implémentent '{0}' + + + + The method '{0}' is sealed and cannot be overridden + La méthode '{0}' est sealed et ne peut pas être substituée + + + + The override '{0}' implements more than one abstract slot, e.g. '{1}' and '{2}' + La substitution '{0}' implémente plusieurs emplacements abstraits, par exemple '{1}' et '{2}' + + + + Duplicate or redundant interface + Interface dupliquée ou redondante + + + + The interface '{0}' is included in multiple explicitly implemented interface types. Add an explicit implementation of this interface. + L'interface '{0}' est incluse dans plusieurs types interface implémentés explicitement. Ajoutez une implémentation explicite de cette interface. + + + + A named argument has been assigned more than one value + Plusieurs valeurs ont été assignées à un argument nommé + + + + No implementation was given for '{0}' + Aucune implémentation n'a été fournie pour '{0}' + + + + No implementation was given for '{0}'. Note that all interface members must be implemented and listed under an appropriate 'interface' declaration, e.g. 'interface ... with member ...'. + Aucune implémentation n'a été fournie pour '{0}'. Remarquez que tous les membres d'interface doivent être implémentés et listés sous une déclaration 'interface' appropriée, par exemple 'interface ... with member ...'. + + + + The member '{0}' does not have the correct number of arguments. The required signature is '{1}'. + Le membre '{0}' n'a pas le nombre approprié d'arguments. La signature requise est '{1}'. + + + + The member '{0}' does not have the correct number of method type parameters. The required signature is '{1}'. + Le membre '{0}' n'a pas le nombre approprié de paramètres de type de méthode. La signature requise est '{1}'. + + + + The member '{0}' does not have the correct kinds of generic parameters. The required signature is '{1}'. + Le membre '{0}' n'a pas les genres appropriés de paramètres génériques. La signature requise est '{1}'. + + + + The member '{0}' cannot be used to implement '{1}'. The required signature is '{2}'. + Impossible d'utiliser le membre '{0}' pour implémenter '{1}'. La signature requise est '{2}'. + + + + Error while parsing embedded IL + Erreur lors de l'analyse du code IL (Intermediate Language) incorporé + + + + Error while parsing embedded IL type + Erreur lors de l'analyse du type IL (Intermediate Language) incorporé + + + + This indexer notation has been removed from the F# language + Cette notation de l'indexeur a été supprimée du langage F# + + + + Invalid expression on left of assignment + Expression non valide à gauche de l'assignation + + + + The 'ReferenceEquality' attribute cannot be used on structs. Consider using the 'StructuralEquality' attribute instead, or implement an override for 'System.Object.Equals(obj)'. + Impossible d'utiliser l'attribut 'ReferenceEquality' sur des structs. Utilisez l'attribut 'StructuralEquality' à la place, ou implémentez une substitution pour 'System.Object.Equals(obj)'. + + + + This type uses an invalid mix of the attributes 'NoEquality', 'ReferenceEquality', 'StructuralEquality', 'NoComparison' and 'StructuralComparison' + Ce type utilise un mélange non valide des attributs 'NoEquality', 'ReferenceEquality', 'StructuralEquality', 'NoComparison' et 'StructuralComparison' + + + + The 'NoEquality' attribute must be used in conjunction with the 'NoComparison' attribute + L'attribut 'NoEquality' doit être utilisé conjointement avec l'attribut 'NoComparison' + + + + The 'StructuralComparison' attribute must be used in conjunction with the 'StructuralEquality' attribute + L'attribut 'StructuralComparison' doit être utilisé conjointement avec l'attribut 'StructuralEquality' + + + + The 'StructuralEquality' attribute must be used in conjunction with the 'NoComparison' or 'StructuralComparison' attributes + L'attribut 'StructuralEquality' doit être utilisé conjointement avec les attributs 'NoComparison' ou 'StructuralComparison' + + + + A type cannot have both the 'ReferenceEquality' and 'StructuralEquality' or 'StructuralComparison' attributes + Un type ne peut pas avoir à la fois les attributs 'ReferenceEquality' et 'StructuralEquality' ou 'StructuralComparison' + + + + Only record, union, exception and struct types may be augmented with the 'ReferenceEquality', 'StructuralEquality' and 'StructuralComparison' attributes + Seuls les types enregistrement, union, exception et struct peuvent être augmentés avec les attributs 'ReferenceEquality', 'StructuralEquality' et 'StructuralComparison' + + + + A type with attribute 'ReferenceEquality' cannot have an explicit implementation of 'Object.Equals(obj)', 'System.IEquatable<_>' or 'System.Collections.IStructuralEquatable' + Un type avec l'attribut 'ReferenceEquality' ne peut pas avoir une implémentation explicite de 'Object.Equals(obj)', 'System.IEquatable<_>' ou 'System.Collections.IStructuralEquatable' + + + + A type with attribute 'CustomEquality' must have an explicit implementation of at least one of 'Object.Equals(obj)', 'System.IEquatable<_>' or 'System.Collections.IStructuralEquatable' + Un type avec l'attribut 'CustomEquality' doit avoir au moins une implémentation explicite de 'Object.Equals(obj)', 'System.IEquatable<_>' ou 'System.Collections.IStructuralEquatable' + + + + A type with attribute 'CustomComparison' must have an explicit implementation of at least one of 'System.IComparable' or 'System.Collections.IStructuralComparable' + Un type avec l'attribut 'CustomComparison' doit avoir au moins une implémentation explicite de 'System.IComparable' ou 'System.Collections.IStructuralComparable' + + + + A type with attribute 'NoEquality' should not usually have an explicit implementation of 'Object.Equals(obj)'. Disable this warning if this is intentional for interoperability purposes + Un type avec l'attribut 'NoEquality' ne doit généralement pas avoir une implémentation explicite de 'Object.Equals(obj)'. Désactivez cet avertissement s'il résulte d'une action intentionnelle à des fins d'interopérabilité + + + + A type with attribute 'NoComparison' should not usually have an explicit implementation of 'System.IComparable', 'System.IComparable<_>' or 'System.Collections.IStructuralComparable'. Disable this warning if this is intentional for interoperability purposes + Un type avec l'attribut 'NoComparison' ne doit généralement pas avoir une implémentation explicite de 'System.IComparable', 'System.IComparable<_>' ou 'System.Collections.IStructuralComparable'. Désactivez cet avertissement s'il résulte d'une action intentionnelle à des fins d'interopérabilité + + + + The 'CustomEquality' attribute must be used in conjunction with the 'NoComparison' or 'CustomComparison' attributes + L'attribut 'CustomEquality' doit être utilisé conjointement avec les attributs 'NoComparison' ou 'CustomComparison' + + + + Positional specifiers are not permitted in format strings + Les spécificateurs de position ne sont pas autorisés dans les chaînes de format + + + + Missing format specifier + Spécificateur de format manquant + + + + '{0}' flag set twice + Indicateur '{0}' défini à deux reprises + + + + Prefix flag (' ' or '+') set twice + Indicateur de préfixe (' ' ou '+') défini à deux reprises + + + + The # formatting modifier is invalid in F# + Le modificateur de mise en forme # n'est pas valide en F# + + + + Bad precision in format specifier + Précision incorrecte du spécificateur de format + + + + Bad width in format specifier + Largeur incorrecte du spécificateur de format + + + + '{0}' format does not support '0' flag + Le format '{0}' ne prend pas en charge l'indicateur '0' + + + + Precision missing after the '.' + Précision manquante après le '.' + + + + '{0}' format does not support precision + Le format '{0}' ne prend pas en charge la précision + + + + Bad format specifier (after l or L): Expected ld,li,lo,lu,lx or lX. In F# code you can use %d, %x, %o or %u instead, which are overloaded to work with all basic integer types. + Spécificateur de format incorrect (après l ou L) : ld,li,lo,lu,lx ou lX attendu. En F#, vous pouvez utiliser %d, %x, %o ou %u à la place, qui sont surchargés pour fonctionner avec tous les types entiers de base. + + + + The 'l' or 'L' in this format specifier is unnecessary. In F# code you can use %d, %x, %o or %u instead, which are overloaded to work with all basic integer types. + Le 'l' ou 'L' dans ce spécificateur de format est inutile. En F#, vous pouvez utiliser %d, %x, %o ou %u à la place, qui sont surchargés pour fonctionner avec tous les types entiers de base. + + + + The 'h' or 'H' in this format specifier is unnecessary. You can use %d, %x, %o or %u instead, which are overloaded to work with all basic integer types. + Le 'h' ou 'H' dans ce spécificateur de format est inutile. Vous pouvez utiliser %d, %x, %o ou %u à la place, qui sont surchargés pour fonctionner avec tous les types entiers de base. + + + + '{0}' does not support prefix '{1}' flag + '{0}' ne prend pas en charge l'indicateur de préfixe '{1}' + + + + Bad format specifier: '{0}' + Spécificateur de format incorrect : '{0}' + + + + System.Environment.Exit did not exit + System.Environment.Exit n'est pas sorti + + + + The treatment of this operator is now handled directly by the F# compiler and its meaning cannot be redefined + Le traitement de cet opérateur est désormais géré directement par le compilateur F# et il est impossible de redéfinir sa signification + + + + A protected member is called or 'base' is being used. This is only allowed in the direct implementation of members since they could escape their object scope. + Un membre protégé est appelé ou 'base' est utilisé. Cela n'est autorisé que dans l'implémentation directe des membres, car ils peuvent sortir de la portée de leurs objets. + + + + The byref-typed variable '{0}' is used in an invalid way. Byrefs cannot be captured by closures or passed to inner functions. + La variable typée byref '{0}' est utilisée de manière incorrecte. Impossible de capturer les types byref par des fermetures ou de les passer à des fonctions internes. + + + + The 'base' keyword is used in an invalid way. Base calls cannot be used in closures. Consider using a private member to make base calls. + Le mot clé 'base' est utilisé de manière incorrecte. Impossible d'utiliser les appels de base dans les fermetures. Utilisez un membre privé pour effectuer les appels de base. + + + + The variable '{0}' is used in an invalid way + La variable '{0}' est utilisée de manière incorrecte + + + + The type '{0}' is less accessible than the value, member or type '{1}' it is used in. + Le type '{0}' est moins accessible que la valeur, le membre ou le type '{1}' dans lequel il est utilisé. + + + + 'System.Void' can only be used as 'typeof<System.Void>' in F# + 'System.Void' ne peut être utilisé que sous la forme 'typeof<System.Void>' en F# + + + + A type instantiation involves a byref type. This is not permitted by the rules of Common IL. + Une instanciation de type implique un type byref. Cela n'est pas autorisé par les règles du langage CIL (Common Intermediate Language). + + + + Calls to 'reraise' may only occur directly in a handler of a try-with + Les appels à 'reraise' ne peuvent se produire directement que dans un gestionnaire de try-with + + + + Expression-splicing operators may only be used within quotations + Les opérateurs d'ajout d'expressions ne peuvent être utilisés qu'entre des quotations + + + + First-class uses of the expression-splicing operator are not permitted + Les utilisations de première classe de l'opérateur d'ajout d'expression ne sont pas autorisées + + + + First-class uses of the address-of operators are not permitted + Les utilisations de première classe d'opérateurs d'adresses ne sont pas autorisées + + + + First-class uses of the 'reraise' function is not permitted + Les utilisations de première classe de la fonction 'reraise' ne sont pas autorisées + + + + The byref typed value '{0}' cannot be used at this point + Impossible d'utiliser la valeur typée byref '{0}' actuellement + + + + 'base' values may only be used to make direct calls to the base implementations of overridden members + Les valeurs 'base' ne peuvent être utilisées que pour effectuer des appels directs aux implémentations de base des membres substitués + + + + Object constructors cannot directly use try/with and try/finally prior to the initialization of the object. This includes constructs such as 'for x in ...' that may elaborate to uses of these constructs. This is a limitation imposed by Common IL. + Les constructeurs d'objets ne peuvent pas utiliser directement try/with et try/finally avant l'initialisation de l'objet. Cela inclut les constructions telles que 'for x in ...' qui peuvent conduire aux utilisations de ces constructions. Il s'agit d'une limitation imposée par le langage CIL (Common Intermediate Language). + + + + The address of the variable '{0}' cannot be used at this point + Impossible d'utiliser l'adresse de la variable '{0}' actuellement + + + + The address of the static field '{0}' cannot be used at this point + Impossible d'utiliser l'adresse du champ statique '{0}' actuellement + + + + The address of the field '{0}' cannot be used at this point + Impossible d'utiliser l'adresse du champ '{0}' actuellement + + + + The address of an array element cannot be used at this point + Impossible d'utiliser l'adresse d'un élément de tableau actuellement + + + + The type of a first-class function cannot contain byrefs + Une fonction de première classe ne peut pas contenir de types byref + + + + A method return type would contain byrefs which is not permitted + Le type de retour d'une méthode contient des types byref, ce qui n'est pas autorisé + + + + Invalid custom attribute value (not a constant or literal) + Valeur d'attribut personnalisé non valide (n'est pas une constante ou un littéral) + + + + The attribute type '{0}' has 'AllowMultiple=false'. Multiple instances of this attribute cannot be attached to a single language element. + Le type d'attribut '{0}' a 'AllowMultiple=false'. Impossible d'attacher plusieurs instances de cet attribut à un élément de langage unique. + + + + The member '{0}' is used in an invalid way. A use of '{1}' has been inferred prior to its definition at or near '{2}'. This is an invalid forward reference. + Le membre '{0}' est utilisé de manière incorrecte. Une utilisation de '{1}' a été déduite avant sa définition au niveau ou à proximité de '{2}'. Il s'agit d'une référence anticipée non valide. + + + + A byref typed value would be stored here. Top-level let-bound byref values are not permitted. + Une valeur typée byref doit être stockée ici. Les valeurs byref liées à let de niveau supérieur ne sont pas autorisées. + + + + [<ReflectedDefinition>] terms cannot contain uses of the prefix splice operator '%' + Les termes [<ReflectedDefinition>] ne peuvent pas contenir d'utilisations de l'opérateur d'ajout de préfixe '%' + + + + A function labeled with the 'EntryPointAttribute' attribute must be the last declaration in the last file in the compilation sequence. + Une fonction étiquetée avec l'attribut 'EntryPointAttribute' doit être la dernière déclaration du dernier fichier de la séquence de compilation. + + + + compiled form of the union case + forme compilée du cas d'union + + + + default augmentation of the union case + augmentation par défaut du cas d'union + + + + The property '{0}' has the same name as a method in type '{1}'. + La propriété '{0}' a le même nom qu'une méthode dans le type '{1}'. + + + + The property '{0}' of type '{1}' has a getter and a setter that do not match. If one is abstract then the other must be as well. + La propriété '{0}' de type '{1}' a une méthode getter et une méthode setter qui ne correspondent pas. Si l'une est abstraite, l'autre doit l'être également. + + + + The property '{0}' has the same name as another property in type '{1}', but one takes indexer arguments and the other does not. You may be missing an indexer argument to one of your properties. + La propriété '{0}' a le même nom qu'une autre propriété dans le type '{1}'. Toutefois, l'une d'elles accepte les arguments de l'indexeur mais pas l'autre. Il manque peut-être un argument d'indexeur dans l'une de vos propriétés. + + + + A type would store a byref typed value. This is not permitted by Common IL. + Un type doit stocker une valeur typée byref. Cela n'est pas autorisé par le langage CIL (Common Intermediate Language). + + + + Duplicate method. The method '{0}' has the same name and signature as another method in type '{1}'. + Méthode dupliquée. La méthode '{0}' a le même nom et la même signature qu'une autre méthode dans le type '{1}'. + + + + Duplicate method. The method '{0}' has the same name and signature as another method in type '{1}' once tuples, functions, units of measure and/or provided types are erased. + Méthode dupliquée. La méthode '{0}' a le même nom et la même signature qu'une autre méthode dans le type '{1}', une fois les tuples, fonctions, unités de mesure et/ou types fournis effacés. + + + + The method '{0}' has curried arguments but has the same name as another method in type '{1}'. Methods with curried arguments cannot be overloaded. Consider using a method taking tupled arguments. + La méthode '{0}' a des arguments curryfiés mais elle comporte le même nom qu'une autre méthode dans le type '{1}'. Impossible de surcharger les méthodes ayant des arguments curryfiés. Utilisez une méthode qui accepte des arguments basés sur des tuples. + + + + Methods with curried arguments cannot declare 'out', 'ParamArray', 'optional', 'ReflectedDefinition', 'byref', 'CallerLineNumber', 'CallerMemberName', or 'CallerFilePath' arguments + Les méthodes avec des arguments curryfiés ne peuvent pas déclarer d'arguments 'out', 'ParamArray', 'optional', 'ReflectedDefinition', 'byref', 'CallerLineNumber', 'CallerMemberName' ou 'CallerFilePath' + + + + Duplicate property. The property '{0}' has the same name and signature as another property in type '{1}'. + Propriété dupliquée. La propriété '{0}' a le même nom et la même signature qu'une autre propriété dans le type '{1}'. + + + + Duplicate property. The property '{0}' has the same name and signature as another property in type '{1}' once tuples, functions, units of measure and/or provided types are erased. + Propriété dupliquée. La propriété '{0}' a le même nom et la même signature qu'une autre propriété dans le type '{1}', une fois les tuples, fonctions, unités de mesure et/ou types fournis effacés. + + + + Duplicate method. The abstract method '{0}' has the same name and signature as an abstract method in an inherited type. + Méthode dupliquée. La méthode abstract '{0}' a le même nom et la même signature qu'une méthode abstract d'un type hérité. + + + + Duplicate method. The abstract method '{0}' has the same name and signature as an abstract method in an inherited type once tuples, functions, units of measure and/or provided types are erased. + Méthode dupliquée. La méthode abstract '{0}' a le même nom et la même signature qu'une méthode abstract d'un type hérité, une fois les tuples, fonctions, unités de mesure et/ou types fournis effacés. + + + + This type implements the same interface at different generic instantiations '{0}' and '{1}'. This is not permitted in this version of F#. + Ce type implémente la même interface à des instanciations génériques différentes '{0}' et '{1}'. Cela n'est pas autorisé dans cette version de F#. + + + + The type of a field using the 'DefaultValue' attribute must admit default initialization, i.e. have 'null' as a proper value or be a struct type whose fields all admit default initialization. You can use 'DefaultValue(false)' to disable this check + Le type d'un champ qui utilise l'attribut 'DefaultValue' doit admettre l'initialisation par défaut, c'est-à-dire qu'il doit avoir la valeur 'null' comme valeur appropriée ou être un type struct dont les champs admettent tous l'initialisation par défaut. Vous pouvez utiliser 'DefaultValue(false)' pour désactiver cette vérification + + + + The type abbreviation contains byrefs. This is not permitted by F#. + L'abréviation de type contient des types byref. Cela n'est pas autorisé en F#. + + + + The variable '{0}' is bound in a quotation but is used as part of a spliced expression. This is not permitted since it may escape its scope. + La variable '{0}' est liée dans une quotation mais est utilisée dans le cadre d'une expression ajoutée. Cela n'est pas autorisé, car elle peut sortir de sa portée. + + + + Quotations cannot contain uses of generic expressions + Les quotations ne peuvent pas contenir d'utilisations d'expressions génériques + + + + Quotations cannot contain function definitions that are inferred or declared to be generic. Consider adding some type constraints to make this a valid quoted expression. + Les citations ne peuvent pas contenir de définitions de fonction déduites ou déclarées comme étant génériques. Ajoutez des contraintes de type pour rendre cette expression citée valide. + + + + Quotations cannot contain object expressions + Les quotations ne peuvent pas contenir d'expressions d'objet + + + + Quotations cannot contain expressions that take the address of a field + Les quotations ne peuvent pas contenir d'expressions qui acceptent l'adresse d'un champ + + + + Quotations cannot contain expressions that fetch static fields + Les quotations ne peuvent pas contenir d'expressions qui récupèrent des champs statiques + + + + Quotations cannot contain inline assembly code or pattern matching on arrays + Les quotations ne peuvent pas contenir de code assembleur inline ou de critères spéciaux dans les tableaux + + + + Quotations cannot contain descending for loops + Les quotations ne peuvent pas contenir d'ordre décroissant pour les boucles + + + + Quotations cannot contain expressions that fetch union case indexes + Les quotations ne peuvent pas contenir d'expressions qui récupèrent des index de cas d'union + + + + Quotations cannot contain expressions that set union case fields + Les quotations ne peuvent pas contenir d'expressions qui définissent des champs de cas d'union + + + + Quotations cannot contain expressions that set fields in exception values + Les quotations ne peuvent pas contenir d'expressions qui définissent des champs dans des valeurs d'exception + + + + Quotations cannot contain expressions that require byref pointers + Les quotations ne peuvent pas contenir d'expressions qui requièrent des pointeurs byref + + + + Quotations cannot contain expressions that make member constraint calls, or uses of operators that implicitly resolve to a member constraint call + Les quotations ne peuvent pas contenir d'expressions qui appellent des contraintes de membres ou utilisent des opérateurs qui sont implicitement résolus en appel de contrainte membre + + + + Quotations cannot contain this kind of constant + Les quotations ne peuvent pas contenir ce genre de constante + + + + Quotations cannot contain this kind of pattern match + Les quotations ne peuvent pas contenir ce genre de critère spécial + + + + Quotations cannot contain array pattern matching + Les quotations ne peuvent pas contenir de critères spéciaux de tableau + + + + Quotations cannot contain this kind of type + Les quotations ne peuvent pas contenir ce genre de type + + + + The declared type parameter '{0}' cannot be used here since the type parameter cannot be resolved at compile time + Impossible d'utiliser ici le paramètre de type déclaré '{0}', car le paramètre de type ne peut pas être résolu au moment de la compilation + + + + This code is less generic than indicated by its annotations. A unit-of-measure specified using '_' has been determined to be '1', i.e. dimensionless. Consider making the code generic, or removing the use of '_'. + Ce code est moins générique que ne l'indiquaient ses annotations. Une unité de mesure spécifiée à l'aide de '_' a été déterminée comme étant égale à '1', c'est-à-dire sans dimension. Rendez le code générique ou supprimez l'utilisation de '_'. + + + + Type inference problem too complicated (maximum iteration depth reached). Consider adding further type annotations. + Problème d'inférence de type trop complexe (profondeur d'itération maximale atteinte). Ajoutez d'autres annotations de type. + + + + Expected arguments to an instance member + Arguments attendus pour un membre d'instance + + + + This indexer expects {0} arguments but is here given {1} + Cet indexeur attend {0} arguments mais en reçoit ici {1} + + + + Expecting a type supporting the operator '{0}' but given a function type. You may be missing an argument to a function. + Un type prenant en charge l'opérateur '{0}' est attendu mais un type de fonction a été reçu. Il manque peut-être un argument à une fonction. + + + + Expecting a type supporting the operator '{0}' but given a tuple type + Un type prenant en charge l'opérateur '{0}' est attendu, mais un type tuple a été reçu + + + + None of the types '{0}' support the operator '{1}' + Aucun des types '{0}' ne prend en charge l'opérateur '{1}' + + + + The type '{0}' does not support the operator '{1}' + Le type '{0}' ne prend pas en charge l'opérateur '{1}' + + + + None of the types '{0}' support the operator '{1}'. Consider opening the module 'Microsoft.FSharp.Linq.NullableOperators'. + Aucun des types '{0}' ne prend en charge l'opérateur '{1}'. Envisagez d'ouvrir le module 'Microsoft.FSharp.Linq.NullableOperators'. + + + + The type '{0}' does not support the operator '{1}'. Consider opening the module 'Microsoft.FSharp.Linq.NullableOperators'. + Le type '{0}' ne prend pas en charge l'opérateur '{1}'. Ouvrez le module 'Microsoft.FSharp.Linq.NullableOperators'. + + + + The type '{0}' does not support a conversion to the type '{1}' + Le type '{0}' ne prend pas en charge une conversion vers le type '{1}' + + + + The type '{0}' has a method '{1}' (full name '{2}'), but the method is static + Le type '{0}' a une méthode '{1}' (nom complet '{2}'), mais la méthode est statique + + + + The type '{0}' has a method '{1}' (full name '{2}'), but the method is not static + Le type '{0}' a une méthode '{1}' (nom complet '{2}'), mais la méthode n'est pas statique + + + + The constraints 'struct' and 'not struct' are inconsistent + Les contraintes 'struct' et 'not struct' ne sont pas cohérentes + + + + The type '{0}' does not have 'null' as a proper value + Le type '{0}' n'a pas la valeur 'null' comme valeur appropriée + + + + The type '{0}' does not have 'null' as a proper value. To create a null value for a Nullable type use 'System.Nullable()'. + Le type '{0}' n'a pas la valeur 'null' comme valeur appropriée. Pour créer une valeur null pour un type Nullable, utilisez 'System.Nullable()'. + + + + The type '{0}' does not support the 'comparison' constraint because it has the 'NoComparison' attribute + Le type '{0}' ne prend pas en charge la contrainte 'comparison', car il a l'attribut 'NoComparison' + + + + The type '{0}' does not support the 'comparison' constraint. For example, it does not support the 'System.IComparable' interface + Le type '{0}' ne prend pas en charge la contrainte 'comparison'. Par exemple, il ne prend pas en charge l'interface 'System.IComparable' + + + + The type '{0}' does not support the 'comparison' constraint because it is a record, union or struct with one or more structural element types which do not support the 'comparison' constraint. Either avoid the use of comparison with this type, or add the 'StructuralComparison' attribute to the type to determine which field type does not support comparison + Le type '{0}' ne prend pas en charge la contrainte 'comparison', car il s'agit d'un enregistrement, d'une union ou d'une structure avec un ou plusieurs types d'éléments structurels qui ne prennent pas en charge la contrainte 'comparison'. Vous devez soit éviter d'utiliser la comparaison avec ce type, soit ajouter l'attribut 'StructuralComparison' au type pour identifier le type de champ qui ne prend pas en charge la comparaison + + + + The type '{0}' does not support the 'equality' constraint because it has the 'NoEquality' attribute + Le type '{0}' ne prend pas en charge la contrainte 'equality', car il a l'attribut 'NoEquality' + + + + The type '{0}' does not support the 'equality' constraint because it is a function type + Le type '{0}' ne prend pas en charge la contrainte 'equality', car il s'agit d'un type de fonction + + + + The type '{0}' does not support the 'equality' constraint because it is a record, union or struct with one or more structural element types which do not support the 'equality' constraint. Either avoid the use of equality with this type, or add the 'StructuralEquality' attribute to the type to determine which field type does not support equality + Le type '{0}' ne prend pas en charge la contrainte 'equality', car il s'agit d'un enregistrement, d'une union ou d'une structure avec un ou plusieurs types d'éléments structurels qui ne prennent pas en charge la contrainte 'equality'. Vous devez soit éviter d'utiliser l'égalité avec ce type, soit ajouter l'attribut 'StructuralEquality' au type pour identifier le type de champ qui ne prend pas en charge l'égalité + + + + The type '{0}' is not a CLI enum type + Le type '{0}' n'est pas un type enum CLI + + + + The type '{0}' has a non-standard delegate type + Le type '{0}' a un type délégué non standard + + + + The type '{0}' is not a CLI delegate type + Le type '{0}' n'est pas un type délégué CLI + + + + This type parameter cannot be instantiated to 'Nullable'. This is a restriction imposed in order to ensure the meaning of 'null' in some CLI languages is not confusing when used in conjunction with 'Nullable' values. + Impossible d'instancier ce paramètre de type en 'Nullable'. Il s'agit d'une restriction imposée pour garantir que la signification de 'null' dans certains langages CLI n'entraîne pas de confusion lors de l'utilisation conjointe de valeurs 'Nullable'. + + + + A generic construct requires that the type '{0}' is a CLI or F# struct type + Une construction générique requiert que le type '{0}' soit un type struct CLI ou F# + + + + A generic construct requires that the type '{0}' is an unmanaged type + Une construction générique requiert que le type '{0}' soit de type non managé + + + + The type '{0}' is not compatible with any of the types {1}, arising from the use of a printf-style format string + Le type '{0}' n'est pas compatible avec les types {1}, qui résultent de l'utilisation d'une chaîne de format de style printf + + + + A generic construct requires that the type '{0}' have reference semantics, but it does not, i.e. it is a struct + Une construction générique requiert que le type '{0}' ait une sémantique de référence, mais ce n'est pas le cas, car il s'agit par exemple d'un struct + + + + A generic construct requires that the type '{0}' be non-abstract + Une construction générique requiert que le type '{0}' soit non abstrait + + + + A generic construct requires that the type '{0}' have a public default constructor + Une construction générique requiert que le type '{0}' ait un constructeur par défaut public + + + + Type instantiation length mismatch + Incompatibilité de longueur de l'instanciation de type + + + + Optional arguments not permitted here + Arguments facultatifs non autorisés ici + + + + {0} is not a static member + {0} n'est pas un membre statique + + + + {0} is not an instance member + {0} n'est pas un membre d'instance + + + + Argument length mismatch + Incompatibilité de longueur des arguments + + + + The argument types don't match + Les types des arguments ne correspondent pas + + + + This method expects a CLI 'params' parameter in this position. 'params' is a way of passing a variable number of arguments to a method in languages such as C#. Consider passing an array for this argument + Cette méthode attend un paramètre CLI 'params' à cet emplacement. 'params' permet de passer un nombre variable d'arguments à une méthode dans les langages tels que C#. Passez un tableau pour cet argument + + + + The member or object constructor '{0}' is not {1} + Le membre ou le constructeur d'objet '{0}' n'est pas {1} + + + + The member or object constructor '{0}' is not {1}. Private members may only be accessed from within the declaring type. Protected members may only be accessed from an extending type and cannot be accessed from inner lambda expressions. + Le membre ou le constructeur d'objet '{0}' n'est pas {1}. Les membres privés ne peuvent être accessibles qu'à partir du type déclarant. Les membres protégés ne peuvent être accessibles qu'à partir d'un type d'extension et ne sont pas accessibles à partir d'expressions lambda internes. + + + + {0} is not a static method + {0} n'est pas une méthode statique + + + + {0} is not an instance method + {0} n'est pas une méthode d'instance + + + + The member or object constructor '{0}' has no argument or settable return property '{1}'. {2}. + Le membre ou le constructeur d'objet '{0}' n'a aucun argument ou aucune propriété de retour définissable '{1}'. {2}. + + + + The object constructor '{0}' has no argument or settable return property '{1}'. {2}. + Le constructeur d'objet '{0}' n'a aucun argument ou aucune propriété de retour définissable '{1}'. {2}. + + + + The required signature is {0} + La signature requise est {0} + + + + The member or object constructor '{0}' requires {1} argument(s). The required signature is '{2}'. + Le membre ou le constructeur d'objet '{0}' requiert {1} argument(s). La signature requise est '{2}'. + + + + The member or object constructor '{0}' requires {1} additional argument(s). The required signature is '{2}'. + Le membre ou le constructeur d'objet '{0}' requiert {1} argument(s) supplémentaire(s). La signature requise est '{2}'. + + + + The member or object constructor '{0}' requires {1} argument(s). The required signature is '{2}'. Some names for missing arguments are {3}. + Le membre ou le constructeur d'objet '{0}' requiert {1} argument(s). La signature requise est '{2}'. Voici certains noms des arguments manquants : {3}. + + + + The member or object constructor '{0}' requires {1} additional argument(s). The required signature is '{2}'. Some names for missing arguments are {3}. + Le membre ou le constructeur d'objet '{0}' requiert {1} argument(s) supplémentaire(s). La signature requise est '{2}'. Voici certains noms des arguments manquants : {3}. + + + + The member or object constructor '{0}' requires {1} argument(s) but is here given {2} unnamed and {3} named argument(s). The required signature is '{4}'. + Le membre ou le constructeur d'objet '{0}' requiert {1} argument(s) mais reçoit ici {2} argument(s) non nommé(s) et {3} argument(s) nommé(s). La signature requise est '{4}'. + + + + The member or object constructor '{0}' takes {1} argument(s) but is here given {2}. The required signature is '{3}'. + Le membre ou le constructeur d'objet '{0}' accepte {1} argument(s) mais en reçoit ici {2}. La signature requise est '{3}'. + + + + The object constructor '{0}' takes {1} argument(s) but is here given {2}. The required signature is '{3}'. + Le constructeur d'objet '{0}' accepte {1} argument(s), mais il en reçoit {2} ici. La signature exigée est '{3}'. + + + + The object constructor '{0}' takes {1} argument(s) but is here given {2}. The required signature is '{3}'. If some of the arguments are meant to assign values to properties, consider separating those arguments with a comma (','). + Le constructeur d'objet '{0}' accepte {1} argument(s), mais il en reçoit {2} ici. La signature exigée est '{3}'. Si certains arguments sont destinés à affecter des valeurs aux propriétés, séparez ces arguments par une virgule (','). + + + + The member or object constructor '{0}' takes {1} type argument(s) but is here given {2}. The required signature is '{3}'. + Le membre ou le constructeur d'objet '{0}' accepte {1} argument(s) de type mais en reçoit ici {2}. La signature requise est '{3}'. + + + + A member or object constructor '{0}' taking {1} arguments is not accessible from this code location. All accessible versions of method '{2}' take {3} arguments. + Le constructeur de membre ou d'objet '{0}' acceptant {1} arguments n'est pas accessible à partir de cet emplacement du code. Toutes les versions accessibles de la méthode '{2}' acceptent {3} arguments. + + + + Incorrect generic instantiation. No {0} member named '{1}' takes {2} generic arguments. + Instanciation générique incorrecte. Aucun membre {0} nommé '{1}' n'accepte {2} arguments génériques. + + + + The member or object constructor '{0}' does not take {1} argument(s). An overload was found taking {2} arguments. + Le membre ou le constructeur d'objet '{0}' n'accepte pas {1} argument(s). Une surcharge acceptant {2} arguments a été trouvée. + + + + No {0} member or object constructor named '{1}' takes {2} arguments + Aucun membre ou constructeur d'objet {0} nommé '{1}' n'accepte {2} arguments + + + + No {0} member or object constructor named '{1}' takes {2} arguments. Note the call to this member also provides {3} named arguments. + Aucun membre ou constructeur d'objet {0} nommé '{1}' n'accepte {2} arguments. Notez que l'appel de ce membre fournit également {3} arguments nommés. + + + + No {0} member or object constructor named '{1}' takes {2} arguments. The named argument '{3}' doesn't correspond to any argument or settable return property for any overload. + Aucun membre ou constructeur d'objet {0} nommé '{1}' n'accepte {2} arguments. L'argument nommé '{3}' ne correspond pas à un argument ou une propriété de retour définissable pour une surcharge. + + + + Method or object constructor '{0}' not found + Méthode ou constructeur d'objet '{0}' introuvable + + + + No overloads match for method '{0}'. + Aucune surcharge correspondante pour la méthode '{0}'. + + + + A unique overload for method '{0}' could not be determined based on type information prior to this program point. A type annotation may be needed. + Impossible de déterminer une surcharge unique pour la méthode '{0}' basée sur des informations de type situées avant ce point du programme. Une annotation de type peut être ajoutée. + + + + Candidates: {0} + Candidats : {0} + + + + The available overloads are shown below. + Les surcharges disponibles sont affichées ci-dessous. + + + + Accessibility modifiers are not permitted on 'do' bindings, but '{0}' was given. + Les modificateurs d'accessibilité ne sont pas autorisés sur les liaisons 'do' mais '{0}' a été spécifié. + + + + End of file in #if section begun at or after here + Fin de fichier dans la section #if ayant débuté à cet emplacement ou après + + + + End of file in string begun at or before here + Fin de fichier dans la chaîne ayant débuté à cet emplacement ou avant + + + + End of file in verbatim string begun at or before here + Fin de fichier dans la chaîne textuelle ayant débuté à cet emplacement ou avant + + + + End of file in comment begun at or before here + Fin de fichier dans le commentaire ayant débuté à cet emplacement ou avant + + + + End of file in string embedded in comment begun at or before here + Fin de fichier dans la chaîne incorporée dans le commentaire ayant débuté à cet emplacement ou avant + + + + End of file in verbatim string embedded in comment begun at or before here + Fin de fichier dans la chaîne textuelle incorporée dans le commentaire ayant débuté à cet emplacement ou avant + + + + End of file in IF-OCAML section begun at or before here + Fin de fichier dans la section IF-OCAML ayant débuté à cet emplacement ou avant + + + + End of file in directive begun at or before here + Fin de fichier dans la directive ayant débuté à cet emplacement ou avant + + + + No #endif found for #if or #else + #endif introuvable pour #if ou #else + + + + Attributes have been ignored in this construct + Les attributs ont été ignorés dans cette construction + + + + 'use' bindings are not permitted in primary constructors + Les liaisons 'use' ne sont pas autorisées dans les constructeurs principaux + + + + 'use' bindings are not permitted in modules and are treated as 'let' bindings + Les liaisons 'use' ne sont pas autorisées dans les modules et sont considérées comme des liaisons 'let' + + + + An integer for loop must use a simple identifier + Un entier d'une boucle doit utiliser un identificateur simple + + + + At most one 'with' augmentation is permitted + Une seule augmentation 'with' est autorisée + + + + A semicolon is not expected at this point + Point-virgule inattendu à cet emplacement + + + + Unexpected end of input + Fin d'entrée inattendue + + + + Accessibility modifiers are not permitted here, but '{0}' was given. + Les modificateurs d'accessibilité ne sont pas autorisés ici mais '{0}' a été spécifié. + + + + Only '#' compiler directives may occur prior to the first 'namespace' declaration + Seules les directives du compilateur '#' peuvent être présentes avant la première déclaration 'namespace' + + + + Accessibility modifiers should come immediately prior to the identifier naming a construct + Les modificateurs d'accessibilité doivent être placés immédiatement avant l'identificateur qui nomme une construction + + + + Files should begin with either a namespace or module declaration, e.g. 'namespace SomeNamespace.SubNamespace' or 'module SomeNamespace.SomeModule', but not both. To define a module within a namespace use 'module SomeModule = ...' + Les fichiers doivent commencer par un espace de noms ou une déclaration de module, par exemple 'namespace SomeNamespace.SubNamespace' ou 'module SomeNamespace.SomeModule', mais pas les deux. Pour définir un module dans un espace de noms, utilisez 'module SomeModule = ...' + + + + A module abbreviation must be a simple name, not a path + Une abréviation de module doit être un nom simple et non un chemin d'accès + + + + Ignoring attributes on module abbreviation + Attributs ignorés pour l'abréviation du module + + + + The '{0}' accessibility attribute is not allowed on module abbreviation. Module abbreviations are always private. + L'attribut d'accessibilité '{0}' n'est pas autorisé pour l'abréviation du module. Les abréviations de module sont toujours privées. + + + + The '{0}' visibility attribute is not allowed on module abbreviation. Module abbreviations are always private. + L'attribut de visibilité '{0}' n'est pas autorisé pour l'abréviation du module. Les abréviations de module sont toujours privées. + + + + Unclosed block + Bloc non fermé + + + + Unmatched 'begin' or 'struct' + 'begin' ou 'struct' non apparié + + + + A module name must be a simple name, not a path + Un nom de module doit être un nom simple et non un chemin d'accès + + + + Unexpected empty type moduleDefn list + Liste moduleDefn de type vide inattendue + + + + Attributes should be placed before 'val' + Les attributs doivent être placés avant 'val' + + + + Attributes are not permitted on interface implementations + Les attributs ne sont pas autorisés dans les implémentations d'interfaces + + + + Syntax error + Erreur de syntaxe + + + + Augmentations are not permitted on delegate type moduleDefns + Les augmentations ne sont pas autorisées sur le type délégué moduleDefns + + + + Unmatched 'class', 'interface' or 'struct' + 'class', 'interface' ou 'struct' non apparié + + + + A type definition requires one or more members or other declarations. If you intend to define an empty class, struct or interface, then use 'type ... = class end', 'interface end' or 'struct end'. + Une définition de type requiert un ou plusieurs membres ou d'autres déclarations. Si vous envisagez de définir une classe, un struct ou une interface vide, utilisez 'type ... = class end', 'interface end' ou 'struct end'. + + + + Unmatched 'with' or badly formatted 'with' block + 'with' non apparié ou format incorrect du bloc 'with' + + + + 'get', 'set' or 'get,set' required + 'get', 'set' ou 'get,set' requis + + + + Only class types may take value arguments + Seuls les types classe peuvent accepter des arguments de valeur + + + + Unmatched 'begin' + 'begin' non apparié + + + + Invalid declaration syntax + Syntaxe de déclaration non valide + + + + 'get' and/or 'set' required + 'get' et/ou 'set' requis + + + + Type annotations on property getters and setters must be given after the 'get()' or 'set(v)', e.g. 'with get() : string = ...' + Les annotations de type des méthodes getter et setter d'une propriété doivent être spécifiées après 'get()' ou 'set(v)', par exemple 'with get() : string = ...' + + + + A getter property is expected to be a function, e.g. 'get() = ...' or 'get(index) = ...' + Une propriété de méthode getter est censée être une fonction, par exemple 'get() = ...' ou 'get(index) = ...' + + + + Multiple accessibilities given for property getter or setter + Plusieurs accessibilités fournies pour la méthode getter ou setter de la propriété + + + + Property setters must be defined using 'set value = ', 'set idx value = ' or 'set (idx1,...,idxN) value = ... ' + Les méthodes setter d'une propriété doivent être définies via 'set value = ', 'set idx value = ' ou 'set (idx1,...,idxN) value = ... ' + + + + Interfaces always have the same visibility as the enclosing type + Les interfaces ont toujours la même visibilité que le type englobant + + + + Accessibility modifiers are not allowed on this member. Abstract slots always have the same visibility as the enclosing type. + Les modificateurs d'accessibilité ne sont pas autorisés sur ce membre. Les emplacements abstraits ont toujours la même visibilité que le type englobant. + + + + Attributes are not permitted on 'inherit' declarations + Les attributs ne sont pas autorisés dans les déclarations 'inherit' + + + + Accessibility modifiers are not permitted on an 'inherits' declaration + Les modificateurs d'accessibilité ne sont pas autorisés sur une déclaration 'inherits' + + + + 'inherit' declarations cannot have 'as' bindings. To access members of the base class when overriding a method, the syntax 'base.SomeMember' may be used; 'base' is a keyword. Remove this 'as' binding. + Les déclarations 'inherit' ne peuvent pas avoir de liaisons 'as'. Pour accéder aux membres de la classe de base lors de la substitution d'une méthode, la syntaxe 'base.SomeMember' peut être utilisée ; 'base' est un mot clé. Supprimez cette liaison 'as'. + + + + Attributes are not allowed here + Les attributs ne sont pas autorisés ici + + + + Accessibility modifiers are not permitted in this position for type abbreviations + Les modificateurs d'accessibilité ne sont pas autorisés à cette position pour les abréviations de type + + + + Accessibility modifiers are not permitted in this position for enum types + Les modificateurs d'accessibilité ne sont pas autorisés à cette position pour les types enum + + + + All enum fields must be given values + Tous les champs enum doivent recevoir des valeurs + + + + Accessibility modifiers are not permitted on inline assembly code types + Les modificateurs d'accessibilité ne sont pas autorisés sur les types de codes assembleur inline + + + + Unexpected identifier: '{0}' + Identificateur inattendu : '{0}' + + + + Accessibility modifiers are not permitted on union cases. Use 'type U = internal ...' or 'type U = private ...' to give an accessibility to the whole representation. + Les modificateurs d'accessibilité ne sont pas autorisés sur les cas d'union. Utilisez 'type U = internal ...' ou 'type U = private ...' pour fournir une accessibilité à l'ensemble de la représentation. + + + + Accessibility modifiers are not permitted on enumeration fields + Les modificateurs d'accessibilité ne sont pas autorisés sur les champs d'énumération + + + + Consider using a separate record type instead + Utilisez un autre type enregistrement à la place + + + + Accessibility modifiers are not permitted on record fields. Use 'type R = internal ...' or 'type R = private ...' to give an accessibility to the whole representation. + Les modificateurs d'accessibilité ne sont pas autorisés sur les champs de type enregistrement. Utilisez 'type R = internal ...' ou 'type R = private ...' pour fournir une accessibilité à l'ensemble de la représentation. + + + + The declaration form 'let ... and ...' for non-recursive bindings is not used in F# code. Consider using a sequence of 'let' bindings + La forme de déclaration 'let ... and ...' pour les liaisons non récursives n'est pas utilisée dans le code F#. Utilisez une séquence de liaisons 'let' + + + + Unmatched '(' + '(' non apparié + + + + Successive patterns should be separated by spaces or tupled + Les modèles successifs doivent être séparés par des espaces ou être basés sur des tuples + + + + No matching 'in' found for this 'let' + Impossible de trouver un 'in' correspondant pour ce 'let' + + + + Error in the return expression for this 'let'. Possible incorrect indentation. + Erreur dans l'expression de retour de ce 'let'. Mise en retrait éventuellement incorrecte. + + + + The block following this '{0}' is unfinished. Every code block is an expression and must have a result. '{1}' cannot be the final code element in a block. Consider giving this block an explicit result. + Le bloc qui suit ce '{0}' est inachevé. Chaque bloc de code est une expression et doit avoir un résultat. '{1}' ne peut pas être l'élément de code final d'un bloc. Donnez à ce bloc un résultat explicite. + + + + Incomplete conditional. Expected 'if <expr> then <expr>' or 'if <expr> then <expr> else <expr>'. + Expression conditionnelle incomplète. 'if <expr> then <expr>' ou 'if <expr> then <expr> else <expr>' était attendu. + + + + 'assert' may not be used as a first class value. Use 'assert <expr>' instead. + 'assert' ne peut pas être utilisé en tant que valeur de première classe. Utilisez 'assert <expr>' à la place. + + + + Identifier expected + Identificateur attendu + + + + 'in' or '=' expected + 'in' ou '=' attendu + + + + The use of '->' in sequence and computation expressions is limited to the form 'for pat in expr -> expr'. Use the syntax 'for ... in ... do ... yield...' to generate elements in more complex sequence expressions. + L'utilisation de '->' dans les expressions de séquence et de calcul est limitée à la forme 'for pat in expr -> expr'. Utilisez la syntaxe 'for ... in ... do ... yield...' pour générer des éléments dans des expressions de séquence plus complexes. + + + + Successive arguments should be separated by spaces or tupled, and arguments involving function or method applications should be parenthesized + Les arguments successifs doivent être séparés par des espaces ou être basés sur des tuples. En outre, les arguments impliquant des applications de fonction ou de méthode doivent être mis entre parenthèses + + + + Unmatched '[' + '[' non apparié + + + + Missing qualification after '.' + Qualification manquante après '.' + + + + In F# code you may use 'expr.[expr]'. A type annotation may be required to indicate the first expression is an array + En F#, vous pouvez utiliser 'expr.[expr]'. Une annotation de type peut être nécessaire pour indiquer que la première expression est un tableau + + + + Mismatched quotation, beginning with '{0}' + Incompatibilité de quotation, qui commence par '{0}' + + + + Unmatched '{0}' + '{0}' non apparié + + + + Unmatched '[|' + '[|' non apparié + + + + Unmatched '{{' + '{{' non apparié + + + + Field bindings must have the form 'id = expr;' + Les liaisons de champs doivent avoir la forme 'id = expr;' + + + + This member is not permitted in an object implementation + Ce membre n'est pas autorisé dans l'implémentation d'un objet + + + + Missing function body + Corps de la fonction manquant + + + + Syntax error in labelled type argument + Erreur de syntaxe dans l'argument de type étiqueté + + + + Unexpected infix operator in type expression + Opérateur infixe inattendu dans l'expression de type + + + + The syntax '(typ,...,typ) ident' is not used in F# code. Consider using 'ident<typ,...,typ>' instead + La syntaxe '(typ,...,typ) ident' n'est pas utilisée pour le code F#. Utilisez 'ident<typ,...,typ>' à la place + + + + Invalid literal in type + littéral non valide dans le type + + + + Unexpected infix operator in unit-of-measure expression. Legal operators are '*', '/' and '^'. + Opérateur infixe inattendu dans l'expression de l'unité de mesure. Les opérateurs conformes sont '*', '/' et '^'. + + + + Unexpected integer literal in unit-of-measure expression + Littéral d'entier inattendu dans l'expression de l'unité de mesure + + + + Syntax error: unexpected type parameter specification + Erreur de syntaxe : spécification du paramètre de type inattendue + + + + Mismatched quotation operator name, beginning with '{0}' + Incompatibilité du nom d'opérateur de quotation, qui commence par '{0}' + + + + Active pattern case identifiers must begin with an uppercase letter + Les identificateurs de casse du modèle actif doivent commencer par une lettre majuscule + + + + The '|' character is not permitted in active pattern case identifiers + Le caractère '|' n'est pas autorisé dans des identificateurs de cas de modèle actif + + + + Denominator must not be 0 in unit-of-measure exponent + La valeur de l’exposant en unité de mesure du dénominateur ne doit pas être égale à 0 + + + + No '=' symbol should follow a 'namespace' declaration + Aucun symbole '=' ne doit suivre une déclaration 'namespace' + + + + The syntax 'module ... = struct .. end' is not used in F# code. Consider using 'module ... = begin .. end' + La syntaxe 'module ... = struct .. end' n'est pas utilisée pour le code F#. Utilisez 'module ... = begin .. end' + + + + The syntax 'module ... : sig .. end' is not used in F# code. Consider using 'module ... = begin .. end' + La syntaxe 'module ... : sig .. end' n'est pas utilisée pour le code F#. Utilisez 'module ... = begin .. end' + + + + A static field was used where an instance field is expected + Un champ statique a été utilisé à l'emplacement où un champ d'instance est attendu + + + + Method '{0}' is not accessible from this code location + La méthode '{0}' n'est pas accessible à partir de cet emplacement du code + + + + Implicit product of measures following / + Produit implicite de mesures après / + + + + Unexpected SynMeasure.Anon + SynMeasure.Anon inattendu + + + + Non-zero constants cannot have generic units. For generic zero, write 0.0<_>. + Les constantes différentes de zéro ne peuvent pas avoir d'unités génériques. Pour un zéro générique, écrivez 0.0<_>. + + + + In sequence expressions, results are generated using 'yield' + Dans les expressions de séquence, les résultats sont générés à l'aide de 'yield' + + + + Unexpected big rational constant + Constante rationnelle importante inattendue + + + + Units-of-measure supported only on float, float32, decimal and signed integer types + Unités de mesure prises en charge uniquement pour les types float, float32, decimal et integer signés + + + + Unexpected Const_uint16array + Const_uint16array inattendu + + + + Unexpected Const_bytearray + Const_bytearray inattendu + + + + A parameter with attributes must also be given a name, e.g. '[<Attribute>] Name : Type' + Un paramètre avec des attributs doit également être nommé, par exemple '[<Attribute>] Name : Type' + + + + Return values cannot have names + Les valeurs de retour ne peuvent pas avoir de noms + + + + MemberKind.PropertyGetSet only expected in parse trees + MemberKind.PropertyGetSet attendu uniquement dans les arborescences d'analyse + + + + Namespaces cannot contain values. Consider using a module to hold your value declarations. + Les espaces de noms ne peuvent pas contenir de valeurs. Utilisez un module pour conserver vos déclarations de valeur. + + + + Namespaces cannot contain extension members except in the same file and namespace declaration group where the type is defined. Consider using a module to hold declarations of extension members. + Les espaces de noms ne peuvent pas contenir de membres d'extension sauf dans le groupe de déclarations de fichiers et d'espaces de noms où le type est défini. Utilisez un module pour conserver les déclarations des membres d'extension. + + + + Multiple visibility attributes have been specified for this identifier + Plusieurs attributs de visibilité ont été spécifiés pour cet identificateur + + + + Multiple visibility attributes have been specified for this identifier. 'let' bindings in classes are always private, as are any 'let' bindings inside expressions. + Plusieurs attributs de visibilité ont été spécifiés pour cet identificateur. Les liaisons 'let' dans les classes sont toujours privées, à l'instar des liaisons 'let' dans les expressions. + + + + The name '({0})' 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 '{1}' instead. + Le nom '({0})' ne doit pas être utilisé en tant que nom de membre. Pour définir une sémantique de comparaison pour un type, implémentez l'interface 'System.IComparable'. Si vous définissez un membre statique à utiliser à partir d'autres langages CLI, utilisez le nom '{1}' à la place. + + + + The name '({0})' 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 '{1}' instead. + Le nom '({0})' ne doit pas être utilisé en tant que nom de membre. Pour définir une sémantique d'égalité pour un type, substituez le membre 'Object.Equals'. Si vous définissez un membre statique à utiliser à partir d'autres langages CLI, utilisez le nom '{1}' à la place. + + + + The name '({0})' should not be used as a member name. If defining a static member for use from other CLI languages then use the name '{1}' instead. + Le nom '({0})' ne doit pas être utilisé en tant que nom de membre. Si vous définissez un membre statique à utiliser à partir d'autres langages CLI, utilisez le nom '{1}' à la place. + + + + The name '({0})' should not be used as a member name because it is given a standard definition in the F# library over fixed types + Le nom '({0})' ne doit pas être utilisé en tant que nom de membre, car il reçoit une définition standard dans la bibliothèque F# sur les types fixes + + + + The '{0}' operator should not normally be redefined. To define overloaded comparison semantics for a particular type, implement the 'System.IComparable' interface in the definition of that type. + Normalement, l'opérateur '{0}' ne doit pas être redéfini. Pour définir une sémantique de comparaison surchargée pour un type particulier, implémentez l'interface 'System.IComparable' dans la définition de ce type. + + + + The '{0}' operator should not normally be redefined. To define equality semantics for a type, override the 'Object.Equals' member in the definition of that type. + Normalement, l'opérateur '{0}' ne doit pas être redéfini. Pour définir une sémantique d'égalité pour un type, substituez le membre 'Object.Equals' dans la définition de ce type. + + + + The '{0}' operator should not normally be redefined. Consider using a different operator name + Normalement, l'opérateur '{0}' ne doit pas être redéfini. Utilisez un autre nom d'opérateur + + + + The '{0}' operator cannot be redefined. Consider using a different operator name + Impossible de redéfinir l'opérateur '{0}'. Utilisez un autre nom d'opérateur + + + + Expected module or namespace parent {0} + Parent de module ou d'espace de noms attendu {0} + + + + The struct, record or union type '{0}' implements the interface 'System.IComparable' explicitly. You must apply the 'CustomComparison' attribute to the type. + Le type struct, enregistrement ou union '{0}' implémente explicitement l'interface 'System.IComparable'. Vous devez appliquer l'attribut 'CustomComparison' au type. + + + + The struct, record or union type '{0}' implements the interface 'System.IComparable<_>' explicitly. You must apply the 'CustomComparison' attribute to the type, and should also provide a consistent implementation of the non-generic interface System.IComparable. + Le type struct, enregistrement ou union '{0}' implémente explicitement l'interface 'System.IComparable<_>'. Vous devez appliquer l'attribut 'CustomComparison' au type et fournir une implémentation cohérente de l'interface non générique System.IComparable. + + + + The struct, record or union type '{0}' implements the interface 'System.IStructuralComparable' explicitly. Apply the 'CustomComparison' attribute to the type. + Le type struct, enregistrement ou union '{0}' implémente explicitement l'interface 'System.IStructuralComparable'. Appliquez l'attribut 'CustomComparison' au type. + + + + This record contains fields from inconsistent types + Cet enregistrement contient des champs de types incohérents + + + + DLLImport stubs cannot be inlined + Impossible d'utiliser des stubs DLLImport inline + + + + Structs may only bind a 'this' parameter at member declarations + Les structs ne peuvent lier un paramètre 'this' que dans les déclarations de membre + + + + Unexpected expression at recursive inference point + Expression inattendue au point d'inférence récursif + + + + This code is less generic than required by its annotations because the explicit type variable '{0}' could not be generalized. It was constrained to be '{1}'. + Ce code est moins générique que ne l'exigent ses annotations, car il est impossible de généraliser la variable de type explicite '{0}'. Il a été contraint à être '{1}'. + + + + One or more of the explicit class or function type variables for this binding could not be generalized, because they were constrained to other types + Impossible de généraliser une ou plusieurs variables de type classe ou fonction explicite pour cette liaison, car elles sont contraintes par d'autres types + + + + A generic type parameter has been used in a way that constrains it to always be '{0}' + Un paramètre de type générique a été utilisé d'une façon qui le contraint à être toujours '{0}' + + + + This type parameter has been used in a way that constrains it to always be '{0}' + Ce paramètre de type a été utilisé d'une façon qui le contraint à être toujours '{0}' + + + + The type parameters inferred for this value are not stable under the erasure of type abbreviations. This is due to the use of type abbreviations which drop or reorder type parameters, e.g. \n\ttype taggedInt<'a> = int or\n\ttype swap<'a,'b> = 'b * 'a.\nConsider declaring the type parameters for this value explicitly, e.g.\n\tlet f<'a,'b> ((x,y) : swap<'b,'a>) : swap<'a,'b> = (y,x). + Les paramètres de type déduits pour cette valeur ne sont pas stables sous l'action de suppression des abréviations de type. Cela est dû à l'utilisation des abréviations de type qui suppriment ou réorganisent les paramètres de type, par exemple \n\ttype taggedInt<'a> = int or\n\ttype swap<'a,'b> = 'b * 'a.\nDéclarez explicitement les paramètres de type pour cette valeur, par exemple\n\tlet f<'a,'b> ((x,y) : swap<'b,'a>) : swap<'a,'b> = (y,x). + + + + Explicit type parameters may only be used on module or member bindings + Les paramètres de type explicite ne peuvent être utilisés que sur les liaisons de module ou de membre + + + + You must explicitly declare either all or no type parameters when overriding a generic abstract method + Vous devez déclarer explicitement tous les paramètres de type, ou aucun d'entre eux, lors de la substitution d'une méthode abstraite générique + + + + The field labels and expected type of this record expression or pattern do not uniquely determine a corresponding record type + Les étiquettes et le type attendu du champ de cette expression d'enregistrement ou ce modèle d'enregistrement ne déterminent pas de manière unique un type enregistrement correspondant + + + + The field '{0}' appears twice in this record expression or pattern + Le champ '{0}' apparaît à deux reprises dans cette expression ou ce modèle d'enregistrement + + + + Unknown union case + Cas d'union inconnu + + + + This code is not sufficiently generic. The type variable {0} could not be generalized because it would escape its scope. + Ce code n'est pas suffisamment générique. Impossible de généraliser la variable de type {0}, car elle sort de sa portée. + + + + A property cannot have explicit type parameters. Consider using a method instead. + Une propriété ne peut pas avoir de paramètres de type explicite. Utilisez une méthode à la place. + + + + A constructor cannot have explicit type parameters. Consider using a static construction method instead. + Un constructeur ne peut pas avoir de paramètres de type explicite. Utilisez une méthode de construction statique à la place. + + + + This instance member needs a parameter to represent the object being invoked. Make the member static or use the notation 'member x.Member(args) = ...'. + Ce membre d'instance nécessite un paramètre pour représenter l'objet appelé. Rendez le membre statique ou utilisez la notation 'member x.Member(args) = ...'. + + + + Unexpected source-level property specification in syntax tree + Spécification de propriété au niveau source inattendue dans l'arborescence de syntaxe + + + + A static initializer requires an argument + Un initialiseur statique requiert un argument + + + + An object constructor requires an argument + Un constructeur d'objet requiert un argument + + + + This static member should not have a 'this' parameter. Consider using the notation 'member Member(args) = ...'. + Ce membre statique ne doit pas avoir de paramètre 'this'. Utilisez la notation 'member Member(args) = ...'. + + + + An explicit static initializer should use the syntax 'static new(args) = expr' + Un initialiseur statique explicite doit utiliser la syntaxe 'static new(args) = expr' + + + + An explicit object constructor should use the syntax 'new(args) = expr' + Un constructeur d'objet explicite doit utiliser la syntaxe 'new(args) = expr' + + + + Unexpected source-level property specification + Spécification de propriété au niveau source inattendue + + + + This form of object expression is not used in F#. Use 'member this.MemberName ... = ...' to define member implementations in object expressions. + Cette forme d'expression d'objet n'est pas utilisée en F#. Utilisez 'member this.MemberName ... = ...' pour définir des implémentations de membres dans les expressions d'objet. + + + + Invalid declaration + Déclaration non valide + + + + Attributes are not allowed within patterns + Les attributs ne sont pas autorisés dans les modèles + + + + The generic function '{0}' must be given explicit type argument(s) + La fonction générique '{0}' doit recevoir un ou plusieurs arguments de type explicite + + + + The method or function '{0}' should not be given explicit type argument(s) because it does not declare its type parameters explicitly + La méthode ou fonction '{0}' ne doit pas recevoir d'arguments de type explicite, car elle ne déclare pas explicitement ses paramètres de type + + + + This value, type or method expects {0} type parameter(s) but was given {1} + Cette valeur, ce type ou cette méthode attend {0} paramètre(s) de type mais en a reçu {1} + + + + The default, zero-initializing constructor of a struct type may only be used if all the fields of the struct type admit default initialization + Le constructeur d'initialisation à zéro par défaut d'un type struct ne peut être utilisé que si tous les champs du type struct admettent l'initialisation par défaut + + + + Couldn't find Dispose on IDisposable, or it was overloaded + Impossible de trouver Dispose sur IDisposable, ou il a été surchargé + + + + This value is not a literal and cannot be used in a pattern + Cette valeur n'est pas un littéral. Impossible de l'utiliser dans un modèle + + + + This field is readonly + Ce champ est en lecture seule + + + + Named arguments must appear after all other arguments + Les arguments nommés doivent apparaître après tous les autres arguments + + + + This function value is being used to construct a delegate type whose signature includes a byref argument. You must use an explicit lambda expression taking {0} arguments. + Cette valeur de fonction est utilisée pour construire un type délégué dont la signature comprend un argument byref. Vous devez utiliser une expression lambda explicite qui accepte {0} arguments. + + + + The type '{0}' is not a type whose values can be enumerated with this syntax, i.e. is not compatible with either seq<_>, IEnumerable<_> or IEnumerable and does not have a GetEnumerator method + Le type '{0}' n'est pas un type dont les valeurs peuvent être énumérées avec cette syntaxe. En d'autres termes, il n'est pas compatible avec seq<_>, IEnumerable<_> ou IEnumerable, et n'a pas de méthode GetEnumerator + + + + This recursive binding uses an invalid mixture of recursive forms + Cette liaison récursive utilise une combinaison non valide de formes récursives + + + + This is not a valid object construction expression. Explicit object constructors must either call an alternate constructor or initialize all fields of the object and specify a call to a super class constructor. + Expression de construction d'objet non valide. Les constructeurs d'objets doivent appeler un autre constructeur ou initialiser tous les champs de l'objet et spécifier un appel à un constructeur de superclasse. + + + + Invalid constraint + Contrainte non valide + + + + Invalid constraint: the type used for the constraint is sealed, which means the constraint could only be satisfied by at most one solution + Contrainte non valide : le type utilisé pour la contrainte est sealed, ce qui signifie que la contrainte ne peut être satisfaite que par une seule solution + + + + An 'enum' constraint must be of the form 'enum<type>' + Une contrainte 'enum' doit être sous la forme 'enum<type>' + + + + 'new' constraints must take one argument of type 'unit' and return the constructed type + Les contraintes 'new' doivent accepter un argument de type 'unit' et retourner le type construit + + + + This property has an invalid type. Properties taking multiple indexer arguments should have types of the form 'ty1 * ty2 -> ty3'. Properties returning functions should have types of the form '(ty1 -> ty2)'. + Cette propriété a un type non valide. Les propriétés qui acceptent plusieurs arguments d'indexeur doivent avoir des types sous la forme 'ty1 * ty2 -> ty3'. Les propriétés qui retournent des fonctions doivent avoir des types sous la forme '(ty1 -> ty2)'. + + + + Expected unit-of-measure parameter, not type parameter. Explicit unit-of-measure parameters must be marked with the [<Measure>] attribute. + Paramètre d'unité de mesure attendu à la place d'un paramètre de type. Les paramètres d'unité de mesure explicites doivent être marqués avec l'attribut [<Measure>]. + + + + Expected type parameter, not unit-of-measure parameter + Paramètre de type attendu à la place d'un paramètre d'unité de mesure + + + + Expected type, not unit-of-measure + Type attendu à la place d'une unité de mesure + + + + Expected unit-of-measure, not type + Unité de mesure attendue à la place d'un type + + + + Units-of-measure cannot be used as prefix arguments to a type. Rewrite as postfix arguments in angle brackets. + Impossible d'utiliser des unités de mesure en tant qu'arguments de préfixe pour un type. Réécrivez-les en tant qu'arguments postfixés dans des crochets pointus. + + + + Unit-of-measure cannot be used in type constructor application + Impossible d'utiliser l'unité de mesure dans l'application de constructeur de type + + + + This control construct may only be used if the computation expression builder defines a '{0}' method + Cette construction de contrôle ne peut être utilisée que si le générateur d'expressions de calcul définit une méthode '{0}' + + + + This type has no nested types + Ce type n'a aucun type imbriqué + + + + Unexpected {0} in type expression + {0} inattendu dans l'expression de type + + + + Type parameter cannot be used as type constructor + Impossible d'utiliser le paramètre de type en tant que constructeur de type + + + + Illegal syntax in type expression + Syntaxe non conforme dans l'expression de type + + + + Anonymous unit-of-measure cannot be nested inside another unit-of-measure expression + Impossible d'imbriquer une unité de mesure anonyme dans une autre expression d'unité de mesure + + + + Anonymous type variables are not permitted in this declaration + Les variables de type anonyme ne sont pas autorisées dans cette déclaration + + + + Unexpected / in type + / inattendu dans le type + + + + Unexpected type arguments + Arguments de type inattendus + + + + Optional arguments are only permitted on type members + Les arguments facultatifs ne sont autorisés que sur les membres de type + + + + Name '{0}' not bound in pattern context + Nom '{0}' non lié dans le contexte du modèle + + + + Non-primitive numeric literal constants cannot be used in pattern matches because they can be mapped to multiple different types through the use of a NumericLiteral module. Consider using replacing with a variable, and use 'when <variable> = <constant>' at the end of the match clause. + Impossible d'utiliser les constantes littérales numériques non primitives dans les critères spéciaux, car elles peuvent être mappées à plusieurs types différents via l'utilisation d'un module NumericLiteral. Utilisez une variable en remplacement et utilisez 'when <variable> = <constante>' à la fin de la clause de correspondance. + + + + Type arguments cannot be specified here + Impossible de spécifier des arguments de type ici + + + + Only active patterns returning exactly one result may accept arguments + Seuls les modèles actifs qui retournent un seul résultat peuvent accepter des arguments + + + + Invalid argument to parameterized pattern label + Argument non valide pour l'étiquette de modèle paramétrable + + + + Internal error. Invalid index into active pattern array + Erreur interne. Index non valide dans le tableau du modèle actif + + + + This union case does not take arguments + Ce cas d'union n'accepte pas d'arguments + + + + This union case takes one argument + Ce cas d'union accepte un argument + + + + This union case expects {0} arguments in tupled form + Ce cas d'union attend {0} arguments basés sur des tuples + + + + Field '{0}' is not static + Le champ '{0}' n'est pas statique + + + + This field is not a literal and cannot be used in a pattern + Ce champ n'est pas un littéral. Impossible de l'utiliser dans un modèle + + + + This is not a variable, constant, active recognizer or literal + Ceci n'est pas une variable, une constante, un module de reconnaissance actif ou un littéral + + + + This is not a valid pattern + Modèle non valide + + + + Character range matches have been removed in F#. Consider using a 'when' pattern guard instead. + Les correspondances de plages de caractères ont été supprimées de F#. Utilisez une garde par modèle 'when' à la place. + + + + Illegal pattern + Modèle non conforme + + + + Syntax error - unexpected '?' symbol + Erreur de syntaxe - symbole '?' inattendu + + + + Expected {0} expressions, got {1} + {0} expressions attendues, {1} obtenue(s) + + + + TcExprUndelayed: delayed + TcExprUndelayed : différé + + + + This expression form may only be used in sequence and computation expressions + Cette forme d'expression ne peut être utilisée que dans des expressions de séquence et de calcul + + + + Invalid object expression. Objects without overrides or interfaces should use the expression form 'new Type(args)' without braces. + Expression d'objet non valide. Les objets sans substitutions ou interfaces doivent utiliser la forme d'expression 'new Type(args)' sans accolades. + + + + Invalid object, sequence or record expression + Expression d'objet, de séquence ou d'enregistrement non valide + + + + Invalid record, sequence or computation expression. Sequence expressions should be of the form 'seq {{ ... }}' + Expression d'enregistrement, de séquence ou de calcul non valide. Les expressions de séquence doivent avoir le format 'seq {{ ... }}' + + + + This list or array expression includes an element of the form 'if ... then ... else'. Parenthesize this expression to indicate it is an individual element of the list or array, to disambiguate this from a list generated using a sequence expression + Cette expression de liste ou de tableau comprend un élément sous la forme 'if ... then ... else'. Mettez cette expression entre parenthèses pour indiquer qu'il s'agit d'un élément individuel de la liste ou du tableau, afin de lever l'ambigüité par rapport à une liste générée à l'aide d'une expression de séquence + + + + Unable to parse format string '{0}' + Impossible d'analyser la chaîne de format '{0}' + + + + This list expression exceeds the maximum size for list literals. Use an array for larger literals and call Array.ToList. + Cette expression de liste dépasse la taille maximale des littéraux de liste. Utilisez un tableau pour des littéraux plus importants et appelez Array.ToList. + + + + The expression form 'expr then expr' may only be used as part of an explicit object constructor + La forme d'expression 'expr then expr' ne peut être utilisée que dans le cadre d'un constructeur d'objet explicite + + + + Named arguments cannot be given to member trait calls + Impossible de fournir des arguments nommés aux appels de membres de trait + + + + This is not a valid name for an enumeration case + Nom non valide pour un cas d'énumération + + + + This field is not mutable + Ce champ n'est pas mutable + + + + This construct may only be used within list, array and sequence expressions, e.g. expressions of the form 'seq {{ ... }}', '[ ... ]' or '[| ... |]'. These use the syntax 'for ... in ... do ... yield...' to generate elements + Cette construction ne peut être utilisée que dans des expressions de liste, de tableau et de séquence, par exemple des expressions sous la forme 'seq {{ ... }}', '[ ... ]' ou '[| ... |]'. Celles-ci utilisent la syntaxe 'for ... in ... do ... yield...' pour générer des éléments + + + + This construct may only be used within computation expressions. To return a value from an ordinary function simply write the expression without 'return'. + Cette construction ne peut être utilisée que dans des expressions de calcul. Pour retourner une valeur à partir d'une fonction ordinaire, écrivez simplement l'expression sans 'return'. + + + + This construct may only be used within sequence or computation expressions + Cette construction ne peut être utilisée que dans des expressions de calcul ou de séquence + + + + This construct may only be used within computation expressions + Cette construction ne peut être utilisée que dans des expressions de calcul + + + + Invalid indexer expression + Expression d'indexeur non valide + + + + The operator 'expr.[idx]' has been used on an object of indeterminate type based on information prior to this program point. Consider adding further type constraints + L'opérateur 'expr.[idx]' a été utilisé sur un objet de type indéterminé basé sur des informations situées avant ce point du programme. Ajoutez des contraintes de type supplémentaires + + + + Cannot inherit from a variable type + Impossible d'hériter d'un type variable + + + + Calls to object constructors on type parameters cannot be given arguments + Impossible de fournir des arguments aux appels de constructeurs d'objets sur les paramètres de type + + + + The 'CompiledName' attribute cannot be used with this language element + Impossible d'utiliser l'attribut 'CompiledName' avec cet élément de langage + + + + '{0}' may only be used with named types + '{0}' ne peut être utilisé qu'avec des types nommés + + + + 'inherit' cannot be used on interface types. Consider implementing the interface by using 'interface ... with ... end' instead. + Impossible d'utiliser 'inherit' sur les types interface. Implémentez l'interface avec 'interface ... with ... end' à la place. + + + + 'new' cannot be used on interface types. Consider using an object expression '{{ new ... with ... }}' instead. + Impossible d'utiliser 'new' sur les types interface. Utilisez une expression d'objet '{{ new ... with ... }}' à la place. + + + + Instances of this type cannot be created since it has been marked abstract or not all methods have been given implementations. Consider using an object expression '{{ new ... with ... }}' instead. + Impossible de créer des instances de ce type, car il est marqué comme abstract, ou toutes les méthodes n'ont pas reçu d'implémentations. Utilisez une expression d'objet '{{ new ... with ... }}' à la place. + + + + It is recommended that objects supporting the IDisposable interface are created using the syntax 'new Type(args)', rather than 'Type(args)' or 'Type' as a function value representing the constructor, to indicate that resources may be owned by the generated value + Il est recommandé que les objets prenant en charge l'interface IDisposable soient créés avec la syntaxe 'new Type(args)', au lieu de 'Type(args)' ou de 'Type' comme une valeur de fonction représentant le constructeur, pour indiquer que des ressources peuvent être détenues par la valeur générée + + + + '{0}' may only be used to construct object types + '{0}' ne peut être utilisé que pour construire des types d'objets + + + + Constructors for the type '{0}' must directly or indirectly call its implicit object constructor. Use a call to the implicit object constructor instead of a record expression. + Les constructeurs du type '{0}' doivent directement ou indirectement appeler son constructeur d'objet implicite. Utilisez un appel au constructeur d'objet implicite à la place d'une expression d'enregistrement. + + + + The field '{0}' has been given a value, but is not present in the type '{1}' + Le champ '{0}' a une valeur, mais n'est pas présent dans le type '{1}' + + + + No assignment given for field '{0}' of type '{1}' + Aucune assignation spécifiée pour le champ '{0}' de type '{1}' + + + + Extraneous fields have been given values + Des champs superflus ont reçu des valeurs + + + + Only overrides of abstract and virtual members may be specified in object expressions + Seules les substitutions de membres abstraits et virtuels peuvent être spécifiées dans les expressions d'objet + + + + The member '{0}' does not correspond to any abstract or virtual method available to override or implement. + Le membre '{0}' ne correspond à aucune méthode abstraite ou virtuelle pouvant être substituée ou implémentée. + + + + The type {0} contains the member '{1}' but it is not a virtual or abstract method that is available to override or implement. + Le type {0} contient le membre '{1}', mais il ne s'agit pas d'une méthode virtuelle ou abstraite pouvant être substituée ou implémentée. + + + + The member '{0}' does not accept the correct number of arguments. {1} argument(s) are expected, but {2} were given. The required signature is '{3}'.{4} + Le membre '{0}' n'accepte pas le nombre approprié d'arguments. {1} argument(s) attendu(s) mais {2} fournis. La signature nécessaire est '{3}'.{4} + + + + The member '{0}' does not accept the correct number of arguments. One overload accepts {1} arguments, but {2} were given. The required signature is '{3}'.{4} + Le membre '{0}' n'accepte pas le nombre approprié d'arguments. Une surcharge accepte {1} arguments, mais {2} ont été fournis. La signature nécessaire est '{3}'.{4} + + + + A simple method name is required here + Un nom de méthode simple est requis ici + + + + The types System.ValueType, System.Enum, System.Delegate, System.MulticastDelegate and System.Array cannot be used as super types in an object expression or class + Impossible d'utiliser les types System.ValueType, System.Enum, System.Delegate, System.MulticastDelegate et System.Array en tant que super types dans une classe ou une expression d'objet + + + + 'new' must be used with a named type + 'new' doit être utilisé avec un type nommé + + + + Cannot create an extension of a sealed type + Impossible de créer une extension d'un type sealed + + + + No arguments may be given when constructing a record value + Aucun argument ne peut être fourni lors de la construction d'une valeur d'enregistrement + + + + Interface implementations cannot be given on construction expressions + Impossible de fournir des implémentations d'interfaces pour des expressions de construction + + + + Object construction expressions may only be used to implement constructors in class types + Les expressions de construction d'objet ne peuvent être utilisées que pour implémenter des constructeurs dans les types classe + + + + Only simple bindings of the form 'id = expr' can be used in construction expressions + Seules les liaisons simples sous la forme 'id = expr' peuvent être utilisées dans les expressions de construction + + + + Objects must be initialized by an object construction expression that calls an inherited object constructor and assigns a value to each field + Les objets doivent être initialisés par une expression de construction d'objet qui appelle un constructeur d'objet hérité et assigne une valeur à chaque champ + + + + Expected an interface type + Type interface attendu + + + + Constructor expressions for interfaces do not take arguments + Les expressions de constructeur pour les interfaces n'acceptent pas d'arguments + + + + This object constructor requires arguments + Ce constructeur d'objet requiert des arguments + + + + 'new' may only be used with object constructors + 'new' ne peut être utilisé qu'avec des constructeurs d'objets + + + + At least one override did not correctly implement its corresponding abstract member + Au moins une substitution n'a pas implémenté correctement son membre abstrait correspondant + + + + This numeric literal requires that a module '{0}' defining functions FromZero, FromOne, FromInt32, FromInt64 and FromString be in scope + Ce littéral numérique requiert qu'un module '{0}' définissant les fonctions FromZero, FromOne, FromInt32, FromInt64 et FromString se trouve dans la portée + + + + Invalid record construction + Construction d'enregistrement non valide + + + + The expression form {{ expr with ... }} may only be used with record types. To build object types use {{ new Type(...) with ... }} + La forme d'expression {{ expr with ... }} ne peut être utilisée qu'avec des types enregistrement. Pour générer des types d'objets, utilisez {{ new Type(...) with ... }} + + + + The inherited type is not an object model type + Le type hérité n'est pas un type de modèle objet + + + + Object construction expressions (i.e. record expressions with inheritance specifications) may only be used to implement constructors in object model types. Use 'new ObjectType(args)' to construct instances of object model types outside of constructors + Les expressions de construction d'objet (c'est-à-dire les expressions d'enregistrement avec des spécifications d'héritage) ne peuvent être utilisées que pour implémenter des constructeurs dans les types de modèles objet. Utilisez 'new ObjectType(args)' pour construire des instances de types de modèles objet hors des constructeurs + + + + '{{ }}' is not a valid expression. Records must include at least one field. Empty sequences are specified by using Seq.empty or an empty list '[]'. + '{{ }}' n'est pas une expression valide. Les enregistrements doivent inclure au moins un champ. Les séquences vides sont spécifiées via Seq.empty ou une liste vide '[]'. + + + + This type is not a record type. Values of class and struct types must be created using calls to object constructors. + Ce type n'est pas un type enregistrement. Les valeurs des types classe et struct doivent être créées à l'aide d'appels à des constructeurs d'objets. + + + + This type is not a record type + Ce type n'est pas un type enregistrement + + + + This construct is ambiguous as part of a computation expression. Nested expressions may be written using 'let _ = (...)' and nested computations using 'let! res = builder {{ ... }}'. + Cette construction est ambiguë dans le cadre d'une expression de calcul. Les expressions imbriquées peuvent être écrites avec 'let _ = (...)' et les calculs imbriqués avec 'let! res = builder {{ ... }}'. + + + + This construct is ambiguous as part of a sequence expression. Nested expressions may be written using 'let _ = (...)' and nested sequences using 'yield! seq {{... }}'. + Cette construction est ambiguë dans le cadre d'une expression de séquence. Les expressions imbriquées peuvent être écrites avec 'let _ = (...)' et les séquences imbriquées avec 'yield! seq {{... }}'. + + + + 'do!' cannot be used within sequence expressions + Impossible d'utiliser 'do!' dans des expressions de séquence + + + + The use of 'let! x = coll' in sequence expressions is not permitted. Use 'for x in coll' instead. + L'utilisation de 'let! x = coll' dans les expressions de séquence n'est pas autorisée. Utilisez 'for x in coll' à la place. + + + + 'try'/'with' cannot be used within sequence expressions + Impossible d'utiliser 'try'/'with' dans des expressions de séquence + + + + In sequence expressions, multiple results are generated using 'yield!' + Dans les expressions de séquence, les résultats multiples sont générés à l'aide de 'yield!' + + + + Invalid assignment + Assignation non valide + + + + Invalid use of a type name + Utilisation non valide d'un nom de type + + + + This type has no accessible object constructors + Ce type n'a aucun constructeur d'objet accessible + + + + Invalid use of an interface type + Utilisation non valide d'un type interface + + + + Invalid use of a delegate constructor. Use the syntax 'new Type(args)' or just 'Type(args)'. + Utilisation non valide d'un constructeur délégué. Utilisez la syntaxe 'new Type(args)' ou simplement 'Type(args)'. + + + + Property '{0}' is not static + La propriété '{0}' n'est pas statique + + + + Property '{0}' is not readable + La propriété '{0}' n'est pas lisible + + + + This lookup cannot be used here + Impossible d'utiliser cette recherche ici + + + + Property '{0}' is static + La propriété '{0}' est statique + + + + Property '{0}' cannot be set + Impossible de définir la propriété '{0}' + + + + Constructors must be applied to arguments and cannot be used as first-class values. If necessary use an anonymous function '(fun arg1 ... argN -> new Type(arg1,...,argN))'. + Les constructeurs doivent être appliqués aux arguments et ne peuvent pas être utilisés en tant que valeurs de première classe. Si nécessaire, utilisez une fonction anonyme '(fun arg1 ... argN -> new Type(arg1,...,argN))'. + + + + The syntax 'expr.id' may only be used with record labels, properties and fields + La syntaxe 'expr.id' ne peut être utilisée qu'avec des étiquettes d'enregistrement, des propriétés et des champs + + + + Event '{0}' is static + L'événement '{0}' est statique + + + + Event '{0}' is not static + L'événement '{0}' n'est pas statique + + + + The named argument '{0}' did not match any argument or mutable property + L'argument nommé '{0}' ne correspond à aucun argument, ni à aucune propriété mutable + + + + One or more of the overloads of this method has curried arguments. Consider redesigning these members to take arguments in tupled form. + Une ou plusieurs des surcharges de cette méthode comporte des arguments curryfiés. Recréez ces membres pour qu'ils acceptent des arguments basés sur des tuples. + + + + The unnamed arguments do not form a prefix of the arguments of the method called + Les arguments sans nom ne forment pas le préfixe des arguments de la méthode nommée + + + + Static optimization conditionals are only for use within the F# library + Les conditions de l'optimisation statique sont uniquement utilisables dans la bibliothèque F# + + + + The corresponding formal argument is not optional + L'argument formel correspondant n'est pas facultatif + + + + Invalid optional assignment to a property or field + Assignation facultative non valide pour une propriété ou un champ + + + + A delegate constructor must be passed a single function value + Une valeur de fonction unique doit être passée à un constructeur délégué + + + + A binding cannot be marked both 'use' and 'rec' + Impossible de marquer une liaison à la fois 'use' et 'rec' + + + + The 'VolatileField' attribute may only be used on 'let' bindings in classes + L'attribut 'VolatileField' ne peut être utilisé que sur les liaisons 'let' dans les classes + + + + Attributes are not permitted on 'let' bindings in expressions + Les attributs ne sont pas autorisés sur les liaisons 'let' dans les expressions + + + + The 'DefaultValue' attribute may only be used on 'val' declarations + L'attribut 'DefaultValue' ne peut être utilisé que sur les déclarations 'val' + + + + The 'ConditionalAttribute' attribute may only be used on members + L'attribut 'ConditionalAttribute' ne peut être utilisé que sur des membres + + + + This is not a valid name for an active pattern + Nom non valide pour un modèle actif + + + + The 'EntryPointAttribute' attribute may only be used on function definitions in modules + L'attribut 'EntryPointAttribute' ne peut être utilisé que sur les définitions de fonctions dans les modules + + + + Mutable values cannot be marked 'inline' + Impossible de marquer des valeurs mutables 'inline' + + + + Mutable values cannot have generic parameters + Les valeurs mutables ne peuvent pas avoir de paramètres génériques + + + + Mutable function values should be written 'let mutable f = (fun args -> ...)' + Les valeurs de fonction mutables doivent être écrites 'let mutable f = (fun args -> ...)' + + + + Only functions may be marked 'inline' + Seules les fonctions peuvent être marquées comme 'inline' + + + + A literal value cannot be given the [<ThreadStatic>] or [<ContextStatic>] attributes + Impossible de donner à une valeur littérale les attributs [<ThreadStatic>] ou [<ContextStatic>] + + + + A literal value cannot be marked 'mutable' + Impossible de marquer une valeur littérale 'mutable' + + + + A literal value cannot be marked 'inline' + Impossible de marquer une valeur littérale 'inline' + + + + Literal values cannot have generic parameters + Les valeurs littérales ne peuvent pas avoir de paramètres génériques + + + + This is not a valid constant expression + Expression constante non valide + + + + This type is not accessible from this code location + Ce type n'est pas accessible à partir de cet emplacement du code + + + + Unexpected condition in imported assembly: failed to decode AttributeUsage attribute + Condition inattendue dans l'assembly importé : impossible de décoder l'attribut AttributeUsage + + + + Unrecognized attribute target. Valid attribute targets are 'assembly', 'module', 'type', 'method', 'property', 'return', 'param', 'field', 'event', 'constructor'. + Cible d'attribut non reconnue. Les cibles d'attributs valides sont 'assembly', 'module', 'type', 'method', 'property', 'return', 'param', 'field', 'event', 'constructor'. + + + + This attribute is not valid for use on this language element. Assembly attributes should be attached to a 'do ()' declaration, if necessary within an F# module. + L'utilisation de cet attribut n'est pas valide sur cet élément de langage. Les attributs d'assembly doivent être attachés à une déclaration 'do ()', si nécessaire, dans un module F#. + + + + This attribute is not valid for use on this language element + L'utilisation de cet attribut n'est pas valide sur cet élément de langage + + + + Optional arguments cannot be used in custom attributes + Impossible d'utiliser les arguments facultatifs dans les attributs personnalisés + + + + This property cannot be set + Impossible de définir cette propriété + + + + This property or field was not found on this custom attribute type + Impossible de trouver cette propriété ou ce champ dans ce type d'attribut personnalisé + + + + A custom attribute must be a reference type + Un attribut personnalisé doit être un type référence + + + + The number of args for a custom attribute does not match the expected number of args for the attribute constructor + Le nombre d'arguments d'un attribut personnalisé ne correspond pas au nombre attendu d'arguments du constructeur d'attribut + + + + A custom attribute must invoke an object constructor + Un attribut personnalisé doit appeler un constructeur d'objet + + + + Attribute expressions must be calls to object constructors + Les expressions d'attribut doivent être des appels aux constructeurs d'objets + + + + This attribute cannot be used in this version of F# + Impossible d'utiliser cet attribut dans cette version de F# + + + + Invalid inline specification + Spécification inline non valide + + + + 'use' bindings must be of the form 'use <var> = <expr>' + Les liaisons 'use' doivent être sous la forme 'use <var> = <expr>' + + + + Abstract members are not permitted in an augmentation - they must be defined as part of the type itself + Les membres abstraits ne sont pas autorisés dans une augmentation. Ils doivent être définis dans le cadre du type lui-même + + + + Method overrides and interface implementations are not permitted here + Les substitutions de méthodes et les implémentations d'interfaces ne sont pas autorisées ici + + + + No abstract or interface member was found that corresponds to this override + Impossible de trouver un membre abstrait ou membre d'interface qui corresponde à cette substitution + + + + This override takes a different number of arguments to the corresponding abstract member. The following abstract members were found:{0} + Cette substitution n'accepte pas le même nombre d'arguments que le membre abstrait correspondant. Les membres abstraits suivants ont été trouvés : {0} + + + + This method already has a default implementation + Cette méthode a déjà une implémentation par défaut + + + + The method implemented by this default is ambiguous + La méthode implémentée par cette valeur par défaut est ambiguë + + + + No abstract property was found that corresponds to this override + Impossible de trouver une propriété abstraite qui corresponde à cette substitution + + + + This property overrides or implements an abstract property but the abstract property doesn't have a corresponding {0} + Cette propriété substitue ou implémente une propriété abstraite mais cette dernière n'a pas de {0} correspondant + + + + Invalid signature for set member + Signature non valide pour le membre défini + + + + This new member hides the abstract member '{0}'. Rename the member or use 'override' instead. + Ce nouveau membre masque le membre abstrait '{0}'. Renommez le membre ou utilisez 'override' à la place. + + + + This new member hides the abstract member '{0}' once tuples, functions, units of measure and/or provided types are erased. Rename the member or use 'override' instead. + Ce nouveau membre masque le membre abstrait '{0}', une fois les tuples, fonctions, les unités de mesure et/ou les types fournis effacés. Renommez le membre ou utilisez 'override' à la place. + + + + Interfaces cannot contain definitions of static initializers + Les interfaces ne peuvent pas contenir de définitions d'initialiseurs statiques + + + + Interfaces cannot contain definitions of object constructors + Les interfaces ne peuvent pas contenir de définitions de constructeurs d'objets + + + + Interfaces cannot contain definitions of member overrides + Les interfaces ne peuvent pas contenir de définitions de substitutions de membres + + + + Interfaces cannot contain definitions of concrete members. You may need to define a constructor on your type to indicate that the type is a class. + Les interfaces ne peuvent pas contenir de définitions de membres concrets. Vous pouvez définir un constructeur sur votre type pour indiquer que le type est une classe. + + + + Constructors cannot be specified in exception augmentations + Impossible de spécifier des constructeurs dans des augmentations d'exception + + + + Structs cannot have an object constructor with no arguments. This is a restriction imposed on all CLI languages as structs automatically support a default constructor. + Les structs ne peuvent pas avoir de constructeur d'objet sans arguments. Il s'agit d'une restriction imposée à tous les langages CLI, car les structs prennent automatiquement en charge un constructeur par défaut. + + + + Constructors cannot be defined for this type + Impossible de définir des constructeurs pour ce type + + + + Recursive bindings that include member specifications can only occur as a direct augmentation of a type + Les liaisons récursives qui incluent des spécifications de membres ne peuvent se produire qu'en tant qu'augmentation directe d'un type + + + + Only simple variable patterns can be bound in 'let rec' constructs + Seuls les modèles de variable simples peuvent être liés dans les constructions 'let rec' + + + + Only record fields and simple, non-recursive 'let' bindings may be marked mutable + Seuls les champs d'enregistrement et les liaisons 'let' simples non récursives peuvent être marqués comme mutables + + + + This member is not sufficiently generic + Ce membre n'est pas suffisamment générique + + + + A declaration may only be the [<Literal>] attribute if a constant value is also given, e.g. 'val x : int = 1' + Une déclaration ne peut être que l'attribut [<Literal>] si une valeur de constante est également fournie, par exemple 'val x : int = 1' + + + + A declaration may only be given a value in a signature if the declaration has the [<Literal>] attribute + Une déclaration ne peut recevoir de valeur dans une signature que si la déclaration a l'attribut [<Literal>] + + + + Thread-static and context-static variables must be static and given the [<DefaultValue>] attribute to indicate that the value is initialized to the default value on each new thread + Les variables static de thread et de contexte doivent être statiques et recevoir l'attribut [<DefaultValue>] pour indiquer que la valeur est initialisée à l'aide de la valeur par défaut pour chaque nouveau thread + + + + Volatile fields must be marked 'mutable' and cannot be thread-static + Les champs volatiles doivent être marqués comme 'mutable' et ne peuvent pas être des champs static de thread + + + + Uninitialized 'val' fields must be mutable and marked with the '[<DefaultValue>]' attribute. Consider using a 'let' binding instead of a 'val' field. + Les champs 'val' non initialisés doivent être mutables et marqués avec l'attribut '[<DefaultValue>]'. Utilisez une liaison 'let' à la place d'un champ 'val'. + + + + Static 'val' fields in types must be mutable, private and marked with the '[<DefaultValue>]' attribute. They are initialized to the 'null' or 'zero' value for their type. Consider also using a 'static let mutable' binding in a class type. + Les champs 'val' statiques des types doivent être mutables, privés et marqués avec l'attribut '[<DefaultValue>]'. Ils sont initialisés avec la valeur 'null' ou 'zero' pour leur type. Utilisez également une liaison 'static let mutable' dans un type classe. + + + + This field requires a name + Ce champ requiert un nom + + + + Invalid namespace, module, type or union case name + Nom d'espace de noms, de module, de type ou de cas d'union non valide + + + + Explicit type declarations for constructors must be of the form 'ty1 * ... * tyN -> resTy'. Parentheses may be required around 'resTy' + Les déclarations de type explicite pour les constructeurs doivent être sous la forme 'ty1 * ... * tyN -> resTy'. Des parenthèses peuvent être requises autour de 'resTy' + + + + Return types of union cases must be identical to the type being defined, up to abbreviations + Les types de retour des cas d'union doivent être identiques au type défini, jusqu'aux abréviations + + + + This is not a valid value for an enumeration literal + Valeur non valide pour un littéral d'énumération + + + + The type '{0}' is not an interface type + Le type '{0}' n'est pas un type interface + + + + Duplicate specification of an interface + Spécification dupliquée d'une interface + + + + A field/val declaration is not permitted here + Aucune déclaration de champ/valeur n'est autorisée ici + + + + A inheritance declaration is not permitted here + Aucune déclaration d'héritage n'est autorisée ici + + + + This declaration opens the module '{0}', which is marked as 'RequireQualifiedAccess'. Adjust your code to use qualified references to the elements of the module instead, e.g. 'List.map' instead of 'map'. This change will ensure that your code is robust as new constructs are added to libraries. + Cette déclaration ouvre le module '{0}', qui est marqué comme 'RequireQualifiedAccess'. Modifiez votre code pour utiliser des références qualifiées aux éléments du module à la place. Par exemple, utilisez 'List.map' au lieu de 'map'. Cette modification garantit la fiabilité de votre code au fur et à mesure de l'ajout de nouvelles constructions aux bibliothèques. + + + + This declaration opens the namespace or module '{0}' through a partially qualified path. Adjust this code to use the full path of the namespace. This change will make your code more robust as new constructs are added to the F# and CLI libraries. + Cette déclaration ouvre l'espace de noms ou le module '{0}' via un chemin d'accès partiellement qualifié. Modifiez ce code pour utiliser le chemin d'accès complet de l'espace de noms. Cette modification garantit la fiabilité de votre code au fur et à mesure de l'ajout de nouvelles constructions aux bibliothèques F# et CLI. + + + + Local class bindings cannot be marked inline. Consider lifting the definition out of the class or else do not mark it as inline. + Impossible de marquer les liaisons de classe locales inline. Enlevez la définition de la classe ou ne la marquez pas inline. + + + + Type abbreviations cannot have members + Les abréviations de type ne peuvent pas avoir de membres + + + + As of F# 4.1, the accessibility of type abbreviations is checked at compile-time. Consider changing the accessibility of the type abbreviation. Ignoring this warning might lead to runtime errors. + À partir de F# 4.1, l'accessibilité des abréviations de type est vérifiée au moment de la compilation. Changez l'accessibilité de l'abréviation de type. Si vous ignorez cet avertissement, cela risque d'entraîner des erreurs d'exécution. + + + + Enumerations cannot have members + Les énumérations ne peuvent pas avoir de membres + + + + Measure declarations may have only static members + Les déclarations de mesure ne peuvent avoir que des membres statiques + + + + Structs cannot contain 'do' bindings because the default constructor for structs would not execute these bindings + Les structs ne peuvent pas contenir de liaisons 'do', car le constructeur par défaut des structs n'exécute pas ces liaisons + + + + Structs cannot contain value definitions because the default constructor for structs will not execute these bindings. Consider adding additional arguments to the primary constructor for the type. + Les structs ne peuvent pas contenir de définitions de valeur, car le constructeur par défaut des structs n'exécute pas ces liaisons. Ajoutez des arguments supplémentaires au constructeur principal du type. + + + + Static value definitions may only be used in types with a primary constructor. Consider adding arguments to the type definition, e.g. 'type X(args) = ...'. + Les définitions de valeur statiques peuvent uniquement être utilisées dans les types comportant un constructeur principal. Ajoutez des arguments à la définition de type, par exemple 'type X(args) = …'. + + + + Measure declarations may have only static members: constructors are not available + Les déclarations de mesure ne peuvent avoir que des membres statiques : les constructeurs ne sont pas disponibles + + + + A member and a local class binding both have the name '{0}' + Un membre et une liaison de classe locale se nomment tous les deux '{0}' + + + + Type abbreviations cannot have interface declarations + Les abréviations de type ne peuvent pas avoir de déclarations d'interface + + + + Enumerations cannot have interface declarations + Les énumérations ne peuvent pas avoir de déclarations d'interface + + + + This type is not an interface type + Ce type n'est pas un type interface + + + + All implemented interfaces should be declared on the initial declaration of the type + Toutes les interfaces implémentées doivent être déclarées dans la déclaration initiale du type + + + + A default implementation of this interface has already been added because the explicit implementation of the interface was not specified at the definition of the type + Une implémentation par défaut de cette interface a déjà été ajoutée, car l'implémentation explicite de l'interface n'a pas été spécifiée lors de la définition du type + + + + This member is not permitted in an interface implementation + Ce membre n'est pas autorisé dans l'implémentation d'une interface + + + + This declaration element is not permitted in an augmentation + Cet élément de déclaration n'est pas autorisé dans une augmentation + + + + Types cannot contain nested type definitions + Les types ne peuvent pas contenir de définitions de type imbriquées + + + + type, exception or module + type, exception ou module + + + + type or module + type ou module + + + + The struct, record or union type '{0}' implements the interface 'System.IStructuralEquatable' explicitly. Apply the 'CustomEquality' attribute to the type. + Le type struct, enregistrement ou union '{0}' implémente explicitement l'interface 'System.IStructuralEquatable'. Appliquez l'attribut 'CustomEquality' au type. + + + + The struct, record or union type '{0}' implements the interface 'System.IEquatable<_>' explicitly. Apply the 'CustomEquality' attribute to the type and provide a consistent implementation of the non-generic override 'System.Object.Equals(obj)'. + Le type struct, enregistrement ou union '{0}' implémente explicitement l'interface 'System.IEquatable<_>'. Appliquez l'attribut 'CustomEquality' au type et fournissez une implémentation cohérente de la substitution non générique 'System.Object.Equals(obj)'. + + + + Explicit type specifications cannot be used for exception constructors + Impossible d'utiliser des spécifications de type explicite pour des constructeurs d'exception + + + + Exception abbreviations should not have argument lists + Les abréviations d'exceptions ne doivent pas avoir de listes d'arguments + + + + Abbreviations for Common IL exceptions cannot take arguments + Les abréviations des exceptions CIL (Common Intermediate Language) ne peuvent pas accepter d'arguments + + + + Exception abbreviations must refer to existing exceptions or F# types deriving from System.Exception + Les abréviations d'exceptions doivent faire référence à des exceptions existantes ou des types F# dérivant de System.Exception + + + + Abbreviations for Common IL exception types must have a matching object constructor + Les abréviations des types d'exceptions CIL (Common Intermediate Language) doivent avoir un constructeur d'objet correspondant + + + + Not an exception + N'est pas une exception + + + + Invalid module name + Nom de module non valide + + + + Invalid type extension + Extension de type non valide + + + + The attributes of this type specify multiple kinds for the type + Les attributs de ce type spécifient plusieurs genres pour le type + + + + The kind of the type specified by its attributes does not match the kind implied by its definition + Le genre du type spécifié par ses attributs ne correspond pas au genre impliqué par sa définition + + + + Measure definitions cannot have type parameters + Les déclarations de mesure ne peuvent pas avoir de paramètres de type + + + + This type requires a definition + Ce type requiert une définition + + + + This type abbreviation has one or more declared type parameters that do not appear in the type being abbreviated. Type abbreviations must use all declared type parameters in the type being abbreviated. Consider removing one or more type parameters, or use a concrete type definition that wraps an underlying type, such as 'type C<'a> = C of ...'. + Cette abréviation de type a un ou plusieurs paramètres de type déclarés qui n'apparaissent pas dans le type abrégé. Les abréviations de type doivent utiliser tous les paramètres de type déclarés dans le type abrégé. Supprimez un ou plusieurs paramètres de type, ou utilisez une définition de type concret qui inclut dans un wrapper un type sous-jacent, par exemple 'type C<'a> = C of ...'. + + + + Structs, interfaces, enums and delegates cannot inherit from other types + Les structs, interfaces, enums et délégués ne peuvent pas hériter d'autres types + + + + Types cannot inherit from multiple concrete types + Les types ne peuvent pas hériter de plusieurs types concrets + + + + Records, union, abbreviations and struct types cannot have the 'AllowNullLiteral' attribute + Les types enregistrement, union, abréviation et struct ne peuvent pas avoir l'attribut 'AllowNullLiteral' + + + + Types with the 'AllowNullLiteral' attribute may only inherit from or implement types which also allow the use of the null literal + Les types avec l'attribut 'AllowNullLiteral' ne peuvent hériter que des types ou implémenter que les types qui autorisent également l'utilisation du littéral null + + + + Generic types cannot be given the 'StructLayout' attribute + Impossible de donner aux types génériques l'attribut 'StructLayout' + + + + Only structs and classes without primary constructors may be given the 'StructLayout' attribute + Seuls les structs et les classes sans constructeurs principaux peuvent recevoir l'attribut 'StructLayout' + + + + The representation of this type is hidden by the signature. It must be given an attribute such as [<Sealed>], [<Class>] or [<Interface>] to indicate the characteristics of the type. + La représentation de ce type est masquée par la signature. Un attribut tel que [<Sealed>], [<Class>] ou [<Interface>] doit lui être fourni pour indiquer les caractéristiques du type. + + + + Only classes may be given the 'AbstractClass' attribute + Seules les classes peuvent recevoir l'attribut 'AbstractClass' + + + + Only types representing units-of-measure may be given the 'Measure' attribute + Seuls les types représentant des unités de mesure peuvent recevoir l'attribut 'Measure' + + + + Accessibility modifiers are not permitted on overrides or interface implementations + Les modificateurs d'accessibilité ne sont pas autorisés pour les substitutions ou les implémentations d'interfaces + + + + Discriminated union types are always sealed + Les types union discriminés sont toujours sealed + + + + Record types are always sealed + Les types enregistrement sont toujours sealed + + + + Assembly code types are always sealed + Les types de codes assembleur sont toujours sealed + + + + Struct types are always sealed + Les types struct sont toujours sealed + + + + Delegate types are always sealed + Les types délégués sont toujours sealed + + + + Enum types are always sealed + Les types enum sont toujours sealed + + + + Interface types and delegate types cannot contain fields + Les types interface et les types délégués ne peuvent pas contenir de champs + + + + Abbreviated types cannot be given the 'Sealed' attribute + Impossible de donner aux types abrégés l'attribut 'Sealed' + + + + Cannot inherit a sealed type + Impossible d'hériter d'un type sealed + + + + Cannot inherit from interface type. Use interface ... with instead. + Impossible d'hériter du type interface. Utilisez interface ... with à la place. + + + + Struct types cannot contain abstract members + Les types struct ne peuvent pas contenir de membres abstraits + + + + Interface types cannot be sealed + Les types interface ne peuvent pas être sealed + + + + Delegate specifications must be of the form 'typ -> typ' + Les spécifications des délégués doivent être sous la forme 'typ -> typ' + + + + Delegate specifications must not be curried types. Use 'typ * ... * typ -> typ' for multi-argument delegates, and 'typ -> (typ -> typ)' for delegates returning function values. + Les spécifications des délégués ne doivent pas être des types curryfiés. Utilisez 'typ * ... * typ -> typ' pour les délégués à arguments multiples et 'typ -> (typ -> typ)' pour les délégués qui retournent des valeurs de fonction. + + + + Literal enumerations must have type int, uint, int16, uint16, int64, uint64, byte, sbyte or char + Les littéraux énumérés doivent être de type int, uint, int16, uint16, int64, uint64, byte, sbyte ou char + + + + This type definition involves an immediate cyclic reference through an abbreviation + Cette définition de type implique une référence cyclique immédiate via une abréviation + + + + This type definition involves an immediate cyclic reference through a struct field or inheritance relation + Cette définition de type implique une référence cyclique immédiate via un champ struct ou une relation d'héritage + + + + The syntax 'type X with ...' is reserved for augmentations. Types whose representations are hidden but which have members are now declared in signatures using 'type X = ...'. You may also need to add the '[<Sealed>] attribute to the type definition in the signature + La syntaxe 'type X with ...' est réservée aux augmentations. Les types dont les représentations sont masquées mais qui comportent des membres sont désormais déclarés dans les signatures via 'type X = ...'. Vous devrez peut-être également ajouter l'attribut '[<Sealed>] à la définition de type dans la signature + + + + Members that extend interface, delegate or enum types must be placed in a module separate to the definition of the type. This module must either have the AutoOpen attribute or be opened explicitly by client code to bring the extension members into scope. + Les membres qui étendent les types interface, délégués ou enum doivent être placés dans un module distinct de la définition du type. Ce module doit avoir l'attribut AutoOpen ou être ouvert explicitement par le code client afin de placer les membres d'extension dans la portée. + + + + One or more of the declared type parameters for this type extension have a missing or wrong type constraint not matching the original type constraints on '{0}' + Un ou plusieurs des paramètres de type déclarés pour cette extension de type ont une contrainte de type manquante ou incorrecte qui ne correspond pas aux contraintes de type d'origine sur '{0}' + + + + Type definitions may only have one 'inherit' specification and it must be the first declaration + Les définitions de type ne peuvent avoir qu'une spécification 'inherit' et il doit s'agir de la première déclaration + + + + 'let' and 'do' bindings must come before member and interface definitions in type definitions + Les liaisons 'let' et 'do' doivent précéder les définitions de membre et d'interface dans les définitions de type + + + + This 'inherit' declaration specifies the inherited type but no arguments. Consider supplying arguments, e.g. 'inherit BaseType(args)'. + Cette déclaration 'inherit' spécifie le type hérité mais aucun argument. Fournissez des arguments, par exemple 'inherit BaseType(args)'. + + + + This 'inherit' declaration has arguments, but is not in a type with a primary constructor. Consider adding arguments to your type definition, e.g. 'type X(args) = ...'. + Cette déclaration 'inherit' a des arguments, mais ne figure pas dans un type avec un constructeur principal. Ajoutez des arguments à votre définition de type, par exemple 'type X(args) = …'. + + + + This definition may only be used in a type with a primary constructor. Consider adding arguments to your type definition, e.g. 'type X(args) = ...'. + Cette définition ne peut être utilisée que dans un type avec un constructeur principal. Ajoutez des arguments à votre définition de type, par exemple, e.g. 'type X(args) =…'. + + + + Type abbreviations cannot have augmentations + Les abréviations de type ne peuvent pas avoir d'augmentations + + + + The path '{0}' is a namespace. A module abbreviation may not abbreviate a namespace. + Le chemin '{0}' est un espace de noms. Une abréviation de module ne peut pas être abrégée en espace de noms. + + + + The type '{0}' is used in an invalid way. A value prior to '{1}' has an inferred type involving '{2}', which is an invalid forward reference. + Le type '{0}' est utilisé de manière incorrecte. Une valeur antérieure à '{1}' a un type déduit qui implique '{2}', qui est une référence anticipée non valide. + + + + The member '{0}' is used in an invalid way. A use of '{1}' has been inferred prior to the definition of '{2}', which is an invalid forward reference. + Le membre '{0}' est utilisé de manière incorrecte. Une utilisation de '{1}' a été déduite avant la définition de '{2}'. Il s'agit d'une référence anticipée non valide. + + + + The attribute 'AutoOpen(\"{0}\")' in the assembly '{1}' did not refer to a valid module or namespace in that assembly and has been ignored + L'attribut 'AutoOpen(\"{0}\")' de l'assembly '{1}' ne faisait pas référence à un module ou un espace de noms valide dans cet assembly et a été ignoré + + + + Undefined value '{0}' + Valeur non définie '{0}' + + + + Label {0} not found + Étiquette {0} introuvable + + + + Incorrect number of type arguments to local call + Nombre incorrect d'arguments de type dans l'appel local + + + + Dynamic invocation of {0} is not supported + L'appel dynamique de {0} n'est pas pris en charge + + + + Taking the address of a literal field is invalid + L'acceptation de l'adresse d'un champ littéral n'est pas valide + + + + This operation involves taking the address of a value '{0}' represented using a local variable or other special representation. This is invalid. + Cette opération implique l'acceptation de l'adresse d'une valeur '{0}' représentée à l'aide d'une variable locale ou de toute autre représentation spéciale. Ceci n'est pas valide. + + + + Custom marshallers cannot be specified in F# code. Consider using a C# helper function. + Impossible de spécifier des marshaleurs personnalisés en F#. Utilisez une fonction d'assistance C#. + + + + The MarshalAs attribute could not be decoded + Impossible de décoder l'attribut MarshalAs + + + + The signature for this external function contains type parameters. Constrain the argument and return types to indicate the types of the corresponding C function. + La signature de cette fonction externe contient des paramètres de type. Appliquez une contrainte à l'argument et aux types de retour pour indiquer les types de la fonction C correspondante. + + + + The DllImport attribute could not be decoded + Impossible de décoder l'attribut DllImport + + + + Literal fields cannot be set + Impossible de définir les champs littéral + + + + GenSetStorage: {0} was represented as a static method but was not an appropriate lambda expression + GenSetStorage : {0} a été représenté en tant que méthode statique mais n'était pas une expression lambda appropriée + + + + Mutable variables cannot escape their method + Impossible d'utiliser les variables mutables en dehors de leur méthode + + + + Compiler error: unexpected unrealized value + Erreur du compilateur : valeur non réalisée inattendue + + + + Main module of program is empty: nothing will happen when it is run + Le module principal du programme est vide : rien ne se passera lors de son exécution + + + + This type cannot be used for a literal field + Impossible d'utiliser ce type pour un champ littéral + + + + Unexpected GetSet annotation on a property + Annotation GetSet inattendue pour une propriété + + + + The FieldOffset attribute could not be decoded + Impossible de décoder l'attribut FieldOffset + + + + The StructLayout attribute could not be decoded + Impossible de décoder l'attribut StructLayout + + + + The DefaultAugmentation attribute could not be decoded + Impossible de décoder l'attribut DefaultAugmentation + + + + Reflected definitions cannot contain uses of the prefix splice operator '%' + Les définitions réfléchies ne peuvent pas contenir d'utilisations de l'opérateur d'ajout de préfixe '%' + + + + Problem with codepage '{0}': {1} + Problème avec la page de codes '{0}' : {1} + + + + Copyright (c) Microsoft Corporation. All Rights Reserved. + Copyright (c) Microsoft Corporation. Tous droits réservés. + + + + Freely distributed under the MIT Open Source License. https://github.com/Microsoft/visualfsharp/blob/master/License.txt + Distribué gratuitement sous licence Open Source du MIT. https://github.com/Microsoft/visualfsharp/blob/master/License.txt + + + + Name of the output file (Short form: -o) + Nom du fichier de sortie (forme abrégée : -o) + + + + Build a console executable + Générer un fichier exécutable console + + + + Build a Windows executable + Générer un fichier exécutable Windows + + + + Build a library (Short form: -a) + Générer une bibliothèque (forme abrégée : -a) + + + + Build a module that can be added to another assembly + Générer un module qui peut être ajouté à un autre assembly + + + + Delay-sign the assembly using only the public portion of the strong name key + Différer la signature de l'assembly en utilisant uniquement la partie publique de la clé de nom fort + + + + Public-sign the assembly using only the public portion of the strong name key, and mark the assembly as signed + Signer publiquement l'assembly en utilisant uniquement la partie publique de la clé de nom fort, et marquer l'assembly comme signé + + + + Write the xmldoc of the assembly to the given file + Écrire le xmldoc de l'assembly dans le fichier donné + + + + Specify a strong name key file + Spécifier un fichier de clé de nom fort + + + + Specify a strong name key container + Spécifier un conteneur de clé de nom fort + + + + Limit which platforms this code can run on: x86, Itanium, x64, anycpu32bitpreferred, or anycpu. The default is anycpu. + Limiter les plateformes sur lesquelles ce code peut s'exécuter : x86, Itanium, x64, anycpu32bitpreferred ou anycpu. La valeur par défaut est anycpu. + + + + Only include optimization information essential for implementing inlined constructs. Inhibits cross-module inlining but improves binary compatibility. + Inclure uniquement les informations d'optimisation essentielles à l'implémentation de constructions inline. Empêche l'incorporation (inlining) entre modules mais améliore la compatibilité binaire. + + + + Don't add a resource to the generated assembly containing F#-specific metadata + N'ajouter aucune ressource à l'assembly généré contenant les métadonnées spécifiques F# + + + + Print the inferred interface of the assembly to a file + Imprimer l'interface déduite de l'assembly dans un fichier + + + + Reference an assembly (Short form: -r) + Référencer un assembly (forme abrégée : -r) + + + + Specify a Win32 resource file (.res) + Spécifier un fichier de ressources Win32 (.res) + + + + Specify a Win32 manifest file + Spécifier un fichier manifeste Win32 + + + + Do not include the default Win32 manifest + Ne pas inclure le manifeste Win32 par défaut + + + + Embed all source files in the portable PDB file + Incorporer tous les fichiers sources dans le fichier PDB portable + + + + Embed specific source files in the portable PDB file + Incorporer des fichiers sources spécifiques dans le fichier PDB portable + + + + Source link information file to embed in the portable PDB file + Fichier d'informations sur le lien source à incorporer dans le fichier PDB portable + + + + --embed switch only supported when emitting a Portable PDB (--debug:portable or --debug:embedded) + Commutateur --embed uniquement pris en charge durant l'émission d'un fichier PDB portable (--debug:portable ou --debug:embedded) + + + + --sourcelink switch only supported when emitting a Portable PDB (--debug:portable or --debug:embedded) + Commutateur --sourcelink uniquement pris en charge durant l'émission d'un fichier PDB portable (--debug:portable ou --debug:embedded) + + + + Source file is too large to embed in a portable PDB + Le fichier source est trop grand pour être incorporé dans un fichier PDB portable + + + + Embed the specified managed resource + Incorporer la ressource managée spécifiée + + + + Link the specified resource to this assembly where the resinfo format is <file>[,<string name>[,public|private]] + Lier la ressource spécifiée à cet assembly où le format resinfo est <fichier>[,<nom de chaîne>[,public|private]] + + + + Emit debug information (Short form: -g) + Émettre les informations de débogage (forme abrégée : -g) + + + + Specify debugging type: full, portable, embedded, pdbonly. ('{0}' is the default if no debuggging type specified and enables attaching a debugger to a running program, 'portable' is a cross-platform format, 'embedded' is a cross-platform format embedded into the output file). + Spécifiez le type de débogage : full, portable, embedded, pdbonly. ('{0}' est la valeur par défaut si aucun type de débogage n'est spécifié. Cette valeur permet d'attacher un débogueur à un programme en cours d'exécution, 'portable' est un format multiplateforme, 'embedded' est un format multiplateforme incorporé dans le fichier de sortie). + + + + Enable optimizations (Short form: -O) + Activer les optimisations (forme abrégée : -O) + + + + Enable or disable tailcalls + Activer ou désactiver les appels tail + + + + Produce a deterministic assembly (including module version GUID and timestamp) + Produire un assembly déterministe (en incluant le GUID et l'horodateur de la version du module) + + + + Enable or disable cross-module optimizations + Activer ou désactiver les optimisations entre modules + + + + Report all warnings as errors + Signaler tous les avertissements comme des erreurs + + + + Report specific warnings as errors + Signaler des avertissements spécifiques comme des erreurs + + + + Set a warning level (0-5) + Définir un niveau d'avertissement (0-5) + + + + Disable specific warning messages + Désactiver des messages d'avertissement déterminés + + + + Enable specific warnings that may be off by default + Activer les avertissements spécifiques qui peuvent être désactivés par défaut + + + + Generate overflow checks + Générer des contrôles de dépassement de capacité + + + + Define conditional compilation symbols (Short form: -d) + Définir les symboles de compilation conditionnelle (forme abrégée : -d) + + + + Ignore ML compatibility warnings + Ignorer les avertissements de compatibilité ML + + + + + Display this usage message (Short form: -?) + Affiche ce message d'utilisation (forme abrégée : -?) + + + + Read response file for more options + Lire le fichier réponse pour plus d'options + + + + Specify the codepage used to read source files + Spécifier la page de codes utilisée pour lire les fichiers sources + + + + Output messages in UTF-8 encoding + Messages de sortie au format d'encodage UTF-8 + + + + Output messages with fully qualified paths + Messages de sortie avec chemins d'accès qualifiés complets + + + + Specify a directory for the include path which is used to resolve source files and assemblies (Short form: -I) + Spécifier un répertoire pour le chemin d'accès Include utilisé pour résoudre les fichiers sources et les assemblys (forme abrégée : -I) + + + + Base address for the library to be built + Adresse de base de la bibliothèque à générer + + + + Do not reference the default CLI assemblies by default + Ne pas référencer les assemblys CLI par défaut + + + + Statically link the F# library and all referenced DLLs that depend on it into the assembly being generated + Lier statiquement la bibliothèque F# et toutes les DLL référencées qui en dépendent dans l'assembly en cours de génération + + + + Statically link the given assembly and all referenced DLLs that depend on this assembly. Use an assembly name e.g. mylib, not a DLL name. + Lier statiquement l'assembly donné et toutes les DLL référencées qui en dépendent. Utilisez un nom d'assembly tel que mylib au lieu d'un nom de DLL. + + + + Use a resident background compilation service to improve compiler startup times. + Utilisez un service de compilation en arrière-plan résident pour améliorer les temps de démarrage du compilateur. + + + + Name the output debug file + Nommer le fichier de débogage de sortie + + + + Resolve assembly references using directory-based rules rather than MSBuild resolution + Résoudre les références d'assembly à l'aide des règles basées sur les répertoires au lieu de la résolution MSBuild + + + + Unrecognized target '{0}', expected 'exe', 'winexe', 'library' or 'module' + Cible '{0}' non reconnue, 'exe', 'winexe', 'library' ou 'module' attendu + + + + Unrecognized debug type '{0}', expected 'pdbonly' or 'full' + Type de débogage '{0}' non reconnu, 'pdbonly' ou 'full' attendu + + + + Invalid warning level '{0}' + Niveau d'avertissement non valide '{0}' + + + + Short form of '{0}' + Forme abrégée de '{0}' + + + + The command-line option '--cliroot' has been deprecated. Use an explicit reference to a specific copy of mscorlib.dll instead. + L'option de ligne de commande '--cliroot' est déconseillée. Utilisez une référence explicite à une copie spécifique de mscorlib.dll à la place. + + + + Use to override where the compiler looks for mscorlib.dll and framework components + Permet de substituer l'emplacement où le compilateur recherche mscorlib.dll et les composants .NET Framework + + + + - OUTPUT FILES - + - FICHIERS DE SORTIE - + + + + - INPUT FILES - + - FICHIERS D'ENTRÉE - + + + + - RESOURCES - + - RESSOURCES - + + + + - CODE GENERATION - + - GÉNÉRATION DE CODE - + + + + - ADVANCED - + - AVANCÉ - + + + + - MISCELLANEOUS - + - DIVERS - + + + + - LANGUAGE - + - LANGAGE - + + + + - ERRORS AND WARNINGS - + - ERREURS ET AVERTISSEMENTS - + + + + Unknown --test argument: '{0}' + Inconnu --argument de test : '{0}' + + + + Unrecognized platform '{0}', valid values are 'x86', 'x64', 'Itanium', 'anycpu32bitpreferred', and 'anycpu' + Plateforme '{0}' non reconnue, les valeurs valides sont 'x86', 'x64', 'Itanium', 'anycpu32bitpreferred' et 'anycpu' + + + + The command-line option '{0}' is for test purposes only + L'option de ligne de commande '{0}' ne doit servir qu'à des fins de test + + + + The command-line option '{0}' has been deprecated + L'option de ligne de commande '{0}' est déconseillée + + + + The command-line option '{0}' has been deprecated. Use '{1}' instead. + L'option de ligne de commande '{0}' est déconseillée. Utilisez '{1}' à la place. + + + + The command-line option '{0}' has been deprecated. HTML document generation is now part of the F# Power Pack, via the tool FsHtmlDoc.exe. + L'option de ligne de commande '{0}' est déconseillée. La génération de documents HTML fait désormais partie de F# Power Pack, via l'outil FsHtmlDoc.exe. + + + + Output warning and error messages in color + Générer les messages d'avertissement et d'erreur en couleur + + + + Enable high-entropy ASLR + Activer la randomisation du format d'espace d'adresse d'entropie élevée + + + + Specify subsystem version of this assembly + Spécifier la version du sous-système de cet assembly + + + + Specify target framework profile of this assembly. Valid values are mscorlib, netcore or netstandard. Default - mscorlib + Spécifiez le profil de la version cible du .NET Framework de cet assembly. Les valeurs valides sont mscorlib, netcore et netstandard. Valeur par défaut : mscorlib + + + + Emit debug information in quotations + Émettre les informations de débogage entre quotations + + + + Specify the preferred output language culture name (e.g. es-ES, ja-JP) + Spécifiez le nom de culture de la langue de sortie par défaut (exemple : es-ES, ja-JP) + + + + Don't copy FSharp.Core.dll along the produced binaries + Ne pas copier FSharp.Core.dll avec les fichiers binaires produits + + + + Invalid version '{0}' for '--subsystemversion'. The version must be 4.00 or greater. + Version '{0}' non valide pour '--subsystemversion'. La version doit être 4.00 ou supérieure. + + + + Invalid value '{0}' for '--targetprofile', valid values are 'mscorlib', 'netcore' or 'netstandard'. + Valeur non valide '{0}' pour '--targetprofile'. Les valeurs valides sont 'mscorlib', 'netcore' et 'netstandard'. + + + + Full name + Nom complet + + + + and {0} other overloads + et {0} autres surcharges + + + + union case + cas d'union + + + + active pattern result + résultat du modèle actif + + + + active recognizer + module de reconnaissance actif + + + + field + champ + + + + event + événement + + + + property + propriété + + + + extension + extension + + + + custom operation + opération personnalisée + + + + argument + argument + + + + patvar + patvar + + + + namespace + espace de noms + + + + module + module + + + + namespace/module + espace de noms/module + + + + from {0} + de {0} + + + + also from {0} + également de {0} + + + + generated property + propriété générée + + + + generated type + type généré + + + + Found by AssemblyFolders registry key + Trouvée par la clé de Registre AssemblyFolders + + + + Found by AssemblyFoldersEx registry key + Trouvée par la clé de Registre AssemblyFoldersEx + + + + .NET Framework + .NET Framework + + + + Global Assembly Cache + Global Assembly Cache + + + + Recursive class hierarchy in type '{0}' + Hiérarchie de classes récursive dans le type '{0}' + + + + Invalid recursive reference to an abstract slot + Référence récursive non valide à un emplacement abstrait + + + + The event '{0}' has a non-standard type. If this event is declared in another CLI language, you may need to access this event using the explicit {1} and {2} methods for the event. If this event is declared in F#, make the type of the event an instantiation of either 'IDelegateEvent<_>' or 'IEvent<_,_>'. + L'événement '{0}' a un type non standard. Si cet événement est déclaré dans un autre langage CLI, vous pouvez accéder à cet événement à l'aide des méthodes explicites {1} et {2} de l'événement. Si cet événement est déclaré en F#, faites du type de l'événement une instanciation de 'IDelegateEvent<_>' ou 'IEvent<_,_>'. + + + + The type '{0}' is not accessible from this code location + Le type '{0}' n'est pas accessible à partir de cet emplacement du code + + + + The union cases or fields of the type '{0}' are not accessible from this code location + Les cas d'union ou champs du type '{0}' ne sont pas accessibles à partir de cet emplacement du code + + + + The value '{0}' is not accessible from this code location + La valeur '{0}' n'est pas accessible à partir de cet emplacement du code + + + + The union case '{0}' is not accessible from this code location + Le cas d'union '{0}' n'est pas accessible à partir de cet emplacement du code + + + + The record, struct or class field '{0}' is not accessible from this code location + Le champ de type enregistrement, struct ou classe '{0}' n'est pas accessible à partir de cet emplacement du code + + + + The struct or class field '{0}' is not accessible from this code location + Le champ de struct ou de classe '{0}' n'est pas accessible à partir de cet emplacement du code + + + + This construct is experimental + Cette construction est expérimentale + + + + No Invoke methods found for delegate type + Aucune méthode Invoke trouvée pour le type délégué + + + + More than one Invoke method found for delegate type + Plusieurs méthodes Invoke trouvées pour le type délégué + + + + Delegates are not allowed to have curried signatures + Les délégués ne sont pas autorisés à avoir des signatures curryfiées + + + + Unexpected Expr.TyChoose + Expr.TyChoose inattendu + + + + Note: Lambda-lifting optimizations have not been applied because of the use of this local constrained generic function as a first class value. Adding type constraints may resolve this condition. + Remarque : les optimisations par suppression d'expressions lambda n'ont pas été appliquées en raison de l'utilisation de cette fonction générique contrainte locale en tant que valeur de première classe. L'ajout de contraintes de type peut résoudre ce problème. + + + + Identifiers containing '@' are reserved for use in F# code generation + Les identificateurs qui contiennent '@' sont réservés pour la génération de code F# + + + + The identifier '{0}' is reserved for future use by F# + L'identificateur '{0}' est réservé pour un usage futur par F# + + + + Missing variable '{0}' + Variable manquante '{0}' + + + + Partial active patterns may only generate one result + Les modèles actifs partiels ne peuvent générer qu'un seul résultat + + + + The type '{0}' is required here and is unavailable. You must add a reference to assembly '{1}'. + Le type '{0}' est requis ici et n'est pas disponible. Vous devez ajouter une référence à l'assembly '{1}'. + + + + A reference to the type '{0}' in assembly '{1}' was found, but the type could not be found in that assembly + Une référence au type '{0}' a été trouvée dans l'assembly '{1}', mais le type est introuvable dans cet assembly + + + + Internal error or badly formed metadata: not enough type parameters were in scope while importing + Erreur interne ou métadonnées incorrectes : nombre insuffisant de paramètres de type dans la portée lors de l'importation + + + + A reference to the DLL {0} is required by assembly {1}. The imported type {2} is located in the first assembly and could not be resolved. + Une référence à la DLL {0} est requise par l'assembly {1}. Le type importé {2} se trouve dans le premier assembly et n'a pas pu être résolu. + + + + An imported assembly uses the type '{0}' but that type is not public + Un assembly importé utilise le type '{0}' mais ce type n'est pas public + + + + The value '{0}' was marked inline but its implementation makes use of an internal or private function which is not sufficiently accessible + La valeur '{0}' a été marquée comme inline mais son implémentation utilise une fonction interne ou privée qui n'est pas suffisamment accessible + + + + The value '{0}' was marked inline but was not bound in the optimization environment + La valeur '{0}' a été marquée comme inline mais n'a pas été liée dans l'environnement d'optimisation + + + + Local value {0} not found during optimization + Valeur locale {0} introuvable durant l'optimisation + + + + A value marked as 'inline' has an unexpected value + Une valeur marquée comme 'inline' a une valeur inattendue + + + + A value marked as 'inline' could not be inlined + Impossible d'effectuer l'incorporation (inlining) d'une valeur marquée comme 'inline' + + + + Failed to inline the value '{0}' marked 'inline', perhaps because a recursive value was marked 'inline' + Impossible d'effectuer l'incorporation (inlining) de la valeur '{0}' marquée comme 'inline', peut-être en raison d'une valeur récursive marquée comme 'inline' + + + + Recursive ValValue {0} + ValValue {0} récursive + + + + The indentation of this 'in' token is incorrect with respect to the corresponding 'let' + La mise en retrait de ce jeton 'in' est incorrecte par rapport au 'let' correspondant + + + + Possible incorrect indentation: this token is offside of context started at position {0}. Try indenting this token further or using standard formatting conventions. + Mise en retrait éventuellement incorrecte : ce jeton est situé hors du contexte qui débute à la position {0}. Essayez d'effectuer une mise en retrait supplémentaire de ce jeton ou d'utiliser des conventions de mise en forme standard. + + + + The '|' tokens separating rules of this pattern match are misaligned by one column. Consider realigning your code or using further indentation. + Les jetons '|' qui séparent les règles de ce critère spécial sont décalés d'une colonne. Réalignez votre code ou effectuez une mise en retrait supplémentaire. + + + + Invalid module/expression/type + Module/expression/type non valide + + + + Multiple types exist called '{0}', taking different numbers of generic parameters. Provide a type instantiation to disambiguate the type resolution, e.g. '{1}'. + Il existe plusieurs types nommés '{0}' qui acceptent divers nombres de paramètres génériques. Fournissez une instanciation de type pour lever l'ambiguïté de la résolution de type. Exemple : '{1}'. + + + + The instantiation of the generic type '{0}' is missing and can't be inferred from the arguments or return type of this member. Consider providing a type instantiation when accessing this type, e.g. '{1}'. + L'instanciation du type générique '{0}' est manquante. Impossible de la déduire à partir des arguments ou du type de retour de ce membre. Fournissez une instanciation de type lors de l'accès à ce type. Exemple : '{1}'. + + + + 'global' may only be used as the first name in a qualified path + 'global' ne peut être utilisé que comme premier nom dans un chemin d'accès qualifié + + + + This is not a constructor or literal, or a constructor is being used incorrectly + Soit il ne s'agit pas d'un constructeur ou d'un littéral, soit un constructeur est utilisé de manière incorrecte + + + + Unexpected empty long identifier + Identificateur long vide inattendu + + + + The record type '{0}' does not contain a label '{1}'. + Le type d'enregistrement '{0}' ne contient pas d'étiquette '{1}'. + + + + Invalid field label + Étiquette de champ non valide + + + + Invalid expression '{0}' + Expression non valide '{0}' + + + + No constructors are available for the type '{0}' + Aucun constructeur n'est disponible pour le type '{0}' + + + + The union type for union case '{0}' was defined with the RequireQualifiedAccessAttribute. Include the name of the union type ('{1}') in the name you are using. + Le type union du cas d'union '{0}' a été défini avec RequireQualifiedAccessAttribute. Incluez le nom du type union ('{1}') dans le nom que vous utilisez. + + + + The record type for the record field '{0}' was defined with the RequireQualifiedAccessAttribute. Include the name of the record type ('{1}') in the name you are using. + Le type d'enregistrement du champ d'enregistrement '{0}' a été défini avec RequireQualifiedAccessAttribute. Incluez le nom du type d'enregistrement ('{1}') dans le nom que vous utilisez. + + + + Unexpected error creating debug information file '{0}' + Erreur inattendue lors de la création du fichier des informations de débogage '{0}' + + + + This number is outside the allowable range for this integer type + Ce nombre se trouve en dehors de la plage autorisée pour ce type d'entier + + + + '{0}' is not permitted as a character in operator names and is reserved for future use + '{0}' n'est pas autorisé en tant que caractère dans les noms d'opérateurs et est réservé pour un usage futur + + + + Unexpected character '{0}' + Caractère inattendu '{0}' + + + + This byte array literal contains characters that do not encode as a single byte + Ce littéral de tableau d'octets contient des caractères qui ne sont pas encodés sous forme d'octet unique + + + + Identifiers followed by '{0}' are reserved for future use + Les identificateurs suivis de '{0}' sont réservés pour un usage futur + + + + This number is outside the allowable range for 8-bit signed integers + Ce nombre se trouve en dehors de la plage autorisée pour les entiers signés 8 bits + + + + This number is outside the allowable range for hexadecimal 8-bit signed integers + Ce nombre se trouve en dehors de la plage autorisée pour les entiers signés 8 bits hexadécimaux + + + + This number is outside the allowable range for 8-bit unsigned integers + Ce nombre se trouve en dehors de la plage autorisée pour les entiers non signés 8 bits + + + + This number is outside the allowable range for 16-bit signed integers + Ce nombre se trouve en dehors de la plage autorisée pour les entiers signés 16 bits + + + + This number is outside the allowable range for 16-bit unsigned integers + Ce nombre se trouve en dehors de la plage autorisée pour les entiers non signés 16 bits + + + + This number is outside the allowable range for 32-bit signed integers + Ce nombre se trouve en dehors de la plage autorisée pour les entiers signés 32 bits + + + + This number is outside the allowable range for 32-bit unsigned integers + Ce nombre se trouve en dehors de la plage autorisée pour les entiers non signés 32 bits + + + + This number is outside the allowable range for 64-bit signed integers + Ce nombre se trouve en dehors de la plage autorisée pour les entiers signés 64 bits + + + + This number is outside the allowable range for 64-bit unsigned integers + Ce nombre se trouve en dehors de la plage autorisée pour les entiers non signés 64 bits + + + + This number is outside the allowable range for signed native integers + Ce nombre se trouve en dehors de la plage autorisée pour les entiers natifs signés + + + + This number is outside the allowable range for unsigned native integers + Ce nombre se trouve en dehors de la plage autorisée pour les entiers natifs non signés + + + + Invalid floating point number + Nombre à virgule flottante non valide + + + + This number is outside the allowable range for decimal literals + Ce nombre se trouve en dehors de la plage autorisée pour les littéraux décimaux + + + + This number is outside the allowable range for 32-bit floats + Ce nombre se trouve en dehors de la plage autorisée pour les valeurs float 32 bits + + + + This is not a valid numeric literal. Valid numeric literals include 1, 0x1, 0b0001 (int), 1u (uint32), 1L (int64), 1UL (uint64), 1s (int16), 1y (sbyte), 1uy (byte), 1.0 (float), 1.0f (float32), 1.0m (decimal), 1I (BigInteger). + Littéral numérique non valide. Littéraux numériques valides : 1, 0x1, 0b0001 (int), 1u (uint32), 1L (int64), 1UL (uint64), 1s (int16), 1y (sbyte), 1uy (byte), 1.0 (float), 1.0f (float32), 1.0m (decimal), 1I (BigInteger). + + + + This is not a valid byte literal + Littéral d'octet non valide + + + + This is not a valid character literal + Littéral de caractère non valide + + + + This Unicode encoding is only valid in string literals + Cet encodage Unicode est uniquement valide dans les littéraux de chaîne + + + + This token is reserved for future use + Ce jeton est réservé pour un usage futur + + + + TABs are not allowed in F# code unless the #indent \"off\" option is used + Les tabulations ne sont pas autorisées dans le code F# sauf si l'option #indent \"off\" est utilisée + + + + Invalid line number: '{0}' + Numéro de ligne non valide : '{0}' + + + + #if directive must appear as the first non-whitespace character on a line + La directive #if doit être le premier caractère (autre qu'un espace blanc) d'une ligne + + + + #else has no matching #if + #else n'a aucun #if correspondant + + + + #endif required for #else + #endif requis pour #else + + + + #else directive must appear as the first non-whitespace character on a line + La directive #else doit être le premier caractère (autre qu'un espace blanc) d'une ligne + + + + #endif has no matching #if + #endif n'a aucun #if correspondant + + + + #endif directive must appear as the first non-whitespace character on a line + La directive #endif doit être le premier caractère (autre qu'un espace blanc) d'une ligne + + + + #if directive should be immediately followed by an identifier + La directive #if doit être immédiatement suivie d'un identificateur + + + + Syntax error. Wrong nested #endif, unexpected tokens before it. + Erreur de syntaxe. Imbrication incorrecte de #endif, jetons inattendus devant. + + + + #! may only appear as the first line at the start of a file. + #! ne peut se trouver que sur la première ligne au début d'un fichier. + + + + Expected single line comment or end of line + Commentaire sur une seule ligne ou fin de ligne attendu + + + + Infix operator member '{0}' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ... + Le membre opérateur infixe '{0}' n'a aucun argument. Tuple de 2 arguments attendu. Exemple : static member (+) (x,y) = ... + + + + Infix operator member '{0}' has {1} initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ... + Le membre opérateur infixe '{0}' a 1 argument initial ou {1} arguments initiaux. Tuple de 2 arguments attendu. Exemple : static member (+) (x,y) = ... + + + + Infix operator member '{0}' has extra curried arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ... + Le membre opérateur infixe '{0}' a des arguments curryfiés supplémentaires. Tuple de 2 arguments attendu. Exemple : static member (+) (x,y) = ... + + + + All record, union and struct types in FSharp.Core.dll must be explicitly labelled with 'StructuralComparison' or 'NoComparison' + Tous les types enregistrement, union et struct dans FSharp.Core.dll doivent être étiquetés explicitement avec 'StructuralComparison' ou 'NoComparison' + + + + The struct, record or union type '{0}' has the 'StructuralComparison' attribute but the type parameter '{1}' does not satisfy the 'comparison' constraint. Consider adding the 'comparison' constraint to the type parameter + Le type struct, enregistrement ou union '{0}' a l'attribut 'StructuralComparison' mais le paramètre de type '{1}' ne satisfait pas la contrainte 'comparison'. Ajoutez la contrainte 'comparison' au paramètre de type + + + + The struct, record or union type '{0}' has the 'StructuralComparison' attribute but the component type '{1}' does not satisfy the 'comparison' constraint + Le type struct, enregistrement ou union '{0}' a l'attribut 'StructuralComparison' mais le type de composant '{1}' ne satisfait pas la contrainte 'comparison' + + + + The struct, record or union type '{0}' is not structurally comparable because the type parameter {1} does not satisfy the 'comparison' constraint. Consider adding the 'NoComparison' attribute to the type '{2}' to clarify that the type is not comparable + Le type struct, enregistrement ou union '{0}' n'est pas structurellement comparable, car le paramètre de type {1} ne satisfait pas la contrainte 'comparison'. Ajoutez l'attribut 'NoComparison' au type '{2}' pour préciser que le type n'est pas comparable + + + + The struct, record or union type '{0}' is not structurally comparable because the type '{1}' does not satisfy the 'comparison' constraint. Consider adding the 'NoComparison' attribute to the type '{2}' to clarify that the type is not comparable + Le type struct, enregistrement ou union '{0}' n'est pas structurellement comparable, car le type '{1}' ne satisfait pas la contrainte 'comparison'. Ajoutez l'attribut 'NoComparison' au type '{2}' pour préciser que le type n'est pas comparable + + + + The struct, record or union type '{0}' does not support structural equality because the type parameter {1} does not satisfy the 'equality' constraint. Consider adding the 'NoEquality' attribute to the type '{2}' to clarify that the type does not support structural equality + Le type struct, enregistrement ou union '{0}' ne prend pas en charge l'égalité structurelle, car le paramètre de type {1} ne satisfait pas la contrainte 'equality'. Ajoutez l'attribut 'NoEquality' au type '{2}' pour préciser que le type ne prend pas en charge l'égalité structurelle + + + + The struct, record or union type '{0}' does not support structural equality because the type '{1}' does not satisfy the 'equality' constraint. Consider adding the 'NoEquality' attribute to the type '{2}' to clarify that the type does not support structural equality + Le type struct, enregistrement ou union '{0}' ne prend pas en charge l'égalité structurelle, car le type '{1}' ne satisfait pas la contrainte 'equality'. Ajoutez l'attribut 'NoEquality' au type '{2}' pour préciser que le type ne prend pas en charge l'égalité structurelle + + + + The struct, record or union type '{0}' has the 'StructuralEquality' attribute but the type parameter '{1}' does not satisfy the 'equality' constraint. Consider adding the 'equality' constraint to the type parameter + Le type struct, enregistrement ou union '{0}' a l'attribut 'StructuralEquality' mais le paramètre de type '{1}' ne satisfait pas la contrainte 'equality'. Ajoutez la contrainte 'equality' au paramètre de type + + + + The struct, record or union type '{0}' has the 'StructuralEquality' attribute but the component type '{1}' does not satisfy the 'equality' constraint + Le type struct, enregistrement ou union '{0}' a l'attribut 'StructuralEquality' mais le type de composant '{1}' ne satisfait pas la contrainte 'equality' + + + + Each argument of the primary constructor for a struct must be given a type, for example 'type S(x1:int, x2: int) = ...'. These arguments determine the fields of the struct. + Chaque argument du constructeur principal d'un struct doit recevoir un type, par exemple 'type S(x1:int, x2: int) = ...'. Ces arguments déterminent les champs du struct. + + + + The value '{0}' is unused + La valeur '{0}' est inutilisée + + + + The recursive object reference '{0}' is unused. The presence of a recursive object reference adds runtime initialization checks to members in this and derived types. Consider removing this recursive object reference. + La référence d'objet récursive '{0}' n'est pas utilisée. La présence d'une référence d'objet récursive ajoute des vérifications de l'initialisation du runtime aux membres de ce type et des types dérivés. Supprimez cette référence d'objet récursive. + + + + A getter property may have at most one argument group + Une propriété de méthode getter peut avoir au maximum un groupe d'arguments + + + + A setter property may have at most two argument groups + Une propriété de méthode setter peut avoir au maximum deux groupes d'arguments + + + + Invalid property getter or setter + Méthode getter ou setter de propriété non valide + + + + An indexer property must be given at least one argument + Une propriété d'indexeur doit être définie avec au moins un argument + + + + This operation accesses a mutable top-level value defined in another assembly in an unsupported way. The value cannot be accessed through its address. Consider copying the expression to a mutable local, e.g. 'let mutable x = ...', and if necessary assigning the value back after the completion of the operation + Cette opération accède à une valeur de niveau supérieur mutable définie dans un autre assembly d'une manière non prise en charge. Impossible d'accéder à la valeur via son adresse. Copiez l'expression dans une variable locale mutable, par exemple 'let mutable x = ...', et si nécessaire, réassignez la valeur une fois l'opération terminée + + + + Remove spaces between the type name and type parameter, e.g. \"type C<'T>\", not type \"C <'T>\". Type parameters must be placed directly adjacent to the type name. + Les paramètres de type doivent être directement adjacents au nom de type, par exemple \"type C<'T>\" et non type \"C <'T>\" + + + + Remove spaces between the type name and type parameter, e.g. \"C<'T>\", not \"C <'T>\". Type parameters must be placed directly adjacent to the type name. + Les arguments de type doivent être directement adjacents au nom de type, par exemple \"C<'T>\" et non \"C <'T>\" + + + + The use of the type syntax 'int C' and 'C <int>' is not permitted here. Consider adjusting this type to be written in the form 'C<int>' + L'utilisation de la syntaxe de type 'int C' et 'C <int>' n'est pas autorisée ici. Modifiez ce type en l'écrivant sous la forme 'C<int>' + + + + The module/namespace '{0}' from compilation unit '{1}' did not contain the module/namespace '{2}' + Le module/l'espace de noms '{0}' de l'unité de compilation '{1}' ne contenait pas le module/l'espace de noms '{2}' + + + + The module/namespace '{0}' from compilation unit '{1}' did not contain the val '{2}' + Le module/l'espace de noms '{0}' de l'unité de compilation '{1}' ne contenait pas la valeur '{2}' + + + + The module/namespace '{0}' from compilation unit '{1}' did not contain the namespace, module or type '{2}' + Le module/l'espace de noms '{0}' de l'unité de compilation '{1}' ne contenait pas l'espace de noms, le module ou le type '{2}' + + + + The 'UseNullAsTrueValue' attribute flag may only be used with union types that have one nullary case and at least one non-nullary case + L'indicateur d'attribut 'UseNullAsTrueValue' ne peut être utilisé qu'avec des types union qui ont un cas nullaire et au moins un cas non nullaire + + + + The parameter '{0}' was inferred to have byref type. Parameters of byref type must be given an explicit type annotation, e.g. 'x1: byref<int>'. When used, a byref parameter is implicitly dereferenced. + Le paramètre '{0}' a été déduit pour avoir un type byref. Les paramètres de type byref doivent avoir une annotation de type explicite, par exemple 'x1: byref<int>'. Lorsqu'il est utilisé, un paramètre byref est déréférencé implicitement. + + + + The generic member '{0}' has been used at a non-uniform instantiation prior to this program point. Consider reordering the members so this member occurs first. Alternatively, specify the full type of the member explicitly, including argument types, return type and any additional generic parameters and constraints. + Le membre générique '{0}' a été utilisé au niveau d'une instanciation non uniforme avant ce point du programme. Réorganisez les membres afin que ce membre se produise en premier. Vous pouvez également spécifier le type complet du membre de façon explicite, y compris les types d'arguments, le type de retour et d'autres paramètres et contraintes génériques. + + + + The attribute '{0}' appears in both the implementation and the signature, but the attribute arguments differ. Only the attribute from the signature will be included in the compiled code. + L'attribut '{0}' est présent dans l'implémentation et dans la signature, mais les arguments de l'attribut sont différents. Seul l'attribut de la signature sera inclus dans le code compilé. + + + + Cannot call an abstract base member: '{0}' + Impossible d'appeler un membre de base abstrait : '{0}' + + + + Could not resolve the ambiguity in the use of a generic construct with an 'unmanaged' constraint at or near this position + Impossible de résoudre l'ambigüité liée à l'utilisation d'une construction générique avec une contrainte 'unmanaged' à cette position ou à proximité + + + + This construct is for ML compatibility. {0}. You can disable this warning by using '--mlcompatibility' or '--nowarn:62'. + Cette construction est pour la compatibilité ML. {0}. Vous pouvez désactiver cet avertissement en utilisant '--mlcompatibility' ou '--nowarn:62'. + + + + The type '{0}' has been marked as having an Explicit layout, but the field '{1}' has not been marked with the 'FieldOffset' attribute + Le type '{0}' a été marqué comme ayant une disposition Explicit, mais le champ '{1}' n'a pas été marqué avec l'attribut 'FieldOffset' + + + + Interfaces inherited by other interfaces should be declared using 'inherit ...' instead of 'interface ...' + Les interfaces héritées d'autres interfaces doivent être déclarées avec 'inherit ...' à la place de 'interface ...' + + + + Invalid prefix operator + Opérateur de préfixe non valide + + + + Invalid operator definition. Prefix operator definitions must use a valid prefix operator name. + Définition d'opérateur non valide. Les définitions d'opérateur de préfixe doivent utiliser un nom d'opérateur de préfixe valide. + + + + The file extensions '.ml' and '.mli' are for ML compatibility + Les extensions de fichiers '.ml' et '.mli' sont utilisées pour la compatibilité ML + + + + Consider using a file with extension '.ml' or '.mli' instead + Utilisez un fichier avec l'extension '.ml' ou '.mli' à la place + + + + Active pattern '{0}' is not a function + Le modèle actif '{0}' n'est pas une fonction + + + + Active pattern '{0}' 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' + Le modèle actif '{0}' a un type de résultat contenant des variables de type qui ne sont pas déterminées par l'entrée. Un cas de résultat n'est probablement pas mentionné, par ex. 'let (|A|B|) (x:int) = A x'. Cela peut être corrigé avec une contrainte de type, par ex. 'let (|A|B|) (x:int) : Choice<int,unit> = A x' + + + + The FieldOffset attribute can only be placed on members of types marked with the StructLayout(LayoutKind.Explicit) + L'attribut FieldOffset ne peut être placé que sur des membres de types marqués avec StructLayout(LayoutKind.Explicit) + + + + Optional arguments must come at the end of the argument list, after any non-optional arguments + Les arguments facultatifs doivent se trouver à la fin de la liste d'arguments, après les arguments non facultatifs + + + + Attribute 'System.Diagnostics.ConditionalAttribute' is only valid on methods or attribute classes + L'attribute 'System.Diagnostics.ConditionalAttribute' n'est valide que sur les méthodes ou les classes d'attributs + + + + Extension members cannot provide operator overloads. Consider defining the operator as part of the type definition instead. + Les membres d'extension ne peuvent pas fournir de surcharges d'opérateur. Définissez l'opérateur comme faisant partie de la définition de type. + + + + The name of the MDB file must be <assembly-file-name>.mdb. The --pdb option will be ignored. + Le nom du fichier MDB doit être <nom-fichier-assembly>.mdb. L'option --pdb sera ignorée. + + + + MDB generation failed. Could not find compatible member {0} + Échec de la génération de MDB. Le membre compatible {0} est introuvable + + + + Cannot generate MDB debug information. Failed to load the 'MonoSymbolWriter' type from the 'Mono.CompilerServices.SymbolWriter.dll' assembly. + Impossible de générer les informations de débogage de MDB. Le chargement du type 'MonoSymbolWriter' depuis l'assembly 'Mono.CompilerServices.SymbolWriter.dll' a échoué. + + + + The union case named '{0}' conflicts with the generated type '{1}' + Le cas d'union nommé '{0}' est en conflit avec le type généré '{1}' + + + + ReflectedDefinitionAttribute may not be applied to an instance member on a struct type, because the instance member takes an implicit 'this' byref parameter + ReflectedDefinitionAttribute ne peut pas être appliqué à un membre d'instance sur un type struct, car le membre d'instance utilise un paramètre byref 'this' implicite + + + + DLLImport bindings must be static members in a class or function definitions in a module + Les liaisons DLLImport doivent être des membres statiques dans une classe ou des définitions de fonction dans un module + + + + When mscorlib.dll or FSharp.Core.dll is explicitly referenced the {0} option must also be passed + Lorsque mscorlib.dll ou FSharp.Core.dll est explicitement référencé, l'option {0} doit également être passée + + + + FSharp.Core.sigdata not found alongside FSharp.Core. File expected in {0}. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required. + FSharp.Core.sigdata introuvable avec FSharp.Core. Fichier attendu dans {0}. Effectuez une mise à niveau vers une version plus récente de FSharp.Core, où ce fichier n'est plus nécessaire. + + + + File '{0}' not found alongside FSharp.Core. File expected in {1}. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required. + Fichier '{0}' introuvable avec FSharp.Core. Fichier attendu dans {1}. Effectuez une mise à niveau vers une version plus récente de FSharp.Core, où ce fichier n'est plus nécessaire. + + + + Filename '{0}' contains invalid character '{1}' + Le nom de fichier '{0}' contient le caractère non valide '{1}' + + + + 'use!' bindings must be of the form 'use! <var> = <expr>' + Les liaisons 'use!' doivent respecter le format 'use! <var> = <expr>' + + + + Inner generic functions are not permitted in quoted expressions. Consider adding some type constraints until this function is no longer generic. + Les fonctions génériques internes ne sont pas autorisées dans les expressions quotées. Ajoutez des contraintes de type jusqu'à ce que cette fonction ne soit plus générique. + + + + The type '{0}' is not a valid enumerator type , i.e. does not have a 'MoveNext()' method returning a bool, and a 'Current' property + Le type '{0}' n'est pas un type d'énumérateur valide, c-à-d qu'il n'a pas de méthode 'MoveNext()' qui retourne une valeur booléenne, ni de propriété 'Current' + + + + End of file in triple-quote string begun at or before here + La fin du fichier dans une chaîne à guillemets triples a commencé ici ou avant ici + + + + End of file in triple-quote string embedded in comment begun at or before here + La fin du fichier dans la chaîne à guillemets triples incorporée dans un commentaire a commencé ici ou avant ici + + + + This type test or downcast will ignore the unit-of-measure '{0}' + Ce test de type ou ce cast d'une classe de base va ignorer l'unité de mesure '{0}' + + + + Expected type argument or static argument + Argument de type ou argument statique attendu + + + + Unmatched '<'. Expected closing '>' + '<' sans correspondance. Une '>' fermante était attendue + + + + Unexpected quotation operator '<@' in type definition. If you intend to pass a verbatim string as a static argument to a type provider, put a space between the '<' and '@' characters. + Opérateur de citation inattendu '<@' dans la définition de type. Si vous envisagez de passer une chaîne textuelle en tant qu'argument statique à un fournisseur de type, insérez un espace entre les caractères '<' et '@'. + + + + Attempted to parse this as an operator name, but failed + La tentative d'analyse de cet élément en tant que nom d'opérateur a échoué + + + + \U{0} is not a valid Unicode character escape sequence + \U{0} n'est pas une séquence d'échappement de caractères Unicode valide + + + + '{0}' must be applied to an argument of type '{1}', but has been applied to an argument of type '{2}' + '{0}' doit être appliqué à un argument de type '{1}', mais il a été appliqué à un argument de type '{2}' + + + + '{0}' can only be applied to optional arguments + '{0}' peut uniquement être appliqué à des arguments facultatifs + + + + The specified .NET Framework version '{0}' is not supported. Please specify a value from the enumeration Microsoft.Build.Utilities.TargetDotNetFrameworkVersion. + La version spécifiée du .NET Framework ('{0}') n'est pas prise en charge. Spécifiez une valeur issue de l'énumération Microsoft.Build.Utilities.TargetDotNetFrameworkVersion. + + + + Invalid Magic value in CLR Header + Valeur magique non valide dans l'en-tête CLR + + + + Bad image format + Format d'image incorrect + + + + Private key expected + Clé privée attendue + + + + RSA key expected + Clé RSA attendue + + + + Invalid bit Length + Longueur de bit non valide + + + + Invalid RSAParameters structure - '{{0}}' expected + Structure RSAParameters non valide - '{{0}}' attendu + + + + Invalid algId - 'Exponent' expected + algId non valide - 'Exponent' attendu + + + + Invalid signature size + Taille de signature non valide + + + + No signature directory + Aucun répertoire de signature + + + + Invalid Public Key blob + Objet blob de clé publique non valide + + + + Exiting - too many errors + Fermeture en cours : trop d'erreurs + + + + The documentation file has no .xml suffix + Le fichier de documentation n'a pas de suffixe .xml + + + + No implementation files specified + Aucun fichier d'implémentation n'a été spécifié + + + + The attribute {0} specified version '{1}', but this value is invalid and has been ignored + L'attribut {0} a spécifié la version '{1}', mais cette valeur est non valide et a été ignorée + + + + Conflicting options specified: 'win32manifest' and 'win32res'. Only one of these can be used. + Options conflictuelles spécifiées : 'win32manifest' et 'win32res'. Seule l'une de ces options peut être utilisée. + + + + The code in assembly '{0}' makes uses of quotation literals. Static linking may not include components that make use of quotation literals unless all assemblies are compiled with at least F# 4.0. + Le code dans l'assembly '{0}' utilise des littéraux de citation. La liaison statique risque de ne pas inclure les composants qui utilisent des littéraux de citation, sauf si tous les assemblys sont compilés avec au moins F# 4.0. + + + + Code in this assembly makes uses of quotation literals. Static linking may not include components that make use of quotation literals unless all assemblies are compiled with at least F# 4.0. + Le code dans cet assembly utilise des littéraux de citation. La liaison statique risque de ne pas inclure les composants qui utilisent des littéraux de citation, sauf si tous les assemblys sont compilés avec au moins F# 4.0. + + + + Static linking may not include a .EXE + La liaison statique ne peut pas inclure de fichier .EXE + + + + Static linking may not include a mixed managed/unmanaged DLL + La liaison statique ne peut pas inclure une DLL mixte managée/non managée + + + + Ignoring mixed managed/unmanaged assembly '{0}' during static linking + L'assembly mixte managé/non managé '{0}' est ignoré lors de la liaison statique + + + + Assembly '{0}' was referenced transitively and the assembly could not be resolved automatically. Static linking will assume this DLL has no dependencies on the F# library or other statically linked DLLs. Consider adding an explicit reference to this DLL. + L'assembly '{0}' a été référencé transitivement et n'a pas pu être résolu automatiquement. La liaison statique suppose que cette DLL n'a pas de dépendances par rapport à la bibliothèque F# ou toute autre DLL liée de manière statique. Ajoutez une référence explicite à cette DLL. + + + + Assembly '{0}' not found in dependency set of target binary. Statically linked roots should be specified using an assembly name, without a DLL or EXE extension. If this assembly was referenced explicitly then it is possible the assembly was not actually required by the generated binary, in which case it should not be statically linked. + L'assembly '{0}' est introuvable dans le jeu de dépendances du fichier binaire cible. Les racines liées de manière statique doivent être spécifiées à l'aide d'un nom d'assembly, sans extension DLL ou EXE. Si cet assembly a été référencé explicitement, il est possible qu'il n'ait pas été réellement requis par le fichier binaire généré. Dans ce cas, il ne doit pas être lié de manière statique. + + + + The key file '{0}' could not be opened + Impossible d'ouvrir le fichier de clé '{0}' + + + + A problem occurred writing the binary '{0}': {1} + Un problème s'est produit lors de l'écriture du fichier binaire '{0}' : {1} + + + + The 'AssemblyVersionAttribute' has been ignored because a version was given using a command line option + 'AssemblyVersionAttribute' a été ignoré, car une version a été indiquée à l'aide d'une option en ligne de commande + + + + Error emitting 'System.Reflection.AssemblyCultureAttribute' attribute -- 'Executables cannot be satellite assemblies, Culture should always be empty' + Erreur lors de l'émission de l'attribut 'System.Reflection.AssemblyCultureAttribute' -- Les exécutables ne peuvent pas être des assemblys satellites. La culture doit toujours être vide + + + + Option '--delaysign' overrides attribute 'System.Reflection.AssemblyDelaySignAttribute' given in a source file or added module + L'option '--delaysign' remplace l'attribut 'System.Reflection.AssemblyDelaySignAttribute' fourni dans un fichier source ou un module ajouté + + + + Option '--keyfile' overrides attribute 'System.Reflection.AssemblyKeyFileAttribute' given in a source file or added module + L'option '--keyfile' remplace l'attribut 'System.Reflection.AssemblyKeyFileAttribute' fourni dans un fichier source ou un module ajouté + + + + Option '--keycontainer' overrides attribute 'System.Reflection.AssemblyNameAttribute' given in a source file or added module + L'option '--keycontainer' remplace l'attribut 'System.Reflection.AssemblyNameAttribute' fourni dans un fichier source ou un module ajouté + + + + The assembly '{0}' is listed on the command line. Assemblies should be referenced using a command line flag such as '-r'. + L'assembly '{0}' est répertorié sur la ligne de commande. Les assemblys doivent être référencés à l'aide d'un indicateur de ligne de commande, tel que '-r'. + + + + The resident compilation service was not used because a problem occured in communicating with the server. + Le service de compilation résident n'a pas été utilisé en raison d'un problème lors de la communication avec le serveur. + + + + Problem with filename '{0}': Illegal characters in path. + Problème avec le nom de fichier '{0}' : caractères non valides dans le chemin. + + + + Passing a .resx file ({0}) as a source file to the compiler is deprecated. Use resgen.exe to transform the .resx file into a .resources file to pass as a --resource option. If you are using MSBuild, this can be done via an <EmbeddedResource> item in the .fsproj project file. + Le passage d'un fichier .resx ({0}) en tant que fichier source au compilateur est déconseillé. Utilisez resgen.exe pour transformer le fichier .resx file en fichier .resources devant être passé en tant qu'option --resource. Si vous utilisez MSBuild, vous pouvez effectuer cette opération via un élément <EmbeddedResource> dans le fichier de projet .fsproj. + + + + Static linking may not be used on an assembly referencing mscorlib (e.g. a .NET Framework assembly) when generating an assembly that references System.Runtime (e.g. a .NET Core or Portable assembly). + Les liens statiques ne doivent pas être utilisés sur un assembly qui référence mscorlib (par ex., un assembly .NET Framework) pendant la génération d'un assembly qui référence System.Runtime (par ex., un assembly .NET Core ou portable). + + + + An {0} specified version '{1}', but this value is a wildcard, and you have requested a deterministic build, these are in conflict. + {0} a spécifié la version '{1}', mais cette valeur est un caractère générique, et comme vous avez demandé une build déterministe, il existe un conflit. + + + + Determinstic builds only support portable PDBs (--debug:portable or --debug:embedded) + Les builds déterministes ne prennent en charge que les fichiers PDB portables (--debug:portable ou --debug:embedded) + + + + Character '{0}' is not allowed in provided namespace name '{1}' + Le caractère '{0}' n'est pas autorisé dans le nom d'espace de noms fourni '{1}' + + + + The provided type '{0}' returned a member with a null or empty member name + Le type fourni '{0}' a retourné un membre avec un nom de membre Null ou vide + + + + The provided type '{0}' returned a null member + Le type fourni '{0}' a retourné un membre Null + + + + The provided type '{0}' member info '{1}' has null declaring type + Les infos de membre '{1}' du type fourni '{0}' ont un type déclarant Null + + + + The provided type '{0}' has member '{1}' which has declaring type '{2}'. Expected declaring type to be the same as provided type. + Le type fourni '{0}' a un membre '{1}' de type déclarant '{2}'. Le type déclarant attendu est le même que le type fourni. + + + + Referenced assembly '{0}' has assembly level attribute '{1}' but no public type provider classes were found + L'assembly référencé '{0}' a un attribut de niveau assembly '{1}', mais aucune classe de fournisseur de type publique n'a été trouvée + + + + Type '{0}' from type provider '{1}' has an empty namespace. Use 'null' for the global namespace. + Le type '{0}' du fournisseur de type '{1}' a un espace de noms vide. Utilisez 'null' pour l'espace de noms global. + + + + Empty namespace found from the type provider '{0}'. Use 'null' for the global namespace. + Un nom d'espace vide a été trouvé par le fournisseur de type '{0}'. Utilisez 'null' pour l'espace de noms global. + + + + Provided type '{0}' has 'IsGenericType' as true, but generic types are not supported. + 'IsGenericType' a la valeur True pour le type fourni '{0}', mais les types génériques ne sont pas pris en charge. + + + + Provided type '{0}' has 'IsArray' as true, but array types are not supported. + 'IsArray' a la valeur True pour le type fourni '{0}', mais les types de tableau ne sont pas pris en charge. + + + + Invalid member '{0}' on provided type '{1}'. Provided type members must be public, and not be generic, virtual, or abstract. + Membre '{0}' non valide sur le type fourni '{1}'. Les membres de type fourni doivent être publics et non pas génériques, virtuels ou abstraits. + + + + Invalid member '{0}' on provided type '{1}'. Only properties, methods and constructors are allowed + Membre non valide '{0}' sur le type fourni '{1}'. Seuls les propriétés, les méthodes et les constructeurs sont autorisés + + + + Property '{0}' on provided type '{1}' has CanRead=true but there was no value from GetGetMethod() + La propriété '{0}' sur le type fourni '{1}' a CanRead=true, mais aucune valeur n'a été retournée par GetGetMethod() + + + + Property '{0}' on provided type '{1}' has CanRead=false but GetGetMethod() returned a method + La propriété '{0}' sur le type fourni '{1}' a CanRead=false, mais GetGetMethod() a retourné une méthode + + + + Property '{0}' on provided type '{1}' has CanWrite=true but there was no value from GetSetMethod() + La propriété '{0}' sur le type fourni '{1}' a CanWrite=true, mais aucune valeur n'a été retournée par GetSetMethod() + + + + Property '{0}' on provided type '{1}' has CanWrite=false but GetSetMethod() returned a method + La propriété '{0}' sur le type fourni '{1}' a CanWrite=false, mais GetSetMethod() a retourné une méthode + + + + One or more errors seen during provided type setup + Une ou plusieurs erreurs se sont produites pendant la configuration du type fourni + + + + Unexpected exception from provided type '{0}' member '{1}': {2} + Exception inattendue levée par le type fourni '{0}', membre '{1}' : {2} + + + + Unsupported constant type '{0}'. Quotations provided by type providers can only contain simple constants. The implementation of the type provider may need to be adjusted by moving a value declared outside a provided quotation literal to be a 'let' binding inside the quotation literal. + Type de constante '{0}' non pris en charge. Les quotations fournies par les fournisseurs de type peuvent uniquement contenir des constantes simples. L'implémentation du fournisseur de type peut nécessiter un ajustement consistant à remplacer une valeur déclarée en dehors d'un littéral de quotation fourni par une liaison 'let' au sein du littéral de quotation. + + + + Unsupported expression '{0}' from type provider. If you are the author of this type provider, consider adjusting it to provide a different provided expression. + Expression '{0}' non prise en charge retournée par le fournisseur de type. Si vous êtes l'auteur de ce fournisseur de type, envisagez de l'ajuster pour présenter une expression fournie différente. + + + + Expected provided type named '{0}' but provided type has 'Name' with value '{1}' + Un type fourni nommé '{0}' était attendu, mais 'Name' a la valeur '{1}' pour le type fourni + + + + Event '{0}' on provided type '{1}' has no value from GetAddMethod() + L'événement '{0}' sur le type fourni '{1}' n'a pas de valeur de GetAddMethod() + + + + Event '{0}' on provided type '{1}' has no value from GetRemoveMethod() + L'événement '{0}' sur le type fourni '{1}' n'a pas de valeur de GetRemoveMethod() + + + + Assembly attribute '{0}' refers to a designer assembly '{1}' which cannot be loaded or doesn't exist. {2} + L'attribut d'assembly '{0}' fait référence à un assembly de concepteur '{1}' qui ne peut pas être chargé ou qui n'existe pas. {2} + + + + The type provider does not have a valid constructor. A constructor taking either no arguments or one argument of type 'TypeProviderConfig' was expected. + Le fournisseur de type n'a pas de constructeur valide. Un constructeur sans argument ou prenant un argument de type 'TypeProviderConfig' était attendu. + + + + The type provider '{0}' reported an error: {1} + Le fournisseur de type '{0}' a signalé une erreur : {1} + + + + The type provider '{0}' used an invalid parameter in the ParameterExpression: {1} + Le fournisseur de type '{0}' a utilisé un paramètre non valide dans ParameterExpression : {1} + + + + The type provider '{0}' provided a method with a name '{1}' and metadata token '{2}', which is not reported among its methods of its declaring type '{3}' + Le fournisseur de type '{0}' a fourni une méthode avec un nom '{1}' et un jeton de métadonnées '{2}' qui ne figure pas parmi ses méthodes du type déclarant '{3}' + + + + The type provider '{0}' provided a constructor which is not reported among the constructors of its declaring type '{1}' + Le fournisseur de type '{0}' a fourni un constructeur qui ne figure pas parmi les constructeurs de son type déclarant ' '{1}' + + + + A direct reference to the generated type '{0}' is not permitted. Instead, use a type definition, e.g. 'type TypeAlias = <path>'. This indicates that a type provider adds generated types to your assembly. + Une référence directe au type généré '{0}' n'est pas autorisée. À la place, utilisez une définition de type, par exemple 'type TypeAlias = <chemin>'. Ceci indique qu'un fournisseur de type ajoute les types générés à votre assembly. + + + + Expected provided type with path '{0}' but provided type has path '{1}' + Un type fourni utilisant le chemin '{0}' était attendu, mais le type fourni utilise le chemin '{1}' + + + + Unexpected 'null' return value from provided type '{0}' member '{1}' + Valeur 'null' inattendue retournée par le type fourni '{0}', membre '{1}' + + + + Unexpected exception from member '{0}' of provided type '{1}' member '{2}': {3} + Exception inattendue levée par le membre '{0}' du type fourni '{1}', membre '{2}' : {3} + + + + Nested provided types do not take static arguments or generic parameters + Les types fournis imbriqués ne prennent pas d'arguments statiques ni de paramètres génériques + + + + Invalid static argument to provided type. Expected an argument of kind '{0}'. + L'argument statique transmis au type fourni n'est pas valide. Un argument du genre '{0}' était attendu. + + + + An error occured applying the static arguments to a provided type + Une erreur s'est produite lors de l'application des arguments statiques à un type fourni + + + + Unknown static argument kind '{0}' when resolving a reference to a provided type or method '{1}' + Genre d'argument statique inconnu '{0}' durant la résolution d'une référence à un type ou une méthode fournie '{1}' + + + + invalid namespace for provided type + espace de noms non valide pour le type fourni + + + + invalid full name for provided type + nom complet non valide pour le type fourni + + + + The type provider returned 'null', which is not a valid return value from '{0}' + Le fournisseur de type a retourné 'null', qui n'est pas une valeur de retour valide de '{0}' + + + + The type provider constructor has thrown an exception: {0} + Le constructeur du fournisseur de type a levé une exception : {0} + + + + Type provider '{0}' returned null from GetInvokerExpression. + Le fournisseur de type '{0}' a retourné Null de GetInvokerExpression. + + + + The type provider '{0}' returned an invalid type from 'ApplyStaticArguments'. A type with name '{1}' was expected, but a type with name '{2}' was returned. + Le fournisseur de type '{0}' a retourné un type non valide de 'ApplyStaticArguments'. Un type nommé '{1}' était attendu, mais un type nommé '{2}' a été retourné. + + + + The type provider '{0}' returned an invalid method from 'ApplyStaticArgumentsForMethod'. A method with name '{1}' was expected, but a method with name '{2}' was returned. + Le fournisseur de type '{0}' a retourné une méthode non valide à partir de 'ApplyStaticArgumentsForMethod'. La méthode nommée '{1}' était attendue, mais la méthode nommée '{2}' a été retournée. + + + + This type test or downcast will erase the provided type '{0}' to the type '{1}' + Ce test de type ou ce cast d'une classe de base va effacer le type fourni '{0}' et le remplacer par le type '{1}' + + + + This downcast will erase the provided type '{0}' to the type '{1}'. + Ce cast d'une classe de base va effacer le type fourni '{0}' et le remplacer par le type '{1}'. + + + + This type test with a provided type '{0}' is not allowed because this provided type will be erased to '{1}' at runtime. + Ce test de type avec un type fourni '{0}' n'est pas autorisé, car ce type fourni sera effacé et remplacé par '{1}' au moment de l'exécution. + + + + Cannot inherit from erased provided type + Impossible d'hériter d'un type fourni effacé + + + + Assembly '{0}' hase TypeProviderAssembly attribute with invalid value '{1}'. The value should be a valid assembly name + L'assembly '{0}' a un attribut TypeProviderAssembly comportant la valeur non valide '{1}'. La valeur doit être un nom d'assembly valide + + + + Invalid member name. Members may not have name '.ctor' or '.cctor' + Nom de membre non valide. Les membres ne peuvent pas être appelés '.ctor' ou '.cctor' + + + + The function or member '{0}' is used in a way that requires further type annotations at its definition to ensure consistency of inferred types. The inferred signature is '{1}'. + La fonction ou le membre '{0}' est utilisé d'une manière qui nécessite d'autres annotations de type au niveau de sa définition pour garantir la cohérence des types déduits. La signature déduite est '{1}'. + + + + The number of type arguments did not match: '{0}' given, '{1}' expected. This may be related to a previously reported error. + Le nombre d'arguments de type ne correspond pas : '{0}' fournis, '{1}' attendus. Ceci peut-être dû à une erreur signalée précédemment. + + + + Cannot override inherited member '{0}' because it is sealed + Impossible de remplacer le membre hérité '{0}', car il est sealed + + + + The type provider '{0}' reported an error in the context of provided type '{1}', member '{2}'. The error: {3} + Le fournisseur de type '{0}' a signalé une erreur dans le contexte du type fourni '{1}', membre '{2}'. Erreur : {3} + + + + An exception occurred when accessing the '{0}' of a provided type: {1} + Une exception s'est produite lors de l'accès au '{0}' d'un type fourni : {1} + + + + The '{0}' of a provided type was null or empty. + Le '{0}' d'un type fourni était Null ou vide. + + + + Character '{0}' is not allowed in provided type name '{1}' + Le caractère '{0}' n'est pas autorisé dans le nom de type fourni '{1}' + + + + In queries, '{0}' must use a simple pattern + Dans les requêtes, '{0}' doit utiliser un modèle simple + + + + A custom query operation for '{0}' is required but not specified + Une opération de requête personnalisée pour '{0}' est requise mais non spécifiée + + + + Named static arguments must come after all unnamed static arguments + Les arguments statiques nommés doivent suivre tous les arguments statiques non nommés + + + + The static parameter '{0}' of the provided type or method '{1}' requires a value. Static parameters to type providers may be optionally specified using named arguments, e.g. '{2}<{3}=...>'. + Le paramètre statique '{0}' du type ou de la méthode fournie '{1}' nécessite une valeur. Les paramètres statiques des fournisseurs de type peuvent être spécifiés de manière facultative à l'aide d'arguments nommés, par exemple '{2}<{3}=...>'. + + + + No static parameter exists with name '{0}' + Il n'existe aucun paramètre statique nommé '{0}' + + + + The static parameter '{0}' has already been given a value + Une valeur a déjà été attribuée au paramètre statique '{0}' + + + + Multiple static parameters exist with name '{0}' + Il existe plusieurs paramètres statiques nommés '{0}' + + + + A custom operation may not be used in conjunction with a non-value or recursive 'let' binding in another part of this computation expression + Une opération personnalisée ne peut pas être utilisée en association avec une liaison sans valeur ou 'let' récursive dans une autre partie de cette expression de calcul + + + + A custom operation may not be used in conjunction with 'use', 'try/with', 'try/finally', 'if/then/else' or 'match' operators within this computation expression + Une opération personnalisée ne peut pas être utilisée en association avec les opérateurs 'use', 'try/with', 'try/finally', 'if/then/else' ou 'match' dans cette expression de calcul + + + + The custom operation '{0}' refers to a method which is overloaded. The implementations of custom operations may not be overloaded. + L'opération personnalisée '{0}' fait référence à une méthode surchargée. Les implémentations d'opérations personnalisées ne peuvent pas être surchargées. + + + + An if/then/else expression may not be used within queries. Consider using either an if/then expression, or use a sequence expression instead. + Les expressions if/then/else ne peuvent pas être utilisées au sein des requêtes. Utilisez soit une expression if/then, soit une expression de séquence. + + + + Invalid argument to 'methodhandleof' during codegen + Argument non valide passé à 'methodhandleof' pendant la génération du code + + + + A reference to a provided type was missing a value for the static parameter '{0}'. You may need to recompile one or more referenced assemblies. + Il manque une valeur pour le paramètre statique '{0}' dans une référence à un type fourni. Vous devrez peut-être recompiler un ou plusieurs assemblys référencés. + + + + A reference to a provided type had an invalid value '{0}' for a static parameter. You may need to recompile one or more referenced assemblies. + Une référence à un type fourni a une valeur non valide '{0}' pour un paramètre statique. Vous devrez peut-être recompiler un ou plusieurs assemblys référencés. + + + + '{0}' is not used correctly. This is a custom operation in this query or computation expression. + '{0}' n'est pas utilisé correctement. Il s'agit d'une opération personnalisée dans cette requête ou opération de calcul. + + + + '{0}' is not used correctly. Usage: {1}. This is a custom operation in this query or computation expression. + '{0}' n'est pas utilisé correctement. Utilisation : {1}. Il s'agit d'une opération personnalisée dans cette requête ou expression de calcul. + + + + {0} var in collection {1} (outerKey = innerKey). Note that parentheses are required after '{2}' + {0} var in collection {1} (outerKey = innerKey). Notez que les parenthèses sont obligatoires après '{2}' + + + + {0} var in collection {1} (outerKey = innerKey) into group. Note that parentheses are required after '{2}' + {0} var in collection {1} (outerKey = innerKey) dans le groupe. Notez que les parenthèses sont obligatoires après '{2}' + + + + {0} var in collection + {0} var in collection + + + + '{0}' must be followed by a variable name. Usage: {1}. + '{0}' doit être suivi d'un nom de variable. Utilisation : {1}. + + + + Incorrect syntax for '{0}'. Usage: {1}. + Syntaxe incorrecte pour '{0}'. Utilisation : {1}. + + + + '{0}' must come after a 'for' selection clause and be followed by the rest of the query. Syntax: ... {1} ... + '{0}' doit suivre une clause de sélection 'for' et être suivi du reste de la requête. Syntaxe : ... {1} ... + + + + '{0}' is used with an incorrect number of arguments. This is a custom operation in this query or computation expression. Expected {1} argument(s), but given {2}. + '{0}' est utilisé avec un nombre incorrect d'arguments. Il s'agit d'une opération personnalisée dans cette requête ou expression de calcul. {1} argument(s) attendu(s), mais {2} fourni(s). + + + + Expected an expression after this point + Une expression était attendue après ce point + + + + Expected a type after this point + Un type était attendu après ce point + + + + Unmatched '[<'. Expected closing '>]' + Caractères '[<' non appariés. Les caractères '>]' de fermeture était attendus + + + + Unexpected end of input in 'match' expression. Expected 'match <expr> with | <pat> -> <expr> | <pat> -> <expr> ...'. + Fin d'entrée inattendue dans l'expression 'match'. 'match <expr> with | <pat> -> <expr> | <pat> -> <expr>…' était attendu. + + + + Unexpected end of input in 'try' expression. Expected 'try <expr> with <rules>' or 'try <expr> finally <expr>'. + Fin d'entrée inattendue dans l'expression 'try'. 'try <expr> with <rules>' ou 'try <expr> finally <expr>' était attendu. + + + + Unexpected end of input in 'while' expression. Expected 'while <expr> do <expr>'. + Fin d'entrée inattendue dans l'expression 'while'. 'while <expr> do <expr>' était attendu. + + + + Unexpected end of input in 'for' expression. Expected 'for <pat> in <expr> do <expr>'. + Fin d'entrée inattendue dans l'expression 'for'. 'for <pat> in <expr> do <expr>' était attendu. + + + + Unexpected end of input in 'match' or 'try' expression + Fin d'entrée inattendue dans l'expression 'match' ou 'try' + + + + Unexpected end of input in 'then' branch of conditional expression. Expected 'if <expr> then <expr>' or 'if <expr> then <expr> else <expr>'. + Fin d'entrée inattendue dans la branche 'then' d'une expression conditionnelle. 'if <expr> then <expr>' or 'if <expr> then <expr> else <expr>' était attendu. + + + + Unexpected end of input in 'else' branch of conditional expression. Expected 'if <expr> then <expr>' or 'if <expr> then <expr> else <expr>'. + Fin d'entrée inattendue dans la branche 'else' d'une expression conditionnelle. 'if <expr> then <expr>' or 'if <expr> then <expr> else <expr>' était attendu. + + + + Unexpected end of input in body of lambda expression. Expected 'fun <pat> ... <pat> -> <expr>'. + Fin d'entrée inattendue dans le corps de l'expression lambda. 'fun <pat> … <pat> -> <expr>' était attendu. + + + + Unexpected end of input in type arguments + Fin d'entrée inattendue dans les arguments de type + + + + Unexpected end of input in type signature + Fin d'entrée inattendue dans la signature de type + + + + Unexpected end of input in type definition + Fin d'entrée inattendue dans la définition de type + + + + Unexpected end of input in object members + Fin d'entrée inattendue dans les membres d'objet + + + + Unexpected end of input in value, function or member definition + Fin d'entrée inattendue dans la définition de valeur, de fonction ou de membre + + + + Unexpected end of input in expression + Fin d'entrée inattendue dans l'expression + + + + Unexpected end of type. Expected a name after this point. + Fin de type inattendue. Un nom était attendu après ce point. + + + + Incomplete value or function definition. If this is in an expression, the body of the expression must be indented to the same column as the 'let' keyword. + Définition de valeur ou de fonction incomplète. S'il s'agit d'une expression, le corps de l'expression doit être mis en retrait sur la même colonne que le mot-clé 'let'. + + + + Incomplete value definition. If this is in an expression, the body of the expression must be indented to the same column as the 'let!' keyword. + Définition de valeur incomplète. S'il s'agit d'une expression, le corps de l'expression doit être mis en retrait sur la même colonne que le mot-clé 'let!'. + + + + Incomplete value definition. If this is in an expression, the body of the expression must be indented to the same column as the 'use!' keyword. + Définition de valeur incomplète. S'il s'agit d'une expression, le corps de l'expression doit être mis en retrait sur la même colonne que le mot-clé 'use!'. + + + + Incomplete value definition. If this is in an expression, the body of the expression must be indented to the same column as the 'use' keyword. + Définition de valeur incomplète. S'il s'agit d'une expression, le corps de l'expression doit être mis en retrait sur la même colonne que le mot-clé 'use'. + + + + Missing 'do' in 'while' expression. Expected 'while <expr> do <expr>'. + 'do' est manquant dans l'expression 'while'. 'while <expr> do <expr>' était attendu. + + + + Missing 'do' in 'for' expression. Expected 'for <pat> in <expr> do <expr>'. + 'do' est manquant dans l'expression 'for'. 'for <pat> in <expr> do <expr>' était attendu. + + + + Invalid join relation in '{0}'. Expected 'expr <op> expr', where <op> is =, =?, ?= or ?=?. + Relation de jointure non valide dans '{0}'. 'expr <op> expr' où <op> est =, =?, ?= ou ?=? était attendu. + + + + Calls + Appels + + + + Invalid number of generic arguments to type '{0}' in provided type. Expected '{1}' arguments, given '{2}'. + Nombre d'arguments génériques non valide pour le type '{0}' dans le type fourni. '{1}' arguments étaient attendus, '{2}' ont été fournis. + + + + Invalid value '{0}' for unit-of-measure parameter '{1}' + Valeur non valide '{0}' pour le paramètre d'unité de mesure '{1}' + + + + Invalid value unit-of-measure parameter '{0}' + Valeur de paramètre d'unité de mesure non valide '{0}' + + + + Property '{0}' on provided type '{1}' is neither readable nor writable as it has CanRead=false and CanWrite=false + La propriété '{0}' sur le type fourni '{1}' ne peut être ni lue ni écrite, car CanRead=false et CanWrite=false + + + + A use of 'into' must be followed by the remainder of the computation + L'utilisation de 'into' doit être suivie du reste du calcul + + + + The operator '{0}' does not accept the use of 'into' + L'opérateur '{0}' n'accepte pas l'utilisation de 'into' + + + + The definition of the custom operator '{0}' does not use a valid combination of attribute flags + La définition de l'opérateur personnalisé '{0}' n'utilise pas de combinaison d'indicateurs d'attributs valide + + + + This type definition may not have the 'CLIMutable' attribute. Only record types may have this attribute. + Cette définition de type ne peut pas avoir d'attribut 'CLIMutable'. Seuls les types d'enregistrements peuvent avoir cet attribut. + + + + 'member val' definitions are only permitted in types with a primary constructor. Consider adding arguments to your type definition, e.g. 'type X(args) = ...'. + Les définitions 'member val' sont uniquement autorisées dans les types avec un constructeur principal. Ajoutez des arguments à votre définition de type, par exemple 'type X(args) =…'. + + + + Property definitions may not be declared mutable. To indicate that this property can be set, use 'member val PropertyName = expr with get,set'. + Les définitions de propriété ne doivent pas être déclarées comme étant mutables. Pour indiquer que cette propriété peut être définie, utilisez 'member val PropertyName = expr with get,set'. + + + + To indicate that this property can be set, use 'member val PropertyName = expr with get,set'. + Pour indiquer que cette propriété peut être définie, utilisez 'member val PropertyName = expr with get,set'. + + + + Type '{0}' is illegal because in byref<T>, T cannot contain byref types. + Le type '{0}' est interdit, car dans byref<T>, T ne peut pas contenir de types byref. + + + + F# supports array ranks between 1 and 32. The value {0} is not allowed. + F# prend en charge les rangs de tableau compris entre 1 et 32. La valeur {0} n'est pas autorisée. + + + + In queries, use the form 'for x in n .. m do ...' for ranging over integers + Dans les requêtes, utilisez la forme 'for x in n .. m do …' pour couvrir les entiers + + + + 'while' expressions may not be used in queries + Les expressions 'while' ne peuvent pas être utilisées dans les requêtes + + + + 'try/finally' expressions may not be used in queries + Les expressions 'try/finally' ne peuvent pas être utilisées dans les requêtes + + + + 'use' expressions may not be used in queries + Les expressions 'use' ne peuvent pas être utilisées dans les requêtes + + + + 'let!', 'use!' and 'do!' expressions may not be used in queries + Les expressions 'let!', 'use!' et 'do!' ne sont pas utilisées dans les requêtes + + + + 'return' and 'return!' may not be used in queries + 'return' et 'return!' ne peuvent pas être utilisés dans les requêtes + + + + This is not a known query operator. Query operators are identifiers such as 'select', 'where', 'sortBy', 'thenBy', 'groupBy', 'groupValBy', 'join', 'groupJoin', 'sumBy' and 'averageBy', defined using corresponding methods on the 'QueryBuilder' type. + Cet opérateur de requête est inconnu. Les opérateurs de requête sont des identificateurs, tels que 'select', 'where', 'sortBy', 'thenBy', 'groupBy', 'groupValBy', 'join', 'groupJoin', 'sumBy' et 'averageBy', définis à l'aide de méthodes correspondantes sur le type 'QueryBuilder'. + + + + 'try/with' expressions may not be used in queries + Les expressions 'try/with' ne peuvent pas être utilisées dans les requêtes + + + + This 'let' definition may not be used in a query. Only simple value definitions may be used in queries. + Cette définition 'let' ne peut pas être utilisée dans une requête. Seules les définitions de valeur simple peuvent être utilisées dans les requêtes. + + + + Too many static parameters. Expected at most {0} parameters, but got {1} unnamed and {2} named parameters. + Paramètres statiques trop nombreux. {0} paramètres au maximum étaient attendus, mais {1} paramètres non nommés et {2} paramètres nommés ont été reçus. + + + + Invalid provided literal value '{0}' + Valeur littérale fournie non valide '{0}' + + + + The 'anycpu32bitpreferred' platform can only be used with EXE targets. You must use 'anycpu' instead. + La plateforme 'anycpu32bitpreferred' peut uniquement être utilisée avec des cibles EXE. Vous devez utiliser 'anycpu' à la place. + + + + This member, function or value declaration may not be declared 'inline' + Cette déclaration de membre, de fonction ou de valeur ne peut pas être déclarée comme étant 'inline' + + + + The provider '{0}' returned a non-generated type '{1}' in the context of a set of generated types. Consider adjusting the type provider to only return generated types. + Le fournisseur '{0}' a retourné un type non généré '{1}' dans le contexte d'un ensemble de type générés. Envisagez d'ajuster le fournisseur de type de manière à retourner uniquement les types générés. + + + + Arguments to query operators may require parentheses, e.g. 'where (x > y)' or 'groupBy (x.Length / 10)' + Les arguments des opérateurs de requête nécessitent des parenthèses, par exemple where (x > y)' ou 'groupBy (x.Length / 10)' + + + + A quotation may not involve an assignment to or taking the address of a captured local variable + Une citation ne peut pas impliquer d'assignation à une variable locale capturée ou d'utilisation de l'adresse de cette dernière + + + + + 1 overload + + 1 surcharge + + + + + {0} overloads + + {0} surcharges + + + + Erased to + Effacé de + + + + Unexpected token '{0}' or incomplete expression + Jeton inattendu '{0}' ou expression incomplète + + + + Cannot find code target for this attribute, possibly because the code after the attribute is incomplete. + La cible du code est introuvable pour cet attribut, peut-être parce que le code après l'attribut est incomplet. + + + + Type name cannot be empty. + Le nom de type ne peut pas être vide. + + + + Problem reading assembly '{0}': {1} + Problème lors de la lecture de l'assembly '{0}' : {1} + + + + Invalid provided field. Provided fields of erased provided types must be literals. + Champ fourni non valide. Les champs fournis de types fournis effacés doivent être des littéraux. + + + + (loading description...) + (chargement de la description...) + + + + (description unavailable...) + (description non disponible...) + + + + A type variable has been constrained by multiple different class types. A type variable may only have one class constraint. + Une variable de type a été contrainte par plusieurs types de classes différents. Une variable de type ne peut avoir qu'une contrainte de classe. + + + + 'match' expressions may not be used in queries + Les expressions 'match' ne peuvent pas être utilisées dans les requêtes + + + + Infix operator member '{0}' has {1} initial argument(s). Expected a tuple of 3 arguments + Le membre opérateur infixe '{0}' a {1} argument initiaux. Tuple de 3 arguments attendu + + + + The operator '{0}' cannot be resolved. Consider opening the module 'Microsoft.FSharp.Linq.NullableOperators'. + Impossible de résoudre l'opérateur '{0}'. Essayez d'ouvrir le module 'Microsoft.FSharp.Linq.NullableOperators'. + + + + '{0}' must be followed by 'in'. Usage: {1}. + '{0}' doit être suivi de 'in'. Utilisation : {1}. + + + + Neither 'member val' nor 'override val' definitions are permitted in object expressions. + Les définitions 'member val' et 'override val' ne sont pas autorisées dans les expressions d'objet. + + + + Copy-and-update record expressions must include at least one field. + Les expressions d'enregistrement de copie et mise à jour doivent inclure au moins un champ. + + + + '_' cannot be used as field name + '_' ne peut pas être utilisé comme nom de champ + + + + The provided types generated by this use of a type provider may not be used from other F# assemblies and should be marked internal or private. Consider using 'type internal TypeName = ...' or 'type private TypeName = ...'. + Les types fournis générés par cette utilisation d'un fournisseur de type ne peuvent pas être utilisés à partir d'autres assemblys F# et doivent être marqués comme internes ou privés. Envisagez d'utiliser 'type internal TypeName = ...' ou 'type private TypeName = ...'. + + + + A property's getter and setter must have the same type. Property '{0}' has getter of type '{1}' but setter of type '{2}'. + Les méthodes getter et setter d'une propriété doivent avoir le même type. La propriété '{0}' a une méthode getter de type '{1}' alors que sa méthode setter est de type '{2}'. + + + + Array method '{0}' is supplied by the runtime and cannot be directly used in code. For operations with array elements consider using family of GetArray/SetArray functions from LanguagePrimitives.IntrinsicFunctions module. + La méthode Array '{0}' est fournie par le runtime et ne peut pas être utilisée directement dans le code. Pour les opérations comportant des éléments Array, envisagez d'utiliser la famille de fonctions GetArray/SetArray du module LanguagePrimitives.IntrinsicFunctions. + + + + The union case '{0}' does not have a field named '{1}'. + Le cas ou l'exception d'union '{0}' ne possède pas de champ nommé '{1}'. + + + + Union case/exception field '{0}' cannot be used more than once. + Le champ de cas ou d'exception d'union '{0}' ne peut pas être utilisé plusieurs fois. + + + + Named field '{0}' is used more than once. + Le champ nommé '{0}' est utilisé plusieurs fois. + + + + Named field '{0}' conflicts with autogenerated name for anonymous field. + Le champ nommé '{0}' est en conflit avec le nom généré automatiquement pour le champ anonyme. + + + + This literal expression or attribute argument results in an arithmetic overflow. + Cette expression littérale ou cet argument d'attribut engendre un dépassement arithmétique. + + + + This is not valid literal expression. The [<Literal>] attribute will be ignored. + Ceci n'est pas une expression littérale valide. L'attribut [<Literal>] va être ignoré. + + + + System.Runtime.InteropServices assembly is required to use UnknownWrapper\DispatchWrapper classes. + L'assembly System.Runtime.InteropServices est requis pour l'utilisation de classes UnknownWrapper\DispatchWrapper. + + + + The mutable local '{0}' is implicitly allocated as a reference cell because it has been captured by a closure. This warning is for informational purposes only to indicate where implicit allocations are performed. + Le mutable local '{0}' est implicitement alloué en tant que cellule de référence, car il a été capturé par une clôture. Cet avertissement est fourni à titre d'information uniquement pour indiquer l'emplacement où les allocations implicites sont effectuées. + + + + A type provider implemented GetStaticParametersForMethod, but ApplyStaticArgumentsForMethod was not implemented or invalid + Un fournisseur de type a implémenté GetStaticParametersForMethod, mais ApplyStaticArgumentsForMethod n'a pas été implémenté ou est non valide + + + + An error occured applying the static arguments to a provided method + Une erreur s'est produite durant l'application des arguments statiques à une méthode fournie + + + + Unexpected character '{0}' in preprocessor expression + Caractère '{0}' inattendu dans l'expression de préprocesseur + + + + Unexpected token '{0}' in preprocessor expression + Jeton '{0}' inattendu dans l'expression de préprocesseur + + + + Incomplete preprocessor expression + Expression de préprocesseur incomplète + + + + Missing token '{0}' in preprocessor expression + Jeton '{0}' manquant dans l'expression de préprocesseur + + + + An error occurred while reading the F# metadata node at position {0} in table '{1}' of assembly '{2}'. The node had no matching declaration. Please report this warning. You may need to recompile the F# assembly you are using. + Une erreur s'est produite lors de la lecture du nœud de métadonnées F# à la position {0} dans la table '{1}' de l'assembly '{2}'. Le nœud n'avait pas de déclaration correspondante. Veuillez signaler cet avertissement. Vous devrez peut-être recompiler l'assembly F# que vous utilisez actuellement. + + + + Type inference caused the type variable {0} to escape its scope. Consider adding an explicit type parameter declaration or adjusting your code to be less generic. + La variable de type {0} est sortie de sa portée à cause de l'inférence de type. Envisagez d'ajouter une déclaration de paramètre de type explicite ou d'ajuster votre code pour qu'il soit moins générique. + + + + Type inference caused an inference type variable to escape its scope. Consider adding type annotations to make your code less generic. + Une variable de type d'inférence est sortie de sa portée à cause de l'inférence de type. Envisagez d'ajouter des annotations de type pour que votre code soit moins générique. + + + + Redundant arguments are being ignored in function '{0}'. Expected {1} but got {2} arguments. + Les arguments redondants sont actuellement ignorés dans la fonction '{0}'. {1} attendu(s), mais {2} argument(s) obtenu(s). + + + + Lowercase literal '{0}' is being shadowed by a new pattern with the same name. Only uppercase and module-prefixed literals can be used as named patterns. + Le littéral en minuscule '{0}' est actuellement caché par un nouveau modèle du même nom. Seuls les littéraux en majuscule préfixés avec un module peuvent être utilisés comme modèles nommés. + + + + This literal pattern does not take arguments + Ce modèle de littéral n'accepte pas d'arguments + + + + Constructors are not permitted as extension members - they must be defined as part of the original definition of the type + Les constructeurs ne sont pas autorisés en tant que membres d'extension. Ils doivent être définis dans le cadre de la définition d'origine du type + + + + Invalid response file '{0}' ( '{1}' ) + Fichier réponse non valide '{0}' ('{1}') + + + + Response file '{0}' not found in '{1}' + Le fichier réponse '{0}' est introuvable dans '{1}' + + + + Response file name '{0}' is empty, contains invalid characters, has a drive specification without an absolute path, or is too long + Le nom du fichier réponse '{0}' est vide, contient des caractères non valides, spécifie un lecteur sans chemin absolu, ou est trop long + + + + Cannot find FSharp.Core.dll in compiler's directory + FSharp.Core.dll est introuvable dans le répertoire du compilateur + + + + One tuple type is a struct tuple, the other is a reference tuple + L'un des tuples est de type struct, l'autre tuple est de type référence + + + + This provided method requires static parameters + La méthode fournie nécessite des paramètres statiques + + + + The conversion from {0} to {1} is a compile-time safe upcast, not a downcast. Consider using 'upcast' instead of 'downcast'. + La conversion de {0} en {1} est un cast sécurisé d'un type dérivé en l'une de ses classes de base au moment de la compilation, et non un cast d'une classe de base en une classe dérivée. Utilisez 'upcast' à la place de 'downcast'. + + + + The conversion from {0} to {1} is a compile-time safe upcast, not a downcast. Consider using the :> (upcast) operator instead of the :?> (downcast) operator. + La conversion de {0} en {1} est un cast sécurisé d'un type dérivé en l'une de ses classes de base au moment de la compilation, et non un cast d'une classe de base en une classe dérivée. Utilisez l'opérateur :> (upcast) à la place de l'opérateur :?> (downcast). + + + + The 'rec' on this module is implied by an outer 'rec' declaration and is being ignored + Le mot clé 'rec' sur ce module étant impliqué par une déclaration 'rec' externe, il est ignoré + + + + In a recursive declaration group, 'open' declarations must come first in each module + Dans un groupe de déclarations récursives, les déclarations 'open' doivent figurer en premier dans chaque module + + + + In a recursive declaration group, module abbreviations must come after all 'open' declarations and before other declarations + Dans un groupe de déclarations récursives, les abréviations de module doivent figurer après toutes les déclarations 'open' et avant les autres déclarations + + + + This declaration is not supported in recursive declaration groups + Cette déclaration n'est pas prise en charge dans les groupes de déclarations récursives + + + + Invalid use of 'rec' keyword + Utilisation non valide du mot clé 'rec' + + + + If a union type has more than one case and is a struct, then all fields within the union type must be given unique names. + Si un type union a plusieurs étiquettes case, et s'il s'agit d'un struct, tous les champs du type union doivent avoir des noms uniques. + + + + The CallerMemberNameAttribute applied to parameter '{0}' will have no effect. It is overridden by the CallerFilePathAttribute. + CallerMemberNameAttribute, qui est appliqué au paramètre '{0}', n'aura aucun effet. Il est remplacé par CallerFilePathAttribute. + + + + Invalid use of 'fixed'. 'fixed' may only be used in a declaration of the form 'use x = fixed expr' where the expression is an array, the address of a field, the address of an array element or a string' + Utilisation non valide de 'fixed'. Utilisez uniquement 'fixed' dans une déclaration de la forme 'use x = fixed expr' où l'expression est un tableau, l'adresse d'un champ, l'adresse d'un élément de tableau ou une chaîne + + + + Could not find method System.Runtime.CompilerServices.OffsetToStringData in references when building 'fixed' expression. + Méthode System.Runtime.CompilerServices.OffsetToStringData introuvable dans les références durant la construction d'une expression 'fixed'. + + + + {0} is an active pattern and cannot be treated as a discriminated union case with named fields. + {0} est un modèle actif. Il ne peut pas être traité comme un cas d'union discriminé avec des champs nommés. + + + + The default value does not have the same type as the argument. The DefaultParameterValue attribute and any Optional attribute will be ignored. Note: 'null' needs to be annotated with the correct type, e.g. 'DefaultParameterValue(null:obj)'. + La valeur par défaut n'a pas le même type que l'argument. L'attribut DefaultParameterValue et tous les attributs facultatifs seront ignorés. Remarque : 'null' doit être annoté avec le type approprié, par ex., 'DefaultParameterValue(null:obj)'. + + + + The system type '{0}' was required but no referenced system DLL contained this type + Le type système '{0}' est obligatoire, mais aucune DLL système référencée ne contient ce type + + + + The member '{0}' matches multiple overloads of the same method.\nPlease restrict it to one of the following:{1}. + Le membre '{0}' correspond à plusieurs surcharges de la même méthode.\nLimitez-le à l'une des options suivantes : {1}. + + + + Method or object constructor '{0}' is not static + La méthode ou le constructeur d'objet '{0}' n'est pas statique + + + + Unexpected symbol '=' in expression. Did you intend to use 'for x in y .. z do' instead? + Symbole '=' inattendu dans l'expression. Souhaitiez-vous utiliser 'for x in y .. z do' à la place ? + + + + Indicates a method that either has no implementation in the type in which it is declared or that is virtual and has a default implementation. + Indique une méthode qui n'a aucune implémentation dans le type dans lequel elle est déclarée, ou qui est virtuelle avec une implémentation par défaut. + + + + Used in mutually recursive bindings, in property declarations, and with multiple constraints on generic parameters. + Utilisé dans les liaisons mutuellement récursives, dans les déclarations de propriété et avec plusieurs contraintes sur des paramètres génériques. + + + + Used to give the current class object an object name. Also used to give a name to a whole pattern within a pattern match. + Permet de donner un nom d'objet à l'objet de classe actuel. Permet également de nommer un modèle complet dans un critère spécial. + + + + Used to verify code during debugging. + Permet de vérifier le code durant le débogage. + + + + Used as the name of the base class object. + Utilisé comme nom de l'objet de classe de base. + + + + In verbose syntax, indicates the start of a code block. + En syntaxe détaillée, indique le début d'un bloc de code. + + + + In verbose syntax, indicates the start of a class definition. + En syntaxe détaillée, indique le début d'une définition de classe. + + + + Indicates an implementation of an abstract method; used together with an abstract method declaration to create a virtual method. + Indique l'implémentation d'une méthode abstraite et s'utilise avec une déclaration de méthode abstraite pour créer une méthode virtuelle. + + + + Used to declare a delegate. + Permet de déclarer un délégué. + + + + Used in looping constructs or to execute imperative code. + Utilisé dans les constructions de boucles ou pour exécuter du code impératif. + + + + In verbose syntax, indicates the end of a block of code in a looping expression. + En syntaxe détaillée, indique la fin d'un bloc de code dans une expression de boucle. + + + + Used to convert to a type that is lower in the inheritance chain. + Permet de convertir en un type inférieur dans la chaîne d'héritage. + + + + In a for expression, used when counting in reverse. + Dans une expression for, permet de compter en sens inverse. + + + + Used in conditional branching. A short form of else if. + Utilisé dans la création de branche conditionnelle. Forme abrégée d'else if. + + + + Used in conditional branching. + Utilisé dans la création de branche conditionnelle. + + + + In type definitions and type extensions, indicates the end of a section of member definitions. In verbose syntax, used to specify the end of a code block that starts with the begin keyword. + Dans les définitions de type et les extensions de type, indique la fin d'une section de définitions de membre. En syntaxe détaillée, permet de spécifier la fin d'un bloc de code qui commence par le mot clé begin. + + + + Used to declare an exception type. + Permet de déclarer un type d'exception. + + + + Indicates that a declared program element is defined in another binary or assembly. + Indique qu'un élément de programme déclaré est défini dans une autre ressource binaire ou un autre assembly. + + + + Used as a Boolean literal. + Utilisé comme littéral booléen. + + + + Used together with try to introduce a block of code that executes regardless of whether an exception occurs. + Utilisé avec try pour introduire un bloc de code qui s'exécute indépendamment de toute exception. + + + + Used in looping constructs. + Utilisé dans les constructions de boucle. + + + + Used in lambda expressions, also known as anonymous functions. + Utilisé dans les expressions lambda, également appelées fonctions anonymes. + + + + Used as a shorter alternative to the fun keyword and a match expression in a lambda expression that has pattern matching on a single argument. + Utilisé comme alternative plus courte au mot clé fun et à une expression match dans une expression lambda ayant des critères spéciaux sur un argument unique. + + + + Used to reference the top-level .NET namespace. + Permet de référencer l'espace de noms .NET de niveau supérieur. + + + + Used in conditional branching constructs. + Utilisé dans les constructions de création de branche conditionnelle. + + + + Used for sequence expressions and, in verbose syntax, to separate expressions from bindings. + Utilisé pour les expressions de séquence et, en syntaxe détaillée, pour séparer les expressions des liaisons. + + + + Used to specify a base class or base interface. + Permet de spécifier une classe de base ou une interface de base. + + + + Used to indicate a function that should be integrated directly into the caller's code. + Permet d'indiquer une fonction qui doit être intégrée directement dans le code de l'appelant. + + + + Used to declare and implement interfaces. + Permet de déclarer et d'implémenter des interfaces. + + + + Used to specify that a member is visible inside an assembly but not outside it. + Permet de spécifier qu'un membre est visible dans un assembly mais pas à l'extérieur de celui-ci. + + + + Used to specify a computation that is to be performed only when a result is needed. + Permet de spécifier un calcul à effectuer uniquement quand un résultat est nécessaire. + + + + Used to associate, or bind, a name to a value or function. + Permet d'associer, ou de lier, un nom à une valeur ou une fonction. + + + + Used in computation expressions to bind a name to the result of another computation expression. + Utilisé dans les flux de travail asynchrones pour lier un nom au résultat d'un calcul asynchrone ou, dans d'autres expressions de calcul, pour lier un nom à un résultat, qui correspond au type de calcul. + + + + Used to branch by comparing a value to a pattern. + Permet de créer une branche en comparant une valeur à un modèle. + + + + Used to declare a property or method in an object type. + Permet de déclarer une propriété ou une méthode dans un type d'objet. + + + + Used to associate a name with a group of related types, values, and functions, to logically separate it from other code. + Permet d'associer un nom à un groupe de types, valeurs et fonctions connexes, pour le séparer de manière logique du reste du code. + + + + Used to declare a variable, that is, a value that can be changed. + Permet de déclarer une variable, c'est-à-dire une valeur qui peut être modifiée. + + + + Used to associate a name with a group of related types and modules, to logically separate it from other code. + Permet d'associer un nom à un groupe de types et de modules connexes, pour le séparer de manière logique du reste du code. + + + + Used to declare, define, or invoke a constructor that creates or that can create an object. Also used in generic parameter constraints to indicate that a type must have a certain constructor. + Permet de déclarer, de définir ou d'appeler un constructeur qui crée ou peut créer un objet. Également utilisé dans les contraintes de paramètre générique pour indiquer qu'un type doit avoir un certain constructeur. + + + + Not actually a keyword. However, not struct in combination is used as a generic parameter constraint. + Il ne s'agit pas vraiment d'un mot clé. Toutefois, dans le cadre d'une combinaison, not struct est utilisé comme une contrainte de paramètre générique. + + + + Indicates the absence of an object. Also used in generic parameter constraints. + Indique l'absence d'un objet. Utilisé également dans les contraintes de paramètre générique. + + + + Used in discriminated unions to indicate the type of categories of values, and in delegate and exception declarations. + Utilisé dans les unions discriminées pour indiquer le type des catégories de valeurs, ainsi que dans les déclarations de délégué et d'exception. + + + + Used to make the contents of a namespace or module available without qualification. + Permet de rendre disponible le contenu d'un espace de noms ou d'un module sans qualification. + + + + Used with Boolean conditions as a Boolean or operator. Equivalent to ||. Also used in member constraints. + Utilisé avec les conditions booléennes en tant qu'opérateur or booléen. Équivaut à ||. Utilisé également dans les contraintes de membre. + + + + Used to implement a version of an abstract or virtual method that differs from the base version. + Permet d'implémenter une version d'une méthode abstraite ou virtuelle qui diffère de la version de base. + + + + Restricts access to a member to code in the same type or module. + Restreint l'accès à un membre au code situé dans le même type ou module. + + + + Allows access to a member from outside the type. + Autorise l'accès à un membre en dehors du type. + + + + Used to indicate that a function is recursive. + Permet d'indiquer qu'une fonction est récursive. + + + + Used to provide a value for the result of the containing computation expression. + Permet d'indiquer une valeur à fournir en tant que résultat d'une expression de calcul. + + + + Used to provide a value for the result of the containing computation expression, where that value itself comes from the result another computation expression. + Permet d'indiquer une expression de calcul qui, une fois évaluée, fournit le résultat de l'expression de calcul qui la contient. + + + + Used in query expressions to specify what fields or columns to extract. Note that this is a contextual keyword, which means that it is not actually a reserved word and it only acts like a keyword in appropriate context. + Utilisé dans les expressions de requête pour spécifier les champs ou colonnes à extraire. Notez qu'il s'agit d'un mot clé contextuel, ce qui signifie qu'il ne s'agit pas réellement d'un mot réservé et qu'il se comporte uniquement comme un mot clé dans le contexte approprié. + + + + Used to indicate a method or property that can be called without an instance of a type, or a value member that is shared among all instances of a type. + Permet d'indiquer une méthode ou une propriété qui peut être appelée sans instance d'un type, ou un membre de valeur partagé entre toutes les instances d'un type. + + + + Used to declare a structure type. Also used in generic parameter constraints. Used for OCaml compatibility in module definitions. + Permet de déclarer un type structure. Utilisé également dans les contraintes de paramètre générique. Utilisé pour la compatibilité OCaml dans les définitions de module. + + + + Used in conditional expressions. Also used to perform side effects after object construction. + Utilisé dans les expressions conditionnelles. Utilisé également pour provoquer des effets secondaires après une construction d'objet. + + + + Used in for loops to indicate a range. + Utilisé dans les boucles for pour indiquer une portée. + + + + Used to introduce a block of code that might generate an exception. Used together with with or finally. + Permet d'introduire un bloc de code pouvant générer une exception. Utilisé avec with ou finally. + + + + Used to declare a class, record, structure, discriminated union, enumeration type, unit of measure, or type abbreviation. + Permet de déclarer une classe, un enregistrement, une structure, une union discriminée, un type énumération, une unité de mesure ou une abréviation de type. + + + + Used to convert to a type that is higher in the inheritance chain. + Permet de convertir en un type supérieur dans la chaîne d'héritage. + + + + Used instead of let for values that implement IDisposable" + Utilisé à la place de let pour les valeurs qui nécessitent l'appel de Dispose pour libérer des ressources. + + + + Used instead of let! in computation expressions for computation expression results that implement IDisposable. + Utilisé à la place de let! dans les flux de travail asynchrones et autres expressions de calcul pour les valeurs qui nécessitent l'appel de Dispose pour libérer des ressources. + + + + Used in a signature to indicate a value, or in a type to declare a member, in limited situations. + Utilisé dans une signature pour indiquer une valeur, ou dans un type pour déclarer un membre, dans des situations limitées. + + + + Indicates the .NET void type. Used when interoperating with other .NET languages. + Indique le type void .NET. Utilisé durant l'interaction avec d'autres langages .NET. + + + + Used for Boolean conditions (when guards) on pattern matches and to introduce a constraint clause for a generic type parameter. + Utilisé pour les conditions booléennes (when guards) sur des critères spéciaux et pour introduire une clause de contrainte d'un paramètre de type générique. + + + + Introduces a looping construct. + Introduit une construction de boucle. + + + + Used together with the match keyword in pattern matching expressions. Also used in object expressions, record copying expressions, and type extensions to introduce member definitions, and to introduce exception handlers. + Utilisé avec le mot clé match dans les expressions de critères spéciaux. Également utilisé dans les expressions d'objet, les expressions de copie d'enregistrement et les extensions de type pour introduire des définitions de membre et des gestionnaires d'exceptions. + + + + Used in a sequence expression to produce a value for a sequence. + Utilisé dans une expression de séquence pour produire une valeur pour une séquence. + + + + Used in a computation expression to append the result of a given computation expression to a collection of results for the containing computation expression. + Utilisé dans une expression de calcul pour ajouter le résultat d'une expression de calcul donnée à une collection de résultats pour l'expression de calcul conteneur. + + + + In function types, delimits arguments and return values. Yields an expression (in sequence expressions); equivalent to the yield keyword. Used in match expressions + Dans les types de fonction, délimite les arguments et les valeurs renvoyées. Produit une expression (dans les expressions de séquence). Équivaut au mot clé yield. Utilisé dans les expressions match + + + + Assigns a value to a variable. + Assigne une valeur à une variable. + + + + Converts a type to type that is higher in the hierarchy. + Convertit un type en type supérieur dans la hiérarchie. + + + + Converts a type to a type that is lower in the hierarchy. + Convertit un type en type inférieur dans la hiérarchie. + + + + Delimits a typed code quotation. + Délimite une quotation de code typé. + + + + Delimits a untyped code quotation. + Délimite une quotation de code non typé. + + + + {0} '{1}' not found in assembly '{2}'. A possible cause may be a version incompatibility. You may need to explicitly reference the correct version of this assembly to allow all referenced components to use the correct version. + {0} '{1}' introuvable dans l'assembly '{2}'. Cela est peut-être dû à une incompatibilité de version. Vous devrez peut-être référencer explicitement la version appropriée de cet assembly pour permettre à tous les composants référencés d'utiliser la version nécessaire. + + + + {0} '{1}' not found in type '{2}' from assembly '{3}'. A possible cause may be a version incompatibility. You may need to explicitly reference the correct version of this assembly to allow all referenced components to use the correct version. + {0} '{1}' introuvable dans le type '{2}' de l'assembly '{3}'. Cela est peut-être dû à une incompatibilité de version. Vous devrez peut-être référencer explicitement la version appropriée de cet assembly pour permettre à tous les composants référencés d'utiliser la version nécessaire. + + + + is + est + + + + This value is not a function and cannot be applied. + Cette valeur n'est pas une fonction et ne peut pas être appliquée. + + + + This value is not a function and cannot be applied. Did you intend to access the indexer via {0}.[index] instead? + Cette valeur n'est pas une fonction et ne peut pas être appliquée. Souhaitiez-vous accéder à l'indexeur via {0}.[index] ? + + + + This expression is not a function and cannot be applied. Did you intend to access the indexer via expr.[index] instead? + Cette expression n'est pas une fonction et ne peut pas être appliquée. Souhaitiez-vous accéder à l'indexeur via expr.[index] ? + + + + This value is not a function and cannot be applied. Did you forget to terminate a declaration? + Cette valeur n'est pas une fonction et ne peut pas être appliquée. Avez-vous oublié de terminer une déclaration ? + + + + The argument names in the signature '{0}' and implementation '{1}' do not match. The argument name from the signature file will be used. This may cause problems when debugging or profiling. + Les noms d'arguments dans la signature '{0}' et l'implémentation '{1}' ne correspondent pas. Le nom d'argument du fichier de signature va être utilisé. Cela peut entraîner des problèmes durant le débogage ou le profilage. + + + + An error occurred while reading the F# metadata of assembly '{0}'. A reserved construct was utilized. You may need to upgrade your F# compiler or use an earlier version of the assembly that doesn't make use of a specific construct. + Une erreur s'est produite durant la lecture des métadonnées F# de l'assembly '{0}'. Une construction réservée a été utilisée. Vous devrez peut-être mettre à niveau votre compilateur F# ou utiliser une version antérieure de l'assembly qui ne fait pas appel à une construction spécifique. + + + + This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. + Normalement, cette méthode ou propriété n'est pas utilisée dans le code F#. Utilisez plutôt un modèle de tuple explicite pour la déconstruction. + + + + This expression returns a value of type '{0}' but is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to use the expression as a value in the sequence then use an explicit 'yield'. + Cette expression retourne une valeur de type '{0}', mais est implicitement ignorée. Utilisez 'let' pour lier le résultat à un nom, par ex. 'let result = expression'. Si vous voulez utiliser l'expression comme valeur dans la séquence, utilisez un 'yield' explicite. + + + + This expression returns a value of type '{0}' but is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to use the expression as a value in the sequence then use an explicit 'yield!'. + Cette expression retourne une valeur de type '{0}', mais est implicitement ignorée. Utilisez 'let' pour lier le résultat à un nom, par ex. 'let result = expression'. Si vous voulez utiliser l'expression comme valeur dans la séquence, utilisez un 'yield!' explicite. + + + + Used in computation expressions to pattern match directly over the result of another computation expression. + Permet dans les expressions de calcul d'appliquer directement des critères spéciaux au résultat d'une autre expression de calcul. + + + + The file '{0}' changed on disk unexpectedly, please reload. + Changement inattendu du fichier '{0}' sur le disque. Rechargez le fichier. + + + + The byref pointer is readonly, so this write is not permitted. + Le pointeur byref étant en lecture seule, cette écriture n'est pas autorisée. + + + + A value must be mutable in order to mutate the contents or take the address of a value type, e.g. 'let mutable x = ...' + Une valeur doit être mutable pour pouvoir muter le contenu ou accepter l'adresse d'un type valeur, par exemple 'let mutable x = ...' + + + + A ReadOnly attribute has been applied to a struct type with a mutable field. + Un attribut ReadOnly a été appliqué à un type struct avec un champ mutable. + + + + A byref pointer returned by a function or method is implicitly dereferenced as of F# 4.5. To acquire the return value as a pointer, use the address-of operator, e.g. '&f(x)' or '&obj.Method(arg1, arg2)'. + Un pointeur byref retourné par une fonction ou une méthode est déréférencé implicitement à compter de F# 4.5. Pour acquérir la valeur de retour comme pointeur, utilisez l'opérateur &. Par exemple : '&f(x)' ou '&obj.Method(arg1, arg2)'. + + + + A type annotated with IsByRefLike must also be a struct. Consider adding the [<Struct>] attribute to the type. + Un type annoté avec IsByRefLike doit également être un struct. Ajoutez l'attribut [<Struct>] au type. + + + + The address of the variable '{0}' or a related expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + L'adresse de la variable '{0}' ou une expression associée ne peut pas être utilisée à ce stade. Cela permet de s'assurer que l'adresse de la valeur locale ne sort pas de sa portée. + + + + This value can't be assigned because the target '{0}' may refer to non-stack-local memory, while the expression being assigned is assessed to potentially refer to stack-local memory. This is to help prevent pointers to stack-bound memory escaping their scope. + Impossible d’affecter cette valeur car la cible '{0}' peut faire référence à une mémoire non locale (hors de la pile), tandis que l'expression en cours d’affectation est évaluée comme faisant potentiellement référence à une mémoire locale (dans la pile). Cela permet d'éviter que les pointeurs vers la mémoire liée à la pile ne sortent de leur portée. + + + + A value defined in a module must be mutable in order to take its address, e.g. 'let mutable x = ...' + Une valeur définie dans un module doit être mutable pour prendre son adresse. Par exemple : 'let mutable x = ...'. + + + + A type annotated with IsReadOnly must also be a struct. Consider adding the [<Struct>] attribute to the type. + Un type annoté avec IsReadOnly doit également être un struct. Ajoutez l'attribut [<Struct>] au type. + + + + Struct members cannot return the address of fields of the struct by reference + Les membres du struct ne peuvent pas retourner l'adresse des champs du struct par référence + + + + The function or method call cannot be used at this point, because one argument that is a byref of a non-stack-local Span or IsByRefLike type is used with another argument that is a stack-local Span or IsByRefLike type. This is to ensure the address of the local value does not escape its scope. + Impossible d’utiliser l'appel de fonction ou de méthode à ce stade, car un argument qui est un byref d'un type Span ou IsByRefLike non local (hors de la pile) est utilisé avec un autre argument de type Span ou IsByRefLike local (dans la pile). Cela permet d'éviter que l'adresse de la valeur locale ne sorte de sa portée. + + + + The address of a value returned from the expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + L'adresse d'une valeur retournée par l'expression ne peut pas être utilisée à ce stade. Cela permet d'éviter que l'adresse de la valeur locale ne sorte de sa portée. + + + + The Span or IsByRefLike variable '{0}' cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + Impossible d’utiliser la variable Span ou IsByRefLike '{0}' à ce stade. Cela permet d'éviter que l'adresse de la valeur locale ne sorte de sa portée. + + + + A Span or IsByRefLike value returned from the expression cannot be used at ths point. This is to ensure the address of the local value does not escape its scope. + Impossible d’utiliser une valeur Span ou IsByRefLike retournée par l'expression à ce stade. Cela permet d'éviter que l'adresse de la valeur locale ne sorte de sa portée. + + + + Cannot take the address of the value returned from the expression. Assign the returned value to a let-bound value before taking the address. + Impossible de prendre l'adresse de la valeur retournée par l'expression. Assignez la valeur retournée à une valeur liée à let avant de prendre l'adresse. + + + + The Span or IsByRefLike expression cannot be returned from this function or method, because it is composed using elements that may escape their scope. + The Span or IsByRefLike expression cannot be returned from this function or method, because it is composed using elements that may escape their scope. + + + + This type does not inherit Attribute, it will not work correctly with other .NET languages. + This type does not inherit Attribute, it will not work correctly with other .NET languages. + + + + The exception '{0}' does not have a field named '{1}'. + The exception '{0}' does not have a field named '{1}'. + + + + The constructor does not have a field named '{0}'. + The constructor does not have a field named '{0}'. + + + + Active patterns do not have fields. This syntax is invalid. + Active patterns do not have fields. This syntax is invalid. + + + + + \ No newline at end of file diff --git a/src/fsharp/xlf/FSComp.txt.it.xlf b/src/fsharp/xlf/FSComp.txt.it.xlf new file mode 100644 index 00000000000..5c224442175 --- /dev/null +++ b/src/fsharp/xlf/FSComp.txt.it.xlf @@ -0,0 +1,7087 @@ + + + + + + The namespace '{0}' is not defined. + Lo spazio dei nomi '{0}' non è definito. + + + + The namespace or module '{0}' is not defined. + Lo spazio dei nomi o il modulo '{0}' non è definito. + + + + The field, constructor or member '{0}' is not defined. + Il campo, il costruttore o il membro '{0}' non è definito. + + + + The value, constructor, namespace or type '{0}' is not defined. + Il valore, il costruttore, lo spazio dei nomi o il tipo '{0}' non è definito. + + + + The value or constructor '{0}' is not defined. + Il valore o il costruttore '{0}' non è definito. + + + + The value, namespace, type or module '{0}' is not defined. + Il valore, lo spazio dei nomi, il tipo o il modulo '{0}' non è definito. + + + + The constructor, module or namespace '{0}' is not defined. + Il costruttore, il modulo o lo spazio dei nomi '{0}' non è definito. + + + + The type '{0}' is not defined. + Il tipo '{0}' non è definito. + + + + The type '{0}' is not defined in '{1}'. + Il tipo '{0}' non è definito in '{1}'. + + + + The record label or namespace '{0}' is not defined. + L'etichetta record o lo spazio dei nomi '{0}' non è definito. + + + + The record label '{0}' is not defined. + L'etichetta del record '{0}' non è definita. + + + + Maybe you want one of the following: + Si può specificare uno dei nomi seguenti: + + + + The type parameter {0} is not defined. + Il parametro di tipo '{0}' non è definito. + + + + The pattern discriminator '{0}' is not defined. + Il discriminatore di criteri '{0}' non è definito. + + + + Replace with '{0}' + Sostituisci con '{0}' + + + + Add . for indexer access. + Aggiunge . per l'accesso all'indicizzatore. + + + + All elements of a list must be of the same type as the first element, which here is '{0}'. This element has type '{1}'. + Il tipo di tutti gli elementi di un'espressione di costruttore di elenco deve essere lo stesso. Il tipo previsto di questa espressione è '{0}', ma quello effettivo è '{1}'. + + + + All elements of an array must be of the same type as the first element, which here is '{0}'. This element has type '{1}'. + Il tipo di tutti gli elementi di un'espressione di costruttore di matrice deve essere lo stesso. Il tipo previsto di questa espressione è '{0}', ma quello effettivo è '{1}'. + + + + This 'if' expression is missing an 'else' branch. Because 'if' is an expression, and not a statement, add an 'else' branch which also returns a value of type '{0}'. + Nell'espressione 'if' manca un ramo 'else'. Il tipo del ramo 'then' è '{0}'. Dal momento che 'if' è un'espressione e non un'istruzione, aggiungere un ramo 'else' che restituisca un valore dello stesso tipo. + + + + The 'if' expression needs to have type '{0}' to satisfy context type requirements. It currently has type '{1}'. + Per soddisfare i requisiti relativi al tipo di contesto, il tipo dell'espressione 'if' deve essere '{0}', ma è attualmente '{1}'. + + + + All branches of an 'if' expression must return values of the same type as the first branch, which here is '{0}'. This branch returns a value of type '{1}'. + Il tipo di tutti i rami di un'espressione 'if' deve essere lo stesso. Il tipo previsto di questa espressione è '{0}', ma quello effettivo è '{1}'. + + + + All branches of a pattern match expression must return values of the same type as the first branch, which here is '{0}'. This branch returns a value of type '{1}'. + Tutti i rami di un'espressione di criteri di ricerca devono restituire valori dello stesso tipo. Il primo ramo ha restituito un valore di tipo '{0}', ma questo ramo ha restituito un valore di tipo '{1}'. + + + + A pattern match guard must be of type 'bool', but this 'when' expression is of type '{0}'. + Il guard dei criteri di ricerca deve essere di tipo 'bool', ma questa espressione 'when' è di tipo '{0}'. + + + + A ';' is used to separate field values in records. Consider replacing ',' with ';'. + Per separare i valori di campo nei record si usa il punto e virgola (';'). Provare a sostituire la virgola (',') con il punto e virgola (';'). + + + + The '!' operator is used to dereference a ref cell. Consider using 'not expr' here. + L'operatore '!' viene usato per dereferenziare una cella di riferimento. In questo punto provare a usare 'not expr'. + + + + The non-generic type '{0}' does not expect any type arguments, but here is given {1} type argument(s) + Il tipo non generico '{0}' non prevede alcun argomento tipo, tuttavia è stata rilevata la presenza di {1} argomento/i tipo + + + + Consider using 'return!' instead of 'return'. + Provare a usare 'return!' invece di 'return'. + + + + Consider using 'yield!' instead of 'yield'. + Provare a usare 'yield!' invece di 'yield'. + + + + \nA tuple type is required for one or more arguments. Consider wrapping the given arguments in additional parentheses or review the definition of the interface. + \nPer uno o più argomenti è necessario un tipo di tupla. Provare a racchiudere gli argomenti specificati tra parentesi aggiuntive o a rivedere la definizione dell'interfaccia. + + + + Invalid warning number '{0}' + Numero di avviso '{0}' non valido + + + + Invalid version string '{0}' + Stringa di versione '{0}' non valida + + + + Invalid version file '{0}' + File di versione '{0}' non valido + + + + Microsoft (R) F# Compiler version {0} + Compilatore Microsoft (R) F# versione {0} + + + + F# Compiler for F# {0} + Compilatore F# per F# {0} + + + + Problem with filename '{0}': {1} + Problema con il nome di file '{0}': {1} + + + + No inputs specified + Nessun input specificato + + + + The '--pdb' option requires the '--debug' option to be used + L'opzione '--pdb' richiede l'utilizzo dell'opzione '--debug' + + + + The search directory '{0}' is invalid + Directory di ricerca '{0}' non valida + + + + The search directory '{0}' could not be found + La directory di ricerca '{0}' non è stata trovata + + + + '{0}' is not a valid filename + '{0}' non è un nome di file valido + + + + '{0}' is not a valid assembly name + '{0}' non è un nome di assembly valido + + + + Unrecognized privacy setting '{0}' for managed resource, valid options are 'public' and 'private' + Impostazione di privacy '{0}' non riconosciuta per una risorsa gestita. Le opzioni valide sono 'public' e 'private' + + + + Multiple references to '{0}.dll' are not permitted + Non sono consentiti più riferimenti a '{0}.dll' + + + + Could not read version from mscorlib.dll + Non è stato possibile leggere la versione da mscorlib.dll + + + + Unable to read assembly '{0}' + Non è possibile leggere l'assembly '{0}' + + + + Assembly resolution failure at or near this location + Errore di risoluzione assembly in questa posizione o in prossimità di essa + + + + The declarations in this file will be placed in an implicit module '{0}' based on the file name '{1}'. However this is not a valid F# identifier, so the contents will not be accessible from other files. Consider renaming the file or adding a 'module' or 'namespace' declaration at the top of the file. + Le dichiarazioni presenti in questo file verranno inserite in un modulo implicito '{0}' in base al nome di file '{1}'. Questo non è tuttavia un identificatore F# valido, pertanto i contenuti non saranno accessibili da altri file. Provare a rinominare il file o ad aggiungere una dichiarazione 'module' o 'namespace' all'inizio del file. + + + + Files in libraries or multiple-file applications must begin with a namespace or module declaration, e.g. 'namespace SomeNamespace.SubNamespace' or 'module SomeNamespace.SomeModule'. Only the last source file of an application may omit such a declaration. + I file delle librerie o delle applicazioni con più file devono iniziare con una dichiarazione di spazio dei nomi o di modulo, ad esempio 'namespace SomeNamespace.SubNamespace' o 'module SomeNamespace.SomeModule'. Solo l'ultimo file di origine di un'applicazione può omettere tale dichiarazione. + + + + Files in libraries or multiple-file applications must begin with a namespace or module declaration. When using a module declaration at the start of a file the '=' sign is not allowed. If this is a top-level module, consider removing the = to resolve this error. + I file in librerie o in applicazioni con più file devono iniziare con una dichiarazione di modulo o di spazio dei nomi. Quando si usa una dichiarazione di modulo all'inizio del file, il segno '=' non è consentito. Se questo è un modulo di primo livello, provare a rimuovere il segno = per risolvere l'errore. + + + + This file contains multiple declarations of the form 'module SomeNamespace.SomeModule'. Only one declaration of this form is permitted in a file. Change your file to use an initial namespace declaration and/or use 'module ModuleName = ...' to define your modules. + Il file contiene più dichiarazioni nel formato 'module SpazioNomi.Modulo'. In un file è consentita una sola dichiarazione di questo tipo. Modificare il file in modo che utilizzi una dichiarazione di spazio dei nomi iniziale e/o 'module NomeModulo = ...' per definire i moduli. + + + + Option requires parameter: {0} + Parametro necessario per l'opzione: {0} + + + + Source file '{0}' could not be found + Il file di origine '{0}' non è stato trovato + + + + The file extension of '{0}' is not recognized. Source files must have extension .fs, .fsi, .fsx, .fsscript, .ml or .mli. + Estensione di file di '{0}' non riconosciuta. I file di origine devono avere estensione .fs, .fsi, .fsx, .fsscript, .ml o .mli. + + + + Could not resolve assembly '{0}' + Non è stato possibile risolvere l'assembly '{0}' + + + + Could not resolve assembly '{0}' required by '{1}' + Non è stato possibile risolvere l'assembly '{0}' richiesto da '{1}' + + + + Error opening binary file '{0}': {1} + Errore durante l'apertura del file binario '{0}': {1} + + + + The F#-compiled DLL '{0}' needs to be recompiled to be used with this version of F# + È necessario ricompilare la DLL compilata in F# '{0}' per poterla utilizzare con questa versione di F# + + + + Invalid directive. Expected '#I \"<path>\"'. + Direttiva non valida. Previsto '#I \"<percorso>\"'. + + + + Invalid directive. Expected '#r \"<file-or-assembly>\"'. + Direttiva non valida. Previsto '#r \"<file-oppure-assembly>\"'. + + + + Invalid directive. Expected '#load \"<file>\" ... \"<file>\"'. + Direttiva non valida. Previsto '#load \"<file>\" ... \"<file>\"'. + + + + Invalid directive. Expected '#time', '#time \"on\"' or '#time \"off\"'. + Direttiva non valida. Previsto '#time', '#time \"on\"' o '#time \"off\"'. + + + + Directives inside modules are ignored + Le direttive all'interno dei moduli vengono ignorate + + + + A signature for the file or module '{0}' has already been specified + È già stata specificata una firma per il file o modulo '{0}' + + + + An implementation of file or module '{0}' has already been given. Compilation order is significant in F# because of type inference. You may need to adjust the order of your files to place the signature file before the implementation. In Visual Studio files are type-checked in the order they appear in the project file, which can be edited manually or adjusted using the solution explorer. + È già stata specificata un'implementazione del file o modulo '{0}'. In F# l'ordine di compilazione è significativo a causa dell'inferenza del tipo. Potrebbe essere necessario modificare l'ordine dei file per inserire il file di firma prima dell'implementazione. In Visual Studio il controllo del tipo viene eseguito nei file nell'ordine in cui questi ultimi sono inclusi nel file di progetto. Tale ordine può essere modificato manualmente oppure tramite Esplora soluzioni. + + + + An implementation of the file or module '{0}' has already been given + È già stata specificata un'implementazione del file o modulo '{0}' + + + + The signature file '{0}' does not have a corresponding implementation file. If an implementation file exists then check the 'module' and 'namespace' declarations in the signature and implementation files match. + Il file di firma '{0}' non dispone di un file di implementazione corrispondente. Se è disponibile un file di implementazione, verificare che le dichiarazioni 'module' e 'namespace' nei file di firma e di implementazione corrispondano. + + + + '{0}' is not a valid integer argument + '{0}' non è un argomento Integer valido + + + + '{0}' is not a valid floating point argument + '{0}' non è un argomento a virgola mobile valido + + + + Unrecognized option: '{0}' + Opzione non riconosciuta: '{0}' + + + + Invalid module or namespace name + Nome di modulo o spazio dei nomi non valido + + + + Error reading/writing metadata for the F# compiled DLL '{0}'. Was the DLL compiled with an earlier version of the F# compiler? (error: '{1}'). + Errore durante la lettura/scrittura di metadati per la DLL F# compilata '{0}'. Verificare se la DLL è stata compilata con una versione precedente del compilatore F#. Errore: '{1}'. + + + + The type/module '{0}' is not a concrete module or type + Il tipo/modulo '{0}' non è un modulo o un tipo concreto + + + + The type '{0}' has an inline assembly code representation + Il tipo '{0}' contiene una rappresentazione di codice assembly inline + + + + A namespace and a module named '{0}' both occur in two parts of this assembly + In due parti di questo assembly sono presenti uno spazio dei nomi e un modulo entrambi denominati '{0}' + + + + Two modules named '{0}' occur in two parts of this assembly + Due moduli con nome '{0}' sono presenti in due parti dell'assembly + + + + Two type definitions named '{0}' occur in namespace '{1}' in two parts of this assembly + Due definizioni di tipo con nome '{0}' nello spazio dei nomi '{1}' sono presenti in due parti dell'assembly + + + + A module and a type definition named '{0}' occur in namespace '{1}' in two parts of this assembly + Modulo e definizione di tipo con nome '{0}' nello spazio dei nomi '{1}' presenti in due parti dell'assembly + + + + Invalid member signature encountered because of an earlier error + Rilevata firma di membro non valida a causa di un errore precedente + + + + This value does not have a valid property setter type + Questo valore non contiene un tipo di setter di proprietà valido + + + + Invalid form for a property getter. At least one '()' argument is required when using the explicit syntax. + Formato non valido per un getter di proprietà. Quando si usa la sintassi esplicita, è necessario almeno un argomento '()'. + + + + Invalid form for a property setter. At least one argument is required. + Formato non valido per un setter di proprietà. È necessario almeno un argomento. + + + + Unexpected use of a byref-typed variable + Utilizzo non previsto di una variabile di tipo byref + + + + Invalid mutation of a constant expression. Consider copying the expression to a mutable local, e.g. 'let mutable x = ...'. + Modifica non valida di un'espressione costante. Provare a copiare l'espressione in un locale modificabile, ad esempio 'let mutable x = ...'. + + + + The value has been copied to ensure the original is not mutated by this operation or because the copy is implicit when returning a struct from a member and another member is then accessed + Il valore è stato copiato per assicurare che durante l'operazione l'originale non venga modificato + + + + Recursively defined values cannot appear directly as part of the construction of a tuple value within a recursive binding + I valori definiti in modo ricorsivo non possono rappresentare direttamente parte della costruzione di un valore di tupla in un binding ricorsivo + + + + Recursive values cannot appear directly as a construction of the type '{0}' within a recursive binding. This feature has been removed from the F# language. Consider using a record instead. + I valori ricorsivi non possono rappresentare direttamente una costruzione del tipo '{0}' in un binding ricorsivo. Questa funzionalità è stata rimossa dal linguaggio F#. Provare a usare un record. + + + + Recursive values cannot be directly assigned to the non-mutable field '{0}' of the type '{1}' within a recursive binding. Consider using a mutable field instead. + I valori ricorsivi non possono essere assegnati direttamente al campo non modificabile '{0}' del tipo '{1}' in un binding ricorsivo. Provare a usare un campo modificabile. + + + + Unexpected decode of AutoOpenAttribute + Decodifica non prevista di AutoOpenAttribute + + + + Unexpected decode of InternalsVisibleToAttribute + Decodifica non prevista di InternalsVisibleToAttribute + + + + Unexpected decode of InterfaceDataVersionAttribute + Decodifica non prevista di InterfaceDataVersionAttribute + + + + Active patterns cannot return more than 7 possibilities + I criteri attivi non possono restituire più di 7 possibilità + + + + This is not a valid constant expression or custom attribute value + L'elemento non è un'espressione costante o un valore di attributo personalizzato valido + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe mutability attributes differ + Il modulo '{0}' contiene\n {1} \ntuttavia la relativa firma specifica\n {2} \nGli attributi di modificabilità sono diversi + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe names differ + Il modulo '{0}' contiene\n {1} \ntuttavia la relativa firma specifica\n {2} \nI nomi sono diversi + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe compiled names differ + Il modulo '{0}' contiene\n {1} \ntuttavia la relativa firma specifica\n {2} \nI nomi compilati sono diversi + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe display names differ + Il modulo '{0}' contiene\n {1} \ntuttavia la relativa firma specifica\n {2} \nI nomi visualizzati sono diversi + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe accessibility specified in the signature is more than that specified in the implementation + Il modulo '{0}' contiene\n {1} \ntuttavia la firma specifica\n {2} \nL'accessibilità specificata nella firma è maggiore rispetto a quella specificata nell'implementazione + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe inline flags differ + Il modulo '{0}' contiene\n {1} \ntuttavia la relativa firma specifica\n {2} \nI flag inline sono diversi + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe literal constant values and/or attributes differ + Il modulo '{0}' contiene\n {1} \ntuttavia la relativa firma specifica\n {2} \nI valori costanti letterali e/o gli attributi sono diversi + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is a type function and the other is not. The signature requires explicit type parameters if they are present in the implementation. + Il modulo '{0}' contiene\n {1} \ntuttavia la relativa firma specifica\n {2} \nUno è una funzione di tipo, l'altro no. La firma richiede parametri di tipo esplicito se questi sono presenti nell'implementazione. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe respective type parameter counts differ + Il modulo '{0}' contiene\n {1} \ntuttavia la relativa firma specifica\n {2} \nI rispettivi conteggi di parametri di tipo sono diversi + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe types differ + Il modulo '{0}' contiene\n {1} \ntuttavia la relativa firma specifica\n {2} \nI tipi sono diversi + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is an extension member and the other is not + Il modulo '{0}' contiene\n {1} \ntuttavia la relativa firma specifica\n {2} \nUno è un membro di estensione, l'altro no + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nAn arity was not inferred for this value + Il modulo '{0}' contiene\n {1} \ntuttavia la relativa firma specifica\n {2} \nNon è stato dedotto un grado per questo valore + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe number of generic parameters in the signature and implementation differ (the signature declares {3} but the implementation declares {4} + Il modulo '{0}' contiene\n {1} \ntuttavia la relativa firma specifica\n {2} \nIl numero di parametri generici nella firma e nell'implementazione è diverso (la firma dichiara {3}, mentre l'implementazione dichiara {4}) + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe generic parameters in the signature and implementation have different kinds. Perhaps there is a missing [<Measure>] attribute. + Il modulo '{0}' contiene\n {1} \nma nella relativa firma è indicato\n {2} \nI parametri generici nella firma e nell'implementazione sono di tipo diverso. È possibile che manchi l'attributo [<Measure>]. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe arities in the signature and implementation differ. The signature specifies that '{3}' is function definition or lambda expression accepting at least {4} argument(s), but the implementation is a computed function value. To declare that a computed function value is a permitted implementation simply parenthesize its type in the signature, e.g.\n\tval {5}: int -> (int -> int)\ninstead of\n\tval {6}: int -> int -> int. + Il modulo '{0}' contiene\n {1} \ntuttavia la relativa firma specifica\n {2} \nI gradi nella firma e nell'implementazione sono diversi. La firma specifica che '{3}' è una definizione di funzione o un'espressione lambda che accetta un numero di argomenti almeno pari a {4}, tuttavia l'implementazione è un valore di funzione calcolato. Per dichiarare che un valore di funzione calcolato è un'implementazione consentita, è sufficiente racchiudere in parentesi il relativo tipo nella firma, ad esempio\n\tval {5}: int -> (int -> int)\ninvece di\n\tval {6}: int -> int -> int. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe CLI member names differ + Il modulo '{0}' contiene\n {1} \ntuttavia la relativa firma specifica\n {2} \nI nomi dei membri CLI sono diversi + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is static and the other isn't + Il modulo '{0}' contiene\n {1} \ntuttavia la relativa firma specifica\n {2} \nUno è statico, l'altro no + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is virtual and the other isn't + Il modulo '{0}' contiene\n {1} \ntuttavia la relativa firma specifica\n {2} \nUno è virtuale, l'altro no + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is abstract and the other isn't + Il modulo '{0}' contiene\n {1} \ntuttavia la relativa firma specifica\n {2} \nUno è astratto, l'altro no + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is final and the other isn't + Il modulo '{0}' contiene\n {1} \ntuttavia la relativa firma specifica\n {2} \nUno è finale, l'altro no + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is marked as an override and the other isn't + Il modulo '{0}' contiene\n {1} \ntuttavia la relativa firma specifica\n {2} \nUno è contrassegnato come override, l'altro no + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is a constructor/property and the other is not + Il modulo '{0}' contiene\n {1} \ntuttavia la relativa firma specifica\n {2} \nUno è un costruttore o una proprietà, l'altro no. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe compiled representation of this method is as a static member but the signature indicates its compiled representation is as an instance member + Il modulo '{0}' contiene\n {1} \ntuttavia la relativa firma specifica\n {2} \nLa rappresentazione compilata di questo metodo è un membro statico, tuttavia la firma indica che essa è un membro di istanza + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe compiled representation of this method is as an instance member, but the signature indicates its compiled representation is as a static member + Il modulo '{0}' contiene\n {1} \ntuttavia la relativa firma specifica\n {2} \nLa rappresentazione compilata di questo metodo è un membro di istanza, tuttavia la firma indica che essa è un membro statico + + + + The {0} definitions in the signature and implementation are not compatible because the names differ. The type is called '{1}' in the signature file but '{2}' in implementation. + Le definizioni di {0} nella firma e nell'implementazione non sono compatibili perché i nomi sono diversi. Il nome del tipo è '{1}' nel file della firma e '{2}' nell'implementazione. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the respective type parameter counts differ + Le definizioni di {0} per il tipo '{1}' nella firma e nell'implementazione non sono compatibili perché i rispettivi conteggi dei parametri di tipo sono diversi + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the accessibility specified in the signature is more than that specified in the implementation + Le definizioni di {0} per il tipo '{1}' nella firma e nell'implementazione non sono compatibili perché l'accessibilità specificata nella firma è maggiore rispetto a quella specificata nell'implementazione + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature requires that the type supports the interface {2} but the interface has not been implemented + Le definizioni di {0} per il tipo '{1}' nella firma e nell'implementazione non sono compatibili perché la firma richiede che il tipo supporti l'interfaccia {2}, ma quest'ultima non è stata implementata + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation says this type may use nulls as a representation but the signature does not + Le definizioni di {0} per il tipo '{1}' nella firma e nell'implementazione non sono compatibili perché in base all'implementazione questo tipo e non la firma può usare come rappresentazione valori Null + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation says this type may use nulls as an extra value but the signature does not + Le definizioni di {0} per il tipo '{1}' nella firma e nell'implementazione non sono compatibili perché in base all'implementazione questo tipo e non la firma può usare come valore aggiuntivo valori Null + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature says this type may use nulls as a representation but the implementation does not + Le definizioni di {0} per il tipo '{1}' nella firma e nell'implementazione non sono compatibili perché in base alla firma questo tipo e non l'implementazione può usare come rappresentazione valori Null + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature says this type may use nulls as an extra value but the implementation does not + Le definizioni di {0} per il tipo '{1}' nella firma e nell'implementazione non sono compatibili perché in base alla firma questo tipo e non l'implementazione può usare come valore aggiuntivo valori Null + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation type is sealed but the signature implies it is not. Consider adding the [<Sealed>] attribute to the signature. + Le definizioni di {0} per il tipo '{1}' nella firma e nell'implementazione non sono compatibili perché il tipo di implementazione è sealed ma la firma implica che non lo sia. Provare ad aggiungere l'attributo [<Sealed>] alla firma. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation type is not sealed but signature implies it is. Consider adding the [<Sealed>] attribute to the implementation. + Le definizioni di {0} per il tipo '{1}' nella firma e nell'implementazione non sono compatibili perché il tipo di implementazione non è sealed ma la firma implica che lo sia. Provare ad aggiungere l'attributo [<Sealed>] all'implementazione. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation is an abstract class but the signature is not. Consider adding the [<AbstractClass>] attribute to the signature. + Le definizioni di {0} per il tipo '{1}' nella firma e nell'implementazione non sono compatibili perché, a differenza della firma, l'implementazione è una classe astratta. Provare ad aggiungere l'attributo [<AbstractClass>] alla firma. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature is an abstract class but the implementation is not. Consider adding the [<AbstractClass>] attribute to the implementation. + Le definizioni di {0} per il tipo '{1}' nella firma e nell'implementazione non sono compatibili perché, a differenza dell'implementazione, la firma è una classe astratta. Provare ad aggiungere l'attributo [<AbstractClass>] all'implementazione. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the types have different base types + Le definizioni di {0} per il tipo '{1}' nella firma e nell'implementazione non sono compatibili perché i tipi hanno tipi di base diversi + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the number of {2}s differ + Le definizioni di {0} per il tipo '{1}' nella firma e nell'implementazione non sono compatibili perché il numero di elementi {2} è diverso + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature defines the {2} '{3}' but the implementation does not (or does, but not in the same order) + Le definizioni di {0} per il tipo '{1}' nella firma e nell'implementazione non sono compatibili perché la firma definisce l'elemento {2} '{3}', il quale non è definito oppure è definito in un ordine diverso nell'implementazione + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation defines the {2} '{3}' but the signature does not (or does, but not in the same order) + Le definizioni di {0} per il tipo '{1}' nella firma e nell'implementazione non sono compatibili perché l'implementazione definisce l'elemento {2} '{3}', il quale non è definito oppure è definito in un ordine diverso nella firma + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation defines a struct but the signature defines a type with a hidden representation + Le definizioni di {0} per il tipo '{1}' nella firma e nell'implementazione non sono compatibili perché l'implementazione definisce uno struct, ma la firma definisce un tipo con una rappresentazione nascosta + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because a CLI type representation is being hidden by a signature + Le definizioni di {0} per il tipo '{1}' nella firma e nell'implementazione non sono compatibili perché una rappresentazione di tipo CLI è nascosta da una firma + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because a type representation is being hidden by a signature + Le definizioni di {0} per il tipo '{1}' nella firma e nell'implementazione non sono compatibili perché una rappresentazione di tipo è nascosta da una firma + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the types are of different kinds + Le definizioni di {0} per il tipo '{1}' nella firma e nell'implementazione non sono compatibili perché i tipi sono di genere diverso + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the IL representations differ + Le definizioni di {0} per il tipo '{1}' nella firma e nell'implementazione non sono compatibili perché le rappresentazioni IL sono diverse + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the representations differ + Le definizioni di {0} per il tipo '{1}' nella firma e nell'implementazione non sono compatibili perché le rappresentazioni sono diverse + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the field {2} was present in the implementation but not in the signature + Le definizioni di {0} per il tipo '{1}' nella firma e nell'implementazione non sono compatibili perché il campo {2} è presente nell'implementazione ma non nella firma + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the order of the fields is different in the signature and implementation + Le definizioni di {0} per il tipo '{1}' nella firma e nell'implementazione non sono compatibili perché l'ordine dei campi nella firma e nell'implementazione è diverso + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the field {2} was required by the signature but was not specified by the implementation + Le definizioni di {0} per il tipo '{1}' nella firma e nell'implementazione non sono compatibili perché per la firma è necessario il campo {2}, che però non è stato specificato dall'implementazione + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the field '{2}' was present in the implementation but not in the signature. Struct types must now reveal their fields in the signature for the type, though the fields may still be labelled 'private' or 'internal'. + Le definizioni di {0} per il tipo '{1}' nella firma e nell'implementazione non sono compatibili perché il campo '{2}' è presente nell'implementazione ma non nella firma. I tipi struct devono ora mostrare i relativi campi nella firma per il tipo, nonostante i campi possano comunque essere associati alle etichette 'private' o 'internal'. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the abstract member '{2}' was required by the signature but was not specified by the implementation + Le definizioni di {0} per il tipo '{1}' nella firma e nell'implementazione non sono compatibili perché per la firma è necessario il membro astratto '{2}', che però non è stato specificato dall'implementazione + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the abstract member '{2}' was present in the implementation but not in the signature + Le definizioni di {0} per il tipo '{1}' nella firma e nell'implementazione non sono compatibili perché il membro astratto '{2}' è presente nell'implementazione ma non nella firma + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature declares a {2} while the implementation declares a {3} + Le definizioni di {0} per il tipo '{1}' nella firma e nell'implementazione non sono compatibili perché la firma dichiara {2} mentre l'implementazione dichiara {3} + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the abbreviations differ: {2} versus {3} + Le definizioni di {0} per il tipo '{1}' nella firma e nell'implementazione non sono compatibili perché le abbreviazioni sono diverse: {2} invece di {3} + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because an abbreviation is being hidden by a signature. The abbreviation must be visible to other CLI languages. Consider making the abbreviation visible in the signature. + Le definizioni di {0} per il tipo '{1}' nella firma e nell'implementazione non sono compatibili perché un'abbreviazione è nascosta da una firma. L'abbreviazione deve essere visibile ad altri linguaggi CLI. Provare a rendere visibile l'abbreviazione nella firma. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature has an abbreviation while the implementation does not + Le definizioni di {0} per il tipo '{1}' nella firma e nell'implementazione non sono compatibili perché, a differenza dell'implementazione, la firma contiene un'abbreviazione + + + + The module contains the constructor\n {0} \nbut its signature specifies\n {1} \nThe names differ + Il modulo contiene il costruttore\n {0} \ntuttavia la relativa firma specifica\n {1} \nI nomi sono diversi + + + + The module contains the constructor\n {0} \nbut its signature specifies\n {1} \nThe respective number of data fields differ + Il modulo contiene il costruttore\n {0} \ntuttavia la relativa firma specifica\n {1} \nI rispettivi numeri di campi dati sono diversi + + + + The module contains the constructor\n {0} \nbut its signature specifies\n {1} \nThe types of the fields differ + Il modulo contiene il costruttore\n {0} \ntuttavia la relativa firma specifica\n {1} \nI tipi dei campi sono diversi + + + + The module contains the constructor\n {0} \nbut its signature specifies\n {1} \nthe accessibility specified in the signature is more than that specified in the implementation + Il modulo contiene il costruttore\n {0} \ntuttavia la relativa firma specifica\n {1} \nL'accessibilità specificata nella firma è maggiore rispetto a quella specificata nell'implementazione + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe names differ + Il modulo contiene il campo\n {0} \ntuttavia la relativa firma specifica\n {1} \nI nomi sono diversi + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nthe accessibility specified in the signature is more than that specified in the implementation + Il modulo contiene il campo\n {0} \ntuttavia la relativa firma specifica\n {1} \nL'accessibilità specificata nella firma è maggiore rispetto a quella specificata nell'implementazione + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe 'static' modifiers differ + Il modulo contiene il campo\n {0} \ntuttavia la relativa firma specifica\n {1} \nI modificatori 'static' sono diversi + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe 'mutable' modifiers differ + Il modulo contiene il campo\n {0} \ntuttavia la relativa firma specifica\n {1} \nI modificatori 'mutable' sono diversi + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe 'literal' modifiers differ + Il modulo contiene il campo\n {0} \ntuttavia la relativa firma specifica\n {1} \nI modificatori 'literal' sono diversi + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe types differ + Il modulo contiene il campo\n {0} \ntuttavia la relativa firma specifica\n {1} \nI tipi sono diversi + + + + The implicit instantiation of a generic construct at or near this point could not be resolved because it could resolve to multiple unrelated types, e.g. '{0}' and '{1}'. Consider using type annotations to resolve the ambiguity + Non è stato possibile risolvere la creazione di istanza implicita di un costrutto generico in questo punto o in prossimità di esso perché la risoluzione potrebbe restituire più tipi non correlati, ad esempio '{0}' e '{1}'. Provare a usare annotazioni di tipo per risolvere l'ambiguità + + + + Could not resolve the ambiguity inherent in the use of a 'printf'-style format string + Non è stato possibile risolvere l'ambiguità relativa all'uso della stringa di formato di stile 'printf' + + + + Could not resolve the ambiguity in the use of a generic construct with an 'enum' constraint at or near this position + Non è stato possibile risolvere l'ambiguità relativa all'uso di un costrutto generico con un vincolo 'enum' in questa posizione o in prossimità di essa + + + + Could not resolve the ambiguity in the use of a generic construct with a 'delegate' constraint at or near this position + Non è stato possibile risolvere l'ambiguità relativa all'uso di un costrutto generico con un vincolo 'delegate' in questa posizione o in prossimità di essa + + + + Invalid value + Valore non valido + + + + The signature and implementation are not compatible because the respective type parameter counts differ + La firma e l'implementazione non sono compatibili perché i rispettivi conteggi di parametri di tipo sono diversi + + + + The signature and implementation are not compatible because the type parameter in the class/signature has a different compile-time requirement to the one in the member/implementation + La firma e l'implementazione non sono compatibili perché il parametro di tipo nella classe/firma ha un requisito della fase di compilazione diverso rispetto a quello nel membro/implementazione + + + + The signature and implementation are not compatible because the declaration of the type parameter '{0}' requires a constraint of the form {1} + La firma e l'implementazione non sono compatibili perché la dichiarazione del parametro di tipo '{0}' richiede un vincolo nel formato {1} + + + + The signature and implementation are not compatible because the type parameter '{0}' has a constraint of the form {1} but the implementation does not. Either remove this constraint from the signature or add it to the implementation. + La firma e l'implementazione non sono compatibili perché il parametro di tipo '{0}' ha un vincolo nel formato {1} non presente tuttavia nell'implementazione. Rimuovere il vincolo dalla firma oppure aggiungerlo all'implementazione. + + + + The type '{0}' implements 'System.IComparable'. Consider also adding an explicit override for 'Object.Equals' + Il tipo '{0}' implementa 'System.IComparable'. Provare inoltre ad aggiungere un override esplicito per 'Object.Equals' + + + + The type '{0}' implements 'System.IComparable' explicitly but provides no corresponding override for 'Object.Equals'. An implementation of 'Object.Equals' has been automatically provided, implemented via 'System.IComparable'. Consider implementing the override 'Object.Equals' explicitly + Il tipo '{0}' implementa 'System.IComparable' in modo esplicito, tuttavia non fornisce l'override corrispondente per 'Object.Equals'. È stata specificata automaticamente un'implementazione di 'Object.Equals', eseguita tramite 'System.IComparable'. Provare a implementare l'override di 'Object.Equals' in modo esplicito + + + + The struct, record or union type '{0}' has an explicit implementation of 'Object.GetHashCode' or 'Object.Equals'. You must apply the 'CustomEquality' attribute to the type + Il tipo di unione, struct o record '{0}' ha un'implementazione esplicita di 'Object.GetHashCode' o 'Object.Equals'. È necessario applicare l'attributo 'CustomEquality' al tipo + + + + The struct, record or union type '{0}' has an explicit implementation of 'Object.GetHashCode'. Consider implementing a matching override for 'Object.Equals(obj)' + Il tipo di unione, struct o record '{0}' ha un'implementazione esplicita di 'Object.GetHashCode'. Provare a implementare un override corrispondente per 'Object.Equals(obj)' + + + + The struct, record or union type '{0}' has an explicit implementation of 'Object.Equals'. Consider implementing a matching override for 'Object.GetHashCode()' + Il tipo di unione, struct o record '{0}' ha un'implementazione esplicita di 'Object.Equals'. Provare a implementare un override corrispondente per 'Object.GetHashCode()' + + + + The exception definitions are not compatible because a CLI exception mapping is being hidden by a signature. The exception mapping must be visible to other modules. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1} + Le definizioni di eccezione non sono compatibili perché un mapping delle eccezioni CLI è nascosto da una firma. Il mapping delle eccezioni deve essere visibile ad altri moduli. Il modulo contiene la definizione di eccezione\n {0} \ntuttavia la relativa firma specifica\n\t{1} + + + + The exception definitions are not compatible because the CLI representations differ. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1} + Le definizioni di eccezione non sono compatibili perché le rappresentazioni CLI sono diverse. Il modulo contiene la definizione di eccezione\n {0} \ntuttavia la relativa firma specifica\n\t{1} + + + + The exception definitions are not compatible because the exception abbreviation is being hidden by the signature. The abbreviation must be visible to other CLI languages. Consider making the abbreviation visible in the signature. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1}. + Le definizioni di eccezione non sono compatibili perché l'abbreviazione dell'eccezione è nascosta dalla firma. L'abbreviazione deve essere visibile ad altri linguaggi CLI. Provare a rendere visibile l'abbreviazione nella firma. Il modulo contiene la definizione di eccezione \n {0} \ntuttavia la relativa firma specifica\n\t{1}. + + + + The exception definitions are not compatible because the exception abbreviations in the signature and implementation differ. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1}. + Le definizioni di eccezione non sono compatibili perché le abbreviazioni delle eccezioni nella firma e nell'implementazione sono diverse. Il modulo contiene la definizione di eccezione\n {0} \ntuttavia la relativa firma specifica\n\t{1}. + + + + The exception definitions are not compatible because the exception declarations differ. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1}. + Le definizioni di eccezione non sono compatibili perché le dichiarazioni di eccezione sono diverse. Il modulo contiene la definizione di eccezione\n {0} \ntuttavia la relativa firma specifica\n\t{1}. + + + + The exception definitions are not compatible because the field '{0}' was required by the signature but was not specified by the implementation. The module contains the exception definition\n {1} \nbut its signature specifies\n\t{2}. + Le definizioni di eccezione non sono compatibili perché il campo '{0}' è necessario per la firma ma non è stato specificato dall'implementazione. Il modulo contiene la definizione di eccezione\n {1} \ntuttavia la relativa firma specifica\n\t{2}. + + + + The exception definitions are not compatible because the field '{0}' was present in the implementation but not in the signature. The module contains the exception definition\n {1} \nbut its signature specifies\n\t{2}. + Le definizioni di eccezione non sono compatibili perché il campo '{0}' è presente nell'implementazione ma non nella firma. Il modulo contiene la definizione di eccezione\n {1} \ntuttavia la relativa firma specifica\n\t{2}. + + + + The exception definitions are not compatible because the order of the fields is different in the signature and implementation. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1}. + Le definizioni di eccezione non sono compatibili perché l'ordine dei campi nella firma e nell'implementazione è diverso. Il modulo contiene la definizione di eccezione\n {0} \ntuttavia la relativa firma specifica\n\t{1}. + + + + The namespace or module attributes differ between signature and implementation + Gli attributi dello spazio dei nomi o del modulo sono diversi nella firma e nell'implementazione + + + + This method is over-constrained in its type parameters + Questo metodo contiene troppi vincoli nei relativi parametri di tipo + + + + No implementations of '{0}' had the correct number of arguments and type parameters. The required signature is '{1}'. + Nessuna implementazione di '{0}' dispone del numero di argomenti e parametri di tipo corretto. La firma necessaria è '{1}'. + + + + The override for '{0}' was ambiguous + L'override per '{0}' è ambiguo + + + + More than one override implements '{0}' + Più override implementano '{0}' + + + + The method '{0}' is sealed and cannot be overridden + Il metodo '{0}' è Sealed e non è possibile eseguirne l'override + + + + The override '{0}' implements more than one abstract slot, e.g. '{1}' and '{2}' + L'override '{0}' implementa più slot astratti, ad esempio '{1}' e '{2}' + + + + Duplicate or redundant interface + Interfaccia duplicata o ridondante + + + + The interface '{0}' is included in multiple explicitly implemented interface types. Add an explicit implementation of this interface. + L'interfaccia '{0}' è inclusa in più tipi di interfaccia implementati in modo esplicito. Aggiungere un'implementazione esplicita dell'interfaccia. + + + + A named argument has been assigned more than one value + A un argomento denominato sono stati assegnati più valori + + + + No implementation was given for '{0}' + Nessuna implementazione specificata per '{0}' + + + + No implementation was given for '{0}'. Note that all interface members must be implemented and listed under an appropriate 'interface' declaration, e.g. 'interface ... with member ...'. + Nessuna implementazione specificata per '{0}'. Si noti che tutti i membri dell'interfaccia devono essere implementati ed elencati in una dichiarazione 'interface' appropriata, ad esempio 'interface ... with member ...'. + + + + The member '{0}' does not have the correct number of arguments. The required signature is '{1}'. + Il membro '{0}' non dispone del numero di argomenti corretto. La firma necessaria è '{1}'. + + + + The member '{0}' does not have the correct number of method type parameters. The required signature is '{1}'. + Il membro '{0}' non dispone del numero corretto di parametri di tipo del metodo. La firma necessaria è '{1}'. + + + + The member '{0}' does not have the correct kinds of generic parameters. The required signature is '{1}'. + Il membro '{0}' non dispone dei tipi di parametri generici corretti. La firma necessaria è '{1}'. + + + + The member '{0}' cannot be used to implement '{1}'. The required signature is '{2}'. + Il membro '{0}' non può essere utilizzato per implementare '{1}'. La firma necessaria è '{2}'. + + + + Error while parsing embedded IL + Errore durante l'analisi di IL incorporato + + + + Error while parsing embedded IL type + Errore durante l'analisi del tipo IL incorporato + + + + This indexer notation has been removed from the F# language + Notazione indicizzatore rimossa dal linguaggio F# + + + + Invalid expression on left of assignment + Espressione non valida a sinistra dell'assegnazione + + + + The 'ReferenceEquality' attribute cannot be used on structs. Consider using the 'StructuralEquality' attribute instead, or implement an override for 'System.Object.Equals(obj)'. + Non è possibile usare l'attributo 'ReferenceEquality' in struct. Provare a usare invece l'attributo 'StructuralEquality' oppure a implementare un override per 'System.Object.Equals(obj)'. + + + + This type uses an invalid mix of the attributes 'NoEquality', 'ReferenceEquality', 'StructuralEquality', 'NoComparison' and 'StructuralComparison' + Questo tipo usa una combinazione non valida degli attributi 'NoEquality', 'ReferenceEquality', 'StructuralEquality', 'NoComparison' e 'StructuralComparison' + + + + The 'NoEquality' attribute must be used in conjunction with the 'NoComparison' attribute + L'attributo 'NoEquality' deve essere utilizzato insieme all'attributo 'NoComparison' + + + + The 'StructuralComparison' attribute must be used in conjunction with the 'StructuralEquality' attribute + L'attributo 'StructuralComparison' deve essere utilizzato insieme all'attributo 'StructuralEquality' + + + + The 'StructuralEquality' attribute must be used in conjunction with the 'NoComparison' or 'StructuralComparison' attributes + L'attributo 'StructuralEquality' deve essere utilizzato insieme agli attributi 'NoComparison' o 'StructuralComparison' + + + + A type cannot have both the 'ReferenceEquality' and 'StructuralEquality' or 'StructuralComparison' attributes + Un tipo non può avere sia l'attributo 'ReferenceEquality' sia 'StructuralEquality' o 'StructuralComparison' + + + + Only record, union, exception and struct types may be augmented with the 'ReferenceEquality', 'StructuralEquality' and 'StructuralComparison' attributes + Con gli attributi 'ReferenceEquality', 'StructuralEquality' e 'StructuralComparison' è possibile aumentare solo tipi di struct, record, unione ed eccezione + + + + A type with attribute 'ReferenceEquality' cannot have an explicit implementation of 'Object.Equals(obj)', 'System.IEquatable<_>' or 'System.Collections.IStructuralEquatable' + Un tipo con attributo 'ReferenceEquality' non può avere un'implementazione esplicita di 'Object.Equals(obj)', 'System.IEquatable<_>' o 'System.Collections.IStructuralEquatable' + + + + A type with attribute 'CustomEquality' must have an explicit implementation of at least one of 'Object.Equals(obj)', 'System.IEquatable<_>' or 'System.Collections.IStructuralEquatable' + Un tipo con attributo 'CustomEquality' deve avere un'implementazione esplicita di almeno uno degli elementi 'Object.Equals(obj)', 'System.IEquatable<_>' o 'System.Collections.IStructuralEquatable' + + + + A type with attribute 'CustomComparison' must have an explicit implementation of at least one of 'System.IComparable' or 'System.Collections.IStructuralComparable' + Un tipo con attributo 'CustomComparison' deve avere un'implementazione esplicita di almeno uno degli elementi 'System.IComparable' o 'System.Collections.IStructuralComparable' + + + + A type with attribute 'NoEquality' should not usually have an explicit implementation of 'Object.Equals(obj)'. Disable this warning if this is intentional for interoperability purposes + Un tipo con attributo 'NoEquality' non deve avere in genere un'implementazione esplicita di 'Object.Equals(obj)'. Disabilitare questo avviso se ciò è intenzionale a fini di interoperabilità + + + + A type with attribute 'NoComparison' should not usually have an explicit implementation of 'System.IComparable', 'System.IComparable<_>' or 'System.Collections.IStructuralComparable'. Disable this warning if this is intentional for interoperability purposes + Un tipo con attributo 'NoComparison' non deve avere in genere un'implementazione esplicita di 'System.IComparable', 'System.IComparable<_>' o 'System.Collections.IStructuralComparable'. Disabilitare questo avviso se ciò è intenzionale a fini di interoperabilità + + + + The 'CustomEquality' attribute must be used in conjunction with the 'NoComparison' or 'CustomComparison' attributes + L'attributo 'CustomEquality' deve essere utilizzato insieme agli attributi 'NoComparison' o 'CustomComparison' + + + + Positional specifiers are not permitted in format strings + Identificatori di posizione non consentiti in stringhe di formato + + + + Missing format specifier + Identificatore di formato mancante + + + + '{0}' flag set twice + Flag '{0}' impostato due volte + + + + Prefix flag (' ' or '+') set twice + Flag di prefisso (' ' o '+') impostato due volte + + + + The # formatting modifier is invalid in F# + Il modificatore di formattazione # non è valido in F# + + + + Bad precision in format specifier + Precisione non valida in identificatore di formato + + + + Bad width in format specifier + Larghezza non valida in identificatore di formato + + + + '{0}' format does not support '0' flag + Il formato '{0}' non supporta il flag '0' + + + + Precision missing after the '.' + Precisione mancante dopo '.' + + + + '{0}' format does not support precision + Il formato '{0}' non supporta la precisione + + + + Bad format specifier (after l or L): Expected ld,li,lo,lu,lx or lX. In F# code you can use %d, %x, %o or %u instead, which are overloaded to work with all basic integer types. + Identificatore di formato non valido (dopo l o L): è previsto ld,li,lo,lu,lx o lX. Nel codice F# è invece possibile usare %d, %x, %o o %u, di cui viene eseguito l'overload affinché funzionino con tutti i tipi di Integer di base. + + + + The 'l' or 'L' in this format specifier is unnecessary. In F# code you can use %d, %x, %o or %u instead, which are overloaded to work with all basic integer types. + 'l' o 'L' non è necessario nell'identificatore di formato. Nel codice F# è invece possibile usare %d, %x, %o o %u, di cui viene eseguito l'overload affinché funzionino con tutti i tipi di Integer di base. + + + + The 'h' or 'H' in this format specifier is unnecessary. You can use %d, %x, %o or %u instead, which are overloaded to work with all basic integer types. + 'h' o 'H' non è necessario nell'identificatore di formato. È possibile usare %d, %x, %o o %u, di cui viene eseguito l'overload affinché funzionino con tutti i tipi di Integer di base. + + + + '{0}' does not support prefix '{1}' flag + '{0}' non supporta il flag '{1}' del prefisso + + + + Bad format specifier: '{0}' + Identificatore di formato non valido: '{0}' + + + + System.Environment.Exit did not exit + System.Environment.Exit inesistente + + + + The treatment of this operator is now handled directly by the F# compiler and its meaning cannot be redefined + La modalità di gestione di questo operatore dipende ora direttamente dal compilatore F# e non è possibile ridefinirne il significato + + + + A protected member is called or 'base' is being used. This is only allowed in the direct implementation of members since they could escape their object scope. + È presente una chiamata a un membro protetto oppure viene usata la parola chiave 'base'. Ciò è consentito solo nell'implementazione diretta di membri perché questi ultimi potrebbero uscire dal relativo ambito di oggetto. + + + + The byref-typed variable '{0}' is used in an invalid way. Byrefs cannot be captured by closures or passed to inner functions. + La variabile di tipo byref '{0}' è utilizzata in modo non valido. Le variabili di tipo byref non possono essere acquisite dalle chiusure o passate a funzioni interne. + + + + The 'base' keyword is used in an invalid way. Base calls cannot be used in closures. Consider using a private member to make base calls. + La parola chiave 'base' è usata in modo non valido. Le chiamate di base non possono essere usate nelle chiusure. Provare a usare un membro privato per effettuare le chiamate di base. + + + + The variable '{0}' is used in an invalid way + La variabile '{0}' è usata in modo non valido + + + + The type '{0}' is less accessible than the value, member or type '{1}' it is used in. + Il tipo '{0}' è meno accessibile del valore, del membro o del tipo '{1}' in cui viene usato. + + + + 'System.Void' can only be used as 'typeof<System.Void>' in F# + 'System.Void' può essere utilizzato solo come 'typeof<System.Void>' in F# + + + + A type instantiation involves a byref type. This is not permitted by the rules of Common IL. + La creazione dell'istanza di un tipo prevede un tipo byref. Ciò non è consentito dalle regole di IL comune. + + + + Calls to 'reraise' may only occur directly in a handler of a try-with + Le chiamate a 'reraise' possono essere presenti solo direttamente all'interno di un gestore di un'espressione try-with + + + + Expression-splicing operators may only be used within quotations + Gli operatori di splicing delle espressioni possono essere utilizzati solo in quotation + + + + First-class uses of the expression-splicing operator are not permitted + Utilizzi di prima classe dell'operatore di splicing delle espressioni non consentiti + + + + First-class uses of the address-of operators are not permitted + Utilizzi di prima classe di operatori address-of non consentiti + + + + First-class uses of the 'reraise' function is not permitted + Utilizzi di prima classe della funzione 'reraise' non consentiti + + + + The byref typed value '{0}' cannot be used at this point + Non è possibile usare il valore di tipo byref '{0}' in questo punto + + + + 'base' values may only be used to make direct calls to the base implementations of overridden members + I valori 'base' possono essere utilizzati esclusivamente per effettuare chiamate dirette alle implementazioni di base dei membri sottoposti a override + + + + Object constructors cannot directly use try/with and try/finally prior to the initialization of the object. This includes constructs such as 'for x in ...' that may elaborate to uses of these constructs. This is a limitation imposed by Common IL. + I costruttori di oggetti non possono utilizzare direttamente try/with e try/finally prima dell'inizializzazione dell'oggetto. Ciò include costrutti quali 'for x in ...' che potrebbero essere elaborati negli utilizzi di tali costrutti. Si tratta di una limitazione imposta dall'IL comune. + + + + The address of the variable '{0}' cannot be used at this point + Non è possibile usare l'indirizzo della variabile '{0}' in questo punto + + + + The address of the static field '{0}' cannot be used at this point + Non è possibile usare l'indirizzo del campo statico '{0}' in questo punto + + + + The address of the field '{0}' cannot be used at this point + Non è possibile usare l'indirizzo del campo '{0}' in questo punto + + + + The address of an array element cannot be used at this point + Non è possibile usare l'indirizzo di un elemento di matrice in questo punto + + + + The type of a first-class function cannot contain byrefs + Il tipo di una funzione di prima classe non può contenere byref + + + + A method return type would contain byrefs which is not permitted + Il tipo restituito di un metodo conterrebbe byref, il che non è consentito + + + + Invalid custom attribute value (not a constant or literal) + Valore di attributo personalizzato non valido (non è una costante o un valore letterale) + + + + The attribute type '{0}' has 'AllowMultiple=false'. Multiple instances of this attribute cannot be attached to a single language element. + Per il tipo di attributo '{0}' è specificato 'AllowMultiple=false'. Non è possibile collegare più istanze di questo attributo a un singolo elemento del linguaggio. + + + + The member '{0}' is used in an invalid way. A use of '{1}' has been inferred prior to its definition at or near '{2}'. This is an invalid forward reference. + Il membro '{0}' è utilizzato in modo non valido. Un utilizzo di '{1}' è stato dedotto prima della relativa definizione in o in prossimità di '{2}'. Si tratta di un riferimento in avanti non valido. + + + + A byref typed value would be stored here. Top-level let-bound byref values are not permitted. + In questa posizione verrebbe archiviato un valore di tipo byref. Non sono consentiti valori byref associati a let di livello superiore. + + + + [<ReflectedDefinition>] terms cannot contain uses of the prefix splice operator '%' + I termini [<ReflectedDefinition>] non possono contenere utilizzi dell'operatore di splicing del prefisso '%' + + + + A function labeled with the 'EntryPointAttribute' attribute must be the last declaration in the last file in the compilation sequence. + Una funzione con l'attributo 'EntryPointAttribute' come etichetta deve essere l'ultima dichiarazione nell'ultimo file della sequenza di compilazione. + + + + compiled form of the union case + form compilato del case di unione + + + + default augmentation of the union case + aumento predefinito del case di unione + + + + The property '{0}' has the same name as a method in type '{1}'. + Il nome della proprietà '{0}' corrisponde a quello di un metodo nel tipo '{1}'. + + + + The property '{0}' of type '{1}' has a getter and a setter that do not match. If one is abstract then the other must be as well. + La proprietà '{0}' di tipo '{1}' contiene un getter e un setter che non corrispondono. Se uno di essi è astratto, è necessario che lo sia anche l'altro. + + + + The property '{0}' has the same name as another property in type '{1}', but one takes indexer arguments and the other does not. You may be missing an indexer argument to one of your properties. + Il nome della proprietà '{0}' corrisponde a quello di un'altra proprietà nel tipo '{1}', tuttavia una accetta argomenti di indicizzatore e l'altra no. È possibile che in una delle proprietà manchi un argomento di indicizzatore. + + + + A type would store a byref typed value. This is not permitted by Common IL. + Un valore di tipo byref verrebbe archiviato in un tipo. Ciò non è consentito dall'IL comune. + + + + Duplicate method. The method '{0}' has the same name and signature as another method in type '{1}'. + Metodo duplicato. Il nome e la firma del metodo '{0}' corrispondono a quelli di un altro metodo nel tipo '{1}'. + + + + Duplicate method. The method '{0}' has the same name and signature as another method in type '{1}' once tuples, functions, units of measure and/or provided types are erased. + Metodo duplicato. Il nome e la firma del metodo '{0}' corrispondono a quelli di un altro metodo nel tipo '{1}' dopo la cancellazione di tuple, funzioni, unità di misura e/o tipi forniti. + + + + The method '{0}' has curried arguments but has the same name as another method in type '{1}'. Methods with curried arguments cannot be overloaded. Consider using a method taking tupled arguments. + Il nome del metodo '{0}' con argomenti sottoposti a currying corrisponde a quello di un altro metodo nel tipo '{1}'. Non è possibile eseguire l'overload di metodi con argomenti sottoposti a currying. Provare a usare un metodo che usa argomenti di tupla. + + + + Methods with curried arguments cannot declare 'out', 'ParamArray', 'optional', 'ReflectedDefinition', 'byref', 'CallerLineNumber', 'CallerMemberName', or 'CallerFilePath' arguments + I metodi con argomenti sottoposti a currying non possono dichiarare argomenti 'out', 'ParamArray', 'optional', 'ReflectedDefinition', 'byref', 'CallerLineNumber', 'CallerMemberName' o 'CallerFilePath' + + + + Duplicate property. The property '{0}' has the same name and signature as another property in type '{1}'. + Proprietà duplicata. Il nome e la firma della proprietà '{0}' corrispondono a quelli di un'altra proprietà nel tipo '{1}'. + + + + Duplicate property. The property '{0}' has the same name and signature as another property in type '{1}' once tuples, functions, units of measure and/or provided types are erased. + Proprietà duplicata. Il nome e la firma della proprietà '{0}' corrispondono a quelli di un'altra proprietà nel tipo '{1}' dopo la cancellazione di tuple, funzioni, unità di misura e/o tipi forniti. + + + + Duplicate method. The abstract method '{0}' has the same name and signature as an abstract method in an inherited type. + Metodo duplicato. Il nome e la firma del metodo astratto '{0}' corrispondono a quelli di un metodo astratto in un tipo ereditato. + + + + Duplicate method. The abstract method '{0}' has the same name and signature as an abstract method in an inherited type once tuples, functions, units of measure and/or provided types are erased. + Metodo duplicato. Il nome e la firma del metodo astratto '{0}' corrispondono a quelli di un metodo astratto in un tipo ereditato dopo la cancellazione di tuple, funzioni, unità di misura e/o tipi forniti. + + + + This type implements the same interface at different generic instantiations '{0}' and '{1}'. This is not permitted in this version of F#. + Questo tipo implementa la stessa interfaccia in creazioni di istanze generiche diverse '{0}' e '{1}'. Ciò non è consentito in questa versione di F#. + + + + The type of a field using the 'DefaultValue' attribute must admit default initialization, i.e. have 'null' as a proper value or be a struct type whose fields all admit default initialization. You can use 'DefaultValue(false)' to disable this check + Il tipo di un campo che utilizza l'attributo 'DefaultValue' deve accettare l'inizializzazione predefinita, ovvero deve prevedere 'null' come valore valido oppure essere un tipo di struct i cui campi accettano tutti l'inizializzazione predefinita. È possibile utilizzare 'DefaultValue(false)' per disabilitare questa verifica + + + + The type abbreviation contains byrefs. This is not permitted by F#. + L'abbreviazione del tipo contiene byref. Ciò non è consentito da F#. + + + + The variable '{0}' is bound in a quotation but is used as part of a spliced expression. This is not permitted since it may escape its scope. + La variabile '{0}' è associata in una quotation ma viene usata come parte di un'espressione sottoposta a splicing. Ciò non è consentito perché la variabile potrebbe uscire dal relativo ambito. + + + + Quotations cannot contain uses of generic expressions + Le quotation non possono contenere utilizzi di espressioni generiche + + + + Quotations cannot contain function definitions that are inferred or declared to be generic. Consider adding some type constraints to make this a valid quoted expression. + Le quotation non possono contenere definizioni di funzioni dedotte o dichiarate in modo da essere generiche. Provare ad aggiungere alcuni vincoli di tipo per rendere l'espressione in quotation valida. + + + + Quotations cannot contain object expressions + Le quotation non possono contenere espressioni di oggetto + + + + Quotations cannot contain expressions that take the address of a field + Le quotation non possono contenere espressioni che utilizzano l'indirizzo di un campo + + + + Quotations cannot contain expressions that fetch static fields + Le quotation non possono contenere espressioni che recuperano campi statici + + + + Quotations cannot contain inline assembly code or pattern matching on arrays + Le quotation non possono contenere codice assembly inline o criteri di ricerca in matrici + + + + Quotations cannot contain descending for loops + Le quotation non possono contenere elementi di ordinamento decrescente per i cicli + + + + Quotations cannot contain expressions that fetch union case indexes + Le quotation non possono contenere espressioni che recuperano indici di case di unione + + + + Quotations cannot contain expressions that set union case fields + Le quotation non possono contenere espressioni che impostano campi di case di unione + + + + Quotations cannot contain expressions that set fields in exception values + Le quotation non possono contenere espressioni che impostano campi in valori di eccezione + + + + Quotations cannot contain expressions that require byref pointers + Le quotation non possono contenere espressioni che richiedono puntatori byref + + + + Quotations cannot contain expressions that make member constraint calls, or uses of operators that implicitly resolve to a member constraint call + Le quotation non possono contenere espressioni che effettuano chiamate a vincoli di membro o utilizzi di operatori che vengono risolti in modo implicito in una chiamata a vincolo di membro + + + + Quotations cannot contain this kind of constant + Le quotation non possono contenere questo tipo di costante + + + + Quotations cannot contain this kind of pattern match + Le quotation non possono contenere questo tipo di carattere jolly + + + + Quotations cannot contain array pattern matching + Le quotation non possono contenere criteri di ricerca per identificare matrici + + + + Quotations cannot contain this kind of type + Le quotation non possono contenere questo genere di tipo + + + + The declared type parameter '{0}' cannot be used here since the type parameter cannot be resolved at compile time + Non è possibile usare il parametro di tipo dichiarato '{0}' in questa posizione perché non può essere risolto in fase di compilazione + + + + This code is less generic than indicated by its annotations. A unit-of-measure specified using '_' has been determined to be '1', i.e. dimensionless. Consider making the code generic, or removing the use of '_'. + Il codice è meno generico di quanto indicato dalle relative annotazioni. Un'unità di misura specificata mediante '_' risulta essere '1', ovvero senza dimensione. Provare a rendere il codice generico oppure a rimuovere l'utilizzo di '_'. + + + + Type inference problem too complicated (maximum iteration depth reached). Consider adding further type annotations. + Problema di inferenza del tipo troppo complesso (raggiunta profondità di iterazione massima). Provare ad aggiungere ulteriori annotazioni di tipo. + + + + Expected arguments to an instance member + Argomenti previsti in un membro di istanza + + + + This indexer expects {0} arguments but is here given {1} + L'indicizzatore prevede {0} argomenti, tuttavia ne è stato rilevato un numero pari a {1} + + + + Expecting a type supporting the operator '{0}' but given a function type. You may be missing an argument to a function. + È previsto un tipo che supporti l'operatore '{0}', tuttavia è specificato un tipo di funzione. Probabilmente manca un argomento in una funzione. + + + + Expecting a type supporting the operator '{0}' but given a tuple type + È previsto un tipo che supporti l'operatore '{0}', tuttavia è specificato un tipo di tuple + + + + None of the types '{0}' support the operator '{1}' + Nessuno dei tipi '{0}' supporta l'operatore '{1}' + + + + The type '{0}' does not support the operator '{1}' + Il tipo '{0}' non supporta l'operatore '{1}' + + + + None of the types '{0}' support the operator '{1}'. Consider opening the module 'Microsoft.FSharp.Linq.NullableOperators'. + Nessun tipo '{0}' supporta l'operatore '{1}'. Provare ad aprire il modulo 'Microsoft.FSharp.Linq.NullableOperators'. + + + + The type '{0}' does not support the operator '{1}'. Consider opening the module 'Microsoft.FSharp.Linq.NullableOperators'. + Il tipo '{0}' non supporta l'operatore '{1}'. Provare ad aprire il modulo 'Microsoft.FSharp.Linq.NullableOperators'. + + + + The type '{0}' does not support a conversion to the type '{1}' + Il tipo '{0}' non supporta una conversione nel tipo '{1}' + + + + The type '{0}' has a method '{1}' (full name '{2}'), but the method is static + Il tipo '{0}' ha un metodo '{1}' (nome completo '{2}'), tuttavia il metodo è statico + + + + The type '{0}' has a method '{1}' (full name '{2}'), but the method is not static + Il tipo '{0}' ha un metodo '{1}' (nome completo '{2}'), tuttavia il metodo non è statico + + + + The constraints 'struct' and 'not struct' are inconsistent + I vincoli 'struct' e 'not struct' sono incoerenti + + + + The type '{0}' does not have 'null' as a proper value + Il tipo '{0}' non prevede 'null' come valore valido + + + + The type '{0}' does not have 'null' as a proper value. To create a null value for a Nullable type use 'System.Nullable()'. + Il tipo '{0}' non prevede 'null' come valore valido. Per creare un valore null per un tipo Nullable utilizzare 'System.Nullable()'. + + + + The type '{0}' does not support the 'comparison' constraint because it has the 'NoComparison' attribute + Il tipo '{0}' non supporta il vincolo 'comparison' perché contiene l'attributo 'NoComparison' + + + + The type '{0}' does not support the 'comparison' constraint. For example, it does not support the 'System.IComparable' interface + Il tipo '{0}' non supporta il vincolo 'comparison'. Non supporta ad esempio l'interfaccia 'System.IComparable' + + + + The type '{0}' does not support the 'comparison' constraint because it is a record, union or struct with one or more structural element types which do not support the 'comparison' constraint. Either avoid the use of comparison with this type, or add the 'StructuralComparison' attribute to the type to determine which field type does not support comparison + Il tipo '{0}' non supporta il vincolo 'comparison' perché è un record, un'unione o uno struct con uno o più tipi di elementi strutturali che non supportano il vincolo 'comparison'. Evitare l'uso del confronto con questo tipo oppure aggiungere l'attributo 'StructuralComparison' al tipo per determinare quale tipo di campo non supporta il confronto + + + + The type '{0}' does not support the 'equality' constraint because it has the 'NoEquality' attribute + Il tipo '{0}' non supporta il vincolo 'equality' perché contiene l'attributo 'NoEquality' + + + + The type '{0}' does not support the 'equality' constraint because it is a function type + Il tipo '{0}' non supporta il vincolo 'equality' perché si tratta di un tipo di funzione + + + + The type '{0}' does not support the 'equality' constraint because it is a record, union or struct with one or more structural element types which do not support the 'equality' constraint. Either avoid the use of equality with this type, or add the 'StructuralEquality' attribute to the type to determine which field type does not support equality + Il tipo '{0}' non supporta il vincolo 'equality' perché è un record, un'unione o uno struct con uno o più tipi di elementi strutturali che non supportano il vincolo 'equality'. Evitare l'uso dell'uguaglianza con questo tipo oppure aggiungere l'attributo 'StructuralEquality' al tipo per determinare quale tipo di campo non supporta l'uguaglianza + + + + The type '{0}' is not a CLI enum type + Il tipo '{0}' non è un tipo enumerazione CLI + + + + The type '{0}' has a non-standard delegate type + Il tipo '{0}' dispone di un tipo delegato non standard + + + + The type '{0}' is not a CLI delegate type + Il tipo '{0}' non è un tipo delegato CLI + + + + This type parameter cannot be instantiated to 'Nullable'. This is a restriction imposed in order to ensure the meaning of 'null' in some CLI languages is not confusing when used in conjunction with 'Nullable' values. + Non è possibile creare un'istanza di questo parametro di tipo come 'Nullable'. Si tratta di una limitazione imposta per assicurare che il significato di 'null' in alcuni linguaggi CLI non venga confuso se usato in combinazione con valori 'Nullable'. + + + + A generic construct requires that the type '{0}' is a CLI or F# struct type + Per i costrutti generici è necessario che il tipo '{0}' sia un tipo di struct CLI o F# + + + + A generic construct requires that the type '{0}' is an unmanaged type + Un costruttore generico richiede che il tipo '{0}' sia un tipo non gestito + + + + The type '{0}' is not compatible with any of the types {1}, arising from the use of a printf-style format string + Il tipo '{0}' non è compatibile con alcuno dei tipi {1}, derivanti dall'utilizzo di una stringa di formato printf-style + + + + A generic construct requires that the type '{0}' have reference semantics, but it does not, i.e. it is a struct + Per i costrutti generici è necessario che il tipo '{0}' disponga di semantica di riferimento, la quale è in questo caso assente, ovvero si tratta di uno struct + + + + A generic construct requires that the type '{0}' be non-abstract + Per i costrutti generici è necessario che il tipo '{0}' non sia astratto + + + + A generic construct requires that the type '{0}' have a public default constructor + Per i costrutti generici è necessario che il tipo '{0}' disponga di un costruttore predefinito pubblico + + + + Type instantiation length mismatch + Lunghezza creazione dell'istanza del tipo non corrispondente + + + + Optional arguments not permitted here + In questa posizione non sono consentiti argomenti facoltativi + + + + {0} is not a static member + {0} non è un membro statico + + + + {0} is not an instance member + {0} non è un membro di istanza + + + + Argument length mismatch + Lunghezza argomenti non corrispondente + + + + The argument types don't match + Tipi di argomento non corrispondenti + + + + This method expects a CLI 'params' parameter in this position. 'params' is a way of passing a variable number of arguments to a method in languages such as C#. Consider passing an array for this argument + Questo metodo prevede un parametro CLI 'params' in questa posizione. Il parametro 'params' rappresenta un modo per passare un numero di argomenti variabile a un metodo in linguaggi quali C#. Provare a passare una matrice per questo argomento + + + + The member or object constructor '{0}' is not {1} + Il costruttore di oggetti o membro '{0}' non è {1} + + + + The member or object constructor '{0}' is not {1}. Private members may only be accessed from within the declaring type. Protected members may only be accessed from an extending type and cannot be accessed from inner lambda expressions. + Il costruttore di oggetti o membro '{0}' non è {1}. È possibile accedere ai membri privati solo dall'interno del tipo dichiarante. I membri privati sono invece accessibili solo da un tipo di estensione e non da espressioni lambda interne. + + + + {0} is not a static method + {0} non è un metodo statico + + + + {0} is not an instance method + {0} non è un metodo di istanza + + + + The member or object constructor '{0}' has no argument or settable return property '{1}'. {2}. + Il costruttore di oggetti o membro '{0}' non dispone di un argomento o di una proprietà restituita impostabile '{1}'. {2}. + + + + The object constructor '{0}' has no argument or settable return property '{1}'. {2}. + Per il costruttore di oggetti '{0}' non esiste un argomento o una proprietà restituita impostabile '{1}'. {2}. + + + + The required signature is {0} + La firma obbligatoria è {0} + + + + The member or object constructor '{0}' requires {1} argument(s). The required signature is '{2}'. + Il costruttore di oggetti o membro '{0}' richiede {1} argomento/i. La firma necessaria è '{2}'. + + + + The member or object constructor '{0}' requires {1} additional argument(s). The required signature is '{2}'. + Il costruttore di oggetti o membro '{0}' richiede {1} argomento/i aggiuntivo/i. La firma necessaria è '{2}'. + + + + The member or object constructor '{0}' requires {1} argument(s). The required signature is '{2}'. Some names for missing arguments are {3}. + Il costruttore di oggetti o membro '{0}' richiede {1} argomento/i. La firma necessaria è '{2}'. Alcuni nomi di argomenti mancanti sono {3}. + + + + The member or object constructor '{0}' requires {1} additional argument(s). The required signature is '{2}'. Some names for missing arguments are {3}. + Il costruttore di oggetti o membro '{0}' richiede {1} argomento/i aggiuntivo/i. La firma necessaria è '{2}'. Alcuni nomi di argomenti mancanti sono {3}. + + + + The member or object constructor '{0}' requires {1} argument(s) but is here given {2} unnamed and {3} named argument(s). The required signature is '{4}'. + Il costruttore di oggetti o membro '{0}' richiede {1} argomento/i, tuttavia sono specificati {2} argomento/i non denominato/i e {3} argomento/i denominato/i. La firma necessaria è '{4}'. + + + + The member or object constructor '{0}' takes {1} argument(s) but is here given {2}. The required signature is '{3}'. + Il costruttore di oggetti o membro '{0}' utilizza {1} argomento/i, tuttavia il numero di argomenti specificati è pari a {2}. La firma necessaria è '{3}'. + + + + The object constructor '{0}' takes {1} argument(s) but is here given {2}. The required signature is '{3}'. + Il costruttore di oggetti '{0}' accetta {1} argomento/i, ma ne sono stati specificati {2}. La firma obbligatoria è '{3}'. + + + + The object constructor '{0}' takes {1} argument(s) but is here given {2}. The required signature is '{3}'. If some of the arguments are meant to assign values to properties, consider separating those arguments with a comma (','). + Il costruttore di oggetti '{0}' accetta {1} argomento/i, ma ne sono stati specificati {2}. La firma obbligatoria è '{3}'. Se alcuni degli argomenti vengono usati per assegnare valori alle proprietà, provare a delimitarli con una virgola (','). + + + + The member or object constructor '{0}' takes {1} type argument(s) but is here given {2}. The required signature is '{3}'. + Il costruttore di oggetti o membro '{0}' utilizza {1} argomento/i di tipo, tuttavia il numero di argomenti specificati è pari a {2}. La firma necessaria è '{3}'. + + + + A member or object constructor '{0}' taking {1} arguments is not accessible from this code location. All accessible versions of method '{2}' take {3} arguments. + Da questa posizione del codice non è possibile accedere a un costruttore di oggetti o membri '{0}' che accetta {1} argomenti. Tutte le versioni accessibili del metodo '{2}' accettano {3} argomenti. + + + + Incorrect generic instantiation. No {0} member named '{1}' takes {2} generic arguments. + Creazione di istanza generica non corretta. Nessun membro {0} denominato '{1}' utilizza {2} argomenti generici. + + + + The member or object constructor '{0}' does not take {1} argument(s). An overload was found taking {2} arguments. + Il costruttore di oggetti o membro '{0}' non utilizza {1} argomento/i. Trovato overload con {2} argomenti. + + + + No {0} member or object constructor named '{1}' takes {2} arguments + Nessun costruttore di oggetti o membro {0} denominato '{1}' utilizza {2} argomenti + + + + No {0} member or object constructor named '{1}' takes {2} arguments. Note the call to this member also provides {3} named arguments. + Nessun costruttore di oggetti o membro {0} denominato '{1}' accetta {2} argomenti. Si noti che la chiamata a questo membro fornisce inoltre {3} argomenti denominati. + + + + No {0} member or object constructor named '{1}' takes {2} arguments. The named argument '{3}' doesn't correspond to any argument or settable return property for any overload. + Nessun costruttore di oggetti o membro {0} denominato '{1}' utilizza {2} argomenti. L'argomento denominato '{3}' non corrisponde ad alcun argomento o proprietà restituita impostabile per alcun overload. + + + + Method or object constructor '{0}' not found + Costruttore di oggetti o metodo '{0}' non trovato + + + + No overloads match for method '{0}'. + Nessun overload corrispondente per il metodo '{0}'. + + + + A unique overload for method '{0}' could not be determined based on type information prior to this program point. A type annotation may be needed. + Non è stato possibile determinare un overload univoco per il metodo '{0}' in base alle informazioni sui tipi prima di questo punto del programma. Potrebbe essere necessaria un'annotazione di tipo. + + + + Candidates: {0} + Candidati: {0} + + + + The available overloads are shown below. + Gli overload disponibili sono indicati di seguito. + + + + Accessibility modifiers are not permitted on 'do' bindings, but '{0}' was given. + I modificatori di accessibilità non sono consentiti nei binding 'do', ma è stato specificato '{0}'. + + + + End of file in #if section begun at or after here + La fine del file nella sezione #if inizia in questa posizione o dopo di essa + + + + End of file in string begun at or before here + La fine del file nella stringa inizia in questa posizione o prima di essa + + + + End of file in verbatim string begun at or before here + La fine del file nella stringa verbatim inizia in questa posizione o prima di essa + + + + End of file in comment begun at or before here + La fine del file nel commento inizia in questa posizione o prima di essa + + + + End of file in string embedded in comment begun at or before here + La fine del file nella stringa incorporata nel commento inizia in questa posizione o prima di essa + + + + End of file in verbatim string embedded in comment begun at or before here + La fine del file nella stringa verbatim incorporata nel commento inizia in questa posizione o prima di essa + + + + End of file in IF-OCAML section begun at or before here + La fine del file nella sezione IF-OCAML inizia in questa posizione o prima di essa + + + + End of file in directive begun at or before here + La fine del file nella direttiva inizia in questa posizione o prima di essa + + + + No #endif found for #if or #else + Nessun #endif trovato per #if o #else + + + + Attributes have been ignored in this construct + Attributi ignorati nel costrutto + + + + 'use' bindings are not permitted in primary constructors + Binding 'use' non consentiti in costruttori primari + + + + 'use' bindings are not permitted in modules and are treated as 'let' bindings + Binding 'use' non consentiti nei moduli e considerati come binding 'let' + + + + An integer for loop must use a simple identifier + Un Integer per un ciclo deve usare un identificatore semplice + + + + At most one 'with' augmentation is permitted + È consentito al massimo un aumento 'with' + + + + A semicolon is not expected at this point + Punto e virgola non previsto in questo punto + + + + Unexpected end of input + Fine di input non prevista + + + + Accessibility modifiers are not permitted here, but '{0}' was given. + I modificatori di accessibilità non sono consentiti in questa posizione, ma è stato specificato '{0}'. + + + + Only '#' compiler directives may occur prior to the first 'namespace' declaration + Prima della prima dichiarazione 'namespace' possono essere presenti solo direttive '#' del compilatore. + + + + Accessibility modifiers should come immediately prior to the identifier naming a construct + I modificatori di accessibilità devono trovarsi immediatamente prima dell'identificatore di denominazione di un costrutto + + + + Files should begin with either a namespace or module declaration, e.g. 'namespace SomeNamespace.SubNamespace' or 'module SomeNamespace.SomeModule', but not both. To define a module within a namespace use 'module SomeModule = ...' + I file devono iniziare con una dichiarazione di modulo o di spazio dei nomi, ad esempio 'namespace SpazioNomi.SottoSpazioNomi' oppure 'module SpazioNomi.Modulo', ma non con entrambe. Per definire un modulo all'interno di uno spazio dei nomi utilizzare 'module Modulo = ...' + + + + A module abbreviation must be a simple name, not a path + L'abbreviazione di un modulo deve essere un nome semplice, non un percorso + + + + Ignoring attributes on module abbreviation + Gli attributi nell'abbreviazione del modulo verranno ignorati + + + + The '{0}' accessibility attribute is not allowed on module abbreviation. Module abbreviations are always private. + L'attributo di accessibilità '{0}' non è consentito nell'abbreviazione del modulo. Le abbreviazioni dei moduli sono sempre private. + + + + The '{0}' visibility attribute is not allowed on module abbreviation. Module abbreviations are always private. + L'attributo di visibilità '{0}' non è consentito nell'abbreviazione del modulo. Le abbreviazioni dei moduli sono sempre private. + + + + Unclosed block + Blocco non risolto + + + + Unmatched 'begin' or 'struct' + 'begin' o 'struct' senza corrispondenza + + + + A module name must be a simple name, not a path + Il nome di un modulo deve essere un nome semplice, non un percorso + + + + Unexpected empty type moduleDefn list + Elenco moduleDefn di tipo vuoto non previsto + + + + Attributes should be placed before 'val' + Gli attributi devono trovarsi prima di 'val' + + + + Attributes are not permitted on interface implementations + Attributi non consentiti in implementazioni di interfaccia + + + + Syntax error + Errore di sintassi + + + + Augmentations are not permitted on delegate type moduleDefns + Aumenti non consentiti in elementi moduleDefns di tipo delegato + + + + Unmatched 'class', 'interface' or 'struct' + 'class', 'interface' o 'struct' senza corrispondenza + + + + A type definition requires one or more members or other declarations. If you intend to define an empty class, struct or interface, then use 'type ... = class end', 'interface end' or 'struct end'. + In una definizione di tipo sono necessari uno o più membri oppure altre dichiarazioni. Se si vuole definire una classe, un'interfaccia o uno struct vuoto, usare 'type ... = class end', 'interface end' o 'struct end'. + + + + Unmatched 'with' or badly formatted 'with' block + 'with' senza corrispondenza o blocco 'with' in formato non valido + + + + 'get', 'set' or 'get,set' required + Necessari 'get', 'set' o 'get,set' + + + + Only class types may take value arguments + Gli argomenti value possono essere usati solo da tipi di classe + + + + Unmatched 'begin' + 'begin' senza corrispondenza + + + + Invalid declaration syntax + Sintassi di dichiarazione non valida + + + + 'get' and/or 'set' required + Necessari 'get' e/o 'set' + + + + Type annotations on property getters and setters must be given after the 'get()' or 'set(v)', e.g. 'with get() : string = ...' + Le annotazioni di tipo nei getter e setter di proprietà devono essere specificate dopo 'get()' o 'set(v)', ad esempio 'with get() : string = ...' + + + + A getter property is expected to be a function, e.g. 'get() = ...' or 'get(index) = ...' + Un proprietà di getter deve essere una funzione, ad esempio 'get() = ...' oppure 'get(index) = ...' + + + + Multiple accessibilities given for property getter or setter + Sono state assegnate più accessibilità per il getter o il setter della proprietà + + + + Property setters must be defined using 'set value = ', 'set idx value = ' or 'set (idx1,...,idxN) value = ... ' + I setter di proprietà devono essere definiti con 'set value = ', 'set idx value = ' o 'set (idx1,...,idxN) value = ... ' + + + + Interfaces always have the same visibility as the enclosing type + Le interfacce hanno sempre la stessa visibilità del tipo di inclusione + + + + Accessibility modifiers are not allowed on this member. Abstract slots always have the same visibility as the enclosing type. + Modificatori di accessibilità non consentiti in questo membro. Gli slot astratti hanno sempre la stessa visibilità del tipo di inclusione. + + + + Attributes are not permitted on 'inherit' declarations + Gli attributi non sono consentiti in dichiarazioni 'inherit' + + + + Accessibility modifiers are not permitted on an 'inherits' declaration + Modificatori di accessibilità non consentiti in una dichiarazione 'inherits' + + + + 'inherit' declarations cannot have 'as' bindings. To access members of the base class when overriding a method, the syntax 'base.SomeMember' may be used; 'base' is a keyword. Remove this 'as' binding. + Le dichiarazioni 'inherit' non possono contenere binding 'as'. Per accedere ai membri della classe di base quando si esegue l'override di un metodo, è possibile usare la sintassi 'base.SomeMember' dove 'base' è una parola chiave. Rimuovere il binding 'as'. + + + + Attributes are not allowed here + Gli attributi non sono consentiti in questa posizione + + + + Accessibility modifiers are not permitted in this position for type abbreviations + Modificatori di accessibilità non consentiti in questa posizione per le abbreviazioni di tipo + + + + Accessibility modifiers are not permitted in this position for enum types + I modificatori di accessibilità non sono consentiti in questa posizione per i tipi enumerazione + + + + All enum fields must be given values + È necessario assegnare valori a tutti i campi di enumerazione + + + + Accessibility modifiers are not permitted on inline assembly code types + Modificatori di accessibilità non consentiti in tipi di codice assembly inline + + + + Unexpected identifier: '{0}' + Identificatore non previsto: '{0}' + + + + Accessibility modifiers are not permitted on union cases. Use 'type U = internal ...' or 'type U = private ...' to give an accessibility to the whole representation. + I modificatori di accessibilità non sono consentiti in casi di unione. Usare 'type U = internal ...' o 'type U = private ...' per assegnare un'accessibilità all'intera rappresentazione. + + + + Accessibility modifiers are not permitted on enumeration fields + Modificatori di accessibilità non consentiti in campi di enumerazione + + + + Consider using a separate record type instead + Provare invece a utilizzare un tipo di record separato + + + + Accessibility modifiers are not permitted on record fields. Use 'type R = internal ...' or 'type R = private ...' to give an accessibility to the whole representation. + Modificatori di accessibilità non consentiti in campi di record. Utilizzare 'type R = internal ...' o 'type R = private ...' per assegnare un'accessibilità all'intera rappresentazione. + + + + The declaration form 'let ... and ...' for non-recursive bindings is not used in F# code. Consider using a sequence of 'let' bindings + Il formato di dichiarazione 'let ... and ...' per binding non ricorsivi non è usato nel codice F#. Provare a usare una sequenza di binding 'let' + + + + Unmatched '(' + '(' senza corrispondenza + + + + Successive patterns should be separated by spaces or tupled + I criteri successivi devono essere separati da spazi o inclusi in tuple + + + + No matching 'in' found for this 'let' + Nessun 'in' corrispondente trovato per 'let' + + + + Error in the return expression for this 'let'. Possible incorrect indentation. + Errore nell'espressione restituita per 'let'. Il rientro potrebbe non essere corretto. + + + + The block following this '{0}' is unfinished. Every code block is an expression and must have a result. '{1}' cannot be the final code element in a block. Consider giving this block an explicit result. + Il blocco che segue questo elemento '{0}' non contiene un elemento finale. Ogni blocco di codice è un'espressione e deve includere un risultato. '{1}' non può essere l'elemento di codice finale di un blocco. Provare ad assegnare un risultato esplicito a questo blocco. + + + + Incomplete conditional. Expected 'if <expr> then <expr>' or 'if <expr> then <expr> else <expr>'. + Espressione condizionale incompleta. Previsto 'if <expr> then <expr>' o 'if <expr> then <expr> else <expr>'. + + + + 'assert' may not be used as a first class value. Use 'assert <expr>' instead. + Non è più possibile utilizzare 'assert' come valore di prima classe. Utilizzare invece 'assert <expr>'. + + + + Identifier expected + È previsto un identificatore + + + + 'in' or '=' expected + Previsto 'in' o '=' + + + + The use of '->' in sequence and computation expressions is limited to the form 'for pat in expr -> expr'. Use the syntax 'for ... in ... do ... yield...' to generate elements in more complex sequence expressions. + L'utilizzo di '->' in espressioni sequenza e di calcolo è limitato al formato 'for crit in expr -> expr'. Utilizzare la sintassi 'for ... in ... do ... yield...' per generare elementi in espressioni sequenza più complesse. + + + + Successive arguments should be separated by spaces or tupled, and arguments involving function or method applications should be parenthesized + Gli argomenti successivi devono essere separati da spazi o inclusi in tuple, mentre gli argomenti che prevedono applicazioni di metodi o funzioni devono essere racchiusi tra parentesi + + + + Unmatched '[' + '[' senza corrispondenza + + + + Missing qualification after '.' + Qualificazione mancante dopo '.' + + + + In F# code you may use 'expr.[expr]'. A type annotation may be required to indicate the first expression is an array + Nel codice F# è possibile usare 'espr.[espr]'. Per indicare che la prima espressione è una matrice, potrebbe essere necessaria un'annotazione di tipo + + + + Mismatched quotation, beginning with '{0}' + Quotation non corrispondente con '{0}' iniziale + + + + Unmatched '{0}' + '{0}' senza corrispondenza + + + + Unmatched '[|' + '[|' senza corrispondenza + + + + Unmatched '{{' + '{{' senza corrispondenza + + + + Field bindings must have the form 'id = expr;' + Il formato dei binding di campi deve essere 'id = expr;' + + + + This member is not permitted in an object implementation + Membro non consentito in un'implementazione di oggetto + + + + Missing function body + Corpo funzione mancante + + + + Syntax error in labelled type argument + Errore di sintassi in argomento tipo con etichetta + + + + Unexpected infix operator in type expression + Operatore infisso non previsto in espressione di tipo + + + + The syntax '(typ,...,typ) ident' is not used in F# code. Consider using 'ident<typ,...,typ>' instead + La sintassi '(typ,...,typ) ident' non è utilizzata nel codice F#. Provare a utilizzare invece 'ident<typ,...,typ>' + + + + Invalid literal in type + Valore letterale non valido nel tipo + + + + Unexpected infix operator in unit-of-measure expression. Legal operators are '*', '/' and '^'. + Operatore infisso non previsto in espressione di unità di misura. Operatori validi: '*', '/' e '^'. + + + + Unexpected integer literal in unit-of-measure expression + Valore letterale Integer non previsto in espressione di unità di misura + + + + Syntax error: unexpected type parameter specification + Errore di sintassi: specifica di parametro di tipo non prevista + + + + Mismatched quotation operator name, beginning with '{0}' + Nome operatore di quotation non corrispondente con '{0}' iniziale + + + + Active pattern case identifiers must begin with an uppercase letter + Gli identificatori di distinzione tra maiuscole e minuscole nei criteri di ricerca attivi devono iniziare con una lettera maiuscola + + + + The '|' character is not permitted in active pattern case identifiers + Il carattere '|' non è consentito in identificatori di distinzione tra maiuscole e minuscole di criteri attivi + + + + Denominator must not be 0 in unit-of-measure exponent + Il denominatore non deve essere 0 nell'esponente dell'unità di misura + + + + No '=' symbol should follow a 'namespace' declaration + La dichiarazione 'namespace' non deve essere seguita da simboli '=' + + + + The syntax 'module ... = struct .. end' is not used in F# code. Consider using 'module ... = begin .. end' + La sintassi 'module ... = struct .. end' non è utilizzata nel codice F#. Provare a utilizzare 'module ... = begin .. end' + + + + The syntax 'module ... : sig .. end' is not used in F# code. Consider using 'module ... = begin .. end' + La sintassi 'module ... : sig .. end' non è utilizzata nel codice F#. Provare a utilizzare 'module ... = begin .. end' + + + + A static field was used where an instance field is expected + È stato utilizzato un campo statico in una posizione in cui era previsto un campo di istanza + + + + Method '{0}' is not accessible from this code location + Il metodo '{0}' non è accessibile da questa posizione di codice + + + + Implicit product of measures following / + Prodotto di misure implicito dopo / + + + + Unexpected SynMeasure.Anon + SynMeasure.Anon imprevisto + + + + Non-zero constants cannot have generic units. For generic zero, write 0.0<_>. + Le costanti non zero non possono avere unità generiche. Per lo zero generico, scrivere 0.0<_>. + + + + In sequence expressions, results are generated using 'yield' + Nelle espressioni sequenza i risultati sono generati mediante 'yield' + + + + Unexpected big rational constant + Costante razionale grande non prevista + + + + Units-of-measure supported only on float, float32, decimal and signed integer types + Unità di misura supportata solo in tipi float, float32, decimal e Integer con segno + + + + Unexpected Const_uint16array + Const_uint16array non previsto + + + + Unexpected Const_bytearray + Const_bytearray non previsto + + + + A parameter with attributes must also be given a name, e.g. '[<Attribute>] Name : Type' + A un parametro con attributi deve essere inoltre assegnato un nome, ad esempio '[<Attribute>] Name : Type' + + + + Return values cannot have names + I valori restituiti non possono avere nomi + + + + MemberKind.PropertyGetSet only expected in parse trees + MemberKind.PropertyGetSet previsto solo in strutture ad albero di analisi + + + + Namespaces cannot contain values. Consider using a module to hold your value declarations. + Gli spazi dei nomi non possono contenere valori. Provare a utilizzare un modulo che contenga le dichiarazioni dei valori. + + + + Namespaces cannot contain extension members except in the same file and namespace declaration group where the type is defined. Consider using a module to hold declarations of extension members. + Gli spazi dei nomi non possono contenere membri di estensione, tranne che nello stesso gruppo di dichiarazione di file e spazio dei nomi in cui è definito il tipo. Provare a usare un modulo che contenga le dichiarazioni dei membri di estensione. + + + + Multiple visibility attributes have been specified for this identifier + Più attributi di visibilità specificati per l'identificatore + + + + Multiple visibility attributes have been specified for this identifier. 'let' bindings in classes are always private, as are any 'let' bindings inside expressions. + Sono stati specificati più attributi di visibilità per l'identificatore. I binding 'let' nelle classi sono sempre privati, così come eventuali binding 'let' nelle espressioni. + + + + The name '({0})' 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 '{1}' instead. + Il nome '({0})' non può essere utilizzato come nome di membro. Per definire semantica di confronto per un tipo, implementare l'interfaccia 'System.IComparable'. Se si definisce un membro statico per l'utilizzo da parte di altri linguaggi CLI, utilizzare il nome '{1}'. + + + + The name '({0})' 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 '{1}' instead. + Il nome '({0})' non può essere utilizzato come nome di membro. Per definire semantica di uguaglianza per un tipo, eseguire l'override del membro 'Object.Equals'. Se si definisce un membro statico per l'utilizzo da parte di altri linguaggi CLI, utilizzare il nome '{1}'. + + + + The name '({0})' should not be used as a member name. If defining a static member for use from other CLI languages then use the name '{1}' instead. + Il nome '({0})' non può essere usato come nome di membro. Se si definisce un membro statico per l'uso da parte di altri linguaggi CLI, usare il nome '{1}'. + + + + The name '({0})' should not be used as a member name because it is given a standard definition in the F# library over fixed types + Il nome '({0})' non può essere usato come nome di membro perché è associato a una definizione standard nella libreria F# sui tipi fissi + + + + The '{0}' operator should not normally be redefined. To define overloaded comparison semantics for a particular type, implement the 'System.IComparable' interface in the definition of that type. + In genere, l'operatore '{0}' non deve essere ridefinito. Per definire semantica di confronto con overload per un determinato tipo, implementare l'interfaccia 'System.IComparable' nella definizione del tipo stesso. + + + + The '{0}' operator should not normally be redefined. To define equality semantics for a type, override the 'Object.Equals' member in the definition of that type. + In genere, l'operatore '{0}' non deve essere ridefinito. Per definire semantica di uguaglianza per un tipo, eseguire l'override del membro 'Object.Equals' nella definizione del tipo stesso. + + + + The '{0}' operator should not normally be redefined. Consider using a different operator name + In genere, l'operatore '{0}' non deve essere ridefinito. Provare a utilizzare un altro nome di operatore + + + + The '{0}' operator cannot be redefined. Consider using a different operator name + Non è possibile ridefinire l'operatore '{0}'. Provare a usare un altro nome di operatore + + + + Expected module or namespace parent {0} + Previsto elemento padre di modulo o spazio dei nomi {0} + + + + The struct, record or union type '{0}' implements the interface 'System.IComparable' explicitly. You must apply the 'CustomComparison' attribute to the type. + Il tipo di struct, record o unione '{0}' implementa l'interfaccia 'System.IComparable' in modo esplicito. È necessario applicare l'attributo 'CustomComparison' al tipo. + + + + The struct, record or union type '{0}' implements the interface 'System.IComparable<_>' explicitly. You must apply the 'CustomComparison' attribute to the type, and should also provide a consistent implementation of the non-generic interface System.IComparable. + Il tipo di struct, record o unione '{0}' implementa l'interfaccia 'System.IComparable<_>' in modo esplicito. È necessario applicare l'attributo 'CustomComparison' al tipo, nonché fornire un'implementazione coerente dell'interfaccia non generica System.IComparable. + + + + The struct, record or union type '{0}' implements the interface 'System.IStructuralComparable' explicitly. Apply the 'CustomComparison' attribute to the type. + Il tipo di struct, record o unione '{0}' implementa l'interfaccia 'System.IStructuralComparable' in modo esplicito. Applicare l'attributo 'CustomComparison' al tipo. + + + + This record contains fields from inconsistent types + Questo record contiene campi di tipi incoerenti + + + + DLLImport stubs cannot be inlined + Non è possibile impostare come inline gli stub DLLImport + + + + Structs may only bind a 'this' parameter at member declarations + Gli struct possono eseguire il binding solo di un parametro 'this' in dichiarazioni di membro + + + + Unexpected expression at recursive inference point + Espressione non prevista in punto di inferenza ricorsiva + + + + This code is less generic than required by its annotations because the explicit type variable '{0}' could not be generalized. It was constrained to be '{1}'. + Il codice è meno generico di quanto richiesto dalle relative annotazioni perché non è possibile generalizzare la variabile di tipo esplicito '{0}'. Sono presenti vincoli per i quali essa deve essere '{1}'. + + + + One or more of the explicit class or function type variables for this binding could not be generalized, because they were constrained to other types + Non è stato possibile generalizzare una o più variabili di tipi di funzione o classi esplicite per questo binding perché sono state vincolate ad altri tipi + + + + A generic type parameter has been used in a way that constrains it to always be '{0}' + Un parametro di tipo generico è utilizzato in modo da dovere essere sempre '{0}' + + + + This type parameter has been used in a way that constrains it to always be '{0}' + Questo parametro di tipo è stato utilizzato in modo da dover essere sempre '{0}' + + + + The type parameters inferred for this value are not stable under the erasure of type abbreviations. This is due to the use of type abbreviations which drop or reorder type parameters, e.g. \n\ttype taggedInt<'a> = int or\n\ttype swap<'a,'b> = 'b * 'a.\nConsider declaring the type parameters for this value explicitly, e.g.\n\tlet f<'a,'b> ((x,y) : swap<'b,'a>) : swap<'a,'b> = (y,x). + I parametri di tipo dedotti per il valore non sono stabili nell'ambito della cancellazione di abbreviazioni di tipo. Questa condizione è dovuta all'utilizzo di abbreviazioni di tipo che eliminano o riordinano i parametri di tipo, ad esempio \n\ttype taggedInt<'a> = int o\n\ttype swap<'a,'b> = 'b * 'a.\nProvare a dichiarare i parametri di tipo per questo valore in modo esplicito, ad esempio \n\tlet f<'a,'b> ((x,y) : swap<'b,'a>) : swap<'a,'b> = (y,x). + + + + Explicit type parameters may only be used on module or member bindings + I parametri di tipo esplicito possono essere usati solo in binding di membri o moduli + + + + You must explicitly declare either all or no type parameters when overriding a generic abstract method + È necessario dichiarare in modo esplicito tutti o nessuno dei parametri di tipo quando si esegue l'override di un metodo astratto generico + + + + The field labels and expected type of this record expression or pattern do not uniquely determine a corresponding record type + Le etichette di campo e il tipo previsto di questo criterio o espressione del record non determinano in modo univoco un tipo di record corrispondente + + + + The field '{0}' appears twice in this record expression or pattern + Il campo '{0}' è presente due volte nei criteri o nell'espressione del record + + + + Unknown union case + Case di unione sconosciuto + + + + This code is not sufficiently generic. The type variable {0} could not be generalized because it would escape its scope. + Questo codice non è sufficientemente generico. Non è stato possibile generalizzare la variabile di tipo {0} perché non sarebbe compresa nel relativo ambito. + + + + A property cannot have explicit type parameters. Consider using a method instead. + Una proprietà non può avere parametri di tipo esplicito. Provare a utilizzare invece un metodo. + + + + A constructor cannot have explicit type parameters. Consider using a static construction method instead. + Un costruttore non può avere parametri di tipo esplicito. Provare a utilizzare invece un metodo di costruzione statico. + + + + This instance member needs a parameter to represent the object being invoked. Make the member static or use the notation 'member x.Member(args) = ...'. + In questo membro di istanza è necessario un parametro per rappresentare l'oggetto richiamato. Rendere il membro statico oppure utilizzare la notazione 'member x.Member(args) = ...'. + + + + Unexpected source-level property specification in syntax tree + Specifica di proprietà a livello di origine non prevista nella struttura ad albero della sintassi + + + + A static initializer requires an argument + Un inizializzatore statico richiede un argomento + + + + An object constructor requires an argument + Un costruttore di oggetto richiede un argomento + + + + This static member should not have a 'this' parameter. Consider using the notation 'member Member(args) = ...'. + Questo membro statico non deve contenere un parametro 'this'. Provare a utilizzare la notazione 'member Member(args) = ...'. + + + + An explicit static initializer should use the syntax 'static new(args) = expr' + Un inizializzatore statico esplicito deve utilizzare la sintassi 'static new(args) = expr' + + + + An explicit object constructor should use the syntax 'new(args) = expr' + Un costruttore di oggetto esplicito deve usare la sintassi 'new(args) = expr' + + + + Unexpected source-level property specification + Specifica di proprietà a livello di origine non prevista + + + + This form of object expression is not used in F#. Use 'member this.MemberName ... = ...' to define member implementations in object expressions. + Questo formato di espressione di oggetto non è utilizzato in F#. Utilizzare 'member this.MemberName... = ...' per definire implementazioni di membro in espressioni di oggetto. + + + + Invalid declaration + Dichiarazione non valida + + + + Attributes are not allowed within patterns + Attributi non consentiti all'interno di criteri + + + + The generic function '{0}' must be given explicit type argument(s) + Alla funzione generica '{0}' devono essere assegnati uno o più argomenti tipo espliciti + + + + The method or function '{0}' should not be given explicit type argument(s) because it does not declare its type parameters explicitly + Al metodo o funzione '{0}' non devono essere assegnati argomenti tipo espliciti perché i relativi parametri di tipo non vengono dichiarati in modo esplicito + + + + This value, type or method expects {0} type parameter(s) but was given {1} + Questo valore, tipo o metodo prevede {0} parametro/i di tipo, tuttavia il numero di parametri specificati è pari a {1} + + + + The default, zero-initializing constructor of a struct type may only be used if all the fields of the struct type admit default initialization + Il costruttore di inizializzazione zero predefinito di un tipo di struct può essere utilizzato solo se tutti i campi del tipo di struct accettano l'inizializzazione predefinita + + + + Couldn't find Dispose on IDisposable, or it was overloaded + Dispose non è stato trovato in IDisposable oppure si è verificato un overload + + + + This value is not a literal and cannot be used in a pattern + Questo valore non è un valore letterale e non è possibile utilizzarlo in un criterio + + + + This field is readonly + Il campo è di sola lettura + + + + Named arguments must appear after all other arguments + Gli argomenti denominati devono essere aggiunti dopo tutti gli altri argomenti + + + + This function value is being used to construct a delegate type whose signature includes a byref argument. You must use an explicit lambda expression taking {0} arguments. + Questo valore di funzione è utilizzato per costruire un tipo delegato la cui firma include un argomento byref. È necessario utilizzare un'espressione lambda esplicita con {0} argomenti. + + + + The type '{0}' is not a type whose values can be enumerated with this syntax, i.e. is not compatible with either seq<_>, IEnumerable<_> or IEnumerable and does not have a GetEnumerator method + Il tipo '{0}' non è un tipo i cui valori possono essere enumerati con questa sintassi, ovvero non è compatibile con seq<_>, IEnumerable<_> o IEnumerable e non dispone di un metodo GetEnumerator + + + + This recursive binding uses an invalid mixture of recursive forms + Questo binding ricorsivo usa una combinazione non valida di formati ricorsivi + + + + This is not a valid object construction expression. Explicit object constructors must either call an alternate constructor or initialize all fields of the object and specify a call to a super class constructor. + Espressione di costruzione di oggetti non valida. I costruttori di oggetto espliciti devono chiamare un costruttore alternativo o inizializzare tutti i campi dell'oggetto e specificare una chiamata al costruttore di super classe. + + + + Invalid constraint + Vincolo non valido + + + + Invalid constraint: the type used for the constraint is sealed, which means the constraint could only be satisfied by at most one solution + Vincolo non valido: il tipo usato per il vincolo è sealed, il che significa che il vincolo può essere soddisfatto al massimo da una soluzione + + + + An 'enum' constraint must be of the form 'enum<type>' + Il formato di un vincolo 'enum' deve essere 'enum<tipo>' + + + + 'new' constraints must take one argument of type 'unit' and return the constructed type + I vincoli 'new' devono usare un argomento di tipo 'unit' e restituire il tipo costruito + + + + This property has an invalid type. Properties taking multiple indexer arguments should have types of the form 'ty1 * ty2 -> ty3'. Properties returning functions should have types of the form '(ty1 -> ty2)'. + La proprietà contiene un tipo non valido. Le proprietà che utilizzano più argomenti di indicizzatore devono avere tipi nel formato 'ti1 * ti2 -> ti3'. Le proprietà che restituiscono funzioni devono avere tipi nel formato '(ti1 -> ti2)'. + + + + Expected unit-of-measure parameter, not type parameter. Explicit unit-of-measure parameters must be marked with the [<Measure>] attribute. + È previsto un parametro di unità di misura, non di tipo. I parametri di unità di misura espliciti devono essere contrassegnati con l'attributo [<Measure>]. + + + + Expected type parameter, not unit-of-measure parameter + È previsto un parametro di tipo, non di unità di misura + + + + Expected type, not unit-of-measure + È previsto un tipo, non un'unità di misura + + + + Expected unit-of-measure, not type + È prevista un'unità di misura, non un tipo + + + + Units-of-measure cannot be used as prefix arguments to a type. Rewrite as postfix arguments in angle brackets. + Non è possibile usare l'unità di misura come argomenti di prefisso per un tipo. Riscrivere come argomenti di suffisso tra parentesi quadre. + + + + Unit-of-measure cannot be used in type constructor application + Non è possibile usare un'unità di misura in un'applicazione del costruttore di tipo + + + + This control construct may only be used if the computation expression builder defines a '{0}' method + Questo costrutto di controllo può essere utilizzato solo se il generatore di espressioni di calcolo definisce un metodo '{0}' + + + + This type has no nested types + Questo tipo non dispone di tipi annidati + + + + Unexpected {0} in type expression + Elemento {0} non previsto in espressione di tipo + + + + Type parameter cannot be used as type constructor + Non è possibile usare un parametro di tipo come costruttore di tipo + + + + Illegal syntax in type expression + Sintassi non valida in espressione di tipo + + + + Anonymous unit-of-measure cannot be nested inside another unit-of-measure expression + Non è possibile annidare unità di misura anonime all'interno di un'altra espressione di unità di misura + + + + Anonymous type variables are not permitted in this declaration + Variabili di tipo anonime non consentite in questa dichiarazione + + + + Unexpected / in type + / non previsto in tipo + + + + Unexpected type arguments + Argomenti tipo non previsti + + + + Optional arguments are only permitted on type members + Gli argomenti facoltativi sono consentiti solo in membri di tipo + + + + Name '{0}' not bound in pattern context + Nome '{0}' non associato nel contesto dei criteri + + + + Non-primitive numeric literal constants cannot be used in pattern matches because they can be mapped to multiple different types through the use of a NumericLiteral module. Consider using replacing with a variable, and use 'when <variable> = <constant>' at the end of the match clause. + Le costanti letterali numeriche non primitive non possono essere usate in criteri di ricerca perché è possibile mapparle a più tipi diversi tramite un modulo NumericLiteral. Provare a sostituire con una variabile e usare 'when <variabile> = <costante>' alla fine della clausola di ricerca. + + + + Type arguments cannot be specified here + Non è possibile specificare argomenti tipo in questa posizione + + + + Only active patterns returning exactly one result may accept arguments + Solo i criteri attivi che restituiscono esattamente un risultato possono accettare argomenti + + + + Invalid argument to parameterized pattern label + Argomento non valido per un'etichetta di criterio con parametri + + + + Internal error. Invalid index into active pattern array + Errore interno. Indice non valido nella matrice di criteri attivi + + + + This union case does not take arguments + Questo case di unione non accetta argomenti + + + + This union case takes one argument + Questo case di unione accetta un argomento + + + + This union case expects {0} arguments in tupled form + Questo case di unione prevede {0} argomenti sotto forma di tupla + + + + Field '{0}' is not static + Il campo '{0}' non è statico + + + + This field is not a literal and cannot be used in a pattern + Questo campo non è un valore letterale e non è possibile utilizzarlo in un criterio + + + + This is not a variable, constant, active recognizer or literal + Questo elemento non è una variabile, una costante, un valore letterale o un riconoscimento attivo + + + + This is not a valid pattern + Criterio non valido + + + + Character range matches have been removed in F#. Consider using a 'when' pattern guard instead. + Corrispondenze dell'intervallo di caratteri rimosse in F#. Provare a utilizzare invece un'espressione guard con criterio 'when'. + + + + Illegal pattern + Criterio non valido + + + + Syntax error - unexpected '?' symbol + Errore di sintassi: previsto simbolo '?' + + + + Expected {0} expressions, got {1} + Previste {0} espressioni, ottenute {1} + + + + TcExprUndelayed: delayed + TcExprUndelayed: con ritardo + + + + This expression form may only be used in sequence and computation expressions + Questo formato di espressione può essere utilizzato solo in espressioni sequenza e di calcolo + + + + Invalid object expression. Objects without overrides or interfaces should use the expression form 'new Type(args)' without braces. + Espressione oggetto non valida. Gli oggetti senza override o interfacce devono usare il formato di espressione 'new Type(args)' senza parentesi graffe. + + + + Invalid object, sequence or record expression + Espressione record, sequenza o oggetto non valida + + + + Invalid record, sequence or computation expression. Sequence expressions should be of the form 'seq {{ ... }}' + Espressione di calcolo, sequenza o record non valida. Il formato delle espressioni sequenza deve essere 'seq {{ ... }}' + + + + This list or array expression includes an element of the form 'if ... then ... else'. Parenthesize this expression to indicate it is an individual element of the list or array, to disambiguate this from a list generated using a sequence expression + Questa espressione elenco o matrice include un elemento nel formato 'if ... then ... else'. Racchiudere l'espressione in parentesi per indicare che si tratta di un elemento singolo dell'elenco o della matrice allo scopo di eliminare l'ambiguità rispetto a un elenco generato mediante un'espressione sequenza + + + + Unable to parse format string '{0}' + Non è possibile analizzare la stringa di formato '{0}' + + + + This list expression exceeds the maximum size for list literals. Use an array for larger literals and call Array.ToList. + Questa espressione elenco supera la dimensione massima per i valori letterali di elenco. Usare una matrice per valori letterali più grandi e chiamare Array.ToList. + + + + The expression form 'expr then expr' may only be used as part of an explicit object constructor + Il formato di espressione 'expr then expr' può essere utilizzato solo all'interno di un costruttore di oggetto esplicito + + + + Named arguments cannot be given to member trait calls + Non è possibile assegnare argomenti denominati a chiamate di tratti del membro + + + + This is not a valid name for an enumeration case + Nome non valido per un case di enumerazione + + + + This field is not mutable + Questo campo non è modificabile + + + + This construct may only be used within list, array and sequence expressions, e.g. expressions of the form 'seq {{ ... }}', '[ ... ]' or '[| ... |]'. These use the syntax 'for ... in ... do ... yield...' to generate elements + Il costrutto può essere usato solo in espressioni sequenza, elenco e matrice, ad esempio espressioni nel formato 'seq {{ ... }}', '[ ... ]' o '[| ... |]'. Viene usata la sintassi 'for ... in ... do ... yield...' per generare elementi + + + + This construct may only be used within computation expressions. To return a value from an ordinary function simply write the expression without 'return'. + Questo costrutto può essere utilizzato solo in espressioni di calcolo. Per restituire un valore da una funzione ordinaria, è sufficiente scrivere l'espressione senza 'return'. + + + + This construct may only be used within sequence or computation expressions + Questo costrutto può essere utilizzato solo in espressioni sequenza o di calcolo + + + + This construct may only be used within computation expressions + Questo costrutto può essere utilizzato solo in espressioni di calcolo + + + + Invalid indexer expression + Espressione di indicizzatore non valida + + + + The operator 'expr.[idx]' has been used on an object of indeterminate type based on information prior to this program point. Consider adding further type constraints + L'operatore 'expr.[idx]' è stato usato in un oggetto di tipo non determinato in base alle informazioni precedenti a questo punto del programma. Provare ad aggiungere ulteriori vincoli di tipo + + + + Cannot inherit from a variable type + Non è possibile ereditare da un tipo di variabile + + + + Calls to object constructors on type parameters cannot be given arguments + Non è possibile assegnare argomenti a chiamate a costruttori di oggetto in parametri di tipo + + + + The 'CompiledName' attribute cannot be used with this language element + Non è possibile usare l'attributo 'CompiledName' con questo elemento del linguaggio + + + + '{0}' may only be used with named types + '{0}' è utilizzabile solo con tipi denominati + + + + 'inherit' cannot be used on interface types. Consider implementing the interface by using 'interface ... with ... end' instead. + Non è possibile usare 'inherit' in tipi di interfaccia. Provare invece a implementare l'interfaccia mediante 'interface ... with ... end'. + + + + 'new' cannot be used on interface types. Consider using an object expression '{{ new ... with ... }}' instead. + Non è possibile usare 'new' in tipi di interfaccia. Provare a usare invece un'espressione di oggetto '{{ new ... with ... }}'. + + + + Instances of this type cannot be created since it has been marked abstract or not all methods have been given implementations. Consider using an object expression '{{ new ... with ... }}' instead. + Non è possibile creare istanze di questo tipo perché è stato contrassegnato come astratto oppure non a tutti i metodi sono state assegnate implementazioni. Provare a usare invece un'espressione di oggetto '{{ new ... with ... }}'. + + + + It is recommended that objects supporting the IDisposable interface are created using the syntax 'new Type(args)', rather than 'Type(args)' or 'Type' as a function value representing the constructor, to indicate that resources may be owned by the generated value + Per indicare che le risorse possono essere di proprietà del valore generato, è consigliabile usare la sintassi 'new Type(args)', invece di 'Type(args)' o di 'Type' come valore della funzione che rappresenta il costruttore, per creare oggetti che supportano l'interfaccia IDisposable. + + + + '{0}' may only be used to construct object types + '{0}' è utilizzabile solo per costruire tipi di oggetto + + + + Constructors for the type '{0}' must directly or indirectly call its implicit object constructor. Use a call to the implicit object constructor instead of a record expression. + I costruttori per il tipo '{0}' devono chiamare direttamente o indirettamente il relativo costruttore di oggetto implicito. Utilizzare una chiamata al costruttore di oggetto implicito invece di un'espressione di record. + + + + The field '{0}' has been given a value, but is not present in the type '{1}' + Al campo '{0}' è stato assegnato un valore, tuttavia non è presente nel tipo '{1}' + + + + No assignment given for field '{0}' of type '{1}' + Nessuna assegnazione specificata per il campo '{0}' di tipo '{1}' + + + + Extraneous fields have been given values + Sono stati assegnati valori a campi estranei + + + + Only overrides of abstract and virtual members may be specified in object expressions + Nelle espressioni di oggetto possono essere specificati solo override di membri astratti e virtuali + + + + The member '{0}' does not correspond to any abstract or virtual method available to override or implement. + Il membro '{0}' non corrisponde ad alcun metodo astratto o virtuale disponibile per l'override o l'implementazione. + + + + The type {0} contains the member '{1}' but it is not a virtual or abstract method that is available to override or implement. + Il tipo {0} contiene il membro '{1}', ma non è un metodo virtuale o astratto disponibile per l'override o l'implementazione. + + + + The member '{0}' does not accept the correct number of arguments. {1} argument(s) are expected, but {2} were given. The required signature is '{3}'.{4} + Il membro '{0}' non accetta il numero corretto di argomenti. Sono previsti {1} argomenti, ma ne sono stati specificati {2}. La firma richiesta è '{3}'.{4} + + + + The member '{0}' does not accept the correct number of arguments. One overload accepts {1} arguments, but {2} were given. The required signature is '{3}'.{4} + Il membro '{0}' non accetta il numero corretto di argomenti. Un overload accetta {1} argomenti, ma ne sono stati specificati {2}. La firma richiesta è '{3}'.{4} + + + + A simple method name is required here + In questa posizione è necessario un nome di metodo semplice + + + + The types System.ValueType, System.Enum, System.Delegate, System.MulticastDelegate and System.Array cannot be used as super types in an object expression or class + I tipi System.ValueType, System.Enum, System.Delegate, System.MulticastDelegate e System.Array non possono essere usati come tipi super in una classe o un'espressione di oggetto + + + + 'new' must be used with a named type + 'new' deve essere utilizzato con un tipo denominato + + + + Cannot create an extension of a sealed type + Non è possibile creare un'estensione di tipo Sealed + + + + No arguments may be given when constructing a record value + Non è possibile specificare argomenti durante la costruzione di un valore di record + + + + Interface implementations cannot be given on construction expressions + Non è possibile specificare implementazioni di interfaccia in espressioni di costruzione + + + + Object construction expressions may only be used to implement constructors in class types + Le espressioni di costruzione degli oggetti possono essere utilizzate solo per implementare costruttori in tipi di classe + + + + Only simple bindings of the form 'id = expr' can be used in construction expressions + Solo i binding semplici nel formato 'id = expr' possono essere usati in espressioni di costruzione + + + + Objects must be initialized by an object construction expression that calls an inherited object constructor and assigns a value to each field + Gli oggetti devono essere inizializzati da un'espressione di costruzione degli oggetti che chiama un costruttore di oggetti ereditato e assegna un valore a ogni campo + + + + Expected an interface type + Previsto tipo di interfaccia + + + + Constructor expressions for interfaces do not take arguments + Le espressioni dei costruttori per le interfacce non utilizzano argomenti + + + + This object constructor requires arguments + Argomenti necessari per il costruttore di oggetto + + + + 'new' may only be used with object constructors + 'new' può essere usato solo con costruttori di oggetto + + + + At least one override did not correctly implement its corresponding abstract member + Almeno un override non implementa correttamente il membro astratto corrispondente + + + + This numeric literal requires that a module '{0}' defining functions FromZero, FromOne, FromInt32, FromInt64 and FromString be in scope + Il valore letterale numerico richiede che nell'ambito sia presente un modulo '{0}' che definisce funzioni FromZero, FromOne, FromInt32, FromInt64 e FromString + + + + Invalid record construction + Costruzione record non valida + + + + The expression form {{ expr with ... }} may only be used with record types. To build object types use {{ new Type(...) with ... }} + Il formato di espressione {{ expr with ... }} può essere utilizzato solo con tipi di record. Per compilare tipi di oggetto utilizzare {{ new Type(...) with ... }} + + + + The inherited type is not an object model type + Il tipo ereditato non è un tipo di modello a oggetti + + + + Object construction expressions (i.e. record expressions with inheritance specifications) may only be used to implement constructors in object model types. Use 'new ObjectType(args)' to construct instances of object model types outside of constructors + Le espressioni di costruzione degli oggetti (ad esempio espressioni di record con specifiche di ereditarietà) possono essere utilizzate solo per implementare costruttori in tipi di modello a oggetti. Utilizzare 'new ObjectType(args)' per costruire istanze di tipi di modello a oggetti all'esterno di costruttori + + + + '{{ }}' is not a valid expression. Records must include at least one field. Empty sequences are specified by using Seq.empty or an empty list '[]'. + '{{ }}' non è un'espressione valida. I record devono includere almeno un campo. Le sequenze vuote vengono specificate mediante Seq.empty o un elenco vuoto '[]'. + + + + This type is not a record type. Values of class and struct types must be created using calls to object constructors. + Questo tipo non è un tipo di record. I valori di tipi di struct e classi devono essere creati mediante chiamate a costruttori di oggetto. + + + + This type is not a record type + Questo tipo non è un tipo di record + + + + This construct is ambiguous as part of a computation expression. Nested expressions may be written using 'let _ = (...)' and nested computations using 'let! res = builder {{ ... }}'. + Questo costrutto è ambiguo all'interno di un'espressione di calcolo. È possibile scrivere le espressioni annidate con 'let _ = (...)' e i calcoli annidati con 'let! res = builder {{ ... }}'. + + + + This construct is ambiguous as part of a sequence expression. Nested expressions may be written using 'let _ = (...)' and nested sequences using 'yield! seq {{... }}'. + Questo costrutto è ambiguo all'interno di un'espressione sequenza. È possibile scrivere le espressioni annidate con 'let _ = (...)' e le sequenze annidate con 'yield! seq {{... }}'. + + + + 'do!' cannot be used within sequence expressions + 'do!' non può essere utilizzato in espressioni sequenza + + + + The use of 'let! x = coll' in sequence expressions is not permitted. Use 'for x in coll' instead. + L'utilizzo di 'let! x = coll' in espressioni sequenza non è consentito. Utilizzare invece 'for x in coll'. + + + + 'try'/'with' cannot be used within sequence expressions + Non è possibile usare 'try'/'with' in espressioni sequenza + + + + In sequence expressions, multiple results are generated using 'yield!' + Nelle espressioni sequenza più risultati sono generati mediante 'yield!' + + + + Invalid assignment + Assegnazione non valida + + + + Invalid use of a type name + Uso non valido di un nome di tipo + + + + This type has no accessible object constructors + Questo tipo non dispone di costruttori di oggetto accessibili + + + + Invalid use of an interface type + Uso non valido di un tipo di interfaccia + + + + Invalid use of a delegate constructor. Use the syntax 'new Type(args)' or just 'Type(args)'. + Utilizzo non valido di un costruttore di delegato. Utilizzare la sintassi 'new Type(args)' o semplicemente 'Type(args)'. + + + + Property '{0}' is not static + La proprietà '{0}' non è statica + + + + Property '{0}' is not readable + La proprietà '{0}' non è leggibile + + + + This lookup cannot be used here + Non è possibile usare questa ricerca in questa posizione + + + + Property '{0}' is static + La proprietà '{0}' è statica + + + + Property '{0}' cannot be set + Non è possibile impostare la proprietà '{0}' + + + + Constructors must be applied to arguments and cannot be used as first-class values. If necessary use an anonymous function '(fun arg1 ... argN -> new Type(arg1,...,argN))'. + I costruttori devono essere applicati ad argomenti e non possono essere utilizzati come valori di prima classe. Se necessario, utilizzare una funzione anonima '(fun arg1 ... argN -> new Type(arg1,...,argN))'. + + + + The syntax 'expr.id' may only be used with record labels, properties and fields + La sintassi 'expr.id' è utilizzabile solo con campi, proprietà ed etichette di record + + + + Event '{0}' is static + L'evento '{0}' è statico + + + + Event '{0}' is not static + L'evento '{0}' non è statico + + + + The named argument '{0}' did not match any argument or mutable property + L'argomento denominato '{0}' non corrisponde ad alcuna proprietà modificabile o argomento + + + + One or more of the overloads of this method has curried arguments. Consider redesigning these members to take arguments in tupled form. + Uno o più overload del metodo hanno argomenti sottoposti a currying. Provare a riprogettare i membri in modo che accettino argomenti in tupla. + + + + The unnamed arguments do not form a prefix of the arguments of the method called + Gli argomenti non denominati non costituiscono un prefisso degli argomenti del metodo chiamato + + + + Static optimization conditionals are only for use within the F# library + Le istruzioni condizionali di ottimizzazione statiche sono solo per l'utilizzo all'interno della libreria F# + + + + The corresponding formal argument is not optional + L'argomento formale corrispondente non è facoltativo + + + + Invalid optional assignment to a property or field + Assegnazione facoltativa non valida a proprietà o campo + + + + A delegate constructor must be passed a single function value + A un costruttore di delegato deve essere passato un singolo valore di funzione + + + + A binding cannot be marked both 'use' and 'rec' + Un binding non può essere contrassegnato sia con 'use' che con 'rec' + + + + The 'VolatileField' attribute may only be used on 'let' bindings in classes + L'attributo 'VolatileField' può essere usato solo in binding 'let' nelle classi + + + + Attributes are not permitted on 'let' bindings in expressions + Attributi non consentiti in binding 'let' nelle espressioni + + + + The 'DefaultValue' attribute may only be used on 'val' declarations + L'attributo 'DefaultValue' può essere utilizzato solo in dichiarazioni 'val' + + + + The 'ConditionalAttribute' attribute may only be used on members + L'attributo 'ConditionalAttribute' può essere utilizzato solo nei membri + + + + This is not a valid name for an active pattern + Il nome non è valido per un criterio attivo + + + + The 'EntryPointAttribute' attribute may only be used on function definitions in modules + L'attributo 'EntryPointAttribute' può essere utilizzato solo in definizioni di funzioni nei moduli + + + + Mutable values cannot be marked 'inline' + Non è possibile contrassegnare valori modificabili come 'inline' + + + + Mutable values cannot have generic parameters + I valori modificabili non possono avere parametri generici + + + + Mutable function values should be written 'let mutable f = (fun args -> ...)' + I valori di funzione modificabili devono essere scritti come 'let mutable f = (fun args -> ...)' + + + + Only functions may be marked 'inline' + Solo le funzioni possono essere contrassegnate come 'inline' + + + + A literal value cannot be given the [<ThreadStatic>] or [<ContextStatic>] attributes + Non è possibile assegnare gli attributi [<ThreadStatic>] o [<ContextStatic>] a un valore letterale + + + + A literal value cannot be marked 'mutable' + Non è possibile contrassegnare un valore letterale come 'mutable' + + + + A literal value cannot be marked 'inline' + Non è possibile contrassegnare un valore letterale come 'inline' + + + + Literal values cannot have generic parameters + I valori letterali non possono avere parametri generici + + + + This is not a valid constant expression + Espressione costante non valida + + + + This type is not accessible from this code location + Questo tipo non è accessibile da questa posizione di codice + + + + Unexpected condition in imported assembly: failed to decode AttributeUsage attribute + Condizione imprevista in assembly importato: non è stato possibile decodificare l'attributo AttributeUsage + + + + Unrecognized attribute target. Valid attribute targets are 'assembly', 'module', 'type', 'method', 'property', 'return', 'param', 'field', 'event', 'constructor'. + Destinazione attributo non riconosciuta. Le destinazioni valide sono 'assembly', 'module', 'type', 'method', 'property', 'return', 'param', 'field', 'event', 'constructor'. + + + + This attribute is not valid for use on this language element. Assembly attributes should be attached to a 'do ()' declaration, if necessary within an F# module. + Attributo non valido per l'utilizzo in questo elemento del linguaggio. Gli attributi degli assembly devono essere collegati a una dichiarazione 'do ()', se necessario all'interno di un modulo F#. + + + + This attribute is not valid for use on this language element + Attributo non valido per l'utilizzo in questo elemento del linguaggio + + + + Optional arguments cannot be used in custom attributes + Non è possibile usare argomenti facoltativi in attributi personalizzati + + + + This property cannot be set + Non è possibile impostare questa proprietà + + + + This property or field was not found on this custom attribute type + La proprietà o il campo non è stato trovato in questo tipo di attributo personalizzato + + + + A custom attribute must be a reference type + Un attributo personalizzato deve essere un tipo di riferimento + + + + The number of args for a custom attribute does not match the expected number of args for the attribute constructor + Il numero di argomenti per un attributo personalizzato non corrisponde al numero di argomenti previsti per il costruttore di attributo + + + + A custom attribute must invoke an object constructor + Un attributo personalizzato deve richiamare un costruttore di oggetto + + + + Attribute expressions must be calls to object constructors + Le espressioni attributo devono costituire chiamate a costruttori di oggetto + + + + This attribute cannot be used in this version of F# + Non è possibile usare questo attributo in questa versione di F# + + + + Invalid inline specification + Specifica inline non valida + + + + 'use' bindings must be of the form 'use <var> = <expr>' + Il formato dei binding 'use' deve essere 'use <var> = <expr>' + + + + Abstract members are not permitted in an augmentation - they must be defined as part of the type itself + Membri astratti non consentiti in un aumento. È necessario definirli come parte del tipo stesso + + + + Method overrides and interface implementations are not permitted here + Override di metodo e implementazioni di interfaccia non consentiti in questa posizione + + + + No abstract or interface member was found that corresponds to this override + Nessun membro astratto o di interfaccia trovato corrispondente all'override + + + + This override takes a different number of arguments to the corresponding abstract member. The following abstract members were found:{0} + Questo override accetta un numero di argomenti diverso rispetto al membro astratto corrispondente. Sono stati trovati i membri astratti seguenti: {0} + + + + This method already has a default implementation + Questo metodo dispone già di un'implementazione predefinita + + + + The method implemented by this default is ambiguous + Il metodo implementato da questa implementazione predefinita è ambiguo + + + + No abstract property was found that corresponds to this override + Nessuna proprietà astratta trovata corrispondente all'override + + + + This property overrides or implements an abstract property but the abstract property doesn't have a corresponding {0} + Questa proprietà esegue l'override o l'implementazione di una proprietà astratta, tuttavia quest'ultima non dispone di un elemento {0} corrispondente + + + + Invalid signature for set member + Firma non valida per membro set + + + + This new member hides the abstract member '{0}'. Rename the member or use 'override' instead. + Il nuovo membro nasconde il membro astratto '{0}'. Rinominare il membro o utilizzare 'override'. + + + + This new member hides the abstract member '{0}' once tuples, functions, units of measure and/or provided types are erased. Rename the member or use 'override' instead. + Il nuovo membro nasconde il membro astratto '{0}' dopo la cancellazione di tuple, funzioni, unità di misura e/o tipi forniti. Rinominare il membro o utilizzare 'override'. + + + + Interfaces cannot contain definitions of static initializers + Le interfacce non possono contenere definizioni di inizializzatori statici + + + + Interfaces cannot contain definitions of object constructors + Le interfacce non possono contenere definizioni di costruttori di oggetto + + + + Interfaces cannot contain definitions of member overrides + Le interfacce non possono contenere definizioni di override di membri + + + + Interfaces cannot contain definitions of concrete members. You may need to define a constructor on your type to indicate that the type is a class. + Le interfacce non possono contenere definizioni di membri concreti. Potrebbe essere necessario definire un costruttore nel tipo utilizzato per indicare che il tipo è una classe. + + + + Constructors cannot be specified in exception augmentations + I costruttori non possono essere specificati in aumenti di eccezione + + + + Structs cannot have an object constructor with no arguments. This is a restriction imposed on all CLI languages as structs automatically support a default constructor. + Gli struct non possono avere un costruttore di oggetto senza argomenti. Si tratta di una limitazione imposta in tutti i linguaggi CLI perché gli struct supportano automaticamente un costruttore predefinito. + + + + Constructors cannot be defined for this type + Non è possibile definire costruttori per questo tipo + + + + Recursive bindings that include member specifications can only occur as a direct augmentation of a type + I binding ricorsivi che includono specifiche di membro possono rappresentare solo un aumento diretto di un tipo + + + + Only simple variable patterns can be bound in 'let rec' constructs + Solo i criteri variabili semplici possono essere associati in costrutti 'let rec' + + + + Only record fields and simple, non-recursive 'let' bindings may be marked mutable + Solo i campi di record e i binding 'let' semplici non ricorsivi possono essere contrassegnati come mutable + + + + This member is not sufficiently generic + Questo membro non è sufficientemente generico + + + + A declaration may only be the [<Literal>] attribute if a constant value is also given, e.g. 'val x : int = 1' + Una dichiarazione può essere solo l'attributo [<Literal>] se è specificato anche un valore costante, ad esempio 'val x : int = 1' + + + + A declaration may only be given a value in a signature if the declaration has the [<Literal>] attribute + In una firma è possibile assegnare solo un valore a una dichiarazione se quest'ultima contiene l'attributo [<Literal>] + + + + Thread-static and context-static variables must be static and given the [<DefaultValue>] attribute to indicate that the value is initialized to the default value on each new thread + Le variabili statiche a livello di thread e a livello di contesto devono essere statiche e associate all'attributo [<DefaultValue>] per indicare che il valore viene inizializzato sul valore predefinito in ogni nuovo thread + + + + Volatile fields must be marked 'mutable' and cannot be thread-static + I campi volatili devono essere contrassegnati come 'mutable' e non possono essere statici a livello di thread + + + + Uninitialized 'val' fields must be mutable and marked with the '[<DefaultValue>]' attribute. Consider using a 'let' binding instead of a 'val' field. + I campi 'val' non inizializzati devono essere modificabili e contrassegnati con l'attributo '[<DefaultValue>]'. Provare a usare un binding 'let' invece di un campo 'val'. + + + + Static 'val' fields in types must be mutable, private and marked with the '[<DefaultValue>]' attribute. They are initialized to the 'null' or 'zero' value for their type. Consider also using a 'static let mutable' binding in a class type. + I campi 'val' statici nei tipi devono essere modificabili, privati e contrassegnati con l'attributo '[<DefaultValue>]'. Tali campi vengono inizializzati sul valore 'Null' o 'zero' per il relativo tipo. Provare inoltre a usare un binding 'static let mutable' in un tipo di classe. + + + + This field requires a name + Per questo campo è necessario un nome + + + + Invalid namespace, module, type or union case name + Nome di case di unione, tipo, modulo o spazio dei nomi non valido + + + + Explicit type declarations for constructors must be of the form 'ty1 * ... * tyN -> resTy'. Parentheses may be required around 'resTy' + Le dichiarazioni di tipo esplicito per i costruttori devono essere nel formato 'ty1 * ... * tyN -> resTy'. Potrebbe essere necessario racchiudere 'resTy' tra parentesi + + + + Return types of union cases must be identical to the type being defined, up to abbreviations + I tipi restituiti di case di unione devono essere identici al tipo in fase di definizione, fino alle abbreviazioni + + + + This is not a valid value for an enumeration literal + Valore non valido per un valore letterale di enumerazione + + + + The type '{0}' is not an interface type + Il tipo '{0}' non è un tipo di interfaccia + + + + Duplicate specification of an interface + Specifica di un'interfaccia duplicata + + + + A field/val declaration is not permitted here + Dichiarazione di campo/valore non consentita in questa posizione + + + + A inheritance declaration is not permitted here + Dichiarazione di ereditarietà non consentita in questa posizione + + + + This declaration opens the module '{0}', which is marked as 'RequireQualifiedAccess'. Adjust your code to use qualified references to the elements of the module instead, e.g. 'List.map' instead of 'map'. This change will ensure that your code is robust as new constructs are added to libraries. + La dichiarazione apre il modulo '{0}' che è contrassegnato come 'RequireQualifiedAccess'. Modificare il codice in modo da utilizzare riferimenti qualificati agli elementi del modulo, ad esempio 'List.map' invece di 'map'. Questa modifica assicurerà l'affidabilità del codice quando verranno aggiunti nuovi costrutti alle librerie. + + + + This declaration opens the namespace or module '{0}' through a partially qualified path. Adjust this code to use the full path of the namespace. This change will make your code more robust as new constructs are added to the F# and CLI libraries. + Questa dichiarazione apre lo spazio dei nomi o modulo '{0}' tramite un percorso parziale. Modificare il codice in modo da utilizzare il percorso completo dello spazio dei nomi. Questa modifica renderà il codice più affidabile in caso di aggiunta di nuovi costrutti alle librerie F# e CLI. + + + + Local class bindings cannot be marked inline. Consider lifting the definition out of the class or else do not mark it as inline. + I binding di classe locali non possono essere contrassegnati come inline. Provare a spostare la definizione fuori della classe oppure non contrassegnarla come inline. + + + + Type abbreviations cannot have members + Le abbreviazioni di tipo non possono avere membri + + + + As of F# 4.1, the accessibility of type abbreviations is checked at compile-time. Consider changing the accessibility of the type abbreviation. Ignoring this warning might lead to runtime errors. + A partire da F# 4.1, l'accessibilità delle abbreviazioni dei tipi viene verificata in fase di compilazione. Provare a modificare l'accessibilità dell'abbreviazione dei tipi. Se si ignora questo avviso, potrebbero verificarsi errori di runtime. + + + + Enumerations cannot have members + Le enumerazione non possono avere membri + + + + Measure declarations may have only static members + Le dichiarazioni di misura possono avere solo membri statici + + + + Structs cannot contain 'do' bindings because the default constructor for structs would not execute these bindings + Gli struct non possono contenere binding 'do' perché il costruttore predefinito per gli struct non è in grado di eseguire tali binding + + + + Structs cannot contain value definitions because the default constructor for structs will not execute these bindings. Consider adding additional arguments to the primary constructor for the type. + Gli struct non possono contenere definizioni di valore perché il costruttore predefinito per gli struct non è in grado di eseguire tali binding. Provare ad aggiungere altri argomenti al costruttore primario per il tipo. + + + + Static value definitions may only be used in types with a primary constructor. Consider adding arguments to the type definition, e.g. 'type X(args) = ...'. + Le definizioni di valore statiche possono essere utilizzate solo nei tipi con un costruttore primario. Provare ad aggiungere argomenti alla definizione di tipo, ad esempio 'type X(args) = ...'. + + + + Measure declarations may have only static members: constructors are not available + Le dichiarazioni di misura possono avere solo membri statici: costruttori non disponibili + + + + A member and a local class binding both have the name '{0}' + Un binding di una classe locale e un membro non possono avere entrambi il nome '{0}' + + + + Type abbreviations cannot have interface declarations + Le abbreviazioni di tipo non possono avere dichiarazioni di interfaccia + + + + Enumerations cannot have interface declarations + Le enumerazioni non possono avere dichiarazioni di interfaccia + + + + This type is not an interface type + Questo tipo non è un tipo di interfaccia + + + + All implemented interfaces should be declared on the initial declaration of the type + Tutte le interfacce implementate devono essere dichiarate nella dichiarazione iniziale del tipo + + + + A default implementation of this interface has already been added because the explicit implementation of the interface was not specified at the definition of the type + È stata già aggiunta un'implementazione predefinita di questa interfaccia perché l'implementazione esplicita dell'interfaccia stessa non è specificata nella definizione del tipo + + + + This member is not permitted in an interface implementation + Membro non consentito in un'implementazione di interfaccia + + + + This declaration element is not permitted in an augmentation + Elemento di dichiarazione non consentito in un aumento + + + + Types cannot contain nested type definitions + I tipi non possono contenere definizioni di tipo annidate + + + + type, exception or module + tipo, eccezione o modulo + + + + type or module + tipo o modulo + + + + The struct, record or union type '{0}' implements the interface 'System.IStructuralEquatable' explicitly. Apply the 'CustomEquality' attribute to the type. + Il tipo di struct, record o unione '{0}' implementa l'interfaccia 'System.IStructuralEquatable' in modo esplicito. Applicare l'attributo 'CustomEquality' al tipo. + + + + The struct, record or union type '{0}' implements the interface 'System.IEquatable<_>' explicitly. Apply the 'CustomEquality' attribute to the type and provide a consistent implementation of the non-generic override 'System.Object.Equals(obj)'. + Il tipo di struct, record o unione '{0}' implementa l'interfaccia 'System.IEquatable<_>' in modo esplicito. Applicare l'attributo 'CustomEquality' al tipo e fornire un'implementazione coerente dell'override non generico 'System.Object.Equals(obj)'. + + + + Explicit type specifications cannot be used for exception constructors + Le specifiche di tipo esplicito possono essere utilizzate per i costruttori di eccezione + + + + Exception abbreviations should not have argument lists + Le abbreviazioni di eccezioni non possono avere elenchi di argomenti + + + + Abbreviations for Common IL exceptions cannot take arguments + Le abbreviazioni per le eccezioni di IL comune non accettano argomenti + + + + Exception abbreviations must refer to existing exceptions or F# types deriving from System.Exception + Le abbreviazioni di eccezioni devono fare riferimento a eccezioni esistenti o a tipi F# derivanti da System.Exception + + + + Abbreviations for Common IL exception types must have a matching object constructor + Le abbreviazioni dei tipi di eccezione di IL comune devono disporre di un costruttore di oggetto corrispondente + + + + Not an exception + Non si tratta di un'eccezione + + + + Invalid module name + Nome modulo non valido + + + + Invalid type extension + Estensione di tipo non valido + + + + The attributes of this type specify multiple kinds for the type + Gli attributi di questo tipo specificano più generi per il tipo + + + + The kind of the type specified by its attributes does not match the kind implied by its definition + Il genere di tipo specificato dai relativi attributi non corrisponde a quello che implica la sua definizione + + + + Measure definitions cannot have type parameters + Le definizioni di misura non possono avere parametri di tipo + + + + This type requires a definition + Questo tipo richiede una definizione + + + + This type abbreviation has one or more declared type parameters that do not appear in the type being abbreviated. Type abbreviations must use all declared type parameters in the type being abbreviated. Consider removing one or more type parameters, or use a concrete type definition that wraps an underlying type, such as 'type C<'a> = C of ...'. + Questa abbreviazione di tipo ha uno o più parametri di tipo dichiarati non inclusi nel tipo da abbreviare. Le abbreviazioni di tipo devono utilizzare tutti i parametri di tipo dichiarati nel tipo da abbreviare. Provare a rimuovere uno o più parametri di tipo oppure a utilizzare una definizione di tipo concreto che esegue il wrapping di un tipo sottostante, ad esempio 'type C<'a> = C of ...'. + + + + Structs, interfaces, enums and delegates cannot inherit from other types + Struct, interfacce, enumerazioni e delegati non possono ereditare da altri tipi + + + + Types cannot inherit from multiple concrete types + I tipo non possono ereditare da più tipi concreti + + + + Records, union, abbreviations and struct types cannot have the 'AllowNullLiteral' attribute + Tipi di struct, record, unioni e abbreviazioni non possono avere l'attributo 'AllowNullLiteral' + + + + Types with the 'AllowNullLiteral' attribute may only inherit from or implement types which also allow the use of the null literal + I tipi con attributo 'AllowNullLiteral' possono solo implementare o ereditare da tipi che consentono anche l'utilizzo di valori letterali Null + + + + Generic types cannot be given the 'StructLayout' attribute + Non è possibile assegnare l'attributo 'StructLayout' a tipi generici + + + + Only structs and classes without primary constructors may be given the 'StructLayout' attribute + L'attributo 'StructLayout' può essere assegnato solo a struct e classi senza costruttori primari + + + + The representation of this type is hidden by the signature. It must be given an attribute such as [<Sealed>], [<Class>] or [<Interface>] to indicate the characteristics of the type. + La rappresentazione di questo tipo è nascosta dalla firma. È necessario assegnare un attributo quale [<Sealed>], [<Class>] o [<Interface>] per indicare le caratteristiche del tipo. + + + + Only classes may be given the 'AbstractClass' attribute + L'attributo 'AbstractClass' può essere assegnato solo a classi + + + + Only types representing units-of-measure may be given the 'Measure' attribute + L'attributo 'Measure' può essere assegnato solo a tipi che rappresentano un'unità di misura + + + + Accessibility modifiers are not permitted on overrides or interface implementations + Modificatori di accessibilità non consentiti in implementazioni di interfaccia o override + + + + Discriminated union types are always sealed + I tipi di unione discriminati sono sempre Sealed + + + + Record types are always sealed + I tipi di record sono sempre Sealed + + + + Assembly code types are always sealed + I tipi di codice assembly sono sempre Sealed + + + + Struct types are always sealed + I tipi di struct sono sempre Sealed + + + + Delegate types are always sealed + I tipi delegati sono sempre Sealed + + + + Enum types are always sealed + I tipi enumerazione sono sempre sealed + + + + Interface types and delegate types cannot contain fields + I tipi di interfaccia e i tipi delegati non possono contenere campi + + + + Abbreviated types cannot be given the 'Sealed' attribute + Non è possibile assegnare l'attributo 'Sealed' a tipi abbreviati + + + + Cannot inherit a sealed type + Non è possibile ereditare un tipo Sealed + + + + Cannot inherit from interface type. Use interface ... with instead. + Non è possibile ereditare da un tipo di interfaccia. Usare invece interface ... with. + + + + Struct types cannot contain abstract members + I tipi di struct non possono contenere membri astratti + + + + Interface types cannot be sealed + I tipi di interfaccia non possono essere Sealed + + + + Delegate specifications must be of the form 'typ -> typ' + Il formato delle specifiche di delegato deve essere 'tip -> tip' + + + + Delegate specifications must not be curried types. Use 'typ * ... * typ -> typ' for multi-argument delegates, and 'typ -> (typ -> typ)' for delegates returning function values. + Le specifiche di delegato non devono essere tipi sottoposti a currying. Utilizzare 'typ * ... * typ -> typ' per delegati con più argomenti e 'typ -> (typ -> typ)' per delegati che restituiscono valori di funzione. + + + + Literal enumerations must have type int, uint, int16, uint16, int64, uint64, byte, sbyte or char + Le enumerazioni di valori letterali devono avere tipo int, uint, int16, uint16, int64, uint64, byte, sbyte o char + + + + This type definition involves an immediate cyclic reference through an abbreviation + Questa definizione di tipo prevede un riferimento ciclico immediato tramite un'abbreviazione + + + + This type definition involves an immediate cyclic reference through a struct field or inheritance relation + Questa definizione di tipo prevede un riferimento ciclico immediato tramite un campo struct o una relazione di ereditarietà + + + + The syntax 'type X with ...' is reserved for augmentations. Types whose representations are hidden but which have members are now declared in signatures using 'type X = ...'. You may also need to add the '[<Sealed>] attribute to the type definition in the signature + La sintassi 'type X with ...' è riservata agli aumenti. I tipi le cui rappresentazioni sono nascoste ma contenenti membri vengono ora dichiarati in firme mediante 'type X = ...'. Potrebbe essere inoltre necessario aggiungere l'attributo '[<Sealed>] alla definizione di tipo nella firma + + + + Members that extend interface, delegate or enum types must be placed in a module separate to the definition of the type. This module must either have the AutoOpen attribute or be opened explicitly by client code to bring the extension members into scope. + I membri che estendono tipi delegati, interfaccia o enumerazione devono trovarsi in un modulo separato rispetto alla definizione del tipo. Il modulo deve avere l'attributo AutoOpen oppure essere aperto in modo esplicito dal codice client in modo da portare i membri di estensione nell'ambito. + + + + One or more of the declared type parameters for this type extension have a missing or wrong type constraint not matching the original type constraints on '{0}' + Uno o più parametri di tipo dichiarati per questa estensione del tipo contengono un vincolo di tipo mancante o errato non corrispondente ai vincoli di tipo originali in '{0}' + + + + Type definitions may only have one 'inherit' specification and it must be the first declaration + Le definizioni di tipo possono avere solo una specifica 'inherit' nella prima dichiarazione + + + + 'let' and 'do' bindings must come before member and interface definitions in type definitions + I binding 'let' e 'do' devono precedere le definizioni di membro e interfaccia nelle definizioni di tipo + + + + This 'inherit' declaration specifies the inherited type but no arguments. Consider supplying arguments, e.g. 'inherit BaseType(args)'. + La dichiarazione 'inherit' specifica il tipo ereditato, ma senza argomenti. Provare a specificare argomenti, ad esempio 'inherit BaseType(args)'. + + + + This 'inherit' declaration has arguments, but is not in a type with a primary constructor. Consider adding arguments to your type definition, e.g. 'type X(args) = ...'. + La dichiarazione 'inherit' contiene argomenti ma non è in un tipo con un costruttore primario. Provare ad aggiungere argomenti alla definizione di tipo utilizzata, ad esempio 'type X(args) = ...'. + + + + This definition may only be used in a type with a primary constructor. Consider adding arguments to your type definition, e.g. 'type X(args) = ...'. + Questa definizione può essere utilizzata solo in un tipo con un costruttore primario. Provare ad aggiungere argomenti alla definizione di tipo utilizzata, ad esempio 'type X(args) = ...'. + + + + Type abbreviations cannot have augmentations + Le abbreviazioni di tipo non possono avere aumenti + + + + The path '{0}' is a namespace. A module abbreviation may not abbreviate a namespace. + Il percorso '{0}' è uno spazio dei nomi. L'abbreviazione del modulo non può abbreviare uno spazio dei nomi. + + + + The type '{0}' is used in an invalid way. A value prior to '{1}' has an inferred type involving '{2}', which is an invalid forward reference. + Il tipo '{0}' è utilizzato in modo non valido. Un valore prima di '{1}' ha un tipo dedotto che prevede '{2}', il che costituisce un riferimento in avanti non valido. + + + + The member '{0}' is used in an invalid way. A use of '{1}' has been inferred prior to the definition of '{2}', which is an invalid forward reference. + Il membro '{0}' è utilizzato in modo non valido. Uso di '{1}' dedotto prima della definizione di '{2}', il che costituisce un riferimento in avanti non valido. + + + + The attribute 'AutoOpen(\"{0}\")' in the assembly '{1}' did not refer to a valid module or namespace in that assembly and has been ignored + L'attributo 'AutoOpen(\"{0}\")' nell'assembly '{1}' non fa riferimento a un modulo o a uno spazio dei nomi valido in tale assembly ed è stato pertanto ignorato + + + + Undefined value '{0}' + Valore non definito '{0}' + + + + Label {0} not found + Etichetta {0} non trovata + + + + Incorrect number of type arguments to local call + Numero di argomenti tipo non corretto per la chiamata locale + + + + Dynamic invocation of {0} is not supported + Chiamata dinamica di {0} non supportata + + + + Taking the address of a literal field is invalid + L'utilizzo dell'indirizzo di un campo del valore letterale non è valido + + + + This operation involves taking the address of a value '{0}' represented using a local variable or other special representation. This is invalid. + Questa operazione prevede l'uso dell'indirizzo di un valore '{0}' rappresentato mediante una variabile locale o altra rappresentazione speciale. Questo comportamento non è valido. + + + + Custom marshallers cannot be specified in F# code. Consider using a C# helper function. + Non è possibile specificare gestori del marshalling personalizzati nel codice F#. Provare a usare una funzione helper C#. + + + + The MarshalAs attribute could not be decoded + Non è stato possibile decodificare l'attributo MarshalAs + + + + The signature for this external function contains type parameters. Constrain the argument and return types to indicate the types of the corresponding C function. + La firma per la funzione esterna contiene parametri di tipo. Vincolare l'argomento e i tipi restituiti per indicare i tipi della funzione C corrispondente. + + + + The DllImport attribute could not be decoded + Non è stato possibile decodificare l'attributo DllImport + + + + Literal fields cannot be set + Non è possibile impostare campi di valori letterali + + + + GenSetStorage: {0} was represented as a static method but was not an appropriate lambda expression + GenSetStorage: {0} è rappresentato come metodo statico, ma non è un'espressione lambda appropriata + + + + Mutable variables cannot escape their method + Le variabili modificabili non possono uscire dal relativo metodo + + + + Compiler error: unexpected unrealized value + Errore compilatore: valore non realizzato imprevisto + + + + Main module of program is empty: nothing will happen when it is run + Il modulo principale del programma è vuoto. L'esecuzione non produrrà alcun effetto + + + + This type cannot be used for a literal field + Non è possibile usare questo tipo per un campo di valore letterale + + + + Unexpected GetSet annotation on a property + Annotazione GetSet imprevista in una proprietà + + + + The FieldOffset attribute could not be decoded + Non è stato possibile decodificare l'attributo FieldOffset + + + + The StructLayout attribute could not be decoded + Non è stato possibile decodificare l'attributo StructLayout + + + + The DefaultAugmentation attribute could not be decoded + Non è stato possibile decodificare l'attributo DefaultAugmentation + + + + Reflected definitions cannot contain uses of the prefix splice operator '%' + Le definizioni riflesse non possono contenere utilizzi dell'operatore di splicing del prefisso '%' + + + + Problem with codepage '{0}': {1} + Problema con la tabella codici '{0}': {1} + + + + Copyright (c) Microsoft Corporation. All Rights Reserved. + Copyright (c) Microsoft Corporation. Tutti i diritti sono riservati. + + + + Freely distributed under the MIT Open Source License. https://github.com/Microsoft/visualfsharp/blob/master/License.txt + Distribuito gratuitamente in conformità ai termini della licenza Open Source di MIT. https://github.com/Microsoft/visualfsharp/blob/master/License.txt + + + + Name of the output file (Short form: -o) + Nome del file di output (forma breve: -o) + + + + Build a console executable + Compila un file eseguibile da console + + + + Build a Windows executable + Compila un file eseguibile Windows + + + + Build a library (Short form: -a) + Compila una libreria (forma breve: -a) + + + + Build a module that can be added to another assembly + Compila un modulo che può essere aggiunto ad altro assembly + + + + Delay-sign the assembly using only the public portion of the strong name key + Ritarda la firma dell'assembly utilizzando solo la parte pubblica della chiave con nome sicuro + + + + Public-sign the assembly using only the public portion of the strong name key, and mark the assembly as signed + Firma pubblicamente l'assembly usando solo la parte pubblica della chiave con nome sicuro e contrassegna l'assembly come firmato. + + + + Write the xmldoc of the assembly to the given file + Scrive lo xmldoc dell'assembly nel file specificato + + + + Specify a strong name key file + Specifica un file di chiave con nome sicuro + + + + Specify a strong name key container + Specifica un contenitore di chiavi con nome sicuro + + + + Limit which platforms this code can run on: x86, Itanium, x64, anycpu32bitpreferred, or anycpu. The default is anycpu. + Limita le piattaforme in cui è possibile eseguire il codice: x86, Itanium, x64, anycpu32bitpreferred o anycpu. Il valore predefinito è anycpu. + + + + Only include optimization information essential for implementing inlined constructs. Inhibits cross-module inlining but improves binary compatibility. + Include solo informazioni di ottimizzazione essenziali per l'implementazione dei costrutti inline. Impedisce l'incorporamento tra moduli ma migliora la compatibilità binaria. + + + + Don't add a resource to the generated assembly containing F#-specific metadata + Non aggiunge una risorsa all'assembly generato contenente metadati specifici di F# + + + + Print the inferred interface of the assembly to a file + Stampa l'interfaccia dedotta dell'assembly in un file + + + + Reference an assembly (Short form: -r) + Fa riferimento a un assembly (forma breve: -r) + + + + Specify a Win32 resource file (.res) + Specifica un file di risorse Win32 (.res) + + + + Specify a Win32 manifest file + Specifica un file manifesto Win32 + + + + Do not include the default Win32 manifest + Non includere il manifesto Win32 predefinito + + + + Embed all source files in the portable PDB file + Incorpora tutti i file di origine nel file PDB portatile + + + + Embed specific source files in the portable PDB file + Incorpora file di origine specifici nel file PDB portatile + + + + Source link information file to embed in the portable PDB file + File di informazioni sul collegamento all'origine da incorporare nel file PDB portatile + + + + --embed switch only supported when emitting a Portable PDB (--debug:portable or --debug:embedded) + Opzione --embed supportata solo quando si crea un file PDB portatile (--debug:portable o --debug:embedded) + + + + --sourcelink switch only supported when emitting a Portable PDB (--debug:portable or --debug:embedded) + Opzione --sourcelink supportata solo quando si crea un file PDB portatile (--debug:portable o --debug:embedded) + + + + Source file is too large to embed in a portable PDB + Le dimensioni del file di origine sono eccessive per consentirne l'incorporamento in un PDB portatile + + + + Embed the specified managed resource + Incorpora la risorsa gestita specificata + + + + Link the specified resource to this assembly where the resinfo format is <file>[,<string name>[,public|private]] + Collega la risorsa specificata all'assembly in cui il formato di resinfo è <file>[,<nome stringa>[,public|private]] + + + + Emit debug information (Short form: -g) + Crea informazioni di debug (forma breve: -g) + + + + Specify debugging type: full, portable, embedded, pdbonly. ('{0}' is the default if no debuggging type specified and enables attaching a debugger to a running program, 'portable' is a cross-platform format, 'embedded' is a cross-platform format embedded into the output file). + Consente di specificare il tipo di debug: full, portable, embedded, pdbonly. '{0}' è l'impostazione predefinita se non viene specificato il tipo di debug e consente di associare un debugger a un programma in esecuzione. 'portable' è un formato multipiattaforma. 'embedded' è un formato multipiattaforma incorporato nel file di output. + + + + Enable optimizations (Short form: -O) + Abilita le ottimizzazioni (forma breve: -O) + + + + Enable or disable tailcalls + Abilita o disabilita le chiamate tail + + + + Produce a deterministic assembly (including module version GUID and timestamp) + Produce un assembly (che include GUID e timestamp della versione del modulo) + + + + Enable or disable cross-module optimizations + Abilita o disabilita le ottimizzazioni tra i moduli + + + + Report all warnings as errors + Segnala tutti gli avvisi come errori + + + + Report specific warnings as errors + Segnala determinati avvisi come errori + + + + Set a warning level (0-5) + Imposta un livello di avviso (0-5) + + + + Disable specific warning messages + Disabilita messaggi di avviso specifici + + + + Enable specific warnings that may be off by default + Abilita avvisi specifici che possono essere disattivati per impostazione predefinita + + + + Generate overflow checks + Genera controlli dell'overflow + + + + Define conditional compilation symbols (Short form: -d) + Definisce simboli di compilazione condizionale (forma breve: -d) + + + + Ignore ML compatibility warnings + Ignora avvisi di compatibilità ML + + + + + Display this usage message (Short form: -?) + Visualizza questo messaggio relativo all'uso (forma breve: -?) + + + + Read response file for more options + Legge il file di risposta per ulteriori opzioni + + + + Specify the codepage used to read source files + Specificare la tabella codici utilizzata per leggere i file di origine + + + + Output messages in UTF-8 encoding + Genera messaggi con codifica UTF-8 + + + + Output messages with fully qualified paths + Messaggi di output con percorsi completi + + + + Specify a directory for the include path which is used to resolve source files and assemblies (Short form: -I) + Specifica una directory per il percorso di inclusione utilizzato per risolvere assembly e file di origine (forma breve: -I) + + + + Base address for the library to be built + Indirizzo di base della libreria da compilare + + + + Do not reference the default CLI assemblies by default + Per impostazione predefinita, non fa riferimento agli assembly CLI predefiniti + + + + Statically link the F# library and all referenced DLLs that depend on it into the assembly being generated + Collega in modo statico la libreria F# e tutte le DLL da questa dipendenti a cui viene fatto riferimento nell'assembly in fase di generazione + + + + Statically link the given assembly and all referenced DLLs that depend on this assembly. Use an assembly name e.g. mylib, not a DLL name. + Collega in modo statico l'assembly specificato e tutte le DLL da questo dipendenti a cui viene fatto riferimento. Usare un nome di assembly, ad esempio lib, non un nome di DLL. + + + + Use a resident background compilation service to improve compiler startup times. + Utilizzare un servizio di compilazione residente in background per migliorare i tempi di avvio del compilatore. + + + + Name the output debug file + Nome del file di debug di output + + + + Resolve assembly references using directory-based rules rather than MSBuild resolution + Risolvere i riferimenti ad assembly mediante regole basate su directory anziché mediante la risoluzione MSBuild + + + + Unrecognized target '{0}', expected 'exe', 'winexe', 'library' or 'module' + Destinazione '{0}' non riconosciuta. Previsto 'exe', 'winexe', 'library' o 'module' + + + + Unrecognized debug type '{0}', expected 'pdbonly' or 'full' + Tipo debug '{0}' non riconosciuto. Previsto 'pdbonly' o 'full' + + + + Invalid warning level '{0}' + Livello di avviso '{0}' non valido + + + + Short form of '{0}' + Forma breve di '{0}' + + + + The command-line option '--cliroot' has been deprecated. Use an explicit reference to a specific copy of mscorlib.dll instead. + Opzione della riga di comando '--cliroot' deprecata. Al suo posto usare un riferimento esplicito a una copia specifica di mscorlib.dll. + + + + Use to override where the compiler looks for mscorlib.dll and framework components + Da utilizzare per eseguire l'override nella posizione in cui il compilatore cerca mscorlib.dll e i componenti del framework + + + + - OUTPUT FILES - + - FILE DI OUTPUT - + + + + - INPUT FILES - + - FILE DI INPUT - + + + + - RESOURCES - + - RISORSE - + + + + - CODE GENERATION - + - GENERAZIONE CODICE - + + + + - ADVANCED - + - AVANZATE - + + + + - MISCELLANEOUS - + - VARIE - + + + + - LANGUAGE - + - LINGUAGGIO - + + + + - ERRORS AND WARNINGS - + - ERRORI E AVVISI - + + + + Unknown --test argument: '{0}' + Argomento --test sconosciuto: '{0}' + + + + Unrecognized platform '{0}', valid values are 'x86', 'x64', 'Itanium', 'anycpu32bitpreferred', and 'anycpu' + Piattaforma '{0}' non riconosciuta. I valori validi sono 'x86', 'x64', 'Itanium', 'anycpu32bitpreferred' e 'anycpu' + + + + The command-line option '{0}' is for test purposes only + L'opzione della riga di comando '{0}' deve essere usata solo per i test + + + + The command-line option '{0}' has been deprecated + Opzione della riga di comando '{0}' deprecata + + + + The command-line option '{0}' has been deprecated. Use '{1}' instead. + Opzione della riga di comando '{0}' deprecata. Al suo posto usare '{1}'. + + + + The command-line option '{0}' has been deprecated. HTML document generation is now part of the F# Power Pack, via the tool FsHtmlDoc.exe. + Opzione della riga di comando '{0}' deprecata. La generazione di documenti HTML è ora inclusa in F# Power Pack, tramite lo strumento FsHtmlDoc.exe. + + + + Output warning and error messages in color + Visualizzare messaggi di errore e di avviso a colori + + + + Enable high-entropy ASLR + Abilita ASLR a entropia elevata + + + + Specify subsystem version of this assembly + Specificare la versione del sottosistema di questo assembly + + + + Specify target framework profile of this assembly. Valid values are mscorlib, netcore or netstandard. Default - mscorlib + Consente di specificare il profilo del framework di destinazione di questo assembly. I valori validi sono mscorlib, netcore o netstandard. Impostazione predefinita: mscorlib + + + + Emit debug information in quotations + Crea informazioni di debug in quotation + + + + Specify the preferred output language culture name (e.g. es-ES, ja-JP) + Consente di specificare il nome delle impostazioni cultura di output preferite, ad esempio es-ES, it-IT + + + + Don't copy FSharp.Core.dll along the produced binaries + Non copia FSharp.Core.dll con i file binari prodotti + + + + Invalid version '{0}' for '--subsystemversion'. The version must be 4.00 or greater. + Versione '{0}' non valida per '--subsystemversion'. La versione deve essere 4.00 o successiva. + + + + Invalid value '{0}' for '--targetprofile', valid values are 'mscorlib', 'netcore' or 'netstandard'. + Valore '{0}' non valido per '--targetprofile'. I valori validi sono 'mscorlib', 'netcore' o 'netstandard'. + + + + Full name + Nome completo + + + + and {0} other overloads + e altri {0} overload + + + + union case + case di unione + + + + active pattern result + risultato criteri attivi + + + + active recognizer + riconoscimento attivo + + + + field + campo + + + + event + evento + + + + property + proprietà + + + + extension + estensione + + + + custom operation + operazione personalizzata + + + + argument + argomento + + + + patvar + patvar + + + + namespace + spazio dei nomi + + + + module + modulo + + + + namespace/module + spazio dei nomi/modulo + + + + from {0} + da {0} + + + + also from {0} + anche da {0} + + + + generated property + proprietà generata + + + + generated type + tipo generato + + + + Found by AssemblyFolders registry key + Trovata mediante la chiave del Registro di sistema AssemblyFolders + + + + Found by AssemblyFoldersEx registry key + Trovata mediante chiave del Registro di sistema AssemblyFoldersEx + + + + .NET Framework + .NET Framework + + + + Global Assembly Cache + Global Assembly Cache + + + + Recursive class hierarchy in type '{0}' + Gerarchia di classi ricorsiva nel tipo '{0}' + + + + Invalid recursive reference to an abstract slot + Riferimento ricorsivo non valido a uno slot astratto + + + + The event '{0}' has a non-standard type. If this event is declared in another CLI language, you may need to access this event using the explicit {1} and {2} methods for the event. If this event is declared in F#, make the type of the event an instantiation of either 'IDelegateEvent<_>' or 'IEvent<_,_>'. + L'evento '{0}' ha un tipo non standard. Se l'evento è dichiarato in un altro linguaggio CLI, potrebbe essere necessario accedere all'evento mediante i metodi espliciti {1} e {2} per l'evento stesso. Se l'evento è dichiarato in F#, rendere il tipo dell'evento una creazione di istanza di 'IDelegateEvent<_>' o 'IEvent<_,_>'. + + + + The type '{0}' is not accessible from this code location + Il tipo '{0}' non è accessibile da questa posizione di codice + + + + The union cases or fields of the type '{0}' are not accessible from this code location + I campi o i case di unione del tipo '{0}' non sono accessibili da questa posizione di codice + + + + The value '{0}' is not accessible from this code location + Il valore '{0}' non è accessibile da questa posizione di codice + + + + The union case '{0}' is not accessible from this code location + Il case di unione '{0}' non è accessibile da questa posizione di codice + + + + The record, struct or class field '{0}' is not accessible from this code location + Il campo di classe, record o struct '{0}' non è accessibile da questa posizione di codice + + + + The struct or class field '{0}' is not accessible from this code location + Il campo di classe o struct '{0}' non è accessibile da questa posizione di codice + + + + This construct is experimental + Questo costrutto è sperimentale + + + + No Invoke methods found for delegate type + Nessun metodo Invoke trovato per il tipo delegato + + + + More than one Invoke method found for delegate type + Trovati più metodi Invoke per il tipo delegato + + + + Delegates are not allowed to have curried signatures + I delegati non possono disporre di firme sottoposte a currying + + + + Unexpected Expr.TyChoose + Expr.TyChoose imprevisto + + + + Note: Lambda-lifting optimizations have not been applied because of the use of this local constrained generic function as a first class value. Adding type constraints may resolve this condition. + Nota: le ottimizzazioni lifted lambda non sono state applicate a causa dell'utilizzo di questa funzione generica vincolata locale come valore di prima classe. Questa condizione potrebbe essere risolta con l'aggiunta di vincoli di tipo. + + + + Identifiers containing '@' are reserved for use in F# code generation + Gli identificatori contenenti '@' sono riservati per l'utilizzo nella generazione di codice F# + + + + The identifier '{0}' is reserved for future use by F# + L'identificatore '{0}' è riservato per utilizzi futuri in F# + + + + Missing variable '{0}' + Variabile '{0}' mancante + + + + Partial active patterns may only generate one result + Criteri attivi parziali possono generare un solo risultato + + + + The type '{0}' is required here and is unavailable. You must add a reference to assembly '{1}'. + In questa posizione è necessario il tipo '{0}', il quale non è disponibile. Aggiungere un riferimento all'assembly '{1}'. + + + + A reference to the type '{0}' in assembly '{1}' was found, but the type could not be found in that assembly + Nell'assembly '{1}' è stato trovato un riferimento al tipo '{0}', ma non è stato trovato il tipo + + + + Internal error or badly formed metadata: not enough type parameters were in scope while importing + Errore interno o metadati in formato non valido: parametri di tipo insufficienti nell'ambito durante l'importazione + + + + A reference to the DLL {0} is required by assembly {1}. The imported type {2} is located in the first assembly and could not be resolved. + È necessario un riferimento alla DLL {0} per l'assembly {1}. Il tipo importato {2} si trova nel primo assembly e non è stato possibile risolverlo. + + + + An imported assembly uses the type '{0}' but that type is not public + Un assembly importato usa il tipo '{0}', il quale tuttavia non è pubblico + + + + The value '{0}' was marked inline but its implementation makes use of an internal or private function which is not sufficiently accessible + Il valore '{0}' è stato contrassegnato come inline, tuttavia la relativa implementazione utilizza una funzione interna o privata con accessibilità insufficiente + + + + The value '{0}' was marked inline but was not bound in the optimization environment + Il valore '{0}' è stato contrassegnato come inline, tuttavia non è stato associato nell'ambiente di ottimizzazione + + + + Local value {0} not found during optimization + Valore locale {0} non trovato durante l'ottimizzazione + + + + A value marked as 'inline' has an unexpected value + Valore imprevisto contrassegnato come 'inline' + + + + A value marked as 'inline' could not be inlined + Non è stato possibile impostare come inline un valore contrassegnato come 'inline' + + + + Failed to inline the value '{0}' marked 'inline', perhaps because a recursive value was marked 'inline' + Non è stato possibile incorporare il valore '{0}' contrassegnato come 'inline', probabilmente a causa di un valore ricorsivo contrassegnato come 'inline' + + + + Recursive ValValue {0} + ValValue ricorsivo {0} + + + + The indentation of this 'in' token is incorrect with respect to the corresponding 'let' + Il rientro di questo token 'in' non è corretto rispetto al 'let' corrispondente + + + + Possible incorrect indentation: this token is offside of context started at position {0}. Try indenting this token further or using standard formatting conventions. + Possibile rientro non corretto: il token si trova oltre il limite del contesto iniziato alla posizione {0}. Provare ad applicare un ulteriore rientro al token oppure a utilizzare convenzioni di formattazione standard. + + + + The '|' tokens separating rules of this pattern match are misaligned by one column. Consider realigning your code or using further indentation. + Le regole di separazione dei token '|' di questi criteri di ricerca sono disallineate di una colonna. Provare a riallineare il codice o a utilizzare ulteriore rientro. + + + + Invalid module/expression/type + Modulo/espressione/tipo non valido + + + + Multiple types exist called '{0}', taking different numbers of generic parameters. Provide a type instantiation to disambiguate the type resolution, e.g. '{1}'. + Sono presenti più tipi chiamati '{0}', i quali utilizzano numeri diversi di parametri generici. Fornire una creazione dell'istanza del tipo per evitare ambiguità nella risoluzione del tipo, ad esempio '{1}'. + + + + The instantiation of the generic type '{0}' is missing and can't be inferred from the arguments or return type of this member. Consider providing a type instantiation when accessing this type, e.g. '{1}'. + La creazione dell'istanza del tipo generico '{0}' non è presente e non può essere dedotta dagli argomenti o dal tipo restituito di questo membro. Provare a fornire una creazione dell'istanza del tipo all'accesso al tipo, ad esempio '{1}'. + + + + 'global' may only be used as the first name in a qualified path + 'global' può essere utilizzato solo come primo nome in un percorso completo + + + + This is not a constructor or literal, or a constructor is being used incorrectly + Questo elemento non è un costruttore o un valore letterale oppure un costruttore è utilizzato in modo non corretto + + + + Unexpected empty long identifier + Identificatore lungo vuoto imprevisto + + + + The record type '{0}' does not contain a label '{1}'. + Il tipo di record '{0}' non contiene un'etichetta '{1}'. + + + + Invalid field label + Etichetta di campo non valida + + + + Invalid expression '{0}' + Espressione '{0}' non valida + + + + No constructors are available for the type '{0}' + Nessun costruttore disponibile per il tipo '{0}' + + + + The union type for union case '{0}' was defined with the RequireQualifiedAccessAttribute. Include the name of the union type ('{1}') in the name you are using. + Il tipo di unione per il case di unione '{0}' è stato definito con RequireQualifiedAccessAttribute. Includere il nome del tipo di unione ('{1}') nel nome da usare. + + + + The record type for the record field '{0}' was defined with the RequireQualifiedAccessAttribute. Include the name of the record type ('{1}') in the name you are using. + Il tipo di record per il campo di record '{0}' è stato definito con RequireQualifiedAccessAttribute. Includere il nome del tipo di record ('{1}') nel nome da usare. + + + + Unexpected error creating debug information file '{0}' + Errore imprevisto durante la creazione del file di informazioni di debug '{0}' + + + + This number is outside the allowable range for this integer type + Questo numero non è compreso nell'intervallo consentito per questo tipo di Integer + + + + '{0}' is not permitted as a character in operator names and is reserved for future use + '{0}' non è consentito come carattere nei nomi degli operatori ed è riservato per utilizzi futuri + + + + Unexpected character '{0}' + Il carattere '{0}' è imprevisto + + + + This byte array literal contains characters that do not encode as a single byte + Questo valore letterale della matrice di byte contiene caratteri non codificabili come singoli byte + + + + Identifiers followed by '{0}' are reserved for future use + Gli identificatori seguiti da '{0}' sono riservati per utilizzi futuri + + + + This number is outside the allowable range for 8-bit signed integers + Questo numero non è compreso nell'intervallo consentito per interi con segno a 8 bit + + + + This number is outside the allowable range for hexadecimal 8-bit signed integers + Questo numero non è compreso nell'intervallo consentito per interi con segno a 8 bit esadecimali + + + + This number is outside the allowable range for 8-bit unsigned integers + Questo numero non è compreso nell'intervallo consentito per interi senza segno a 8 bit + + + + This number is outside the allowable range for 16-bit signed integers + Questo numero non è compreso nell'intervallo consentito per interi con segno a 16 bit + + + + This number is outside the allowable range for 16-bit unsigned integers + Questo numero non è compreso nell'intervallo consentito per interi senza segno a 16 bit + + + + This number is outside the allowable range for 32-bit signed integers + Questo numero non è compreso nell'intervallo consentito per interi con segno a 32 bit + + + + This number is outside the allowable range for 32-bit unsigned integers + Questo numero non è compreso nell'intervallo consentito per interi senza segno a 32 bit + + + + This number is outside the allowable range for 64-bit signed integers + Questo numero non è compreso nell'intervallo consentito per interi con segno a 64 bit + + + + This number is outside the allowable range for 64-bit unsigned integers + Questo numero non è compreso nell'intervallo consentito per interi senza segno a 64 bit + + + + This number is outside the allowable range for signed native integers + Questo numero non è compreso nell'intervallo consentito per interi con segno nativi + + + + This number is outside the allowable range for unsigned native integers + Questo numero non è compreso nell'intervallo consentito per interi senza segno nativi + + + + Invalid floating point number + Numero a virgola mobile non valido + + + + This number is outside the allowable range for decimal literals + Questo numero non è compreso nell'intervallo consentito per valori letterali decimali + + + + This number is outside the allowable range for 32-bit floats + Questo numero non è compreso nell'intervallo consentito per valori float a 32 bit + + + + This is not a valid numeric literal. Valid numeric literals include 1, 0x1, 0b0001 (int), 1u (uint32), 1L (int64), 1UL (uint64), 1s (int16), 1y (sbyte), 1uy (byte), 1.0 (float), 1.0f (float32), 1.0m (decimal), 1I (BigInteger). + Questo non è un valore letterale numerico valido. I valori letterali numerici validi includono 1, 0x1, 0b0001 (int), 1u (uint32), 1L (int64), 1UL (uint64), 1s (int16), 1y (sbyte), 1uy (byte), 1.0 (float), 1.0f (float32), 1.0m (decimal), 1I (BigInteger). + + + + This is not a valid byte literal + Valore letterale byte non valido + + + + This is not a valid character literal + Valore letterale carattere non valido + + + + This Unicode encoding is only valid in string literals + Questa codifica Unicode è valida solo in valori letterali stringa + + + + This token is reserved for future use + Token riservato per utilizzi futuri + + + + TABs are not allowed in F# code unless the #indent \"off\" option is used + I caratteri di tabulazione non sono consentiti nel codice F# a meno che non si utilizzi l'opzione #indent \"off\" + + + + Invalid line number: '{0}' + Numero di riga non valido: '{0}' + + + + #if directive must appear as the first non-whitespace character on a line + La direttiva #if deve trovarsi all'inizio di una riga + + + + #else has no matching #if + #else senza #if corrispondente + + + + #endif required for #else + #endif necessario per #else + + + + #else directive must appear as the first non-whitespace character on a line + La direttiva #else deve trovarsi all'inizio di una riga + + + + #endif has no matching #if + #endif senza #if corrispondente + + + + #endif directive must appear as the first non-whitespace character on a line + La direttiva #endif deve trovarsi all'inizio di una riga + + + + #if directive should be immediately followed by an identifier + La direttiva #if deve essere immediatamente seguita da un identificatore + + + + Syntax error. Wrong nested #endif, unexpected tokens before it. + Errore di sintassi. Direttiva #endif annidata non corretta, preceduta da token non previsti. + + + + #! may only appear as the first line at the start of a file. + #! è ammesso solo come prima riga all'inizio di un file. + + + + Expected single line comment or end of line + È previsto un commento a riga singola o la fine della riga + + + + Infix operator member '{0}' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ... + Il membro dell'operatore infisso '{0}' non ha argomenti. Prevista una tupla di 2 argomenti, ad esempio un membro statico (+) (x,y) = ... + + + + Infix operator member '{0}' has {1} initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ... + Il membro dell'operatore infisso '{0}' ha {1} argomento/i iniziale/i. Prevista una tupla di 2 argomenti, ad esempio un membro statico (+) (x,y) = ... + + + + Infix operator member '{0}' has extra curried arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ... + Il membro dell'operatore infisso '{0}' contiene argomenti sottoposti a currying aggiuntivi. Prevista una tupla di 2 argomenti, ad esempio un membro statico (+) (x,y) = ... + + + + All record, union and struct types in FSharp.Core.dll must be explicitly labelled with 'StructuralComparison' or 'NoComparison' + A tutti i tipi di struct, record e unione in FSharp.Core.dll deve essere assegnata in modo esplicito l'etichetta 'StructuralComparison' o 'NoComparison' + + + + The struct, record or union type '{0}' has the 'StructuralComparison' attribute but the type parameter '{1}' does not satisfy the 'comparison' constraint. Consider adding the 'comparison' constraint to the type parameter + Il tipo di unione, struct o record '{0}' contiene l'attributo 'StructuralComparison' ma il parametro di tipo '{1}' non soddisfa il vincolo 'comparison'. Provare ad aggiungere il vincolo 'comparison' al parametro di tipo + + + + The struct, record or union type '{0}' has the 'StructuralComparison' attribute but the component type '{1}' does not satisfy the 'comparison' constraint + Il tipo di unione, struct o record '{0}' contiene l'attributo 'StructuralComparison' ma il tipo di componente '{1}' non soddisfa il vincolo 'comparison' + + + + The struct, record or union type '{0}' is not structurally comparable because the type parameter {1} does not satisfy the 'comparison' constraint. Consider adding the 'NoComparison' attribute to the type '{2}' to clarify that the type is not comparable + Il tipo di unione, struct o record '{0}' non è confrontabile a livello di struttura perché il parametro di tipo {1} non soddisfa il vincolo 'comparison'. Provare ad aggiungere l'attributo 'NoComparison' al tipo '{2}' per chiarire che il tipo non è confrontabile + + + + The struct, record or union type '{0}' is not structurally comparable because the type '{1}' does not satisfy the 'comparison' constraint. Consider adding the 'NoComparison' attribute to the type '{2}' to clarify that the type is not comparable + Il tipo di unione, struct o record '{0}' non è confrontabile a livello di struttura perché il tipo '{1}' non soddisfa il vincolo 'comparison'. Provare ad aggiungere l'attributo 'NoComparison' al tipo '{2}' per chiarire che il tipo non è confrontabile + + + + The struct, record or union type '{0}' does not support structural equality because the type parameter {1} does not satisfy the 'equality' constraint. Consider adding the 'NoEquality' attribute to the type '{2}' to clarify that the type does not support structural equality + Il tipo di unione, struct o record '{0}' non supporta l'uguaglianza strutturale perché il parametro di tipo {1} non soddisfa il vincolo 'equality'. Provare ad aggiungere l'attributo 'NoEquality' al tipo '{2}' per chiarire che il tipo non supporta l'uguaglianza strutturale + + + + The struct, record or union type '{0}' does not support structural equality because the type '{1}' does not satisfy the 'equality' constraint. Consider adding the 'NoEquality' attribute to the type '{2}' to clarify that the type does not support structural equality + Il tipo di unione, struct o record '{0}' non supporta l'uguaglianza strutturale perché il tipo '{1}' non soddisfa il vincolo 'equality'. Provare ad aggiungere l'attributo 'NoEquality' al tipo '{2}' per chiarire che il tipo non supporta l'uguaglianza strutturale + + + + The struct, record or union type '{0}' has the 'StructuralEquality' attribute but the type parameter '{1}' does not satisfy the 'equality' constraint. Consider adding the 'equality' constraint to the type parameter + Il tipo di unione, struct o record '{0}' contiene l'attributo 'StructuralEquality' ma il parametro di tipo '{1}' non soddisfa il vincolo 'equality'. Provare ad aggiungere il vincolo 'equality' al parametro di tipo + + + + The struct, record or union type '{0}' has the 'StructuralEquality' attribute but the component type '{1}' does not satisfy the 'equality' constraint + Il tipo di unione, struct o record '{0}' contiene l'attributo 'StructuralEquality' ma il tipo di componente '{1}' non soddisfa il vincolo 'equality' + + + + Each argument of the primary constructor for a struct must be given a type, for example 'type S(x1:int, x2: int) = ...'. These arguments determine the fields of the struct. + A ogni argomento del costruttore primario per uno struct deve essere assegnato un tipo, ad esempio 'type S(x1:int, x2: int) = ...'. Tali argomenti determinano i campi dello struct. + + + + The value '{0}' is unused + Valore '{0}' non utilizzato + + + + The recursive object reference '{0}' is unused. The presence of a recursive object reference adds runtime initialization checks to members in this and derived types. Consider removing this recursive object reference. + Riferimento ricorsivo a oggetto '{0}' non usato. La presenza di un riferimento ricorsivo a un oggetto aggiunge verifiche di inizializzazione del runtime ai membri in questo tipo e nei relativi tipi derivati. Provare a rimuovere il riferimento ricorsivo all'oggetto. + + + + A getter property may have at most one argument group + Una proprietà di getter può contenere al massimo un gruppo di argomenti + + + + A setter property may have at most two argument groups + Una proprietà di setter può contenere al massimo due gruppi di argomenti + + + + Invalid property getter or setter + Getter o setter della proprietà non valido + + + + An indexer property must be given at least one argument + A una proprietà di indicizzatore deve essere assegnato almeno un argomento + + + + This operation accesses a mutable top-level value defined in another assembly in an unsupported way. The value cannot be accessed through its address. Consider copying the expression to a mutable local, e.g. 'let mutable x = ...', and if necessary assigning the value back after the completion of the operation + Questa operazione accede a un valore di livello superiore modificabile definito in un altro assembly in un modo non supportato. Non è possibile accedere al valore tramite il relativo indirizzo. Provare a copiare l'espressione in un valore locale modificabile, ad esempio 'let mutable x = ...' e, se necessario, ad assegnare nuovamente il valore dopo il completamento dell'operazione + + + + Remove spaces between the type name and type parameter, e.g. \"type C<'T>\", not type \"C <'T>\". Type parameters must be placed directly adjacent to the type name. + I parametri di tipo devono trovarsi immediatamente accanto al nome del tipo, ad esempio \"type C<'T>\", non type \"C <'T>\" + + + + Remove spaces between the type name and type parameter, e.g. \"C<'T>\", not \"C <'T>\". Type parameters must be placed directly adjacent to the type name. + Gli argomenti tipo devono trovarsi immediatamente accanto al nome del tipo, ad esempio \"C<'T>\", non \"C <'T>\" + + + + The use of the type syntax 'int C' and 'C <int>' is not permitted here. Consider adjusting this type to be written in the form 'C<int>' + Uso della sintassi di tipo 'int C' e 'C <int>' non consentito in questa posizione. Provare a modificare il tipo in modo che sia scritto nel formato 'C<int>' + + + + The module/namespace '{0}' from compilation unit '{1}' did not contain the module/namespace '{2}' + Il modulo/spazio dei nomi '{0}' dell'unità di compilazione '{1}' non contiene il modulo/spazio dei nomi '{2}' + + + + The module/namespace '{0}' from compilation unit '{1}' did not contain the val '{2}' + Il modulo/spazio dei nomi '{0}' dell'unità di compilazione '{1}' non contiene il valore '{2}' + + + + The module/namespace '{0}' from compilation unit '{1}' did not contain the namespace, module or type '{2}' + Il modulo/spazio dei nomi '{0}' dell'unità di compilazione '{1}' non contiene lo spazio dei nomi, il modulo o il tipo '{2}' + + + + The 'UseNullAsTrueValue' attribute flag may only be used with union types that have one nullary case and at least one non-nullary case + Il flag di attributo 'UseNullAsTrueValue' può essere utilizzato solo con tipi di unione che hanno un case nullary e almeno un case non nullary + + + + The parameter '{0}' was inferred to have byref type. Parameters of byref type must be given an explicit type annotation, e.g. 'x1: byref<int>'. When used, a byref parameter is implicitly dereferenced. + Per il parametro '{0}' è stato dedotto il tipo byref. Ai parametri di tipo byref deve essere associata un'annotazione di tipo esplicita, ad esempio 'x1: byref<int>'. Se utilizzato, un parametro byref viene dereferenziato in modo implicito. + + + + The generic member '{0}' has been used at a non-uniform instantiation prior to this program point. Consider reordering the members so this member occurs first. Alternatively, specify the full type of the member explicitly, including argument types, return type and any additional generic parameters and constraints. + Il membro generico '{0}' è stato utilizzato in una creazione di istanza non uniforme prima di questo punto del programma. Provare a riordinare i membri in modo che questo si trovi prima. In alternativa, specificare il tipo completo del membro in modo esplicito, con tipi di argomento, tipo restituito ed eventuali vincoli e parametri generici aggiuntivi. + + + + The attribute '{0}' appears in both the implementation and the signature, but the attribute arguments differ. Only the attribute from the signature will be included in the compiled code. + L'attributo '{0}' è presente nell'implementazione e nella firma, ma gli argomenti degli attributi differiscono. Nel codice compilato verrà incluso solo l'attributo della firma. + + + + Cannot call an abstract base member: '{0}' + Non è possibile chiamare un membro di base astratto: '{0}' + + + + Could not resolve the ambiguity in the use of a generic construct with an 'unmanaged' constraint at or near this position + Non è stato possibile risolvere l'ambiguità relativa all'uso di un costrutto generico con un vincolo 'unmanaged' in questa posizione o in prossimità di essa + + + + This construct is for ML compatibility. {0}. You can disable this warning by using '--mlcompatibility' or '--nowarn:62'. + Il costruttore è per la compatibilità ML. {0}. È possibile disabilitare questo avviso tramite '--mlcompatibility' o '--nowarn:62'. + + + + The type '{0}' has been marked as having an Explicit layout, but the field '{1}' has not been marked with the 'FieldOffset' attribute + Il tipo '{0}' è stato contrassegnato con il layout esplicito, ma il campo '{1}' non è stato contrassegnato con l'attributo 'FieldOffset' + + + + Interfaces inherited by other interfaces should be declared using 'inherit ...' instead of 'interface ...' + Le interfacce ereditate da altre interfacce devono essere dichiarate tramite 'inherit ...' anziché 'interface ...' + + + + Invalid prefix operator + Operatore prefisso non valido + + + + Invalid operator definition. Prefix operator definitions must use a valid prefix operator name. + Definizione di operatore non valida. Le definizioni di operatore prefisso devono utilizzare un nome di operatore prefisso valido. + + + + The file extensions '.ml' and '.mli' are for ML compatibility + Le estensioni di file '.ml' e '.mli' sono per la compatibilità ML + + + + Consider using a file with extension '.ml' or '.mli' instead + Provare a utilizzare un file con estensione '.ml' o '.mli' + + + + Active pattern '{0}' is not a function + I criteri attivi '{0}' non sono una funzione + + + + Active pattern '{0}' 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' + I criteri attivi '{0}' hanno un tipo di risultati contenente variabili di tipo che non sono determinate dall'input. Probabilmente il case di risultato non è menzionato, ad esempio 'let (|A|B|) (x:int) = A x'. Il problema può essere risolto con un vincolo di tipo, ad esempio 'let (|A|B|) (x:int) : Choice<int,unit> = A x' + + + + The FieldOffset attribute can only be placed on members of types marked with the StructLayout(LayoutKind.Explicit) + L'attributo FieldOffset può essere usato solo in membri di tipo contrassegnati con StructLayout(LayoutKind.Explicit) + + + + Optional arguments must come at the end of the argument list, after any non-optional arguments + Gli argomenti facoltativi devono essere aggiungi alla fine dell'elenco degli argomenti, dopo quelli obbligatori + + + + Attribute 'System.Diagnostics.ConditionalAttribute' is only valid on methods or attribute classes + L'attributo 'System.Diagnostics.ConditionalAttribute' è valido solo in classi di attributi o metodi + + + + Extension members cannot provide operator overloads. Consider defining the operator as part of the type definition instead. + I membri di estensione non possono fornire overload di operatori. Provare a definire l'operatore come parte della definizione del tipo. + + + + The name of the MDB file must be <assembly-file-name>.mdb. The --pdb option will be ignored. + Il nome del file MDB deve essere <nome-file-assembly>.mdb. L'opzione --pdb verrà ignorata. + + + + MDB generation failed. Could not find compatible member {0} + La generazione del file MDB non è riuscita. Il membro compatibile {0} non è stato trovato + + + + Cannot generate MDB debug information. Failed to load the 'MonoSymbolWriter' type from the 'Mono.CompilerServices.SymbolWriter.dll' assembly. + Non è possibile generare informazioni di debug MDB. Non è stato possibile caricare il tipo 'MonoSymbolWriter' dall'assembly 'Mono.CompilerServices.SymbolWriter.dll'. + + + + The union case named '{0}' conflicts with the generated type '{1}' + Il case di unione denominato '{0}' è in conflitto con il tipo generato '{1}' + + + + ReflectedDefinitionAttribute may not be applied to an instance member on a struct type, because the instance member takes an implicit 'this' byref parameter + ReflectedDefinitionAttribute non può essere applicato a un membro di istanza in un tipo di struct perché il membro di istanza accetta un parametro byref implicito 'this' + + + + DLLImport bindings must be static members in a class or function definitions in a module + I binding DLLImport devono essere membri statici in una classe o definizioni di funzione in un modulo + + + + When mscorlib.dll or FSharp.Core.dll is explicitly referenced the {0} option must also be passed + Quando si fa riferimento in modo esplicito a mscorlib.dll o FSharp.Core.dll è necessario passare anche l'opzione {0} + + + + FSharp.Core.sigdata not found alongside FSharp.Core. File expected in {0}. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required. + Il file FSharp.Core.sigdata non è stato trovato con FSharp.Core. Il file deve trovarsi in {0}. Provare a eseguire l'aggiornamento a una versione più recente di FSharp.Core, in cui questo file non è più obbligatorio. + + + + File '{0}' not found alongside FSharp.Core. File expected in {1}. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required. + Il file '{0}' non è stato trovato con FSharp.Core. Il file deve trovarsi in {1}. Provare a eseguire l'aggiornamento a una versione più recente di FSharp.Core, in cui questo file non è più obbligatorio. + + + + Filename '{0}' contains invalid character '{1}' + Il nome file '{0}' contiene il carattere non valido '{1}' + + + + 'use!' bindings must be of the form 'use! <var> = <expr>' + Il formato dei binding 'use!' deve essere 'use! <var> = <expr>' + + + + Inner generic functions are not permitted in quoted expressions. Consider adding some type constraints until this function is no longer generic. + Nelle espressioni in quotation non sono consentite funzioni generiche interne. Provare ad aggiungere alcuni vincoli di tipo in modo che la funzione non sia più generica. + + + + The type '{0}' is not a valid enumerator type , i.e. does not have a 'MoveNext()' method returning a bool, and a 'Current' property + Il tipo '{0}' non è un tipo di enumeratore valido, ad esempio non contiene un metodo 'MoveNext()' che restituisce un valore bool e una proprietà 'Current' + + + + End of file in triple-quote string begun at or before here + La fine del file nella stringa con virgolette triple inizia in questa posizione o prima di essa + + + + End of file in triple-quote string embedded in comment begun at or before here + La fine del file nella stringa con virgolette triple incorporata nel commento inizia in questa posizione o prima di essa + + + + This type test or downcast will ignore the unit-of-measure '{0}' + Questo test di tipo o downcast ignorerà l'unità di misura '{0}' + + + + Expected type argument or static argument + Previsto argomento tipo o statico + + + + Unmatched '<'. Expected closing '>' + '<' senza corrispondenza. Previsto '>' di chiusura + + + + Unexpected quotation operator '<@' in type definition. If you intend to pass a verbatim string as a static argument to a type provider, put a space between the '<' and '@' characters. + Operatore di quotation '<@' imprevisto nella definizione di tipo. Se si vuole passare una stringa verbatim come argomento statico a un provider di tipi, inserire uno spazio tra i caratteri '<' e '@'. + + + + Attempted to parse this as an operator name, but failed + Si è tentato di analizzare questo elemento come nome operatore, ma l'operazione non è riuscita + + + + \U{0} is not a valid Unicode character escape sequence + \U{0} non è una sequenza di escape di caratteri Unicode valida + + + + '{0}' must be applied to an argument of type '{1}', but has been applied to an argument of type '{2}' + '{0}' deve essere applicato a un argomento di tipo '{1}', ma è stato applicato a un argomento di tipo '{2}' + + + + '{0}' can only be applied to optional arguments + '{0}' può essere applicato solo ad argomenti facoltativi + + + + The specified .NET Framework version '{0}' is not supported. Please specify a value from the enumeration Microsoft.Build.Utilities.TargetDotNetFrameworkVersion. + La versione di .NET Framework '{0}' specificata non è supportata. Specificare un valore dall'enumerazione Microsoft.Build.Utilities.TargetDotNetFrameworkVersion. + + + + Invalid Magic value in CLR Header + Il valore di Magic non è valido nell'intestazione CLR + + + + Bad image format + Il formato dell'immagine non è valido + + + + Private key expected + È prevista la chiave privata + + + + RSA key expected + È prevista la chiave RSA + + + + Invalid bit Length + La lunghezza in bit non è valida + + + + Invalid RSAParameters structure - '{{0}}' expected + La struttura RSAParameters non è valida. È previsto '{{0}}' + + + + Invalid algId - 'Exponent' expected + Il valore di algId non è valido. È previsto 'Exponent' + + + + Invalid signature size + Le dimensioni della firma non sono valide + + + + No signature directory + Non esiste alcuna directory delle firme + + + + Invalid Public Key blob + Il BLOB di chiave pubblica non è valido + + + + Exiting - too many errors + Uscita in corso: troppi errori + + + + The documentation file has no .xml suffix + Il file della documentazione non ha suffisso .xml + + + + No implementation files specified + Nessun file di implementazione specificato + + + + The attribute {0} specified version '{1}', but this value is invalid and has been ignored + L'attributo {0} ha specificato la versione '{1}', ma questo valore non è valido ed è stato ignorato + + + + Conflicting options specified: 'win32manifest' and 'win32res'. Only one of these can be used. + Specificate opzioni in conflitto: 'win32manifest' e 'win32res'. È possibile utilizzarne solo una. + + + + The code in assembly '{0}' makes uses of quotation literals. Static linking may not include components that make use of quotation literals unless all assemblies are compiled with at least F# 4.0. + Il codice nell'assembly '{0}' usa valori letterali di quotation. Il collegamento statico non può includere componenti che usano valori letterali di quotation a meno che tutti gli assembly non siano compilati con almeno F# 4.0. + + + + Code in this assembly makes uses of quotation literals. Static linking may not include components that make use of quotation literals unless all assemblies are compiled with at least F# 4.0. + Il codice in questo assembly usa valori letterali di quotation. Il collegamento statico non può includere componenti che usano valori letterali di quotation a meno che tutti gli assembly non siano compilati con almeno F# 4.0. + + + + Static linking may not include a .EXE + Il collegamento statico non può includere un .EXE + + + + Static linking may not include a mixed managed/unmanaged DLL + Il collegamento dinamico non può includere una DLL mista gestita/non gestita + + + + Ignoring mixed managed/unmanaged assembly '{0}' during static linking + L'assembly misto gestito/non gestito '{0}' verrà ignorato durante il collegamento statico + + + + Assembly '{0}' was referenced transitively and the assembly could not be resolved automatically. Static linking will assume this DLL has no dependencies on the F# library or other statically linked DLLs. Consider adding an explicit reference to this DLL. + All'assembly '{0}' viene fatto riferimento in modo transitivo e non è stato possibile risolvere l'assembly automaticamente. Ai fini del collegamento statico si presuppone che la DLL non abbia dipendenze nella libreria F# o in altre DLL collegate in modo statico. Provare ad aggiungere un riferimento esplicito alla DLL. + + + + Assembly '{0}' not found in dependency set of target binary. Statically linked roots should be specified using an assembly name, without a DLL or EXE extension. If this assembly was referenced explicitly then it is possible the assembly was not actually required by the generated binary, in which case it should not be statically linked. + Assembly '{0}' non trovato nel set di dipendenze del file binario di destinazione. Le radici collegate in modo statico devono essere specificate mediante un nome di assembly, senza estensione dll o exe. Se viene fatto riferimento all'assembly in modo esplicito, è possibile che l'assembly non sia effettivamente necessario per il file binario generato. In tal caso, non deve essere collegato in modo statico. + + + + The key file '{0}' could not be opened + Non è stato possibile aprire il file di chiave '{0}' + + + + A problem occurred writing the binary '{0}': {1} + Si è verificato un problema durante la scrittura del binario '{0}': {1} + + + + The 'AssemblyVersionAttribute' has been ignored because a version was given using a command line option + 'AssemblyVersionAttribute' ignorato. È stata specificata una versione mediante un'opzione della riga di comando + + + + Error emitting 'System.Reflection.AssemblyCultureAttribute' attribute -- 'Executables cannot be satellite assemblies, Culture should always be empty' + Errore durante la creazione dell'attributo 'System.Reflection.AssemblyCultureAttribute' -- Gli eseguibili non possono essere assembly satellite e Culture deve essere sempre vuoto' + + + + Option '--delaysign' overrides attribute 'System.Reflection.AssemblyDelaySignAttribute' given in a source file or added module + L'opzione '--delaysign' esegue l'override dell'attributo 'System.Reflection.AssemblyDelaySignAttribute' specificato in un file di codice sorgente o in un modulo aggiunto + + + + Option '--keyfile' overrides attribute 'System.Reflection.AssemblyKeyFileAttribute' given in a source file or added module + L'opzione '--keyfile' esegue l'override dell'attributo 'System.Reflection.AssemblyKeyFileAttribute' specificato in un file di codice sorgente o in un modulo aggiunto + + + + Option '--keycontainer' overrides attribute 'System.Reflection.AssemblyNameAttribute' given in a source file or added module + L'opzione '--keycontainer' esegue l'override dell'attributo 'System.Reflection.AssemblyNameAttribute' specificato in un file di codice sorgente o in un modulo aggiunto + + + + The assembly '{0}' is listed on the command line. Assemblies should be referenced using a command line flag such as '-r'. + L'assembly '{0}' è elencato nella riga di comando. È necessario fare riferimento agli assembly utilizzando un flag della riga di comando quale '-r'. + + + + The resident compilation service was not used because a problem occured in communicating with the server. + Il servizio di compilazione residente non è stato usato perché si è verificato un problema nella comunicazione con il server. + + + + Problem with filename '{0}': Illegal characters in path. + Problema con il nome file '{0}': caratteri non validi nel percorso. + + + + Passing a .resx file ({0}) as a source file to the compiler is deprecated. Use resgen.exe to transform the .resx file into a .resources file to pass as a --resource option. If you are using MSBuild, this can be done via an <EmbeddedResource> item in the .fsproj project file. + Il passaggio di un file con estensione resx ({0}) come file di origine al compilatore è deprecato. Utilizzare resgen.exe per trasformare il file con estensione resx in un file con estensione resources da passare come opzione --resource. Se si utilizza MSBuild, tale operazione può esser eseguita mediante un elemento <EmbeddedResource> nel file di progetto con estensione fsproj. + + + + Static linking may not be used on an assembly referencing mscorlib (e.g. a .NET Framework assembly) when generating an assembly that references System.Runtime (e.g. a .NET Core or Portable assembly). + Non è possibile usare il collegamento statico in un assembly che fa riferimento a mscorlib (ad esempio un assembly .NET Framework) durante la generazione di un assembly che fa riferimento a System.Runtime (ad esempio un assembly .NET Core o Portable). + + + + An {0} specified version '{1}', but this value is a wildcard, and you have requested a deterministic build, these are in conflict. + In un attributo {0} è stata specificata la versione '{1}', ma questo valore è un carattere jolly ed è stata richiesta una compilazione deterministica. Tali opzioni sono in conflitto. + + + + Determinstic builds only support portable PDBs (--debug:portable or --debug:embedded) + Le compilazioni deterministiche supportano solo file PDB portatili (--debug:portable o --debug:embedded) + + + + Character '{0}' is not allowed in provided namespace name '{1}' + Il carattere '{0}' non è consentito nel nome dello spazio dei nomi fornito '{1}' + + + + The provided type '{0}' returned a member with a null or empty member name + Membro con nome Null o vuoto restituito dal tipo fornito '{0}' + + + + The provided type '{0}' returned a null member + Membro Null restituito dal tipo fornito '{0}' + + + + The provided type '{0}' member info '{1}' has null declaring type + Le informazioni sul membro '{1}' del tipo fornito '{0}' contengono un tipo dichiarante Null + + + + The provided type '{0}' has member '{1}' which has declaring type '{2}'. Expected declaring type to be the same as provided type. + Il tipo fornito '{0}' contiene il membro '{1}' con il tipo dichiarante '{2}'. Il tipo dichiarante previsto deve essere dello stesso tipo di quello fornito. + + + + Referenced assembly '{0}' has assembly level attribute '{1}' but no public type provider classes were found + L'assembly '{0}' a cui viene fatto riferimento contiene l'attributo a livello di assembly '{1}' ma non è stata trovata alcuna classe di provider di tipi pubblica + + + + Type '{0}' from type provider '{1}' has an empty namespace. Use 'null' for the global namespace. + Il tipo '{0}' nel provider di tipi '{1}' contiene uno spazio dei nomi vuoto. Usare 'null' per lo spazio dei nomi globale. + + + + Empty namespace found from the type provider '{0}'. Use 'null' for the global namespace. + Spazio dei nomi vuoto trovato nel provider di tipi '{0}'. Utilizzare 'null' per lo spazio dei nomi globale. + + + + Provided type '{0}' has 'IsGenericType' as true, but generic types are not supported. + Nel tipo fornito '{0}' 'IsGenericType' è impostato su true, ma i tipi generici non sono supportati. + + + + Provided type '{0}' has 'IsArray' as true, but array types are not supported. + Nel tipo fornito '{0}' 'IsArray' è impostato su true, ma i tipi matrice non sono supportati. + + + + Invalid member '{0}' on provided type '{1}'. Provided type members must be public, and not be generic, virtual, or abstract. + Membro '{0}' non valido nel tipo fornito '{1}'. I membri dei tipi forniti devono essere pubblici e non generici, virtuali o astratti. + + + + Invalid member '{0}' on provided type '{1}'. Only properties, methods and constructors are allowed + Membro '{0}' non valido nel tipo fornito '{1}'. Sono consentiti solo costruttori, metodi e proprietà. + + + + Property '{0}' on provided type '{1}' has CanRead=true but there was no value from GetGetMethod() + La proprietà '{0}' nel tipo fornito '{1}' contiene CanRead=true ma non era presente alcun valore da GetGetMethod() + + + + Property '{0}' on provided type '{1}' has CanRead=false but GetGetMethod() returned a method + La proprietà '{0}' nel tipo fornito '{1}' contiene CanRead=false ma GetGetMethod() ha restituito un metodo + + + + Property '{0}' on provided type '{1}' has CanWrite=true but there was no value from GetSetMethod() + La proprietà '{0}' nel tipo fornito '{1}' contiene CanWrite=true ma non era presente alcun valore da GetSetMethod() + + + + Property '{0}' on provided type '{1}' has CanWrite=false but GetSetMethod() returned a method + La proprietà '{0}' nel tipo fornito '{1}' contiene CanWrite=false ma GetSetMethod() ha restituito un metodo + + + + One or more errors seen during provided type setup + Uno o più errori visualizzati durante l'impostazione del tipo fornito + + + + Unexpected exception from provided type '{0}' member '{1}': {2} + Eccezione imprevista dal tipo fornito '{0}' membro '{1}': {2} + + + + Unsupported constant type '{0}'. Quotations provided by type providers can only contain simple constants. The implementation of the type provider may need to be adjusted by moving a value declared outside a provided quotation literal to be a 'let' binding inside the quotation literal. + Il tipo di costante '{0}' non è supportato. Le quotation fornite da provider di tipi possono contenere solo costanti semplici. Potrebbe essere necessario modificare l'implementazione del provider di tipi spostando un valore dichiarato all'esterno di un valore letterale di tipo quotation in modo che sia un binding 'let' all'interno del valore letterale di tipo quotation. + + + + Unsupported expression '{0}' from type provider. If you are the author of this type provider, consider adjusting it to provide a different provided expression. + Espressione '{0}' non supportata dal provider di tipi. Se l'utente è l'autore di questo provider di tipi, provare a fornire un'espressione differente. + + + + Expected provided type named '{0}' but provided type has 'Name' with value '{1}' + Era previsto un tipo fornito denominato '{0}', mentre il tipo fornito contiene 'Name' con valore '{1}' + + + + Event '{0}' on provided type '{1}' has no value from GetAddMethod() + L'evento '{0}' nel tipo fornito '{1}' non contiene un valore di GetAddMethod() + + + + Event '{0}' on provided type '{1}' has no value from GetRemoveMethod() + L'evento '{0}' nel tipo fornito '{1}' non contiene un valore di GetRemoveMethod() + + + + Assembly attribute '{0}' refers to a designer assembly '{1}' which cannot be loaded or doesn't exist. {2} + L'attributo di assembly '{0}' fa riferimento a un assembly della finestra di progettazione '{1}' che non è stato caricato o non esiste. {2} + + + + The type provider does not have a valid constructor. A constructor taking either no arguments or one argument of type 'TypeProviderConfig' was expected. + Il provider di tipi non contiene un costruttore valido. Era previsto un costruttore che non accetta argomenti o che accetta un solo argomento di tipo 'TypeProviderConfig'. + + + + The type provider '{0}' reported an error: {1} + Errore segnalato dal provider di tipi '{0}': {1} + + + + The type provider '{0}' used an invalid parameter in the ParameterExpression: {1} + Parametro non valido utilizzato dal provider di tipi '{0}' in ParameterExpression: {1} + + + + The type provider '{0}' provided a method with a name '{1}' and metadata token '{2}', which is not reported among its methods of its declaring type '{3}' + Il provider di tipi '{0}' ha fornito un metodo con nome '{1}' e token metadati '{2}' che non è indicato tra i metodi del tipo dichiarante '{3}' + + + + The type provider '{0}' provided a constructor which is not reported among the constructors of its declaring type '{1}' + Il costruttore fornito dal provider di tipi '{0}' non è riportato tra i costruttori del tipo dichiarante '{1}' + + + + A direct reference to the generated type '{0}' is not permitted. Instead, use a type definition, e.g. 'type TypeAlias = <path>'. This indicates that a type provider adds generated types to your assembly. + Un riferimento diretto al tipo generato '{0}' non è consentito. Utilizzare invece una definizione di tipo, ad esempio 'type TypeAlias = <path>'. Questa definizione indica che un provider di tipi aggiunge tipi generati all'assembly utilizzato. + + + + Expected provided type with path '{0}' but provided type has path '{1}' + Era previsto un tipo fornito con percorso '{0}', mentre il tipo fornito contiene il percorso '{1}' + + + + Unexpected 'null' return value from provided type '{0}' member '{1}' + Valore restituito 'null' imprevisto dal tipo fornito '{0}' membro '{1}' + + + + Unexpected exception from member '{0}' of provided type '{1}' member '{2}': {3} + Eccezione imprevista dal membro '{0}' del tipo fornito '{1}' membro '{2}': {3} + + + + Nested provided types do not take static arguments or generic parameters + I tipi forniti annidati non accettano argomenti statici né parametrici generici + + + + Invalid static argument to provided type. Expected an argument of kind '{0}'. + Argomento statico non valido nel tipo fornito. È previsto un argomento di tipo '{0}'. + + + + An error occured applying the static arguments to a provided type + Errore durante l'applicazione degli argomenti statici a un tipo fornito + + + + Unknown static argument kind '{0}' when resolving a reference to a provided type or method '{1}' + Tipo di argomento statico '{0}' sconosciuto durante la risoluzione di un riferimento a un tipo o a un metodo fornito '{1}' + + + + invalid namespace for provided type + spazio dei nomi non valido per il tipo fornito + + + + invalid full name for provided type + nome completo non valido per il tipo fornito + + + + The type provider returned 'null', which is not a valid return value from '{0}' + Il provider di tipi ha restituito 'null', che non è un valore restituito valido per '{0}' + + + + The type provider constructor has thrown an exception: {0} + Eccezione generata dal costruttore del provider di tipi: {0} + + + + Type provider '{0}' returned null from GetInvokerExpression. + Valore Null restituito da GetInvokerExpression dal provider di tipi '{0}'. + + + + The type provider '{0}' returned an invalid type from 'ApplyStaticArguments'. A type with name '{1}' was expected, but a type with name '{2}' was returned. + Tipo non valido restituito da 'ApplyStaticArguments' dal provider di tipi '{0}'. Era previsto un tipo con nome '{1}', mentre è stato restituito un tipo con nome '{2}'. + + + + The type provider '{0}' returned an invalid method from 'ApplyStaticArgumentsForMethod'. A method with name '{1}' was expected, but a method with name '{2}' was returned. + Il provider di tipi '{0}' ha restituito un metodo non valido da 'ApplyStaticArgumentsForMethod'. Era previsto un metodo con nome '{1}', mentre ne è stato restituito uno con nome '{2}'. + + + + This type test or downcast will erase the provided type '{0}' to the type '{1}' + Questo test di tipo o downcast cancellerà il tipo fornito '{0}' nel tipo '{1}' + + + + This downcast will erase the provided type '{0}' to the type '{1}'. + Questo downcast cancellerà il tipo fornito '{0}' nel tipo '{1}'. + + + + This type test with a provided type '{0}' is not allowed because this provided type will be erased to '{1}' at runtime. + Questo test di tipo con un tipo fornito '{0}' non è consentito perché il tipo fornito verrà cancellato in '{1}' in fase di esecuzione. + + + + Cannot inherit from erased provided type + Non è possibile ereditare dal tipo fornito cancellato + + + + Assembly '{0}' hase TypeProviderAssembly attribute with invalid value '{1}'. The value should be a valid assembly name + Valore '{1}' non valido dell'attributo TypeProviderAssembly nell'assembly '{0}'. Il valore deve essere un nome di assembly valido. + + + + Invalid member name. Members may not have name '.ctor' or '.cctor' + Nome del membro non valido. I membri non possono avere '.ctor' o '.cctor' come nome. + + + + The function or member '{0}' is used in a way that requires further type annotations at its definition to ensure consistency of inferred types. The inferred signature is '{1}'. + La funzione o il membro '{0}' viene usato in un modo che richiede ulteriori annotazioni di tipo in corrispondenza della relativa definizione per garantire la coerenza dei tipi dedotti. La firma dedotta è '{1}'. + + + + The number of type arguments did not match: '{0}' given, '{1}' expected. This may be related to a previously reported error. + Il numero di argomenti tipo non corrisponde: '{0}' specificati, '{1}' previsti. Tale condizione potrebbe essere correlata a un errore segnalato in precedenza. + + + + Cannot override inherited member '{0}' because it is sealed + Non è possibile eseguire l'override del membro ereditato '{0}' perché è sealed + + + + The type provider '{0}' reported an error in the context of provided type '{1}', member '{2}'. The error: {3} + Errore segnalato dal provider di tipi '{0}' nel contesto del tipo fornito '{1}', membro '{2}'. Errore: {3} + + + + An exception occurred when accessing the '{0}' of a provided type: {1} + Eccezione durante l'accesso all'oggetto '{0}' di un tipo fornito: {1} + + + + The '{0}' of a provided type was null or empty. + L'oggetto '{0}' di un tipo fornito è Null o vuoto. + + + + Character '{0}' is not allowed in provided type name '{1}' + Il carattere '{0}' non è consentito nel nome del tipo fornito '{1}' + + + + In queries, '{0}' must use a simple pattern + Nelle query '{0}' deve essere un modello semplice + + + + A custom query operation for '{0}' is required but not specified + Un'operazione di query personalizzata per '{0}' è obbligatoria ma non è stata specificata + + + + Named static arguments must come after all unnamed static arguments + Gli argomenti statici denominati devono seguire tutti gli argomenti statici non denominati + + + + The static parameter '{0}' of the provided type or method '{1}' requires a value. Static parameters to type providers may be optionally specified using named arguments, e.g. '{2}<{3}=...>'. + Il parametro statico '{0}' del tipo o del metodo specificato '{1}' richiede un valore. I parametri statici per i provider di tipi possono essere specificati facoltativamente mediante argomenti denominati, ad esempio '{2}<{3}=...>'. + + + + No static parameter exists with name '{0}' + Non sono presenti parametri statici denominati '{0}' + + + + The static parameter '{0}' has already been given a value + Al parametro statico '{0}' è già stato assegnato un valore + + + + Multiple static parameters exist with name '{0}' + Esistono più parametri statici con il nome '{0}' + + + + A custom operation may not be used in conjunction with a non-value or recursive 'let' binding in another part of this computation expression + Non è possibile usare un'operazione personalizzata unitamente a un non valore o a un binding 'let' ricorsivo in un'altra parte di questa espressione di calcolo + + + + A custom operation may not be used in conjunction with 'use', 'try/with', 'try/finally', 'if/then/else' or 'match' operators within this computation expression + Un'operazione personalizzata non può essere utilizzata insieme agli operatori 'use', 'try/with', 'try/finally', 'if/then/else' o 'match' all'interno dell'espressione di calcolo corrente + + + + The custom operation '{0}' refers to a method which is overloaded. The implementations of custom operations may not be overloaded. + L'operazione personalizzata '{0}' fa riferimento a un metodo sottoposto a overload. Non è possibile eseguire l'overload delle implementazioni delle operazioni personalizzate. + + + + An if/then/else expression may not be used within queries. Consider using either an if/then expression, or use a sequence expression instead. + Un'espressione if/then/else non può essere utilizzata nelle query. Provare a utilizzare un'espressione if/then o un'espressione sequenza. + + + + Invalid argument to 'methodhandleof' during codegen + Argomento non valido in 'methodhandleof' durante codegen + + + + A reference to a provided type was missing a value for the static parameter '{0}'. You may need to recompile one or more referenced assemblies. + In un riferimento a un tipo fornito manca un valore per il parametro statico '{0}'. Potrebbe essere necessario ricompilare uno o più assembly a cui viene fatto riferimento. + + + + A reference to a provided type had an invalid value '{0}' for a static parameter. You may need to recompile one or more referenced assemblies. + Un riferimento a un tipo fornito contiene un valore '{0}' non valido per un parametro statico. Potrebbe essere necessario ricompilare uno o più assembly a cui viene fatto riferimento. + + + + '{0}' is not used correctly. This is a custom operation in this query or computation expression. + '{0}' non è utilizzato correttamente. Si tratta di un'operazione personalizzata nella query o nell'espressione di calcolo corrente. + + + + '{0}' is not used correctly. Usage: {1}. This is a custom operation in this query or computation expression. + '{0}' non è usato correttamente. Utilizzo: {1}. Si tratta di un'operazione personalizzata nella query o nell'espressione di calcolo corrente. + + + + {0} var in collection {1} (outerKey = innerKey). Note that parentheses are required after '{2}' + {0} var nella raccolta {1} (outerKey = innerKey). Si noti che dopo '{2}' le parentesi sono obbligatorie + + + + {0} var in collection {1} (outerKey = innerKey) into group. Note that parentheses are required after '{2}' + {0} var nella raccolta {1} (outerKey = innerKey) nel gruppo. Si noti che dopo '{2}' le parentesi sono obbligatorie + + + + {0} var in collection + {0} var nella raccolta + + + + '{0}' must be followed by a variable name. Usage: {1}. + '{0}' deve essere seguito da un nome di variabile. Utilizzo: {1}. + + + + Incorrect syntax for '{0}'. Usage: {1}. + Sintassi non corretta per '{0}'. Utilizzo: {1}. + + + + '{0}' must come after a 'for' selection clause and be followed by the rest of the query. Syntax: ... {1} ... + '{0}' deve essere preceduto da una clausola di selezione 'for' e seguito dal resto della query. Sintassi: ... {1} ... + + + + '{0}' is used with an incorrect number of arguments. This is a custom operation in this query or computation expression. Expected {1} argument(s), but given {2}. + '{0}' è usato con un numero di argomenti non corretto. Si tratta di un'operazione personalizzata nella query o nell'espressione di calcolo corrente. Argomenti previsti: {1}. Argomenti specificati: {2}. + + + + Expected an expression after this point + Prevista un'espressione dopo questa posizione + + + + Expected a type after this point + Previsto un tipo dopo questa posizione + + + + Unmatched '[<'. Expected closing '>]' + '[<' senza corrispondenza. Previsto '>]' di chiusura + + + + Unexpected end of input in 'match' expression. Expected 'match <expr> with | <pat> -> <expr> | <pat> -> <expr> ...'. + Fine dell'input imprevista nell'espressione 'match'. Previsto 'match <expr> with | <pat> -> <expr> | <pat> -> <expr> ...'. + + + + Unexpected end of input in 'try' expression. Expected 'try <expr> with <rules>' or 'try <expr> finally <expr>'. + Fine dell'input imprevista nell'espressione 'try'. Previsto 'try <expr> with <rules>' o 'try <expr> finally <expr>'. + + + + Unexpected end of input in 'while' expression. Expected 'while <expr> do <expr>'. + Fine dell'input imprevista nell'espressione 'while'. Previsto 'while <expr> do <expr>'. + + + + Unexpected end of input in 'for' expression. Expected 'for <pat> in <expr> do <expr>'. + Fine dell'input imprevista nell'espressione 'for'. Previsto 'for <pat> in <expr> do <expr>'. + + + + Unexpected end of input in 'match' or 'try' expression + Fine dell'input imprevista nell'espressione 'match' o 'try' + + + + Unexpected end of input in 'then' branch of conditional expression. Expected 'if <expr> then <expr>' or 'if <expr> then <expr> else <expr>'. + Fine dell'input imprevista nel ramo 'then' dell'espressione condizionale. È previsto 'if <expr> then <expr>' o 'if <expr> then <expr> else <expr>'. + + + + Unexpected end of input in 'else' branch of conditional expression. Expected 'if <expr> then <expr>' or 'if <expr> then <expr> else <expr>'. + Fine dell'input imprevista nel ramo 'else' dell'espressione condizionale. È previsto 'if <expr> then <expr>' o 'if <expr> then <expr> else <expr>'. + + + + Unexpected end of input in body of lambda expression. Expected 'fun <pat> ... <pat> -> <expr>'. + Fine dell'input imprevista nel corpo dell'espressione lambda. Previsto 'fun <pat> ... <pat> -> <expr>'. + + + + Unexpected end of input in type arguments + Fine dell'input imprevista negli argomenti tipo + + + + Unexpected end of input in type signature + Fine dell'input imprevista nella firma del tipo + + + + Unexpected end of input in type definition + Fine dell'input imprevista nella definizione di tipo + + + + Unexpected end of input in object members + Fine dell'input imprevista nei membri di oggetti + + + + Unexpected end of input in value, function or member definition + Fine dell'input imprevista nella definizione di membro, funzione o valore + + + + Unexpected end of input in expression + Fine dell'input imprevista nell'espressione + + + + Unexpected end of type. Expected a name after this point. + Fine del tipo imprevista. Previsto un nome dopo questa posizione. + + + + Incomplete value or function definition. If this is in an expression, the body of the expression must be indented to the same column as the 'let' keyword. + Definizione di funzione o di valore incompleta. Se presente in un'espressione, il corpo dell'espressione deve essere rientrato alla stessa colonna della parola chiave 'let'. + + + + Incomplete value definition. If this is in an expression, the body of the expression must be indented to the same column as the 'let!' keyword. + Definizione di valore incompleta. Se presente in un'espressione, il corpo dell'espressione deve essere rientrato alla stessa colonna della parola chiave 'let!'. + + + + Incomplete value definition. If this is in an expression, the body of the expression must be indented to the same column as the 'use!' keyword. + Definizione di valore incompleta. Se presente in un'espressione, il corpo dell'espressione deve essere rientrato alla stessa colonna della parola chiave 'use!'. + + + + Incomplete value definition. If this is in an expression, the body of the expression must be indented to the same column as the 'use' keyword. + Definizione di valore incompleta. Se presente in un'espressione, il corpo dell'espressione deve essere rientrato alla stessa colonna della parola chiave 'use'. + + + + Missing 'do' in 'while' expression. Expected 'while <expr> do <expr>'. + 'do' mancante nell'espressione 'while'. Previsto 'while <expr> do <expr>'. + + + + Missing 'do' in 'for' expression. Expected 'for <pat> in <expr> do <expr>'. + 'do' mancante nell'espressione 'for'. Previsto 'for <pat> in <expr> do <expr>'. + + + + Invalid join relation in '{0}'. Expected 'expr <op> expr', where <op> is =, =?, ?= or ?=?. + Relazione join non valida in '{0}'. Previsto 'expr <op> expr', dove <op> è =, =?, ?= o ?=?. + + + + Calls + Chiamate + + + + Invalid number of generic arguments to type '{0}' in provided type. Expected '{1}' arguments, given '{2}'. + Numero di argomenti generici non valido nel tipo '{0}' del tipo fornito. Previsti '{1}' argomenti, specificati '{2}'. + + + + Invalid value '{0}' for unit-of-measure parameter '{1}' + Valore '{0}' non valido per il parametro di unità di misura '{1}' + + + + Invalid value unit-of-measure parameter '{0}' + Valore non valido per il parametro di unità di misura '{0}' + + + + Property '{0}' on provided type '{1}' is neither readable nor writable as it has CanRead=false and CanWrite=false + La proprietà '{0}' nel tipo fornito '{1}' non è né leggibile né scrivibile perché contiene CanRead=false e CanWrite=false + + + + A use of 'into' must be followed by the remainder of the computation + L'uso di 'into' deve essere seguito dal resto del calcolo + + + + The operator '{0}' does not accept the use of 'into' + L'operatore '{0}' non accetta l'utilizzo di 'into' + + + + The definition of the custom operator '{0}' does not use a valid combination of attribute flags + Nella definizione dell'operatore personalizzato '{0}' non viene usata una combinazione valida di flag di attributo + + + + This type definition may not have the 'CLIMutable' attribute. Only record types may have this attribute. + Questa definizione di tipo non può contenere l'attributo 'CLIMutable'. Solo i tipi di record possono contenere tale attributo. + + + + 'member val' definitions are only permitted in types with a primary constructor. Consider adding arguments to your type definition, e.g. 'type X(args) = ...'. + Le definizioni 'member val' sono consentite solo nei tipi con un costruttore primario. Provare ad aggiungere argomenti alla definizione di tipo utilizzata, ad esempio 'type X(args) = ...'. + + + + Property definitions may not be declared mutable. To indicate that this property can be set, use 'member val PropertyName = expr with get,set'. + Le definizioni di proprietà non possono essere dichiarate modificabili. Per indicare che questa proprietà può essere impostata, utilizzare 'member val PropertyName = expr with get,set'. + + + + To indicate that this property can be set, use 'member val PropertyName = expr with get,set'. + Per indicare che questa proprietà può essere impostata, utilizzare 'member val PropertyName = expr with get,set'. + + + + Type '{0}' is illegal because in byref<T>, T cannot contain byref types. + Il tipo '{0}' non è valido perché in byref<T> T non può contenere tipi byref. + + + + F# supports array ranks between 1 and 32. The value {0} is not allowed. + F# supporta dimensioni matrice comprese tra 1 e 32. Il valore {0} non è consentito. + + + + In queries, use the form 'for x in n .. m do ...' for ranging over integers + Nelle query utilizzare il formato 'for x in n .. m do ...' per gestire interi + + + + 'while' expressions may not be used in queries + Le espressioni 'while' non possono essere utilizzate nelle query + + + + 'try/finally' expressions may not be used in queries + Le espressioni 'try/finally' non possono essere utilizzate nelle query + + + + 'use' expressions may not be used in queries + Le espressioni 'use' non possono essere utilizzate nelle query + + + + 'let!', 'use!' and 'do!' expressions may not be used in queries + Le espressioni 'let!', 'use!' e 'do!' non possono essere utilizzate nelle query + + + + 'return' and 'return!' may not be used in queries + 'return' e 'return!' non possono essere usati nelle query + + + + This is not a known query operator. Query operators are identifiers such as 'select', 'where', 'sortBy', 'thenBy', 'groupBy', 'groupValBy', 'join', 'groupJoin', 'sumBy' and 'averageBy', defined using corresponding methods on the 'QueryBuilder' type. + Operatore di query sconosciuto. Gli operatori di query sono identificatori come 'select', 'where', 'sortBy', 'thenBy', 'groupBy', 'groupValBy', 'join', 'groupJoin', 'sumBy' e 'averageBy', definiti mediante i metodi corrispondenti nel tipo 'QueryBuilder'. + + + + 'try/with' expressions may not be used in queries + Le espressioni 'try/with' non possono essere utilizzate nelle query + + + + This 'let' definition may not be used in a query. Only simple value definitions may be used in queries. + La definizione 'let' non può essere utilizzata in una query. Nelle query è possibile utilizzare solo definizioni di valore semplici. + + + + Too many static parameters. Expected at most {0} parameters, but got {1} unnamed and {2} named parameters. + Troppi parametri statici. Previsti al massimo {0} parametri, mentre sono stati ottenuti {1} parametri senza nome e {2} parametri denominati. + + + + Invalid provided literal value '{0}' + Valore letterale fornito '{0}' non valido + + + + The 'anycpu32bitpreferred' platform can only be used with EXE targets. You must use 'anycpu' instead. + La piattaforma 'anycpu32bitpreferred' può essere utilizzata solo con destinazioni EXE. Utilizzare invece 'anycpu'. + + + + This member, function or value declaration may not be declared 'inline' + Questa dichiarazione di valore, funzione o membro non può essere dichiarata 'inline' + + + + The provider '{0}' returned a non-generated type '{1}' in the context of a set of generated types. Consider adjusting the type provider to only return generated types. + Il provider '{0}' ha restituito un tipo non generato '{1}' nel contesto di un set di tipi generati. Provare a modificare il provider di tipi in modo che restituisca solo tipi generati. + + + + Arguments to query operators may require parentheses, e.g. 'where (x > y)' or 'groupBy (x.Length / 10)' + Gli argomenti negli operatori di query possono richiedere le parentesi, ad esempio 'where (x > y)' o 'groupBy (x.Length / 10)' + + + + A quotation may not involve an assignment to or taking the address of a captured local variable + Una quotation non può comportare un'assegnazione a una variabile locale acquisita o l'utilizzo dell'indirizzo di una variabile locale acquisita + + + + + 1 overload + + 1 overload + + + + + {0} overloads + + {0} overload + + + + Erased to + Cancellato in + + + + Unexpected token '{0}' or incomplete expression + Token imprevisto '{0}' o espressione incompleta + + + + Cannot find code target for this attribute, possibly because the code after the attribute is incomplete. + La destinazione del codice per questo attributo non è stata trovata, probabilmente perché il codice dopo l'attributo è incompleto. + + + + Type name cannot be empty. + Il nome del tipo non può essere vuoto. + + + + Problem reading assembly '{0}': {1} + Problema durante la lettura dell'assembly '{0}': {1} + + + + Invalid provided field. Provided fields of erased provided types must be literals. + Campo specificato non valido. I campi specificati dei tipi forniti cancellati devono essere valori letterali. + + + + (loading description...) + (caricamento descrizione...) + + + + (description unavailable...) + (descrizione non disponibile...) + + + + A type variable has been constrained by multiple different class types. A type variable may only have one class constraint. + Una variabile di tipo è stata vincolata da più tipi di classe differenti. Una variabile di tipo può disporre di un solo vincolo di classe. + + + + 'match' expressions may not be used in queries + Le espressioni 'match' non possono essere utilizzate nelle query + + + + Infix operator member '{0}' has {1} initial argument(s). Expected a tuple of 3 arguments + Il membro dell'operatore infisso '{0}' ha {1} argomento/i iniziale/i. Prevista una tupla di 3 argomenti + + + + The operator '{0}' cannot be resolved. Consider opening the module 'Microsoft.FSharp.Linq.NullableOperators'. + Non è possibile risolvere l'operatore '{0}'. Provare ad aprire il modulo 'Microsoft.FSharp.Linq.NullableOperators'. + + + + '{0}' must be followed by 'in'. Usage: {1}. + '{0}' deve essere seguito da 'in'. Utilizzo: {1}. + + + + Neither 'member val' nor 'override val' definitions are permitted in object expressions. + Le definizioni 'member val' e 'override val' non sono consentite nelle espressioni dell'oggetto. + + + + Copy-and-update record expressions must include at least one field. + Le espressioni del record Copia e aggiorna devono includere almeno un campo. + + + + '_' cannot be used as field name + Non è possibile usare '_' come nome di campo + + + + The provided types generated by this use of a type provider may not be used from other F# assemblies and should be marked internal or private. Consider using 'type internal TypeName = ...' or 'type private TypeName = ...'. + I tipi forniti generati da questo utilizzo di un provider di tipi potrebbero non essere utilizzati da altri assembly F# e devono essere contrassegnati come interni o privati. Provare a utilizzare 'type internal TypeName = ...' o 'type private TypeName = ...'. + + + + A property's getter and setter must have the same type. Property '{0}' has getter of type '{1}' but setter of type '{2}'. + Il getter e il setter di una proprietà devono essere dello stesso tipo. Il getter della proprietà '{0}' è di tipo '{1}', mentre il setter è di tipo '{2}'. + + + + Array method '{0}' is supplied by the runtime and cannot be directly used in code. For operations with array elements consider using family of GetArray/SetArray functions from LanguagePrimitives.IntrinsicFunctions module. + Il metodo di matrice '{0}' è fornito dal runtime e non può essere utilizzato direttamente nel codice. Per operazioni con elementi di matrice, considerare l'impiego della famiglia di funzioni GetArray/SetArray dal modulo LanguagePrimitives.IntrinsicFunctions. + + + + The union case '{0}' does not have a field named '{1}'. + Il case di unione/eccezione '{0}' non contiene il campo denominato '{1}'. + + + + Union case/exception field '{0}' cannot be used more than once. + Il campo case di unione/eccezione '{0}' non può essere utilizzato più di una volta. + + + + Named field '{0}' is used more than once. + Il campo denominato '{0}' viene utilizzato più di una volta. + + + + Named field '{0}' conflicts with autogenerated name for anonymous field. + Il campo denominato '{0}' è in conflitto con il nome generato automaticamente per il campo anonimo. + + + + This literal expression or attribute argument results in an arithmetic overflow. + L'espressione letterale o l'argomento dell'attributo restituisce un overflow aritmetico. + + + + This is not valid literal expression. The [<Literal>] attribute will be ignored. + Espressione letterale non valida. L'attributo [<Literal>] verrà ignorato. + + + + System.Runtime.InteropServices assembly is required to use UnknownWrapper\DispatchWrapper classes. + L'assembly System.Runtime.InteropServices è necessario per usare le classi UnknownWrapper\DispatchWrapper. + + + + The mutable local '{0}' is implicitly allocated as a reference cell because it has been captured by a closure. This warning is for informational purposes only to indicate where implicit allocations are performed. + Il valore locale modificabile '{0}' è allocato implicitamente come cella di riferimento perché è stato acquisito da una chiusura. Questo avviso viene visualizzato a solo scopo informativo per indicare il punto in cui vengono eseguite allocazioni implicite. + + + + A type provider implemented GetStaticParametersForMethod, but ApplyStaticArgumentsForMethod was not implemented or invalid + Un provider di tipi ha implementato GetStaticParametersForMethod, ma ApplyStaticArgumentsForMethod non è stato implementato oppure non è valido + + + + An error occured applying the static arguments to a provided method + Si è verificato un errore durante l'applicazione degli argomenti statici a un metodo fornito + + + + Unexpected character '{0}' in preprocessor expression + Il carattere '{0}' non è previsto nell'espressione per il preprocessore + + + + Unexpected token '{0}' in preprocessor expression + Il token '{0}' non è previsto nell'espressione per il preprocessore + + + + Incomplete preprocessor expression + L'espressione per il preprocessore non è valida + + + + Missing token '{0}' in preprocessor expression + Nell'espressione per il preprocessore manca il token '{0}' + + + + An error occurred while reading the F# metadata node at position {0} in table '{1}' of assembly '{2}'. The node had no matching declaration. Please report this warning. You may need to recompile the F# assembly you are using. + Si è verificato un errore durante la lettura del nodo dei metadati F# alla posizione {0} della tabella '{1}' dell'assembly '{2}'. Il nodo non include una dichiarazione corrispondente. Segnalare la visualizzazione di questo avviso. Potrebbe essere necessario ricompilare l'assembly F# in uso. + + + + Type inference caused the type variable {0} to escape its scope. Consider adding an explicit type parameter declaration or adjusting your code to be less generic. + A seguito dell'inferenza del tipo, la variabile di tipo {0} non ha rispettato il proprio ambito. Provare ad aggiungere una dichiarazione di parametro di tipo esplicita oppure a modificare il codice in modo che sia meno generico. + + + + Type inference caused an inference type variable to escape its scope. Consider adding type annotations to make your code less generic. + A seguito dell'inferenza del tipo, una variabile di inferenza del tipo non ha rispettato il proprio ambito. Per rendere il codice meno generico, provare ad aggiungere annotazioni di tipo. + + + + Redundant arguments are being ignored in function '{0}'. Expected {1} but got {2} arguments. + Gli argomenti ridondanti verranno ignorati nella funzione '{0}'. Erano previsti {1} argomenti, ma ne sono stati ottenuti {2}. + + + + Lowercase literal '{0}' is being shadowed by a new pattern with the same name. Only uppercase and module-prefixed literals can be used as named patterns. + Il valore letterale '{0}' verrà nascosto da un nuovo criterio con lo stesso nome. Come criteri denominati è possibile usare solo valori letterali in maiuscolo e che includono un modulo come prefisso. + + + + This literal pattern does not take arguments + Questo criterio di valore letterale non accetta argomenti + + + + Constructors are not permitted as extension members - they must be defined as part of the original definition of the type + I costruttori non sono consentiti come membri di estensione. Devono essere definiti come parte della definizione originale del tipo + + + + Invalid response file '{0}' ( '{1}' ) + File di risposta '{0}' ('{1}') non valido + + + + Response file '{0}' not found in '{1}' + Il file di risposta '{0}' non è stato trovato in '{1}' + + + + Response file name '{0}' is empty, contains invalid characters, has a drive specification without an absolute path, or is too long + Il nome del file di risposta '{0}' è vuoto, contiene caratteri non validi, include una specifica di unità senza percorso assoluto oppure è troppo lungo + + + + Cannot find FSharp.Core.dll in compiler's directory + Il file FSharp.Core.dll non è stato trovato nella directory del compilatore + + + + One tuple type is a struct tuple, the other is a reference tuple + Un tipo di tupla è una tupla di struttura, mentre l'altra è una tupla di riferimento + + + + This provided method requires static parameters + Con il metodo specificato sono richiesti parametri statici + + + + The conversion from {0} to {1} is a compile-time safe upcast, not a downcast. Consider using 'upcast' instead of 'downcast'. + La conversione da {0} a {1} è un'espressione upcast sicura della fase di compilazione e non di downcast. Provare a usare 'upcast' invece di 'downcast'. + + + + The conversion from {0} to {1} is a compile-time safe upcast, not a downcast. Consider using the :> (upcast) operator instead of the :?> (downcast) operator. + La conversione da {0} a {1} è un'espressione upcast sicura della fase di compilazione e non di downcast. Provare a usare l'operatore :> (upcast) invece di quello :?> (downcast). + + + + The 'rec' on this module is implied by an outer 'rec' declaration and is being ignored + La dichiarazione 'rec' in questo modulo è specificata implicitamente da una dichiarazione 'rec' esterna e verrà ignorata + + + + In a recursive declaration group, 'open' declarations must come first in each module + In un gruppo di dichiarazioni ricorsive le dichiarazioni 'open' devono essere inserite per prime in ogni modulo + + + + In a recursive declaration group, module abbreviations must come after all 'open' declarations and before other declarations + In un gruppo di dichiarazioni ricorsive le abbreviazioni dei moduli devono essere inserite dopo tutte le dichiarazioni 'open' e prima di altre dichiarazioni + + + + This declaration is not supported in recursive declaration groups + Questa dichiarazione non è supportata nei gruppi di dichiarazioni ricorsive + + + + Invalid use of 'rec' keyword + Uso non valido della parola chiave 'rec' + + + + If a union type has more than one case and is a struct, then all fields within the union type must be given unique names. + Se un tipo di unione contiene più di un case ed è una struttura, è necessario assegnare nomi univoci a tutti i campi all'interno del tipo di unione. + + + + The CallerMemberNameAttribute applied to parameter '{0}' will have no effect. It is overridden by the CallerFilePathAttribute. + CallerMemberNameAttribute applicato al parametro '{0}' non avrà alcun effetto. CallerFilePathAttribute ne eseguirà l'override. + + + + Invalid use of 'fixed'. 'fixed' may only be used in a declaration of the form 'use x = fixed expr' where the expression is an array, the address of a field, the address of an array element or a string' + Uso non valido di 'fixed'. 'fixed' può essere usato solo in una dichiarazione in formato 'use x = fixed expr', in cui l'espressione è una matrice, l'indirizzo di un campo, l'indirizzo di un elemento di matrice oppure una stringa + + + + Could not find method System.Runtime.CompilerServices.OffsetToStringData in references when building 'fixed' expression. + Il metodo System.Runtime.CompilerServices.OffsetToStringData non è stato trovato nei riferimenti durante la compilazione dell'espressione 'fixed'. + + + + {0} is an active pattern and cannot be treated as a discriminated union case with named fields. + {0} è un criterio attivo e non può essere considerato come un case di unione discriminato con campi denominati. + + + + The default value does not have the same type as the argument. The DefaultParameterValue attribute and any Optional attribute will be ignored. Note: 'null' needs to be annotated with the correct type, e.g. 'DefaultParameterValue(null:obj)'. + Il tipo del valore predefinito non è uguale a quello dell'argomento. L'attributo DefaultParameterValue e l'eventuale attributo Optional verranno ignorati. Nota: 'null' deve essere annotato con il tipo corretto, ad esempio 'DefaultParameterValue(null:obj)'. + + + + The system type '{0}' was required but no referenced system DLL contained this type + È richiesto il tipo di sistema '{0}', ma nessuna DLL di sistema di riferimento contiene questo tipo + + + + The member '{0}' matches multiple overloads of the same method.\nPlease restrict it to one of the following:{1}. + Il membro '{0}' corrisponde a più overload dello stesso metodo.\nLimitarlo a uno dei seguenti:{1}. + + + + Method or object constructor '{0}' is not static + Il costruttore di oggetto o metodo '{0}' non è statico + + + + Unexpected symbol '=' in expression. Did you intend to use 'for x in y .. z do' instead? + Simbolo '=' imprevisto nell'espressione. Si intendeva usare 'for x in y .. z do'? + + + + Indicates a method that either has no implementation in the type in which it is declared or that is virtual and has a default implementation. + Indica un metodo per il quale non esiste alcuna implementazione nel tipo in cui viene dichiarato oppure che è virtuale e per il quale esiste un'implementazione predefinita. + + + + Used in mutually recursive bindings, in property declarations, and with multiple constraints on generic parameters. + Usata in binding ricorsivi reciproci, dichiarazioni di proprietà e con più vincoli su parametri generici. + + + + Used to give the current class object an object name. Also used to give a name to a whole pattern within a pattern match. + Usata per assegnare un nome di oggetto all'oggetto classe corrente. Usata inoltre per assegnare un nome a un intero criterio nell'ambito dei criteri di ricerca. + + + + Used to verify code during debugging. + Usata per verificare il codice durante il debug. + + + + Used as the name of the base class object. + Usata come nome dell'oggetto classe di base. + + + + In verbose syntax, indicates the start of a code block. + Nella sintassi dettagliata indica l'inizio di un blocco di codice. + + + + In verbose syntax, indicates the start of a class definition. + Nella sintassi dettagliata indica l'inizio di una definizione di classe. + + + + Indicates an implementation of an abstract method; used together with an abstract method declaration to create a virtual method. + Indica un'implementazione di un metodo astratto. Usata insieme a una dichiarazione di metodo astratto per creare un metodo virtuale. + + + + Used to declare a delegate. + Usata per dichiarare un delegato. + + + + Used in looping constructs or to execute imperative code. + Usata in costrutti di ciclo oppure per eseguire codice imperativo. + + + + In verbose syntax, indicates the end of a block of code in a looping expression. + Nella sintassi dettagliata indica la fine di un blocco di codice in un'espressione di ciclo. + + + + Used to convert to a type that is lower in the inheritance chain. + Usata per eseguire la conversione in un tipo che occupa una posizione più bassa nella catena di ereditarietà. + + + + In a for expression, used when counting in reverse. + Usata in un'espressione for per il conteggio in ordine inverso. + + + + Used in conditional branching. A short form of else if. + Usata nella diramazione condizionale. Forma abbreviata di else if. + + + + Used in conditional branching. + Usata nella diramazione condizionale. + + + + In type definitions and type extensions, indicates the end of a section of member definitions. In verbose syntax, used to specify the end of a code block that starts with the begin keyword. + Nelle definizioni dei tipi e nelle estensioni dei tipi indica la fine di una sezione di definizioni dei membri. Nella sintassi dettagliata viene usata per specificare la fine di un blocco di codice che inizia con la parola chiave begin. + + + + Used to declare an exception type. + Usata per dichiarare un tipo di eccezione. + + + + Indicates that a declared program element is defined in another binary or assembly. + Indica che un elemento dichiarato del programma è definito in un altro assembly o file binario. + + + + Used as a Boolean literal. + Usata come valore letterale booleano. + + + + Used together with try to introduce a block of code that executes regardless of whether an exception occurs. + Usata insieme a try per introdurre un blocco di codice che viene eseguito indipendentemente dal fatto che si verifichi un'eccezione. + + + + Used in looping constructs. + Usata in costrutti di ciclo. + + + + Used in lambda expressions, also known as anonymous functions. + Usata nelle espressioni lambda, note anche come funzioni anonime. + + + + Used as a shorter alternative to the fun keyword and a match expression in a lambda expression that has pattern matching on a single argument. + Usata come alternativa più breve alla parola chiave fun e a un'espressione match in un'espressione lambda con criteri di ricerca su un singolo argomento. + + + + Used to reference the top-level .NET namespace. + Usata per fare riferimento allo spazio dei nomi .NET di primo livello. + + + + Used in conditional branching constructs. + Usata nei costrutti di diramazione condizionale. + + + + Used for sequence expressions and, in verbose syntax, to separate expressions from bindings. + Usata per le espressioni di sequenza e, nella sintassi dettagliata, per separare le espressioni dai binding. + + + + Used to specify a base class or base interface. + Usata per specificare una classe di base o un'interfaccia di base. + + + + Used to indicate a function that should be integrated directly into the caller's code. + Usata per indicare una funzione che deve essere integrata direttamente nel codice del chiamante. + + + + Used to declare and implement interfaces. + Usata per dichiarare e implementare interfacce. + + + + Used to specify that a member is visible inside an assembly but not outside it. + Usata per specificare che un membro è visibile all'interno ma non all'esterno di un assembly. + + + + Used to specify a computation that is to be performed only when a result is needed. + Usata per specificare un calcolo che deve essere eseguito solo quando è necessario un risultato. + + + + Used to associate, or bind, a name to a value or function. + Usata per associare o eseguire il binding di un nome a un valore o a una funzione. + + + + Used in computation expressions to bind a name to the result of another computation expression. + Usata nei flussi di lavoro asincroni per eseguire il binding di un nome al risultato di un calcolo asincrono, o, in altre espressioni di calcolo, usata per eseguire il binding di un nome a un risultato, che corrisponde al tipo di calcolo. + + + + Used to branch by comparing a value to a pattern. + Usata per creare un ramo confrontando un valore con un criterio. + + + + Used to declare a property or method in an object type. + Usata per dichiarare una proprietà o un metodo in un tipo di oggetto. + + + + Used to associate a name with a group of related types, values, and functions, to logically separate it from other code. + Usata per associare un nome a un gruppo di valori, funzioni e tipi correlati allo scopo di separare il gruppo in modo logico da altro codice. + + + + Used to declare a variable, that is, a value that can be changed. + Usata per dichiarare una variabile, ovvero un valore che può essere modificato. + + + + Used to associate a name with a group of related types and modules, to logically separate it from other code. + Usata per associare un nome a un gruppo di moduli e tipi correlati allo scopo di separare il gruppo in modo logico da altro codice. + + + + Used to declare, define, or invoke a constructor that creates or that can create an object. Also used in generic parameter constraints to indicate that a type must have a certain constructor. + Usata per dichiarare, definire o richiamare un costruttore che crea o che è in grado di creare un oggetto. Usata anche nei vincoli di parametri generici per indicare che un tipo deve contenere un determinato costruttore. + + + + Not actually a keyword. However, not struct in combination is used as a generic parameter constraint. + Non è una vera e propria parola chiave. In combinazione con not struct viene tuttavia usata come vincolo di parametro generico. + + + + Indicates the absence of an object. Also used in generic parameter constraints. + Indica l'assenza di un oggetto. Usata anche nei vincoli di parametri generici. + + + + Used in discriminated unions to indicate the type of categories of values, and in delegate and exception declarations. + Usata nelle unioni discriminate per indicare il tipo di categorie di valori, nonché nelle dichiarazioni di delegati ed eccezioni. + + + + Used to make the contents of a namespace or module available without qualification. + Usata per rendere disponibile il contenuto di uno spazio dei nomi o di un modulo senza qualificazione. + + + + Used with Boolean conditions as a Boolean or operator. Equivalent to ||. Also used in member constraints. + Usata con le condizioni booleane come operatore or booleano. Equivalente a ||. Usata anche nei vincoli di membro. + + + + Used to implement a version of an abstract or virtual method that differs from the base version. + Usata per implementare una versione di un metodo astratto o virtuale diversa dalla versione di base. + + + + Restricts access to a member to code in the same type or module. + Limita l'accesso al codice a un membro nello stesso tipo o modulo. + + + + Allows access to a member from outside the type. + Consente l'accesso a un membro dall'esterno del tipo. + + + + Used to indicate that a function is recursive. + Usata per indicare che una funzione è ricorsiva. + + + + Used to provide a value for the result of the containing computation expression. + Usata per indicare un valore da fornire come risultato di un'espressione di calcolo. + + + + Used to provide a value for the result of the containing computation expression, where that value itself comes from the result another computation expression. + Usata per indicare un'espressione di calcolo che, una volta valutata, fornisce il risultato dell'espressione di calcolo contenitore. + + + + Used in query expressions to specify what fields or columns to extract. Note that this is a contextual keyword, which means that it is not actually a reserved word and it only acts like a keyword in appropriate context. + Usata nelle espressioni di query per specificare i campi o le colonne da estrarre. Si noti che questa è una parola chiave contestuale, pertanto non è in realtà una parola riservata e funge solo da parola chiave nel contesto appropriato. + + + + Used to indicate a method or property that can be called without an instance of a type, or a value member that is shared among all instances of a type. + Usata per indicare un metodo o una proprietà che è possibile chiamare senza un'istanza di un tipo oppure un membro valore condiviso tra tutte le istanze di un tipo. + + + + Used to declare a structure type. Also used in generic parameter constraints. Used for OCaml compatibility in module definitions. + Usata per dichiarare un tipo di struttura. Usata anche nei vincoli di parametri generici. Usata per garantire la compatibilità con OCaml nelle definizioni di moduli. + + + + Used in conditional expressions. Also used to perform side effects after object construction. + Usata nelle espressioni condizionali. Usata anche per ottenere effetti collaterali dopo la costruzione di oggetti. + + + + Used in for loops to indicate a range. + Usata nei cicli for per indicare un intervallo. + + + + Used to introduce a block of code that might generate an exception. Used together with with or finally. + Usata per introdurre un blocco di codice che potrebbe generare un'eccezione. Usata insieme a with o finally. + + + + Used to declare a class, record, structure, discriminated union, enumeration type, unit of measure, or type abbreviation. + Usata per dichiarare una classe, un record, una struttura, un'unione discriminata, un tipo di enumerazione, un'unità di misura o un'abbreviazione di un tipo. + + + + Used to convert to a type that is higher in the inheritance chain. + Usata per eseguire la conversione in un tipo che occupa una posizione più alta nella catena di ereditarietà. + + + + Used instead of let for values that implement IDisposable" + Usata al posto di let per valori con i quali è necessario chiamare Dispose per liberare risorse. + + + + Used instead of let! in computation expressions for computation expression results that implement IDisposable. + Usata al posto di let! nei flussi di lavoro asincroni e altre espressioni di calcolo dei valori con i quali è necessario chiamare Dispose per liberare risorse. + + + + Used in a signature to indicate a value, or in a type to declare a member, in limited situations. + Usata in una firma per indicare un valore oppure in un tipo per dichiarare un membro, in situazioni limitate. + + + + Indicates the .NET void type. Used when interoperating with other .NET languages. + Indica il tipo void .NET. Usata in caso di interoperatività con altri linguaggi .NET. + + + + Used for Boolean conditions (when guards) on pattern matches and to introduce a constraint clause for a generic type parameter. + Usata per le condizioni booleane (when guards) nei criteri di ricerca e per introdurre una clausola di vincolo per un parametro di tipo generico. + + + + Introduces a looping construct. + Introduce un costrutto di ciclo. + + + + Used together with the match keyword in pattern matching expressions. Also used in object expressions, record copying expressions, and type extensions to introduce member definitions, and to introduce exception handlers. + Usata insieme alla parola chiave match nelle espressioni di criteri di ricerca. Usata anche in espressioni di oggetti, espressioni di copia di record e in estensioni dei tipi per introdurre definizioni di membro, nonché per introdurre gestori di eccezioni. + + + + Used in a sequence expression to produce a value for a sequence. + Usata in un'espressione di sequenza per produrre un valore per una sequenza. + + + + Used in a computation expression to append the result of a given computation expression to a collection of results for the containing computation expression. + Usata in un'espressione di calcolo per aggiungere il risultato di un'espressione di calcolo specificata a una raccolta di risultati per l'espressione di calcolo contenitore. + + + + In function types, delimits arguments and return values. Yields an expression (in sequence expressions); equivalent to the yield keyword. Used in match expressions + Nei tipi di funzione delimita argomenti e valori restituiti. Produce un'espressione (nelle espressioni di sequenza); equivalente alla parola chiave yield. Usata nelle espressioni match + + + + Assigns a value to a variable. + Assegna un valore a una variabile. + + + + Converts a type to type that is higher in the hierarchy. + Converte un tipo nel tipo che occupa una posizione più alta nella gerarchia. + + + + Converts a type to a type that is lower in the hierarchy. + Converte un tipo in un tipo che occupa una posizione più bassa nella gerarchia. + + + + Delimits a typed code quotation. + Delimita una quotation di codice tipizzato. + + + + Delimits a untyped code quotation. + Delimita una quotation di codice non tipizzato. + + + + {0} '{1}' not found in assembly '{2}'. A possible cause may be a version incompatibility. You may need to explicitly reference the correct version of this assembly to allow all referenced components to use the correct version. + L'elemento {0} '{1}' non è stato trovato nell'assembly '{2}'. Il problema potrebbe essere causato da versioni incompatibili. Per consentire a tutti i componenti di riferimento di usare la versione corretta, potrebbe essere necessario fare riferimento alla versione corretta. + + + + {0} '{1}' not found in type '{2}' from assembly '{3}'. A possible cause may be a version incompatibility. You may need to explicitly reference the correct version of this assembly to allow all referenced components to use the correct version. + L'elemento {0} '{1}' non è stato trovato nel tipo '{2}' dell'assembly '{3}'. Il problema potrebbe essere causato da versioni incompatibili. Per consentire a tutti i componenti di riferimento di usare la versione corretta, potrebbe essere necessario fare riferimento alla versione corretta. + + + + is + è + + + + This value is not a function and cannot be applied. + Questo valore non è una funzione e non può essere applicato. + + + + This value is not a function and cannot be applied. Did you intend to access the indexer via {0}.[index] instead? + Questo valore non è una funzione e non può essere applicato. Si intendeva accedere all'indicizzatore tramite la sintassi {0}.[indice]? + + + + This expression is not a function and cannot be applied. Did you intend to access the indexer via expr.[index] instead? + Questa espressione non è una funzione e non può essere applicata. Si intendeva accedere all'indicizzatore tramite la sintassi espressione.[indice]? + + + + This value is not a function and cannot be applied. Did you forget to terminate a declaration? + Questo valore non è una funzione e non può essere applicato. Potrebbe essere presente una dichiarazione non terminata. + + + + The argument names in the signature '{0}' and implementation '{1}' do not match. The argument name from the signature file will be used. This may cause problems when debugging or profiling. + I nomi degli argomenti nella firma '{0}' e nell'implementazione '{1}' non corrispondono. Verrà usato il nome dell'argomento del file di firma. Questa situazione potrebbe causare problemi durante il debug o la profilatura. + + + + An error occurred while reading the F# metadata of assembly '{0}'. A reserved construct was utilized. You may need to upgrade your F# compiler or use an earlier version of the assembly that doesn't make use of a specific construct. + Si è verificato un errore durante la lettura dei metadati F# dell'assembly '{0}'. È stato utilizzato un costrutto riservato. Potrebbe essere necessario aggiornare il compilatore F# o usare una versione precedente dell'assembly che non usa un costrutto specifico. + + + + This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. + Questo metodo o questa proprietà non è in genere usato dal codice F#. Per la decostruzione usare invece un criterio di tupla esplicito. + + + + This expression returns a value of type '{0}' but is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to use the expression as a value in the sequence then use an explicit 'yield'. + Questa espressione restituisce un valore di tipo '{0}' ma viene rimossa in modo implicito. Provare a usare 'let' per eseguire il binding del risultato a un nome, ad esempio 'let risultato = espressione'. Se si intende usare l'espressione come valore nella sequenza, usare l'operando 'yield' esplicito. + + + + This expression returns a value of type '{0}' but is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to use the expression as a value in the sequence then use an explicit 'yield!'. + Questa espressione restituisce un valore di tipo '{0}' ma viene rimossa in modo implicito. Provare a usare 'let' per eseguire il binding del risultato a un nome, ad esempio 'let risultato = espressione'. Se si intende usare l'espressione come valore nella sequenza, usare l'operando 'yield!' esplicito. + + + + Used in computation expressions to pattern match directly over the result of another computation expression. + Usata nelle espressioni di calcolo per includere direttamente nei criteri di ricerca il risultato di un'altra espressione di calcolo. + + + + The file '{0}' changed on disk unexpectedly, please reload. + Il file '{0}' è stato modificato su disco in modo imprevisto. Ricaricare. + + + + The byref pointer is readonly, so this write is not permitted. + Il puntatore byref è di sola lettura, di conseguenza questa operazione di scrittura non è consentita. + + + + A value must be mutable in order to mutate the contents or take the address of a value type, e.g. 'let mutable x = ...' + Un valore deve essere modificabile per poter modificare i contenuti oppure utilizzare l'indirizzo di un tipo di valore, ad esempio 'let mutable x = ...' + + + + A ReadOnly attribute has been applied to a struct type with a mutable field. + Un attributo ReadOnly è stato applicato a un tipo struct con campo modificabile. + + + + A byref pointer returned by a function or method is implicitly dereferenced as of F# 4.5. To acquire the return value as a pointer, use the address-of operator, e.g. '&f(x)' or '&obj.Method(arg1, arg2)'. + Un puntatore byref restituito da una funzione o da un metodo è deferenziato in modo implicito a partire da F# 4.5. Per acquisire il valore restituito come puntatore, usare l'operatore address-of, ad esempio '&f(x)' o '&obj.Method(arg1, arg2)'. + + + + A type annotated with IsByRefLike must also be a struct. Consider adding the [<Struct>] attribute to the type. + Un tipo annotato con IsByRefLike deve essere anche uno struct. Provare ad aggiungere l'attributo [<Struct>] al tipo. + + + + The address of the variable '{0}' or a related expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + In questo punto non è possibile usare l'indirizzo della variabile '{0}' o un'espressione correlata. Questo serve ad assicurare che l'indirizzo del valore locale non ignori il relativo ambito. + + + + This value can't be assigned because the target '{0}' may refer to non-stack-local memory, while the expression being assigned is assessed to potentially refer to stack-local memory. This is to help prevent pointers to stack-bound memory escaping their scope. + Non è possibile assegnare questo valore perché l'elemento '{0}' di destinazione può fare riferimento alla memoria locale non stack, mentre l'espressione da assegnare viene valutata in modo da fare potenzialmente riferimento alla memoria locale stack. Tale comportamento consente di evitare puntatori a memoria associata allo stack che ignorano il relativo ambito. + + + + A value defined in a module must be mutable in order to take its address, e.g. 'let mutable x = ...' + Un valore definito in un modulo deve essere modificabile per poterne accettare l'indirizzo, ad esempio 'let mutable x = ...' + + + + A type annotated with IsReadOnly must also be a struct. Consider adding the [<Struct>] attribute to the type. + Un tipo annotato con IsReadOnly deve essere anche uno struct. Provare ad aggiungere l'attributo [<Struct>] al tipo. + + + + Struct members cannot return the address of fields of the struct by reference + I membri struct non possono restituire l'indirizzo di campi dello struct per riferimento + + + + The function or method call cannot be used at this point, because one argument that is a byref of a non-stack-local Span or IsByRefLike type is used with another argument that is a stack-local Span or IsByRefLike type. This is to ensure the address of the local value does not escape its scope. + In questo punto non è possibile usare la chiamata al metodo o alla funzione perché un argomento che è un byref di un tipo Span o IsByRefLike locale non stack viene usato con un altro argomento che è un tipo Span o IsByRefLike locale stack. Questo serve ad assicurare che l'indirizzo del valore locale non ignori il relativo ambito. + + + + The address of a value returned from the expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + In questo punto non è possibile usare l'indirizzo di un valore restituito dall'espressione. Questo serve ad assicurare che l'indirizzo del valore locale non ignori il relativo ambito. + + + + The Span or IsByRefLike variable '{0}' cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + In questo punto non è possibile usare la variabile '{0}' di Span o IsByRefLike. Questo serve ad assicurare che l'indirizzo del valore locale non ignori il relativo ambito. + + + + A Span or IsByRefLike value returned from the expression cannot be used at ths point. This is to ensure the address of the local value does not escape its scope. + In questo punto non è possibile usare un valore Span o IsByRefLike restituito dall'espressione. Questo serve ad assicurare che l'indirizzo del valore locale non ignori il relativo ambito. + + + + Cannot take the address of the value returned from the expression. Assign the returned value to a let-bound value before taking the address. + Non è possibile accettare l'indirizzo del valore restituito dall'espressione. Assegnare il valore restituito a un valore associato a let prima di accettare l'indirizzo. + + + + The Span or IsByRefLike expression cannot be returned from this function or method, because it is composed using elements that may escape their scope. + The Span or IsByRefLike expression cannot be returned from this function or method, because it is composed using elements that may escape their scope. + + + + This type does not inherit Attribute, it will not work correctly with other .NET languages. + This type does not inherit Attribute, it will not work correctly with other .NET languages. + + + + The exception '{0}' does not have a field named '{1}'. + The exception '{0}' does not have a field named '{1}'. + + + + The constructor does not have a field named '{0}'. + The constructor does not have a field named '{0}'. + + + + Active patterns do not have fields. This syntax is invalid. + Active patterns do not have fields. This syntax is invalid. + + + + + \ No newline at end of file diff --git a/src/fsharp/xlf/FSComp.txt.ja.xlf b/src/fsharp/xlf/FSComp.txt.ja.xlf new file mode 100644 index 00000000000..168cd7d6efb --- /dev/null +++ b/src/fsharp/xlf/FSComp.txt.ja.xlf @@ -0,0 +1,7087 @@ + + + + + + The namespace '{0}' is not defined. + 名前空間 '{0}' が定義されていません。 + + + + The namespace or module '{0}' is not defined. + 名前空間またはモジュール '{0}' が定義されていません。 + + + + The field, constructor or member '{0}' is not defined. + フィールド、コンストラクター、またはメンバー '{0}' が定義されていません。 + + + + The value, constructor, namespace or type '{0}' is not defined. + 値、コンストラクター、名前空間、または型 '{0}' が定義されていません。 + + + + The value or constructor '{0}' is not defined. + 値またはコンストラクター '{0}' が定義されていません。 + + + + The value, namespace, type or module '{0}' is not defined. + 値、名前空間、型、またはモジュール '{0}' が定義されていません。 + + + + The constructor, module or namespace '{0}' is not defined. + コンストラクター、モジュール、または名前空間 '{0}' が定義されていません。 + + + + The type '{0}' is not defined. + 型 '{0}' が定義されていません。 + + + + The type '{0}' is not defined in '{1}'. + {1}' で型 '{0}' が定義されていません。 + + + + The record label or namespace '{0}' is not defined. + レコード ラベルまたは名前空間 '{0}' が定義されていません。 + + + + The record label '{0}' is not defined. + レコード ラベル '{0}' が定義されていません。 + + + + Maybe you want one of the following: + 次のいずれかの可能性はありませんか: + + + + The type parameter {0} is not defined. + 型パラメーター {0} が定義されていません。 + + + + The pattern discriminator '{0}' is not defined. + パターン識別子 '{0}' が定義されていません。 + + + + Replace with '{0}' + '{0}' で置換 + + + + Add . for indexer access. + インデクサーにアクセスするには . を追加します。 + + + + All elements of a list must be of the same type as the first element, which here is '{0}'. This element has type '{1}'. + リスト コンストラクター式のすべての要素は同じ型である必要があります。この式に必要な型は '{0}' ですが、ここでは型 '{1}' になっています。 + + + + All elements of an array must be of the same type as the first element, which here is '{0}'. This element has type '{1}'. + 配列コンストラクター式の要素はすべて同じ型である必要があります。この式に必要な型は '{0}' ですが、ここでは型 '{1}' になっています。 + + + + This 'if' expression is missing an 'else' branch. Because 'if' is an expression, and not a statement, add an 'else' branch which also returns a value of type '{0}'. + 'if' 式に 'else' ブランチがありません。'then' ブランチは型 '{0}' です。'if' はステートメントではなく式であるため、同じ型の値を返す 'else' ブランチを追加してください。 + + + + The 'if' expression needs to have type '{0}' to satisfy context type requirements. It currently has type '{1}'. + コンテキストの型要件を満たすためには、'if' 式の型は '{0}' である必要があります。現在の型は '{1}' です。 + + + + All branches of an 'if' expression must return values of the same type as the first branch, which here is '{0}'. This branch returns a value of type '{1}'. + if' 式のすべてのブランチは同じ型である必要があります。この式に必要な型は '{0}' ですが、ここでは型 '{1}' になっています。 + + + + All branches of a pattern match expression must return values of the same type as the first branch, which here is '{0}'. This branch returns a value of type '{1}'. + パターン マッチ式のすべてのブランチは、同じ型の値を返す必要があります。最初のブランチが返した値の型は '{0}' ですが、このブランチが返した値の型は '{1}' です。 + + + + A pattern match guard must be of type 'bool', but this 'when' expression is of type '{0}'. + パターン マッチ ガードは型 'bool' である必要がありますが、この 'when' 式は型 '{0}' です。 + + + + A ';' is used to separate field values in records. Consider replacing ',' with ';'. + ';' は、レコード内でフィールド値を区切るために使われます。',' を ';' で置き換えることを検討してください。 + + + + The '!' operator is used to dereference a ref cell. Consider using 'not expr' here. + '!' 演算子は ref セルの逆参照に使用されます。ここに 'not expr' を使用することをご検討ください。 + + + + The non-generic type '{0}' does not expect any type arguments, but here is given {1} type argument(s) + 非ジェネリック型 '{0}' に型引数は使用できませんが、{1} 個の型引数があります + + + + Consider using 'return!' instead of 'return'. + 'return' の代わりに 'return!' を使うことを検討してください。 + + + + Consider using 'yield!' instead of 'yield'. + 'yield' の代わりに 'yield!' を使うことを検討してください。 + + + + \nA tuple type is required for one or more arguments. Consider wrapping the given arguments in additional parentheses or review the definition of the interface. + \n1 つ以上の引数についてタプル型を指定する必要があります。指定した引数を追加のかっこ内にラップすることを検討するか、インターフェイスの定義を確認してください。 + + + + Invalid warning number '{0}' + 警告番号 '{0}' が無効です + + + + Invalid version string '{0}' + バージョン文字列 '{0}' が無効です + + + + Invalid version file '{0}' + バージョン ファイル '{0}' が無効です + + + + Microsoft (R) F# Compiler version {0} + Microsoft (R) F# Compiler バージョン {0} + + + + F# Compiler for F# {0} + F# {0} の F# コンパイラ + + + + Problem with filename '{0}': {1} + ファイル名 '{0}' に問題があります: {1} + + + + No inputs specified + 入力が指定されていません + + + + The '--pdb' option requires the '--debug' option to be used + '--pdb' オプションでは '--debug' オプションを使用する必要があります + + + + The search directory '{0}' is invalid + 検索ディレクトリ '{0}' が無効です + + + + The search directory '{0}' could not be found + 検索ディレクトリ '{0}' が見つかりませんでした + + + + '{0}' is not a valid filename + '{0}' は有効なファイル名ではありません + + + + '{0}' is not a valid assembly name + '{0}' は有効なアセンブリ名ではありません + + + + Unrecognized privacy setting '{0}' for managed resource, valid options are 'public' and 'private' + マネージド リソースの認識されないプライバシー設定 '{0}'。有効なオプションは 'public' および 'private' です。 + + + + Multiple references to '{0}.dll' are not permitted + '{0}.dll' に対する複数の参照は許可されていません + + + + Could not read version from mscorlib.dll + mscorlib.dll からバージョンを読み取ることができませんでした + + + + Unable to read assembly '{0}' + アセンブリ '{0}' を読み取れません + + + + Assembly resolution failure at or near this location + この場所またはこの場所付近でアセンブリ解決エラーが発生しました + + + + The declarations in this file will be placed in an implicit module '{0}' based on the file name '{1}'. However this is not a valid F# identifier, so the contents will not be accessible from other files. Consider renaming the file or adding a 'module' or 'namespace' declaration at the top of the file. + このファイルの宣言は、ファイル名 '{1}' に基づいて、暗黙的なモジュール '{0}' に配置されます。ただし、これは有効な F# 識別子ではないため、その内容には他のファイルからアクセスできません。ファイル名を変更するか、ファイルの一番上に 'module' または 'namespace' の宣言を追加してください。 + + + + Files in libraries or multiple-file applications must begin with a namespace or module declaration, e.g. 'namespace SomeNamespace.SubNamespace' or 'module SomeNamespace.SomeModule'. Only the last source file of an application may omit such a declaration. + ライブラリまたは複数ファイル アプリケーション内のファイルは、名前空間またはモジュールの宣言から開始する必要があります (例: 'namespace SomeNamespace.SubNamespace' or 'module SomeNamespace.SomeModule'。アプリケーションの最後のソース ファイルのみ、このような宣言を省略できます。 + + + + Files in libraries or multiple-file applications must begin with a namespace or module declaration. When using a module declaration at the start of a file the '=' sign is not allowed. If this is a top-level module, consider removing the = to resolve this error. + ライブラリ内のファイル、または複数ファイル アプリケーション内のファイルでは、先頭に名前空間宣言またはモジュール宣言を置く必要があります。ファイルの先頭にモジュール宣言を置く場合、'=' 記号は指定できません。これが最上位レベルのモジュールである場合は、このエラーを解決するために = を削除することを検討してください。 + + + + This file contains multiple declarations of the form 'module SomeNamespace.SomeModule'. Only one declaration of this form is permitted in a file. Change your file to use an initial namespace declaration and/or use 'module ModuleName = ...' to define your modules. + このファイルには、'module SomeNamespace.SomeModule' という形式の宣言が複数含まれます。1 ファイル内で指定できるこの形式の宣言は 1 つのみです。最初の名前空間宣言を使用するようにファイルを変更するか、'module ModuleName = ...' を使用してモジュールを定義してください。 + + + + Option requires parameter: {0} + オプションにパラメーターが必要です: {0} + + + + Source file '{0}' could not be found + ソース ファイル '{0}' が見つかりませんでした + + + + The file extension of '{0}' is not recognized. Source files must have extension .fs, .fsi, .fsx, .fsscript, .ml or .mli. + '{0}' のファイル拡張子は認識されません。ソース ファイルの拡張子は .fs、.fsi、.fsx、.fsscript、.ml、または .mli にする必要があります。 + + + + Could not resolve assembly '{0}' + アセンブリ '{0}' を解決できませんでした + + + + Could not resolve assembly '{0}' required by '{1}' + {1}' に必要なアセンブリ '{0}' を解決できませんでした + + + + Error opening binary file '{0}': {1} + バイナリ ファイル '{0}' を開くときにエラーが発生しました: {1} + + + + The F#-compiled DLL '{0}' needs to be recompiled to be used with this version of F# + F# でコンパイルされたこの DLL '{0}' は、このバージョンの F# で使用するために再コンパイルする必要があります + + + + Invalid directive. Expected '#I \"<path>\"'. + ディレクティブが無効です。'#I \"<path>\"' という形式で指定する必要があります。 + + + + Invalid directive. Expected '#r \"<file-or-assembly>\"'. + ディレクティブが無効です。'#r \"<file-or-assembly>\"' という形式で指定する必要があります。 + + + + Invalid directive. Expected '#load \"<file>\" ... \"<file>\"'. + ディレクティブが無効です。'#load \"<file>\" ... \"<file>\"' という形式で指定する必要があります。 + + + + Invalid directive. Expected '#time', '#time \"on\"' or '#time \"off\"'. + ディレクティブが無効です。'#time'、'#time \"on\"'、または '#time \"off\"' という形式で指定する必要があります。 + + + + Directives inside modules are ignored + モジュール内のディレクティブは無視されます + + + + A signature for the file or module '{0}' has already been specified + ファイルまたはモジュール '{0}' のシグネチャは指定済みです + + + + An implementation of file or module '{0}' has already been given. Compilation order is significant in F# because of type inference. You may need to adjust the order of your files to place the signature file before the implementation. In Visual Studio files are type-checked in the order they appear in the project file, which can be edited manually or adjusted using the solution explorer. + ファイルまたはモジュール '{0}' の実装は指定済みです。型推論があるため、F# ではコンパイルの順序が重要です。必要に応じて、実装の前にシグネチャ ファイルを配置するよう、ファイルの順序を調整します。Visual Studio では、プロジェクト ファイル内の出現順にファイルが型チェックされます。プロジェクト ファイルは、手動で編集するか、ソリューション エクスプローラーを使用して調整することができます。 + + + + An implementation of the file or module '{0}' has already been given + ファイルまたはモジュール '{0}' の実装は指定済みです + + + + The signature file '{0}' does not have a corresponding implementation file. If an implementation file exists then check the 'module' and 'namespace' declarations in the signature and implementation files match. + シグネチャ ファイル '{0}' に対応する実装ファイルがありません。実装ファイルが存在する場合、シグネチャ ファイルおよび実装ファイル内の 'module' 宣言や 'namespace' 宣言が一致することを確認してください。 + + + + '{0}' is not a valid integer argument + '{0}' は有効な整数引数ではありません + + + + '{0}' is not a valid floating point argument + '{0}' は有効な浮動小数点引数ではありません + + + + Unrecognized option: '{0}' + 認識されないオプション:'{0}' + + + + Invalid module or namespace name + モジュール名または名前空間名が無効です + + + + Error reading/writing metadata for the F# compiled DLL '{0}'. Was the DLL compiled with an earlier version of the F# compiler? (error: '{1}'). + F# でコンパイルした DLL '{0}' のメタデータの読み取り/書き込み中にエラーが発生しました。旧バージョンの F# コンパイラでコンパイルした DLL ですか? (エラー: '{1}') + + + + The type/module '{0}' is not a concrete module or type + 型/モジュール '{0}' は具象モジュールまたは具象型ではありません + + + + The type '{0}' has an inline assembly code representation + 型 '{0}' にはインライン アセンブラー コード表現があります + + + + A namespace and a module named '{0}' both occur in two parts of this assembly + '{0}' という名前空間とモジュールの両方がこのアセンブリの 2 か所で発生しています + + + + Two modules named '{0}' occur in two parts of this assembly + '{0}' という 2 つのモジュールがこのアセンブリの 2 か所で使用されています + + + + Two type definitions named '{0}' occur in namespace '{1}' in two parts of this assembly + {0}' という 2 つの型の定義が、このアセンブリの 2 か所の名前空間 '{1}' で発生しています + + + + A module and a type definition named '{0}' occur in namespace '{1}' in two parts of this assembly + {0}' というモジュールおよび型の定義が、このアセンブリの 2 か所の名前空間 '{1}' で発生しています + + + + Invalid member signature encountered because of an earlier error + 前に発生しているエラーのために、メンバーのシグネチャが無効です + + + + This value does not have a valid property setter type + この値には、有効なプロパティの set アクセス操作子の型がありません + + + + Invalid form for a property getter. At least one '()' argument is required when using the explicit syntax. + プロパティのゲッターの形式が無効です。明示的な構文を使用する場合、少なくとも 1 つの '()' 引数が必要です。 + + + + Invalid form for a property setter. At least one argument is required. + プロパティの set アクセス操作子の形式が無効です。少なくとも 1 つの引数が必要です。 + + + + Unexpected use of a byref-typed variable + byref 型変数の予期しない使用方法です: + + + + Invalid mutation of a constant expression. Consider copying the expression to a mutable local, e.g. 'let mutable x = ...'. + 定数式の変更は無効です。変更可能なローカルに式をコピーしてください (たとえば、'let mutable x = ...')。 + + + + The value has been copied to ensure the original is not mutated by this operation or because the copy is implicit when returning a struct from a member and another member is then accessed + この操作で元の値が変更されないように、値はコピーされました + + + + Recursively defined values cannot appear directly as part of the construction of a tuple value within a recursive binding + 再帰的に定義された値は、再帰的な束縛内にあるタプル値の構造の一部として直接使用することはできません。 + + + + Recursive values cannot appear directly as a construction of the type '{0}' within a recursive binding. This feature has been removed from the F# language. Consider using a record instead. + 再帰的な値は、再帰的な束縛内の型 '{0}' の構造として直接使用することはできません。この機能は F# 言語から削除されました。代わりにレコードを使用してください。 + + + + Recursive values cannot be directly assigned to the non-mutable field '{0}' of the type '{1}' within a recursive binding. Consider using a mutable field instead. + 再帰的な値は、再帰的な束縛内の型 '{1}' の変更可能ではないフィールド '{0}' に直接割り当てることはできません。代わりに変更可能なフィールドを使用してください。 + + + + Unexpected decode of AutoOpenAttribute + AutoOpenAttribute の予期しないデコードです: + + + + Unexpected decode of InternalsVisibleToAttribute + InternalsVisibleToAttribute の予期しないデコードです: + + + + Unexpected decode of InterfaceDataVersionAttribute + InterfaceDataVersionAttribute の予期しないデコードです: + + + + Active patterns cannot return more than 7 possibilities + アクティブ パターンが返すことができる結果は 7 個以下です + + + + This is not a valid constant expression or custom attribute value + これは有効な定数式でもカスタム属性値でもありません + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe mutability attributes differ + モジュール '{0}' には\n {1} \nが含まれますが、シグネチャには\n {2} \nを指定しています。変更可能属性が異なります。 + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe names differ + モジュール '{0}' には\n {1} \nが含まれますが、シグネチャには\n {2} \nを指定しています。名前が異なります。 + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe compiled names differ + モジュール '{0}' には\n {1} \nが含まれていますが、シグネチャには\n {2} \nが指定されています。コンパイル名が異なります。 + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe display names differ + モジュール '{0}' には\n {1} \nが含まれていますが、シグネチャには\n {2} \nが指定されています。表示名が異なります。 + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe accessibility specified in the signature is more than that specified in the implementation + モジュール '{0}' には\n {1} \nが含まれますが、シグネチャでは\n {2} \nを指定しています。シグネチャに指定されたアクセシビリティの方が、実装よりも高い設定です。 + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe inline flags differ + モジュール '{0}' には\n {1} \nが含まれますが、シグネチャには\n {2} \nを指定しています。インライン フラグが異なります。 + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe literal constant values and/or attributes differ + モジュール '{0}' には\n {1} \nが含まれますが、シグネチャには\n {2} \nを指定しています。リテラル定数値、属性、またはその両方が異なります。 + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is a type function and the other is not. The signature requires explicit type parameters if they are present in the implementation. + モジュール '{0}' には\n {1} \nが含まれますが、シグネチャには\n {2} \nを指定しています。一方は型関数ですが、もう一方は違います。型パラメーターが実装にある場合、シグネチャには明示的な型パラメーターが必要です。 + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe respective type parameter counts differ + モジュール '{0}' には\n {1} \nが含まれますが、シグネチャには\n {2} \nを指定しています。それぞれの型パラメーター数が異なります。 + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe types differ + モジュール '{0}' には\n {1} \nが含まれますが、シグネチャには\n {2} \nを指定しています。型が異なります。 + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is an extension member and the other is not + モジュール '{0}' には\n {1} \nが含まれますが、シグネチャには\n {2} \nを指定しています。一方は拡張メンバーですが、もう一方は違います。 + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nAn arity was not inferred for this value + モジュール '{0}' には\n {1} \nが含まれますが、シグネチャには\n {2} \nを指定しています。この値の項数は推論されませんでした。 + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe number of generic parameters in the signature and implementation differ (the signature declares {3} but the implementation declares {4} + モジュール '{0}' には\n {1} \nが含まれますが、シグネチャには\n {2} \nを指定しています。シグネチャと実装のジェネリック パラメーター数が異なります (シグネチャは {3} 個を宣言しましたが、実装は {4} 個です)。 + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe generic parameters in the signature and implementation have different kinds. Perhaps there is a missing [<Measure>] attribute. + モジュール '{0}' には\n {1} \nが含まれますが、シグネチャには\n {2} \nを指定しています。シグネチャと実装のジェネリック パラメーターは種類が異なります。[<Measure>] 属性を指定していない可能性があります。 + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe arities in the signature and implementation differ. The signature specifies that '{3}' is function definition or lambda expression accepting at least {4} argument(s), but the implementation is a computed function value. To declare that a computed function value is a permitted implementation simply parenthesize its type in the signature, e.g.\n\tval {5}: int -> (int -> int)\ninstead of\n\tval {6}: int -> int -> int. + モジュール '{0}' には\n {1} \nが含まれますが、シグネチャでは\n {2} \nを指定しています。シグネチャと実装の項数が異なります。シグネチャは、'{3}' が {4} 個以上の引数を受け入れる関数定義またはラムダ式であると指定していますが、実装は計算された関数値です。計算された関数値が許可された実装であることを宣言するには、シグネチャの型をかっこで囲んでください。たとえば、\n\tval {6}: int -> int -> int\nではなく、次のように指定します。\n\tval {5}: int -> (int -> int) + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe CLI member names differ + モジュール '{0}' には\n {1} \nが含まれますが、シグネチャには\n {2} \nを指定しています。CLI メンバー名が異なります。 + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is static and the other isn't + モジュール '{0}' には\n {1} \nが含まれますが、シグネチャには\n {2} \nを指定しています。一方は静的ですが、もう一方は違います。 + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is virtual and the other isn't + モジュール '{0}' には\n {1} \nが含まれますが、シグネチャには\n {2} \nを指定しています。一方は仮想ですが、もう一方は違います。 + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is abstract and the other isn't + モジュール '{0}' には\n {1} \nが含まれますが、シグネチャには\n {2} \nを指定しています。一方は抽象ですが、もう一方は違います。 + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is final and the other isn't + モジュール '{0}' には\n {1} \nが含まれますが、シグネチャには\n {2} \nを指定しています。一方は final ですが、もう一方は違います。 + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is marked as an override and the other isn't + モジュール '{0}' には\n {1} \nが含まれますが、シグネチャには\n {2} \nを指定しています。一方はオーバーライドとマークされていますが、もう一方は違います。 + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is a constructor/property and the other is not + モジュール '{0}' には\n {1} \nが含まれますが、シグネチャには\n {2} \nを指定しています。一方はコンストラクター/プロパティですが、もう一方は違います。 + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe compiled representation of this method is as a static member but the signature indicates its compiled representation is as an instance member + モジュール '{0}' には\n {1} \nが含まれますが、シグネチャには\n {2} \nを指定しています。このメソッドのコンパイル済み表現は静的メンバーとして指定されていますが、シグネチャが示すコンパイル済み表現はインスタンス メンバーです。 + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe compiled representation of this method is as an instance member, but the signature indicates its compiled representation is as a static member + モジュール '{0}' には\n {1} \nが含まれますが、シグネチャには\n {2} \nを指定しています。このメソッドのコンパイル済み表現はインスタンス メンバーとして指定されていますが、シグネチャが示すコンパイル済み表現は静的メンバーです。 + + + + The {0} definitions in the signature and implementation are not compatible because the names differ. The type is called '{1}' in the signature file but '{2}' in implementation. + シグネチャおよび実装内の {0} 定義は、名前が異なるため、互換性がありません。この型はシグネチャ ファイルでは '{1}' という名前ですが、実装では '{2}' という名前です。 + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the respective type parameter counts differ + 型パラメーターの数が異なるため、シグネチャおよび実装内の型 '{1}' の {0} 定義は互換性がありません + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the accessibility specified in the signature is more than that specified in the implementation + シグネチャに指定されたアクセシビリティが実装の指定よりも高いため、シグネチャおよび実装内の型 '{1}' の {0} 定義は互換性がありません + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature requires that the type supports the interface {2} but the interface has not been implemented + シグネチャでは型がインターフェイス {2} をサポートする必要がありますが、インターフェイスが実装されていないため、シグネチャおよび実装内の型 '{1}' の {0} 定義は互換性がありません + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation says this type may use nulls as a representation but the signature does not + 実装では表現としてこの型に null を使用できると指定していますが、シグネチャは指定していないため、シグネチャおよび実装内の型 '{1}' の {0} 定義は互換性がありません + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation says this type may use nulls as an extra value but the signature does not + 実装では特別な値としてこの型に null を使用できると指定していますが、シグネチャは指定していないため、シグネチャおよび実装内の型 '{1}' の {0} 定義は互換性がありません + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature says this type may use nulls as a representation but the implementation does not + シグネチャでは表現としてこの型に null を使用できると指定していますが、実装では指定していないため、シグネチャおよび実装内の型 '{1}' の {0} 定義は互換性がありません + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature says this type may use nulls as an extra value but the implementation does not + シグネチャでは特別な値としてこの型に null を使用できると指定していますが、実装は指定していないため、シグネチャおよび実装内の型 '{1}' の {0} 定義は互換性がありません + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation type is sealed but the signature implies it is not. Consider adding the [<Sealed>] attribute to the signature. + 実装の型はシールドですが、シグネチャではシールドではないと考えられるため、シグネチャおよび実装内の型 '{1}' の {0} 定義は互換性がありません。シグネチャに [<Sealed>] 属性を追加してください。 + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation type is not sealed but signature implies it is. Consider adding the [<Sealed>] attribute to the implementation. + 実装の型はシールドですが、シグネチャではシールドではないと考えられるため、シグネチャおよび実装内の型 '{1}' の {0} 定義は互換性がありません。実装に [<Sealed>] 属性を追加してください。 + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation is an abstract class but the signature is not. Consider adding the [<AbstractClass>] attribute to the signature. + 実装は抽象クラスですが、シグネチャは抽象クラスではないため、シグネチャおよび実装内の型 '{1}' の {0} 定義は互換性がありません。シグネチャに [<AbstractClass>] 属性を追加してください。 + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature is an abstract class but the implementation is not. Consider adding the [<AbstractClass>] attribute to the implementation. + シグネチャは抽象クラスですが、実装は抽象クラスではないため、シグネチャおよび実装内の型 '{1}' の {0} 定義は互換性がありません。実装に [<AbstractClass>] 属性を追加してください。 + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the types have different base types + 型の基本型が異なるため、シグネチャおよび実装内の型 '{1}' の {0} 定義は互換性がありません + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the number of {2}s differ + {2} の数が異なるため、シグネチャおよび実装内の型 '{1}' の {0} 定義は互換性がありません + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature defines the {2} '{3}' but the implementation does not (or does, but not in the same order) + シグネチャでは {2} '{3}' を定義していますが、実装では定義していないため (または定義していても同じ順序ではないため)、シグネチャおよび実装内の型 '{1}' の {0} 定義は互換性がありません + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation defines the {2} '{3}' but the signature does not (or does, but not in the same order) + 実装では {2} '{3}' を定義していますが、シグネチャでは定義していないため (または定義していても同じ順序ではないため)、シグネチャおよび実装内の型 '{1}' の {0} 定義は互換性がありません + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation defines a struct but the signature defines a type with a hidden representation + 実装では構造体を定義していますが、シグネチャでは隠ぺいされた表現で型を定義しているため、シグネチャおよび実装内の型 '{1}' の {0} 定義は互換性がありません + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because a CLI type representation is being hidden by a signature + CLI の型表現がシグネチャによって隠ぺいされているため、シグネチャおよび実装内の型 '{1}' の {0} 定義は互換性がありません + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because a type representation is being hidden by a signature + 型表現がシグネチャによって隠ぺいされているため、シグネチャおよび実装内の型 '{1}' の {0} 定義は互換性がありません + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the types are of different kinds + 型の種類が異なるため、シグネチャおよび実装内の型 '{1}' の {0} 定義は互換性がありません + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the IL representations differ + IL 表現が異なるため、シグネチャおよび実装内の型 '{1}' の {0} 定義は互換性がありません + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the representations differ + シグネチャおよび実装内の型 '{1}' の {0} 定義は、表現が異なるため、互換性がありません + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the field {2} was present in the implementation but not in the signature + フィールド {2} が実装にはありますがシグネチャにはないため、シグネチャおよび実装内の型 '{1}' の {0} 定義は互換性がありません + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the order of the fields is different in the signature and implementation + フィールドの順序がシグネチャと実装とで異なるため、シグネチャおよび実装内の型 '{1}' の {0} 定義は互換性がありません + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the field {2} was required by the signature but was not specified by the implementation + シグネチャにはフィールド {2} が必要ですが、実装では指定されていないため、シグネチャおよび実装内の型 '{1}' の {0} 定義は互換性がありません + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the field '{2}' was present in the implementation but not in the signature. Struct types must now reveal their fields in the signature for the type, though the fields may still be labelled 'private' or 'internal'. + フィールド '{2}' が実装にはありますがシグネチャにはないため、シグネチャおよび実装内の型 '{1}' の {0} 定義は互換性がありません。この型のシグネチャでは、構造体型のフィールドを公開する必要があります。ただし、フィールドのラベルは 'private' または 'internal' のままにすることもできます。 + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the abstract member '{2}' was required by the signature but was not specified by the implementation + シグネチャには抽象メンバー '{2}' が必要ですが、実装では指定されていないため、シグネチャおよび実装内の型 '{1}' の {0} 定義は互換性がありません + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the abstract member '{2}' was present in the implementation but not in the signature + 抽象メンバー '{2}' が実装にはありますがシグネチャにはないため、シグネチャおよび実装内の型 '{1}' の {0} 定義は互換性がありません + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature declares a {2} while the implementation declares a {3} + シグネチャは {2} を宣言していますが、実装では {3} を宣言しているため、シグネチャおよび実装内の型 '{1}' の {0} 定義は互換性がありません + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the abbreviations differ: {2} versus {3} + シグネチャおよび実装内の型 '{1}' の {0} 定義は、省略形が異なるため ({2} と {3})、互換性がありません + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because an abbreviation is being hidden by a signature. The abbreviation must be visible to other CLI languages. Consider making the abbreviation visible in the signature. + 省略形がシグネチャによって隠ぺいされているため、シグネチャおよび実装の型 '{1}' の {0} 定義に互換性がありません。省略形は他の CLI 言語から参照できるようにする必要があります。シグネチャ内の省略形を参照できるようにしてください。 + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature has an abbreviation while the implementation does not + シグネチャには省略形がありますが、実装にはないため、シグネチャおよび実装内の型 '{1}' の {0} 定義は互換性がありません + + + + The module contains the constructor\n {0} \nbut its signature specifies\n {1} \nThe names differ + モジュールにはコンストラクター\n {0} \nが含まれますが、シグネチャでは\n {1} \nを指定しています。名前が異なります。 + + + + The module contains the constructor\n {0} \nbut its signature specifies\n {1} \nThe respective number of data fields differ + モジュールにはコンストラクター\n {0} \nが含まれますが、シグネチャでは\n {1} \nを指定しています。データ フィールドの数が異なります。 + + + + The module contains the constructor\n {0} \nbut its signature specifies\n {1} \nThe types of the fields differ + モジュールにはコンストラクター\n {0} \nが含まれますが、シグネチャでは\n {1} \nを指定しています。フィールドの型が異なります。 + + + + The module contains the constructor\n {0} \nbut its signature specifies\n {1} \nthe accessibility specified in the signature is more than that specified in the implementation + モジュールにはコンストラクター\n {0} \nが含まれますが、シグネチャでは\n {1} \nを指定しています。シグネチャに指定されたアクセシビリティの方が、実装よりも高い設定です。 + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe names differ + モジュールにはフィールド\n {0} \nが含まれますが、シグネチャでは\n {1} \nを指定しています。名前が異なります。 + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nthe accessibility specified in the signature is more than that specified in the implementation + モジュールにはフィールド\n {0} \nが含まれますが、シグネチャでは\n {1} \nを指定しています。シグネチャに指定されたアクセシビリティの方が、実装よりも高い設定です。 + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe 'static' modifiers differ + モジュールにはフィールド\n {0} \nが含まれますが、シグネチャでは\n {1} \nを指定しています。'static' 修飾子が異なります。 + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe 'mutable' modifiers differ + モジュールにはフィールド\n {0} \nが含まれますが、シグネチャでは\n {1} \nを指定しています。'mutable' 修飾子が異なります。 + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe 'literal' modifiers differ + モジュールにはフィールド\n {0} \nが含まれますが、シグネチャでは\n {1} \nを指定しています。'literal' 修飾子が異なります。 + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe types differ + モジュールにはフィールド\n {0} \nが含まれますが、シグネチャでは\n {1} \nを指定しています。型が異なります。 + + + + The implicit instantiation of a generic construct at or near this point could not be resolved because it could resolve to multiple unrelated types, e.g. '{0}' and '{1}'. Consider using type annotations to resolve the ambiguity + この場所またはその付近にあるジェネリック コンストラクトの暗黙的なインスタンス化を解決できませんでした。これは、関連性のない複数の型に解決される可能性があるためです (たとえば、'{0}' と '{1}')。あいまいさを解決するために、型の注釈を使用してください。 + + + + Could not resolve the ambiguity inherent in the use of a 'printf'-style format string + 'printf' 形式の書式指定文字列の使用に関して、あいまいな継承を解決できませんでした + + + + Could not resolve the ambiguity in the use of a generic construct with an 'enum' constraint at or near this position + この位置、またはこの位置付近にある 'enum' 制約を含むジェネリック コンストラクトの使用に関して、あいまいさを解決できませんでした + + + + Could not resolve the ambiguity in the use of a generic construct with a 'delegate' constraint at or near this position + この位置、またはこの位置付近にある 'delegate' 制約を含むジェネリック コンストラクトの使用に関して、あいまいさを解決できませんでした + + + + Invalid value + 無効な値 + + + + The signature and implementation are not compatible because the respective type parameter counts differ + それぞれの型パラメーターの数が異なるため、シグネチャおよび実装は互換性がありません + + + + The signature and implementation are not compatible because the type parameter in the class/signature has a different compile-time requirement to the one in the member/implementation + クラス/シグネチャの型パラメーターには、メンバー/実装の型パラメーターとは異なるコンパイル時の要件があるため、シグネチャと実装には互換性がありません + + + + The signature and implementation are not compatible because the declaration of the type parameter '{0}' requires a constraint of the form {1} + 型パラメーター '{0}' の宣言には形式 {1} の制約が必要なため、シグネチャと実装には互換性がありません + + + + The signature and implementation are not compatible because the type parameter '{0}' has a constraint of the form {1} but the implementation does not. Either remove this constraint from the signature or add it to the implementation. + 型パラメーター '{0}' には形式 {1} の制約がありますが、実装にはないため、シグネチャと実装には互換性がありません。シグネチャからこの制約を削除するか、実装に制約を追加してください。 + + + + The type '{0}' implements 'System.IComparable'. Consider also adding an explicit override for 'Object.Equals' + 型 '{0}' は 'System.IComparable' を実装しています。'Object.Equals' の明示的なオーバーライドも追加してください。 + + + + The type '{0}' implements 'System.IComparable' explicitly but provides no corresponding override for 'Object.Equals'. An implementation of 'Object.Equals' has been automatically provided, implemented via 'System.IComparable'. Consider implementing the override 'Object.Equals' explicitly + 型 '{0}' は 'System.IComparable' を明示的に実装していますが、'Object.Equals' に対応するオーバーライドを提供していません。'Object.Equals' の実装は自動的に提供され、'System.IComparable' を介して実装されます。明示的にオーバーライド 'Object.Equals' を実装してください。 + + + + The struct, record or union type '{0}' has an explicit implementation of 'Object.GetHashCode' or 'Object.Equals'. You must apply the 'CustomEquality' attribute to the type + 構造体型、レコード型、または共用体型 '{0}' には 'Object.GetHashCode' または 'Object.Equals' の明示的な実装があります。この型には 'CustomEquality' 属性を適用してください。 + + + + The struct, record or union type '{0}' has an explicit implementation of 'Object.GetHashCode'. Consider implementing a matching override for 'Object.Equals(obj)' + 構造体型、レコード型、または共用体型 '{0}' には 'Object.GetHashCode' の明示的な実装があります。'Object.Equals(obj)' に対応するオーバーライドを実装してください。 + + + + The struct, record or union type '{0}' has an explicit implementation of 'Object.Equals'. Consider implementing a matching override for 'Object.GetHashCode()' + 構造体型、レコード型、または共用体型 '{0}' には 'Object.Equals' の明示的な実装があります。'Object.GetHashCode()' に対応するオーバーライドを実装してください。 + + + + The exception definitions are not compatible because a CLI exception mapping is being hidden by a signature. The exception mapping must be visible to other modules. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1} + CLI の例外のマッピングがシグネチャによって隠ぺいされているため、例外の定義に互換性がありません。例外のマッピングは他のモジュールから参照できるようにする必要があります。モジュールには例外の定義\n {0} \nが含まれますが、シグネチャでは\n\t{1}\nを指定しています。 + + + + The exception definitions are not compatible because the CLI representations differ. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1} + CLI 表現が異なるため、例外の定義に互換性がありません。モジュールには例外の定義\n {0} \nが含まれますが、シグネチャでは\n\t{1}\nを指定しています。 + + + + The exception definitions are not compatible because the exception abbreviation is being hidden by the signature. The abbreviation must be visible to other CLI languages. Consider making the abbreviation visible in the signature. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1}. + 例外の省略形がシグネチャによって隠ぺいされているため、例外の定義に互換性がありません。省略形は他の CLI 言語から参照できるようにする必要があります。シグネチャ内の省略形を参照できるようにしてください。モジュールには例外の定義\n {0} \nがありますが、シグネチャでは\n\t{1}\nを指定しています。 + + + + The exception definitions are not compatible because the exception abbreviations in the signature and implementation differ. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1}. + 例外の省略形がシグネチャと実装とで異なるため、例外の定義に互換性がありません。モジュールには例外の定義\n {0} \nが含まれますが、シグネチャでは\n\t{1}\nを指定しています。 + + + + The exception definitions are not compatible because the exception declarations differ. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1}. + 例外の宣言が異なるため、例外の定義に互換性がありません。モジュールには例外の定義\n {0} \nが含まれますが、シグネチャでは\n\t{1}\nを指定しています。 + + + + The exception definitions are not compatible because the field '{0}' was required by the signature but was not specified by the implementation. The module contains the exception definition\n {1} \nbut its signature specifies\n\t{2}. + シグネチャにはフィールド '{0}' が必要ですが、実装では指定されなかったため、例外の定義に互換性がありません。モジュールには例外の定義\n {1} \nが含まれますが、シグネチャでは\n\t{2}\nを指定しています。 + + + + The exception definitions are not compatible because the field '{0}' was present in the implementation but not in the signature. The module contains the exception definition\n {1} \nbut its signature specifies\n\t{2}. + 実装にはフィールド '{0}' がありますが、シグネチャにはないため、例外の定義に互換性がありません。モジュールには例外の定義\n {1} \nが含まれますが、シグネチャでは\n\t{2}\nを指定しています。 + + + + The exception definitions are not compatible because the order of the fields is different in the signature and implementation. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1}. + フィールドの順序がシグネチャと実装とで異なるため、例外の定義に互換性がありません。モジュールには例外の定義\n {0} \nが含まれますが、シグネチャでは\n\t{1}\nを指定しています。 + + + + The namespace or module attributes differ between signature and implementation + 名前空間属性またはモジュール属性が、シグネチャと実装とで異なります + + + + This method is over-constrained in its type parameters + 型パラメーターのこのメソッドは、制約過多です + + + + No implementations of '{0}' had the correct number of arguments and type parameters. The required signature is '{1}'. + 正しい数の引数と型パラメーターが指定された '{0}' の実装がありません。必要なシグネチャは '{1}' です。 + + + + The override for '{0}' was ambiguous + '{0}' のオーバーライドがあいまいでした + + + + More than one override implements '{0}' + 複数のオーバーライドが '{0}' を実装しています + + + + The method '{0}' is sealed and cannot be overridden + メソッド '{0}' がシールドであるため、オーバーライドできません + + + + The override '{0}' implements more than one abstract slot, e.g. '{1}' and '{2}' + オーバーライド '{0}' は複数の抽象スロットを実装しています (たとえば、'{1}' と '{2}') + + + + Duplicate or redundant interface + インターフェイスが重複するか、冗長です + + + + The interface '{0}' is included in multiple explicitly implemented interface types. Add an explicit implementation of this interface. + 複数の明示的に実装されたインターフェイス型に、インターフェイス '{0}' が含まれています。このインターフェイスの明示的な実装を追加してください。 + + + + A named argument has been assigned more than one value + 名前付き引数に複数の値が割り当てられました + + + + No implementation was given for '{0}' + '{0}' に指定された実装がありませんでした + + + + No implementation was given for '{0}'. Note that all interface members must be implemented and listed under an appropriate 'interface' declaration, e.g. 'interface ... with member ...'. + '{0}' に指定された実装がありませんでした。すべてのインターフェイス メンバーを実装し、適切な 'interface' 宣言で列挙してください (たとえば、'interface ... with member ...')。 + + + + The member '{0}' does not have the correct number of arguments. The required signature is '{1}'. + メンバー '{0}' には引数の正しいメンバーがありません。必要なシグネチャは '{1}' です。 + + + + The member '{0}' does not have the correct number of method type parameters. The required signature is '{1}'. + メンバー '{0}' には正しい数のメソッド型パラメーターがありません。必要なシグネチャは '{1}' です。 + + + + The member '{0}' does not have the correct kinds of generic parameters. The required signature is '{1}'. + メンバー '{0}' には正しい種類のジェネリック パラメーターがありません。必要なシグネチャは '{1}' です。 + + + + The member '{0}' cannot be used to implement '{1}'. The required signature is '{2}'. + {1}' を実装するためにメンバー '{0}' は使用できません。必要なシグネチャは '{2}' です。 + + + + Error while parsing embedded IL + 埋め込まれた IL の解析中にエラーが発生しました + + + + Error while parsing embedded IL type + 埋め込まれた IL 型の解析中にエラーが発生しました + + + + This indexer notation has been removed from the F# language + このインデクサー表記は F# 言語から削除されました + + + + Invalid expression on left of assignment + 代入式の左辺が無効です + + + + The 'ReferenceEquality' attribute cannot be used on structs. Consider using the 'StructuralEquality' attribute instead, or implement an override for 'System.Object.Equals(obj)'. + 構造体で 'ReferenceEquality' 属性は使用できません。代わりに 'StructuralEquality' 属性を使用するか、'System.Object.Equals(obj)' のオーバーライドを実装してください。 + + + + This type uses an invalid mix of the attributes 'NoEquality', 'ReferenceEquality', 'StructuralEquality', 'NoComparison' and 'StructuralComparison' + この型には、'NoEquality' 属性、'ReferenceEquality' 属性、'StructuralEquality' 属性、'NoComparison' 属性、および 'StructuralComparison' 属性の無効な組み合わせが使用されています + + + + The 'NoEquality' attribute must be used in conjunction with the 'NoComparison' attribute + 'NoEquality' 属性は、'NoComparison' 属性と組み合わせて使用する必要があります + + + + The 'StructuralComparison' attribute must be used in conjunction with the 'StructuralEquality' attribute + 'StructuralComparison' 属性は、'StructuralEquality' 属性と組み合わせて使用する必要があります + + + + The 'StructuralEquality' attribute must be used in conjunction with the 'NoComparison' or 'StructuralComparison' attributes + 'StructuralEquality' 属性は、'NoComparison' 属性または 'StructuralComparison' 属性と組み合わせて使用する必要があります + + + + A type cannot have both the 'ReferenceEquality' and 'StructuralEquality' or 'StructuralComparison' attributes + 1 つの型に 'ReferenceEquality' 属性および 'StructuralEquality' 属性、または 'ReferenceEquality' 属性および 'StructuralComparison' 属性を同時に使用することはできません + + + + Only record, union, exception and struct types may be augmented with the 'ReferenceEquality', 'StructuralEquality' and 'StructuralComparison' attributes + 'ReferenceEquality' 属性、'StructuralEquality' 属性、および 'StructuralComparison' 属性を使用して拡張できるのは、レコード型、共用体型、例外型、および構造体型のみです + + + + A type with attribute 'ReferenceEquality' cannot have an explicit implementation of 'Object.Equals(obj)', 'System.IEquatable<_>' or 'System.Collections.IStructuralEquatable' + 'ReferenceEquality' 属性を持つ型には、'Object.Equals(obj)'、'System.IEquatable<_>'、または 'System.Collections.IStructuralEquatable' を明示的に実装することはできません + + + + A type with attribute 'CustomEquality' must have an explicit implementation of at least one of 'Object.Equals(obj)', 'System.IEquatable<_>' or 'System.Collections.IStructuralEquatable' + 'CustomEquality' 属性を持つ型には、’Object.Equals(obj)’、'System.IEquatable<_>' または 'System.Collections.IStructuralEquatable' の少なくとも 1 つの明示的な実装が必要です + + + + A type with attribute 'CustomComparison' must have an explicit implementation of at least one of 'System.IComparable' or 'System.Collections.IStructuralComparable' + 'CustomComparison' 属性を持つ型には、'System.IComparable' または 'System.Collections.IStructuralComparable' の少なくとも 1 つの明示的な実装が必要です + + + + A type with attribute 'NoEquality' should not usually have an explicit implementation of 'Object.Equals(obj)'. Disable this warning if this is intentional for interoperability purposes + 通常、'NoEquality' 属性を持つ型には、'Object.Equals(obj)' を明示的に実装しません。相互運用性のために意図的に実装した場合、この警告は無効にしてください。 + + + + A type with attribute 'NoComparison' should not usually have an explicit implementation of 'System.IComparable', 'System.IComparable<_>' or 'System.Collections.IStructuralComparable'. Disable this warning if this is intentional for interoperability purposes + 通常、'NoComparison' 属性を持つ型には、'System.IComparable'、'System.IComparable<_>'、または 'System.Collections.IStructuralComparable' を明示的に実装しません。相互運用性のために意図的に実装した場合、この警告は無効にしてください。 + + + + The 'CustomEquality' attribute must be used in conjunction with the 'NoComparison' or 'CustomComparison' attributes + 'CustomEquality' 属性は、'NoComparison' 属性または 'CustomComparison' 属性と組み合わせて使用する必要があります + + + + Positional specifiers are not permitted in format strings + 位置指定子は書式指定文字列で許可されていません + + + + Missing format specifier + 書式指定子がありません + + + + '{0}' flag set twice + '{0}' フラグが 2 回設定されました + + + + Prefix flag (' ' or '+') set twice + プレフィックスのフラグ (' ' または '+') が 2 回設定されました + + + + The # formatting modifier is invalid in F# + # 書式修飾子は F# では無効です + + + + Bad precision in format specifier + 書式指定子の精度に誤りがあります + + + + Bad width in format specifier + 書式指定子の幅に誤りがあります + + + + '{0}' format does not support '0' flag + '{0}' 形式は '0' フラグをサポートしていません + + + + Precision missing after the '.' + '.' の後に精度がありません + + + + '{0}' format does not support precision + '{0}' 形式は精度をサポートしていません + + + + Bad format specifier (after l or L): Expected ld,li,lo,lu,lx or lX. In F# code you can use %d, %x, %o or %u instead, which are overloaded to work with all basic integer types. + (l または L の後の) 書式指定子に誤りがあります。ld、li、lo、lu、lx、または lX を指定してください。F# コードでは、代わりに %d、%x、%o、または %u を使用できます。これらは、すべての基本的な整数型を扱うためにオーバーロードされます。 + + + + The 'l' or 'L' in this format specifier is unnecessary. In F# code you can use %d, %x, %o or %u instead, which are overloaded to work with all basic integer types. + この書式指定子に 'l' または 'L' は不要です。F# のコードでは、%d、%x、%o、または %u を使用できます。これらは、すべての基本的な整数型を扱うためにオーバーロードされます。 + + + + The 'h' or 'H' in this format specifier is unnecessary. You can use %d, %x, %o or %u instead, which are overloaded to work with all basic integer types. + この書式指定子に 'h' または 'H' は不要です。代わりに %d、%x、%o、または %u を使用できます。これらは、すべての基本的な整数型を扱うためにオーバーロードされます。 + + + + '{0}' does not support prefix '{1}' flag + {0}' はプレフィックスの '{1}' フラグをサポートしていません + + + + Bad format specifier: '{0}' + 書式指定子に誤りがあります:'{0}' + + + + System.Environment.Exit did not exit + System.Environment.Exit が終了しませんでした + + + + The treatment of this operator is now handled directly by the F# compiler and its meaning cannot be redefined + この演算子は F# コンパイラが直接処理するようになったため、演算子の意味を再定義することはできません + + + + A protected member is called or 'base' is being used. This is only allowed in the direct implementation of members since they could escape their object scope. + プロテクト メンバーが呼び出されたか、'base' が使用されています。この操作が許可されているのはメンバーの直接実装の場合のみです。直接実装ではオブジェクトのスコープを回避できます。 + + + + The byref-typed variable '{0}' is used in an invalid way. Byrefs cannot be captured by closures or passed to inner functions. + byref 型の変数 '{0}' の使用方法に誤りがあります。byref をクロージャでキャプチャすること、または内部関数に渡すことはできません。 + + + + The 'base' keyword is used in an invalid way. Base calls cannot be used in closures. Consider using a private member to make base calls. + 'base' キーワードの使用方法に誤りがあります。'base' の呼び出しはクロージャに使用できません。'base' の呼び出しを行うには、プライベート メンバーを使用してください。 + + + + The variable '{0}' is used in an invalid way + 変数 '{0}' の使用方法に誤りがあります + + + + The type '{0}' is less accessible than the value, member or type '{1}' it is used in. + 型 '{0}' は、使用されている値、メンバー、型 '{1}' よりもアクセシビリティが低く設定されています。 + + + + 'System.Void' can only be used as 'typeof<System.Void>' in F# + F# では、'System.Void' は 'typeof<System.Void>' としてのみ使用できます + + + + A type instantiation involves a byref type. This is not permitted by the rules of Common IL. + 型のインスタンス化に byref 型が使用されています。この操作は Common IL の規則では許可されていません。 + + + + Calls to 'reraise' may only occur directly in a handler of a try-with + 'reraise' への呼び出しを直接実行できるのは、try-with ハンドラーの中のみです。 + + + + Expression-splicing operators may only be used within quotations + 式スプライス演算子は引用符で囲む必要があります + + + + First-class uses of the expression-splicing operator are not permitted + 式スプライス演算子のファーストクラスの使用は許可されていません + + + + First-class uses of the address-of operators are not permitted + アドレス演算子のファーストクラスの使用は許可されていません + + + + First-class uses of the 'reraise' function is not permitted + 'reraise' 関数のファーストクラスの使用は許可されていません + + + + The byref typed value '{0}' cannot be used at this point + この時点で byref 型の値 '{0}' は使用できません + + + + 'base' values may only be used to make direct calls to the base implementations of overridden members + 'base' 値を使用できるのは、オーバーライドされたメンバーの基本実装に対して直接呼び出しを行う場合のみです。 + + + + Object constructors cannot directly use try/with and try/finally prior to the initialization of the object. This includes constructs such as 'for x in ...' that may elaborate to uses of these constructs. This is a limitation imposed by Common IL. + オブジェクト コンストラクターでは、オブジェクトの初期化前に try/with および try/finally を直接使用できません。'for x in ...' などのコストラクトを呼び出す可能性があるようなコンストラクトがこれに含まれます。これは Common IL での制限事項です。 + + + + The address of the variable '{0}' cannot be used at this point + この時点で変数 '{0}' のアドレスは使用できません + + + + The address of the static field '{0}' cannot be used at this point + この時点で静的フィールド '{0}' のアドレスは使用できません + + + + The address of the field '{0}' cannot be used at this point + この時点でフィールド '{0}' のアドレスは使用できません + + + + The address of an array element cannot be used at this point + この時点で配列要素のアドレスは使用できません + + + + The type of a first-class function cannot contain byrefs + ファーストクラス関数の型に byref を含むことはできません + + + + A method return type would contain byrefs which is not permitted + メソッドの戻り値の型に許可されていない byref が含まれています + + + + Invalid custom attribute value (not a constant or literal) + カスタム属性値が無効です (定数またはリテラルではありません) + + + + The attribute type '{0}' has 'AllowMultiple=false'. Multiple instances of this attribute cannot be attached to a single language element. + 属性の型 '{0}' に 'AllowMultiple=false' があります。この属性を持つ複数のインスタンスは、単一の言語要素にアタッチできません。 + + + + The member '{0}' is used in an invalid way. A use of '{1}' has been inferred prior to its definition at or near '{2}'. This is an invalid forward reference. + メンバー '{0}' の使用方法に誤りがあります。'{2}' または '{2}' 付近の定義の前に '{1}' の使用が推論されました。これは無効な前方参照です。 + + + + A byref typed value would be stored here. Top-level let-bound byref values are not permitted. + byref 型の値がここに保存されます。トップレベルの let-bound byref 値は許可されていません。 + + + + [<ReflectedDefinition>] terms cannot contain uses of the prefix splice operator '%' + [<ReflectedDefinition>] 用語には、プレフィックスのスプライス演算子 '%' を使用できません + + + + A function labeled with the 'EntryPointAttribute' attribute must be the last declaration in the last file in the compilation sequence. + 'EntryPointAttribute' 属性のラベルを付けた関数は、コンパイル シーケンスの最後のファイルの最後の宣言にする必要があります。 + + + + compiled form of the union case + 共用体ケースのコンパイル済みの形式 + + + + default augmentation of the union case + 共用体ケースの既定の拡張 + + + + The property '{0}' has the same name as a method in type '{1}'. + プロパティ '{0}' は、型 '{1}' のメソッドと名前が同じです。 + + + + The property '{0}' of type '{1}' has a getter and a setter that do not match. If one is abstract then the other must be as well. + 型 '{1}' のプロパティ '{0}' には一致しないゲッターとセッターがあります。一方が抽象の場合、もう一方も抽象にします。 + + + + The property '{0}' has the same name as another property in type '{1}', but one takes indexer arguments and the other does not. You may be missing an indexer argument to one of your properties. + プロパティ '{0}' は型 '{1}' の別のプロパティと名前が同じですが、一方はインデクサー引数を使用し、もう一方は使用していません。一方のプロパティでインデクサー引数を失う可能性があります。 + + + + A type would store a byref typed value. This is not permitted by Common IL. + 型に byref 型の値が保存されています。この操作は Common IL では許可されていません。 + + + + Duplicate method. The method '{0}' has the same name and signature as another method in type '{1}'. + 重複したメソッド。メソッド '{0}' は、名前とシグネチャが型 '{1}' の別のメソッドと同じです。 + + + + Duplicate method. The method '{0}' has the same name and signature as another method in type '{1}' once tuples, functions, units of measure and/or provided types are erased. + 重複したメソッド。メソッド '{0}' は、タプル、関数、測定単位、指定された型が消去されると、名前とシグネチャが型 '{1}' の他のメソッドと同じになります。 + + + + The method '{0}' has curried arguments but has the same name as another method in type '{1}'. Methods with curried arguments cannot be overloaded. Consider using a method taking tupled arguments. + メソッド '{0}' にはカリー化された引数が使用されていますが、型 '{1}' の別のメソッドと名前が同じです。カリー化された引数を使用したメソッドはオーバーロードできません。メソッドにはタプル化された引数を使用することをご検討ください。 + + + + Methods with curried arguments cannot declare 'out', 'ParamArray', 'optional', 'ReflectedDefinition', 'byref', 'CallerLineNumber', 'CallerMemberName', or 'CallerFilePath' arguments + カリー化された引数を使用したメソッドでは、'out'、'ParamArray'、'optional'、'ReflectedDefinition'、'byref'、'CallerLineNumber'、'CallerMemberName'、または 'CallerFilePath' の各引数を宣言できません + + + + Duplicate property. The property '{0}' has the same name and signature as another property in type '{1}'. + 重複したプロパティ。プロパティ '{0}' は、名前とシグネチャが型 '{1}' の別のプロパティと同じです。 + + + + Duplicate property. The property '{0}' has the same name and signature as another property in type '{1}' once tuples, functions, units of measure and/or provided types are erased. + 重複したプロパティ。プロパティ '{0}' は、タプル、関数、測定単位、指定された型が消去されると、名前とシグネチャが型 '{1}' の別のプロパティと同じになります。 + + + + Duplicate method. The abstract method '{0}' has the same name and signature as an abstract method in an inherited type. + 重複したメソッド。抽象メソッド '{0}' は、名前とシグネチャが継承型の抽象メソッドと同じです。 + + + + Duplicate method. The abstract method '{0}' has the same name and signature as an abstract method in an inherited type once tuples, functions, units of measure and/or provided types are erased. + 重複したメソッド。抽象メソッド '{0}' は、タプル、関数、測定単位、または指定された型が消去されると、名前とシグネチャが継承型の抽象メソッドと同じになります。 + + + + This type implements the same interface at different generic instantiations '{0}' and '{1}'. This is not permitted in this version of F#. + この型は、異なるジェネリックのインスタンス化 '{0}' と '{1}' で同じインターフェイスを実装しています。これは、このバージョンの F# で許可されていません。 + + + + The type of a field using the 'DefaultValue' attribute must admit default initialization, i.e. have 'null' as a proper value or be a struct type whose fields all admit default initialization. You can use 'DefaultValue(false)' to disable this check + 'DefaultValue' 属性を使用するフィールドの型は、既定の初期化を許可する必要があります。つまり、'null' が正規の値として含まれるか、すべてのフィールドが既定の初期化を許可する構造体型です。このチェックを無効にするには、'DefaultValue(false)' を使用します。 + + + + The type abbreviation contains byrefs. This is not permitted by F#. + 型略称に byref が含まれます。この操作は F# で許可されていません。 + + + + The variable '{0}' is bound in a quotation but is used as part of a spliced expression. This is not permitted since it may escape its scope. + 変数 '{0}' は引用符内でバインドされていますが、スプライスされた式の一部として使用されています。スコープが回避される可能性があるため、この操作は許可されていません。 + + + + Quotations cannot contain uses of generic expressions + 引用符内にはジェネリック式の使用を含めることはできません + + + + Quotations cannot contain function definitions that are inferred or declared to be generic. Consider adding some type constraints to make this a valid quoted expression. + 引用符内には、ジェネリック型に推論または宣言する関数定義を含めることはできません。有効な引用符付きの式にするには、何らかの型の制約を追加してください。 + + + + Quotations cannot contain object expressions + 引用符内には、オブジェクト式を含めることはできません + + + + Quotations cannot contain expressions that take the address of a field + 引用符内には、フィールドのアドレスを使用した式を含めることはできません + + + + Quotations cannot contain expressions that fetch static fields + 引用符内には、静的フィールドをフェッチする式を含めることはできません + + + + Quotations cannot contain inline assembly code or pattern matching on arrays + 引用符内にインライン アセンブラー コードまたは配列のパターン マッチを含めることはできません + + + + Quotations cannot contain descending for loops + 引用符内に降順の for loop を含めることはできません + + + + Quotations cannot contain expressions that fetch union case indexes + 引用符内には、共用体ケースのインデックスをフェッチする式を含めることはできません + + + + Quotations cannot contain expressions that set union case fields + 引用符内には、共用体ケースのフィールドを設定する式を含めることはできません + + + + Quotations cannot contain expressions that set fields in exception values + 引用符内には、例外値のフィールドを設定する式を含めることはできません + + + + Quotations cannot contain expressions that require byref pointers + 引用符内には、byref ポインターを必要とする式を含めることはできません + + + + Quotations cannot contain expressions that make member constraint calls, or uses of operators that implicitly resolve to a member constraint call + 引用符内にメンバーの制約を呼び出す式を含めること、または暗黙的にメンバーの制約の呼び出しに解決される演算子を使用することはできません + + + + Quotations cannot contain this kind of constant + 引用符内には、この種類の定数を含めることはできません + + + + Quotations cannot contain this kind of pattern match + 引用符内には、この種類のパターン マッチを含めることはできません + + + + Quotations cannot contain array pattern matching + 引用符内には、配列のパターン マッチを含めることはできません + + + + Quotations cannot contain this kind of type + 引用符内には、この種類の型を含めることはできません + + + + The declared type parameter '{0}' cannot be used here since the type parameter cannot be resolved at compile time + 宣言された型パラメーター '{0}' はコンパイル時に解決できないため、使用できません + + + + This code is less generic than indicated by its annotations. A unit-of-measure specified using '_' has been determined to be '1', i.e. dimensionless. Consider making the code generic, or removing the use of '_'. + このコードは注釈よりも総称性が低く設定されています。'_' を使用して指定された単位は、'1' (無次元) と判断されます。コードをジェネリックにするか、'_' を使用しないでください。 + + + + Type inference problem too complicated (maximum iteration depth reached). Consider adding further type annotations. + 複雑すぎるため、型推論ができません (最大反復回数に達しました)。さらに詳細な型の注釈を増やしてください。 + + + + Expected arguments to an instance member + インスタンス メンバーに対して引数を指定してください + + + + This indexer expects {0} arguments but is here given {1} + このインデクサーには {0} 個の引数が必要ですが、存在するのは {1} 個です + + + + Expecting a type supporting the operator '{0}' but given a function type. You may be missing an argument to a function. + 演算子 '{0}' をサポートし、特定の関数型である型が必要です。関数に対する引数が足りない可能性があります。 + + + + Expecting a type supporting the operator '{0}' but given a tuple type + 演算子 '{0}' をサポートする型が必要ですが、タプル型が指定されました + + + + None of the types '{0}' support the operator '{1}' + 型 '{0}' はいずれも演算子 '{1}' をサポートしていません + + + + The type '{0}' does not support the operator '{1}' + 型 '{0}' は演算子 '{1}' をサポートしていません + + + + None of the types '{0}' support the operator '{1}'. Consider opening the module 'Microsoft.FSharp.Linq.NullableOperators'. + 型 '{0}' はいずれも演算子 '{1}' をサポートしていません。'Microsoft.FSharp.Linq.NullableOperators' モジュールを開いてください。 + + + + The type '{0}' does not support the operator '{1}'. Consider opening the module 'Microsoft.FSharp.Linq.NullableOperators'. + 型 '{0}' は演算子 '{1}' をサポートしていません。'Microsoft.FSharp.Linq.NullableOperators' モジュールを開いてください。 + + + + The type '{0}' does not support a conversion to the type '{1}' + 型 '{0}' は型 '{1}' への変換をサポートしていません + + + + The type '{0}' has a method '{1}' (full name '{2}'), but the method is static + 型 '{0}' にメソッド '{1}' (フル ネームは '{2}') がありますが、メソッドは静的です + + + + The type '{0}' has a method '{1}' (full name '{2}'), but the method is not static + 型 '{0}' にメソッド '{1}' (フル ネームは '{2}') がありますが、メソッドは静的ではありません + + + + The constraints 'struct' and 'not struct' are inconsistent + 'struct' および 'not struct' という制約は矛盾しています + + + + The type '{0}' does not have 'null' as a proper value + 型 '{0}' に 'null' は使用できません + + + + The type '{0}' does not have 'null' as a proper value. To create a null value for a Nullable type use 'System.Nullable()'. + 型 '{0}' に 'null' は使用できません。Null 許容型に対して null 値を作成するには、'System.Nullable()' を使用します。 + + + + The type '{0}' does not support the 'comparison' constraint because it has the 'NoComparison' attribute + 型 '{0}' は 'NoComparison' 属性があるため、'comparison' 制約をサポートしません + + + + The type '{0}' does not support the 'comparison' constraint. For example, it does not support the 'System.IComparable' interface + 型 '{0}' は 'comparison' 制約をサポートしません。たとえば、'System.IComparable' インターフェイスをサポートしません。 + + + + The type '{0}' does not support the 'comparison' constraint because it is a record, union or struct with one or more structural element types which do not support the 'comparison' constraint. Either avoid the use of comparison with this type, or add the 'StructuralComparison' attribute to the type to determine which field type does not support comparison + 型 '{0}' は、'comparison' 制約をサポートしない 1 個または複数の構造体の要素型を持つレコード、共用体、または構造体なので、'comparison' 制約をサポートしません。この型では comparison を使用しないようにするか、または、comparison をサポートしないフィールド型を決定するために、'StructuralComparison' 属性を型に追加してください。 + + + + The type '{0}' does not support the 'equality' constraint because it has the 'NoEquality' attribute + 型 '{0}' は 'NoEquality' 属性があるため、'equality' 制約をサポートしません + + + + The type '{0}' does not support the 'equality' constraint because it is a function type + 型 '{0}' は関数型なので、'equality' 制約をサポートしません + + + + The type '{0}' does not support the 'equality' constraint because it is a record, union or struct with one or more structural element types which do not support the 'equality' constraint. Either avoid the use of equality with this type, or add the 'StructuralEquality' attribute to the type to determine which field type does not support equality + 型 '{0}' は、'equality' 制約をサポートしない 1 個または複数の構造体の要素型を持つレコード、共用体、または構造体なので、'equality' 制約をサポートしません。この型を持つ equality を使用しないでください。または、equality をサポートしないフィールド型を決定するために、'StructuralEquality' 属性を型に追加してください。 + + + + The type '{0}' is not a CLI enum type + 型 '{0}' は CLI の列挙型ではありません + + + + The type '{0}' has a non-standard delegate type + 型 '{0}' には標準ではないデリゲート型があります + + + + The type '{0}' is not a CLI delegate type + 型 '{0}' は CLI のデリゲート型ではありません + + + + This type parameter cannot be instantiated to 'Nullable'. This is a restriction imposed in order to ensure the meaning of 'null' in some CLI languages is not confusing when used in conjunction with 'Nullable' values. + の型パラメーターは 'Nullable' にインスタンス化できません。別の CLI 言語などでも 'Nullable' の値との関係で、'null' の意味があいまいにならないように、この制限があります。 + + + + A generic construct requires that the type '{0}' is a CLI or F# struct type + ジェネリック コンストラクトの型 '{0}' は、CLI または F# の構造体型にする必要があります + + + + A generic construct requires that the type '{0}' is an unmanaged type + ジェネリック コンストラクターの型 '{0}' はアンマネージ型にする必要があります + + + + The type '{0}' is not compatible with any of the types {1}, arising from the use of a printf-style format string + 型 '{0}' は、printf 形式の書式指定文字列の使用によって生じる型 {1} のいずれとも互換性がありません + + + + A generic construct requires that the type '{0}' have reference semantics, but it does not, i.e. it is a struct + ジェネリック コンストラクトの型 '{0}' には参照のセマンティクスが必要ですが、存在しません (つまり構造体です) + + + + A generic construct requires that the type '{0}' be non-abstract + ジェネリック コンストラクトの型 '{0}' は、非抽象にする必要があります + + + + A generic construct requires that the type '{0}' have a public default constructor + ジェネリック コンストラクトの型 '{0}' には、パブリック既定コンストラクターが必要です + + + + Type instantiation length mismatch + 型のインスタンス化の長さが一致しません + + + + Optional arguments not permitted here + オプションの引数は使用できません + + + + {0} is not a static member + {0} は静的メンバーではありません + + + + {0} is not an instance member + {0} はインスタンス メンバーではありません + + + + Argument length mismatch + 引数の長さが一致しません + + + + The argument types don't match + 引数の型が一致しません + + + + This method expects a CLI 'params' parameter in this position. 'params' is a way of passing a variable number of arguments to a method in languages such as C#. Consider passing an array for this argument + このメソッドのこの位置には、CLI 'params' パラメーターが必要です。'params' は、可変個数の引数を C# などの言語のメソッドに渡すときに使用されます。この引数には配列を渡してください。 + + + + The member or object constructor '{0}' is not {1} + メンバーまたはオブジェクト コンストラクター '{0}' は {1} ではありません + + + + The member or object constructor '{0}' is not {1}. Private members may only be accessed from within the declaring type. Protected members may only be accessed from an extending type and cannot be accessed from inner lambda expressions. + メンバーまたはオブジェクト コンストラクター '{0}' は {1} ではありません。プライベート メンバーには、宣言する型の中からのみアクセスできます。プロテクト メンバーには、拡張する型からのみアクセスでき、内部ラムダ式からアクセスすることはできません。 + + + + {0} is not a static method + {0} は静的メソッドではありません + + + + {0} is not an instance method + {0} はインスタンス メソッドではありません + + + + The member or object constructor '{0}' has no argument or settable return property '{1}'. {2}. + メンバーまたはオブジェクト コンストラクター '{0}' には、引数または設定可能な戻り値のプロパティ '{1}' がありません。{2} + + + + The object constructor '{0}' has no argument or settable return property '{1}'. {2}. + オブジェクト コンストラクター '{0}' には、引数または設定可能な戻り値のプロパティ '{1}' がありません。{2}。 + + + + The required signature is {0} + 必要なシグネチャは {0} です + + + + The member or object constructor '{0}' requires {1} argument(s). The required signature is '{2}'. + メンバーまたはオブジェクト コンストラクター '{0}' には {1} 個の引数が必要です。必要なシグネチャは '{2}' です。 + + + + The member or object constructor '{0}' requires {1} additional argument(s). The required signature is '{2}'. + メンバーまたはオブジェクト コンストラクター '{0}' には追加で {1} 個の引数が必要です。必要なシグネチャは '{2}' です。 + + + + The member or object constructor '{0}' requires {1} argument(s). The required signature is '{2}'. Some names for missing arguments are {3}. + メンバーまたはオブジェクト コンストラクター '{0}' には {1} 個の引数が必要です。必要なシグネチャは '{2}' です。足りない引数の名前は {3} です。 + + + + The member or object constructor '{0}' requires {1} additional argument(s). The required signature is '{2}'. Some names for missing arguments are {3}. + メンバーまたはオブジェクト コンストラクター '{0}' には追加で {1} 個の引数が必要です。必要なシグネチャは '{2}' です。足りない引数の名前は {3} です。 + + + + The member or object constructor '{0}' requires {1} argument(s) but is here given {2} unnamed and {3} named argument(s). The required signature is '{4}'. + メンバーまたはオブジェクト コンストラクター '{0}' には {1} 個の引数が必要ですが、名前がない引数が {2} 個、名前付き引数が {3} 個です。必要なシグネチャは '{4}' です。 + + + + The member or object constructor '{0}' takes {1} argument(s) but is here given {2}. The required signature is '{3}'. + メンバーまたはオブジェクト コンストラクター '{0}' には {1} 個の引数が必要ですが、{2} 個です。必要なシグネチャは '{3}' です。 + + + + The object constructor '{0}' takes {1} argument(s) but is here given {2}. The required signature is '{3}'. + オブジェクト コンストラクター '{0}' には {1} 個の引数が必要ですが、指定されているのは {2} 個です。必要なシグネチャは '{3}' です。 + + + + The object constructor '{0}' takes {1} argument(s) but is here given {2}. The required signature is '{3}'. If some of the arguments are meant to assign values to properties, consider separating those arguments with a comma (','). + オブジェクト コンストラクター '{0}' には {1} 個の引数が必要ですが、指定されているのは {2} 個です。必要なシグネチャは '{3}' です。いくつかの引数がプロパティに値を割り当てる引数である場合は、それらの引数をコンマ (',') で区切ることを検討してください。 + + + + The member or object constructor '{0}' takes {1} type argument(s) but is here given {2}. The required signature is '{3}'. + メンバーまたはオブジェクト コンストラクター '{0}' には {1} 個の型引数が必要ですが、存在するのは {2} 個です。必要なシグネチャは '{3}' です。 + + + + A member or object constructor '{0}' taking {1} arguments is not accessible from this code location. All accessible versions of method '{2}' take {3} arguments. + {1} 個の引数を使用するメンバーまたはオブジェクト コンストラクター '{0}' は、このコードの場所からはアクセスできません。メソッド '{2}' のすべてのアクセス可能なバージョンは {3} 個の引数を使用します。 + + + + Incorrect generic instantiation. No {0} member named '{1}' takes {2} generic arguments. + ジェネリックのインスタンス化が正しくありません。{2} のジェネリック引数を使用する '{1}' という {0} メンバーはありません。 + + + + The member or object constructor '{0}' does not take {1} argument(s). An overload was found taking {2} arguments. + メンバーまたはオブジェクト コンストラクター '{0}' は {1} 個の引数ではありません。{2} 個の引数を使用するオーバーロードが見つかりました。 + + + + No {0} member or object constructor named '{1}' takes {2} arguments + {2} 個の引数を使用する {0} メンバーまたはオブジェクト コンストラクター '{1}' がありません + + + + No {0} member or object constructor named '{1}' takes {2} arguments. Note the call to this member also provides {3} named arguments. + {2} 個の引数を使用する {0} メンバーまたはオブジェクト コンストラクター '{1}' がありません。このメンバーの呼び出しには、{3} 個の名前付き引数も必要です。 + + + + No {0} member or object constructor named '{1}' takes {2} arguments. The named argument '{3}' doesn't correspond to any argument or settable return property for any overload. + {2} 個の引数を使用する {0} メンバーまたはオブジェクト コンストラクター '{1}' がありません。名前付き引数 '{3}' に対応する、オーバーロードに合致した任意の引数、または設定可能な戻り値のプロパティはありません。 + + + + Method or object constructor '{0}' not found + メソッドまたはオブジェクト コンストラクター '{0}' が見つかりません + + + + No overloads match for method '{0}'. + メソッド '{0}' に一致するオーバーロードはありません。 + + + + A unique overload for method '{0}' could not be determined based on type information prior to this program point. A type annotation may be needed. + このプログラム ポイントよりも前の型情報に基づいて、メソッド '{0}' の固有のオーバーロードを決定することができませんでした。型の注釈が必要な場合があります。 + + + + Candidates: {0} + 候補: {0} + + + + The available overloads are shown below. + 使用できるオーバーロードを以下に示します。 + + + + Accessibility modifiers are not permitted on 'do' bindings, but '{0}' was given. + 'do' バインドにはアクセシビリティ修飾子を使用できませんが、'{0}' が指定されました。 + + + + End of file in #if section begun at or after here + この位置以前に始まった #if セクションの途中でファイルの終わりが見つかりました + + + + End of file in string begun at or before here + この位置以前に始まった文字列の途中でファイルの終わりが見つかりました + + + + End of file in verbatim string begun at or before here + この位置以前に始まった verbatim 文字列の途中でファイルの終わりが見つかりました + + + + End of file in comment begun at or before here + この位置以前に始まったコメントの途中でファイルの終わりが見つかりました + + + + End of file in string embedded in comment begun at or before here + この位置以前に始まったコメントに埋め込まれた文字列の途中でファイルの終わりが見つかりました + + + + End of file in verbatim string embedded in comment begun at or before here + この位置以前に始まったコメントに埋め込まれた verbatim 文字列の途中でファイルの終わりが見つかりました + + + + End of file in IF-OCAML section begun at or before here + この位置以前に始まった IF-OCAML セクションの途中でファイルの終わりが見つかりました + + + + End of file in directive begun at or before here + この位置以前に始まったディレクティブの途中でファイルの終わりが見つかりました + + + + No #endif found for #if or #else + #if または #else の #endif が見つかりません + + + + Attributes have been ignored in this construct + このコンストラクトの属性は無視されました + + + + 'use' bindings are not permitted in primary constructors + プライマリ コンストラクターに 'use' 束縛は使用できません + + + + 'use' bindings are not permitted in modules and are treated as 'let' bindings + モジュールに 'use' 束縛は使用できません。この束縛は 'let' 束縛として扱われます。 + + + + An integer for loop must use a simple identifier + ループの整数には単純な識別子を使用する必要があります + + + + At most one 'with' augmentation is permitted + 使用できる 'with' の拡張の数は 1 以下です + + + + A semicolon is not expected at this point + この位置にセミコロンは使用できません + + + + Unexpected end of input + 予期しない入力の終わりです: + + + + Accessibility modifiers are not permitted here, but '{0}' was given. + ここではアクセシビリティ修飾子を使用できませんが、'{0}' が指定されました。 + + + + Only '#' compiler directives may occur prior to the first 'namespace' declaration + 最初の 'namespace' 宣言の前に指定できるのは、'#' コンパイラ ディレクティブのみです + + + + Accessibility modifiers should come immediately prior to the identifier naming a construct + アクセシビリティ修飾子は、コンストラクトを示す識別子の直前に指定する必要があります + + + + Files should begin with either a namespace or module declaration, e.g. 'namespace SomeNamespace.SubNamespace' or 'module SomeNamespace.SomeModule', but not both. To define a module within a namespace use 'module SomeModule = ...' + ファイルは名前空間またはモジュールの宣言から開始する必要があります。たとえば、'namespace SomeNamespace.SubNamespace'、'module SomeNamespace.SomeModule' などです。ただし、両方は指定しません。名前空間内でモジュールを定義するには、'module SomeModule = ...' を使用してください。 + + + + A module abbreviation must be a simple name, not a path + モジュールの省略形はパスではなく簡易名にする必要があります + + + + Ignoring attributes on module abbreviation + モジュールの省略形にある属性を無視します + + + + The '{0}' accessibility attribute is not allowed on module abbreviation. Module abbreviations are always private. + モジュールの省略形には '{0}' アクセシビリティ属性を使用できません。モジュールの省略形は常にプライベートです。 + + + + The '{0}' visibility attribute is not allowed on module abbreviation. Module abbreviations are always private. + モジュールの省略形には '{0}' 可視属性を使用できません。モジュールの省略形は常にプライベートです。 + + + + Unclosed block + ブロックが閉じられていません + + + + Unmatched 'begin' or 'struct' + 'begin' または 'struct' が対応しません + + + + A module name must be a simple name, not a path + モジュール名はパスではなく簡易名にする必要があります + + + + Unexpected empty type moduleDefn list + 予期しない空の型の moduleDefn リストです: + + + + Attributes should be placed before 'val' + 属性は 'val' の前に配置してください + + + + Attributes are not permitted on interface implementations + インターフェイスの実装に属性は使用できません + + + + Syntax error + 構文エラー + + + + Augmentations are not permitted on delegate type moduleDefns + デリゲート型 moduleDefns では拡張が許可されていません + + + + Unmatched 'class', 'interface' or 'struct' + 'class'、'interface'、または 'struct' が対応しません + + + + A type definition requires one or more members or other declarations. If you intend to define an empty class, struct or interface, then use 'type ... = class end', 'interface end' or 'struct end'. + 型定義には、1 つまたは複数のメンバーまたは他の宣言が必要です。空のクラス、構造体、またはインターフェイスを定義する場合、'type ... = class end'、'interface end'、または 'struct end' を使用してください。 + + + + Unmatched 'with' or badly formatted 'with' block + with' が対応しないか、'with' ブロックの形式に誤りがあります + + + + 'get', 'set' or 'get,set' required + 'get'、'set'、または 'get,set' が必要です + + + + Only class types may take value arguments + 値の引数を使用できるのはクラス型のみです + + + + Unmatched 'begin' + 'begin' が対応しません + + + + Invalid declaration syntax + 宣言の構文が無効です + + + + 'get' and/or 'set' required + 'get'、'set'、またはその両方が必要です + + + + Type annotations on property getters and setters must be given after the 'get()' or 'set(v)', e.g. 'with get() : string = ...' + プロパティのゲッターおよびセッターでは、'get()' または 'set(v)' の後に型の注釈を指定する必要があります。たとえば、'with get() : string = ...' などです。 + + + + A getter property is expected to be a function, e.g. 'get() = ...' or 'get(index) = ...' + ゲッターのプロパティは関数にする必要があります (たとえば、'get() = ...'、'get(index) = ...') + + + + Multiple accessibilities given for property getter or setter + プロパティのゲッターまたはセッターに指定されたアクセシビリティが複数あります + + + + Property setters must be defined using 'set value = ', 'set idx value = ' or 'set (idx1,...,idxN) value = ... ' + プロパティ Set アクセス操作子を定義するには、'set value = '、'set idx value = '、または 'set (idx1,...,idxN) value = ... ' を使用する必要があります + + + + Interfaces always have the same visibility as the enclosing type + インターフェイスは、それを囲む型と常に同じ可視性を持ちます + + + + Accessibility modifiers are not allowed on this member. Abstract slots always have the same visibility as the enclosing type. + アクセシビリティ修飾子はこのメンバーでは許可されていません。抽象スロットには、それを囲む型と常に同じ可視性があります。 + + + + Attributes are not permitted on 'inherit' declarations + 'inherit' 宣言に属性は使用できません + + + + Accessibility modifiers are not permitted on an 'inherits' declaration + 'inherits' 宣言にアクセシビリティ修飾子は使用できません + + + + 'inherit' declarations cannot have 'as' bindings. To access members of the base class when overriding a method, the syntax 'base.SomeMember' may be used; 'base' is a keyword. Remove this 'as' binding. + 'inherit' 宣言に 'as' 束縛は指定できません。メソッドをオーバーライドするときに基底クラスのメンバーにアクセスするには、'base.SomeMember' という構文を使用できます。'base' はキーワードです。この 'as' 束縛は削除してください。 + + + + Attributes are not allowed here + ここでは属性を使用できません + + + + Accessibility modifiers are not permitted in this position for type abbreviations + 型略称のこの位置にアクセシビリティ修飾子は使用できません + + + + Accessibility modifiers are not permitted in this position for enum types + 列挙型のこの位置にアクセシビリティ修飾子は使用できません + + + + All enum fields must be given values + すべての列挙型フィールドに値を指定する必要があります + + + + Accessibility modifiers are not permitted on inline assembly code types + アクセシビリティ修飾子はインライン アセンブラー コード型では許可されていません + + + + Unexpected identifier: '{0}' + 予期しない識別子: '{0}': + + + + Accessibility modifiers are not permitted on union cases. Use 'type U = internal ...' or 'type U = private ...' to give an accessibility to the whole representation. + アクセシビリティ修飾子は共用体ケースに使用できません。表現全体にアクセシビリティを付与するには、'type U = internal ...' または 'type U = private ...' を使用してください。 + + + + Accessibility modifiers are not permitted on enumeration fields + 列挙型フィールドにアクセシビリティ修飾子は使用できません + + + + Consider using a separate record type instead + 代わりに別のレコード型を使用してください + + + + Accessibility modifiers are not permitted on record fields. Use 'type R = internal ...' or 'type R = private ...' to give an accessibility to the whole representation. + アクセシビリティ修飾子はレコード フィールドに使用できません。表現全体にアクセシビリティを付与するには、'type R = internal ...' または 'type R = private ...' を使用してください + + + + The declaration form 'let ... and ...' for non-recursive bindings is not used in F# code. Consider using a sequence of 'let' bindings + 非再帰的な束縛の宣言の形式 'let ... and ...' は、F# コードでは使用されません。'let' 束縛のシーケンスを使用してください。 + + + + Unmatched '(' + '(' が対応しません + + + + Successive patterns should be separated by spaces or tupled + 複数のパターンが連続する場合、スペースで区切るかタプル化します + + + + No matching 'in' found for this 'let' + この 'let' に対応する 'in' が見つかりません + + + + Error in the return expression for this 'let'. Possible incorrect indentation. + この 'let' の return 式にエラーが見つかりました。インデントが正しくない可能性があります。 + + + + The block following this '{0}' is unfinished. Every code block is an expression and must have a result. '{1}' cannot be the final code element in a block. Consider giving this block an explicit result. + この '{0}' に続くブロックが完了していません。すべてのコード ブロックは式であり、結果を持つ必要があります。'{1}' をブロック内の最後のコード要素にすることはできません。このブロックに明示的な結果を指定することを検討してください。 + + + + Incomplete conditional. Expected 'if <expr> then <expr>' or 'if <expr> then <expr> else <expr>'. + 条件が不完全です。'if <expr> then <expr>' または 'if <expr> then <expr> else <expr>' という形式にしてください。 + + + + 'assert' may not be used as a first class value. Use 'assert <expr>' instead. + 'assert' はファースト クラス値として使用できません。代わりに 'assert <expr>' を使用してください。 + + + + Identifier expected + 識別子がありません + + + + 'in' or '=' expected + 'in' または '=' が必要です + + + + The use of '->' in sequence and computation expressions is limited to the form 'for pat in expr -> expr'. Use the syntax 'for ... in ... do ... yield...' to generate elements in more complex sequence expressions. + シーケンス式およびコンピュテーション式で、'->' の使用は 'for pat in expr -> expr' の形式に制限されています。より複雑なシーケンス式で要素を生成するには、構文 'for ... in ... do ... yield...' を使用してください。 + + + + Successive arguments should be separated by spaces or tupled, and arguments involving function or method applications should be parenthesized + 複数の引数が連続する場合、スペースで区切るかタプル化します。関数またはメソッド アプリケーションに関する引数の場合、かっこで囲む必要があります。 + + + + Unmatched '[' + '[' が対応しません + + + + Missing qualification after '.' + '.' の後に修飾子がありません + + + + In F# code you may use 'expr.[expr]'. A type annotation may be required to indicate the first expression is an array + F# コードでは、'expr.[expr]' を使用できます。最初の式が配列であることを示すには、型の注釈が必要です。 + + + + Mismatched quotation, beginning with '{0}' + '{0}' で始まる引用符が対応しません + + + + Unmatched '{0}' + '{0}' が対応しません + + + + Unmatched '[|' + '[|' が対応しません + + + + Unmatched '{{' + '{{' が対応しません + + + + Field bindings must have the form 'id = expr;' + フィールドの束縛は 'id = expr;' という形式にする必要があります + + + + This member is not permitted in an object implementation + オブジェクトの実装では、このメンバーは使用できません + + + + Missing function body + 関数の本体がありません + + + + Syntax error in labelled type argument + ラベル付き型引数に構文エラーが見つかりました + + + + Unexpected infix operator in type expression + 型式に予期しない挿入演算子が見つかりました: + + + + The syntax '(typ,...,typ) ident' is not used in F# code. Consider using 'ident<typ,...,typ>' instead + F# コードでは、構文 '(typ,...,typ) ident' は使用されません。'ident<typ,...,typ>' を使用してください。 + + + + Invalid literal in type + 型のリテラルが無効です + + + + Unexpected infix operator in unit-of-measure expression. Legal operators are '*', '/' and '^'. + 単位式に予期しない挿入演算子が見つかりました。正しい演算子は '*'、'/'、および '^' です。 + + + + Unexpected integer literal in unit-of-measure expression + 単位式に予期しない整数リテラルが見つかりました: + + + + Syntax error: unexpected type parameter specification + 構文エラー: 予期しない型パラメーターが指定されました + + + + Mismatched quotation operator name, beginning with '{0}' + '{0}' で始まる演算子名の引用符が対応しません + + + + Active pattern case identifiers must begin with an uppercase letter + アクティブ パターンのケース識別子は先頭を大文字にする必要があります + + + + The '|' character is not permitted in active pattern case identifiers + 文字 ' |' は、アクティブなパターンのケース識別子では許可されていません + + + + Denominator must not be 0 in unit-of-measure exponent + 分母は単位指数で、0 以外でなければなりません + + + + No '=' symbol should follow a 'namespace' declaration + 'namespace' 宣言の後に '=' 記号は指定できません + + + + The syntax 'module ... = struct .. end' is not used in F# code. Consider using 'module ... = begin .. end' + F# コードでは 'module ... = struct .. end' という構文は使用されません。'module ... = begin .. end' を使用してください。 + + + + The syntax 'module ... : sig .. end' is not used in F# code. Consider using 'module ... = begin .. end' + F# コードでは 'module ... : sig .. end' という構文は使用されません。'module ... = begin .. end' を使用してください。 + + + + A static field was used where an instance field is expected + インスタンス フィールドが必要な場所に静的フィールドが使用されました + + + + Method '{0}' is not accessible from this code location + メソッド '{0}' はこのコードの場所からアクセスできません + + + + Implicit product of measures following / + / に続く暗黙的な単位の積 + + + + Unexpected SynMeasure.Anon + 予期しない SynMeasure.Anon です: + + + + Non-zero constants cannot have generic units. For generic zero, write 0.0<_>. + 0 でない定数にジェネリック ユニットは使用できません。ジェネリックな 0 の場合、0.0<_> と記述してください。 + + + + In sequence expressions, results are generated using 'yield' + シーケンス式の結果は、'yield' を使用して生成されます + + + + Unexpected big rational constant + 有理定数が大きすぎます: + + + + Units-of-measure supported only on float, float32, decimal and signed integer types + float 型、float32 型、decimal 型、および符号付き整数型でのみサポートされる単位です + + + + Unexpected Const_uint16array + 予期しない Const_uint16array です: + + + + Unexpected Const_bytearray + 予期しない Const_bytearray です: + + + + A parameter with attributes must also be given a name, e.g. '[<Attribute>] Name : Type' + 属性を持つパラメーターには名前を指定してください (たとえば、'[<Attribute>] Name : Type') + + + + Return values cannot have names + 戻り値には名前を指定できません + + + + MemberKind.PropertyGetSet only expected in parse trees + 解析ツリーに使用できるのは MemberKind.PropertyGetSet のみです + + + + Namespaces cannot contain values. Consider using a module to hold your value declarations. + 名前空間に値を含めることはできません。値の宣言を保持するモジュールを使用してください。 + + + + Namespaces cannot contain extension members except in the same file and namespace declaration group where the type is defined. Consider using a module to hold declarations of extension members. + 型を定義したファイルおよび名前空間宣言グループの場合を除き、名前空間に拡張メンバーを含めることはできません。拡張メンバーの宣言を保持するモジュールを使用してください。 + + + + Multiple visibility attributes have been specified for this identifier + この識別子に複数の可視属性が指定されました + + + + Multiple visibility attributes have been specified for this identifier. 'let' bindings in classes are always private, as are any 'let' bindings inside expressions. + この識別子に複数の可視属性が指定されました。式内のすべての 'let' 束縛と同様に、クラス内の 'let' 束縛は常にプライベートです。 + + + + The name '({0})' 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 '{1}' instead. + 名前 '({0})' はメンバー名として使用しないでください。型の比較セマンティクスを定義するには、'System.IComparable' インターフェイスを実装してください。他の CLI 言語から使用するために静的メンバーを定義する場合、代わりに '{1}' という名前を使用してください。 + + + + The name '({0})' 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 '{1}' instead. + 名前 '({0})' はメンバー名として使用しないでください。型の等値セマンティクスを定義するには、'Object.Equals' メンバーをオーバーライドしてください。他の CLI 言語から使用するために静的メンバーを定義する場合、代わりに '{1}' という名前を使用してください。 + + + + The name '({0})' should not be used as a member name. If defining a static member for use from other CLI languages then use the name '{1}' instead. + 名前 '({0})' はメンバー名として使用しないでください。他の CLI 言語から使用するために静的メンバーを定義する場合、代わりに '{1}' という名前を使用してください。 + + + + The name '({0})' should not be used as a member name because it is given a standard definition in the F# library over fixed types + 名前 '({0})' はメンバー名として使用しないでください。固定の型に関して、F# ライブラリではこの名前は標準的な定義が指定されています。 + + + + The '{0}' operator should not normally be redefined. To define overloaded comparison semantics for a particular type, implement the 'System.IComparable' interface in the definition of that type. + 通常、'{0}' 演算子は再定義できません。特定の型について、オーバーロードされた比較セマンティクスを定義するには、その型の定義で 'System.IComparable' インターフェイスを実装してください。 + + + + The '{0}' operator should not normally be redefined. To define equality semantics for a type, override the 'Object.Equals' member in the definition of that type. + 通常、'{0}' 演算子は再定義できません。型の等値セマンティクスを定義するには、その型の定義で 'Object.Equals' メンバーをオーバーライドしてください。 + + + + The '{0}' operator should not normally be redefined. Consider using a different operator name + 通常、'{0}' 演算子は再定義できません。別の演算子名を使用してください。 + + + + The '{0}' operator cannot be redefined. Consider using a different operator name + '{0}' 演算子は再定義できません。別の演算子名を使用してください。 + + + + Expected module or namespace parent {0} + モジュールまたは名前空間の親 {0} を指定してください + + + + The struct, record or union type '{0}' implements the interface 'System.IComparable' explicitly. You must apply the 'CustomComparison' attribute to the type. + 構造体型、レコード型、または共用体型の '{0}' はインターフェイス 'System.IComparable' を明示的に実装しています。この型には 'CustomComparison' 属性を適用する必要があります。 + + + + The struct, record or union type '{0}' implements the interface 'System.IComparable<_>' explicitly. You must apply the 'CustomComparison' attribute to the type, and should also provide a consistent implementation of the non-generic interface System.IComparable. + 構造体型、レコード型、または共用体型の '{0}' は、インターフェイス 'System.IComparable<_>' を明示的に実装しています。この型には 'CustomComparison' 属性を適用し、さらに整合性のある非ジェネリック インターフェイス System.IComparable の実装を用意する必要があります。 + + + + The struct, record or union type '{0}' implements the interface 'System.IStructuralComparable' explicitly. Apply the 'CustomComparison' attribute to the type. + 構造体型、レコード型、または共用体型の '{0}' はインターフェイス 'System.IStructuralComparable' を明示的に実装しています。この型には 'CustomComparison' 属性を適用してください。 + + + + This record contains fields from inconsistent types + このレコードには、相反する型からのフィールドが含まれます + + + + DLLImport stubs cannot be inlined + DLLImport スタブはインライン展開できません + + + + Structs may only bind a 'this' parameter at member declarations + 構造体は、メンバーの宣言の 'this' パラメーターのみをバインドできます + + + + Unexpected expression at recursive inference point + 再帰的推論ポイントに予期しない式があります: + + + + This code is less generic than required by its annotations because the explicit type variable '{0}' could not be generalized. It was constrained to be '{1}'. + 明示的な型変数 '{0}' をジェネリック化できないため、このコードは、注釈に必要な総称性よりも低くなります。このコードは '{1}' に制限されました。 + + + + One or more of the explicit class or function type variables for this binding could not be generalized, because they were constrained to other types + この束縛に関する 1 つまたは複数の明示的クラスまたは関数型の変数は、他の型に制限されているため、ジェネリック化できませんでした。 + + + + A generic type parameter has been used in a way that constrains it to always be '{0}' + 常に '{0}' であるという制約があるジェネリック型パラメーターが使用されました + + + + This type parameter has been used in a way that constrains it to always be '{0}' + 常に '{0}' であるという制約がある型パラメーターが使用されました + + + + The type parameters inferred for this value are not stable under the erasure of type abbreviations. This is due to the use of type abbreviations which drop or reorder type parameters, e.g. \n\ttype taggedInt<'a> = int or\n\ttype swap<'a,'b> = 'b * 'a.\nConsider declaring the type parameters for this value explicitly, e.g.\n\tlet f<'a,'b> ((x,y) : swap<'b,'a>) : swap<'a,'b> = (y,x). + この値で推論された型パラメーターは、型略称がなくなると安定しません。これは、型パラメーターの脱落や順序の変更を行う型略称を使用しているためです。次に例を示します。\n\ttype taggedInt<'a> = int または\n\ttype swap<'a,'b> = 'b * 'a\nこの値の型パラメーターを明示的に宣言してください。次に例を示します。\n\tlet f<'a,'b> ((x,y) : swap<'b,'a>) : swap<'a,'b> = (y,x) + + + + Explicit type parameters may only be used on module or member bindings + 明示的な型パラメーターを使用できるのは、モジュールまたはメンバーの束縛のみです + + + + You must explicitly declare either all or no type parameters when overriding a generic abstract method + ジェネリック抽象メソッドをオーバーライドする場合、明示的にすべての型パラメーターを宣言するか、まったく宣言しないでください + + + + The field labels and expected type of this record expression or pattern do not uniquely determine a corresponding record type + フィールド ラベルとこのレコード式またはパターンの型だけでは、対応するレコード型を一意に決定できません + + + + The field '{0}' appears twice in this record expression or pattern + のレコード式またはパターンに、フィールド '{0}' が 2 回出現します + + + + Unknown union case + 不明な共用体ケースです + + + + This code is not sufficiently generic. The type variable {0} could not be generalized because it would escape its scope. + このコードの総称性が十分ではありません。スコープが回避されるため、型変数 {0} をジェネリック化することはできません。 + + + + A property cannot have explicit type parameters. Consider using a method instead. + プロパティには明示的な型パラメーターを使用できません。代わりにメソッドを使用してください。 + + + + A constructor cannot have explicit type parameters. Consider using a static construction method instead. + コンストラクターには明示的な型パラメーターを使用できません。代わりに静的構築のメソッドを使用してください。 + + + + This instance member needs a parameter to represent the object being invoked. Make the member static or use the notation 'member x.Member(args) = ...'. + このインスタンス メンバーには、呼び出されるオブジェクトを表すパラメーターが必要です。メンバーを静的にするか、'member x.Member(args) = ...' という表記を使用してください。 + + + + Unexpected source-level property specification in syntax tree + 構文ツリーに予期しないソースレベルのプロパティの指定があります: + + + + A static initializer requires an argument + 静的初期化子には引数が必要です + + + + An object constructor requires an argument + オブジェクト コンストラクターには引数が必要です + + + + This static member should not have a 'this' parameter. Consider using the notation 'member Member(args) = ...'. + この静的メンバーに 'this' パラメーターを指定することはできません。'member Member(args) = ...' という表記を使用してください。 + + + + An explicit static initializer should use the syntax 'static new(args) = expr' + 明示的な静的初期化子には 'static new(args) = expr' という構文を使用してください + + + + An explicit object constructor should use the syntax 'new(args) = expr' + 明示的なオブジェクト コンストラクターには 'new(args) = expr' という構文を使用してください + + + + Unexpected source-level property specification + 予期しないソースレベルのプロパティの指定があります: + + + + This form of object expression is not used in F#. Use 'member this.MemberName ... = ...' to define member implementations in object expressions. + この形式のオブジェクト式は F# では使用されません。オブジェクト式でメンバーの実装を定義するには、'member this.MemberName ... = ...' を使用してください。 + + + + Invalid declaration + 宣言が無効です + + + + Attributes are not allowed within patterns + パターン内では属性を使用できません + + + + The generic function '{0}' must be given explicit type argument(s) + ジェネリック関数 '{0}' に明示的な型引数を指定する必要があります + + + + The method or function '{0}' should not be given explicit type argument(s) because it does not declare its type parameters explicitly + メソッドまたは関数 '{0}' は、型パラメーターを明示的に宣言していないため、明示的な型引数を指定しないでください + + + + This value, type or method expects {0} type parameter(s) but was given {1} + この値、型、またはメソッドには {0} 型パラメーターを使用しますが、{1} が指定されました + + + + The default, zero-initializing constructor of a struct type may only be used if all the fields of the struct type admit default initialization + 構造体型のすべてのフィールドが既定の初期化を許可している場合のみ、既定である、ゼロで初期化した構造型のコンストラクターを使用できます。 + + + + Couldn't find Dispose on IDisposable, or it was overloaded + IDisposable に Dispose が見つからないか、Dispose がオーバーロードされました + + + + This value is not a literal and cannot be used in a pattern + この値はリテラルではないため、パターンに使用できません + + + + This field is readonly + このフィールドは読み取り専用です + + + + Named arguments must appear after all other arguments + 名前付き引数は、その他の引数の後ろに指定してください + + + + This function value is being used to construct a delegate type whose signature includes a byref argument. You must use an explicit lambda expression taking {0} arguments. + この関数値は、byref 引数を含むシグネチャのデリゲート型を構築するために使用されます。{0} 個の引数を使用する明示的なラムダ式を使用する必要があります。 + + + + The type '{0}' is not a type whose values can be enumerated with this syntax, i.e. is not compatible with either seq<_>, IEnumerable<_> or IEnumerable and does not have a GetEnumerator method + 型 '{0}' は、この構文で列挙できる値を持つ型ではありません。つまり、seq<_>、IEnumerable<_>、または IEnumerable のいずれとも互換性がなく、GetEnumerator メソッドを含みません。 + + + + This recursive binding uses an invalid mixture of recursive forms + この再帰的束縛に使用されている再帰形式の混合は無効です + + + + This is not a valid object construction expression. Explicit object constructors must either call an alternate constructor or initialize all fields of the object and specify a call to a super class constructor. + これは有効なオブジェクト構築式ではありません。明示的なオブジェクト コンストラクターでは、代わりのコンストラクターを呼び出すかまたはオブジェクトのすべてのフィールドを初期化し、スーパークラス コンストラクターの呼び出しを指定する必要があります。 + + + + Invalid constraint + 制約が無効です + + + + Invalid constraint: the type used for the constraint is sealed, which means the constraint could only be satisfied by at most one solution + 無効な制約: 制約に使用された型がシールドです。つまり、制約を満たすことができるのは、最高でも 1 つの解です。 + + + + An 'enum' constraint must be of the form 'enum<type>' + 'enum' 制約は 'enum<type>' という形式で指定する必要があります + + + + 'new' constraints must take one argument of type 'unit' and return the constructed type + 'new' 制約は型 'unit' の引数を 1 つ指定し、構築された型を返す必要があります + + + + This property has an invalid type. Properties taking multiple indexer arguments should have types of the form 'ty1 * ty2 -> ty3'. Properties returning functions should have types of the form '(ty1 -> ty2)'. + このプロパティの型は無効です。複数のインデクサー引数を使用するプロパティには、'ty1 * ty2 -> ty3' という形式の型を使用してください。関数を返すプロパティには、'(ty1 -> ty2)' という形式の型を使用してください。 + + + + Expected unit-of-measure parameter, not type parameter. Explicit unit-of-measure parameters must be marked with the [<Measure>] attribute. + 型パラメーターではなく単位パラメーターを指定してください。明示的な単位パラメーターは [<Measure>] 属性でマークする必要があります。 + + + + Expected type parameter, not unit-of-measure parameter + 単位パラメーターではなく型パラメーターを指定してください + + + + Expected type, not unit-of-measure + 単位ではなく型を指定してください + + + + Expected unit-of-measure, not type + 型ではなく単位を指定してください + + + + Units-of-measure cannot be used as prefix arguments to a type. Rewrite as postfix arguments in angle brackets. + 型に対するプレフィックス引数として単位を使用することはできません。山かっこで囲んだ後置引数として書き換えてください。 + + + + Unit-of-measure cannot be used in type constructor application + 型コンストラクター応用には単位を使用できません + + + + This control construct may only be used if the computation expression builder defines a '{0}' method + この制御コンストラクトを使用できるのは、コンピュテーション式ビルダーが '{0}' メソッドを定義する場合のみです + + + + This type has no nested types + この型に入れ子の型はありません + + + + Unexpected {0} in type expression + 型式に予期しない {0} があります: + + + + Type parameter cannot be used as type constructor + 型パラメーターは型コンストラクターとして使用できません + + + + Illegal syntax in type expression + 型式の構文が正しくありません + + + + Anonymous unit-of-measure cannot be nested inside another unit-of-measure expression + 匿名の単位は、別の単位式の中に入れ子にすることはできません + + + + Anonymous type variables are not permitted in this declaration + この宣言で匿名型の変数は使用できません + + + + Unexpected / in type + 型に予期しない / があります: + + + + Unexpected type arguments + 予期しない型引数です: + + + + Optional arguments are only permitted on type members + 型メンバーにはオプションの引数のみを使用できます + + + + Name '{0}' not bound in pattern context + 名前 '{0}' がパターン コンテキストにバインドされていません + + + + Non-primitive numeric literal constants cannot be used in pattern matches because they can be mapped to multiple different types through the use of a NumericLiteral module. Consider using replacing with a variable, and use 'when <variable> = <constant>' at the end of the match clause. + プリミティブではない数値リテラル定数は、NumericLiteral モジュールを介して複数の型にマップされる可能性があるため、パターン マッチには使用できません。変数で置き換え、match 句の末尾に 'when <variable> = <constant>' を使用してください。 + + + + Type arguments cannot be specified here + ここで型引数は指定できません + + + + Only active patterns returning exactly one result may accept arguments + 結果を 1 つだけ返すアクティブ パターンのみが、引数を使用できます + + + + Invalid argument to parameterized pattern label + パラメーター化されたパターン ラベルに無効な引数が指定されました + + + + Internal error. Invalid index into active pattern array + 内部エラー。アクティブ パターン配列への無効なインデックスです。 + + + + This union case does not take arguments + この共用体ケースに引数は指定できません + + + + This union case takes one argument + この共用体ケースには 1 つの引数を指定します + + + + This union case expects {0} arguments in tupled form + この共用体ケースにはタプル形式の引数を {0} 個指定してください + + + + Field '{0}' is not static + フィールド '{0}' は静的ではありません + + + + This field is not a literal and cannot be used in a pattern + このフィールドはリテラルではないため、パターンに使用できません + + + + This is not a variable, constant, active recognizer or literal + これは変数、定数、アクティブ レコグナイザー、またはリテラルではありません + + + + This is not a valid pattern + これは有効なパターンではありません + + + + Character range matches have been removed in F#. Consider using a 'when' pattern guard instead. + F# では文字範囲の一致が削除されました。代わりに 'when' パターン ガードを使用してください。 + + + + Illegal pattern + パターンが正しくありません + + + + Syntax error - unexpected '?' symbol + 構文エラー - 予期しない '?' 記号です + + + + Expected {0} expressions, got {1} + {0} 式を指定する必要がありますが、{1} が指定されました + + + + TcExprUndelayed: delayed + TcExprUndelayed: 遅延しました + + + + This expression form may only be used in sequence and computation expressions + この式の形式を使用できるのは、シーケンス式またはコンピュテーション式のみです + + + + Invalid object expression. Objects without overrides or interfaces should use the expression form 'new Type(args)' without braces. + オブジェクト式が無効です。オーバーライドまたはインターフェイスがないオブジェクトには、かっこなしで 'new Type(args)' という形式の式を使用してください。 + + + + Invalid object, sequence or record expression + オブジェクト式、シーケンス式、またはレコード式が無効です + + + + Invalid record, sequence or computation expression. Sequence expressions should be of the form 'seq {{ ... }}' + 無効なレコード、シーケンス式、またはコンピュテーション式です。シーケンス式は 'seq {{ ... }}' という形式にしてください。 + + + + This list or array expression includes an element of the form 'if ... then ... else'. Parenthesize this expression to indicate it is an individual element of the list or array, to disambiguate this from a list generated using a sequence expression + このリスト式または配列式には、'if ... then ... else' という形式の要素が含まれます。この式をかっこで囲んでリストまたは配列の個別の要素であることを示し、シーケンス式を使用して生成されたリストとこのリストを区別してください。 + + + + Unable to parse format string '{0}' + 書式指定文字列 '{0}' を解析できません + + + + This list expression exceeds the maximum size for list literals. Use an array for larger literals and call Array.ToList. + このリスト式は、リスト リテラルの最大サイズを超えています。より大きなリテラルの配列を使用し、Array.ToList を呼び出してください。 + + + + The expression form 'expr then expr' may only be used as part of an explicit object constructor + 明示的なオブジェクト コンストラクターの一部としてのみ、'expr then expr' という形式の式を使用できます + + + + Named arguments cannot be given to member trait calls + 名前付き引数をメンバーの特徴 (trait) の呼び出しに指定することはできません + + + + This is not a valid name for an enumeration case + 列挙型のケースの有効な名前ではありません + + + + This field is not mutable + このフィールドは変更可能ではありません + + + + This construct may only be used within list, array and sequence expressions, e.g. expressions of the form 'seq {{ ... }}', '[ ... ]' or '[| ... |]'. These use the syntax 'for ... in ... do ... yield...' to generate elements + このコンストラクトは、リスト式、配列式、およびシーケンス式内でのみ使用できます (たとえば、'seq {{ ... }}'、'[ ... ]'、'[| ... |]' などの形式の式)。この場合、要素を生成するには 'for ... in ... do ... yield...' という構文を使用します。 + + + + This construct may only be used within computation expressions. To return a value from an ordinary function simply write the expression without 'return'. + このコンストラクトはコンピュテーション式内でのみ使用できます。通常の関数から値を返すには、'return' を使用せずに式を記述してください。 + + + + This construct may only be used within sequence or computation expressions + このコンストラクトはシーケンス式およびコンピュテーション式内でのみ使用できます + + + + This construct may only be used within computation expressions + このコンストラクトはコンピュテーション式内でのみ使用できます + + + + Invalid indexer expression + インデクサー式が無効です + + + + The operator 'expr.[idx]' has been used on an object of indeterminate type based on information prior to this program point. Consider adding further type constraints + このプログラムのポイントよりも前の情報に基づいた不確定の型のオブジェクトに、演算子 'expr.[idx]' が使用されました。型の制約を増やしてください。 + + + + Cannot inherit from a variable type + 変数型から継承できません + + + + Calls to object constructors on type parameters cannot be given arguments + 型パラメーター上のオブジェクト コンストラクターの呼び出しに引数を指定することはできません + + + + The 'CompiledName' attribute cannot be used with this language element + この言語要素では、'CompiledName' 属性を使用できません + + + + '{0}' may only be used with named types + '{0}' を使用できるのは、名前付き型のみです + + + + 'inherit' cannot be used on interface types. Consider implementing the interface by using 'interface ... with ... end' instead. + インターフェイス型に 'inherit' は使用できません。代わりに 'interface ... with ... end' を使用してインターフェイスを実装してください。 + + + + 'new' cannot be used on interface types. Consider using an object expression '{{ new ... with ... }}' instead. + インターフェイス型では 'new' を使用できません。代わりにオブジェクト式 '{{ new ... with ... }}' を使用してください。 + + + + Instances of this type cannot be created since it has been marked abstract or not all methods have been given implementations. Consider using an object expression '{{ new ... with ... }}' instead. + abstract とマークされているか、一部のメソッドが実装されていないため、この型のインスタンスを作成できません。代わりにオブジェクト式 '{{ new ... with ... }}' を使用してください。 + + + + It is recommended that objects supporting the IDisposable interface are created using the syntax 'new Type(args)', rather than 'Type(args)' or 'Type' as a function value representing the constructor, to indicate that resources may be owned by the generated value + IDisposable インターフェイスをサポートするオブジェクトは、コンストラクターを表す関数値として 'Type(args)' や 'Type' ではなく 'new Type(args)' の構文を使用して作成することをお勧めします。これは、リソースが生成された値に所有される可能性があることを示すためです + + + + '{0}' may only be used to construct object types + '{0}' は、オブジェクト型を構築するときにのみ使用できます + + + + Constructors for the type '{0}' must directly or indirectly call its implicit object constructor. Use a call to the implicit object constructor instead of a record expression. + 型 '{0}' のコンストラクターはその暗黙的なオブジェクト コンストラクターを直接、または間接的に呼び出す必要があります。レコード式ではなく、暗黙的なオブジェクト コンストラクターの呼び出しを使用してください。 + + + + The field '{0}' has been given a value, but is not present in the type '{1}' + フィールド '{0}' に値が指定されましたが、このフィールドは型 '{1}' に存在しません + + + + No assignment given for field '{0}' of type '{1}' + 型 '{1}' のフィールド '{0}' に割り当てが指定されていません + + + + Extraneous fields have been given values + 不適切なフィールドに値を指定しました + + + + Only overrides of abstract and virtual members may be specified in object expressions + オブジェクト式に指定できるのは、抽象メンバーおよび仮想メンバーのオーバーライドのみです。 + + + + The member '{0}' does not correspond to any abstract or virtual method available to override or implement. + メンバー '{0}' は、オーバーライドまたは実装に使用できるどの抽象メソッドまたは仮想メソッドにも対応していません。 + + + + The type {0} contains the member '{1}' but it is not a virtual or abstract method that is available to override or implement. + 型 {0} にメンバー '{1}' が含まれていますが、このメンバーはオーバーライドまたは実装に使用できる仮想メソッドでも抽象メソッドでもありません。 + + + + The member '{0}' does not accept the correct number of arguments. {1} argument(s) are expected, but {2} were given. The required signature is '{3}'.{4} + メンバー '{0}' の引数の数が正しくありません。{1} 個の引数が必要ですが、指定されたのは {2} 個です。必要な署名は '{3}' です。{4} + + + + The member '{0}' does not accept the correct number of arguments. One overload accepts {1} arguments, but {2} were given. The required signature is '{3}'.{4} + メンバー '{0}' の引数の数が正しくありません。1 つのオーバーロードには {1} 個の引数を指定できますが、{2} 個が指定されました。必要な署名は '{3}' です。{4} + + + + A simple method name is required here + ここでは単純なメソッド名が必要です + + + + The types System.ValueType, System.Enum, System.Delegate, System.MulticastDelegate and System.Array cannot be used as super types in an object expression or class + 型 System.ValueType、System.Enum、System.Delegate、System.MulticastDelegate、および System.Array は、オブジェクト式またはクラスのスーパー型として使用できません + + + + 'new' must be used with a named type + 名前付き型には 'new' を使用してください + + + + Cannot create an extension of a sealed type + シールド型の拡張は作成できません + + + + No arguments may be given when constructing a record value + レコード値を構築するときに指定できる引数はありません + + + + Interface implementations cannot be given on construction expressions + 構築式ではインターフェイスの実装を指定できません + + + + Object construction expressions may only be used to implement constructors in class types + オブジェクト構築式は、クラス型のコンストラクターを実装する場合にのみ使用できます + + + + Only simple bindings of the form 'id = expr' can be used in construction expressions + 構築式に使用できるのは、'id = expr' という形式の単純な束縛のみです + + + + Objects must be initialized by an object construction expression that calls an inherited object constructor and assigns a value to each field + オブジェクトを初期化するには、継承したオブジェクト コンストラクターを呼び出し、値を各フィールドに割り当てるオブジェクト構築式を使用してください。 + + + + Expected an interface type + インターフェイスの型を指定してください + + + + Constructor expressions for interfaces do not take arguments + インターフェイスのコンストラクター式には引数を使用できません + + + + This object constructor requires arguments + このオブジェクト コンストラクターには引数が必要です + + + + 'new' may only be used with object constructors + 'new' を使用できるのは、オブジェクト コンストラクターのみです + + + + At least one override did not correctly implement its corresponding abstract member + 少なくとも 1 つのオーバーライドが対応する抽象メンバーを正しく実装していません + + + + This numeric literal requires that a module '{0}' defining functions FromZero, FromOne, FromInt32, FromInt64 and FromString be in scope + 数値リテラルの場合、関数 FromZero、FromOne、FromInt32、FromInt64、および FromString を定義するモジュール '{0}' がスコープに含まれている必要があります + + + + Invalid record construction + レコードの構造が無効です + + + + The expression form {{ expr with ... }} may only be used with record types. To build object types use {{ new Type(...) with ... }} + {{ expr with ... }} という形式の式を使用できるのはレコード型のみです。オブジェクトの型を構築するには、{{ new Type(...) with ... }} を使用してください。 + + + + The inherited type is not an object model type + 継承された型はオブジェクト モデル型ではありません + + + + Object construction expressions (i.e. record expressions with inheritance specifications) may only be used to implement constructors in object model types. Use 'new ObjectType(args)' to construct instances of object model types outside of constructors + オブジェクト構築式 (つまり、継承の指定があるレコード式) は、オブジェクト モデル型のコンストラクターを実装する場合にのみ使用できます。コンストラクターの外側でオブジェクト モデル型のインスタンスを構築するには、'new ObjectType(args)' を使用してください。 + + + + '{{ }}' is not a valid expression. Records must include at least one field. Empty sequences are specified by using Seq.empty or an empty list '[]'. + '{{ }}' は有効な式ではありません。レコードには 1 つ以上のフィールドを含める必要があります。空のシーケンスを指定するには、Seq.empty または空のリスト '[]' をご使用ください。 + + + + This type is not a record type. Values of class and struct types must be created using calls to object constructors. + この型はレコード型ではありません。クラス型および構造体型の値は、オブジェクト コンストラクターの呼び出しを使用して作成してください。 + + + + This type is not a record type + この型はレコード型ではありません + + + + This construct is ambiguous as part of a computation expression. Nested expressions may be written using 'let _ = (...)' and nested computations using 'let! res = builder {{ ... }}'. + このコンストラクトはコンピュテーション式の一部としてあいまいです。入れ子の式を記述するには 'let _ = (...)' を使用し、入れ子の計算には 'let! res = builder {{ ... }}' を使用します。 + + + + This construct is ambiguous as part of a sequence expression. Nested expressions may be written using 'let _ = (...)' and nested sequences using 'yield! seq {{... }}'. + このコンストラクトはシーケンス式の一部としてあいまいです。入れ子の式を記述するには 'let _ = (...)' を使用し、入れ子のシーケンスには 'yield! seq {{... }}' を使用します。 + + + + 'do!' cannot be used within sequence expressions + シーケンス式内には 'do!' を使用できません + + + + The use of 'let! x = coll' in sequence expressions is not permitted. Use 'for x in coll' instead. + シーケンス式では 'let! x = coll' を使用できません。代わりに 'for x in coll' を使用してください。 + + + + 'try'/'with' cannot be used within sequence expressions + シーケンス式内には 'try'/'with' を使用できません + + + + In sequence expressions, multiple results are generated using 'yield!' + シーケンス式で、複数の結果は 'yield!' を使用して生成されます + + + + Invalid assignment + 割り当てが無効です + + + + Invalid use of a type name + 型名の使用方法に誤りがあります + + + + This type has no accessible object constructors + この型にアクセスできるオブジェクト コンストラクターはありません + + + + Invalid use of an interface type + インターフェイス型の使用方法に誤りがあります + + + + Invalid use of a delegate constructor. Use the syntax 'new Type(args)' or just 'Type(args)'. + デリゲート コンストラクターの使用方法に誤りがあります。'new Type(args)' か、単に 'Type(args)' という構文を使用してください + + + + Property '{0}' is not static + プロパティ '{0}' は静的ではありません + + + + Property '{0}' is not readable + プロパティ '{0}' は読み取り可能ではありません + + + + This lookup cannot be used here + ここでこの参照は使用できません + + + + Property '{0}' is static + プロパティ '{0}' は静的です + + + + Property '{0}' cannot be set + プロパティ '{0}' は設定できません + + + + Constructors must be applied to arguments and cannot be used as first-class values. If necessary use an anonymous function '(fun arg1 ... argN -> new Type(arg1,...,argN))'. + コンストラクターは引数に割り当てる必要があります。また、コンストラクターをファーストクラスの値として使用することはできません。必要に応じて、匿名関数 '(fun arg1 ... argN -> new Type(arg1,...,argN))' を使用してください。 + + + + The syntax 'expr.id' may only be used with record labels, properties and fields + 構文 'expr.id' を使用できるのは、レコードのラベル、プロパティ、およびフィールドのみです + + + + Event '{0}' is static + イベント '{0}' は静的です + + + + Event '{0}' is not static + イベント '{0}' は静的ではありません + + + + The named argument '{0}' did not match any argument or mutable property + 名前付き引数 '{0}' と一致する引数または変更可能なプロパティがありませんでした + + + + One or more of the overloads of this method has curried arguments. Consider redesigning these members to take arguments in tupled form. + このメソッドのオーバーロードの 1 つまたは複数にカリー化された引数があります。タプル化された形式で引数を使用するようにこれらのメンバーを再設計してください。 + + + + The unnamed arguments do not form a prefix of the arguments of the method called + 名前なしの引数は、呼び出されるメソッドの引数のプレフィックスを形成できません + + + + Static optimization conditionals are only for use within the F# library + 静的最適化の条件は、F# ライブラリ内でのみ使用できます + + + + The corresponding formal argument is not optional + 対応する正式な引数はオプションではありません + + + + Invalid optional assignment to a property or field + プロパティまたはフィールドに対するオプションの割り当てが無効です + + + + A delegate constructor must be passed a single function value + デリゲート コンストラクターには単一の関数値を渡す必要があります + + + + A binding cannot be marked both 'use' and 'rec' + 束縛に 'use' と 'rec' の両方をマークすることはできません + + + + The 'VolatileField' attribute may only be used on 'let' bindings in classes + 'VolatileField' 属性を使用できるのは、クラス内の 'let' 束縛上のみです + + + + Attributes are not permitted on 'let' bindings in expressions + 式内の 'let' 束縛では、属性を使用できません + + + + The 'DefaultValue' attribute may only be used on 'val' declarations + 'DefaultValue' 属性は 'val' 宣言でのみ使用できます + + + + The 'ConditionalAttribute' attribute may only be used on members + 'ConditionalAttribute' 属性はメンバーでのみ使用できます + + + + This is not a valid name for an active pattern + アクティブ パターンの有効な名前ではありません + + + + The 'EntryPointAttribute' attribute may only be used on function definitions in modules + 'EntryPointAttribute' 属性を使用できるのは、モジュールの関数定義のみです + + + + Mutable values cannot be marked 'inline' + 変更可能な値を 'inline' とマークすることはできません + + + + Mutable values cannot have generic parameters + 変更可能な値にジェネリック パラメーターを指定することはできません + + + + Mutable function values should be written 'let mutable f = (fun args -> ...)' + 変更可能な関数値は 'let mutable f = (fun args -> ...)' と記述してください + + + + Only functions may be marked 'inline' + 'inline' とマークできるのは関数のみです + + + + A literal value cannot be given the [<ThreadStatic>] or [<ContextStatic>] attributes + リテラル値に [<ThreadStatic>] 属性または [<ContextStatic>] 属性を指定することはできません + + + + A literal value cannot be marked 'mutable' + リテラル値に 'mutable' とマークすることはできません + + + + A literal value cannot be marked 'inline' + リテラル値に 'inline' とマークすることはできません + + + + Literal values cannot have generic parameters + リテラル値にジェネリック パラメーターを指定することはできません + + + + This is not a valid constant expression + これは有効な定数式ではありません + + + + This type is not accessible from this code location + このコードの場所からこの型にアクセスすることはできません + + + + Unexpected condition in imported assembly: failed to decode AttributeUsage attribute + インポートされたアセンブリに予期しない条件があります。AttributeUsage 属性のデコードに失敗しました: + + + + Unrecognized attribute target. Valid attribute targets are 'assembly', 'module', 'type', 'method', 'property', 'return', 'param', 'field', 'event', 'constructor'. + 認識されない属性のターゲットです。有効な属性のターゲットは、'assembly'、'module'、'type'、'method'、'property'、'return'、'param'、'field'、'event'、および 'constructor' です。 + + + + This attribute is not valid for use on this language element. Assembly attributes should be attached to a 'do ()' declaration, if necessary within an F# module. + この言語要素では、この属性を使用できません。アセンブリの属性は (必要に応じて F# モジュール内で) 'do ()' 宣言にアタッチする必要があります。 + + + + This attribute is not valid for use on this language element + この言語要素では、この属性を使用できません + + + + Optional arguments cannot be used in custom attributes + カスタム属性にはオプションの引数を使用できません + + + + This property cannot be set + このプロパティは設定できません + + + + This property or field was not found on this custom attribute type + このカスタム属性型に、このプロパティまたはフィールドが見つかりませんでした + + + + A custom attribute must be a reference type + カスタム属性は参照型にする必要があります + + + + The number of args for a custom attribute does not match the expected number of args for the attribute constructor + カスタム属性の引数の数は、属性コンストラクターの引数に必要な数と一致しません + + + + A custom attribute must invoke an object constructor + カスタム属性はオブジェクト コンストラクターを呼び出す必要があります + + + + Attribute expressions must be calls to object constructors + 属性式は、オブジェクト コンストラクターに対する呼び出しにしてください + + + + This attribute cannot be used in this version of F# + このバージョンの F# では、この属性を使用できません + + + + Invalid inline specification + インラインの指定が無効です + + + + 'use' bindings must be of the form 'use <var> = <expr>' + 'use' 束縛の形式は 'use <var> = <expr>' にしてください + + + + Abstract members are not permitted in an augmentation - they must be defined as part of the type itself + 拡張に抽象メンバーは使用できません。型の一部として定義する必要があります。 + + + + Method overrides and interface implementations are not permitted here + ここでメソッドのオーバーライドおよびインターフェイスの実装は許可されていません + + + + No abstract or interface member was found that corresponds to this override + このオーバーライドに対応する抽象メンバーまたはインターフェイス メンバーが見つかりませんでした + + + + This override takes a different number of arguments to the corresponding abstract member. The following abstract members were found:{0} + このオーバーライドでは、対応する抽象メンバーに対して異なる数の引数を使用しています。次の抽象メンバーが見つかりました: {0} + + + + This method already has a default implementation + このメソッドには既に既定の実装があります + + + + The method implemented by this default is ambiguous + この既定で実装されたメソッドはあいまいです + + + + No abstract property was found that corresponds to this override + このオーバーライドに対応する抽象プロパティが見つかりませんでした + + + + This property overrides or implements an abstract property but the abstract property doesn't have a corresponding {0} + このプロパティは、抽象プロパティをオーバーライドまたは実装しますが、抽象プロパティには対応する {0} がありません + + + + Invalid signature for set member + set メンバーのシグネチャが無効です + + + + This new member hides the abstract member '{0}'. Rename the member or use 'override' instead. + この新しいメンバーは抽象メンバー '{0}' を隠ぺいします。メンバーの名前を変更するか、代わりに 'override' を使用してください。 + + + + This new member hides the abstract member '{0}' once tuples, functions, units of measure and/or provided types are erased. Rename the member or use 'override' instead. + タプル、関数、測定単位、または指定された型が消去されると、この新しいメンバーは抽象メンバー '{0}' を隠ぺいします。メンバーの名前を変更するか、代わりに 'override' を使用してください。 + + + + Interfaces cannot contain definitions of static initializers + インターフェイスに静的初期化子の定義を含めることはできません + + + + Interfaces cannot contain definitions of object constructors + インターフェイスにオブジェクト コンストラクターの定義を含めることはできません + + + + Interfaces cannot contain definitions of member overrides + インターフェイスにメンバーのオーバーライドの定義を含めることはできません + + + + Interfaces cannot contain definitions of concrete members. You may need to define a constructor on your type to indicate that the type is a class. + インターフェイスに具象メンバーの定義を含めることはできません。必要に応じて、型にコンストラクターを定義して、型がクラスであることを示してください。 + + + + Constructors cannot be specified in exception augmentations + 例外の拡張にコンストラクターは指定できません + + + + Structs cannot have an object constructor with no arguments. This is a restriction imposed on all CLI languages as structs automatically support a default constructor. + 構造体には、引数なしのオブジェクト コンストラクターを使用できません。構造体は既定のコンストラクターを自動的にサポートするため、これはすべての CLI 言語に課せられた制限です。 + + + + Constructors cannot be defined for this type + この型にコンストラクターは定義できません + + + + Recursive bindings that include member specifications can only occur as a direct augmentation of a type + メンバーの指定を含む再帰的束縛は、型の直接的な拡張としてのみ実行できます + + + + Only simple variable patterns can be bound in 'let rec' constructs + 'let rec' コンストラクトでバインドできるのは、単純な変数パターンのみです + + + + Only record fields and simple, non-recursive 'let' bindings may be marked mutable + 'mutable' とマークできるのはレコード フィールドと単純で非再帰的な 'let' バインディングのみです + + + + This member is not sufficiently generic + このメンバーの総称性が十分ではありません + + + + A declaration may only be the [<Literal>] attribute if a constant value is also given, e.g. 'val x : int = 1' + 定数値も指定する場合、宣言は [<Literal>] 属性にしてください (たとえば、'val x : int = 1') + + + + A declaration may only be given a value in a signature if the declaration has the [<Literal>] attribute + 宣言に [<Literal>] 属性がある場合、その宣言に指定できるのはシグネチャ内の値のみです。 + + + + Thread-static and context-static variables must be static and given the [<DefaultValue>] attribute to indicate that the value is initialized to the default value on each new thread + thread-static 変数および context-static 変数は静的にし、[<DefaultValue>] 属性を指定して、新しいスレッドごとに値が既定値に初期化されることを示してください + + + + Volatile fields must be marked 'mutable' and cannot be thread-static + volatile フィールドは 'mutable' とマークしてください。また、thread-static にすることはできません。 + + + + Uninitialized 'val' fields must be mutable and marked with the '[<DefaultValue>]' attribute. Consider using a 'let' binding instead of a 'val' field. + 初期化されていない 'val' フィールドは変更可能にし、'[<DefaultValue>]' 属性でマークする必要があります。'val' フィールドの代わりに 'let' 束縛をご使用ください。 + + + + Static 'val' fields in types must be mutable, private and marked with the '[<DefaultValue>]' attribute. They are initialized to the 'null' or 'zero' value for their type. Consider also using a 'static let mutable' binding in a class type. + 型の静的 'val' フィールドは、変更可能で、プライベートにし、さらに '[<DefaultValue>]' 属性でマークしてください。フィールドはその型の 'null' 値または 'zero' 値に初期化されます。また、クラス型の 'static let mutable' 束縛もご使用ください。 + + + + This field requires a name + このフィールドには名前が必要です + + + + Invalid namespace, module, type or union case name + 名前空間、モジュール、型、または共用体ケースの名前が無効です + + + + Explicit type declarations for constructors must be of the form 'ty1 * ... * tyN -> resTy'. Parentheses may be required around 'resTy' + コンストラクターの明示的な型宣言は、'ty1 * ... * tyN -> resTy' という形式にする必要があります。必要に応じて、'resTy' をかっこで囲んでください。 + + + + Return types of union cases must be identical to the type being defined, up to abbreviations + 共用体ケースの戻り値の型は、省略形に従い、定義されている型と同じにする必要があります + + + + This is not a valid value for an enumeration literal + 列挙型リテラルの有効な値ではありません + + + + The type '{0}' is not an interface type + 型 '{0}' はインターフェイス型ではありません + + + + Duplicate specification of an interface + インターフェイスの指定に重複があります + + + + A field/val declaration is not permitted here + ここでは field/val の宣言を使用できません + + + + A inheritance declaration is not permitted here + ここでは継承の宣言を使用できません + + + + This declaration opens the module '{0}', which is marked as 'RequireQualifiedAccess'. Adjust your code to use qualified references to the elements of the module instead, e.g. 'List.map' instead of 'map'. This change will ensure that your code is robust as new constructs are added to libraries. + この宣言はモジュール '{0}' を開きます。'{0}' は 'RequireQualifiedAccess' とマークされています。代わりにモジュールの要素に対する限定参照を使用するようにコードを変更してください (たとえば、'map' の代わりに 'List.map')。この変更によってコードが堅牢になり、新しいコンストラクターがライブラリに追加された場合にも対応できます。 + + + + This declaration opens the namespace or module '{0}' through a partially qualified path. Adjust this code to use the full path of the namespace. This change will make your code more robust as new constructs are added to the F# and CLI libraries. + この宣言は部分的な修飾パスを介して名前空間またはモジュール '{0}' を開きます。名前空間の完全パスを使用するようにコードを変更してください。この変更によってコードが堅牢になり、新しいコンストラクターが F# ライブラリや CLI ライブラリに追加された場合にも対応できます。 + + + + Local class bindings cannot be marked inline. Consider lifting the definition out of the class or else do not mark it as inline. + ローカル クラスの束縛に 'inline' とマークすることはできません。クラスから定義を取り除くか、'inline' とマークしないでください。 + + + + Type abbreviations cannot have members + 型略称にメンバーを含めることはできません + + + + As of F# 4.1, the accessibility of type abbreviations is checked at compile-time. Consider changing the accessibility of the type abbreviation. Ignoring this warning might lead to runtime errors. + F# 4.1 まででは、型略称のアクセシビリティはコンパイル時に確認されます。型略称のアクセシビリティを変更することを検討してください。この警告を無視すると、ランタイム エラーが発生する可能性があります。 + + + + Enumerations cannot have members + 列挙型にメンバーを含めることはできません + + + + Measure declarations may have only static members + 単位の宣言に使用できるのは静的なメンバーのみです + + + + Structs cannot contain 'do' bindings because the default constructor for structs would not execute these bindings + 構造体の既定のコンストラクターは束縛を実行しないため、構造体には 'do' 束縛を含むことができません + + + + Structs cannot contain value definitions because the default constructor for structs will not execute these bindings. Consider adding additional arguments to the primary constructor for the type. + 構造体の既定のコンストラクターは束縛を実行しないため、構造体には値の定義を含むことができません。型のプライマリ コンストラクターに引数を追加してください。 + + + + Static value definitions may only be used in types with a primary constructor. Consider adding arguments to the type definition, e.g. 'type X(args) = ...'. + 静的な値の定義は、プライマリ コンストラクターを含む型でのみ使用できます。型定義に引数を追加してください ( たとえば、'type X(args) = ...')。 + + + + Measure declarations may have only static members: constructors are not available + 単位の宣言に使用できるのは静的なメンバーのみです。コンストラクターは使用できません。 + + + + A member and a local class binding both have the name '{0}' + メンバーとローカル クラスの束縛はどちらも '{0}' という名前を使用しています + + + + Type abbreviations cannot have interface declarations + 型略称にインターフェイスの宣言を含めることはできません + + + + Enumerations cannot have interface declarations + 列挙型にインターフェイスの宣言を含めることはできません + + + + This type is not an interface type + この型はインターフェイス型ではありません + + + + All implemented interfaces should be declared on the initial declaration of the type + 実装したすべてのインターフェイスは、型の最初の宣言で宣言する必要があります + + + + A default implementation of this interface has already been added because the explicit implementation of the interface was not specified at the definition of the type + インターフェイスの明示的な実装が型の定義時に指定されなかったため、このインターフェイスの既定の実装が追加されました。 + + + + This member is not permitted in an interface implementation + インターフェイスの実装では、このメンバーは使用できません + + + + This declaration element is not permitted in an augmentation + 拡張にこの宣言の要素は使用できません + + + + Types cannot contain nested type definitions + 型に入れ子の型定義を含めることはできません + + + + type, exception or module + 型、例外、またはモジュール + + + + type or module + 型またはモジュール + + + + The struct, record or union type '{0}' implements the interface 'System.IStructuralEquatable' explicitly. Apply the 'CustomEquality' attribute to the type. + 構造体型、レコード型、または共用体型の '{0}' はインターフェイス 'System.IStructuralEquatable' を明示的に実装しています。この型には 'CustomEquality' 属性を適用してください。 + + + + The struct, record or union type '{0}' implements the interface 'System.IEquatable<_>' explicitly. Apply the 'CustomEquality' attribute to the type and provide a consistent implementation of the non-generic override 'System.Object.Equals(obj)'. + 構造体型、レコード型、または共用体型の '{0}' は、インターフェイス 'System.IEquatable<_>' を明示的に実装しています。この型には 'CustomEquality' 属性を適用し、さらに整合性のある非ジェネリック オーバーライド 'System.Object.Equals(obj)' の実装を用意してください。 + + + + Explicit type specifications cannot be used for exception constructors + 明示的な型の指定は、例外のコンストラクターには使用できません + + + + Exception abbreviations should not have argument lists + 例外の省略形に引数リストを含めることはできません + + + + Abbreviations for Common IL exceptions cannot take arguments + Common IL の例外型の場合、省略形には引数を使用できません + + + + Exception abbreviations must refer to existing exceptions or F# types deriving from System.Exception + 例外の省略形は、既存の例外、または System.Exception から派生した F# 型を参照する必要があります + + + + Abbreviations for Common IL exception types must have a matching object constructor + Common IL の例外型の場合、省略形には対応するオブジェクト コンストラクターが必要です + + + + Not an exception + 例外ではありません + + + + Invalid module name + モジュール名が無効です + + + + Invalid type extension + 型の拡張が無効です + + + + The attributes of this type specify multiple kinds for the type + この型の属性は、その型に対して複数の種類を指定しています + + + + The kind of the type specified by its attributes does not match the kind implied by its definition + この属性によって指定された型の種類は、定義が示す種類と一致しません + + + + Measure definitions cannot have type parameters + 単位の定義に型パラメーターは使用できません + + + + This type requires a definition + この型には定義が必要です + + + + This type abbreviation has one or more declared type parameters that do not appear in the type being abbreviated. Type abbreviations must use all declared type parameters in the type being abbreviated. Consider removing one or more type parameters, or use a concrete type definition that wraps an underlying type, such as 'type C<'a> = C of ...'. + この型略称では、省略される型に出現しない型パラメーターが 1 つまたは複数宣言されました。型略称には、省略される型のすべての宣言済み型パラメーターを使用する必要があります。1 つまたは複数のパラメーターを削除するか、基底となる型をラップする具象型定義を使用してください (たとえば、'type C<'a> = C of ...')。 + + + + Structs, interfaces, enums and delegates cannot inherit from other types + 構造体、インターフェイス、列挙型、およびデリゲートは、他の型から継承できません + + + + Types cannot inherit from multiple concrete types + 型は複数の具象型から継承できません + + + + Records, union, abbreviations and struct types cannot have the 'AllowNullLiteral' attribute + レコード型、共用体型、省略形型、および構造体型に 'AllowNullLiteral' 属性を指定することはできません + + + + Types with the 'AllowNullLiteral' attribute may only inherit from or implement types which also allow the use of the null literal + 'AllowNullLiteral' 属性を持つ型が継承または実装できるのは、null のリテラルも使用できる型のみです + + + + Generic types cannot be given the 'StructLayout' attribute + ジェネリック型に 'StructLayout' 属性を指定することはできません + + + + Only structs and classes without primary constructors may be given the 'StructLayout' attribute + 'StructLayout' 属性を指定できるのは、プライマリ コンストラクターなしの構造体およびクラスのみです + + + + The representation of this type is hidden by the signature. It must be given an attribute such as [<Sealed>], [<Class>] or [<Interface>] to indicate the characteristics of the type. + この型の表現はシグネチャによって隠ぺいされています。型の特性を示すために、[<Sealed>]、[<Class>]、[<Interface>] などの属性を指定する必要があります。 + + + + Only classes may be given the 'AbstractClass' attribute + 'AbstractClass' 属性を指定できるのはクラスのみです + + + + Only types representing units-of-measure may be given the 'Measure' attribute + 'Measure' 属性を指定できるのは、単位を表す型のみです + + + + Accessibility modifiers are not permitted on overrides or interface implementations + オーバーライドまたはインターフェイスの実装にはアクセシビリティ修飾子を使用できません + + + + Discriminated union types are always sealed + 判別された共用体型は常にシールドです + + + + Record types are always sealed + レコード型は常にシールドです + + + + Assembly code types are always sealed + アセンブリ コード型は常にシールドです + + + + Struct types are always sealed + 構造体型は常にシールドです + + + + Delegate types are always sealed + デリゲート型は常にシールドです + + + + Enum types are always sealed + 列挙型は常にシールドです + + + + Interface types and delegate types cannot contain fields + インターフェイス型またはデリゲート型にフィールドを含めることはできません + + + + Abbreviated types cannot be given the 'Sealed' attribute + 省略された型に 'Sealed' 属性を指定することはできません + + + + Cannot inherit a sealed type + シールド型を継承できません + + + + Cannot inherit from interface type. Use interface ... with instead. + インターフェイスの型から継承できません。代わりに interface ... with を使用してください。 + + + + Struct types cannot contain abstract members + 構造体型に抽象メンバーを含むことはできません + + + + Interface types cannot be sealed + インターフェイス型をシールドにすることはできません + + + + Delegate specifications must be of the form 'typ -> typ' + デリゲートは 'typ -> typ' という形式で指定する必要があります + + + + Delegate specifications must not be curried types. Use 'typ * ... * typ -> typ' for multi-argument delegates, and 'typ -> (typ -> typ)' for delegates returning function values. + デリゲートにはカリー化された型を指定しないでください。複数引数のデリゲートには 'typ * ... * typ -> typ' を使用し、関数値を返すデリゲートには 'typ -> (typ -> typ)' を使用します。 + + + + Literal enumerations must have type int, uint, int16, uint16, int64, uint64, byte, sbyte or char + リテラル列挙値の型は、int、uint、int16、uint16、int64、uint64、byte、sbyte、または char にする必要があります + + + + This type definition involves an immediate cyclic reference through an abbreviation + この型定義では、省略形による直接的な循環参照が発生します + + + + This type definition involves an immediate cyclic reference through a struct field or inheritance relation + この型定義では、構造体フィールドまたは継承の関係による直接的な循環参照が発生します + + + + The syntax 'type X with ...' is reserved for augmentations. Types whose representations are hidden but which have members are now declared in signatures using 'type X = ...'. You may also need to add the '[<Sealed>] attribute to the type definition in the signature + 構文 'type X with ...' は拡張のために予約されています。表現が隠ぺいされていてメンバーがある型が、'type X = ...' を使用するシグネチャで宣言されています。必要に応じて、シグネチャ内の型定義に '[<Sealed>]' 属性も追加してください。 + + + + Members that extend interface, delegate or enum types must be placed in a module separate to the definition of the type. This module must either have the AutoOpen attribute or be opened explicitly by client code to bring the extension members into scope. + インターフェイス型、デリゲート型、または列挙型を拡張するメンバーは、型の定義とは別のモジュールに配置する必要があります。このモジュールに AutoOpen 属性を指定するか、クライアント コードで明示的にモジュールを開いて、拡張メンバーをスコープに含める必要があります。 + + + + One or more of the declared type parameters for this type extension have a missing or wrong type constraint not matching the original type constraints on '{0}' + この型の拡張の 1 つ以上の宣言された型パラメーターについて、型の制約が見つからないか、型の制約が '{0}' の元の型の制約に一致しないため正しくありません。 + + + + Type definitions may only have one 'inherit' specification and it must be the first declaration + 型定義に含めることができる 'inherit' 指定は 1 つのみであり、これを最初の宣言にする必要があります。 + + + + 'let' and 'do' bindings must come before member and interface definitions in type definitions + 型定義内のメンバーとインターフェイスの定義の前に、'let' および 'do' 束縛を含める必要があります + + + + This 'inherit' declaration specifies the inherited type but no arguments. Consider supplying arguments, e.g. 'inherit BaseType(args)'. + この 'inherit' 宣言は継承された型を指定していますが、引数がありません。引数を指定してください (たとえば、'inherit BaseType(args)')。 + + + + This 'inherit' declaration has arguments, but is not in a type with a primary constructor. Consider adding arguments to your type definition, e.g. 'type X(args) = ...'. + この 'inherit' 宣言には引数が含まれていますが、これはプライマリ コンストラクターを含む型ではありません。型定義に引数を追加してください (たとえば、'type X(args) = ...')。 + + + + This definition may only be used in a type with a primary constructor. Consider adding arguments to your type definition, e.g. 'type X(args) = ...'. + この定義は、プライマリ コンストラクターを含む型でのみ使用できます。型定義に引数を追加してください (たとえば、'type X(args) = ...')。 + + + + Type abbreviations cannot have augmentations + 型略称に拡張を含めることはできません + + + + The path '{0}' is a namespace. A module abbreviation may not abbreviate a namespace. + パス '{0}' は名前空間です。モジュールの省略形は名前空間の省略形にはできません。 + + + + The type '{0}' is used in an invalid way. A value prior to '{1}' has an inferred type involving '{2}', which is an invalid forward reference. + 型 '{0}' の使用方法に誤りがあります。'{1}' の前の値に、'{2}' と推論されるような型があります。これは無効な前方参照です。 + + + + The member '{0}' is used in an invalid way. A use of '{1}' has been inferred prior to the definition of '{2}', which is an invalid forward reference. + メンバー '{0}' の使用方法に誤りがあります。'{2}' の定義の前に '{1}' の使用が推論されました。これは無効な前方参照です。 + + + + The attribute 'AutoOpen(\"{0}\")' in the assembly '{1}' did not refer to a valid module or namespace in that assembly and has been ignored + アセンブリ '{1}' の属性 'AutoOpen(\"{0}\")' は、このアセンブリ内の有効なモジュールまたは名前空間を参照していないため、無視されました + + + + Undefined value '{0}' + 未定義の値 '{0}' + + + + Label {0} not found + ラベル {0} が見つかりません + + + + Incorrect number of type arguments to local call + ローカルの呼び出しに対する型引数の数が正しくありません + + + + Dynamic invocation of {0} is not supported + {0} の動的呼び出しはサポートされません + + + + Taking the address of a literal field is invalid + リテラル フィールドのアドレスは使用できません + + + + This operation involves taking the address of a value '{0}' represented using a local variable or other special representation. This is invalid. + この操作には、ローカル変数または他の特殊な表現を使用して表された値 '{0}' のアドレスが使用されています。これは無効です。 + + + + Custom marshallers cannot be specified in F# code. Consider using a C# helper function. + F# コードではカスタム マーシャラーを指定できません。C# ヘルパー関数を使用してください。 + + + + The MarshalAs attribute could not be decoded + MarshalAs 属性をデコードできませんでした + + + + The signature for this external function contains type parameters. Constrain the argument and return types to indicate the types of the corresponding C function. + この外部関数のシグネチャには型パラメーターが含まれます。引数を制限し、対応する C 関数の型を示す型を戻してください。 + + + + The DllImport attribute could not be decoded + DllImport 属性をデコードできませんでした + + + + Literal fields cannot be set + リテラル フィールドを設定できません + + + + GenSetStorage: {0} was represented as a static method but was not an appropriate lambda expression + GenSetStorage: {0} は静的メソッドとして表現されましたが、適切なラムダ式ではありません + + + + Mutable variables cannot escape their method + 変更可能な変数ではメソッドをエスケープできません + + + + Compiler error: unexpected unrealized value + コンパイラ エラー: 予期しない認識されない値 + + + + Main module of program is empty: nothing will happen when it is run + プログラムのメイン モジュールが空です。実行しても何も処理されません + + + + This type cannot be used for a literal field + リテラル フィールドにこの型は使用できません + + + + Unexpected GetSet annotation on a property + プロパティに予期しない GetSet 注釈がありました: + + + + The FieldOffset attribute could not be decoded + FieldOffset 属性をデコードできませんでした + + + + The StructLayout attribute could not be decoded + StructLayout 属性をデコードできませんでした + + + + The DefaultAugmentation attribute could not be decoded + DefaultAugmentation 属性をデコードできませんでした + + + + Reflected definitions cannot contain uses of the prefix splice operator '%' + リフレクションされた定義には、プレフィックスのスプライス演算子 '%' を使用できません + + + + Problem with codepage '{0}': {1} + コードページ '{0}' に問題があります: {1} + + + + Copyright (c) Microsoft Corporation. All Rights Reserved. + Copyright (c) Microsoft Corporation. All Rights Reserved. + + + + Freely distributed under the MIT Open Source License. https://github.com/Microsoft/visualfsharp/blob/master/License.txt + MIT のオープン ソース ライセンスで無料配布されています。https://github.com/Microsoft/visualfsharp/blob/master/License.txt + + + + Name of the output file (Short form: -o) + 出力ファイルの名前 (短い形式: -o) + + + + Build a console executable + コンソール実行可能ファイルをビルドします + + + + Build a Windows executable + Windows 実行可能ファイルをビルドします + + + + Build a library (Short form: -a) + ライブラリをビルドします (短い形式: -a) + + + + Build a module that can be added to another assembly + 別のアセンブリに追加できるモジュールをビルドします + + + + Delay-sign the assembly using only the public portion of the strong name key + 厳密名キーのパブリックな部分のみを使ってアセンブリを遅延署名します + + + + Public-sign the assembly using only the public portion of the strong name key, and mark the assembly as signed + 厳密な名前のキーの公開部分のみを使ってアセンブリを公開署名し、アセンブリを署名済みとしてマークします + + + + Write the xmldoc of the assembly to the given file + 指定したファイルにアセンブリの xmldoc を書き込みます + + + + Specify a strong name key file + 厳密名キー ファイルを指定します + + + + Specify a strong name key container + 厳密名キー コンテナーを指定します + + + + Limit which platforms this code can run on: x86, Itanium, x64, anycpu32bitpreferred, or anycpu. The default is anycpu. + このコードが実行されるプラットフォームの制限: x86、Itanium、x64、anycpu32bitpreferred、または anycpu。既定は anycpu です。 + + + + Only include optimization information essential for implementing inlined constructs. Inhibits cross-module inlining but improves binary compatibility. + インライン コンストラクトの実装に必要な最適化情報のみを含めてください。モジュール間のインライン処理を禁止し、バイナリの互換性を改善してください。 + + + + Don't add a resource to the generated assembly containing F#-specific metadata + F# 固有のメタデータを含む生成済みアセンブリにリソースを追加しないでください + + + + Print the inferred interface of the assembly to a file + アセンブリの推論されたインターフェイスをファイルに出力します + + + + Reference an assembly (Short form: -r) + アセンブリを参照します (短い形式: -r) + + + + Specify a Win32 resource file (.res) + Win32 リソース ファイル (.res) を指定します + + + + Specify a Win32 manifest file + Win32 マニフェスト ファイルを指定します + + + + Do not include the default Win32 manifest + 既定の Win32 マニフェストを含めないでください + + + + Embed all source files in the portable PDB file + ポータブル PDB ファイル内にすべてのソース ファイルを埋め込む + + + + Embed specific source files in the portable PDB file + ポータブル PDB ファイル内に特定のソース ファイルを埋め込む + + + + Source link information file to embed in the portable PDB file + ポータブル PDB ファイルに埋め込むソース リンク情報ファイル + + + + --embed switch only supported when emitting a Portable PDB (--debug:portable or --debug:embedded) + --embed スイッチは、ポータブル PDB の生成時にのみサポートされます (--debug:portable または --debug:embedded) + + + + --sourcelink switch only supported when emitting a Portable PDB (--debug:portable or --debug:embedded) + --sourcelink スイッチは、ポータブル PDB の生成時にのみサポートされます (--debug:portable または --debug:embedded) + + + + Source file is too large to embed in a portable PDB + ソース ファイルが大きすぎるので、ポータブル PDB 内に埋め込めません + + + + Embed the specified managed resource + 指定したマネージド リソースを埋め込みます + + + + Link the specified resource to this assembly where the resinfo format is <file>[,<string name>[,public|private]] + 指定したリソースをこのアセンブリにリンクします。このとき、リソース情報の形式は <ファイル>[,<文字列名>[,public|private]] です。 + + + + Emit debug information (Short form: -g) + デバッグ情報を生成します (短い形式: -g) + + + + Specify debugging type: full, portable, embedded, pdbonly. ('{0}' is the default if no debuggging type specified and enables attaching a debugger to a running program, 'portable' is a cross-platform format, 'embedded' is a cross-platform format embedded into the output file). + デバッグの種類 full、portable、pdbonly を指定します (デバッグの種類が指定されない場合には '{0}' が既定で、実行中のプログラムにデバッガーを付加することができます。'portable' はクロスプラットフォーム形式、'embedded' は出力ファイルに埋め込まれたクロスプラットフォーム形式です)。 + + + + Enable optimizations (Short form: -O) + 最適化を有効にします (短い形式: -O) + + + + Enable or disable tailcalls + tail の呼び出しを有効または無効にします + + + + Produce a deterministic assembly (including module version GUID and timestamp) + 決定論的アセンブリを作成します (モジュール バージョン GUID やタイムスタンプなど) + + + + Enable or disable cross-module optimizations + モジュール間の最適化を有効または無効にします + + + + Report all warnings as errors + すべての警告をエラーとして報告する + + + + Report specific warnings as errors + 指定した警告をエラーとして報告する + + + + Set a warning level (0-5) + 警告レベル (0 ~ 5) を設定します + + + + Disable specific warning messages + 指定の警告メッセージを無効にする + + + + Enable specific warnings that may be off by default + 既定でオフにすることができる特定の警告を有効にします + + + + Generate overflow checks + オーバーフロー チェックの生成 + + + + Define conditional compilation symbols (Short form: -d) + 条件付きコンパイル シンボルを定義します (短い形式: -d) + + + + Ignore ML compatibility warnings + ML 互換性に関する警告を無視します + + + + + Display this usage message (Short form: -?) + この使用方法に関するメッセージを表示します (短い形式: -?) + + + + Read response file for more options + その他のオプションを、応答ファイルから読み取ります + + + + Specify the codepage used to read source files + ソース ファイルの読み取りに使用するコードページを指定します + + + + Output messages in UTF-8 encoding + UTF-8 エンコードでメッセージを出力します + + + + Output messages with fully qualified paths + 完全修飾パスを含むメッセージを出力します + + + + Specify a directory for the include path which is used to resolve source files and assemblies (Short form: -I) + ソース ファイルおよびアセンブリの解決に使用する include パスのディレクトリを指定します (短い形式: -I) + + + + Base address for the library to be built + ビルドするライブラリのベース アドレス + + + + Do not reference the default CLI assemblies by default + 既定では、既定の CLI アセンブリを参照しません + + + + Statically link the F# library and all referenced DLLs that depend on it into the assembly being generated + F# ライブラリと、ライブラリに依存するすべての参照 DLL を、生成されるアセンブリへ静的にリンクします + + + + Statically link the given assembly and all referenced DLLs that depend on this assembly. Use an assembly name e.g. mylib, not a DLL name. + 指定したアセンブリと、そのアセンブリに依存するすべての参照 DLL を静的にリンクします。DLL 名ではなく、アセンブリ名 (たとえば、mylib) を使用してください。 + + + + Use a resident background compilation service to improve compiler startup times. + バックグラウンドに常駐するコンパイル サービスを使用して、コンパイラの起動時間を改善します。 + + + + Name the output debug file + 出力デバッグ ファイルの名前を指定します + + + + Resolve assembly references using directory-based rules rather than MSBuild resolution + MSBuild の解決ではなく、ディレクトリベースの規則を使用してアセンブリの参照を解決します + + + + Unrecognized target '{0}', expected 'exe', 'winexe', 'library' or 'module' + 認識されないターゲット '{0}'。'exe'、'winexe'、'library'、または 'module' を指定してください。 + + + + Unrecognized debug type '{0}', expected 'pdbonly' or 'full' + 認識されないデバッグの種類 '{0}'。'pdbonly' または 'full' を指定してください。 + + + + Invalid warning level '{0}' + 警告レベル '{0}' が無効です + + + + Short form of '{0}' + '{0}' の短い形式 + + + + The command-line option '--cliroot' has been deprecated. Use an explicit reference to a specific copy of mscorlib.dll instead. + コマンド ライン オプション '--cliroot' は非推奨になりました。代わりに mscorlib.dll の特定のコピーに対する明示的な参照を使用してください。 + + + + Use to override where the compiler looks for mscorlib.dll and framework components + コンパイラが mscorlib.dll およびフレームワーク コンポーネントを検索する場所をオーバーライドするために使用します + + + + - OUTPUT FILES - + - 出力ファイル - + + + + - INPUT FILES - + - 入力ファイル - + + + + - RESOURCES - + - リソース - + + + + - CODE GENERATION - + - コード生成 - + + + + - ADVANCED - + - 詳細 - + + + + - MISCELLANEOUS - + - その他 - + + + + - LANGUAGE - + - 言語 - + + + + - ERRORS AND WARNINGS - + - エラーと警告 - + + + + Unknown --test argument: '{0}' + 不明 -- テスト引数:'{0}' + + + + Unrecognized platform '{0}', valid values are 'x86', 'x64', 'Itanium', 'anycpu32bitpreferred', and 'anycpu' + 認識されないプラットフォーム '{0}'。有効な値は 'x86'、'x64'、'Itanium'、'anycpu32bitpreferred'、および 'anycpu' です。 + + + + The command-line option '{0}' is for test purposes only + コマンド ライン オプション '{0}' はテスト目的でのみ使用できます + + + + The command-line option '{0}' has been deprecated + コマンド ライン オプション '{0}' は非推奨になりました + + + + The command-line option '{0}' has been deprecated. Use '{1}' instead. + コマンド ライン オプション '{0}' は非推奨になりました。代わりに '{1}' を使用してください。 + + + + The command-line option '{0}' has been deprecated. HTML document generation is now part of the F# Power Pack, via the tool FsHtmlDoc.exe. + コマンド ライン オプション '{0}' は非推奨になりました。HTML ドキュメントの生成は、F# Power Pack のツール FsHtmlDoc.exe で実行できるようになりました。 + + + + Output warning and error messages in color + 警告メッセージとエラー メッセージを色つきで表示します + + + + Enable high-entropy ASLR + 高エントロピ ASLR の有効化 + + + + Specify subsystem version of this assembly + このアセンブリのサブシステム バージョンを指定してください + + + + Specify target framework profile of this assembly. Valid values are mscorlib, netcore or netstandard. Default - mscorlib + このアセンブリのターゲット フレームワーク プロファイルを指定します。有効な値は、mscorlib、netcore、netstandard のいずれかです。既定 - mscorlib + + + + Emit debug information in quotations + デバッグ情報を引用符で囲んで生成します + + + + Specify the preferred output language culture name (e.g. es-ES, ja-JP) + 優先する出力用言語のカルチャ名を指定します (例: es-ES, ja-JP) + + + + Don't copy FSharp.Core.dll along the produced binaries + 生成したバイナリと共に FSharp.Core.dll をコピーしないでください + + + + Invalid version '{0}' for '--subsystemversion'. The version must be 4.00 or greater. + '--subsystemversion' のバージョン '{0}' が無効です。バージョンは 4.00 以上でなければなりません。 + + + + Invalid value '{0}' for '--targetprofile', valid values are 'mscorlib', 'netcore' or 'netstandard'. + '--targetprofile' の値 '{0}' が無効です。有効な値は 'mscorlib'、'netcore'、'netstandard' のいずれかです。 + + + + Full name + 完全名 + + + + and {0} other overloads + およびその他の {0} 個のオーバーロード + + + + union case + 共用体ケース + + + + active pattern result + アクティブ パターンの結果 + + + + active recognizer + アクティブ レコグナイザー + + + + field + フィールド + + + + event + イベント + + + + property + プロパティ + + + + extension + 拡張子 + + + + custom operation + カスタム操作 + + + + argument + 引数 + + + + patvar + patvar + + + + namespace + 名前空間 + + + + module + モジュール + + + + namespace/module + 名前空間/モジュール + + + + from {0} + {0} から + + + + also from {0} + また、{0} から + + + + generated property + 生成されたプロパティ + + + + generated type + 生成された型 + + + + Found by AssemblyFolders registry key + AssemblyFolders レジストリ キーによって検出されました + + + + Found by AssemblyFoldersEx registry key + AssemblyFoldersEx レジストリ キーによって検出されました + + + + .NET Framework + .NET Framework + + + + Global Assembly Cache + グローバル アセンブリ キャッシュ + + + + Recursive class hierarchy in type '{0}' + 型 '{0}' の再帰的クラス階層 + + + + Invalid recursive reference to an abstract slot + 抽象スロットに対する再帰的参照が無効です + + + + The event '{0}' has a non-standard type. If this event is declared in another CLI language, you may need to access this event using the explicit {1} and {2} methods for the event. If this event is declared in F#, make the type of the event an instantiation of either 'IDelegateEvent<_>' or 'IEvent<_,_>'. + イベント '{0}' が標準以外の型です。このイベントが別の CLI 言語で宣言された場合、イベントにアクセスするには、このイベントに明示的な {1} メソッドや {2} メソッドを使用する必要があります。このイベントが F# で宣言された場合、イベントの型を IDelegateEvent<_>' または 'IEvent<_,_>' のインスタンス化にします。 + + + + The type '{0}' is not accessible from this code location + 型 '{0}' はこのコードの場所からアクセスできません + + + + The union cases or fields of the type '{0}' are not accessible from this code location + 型 '{0}' の共用体ケースまたはフィールドは、このコードの場所からアクセスできません + + + + The value '{0}' is not accessible from this code location + 値 '{0}' はこのコードの場所からアクセスできません + + + + The union case '{0}' is not accessible from this code location + 共用体ケース '{0}' はこのコードの場所からアクセスできません + + + + The record, struct or class field '{0}' is not accessible from this code location + レコード、構造体、またはクラスのフィールド '{0}' はこのコードの場所からアクセスできません + + + + The struct or class field '{0}' is not accessible from this code location + 構造体またはクラスのフィールド '{0}' はこのコードの場所からアクセスできません + + + + This construct is experimental + このコンストラクトは試験段階です + + + + No Invoke methods found for delegate type + デリゲート型に Invoke メソッドが見つかりませんでした + + + + More than one Invoke method found for delegate type + デリゲート型に複数の Invoke メソッドが見つかりました + + + + Delegates are not allowed to have curried signatures + カリー化されたシグネチャを含むデリゲートは許可されていません + + + + Unexpected Expr.TyChoose + 予期しない Expr.TyChoose です: + + + + Note: Lambda-lifting optimizations have not been applied because of the use of this local constrained generic function as a first class value. Adding type constraints may resolve this condition. + 注意: ファースト クラス値としてこのローカルの制約付きジェネリック関数が使用されているため、ラムダリフティングの最適化は適用されませんでした。型制約を追加することで、この状態を解決できる可能性があります。 + + + + Identifiers containing '@' are reserved for use in F# code generation + '@' を含む識別子は、F# コードの生成で使用するために予約されています + + + + The identifier '{0}' is reserved for future use by F# + 識別子 '{0}' は F# で将来利用するために予約されています + + + + Missing variable '{0}' + 変数 '{0}' が見つかりません + + + + Partial active patterns may only generate one result + パーシャル アクティブ パターンで生成できる結果は 1 個のみです + + + + The type '{0}' is required here and is unavailable. You must add a reference to assembly '{1}'. + ここでは型 '{0}' が必要ですが使用できません。アセンブリ '{1}' に参照を追加する必要があります。 + + + + A reference to the type '{0}' in assembly '{1}' was found, but the type could not be found in that assembly + アセンブリ '{1}' 内の型 '{0}' に対する参照が見つかりましたが、型はそのアセンブリ内に見つかりませんでした + + + + Internal error or badly formed metadata: not enough type parameters were in scope while importing + 内部エラーまたはメタデータの形式エラー: インポート中のスコープに含まれる型パラメーターが足りません + + + + A reference to the DLL {0} is required by assembly {1}. The imported type {2} is located in the first assembly and could not be resolved. + アセンブリ {1} には DLL {0} に対する参照が必要です。インポートされた型 {2} は最初のアセンブリにあり、解決できませんでした。 + + + + An imported assembly uses the type '{0}' but that type is not public + インポートされたアセンブリでは型 '{0}' を使用していますが、その型はパブリックではありません + + + + The value '{0}' was marked inline but its implementation makes use of an internal or private function which is not sufficiently accessible + 値 '{0}' は 'inline' とマークされましたが、実装ではアクセシビリティが低い内部関数またはプライベート関数を使用しています + + + + The value '{0}' was marked inline but was not bound in the optimization environment + 値 '{0}' は 'inline' とマークされましたが、最適化環境ではバインドされません + + + + Local value {0} not found during optimization + 最適化中にローカルの値 {0} が見つかりませんでした + + + + A value marked as 'inline' has an unexpected value + 'inline' とマークされた値に予期しない値が含まれます + + + + A value marked as 'inline' could not be inlined + 'inline' とマークされた値をインライン展開できませんでした + + + + Failed to inline the value '{0}' marked 'inline', perhaps because a recursive value was marked 'inline' + 'inline' とマークされた値 '{0}' をインライン化できませんでした。再帰的な値が 'inline' とマークされた可能性があります。 + + + + Recursive ValValue {0} + 再帰的な ValValue {0} + + + + The indentation of this 'in' token is incorrect with respect to the corresponding 'let' + この 'in' トークンのインデントは、対応する 'let' に対して正しくありません + + + + Possible incorrect indentation: this token is offside of context started at position {0}. Try indenting this token further or using standard formatting conventions. + インデントが正しくない可能性があります。このトークンは位置 {0} から開始されるコンテキストのオフサイドになります。このトークンのインデントを増やすか、標準的な書式規則を使用してください。 + + + + The '|' tokens separating rules of this pattern match are misaligned by one column. Consider realigning your code or using further indentation. + ある列で、このパターン マッチの規則を区切る '|' トークンが正しく配置されていません。コードの配置を変更するか、インデントを増やしてください。 + + + + Invalid module/expression/type + モジュール/式/型が無効です + + + + Multiple types exist called '{0}', taking different numbers of generic parameters. Provide a type instantiation to disambiguate the type resolution, e.g. '{1}'. + 異なる数のジェネリック パラメーターを使用する '{0}' という複数の型が存在します。厳密に型を解決できるように、型のインスタンス化を指定してください (たとえば、'{1}')。 + + + + The instantiation of the generic type '{0}' is missing and can't be inferred from the arguments or return type of this member. Consider providing a type instantiation when accessing this type, e.g. '{1}'. + ジェネリック型 '{0}' のインスタンス化がありません。また、このメンバーの引数または戻り値の型から推論できません。この型にアクセスするときは型のインスタンス化を指定してください (たとえば、'{1}')。 + + + + 'global' may only be used as the first name in a qualified path + 'global' は、修飾パスの最初の名前としてのみ使用できます + + + + This is not a constructor or literal, or a constructor is being used incorrectly + これはコンストラクターまたはリテラルではありません。またはコンストラクターの使用方法に誤りがあります。 + + + + Unexpected empty long identifier + 予期しない空の長識別子: + + + + The record type '{0}' does not contain a label '{1}'. + レコードの種類 '{0}' にラベル '{1}' が含まれていません。 + + + + Invalid field label + フィールド ラベルが無効です + + + + Invalid expression '{0}' + 式 '{0}' は無効です + + + + No constructors are available for the type '{0}' + 型 '{0}' に使用できるコンストラクターがありません + + + + The union type for union case '{0}' was defined with the RequireQualifiedAccessAttribute. Include the name of the union type ('{1}') in the name you are using. + 共用体ケース '{0}' の共用体型が RequireQualifiedAccessAttribute によって定義されました。使用中の名前に共用体型 ('{1}') の名前を含めてください。 + + + + The record type for the record field '{0}' was defined with the RequireQualifiedAccessAttribute. Include the name of the record type ('{1}') in the name you are using. + レコード フィールド '{0}' のレコード型が RequireQualifiedAccessAttribute によって定義されました。使用中の名前にレコード型 ('{1}') の名前を含めてください。 + + + + Unexpected error creating debug information file '{0}' + デバッグ情報ファイル '{0}' の作成中に予期しないエラーが発生しました: + + + + This number is outside the allowable range for this integer type + この数値は、この整数型に使用できる範囲から外れています + + + + '{0}' is not permitted as a character in operator names and is reserved for future use + '{0}' は演算子名の文字として使用できません。将来利用するために予約されています + + + + Unexpected character '{0}' + 予期しない文字 '{0}' + + + + This byte array literal contains characters that do not encode as a single byte + このバイト配列リテラルには、シングル バイトとしてエンコードされない文字が含まれます + + + + Identifiers followed by '{0}' are reserved for future use + '{0}' が続く識別子は将来利用するために予約されています + + + + This number is outside the allowable range for 8-bit signed integers + この数値は、8 ビット符号付き整数に使用できる範囲から外れています + + + + This number is outside the allowable range for hexadecimal 8-bit signed integers + この数値は、16 進 8 ビット符号付き整数に使用できる範囲から外れています + + + + This number is outside the allowable range for 8-bit unsigned integers + この数値は、8 ビット符号なし整数に使用できる範囲から外れています + + + + This number is outside the allowable range for 16-bit signed integers + この数値は、16 ビット符号付き整数に使用できる範囲から外れています + + + + This number is outside the allowable range for 16-bit unsigned integers + この数値は、16 ビット符号なし整数に使用できる範囲から外れています + + + + This number is outside the allowable range for 32-bit signed integers + この数値は、32 ビット符号付き整数に使用できる範囲から外れています + + + + This number is outside the allowable range for 32-bit unsigned integers + この数値は、32 ビット符号なし整数に使用できる範囲から外れています + + + + This number is outside the allowable range for 64-bit signed integers + この数値は、64 ビット符号付き整数に使用できる範囲から外れています + + + + This number is outside the allowable range for 64-bit unsigned integers + この数値は、64 ビット符号なし整数に使用できる範囲から外れています + + + + This number is outside the allowable range for signed native integers + この数値は、符号付きネイティブ整数に使用できる範囲から外れています + + + + This number is outside the allowable range for unsigned native integers + この数値は、符号なしネイティブ整数に使用できる範囲から外れています + + + + Invalid floating point number + 浮動小数点数が無効です + + + + This number is outside the allowable range for decimal literals + この数値は、10 進リテラルに使用できる範囲から外れています + + + + This number is outside the allowable range for 32-bit floats + この数値は、32 ビット浮動小数点に使用できる範囲から外れています + + + + This is not a valid numeric literal. Valid numeric literals include 1, 0x1, 0b0001 (int), 1u (uint32), 1L (int64), 1UL (uint64), 1s (int16), 1y (sbyte), 1uy (byte), 1.0 (float), 1.0f (float32), 1.0m (decimal), 1I (BigInteger). + これは有効な数値リテラルではありません。有効な数値リテラルの例には、1、0x1、0b0001 (int)、1u (uint32)、1L (int64)、1UL (uint64)、1s (int16)、1y (sbyte)、1uy (byte)、1.0 (float)、1.0f (float32)、1.0m (decimal)、1I (BigInteger) などがあります。 + + + + This is not a valid byte literal + これは有効なバイト リテラルではありません + + + + This is not a valid character literal + これは有効な文字リテラルではありません + + + + This Unicode encoding is only valid in string literals + この Unicode エンコーディングが有効なのはリテラル文字列内のみです + + + + This token is reserved for future use + このトークンは将来利用するために予約されています + + + + TABs are not allowed in F# code unless the #indent \"off\" option is used + F# コードにタブを使用するには、#indent \"off\" オプションを使用する必要があります + + + + Invalid line number: '{0}' + 行番号: '{0}' は無効です + + + + #if directive must appear as the first non-whitespace character on a line + #if ディレクティブは、スペース以外の最初の文字として行頭に指定する必要があります + + + + #else has no matching #if + #else に対応する #if がありません + + + + #endif required for #else + #else には #endif が必要です + + + + #else directive must appear as the first non-whitespace character on a line + #else ディレクティブは、スペース以外の最初の文字として行頭に指定する必要があります + + + + #endif has no matching #if + #endif に対応する #if がありません + + + + #endif directive must appear as the first non-whitespace character on a line + #endif ディレクティブは、スペース以外の最初の文字として行頭に指定する必要があります + + + + #if directive should be immediately followed by an identifier + #if ディレクティブの直後に識別子を指定する必要があります + + + + Syntax error. Wrong nested #endif, unexpected tokens before it. + 構文エラー。#endif の入れ子が不適切です。#endif の前に予期しないトークンがあります。 + + + + #! may only appear as the first line at the start of a file. + #! は、ファイル先頭の最初の行にのみ指定できます。 + + + + Expected single line comment or end of line + 単一行のコメントまたは行の終わりが必要です + + + + Infix operator member '{0}' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ... + 挿入演算子メンバー '{0}' に引数がありません。静的メンバー (+) (x,y) = ... など、2 つの引数を持つタプルを指定してください。 + + + + Infix operator member '{0}' has {1} initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ... + 挿入演算子メンバー '{0}' に {1} 個の初期引数があります。静的メンバー (+) (x,y) = ... など、2 つの引数を持つタプルを指定してください。 + + + + Infix operator member '{0}' has extra curried arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ... + 挿入演算子メンバー '{0}' に余分なカリー化された引数があります。静的メンバー (+) (x,y) = ... など、2 つの引数を持つタプルを指定してください。 + + + + All record, union and struct types in FSharp.Core.dll must be explicitly labelled with 'StructuralComparison' or 'NoComparison' + FSharp.Core.dll のすべてのレコード型、共用体型、および構造体型は、'StructuralComparison' または 'NoComparison' で明示的にラベル指定する必要があります + + + + The struct, record or union type '{0}' has the 'StructuralComparison' attribute but the type parameter '{1}' does not satisfy the 'comparison' constraint. Consider adding the 'comparison' constraint to the type parameter + 構造体型、レコード型、または共用体型 '{0}' に 'StructuralComparison' 属性がありますが、型パラメーター '{1}' は 'comparison' 制約を満たしていません。型パラメーターに 'comparison' 制約を追加してください。 + + + + The struct, record or union type '{0}' has the 'StructuralComparison' attribute but the component type '{1}' does not satisfy the 'comparison' constraint + 構造体型、レコード型、または共用体型 '{0}' に 'StructuralComparison' 属性がありますが、コンポーネント型 '{1}' は 'comparison' 制約を満たしていません。 + + + + The struct, record or union type '{0}' is not structurally comparable because the type parameter {1} does not satisfy the 'comparison' constraint. Consider adding the 'NoComparison' attribute to the type '{2}' to clarify that the type is not comparable + 型パラメーター {1} が 'comparison' 制約を満たしていないため、構造体型、レコード型、または共用体型 '{0}' は構造的に比較できません。型 '{2}' に 'NoComparison' 属性を追加して、型が比較できないことを明確にしてください。 + + + + The struct, record or union type '{0}' is not structurally comparable because the type '{1}' does not satisfy the 'comparison' constraint. Consider adding the 'NoComparison' attribute to the type '{2}' to clarify that the type is not comparable + 型 {1} が 'comparison' 制約を満たしていないため、構造体型、レコード型、または共用体型 '{0}' は構造的に比較できません。型 '{2}' に 'NoComparison' 属性を追加して、型が比較できないことを明確にしてください。 + + + + The struct, record or union type '{0}' does not support structural equality because the type parameter {1} does not satisfy the 'equality' constraint. Consider adding the 'NoEquality' attribute to the type '{2}' to clarify that the type does not support structural equality + 型パラメーター {1} が 'equality' 制約を満たしていないため、構造体型、レコード型、または共用体型 '{0}' は構造の等値性をサポートしません。型 '{2}' に 'NoEquality' 属性を追加して、型が構造の等値性をサポートしないことを明確にしてください。 + + + + The struct, record or union type '{0}' does not support structural equality because the type '{1}' does not satisfy the 'equality' constraint. Consider adding the 'NoEquality' attribute to the type '{2}' to clarify that the type does not support structural equality + 型 {1} が 'equality' 制約を満たしていないため、構造体型、レコード型、または共用体型 '{0}' は構造の等値性をサポートしません。型 '{2}' に 'NoEquality' 属性を追加して、型が構造の等値性をサポートしないことを明確にしてください。 + + + + The struct, record or union type '{0}' has the 'StructuralEquality' attribute but the type parameter '{1}' does not satisfy the 'equality' constraint. Consider adding the 'equality' constraint to the type parameter + 構造体型、レコード型、または共用体型 '{0}' に 'StructuralEquality' 属性がありますが、型パラメーター '{1}' は 'equality' 制約を満たしていません。型パラメーターに 'equality' 制約を追加してください。 + + + + The struct, record or union type '{0}' has the 'StructuralEquality' attribute but the component type '{1}' does not satisfy the 'equality' constraint + 構造体型、レコード型、または共用体型 '{0}' に 'StructuralEquality' 属性がありますが、コンポーネント型 '{1}' は 'equality' 制約を満たしていません。 + + + + Each argument of the primary constructor for a struct must be given a type, for example 'type S(x1:int, x2: int) = ...'. These arguments determine the fields of the struct. + 構造体のプライマリ コンストラクターの各引数には型を指定してください (たとえば、'type S(x1:int, x2: int) = ...')。これらの引数で構造体のフィールドが決定されます。 + + + + The value '{0}' is unused + 値 '{0}' は使用されていません + + + + The recursive object reference '{0}' is unused. The presence of a recursive object reference adds runtime initialization checks to members in this and derived types. Consider removing this recursive object reference. + 再帰的オブジェクト参照 '{0}' は使用されていません。再帰的オブジェクト参照が存在すると、この型および派生型のメンバーに対するランタイムの初期化チェックが追加されます。この再帰的オブジェクト参照を削除してください。 + + + + A getter property may have at most one argument group + ゲッターのプロパティに指定できる引数グループの数は 1 以下です + + + + A setter property may have at most two argument groups + Set アクセス操作子のプロパティに指定できる引数グループの数は 2 以下です + + + + Invalid property getter or setter + プロパティのゲッターまたはセッターが無効です + + + + An indexer property must be given at least one argument + インデクサーのプロパティに 1 つ以上の引数を指定する必要があります + + + + This operation accesses a mutable top-level value defined in another assembly in an unsupported way. The value cannot be accessed through its address. Consider copying the expression to a mutable local, e.g. 'let mutable x = ...', and if necessary assigning the value back after the completion of the operation + この操作は、別のアセンブリに定義されている変更可能な最上位の値にアクセスしていますが、サポートされないアクセス方法です。アドレスでは値にアクセスできません。変更可能なローカル変数に式をコピーし (たとえば、'let mutable x = ...')、必要に応じて、操作の完了後に値を割り当て直してください。 + + + + Remove spaces between the type name and type parameter, e.g. \"type C<'T>\", not type \"C <'T>\". Type parameters must be placed directly adjacent to the type name. + 型パラメーターと型名は隣接している必要があります。たとえば、type \"C <'T>\" ではなく \"type C<'T>\" と指定します。 + + + + Remove spaces between the type name and type parameter, e.g. \"C<'T>\", not \"C <'T>\". Type parameters must be placed directly adjacent to the type name. + 型引数と型名は隣接している必要があります。たとえば、\"C <'T>\" ではなく \"C<'T>\" と指定します。 + + + + The use of the type syntax 'int C' and 'C <int>' is not permitted here. Consider adjusting this type to be written in the form 'C<int>' + 'int C' および 'C <int>' という型の構文は、ここでは使用できません。'C<int>' という形式でこの型を記述してください。 + + + + The module/namespace '{0}' from compilation unit '{1}' did not contain the module/namespace '{2}' + コンパイル ユニット '{1}' のモジュール/名前空間 '{0}' には、モジュール/名前空間 '{2}' が含まれません + + + + The module/namespace '{0}' from compilation unit '{1}' did not contain the val '{2}' + コンパイル ユニット '{1}' のモジュール/名前空間 '{0}' には、val '{2}' が含まれません + + + + The module/namespace '{0}' from compilation unit '{1}' did not contain the namespace, module or type '{2}' + コンパイル ユニット '{1}' のモジュール/名前空間 '{0}' には、名前空間、モジュール、または型の '{2}' が含まれません + + + + The 'UseNullAsTrueValue' attribute flag may only be used with union types that have one nullary case and at least one non-nullary case + 'UseNullAsTrueValue' 属性フラグを使用できるのは、引数がないケース 1 つと、引数があるケース 1 つ以上を持つ共用体型のみです + + + + The parameter '{0}' was inferred to have byref type. Parameters of byref type must be given an explicit type annotation, e.g. 'x1: byref<int>'. When used, a byref parameter is implicitly dereferenced. + パラメーター '{0}' は byref 型であると推論されました。byref 型のパラメーターには、明示的な型の注釈を付ける必要があります ('x1: byref<int>' など)。byref パラメーターは、使用時に暗黙的に逆参照されます。 + + + + The generic member '{0}' has been used at a non-uniform instantiation prior to this program point. Consider reordering the members so this member occurs first. Alternatively, specify the full type of the member explicitly, including argument types, return type and any additional generic parameters and constraints. + このプログラム ポイントよりも前の同型でないインスタンス化で、汎用メンバー '{0}' が使用されています。このメンバーが最初に出現するようにメンバーの順序を変えることを検討してください。または、引数の型、戻り値の型、および追加のジェネリック パラメーターと制約を含む、メンバーの完全な型を明示的に指定してください。 + + + + The attribute '{0}' appears in both the implementation and the signature, but the attribute arguments differ. Only the attribute from the signature will be included in the compiled code. + 属性 '{0}' が実装とシグネチャの双方に出現していますが、属性の引数が異なります。コンパイル済みコードには、シグネチャの属性のみが含まれます。 + + + + Cannot call an abstract base member: '{0}' + 抽象基本メンバーを呼び出すことはできません:'{0}' + + + + Could not resolve the ambiguity in the use of a generic construct with an 'unmanaged' constraint at or near this position + この位置、またはこの位置付近にある 'unmanaged' 制約を含むジェネリック コンストラクトの使用に関して、あいまいさを解決できませんでした + + + + This construct is for ML compatibility. {0}. You can disable this warning by using '--mlcompatibility' or '--nowarn:62'. + このコンストラクターは ML 互換用です。{0}。'--mlcompatibility' または '--nowarn:62' を使用して、この警告を無効にできます。 + + + + The type '{0}' has been marked as having an Explicit layout, but the field '{1}' has not been marked with the 'FieldOffset' attribute + 型 '{0}' は明示的なレイアウトがあるとしてマークされていますが、フィールド '{1}' は 'FieldOffset' 属性でマークされていません + + + + Interfaces inherited by other interfaces should be declared using 'inherit ...' instead of 'interface ...' + 他のインターフェイスによって継承されたインターフェイスは、'interface ...' ではなく 'inherit ...' を使用して宣言する必要があります + + + + Invalid prefix operator + 無効なプレフィックス演算子です + + + + Invalid operator definition. Prefix operator definitions must use a valid prefix operator name. + 無効な演算子の定義です。プレフィックス演算子の定義には、有効なプレフィックス演算子名を使用する必要があります。 + + + + The file extensions '.ml' and '.mli' are for ML compatibility + ファイル拡張子 '.ml' および '.mli' は ML 互換用です + + + + Consider using a file with extension '.ml' or '.mli' instead + 代わりに、ファイル拡張子に '.ml' または '.mli' を使用してください + + + + Active pattern '{0}' is not a function + アクティブ パターン '{0}' が関数ではありません + + + + Active pattern '{0}' 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' + アクティブ パターン '{0}' に、入力によって決定されない型変数を含む結果の型があります。一般的な原因は、結果の型が記述されていないことです (例: 'let (|A|B|) (x:int) = A x')。この場合は、型の制約によって問題を解決できます (例: 'let (|A|B|) (x:int) : Choice<int,unit> = A x')。 + + + + The FieldOffset attribute can only be placed on members of types marked with the StructLayout(LayoutKind.Explicit) + FieldOffset 属性は、StructLayout(LayoutKind.Explicit) でマークされた型のメンバーでのみ使用できます + + + + Optional arguments must come at the end of the argument list, after any non-optional arguments + オプションの引数は、オプションではないすべての引数の後で、引数リストの末尾に指定する必要があります。 + + + + Attribute 'System.Diagnostics.ConditionalAttribute' is only valid on methods or attribute classes + 属性 'System.Diagnostics.ConditionalAttribute' はメソッド クラスまたは属性クラスでのみ有効です + + + + Extension members cannot provide operator overloads. Consider defining the operator as part of the type definition instead. + 拡張メンバーでは演算子のオーバーロードを実行できません。代わりに型定義の一部として演算子を定義してください。 + + + + The name of the MDB file must be <assembly-file-name>.mdb. The --pdb option will be ignored. + MDB ファイルの名前は、<アセンブリ ファイルの名前>.mdb にする必要があります。--pdb オプションは無視されます。 + + + + MDB generation failed. Could not find compatible member {0} + MDB を生成できませんでした。互換性のあるメンバー {0} が見つかりませんでした + + + + Cannot generate MDB debug information. Failed to load the 'MonoSymbolWriter' type from the 'Mono.CompilerServices.SymbolWriter.dll' assembly. + MDB デバッグ情報を生成できません。'Mono.CompilerServices.SymbolWriter.dll' アセンブリから 'MonoSymbolWriter' 型を読み込むことができませんでした。 + + + + The union case named '{0}' conflicts with the generated type '{1}' + {0}' という名前の共用体ケースが、生成された型 '{1}' と競合します + + + + ReflectedDefinitionAttribute may not be applied to an instance member on a struct type, because the instance member takes an implicit 'this' byref parameter + ReflectedDefinitionAttribute は、構造体型でインスタンス メンバーに適用することはできません。これは、このインスタンス メンバーが暗黙的な 'this' byref パラメーターを受け取るためです。 + + + + DLLImport bindings must be static members in a class or function definitions in a module + DLLImport 束縛はモジュール内のクラスまたは関数定義の静的メンバーであることが必要です + + + + When mscorlib.dll or FSharp.Core.dll is explicitly referenced the {0} option must also be passed + mscorlib.dll または FSharp.Core.dll が明示的に参照される場合は、{0} オプションも渡す必要があります + + + + FSharp.Core.sigdata not found alongside FSharp.Core. File expected in {0}. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required. + FSharp.Core と同じ場所に FSharp.Core.sigdata が見つかりません。ファイルは {0} にある必要があります。このファイルを必要としない、より新しいバージョンの FSharp.Core にアップグレードすることをご検討ください。 + + + + File '{0}' not found alongside FSharp.Core. File expected in {1}. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required. + FSharp.Core と同じ場所にファイル '{0}' が見つかりません。ファイルは {1} にある必要があります。このファイルを必要としない、より新しいバージョンの FSharp.Core にアップグレードすることをご検討ください。 + + + + Filename '{0}' contains invalid character '{1}' + ファイル名 '{0}' に無効な文字 '{1}' が含まれています + + + + 'use!' bindings must be of the form 'use! <var> = <expr>' + 'use!' 束縛は 'use! <var> = <expr>' という形式にする必要があります + + + + Inner generic functions are not permitted in quoted expressions. Consider adding some type constraints until this function is no longer generic. + 内部ジェネリック関数は引用符付きの式には使用できません。関数の型を特定できるまで、何らかの型の制約を追加してください。 + + + + The type '{0}' is not a valid enumerator type , i.e. does not have a 'MoveNext()' method returning a bool, and a 'Current' property + 型 '{0}' は有効な列挙子の型ではありません。つまり、ブール値を返す 'MoveNext()' メソッドと 'Current' プロパティが含まれていません + + + + End of file in triple-quote string begun at or before here + この位置以前に始まった三重引用符文字列の途中でファイルの終わりが見つかりました + + + + End of file in triple-quote string embedded in comment begun at or before here + この位置以前に始まったコメントに埋め込まれた三重引用符文字列の途中でファイルの終わりが見つかりました + + + + This type test or downcast will ignore the unit-of-measure '{0}' + この型テストまたはダウンキャストでは、測定単位 '{0}' が無視されます + + + + Expected type argument or static argument + 型引数または静的引数が必要です + + + + Unmatched '<'. Expected closing '>' + '<' が対応しません。対応する '>' が必要です + + + + Unexpected quotation operator '<@' in type definition. If you intend to pass a verbatim string as a static argument to a type provider, put a space between the '<' and '@' characters. + 型定義に予期しない引用演算子 '<@' が見つかりました。verbatim 文字列を静的引数として型プロバイダーに渡す場合は、'<' と '@' の間に空白を挿入してください。 + + + + Attempted to parse this as an operator name, but failed + これを演算子名として解析しようとしましたが、失敗しました + + + + \U{0} is not a valid Unicode character escape sequence + \U{0} は、無効な Unicode 文字のエスケープ シーケンスです + + + + '{0}' must be applied to an argument of type '{1}', but has been applied to an argument of type '{2}' + '{0}' は、型が '{1}' の引数に適用する必要がありますが、型が '{2}' の引数に適用されています + + + + '{0}' can only be applied to optional arguments + '{0}' の適用対象にできるのはオプションの引数だけです + + + + The specified .NET Framework version '{0}' is not supported. Please specify a value from the enumeration Microsoft.Build.Utilities.TargetDotNetFrameworkVersion. + 指定した .NET Framework のバージョン '{0}' はサポートされていません。列挙型 Microsoft.Build.Utilities.TargetDotNetFrameworkVersion からの値を指定してください。 + + + + Invalid Magic value in CLR Header + CLR ヘッダーのマジック値が正しくありません + + + + Bad image format + イメージ形式が正しくありません + + + + Private key expected + 秘密キーが必要です + + + + RSA key expected + RSA キーが必要です + + + + Invalid bit Length + ビット長が正しくありません + + + + Invalid RSAParameters structure - '{{0}}' expected + RSAParameters 構造が正しくありません - '{{0}}' が必要です + + + + Invalid algId - 'Exponent' expected + algId が正しくありません - '指数' が必要です + + + + Invalid signature size + シグネチャのサイズが正しくありません + + + + No signature directory + シグネチャのディレクトリがありません + + + + Invalid Public Key blob + 公開キー BLOB が正しくありません + + + + Exiting - too many errors + 終了しています - エラーが多すぎます + + + + The documentation file has no .xml suffix + ドキュメント ファイルに .xml サフィックスがありません + + + + No implementation files specified + 実装ファイルが指定されていません + + + + The attribute {0} specified version '{1}', but this value is invalid and has been ignored + 属性 {0} にバージョン '{1}' を指定しましたが、この値は無効なため無視されました + + + + Conflicting options specified: 'win32manifest' and 'win32res'. Only one of these can be used. + 競合するオプションが指定されました: 'win32manifest' および 'win32res'。これらのうち、1 つのみを使用できます。 + + + + The code in assembly '{0}' makes uses of quotation literals. Static linking may not include components that make use of quotation literals unless all assemblies are compiled with at least F# 4.0. + アセンブリ '{0}' 内のコードで引用符リテラルが使用されています。静的リンクでは、F# 4.0 以上ですべてのアセンブリがコンパイルされる場合を除き、引用符リテラルを使用するコンポーネントがインクルードされない可能性があります。 + + + + Code in this assembly makes uses of quotation literals. Static linking may not include components that make use of quotation literals unless all assemblies are compiled with at least F# 4.0. + このアセンブリ内のコードでは引用符リテラルが使用されています。静的リンクでは、F# 4.0 以上ですべてのアセンブリがコンパイルされる場合を除き、引用符リテラルを使用するコンポーネントがインクルードされない可能性があります。 + + + + Static linking may not include a .EXE + 静的リンクでは、.EXE がインクルードされない可能性があります + + + + Static linking may not include a mixed managed/unmanaged DLL + 静的リンクでは、混合マネージド/アンマネージド DLL がインクルードされない可能性があります + + + + Ignoring mixed managed/unmanaged assembly '{0}' during static linking + 静的リンク中に混合マネージド/アンマネージド アセンブリ '{0}' を無視しています + + + + Assembly '{0}' was referenced transitively and the assembly could not be resolved automatically. Static linking will assume this DLL has no dependencies on the F# library or other statically linked DLLs. Consider adding an explicit reference to this DLL. + アセンブリ '{0}' は推移的に参照され、このアセンブリを自動的に解決できませんでした。静的リンクでは、この DLL に F# ライブラリ上またはその他の静的にリンクされた DLL 上の依存関係がないと見なされます。この DLL に明示的な参照を追加することを検討してください。 + + + + Assembly '{0}' not found in dependency set of target binary. Statically linked roots should be specified using an assembly name, without a DLL or EXE extension. If this assembly was referenced explicitly then it is possible the assembly was not actually required by the generated binary, in which case it should not be statically linked. + アセンブリ '{0}' は、対象のバイナリの依存関係セットから見つかりませんでした。静的にリンクされたルートは、DLL または EXE 拡張子なしでアセンブリ名を使用して指定する必要があります。このアセンブリが明示的に参照された場合、アセンブリは生成されたバイナリで実際に要求されていない可能性があり、この場合には静的にリンクしないでください。 + + + + The key file '{0}' could not be opened + キー ファイル '{0}' を開けませんでした + + + + A problem occurred writing the binary '{0}': {1} + バイナリ '{0}' の書き込み中に問題が発生しました: {1} + + + + The 'AssemblyVersionAttribute' has been ignored because a version was given using a command line option + 'AssemblyVersionAttribute' は、バージョンがコマンド ライン オプションを使用して指定されたため無視されました + + + + Error emitting 'System.Reflection.AssemblyCultureAttribute' attribute -- 'Executables cannot be satellite assemblies, Culture should always be empty' + 'System.Reflection.AssemblyCultureAttribute' 属性の生成中にエラーが発生しました -- '実行可能ファイルをサテライト アセンブリにすることはできません。カルチャは常に空である必要があります' + + + + Option '--delaysign' overrides attribute 'System.Reflection.AssemblyDelaySignAttribute' given in a source file or added module + ソース ファイルまたは追加されたモジュールに指定された 'System.Reflection.AssemblyDelaySignAttribute' 属性は、'--delaysign' オプションでオーバーライドされます + + + + Option '--keyfile' overrides attribute 'System.Reflection.AssemblyKeyFileAttribute' given in a source file or added module + ソース ファイルまたは追加されたモジュールに指定された 'System.Reflection.AssemblyKeyFileAttribute' 属性は、'--keyfile' オプションでオーバーライドされます + + + + Option '--keycontainer' overrides attribute 'System.Reflection.AssemblyNameAttribute' given in a source file or added module + ソース ファイルまたは追加されたモジュールに指定された 'System.Reflection.AssemblyNameAttribute' 属性は、'--keycontainer' オプションでオーバーライドされます + + + + The assembly '{0}' is listed on the command line. Assemblies should be referenced using a command line flag such as '-r'. + アセンブリ '{0}' はコマンド ラインに一覧表示されます。アセンブリは '-r' などのコマンド ライン フラグを使用して参照する必要があります。 + + + + The resident compilation service was not used because a problem occured in communicating with the server. + サーバーとの通信で問題が発生したため、常駐コンパイル サービスが使用されませんでした。 + + + + Problem with filename '{0}': Illegal characters in path. + ファイル名 '{0}' に問題があります: パスに無効な文字が含まれています。 + + + + Passing a .resx file ({0}) as a source file to the compiler is deprecated. Use resgen.exe to transform the .resx file into a .resources file to pass as a --resource option. If you are using MSBuild, this can be done via an <EmbeddedResource> item in the .fsproj project file. + .resx ファイル ({0}) をソース ファイルとしてコンパイラに渡す処理は非推奨です。resgen.exe を使用して、.resx ファイルを .resources ファイルに変換し、--resource オプションで渡してください。MSBuild を使用する場合は、.fsproj プロジェクト ファイル内の <EmbeddedResource> 項目を使用して、この変換を実行できます。 + + + + Static linking may not be used on an assembly referencing mscorlib (e.g. a .NET Framework assembly) when generating an assembly that references System.Runtime (e.g. a .NET Core or Portable assembly). + 静的リンクは、System.Runtime (.NET Core またはポータブル アセンブリなど) を参照するアセンブリを生成する場合、mscorlib (.NET Framework アセンブリなど) を参照するアセンブリには使用できません。 + + + + An {0} specified version '{1}', but this value is a wildcard, and you have requested a deterministic build, these are in conflict. + {0} によりバージョン '{1}' が指定されましたが、この値はワイルドカードです。決定論的なビルドを要求しているため、これらの指定は矛盾しています。 + + + + Determinstic builds only support portable PDBs (--debug:portable or --debug:embedded) + 決定論的ビルドはポータブル PDB のみをサポートします (--debug:portable または --debug:embedded) + + + + Character '{0}' is not allowed in provided namespace name '{1}' + 指定された名前空間名 '{1}' には、文字 '{0}' を使用することはできません + + + + The provided type '{0}' returned a member with a null or empty member name + 指定された型 '{0}' が返したメンバーのメンバー名が null または空です + + + + The provided type '{0}' returned a null member + 指定された型 '{0}' が null のメンバーを返しました + + + + The provided type '{0}' member info '{1}' has null declaring type + 指定された型 '{0}' のメンバー情報 '{1}' に null を宣言する型が含まれています + + + + The provided type '{0}' has member '{1}' which has declaring type '{2}'. Expected declaring type to be the same as provided type. + 指定された型 '{0}' のメンバー '{1}' に、宣言する型 '{2}' が含まれています。宣言する型は、指定された型と同じである必要があります。 + + + + Referenced assembly '{0}' has assembly level attribute '{1}' but no public type provider classes were found + 参照アセンブリ '{0}' にアセンブリ レベル属性 '{1}' が含まれていますが、パブリックな型プロバイダー クラスが見つかりません + + + + Type '{0}' from type provider '{1}' has an empty namespace. Use 'null' for the global namespace. + 型プロバイダー '{1}' からの型 '{0}' に空の名前空間が含まれています。グローバル名前空間を表す 'null' を使用してください。 + + + + Empty namespace found from the type provider '{0}'. Use 'null' for the global namespace. + 型プロバイダー '{0}' に空の名前空間が見つかりました。グローバル名前空間を表す 'null' を使用してください。 + + + + Provided type '{0}' has 'IsGenericType' as true, but generic types are not supported. + 指定された型 '{0}' で 'IsGenericType' が true になっていますが、ジェネリック型はサポートされていません。 + + + + Provided type '{0}' has 'IsArray' as true, but array types are not supported. + 指定された型 '{0}' で 'IsArray' が true になっていますが、配列型はサポートされていません。 + + + + Invalid member '{0}' on provided type '{1}'. Provided type members must be public, and not be generic, virtual, or abstract. + 指定された型 '{1}' に無効なメンバー '{0}' が含まれています。指定された型のメンバーはパブリックである必要があり、汎用メンバー、仮想メンバー、および抽象メンバーは無効です。 + + + + Invalid member '{0}' on provided type '{1}'. Only properties, methods and constructors are allowed + 指定された型 '{1}' のメンバー '{0}' が無効です。許容されるのは、プロパティ、メソッド、およびコンストラクターのみです + + + + Property '{0}' on provided type '{1}' has CanRead=true but there was no value from GetGetMethod() + 指定された型 '{1}' のプロパティ '{0}' で CanRead=true となっていますが、GetGetMethod() からの値が存在しません + + + + Property '{0}' on provided type '{1}' has CanRead=false but GetGetMethod() returned a method + 指定された型 '{1}' のプロパティ '{0}' で CanRead=false となっていますが、GetGetMethod() がメソッドを返しました + + + + Property '{0}' on provided type '{1}' has CanWrite=true but there was no value from GetSetMethod() + 指定された型 '{1}' のプロパティ '{0}' で CanWrite=true となっていますが、GetSetMethod() からの値が存在しません + + + + Property '{0}' on provided type '{1}' has CanWrite=false but GetSetMethod() returned a method + 指定された型 '{1}' のプロパティ '{0}' で CanWrite=false となっていますが、GetSetMethod() がメソッドを返しました + + + + One or more errors seen during provided type setup + 指定された型のセットアップ中にエラーが発生しました + + + + Unexpected exception from provided type '{0}' member '{1}': {2} + 指定された型 '{0}' のメンバー '{1}' で予期しない例外が発生しました: {2} + + + + Unsupported constant type '{0}'. Quotations provided by type providers can only contain simple constants. The implementation of the type provider may need to be adjusted by moving a value declared outside a provided quotation literal to be a 'let' binding inside the quotation literal. + サポートされない定数型 '{0}'。型プロバイダーで提供される引用に含められるのは単純定数のみです。型プロバイダーの実装は、指定された引用リテラル外部で宣言された値を移動して、引用リテラル内部の 'let' バインドにすることによって調整することが必要な場合があります。 + + + + Unsupported expression '{0}' from type provider. If you are the author of this type provider, consider adjusting it to provide a different provided expression. + 型プロバイダーから、サポートされない式 '{0}' が指定されました。この型プロバイダーの作成者である場合は、別の指定された式を指定するように調整することを検討してください。 + + + + Expected provided type named '{0}' but provided type has 'Name' with value '{1}' + 指定された型の名前が '{0}' である必要がありましたが、指定された型の名前は 'Name'、値は '{1}' でした + + + + Event '{0}' on provided type '{1}' has no value from GetAddMethod() + 指定された型 '{1}' におけるイベント '{0}' に、GetAddMethod() の値が含まれていません + + + + Event '{0}' on provided type '{1}' has no value from GetRemoveMethod() + 指定された型 '{1}' におけるイベント '{0}' に、GetRemoveMethod() の値が含まれていません + + + + Assembly attribute '{0}' refers to a designer assembly '{1}' which cannot be loaded or doesn't exist. {2} + アセンブリ属性 '{0}' はデザイナー アセンブリ '{1}' を参照していますが、このアセンブリは読み込めないか、存在していません。{2} + + + + The type provider does not have a valid constructor. A constructor taking either no arguments or one argument of type 'TypeProviderConfig' was expected. + 型プロバイダーに有効なコンストラクターが含まれていません。引数を受け取らないコンストラクター、または 'TypeProviderConfig' 型の引数を 1 つ受け取るコンストラクターが必要です。 + + + + The type provider '{0}' reported an error: {1} + 型プロバイダー '{0}' がエラーを報告しました: {1} + + + + The type provider '{0}' used an invalid parameter in the ParameterExpression: {1} + 型プロバイダー '{0}' の ParameterExpression 内で無効なパラメーターが使用されました: {1} + + + + The type provider '{0}' provided a method with a name '{1}' and metadata token '{2}', which is not reported among its methods of its declaring type '{3}' + 型プロバイダー '{0}' で、'{1}' という名前のメソッドとメタデータ トークン '{2}' が指定されましたが、これは宣言型 '{3}' のメソッドの中で報告されていません + + + + The type provider '{0}' provided a constructor which is not reported among the constructors of its declaring type '{1}' + 型プロバイダー '{0}' で指定されたコンストラクターは、宣言型 '{1}' のコンストラクターの中で報告されていません + + + + A direct reference to the generated type '{0}' is not permitted. Instead, use a type definition, e.g. 'type TypeAlias = <path>'. This indicates that a type provider adds generated types to your assembly. + 生成された型 '{0}' への直接参照は許可されていません。型定義を使用してください (たとえば、'type TypeAlias = <path>')。この例では、生成された型が型プロバイダーによってアセンブリに追加されます。 + + + + Expected provided type with path '{0}' but provided type has path '{1}' + 指定された型のパスが '{0}' である必要がありましたが、指定された型のパスは '{1}' でした + + + + Unexpected 'null' return value from provided type '{0}' member '{1}' + 指定された型 '{0}' のメンバー '{1}' から予期しない 'null' 戻り値が返されました + + + + Unexpected exception from member '{0}' of provided type '{1}' member '{2}': {3} + 指定された型 '{1}' のメンバー '{2}' のメンバー '{0}' で予期しない例外が発生しました: {3} + + + + Nested provided types do not take static arguments or generic parameters + 指定された型が入れ子の場合、静的引数もジェネリック パラメーターも受け取りません + + + + Invalid static argument to provided type. Expected an argument of kind '{0}'. + 指定された型に対して無効な静的引数が渡されました。'{0}' という種類の引数を渡す必要があります。 + + + + An error occured applying the static arguments to a provided type + 指定された型に静的引数を適用する際にエラーが発生しました + + + + Unknown static argument kind '{0}' when resolving a reference to a provided type or method '{1}' + 指定された型またはメソッド '{1}' への参照を解決する際に、不明な静的引数の種類 '{0}' が検出されました + + + + invalid namespace for provided type + 指定された型の名前空間が無効です + + + + invalid full name for provided type + 指定された型の完全名が無効です + + + + The type provider returned 'null', which is not a valid return value from '{0}' + 型プロバイダーが 'null' を返しましたが、これは '{0}' からの戻り値としては無効です + + + + The type provider constructor has thrown an exception: {0} + 型プロバイダー コンストラクターが例外をスローしました: {0} + + + + Type provider '{0}' returned null from GetInvokerExpression. + 型プロバイダー '{0}' が、GetInvokerExpression から null を返しました。 + + + + The type provider '{0}' returned an invalid type from 'ApplyStaticArguments'. A type with name '{1}' was expected, but a type with name '{2}' was returned. + 型プロバイダー '{0}' が 'ApplyStaticArguments' から無効な型を返しました。'{1}' という名前の型が返される必要がありましたが、返されたのは '{2}' という名前の型でした。 + + + + The type provider '{0}' returned an invalid method from 'ApplyStaticArgumentsForMethod'. A method with name '{1}' was expected, but a method with name '{2}' was returned. + 型プロバイダー '{0}' が、'ApplyStaticArgumentsForMethod' から無効なメソッドを返しました。名前が '{1}' のメソッドが必要ですが、名前が '{2}' のメソッドが返されました。 + + + + This type test or downcast will erase the provided type '{0}' to the type '{1}' + この型テストまたはダウンキャストによって、指定された型 '{0}' が型 '{1}' に消去されます + + + + This downcast will erase the provided type '{0}' to the type '{1}'. + このダウンキャストによって、指定された型 '{0}' が型 '{1}' に消去されます。 + + + + This type test with a provided type '{0}' is not allowed because this provided type will be erased to '{1}' at runtime. + 指定された型 '{0}' は実行時に '{1}' に消去されるため、この型を使用して型テストを実行することはできません。 + + + + Cannot inherit from erased provided type + 指定された型が消去されている場合、継承することはできません + + + + Assembly '{0}' hase TypeProviderAssembly attribute with invalid value '{1}'. The value should be a valid assembly name + アセンブリ '{0}' の TypeProviderAssembly 属性に、無効な値 '{1}' が含まれています。この値は有効なアセンブリ名であることが必要です + + + + Invalid member name. Members may not have name '.ctor' or '.cctor' + メンバー名が無効です。メンバーに '.ctor' または '.cctor' という名前を付けることはできません + + + + The function or member '{0}' is used in a way that requires further type annotations at its definition to ensure consistency of inferred types. The inferred signature is '{1}'. + 現在使用されている関数またはメンバー '{0}' では、推論された型の一貫性を確保するために、さらに型の注釈が必要です。推論されたシグネチャは '{1}' です。 + + + + The number of type arguments did not match: '{0}' given, '{1}' expected. This may be related to a previously reported error. + 型引数の数が一致しません: 指定されているのは '{0}' 個ですが、'{1}' 個にする必要があります。このエラーは、前に報告されたエラーに関係する場合があります。 + + + + Cannot override inherited member '{0}' because it is sealed + 継承されたメンバー '{0}' はシールされているため、オーバーライドできません + + + + The type provider '{0}' reported an error in the context of provided type '{1}', member '{2}'. The error: {3} + 型プロバイダー '{0}' が、指定された型 '{1}'、メンバー '{2}' のコンテキストでエラーを報告しました。エラー: {3} + + + + An exception occurred when accessing the '{0}' of a provided type: {1} + 指定された型の '{0}' にアクセスする際に例外が発生しました: {1} + + + + The '{0}' of a provided type was null or empty. + 指定された型の '{0}' が null または空でした。 + + + + Character '{0}' is not allowed in provided type name '{1}' + 指定された型名 '{1}' には、文字 '{0}' を使用することはできません + + + + In queries, '{0}' must use a simple pattern + クエリ内では、'{0}' は単純なパターンを使用する必要があります + + + + A custom query operation for '{0}' is required but not specified + '{0}' に対するカスタム クエリ操作が必要ですが、指定されていません + + + + Named static arguments must come after all unnamed static arguments + 名前付きの静的引数は、名前のない静的引数の後に置く必要があります + + + + The static parameter '{0}' of the provided type or method '{1}' requires a value. Static parameters to type providers may be optionally specified using named arguments, e.g. '{2}<{3}=...>'. + 指定された型またはメソッド '{1}' の静的パラメーター '{0}' には値が必要です。型プロバイダーの静的パラメーターは、名前付き引数 (例: '{2}<{3}=...>') を使用してオプションで指定できます。 + + + + No static parameter exists with name '{0}' + '{0}' という名前の静的パラメーターがありません + + + + The static parameter '{0}' has already been given a value + 静的パラメーター '{0}' には既に値が指定されています + + + + Multiple static parameters exist with name '{0}' + '{0}' という名前の静的パラメーターが複数存在しています + + + + A custom operation may not be used in conjunction with a non-value or recursive 'let' binding in another part of this computation expression + このコンピュテーション式の別の部分に値のない束縛または再帰的な 'let' 束縛が含まれている場合、カスタム操作を使用することができません + + + + A custom operation may not be used in conjunction with 'use', 'try/with', 'try/finally', 'if/then/else' or 'match' operators within this computation expression + このコンピュテーション式に 'use'、'try/with'、'try/finally'、'if/then/else'、または 'match' 演算子が含まれている場合、カスタム操作を使用することができません + + + + The custom operation '{0}' refers to a method which is overloaded. The implementations of custom operations may not be overloaded. + カスタム操作 '{0}' が、オーバーロードされたメソッドを参照しています。カスタム操作の実装をオーバーロードすることはできません。 + + + + An if/then/else expression may not be used within queries. Consider using either an if/then expression, or use a sequence expression instead. + if/then/else 式はクエリ内で使用できません。if/then 式を使用するか、シーケンス式を使用してください。 + + + + Invalid argument to 'methodhandleof' during codegen + codegen で 'methodhandleof' に無効な引数が渡されました + + + + A reference to a provided type was missing a value for the static parameter '{0}'. You may need to recompile one or more referenced assemblies. + 指定された型に対する参照に、静的パラメーター '{0}' に対応する値がありません。1 つ以上の参照アセンブリを再コンパイルする必要がある場合があります。 + + + + A reference to a provided type had an invalid value '{0}' for a static parameter. You may need to recompile one or more referenced assemblies. + 指定された型に対する参照に、静的パラメーターでは無効な値 '{0}' が含まれていました。1 つ以上の参照アセンブリを再コンパイルする必要がある場合があります。 + + + + '{0}' is not used correctly. This is a custom operation in this query or computation expression. + '{0}' の使用方法が正しくありません。これは、このクエリまたはコンピュテーション式のカスタム操作です。 + + + + '{0}' is not used correctly. Usage: {1}. This is a custom operation in this query or computation expression. + '{0}' の使用方法が正しくありません。使い方: {1}。これは、このクエリまたはコンピュテーション式のカスタム操作です。 + + + + {0} var in collection {1} (outerKey = innerKey). Note that parentheses are required after '{2}' + {0} var in collection {1} (outerKey = innerKey)。'{2}' の後ろにはかっこが必要です。 + + + + {0} var in collection {1} (outerKey = innerKey) into group. Note that parentheses are required after '{2}' + {0} var in collection {1} (outerKey = innerKey) into group。'{2}' の後ろにかっこが必要です + + + + {0} var in collection + {0} var in collection + + + + '{0}' must be followed by a variable name. Usage: {1}. + '{0}' の後には変数名が必要です。使い方: {1}。 + + + + Incorrect syntax for '{0}'. Usage: {1}. + {0}' の構文が正しくありません。使い方: {1}。 + + + + '{0}' must come after a 'for' selection clause and be followed by the rest of the query. Syntax: ... {1} ... + '{0}' は 'for' 選択句の後に配置し、その後に残りのクエリを配置する必要があります。構文: ... {1} ... + + + + '{0}' is used with an incorrect number of arguments. This is a custom operation in this query or computation expression. Expected {1} argument(s), but given {2}. + '{0}' で使用されている引数の数が正しくありません。これはこのクエリのカスタム操作であるか、コンピュテーション式です。適正な引数の数は {1} 個ですが、渡されたのは {2} 個でした。 + + + + Expected an expression after this point + この位置より後に式を置く必要があります + + + + Expected a type after this point + この位置より後に型を置く必要があります + + + + Unmatched '[<'. Expected closing '>]' + '[<' が対応しません。対応する '>]' が必要です + + + + Unexpected end of input in 'match' expression. Expected 'match <expr> with | <pat> -> <expr> | <pat> -> <expr> ...'. + 'match' 式に予期しない入力の終わりが見つかりました。'match <expr> with | <pat> -> <expr> | <pat> -> <expr> ...' という形式を使用する必要があります。 + + + + Unexpected end of input in 'try' expression. Expected 'try <expr> with <rules>' or 'try <expr> finally <expr>'. + 'try' 式に予期しない入力の終わりが見つかりました。'try <expr> with <rules>' または 'try <expr> finally <expr>' という形式を使用する必要があります。 + + + + Unexpected end of input in 'while' expression. Expected 'while <expr> do <expr>'. + 'while' 式に予期しない入力の終わり見つかりました。'while <expr> do <expr>' という形式を使用する必要があります。 + + + + Unexpected end of input in 'for' expression. Expected 'for <pat> in <expr> do <expr>'. + 'for' 式の中に予期しない入力の終わりが見つかりました。'for <pat> in <expr> do <expr>' という形式を使用する必要があります。 + + + + Unexpected end of input in 'match' or 'try' expression + 'match' 式または 'try' 式に予期しない入力の終わりが見つかりました + + + + Unexpected end of input in 'then' branch of conditional expression. Expected 'if <expr> then <expr>' or 'if <expr> then <expr> else <expr>'. + 条件式の 'then' 分岐に予期しない入力の終わりが見つかりました。'if <expr> then <expr>' または 'if <expr> then <expr> else <expr>' という形式を使用する必要があります。 + + + + Unexpected end of input in 'else' branch of conditional expression. Expected 'if <expr> then <expr>' or 'if <expr> then <expr> else <expr>'. + 条件式の 'else' 分岐で予期しない入力の終わりが見つかりました。'if <expr> then <expr>' または 'if <expr> then <expr> else <expr>' という形式を使用する必要があります。 + + + + Unexpected end of input in body of lambda expression. Expected 'fun <pat> ... <pat> -> <expr>'. + ラムダ式の本体に予期しない入力の終わりが見つかりました。'fun <pat> ... <pat> -> <expr>' という形式を使用する必要があります。 + + + + Unexpected end of input in type arguments + 型引数に予期しない入力の終わりが見つかりました + + + + Unexpected end of input in type signature + 型シグネチャに予期しない入力の終わりが見つかりました + + + + Unexpected end of input in type definition + 型定義に予期しない入力の終わりが見つかりました + + + + Unexpected end of input in object members + オブジェクト メンバーに予期しない入力の終わりが見つかりました + + + + Unexpected end of input in value, function or member definition + 値、関数、またはメンバーの定義内で予期しない入力の終わりが見つかりました + + + + Unexpected end of input in expression + 式の中に予期しない入力の終わりが見つかりました + + + + Unexpected end of type. Expected a name after this point. + 予期しない型の末尾です。この位置より後に名前を置く必要があります。 + + + + Incomplete value or function definition. If this is in an expression, the body of the expression must be indented to the same column as the 'let' keyword. + 値または関数定義が不完全です。これが式の中にある場合、式の本体を 'let' キーワードと同じ列にインデントする必要があります。 + + + + Incomplete value definition. If this is in an expression, the body of the expression must be indented to the same column as the 'let!' keyword. + 値の定義が不完全です。これが式の中にある場合、式の本体を 'let!' キーワードと同じ列にインデントする必要があります。 + + + + Incomplete value definition. If this is in an expression, the body of the expression must be indented to the same column as the 'use!' keyword. + 値の定義が不完全です。これが式の中にある場合、式の本体を 'use!' キーワードと同じ列にインデントする必要があります。 + + + + Incomplete value definition. If this is in an expression, the body of the expression must be indented to the same column as the 'use' keyword. + 値の定義が不完全です。これが式の中にある場合、式の本体を 'use' キーワードと同じ列にインデントする必要があります。 + + + + Missing 'do' in 'while' expression. Expected 'while <expr> do <expr>'. + 'while' 式に 'do' がありません。'while <expr> do <expr>' という形式を使用する必要があります。 + + + + Missing 'do' in 'for' expression. Expected 'for <pat> in <expr> do <expr>'. + 'for' 式の中に 'do' がありません。'for <pat> in <expr> do <expr>' という形式にしてください。 + + + + Invalid join relation in '{0}'. Expected 'expr <op> expr', where <op> is =, =?, ?= or ?=?. + '{0}' に無効な結合関係が含まれています。'expr <op> expr' という形式を使用する必要があります (<op> は =、=?、?=、または ?=? です)。 + + + + Calls + 呼び出し + + + + Invalid number of generic arguments to type '{0}' in provided type. Expected '{1}' arguments, given '{2}'. + 指定された型で、型 '{0}' に対して渡された汎用引数の数が無効です。適正な引数の数は '{1}' 個ですが、渡されたのは '{2}' 個でした。 + + + + Invalid value '{0}' for unit-of-measure parameter '{1}' + 測定単位のパラメーター '{1}' の値 '{0}' は無効です + + + + Invalid value unit-of-measure parameter '{0}' + 測定単位のパラメーター '{0}' の値が無効です + + + + Property '{0}' on provided type '{1}' is neither readable nor writable as it has CanRead=false and CanWrite=false + 指定された型 '{1}' のプロパティ '{0}' で CanRead=false および CanWrite=false とされているため、読み取りも書き込みもできません + + + + A use of 'into' must be followed by the remainder of the computation + 'into' を使用する場合、その後に残りの計算を配置する必要があります + + + + The operator '{0}' does not accept the use of 'into' + 演算子 '{0}' では、'into' を使用することはできません + + + + The definition of the custom operator '{0}' does not use a valid combination of attribute flags + カスタム演算子 '{0}' の定義で使用されている属性フラグの組み合わせが無効です + + + + This type definition may not have the 'CLIMutable' attribute. Only record types may have this attribute. + この型定義には 'CLIMutable' 属性を含めることができません。この属性を含めることができるのはレコード型のみです。 + + + + 'member val' definitions are only permitted in types with a primary constructor. Consider adding arguments to your type definition, e.g. 'type X(args) = ...'. + 'member val' 定義は、プライマリ コンストラクターを含む型でのみ使用できます。型定義に引数を追加してください (たとえば、'type X(args) = ...')。 + + + + Property definitions may not be declared mutable. To indicate that this property can be set, use 'member val PropertyName = expr with get,set'. + プロパティの定義は変更可能として宣言することはできません。このプロパティが設定できることを示すには、'member val PropertyName = expr with get,set' を使用します。 + + + + To indicate that this property can be set, use 'member val PropertyName = expr with get,set'. + このプロパティを設定できることを示すには、'member val PropertyName = expr with get,set' を使用します。 + + + + Type '{0}' is illegal because in byref<T>, T cannot contain byref types. + byref<T> では T に byref 型を含めることができないため、型 '{0}' は正しくありません。 + + + + F# supports array ranks between 1 and 32. The value {0} is not allowed. + F# は、1 から 32 の配列ランクをサポートしています。値 {0} は使用できません。 + + + + In queries, use the form 'for x in n .. m do ...' for ranging over integers + クエリで整数の範囲を扱う場合は、'for x in n .. m do ...' という形式を使用してください + + + + 'while' expressions may not be used in queries + 'while' 式は、クエリ内で使用できません + + + + 'try/finally' expressions may not be used in queries + 'try/finally' 式は、クエリ内で使用できません + + + + 'use' expressions may not be used in queries + 'use' 式はクエリ内で使用できません + + + + 'let!', 'use!' and 'do!' expressions may not be used in queries + クエリで 'let!'、'use!'、および 'do!' 式を使用することはできません + + + + 'return' and 'return!' may not be used in queries + 'return' および 'return!' は、クエリ内で使用できません + + + + This is not a known query operator. Query operators are identifiers such as 'select', 'where', 'sortBy', 'thenBy', 'groupBy', 'groupValBy', 'join', 'groupJoin', 'sumBy' and 'averageBy', defined using corresponding methods on the 'QueryBuilder' type. + これは既知のクエリ演算子ではありません。クエリ演算子は、'select'、'where'、'sortBy'、'thenBy'、'groupBy'、'groupValBy'、'join'、'groupJoin'、'sumBy'、および 'averageBy' などの識別子であり、'QueryBuilder' 型で対応するメソッドを使用して定義されます。 + + + + 'try/with' expressions may not be used in queries + 'try/with' 式はクエリ内で使用できません + + + + This 'let' definition may not be used in a query. Only simple value definitions may be used in queries. + この 'let' 定義は、クエリ内では使用できません。クエリで使用できるのは単純な値の定義のみです。 + + + + Too many static parameters. Expected at most {0} parameters, but got {1} unnamed and {2} named parameters. + 静的パラメーターが多すぎます。静的パラメーターの最大数は {0} 個ですが、名前のないパラメーターが {1} 個、名前付きパラメーターが {2} 個あります。 + + + + Invalid provided literal value '{0}' + 指定されたリテラル値 '{0}' が無効です + + + + The 'anycpu32bitpreferred' platform can only be used with EXE targets. You must use 'anycpu' instead. + 'anycpu32bitpreferred' プラットフォームは、EXE ターゲットでのみ使用できます。代わりに、'anycpu' を使用してください。 + + + + This member, function or value declaration may not be declared 'inline' + このメンバー、関数、または値の宣言を 'inline' で宣言することはできません + + + + The provider '{0}' returned a non-generated type '{1}' in the context of a set of generated types. Consider adjusting the type provider to only return generated types. + プロバイダー '{0}' は、一連の生成された型のコンテキスト内で、生成されていない型 '{1}' を返しました。型プロバイダーが生成された型のみを返すように調整することを検討してください。 + + + + Arguments to query operators may require parentheses, e.g. 'where (x > y)' or 'groupBy (x.Length / 10)' + クエリ演算子に対する引数には、たとえば 'where (x > y)' や 'groupBy (x.Length / 10)' のように、かっこが必要です + + + + A quotation may not involve an assignment to or taking the address of a captured local variable + キャプチャされたローカル変数のアドレスの割り当てまたは取得は引用符で囲まれない場合があります + + + + + 1 overload + + 1 オーバーロード + + + + + {0} overloads + + {0} オーバーロード + + + + Erased to + 消去先 + + + + Unexpected token '{0}' or incomplete expression + 予期しないトークン '{0}' または不完全な式です + + + + Cannot find code target for this attribute, possibly because the code after the attribute is incomplete. + この属性を対象にしたコードが見つかりません。属性の後のコードが完全ではない可能性があります。 + + + + Type name cannot be empty. + 型名を入力してください。 + + + + Problem reading assembly '{0}': {1} + アセンブリ '{0}' を読み取る際に問題が発生しました: {1} + + + + Invalid provided field. Provided fields of erased provided types must be literals. + 指定されたフィールドが無効です。指定された型が消去されている場合、指定されたフィールドはリテラルである必要があります。 + + + + (loading description...) + (説明を読み込んでいます...) + + + + (description unavailable...) + (説明はありません...) + + + + A type variable has been constrained by multiple different class types. A type variable may only have one class constraint. + 型変数が複数の異なるクラス型によって制約されています。型変数が持つことのできるクラス制約は 1 つだけです。 + + + + 'match' expressions may not be used in queries + 'match' 式はクエリ内で使用できません + + + + Infix operator member '{0}' has {1} initial argument(s). Expected a tuple of 3 arguments + 挿入演算子メンバー '{0}' に {1} 個の初期引数があります。3 つの引数を持つタプルを指定してください + + + + The operator '{0}' cannot be resolved. Consider opening the module 'Microsoft.FSharp.Linq.NullableOperators'. + 演算子 '{0}' を解決できません。'Microsoft.FSharp.Linq.NullableOperators' モジュールを開いてください。 + + + + '{0}' must be followed by 'in'. Usage: {1}. + '{0}' の後には 'in' が必要です。使い方: {1}。 + + + + Neither 'member val' nor 'override val' definitions are permitted in object expressions. + オブジェクト式では 'member val' 定義も 'override val' 定義も使用できません。 + + + + Copy-and-update record expressions must include at least one field. + copy-and-update レコード式には 1 つ以上のフィールドを含める必要があります。 + + + + '_' cannot be used as field name + '_' はフィールド名に使用できません + + + + The provided types generated by this use of a type provider may not be used from other F# assemblies and should be marked internal or private. Consider using 'type internal TypeName = ...' or 'type private TypeName = ...'. + ここで型プロバイダーを使用して生成した指定された型は、他の F# アセンブリからは使用できないため、内部またはプライベートとしてマークする必要があります。'type internal TypeName = ...' または 'type private TypeName = ...' を使用することを検討してください。 + + + + A property's getter and setter must have the same type. Property '{0}' has getter of type '{1}' but setter of type '{2}'. + プロパティのゲッターとセッターは同じ型でなければなりません。プロパティ '{0}' は、ゲッターの型が '{1}' でセッターの型が '{2}' です。 + + + + Array method '{0}' is supplied by the runtime and cannot be directly used in code. For operations with array elements consider using family of GetArray/SetArray functions from LanguagePrimitives.IntrinsicFunctions module. + 配列メソッド '{0}' はランタイムによって提供されるため、コードで直接使用することはできません。配列要素を操作する場合は、LanguagePrimitives.IntrinsicFunctions モジュールにある GetArray/SetArray 関数のファミリを使用することを検討してください。 + + + + The union case '{0}' does not have a field named '{1}'. + 共用体ケース/例外 '{0}' には、'{1}' という名前のフィールドがありません。 + + + + Union case/exception field '{0}' cannot be used more than once. + 共用体ケース/例外フィールド '{0}' を 2 回以上使用することはできません。 + + + + Named field '{0}' is used more than once. + 名前付きフィールド '{0}' が複数回使用されています。 + + + + Named field '{0}' conflicts with autogenerated name for anonymous field. + 名前付きフィールド '{0}' が、匿名フィールドのために自動生成された名前と競合しています。 + + + + This literal expression or attribute argument results in an arithmetic overflow. + この定数式または属性引数の演算結果は、オーバーフローになります。 + + + + This is not valid literal expression. The [<Literal>] attribute will be ignored. + これは有効な定数式ではありません。[<Literal>] 属性は無視されます。 + + + + System.Runtime.InteropServices assembly is required to use UnknownWrapper\DispatchWrapper classes. + UnknownWrapper\DispatchWrapper クラスを使用するには、System.Runtime.InteropServices アセンブリが必要です。 + + + + The mutable local '{0}' is implicitly allocated as a reference cell because it has been captured by a closure. This warning is for informational purposes only to indicate where implicit allocations are performed. + 変更可能なローカル '{0}' がクロージャでキャプチャされているため、参照セルとして暗黙的に割り当てられています。この警告は、情報提供のみの目的で、暗黙的な割り当てを実行する場所を示しています。 + + + + A type provider implemented GetStaticParametersForMethod, but ApplyStaticArgumentsForMethod was not implemented or invalid + 型プロバイダーが GetStaticParametersForMethod を実装しましたが、ApplyStaticArgumentsForMethod は実装されなかったか、無効でした + + + + An error occured applying the static arguments to a provided method + 静的な引数を指定されたメソッドに適用する際エラーが発生しました + + + + Unexpected character '{0}' in preprocessor expression + プリプロセッサの式に予期しない文字 '{0}' があります + + + + Unexpected token '{0}' in preprocessor expression + プリプロセッサの式に予期しないトークン '{0}' があります + + + + Incomplete preprocessor expression + 不完全なプリプロセッサの式です + + + + Missing token '{0}' in preprocessor expression + プリプロセッサの式にトークン '{0}' がありません + + + + An error occurred while reading the F# metadata node at position {0} in table '{1}' of assembly '{2}'. The node had no matching declaration. Please report this warning. You may need to recompile the F# assembly you are using. + F# メタデータ ノードをアセンブリ '{2}' のテーブル '{1}' の位置 {0} で読み取るときにエラーが発生しました。このノードには、一致する宣言がありませんでした。この警告を報告してください。使用している F# アセンブリの再コンパイルが必要になる場合があります。 + + + + Type inference caused the type variable {0} to escape its scope. Consider adding an explicit type parameter declaration or adjusting your code to be less generic. + 型推論により型変数 {0} はスコープを回避しました。明示的な型パラメーター宣言を追加するか、コードの総称性が低くなるよう調整してください。 + + + + Type inference caused an inference type variable to escape its scope. Consider adding type annotations to make your code less generic. + 型推論により型変数はスコープを回避しました。型の注釈を追加して総称性が低くなるようにしてください。 + + + + Redundant arguments are being ignored in function '{0}'. Expected {1} but got {2} arguments. + 冗長な引数は、関数 '{0}' で無視されます。{1} 個の引数が必要ですが、{2} 個の引数があります。 + + + + Lowercase literal '{0}' is being shadowed by a new pattern with the same name. Only uppercase and module-prefixed literals can be used as named patterns. + 小文字のリテラル '{0}' は、同じ名前の新しいパターンによりシャドウされています。大文字かモジュール プレフィックスのリテラルのみ名前付きパターンとして使用できます。 + + + + This literal pattern does not take arguments + このリテラル パターンは引数を使用しません + + + + Constructors are not permitted as extension members - they must be defined as part of the original definition of the type + コンストラクターは拡張メンバーとして許可されていません - その型の元の定義の一部として定義する必要があります + + + + Invalid response file '{0}' ( '{1}' ) + 正しくない応答ファイル '{0}' ( '{1}' ) + + + + Response file '{0}' not found in '{1}' + 応答ファイル '{0}' が '{1}' にありません + + + + Response file name '{0}' is empty, contains invalid characters, has a drive specification without an absolute path, or is too long + 応答ファイル名 '{0}' は、空であるか、正しくない文字が含まれているか、ドライブ指定があるが絶対パスがないか、あるいは長すぎます + + + + Cannot find FSharp.Core.dll in compiler's directory + コンパイラのディレクトリ内に FSharp.Core.dll が見つかりませんでした + + + + One tuple type is a struct tuple, the other is a reference tuple + 片方のタプル型は構造体タプルで、もう一方は参照タプルです + + + + This provided method requires static parameters + 指定されたこのメソッドには静的パラメーターが必要です + + + + The conversion from {0} to {1} is a compile-time safe upcast, not a downcast. Consider using 'upcast' instead of 'downcast'. + {0} から {1} への変換は、コンパイル時のダウンキャストではなく、セーフ アップキャストです。'downcast' の代わりに 'upcast' を使うことを検討してください。 + + + + The conversion from {0} to {1} is a compile-time safe upcast, not a downcast. Consider using the :> (upcast) operator instead of the :?> (downcast) operator. + {0} から {1} への変換は、コンパイル時のダウンキャストではなく、セーフ アップキャストです。:?> (ダウンキャスト) 演算子の代わりに :> (アップキャスト) 演算子を使うことを検討してください。 + + + + The 'rec' on this module is implied by an outer 'rec' declaration and is being ignored + このモジュールの 'rec' は外側の 'rec' 宣言で暗黙的に示されており、無視されます + + + + In a recursive declaration group, 'open' declarations must come first in each module + 再帰的な宣言グループでは、'open' 宣言は各モジュールの先頭になければなりません + + + + In a recursive declaration group, module abbreviations must come after all 'open' declarations and before other declarations + 再帰的な宣言グループでは、モジュールの省略形は、すべての 'open' 宣言の後、その他の宣言の前になければなりません + + + + This declaration is not supported in recursive declaration groups + この宣言は、再帰的な宣言グループではサポートされていません + + + + Invalid use of 'rec' keyword + 'rec' キーワードの使用法が無効です + + + + If a union type has more than one case and is a struct, then all fields within the union type must be given unique names. + 共用体型が複数のケースを持つ 1 つの構造体である場合は、共用体型内のすべてのフィールドに一意の名前を付ける必要があります。 + + + + The CallerMemberNameAttribute applied to parameter '{0}' will have no effect. It is overridden by the CallerFilePathAttribute. + パラメーター '{0}' に適用される CallerMemberNameAttribute は無効になります。CallerFilePathAttribute に上書きされます。 + + + + Invalid use of 'fixed'. 'fixed' may only be used in a declaration of the form 'use x = fixed expr' where the expression is an array, the address of a field, the address of an array element or a string' + 'fixed' の使い方が正しくありません。'fixed' を使用できるのは書式 'use x = fixed expr' の宣言内だけで、この式は配列、フィールドのアドレス、配列要素のアドレス、または文字列です + + + + Could not find method System.Runtime.CompilerServices.OffsetToStringData in references when building 'fixed' expression. + 'fixed' 式のビルド時に、参照内でメソッド System.Runtime.CompilerServices.OffsetToStringData が見つかりませんでした。 + + + + {0} is an active pattern and cannot be treated as a discriminated union case with named fields. + {0} はアクティブ パターンで、名前付きフィールドのある判別された共用体ケースとしては扱えません。 + + + + The default value does not have the same type as the argument. The DefaultParameterValue attribute and any Optional attribute will be ignored. Note: 'null' needs to be annotated with the correct type, e.g. 'DefaultParameterValue(null:obj)'. + 既定値が引数と同じ型ではありません。DefaultParameterValue 属性とすべての Optional 属性は無視されます。注: 'null' には適切な型の注釈を付ける必要があります。例: 'DefaultParameterValue(null:obj)'。 + + + + The system type '{0}' was required but no referenced system DLL contained this type + システム型 '{0}' が必要でしたが、この型を含む参照されたシステム DLL はありません + + + + The member '{0}' matches multiple overloads of the same method.\nPlease restrict it to one of the following:{1}. + メンバー '{0}' は同じメソッドの複数のオーバーロードと一致しています。\n次のいずれかに制限してください: {1}。 + + + + Method or object constructor '{0}' is not static + メソッドまたはオブジェクト コンストラクター '{0}' が静的ではありません + + + + Unexpected symbol '=' in expression. Did you intend to use 'for x in y .. z do' instead? + 式の予期しない記号 '='。代わりに 'for x in y .. z do' を使用するつもりでしたか? + + + + Indicates a method that either has no implementation in the type in which it is declared or that is virtual and has a default implementation. + 宣言された型に実装がないメソッド、または既定の実装がある仮想のメソッドを示します。 + + + + Used in mutually recursive bindings, in property declarations, and with multiple constraints on generic parameters. + 相互に再帰的なバインディング、プロパティの宣言、およびジェネリック パラメーターの複数の制約に使用します。 + + + + Used to give the current class object an object name. Also used to give a name to a whole pattern within a pattern match. + 現在のクラス オブジェクトにオブジェクト名を指定するために使用します。パターン マッチ内のパターン全体に名前を指定するためにも使用します。 + + + + Used to verify code during debugging. + デバッグ中のコードの検証に使用します。 + + + + Used as the name of the base class object. + 基底クラス オブジェクトの名前として使用します。 + + + + In verbose syntax, indicates the start of a code block. + 冗語構文で、コード ブロックの先頭を示します。 + + + + In verbose syntax, indicates the start of a class definition. + 冗語構文で、クラス定義の始まりを示します。 + + + + Indicates an implementation of an abstract method; used together with an abstract method declaration to create a virtual method. + 抽象メソッドの実装を示します。抽象メソッドの宣言と同時に使用して仮想メソッドを作成します。 + + + + Used to declare a delegate. + デリゲートの宣言に使用します。 + + + + Used in looping constructs or to execute imperative code. + ループ コンストラクト、または命令型コードの実行に使用します。 + + + + In verbose syntax, indicates the end of a block of code in a looping expression. + 冗語構文で、ループ式のコード ブロックの末尾を示します。 + + + + Used to convert to a type that is lower in the inheritance chain. + 継承チェーン内の下位の型に変換するために使用します。 + + + + In a for expression, used when counting in reverse. + for 式で、逆方向にカウントするときに使用します。 + + + + Used in conditional branching. A short form of else if. + 条件分岐で使用します。else if の短い形式です。 + + + + Used in conditional branching. + 条件分岐で使用します。 + + + + In type definitions and type extensions, indicates the end of a section of member definitions. In verbose syntax, used to specify the end of a code block that starts with the begin keyword. + 型定義や型拡張で、メンバー定義セクションの末尾を示します。冗語構文では、begin キーワードで始まるコード ブロックの末尾を示すために使用します。 + + + + Used to declare an exception type. + 例外の種類の宣言に使用します。 + + + + Indicates that a declared program element is defined in another binary or assembly. + 宣言されたプログラム要素が別のバイナリまたはアセンブリで定義されていることを示します。 + + + + Used as a Boolean literal. + ブール型のリテラルとして使用します。 + + + + Used together with try to introduce a block of code that executes regardless of whether an exception occurs. + 例外が発生するかどうかに関係なく実行されるコード ブロックを開始するために、try と一緒に使用します。 + + + + Used in looping constructs. + ループ コンストラクトで使用します。 + + + + Used in lambda expressions, also known as anonymous functions. + ラムダ式で使用し、匿名関数とも呼ばれます。 + + + + Used as a shorter alternative to the fun keyword and a match expression in a lambda expression that has pattern matching on a single argument. + 単一の引数でパターン マッチングを持つラムダ式で fun キーワードと match 式の代わりに省略形として使用します。 + + + + Used to reference the top-level .NET namespace. + 最上位の .NET 名前空間を参照するために使用します。 + + + + Used in conditional branching constructs. + 条件分岐のコンストラクトで使用します。 + + + + Used for sequence expressions and, in verbose syntax, to separate expressions from bindings. + 冗語構文で、式のバインディングを分離するためにシーケンス式に使用します。 + + + + Used to specify a base class or base interface. + 基底クラスまたは基底インターフェイスを指定するために使用します。 + + + + Used to indicate a function that should be integrated directly into the caller's code. + 呼び出し元のコードに直接統合する必要のある関数を示すために使用します。 + + + + Used to declare and implement interfaces. + インターフェイスの宣言と実装に使用します。 + + + + Used to specify that a member is visible inside an assembly but not outside it. + アセンブリの外部では表示されず、内部でのみ表示されるメンバーを指定するために使用します。 + + + + Used to specify a computation that is to be performed only when a result is needed. + 結果が必要な場合にのみ実行するコンピュテーションを指定するために使用します。 + + + + Used to associate, or bind, a name to a value or function. + 値または関数への名前の関連付けまたはバインドに使用します。 + + + + Used in computation expressions to bind a name to the result of another computation expression. + 非同期コンピュテーションの結果に名前をバインドする非同期ワークフローで使用します。また別のコンピュテーション式では、そのコンピュテーション型を示す名前を結果にバインドします。 + + + + Used to branch by comparing a value to a pattern. + 値をパターンと比較して分岐するために使用します。 + + + + Used to declare a property or method in an object type. + オブジェクトの種類のプロパティまたはメソッドの宣言に使用します。 + + + + Used to associate a name with a group of related types, values, and functions, to logically separate it from other code. + 関連する型、値、関数のグループに名前を関連付け、その他のコードと論理的に分離するために使用します。 + + + + Used to declare a variable, that is, a value that can be changed. + 変更可能な値である変数の宣言に使用します。 + + + + Used to associate a name with a group of related types and modules, to logically separate it from other code. + 関連する型とモジュールのグループに名前を関連付け、その他のコードと論理的に分離するために使用します。 + + + + Used to declare, define, or invoke a constructor that creates or that can create an object. Also used in generic parameter constraints to indicate that a type must have a certain constructor. + オブジェクトを作成または作成可能なコンストラクターの宣言、定義、起動に使用します。ジェネリック パラメーターの制約でも、型が特定のコンストラクターを持つ必要があることを示すために使用します。 + + + + Not actually a keyword. However, not struct in combination is used as a generic parameter constraint. + 実際にはキーワードではありませんが、not struct という組み合わせでジェネリック パラメーターの制約として使用します。 + + + + Indicates the absence of an object. Also used in generic parameter constraints. + オブジェクトがないことを示します。ジェネリック パラメーターの制約にも使用します。 + + + + Used in discriminated unions to indicate the type of categories of values, and in delegate and exception declarations. + 判別共同体で値のカテゴリの種類を示し、デリゲート宣言と例外宣言でも使用します。 + + + + Used to make the contents of a namespace or module available without qualification. + 修飾子を使用せずに名前空間またはモジュールのコンテンツを利用可能にするために使用します。 + + + + Used with Boolean conditions as a Boolean or operator. Equivalent to ||. Also used in member constraints. + ブール値の or 演算子としてブール条件で使用します。|| に相当します。メンバー制約でも使用します。 + + + + Used to implement a version of an abstract or virtual method that differs from the base version. + 基本バージョンと異なる抽象メソッドまたは仮想メソッドのバージョンの実装に使用します。 + + + + Restricts access to a member to code in the same type or module. + メンバーに対して、同じ型やモジュールのコードへのアクセスを制限します。 + + + + Allows access to a member from outside the type. + 型の外部からのメンバーに対して、アクセスを許可します。 + + + + Used to indicate that a function is recursive. + 関数が再帰的であることを示すために使用します。 + + + + Used to provide a value for the result of the containing computation expression. + コンピュテーション式の結果として提供される値を示すために使用します。 + + + + Used to provide a value for the result of the containing computation expression, where that value itself comes from the result another computation expression. + コンピュテーション式を示し、評価されたときはそのコンピュテーション式の結果を示すために使用します。 + + + + Used in query expressions to specify what fields or columns to extract. Note that this is a contextual keyword, which means that it is not actually a reserved word and it only acts like a keyword in appropriate context. + クエリ式でどのフィールドまたは列を抽出するかを指定するために使用します。これはコンテキスト キーワードであり、実際には予約語ではなく、適切なコンテキストでキーワードとしてのみ動作します。 + + + + Used to indicate a method or property that can be called without an instance of a type, or a value member that is shared among all instances of a type. + 型のインスタンスなしで呼び出すことのできるメソッドまたはプロパティ、または型のすべてのインスタンスで共有される値メンバーを示すために使用します。 + + + + Used to declare a structure type. Also used in generic parameter constraints. Used for OCaml compatibility in module definitions. + 構造体型の宣言に使用します。ジェネリック パラメーターの制約にも使用します。モジュール定義の OCaml の互換性を保つために使用します。 + + + + Used in conditional expressions. Also used to perform side effects after object construction. + 条件分岐で使用します。オブジェクトの構築後の副作用の実行にも使用します。 + + + + Used in for loops to indicate a range. + for ループで範囲を示します。 + + + + Used to introduce a block of code that might generate an exception. Used together with with or finally. + 例外を生成する可能性があるコード ブロックを開始するために使用します。with または finally と一緒に使用します。 + + + + Used to declare a class, record, structure, discriminated union, enumeration type, unit of measure, or type abbreviation. + クラス、レコード、構造体、判別された共同体、列挙型、数量単位、型の省略形の宣言に使用します。 + + + + Used to convert to a type that is higher in the inheritance chain. + 継承チェーン内の上位の型に変換するために使用します。 + + + + Used instead of let for values that implement IDisposable" + Dispose を呼び出してリソースを解放する必要のある値に対して、let の代わりに使用します。 + + + + Used instead of let! in computation expressions for computation expression results that implement IDisposable. + 非同期ワークフロー、および Dispose を呼び出してリソースを解放する必要のある値のその他のコンピュテーション式で let! の代わりに使用します。 + + + + Used in a signature to indicate a value, or in a type to declare a member, in limited situations. + 限定された状態において、シグネチャで値を示したり、型でメンバーを宣言したりするために使用されます。 + + + + Indicates the .NET void type. Used when interoperating with other .NET languages. + .NET の void 型を示します。他の .NET 言語と相互運用するときに使用します。 + + + + Used for Boolean conditions (when guards) on pattern matches and to introduce a constraint clause for a generic type parameter. + パターン マッチでのブール条件 (when ガード) で、ジェネリック型パラメーターの制約句を開始するために使用します。 + + + + Introduces a looping construct. + ループ コンストラクトを導入します。 + + + + Used together with the match keyword in pattern matching expressions. Also used in object expressions, record copying expressions, and type extensions to introduce member definitions, and to introduce exception handlers. + パターン マッチング式で match キーワードを指定して使用します。メンバー定義と例外ハンドラーを導入するため、オブジェクト式、レコード コピー式、および型拡張でも使用します。 + + + + Used in a sequence expression to produce a value for a sequence. + シーケンス式でシーケンスの値を生成します。 + + + + Used in a computation expression to append the result of a given computation expression to a collection of results for the containing computation expression. + コンピュテーション式で、コンピュテーション式を含む結果のコレクションにそのコンピュテーション式の結果を追加します。 + + + + In function types, delimits arguments and return values. Yields an expression (in sequence expressions); equivalent to the yield keyword. Used in match expressions + 関数型で、引数と戻り値を区切ります。式 (シーケンス式) が得られ、yield キーワードに相当します。match 式に使用されます + + + + Assigns a value to a variable. + 変数に値を割り当てます。 + + + + Converts a type to type that is higher in the hierarchy. + 型を階層の上位にある型に変換します。 + + + + Converts a type to a type that is lower in the hierarchy. + 型を階層の下位にある型に変換します。 + + + + Delimits a typed code quotation. + 型指定されたコード引用符を区切ります。 + + + + Delimits a untyped code quotation. + 型指定のないコード引用符を区切ります。 + + + + {0} '{1}' not found in assembly '{2}'. A possible cause may be a version incompatibility. You may need to explicitly reference the correct version of this assembly to allow all referenced components to use the correct version. + {0} '{1}' がアセンブリ '{2}' に見つかりません。バージョンの互換性がないことが原因の可能性があります。すべての参照コンポーネントが正しいバージョンを使用できるように、このアセンブリの正しいバージョンを明示的に参照しなければならない可能性があります。 + + + + {0} '{1}' not found in type '{2}' from assembly '{3}'. A possible cause may be a version incompatibility. You may need to explicitly reference the correct version of this assembly to allow all referenced components to use the correct version. + {0} '{1}' がアセンブリ '{3}' の '{2}' 型に見つかりません。バージョンの互換性がないことが原因の可能性があります。すべての参照コンポーネントが正しいバージョンを使用できるように、このアセンブリの正しいバージョンを明示的に参照しなければならない可能性があります。 + + + + is + + + + + This value is not a function and cannot be applied. + この値は関数ではないため、適用できません。 + + + + This value is not a function and cannot be applied. Did you intend to access the indexer via {0}.[index] instead? + この値は関数ではないため、適用できません。そうではなく、{0}.[index] によってインデクサーにアクセスしようとしましたか? + + + + This expression is not a function and cannot be applied. Did you intend to access the indexer via expr.[index] instead? + この式は関数ではないため、適用できません。そうではなく、expr.[index] によってインデクサーにアクセスしようとしましたか? + + + + This value is not a function and cannot be applied. Did you forget to terminate a declaration? + この値は関数ではないため、適用できません。宣言を終結しましたか? + + + + The argument names in the signature '{0}' and implementation '{1}' do not match. The argument name from the signature file will be used. This may cause problems when debugging or profiling. + シグネチャ '{0}' と実装 '{1}' の引数の名前が一致しません。シグネチャ ファイルの引数の名前が使用されます。デバッグまたはプロファイルするときに問題が生じる原因となる可能性があります。 + + + + An error occurred while reading the F# metadata of assembly '{0}'. A reserved construct was utilized. You may need to upgrade your F# compiler or use an earlier version of the assembly that doesn't make use of a specific construct. + アセンブリ '{0}' の F# メタデータ の読み取り中にエラーが発生しました。予約済みのコンストラクトが使用されました。F# コンパイラをアップグレードするか、特定のコンストラクトを使用しない以前のバージョンのアセンブリを使用しなければならない場合があります。 + + + + This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. + このメソッドまたはプロパティは通常、F# コードから使用されません。代わりに、明示的なタプル パターンを分解に使用してください。 + + + + This expression returns a value of type '{0}' but is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to use the expression as a value in the sequence then use an explicit 'yield'. + この式は型 '{0}' の値を返しますが、暗黙的に破棄されます。'let' を使用して結果を名前にバインドすることを検討してください。例: 'let result = expression'。式をシーケンス内で値として使用する場合は、明示的に 'yield' を使用してください。 + + + + This expression returns a value of type '{0}' but is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to use the expression as a value in the sequence then use an explicit 'yield!'. + この式は型 '{0}' の値を返しますが、暗黙的に破棄されます。'let' を使用して結果を名前にバインドすることを検討してください。例: 'let result = expression'。式をシーケンス内で値として使用する場合は、明示的に 'yield!' を使用してください。 + + + + Used in computation expressions to pattern match directly over the result of another computation expression. + 別のコンピュテーション式の結果に対して直接パターン マッチを適用するコンピュテーション式の中で使用します。 + + + + The file '{0}' changed on disk unexpectedly, please reload. + ファイル '{0}' がディスク上で予期せず変更されました。再度読み込んでください。 + + + + The byref pointer is readonly, so this write is not permitted. + byref ポインターは読み取り専用であるため、この書き込みは許可されません。 + + + + A value must be mutable in order to mutate the contents or take the address of a value type, e.g. 'let mutable x = ...' + 値の型の内容を変更するか、値の型のアドレスを使用するために、値は変更可能にする必要があります (たとえば、'let mutable x = ...') + + + + A ReadOnly attribute has been applied to a struct type with a mutable field. + 読み取り専用の属性が、変更可能なフィールドを持つ構造体型に適用されました。 + + + + A byref pointer returned by a function or method is implicitly dereferenced as of F# 4.5. To acquire the return value as a pointer, use the address-of operator, e.g. '&f(x)' or '&obj.Method(arg1, arg2)'. + F# 4.5 の時点で、関数またはメソッドから返される byref ポインターは、暗黙的に逆参照されます。戻り値をポインターとして取得するには、演算子のアドレスを使用してください。例: '&f(x)' または '&obj.Method(arg1, arg2)'。 + + + + A type annotated with IsByRefLike must also be a struct. Consider adding the [<Struct>] attribute to the type. + IsByRefLike で注釈を付けられた型は、構造体でもある必要があります。型に [<Struct>] 属性を追加することを検討してください。 + + + + The address of the variable '{0}' or a related expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + 現時点で、変数 '{0}' または関連する式のアドレスは使用できません。これは、ローカル値のアドレスがスコープを回避しないようにするためです。 + + + + This value can't be assigned because the target '{0}' may refer to non-stack-local memory, while the expression being assigned is assessed to potentially refer to stack-local memory. This is to help prevent pointers to stack-bound memory escaping their scope. + この値をターゲット '{0}' に割り当てることはできません。このターゲットは非スタック ローカルのメモリを参照できるのに対して、割り当てられる式はスタック ローカルのメモリに評価される可能性があるためです。これは、スタックにバインドされたメモリへのポインターが自身のスコープを回避することを防止するために役立ちます。 + + + + A value defined in a module must be mutable in order to take its address, e.g. 'let mutable x = ...' + モジュール内で定義する値のアドレスを取得するには、その値を変更可能にする必要があります。例: 'let mutable x = ...' + + + + A type annotated with IsReadOnly must also be a struct. Consider adding the [<Struct>] attribute to the type. + IsReadOnly で注釈を付けられた型は、構造体でもある必要があります。型に [<Struct>] 属性を追加することを検討してください。 + + + + Struct members cannot return the address of fields of the struct by reference + 構造体メンバーは、構造体のフィールドのアドレスを参照渡しで返すことはできません + + + + The function or method call cannot be used at this point, because one argument that is a byref of a non-stack-local Span or IsByRefLike type is used with another argument that is a stack-local Span or IsByRefLike type. This is to ensure the address of the local value does not escape its scope. + 現時点で、関数またはメソッドの呼び出しは使用できません。非スタック ローカルの Span または IsByRefLike 型の byref である 1 つの引数が、スタック ローカルの Span または IsByRefLike 型である別の引数と一緒に使用されています。これは、ローカル値のアドレスがスコープを回避しないようにするためです。 + + + + The address of a value returned from the expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + 現時点で、式から返される値のアドレスは使用できません。これは、ローカル値のアドレスがスコープを回避しないようにするためです。 + + + + The Span or IsByRefLike variable '{0}' cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + 現時点で、Span または IsByRefLike 変数 '{0}' は使用できません。これは、ローカル値のアドレスがスコープを回避しないようにするためです。 + + + + A Span or IsByRefLike value returned from the expression cannot be used at ths point. This is to ensure the address of the local value does not escape its scope. + 現時点で、式から返される Span または IsByRefLike 値は使用できません。これは、ローカル値のアドレスがスコープを回避しないようにするためです。 + + + + Cannot take the address of the value returned from the expression. Assign the returned value to a let-bound value before taking the address. + 式から返された値のアドレスを取得できません。アドレスを取得する前に、let でバインドされた値に戻り値を割り当ててください。 + + + + The Span or IsByRefLike expression cannot be returned from this function or method, because it is composed using elements that may escape their scope. + The Span or IsByRefLike expression cannot be returned from this function or method, because it is composed using elements that may escape their scope. + + + + This type does not inherit Attribute, it will not work correctly with other .NET languages. + This type does not inherit Attribute, it will not work correctly with other .NET languages. + + + + The exception '{0}' does not have a field named '{1}'. + The exception '{0}' does not have a field named '{1}'. + + + + The constructor does not have a field named '{0}'. + The constructor does not have a field named '{0}'. + + + + Active patterns do not have fields. This syntax is invalid. + Active patterns do not have fields. This syntax is invalid. + + + + + \ No newline at end of file diff --git a/src/fsharp/xlf/FSComp.txt.ko.xlf b/src/fsharp/xlf/FSComp.txt.ko.xlf new file mode 100644 index 00000000000..3dd8fa16415 --- /dev/null +++ b/src/fsharp/xlf/FSComp.txt.ko.xlf @@ -0,0 +1,7087 @@ + + + + + + The namespace '{0}' is not defined. + '{0}' 네임스페이스가 정의되지 않았습니다. + + + + The namespace or module '{0}' is not defined. + '{0}' 네임스페이스 또는 모듈이 정의되지 않았습니다. + + + + The field, constructor or member '{0}' is not defined. + '{0}' 필드, 생성자 또는 멤버가 정의되지 않았습니다. + + + + The value, constructor, namespace or type '{0}' is not defined. + '{0}' 값, 생성자, 네임스페이스 또는 형식이 정의되지 않았습니다. + + + + The value or constructor '{0}' is not defined. + '{0}' 값 또는 생성자가 정의되지 않았습니다. + + + + The value, namespace, type or module '{0}' is not defined. + '{0}' 값, 네임스페이스, 형식 또는 모듈이 정의되지 않았습니다. + + + + The constructor, module or namespace '{0}' is not defined. + '{0}' 생성자, 모듈 또는 네임스페이스가 정의되지 않았습니다. + + + + The type '{0}' is not defined. + '{0}' 형식이 정의되지 않았습니다. + + + + The type '{0}' is not defined in '{1}'. + {0}' 형식이 '{1}'에 정의되어 있지 않습니다. + + + + The record label or namespace '{0}' is not defined. + 레코드 레이블 또는 네임스페이스 '{0}'이(가) 정의되지 않았습니다. + + + + The record label '{0}' is not defined. + 레코드 레이블 '{0}'이(가) 정의되지 않았습니다. + + + + Maybe you want one of the following: + 다음 중 하나가 필요할 수 있습니다. + + + + The type parameter {0} is not defined. + 형식 매개 변수 '{0}'이(가) 정의되지 않았습니다. + + + + The pattern discriminator '{0}' is not defined. + 패턴 판별자 '{0}'이(가) 정의되지 않았습니다. + + + + Replace with '{0}' + '{0}'(으)로 바꾸기 + + + + Add . for indexer access. + 인덱서 액세스의 경우 . 추가 + + + + All elements of a list must be of the same type as the first element, which here is '{0}'. This element has type '{1}'. + 목록 생성자의 모든 요소는 동일한 형식이어야 합니다. 이 식에는 '{0}' 형식이 필요하지만 여기에서는 '{1}' 형식이 지정되었습니다. + + + + All elements of an array must be of the same type as the first element, which here is '{0}'. This element has type '{1}'. + 배열 생성자의 모든 요소는 동일한 형식이어야 합니다. 이 식에는 '{0}' 형식이 필요하지만 여기에서는 '{1}' 형식이 지정되었습니다. + + + + This 'if' expression is missing an 'else' branch. Because 'if' is an expression, and not a statement, add an 'else' branch which also returns a value of type '{0}'. + 'if' 식에 'else' 분기가 누락되었습니다. 'then' 분기의 형식은 '{0}'입니다. 'if'는 문이 아니라 식이므로 동일한 형식의 값을 반환하는 'else' 분기를 추가하세요. + + + + The 'if' expression needs to have type '{0}' to satisfy context type requirements. It currently has type '{1}'. + if' 식은 컨텍스트 형식 요구 사항을 충족하기 위해 '{0}' 형식이 필요하지만 현재 형식은 '{1}'입니다. + + + + All branches of an 'if' expression must return values of the same type as the first branch, which here is '{0}'. This branch returns a value of type '{1}'. + if' 식의 모든 분기는 동일한 형식이어야 합니다. 이 식에는 '{0}' 형식이 필요하지만 여기에서는 '{1}' 형식이 지정되었습니다. + + + + All branches of a pattern match expression must return values of the same type as the first branch, which here is '{0}'. This branch returns a value of type '{1}'. + 패턴 일치 식의 모든 분기는 동일한 형식의 값을 반환해야 합니다. 첫 번째 분기는 '{0}' 형식의 값을 반환했지만 이 분기는 '{1}' 형식의 값을 반환했습니다. + + + + A pattern match guard must be of type 'bool', but this 'when' expression is of type '{0}'. + 패턴 일치 가드의 형식은 'bool'이어야 하지만 'when' 식의 형식은 '{0}'입니다. + + + + A ';' is used to separate field values in records. Consider replacing ',' with ';'. + ';'은 레코드에서 필드 값을 구분하는 데 사용됩니다. ','를 ';'으로 바꾸세요. + + + + The '!' operator is used to dereference a ref cell. Consider using 'not expr' here. + '!' 연산자는 참조 셀을 역참조하는 데 사용됩니다. 여기에 'not expr' 사용을 고려하세요. + + + + The non-generic type '{0}' does not expect any type arguments, but here is given {1} type argument(s) + 제네릭이 아닌 형식 '{0}'에는 형식 인수가 필요하지 않지만 여기에서는 {1}개의 형식 인수가 지정되었습니다. + + + + Consider using 'return!' instead of 'return'. + 'return'이 아니라 'return!'를 사용하세요. + + + + Consider using 'yield!' instead of 'yield'. + 'yield'가 아닌 'yield!'를 사용하세요. + + + + \nA tuple type is required for one or more arguments. Consider wrapping the given arguments in additional parentheses or review the definition of the interface. + \n하나 이상의 인수에 튜플 형식이 필요합니다. 지정된 인수를 추가 괄호로 래핑하거나 인터페이스의 정의를 검토하세요. + + + + Invalid warning number '{0}' + 경고 번호 '{0}'이(가) 잘못되었습니다. + + + + Invalid version string '{0}' + 버전 문자열 '{0}'이(가) 잘못되었습니다. + + + + Invalid version file '{0}' + 버전 파일 '{0}'이(가) 잘못되었습니다. + + + + Microsoft (R) F# Compiler version {0} + Microsoft (R) F# Compiler 버전 {0} + + + + F# Compiler for F# {0} + F# {0}에 대한 F# 컴파일러 + + + + Problem with filename '{0}': {1} + 파일 이름 '{0}'에 문제가 있습니다. {1} + + + + No inputs specified + 지정한 입력이 없습니다. + + + + The '--pdb' option requires the '--debug' option to be used + '--pdb' 옵션을 사용하려면 '--debug' 옵션을 사용해야 합니다. + + + + The search directory '{0}' is invalid + 검색 디렉터리 '{0}'이(가) 잘못되었습니다. + + + + The search directory '{0}' could not be found + 검색 디렉터리 '{0}'을(를) 찾을 수 없습니다. + + + + '{0}' is not a valid filename + '{0}'은(는) 올바른 파일 이름이 아닙니다. + + + + '{0}' is not a valid assembly name + '{0}'은(는) 올바른 어셈블리 이름이 아닙니다. + + + + Unrecognized privacy setting '{0}' for managed resource, valid options are 'public' and 'private' + 관리되는 리소스에 대해 인식할 수 없는 개인 정보 보호 설정 '{0}'입니다. 올바른 옵션은 'public' 및 'private'입니다. + + + + Multiple references to '{0}.dll' are not permitted + '{0}.dll'에 대한 다중 참조는 허용되지 않습니다. + + + + Could not read version from mscorlib.dll + mscorlib.dll에서 버전을 읽을 수 없습니다. + + + + Unable to read assembly '{0}' + '{0}' 어셈블리를 읽을 수 없습니다. + + + + Assembly resolution failure at or near this location + 이 위치 또는 이 위치 근처에서 어셈블리를 확인하지 못했습니다. + + + + The declarations in this file will be placed in an implicit module '{0}' based on the file name '{1}'. However this is not a valid F# identifier, so the contents will not be accessible from other files. Consider renaming the file or adding a 'module' or 'namespace' declaration at the top of the file. + 이 파일의 선언은 파일 이름 '{1}'을(를) 기반으로 암시적 모듈 '{0}'에 배치됩니다. 그러나 이는 올바른 F# 식별자가 아니므로 다른 파일에서 내용에 액세스할 수 없게 됩니다. 파일의 이름을 바꾸거나 파일의 맨 위에 'module' 또는 'namespace' 선언을 추가하세요. + + + + Files in libraries or multiple-file applications must begin with a namespace or module declaration, e.g. 'namespace SomeNamespace.SubNamespace' or 'module SomeNamespace.SomeModule'. Only the last source file of an application may omit such a declaration. + 라이브러리 또는 다중 파일 응용 프로그램의 파일은 네임스페이스 또는 모듈 선언으로 시작해야 합니다(예: 'namespace SomeNamespace.SubNamespace' 또는 'module SomeNamespace.SomeModule'). 응용 프로그램의 마지막 소스 파일만 선언이 없어도 됩니다. + + + + Files in libraries or multiple-file applications must begin with a namespace or module declaration. When using a module declaration at the start of a file the '=' sign is not allowed. If this is a top-level module, consider removing the = to resolve this error. + 라이브러리 또는 다중 파일 응용 프로그램의 파일은 네임스페이스 또는 모듈 선언으로 시작해야 합니다. 파일 시작에 모듈 선언을 사용하는 경우 '=' 기호를 사용할 수 없습니다. 최상위 모듈인 경우 =를 제거하여 이 오류를 해결하세요. + + + + This file contains multiple declarations of the form 'module SomeNamespace.SomeModule'. Only one declaration of this form is permitted in a file. Change your file to use an initial namespace declaration and/or use 'module ModuleName = ...' to define your modules. + 이 파일에는 'module SomeNamespace.SomeModule' 형식의 선언이 여러 개 포함되어 있습니다. 이러한 형식의 선언은 파일당 하나만 허용됩니다. 초기 네임스페이스 선언을 사용하도록 파일을 변경하거나 'module ModuleName = ...'을 사용하여 모듈을 정의하세요. + + + + Option requires parameter: {0} + 옵션에 필요한 매개 변수: {0} + + + + Source file '{0}' could not be found + 소스 파일 '{0}'을(를) 찾을 수 없습니다. + + + + The file extension of '{0}' is not recognized. Source files must have extension .fs, .fsi, .fsx, .fsscript, .ml or .mli. + '{0}'의 파일 확장명을 인식할 수 없습니다. 소스 파일의 확장명은 .fs, .fsi, .fsx, .fsscript, .ml 또는 .mli여야 합니다. + + + + Could not resolve assembly '{0}' + '{0}' 어셈블리를 확인할 수 없습니다. + + + + Could not resolve assembly '{0}' required by '{1}' + {1}'에 필요한 '{0}' 어셈블리를 확인할 수 없습니다. + + + + Error opening binary file '{0}': {1} + 이진 파일 '{0}'을(를) 여는 동안 오류가 발생했습니다. {1} + + + + The F#-compiled DLL '{0}' needs to be recompiled to be used with this version of F# + F# 컴파일 DLL '{0}'을(를) 이 버전의 F#에 사용하려면 다시 컴파일해야 합니다. + + + + Invalid directive. Expected '#I \"<path>\"'. + 지시문이 잘못되었습니다. '#I \"<path>\"'가 필요합니다. + + + + Invalid directive. Expected '#r \"<file-or-assembly>\"'. + 지시문이 잘못되었습니다. '#r \"<file-or-assembly>\"'가 필요합니다. + + + + Invalid directive. Expected '#load \"<file>\" ... \"<file>\"'. + 지시문이 잘못되었습니다. '#load \"<file>\" ... \"<file>\"'이 필요합니다. + + + + Invalid directive. Expected '#time', '#time \"on\"' or '#time \"off\"'. + 지시문이 잘못되었습니다. '#time', '#time \"on\"' 또는 '#time \"off\"'가 필요합니다. + + + + Directives inside modules are ignored + 모듈 내의 지시문은 무시됩니다. + + + + A signature for the file or module '{0}' has already been specified + '{0}' 파일 또는 모듈의 시그니처가 이미 지정되었습니다. + + + + An implementation of file or module '{0}' has already been given. Compilation order is significant in F# because of type inference. You may need to adjust the order of your files to place the signature file before the implementation. In Visual Studio files are type-checked in the order they appear in the project file, which can be edited manually or adjusted using the solution explorer. + '{0}' 파일 또는 모듈에 대한 구현이 이미 지정되었습니다. 형식 유추로 인해 F#에서는 컴파일 순서가 중요합니다. 구현하기 전에 시그니처 파일을 배치하기 위해 파일의 순서를 조정해야 할 수 있습니다. Visual Studio에서는 파일이 프로젝트 파일에 나타나는 순서대로 형식이 검사되며 이 순서는 수동으로 편집하거나 솔루션 탐색기를 사용하여 조정할 수 있습니다. + + + + An implementation of the file or module '{0}' has already been given + '{0}' 파일 또는 모듈에 대한 구현이 이미 지정되었습니다. + + + + The signature file '{0}' does not have a corresponding implementation file. If an implementation file exists then check the 'module' and 'namespace' declarations in the signature and implementation files match. + 시그니처 파일 '{0}'에 해당하는 구현 파일이 없습니다. 구현 파일이 있는 경우 시그니처 파일과 구현 파일의 'module' 및 'namespace' 선언이 일치하는지 확인하세요. + + + + '{0}' is not a valid integer argument + '{0}'은(는) 올바른 정수 인수가 아닙니다. + + + + '{0}' is not a valid floating point argument + '{0}'은(는) 올바른 부동 소수점 인수가 아닙니다. + + + + Unrecognized option: '{0}' + 인식할 수 없는 옵션: '{0}' + + + + Invalid module or namespace name + 모듈 또는 네임스페이스 이름이 잘못되었습니다. + + + + Error reading/writing metadata for the F# compiled DLL '{0}'. Was the DLL compiled with an earlier version of the F# compiler? (error: '{1}'). + F# 컴파일 DLL '{0}'에 대한 메타데이터를 읽는/쓰는 동안 오류가 발생했습니다. DLL이 이전 버전의 F# 컴파일러를 사용하여 컴파일되었습니까?(오류: '{1}') + + + + The type/module '{0}' is not a concrete module or type + '{0}' 형식/모듈이 구체적인 모듈 또는 형식이 아닙니다. + + + + The type '{0}' has an inline assembly code representation + '{0}' 형식에 인라인 어셈블리 코드 표현이 있습니다. + + + + A namespace and a module named '{0}' both occur in two parts of this assembly + 이 어셈블리의 두 부분에서 '{0}'(이)라는 네임스페이스와 모듈이 모두 발생합니다. + + + + Two modules named '{0}' occur in two parts of this assembly + 이 어셈블리의 두 부분에서 '{0}'(이)라는 두 개의 모듈이 발생합니다. + + + + Two type definitions named '{0}' occur in namespace '{1}' in two parts of this assembly + 이 어셈블리의 두 부분에서 네임스페이스 '{1}'에 '{0}'(이)라는 두 개의 형식 정의가 발생합니다. + + + + A module and a type definition named '{0}' occur in namespace '{1}' in two parts of this assembly + 이 어셈블리의 두 부분에서 네임스페이스 '{1}'에 '{0}'(이)라는 모듈 및 형식 정의가 발생합니다. + + + + Invalid member signature encountered because of an earlier error + 이전 오류로 인해 잘못된 멤버 시그니처가 발생했습니다. + + + + This value does not have a valid property setter type + 이 값에는 올바른 속성 setter 형식이 없습니다. + + + + Invalid form for a property getter. At least one '()' argument is required when using the explicit syntax. + 속성 getter의 형식이 잘못되었습니다. 명시적 구문을 사용할 때는 하나 이상의 '()' 인수가 필요합니다. + + + + Invalid form for a property setter. At least one argument is required. + 속성 setter의 형식이 잘못되었습니다. 하나 이상의 인수가 필요합니다. + + + + Unexpected use of a byref-typed variable + 예기치 않은 byref 형식 변수의 사용입니다. + + + + Invalid mutation of a constant expression. Consider copying the expression to a mutable local, e.g. 'let mutable x = ...'. + 상수 식을 잘못 변경했습니다. 식을 변경할 수 있는 로컬로 복사하십시오(예: 'let mutable x = ...'). + + + + The value has been copied to ensure the original is not mutated by this operation or because the copy is implicit when returning a struct from a member and another member is then accessed + 이 작업에 의해 원래 값이 변경되지 않도록 값이 복사되었습니다. + + + + Recursively defined values cannot appear directly as part of the construction of a tuple value within a recursive binding + 재귀적으로 정의된 값은 재귀적 바인딩 내에서 튜플 값의 구성 요소에 대한 일부로 직접 나타날 수 없습니다. + + + + Recursive values cannot appear directly as a construction of the type '{0}' within a recursive binding. This feature has been removed from the F# language. Consider using a record instead. + 재귀 값은 재귀적 바인딩 내에서 '{0}' 형식의 구성 요소로 직접 나타날 수 없습니다. 이 기능은 F# 언어에서 제거되었습니다. 대신 레코드를 사용하세요. + + + + Recursive values cannot be directly assigned to the non-mutable field '{0}' of the type '{1}' within a recursive binding. Consider using a mutable field instead. + 재귀 값은 재귀적 바인딩 내에서 '{1}' 형식의 변경할 수 없는 필드 '{0}'에 직접 할당할 수 없습니다. 대신 변경할 수 있는 필드를 사용하세요. + + + + Unexpected decode of AutoOpenAttribute + 예기치 않은 AutoOpenAttribute의 디코딩입니다. + + + + Unexpected decode of InternalsVisibleToAttribute + 예기치 않은 InternalsVisibleToAttribute의 디코딩입니다. + + + + Unexpected decode of InterfaceDataVersionAttribute + 예기치 않은 InterfaceDataVersionAttribute의 디코딩입니다. + + + + Active patterns cannot return more than 7 possibilities + 활성 패턴은 7개가 넘는 가능성을 반환할 수 없습니다. + + + + This is not a valid constant expression or custom attribute value + 올바른 상수 식 또는 사용자 지정 특성 값이 아닙니다. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe mutability attributes differ + {0}' 모듈에\n {1}이(가) 포함되어 있지만 \n해당 시그니처는\n {2}을(를) 지정합니다. \n변경 가능성 특성이 서로 다릅니다. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe names differ + {0}' 모듈에\n {1}이(가) 포함되어 있지만 \n해당 시그니처는\n {2}을(를) 지정합니다. \n이름이 서로 다릅니다. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe compiled names differ + {0}' 모듈에는 다음이 포함되어 있습니다.\n {1} \n하지만 해당 시그니처는 다음을 지정합니다.\n {2} \n컴파일된 이름이 다릅니다. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe display names differ + {0}' 모듈에는 다음이 포함되어 있습니다.\n {1} \n하지만 해당 시그니처는 다음을 지정합니다.\n {2} \n표시 이름이 다릅니다. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe accessibility specified in the signature is more than that specified in the implementation + {0}' 모듈에\n {1}이(가) 포함되어 있지만 \n해당 시그니처는\n {2}을(를) 지정합니다. \n시그니처에 지정된 액세스 가능성이 구현에 지정된 액세스 가능성보다 높습니다. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe inline flags differ + {0}' 모듈에\n {1}이(가) 포함되어 있지만 \n해당 시그니처는\n {2}을(를) 지정합니다. \n인라인 플래그가 서로 다릅니다. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe literal constant values and/or attributes differ + {0}' 모듈에\n {1}이(가) 포함되어 있지만 \n해당 시그니처는\n {2}을(를) 지정합니다. \n리터럴 상수 값 및/또는 특성이 서로 다릅니다. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is a type function and the other is not. The signature requires explicit type parameters if they are present in the implementation. + {0}' 모듈에\n {1}이(가) 포함되어 있지만 \n해당 시그니처는\n {2}을(를) 지정합니다. \n하나는 형식 함수이고 다른 하나는 그렇지 않습니다. 명시적 형식 매개 변수가 구현에 있는 경우 시그니처에도 해당 형식 매개 변수가 필요합니다. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe respective type parameter counts differ + {0}' 모듈에\n {1}이(가) 포함되어 있지만 \n해당 시그니처는\n {2}을(를) 지정합니다. \n각각의 형식 매개 변수 수가 서로 다릅니다. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe types differ + {0}' 모듈에\n {1}이(가) 포함되어 있지만 \n해당 시그니처는\n {2}을(를) 지정합니다. \n형식이 서로 다릅니다. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is an extension member and the other is not + {0}' 모듈에\n {1}이(가) 포함되어 있지만 \n해당 시그니처는\n {2}을(를) 지정합니다. \n하나는 확장 멤버이고 다른 하나는 그렇지 않습니다. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nAn arity was not inferred for this value + {0}' 모듈에\n {1}이(가) 포함되어 있지만 \n해당 시그니처는\n {2}을(를) 지정합니다. \n이 값에 대한 인자 수가 유추되지 않았습니다. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe number of generic parameters in the signature and implementation differ (the signature declares {3} but the implementation declares {4} + {0}' 모듈에\n {1}이(가) 포함되어 있지만 \n해당 시그니처는\n {2}을(를) 지정합니다. \n시그니처와 구현의 제네릭 매개 변수 수가 서로 다릅니다. 시그니처는 {3}개를 선언하지만 구현은 {4}개를 선언합니다. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe generic parameters in the signature and implementation have different kinds. Perhaps there is a missing [<Measure>] attribute. + '{0}' 모듈에\n {1}이(가) 포함되어 있지만 \n해당 시그니처는\n {2}을(를) 지정합니다. \n시그니처와 구현의 제네릭 매개 변수 종류가 서로 다릅니다. [<Measure>] 특성이 없는 것 같습니다. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe arities in the signature and implementation differ. The signature specifies that '{3}' is function definition or lambda expression accepting at least {4} argument(s), but the implementation is a computed function value. To declare that a computed function value is a permitted implementation simply parenthesize its type in the signature, e.g.\n\tval {5}: int -> (int -> int)\ninstead of\n\tval {6}: int -> int -> int. + {0}' 모듈에\n {1}이(가) 포함되어 있지만 \n해당 시그니처는\n {2}을(를) 지정합니다. \n시그니처와 구현의 인자 수가 서로 다릅니다. 시그니처는 '{3}'이(가) {4}개 이상의 인수를 적용하는 함수 정의 또는 람다 식임을 지정하지만 구현은 계산된 함수 값입니다. 계산된 함수 값이 허용되는 구현임을 선언하려면 시그니처에서 해당 형식을 괄호로 묶기만 하면 됩니다(예: \n\tval {6}: int -> int -> int\n대신\n\tval {5}: int -> (int -> int)). + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe CLI member names differ + {0}' 모듈에\n {1}이(가) 포함되어 있지만 \n해당 시그니처는\n {2}을(를) 지정합니다. \nCLI 멤버 이름이 서로 다릅니다. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is static and the other isn't + {0}' 모듈에\n {1}이(가) 포함되어 있지만 \n해당 시그니처는\n {2}을(를) 지정합니다. \n하나는 정적 요소이고 다른 하나는 그렇지 않습니다. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is virtual and the other isn't + {0}' 모듈에\n {1}이(가) 포함되어 있지만 \n해당 시그니처는\n {2}을(를) 지정합니다. \n하나는 가상 요소이고 다른 하나는 그렇지 않습니다. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is abstract and the other isn't + {0}' 모듈에\n {1}이(가) 포함되어 있지만 \n해당 시그니처는\n {2}을(를) 지정합니다. \n하나는 추상 요소이고 다른 하나는 그렇지 않습니다. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is final and the other isn't + {0}' 모듈에\n {1}이(가) 포함되어 있지만 \n해당 시그니처는\n {2}을(를) 지정합니다. \n하나는 최종 요소이고 다른 하나는 그렇지 않습니다. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is marked as an override and the other isn't + {0}' 모듈에\n {1}이(가) 포함되어 있지만 \n해당 시그니처는\n {2}을(를) 지정합니다. \n하나는 override로 표시되어 있고 다른 하나는 그렇지 않습니다. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is a constructor/property and the other is not + {0}' 모듈에\n {1}이(가) 포함되어 있지만 \n해당 시그니처는\n {2}을(를) 지정합니다. \n하나는 생성자/속성이고 다른 하나는 그렇지 않습니다. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe compiled representation of this method is as a static member but the signature indicates its compiled representation is as an instance member + {0}' 모듈에\n {1}이(가) 포함되어 있지만 \n해당 시그니처는\n {2}을(를) 지정합니다. \n이 메서드의 컴파일 표현이 정적 멤버이지만 시그니처는 해당 컴파일 표현이 인스턴스 멤버임을 나타냅니다. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe compiled representation of this method is as an instance member, but the signature indicates its compiled representation is as a static member + {0}' 모듈에\n {1}이(가) 포함되어 있지만 \n해당 시그니처는\n {2}을(를) 지정합니다. \n이 메서드의 컴파일 표현이 인스턴스 멤버이지만 시그니처는 해당 컴파일 표현이 정적 멤버임을 나타냅니다. + + + + The {0} definitions in the signature and implementation are not compatible because the names differ. The type is called '{1}' in the signature file but '{2}' in implementation. + 이름이 서로 다르므로 시그니처 및 구현의 {0} 정의가 호환되지 않습니다. 시그니처 파일의 형식은 '{1}'이지만 구현의 형식은 '{2}'입니다. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the respective type parameter counts differ + 각각의 형식 매개 변수 수가 서로 다르므로 시그니처 및 구현의 '{1}' 형식에 대한 {0} 정의가 호환되지 않습니다. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the accessibility specified in the signature is more than that specified in the implementation + 시그니처에 지정된 액세스 가능성이 구현에 지정된 액세스 가능성보다 높으므로 시그니처 및 구현의 '{1}' 형식에 대한 {0} 정의가 호환되지 않습니다. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature requires that the type supports the interface {2} but the interface has not been implemented + 시그니처를 사용하려면 형식이 {2} 인터페이스를 지원해야 하지만 이 인터페이스가 구현되지 않았으므로 시그니처 및 구현의 '{1}' 형식에 대한 {0} 정의가 호환되지 않습니다. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation says this type may use nulls as a representation but the signature does not + 구현이 이 형식에서 null을 표현으로 사용할 수 있다고 하지만 시그니처는 그렇지 않으므로 시그니처 및 구현의 '{1}' 형식에 대한 {0} 정의가 호환되지 않습니다. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation says this type may use nulls as an extra value but the signature does not + 구현이 이 형식에서 null을 추가 값으로 사용할 수 있다고 하지만 시그니처는 그렇지 않으므로 시그니처 및 구현의 '{1}' 형식에 대한 {0} 정의가 호환되지 않습니다. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature says this type may use nulls as a representation but the implementation does not + 시그니처가 이 형식에서 null을 표현으로 사용할 수 있다고 하지만 구현은 그렇지 않으므로 시그니처 및 구현의 '{1}' 형식에 대한 {0} 정의가 호환되지 않습니다. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature says this type may use nulls as an extra value but the implementation does not + 시그니처가 이 형식에서 null을 추가 값으로 사용할 수 있다고 하지만 구현은 그렇지 않으므로 시그니처 및 구현의 '{1}' 형식에 대한 {0} 정의가 호환되지 않습니다. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation type is sealed but the signature implies it is not. Consider adding the [<Sealed>] attribute to the signature. + 구현 형식이 봉인되어 있지만 시그니처는 봉인되어 있지 않음을 암시하므로 시그니처 및 구현의 '{1}' 형식에 대한 {0} 정의가 호환되지 않습니다. 시그니처에 [<Sealed>] 특성을 추가해 보세요. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation type is not sealed but signature implies it is. Consider adding the [<Sealed>] attribute to the implementation. + 구현 형식이 봉인되어 있지 않지만 시그니처는 봉인되어 있음을 암시하므로 시그니처 및 구현의 '{1}' 형식에 대한 {0} 정의가 호환되지 않습니다. 구현에 [<Sealed>] 특성을 추가해 보세요. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation is an abstract class but the signature is not. Consider adding the [<AbstractClass>] attribute to the signature. + 구현이 추상 클래스이지만 시그니처는 추상 클래스가 아니므로 시그니처 및 구현의 '{1}' 형식에 대한 {0} 정의가 호환되지 않습니다. 시그니처에 [<AbstractClass>] 특성을 추가해 보세요. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature is an abstract class but the implementation is not. Consider adding the [<AbstractClass>] attribute to the implementation. + 시그니처가 추상 클래스이지만 구현은 추상 클래스가 아니므로 시그니처 및 구현의 '{1}' 형식에 대한 {0} 정의가 호환되지 않습니다. 구현에 [<AbstractClass>] 특성을 추가해 보세요. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the types have different base types + 형식의 기본 형식이 서로 다르므로 시그니처 및 구현의 '{1}' 형식에 대한 {0} 정의가 호환되지 않습니다. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the number of {2}s differ + {2} 수가 서로 다르므로 시그니처 및 구현의 '{1}' 형식에 대한 {0} 정의가 호환되지 않습니다. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature defines the {2} '{3}' but the implementation does not (or does, but not in the same order) + 시그니처가 {2} '{3}'을(를) 정의하지만 구현은 그렇지 않거나 그렇더라도 순서가 다르므로 시그니처 및 구현의 '{1}' 형식에 대한 {0} 정의가 호환되지 않습니다. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation defines the {2} '{3}' but the signature does not (or does, but not in the same order) + 구현이 {2} '{3}'을(를) 정의하지만 시그니처는 그렇지 않거나 그렇더라도 순서가 다르므로 시그니처 및 구현의 '{1}' 형식에 대한 {0} 정의가 호환되지 않습니다. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation defines a struct but the signature defines a type with a hidden representation + 구현이 구조체를 정의하지만 시그니처는 숨겨진 표현이 있는 형식을 정의하므로 시그니처 및 구현의 '{1}' 형식에 대한 {0} 정의가 호환되지 않습니다. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because a CLI type representation is being hidden by a signature + 시그니처에 의해 CLI 형식 표현이 숨겨져 있으므로 시그니처 및 구현의 '{1}' 형식에 대한 {0} 정의가 호환되지 않습니다. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because a type representation is being hidden by a signature + 시그니처에 의해 형식 표현이 숨겨져 있으므로 시그니처 및 구현의 '{1}' 형식에 대한 {0} 정의가 호환되지 않습니다. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the types are of different kinds + 형식의 종류가 서로 다르므로 시그니처 및 구현의 '{1}' 형식에 대한 {0} 정의가 호환되지 않습니다. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the IL representations differ + IL 표현이 서로 다르므로 시그니처 및 구현의 '{1}' 형식에 대한 {0} 정의가 호환되지 않습니다. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the representations differ + 표현이 서로 다르므로 시그니처 및 구현의 '{1}' 형식에 대한 {0} 정의가 호환되지 않습니다. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the field {2} was present in the implementation but not in the signature + {2}' 필드가 구현에 있었지만 시그니처에는 없었으므로 시그니처 및 구현의 '{1}' 형식에 대한 {0} 정의가 호환되지 않습니다. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the order of the fields is different in the signature and implementation + 시그니처와 구현에서 필드의 순서가 서로 다르므로 시그니처 및 구현의 '{1}' 형식에 대한 {0} 정의가 호환되지 않습니다. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the field {2} was required by the signature but was not specified by the implementation + {2}' 필드가 시그니처에 필요했지만 구현에 의해 지정되지 않았으므로 시그니처 및 구현의 '{1}' 형식에 대한 {0} 정의가 호환되지 않습니다. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the field '{2}' was present in the implementation but not in the signature. Struct types must now reveal their fields in the signature for the type, though the fields may still be labelled 'private' or 'internal'. + {2}' 필드가 구현에 있었지만 시그니처에는 없었으므로 시그니처 및 구현의 '{1}' 형식에 대한 {0} 정의가 호환되지 않습니다. 이제 구조체 형식은 시그니처에서 형식에 대해 필드를 표시해야 하지만 필드의 레이블은 계속 'private' 또는 'internal'로 지정할 수 있습니다. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the abstract member '{2}' was required by the signature but was not specified by the implementation + 추상 멤버 '{2}'이(가) 시그니처에 필요했지만 구현에 의해 지정되지 않았으므로 시그니처 및 구현의 '{1}' 형식에 대한 {0} 정의가 호환되지 않습니다. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the abstract member '{2}' was present in the implementation but not in the signature + 추상 멤버 '{2}'이(가) 구현에 있었지만 시그니처에는 없었으므로 시그니처 및 구현의 '{1}' 형식에 대한 {0} 정의가 호환되지 않습니다. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature declares a {2} while the implementation declares a {3} + 시그니처가 {2}을(를) 선언하지만 구현은 {3}을(를) 선언하므로 시그니처 및 구현의 '{1}' 형식에 대한 {0} 정의가 호환되지 않습니다. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the abbreviations differ: {2} versus {3} + 약어가 {2}과(와) {3}(으)로 서로 다르므로 시그니처 및 구현의 '{1}' 형식에 대한 {0} 정의가 호환되지 않습니다. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because an abbreviation is being hidden by a signature. The abbreviation must be visible to other CLI languages. Consider making the abbreviation visible in the signature. + 시그니처에 의해 약어가 숨겨져 있으므로 시그니처 및 구현의 '{1}' 형식에 대한 {0} 정의가 호환되지 않습니다. 약어는 다른 CLI 언어에 표시되어야 합니다. 시그니처에서 약어를 표시하세요. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature has an abbreviation while the implementation does not + 시그니처에 약어가 있지만 구현에는 없으므로 시그니처 및 구현의 '{1}' 형식에 대한 {0} 정의가 호환되지 않습니다. + + + + The module contains the constructor\n {0} \nbut its signature specifies\n {1} \nThe names differ + 모듈에\n {0} 생성자가 포함되어 있지만 \n해당 시그니처는\n {1}을(를) 지정합니다. \n이름이 서로 다릅니다. + + + + The module contains the constructor\n {0} \nbut its signature specifies\n {1} \nThe respective number of data fields differ + 모듈에\n {0} 생성자가 포함되어 있지만 \n해당 시그니처는\n {1}을(를) 지정합니다. \n각각의 데이터 필드 수가 서로 다릅니다. + + + + The module contains the constructor\n {0} \nbut its signature specifies\n {1} \nThe types of the fields differ + 모듈에\n {0} 생성자가 포함되어 있지만 \n해당 시그니처는\n {1}을(를) 지정합니다. \n필드의 형식이 서로 다릅니다. + + + + The module contains the constructor\n {0} \nbut its signature specifies\n {1} \nthe accessibility specified in the signature is more than that specified in the implementation + 모듈에\n {0} 생성자가 포함되어 있지만 \n해당 시그니처는\n {1}을(를) 지정합니다. \n시그니처에 지정된 액세스 가능성이 구현에 지정된 액세스 가능성보다 높습니다. + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe names differ + 모듈에\n {0} 필드가 포함되어 있지만 \n해당 시그니처는\n {1}을(를) 지정합니다. \n이름이 서로 다릅니다. + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nthe accessibility specified in the signature is more than that specified in the implementation + 모듈에\n {0} 필드가 포함되어 있지만 \n해당 시그니처는\n {1}을(를) 지정합니다. \n시그니처에 지정된 액세스 가능성이 구현에 지정된 액세스 가능성보다 높습니다. + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe 'static' modifiers differ + 모듈에\n {0} 필드가 포함되어 있지만 \n해당 시그니처는\n {1}을(를) 지정합니다. \n'static' 한정자가 서로 다릅니다. + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe 'mutable' modifiers differ + 모듈에\n {0} 필드가 포함되어 있지만 \n해당 시그니처는\n {1}을(를) 지정합니다. \n'mutable' 한정자가 서로 다릅니다. + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe 'literal' modifiers differ + 모듈에\n {0} 필드가 포함되어 있지만 \n해당 시그니처는\n {1}을(를) 지정합니다. \n'literal' 한정자가 서로 다릅니다. + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe types differ + 모듈에\n {0} 필드가 포함되어 있지만 \n해당 시그니처는\n {1}을(를) 지정합니다. \n형식이 서로 다릅니다. + + + + The implicit instantiation of a generic construct at or near this point could not be resolved because it could resolve to multiple unrelated types, e.g. '{0}' and '{1}'. Consider using type annotations to resolve the ambiguity + 관련되지 않은 여러 형식(예: '{0}'과(와) '{1}')으로 확인될 수 있으므로 이 지점 또는 이 지점 근처에서 제네릭 구문의 암시적 인스턴스를 확인할 수 없습니다. 형식 주석을 사용하여 모호성을 해결하세요. + + + + Could not resolve the ambiguity inherent in the use of a 'printf'-style format string + 'printf' 스타일의 서식 문자열 사용과 관련하여 본질적으로 발생하는 모호성을 해결할 수 없습니다. + + + + Could not resolve the ambiguity in the use of a generic construct with an 'enum' constraint at or near this position + 이 위치 또는 이 위치 근처에서 'enum' 제약 조건을 사용하여 제네릭 구문 사용의 모호성을 해결할 수 없습니다. + + + + Could not resolve the ambiguity in the use of a generic construct with a 'delegate' constraint at or near this position + 이 위치 또는 이 위치 근처에서 'delegate' 제약 조건을 사용하여 제네릭 구문 사용의 모호성을 해결할 수 없습니다. + + + + Invalid value + 값이 잘못되었습니다. + + + + The signature and implementation are not compatible because the respective type parameter counts differ + 각각의 형식 매개 변수 수가 서로 다르므로 시그니처와 구현이 호환되지 않습니다. + + + + The signature and implementation are not compatible because the type parameter in the class/signature has a different compile-time requirement to the one in the member/implementation + 클래스/시그니처에 있는 형식 매개 변수의 컴파일 시간 요구 사항이 멤버/구현에 있는 형식 매개 변수와 다르므로 시그니처와 구현이 호환되지 않습니다. + + + + The signature and implementation are not compatible because the declaration of the type parameter '{0}' requires a constraint of the form {1} + 형식 매개 변수 '{0}'의 선언을 사용하려면 {1} 형식의 제약 조건이 필요하므로 시그니처와 구현이 호환되지 않습니다. + + + + The signature and implementation are not compatible because the type parameter '{0}' has a constraint of the form {1} but the implementation does not. Either remove this constraint from the signature or add it to the implementation. + 형식 매개 변수 '{0}'에 {1} 형식의 제약 조건이 있지만 구현에는 없으므로 시그니처와 구현이 호환되지 않습니다. 이 제약 조건을 시그니처에서 제거하거나 구현에 추가하세요. + + + + The type '{0}' implements 'System.IComparable'. Consider also adding an explicit override for 'Object.Equals' + '{0}' 형식이 'System.IComparable'을 구현합니다. 'Object.Equals'에 대한 명시적 재정의도 추가하세요. + + + + The type '{0}' implements 'System.IComparable' explicitly but provides no corresponding override for 'Object.Equals'. An implementation of 'Object.Equals' has been automatically provided, implemented via 'System.IComparable'. Consider implementing the override 'Object.Equals' explicitly + '{0}' 형식이 'System.IComparable'을 명시적으로 구현하지만 'Object.Equals'에 해당하는 재정의를 제공하지 않습니다. 'System.IComparable'을 통해 구현된 'Object.Equals'의 구현이 자동으로 제공되었습니다. 재정의 'Object.Equals'를 명시적으로 구현하세요. + + + + The struct, record or union type '{0}' has an explicit implementation of 'Object.GetHashCode' or 'Object.Equals'. You must apply the 'CustomEquality' attribute to the type + 구조체, 레코드 또는 공용 구조체 형식 '{0}'에 'Object.GetHashCode' 또는 'Object.Equals'의 명시적 구현이 있습니다. 형식에 'CustomEquality' 특성을 적용해야 합니다. + + + + The struct, record or union type '{0}' has an explicit implementation of 'Object.GetHashCode'. Consider implementing a matching override for 'Object.Equals(obj)' + 구조체, 레코드 또는 공용 구조체 형식 '{0}'에 'Object.GetHashCode'의 명시적 구현이 있습니다. 'Object.Equals(obj)'에 대해 일치하는 재정의를 구현하세요. + + + + The struct, record or union type '{0}' has an explicit implementation of 'Object.Equals'. Consider implementing a matching override for 'Object.GetHashCode()' + 구조체, 레코드 또는 공용 구조체 형식 '{0}'에 'Object.Equals'의 명시적 구현이 있습니다. 'Object.GetHashCode()'에 대해 일치하는 재정의를 구현하세요. + + + + The exception definitions are not compatible because a CLI exception mapping is being hidden by a signature. The exception mapping must be visible to other modules. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1} + 시그니처에 의해 CLI 예외 매핑이 숨겨져 있으므로 예외 정의가 호환되지 않습니다. 예외 매핑은 다른 모듈에 표시되어야 합니다. 모듈에 예외 정의\n {0}이(가) 포함되어 있지만 \n해당 시그니처는\n\t{1}을(를) 지정합니다. + + + + The exception definitions are not compatible because the CLI representations differ. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1} + CLI 표현이 서로 다르므로 예외 정의가 호환되지 않습니다. 모듈에 예외 정의\n {0}이(가) 포함되어 있지만 \n해당 시그니처는\n\t{1}을(를) 지정합니다. + + + + The exception definitions are not compatible because the exception abbreviation is being hidden by the signature. The abbreviation must be visible to other CLI languages. Consider making the abbreviation visible in the signature. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1}. + 시그니처에 의해 예외 약어가 숨겨져 있으므로 예외 정의가 호환되지 않습니다. 약어는 다른 CLI 언어에 표시되어야 합니다. 시그니처에서 약어를 표시하세요. 모듈에 예외 정의\n {0}이(가) 포함되어 있지만 \n해당 시그니처는\n\t{1}을(를) 지정합니다. + + + + The exception definitions are not compatible because the exception abbreviations in the signature and implementation differ. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1}. + 시그니처와 구현에서 예외 약어가 서로 다르므로 예외 정의가 호환되지 않습니다. 모듈에 예외 정의\n {0}이(가) 포함되어 있지만 \n해당 시그니처는\n\t{1}을(를) 지정합니다. + + + + The exception definitions are not compatible because the exception declarations differ. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1}. + 예외 선언이 서로 다르므로 예외 정의가 호환되지 않습니다. 모듈에 예외 정의\n {0}이(가) 포함되어 있지만 \n해당 시그니처는\n\t{1}을(를) 지정합니다. + + + + The exception definitions are not compatible because the field '{0}' was required by the signature but was not specified by the implementation. The module contains the exception definition\n {1} \nbut its signature specifies\n\t{2}. + {0}' 필드가 시그니처에 필요했지만 구현에 의해 지정되지 않았으므로 예외 정의가 호환되지 않습니다. 모듈에 예외 정의\n {1}이(가) 포함되어 있지만 \n해당 시그니처는\n\t{2}을(를) 지정합니다. + + + + The exception definitions are not compatible because the field '{0}' was present in the implementation but not in the signature. The module contains the exception definition\n {1} \nbut its signature specifies\n\t{2}. + {0}' 필드가 구현에 있었지만 시그니처에는 없었으므로 예외 정의가 호환되지 않습니다. 모듈에 예외 정의\n {1}이(가) 포함되어 있지만 \n해당 시그니처는\n\t{2}을(를) 지정합니다. + + + + The exception definitions are not compatible because the order of the fields is different in the signature and implementation. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1}. + 시그니처와 구현에서 필드의 순서가 서로 다르므로 예외 정의가 호환되지 않습니다. 모듈에 예외 정의\n {0}이(가) 포함되어 있지만 \n해당 시그니처는\n\t{1}을(를) 지정합니다. + + + + The namespace or module attributes differ between signature and implementation + 네임스페이스 또는 모듈 특성이 시그니처와 구현 간에 서로 다릅니다. + + + + This method is over-constrained in its type parameters + 이 메서드는 해당 형식 매개 변수에서 과다하게 제약 조건이 적용되었습니다. + + + + No implementations of '{0}' had the correct number of arguments and type parameters. The required signature is '{1}'. + {0}'의 구현 중 올바른 수의 인수 및 형식 매개 변수를 포함하는 구현이 없습니다. 필요한 시그니처는 '{1}'입니다. + + + + The override for '{0}' was ambiguous + '{0}'의 재정의가 모호합니다. + + + + More than one override implements '{0}' + 둘 이상의 재정의가 '{0}'을(를) 구현합니다. + + + + The method '{0}' is sealed and cannot be overridden + '{0}' 메서드는 봉인되어 재정의할 수 없습니다. + + + + The override '{0}' implements more than one abstract slot, e.g. '{1}' and '{2}' + 재정의 '{0}'이(가) 둘 이상의 추상 슬롯을 구현합니다(예: '{1}' 및 '{2}'). + + + + Duplicate or redundant interface + 인터페이스가 중복되었습니다. + + + + The interface '{0}' is included in multiple explicitly implemented interface types. Add an explicit implementation of this interface. + '{0}' 인터페이스가 명시적으로 구현된 다중 인터페이스 형식에 포함되어 있습니다. 이 인터페이스의 명시적 구현을 추가하세요. + + + + A named argument has been assigned more than one value + 명명된 인수에 둘 이상의 값이 할당되었습니다. + + + + No implementation was given for '{0}' + '{0}'에 대해 지정된 구현이 없습니다. + + + + No implementation was given for '{0}'. Note that all interface members must be implemented and listed under an appropriate 'interface' declaration, e.g. 'interface ... with member ...'. + '{0}'에 대해 지정된 구현이 없습니다. 모든 인터페이스 멤버가 구현되어 적절한 'interface' 선언에 나열되어야 합니다(예: 'interface ... with member ...'). + + + + The member '{0}' does not have the correct number of arguments. The required signature is '{1}'. + {0}' 멤버에 올바른 수의 인수가 없습니다. 필요한 시그니처는 '{1}'입니다. + + + + The member '{0}' does not have the correct number of method type parameters. The required signature is '{1}'. + {0}' 멤버에 올바른 수의 메서드 형식 매개 변수가 없습니다. 필요한 시그니처는 '{1}'입니다. + + + + The member '{0}' does not have the correct kinds of generic parameters. The required signature is '{1}'. + {0}' 멤버에 올바른 종류의 제네릭 매개 변수가 없습니다. 필요한 시그니처는 '{1}'입니다. + + + + The member '{0}' cannot be used to implement '{1}'. The required signature is '{2}'. + {0}' 멤버를 사용하여 '{1}'을(를) 구현할 수 없습니다. 필요한 시그니처는 '{2}'입니다. + + + + Error while parsing embedded IL + 포함된 IL을 구문 분석하는 동안 오류가 발생했습니다. + + + + Error while parsing embedded IL type + 포함된 IL 형식을 구문 분석하는 동안 오류가 발생했습니다. + + + + This indexer notation has been removed from the F# language + 이 인덱서 표기법은 F# 언어에서 제거되었습니다. + + + + Invalid expression on left of assignment + 할당 왼쪽에 잘못된 식이 있습니다. + + + + The 'ReferenceEquality' attribute cannot be used on structs. Consider using the 'StructuralEquality' attribute instead, or implement an override for 'System.Object.Equals(obj)'. + 'ReferenceEquality' 특성은 구조체에 대해 사용할 수 없습니다. 대신 'StructuralEquality' 특성을 사용하거나 'System.Object.Equals(obj)'의 재정의를 구현하세요. + + + + This type uses an invalid mix of the attributes 'NoEquality', 'ReferenceEquality', 'StructuralEquality', 'NoComparison' and 'StructuralComparison' + 이 형식은 잘못된 'NoEquality', 'ReferenceEquality', 'StructuralEquality', 'NoComparison' 및 'StructuralComparison' 특성의 조합을 사용합니다. + + + + The 'NoEquality' attribute must be used in conjunction with the 'NoComparison' attribute + 'NoEquality' 특성은 'NoComparison' 특성과 함께 사용해야 합니다. + + + + The 'StructuralComparison' attribute must be used in conjunction with the 'StructuralEquality' attribute + 'StructuralComparison' 특성은 'StructuralEquality' 특성과 함께 사용해야 합니다. + + + + The 'StructuralEquality' attribute must be used in conjunction with the 'NoComparison' or 'StructuralComparison' attributes + 'StructuralEquality' 특성은 'NoComparison' 또는 'StructuralComparison' 특성과 함께 사용해야 합니다. + + + + A type cannot have both the 'ReferenceEquality' and 'StructuralEquality' or 'StructuralComparison' attributes + 형식에 'ReferenceEquality' 특성과 'StructuralEquality' 또는 'StructuralComparison' 특성을 모두 지정할 수는 없습니다. + + + + Only record, union, exception and struct types may be augmented with the 'ReferenceEquality', 'StructuralEquality' and 'StructuralComparison' attributes + 레코드, 공용 구조체, 예외 및 구조체 형식만 'ReferenceEquality', 'StructuralEquality' 및 'StructuralComparison' 특성으로 확대할 수 있습니다. + + + + A type with attribute 'ReferenceEquality' cannot have an explicit implementation of 'Object.Equals(obj)', 'System.IEquatable<_>' or 'System.Collections.IStructuralEquatable' + 특성 'ReferenceEquality'가 지정된 형식에는 'Object.Equals(obj)', 'System.IEquatable<_>' 또는 'System.Collections.IStructuralEquatable'에 대한 명시적 구현이 있을 수 없습니다. + + + + A type with attribute 'CustomEquality' must have an explicit implementation of at least one of 'Object.Equals(obj)', 'System.IEquatable<_>' or 'System.Collections.IStructuralEquatable' + 특성 'CustomEquality'가 지정된 형식에는 'Object.Equals(obj)', 'System.IEquatable<_>' 또는 'System.Collections.IStructuralEquatable' 중 하나 이상에 대한 명시적 구현이 있어야 합니다. + + + + A type with attribute 'CustomComparison' must have an explicit implementation of at least one of 'System.IComparable' or 'System.Collections.IStructuralComparable' + 특성 'CustomComparison'이 지정된 형식에는 'System.IComparable' 또는 'System.Collections.IStructuralComparable' 중 하나 이상에 대한 명시적 구현이 있어야 합니다. + + + + A type with attribute 'NoEquality' should not usually have an explicit implementation of 'Object.Equals(obj)'. Disable this warning if this is intentional for interoperability purposes + 특성 'NoEquality'가 지정된 형식에는 일반적으로 'Object.Equals(obj)'에 대한 명시적 구현이 있으면 안 됩니다. 상호 운용성을 위해 의도적으로 이러한 구현을 사용한 경우에는 이 경고를 사용하지 마세요. + + + + A type with attribute 'NoComparison' should not usually have an explicit implementation of 'System.IComparable', 'System.IComparable<_>' or 'System.Collections.IStructuralComparable'. Disable this warning if this is intentional for interoperability purposes + 특성 'NoComparison'이 지정된 형식에는 일반적으로 'System.IComparable', 'System.IComparable<_>' 또는 'System.Collections.IStructuralComparable'에 대한 명시적 구현이 있으면 안 됩니다. 상호 운용성을 위해 의도적으로 이러한 구현을 사용한 경우에는 이 경고를 사용하지 마세요. + + + + The 'CustomEquality' attribute must be used in conjunction with the 'NoComparison' or 'CustomComparison' attributes + 'CustomEquality' 특성은 'NoComparison' 또는 'CustomComparison' 특성과 함께 사용해야 합니다. + + + + Positional specifiers are not permitted in format strings + 위치 지정자는 서식 문자열에 허용되지 않습니다. + + + + Missing format specifier + 서식 지정자가 없습니다. + + + + '{0}' flag set twice + '{0}' 플래그를 두 번 설정했습니다. + + + + Prefix flag (' ' or '+') set twice + 접두사 플래그(' ' 또는 '+')를 두 번 설정했습니다. + + + + The # formatting modifier is invalid in F# + F#에서는 # 서식 지정 한정자를 사용할 수 없습니다. + + + + Bad precision in format specifier + 서식 지정자의 정밀도가 잘못되었습니다. + + + + Bad width in format specifier + 서식 지정자의 너비가 잘못되었습니다. + + + + '{0}' format does not support '0' flag + '{0}' 형식은 '0' 플래그를 지원하지 않습니다. + + + + Precision missing after the '.' + '.' 뒤에 정밀도가 없습니다. + + + + '{0}' format does not support precision + '{0}' 형식은 정밀도를 지원하지 않습니다. + + + + Bad format specifier (after l or L): Expected ld,li,lo,lu,lx or lX. In F# code you can use %d, %x, %o or %u instead, which are overloaded to work with all basic integer types. + l 또는 L 뒤에서 서식 지정자가 잘못되었습니다. ld, li, lo, lu, lx 또는 lX가 필요합니다. F# 코드에서는 모든 기본 정수 형식과 함께 사용할 수 있도록 오버로드되는 %d, %x, %o 또는 %u를 대신 사용할 수 있습니다. + + + + The 'l' or 'L' in this format specifier is unnecessary. In F# code you can use %d, %x, %o or %u instead, which are overloaded to work with all basic integer types. + 이 서식 지정자에서 'l' 또는 'L'은 불필요합니다. F# 코드에서는 모든 기본 정수 형식과 함께 사용할 수 있도록 오버로드되는 %d, %x, %o 또는 %u를 대신 사용할 수 있습니다. + + + + The 'h' or 'H' in this format specifier is unnecessary. You can use %d, %x, %o or %u instead, which are overloaded to work with all basic integer types. + 이 서식 지정자에서 'h' 또는 'H'는 불필요합니다. 모든 기본 정수 형식과 함께 사용할 수 있도록 오버로드되는 %d, %x, %o 또는 %u를 대신 사용할 수 있습니다. + + + + '{0}' does not support prefix '{1}' flag + '{0}'은(는) 접두사 '{1}' 플래그를 지원하지 않습니다. + + + + Bad format specifier: '{0}' + 서식 지정자가 잘못되었습니다. '{0}' + + + + System.Environment.Exit did not exit + System.Environment.Exit이 종료되지 않았습니다. + + + + The treatment of this operator is now handled directly by the F# compiler and its meaning cannot be redefined + 이 연산자의 처리는 이제 F# 컴파일러에 의해 직접 수행되며 해당 의미를 다시 정의할 수 없습니다. + + + + A protected member is called or 'base' is being used. This is only allowed in the direct implementation of members since they could escape their object scope. + 보호된 멤버가 호출되었거나 'base'가 사용되고 있습니다. 이는 멤버를 직접 구현할 경우에만 허용됩니다. 이 경우 멤버가 개체 범위를 벗어날 수 있습니다. + + + + The byref-typed variable '{0}' is used in an invalid way. Byrefs cannot be captured by closures or passed to inner functions. + byref 형식의 변수 '{0}'이(가) 잘못된 방식으로 사용되었습니다. byref는 클로저로 캡처하거나 내부 함수로 전달할 수 없습니다. + + + + The 'base' keyword is used in an invalid way. Base calls cannot be used in closures. Consider using a private member to make base calls. + 'base' 키워드가 잘못된 방식으로 사용되었습니다. 기본 호출은 클로저에 사용할 수 없습니다. 전용 멤버를 사용하여 기본 호출을 수행하세요. + + + + The variable '{0}' is used in an invalid way + '{0}' 변수가 잘못된 방식으로 사용되었습니다. + + + + The type '{0}' is less accessible than the value, member or type '{1}' it is used in. + {0}' 형식은 사용되는 '{1}' 값, 멤버 또는 형식보다 액세스하기 어렵습니다. + + + + 'System.Void' can only be used as 'typeof<System.Void>' in F# + 'System.Void'는 F#에서 'typeof<System.Void>'로만 사용할 수 있습니다. + + + + A type instantiation involves a byref type. This is not permitted by the rules of Common IL. + 형식 인스턴스에 byref 형식이 포함되어 있습니다. 이는 공통 IL의 규칙에서 허용되지 않습니다. + + + + Calls to 'reraise' may only occur directly in a handler of a try-with + 'reraise'에 대한 호출은 try-with의 처리기 내에서 직접 발생할 수만 있습니다. + + + + Expression-splicing operators may only be used within quotations + expression-splicing 연산자는 인용구 내에서만 사용할 수 있습니다. + + + + First-class uses of the expression-splicing operator are not permitted + expression-splicing 연산자의 첫 번째 클래스 사용은 허용되지 않습니다. + + + + First-class uses of the address-of operators are not permitted + address-of 연산자의 첫 번째 클래스 사용은 허용되지 않습니다. + + + + First-class uses of the 'reraise' function is not permitted + 'reraise' 함수의 첫 번째 클래스 사용은 허용되지 않습니다. + + + + The byref typed value '{0}' cannot be used at this point + byref 형식의 값 '{0}'을(를) 현재 사용할 수 없습니다. + + + + 'base' values may only be used to make direct calls to the base implementations of overridden members + 'base' 값은 재정의된 멤버의 기본 구현에 대한 직접 호출을 수행하는 데에만 사용할 수 있습니다. + + + + Object constructors cannot directly use try/with and try/finally prior to the initialization of the object. This includes constructs such as 'for x in ...' that may elaborate to uses of these constructs. This is a limitation imposed by Common IL. + 개체 생성자는 개체 초기화 전에 try/with 및 try/finally를 직접 사용할 수 없습니다. 여기에는 이러한 구문의 사용을 자세히 설명할 수 있는 'for x in ...'과 같은 구문이 포함됩니다. 이는 공통 IL의 제한입니다. + + + + The address of the variable '{0}' cannot be used at this point + '{0}' 변수의 주소를 현재 사용할 수 없습니다. + + + + The address of the static field '{0}' cannot be used at this point + 정적 필드 '{0}'의 주소를 현재 사용할 수 없습니다. + + + + The address of the field '{0}' cannot be used at this point + '{0}' 필드의 주소를 현재 사용할 수 없습니다. + + + + The address of an array element cannot be used at this point + 배열 요소의 주소를 현재 사용할 수 없습니다. + + + + The type of a first-class function cannot contain byrefs + 첫 번째 클래스 함수의 형식에는 byref를 포함할 수 없습니다. + + + + A method return type would contain byrefs which is not permitted + 메서드 반환 형식에 허용되지 않는 byref가 포함됩니다. + + + + Invalid custom attribute value (not a constant or literal) + 사용자 지정 특성 값이 잘못되었습니다(상수 또는 리터럴이 아님). + + + + The attribute type '{0}' has 'AllowMultiple=false'. Multiple instances of this attribute cannot be attached to a single language element. + 특성 형식 '{0}'에 'AllowMultiple=false'가 있습니다. 이 특성의 여러 인스턴스를 단일 언어 요소에 연결할 수 없습니다. + + + + The member '{0}' is used in an invalid way. A use of '{1}' has been inferred prior to its definition at or near '{2}'. This is an invalid forward reference. + ’{0}' 멤버가 잘못된 방식으로 사용되었습니다. '{1}'이(가) 정의되기 전에 '{2}' 또는 그 근처에서 해당 사용이 유추되었습니다. 이는 잘못된 전방 참조입니다. + + + + A byref typed value would be stored here. Top-level let-bound byref values are not permitted. + byref 형식의 값이 여기에 저장됩니다. 최상위 let 바인딩 byref 값은 허용되지 않습니다. + + + + [<ReflectedDefinition>] terms cannot contain uses of the prefix splice operator '%' + [<ReflectedDefinition>] 용어에는 접두사 스플라이스 연산자 '%'을(를) 포함할 수 없습니다. + + + + A function labeled with the 'EntryPointAttribute' attribute must be the last declaration in the last file in the compilation sequence. + 'EntryPointAttribute' 특성을 사용하여 레이블이 지정된 함수는 컴파일 시퀀스에서 마지막 파일의 마지막 선언이어야 합니다. + + + + compiled form of the union case + 공용 구조체 케이스의 컴파일 형식 + + + + default augmentation of the union case + 공용 구조체 케이스의 기본 확대 + + + + The property '{0}' has the same name as a method in type '{1}'. + {0}' 속성의 이름이 '{1}' 형식의 메서드와 같습니다. + + + + The property '{0}' of type '{1}' has a getter and a setter that do not match. If one is abstract then the other must be as well. + {1}' 형식의 '{0}' 속성에 일치하지 않는 getter와 setter가 있습니다. 하나가 추상 요소인 경우 다른 하나도 추상 요소여야 합니다. + + + + The property '{0}' has the same name as another property in type '{1}', but one takes indexer arguments and the other does not. You may be missing an indexer argument to one of your properties. + {0}' 속성의 이름이 '{1}' 형식의 다른 속성과 같지만 하나는 인덱서 인수를 사용하고 다른 하나는 그렇지 않습니다. 속성 중 하나에 대한 인덱서 인수가 없을 수 있습니다. + + + + A type would store a byref typed value. This is not permitted by Common IL. + 형식에 byref 형식의 값이 저장됩니다. 이는 공통 IL에서 허용되지 않습니다. + + + + Duplicate method. The method '{0}' has the same name and signature as another method in type '{1}'. + 메서드가 중복되었습니다. '{0}' 메서드의 이름 및 시그니처가 '{1}' 형식의 다른 메서드와 같습니다. + + + + Duplicate method. The method '{0}' has the same name and signature as another method in type '{1}' once tuples, functions, units of measure and/or provided types are erased. + 메서드가 중복되었습니다. '{0}' 메서드의 이름 및 시그니처가 '{1}' 형식의 다른 메서드와 같습니다(튜플, 함수, 측정 단위 및/또는 제공된 형식을 지울 경우). + + + + The method '{0}' has curried arguments but has the same name as another method in type '{1}'. Methods with curried arguments cannot be overloaded. Consider using a method taking tupled arguments. + {0}' 메서드에 커리된 인수가 있지만 '{1}' 형식의 다른 메서드와 이름이 같습니다. 커리된 인수가 있는 메서드를 오버로드할 수 없습니다. 튜플된 인수를 포함하는 메서드를 사용하세요. + + + + Methods with curried arguments cannot declare 'out', 'ParamArray', 'optional', 'ReflectedDefinition', 'byref', 'CallerLineNumber', 'CallerMemberName', or 'CallerFilePath' arguments + 커리된 인수가 있는 메서드는 'out', 'ParamArray', 'optional', 'ReflectedDefinition', 'byref', 'CallerLineNumber', 'CallerMemberName' 또는 'CallerFilePath' 인수를 선언할 수 없습니다. + + + + Duplicate property. The property '{0}' has the same name and signature as another property in type '{1}'. + 속성이 중복되었습니다. '{0}' 속성의 이름 및 시그니처가 '{1}' 형식의 다른 속성과 같습니다. + + + + Duplicate property. The property '{0}' has the same name and signature as another property in type '{1}' once tuples, functions, units of measure and/or provided types are erased. + 속성이 중복되었습니다. '{0}' 속성의 이름 및 시그니처가 '{1}' 형식의 다른 속성과 같습니다(튜플, 함수, 측정 단위 및/또는 제공된 형식을 지울 경우). + + + + Duplicate method. The abstract method '{0}' has the same name and signature as an abstract method in an inherited type. + 메서드가 중복되었습니다. 추상 메서드 '{0}'의 이름 및 시그니처가 상속된 형식의 추상 메서드와 같습니다. + + + + Duplicate method. The abstract method '{0}' has the same name and signature as an abstract method in an inherited type once tuples, functions, units of measure and/or provided types are erased. + 메서드가 중복되었습니다. 추상 메서드 '{0}'의 이름 및 시그니처가 상속된 형식의 추상 메서드와 같습니다(튜플, 함수, 측정 단위 및/또는 제공된 형식을 지울 경우). + + + + This type implements the same interface at different generic instantiations '{0}' and '{1}'. This is not permitted in this version of F#. + 이 형식은 서로 다른 제네릭 인스턴스 '{0}' 및 '{1}'에서 같은 인터페이스를 구현합니다. 이는 이 버전의 F#에서 허용되지 않습니다. + + + + The type of a field using the 'DefaultValue' attribute must admit default initialization, i.e. have 'null' as a proper value or be a struct type whose fields all admit default initialization. You can use 'DefaultValue(false)' to disable this check + 'DefaultValue' 특성을 사용하는 필드의 형식은 기본 초기화를 허용해야 합니다. 즉, 이러한 형식은 적절한 값으로 'null'을 가지거나 필드가 모두 기본 초기화를 허용하는 구조체 형식이어야 합니다. 'DefaultValue(false)'를 사용하여 이 검사를 사용하지 않을 수 있습니다. + + + + The type abbreviation contains byrefs. This is not permitted by F#. + 형식 약어에 byref가 포함되어 있습니다. 이는 F#에서 허용되지 않습니다. + + + + The variable '{0}' is bound in a quotation but is used as part of a spliced expression. This is not permitted since it may escape its scope. + '{0}' 변수가 인용구 내에 바인딩되어 있지만 스플라이스된 식의 일부로 사용되었습니다. 범위를 벗어날 수 있으므로 이는 허용되지 않습니다. + + + + Quotations cannot contain uses of generic expressions + 인용구에는 제네릭 식을 포함할 수 없습니다. + + + + Quotations cannot contain function definitions that are inferred or declared to be generic. Consider adding some type constraints to make this a valid quoted expression. + 인용구에는 제네릭 형식으로 유추되거나 선언되는 함수 정의를 포함할 수 없습니다. 형식 제약 조건을 추가하여 올바른 따옴표 붙은 식으로 만드세요. + + + + Quotations cannot contain object expressions + 인용구에는 개체 식을 포함할 수 없습니다. + + + + Quotations cannot contain expressions that take the address of a field + 인용구에는 필드의 주소를 사용하는 식을 포함할 수 없습니다. + + + + Quotations cannot contain expressions that fetch static fields + 인용구에는 정적 필드를 페치하는 식을 포함할 수 없습니다. + + + + Quotations cannot contain inline assembly code or pattern matching on arrays + 인용구에는 인라인 어셈블리 코드 또는 배열에 대한 패턴 일치를 포함할 수 없습니다. + + + + Quotations cannot contain descending for loops + 인용구에는 루프의 내림차순을 포함할 수 없습니다. + + + + Quotations cannot contain expressions that fetch union case indexes + 인용구에는 공용 구조체 케이스 인덱스를 페치하는 식을 포함할 수 없습니다. + + + + Quotations cannot contain expressions that set union case fields + 인용구에는 공용 구조체 케이스 필드를 설정하는 식을 포함할 수 없습니다. + + + + Quotations cannot contain expressions that set fields in exception values + 인용구에는 예외 값에 필드를 설정하는 식을 포함할 수 없습니다. + + + + Quotations cannot contain expressions that require byref pointers + 인용구에는 byref 포인터를 필요로 하는 식을 포함할 수 없습니다. + + + + Quotations cannot contain expressions that make member constraint calls, or uses of operators that implicitly resolve to a member constraint call + 인용구에는 멤버 제약 조건을 호출하는 식 또는 암시적으로 멤버 제약 조건 호출로 확인되는 연산자 사용을 포함할 수 없습니다. + + + + Quotations cannot contain this kind of constant + 인용구에는 이러한 종류의 상수를 포함할 수 없습니다. + + + + Quotations cannot contain this kind of pattern match + 인용구에는 이러한 종류의 패턴 일치를 포함할 수 없습니다. + + + + Quotations cannot contain array pattern matching + 인용구에는 배열 패턴 일치를 포함할 수 없습니다. + + + + Quotations cannot contain this kind of type + 인용구에는 이러한 종류의 형식을 포함할 수 없습니다. + + + + The declared type parameter '{0}' cannot be used here since the type parameter cannot be resolved at compile time + 선언된 형식 매개 변수 '{0}'은(는) 컴파일 시간에 확인할 수 없으므로 여기에 사용할 수 없습니다. + + + + This code is less generic than indicated by its annotations. A unit-of-measure specified using '_' has been determined to be '1', i.e. dimensionless. Consider making the code generic, or removing the use of '_'. + 이 코드는 해당 주석에 표시된 것보다 일반적이지 않습니다. '_'을 사용하여 지정된 측정 단위는 '1', 즉 차원이 없는 것으로 결정되었습니다. 코드를 제네릭 형식으로 만들거나 '_'을 사용하지 마세요. + + + + Type inference problem too complicated (maximum iteration depth reached). Consider adding further type annotations. + 형식 유추 문제가 너무 복잡합니다(최대 반복 깊이에 도달함). 형식 주석을 더 추가하세요. + + + + Expected arguments to an instance member + 인스턴스 멤버에 대한 인수가 필요합니다. + + + + This indexer expects {0} arguments but is here given {1} + 이 인덱서에 {0}개의 인수가 필요하지만 여기에서는 {1}개가 지정되었습니다. + + + + Expecting a type supporting the operator '{0}' but given a function type. You may be missing an argument to a function. + '{0}' 연산자를 지원하는 형식이 필요하지만 함수 형식이 지정되었습니다. 함수에 대한 인수가 없을 수 있습니다. + + + + Expecting a type supporting the operator '{0}' but given a tuple type + '{0}' 연산자를 지원하는 형식이 필요한데 튜플 형식을 지정했습니다. + + + + None of the types '{0}' support the operator '{1}' + {0}' 형식에서 '{1}' 연산자를 지원하지 않습니다. + + + + The type '{0}' does not support the operator '{1}' + {0}' 형식은 '{1}' 연산자를 지원하지 않습니다. + + + + None of the types '{0}' support the operator '{1}'. Consider opening the module 'Microsoft.FSharp.Linq.NullableOperators'. + {0}' 형식에서 '{1}' 연산자를 지원하지 않습니다. 'Microsoft.FSharp.Linq.NullableOperators' 모듈을 열어 보세요. + + + + The type '{0}' does not support the operator '{1}'. Consider opening the module 'Microsoft.FSharp.Linq.NullableOperators'. + {0}' 형식은 '{1}' 연산자를 지원하지 않습니다. 'Microsoft.FSharp.Linq.NullableOperators' 모듈을 열어 보세요. + + + + The type '{0}' does not support a conversion to the type '{1}' + {0}' 형식은 '{1}' 형식으로의 변환을 지원하지 않습니다. + + + + The type '{0}' has a method '{1}' (full name '{2}'), but the method is static + {0}' 형식에 '{1}' 메서드(전체 이름: '{2}')가 있지만 정적 메서드입니다. + + + + The type '{0}' has a method '{1}' (full name '{2}'), but the method is not static + {0}' 형식에 '{1}' 메서드(전체 이름: '{2}')가 있지만 정적 메서드가 아닙니다. + + + + The constraints 'struct' and 'not struct' are inconsistent + 제약 조건 'struct'와 'not struct'는 서로 일관되지 않습니다. + + + + The type '{0}' does not have 'null' as a proper value + '{0}' 형식은 적절한 값으로 'null'을 가지지 않습니다. + + + + The type '{0}' does not have 'null' as a proper value. To create a null value for a Nullable type use 'System.Nullable()'. + '{0}' 형식은 적절한 값으로 'null'을 가지지 않습니다. Nullable 형식에 null 값을 만들려면 'System.Nullable()'을 사용하세요. + + + + The type '{0}' does not support the 'comparison' constraint because it has the 'NoComparison' attribute + '{0}' 형식은 'NoComparison' 특성을 가지므로 'comparison' 제약 조건을 지원하지 않습니다. + + + + The type '{0}' does not support the 'comparison' constraint. For example, it does not support the 'System.IComparable' interface + '{0}' 형식은 'comparison' 제약 조건을 지원하지 않습니다. 예를 들어, 이 형식은 'System.IComparable' 인터페이스를 지원하지 않습니다. + + + + The type '{0}' does not support the 'comparison' constraint because it is a record, union or struct with one or more structural element types which do not support the 'comparison' constraint. Either avoid the use of comparison with this type, or add the 'StructuralComparison' attribute to the type to determine which field type does not support comparison + '{0}' 형식은 'comparison' 제약 조건을 지원하지 않는 하나 이상의 구조적 요소 형식을 포함하는 레코드, 공용 구조체 또는 구조체이므로 'comparison' 제약 조건을 지원하지 않습니다. 이 형식의 경우 비교를 사용하지 말거나 형식에 'StructuralComparison' 특성을 추가하여 비교를 지원하지 않는 필드 형식을 확인하세요. + + + + The type '{0}' does not support the 'equality' constraint because it has the 'NoEquality' attribute + '{0}' 형식은 'NoEquality' 특성을 가지므로 'equality' 제약 조건을 지원하지 않습니다. + + + + The type '{0}' does not support the 'equality' constraint because it is a function type + '{0}' 형식은 함수 형식이므로 'equality' 제약 조건을 지원하지 않습니다. + + + + The type '{0}' does not support the 'equality' constraint because it is a record, union or struct with one or more structural element types which do not support the 'equality' constraint. Either avoid the use of equality with this type, or add the 'StructuralEquality' attribute to the type to determine which field type does not support equality + '{0}' 형식은 'equality' 제약 조건을 지원하지 않는 하나 이상의 구조적 요소 형식을 포함하는 레코드, 공용 구조체 또는 구조체이므로 'equality' 제약 조건을 지원하지 않습니다. 이 형식의 경우 같음 조건을 사용하지 말거나 형식에 'StructuralEquality' 특성을 추가하여 같음 조건을 지원하지 않는 필드 형식을 확인하세요. + + + + The type '{0}' is not a CLI enum type + '{0}' 형식은 CLI 열거형 형식이 아닙니다. + + + + The type '{0}' has a non-standard delegate type + '{0}' 형식은 비표준 대리자 형식을 가집니다. + + + + The type '{0}' is not a CLI delegate type + '{0}' 형식은 CLI 대리자 형식이 아닙니다. + + + + This type parameter cannot be instantiated to 'Nullable'. This is a restriction imposed in order to ensure the meaning of 'null' in some CLI languages is not confusing when used in conjunction with 'Nullable' values. + 이 형식 매개 변수는 'Nullable'로 인스턴스화할 수 없습니다. 이는 'Nullable' 값과 함께 사용할 때 일부 CLI 언어에서 'null'의 의미가 혼동되지 않도록 하기 위한 제한입니다. + + + + A generic construct requires that the type '{0}' is a CLI or F# struct type + 제네릭 구문을 사용하려면 '{0}' 형식이 CLI 또는 F# 구조체 형식이어야 합니다. + + + + A generic construct requires that the type '{0}' is an unmanaged type + 제네릭 구문을 사용하려면 '{0}' 형식이 관리되지 않은 형식이어야 합니다. + + + + The type '{0}' is not compatible with any of the types {1}, arising from the use of a printf-style format string + ’{0}' 형식은 printf 스타일의 서식 문자열을 사용함으로 인해 발생하는 어떤 {1} 형식과도 호환되지 않습니다. + + + + A generic construct requires that the type '{0}' have reference semantics, but it does not, i.e. it is a struct + 제네릭 구문을 사용하려면 '{0}' 형식에 참조 의미 체계가 있어야 하지만 없습니다. 즉, 형식이 구조체입니다. + + + + A generic construct requires that the type '{0}' be non-abstract + 제네릭 구문을 사용하려면 '{0}' 형식이 비추상 형식이어야 합니다. + + + + A generic construct requires that the type '{0}' have a public default constructor + 제네릭 구문을 사용하려면 '{0}' 형식에 public 기본 생성자가 있어야 합니다. + + + + Type instantiation length mismatch + 형식 인스턴스 길이가 일치하지 않습니다. + + + + Optional arguments not permitted here + 선택적 인수는 여기에 허용되지 않습니다. + + + + {0} is not a static member + {0}은(는) 정적 멤버가 아닙니다. + + + + {0} is not an instance member + {0}은(는) 인스턴스 멤버가 아닙니다. + + + + Argument length mismatch + 인수 길이가 일치하지 않습니다. + + + + The argument types don't match + 인수 형식이 일치하지 않습니다. + + + + This method expects a CLI 'params' parameter in this position. 'params' is a way of passing a variable number of arguments to a method in languages such as C#. Consider passing an array for this argument + 이 메서드에서는 이 위치에 CLI 'params' 매개 변수가 필요합니다. 'params'는 다양한 수의 인수를 C#과 같은 언어의 메서드에 전달하는 방법입니다. 이 인수에 대한 배열을 전달하세요. + + + + The member or object constructor '{0}' is not {1} + 멤버 또는 개체 생성자 '{0}'은(는) {1}이(가) 아닙니다. + + + + The member or object constructor '{0}' is not {1}. Private members may only be accessed from within the declaring type. Protected members may only be accessed from an extending type and cannot be accessed from inner lambda expressions. + 멤버 또는 개체 생성자 '{0}'은(는) {1}이(가) 아닙니다. 전용 멤버는 선언 형식 내에서만 액세스할 수 있습니다. 보호된 멤버는 확장 형식에서만 액세스할 수 있으며 내부 람다 식에서는 액세스할 수 없습니다. + + + + {0} is not a static method + {0}은(는) 정적 메서드가 아닙니다. + + + + {0} is not an instance method + {0}은(는) 인스턴스 메서드가 아닙니다. + + + + The member or object constructor '{0}' has no argument or settable return property '{1}'. {2}. + 멤버 또는 개체 생성자 '{0}'에 인수 또는 설정 가능한 반환 속성 '{1}'이(가) 없습니다. {2} + + + + The object constructor '{0}' has no argument or settable return property '{1}'. {2}. + 개체 생성자 '{0}'에 인수 또는 설정 가능한 반환 속성 '{1}'이(가) 없습니다. {2}. + + + + The required signature is {0} + 필요한 시그니처는 {0}입니다. + + + + The member or object constructor '{0}' requires {1} argument(s). The required signature is '{2}'. + 멤버 또는 개체 생성자 '{0}'을(를) 사용하려면 {1}개의 인수가 필요합니다. 필요한 시그니처는 '{2}'입니다. + + + + The member or object constructor '{0}' requires {1} additional argument(s). The required signature is '{2}'. + 멤버 또는 개체 생성자 '{0}'을(를) 사용하려면 {1}개의 인수가 더 필요합니다. 필요한 시그니처는 '{2}'입니다. + + + + The member or object constructor '{0}' requires {1} argument(s). The required signature is '{2}'. Some names for missing arguments are {3}. + 멤버 또는 개체 생성자 '{0}'을(를) 사용하려면 {1}개의 인수가 필요합니다. 필요한 시그니처는 '{2}'입니다. 누락된 인수의 이름에는 {3} 등이 있습니다. + + + + The member or object constructor '{0}' requires {1} additional argument(s). The required signature is '{2}'. Some names for missing arguments are {3}. + 멤버 또는 개체 생성자 '{0}'을(를) 사용하려면 {1}개의 인수가 더 필요합니다. 필요한 시그니처는 '{2}'입니다. 누락된 인수의 이름에는 {3} 등이 있습니다. + + + + The member or object constructor '{0}' requires {1} argument(s) but is here given {2} unnamed and {3} named argument(s). The required signature is '{4}'. + 멤버 또는 개체 생성자 '{0}'을(를) 사용하려면 {1}개의 인수가 필요하지만 여기에서는 {2}개의 명명되지 않은 인수와 {3}개의 명명된 인수가 지정되었습니다. 필요한 시그니처는 '{4}'입니다. + + + + The member or object constructor '{0}' takes {1} argument(s) but is here given {2}. The required signature is '{3}'. + 멤버 또는 개체 생성자 '{0}'은(는) {1}개의 인수를 사용하지만 여기에서는 {2}개가 지정되었습니다. 필요한 시그니처는 '{3}'입니다. + + + + The object constructor '{0}' takes {1} argument(s) but is here given {2}. The required signature is '{3}'. + 개체 생성자 '{0}'은(는) {1}개의 인수를 사용하지만, 여기에서는 {2}개가 지정되었습니다. 필요한 시그니처는 '{3}'입니다. + + + + The object constructor '{0}' takes {1} argument(s) but is here given {2}. The required signature is '{3}'. If some of the arguments are meant to assign values to properties, consider separating those arguments with a comma (','). + 개체 생성자 '{0}'은(는) {1}개의 인수를 사용하지만, 여기에서는 {2}개가 지정되었습니다. 필요한 시그니처는 '{3}'입니다. 여러 인수로 속성에 값을 할당하는 경우 해당 인수를 쉼표(',')로 구분하세요. + + + + The member or object constructor '{0}' takes {1} type argument(s) but is here given {2}. The required signature is '{3}'. + 멤버 또는 개체 생성자 '{0}'은(는) {1}개의 형식 인수를 사용하지만 여기에서는 {2}개가 지정되었습니다. 필요한 시그니처는 '{3}'입니다. + + + + A member or object constructor '{0}' taking {1} arguments is not accessible from this code location. All accessible versions of method '{2}' take {3} arguments. + {1}개의 인수를 사용하는 멤버 또는 개체 생성자 '{0}'은(는) 이 코드 위치에서 액세스할 수 없습니다. '{2}' 메서드의 액세스할 수 있는 모든 버전은 {3}개의 인수를 사용합니다. + + + + Incorrect generic instantiation. No {0} member named '{1}' takes {2} generic arguments. + 제네릭 인스턴스가 잘못되었습니다. 이름이 '{1}'인 {0} 멤버 중 {2}개의 제네릭 인수를 사용하는 멤버가 없습니다. + + + + The member or object constructor '{0}' does not take {1} argument(s). An overload was found taking {2} arguments. + 멤버 또는 개체 생성자 '{0}'은(는) {1}개의 인수를 사용하지 않습니다. {2}개의 인수를 사용하는 오버로드를 찾았습니다. + + + + No {0} member or object constructor named '{1}' takes {2} arguments + 이름이 '{1}'인 {0} 멤버 또는 개체 생성자 중 {2}개의 인수를 사용하는 요소가 없습니다. + + + + No {0} member or object constructor named '{1}' takes {2} arguments. Note the call to this member also provides {3} named arguments. + 이름이 '{1}'인 {0} 멤버 또는 개체 생성자 중 {2}개의 인수를 사용하는 요소가 없습니다. 이 멤버를 호출하면 {3}개의 명명된 인수도 제공됩니다. + + + + No {0} member or object constructor named '{1}' takes {2} arguments. The named argument '{3}' doesn't correspond to any argument or settable return property for any overload. + 이름이 '{1}'인 {0} 멤버 또는 개체 생성자 중 {2}개의 인수를 사용하는 요소가 없습니다. 명명된 인수 '{3}'은(는) 오버로드에 대한 어떠한 인수 또는 설정 가능한 반환 속성에도 해당하지 않습니다. + + + + Method or object constructor '{0}' not found + 메서드 또는 개체 생성자 '{0}'을(를) 찾을 수 없습니다. + + + + No overloads match for method '{0}'. + '{0}' 메서드와 일치하는 오버로드가 없습니다. + + + + A unique overload for method '{0}' could not be determined based on type information prior to this program point. A type annotation may be needed. + 이 프로그램 지점 전의 형식 정보를 기반으로 '{0}' 메서드에 대한 고유 오버로드를 결정할 수 없습니다. 형식 주석이 필요할 수 있습니다. + + + + Candidates: {0} + 후보: {0} + + + + The available overloads are shown below. + 사용 가능한 오버로드가 아래에 표시됩니다. + + + + Accessibility modifiers are not permitted on 'do' bindings, but '{0}' was given. + 액세스 가능성 한정자는 'do' 바인딩에서 허용되지 않지만, '{0}'이(가) 지정되었습니다. + + + + End of file in #if section begun at or after here + #if 섹션의 파일 끝이 여기에서 또는 여기 뒤에서 시작되었습니다. + + + + End of file in string begun at or before here + 문자열의 파일 끝이 여기에서 또는 여기 앞에서 시작되었습니다. + + + + End of file in verbatim string begun at or before here + 축자 문자열의 파일 끝이 여기에서 또는 여기 앞에서 시작되었습니다. + + + + End of file in comment begun at or before here + 주석의 파일 끝이 여기에서 또는 여기 앞에서 시작되었습니다. + + + + End of file in string embedded in comment begun at or before here + 주석에 포함된 문자열의 파일 끝이 여기에서 또는 여기 앞에서 시작되었습니다. + + + + End of file in verbatim string embedded in comment begun at or before here + 주석에 포함된 축자 문자열의 파일 끝이 여기에서 또는 여기 앞에서 시작되었습니다. + + + + End of file in IF-OCAML section begun at or before here + IF-OCAML 섹션의 파일 끝이 여기에서 또는 여기 앞에서 시작되었습니다. + + + + End of file in directive begun at or before here + 지시문의 파일 끝이 여기에서 또는 여기 앞에서 시작되었습니다. + + + + No #endif found for #if or #else + #if 또는 #else에 대한 #endif를 찾을 수 없습니다. + + + + Attributes have been ignored in this construct + 특성은 이 구문에서 무시되었습니다. + + + + 'use' bindings are not permitted in primary constructors + 'use' 바인딩은 기본 생성자에서 허용되지 않습니다. + + + + 'use' bindings are not permitted in modules and are treated as 'let' bindings + 'use' 바인딩은 모듈에서 허용되지 않으며 'let' 바인딩으로 처리됩니다. + + + + An integer for loop must use a simple identifier + 루프의 정수에는 단순 식별자를 사용해야 합니다. + + + + At most one 'with' augmentation is permitted + 최대 하나의 'with' 확대가 허용됩니다. + + + + A semicolon is not expected at this point + 여기서는 세미콜론이 필요하지 않습니다. + + + + Unexpected end of input + 예기치 않은 입력의 끝입니다. + + + + Accessibility modifiers are not permitted here, but '{0}' was given. + 액세스 가능성 한정자는 여기에 허용되지 않지만, '{0}'이(가) 지정되었습니다. + + + + Only '#' compiler directives may occur prior to the first 'namespace' declaration + '#' 컴파일러 지시문만 첫 번째 'namespace' 선언 앞에 발생할 수 있습니다. + + + + Accessibility modifiers should come immediately prior to the identifier naming a construct + 액세스 가능성 한정자는 구문의 이름을 지정하는 식별자 바로 앞에 와야 합니다. + + + + Files should begin with either a namespace or module declaration, e.g. 'namespace SomeNamespace.SubNamespace' or 'module SomeNamespace.SomeModule', but not both. To define a module within a namespace use 'module SomeModule = ...' + 파일은 네임스페이스 또는 모듈 선언으로 시작해야 하지만(예: 'namespace SomeNamespace.SubNamespace' 또는 'module SomeNamespace.SomeModule') 둘 다로 시작할 수는 없습니다. 네임스페이스 내에 모듈을 정의하려면 'module SomeModule = ...'을 사용하세요. + + + + A module abbreviation must be a simple name, not a path + 모듈 약어는 경로가 아니라 단순 이름이어야 합니다. + + + + Ignoring attributes on module abbreviation + 모듈 약어의 특성을 무시합니다. + + + + The '{0}' accessibility attribute is not allowed on module abbreviation. Module abbreviations are always private. + '{0}' 액세스 가능성 특성이 모듈 약어에서 허용되지 않습니다. 모듈 약어는 항상 Private입니다. + + + + The '{0}' visibility attribute is not allowed on module abbreviation. Module abbreviations are always private. + '{0}' 표시 유형 특성이 모듈 약어에서 허용되지 않습니다. 모듈 약어는 항상 Private입니다. + + + + Unclosed block + 블록이 닫히지 않았습니다. + + + + Unmatched 'begin' or 'struct' + 'begin' 또는 'struct'의 짝이 맞지 않습니다. + + + + A module name must be a simple name, not a path + 모듈 이름은 경로가 아니라 단순 이름이어야 합니다. + + + + Unexpected empty type moduleDefn list + 예기치 않은 빈 형식 moduleDefn 목록입니다. + + + + Attributes should be placed before 'val' + 특성은 'val' 앞에 배치해야 합니다. + + + + Attributes are not permitted on interface implementations + 특성은 인터페이스 구현에서 허용되지 않습니다. + + + + Syntax error + 구문 오류 + + + + Augmentations are not permitted on delegate type moduleDefns + 확대는 대리자 형식 moduleDefns에서 허용되지 않습니다. + + + + Unmatched 'class', 'interface' or 'struct' + 'class', 'interface' 또는 'struct'의 짝이 맞지 않습니다. + + + + A type definition requires one or more members or other declarations. If you intend to define an empty class, struct or interface, then use 'type ... = class end', 'interface end' or 'struct end'. + 형식 정의에는 하나 이상의 멤버 또는 기타 선언이 필요합니다. 빈 클래스, 구조체 또는 인터페이스를 정의하려는 경우에는 'type ... = class end', 'interface end' 또는 'struct end'를 사용하세요. + + + + Unmatched 'with' or badly formatted 'with' block + 'with'의 짝이 맞지 않거나 'with' 블록의 형식이 잘못되었습니다. + + + + 'get', 'set' or 'get,set' required + 'get', 'set' 또는 'get,set'이 필요합니다. + + + + Only class types may take value arguments + 클래스 형식만 값 인수를 사용할 수 있습니다. + + + + Unmatched 'begin' + 'begin'의 짝이 맞지 않습니다. + + + + Invalid declaration syntax + 선언 구문이 잘못되었습니다. + + + + 'get' and/or 'set' required + 'get' 및/또는 'set'이 필요합니다. + + + + Type annotations on property getters and setters must be given after the 'get()' or 'set(v)', e.g. 'with get() : string = ...' + 속성 getter 및 setter에 대한 형식 주석은 'get()' 또는 'set(v)' 뒤에 지정해야 합니다(예: 'with get() : string = ...'). + + + + A getter property is expected to be a function, e.g. 'get() = ...' or 'get(index) = ...' + getter 속성은 함수여야 합니다(예: 'get() = ...' 또는 'get(index) = ...'). + + + + Multiple accessibilities given for property getter or setter + 속성 getter 또는 setter에 대해 여러 액세스 가능성이 지정되었습니다. + + + + Property setters must be defined using 'set value = ', 'set idx value = ' or 'set (idx1,...,idxN) value = ... ' + 속성 setter는 'set value = ', 'set idx value = ' 또는 'set (idx1,...,idxN) value = ... '를 사용하여 정의해야 합니다. + + + + Interfaces always have the same visibility as the enclosing type + 인터페이스의 표시 유형은 항상 바깥쪽 형식과 같습니다. + + + + Accessibility modifiers are not allowed on this member. Abstract slots always have the same visibility as the enclosing type. + 액세스 가능성 한정자는 이 멤버에서 허용되지 않습니다. 추상 슬롯의 표시 유형은 항상 바깥쪽 형식과 같습니다. + + + + Attributes are not permitted on 'inherit' declarations + 특성은 'inherit' 선언에서 허용되지 않습니다. + + + + Accessibility modifiers are not permitted on an 'inherits' declaration + 액세스 가능성 한정자는 'inherits' 선언에서 허용되지 않습니다. + + + + 'inherit' declarations cannot have 'as' bindings. To access members of the base class when overriding a method, the syntax 'base.SomeMember' may be used; 'base' is a keyword. Remove this 'as' binding. + 'inherit' 선언에는 'as' 바인딩을 지정할 수 없습니다. 메서드를 재정의할 때 기본 클래스의 멤버에 액세스하려면 'base.SomeMember' 구문을 사용할 수 있습니다. 'base'는 키워드입니다. 이 'as' 바인딩을 제거하세요. + + + + Attributes are not allowed here + 특성은 여기에 허용되지 않습니다. + + + + Accessibility modifiers are not permitted in this position for type abbreviations + 액세스 가능성 한정자는 형식 약어에 대해 이 위치에 허용되지 않습니다. + + + + Accessibility modifiers are not permitted in this position for enum types + 액세스 가능성 한정자는 열거형 형식에 대해 이 위치에 허용되지 않습니다. + + + + All enum fields must be given values + 모든 열거형 필드에는 값을 지정해야 합니다. + + + + Accessibility modifiers are not permitted on inline assembly code types + 액세스 가능성 한정자는 인라인 어셈블리 코드 형식에서 허용되지 않습니다. + + + + Unexpected identifier: '{0}' + 예기치 않은 식별자입니다. '{0}' + + + + Accessibility modifiers are not permitted on union cases. Use 'type U = internal ...' or 'type U = private ...' to give an accessibility to the whole representation. + 액세스 가능성 한정자는 공용 구조체 케이스에서 허용되지 않습니다. 표현 전체에 액세스 가능성을 지정하려면 'type U = internal ...' 또는 'type U = private ...'을 사용하세요. + + + + Accessibility modifiers are not permitted on enumeration fields + 액세스 가능성 한정자는 열거형 필드에서 허용되지 않습니다. + + + + Consider using a separate record type instead + 대신 별도의 레코드 형식을 사용하세요. + + + + Accessibility modifiers are not permitted on record fields. Use 'type R = internal ...' or 'type R = private ...' to give an accessibility to the whole representation. + 액세스 가능성 한정자는 레코드 필드에서 허용되지 않습니다. 표현 전체에 액세스 가능성을 지정하려면 'type R = internal ...' 또는 'type R = private ...'을 사용하세요. + + + + The declaration form 'let ... and ...' for non-recursive bindings is not used in F# code. Consider using a sequence of 'let' bindings + 비재귀적 바인딩을 위한 선언 형식 'let ... and ...'는 F# 코드에서 사용되지 않습니다. 대신 'let' 바인딩 시퀀스를 사용하세요. + + + + Unmatched '(' + '('의 짝이 맞지 않습니다. + + + + Successive patterns should be separated by spaces or tupled + 연속된 패턴은 공백으로 구분하거나 튜플해야 합니다. + + + + No matching 'in' found for this 'let' + 이 'let'과 짝이 맞는 'in'을 찾을 수 없습니다. + + + + Error in the return expression for this 'let'. Possible incorrect indentation. + 이 'let'에 대한 반환 식에 오류가 있습니다. 들여쓰기가 잘못되었을 수 있습니다. + + + + The block following this '{0}' is unfinished. Every code block is an expression and must have a result. '{1}' cannot be the final code element in a block. Consider giving this block an explicit result. + 이 '{0}' 뒤에 오는 블록이 완료되지 않았습니다. 모든 코드 블록은 식이며 결과가 있어야 합니다. '{1}'이(가) 블록의 최종 코드 요소가 될 수 없습니다. 이 블록에 명시적 결과를 제공하세요. + + + + Incomplete conditional. Expected 'if <expr> then <expr>' or 'if <expr> then <expr> else <expr>'. + 조건이 잘못되었습니다. 'if <expr> then <expr>' 또는 'if <expr> then <expr> else <expr>'이 필요합니다. + + + + 'assert' may not be used as a first class value. Use 'assert <expr>' instead. + 'assert'는 첫 번째 클래스 값으로 사용할 수 없습니다. 대신 'assert <expr>'을 사용하세요. + + + + Identifier expected + 식별자가 필요합니다. + + + + 'in' or '=' expected + 'in' 또는 '='가 필요합니다. + + + + The use of '->' in sequence and computation expressions is limited to the form 'for pat in expr -> expr'. Use the syntax 'for ... in ... do ... yield...' to generate elements in more complex sequence expressions. + '->'를 시퀀스 및 계산 식에 사용할 때는 'for pat in expr -> expr' 형식을 사용해야 합니다. 'for ... in ... do ... yield...' 구문을 사용하면 보다 복잡한 시퀀스 식에서 요소를 생성할 수 있습니다. + + + + Successive arguments should be separated by spaces or tupled, and arguments involving function or method applications should be parenthesized + 연속된 인수는 공백으로 구분하거나 튜플해야 하며 함수 또는 메서드 적용과 관련된 인수는 괄호로 묶어야 합니다. + + + + Unmatched '[' + '['의 짝이 맞지 않습니다. + + + + Missing qualification after '.' + '.' 뒤에 한정자가 없습니다. + + + + In F# code you may use 'expr.[expr]'. A type annotation may be required to indicate the first expression is an array + F# 코드에서는 'expr.[expr]'을 사용할 수 있습니다. 첫 번째 식이 배열임을 나타내기 위해 형식 주석이 필요할 수 있습니다. + + + + Mismatched quotation, beginning with '{0}' + 짝이 맞지 않는 인용구('{0}'(으)로 시작)입니다. + + + + Unmatched '{0}' + '{0}'의 짝이 맞지 않습니다. + + + + Unmatched '[|' + '[|'의 짝이 맞지 않습니다. + + + + Unmatched '{{' + '{{'의 짝이 맞지 않습니다. + + + + Field bindings must have the form 'id = expr;' + 필드 바인딩의 형식은 'id = expr;'이어야 합니다. + + + + This member is not permitted in an object implementation + 이 멤버는 개체 구현에서 허용되지 않습니다. + + + + Missing function body + 함수 본문이 없습니다. + + + + Syntax error in labelled type argument + 레이블이 지정된 형식 인수에 구문 오류가 있습니다. + + + + Unexpected infix operator in type expression + 형식 식에 예기치 않은 중위 연산자가 있습니다. + + + + The syntax '(typ,...,typ) ident' is not used in F# code. Consider using 'ident<typ,...,typ>' instead + '(typ,...,typ) ident' 구문은 F# 코드에서 사용되지 않습니다. 대신 'ident<typ,...,typ>'를 사용하세요. + + + + Invalid literal in type + 형식의 리터럴이 잘못되었습니다. + + + + Unexpected infix operator in unit-of-measure expression. Legal operators are '*', '/' and '^'. + 측정 단위 식에 예기치 않은 중위 연산자가 있습니다. 올바른 연산자는 '*', '/' 및 '^'입니다. + + + + Unexpected integer literal in unit-of-measure expression + 측정 단위 식에 예기치 않은 정수 리터럴이 있습니다. + + + + Syntax error: unexpected type parameter specification + 구문 오류: 예기치 않은 형식 매개 변수 지정입니다. + + + + Mismatched quotation operator name, beginning with '{0}' + 짝이 맞지 않는 인용구 연산자 이름('{0}'(으)로 시작)입니다. + + + + Active pattern case identifiers must begin with an uppercase letter + 활성 패턴 케이스 식별자는 대문자로 시작해야 합니다. + + + + The '|' character is not permitted in active pattern case identifiers + '|' 문자는 활성 패턴 케이스 식별자에 허용되지 않습니다. + + + + Denominator must not be 0 in unit-of-measure exponent + 측정 단위 지수에서 분모는 0일 수 없습니다. + + + + No '=' symbol should follow a 'namespace' declaration + 'namespace' 선언 뒤에 '=' 기호가 오면 안 됩니다. + + + + The syntax 'module ... = struct .. end' is not used in F# code. Consider using 'module ... = begin .. end' + 'module ... = struct .. end' 구문은 F# 코드에서 사용되지 않습니다. 'module ... = begin .. end'를 사용하세요. + + + + The syntax 'module ... : sig .. end' is not used in F# code. Consider using 'module ... = begin .. end' + 'module ... : sig .. end' 구문은 F# 코드에서 사용되지 않습니다. 'module ... = begin .. end'를 사용하세요. + + + + A static field was used where an instance field is expected + 인스턴스 필드가 필요한데 정적 필드가 사용되었습니다. + + + + Method '{0}' is not accessible from this code location + '{0}' 메서드는 이 코드 위치에서 액세스할 수 없습니다. + + + + Implicit product of measures following / + / 다음의 측정값에 대한 암시적 곱입니다. + + + + Unexpected SynMeasure.Anon + 예기치 않은 SynMeasure.Anon입니다. + + + + Non-zero constants cannot have generic units. For generic zero, write 0.0<_>. + 0이 아닌 상수에는 제네릭 단위를 지정할 수 없습니다. 제네릭 0을 사용하려면 0.0<_>을 작성하세요. + + + + In sequence expressions, results are generated using 'yield' + 시퀀스 식에서는 'yield'를 사용하여 결과가 생성됩니다. + + + + Unexpected big rational constant + 예기치 않은 큰 유리 상수입니다. + + + + Units-of-measure supported only on float, float32, decimal and signed integer types + 측정 단위는 float, float32, decimal 및 부호 있는 정수 형식에 대해서만 지원됩니다. + + + + Unexpected Const_uint16array + 예기치 않은 Const_uint16array입니다. + + + + Unexpected Const_bytearray + 예기치 않은 Const_bytearray입니다. + + + + A parameter with attributes must also be given a name, e.g. '[<Attribute>] Name : Type' + 특성이 지정된 매개 변수에는 이름도 지정해야 합니다(예: '[<Attribute>] Name : Type'). + + + + Return values cannot have names + 반환 값에는 이름을 지정할 수 없습니다. + + + + MemberKind.PropertyGetSet only expected in parse trees + MemberKind.PropertyGetSet은 구문 분석 트리에만 필요합니다. + + + + Namespaces cannot contain values. Consider using a module to hold your value declarations. + 네임스페이스에는 값을 포함할 수 없습니다. 모듈을 사용하여 값 선언을 저장하세요. + + + + Namespaces cannot contain extension members except in the same file and namespace declaration group where the type is defined. Consider using a module to hold declarations of extension members. + 형식이 정의된 것과 같은 파일 및 네임스페이스 선언 그룹을 제외하고 네임스페이스는 확장 멤버를 포함할 수 없습니다. 모듈을 사용하여 확장 멤버의 선언을 저장하세요. + + + + Multiple visibility attributes have been specified for this identifier + 이 식별자에 대해 다중 표시 유형 특성이 지정되었습니다. + + + + Multiple visibility attributes have been specified for this identifier. 'let' bindings in classes are always private, as are any 'let' bindings inside expressions. + 이 식별자에 대해 다중 표시 유형 특성이 지정되었습니다. 클래스의 'let' 바인딩은 식 안의 모든 'let' 바인딩과 마찬가지로 항상 Private입니다. + + + + The name '({0})' 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 '{1}' instead. + 이름 '({0})'은(는) 멤버 이름으로 사용하면 안 됩니다. 형식에 대한 비교 의미 체계를 정의하려면 'System.IComparable' 인터페이스를 구현하세요. 다른 CLI 언어를 통해 사용할 정적 멤버를 정의하는 경우에는 이름 '{1}'을(를) 대신 사용하세요. + + + + The name '({0})' 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 '{1}' instead. + 이름 '({0})'은(는) 멤버 이름으로 사용하면 안 됩니다. 형식에 대한 같음 의미 체계를 정의하려면 'Object.Equals' 멤버를 재정의하세요. 다른 CLI 언어를 통해 사용할 정적 멤버를 정의하는 경우에는 이름 '{1}'을(를) 대신 사용하세요. + + + + The name '({0})' should not be used as a member name. If defining a static member for use from other CLI languages then use the name '{1}' instead. + 이름 '({0})'은(는) 멤버 이름으로 사용하면 안 됩니다. 다른 CLI 언어를 통해 사용할 정적 멤버를 정의하는 경우에는 이름 '{1}'을(를) 대신 사용하세요. + + + + The name '({0})' should not be used as a member name because it is given a standard definition in the F# library over fixed types + 이름 '({0})'에는 고정 형식에 대한 F# 라이브러리의 표준 정의가 지정되어 있으므로 해당 이름을 멤버 이름으로 사용하면 안 됩니다. + + + + The '{0}' operator should not normally be redefined. To define overloaded comparison semantics for a particular type, implement the 'System.IComparable' interface in the definition of that type. + '{0}' 연산자는 일반적으로 다시 정의하면 안 됩니다. 특정 형식에 대한 오버로드된 비교 의미 체계를 정의하려면 해당 형식의 정의에서 'System.IComparable' 인터페이스를 구현하세요. + + + + The '{0}' operator should not normally be redefined. To define equality semantics for a type, override the 'Object.Equals' member in the definition of that type. + '{0}' 연산자는 일반적으로 다시 정의하면 안 됩니다. 형식에 대한 같음 의미 체계를 정의하려면 해당 형식의 정의에서 'Object.Equals' 멤버를 재정의하세요. + + + + The '{0}' operator should not normally be redefined. Consider using a different operator name + '{0}' 연산자는 일반적으로 다시 정의하면 안 됩니다. 다른 연산자 이름을 사용하세요. + + + + The '{0}' operator cannot be redefined. Consider using a different operator name + '{0}' 연산자를 다시 정의할 수 없습니다. 다른 연산자 이름을 사용하세요. + + + + Expected module or namespace parent {0} + 모듈 또는 네임스페이스 부모 {0}이(가) 필요합니다. + + + + The struct, record or union type '{0}' implements the interface 'System.IComparable' explicitly. You must apply the 'CustomComparison' attribute to the type. + 구조체, 레코드 또는 공용 구조체 형식 '{0}'은(는) 'System.IComparable' 인터페이스를 명시적으로 구현합니다. 형식에 'CustomComparison' 특성을 적용해야 합니다. + + + + The struct, record or union type '{0}' implements the interface 'System.IComparable<_>' explicitly. You must apply the 'CustomComparison' attribute to the type, and should also provide a consistent implementation of the non-generic interface System.IComparable. + 구조체, 레코드 또는 공용 구조체 형식 '{0}'은(는) 'System.IComparable<_>' 인터페이스를 명시적으로 구현합니다. 형식에 'CustomComparison' 특성을 적용하고 제네릭이 아닌 인터페이스 System.IComparable에 대한 일관된 구현도 제공해야 합니다. + + + + The struct, record or union type '{0}' implements the interface 'System.IStructuralComparable' explicitly. Apply the 'CustomComparison' attribute to the type. + 구조체, 레코드 또는 공용 구조체 형식 '{0}'은(는) 'System.IStructuralComparable' 인터페이스를 명시적으로 구현합니다. 형식에 'CustomComparison' 특성을 적용하세요. + + + + This record contains fields from inconsistent types + 이 레코드에는 일관성이 없는 형식의 필드가 포함되어 있습니다. + + + + DLLImport stubs cannot be inlined + DLLImport 스텁은 인라인할 수 없습니다. + + + + Structs may only bind a 'this' parameter at member declarations + 구조체는 멤버 선언에서만 'this' 매개 변수를 바인딩할 수 있습니다. + + + + Unexpected expression at recursive inference point + 재귀적 유추 지점에 예기치 않은 식이 있습니다. + + + + This code is less generic than required by its annotations because the explicit type variable '{0}' could not be generalized. It was constrained to be '{1}'. + 명시적 형식 변수 '{0}'을(를) 일반화할 수 없으므로 이 코드는 해당 주석에 필요한 것보다 일반적이지 않습니다. 해당 변수는 '{1}'(으)로 제한되었습니다. + + + + One or more of the explicit class or function type variables for this binding could not be generalized, because they were constrained to other types + 이 바인딩에 대한 하나 이상의 명시적 클래스 또는 함수 형식 변수가 다른 형식의 제약을 받으므로 해당 변수를 일반화할 수 없습니다. + + + + A generic type parameter has been used in a way that constrains it to always be '{0}' + 제네릭 형식 매개 변수가 항상 '{0}'이(가) 되도록 제한하는 방식으로 해당 매개 변수가 사용되었습니다. + + + + This type parameter has been used in a way that constrains it to always be '{0}' + 이 형식 매개 변수가 항상 '{0}'이(가) 되도록 제한하는 방식으로 해당 매개 변수가 사용되었습니다. + + + + The type parameters inferred for this value are not stable under the erasure of type abbreviations. This is due to the use of type abbreviations which drop or reorder type parameters, e.g. \n\ttype taggedInt<'a> = int or\n\ttype swap<'a,'b> = 'b * 'a.\nConsider declaring the type parameters for this value explicitly, e.g.\n\tlet f<'a,'b> ((x,y) : swap<'b,'a>) : swap<'a,'b> = (y,x). + 이 값에 대해 유추된 형식 매개 변수는 형식 약어를 지울 경우 불안정적인 상태가 됩니다. 이는 형식 매개 변수를 삭제 또는 다시 정렬하는 형식 약어를 사용했기 때문입니다(예: \n\ttype taggedInt<'a> = int 또는 \n\ttype swap<'a,'b> = 'b * 'a).\n이 값에 대한 형식 매개 변수를 명시적으로 선언하십시오(예: \n\tlet f<'a,'b> ((x,y) : swap<'b,'a>) : swap<'a,'b> = (y,x)). + + + + Explicit type parameters may only be used on module or member bindings + 명시적 형식 매개 변수는 모듈 또는 멤버 바인딩에 대해서만 사용할 수 있습니다. + + + + You must explicitly declare either all or no type parameters when overriding a generic abstract method + 제네릭 추상 메서드를 재정의할 때는 모든 형식 매개 변수를 명시적으로 선언하거나 형식 매개 변수를 선언하지 않아야 합니다. + + + + The field labels and expected type of this record expression or pattern do not uniquely determine a corresponding record type + 이 레코드 식 또는 패턴의 필요한 형식 및 필드 레이블이 해당하는 레코드 형식을 고유하게 확인하지 않습니다. + + + + The field '{0}' appears twice in this record expression or pattern + '{0}' 필드가 이 레코드 식 또는 패턴에 두 번 나타납니다. + + + + Unknown union case + 알 수 없는 공용 구조체 케이스입니다. + + + + This code is not sufficiently generic. The type variable {0} could not be generalized because it would escape its scope. + 이 코드는 충분히 일반적이지 않습니다. 형식 변수 {0}을(를) 일반화하면 범위를 벗어나게 되므로 일반화할 수 없습니다. + + + + A property cannot have explicit type parameters. Consider using a method instead. + 속성에는 명시적 형식 매개 변수를 지정할 수 없습니다. 대신 메서드를 사용하세요. + + + + A constructor cannot have explicit type parameters. Consider using a static construction method instead. + 생성자에는 명시적 형식 매개 변수를 지정할 수 없습니다. 대신 정적 생성 메서드를 사용하세요. + + + + This instance member needs a parameter to represent the object being invoked. Make the member static or use the notation 'member x.Member(args) = ...'. + 이 인스턴스 멤버에는 호출하는 개체를 나타내는 매개 변수가 필요합니다. 멤버를 정적 요소로 만들거나 'member x.Member(args) = ...' 표기법을 사용하세요. + + + + Unexpected source-level property specification in syntax tree + 구문 트리에 예기치 않은 소스 수준 속성 지정이 있습니다. + + + + A static initializer requires an argument + 정적 이니셜라이저를 사용하려면 인수가 필요합니다. + + + + An object constructor requires an argument + 개체 생성자를 사용하려면 인수가 필요합니다. + + + + This static member should not have a 'this' parameter. Consider using the notation 'member Member(args) = ...'. + 이 정적 멤버에는 'this' 매개 변수가 있으면 안 됩니다. 'member Member(args) = ...' 표기법을 사용하세요. + + + + An explicit static initializer should use the syntax 'static new(args) = expr' + 명시적 정적 이니셜라이저는 'static new(args) = expr' 구문을 사용해야 합니다. + + + + An explicit object constructor should use the syntax 'new(args) = expr' + 명시적 개체 생성자는 'new(args) = expr' 구문을 사용해야 합니다. + + + + Unexpected source-level property specification + 예기치 않은 소스 수준 속성 지정입니다. + + + + This form of object expression is not used in F#. Use 'member this.MemberName ... = ...' to define member implementations in object expressions. + 이러한 형식의 개체 식은 F#에서 사용되지 않습니다. 'member this.MemberName ... = ...'을 사용하여 개체 식에 멤버 구현을 정의하세요. + + + + Invalid declaration + 선언이 잘못되었습니다. + + + + Attributes are not allowed within patterns + 특성은 패턴 내에서 허용되지 않습니다. + + + + The generic function '{0}' must be given explicit type argument(s) + 제네릭 함수 '{0}'에는 명시적 형식 인수를 지정해야 합니다. + + + + The method or function '{0}' should not be given explicit type argument(s) because it does not declare its type parameters explicitly + '{0}' 메서드 또는 함수는 해당 형식 매개 변수를 명시적으로 선언하지 않으므로 이 함수에 명시적 형식 인수를 지정하면 안 됩니다. + + + + This value, type or method expects {0} type parameter(s) but was given {1} + 이 값, 형식 또는 메서드에는 {0}개의 형식 매개 변수가 필요한데 {1}개를 받았습니다. + + + + The default, zero-initializing constructor of a struct type may only be used if all the fields of the struct type admit default initialization + 구조체 형식의 기본 0 초기화 생성자는 구조체 형식의 모든 필드가 기본 초기화를 허용하는 경우에만 사용할 수 있습니다. + + + + Couldn't find Dispose on IDisposable, or it was overloaded + IDisposable에서 Dispose를 찾을 수 없거나 Dispose가 오버로드되었습니다. + + + + This value is not a literal and cannot be used in a pattern + 이 값은 리터럴이 아니며 패턴에 사용할 수 없습니다. + + + + This field is readonly + 이 필드는 읽기 전용입니다. + + + + Named arguments must appear after all other arguments + 명명된 인수는 다른 모든 인수 뒤에 나타나야 합니다. + + + + This function value is being used to construct a delegate type whose signature includes a byref argument. You must use an explicit lambda expression taking {0} arguments. + 이 함수 값은 시그니처에 byref 인수가 포함된 대리자 형식을 생성하는 데 사용되고 있습니다. {0}개의 인수를 사용하는 명시적 람다 식을 사용해야 합니다. + + + + The type '{0}' is not a type whose values can be enumerated with this syntax, i.e. is not compatible with either seq<_>, IEnumerable<_> or IEnumerable and does not have a GetEnumerator method + '{0}' 형식은 이 구문을 사용하여 열거할 수 있는 값을 포함하는 형식이 아닙니다. 즉, seq<_>, IEnumerable<_> 또는 IEnumerable과 호환되지 않으며 GetEnumerator 메서드를 가지지 않습니다. + + + + This recursive binding uses an invalid mixture of recursive forms + 이 재귀적 바인딩은 잘못된 재귀적 형식 조합을 사용합니다. + + + + This is not a valid object construction expression. Explicit object constructors must either call an alternate constructor or initialize all fields of the object and specify a call to a super class constructor. + 올바른 개체 생성 식이 아닙니다. 명시적 개체 생성자에서는 대체 생성자를 호출하거나 개체의 모든 필드를 초기화한 후 상위 클래스 생성자에 대한 호출을 지정해야 합니다. + + + + Invalid constraint + 제약 조건이 잘못되었습니다. + + + + Invalid constraint: the type used for the constraint is sealed, which means the constraint could only be satisfied by at most one solution + 제약 조건이 잘못되었습니다. 제약 조건에 사용된 형식이 봉인되었습니다. 즉, 최대 하나의 솔루션을 통해서만 해당 제약 조건을 만족시킬 수 있습니다. + + + + An 'enum' constraint must be of the form 'enum<type>' + 'enum' 제약 조건의 형식은 'enum<type>'이어야 합니다. + + + + 'new' constraints must take one argument of type 'unit' and return the constructed type + 'new' 제약 조건은 'unit' 형식의 인수 하나를 사용하고 생성된 형식을 반환해야 합니다. + + + + This property has an invalid type. Properties taking multiple indexer arguments should have types of the form 'ty1 * ty2 -> ty3'. Properties returning functions should have types of the form '(ty1 -> ty2)'. + 이 속성에는 잘못된 형식이 있습니다. 다중 인덱서 인수를 사용하는 속성에는 'ty1 * ty2 -> ty3'과 같은 형식이 있어야 합니다. 함수를 반환하는 속성에는 '(ty1 -> ty2)'와 같은 형식이 있어야 합니다. + + + + Expected unit-of-measure parameter, not type parameter. Explicit unit-of-measure parameters must be marked with the [<Measure>] attribute. + 형식 매개 변수가 아니라 측정 단위 매개 변수가 필요합니다. 명시적 측정 단위 매개 변수는 [<Measure>] 특성으로 표시해야 합니다. + + + + Expected type parameter, not unit-of-measure parameter + 측정 단위 매개 변수가 아니라 형식 매개 변수가 필요합니다. + + + + Expected type, not unit-of-measure + 측정 단위가 아니라 형식이 필요합니다. + + + + Expected unit-of-measure, not type + 형식이 아니라 측정 단위가 필요합니다. + + + + Units-of-measure cannot be used as prefix arguments to a type. Rewrite as postfix arguments in angle brackets. + 측정 단위는 형식에 대한 접두사 인수로 사용할 수 없습니다. 꺾쇠 괄호 안에 후위 인수로 다시 작성하세요. + + + + Unit-of-measure cannot be used in type constructor application + 측정 단위는 형식 생성자 적용 시 사용할 수 없습니다. + + + + This control construct may only be used if the computation expression builder defines a '{0}' method + 계산 식 작성기가 '{0}' 메서드를 정의하는 경우에만 이 제어 구문을 사용할 수 있습니다. + + + + This type has no nested types + 이 형식에는 중첩 형식이 없습니다. + + + + Unexpected {0} in type expression + 형식 식에 예기치 않은 {0}이(가) 있습니다. + + + + Type parameter cannot be used as type constructor + 형식 매개 변수는 형식 생성자로 사용할 수 없습니다. + + + + Illegal syntax in type expression + 형식 식의 구문이 잘못되었습니다. + + + + Anonymous unit-of-measure cannot be nested inside another unit-of-measure expression + 익명 측정 단위는 다른 측정 단위 식 내에 중첩할 수 없습니다. + + + + Anonymous type variables are not permitted in this declaration + 익명 형식 변수는 이 선언에서 허용되지 않습니다. + + + + Unexpected / in type + 형식에 예기치 않은 /가 있습니다. + + + + Unexpected type arguments + 예기치 않은 형식 인수입니다. + + + + Optional arguments are only permitted on type members + 선택적 인수는 형식 멤버에 대해서만 허용됩니다. + + + + Name '{0}' not bound in pattern context + 이름 '{0}'은(는) 패턴 컨텍스트에 바인딩되지 않았습니다. + + + + Non-primitive numeric literal constants cannot be used in pattern matches because they can be mapped to multiple different types through the use of a NumericLiteral module. Consider using replacing with a variable, and use 'when <variable> = <constant>' at the end of the match clause. + 기본 형식이 아닌 숫자 리터럴 상수는 NumericLiteral 모듈을 사용하여 다양한 형식에 매핑될 수 있으므로 패턴 일치에 사용할 수 없습니다. 변수로 바꾸고 일치 절의 끝에 'when <variable> = <constant>'를 사용하세요. + + + + Type arguments cannot be specified here + 형식 인수는 여기에 지정할 수 없습니다. + + + + Only active patterns returning exactly one result may accept arguments + 하나의 결과를 반환하는 활성 패턴만 인수를 사용할 수 있습니다. + + + + Invalid argument to parameterized pattern label + 매개 변수가 있는 패턴 레이블에 대한 인수가 잘못되었습니다. + + + + Internal error. Invalid index into active pattern array + 내부 오류입니다. 활성 패턴 배열에 대한 인덱스가 잘못되었습니다. + + + + This union case does not take arguments + 이 공용 구조체 케이스는 인수를 사용하지 않습니다. + + + + This union case takes one argument + 이 공용 구조체 케이스는 하나의 인수를 사용합니다. + + + + This union case expects {0} arguments in tupled form + 이 공용 구조체 케이스에는 튜플된 형식의 인수 {0}개가 필요합니다. + + + + Field '{0}' is not static + '{0}'은(는) 정적 필드가 아닙니다. + + + + This field is not a literal and cannot be used in a pattern + 이는 리터럴 필드가 아니며 패턴에 사용할 수 없습니다. + + + + This is not a variable, constant, active recognizer or literal + 변수, 상수, 활성 인식기 또는 리터럴이 아닙니다. + + + + This is not a valid pattern + 올바른 패턴이 아닙니다. + + + + Character range matches have been removed in F#. Consider using a 'when' pattern guard instead. + 문자 범위 일치는 F#에서 제거되었습니다. 대신 'when' 패턴 가드를 사용하세요. + + + + Illegal pattern + 패턴이 잘못되었습니다. + + + + Syntax error - unexpected '?' symbol + 구문 오류 - 예기치 않은 '?' 기호입니다. + + + + Expected {0} expressions, got {1} + {0}개의 식이 필요한데 {1}개를 받았습니다. + + + + TcExprUndelayed: delayed + TcExprUndelayed: 지연되었습니다. + + + + This expression form may only be used in sequence and computation expressions + 이 식 형식은 시퀀스 및 계산 식에만 사용할 수 있습니다. + + + + Invalid object expression. Objects without overrides or interfaces should use the expression form 'new Type(args)' without braces. + 개체 식이 잘못되었습니다. 재정의 또는 인터페이스가 없는 개체는 중괄호 없이 식 형식 'new Type(args)'을 사용해야 합니다. + + + + Invalid object, sequence or record expression + 개체, 시퀀스 또는 레코드 식이 잘못되었습니다. + + + + Invalid record, sequence or computation expression. Sequence expressions should be of the form 'seq {{ ... }}' + 레코드, 시퀀스 또는 계산 식이 잘못되었습니다. 시퀀스 식의 형식은 'seq {{ ... }}'여야 합니다. + + + + This list or array expression includes an element of the form 'if ... then ... else'. Parenthesize this expression to indicate it is an individual element of the list or array, to disambiguate this from a list generated using a sequence expression + 이 목록 또는 배열 식에는 'if ... then ... else' 형식의 요소가 포함되어 있습니다. 식이 목록 또는 배열의 개별 요소임을 나타내고 이를 시퀀스 식을 사용하여 생성된 목록과 구분하려면 이 식을 괄호로 묶으세요. + + + + Unable to parse format string '{0}' + 서식 문자열 '{0}'을(를) 구문 분석할 수 없습니다. + + + + This list expression exceeds the maximum size for list literals. Use an array for larger literals and call Array.ToList. + 이 목록 식은 목록 리터럴의 최대 크기를 초과합니다. 보다 큰 리터럴을 위한 배열을 사용하고 Array.ToList를 호출하세요. + + + + The expression form 'expr then expr' may only be used as part of an explicit object constructor + 식 형식 'expr then expr'은 명시적 개체 생성자의 일부로만 사용할 수 있습니다. + + + + Named arguments cannot be given to member trait calls + 명명된 인수는 멤버 특성 호출에 지정할 수 없습니다. + + + + This is not a valid name for an enumeration case + 열거형 케이스에 대한 올바른 이름이 아닙니다. + + + + This field is not mutable + 이 필드는 변경할 수 없습니다. + + + + This construct may only be used within list, array and sequence expressions, e.g. expressions of the form 'seq {{ ... }}', '[ ... ]' or '[| ... |]'. These use the syntax 'for ... in ... do ... yield...' to generate elements + 이 생성자는 목록, 배열 및 시퀀스 식 내에서만 사용할 수 있습니다(예: 'seq {{ ... }}', '[ ... ]' 또는 '[| ... |]' 형식의 식). 이러한 식은 'for ... in ... do ... yield...' 구문을 사용하여 요소를 생성합니다. + + + + This construct may only be used within computation expressions. To return a value from an ordinary function simply write the expression without 'return'. + 이 생성자는 계산 식 내에서만 사용할 수 있습니다. 일반 함수에서 값을 반환하려면 단순히 'return' 없이 식을 작성하세요. + + + + This construct may only be used within sequence or computation expressions + 이 생성자는 시퀀스 또는 계산 식 내에서만 사용할 수 있습니다. + + + + This construct may only be used within computation expressions + 이 생성자는 계산 식 내에서만 사용할 수 있습니다. + + + + Invalid indexer expression + 인덱서 식이 잘못되었습니다. + + + + The operator 'expr.[idx]' has been used on an object of indeterminate type based on information prior to this program point. Consider adding further type constraints + 'expr.[idx]' 연산자가 이 프로그램 지점 전의 정보를 기반으로 하는 확인할 수 없는 형식의 개체에 사용되었습니다. 형식 제약 조건을 더 추가해 보세요. + + + + Cannot inherit from a variable type + 변수 형식에서 상속할 수 없습니다. + + + + Calls to object constructors on type parameters cannot be given arguments + 형식 매개 변수의 개체 생성자에 대한 호출에는 인수를 지정할 수 없습니다. + + + + The 'CompiledName' attribute cannot be used with this language element + 'CompiledName' 특성은 이 언어 요소에 사용할 수 없습니다. + + + + '{0}' may only be used with named types + '{0}'은(는) 명명된 형식에만 사용할 수 있습니다. + + + + 'inherit' cannot be used on interface types. Consider implementing the interface by using 'interface ... with ... end' instead. + 'inherit'은 인터페이스 형식에 대해 사용할 수 없습니다. 대신 'interface ... with ... end'를 사용하여 인터페이스를 구현하세요. + + + + 'new' cannot be used on interface types. Consider using an object expression '{{ new ... with ... }}' instead. + 'new'는 인터페이스 형식에 대해 사용할 수 없습니다. 대신 개체 식 '{{ new ... with ... }}'를 사용하세요. + + + + Instances of this type cannot be created since it has been marked abstract or not all methods have been given implementations. Consider using an object expression '{{ new ... with ... }}' instead. + 이 형식의 인스턴스가 abstract로 표시되었거나 메서드 중 일부에 구현이 지정되지 않았으므로 해당 인스턴스를 만들 수 없습니다. 대신 개체 식 '{{ new ... with ... }}'를 사용하세요. + + + + It is recommended that objects supporting the IDisposable interface are created using the syntax 'new Type(args)', rather than 'Type(args)' or 'Type' as a function value representing the constructor, to indicate that resources may be owned by the generated value + IDisposable 인터페이스를 지원하는 개체는 생성 값이 리소스를 소유할 수도 있다는 것을 표시하기 위해 생성자를 나타내는 함수 값으로 'Type(args)' 또는 'Type'이 아니라 'new Type(args)' 구문을 사용하여 만드는 것이 좋습니다. + + + + '{0}' may only be used to construct object types + '{0}'은(는) 개체 형식을 생성하는 데에만 사용할 수 있습니다. + + + + Constructors for the type '{0}' must directly or indirectly call its implicit object constructor. Use a call to the implicit object constructor instead of a record expression. + '{0}' 형식에 대한 생성자는 직접 또는 간접적으로 해당 암시적 개체 생성자를 호출해야 합니다. 레코드 식 대신 암시적 개체 생성자에 대한 호출을 사용하세요. + + + + The field '{0}' has been given a value, but is not present in the type '{1}' + {0}' 필드에 값이 지정되었지만 해당 필드가 '{1}' 형식에 없습니다. + + + + No assignment given for field '{0}' of type '{1}' + {1}' 형식의 '{0}' 필드에 대해 지정된 할당이 없습니다. + + + + Extraneous fields have been given values + 잘못 사용된 필드에 값이 지정되었습니다. + + + + Only overrides of abstract and virtual members may be specified in object expressions + 추상 및 가상 멤버의 재정의만 개체 식에 지정할 수 있습니다. + + + + The member '{0}' does not correspond to any abstract or virtual method available to override or implement. + '{0}' 멤버는 재정의 또는 구현할 수 있는 어떠한 추상 또는 가상 메서드에도 해당하지 않습니다. + + + + The type {0} contains the member '{1}' but it is not a virtual or abstract method that is available to override or implement. + {0} 형식에 '{1}' 멤버가 포함되어 있지만 이 멤버는 재정의 또는 구현할 수 있는 가상 또는 추상 메서드가 아닙니다. + + + + The member '{0}' does not accept the correct number of arguments. {1} argument(s) are expected, but {2} were given. The required signature is '{3}'.{4} + {0}' 멤버가 올바른 수의 인수를 적용하지 않습니다. {1}개의 인수가 필요하지만 {2}개 지정되었습니다. 필요한 시그니처는 '{3}'입니다.{4} + + + + The member '{0}' does not accept the correct number of arguments. One overload accepts {1} arguments, but {2} were given. The required signature is '{3}'.{4} + {0}' 멤버가 올바른 수의 인수를 받지 못했습니다. 하나의 오버로드는 {1}개의 인수를 받지만 {2}개가 주어졌습니다. 필요한 시그니처는 '{3}'입니다.{4} + + + + A simple method name is required here + 단순 메서드 이름이 여기에 필요합니다. + + + + The types System.ValueType, System.Enum, System.Delegate, System.MulticastDelegate and System.Array cannot be used as super types in an object expression or class + System.ValueType, System.Enum, System.Delegate, System.MulticastDelegate 및 System.Array 형식은 개체 식 또는 클래스에서 상위 형식으로 사용할 수 없습니다. + + + + 'new' must be used with a named type + 'new'는 명명된 형식에 사용해야 합니다. + + + + Cannot create an extension of a sealed type + 봉인된 형식의 확장을 만들 수 없습니다. + + + + No arguments may be given when constructing a record value + 레코드 값을 생성할 때는 인수를 지정할 수 없습니다. + + + + Interface implementations cannot be given on construction expressions + 인터페이스 구현은 생성 식에서 지정할 수 없습니다. + + + + Object construction expressions may only be used to implement constructors in class types + 개체 생성 식은 클래스 형식의 생성자를 구현하는 데에만 사용할 수 있습니다. + + + + Only simple bindings of the form 'id = expr' can be used in construction expressions + 'id = expr' 형식의 단순 바인딩만 생성 식에 사용할 수 있습니다. + + + + Objects must be initialized by an object construction expression that calls an inherited object constructor and assigns a value to each field + 개체는 상속된 개체 생성자를 호출하고 각 필드에 값을 할당하는 개체 생성 식으로 초기화해야 합니다. + + + + Expected an interface type + 인터페이스 형식이 필요합니다. + + + + Constructor expressions for interfaces do not take arguments + 인터페이스에 대한 생성자 식에는 인수가 사용되지 않습니다. + + + + This object constructor requires arguments + 이 개체 생성자에는 인수가 필요합니다. + + + + 'new' may only be used with object constructors + 'new'는 개체 생성자에만 사용할 수 있습니다. + + + + At least one override did not correctly implement its corresponding abstract member + 하나 이상의 재정의가 해당하는 추상 멤버를 올바르게 구현하지 않았습니다. + + + + This numeric literal requires that a module '{0}' defining functions FromZero, FromOne, FromInt32, FromInt64 and FromString be in scope + 이 숫자 리터럴을 사용하려면 FromZero, FromOne, FromInt32, FromInt64 및 FromString 함수를 정의하는 '{0}' 모듈이 범위 내에 있어야 합니다. + + + + Invalid record construction + 레코드 생성이 잘못되었습니다. + + + + The expression form {{ expr with ... }} may only be used with record types. To build object types use {{ new Type(...) with ... }} + 식 형식 {{ expr with ... }}는 레코드 형식에만 사용할 수 있습니다. 개체 형식을 빌드하려면 {{ new Type(...) with ... }}를 사용하세요. + + + + The inherited type is not an object model type + 상속된 형식이 개체 모델 형식이 아닙니다. + + + + Object construction expressions (i.e. record expressions with inheritance specifications) may only be used to implement constructors in object model types. Use 'new ObjectType(args)' to construct instances of object model types outside of constructors + 개체 생성 식, 즉 상속 지정이 있는 레코드 식은 개체 모델 형식의 생성자를 구현하는 데에만 사용할 수 있습니다. 'new ObjectType(args)'을 사용하여 생성자 외부에 개체 모델 형식의 인스턴스를 생성하세요. + + + + '{{ }}' is not a valid expression. Records must include at least one field. Empty sequences are specified by using Seq.empty or an empty list '[]'. + '{{ }}'는 유효한 식이 아닙니다. 레코드에는 하나 이상의 필드를 포함해야 합니다. 빈 시퀀스는 Seq.empty 또는 빈 목록 '[]'를 사용하여 지정합니다. + + + + This type is not a record type. Values of class and struct types must be created using calls to object constructors. + 이 형식은 레코드 형식이 아닙니다. 클래스 및 구조체 형식의 값은 개체 생성자에 대한 호출을 사용하여 만들어야 합니다. + + + + This type is not a record type + 이 형식은 레코드 형식이 아닙니다. + + + + This construct is ambiguous as part of a computation expression. Nested expressions may be written using 'let _ = (...)' and nested computations using 'let! res = builder {{ ... }}'. + 이 구문은 계산 식의 일부로서 모호합니다. 중첩 식은 'let _ = (...)', 중첩 계산은 'let! res = builder {{ ... }}'를 사용하여 작성할 수 있습니다. + + + + This construct is ambiguous as part of a sequence expression. Nested expressions may be written using 'let _ = (...)' and nested sequences using 'yield! seq {{... }}'. + 이 구문은 시퀀스 식의 일부로서 모호합니다. 중첩 식은 'let _ = (...)', 중첩 시퀀스는 'yield! seq {{... }}'를 사용하여 작성할 수 있습니다. + + + + 'do!' cannot be used within sequence expressions + 'do!'는 시퀀스 식 내에 사용할 수 없습니다. + + + + The use of 'let! x = coll' in sequence expressions is not permitted. Use 'for x in coll' instead. + 'let! x = coll'은 시퀀스 식에 사용할 수 없습니다. 대신 'for x in coll'을 사용하세요. + + + + 'try'/'with' cannot be used within sequence expressions + 'try'/'with'는 시퀀스 식 내에 사용할 수 없습니다. + + + + In sequence expressions, multiple results are generated using 'yield!' + 시퀀스 식에서는 'yield!'를 사용하여 다중 결과가 생성됩니다. + + + + Invalid assignment + 할당이 잘못되었습니다. + + + + Invalid use of a type name + 형식 이름을 잘못 사용했습니다. + + + + This type has no accessible object constructors + 이 형식에는 액세스 가능한 개체 생성자가 없습니다. + + + + Invalid use of an interface type + 인터페이스 형식을 잘못 사용했습니다. + + + + Invalid use of a delegate constructor. Use the syntax 'new Type(args)' or just 'Type(args)'. + 대리 생성자를 잘못 사용했습니다. 'new Type(args)' 구문을 사용하거나 'Type(args)'만 사용하세요. + + + + Property '{0}' is not static + '{0}'은(는) 정적 속성이 아닙니다. + + + + Property '{0}' is not readable + '{0}' 속성은 읽을 수 없습니다. + + + + This lookup cannot be used here + 이 조회는 여기에 사용할 수 없습니다. + + + + Property '{0}' is static + '{0}'은(는) 정적 속성입니다. + + + + Property '{0}' cannot be set + '{0}' 속성은 설정할 수 없습니다. + + + + Constructors must be applied to arguments and cannot be used as first-class values. If necessary use an anonymous function '(fun arg1 ... argN -> new Type(arg1,...,argN))'. + 생성자는 인수에 적용해야 하며 첫 번째 클래스 값으로 사용할 수 없습니다. 필요한 경우 익명 함수 '(fun arg1 ... argN -> new Type(arg1,...,argN))'을 사용하세요. + + + + The syntax 'expr.id' may only be used with record labels, properties and fields + 'expr.id' 구문은 레코드 레이블, 속성 및 필드에만 사용할 수 있습니다. + + + + Event '{0}' is static + '{0}'은(는) 정적 이벤트입니다. + + + + Event '{0}' is not static + '{0}'은(는) 정적 이벤트가 아닙니다. + + + + The named argument '{0}' did not match any argument or mutable property + 명명된 인수 '{0}'이(가) 어떠한 인수 또는 변경할 수 있는 속성과도 일치하지 않습니다. + + + + One or more of the overloads of this method has curried arguments. Consider redesigning these members to take arguments in tupled form. + 이 메서드에 대한 하나 이상의 오버로드에 커리된 인수가 있습니다. 튜플된 형식의 인수를 사용하려면 이러한 멤버를 다시 디자인하세요. + + + + The unnamed arguments do not form a prefix of the arguments of the method called + 명명되지 않은 인수는 호출된 메서드의 인수에 대한 접두사를 형성하지 않습니다. + + + + Static optimization conditionals are only for use within the F# library + 정적 최적화 조건은 F# 라이브러리 내에서만 사용해야 합니다. + + + + The corresponding formal argument is not optional + 해당하는 형식 인수는 필수입니다. + + + + Invalid optional assignment to a property or field + 속성 또는 필드에 대한 선택적 할당이 잘못되었습니다. + + + + A delegate constructor must be passed a single function value + 대리 생성자에는 단일 함수 값을 전달해야 합니다. + + + + A binding cannot be marked both 'use' and 'rec' + 바인딩을 'use'와 'rec' 모두로 표시할 수 없습니다. + + + + The 'VolatileField' attribute may only be used on 'let' bindings in classes + 'VolatileField' 특성은 클래스의 'let' 바인딩에 대해서만 사용할 수 있습니다. + + + + Attributes are not permitted on 'let' bindings in expressions + 특성은 식의 'let' 바인딩에서 허용되지 않습니다. + + + + The 'DefaultValue' attribute may only be used on 'val' declarations + 'DefaultValue' 특성은 'val' 선언에 대해서만 사용할 수 있습니다. + + + + The 'ConditionalAttribute' attribute may only be used on members + 'ConditionalAttribute' 특성은 멤버에 대해서만 사용할 수 있습니다. + + + + This is not a valid name for an active pattern + 활성 패턴에 대한 올바른 이름이 아닙니다. + + + + The 'EntryPointAttribute' attribute may only be used on function definitions in modules + 'EntryPointAttribute' 특성은 모듈의 함수 정의에 대해서만 사용할 수 있습니다. + + + + Mutable values cannot be marked 'inline' + 변경할 수 있는 값은 'inline'으로 표시할 수 없습니다. + + + + Mutable values cannot have generic parameters + 변경할 수 있는 값에는 제네릭 매개 변수를 지정할 수 없습니다. + + + + Mutable function values should be written 'let mutable f = (fun args -> ...)' + 변경할 수 있는 함수 값은 'let mutable f = (fun args -> ...)'로 작성해야 합니다. + + + + Only functions may be marked 'inline' + 함수만 'inline'으로 표시할 수 있습니다. + + + + A literal value cannot be given the [<ThreadStatic>] or [<ContextStatic>] attributes + 리터럴 값에는 [<ThreadStatic>] 또는 [<ContextStatic>] 특성을 지정할 수 없습니다. + + + + A literal value cannot be marked 'mutable' + 리터럴 값은 'mutable'로 표시할 수 없습니다. + + + + A literal value cannot be marked 'inline' + 리터럴 값은 'inline'으로 표시할 수 없습니다. + + + + Literal values cannot have generic parameters + 리터럴 값에는 제네릭 매개 변수를 지정할 수 없습니다. + + + + This is not a valid constant expression + 올바른 상수 식이 아닙니다. + + + + This type is not accessible from this code location + 이 형식은 이 코드 위치에서 액세스할 수 없습니다. + + + + Unexpected condition in imported assembly: failed to decode AttributeUsage attribute + 가져온 어셈블리에 예기치 않은 상황이 발생했습니다. AttributeUsage 특성을 디코딩하지 못했습니다. + + + + Unrecognized attribute target. Valid attribute targets are 'assembly', 'module', 'type', 'method', 'property', 'return', 'param', 'field', 'event', 'constructor'. + 인식할 수 없는 특성 대상입니다. 올바른 특성 대상은 'assembly', 'module', 'type', 'method', 'property', 'return', 'param', 'field', 'event', 'constructor'입니다. + + + + This attribute is not valid for use on this language element. Assembly attributes should be attached to a 'do ()' declaration, if necessary within an F# module. + 이 특성은 이 언어 요소에 사용할 수 없습니다. 어셈블리 특성은 필요한 경우 F# 모듈 내에서 'do ()' 선언에 연결해야 합니다. + + + + This attribute is not valid for use on this language element + 이 특성은 이 언어 요소에 사용할 수 없습니다. + + + + Optional arguments cannot be used in custom attributes + 선택적 인수는 사용자 지정 특성에 사용할 수 없습니다. + + + + This property cannot be set + 이 속성은 설정할 수 없습니다. + + + + This property or field was not found on this custom attribute type + 이 속성 또는 필드를 이 사용자 지정 특성 형식에서 찾을 수 없습니다. + + + + A custom attribute must be a reference type + 사용자 지정 특성은 참조 형식이어야 합니다. + + + + The number of args for a custom attribute does not match the expected number of args for the attribute constructor + 사용자 지정 특성에 대한 인수 수가 특성 생성자에 필요한 인수 수와 일치하지 않습니다. + + + + A custom attribute must invoke an object constructor + 사용자 지정 특성은 개체 생성자를 호출해야 합니다. + + + + Attribute expressions must be calls to object constructors + 특성 식은 개체 생성자에 대한 호출이어야 합니다. + + + + This attribute cannot be used in this version of F# + 이 특성은 이 버전의 F#에서 사용할 수 없습니다. + + + + Invalid inline specification + 인라인 지정이 잘못되었습니다. + + + + 'use' bindings must be of the form 'use <var> = <expr>' + 'use' 바인딩의 형식은 'use <var> = <expr>'이어야 합니다. + + + + Abstract members are not permitted in an augmentation - they must be defined as part of the type itself + 추상 멤버는 확대에서 허용되지 않으며 형식 자체의 일부로 정의해야 합니다. + + + + Method overrides and interface implementations are not permitted here + 메서드 재정의 및 인터페이스 구현은 여기에 허용되지 않습니다. + + + + No abstract or interface member was found that corresponds to this override + 이 재정의에 해당하는 추상 또는 인터페이스 멤버를 찾을 수 없습니다. + + + + This override takes a different number of arguments to the corresponding abstract member. The following abstract members were found:{0} + 이 재정의는 해당하는 추상 멤버와 다른 수의 인수를 사용합니다. 다음 추상 멤버를 찾았습니다. {0} + + + + This method already has a default implementation + 이 메서드에 이미 기본 구현이 있습니다. + + + + The method implemented by this default is ambiguous + 이 기본값으로 구현된 메서드가 모호합니다. + + + + No abstract property was found that corresponds to this override + 이 재정의에 해당하는 추상 속성을 찾을 수 없습니다. + + + + This property overrides or implements an abstract property but the abstract property doesn't have a corresponding {0} + 이 속성은 추상 속성을 재정의하거나 구현하지만 추상 속성에 해당하는 {0}이(가) 없습니다. + + + + Invalid signature for set member + 집합 멤버의 시그니처가 잘못되었습니다. + + + + This new member hides the abstract member '{0}'. Rename the member or use 'override' instead. + 이 새 멤버는 추상 멤버 '{0}'을(를) 숨깁니다. 멤버의 이름을 바꾸거나 대신 'override'를 사용하세요. + + + + This new member hides the abstract member '{0}' once tuples, functions, units of measure and/or provided types are erased. Rename the member or use 'override' instead. + 이 새 멤버는 튜플, 함수, 측정 단위 및/또는 제공된 형식이 지워지면 추상 멤버 '{0}'을(를) 숨깁니다. 멤버의 이름을 바꾸거나 대신 'override'를 사용하세요. + + + + Interfaces cannot contain definitions of static initializers + 인터페이스에는 정적 이니셜라이저의 정의를 포함할 수 없습니다. + + + + Interfaces cannot contain definitions of object constructors + 인터페이스에는 개체 생성자의 정의를 포함할 수 없습니다. + + + + Interfaces cannot contain definitions of member overrides + 인터페이스에는 멤버 재정의의 정의를 포함할 수 없습니다. + + + + Interfaces cannot contain definitions of concrete members. You may need to define a constructor on your type to indicate that the type is a class. + 인터페이스에는 구체적인 멤버의 정의를 포함할 수 없습니다. 사용자 형식에 대한 생성자를 정의하여 해당 형식이 클래스임을 나타내야 할 수 있습니다. + + + + Constructors cannot be specified in exception augmentations + 생성자는 예외 확대에 지정할 수 없습니다. + + + + Structs cannot have an object constructor with no arguments. This is a restriction imposed on all CLI languages as structs automatically support a default constructor. + 구조체에는 인수가 없는 개체 생성자를 지정할 수 없습니다. 이는 구조체가 기본 생성자를 자동으로 지원하기 때문에 모든 CLI 언어에 적용되는 제한입니다. + + + + Constructors cannot be defined for this type + 생성자는 이 형식에 대해 지정할 수 없습니다. + + + + Recursive bindings that include member specifications can only occur as a direct augmentation of a type + 멤버 지정을 포함하는 재귀적 바인딩은 형식의 직접 확대로만 발생할 수 있습니다. + + + + Only simple variable patterns can be bound in 'let rec' constructs + 단순 변수 패턴만 'let rec' 구문에 바인딩할 수 있습니다. + + + + Only record fields and simple, non-recursive 'let' bindings may be marked mutable + 레코드 필드 및 단순, 비재귀적 'let' 바인딩만 mutable로 표시할 수 있습니다. + + + + This member is not sufficiently generic + 이 멤버는 충분히 일반적이지 않습니다. + + + + A declaration may only be the [<Literal>] attribute if a constant value is also given, e.g. 'val x : int = 1' + 상수 값도 지정된 경우(예: 'val x : int = 1')에만 선언은 [<Literal>] 특성일 수 있습니다. + + + + A declaration may only be given a value in a signature if the declaration has the [<Literal>] attribute + 선언에 [<Literal>] 특성이 있는 경우에만 선언의 시그니처에 값을 지정할 수 있습니다. + + + + Thread-static and context-static variables must be static and given the [<DefaultValue>] attribute to indicate that the value is initialized to the default value on each new thread + Thread 정적 및 Context 정적 변수는 정적이어야 하며 값이 각 새 스레드에서 기본값으로 초기화됨을 나타내기 위해 [<DefaultValue>] 특성을 가져야 합니다. + + + + Volatile fields must be marked 'mutable' and cannot be thread-static + volatile 필드는 'mutable'로 표시해야 하며 Thread 정적일 수 없습니다. + + + + Uninitialized 'val' fields must be mutable and marked with the '[<DefaultValue>]' attribute. Consider using a 'let' binding instead of a 'val' field. + 초기화되지 않은 'val' 필드는 변경할 수 있어야 하며 '[<DefaultValue>]' 특성으로 표시되어야 합니다. 'val' 필드 대신 'let' 바인딩을 사용해 보세요. + + + + Static 'val' fields in types must be mutable, private and marked with the '[<DefaultValue>]' attribute. They are initialized to the 'null' or 'zero' value for their type. Consider also using a 'static let mutable' binding in a class type. + 형식의 정적 'val' 필드는 변경할 수 있어야 하고 Private이어야 하며 '[<DefaultValue>]' 특성으로 표시되어야 합니다. 이러한 필드는 해당 형식에 맞게 'null' 또는 '0' 값으로 초기화됩니다. 클래스 형식에 'static let mutable' 바인딩도 사용해 보세요. + + + + This field requires a name + 이 필드에는 이름이 필요합니다. + + + + Invalid namespace, module, type or union case name + 네임스페이스, 모듈, 형식 또는 공용 구조체 케이스 이름이 잘못되었습니다. + + + + Explicit type declarations for constructors must be of the form 'ty1 * ... * tyN -> resTy'. Parentheses may be required around 'resTy' + 생성자에 대한 명시적 형식 선언의 형식은 'ty1 * ... * tyN -> resTy'여야 합니다. 'resTy'를 괄호로 묶어야 할 수 있습니다. + + + + Return types of union cases must be identical to the type being defined, up to abbreviations + 공용 구조체 케이스의 반환 형식은 약어까지 정의 대상 형식과 동일해야 합니다. + + + + This is not a valid value for an enumeration literal + 열거형 리터럴에 대한 올바른 값이 아닙니다. + + + + The type '{0}' is not an interface type + '{0}' 형식은 인터페이스 형식이 아닙니다. + + + + Duplicate specification of an interface + 인터페이스가 중복 지정되었습니다. + + + + A field/val declaration is not permitted here + 필드/val 선언은 여기에 허용되지 않습니다. + + + + A inheritance declaration is not permitted here + 상속 선언은 여기에 허용되지 않습니다. + + + + This declaration opens the module '{0}', which is marked as 'RequireQualifiedAccess'. Adjust your code to use qualified references to the elements of the module instead, e.g. 'List.map' instead of 'map'. This change will ensure that your code is robust as new constructs are added to libraries. + 이 선언은 'RequireQualifiedAccess'로 표시된 '{0}' 모듈을 엽니다. 대신 모듈의 요소에 대해 한정된 참조를 사용하도록 코드를 조정하십시오(예: 'map' 대신 'List.map'). 이렇게 변경하면 라이브러리에 새 구문이 추가될 때 코드가 견고성을 잃지 않게 됩니다. + + + + This declaration opens the namespace or module '{0}' through a partially qualified path. Adjust this code to use the full path of the namespace. This change will make your code more robust as new constructs are added to the F# and CLI libraries. + 이 선언은 부분적으로 정규화된 경로를 통해 '{0}' 네임스페이스 또는 모듈을 엽니다. 네임스페이스의 전체 경로가 사용되도록 이 코드를 조정하세요. 이렇게 변경하면 F# 및 CLI 라이브러리에 새 구문이 추가될 때 코드가 더 견고해집니다. + + + + Local class bindings cannot be marked inline. Consider lifting the definition out of the class or else do not mark it as inline. + 지역 클래스 바인딩은 inline으로 표시할 수 없습니다. 정의를 클래스 밖으로 이동하거나 inline으로 표시하지 마세요. + + + + Type abbreviations cannot have members + 형식 약어에는 멤버를 지정할 수 없습니다. + + + + As of F# 4.1, the accessibility of type abbreviations is checked at compile-time. Consider changing the accessibility of the type abbreviation. Ignoring this warning might lead to runtime errors. + F# 4.1부터 형식 약어의 액세스 가능성은 컴파일 시간에 확인합니다. 형식 약어의 액세스 가능성을 변경하세요. 이 경고를 무시하면 런타임 오류가 발생할 수 있습니다. + + + + Enumerations cannot have members + 열거형에는 멤버를 지정할 수 없습니다. + + + + Measure declarations may have only static members + 측정값 선언에는 정적 멤버만 있을 수 있습니다. + + + + Structs cannot contain 'do' bindings because the default constructor for structs would not execute these bindings + 구조체의 기본 생성자는 이러한 바인딩을 실행하지 않으므로 구조체에는 'do' 바인딩을 포함할 수 없습니다. + + + + Structs cannot contain value definitions because the default constructor for structs will not execute these bindings. Consider adding additional arguments to the primary constructor for the type. + 구조체의 기본 생성자는 이러한 바인딩을 실행하지 않으므로 구조체에는 값 정의를 포함할 수 없습니다. 형식의 주 생성자에 인수를 더 추가하세요. + + + + Static value definitions may only be used in types with a primary constructor. Consider adding arguments to the type definition, e.g. 'type X(args) = ...'. + 정적 값 정의는 기본 생성자가 포함된 형식에서만 사용할 수 있습니다. 'type X(args) = ...'와 같이 형식 정의에 인수를 추가해 보세요. + + + + Measure declarations may have only static members: constructors are not available + 측정값 선언에는 정적 멤버만 있을 수 있습니다. 생성자는 사용할 수 없습니다. + + + + A member and a local class binding both have the name '{0}' + 멤버와 지역 클래스 바인딩 모두에 이름 '{0}'이(가) 있습니다. + + + + Type abbreviations cannot have interface declarations + 형식 약어에는 인터페이스 선언을 지정할 수 없습니다. + + + + Enumerations cannot have interface declarations + 열거형에는 인터페이스 선언을 지정할 수 없습니다. + + + + This type is not an interface type + 이 형식은 인터페이스 형식이 아닙니다. + + + + All implemented interfaces should be declared on the initial declaration of the type + 구현된 모든 인터페이스는 초기 형식 선언 시 선언해야 합니다. + + + + A default implementation of this interface has already been added because the explicit implementation of the interface was not specified at the definition of the type + 형식을 정의할 때 인터페이스의 명시적 구현이 지정되지 않았으므로 이 인터페이스의 기본 구현이 이미 추가되었습니다. + + + + This member is not permitted in an interface implementation + 이 멤버는 인터페이스 구현에서 허용되지 않습니다. + + + + This declaration element is not permitted in an augmentation + 이 선언 요소는 확대에서 허용되지 않습니다. + + + + Types cannot contain nested type definitions + 형식에는 중첩 형식 정의를 포함할 수 없습니다. + + + + type, exception or module + 형식, 예외 또는 모듈입니다. + + + + type or module + 형식 또는 모듈입니다. + + + + The struct, record or union type '{0}' implements the interface 'System.IStructuralEquatable' explicitly. Apply the 'CustomEquality' attribute to the type. + 구조체, 레코드 또는 공용 구조체 형식 '{0}'은(는) 'System.IStructuralEquatable' 인터페이스를 명시적으로 구현합니다. 형식에 'CustomEquality' 특성을 적용하세요. + + + + The struct, record or union type '{0}' implements the interface 'System.IEquatable<_>' explicitly. Apply the 'CustomEquality' attribute to the type and provide a consistent implementation of the non-generic override 'System.Object.Equals(obj)'. + 구조체, 레코드 또는 공용 구조체 형식 '{0}'은(는) 'System.IEquatable<_>' 인터페이스를 명시적으로 구현합니다. 형식에 'CustomEquality' 특성을 적용하고 제네릭이 아닌 재정의 'System.Object.Equals(obj)'에 대한 일관된 구현을 제공하세요. + + + + Explicit type specifications cannot be used for exception constructors + 명시적 형식 지정은 예외 생성자에 대해 사용할 수 없습니다. + + + + Exception abbreviations should not have argument lists + 예외 약어에는 인수 목록을 지정하면 안 됩니다. + + + + Abbreviations for Common IL exceptions cannot take arguments + 공통 IL 예외에 대한 약어에는 인수를 사용할 수 없습니다. + + + + Exception abbreviations must refer to existing exceptions or F# types deriving from System.Exception + 예외 약어는 기존 예외 또는 System.Exception에서 파생되는 F# 형식을 참조해야 합니다. + + + + Abbreviations for Common IL exception types must have a matching object constructor + 공통 IL 예외 형식에 대한 약어에는 일치하는 개체 생성자가 있어야 합니다. + + + + Not an exception + 예외가 아닙니다. + + + + Invalid module name + 모듈 이름이 잘못되었습니다. + + + + Invalid type extension + 형식 확장이 잘못되었습니다. + + + + The attributes of this type specify multiple kinds for the type + 이 형식의 특성은 형식에 대한 많은 종류를 지정합니다. + + + + The kind of the type specified by its attributes does not match the kind implied by its definition + 해당 특성으로 지정된 형식의 종류가 해당 정의에 의해 암시된 종류와 일치하지 않습니다. + + + + Measure definitions cannot have type parameters + 측정값 정의에는 형식 매개 변수를 지정할 수 없습니다. + + + + This type requires a definition + 이 형식을 사용하려면 정의가 필요합니다. + + + + This type abbreviation has one or more declared type parameters that do not appear in the type being abbreviated. Type abbreviations must use all declared type parameters in the type being abbreviated. Consider removing one or more type parameters, or use a concrete type definition that wraps an underlying type, such as 'type C<'a> = C of ...'. + 이 형식 약어에는 간략화되는 형식에 나타나지 않는 하나 이상의 선언된 형식 매개 변수가 있습니다. 형식 약어는 간략화되는 형식에 있는 모든 선언된 형식 매개 변수를 사용해야 합니다. 하나 이상의 형식 매개 변수를 제거하거나 내부 형식을 래핑하는 구체적인 형식 정의(예: 'type C<'a> = C of ...')를 사용하세요. + + + + Structs, interfaces, enums and delegates cannot inherit from other types + 구조체, 인터페이스, 열거형 및 대리자는 다른 형식에서 상속될 수 없습니다. + + + + Types cannot inherit from multiple concrete types + 형식은 여러 구체적인 형식에서 상속될 수 없습니다. + + + + Records, union, abbreviations and struct types cannot have the 'AllowNullLiteral' attribute + 레코드, 공용 구조체, 약어 및 구조체 형식에는 'AllowNullLiteral' 특성을 지정할 수 없습니다. + + + + Types with the 'AllowNullLiteral' attribute may only inherit from or implement types which also allow the use of the null literal + 'AllowNullLiteral' 특성이 지정된 형식은 null 리터럴도 사용할 수 있는 형식을 구현하거나 이 형식에서 상속되어야 합니다. + + + + Generic types cannot be given the 'StructLayout' attribute + 제네릭 형식에는 'StructLayout' 특성을 지정할 수 없습니다. + + + + Only structs and classes without primary constructors may be given the 'StructLayout' attribute + 기본 생성자가 없는 구조체 및 클래스에만 'StructLayout' 특성을 지정할 수 있습니다. + + + + The representation of this type is hidden by the signature. It must be given an attribute such as [<Sealed>], [<Class>] or [<Interface>] to indicate the characteristics of the type. + 이 형식의 표현은 시그니처에 의해 숨겨져 있습니다. 형식의 특징을 나타내기 위해 이 형식에는 [<Sealed>], [<Class>] 또는 [<Interface>]와 같은 특성을 지정해야 합니다. + + + + Only classes may be given the 'AbstractClass' attribute + 클래스에만 'AbstractClass' 특성을 지정할 수 있습니다. + + + + Only types representing units-of-measure may be given the 'Measure' attribute + 측정 단위를 나타내는 형식에만 'Measure' 특성을 지정할 수 있습니다. + + + + Accessibility modifiers are not permitted on overrides or interface implementations + 액세스 가능성 한정자는 재정의 또는 인터페이스 구현에서 허용되지 않습니다. + + + + Discriminated union types are always sealed + 구분된 공용 구조체 형식은 항상 봉인됩니다. + + + + Record types are always sealed + 레코드 형식은 항상 봉인됩니다. + + + + Assembly code types are always sealed + 어셈블리 코드 형식은 항상 봉인됩니다. + + + + Struct types are always sealed + 구조체 형식은 항상 봉인됩니다. + + + + Delegate types are always sealed + 대리자 형식은 항상 봉인됩니다. + + + + Enum types are always sealed + 열거형 형식은 항상 봉인됩니다. + + + + Interface types and delegate types cannot contain fields + 인터페이스 형식 및 대리자 형식에는 필드를 포함할 수 없습니다. + + + + Abbreviated types cannot be given the 'Sealed' attribute + 간략화된 형식에는 'Sealed' 특성을 지정할 수 없습니다. + + + + Cannot inherit a sealed type + 봉인된 형식을 상속할 수 없습니다. + + + + Cannot inherit from interface type. Use interface ... with instead. + 인터페이스 형식에서 상속할 수 없습니다. 대신 interface ... with를 사용하세요. + + + + Struct types cannot contain abstract members + 구조체 형식에는 추상 멤버를 포함할 수 없습니다. + + + + Interface types cannot be sealed + 인터페이스 형식은 봉인할 수 없습니다. + + + + Delegate specifications must be of the form 'typ -> typ' + 대리자 지정의 형식은 'typ -> typ'여야 합니다. + + + + Delegate specifications must not be curried types. Use 'typ * ... * typ -> typ' for multi-argument delegates, and 'typ -> (typ -> typ)' for delegates returning function values. + 대리자 지정은 커리된 형식이어서는 안 됩니다. 다중 인수 대리자의 경우 'typ * ... * typ -> typ', 함수 값을 반환하는 대리자의 경우 'typ -> (typ -> typ)'를 사용하세요. + + + + Literal enumerations must have type int, uint, int16, uint16, int64, uint64, byte, sbyte or char + 리터럴 열거형의 형식은 int, uint, int16, uint16, int64, uint64, byte, sbyte 또는 char이어야 합니다. + + + + This type definition involves an immediate cyclic reference through an abbreviation + 이 형식 정의에는 약어를 통해 직접 순환 참조가 사용됩니다. + + + + This type definition involves an immediate cyclic reference through a struct field or inheritance relation + 이 형식 정의에는 구조체 필드 또는 상속 관계를 통해 직접 순환 참조가 사용됩니다. + + + + The syntax 'type X with ...' is reserved for augmentations. Types whose representations are hidden but which have members are now declared in signatures using 'type X = ...'. You may also need to add the '[<Sealed>] attribute to the type definition in the signature + 'type X with ...' 구문은 확대를 위해 예약되었습니다. 표현이 숨겨져 있지만 멤버를 가지고 있는 형식은 이제 'type X = ...'를 사용하여 시그니처에 선언됩니다. 시그니처에 있는 형식 정의에 '[<Sealed>] 특성을 추가해야 할 수도 있습니다. + + + + Members that extend interface, delegate or enum types must be placed in a module separate to the definition of the type. This module must either have the AutoOpen attribute or be opened explicitly by client code to bring the extension members into scope. + 인터페이스, 대리자 또는 열거형 형식을 확장하는 멤버는 형식의 정의와 별도로 모듈에 배치해야 합니다. 이 모듈은 확장 멤버를 범위 내로 가져오기 위해 AutoOpen 특성을 가지거나 클라이언트 코드를 통해 명시적으로 열어야 합니다. + + + + One or more of the declared type parameters for this type extension have a missing or wrong type constraint not matching the original type constraints on '{0}' + 이 형식 확장에 대해 선언된 하나 이상의 형식 매개 변수에 형식 제약 조건이 없거나 잘못되어 '{0}'의 원본 형식 제약 조건과 일치하지 않습니다. + + + + Type definitions may only have one 'inherit' specification and it must be the first declaration + 형식 정의에는 하나의 'inherit' 지정만 있을 수 있으며 이것이 첫 번째 선언이어야 합니다. + + + + 'let' and 'do' bindings must come before member and interface definitions in type definitions + 'let' 및 'do' 바인딩은 형식 정의에서 멤버 및 인터페이스 정의 앞에 와야 합니다. + + + + This 'inherit' declaration specifies the inherited type but no arguments. Consider supplying arguments, e.g. 'inherit BaseType(args)'. + 이 'inherit' 선언은 상속된 형식을 지정하지만 인수는 지정하지 않습니다. 인수를 제공하십시오(예: 'inherit BaseType(args)'). + + + + This 'inherit' declaration has arguments, but is not in a type with a primary constructor. Consider adding arguments to your type definition, e.g. 'type X(args) = ...'. + 이 'inherit' 선언은 인수를 포함하지만 기본 생성자가 포함된 형식이 아닙니다. 'type X(args) = ...'와 같이 형식 정의에 인수를 추가해 보세요. + + + + This definition may only be used in a type with a primary constructor. Consider adding arguments to your type definition, e.g. 'type X(args) = ...'. + 이 정의는 기본 생성자가 포함된 형식에서만 사용할 수 있습니다. 'type X(args) = ...'와 같이 형식 정의에 인수를 추가해 보세요. + + + + Type abbreviations cannot have augmentations + 형식 약어에는 확대를 지정할 수 없습니다. + + + + The path '{0}' is a namespace. A module abbreviation may not abbreviate a namespace. + '{0}' 경로가 네임스페이스입니다. 모듈 약어가 네임스페이스의 약어가 아닐 수 있습니다. + + + + The type '{0}' is used in an invalid way. A value prior to '{1}' has an inferred type involving '{2}', which is an invalid forward reference. + {0}' 형식이 잘못된 방식으로 사용되었습니다. '{1}' 앞에 있는 값에 '{2}'을(를) 사용하는 유추 형식이 있습니다. 이는 잘못된 전방 참조입니다. + + + + The member '{0}' is used in an invalid way. A use of '{1}' has been inferred prior to the definition of '{2}', which is an invalid forward reference. + {0}' 멤버가 잘못된 방식으로 사용되었습니다. '{2}'이(가) 정의되기 전에 '{1}'의 사용이 유추되었습니다. 이는 잘못된 전방 참조입니다. + + + + The attribute 'AutoOpen(\"{0}\")' in the assembly '{1}' did not refer to a valid module or namespace in that assembly and has been ignored + {1}' 어셈블리의 특성 'AutoOpen(\"{0}\")'이 해당 어셈블리의 올바른 모듈 또는 네임스페이스를 참조하지 않아 무시되었습니다. + + + + Undefined value '{0}' + 정의되지 않은 값 '{0}'입니다. + + + + Label {0} not found + {0} 레이블을 찾을 수 없습니다. + + + + Incorrect number of type arguments to local call + 로컬 호출에 대한 형식 인수 수가 잘못되었습니다. + + + + Dynamic invocation of {0} is not supported + {0}을(를) 동적으로 호출하는 작업은 지원되지 않습니다. + + + + Taking the address of a literal field is invalid + 리터럴 필드의 주소를 사용하는 것은 올바르지 않습니다. + + + + This operation involves taking the address of a value '{0}' represented using a local variable or other special representation. This is invalid. + 이 작업을 수행하려면 지역 변수 또는 기타 특수 표현을 사용하여 표시된 값 '{0}'의 주소를 사용해야 합니다. 이는 올바르지 않습니다. + + + + Custom marshallers cannot be specified in F# code. Consider using a C# helper function. + 사용자 지정 마샬러는 F# 코드에 지정할 수 없습니다. C# 도우미 함수를 사용하세요. + + + + The MarshalAs attribute could not be decoded + MarshalAs 특성을 디코딩할 수 없습니다. + + + + The signature for this external function contains type parameters. Constrain the argument and return types to indicate the types of the corresponding C function. + 이 외부 함수의 시그니처에 형식 매개 변수가 포함되어 있습니다. 인수 및 반환 형식을 제한하여 해당하는 C 함수의 형식을 나타내세요. + + + + The DllImport attribute could not be decoded + DllImport 특성을 디코딩할 수 없습니다. + + + + Literal fields cannot be set + 리터럴 필드를 설정할 수 없습니다. + + + + GenSetStorage: {0} was represented as a static method but was not an appropriate lambda expression + GenSetStorage: {0}이(가) 정적 메서드로 표시되었지만 적절한 람다 식이 아니었습니다. + + + + Mutable variables cannot escape their method + 변경할 수 있는 변수는 해당 메서드를 벗어날 수 없습니다. + + + + Compiler error: unexpected unrealized value + 컴파일러 오류: 예기치 않은 구현되지 않은 값이 있습니다. + + + + Main module of program is empty: nothing will happen when it is run + 프로그램의 주 모듈이 비어 있습니다. 프로그램 실행 시 아무 작업도 수행되지 않습니다. + + + + This type cannot be used for a literal field + 이 형식은 리터럴 필드에 사용할 수 없습니다. + + + + Unexpected GetSet annotation on a property + 속성에 예기치 않은 GetSet 주석이 있습니다. + + + + The FieldOffset attribute could not be decoded + FieldOffset 특성을 디코딩할 수 없습니다. + + + + The StructLayout attribute could not be decoded + StructLayout 특성을 디코딩할 수 없습니다. + + + + The DefaultAugmentation attribute could not be decoded + DefaultAugmentation 특성을 디코딩할 수 없습니다. + + + + Reflected definitions cannot contain uses of the prefix splice operator '%' + 반영된 정의에는 접두사 스플라이스 연산자 '%'을(를) 포함할 수 없습니다. + + + + Problem with codepage '{0}': {1} + 코드 페이지 '{0}'에 문제가 있습니다. {1} + + + + Copyright (c) Microsoft Corporation. All Rights Reserved. + Copyright (c) Microsoft Corporation. All rights reserved. + + + + Freely distributed under the MIT Open Source License. https://github.com/Microsoft/visualfsharp/blob/master/License.txt + MIT 오픈 소스 라이선스에 따라 무료로 배포되었습니다. https://github.com/Microsoft/visualfsharp/blob/master/License.txt + + + + Name of the output file (Short form: -o) + 출력 파일의 이름입니다(약식: -o). + + + + Build a console executable + 콘솔 실행 파일을 빌드합니다. + + + + Build a Windows executable + Windows 실행 파일을 빌드합니다. + + + + Build a library (Short form: -a) + 라이브러리를 빌드합니다(약식: -a). + + + + Build a module that can be added to another assembly + 다른 어셈블리에 추가될 수 있는 모듈을 빌드합니다. + + + + Delay-sign the assembly using only the public portion of the strong name key + 강력한 이름 키의 공개 부분만 사용하여 어셈블리 서명을 연기합니다. + + + + Public-sign the assembly using only the public portion of the strong name key, and mark the assembly as signed + 강력한 이름 키의 공개 부분만 사용하여 어셈블리를 공개 서명하고, 어셈블리를 서명됨으로 표시합니다. + + + + Write the xmldoc of the assembly to the given file + 지정한 파일에 어셈블리의 xmldoc를 씁니다. + + + + Specify a strong name key file + 강력한 이름의 키 파일을 지정합니다. + + + + Specify a strong name key container + 강력한 이름의 키 컨테이너를 지정합니다. + + + + Limit which platforms this code can run on: x86, Itanium, x64, anycpu32bitpreferred, or anycpu. The default is anycpu. + 이 코드를 실행할 수 있는 플랫폼을 x86, Itanium, x64, anycpu32bitpreferred 또는 anycpu로 제한합니다. 기본값은 anycpu입니다. + + + + Only include optimization information essential for implementing inlined constructs. Inhibits cross-module inlining but improves binary compatibility. + 인라인 구문을 구현하는 데 반드시 필요한 최적화 정보만 포함합니다. 크로스 모듈 인라인 처리가 금지되지만 이진 호환성은 개선됩니다. + + + + Don't add a resource to the generated assembly containing F#-specific metadata + F# 관련 메타데이터를 포함하는 생성 어셈블리에 리소스를 추가하지 마세요. + + + + Print the inferred interface of the assembly to a file + 어셈블리의 유추된 인터페이스를 파일에 출력합니다. + + + + Reference an assembly (Short form: -r) + 어셈블리를 참조합니다(약식: -r). + + + + Specify a Win32 resource file (.res) + Win32 리소스 파일(.res)을 지정합니다. + + + + Specify a Win32 manifest file + Win32 매니페스트 파일을 지정합니다. + + + + Do not include the default Win32 manifest + 기본 Win32 매니페스트를 포함하지 마세요. + + + + Embed all source files in the portable PDB file + 이식 가능한 PDB 파일에 모든 소스 파일 포함 + + + + Embed specific source files in the portable PDB file + 이식 가능한 PDB 파일에 특정 소스 파일을 포함합니다. + + + + Source link information file to embed in the portable PDB file + 이식 가능한 PDB 파일에 포함할 소스 링크 정보 파일 + + + + --embed switch only supported when emitting a Portable PDB (--debug:portable or --debug:embedded) + --embed 스위치는 이식 가능한 PDB를 내보낼 때만 지원됩니다(--debug:portable 또는 --debug:embedded). + + + + --sourcelink switch only supported when emitting a Portable PDB (--debug:portable or --debug:embedded) + --sourcelink 스위치는 이식 가능한 PDB를 내보낼 때만 지원됩니다(--debug:portable 또는 --debug:embedded). + + + + Source file is too large to embed in a portable PDB + 소스 파일이 너무 커서 이식 가능한 PDB에 포함할 수 없습니다. + + + + Embed the specified managed resource + 지정한 관리되는 리소스를 포함합니다. + + + + Link the specified resource to this assembly where the resinfo format is <file>[,<string name>[,public|private]] + resinfo 형식이 <file>[,<string name>[,public|private]]인 경우 지정한 리소스를 이 어셈블리에 링크합니다. + + + + Emit debug information (Short form: -g) + 디버그 정보를 내보냅니다(약식: -g). + + + + Specify debugging type: full, portable, embedded, pdbonly. ('{0}' is the default if no debuggging type specified and enables attaching a debugger to a running program, 'portable' is a cross-platform format, 'embedded' is a cross-platform format embedded into the output file). + 디버깅 형식(full, portable, embedded, pdbonly)을 지정합니다. '{0}'은(는) 디버깅 형식을 지정하지 않은 경우 기본값이며 디버거를 실행 중인 프로그램에 연결할 수 있습니다. 'portable'은 플랫폼 간 형식이고, 'embedded'는 출력 파일에 포함된 플랫폼 간 형식입니다. + + + + Enable optimizations (Short form: -O) + 최적화를 사용합니다(약식: -O). + + + + Enable or disable tailcalls + 마무리 호출을 사용하거나 사용하지 않습니다. + + + + Produce a deterministic assembly (including module version GUID and timestamp) + 결정적 어셈블리(모듈 버전 GUID 및 타임스탬프 포함) 생성 + + + + Enable or disable cross-module optimizations + 크로스 모듈을 최적화하거나 최적화하지 않습니다. + + + + Report all warnings as errors + 모든 경고를 오류로 보고합니다. + + + + Report specific warnings as errors + 특정 경고를 오류로 보고합니다. + + + + Set a warning level (0-5) + 경고 수준(0-5)을 설정합니다. + + + + Disable specific warning messages + 특정 경고 메시지를 사용하지 않습니다. + + + + Enable specific warnings that may be off by default + 특정 경고 사용(기본적으로 해제됨) + + + + Generate overflow checks + 오버플로 검사를 생성합니다. + + + + Define conditional compilation symbols (Short form: -d) + 조건부 컴파일 기호를 정의합니다(약식: -d). + + + + Ignore ML compatibility warnings + ML 호환성 경고를 무시합니다. + + + + + Display this usage message (Short form: -?) + 이 사용법 메시지를 표시합니다(약식: -?). + + + + Read response file for more options + 추가 옵션을 보려면 지시 파일을 읽으세요. + + + + Specify the codepage used to read source files + 소스 파일을 읽는 데 사용되는 코드 페이지를 지정합니다. + + + + Output messages in UTF-8 encoding + UTF-8 인코딩으로 메시지를 출력합니다. + + + + Output messages with fully qualified paths + 정규화된 경로를 사용하여 메시지를 출력합니다. + + + + Specify a directory for the include path which is used to resolve source files and assemblies (Short form: -I) + 소스 파일 및 어셈블리를 확인하는 데 사용되는 포함 경로의 디렉터리를 지정합니다(약식: -I). + + + + Base address for the library to be built + 빌드할 라이브러리의 기준 주소 + + + + Do not reference the default CLI assemblies by default + 기본 CLI 어셈블리를 기본적으로 참조하지 마세요. + + + + Statically link the F# library and all referenced DLLs that depend on it into the assembly being generated + F# 라이브러리 및 이 라이브러리에 종속된 모든 참조 DLL을 생성되는 어셈블리에 정적으로 링크합니다. + + + + Statically link the given assembly and all referenced DLLs that depend on this assembly. Use an assembly name e.g. mylib, not a DLL name. + 지정한 어셈블리 및 이 어셈블리에 종속된 모든 참조 DLL을 정적으로 링크합니다. DLL 이름이 아니라 어셈블리 이름을 사용하십시오(예: mylib). + + + + Use a resident background compilation service to improve compiler startup times. + 컴파일러 시작 시간을 단축하기 위해 상주 백그라운드 컴파일 서비스를 사용합니다. + + + + Name the output debug file + 출력 디버그 파일의 이름입니다. + + + + Resolve assembly references using directory-based rules rather than MSBuild resolution + MSBuild 확인이 아니라 디렉터리 기반의 규칙을 사용하여 어셈블리 참조를 확인합니다. + + + + Unrecognized target '{0}', expected 'exe', 'winexe', 'library' or 'module' + 인식할 수 없는 대상 '{0}'입니다. 'exe', 'winexe', 'library' 또는 'module'이 필요합니다. + + + + Unrecognized debug type '{0}', expected 'pdbonly' or 'full' + 인식할 수 없는 디버그 형식 '{0}'입니다. 'pdbonly' 또는 'full'이 필요합니다. + + + + Invalid warning level '{0}' + 경고 수준 '{0}'이(가) 잘못되었습니다. + + + + Short form of '{0}' + '{0}'의 약식입니다. + + + + The command-line option '--cliroot' has been deprecated. Use an explicit reference to a specific copy of mscorlib.dll instead. + 명령줄 옵션 '--cliroot'는 사용되지 않습니다. mscorlib.dll의 특정 복사본에 대한 명시적 참조를 대신 사용하세요. + + + + Use to override where the compiler looks for mscorlib.dll and framework components + 컴파일러가 mscorlib.dll 및 프레임워크 구성 요소를 찾는 위치를 재정의하는 데 사용합니다. + + + + - OUTPUT FILES - + - 출력 파일 - + + + + - INPUT FILES - + - 입력 파일 - + + + + - RESOURCES - + - 리소스 - + + + + - CODE GENERATION - + - 코드 생성 - + + + + - ADVANCED - + - 고급 - + + + + - MISCELLANEOUS - + - 기타 - + + + + - LANGUAGE - + - 언어 - + + + + - ERRORS AND WARNINGS - + - 오류 및 경고 - + + + + Unknown --test argument: '{0}' + 알 수 없는 --test 인수입니다. '{0}' + + + + Unrecognized platform '{0}', valid values are 'x86', 'x64', 'Itanium', 'anycpu32bitpreferred', and 'anycpu' + 인식할 수 없는 플랫폼 '{0}'입니다. 올바른 값은 'x86', 'x64', 'Itanium', 'anycpu32bitpreferred' 및 'anycpu'입니다. + + + + The command-line option '{0}' is for test purposes only + 명령줄 옵션 '{0}'은(는) 테스트를 위해서만 사용됩니다. + + + + The command-line option '{0}' has been deprecated + 명령줄 옵션 '{0}'은(는) 사용되지 않습니다. + + + + The command-line option '{0}' has been deprecated. Use '{1}' instead. + 명령줄 옵션 '{0}'은(는) 사용되지 않습니다. 대신 '{1}'을(를) 사용하세요. + + + + The command-line option '{0}' has been deprecated. HTML document generation is now part of the F# Power Pack, via the tool FsHtmlDoc.exe. + 명령줄 옵션 '{0}'은(는) 사용되지 않습니다. HTML 문서 생성은 이제 FsHtmlDoc.exe를 통해 F# Power Pack에 포함됩니다. + + + + Output warning and error messages in color + 경고 및 오류 메시지를 색으로 구분하여 출력 + + + + Enable high-entropy ASLR + 높은 엔트로피 ASLR 사용 + + + + Specify subsystem version of this assembly + 이 어셈블리의 하위 시스템 버전을 지정하세요. + + + + Specify target framework profile of this assembly. Valid values are mscorlib, netcore or netstandard. Default - mscorlib + 이 어셈블리의 대상 프레임워크 프로필을 지정하세요. 올바른 값은 mscorlib, netcore 또는 netstandard입니다. 기본값은 - mscorlib입니다. + + + + Emit debug information in quotations + 인용구의 디버그 정보를 내보냅니다. + + + + Specify the preferred output language culture name (e.g. es-ES, ja-JP) + 기본 출력 언어 문화권 이름 지정(예: es-ES, ja-JP) + + + + Don't copy FSharp.Core.dll along the produced binaries + FSharp.Core.dll을 생성된 바이너리와 함께 복사하지 않음 + + + + Invalid version '{0}' for '--subsystemversion'. The version must be 4.00 or greater. + '--subsystemversion'의 버전 '{0}'이(가) 잘못되었습니다. 버전은 4.00 이상이어야 합니다. + + + + Invalid value '{0}' for '--targetprofile', valid values are 'mscorlib', 'netcore' or 'netstandard'. + '--targetprofile'에 대한 값 '{0}'이(가) 잘못되었습니다. 올바른 값은 'mscorlib', 'netcore' 또는 'netstandard'입니다. + + + + Full name + 전체 이름 + + + + and {0} other overloads + 및 기타 오버로드 {0}개 + + + + union case + 공용 구조체 케이스 + + + + active pattern result + 활성 패턴 결과 + + + + active recognizer + 활성 인식기 + + + + field + 필드 + + + + event + 이벤트 + + + + property + 속성 + + + + extension + 확장 + + + + custom operation + 사용자 지정 연산 + + + + argument + 인수 + + + + patvar + patvar + + + + namespace + 네임스페이스 + + + + module + 모듈 + + + + namespace/module + 네임스페이스/모듈 + + + + from {0} + 소스: {0} + + + + also from {0} + 공동 소스: {0} + + + + generated property + 생성된 속성 + + + + generated type + 생성된 형식 + + + + Found by AssemblyFolders registry key + AssemblyFolders 레지스트리 키로 찾았습니다. + + + + Found by AssemblyFoldersEx registry key + AssemblyFoldersEx 레지스트리 키로 찾았습니다. + + + + .NET Framework + .NET Framework + + + + Global Assembly Cache + 전역 어셈블리 캐시 + + + + Recursive class hierarchy in type '{0}' + '{0}' 형식에 재귀적 클래스 계층 구조가 있습니다. + + + + Invalid recursive reference to an abstract slot + 추상 슬롯에 대한 재귀 참조가 잘못되었습니다. + + + + The event '{0}' has a non-standard type. If this event is declared in another CLI language, you may need to access this event using the explicit {1} and {2} methods for the event. If this event is declared in F#, make the type of the event an instantiation of either 'IDelegateEvent<_>' or 'IEvent<_,_>'. + {0}' 이벤트에 비표준 형식이 있습니다. 이 이벤트가 다른 CLI 언어로 선언된 경우 이벤트에 대한 명시적 {1} 및 {2} 메서드를 사용하여 이 이벤트에 액세스해야 할 수 있습니다. 이 이벤트가 F#으로 선언된 경우에는 이벤트의 형식을 'IDelegateEvent<_>' 또는 'IEvent<_,_>'의 인스턴스로 만드세요. + + + + The type '{0}' is not accessible from this code location + '{0}' 형식은 이 코드 위치에서 액세스할 수 없습니다. + + + + The union cases or fields of the type '{0}' are not accessible from this code location + '{0}' 형식의 공용 구조체 케이스 또는 필드는 이 코드 위치에서 액세스할 수 없습니다. + + + + The value '{0}' is not accessible from this code location + 값 '{0}'은(는) 이 코드 위치에서 액세스할 수 없습니다. + + + + The union case '{0}' is not accessible from this code location + 공용 구조체 케이스 '{0}'은(는) 이 코드 위치에서 액세스할 수 없습니다. + + + + The record, struct or class field '{0}' is not accessible from this code location + 레코드, 구조체 또는 클래스 필드 '{0}'은(는) 이 코드 위치에서 액세스할 수 없습니다. + + + + The struct or class field '{0}' is not accessible from this code location + 구조체 또는 클래스 필드 '{0}'은(는) 이 코드 위치에서 액세스할 수 없습니다. + + + + This construct is experimental + 이 구문은 실험적입니다. + + + + No Invoke methods found for delegate type + 대리자 형식에 대해 Invoke 메서드를 찾지 못했습니다. + + + + More than one Invoke method found for delegate type + 대리자 형식에 대해 둘 이상의 Invoke 메서드를 찾았습니다. + + + + Delegates are not allowed to have curried signatures + 대리자는 커리된 시그니처를 가질 수 없습니다. + + + + Unexpected Expr.TyChoose + 예기치 않은 Expr.TyChoose입니다. + + + + Note: Lambda-lifting optimizations have not been applied because of the use of this local constrained generic function as a first class value. Adding type constraints may resolve this condition. + 참고: 로컬 제약 조건이 있는 이 제네릭 함수를 첫 번째 클래스 값으로 사용했으므로 람다 리프팅 최적화가 적용되지 않았습니다. 형식 제약 조건을 추가하면 이 상황이 해결될 수 있습니다. + + + + Identifiers containing '@' are reserved for use in F# code generation + '@'을 포함하는 식별자는 F# 코드 생성에 사용할 수 있도록 예약되었습니다. + + + + The identifier '{0}' is reserved for future use by F# + '{0}' 식별자는 F#에서 나중에 사용할 수 있도록 예약되었습니다. + + + + Missing variable '{0}' + '{0}' 변수가 없습니다. + + + + Partial active patterns may only generate one result + 부분 활성 패턴은 하나의 결과만 생성할 수 있습니다. + + + + The type '{0}' is required here and is unavailable. You must add a reference to assembly '{1}'. + {0}' 형식이 여기에 필요하지만 사용할 수 없습니다. '{1}' 어셈블리에 대한 참조를 추가해야 합니다. + + + + A reference to the type '{0}' in assembly '{1}' was found, but the type could not be found in that assembly + {1}' 어셈블리에서 '{0}' 형식에 대한 참조를 찾았지만 이 어셈블리에서 해당 형식을 찾을 수 없습니다. + + + + Internal error or badly formed metadata: not enough type parameters were in scope while importing + 내부 오류 또는 잘못된 형식의 메타데이터: 가져오기 작업을 수행하는 동안 범위 내의 형식 매개 변수가 부족했습니다. + + + + A reference to the DLL {0} is required by assembly {1}. The imported type {2} is located in the first assembly and could not be resolved. + {1} 어셈블리에 {0} DLL에 대한 참조가 필요합니다. 가져온 형식 {2}은(는) 첫 번째 어셈블리에 있으며 확인할 수 없습니다. + + + + An imported assembly uses the type '{0}' but that type is not public + 가져온 어셈블리가 '{0}' 형식을 사용하지만 해당 형식이 public이 아닙니다. + + + + The value '{0}' was marked inline but its implementation makes use of an internal or private function which is not sufficiently accessible + 값 '{0}'이(가) inline으로 표시되었지만 해당 구현이 충분히 액세스할 수 없는 내부 또는 개인 함수를 사용합니다. + + + + The value '{0}' was marked inline but was not bound in the optimization environment + 값 '{0}'이(가) inline으로 표시되었지만 최적화 환경에 바인딩되지 않았습니다. + + + + Local value {0} not found during optimization + 최적화하는 동안 로컬 값 {0}을(를) 찾을 수 없습니다. + + + + A value marked as 'inline' has an unexpected value + 'inline'으로 표시된 값에 예기치 않은 값이 있습니다. + + + + A value marked as 'inline' could not be inlined + 'inline'으로 표시된 값은 인라인할 수 없습니다. + + + + Failed to inline the value '{0}' marked 'inline', perhaps because a recursive value was marked 'inline' + 'inline'으로 표시된 값 '{0}'을(를) 인라인하지 못했습니다. 재귀 값이 'inline'으로 표시된 것 같습니다. + + + + Recursive ValValue {0} + 재귀 ValValue {0}입니다. + + + + The indentation of this 'in' token is incorrect with respect to the corresponding 'let' + 이 'in' 토큰의 들여쓰기가 해당하는 'let'과 관련하여 올바르지 않습니다. + + + + Possible incorrect indentation: this token is offside of context started at position {0}. Try indenting this token further or using standard formatting conventions. + 들여쓰기가 잘못되었을 수 있습니다. 이 토큰은 {0} 위치에서 시작된 컨텍스트를 벗어납니다. 이 토큰을 더 들여쓰거나 표준 서식 규칙을 사용하세요. + + + + The '|' tokens separating rules of this pattern match are misaligned by one column. Consider realigning your code or using further indentation. + 이 패턴 일치의 규칙을 구분하는 '|' 토큰의 한 열이 잘못 맞춤되어 있습니다. 코드를 다시 맞추거나 들여쓰기를 더 사용하세요. + + + + Invalid module/expression/type + 모듈/식/형식이 잘못되었습니다. + + + + Multiple types exist called '{0}', taking different numbers of generic parameters. Provide a type instantiation to disambiguate the type resolution, e.g. '{1}'. + {0}'(이)라는 형식이 여러 개 있으며 이러한 형식에 서로 다른 수의 제네릭 매개 변수가 사용되고 있습니다. 형식 확인을 구분하기 위한 형식 인스턴스를 제공하십시오(예: '{1}'). + + + + The instantiation of the generic type '{0}' is missing and can't be inferred from the arguments or return type of this member. Consider providing a type instantiation when accessing this type, e.g. '{1}'. + 제네릭 형식 '{0}'의 인스턴스가 없으며 이 멤버의 반환 형식 또는 인수로부터 해당 인스턴스를 유추할 수 없습니다. 이 형식에 액세스할 때 형식 인스턴스를 제공하십시오(예: '{1}'). + + + + 'global' may only be used as the first name in a qualified path + 'global'은 정규화된 경로에서 첫 번째 이름으로만 사용할 수 있습니다. + + + + This is not a constructor or literal, or a constructor is being used incorrectly + 생성자 또는 리터럴이 아니거나 생성자가 잘못된 방식으로 사용되고 있습니다. + + + + Unexpected empty long identifier + 예기치 않은 빈 긴 식별자입니다. + + + + The record type '{0}' does not contain a label '{1}'. + 레코드 종류 '{0}'에 '{1}' 레이블이 포함되어 있지 않습니다. + + + + Invalid field label + 필드 레이블이 잘못되었습니다. + + + + Invalid expression '{0}' + '{0}' 식이 잘못되었습니다. + + + + No constructors are available for the type '{0}' + '{0}' 형식에 대해 사용할 수 있는 생성자가 없습니다. + + + + The union type for union case '{0}' was defined with the RequireQualifiedAccessAttribute. Include the name of the union type ('{1}') in the name you are using. + 공용 구조체 케이스 '{0}'에 대한 공용 구조체 형식은 RequireQualifiedAccessAttribute로 정의됩니다. 사용 중인 이름에 공용 구조체 형식('{1}') 이름을 포함하세요. + + + + The record type for the record field '{0}' was defined with the RequireQualifiedAccessAttribute. Include the name of the record type ('{1}') in the name you are using. + 레코드 필드 '{0}'에 대한 레코드 타입은 RequireQualifiedAccessAttribute로 정의됩니다. 사용 중인 이름에 레코드 타입('{1}') 이름을 포함하세요. + + + + Unexpected error creating debug information file '{0}' + 디버그 정보 파일 '{0}'을(를) 만드는 동안 예기치 않은 오류가 발생했습니다. + + + + This number is outside the allowable range for this integer type + 이 숫자는 이 정수 형식에 대해 허용 가능한 범위를 벗어납니다. + + + + '{0}' is not permitted as a character in operator names and is reserved for future use + '{0}'은(는) 연산자 이름에서 허용되는 문자가 아니며 나중에 사용할 수 있도록 예약되었습니다. + + + + Unexpected character '{0}' + 예기치 않은 '{0}' 문자입니다. + + + + This byte array literal contains characters that do not encode as a single byte + 이 바이트 배열 리터럴에는 단일 바이트로 인코딩되지 않는 문자가 포함되어 있습니다. + + + + Identifiers followed by '{0}' are reserved for future use + 식별자 다음에 '{0}'이(가) 있는 형식은 나중에 사용할 수 있도록 예약되었습니다. + + + + This number is outside the allowable range for 8-bit signed integers + 이 숫자는 부호 있는 8비트 정수에 대해 허용 가능한 범위를 벗어납니다. + + + + This number is outside the allowable range for hexadecimal 8-bit signed integers + 이 숫자는 부호 있는 16진수 8비트 정수에 대해 허용 가능한 범위를 벗어납니다. + + + + This number is outside the allowable range for 8-bit unsigned integers + 이 숫자는 부호 없는 8비트 정수에 대해 허용 가능한 범위를 벗어납니다. + + + + This number is outside the allowable range for 16-bit signed integers + 이 숫자는 부호 있는 16비트 정수에 대해 허용 가능한 범위를 벗어납니다. + + + + This number is outside the allowable range for 16-bit unsigned integers + 이 숫자는 부호 없는 16비트 정수에 대해 허용 가능한 범위를 벗어납니다. + + + + This number is outside the allowable range for 32-bit signed integers + 이 숫자는 부호 있는 32비트 정수에 대해 허용 가능한 범위를 벗어납니다. + + + + This number is outside the allowable range for 32-bit unsigned integers + 이 숫자는 부호 없는 32비트 정수에 대해 허용 가능한 범위를 벗어납니다. + + + + This number is outside the allowable range for 64-bit signed integers + 이 숫자는 부호 있는 64비트 정수에 대해 허용 가능한 범위를 벗어납니다. + + + + This number is outside the allowable range for 64-bit unsigned integers + 이 숫자는 부호 없는 64비트 정수에 대해 허용 가능한 범위를 벗어납니다. + + + + This number is outside the allowable range for signed native integers + 이 숫자는 부호 있는 원시 정수에 대해 허용 가능한 범위를 벗어납니다. + + + + This number is outside the allowable range for unsigned native integers + 이 숫자는 부호 없는 원시 정수에 대해 허용 가능한 범위를 벗어납니다. + + + + Invalid floating point number + 부동 소수점 수가 잘못되었습니다. + + + + This number is outside the allowable range for decimal literals + 이 숫자는 10진 리터럴에 대해 허용 가능한 범위를 벗어납니다. + + + + This number is outside the allowable range for 32-bit floats + 이 숫자는 32비트 부동 수에 대해 허용 가능한 범위를 벗어납니다. + + + + This is not a valid numeric literal. Valid numeric literals include 1, 0x1, 0b0001 (int), 1u (uint32), 1L (int64), 1UL (uint64), 1s (int16), 1y (sbyte), 1uy (byte), 1.0 (float), 1.0f (float32), 1.0m (decimal), 1I (BigInteger). + 유효한 숫자 리터럴이 아닙니다. 유효한 숫자 리터럴로는 1, 0x1, 0b0001(int), 1u(uint32), 1L(int64), 1UL(uint64), 1s(int16), 1y(sbyte), 1uy(byte), 1.0(float), 1.0f(float32), 1.0m(decimal), 1I(BigInteger) 등이 있습니다. + + + + This is not a valid byte literal + 올바른 바이트 리터럴이 아닙니다. + + + + This is not a valid character literal + 올바른 문자 리터럴이 아닙니다. + + + + This Unicode encoding is only valid in string literals + 이 유니코드 인코딩은 문자열 리터럴에서만 올바릅니다. + + + + This token is reserved for future use + 이 토큰은 나중에 사용할 수 있도록 예약되었습니다. + + + + TABs are not allowed in F# code unless the #indent \"off\" option is used + #indent \"off\" 옵션을 사용하지 않는 한 TAB은 F# 코드에서 허용되지 않습니다. + + + + Invalid line number: '{0}' + 줄 번호가 잘못되었습니다. '{0}' + + + + #if directive must appear as the first non-whitespace character on a line + #if 지시문은 줄에서 공백이 아닌 첫 번째 문자로 나타나야 합니다. + + + + #else has no matching #if + #else와 짝이 맞는 #if가 없습니다. + + + + #endif required for #else + #endif에 #else가 필요합니다. + + + + #else directive must appear as the first non-whitespace character on a line + #else 지시문은 줄에서 공백이 아닌 첫 번째 문자로 나타나야 합니다. + + + + #endif has no matching #if + #endif와 짝이 맞는 #if가 없습니다. + + + + #endif directive must appear as the first non-whitespace character on a line + #endif 지시문은 줄에서 공백이 아닌 첫 번째 문자로 나타나야 합니다. + + + + #if directive should be immediately followed by an identifier + #if 바로 다음에는 식별자가 있어야 합니다. + + + + Syntax error. Wrong nested #endif, unexpected tokens before it. + 구문 오류입니다. 잘못된 중첩 #endif가 있으며 이 앞에 예기치 않은 토큰이 있습니다. + + + + #! may only appear as the first line at the start of a file. + #!는 파일 시작의 첫 번째 줄에만 나타날 수 있습니다. + + + + Expected single line comment or end of line + 한 줄로 된 주석이나 줄 끝이 필요합니다. + + + + Infix operator member '{0}' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ... + 중위 연산자 멤버 '{0}'에 인수가 없습니다. 2개 인수의 튜플이 필요합니다(예: 정적 멤버 (+) (x,y) = ...). + + + + Infix operator member '{0}' has {1} initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ... + 중위 연산자 멤버 '{0}'에 {1}개의 초기 인수가 있습니다. 2개 인수의 튜플이 필요합니다(예: 정적 멤버 (+) (x,y) = ...). + + + + Infix operator member '{0}' has extra curried arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ... + 중위 연산자 멤버 '{0}'에 커리된 추가 인수가 있습니다. 2개 인수의 튜플이 필요합니다(예: 정적 멤버 (+) (x,y) = ...). + + + + All record, union and struct types in FSharp.Core.dll must be explicitly labelled with 'StructuralComparison' or 'NoComparison' + FSharp.Core.dll의 레코드, 공용 구조체 및 구조체 형식에는 'StructuralComparison' 또는 'NoComparison'을 사용하여 명시적으로 레이블을 지정해야 합니다. + + + + The struct, record or union type '{0}' has the 'StructuralComparison' attribute but the type parameter '{1}' does not satisfy the 'comparison' constraint. Consider adding the 'comparison' constraint to the type parameter + 구조체, 레코드 또는 공용 구조체 형식 '{0}'에 'StructuralComparison' 특성이 있지만 형식 매개 변수 '{1}'이(가) 'comparison' 제약 조건을 만족하지 않습니다. 형식 매개 변수에 'comparison' 제약 조건을 추가하세요. + + + + The struct, record or union type '{0}' has the 'StructuralComparison' attribute but the component type '{1}' does not satisfy the 'comparison' constraint + 구조체, 레코드 또는 공용 구조체 형식 '{0}'에 'StructuralComparison' 특성이 있지만 구성 요소 형식 '{1}'이(가) 'comparison' 제약 조건을 만족하지 않습니다. + + + + The struct, record or union type '{0}' is not structurally comparable because the type parameter {1} does not satisfy the 'comparison' constraint. Consider adding the 'NoComparison' attribute to the type '{2}' to clarify that the type is not comparable + 형식 매개 변수 {1}이(가) 'comparison' 제약 조건을 만족하지 않으므로 구조체, 레코드 또는 공용 구조체 형식 '{0}'을(를) 구조적으로 비교할 수 없습니다. '{2}' 형식에 'NoComparison' 특성을 추가하여 해당 형식을 비교할 수 없음을 명확히 하세요. + + + + The struct, record or union type '{0}' is not structurally comparable because the type '{1}' does not satisfy the 'comparison' constraint. Consider adding the 'NoComparison' attribute to the type '{2}' to clarify that the type is not comparable + {1}' 형식이 'comparison' 제약 조건을 만족하지 않으므로 구조체, 레코드 또는 공용 구조체 형식 '{0}'을(를) 구조적으로 비교할 수 없습니다. '{2}' 형식에 'NoComparison' 특성을 추가하여 해당 형식을 비교할 수 없음을 명확히 하세요. + + + + The struct, record or union type '{0}' does not support structural equality because the type parameter {1} does not satisfy the 'equality' constraint. Consider adding the 'NoEquality' attribute to the type '{2}' to clarify that the type does not support structural equality + 형식 매개 변수 {1}이(가) 'equality' 제약 조건을 만족하지 않으므로 구조체, 레코드 또는 공용 구조체 형식 '{0}'이(가) 구조적 같음을 지원하지 않습니다. '{2}' 형식에 'NoEquality' 특성을 추가하여 해당 형식이 구조적 같음을 지원하지 않음을 명확히 하세요. + + + + The struct, record or union type '{0}' does not support structural equality because the type '{1}' does not satisfy the 'equality' constraint. Consider adding the 'NoEquality' attribute to the type '{2}' to clarify that the type does not support structural equality + {1}' 형식이 'equality' 제약 조건을 만족하지 않으므로 구조체, 레코드 또는 공용 구조체 형식 '{0}'이(가) 구조적 같음을 지원하지 않습니다. '{2}' 형식에 'NoEquality' 특성을 추가하여 해당 형식이 구조적 같음을 지원하지 않음을 명확히 하세요. + + + + The struct, record or union type '{0}' has the 'StructuralEquality' attribute but the type parameter '{1}' does not satisfy the 'equality' constraint. Consider adding the 'equality' constraint to the type parameter + 구조체, 레코드 또는 공용 구조체 형식 '{0}'에 'StructuralEquality' 특성이 있지만 형식 매개 변수 '{1}'이(가) 'equality' 제약 조건을 만족하지 않습니다. 형식 매개 변수에 'equality' 제약 조건을 추가하세요. + + + + The struct, record or union type '{0}' has the 'StructuralEquality' attribute but the component type '{1}' does not satisfy the 'equality' constraint + 구조체, 레코드 또는 공용 구조체 형식 '{0}'에 'StructuralEquality' 특성이 있지만 구성 요소 형식 '{1}'이(가) 'equality' 제약 조건을 만족하지 않습니다. + + + + Each argument of the primary constructor for a struct must be given a type, for example 'type S(x1:int, x2: int) = ...'. These arguments determine the fields of the struct. + 구조체의 주 생성자에 대한 각 인수에는 형식을 지정해야 합니다(예: 'type S(x1:int, x2: int) = ...'). 이러한 인수는 구조체의 필드를 결정합니다. + + + + The value '{0}' is unused + 값 '{0}'을(를) 사용하지 않습니다. + + + + The recursive object reference '{0}' is unused. The presence of a recursive object reference adds runtime initialization checks to members in this and derived types. Consider removing this recursive object reference. + 재귀적 개체 참조 '{0}'을(를) 사용하지 않습니다. 재귀적 개체 참조가 있으면 이 형식 및 파생 형식의 멤버에 대한 런타임 초기화 검사가 추가됩니다. 이 재귀적 개체 참조를 제거하세요. + + + + A getter property may have at most one argument group + getter 속성에는 인수 그룹이 최대 하나만 있을 수 있습니다. + + + + A setter property may have at most two argument groups + setter 속성에는 최대 2개의 인수 그룹이 있을 수 있습니다. + + + + Invalid property getter or setter + 속성 getter 또는 setter가 잘못되었습니다. + + + + An indexer property must be given at least one argument + 인덱서 속성에는 하나 이상의 인수가 지정되어야 합니다. + + + + This operation accesses a mutable top-level value defined in another assembly in an unsupported way. The value cannot be accessed through its address. Consider copying the expression to a mutable local, e.g. 'let mutable x = ...', and if necessary assigning the value back after the completion of the operation + 이 작업은 다른 어셈블리에 정의된 변경할 수 있는 최상위 값에 지원되지 않는 방식으로 액세스합니다. 이 값은 해당 주소를 통해 액세스할 수 없습니다. 식을 변경할 수 있는 로컬 변수로 복사하고(예: 'let mutable x = ...') 필요한 경우 작업이 완료된 후에 값을 다시 할당하세요. + + + + Remove spaces between the type name and type parameter, e.g. \"type C<'T>\", not type \"C <'T>\". Type parameters must be placed directly adjacent to the type name. + 형식 매개 변수는 형식 이름 바로 옆에 배치해야 합니다(예: type \"C <'T>\"가 아니라 \"type C<'T>\"). + + + + Remove spaces between the type name and type parameter, e.g. \"C<'T>\", not \"C <'T>\". Type parameters must be placed directly adjacent to the type name. + 형식 인수는 형식 이름 바로 옆에 배치해야 합니다(예: \"C <'T>\"가 아니라 \"C<'T>\"). + + + + The use of the type syntax 'int C' and 'C <int>' is not permitted here. Consider adjusting this type to be written in the form 'C<int>' + 형식 구문 'int C' 및 'C <int>'는 여기에 허용되지 않습니다. 이 형식이 'C<int>' 형식으로 작성되도록 조정하세요. + + + + The module/namespace '{0}' from compilation unit '{1}' did not contain the module/namespace '{2}' + 컴파일 단위 '{1}'의 '{0}' 모듈/네임스페이스에 '{2}' 모듈/네임스페이스가 없습니다. + + + + The module/namespace '{0}' from compilation unit '{1}' did not contain the val '{2}' + 컴파일 단위 '{1}'의 '{0}' 모듈/네임스페이스에 val '{2}'이(가) 없습니다. + + + + The module/namespace '{0}' from compilation unit '{1}' did not contain the namespace, module or type '{2}' + 컴파일 단위 '{1}'의 '{0}' 모듈/네임스페이스에 '{2}' 네임스페이스, 모듈 또는 형식이 없습니다. + + + + The 'UseNullAsTrueValue' attribute flag may only be used with union types that have one nullary case and at least one non-nullary case + 'UseNullAsTrueValue' 특성 플래그는 하나의 nullary 케이스와 하나 이상의 nullary가 아닌 케이스를 포함하는 공용 구조체 형식에만 사용할 수 있습니다. + + + + The parameter '{0}' was inferred to have byref type. Parameters of byref type must be given an explicit type annotation, e.g. 'x1: byref<int>'. When used, a byref parameter is implicitly dereferenced. + '{0}' 매개 변수가 byref 형식으로 유추되었습니다. byref 형식의 매개 변수에는 명시적인 형식 주석(예: 'x1: byref<int>')이 지정되어야 합니다. byref 매개 변수는 사용될 경우 암시적으로 역참조됩니다. + + + + The generic member '{0}' has been used at a non-uniform instantiation prior to this program point. Consider reordering the members so this member occurs first. Alternatively, specify the full type of the member explicitly, including argument types, return type and any additional generic parameters and constraints. + 제네릭 멤버 '{0}'이(가) 이 프로그램 지점 전의 비균일 인스턴스화에 사용되었습니다. 이 멤버가 처음에 오도록 멤버들을 다시 정렬해 보세요. 또는, 인수 형식, 반환 형식 및 추가 제네릭 매개 변수와 제약 조건을 포함한 멤버의 전체 형식을 명시적으로 지정하세요. + + + + The attribute '{0}' appears in both the implementation and the signature, but the attribute arguments differ. Only the attribute from the signature will be included in the compiled code. + '{0}' 특성이 구현과 시그니처 모두에 나타나지만 특성 인수가 다릅니다. 컴파일된 코드에는 시그니처에 있는 특성만 포함됩니다. + + + + Cannot call an abstract base member: '{0}' + 추상 기본 멤버를 호출할 수 없습니다. '{0}' + + + + Could not resolve the ambiguity in the use of a generic construct with an 'unmanaged' constraint at or near this position + 이 위치 또는 이 위치 근처에서 'unmanaged' 제약 조건을 사용하여 제네릭 구문 사용의 모호성을 해결할 수 없습니다. + + + + This construct is for ML compatibility. {0}. You can disable this warning by using '--mlcompatibility' or '--nowarn:62'. + 이 구문은 ML 호환성을 위해 사용됩니다. {0}. 이 경고가 나타나지 않게 하려면 '--mlcompatibility' 또는 '--nowarn:62'를 사용합니다. + + + + The type '{0}' has been marked as having an Explicit layout, but the field '{1}' has not been marked with the 'FieldOffset' attribute + {0}' 형식이 명시적 레이아웃을 포함한다고 표시되어 있지만 '{1}' 필드가 'FieldOffset' 특성으로 표시되어 있지 않습니다. + + + + Interfaces inherited by other interfaces should be declared using 'inherit ...' instead of 'interface ...' + 다른 인터페이스에서 상속된 인터페이스는 'interface ...' 대신 'inherit ...'를 사용하여 선언해야 합니다. + + + + Invalid prefix operator + 잘못된 전위 연산자 + + + + Invalid operator definition. Prefix operator definitions must use a valid prefix operator name. + 잘못된 연산자 정의입니다. 전위 연산자 정의에서는 유효한 전위 연산자 이름을 사용해야 합니다. + + + + The file extensions '.ml' and '.mli' are for ML compatibility + 파일 확장명 '.ml' 및 '.mli'는 ML 호환성을 위한 것입니다. + + + + Consider using a file with extension '.ml' or '.mli' instead + 대신 확장명이 '.ml' 또는 '.mli'인 파일을 사용해 보세요. + + + + Active pattern '{0}' is not a function + 활성 패턴 '{0}'이(가) 함수가 아닙니다. + + + + Active pattern '{0}' 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' + 활성 패턴 '{0}'에 입력으로 확인되지 않는 형식 변수가 포함된 결과 형식이 있습니다. 이는 일반적으로 결과 케이스가 지정되지 않은 경우 발생합니다(예 'let (|A|B|) (x:int) = A x'). 이 문제는 형식 제약 조건을 지정하여 해결할 수 있습니다(예: 'let (|A|B|) (x:int) : Choice<int,unit> = A x'). + + + + The FieldOffset attribute can only be placed on members of types marked with the StructLayout(LayoutKind.Explicit) + FieldOffset 특성은 StructLayout(LayoutKind.Explicit)으로 표시된 형식의 멤버에만 배치할 수 있습니다. + + + + Optional arguments must come at the end of the argument list, after any non-optional arguments + 선택적 인수는 비선택적 인수 다음의 인수 목록 끝에 와야 합니다. + + + + Attribute 'System.Diagnostics.ConditionalAttribute' is only valid on methods or attribute classes + 'System.Diagnostics.ConditionalAttribute' 특성은 메서드 또는 특성 클래스에만 사용할 수 있습니다. + + + + Extension members cannot provide operator overloads. Consider defining the operator as part of the type definition instead. + 확장 멤버가 연산자 오버로드를 제공할 수 없습니다. 대신 연산자를 형식 정의의 일부분으로 정의하세요. + + + + The name of the MDB file must be <assembly-file-name>.mdb. The --pdb option will be ignored. + MDB 파일의 이름은 <어셈블리 파일 이름>.mdb여야 합니다. --pdb 옵션은 무시됩니다. + + + + MDB generation failed. Could not find compatible member {0} + MDB를 생성하지 못했습니다. 호환 멤버 {0}을(를) 찾을 수 없습니다. + + + + Cannot generate MDB debug information. Failed to load the 'MonoSymbolWriter' type from the 'Mono.CompilerServices.SymbolWriter.dll' assembly. + MDB 디버그 정보를 생성할 수 없습니다. 'Mono.CompilerServices.SymbolWriter.dll' 어셈블리에서 'MonoSymbolWriter' 형식을 로드하지 못했습니다. + + + + The union case named '{0}' conflicts with the generated type '{1}' + 이름이 '{0}'인 공용 구조체가 생성된 형식 '{1}'과(와) 충돌합니다. + + + + ReflectedDefinitionAttribute may not be applied to an instance member on a struct type, because the instance member takes an implicit 'this' byref parameter + ReflectedDefinitionAttribute를 구조체 형식 인스턴스 멤버에 적용할 수 없습니다. 해당 인스턴스 멤버가 암시적 'this' byref 매개 변수를 사용합니다. + + + + DLLImport bindings must be static members in a class or function definitions in a module + DLLImport 바인딩은 모듈의 클래스 또는 함수 정의에서 정적 멤버여야 합니다. + + + + When mscorlib.dll or FSharp.Core.dll is explicitly referenced the {0} option must also be passed + mscorlib.dll 또는 FSharp.Core.dll이 명시적으로 참조될 경우 {0} 옵션도 전달해야 합니다. + + + + FSharp.Core.sigdata not found alongside FSharp.Core. File expected in {0}. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required. + FSharp.Core에서 FSharp.Core.sigdata를 찾을 수 없습니다. 파일이 {0}에 있어야 합니다. 이 파일이 더 이상 필요하지 않은 최신 버전의 FSharp.Core로의 업그레이드를 고려해 보세요. + + + + File '{0}' not found alongside FSharp.Core. File expected in {1}. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required. + FSharp.Core에서 '{0}' 파일을 찾을 수 없습니다. 파일이 {1}에 있어야 합니다. 이 파일이 더 이상 필요하지 않은 최신 버전의 FSharp.Core로의 업그레이드를 고려해 보세요. + + + + Filename '{0}' contains invalid character '{1}' + 파일 이름 '{0}'에 잘못된 문자('{1}')가 있습니다. + + + + 'use!' bindings must be of the form 'use! <var> = <expr>' + 'use!' 바인딩은 'use! <var> = <expr>' 형식이어야 합니다. + + + + Inner generic functions are not permitted in quoted expressions. Consider adding some type constraints until this function is no longer generic. + 내부 제네릭 함수는 따옴표 붙은 식에 허용되지 않습니다. 이 함수가 더 이상 제네릭 형식이 아닐 때까지 형식 제약 조건을 추가하세요. + + + + The type '{0}' is not a valid enumerator type , i.e. does not have a 'MoveNext()' method returning a bool, and a 'Current' property + '{0}' 형식은 올바른 열거자 형식이 아닙니다(예: 부울을 반환하는 'MoveNext()' 메서드와 'Current' 속성이 포함되어 있지 않음). + + + + End of file in triple-quote string begun at or before here + 3중 따옴표 문자열의 파일 끝이 여기나 그 앞에서 시작됩니다. + + + + End of file in triple-quote string embedded in comment begun at or before here + 주석에 포함된 3중 따옴표 문자열의 파일 끝이 여기나 그 앞에서 시작됩니다. + + + + This type test or downcast will ignore the unit-of-measure '{0}' + 이 형식 테스트 또는 다운캐스트는 '{0}' 측정 단위를 무시합니다. + + + + Expected type argument or static argument + 형식 인수 또는 정적 인수가 필요합니다. + + + + Unmatched '<'. Expected closing '>' + '<'가 일치하지 않습니다. 닫는 '>'가 필요합니다. + + + + Unexpected quotation operator '<@' in type definition. If you intend to pass a verbatim string as a static argument to a type provider, put a space between the '<' and '@' characters. + 형식 정의에 예기치 않은 인용구 연산자 '<@'가 있습니다. 축자 문자열을 정적 인수로 형식 공급자에 전달하려면 '<'와 '@' 문자 사이에 공백을 추가하세요. + + + + Attempted to parse this as an operator name, but failed + 이 항목을 연산자 이름으로 구문 분석하려고 했지만 실패했습니다. + + + + \U{0} is not a valid Unicode character escape sequence + \U{0}은(는) 유효한 유니코드 문자 이스케이프 시퀀스가 아닙니다. + + + + '{0}' must be applied to an argument of type '{1}', but has been applied to an argument of type '{2}' + '{0}'은(는) '{1}' 형식의 인수에 적용되어야 하지만 '{2}' 형식의 인수에 적용되었습니다. + + + + '{0}' can only be applied to optional arguments + '{0}'은(는) 선택적 인수에만 적용할 수 있습니다. + + + + The specified .NET Framework version '{0}' is not supported. Please specify a value from the enumeration Microsoft.Build.Utilities.TargetDotNetFrameworkVersion. + 지정한 .NET Framework 버전 "{0}"은(는) 지원되지 않습니다. Microsoft.Build.Utilities.TargetDotNetFrameworkVersion 열거형의 값을 지정하세요. + + + + Invalid Magic value in CLR Header + CLR 헤더의 잘못된 매직 값 + + + + Bad image format + 잘못된 이미지 형식 + + + + Private key expected + 개인 키가 필요합니다. + + + + RSA key expected + RSA 키가 필요합니다. + + + + Invalid bit Length + 잘못된 비트 길이 + + + + Invalid RSAParameters structure - '{{0}}' expected + 잘못된 RSAParameters 구조 - '{{0}}'이(가) 필요합니다. + + + + Invalid algId - 'Exponent' expected + 잘못된 algId - '지수'가 필요합니다. + + + + Invalid signature size + 잘못된 서명 크기 + + + + No signature directory + 서명 디렉터리가 없습니다. + + + + Invalid Public Key blob + 잘못된 공개 키 Blob + + + + Exiting - too many errors + 끝내는 중 - 오류가 너무 많습니다. + + + + The documentation file has no .xml suffix + 문서 파일에 .xml 접미사가 없습니다. + + + + No implementation files specified + 지정된 구현 파일이 없습니다. + + + + The attribute {0} specified version '{1}', but this value is invalid and has been ignored + 특성 {0}이(가) 버전 '{1}'을(를) 지정했지만, 이 값이 잘못되어 무시되었습니다. + + + + Conflicting options specified: 'win32manifest' and 'win32res'. Only one of these can be used. + 지정된 옵션 'win32manifest'와 'win32res'가 충돌합니다. 둘 중 하나만 사용할 수 있습니다. + + + + The code in assembly '{0}' makes uses of quotation literals. Static linking may not include components that make use of quotation literals unless all assemblies are compiled with at least F# 4.0. + 어셈블리 '{0}'의 코드에서 따옴표로 묶인 리터럴을 사용합니다. 정적 링크에서는 모든 어셈블리가 최소 F# 4.0으로 컴파일된 경우가 아니라면 따옴표로 묶인 리터럴을 사용하는 구성 요소를 포함할 수 없습니다. + + + + Code in this assembly makes uses of quotation literals. Static linking may not include components that make use of quotation literals unless all assemblies are compiled with at least F# 4.0. + 이 어셈블리의 코드에서 따옴표로 묶인 리터럴을 사용합니다. 정적 링크에서는 모든 어셈블리가 최소 F# 4.0으로 컴파일된 경우가 아니라면 따옴표로 묶인 리터럴을 사용하는 구성 요소를 포함할 수 없습니다. + + + + Static linking may not include a .EXE + 정적 링크에는 .EXE를 포함할 수 없습니다. + + + + Static linking may not include a mixed managed/unmanaged DLL + 정적 링크에는 관리되는/관리되지 않는 형식이 혼합된 DLL을 포함할 수 없습니다. + + + + Ignoring mixed managed/unmanaged assembly '{0}' during static linking + 정적 링크 중에 관리되는/관리되지 않는 어셈블리가 혼합된 '{0}'을(를) 무시합니다. + + + + Assembly '{0}' was referenced transitively and the assembly could not be resolved automatically. Static linking will assume this DLL has no dependencies on the F# library or other statically linked DLLs. Consider adding an explicit reference to this DLL. + 어셈블리 '{0}'이(가) 타동적으로 참조되었으며 어셈블리를 자동으로 확인할 수 없습니다. 정적 링크에서는 이 DLL에 F# 라이브러리나 다른 정적 링크 DLL에 대한 종속성이 없다고 가정합니다. 이 DLL에 대한 명시적 참조를 추가하는 것이 좋습니다. + + + + Assembly '{0}' not found in dependency set of target binary. Statically linked roots should be specified using an assembly name, without a DLL or EXE extension. If this assembly was referenced explicitly then it is possible the assembly was not actually required by the generated binary, in which case it should not be statically linked. + 대상 이진 파일의 종속성 집합에서 어셈블리 '{0}'을(를) 찾지 못했습니다. 정적으로 링크된 루트는 DLL 또는 EXE 확장명이 없는 상태로 어셈블리 이름을 사용하여 지정해야 합니다. 이 어셈블리가 명시적으로 참조된 경우 생성된 이진 파일에서 실제로 필요하지 않을 수 있습니다. 이런 경우에는 정적으로 링크하지 마세요. + + + + The key file '{0}' could not be opened + 키 파일 '{0}'을(를) 열 수 없습니다. + + + + A problem occurred writing the binary '{0}': {1} + 이진 파일 '{0}'을(를) 쓰는 동안 오류가 발생했습니다. {1} + + + + The 'AssemblyVersionAttribute' has been ignored because a version was given using a command line option + 명령줄 옵션을 사용하여 버전을 지정했기 때문에 'AssemblyVersionAttribute'가 무시되었습니다. + + + + Error emitting 'System.Reflection.AssemblyCultureAttribute' attribute -- 'Executables cannot be satellite assemblies, Culture should always be empty' + 'System.Reflection.AssemblyCultureAttribute' 특성을 내보내는 동안 오류 발생 -- '실행 파일은 위성 어셈블리일 수 없습니다. 문화권은 항상 비어 있어야 합니다.' + + + + Option '--delaysign' overrides attribute 'System.Reflection.AssemblyDelaySignAttribute' given in a source file or added module + '--delaysign' 옵션은 소스 파일이나 추가 모듈에 지정된 'System.Reflection.AssemblyDelaySignAttribute' 특성을 재정의합니다. + + + + Option '--keyfile' overrides attribute 'System.Reflection.AssemblyKeyFileAttribute' given in a source file or added module + '--keyfile' 옵션은 소스 파일 또는 추가 모듈에 지정된 'System.Reflection.AssemblyKeyFileAttribute' 특성을 재정의합니다. + + + + Option '--keycontainer' overrides attribute 'System.Reflection.AssemblyNameAttribute' given in a source file or added module + '--keycontainer' 옵션은 소스 파일이나 추가 모듈에 지정된 'System.Reflection.AssemblyNameAttribute' 특성을 재정의합니다. + + + + The assembly '{0}' is listed on the command line. Assemblies should be referenced using a command line flag such as '-r'. + '{0}' 어셈블리가 명령줄에 나열되어 있습니다. '-r'과 같은 명령줄 플래그를 사용하여 어셈블리를 참조해야 합니다. + + + + The resident compilation service was not used because a problem occured in communicating with the server. + 서버와 통신하는 동안 문제가 발생하여 상주 컴파일 서비스를 사용하지 않았습니다. + + + + Problem with filename '{0}': Illegal characters in path. + 파일 이름 '{0}'에 문제가 있습니다. 경로에 잘못된 문자가 있습니다. + + + + Passing a .resx file ({0}) as a source file to the compiler is deprecated. Use resgen.exe to transform the .resx file into a .resources file to pass as a --resource option. If you are using MSBuild, this can be done via an <EmbeddedResource> item in the .fsproj project file. + 더 이상 .resx 파일({0})이 컴파일러에 소스 파일로 사용되지 않습니다. resgen.exe를 사용하여 .resx 파일을 .resources 파일로 변환해 --resource 옵션으로 전달하세요. MSBuild를 사용하는 경우 .fsproj 프로젝트 파일의 <EmbeddedResource> 항목을 통해 이 작업을 수행할 수 있습니다. + + + + Static linking may not be used on an assembly referencing mscorlib (e.g. a .NET Framework assembly) when generating an assembly that references System.Runtime (e.g. a .NET Core or Portable assembly). + System.Runtime을 참조하는 어셈블리(예: .NET Core 또는 이식 가능한 어셈블리)를 생성할 때 mscorlib를 참조하는 어셈블리(예: .NET Framework 어셈블리)에서 정적 링크를 사용할 수 없습니다. + + + + An {0} specified version '{1}', but this value is a wildcard, and you have requested a deterministic build, these are in conflict. + {0}이(가) '{1}' 버전을 지정했지만, 이 값은 와일드카드인데 사용자가 결정적 빌드를 요청하여 문제가 발생했습니다. + + + + Determinstic builds only support portable PDBs (--debug:portable or --debug:embedded) + 결정적 빌드는 이식 가능한 PDB만 지원합니다(--debug:portable 또는 --debug:embedded). + + + + Character '{0}' is not allowed in provided namespace name '{1}' + 제공된 네임스페이스 이름 '{1}'에는 '{0}' 문자를 사용할 수 없습니다. + + + + The provided type '{0}' returned a member with a null or empty member name + 제공된 '{0}' 형식에서 멤버 이름이 비어 있거나 null인 멤버를 반환했습니다. + + + + The provided type '{0}' returned a null member + 제공된 '{0}' 형식에서 null 멤버를 반환했습니다. + + + + The provided type '{0}' member info '{1}' has null declaring type + 제공된 '{0}' 형식의 멤버 정보('{1}')에 null 선언 형식이 있습니다. + + + + The provided type '{0}' has member '{1}' which has declaring type '{2}'. Expected declaring type to be the same as provided type. + 제공된 '{0}' 형식에 포함된 멤버 '{1}'의 선언 형식이 '{2}'입니다. 제공된 형식과 같은 선언 형식이 필요합니다. + + + + Referenced assembly '{0}' has assembly level attribute '{1}' but no public type provider classes were found + 참조된 '{0}' 어셈블리에 어셈블리 수준 특성 '{1}'이(가) 있지만 공용 형식 공급자 클래스는 없습니다. + + + + Type '{0}' from type provider '{1}' has an empty namespace. Use 'null' for the global namespace. + 형식 공급자 '{1}' 의 형식 '{0}'에 빈 네임스페이스가 있습니다. 전역 네임스페이스에 대해 'null'을 사용하세요. + + + + Empty namespace found from the type provider '{0}'. Use 'null' for the global namespace. + 형식 공급자 '{0}'에 빈 네임스페이스가 있습니다. 전역 네임스페이스에 대해 'null'을 사용하세요. + + + + Provided type '{0}' has 'IsGenericType' as true, but generic types are not supported. + 제공된 '{0}' 형식의 'IsGenericType'이 true인데 제네릭 형식이 지원되지 않습니다. + + + + Provided type '{0}' has 'IsArray' as true, but array types are not supported. + 제공된 '{0}' 형식의 'IsArray'가 true인데 배열 형식이 지원되지 않습니다. + + + + Invalid member '{0}' on provided type '{1}'. Provided type members must be public, and not be generic, virtual, or abstract. + 제공된 '{1}' 형식에 잘못된 멤버('{0}')가 있습니다. 제공된 형식 멤버는 공용이어야 하며 제네릭, 가상 또는 추상 멤버여서는 안 됩니다. + + + + Invalid member '{0}' on provided type '{1}'. Only properties, methods and constructors are allowed + 제공된 형식 '{1}'의 '{0}' 멤버가 잘못되었습니다. 속성, 메서드 및 생성자만 허용됩니다. + + + + Property '{0}' on provided type '{1}' has CanRead=true but there was no value from GetGetMethod() + 제공된 '{1}' 형식의 '{0}' 속성에서 CanRead=true인데 GetGetMethod()의 값이 없습니다. + + + + Property '{0}' on provided type '{1}' has CanRead=false but GetGetMethod() returned a method + 제공된 '{1}' 형식의 '{0}' 속성에서 CanRead=false인데 GetGetMethod()에서 메서드를 반환했습니다. + + + + Property '{0}' on provided type '{1}' has CanWrite=true but there was no value from GetSetMethod() + 제공된 '{1}' 형식의 '{0}' 속성에서 CanWrite=true인데 GetSetMethod()의 값이 없습니다. + + + + Property '{0}' on provided type '{1}' has CanWrite=false but GetSetMethod() returned a method + 제공된 '{1}' 형식의 '{0}' 속성에서 CanWrite=fa인데 GetSetMethod()에서 메서드를 반환했습니다. + + + + One or more errors seen during provided type setup + 제공된 형식을 설정하는 동안 하나 이상의 오류가 확인되었습니다. + + + + Unexpected exception from provided type '{0}' member '{1}': {2} + 제공된 형식 '{0}' 멤버 '{1}'에서 예기치 않은 예외가 발생했습니다. {2} + + + + Unsupported constant type '{0}'. Quotations provided by type providers can only contain simple constants. The implementation of the type provider may need to be adjusted by moving a value declared outside a provided quotation literal to be a 'let' binding inside the quotation literal. + 지원되지 않는 상수 형식 '{0}'입니다. 형식 공급자가 제공하는 인용에는 간단한 상수만 포함될 수 있습니다. 인용구 리터럴 내에서 'let' 바인딩이 되려면 선언된 값을 제공된 인용구 리터럴 밖으로 이동시켜 형식 공급자의 구현을 조정해야 합니다. + + + + Unsupported expression '{0}' from type provider. If you are the author of this type provider, consider adjusting it to provide a different provided expression. + 형식 공급자의 '{0}' 식은 지원되지 않습니다. 이 형식 공급자의 작성자인 경우 제공된 다른 식을 제공하도록 조정하세요. + + + + Expected provided type named '{0}' but provided type has 'Name' with value '{1}' + 이름이 '{0}'인 제공된 형식이 필요한데 제공된 형식의 'Name' 값은 '{1}'입니다. + + + + Event '{0}' on provided type '{1}' has no value from GetAddMethod() + 제공된 형식 '{1}'에 대한 이벤트 '{0}'에 GetAddMethod()의 값이 없습니다. + + + + Event '{0}' on provided type '{1}' has no value from GetRemoveMethod() + 제공된 형식 '{1}'에 대한 이벤트 '{0}'에 GetRemoveMethod()의 값이 없습니다. + + + + Assembly attribute '{0}' refers to a designer assembly '{1}' which cannot be loaded or doesn't exist. {2} + {0}' 어셈블리 특성이 로드할 수 없거나 존재하지 않는 디자이너 어셈블리'{1}'을(를) 참조합니다. {2} + + + + The type provider does not have a valid constructor. A constructor taking either no arguments or one argument of type 'TypeProviderConfig' was expected. + 형식 공급자에 올바른 생성자가 없습니다. 인수를 사용하지 않거나 'TypeProviderConfig' 형식의 인수 하나를 사용하는 생성자가 필요합니다. + + + + The type provider '{0}' reported an error: {1} + {0}' 형식 공급자가 오류를 보고했습니다. {1} + + + + The type provider '{0}' used an invalid parameter in the ParameterExpression: {1} + {0}' 형식 공급자가 ParameterExpression에서 잘못된 매개 변수를 사용했습니다. {1} + + + + The type provider '{0}' provided a method with a name '{1}' and metadata token '{2}', which is not reported among its methods of its declaring type '{3}' + {0}' 형식 공급자가 이름이 '{1}'이고 메타데이터 토큰이 '{2}'인 메서드를 제공했는데, 이는 해당 선언 형식 '{3}'의 메서드에서 보고되지 않습니다. + + + + The type provider '{0}' provided a constructor which is not reported among the constructors of its declaring type '{1}' + 선언 형식('{1}')의 생성자로부터 보고되지 않은 생성자를 형식 공급자 '{0}'에서 제공했습니다. + + + + A direct reference to the generated type '{0}' is not permitted. Instead, use a type definition, e.g. 'type TypeAlias = <path>'. This indicates that a type provider adds generated types to your assembly. + 생성된 형식 '{0}'을(를) 직접 참조할 수는 없습니다. 형식 정의를 사용하십시오(예: 'type TypeAlias = <path>'). 이 정의는 형식 공급자가 생성된 형식을 어셈블리에 추가함을 나타냅니다. + + + + Expected provided type with path '{0}' but provided type has path '{1}' + 경로가 '{0}'인 제공된 형식이 필요한데 제공된 형식의 경로는 '{1}'입니다. + + + + Unexpected 'null' return value from provided type '{0}' member '{1}' + 제공된 형식 '{0}' 멤버 '{1}'에 예기치 않은 'null' 반환 값이 있습니다. + + + + Unexpected exception from member '{0}' of provided type '{1}' member '{2}': {3} + 제공된 형식 '{1}' 멤버 '{2}'의 멤버 '{0}'에서 예기치 않은 예외가 발생했습니다. {3} + + + + Nested provided types do not take static arguments or generic parameters + 제공된 중첩 형식은 정적 인수 또는 제네릭 매개 변수를 사용하지 않습니다. + + + + Invalid static argument to provided type. Expected an argument of kind '{0}'. + 제공된 형식에 대한 정적 인수가 잘못되었습니다. '{0}' 종류의 인수가 필요합니다. + + + + An error occured applying the static arguments to a provided type + 제공된 형식에 정적 인수를 적용하는 동안 오류가 발생했습니다. + + + + Unknown static argument kind '{0}' when resolving a reference to a provided type or method '{1}' + 제공된 형식 또는 메서드 '{1}'에 대한 참조를 확인할 때 알 수 없는 정적 인수 종류('{0}')가 발견되었습니다. + + + + invalid namespace for provided type + 제공된 형식의 네임스페이스가 잘못되었습니다. + + + + invalid full name for provided type + 제공된 형식의 전체 이름이 잘못되었습니다. + + + + The type provider returned 'null', which is not a valid return value from '{0}' + 형식 공급자가 'null'을 반환했습니다. 이 값은 '{0}'(으)로부터의 올바른 반환 값이 아닙니다. + + + + The type provider constructor has thrown an exception: {0} + 형식 공급자 생성자에서 예외가 발생했습니다. {0} + + + + Type provider '{0}' returned null from GetInvokerExpression. + '{0}' 형식 공급자가 GetInvokerExpression에서 null을 반환했습니다. + + + + The type provider '{0}' returned an invalid type from 'ApplyStaticArguments'. A type with name '{1}' was expected, but a type with name '{2}' was returned. + 형식 공급자 '{0}'이(가) 'ApplyStaticArguments'에서 잘못된 형식을 반환했습니다. 이름이 '{1}'인 형식이 필요한데 이름이 '{2}'인 형식이 반환되었습니다. + + + + The type provider '{0}' returned an invalid method from 'ApplyStaticArgumentsForMethod'. A method with name '{1}' was expected, but a method with name '{2}' was returned. + {0}' 형식 공급자가 잘못된 메서드를 'ApplyStaticArgumentsForMethod'에서 반환했습니다. '{1}'라는 메서드를 예상했지만 '{2}'라는 메서드가 반환되었습니다. + + + + This type test or downcast will erase the provided type '{0}' to the type '{1}' + 이 형식 테스트 또는 다운캐스트는 제공된 '{0}' 형식을 '{1}' 형식으로 지웁니다. + + + + This downcast will erase the provided type '{0}' to the type '{1}'. + 이 다운캐스트는 제공된 '{0}' 형식을 '{1}' 형식으로 지웁니다. + + + + This type test with a provided type '{0}' is not allowed because this provided type will be erased to '{1}' at runtime. + 제공된 형식 '{0}'이(가) 포함된 이 형식 테스트는 허용되지 않습니다. 이 제공된 형식은 런타임에 '{1}'(으)로 지워집니다. + + + + Cannot inherit from erased provided type + 지워진 제공된 형식에는 상속될 수 없습니다. + + + + Assembly '{0}' hase TypeProviderAssembly attribute with invalid value '{1}'. The value should be a valid assembly name + {0}' 어셈블리에 포함된 TypeProviderAssembly 특성의 값('{1}')이 잘못되었습니다. 값은 올바른 어셈블리 이름이어야 합니다. + + + + Invalid member name. Members may not have name '.ctor' or '.cctor' + 멤버 이름이 잘못되었습니다. 멤버 이름은 '.ctor' 또는 '.cctor'일 수 없습니다. + + + + The function or member '{0}' is used in a way that requires further type annotations at its definition to ensure consistency of inferred types. The inferred signature is '{1}'. + {0}' 함수 또는 멤버는 유추된 형식의 일관성을 유지하기 위해 해당 정의에서 형식 주석을 더 추가해야 하는 방식으로 사용됩니다. 유추된 서명은 '{1}'입니다. + + + + The number of type arguments did not match: '{0}' given, '{1}' expected. This may be related to a previously reported error. + 형식 인수의 수가 일치하지 않습니다. '{0}'개가 제공되었는데 '{1}'개가 필요합니다. 이전에 보고된 오류와 관련된 현상일 수 있습니다. + + + + Cannot override inherited member '{0}' because it is sealed + 상속된 '{0}' 멤버는 봉인되어 있으므로 재정의할 수 없습니다. + + + + The type provider '{0}' reported an error in the context of provided type '{1}', member '{2}'. The error: {3} + {0}' 형식 공급자가 제공된 형식 '{1}', 멤버 '{2}'의 컨텍스트에서 오류를 보고했습니다. 오류는 {3}입니다. + + + + An exception occurred when accessing the '{0}' of a provided type: {1} + 제공된 형식 {1}의 '{0}'에 액세스하는 동안 예외가 발생했습니다. + + + + The '{0}' of a provided type was null or empty. + 제공된 형식의 '{0}'이 null이거나 비어 있습니다. + + + + Character '{0}' is not allowed in provided type name '{1}' + 제공된 형식 이름 '{1}'에는 '{0}' 문자를 사용할 수 없습니다. + + + + In queries, '{0}' must use a simple pattern + 쿼리에서 '{0}'은(는) 단순 패턴을 사용해야 합니다. + + + + A custom query operation for '{0}' is required but not specified + '{0}'에 대한 사용자 지정 쿼리 연산이 필요한데 지정되지 않았습니다. + + + + Named static arguments must come after all unnamed static arguments + 명명되지 않은 모든 정적 인수 뒤에는 명명된 정적 인수가 와야 합니다. + + + + The static parameter '{0}' of the provided type or method '{1}' requires a value. Static parameters to type providers may be optionally specified using named arguments, e.g. '{2}<{3}=...>'. + 제공된 형식 또는 메서드 '{1}'의 정적 매개 변수 '{0}'에 값이 필요합니다. 명명된 인수(예: '{2}<{3}=...>')를 사용하여 형식 공급자에 대한 정적 매개 변수를 선택적으로 지정할 수 있습니다. + + + + No static parameter exists with name '{0}' + 이름이 '{0}'인 정적 매개 변수가 없습니다. + + + + The static parameter '{0}' has already been given a value + 정적 매개 변수 '{0}'에 이미 값이 제공되었습니다. + + + + Multiple static parameters exist with name '{0}' + 이름이 '{0}'인 정적 매개 변수가 여러 개 있습니다. + + + + A custom operation may not be used in conjunction with a non-value or recursive 'let' binding in another part of this computation expression + 사용자 지정 연산은 이 계산 식의 다른 부분에 있는 값이 아니거나 재귀적인 'let' 바인딩과 함께 사용할 수 없습니다. + + + + A custom operation may not be used in conjunction with 'use', 'try/with', 'try/finally', 'if/then/else' or 'match' operators within this computation expression + 이 계산 식 내에서 사용자 지정 연산을 'use', 'try/with', 'try/finally', 'if/then/else' or 'match' 연산자와 함께 사용할 수 없습니다. + + + + The custom operation '{0}' refers to a method which is overloaded. The implementations of custom operations may not be overloaded. + 사용자 지정 연산 '{0}'에서 오버로드된 메서드를 참조합니다. 사용자 지정 연산의 구현은 오버로드될 수 없습니다. + + + + An if/then/else expression may not be used within queries. Consider using either an if/then expression, or use a sequence expression instead. + if/then/else 식은 쿼리 내에서 사용할 수 없습니다. 대신 if/then 식을 사용하거나 시퀀스 식을 사용해 보세요. + + + + Invalid argument to 'methodhandleof' during codegen + 코드 생성 중에 'methodhandleof'에 대한 잘못된 인수가 발견되었습니다. + + + + A reference to a provided type was missing a value for the static parameter '{0}'. You may need to recompile one or more referenced assemblies. + 제공된 형식에 대한 참조에서 정적 매개 변수 '{0}'의 값이 누락되었습니다. 참조되는 어셈블리를 하나 이상 다시 컴파일해야 할 수 있습니다. + + + + A reference to a provided type had an invalid value '{0}' for a static parameter. You may need to recompile one or more referenced assemblies. + 제공된 형식에 대한 참조의 값('{0}')이 정적 매개 변수에 대해 잘못되었습니다. 참조되는 어셈블리를 하나 이상 다시 컴파일해야 할 수 있습니다. + + + + '{0}' is not used correctly. This is a custom operation in this query or computation expression. + '{0}'이(가) 잘못 사용되었습니다. 이 항목은 이 쿼리 또는 계산 식의 사용자 지정 연산입니다. + + + + '{0}' is not used correctly. Usage: {1}. This is a custom operation in this query or computation expression. + '{0}'이(가) 잘못 사용되었습니다. 사용법: {1}. 이 항목은 이 쿼리 또는 계산 식의 사용자 지정 연산입니다. + + + + {0} var in collection {1} (outerKey = innerKey). Note that parentheses are required after '{2}' + {0} var in collection {1} (outerKey = innerKey). '{2}' 다음에 괄호가 필요합니다. + + + + {0} var in collection {1} (outerKey = innerKey) into group. Note that parentheses are required after '{2}' + 그룹에 {0} var in collection {1} (outerKey = innerKey). '{2}' 다음에 괄호가 필요합니다. + + + + {0} var in collection + {0} var in collection + + + + '{0}' must be followed by a variable name. Usage: {1}. + '{0}' 뒤에는 변수 이름이 와야 합니다. 사용법: {1}. + + + + Incorrect syntax for '{0}'. Usage: {1}. + {0}' 구문이 잘못되었습니다. 사용법: {1}. + + + + '{0}' must come after a 'for' selection clause and be followed by the rest of the query. Syntax: ... {1} ... + '{0}' 앞에는 'for' 선택 절이 와야 하고 뒤에는 나머지 쿼리 부분이 와야 합니다. 구문: ... {1} ... + + + + '{0}' is used with an incorrect number of arguments. This is a custom operation in this query or computation expression. Expected {1} argument(s), but given {2}. + '{0}'에 사용된 인수의 수가 잘못되었습니다. 이 항목은 이 쿼리나 계산 식의 사용자 지정 연산입니다. {1}개의 인수가 필요한데 {2}개가 제공되었습니다. + + + + Expected an expression after this point + 이 지점 뒤에 식이 필요합니다. + + + + Expected a type after this point + 이 지점 뒤에 형식이 필요합니다. + + + + Unmatched '[<'. Expected closing '>]' + '[<'의 짝이 맞지 않습니다. 닫는 '>]'가 필요합니다. + + + + Unexpected end of input in 'match' expression. Expected 'match <expr> with | <pat> -> <expr> | <pat> -> <expr> ...'. + 'match' 식에 예기치 않은 입력의 끝이 있습니다. 'match <expr> with | <pat> -> <expr> | <pat> -> <expr> ...'이 필요합니다. + + + + Unexpected end of input in 'try' expression. Expected 'try <expr> with <rules>' or 'try <expr> finally <expr>'. + 'try' 식에 예기치 않은 입력의 끝이 있습니다. 'try <expr> with <rules>' 또는 'try <expr> finally <expr>'이 필요합니다. + + + + Unexpected end of input in 'while' expression. Expected 'while <expr> do <expr>'. + 'while' 식에 예기치 않은 입력의 끝이 있습니다. 'while <expr> do <expr>'이 필요합니다. + + + + Unexpected end of input in 'for' expression. Expected 'for <pat> in <expr> do <expr>'. + 'for' 식에 예기치 않은 입력 끝이 있습니다. 'for <pat> in <expr> do <expr>'이 필요합니다. + + + + Unexpected end of input in 'match' or 'try' expression + 'match' 또는 'try' 식에 예기치 않은 입력의 끝이 있습니다. + + + + Unexpected end of input in 'then' branch of conditional expression. Expected 'if <expr> then <expr>' or 'if <expr> then <expr> else <expr>'. + 조건식의 'then' 분기에 예기치 않은 입력의 끝이 있습니다. 'if <expr> then <expr>' 또는 'if <expr> then <expr> else <expr>'이 필요합니다. + + + + Unexpected end of input in 'else' branch of conditional expression. Expected 'if <expr> then <expr>' or 'if <expr> then <expr> else <expr>'. + 조건식의 'else' 분기에 예기치 않은 입력의 끝이 있습니다. 'if <expr> then <expr>' or 'if <expr> then <expr> else <expr>'이 필요합니다. + + + + Unexpected end of input in body of lambda expression. Expected 'fun <pat> ... <pat> -> <expr>'. + 람다 식 본문에 예기치 않은 입력의 끝이 있습니다. 'fun <pat> ... <pat> -> <expr>'이 필요합니다. + + + + Unexpected end of input in type arguments + 형식 인수에 예기치 않은 입력의 끝이 있습니다. + + + + Unexpected end of input in type signature + 형식 서명에 예기치 않은 입력의 끝이 있습니다. + + + + Unexpected end of input in type definition + 형식 정의에 예기치 않은 입력의 끝이 있습니다. + + + + Unexpected end of input in object members + 개체 멤버에 예기치 않은 입력의 끝이 있습니다. + + + + Unexpected end of input in value, function or member definition + 값, 함수 또는 멤버 정의에 예기치 않은 입력의 끝이 있습니다. + + + + Unexpected end of input in expression + 식에 예기치 않은 입력의 끝이 있습니다. + + + + Unexpected end of type. Expected a name after this point. + 예기치 않은 형식의 끝입니다. 이 지점 뒤에 이름이 필요합니다. + + + + Incomplete value or function definition. If this is in an expression, the body of the expression must be indented to the same column as the 'let' keyword. + 값 또는 함수 정의가 불완전합니다. 해당 항목이 식인 경우 식 본문을 'let' 키워드와 같은 열로 들여써야 합니다. + + + + Incomplete value definition. If this is in an expression, the body of the expression must be indented to the same column as the 'let!' keyword. + 값 정의가 불완전합니다. 해당 항목이 식인 경우 식 본문을 'let!' 키워드와 같은 열로 들여써야 합니다. + + + + Incomplete value definition. If this is in an expression, the body of the expression must be indented to the same column as the 'use!' keyword. + 값 정의가 불완전합니다. 해당 항목이 식인 경우 식 본문을 'use!' 키워드와 같은 열로 들여써야 합니다. + + + + Incomplete value definition. If this is in an expression, the body of the expression must be indented to the same column as the 'use' keyword. + 값 정의가 불완전합니다. 해당 항목이 식인 경우 식 본문을 'use' 키워드와 같은 열로 들여써야 합니다. + + + + Missing 'do' in 'while' expression. Expected 'while <expr> do <expr>'. + 'while' 식에서 'do'가 누락되었습니다. 'while <expr> do <expr>'이 필요합니다. + + + + Missing 'do' in 'for' expression. Expected 'for <pat> in <expr> do <expr>'. + 'for' 식에서 'do'가 누락되었습니다. 'for <pat> in <expr> do <expr>'이 필요합니다. + + + + Invalid join relation in '{0}'. Expected 'expr <op> expr', where <op> is =, =?, ?= or ?=?. + '{0}'의 조인 관계가 잘못되었습니다. 'expr <op> expr'이 필요합니다. 여기서 <op>는 =, =?, ?= 또는 ?=?입니다. + + + + Calls + 호출 + + + + Invalid number of generic arguments to type '{0}' in provided type. Expected '{1}' arguments, given '{2}'. + 제공된 형식에서 '{0}' 형식에 대한 제네릭 인수의 수가 잘못되었습니다. '{1}'개의 인수가 필요한데 '{2}'개가 제공되었습니다. + + + + Invalid value '{0}' for unit-of-measure parameter '{1}' + 측정 단위 매개 변수 '{1}'의 값 '{0}'이(가) 잘못되었습니다. + + + + Invalid value unit-of-measure parameter '{0}' + 측정 단위 매개 변수 '{0}'의 값이 잘못되었습니다. + + + + Property '{0}' on provided type '{1}' is neither readable nor writable as it has CanRead=false and CanWrite=false + 제공된 '{1}' 형식의 '{0}' 속성은 CanRead=false이고 CanWrite=false이므로 읽거나 쓸 수 없습니다. + + + + A use of 'into' must be followed by the remainder of the computation + 'into'를 사용하는 경우 뒤에 나머지 계산 부분이 와야 합니다. + + + + The operator '{0}' does not accept the use of 'into' + '{0}' 연산자에서는 'into'를 사용할 수 없습니다. + + + + The definition of the custom operator '{0}' does not use a valid combination of attribute flags + 사용자 지정 연산자 '{0}'의 정의에서 올바른 특성 플래그 조합을 사용하지 않습니다. + + + + This type definition may not have the 'CLIMutable' attribute. Only record types may have this attribute. + 이 형식 정의는 'CLIMutable' 특성을 포함할 수 없습니다. 레코드 형식만 이 특성을 포함할 수 있습니다. + + + + 'member val' definitions are only permitted in types with a primary constructor. Consider adding arguments to your type definition, e.g. 'type X(args) = ...'. + 'member val' 정의는 기본 생성자가 포함된 형식에서만 허용됩니다. 'type X(args) = ...'와 같이 형식 정의에 인수를 추가해 보세요. + + + + Property definitions may not be declared mutable. To indicate that this property can be set, use 'member val PropertyName = expr with get,set'. + 속성 정의는 mutable로 선언할 수 없습니다. 이 속성을 설정할 수 있도록 표시하려면 'member val PropertyName = expr with get,set'을 사용하세요. + + + + To indicate that this property can be set, use 'member val PropertyName = expr with get,set'. + 이 속성을 설정할 수 있도록 표시하려면 'member val PropertyName = expr with get,set'을 사용하세요. + + + + Type '{0}' is illegal because in byref<T>, T cannot contain byref types. + byref<T>에서 T는 byref 형식을 포함할 수 없으므로 '{0}' 형식은 잘못되었습니다. + + + + F# supports array ranks between 1 and 32. The value {0} is not allowed. + F#에서는 1에서 32까지의 배열 순위를 지원합니다. {0} 값은 사용할 수 없습니다. + + + + In queries, use the form 'for x in n .. m do ...' for ranging over integers + 쿼리에서 정수 범위를 지정하려면 'for x in n .. m do ...' 형식을 사용하세요. + + + + 'while' expressions may not be used in queries + 'while' 식은 쿼리에서 사용할 수 없습니다. + + + + 'try/finally' expressions may not be used in queries + 'try/finally' 식은 쿼리에서 사용할 수 없습니다. + + + + 'use' expressions may not be used in queries + 'use' 식은 쿼리에서 사용할 수 없습니다. + + + + 'let!', 'use!' and 'do!' expressions may not be used in queries + 'let!', 'use!' 및 'do!' 식은 쿼리에서 사용할 수 없습니다. + + + + 'return' and 'return!' may not be used in queries + 'return' 및 'return!'은 쿼리에서 사용할 수 없습니다. + + + + This is not a known query operator. Query operators are identifiers such as 'select', 'where', 'sortBy', 'thenBy', 'groupBy', 'groupValBy', 'join', 'groupJoin', 'sumBy' and 'averageBy', defined using corresponding methods on the 'QueryBuilder' type. + 알려진 쿼리 연산자가 아닙니다. 쿼리 연산자는 'select', 'where', 'sortBy', 'thenBy', 'groupBy', 'groupValBy', 'join', 'groupJoin', 'sumBy' 및 'averageBy' 등의 식별자로, 'QueryBuilder' 형식에서 해당하는 메서드를 사용하여 정의됩니다. + + + + 'try/with' expressions may not be used in queries + 'try/with' 식은 쿼리에서 사용할 수 없습니다. + + + + This 'let' definition may not be used in a query. Only simple value definitions may be used in queries. + 이 'let' 정의는 쿼리에서 사용할 수 없습니다. 단순 값 정의만 쿼리에서 사용할 수 있습니다. + + + + Too many static parameters. Expected at most {0} parameters, but got {1} unnamed and {2} named parameters. + 정적 매개 변수가 너무 많습니다. 최대 {0}개의 매개 변수가 필요한데 명명되지 않은 매개 변수 {1}개와 명명된 매개 변수 {2}개가 있습니다. + + + + Invalid provided literal value '{0}' + 제공된 '{0}' 리터럴 값이 잘못되었습니다. + + + + The 'anycpu32bitpreferred' platform can only be used with EXE targets. You must use 'anycpu' instead. + 'anycpu32bitpreferred' 플랫폼은 EXE 대상에만 사용할 수 있습니다. 대신 'anycpu'를 사용해야 합니다. + + + + This member, function or value declaration may not be declared 'inline' + 이 멤버, 함수 또는 값 선언은 'inline'으로 선언할 수 없습니다. + + + + The provider '{0}' returned a non-generated type '{1}' in the context of a set of generated types. Consider adjusting the type provider to only return generated types. + {0}' 공급자가 생성된 형식 컨텍스트에 생성되지 않은 형식 '{1}'을(를) 반환했습니다. 생성된 형식만 반환하도록 형식 공급자를 조정하세요. + + + + Arguments to query operators may require parentheses, e.g. 'where (x > y)' or 'groupBy (x.Length / 10)' + 쿼리 연산자의 인수에는 'where (x > y)' 또는 'groupBy (x.Length / 10)'과 같이 괄호가 필요할 수 있습니다. + + + + A quotation may not involve an assignment to or taking the address of a captured local variable + 인용구에 할당을 포함하거나 캡처된 로컬 변수의 주소를 사용할 수 없습니다. + + + + + 1 overload + +1개 오버로드 + + + + + {0} overloads + + {0} 오버로드 + + + + Erased to + 지운 시간 + + + + Unexpected token '{0}' or incomplete expression + 예기치 않은 토큰 '{0}' 또는 불완전한 식 + + + + Cannot find code target for this attribute, possibly because the code after the attribute is incomplete. + 이 특성에 대한 코드 대상을 찾을 수 없습니다. 특성 뒤의 코드가 완료되지 않았습니다. + + + + Type name cannot be empty. + 형식 이름은 비워 둘 수 없습니다. + + + + Problem reading assembly '{0}': {1} + {0}' 어셈블리를 읽는 중 오류가 발생했습니다. {1} + + + + Invalid provided field. Provided fields of erased provided types must be literals. + 제공된 필드가 잘못되었습니다. 지워진 제공된 형식의 제공된 필드는 리터럴이어야 합니다. + + + + (loading description...) + (설명 로드 중...) + + + + (description unavailable...) + (설명 없음...) + + + + A type variable has been constrained by multiple different class types. A type variable may only have one class constraint. + 형식 변수가 여러 클래스 형식에 의해 제약을 받습니다. 형식 변수의 클래스 제약 조건은 하나여야 합니다. + + + + 'match' expressions may not be used in queries + 'match' 식은 쿼리에서 사용할 수 없습니다. + + + + Infix operator member '{0}' has {1} initial argument(s). Expected a tuple of 3 arguments + 중위 연산자 멤버 '{0}'에 {1}개의 초기 인수가 있습니다. 3개 인수의 튜플이 필요합니다. + + + + The operator '{0}' cannot be resolved. Consider opening the module 'Microsoft.FSharp.Linq.NullableOperators'. + '{0}' 연산자를 확인할 수 없습니다. 'Microsoft.FSharp.Linq.NullableOperators' 모듈을 열어 보세요. + + + + '{0}' must be followed by 'in'. Usage: {1}. + '{0}' 뒤에는 'in'이 와야 합니다. 사용법: {1}. + + + + Neither 'member val' nor 'override val' definitions are permitted in object expressions. + 개체 식에는 'member val' 또는 'override val' 정의를 사용할 수 없습니다. + + + + Copy-and-update record expressions must include at least one field. + 레코드 복사 및 업데이트 식에는 적어도 하나의 필드가 포함되어야 합니다. + + + + '_' cannot be used as field name + 필드 이름에는 '_'을(를) 사용할 수 없습니다. + + + + The provided types generated by this use of a type provider may not be used from other F# assemblies and should be marked internal or private. Consider using 'type internal TypeName = ...' or 'type private TypeName = ...'. + 이런 방법으로 형식 공급자를 사용하여 생성된 제공된 형식은 다른 F# 어셈블리에서 사용할 수 없으므로 내부 또는 개인 형식으로 표시해야 합니다. 'type internal TypeName = ...' 또는 'type private TypeName = ...'을 사용하세요. + + + + A property's getter and setter must have the same type. Property '{0}' has getter of type '{1}' but setter of type '{2}'. + 속성의 getter 및 setter는 형식이 같아야 합니다. '{0}' 속성의 getter 형식은 '{1}'인데 setter 형식은 '{2}'입니다. + + + + Array method '{0}' is supplied by the runtime and cannot be directly used in code. For operations with array elements consider using family of GetArray/SetArray functions from LanguagePrimitives.IntrinsicFunctions module. + 배열 메서드 '{0}'은(는) 런타임에서 제공되며 코드에 직접 사용할 수 없습니다. 배열 요소를 사용하는 작업에서는 LanguagePrimitives.IntrinsicFunctions 모듈의 GetArray/SetArray 함수 패밀리를 사용하세요. + + + + The union case '{0}' does not have a field named '{1}'. + 공용 구조체 케이스/예외 '{0}'에 이름이 '{1}'인 필드가 없습니다. + + + + Union case/exception field '{0}' cannot be used more than once. + 공용 구조체 케이스/예외 필드 '{0}'은(는) 두 번 이상 사용할 수 없습니다. + + + + Named field '{0}' is used more than once. + 명명된 필드 {0}이(가) 두 번 이상 사용되었습니다. + + + + Named field '{0}' conflicts with autogenerated name for anonymous field. + 명명된 필드 '{0}'이(가) 자동 생성된 익명 필드 이름과 충돌합니다. + + + + This literal expression or attribute argument results in an arithmetic overflow. + 이 리터럴 식 또는 특성 인수를 사용하면 산술 연산 오버플로가 발생합니다. + + + + This is not valid literal expression. The [<Literal>] attribute will be ignored. + 유효한 리터럴 식이 아닙니다. [<Literal>] 특성은 무시됩니다. + + + + System.Runtime.InteropServices assembly is required to use UnknownWrapper\DispatchWrapper classes. + UnknownWrapper\DispatchWrapper 클래스를 사용하려면 System.Runtime.InteropServices 어셈블리가 필요합니다. + + + + The mutable local '{0}' is implicitly allocated as a reference cell because it has been captured by a closure. This warning is for informational purposes only to indicate where implicit allocations are performed. + 변경할 수 있는 로컬 '{0}'이(가) 암시적으로 참조 셀로 할당되었습니다. 닫기에서 캡처되었기 때문입니다. 이 경고는 정보 제공 목적으로만 발생하며 암시적 할당이 수행되는 위치에 나타납니다. + + + + A type provider implemented GetStaticParametersForMethod, but ApplyStaticArgumentsForMethod was not implemented or invalid + 형식 공급자는 GetStaticParametersForMethod를 구현하지만 ApplyStaticArgumentsForMethod는 구현되지 않거나 유효하지 않습니다. + + + + An error occured applying the static arguments to a provided method + 제공된 메서드에 정적 인수를 적용하는 동안 오류가 발생했습니다. + + + + Unexpected character '{0}' in preprocessor expression + 전처리기 식에 예기치 않은 문자 '{0}'이(가) 있습니다. + + + + Unexpected token '{0}' in preprocessor expression + 전처리기 식에 예기치 않은 토큰 '{0}'이(가) 있습니다. + + + + Incomplete preprocessor expression + 전처리기 식이 불완전합니다. + + + + Missing token '{0}' in preprocessor expression + 전처리기 식에 토큰 '{0}'이(가) 없습니다. + + + + An error occurred while reading the F# metadata node at position {0} in table '{1}' of assembly '{2}'. The node had no matching declaration. Please report this warning. You may need to recompile the F# assembly you are using. + 어셈블리 '{2}' 테이블 '{1}'의 {0} 위치에서 F# 메타데이터 노드를 읽는 중 오류가 발생했습니다. 노드에 일치하는 선언이 없습니다. 이 경고를 보고해 주세요. 사용하고 있는 F# 어셈블리를 다시 컴파일해야 할 수 있습니다. + + + + Type inference caused the type variable {0} to escape its scope. Consider adding an explicit type parameter declaration or adjusting your code to be less generic. + 형식 유추로 인해 형식 변수 {0}이(가) 범위를 벗어났습니다. 명시적인 형식 매개 변수 선언을 추가하거나 덜 일반적인 코드로 조정해 보세요. + + + + Type inference caused an inference type variable to escape its scope. Consider adding type annotations to make your code less generic. + 형식 유추로 인해 유추 형식 변수가 범위를 벗어났습니다. 형식 주석을 추가하여 덜 일반적인 코드로 만들어 보세요. + + + + Redundant arguments are being ignored in function '{0}'. Expected {1} but got {2} arguments. + 중복 인수는 함수 '{0}'에서 무시되고 있습니다. {1}(을)를 예상했으나 {2} 인수를 받았습니다. + + + + Lowercase literal '{0}' is being shadowed by a new pattern with the same name. Only uppercase and module-prefixed literals can be used as named patterns. + 소문자 리터럴 '{0}'이(가) 이름이 같은 새 패턴에서 섀도 처리되고 있습니다. 모듈이 접두사로 붙은 대문자 리터럴만 명명된 패턴으로 사용될 수 있습니다. + + + + This literal pattern does not take arguments + 이 리터럴 패턴은 인수를 사용하지 않습니다. + + + + Constructors are not permitted as extension members - they must be defined as part of the original definition of the type + 생성자는 확장 멤버로 사용할 수 없으며 원래 형식 정의의 일부로 정의되어야 합니다. + + + + Invalid response file '{0}' ( '{1}' ) + 잘못된 지시 파일 '{0}'('{1}') + + + + Response file '{0}' not found in '{1}' + {1}'에서 지시 파일 '{0}'을(를) 찾을 수 없습니다. + + + + Response file name '{0}' is empty, contains invalid characters, has a drive specification without an absolute path, or is too long + 지시 파일 이름 '{0}'이(가) 비어 있거나, 잘못된 문자를 포함하거나, 드라이브 사양에 절대 경로가 없거나, 길이가 너무 깁니다. + + + + Cannot find FSharp.Core.dll in compiler's directory + 컴파일러의 디렉터리에서 FSharp.Core.dll을 찾을 수 없습니다. + + + + One tuple type is a struct tuple, the other is a reference tuple + 한 튜플 형식은 구조체 튜플이고 다른 튜플 형식은 참조 튜플입니다. + + + + This provided method requires static parameters + 이 제공된 메서드는 정적 매개 변수가 필요합니다. + + + + The conversion from {0} to {1} is a compile-time safe upcast, not a downcast. Consider using 'upcast' instead of 'downcast'. + {0}에서 {1}(으)로의 변환은 컴파일 시간에 안전한 업캐스트이며 다운캐스트가 아닙니다. '다운캐스트'가 아닌 '업캐스트'를 사용해 보세요. + + + + The conversion from {0} to {1} is a compile-time safe upcast, not a downcast. Consider using the :> (upcast) operator instead of the :?> (downcast) operator. + {0}에서 {1}(으)로의 변환은 컴파일 시간에 안전한 업캐스트이며 다운캐스트가 아닙니다. :?>(다운캐스트) 연산자가 아닌 :>(업캐스트) 연산자를 사용하세요. + + + + The 'rec' on this module is implied by an outer 'rec' declaration and is being ignored + 이 모듈에 대한 'rec'는 외부 'rec' 선언에 의해 암시되며 무시됩니다. + + + + In a recursive declaration group, 'open' declarations must come first in each module + 재귀 선언 그룹에서 'open' 선언은 각 모듈에서 맨 앞에 있어야 합니다. + + + + In a recursive declaration group, module abbreviations must come after all 'open' declarations and before other declarations + 재귀 선언 그룹에서 모듈 약어는 모든 'open' 선언의 뒤에 있으면서 다른 선언의 앞에 있어야 합니다. + + + + This declaration is not supported in recursive declaration groups + 이 선언은 재귀 선언 그룹에서는 지원되지 않습니다. + + + + Invalid use of 'rec' keyword + 'rec' 키워드를 잘못 사용했습니다. + + + + If a union type has more than one case and is a struct, then all fields within the union type must be given unique names. + 공용 구조체 형식이 둘 이상의 case를 포함하고 구조체인 경우 공용 구조체 형식 내의 모든 필드에 고유한 이름을 지정해야 합니다. + + + + The CallerMemberNameAttribute applied to parameter '{0}' will have no effect. It is overridden by the CallerFilePathAttribute. + '{0}' 매개 변수에 적용된 CallerMemberNameAttribute는 효과가 없습니다. CallerFilePathAttribute로 재정의됩니다. + + + + Invalid use of 'fixed'. 'fixed' may only be used in a declaration of the form 'use x = fixed expr' where the expression is an array, the address of a field, the address of an array element or a string' + 'fixed'를 잘못 사용했습니다. 'fixed'는 식이 배열, 필드의 주소, 배열 요소 또는 문자열의 주소인 경우 'use x = fixed expr' 형식의 선언에만 사용할 수 있습니다. + + + + Could not find method System.Runtime.CompilerServices.OffsetToStringData in references when building 'fixed' expression. + 'fixed' 식을 빌드할 때 참조에서 System.Runtime.CompilerServices.OffsetToStringData 메서드를 찾을 수 없습니다. + + + + {0} is an active pattern and cannot be treated as a discriminated union case with named fields. + {0}은(는) 활성 패턴이며 명명된 필드가 있는 구분된 공용 구조체 케이스로 처리될 수 없습니다. + + + + The default value does not have the same type as the argument. The DefaultParameterValue attribute and any Optional attribute will be ignored. Note: 'null' needs to be annotated with the correct type, e.g. 'DefaultParameterValue(null:obj)'. + 기본값에 인수와 같은 형식이 없습니다. DefaultParameterValue 특성 및 모든 Optional 특성은 무시됩니다. 참고: 'null'은 올바른 형식으로 주석이 추가되어야 합니다(예: 'DefaultParameterValue(null:obj)'). + + + + The system type '{0}' was required but no referenced system DLL contained this type + 시스템 형식 '{0}'이(가) 필요했지만, 참조된 시스템 DLL에 이 형식이 포함되어 있지 않습니다. + + + + The member '{0}' matches multiple overloads of the same method.\nPlease restrict it to one of the following:{1}. + {0}' 멤버는 동일한 메서드의 여러 오버로드와 일치합니다.\n다음 중 하나로 제한하세요. {1}. + + + + Method or object constructor '{0}' is not static + 메서드 또는 개체 생성자 '{0}'이(가) 정적이 아닙니다. + + + + Unexpected symbol '=' in expression. Did you intend to use 'for x in y .. z do' instead? + 식에 예기치 않은 '=' 기호가 있습니다. 대신 'for x in y .. z do'를 사용하려고 했나요? + + + + Indicates a method that either has no implementation in the type in which it is declared or that is virtual and has a default implementation. + 선언된 형식에 구현이 없는 메서드 또는 기본 구현이 있는 가상 메서드를 나타냅니다. + + + + Used in mutually recursive bindings, in property declarations, and with multiple constraints on generic parameters. + 상호 재귀적 바인딩과 속성 선언에 사용되며 제네릭 매개 변수의 여러 제약 조건과 함께 사용됩니다. + + + + Used to give the current class object an object name. Also used to give a name to a whole pattern within a pattern match. + 현재 클래스 개체 및 개체 이름을 제공하는 데 사용됩니다. 패턴 일치 내의 전체 패턴에 이름을 제공하는 데에도 사용됩니다. + + + + Used to verify code during debugging. + 디버그 중 코드를 확인하는 데 사용됩니다. + + + + Used as the name of the base class object. + 기본 클래스 개체의 이름으로 사용됩니다. + + + + In verbose syntax, indicates the start of a code block. + 자세한 구문에서 코드 블록의 시작을 나타냅니다. + + + + In verbose syntax, indicates the start of a class definition. + 자세한 구문에서 클래스 정의의 시작을 나타냅니다. + + + + Indicates an implementation of an abstract method; used together with an abstract method declaration to create a virtual method. + 추상 메서드의 구현을 나타냅니다. 추상 메서드 선언과 함께 사용하여 가상 메서드를 만듭니다. + + + + Used to declare a delegate. + 대리자를 선언하는 데 사용됩니다. + + + + Used in looping constructs or to execute imperative code. + 루프 구문에 사용되거나 명령형 코드를 실행하기 위해 사용됩니다. + + + + In verbose syntax, indicates the end of a block of code in a looping expression. + 자세한 구문에서 루프 식의 코드 블록 끝을 나타냅니다. + + + + Used to convert to a type that is lower in the inheritance chain. + 상속 체인에서 더 낮은 형식으로 변환하는 데 사용됩니다. + + + + In a for expression, used when counting in reverse. + for 식에서 역으로 계산할 때 사용됩니다. + + + + Used in conditional branching. A short form of else if. + 조건부 분기에 사용됩니다. else if의 약식입니다. + + + + Used in conditional branching. + 조건부 분기에 사용됩니다. + + + + In type definitions and type extensions, indicates the end of a section of member definitions. In verbose syntax, used to specify the end of a code block that starts with the begin keyword. + 형식 정의 및 형식 확장에서 멤버 정의 섹션의 끝을 나타냅니다. 자세한 구문에서 begin 키워드로 시작하는 코드 블록의 끝을 지정하는 데 사용됩니다. + + + + Used to declare an exception type. + 예외 형식을 선언하는 데 사용됩니다. + + + + Indicates that a declared program element is defined in another binary or assembly. + 선언된 프로그램 요소가 다른 이진 또는 어셈블리에 정의됨을 나타냅니다. + + + + Used as a Boolean literal. + 부울 리터럴로 사용됩니다. + + + + Used together with try to introduce a block of code that executes regardless of whether an exception occurs. + 예외 발생 여부에 상관없이 실행되는 코드 블록을 지정하기 위해 try와 함께 사용됩니다. + + + + Used in looping constructs. + 루프 구문에 사용됩니다. + + + + Used in lambda expressions, also known as anonymous functions. + 익명 함수라고도 하는 람다 식에 사용됩니다. + + + + Used as a shorter alternative to the fun keyword and a match expression in a lambda expression that has pattern matching on a single argument. + 단일 인수에 패턴 일치가 있는 람다 식에서 fun 키워드 및 일치 식에 대한 간단한 대체로 사용됩니다. + + + + Used to reference the top-level .NET namespace. + 최상위 .NET 네임스페이스를 참조하는 데 사용됩니다. + + + + Used in conditional branching constructs. + 조건부 분기 구문에 사용됩니다. + + + + Used for sequence expressions and, in verbose syntax, to separate expressions from bindings. + 바인딩에서 식을 구분하기 위해 시퀀스 식과 자세한 구문에서 사용됩니다. + + + + Used to specify a base class or base interface. + 기본 클래스 또는 기본 인터페이스를 지정하는 데 사용됩니다. + + + + Used to indicate a function that should be integrated directly into the caller's code. + 호출자의 코드로 바로 통합되어야 하는 함수를 나타내는 데 사용됩니다. + + + + Used to declare and implement interfaces. + 인터페이스를 선언하고 구현하는 데 사용됩니다. + + + + Used to specify that a member is visible inside an assembly but not outside it. + 멤버가 어셈블리 안에서는 보이지만 어셈블리 밖에서는 보이지 않도록 지정하는 데 사용됩니다. + + + + Used to specify a computation that is to be performed only when a result is needed. + 결과가 필요한 경우에만 수행되는 계산을 지정하는 데 사용됩니다. + + + + Used to associate, or bind, a name to a value or function. + 값 또는 함수에 이름을 연결하거나 바인딩하기 위해 사용됩니다. + + + + Used in computation expressions to bind a name to the result of another computation expression. + 비동기 워크플로에 사용되어 비동기 계산 결과에 이름을 바인딩하거나, 기타 계산 식에서 계산 형식인 결과에 이름을 바인딩하는 데 사용됩니다. + + + + Used to branch by comparing a value to a pattern. + 패턴에 대한 값을 비교하여 분기하는 데 사용됩니다. + + + + Used to declare a property or method in an object type. + 개체 형식에서 속성 또는 메서드를 선언하는 데 사용됩니다. + + + + Used to associate a name with a group of related types, values, and functions, to logically separate it from other code. + 관련 형식, 값 및 함수 그룹과 이름을 연결하기 위해 사용되며, 다른 코드와 논리적으로 구별하기 위해 사용됩니다. + + + + Used to declare a variable, that is, a value that can be changed. + 변경될 수 있는 값인 변수를 선언하는 데 사용됩니다. + + + + Used to associate a name with a group of related types and modules, to logically separate it from other code. + 관련 형식 및 모듈 그룹과 이름을 연결하기 위해 사용되며, 다른 코드와 논리적으로 구별하기 위해 사용됩니다. + + + + Used to declare, define, or invoke a constructor that creates or that can create an object. Also used in generic parameter constraints to indicate that a type must have a certain constructor. + 개체를 생성하거나 생성할 수 있는 생성자를 선언하거나 정의하거나 호출하는 데 사용됩니다. 형식에 특정 생성자가 있어야 함을 나타내기 위해 제네릭 매개 변수 제약 조건에서도 사용됩니다. + + + + Not actually a keyword. However, not struct in combination is used as a generic parameter constraint. + 실제로 키워드가 아니지만, 조합의 not struct는 제네릭 매개 변수 제약 조건으로 사용됩니다. + + + + Indicates the absence of an object. Also used in generic parameter constraints. + 개체가 없음을 나타냅니다. 제네릭 매개 변수 제약 조건에서도 사용됩니다. + + + + Used in discriminated unions to indicate the type of categories of values, and in delegate and exception declarations. + 구분된 공용 구조체에 사용되어 값 범주의 형식을 나타내고, 대리자 및 예외 선언에 사용됩니다. + + + + Used to make the contents of a namespace or module available without qualification. + 한정자 없이 사용할 수 있는 네임스페이스 또는 모듈의 콘텐츠를 만드는 데 사용됩니다. + + + + Used with Boolean conditions as a Boolean or operator. Equivalent to ||. Also used in member constraints. + 부울 또는 연산자로 부울 조건과 함께 사용됩니다. ||와 같습니다. 멤버 제약 조건에도 사용됩니다. + + + + Used to implement a version of an abstract or virtual method that differs from the base version. + 기본 버전과 다른, 추상 메서드 또는 가상 메서드의 버전을 구현하는 데 사용됩니다. + + + + Restricts access to a member to code in the same type or module. + 동일한 형식 또는 모듈에서 코딩하기 위해 멤버에 대한 액세스를 제한합니다. + + + + Allows access to a member from outside the type. + 형식 외부에서 멤버에 대한 액세스를 허용합니다. + + + + Used to indicate that a function is recursive. + 함수가 재귀적임을 나타내는 데 사용됩니다. + + + + Used to provide a value for the result of the containing computation expression. + 계산 식의 결과로 제공하는 값을 나타내는 데 사용됩니다. + + + + Used to provide a value for the result of the containing computation expression, where that value itself comes from the result another computation expression. + 계산할 때, 포함하는 계산 식의 결과를 제공하는 계산 식을 나타내는 데 사용됩니다. + + + + Used in query expressions to specify what fields or columns to extract. Note that this is a contextual keyword, which means that it is not actually a reserved word and it only acts like a keyword in appropriate context. + 추출할 필드 또는 열을 지정하기 위해 쿼리 식에 사용됩니다. 이것은 상황별 키워드입니다. 즉 실제로 예약어가 아니며, 적절한 컨텍스트에서 키워드처럼만 작동합니다. + + + + Used to indicate a method or property that can be called without an instance of a type, or a value member that is shared among all instances of a type. + 형식의 인스턴스 없이 호출될 수 있는 메서드나 속성, 또는 모든 형식의 인스턴스 간 공유되는 값 멤버를 나타내는 데 사용됩니다. + + + + Used to declare a structure type. Also used in generic parameter constraints. Used for OCaml compatibility in module definitions. + 구조체 형식을 선언하는 데 사용됩니다. 제네릭 매개 변수 제약 조건에서도 사용됩니다. 모듈 정의에서 OCaml 호환성에 대해 사용됩니다. + + + + Used in conditional expressions. Also used to perform side effects after object construction. + 조건식에 사용됩니다. 또한 개체 생성 후 파생 작업을 수행하는 데 사용됩니다. + + + + Used in for loops to indicate a range. + 범위를 나타내기 위해 루프에 사용됩니다. + + + + Used to introduce a block of code that might generate an exception. Used together with with or finally. + 예외를 생성할 수 있는 코드 블록을 지정하는 데 사용됩니다. with 또는 finally와 함께 사용됩니다. + + + + Used to declare a class, record, structure, discriminated union, enumeration type, unit of measure, or type abbreviation. + 클래스, 레코드, 구조체, 구분된 공용 구조체, 열거형 형식, 측정 단위 또는 형식 약어를 선언하는 데 사용됩니다. + + + + Used to convert to a type that is higher in the inheritance chain. + 상속 체인에서 더 높은 형식으로 변환하는 데 사용됩니다. + + + + Used instead of let for values that implement IDisposable" + 무료 리소스로 호출하기 위해 Dispose가 필요한 값에 대해 let 대신 사용됩니다. + + + + Used instead of let! in computation expressions for computation expression results that implement IDisposable. + 무료 리소스로 호출하기 위해 Dispose가 필요한 값에 대해 기타 계산 식 및 비동기 워크플로에서 let! 대신 사용됩니다. + + + + Used in a signature to indicate a value, or in a type to declare a member, in limited situations. + 시그니처에 사용되어 값을 나타내거나 형식에 사용되어 제한된 상황에서 멤버를 선언합니다. + + + + Indicates the .NET void type. Used when interoperating with other .NET languages. + .NET void 형식을 나타냅니다. 다른 .NET 언어와 상호 운용할 때 사용됩니다. + + + + Used for Boolean conditions (when guards) on pattern matches and to introduce a constraint clause for a generic type parameter. + 패턴 일치의 부울 조건(가드 시)으로 사용되며, 제네릭 형식 매개 변수에 대한 제약 조건 절을 지정하는 데 사용됩니다. + + + + Introduces a looping construct. + 루프 구문을 지정합니다. + + + + Used together with the match keyword in pattern matching expressions. Also used in object expressions, record copying expressions, and type extensions to introduce member definitions, and to introduce exception handlers. + 패턴 일치 식에서 일치 키워드와 함께 사용됩니다. 또한 개체 식, 레코드 복사 식, 형식 확장에 사용되어 멤버 정의를 지정하고 예외 처리기를 지정합니다. + + + + Used in a sequence expression to produce a value for a sequence. + 시퀀스에 대한 값을 생성하기 위해 시퀀스 식에 사용됩니다. + + + + Used in a computation expression to append the result of a given computation expression to a collection of results for the containing computation expression. + 포함하는 계산 식의 결과 모음에 제공된 계산 식의 결과를 추가하기 위해, 계산 식에 사용됩니다. + + + + In function types, delimits arguments and return values. Yields an expression (in sequence expressions); equivalent to the yield keyword. Used in match expressions + 함수 형식에서 인수와 반환 값을 구분합니다. 시퀀스 식에서 식을 만들며, yield 키워드와 동일합니다. 일치 식에서 사용됩니다. + + + + Assigns a value to a variable. + 변수에 값을 할당합니다. + + + + Converts a type to type that is higher in the hierarchy. + 계층 구조에서 더 높은 형식으로 형식을 변환합니다. + + + + Converts a type to a type that is lower in the hierarchy. + 계층 구조에서 더 낮은 형식으로 형식을 변환합니다. + + + + Delimits a typed code quotation. + 형식이 지정된 코드 인용을 구분합니다. + + + + Delimits a untyped code quotation. + 형식이 지정되지 않은 코드 인용을 구분합니다. + + + + {0} '{1}' not found in assembly '{2}'. A possible cause may be a version incompatibility. You may need to explicitly reference the correct version of this assembly to allow all referenced components to use the correct version. + {2}' 어셈블리에서 {0} '{1}'을(를) 찾을 수 없습니다. 가능한 원인은 버전이 호환되지 않기 때문일 수 있습니다. 참조된 모든 구성 요소에서 올바른 버전을 사용할 수 있게 하려면 이 어셈블리의 올바른 버전을 명시적으로 참조해야 할 수 있습니다. + + + + {0} '{1}' not found in type '{2}' from assembly '{3}'. A possible cause may be a version incompatibility. You may need to explicitly reference the correct version of this assembly to allow all referenced components to use the correct version. + {3}' 어셈블리의 '{2}' 형식에서 {0} '{1}'을(를) 찾을 수 없습니다. 가능한 원인은 버전이 호환되지 않기 때문일 수 있습니다. 참조된 모든 구성 요소에서 올바른 버전을 사용할 수 있게 하려면 이 어셈블리의 올바른 버전을 명시적으로 참조해야 할 수 있습니다. + + + + is + 은(는) + + + + This value is not a function and cannot be applied. + 이 값은 함수가 아니며 적용할 수 없습니다. + + + + This value is not a function and cannot be applied. Did you intend to access the indexer via {0}.[index] instead? + 이 식은 함수가 아니며 적용할 수 없습니다. 대신 {0}.[index]를 통해 인덱서에 액세스하려고 했나요? + + + + This expression is not a function and cannot be applied. Did you intend to access the indexer via expr.[index] instead? + 이 식은 함수가 아니며 적용할 수 없습니다. 대신 expr.[index]를 통해 인덱서에 액세스하려고 했나요? + + + + This value is not a function and cannot be applied. Did you forget to terminate a declaration? + 이 값은 함수가 아니며 적용할 수 없습니다. 선언을 종료해야 합니다. + + + + The argument names in the signature '{0}' and implementation '{1}' do not match. The argument name from the signature file will be used. This may cause problems when debugging or profiling. + 시그니처 '{0}'과(와) 구현 '{1}'의 인수 이름이 일치하지 않습니다. 시그니처 파일의 인수 이름이 사용됩니다. 이로 인해 디버깅 또는 프로파일링 시 문제가 발생할 수 있습니다. + + + + An error occurred while reading the F# metadata of assembly '{0}'. A reserved construct was utilized. You may need to upgrade your F# compiler or use an earlier version of the assembly that doesn't make use of a specific construct. + '{0}' 어셈블리의 F# 메타데이터를 읽는 동안 오류가 발생했습니다. 예약 구문이 활용되었습니다. F# 컴파일러를 업그레이드하거나 특정 구문을 사용하지 않는 이전 버전의 어셈블리를 사용해야 할 수 있습니다. + + + + This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. + 이 메서드 또는 속성은 일반적으로 F# 코드에서 사용되지 않습니다. 대신 분해에 대해 명시적 튜플 패턴을 사용하세요. + + + + This expression returns a value of type '{0}' but is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to use the expression as a value in the sequence then use an explicit 'yield'. + 이 식은 '{0}' 형식의 값을 반환하지만 암시적으로 삭제됩니다. 'let'을 사용하여 결과를 이름에 바인딩하세요(예: 'let result = expression'). 식을 시퀀스의 값으로 사용하려면 명시적 'yield'를 사용하세요. + + + + This expression returns a value of type '{0}' but is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to use the expression as a value in the sequence then use an explicit 'yield!'. + 이 식은 '{0}' 형식의 값을 반환하지만 암시적으로 삭제됩니다. 'let'을 사용하여 결과를 이름에 바인딩하세요(예: 'let result = expression'). 식을 시퀀스의 값으로 사용하려면 명시적 'yield!'를 사용하세요. + + + + Used in computation expressions to pattern match directly over the result of another computation expression. + 다른 계산 식의 결과에 대해 직접적으로 패턴 일치에 대한 계산 식에 사용됩니다. + + + + The file '{0}' changed on disk unexpectedly, please reload. + '{0}' 파일이 디스크에서 예기치 않게 변경되었습니다. 다시 로드하세요. + + + + The byref pointer is readonly, so this write is not permitted. + byref 포인터는 읽기 전용이므로 이 쓰기가 허용되지 않습니다. + + + + A value must be mutable in order to mutate the contents or take the address of a value type, e.g. 'let mutable x = ...' + 내용을 변경하거나 값 형식의 주소를 사용하려면 값을 변경할 수 있어야 합니다(예: 'let mutable x = ...'). + + + + A ReadOnly attribute has been applied to a struct type with a mutable field. + 변경할 수 있는 필드가 있는 구조체 형식에 ReadOnly 특성이 적용되었습니다. + + + + A byref pointer returned by a function or method is implicitly dereferenced as of F# 4.5. To acquire the return value as a pointer, use the address-of operator, e.g. '&f(x)' or '&obj.Method(arg1, arg2)'. + 함수 또는 메서드에 의해 반환된 byref 포인터가 F# 4.5부터 암시적으로 역참조됩니다. 포인터로 반환 값을 가져오려면 address-of 연산자를 사용하세요(예: '&f(x)' 또는 '&obj.Method(arg1, arg2)'). + + + + A type annotated with IsByRefLike must also be a struct. Consider adding the [<Struct>] attribute to the type. + IsByRefLike로 주석이 추가된 형식은 구조체여야 합니다. 형식에 [<Struct>] 특성을 추가하세요. + + + + The address of the variable '{0}' or a related expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + 지금은 '{0}' 변수의 주소 또는 관련 식을 사용할 수 없습니다. 로컬 값의 주소가 범위를 벗어나지 않도록 하기 위한 것입니다. + + + + This value can't be assigned because the target '{0}' may refer to non-stack-local memory, while the expression being assigned is assessed to potentially refer to stack-local memory. This is to help prevent pointers to stack-bound memory escaping their scope. + '{0}' 대상이 비스택 로컬 메모리를 참조할 수 있는데, 할당되는 식은 잠재적으로 스택 로컬 메모리를 참조하도록 평가되므로 이 값을 할당할 수 없습니다. 스택에 바인딩된 메모리에 대한 포인터가 범위를 벗어나지 않도록 하기 위한 것입니다. + + + + A value defined in a module must be mutable in order to take its address, e.g. 'let mutable x = ...' + 해당 주소를 사용하려면 모듈에 정의된 값이 변경 가능해야 합니다(예: 'let mutable x = ...'). + + + + A type annotated with IsReadOnly must also be a struct. Consider adding the [<Struct>] attribute to the type. + IsReadOnly로 주석이 추가된 형식은 구조체여야 합니다. 형식에 [<Struct>] 특성을 추가하세요. + + + + Struct members cannot return the address of fields of the struct by reference + 구조체 멤버는 구조체의 필드 주소를 참조로 반환할 수 없습니다. + + + + The function or method call cannot be used at this point, because one argument that is a byref of a non-stack-local Span or IsByRefLike type is used with another argument that is a stack-local Span or IsByRefLike type. This is to ensure the address of the local value does not escape its scope. + 비스택 로컬 Span 또는 IsByRefLike 형식의 byref인 한 인수가 스택 로컬 Span 또는 IsByRefLike 형식인 다른 인수와 함께 사용되므로 지금은 함수 또는 메서드 호출을 사용할 수 없습니다. 로컬 값의 주소가 범위를 벗어나지 않도록 하기 위한 것입니다. + + + + The address of a value returned from the expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + 지금은 식에서 반환된 값의 주소를 사용할 수 없습니다. 로컬 값의 주소가 범위를 벗어나지 않도록 하기 위한 것입니다. + + + + The Span or IsByRefLike variable '{0}' cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + 지금은 Span 또는 IsByRefLike 변수 '{0}'을(를) 사용할 수 없습니다. 로컬 값의 주소가 범위를 벗어나지 않도록 하기 위한 것입니다. + + + + A Span or IsByRefLike value returned from the expression cannot be used at ths point. This is to ensure the address of the local value does not escape its scope. + 지금은 식에서 반환된 Span 또는 IsByRefLike 값을 사용할 수 없습니다. 로컬 값의 주소가 범위를 벗어나지 않도록 하기 위한 것입니다. + + + + Cannot take the address of the value returned from the expression. Assign the returned value to a let-bound value before taking the address. + 식에서 반환된 값의 주소를 가져올 수 없습니다. 주소를 가져오기 전에 반환된 값을 let 바인딩 값에 할당하세요. + + + + The Span or IsByRefLike expression cannot be returned from this function or method, because it is composed using elements that may escape their scope. + The Span or IsByRefLike expression cannot be returned from this function or method, because it is composed using elements that may escape their scope. + + + + This type does not inherit Attribute, it will not work correctly with other .NET languages. + This type does not inherit Attribute, it will not work correctly with other .NET languages. + + + + The exception '{0}' does not have a field named '{1}'. + The exception '{0}' does not have a field named '{1}'. + + + + The constructor does not have a field named '{0}'. + The constructor does not have a field named '{0}'. + + + + Active patterns do not have fields. This syntax is invalid. + Active patterns do not have fields. This syntax is invalid. + + + + + \ No newline at end of file diff --git a/src/fsharp/xlf/FSComp.txt.pl.xlf b/src/fsharp/xlf/FSComp.txt.pl.xlf new file mode 100644 index 00000000000..a2e4ad8a2b5 --- /dev/null +++ b/src/fsharp/xlf/FSComp.txt.pl.xlf @@ -0,0 +1,7087 @@ + + + + + + The namespace '{0}' is not defined. + Nie zdefiniowano przestrzeni nazw „{0}”. + + + + The namespace or module '{0}' is not defined. + Nie zdefiniowano przestrzeni nazw lub modułu „{0}”. + + + + The field, constructor or member '{0}' is not defined. + Nie zdefiniowano pola, konstruktora lub elementu członkowskiego „{0}”. + + + + The value, constructor, namespace or type '{0}' is not defined. + Nie zdefiniowano wartości, konstruktora, przestrzeni nazw lub typu „{0}”. + + + + The value or constructor '{0}' is not defined. + Nie zdefiniowano wartości lub konstruktora „{0}”. + + + + The value, namespace, type or module '{0}' is not defined. + Nie zdefiniowano wartości, przestrzeni nazw, typu lub modułu „{0}”. + + + + The constructor, module or namespace '{0}' is not defined. + Nie zdefiniowano konstruktora, modułu lub przestrzeni nazw „{0}”. + + + + The type '{0}' is not defined. + Nie zdefiniowano typu „{0}”. + + + + The type '{0}' is not defined in '{1}'. + Typ „{0}” nie jest zdefiniowany w elemencie „{1}”. + + + + The record label or namespace '{0}' is not defined. + Nie zdefiniowano etykiety rekordu lub przestrzeni nazw „{0}”. + + + + The record label '{0}' is not defined. + Nie zdefiniowano etykiety rekordu „{0}”. + + + + Maybe you want one of the following: + Możliwe, że chcesz wykonać jedną z następujących czynności: + + + + The type parameter {0} is not defined. + Nie zdefiniowano parametru typu „{0}”. + + + + The pattern discriminator '{0}' is not defined. + Nie zdefiniowano rozróżniacza wzorców „{0}”. + + + + Replace with '{0}' + Zamień na element „{0}” + + + + Add . for indexer access. + Dodaj znak . na potrzeby dostępu indeksatora. + + + + All elements of a list must be of the same type as the first element, which here is '{0}'. This element has type '{1}'. + Wszystkie elementy wyrażenia konstruktora listy muszą mieć ten sam typ. Oczekiwano, że to wyrażenie będzie miało typ „{0}”, ale tutaj ma typ „{1}”. + + + + All elements of an array must be of the same type as the first element, which here is '{0}'. This element has type '{1}'. + Wszystkie elementy wyrażenia konstruktora tablicy muszą mieć ten sam typ. Oczekiwano, że to wyrażenie będzie miało typ „{0}”, ale tutaj ma typ „{1}”. + + + + This 'if' expression is missing an 'else' branch. Because 'if' is an expression, and not a statement, add an 'else' branch which also returns a value of type '{0}'. + W wyrażeniu „if” brakuje gałęzi „else”. Gałąź „then” ma typ „{0}”. Jako że „if” jest wyrażeniem, a nie instrukcją, dodaj gałąź „else”, która będzie zwracać wartość tego samego typu. + + + + The 'if' expression needs to have type '{0}' to satisfy context type requirements. It currently has type '{1}'. + Wyrażenie „if” musi mieć typ „{0}”, aby spełnić wymagania typu kontekstu. Obecny typ: „{1}”. + + + + All branches of an 'if' expression must return values of the same type as the first branch, which here is '{0}'. This branch returns a value of type '{1}'. + Wszystkie gałęzie wyrażenia „if” muszą mieć ten sam typ. Oczekiwano, że to wyrażenie będzie miało typ „{0}”, ale tutaj ma typ „{1}”. + + + + All branches of a pattern match expression must return values of the same type as the first branch, which here is '{0}'. This branch returns a value of type '{1}'. + Wszystkie gałęzie wyrażenia dopasowania do wzorca muszą zwracać wartości tego samego typu. Pierwsza gałąź zwróciła wartość typu „{0}”, ale ta gałąź zwróciła wartość typu „{1}” + + + + A pattern match guard must be of type 'bool', but this 'when' expression is of type '{0}'. + Zabezpieczenie dopasowania do wzorca musi mieć typ „bool”, ale to wyrażenie „when” ma typ „{0}”. + + + + A ';' is used to separate field values in records. Consider replacing ',' with ';'. + Znak „;” jest używany do rozdzielania wartości pól w rekordach. Rozważ zastąpienie znaku „,” znakiem „;”. + + + + The '!' operator is used to dereference a ref cell. Consider using 'not expr' here. + Operator „!” umożliwia wyłuskanie komórki odwołania. Rozważ użycie tutaj elementu „not expr”. + + + + The non-generic type '{0}' does not expect any type arguments, but here is given {1} type argument(s) + Typ inny niż ogólny „{0}” nie oczekuje żadnych argumentów typu, ale tutaj podano następującą liczbę argumentów typu: {1} + + + + Consider using 'return!' instead of 'return'. + Rozważ użycie polecenia „return!” zamiast „return”. + + + + Consider using 'yield!' instead of 'yield'. + Rozważ użycie polecenia „yield!” zamiast „yield”. + + + + \nA tuple type is required for one or more arguments. Consider wrapping the given arguments in additional parentheses or review the definition of the interface. + \nDla co najmniej jednego argumentu jest wymagany typ krotki. Rozważ ujęcie danych argumentów w dodatkowy nawias lub przejrzenie definicji interfejsu. + + + + Invalid warning number '{0}' + Nieprawidłowy numer ostrzeżenia „{0}” + + + + Invalid version string '{0}' + Nieprawidłowy ciąg wersji „{0}” + + + + Invalid version file '{0}' + Nieprawidłowy plik wersji „{0}” + + + + Microsoft (R) F# Compiler version {0} + Wersja {0} kompilatora języka Microsoft (R) F# + + + + F# Compiler for F# {0} + Kompilator języka F# dla języka F# {0} + + + + Problem with filename '{0}': {1} + Problem z nazwą pliku „{0}”: {1} + + + + No inputs specified + Nie określono danych wejściowych + + + + The '--pdb' option requires the '--debug' option to be used + Opcja „--pdb” wymaga użycia opcji „--debug” + + + + The search directory '{0}' is invalid + Katalog wyszukiwania „{0}” jest nieprawidłowy + + + + The search directory '{0}' could not be found + Nie można znaleźć katalogu wyszukiwania „{0}” + + + + '{0}' is not a valid filename + Nazwa „{0}” nie jest prawidłową nazwą pliku + + + + '{0}' is not a valid assembly name + Nazwa „{0}” nie jest prawidłową nazwą zestawu + + + + Unrecognized privacy setting '{0}' for managed resource, valid options are 'public' and 'private' + Nierozpoznane ustawienie prywatności „{0}” dla zasobu zarządzanego. Prawidłowe opcje to „public” i „private” + + + + Multiple references to '{0}.dll' are not permitted + Używanie wielu odwołań do pliku „{0}.dll” jest niedozwolone + + + + Could not read version from mscorlib.dll + Nie można odczytać wersji z pliku mscorlib.dll + + + + Unable to read assembly '{0}' + Nie można odczytać zestawu „{0}” + + + + Assembly resolution failure at or near this location + Niepowodzenie rozpoznania zestawu w tej lokalizacji lub w jej pobliżu + + + + The declarations in this file will be placed in an implicit module '{0}' based on the file name '{1}'. However this is not a valid F# identifier, so the contents will not be accessible from other files. Consider renaming the file or adding a 'module' or 'namespace' declaration at the top of the file. + Deklaracje w tym pliku będą umieszczane w niejawnym module „{0}” na podstawie nazwy pliku „{1}”. Nie jest to jednak prawidłowy identyfikator języka F#, dlatego zawartość nie będzie dostępna z innych plików. Rozważ zmianę nazwy pliku lub dodanie deklaracji „module” lub „namespace” na początku pliku. + + + + Files in libraries or multiple-file applications must begin with a namespace or module declaration, e.g. 'namespace SomeNamespace.SubNamespace' or 'module SomeNamespace.SomeModule'. Only the last source file of an application may omit such a declaration. + Pliki w bibliotekach lub aplikacjach z wieloma plikami muszą rozpoczynać się od deklaracji przestrzeni nazw lub modułu (np. „namespace PrzestrzenNazw.PodrzednaPrzestrzenNazw” lub „module PrzestrzenNazw.Modul”). Taka deklaracja może zostać pominięta tylko w ostatnim pliku źródłowym aplikacji. + + + + Files in libraries or multiple-file applications must begin with a namespace or module declaration. When using a module declaration at the start of a file the '=' sign is not allowed. If this is a top-level module, consider removing the = to resolve this error. + Pliki w bibliotekach lub aplikacje złożone z wielu plików muszą rozpoczynać się od deklaracji przestrzeni nazw lub modułu. W przypadku użycia deklaracji modułu na początku pliku nie dopuszcza się zastosowania znaku „=”. Jeśli jest to moduł najwyższego poziomu, rozważ usunięcie znaku = w celu usunięcia tego błędu. + + + + This file contains multiple declarations of the form 'module SomeNamespace.SomeModule'. Only one declaration of this form is permitted in a file. Change your file to use an initial namespace declaration and/or use 'module ModuleName = ...' to define your modules. + Ten plik zawiera wiele deklaracji w postaci „module PrzestrzeńNazw.Moduł”. W pliku dozwolona jest tylko jedna deklaracja o takiej postaci. Zmień plik w celu użycia początkowej deklaracji przestrzeni nazw i/lub zastosuj konstrukcję „module NazwaModułu = ...” do zdefiniowania własnych modułów. + + + + Option requires parameter: {0} + Opcja wymaga parametru: {0} + + + + Source file '{0}' could not be found + Nie można znaleźć pliku źródłowego „{0}” + + + + The file extension of '{0}' is not recognized. Source files must have extension .fs, .fsi, .fsx, .fsscript, .ml or .mli. + Rozszerzenie pliku „{0}” nie zostało rozpoznane. Pliki źródłowe muszą mieć rozszerzenie fs, fsi, fsx, fsscript, ml lub mli. + + + + Could not resolve assembly '{0}' + Nie można rozpoznać zestawu „{0}” + + + + Could not resolve assembly '{0}' required by '{1}' + Nie można rozpoznać zestawu „{0}” wymaganego przez „{1}” + + + + Error opening binary file '{0}': {1} + Błąd podczas otwierania pliku binarnego „{0}”: {1} + + + + The F#-compiled DLL '{0}' needs to be recompiled to be used with this version of F# + Biblioteka DLL „{0}” skompilowana przy użyciu języka F# wymaga ponownego skompilowania, aby została użyta z tą wersją języka F# + + + + Invalid directive. Expected '#I \"<path>\"'. + Nieprawidłowa dyrektywa. Oczekiwano „#I \"<ścieżka>\"„. + + + + Invalid directive. Expected '#r \"<file-or-assembly>\"'. + Nieprawidłowa dyrektywa. Oczekiwano „#r \"<plik-lub-zestaw>\"”. + + + + Invalid directive. Expected '#load \"<file>\" ... \"<file>\"'. + Nieprawidłowa dyrektywa. Oczekiwano „#load \"<plik>\" ... \"<plik>\"”. + + + + Invalid directive. Expected '#time', '#time \"on\"' or '#time \"off\"'. + Nieprawidłowa dyrektywa. Oczekiwano „#time”, „#time \"on\"” lub „#time \"off\"”. + + + + Directives inside modules are ignored + Dyrektywy wewnątrz modułów są ignorowane + + + + A signature for the file or module '{0}' has already been specified + Sygnatura dla pliku lub modułu „{0}” została już określona + + + + An implementation of file or module '{0}' has already been given. Compilation order is significant in F# because of type inference. You may need to adjust the order of your files to place the signature file before the implementation. In Visual Studio files are type-checked in the order they appear in the project file, which can be edited manually or adjusted using the solution explorer. + Implementacja pliku lub modułu „{0}” została już podana. Kolejność kompilacji jest istotna w języku F# z powodu wnioskowania o typie. Może być wymagane dostosowanie kolejności plików w celu umieszczenia pliku sygnatury przed implementacją. W programie Visual Studio kontrola typów jest wykonywana dla plików w kolejności ich występowania w pliku projektu; kolejność ta może być edytowana ręcznie lub dostosowywana przy użyciu Eksploratora rozwiązań. + + + + An implementation of the file or module '{0}' has already been given + Implementacja pliku lub modułu „{0}” została już podana + + + + The signature file '{0}' does not have a corresponding implementation file. If an implementation file exists then check the 'module' and 'namespace' declarations in the signature and implementation files match. + Plik sygnatury „{0}” nie ma odpowiedniego pliku implementacji. Jeśli plik implementacji istnieje, sprawdź, czy istnieją zgodne deklaracje „module” i „namespace” w plikach sygnatury i implementacji. + + + + '{0}' is not a valid integer argument + Argument „{0}” nie jest prawidłowym argumentem liczby całkowitej + + + + '{0}' is not a valid floating point argument + Argument „{0}” nie jest prawidłowym argumentem liczby zmiennoprzecinkowej + + + + Unrecognized option: '{0}' + Nierozpoznana opcja: „{0}” + + + + Invalid module or namespace name + Nieprawidłowa nazwa modułu lub przestrzeni nazw + + + + Error reading/writing metadata for the F# compiled DLL '{0}'. Was the DLL compiled with an earlier version of the F# compiler? (error: '{1}'). + Błąd podczas odczytywania/zapisywania metadanych skompilowanej biblioteki DLL języka F# „{0}”. Czy biblioteka DLL została skompilowana przy użyciu wcześniejszej wersji kompilatora języka F#? (Błąd: „{1}”). + + + + The type/module '{0}' is not a concrete module or type + Typ/moduł „{0}” nie jest konkretnym modułem lub typem + + + + The type '{0}' has an inline assembly code representation + Typ „{0}” ma reprezentację śródwierszowego kodu zestawu + + + + A namespace and a module named '{0}' both occur in two parts of this assembly + Przestrzeń nazw i moduł o nazwie „{0}” występują w dwóch częściach tego zestawu + + + + Two modules named '{0}' occur in two parts of this assembly + Moduły o nazwie „{0}” występują w dwóch częściach tego zestawu + + + + Two type definitions named '{0}' occur in namespace '{1}' in two parts of this assembly + Dwie definicje typów o nazwie „{0}” występują w przestrzeni nazw „{1}” w dwóch częściach tego zestawu + + + + A module and a type definition named '{0}' occur in namespace '{1}' in two parts of this assembly + Moduł i definicja typu o nazwie „{0}” występują w przestrzeni nazw „{1}” w dwóch częściach tego zestawu + + + + Invalid member signature encountered because of an earlier error + Napotkano nieprawidłową sygnaturę elementu członkowskiego z powodu wcześniejszego błędu + + + + This value does not have a valid property setter type + Ta wartość nie ma prawidłowego typu metody ustawiającej właściwość + + + + Invalid form for a property getter. At least one '()' argument is required when using the explicit syntax. + Nieprawidłowa postać metody pobierającej właściwość. W przypadku używania jawnej składni jest wymagany co najmniej jeden argument „()”. + + + + Invalid form for a property setter. At least one argument is required. + Nieprawidłowa forma metody ustawiającej właściwości. Wymagany jest co najmniej jeden argument. + + + + Unexpected use of a byref-typed variable + Nieoczekiwane użycie zmiennej typu byref + + + + Invalid mutation of a constant expression. Consider copying the expression to a mutable local, e.g. 'let mutable x = ...'. + Nieprawidłowa mutacja wyrażenia stałej. Rozważ skopiowanie wyrażenia do modyfikowalnej wartości lokalnej, na przykład „let mutable x = ...”. + + + + The value has been copied to ensure the original is not mutated by this operation or because the copy is implicit when returning a struct from a member and another member is then accessed + Wartość została skopiowana w celu zagwarantowania, że oryginalna wartość nie zostanie zmodyfikowana przez tę operację, lub ponieważ kopia jest niejawna, gdy podczas zwracania struktury z elementu członkowskiego nastąpi otwarcie innego elementu członkowskiego. + + + + Recursively defined values cannot appear directly as part of the construction of a tuple value within a recursive binding + Wartości zdefiniowane cyklicznie nie mogą występować bezpośrednio jako część konstrukcji wartości krotki w powiązaniu cyklicznym + + + + Recursive values cannot appear directly as a construction of the type '{0}' within a recursive binding. This feature has been removed from the F# language. Consider using a record instead. + Wartości cykliczne nie mogą występować bezpośrednio jako konstrukcja typu „{0}” w powiązaniu cyklicznym. Ta funkcja została usunięta z języka F#. Zamiast tego rozważ użycie rekordu. + + + + Recursive values cannot be directly assigned to the non-mutable field '{0}' of the type '{1}' within a recursive binding. Consider using a mutable field instead. + Wartości cykliczne nie mogą być przypisywane bezpośrednio do niezmienialnego pola „{0}” typu „{1}” w powiązaniu cyklicznym. Zamiast tego rozważ użycie pola modyfikowalnego. + + + + Unexpected decode of AutoOpenAttribute + Nieoczekiwane dekodowanie elementu AutoOpenAttribute + + + + Unexpected decode of InternalsVisibleToAttribute + Nieoczekiwane dekodowanie elementu InternalsVisibleToAttribute + + + + Unexpected decode of InterfaceDataVersionAttribute + Nieoczekiwane dekodowanie elementu InterfaceDataVersionAttribute + + + + Active patterns cannot return more than 7 possibilities + Aktywne wzorce nie mogą zwracać więcej niż 7 możliwości + + + + This is not a valid constant expression or custom attribute value + To nie jest prawidłowe wyrażenie stałej lub prawidłowa niestandardowa wartość atrybutu + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe mutability attributes differ + Moduł „{0}” zawiera element\n {1}, \nale jego sygnatura określa element\n {2} \nAtrybuty modyfikowalności są różne + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe names differ + Moduł „{0}” zawiera element\n {1}, \nale jego sygnatura określa element\n {2} \nNazwy są różne + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe compiled names differ + Moduł „{0}” zawiera element\n {1}, \nale jego sygnatura określa element\n {2} \nNazwy skompilowane są różne + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe display names differ + Moduł „{0}” zawiera element\n {1}, \nale jego sygnatura określa element\n {2} \nNazwy wyświetlane są różne + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe accessibility specified in the signature is more than that specified in the implementation + Moduł „{0}” zawiera element\n {1}, \nale jego sygnatura określa element\n {2} \nDostępność określona w sygnaturze jest większa od określonej w implementacji + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe inline flags differ + Moduł „{0}” zawiera element\n {1}, \nale jego sygnatura określa element\n {2} \nFlagi śródwierszowe są różne + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe literal constant values and/or attributes differ + Moduł „{0}” zawiera element\n {1}, \nale jego sygnatura określa element\n {2} \nWartości i/lub atrybuty stałych literału są różne + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is a type function and the other is not. The signature requires explicit type parameters if they are present in the implementation. + Moduł „{0}” zawiera element\n {1}, \nale jego sygnatura określa element\n {2} \nJeden element jest funkcją typu, a drugi nie. Sygnatura wymaga jawnych parametrów typu, jeśli są obecne w implementacji. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe respective type parameter counts differ + Moduł „{0}” zawiera element\n {1}, \nale jego sygnatura określa element\n {2} \nOdpowiednie liczby parametrów typu są różne + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe types differ + Moduł „{0}” zawiera element\n {1}, \nale jego sygnatura określa element\n {2} \nTypy są różne + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is an extension member and the other is not + Moduł „{0}” zawiera element\n {1}, \nale jego sygnatura określa element\n {2} \nJeden element jest elementem członkowskim rozszerzenia, a drugi nie + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nAn arity was not inferred for this value + Moduł „{0}” zawiera element\n {1}, \nale jego sygnatura określa element\n {2} \nLiczba argumentów nie została wywnioskowana dla tej wartości + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe number of generic parameters in the signature and implementation differ (the signature declares {3} but the implementation declares {4} + Moduł „{0}” zawiera element\n {1}, \nale jego sygnatura określa element\n {2} \nLiczba parametrów ogólnych w sygnaturze i implementacji jest różna (sygnatura deklaruje {3}, ale implementacja deklaruje {4}) + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe generic parameters in the signature and implementation have different kinds. Perhaps there is a missing [<Measure>] attribute. + Moduł „{0}” zawiera element\n {1} \nale jego sygnatura określa element\n {2} \nParametry ogólne w sygnaturze i implementacji są różnego rodzaju. Być może brakuje atrybutu [<Measure>]. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe arities in the signature and implementation differ. The signature specifies that '{3}' is function definition or lambda expression accepting at least {4} argument(s), but the implementation is a computed function value. To declare that a computed function value is a permitted implementation simply parenthesize its type in the signature, e.g.\n\tval {5}: int -> (int -> int)\ninstead of\n\tval {6}: int -> int -> int. + Moduł „{0}” zawiera element\n {1}, \nale jego sygnatura określa element\n {2} \nLiczby argumentów w sygnaturze i implementacji są różne. Sygnatura określa, że „{3}” to definicja funkcji lub wyrażenie lambda akceptujące liczbę argumentów wynoszącą co najmniej {4}, ale implementacja jest obliczaną wartością funkcji. Aby zadeklarować, że obliczana wartość funkcji to dozwolona implementacja, po prostu umieść w nawiasach okrągłych jej typ w sygnaturze, np.\n\tval {5}: int -> (int -> int)\nzamiast\n\tval {6}: int -> int -> int. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe CLI member names differ + Moduł „{0}” zawiera element\n {1}, \nale jego sygnatura określa element\n {2} \nNazwy elementów członkowskich infrastruktury CLI są różne + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is static and the other isn't + Moduł „{0}” zawiera element\n {1}, \nale jego sygnatura określa element\n {2} \nJeden element jest elementem statycznym, a drugi nie + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is virtual and the other isn't + Moduł „{0}” zawiera element\n {1}, \nale jego sygnatura określa element\n {2} \nJeden element jest elementem wirtualnym, a drugi nie + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is abstract and the other isn't + Moduł „{0}” zawiera element\n {1}, \nale jego sygnatura określa element\n {2} \nJeden element jest abstrakcyjny, a drugi nie + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is final and the other isn't + Moduł „{0}” zawiera element\n {1}, \nale jego sygnatura określa element\n {2} \nJeden element jest elementem finalnym, a drugi nie + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is marked as an override and the other isn't + Moduł „{0}” zawiera element\n {1}, \nale jego sygnatura określa element\n {2} \nJeden element jest oznaczony jako przesłonięcie, a drugi nie + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is a constructor/property and the other is not + Moduł „{0}” zawiera element\n {1}, \nale jego sygnatura określa element\n {2} \nJeden element jest konstruktorem/właściwością, a drugi nie + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe compiled representation of this method is as a static member but the signature indicates its compiled representation is as an instance member + Moduł „{0}” zawiera element\n {1}, \nale jego sygnatura określa element\n {2} \nReprezentacja skompilowana tej metody ma postać statycznego elementu członkowskiego, ale sygnatura wskazuje, że jego reprezentacja skompilowana ma postać elementu członkowskiego wystąpienia + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe compiled representation of this method is as an instance member, but the signature indicates its compiled representation is as a static member + Moduł „{0}” zawiera element\n {1}, \nale jego sygnatura określa element\n {2} \nReprezentacja skompilowana tej metody ma postać elementu członkowskiego wystąpienia, ale sygnatura wskazuje, że jego reprezentacja skompilowana ma postać statycznego elementu członkowskiego + + + + The {0} definitions in the signature and implementation are not compatible because the names differ. The type is called '{1}' in the signature file but '{2}' in implementation. + Definicje {0} w sygnaturze i implementacji są niezgodne, ponieważ nazwy są różne. Typ w pliku sygnatury ma nazwę „{1}”, a w implementacji „{2}”. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the respective type parameter counts differ + Definicje {0} dla typu „{1}” w sygnaturze i implementacji są niezgodne, ponieważ odpowiednie liczby parametrów typu są różne + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the accessibility specified in the signature is more than that specified in the implementation + Definicje {0} dla typu „{1}” w sygnaturze i implementacji są niezgodne, ponieważ dostępność określona w sygnaturze jest większa od określonej w implementacji + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature requires that the type supports the interface {2} but the interface has not been implemented + Definicje {0} dla typu „{1}” w sygnaturze i implementacji są niezgodne, ponieważ sygnatura wymaga, aby typ obsługiwał interfejs {2}, ale interfejs nie został zaimplementowany + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation says this type may use nulls as a representation but the signature does not + Definicje {0} dla typu „{1}” w sygnaturze i implementacji są niezgodne, ponieważ implementacja wskazuje, że ten typ może używać wartości null jako reprezentacji, ale sygnatura tego nie wskazuje + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation says this type may use nulls as an extra value but the signature does not + Definicje {0} dla typu „{1}” w sygnaturze i implementacji są niezgodne, ponieważ implementacja wskazuje, że ten typ może używać wartości null jako dodatkowej wartości, ale sygnatura tego nie wskazuje + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature says this type may use nulls as a representation but the implementation does not + Definicje {0} dla typu „{1}” w sygnaturze i implementacji są niezgodne, ponieważ sygnatura wskazuje, że ten typ może używać wartości null jako reprezentacji, ale implementacja tego nie wskazuje + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature says this type may use nulls as an extra value but the implementation does not + Definicje {0} dla typu „{1}” w sygnaturze i implementacji są niezgodne, ponieważ sygnatura wskazuje, że ten typ może używać wartości null jako dodatkowej wartości, ale implementacja tego nie wskazuje + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation type is sealed but the signature implies it is not. Consider adding the [<Sealed>] attribute to the signature. + Definicje {0} dla typu „{1}” w sygnaturze i implementacji są niezgodne, ponieważ typ implementacji jest zapieczętowany, ale sygnatura sugeruje, że nie jest zapieczętowany. Rozważ dodanie atrybutu [<Sealed>] do sygnatury. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation type is not sealed but signature implies it is. Consider adding the [<Sealed>] attribute to the implementation. + Definicje {0} dla typu „{1}” w sygnaturze i implementacji są niezgodne, ponieważ typ implementacji nie jest zapieczętowany, ale sygnatura sugeruje, że jest zapieczętowany. Rozważ dodanie atrybutu [<Sealed>] do implementacji. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation is an abstract class but the signature is not. Consider adding the [<AbstractClass>] attribute to the signature. + Definicje {0} dla typu „{1}” w sygnaturze i implementacji są niezgodne, ponieważ implementacja jest klasą abstrakcyjną, ale sygnatura nią nie jest. Rozważ dodanie atrybutu [<AbstractClass>] do sygnatury. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature is an abstract class but the implementation is not. Consider adding the [<AbstractClass>] attribute to the implementation. + Definicje {0} dla typu „{1}” w sygnaturze i implementacji są niezgodne, ponieważ sygnatura jest klasą abstrakcyjną, a implementacja nią nie jest. Rozważ dodanie atrybutu [<AbstractClass>] do implementacji. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the types have different base types + Definicje {0} dla typu „{1}” w sygnaturze i implementacji są niezgodne, ponieważ typy mają różne typy podstawowe + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the number of {2}s differ + Definicje {0} dla typu „{1}” w sygnaturze i implementacji są niezgodne, ponieważ liczba elementów {2} jest różna + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature defines the {2} '{3}' but the implementation does not (or does, but not in the same order) + Definicje {0} dla typu „{1}” w sygnaturze i implementacji są niezgodne, ponieważ sygnatura definiuje element {2} „{3}”, ale implementacja nie (albo definiuje w innej kolejności) + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation defines the {2} '{3}' but the signature does not (or does, but not in the same order) + Definicje {0} dla typu „{1}” w sygnaturze i implementacji są niezgodne, ponieważ implementacja definiuje element {2} „{3}”, ale sygnatura nie (albo definiuje w innej kolejności) + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation defines a struct but the signature defines a type with a hidden representation + Definicje {0} dla typu „{1}” w sygnaturze i implementacji są niezgodne, ponieważ implementacja definiuje strukturę, ale sygnatura definiuje typ z ukrytą reprezentacją + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because a CLI type representation is being hidden by a signature + Definicje {0} dla typu „{1}” w sygnaturze i implementacji są niezgodne, ponieważ reprezentacja typu infrastruktury CLI jest ukrywana przez sygnaturę + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because a type representation is being hidden by a signature + Definicje {0} dla typu „{1}” w sygnaturze i implementacji są niezgodne, ponieważ reprezentacja typu jest ukrywana przez sygnaturę + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the types are of different kinds + Definicje {0} dla typu „{1}” w sygnaturze i implementacji są niezgodne, ponieważ typy są różnego rodzaju + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the IL representations differ + Definicje {0} dla typu „{1}” w sygnaturze i implementacji są niezgodne z powodu różnych reprezentacji obiektu IL + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the representations differ + Definicje {0} dla typu „{1}” w sygnaturze i implementacji są niezgodne, ponieważ reprezentacje są różne + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the field {2} was present in the implementation but not in the signature + Definicje {0} dla typu „{1}” w sygnaturze i implementacji są niezgodne, ponieważ pole {2} było obecne w implementacji, ale nie w sygnaturze + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the order of the fields is different in the signature and implementation + Definicje {0} dla typu „{1}” w sygnaturze i implementacji są niezgodne z powodu różnej kolejności pól w sygnaturze i implementacji + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the field {2} was required by the signature but was not specified by the implementation + Definicje {0} dla typu „{1}” w sygnaturze i implementacji są niezgodne, ponieważ pole {2} było wymagane przez sygnaturę, ale nie zostało określone przez implementację + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the field '{2}' was present in the implementation but not in the signature. Struct types must now reveal their fields in the signature for the type, though the fields may still be labelled 'private' or 'internal'. + Definicje {0} dla typu „{1}” w sygnaturze i implementacji są niezgodne, ponieważ pole „{2}” było obecne w implementacji, ale nie w sygnaturze. Typy struktury muszą teraz udostępniać swoje pola w sygnaturze dla typu, chociaż pola nadal mogą mieć etykietę „private” lub „internal”. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the abstract member '{2}' was required by the signature but was not specified by the implementation + Definicje {0} dla typu „{1}” w sygnaturze i implementacji są niezgodne, ponieważ abstrakcyjny element członkowski „{2}” był wymagany przez sygnaturę, ale nie został określony przez implementację + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the abstract member '{2}' was present in the implementation but not in the signature + Definicje {0} dla typu „{1}” w sygnaturze i implementacji są niezgodne, ponieważ abstrakcyjny element członkowski „{2}” był obecny w implementacji, ale nie w sygnaturze + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature declares a {2} while the implementation declares a {3} + Definicje {0} dla typu „{1}” w sygnaturze i implementacji są niezgodne, ponieważ sygnatura deklaruje element {2}, natomiast implementacja deklaruje element {3} + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the abbreviations differ: {2} versus {3} + Definicje {0} dla typu „{1}” w sygnaturze i implementacji są niezgodne, ponieważ skróty są różne: {2} i {3} + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because an abbreviation is being hidden by a signature. The abbreviation must be visible to other CLI languages. Consider making the abbreviation visible in the signature. + Definicje {0} dla typu „{1}” w sygnaturze i implementacji są niezgodne, ponieważ skrót jest ukrywany przez sygnaturę. Skrót musi być widoczny dla innych języków infrastruktury CLI. Rozważ zapewnienie widoczności skrótu w sygnaturze. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature has an abbreviation while the implementation does not + Definicje {0} dla typu „{1}” w sygnaturze i implementacji są niezgodne, ponieważ sygnatura ma skrót, a implementacja go nie ma + + + + The module contains the constructor\n {0} \nbut its signature specifies\n {1} \nThe names differ + Moduł zawiera konstruktora\n {0}, \nale jego sygnatura określa\n {1} \nNazwy są różne + + + + The module contains the constructor\n {0} \nbut its signature specifies\n {1} \nThe respective number of data fields differ + Moduł zawiera konstruktora\n {0}, \nale jego sygnatura określa\n {1} \nOdpowiednia liczba pól danych jest różna + + + + The module contains the constructor\n {0} \nbut its signature specifies\n {1} \nThe types of the fields differ + Moduł zawiera konstruktora\n {0}, \nale jego sygnatura określa\n {1} \nTypy pól są różne + + + + The module contains the constructor\n {0} \nbut its signature specifies\n {1} \nthe accessibility specified in the signature is more than that specified in the implementation + Moduł zawiera konstruktora\n {0}, \nale jego sygnatura określa\n {1} \nDostępność określona w sygnaturze jest większa od określonej w implementacji + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe names differ + Moduł zawiera pole\n {0}, \nale jego sygnatura określa\n {1} \nNazwy są różne + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nthe accessibility specified in the signature is more than that specified in the implementation + Moduł zawiera pole\n {0}, \nale jego sygnatura określa\n {1} \nDostępność określona w sygnaturze jest większa od określonej w implementacji + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe 'static' modifiers differ + Moduł zawiera pole\n {0}, \nale jego sygnatura określa\n {1} \nModyfikatory „static” są różne + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe 'mutable' modifiers differ + Moduł zawiera pole\n {0}, \nale jego sygnatura określa\n {1} \nModyfikatory „mutable” są różne + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe 'literal' modifiers differ + Moduł zawiera pole\n {0}, \nale jego sygnatura określa\n {1} \nModyfikatory „literal” są różne + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe types differ + Moduł zawiera pole\n {0}, \nale jego sygnatura określa\n {1} \nTypy są różne + + + + The implicit instantiation of a generic construct at or near this point could not be resolved because it could resolve to multiple unrelated types, e.g. '{0}' and '{1}'. Consider using type annotations to resolve the ambiguity + Nie można rozpoznać niejawnego wystąpienia konstrukcji ogólnej w tym miejscu lub w jego pobliżu, ponieważ może to spowodować powstanie wielu niepowiązanych typów, na przykład „{0}” i „{1}”. Rozważ użycie adnotacji typu w celu rozwiązania niejednoznaczności + + + + Could not resolve the ambiguity inherent in the use of a 'printf'-style format string + Nie można usunąć niejednoznaczności spowodowanej użyciem ciągu formatu „printf” + + + + Could not resolve the ambiguity in the use of a generic construct with an 'enum' constraint at or near this position + Nie można usunąć niejednoznaczności w przypadku użycia konstrukcji ogólnej z ograniczeniem „enum” w tym miejscu lub w jego pobliżu + + + + Could not resolve the ambiguity in the use of a generic construct with a 'delegate' constraint at or near this position + Nie można usunąć niejednoznaczności w przypadku użycia konstrukcji ogólnej z ograniczeniem „delegate” w tym miejscu lub w jego pobliżu. + + + + Invalid value + Nieprawidłowa wartość + + + + The signature and implementation are not compatible because the respective type parameter counts differ + Sygnatura i implementacja nie są zgodne z powodu różnej liczby odpowiednich parametrów typu + + + + The signature and implementation are not compatible because the type parameter in the class/signature has a different compile-time requirement to the one in the member/implementation + Sygnatura i implementacja nie są zgodne, ponieważ parametr typu w klasie/sygnaturze ma inne wymaganie dotyczące czasu kompilacji niż parametr w elemencie członkowskim/implementacji + + + + The signature and implementation are not compatible because the declaration of the type parameter '{0}' requires a constraint of the form {1} + Sygnatura i implementacja nie są zgodne, ponieważ deklaracja parametru typu „{0}” wymaga ograniczenia w postaci {1} + + + + The signature and implementation are not compatible because the type parameter '{0}' has a constraint of the form {1} but the implementation does not. Either remove this constraint from the signature or add it to the implementation. + Sygnatura i implementacja nie są zgodne, ponieważ parametr typu „{0}” ma ograniczenie w postaci {1}, ale nie ma go implementacja. Usuń to ograniczenie z sygnatury lub dodaj je do implementacji. + + + + The type '{0}' implements 'System.IComparable'. Consider also adding an explicit override for 'Object.Equals' + Typ „{0}” zawiera implementację elementu „System.IComparable”. Rozważ również dodanie jawnego przesłonięcia elementu „Object.Equals” + + + + The type '{0}' implements 'System.IComparable' explicitly but provides no corresponding override for 'Object.Equals'. An implementation of 'Object.Equals' has been automatically provided, implemented via 'System.IComparable'. Consider implementing the override 'Object.Equals' explicitly + Typ „{0}” zawiera jawną implementację elementu „System.IComparable”, ale nie dostarcza odpowiedniego przesłonięcia elementu „Object.Equals”. Implementacja elementu „Object.Equals” została automatycznie dostarczona (implementacja za pośrednictwem elementu „System.IComparable”). Rozważ jawne zaimplementowanie przesłonięcia elementu „Object.Equals” + + + + The struct, record or union type '{0}' has an explicit implementation of 'Object.GetHashCode' or 'Object.Equals'. You must apply the 'CustomEquality' attribute to the type + Typ struktury, rekordu lub unii „{0}” ma jawną implementację elementu „Object.GetHashCode” lub „Object.Equals”. Musisz zastosować atrybut „CustomEquality” do typu + + + + The struct, record or union type '{0}' has an explicit implementation of 'Object.GetHashCode'. Consider implementing a matching override for 'Object.Equals(obj)' + Typ struktury, rekordu lub unii „{0}” ma jawną implementację elementu „Object.GetHashCode”. Rozważ zaimplementowanie zgodnego przesłonięcia dla elementu „Object.Equals(obiekt)” + + + + The struct, record or union type '{0}' has an explicit implementation of 'Object.Equals'. Consider implementing a matching override for 'Object.GetHashCode()' + Typ struktury, rekordu lub unii „{0}” ma jawną implementację elementu „Object.Equals”. Rozważ zaimplementowanie zgodnego przesłonięcia dla elementu „Object.GetHashCode()” + + + + The exception definitions are not compatible because a CLI exception mapping is being hidden by a signature. The exception mapping must be visible to other modules. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1} + Definicje wyjątku są niezgodne, ponieważ mapowanie wyjątków infrastruktury CLI jest ukrywane przez sygnaturę. Mapowanie wyjątków musi być widoczne dla innych modułów. Moduł zawiera definicję wyjątku\n {0}, \nale jego sygnatura określa\n\t{1} + + + + The exception definitions are not compatible because the CLI representations differ. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1} + Definicje wyjątku są niezgodne, ponieważ reprezentacje infrastruktury CLI są różne. Moduł zawiera definicję wyjątku\n {0}, \nale jego sygnatura określa\n\t{1} + + + + The exception definitions are not compatible because the exception abbreviation is being hidden by the signature. The abbreviation must be visible to other CLI languages. Consider making the abbreviation visible in the signature. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1}. + Definicje wyjątku są niezgodne, ponieważ skrót wyjątku jest ukrywany przez sygnaturę. Skrót musi być widoczny dla innych języków infrastruktury CLI. Rozważ zapewnienie widoczności skrótu w sygnaturze. Moduł zawiera definicję wyjątku\n {0}, \nale jego sygnatura określa\n\t{1}. + + + + The exception definitions are not compatible because the exception abbreviations in the signature and implementation differ. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1}. + Definicje wyjątków są niezgodne, ponieważ różnią się skróty wyjątków w sygnaturze i implementacji. Moduł zawiera definicję wyjątku\n {0}, \nale jego sygnatura określa\n\t{1}. + + + + The exception definitions are not compatible because the exception declarations differ. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1}. + Definicje wyjątku są niezgodne, ponieważ deklaracje wyjątku są różne. Moduł zawiera definicję wyjątku\n {0}, \nale jego sygnatura określa\n\t{1}. + + + + The exception definitions are not compatible because the field '{0}' was required by the signature but was not specified by the implementation. The module contains the exception definition\n {1} \nbut its signature specifies\n\t{2}. + Definicje wyjątku są niezgodne, ponieważ pole „{0}” było wymagane przez sygnaturę, ale nie zostało określone przez implementację. Moduł zawiera definicję wyjątku\n {1}, \nale jego sygnatura określa\n\t{2}. + + + + The exception definitions are not compatible because the field '{0}' was present in the implementation but not in the signature. The module contains the exception definition\n {1} \nbut its signature specifies\n\t{2}. + Definicje wyjątku są niezgodne, ponieważ pole „{0}” było obecne w implementacji, ale nie w sygnaturze. Moduł zawiera definicję wyjątku\n {1}, \nale jego sygnatura określa\n\t{2}. + + + + The exception definitions are not compatible because the order of the fields is different in the signature and implementation. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1}. + Definicje wyjątku są niezgodne z powodu różnej kolejności pól w sygnaturze i implementacji. Moduł zawiera definicję wyjątku\n {0}, \nale jego sygnatura określa\n\t{1}. + + + + The namespace or module attributes differ between signature and implementation + Atrybuty przestrzeni nazw lub modułu w sygnaturze i implementacji nie są zgodne + + + + This method is over-constrained in its type parameters + Ta metoda ma zbyt wiele ograniczeń w parametrach typu + + + + No implementations of '{0}' had the correct number of arguments and type parameters. The required signature is '{1}'. + Żadna implementacja elementu „{0}” nie zawiera poprawnej liczby argumentów i parametrów typu. Wymagana sygnatura: „{1}”. + + + + The override for '{0}' was ambiguous + Przesłonięcie elementu „{0}” jest niejednoznaczne + + + + More than one override implements '{0}' + Więcej niż jedno przesłonięcie zawiera implementację elementu „{0}” + + + + The method '{0}' is sealed and cannot be overridden + Metoda „{0}” jest zapieczętowana i nie można jej przesłonić + + + + The override '{0}' implements more than one abstract slot, e.g. '{1}' and '{2}' + Przesłonięcie „{0}” zawiera implementację więcej niż jednego miejsca abstrakcyjnego, na przykład „{1}” i „{2}” + + + + Duplicate or redundant interface + Zduplikowany lub nadmiarowy interfejs + + + + The interface '{0}' is included in multiple explicitly implemented interface types. Add an explicit implementation of this interface. + Interfejs „{0}” występuje w wielu jawnie zaimplementowanych typach interfejsów. Dodaj jawną implementację tego interfejsu. + + + + A named argument has been assigned more than one value + Do nazwanego argumentu przypisano więcej niż jedną wartość + + + + No implementation was given for '{0}' + Nie określono implementacji elementu „{0}” + + + + No implementation was given for '{0}'. Note that all interface members must be implemented and listed under an appropriate 'interface' declaration, e.g. 'interface ... with member ...'. + Nie określono implementacji elementu „{0}”. Wszystkie elementy członkowskie interfejsu muszą zostać zaimplementowane i występować w odpowiedniej deklaracji „interface”, na przykład „interface ... with member ...”. + + + + The member '{0}' does not have the correct number of arguments. The required signature is '{1}'. + Element członkowski „{0}” nie zawiera poprawnej liczby argumentów. Wymagana sygnatura: „{1}”. + + + + The member '{0}' does not have the correct number of method type parameters. The required signature is '{1}'. + Element członkowski „{0}” nie zawiera poprawnej liczby parametrów typu metody. Wymagana sygnatura: „{1}”. + + + + The member '{0}' does not have the correct kinds of generic parameters. The required signature is '{1}'. + Element członkowski „{0}” nie zawiera poprawnych rodzajów parametrów ogólnych. Wymagana sygnatura: „{1}”. + + + + The member '{0}' cannot be used to implement '{1}'. The required signature is '{2}'. + Nie można zaimplementować elementu „{1}” przy użyciu elementu członkowskiego „{0}”. Wymagana sygnatura: „{2}”. + + + + Error while parsing embedded IL + Błąd podczas analizowania osadzonego obiektu IL + + + + Error while parsing embedded IL type + Błąd podczas analizowania typu osadzonego obiektu IL + + + + This indexer notation has been removed from the F# language + Ta notacja indeksatora została usunięta z języka F# + + + + Invalid expression on left of assignment + Nieprawidłowe wyrażenie po lewej stronie przypisania + + + + The 'ReferenceEquality' attribute cannot be used on structs. Consider using the 'StructuralEquality' attribute instead, or implement an override for 'System.Object.Equals(obj)'. + Atrybut „ReferenceEquality” nie może być używany w strukturach. Rozważ użycie atrybutu „StructuralEquality” lub implementację przesłonięcia metody „System.Object.Equals(obiekt)”. + + + + This type uses an invalid mix of the attributes 'NoEquality', 'ReferenceEquality', 'StructuralEquality', 'NoComparison' and 'StructuralComparison' + Ten typ używa nieprawidłowej kombinacji atrybutów „NoEquality”, „ReferenceEquality”, „StructuralEquality”, „NoComparison” i „StructuralComparison” + + + + The 'NoEquality' attribute must be used in conjunction with the 'NoComparison' attribute + Atrybut „NoEquality” musi być używany w połączeniu z atrybutem „NoComparison” + + + + The 'StructuralComparison' attribute must be used in conjunction with the 'StructuralEquality' attribute + Atrybut „StructuralComparison” musi być używany w połączeniu z atrybutem „StructuralEquality” + + + + The 'StructuralEquality' attribute must be used in conjunction with the 'NoComparison' or 'StructuralComparison' attributes + Atrybut „StructuralEquality” musi być używany w połączeniu z atrybutami „NoComparison” lub „StructuralComparison” + + + + A type cannot have both the 'ReferenceEquality' and 'StructuralEquality' or 'StructuralComparison' attributes + Typ nie może mieć jednocześnie atrybutu „ReferenceEquality” i atrybutów „StructuralEquality” lub „StructuralComparison” + + + + Only record, union, exception and struct types may be augmented with the 'ReferenceEquality', 'StructuralEquality' and 'StructuralComparison' attributes + Za pomocą atrybutów „ReferenceEquality”, „StructuralEquality” i „StructuralComparison” mogą być rozszerzane tylko typy rekordu, unii, wyjątku i struktury + + + + A type with attribute 'ReferenceEquality' cannot have an explicit implementation of 'Object.Equals(obj)', 'System.IEquatable<_>' or 'System.Collections.IStructuralEquatable' + Typ z atrybutem „ReferenceEquality” nie może mieć jawnej implementacji metody „Object.Equals(obiekt)”, interfejsu „System.IEquatable<_>” lub interfejsu „System.Collections.IStructuralEquatable” + + + + A type with attribute 'CustomEquality' must have an explicit implementation of at least one of 'Object.Equals(obj)', 'System.IEquatable<_>' or 'System.Collections.IStructuralEquatable' + Typ z atrybutem „CustomEquality” musi mieć jawną implementację co najmniej jednego z następujących elementów: metody „Object.Equals(obiekt)”, interfejsu „System.IEquatable<_>” lub interfejsu „System.Collections.IStructuralEquatable” + + + + A type with attribute 'CustomComparison' must have an explicit implementation of at least one of 'System.IComparable' or 'System.Collections.IStructuralComparable' + Typ z atrybutem „CustomComparison” musi mieć jawną implementację co najmniej jednego z następujących interfejsów: „System.IComparable” lub „System.Collections.IStructuralComparable” + + + + A type with attribute 'NoEquality' should not usually have an explicit implementation of 'Object.Equals(obj)'. Disable this warning if this is intentional for interoperability purposes + Typ z atrybutem „NoEquality” nie powinien zwykle mieć jawnej implementacji metody„Object.Equals(obiekt)”. Wyłącz to ostrzeżenie, jeśli jest to zamierzone do celów związanych z międzyoperacyjnością + + + + A type with attribute 'NoComparison' should not usually have an explicit implementation of 'System.IComparable', 'System.IComparable<_>' or 'System.Collections.IStructuralComparable'. Disable this warning if this is intentional for interoperability purposes + Typ z atrybutem „NoComparison” nie powinien zwykle mieć jawnej implementacji interfejsu „System.IComparable”, interfejsu „System.IComparable<_>” lub interfejsu „System.Collections.IStructuralComparable”. Wyłącz to ostrzeżenie, jeśli jest to zamierzone do celów związanych z międzyoperacyjnością + + + + The 'CustomEquality' attribute must be used in conjunction with the 'NoComparison' or 'CustomComparison' attributes + Atrybut „CustomEquality” musi być używany w połączeniu z atrybutami „NoComparison” lub „CustomComparison” + + + + Positional specifiers are not permitted in format strings + Specyfikatory pozycyjne są niedozwolone w ciągach formatu + + + + Missing format specifier + Brak specyfikatora formatu + + + + '{0}' flag set twice + Dwukrotnie ustawiono flagę „{0}” + + + + Prefix flag (' ' or '+') set twice + Dwukrotnie ustawiono flagę prefiksu („ ” lub „+”) + + + + The # formatting modifier is invalid in F# + Modyfikator formatu # jest nieprawidłowy w języku F# + + + + Bad precision in format specifier + Zła dokładność w specyfikatorze formatu + + + + Bad width in format specifier + Zła szerokość w specyfikatorze formatu + + + + '{0}' format does not support '0' flag + Format „{0}” nie obsługuje flagi „0” + + + + Precision missing after the '.' + Brak dokładności po znaku „.” + + + + '{0}' format does not support precision + Format „{0}” nie obsługuje dokładności + + + + Bad format specifier (after l or L): Expected ld,li,lo,lu,lx or lX. In F# code you can use %d, %x, %o or %u instead, which are overloaded to work with all basic integer types. + Zły specyfikator formatu (po l lub L): oczekiwano ld,li,lo,lu,lx lub lX. W kodzie języka F# można zamiast tego używać specyfikatorów %d, %x, %o lub %u, które są przeciążone w celu współpracy z wszystkimi podstawowymi typami liczb całkowitych. + + + + The 'l' or 'L' in this format specifier is unnecessary. In F# code you can use %d, %x, %o or %u instead, which are overloaded to work with all basic integer types. + Litera „l” lub „L” w tym specyfikatorze formatu jest niepotrzebna. W kodzie języka F# można zamiast tego używać specyfikatorów %d, %x, %o lub %u, które są przeciążone w celu współpracy z wszystkimi podstawowymi typami liczb całkowitych. + + + + The 'h' or 'H' in this format specifier is unnecessary. You can use %d, %x, %o or %u instead, which are overloaded to work with all basic integer types. + Litera „h” lub „H” w tym specyfikatorze formatu jest niepotrzebna. Można zamiast tego używać specyfikatora %d, %x, %o lub %u, które są przeciążone w celu współdziałania ze wszystkimi podstawowymi typami liczb całkowitych. + + + + '{0}' does not support prefix '{1}' flag + Element „{0}” nie obsługuje flagi „{1}” prefiksu + + + + Bad format specifier: '{0}' + Zły specyfikator formatu: „{0}” + + + + System.Environment.Exit did not exit + Metoda System.Environment.Exit nie została zakończona + + + + The treatment of this operator is now handled directly by the F# compiler and its meaning cannot be redefined + Ten operator jest teraz obsługiwany bezpośrednio przez kompilator języka F# i nie można ponownie zdefiniować jego znaczenia + + + + A protected member is called or 'base' is being used. This is only allowed in the direct implementation of members since they could escape their object scope. + Wywołano chroniony element członkowski lub używane jest słowo kluczowe „base”. Jest to dozwolone tylko w bezpośredniej implementacji elementów członkowskich, ponieważ mogą one wykraczać poza swój zakres obiektu + + + + The byref-typed variable '{0}' is used in an invalid way. Byrefs cannot be captured by closures or passed to inner functions. + Zmienna z podanym typem byref „{0}” jest używana w nieprawidłowy sposób. Tego typu zmienne nie mogą być przechwytywane przez zamknięcia lub przekazywane do funkcji wewnętrznych. + + + + The 'base' keyword is used in an invalid way. Base calls cannot be used in closures. Consider using a private member to make base calls. + Słowo kluczowe „base” jest używane w nieprawidłowy sposób. Wywołania elementów podstawowych nie mogą być używane w zamknięciach. Rozważ użycie prywatnego elementu członkowskiego na potrzeby wywołań elementów podstawowych. + + + + The variable '{0}' is used in an invalid way + Zmienna „{0}” jest używana w nieprawidłowy sposób + + + + The type '{0}' is less accessible than the value, member or type '{1}' it is used in. + Typ „{0}” jest mniej dostępny niż wartość, element członkowski lub typ „{1}”, w którym jest używany. + + + + 'System.Void' can only be used as 'typeof<System.Void>' in F# + Typ „System.Void” może być używany w języku F# tylko w postaci „typeof<System.Void>” + + + + A type instantiation involves a byref type. This is not permitted by the rules of Common IL. + Tworzenie wystąpienia typu obejmuje typ byref. Nie jest to dozwolone przez reguły języka Common IL. + + + + Calls to 'reraise' may only occur directly in a handler of a try-with + Wywołania „reraise” mogą występować tylko bezpośrednio w procedurze obsługi instrukcji try-with + + + + Expression-splicing operators may only be used within quotations + Operatory łączenia wyrażenia mogą być używane tylko w cudzysłowach + + + + First-class uses of the expression-splicing operator are not permitted + Pierwszoklasowe użycia operatora łączenia wyrażenia są niedozwolone + + + + First-class uses of the address-of operators are not permitted + Pierwszoklasowe użycia operatorów adresu są niedozwolone + + + + First-class uses of the 'reraise' function is not permitted + Pierwszoklasowe użycia funkcji „reraise” są niedozwolone + + + + The byref typed value '{0}' cannot be used at this point + Wartość z podanym typem byref „{0}” nie może być używana w tym momencie + + + + 'base' values may only be used to make direct calls to the base implementations of overridden members + Wartości „base” mogą być używane tylko w celu bezpośrednich wywołań, które dotyczą podstawowych implementacji przesłoniętych elementów członkowskich + + + + Object constructors cannot directly use try/with and try/finally prior to the initialization of the object. This includes constructs such as 'for x in ...' that may elaborate to uses of these constructs. This is a limitation imposed by Common IL. + Konstruktory obiektów nie mogą bezpośrednio używać instrukcji try/with i try/finally przed zainicjowaniem obiektu. Obejmuje to takie konstrukcje, jak „for x in ...”, które mogą skutkować użyciem takich konstrukcji. Jest to ograniczenie nałożone przez język Common IL. + + + + The address of the variable '{0}' cannot be used at this point + Nie można użyć adresu zmiennej „{0}” w tym momencie + + + + The address of the static field '{0}' cannot be used at this point + Nie można użyć adresu pola statycznego „{0}” w tym momencie + + + + The address of the field '{0}' cannot be used at this point + Adres pola „{0}” nie może być używany w tym momencie + + + + The address of an array element cannot be used at this point + Nie można użyć adresu elementu tablicy w tym momencie + + + + The type of a first-class function cannot contain byrefs + Typ funkcji pierwszoklasowej nie może zawierać typów byref + + + + A method return type would contain byrefs which is not permitted + Zwracany typ metody może zawierać wartości typu byref, co jest niedozwolone + + + + Invalid custom attribute value (not a constant or literal) + Nieprawidłowa wartość atrybutu niestandardowego (nie jest to stała ani literał) + + + + The attribute type '{0}' has 'AllowMultiple=false'. Multiple instances of this attribute cannot be attached to a single language element. + Typ atrybutu „{0}” zawiera wartość „AllowMultiple=false”. Do pojedynczego elementu języka nie można dołączyć wielu wystąpień tego atrybutu. + + + + The member '{0}' is used in an invalid way. A use of '{1}' has been inferred prior to its definition at or near '{2}'. This is an invalid forward reference. + Element członkowski „{0}” jest używany w nieprawidłowy sposób. Użycie „{1}” zostało wywnioskowane przed jego definicją w „{2}” lub w pobliżu tego miejsca. Jest to nieprawidłowe odwołanie w przód. + + + + A byref typed value would be stored here. Top-level let-bound byref values are not permitted. + Może tutaj być przechowywana wartość typu byref. Wartości typu byref najwyższego poziomu wiązane słowem kluczowym let są niedozwolone. + + + + [<ReflectedDefinition>] terms cannot contain uses of the prefix splice operator '%' + Warunki [<ReflectedDefinition>] nie mogą zawierać zastosowań operatora łączenia prefiksów „%” + + + + A function labeled with the 'EntryPointAttribute' attribute must be the last declaration in the last file in the compilation sequence. + Funkcja z etykietą i atrybutem „EntryPointAttribute” musi być ostatnią deklaracją w ostatnim pliku sekwencji kompilacji. + + + + compiled form of the union case + skompilowanej postaci przypadku unii + + + + default augmentation of the union case + domyślnym rozszerzeniu przypadku unii + + + + The property '{0}' has the same name as a method in type '{1}'. + Właściwość „{0}” ma taką samą nazwę co metoda w typie „{1}”. + + + + The property '{0}' of type '{1}' has a getter and a setter that do not match. If one is abstract then the other must be as well. + Właściwość „{0}” typu „{1}” ma metodę pobierającą i metodę ustawiającą, które są niezgodne. Jeśli jedna z nich jest abstrakcyjna, druga również musi taka być. + + + + The property '{0}' has the same name as another property in type '{1}', but one takes indexer arguments and the other does not. You may be missing an indexer argument to one of your properties. + Właściwość „{0}” ma taką samą nazwę co inna właściwość w typie „{1}”, ale pobiera argumenty indeksatora, których druga właściwość nie pobiera. Być może brakuje argumentu indeksatora jednej z właściwości. + + + + A type would store a byref typed value. This is not permitted by Common IL. + Typ będzie przechowywać wartość typu byref. Nie jest to dozwolone przez język Common IL. + + + + Duplicate method. The method '{0}' has the same name and signature as another method in type '{1}'. + Zduplikowana metoda. Metoda „{0}” ma taką samą nazwę i sygnaturę co inna metoda w typie „{1}”. + + + + Duplicate method. The method '{0}' has the same name and signature as another method in type '{1}' once tuples, functions, units of measure and/or provided types are erased. + Zduplikowana metoda. Metoda „{0}” ma taką samą nazwę i sygnaturę co inna metoda w typie „{1}” po wymazaniu krotek, funkcji, jednostek miary i/lub udostępnionych typów. + + + + The method '{0}' has curried arguments but has the same name as another method in type '{1}'. Methods with curried arguments cannot be overloaded. Consider using a method taking tupled arguments. + Metoda „{0}” ma argumenty curried i taką samą nazwę co inna metoda w typie „{1}”. Nie można przeciążać metod z argumentami curried. Rozważ użycie metody pobierającej argumenty w postaci krotki. + + + + Methods with curried arguments cannot declare 'out', 'ParamArray', 'optional', 'ReflectedDefinition', 'byref', 'CallerLineNumber', 'CallerMemberName', or 'CallerFilePath' arguments + Metody z argumentami curried nie mogą deklarować argumentu „out”, „ParamArray”, „optional”, „ReflectedDefinition”, „byref”, „CallerLineNumber”, „CallerMemberName” lub „CallerFilePath” + + + + Duplicate property. The property '{0}' has the same name and signature as another property in type '{1}'. + Zduplikowana właściwość. Właściwość „{0}” ma taką samą nazwę i sygnaturę co inna właściwość w typie „{1}”. + + + + Duplicate property. The property '{0}' has the same name and signature as another property in type '{1}' once tuples, functions, units of measure and/or provided types are erased. + Zduplikowana właściwość. Właściwość „{0}” ma taką samą nazwę i sygnaturę co inna właściwość w typie „{1}” po wymazaniu krotek, funkcji, jednostek miary i/lub udostępnionych typów. + + + + Duplicate method. The abstract method '{0}' has the same name and signature as an abstract method in an inherited type. + Zduplikowana metoda. Metoda abstrakcyjna „{0}” ma taką samą nazwę i sygnaturę co metoda abstrakcyjna w typie dziedziczonym. + + + + Duplicate method. The abstract method '{0}' has the same name and signature as an abstract method in an inherited type once tuples, functions, units of measure and/or provided types are erased. + Zduplikowana metoda. Metoda abstrakcyjna „{0}” ma taką samą nazwę i sygnaturę co metoda abstrakcyjna w typie dziedziczonym po wymazaniu krotek, funkcji, jednostek miary i/lub udostępnionych typów. + + + + This type implements the same interface at different generic instantiations '{0}' and '{1}'. This is not permitted in this version of F#. + Ten typ implementuje ten sam interfejs w różnych ogólnych utworzonych wystąpieniach „{0}” i „{1}”. Nie jest to dozwolone w tej wersji języka F#. + + + + The type of a field using the 'DefaultValue' attribute must admit default initialization, i.e. have 'null' as a proper value or be a struct type whose fields all admit default initialization. You can use 'DefaultValue(false)' to disable this check + Typ pola używający atrybutu „DefaultValue” musi przyjąć domyślne inicjowanie (np. mieć wartość „null” jako poprawną wartość lub być typem struktury, którego wszystkie pola przyjmują domyślne inicjowanie). Aby wyłączyć to sprawdzenie, można użyć atrybutu „DefaultValue(false)” + + + + The type abbreviation contains byrefs. This is not permitted by F#. + Skrót typu zawiera typy byref. Jest to niedozwolone w języku F#. + + + + The variable '{0}' is bound in a quotation but is used as part of a spliced expression. This is not permitted since it may escape its scope. + Zmienna „{0}” jest powiązana w wyrażeniu cytowanym, ale jest używana jako część połączonego wyrażenia. Jest to niedozwolone, ponieważ może spowodować wykroczenie zmiennej poza jej zakres. + + + + Quotations cannot contain uses of generic expressions + Wyrażenia cytowane nie mogą używać wyrażeń ogólnych + + + + Quotations cannot contain function definitions that are inferred or declared to be generic. Consider adding some type constraints to make this a valid quoted expression. + Wyrażenia cytowane nie mogą zawierać definicji funkcji, które są wnioskowane lub deklarowane jako ogólne. Rozważ dodanie ograniczeń typów w celu zapewnienia poprawności tego wyrażenia cytowanego. + + + + Quotations cannot contain object expressions + Wyrażenia cytowane nie mogą zawierać wyrażeń obiektu + + + + Quotations cannot contain expressions that take the address of a field + Konstrukcje w cudzysłowie nie mogą zawierać wyrażeń, które pobierają adres pola + + + + Quotations cannot contain expressions that fetch static fields + Wyrażenia cytowane nie mogą zawierać wyrażeń, które pobierają pola statyczne + + + + Quotations cannot contain inline assembly code or pattern matching on arrays + Konstrukcje w cudzysłowie nie mogą zawierać wbudowanego kodu zestawu lub dopasowania wzorca w tablicach + + + + Quotations cannot contain descending for loops + Konstrukcje w cudzysłowie nie mogą zawierać malejących pętli for + + + + Quotations cannot contain expressions that fetch union case indexes + Wyrażenia cytowane nie mogą zawierać wyrażeń, które pobierają indeksy przypadku unii + + + + Quotations cannot contain expressions that set union case fields + Konstrukcje w cudzysłowie nie mogą zawierać wyrażeń, które ustawiają pola przypadku unii + + + + Quotations cannot contain expressions that set fields in exception values + Konstrukcje w cudzysłowie nie mogą zawierać wyrażeń, które ustawiają pola w wartościach wyjątku + + + + Quotations cannot contain expressions that require byref pointers + Konstrukcje w cudzysłowie nie mogą zawierać wyrażeń, które wymagają wskaźników byref + + + + Quotations cannot contain expressions that make member constraint calls, or uses of operators that implicitly resolve to a member constraint call + Konstrukcja w cudzysłowie nie mogą zawierać wyrażeń, które tworzą wywołania ograniczenia elementu członkowskiego, lub używać operatorów niejawnie rozpoznawanych jako wywołanie ograniczenia elementu członkowskiego + + + + Quotations cannot contain this kind of constant + Wyrażenia cytowane nie mogą zawierać tego rodzaju stałej + + + + Quotations cannot contain this kind of pattern match + Wyrażenia cytowane nie mogą zawierać tego rodzaju dopasowania wzorca + + + + Quotations cannot contain array pattern matching + Konstrukcje w cudzysłowie nie mogą zawierać dopasowania wzorca tablicy + + + + Quotations cannot contain this kind of type + Wyrażenia cytowane nie mogą zawierać tego rodzaju typu + + + + The declared type parameter '{0}' cannot be used here since the type parameter cannot be resolved at compile time + Zadeklarowany parametr typu „{0}” nie może być tutaj używany, ponieważ nie można rozpoznać parametru typu w czasie kompilacji + + + + This code is less generic than indicated by its annotations. A unit-of-measure specified using '_' has been determined to be '1', i.e. dimensionless. Consider making the code generic, or removing the use of '_'. + Ten kod jest mniej ogólny, niż wskazują na to jego adnotacje. Jednostka miary podana przy użyciu konstrukcji „_” została określona jako „1” (czyli bez wymiaru). Rozważ zapewnienie ogólności kodu lub zrezygnowanie z użycia konstrukcji „_”. + + + + Type inference problem too complicated (maximum iteration depth reached). Consider adding further type annotations. + Problem wnioskowania o typie jest zbyt złożony (osiągnięto maksymalną głębokość iteracji). Rozważ dodanie dodatkowych adnotacji typów. + + + + Expected arguments to an instance member + Oczekiwano argumentów elementu członkowskiego wystąpienia + + + + This indexer expects {0} arguments but is here given {1} + Ten indeksator oczekuje argumentów w liczbie {0}, ale podano tutaj argumenty w liczbie {1} + + + + Expecting a type supporting the operator '{0}' but given a function type. You may be missing an argument to a function. + Oczekiwany jest typ obsługujący operator „{0}”, ale podano typ funkcji. Być może brakuje argumentu funkcji. + + + + Expecting a type supporting the operator '{0}' but given a tuple type + Oczekiwany jest typ obsługujący operator „{0}”, ale podano typ krotki + + + + None of the types '{0}' support the operator '{1}' + Żaden z typów „{0}” nie obsługuje operatora „{1}” + + + + The type '{0}' does not support the operator '{1}' + Typ „{0}” nie obsługuje operatora „{1}” + + + + None of the types '{0}' support the operator '{1}'. Consider opening the module 'Microsoft.FSharp.Linq.NullableOperators'. + Żaden z typów „{0}” nie obsługuje operatora „{1}”. Rozważ otwarcie modułu „Microsoft.FSharp.Linq.NullableOperators”. + + + + The type '{0}' does not support the operator '{1}'. Consider opening the module 'Microsoft.FSharp.Linq.NullableOperators'. + Typ „{0}” nie obsługuje operatora „{1}”. Rozważ otwarcie modułu „Microsoft.FSharp.Linq.NullableOperators”. + + + + The type '{0}' does not support a conversion to the type '{1}' + Typ „{0}” nie obsługuje konwersji do typu „{1}” + + + + The type '{0}' has a method '{1}' (full name '{2}'), but the method is static + Typ „{0}” ma metodę „{1}” (pełna nazwa „{2}”), ale metoda jest statyczna + + + + The type '{0}' has a method '{1}' (full name '{2}'), but the method is not static + Typ „{0}” ma metodę „{1}” (pełna nazwa „{2}”), ale metoda nie jest statyczna + + + + The constraints 'struct' and 'not struct' are inconsistent + Ograniczenia „struct” i „not struct” nie są spójne + + + + The type '{0}' does not have 'null' as a proper value + Typ „{0}” nie ma wartości „null” jako właściwej wartości + + + + The type '{0}' does not have 'null' as a proper value. To create a null value for a Nullable type use 'System.Nullable()'. + Typ „{0}” nie ma wartości „null” jako właściwej wartości. Aby utworzyć wartość null dla typu Nullable, użyj wartości „System.Nullable()”. + + + + The type '{0}' does not support the 'comparison' constraint because it has the 'NoComparison' attribute + Typ „{0}” nie obsługuje ograniczenia „comparison”, ponieważ ma on atrybut „NoComparison” + + + + The type '{0}' does not support the 'comparison' constraint. For example, it does not support the 'System.IComparable' interface + Typ „{0}” nie obsługuje ograniczenia „comparison”. Na przykład typ nie obsługuje interfejsu „System.IComparable” + + + + The type '{0}' does not support the 'comparison' constraint because it is a record, union or struct with one or more structural element types which do not support the 'comparison' constraint. Either avoid the use of comparison with this type, or add the 'StructuralComparison' attribute to the type to determine which field type does not support comparison + Typ „{0}” nie obsługuje ograniczenia „comparison”, ponieważ jest rekordem, unią lub strukturą z co najmniej jednym typem elementu strukturalnego, który nie obsługuje ograniczenia „comparison”. Unikaj używania porównania z tym typem lub dodaj atrybut „StructuralComparison” do typu w celu ustalenia, jaki typ pola nie obsługuje porównania + + + + The type '{0}' does not support the 'equality' constraint because it has the 'NoEquality' attribute + Typ „{0}” nie obsługuje ograniczenia „equality”, ponieważ ma on atrybut „NoEquality” + + + + The type '{0}' does not support the 'equality' constraint because it is a function type + Typ „{0}” nie obsługuje ograniczenia „equality”, ponieważ ma on typ funkcji + + + + The type '{0}' does not support the 'equality' constraint because it is a record, union or struct with one or more structural element types which do not support the 'equality' constraint. Either avoid the use of equality with this type, or add the 'StructuralEquality' attribute to the type to determine which field type does not support equality + Typ „{0}” nie obsługuje ograniczenia „equality”, ponieważ jest rekordem, unią lub strukturą z co najmniej jednym typem elementu strukturalnego, który nie obsługuje ograniczenia „equality”. Unikaj używania równości z tym typem lub dodaj atrybut „StructuralEquality” do typu w celu ustalenia, jaki typ pola nie obsługuje równości + + + + The type '{0}' is not a CLI enum type + Typ „{0}” nie jest typem wyliczeniowym infrastruktury CLI + + + + The type '{0}' has a non-standard delegate type + Typ „{0}” ma niestandardowy typ delegata. + + + + The type '{0}' is not a CLI delegate type + Typ „{0}” nie jest typem delegata infrastruktury CLI. + + + + This type parameter cannot be instantiated to 'Nullable'. This is a restriction imposed in order to ensure the meaning of 'null' in some CLI languages is not confusing when used in conjunction with 'Nullable' values. + Dla tego parametru typu nie można utworzyć wystąpienia jako „Nullable”. Jest to ograniczenie nałożone w celu zapewnienia, że znaczenie wartości „null” w niektórych językach infrastruktury CLI nie zostanie niewłaściwie określone podczas używania w połączeniu z wartościami „Nullable”. + + + + A generic construct requires that the type '{0}' is a CLI or F# struct type + Ogólna konstrukcja wymaga, aby typ „{0}” był typem struktury infrastruktury CLI lub języka F# + + + + A generic construct requires that the type '{0}' is an unmanaged type + Ogólna konstrukcja wymaga, aby typ „{0}” był typem niezarządzanym + + + + The type '{0}' is not compatible with any of the types {1}, arising from the use of a printf-style format string + Typ „{0}” nie jest zgodny z żadnym z typów {1}, co wynika z użycia ciągu formatu w stylu funkcji printf + + + + A generic construct requires that the type '{0}' have reference semantics, but it does not, i.e. it is a struct + Konstrukcja ogólna wymaga, aby typ „{0}” miał semantykę odwołania, ale tak nie jest, ponieważ jest on strukturą + + + + A generic construct requires that the type '{0}' be non-abstract + Ogólna konstrukcja wymaga, aby typ „{0}” nie był typem abstrakcyjnym + + + + A generic construct requires that the type '{0}' have a public default constructor + Ogólna konstrukcja wymaga, aby typ „{0}” miał publiczny konstruktor domyślny + + + + Type instantiation length mismatch + Niezgodność długości tworzenia wystąpienia typu + + + + Optional arguments not permitted here + Argumenty opcjonalne nie są tutaj dozwolone + + + + {0} is not a static member + Element {0} nie jest statycznym elementem członkowskim + + + + {0} is not an instance member + Element {0} nie jest elementem członkowskim wystąpienia + + + + Argument length mismatch + Niezgodność długości argumentów + + + + The argument types don't match + Typy argumentu są niezgodne + + + + This method expects a CLI 'params' parameter in this position. 'params' is a way of passing a variable number of arguments to a method in languages such as C#. Consider passing an array for this argument + Ta metoda oczekuje parametru „params” infrastruktury CLI na tej pozycji. Parametr „params” umożliwia przekazywanie zmiennej liczby argumentów metodzie w językach takich jak C#. Rozważ przekazanie tablicy dla tego argumentu + + + + The member or object constructor '{0}' is not {1} + Konstruktor elementu członkowskiego lub obiektu „{0}” nie jest {1} + + + + The member or object constructor '{0}' is not {1}. Private members may only be accessed from within the declaring type. Protected members may only be accessed from an extending type and cannot be accessed from inner lambda expressions. + Element członkowski lub konstruktor obiektów „{0}” nie jest {1}. Prywatne elementy członkowskie mogą być dostępne tylko w obrębie typu deklarującego. Chronione elementy członkowskie mogą być dostępne tylko z poziomu typu rozszerzającego. Nie można uzyskać do nich dostępu z poziomu wewnętrznych wyrażeń lambda. + + + + {0} is not a static method + Metoda {0} nie jest metodą statyczną + + + + {0} is not an instance method + Metoda {0} nie jest metodą wystąpienia + + + + The member or object constructor '{0}' has no argument or settable return property '{1}'. {2}. + Element członkowski lub konstruktor obiektów „{0}” nie ma argumentu lub ustawialnej właściwości zwracanej „{1}”. {2}. + + + + The object constructor '{0}' has no argument or settable return property '{1}'. {2}. + Konstruktor obiektu „{0}” nie ma argumentu lub konfigurowalnej właściwości zwracania „{1}”. {2}. + + + + The required signature is {0} + Wymagana sygnatura to {0} + + + + The member or object constructor '{0}' requires {1} argument(s). The required signature is '{2}'. + Element członkowski lub konstruktor obiektów „{0}” wymaga argumentów w liczbie {1}. Wymagana sygnatura to „{2}”. + + + + The member or object constructor '{0}' requires {1} additional argument(s). The required signature is '{2}'. + Element członkowski lub konstruktor obiektów „{0}” wymaga dodatkowych argumentów w liczbie {1}. Wymagana sygnatura to „{2}”. + + + + The member or object constructor '{0}' requires {1} argument(s). The required signature is '{2}'. Some names for missing arguments are {3}. + Element członkowski lub konstruktor obiektów „{0}” wymaga argumentów w liczbie {1}. Wymagana sygnatura to „{2}”. Niektóre nazwy brakujących argumentów to: {3}. + + + + The member or object constructor '{0}' requires {1} additional argument(s). The required signature is '{2}'. Some names for missing arguments are {3}. + Konstruktor elementu członkowskiego lub obiektu „{0}” wymaga dodatkowych argumentów w liczbie {1}. Wymagana sygnatura to „{2}”. Niektóre nazwy brakujących argumentów to: {3}. + + + + The member or object constructor '{0}' requires {1} argument(s) but is here given {2} unnamed and {3} named argument(s). The required signature is '{4}'. + Konstruktor elementu członkowskiego lub obiektu „{0}” wymaga argumentów w liczbie {1}, ale podano tutaj nienazwane i nazwane argumenty w liczbie wynoszącej odpowiednio {2} i {3}. Wymagana sygnatura to „{4}”. + + + + The member or object constructor '{0}' takes {1} argument(s) but is here given {2}. The required signature is '{3}'. + Konstruktor elementu członkowskiego lub obiektu „{0}” pobiera argumenty w liczbie {1}, ale podano tutaj {2}. Wymagana sygnatura to „{3}”. + + + + The object constructor '{0}' takes {1} argument(s) but is here given {2}. The required signature is '{3}'. + Konstruktor obiektu „{0}” przyjmuje argumenty {1}, ale tutaj podano {2}. Wymagany podpis to „{3}”. + + + + The object constructor '{0}' takes {1} argument(s) but is here given {2}. The required signature is '{3}'. If some of the arguments are meant to assign values to properties, consider separating those arguments with a comma (','). + Konstruktor obiektu „{0}” przyjmuje argumenty {1}, ale tutaj podano {2}. Wymagany podpis to „{3}”. Jeśli niektóre z argumentów mają przypisywać wartości do właściwości, rozważ rozdzielenie tych argumentów za pomocą przecinka („,”). + + + + The member or object constructor '{0}' takes {1} type argument(s) but is here given {2}. The required signature is '{3}'. + Element członkowski lub konstruktor obiektów „{0}” pobiera argumenty typu w liczbie {1}, ale podano tutaj {2}. Wymagana sygnatura to „{3}”. + + + + A member or object constructor '{0}' taking {1} arguments is not accessible from this code location. All accessible versions of method '{2}' take {3} arguments. + Konstruktor elementu członkowskiego lub obiektu „{0}” pobiera argumenty, których liczba to {1} i które są niedostępne w tej lokalizacji kodu. Wszystkie dostępne wersje metody „{2}” pobierają argumenty o następującej liczbie: {3}. + + + + Incorrect generic instantiation. No {0} member named '{1}' takes {2} generic arguments. + Niepoprawne ogólne tworzenie wystąpienia. Żaden element członkowski {0} o nazwie „{1}” nie pobiera {2} argumentów ogólnych. + + + + The member or object constructor '{0}' does not take {1} argument(s). An overload was found taking {2} arguments. + Konstruktor elementu członkowskiego lub obiektu „{0}” nie pobiera argumentów w liczbie {1}. Znaleziono przeciążenie pobierające argumenty o następującej liczbie: {2}. + + + + No {0} member or object constructor named '{1}' takes {2} arguments + Żaden element członkowski {0} lub konstruktor obiektu o nazwie „{1}” nie pobiera następującej liczby argumentów: {2} + + + + No {0} member or object constructor named '{1}' takes {2} arguments. Note the call to this member also provides {3} named arguments. + Żaden element członkowski {0} lub konstruktor obiektu o nazwie „{1}” nie pobiera następującej liczby argumentów: {2}. Zauważ, że wywołanie tego elementu członkowskiego udostępnia również argumenty nazwane o następującej liczbie: {3}. + + + + No {0} member or object constructor named '{1}' takes {2} arguments. The named argument '{3}' doesn't correspond to any argument or settable return property for any overload. + Żaden element członkowski {0} lub konstruktor obiektów o nazwie „{1}” nie pobiera następującej liczby argumentów: {2}. Argument nazwany „{3}” nie odpowiada żadnemu argumentowi lub ustawialnej właściwości zwracanej w żadnym przeciążeniu. + + + + Method or object constructor '{0}' not found + Nie znaleziono metody lub konstruktora obiektów „{0}” + + + + No overloads match for method '{0}'. + Brak przeciążeń zgodnych z metodą „{0}”. + + + + A unique overload for method '{0}' could not be determined based on type information prior to this program point. A type annotation may be needed. + Nie można określić unikatowego przeciążenia dla metody „{0}” na podstawie informacji o typach przed tym punktem programu. Może być wymagana adnotacja typu. + + + + Candidates: {0} + Kandydujący: {0} + + + + The available overloads are shown below. + Dostępne przeciążenia są pokazane poniżej. + + + + Accessibility modifiers are not permitted on 'do' bindings, but '{0}' was given. + Modyfikatory dostępności są niedozwolone w powiązaniach „do”, ale podano element „{0}”. + + + + End of file in #if section begun at or after here + Koniec pliku w sekcji #if rozpoczętej w tym miejscu lub za nim + + + + End of file in string begun at or before here + Koniec pliku w ciągu rozpoczętym w tym miejscu lub przed nim + + + + End of file in verbatim string begun at or before here + Koniec pliku w ciągu dosłownego wyrażenia rozpoczętym w tym miejscu lub przed nim + + + + End of file in comment begun at or before here + Koniec pliku w komentarzu rozpoczętym w tym miejscu lub przed nim + + + + End of file in string embedded in comment begun at or before here + Koniec pliku w ciągu osadzonym w komentarzu rozpoczętym w tym miejscu lub przed nim + + + + End of file in verbatim string embedded in comment begun at or before here + Koniec pliku w ciągu dosłownego wyrażenia osadzonym w komentarzu rozpoczętym w tym miejscu lub przed nim + + + + End of file in IF-OCAML section begun at or before here + Koniec pliku w sekcji IF-OCAML rozpoczętej w tym miejscu lub przed nim + + + + End of file in directive begun at or before here + Koniec pliku w dyrektywie rozpoczętej w tym miejscu lub przed nim + + + + No #endif found for #if or #else + Nie znaleziono dyrektywy #endif dla dyrektywy #if lub #else + + + + Attributes have been ignored in this construct + Atrybuty zostały zignorowane w tej konstrukcji + + + + 'use' bindings are not permitted in primary constructors + Powiązania „use” nie są dozwolone w konstruktorach podstawowych + + + + 'use' bindings are not permitted in modules and are treated as 'let' bindings + Powiązania „use” nie są dozwolone w modułach i są traktowane jak powiązania „let” + + + + An integer for loop must use a simple identifier + Pętla for z liczbami całkowitymi musi używać prostego identyfikatora + + + + At most one 'with' augmentation is permitted + Dozwolone jest najwyżej jedno rozszerzenie „with” + + + + A semicolon is not expected at this point + Średnik nie jest oczekiwany w tym miejscu + + + + Unexpected end of input + Nieoczekiwany koniec danych wejściowych + + + + Accessibility modifiers are not permitted here, but '{0}' was given. + Modyfikatory dostępności nie są tutaj dozwolone, ale podano element „{0}”. + + + + Only '#' compiler directives may occur prior to the first 'namespace' declaration + Tylko dyrektywy kompilatora „#” mogą występować przed pierwszą deklaracją „namespace” + + + + Accessibility modifiers should come immediately prior to the identifier naming a construct + Modyfikatory dostępności powinny występować bezpośrednio przed identyfikatorem konstrukcji + + + + Files should begin with either a namespace or module declaration, e.g. 'namespace SomeNamespace.SubNamespace' or 'module SomeNamespace.SomeModule', but not both. To define a module within a namespace use 'module SomeModule = ...' + Pliki powinny rozpoczynać się od deklaracji przestrzeni nazw lub modułu (np. „namespace PrzestrzeńNazw.PodrzędnaPrzestrzeńNazw” lub „module PrzestrzeńNazw.Moduł”), ale nie od obu. Aby zdefiniować moduł w przestrzeni nazw, użyj konstrukcji „module Moduł = ...” + + + + A module abbreviation must be a simple name, not a path + Skrót modułu musi być prostą nazwą, a nie ścieżką + + + + Ignoring attributes on module abbreviation + Ignorowanie atrybutów w skrócie modułu + + + + The '{0}' accessibility attribute is not allowed on module abbreviation. Module abbreviations are always private. + Atrybut dostępności „{0}” nie jest dozwolony w skrócie modułu. Skróty modułu zawsze są prywatne. + + + + The '{0}' visibility attribute is not allowed on module abbreviation. Module abbreviations are always private. + Atrybut widoczności „{0}” nie jest dozwolony w skrócie modułu. Skróty modułu zawsze są prywatne. + + + + Unclosed block + Niezamknięty blok + + + + Unmatched 'begin' or 'struct' + Niedopasowany element „begin” lub „struct” + + + + A module name must be a simple name, not a path + Nazwa modułu musi być prostą nazwą, a nie ścieżką + + + + Unexpected empty type moduleDefn list + Nieoczekiwana pusta lista typu moduleDefn + + + + Attributes should be placed before 'val' + Atrybuty powinny być umieszczone przed elementem „val” + + + + Attributes are not permitted on interface implementations + Atrybuty są niedozwolone w implementacjach interfejsu + + + + Syntax error + Błąd składni + + + + Augmentations are not permitted on delegate type moduleDefns + Rozszerzenia są niedozwolone w typie delegata moduleDefns. + + + + Unmatched 'class', 'interface' or 'struct' + Niedopasowany element „class”, „interface” lub „struct” + + + + A type definition requires one or more members or other declarations. If you intend to define an empty class, struct or interface, then use 'type ... = class end', 'interface end' or 'struct end'. + Definicja typu wymaga co najmniej jednego elementu członkowskiego lub innych deklaracji. Jeśli zamierzasz zdefiniować pustą klasę, strukturę lub interfejs, użyj konstrukcji „type ... = class end”, „interface end” lub „struct end”. + + + + Unmatched 'with' or badly formatted 'with' block + Niedopasowany blok „with” lub niepoprawnie sformatowany blok „with” + + + + 'get', 'set' or 'get,set' required + Wymagana instrukcja „get”, „set” lub „get,set” + + + + Only class types may take value arguments + Tylko typy klasy mogą pobierać argumenty wartości + + + + Unmatched 'begin' + Niedopasowany element „begin” + + + + Invalid declaration syntax + Nieprawidłowa składnia deklaracji + + + + 'get' and/or 'set' required + wymagane słowa „get” i/lub „set” + + + + Type annotations on property getters and setters must be given after the 'get()' or 'set(v)', e.g. 'with get() : string = ...' + Adnotacje typu w metodach ustawiających i pobierających właściwości muszą być podane po metodzie „get()” lub „set(v)” (np. „with get() : string = ...”) + + + + A getter property is expected to be a function, e.g. 'get() = ...' or 'get(index) = ...' + Oczekiwano, że właściwość metody pobierającej będzie funkcją, np. „get() = ...” lub „get(indeks) = ...” + + + + Multiple accessibilities given for property getter or setter + Podano wiele dostępności dla metody ustawiającej lub metody pobierającej właściwość + + + + Property setters must be defined using 'set value = ', 'set idx value = ' or 'set (idx1,...,idxN) value = ... ' + Metody ustawiające właściwości muszą być definiowane przy użyciu konstrukcji „set wartość = ”, „set indeks wartość = ” lub „set (indeks1,...,indeksN) wartość = ... ” + + + + Interfaces always have the same visibility as the enclosing type + Interfejsy zawsze mają taką samą widoczność jak typ otaczający + + + + Accessibility modifiers are not allowed on this member. Abstract slots always have the same visibility as the enclosing type. + Modyfikatory dostępności są niedozwolone w tym elemencie członkowskim. Miejsca abstrakcyjne zawsze mają taką samą widoczność co typ otaczający. + + + + Attributes are not permitted on 'inherit' declarations + Atrybuty są niedozwolone w deklaracjach „inherit” + + + + Accessibility modifiers are not permitted on an 'inherits' declaration + Modyfikatory dostępności nie są dozwolone w deklaracji „inherits” + + + + 'inherit' declarations cannot have 'as' bindings. To access members of the base class when overriding a method, the syntax 'base.SomeMember' may be used; 'base' is a keyword. Remove this 'as' binding. + Deklaracje „inherit” nie mogą mieć powiązań „as”. Aby uzyskać dostęp do elementów członkowskich klasy podstawowej podczas przesłaniania metody, można użyć składni „base.ElementCzłonkowski”. „base” to słowo kluczowe. Usuń to powiązanie „as”. + + + + Attributes are not allowed here + Atrybuty są tutaj niedozwolone + + + + Accessibility modifiers are not permitted in this position for type abbreviations + Modyfikatory dostępności są niedozwolone w tej pozycji dla skrótów typu + + + + Accessibility modifiers are not permitted in this position for enum types + Modyfikatory dostępności są niedozwolone w tej pozycji dla typów wyliczeniowych + + + + All enum fields must be given values + Dla wszystkich pól wyliczeń muszą zostać podane wartości + + + + Accessibility modifiers are not permitted on inline assembly code types + Modyfikatory dostępności nie są dozwolone w typach śródwierszowego kodu zestawu + + + + Unexpected identifier: '{0}' + Nieoczekiwany identyfikator: „{0}” + + + + Accessibility modifiers are not permitted on union cases. Use 'type U = internal ...' or 'type U = private ...' to give an accessibility to the whole representation. + Modyfikatory dostępności nie są dozwolone w przypadkach unii. Użyj ciągu type U = internal ...” lub „type U = private ...”, aby dodać dostępność do całej reprezentacji. + + + + Accessibility modifiers are not permitted on enumeration fields + Modyfikatory dostępności są niedozwolone w polach wyliczeń + + + + Consider using a separate record type instead + Rozważ użycie osobnego typu rekordu + + + + Accessibility modifiers are not permitted on record fields. Use 'type R = internal ...' or 'type R = private ...' to give an accessibility to the whole representation. + Modyfikatory dostępności są niedozwolone w polach rekordu. Użyj konstrukcji „type R = internal ...” lub „type R = private ...”, aby zapewnić dostępność całej reprezentacji. + + + + The declaration form 'let ... and ...' for non-recursive bindings is not used in F# code. Consider using a sequence of 'let' bindings + Postać deklaracji „let ... and ...” dla powiązań innych niż cykliczne nie jest używana w kodzie języka F#. Rozważ użycie sekwencji powiązań „let” + + + + Unmatched '(' + Niedopasowany element „(” + + + + Successive patterns should be separated by spaces or tupled + Kolejne wzorce powinny być oddzielone spacjami lub mieć postać krotek + + + + No matching 'in' found for this 'let' + Nie znaleziono zgodnego tokenu „in” dla tego tokenu „let” + + + + Error in the return expression for this 'let'. Possible incorrect indentation. + Błąd w wyrażeniu zwracanym dla tego słowa kluczowego „let”. Możliwe niepoprawne wcięcie. + + + + The block following this '{0}' is unfinished. Every code block is an expression and must have a result. '{1}' cannot be the final code element in a block. Consider giving this block an explicit result. + Blok następujący po elemencie „{0}” jest niezakończony. Każdy blok kodu jest wyrażeniem i musi mieć wynik. Element „{1}” nie może być ostatnim elementem kodu w bloku. Rozważ zastosowanie jawnego wyniku w tym bloku. + + + + Incomplete conditional. Expected 'if <expr> then <expr>' or 'if <expr> then <expr> else <expr>'. + Niekompletna instrukcja warunkowa. Oczekiwano konstrukcji „if <wyrażenie> then <wyrażenie>” lub „if <wyrażenie> then <wyrażenie> else <wyrażenie>”. + + + + 'assert' may not be used as a first class value. Use 'assert <expr>' instead. + Element „assert” nie może być używany jako wartość pierwszoklasowa. Użyj elementu „assert <wyrażenie>”. + + + + Identifier expected + Oczekiwano identyfikatora + + + + 'in' or '=' expected + Oczekiwano konstrukcji „in” lub „=” + + + + The use of '->' in sequence and computation expressions is limited to the form 'for pat in expr -> expr'. Use the syntax 'for ... in ... do ... yield...' to generate elements in more complex sequence expressions. + Użycie konstrukcji „->” w wyrażeniach obliczenia i sekwencji jest ograniczone do postaci „for wzorzec in wyrażenie -> wyrażenie”. Użyj składni „for ... in ... do ... yield...”, aby wygenerować elementy w bardziej złożonych wyrażeniach sekwencji. + + + + Successive arguments should be separated by spaces or tupled, and arguments involving function or method applications should be parenthesized + Kolejne argumenty powinny być oddzielone spacjami lub mieć postać krotek, a argumenty obejmujące aplikacje metody lub funkcji powinny być umieszczone w nawiasach okrągłych + + + + Unmatched '[' + Niedopasowany element „[” + + + + Missing qualification after '.' + Brak kwalifikacji po znaku „.” + + + + In F# code you may use 'expr.[expr]'. A type annotation may be required to indicate the first expression is an array + W kodzie języka F# możesz użyć konstrukcji „wyrażenie.[wyrażenie]”. Adnotacja typu może być wymagana do wskazania, że pierwsze wyrażenie to tablica + + + + Mismatched quotation, beginning with '{0}' + Niezgodny cytat, począwszy od „{0}” + + + + Unmatched '{0}' + Niedopasowany element „{0}” + + + + Unmatched '[|' + Niedopasowany element „[|” + + + + Unmatched '{{' + Niedopasowany element „{{” + + + + Field bindings must have the form 'id = expr;' + Powiązania pól muszą mieć postać „identyfikator = wyrażenie;” + + + + This member is not permitted in an object implementation + Ten element członkowski jest niedozwolony w implementacji obiektu + + + + Missing function body + Brak treści funkcji + + + + Syntax error in labelled type argument + Błąd składni w argumencie typu z etykietą + + + + Unexpected infix operator in type expression + Nieoczekiwany operator infiksu w wyrażeniu typu + + + + The syntax '(typ,...,typ) ident' is not used in F# code. Consider using 'ident<typ,...,typ>' instead + Składnia „(typ,...,typ) ident” nie jest używana w kodzie języka F#. Rozważ użycie składni „ident<typ,...,typ>” + + + + Invalid literal in type + Nieprawidłowy literał w typie + + + + Unexpected infix operator in unit-of-measure expression. Legal operators are '*', '/' and '^'. + Nieoczekiwany operator infiksu w wyrażeniu jednostki miary. Dozwolone operatory: „*”, „/” i „^”. + + + + Unexpected integer literal in unit-of-measure expression + Nieoczekiwany literał całkowity w wyrażeniu jednostki miary + + + + Syntax error: unexpected type parameter specification + Błąd składni: nieoczekiwana specyfikacja parametru typu + + + + Mismatched quotation operator name, beginning with '{0}' + Niezgodna nazwa operatora cytatu, począwszy od „{0}” + + + + Active pattern case identifiers must begin with an uppercase letter + Aktywne identyfikatory przypadku wzorca muszą się rozpoczynać od wielkiej litery + + + + The '|' character is not permitted in active pattern case identifiers + Znak „|” nie jest dozwolony w identyfikatorach przypadku aktywnego wzorca + + + + Denominator must not be 0 in unit-of-measure exponent + Mianownik w wykładniku jednostki miary nie może być równy 0 + + + + No '=' symbol should follow a 'namespace' declaration + Symbol „=” nie może następować po deklaracji „namespace” + + + + The syntax 'module ... = struct .. end' is not used in F# code. Consider using 'module ... = begin .. end' + Składnia „module ... = struct .. end” nie jest używana w kodzie języka F#. Rozważ użycie składni „module ... = begin .. end” + + + + The syntax 'module ... : sig .. end' is not used in F# code. Consider using 'module ... = begin .. end' + Składnia „module ... : sig .. end” nie jest używana w kodzie języka F#. Rozważ użycie składni „module ... = begin .. end” + + + + A static field was used where an instance field is expected + Użyto pola statycznego w miejscu, w którym jest oczekiwane pole wystąpienia + + + + Method '{0}' is not accessible from this code location + Nie można uzyskać dostępu do tej metody „{0}” z tej lokalizacji kodu + + + + Implicit product of measures following / + Niejawny iloczyn miar poprzedzony znakiem / + + + + Unexpected SynMeasure.Anon + Nieoczekiwany element SynMeasure.Anon + + + + Non-zero constants cannot have generic units. For generic zero, write 0.0<_>. + Stałe inne niż zero nie mogą mieć jednostek ogólnych. W przypadku ogólnej wartości zero użyj formy 0.0<_>. + + + + In sequence expressions, results are generated using 'yield' + W wyrażeniach sekwencji wyniki są generowane przy użyciu elementu „yield” + + + + Unexpected big rational constant + Nieoczekiwana duża stała wymierna + + + + Units-of-measure supported only on float, float32, decimal and signed integer types + Jednostki miary są obsługiwane tylko w przypadku typów float, float32, decimal i signed integer + + + + Unexpected Const_uint16array + Nieoczekiwana wartość Const_uint16array + + + + Unexpected Const_bytearray + Nieoczekiwana wartość Const_bytearray + + + + A parameter with attributes must also be given a name, e.g. '[<Attribute>] Name : Type' + Parametr z atrybutami musi mieć też nazwę, na przykład „[<Atrybut>] nazwa : typ” + + + + Return values cannot have names + Zwracane wartości nie mogą mieć nazw + + + + MemberKind.PropertyGetSet only expected in parse trees + Element MemberKind.PropertyGetSet jest oczekiwany tylko w drzewach analizy + + + + Namespaces cannot contain values. Consider using a module to hold your value declarations. + Przestrzenie nazw nie mogą zawierać wartości. Rozważ użycie modułu zawierającego deklaracje wartości. + + + + Namespaces cannot contain extension members except in the same file and namespace declaration group where the type is defined. Consider using a module to hold declarations of extension members. + Przestrzenie nazw nie mogą zawierać elementów członkowskich rozszerzeń, z wyjątkiem grupy deklaracji pliku i przestrzeni nazw, w których zdefiniowano dany typ. Rozważ użycie modułu zawierającego deklaracje elementów członkowskich rozszerzeń. + + + + Multiple visibility attributes have been specified for this identifier + Określono wiele atrybutów widoczności dla tego identyfikatora + + + + Multiple visibility attributes have been specified for this identifier. 'let' bindings in classes are always private, as are any 'let' bindings inside expressions. + Określono wiele atrybutów widoczności dla tego identyfikatora. Powiązania „let” w klasach są zawsze prywatne, tak jak powiązania „let” w wyrażeniach. + + + + The name '({0})' 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 '{1}' instead. + Nazwa „({0})” nie powinna być używana jako nazwa elementu członkowskiego. Aby zdefiniować semantykę porównania dla typu, zaimplementuj interfejs „System.IComparable”. W przypadku definiowania statycznego elementu członkowskiego do użycia z innych języków infrastruktury CLI użyj nazwy „{1}”. + + + + The name '({0})' 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 '{1}' instead. + Nazwa „({0})” nie powinna być używana jako nazwa elementu członkowskiego. Aby zdefiniować semantykę równości dla typu, przesłoń element członkowski „Object.Equals”. W przypadku definiowania statycznego elementu członkowskiego do użycia z innych języków infrastruktury CLI użyj nazwy „{1}”. + + + + The name '({0})' should not be used as a member name. If defining a static member for use from other CLI languages then use the name '{1}' instead. + Nazwa „({0})” nie powinna być używana jako nazwa elementu członkowskiego. W przypadku definiowania statycznego elementu członkowskiego do użycia z innych języków CLI użyj nazwy „{1}”. + + + + The name '({0})' should not be used as a member name because it is given a standard definition in the F# library over fixed types + Nazwa „({0})” nie powinna być używana jako nazwa elementu członkowskiego, ponieważ ma standardową definicję w bibliotece języka F# dla typów stałych + + + + The '{0}' operator should not normally be redefined. To define overloaded comparison semantics for a particular type, implement the 'System.IComparable' interface in the definition of that type. + Zwykle nie należy ponownie definiować operatora „{0}”. Aby zdefiniować semantykę porównania z przeciążeniem dla określonego typu, zaimplementuj interfejs „System.IComparable” w definicji tego typu. + + + + The '{0}' operator should not normally be redefined. To define equality semantics for a type, override the 'Object.Equals' member in the definition of that type. + Zwykle nie należy ponownie definiować operatora „{0}”. Aby zdefiniować semantykę równości dla typu, przesłoń element członkowski „Object.Equals” w definicji tego typu. + + + + The '{0}' operator should not normally be redefined. Consider using a different operator name + Zwykle nie należy ponownie definiować operatora „{0}”. Rozważ użycie innej nazwy operatora + + + + The '{0}' operator cannot be redefined. Consider using a different operator name + Nie można ponownie zdefiniować operatora „{0}”. Rozważ użycie innej nazwy operatora + + + + Expected module or namespace parent {0} + Oczekiwano elementu nadrzędnego modułu lub przestrzeni nazw {0} + + + + The struct, record or union type '{0}' implements the interface 'System.IComparable' explicitly. You must apply the 'CustomComparison' attribute to the type. + Typ struktury, rekordu lub unii „{0}” zawiera jawną implementację interfejsu „System.IComparable”. Musisz zastosować atrybut „CustomComparison” do typu. + + + + The struct, record or union type '{0}' implements the interface 'System.IComparable<_>' explicitly. You must apply the 'CustomComparison' attribute to the type, and should also provide a consistent implementation of the non-generic interface System.IComparable. + Typ struktury, rekordu lub unii „{0}” zawiera jawną implementację interfejsu „System.IComparable<_>”. Musisz zastosować atrybut „CustomComparison” do typu i określić spójną implementację nieogólnego interfejsu System.IComparable. + + + + The struct, record or union type '{0}' implements the interface 'System.IStructuralComparable' explicitly. Apply the 'CustomComparison' attribute to the type. + Typ struktury, rekordu lub unii „{0}” zawiera jawną implementację interfejsu „System.IStructuralComparable”. Zastosuj atrybut „CustomComparison” do typu. + + + + This record contains fields from inconsistent types + Ten rekord zawiera pola niespójnych typów + + + + DLLImport stubs cannot be inlined + Klasy zastępcze DLLImport nie mogą być śródwierszowe + + + + Structs may only bind a 'this' parameter at member declarations + Struktury mogą tylko tworzyć powiązanie parametru „this” w deklaracjach elementów członkowskich + + + + Unexpected expression at recursive inference point + Nieoczekiwane wyrażenie w punkcie wnioskowania cyklicznego + + + + This code is less generic than required by its annotations because the explicit type variable '{0}' could not be generalized. It was constrained to be '{1}'. + Ten kod jest mniej ogólny niż jest to wymagane przez jego adnotacje, ponieważ nie można uogólnić jawnej zmiennej typu „{0}”. Została ona ograniczona do postaci „{1}”. + + + + One or more of the explicit class or function type variables for this binding could not be generalized, because they were constrained to other types + Nie można uogólnić co najmniej jednej zmiennej jawnej klasy lub typu funkcji dla tego powiązania, ponieważ są one ograniczone do innych typów + + + + A generic type parameter has been used in a way that constrains it to always be '{0}' + Parametr typu ogólnego został użyty w sposób ograniczający go tak, aby zawsze miał postać „{0}” + + + + This type parameter has been used in a way that constrains it to always be '{0}' + Ten parametr typu został użyty w sposób ograniczający go tak, aby zawsze miał postać „{0}” + + + + The type parameters inferred for this value are not stable under the erasure of type abbreviations. This is due to the use of type abbreviations which drop or reorder type parameters, e.g. \n\ttype taggedInt<'a> = int or\n\ttype swap<'a,'b> = 'b * 'a.\nConsider declaring the type parameters for this value explicitly, e.g.\n\tlet f<'a,'b> ((x,y) : swap<'b,'a>) : swap<'a,'b> = (y,x). + Parametry typu wywnioskowane dla tej wartości nie są stabilne po wymazaniu skrótów typu. Jest to spowodowane przez użycie skrótów typu, które porzucają parametry typu lub zmieniają ich kolejność, na przykład \n\ttype taggedInt<'a> = int lub\n\ttype swap<'a,'b> = 'b * 'a.\nRozważ jawne zadeklarowanie parametrów typu dla tej wartości, na przykład\n\tlet f<'a,'b> ((x,y) : swap<'b,'a>) : swap<'a,'b> = (y,x). + + + + Explicit type parameters may only be used on module or member bindings + Jawne parametry typu mogą być używane tylko w powiązaniach modułów lub elementów członkowskich + + + + You must explicitly declare either all or no type parameters when overriding a generic abstract method + W przypadku przesłaniania ogólnej metody abstrakcyjnej musisz jawnie zadeklarować wszystkie parametry typu lub brak parametrów typu + + + + The field labels and expected type of this record expression or pattern do not uniquely determine a corresponding record type + Etykiety pól i oczekiwany typ tego wyrażenia rekordu lub wzorca nie określają jednoznacznie odpowiedniego typu rekordu + + + + The field '{0}' appears twice in this record expression or pattern + Pole „{0}” występuje dwa razy w tym wyrażeniu rekordu lub wzorcu + + + + Unknown union case + Nieznany przypadek unii + + + + This code is not sufficiently generic. The type variable {0} could not be generalized because it would escape its scope. + Ten kod nie jest wystarczająco ogólny. Nie można uogólnić zmiennej typu {0}, ponieważ wykroczy ona poza swój zakres. + + + + A property cannot have explicit type parameters. Consider using a method instead. + Właściwość nie może zawierać jawnych parametrów typu. Zamiast tego rozważ użycie metody. + + + + A constructor cannot have explicit type parameters. Consider using a static construction method instead. + Konstruktor nie może zawierać jawnych parametrów typu. Zamiast tego rozważ użycie statycznej metody konstrukcji. + + + + This instance member needs a parameter to represent the object being invoked. Make the member static or use the notation 'member x.Member(args) = ...'. + Ten element członkowski wystąpienia wymaga parametru, aby mógł reprezentować wywoływany obiekt. Ustaw element członkowski jako element statyczny lub użyj notacji „member x.Member(args) = ...”. + + + + Unexpected source-level property specification in syntax tree + Nieoczekiwana specyfikacja właściwości poziomu źródła w drzewie składni + + + + A static initializer requires an argument + Inicjator statyczny wymaga argumentu + + + + An object constructor requires an argument + Konstruktor obiektów wymaga argumentu + + + + This static member should not have a 'this' parameter. Consider using the notation 'member Member(args) = ...'. + Ten statyczny element członkowski nie powinien mieć parametru „this”. Rozważ użycie notacji „member ElementCzłonkowski(argumenty) = ...”. + + + + An explicit static initializer should use the syntax 'static new(args) = expr' + Jawny inicjator statyczny powinien używać składni „static new(args) = expr” + + + + An explicit object constructor should use the syntax 'new(args) = expr' + Jawny konstruktor obiektów powinien używać składni „new(args) = expr” + + + + Unexpected source-level property specification + Nieoczekiwana specyfikacja właściwości poziomu źródła + + + + This form of object expression is not used in F#. Use 'member this.MemberName ... = ...' to define member implementations in object expressions. + Ta postać wyrażenia obiektu nie jest używana w języku F#. Aby zdefiniować implementacje elementów członkowskich w wyrażeniach obiektów, użyj konstrukcji „member this.MemberName ... = ...”. + + + + Invalid declaration + Nieprawidłowa deklaracja + + + + Attributes are not allowed within patterns + Atrybuty nie są dozwolone we wzorcach + + + + The generic function '{0}' must be given explicit type argument(s) + Ogólna funkcja „{0}” musi mieć jawne argumenty typów + + + + The method or function '{0}' should not be given explicit type argument(s) because it does not declare its type parameters explicitly + Dla metody lub funkcji „{0}” nie powinny być podawane jawne argumenty typu, ponieważ nie deklaruje ona jawnie swoich parametrów typu + + + + This value, type or method expects {0} type parameter(s) but was given {1} + Ta wartość, ten typ lub ta metoda oczekuje następującej liczby parametrów typów: {0}. Podana liczba parametrów: {1} + + + + The default, zero-initializing constructor of a struct type may only be used if all the fields of the struct type admit default initialization + Domyślny konstruktor typu struktury inicjujący wartość zero może być używany tylko wtedy, gdy wszystkie pola typu struktury akceptują domyślną inicjalizację + + + + Couldn't find Dispose on IDisposable, or it was overloaded + Nie można odnaleźć elementu Dispose w interfejsie IDisposable lub jest on przeciążony + + + + This value is not a literal and cannot be used in a pattern + Ta wartość nie jest literałem i nie można jej użyć we wzorcu + + + + This field is readonly + To pole jest tylko do odczytu + + + + Named arguments must appear after all other arguments + Nazwane argumenty muszą występować po wszystkich pozostałych argumentach + + + + This function value is being used to construct a delegate type whose signature includes a byref argument. You must use an explicit lambda expression taking {0} arguments. + Ta wartość funkcji jest używana do utworzenia typu delegata, którego sygnatura zawiera argument byref. Musisz użyć jawnego wyrażenia lambda pobierającego następującą liczbę argumentów: {0}. + + + + The type '{0}' is not a type whose values can be enumerated with this syntax, i.e. is not compatible with either seq<_>, IEnumerable<_> or IEnumerable and does not have a GetEnumerator method + Typ „{0}” nie jest typem, którego wartości mogą być wyliczane przy użyciu tej składni. Oznacza to, że nie jest zgodny z elementem seq<_>, IEnumerable<_> lub IEnumerable i nie ma metody GetEnumerator + + + + This recursive binding uses an invalid mixture of recursive forms + Powiązanie cykliczne używa nieprawidłowej kombinacji form cyklicznych + + + + This is not a valid object construction expression. Explicit object constructors must either call an alternate constructor or initialize all fields of the object and specify a call to a super class constructor. + To nie jest prawidłowe wyrażenie konstrukcji obiektu. Jawne konstruktory obiektów muszą wywoływać konstruktora alternatywnego lub inicjować wszystkie pola obiektu i określić wywołanie konstruktora superklasy. + + + + Invalid constraint + Nieprawidłowe ograniczenie + + + + Invalid constraint: the type used for the constraint is sealed, which means the constraint could only be satisfied by at most one solution + Nieprawidłowe ograniczenie: typ użyty dla ograniczenia jest zapieczętowany, co oznacza, że ograniczenie może spełnić maksymalnie jedno rozwiązanie + + + + An 'enum' constraint must be of the form 'enum<type>' + Ograniczenie „enum” musi mieć postać „enum<typ>” + + + + 'new' constraints must take one argument of type 'unit' and return the constructed type + Ograniczenia „new” muszą pobierać jeden argument typu „unit” i zwracać utworzony typ + + + + This property has an invalid type. Properties taking multiple indexer arguments should have types of the form 'ty1 * ty2 -> ty3'. Properties returning functions should have types of the form '(ty1 -> ty2)'. + Ta właściwość ma nieprawidłowy typ. Właściwości z wieloma argumentami indeksatora powinny mieć typy w postaci „ty1 * ty2 -> ty3”. Właściwości zwracające funkcje powinny mieć typy w postaci „(ty1 -> ty2)”. + + + + Expected unit-of-measure parameter, not type parameter. Explicit unit-of-measure parameters must be marked with the [<Measure>] attribute. + Oczekiwano parametru jednostki miary, a nie parametru typu. Jawne parametry jednostki miary muszą być oznaczone za pomocą atrybutu [<Measure>]. + + + + Expected type parameter, not unit-of-measure parameter + Oczekiwano parametru typu, a nie parametru jednostki miary + + + + Expected type, not unit-of-measure + Oczekiwano typu, a nie jednostki miary + + + + Expected unit-of-measure, not type + Oczekiwano jednostki miary, a nie typu + + + + Units-of-measure cannot be used as prefix arguments to a type. Rewrite as postfix arguments in angle brackets. + Jednostki miary nie mogą być używane jako argumenty prefiksu typu. Zapisz je ponownie jako argumenty postfiksowe w nawiasach ostrych. + + + + Unit-of-measure cannot be used in type constructor application + Jednostka miary nie może być używana w aplikacji konstruktora typów + + + + This control construct may only be used if the computation expression builder defines a '{0}' method + Ta konstrukcja kontrolna może być używana tylko wtedy, gdy konstruktor wyrażeń obliczeń definiuje metodę „{0}” + + + + This type has no nested types + Ten typ nie ma typów zagnieżdżonych + + + + Unexpected {0} in type expression + Nieoczekiwany symbol {0} w wyrażeniu typu + + + + Type parameter cannot be used as type constructor + Nie można użyć parametru typu jako konstruktora typów + + + + Illegal syntax in type expression + Niedozwolona składnia w wyrażeniu typu + + + + Anonymous unit-of-measure cannot be nested inside another unit-of-measure expression + Anonimowa jednostka miary nie może być zagnieżdżona w innym wyrażeniu jednostki miary + + + + Anonymous type variables are not permitted in this declaration + Zmienne typów anonimowych nie są dozwolone w tej deklaracji + + + + Unexpected / in type + Nieoczekiwany znak / w typie + + + + Unexpected type arguments + Nieoczekiwane argumenty typu + + + + Optional arguments are only permitted on type members + Argumenty opcjonalne są dozwolone tylko w przypadku elementów członkowskich typów + + + + Name '{0}' not bound in pattern context + Nazwa „{0}” nie jest powiązana w kontekście wzorca + + + + Non-primitive numeric literal constants cannot be used in pattern matches because they can be mapped to multiple different types through the use of a NumericLiteral module. Consider using replacing with a variable, and use 'when <variable> = <constant>' at the end of the match clause. + Niepierwotne stałe literałów liczbowych nie mogą być używane w dopasowaniach wzorców, ponieważ mogą być mapowane na wiele różnych typów przez użycie modułu NumericLiteral. Zamiast tego rozważ użycie zmiennej i użyj konstrukcji „when <zmienna> = <stała>” na końcu klauzuli dopasowania. + + + + Type arguments cannot be specified here + Nie można tutaj określać argumentów typu + + + + Only active patterns returning exactly one result may accept arguments + Tylko aktywne wzorce zwracające dokładnie jeden wynik mogą akceptować argumenty + + + + Invalid argument to parameterized pattern label + Nieprawidłowy argument etykiety wzorca z parametrami + + + + Internal error. Invalid index into active pattern array + Błąd wewnętrzny. Nieprawidłowy indeks w tablicy aktywnego wzorca + + + + This union case does not take arguments + Ten przypadek unii nie akceptuje argumentów + + + + This union case takes one argument + Ten przypadek unii akceptuje jeden argument + + + + This union case expects {0} arguments in tupled form + Ten przypadek unii oczekuje {0} argumentów w postaci spójnej kolekcji + + + + Field '{0}' is not static + Pole „{0}” nie jest statyczne + + + + This field is not a literal and cannot be used in a pattern + To pole nie jest literałem i nie można go użyć we wzorcu + + + + This is not a variable, constant, active recognizer or literal + To nie jest zmienna, stała, aktywny aparat rozpoznawania ani literał + + + + This is not a valid pattern + To nie jest prawidłowy wzorzec + + + + Character range matches have been removed in F#. Consider using a 'when' pattern guard instead. + Dopasowania zakresu znaków zostały usunięte w języku F#. Zamiast tego rozważ użycie ograniczenia wzorca „when”. + + + + Illegal pattern + Niedozwolony wzorzec + + + + Syntax error - unexpected '?' symbol + Błąd składni — nieoczekiwany symbol „?” + + + + Expected {0} expressions, got {1} + Oczekiwano wyrażeń w liczbie {0}; otrzymano: {1} + + + + TcExprUndelayed: delayed + TcExprUndelayed: opóźnione + + + + This expression form may only be used in sequence and computation expressions + Ta postać wyrażenia może być używana tylko w wyrażeniach sekwencji i obliczeń + + + + Invalid object expression. Objects without overrides or interfaces should use the expression form 'new Type(args)' without braces. + Nieprawidłowe wyrażenie obiektu. Obiekty bez przesłonięć lub interfejsy powinny używać wyrażenia w postaci „new Typ(argumenty)” bez nawiasów. + + + + Invalid object, sequence or record expression + Nieprawidłowe wyrażenie obiektu, sekwencji lub rekordu + + + + Invalid record, sequence or computation expression. Sequence expressions should be of the form 'seq {{ ... }}' + Nieprawidłowe wyrażenie rekordu, sekwencji lub obliczenia. Wyrażenia sekwencji powinny mieć postać „seq {{ ... }}” + + + + This list or array expression includes an element of the form 'if ... then ... else'. Parenthesize this expression to indicate it is an individual element of the list or array, to disambiguate this from a list generated using a sequence expression + To wyrażenie listy lub tablicy zawiera element „if ... then ... else”. Ujmij to wyrażenie w nawiasy, aby określić, że jest to pojedynczy element listy lub tablicy, w celu odróżnienia go od listy wygenerowanej przy użyciu wyrażenia sekwencji + + + + Unable to parse format string '{0}' + Nie można przeanalizować ciągu formatu „{0}” + + + + This list expression exceeds the maximum size for list literals. Use an array for larger literals and call Array.ToList. + To wyrażenie listy przekracza maksymalny rozmiar literałów list. W przypadku większych literałów użyj tablicy i wywołaj element Array.ToList. + + + + The expression form 'expr then expr' may only be used as part of an explicit object constructor + Wyrażenie w postaci „wyrażenie then wyrażenie” może być używane tylko jako część jawnego konstruktora obiektów + + + + Named arguments cannot be given to member trait calls + Nazwane argumenty nie mogą być określane dla wywołań cech elementów członkowskich + + + + This is not a valid name for an enumeration case + To nie jest prawidłowa nazwa przypadku wyliczenia + + + + This field is not mutable + Nie można modyfikować tego pola + + + + This construct may only be used within list, array and sequence expressions, e.g. expressions of the form 'seq {{ ... }}', '[ ... ]' or '[| ... |]'. These use the syntax 'for ... in ... do ... yield...' to generate elements + Ta konstrukcja może być używana tylko w wyrażeniach list, tablic i sekwencji, na przykład w wyrażeniach „seq {{ ... }}”, „[ ... ]” lub „[| ... |]”. Generują one elementy za pomocą składni „for ... in ... do ... yield...” + + + + This construct may only be used within computation expressions. To return a value from an ordinary function simply write the expression without 'return'. + Ta konstrukcja może być używana tylko w wyrażeniach obliczeń. Aby zwrócić wartość ze zwykłej funkcji, wpisz wyrażenie bez wyrazu „return”. + + + + This construct may only be used within sequence or computation expressions + Ta konstrukcja może być używana tylko w wyrażeniach sekwencji lub obliczeń + + + + This construct may only be used within computation expressions + Ta konstrukcja może być używana tylko w wyrażeniach obliczeń + + + + Invalid indexer expression + Nieprawidłowe wyrażenie indeksatora + + + + The operator 'expr.[idx]' has been used on an object of indeterminate type based on information prior to this program point. Consider adding further type constraints + Operator „wyrażenie.[indeks]” został użyty w obiekcie nieokreślonego typu na podstawie informacji przed tym punktem programu. Rozważ dodanie kolejnych ograniczeń typów + + + + Cannot inherit from a variable type + Nie można dziedziczyć po typie zmiennej + + + + Calls to object constructors on type parameters cannot be given arguments + Wywołania konstruktorów obiektów w parametrach typu nie mogą mieć argumentów + + + + The 'CompiledName' attribute cannot be used with this language element + Nie można użyć atrybutu „CompiledName” z tym elementem języka + + + + '{0}' may only be used with named types + Element „{0}” może być używany tylko z nazwanymi typami + + + + 'inherit' cannot be used on interface types. Consider implementing the interface by using 'interface ... with ... end' instead. + Deklaracja „inherit” nie może być używana w typach interfejsu. Zamiast tego rozważ zaimplementowanie interfejsu za pomocą konstrukcji „interface ... with ... end”. + + + + 'new' cannot be used on interface types. Consider using an object expression '{{ new ... with ... }}' instead. + Element „new” nie może być używany w typach interfejsów. Zamiast tego rozważ użycie wyrażenia obiektu „{{ new ... with ... }}”. + + + + Instances of this type cannot be created since it has been marked abstract or not all methods have been given implementations. Consider using an object expression '{{ new ... with ... }}' instead. + Nie można utworzyć wystąpień tego typu, ponieważ został on oznaczony jako abstrakcyjny lub nie wszystkie metody mają implementacje. Zamiast tego rozważ użycie wyrażenia obiektu „{{ new ... with ... }}”. + + + + It is recommended that objects supporting the IDisposable interface are created using the syntax 'new Type(args)', rather than 'Type(args)' or 'Type' as a function value representing the constructor, to indicate that resources may be owned by the generated value + Zaleca się, aby obiekty obsługujące interfejs IDisposable były tworzone przy użyciu składni „new Type(args)”, a nie „Type(args)” lub „Type” jako wartości funkcji reprezentującej konstruktor, w celu określenia, że zasoby mogą należeć do wygenerowanej wartości + + + + '{0}' may only be used to construct object types + Składnia „{0}” może być używana tylko w celu tworzenia typów obiektów + + + + Constructors for the type '{0}' must directly or indirectly call its implicit object constructor. Use a call to the implicit object constructor instead of a record expression. + Konstruktory typu „{0}” muszą bezpośrednio lub pośrednio wywoływać swojego niejawnego konstruktora obiektów. Użyj wywołania niejawnego konstruktora obiektów zamiast wyrażenia rekordu. + + + + The field '{0}' has been given a value, but is not present in the type '{1}' + Pole „{0}” ma określoną wartość, ale nie występuje w typie „{1}” + + + + No assignment given for field '{0}' of type '{1}' + Brak przypisania dla pola „{0}” typu „{1}” + + + + Extraneous fields have been given values + Określono wartości dodatkowych pól + + + + Only overrides of abstract and virtual members may be specified in object expressions + W wyrażeniach obiektów można określić tylko przesłonięcia abstrakcyjnych i wirtualnych elementów członkowskich + + + + The member '{0}' does not correspond to any abstract or virtual method available to override or implement. + Element członkowski „{0}” nie odpowiada żadnej metodzie abstrakcyjnej ani wirtualnej dostępnej do przesłonięcia lub zaimplementowania. + + + + The type {0} contains the member '{1}' but it is not a virtual or abstract method that is available to override or implement. + Typ {0} zawiera element członkowski „{1}”, ale nie jest metodą wirtualną lub abstrakcyjną, która jest dostępna do przesłonięcia lub zaimplementowania. + + + + The member '{0}' does not accept the correct number of arguments. {1} argument(s) are expected, but {2} were given. The required signature is '{3}'.{4} + Element członkowski „{0}” nie akceptuje poprawnej liczby argumentów. Oczekiwana liczba argumentów: {1}, podano argumentów: {2}. Wymagany podpis to „{3}”.{4} + + + + The member '{0}' does not accept the correct number of arguments. One overload accepts {1} arguments, but {2} were given. The required signature is '{3}'.{4} + Element członkowski „{0}” nie akceptuje poprawnej liczby argumentów. Jedno przeciążenie akceptuje następującą liczbę argumentów: {1}, podano argumentów: {2}. Wymagany podpis to „{3}”.{4} + + + + A simple method name is required here + W tym miejscu jest wymagana prosta nazwa metody + + + + The types System.ValueType, System.Enum, System.Delegate, System.MulticastDelegate and System.Array cannot be used as super types in an object expression or class + Typy System.ValueType, System.Enum, System.Delegate, System.MulticastDelegate i System.Array nie mogą być używane jako supertypy w wyrażeniu obiektu lub klasie. + + + + 'new' must be used with a named type + Element „new” musi być używany z nazwanym typem + + + + Cannot create an extension of a sealed type + Nie można utworzyć rozszerzenia zapieczętowanego typu + + + + No arguments may be given when constructing a record value + Podczas tworzenia wartości rekordu nie można określić żadnych argumentów + + + + Interface implementations cannot be given on construction expressions + Implementacje interfejsów nie mogą być określane w wyrażeniach konstrukcji + + + + Object construction expressions may only be used to implement constructors in class types + Wyrażenia konstrukcji obiektów mogą być używane tylko do implementowania konstruktorów w typach klas + + + + Only simple bindings of the form 'id = expr' can be used in construction expressions + W wyrażeniach konstrukcji mogą być używane tylko proste powiązania w postaci „identyfikator = wyrażenie” + + + + Objects must be initialized by an object construction expression that calls an inherited object constructor and assigns a value to each field + Obiekty muszą być inicjowane przez wyrażenie konstrukcji obiektu, które wywołuje dziedziczonego konstruktora obiektów i przypisuje wartość do każdego pola + + + + Expected an interface type + Oczekiwano typu interfejsu + + + + Constructor expressions for interfaces do not take arguments + Wyrażenia konstruktora interfejsów nie akceptują argumentów + + + + This object constructor requires arguments + Ten konstruktor obiektów wymaga argumentów + + + + 'new' may only be used with object constructors + Element „new” może być używany tylko z konstruktorami obiektów + + + + At least one override did not correctly implement its corresponding abstract member + Co najmniej jedno przesłonięcie nie zawiera poprawnej implementacji odpowiadającego mu abstrakcyjnego elementu członkowskiego + + + + This numeric literal requires that a module '{0}' defining functions FromZero, FromOne, FromInt32, FromInt64 and FromString be in scope + Ten literał liczbowy wymaga, aby moduł „{0}” definiujący funkcje FromZero, FromOne, FromInt32, FromInt64 i FromString mieścił się w zakresie + + + + Invalid record construction + Nieprawidłowa konstrukcja rekordu + + + + The expression form {{ expr with ... }} may only be used with record types. To build object types use {{ new Type(...) with ... }} + Wyrażenie w postaci {{ wyrażenie with ... }} może być używane tylko z typami rekordów. Aby utworzyć typy obiektów, użyj wyrażenia {{ new Typ(...) with ... }} + + + + The inherited type is not an object model type + Dziedziczony typ nie jest typem modelu obiektów + + + + Object construction expressions (i.e. record expressions with inheritance specifications) may only be used to implement constructors in object model types. Use 'new ObjectType(args)' to construct instances of object model types outside of constructors + Wyrażenia konstrukcji obiektów (czyli wyrażenia rekordów ze specyfikacjami dziedziczenia) mogą być używane w celu implementowania konstruktorów w typach modeli obiektów. Aby utworzyć wystąpienia typów modeli obiektów poza konstruktorami, użyj wyrażenia „new ObjectType(args)” + + + + '{{ }}' is not a valid expression. Records must include at least one field. Empty sequences are specified by using Seq.empty or an empty list '[]'. + „{{ }}” nie jest prawidłowym wyrażeniem. Rekordy muszą zawierać co najmniej jedno pole. Puste sekwencje są określane przy użyciu elementu Seq.empty lub pustej listy „[]”. + + + + This type is not a record type. Values of class and struct types must be created using calls to object constructors. + Ten typ nie jest typem rekordu. Wartości typów klas i struktur muszą zostać utworzone przy użyciu wywołań konstruktorów obiektów. + + + + This type is not a record type + Ten typ nie jest typem rekordu + + + + This construct is ambiguous as part of a computation expression. Nested expressions may be written using 'let _ = (...)' and nested computations using 'let! res = builder {{ ... }}'. + Ta konstrukcja jest niejednoznaczna jako część wyrażenia obliczenia. Zagnieżdżone wyrażenia mogą zawierać ciąg „let _ = (...)”, a zagnieżdżone obliczenia mogą zawierać ciąg „let! wynik = konstruktor {{ ... }}”. + + + + This construct is ambiguous as part of a sequence expression. Nested expressions may be written using 'let _ = (...)' and nested sequences using 'yield! seq {{... }}'. + Ta konstrukcja jest niejednoznaczna jako część wyrażenia sekwencji. Zagnieżdżone wyrażenia mogą zawierać ciąg „let _ = (...)”, a zagnieżdżone sekwencje mogą zawierać ciąg „yield! seq {{... }}”. + + + + 'do!' cannot be used within sequence expressions + Wyrażenie „do!” nie może być używane w wyrażeniach sekwencji + + + + The use of 'let! x = coll' in sequence expressions is not permitted. Use 'for x in coll' instead. + Używanie ciągu „let! x = coll” w wyrażeniach sekwencji jest niedozwolone. Zamiast tego użyj ciągu „for x in coll”. + + + + 'try'/'with' cannot be used within sequence expressions + Wyrażenia „try”/„with” nie mogą być używane w wyrażeniach sekwencji + + + + In sequence expressions, multiple results are generated using 'yield!' + W wyrażeniach sekwencji wiele wyników jest generowanych przy użyciu elementu „yield!” + + + + Invalid assignment + Nieprawidłowe przypisanie + + + + Invalid use of a type name + Nieprawidłowe użycie nazwy typu + + + + This type has no accessible object constructors + Ten typ nie ma dostępnych konstruktorów obiektów + + + + Invalid use of an interface type + Nieprawidłowe użycie typu interfejsu + + + + Invalid use of a delegate constructor. Use the syntax 'new Type(args)' or just 'Type(args)'. + Nieprawidłowe użycie konstruktora delegatów. Użyj składni „new Typ(argumenty)” lub „Typ(argumenty)”. + + + + Property '{0}' is not static + Właściwość „{0}” nie jest statyczna + + + + Property '{0}' is not readable + Nie można odczytać właściwości „{0}” + + + + This lookup cannot be used here + Nie można tutaj użyć tego odnośnika + + + + Property '{0}' is static + Właściwość „{0}” jest statyczna + + + + Property '{0}' cannot be set + Nie można ustawić właściwości „{0}” + + + + Constructors must be applied to arguments and cannot be used as first-class values. If necessary use an anonymous function '(fun arg1 ... argN -> new Type(arg1,...,argN))'. + Konstruktory muszą być stosowane do argumentów i nie mogą być używane jako wartości pierwszoklasowe. Jeśli to konieczne, użyj funkcji anonimowej „(fun arg1 ... argN -> new Typ(arg1,...,argN))”. + + + + The syntax 'expr.id' may only be used with record labels, properties and fields + Składnia „wyrażenie.identyfikator” może być używana tylko z etykietami rekordów, właściwościami i polami + + + + Event '{0}' is static + Zdarzenie „{0}” jest statyczne + + + + Event '{0}' is not static + Zdarzenie „{0}” nie jest statyczne + + + + The named argument '{0}' did not match any argument or mutable property + Nazwany argument „{0}” nie jest zgodny z żadnym argumentem ani z żadną właściwością modyfikowalną + + + + One or more of the overloads of this method has curried arguments. Consider redesigning these members to take arguments in tupled form. + Co najmniej jedno przeciążenie tej metody ma argumenty curried. Rozważ zmodyfikowanie tych elementów członkowskich tak, aby akceptowały argumenty w postaci spójnej kolekcji. + + + + The unnamed arguments do not form a prefix of the arguments of the method called + Nienazwane argumenty nie tworzą prefiksu argumentów wywołanej metody + + + + Static optimization conditionals are only for use within the F# library + Statyczne wyrażenia warunkowe optymalizacji mogą być używane tylko w bibliotece języka F# + + + + The corresponding formal argument is not optional + Odpowiedni argument formalny nie jest opcjonalny + + + + Invalid optional assignment to a property or field + Nieprawidłowe opcjonalne przypisanie do właściwości lub pola + + + + A delegate constructor must be passed a single function value + Do konstruktora delegatów musi zostać przekazana jedna wartość funkcji. + + + + A binding cannot be marked both 'use' and 'rec' + Powiązanie nie może być oznaczone zarówno jako „use”, jak i „rec” + + + + The 'VolatileField' attribute may only be used on 'let' bindings in classes + Atrybut „VolatileField” może być używany tylko w powiązaniach „let” w klasach + + + + Attributes are not permitted on 'let' bindings in expressions + Atrybuty nie są dozwolone w powiązaniach „let” w wyrażeniach + + + + The 'DefaultValue' attribute may only be used on 'val' declarations + Atrybut „DefaultValue” może być używany tylko z deklaracjami „val” + + + + The 'ConditionalAttribute' attribute may only be used on members + Atrybut „ConditionalAttribute” może być używany tylko z elementami członkowskimi + + + + This is not a valid name for an active pattern + To nie jest prawidłowa nazwa aktywnego wzorca + + + + The 'EntryPointAttribute' attribute may only be used on function definitions in modules + Atrybut „EntryPointAttribute” może być używany tylko w definicjach funkcji w modułach + + + + Mutable values cannot be marked 'inline' + Wartości modyfikowalne nie mogą być oznaczone jako „inline” + + + + Mutable values cannot have generic parameters + Wartości modyfikowalne nie mogą mieć parametrów ogólnych + + + + Mutable function values should be written 'let mutable f = (fun args -> ...)' + Modyfikowalne wartości funkcji powinny mieć postać „let mutable f = (fun args -> ...)” + + + + Only functions may be marked 'inline' + Tylko funkcje mogą być oznaczone jako „inline” + + + + A literal value cannot be given the [<ThreadStatic>] or [<ContextStatic>] attributes + Wartość literału nie może mieć atrybutu [<ThreadStatic>] lub [<ContextStatic>] + + + + A literal value cannot be marked 'mutable' + Wartość literału nie może być oznaczona jako „mutable” + + + + A literal value cannot be marked 'inline' + Wartość literału nie może być oznaczona jako „inline” + + + + Literal values cannot have generic parameters + Wartości literałów nie mogą mieć parametrów ogólnych + + + + This is not a valid constant expression + To nie jest prawidłowe wyrażenie stałej + + + + This type is not accessible from this code location + Ten typ nie jest dostępny z tej lokalizacji kodu + + + + Unexpected condition in imported assembly: failed to decode AttributeUsage attribute + Nieoczekiwany warunek w zaimportowanym zestawie: nie można zdekodować atrybutu AttributeUsage + + + + Unrecognized attribute target. Valid attribute targets are 'assembly', 'module', 'type', 'method', 'property', 'return', 'param', 'field', 'event', 'constructor'. + Nierozpoznany element docelowy atrybutu. Prawidłowe elementy docelowe atrybutu: „assembly”, „module”, „type”, „method”, „property”, „return”, „param”, „field”, „event”, „constructor”. + + + + This attribute is not valid for use on this language element. Assembly attributes should be attached to a 'do ()' declaration, if necessary within an F# module. + Ten atrybut jest nieprawidłowy do użycia w tym elemencie języka. Atrybuty zestawu powinny być dołączone do deklaracji „do ()” (w module języka F#, jeśli to konieczne). + + + + This attribute is not valid for use on this language element + Ten atrybut jest nieprawidłowy do użycia w tym elemencie języka + + + + Optional arguments cannot be used in custom attributes + Argumenty opcjonalne nie mogą być używane w atrybutach niestandardowych + + + + This property cannot be set + Nie można ustawić tej właściwości + + + + This property or field was not found on this custom attribute type + Nie odnaleziono tej właściwości pola w tym niestandardowym typie atrybutu + + + + A custom attribute must be a reference type + Atrybut niestandardowy musi mieć typ odwołania + + + + The number of args for a custom attribute does not match the expected number of args for the attribute constructor + Liczba argumentów atrybutu niestandardowego nie jest zgodna z oczekiwaną liczbą argumentów konstruktora atrybutów + + + + A custom attribute must invoke an object constructor + Atrybut niestandardowy musi wywoływać konstruktora obiektów + + + + Attribute expressions must be calls to object constructors + Wyrażenia atrybutów muszą być wywołaniami konstruktorów obiektów + + + + This attribute cannot be used in this version of F# + Ten atrybut nie może być używany w tej wersji języka F# + + + + Invalid inline specification + Nieprawidłowa wbudowana specyfikacja + + + + 'use' bindings must be of the form 'use <var> = <expr>' + Powiązania „use” muszą mieć postać „use <zmienna> = <wyrażenie>” + + + + Abstract members are not permitted in an augmentation - they must be defined as part of the type itself + Abstrakcyjne elementy członkowskie nie są dozwolone w rozszerzeniu — muszą być zdefiniowane w ramach samego typu + + + + Method overrides and interface implementations are not permitted here + Przesłonięcia metod i implementacje interfejsów nie są tutaj dozwolone + + + + No abstract or interface member was found that corresponds to this override + Nie odnaleziono abstrakcyjnych elementów członkowskich lub elementów członkowskich interfejsu odpowiadających temu przesłonięciu + + + + This override takes a different number of arguments to the corresponding abstract member. The following abstract members were found:{0} + To przesłonięcie pobiera inną liczbę argumentów niż odpowiedni abstrakcyjny element członkowski. Znaleziono następujące abstrakcyjne elementy członkowskie: {0} + + + + This method already has a default implementation + Ta metoda ma już domyślną implementację + + + + The method implemented by this default is ambiguous + Metoda zaimplementowana w tym elemencie jest niejednoznaczna + + + + No abstract property was found that corresponds to this override + Nie odnaleziono żadnej właściwości abstrakcyjnej odpowiadającej temu przesłonięciu + + + + This property overrides or implements an abstract property but the abstract property doesn't have a corresponding {0} + Ta właściwość przesłania właściwość abstrakcyjną lub zawiera jej implementację, ale właściwość abstrakcyjna nie ma odpowiedniego elementu {0} + + + + Invalid signature for set member + Nieprawidłowa sygnatura elementu członkowskiego ustawiania + + + + This new member hides the abstract member '{0}'. Rename the member or use 'override' instead. + Ten nowy element członkowski ukrywa abstrakcyjny element członkowski „{0}”. Zmień nazwę elementu członkowskiego lub użyj elementu „override”. + + + + This new member hides the abstract member '{0}' once tuples, functions, units of measure and/or provided types are erased. Rename the member or use 'override' instead. + Ten nowy element członkowski ukrywa abstrakcyjny element członkowski „{0}” po wymazaniu krotek, funkcji, jednostek miary i/lub udostępnionych typów. Zmień nazwę elementu członkowskiego lub użyj elementu „override”. + + + + Interfaces cannot contain definitions of static initializers + Interfejsy nie mogą zawierać definicji inicjatorów statycznych + + + + Interfaces cannot contain definitions of object constructors + Interfejsy nie mogą zawierać definicji konstruktorów obiektów + + + + Interfaces cannot contain definitions of member overrides + Interfejsy nie mogą zawierać definicji przesłonięć elementów członkowskich + + + + Interfaces cannot contain definitions of concrete members. You may need to define a constructor on your type to indicate that the type is a class. + Interfejsy nie mogą zawierać definicji konkretnych elementów członkowskich. Może być konieczne zdefiniowanie konstruktora w typie, aby określić, że typ to klasa. + + + + Constructors cannot be specified in exception augmentations + Nie można określać konstruktorów w rozszerzeniach wyjątków + + + + Structs cannot have an object constructor with no arguments. This is a restriction imposed on all CLI languages as structs automatically support a default constructor. + Struktury nie mogą mieć konstruktora obiektów bez argumentów. To ograniczenie dotyczy wszystkich języków CLI, ponieważ struktury automatycznie obsługują konstruktor domyślny. + + + + Constructors cannot be defined for this type + Nie można definiować konstruktorów dla tego typu + + + + Recursive bindings that include member specifications can only occur as a direct augmentation of a type + Powiązania cykliczne zawierające specyfikacje elementów członkowskich mogą występować tylko jako bezpośrednie powiększenie typu + + + + Only simple variable patterns can be bound in 'let rec' constructs + Tylko proste wzorce zmiennych mogą być powiązane w konstrukcjach „let rec” + + + + Only record fields and simple, non-recursive 'let' bindings may be marked mutable + Tylko pola rekordów i proste, niecykliczne powiązania „let” mogą być oznaczone jako modyfikowalne + + + + This member is not sufficiently generic + Ten element członkowski nie jest wystarczająco ogólny + + + + A declaration may only be the [<Literal>] attribute if a constant value is also given, e.g. 'val x : int = 1' + Deklaracja może mieć postać atrybutu [<Literal>] tylko wtedy, gdy jest też podana wartość stałej, na przykład „val x : int = 1” + + + + A declaration may only be given a value in a signature if the declaration has the [<Literal>] attribute + Deklaracja może mieć określoną wartość w sygnaturze tylko wtedy, gdy deklaracja zawiera atrybut [<Literal>] + + + + Thread-static and context-static variables must be static and given the [<DefaultValue>] attribute to indicate that the value is initialized to the default value on each new thread + Zmienne ze statycznymi wątkami i kontekstami muszą być statyczne i mieć określony atrybut [<DefaultValue>] w celu określenia, że wartość została zainicjowana w każdym nowym wątku przy użyciu wartości domyślnej + + + + Volatile fields must be marked 'mutable' and cannot be thread-static + Pola nietrwałe muszą być oznaczone jako „mutable” i nie mogą być statyczne dla wątku + + + + Uninitialized 'val' fields must be mutable and marked with the '[<DefaultValue>]' attribute. Consider using a 'let' binding instead of a 'val' field. + Niezainicjowane pola „val” muszą być modyfikowalne i oznaczone przy użyciu atrybutu „[<DefaultValue>]”. Rozważ użycie powiązania „let” zamiast pola „val”. + + + + Static 'val' fields in types must be mutable, private and marked with the '[<DefaultValue>]' attribute. They are initialized to the 'null' or 'zero' value for their type. Consider also using a 'static let mutable' binding in a class type. + Statyczne pola „val” w typach muszą być modyfikowalne, prywatne i oznaczone przy użyciu atrybutu „[<DefaultValue>]”. Są one inicjowane dla swoich typów przy użyciu wartości „null” lub „zero”. Rozważ też użycie powiązania „static let mutable” w typie klasy. + + + + This field requires a name + To pole wymaga nazwy + + + + Invalid namespace, module, type or union case name + Nieprawidłowa nazwa przestrzeni nazw, modułu, typu lub przypadku unii + + + + Explicit type declarations for constructors must be of the form 'ty1 * ... * tyN -> resTy'. Parentheses may be required around 'resTy' + Jawne deklaracje typów w przypadku konstruktorów muszą mieć postać „typ1 * ... * typN -> typWynikowy”. Może być konieczne ujęcie elementu „typWynikowy” w nawiasy + + + + Return types of union cases must be identical to the type being defined, up to abbreviations + Zwracane typy przypadków unii muszą być identyczne z definiowanym typem, łącznie ze skrótami + + + + This is not a valid value for an enumeration literal + To nie jest prawidłowa wartość literału wyliczenia + + + + The type '{0}' is not an interface type + Typ „{0}” nie jest typem interfejsu + + + + Duplicate specification of an interface + Zduplikowana specyfikacja interfejsu + + + + A field/val declaration is not permitted here + Deklaracja pola/wartości nie jest tutaj dozwolona + + + + A inheritance declaration is not permitted here + Deklaracja dziedziczenia nie jest tutaj dozwolona + + + + This declaration opens the module '{0}', which is marked as 'RequireQualifiedAccess'. Adjust your code to use qualified references to the elements of the module instead, e.g. 'List.map' instead of 'map'. This change will ensure that your code is robust as new constructs are added to libraries. + Ta deklaracja powoduje otwarcie modułu „{0}”, który jest oznaczony jako „RequireQualifiedAccess”. Dostosuj kod, aby używał odwołań kwalifikowanych do elementów modułu, na przykład „List.map” zamiast „map”. Ta zmiana pozwoli zagwarantować niezawodność kodu, gdy do bibliotek zostaną dodane nowe konstrukcje. + + + + This declaration opens the namespace or module '{0}' through a partially qualified path. Adjust this code to use the full path of the namespace. This change will make your code more robust as new constructs are added to the F# and CLI libraries. + Ta deklaracja powoduje otwarcie przestrzeni nazw lub modułu „{0}” za pośrednictwem częściowo kwalifikowanej ścieżki. Dostosuj ten kod, aby używał pełnej ścieżki przestrzeni nazw. Dzięki tej zmianie kod będzie bardziej niezawodny, gdy do bibliotek języka F# i infrastruktury CLI zostaną dodane nowe konstrukcje. + + + + Local class bindings cannot be marked inline. Consider lifting the definition out of the class or else do not mark it as inline. + Lokalne powiązania klas nie mogą być oznaczone jako śródwierszowe. Rozważ przeniesienie definicji poza klasę lub nie oznaczaj jej jako śródwierszowej. + + + + Type abbreviations cannot have members + Skróty typów nie mogą mieć elementów członkowskich + + + + As of F# 4.1, the accessibility of type abbreviations is checked at compile-time. Consider changing the accessibility of the type abbreviation. Ignoring this warning might lead to runtime errors. + Począwszy od wersji F# 4.1, dostępność skrótów typów jest sprawdzana w czasie kompilacji. Rozważ sprawdzenie dostępności skrótu typu. Zignorowanie tego ostrzeżenia może prowadzić do błędów w czasie wykonywania. + + + + Enumerations cannot have members + Wyliczenia nie mogą zawierać elementów członkowskich + + + + Measure declarations may have only static members + Deklaracje miary mogą mieć tylko statyczne elementy członkowskie + + + + Structs cannot contain 'do' bindings because the default constructor for structs would not execute these bindings + Struktury nie mogą zawierać powiązań „do”, ponieważ domyślny konstruktor struktur nie wykona tych powiązań + + + + Structs cannot contain value definitions because the default constructor for structs will not execute these bindings. Consider adding additional arguments to the primary constructor for the type. + Struktury nie mogą zawierać definicji wartości, ponieważ domyślny konstruktor konstrukcji nie wykona tych powiązań. Rozważ dodanie kolejnych argumentów do podstawowego konstruktora typu. + + + + Static value definitions may only be used in types with a primary constructor. Consider adding arguments to the type definition, e.g. 'type X(args) = ...'. + Definicje wartości statycznych mogą być używane tylko w przypadku typów z konstruktorem podstawowym. Rozważ dodanie argumentów do definicji typu, na przykład „type X(argumenty) = ...”. + + + + Measure declarations may have only static members: constructors are not available + Deklaracje miary mogą mieć tylko statyczne elementy członkowskie: konstruktory są niedostępne + + + + A member and a local class binding both have the name '{0}' + Element członkowski i lokalne powiązanie klasy mają tę samą nazwę („{0}”) + + + + Type abbreviations cannot have interface declarations + Skróty typów nie mogą mieć deklaracji interfejsów + + + + Enumerations cannot have interface declarations + Wyliczenia nie mogą zawierać deklaracji interfejsu + + + + This type is not an interface type + Ten typ nie jest typem interfejsu + + + + All implemented interfaces should be declared on the initial declaration of the type + Wszystkie zaimplementowane interfejsy powinny zostać zadeklarowane w początkowej deklaracji typu + + + + A default implementation of this interface has already been added because the explicit implementation of the interface was not specified at the definition of the type + Dodano już domyślną implementację tego interfejsu, ponieważ nie określono jawnej implementacji interfejsu w definicji typu + + + + This member is not permitted in an interface implementation + Ten element członkowski nie jest dozwolony w implementacji interfejsu + + + + This declaration element is not permitted in an augmentation + Ten element deklaracji nie jest dozwolony w rozszerzeniu + + + + Types cannot contain nested type definitions + Typy nie mogą zawierać definicji typów zagnieżdżonych + + + + type, exception or module + typ, wyjątek lub moduł + + + + type or module + typ lub moduł + + + + The struct, record or union type '{0}' implements the interface 'System.IStructuralEquatable' explicitly. Apply the 'CustomEquality' attribute to the type. + Typ struktury, rekordu lub unii „{0}” zawiera jawną implementację interfejsu „System.IStructuralEquatable”. Zastosuj atrybut „CustomEquality” do typu. + + + + The struct, record or union type '{0}' implements the interface 'System.IEquatable<_>' explicitly. Apply the 'CustomEquality' attribute to the type and provide a consistent implementation of the non-generic override 'System.Object.Equals(obj)'. + Typ struktury, rekordu lub unii „{0}” zawiera jawną implementację interfejsu „System.IEquatable<_>”. Zastosuj atrybut „CustomEquality” do typu i określ spójną implementację nieogólnego przesłonięcia „System.Object.Equals(obj)”. + + + + Explicit type specifications cannot be used for exception constructors + Jawne specyfikacje typów nie mogą być używane w przypadku konstruktorów wyjątków + + + + Exception abbreviations should not have argument lists + Skróty wyjątków nie powinny zawierać list argumentów + + + + Abbreviations for Common IL exceptions cannot take arguments + Skróty wyjątków Common IL nie mogą pobierać argumentów + + + + Exception abbreviations must refer to existing exceptions or F# types deriving from System.Exception + Skróty wyjątków muszą odwoływać się do istniejących wyjątków lub typów języka F# pochodzących od elementu System.Exception + + + + Abbreviations for Common IL exception types must have a matching object constructor + Skróty typów wyjątków Common IL muszą mieć zgodnego konstruktora obiektów + + + + Not an exception + To nie jest wyjątek + + + + Invalid module name + Nieprawidłowa nazwa modułu + + + + Invalid type extension + Nieprawidłowe rozszerzenie typu + + + + The attributes of this type specify multiple kinds for the type + Atrybuty tego typu określają wiele rodzajów typu + + + + The kind of the type specified by its attributes does not match the kind implied by its definition + Rodzaj typu określony przez jego atrybuty nie jest zgodny z rodzajem implikowanym przez jego definicję + + + + Measure definitions cannot have type parameters + Definicje miary nie mogą mieć parametrów typu + + + + This type requires a definition + Ten typ wymaga definicji + + + + This type abbreviation has one or more declared type parameters that do not appear in the type being abbreviated. Type abbreviations must use all declared type parameters in the type being abbreviated. Consider removing one or more type parameters, or use a concrete type definition that wraps an underlying type, such as 'type C<'a> = C of ...'. + Ten skrót typu zawiera co najmniej jeden zadeklarowany parametr typu, który nie występuje w skracanym typie. Skróty typu muszą używać wszystkich zadeklarowanych parametrów typu w skracanym typie. Rozważ usunięcie co najmniej jednego parametru typu lub użyj konkretnej definicji typu, która opakowuje odpowiedni typ, na przykład „type C<'a> = C of ...”. + + + + Structs, interfaces, enums and delegates cannot inherit from other types + Struktury, interfejsy, wyliczenia i delegaty nie mogą dziedziczyć po innych typach. + + + + Types cannot inherit from multiple concrete types + Typy nie mogą dziedziczyć po wielu konkretnych typach + + + + Records, union, abbreviations and struct types cannot have the 'AllowNullLiteral' attribute + Typy rekordów, unii, skrótów i struktur nie mogą zawierać atrybutu „AllowNullLiteral” + + + + Types with the 'AllowNullLiteral' attribute may only inherit from or implement types which also allow the use of the null literal + Typy z atrybutem „AllowNullLiteral” mogą dziedziczyć tylko po typach, które również zezwalają na używanie literału o wartości null, lub zawierać ich implementację + + + + Generic types cannot be given the 'StructLayout' attribute + Typy ogólne nie mogą mieć atrybutu „StructLayout” + + + + Only structs and classes without primary constructors may be given the 'StructLayout' attribute + Tylko struktury i klasy bez konstruktorów podstawowych mogą mieć atrybut „StructLayout” + + + + The representation of this type is hidden by the signature. It must be given an attribute such as [<Sealed>], [<Class>] or [<Interface>] to indicate the characteristics of the type. + Reprezentacja tego typu została ukryta przez sygnaturę. W celu wskazania charakterystyki typu musi ona zawierać atrybut, taki jak [<Sealed>], [<Class>] lub [<Interface>]. + + + + Only classes may be given the 'AbstractClass' attribute + Tylko klasy mogą mieć atrybut „AbstractClass” + + + + Only types representing units-of-measure may be given the 'Measure' attribute + Tylko typy reprezentujące jednostkę miary mogą mieć atrybut „Measure” + + + + Accessibility modifiers are not permitted on overrides or interface implementations + Modyfikatory dostępności nie są dozwolone w przypadku przesłonięć lub implementacji interfejsów + + + + Discriminated union types are always sealed + Typy unii rozłącznych są zawsze zapieczętowane + + + + Record types are always sealed + Typy rekordów są zawsze zapieczętowane + + + + Assembly code types are always sealed + Typy kodu zestawu są zawsze zapieczętowane + + + + Struct types are always sealed + Typy struktur są zawsze zapieczętowane + + + + Delegate types are always sealed + Typy delegatów są zawsze zapieczętowane. + + + + Enum types are always sealed + Typy wyliczeniowe są zawsze zapieczętowane + + + + Interface types and delegate types cannot contain fields + Typy interfejsów i delegatów nie mogą zawierać pól + + + + Abbreviated types cannot be given the 'Sealed' attribute + Skrócone typy nie mogą mieć atrybutu „Sealed” + + + + Cannot inherit a sealed type + Nie można odziedziczyć zapieczętowanego typu + + + + Cannot inherit from interface type. Use interface ... with instead. + Nie można dziedziczyć po typie interfejsu. Zamiast tego użyj konstrukcji interface ... with. + + + + Struct types cannot contain abstract members + Typy struktur nie mogą zawierać abstrakcyjnych elementów członkowskich + + + + Interface types cannot be sealed + Typy interfejsów nie mogą być zapieczętowane + + + + Delegate specifications must be of the form 'typ -> typ' + Specyfikacje delegatów muszą mieć postać „typ -> typ”. + + + + Delegate specifications must not be curried types. Use 'typ * ... * typ -> typ' for multi-argument delegates, and 'typ -> (typ -> typ)' for delegates returning function values. + Specyfikacje delegatów nie mogą być typu curried. Użyj konstrukcji „typ * ... * typ -> typ” w przypadku delegatów z wieloma argumentami i konstrukcji „typ -> (typ -> typ)” w przypadku delegatów zwracających wartości funkcji.. + + + + Literal enumerations must have type int, uint, int16, uint16, int64, uint64, byte, sbyte or char + Wyliczenia literałów muszą być typu int, uint, int16, uint16, int64, uint64, byte, sbyte lub char + + + + This type definition involves an immediate cyclic reference through an abbreviation + Ta definicja typu zawiera bezpośrednie odwołanie cykliczne za pośrednictwem skrótu + + + + This type definition involves an immediate cyclic reference through a struct field or inheritance relation + Ta definicja typu zawiera bezpośrednie odwołanie cykliczne za pośrednictwem pola struktury lub relacji dziedziczenia + + + + The syntax 'type X with ...' is reserved for augmentations. Types whose representations are hidden but which have members are now declared in signatures using 'type X = ...'. You may also need to add the '[<Sealed>] attribute to the type definition in the signature + Składnia „type X with ...” jest zarezerwowana dla powiększeń. Typy, które mają ukryte reprezentacje, ale zawierają elementy członkowskie, są obecnie deklarowane w sygnaturach przy użyciu składni „type X = ...”. Może być też konieczne dodanie atrybutu [<Sealed>] do definicji typu w sygnaturze + + + + Members that extend interface, delegate or enum types must be placed in a module separate to the definition of the type. This module must either have the AutoOpen attribute or be opened explicitly by client code to bring the extension members into scope. + Elementy członkowskie stanowiące rozszerzenie typu interfejsu, delegata lub wyliczenia muszą znajdować się w innym module niż ten, w którym znajduje się definicja typu. Ten moduł musi mieć atrybut AutoOpen lub musi zostać jawnie otwarty przez kod klienta w celu uwzględnienia elementów członkowskich rozszerzeń w zakresie. + + + + One or more of the declared type parameters for this type extension have a missing or wrong type constraint not matching the original type constraints on '{0}' + Co najmniej jeden zadeklarowany parametr typu dla tego rozszerzenia typu nie ma ograniczenia typu lub ograniczenie typu jest nieprawidłowe i niezgodne z oryginalnymi ograniczeniami typu w elemencie „{0}” + + + + Type definitions may only have one 'inherit' specification and it must be the first declaration + Definicje typów mogą zawierać tylko jedną specyfikację „inherit”, która musi być pierwszą deklaracją + + + + 'let' and 'do' bindings must come before member and interface definitions in type definitions + Powiązania „let” i „do” muszą występować przed definicjami elementów członkowskich i interfejsów w definicjach typów + + + + This 'inherit' declaration specifies the inherited type but no arguments. Consider supplying arguments, e.g. 'inherit BaseType(args)'. + Ta deklaracja „inherit” określa dziedziczony typ, ale nie określa argumentów. Rozważ określenie argumentów, na przykład „inherit TypPodstawowy(argumenty)”. + + + + This 'inherit' declaration has arguments, but is not in a type with a primary constructor. Consider adding arguments to your type definition, e.g. 'type X(args) = ...'. + Ta deklaracja „inherit” zawiera argumenty, ale nie należy do typu z konstruktorem podstawowym. Rozważ dodanie argumentów do definicji typu, na przykład „type X(argumenty) = ...”. + + + + This definition may only be used in a type with a primary constructor. Consider adding arguments to your type definition, e.g. 'type X(args) = ...'. + Ta definicja może być używana tylko w typie z konstruktorem podstawowym. Rozważ dodanie argumentów do definicji typu, na przykład „type X(args) = ...”. + + + + Type abbreviations cannot have augmentations + Skróty typów nie mogą mieć rozszerzeń + + + + The path '{0}' is a namespace. A module abbreviation may not abbreviate a namespace. + Ścieżka „{0}” jest przestrzenią nazw. Skrót modułu nie może zawierać skrótu przestrzeni nazw. + + + + The type '{0}' is used in an invalid way. A value prior to '{1}' has an inferred type involving '{2}', which is an invalid forward reference. + Typ „{0}” jest używany w nieprawidłowy sposób. Wartość przed elementem „{1}” ma wywnioskowany typ dotyczący elementu „{2}”, który jest nieprawidłowym odwołaniem w przód. + + + + The member '{0}' is used in an invalid way. A use of '{1}' has been inferred prior to the definition of '{2}', which is an invalid forward reference. + Element członkowski „{0}” jest używany w nieprawidłowy sposób. Użycie elementu „{1}” zostało wywnioskowane przed definicją elementu „{2}”, co jest nieprawidłowym odwołaniem w przód. + + + + The attribute 'AutoOpen(\"{0}\")' in the assembly '{1}' did not refer to a valid module or namespace in that assembly and has been ignored + Atrybut „AutoOpen(\"{0}\")” w zestawie „{1}” nie odwołuje się do prawidłowego modułu lub prawidłowej przestrzeni nazw w tym zestawie i został zignorowany + + + + Undefined value '{0}' + Niezdefiniowana wartość „{0}” + + + + Label {0} not found + Nie znaleziono etykiety {0} + + + + Incorrect number of type arguments to local call + Niepoprawna liczba argumentów typu dla wywołania lokalnego + + + + Dynamic invocation of {0} is not supported + Dynamiczne wywołanie {0} nie jest obsługiwane + + + + Taking the address of a literal field is invalid + Pobieranie adresu pola literału jest nieprawidłowe + + + + This operation involves taking the address of a value '{0}' represented using a local variable or other special representation. This is invalid. + Ta operacja obejmuje pobieranie adresu wartości „{0}” reprezentowanej przy użyciu zmiennej lokalnej lub innej specjalnej reprezentacji. Jest to nieprawidłowe. + + + + Custom marshallers cannot be specified in F# code. Consider using a C# helper function. + Nie można określać niestandardowych organizatorów w kodzie języka F#. Rozważ użycie pomocniczej funkcji języka C#. + + + + The MarshalAs attribute could not be decoded + Nie można zdekodować atrybutu MarshalAs + + + + The signature for this external function contains type parameters. Constrain the argument and return types to indicate the types of the corresponding C function. + Sygnatura dla tej funkcji zewnętrznej zawiera parametry typu. Ogranicz typy argumentów i zwracane typy, tak aby wskazywały typy odpowiedniej funkcji języka C. + + + + The DllImport attribute could not be decoded + Nie można zdekodować atrybutu DllImport + + + + Literal fields cannot be set + Nie można ustawić pól literału + + + + GenSetStorage: {0} was represented as a static method but was not an appropriate lambda expression + GenSetStorage: Element {0} był reprezentowany jako metoda statyczna, ale nie był odpowiednim wyrażeniem lambda + + + + Mutable variables cannot escape their method + Zmienne modyfikowalne nie mogą opuścić swojej metody + + + + Compiler error: unexpected unrealized value + Błąd kompilatora: nieoczekiwana niezrealizowana wartość + + + + Main module of program is empty: nothing will happen when it is run + Główny moduł programu jest pusty: nic się nie wydarzy po jego uruchomieniu + + + + This type cannot be used for a literal field + Ten typ nie może być używany dla pola literału + + + + Unexpected GetSet annotation on a property + Nieoczekiwana adnotacja GetSet dla właściwości + + + + The FieldOffset attribute could not be decoded + Nie można zdekodować atrybutu FieldOffset + + + + The StructLayout attribute could not be decoded + Nie można zdekodować atrybutu StructLayout + + + + The DefaultAugmentation attribute could not be decoded + Nie można zdekodować atrybutu DefaultAugmentation + + + + Reflected definitions cannot contain uses of the prefix splice operator '%' + Odbite definicje nie mogą używać operatora łączenia prefiksu „%” + + + + Problem with codepage '{0}': {1} + Problem ze stroną kodową „{0}”: {1} + + + + Copyright (c) Microsoft Corporation. All Rights Reserved. + Copyright (c) Microsoft Corporation. Wszelkie prawa zastrzeżone. + + + + Freely distributed under the MIT Open Source License. https://github.com/Microsoft/visualfsharp/blob/master/License.txt + Udostępniane bezpłatnie w ramach licencji open source MIT. https://github.com/Microsoft/visualfsharp/blob/master/License.txt + + + + Name of the output file (Short form: -o) + Nazwa pliku wyjściowego (krótka wersja: -o) + + + + Build a console executable + Kompiluj plik wykonywalny konsoli + + + + Build a Windows executable + Kompiluj plik wykonywalny systemu Windows + + + + Build a library (Short form: -a) + Kompiluj bibliotekę (krótka wersja: -a) + + + + Build a module that can be added to another assembly + Kompiluj moduł, który można będzie dodać do innego zestawu + + + + Delay-sign the assembly using only the public portion of the strong name key + Podpisz zestaw z opóźnieniem, używając tylko publicznej części klucza o silnej nazwie + + + + Public-sign the assembly using only the public portion of the strong name key, and mark the assembly as signed + Podpisz zestaw na użytek publiczny za pomocą tylko publicznej części klucza o silnej nazwie i oznacz zestaw jako podpisany + + + + Write the xmldoc of the assembly to the given file + Zapisz dokument XML zestawu w podanym pliku + + + + Specify a strong name key file + Określ plik klucza o silnej nazwie + + + + Specify a strong name key container + Określ kontener kluczy o silnej nazwie + + + + Limit which platforms this code can run on: x86, Itanium, x64, anycpu32bitpreferred, or anycpu. The default is anycpu. + Ogranicz platformy, na jakich można uruchomić ten kod: x86, Itanium, x64, anycpu32bitpreferred lub anycpu. Domyślna platforma to anycpu. + + + + Only include optimization information essential for implementing inlined constructs. Inhibits cross-module inlining but improves binary compatibility. + Dołącz tylko informacje o optymalizacji, które są istotne dla implementacji konstrukcji śródwierszowych. Uniemożliwia używanie konstrukcji śródwierszowych między modułami, ale zwiększa zgodność binarną. + + + + Don't add a resource to the generated assembly containing F#-specific metadata + Nie dodawaj zasobu do wygenerowanego zestawu zawierającego metadane specyficzne dla języka F# + + + + Print the inferred interface of the assembly to a file + Zapisz w pliku wnioskowany interfejs zestawu + + + + Reference an assembly (Short form: -r) + Utwórz odwołanie do zestawu (krótka wersja: -r) + + + + Specify a Win32 resource file (.res) + Określ plik zasobów Win32 (.res) + + + + Specify a Win32 manifest file + Określ plik manifestu biblioteki Win32 + + + + Do not include the default Win32 manifest + Nie dołączaj domyślnego manifestu Win32 + + + + Embed all source files in the portable PDB file + Osadź wszystkie pliki źródłowe w przenośnym pliku PDB + + + + Embed specific source files in the portable PDB file + Osadź określone pliki źródłowe w przenośnym pliku PDB + + + + Source link information file to embed in the portable PDB file + Plik informacji o linku kodu źródłowego do osadzenia w przenośnym pliku PDB + + + + --embed switch only supported when emitting a Portable PDB (--debug:portable or --debug:embedded) + Przełącznik --embed jest obsługiwany tylko dla emitowania przenośnego pliku PDB (--debug:portable lub --debug:embedded) + + + + --sourcelink switch only supported when emitting a Portable PDB (--debug:portable or --debug:embedded) + Przełącznik --sourcelink jest obsługiwany tylko dla emitowania przenośnego pliku PDB (--debug:portable lub --debug:embedded) + + + + Source file is too large to embed in a portable PDB + Plik źródłowy jest za duży, aby osadzić go w przenośnym pliku PDB + + + + Embed the specified managed resource + Osadź określony zasób zarządzany + + + + Link the specified resource to this assembly where the resinfo format is <file>[,<string name>[,public|private]] + Połącz określony zasób z tym zestawem, gdzie format informacji o zasobie to <plik>[,<nazwa_ciągu>[,public|private]] + + + + Emit debug information (Short form: -g) + Emituj informacje debugowania (krótka wersja: -g) + + + + Specify debugging type: full, portable, embedded, pdbonly. ('{0}' is the default if no debuggging type specified and enables attaching a debugger to a running program, 'portable' is a cross-platform format, 'embedded' is a cross-platform format embedded into the output file). + Określ typ debugowania: full, portable, pdbonly. Wartość „{0}” jest wartością domyślną, jeśli nie określono typu debugowania, i umożliwia dołączenie debugera do działającego programu. Wartość „portable” określa format międzyplatformowy. Wartość „embedded” określa format międzyplatformowy osadzony w pliku wyjściowym. + + + + Enable optimizations (Short form: -O) + Włącz optymalizacje (krótka wersja: -O) + + + + Enable or disable tailcalls + Włącz lub wyłącz wywołania tail + + + + Produce a deterministic assembly (including module version GUID and timestamp) + Utwórz zestaw deterministyczny (łącznie z sygnaturą czasową i identyfikatorem GUID wersji modułu) + + + + Enable or disable cross-module optimizations + Włącz lub wyłącz optymalizacje między modułami + + + + Report all warnings as errors + Raportuj wszystkie ostrzeżenia jako błędy + + + + Report specific warnings as errors + Raportuj określone ostrzeżenia jako błędy + + + + Set a warning level (0-5) + Ustaw poziom ostrzeżeń (0-5) + + + + Disable specific warning messages + Wyłącz określone komunikaty ostrzegawcze + + + + Enable specific warnings that may be off by default + Włącz określone ostrzeżenia, które domyślnie mogą być wyłączone + + + + Generate overflow checks + Generuj operacje sprawdzenia przepełnienia + + + + Define conditional compilation symbols (Short form: -d) + Definiuj symbole kompilacji warunkowej (krótka wersja: -d) + + + + Ignore ML compatibility warnings + Ignoruj ostrzeżenia dotyczące zgodności z językiem ML + + + + + Display this usage message (Short form: -?) + Wyświetl ten komunikat dotyczący składni (krótka wersja: -?) + + + + Read response file for more options + Przeczytaj plik odpowiedzi, aby uzyskać informacje na temat kolejnych opcji + + + + Specify the codepage used to read source files + Określ stronę kodową używaną do odczytu plików źródłowych + + + + Output messages in UTF-8 encoding + Wypisz komunikaty w kodowaniu UTF-8 + + + + Output messages with fully qualified paths + Komunikaty z w pełni kwalifikowanymi ścieżkami + + + + Specify a directory for the include path which is used to resolve source files and assemblies (Short form: -I) + Określ katalog dla ścieżki dołączenia, która służy do rozpoznawania plików źródłowych i zestawów (krótka wersja: -I) + + + + Base address for the library to be built + Adres podstawowy biblioteki, która ma zostać skompilowana + + + + Do not reference the default CLI assemblies by default + Domyślnie nie odwołuj się do domyślnych zestawów infrastruktury CLI + + + + Statically link the F# library and all referenced DLLs that depend on it into the assembly being generated + Połącz statycznie bibliotekę języka F# i wszystkie przywoływane biblioteki DLL w generowanym zestawie + + + + Statically link the given assembly and all referenced DLLs that depend on this assembly. Use an assembly name e.g. mylib, not a DLL name. + Statycznie połącz podany zestaw i wszystkie przywoływane biblioteki DLL, które zależą od tego zestawu. Użyj nazwy zestawu (np. mojabiblioteka), a nie nazwy biblioteki DLL. + + + + Use a resident background compilation service to improve compiler startup times. + Użyj rezydentnej usługi kompilacji działającej w tle w celu poprawienia czasów uruchamiania kompilatora. + + + + Name the output debug file + Nazwa wyjściowego pliku debugowania + + + + Resolve assembly references using directory-based rules rather than MSBuild resolution + Rozpoznaj odwołania do zestawu przy użyciu reguł opartych na katalogu, a nie rozpoznawania narzędzia MSBuild + + + + Unrecognized target '{0}', expected 'exe', 'winexe', 'library' or 'module' + Nierozpoznany cel „{0}”. Oczekiwano celu „exe”, „winexe”, „library” lub „module” + + + + Unrecognized debug type '{0}', expected 'pdbonly' or 'full' + Nierozpoznany typ debugowania „{0}”. Oczekiwano typu „pdbonly” lub „full” + + + + Invalid warning level '{0}' + Nieprawidłowy poziom ostrzeżenia „{0}” + + + + Short form of '{0}' + Krótka wersja dla „{0}” + + + + The command-line option '--cliroot' has been deprecated. Use an explicit reference to a specific copy of mscorlib.dll instead. + Opcja wiersza polecenia „--cliroot” jest przestarzała. Użyj odwołania jawnego do konkretnej kopii pliku mscorlib.dll. + + + + Use to override where the compiler looks for mscorlib.dll and framework components + Użyj do przesłonięcia miejsca, w którym kompilator szuka pliku mscorlib.dll i składników struktury + + + + - OUTPUT FILES - + - PLIKI WYJŚCIOWE - + + + + - INPUT FILES - + - PLIKI WEJŚCIOWE - + + + + - RESOURCES - + - ZASOBY - + + + + - CODE GENERATION - + - GENEROWANIE KODU - + + + + - ADVANCED - + - ZAAWANSOWANE - + + + + - MISCELLANEOUS - + - RÓŻNE - + + + + - LANGUAGE - + - JĘZYK - + + + + - ERRORS AND WARNINGS - + - BŁĘDY I OSTRZEŻENIA - + + + + Unknown --test argument: '{0}' + Nieznany argument --test: „{0}” + + + + Unrecognized platform '{0}', valid values are 'x86', 'x64', 'Itanium', 'anycpu32bitpreferred', and 'anycpu' + Nierozpoznana platforma „{0}”. Prawidłowe wartości to „x86”, „x64”, „Itanium”, „anycpu32bitpreferred” i „anycpu” + + + + The command-line option '{0}' is for test purposes only + Opcja wiersza polecenia „{0}” jest tylko do celów testowych + + + + The command-line option '{0}' has been deprecated + Opcja wiersza polecenia „{0}” jest przestarzała + + + + The command-line option '{0}' has been deprecated. Use '{1}' instead. + Opcja wiersza polecenia „{0}” jest przestarzała. Użyj opcji „{1}”. + + + + The command-line option '{0}' has been deprecated. HTML document generation is now part of the F# Power Pack, via the tool FsHtmlDoc.exe. + Opcja wiersza polecenia „{0}” jest przestarzała. Generowanie dokumentów HTML jest teraz częścią pakietu Power Pack języka F# i jest wykonywane za pośrednictwem narzędzia FsHtmlDoc.exe. + + + + Output warning and error messages in color + Ostrzeżenia i komunikaty o błędzie wyróżnione kolorem + + + + Enable high-entropy ASLR + Włącz losowe generowanie układu przestrzeni adresowej o wysokiej entropii + + + + Specify subsystem version of this assembly + Określi wersję podsystemu tego zestawu + + + + Specify target framework profile of this assembly. Valid values are mscorlib, netcore or netstandard. Default - mscorlib + Określ profil platformy docelowej tego zestawu. Prawidłowe wartości to mscorlib, netcore lub netstandard. Wartość domyślna to mscorlib + + + + Emit debug information in quotations + Emituj informacje debugowania w cudzysłowach + + + + Specify the preferred output language culture name (e.g. es-ES, ja-JP) + Określ nazwę kultury preferowanego języka wyjściowego (np. es-ES, ja-JP) + + + + Don't copy FSharp.Core.dll along the produced binaries + Nie kopiuj pliku FSharp.Core.dll wraz z utworzonymi plikami binarnymi + + + + Invalid version '{0}' for '--subsystemversion'. The version must be 4.00 or greater. + Nieprawidłowa wersja „{0}” dla opcji „--subsystemversion”. Wymagana jest wersja 4.00 lub nowsza. + + + + Invalid value '{0}' for '--targetprofile', valid values are 'mscorlib', 'netcore' or 'netstandard'. + Nieprawidłowa wartość „{0}” dla opcji „--targetprofile”. Prawidłowe wartości to „mscorlib”, „netcore” lub „netstandard”. + + + + Full name + Pełna nazwa + + + + and {0} other overloads + i inne przeciążenia ({0}) + + + + union case + przypadek unii + + + + active pattern result + wynik aktywnego wzorca + + + + active recognizer + aktywny aparat rozpoznawania + + + + field + pole + + + + event + zdarzenie + + + + property + właściwość + + + + extension + rozszerzenie + + + + custom operation + operacja niestandardowa + + + + argument + argument + + + + patvar + zmienna wzorca + + + + namespace + przestrzeń nazw + + + + module + moduł + + + + namespace/module + przestrzeń nazw/moduł + + + + from {0} + z {0} + + + + also from {0} + również z {0} + + + + generated property + wygenerowana właściwość + + + + generated type + wygenerowany typ + + + + Found by AssemblyFolders registry key + Znalezione przez klucz rejestru AssemblyFolders + + + + Found by AssemblyFoldersEx registry key + Znalezione przez klucz rejestru AssemblyFoldersEx + + + + .NET Framework + .NET Framework + + + + Global Assembly Cache + Globalna pamięć podręczna zestawów + + + + Recursive class hierarchy in type '{0}' + Cykliczna hierarchia klas w typie „{0}” + + + + Invalid recursive reference to an abstract slot + Nieprawidłowe odwołanie cykliczne do miejsca abstrakcyjnego + + + + The event '{0}' has a non-standard type. If this event is declared in another CLI language, you may need to access this event using the explicit {1} and {2} methods for the event. If this event is declared in F#, make the type of the event an instantiation of either 'IDelegateEvent<_>' or 'IEvent<_,_>'. + Zdarzenie „{0}” ma niestandardowy typ. Jeśli to zdarzenie zadeklarowano w innym języku infrastruktury CLI, może być konieczne uzyskanie dostępu do tego zdarzenia przy użyciu jawnych metod {1} i {2} zdarzenia. Jeśli to zdarzenie zadeklarowano w języku F#, utwórz dla typu zdarzenia wystąpienie interfejsu „IDelegateEvent<_>” lub interfejsu „IEvent<_,_>”. + + + + The type '{0}' is not accessible from this code location + Nie można uzyskać dostępu do typu „{0}” z tej lokalizacji kodu + + + + The union cases or fields of the type '{0}' are not accessible from this code location + Nie można uzyskać dostępu do przypadków unii lub pól typu „{0}” z tej lokalizacji kodu + + + + The value '{0}' is not accessible from this code location + Nie można uzyskać dostępu do wartości „{0}” z tej lokalizacji kodu + + + + The union case '{0}' is not accessible from this code location + Nie można uzyskać dostępu do przypadku unii „{0}” z tej lokalizacji kodu + + + + The record, struct or class field '{0}' is not accessible from this code location + Pole rekordu, struktury lub klasy „{0}” jest niedostępne w tej lokalizacji kodu + + + + The struct or class field '{0}' is not accessible from this code location + Nie można uzyskać dostępu do pola struktury lub klasy „{0}” z tej lokalizacji kodu + + + + This construct is experimental + Ta konstrukcja jest eksperymentalna + + + + No Invoke methods found for delegate type + Dla typu delegata nie znaleziono metod Invoke. + + + + More than one Invoke method found for delegate type + Dla typu delegata znaleziono więcej niż jedną metodę Invoke. + + + + Delegates are not allowed to have curried signatures + Delegaty nie mogą mieć sygnatur typu curried. + + + + Unexpected Expr.TyChoose + Nieoczekiwany element Expr.TyChoose + + + + Note: Lambda-lifting optimizations have not been applied because of the use of this local constrained generic function as a first class value. Adding type constraints may resolve this condition. + Uwaga: Nie zastosowano optymalizacji przenoszenia elementu lambda, ponieważ ta lokalna funkcja ogólna z ograniczeniami została użyta jako wartość pierwszoklasowa. Dodanie ograniczeń typów może rozwiązać ten problem. + + + + Identifiers containing '@' are reserved for use in F# code generation + Identyfikatory zawierające znak „@” są zarezerwowane do użytku podczas generowania kodu języka F# + + + + The identifier '{0}' is reserved for future use by F# + Identyfikator „{0}” jest zarezerwowany do użytku w przyszłości przez język F# + + + + Missing variable '{0}' + Brak zmiennej „{0}” + + + + Partial active patterns may only generate one result + Częściowe aktywne wzorce mogą generować tylko jeden wynik + + + + The type '{0}' is required here and is unavailable. You must add a reference to assembly '{1}'. + Typ „{0}” jest tutaj wymagany i niedostępny. Musisz dodać odwołanie do zestawu „{1}”. + + + + A reference to the type '{0}' in assembly '{1}' was found, but the type could not be found in that assembly + Znaleziono odwołanie do typu „{0}” w zestawie „{1}”, ale nie można znaleźć typu w tym zestawie + + + + Internal error or badly formed metadata: not enough type parameters were in scope while importing + Błąd wewnętrzny lub źle sformułowane metadane: podczas importowania w zakresie była niewystarczająca liczba parametrów typu + + + + A reference to the DLL {0} is required by assembly {1}. The imported type {2} is located in the first assembly and could not be resolved. + Odwołanie do biblioteki DLL {0} jest wymagane przez zestaw {1}. Zaimportowany typ {2} znajduje się w pierwszym zestawie i nie można go rozpoznać. + + + + An imported assembly uses the type '{0}' but that type is not public + Zaimportowany zestaw używa typu „{0}”, który nie jest publiczny + + + + The value '{0}' was marked inline but its implementation makes use of an internal or private function which is not sufficiently accessible + Wartość „{0}” została oznaczona jako śródwierszowa, ale jej implementacja używa funkcji wewnętrznej lub prywatnej, która jest niewystarczająco dostępna + + + + The value '{0}' was marked inline but was not bound in the optimization environment + Wartość „{0}” została oznaczona jako śródwierszowa, ale nie powiązano jej w środowisku optymalizacji + + + + Local value {0} not found during optimization + Nie znaleziono wartości lokalnej {0} podczas optymalizacji + + + + A value marked as 'inline' has an unexpected value + Wartość oznaczona jako „inline” ma nieoczekiwaną wartość + + + + A value marked as 'inline' could not be inlined + Nie można użyć konstrukcji śródwierszowej dla wartości oznaczonej jako „inline” + + + + Failed to inline the value '{0}' marked 'inline', perhaps because a recursive value was marked 'inline' + Nie powiodło się użycie śródwierszowej wartości „{0}” oznaczonej jako „inline” prawdopodobnie z powodu oznaczenia wartości cyklicznej jako „inline” + + + + Recursive ValValue {0} + Cykliczny element ValValue {0} + + + + The indentation of this 'in' token is incorrect with respect to the corresponding 'let' + Wcięcie tego tokenu „in” jest niepoprawne w odniesieniu do odpowiadającego tokenu „let” + + + + Possible incorrect indentation: this token is offside of context started at position {0}. Try indenting this token further or using standard formatting conventions. + Możliwe niepoprawne wcięcie: ten token jest poza kontekstem rozpoczynającym się w pozycji {0}. Spróbuj użyć dodatkowego wcięcia dla tego tokenu lub standardowych konwencji formatowania. + + + + The '|' tokens separating rules of this pattern match are misaligned by one column. Consider realigning your code or using further indentation. + Reguły oddzielające tokeny „|” tego dopasowania wzorca są niewłaściwie wyrównane o jedną kolumnę. Rozważ ponowne wyrównanie kodu lub użycie dodatkowego wcięcia. + + + + Invalid module/expression/type + Nieprawidłowy moduł/wyrażenie/typ + + + + Multiple types exist called '{0}', taking different numbers of generic parameters. Provide a type instantiation to disambiguate the type resolution, e.g. '{1}'. + Istnieje wiele typów o nazwie „{0}”, które pobierają różne liczby parametrów ogólnych. Udostępnij wystąpienie typu w celu odróżnienia rozpoznawania typu (np. „{1}”). + + + + The instantiation of the generic type '{0}' is missing and can't be inferred from the arguments or return type of this member. Consider providing a type instantiation when accessing this type, e.g. '{1}'. + Brak wystąpienia typu ogólnego „{0}” i nie można wywnioskować wystąpienia przy użyciu argumentów lub zwracanego typu tego elementu członkowskiego. Rozważ udostępnienie wystąpienia typu podczas uzyskiwania dostępu do tego typu (np. „{1}”). + + + + 'global' may only be used as the first name in a qualified path + Elementu „global” można używać tylko jako pierwszej nazwy w kwalifikowanej ścieżce + + + + This is not a constructor or literal, or a constructor is being used incorrectly + Nie jest to konstruktor ani literał albo konstruktor jest niepoprawnie używany + + + + Unexpected empty long identifier + Nieoczekiwany pusty, długi identyfikator + + + + The record type '{0}' does not contain a label '{1}'. + Typ rekordu „{0}” nie zawiera etykiety „{1}”. + + + + Invalid field label + Nieprawidłowa etykieta pola + + + + Invalid expression '{0}' + Nieprawidłowe wyrażenie „{0}” + + + + No constructors are available for the type '{0}' + Brak konstruktorów dostępnych dla typu „{0}” + + + + The union type for union case '{0}' was defined with the RequireQualifiedAccessAttribute. Include the name of the union type ('{1}') in the name you are using. + Typ unii dla przypadku unii „{0}” został zdefiniowany z użyciem wartości RequireQualifiedAccessAttribute. Uwzględnij nazwę typu unii („{1}”) w używanej nazwie. + + + + The record type for the record field '{0}' was defined with the RequireQualifiedAccessAttribute. Include the name of the record type ('{1}') in the name you are using. + Typ rekordu dla pola rekordu „{0}” został zdefiniowany z użyciem wartości RequireQualifiedAccessAttribute. Uwzględnij nazwę typu rekordu („{1}”) w używanej nazwie. + + + + Unexpected error creating debug information file '{0}' + Nieoczekiwany błąd podczas tworzenia pliku informacji o debugowaniu „{0}” + + + + This number is outside the allowable range for this integer type + Ta liczba jest poza dozwolonym zakresem tego typu liczb całkowitych + + + + '{0}' is not permitted as a character in operator names and is reserved for future use + Znak „{0}” jest niedozwolony w nazwach operatora i zarezerwowany do użytku w przyszłości + + + + Unexpected character '{0}' + Nieoczekiwany znak „{0}” + + + + This byte array literal contains characters that do not encode as a single byte + Ten literał tablicy bajtowej zawiera znaki, które nie są kodowane jako pojedynczy bajt + + + + Identifiers followed by '{0}' are reserved for future use + Identyfikatory, po których następuje „{0}”, są zarezerwowane do użytku w przyszłości + + + + This number is outside the allowable range for 8-bit signed integers + Ta liczba jest poza dozwolonym zakresem 8-bitowych liczb całkowitych ze znakiem + + + + This number is outside the allowable range for hexadecimal 8-bit signed integers + Ta liczba jest poza dozwolonym zakresem szesnastkowych, 8-bitowych liczb całkowitych ze znakiem + + + + This number is outside the allowable range for 8-bit unsigned integers + Ta liczba jest poza dozwolonym zakresem 8-bitowych liczb całkowitych bez znaku + + + + This number is outside the allowable range for 16-bit signed integers + Ta liczba jest poza dozwolonym zakresem 16-bitowych liczb całkowitych ze znakiem + + + + This number is outside the allowable range for 16-bit unsigned integers + Ta liczba jest poza dozwolonym zakresem 16-bitowych liczb całkowitych bez znaku + + + + This number is outside the allowable range for 32-bit signed integers + Ta liczba jest poza dozwolonym zakresem 32-bitowych liczb całkowitych ze znakiem + + + + This number is outside the allowable range for 32-bit unsigned integers + Ta liczba jest poza dozwolonym zakresem 32-bitowych liczb całkowitych bez znaku + + + + This number is outside the allowable range for 64-bit signed integers + Ta liczba jest poza dozwolonym zakresem 64-bitowych liczb całkowitych ze znakiem + + + + This number is outside the allowable range for 64-bit unsigned integers + Ta liczba jest poza dozwolonym zakresem 64-bitowych liczb całkowitych bez znaku + + + + This number is outside the allowable range for signed native integers + Ta liczba jest poza dozwolonym zakresem natywnych liczb całkowitych ze znakiem + + + + This number is outside the allowable range for unsigned native integers + Ta liczba jest poza dozwolonym zakresem natywnych liczb całkowitych bez znaku + + + + Invalid floating point number + Nieprawidłowa liczba zmiennoprzecinkowa + + + + This number is outside the allowable range for decimal literals + Ta liczba jest poza dozwolonym zakresem literałów dziesiętnych + + + + This number is outside the allowable range for 32-bit floats + Ta liczba jest poza dozwolonym zakresem 32-bitowych liczb zmiennoprzecinkowych + + + + This is not a valid numeric literal. Valid numeric literals include 1, 0x1, 0b0001 (int), 1u (uint32), 1L (int64), 1UL (uint64), 1s (int16), 1y (sbyte), 1uy (byte), 1.0 (float), 1.0f (float32), 1.0m (decimal), 1I (BigInteger). + Jest to nieprawidłowy literał liczbowy. Do prawidłowych literałów liczbowych należą: 1, 0x1, 0b0001 (int), 1u (uint32), 1L (int64), 1UL (uint64), 1s (int16), 1y (sbyte), 1ui (byte), 1.0 (float), 1.0f (float32), 1.0m (decimal) oraz 1I (BigInteger). + + + + This is not a valid byte literal + Nie jest to prawidłowy literał bajtowy + + + + This is not a valid character literal + Nie jest to prawidłowy literał znakowy + + + + This Unicode encoding is only valid in string literals + To kodowanie Unicode jest prawidłowe tylko w literałach ciągu + + + + This token is reserved for future use + Ten token jest zarezerwowany do użytku w przyszłości + + + + TABs are not allowed in F# code unless the #indent \"off\" option is used + Znaki TAB są niedozwolone w kodzie języka F#, chyba że użyto opcji #indent \"off\" + + + + Invalid line number: '{0}' + Nieprawidłowy numer wiersza: „{0}” + + + + #if directive must appear as the first non-whitespace character on a line + Dyrektywa #if musi występować jako pierwszy znak wiersza, który nie jest odstępem + + + + #else has no matching #if + Dyrektywa #else nie jest zgodna z dyrektywą #if + + + + #endif required for #else + Dyrektywa #endif jest wymagana dla dyrektywy #else + + + + #else directive must appear as the first non-whitespace character on a line + Dyrektywa #else musi występować jako pierwszy znak wiersza, który nie jest odstępem + + + + #endif has no matching #if + Dyrektywa #endif nie ma zgodnej dyrektywy #if + + + + #endif directive must appear as the first non-whitespace character on a line + Dyrektywa #endif musi występować jako pierwszy znak wiersza, który nie jest odstępem + + + + #if directive should be immediately followed by an identifier + Po dyrektywie #if powinien od razu następować identyfikator + + + + Syntax error. Wrong nested #endif, unexpected tokens before it. + Błąd składni. Niewłaściwie zagnieżdżona dyrektywa #endif, przed którą występują nieoczekiwane tokeny. + + + + #! may only appear as the first line at the start of a file. + Element #! może występować tylko jako pierwszy wiersz na początku pliku. + + + + Expected single line comment or end of line + Oczekiwano jednowierszowego komentarza lub końca wiersza + + + + Infix operator member '{0}' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ... + Element członkowski operatora infiksu „{0}” nie ma argumentów. Oczekiwano krotka liczącej 2 argumenty, np. static member (+) (x,y) = ... + + + + Infix operator member '{0}' has {1} initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ... + Element członkowski operatora infiksu „{0}” ma następującą liczbę argumentów początkowych: {1}. Oczekiwano krotki liczącej 2 argumenty, np. static member (+) (x,y) = ... + + + + Infix operator member '{0}' has extra curried arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ... + Element członkowski operatora infiksu „{0}” ma dodatkowe argumenty curried. Oczekiwano krotki liczącej 2 argumenty, np. static member (+) (x,y) = ... + + + + All record, union and struct types in FSharp.Core.dll must be explicitly labelled with 'StructuralComparison' or 'NoComparison' + Wszystkie typy rekordów, unii i struktur w pliku FSharp.Core.dll muszą mieć jawną etykietę „StructuralComparison” lub „NoComparison” + + + + The struct, record or union type '{0}' has the 'StructuralComparison' attribute but the type parameter '{1}' does not satisfy the 'comparison' constraint. Consider adding the 'comparison' constraint to the type parameter + Typ struktury, rekordu lub unii „{0}” zawiera atrybut „StructuralComparison”, ale parametr typu „{1}” nie spełnia ograniczenia „comparison”. Rozważ dodanie ograniczenia „comparison” do parametru typu + + + + The struct, record or union type '{0}' has the 'StructuralComparison' attribute but the component type '{1}' does not satisfy the 'comparison' constraint + Typ struktury, rekordu lub unii „{0}” zawiera atrybut „StructuralComparison”, ale typ składnika „{1}” nie spełnia ograniczenia „comparison” + + + + The struct, record or union type '{0}' is not structurally comparable because the type parameter {1} does not satisfy the 'comparison' constraint. Consider adding the 'NoComparison' attribute to the type '{2}' to clarify that the type is not comparable + Nie można porównać struktury typu struktury, rekordu lub unii „{0}”, ponieważ parametr typu {1} nie spełnia ograniczenia „comparison”. Rozważ dodanie atrybutu „NoComparison” do typu „{2}” w celu określenia, że typu nie można porównywać + + + + The struct, record or union type '{0}' is not structurally comparable because the type '{1}' does not satisfy the 'comparison' constraint. Consider adding the 'NoComparison' attribute to the type '{2}' to clarify that the type is not comparable + Nie można porównać struktury typu struktury, rekordu lub unii „{0}”, ponieważ typ „{1}” nie spełnia ograniczenia „comparison”. Rozważ dodanie atrybutu „NoComparison” do typu „{2}” w celu określenia, że typu nie można porównywać + + + + The struct, record or union type '{0}' does not support structural equality because the type parameter {1} does not satisfy the 'equality' constraint. Consider adding the 'NoEquality' attribute to the type '{2}' to clarify that the type does not support structural equality + Typ struktury, rekordu lub unii „{0}” nie obsługuje równości strukturalnej, ponieważ parametr typu {1} nie spełnia ograniczenia „equality”. Rozważ dodanie atrybutu „NoEquality” do typu „{2}” w celu określenia, że typ nie obsługuje równości strukturalnej + + + + The struct, record or union type '{0}' does not support structural equality because the type '{1}' does not satisfy the 'equality' constraint. Consider adding the 'NoEquality' attribute to the type '{2}' to clarify that the type does not support structural equality + Typ struktury, rekordu lub unii „{0}” nie obsługuje równości strukturalnej, ponieważ typ „{1}” nie spełnia ograniczenia „equality”. Rozważ dodanie atrybutu „NoEquality” do typu „{2}” w celu określenia, że typ nie obsługuje równości strukturalnej + + + + The struct, record or union type '{0}' has the 'StructuralEquality' attribute but the type parameter '{1}' does not satisfy the 'equality' constraint. Consider adding the 'equality' constraint to the type parameter + Typ struktury, rekordu lub unii „{0}” zawiera atrybut „StructuralEquality”, ale parametr typu „{1}” nie spełnia ograniczenia „equality”. Rozważ dodanie ograniczenia „equality” do parametru typu + + + + The struct, record or union type '{0}' has the 'StructuralEquality' attribute but the component type '{1}' does not satisfy the 'equality' constraint + Typ struktury, rekordu lub unii „{0}” zawiera atrybut „StructuralEquality”, ale typ składnika „{1}” nie spełnia ograniczenia „equality” + + + + Each argument of the primary constructor for a struct must be given a type, for example 'type S(x1:int, x2: int) = ...'. These arguments determine the fields of the struct. + Każdy argument podstawowego konstruktora struktury musi mieć określony typ, na przykład „type S(x1:int, x2:int) = ...”. Te argumenty określają pola struktury. + + + + The value '{0}' is unused + Wartość „{0}” nie jest używana + + + + The recursive object reference '{0}' is unused. The presence of a recursive object reference adds runtime initialization checks to members in this and derived types. Consider removing this recursive object reference. + Cykliczne odwołanie do obiektu „{0}” nie jest używane. Obecność cyklicznego odwołania do obiektu powoduje dodanie kontroli inicjowania środowiska uruchomieniowego do elementów członkowskich w tym typie i typach pochodnych. Rozważ usunięcie tego cyklicznego odwołania do obiektu. + + + + A getter property may have at most one argument group + Właściwość metody pobierającej może mieć najwyżej jedną grupę argumentów + + + + A setter property may have at most two argument groups + Właściwość metody ustawiającej może mieć co najwyżej dwie grupy argumentów + + + + Invalid property getter or setter + Nieprawidłowa metoda ustawiająca lub metoda pobierająca właściwość + + + + An indexer property must be given at least one argument + Wymagane jest podanie co najmniej jednego argumentu dla właściwości indeksatora + + + + This operation accesses a mutable top-level value defined in another assembly in an unsupported way. The value cannot be accessed through its address. Consider copying the expression to a mutable local, e.g. 'let mutable x = ...', and if necessary assigning the value back after the completion of the operation + Ta operacja uzyskuje dostęp do modyfikowalnej wartości najwyższego poziomu zdefiniowanej w innym zestawie w nieobsługiwany sposób. Nie można uzyskiwać dostępu do wartości za pośrednictwem jej adresu. Rozważ skopiowanie wyrażenia do modyfikowalnej wartości lokalnej, na przykład „let mutable x = ...”, i w razie potrzeby ponowne przypisanie wartości po ukończeniu operacji + + + + Remove spaces between the type name and type parameter, e.g. \"type C<'T>\", not type \"C <'T>\". Type parameters must be placed directly adjacent to the type name. + Parametry typu muszą być umieszczone w bezpośrednim sąsiedztwie nazwy typu (np. \"type C<'T>\", a nie type \"C <'T>\") + + + + Remove spaces between the type name and type parameter, e.g. \"C<'T>\", not \"C <'T>\". Type parameters must be placed directly adjacent to the type name. + Argumenty typu muszą być umieszczone w bezpośrednim sąsiedztwie nazwy typu (np. \"C<'T>\", a nie \"C <'T>\") + + + + The use of the type syntax 'int C' and 'C <int>' is not permitted here. Consider adjusting this type to be written in the form 'C<int>' + Użycie składni typu „int C” i „C <int>” jest tutaj niedozwolone. Rozważ dopasowanie tego typu w celu zapisania go w postaci „C<int>” + + + + The module/namespace '{0}' from compilation unit '{1}' did not contain the module/namespace '{2}' + Moduł/przestrzeń nazw „{0}” z jednostki kompilacji „{1}” nie zawiera modułu/przestrzeni nazw „{2}” + + + + The module/namespace '{0}' from compilation unit '{1}' did not contain the val '{2}' + Moduł/przestrzeń nazw „{0}” z jednostki kompilacji „{1}” nie zawiera wartości „{2}” + + + + The module/namespace '{0}' from compilation unit '{1}' did not contain the namespace, module or type '{2}' + Moduł/przestrzeń nazw „{0}” z jednostki kompilacji „{1}” nie zawiera modułu, przestrzeni nazw lub typu „{2}” + + + + The 'UseNullAsTrueValue' attribute flag may only be used with union types that have one nullary case and at least one non-nullary case + Flaga atrybutu „UseNullAsTrueValue” może być używana tylko z typami unii, które mają jeden przypadek o wartości null i co najmniej jeden przypadek o wartości innej niż null + + + + The parameter '{0}' was inferred to have byref type. Parameters of byref type must be given an explicit type annotation, e.g. 'x1: byref<int>'. When used, a byref parameter is implicitly dereferenced. + Wywnioskowano, że parametr „{0}” ma typ byref. Parametry typu byref muszą mieć jawną adnotację typu, na przykład „x1: byref<int>”. Parametr typu byref zostanie niejawnie wyłuskany, jeśli zostanie użyty. + + + + The generic member '{0}' has been used at a non-uniform instantiation prior to this program point. Consider reordering the members so this member occurs first. Alternatively, specify the full type of the member explicitly, including argument types, return type and any additional generic parameters and constraints. + Ogólny element członkowski „{0}” został użyty w niejednolitym utworzeniu wystąpienia przed tym punktem programu. Rozważ zmianę kolejności elementów członkowskich, aby ten element członkowski występował jako pierwszy. Możesz też jawnie określić pełny typ elementu członkowskiego, łącznie z typami argumentów, zwracanym typem i wszelkimi dodatkowymi ogólnymi parametrami i ograniczeniami. + + + + The attribute '{0}' appears in both the implementation and the signature, but the attribute arguments differ. Only the attribute from the signature will be included in the compiled code. + Atrybut „{0}” występuje w implementacji i sygnaturze, ale argumenty atrybutu różnią się między sobą. W kompilowanym kodzie zostanie uwzględniony tylko atrybut z sygnatury. + + + + Cannot call an abstract base member: '{0}' + Nie można wywołać abstrakcyjnego podstawowego elementu członkowskiego: „{0}” + + + + Could not resolve the ambiguity in the use of a generic construct with an 'unmanaged' constraint at or near this position + Nie można usunąć niejednoznaczności w przypadku użycia konstrukcji ogólnej z ograniczeniem „unmanaged” w tym miejscu lub w jego pobliżu + + + + This construct is for ML compatibility. {0}. You can disable this warning by using '--mlcompatibility' or '--nowarn:62'. + Ta konstrukcja zapewnia zgodność z językiem ML. {0}. Możesz wyłączyć to ostrzeżenie, używając opcji „--mlcompatibility” lub opcji „--nowarn:62”. + + + + The type '{0}' has been marked as having an Explicit layout, but the field '{1}' has not been marked with the 'FieldOffset' attribute + Typ „{0}” został oznaczony jako mający układ Explicit, ale pole „{1}” nie zostało oznaczone za pomocą atrybutu „FieldOffset” + + + + Interfaces inherited by other interfaces should be declared using 'inherit ...' instead of 'interface ...' + Interfejsy dziedziczone przez inne interfejsy powinny być deklarowane przy użyciu ciągu „inherit ...” zamiast ciągu „interface ...” + + + + Invalid prefix operator + Nieprawidłowy operator prefiksu + + + + Invalid operator definition. Prefix operator definitions must use a valid prefix operator name. + Nieprawidłowa definicja operatora. Definicje operatora prefiksu muszą używać prawidłowej nazwy operatora prefiksu. + + + + The file extensions '.ml' and '.mli' are for ML compatibility + Rozszerzenia pliku „ml” i „mli” są używane na potrzeby zgodności z językiem ML + + + + Consider using a file with extension '.ml' or '.mli' instead + Rozważ użycie pliku z rozszerzeniem „ml” lub „mli” + + + + Active pattern '{0}' is not a function + Aktywny wzorzec „{0}” nie jest funkcją + + + + Active pattern '{0}' 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' + Aktywny wzorzec „{0}” ma typ wyniku zawierający zmienne typu, które nie są określone przez dane wejściowe. Częstą przyczyną jest brak podanego przypadku wyniku (np. „let (|A|B|) (x:int) = A x”). Można to naprawić za pomocą ograniczenia typu (np. „let (|A|B|) (x:int) : Choice<int,unit> = A x”) + + + + The FieldOffset attribute can only be placed on members of types marked with the StructLayout(LayoutKind.Explicit) + Atrybut FieldOffset można umieścić tylko w elementach członkowskich o typie oznaczonym przy użyciu atrybutu StructLayout(LayoutKind.Explicit). + + + + Optional arguments must come at the end of the argument list, after any non-optional arguments + Argumenty opcjonalne muszą występować na końcu listy argumentów po argumentach nieopcjonalnych + + + + Attribute 'System.Diagnostics.ConditionalAttribute' is only valid on methods or attribute classes + Atrybut „System.Diagnostics.ConditionalAttribute” jest prawidłowy tylko w przypadku metod lub klas atrybutów + + + + Extension members cannot provide operator overloads. Consider defining the operator as part of the type definition instead. + Elementy członkowskie rozszerzeń nie mogą udostępniać przeciążeń operatorów. Zamiast tego rozważ zdefiniowanie operatora jako części definicji typu. + + + + The name of the MDB file must be <assembly-file-name>.mdb. The --pdb option will be ignored. + Nazwa pliku MDB musi mieć postać: <nazwa-pliku-zestawu>.mdb. Opcja --pdb zostanie zignorowana. + + + + MDB generation failed. Could not find compatible member {0} + Generowanie pliku MDB nie powiodło się. Nie można znaleźć zgodnego elementu członkowskiego {0} + + + + Cannot generate MDB debug information. Failed to load the 'MonoSymbolWriter' type from the 'Mono.CompilerServices.SymbolWriter.dll' assembly. + Nie można wygenerować informacji o debugowaniu pliku MDB. Nie można załadować typu „MonoSymbolWriter” z zestawu „Mono.CompilerServices.SymbolWriter.dll”. + + + + The union case named '{0}' conflicts with the generated type '{1}' + Przypadek unii o nazwie „{0}” powoduje konflikt z wygenerowanym typem „{1}” + + + + ReflectedDefinitionAttribute may not be applied to an instance member on a struct type, because the instance member takes an implicit 'this' byref parameter + Atrybut ReflectedDefinitionAttribute nie może być stosowany do elementu członkowskiego wystąpienia w typie struktury, ponieważ element członkowski wystąpienia pobiera niejawny parametr „this” typu byref + + + + DLLImport bindings must be static members in a class or function definitions in a module + Powiązania DLLImport muszą być statycznymi elementami członkowskimi w definicjach klas lub funkcji w module + + + + When mscorlib.dll or FSharp.Core.dll is explicitly referenced the {0} option must also be passed + W przypadku jawnego odwołania do pliku mscorlib.dll lub pliku FSharp.Core.dll musi również zostać przekazana opcja {0} + + + + FSharp.Core.sigdata not found alongside FSharp.Core. File expected in {0}. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required. + Nie znaleziono zasobu FSharp.Core.sigdata z plikiem FSharp.Core. Plik oczekiwany w {0}. Rozważ uaktualnienie do nowszej wersji pliku FSharp.Core, w której ten plik nie jest już wymagany. + + + + File '{0}' not found alongside FSharp.Core. File expected in {1}. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required. + Nie znaleziono pliku „{0}” z plikiem FSharp.Core. Plik oczekiwany w {1}. Rozważ uaktualnienie do nowszej wersji pliku FSharp.Core, w której ten plik nie jest już wymagany. + + + + Filename '{0}' contains invalid character '{1}' + Nazwa pliku „{0}” zawiera nieprawidłowy znak „{1}” + + + + 'use!' bindings must be of the form 'use! <var> = <expr>' + Powiązania „use!” muszą mieć postać „use! <var> = <expr>” + + + + Inner generic functions are not permitted in quoted expressions. Consider adding some type constraints until this function is no longer generic. + Wewnętrzne funkcje ogólne są niedozwolone w wyrażeniach cytowanych. Rozważ dodanie ograniczeń typów, tak aby ta funkcja nie była już ogólna. + + + + The type '{0}' is not a valid enumerator type , i.e. does not have a 'MoveNext()' method returning a bool, and a 'Current' property + Typ „{0}” nie jest prawidłowym typem modułu wyliczającego, czyli nie zawiera metody „MoveNext()” zwracającej wartość logiczną i właściwości „Current” + + + + End of file in triple-quote string begun at or before here + Koniec pliku w ciągu z potrójnym cudzysłowem rozpoczętym w tym miejscu lub przed nim + + + + End of file in triple-quote string embedded in comment begun at or before here + Koniec pliku w ciągu z potrójnym cudzysłowem osadzonym w komentarzu rozpoczętym w tym miejscu lub przed nim + + + + This type test or downcast will ignore the unit-of-measure '{0}' + Ten test typu lub to przypisanie elementu podrzędnego zignoruje jednostkę miary „{0}” + + + + Expected type argument or static argument + Oczekiwano argumentu typu lub argumentu statycznego + + + + Unmatched '<'. Expected closing '>' + Niedopasowany znak „<”. Oczekiwano znaku zamykającego „>” + + + + Unexpected quotation operator '<@' in type definition. If you intend to pass a verbatim string as a static argument to a type provider, put a space between the '<' and '@' characters. + Nieoczekiwany operator cytatu „<@” w definicji typu. Jeśli chcesz przekazać ciąg dosłownego wyrażenia jako argument statyczny do dostawcy typów, wstaw odstęp między znakami „<” i „@”. + + + + Attempted to parse this as an operator name, but failed + Podjęto próbę analizy tego elementu jako nazwy operatora, ale analiza nie powiodła się + + + + \U{0} is not a valid Unicode character escape sequence + \U{0} nie jest prawidłową sekwencją znaku ucieczki Unicode + + + + '{0}' must be applied to an argument of type '{1}', but has been applied to an argument of type '{2}' + Element „{0}” należy zastosować do argumentu typu „{1}”, jednak został on zastosowany do argumentu typu „{2}” + + + + '{0}' can only be applied to optional arguments + Element „{0}” można stosować tylko do argumentów opcjonalnych + + + + The specified .NET Framework version '{0}' is not supported. Please specify a value from the enumeration Microsoft.Build.Utilities.TargetDotNetFrameworkVersion. + Określona wersja platformy .NET Framework „{0}” nie jest obsługiwana. Określ wartość z wyliczenia Microsoft.Build.Utilities.TargetDotNetFrameworkVersion. + + + + Invalid Magic value in CLR Header + Nieprawidłowa wartość magiczna w nagłówku CLR + + + + Bad image format + Nieprawidłowy format obrazu + + + + Private key expected + Oczekiwano klucza prywatnego + + + + RSA key expected + Oczekiwano klucza RSA + + + + Invalid bit Length + Nieprawidłowa długość bitowa + + + + Invalid RSAParameters structure - '{{0}}' expected + Nieprawidłowa struktura elementu RSAParameters — oczekiwano „{{0}}” + + + + Invalid algId - 'Exponent' expected + Nieprawidłowy element algId — oczekiwano wartości „Exponent” + + + + Invalid signature size + Nieprawidłowy rozmiar sygnatury + + + + No signature directory + Nie ma katalogu sygnatury + + + + Invalid Public Key blob + Nieprawidłowy obiekt blob klucza publicznego + + + + Exiting - too many errors + Zakończenie — zbyt wiele błędów + + + + The documentation file has no .xml suffix + Plik dokumentacji nie ma sufiksu xml + + + + No implementation files specified + Nie określono żadnych plików implementacji + + + + The attribute {0} specified version '{1}', but this value is invalid and has been ignored + Atrybut {0} określił wersję „{1}”, ale ta wartość jest nieprawidłowa i została zignorowana + + + + Conflicting options specified: 'win32manifest' and 'win32res'. Only one of these can be used. + Podano opcje powodujące konflikt: „win32manifest” i „win32res”. Może zostać użyta tylko jedna z nich. + + + + The code in assembly '{0}' makes uses of quotation literals. Static linking may not include components that make use of quotation literals unless all assemblies are compiled with at least F# 4.0. + Kod w zestawie „{0}” używa literałów cytatu. Statyczne połączenie nie może obejmować składników, które używają literałów cytatu, chyba że wszystkie zestawy są kompilowane przy użyciu języka F# w wersji co najmniej 4.0. + + + + Code in this assembly makes uses of quotation literals. Static linking may not include components that make use of quotation literals unless all assemblies are compiled with at least F# 4.0. + Kod w tym zestawie używa literałów cytatu. Statyczne połączenie nie może obejmować składników, które używają literałów cytatu, chyba że wszystkie zestawy są kompilowane przy użyciu języka F# w wersji co najmniej 4.0. + + + + Static linking may not include a .EXE + Łączenie statyczne nie może obejmować pliku EXE + + + + Static linking may not include a mixed managed/unmanaged DLL + Statyczne łączenie nie może obejmować mieszanej biblioteki zarządzanej/niezarządzanej DLL + + + + Ignoring mixed managed/unmanaged assembly '{0}' during static linking + Ignorowanie mieszanego zestawu zarządzanego/niezarządzanego „{0}” podczas statycznego łączenia + + + + Assembly '{0}' was referenced transitively and the assembly could not be resolved automatically. Static linking will assume this DLL has no dependencies on the F# library or other statically linked DLLs. Consider adding an explicit reference to this DLL. + Do zestawu „{0}” wystąpiło odwołanie przechodnie i nie można automatycznie rozpoznać zestawu. W przypadku statycznego łączenia zostanie przyjęte, że ta biblioteka DLL nie ma żadnych zależności od biblioteki języka F# lub innych statycznie połączonych bibliotek DLL. Rozważ dodanie jawnego odwołania do tej biblioteki DLL. + + + + Assembly '{0}' not found in dependency set of target binary. Statically linked roots should be specified using an assembly name, without a DLL or EXE extension. If this assembly was referenced explicitly then it is possible the assembly was not actually required by the generated binary, in which case it should not be statically linked. + Nie znaleziono zestawu „{0}” w zestawie zależności docelowych danych binarnych. Statycznie połączone elementy główne powinny być określone przy użyciu nazwy zestawu bez rozszerzenia DLL lub EXE. Jeśli do tego zestawu wystąpiło jawne odwołanie, możliwe jest, że zestaw nie był w rzeczywistości wymagany przez wygenerowane dane binarne. W takim przypadku nie powinny być statycznie połączone. + + + + The key file '{0}' could not be opened + Nie można otworzyć pliku klucza „{0}” + + + + A problem occurred writing the binary '{0}': {1} + Wystąpił problem podczas zapisywania danych binarnych „{0}”: {1} + + + + The 'AssemblyVersionAttribute' has been ignored because a version was given using a command line option + Element „AssemblyVersionAttribute” został zignorowany, ponieważ wersję podano przy użyciu opcji wiersza polecenia + + + + Error emitting 'System.Reflection.AssemblyCultureAttribute' attribute -- 'Executables cannot be satellite assemblies, Culture should always be empty' + Błąd podczas emitowania atrybutu „System.Reflection.AssemblyCultureAttribute” -- „Pliki wykonywalne nie mogą być zestawami satelickimi. Kultura zawsze powinna być pusta” + + + + Option '--delaysign' overrides attribute 'System.Reflection.AssemblyDelaySignAttribute' given in a source file or added module + Opcja „--delaysign” przesłania atrybut „System.Reflection.AssemblyDelaySignAttribute” podany w pliku źródłowym lub dodanym module + + + + Option '--keyfile' overrides attribute 'System.Reflection.AssemblyKeyFileAttribute' given in a source file or added module + Opcja „--keyfile” przesłania atrybut „System.Reflection.AssemblyKeyFileAttribute” podany w pliku źródłowym lub dodanym module + + + + Option '--keycontainer' overrides attribute 'System.Reflection.AssemblyNameAttribute' given in a source file or added module + Opcja „--keycontainer” przesłania atrybut „System.Reflection.AssemblyNameAttribute” podany w pliku źródłowym lub dodanym module + + + + The assembly '{0}' is listed on the command line. Assemblies should be referenced using a command line flag such as '-r'. + Zestaw „{0}” wyszczególniono w wierszu polecenia. Odwołania do zestawów powinny być tworzone przy użyciu flagi wiersza polecenia, takiej jak „-r”. + + + + The resident compilation service was not used because a problem occured in communicating with the server. + Rezydentna usługa kompilacji nie została użyta, ponieważ wystąpił problem z komunikowaniem się z serwerem. + + + + Problem with filename '{0}': Illegal characters in path. + Problem z nazwą pliku „{0}”: niedozwolone znaki w ścieżce. + + + + Passing a .resx file ({0}) as a source file to the compiler is deprecated. Use resgen.exe to transform the .resx file into a .resources file to pass as a --resource option. If you are using MSBuild, this can be done via an <EmbeddedResource> item in the .fsproj project file. + Przekazywanie pliku .resx ({0}) jako pliku źródłowego do kompilatora jest przestarzałe. Użyj programu resgen.exe, aby przekształcić plik .resx w plik .resources w celu przekazania go w opcji --resource. Jeśli używasz narzędzia MSBuild, może to zostać zrealizowane za pośrednictwem elementu <EmbeddedResource> w pliku projektu .fsproj. + + + + Static linking may not be used on an assembly referencing mscorlib (e.g. a .NET Framework assembly) when generating an assembly that references System.Runtime (e.g. a .NET Core or Portable assembly). + Nie można użyć łączenia statycznego w przypadku zestawu przywołującego bibliotekę mscorlib (np. zestaw programu .NET Framework) podczas generowania zestawu przywołującego element System.Runtime (np. zestaw programu .NET Core lub przenośny). + + + + An {0} specified version '{1}', but this value is a wildcard, and you have requested a deterministic build, these are in conflict. + Element {0} określił wersję „{1}”, ale wartość jest symbolem wieloznacznym. Żądano kompilacji deterministycznej. Te wartości powodują konflikt. + + + + Determinstic builds only support portable PDBs (--debug:portable or --debug:embedded) + Kompilacje deterministyczne obsługują tylko przenośne pliki PDB (--debug:portable lub --debug:embedded) + + + + Character '{0}' is not allowed in provided namespace name '{1}' + Znak „{0}” jest niedozwolony w podanej nazwie przestrzeni nazw „{1}” + + + + The provided type '{0}' returned a member with a null or empty member name + Udostępniony typ „{0}” zwrócił element członkowski z wartością null lub pustą nazwą elementu członkowskiego + + + + The provided type '{0}' returned a null member + Udostępniony typ „{0}” zwrócił element członkowski o wartości null + + + + The provided type '{0}' member info '{1}' has null declaring type + Informacje elementu członkowskiego „{1}” udostępnionego typu „{0}” mają typ deklarujący o wartości null + + + + The provided type '{0}' has member '{1}' which has declaring type '{2}'. Expected declaring type to be the same as provided type. + Udostępniony typ „{0}” ma element członkowski „{1}” z typem deklarującym „{2}”. Oczekiwano, że typ deklarujący będzie taki sam jak udostępniony typ. + + + + Referenced assembly '{0}' has assembly level attribute '{1}' but no public type provider classes were found + Zestaw „{0}”, którego dotyczy odwołanie, ma atrybut poziomu zestawu „{1}”, ale nie znaleziono publicznych klas dostawcy typów + + + + Type '{0}' from type provider '{1}' has an empty namespace. Use 'null' for the global namespace. + Typ „{0}” od dostawcy typów „{1}” ma pustą przestrzeń nazw. Użyj wartości „null” dla globalnej przestrzeni nazw. + + + + Empty namespace found from the type provider '{0}'. Use 'null' for the global namespace. + Znaleziono pustą przestrzeń nazw od dostawcy typów „{0}”. Użyj wartości „null” dla globalnej przestrzeni nazw. + + + + Provided type '{0}' has 'IsGenericType' as true, but generic types are not supported. + Udostępniony typ „{0}” ma właściwość „IsGenericType” o wartości true, ale typy ogólne nie są obsługiwane. + + + + Provided type '{0}' has 'IsArray' as true, but array types are not supported. + Udostępniony typ „{0}” ma właściwość „IsArray” o wartości true, ale typy tablicy nie są obsługiwane. + + + + Invalid member '{0}' on provided type '{1}'. Provided type members must be public, and not be generic, virtual, or abstract. + Nieprawidłowy element członkowski „{0}” w udostępnionym typie „{1}”. Elementy członkowskie udostępnionego typu muszą być publiczne, a nie ogólne, wirtualne lub abstrakcyjne. + + + + Invalid member '{0}' on provided type '{1}'. Only properties, methods and constructors are allowed + Nieprawidłowy element członkowski „{0}” w udostępnionym typie „{1}”. Dozwolone są tylko właściwości, metody i konstruktory + + + + Property '{0}' on provided type '{1}' has CanRead=true but there was no value from GetGetMethod() + Właściwość „{0}” w udostępnionym typie „{1}” ma właściwość CanRead=true, ale brakuje wartości z metody GetGetMethod() + + + + Property '{0}' on provided type '{1}' has CanRead=false but GetGetMethod() returned a method + Właściwość „{0}” w udostępnionym typie „{1}” ma właściwość CanRead=false, ale metoda GetGetMethod() zwróciła metodę + + + + Property '{0}' on provided type '{1}' has CanWrite=true but there was no value from GetSetMethod() + Właściwość „{0}” w udostępnionym typie „{1}” ma właściwość CanWrite=true, ale brakuje wartości z metody GetSetMethod() + + + + Property '{0}' on provided type '{1}' has CanWrite=false but GetSetMethod() returned a method + Właściwość „{0}” w udostępnionym typie „{1}” ma właściwość CanWrite=false, ale metoda GetSetMethod() zwróciła metodę + + + + One or more errors seen during provided type setup + Podczas konfigurowania udostępnionych typów napotkano co najmniej jeden błąd + + + + Unexpected exception from provided type '{0}' member '{1}': {2} + Nieoczekiwany wyjątek udostępnionego typu „{0}”. Element członkowski: „{1}”: {2} + + + + Unsupported constant type '{0}'. Quotations provided by type providers can only contain simple constants. The implementation of the type provider may need to be adjusted by moving a value declared outside a provided quotation literal to be a 'let' binding inside the quotation literal. + Nieobsługiwany typ stałej „{0}”. Cytowania udostępniane przez dostawców typu mogą zawierać tylko proste stałe. Implementacja dostawcy typu może wymagać dostosowania przez przeniesienie wartości zadeklarowanej poza udostępnionym literałem cytowania w celu utworzenia powiązania typu „let” wewnątrz literału cytowania. + + + + Unsupported expression '{0}' from type provider. If you are the author of this type provider, consider adjusting it to provide a different provided expression. + Nieobsługiwane wyrażenie „{0}” z dostawcy typów. Jeśli ten dostawca typów jest Twojego autorstwa, rozważ dostosowanie go w celu zapewnienia innego udostępnionego wyrażenia. + + + + Expected provided type named '{0}' but provided type has 'Name' with value '{1}' + Oczekiwano udostępnionego typu o nazwie „{0}”, ale udostępniony typ ma właściwość Name o wartości „{1}”. + + + + Event '{0}' on provided type '{1}' has no value from GetAddMethod() + Zdarzenie „{0}” w udostępnionym typie „{1}” nie ma wartości z metody GetAddMethod() + + + + Event '{0}' on provided type '{1}' has no value from GetRemoveMethod() + Zdarzenie „{0}” w udostępnionym typie „{1}” nie ma wartości z metody GetRemoveMethod() + + + + Assembly attribute '{0}' refers to a designer assembly '{1}' which cannot be loaded or doesn't exist. {2} + Atrybut zestawu „{0}” odwołuje się do zestawu projektanta „{1}”, którego nie można załadować lub który nie istnieje. {2} + + + + The type provider does not have a valid constructor. A constructor taking either no arguments or one argument of type 'TypeProviderConfig' was expected. + Dostawca typów nie ma prawidłowego konstruktora. Oczekiwano konstruktora, który nie pobiera argumentów lub pobiera jeden argument typu „TypeProviderConfig”. + + + + The type provider '{0}' reported an error: {1} + Dostawca typów „{0}” zgłosił błąd: {1} + + + + The type provider '{0}' used an invalid parameter in the ParameterExpression: {1} + Dostawca typów „{0}” użył nieprawidłowego parametru w elemencie ParameterExpression: {1} + + + + The type provider '{0}' provided a method with a name '{1}' and metadata token '{2}', which is not reported among its methods of its declaring type '{3}' + Dostawca typów „{0}” udostępnił metodę o nazwie „{1}” i token metadanych „{2}”, które nie zostały zgłoszone wśród metod dostawcy jego typu deklarującego „{3}” + + + + The type provider '{0}' provided a constructor which is not reported among the constructors of its declaring type '{1}' + Dostawca typów „{0}” udostępnił konstruktor, który nie został zgłoszony wśród konstruktorów jego typu deklarującego „{1}” + + + + A direct reference to the generated type '{0}' is not permitted. Instead, use a type definition, e.g. 'type TypeAlias = <path>'. This indicates that a type provider adds generated types to your assembly. + Bezpośrednie odwołanie do wygenerowanego typu „{0}” jest niedozwolone. Użyj definicji typu (np. „type AliasTypu = <ścieżka>”). Wskazuje to, że dostawca typów dodaje wygenerowane typy do używanego zestawu. + + + + Expected provided type with path '{0}' but provided type has path '{1}' + Oczekiwano udostępnionego typu ze ścieżką „{0}”, ale udostępniony typ ma ścieżkę „{1}” + + + + Unexpected 'null' return value from provided type '{0}' member '{1}' + Nieoczekiwana wartość zwracana „null” udostępnionego typu „{0}”. Element członkowski: „{1}” + + + + Unexpected exception from member '{0}' of provided type '{1}' member '{2}': {3} + Nieoczekiwany wyjątek elementu członkowskiego „{0}” udostępnionego typu „{1}”. Element członkowski: „{2}”: {3} + + + + Nested provided types do not take static arguments or generic parameters + Udostępnione typy zagnieżdżone nie pobierają argumentów statycznych lub parametrów ogólnych + + + + Invalid static argument to provided type. Expected an argument of kind '{0}'. + Nieprawidłowy argument statyczny udostępnionego typu. Oczekiwano argumentu rodzaju: „{0}”. + + + + An error occured applying the static arguments to a provided type + Wystąpił błąd podczas stosowania argumentów statycznych do udostępnionego typu + + + + Unknown static argument kind '{0}' when resolving a reference to a provided type or method '{1}' + Nieznany rodzaj argumentu statycznego „{0}” podczas rozpoznawania odwołania do podanego typu lub podanej metody „{1}” + + + + invalid namespace for provided type + nieprawidłowa przestrzeń nazw udostępnionego typu + + + + invalid full name for provided type + nieprawidłowa pełna nazwa udostępnionego typu + + + + The type provider returned 'null', which is not a valid return value from '{0}' + Dostawca typów zwrócił wartość „null”, która nie jest prawidłową wartością zwracaną z „{0}” + + + + The type provider constructor has thrown an exception: {0} + Konstruktor dostawcy typów zgłosił wyjątek: {0} + + + + Type provider '{0}' returned null from GetInvokerExpression. + Dostawca typów „{0}” zwrócił wartość null z metody GetInvokerExpression. + + + + The type provider '{0}' returned an invalid type from 'ApplyStaticArguments'. A type with name '{1}' was expected, but a type with name '{2}' was returned. + Dostawca typów „{0}” zwrócił nieprawidłowy typ z metody „ApplyStaticArguments”. Oczekiwano typu o nazwie „{1}”, ale został zwrócony typ o nazwie „{2}”. + + + + The type provider '{0}' returned an invalid method from 'ApplyStaticArgumentsForMethod'. A method with name '{1}' was expected, but a method with name '{2}' was returned. + Dostawca typów „{0}” zwrócił nieprawidłową metodę z funkcji „ApplyStaticArgumentsForMethod”. Oczekiwano metody o nazwie „{1}”, lecz zwrócono metodę o nazwie „{2}”. + + + + This type test or downcast will erase the provided type '{0}' to the type '{1}' + Ten test typu lub to przypisanie elementu podrzędnego spowoduje wymazanie podanego typu „{0}” w typie „{1}” + + + + This downcast will erase the provided type '{0}' to the type '{1}'. + To przypisanie elementu podrzędnego spowoduje wymazanie podanego typu „{0}” w typie „{1}”. + + + + This type test with a provided type '{0}' is not allowed because this provided type will be erased to '{1}' at runtime. + Ten test typu z udostępnionym typem „{0}” nie jest dozwolony, ponieważ ten udostępniony typ zostanie wymazany do typu „{1}” w środowisku uruchomieniowym. + + + + Cannot inherit from erased provided type + Nie można dziedziczyć po dostarczonym wymazanym typie + + + + Assembly '{0}' hase TypeProviderAssembly attribute with invalid value '{1}'. The value should be a valid assembly name + Zestaw „{0}” ma atrybut TypeProviderAssembly z nieprawidłową wartością „{1}”. Wartość powinna być prawidłową nazwą zestawu + + + + Invalid member name. Members may not have name '.ctor' or '.cctor' + Nieprawidłowa nazwa elementu członkowskiego. Elementy członkowskie nie mogą mieć nazw „.ctor” i „.cctor” + + + + The function or member '{0}' is used in a way that requires further type annotations at its definition to ensure consistency of inferred types. The inferred signature is '{1}'. + Element członkowski funkcji „{0}” jest używany w sposób wymagający dodatkowych adnotacji typów w definicji w celu zapewnienia spójności wywnioskowanych typów. Wywnioskowana sygnatura: „{1}”. + + + + The number of type arguments did not match: '{0}' given, '{1}' expected. This may be related to a previously reported error. + Liczba argumentów typu nie jest zgodna. Podana liczba: „{0}”; oczekiwana liczba: „{1}”. Może to być związane z wcześniej zgłoszonym błędem. + + + + Cannot override inherited member '{0}' because it is sealed + Nie można przesłonić dziedziczonego elementu członkowskiego „{0}”, ponieważ jest on zapieczętowany + + + + The type provider '{0}' reported an error in the context of provided type '{1}', member '{2}'. The error: {3} + Dostawca typów „{0}” zgłosił błąd w kontekście udostępnionego typu „{1}”. Element członkowski: „{2}”. Błąd: {3} + + + + An exception occurred when accessing the '{0}' of a provided type: {1} + Wystąpił wyjątek podczas uzyskiwania dostępu do elementu „{0}” udostępnionego typu: {1} + + + + The '{0}' of a provided type was null or empty. + Nazwa „{0}” udostępnionego typu miała wartość null lub była pusta. + + + + Character '{0}' is not allowed in provided type name '{1}' + Znak „{0}” jest niedozwolony w nazwie udostępnionego typu „{1}” + + + + In queries, '{0}' must use a simple pattern + W zapytaniach element „{0}” musi używać prostego wzorca + + + + A custom query operation for '{0}' is required but not specified + Wymagana jest niestandardowa operacja zapytania „{0}”, ale jej nie określono + + + + Named static arguments must come after all unnamed static arguments + Nazwane argumenty statyczne muszą następować po wszystkich nienazwanych argumentach statycznych + + + + The static parameter '{0}' of the provided type or method '{1}' requires a value. Static parameters to type providers may be optionally specified using named arguments, e.g. '{2}<{3}=...>'. + Parametr statyczny „{0}” podanego typu lub podanej metody „{1}” wymaga wartości. Parametry statyczne dostawców typów mogą być opcjonalnie określane przy użyciu argumentów nazwanych (np. „{2}<{3}=...>”). + + + + No static parameter exists with name '{0}' + Nie istnieje parametr statyczny o nazwie „{0}” + + + + The static parameter '{0}' has already been given a value + Została już podana wartość parametru statycznego „{0}” + + + + Multiple static parameters exist with name '{0}' + Istnieje wiele parametrów statycznych o nazwie „{0}” + + + + A custom operation may not be used in conjunction with a non-value or recursive 'let' binding in another part of this computation expression + Operacja niestandardowa nie może być używana razem z powiązaniem „let” bez wartości lub cyklicznym powiązaniem „let” w innej części tego wyrażenia obliczenia + + + + A custom operation may not be used in conjunction with 'use', 'try/with', 'try/finally', 'if/then/else' or 'match' operators within this computation expression + Operacja niestandardowa nie może być używana razem z operatorem „use”, „try/with”, „try/finally”, „if/then/else” lub „match” w tym wyrażeniu obliczenia + + + + The custom operation '{0}' refers to a method which is overloaded. The implementations of custom operations may not be overloaded. + Operacja niestandardowa „{0}” odwołuje się do przeciążonej metody. Implementacje operacji niestandardowych nie mogą być przeciążone. + + + + An if/then/else expression may not be used within queries. Consider using either an if/then expression, or use a sequence expression instead. + Wyrażenie if/then/else nie może być używane w zapytaniach. Zamiast tego rozważ użycie wyrażenia if/then lub wyrażenia sekwencji. + + + + Invalid argument to 'methodhandleof' during codegen + Nieprawidłowy argument dla „methodhandleof” podczas generowania kodu + + + + A reference to a provided type was missing a value for the static parameter '{0}'. You may need to recompile one or more referenced assemblies. + W odwołaniu do udostępnionego typu brakuje wartości parametru statycznego „{0}”. Może być konieczne ponowne skompilowanie co najmniej jednego zestawu, do którego występuje odwołanie. + + + + A reference to a provided type had an invalid value '{0}' for a static parameter. You may need to recompile one or more referenced assemblies. + Odwołanie do udostępnionego typu miało nieprawidłową wartość „{0}” parametru statycznego. Może być konieczne ponowne skompilowanie co najmniej jednego zestawu, do którego występuje odwołanie. + + + + '{0}' is not used correctly. This is a custom operation in this query or computation expression. + Operacja „{0}” nie jest używana poprawnie. Jest to operacja niestandardowa w tym zapytaniu lub wyrażeniu obliczenia. + + + + '{0}' is not used correctly. Usage: {1}. This is a custom operation in this query or computation expression. + Operacja „{0}” nie jest używana poprawnie. Użycie: {1}. Jest to operacja niestandardowa w tym zapytaniu lub wyrażeniu obliczenia. + + + + {0} var in collection {1} (outerKey = innerKey). Note that parentheses are required after '{2}' + {0} zmienna in kolekcja {1} (klucz_zewnętrzny = klucz_wewnętrzny). Pamiętaj, że po „{2}” wymagane są nawiasy. + + + + {0} var in collection {1} (outerKey = innerKey) into group. Note that parentheses are required after '{2}' + {0} zmienna in kolekcja {1} (klucz_zewnętrzny = klucz_wewnętrzny) into grupa. Pamiętaj, że po „{2}” wymagane są nawiasy. + + + + {0} var in collection + {0} zmienna in kolekcja + + + + '{0}' must be followed by a variable name. Usage: {1}. + Element „{0}” musi występować przed nazwą zmiennej. Użycie: {1}. + + + + Incorrect syntax for '{0}'. Usage: {1}. + Niepoprawna składnia operatora „{0}”. Użycie: {1}. + + + + '{0}' must come after a 'for' selection clause and be followed by the rest of the query. Syntax: ... {1} ... + Element „{0}” musi występować po klauzuli wyboru „for” i przed pozostałą częścią zapytania. Składnia: ... {1} ... + + + + '{0}' is used with an incorrect number of arguments. This is a custom operation in this query or computation expression. Expected {1} argument(s), but given {2}. + Element „{0}” jest używany z niepoprawną liczbą argumentów. Jest to niestandardowa operacja w tym zapytaniu lub wyrażeniu obliczenia. Oczekiwana liczba argumentów: {1}. Rzeczywista liczba argumentów: {2}. + + + + Expected an expression after this point + Oczekiwano wyrażenia po tym punkcie + + + + Expected a type after this point + Oczekiwano typu po tym punkcie + + + + Unmatched '[<'. Expected closing '>]' + Niedopasowane znaki „[<”. Oczekiwano znaków zamykających „>]” + + + + Unexpected end of input in 'match' expression. Expected 'match <expr> with | <pat> -> <expr> | <pat> -> <expr> ...'. + Nieoczekiwane zakończenie danych wejściowych w wyrażeniu „match”. Oczekiwana wartość: „match <expr> with | <pat> -> <expr> | <pat> -> <expr> ...”. + + + + Unexpected end of input in 'try' expression. Expected 'try <expr> with <rules>' or 'try <expr> finally <expr>'. + Nieoczekiwane zakończenie danych wejściowych w wyrażeniu „try”. Oczekiwano konstrukcji „try <wyrażenie> with <reguły>” lub „try <wyrażenie> finally <wyrażenie>”. + + + + Unexpected end of input in 'while' expression. Expected 'while <expr> do <expr>'. + Nieoczekiwane zakończenie danych wejściowych w wyrażeniu „while”. Oczekiwano konstrukcji „while <wyrażenie> do <wyrażenie>”. + + + + Unexpected end of input in 'for' expression. Expected 'for <pat> in <expr> do <expr>'. + Nieoczekiwane zakończenie danych wejściowych w wyrażeniu „for”. Oczekiwana wartość: „for <pat> in <expr> do <expr>”. + + + + Unexpected end of input in 'match' or 'try' expression + Nieoczekiwane zakończenie danych wejściowych w wyrażeniu „match” lub „try” + + + + Unexpected end of input in 'then' branch of conditional expression. Expected 'if <expr> then <expr>' or 'if <expr> then <expr> else <expr>'. + Nieoczekiwane zakończenie danych wejściowych w rozgałęzieniu „then” wyrażenia warunkowego. Oczekiwano konstrukcji „if <wyrażenie> then <wyrażenie>” lub „if <wyrażenie> then <wyrażenie> else <wyrażenie>”. + + + + Unexpected end of input in 'else' branch of conditional expression. Expected 'if <expr> then <expr>' or 'if <expr> then <expr> else <expr>'. + Nieoczekiwany koniec danych wejściowych w rozgałęzieniu „else” wyrażenia warunkowego. Oczekiwano instrukcji „if <wyrażenie> then <wyrażenie>” lub „if <wyrażenie> then <wyrażenie> else <wyrażenie>”. + + + + Unexpected end of input in body of lambda expression. Expected 'fun <pat> ... <pat> -> <expr>'. + Nieoczekiwane zakończenie danych wejściowych w treści wyrażenia lambda. Oczekiwano konstrukcji „fun <wzorzec> ... <wzorzec> -> <wyrażenie>”. + + + + Unexpected end of input in type arguments + Nieoczekiwane zakończenie danych wejściowych w argumentach typu + + + + Unexpected end of input in type signature + Nieoczekiwane zakończenie danych wejściowych w sygnaturze typu + + + + Unexpected end of input in type definition + Nieoczekiwane zakończenie danych wejściowych w definicji typu + + + + Unexpected end of input in object members + Nieoczekiwane zakończenie danych wejściowych w elementach członkowskich obiektu + + + + Unexpected end of input in value, function or member definition + Nieoczekiwany koniec danych wejściowych w definicji wartości, funkcji lub elementu członkowskiego + + + + Unexpected end of input in expression + Nieoczekiwany koniec danych wejściowych w wyrażeniu + + + + Unexpected end of type. Expected a name after this point. + Nieoczekiwany koniec typu. Oczekiwano nazwy po tym punkcie. + + + + Incomplete value or function definition. If this is in an expression, the body of the expression must be indented to the same column as the 'let' keyword. + Niepełna definicja wartości lub funkcji. Jeśli jest to wyrażenie, treść wyrażenia musi być wcięta w tej samej kolumnie co słowo kluczowe „let”. + + + + Incomplete value definition. If this is in an expression, the body of the expression must be indented to the same column as the 'let!' keyword. + Niepełna definicja wartości. Jeśli jest to wyrażenie, treść wyrażenia musi być wcięta w tej samej kolumnie co słowo kluczowe „let!”. + + + + Incomplete value definition. If this is in an expression, the body of the expression must be indented to the same column as the 'use!' keyword. + Niepełna definicja wartości. Jeśli jest to wyrażenie, treść wyrażenia musi być wcięta w tej samej kolumnie co słowo kluczowe „use!”. + + + + Incomplete value definition. If this is in an expression, the body of the expression must be indented to the same column as the 'use' keyword. + Niepełna definicja wartości. Jeśli jest to wyrażenie, treść wyrażenia musi być wcięta w tej samej kolumnie co słowo kluczowe „use”. + + + + Missing 'do' in 'while' expression. Expected 'while <expr> do <expr>'. + Brak instrukcji „do” w wyrażeniu „while”. Oczekiwano konstrukcji „while <wyrażenie> do <wyrażenie>”. + + + + Missing 'do' in 'for' expression. Expected 'for <pat> in <expr> do <expr>'. + Brak instrukcji „do” w wyrażeniu „for”. Oczekiwano konstrukcji „for <wzorzec> in <wyrażenie> do <wyrażenie>”. + + + + Invalid join relation in '{0}'. Expected 'expr <op> expr', where <op> is =, =?, ?= or ?=?. + Nieprawidłowa relacja połączenia w elemencie „{0}”.Oczekiwany ciąg: „expr <op> expr”, gdzie <op> to =, =?, ?= lub ?=?. + + + + Calls + Wywołania + + + + Invalid number of generic arguments to type '{0}' in provided type. Expected '{1}' arguments, given '{2}'. + Nieprawidłowa liczba ogólnych argumentów typu „{0}” w udostępnionym typie. Oczekiwano następującej liczby argumentów: „{1}”. Podano: „{2}”. + + + + Invalid value '{0}' for unit-of-measure parameter '{1}' + Nieprawidłowa wartość „{0}” parametru „{1}” jednostki miary + + + + Invalid value unit-of-measure parameter '{0}' + Nieprawidłowa wartość parametru „{0}” jednostki miary + + + + Property '{0}' on provided type '{1}' is neither readable nor writable as it has CanRead=false and CanWrite=false + Właściwość „{0}” w udostępnionym typie „{1}” nie jest ani odczytywalna ani zapisywalna, ponieważ ma właściwości CanRead=false i CanWrite=false + + + + A use of 'into' must be followed by the remainder of the computation + Po elemencie „into” należy użyć pozostałej części obliczenia + + + + The operator '{0}' does not accept the use of 'into' + Operator „{0}” nie akceptuje elementu „into” + + + + The definition of the custom operator '{0}' does not use a valid combination of attribute flags + Definicja operatora niestandardowego „{0}” nie używa prawidłowej kombinacji flag atrybutów + + + + This type definition may not have the 'CLIMutable' attribute. Only record types may have this attribute. + Ta definicja typu może nie zawierać atrybutu „CLIMutable”. Tylko typy rekordów mogą zawierać ten atrybut. + + + + 'member val' definitions are only permitted in types with a primary constructor. Consider adding arguments to your type definition, e.g. 'type X(args) = ...'. + Definicje „member val” są dozwolone tylko w typach z podstawowym konstruktorem. Rozważ dodanie argumentów do definicji typu, na przykład „type X(args) = ...”. + + + + Property definitions may not be declared mutable. To indicate that this property can be set, use 'member val PropertyName = expr with get,set'. + Definicje właściwości nie mogą być deklarowane jako modyfikowalne. Aby wskazać, że można ustawić tę właściwość, użyj konstrukcji „member val NazwaWłaściwości = wyrażenie with get,set”. + + + + To indicate that this property can be set, use 'member val PropertyName = expr with get,set'. + Aby wskazać, że można ustawić tę właściwość, użyj konstrukcji „member val NazwaWłaściwości = wyrażenie with get,set”. + + + + Type '{0}' is illegal because in byref<T>, T cannot contain byref types. + Typ „{0}” jest niedozwolony, ponieważ w konstrukcji byref<T> typ T nie może zawierać typów byref. + + + + F# supports array ranks between 1 and 32. The value {0} is not allowed. + Język F# obsługuje rangi tablicy między 1 i 32. Wartość {0} jest niedozwolona. + + + + In queries, use the form 'for x in n .. m do ...' for ranging over integers + W zapytaniach użyj formy „for x in n .. m do ...” w celu określenia zakresu liczb całkowitych + + + + 'while' expressions may not be used in queries + Wyrażenia „while” nie mogą być używane w zapytaniach + + + + 'try/finally' expressions may not be used in queries + Wyrażenia „try/finally” nie mogą być używane w zapytaniach + + + + 'use' expressions may not be used in queries + Wyrażenia „use” nie mogą być używane w zapytaniach + + + + 'let!', 'use!' and 'do!' expressions may not be used in queries + Nie można używać wyrażeń „let!”, „use!” i „do!” w zapytaniach + + + + 'return' and 'return!' may not be used in queries + Elementy „return” i „return!” nie mogą być używane w zapytaniach + + + + This is not a known query operator. Query operators are identifiers such as 'select', 'where', 'sortBy', 'thenBy', 'groupBy', 'groupValBy', 'join', 'groupJoin', 'sumBy' and 'averageBy', defined using corresponding methods on the 'QueryBuilder' type. + To nie jest znany operator zapytania. Do operatorów zapytań należą takie identyfikatory jak „select”, „where”, „sortBy”, „thenBy”, „groupBy”, „groupValBy”, „join”, „groupJoin”, „sumBy” i „averageBy” zdefiniowane przy użyciu odpowiednich metod typu „QueryBuilder”. + + + + 'try/with' expressions may not be used in queries + Wyrażenia „try/with” nie mogą być używane w zapytaniach + + + + This 'let' definition may not be used in a query. Only simple value definitions may be used in queries. + Nie można użyć tej definicji „let” w zapytaniu. W zapytaniach mogą być używane tylko proste definicje wartości. + + + + Too many static parameters. Expected at most {0} parameters, but got {1} unnamed and {2} named parameters. + Zbyt wiele parametrów statycznych. Oczekiwano co najwyżej następującej liczby parametrów: {0}, ale uzyskano następującą liczbę parametrów nienazwanych i nazwanych: {1} i {2} . + + + + Invalid provided literal value '{0}' + Nieprawidłowa udostępniona wartość literału „{0}” + + + + The 'anycpu32bitpreferred' platform can only be used with EXE targets. You must use 'anycpu' instead. + Flaga platformy „anycpu32bitpreferred” może być używana tylko z obiektami docelowymi EXE. Należy zamiast tego użyć flagi „anycpu”. + + + + This member, function or value declaration may not be declared 'inline' + Ta deklaracja elementu członkowskiego, funkcji lub wartości nie może być zadeklarowana jako „inline” + + + + The provider '{0}' returned a non-generated type '{1}' in the context of a set of generated types. Consider adjusting the type provider to only return generated types. + Dostawca „{0}” zwrócił niegenerowany typ „{1}” w kontekście zestawu wygenerowanych typów. Rozważ dostosowanie dostawcy typów tak, aby zwracał tylko wygenerowane typy. + + + + Arguments to query operators may require parentheses, e.g. 'where (x > y)' or 'groupBy (x.Length / 10)' + Argumenty operatorów zapytania mogą wymagać nawiasów, na przykład „where (x > y)” lub „groupBy (x.Length / 10)” + + + + A quotation may not involve an assignment to or taking the address of a captured local variable + Wyrażenie cytowane nie może obejmować przypisania lub pobrania adresu przechwyconej zmiennej lokalnej + + + + + 1 overload + + 1 przeciążenie + + + + + {0} overloads + + przeciążenia ({0}) + + + + Erased to + Wymazano do postaci + + + + Unexpected token '{0}' or incomplete expression + Nieoczekiwany token „{0}” lub niepełne wyrażenie + + + + Cannot find code target for this attribute, possibly because the code after the attribute is incomplete. + Nie można znaleźć celu kodu dla tego atrybutu, ponieważ kod po atrybucie jest niekompletny. + + + + Type name cannot be empty. + Nazwa typu nie może być pusta. + + + + Problem reading assembly '{0}': {1} + Problem z odczytem zestawu „{0}”: {1} + + + + Invalid provided field. Provided fields of erased provided types must be literals. + Nieprawidłowe podane pole. Podane pola wymazanych podanych typów muszą być literałami. + + + + (loading description...) + (trwa ładowanie opisu...) + + + + (description unavailable...) + (niedostępny opis...) + + + + A type variable has been constrained by multiple different class types. A type variable may only have one class constraint. + Zmienna typu została ograniczona przez wiele różnych typów klasy. Zmienna typu może mieć tylko jedno ograniczenie klasy. + + + + 'match' expressions may not be used in queries + Wyrażenia „match” nie mogą być używane w zapytaniach + + + + Infix operator member '{0}' has {1} initial argument(s). Expected a tuple of 3 arguments + Element członkowski operatora infiksu „{0}” ma następującą liczbę argumentów początkowych: {1}. Oczekiwano krotki liczącej 3 argumenty + + + + The operator '{0}' cannot be resolved. Consider opening the module 'Microsoft.FSharp.Linq.NullableOperators'. + Nie można rozpoznać operatora „{0}”. Rozważ otwarcie modułu „Microsoft.FSharp.Linq.NullableOperators”. + + + + '{0}' must be followed by 'in'. Usage: {1}. + Po operatorze „{0}” musi występować element „in”. Użycie: {1}. + + + + Neither 'member val' nor 'override val' definitions are permitted in object expressions. + W wyrażeniach obiektu nie są dozwolone definicje „member val” ani definicje „override val”. + + + + Copy-and-update record expressions must include at least one field. + Wyrażenia rekordów kopiowania i aktualizowania muszą zawierać co najmniej jedno pole. + + + + '_' cannot be used as field name + Znak „_” nie może być używany jako nazwa pola + + + + The provided types generated by this use of a type provider may not be used from other F# assemblies and should be marked internal or private. Consider using 'type internal TypeName = ...' or 'type private TypeName = ...'. + Podane typy wygenerowane w ramach tego użycia dostawcy typów nie mogą być używane z innych zestawów języka F# i powinny być oznaczone jako wewnętrzne lub prywatne. Rozważ użycie ciągu „type internal TypeName = ...” lub „type private TypeName = ...”. + + + + A property's getter and setter must have the same type. Property '{0}' has getter of type '{1}' but setter of type '{2}'. + Metoda pobierająca i metoda ustawiająca właściwość muszą mieć taki sam typ. Właściwość „{0}” ma metodę pobierającą typu „{1}”, a metodę ustawiającą typu „{2}”. + + + + Array method '{0}' is supplied by the runtime and cannot be directly used in code. For operations with array elements consider using family of GetArray/SetArray functions from LanguagePrimitives.IntrinsicFunctions module. + Metoda tablicy „{0}” jest dostarczana przez środowisko uruchomieniowe i nie może być używane bezpośrednio w kodzie. W przypadku operacji z elementami tablic rozważ użycie rodziny funkcji GetArray/SetArray z modułu LanguagePrimitives.IntrinsicFunctions. + + + + The union case '{0}' does not have a field named '{1}'. + Przypadek unii/wyjątek „{0}” nie ma pola o nazwie „{1}”. + + + + Union case/exception field '{0}' cannot be used more than once. + Pole przypadku unii/wyjątku „{0}” nie może zostać użyte więcej niż raz. + + + + Named field '{0}' is used more than once. + Nazwane pole „{0}” jest używane więcej niż raz. + + + + Named field '{0}' conflicts with autogenerated name for anonymous field. + Nazwane pole „{0}” powoduje konflikt z automatycznie generowaną nazwą pola anonimowego. + + + + This literal expression or attribute argument results in an arithmetic overflow. + Wynikiem tego wyrażenia literału lub argumentu atrybutu jest przepełnienie arytmetyczne. + + + + This is not valid literal expression. The [<Literal>] attribute will be ignored. + To nie jest prawidłowe wyrażenie literału. Atrybut [<Literal>] zostanie zignorowany. + + + + System.Runtime.InteropServices assembly is required to use UnknownWrapper\DispatchWrapper classes. + Do korzystania z klas UnknownWrapper\DispatchWrapper jest wymagany zestaw System.Runtime.InteropServices. + + + + The mutable local '{0}' is implicitly allocated as a reference cell because it has been captured by a closure. This warning is for informational purposes only to indicate where implicit allocations are performed. + Modyfikowalna wartość lokalna „{0}” jest niejawnie przydzielona jako komórka odwołania, ponieważ została przechwycona przez zamknięcie. To ostrzeżenie informuje tylko o miejscach, w których są wykonane niejawne operacje przydzielania. + + + + A type provider implemented GetStaticParametersForMethod, but ApplyStaticArgumentsForMethod was not implemented or invalid + Dostawca typów zaimplementował funkcję GetStaticParametersForMethod, lecz funkcja ApplyStaticArgumentsForMethod nie jest zaimplementowana lub jest nieprawidłowa + + + + An error occured applying the static arguments to a provided method + Wystąpił błąd podczas stosowania argumentów statycznych dla podanej metody + + + + Unexpected character '{0}' in preprocessor expression + Nieoczekiwany znak „{0}” w wyrażeniu preprocesora + + + + Unexpected token '{0}' in preprocessor expression + Nieoczekiwany token „{0}” w wyrażeniu preprocesora + + + + Incomplete preprocessor expression + Niepełne wyrażenie preprocesora + + + + Missing token '{0}' in preprocessor expression + Brak tokenu „{0}” w wyrażeniu preprocesora + + + + An error occurred while reading the F# metadata node at position {0} in table '{1}' of assembly '{2}'. The node had no matching declaration. Please report this warning. You may need to recompile the F# assembly you are using. + Wystąpił błąd podczas odczytu węzła metadanych F# w pozycji {0} tabeli „{1}” zestawu „{2}”. Węzeł nie ma pasującej deklaracji. Zgłoś wystąpienie tego ostrzeżenia. Może być konieczne ponowne skompilowanie używanego zestawu F#. + + + + Type inference caused the type variable {0} to escape its scope. Consider adding an explicit type parameter declaration or adjusting your code to be less generic. + Wnioskowanie typu spowodowało wyjście zmiennej {0} poza jej zakres. Rozważ dodanie jawnej deklaracji parametru typu lub skorygowanie kodu tak, aby był mniej ogólny. + + + + Type inference caused an inference type variable to escape its scope. Consider adding type annotations to make your code less generic. + Wnioskowanie typu spowodowało wyjście zmiennej typu wnioskowania poza jej zakres. Rozważ dodanie adnotacji typu w celu uczynienia kodu mniej ogólnym. + + + + Redundant arguments are being ignored in function '{0}'. Expected {1} but got {2} arguments. + Nadmiarowe argumenty są ignorowane w funkcji „{0}”. Oczekiwana liczba argumentów: {1}, rzeczywista liczba argumentów: {2}. + + + + Lowercase literal '{0}' is being shadowed by a new pattern with the same name. Only uppercase and module-prefixed literals can be used as named patterns. + Literał pisany małymi literami „{0}” jest zasłaniany przez nowy wzorzec o tej samej nazwie. Tylko literały pisane wielkimi literami i literały z prefiksem modułu mogą być używane jako wzorce nazwane. + + + + This literal pattern does not take arguments + Ten wzorzec literału nie przyjmuje argumentów + + + + Constructors are not permitted as extension members - they must be defined as part of the original definition of the type + Używanie konstruktorów jako elementów członkowskich rozszerzenia jest niedozwolone — należy je zdefiniować w ramach oryginalnej definicji typu + + + + Invalid response file '{0}' ( '{1}' ) + Nieprawidłowy plik odpowiedzi „{0}” („{1}”) + + + + Response file '{0}' not found in '{1}' + Nie można znaleźć pliku odpowiedzi „{0}” w lokalizacji „{1}” + + + + Response file name '{0}' is empty, contains invalid characters, has a drive specification without an absolute path, or is too long + Nazwa pliku odpowiedzi „{0}” jest pusta, zawiera nieprawidłowe znaki, ma oznaczenie dysku bez ścieżki bezwzględnej lub jest zbyt długa + + + + Cannot find FSharp.Core.dll in compiler's directory + Nie można znaleźć pliku FSharp.Core.dll w katalogu kompilatora + + + + One tuple type is a struct tuple, the other is a reference tuple + Jednym typem krotki jest krotka struktury, innym — krotka odwołania + + + + This provided method requires static parameters + Ta udostępniona metoda wymaga parametrów statycznych + + + + The conversion from {0} to {1} is a compile-time safe upcast, not a downcast. Consider using 'upcast' instead of 'downcast'. + Konwersja z {0} do {1} jest przypisaniem elementu nadrzędnego bezpiecznym w czasie kompilacji, a nie przypisaniem elementu podrzędnego. Rozważ użycie słowa kluczowego „upcast” zamiast „downcast”. + + + + The conversion from {0} to {1} is a compile-time safe upcast, not a downcast. Consider using the :> (upcast) operator instead of the :?> (downcast) operator. + Konwersja z {0} do {1} jest przypisaniem elementu nadrzędnego bezpiecznym w czasie kompilacji, a nie przypisaniem elementu podrzędnego. Rozważ użycie operatora :> (przypisanie elementu nadrzędnego) zamiast :?> (przypisanie elementu podrzędnego). + + + + The 'rec' on this module is implied by an outer 'rec' declaration and is being ignored + Deklaracja „rec” tego modułu jest określona niejawnie przez zewnętrzną deklarację „rec” i zostanie zignorowana + + + + In a recursive declaration group, 'open' declarations must come first in each module + W cyklicznej grupie deklaracji deklaracje „open” muszą występować jako pierwsze w każdym module + + + + In a recursive declaration group, module abbreviations must come after all 'open' declarations and before other declarations + W cyklicznej grupie deklaracji skróty modułu muszą następować po wszystkich deklaracjach „open” i przed innymi deklaracjami + + + + This declaration is not supported in recursive declaration groups + Ta deklaracja nie jest obsługiwana w cyklicznych grupach deklaracji + + + + Invalid use of 'rec' keyword + Nieprawidłowe użycie słowa kluczowego „rec” + + + + If a union type has more than one case and is a struct, then all fields within the union type must be given unique names. + Jeśli typ unii ma więcej niż jeden przypadek i jest strukturą, wszystkim polom w typie unii należy nadać unikatowe nazwy. + + + + The CallerMemberNameAttribute applied to parameter '{0}' will have no effect. It is overridden by the CallerFilePathAttribute. + Zastosowanie elementu CallerMemberNameAttribute do parametru „{0}” nie odniesie żadnego skutku. Jest on przesłonięty przez element CallerFilePathAttribute. + + + + Invalid use of 'fixed'. 'fixed' may only be used in a declaration of the form 'use x = fixed expr' where the expression is an array, the address of a field, the address of an array element or a string' + Nieprawidłowe użycie wyrażenia „fixed”. Wyrażenia „fixed” można użyć tylko w deklaracji w postaci „use x = fixed expr”, gdzie wyrażenie jest tablicą, adresem pola, adresem elementu tablicy lub ciągiem + + + + Could not find method System.Runtime.CompilerServices.OffsetToStringData in references when building 'fixed' expression. + Nie można odnaleźć metody System.Runtime.CompilerServices.OffsetToStringData w odwołaniach podczas kompilowania wyrażenia „fixed”. + + + + {0} is an active pattern and cannot be treated as a discriminated union case with named fields. + {0} jest wzorcem aktywnym i nie można go traktować jako przypadku unii rozłącznej z nazwanymi polami. + + + + The default value does not have the same type as the argument. The DefaultParameterValue attribute and any Optional attribute will be ignored. Note: 'null' needs to be annotated with the correct type, e.g. 'DefaultParameterValue(null:obj)'. + Wartość domyślna nie ma takiego samego typu jak argument. Atrybut DefaultParameterValue i wszelkie atrybuty Optional zostaną zignorowane. Uwaga: dla wartości „null” należy użyć adnotacji z poprawnym typem, np. „DefaultParameterValue(null:obj)”. + + + + The system type '{0}' was required but no referenced system DLL contained this type + Typ systemowy „{0}” był wymagany, ale żadna z przywoływanych systemowych bibliotek DLL nie zawierała tego typu + + + + The member '{0}' matches multiple overloads of the same method.\nPlease restrict it to one of the following:{1}. + Element członkowski „{0}” pasuje do wielu przeciążeń tej samej metody.\nOgranicz go do jednej z następujących opcji: {1}. + + + + Method or object constructor '{0}' is not static + Metoda nie jest statyczna lub konstruktor obiektu „{0}” nie jest statyczny + + + + Unexpected symbol '=' in expression. Did you intend to use 'for x in y .. z do' instead? + Nieoczekiwany symbol „=” w wyrażeniu. Czy w zamian planowano użycie instrukcji „for x in y .. z do”? + + + + Indicates a method that either has no implementation in the type in which it is declared or that is virtual and has a default implementation. + Wskazuje metodę, która nie ma implementacji w typie, w którym została zadeklarowana, lub jest wirtualna i ma implementację domyślną. + + + + Used in mutually recursive bindings, in property declarations, and with multiple constraints on generic parameters. + Używane w powiązaniach wzajemnie cyklicznych, deklaracjach właściwości oraz z wieloma ograniczeniami parametrów ogólnych. + + + + Used to give the current class object an object name. Also used to give a name to a whole pattern within a pattern match. + Używane do nadawania nazwy bieżącemu obiektowi klasy oraz do nadawania nazwy całemu wzorcowi w obrębie dopasowania wzorca. + + + + Used to verify code during debugging. + Używane do weryfikowania kodu podczas debugowania. + + + + Used as the name of the base class object. + Używane jako nazwa obiektu klasy podstawowej. + + + + In verbose syntax, indicates the start of a code block. + W składni pełnej wskazuje początek bloku kodu. + + + + In verbose syntax, indicates the start of a class definition. + W składni pełnej wskazuje początek definicji klasy. + + + + Indicates an implementation of an abstract method; used together with an abstract method declaration to create a virtual method. + Wskazuje implementację metody abstrakcyjnej; używane razem z deklaracją metody abstrakcyjnej do tworzenia metody wirtualnej. + + + + Used to declare a delegate. + Używane do deklarowania delegata. + + + + Used in looping constructs or to execute imperative code. + Używane w konstrukcjach zapętlenia lub do wykonywania kodu imperatywnego. + + + + In verbose syntax, indicates the end of a block of code in a looping expression. + W składni pełnej wskazuje koniec bloku kodu w wyrażeniu zapętlenia. + + + + Used to convert to a type that is lower in the inheritance chain. + Używane do konwertowania na typ znajdujący się niżej w łańcuchu dziedziczenia. + + + + In a for expression, used when counting in reverse. + W wyrażeniu for używane podczas liczenia w kolejności odwrotnej. + + + + Used in conditional branching. A short form of else if. + Używane w rozgałęzianiu warunkowym. Krótka postać instrukcji else if. + + + + Used in conditional branching. + Używane w rozgałęzianiu warunkowym. + + + + In type definitions and type extensions, indicates the end of a section of member definitions. In verbose syntax, used to specify the end of a code block that starts with the begin keyword. + W definicjach typu i rozszerzeniach typu wskazuje koniec sekcji definicji elementów członkowskich. W składni pełnej używane do określania końca bloku kodu rozpoczynającego się słowem kluczowym begin. + + + + Used to declare an exception type. + Używane do deklarowania typu wyjątku. + + + + Indicates that a declared program element is defined in another binary or assembly. + Wskazuje, że zadeklarowany element programu został zdefiniowany w innym pliku binarnym lub zestawie. + + + + Used as a Boolean literal. + Używane jako literał wartości logicznej. + + + + Used together with try to introduce a block of code that executes regardless of whether an exception occurs. + Używane razem ze słowem kluczowym try do wprowadzania bloku kodu, który jest wykonywany bez względu na to, czy wystąpi wyjątek. + + + + Used in looping constructs. + Używane w konstrukcjach zapętlenia. + + + + Used in lambda expressions, also known as anonymous functions. + Używane w wyrażeniach lambda, znane również jako funkcje anonimowe. + + + + Used as a shorter alternative to the fun keyword and a match expression in a lambda expression that has pattern matching on a single argument. + Używane jako krótsza alternatywa słowa kluczowego fun i wyrażenie dopasowania w wyrażeniu lambda, które ma wzorzec pasujący do pojedynczego argumentu. + + + + Used to reference the top-level .NET namespace. + Używane do tworzenia odwołania do przestrzeni nazw najwyższego poziomu w technologii .NET. + + + + Used in conditional branching constructs. + Używane w konstrukcjach rozgałęziania warunkowego. + + + + Used for sequence expressions and, in verbose syntax, to separate expressions from bindings. + Używane na potrzeby wyrażeń sekwencji oraz — w składni pełnej — do oddzielania wyrażeń od powiązań. + + + + Used to specify a base class or base interface. + Używane do określania klasy podstawowej lub interfejsu podstawowego. + + + + Used to indicate a function that should be integrated directly into the caller's code. + Używane do wskazywania funkcji, która powinna zostać zintegrowana bezpośrednio z kodem funkcji wywołującej. + + + + Used to declare and implement interfaces. + Używane do deklarowania i implementowania interfejsów. + + + + Used to specify that a member is visible inside an assembly but not outside it. + Używane do wskazywania, że element członkowski jest widoczny wewnątrz zestawu, ale nie poza nim. + + + + Used to specify a computation that is to be performed only when a result is needed. + Używane do określania obliczenia, które ma być wykonywane tylko, jeśli potrzebny jest wynik. + + + + Used to associate, or bind, a name to a value or function. + Używane do kojarzenia lub powiązywania nazwy z wartością lub funkcją. + + + + Used in computation expressions to bind a name to the result of another computation expression. + Używane w asynchronicznych przepływach pracy do powiązywania nazwy z wynikiem obliczenia asynchronicznego lub w innych wyrażeniach obliczenia do powiązywania nazwy z wynikiem, którego typ to obliczenie. + + + + Used to branch by comparing a value to a pattern. + Używane do rozgałęziania przez porównanie wartości z wzorcem. + + + + Used to declare a property or method in an object type. + Używane do deklarowania właściwości lub metody w typie obiektu. + + + + Used to associate a name with a group of related types, values, and functions, to logically separate it from other code. + Używane do kojarzenia nazwy z grupą powiązanych typów, wartości i funkcji w celu jej logicznego oddzielenia od innego kodu. + + + + Used to declare a variable, that is, a value that can be changed. + Używane do deklarowania zmiennej, czyli wartości, która może się zmienić. + + + + Used to associate a name with a group of related types and modules, to logically separate it from other code. + Używane do kojarzenia nazwy z grupą powiązanych typów i modułów w celu jej logicznego oddzielenia od innego kodu. + + + + Used to declare, define, or invoke a constructor that creates or that can create an object. Also used in generic parameter constraints to indicate that a type must have a certain constructor. + Używane do deklarowania, definiowania lub wywoływania konstruktora, który tworzy lub może utworzyć obiekt. Używane również w ograniczeniach parametrów ogólnych do wskazywania, że typ musi mieć określonego konstruktora. + + + + Not actually a keyword. However, not struct in combination is used as a generic parameter constraint. + To nie jest naprawdę słowo kluczowe. Struktura not w kombinacji jest jednak używana w ograniczeniach parametrów ogólnych. + + + + Indicates the absence of an object. Also used in generic parameter constraints. + Wskazuje brak obiektu. Używane również w ograniczeniach parametrów ogólnych. + + + + Used in discriminated unions to indicate the type of categories of values, and in delegate and exception declarations. + Używane w uniach rozłącznych do wskazywania typów kategorii wartości oraz w deklaracjach delegowania i wyjątków. + + + + Used to make the contents of a namespace or module available without qualification. + Używane do udostępniania zawartości przestrzeni nazw lub modułu bez kwalifikacji. + + + + Used with Boolean conditions as a Boolean or operator. Equivalent to ||. Also used in member constraints. + Używane z warunkami wartości logicznej jako wartość logiczna lub operator. Odpowiednik symbolu ||. Używane również w ograniczeniach elementu członkowskiego. + + + + Used to implement a version of an abstract or virtual method that differs from the base version. + Używane do implementowania wersji metody abstrakcyjnej lub wirtualnej, która różni się od wersji podstawowej. + + + + Restricts access to a member to code in the same type or module. + Ogranicza dostęp do elementu członkowskiego kodu w tym samym typie lub module. + + + + Allows access to a member from outside the type. + Umożliwia dostęp do elementu członkowskiego spoza typu. + + + + Used to indicate that a function is recursive. + Używane do wskazywania, że funkcja jest cykliczna. + + + + Used to provide a value for the result of the containing computation expression. + Używane do wskazywania wartości do podania jako wyniku wyrażenia obliczenia. + + + + Used to provide a value for the result of the containing computation expression, where that value itself comes from the result another computation expression. + Używane do wskazywania wyrażenia obliczenia, które po obliczeniu udostępnia wynik zawartego wyrażenia obliczenia. + + + + Used in query expressions to specify what fields or columns to extract. Note that this is a contextual keyword, which means that it is not actually a reserved word and it only acts like a keyword in appropriate context. + Używane w wyrażeniach zapytania do określania, które pola lub kolumny będą wyodrębniane. Należy pamiętać, że jest to kontekstowe słowo kluczowe, co oznacza, że nie jest to naprawdę słowo zastrzeżone i działa jako słowo kluczowe tylko w odpowiednim kontekście. + + + + Used to indicate a method or property that can be called without an instance of a type, or a value member that is shared among all instances of a type. + Używane do wskazywania metody lub właściwości, którą można wywołać bez wystąpienia typu, lub elementu członkowskiego wartości, który jest udostępniany wszystkich wystąpieniom typu. + + + + Used to declare a structure type. Also used in generic parameter constraints. Used for OCaml compatibility in module definitions. + Używane do deklarowania typu struktury, w ograniczeniach parametrów ogólnych oraz na potrzeby zgodności OCami w definicjach modułu. + + + + Used in conditional expressions. Also used to perform side effects after object construction. + Używane w wyrażeniach warunkowych oraz do wykonywania efektów ubocznych po skonstruowaniu obiektu. + + + + Used in for loops to indicate a range. + Używane w pętlach do wskazywania zakresu. + + + + Used to introduce a block of code that might generate an exception. Used together with with or finally. + Używane do wprowadzania bloku kodu, który może generować wyjątek. Używane razem ze słowem kluczowym with lub finally. + + + + Used to declare a class, record, structure, discriminated union, enumeration type, unit of measure, or type abbreviation. + Używane do deklarowania klasy, rekordu, struktury, unii rozłącznej, typu wyliczeniowego, jednostki miary lub skrótu typu. + + + + Used to convert to a type that is higher in the inheritance chain. + Używane do konwertowania na typ znajdujący się wyżej w łańcuchu dziedziczenia. + + + + Used instead of let for values that implement IDisposable" + Używane zamiast instrukcji let na potrzeby wartości, które wymagają wywołania operacji Dispose w celu zwolnienia zasobów. + + + + Used instead of let! in computation expressions for computation expression results that implement IDisposable. + Używane zamiast instrukcji let! w asynchronicznych przepływach pracy i innych wyrażeniach obliczenia na potrzeby wartości, które wymagają wywołania operacji Dispose w celu zwolnienia zasobów. + + + + Used in a signature to indicate a value, or in a type to declare a member, in limited situations. + Używane w podpisie do wskazywania wartości lub w typie do deklarowania elementu członkowskiego w pewnych określonych sytuacjach. + + + + Indicates the .NET void type. Used when interoperating with other .NET languages. + Wskazuje typ void technologii .NET. Używane w przypadku współdziałania z innymi językami .NET. + + + + Used for Boolean conditions (when guards) on pattern matches and to introduce a constraint clause for a generic type parameter. + Używane na potrzeby warunków wartości logicznych (strażników when) w dopasowaniach wzorca oraz w celu wprowadzenia klauzuli ograniczenia dla parametru typu ogólnego. + + + + Introduces a looping construct. + Wprowadza konstrukcję zapętlenia. + + + + Used together with the match keyword in pattern matching expressions. Also used in object expressions, record copying expressions, and type extensions to introduce member definitions, and to introduce exception handlers. + Używane razem ze słowem kluczowym match w wyrażeniach dopasowania wzorca. Używane również w wyrażeniach obiektu, wyrażeniach kopiowania rekordu oraz wyrażeniach typu do wprowadzania definicji elementów członkowskich i obsługi wyjątków. + + + + Used in a sequence expression to produce a value for a sequence. + Używane w wyrażeniu sekwencji do tworzenia wartości sekwencji. + + + + Used in a computation expression to append the result of a given computation expression to a collection of results for the containing computation expression. + Używane w wyrażeniach obliczenia do dołączania wyniku danego wyrażenia obliczenia do kolekcji wyników dla zawartego wyrażenia obliczenia. + + + + In function types, delimits arguments and return values. Yields an expression (in sequence expressions); equivalent to the yield keyword. Used in match expressions + W typach funkcji ogranicza argumenty i wartości zwracane. Implikuje wyrażenie (w wyrażeniach sekwencji); odpowiednik słowa kluczowego yield. Używane w wyrażeniach dopasowania + + + + Assigns a value to a variable. + Przydziela wartość do zmiennej. + + + + Converts a type to type that is higher in the hierarchy. + Konwertuje typ na typ znajdujący się wyżej w hierarchii. + + + + Converts a type to a type that is lower in the hierarchy. + Konwertuje typ na typ znajdujący się niżej w hierarchii. + + + + Delimits a typed code quotation. + Ogranicza typizowany cytat kodu. + + + + Delimits a untyped code quotation. + Ogranicza nietypizowany cytat kodu. + + + + {0} '{1}' not found in assembly '{2}'. A possible cause may be a version incompatibility. You may need to explicitly reference the correct version of this assembly to allow all referenced components to use the correct version. + Nie znaleziono elementu {0} „{1}” w zestawie „{2}”. Możliwa przyczyna to niezgodność wersji. Być może trzeba jawnie odwołać się do prawidłowej wersji tego zestawu, aby zezwolić wszystkim przywoływanym składnikom na użycie prawidłowej wersji. + + + + {0} '{1}' not found in type '{2}' from assembly '{3}'. A possible cause may be a version incompatibility. You may need to explicitly reference the correct version of this assembly to allow all referenced components to use the correct version. + Nie znaleziono elementu {0} „{1}” w typie „{2}” z zestawu „{3}”. Możliwa przyczyna to niezgodność wersji. Być może trzeba jawnie odwołać się do prawidłowej wersji tego zestawu, aby zezwolić wszystkim przywoływanym składnikom na użycie prawidłowej wersji. + + + + is + jest + + + + This value is not a function and cannot be applied. + Ta wartość nie jest funkcją i nie można jej zastosować. + + + + This value is not a function and cannot be applied. Did you intend to access the indexer via {0}.[index] instead? + Ta wartość nie jest funkcją i nie można jej zastosować. Czy zamiast tego zamierzano uzyskać dostęp do indeksatora przy użyciu formatu {0}.[indeks]? + + + + This expression is not a function and cannot be applied. Did you intend to access the indexer via expr.[index] instead? + To wyrażenie nie jest funkcją i nie można go zastosować. Czy zamiast tego zamierzano uzyskać dostęp do indeksatora przy użyciu formatu wyrażenie.[indeks]? + + + + This value is not a function and cannot be applied. Did you forget to terminate a declaration? + Ta wartość nie jest funkcją i nie można jej zastosować. Czy deklaracja została zakończona? + + + + The argument names in the signature '{0}' and implementation '{1}' do not match. The argument name from the signature file will be used. This may cause problems when debugging or profiling. + Nazwy argumentów w podpisie „{0}” i implementacji „{1}” nie są zgodne. Używana będzie nazwa argumentu z pliku podpisu. Może to spowodować problemy podczas debugowania lub profilowania. + + + + An error occurred while reading the F# metadata of assembly '{0}'. A reserved construct was utilized. You may need to upgrade your F# compiler or use an earlier version of the assembly that doesn't make use of a specific construct. + Wystąpił błąd podczas odczytu metadanych języka F# z zestawu „{0}”. Została wykorzystana zarezerwowana konstrukcja. Może być konieczne uaktualnienie kompilatora języka F# lub użycie wcześniejszej wersji zestawu, która nie wykorzystuje określonej konstrukcji. + + + + This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. + Ta metoda lub właściwość nie jest zwykle używana z kodu języka F#. Zamiast tego do dekonstrukcji użyj jawnego wzorca krotki. + + + + This expression returns a value of type '{0}' but is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to use the expression as a value in the sequence then use an explicit 'yield'. + To wyrażenie zwraca wartość typu „{0}”, ale jest niejawnie odrzucane. Rozważ użycie instrukcji „let” do powiązania wyniku z nazwą, np. „let wynik = wyrażenie”. Jeśli chcesz użyć tego wyrażenia jako wartości w sekwencji, użyj jawnej instrukcji „yield”. + + + + This expression returns a value of type '{0}' but is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to use the expression as a value in the sequence then use an explicit 'yield!'. + To wyrażenie zwraca wartość typu „{0}”, ale jest niejawnie odrzucane. Rozważ użycie instrukcji „let” do powiązania wyniku z nazwą, np. „let wynik = wyrażenie”. Jeśli chcesz użyć tego wyrażenia jako wartości w sekwencji, użyj jawnej instrukcji „yield!”. + + + + Used in computation expressions to pattern match directly over the result of another computation expression. + Używane w wyrażeniach obliczenia do dopasowania do wzorca bezpośrednio w wyniku innego wyrażenia obliczenia. + + + + The file '{0}' changed on disk unexpectedly, please reload. + Plik „{0}” nieoczekiwanie uległ zmianie na dysku. Załaduj go ponownie. + + + + The byref pointer is readonly, so this write is not permitted. + Wskaźnik byref jest tylko do odczytu, więc ten zapis nie jest dozwolony. + + + + A value must be mutable in order to mutate the contents or take the address of a value type, e.g. 'let mutable x = ...' + Aby można było zmodyfikować zawartość lub pobrać adres typu wartości, wartość musi być modyfikowalna, na przykład „let mutable x = ...” + + + + A ReadOnly attribute has been applied to a struct type with a mutable field. + Atrybut ReadOnly został zastosowany do typu struktury z polem modyfikowalnym. + + + + A byref pointer returned by a function or method is implicitly dereferenced as of F# 4.5. To acquire the return value as a pointer, use the address-of operator, e.g. '&f(x)' or '&obj.Method(arg1, arg2)'. + Wskaźnik byref zwracany przez funkcję lub metodę jest niejawnie wyłuskiwany, począwszy od wersji 4.5 języka F#. Aby pobrać wartość zwracaną jako wskaźnik, użyj operatora address-of, np. „&f(x)” lub „&obj.Method(arg1, arg2)”. + + + + A type annotated with IsByRefLike must also be a struct. Consider adding the [<Struct>] attribute to the type. + Typ z adnotacją IsByRefLike musi również być strukturą. Rozważ dodanie atrybutu [<Struct>] do tego typu. + + + + The address of the variable '{0}' or a related expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + W tym miejscu nie można użyć adresu zmiennej „{0}” ani powiązanego wyrażenia. Ma to na celu uniemożliwienie adresowi wartości lokalnej wykroczenia poza zakres. + + + + This value can't be assigned because the target '{0}' may refer to non-stack-local memory, while the expression being assigned is assessed to potentially refer to stack-local memory. This is to help prevent pointers to stack-bound memory escaping their scope. + Ta wartość nie może zostać przypisana, ponieważ element docelowy „{0}” może odwoływać się do pamięci innej niż pamięć lokalna dla stosu, natomiast przypisywane wyrażenie może potencjalnie odwoływać się do pamięci lokalnej dla stosu. Dzięki temu łatwiej uniemożliwić wskaźnikom do pamięci powiązanej ze stosem wykroczenie poza ich zakres. + + + + A value defined in a module must be mutable in order to take its address, e.g. 'let mutable x = ...' + Wartość zdefiniowana w module musi być modyfikowalna w celu uzyskania jej adresu, np. „let mutable x = ...” + + + + A type annotated with IsReadOnly must also be a struct. Consider adding the [<Struct>] attribute to the type. + Typ z adnotacją IsReadOnly musi również być strukturą. Rozważ dodanie atrybutu [<Struct>] do tego typu. + + + + Struct members cannot return the address of fields of the struct by reference + Składowe struktury nie mogą zwracać adresów pól struktury przez odwołanie + + + + The function or method call cannot be used at this point, because one argument that is a byref of a non-stack-local Span or IsByRefLike type is used with another argument that is a stack-local Span or IsByRefLike type. This is to ensure the address of the local value does not escape its scope. + W tym miejscu nie można użyć wywołania funkcji lub metody, ponieważ jeden argument, który jest elementem byref typu Span lub IsByRefLike innego niż lokalnego dla stosu, został użyty z innym argumentem, który jest typem Span lub IsByRefLike lokalnym dla stosu. Ma to na celu zapewnienie, że adres wartości lokalnej nie wykracza poza swój zakres. + + + + The address of a value returned from the expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + W tym miejscu nie można użyć adresu wartości zwróconej z wyrażenia. Ma to na celu uniemożliwienie adresowi wartości lokalnej wykroczenia poza zakres. + + + + The Span or IsByRefLike variable '{0}' cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + W tym miejscu nie można użyć zmiennej Span lub IsByRefLike „{0}”. Ma to na celu uniemożliwienie adresowi wartości lokalnej wykroczenia poza zakres. + + + + A Span or IsByRefLike value returned from the expression cannot be used at ths point. This is to ensure the address of the local value does not escape its scope. + W tym miejscu nie można użyć wartości Span lub IsByRefLike zwróconej z wyrażenia. Ma to na celu uniemożliwienie adresowi wartości lokalnej wykroczenia poza zakres. + + + + Cannot take the address of the value returned from the expression. Assign the returned value to a let-bound value before taking the address. + Nie można uzyskać adresu wartości zwróconej przez wyrażenie. Przypisz zwróconą wartość do wartości powiązanej za pomocą instrukcji let przed uzyskaniem adresu. + + + + The Span or IsByRefLike expression cannot be returned from this function or method, because it is composed using elements that may escape their scope. + The Span or IsByRefLike expression cannot be returned from this function or method, because it is composed using elements that may escape their scope. + + + + This type does not inherit Attribute, it will not work correctly with other .NET languages. + This type does not inherit Attribute, it will not work correctly with other .NET languages. + + + + The exception '{0}' does not have a field named '{1}'. + The exception '{0}' does not have a field named '{1}'. + + + + The constructor does not have a field named '{0}'. + The constructor does not have a field named '{0}'. + + + + Active patterns do not have fields. This syntax is invalid. + Active patterns do not have fields. This syntax is invalid. + + + + + \ No newline at end of file diff --git a/src/fsharp/xlf/FSComp.txt.pt-BR.xlf b/src/fsharp/xlf/FSComp.txt.pt-BR.xlf new file mode 100644 index 00000000000..b81572e3a73 --- /dev/null +++ b/src/fsharp/xlf/FSComp.txt.pt-BR.xlf @@ -0,0 +1,7087 @@ + + + + + + The namespace '{0}' is not defined. + O namespace '{0}' não está definido. + + + + The namespace or module '{0}' is not defined. + O namespace ou o módulo '{0}' não está definido. + + + + The field, constructor or member '{0}' is not defined. + O campo, o construtor ou o membro '{0}' não está definido. + + + + The value, constructor, namespace or type '{0}' is not defined. + O valor, o construtor, o namespace ou o tipo '{0}' não está definido. + + + + The value or constructor '{0}' is not defined. + O valor ou o construtor '{0}' não está definido. + + + + The value, namespace, type or module '{0}' is not defined. + O valor, o namespace, o tipo ou o módulo '{0}' não está definido. + + + + The constructor, module or namespace '{0}' is not defined. + O construtor, o módulo ou o namespace '{0}' não está definido. + + + + The type '{0}' is not defined. + O tipo '{0}' não está definido. + + + + The type '{0}' is not defined in '{1}'. + O tipo '{0}' não está definido em '{1}'. + + + + The record label or namespace '{0}' is not defined. + O rótulo de registro ou o namespace '{0}' não está definido. + + + + The record label '{0}' is not defined. + O rótulo do registro '{0}' não está definido. + + + + Maybe you want one of the following: + Talvez você queira um dos seguintes: + + + + The type parameter {0} is not defined. + O parâmetro de tipo '{0}' não está definido. + + + + The pattern discriminator '{0}' is not defined. + O discriminador de padrão '{0}' não está definido. + + + + Replace with '{0}' + Substituir por '{0}' + + + + Add . for indexer access. + Adicione um . para obter acesso ao indexador. + + + + All elements of a list must be of the same type as the first element, which here is '{0}'. This element has type '{1}'. + Todos os elementos de uma expressão do construtor de lista devem ter o mesmo tipo. Essa expressão deveria ter o tipo '{0}', mas aqui tem o tipo '{1}'. + + + + All elements of an array must be of the same type as the first element, which here is '{0}'. This element has type '{1}'. + Todos os elementos de uma expressão do construtor de matriz devem ter o mesmo tipo. Essa expressão deveria ter o tipo '{0}', mas aqui tem o tipo '{1}'. + + + + This 'if' expression is missing an 'else' branch. Because 'if' is an expression, and not a statement, add an 'else' branch which also returns a value of type '{0}'. + A expressão 'if' está sem uma ramificação 'else'. A ramificação 'then' tem tipo '{0}'. Como 'if' é uma expressão e não uma instrução, adicione uma ramificação 'else' que retorna um valor do mesmo tipo. + + + + The 'if' expression needs to have type '{0}' to satisfy context type requirements. It currently has type '{1}'. + A expressão 'if' precisa ter o tipo '{0}' para atender aos requisitos do tipo de contexto. No momento, ela tem o tipo '{1}'. + + + + All branches of an 'if' expression must return values of the same type as the first branch, which here is '{0}'. This branch returns a value of type '{1}'. + Todas as ramificações de uma expressão 'if' devem ter o mesmo tipo. Essa expressão deveria ter o tipo '{0}', mas aqui tem o tipo '{1}'. + + + + All branches of a pattern match expression must return values of the same type as the first branch, which here is '{0}'. This branch returns a value of type '{1}'. + Todos os branches de uma expressão correspondente ao padrão precisam retornar valores do mesmo tipo. O primeiro branch retornou um valor do tipo '{0}', mas este branch retornou um valor do tipo '{1}'. + + + + A pattern match guard must be of type 'bool', but this 'when' expression is of type '{0}'. + A proteção da correspondência de padrão deve ser do tipo 'bool', mas esta expressão 'when' é do tipo '{0}'. + + + + A ';' is used to separate field values in records. Consider replacing ',' with ';'. + Um ';' é usado para separar os valores de campo nos registros. Considere substituir ',' por ';'. + + + + The '!' operator is used to dereference a ref cell. Consider using 'not expr' here. + O operador '!' é usado para desreferenciar uma célula de referência. Considere usar 'not expr' aqui. + + + + The non-generic type '{0}' does not expect any type arguments, but here is given {1} type argument(s) + O tipo não genérico '{0}' não espera nenhum argumento de tipo, mas aqui são dados argumentos do tipo {1} + + + + Consider using 'return!' instead of 'return'. + Considere usar 'return!' em vez de 'return'. + + + + Consider using 'yield!' instead of 'yield'. + Considere usar 'yield!' em vez de 'yield'. + + + + \nA tuple type is required for one or more arguments. Consider wrapping the given arguments in additional parentheses or review the definition of the interface. + \nUm tipo de tupla é exigido para um ou mais argumentos. Considere agrupar os argumentos fornecidos em parênteses adicionais ou revisar a definição da interface. + + + + Invalid warning number '{0}' + Número de aviso inválido '{0}' + + + + Invalid version string '{0}' + Cadeia de caracteres de versão inválida '{0}' + + + + Invalid version file '{0}' + Arquivo de versão inválida '{0}' + + + + Microsoft (R) F# Compiler version {0} + Compilador Microsoft (R) F# versão {0} + + + + F# Compiler for F# {0} + Compilador F# para F# {0} + + + + Problem with filename '{0}': {1} + Problema com nome de arquivo '{0}': {1} + + + + No inputs specified + Nenhuma entrada especificada + + + + The '--pdb' option requires the '--debug' option to be used + A opção '--pdb' requer que seja usada a opção '--debug' + + + + The search directory '{0}' is invalid + O diretório de pesquisa '{0}' é inválido + + + + The search directory '{0}' could not be found + Não foi possível encontrar o diretório de pesquisa '{0}' + + + + '{0}' is not a valid filename + '{0}' não é um nome de arquivo válido + + + + '{0}' is not a valid assembly name + '{0}' não é um nome de assembly válido + + + + Unrecognized privacy setting '{0}' for managed resource, valid options are 'public' and 'private' + A configuração de privacidade '{0}' não foi reconhecida pelo recurso gerenciado, as opções válidas são 'public' e 'private' + + + + Multiple references to '{0}.dll' are not permitted + As referências múltiplas '{0}.dll' não são permitidas + + + + Could not read version from mscorlib.dll + Não foi possível ler a versão em mscorlib.dll + + + + Unable to read assembly '{0}' + Não é possível ler o assembly '{0}' + + + + Assembly resolution failure at or near this location + Falha na resolução do assembly neste local ou próximo a ele + + + + The declarations in this file will be placed in an implicit module '{0}' based on the file name '{1}'. However this is not a valid F# identifier, so the contents will not be accessible from other files. Consider renaming the file or adding a 'module' or 'namespace' declaration at the top of the file. + As declarações neste arquivo serão localizadas em um módulo implícito '{0}' com base no nome do arquivo '{1}'. Entretanto este não é um identificador F# válido, de maneira que os conteúdos não estarão acessíveis de outros arquivos. Considere renomear o arquivo ou adicionar uma declaração 'module' ou 'namespace' na parte superior do arquivo. + + + + Files in libraries or multiple-file applications must begin with a namespace or module declaration, e.g. 'namespace SomeNamespace.SubNamespace' or 'module SomeNamespace.SomeModule'. Only the last source file of an application may omit such a declaration. + Arquivos em bibliotecas ou aplicativos com arquivos múltiplos devem começar com uma declaração de namespace ou módulo, por exemplo, 'namespace SomeNamespace.SubNamespace' ou 'module SomeNamespace.SomeModule'. Somente o último arquivo de origem de um aplicativo pode omitir tal declaração. + + + + Files in libraries or multiple-file applications must begin with a namespace or module declaration. When using a module declaration at the start of a file the '=' sign is not allowed. If this is a top-level module, consider removing the = to resolve this error. + Arquivos em bibliotecas ou aplicativos de múltiplos arquivos devem começar com um namespace ou declaração de módulo. Ao usar uma declaração de módulo no início de um arquivo, o sinal '=' não é permitido. Se esse for um módulo de nível superior, considere remover o = para resolver esse erro. + + + + This file contains multiple declarations of the form 'module SomeNamespace.SomeModule'. Only one declaration of this form is permitted in a file. Change your file to use an initial namespace declaration and/or use 'module ModuleName = ...' to define your modules. + Este arquivo possui declarações múltiplas da forma 'module SomeNamespace.SomeModule'. Apenas uma declaração deste forma é permitida no arquivo. Modifique seu arquivo para usar declaração de namespace inicial e/ou use 'module ModuleName = ...' para definir seus módulos. + + + + Option requires parameter: {0} + A opção requer o parâmetro: {0} + + + + Source file '{0}' could not be found + O arquivo de origem '{0}' não pôde ser localizado + + + + The file extension of '{0}' is not recognized. Source files must have extension .fs, .fsi, .fsx, .fsscript, .ml or .mli. + A extensão de arquivo de '{0}' não é reconhecida. Arquivos de origem devem ter extensão .fs, .fsi, .fsx, .fsscript, .ml ou .mli. + + + + Could not resolve assembly '{0}' + Não foi possível resolver o assembly '{0}' + + + + Could not resolve assembly '{0}' required by '{1}' + Não foi possível resolver o assembly '{0}' requerido por '{1}' + + + + Error opening binary file '{0}': {1} + Erro ao abrir o arquivo binário '{0}': {1} + + + + The F#-compiled DLL '{0}' needs to be recompiled to be used with this version of F# + O DDL '{0}', que foi compilado por F#, precisa ser recompilado para ser usado com esta versão do F# + + + + Invalid directive. Expected '#I \"<path>\"'. + Diretiva inválida. '#I \"<caminho>\"' era esperado. + + + + Invalid directive. Expected '#r \"<file-or-assembly>\"'. + Diretiva inválida. '#r \"<arquivo-ou-assembly>\"' era esperado. + + + + Invalid directive. Expected '#load \"<file>\" ... \"<file>\"'. + Diretiva inválida. Esperado '#load \"<arquivo>\" ... \"<arquivo>\"'. + + + + Invalid directive. Expected '#time', '#time \"on\"' or '#time \"off\"'. + Diretiva inválida. '#time', '#time \"on\"' ou '#time \"off\"' era esperado. + + + + Directives inside modules are ignored + Diretivas dentro de módulos são ignoradas + + + + A signature for the file or module '{0}' has already been specified + A assinatura para o arquivo ou módulo '{0}' já tinha sido especificada + + + + An implementation of file or module '{0}' has already been given. Compilation order is significant in F# because of type inference. You may need to adjust the order of your files to place the signature file before the implementation. In Visual Studio files are type-checked in the order they appear in the project file, which can be edited manually or adjusted using the solution explorer. + Uma implementação de arquivo ou módulo '{0}' já foi fornecida. A ordem de compilação é significativa em F# devido à inferência de tipo. Talvez você precise ajustar a ordem dos arquivos para colocar o arquivo de assinatura antes da implementação. No Visual Studio, os arquivos são tipo verificado na ordem em que aparecem no arquivo de projeto, que pode ser editada manualmente ou ajustada por meio do gerenciador de soluções. + + + + An implementation of the file or module '{0}' has already been given + Uma implementação de arquivo ou módulo '{0}' já foi fornecida + + + + The signature file '{0}' does not have a corresponding implementation file. If an implementation file exists then check the 'module' and 'namespace' declarations in the signature and implementation files match. + O arquivo de assinatura '{0}' não possui um arquivo de implementação correspondente. Se houver um arquivo de implementação, você deverá verificar as declarações de 'módulo' e 'namespace' na assinatura e a correspondência de arquivos de implementação. + + + + '{0}' is not a valid integer argument + '{0}' não é um argumento inteiro válido + + + + '{0}' is not a valid floating point argument + '{0}' não é um argumento de ponto flutuante válido + + + + Unrecognized option: '{0}' + Opção não reconhecida: '{0}' + + + + Invalid module or namespace name + Nome de módulo ou namespace inválido + + + + Error reading/writing metadata for the F# compiled DLL '{0}'. Was the DLL compiled with an earlier version of the F# compiler? (error: '{1}'). + Erro na leitura/gravação do metadado no DLL '{0}', que foi compilado por F#. O DLL foi compilado com uma versão inferior ao compilador F#? (erro: '{1}'). + + + + The type/module '{0}' is not a concrete module or type + O tipo/módulo '{0}' não é um módulo ou tipo concreto + + + + The type '{0}' has an inline assembly code representation + O tipo '{0}' possui uma representação de código de assembly embutida + + + + A namespace and a module named '{0}' both occur in two parts of this assembly + Um namespace e um módulo chamado '{0}' ocorrem em duas partes deste assembly + + + + Two modules named '{0}' occur in two parts of this assembly + Dois módulos chamados '{0}' ocorrem em duas partes deste assembly + + + + Two type definitions named '{0}' occur in namespace '{1}' in two parts of this assembly + Dois tipos de definição chamados '{0}' ocorreram no namespace '{1}' em duas partes deste assembly + + + + A module and a type definition named '{0}' occur in namespace '{1}' in two parts of this assembly + Uma definição de módulo e tipo chamada '{0}' ocorreu no namespace '{1}' em duas partes deste assembly + + + + Invalid member signature encountered because of an earlier error + Assinatura de membro inválida encontrada devido a um erro anterior + + + + This value does not have a valid property setter type + Este valor não possui um tipo de setter de propriedade válido + + + + Invalid form for a property getter. At least one '()' argument is required when using the explicit syntax. + Forma inválida para um getter de propriedade. Pelo menos um argumento '()' é necessário quando a sintaxe explícita é usada. + + + + Invalid form for a property setter. At least one argument is required. + Forma inválida para um setter de propriedade. Pelo menos um argumento é necessário. + + + + Unexpected use of a byref-typed variable + Uso inesperado de uma variável do tipo byref + + + + Invalid mutation of a constant expression. Consider copying the expression to a mutable local, e.g. 'let mutable x = ...'. + Mutação inválida de uma expressão constante. Considere copiar a expressão para um local mutável, por exemplo: 'let mutable x = ...'. + + + + The value has been copied to ensure the original is not mutated by this operation or because the copy is implicit when returning a struct from a member and another member is then accessed + O valor que foi copiado para assegurar que o original não seja mudado por esta operação ou porque a cópia está implícita ao retornar o struct de um membro e outro membro é acessado + + + + Recursively defined values cannot appear directly as part of the construction of a tuple value within a recursive binding + Valores definidos recursivamente não podem aparecer diretamente como parte da construção de um valor tupla em uma associação recursiva + + + + Recursive values cannot appear directly as a construction of the type '{0}' within a recursive binding. This feature has been removed from the F# language. Consider using a record instead. + Valores recursivos não podem aparecer diretamente como uma construção do tipo '{0}' em uma associação recursiva. Este recurso foi removido da linguagem F#. Considere usar um registro em seu lugar. + + + + Recursive values cannot be directly assigned to the non-mutable field '{0}' of the type '{1}' within a recursive binding. Consider using a mutable field instead. + Valores recursivos não podem ser atribuídos diretamente ao campo não mutável '{0}' do tipo '{1}' em uma associação recursiva. Considere usar um registro em vez disso. + + + + Unexpected decode of AutoOpenAttribute + Decodificação de AutoOpenAttribute inesperada + + + + Unexpected decode of InternalsVisibleToAttribute + Decodificação de InternalsVisibleToAttribute inesperada + + + + Unexpected decode of InterfaceDataVersionAttribute + Decodificação de InterfaceDataVersionAttribute inesperada + + + + Active patterns cannot return more than 7 possibilities + Padrões ativos não podem retornar mais que 7 possibilidades + + + + This is not a valid constant expression or custom attribute value + Esta não é uma expressão constante ou um valor de atributo personalizado válido + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe mutability attributes differ + O módulo '{0}' contém\n {1} \n, mas sua assinatura especifica\n {2} \nOs atributos de mutabilidade são diferentes + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe names differ + O módulo '{0}' contém\n {1} \n, mas sua assinatura especifica\n {2} \nOs nomes são diferentes + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe compiled names differ + O módulo '{0}' contém\n {1} \n, mas sua assinatura especifica\n {2} \nOs nomes compilados são diferentes + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe display names differ + O módulo '{0}' contém\n {1} \n, mas sua assinatura especifica\n {2} \nOs nomes para exibição são diferentes + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe accessibility specified in the signature is more than that specified in the implementation + O módulo '{0}' contém\n {1} \ n, mas sua assinatura especifica\n {2} \nA acessibilidade especificada na assinatura é maior que a especificada na implementação + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe inline flags differ + O módulo '{0}' contém\n {1} \n, mas sua assinatura especifica\n {2} \nOs sinalizadores embutidos são diferentes + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe literal constant values and/or attributes differ + O módulo '{0}' contém\n {1} \n, mas sua assinatura especifica\n {2} \nOs valores de constantes literais e/ou atributos são diferentes + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is a type function and the other is not. The signature requires explicit type parameters if they are present in the implementation. + O módulo '{0}' contém\n {1} \n, mas sua assinatura especifica\n {2} \nUm é função de tipo e o outro não. A assinatura requer parâmetros de tipo explícito caso estejam presentes na implementação. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe respective type parameter counts differ + O módulo '{0}' contém\n {1} \n, mas sua assinatura especifica\n {2} \nAs respectivas contagens de parâmetro de tipo são diferentes + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe types differ + O módulo '{0}' contém\n {1} \n, mas sua assinatura especifica\n {2} \nOs tipos são diferentes + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is an extension member and the other is not + O módulo '{0}' contém\n {1} \n, mas sua assinatura especifica\n {2} \nUm é membro de extensão e o outro não + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nAn arity was not inferred for this value + O módulo '{0}' contém\n {1} \n, mas sua assinatura especifica\n {2} \nUma aridade não foi inferida para este valor + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe number of generic parameters in the signature and implementation differ (the signature declares {3} but the implementation declares {4} + O módulo '{0}' contém\n {1} \n, mas sua assinatura especifica\n {2} \nOs números de parâmetros genéricos na assinatura e na implementação são diferentes (a assinatura declara {3} mas sua implementação declara {4} + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe generic parameters in the signature and implementation have different kinds. Perhaps there is a missing [<Measure>] attribute. + O módulo '{0}' contém\n {1} \n, mas sua assinatura especifica\n {2} \nOs parâmetros genéricos na assinatura e na implementação têm tipos diferentes. Talvez exista um atributo [<Measure>] ausente. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe arities in the signature and implementation differ. The signature specifies that '{3}' is function definition or lambda expression accepting at least {4} argument(s), but the implementation is a computed function value. To declare that a computed function value is a permitted implementation simply parenthesize its type in the signature, e.g.\n\tval {5}: int -> (int -> int)\ninstead of\n\tval {6}: int -> int -> int. + O módulo '{0}' contém\n {1} \ n, mas sua assinatura especifica\n {2} \nAs aridades diferem na assinatura e na implementação. A assinatura especifica que '{3}' é definição de função ou expressão lambda aceitando pelo menos {4} argumentos, mas a implementação é um valor de função computado. Para declarar que um valor de função computado é uma implementação permitida, basta colocar seu tipo entre parênteses na assinatura, por exemplo:\n\tval {5}: int -> (int -> int)\nao invés de\n\tval {6}: int -> int -> int. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe CLI member names differ + O módulo '{0}' contém\n {1} \n, mas sua assinatura especifica\n {2} \nOs nomes de membros CLI são diferentes + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is static and the other isn't + O módulo '{0}' contém\n {1} \n, mas sua assinatura especifica\n {2} \nUm é estático e o outro não + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is virtual and the other isn't + O módulo '{0}' contém\n {1} \n, mas sua assinatura especifica\n {2} \nUm é virtual e o outro não + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is abstract and the other isn't + O módulo '{0}' contém\n {1} \n, mas sua assinatura especifica\n {2} \nUm é abstrato e outro não + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is final and the other isn't + O módulo '{0}' contém\n {1} \n, mas sua assinatura especifica\n {2} \nUm é final e o outro não + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is marked as an override and the other isn't + O módulo '{0}' contém\n {1} \n, mas sua assinatura especifica\n {2} \nUm é marcado como uma substituição e o outro não + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is a constructor/property and the other is not + O módulo '{0}' contém\n {1} \n, mas sua assinatura especifica\n {2} \nUm é construtor/propriedade e o outro não + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe compiled representation of this method is as a static member but the signature indicates its compiled representation is as an instance member + O módulo '{0}' contém\n {1} \n, mas sua assinatura especifica\n {2} \nA representação compilada deste método é como um membro estático, mas a assinatura indica que sua representação compilada seria como um membro de instância + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe compiled representation of this method is as an instance member, but the signature indicates its compiled representation is as a static member + O módulo '{0}' contém\n {1} \n, mas sua assinatura especifica\n {2} \nA representação compilada deste método é como um membro de instância, mas a assinatura indica que sua representação compilada seria como um membro estático + + + + The {0} definitions in the signature and implementation are not compatible because the names differ. The type is called '{1}' in the signature file but '{2}' in implementation. + As definições {0} na assinatura e implementação não são compatíveis, pois os nomes são diferentes. O tipo é chamado de '{1}' no arquivo de assinatura, mas de '{2}' na implementação. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the respective type parameter counts differ + As definições {0} para o tipo '{1}' na assinatura e implementação não são compatíveis, pois as respectivas contagens de parâmetro de tipo são diferentes + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the accessibility specified in the signature is more than that specified in the implementation + As definições {0} para o tipo '{1}' na assinatura e implementação não são compatíveis, pois a acessibilidade especificada na assinatura é maior que a especificada na implementação + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature requires that the type supports the interface {2} but the interface has not been implemented + As definições {0} para o tipo '{1}' na assinatura e implementação não são compatíveis, pois a assinatura requer que o tipo dê suporte a interface {2}, mas esta não foi implementada + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation says this type may use nulls as a representation but the signature does not + As definições {0} para o tipo '{1}' na assinatura e implementação não são compatíveis, pois a implementação diz que este tipo pode usar nulos como uma representação, mas a assinatura não + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation says this type may use nulls as an extra value but the signature does not + As definições {0} para o tipo '{1}' na assinatura e implementação não são compatíveis, pois a implementação diz que este tipo pode usar nulos como um valor adicional, mas a assinatura não + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature says this type may use nulls as a representation but the implementation does not + As definições {0} para o tipo '{1}' na assinatura e implementação não são compatíveis, pois a assinatura diz que este tipo pode usar nulos como uma representação, mas a implementação não + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature says this type may use nulls as an extra value but the implementation does not + As definições {0} para o tipo '{1}' na assinatura e implementação não são compatíveis, pois a assinatura diz que este tipo pode usar nulos como um valor adicional, mas a implementação não + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation type is sealed but the signature implies it is not. Consider adding the [<Sealed>] attribute to the signature. + As definições {0} para o tipo '{1}' na assinatura e implementação não são compatíveis, pois o tipo de implementação é selado, mas a assinatura implica que ele não é. Considere adicionar o atributo [<Sealed>] à assinatura. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation type is not sealed but signature implies it is. Consider adding the [<Sealed>] attribute to the implementation. + As definições {0} para o tipo '{1}' na assinatura e implementação não são compatíveis, pois o tipo de implementação não é selado, mas a assinatura implica que ele é. Considere adicionar o atributo [<Sealed>] à implementação. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation is an abstract class but the signature is not. Consider adding the [<AbstractClass>] attribute to the signature. + As definições {0} para o tipo '{1}' na assinatura e implementação não são compatíveis, pois a implementação é uma classe abstrata e a assinatura não. Considere adicionar o atributo [<AbstractClass>] à assinatura. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature is an abstract class but the implementation is not. Consider adding the [<AbstractClass>] attribute to the implementation. + As definições {0} para o tipo '{1}' na assinatura e implementação não são compatíveis, pois a assinatura é uma classe abstrata, mas a implementação não. Considere adicionar o atributo [<AbstractClass>] à implementação. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the types have different base types + As definições {0} para o tipo '{1}' na assinatura e implementação não são compatíveis, pois os tipos têm bases diferentes + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the number of {2}s differ + As definições {0} para o tipo '{1}' na assinatura e implementação não são compatíveis, pois o número de {2}s são diferentes + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature defines the {2} '{3}' but the implementation does not (or does, but not in the same order) + As definições {0} para o tipo '{1}' na assinatura e implementação não são compatíveis, pois a assinatura define {2} '{3}', mas a implementação não (ou define em uma ordem diferente) + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation defines the {2} '{3}' but the signature does not (or does, but not in the same order) + As definições {0} para o tipo '{1}' na assinatura e implementação não são compatíveis, pois a implementação define {2} '{3}', mas a assinatura não (ou define em ordem diferente) + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation defines a struct but the signature defines a type with a hidden representation + As definições {0} para o tipo '{1}' na assinatura e implementação não são compatíveis, pois a implementação define um struct, mas a assinatura define um tipo com representação oculta + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because a CLI type representation is being hidden by a signature + As definições {0} para o tipo '{1}' na assinatura e implementação não são compatíveis, pois uma representação do tipo CLI foi ocultada pela assinatura + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because a type representation is being hidden by a signature + As definições {0} para o tipo '{1}' na assinatura e implementação não são compatíveis, pois uma representação de tipo está sendo ocultada por uma assinatura + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the types are of different kinds + As definições {0} para o tipo '{1}' na assinatura e implementação não são compatíveis, pois os tipos são de diferentes tipos + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the IL representations differ + As definições {0} para o tipo '{1}' na assinatura e implementação não são compatíveis, pois as representações de nível de integridade são diferentes + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the representations differ + As definições {0} para o tipo '{1}' na assinatura e implementação não são compatíveis, pois as representações são diferentes + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the field {2} was present in the implementation but not in the signature + As definições {0} para o tipo '{1}' na assinatura e implementação não são compatíveis, pois o campo {2} estava presente na implementação, mas não na assinatura + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the order of the fields is different in the signature and implementation + As definições {0} para o tipo '{1}' na assinatura e implementação não são compatíveis, pois a ordem dos campos está diferente na assinatura e na implementação + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the field {2} was required by the signature but was not specified by the implementation + As definições {0} para o tipo '{1}' na assinatura e implementação não são compatíveis, pois o campo {2} foi solicitado pela assinatura, mas não foi especificado pela implementação + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the field '{2}' was present in the implementation but not in the signature. Struct types must now reveal their fields in the signature for the type, though the fields may still be labelled 'private' or 'internal'. + As definições {0} para o tipo '{1}' na assinatura e implementação não são compatíveis, pois o campo '{2}' estava presente na implementação, mas não na assinatura. Os tipos struct agora devem revelar seus campos na assinatura para o tipo, embora os campos ainda possam ser rotulados como 'private' ou 'internal'. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the abstract member '{2}' was required by the signature but was not specified by the implementation + As definições {0} para o tipo '{1}' na assinatura e implementação não são compatíveis, pois o membro abstrato '{2}' foi requerido pela assinatura, mas não foi especificado pela implementação + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the abstract member '{2}' was present in the implementation but not in the signature + As definições {0} para o tipo '{1}' na assinatura e implementação não são compatíveis, pois o membro abstrato '{2}' estava presente na implementação, mas não na assinatura + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature declares a {2} while the implementation declares a {3} + As definições {0} para o tipo '{1}' na assinatura e implementação não são compatíveis, pois a assinatura declara um {2} enquanto a implementação declara um {3} + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the abbreviations differ: {2} versus {3} + As definições {0} para o tipo '{1}' na assinatura e implementação não são compatíveis, pois as abreviações são diferentes: {2} versus {3} + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because an abbreviation is being hidden by a signature. The abbreviation must be visible to other CLI languages. Consider making the abbreviation visible in the signature. + As definições {0} para o tipo '{1}' na assinatura e implementação não são compatíveis, pois uma abreviação está sendo ocultada por uma assinatura. A abreviação deve estar visível a outras linguagens CLIs. Considere deixar a abreviação visível na assinatura. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature has an abbreviation while the implementation does not + As definições {0} para o tipo '{1}' na assinatura e implementação não são compatíveis, pois a assinatura foi uma abreviação enquanto a implementação não + + + + The module contains the constructor\n {0} \nbut its signature specifies\n {1} \nThe names differ + O módulo contém o construtor\n {0} \n, mas sua assinatura especifica\n {1} \nOs nomes diferem + + + + The module contains the constructor\n {0} \nbut its signature specifies\n {1} \nThe respective number of data fields differ + O módulo contém o construtor\n {0} \n, mas sua assinatura especifica\n {1} \nOs respectivos números de campos de dados diferem + + + + The module contains the constructor\n {0} \nbut its signature specifies\n {1} \nThe types of the fields differ + O módulo contém o construtor\n {0} \n, mas sua assinatura especifica\n {1} \nOs tipos dos campos são diferentes + + + + The module contains the constructor\n {0} \nbut its signature specifies\n {1} \nthe accessibility specified in the signature is more than that specified in the implementation + O módulo contém o construtor\n {0} \n, mas sua assinatura especifica\n {1} \nA acessibilidade especificada na assinatura é maior que a especificada na implementação + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe names differ + O módulo contém o campo\n {0} \n, mas sua assinatura especifica\n {1} \nOs nomes são diferentes + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nthe accessibility specified in the signature is more than that specified in the implementation + O módulo contém o campo\n {0} \n, mas sua assinatura especifica\n {1} \nA acessibilidade especificada na assinatura é maior que a especificada na implementação + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe 'static' modifiers differ + O módulo contém o campo\n {0} \n, mas sua assinatura especifica\n {1} \nOs modificadores 'static' são diferentes + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe 'mutable' modifiers differ + O módulo contém o campo\n {0} \n, mas sua assinatura especifica\n {1} \nOs modificares 'mutable' são diferentes + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe 'literal' modifiers differ + O módulo contém o campo\n {0} \n, mas sua assinatura especifica\n {1} \nOs modificadores 'literal' são diferentes + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe types differ + O módulo contém o campo\n {0} \n, mas sua assinatura especifica\n {1} \nOs tipos são diferentes + + + + The implicit instantiation of a generic construct at or near this point could not be resolved because it could resolve to multiple unrelated types, e.g. '{0}' and '{1}'. Consider using type annotations to resolve the ambiguity + A instanciação implícita do constructo genérico neste ponto ou próximo a ele não pode ser resolvida porque ele conseguiu resolver tipos não relacionados múltiplos, por exemplo '{0}' e '{1}'. Considere usar anotações de tipo para resolver a ambiguidade + + + + Could not resolve the ambiguity inherent in the use of a 'printf'-style format string + Não foi possível resolver a ambiguidade inerente ao uso de uma cadeia de caracteres com formato de estilo 'printf' + + + + Could not resolve the ambiguity in the use of a generic construct with an 'enum' constraint at or near this position + Não foi possível resolver a ambiguidade no uso de um construtor genérico com uma restrição 'enum' nesta posição ou próximo a ela + + + + Could not resolve the ambiguity in the use of a generic construct with a 'delegate' constraint at or near this position + Não foi possível resolver a ambiguidade no uso de um construtor genérico com uma restrição 'delegate' nesta posição ou próximo a ela + + + + Invalid value + Valor inválido + + + + The signature and implementation are not compatible because the respective type parameter counts differ + A assinatura e implementação não são compatíveis porque as contagens de parâmetros de tipo respectivas são diferentes + + + + The signature and implementation are not compatible because the type parameter in the class/signature has a different compile-time requirement to the one in the member/implementation + A assinatura e implementação não são compatíveis porque o parâmetro de tipo na classe/assinatura tem um requisito em tempo de compilação diferente de um membro/implementação + + + + The signature and implementation are not compatible because the declaration of the type parameter '{0}' requires a constraint of the form {1} + A assinatura e implementação não são compatíveis porque a declaração do parâmetro de tipo '{0}' requer uma restrição da forma {1} + + + + The signature and implementation are not compatible because the type parameter '{0}' has a constraint of the form {1} but the implementation does not. Either remove this constraint from the signature or add it to the implementation. + A assinatura e implementação não são compatíveis porque o parâmetro de tipo '{0}' possui uma restrição da forma {1}, mas a implementação não. Remova esta restrição da assinatura ou a adicione à implementação. + + + + The type '{0}' implements 'System.IComparable'. Consider also adding an explicit override for 'Object.Equals' + O tipo '{0}' implementa o 'System.IComparable'. Considere também adicionar uma substituição explícita para 'Object.Equals' + + + + The type '{0}' implements 'System.IComparable' explicitly but provides no corresponding override for 'Object.Equals'. An implementation of 'Object.Equals' has been automatically provided, implemented via 'System.IComparable'. Consider implementing the override 'Object.Equals' explicitly + O tipo '{0}' implementa explicitamente o 'System.IComparable', mas não fornece nenhuma substituição correspondente para 'Object.Equals'. Uma implementação de 'Object.Equals' foi automaticamente fornecida e implementada via 'System.IComparable'. Considere implementar a substituição explícita 'Object.Equals' + + + + The struct, record or union type '{0}' has an explicit implementation of 'Object.GetHashCode' or 'Object.Equals'. You must apply the 'CustomEquality' attribute to the type + O tipo struct, registro ou união '{0}' tem uma implementação explícita de 'Object.GetHashCode' ou 'Object.Equals'. Você deve aplicar o atributo 'CustomEquality' ao tipo + + + + The struct, record or union type '{0}' has an explicit implementation of 'Object.GetHashCode'. Consider implementing a matching override for 'Object.Equals(obj)' + O tipo struct, registro ou união '{0}' tem uma implementação explícita de 'Object.GetHashCode'. Considere implementar uma substituição correspondente para 'Object.Equals(obj)' + + + + The struct, record or union type '{0}' has an explicit implementation of 'Object.Equals'. Consider implementing a matching override for 'Object.GetHashCode()' + O tipo struct, registro ou união '{0}' tem uma implementação explícita de 'Object.Equals'. Considere implementar uma substituição correspondente para 'Object.GetHashCode()' + + + + The exception definitions are not compatible because a CLI exception mapping is being hidden by a signature. The exception mapping must be visible to other modules. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1} + As definições de exceções não são compatíveis, pois um mapeamento de exceção CLI está sendo ocultado pela assinatura. O mapeamento de exceção deve ser visível a outros módulos. O módulo contém a definição da exceção\n {0} \n, mas sua assinatura especifica\n\t{1} + + + + The exception definitions are not compatible because the CLI representations differ. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1} + As definições de exceções não são compatíveis, pois as representações CLI são diferentes. O módulo contém a definição da exceção\n {0} \n, mas a sua assinatura especifica\n\t{1} + + + + The exception definitions are not compatible because the exception abbreviation is being hidden by the signature. The abbreviation must be visible to other CLI languages. Consider making the abbreviation visible in the signature. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1}. + As definições de exceções não são compatíveis, pois a abreviação de exceção está ocultada pela assinatura. A abreviação deve ser visível a outras linguagens CLI. Considere deixar a abreviação visível na assinatura. O módulo contém a definição de assinatura\n {0} \nmas sua assinatura especifica\n\t{1}. + + + + The exception definitions are not compatible because the exception abbreviations in the signature and implementation differ. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1}. + As definições de exceções não são compatíveis, pois as abreviações de exceções na assinatura e implementação são diferentes. O módulo contém a definição da exceção\n {0} \n, mas sua assinatura especifica\n\t{1}. + + + + The exception definitions are not compatible because the exception declarations differ. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1}. + As definições de exceções não são compatíveis, pois as declarações de exceções diferem. O módulo contém a definição da exceção\n {0} \n, mas sua assinatura especifica\n\t{1}. + + + + The exception definitions are not compatible because the field '{0}' was required by the signature but was not specified by the implementation. The module contains the exception definition\n {1} \nbut its signature specifies\n\t{2}. + As definições de exceções não são compatíveis, pois o campo '{0}' foi requerido pela assinatura, mas não foi especificado na implementação. O módulo contém a definição da exceção\n {1} \n, mas sua assinatura especifica\n\t{2}. + + + + The exception definitions are not compatible because the field '{0}' was present in the implementation but not in the signature. The module contains the exception definition\n {1} \nbut its signature specifies\n\t{2}. + As definições de exceções não são compatíveis, pois o campo '{0}' estava presente na implementação, mas não na assinatura. O módulo contém a definição da exceção\n {1} \n, mas sua assinatura especifica\n\t{2}. + + + + The exception definitions are not compatible because the order of the fields is different in the signature and implementation. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1}. + As definições de exceções não são compatíveis, pois a ordem dos campos é diferente na assinatura e na implementação. O módulo contém a definição da exceção\n {0} \n, mas sua assinatura especifica\n\t{1}. + + + + The namespace or module attributes differ between signature and implementation + Os atributos de namespace ou módulo diferem entre assinatura e implementação + + + + This method is over-constrained in its type parameters + Este método possui muitas restrições em seus parâmetros de tipo + + + + No implementations of '{0}' had the correct number of arguments and type parameters. The required signature is '{1}'. + Nenhuma implementação de '{0}' tinha o número correto de argumentos e parâmetros de tipo. A assinatura necessária é '{1}'. + + + + The override for '{0}' was ambiguous + A substituição para '{0}' foi ambígua + + + + More than one override implements '{0}' + Mais de uma substituição implementa '{0}' + + + + The method '{0}' is sealed and cannot be overridden + O método '{0}' está selado não pode ser substituído + + + + The override '{0}' implements more than one abstract slot, e.g. '{1}' and '{2}' + A substituição '{0}' implementa mais de um slot abstrato, por exemplo '{1}' e '{2}' + + + + Duplicate or redundant interface + Interface duplicada ou redundante + + + + The interface '{0}' is included in multiple explicitly implemented interface types. Add an explicit implementation of this interface. + A interface '{0}' está incluída em múltiplos tipos de interface explicitamente implementada. Adicione uma implementação explícita desta interface. + + + + A named argument has been assigned more than one value + Foi atribuído mais de um valor a um argumento nomeado + + + + No implementation was given for '{0}' + Nenhuma implementação foi dada por '{0}' + + + + No implementation was given for '{0}'. Note that all interface members must be implemented and listed under an appropriate 'interface' declaration, e.g. 'interface ... with member ...'. + Nenhuma implementação foi dada por '{0}'. Note que todos membros de interface devem ser implementados e listados sob uma declaração apropriada 'interface', por exemplo 'interface ... with member ...'. + + + + The member '{0}' does not have the correct number of arguments. The required signature is '{1}'. + O membro '{0}' não possui o número correto de argumentos. A assinatura necessária é '{1}'. + + + + The member '{0}' does not have the correct number of method type parameters. The required signature is '{1}'. + O membro '{0}' não possui o número correto de parâmetros de tipo de método. A assinatura necessária é '{1}'. + + + + The member '{0}' does not have the correct kinds of generic parameters. The required signature is '{1}'. + O membro '{0}' não possui os tipos corretos de parâmetros genéricos. A assinatura necessária é '{1}'. + + + + The member '{0}' cannot be used to implement '{1}'. The required signature is '{2}'. + O membro '{0}' não pode ser usado para implementar '{1}'. A assinatura necessária é '{2}'. + + + + Error while parsing embedded IL + Erro ao analisar IL incorporado + + + + Error while parsing embedded IL type + Erro ao analisar tipo de IL embutido + + + + This indexer notation has been removed from the F# language + Esta notação de indexador foi removida do idioma F# + + + + Invalid expression on left of assignment + Expressão inválida à esquerda da atribuição + + + + The 'ReferenceEquality' attribute cannot be used on structs. Consider using the 'StructuralEquality' attribute instead, or implement an override for 'System.Object.Equals(obj)'. + O atributo 'ReferenceEquality' não pode ser usado em structs. Considere usar o atributo 'StructuralEquality' em seu lugar, ou implemente uma substituição para 'System.Object.Equals(obj)'. + + + + This type uses an invalid mix of the attributes 'NoEquality', 'ReferenceEquality', 'StructuralEquality', 'NoComparison' and 'StructuralComparison' + Este tipo usa uma combinação inválida dos atributos 'NoEquality', 'ReferenceEquality', 'StructuralEquality', 'NoComparison' e 'StructuralComparison' + + + + The 'NoEquality' attribute must be used in conjunction with the 'NoComparison' attribute + O atributo 'NoEquality' deve ser usado em conjunto com o atributo 'NoComparison' + + + + The 'StructuralComparison' attribute must be used in conjunction with the 'StructuralEquality' attribute + O atributo 'StructuralComparison' deve ser usado em conjunto com o atributo 'StructuralEquality' + + + + The 'StructuralEquality' attribute must be used in conjunction with the 'NoComparison' or 'StructuralComparison' attributes + O atributo 'StructuralEquality' deve ser usado junto com os atributos 'NoComparison' ou 'StructuralComparison' + + + + A type cannot have both the 'ReferenceEquality' and 'StructuralEquality' or 'StructuralComparison' attributes + Um tipo não pode ter, ao mesmo tempo, os atributos 'ReferenceEquality' e 'StructuralEquality' ou 'StructuralComparison' + + + + Only record, union, exception and struct types may be augmented with the 'ReferenceEquality', 'StructuralEquality' and 'StructuralComparison' attributes + Somente tipos registro, união, exceção e struct podem ser aumentados com os atributos 'ReferenceEquality', 'StructuralEquality' e 'StructuralComparison' + + + + A type with attribute 'ReferenceEquality' cannot have an explicit implementation of 'Object.Equals(obj)', 'System.IEquatable<_>' or 'System.Collections.IStructuralEquatable' + Um tipo com atributo 'ReferenceEquality' não pode ter uma implementação explícita de 'Object.Equals(obj)', 'System.IEquatable<_>' ou 'System.Collections.IStructuralEquatable' + + + + A type with attribute 'CustomEquality' must have an explicit implementation of at least one of 'Object.Equals(obj)', 'System.IEquatable<_>' or 'System.Collections.IStructuralEquatable' + Um tipo com atributo 'CustomEquality' deve ter uma implementação explícita de pelo menos 'Object.Equals(obj)', 'System.IEquatable<_>' ou 'System.Collections.IStructuralEquatable' + + + + A type with attribute 'CustomComparison' must have an explicit implementation of at least one of 'System.IComparable' or 'System.Collections.IStructuralComparable' + Um tipo com atributo 'CustomComparison' deve ter uma implementação explícita de pelo menos 'System.IComparable' ou 'System.Collections.IStructuralComparable' + + + + A type with attribute 'NoEquality' should not usually have an explicit implementation of 'Object.Equals(obj)'. Disable this warning if this is intentional for interoperability purposes + Geralmente um tipo com atributo 'NoEquality' não deve ter uma implementação explícita de 'Object.Equals(obj)'. Desabilite este aviso caso a intenção seja obter interoperabilidade + + + + A type with attribute 'NoComparison' should not usually have an explicit implementation of 'System.IComparable', 'System.IComparable<_>' or 'System.Collections.IStructuralComparable'. Disable this warning if this is intentional for interoperability purposes + Geralmente um tipo com o atributo 'NoComparison' não deve ter uma implementação explícita de 'System.IComparable', 'System.IComparable<_>' ou 'System.Collections.IStructuralComparable'. Desabilite este aviso caso a intenção seja obter interoperabilidade + + + + The 'CustomEquality' attribute must be used in conjunction with the 'NoComparison' or 'CustomComparison' attributes + O atributo 'CustomEquality' deve ser usado na conjunção com atributos 'NoComparison' ou 'CustomComparison' + + + + Positional specifiers are not permitted in format strings + Não são permitidos especificadores posicionais em cadeias de caracteres de formato + + + + Missing format specifier + Especificador de formato ausente + + + + '{0}' flag set twice + O sinalizador '{0}' foi definido duas vezes + + + + Prefix flag (' ' or '+') set twice + Sinalizador de prefixo (' ' ou '+') definido duas vezes + + + + The # formatting modifier is invalid in F# + O modificador de formatação # é inválido em F# + + + + Bad precision in format specifier + Especificador de formato com pouca precisão + + + + Bad width in format specifier + Especificador de formato com largura ruim + + + + '{0}' format does not support '0' flag + O formato '{0}' não suporta sinalizador '0' + + + + Precision missing after the '.' + Precisão após o '.' ausente + + + + '{0}' format does not support precision + O sinalizador '{0}' não suporta precisão + + + + Bad format specifier (after l or L): Expected ld,li,lo,lu,lx or lX. In F# code you can use %d, %x, %o or %u instead, which are overloaded to work with all basic integer types. + Especificador de formato inválido (após l ou L): esperado: ld,li,lo,lu,lx ou lX. No código F#, você pode usar %d, %x, %o ou %u no lugar, os quais estão sobrecarregados para trabalhar com todos os tipos básicos de inteiro. + + + + The 'l' or 'L' in this format specifier is unnecessary. In F# code you can use %d, %x, %o or %u instead, which are overloaded to work with all basic integer types. + O 'l' nem 'L' são necessários neste especificador de formato. No código F#, você pode usar %d, %x, %o ou %u no lugar, os quais estão sobrecarregados para trabalhar com todos os tipos básicos de inteiro. + + + + The 'h' or 'H' in this format specifier is unnecessary. You can use %d, %x, %o or %u instead, which are overloaded to work with all basic integer types. + O 'h' ou 'H' é desnecessário neste especificador de formato. Você pode usar %d, %x, %o ou %u em seu lugar, que estão sobrecarregados para trabalhar com todos os tipos básicos de inteiro. + + + + '{0}' does not support prefix '{1}' flag + O '{0}' não dá suporte ao sinalizador '{1}' de prefixo + + + + Bad format specifier: '{0}' + Especificador de formato incorreto: '{0}' + + + + System.Environment.Exit did not exit + System.Environment.Exit não foi finalizado + + + + The treatment of this operator is now handled directly by the F# compiler and its meaning cannot be redefined + O tratamento deste operador agora é manipulado diretamente pelo compilador F# e seu significado não pode ser redefinido + + + + A protected member is called or 'base' is being used. This is only allowed in the direct implementation of members since they could escape their object scope. + Um membro protegido é chamado ou a 'base' está sendo usada. Isso só é permitido na implementação direta dos membros, uma vez que eles poderiam escapar do escopo de seus objetos. + + + + The byref-typed variable '{0}' is used in an invalid way. Byrefs cannot be captured by closures or passed to inner functions. + A variável do tipo byref '{0}' é usada de forma inválida. Byrefs não podem ser capturados por fechamentos ou transmitidos para funções de interiores. + + + + The 'base' keyword is used in an invalid way. Base calls cannot be used in closures. Consider using a private member to make base calls. + A palavra-chave 'base' é usada de forma incorreta. Chamadas de base não podem ser usadas em fechamentos. Considere utilizar um membro particular para fazer chamadas de base. + + + + The variable '{0}' is used in an invalid way + A variável '{0}' é usada de forma incorreta + + + + The type '{0}' is less accessible than the value, member or type '{1}' it is used in. + O tipo '{0}' é menos acessível que o valor, membro ou tipo '{1}' no qual ele é usado. + + + + 'System.Void' can only be used as 'typeof<System.Void>' in F# + 'System.Void' só pode ser usado como 'typeof <system.void>' em F# + + + + A type instantiation involves a byref type. This is not permitted by the rules of Common IL. + Uma instanciação de tipo inclui um tipo de byref. Isto não é permitido pelas regras do IL Comum. + + + + Calls to 'reraise' may only occur directly in a handler of a try-with + Chamadas para 'reraise' só podem ocorrer diretamente em um manipulador de um try-with + + + + Expression-splicing operators may only be used within quotations + Operadores da união de expressão só podem ser usados entre aspas + + + + First-class uses of the expression-splicing operator are not permitted + Não são permitidos usos de primeira classe do operador da união de expressão + + + + First-class uses of the address-of operators are not permitted + Utilizações de primeira classe dos operadores de endereço não são permitidas + + + + First-class uses of the 'reraise' function is not permitted + Não são permitidos usos de primeira classe da função 'reraise' + + + + The byref typed value '{0}' cannot be used at this point + O valor do tipo byref '{0}' não pode ser usado neste ponto + + + + 'base' values may only be used to make direct calls to the base implementations of overridden members + Valores 'base' só podem ser usados para fazer chamadas diretas às implementações de base de membros substituídos + + + + Object constructors cannot directly use try/with and try/finally prior to the initialization of the object. This includes constructs such as 'for x in ...' that may elaborate to uses of these constructs. This is a limitation imposed by Common IL. + Construtores de objeto não podem usar try/with nem try/finally antes da inicialização do objeto. O que inclui construções como ' x in... ' que podem elaborar usos dessas construções. Esta é uma limitação imposta pelo IL Comum. + + + + The address of the variable '{0}' cannot be used at this point + O endereço da variável '{0}' não pode ser usado neste ponto + + + + The address of the static field '{0}' cannot be used at this point + O endereço do campo estático '{0}' não pode ser usado neste ponto + + + + The address of the field '{0}' cannot be used at this point + O endereço do campo '{0}' não pode ser usado neste ponto + + + + The address of an array element cannot be used at this point + O endereço de um elemento de matriz não pode ser usado neste ponto + + + + The type of a first-class function cannot contain byrefs + O tipo de uma função de primeira classe não pode conter byrefs + + + + A method return type would contain byrefs which is not permitted + Um tipo de retorno de método conteria byrefs que não são permitidos + + + + Invalid custom attribute value (not a constant or literal) + Valor do atributo personalizado inválido (não é uma constante ou um literal) + + + + The attribute type '{0}' has 'AllowMultiple=false'. Multiple instances of this attribute cannot be attached to a single language element. + O tipo de atributo '{0}' possui 'AllowMultiple=false'. Instâncias múltiplas deste atributo não podem ser conectadas a um elemento de linguagem simples. + + + + The member '{0}' is used in an invalid way. A use of '{1}' has been inferred prior to its definition at or near '{2}'. This is an invalid forward reference. + O membro '{0}' é usado de uma forma inválida. Um uso de '{1}' foi inferido anteriormente para sua definição em '{2}' ou próximo a ele. Esta é uma referência de encaminhamento inválida. + + + + A byref typed value would be stored here. Top-level let-bound byref values are not permitted. + Um valor do tipo byref seria armazenado aqui. Não são permitidos valores de alto nível associados a let byref. + + + + [<ReflectedDefinition>] terms cannot contain uses of the prefix splice operator '%' + Os termos [<ReflectedDefinition>] não podem conter usos de operador da união pré-fixo '%' + + + + A function labeled with the 'EntryPointAttribute' attribute must be the last declaration in the last file in the compilation sequence. + Uma função rotulada com o atributo 'EntryPointAttribute' deve ser a última declaração no último arquivo na sequência de compilação. + + + + compiled form of the union case + forma compilada do caso união + + + + default augmentation of the union case + aumento padrão do caso união + + + + The property '{0}' has the same name as a method in type '{1}'. + A propriedade '{0}' tem o mesmo nome que um método no tipo '{1}'. + + + + The property '{0}' of type '{1}' has a getter and a setter that do not match. If one is abstract then the other must be as well. + A propriedade '{0}' do tipo '{1}' tem um getter e um setter que não são correspondentes. Se um deles for abstrato, o outro também deverá ser. + + + + The property '{0}' has the same name as another property in type '{1}', but one takes indexer arguments and the other does not. You may be missing an indexer argument to one of your properties. + A propriedade '{0}' tem o mesmo nome que outra propriedade no tipo '{1}', mas uma tem argumentos de indexador e a outra não. Talvez você precise de um argumento de indexador para uma das suas propriedades. + + + + A type would store a byref typed value. This is not permitted by Common IL. + Um tipo armazenaria um valor do tipo byref. Isso não é permitido pelo IL Comum. + + + + Duplicate method. The method '{0}' has the same name and signature as another method in type '{1}'. + Método duplicado. O método '{0}' tem o mesmo nome e assinatura que outro método no tipo '{1}'. + + + + Duplicate method. The method '{0}' has the same name and signature as another method in type '{1}' once tuples, functions, units of measure and/or provided types are erased. + Método duplicado. O método '{0}' tem o mesmo nome e assinatura que outro método no tipo '{1}' assim que tuplas, funções, unidades de medida e/ou tipos fornecidos são apagados. + + + + The method '{0}' has curried arguments but has the same name as another method in type '{1}'. Methods with curried arguments cannot be overloaded. Consider using a method taking tupled arguments. + O método '{0}' tem argumentos na forma curried, mas tem o mesmo nome que outro método no tipo '{1}'. Os métodos com argumentos na forma curried não podem estar sobrecarregados. Considere usar um método que tenha argumentos na forma de tupla. + + + + Methods with curried arguments cannot declare 'out', 'ParamArray', 'optional', 'ReflectedDefinition', 'byref', 'CallerLineNumber', 'CallerMemberName', or 'CallerFilePath' arguments + Os métodos com argumentos via currying não podem declarar os argumentos 'out', 'ParamArray', 'optional', 'ReflectedDefinition', 'byref', 'CallerLineNumber', 'CallerMemberName' ou 'CallerFilePath' + + + + Duplicate property. The property '{0}' has the same name and signature as another property in type '{1}'. + Propriedade duplicada. A propriedade '{0}' tem o mesmo nome e assinatura que outra propriedade no tipo '{1}'. + + + + Duplicate property. The property '{0}' has the same name and signature as another property in type '{1}' once tuples, functions, units of measure and/or provided types are erased. + Propriedade duplicada. A propriedade '{0}' tem o mesmo nome e assinatura que outra propriedade no tipo '{1}' assim que tuplas, funções, unidades de medida e/ou tipos fornecidos são apagados. + + + + Duplicate method. The abstract method '{0}' has the same name and signature as an abstract method in an inherited type. + Método duplicado. O método abstrato '{0}' possui o mesmo nome e assinatura que um método abstrato em um tipo herdado. + + + + Duplicate method. The abstract method '{0}' has the same name and signature as an abstract method in an inherited type once tuples, functions, units of measure and/or provided types are erased. + Método duplicado. O método abstrato '{0}' possui mesmo nome e assinatura que um método abstrato em um tipo herdado assim que tuplas, funções, unidades de medida e/ou tipos fornecidos são apagados. + + + + This type implements the same interface at different generic instantiations '{0}' and '{1}'. This is not permitted in this version of F#. + Este tipo implementa a mesma interface em instanciações genéricas diferentes '{0}' e '{1}'. Isto não é permitido nesta versão de F#. + + + + The type of a field using the 'DefaultValue' attribute must admit default initialization, i.e. have 'null' as a proper value or be a struct type whose fields all admit default initialization. You can use 'DefaultValue(false)' to disable this check + O tipo de um campo que usa o atributo 'DefaultValue' deve admitir inicialização padrão, ou seja, possuir 'null' como valor adequado, ou ser um tipo struct cujos todos campos admitem inicialização padrão. Você pode usar 'DefaultValue(false)' para desabilitar esta verificação + + + + The type abbreviation contains byrefs. This is not permitted by F#. + A abreviação de tipo contém byrefs. Isto não é permitido por F#. + + + + The variable '{0}' is bound in a quotation but is used as part of a spliced expression. This is not permitted since it may escape its scope. + A variável '{0}' está associada a uma cotação, mas é usada como parte de uma expressão de união. Isso não é permitido, pois pode sair do escopo. + + + + Quotations cannot contain uses of generic expressions + Cotações não podem conter utilizações de expressões genéricas + + + + Quotations cannot contain function definitions that are inferred or declared to be generic. Consider adding some type constraints to make this a valid quoted expression. + Cotações não podem conter definições de funções que foram deduzidas ou declaradas como genéricas. Considere adicionar algumas restrições para fazer desta uma expressão cotada válida. + + + + Quotations cannot contain object expressions + Cotações não podem conter expressões de objeto + + + + Quotations cannot contain expressions that take the address of a field + Cotações não podem conter expressões que obtêm o endereço de um campo + + + + Quotations cannot contain expressions that fetch static fields + Cotações não podem conter expressões que buscam campos estáticos + + + + Quotations cannot contain inline assembly code or pattern matching on arrays + Cotações não podem conter código de assembly embutido ou padrões coincidentes em matrizes + + + + Quotations cannot contain descending for loops + Cotações não podem conter decrescentes para loops + + + + Quotations cannot contain expressions that fetch union case indexes + Cotações não podem conter expressões que busquem índices de casos união + + + + Quotations cannot contain expressions that set union case fields + Cotações não podem conter expressões que definem campos de casos união + + + + Quotations cannot contain expressions that set fields in exception values + Cotações não podem conter expressões que definem campos nos valores de exceção + + + + Quotations cannot contain expressions that require byref pointers + Cotações não podem conter expressões que requerem ponteiros byref + + + + Quotations cannot contain expressions that make member constraint calls, or uses of operators that implicitly resolve to a member constraint call + As cotações não podem conter expressões que façam chamadas de restrição de membros ou usem operadores que resolvem implicitamente uma chamada de restrição de membro + + + + Quotations cannot contain this kind of constant + Cotações não podem conter este tipo de constante + + + + Quotations cannot contain this kind of pattern match + Cotações não podem conter este tipo de correspondência de padrão + + + + Quotations cannot contain array pattern matching + Cotações não podem conter correspondências de padrão de matriz + + + + Quotations cannot contain this kind of type + Cotações não podem conter esta espécie de tipo + + + + The declared type parameter '{0}' cannot be used here since the type parameter cannot be resolved at compile time + O parâmetro do tipo declarado '{0}' não pode ser usado aqui, uma vez que o parâmetro de tipo não pode ser resolvido no tempo de compilação + + + + This code is less generic than indicated by its annotations. A unit-of-measure specified using '_' has been determined to be '1', i.e. dimensionless. Consider making the code generic, or removing the use of '_'. + Este código é menos genérico que o indicado pelas suas anotações. Uma unidade de medida especificada com uso de '_' foi determinada como '1', ou seja, sem dimensão. Considere tornar o código genérico ou remover a utilização de '_'. + + + + Type inference problem too complicated (maximum iteration depth reached). Consider adding further type annotations. + Problema de inferência de tipo excessivamente complicado (profundidade de iteração máxima atingida). Considere adicionar mais anotações de tipo. + + + + Expected arguments to an instance member + Argumentos esperados para um membro de instância + + + + This indexer expects {0} arguments but is here given {1} + Este indexador espera argumentos {0}, mas aqui é dado {1} + + + + Expecting a type supporting the operator '{0}' but given a function type. You may be missing an argument to a function. + Um tipo que suporte o operador '{0}' era esperado, mas um tipo de função foi recebido. Pode estar faltando um argumento para alguma função. + + + + Expecting a type supporting the operator '{0}' but given a tuple type + Um tipo que suporte o operador '{0}' era esperado, mas um tipo de tupla foi recebido. + + + + None of the types '{0}' support the operator '{1}' + Nenhum dos tipos '{0}' oferece suporte ao operador '{1}' + + + + The type '{0}' does not support the operator '{1}' + O tipo '{0}' não oferece suporte ao operador '{1}' + + + + None of the types '{0}' support the operator '{1}'. Consider opening the module 'Microsoft.FSharp.Linq.NullableOperators'. + Nenhum dos tipos '{0}' oferece suporte ao operador '{1}'. Considere abrir o módulo 'Microsoft.FSharp.Linq.NullableOperators'. + + + + The type '{0}' does not support the operator '{1}'. Consider opening the module 'Microsoft.FSharp.Linq.NullableOperators'. + O tipo '{0}' não oferece suporte ao operador '{1}'. Considere abrir o módulo 'Microsoft.FSharp.Linq.NullableOperators'. + + + + The type '{0}' does not support a conversion to the type '{1}' + O tipo '{0}' não suporta conversão para o tipo '{1}' + + + + The type '{0}' has a method '{1}' (full name '{2}'), but the method is static + O tipo '{0}' possui um método '{1}' (nome completo '{2}'), mas o método é estático + + + + The type '{0}' has a method '{1}' (full name '{2}'), but the method is not static + O tipo '{0}' possui um método '{1}' (nome completo '{2}'), mas o método não é estático + + + + The constraints 'struct' and 'not struct' are inconsistent + As restrições 'struct' e 'not struct' são inconsistentes + + + + The type '{0}' does not have 'null' as a proper value + O tipo '{0}' não possui 'null' como valor adequado + + + + The type '{0}' does not have 'null' as a proper value. To create a null value for a Nullable type use 'System.Nullable()'. + O tipo '{0}' não possui 'null' como valor adequado. Para criar um valor nulo para um tipo Nullable, use 'System.Nullable()'. + + + + The type '{0}' does not support the 'comparison' constraint because it has the 'NoComparison' attribute + O tipo '{0}' não suporta a restrição 'comparison' porque ela não possui o atributo 'NoComparison' + + + + The type '{0}' does not support the 'comparison' constraint. For example, it does not support the 'System.IComparable' interface + O tipo '{0}' não suporta a restrição 'comparison'. Por exemplo, ele não suporta a interface 'System.IComparable' + + + + The type '{0}' does not support the 'comparison' constraint because it is a record, union or struct with one or more structural element types which do not support the 'comparison' constraint. Either avoid the use of comparison with this type, or add the 'StructuralComparison' attribute to the type to determine which field type does not support comparison + O tipo '{0}' não suporta a restrição 'comparison' porque é um registro, união ou struct com um ou mais tipos de elementos estruturais que não suportam a restrição 'comparison'. Evite usar comparação com este tipo, a não ser que você adicione o atributo 'StructuralComparison' ao tipo para determinar qual tipo de campo não suporta comparação + + + + The type '{0}' does not support the 'equality' constraint because it has the 'NoEquality' attribute + O tipo '{0}' não suporta a restrição 'equality' porque possui o atributo 'NoEquality' + + + + The type '{0}' does not support the 'equality' constraint because it is a function type + O tipo '{0}' não suporta a restrição 'equality' porque ele é um tipo de função + + + + The type '{0}' does not support the 'equality' constraint because it is a record, union or struct with one or more structural element types which do not support the 'equality' constraint. Either avoid the use of equality with this type, or add the 'StructuralEquality' attribute to the type to determine which field type does not support equality + O tipo '{0}' não suporta a restrição 'equality' porque é um registro, união ou struct com um ou mais tipos de elementos estruturais que não suportam a restrição 'equality'. Evite usar igualdade com este tipo, a não ser que você adicione o atributo 'StructuralEquality' ao tipo para determinar qual tipo de campo não suportará a igualdade + + + + The type '{0}' is not a CLI enum type + O tipo '{0}' não é um tipo enum CLI + + + + The type '{0}' has a non-standard delegate type + O tipo '{0}' tem um tipo delegado não padrão + + + + The type '{0}' is not a CLI delegate type + O tipo '{0}' não é um tipo delegado CLI + + + + This type parameter cannot be instantiated to 'Nullable'. This is a restriction imposed in order to ensure the meaning of 'null' in some CLI languages is not confusing when used in conjunction with 'Nullable' values. + Esse parâmetro de tipo não pode ser instanciado como 'Nullable'. Esta é uma restrição imposta para assegurar que o significado de 'null' em algumas linguagens CLI não seja confuso quando usado em conjunto com valores 'Nullable'. + + + + A generic construct requires that the type '{0}' is a CLI or F# struct type + Uma construção genérica requer que o tipo '{0}' seja um CLI ou tipo struct F# + + + + A generic construct requires that the type '{0}' is an unmanaged type + Uma construção genérica requer que o tipo '{0}' seja um tipo não gerenciado + + + + The type '{0}' is not compatible with any of the types {1}, arising from the use of a printf-style format string + O tipo '{0}' não é compatível com qualquer um dos tipos {1}, decorrentes da utilização de uma cadeia de caracteres do formato estilo printf + + + + A generic construct requires that the type '{0}' have reference semantics, but it does not, i.e. it is a struct + Uma construção genérica requer que o tipo '{0}' tenha semânticas de referência, mas ele não tem, ou seja, é um struct + + + + A generic construct requires that the type '{0}' be non-abstract + Uma construção genérica requer que o tipo '{0}' não seja abstrato + + + + A generic construct requires that the type '{0}' have a public default constructor + Uma construção genérica requer que o tipo '{0}' tenha um construtor padrão público + + + + Type instantiation length mismatch + Incompatibilidade de comprimento de instanciação de tipo + + + + Optional arguments not permitted here + Argumentos opcionais não são permitidos aqui + + + + {0} is not a static member + {0} não é um membro estático + + + + {0} is not an instance member + {0} não é um membro de instância + + + + Argument length mismatch + Incompatibilidade de comprimento do argumento + + + + The argument types don't match + Os tipos de argumento não coincidem + + + + This method expects a CLI 'params' parameter in this position. 'params' is a way of passing a variable number of arguments to a method in languages such as C#. Consider passing an array for this argument + Este método espera um parâmetro CLI 'params' nesta posição. 'params' é uma forma de transmitir um número de variável de argumentos para um método em linguagens como C#. Considere transmitir uma matriz para este argumento + + + + The member or object constructor '{0}' is not {1} + O construtor de membro ou objeto '{0}' não é {1} + + + + The member or object constructor '{0}' is not {1}. Private members may only be accessed from within the declaring type. Protected members may only be accessed from an extending type and cannot be accessed from inner lambda expressions. + O construtor de membro ou objeto '{0}' não é {1}. Membros particulares só podem ser acessados no tipo de declaração. Membros protegidos só podem ser acessados em um tipo de extensão e não podem ser acessados em expressões lambda internas. + + + + {0} is not a static method + {0} não é um método estático + + + + {0} is not an instance method + {0} não é um método de instância + + + + The member or object constructor '{0}' has no argument or settable return property '{1}'. {2}. + O construtor de membro ou objeto '{0}' não possui argumento ou propriedade de retorno configurável '{1}'. {2}. + + + + The object constructor '{0}' has no argument or settable return property '{1}'. {2}. + O construtor de objeto '{0}' não tem argumento ou propriedade de retorno configurável '{1}'. {2}. + + + + The required signature is {0} + A assinatura requerida é {0} + + + + The member or object constructor '{0}' requires {1} argument(s). The required signature is '{2}'. + O construtor de membro ou objeto '{0}' requer {1} argumentos. A assinatura requerida é '{2}'. + + + + The member or object constructor '{0}' requires {1} additional argument(s). The required signature is '{2}'. + O construtor de membro ou objeto '{0}' requer {1} argumentos adicionais. A assinatura requerida é '{2}'. + + + + The member or object constructor '{0}' requires {1} argument(s). The required signature is '{2}'. Some names for missing arguments are {3}. + O construtor de membro ou objeto '{0}' requer {1} argumentos. A assinatura requerida é '{2}'. Alguns nomes dos argumentos em falta são {3}. + + + + The member or object constructor '{0}' requires {1} additional argument(s). The required signature is '{2}'. Some names for missing arguments are {3}. + O construtor de membro ou objeto '{0}' requer {1} argumentos adicionais. A assinatura requerida é '{2}'. Alguns nomes dos argumentos em falta são {3}. + + + + The member or object constructor '{0}' requires {1} argument(s) but is here given {2} unnamed and {3} named argument(s). The required signature is '{4}'. + O construtor de membro ou objeto '{0}' requer {1} argumentos, mas aqui são fornecidos os argumentos sem nome {2} e nomeado {3}. A assinatura requerida é '{4}'. + + + + The member or object constructor '{0}' takes {1} argument(s) but is here given {2}. The required signature is '{3}'. + O construtor de membro ou objeto '{0}' obtém {1} argumentos, mas aqui são fornecidos {2}. A assinatura requerida é '{3}'. + + + + The object constructor '{0}' takes {1} argument(s) but is here given {2}. The required signature is '{3}'. + O construtor de objeto '{0}' obtém {1} argumentos, mas aqui são fornecidos {2}. A assinatura requerida é '{3}'. + + + + The object constructor '{0}' takes {1} argument(s) but is here given {2}. The required signature is '{3}'. If some of the arguments are meant to assign values to properties, consider separating those arguments with a comma (','). + O construtor de objeto '{0}' obtém {1} argumentos, mas aqui são fornecidos {2}. A assinatura requerida é '{3}'. Se alguns dos argumentos tiver que atribuir valores a propriedades, considere separar esses argumentos com uma vírgula (','). + + + + The member or object constructor '{0}' takes {1} type argument(s) but is here given {2}. The required signature is '{3}'. + O construtor de membro ou objeto '{0}' obtém argumentos de tipo {1}, mas aqui é dado {2}. A assinatura requerida é '{3}'. + + + + A member or object constructor '{0}' taking {1} arguments is not accessible from this code location. All accessible versions of method '{2}' take {3} arguments. + O construtor de objeto ou de membro '{0}' que obtém {1} argumentos não é acessível por meio desta localização do código. Todas as versões acessíveis do método '{2}' obtêm {3} argumentos. + + + + Incorrect generic instantiation. No {0} member named '{1}' takes {2} generic arguments. + Instanciação genérica incorreta. Nenhum membro {0} chamado '{1}' obtém argumentos genéricos {2}. + + + + The member or object constructor '{0}' does not take {1} argument(s). An overload was found taking {2} arguments. + O construtor de membro ou objeto '{0}' não obtém argumentos {1}. Uma sobrecarga foi encontrada ao obter argumentos {2}. + + + + No {0} member or object constructor named '{1}' takes {2} arguments + Nenhum membro {0} ou construtor de objeto com nome '{1}' obtém argumentos {2} + + + + No {0} member or object constructor named '{1}' takes {2} arguments. Note the call to this member also provides {3} named arguments. + Nenhum membro {0} ou construtor de objeto com nome '{1}' obtém argumentos {2}. Observe que a chamada para este membro também fornece argumentos com nome {3}. + + + + No {0} member or object constructor named '{1}' takes {2} arguments. The named argument '{3}' doesn't correspond to any argument or settable return property for any overload. + Nenhum membro {0} ou construtor de objeto com nome '{1}' obtém argumentos {2}. O argumento nomeado '{3}' não corresponde a nenhum argumento ou propriedade de retorno configurável para qualquer sobrecarga. + + + + Method or object constructor '{0}' not found + O método ou construtor de objeto '{0}' não foi encontrado + + + + No overloads match for method '{0}'. + Nenhuma sobrecarga corresponde ao método '{0}'. + + + + A unique overload for method '{0}' could not be determined based on type information prior to this program point. A type annotation may be needed. + Não foi possível determinar uma sobrecarga única para o método '{0}' com base nas informações de tipo anteriores a este ponto do programa. Uma anotação de tipo pode ser necessária. + + + + Candidates: {0} + Candidatos: {0} + + + + The available overloads are shown below. + As sobrecargas disponíveis são mostradas abaixo. + + + + Accessibility modifiers are not permitted on 'do' bindings, but '{0}' was given. + Os modificadores de acessibilidade não são permitidos em associações 'do', mas '{0}' foi fornecido. + + + + End of file in #if section begun at or after here + Fim de arquivo na seção #if iniciada aqui ou anteriormente + + + + End of file in string begun at or before here + Fim de arquivo na cadeia de caracteres iniciada aqui ou anteriormente + + + + End of file in verbatim string begun at or before here + Fim de arquivo na cadeia de caracteres textual iniciada aqui ou anteriormente + + + + End of file in comment begun at or before here + Fim de arquivo no comentário iniciado aqui ou anteriormente + + + + End of file in string embedded in comment begun at or before here + Fim de arquivo na cadeia de caracteres inserida no comentário iniciado aqui ou anteriormente + + + + End of file in verbatim string embedded in comment begun at or before here + Fim de arquivo na cadeia de caracteres textual inserida no comentário iniciado aqui ou anteriormente + + + + End of file in IF-OCAML section begun at or before here + Fim de arquivo na seção de IF-OCAML iniciada aqui ou anteriormente + + + + End of file in directive begun at or before here + Fim de arquivo na diretiva iniciada aqui ou anteriormente + + + + No #endif found for #if or #else + Nenhum #endif encontrado para #if ou #else + + + + Attributes have been ignored in this construct + Os atributos foram ignorados neste constructo + + + + 'use' bindings are not permitted in primary constructors + As associações 'use' não são permitidas em construtores primários + + + + 'use' bindings are not permitted in modules and are treated as 'let' bindings + Não são permitidas associações 'use' em módulos e são tratadas como ligações 'let' + + + + An integer for loop must use a simple identifier + Um inteiro para um loop precisa usar um identificador simples + + + + At most one 'with' augmentation is permitted + No máximo um aumento 'with' é permitido + + + + A semicolon is not expected at this point + Não é esperado ponto-e-vírgula neste ponto + + + + Unexpected end of input + Final da entrada inesperado + + + + Accessibility modifiers are not permitted here, but '{0}' was given. + Os modificadores de acessibilidade não são permitidos aqui, mas '{0}' foi fornecido. + + + + Only '#' compiler directives may occur prior to the first 'namespace' declaration + Apenas diretivas de compilador '#' podem ficar antes da primeira declaração de 'namespace' + + + + Accessibility modifiers should come immediately prior to the identifier naming a construct + Modificadores de acessibilidade devem vir imediatamente antes do identificador na nomeação de um constructo + + + + Files should begin with either a namespace or module declaration, e.g. 'namespace SomeNamespace.SubNamespace' or 'module SomeNamespace.SomeModule', but not both. To define a module within a namespace use 'module SomeModule = ...' + Os arquivos devem começar com a declaração de um namespace ou de um módulo, como 'namespace SomeNamespace.SubNamespace' ou 'module SomeNamespace.SomeModule', mas não ambos. Para definir um módulo dentro de um namespace, use 'module SomeModule =...' + + + + A module abbreviation must be a simple name, not a path + Uma abreviação de módulo precisa ser um nome simples, não um caminho + + + + Ignoring attributes on module abbreviation + Ignorando atributos em abreviação de módulo + + + + The '{0}' accessibility attribute is not allowed on module abbreviation. Module abbreviations are always private. + O atributo de acessibilidade '{0}' não é permitido na abreviação de módulo. As abreviações de módulo são sempre particulares. + + + + The '{0}' visibility attribute is not allowed on module abbreviation. Module abbreviations are always private. + O atributo de visibilidade '{0}' não é permitido na abreviação de módulo. As abreviações de módulo são sempre particulares. + + + + Unclosed block + Bloco não foi fechado + + + + Unmatched 'begin' or 'struct' + 'begin' ou 'struct' incompatível + + + + A module name must be a simple name, not a path + Um nome de módulo precisa ser um nome simples, não um caminho + + + + Unexpected empty type moduleDefn list + Lista de moduleDefn do tipo vazio inesperada + + + + Attributes should be placed before 'val' + Atributos devem ser localizados antes de 'val' + + + + Attributes are not permitted on interface implementations + Os atributos não são permitidos em implementações de interface + + + + Syntax error + Erro de sintaxe + + + + Augmentations are not permitted on delegate type moduleDefns + Aumentos não são permitidos no tipo delegado moduleDefns + + + + Unmatched 'class', 'interface' or 'struct' + 'class', 'interface' ou 'struct' incompatível + + + + A type definition requires one or more members or other declarations. If you intend to define an empty class, struct or interface, then use 'type ... = class end', 'interface end' or 'struct end'. + Uma definição de tipo requer um ou mais membros ou outras declarações. Se você pretende definir uma classe vazia, struct ou interface, então use 'type ... = class end', 'interface end' ou 'struct end'. + + + + Unmatched 'with' or badly formatted 'with' block + 'with' incompatível ou bloco 'with' mal formatado + + + + 'get', 'set' or 'get,set' required + 'get', 'set' ou 'get,set' necessários + + + + Only class types may take value arguments + Apenas tipos de classe podem ter argumentos de valor + + + + Unmatched 'begin' + 'begin' incompatível + + + + Invalid declaration syntax + Declaração de sintaxe inválida + + + + 'get' and/or 'set' required + 'get' e/ou 'set' necessários + + + + Type annotations on property getters and setters must be given after the 'get()' or 'set(v)', e.g. 'with get() : string = ...' + Anotações de tipo em getters e setters de propriedade devem ser fornecidas após o 'get()' ou 'set(v)', por exemplo: 'with get() : string = ...' + + + + A getter property is expected to be a function, e.g. 'get() = ...' or 'get(index) = ...' + Espera-se que uma propriedade getter seja uma função, por exemplo, 'get() = ...' ou 'get(índice) = ...' + + + + Multiple accessibilities given for property getter or setter + Acessibilidades múltiplas fornecidas para getter ou setter de propriedade + + + + Property setters must be defined using 'set value = ', 'set idx value = ' or 'set (idx1,...,idxN) value = ... ' + Setters de propriedade devem ser definidos com o uso de 'set value = ', 'set idx value = ' ou 'set (idx1,...,idxN) value = ... ' + + + + Interfaces always have the same visibility as the enclosing type + Interfaces sempre possuem a mesma visibilidade que o tipo de delimitador + + + + Accessibility modifiers are not allowed on this member. Abstract slots always have the same visibility as the enclosing type. + Modificadores de acessibilidade não são permitidos neste membro. Slots abstratos sempre têm a mesma visibilidade que o tipo de delimitador. + + + + Attributes are not permitted on 'inherit' declarations + Não são permitidos atributos em declarações 'inherit' + + + + Accessibility modifiers are not permitted on an 'inherits' declaration + Modificadores de acessibilidade não são permitidos em uma declaração 'inherits' + + + + 'inherit' declarations cannot have 'as' bindings. To access members of the base class when overriding a method, the syntax 'base.SomeMember' may be used; 'base' is a keyword. Remove this 'as' binding. + Declarações 'inherit' não podem ter associações 'as'. Para acessar membros de classe base quando um método estiver sendo substituído pode se usar a sintaxe 'base.SomeMember'; 'base' é uma palavra-chave. Remova essa associação 'as'. + + + + Attributes are not allowed here + Não são permitidos atributos aqui + + + + Accessibility modifiers are not permitted in this position for type abbreviations + Modificadores de acessibilidade não são permitidos nesta posição para abreviações do tipo + + + + Accessibility modifiers are not permitted in this position for enum types + Modificadores de acessibilidade não são permitidos nesta posição para tipos enum + + + + All enum fields must be given values + Todos campos enum devem ser valores especificados + + + + Accessibility modifiers are not permitted on inline assembly code types + Modificadores de acessibilidade não são permitidos em tipo de código de assembly embutido + + + + Unexpected identifier: '{0}' + Identificador inesperado: '{0}' + + + + Accessibility modifiers are not permitted on union cases. Use 'type U = internal ...' or 'type U = private ...' to give an accessibility to the whole representation. + Modificadores de acessibilidade não são permitidos em casos união. Use ' type U = internal... ' ou ' type U = private... ' para dar uma acessibilidade à representação inteira. + + + + Accessibility modifiers are not permitted on enumeration fields + Modificadores de acessibilidade não são permitidos em campos de enumeração + + + + Consider using a separate record type instead + Considere usar um tipo de registro separado em vez disso + + + + Accessibility modifiers are not permitted on record fields. Use 'type R = internal ...' or 'type R = private ...' to give an accessibility to the whole representation. + Modificadores de acessibilidade não são permitidos nos campos de registros. Use 'type R = internal ...' ou 'type R = private ...' para dar uma acessibilidade à representação inteira. + + + + The declaration form 'let ... and ...' for non-recursive bindings is not used in F# code. Consider using a sequence of 'let' bindings + A forma de declaração 'let ... and ...' para associações não recursivas não são usadas em código F#. Considere usar uma sequência de associações 'let' + + + + Unmatched '(' + '(' incompatível + + + + Successive patterns should be separated by spaces or tupled + Padrões sucessivos devem ser separados por espaços ou serem tuplas. + + + + No matching 'in' found for this 'let' + Nenhum 'in' correspondente encontrado para 'let' + + + + Error in the return expression for this 'let'. Possible incorrect indentation. + Erro na expressão de retorno para este 'let'. Possível recuo incorreto. + + + + The block following this '{0}' is unfinished. Every code block is an expression and must have a result. '{1}' cannot be the final code element in a block. Consider giving this block an explicit result. + O bloco após '{0}' está inacabado. Cada bloco de código é uma expressão e deve ter um resultado. '{1}' não pode ser o elemento de código final em um bloco. Considere dar a este bloco um resultado explícito. + + + + Incomplete conditional. Expected 'if <expr> then <expr>' or 'if <expr> then <expr> else <expr>'. + Condicional incompleta. Esperado 'if <expr> then <expr>' ou 'if <expr> then <expr> else <expr>'. + + + + 'assert' may not be used as a first class value. Use 'assert <expr>' instead. + 'assert' não pode ser usado como um valor de primeira classe. Em vez disso, use 'assert <expr>'. + + + + Identifier expected + Identificador esperado + + + + 'in' or '=' expected + 'in' ou '=' esperado + + + + The use of '->' in sequence and computation expressions is limited to the form 'for pat in expr -> expr'. Use the syntax 'for ... in ... do ... yield...' to generate elements in more complex sequence expressions. + O uso de '->' em sequência e expressões computacionais é limitado à forma 'for pat in expr -> expr'. Use a sintaxe 'for ... in ... do ... yield...' para gerar elementos em expressões de sequência mais complexas. + + + + Successive arguments should be separated by spaces or tupled, and arguments involving function or method applications should be parenthesized + Argumentos sucessivos devem ser separados por espaços ou serem tuplas; argumentos envolvendo aplicações de função ou de método devem estar entre parênteses + + + + Unmatched '[' + '[' incompatível + + + + Missing qualification after '.' + Qualificação após '.' ausente + + + + In F# code you may use 'expr.[expr]'. A type annotation may be required to indicate the first expression is an array + No código F#, é possível usar o 'expr.[expr]'. Uma anotação de tipo pode ser necessária para indicar que a primeira expressão é uma matriz + + + + Mismatched quotation, beginning with '{0}' + Cotação incompatível, começando com '{0}' + + + + Unmatched '{0}' + '{0}' incompatível + + + + Unmatched '[|' + '[|' incompatível + + + + Unmatched '{{' + '{{' incompatível + + + + Field bindings must have the form 'id = expr;' + Associações de campo devem ter a forma ' id = expr; ' + + + + This member is not permitted in an object implementation + Este membro não é permitido em uma implementação do objeto + + + + Missing function body + Corpo de função ausente + + + + Syntax error in labelled type argument + Erro de sintaxe no argumento de tipo rotulado + + + + Unexpected infix operator in type expression + Operador infixo inesperado na expressão de tipo + + + + The syntax '(typ,...,typ) ident' is not used in F# code. Consider using 'ident<typ,...,typ>' instead + A sintaxe '(typ,...,typ) ident' não é usada em código F#. Considere o uso de 'ident<typ,...,typ>' ao invés dela + + + + Invalid literal in type + Literal inválido no tipo + + + + Unexpected infix operator in unit-of-measure expression. Legal operators are '*', '/' and '^'. + Operador infixo inesperado na expressão de unidade de medida. Os operadores válidos são '*','/' e '^'. + + + + Unexpected integer literal in unit-of-measure expression + Literal de inteiro inesperado na expressão de unidade de medida + + + + Syntax error: unexpected type parameter specification + Erro de sintaxe: especificação de parâmetro de tipo inesperada + + + + Mismatched quotation operator name, beginning with '{0}' + Nome de operador de cotação incompatível, começando com '{0}' + + + + Active pattern case identifiers must begin with an uppercase letter + Identificadores de caso de padrão ativo precisam ser iniciados com uma letra maiúscula + + + + The '|' character is not permitted in active pattern case identifiers + O caractere '|' não é permitido em identificadores de caso de padrão ativo + + + + Denominator must not be 0 in unit-of-measure exponent + O denominador não deve ser 0 no expoente de unidade de medida + + + + No '=' symbol should follow a 'namespace' declaration + Nenhum símbolo '=' deve seguir uma declaração 'namespace' + + + + The syntax 'module ... = struct .. end' is not used in F# code. Consider using 'module ... = begin .. end' + A sintaxe 'module ... = struct .. end' não é usada no código F#. Considere usar 'module ... = begin .. end' + + + + The syntax 'module ... : sig .. end' is not used in F# code. Consider using 'module ... = begin .. end' + A sintaxe 'module ... : sig .. end' não é usada no código F#. Considere usar 'module ... = begin .. end' + + + + A static field was used where an instance field is expected + Um campo estático foi usado onde era esperado um campo de instância + + + + Method '{0}' is not accessible from this code location + O método '{0}' não é acessível no local deste código + + + + Implicit product of measures following / + Produto de medida implícito seguindo / + + + + Unexpected SynMeasure.Anon + SynMeasure.Anon Inesperado + + + + Non-zero constants cannot have generic units. For generic zero, write 0.0<_>. + Constantes não nulas não podem ter unidades genéricas. Para um zero genérico, grave 0.0<_>. + + + + In sequence expressions, results are generated using 'yield' + Em expressões de sequência, os resultados são gerados com o uso de 'yield' + + + + Unexpected big rational constant + Constante racional grande inesperada + + + + Units-of-measure supported only on float, float32, decimal and signed integer types + Unidades de medida só são suportadas em tipos float, float32, decimal e inteiro com sinal + + + + Unexpected Const_uint16array + Const_uint16array inesperado + + + + Unexpected Const_bytearray + Const_bytearray inesperado + + + + A parameter with attributes must also be given a name, e.g. '[<Attribute>] Name : Type' + Um parâmetro com atributos também deve receber um nome, por exemplo, '[<Atributo>] Nome : Tipo' + + + + Return values cannot have names + Valores retornados não podem ter nomes + + + + MemberKind.PropertyGetSet only expected in parse trees + MemberKind.PropertyGetSet só é esperado em árvores de análise + + + + Namespaces cannot contain values. Consider using a module to hold your value declarations. + Namespaces não podem conter valores. Considere usar um módulo para isentar suas declarações de valores. + + + + Namespaces cannot contain extension members except in the same file and namespace declaration group where the type is defined. Consider using a module to hold declarations of extension members. + Namespaces não podem conter membros de extensão, exceto no mesmo arquivo e grupo de declaração de namespace, em que o tipo é definido. Considere o uso de um módulo para reter declarações de membros de extensão. + + + + Multiple visibility attributes have been specified for this identifier + Atributos de visibilidade múltipla foram especificados por este identificador + + + + Multiple visibility attributes have been specified for this identifier. 'let' bindings in classes are always private, as are any 'let' bindings inside expressions. + Atributos de visibilidade múltipla foram especificados por este identificador. Associações 'let' em classes são sempre privadas, como quaisquer associações 'let' nestas expressões. + + + + The name '({0})' 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 '{1}' instead. + O nome '({0})' não deve ser usado como um nome de membro. Para definir semânticas de comparação para um tipo, implemente a interface 'System.IComparable'. Se for definir um membro estático para uso em outras linguagens CLI use o nome '{1}'. + + + + The name '({0})' 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 '{1}' instead. + O nome '({0})' não deve ser usado como um nome de membro. Para definir a semântica de igualdade substitua o membro 'Object.Equals'. Se for definir um membro estático para uso em outras linguagens CLI, use o nome '{1}'. + + + + The name '({0})' should not be used as a member name. If defining a static member for use from other CLI languages then use the name '{1}' instead. + O nome '({0})' não deve ser usado como um nome de membro. Se for definir um membro estático para uso em outras linguagens CLI, use o nome '{1}'. + + + + The name '({0})' should not be used as a member name because it is given a standard definition in the F# library over fixed types + O nome '({0})' não deve ser usado como um nome de membro porque ele é dado a uma definição padrão na biblioteca F# sobre tipos fixos + + + + The '{0}' operator should not normally be redefined. To define overloaded comparison semantics for a particular type, implement the 'System.IComparable' interface in the definition of that type. + O operador '{0}' não deve ser referenciado normalmente. Para definir semânticas de comparação sobrecarregadas para um tipo particular, implemente a interface 'System.IComparable' na definição deste tipo. + + + + The '{0}' operator should not normally be redefined. To define equality semantics for a type, override the 'Object.Equals' member in the definition of that type. + O operador '{0}' não deve ser referenciado normalmente. Para definir semânticas de igualdade para um tipo, substitua o membro 'Object.Equals' na definição deste tipo. + + + + The '{0}' operator should not normally be redefined. Consider using a different operator name + O operador '{0}' não deve ser referenciado normalmente. Considere usar um nome de operador diferente + + + + The '{0}' operator cannot be redefined. Consider using a different operator name + O operador '{0}' não pode ser redefinido. Considere usar um nome de operador diferente + + + + Expected module or namespace parent {0} + Pai de módulo ou namespace {0} esperado + + + + The struct, record or union type '{0}' implements the interface 'System.IComparable' explicitly. You must apply the 'CustomComparison' attribute to the type. + O tipo struct, registro ou união '{0}' implementa explicitamente a interface 'System.IComparable'. Você deve aplicar o atributo 'CustomComparison' ao tipo. + + + + The struct, record or union type '{0}' implements the interface 'System.IComparable<_>' explicitly. You must apply the 'CustomComparison' attribute to the type, and should also provide a consistent implementation of the non-generic interface System.IComparable. + O tipo de struct, registro ou união '{0}' implementa explicitamente a interface 'System.IComparable<_>'. Você deve aplicar o atributo 'CustomComparison' ao tipo, além de fornecer uma implementação consistente da interface não genérica System.IComparable. + + + + The struct, record or union type '{0}' implements the interface 'System.IStructuralComparable' explicitly. Apply the 'CustomComparison' attribute to the type. + O tipo de struct, registro ou união '{0}' implementa explicitamente a interface 'System.IStructuralComparable'. Aplique o atributo 'CustomComparison' ao tipo. + + + + This record contains fields from inconsistent types + Este registro contém campos de tipos inconsistentes + + + + DLLImport stubs cannot be inlined + Stubs DLLImport não podem ser embutidos + + + + Structs may only bind a 'this' parameter at member declarations + Os structs só podem vincular um parâmetro 'this' em declarações de membros + + + + Unexpected expression at recursive inference point + Expressão inesperada no ponto de inferência recursiva + + + + This code is less generic than required by its annotations because the explicit type variable '{0}' could not be generalized. It was constrained to be '{1}'. + Este código é menos genérico que o requerido por suas anotações porque não foi possível gerar a variável de tipo explícito '{0}'. Ela foi restrita para ser '{1}'. + + + + One or more of the explicit class or function type variables for this binding could not be generalized, because they were constrained to other types + Uma ou mais classes explícitas ou variáveis de tipo função explícita para essa associação não puderam ser geradas, porque foram restritas a outros tipos + + + + A generic type parameter has been used in a way that constrains it to always be '{0}' + Um parâmetro de tipo genérico foi usado de modo que ficou restrito a ser sempre '{0}' + + + + This type parameter has been used in a way that constrains it to always be '{0}' + Este parâmetro de tipo foi usado de forma que fique restrito a ser sempre '{0}' + + + + The type parameters inferred for this value are not stable under the erasure of type abbreviations. This is due to the use of type abbreviations which drop or reorder type parameters, e.g. \n\ttype taggedInt<'a> = int or\n\ttype swap<'a,'b> = 'b * 'a.\nConsider declaring the type parameters for this value explicitly, e.g.\n\tlet f<'a,'b> ((x,y) : swap<'b,'a>) : swap<'a,'b> = (y,x). + Os parâmetros de tipo inferidos para este valor não são estáveis sob a eliminação de abreviações de tipo. Isso ocorre devido ao uso de abreviações de tipo que cancelam ou reorganizam os parâmetros de tipo, isto é \n\ttype taggedInt<'a> = int or\n\ttype swap<'a,'b> = 'b * 'a.\nConsidere declarar os parâmetros de tipo para este valor explicitamente, isto é\n\tlet f<'a,'b> ((x,y) : swap<'b,'a>) : swap<'a,'b> = (y,x). + + + + Explicit type parameters may only be used on module or member bindings + Parâmetros de tipo explícitos só podem ser usados em associações de módulo ou membro + + + + You must explicitly declare either all or no type parameters when overriding a generic abstract method + Você deve declarar explicitamente todos ou nenhum parâmetro de tipo quando for substituir um método abstrato genérico + + + + The field labels and expected type of this record expression or pattern do not uniquely determine a corresponding record type + Os rótulos de campo e tipo esperado desta expressão ou padrão de registro não determinam exclusivamente um tipo de registro correspondente + + + + The field '{0}' appears twice in this record expression or pattern + O campo '{0}' aparece duas vezes nesta expressão de registro ou padrão + + + + Unknown union case + Caso união desconhecido + + + + This code is not sufficiently generic. The type variable {0} could not be generalized because it would escape its scope. + Este código não é suficientemente genérico. A variável de tipo {0} não pode ser gerada porque ela escaparia de seu escopo. + + + + A property cannot have explicit type parameters. Consider using a method instead. + Uma propriedade não pode ter parâmetros de tipo explícito. Considere usar um método. + + + + A constructor cannot have explicit type parameters. Consider using a static construction method instead. + Um construtor não pode ter parâmetros de tipo explícitos. Considere usar um método de construção estática. + + + + This instance member needs a parameter to represent the object being invoked. Make the member static or use the notation 'member x.Member(args) = ...'. + Este membro de instância precisa de um parâmetro para representar um objeto a ser chamado. Deixe o membro estático ou use a notação 'membro x.Membro(argumentos) = ...'. + + + + Unexpected source-level property specification in syntax tree + Especificação de propriedade em nível de código inesperada na árvore de sintaxe + + + + A static initializer requires an argument + Um inicializador estático requer um argumento + + + + An object constructor requires an argument + Um construtor de objeto requer um argumento + + + + This static member should not have a 'this' parameter. Consider using the notation 'member Member(args) = ...'. + Este membro estático não deve ter um parâmetro 'this'. Considere usar a notação 'member Member(args) = ...'. + + + + An explicit static initializer should use the syntax 'static new(args) = expr' + Um inicializador estático explícito deve usar a sintaxe 'static new(args) = expr' + + + + An explicit object constructor should use the syntax 'new(args) = expr' + Um construtor de objeto explícito deve usar a sintaxe 'new(args) = expr' + + + + Unexpected source-level property specification + Especificação de propriedade no nível da origem inesperada + + + + This form of object expression is not used in F#. Use 'member this.MemberName ... = ...' to define member implementations in object expressions. + Esta forma de expressão de objeto não é usada em F#. Use 'member this.MemberName ... = ...' para definir implementações de membros em expressões de objetos. + + + + Invalid declaration + Declaração inválida + + + + Attributes are not allowed within patterns + Atributos não são permitidos em padrões + + + + The generic function '{0}' must be given explicit type argument(s) + Argumentos de tipo explícito devem ser dados à função genérica '{0}' + + + + The method or function '{0}' should not be given explicit type argument(s) because it does not declare its type parameters explicitly + O método ou função '{0}' não deverá receber argumentos de tipo explícito porque eles não declaram explicitamente seus parâmetros de tipo + + + + This value, type or method expects {0} type parameter(s) but was given {1} + Este valor, tipo ou método espera parâmetros de tipo {0}, mas foi dado {1} + + + + The default, zero-initializing constructor of a struct type may only be used if all the fields of the struct type admit default initialization + O construtor padrão de um tipo struct iniciado com zero só pode ser usado se todos os campos do tipo struct admitirem inicialização padrão + + + + Couldn't find Dispose on IDisposable, or it was overloaded + Não foi possível localizar Dispose em IDisposable, ou ele estava sobrecarregado + + + + This value is not a literal and cannot be used in a pattern + Este valor não é um literal e não pode ser usado em um padrão + + + + This field is readonly + Este campo é somente leitura + + + + Named arguments must appear after all other arguments + Argumentos nomeados devem aparecer depois de todos os argumentos + + + + This function value is being used to construct a delegate type whose signature includes a byref argument. You must use an explicit lambda expression taking {0} arguments. + Este valor de função está sendo usado para construir um tipo delegado cuja assinatura inclui argumento byref. Você deve usar uma expressão lambda que obtenha argumentos {0}. + + + + The type '{0}' is not a type whose values can be enumerated with this syntax, i.e. is not compatible with either seq<_>, IEnumerable<_> or IEnumerable and does not have a GetEnumerator method + O tipo '{0}' não é um tipo cujos valores possam ser enumerados com esta sintaxe, ou seja, não é compatível com seq<_>, IEnumerable<_> ou IEnumerable e não tem um método GetEnumerator + + + + This recursive binding uses an invalid mixture of recursive forms + Esta associação recursiva usa uma mistura inválida de formas recursivas + + + + This is not a valid object construction expression. Explicit object constructors must either call an alternate constructor or initialize all fields of the object and specify a call to a super class constructor. + Esta não é uma expressão de construção de objeto válida. Construtores de objeto explícitos devem chamar um construtor alternativo ou então iniciar todos os campos do objeto e especificar uma chamada para um construtor de superclasse. + + + + Invalid constraint + Restrição inválida + + + + Invalid constraint: the type used for the constraint is sealed, which means the constraint could only be satisfied by at most one solution + Restrição inválida: o tipo usado para restrição está selado, o que significa que a restrição só pode ser satisfeita por no máximo uma solução + + + + An 'enum' constraint must be of the form 'enum<type>' + Uma restrição 'enum' deve ser da forma 'enum<type>' + + + + 'new' constraints must take one argument of type 'unit' and return the constructed type + Restrições 'new' devem pegar um argumento do tipo 'unit' e retornar o tipo construído + + + + This property has an invalid type. Properties taking multiple indexer arguments should have types of the form 'ty1 * ty2 -> ty3'. Properties returning functions should have types of the form '(ty1 -> ty2)'. + Esta propriedade possui um tipo inválido. Propriedades que pegam argumentos de indexador múltiplo devem ter tipos da forma 'ty1 * ty2 -> ty3'. Propriedades que retornam funções devem ter tipos da seguinte forma '(ty1 -> ty2)'. + + + + Expected unit-of-measure parameter, not type parameter. Explicit unit-of-measure parameters must be marked with the [<Measure>] attribute. + Um parâmetro de unidade de medida é esperado, não um parâmetro de tipo. Parâmetros de unidade de medida explícitos devem ser marcados com o atributo [<Measure>]. + + + + Expected type parameter, not unit-of-measure parameter + Um parâmetro de tipo é esperado, não um parâmetro de unidade de medida + + + + Expected type, not unit-of-measure + Tipo esperado, não unidade de medida + + + + Expected unit-of-measure, not type + Unidade de medida esperada, não tipo + + + + Units-of-measure cannot be used as prefix arguments to a type. Rewrite as postfix arguments in angle brackets. + As unidades de medida não podem ser usadas como argumentos de prefixo para um tipo. Reescreva como argumentos de sufixo entre colchetes. + + + + Unit-of-measure cannot be used in type constructor application + A unidade de medida não pode ser usada em aplicativos de construtor de tipo + + + + This control construct may only be used if the computation expression builder defines a '{0}' method + Esta construção de controle só é usada se o compilador de expressões de computação definir um método '{0}' + + + + This type has no nested types + Este tipo não possui tipos aninhados + + + + Unexpected {0} in type expression + {0} inesperado na expressão de tipo + + + + Type parameter cannot be used as type constructor + O parâmetro de tipo não pode ser usado como construtor de tipo + + + + Illegal syntax in type expression + Sintaxe inválida na expressão de tipo + + + + Anonymous unit-of-measure cannot be nested inside another unit-of-measure expression + Uma medida de unidade anônima não poder ser aninhada dentro de outra expressão de unidade de medida + + + + Anonymous type variables are not permitted in this declaration + Variáveis de tipos anônimos não são permitidas nesta declaração + + + + Unexpected / in type + Inesperado / em tipo + + + + Unexpected type arguments + Argumentos de tipo inesperados + + + + Optional arguments are only permitted on type members + Argumentos opcionais somente são permitidos em membros do tipo + + + + Name '{0}' not bound in pattern context + Nome '{0}' não associado no contexto de padrão + + + + Non-primitive numeric literal constants cannot be used in pattern matches because they can be mapped to multiple different types through the use of a NumericLiteral module. Consider using replacing with a variable, and use 'when <variable> = <constant>' at the end of the match clause. + Restrições de literais numéricos não primitivos não podem ser usadas em correspondências padrões porque podem ser mapeadas para multiplicar tipos diferentes através do uso de um módulo NumericLiteral. Considere substituir por uma variável e use 'when <variável> = <constante>' no final da cláusula de correspondência. + + + + Type arguments cannot be specified here + Argumentos de tipos não podem ser especificados aqui + + + + Only active patterns returning exactly one result may accept arguments + Somente padrões ativos que retornam exatamente um resultado podem aceitar argumentos + + + + Invalid argument to parameterized pattern label + Argumento inválido para rótulo padrão parametrizado + + + + Internal error. Invalid index into active pattern array + Erro interno. Indexação inválida em matriz de padrão ativa + + + + This union case does not take arguments + Este caso união não obtém argumentos + + + + This union case takes one argument + Este caso união obtém um argumento + + + + This union case expects {0} arguments in tupled form + Este caso união espera argumentos {0} na forma de tupla + + + + Field '{0}' is not static + O campo '{0}' não é estático + + + + This field is not a literal and cannot be used in a pattern + Este campo não é um literal e não pode ser usado como um padrão + + + + This is not a variable, constant, active recognizer or literal + Isto não é uma variável, constante, reorganizador ativo ou literal + + + + This is not a valid pattern + Este não é um padrão válido + + + + Character range matches have been removed in F#. Consider using a 'when' pattern guard instead. + Correspondências de intervalo de caractere foram removidas em F#. Considere usar um 'when' na proteção padrão. + + + + Illegal pattern + Padrão inválido + + + + Syntax error - unexpected '?' symbol + Erro de sintaxe - símbolo '?' inesperado + + + + Expected {0} expressions, got {1} + Expressões {0} esperadas, {1} obtidas + + + + TcExprUndelayed: delayed + TcExprUndelayed: atrasado + + + + This expression form may only be used in sequence and computation expressions + Este forma de expressão só pode ser utilizada em expressões de computação e sequência + + + + Invalid object expression. Objects without overrides or interfaces should use the expression form 'new Type(args)' without braces. + Expressão de objeto inválida. Objetos sem substituições ou interfaces devem usar o formato de expressão 'new Type(args)' sem as chaves. + + + + Invalid object, sequence or record expression + Expressão de objeto, sequência ou registro inválida + + + + Invalid record, sequence or computation expression. Sequence expressions should be of the form 'seq {{ ... }}' + Expressão de registro, sequência ou computação inválida. Expressões de sequência devem estar na forma 'seq {{ ... }}' + + + + This list or array expression includes an element of the form 'if ... then ... else'. Parenthesize this expression to indicate it is an individual element of the list or array, to disambiguate this from a list generated using a sequence expression + Esta expressão de lista ou matriz inclui um elemento da forma 'if ... then ... else'. Use parênteses nesta expressão para indicar os elementos individuais da lista ou matriz. Use uma expressão de sequência para tirar esta ambiguidade desta lista gerada + + + + Unable to parse format string '{0}' + Não é possível analisar a cadeia de caracteres de formato '{0}' + + + + This list expression exceeds the maximum size for list literals. Use an array for larger literals and call Array.ToList. + Esta expressão de lista excede o tamanho máximo para literais de lista. Use uma matriz para literais maiores e chame Array.ToList. + + + + The expression form 'expr then expr' may only be used as part of an explicit object constructor + A forma de expressão 'expr then expr' só pode ser usada como parte de um construtor de objeto explícito + + + + Named arguments cannot be given to member trait calls + Argumentos nomeados não podem ser dados às chamadas características de membros + + + + This is not a valid name for an enumeration case + Este não é um nome válido para um caso de enumeração + + + + This field is not mutable + Este campo não é mutável + + + + This construct may only be used within list, array and sequence expressions, e.g. expressions of the form 'seq {{ ... }}', '[ ... ]' or '[| ... |]'. These use the syntax 'for ... in ... do ... yield...' to generate elements + Esse constructo só pode ser utilizado em expressões de lista, de matriz e de sequência, como expressões da forma 'seq {{ ... }}', '[ ... ]' ou '[| ... |]', por exemplo. Elas usam a sintaxe 'for ... in ... do ... yield...' para gerar elementos + + + + This construct may only be used within computation expressions. To return a value from an ordinary function simply write the expression without 'return'. + Esse constructo só pode ser utilizado em expressões de computação. Para retornar um valor de uma função comum apenas escreva a expressão sem o 'return'. + + + + This construct may only be used within sequence or computation expressions + Esse constructo só pode ser utilizado em expressões de sequência ou computação + + + + This construct may only be used within computation expressions + Esse constructo só pode ser utilizado em expressões de computação + + + + Invalid indexer expression + Expressão de indexador inválida + + + + The operator 'expr.[idx]' has been used on an object of indeterminate type based on information prior to this program point. Consider adding further type constraints + O operador 'expr.[idx]' foi usado em um objeto de tipo indeterminado baseado em informações anteriores a este ponto do programa. Considere adicionar novas restrições de tipo + + + + Cannot inherit from a variable type + Não é possível herdar de um tipo de variável + + + + Calls to object constructors on type parameters cannot be given arguments + Chamadas para construtores de objeto sobre parâmetros de tipo não podem receber argumentos + + + + The 'CompiledName' attribute cannot be used with this language element + O atributo 'CompiledName' não pode ser usado com este elemento de linguagem + + + + '{0}' may only be used with named types + '{0}' só podem ser usados com tipos nomeados + + + + 'inherit' cannot be used on interface types. Consider implementing the interface by using 'interface ... with ... end' instead. + 'inherit' não pode ser usado em tipos de interface. Considere implementar a interface usando 'interface ... with ... end'. + + + + 'new' cannot be used on interface types. Consider using an object expression '{{ new ... with ... }}' instead. + new' não pode ser usado em tipos de interface. Considere usar uma expressão de objeto '{{ new ... with ... }}'. + + + + Instances of this type cannot be created since it has been marked abstract or not all methods have been given implementations. Consider using an object expression '{{ new ... with ... }}' instead. + Instâncias desse tipo não podem ser criadas uma vez que elas foram marcadas como abstratas ou nem todos os métodos receberam implementações. Considere usar uma expressão de objeto '{{ new ... with ... }}' em vez disso. + + + + It is recommended that objects supporting the IDisposable interface are created using the syntax 'new Type(args)', rather than 'Type(args)' or 'Type' as a function value representing the constructor, to indicate that resources may be owned by the generated value + Recomenda-se que objetos que deem suporte à interface IDisposable sejam criados usando a sintaxe 'new Type(args)', em vez de 'Type(args)' ou 'Type' como um valor de função representando o construtor, para indicar que os recursos podem ser de propriedade do valor gerado + + + + '{0}' may only be used to construct object types + '{0}' só podem ser usados para tipos de objetos de constructo + + + + Constructors for the type '{0}' must directly or indirectly call its implicit object constructor. Use a call to the implicit object constructor instead of a record expression. + Construtores para o tipo '{0}' devem chamar seu construtor de objeto implícito direta ou indiretamente. Use uma chamada para o construtor de objeto implícito em vez de uma expressão de registro. + + + + The field '{0}' has been given a value, but is not present in the type '{1}' + O campo '{0}' recebeu um valor, mas ele não está presente no tipo '{1}' + + + + No assignment given for field '{0}' of type '{1}' + Nenhuma atribuição foi dada ao campo '{0}' do tipo '{1}' + + + + Extraneous fields have been given values + Campos incorretos receberam valores + + + + Only overrides of abstract and virtual members may be specified in object expressions + Apenas substituições de membros abstratos e virtuais podem ser especificadas nas expressões de objeto + + + + The member '{0}' does not correspond to any abstract or virtual method available to override or implement. + O membro '{0}' não corresponde a nenhum método virtual ou abstrato disponível para substituição ou implementação. + + + + The type {0} contains the member '{1}' but it is not a virtual or abstract method that is available to override or implement. + O tipo {0} contém o membro '{1}', mas ele não é um método virtual ou abstrato disponível para substituição ou implementação. + + + + The member '{0}' does not accept the correct number of arguments. {1} argument(s) are expected, but {2} were given. The required signature is '{3}'.{4} + O membro '{0}' não aceita o número correto de argumentos. São esperados {1} argumentos, mas foram fornecidos {2}. A assinatura exigida é '{3}'.{4} + + + + The member '{0}' does not accept the correct number of arguments. One overload accepts {1} arguments, but {2} were given. The required signature is '{3}'.{4} + O membro '{0}' não aceita o número correto de argumentos. Uma sobrecarga aceita {1} argumentos, mas {2} foram fornecidos. A assinatura exigida é '{3}'.{4} + + + + A simple method name is required here + Um nome de método simples é requerido aqui + + + + The types System.ValueType, System.Enum, System.Delegate, System.MulticastDelegate and System.Array cannot be used as super types in an object expression or class + Os tipos System.ValueType, System.Enum, System.Delegate, System.MulticastDelegate e System.Array não podem ser usados como supertipos em uma expressão ou classe de objeto + + + + 'new' must be used with a named type + 'new' deve ser usado com um tipo nomeado + + + + Cannot create an extension of a sealed type + Não é possível criar uma extensão de um tipo selado + + + + No arguments may be given when constructing a record value + Nenhum argumento pode ser dado na construção de um valor de registro + + + + Interface implementations cannot be given on construction expressions + Implementações de interface não podem ser fornecidas em expressões de construção + + + + Object construction expressions may only be used to implement constructors in class types + Expressões de construção de objeto só podem ser usadas para implementar construtores nos tipos de classe + + + + Only simple bindings of the form 'id = expr' can be used in construction expressions + Apenas associações simples da forma 'id = expr' podem ser usadas em expressões de construções + + + + Objects must be initialized by an object construction expression that calls an inherited object constructor and assigns a value to each field + Objetos devem ser inicializados por uma expressão de construção de objeto que chame um construtor de objeto herdado e atribua um valor para cada campo + + + + Expected an interface type + Um tipo de interface é esperado + + + + Constructor expressions for interfaces do not take arguments + Expressões de construtor para interfaces não possuem argumentos + + + + This object constructor requires arguments + Este construtor do objeto requer argumentos + + + + 'new' may only be used with object constructors + 'new' deve ser usado com construtores de objeto + + + + At least one override did not correctly implement its corresponding abstract member + Pelo menos uma substituição não foi implementada corretamente no membro abstrato correspondente + + + + This numeric literal requires that a module '{0}' defining functions FromZero, FromOne, FromInt32, FromInt64 and FromString be in scope + Este literal numérico requer que um módulo '{0}' que define funções FromZero, FromOne, FromInt32, FromInt64 e FromString esteja no escopo + + + + Invalid record construction + Construção de registros inválida + + + + The expression form {{ expr with ... }} may only be used with record types. To build object types use {{ new Type(...) with ... }} + A forma de expressão {{ expr with ... }} só pode ser usada com tipos de registro. Para compilar tipos de objeto, use {{ new Type(...) with ... }} + + + + The inherited type is not an object model type + O tipo herdado não é um tipo de objeto modelo + + + + Object construction expressions (i.e. record expressions with inheritance specifications) may only be used to implement constructors in object model types. Use 'new ObjectType(args)' to construct instances of object model types outside of constructors + Expressões de construção de objeto (isto é, expressões de registros com especificações de herança) só podem ser usadas para implementar construtores em tipos de modelo de objeto. Use 'new ObjectType(args)' para instâncias de tipos de modelo de objeto fora dos construtores + + + + '{{ }}' is not a valid expression. Records must include at least one field. Empty sequences are specified by using Seq.empty or an empty list '[]'. + '{{ }}' não é uma expressão válida. Registros devem incluir pelo menos um campo. Sequências vazias são especificadas pelo uso de Seq.empty ou uma lista vazia '[]'. + + + + This type is not a record type. Values of class and struct types must be created using calls to object constructors. + Este tipo não é um tipo de registro. Valores de tipos de classe e struct devem ser criados com o uso de construtores de objeto. + + + + This type is not a record type + Este não é um tipo de registro + + + + This construct is ambiguous as part of a computation expression. Nested expressions may be written using 'let _ = (...)' and nested computations using 'let! res = builder {{ ... }}'. + Esse constructo é ambíguo como parte de uma expressão de computação. Expressões aninhadas podem ser gravadas com o uso de 'let _ = (...)' e computações aninhadas através de 'let! res = builder {{ ... }}'. + + + + This construct is ambiguous as part of a sequence expression. Nested expressions may be written using 'let _ = (...)' and nested sequences using 'yield! seq {{... }}'. + Esse constructo é ambíguo como parte de uma expressão de sequência. Expressões aninhadas podem ser gravadas usando 'let _ = (...)' e sequências aninhadas através de 'yield! seq {{... }}'. + + + + 'do!' cannot be used within sequence expressions + 'do!' não pode ser resolvido em expressões de sequência + + + + The use of 'let! x = coll' in sequence expressions is not permitted. Use 'for x in coll' instead. + O uso de 'let! x = coll' em expressões de sequência não é permitido. Em vez disso, use 'for x in coll'. + + + + 'try'/'with' cannot be used within sequence expressions + 'try'/'with' não podem ser usados em expressões de sequência + + + + In sequence expressions, multiple results are generated using 'yield!' + Em expressões de sequência, os resultados múltiplos são gerados com o uso de 'yield!' + + + + Invalid assignment + Atribuição inválida + + + + Invalid use of a type name + Uso inválido de um nome de tipo + + + + This type has no accessible object constructors + Este tipo não possui construtores de objeto acessíveis + + + + Invalid use of an interface type + Uso inválido de um tipo de interface + + + + Invalid use of a delegate constructor. Use the syntax 'new Type(args)' or just 'Type(args)'. + Uso inválido de um construtor delegado. Use a sintaxe 'new Type(args)' ou somente 'Type(args)'. + + + + Property '{0}' is not static + A propriedade '{0}' não é estática + + + + Property '{0}' is not readable + A propriedade '{0}' não é legível + + + + This lookup cannot be used here + Esta pesquisa não pode ser usada aqui + + + + Property '{0}' is static + A propriedade '{0}' é estática + + + + Property '{0}' cannot be set + A propriedade '{0}' não pode ser definida + + + + Constructors must be applied to arguments and cannot be used as first-class values. If necessary use an anonymous function '(fun arg1 ... argN -> new Type(arg1,...,argN))'. + Construtores devem ser aplicados aos argumentos e não podem ser usados como valores de primeira classe. Se for necessário, use uma função anônima '(fun arg1 ... argN -> new Type(arg1,...,argN))'. + + + + The syntax 'expr.id' may only be used with record labels, properties and fields + A sintaxe 'expr.id' só pode ser usada em rótulos de registros, propriedades e campos + + + + Event '{0}' is static + O evento '{0}' é estático + + + + Event '{0}' is not static + O evento '{0}' não é estático + + + + The named argument '{0}' did not match any argument or mutable property + O argumento nomeado '{0}' não correspondeu ao argumento ou propriedade mutável + + + + One or more of the overloads of this method has curried arguments. Consider redesigning these members to take arguments in tupled form. + Uma ou mais das sobrecargas deste método possui argumentos na forma curried. Considere reformular esses membros para terem argumentos na forma de tupla. + + + + The unnamed arguments do not form a prefix of the arguments of the method called + Os argumentos sem nome não formam um prefixo dos argumentos de métodos chamados + + + + Static optimization conditionals are only for use within the F# library + Condicionais de otimização estáticas destinam-se apenas ao uso na biblioteca F# + + + + The corresponding formal argument is not optional + O argumento formal correspondente não é opcional + + + + Invalid optional assignment to a property or field + Atribuição opcional inválida para uma propriedade ou um campo + + + + A delegate constructor must be passed a single function value + Um construtor delegado deve ser transmitido como um valor de função único + + + + A binding cannot be marked both 'use' and 'rec' + Uma associação não pode ser marcada com 'use' e 'rec' ao mesmo tempo + + + + The 'VolatileField' attribute may only be used on 'let' bindings in classes + O atributo 'VolatileField' só pode ser usado em associações 'let' nas classes + + + + Attributes are not permitted on 'let' bindings in expressions + Atributos não são permitidos em associações 'let' das expressões + + + + The 'DefaultValue' attribute may only be used on 'val' declarations + O atributo 'DefaultValue' só pode ser utilizado em declarações 'val' + + + + The 'ConditionalAttribute' attribute may only be used on members + O atributo 'ConditionalAttribute' só pode ser usado em membros + + + + This is not a valid name for an active pattern + Este não é um nome válido para um padrão ativo + + + + The 'EntryPointAttribute' attribute may only be used on function definitions in modules + O atributo 'EntryPointAttribute' só pode ser usado em definições de função em módulos + + + + Mutable values cannot be marked 'inline' + Valores mutáveis não podem ser marcados como 'inline' + + + + Mutable values cannot have generic parameters + Valores mutáveis não podem ter parâmetros genéricos + + + + Mutable function values should be written 'let mutable f = (fun args -> ...)' + Valores de função mutáveis devem ser escritos como 'let mutable f = (fun args -> ...)' + + + + Only functions may be marked 'inline' + Apenas funções podem ser marcadas como 'inline' + + + + A literal value cannot be given the [<ThreadStatic>] or [<ContextStatic>] attributes + Atributos [<ThreadStatic>] ou [<ContextStatic>] não podem ser dados a um valor literal + + + + A literal value cannot be marked 'mutable' + Um valor literal não pode ser marcado como 'mutável' + + + + A literal value cannot be marked 'inline' + Um valor literal não pode ser marcado como 'inline' + + + + Literal values cannot have generic parameters + Valores literais não têm parâmetros genéricos + + + + This is not a valid constant expression + Esta não é uma expressão constante válida + + + + This type is not accessible from this code location + Este tipo não é acessível deste local de código + + + + Unexpected condition in imported assembly: failed to decode AttributeUsage attribute + Condição inesperada no assembly importado: falha ao decodificar o atributo AttributeUsage + + + + Unrecognized attribute target. Valid attribute targets are 'assembly', 'module', 'type', 'method', 'property', 'return', 'param', 'field', 'event', 'constructor'. + Destino de atributo não reconhecido. Os destinos de atributos válidos são 'assembly', 'module', 'type', 'method', 'property', 'return', 'param', 'field', 'event' e 'constructor'. + + + + This attribute is not valid for use on this language element. Assembly attributes should be attached to a 'do ()' declaration, if necessary within an F# module. + Este atributo não é válido para ser usado neste elemento de linguagem. Os atributos de assembly devem ser anexados a uma declaração 'do ()' e, se necessário, em um módulo F#. + + + + This attribute is not valid for use on this language element + Este atributo não é válido para ser usado neste elemento de linguagem + + + + Optional arguments cannot be used in custom attributes + Argumentos opcionais não podem ser usados em atributos personalizados + + + + This property cannot be set + Esta propriedade não pode ser definida + + + + This property or field was not found on this custom attribute type + Esta propriedade ou campo não foram encontrados neste tipo de atributo personalizado + + + + A custom attribute must be a reference type + Um atributo personalizado deve ser um tipo de referência + + + + The number of args for a custom attribute does not match the expected number of args for the attribute constructor + O número de argumentos de um atributo personalizado não corresponde ao número de argumentos esperado para o construtor de atributos + + + + A custom attribute must invoke an object constructor + Um atributo personalizado deve chamar um construtor de objeto + + + + Attribute expressions must be calls to object constructors + Expressões de atributo devem ser chamadas para construtores de objeto + + + + This attribute cannot be used in this version of F# + Este atributo não pode ser usado nesta versão de F# + + + + Invalid inline specification + Especificação embutida inválida + + + + 'use' bindings must be of the form 'use <var> = <expr>' + Associações 'use' devem estar no formato 'use <var> = <expr>' + + + + Abstract members are not permitted in an augmentation - they must be defined as part of the type itself + Membros abstratos não são permitidos em um aumento, eles devem ser definidos como parte do tipo por eles mesmos + + + + Method overrides and interface implementations are not permitted here + Substituições de método e implementações de interface não são permitidas aqui + + + + No abstract or interface member was found that corresponds to this override + Nenhum membro abstrato ou de interface que corresponde a esta substituição foi localizado + + + + This override takes a different number of arguments to the corresponding abstract member. The following abstract members were found:{0} + Esta substituição obteve um número de argumentos diferente do membro abstrato correspondente. Os seguintes membros abstratos foram encontrados:{0} + + + + This method already has a default implementation + Este método já tem uma implementação padrão + + + + The method implemented by this default is ambiguous + O método implementado por este padrão é ambíguo + + + + No abstract property was found that corresponds to this override + Nenhuma propriedade abstrata que corresponde a esta substituição foi encontrada + + + + This property overrides or implements an abstract property but the abstract property doesn't have a corresponding {0} + Esta propriedade substitui ou implementa uma propriedade abstrata, mas esta não possui uma correspondência {0} + + + + Invalid signature for set member + Assinatura para configuração de membro inválida + + + + This new member hides the abstract member '{0}'. Rename the member or use 'override' instead. + Este novo membro oculta o membro abstrato '{0}'. Renomeie o membro ou use 'override'. + + + + This new member hides the abstract member '{0}' once tuples, functions, units of measure and/or provided types are erased. Rename the member or use 'override' instead. + Este novo membro oculta o membro abstrato '{0}' assim que tuplas, funções, unidades de medida e/ou tipos fornecidos são apagados. Renomeie o membro ou use 'override'. + + + + Interfaces cannot contain definitions of static initializers + Interfaces não podem conter definições de inicializadores estáticos + + + + Interfaces cannot contain definitions of object constructors + Interfaces não podem conter definições de construtores de objeto + + + + Interfaces cannot contain definitions of member overrides + Interfaces não podem conter definições de substituições de membros + + + + Interfaces cannot contain definitions of concrete members. You may need to define a constructor on your type to indicate that the type is a class. + Interfaces não podem conter definições de membros concretos. Talvez seja necessário definir um construtor no seu tipo para indicar que o tipo é uma classe. + + + + Constructors cannot be specified in exception augmentations + Não é possível especificar construtores em aumentos de exceções + + + + Structs cannot have an object constructor with no arguments. This is a restriction imposed on all CLI languages as structs automatically support a default constructor. + Os structs não podem ter um construtor de objetos sem argumentos. Esta é uma restrição imposta a todas as linguagens CLI, porque os structs suportam automaticamente um construtor padrão. + + + + Constructors cannot be defined for this type + Não é possível definir construtores para este tipo + + + + Recursive bindings that include member specifications can only occur as a direct augmentation of a type + Associações recursivas que incluem especificações de membros só podem ocorrer como um aumento direto de um tipo + + + + Only simple variable patterns can be bound in 'let rec' constructs + Apenas padrões de variáveis simples podem ser associados em construtores 'let rec' + + + + Only record fields and simple, non-recursive 'let' bindings may be marked mutable + Apenas campos de registro e associações 'let' simples e não recursivas podem ser marcados como mutáveis + + + + This member is not sufficiently generic + Este membro não é suficientemente genérico + + + + A declaration may only be the [<Literal>] attribute if a constant value is also given, e.g. 'val x : int = 1' + Uma declaração só poderá ser o atributo [<Literal>] se um valor constante também for dado, por exemplo 'val x : int = 1' + + + + A declaration may only be given a value in a signature if the declaration has the [<Literal>] attribute + Uma declaração só poderá receber um valor a uma assinatura se a declaração tiver o atributo [<Literal>] + + + + Thread-static and context-static variables must be static and given the [<DefaultValue>] attribute to indicate that the value is initialized to the default value on each new thread + Variáveis de thread estático e de contexto estático devem ser estáticas e receber o atributo [<DefaultValue>] para indicar que o valor é inicializado como valor padrão a cada novo thread + + + + Volatile fields must be marked 'mutable' and cannot be thread-static + Campos voláteis devem ser marcados como 'mutable' e não podem ser thread estático + + + + Uninitialized 'val' fields must be mutable and marked with the '[<DefaultValue>]' attribute. Consider using a 'let' binding instead of a 'val' field. + Campos 'val' não inicializados devem ser mutáveis, particulares e marcados com o atributo '[<DefaultValue>]'. Considere usar uma associação 'let' em vez de um campo 'val'. + + + + Static 'val' fields in types must be mutable, private and marked with the '[<DefaultValue>]' attribute. They are initialized to the 'null' or 'zero' value for their type. Consider also using a 'static let mutable' binding in a class type. + Campos 'val' estáticos em tipos devem ser mutáveis, particulares e marcados com o atributo '[<DefaultValue>]'. Eles são iniciados com o valor 'null' ou 'zero' para seus tipos. Também considere usar uma associação 'static let mutable' em um tipo de classe. + + + + This field requires a name + Este campo requer um nome + + + + Invalid namespace, module, type or union case name + Nome de namespace, módulo, tipo ou caso união inválido + + + + Explicit type declarations for constructors must be of the form 'ty1 * ... * tyN -> resTy'. Parentheses may be required around 'resTy' + Declarações de tipo explícito para construtores devem estar na forma 'ty1 * ... * tyN -> resTy'. Pode ser necessário usar parênteses em torno de 'resTy' + + + + Return types of union cases must be identical to the type being defined, up to abbreviations + Tipos de retorno de casos união devem ser idênticos aos tipos que estão sendo definidos, até as abreviações + + + + This is not a valid value for an enumeration literal + Este não é um valor válido para um literal de enumeração + + + + The type '{0}' is not an interface type + O tipo '{0}' não é um tipo de interface + + + + Duplicate specification of an interface + Especificação duplicada de uma interface + + + + A field/val declaration is not permitted here + Uma declaração de campo/val não é permitida aqui + + + + A inheritance declaration is not permitted here + Não é permitido usar uma declaração herdada aqui + + + + This declaration opens the module '{0}', which is marked as 'RequireQualifiedAccess'. Adjust your code to use qualified references to the elements of the module instead, e.g. 'List.map' instead of 'map'. This change will ensure that your code is robust as new constructs are added to libraries. + Esta declaração abre o módulo '{0}', que é marcado como 'RequireQualifiedAccess'. Ajuste seus códigos para usar referências qualificadas aos elementos do módulo, por exemplo 'List.map' ao invés de 'map'. Esta mudança garantirá que seu código seja robusto porque novos construtores são adicionados às bibliotecas. + + + + This declaration opens the namespace or module '{0}' through a partially qualified path. Adjust this code to use the full path of the namespace. This change will make your code more robust as new constructs are added to the F# and CLI libraries. + Esta declaração abre o namespace ou módulo '{0}' através de um caminho parcialmente qualificado. Ajuste este código par usar o caminho completo do namespace. Esta mudança deixará seu código mais robusto uma vez que novos construtores são adicionados a F# e bibliotecas CLI. + + + + Local class bindings cannot be marked inline. Consider lifting the definition out of the class or else do not mark it as inline. + Associações de classes locais não podem ser marcadas como embutidas. Considere elevar a definição de classe ou não marcá-la como embutida. + + + + Type abbreviations cannot have members + Abreviações de tipo não podem ter membros + + + + As of F# 4.1, the accessibility of type abbreviations is checked at compile-time. Consider changing the accessibility of the type abbreviation. Ignoring this warning might lead to runtime errors. + Começando no F# 4.1, a acessibilidade das abreviações de tipo é verificada no momento da compilação. Considere alterar a acessibilidade do tipo de abreviação. Ignorar este aviso pode levar a erros de tempo de execução. + + + + Enumerations cannot have members + Enumerações não podem ter membros + + + + Measure declarations may have only static members + Declarações de medida só podem ter membros estáticos + + + + Structs cannot contain 'do' bindings because the default constructor for structs would not execute these bindings + Structs não podem conter associações 'do' porque o construtor padrão para structs não as executaria + + + + Structs cannot contain value definitions because the default constructor for structs will not execute these bindings. Consider adding additional arguments to the primary constructor for the type. + Structs não podem conter definições de valores porque o construtor padrão para structs não executará essas vinculações. Considere adicionar argumentos complementares ao construtor primário para o tipo. + + + + Static value definitions may only be used in types with a primary constructor. Consider adding arguments to the type definition, e.g. 'type X(args) = ...'. + Definições de valores estáticos só podem ser usadas em tipos com um construtor primário. Considere adicionar argumentos à definição de tipo, por exemplo, 'type X(args) = ...'. + + + + Measure declarations may have only static members: constructors are not available + Declarações de medida só podem ter membros estáticos: construtores não estão disponíveis + + + + A member and a local class binding both have the name '{0}' + Um membro e uma associação de classe local têm o mesmo nome '{0}' + + + + Type abbreviations cannot have interface declarations + Abreviações de tipo não podem ter declarações de interface + + + + Enumerations cannot have interface declarations + Enumeradores não podem ter declarações de interface + + + + This type is not an interface type + Este não é um tipo de interface + + + + All implemented interfaces should be declared on the initial declaration of the type + Todas as interfaces implementadas devem ser declaradas na declaração inicial do tipo + + + + A default implementation of this interface has already been added because the explicit implementation of the interface was not specified at the definition of the type + Uma implementação padrão desta interface já foi adicionada porque a implementação explícita da interface não foi especificada na definição do tipo + + + + This member is not permitted in an interface implementation + Este membro não é permitido em implementação de interfaces + + + + This declaration element is not permitted in an augmentation + Este elemento de declaração não é permitido em um aumento + + + + Types cannot contain nested type definitions + Tipos não podem conter definições de tipo aninhadas + + + + type, exception or module + tipo, exceção ou módulo + + + + type or module + tipo ou módulo + + + + The struct, record or union type '{0}' implements the interface 'System.IStructuralEquatable' explicitly. Apply the 'CustomEquality' attribute to the type. + O tipo de struct, registro ou união '{0}' implementa explicitamente a interface 'System.IStructuralEquatable'. Aplique o atributo 'CustomEquality' ao tipo. + + + + The struct, record or union type '{0}' implements the interface 'System.IEquatable<_>' explicitly. Apply the 'CustomEquality' attribute to the type and provide a consistent implementation of the non-generic override 'System.Object.Equals(obj)'. + O tipo de struct, registro ou união '{0}' implementa explicitamente a interface 'System.IEquatable<_>' . Aplique o atributo 'CustomEquality' ao tipo e forneça uma implementação consistente da substituição não genérica 'System.Object.Equals(obj)'. + + + + Explicit type specifications cannot be used for exception constructors + Especificações de tipo explícitas não podem ser usadas para construtores de exceção + + + + Exception abbreviations should not have argument lists + Abreviações de exceção não devem ter listas de argumentos + + + + Abbreviations for Common IL exceptions cannot take arguments + Abreviações para exceções do IL Comum não podem pegar argumentos + + + + Exception abbreviations must refer to existing exceptions or F# types deriving from System.Exception + Abreviações de exceção devem referir-se às exceções existentes ou tipos F# derivados de System.Exception + + + + Abbreviations for Common IL exception types must have a matching object constructor + Abreviações para tipos de exceção do IL Comum devem ter um construtor de objeto correspondente + + + + Not an exception + Não é uma exceção + + + + Invalid module name + Nome de módulo inválido + + + + Invalid type extension + Extensão de tipo inválida + + + + The attributes of this type specify multiple kinds for the type + Os atributos deste tipo especificam múltiplas variedades para este tipo + + + + The kind of the type specified by its attributes does not match the kind implied by its definition + A espécie do tipo especificado por seus atributos não corresponde à espécie sugerida por sua definição + + + + Measure definitions cannot have type parameters + Definições de medida não podem ter parâmetros de tipo + + + + This type requires a definition + Este tipo requer uma definição + + + + This type abbreviation has one or more declared type parameters that do not appear in the type being abbreviated. Type abbreviations must use all declared type parameters in the type being abbreviated. Consider removing one or more type parameters, or use a concrete type definition that wraps an underlying type, such as 'type C<'a> = C of ...'. + Esta abreviação de tipo possui um ou mais parâmetros que não aparecem no tipo sendo abreviado. Abreviações de tipo usam todos os parâmetros de tipo declarados no tipo que está sendo abreviado. Considere remover um ou mais parâmetro de tipo ou usar uma definição de tipo concreto que encapsula um tipo adjacente, como 'type C<'a> = C of ...'. + + + + Structs, interfaces, enums and delegates cannot inherit from other types + Structs, interfaces, enums e delegados não podem ser herdados de outros tipos + + + + Types cannot inherit from multiple concrete types + Tipos não podem ser herdados de tipos concretos múltiplos + + + + Records, union, abbreviations and struct types cannot have the 'AllowNullLiteral' attribute + Tipos de registros, união, abreviações e struct não podem ter o atributo 'AllowNullLiteral' + + + + Types with the 'AllowNullLiteral' attribute may only inherit from or implement types which also allow the use of the null literal + Tipos com o atributo 'AllowNullLiteral' só podem implementar ou herdar tipos que também permitem o uso do literal nulo. + + + + Generic types cannot be given the 'StructLayout' attribute + O atributo 'StructLayout' não pode ser dado a tipos genéricos + + + + Only structs and classes without primary constructors may be given the 'StructLayout' attribute + Somente structs e classes sem construtores primários podem receber o atributo 'StructLayout'. + + + + The representation of this type is hidden by the signature. It must be given an attribute such as [<Sealed>], [<Class>] or [<Interface>] to indicate the characteristics of the type. + A representação deste tipo está oculta pela assinatura. Ela deve receber um atributo como [<Sealed>], [<Class>] ou [<Interface>] para indicar as características deste tipo. + + + + Only classes may be given the 'AbstractClass' attribute + O atributo 'AbstractClass' só pode ser dado a classes + + + + Only types representing units-of-measure may be given the 'Measure' attribute + Apenas unidades de medida de representações de tipos podem receber o atributo 'Measure' + + + + Accessibility modifiers are not permitted on overrides or interface implementations + Modificadores de acessibilidade não são permitidos em implementações de substituições ou de interfaces + + + + Discriminated union types are always sealed + Tipos de união discriminados são sempre selados + + + + Record types are always sealed + Tipos de registros são sempre selados + + + + Assembly code types are always sealed + Tipos de código de assembly são sempre selados + + + + Struct types are always sealed + Tipos struct são sempre selados + + + + Delegate types are always sealed + Tipos delegados são sempre selados + + + + Enum types are always sealed + Tipos enum são sempre selados + + + + Interface types and delegate types cannot contain fields + Tipos de interface e tipos delegado não podem conter campos + + + + Abbreviated types cannot be given the 'Sealed' attribute + O atributo 'Sealed' não pode ser dado aos tipos abreviados. + + + + Cannot inherit a sealed type + Não é possível herdar um tipo selado + + + + Cannot inherit from interface type. Use interface ... with instead. + Não é possível herdar de um tipo de interface. Use interface ... with em seu lugar. + + + + Struct types cannot contain abstract members + Tipos de struct não podem conter membros abstratos + + + + Interface types cannot be sealed + Tipos de interface não podem ser selados + + + + Delegate specifications must be of the form 'typ -> typ' + A especificação de delegado deve ser da forma 'typ -> typ' + + + + Delegate specifications must not be curried types. Use 'typ * ... * typ -> typ' for multi-argument delegates, and 'typ -> (typ -> typ)' for delegates returning function values. + Especificações de delegado não devem ser do tipo curried. Use 'typ * ... * typ -> typ' para delegados de múltiplos argumentos e 'typ -> (typ -> typ)' para delegados que retornam valores de função. + + + + Literal enumerations must have type int, uint, int16, uint16, int64, uint64, byte, sbyte or char + Enumerações literais devem ter tipo int, uint, int16, uint16, int64, uint64, byte, sbyte ou char + + + + This type definition involves an immediate cyclic reference through an abbreviation + Esta definição de tipo envolve uma referência cíclica imediata através de uma abreviação + + + + This type definition involves an immediate cyclic reference through a struct field or inheritance relation + Esta definição de tipo envolve uma referência cíclica imediata através de um campo struct ou relação de herança + + + + The syntax 'type X with ...' is reserved for augmentations. Types whose representations are hidden but which have members are now declared in signatures using 'type X = ...'. You may also need to add the '[<Sealed>] attribute to the type definition in the signature + A sintaxe 'type X with ...' é reservada para aumentos. Tipos cujas representações são ocultas, mas têm membros, agora são declarados em assinaturas usando 'type X = ...'. Talvez também seja necessário adicionar o atributo '[<Sealed>] à definição de tipo na assinatura + + + + Members that extend interface, delegate or enum types must be placed in a module separate to the definition of the type. This module must either have the AutoOpen attribute or be opened explicitly by client code to bring the extension members into scope. + Membros que estendem tipos de interface, delegado ou enum devem ser colocados em um módulo separado da definição do tipo. Este módulo deve ter o atributo AutoOpen ou ser aberto explicitamente por um código de cliente para trazer os membros de extensão para o escopo. + + + + One or more of the declared type parameters for this type extension have a missing or wrong type constraint not matching the original type constraints on '{0}' + Um ou mais dos parâmetros de tipo declarados para esta extensão de tipo têm uma restrição ausente ou incorreta que não corresponde às restrições de tipo originais em '{0}' + + + + Type definitions may only have one 'inherit' specification and it must be the first declaration + As definições de tipo só podem ter uma especificação 'inherit' e devem ser a primeira declaração + + + + 'let' and 'do' bindings must come before member and interface definitions in type definitions + As associações 'let' e 'do' devem vir antes das definições de membro e interface nas definições de tipos + + + + This 'inherit' declaration specifies the inherited type but no arguments. Consider supplying arguments, e.g. 'inherit BaseType(args)'. + Esta declaração 'inherit' especifica o tipo herdado, mas não especifica nenhum argumento. Considere fornecer argumentos, por exemplo 'inherit BaseType(args)'. + + + + This 'inherit' declaration has arguments, but is not in a type with a primary constructor. Consider adding arguments to your type definition, e.g. 'type X(args) = ...'. + Esta declaração 'inherit' possui argumentos, mas não está em um tipo com um construtor primário. Considere adicionar argumentos à sua definição de tipo, por exemplo, 'type X(args) = ...'. + + + + This definition may only be used in a type with a primary constructor. Consider adding arguments to your type definition, e.g. 'type X(args) = ...'. + Esta definição só pode ser usada em um tipo com um construtor primário. Considere adicionar argumentos à sua definição de tipo, por exemplo, 'type X(args) = ...'. + + + + Type abbreviations cannot have augmentations + Abreviações de tipo não podem ter aumentos + + + + The path '{0}' is a namespace. A module abbreviation may not abbreviate a namespace. + O caminho '{0}' é um namespace. Uma abreviação de módulo não pode abreviar um namespace. + + + + The type '{0}' is used in an invalid way. A value prior to '{1}' has an inferred type involving '{2}', which is an invalid forward reference. + O tipo '{0}' é usado de forma inválida. Um valor anterior a '{1}' possui um tipo inferido envolvendo '{2}', que é uma referencia de encaminhamento inválida. + + + + The member '{0}' is used in an invalid way. A use of '{1}' has been inferred prior to the definition of '{2}', which is an invalid forward reference. + O membro '{0}' é usado de forma inválida. Um uso de '{1}' possui inferência anterior à definição de '{2}', que é uma referência de encaminhamento inválida. + + + + The attribute 'AutoOpen(\"{0}\")' in the assembly '{1}' did not refer to a valid module or namespace in that assembly and has been ignored + O atributo 'AutoOpen(\"{0}\")' no assembly '{1}' não referenciou um módulo ou namespace válido neste assembly e foi ignorado + + + + Undefined value '{0}' + Valor indefinido '{0}' + + + + Label {0} not found + Rótulo {0} não encontrado + + + + Incorrect number of type arguments to local call + Número incorreto de argumentos de tipo para chamadas locais + + + + Dynamic invocation of {0} is not supported + A chamada dinâmica de {0} não é suportada + + + + Taking the address of a literal field is invalid + Não é válido pegar o endereço de um campo literal + + + + This operation involves taking the address of a value '{0}' represented using a local variable or other special representation. This is invalid. + Esta operação envolve pegar o endereço de um valor representado '{0}' através do uso de variável local ou outra representação especial, o que é inválido. + + + + Custom marshallers cannot be specified in F# code. Consider using a C# helper function. + Marshallers personalizados não podem ser especificados em código F#. Considere usar uma função de ajuda de C#. + + + + The MarshalAs attribute could not be decoded + Não foi possível decodificar o atributo MarshalAs + + + + The signature for this external function contains type parameters. Constrain the argument and return types to indicate the types of the corresponding C function. + A assinatura para esta função externa contém parâmetros de tipo. Restrinja o argumento e tipos de retorno para indicar os tipos de função C correspondente. + + + + The DllImport attribute could not be decoded + Não foi possível decodificar o atributo DllImport + + + + Literal fields cannot be set + Não foi possível definir os campos literais + + + + GenSetStorage: {0} was represented as a static method but was not an appropriate lambda expression + GenSetStorage: {0} foi representado como método estático mas não foi uma expressão lambda apropriada + + + + Mutable variables cannot escape their method + Variáveis mutáveis não podem escapar de seus métodos + + + + Compiler error: unexpected unrealized value + Erro de compilador: valor não realizado inesperado + + + + Main module of program is empty: nothing will happen when it is run + O módulo principal do programa está vazio: nada ocorrerá enquanto ele estiver em execução + + + + This type cannot be used for a literal field + Este tipo não pode ser usado para um campo literal + + + + Unexpected GetSet annotation on a property + Anotação GetSet inesperada em um propriedade + + + + The FieldOffset attribute could not be decoded + Não foi possível decodificar o atributo FieldOffset + + + + The StructLayout attribute could not be decoded + Não foi possível decodificar o atributo StructLayout + + + + The DefaultAugmentation attribute could not be decoded + Não foi possível decodificar o atributo DefaultAugmentation + + + + Reflected definitions cannot contain uses of the prefix splice operator '%' + Definições refletidas não podem conter usos do operador união pré-fixo '%' + + + + Problem with codepage '{0}': {1} + Problema com o código de página '{0}': {1} + + + + Copyright (c) Microsoft Corporation. All Rights Reserved. + Copyright (c) Microsoft Corporation. Todos direitos reservados. + + + + Freely distributed under the MIT Open Source License. https://github.com/Microsoft/visualfsharp/blob/master/License.txt + Distribuído gratuitamente sob a Licença de Software Livre do MIT. https://github.com/Microsoft/visualfsharp/blob/master/License.txt + + + + Name of the output file (Short form: -o) + Nome do arquivo de saída (Forma abreviada: -o) + + + + Build a console executable + Criar um executável de console + + + + Build a Windows executable + Criar um executável do Windows + + + + Build a library (Short form: -a) + Criar uma biblioteca (Forma abreviada: -a) + + + + Build a module that can be added to another assembly + Criar um módulo que possa ser adicionado a outro assembly + + + + Delay-sign the assembly using only the public portion of the strong name key + Assinatura atrasada do assembly usando somente a parte pública da chave de nome forte + + + + Public-sign the assembly using only the public portion of the strong name key, and mark the assembly as signed + Assine de forma pública o assembly usando a única parte pública da chave de nome forte e marque o assembly como assinado + + + + Write the xmldoc of the assembly to the given file + Gravar o xmldoc do assembly para o arquivo especificado + + + + Specify a strong name key file + Especificar um arquivo de chave de nome forte + + + + Specify a strong name key container + Especificar um contêiner de chave de nome forte + + + + Limit which platforms this code can run on: x86, Itanium, x64, anycpu32bitpreferred, or anycpu. The default is anycpu. + Limite em quais plataformas este código pode ser executado: x86, Itanium, x64, anycpu32bitpreferred ou anycpu. O padrão é anycpu. + + + + Only include optimization information essential for implementing inlined constructs. Inhibits cross-module inlining but improves binary compatibility. + Inclua somente informações de otimização essenciais para a implementação de constructos embutidos. Isso inibe a integração dos módulos cruzados, mas aumenta a compatibilidade binária. + + + + Don't add a resource to the generated assembly containing F#-specific metadata + Não adicione um recurso ao assembly gerado que contenha metadados específicos a F# + + + + Print the inferred interface of the assembly to a file + Imprimir interface deduzida do assembly para um arquivo + + + + Reference an assembly (Short form: -r) + Referenciar um assembly (Forma abreviada: -r) + + + + Specify a Win32 resource file (.res) + Especificar um arquivo de recursos do Win32 (.res) + + + + Specify a Win32 manifest file + Especificar um arquivo de manifesto Win32 + + + + Do not include the default Win32 manifest + Não inclua o manifesto Win32 padrão + + + + Embed all source files in the portable PDB file + Inserir todos os arquivos de origem no arquivo PDB portátil + + + + Embed specific source files in the portable PDB file + Inserir os arquivos de origem específicos no arquivo PDB portátil + + + + Source link information file to embed in the portable PDB file + O arquivo de informações do link de origem para inserir em um arquivo PDB portátil + + + + --embed switch only supported when emitting a Portable PDB (--debug:portable or --debug:embedded) + o comutador --embed tem suporte somente ao emitir um PDB Portátil (--debug:portable ou --debug:embedded) + + + + --sourcelink switch only supported when emitting a Portable PDB (--debug:portable or --debug:embedded) + o comutador --sourcelink tem suporte somente ao emitir um PDB Portátil (--debug:portable ou --debug:embedded) + + + + Source file is too large to embed in a portable PDB + O arquivo de origem é muito grande para ser inserido em um PDB portátil + + + + Embed the specified managed resource + Inserir o recurso gerenciado especificado + + + + Link the specified resource to this assembly where the resinfo format is <file>[,<string name>[,public|private]] + Vincule o recurso especificado a este assembly, em que o formato resinfo é <arquivo>[,<nome da cadeia de caracteres>[,public|private]] + + + + Emit debug information (Short form: -g) + Emita as informação de depuração (Forma abreviada: -g) + + + + Specify debugging type: full, portable, embedded, pdbonly. ('{0}' is the default if no debuggging type specified and enables attaching a debugger to a running program, 'portable' is a cross-platform format, 'embedded' is a cross-platform format embedded into the output file). + Especificar tipo de depuração: completo, portátil, incorporado, somente PDB. ('{0}' será o padrão se nenhum tipo de depuração for especificado e permite anexar um depurador a um programa em execução; 'portátil' é um formato multiplataforma; 'incorporado' é um formato multiplataforma incorporado no arquivo de saída). + + + + Enable optimizations (Short form: -O) + Habilite otimizações (Forma abreviada: -O) + + + + Enable or disable tailcalls + Habilitar ou desabilitar tailcalls + + + + Produce a deterministic assembly (including module version GUID and timestamp) + Produzir um assembly determinístico (incluindo GUID de versão de módulo e carimbo de data/hora) + + + + Enable or disable cross-module optimizations + Habilite ou desabilite otimizações de módulo cruzado + + + + Report all warnings as errors + Relatar todos os avisos como erros + + + + Report specific warnings as errors + Relatar avisos específicos como erros + + + + Set a warning level (0-5) + Definir um nível de aviso (0-5) + + + + Disable specific warning messages + Desabilitar mensagens de aviso específicas + + + + Enable specific warnings that may be off by default + Habilitar avisos específicos que podem estar desativados por padrão + + + + Generate overflow checks + Gerar verificações de estouro + + + + Define conditional compilation symbols (Short form: -d) + Defina símbolos de compilação condicional (Forma abreviada: -d) + + + + Ignore ML compatibility warnings + Ignore avisos de compatibilidade ML + + + + + Display this usage message (Short form: -?) + Exibir esta mensagem de uso (Forma abreviada: -?) + + + + Read response file for more options + Leia o arquivo de resposta para obter mais opções + + + + Specify the codepage used to read source files + Especifique a página de código usada para ler arquivos de origem + + + + Output messages in UTF-8 encoding + Mensagens de saída em codificação UTF-8 + + + + Output messages with fully qualified paths + Mensagens de saída com caminhos totalmente qualificados + + + + Specify a directory for the include path which is used to resolve source files and assemblies (Short form: -I) + Especifique um diretório para incluir o caminho que é usado para resolver arquivos de origem e assemblies (Forma abreviada: -I) + + + + Base address for the library to be built + Endereço base para a biblioteca a ser criada + + + + Do not reference the default CLI assemblies by default + Não referencie os assemblies CLI padrões por padrão + + + + Statically link the F# library and all referenced DLLs that depend on it into the assembly being generated + Vincular estaticamente a biblioteca F# e todos os DLLs referenciados que dependem do assembly que está sendo gerado + + + + Statically link the given assembly and all referenced DLLs that depend on this assembly. Use an assembly name e.g. mylib, not a DLL name. + Vincule estaticamente o assembly fornecido e todas as DLLs referenciadas que dependem deste assembly. Use um nome de assembly como mylib, por exemplo, não um nome de DLL. + + + + Use a resident background compilation service to improve compiler startup times. + Use um serviço de compilação em segundo plano residente para aprimorar os tempos de inicialização do compilador. + + + + Name the output debug file + Nomear o arquivo de depuração de saída + + + + Resolve assembly references using directory-based rules rather than MSBuild resolution + Resolver referências de assembly usando regras baseadas em diretório em vez da resolução do MSBuild + + + + Unrecognized target '{0}', expected 'exe', 'winexe', 'library' or 'module' + Destino desconhecido '{0}', 'exe', 'winexe', 'library' ou 'module' era esperado + + + + Unrecognized debug type '{0}', expected 'pdbonly' or 'full' + Tipo de depuração desconhecida '{0}', 'pdbonly' ou 'full' era esperado + + + + Invalid warning level '{0}' + Nível de aviso '{0}' inválido + + + + Short form of '{0}' + Forma abreviada de '{0}' + + + + The command-line option '--cliroot' has been deprecated. Use an explicit reference to a specific copy of mscorlib.dll instead. + A opção de linha de comando '--cliroot' foi preterida. Use uma referência explicita para uma cópia específica de mscorlib.dll em seu lugar. + + + + Use to override where the compiler looks for mscorlib.dll and framework components + Use para substituir onde o compilador deve procurar por mscorlib.dll e componentes de framework + + + + - OUTPUT FILES - + - ARQUIVOS DE SAÍDA - + + + + - INPUT FILES - + - ARQUIVOS DE ENTRADA - + + + + - RESOURCES - + - RECURSOS - + + + + - CODE GENERATION - + - GERAÇÃO DE CÓDIGO - + + + + - ADVANCED - + - AVANÇADO - + + + + - MISCELLANEOUS - + - DIVERSOS - + + + + - LANGUAGE - + - LINGUAGEM - + + + + - ERRORS AND WARNINGS - + - ERROS E AVISOS - + + + + Unknown --test argument: '{0}' + Argumento --test desconhecido: '{0}' + + + + Unrecognized platform '{0}', valid values are 'x86', 'x64', 'Itanium', 'anycpu32bitpreferred', and 'anycpu' + Plataforma não reconhecida '{0}', os valores válidos são 'x86', 'x64', 'Itanium', 'anycpu32bitpreferred' e 'anycpu' + + + + The command-line option '{0}' is for test purposes only + A opção de linha de comando '{0}' é somente para propósitos de teste + + + + The command-line option '{0}' has been deprecated + A opção de linha de comando '{0}' foi preterida + + + + The command-line option '{0}' has been deprecated. Use '{1}' instead. + A opção de linha de comando '{0}' foi preterida. Use '{1}' em seu lugar. + + + + The command-line option '{0}' has been deprecated. HTML document generation is now part of the F# Power Pack, via the tool FsHtmlDoc.exe. + A opção de linha de comando '{0}' foi preterida. A geração de documento HTML é agora parte do pacote de energia F#, através da ferramenta FsHtmlDoc.exe. + + + + Output warning and error messages in color + Mensagens de aviso e erro de saída em cores + + + + Enable high-entropy ASLR + Habilitar ASLR de alta entropia + + + + Specify subsystem version of this assembly + Especificar a versão do subsistema deste assembly + + + + Specify target framework profile of this assembly. Valid values are mscorlib, netcore or netstandard. Default - mscorlib + Especifique o perfil da estrutura de destino deste assembly. Os valores válidos são mscorlib, netcore ou netstandard. O padrão é mscorlib + + + + Emit debug information in quotations + Emitir informações de depuração entre aspas + + + + Specify the preferred output language culture name (e.g. es-ES, ja-JP) + Especifique o nome de cultura de idioma de saída preferencial (por exemplo, es-ES, ja-JP) + + + + Don't copy FSharp.Core.dll along the produced binaries + Não copiar FSharp.Core.dll nos binários produzidos + + + + Invalid version '{0}' for '--subsystemversion'. The version must be 4.00 or greater. + Versão inválida '{0}' para '--subsystemversion'. A versão deve ser 4.00 ou posterior. + + + + Invalid value '{0}' for '--targetprofile', valid values are 'mscorlib', 'netcore' or 'netstandard'. + Valor inválido '{0}' para '--targetprofile', os valores válidos são 'mscorlib', 'netcore' ou 'netstandard'. + + + + Full name + Nome completo + + + + and {0} other overloads + e {0} outras sobrecargas + + + + union case + caso união + + + + active pattern result + resultado padrão ativo + + + + active recognizer + reorganizador ativo + + + + field + campo + + + + event + evento + + + + property + propriedade + + + + extension + extensão + + + + custom operation + operação personalizada + + + + argument + argumento + + + + patvar + patvar + + + + namespace + namespace + + + + module + módulo + + + + namespace/module + namespace/módulo + + + + from {0} + de {0} + + + + also from {0} + também de {0} + + + + generated property + propriedade gerada + + + + generated type + tipo gerado + + + + Found by AssemblyFolders registry key + Localizada pela chave de registro AssemblyFolders + + + + Found by AssemblyFoldersEx registry key + Localizada pela chave de registro AssemblyFoldersEx + + + + .NET Framework + .NET Framework + + + + Global Assembly Cache + Cache de Assembly Global + + + + Recursive class hierarchy in type '{0}' + Hierarquia de classe recursiva no tipo '{0}' + + + + Invalid recursive reference to an abstract slot + Referência recursiva inválida para um slot abstrato + + + + The event '{0}' has a non-standard type. If this event is declared in another CLI language, you may need to access this event using the explicit {1} and {2} methods for the event. If this event is declared in F#, make the type of the event an instantiation of either 'IDelegateEvent<_>' or 'IEvent<_,_>'. + O evento '{0}' possui um tipo não padrão. Se este evento for declarado em outra linguagem CLI, você pode precisar acessar este evento com o uso de {1} explícito e métodos {2} para ele. Se este evento estiver declarado em F#, faça o tipo de evento também ser uma instanciação de 'IDelegateEvent<_>' ou 'IEvent<_,_>'. + + + + The type '{0}' is not accessible from this code location + O tipo '{0}' não é acessível deste local do código + + + + The union cases or fields of the type '{0}' are not accessible from this code location + Os casos união ou campos do tipo '{0}' não são acessíveis deste local de código + + + + The value '{0}' is not accessible from this code location + O valor '{0}' não é acessível deste local de código + + + + The union case '{0}' is not accessible from this code location + O caso união '{0}' não está acessível deste local de código + + + + The record, struct or class field '{0}' is not accessible from this code location + O campo de registro, struct ou classe '{0}' não está acessível neste local de código + + + + The struct or class field '{0}' is not accessible from this code location + O campo da struct ou classe '{0}' não é acessível neste local do código + + + + This construct is experimental + Este constructo é experimental + + + + No Invoke methods found for delegate type + Nenhum método de invocação encontrado para o tipo delegate + + + + More than one Invoke method found for delegate type + Mais de um método de chamada encontrado para o tipo delegado + + + + Delegates are not allowed to have curried signatures + Delegados não estão autorizados a ter assinaturas na forma curried + + + + Unexpected Expr.TyChoose + Expr.TyChoose inesperado + + + + Note: Lambda-lifting optimizations have not been applied because of the use of this local constrained generic function as a first class value. Adding type constraints may resolve this condition. + Observação: as otimizações de levantamento de lambda não foram aplicadas devido ao uso desta função genérica restrita local como um valor de primeira classe. Adicionar restrições pode resolver esta condição. + + + + Identifiers containing '@' are reserved for use in F# code generation + Identificadores que contém '@' são reservados para uso em geração de código F# + + + + The identifier '{0}' is reserved for future use by F# + O identificador '{0}' é reservado para uso futuro por F# + + + + Missing variable '{0}' + Variável '{0}' ausente + + + + Partial active patterns may only generate one result + Padrões ativos parciais só podem gerar um resultado + + + + The type '{0}' is required here and is unavailable. You must add a reference to assembly '{1}'. + O tipo '{0}' é requerido aqui e não está disponível. Você deve adicionar uma referência ao assembly '{1}'. + + + + A reference to the type '{0}' in assembly '{1}' was found, but the type could not be found in that assembly + A referência para o tipo '{0}' no assembly '{1}' foi encontrada, mas o tipo não pôde ser encontrado neste assembly + + + + Internal error or badly formed metadata: not enough type parameters were in scope while importing + Erro interno ou metadado malformado: os parâmetros de tipo que estavam no escopo durante a importação não são suficientes + + + + A reference to the DLL {0} is required by assembly {1}. The imported type {2} is located in the first assembly and could not be resolved. + Uma referência ao DLL {0} é requerida pelo assembly {1}. O tipo importado {2} está localizado no primeiro assembly e não pôde ser resolvido. + + + + An imported assembly uses the type '{0}' but that type is not public + Um assembly importado usa o tipo '{0}', mas este tipo não é público + + + + The value '{0}' was marked inline but its implementation makes use of an internal or private function which is not sufficiently accessible + O valor '{0}' foi marcado como embutido, mas sua implementação faz uso de uma função interna ou privada que não é suficientemente acessível + + + + The value '{0}' was marked inline but was not bound in the optimization environment + O valor '{0}' foi marcado como embutido, mas não está associado no ambiente de otimização + + + + Local value {0} not found during optimization + O valor local {0} não foi encontrado durante a otimização + + + + A value marked as 'inline' has an unexpected value + Um valor marcado como 'embutido' possui um valor inesperado + + + + A value marked as 'inline' could not be inlined + Um valor marcado como 'embutido' não pôde ser embutido + + + + Failed to inline the value '{0}' marked 'inline', perhaps because a recursive value was marked 'inline' + Falha ao embutir o valor '{0}' marcado como 'inline', talvez porque um valor recursivo tenha sido marcado como 'inline' + + + + Recursive ValValue {0} + ValValue {0} recursivo + + + + The indentation of this 'in' token is incorrect with respect to the corresponding 'let' + O recuo deste token 'in' é incorreto em relação ao 'let' correspondente + + + + Possible incorrect indentation: this token is offside of context started at position {0}. Try indenting this token further or using standard formatting conventions. + Recuo possivelmente incorreto: este token está fora do contexto iniciado na posição {0}. Tente recuar mais este token ou use conversões de formatação padrão. + + + + The '|' tokens separating rules of this pattern match are misaligned by one column. Consider realigning your code or using further indentation. + Os tokens '|' que separam regras desta correspondência de padrão estão desalinhados em uma coluna. Considere realinhar seu código ou usar mais recuo. + + + + Invalid module/expression/type + Módulo/expressão/tipo inválido + + + + Multiple types exist called '{0}', taking different numbers of generic parameters. Provide a type instantiation to disambiguate the type resolution, e.g. '{1}'. + Existem tipos múltiplos chamados '{0}', que pegam diferentes números de parâmetros genéricos. Forneça uma instanciação de tipo para desfazer a ambiguidade da resolução de tipo, por exemplo '{1}'. + + + + The instantiation of the generic type '{0}' is missing and can't be inferred from the arguments or return type of this member. Consider providing a type instantiation when accessing this type, e.g. '{1}'. + Está faltando a instanciação do tipo genérico '{0}', a qual não pode ser inferida a partir de argumentos ou tipo de retorno deste membro. Considere providenciar uma instanciação de tipo quando acessar este tipo, por exemplo '{1}'. + + + + 'global' may only be used as the first name in a qualified path + 'global' só pode ser usado com primeiro nome em um caminho qualificado + + + + This is not a constructor or literal, or a constructor is being used incorrectly + Este não é um construtor ou literal, ou então um construtor está sendo usado de forma incorreta + + + + Unexpected empty long identifier + Identificador de long vazio inesperado + + + + The record type '{0}' does not contain a label '{1}'. + O tipo de registro '{0}' não contém um rótulo '{1}'. + + + + Invalid field label + Rótulo de campo inválido + + + + Invalid expression '{0}' + Expressão '{0}' inválida + + + + No constructors are available for the type '{0}' + Nenhum construtor está disponível para o tipo '{0}' + + + + The union type for union case '{0}' was defined with the RequireQualifiedAccessAttribute. Include the name of the union type ('{1}') in the name you are using. + O tipo de união para o caso de união '{0}' foi definido com o RequireQualifiedAccessAttribute. Inclua o nome do tipo de união ('{1}') no nome que você está usando. + + + + The record type for the record field '{0}' was defined with the RequireQualifiedAccessAttribute. Include the name of the record type ('{1}') in the name you are using. + O tipo de registro para o campo de registro '{0}' foi definido com o RequireQualifiedAccessAttribute. Inclua o nome do tipo de registro ('{1}') no nome que você está usando. + + + + Unexpected error creating debug information file '{0}' + Erro inesperado ao criar o arquivo de informação de depuração '{0}' + + + + This number is outside the allowable range for this integer type + Este número está fora do intervalo permitido para este tipo de inteiro + + + + '{0}' is not permitted as a character in operator names and is reserved for future use + '{0}' não é permitido como um caractere em nomes de operadores e está reservado para uso futuro + + + + Unexpected character '{0}' + Caractere inesperado '{0}' + + + + This byte array literal contains characters that do not encode as a single byte + Este literal matriz de byte contém caracteres não codificados como um byte simples + + + + Identifiers followed by '{0}' are reserved for future use + Os identificadores seguidos por '{0}' são reservados para uso futuro + + + + This number is outside the allowable range for 8-bit signed integers + Este número está fora do intervalo permitido para inteiros de 8-bit com sinal + + + + This number is outside the allowable range for hexadecimal 8-bit signed integers + Este número está fora do intervalo permitido para inteiros hexadecimais de 8-bit com sinal + + + + This number is outside the allowable range for 8-bit unsigned integers + Este número está fora do intervalo permitido para inteiros de 8-bit sem sinal + + + + This number is outside the allowable range for 16-bit signed integers + Este número está fora do intervalo permitido para inteiros de 16-bit com sinal + + + + This number is outside the allowable range for 16-bit unsigned integers + Este número está fora do intervalo permitido para inteiros de 16-bit sem sinal + + + + This number is outside the allowable range for 32-bit signed integers + Este número está fora do intervalo permitido para inteiros de 32-bit com sinal + + + + This number is outside the allowable range for 32-bit unsigned integers + Este número está fora do intervalo permitido para inteiros de 32-bit sem sinal + + + + This number is outside the allowable range for 64-bit signed integers + Este número está fora do intervalo permitido para inteiros de 64-bit com sinal + + + + This number is outside the allowable range for 64-bit unsigned integers + Este número está fora do intervalo permitido para inteiros de 64-bit sem sinal + + + + This number is outside the allowable range for signed native integers + Este número está fora do intervalo permitido para inteiros nativos com sinal + + + + This number is outside the allowable range for unsigned native integers + Este número está fora do intervalo permitido para inteiros nativos sem sinal + + + + Invalid floating point number + Número do ponto flutuante inválido + + + + This number is outside the allowable range for decimal literals + Este número está fora do intervalo permitido para literais decimais + + + + This number is outside the allowable range for 32-bit floats + Este número está fora do intervalo permitido para floats de 32-bit + + + + This is not a valid numeric literal. Valid numeric literals include 1, 0x1, 0b0001 (int), 1u (uint32), 1L (int64), 1UL (uint64), 1s (int16), 1y (sbyte), 1uy (byte), 1.0 (float), 1.0f (float32), 1.0m (decimal), 1I (BigInteger). + Este não é um literal numérico válido. Literais numéricos válidos incluem 1, 0x1, 0b0001 (int), 1u (uint32), 1L (int64), 1UL (uint64), 1s (int16), 1y (sbyte), 1uy (byte), 1.0 (float), 1.0f (float32), 1.0m (decimal), 1I (BigInteger). + + + + This is not a valid byte literal + Este não é um literal de byte válido + + + + This is not a valid character literal + Este não é um literal de caractere válido + + + + This Unicode encoding is only valid in string literals + Esta codificação Unicode só é válida em literais de cadeia de caracteres + + + + This token is reserved for future use + Este token está reservado para uso futuro + + + + TABs are not allowed in F# code unless the #indent \"off\" option is used + TABs não são permitidos em código F#, a menos que a opção #indent \"off\" seja usada + + + + Invalid line number: '{0}' + Número de linha inválido: '{0}' + + + + #if directive must appear as the first non-whitespace character on a line + A diretiva #if deve aparecer como o primeiro caractere diferente de um espaço em branco em uma linha + + + + #else has no matching #if + #else não tem nenhuma correspondência #if + + + + #endif required for #else + #endif requerido por #else + + + + #else directive must appear as the first non-whitespace character on a line + A diretiva #else deve aparecer como o primeiro caractere diferente de um espaço em branco em uma linha + + + + #endif has no matching #if + #endif não tem nenhuma correspondência #if + + + + #endif directive must appear as the first non-whitespace character on a line + A diretiva #endif deve aparecer como o primeiro caractere diferente de um espaço em branco em uma linha + + + + #if directive should be immediately followed by an identifier + A diretiva #if deve ser seguida imediatamente por um identificador + + + + Syntax error. Wrong nested #endif, unexpected tokens before it. + Erro de sintaxe. #endif aninhado de forma errada, tokens não são esperados antes dele. + + + + #! may only appear as the first line at the start of a file. + #! somente pode aparecer na primeira linha do início de um arquivo. + + + + Expected single line comment or end of line + Linha de comando simples ou fim de linha esperado + + + + Infix operator member '{0}' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ... + O membro do operador infixo '{0}' não possui argumentos. Uma tupla de 2 argumentos é esperada, como por exemplo o membro estático (+) (x,y) = ... + + + + Infix operator member '{0}' has {1} initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ... + O membro do operador infixo '{0}' possui {1} argumentos iniciais. Uma tupla de 2 argumentos é esperada, como por exemplo o membro estático (+) (x,y) = ... + + + + Infix operator member '{0}' has extra curried arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ... + O membro do operador infixo '{0}' possui argumentos na forma curried adicionais. Uma tupla de 2 argumentos é esperada, como por exemplo o membro estático (+) (x,y) = ... + + + + All record, union and struct types in FSharp.Core.dll must be explicitly labelled with 'StructuralComparison' or 'NoComparison' + Todos tipos de registro, união e struct em FSharp.Core.dll devem ser rotulados explicitamente com 'StructuralComparison' ou 'NoComparison' + + + + The struct, record or union type '{0}' has the 'StructuralComparison' attribute but the type parameter '{1}' does not satisfy the 'comparison' constraint. Consider adding the 'comparison' constraint to the type parameter + O tipo struct, registro ou união '{0}' tem o atributo 'StructuralComparison', mas o parâmetro de tipo '{1}' não satisfaz a restrição 'comparison'. Considere incluir a restrição 'comparison' ao parâmetro de tipo + + + + The struct, record or union type '{0}' has the 'StructuralComparison' attribute but the component type '{1}' does not satisfy the 'comparison' constraint + O tipo struct, registro ou união '{0}' tem o atributo 'StructuralComparison', mas o tipo de componente '{1}' não satisfaz a restrição 'comparison' + + + + The struct, record or union type '{0}' is not structurally comparable because the type parameter {1} does not satisfy the 'comparison' constraint. Consider adding the 'NoComparison' attribute to the type '{2}' to clarify that the type is not comparable + O tipo de struct, registro ou união '{0}' não é estruturalmente comparável porque o parâmetro de tipo {1} não satisfaz a restrição 'comparison'. Considere adicionar o atributo 'NoComparison' ao tipo '{2}' para esclarecer que o tipo não é comparável + + + + The struct, record or union type '{0}' is not structurally comparable because the type '{1}' does not satisfy the 'comparison' constraint. Consider adding the 'NoComparison' attribute to the type '{2}' to clarify that the type is not comparable + O tipo de struct, registro ou união '{0}' não é estruturalmente comparável porque o tipo {1} não satisfaz a restrição 'comparison'. Considere adicionar o atributo 'NoComparison' ao tipo '{2}' para esclarecer que o tipo não é comparável + + + + The struct, record or union type '{0}' does not support structural equality because the type parameter {1} does not satisfy the 'equality' constraint. Consider adding the 'NoEquality' attribute to the type '{2}' to clarify that the type does not support structural equality + O tipo de struct, registro ou união '{0}' não suporta igualdade estrutural porque o parâmetro de tipo {1} não satisfaz a restrição 'equality'. Considere adicionar o atributo 'NoEquality' ao tipo '{2}' para esclarecer que o tipo não suporta igualdade estrutural + + + + The struct, record or union type '{0}' does not support structural equality because the type '{1}' does not satisfy the 'equality' constraint. Consider adding the 'NoEquality' attribute to the type '{2}' to clarify that the type does not support structural equality + O tipo de struct, registro ou união '{0}' não suporta igualdade estrutural porque o tipo {1} não satisfaz a restrição 'equality'. Considere adicionar o atributo 'NoEquality' ao tipo '{2}' para esclarecer que o tipo não suporta igualdade estrutural + + + + The struct, record or union type '{0}' has the 'StructuralEquality' attribute but the type parameter '{1}' does not satisfy the 'equality' constraint. Consider adding the 'equality' constraint to the type parameter + O tipo struct, registro ou união '{0}' tem o atributo 'StructuralEquality', mas o parâmetro de tipo '{1}' não satisfaz a restrição 'equality'. Considere adicionar a restrição 'equality' ao parâmetro de tipo + + + + The struct, record or union type '{0}' has the 'StructuralEquality' attribute but the component type '{1}' does not satisfy the 'equality' constraint + O tipo struct, registro ou união '{0}' tem o atributo 'StructuralEquality', mas o tipo de componente '{1}' não satisfaz a restrição 'equality' + + + + Each argument of the primary constructor for a struct must be given a type, for example 'type S(x1:int, x2: int) = ...'. These arguments determine the fields of the struct. + Cada argumento do construtor primário para um struct deve receber um tipo, por exemplo 'type S(x1:int, x2: int) = ...'. Esses argumentos determinam o campo do struct. + + + + The value '{0}' is unused + O valor '{0}' é não usado. + + + + The recursive object reference '{0}' is unused. The presence of a recursive object reference adds runtime initialization checks to members in this and derived types. Consider removing this recursive object reference. + A referência de objeto recursiva '{0}' não é usada. A presença de uma referência de objeto recursiva adiciona verificações de inicialização em tempo de execução aos membros destes tipos e seus derivados. Considere remover essa referência de objeto recursiva. + + + + A getter property may have at most one argument group + Uma propriedade getter pode ter no máximo um grupo de argumento + + + + A setter property may have at most two argument groups + Uma propriedade setter pode ter no máximo dois grupos de argumento + + + + Invalid property getter or setter + Propriedade getter ou setter inválida + + + + An indexer property must be given at least one argument + Uma propriedade do indexador deve receber pelo menos um argumento + + + + This operation accesses a mutable top-level value defined in another assembly in an unsupported way. The value cannot be accessed through its address. Consider copying the expression to a mutable local, e.g. 'let mutable x = ...', and if necessary assigning the value back after the completion of the operation + Esta operação acessa um valor de alto nível mutável definido em outro assembly de uma forma não suportada. O valor não pode ser acessado através de seu endereço. Considere copiar a expressão ao local mutável, por exemplo: 'let mutable x = ...', e se for necessário atribuir o valor de volta após a conclusão da operação + + + + Remove spaces between the type name and type parameter, e.g. \"type C<'T>\", not type \"C <'T>\". Type parameters must be placed directly adjacent to the type name. + Parâmetros de tipo devem ser colocados diretamente ao lado do nome do tipo, por exemplo: \"type C<'T>\", não type \"C <'T>\" + + + + Remove spaces between the type name and type parameter, e.g. \"C<'T>\", not \"C <'T>\". Type parameters must be placed directly adjacent to the type name. + Argumentos de tipo devem ser colocados diretamente ao lado do nome do tipo, por exemplo: \"C<'T>\", não \"C <'T>\" + + + + The use of the type syntax 'int C' and 'C <int>' is not permitted here. Consider adjusting this type to be written in the form 'C<int>' + O uso da sintaxe de tipo 'int C' e 'C <int>' não é permitido aqui. Considere adaptar este tipo para ser gravado na forma 'C<int>' + + + + The module/namespace '{0}' from compilation unit '{1}' did not contain the module/namespace '{2}' + O módulo/namespace '{0}' da unidade de compilação '{1}' não contém o módulo/namespace '{2}' + + + + The module/namespace '{0}' from compilation unit '{1}' did not contain the val '{2}' + O módulo/namespace '{0}' da unidade de compilação '{1}' não contém o val '{2}' + + + + The module/namespace '{0}' from compilation unit '{1}' did not contain the namespace, module or type '{2}' + O módulo/namespace '{0}' da unidade de compilação '{1}' não contém o namespace, módulo ou tipo '{2}' + + + + The 'UseNullAsTrueValue' attribute flag may only be used with union types that have one nullary case and at least one non-nullary case + O sinalizador de atributo 'UseNullAsTrueValue' só podem ser usados com tipos de união que possuem um caso nulário e pelo menos um caso não nulário + + + + The parameter '{0}' was inferred to have byref type. Parameters of byref type must be given an explicit type annotation, e.g. 'x1: byref<int>'. When used, a byref parameter is implicitly dereferenced. + O parâmetro '{0}' foi inferido para ter o tipo byref. Parâmetros de tipo byref devem receber uma anotação de tipo explícito, por exemplo 'x1: byref<int>'. Ao ser usado, um parâmetro byref é desreferenciado implicitamente. + + + + The generic member '{0}' has been used at a non-uniform instantiation prior to this program point. Consider reordering the members so this member occurs first. Alternatively, specify the full type of the member explicitly, including argument types, return type and any additional generic parameters and constraints. + O membro genérico '{0}' foi usado em uma instanciação não uniforme anterior a este ponto de programa. Considere reordenar os membros para que ele venha antes. Como alternativa, especifique o tipo completo do membro explicitamente, incluindo tipos de argumentos, tipo de retorno e todos parâmetros e restrições genéricas adicionais. + + + + The attribute '{0}' appears in both the implementation and the signature, but the attribute arguments differ. Only the attribute from the signature will be included in the compiled code. + O atributo '{0}' parece tanto na implementação quanto na assinatura, mas os argumentos de atributos são diferentes. Apenas o atributo da assinatura será incluído no código compilado. + + + + Cannot call an abstract base member: '{0}' + Não é possível chamar o membro de base abstrata: '{0}' + + + + Could not resolve the ambiguity in the use of a generic construct with an 'unmanaged' constraint at or near this position + Não foi possível resolver a ambiguidade no uso do constructo genérico com uma restrição 'unmanaged' nesta posição ou próxima a ela + + + + This construct is for ML compatibility. {0}. You can disable this warning by using '--mlcompatibility' or '--nowarn:62'. + Este constructo serve para a compatibilidade ML. {0}. Você pode desabilitar esse aviso usando '--mlcompatibility' ou '--nowarn:62'. + + + + The type '{0}' has been marked as having an Explicit layout, but the field '{1}' has not been marked with the 'FieldOffset' attribute + O tipo '{0}' foi marcado como tendo um layout explícito, mas o campo '{1}' não tinha sido marcado com o atributo 'FieldOffset' + + + + Interfaces inherited by other interfaces should be declared using 'inherit ...' instead of 'interface ...' + Interfaces herdadas de outras interfaces devem ser declaradas com o uso de 'inherit ...' ao invés de 'interface ...' + + + + Invalid prefix operator + Operador pré-fixo inválido + + + + Invalid operator definition. Prefix operator definitions must use a valid prefix operator name. + Definição de operador inválida. Definições de operadores pré-fixos precisam usar um nome de operador válido. + + + + The file extensions '.ml' and '.mli' are for ML compatibility + As extensões de arquivo '.ml' e '.mli' são para compatibilidade com ML + + + + Consider using a file with extension '.ml' or '.mli' instead + Considere usar um arquivo com extensão '.ml' ou '.mli' em vez disso + + + + Active pattern '{0}' is not a function + O padrão ativo '{0}' não é uma função + + + + Active pattern '{0}' 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' + O padrão ativo '{0}' possui um tipo de resultado contendo variáveis de tipo que não são determinadas pela entrada. A causa comum é a falta da menção ao caso de resultado, por exemplo 'let (|A|B|) (x:int) = A x'. Isto pode ser corrigido com uma restrição de tipo, por exemplo 'let (|A|B|) (x:int) : Choice<int,unit> = A x' + + + + The FieldOffset attribute can only be placed on members of types marked with the StructLayout(LayoutKind.Explicit) + O atributo FieldOffset só pode ser colocado em membros de tipos marcados com StructLayout(LayoutKind.Explicit) + + + + Optional arguments must come at the end of the argument list, after any non-optional arguments + Argumentos opcionais devem vir no final da lista de argumentos, depois dos argumentos não opcionais + + + + Attribute 'System.Diagnostics.ConditionalAttribute' is only valid on methods or attribute classes + O atributo 'System.Diagnostics.ConditionalAttribute' somente é válido em classes de métodos ou atributos + + + + Extension members cannot provide operator overloads. Consider defining the operator as part of the type definition instead. + Membros de extensão não podem fornecer sobrecargas de operadores. Considere definir o operador como parte da definição de tipo. + + + + The name of the MDB file must be <assembly-file-name>.mdb. The --pdb option will be ignored. + O nome do arquivo MDB deve ser <nome-do-arquivo-do-assembly>.mdb. A opção --pdb será ignorada. + + + + MDB generation failed. Could not find compatible member {0} + Falha ao gerar MDB. Não foi possível encontrar o membro compatível {0} + + + + Cannot generate MDB debug information. Failed to load the 'MonoSymbolWriter' type from the 'Mono.CompilerServices.SymbolWriter.dll' assembly. + Não é possível gerar informações de depuração de MDB. Falha ao carregar o tipo 'MonoSymbolWriter' do assembly 'Mono.CompilerServices.SymbolWriter.dll'. + + + + The union case named '{0}' conflicts with the generated type '{1}' + O caso união chamado '{0}' conflita com o tipo gerado '{1}' + + + + ReflectedDefinitionAttribute may not be applied to an instance member on a struct type, because the instance member takes an implicit 'this' byref parameter + O ReflectedDefinitionAttribute não pode ser aplicado a um membro de instância em um tipo struct porque o membro da instância assume um parâmetro byref 'this' implícito + + + + DLLImport bindings must be static members in a class or function definitions in a module + As associações DLLImport devem ser membros estáticos em uma classe ou definições de função em um módulo + + + + When mscorlib.dll or FSharp.Core.dll is explicitly referenced the {0} option must also be passed + Enquanto mscorlib.dll ou FSharp.Core.dll é explicitamente referenciado, a opção {0} também deve ser passada + + + + FSharp.Core.sigdata not found alongside FSharp.Core. File expected in {0}. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required. + FSharp.Core.sigdata não encontrado junto com FSharp.Core. Arquivo esperado em {0}. Considere atualizar para uma versão mais recente do FSharp.Corem, na qual esse arquivo não é mais necessário. + + + + File '{0}' not found alongside FSharp.Core. File expected in {1}. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required. + O arquivo '{0}' não foi encontrado junto com FSharp.Core. Arquivo esperado em {1}. Considere atualizar para uma versão mais recente do FSharp.Corem, na qual esse arquivo não é mais necessário. + + + + Filename '{0}' contains invalid character '{1}' + O nome de arquivo '{0}' contém o caractere inválido '{1}'. + + + + 'use!' bindings must be of the form 'use! <var> = <expr>' + Associações 'use!' devem estar no formato 'use! <var> = <expr>' + + + + Inner generic functions are not permitted in quoted expressions. Consider adding some type constraints until this function is no longer generic. + Funções genéricas interiores não são permitidas em expressões entre aspas. Considere adicionar algumas restrições de tipo até que esta função não seja mais genérica. + + + + The type '{0}' is not a valid enumerator type , i.e. does not have a 'MoveNext()' method returning a bool, and a 'Current' property + O tipo '{0}' não é um tipo de enumerador válido, ou seja, não possui um método MoveNext()' retornando um bool e uma propriedade 'Current' + + + + End of file in triple-quote string begun at or before here + Fim de arquivo na cadeia de caracteres com aspas triplas iniciada aqui ou antes + + + + End of file in triple-quote string embedded in comment begun at or before here + Fim de arquivo na cadeia de caracteres com aspas triplas inserida no comentário iniciado aqui ou antes + + + + This type test or downcast will ignore the unit-of-measure '{0}' + Esse teste de tipo ou downcast ignorará a unidade de medida '{0}' + + + + Expected type argument or static argument + Argumento de tipo ou argumento estático esperado + + + + Unmatched '<'. Expected closing '>' + '<' sem correspondência. '>' de fechamento esperado + + + + Unexpected quotation operator '<@' in type definition. If you intend to pass a verbatim string as a static argument to a type provider, put a space between the '<' and '@' characters. + Operador de cotação inesperado '<@' na definição do tipo. Se você pretende passar uma cadeia de caracteres textual como argumento estático para um provedor de tipos, coloque um espaço entre os caracteres '<' e '@'. + + + + Attempted to parse this as an operator name, but failed + A tentativa de analisar isto como um nome de operador falhou + + + + \U{0} is not a valid Unicode character escape sequence + \U{0} não é uma sequência de escape de caracteres Unicode válida + + + + '{0}' must be applied to an argument of type '{1}', but has been applied to an argument of type '{2}' + '{0}' deve ser aplicado a um argumento do tipo '{1}', mas foi aplicado a um argumento do tipo '{2}' + + + + '{0}' can only be applied to optional arguments + '{0}' só pode ser aplicado a argumentos opcionais + + + + The specified .NET Framework version '{0}' is not supported. Please specify a value from the enumeration Microsoft.Build.Utilities.TargetDotNetFrameworkVersion. + Não há suporte para a versão especificada do .NET Framework '{0}'. Especifique um valor da enumeração Microsoft.Build.Utilities.TargetDotNetFrameworkVersion. + + + + Invalid Magic value in CLR Header + Valor Mágico Inválido no Cabeçalho CLR + + + + Bad image format + Formato de imagem inválido + + + + Private key expected + Chave privada esperada + + + + RSA key expected + Chave RSA esperada + + + + Invalid bit Length + Tamanho de bit inválido + + + + Invalid RSAParameters structure - '{{0}}' expected + Estrutura RSAParameters inválida - '{{0}}' esperado + + + + Invalid algId - 'Exponent' expected + algId inválido - 'Exponente' esperado + + + + Invalid signature size + Tamanho de assinatura inválido + + + + No signature directory + Nenhum diretório de assinatura + + + + Invalid Public Key blob + Blob de Chave Pública Inválido + + + + Exiting - too many errors + Saindo: excesso de erros + + + + The documentation file has no .xml suffix + O arquivo de documentação não possui sufixo .xml + + + + No implementation files specified + Nenhum arquivo de implementação especificado + + + + The attribute {0} specified version '{1}', but this value is invalid and has been ignored + O atributo {0} especificou a versão '{1}', mas esse valor é inválido e foi ignorado + + + + Conflicting options specified: 'win32manifest' and 'win32res'. Only one of these can be used. + Opções de conflito especificadas: 'win32manifest' e 'win32res'. Somente uma delas pode ser usada. + + + + The code in assembly '{0}' makes uses of quotation literals. Static linking may not include components that make use of quotation literals unless all assemblies are compiled with at least F# 4.0. + O código no assembly '{0}' usa literais de cotação. A vinculação estática pode não incluir componentes que usam literais de cotação, a menos que todos os assemblies estejam compilados com, pelo menos, F# 4.0. + + + + Code in this assembly makes uses of quotation literals. Static linking may not include components that make use of quotation literals unless all assemblies are compiled with at least F# 4.0. + O código neste assembly usa literais de cotação. A vinculação estática pode não incluir componentes que usam literais de cotação, a menos que todos os assemblies estejam compilados com, pelo menos, F# 4.0. + + + + Static linking may not include a .EXE + A vinculação estática pode não incluir um .EXE + + + + Static linking may not include a mixed managed/unmanaged DLL + A vinculação estática pode não incluir uma DLL gerenciada/não gerenciada mista + + + + Ignoring mixed managed/unmanaged assembly '{0}' during static linking + Ignorando assembly gerenciado/não gerenciado misto '{0}' durante vinculação estática + + + + Assembly '{0}' was referenced transitively and the assembly could not be resolved automatically. Static linking will assume this DLL has no dependencies on the F# library or other statically linked DLLs. Consider adding an explicit reference to this DLL. + O assembly '{0}' foi referenciado transitivamente e o assembly não pôde ser resolvido automaticamente. A vinculação estática assumirá que esta DLL não possui dependências na biblioteca F# ou outras DLLs vinculadas estaticamente. Considere adicionar uma referência explícita a esta DLL. + + + + Assembly '{0}' not found in dependency set of target binary. Statically linked roots should be specified using an assembly name, without a DLL or EXE extension. If this assembly was referenced explicitly then it is possible the assembly was not actually required by the generated binary, in which case it should not be statically linked. + O assembly '{0}' não foi encontrado no conjunto de dependências do binário de destino. Raízes vinculadas estaticamente devem ser especificadas por um nome de assembly, sem extensão DLL ou EXE. Se esse assembly foi referenciado explicitamente, é possível que ele não tenha sido exigido de fato pelo binário gerado e, nesse caso, ele não deve ser vinculado estaticamente. + + + + The key file '{0}' could not be opened + Não foi possível abrir o arquivo de chave '{0}' + + + + A problem occurred writing the binary '{0}': {1} + Ocorreu um problema ao gravar o binário '{0}': {1} + + + + The 'AssemblyVersionAttribute' has been ignored because a version was given using a command line option + O 'AssemblyVersionAttribute' foi ignorado porque uma versão foi atribuída usando uma opção de linha de comando + + + + Error emitting 'System.Reflection.AssemblyCultureAttribute' attribute -- 'Executables cannot be satellite assemblies, Culture should always be empty' + Erro ao emitir o atributo 'System.Reflection.AssemblyCultureAttribute' -- 'Executáveis não podem ser assemblies satélites, a Cultura deve estar sempre vazia' + + + + Option '--delaysign' overrides attribute 'System.Reflection.AssemblyDelaySignAttribute' given in a source file or added module + A opção '--delaysign' substitui o atributo 'System.Reflection.AssemblyDelaySignAttribute' fornecido em um arquivo de origem ou módulo adicionado + + + + Option '--keyfile' overrides attribute 'System.Reflection.AssemblyKeyFileAttribute' given in a source file or added module + A opção '--keyfile' substitui o atributo 'System.Reflection.AssemblyKeyFileAttribute' fornecido em um módulo adicionado ou arquivo de origem + + + + Option '--keycontainer' overrides attribute 'System.Reflection.AssemblyNameAttribute' given in a source file or added module + A opção '--keycontainer' substitui o atributo 'System.Reflection.AssemblyNameAttribute' fornecido em um módulo adicionado ou arquivo de origem + + + + The assembly '{0}' is listed on the command line. Assemblies should be referenced using a command line flag such as '-r'. + O assembly '{0}' está listado na linha de comando. Assemblies devem ser referenciados usando um sinalizador de linha de comando como '-r'. + + + + The resident compilation service was not used because a problem occured in communicating with the server. + O serviço de compilação residente não foi usado porque houve um problema de comunicação com o servidor. + + + + Problem with filename '{0}': Illegal characters in path. + Problema com nome de arquivo '{0}': caracteres inválidos no caminho. + + + + Passing a .resx file ({0}) as a source file to the compiler is deprecated. Use resgen.exe to transform the .resx file into a .resources file to pass as a --resource option. If you are using MSBuild, this can be done via an <EmbeddedResource> item in the .fsproj project file. + A passagem de um arquivo .resx ({0}) como arquivo de origem para o compilador foi preterida. Use o resgen.exe para transformar o arquivo .resx em um arquivo .resources para passar como uma opção --resource. Se você estiver usando o MSBuild, isso poderá ser feito via um item <EmbeddedResource> no arquivo de projeto .fsproj. + + + + Static linking may not be used on an assembly referencing mscorlib (e.g. a .NET Framework assembly) when generating an assembly that references System.Runtime (e.g. a .NET Core or Portable assembly). + A vinculação estática não pode ser usada em um assembly com referência a mscorlib (por exemplo, um assembly do .NET Framework) ao gerar um assembly com referência a System.Runtime (por exemplo, um assembly .NET Core ou Portátil). + + + + An {0} specified version '{1}', but this value is a wildcard, and you have requested a deterministic build, these are in conflict. + Uma versão especificada {0} '{1}', mas esse valor é um curinga, e você solicitou uma compilação determinística. Eles estão em conflito. + + + + Determinstic builds only support portable PDBs (--debug:portable or --debug:embedded) + Compilações determinísticas dão suporte somente a PDBs portáteis (--debug:portable ou --debug:embedded) + + + + Character '{0}' is not allowed in provided namespace name '{1}' + O caractere '{0}' não é permitido no nome de namespace fornecido '{1}'. + + + + The provided type '{0}' returned a member with a null or empty member name + O tipo fornecido '{0}' retornou um membro com nome de membro nulo ou vazio + + + + The provided type '{0}' returned a null member + O tipo fornecido '{0}' retornou um membro nulo + + + + The provided type '{0}' member info '{1}' has null declaring type + As informações do membro {1} do tipo fornecido '{0}' possui um tipo de declaração nulo + + + + The provided type '{0}' has member '{1}' which has declaring type '{2}'. Expected declaring type to be the same as provided type. + O tipo fornecido '{0}' possui um membro '{1}' com tipo declarativo '{2}'. O tipo declarativo esperado deve ser o mesmo que o tipo fornecido. + + + + Referenced assembly '{0}' has assembly level attribute '{1}' but no public type provider classes were found + O assembly referenciado '{0}' possui atributo de nível de assembly '{1}', mas nenhuma classe de provedor de tipos público foi encontrada + + + + Type '{0}' from type provider '{1}' has an empty namespace. Use 'null' for the global namespace. + O tipo '{0}' do provedor de tipos '{1}' possui um namespace vazio. Use 'null' para o namespace global. + + + + Empty namespace found from the type provider '{0}'. Use 'null' for the global namespace. + Namespace vazio encontrado do provedor de tipos '{0}'. Use 'null' para o namespace global. + + + + Provided type '{0}' has 'IsGenericType' as true, but generic types are not supported. + O tipo fornecido '{0}' possui 'IsGenericType' como verdadeiro, mas não há suporte a tipos genéricos. + + + + Provided type '{0}' has 'IsArray' as true, but array types are not supported. + O tipo fornecido '{0}' possui 'IsArray' como verdadeiro, mas não há suporte a tipos matriz. + + + + Invalid member '{0}' on provided type '{1}'. Provided type members must be public, and not be generic, virtual, or abstract. + Membro inválido '{0}' no tipo fornecido '{1}'. Os membros do tipo fornecido devem ser públicos, e não genéricos, virtuais ou abstratos. + + + + Invalid member '{0}' on provided type '{1}'. Only properties, methods and constructors are allowed + Membro inválido '{0}' no tipo fornecido '{1}'. Somente propriedades, métodos e construtores são permitidos + + + + Property '{0}' on provided type '{1}' has CanRead=true but there was no value from GetGetMethod() + A propriedade '{0}' no tipo fornecido '{1}' possui CanRead=true, mas não houve valor de GetGetMethod() + + + + Property '{0}' on provided type '{1}' has CanRead=false but GetGetMethod() returned a method + A propriedade '{0}' no tipo fornecido '{1}' possui CanRead=false, mas GetGetMethod() retornou um método + + + + Property '{0}' on provided type '{1}' has CanWrite=true but there was no value from GetSetMethod() + A propriedade '{0}' no tipo fornecido '{1}' possui CanWrite=true, mas não houve valor de GetSetMethod() + + + + Property '{0}' on provided type '{1}' has CanWrite=false but GetSetMethod() returned a method + A propriedade '{0}' no tipo fornecido '{1}' possui CanWrite=false, mas GetSetMethod() retornou um método + + + + One or more errors seen during provided type setup + Um ou mais erros observados durante a configuração de tipo fornecida + + + + Unexpected exception from provided type '{0}' member '{1}': {2} + Exceção inesperada do membro '{1}' do tipo fornecido '{0}': {2} + + + + Unsupported constant type '{0}'. Quotations provided by type providers can only contain simple constants. The implementation of the type provider may need to be adjusted by moving a value declared outside a provided quotation literal to be a 'let' binding inside the quotation literal. + Tipo da constante sem suporte '{0}'. Citações fornecidas pelos provedores de tipo só podem conter constantes simples. A implementação do provedor do tipo talvez precise ser ajustada movendo um valor declarado para fora de um literal de citação fornecido para que seja uma associação 'let' dentro do literal de citação. + + + + Unsupported expression '{0}' from type provider. If you are the author of this type provider, consider adjusting it to provide a different provided expression. + Expressão '{0}' sem suporte do provedor de tipos. Se você é o autor desse provedor de tipo, considere ajustá-lo para oferecer uma expressão diferente. + + + + Expected provided type named '{0}' but provided type has 'Name' with value '{1}' + Um tipo fornecido com nome '{0}' era esperado, mas o tipo fornecido possui 'Name' com o valor '{1}' + + + + Event '{0}' on provided type '{1}' has no value from GetAddMethod() + O evento '{0}' no tipo fornecido '{1}' não tem valores de GetAddMethod() + + + + Event '{0}' on provided type '{1}' has no value from GetRemoveMethod() + O evento '{0}' no tipo fornecido '{1}' não tem valores de GetRemoveMethod() + + + + Assembly attribute '{0}' refers to a designer assembly '{1}' which cannot be loaded or doesn't exist. {2} + O atributo '{0}' do assembly refere-se a um assembly de designer '{1}' que não pode ser carregado ou não existe. {2} + + + + The type provider does not have a valid constructor. A constructor taking either no arguments or one argument of type 'TypeProviderConfig' was expected. + O provedor de tipos não tem um construtor válido. Um construtor que não recebe argumentos ou recebe um argumento do tipo 'TypeProviderConfig' era esperado. + + + + The type provider '{0}' reported an error: {1} + O provedor de tipos '{0}' relatou um erro: {1} + + + + The type provider '{0}' used an invalid parameter in the ParameterExpression: {1} + O provedor de tipos '{0}' usou um parâmetro inválido na ParameterExpression: {1} + + + + The type provider '{0}' provided a method with a name '{1}' and metadata token '{2}', which is not reported among its methods of its declaring type '{3}' + O provedor de tipos '{0}' forneceu um método com um nome '{1}' e um token de metadados '{2}' que não é relatado entre seus métodos de seu tipo declarante '{3}' + + + + The type provider '{0}' provided a constructor which is not reported among the constructors of its declaring type '{1}' + O provedor de tipos '{0}' forneceu um construtor que não é relatado entre os construtores de seu tipo declarante '{1}' + + + + A direct reference to the generated type '{0}' is not permitted. Instead, use a type definition, e.g. 'type TypeAlias = <path>'. This indicates that a type provider adds generated types to your assembly. + Uma referência direta ao tipo gerado '{0}' não é permitida. Em vez disso, use uma definição de tipo, por exemplo, 'type TypeAlias = <caminho>'. Isso indica que um provedor de tipos adiciona tipos gerados ao seu assembly. + + + + Expected provided type with path '{0}' but provided type has path '{1}' + Um tipo fornecido com caminho '{0}' era esperado, mas o tipo fornecido possui o caminho '{1}' + + + + Unexpected 'null' return value from provided type '{0}' member '{1}' + Valor 'null' inesperado retornado do membro '{1}' do tipo fornecido '{0}' + + + + Unexpected exception from member '{0}' of provided type '{1}' member '{2}': {3} + Exceção inesperada do membro '{0}' do membro '{2}' do tipo fornecido '{1}': {3} + + + + Nested provided types do not take static arguments or generic parameters + Os tipos fornecidos aninhados não recebem argumentos estáticos ou parâmetros genéricos + + + + Invalid static argument to provided type. Expected an argument of kind '{0}'. + Argumento estático inválido para tipo fornecido. Argumento do tipo '{0}' esperado. + + + + An error occured applying the static arguments to a provided type + Erro ao aplicar os argumentos estáticos a um tipo fornecido + + + + Unknown static argument kind '{0}' when resolving a reference to a provided type or method '{1}' + Tipo de argumento estático desconhecido '{0}' ao resolver uma referência a um método ou tipo fornecido '{1}' + + + + invalid namespace for provided type + namespace inválido para tipo fornecido + + + + invalid full name for provided type + nome completo inválido para tipo fornecido + + + + The type provider returned 'null', which is not a valid return value from '{0}' + O provedor de tipos retornou 'null', o que não é um valor retornado válido de '{0}'. + + + + The type provider constructor has thrown an exception: {0} + O construtor do provedor de tipos gerou uma exceção: {0} + + + + Type provider '{0}' returned null from GetInvokerExpression. + O provedor de tipos '{0}' retornou nulo de GetInvokerExpression. + + + + The type provider '{0}' returned an invalid type from 'ApplyStaticArguments'. A type with name '{1}' was expected, but a type with name '{2}' was returned. + O provedor de tipos '{0}' retornou um tipo inválido de 'ApplyStaticArguments'. Um tipo com nome '{1}' era esperado, mas um tipo com nome '{2}' foi retornado. + + + + The type provider '{0}' returned an invalid method from 'ApplyStaticArgumentsForMethod'. A method with name '{1}' was expected, but a method with name '{2}' was returned. + O provedor de tipos '{0}' retornou um método inválido de 'AplicarArgumentosEstáticosParaMétodo'. Um método com o nome '{1}' era esperado, mas um método com o nome '{2}' foi retornado. + + + + This type test or downcast will erase the provided type '{0}' to the type '{1}' + Esse teste de tipo ou downcast irá apagar o tipo fornecido '{0}' para o tipo '{1}' + + + + This downcast will erase the provided type '{0}' to the type '{1}'. + Este downcast apagará o tipo fornecido '{0}' para o tipo '{1}'. + + + + This type test with a provided type '{0}' is not allowed because this provided type will be erased to '{1}' at runtime. + Este teste de tipo com um tipo fornecido '{0}' não é permitido porque este tipo fornecido será apagado para '{1}' no tempo de execução. + + + + Cannot inherit from erased provided type + Não é possível herdar de um tipo fornecido apagado + + + + Assembly '{0}' hase TypeProviderAssembly attribute with invalid value '{1}'. The value should be a valid assembly name + O assembly '{0}' possui um atributo TypeProviderAssembly com valor inválido '{1}'. O valor deve ser um nome de assembly válido + + + + Invalid member name. Members may not have name '.ctor' or '.cctor' + Nome de membro inválido. Os membros não podem ter os nomes '.ctor' ou '.cctor' + + + + The function or member '{0}' is used in a way that requires further type annotations at its definition to ensure consistency of inferred types. The inferred signature is '{1}'. + A função ou o membro '{0}' é usado de uma forma que requer anotações de tipo adicionais em sua definição para garantir a consistência de tipos deduzidos. A assinatura deduzida é '{1}'. + + + + The number of type arguments did not match: '{0}' given, '{1}' expected. This may be related to a previously reported error. + O número de argumentos de tipo não corresponde: '{0}' fornecido, '{1}' esperado. Isso pode estar relacionado a um erro relatado anteriormente. + + + + Cannot override inherited member '{0}' because it is sealed + Não é possível substituir o membro herdado '{0}' porque ele é sealed + + + + The type provider '{0}' reported an error in the context of provided type '{1}', member '{2}'. The error: {3} + O provedor de tipos '{0}' relatou um erro no contexto do tipo fornecido '{1}', membro '{2}'. Erro: {3} + + + + An exception occurred when accessing the '{0}' of a provided type: {1} + Exceção ao acessar o '{0}' de um tipo fornecido: {1} + + + + The '{0}' of a provided type was null or empty. + O '{0}' de um tipo fornecido era nulo ou vazio. + + + + Character '{0}' is not allowed in provided type name '{1}' + O caractere '{0}' não é permitido no nome de tipo fornecido '{1}'. + + + + In queries, '{0}' must use a simple pattern + Em consultas, '{0}' deve usar um padrão simples + + + + A custom query operation for '{0}' is required but not specified + Uma consulta de operação personalizada para '{0}' é necessária, mas não foi especificada + + + + Named static arguments must come after all unnamed static arguments + Argumentos estáticos nomeados devem ser colocados após todos os argumentos estáticos não nomeados + + + + The static parameter '{0}' of the provided type or method '{1}' requires a value. Static parameters to type providers may be optionally specified using named arguments, e.g. '{2}<{3}=...>'. + O parâmetro estático '{0}' do tipo fornecido ou método '{1}' requer um valor. Parâmetros estáticos para provedores de tipos podem, opcionalmente, ser especificados usando argumentos nomeados, por exemplo, e.g. '{2}<{3}=...>'. + + + + No static parameter exists with name '{0}' + Não existe um parâmetro estático com o nome '{0}' + + + + The static parameter '{0}' has already been given a value + O parâmetro estático '{0}' já recebeu um valor + + + + Multiple static parameters exist with name '{0}' + Há vários parâmetros estáticos com o nome '{0}' + + + + A custom operation may not be used in conjunction with a non-value or recursive 'let' binding in another part of this computation expression + Uma operação personalizada não pode ser usada em conjunto com uma vinculação 'let' recursiva ou sem valor em outra parte desta expressão computacional + + + + A custom operation may not be used in conjunction with 'use', 'try/with', 'try/finally', 'if/then/else' or 'match' operators within this computation expression + Uma operação personalizada não pode ser usada em conjunto com os operadores 'use', 'try/with', 'try/finally', 'if/then/else' ou 'match' nesta expressão computacional + + + + The custom operation '{0}' refers to a method which is overloaded. The implementations of custom operations may not be overloaded. + A operação personalizada '{0}' refere-se a um método que está sobrecarregado. As implementações das operações personalizadas não podem ser sobrecarregadas. + + + + An if/then/else expression may not be used within queries. Consider using either an if/then expression, or use a sequence expression instead. + Uma expressão if/then/else não pode ser usada em consultas. Considere usar uma expressão if/then ou uma expressão de sequência. + + + + Invalid argument to 'methodhandleof' during codegen + Argumento inválido para 'methodhandleof' durante geração de código + + + + A reference to a provided type was missing a value for the static parameter '{0}'. You may need to recompile one or more referenced assemblies. + Uma referência para um tipo fornecido não continha um valor para o parâmetro estático '{0}'. Talvez seja necessário recompilar um ou mais assemblies referenciados. + + + + A reference to a provided type had an invalid value '{0}' for a static parameter. You may need to recompile one or more referenced assemblies. + Uma referência a um tipo fornecido possuía um valor inválido '{0}' para um parâmetro estático. Talvez seja necessário recompilar um ou mais assemblies referenciados. + + + + '{0}' is not used correctly. This is a custom operation in this query or computation expression. + '{0}' não está sendo usado corretamente. Esta é uma operação personalizada nesta consulta ou expressão de computação. + + + + '{0}' is not used correctly. Usage: {1}. This is a custom operation in this query or computation expression. + '{0}' não está sendo usado corretamente. Uso: {1}. Esta é uma operação personalizada nesta consulta ou expressão de computação. + + + + {0} var in collection {1} (outerKey = innerKey). Note that parentheses are required after '{2}' + {0} var na coleção {1} (outerKey = innerKey). Observe que os parênteses são necessários após '{2}' + + + + {0} var in collection {1} (outerKey = innerKey) into group. Note that parentheses are required after '{2}' + {0} var na coleção {1} (outerKey = innerKey) para o grupo. Observe que os parênteses são necessários após '{2}' + + + + {0} var in collection + {0} var na coleção + + + + '{0}' must be followed by a variable name. Usage: {1}. + '{0}' deve ser seguido por um nome de variável. Uso: {1}. + + + + Incorrect syntax for '{0}'. Usage: {1}. + Sintaxe incorreta para '{0}'. Uso: {1}. + + + + '{0}' must come after a 'for' selection clause and be followed by the rest of the query. Syntax: ... {1} ... + '{0}' deve vir após uma cláusula de seleção 'for' e ser seguido pelo restante da consulta. Sintaxe: ... {1} ... + + + + '{0}' is used with an incorrect number of arguments. This is a custom operation in this query or computation expression. Expected {1} argument(s), but given {2}. + '{0}' é usado com um número incorreto de argumentos. Esta é uma operação personalizada nesta consulta ou expressão de computação. {1} argumentos são esperados, mas {2} foram fornecidos. + + + + Expected an expression after this point + Expressão esperada após este ponto + + + + Expected a type after this point + Um tipo é esperado após este ponto + + + + Unmatched '[<'. Expected closing '>]' + '[<' sem correspondência. '>]' de fechamento esperado + + + + Unexpected end of input in 'match' expression. Expected 'match <expr> with | <pat> -> <expr> | <pat> -> <expr> ...'. + Fim inesperado de entrada na expressão 'match'. 'match <expr> with | <pat> -> <expr> | <pat> -> <expr> ...' esperado. + + + + Unexpected end of input in 'try' expression. Expected 'try <expr> with <rules>' or 'try <expr> finally <expr>'. + Fim inesperado de entrada na expressão 'try'. 'try <expr> with <regras>' ou 'try <expr> finally <expr>' esperado. + + + + Unexpected end of input in 'while' expression. Expected 'while <expr> do <expr>'. + Fim inesperado de entrada na expressão 'while'. 'while <expr> do <expr>' esperado. + + + + Unexpected end of input in 'for' expression. Expected 'for <pat> in <expr> do <expr>'. + Fim inesperado de entrada na expressão 'for'. 'for <pat> in <expr> do <expr>' esperado. + + + + Unexpected end of input in 'match' or 'try' expression + Fim inesperado de entrada na expressão 'match' ou 'try'. + + + + Unexpected end of input in 'then' branch of conditional expression. Expected 'if <expr> then <expr>' or 'if <expr> then <expr> else <expr>'. + Fim inesperado de entrada em ramificação 'then' de expressão condicional. 'if <expr> then <expr>' ou 'if <expr> then <expr> else <expr>' esperado. + + + + Unexpected end of input in 'else' branch of conditional expression. Expected 'if <expr> then <expr>' or 'if <expr> then <expr> else <expr>'. + Fim inesperado de entrada em ramificação 'else' de expressão condicional. 'if <expr> then <expr>' ou 'if <expr> then <expr> else <expr>' esperado. + + + + Unexpected end of input in body of lambda expression. Expected 'fun <pat> ... <pat> -> <expr>'. + Fim inesperado de entrada no corpo da expressão lambda. 'fun <pat> ... <pat> -> <expr>' esperado. + + + + Unexpected end of input in type arguments + Fim inesperado de entrada em argumentos de tipo + + + + Unexpected end of input in type signature + Fim inesperado de entrada em assinatura de tipo + + + + Unexpected end of input in type definition + Fim inesperado de entrada em definição de tipo + + + + Unexpected end of input in object members + Fim inesperado de entrada em membros de objeto. + + + + Unexpected end of input in value, function or member definition + Fim inesperado de entrada em definição de valor, função ou membro + + + + Unexpected end of input in expression + Fim inesperado de entrada na expressão + + + + Unexpected end of type. Expected a name after this point. + Fim de tipo inesperado. Esperado um nome após este ponto. + + + + Incomplete value or function definition. If this is in an expression, the body of the expression must be indented to the same column as the 'let' keyword. + Definição incompleta de valor ou função. Se isso for uma expressão, o corpo da expressão deverá ser recuado para a mesma coluna que a palavra-chave 'let'. + + + + Incomplete value definition. If this is in an expression, the body of the expression must be indented to the same column as the 'let!' keyword. + Definição incompleta de valor. Se isso for uma expressão, o corpo da expressão deverá ser recuado para a mesma coluna que a palavra-chave 'let'. + + + + Incomplete value definition. If this is in an expression, the body of the expression must be indented to the same column as the 'use!' keyword. + Definição incompleta de valor. Se isso for uma expressão, o corpo da expressão deverá ser recuado para a mesma coluna que a palavra-chave 'use!'. + + + + Incomplete value definition. If this is in an expression, the body of the expression must be indented to the same column as the 'use' keyword. + Definição incompleta de valor. Se isso for uma expressão, o corpo da expressão deverá ser recuado para a mesma coluna que a palavra-chave 'use'. + + + + Missing 'do' in 'while' expression. Expected 'while <expr> do <expr>'. + 'do' ausente em expressão 'while'. 'while <expr> do <expr>' esperado. + + + + Missing 'do' in 'for' expression. Expected 'for <pat> in <expr> do <expr>'. + 'do' ausente em expressão 'for'. Esperado 'for <pat> in <expr> do <expr>'. + + + + Invalid join relation in '{0}'. Expected 'expr <op> expr', where <op> is =, =?, ?= or ?=?. + Relação de junção inválida em '{0}'. 'expr <op> expr' é esperado, onde <op> é =, =?, ?= ou ?=?. + + + + Calls + Chamadas + + + + Invalid number of generic arguments to type '{0}' in provided type. Expected '{1}' arguments, given '{2}'. + Número inválido de argumentos genéricos para o tipo '{0}' no tipo fornecido. '{1}' argumentos esperados, '{2}' recebidos. + + + + Invalid value '{0}' for unit-of-measure parameter '{1}' + Valor inválido '{0}' para parâmetro de unidade de medida '{1}' + + + + Invalid value unit-of-measure parameter '{0}' + Valor inválido do parâmetro de unidade de medida '{0}' + + + + Property '{0}' on provided type '{1}' is neither readable nor writable as it has CanRead=false and CanWrite=false + A propriedade '{0}' no tipo fornecido '{1}' não é legível nem gravável, pois possui CanRead=false e CanWrite=false + + + + A use of 'into' must be followed by the remainder of the computation + O uso de 'into' deve ser seguido pelo restante da computação + + + + The operator '{0}' does not accept the use of 'into' + O operador '{0}' não aceita o uso de 'into' + + + + The definition of the custom operator '{0}' does not use a valid combination of attribute flags + A definição do operador personalizado '{0}' não usa uma combinação válida de sinalizadores de atributos + + + + This type definition may not have the 'CLIMutable' attribute. Only record types may have this attribute. + Esta definição de tipo pode não ter o atributo CLIMutable'. Somente tipos de registro podem ter este atributo. + + + + 'member val' definitions are only permitted in types with a primary constructor. Consider adding arguments to your type definition, e.g. 'type X(args) = ...'. + As definições de 'member val' são permitidas apenas em tipos com um construtor primário. Considere adicionar argumentos à sua definição de tipo, por exemplo, 'type X(args) = ...'. + + + + Property definitions may not be declared mutable. To indicate that this property can be set, use 'member val PropertyName = expr with get,set'. + As definições de propriedades podem não ser declaradas mutáveis. Para indicar que esta propriedade pode ser definida, use 'member val PropertyName = expr com get,set'. + + + + To indicate that this property can be set, use 'member val PropertyName = expr with get,set'. + Para indicar que esta propriedade pode ser definida, use 'member val PropertyName = expr com get,set'. + + + + Type '{0}' is illegal because in byref<T>, T cannot contain byref types. + O tipo '{0}' é inválido porque o byref<T>, T não pode conter tipos byref. + + + + F# supports array ranks between 1 and 32. The value {0} is not allowed. + F# dá suporte a classificações de matriz entre 1 e 32. O valor {0} não é permitido. + + + + In queries, use the form 'for x in n .. m do ...' for ranging over integers + Em consultas, use o formato 'for x in n .. m do ...' para inteiros abrangentes + + + + 'while' expressions may not be used in queries + As expressões 'while' não podem ser usadas em consultas + + + + 'try/finally' expressions may not be used in queries + As expressões 'try/finally' não podem ser usadas em consultas + + + + 'use' expressions may not be used in queries + As expressões 'use' não podem ser usadas em consultas + + + + 'let!', 'use!' and 'do!' expressions may not be used in queries + As expressões 'let!', 'use!' e 'do!' não podem ser usadas em consultas + + + + 'return' and 'return!' may not be used in queries + 'return' e 'return!' não podem ser usados em consultas + + + + This is not a known query operator. Query operators are identifiers such as 'select', 'where', 'sortBy', 'thenBy', 'groupBy', 'groupValBy', 'join', 'groupJoin', 'sumBy' and 'averageBy', defined using corresponding methods on the 'QueryBuilder' type. + Este não é um operador de consulta válido. Operadores de consulta são identificadores como 'select', 'where', 'sortBy', 'thenBy', 'groupBy', 'groupValBy', 'join', 'groupJoin', 'sumBy' e 'averageBy' definidos usando métodos correspondentes no tipo 'QueryBuilder'. + + + + 'try/with' expressions may not be used in queries + As expressões 'try/with' não podem ser usadas em consultas + + + + This 'let' definition may not be used in a query. Only simple value definitions may be used in queries. + Esta definição 'let' não pode ser usada em uma consulta. Somente definições de valores simples podem ser usadas em consultas. + + + + Too many static parameters. Expected at most {0} parameters, but got {1} unnamed and {2} named parameters. + Excesso de parâmetros estáticos. Eram esperados no máximo {0} parâmetros, mas {1} parâmetros não nomeados e {2} parâmetros nomeados foram recebidos. + + + + Invalid provided literal value '{0}' + Valor literal fornecido '{0}' inválido + + + + The 'anycpu32bitpreferred' platform can only be used with EXE targets. You must use 'anycpu' instead. + A plataforma 'anycpu32bitpreferred' só pode ser usada com destinos EXE. Em vez disso, use 'anycpu'. + + + + This member, function or value declaration may not be declared 'inline' + Esta declaração de membro, função ou valor não pode ser declarada 'inline' + + + + The provider '{0}' returned a non-generated type '{1}' in the context of a set of generated types. Consider adjusting the type provider to only return generated types. + O provedor '{0}' retornou um tipo não gerado '{1}' no contexto de um conjunto de tipos gerados. Considere ajustar o provedor de tipos para retornar somente tipos gerados. + + + + Arguments to query operators may require parentheses, e.g. 'where (x > y)' or 'groupBy (x.Length / 10)' + Argumentos de operadores de consultas podem exigir parênteses, por exemplo, 'where (x > y)' ou 'groupBy (x.Length / 10)' + + + + A quotation may not involve an assignment to or taking the address of a captured local variable + Uma cotação não pode incluir uma atribuição para ou assumir o endereço de uma variável local capturada + + + + + 1 overload + + 1 sobrecarga + + + + + {0} overloads + + {0} sobrecargas + + + + Erased to + Apagado para + + + + Unexpected token '{0}' or incomplete expression + Token '{0}' inesperado ou expressão incompleta + + + + Cannot find code target for this attribute, possibly because the code after the attribute is incomplete. + Não é possível encontrar o destino de código para este atributo, possivelmente porque o código após o atributo está incompleto. + + + + Type name cannot be empty. + O nome do tipo não pode ficar vazio. + + + + Problem reading assembly '{0}': {1} + Problema ao ler assembly '{0}': {1} + + + + Invalid provided field. Provided fields of erased provided types must be literals. + Campo fornecido inválido. Os campos fornecidos de tipos fornecidos apagados devem ser literais. + + + + (loading description...) + (carregando descrição...) + + + + (description unavailable...) + (descrição não disponível...) + + + + A type variable has been constrained by multiple different class types. A type variable may only have one class constraint. + Uma variável de tipo foi restringida por vários tipos de classes diferentes. Uma variável de tipo só pode conter uma restrição de classe. + + + + 'match' expressions may not be used in queries + As expressões 'match' não podem ser usadas em consultas + + + + Infix operator member '{0}' has {1} initial argument(s). Expected a tuple of 3 arguments + O membro do operador infixo '{0}' possui {1} argumentos iniciais. Uma tupla de 3 argumentos é esperada + + + + The operator '{0}' cannot be resolved. Consider opening the module 'Microsoft.FSharp.Linq.NullableOperators'. + O operador '{0}' não pode ser resolvido. Considere abrir o módulo 'Microsoft.FSharp.Linq.NullableOperators'. + + + + '{0}' must be followed by 'in'. Usage: {1}. + '{0}' deve ser seguido por 'in'. Uso: {1}. + + + + Neither 'member val' nor 'override val' definitions are permitted in object expressions. + As definições de 'member val' e 'override val' não são permitidas em expressões de objetos. + + + + Copy-and-update record expressions must include at least one field. + As expressões de registros copiar e atualizar devem incluir pelo menos um campo. + + + + '_' cannot be used as field name + '_' não pode ser usado como nome de campo + + + + The provided types generated by this use of a type provider may not be used from other F# assemblies and should be marked internal or private. Consider using 'type internal TypeName = ...' or 'type private TypeName = ...'. + Os tipos fornecidos gerados por este uso de um provedor de tipos não podem ser usados de outros assemblies F# e devem ser marcados como internos ou privados. Considere usar 'type internal TypeName = ...' ou 'type private TypeName = ...'. + + + + A property's getter and setter must have the same type. Property '{0}' has getter of type '{1}' but setter of type '{2}'. + O getter e o setter de uma propriedade devem ter o mesmo tipo. A propriedade '{0}' possui getter do tipo '{1}', mas setter do tipo '{2}'. + + + + Array method '{0}' is supplied by the runtime and cannot be directly used in code. For operations with array elements consider using family of GetArray/SetArray functions from LanguagePrimitives.IntrinsicFunctions module. + O método de matriz '{0}' é fornecido pelo tempo de execução e não pode ser usado diretamente no código. Para operações com elementos de matriz, considere usar a família de funções GetArray/SetArray do módulo LanguagePrimitives.IntrinsicFunctions. + + + + The union case '{0}' does not have a field named '{1}'. + O caso união/exceção '{0}' não possui um campo chamado '{1}'. + + + + Union case/exception field '{0}' cannot be used more than once. + O campo '{0}' do caso união/exceção não pode ser usado mais de uma vez. + + + + Named field '{0}' is used more than once. + O campo nomeado '{0}' é usado mais de uma vez. + + + + Named field '{0}' conflicts with autogenerated name for anonymous field. + O campo nomeado '{0}' está em conflito com o nome gerado automaticamente para o campo anônimo. + + + + This literal expression or attribute argument results in an arithmetic overflow. + Esta expressão literal ou este argumento de atributo resulta em um estouro aritmético. + + + + This is not valid literal expression. The [<Literal>] attribute will be ignored. + Expressão literal inválida. O atributo [<Literal>] será ignorado. + + + + System.Runtime.InteropServices assembly is required to use UnknownWrapper\DispatchWrapper classes. + O assembly System.Runtime.InteropServices é necessário para usar classes as UnknownWrapper\DispatchWrapper. + + + + The mutable local '{0}' is implicitly allocated as a reference cell because it has been captured by a closure. This warning is for informational purposes only to indicate where implicit allocations are performed. + O local mutável '{0}' está alocado implicitamente como uma célula de referência porque foi capturado por um fechamento. Este aviso é somente para fins informativos para indicar onde alocações implícitas são executadas. + + + + A type provider implemented GetStaticParametersForMethod, but ApplyStaticArgumentsForMethod was not implemented or invalid + Um provedor de tipos implementado ObterParâmetrosEstáticosParaMétodo, mas AplicarArgumentosEstatísticasParaMétodo não foi implementado ou inválido + + + + An error occured applying the static arguments to a provided method + Ocorreu um erro ao aplicar os argumentos estáticos para um método fornecido + + + + Unexpected character '{0}' in preprocessor expression + Caractere inesperado '{0}' na expressão do pré-processador + + + + Unexpected token '{0}' in preprocessor expression + Token inesperado '{0}' na expressão do pré-processador + + + + Incomplete preprocessor expression + Expressão incompleta do pré-processador + + + + Missing token '{0}' in preprocessor expression + Token ausente '{0}' na expressão do pré-processador + + + + An error occurred while reading the F# metadata node at position {0} in table '{1}' of assembly '{2}'. The node had no matching declaration. Please report this warning. You may need to recompile the F# assembly you are using. + Ocorreu um erro ao ler o nó de metadados F# na posição {0} na tabela '{1}' do assembly '{2}'. O nó não tinha declaração correspondente. Reporte este aviso. Pode ser necessário recompilar o assembly F# que você está usando. + + + + Type inference caused the type variable {0} to escape its scope. Consider adding an explicit type parameter declaration or adjusting your code to be less generic. + A inferência de tipos causou um escape no escopo da variável de tipo {0}. Considere adicionar uma declaração de parâmetro de tipo explícito ou ajustar seu código para ser menos genérico. + + + + Type inference caused an inference type variable to escape its scope. Consider adding type annotations to make your code less generic. + A inferência de tipos causou um escape no escopo de uma variável de tipo de inferência. Considere adicionar anotações de tipo para tornar seu código menos genérico. + + + + Redundant arguments are being ignored in function '{0}'. Expected {1} but got {2} arguments. + Argumentos redundantes estão sendo ignorados na função '{0}'. Era esperado {1} mas foi obtido {2} argumentos. + + + + Lowercase literal '{0}' is being shadowed by a new pattern with the same name. Only uppercase and module-prefixed literals can be used as named patterns. + O literal em minúsculas '{0}' está sendo ocultado por um novo padrão com o mesmo nome. Somente literais com prefixo de módulo e em maiúsculas podem ser usados como padrões de nomes. + + + + This literal pattern does not take arguments + Esse padrão literal não tem argumentos + + + + Constructors are not permitted as extension members - they must be defined as part of the original definition of the type + Os construtores não são permitidos como membros de extensão - eles devem ser definidos como parte da definição original do tipo + + + + Invalid response file '{0}' ( '{1}' ) + Arquivo de resposta '{0}' inválido ( '{1}' ) + + + + Response file '{0}' not found in '{1}' + Arquivo de resposta '{0}' não encontrado em '{1}' + + + + Response file name '{0}' is empty, contains invalid characters, has a drive specification without an absolute path, or is too long + O nome do arquivo de resposta '{0}' está vazio, contém caracteres inválidos, tem uma especificação de unidade sem um caminho absoluto ou é muito longo + + + + Cannot find FSharp.Core.dll in compiler's directory + Não é possível localizar FSharp.Core.dll no diretório do compilador + + + + One tuple type is a struct tuple, the other is a reference tuple + Um tipo de tupla é uma tupla de struct, o outro é uma tupla de referência + + + + This provided method requires static parameters + Esse método fornecido requer parâmetros estáticos + + + + The conversion from {0} to {1} is a compile-time safe upcast, not a downcast. Consider using 'upcast' instead of 'downcast'. + A conversão de {0} para {1} é um upcast de segurança de tempo de compilação, não um downcast. Considere usar 'upcast' em vez de 'downcast'. + + + + The conversion from {0} to {1} is a compile-time safe upcast, not a downcast. Consider using the :> (upcast) operator instead of the :?> (downcast) operator. + A conversão de {0} para {1} é o upcast de segurança de tempo de compilação, não um downcast. Considere usar o operador :> (upcast) em vez do operador :?> (downcast). + + + + The 'rec' on this module is implied by an outer 'rec' declaration and is being ignored + O 'rec' neste módulo é implícito por uma declaração 'rec' externa e está sendo ignorado + + + + In a recursive declaration group, 'open' declarations must come first in each module + Em um grupo de declaração recursivo, as declarações 'open' devem vir antes em cada módulo + + + + In a recursive declaration group, module abbreviations must come after all 'open' declarations and before other declarations + Em um grupo de declaração recursivo, as abreviações de módulo devem vir após todas as declarações 'open' e antes de outras declarações + + + + This declaration is not supported in recursive declaration groups + Não há suporte para esta declaração em grupos de declaração recursivos + + + + Invalid use of 'rec' keyword + Uso inválido da palavra-chave 'rec' + + + + If a union type has more than one case and is a struct, then all fields within the union type must be given unique names. + Se um tipo de união tiver mais de um caso e for struct, então todos os campos dentro do tipo de união deverão ter nomes exclusivos. + + + + The CallerMemberNameAttribute applied to parameter '{0}' will have no effect. It is overridden by the CallerFilePathAttribute. + O CallerMemberNameAttribute aplicado ao parâmetro '{0}' não terá nenhum efeito. Ele será substituído pelo CallerFilePathAttribute. + + + + Invalid use of 'fixed'. 'fixed' may only be used in a declaration of the form 'use x = fixed expr' where the expression is an array, the address of a field, the address of an array element or a string' + Uso inválido da 'fixed'. 'fixed' somente pode ser usada em uma declaração no formato 'use x = fixed expr', em que a expressão é uma matriz, o endereço de um campo, o endereço de um elemento de matriz ou uma cadeia de caracteres + + + + Could not find method System.Runtime.CompilerServices.OffsetToStringData in references when building 'fixed' expression. + Não foi possível encontrar o método System.Runtime.CompilerServices.OffsetToStringData nas referências ao compilar a expressão 'fixed'. + + + + {0} is an active pattern and cannot be treated as a discriminated union case with named fields. + {0} é um padrão ativo e não pode ser tratado como um caso de união discriminada com campos nomeados. + + + + The default value does not have the same type as the argument. The DefaultParameterValue attribute and any Optional attribute will be ignored. Note: 'null' needs to be annotated with the correct type, e.g. 'DefaultParameterValue(null:obj)'. + O valor padrão não tem o mesmo tipo que o argumento. O atributo DefaultParameterValue e qualquer atributo Optional serão ignorados. Observação: 'null' precisa ser anotado com o tipo correto, por exemplo, 'DefaultParameterValue(null:obj)'. + + + + The system type '{0}' was required but no referenced system DLL contained this type + O tipo de sistema '{0}' era necessário, mas nenhum DLL de sistema referenciado o continha + + + + The member '{0}' matches multiple overloads of the same method.\nPlease restrict it to one of the following:{1}. + O membro '{0}' corresponde a várias sobrecargas do mesmo método.\nLimite-o a uma das seguintes:{1}. + + + + Method or object constructor '{0}' is not static + O método ou o construtor de objeto '{0}' não é estático + + + + Unexpected symbol '=' in expression. Did you intend to use 'for x in y .. z do' instead? + Símbolo inesperado '=' na expressão. Você pretendia usar 'for x in y .. z do' em vez disso? + + + + Indicates a method that either has no implementation in the type in which it is declared or that is virtual and has a default implementation. + Indica um método que não tem implementação no tipo no qual ele é declarado ou que é virtual e tem uma implementação padrão. + + + + Used in mutually recursive bindings, in property declarations, and with multiple constraints on generic parameters. + Usado em associações mutualmente recursivas, em declarações de propriedade e em múltiplas restrições em parâmetros genéricos. + + + + Used to give the current class object an object name. Also used to give a name to a whole pattern within a pattern match. + Usado para dar ao objeto de classe atual um nome de objeto. Também usado para dar um nome para um padrão completo em uma correspondência de padrão. + + + + Used to verify code during debugging. + Usado para verificar o código durante a depuração. + + + + Used as the name of the base class object. + Usado como o nome do objeto de classe base. + + + + In verbose syntax, indicates the start of a code block. + Na sintaxe detalhada, indica o começo de um bloco de código. + + + + In verbose syntax, indicates the start of a class definition. + Na sintaxe detalhada, indica o começo de uma definição de classe. + + + + Indicates an implementation of an abstract method; used together with an abstract method declaration to create a virtual method. + Indica uma implementação de um método abstrato; usado em conjunto com uma declaração de método abstrato para criar um método virtual. + + + + Used to declare a delegate. + Usada para declarar um delegado. + + + + Used in looping constructs or to execute imperative code. + Usado em construções de looping ou para executar código imperativo. + + + + In verbose syntax, indicates the end of a block of code in a looping expression. + Na sintaxe detalhada, indica o fim de um bloco de código em uma expressão de looping. + + + + Used to convert to a type that is lower in the inheritance chain. + Usada para converter para um tipo que é inferior na cadeia de herança. + + + + In a for expression, used when counting in reverse. + Em uma expressão, usado ao contar regressivamente. + + + + Used in conditional branching. A short form of else if. + Usado em ramificação condicional. Uma forma abreviada de else if. + + + + Used in conditional branching. + Usado em ramificação condicional. + + + + In type definitions and type extensions, indicates the end of a section of member definitions. In verbose syntax, used to specify the end of a code block that starts with the begin keyword. + Em definições e extensões de tipo, indica o final de uma seção de definições de membro. Na sintaxe detalhada, é usado para especificar o final de um bloco de código que começa com a palavra-chave "begin". + + + + Used to declare an exception type. + Usado para declarar um tipo de exceção. + + + + Indicates that a declared program element is defined in another binary or assembly. + Indica que um elemento de programa declarado é definido em outro binário ou assembly. + + + + Used as a Boolean literal. + Usado como um literal Booliano. + + + + Used together with try to introduce a block of code that executes regardless of whether an exception occurs. + Usado junto com try para introduzir um bloco de código que é executado independentemente da ocorrência de uma exceção. + + + + Used in looping constructs. + Usado em constructos de looping. + + + + Used in lambda expressions, also known as anonymous functions. + Usado em expressões lambda, também conhecidas como funções anônimas. + + + + Used as a shorter alternative to the fun keyword and a match expression in a lambda expression that has pattern matching on a single argument. + Usado como uma alternativa menor para a palavra-chave "fun" e uma expressão de correspondência em uma expressão lambda que tem correspondência de padrão em um único argumento. + + + + Used to reference the top-level .NET namespace. + Usado para referenciar o namespace .NET de nível superior. + + + + Used in conditional branching constructs. + Usado em constructos de ramificação condicional. + + + + Used for sequence expressions and, in verbose syntax, to separate expressions from bindings. + Usada para expressões de sequência e, na sintaxe detalhada, para separar expressões de ligações. + + + + Used to specify a base class or base interface. + Usado para especificar uma classe base ou interface base. + + + + Used to indicate a function that should be integrated directly into the caller's code. + Usado para indicar a função que deve ser integrada diretamente no código do chamador. + + + + Used to declare and implement interfaces. + Usado para declarar e implementar interfaces. + + + + Used to specify that a member is visible inside an assembly but not outside it. + Usado para especificar que membro está visível dentro de um assembly, mas não fora dele. + + + + Used to specify a computation that is to be performed only when a result is needed. + Usado para especificar uma computação que deve ser executada somente quando um resultado é necessário. + + + + Used to associate, or bind, a name to a value or function. + Usado para associar um nome para uma função ou valor. + + + + Used in computation expressions to bind a name to the result of another computation expression. + Usado em fluxos de trabalho assíncronos para associar um nome ao resultado de uma computação assíncrona ou, em outras expressões de cálculo, usado para associar um nome a um resultado, que é do tipo de computação. + + + + Used to branch by comparing a value to a pattern. + Usado para ramificar ao comparar um valor a um padrão. + + + + Used to declare a property or method in an object type. + Usado para declarar uma propriedade ou método em um tipo de objeto. + + + + Used to associate a name with a group of related types, values, and functions, to logically separate it from other code. + Usado para associar um nome com um grupo de tipos, valores e funções relacionados para separá-lo de outro código. + + + + Used to declare a variable, that is, a value that can be changed. + Usado para declarar uma variável, ou seja, um valor que pode ser alterado. + + + + Used to associate a name with a group of related types and modules, to logically separate it from other code. + Usado para associar um nome com um grupo de tipos e módulos relacionados, para separá-lo logicamente de outro código. + + + + Used to declare, define, or invoke a constructor that creates or that can create an object. Also used in generic parameter constraints to indicate that a type must have a certain constructor. + Usado para declarar, definir ou invocar um construtor que cria ou que pode criar um objeto. Também usado em restrições de parâmetro genérico para indicar que um tipo deve ter um certo construtor. + + + + Not actually a keyword. However, not struct in combination is used as a generic parameter constraint. + Não é uma palavra-chave real. No entanto, o "not struct" em combinação é usado como uma restrição de parâmetro genérico. + + + + Indicates the absence of an object. Also used in generic parameter constraints. + Indica a ausência de um objeto. Também usado em restrições de parâmetros genéricos. + + + + Used in discriminated unions to indicate the type of categories of values, and in delegate and exception declarations. + Usado em uniões discriminadas para indicar o tipo de categorias de valores e nas declarações de delegado e exceção. + + + + Used to make the contents of a namespace or module available without qualification. + Usado para disponibilizar o conteúdo de um namespace ou módulo sem qualificação. + + + + Used with Boolean conditions as a Boolean or operator. Equivalent to ||. Also used in member constraints. + Usado com condições Boolianas como um Booliano ou operador. Equivalente a ||. Também usado em restrições de membro. + + + + Used to implement a version of an abstract or virtual method that differs from the base version. + Usado para implantar uma versão de um resumo ou método virtual que difere da versão de base. + + + + Restricts access to a member to code in the same type or module. + Restringe o acesso a um membro para codificar no mesmo tipo ou módulo. + + + + Allows access to a member from outside the type. + Permite acesso a um membro de fora do tipo. + + + + Used to indicate that a function is recursive. + Usado para indicar que uma função é recursiva. + + + + Used to provide a value for the result of the containing computation expression. + Usado para indicar o valor a ser fornecido como o resultado de uma expressão de computação. + + + + Used to provide a value for the result of the containing computation expression, where that value itself comes from the result another computation expression. + Usado para indicar uma expressão de computação que, quando avaliada, fornece o resultado da expressão de computação que a contém. + + + + Used in query expressions to specify what fields or columns to extract. Note that this is a contextual keyword, which means that it is not actually a reserved word and it only acts like a keyword in appropriate context. + Usado em expressões de consulta para especificar quais campos ou colunas extrair. Observe que isso é uma palavra-chave contextual, o que significa que não é realmente uma palavra reservada e age apenas como uma palavra-chave no contexto apropriado. + + + + Used to indicate a method or property that can be called without an instance of a type, or a value member that is shared among all instances of a type. + Usado para indicar um método ou propriedade que podem ser chamados sem uma instância de um tipo ou um membro de valor que é compartilhado entre todas as instâncias de um tipo. + + + + Used to declare a structure type. Also used in generic parameter constraints. Used for OCaml compatibility in module definitions. + Usado para declarar um tipo de estrutura. Também usado nas restrições de parâmetro genérico. Usado para compatibilidade OCaml nas definições do módulo. + + + + Used in conditional expressions. Also used to perform side effects after object construction. + Usado em expressões condicionais. Também usado para desempenhar efeitos colaterais depois de construção de objeto. + + + + Used in for loops to indicate a range. + Usado em loops para indicar um intervalo. + + + + Used to introduce a block of code that might generate an exception. Used together with with or finally. + Usado para introduzir um bloco de código que pode gerar uma exceção. Usado junto com with ou finally. + + + + Used to declare a class, record, structure, discriminated union, enumeration type, unit of measure, or type abbreviation. + Usado para declarar uma classe, registro, estrutura, união discriminada, tipo de enumeração, unidade de medida ou abreviação de tipo. + + + + Used to convert to a type that is higher in the inheritance chain. + Usada para converter para um tipo que é superior na cadeia de herança. + + + + Used instead of let for values that implement IDisposable" + Usado ao invés de let para valores que necessitam que Dispose seja chamado para liberar recursos. + + + + Used instead of let! in computation expressions for computation expression results that implement IDisposable. + Usado ao invés de let! em fluxos de trabalho assíncronos e outras expressões de computação para valores que necessitam que Dispose seja chamado para liberar recursos. + + + + Used in a signature to indicate a value, or in a type to declare a member, in limited situations. + Usado em uma assinatura para indicar um valor ou em um tipo para declarar um membro em situações limitadas. + + + + Indicates the .NET void type. Used when interoperating with other .NET languages. + Indica o tipo void .NET. Usado ao interoperar com outras linguagens .NET. + + + + Used for Boolean conditions (when guards) on pattern matches and to introduce a constraint clause for a generic type parameter. + Usado para condições boolianas (when guards) em correspondências de padrão e para introduzir uma cláusula de restrição para um parâmetro de tipo genérico. + + + + Introduces a looping construct. + Apresenta um constructo de looping. + + + + Used together with the match keyword in pattern matching expressions. Also used in object expressions, record copying expressions, and type extensions to introduce member definitions, and to introduce exception handlers. + Usado em conjunto com a palavra-chave correspondente em expressões de correspondência de padrão. Também usado em expressões de objeto, expressões de cópia de registros e extensões de tipo para apresentar as definições de membro e introduzir os manipuladores de exceção. + + + + Used in a sequence expression to produce a value for a sequence. + Usado em uma expressão de sequência para produzir um valor de uma sequência. + + + + Used in a computation expression to append the result of a given computation expression to a collection of results for the containing computation expression. + Usado em uma expressão de computação para acrescentar ao resultado de uma expressão de computação fornecida a uma coleção de resultados para a expressão de computação que a contém. + + + + In function types, delimits arguments and return values. Yields an expression (in sequence expressions); equivalent to the yield keyword. Used in match expressions + Em tipos de função, delimita argumentos e valores retornados. Produz uma expressão (em expressões de sequência); equivalente à palavra-chave de rendimento. Usado em expressões de correspondência + + + + Assigns a value to a variable. + Atribui um valor a uma variável. + + + + Converts a type to type that is higher in the hierarchy. + Converte um tipo em um tipo em posição superior na hierarquia. + + + + Converts a type to a type that is lower in the hierarchy. + Converte um tipo em um tipo em posição inferior na hierarquia. + + + + Delimits a typed code quotation. + Delimita uma citação tipada do código. + + + + Delimits a untyped code quotation. + Delimita uma citação não tipada do código. + + + + {0} '{1}' not found in assembly '{2}'. A possible cause may be a version incompatibility. You may need to explicitly reference the correct version of this assembly to allow all referenced components to use the correct version. + {0} '{1}' não encontrado no assembly '{2}'. Uma possível causa seria uma incompatibilidade de versão. Talvez seja necessário fazer uma referência explicitamente à versão correta deste assembly para permitir que todos os componentes referenciados possam utilizar a versão correta. + + + + {0} '{1}' not found in type '{2}' from assembly '{3}'. A possible cause may be a version incompatibility. You may need to explicitly reference the correct version of this assembly to allow all referenced components to use the correct version. + {0} '{1}' não encontrado no tipo '{2}' do assembly '{3}'. Uma possível causa seria uma incompatibilidade de versão. Talvez seja necessário fazer uma referência explicitamente à versão correta deste assembly para permitir que todos os componentes referenciados utilizem a versão correta. + + + + is + is + + + + This value is not a function and cannot be applied. + Este valor não é uma função e não pode ser aplicado. + + + + This value is not a function and cannot be applied. Did you intend to access the indexer via {0}.[index] instead? + Este valor não é uma função e não pode ser aplicado. Você pretendia acessar o indexador por meio do {0}.[index] como alternativa? + + + + This expression is not a function and cannot be applied. Did you intend to access the indexer via expr.[index] instead? + Esta expressão não é uma função e não pode ser aplicada. Você pretendia acessar o indexador por meio do expr.[index] como alternativa? + + + + This value is not a function and cannot be applied. Did you forget to terminate a declaration? + Este valor não é uma função e não pode ser aplicado. Você esqueceu de finalizar a declaração? + + + + The argument names in the signature '{0}' and implementation '{1}' do not match. The argument name from the signature file will be used. This may cause problems when debugging or profiling. + Os nomes de argumento na assinatura '{0}' e na implementação '{1}' não coincidem. O nome do argumento do arquivo da assinatura será usado. Isso pode causar problemas durante a depuração ou a criação de perfil. + + + + An error occurred while reading the F# metadata of assembly '{0}'. A reserved construct was utilized. You may need to upgrade your F# compiler or use an earlier version of the assembly that doesn't make use of a specific construct. + Ocorreu um erro ao ler os metadados F# do assembly '{0}'. Foi utilizada um constructo reservado. Talvez seja necessário atualizar seu compilador F# ou usar uma versão anterior do assembly que não faça uso de um constructo específico. + + + + This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. + Essa propriedade ou esse método normalmente não é usado no código F#. Use um padrão de tupla explícito para a desconstrução. + + + + This expression returns a value of type '{0}' but is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to use the expression as a value in the sequence then use an explicit 'yield'. + Essa expressão retorna um valor de tipo '{0}', mas é descartada de forma implícita. Considere o uso de 'let' para associar o resultado a um nome, por exemplo, 'let result = expression'. Se você pretende usar a expressão como um valor na sequência, use um “yield” explícito. + + + + This expression returns a value of type '{0}' but is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to use the expression as a value in the sequence then use an explicit 'yield!'. + Essa expressão retorna um valor de tipo '{0}', mas é descartada de forma implícita. Considere o uso de 'let' para associar o resultado a um nome, por exemplo, 'let result = expression'. Se você pretende usar a expressão como um valor na sequência, use um “yield!” explícito. + + + + Used in computation expressions to pattern match directly over the result of another computation expression. + Usado em expressões de computação para corresponder ao padrão diretamente sobre o resultado de outra expressão de computação. + + + + The file '{0}' changed on disk unexpectedly, please reload. + O arquivo '{0}' foi alterado no disco inesperadamente. Recarregue-o. + + + + The byref pointer is readonly, so this write is not permitted. + O ponteiro byref é somente leitura. Portanto, esta gravação não é permitida. + + + + A value must be mutable in order to mutate the contents or take the address of a value type, e.g. 'let mutable x = ...' + Um valor deve ser mutável para que seja possível mudar o conteúdo ou pegar o endereço de um tipo de valor, por exemplo: 'let mutable x = ...' + + + + A ReadOnly attribute has been applied to a struct type with a mutable field. + O atributo ReadOnly foi aplicado a um tipo de struct com um campo mutável. + + + + A byref pointer returned by a function or method is implicitly dereferenced as of F# 4.5. To acquire the return value as a pointer, use the address-of operator, e.g. '&f(x)' or '&obj.Method(arg1, arg2)'. + Um ponteiro byref retornado por uma função ou um método é implicitamente desreferenciado de F # 4.5. Para adquirir o valor retornado como um ponteiro, utilize o operador de endereços, por exemplo, '&f(x)' ou '&obj.Method(arg1, arg2)'. + + + + A type annotated with IsByRefLike must also be a struct. Consider adding the [<Struct>] attribute to the type. + Um tipo anotado com IsByRefLike também deve ser um struct. Considere adicionar o atributo [<Struct>] ao tipo. + + + + The address of the variable '{0}' or a related expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + O endereço da variável '{0}' ou de uma expressão relacionada não pode ser utilizado neste ponto. Isso tem como objetivo garantir que o endereço do valor local não escape de seu escopo. + + + + This value can't be assigned because the target '{0}' may refer to non-stack-local memory, while the expression being assigned is assessed to potentially refer to stack-local memory. This is to help prevent pointers to stack-bound memory escaping their scope. + Este valor não pode ser atribuído porque o destino '{0}' pode se referir a uma memória local não empilhada, enquanto a expressão que está sendo atribuída é avaliada para possivelmente se referir à memória local empilhada. Isso tem como objetivo ajudar a evitar que os ponteiros da memória vinculada à pilha escapem de seu escopo. + + + + A value defined in a module must be mutable in order to take its address, e.g. 'let mutable x = ...' + O valor definido em um módulo deve ser mutável para obter seu endereço, por exemplo, 'let mutable x = ...' + + + + A type annotated with IsReadOnly must also be a struct. Consider adding the [<Struct>] attribute to the type. + Um tipo anotado com IsReadOnly também deve ser um struct. Considere adicionar o atributo [<Struct>] ao tipo. + + + + Struct members cannot return the address of fields of the struct by reference + Os membros do struct não podem retornar o endereço dos campos do struct por referência + + + + The function or method call cannot be used at this point, because one argument that is a byref of a non-stack-local Span or IsByRefLike type is used with another argument that is a stack-local Span or IsByRefLike type. This is to ensure the address of the local value does not escape its scope. + A função ou a chamada do método não pode ser utilizada neste ponto porque um argumento, que é um byref de um tipo Span ou IsByRefLike local não empilhado, é utilizado com outro argumento, que é um tipo Span ou IsByRefLike local empilhado. Isso tem como objetivo garantir que o endereço do valor local não escape de seu escopo. + + + + The address of a value returned from the expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + O endereço de um valor retornado da expressão não pode ser utilizado neste ponto. Isso tem como objetivo garantir que o endereço do valor local não escape de seu escopo. + + + + The Span or IsByRefLike variable '{0}' cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + A variável '{0}' de Span ou IsByRefLike não pode ser utilizada neste ponto. Isso tem como objetivo garantir que o endereço do valor local não escape de seu escopo. + + + + A Span or IsByRefLike value returned from the expression cannot be used at ths point. This is to ensure the address of the local value does not escape its scope. + O valor Span ou IsByRefLike retornado da expressão não pode ser utilizado neste ponto. Isso tem como objetivo garantir que o endereço do valor local não escape de seu escopo. + + + + Cannot take the address of the value returned from the expression. Assign the returned value to a let-bound value before taking the address. + Não é possível obter o endereço do valor retornado da expressão. Atribua o valor retornado a um valor associado a let antes de obter o endereço. + + + + The Span or IsByRefLike expression cannot be returned from this function or method, because it is composed using elements that may escape their scope. + The Span or IsByRefLike expression cannot be returned from this function or method, because it is composed using elements that may escape their scope. + + + + This type does not inherit Attribute, it will not work correctly with other .NET languages. + This type does not inherit Attribute, it will not work correctly with other .NET languages. + + + + The exception '{0}' does not have a field named '{1}'. + The exception '{0}' does not have a field named '{1}'. + + + + The constructor does not have a field named '{0}'. + The constructor does not have a field named '{0}'. + + + + Active patterns do not have fields. This syntax is invalid. + Active patterns do not have fields. This syntax is invalid. + + + + + \ No newline at end of file diff --git a/src/fsharp/xlf/FSComp.txt.ru.xlf b/src/fsharp/xlf/FSComp.txt.ru.xlf new file mode 100644 index 00000000000..e3b2d9f4b51 --- /dev/null +++ b/src/fsharp/xlf/FSComp.txt.ru.xlf @@ -0,0 +1,7087 @@ + + + + + + The namespace '{0}' is not defined. + Пространство имен "{0}" не определено. + + + + The namespace or module '{0}' is not defined. + Пространство имен или модуль "{0}" не определены. + + + + The field, constructor or member '{0}' is not defined. + Поле, конструктор или элемент "{0}" не определены. + + + + The value, constructor, namespace or type '{0}' is not defined. + Значение, конструктор, пространство имен или тип "{0}" не определены. + + + + The value or constructor '{0}' is not defined. + Значение или конструктор "{0}" не определены. + + + + The value, namespace, type or module '{0}' is not defined. + Значение, пространство имен, тип или модуль "{0}" не определены. + + + + The constructor, module or namespace '{0}' is not defined. + Конструктор, модуль или пространство имен "{0}" не определены. + + + + The type '{0}' is not defined. + Тип "{0}" не определен. + + + + The type '{0}' is not defined in '{1}'. + Тип "{0}" не определен в "{1}". + + + + The record label or namespace '{0}' is not defined. + Метка записи или пространство имен "{0}" не определены. + + + + The record label '{0}' is not defined. + Метка записи "{0}" не определена. + + + + Maybe you want one of the following: + Возможно, требуется одно из следующих: + + + + The type parameter {0} is not defined. + Параметр типа {0} не определен. + + + + The pattern discriminator '{0}' is not defined. + Дискриминатор шаблона "{0}" не определен. + + + + Replace with '{0}' + Заменить на "{0}" + + + + Add . for indexer access. + Добавьте "." для доступа к индексатору. + + + + All elements of a list must be of the same type as the first element, which here is '{0}'. This element has type '{1}'. + Все элементы выражения конструктора списка должны иметь один и тот же тип. В этом выражении ожидалось использование типа "{0}", но используется тип "{1}". + + + + All elements of an array must be of the same type as the first element, which here is '{0}'. This element has type '{1}'. + Все элементы выражения конструктора массива должны иметь один и тот же тип. В этом выражении ожидалось использование типа "{0}", но используется тип "{1}". + + + + This 'if' expression is missing an 'else' branch. Because 'if' is an expression, and not a statement, add an 'else' branch which also returns a value of type '{0}'. + Выражение "if" не содержит ветвь "else". Ветвь "then" включает тип "{0}". Так как "if" является выражением, а не оператором, добавьте ветвь "else", которая возвращает значение того же типа. + + + + The 'if' expression needs to have type '{0}' to satisfy context type requirements. It currently has type '{1}'. + Для соблюдения требований к типу контекста в выражении "if" должен использоваться тип "{0}". Сейчас используется тип "{1}". + + + + All branches of an 'if' expression must return values of the same type as the first branch, which here is '{0}'. This branch returns a value of type '{1}'. + Все ветви выражения "if" должны иметь один и тот же тип. В этом выражении ожидалось использование типа "{0}", но используется тип "{1}". + + + + All branches of a pattern match expression must return values of the same type as the first branch, which here is '{0}'. This branch returns a value of type '{1}'. + Все ветви выражения сопоставления шаблонов должны возвращать значения одного типа. Первая ветвь возвратила значение типа "{0}", а эта ветвь — типа "{1}". + + + + A pattern match guard must be of type 'bool', but this 'when' expression is of type '{0}'. + Условие соответствия шаблону должно иметь тип "bool", но это выражение "when" имеет тип "{0}". + + + + A ';' is used to separate field values in records. Consider replacing ',' with ';'. + Символ ";" используется для разделения значений поля в записях. Рекомендуется заменить "," на ";". + + + + The '!' operator is used to dereference a ref cell. Consider using 'not expr' here. + Оператор "!" используется для разыменования ссылочной ячейки. Рассмотрите использование здесь "not expr". + + + + The non-generic type '{0}' does not expect any type arguments, but here is given {1} type argument(s) + Для не являющегося универсальным типа "{0}" не требуются аргументы типа, однако здесь задано следующее число аргументов типа: {1} + + + + Consider using 'return!' instead of 'return'. + Рекомендуется использовать "return!" вместо "return". + + + + Consider using 'yield!' instead of 'yield'. + Рекомендуется использовать "yield!" вместо "yield". + + + + \nA tuple type is required for one or more arguments. Consider wrapping the given arguments in additional parentheses or review the definition of the interface. + \nНеобходимо указать тип кортежа для одного аргумента (или нескольких). Рекомендуется заключить эти аргументы в дополнительные скобки или проверить определение интерфейса. + + + + Invalid warning number '{0}' + Недопустимый номер предупреждения "{0}". + + + + Invalid version string '{0}' + Недопустимая строка версии "{0}" + + + + Invalid version file '{0}' + Недопустимый файл версии "{0}" + + + + Microsoft (R) F# Compiler version {0} + Microsoft (R) F# Compiler, версия {0} + + + + F# Compiler for F# {0} + Компилятор F# для F# {0} + + + + Problem with filename '{0}': {1} + Ошибка в имени файла "{0}": {1} + + + + No inputs specified + Не указаны входные данные + + + + The '--pdb' option requires the '--debug' option to be used + Для параметра "--pdb" требуется использовать параметр "--debug" + + + + The search directory '{0}' is invalid + Недопустимый каталог поиска "{0}". + + + + The search directory '{0}' could not be found + Не удалось найти каталог поиска "{0}". + + + + '{0}' is not a valid filename + {0} не является допустимым именем файла + + + + '{0}' is not a valid assembly name + {0} не является допустимым именем сборки + + + + Unrecognized privacy setting '{0}' for managed resource, valid options are 'public' and 'private' + Нераспознанный параметр конфиденциальности "{0}" для управляемого ресурса. Допускается использование параметров "public" и "private" + + + + Multiple references to '{0}.dll' are not permitted + Множественные ссылки на файлы "{0}.dll" не допускаются + + + + Could not read version from mscorlib.dll + Не удалось прочитать версию из библиотеки mscorlib.dll + + + + Unable to read assembly '{0}' + Не удается прочитать сборку "{0}" + + + + Assembly resolution failure at or near this location + Сбой при разрешении сборки в этой или близлежащих строках + + + + The declarations in this file will be placed in an implicit module '{0}' based on the file name '{1}'. However this is not a valid F# identifier, so the contents will not be accessible from other files. Consider renaming the file or adding a 'module' or 'namespace' declaration at the top of the file. + Объявления, содержащиеся в этом файле, будут помещены в неявный модуль "{0}" на основе имени файла "{1}". Тем не менее, поскольку этот идентификатор не является допустимым идентификатором F#, содержимое будет недоступно из других файлов. Рекомендуется переименовать файл либо добавить объявление "module" или "namespace" в начало файла. + + + + Files in libraries or multiple-file applications must begin with a namespace or module declaration, e.g. 'namespace SomeNamespace.SubNamespace' or 'module SomeNamespace.SomeModule'. Only the last source file of an application may omit such a declaration. + Файлы в библиотеках или многофайловых приложениях должны начинаться с объявления пространства имен или модуля, например, "namespace SomeNamespace.SubNamespace" или "module SomeNamespace.SomeModule". Такое объявление может отсутствовать только в последнем файле исходного кода приложения. + + + + Files in libraries or multiple-file applications must begin with a namespace or module declaration. When using a module declaration at the start of a file the '=' sign is not allowed. If this is a top-level module, consider removing the = to resolve this error. + Файлы в библиотеках или многофайловых приложениях должны начинаться с объявления пространства имен или модуля. При использовании объявления модуля в начале файла знак "=" не разрешен. Если это модуль верхнего уровня, рекомендуется удалить "=", чтобы устранить эту ошибку. + + + + This file contains multiple declarations of the form 'module SomeNamespace.SomeModule'. Only one declaration of this form is permitted in a file. Change your file to use an initial namespace declaration and/or use 'module ModuleName = ...' to define your modules. + Этот файл содержит несколько объявлений вида "module SomeNamespace.SomeModule". В одном файле может присутствовать только одно объявление такого вида. Измените файл, объявив в нем исходное пространство имен или определив модули с помощью объявления "module ModuleName = ...". + + + + Option requires parameter: {0} + Требуется параметр: {0} + + + + Source file '{0}' could not be found + Исходный файл "{0}" не найден + + + + The file extension of '{0}' is not recognized. Source files must have extension .fs, .fsi, .fsx, .fsscript, .ml or .mli. + Нераспознанное расширение файла "{0}". Исходные файлы должны иметь расширения .fs, .fsi, .fsx, .fsscript, .ml или .mli. + + + + Could not resolve assembly '{0}' + Не удалось разрешить сборку "{0}". + + + + Could not resolve assembly '{0}' required by '{1}' + Не удалось разрешить сборку "{0}", необходимую для "{1}" + + + + Error opening binary file '{0}': {1} + Ошибка при открытии двоичного файла "{0}": {1} + + + + The F#-compiled DLL '{0}' needs to be recompiled to be used with this version of F# + Чтобы использовать библиотеку DLL "{0}", скомпилированную на языке F#, в этой версии F#, необходимо перекомпилировать ее + + + + Invalid directive. Expected '#I \"<path>\"'. + Недопустимая директива. Требуется ''#I \"<путь>\"''. + + + + Invalid directive. Expected '#r \"<file-or-assembly>\"'. + Недопустимая директива. Требуется ''#r \"<файл_или_сборка>\"''. + + + + Invalid directive. Expected '#load \"<file>\" ... \"<file>\"'. + Недопустимая директива. Требуется ''#load \"<файл>\" ... \"<файл>\"''. + + + + Invalid directive. Expected '#time', '#time \"on\"' or '#time \"off\"'. + Недопустимая директива. Требуется ''#time'', ''#time \"on\"'' или ''#time \"off\"''. + + + + Directives inside modules are ignored + Директивы внутри модулей пропущены + + + + A signature for the file or module '{0}' has already been specified + Сигнатура файла или модуля "{0}" уже указана + + + + An implementation of file or module '{0}' has already been given. Compilation order is significant in F# because of type inference. You may need to adjust the order of your files to place the signature file before the implementation. In Visual Studio files are type-checked in the order they appear in the project file, which can be edited manually or adjusted using the solution explorer. + Реализация файла или модуля "{0}" уже задана. В связи с использованием определения типа в F# имеет значение порядок компиляции. Перед выполнением реализации может потребоваться изменение порядка для размещения файла сигнатур. В среде Visual Studio файлы проверяются на типы в том порядке, в котором они отображаются в файле проекта, который можно изменить вручную или с помощью обозревателя решений. + + + + An implementation of the file or module '{0}' has already been given + Реализация файла или модуля "{0}" уже задана + + + + The signature file '{0}' does not have a corresponding implementation file. If an implementation file exists then check the 'module' and 'namespace' declarations in the signature and implementation files match. + Отсутствует соответствующий файл реализации для файла сигнатур "{0}". Если файл реализации существует, убедитесь, что объявления "module" и "namespace" в файлах сигнатур и реализации совпадают. + + + + '{0}' is not a valid integer argument + {0} не является действительным целочисленным аргументом + + + + '{0}' is not a valid floating point argument + {0} не является действительным аргументом с плавающей запятой + + + + Unrecognized option: '{0}' + Нераспознанный параметр: '{0}' + + + + Invalid module or namespace name + Недопустимое имя модуля или пространства имен + + + + Error reading/writing metadata for the F# compiled DLL '{0}'. Was the DLL compiled with an earlier version of the F# compiler? (error: '{1}'). + Ошибка при чтении или записи метаданных для скомпилированной на языке F# библиотеки DLL "{0}". Была ли библиотека DLL скомпилирована с использованием более ранней версии компилятора F#? (ошибка: "{1}"). + + + + The type/module '{0}' is not a concrete module or type + Тип или модуль "{0}" не является конкретным модулем или типом + + + + The type '{0}' has an inline assembly code representation + Тип "{0}" имеет представление встроенного кода сборки + + + + A namespace and a module named '{0}' both occur in two parts of this assembly + Пространство имен и модуль с именем "{0}" одновременно встречаются в двух частях этой сборки + + + + Two modules named '{0}' occur in two parts of this assembly + Два модуля с именем "{0}" встречаются в двух частях этой сборки + + + + Two type definitions named '{0}' occur in namespace '{1}' in two parts of this assembly + Два определения типа с именем "{0}" встречаются в пространстве имен "{1}" в двух разных частях этой сборки + + + + A module and a type definition named '{0}' occur in namespace '{1}' in two parts of this assembly + Определение модуля и типа с именем "{0}" встречаются в пространстве имен "{1}" в двух разных частях этой сборки + + + + Invalid member signature encountered because of an earlier error + Обнаружена недопустимая сигнатура элемента, связанная с предшествующей ошибкой + + + + This value does not have a valid property setter type + Это значение имеет недопустимый тип метода присваивания значения свойства + + + + Invalid form for a property getter. At least one '()' argument is required when using the explicit syntax. + Недопустимая форма метода получения свойства. При использовании явного синтаксиса требуется как минимум один аргумент "()". + + + + Invalid form for a property setter. At least one argument is required. + Недопустимая форма метода присваивания значения свойства. Требуется как минимум один аргумент. + + + + Unexpected use of a byref-typed variable + Недопустимое использование переменной типа byref + + + + Invalid mutation of a constant expression. Consider copying the expression to a mutable local, e.g. 'let mutable x = ...'. + Недопустимое изменение константного выражения. Рекомендуется скопировать выражение в изменяемую локальную переменную, например, "let mutable x = ...". + + + + The value has been copied to ensure the original is not mutated by this operation or because the copy is implicit when returning a struct from a member and another member is then accessed + Значение было скопировано, чтобы не допустить изменения исходного значения этой операцией, или так как копирование выполняется неявно при возвращении структуры из члена и последующего получения доступа к другому члену + + + + Recursively defined values cannot appear directly as part of the construction of a tuple value within a recursive binding + Рекурсивно определяемые значения не могут использоваться непосредственно в составе конструкции или значения кортежа внутри рекурсивной привязки + + + + Recursive values cannot appear directly as a construction of the type '{0}' within a recursive binding. This feature has been removed from the F# language. Consider using a record instead. + Рекурсивные значения не могут использоваться непосредственно в конструкциях вида "{0}" внутри рекурсивной привязки. Эта функция удалена из языка F#. Вместо этого рекомендуется использовать запись. + + + + Recursive values cannot be directly assigned to the non-mutable field '{0}' of the type '{1}' within a recursive binding. Consider using a mutable field instead. + Не допускается непосредственное присваивание рекурсивных значений неизменяемому полю "{0}" типа "{1}" внутри рекурсивной привязки. Вместо этого рекомендуется использовать изменяемое поле. + + + + Unexpected decode of AutoOpenAttribute + Недопустимое декодирование атрибута AutoOpenAttribute + + + + Unexpected decode of InternalsVisibleToAttribute + Недопустимое декодирование атрибута InternalsVisibleToAttribute + + + + Unexpected decode of InterfaceDataVersionAttribute + Недопустимое декодирование атрибута InterfaceDataVersionAttribute + + + + Active patterns cannot return more than 7 possibilities + Активные шаблоны не могут возвращать более 7 возможностей + + + + This is not a valid constant expression or custom attribute value + Это выражение не является допустимым константным выражением или значением пользовательского атрибута + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe mutability attributes differ + Модуль "{0}" содержит\n {1} \nоднако его сигнатура задает\n {2} \nИзменяемость атрибутов различается + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe names differ + Модуль "{0}" содержит\n {1} \nоднако его сигнатура задает\n {2} \nИмена различаются + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe compiled names differ + Модуль "{0}" содержит\n {1} \nоднако в его сигнатуре указано\n {2} \nСкомпилированные имена различаются + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe display names differ + Модуль "{0}" содержит\n {1} \nоднако в его сигнатуре указано\n {2} \nОтображаемые имена различаются + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe accessibility specified in the signature is more than that specified in the implementation + Модуль "{0}" содержит\n {1} \nоднако его сигнатура задает\n {2} \nДоступность, заданная в сигнатуре, шире указанной в реализации + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe inline flags differ + Модуль "{0}" содержит\n {1} \nоднако его сигнатура задает\n {2} \nВстроенные флаги различаются + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe literal constant values and/or attributes differ + Модуль "{0}" содержит\n {1} \nоднако его сигнатура задает\n {2} \nЗначения литеральных констант и (или) атрибутов различаются + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is a type function and the other is not. The signature requires explicit type parameters if they are present in the implementation. + Модуль "{0}" содержит\n {1} \nоднако его сигнатура задает\n {2} \nОдин является функциональным типом, другой - нет Сигнатура требует явных параметров типов, если они присутствуют в реализации. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe respective type parameter counts differ + Модуль "{0}" содержит\n {1} \nоднако его сигнатура задает\n {2} \nСоответствующие количества параметров типов различаются + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe types differ + Модуль "{0}" содержит\n {1} \nоднако его сигнатура задает\n {2} \nТипы различаются + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is an extension member and the other is not + Модуль "{0}" содержит\n {1} \nоднако его сигнатура задает\n {2} \nОдин является элементом расширения, другой - нет + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nAn arity was not inferred for this value + Модуль "{0}" содержит\n {1} \nоднако его сигнатура задает\n {2} \nАрность не была выведена для этого значения + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe number of generic parameters in the signature and implementation differ (the signature declares {3} but the implementation declares {4} + Модуль "{0}" содержит\n {1} \nоднако его сигнатура задает\n {2} \nЧисло универсальных параметров в сигнатуре и реализации различаются (сигнатура объявляет {3}, однако реализация объявляет {4}) + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe generic parameters in the signature and implementation have different kinds. Perhaps there is a missing [<Measure>] attribute. + Модуль "{0}" содержит\n {1} \nНо его сигнатура задает\n {2} \nВ сигнатуре и реализации указаны универсальные параметры разного вида. Возможно, отсутствует атрибут [<Measure>]. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe arities in the signature and implementation differ. The signature specifies that '{3}' is function definition or lambda expression accepting at least {4} argument(s), but the implementation is a computed function value. To declare that a computed function value is a permitted implementation simply parenthesize its type in the signature, e.g.\n\tval {5}: int -> (int -> int)\ninstead of\n\tval {6}: int -> int -> int. + Модуль "{0}" содержит\n {1} \nоднако его сигнатура задает\n {2} \nАрности в сигнатуре и реализации различаются. Сигнатура указывает, что "{3}" является определением функции или лямбда-выражением, принимающим по крайней мере {4} аргументов, однако реализация является вычисляемым значением функции. Чтобы объявить, что вычисляемое значение функции является разрешенной реализацией, просто возьмите в круглые скобки его тип в сигнатуре, например:\n\tval {5}: int -> (int -> int)\nвместо\n\tval {6}: int -> int -> int. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe CLI member names differ + Модуль "{0}" содержит\n {1} \nоднако его сигнатура задает\n {2} \nИмена элементов CLI различаются + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is static and the other isn't + Модуль "{0}" содержит\n {1} \nоднако его сигнатура задает\n {2} \nОдин является статическим, другой - нет + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is virtual and the other isn't + Модуль "{0}" содержит\n {1} \nоднако его сигнатура задает\n {2} \nОдин является виртуальным, другой - нет + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is abstract and the other isn't + Модуль "{0}" содержит\n {1} \nоднако его сигнатура задает\n {2} \nОдин является абстрактным, другой - нет + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is final and the other isn't + Модуль "{0}" содержит\n {1} \nоднако его сигнатура задает\n {2} \nОдин является финальным, другой - нет + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is marked as an override and the other isn't + Модуль "{0}" содержит\n {1} \nоднако его сигнатура задает\n {2} \nОдин помечен как "override", другой - нет + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is a constructor/property and the other is not + Модуль "{0}" содержит\n {1} \nоднако его сигнатура задает\n {2} \nОдин является конструктором или свойством, другой - нет + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe compiled representation of this method is as a static member but the signature indicates its compiled representation is as an instance member + Модуль "{0}" содержит\n {1} \nоднако его сигнатура задает\n {2} \nОткомпилированное представление этого метода является статическим элементом, однако его сигнатура указывает, что его откомпилированное представление является экземплярным элементом + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe compiled representation of this method is as an instance member, but the signature indicates its compiled representation is as a static member + Модуль "{0}" содержит\n {1} \nоднако его сигнатура задает\n {2} \nОткомпилированное представление этого метода является экземплярным элементом, однако его сигнатура указывает, что его откомпилированное представление является статическим элементом + + + + The {0} definitions in the signature and implementation are not compatible because the names differ. The type is called '{1}' in the signature file but '{2}' in implementation. + Определения {0} в сигнатуре и реализации несовместимы, так как названия различаются. Название типа — "{1}" в файле сигнатуры, но "{2}" в реализации. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the respective type parameter counts differ + Определения {0} для типа "{1}" в сигнатуре и реализации несовместимы, так как соответствующие количества параметров типов различаются. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the accessibility specified in the signature is more than that specified in the implementation + Определения {0} для типа "{1}" в сигнатуре и реализации несовместимы, так как доступность, заданная в сигнатуре, шире указанной в реализации. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature requires that the type supports the interface {2} but the interface has not been implemented + Определения {0} для типа "{1}" в сигнатуре и реализации несовместимы, так как в сигнатуре указано, что тип поддерживает интерфейс {2}, который не реализован. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation says this type may use nulls as a representation but the signature does not + Определения {0} для типа "{1}" в сигнатуре и реализации несовместимы, так как реализация (в отличие от сигнатуры) определяет, что этот тип может использовать значение NULL в качестве представления. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation says this type may use nulls as an extra value but the signature does not + Определения {0} для типа "{1}" в сигнатуре и реализации несовместимы, так как реализация (в отличие от сигнатуры) определяет, что этот тип может использовать значение NULL в качестве дополнительного значения. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature says this type may use nulls as a representation but the implementation does not + Определения {0} для типа "{1}" в сигнатуре и реализации несовместимы, так как сигнатура (в отличие от реализации) определяет, что этот тип может использовать значение NULL в качестве представления. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature says this type may use nulls as an extra value but the implementation does not + Определения {0} для типа "{1}" в сигнатуре и реализации несовместимы, так как сигнатура (в отличие от реализации) определяет, что этот тип может использовать значение NULL в качестве дополнительного значения. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation type is sealed but the signature implies it is not. Consider adding the [<Sealed>] attribute to the signature. + Определения {0} для типа "{1}" в сигнатуре и реализации несовместимы, так как тип реализации запечатан, а сигнатура неявно предполагает обратное. Попробуйте добавить в сигнатуру атрибут [<Sealed>]. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation type is not sealed but signature implies it is. Consider adding the [<Sealed>] attribute to the implementation. + Определения {0} для типа "{1}" в сигнатуре и реализации несовместимы, так как тип реализации не запечатан, а сигнатура неявно предполагает обратное. Попробуйте добавить в реализацию атрибут [<Sealed>]. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation is an abstract class but the signature is not. Consider adding the [<AbstractClass>] attribute to the signature. + Определения {0} для типа "{1}" в сигнатуре и реализации несовместимы, так как реализация является абстрактным классом, а сигнатура — нет. Попробуйте добавить в сигнатуру атрибут [<AbstractClass>]. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature is an abstract class but the implementation is not. Consider adding the [<AbstractClass>] attribute to the implementation. + Определения {0} для типа "{1}" в сигнатуре и реализации несовместимы, так как сигнатура является абстрактным классом, а реализация — нет. Попробуйте добавить в реализацию атрибут [<AbstractClass>]. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the types have different base types + Определения {0} для типа "{1}" в сигнатуре и реализации несовместимы, так как типы имеют разные базовые типы. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the number of {2}s differ + Определения {0} для типа "{1}" в сигнатуре и реализации несовместимы, так как количества {2} различаются. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature defines the {2} '{3}' but the implementation does not (or does, but not in the same order) + Определения {0} для типа "{1}" в сигнатуре и реализации несовместимы, так как сигнатура определяет {2} "{3}", а реализация — нет (или определяет, но не в том же порядке). + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation defines the {2} '{3}' but the signature does not (or does, but not in the same order) + Определения {0} для типа "{1}" в сигнатуре и реализации несовместимы, так как реализация определяет {2} "{3}", а сигнатура — нет (или определяет, но не в том же порядке). + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation defines a struct but the signature defines a type with a hidden representation + Определения {0} для типа "{1}" в сигнатуре и реализации несовместимы, так как реализация определяет структуру, а сигнатура определяет тип со скрытым представлением. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because a CLI type representation is being hidden by a signature + Определения {0} для типа "{1}" в сигнатуре и реализации несовместимы, так как представление типа CLI скрывается сигнатурой. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because a type representation is being hidden by a signature + Определения {0} для типа "{1}" в сигнатуре и реализации несовместимы, так как представление типа скрывается сигнатурой. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the types are of different kinds + Определения {0} для типа "{1}" в сигнатуре и реализации несовместимы, так как типы принадлежат разным разновидностям. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the IL representations differ + Определения {0} для типа "{1}" в сигнатуре и реализации несовместимы, так как представления IL различаются. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the representations differ + Определения {0} для типа "{1}" в сигнатуре и реализации несовместимы, так как представления различаются. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the field {2} was present in the implementation but not in the signature + Определения {0} для типа "{1}" в сигнатуре и реализации несовместимы, так как поле {2} присутствует в реализации, но отсутствует в сигнатуре. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the order of the fields is different in the signature and implementation + Определения {0} для типа "{1}" в сигнатуре и реализации несовместимы, так как порядок полей в сигнатуре и реализации различается. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the field {2} was required by the signature but was not specified by the implementation + Определения {0} для типа "{1}" в сигнатуре и реализации несовместимы, так как поле {2} является обязательным в сигнатуре, но не указано в реализации. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the field '{2}' was present in the implementation but not in the signature. Struct types must now reveal their fields in the signature for the type, though the fields may still be labelled 'private' or 'internal'. + Определения {0} для типа "{1}" в сигнатуре и реализации несовместимы, так как поле "{2}" присутствует в реализации, но отсутствует в сигнатуре. Типы-структуры теперь должны показывать свои поля в сигнатуре для типа, несмотря на то что поля по-прежнему могут помечаться как private или internal. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the abstract member '{2}' was required by the signature but was not specified by the implementation + Определения {0} для типа "{1}" в сигнатуре и реализации несовместимы, так как абстрактный элемент "{2}" задан в сигнатуре, но не указан в реализации. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the abstract member '{2}' was present in the implementation but not in the signature + Определения {0} для типа "{1}" в сигнатуре и реализации несовместимы, так как абстрактный элемент "{2}" присутствует в реализации, но отсутствует в сигнатуре. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature declares a {2} while the implementation declares a {3} + Определения {0} для типа "{1}" в сигнатуре и реализации несовместимы, так как сигнатура объявляет {2}, а реализация — {3}. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the abbreviations differ: {2} versus {3} + Определения {0} для типа "{1}" в сигнатуре и реализации несовместимы, так как сокращения различаются: {2} в сравнении с {3}. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because an abbreviation is being hidden by a signature. The abbreviation must be visible to other CLI languages. Consider making the abbreviation visible in the signature. + Определения {0} для типа "{1}" в сигнатуре и реализации несовместимы, так как сокращение скрывается сигнатурой. Сокращение должно быть видимым для других языков CLI. Попробуйте сделать сокращение видимым в сигнатуре. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature has an abbreviation while the implementation does not + Определения {0} для типа "{1}" в сигнатуре и реализации несовместимы, так как сигнатура имеет сокращение, а реализация — нет. + + + + The module contains the constructor\n {0} \nbut its signature specifies\n {1} \nThe names differ + Модуль содержит конструктор\n {0} \nоднако его сигнатура задает\n {1} \nИмена различаются + + + + The module contains the constructor\n {0} \nbut its signature specifies\n {1} \nThe respective number of data fields differ + Модуль содержит конструктор\n {0} \nоднако его сигнатура задает\n {1} \nСоответствующие количества полей данных различаются + + + + The module contains the constructor\n {0} \nbut its signature specifies\n {1} \nThe types of the fields differ + Модуль содержит конструктор\n {0} \nоднако его сигнатура задает\n {1} \nТипы полей различаются + + + + The module contains the constructor\n {0} \nbut its signature specifies\n {1} \nthe accessibility specified in the signature is more than that specified in the implementation + Модуль содержит конструктор\n {0} \nоднако его сигнатура задает\n {1} \nдоступность, заданная в сигнатуре, шире указанной в реализации + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe names differ + Модуль содержит поле\n {0} \nоднако его сигнатура задает\n {1} \nИмена различаются + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nthe accessibility specified in the signature is more than that specified in the implementation + Модуль содержит поле\n {0} \nоднако его сигнатура задает\n {1} \nдоступность, заданная в сигнатуре, шире указанной в реализации + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe 'static' modifiers differ + Модуль содержит поле\n {0} \nоднако его сигнатура задает\n {1} \nМодификаторы "static" различаются + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe 'mutable' modifiers differ + Модуль содержит поле\n {0} \nоднако его сигнатура задает\n {1} \nМодификаторы "mutable" различаются + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe 'literal' modifiers differ + Модуль содержит поле\n {0} \nоднако его сигнатура задает\n {1} \nМодификаторы "literal" различаются + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe types differ + Модуль содержит поле\n {0} \nоднако его сигнатура задает\n {1} \nТипы различаются + + + + The implicit instantiation of a generic construct at or near this point could not be resolved because it could resolve to multiple unrelated types, e.g. '{0}' and '{1}'. Consider using type annotations to resolve the ambiguity + Неявное создание экземпляров базовой конструкции в данной точке или рядом с ней не может быть разрешено, так как тогда возможно разрешение в несколько несвязанных типов, напр. "{0}" и "{1}". Рекомендуется использовать аннотации типа для решения неоднозначности + + + + Could not resolve the ambiguity inherent in the use of a 'printf'-style format string + Не удалось разрешить неоднозначность, унаследованную в использовании строки формата вида "printf" + + + + Could not resolve the ambiguity in the use of a generic construct with an 'enum' constraint at or near this position + Не удалось разрешить неоднозначность в использовании базовой конструкции с ограничением "enum" в этой позиции или рядом с ней + + + + Could not resolve the ambiguity in the use of a generic construct with a 'delegate' constraint at or near this position + Не удалось разрешить неоднозначность в использовании базовой конструкции с ограничением "delegate" в этой позиции или рядом с ней + + + + Invalid value + Недопустимое значение + + + + The signature and implementation are not compatible because the respective type parameter counts differ + Сигнатура и реализация несовместимы, поскольку соответствующие количества параметров типов различаются + + + + The signature and implementation are not compatible because the type parameter in the class/signature has a different compile-time requirement to the one in the member/implementation + Сигнатура и реализация несовместимы, так как параметр типа в классе/сигнатуре имеет требования по времени компилирования, отличные от требований в элементе/реализации + + + + The signature and implementation are not compatible because the declaration of the type parameter '{0}' requires a constraint of the form {1} + Сигнатура и реализация несовместимы, так как объявление параметра типа "{0}" требует ограничения формы {1} + + + + The signature and implementation are not compatible because the type parameter '{0}' has a constraint of the form {1} but the implementation does not. Either remove this constraint from the signature or add it to the implementation. + Сигнатура и реализация несовместимы, поскольку параметр типа "{0}" имеет ограничение формы {1}, а реализация не имеет. Удалите это ограничение из сигнатуры либо добавьте его к реализации. + + + + The type '{0}' implements 'System.IComparable'. Consider also adding an explicit override for 'Object.Equals' + Тип "{0}" реализует "System.IComparable". Рекомендуется также добавить явное переопределение для "Object.Equals" + + + + The type '{0}' implements 'System.IComparable' explicitly but provides no corresponding override for 'Object.Equals'. An implementation of 'Object.Equals' has been automatically provided, implemented via 'System.IComparable'. Consider implementing the override 'Object.Equals' explicitly + Тип "{0}" явно реализует "System.IComparable", но не предоставляет соответствующего переопределения для "Object.Equals". Была автоматически предоставлена реализация "Object.Equals"; реализация выполнена через "System.IComparable". Рекомендуется явно реализовывать переопределение "Object.Equals" + + + + The struct, record or union type '{0}' has an explicit implementation of 'Object.GetHashCode' or 'Object.Equals'. You must apply the 'CustomEquality' attribute to the type + Тип структуры, записи или объединения "{0}" содержит явную реализацию "Object.GetHashCode" или "Object.Equals". Необходимо применить к типу атрибут "CustomEquality" + + + + The struct, record or union type '{0}' has an explicit implementation of 'Object.GetHashCode'. Consider implementing a matching override for 'Object.Equals(obj)' + Тип структуры, записи или объединения "{0}" содержит явную реализацию "Object.GetHashCode". Попробуйте реализовать соответствующее переопределение для "Object.Equals(obj)" + + + + The struct, record or union type '{0}' has an explicit implementation of 'Object.Equals'. Consider implementing a matching override for 'Object.GetHashCode()' + Тип структуры, записи или объединения "{0}" содержит явную реализацию "Object.Equals". Попробуйте реализовать соответствующее переопределение для "Object.GetHashCode()" + + + + The exception definitions are not compatible because a CLI exception mapping is being hidden by a signature. The exception mapping must be visible to other modules. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1} + Определения исключений несовместимы, поскольку сопоставление исключений CLI скрыто сигнатурой. Сопоставление исключений должно быть видимо в других модулях. Модуль содержит определение исключения\n {0} \nоднако его сигнатура задает\n\t{1} + + + + The exception definitions are not compatible because the CLI representations differ. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1} + Определения исключений несовместимы из-за различий в представлениях CLI. Модуль содержит определение исключения\n {0} \nоднако его сигнатура задает\n\t{1} + + + + The exception definitions are not compatible because the exception abbreviation is being hidden by the signature. The abbreviation must be visible to other CLI languages. Consider making the abbreviation visible in the signature. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1}. + Определения исключений несовместимы, поскольку сокращенная форма исключения скрыта сигнатурой. Сокращение должно быть видимым для других языков CLI. Попробуйте сделать сокращение видимым в сигнатуре. Модуль содержит определение исключения\n {0} \nоднако его сигнатура задает\n\t{1}. + + + + The exception definitions are not compatible because the exception abbreviations in the signature and implementation differ. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1}. + Определения исключений несовместимы, поскольку их сокращенные формы в сигнатуре и реализации различаются. Модуль содержит определение исключения\n {0} \nоднако его сигнатура задает\n\t{1}. + + + + The exception definitions are not compatible because the exception declarations differ. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1}. + Определения исключений несовместимы из-за различий в объявлениях исключений. Модуль содержит определение исключения\n {0} \nоднако его сигнатура задает\n\t{1}. + + + + The exception definitions are not compatible because the field '{0}' was required by the signature but was not specified by the implementation. The module contains the exception definition\n {1} \nbut its signature specifies\n\t{2}. + Определения исключений несовместимы, поскольку поле "{0}" требуется в сигнатуре, но не задано в реализации. Модуль содержит определение исключения\n {1} \nоднако его сигнатура задает\n\t{2}. + + + + The exception definitions are not compatible because the field '{0}' was present in the implementation but not in the signature. The module contains the exception definition\n {1} \nbut its signature specifies\n\t{2}. + Определения исключений несовместимы, поскольку поле "{0}" присутствует в реализации, но не в сигнатуре. Модуль содержит определение исключения\n {1} \nоднако его сигнатура задает\n\t{2}. + + + + The exception definitions are not compatible because the order of the fields is different in the signature and implementation. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1}. + Определения исключений несовместимы, поскольку отличается порядок полей в сигнатуре и реализации. Модуль содержит определение исключения\n {0} \nоднако его сигнатура задает\n\t{1}. + + + + The namespace or module attributes differ between signature and implementation + Атрибуты пространства имен или модуля различаются в сигнатуре и реализации + + + + This method is over-constrained in its type parameters + Данный метод чрезмерно ограничен в параметрах типа + + + + No implementations of '{0}' had the correct number of arguments and type parameters. The required signature is '{1}'. + Ни одна реализация "{0}" не имеет нужного числа аргументов и параметров типа. Необходимая сигнатура: "{1}". + + + + The override for '{0}' was ambiguous + Переопределение для "{0}" было неоднозначным + + + + More than one override implements '{0}' + {0} реализуется более чем одним переопределением + + + + The method '{0}' is sealed and cannot be overridden + Метод "{0}" запечатан и не может быть переопределен + + + + The override '{0}' implements more than one abstract slot, e.g. '{1}' and '{2}' + Переопределение "{0}" реализует более одного абстрактного слота, напр. "{1}" и "{2}" + + + + Duplicate or redundant interface + Повторяющийся или избыточный интерфейс + + + + The interface '{0}' is included in multiple explicitly implemented interface types. Add an explicit implementation of this interface. + Интерфейс "{0}" включен в несколько явно реализованных типов интерфейса. Добавьте явную реализацию данного интерфейса. + + + + A named argument has been assigned more than one value + Именованному аргументу было назначено более одного значения + + + + No implementation was given for '{0}' + Для "{0}" не было дано реализации + + + + No implementation was given for '{0}'. Note that all interface members must be implemented and listed under an appropriate 'interface' declaration, e.g. 'interface ... with member ...'. + Для "{0}" не было дано реализации. Обратите внимание на то, что все элементы интерфейса должны быть реализованы и перечислены в соответствующем объявлении "interface", например "interface ... with member ...". + + + + The member '{0}' does not have the correct number of arguments. The required signature is '{1}'. + Элемент "{0}" не имеет нужного числа аргументов. Необходимая сигнатура: "{1}". + + + + The member '{0}' does not have the correct number of method type parameters. The required signature is '{1}'. + Элемент "{0}" не имеет нужного числа параметров типа метода. Необходимая сигнатура: "{1}". + + + + The member '{0}' does not have the correct kinds of generic parameters. The required signature is '{1}'. + Элемент "{0}" не имеет нужных базовых параметров. Необходимая сигнатура: "{1}". + + + + The member '{0}' cannot be used to implement '{1}'. The required signature is '{2}'. + Использование элемента "{0}" для реализации "{1}" невозможно. Необходимая сигнатура: {2}. + + + + Error while parsing embedded IL + Ошибка при синтаксическом анализе встроенного IL + + + + Error while parsing embedded IL type + Ошибка при синтаксическом анализе встроенного типа IL + + + + This indexer notation has been removed from the F# language + Эта нотация индексатора удалена из языка F# + + + + Invalid expression on left of assignment + Недопустимое выражение в левой части оператора присваивания + + + + The 'ReferenceEquality' attribute cannot be used on structs. Consider using the 'StructuralEquality' attribute instead, or implement an override for 'System.Object.Equals(obj)'. + Атрибут "ReferenceEquality" не может использоваться в структурах. Вместо этого рекомендуется использовать атрибут "StructuralEquality" или реализовать переопределение метода "System.Object.Equals(obj)". + + + + This type uses an invalid mix of the attributes 'NoEquality', 'ReferenceEquality', 'StructuralEquality', 'NoComparison' and 'StructuralComparison' + В этом типе используется недопустимое сочетание атрибутов "NoEquality", "ReferenceEquality", "StructuralEquality", "NoComparison" и "StructuralComparison" + + + + The 'NoEquality' attribute must be used in conjunction with the 'NoComparison' attribute + Атрибут "NoEquality" необходимо использовать в сочетании с атрибутом "NoComparison" + + + + The 'StructuralComparison' attribute must be used in conjunction with the 'StructuralEquality' attribute + Атрибут "StructuralComparison" необходимо использовать в сочетании с атрибутом "StructuralEquality" + + + + The 'StructuralEquality' attribute must be used in conjunction with the 'NoComparison' or 'StructuralComparison' attributes + Атрибут "StructuralEquality" необходимо использовать в сочетании с атрибутами "NoComparison" или "StructuralComparison" + + + + A type cannot have both the 'ReferenceEquality' and 'StructuralEquality' or 'StructuralComparison' attributes + Тип не может содержать одновременно атрибуты "ReferenceEquality" и "StructuralEquality" или "StructuralComparison" + + + + Only record, union, exception and struct types may be augmented with the 'ReferenceEquality', 'StructuralEquality' and 'StructuralComparison' attributes + Атрибуты "ReferenceEquality", "StructuralEquality" и "StructuralComparison" можно использовать только для приращения типов записи, объединения, исключения и структуры + + + + A type with attribute 'ReferenceEquality' cannot have an explicit implementation of 'Object.Equals(obj)', 'System.IEquatable<_>' or 'System.Collections.IStructuralEquatable' + Тип с атрибутом "ReferenceEquality" не может содержать явную реализацию метода "Object.Equals(obj)" либо интерфейса "System.IEquatable<_>" или "System.Collections.IStructuralEquatable" + + + + A type with attribute 'CustomEquality' must have an explicit implementation of at least one of 'Object.Equals(obj)', 'System.IEquatable<_>' or 'System.Collections.IStructuralEquatable' + Тип с атрибутом "CustomEquality" должен как минимум содержать явную реализацию метода "Object.Equals(obj)", интерфейса "System.IEquatable<_>" или "System.Collections.IStructuralEquatable" + + + + A type with attribute 'CustomComparison' must have an explicit implementation of at least one of 'System.IComparable' or 'System.Collections.IStructuralComparable' + Тип с атрибутом "CustomComparison" должен как минимум содержать явную реализацию интерфейса "System.IComparable" или "System.Collections.IStructuralComparable" + + + + A type with attribute 'NoEquality' should not usually have an explicit implementation of 'Object.Equals(obj)'. Disable this warning if this is intentional for interoperability purposes + Тип с атрибутом "NoEquality" обычно не должен содержать явную реализацию метода "Object.Equals(obj)". Если эта операция выполняется в целях обеспечения совместимости, отключите это предупреждение + + + + A type with attribute 'NoComparison' should not usually have an explicit implementation of 'System.IComparable', 'System.IComparable<_>' or 'System.Collections.IStructuralComparable'. Disable this warning if this is intentional for interoperability purposes + Тип с атрибутом "NoComparison" обычно не должен содержать явную реализацию интерфейсов "System.IComparable", "System.IComparable<_>" или "System.Collections.IStructuralComparable". Если эта операция выполняется в целях обеспечения совместимости, отключите это предупреждение + + + + The 'CustomEquality' attribute must be used in conjunction with the 'NoComparison' or 'CustomComparison' attributes + Атрибут "CustomEquality" необходимо использовать в сочетании с атрибутами "NoComparison" или "CustomComparison" + + + + Positional specifiers are not permitted in format strings + Использование позиционных спецификаторов в строках формата не допускается + + + + Missing format specifier + Отсутствует указатель формата + + + + '{0}' flag set twice + флаг "{0}" установлен дважды + + + + Prefix flag (' ' or '+') set twice + Флаг префикса (" " или "+") установлен дважды + + + + The # formatting modifier is invalid in F# + Модификатор форматирования # в F# недопустим. + + + + Bad precision in format specifier + Недопустимая точность спецификатора формата + + + + Bad width in format specifier + Недопустимая ширина спецификатора формата + + + + '{0}' format does not support '0' flag + {0} не поддерживает флаг "0" + + + + Precision missing after the '.' + Отсутствует точность после "." + + + + '{0}' format does not support precision + формат "{0}" не поддерживает точность + + + + Bad format specifier (after l or L): Expected ld,li,lo,lu,lx or lX. In F# code you can use %d, %x, %o or %u instead, which are overloaded to work with all basic integer types. + Недопустимый спецификатор формата (после l или L): требуется ld,li,lo,lu,lx или lX. В коде F# можно использовать %d, %x, %o или %u, которые перегружаются и поддерживают работу со всеми базовыми целочисленными типами. + + + + The 'l' or 'L' in this format specifier is unnecessary. In F# code you can use %d, %x, %o or %u instead, which are overloaded to work with all basic integer types. + Использовать "l" или "L" в этом спецификаторе формата необязательно. В коде F# можно использовать %d, %x, %o или %u, которые перегружаются и поддерживают работу со всеми базовыми целочисленными типами. + + + + The 'h' or 'H' in this format specifier is unnecessary. You can use %d, %x, %o or %u instead, which are overloaded to work with all basic integer types. + Использовать "h" или "H" в этом описателе формата необязательно. Вместо них можно использовать %d, %x, %o или %u, которые перегружаются и поддерживают работу со всеми базовыми целочисленными типами. + + + + '{0}' does not support prefix '{1}' flag + "{0}" не поддерживает флаг префикса "{1}" + + + + Bad format specifier: '{0}' + Неправильный спецификатор формата: '{0}' + + + + System.Environment.Exit did not exit + System.Environment.Exit не был выполнен + + + + The treatment of this operator is now handled directly by the F# compiler and its meaning cannot be redefined + Этот оператор обрабатывается непосредственно компилятором F#, в связи с чем его значение не может быть повторно определено + + + + A protected member is called or 'base' is being used. This is only allowed in the direct implementation of members since they could escape their object scope. + Вызывается защищенный элемент, или используется класс "base". Это допускается только в прямых реализациях элементов, поскольку при этом возможен выход за пределы области видимости объекта. + + + + The byref-typed variable '{0}' is used in an invalid way. Byrefs cannot be captured by closures or passed to inner functions. + Недопустимый способ использования переменной "{0}" типа byref. Переменные типа byref нельзя зафиксировать с помощью замкнутых выражений или передать во внутренние функции. + + + + The 'base' keyword is used in an invalid way. Base calls cannot be used in closures. Consider using a private member to make base calls. + Недопустимый способ использования ключевого слова "base". Вызовы базового (base) класса не могут использоваться в замкнутых выражениях. Для вызовов базового класса рекомендуется использовать закрытый элемент. + + + + The variable '{0}' is used in an invalid way + Недопустимый способ использования переменной "{0}" + + + + The type '{0}' is less accessible than the value, member or type '{1}' it is used in. + Тип "{0}" является менее доступным, чем значение, элемент или тип "{1}", в которых он используется. + + + + 'System.Void' can only be used as 'typeof<System.Void>' in F# + В языке F# System.Void можно использовать только в виде typeof<System.Void> + + + + A type instantiation involves a byref type. This is not permitted by the rules of Common IL. + Создание экземпляра типа с использованием типа byref. В правилах общего промежуточного языка это не допускается. + + + + Calls to 'reraise' may only occur directly in a handler of a try-with + Вызовы "reraise" могут выполняться только непосредственно из обработчика блока try-with + + + + Expression-splicing operators may only be used within quotations + Операторы expression-splicing можно использовать только в кавычках + + + + First-class uses of the expression-splicing operator are not permitted + Использование операторов expression-splicing в первом классе не допускается + + + + First-class uses of the address-of operators are not permitted + Использование операторов address-of в первом классе не допускается + + + + First-class uses of the 'reraise' function is not permitted + Использование функции "reraise" в первом классе не допускается + + + + The byref typed value '{0}' cannot be used at this point + В этой точке нельзя использовать значение типа byref "{0}" + + + + 'base' values may only be used to make direct calls to the base implementations of overridden members + Значения "base" можно использовать только для выполнения прямых вызовов реализаций класса base для переопределенных элементов + + + + Object constructors cannot directly use try/with and try/finally prior to the initialization of the object. This includes constructs such as 'for x in ...' that may elaborate to uses of these constructs. This is a limitation imposed by Common IL. + В конструкторе объекта нельзя прямо использовать блоки try/with и try/finally до инициализации объекта. К таким вариантам использования также относятся и конструкции вида "for x in ...", применение которых может привести к использованию указанных конструкций. Это ограничение связано с требованиями общего промежуточного языка. + + + + The address of the variable '{0}' cannot be used at this point + В этой точке нельзя использовать адрес переменной "{0}" + + + + The address of the static field '{0}' cannot be used at this point + В этой точке нельзя использовать адрес статического поля "{0}" + + + + The address of the field '{0}' cannot be used at this point + В этой точке нельзя использовать адрес поля "{0}" + + + + The address of an array element cannot be used at this point + В этой точке нельзя использовать адрес элемента массива + + + + The type of a first-class function cannot contain byrefs + Тип функции первого класса не может содержать параметры типа byref + + + + A method return type would contain byrefs which is not permitted + Тип возвращаемого значения метода будет содержать параметры типа byref, что не допускается + + + + Invalid custom attribute value (not a constant or literal) + Недопустимое значение пользовательского атрибута (не является константой или литералом) + + + + The attribute type '{0}' has 'AllowMultiple=false'. Multiple instances of this attribute cannot be attached to a single language element. + Тип атрибута "{0}" имеет значение "AllowMultiple=false". Нельзя присоединить несколько экземпляров этого атрибута к одному элементу языка. + + + + The member '{0}' is used in an invalid way. A use of '{1}' has been inferred prior to its definition at or near '{2}'. This is an invalid forward reference. + Недопустимый способ использования элемента "{0}". Использование "{1}" выведено до его определения в строке "{2}" или близлежащих строках. Недопустимая опережающая ссылка. + + + + A byref typed value would be stored here. Top-level let-bound byref values are not permitted. + Здесь будет храниться значение типа byref. Использование значений верхнего уровня типа byref с привязкой let не допускается. + + + + [<ReflectedDefinition>] terms cannot contain uses of the prefix splice operator '%' + Условия [<ReflectedDefinition>] не могут включать использование оператора соединения префикса "%" + + + + A function labeled with the 'EntryPointAttribute' attribute must be the last declaration in the last file in the compilation sequence. + Функция, помеченная атрибутом "EntryPointAttribute", должна быть последним объявлением в последнем файле последовательности компиляции. + + + + compiled form of the union case + откомпилированная форма ветви объединения + + + + default augmentation of the union case + приращение по умолчанию для ветви объединения + + + + The property '{0}' has the same name as a method in type '{1}'. + Имя свойства "{0}" аналогично имени метода в типе "{1}". + + + + The property '{0}' of type '{1}' has a getter and a setter that do not match. If one is abstract then the other must be as well. + Свойство "{0}" типа "{1}" содержит несовпадающие методы получения и задания. Если один из этих методов является абстрактным, второй также должен быть абстрактным. + + + + The property '{0}' has the same name as another property in type '{1}', but one takes indexer arguments and the other does not. You may be missing an indexer argument to one of your properties. + Имена свойства "{0}" и другого свойства в типе "{1}" совпадают, но только одно из этих свойств принимает аргументы индексатора. Возможно, в одном из свойств отсутствует аргумент индексатора. + + + + A type would store a byref typed value. This is not permitted by Common IL. + Тип обычно используется для хранения значения типа byref. В общем промежуточном языке это не допускается. + + + + Duplicate method. The method '{0}' has the same name and signature as another method in type '{1}'. + Повторяющийся метод. Имя и сигнатура метода "{0}" аналогичны другому методу в типе "{1}". + + + + Duplicate method. The method '{0}' has the same name and signature as another method in type '{1}' once tuples, functions, units of measure and/or provided types are erased. + Повторяющийся метод. Имя и сигнатура метода "{0}" аналогичны другому методу в типе "{1}" после удаления кортежей, функций, единиц измерения и предоставляемых типов. + + + + The method '{0}' has curried arguments but has the same name as another method in type '{1}'. Methods with curried arguments cannot be overloaded. Consider using a method taking tupled arguments. + Метод "{0}" содержит каррированные аргументы, но его имя и сигнатура аналогичны другому методу в типе "{1}". Перегрузка методов с каррированными аргументами не допускается. Рекомендуется использовать метод, принимающий аргументы в форме кортежа. + + + + Methods with curried arguments cannot declare 'out', 'ParamArray', 'optional', 'ReflectedDefinition', 'byref', 'CallerLineNumber', 'CallerMemberName', or 'CallerFilePath' arguments + В методах с каррированными аргументами не допускается объявление аргументов "out", "ParamArray", "optional", "ReflectedDefinition", "byref", "CallerLineNumber", "CallerMemberName" или "CallerFilePath" + + + + Duplicate property. The property '{0}' has the same name and signature as another property in type '{1}'. + Повторяющееся свойство. Имя и сигнатура свойства "{0}" аналогичны другому свойству в типе "{1}". + + + + Duplicate property. The property '{0}' has the same name and signature as another property in type '{1}' once tuples, functions, units of measure and/or provided types are erased. + Повторяющееся свойство. Имя и сигнатура свойства "{0}" аналогичны другому свойству в типе "{1}" после удаления кортежей, функций, единиц измерения и предоставляемых типов. + + + + Duplicate method. The abstract method '{0}' has the same name and signature as an abstract method in an inherited type. + Повторяющийся метод. Имя и сигнатура абстрактного метода "{0}" аналогичны абстрактному методу унаследованного типа. + + + + Duplicate method. The abstract method '{0}' has the same name and signature as an abstract method in an inherited type once tuples, functions, units of measure and/or provided types are erased. + Повторяющийся метод. Имя и сигнатура абстрактного метода "{0}" аналогичны абстрактному методу унаследованного типа после удаления кортежей, функций, единиц измерения и предоставляемых типов. + + + + This type implements the same interface at different generic instantiations '{0}' and '{1}'. This is not permitted in this version of F#. + В этом типе реализуется один и тот же интерфейс в различных универсальных установках "{0}" и "{1}". В данной версии F# это не допускается. + + + + The type of a field using the 'DefaultValue' attribute must admit default initialization, i.e. have 'null' as a proper value or be a struct type whose fields all admit default initialization. You can use 'DefaultValue(false)' to disable this check + Тип поля, использующего атрибут "DefaultValue", должен поддерживать инициализацию по умолчанию, т. е. должен содержать собственное значение "null" или являться типом структуры, все поля которого поддерживают инициализацию по умолчанию. Чтобы отключить эту проверку, используйте "DefaultValue(false)" + + + + The type abbreviation contains byrefs. This is not permitted by F#. + Сокращенная форма типа содержит параметры типа byref. В языке F# это не допускается. + + + + The variable '{0}' is bound in a quotation but is used as part of a spliced expression. This is not permitted since it may escape its scope. + Переменная "{0}" заключена в кавычки, однако используется в составе соединенного выражения. Это не допускается, поскольку может привести к выходу за пределы области видимости. + + + + Quotations cannot contain uses of generic expressions + В кавычки нельзя заключать универсальные выражения + + + + Quotations cannot contain function definitions that are inferred or declared to be generic. Consider adding some type constraints to make this a valid quoted expression. + В кавычки нельзя заключать определения выведенных функций или функций, объявленных как универсальные. Рекомендуется добавить ограничения типа, преобразующие это выражение в допустимое выражение с кавычками. + + + + Quotations cannot contain object expressions + Цитаты не могут содержать выражения объектов + + + + Quotations cannot contain expressions that take the address of a field + В кавычки нельзя заключать выражения, используемые для получения адреса поля + + + + Quotations cannot contain expressions that fetch static fields + Цитаты не могут содержать выражения, извлекающие статические поля + + + + Quotations cannot contain inline assembly code or pattern matching on arrays + Цитаты не могут содержать встроенный код сборки или сопоставление по шаблону для массивов + + + + Quotations cannot contain descending for loops + В кавычки нельзя заключать нисходящие циклы for + + + + Quotations cannot contain expressions that fetch union case indexes + В кавычки нельзя заключать выражения, извлекающие индексы вариантов объединения + + + + Quotations cannot contain expressions that set union case fields + В кавычки нельзя заключать выражения, задающие поля вариантов объединения + + + + Quotations cannot contain expressions that set fields in exception values + В кавычки нельзя заключать выражения, задающие поля в значениях исключений + + + + Quotations cannot contain expressions that require byref pointers + В кавычки нельзя заключать выражения, требующие использования указателей byref + + + + Quotations cannot contain expressions that make member constraint calls, or uses of operators that implicitly resolve to a member constraint call + В кавычки нельзя заключать выражения, выполняющие вызовы ограничения элементов или использующие операторы, которые явным образом разрешаются в вызовы элементов ограничения + + + + Quotations cannot contain this kind of constant + Цитаты не могут содержать эту разновидность константы + + + + Quotations cannot contain this kind of pattern match + Цитаты не могут содержать эту разновидность сопоставления шаблону + + + + Quotations cannot contain array pattern matching + В кавычки нельзя заключать сопоставления шаблонов массивов + + + + Quotations cannot contain this kind of type + Цитаты не могут содержать эту разновидность типа + + + + The declared type parameter '{0}' cannot be used here since the type parameter cannot be resolved at compile time + Не удается использовать объявленный параметр типа "{0}", поскольку не удается разрешить его во время выполнения + + + + This code is less generic than indicated by its annotations. A unit-of-measure specified using '_' has been determined to be '1', i.e. dimensionless. Consider making the code generic, or removing the use of '_'. + Этот код является менее универсальным, чем указано в соответствующих аннотациях. Значение единицы измерения, заданной с помощью знака "_", определено как "1" (безразмерная). Рекомендуется сделать код универсальным или удалить знак "_". + + + + Type inference problem too complicated (maximum iteration depth reached). Consider adding further type annotations. + Слишком сложная проблема определения типа (достигнута максимальная глубина итераций). Рекомендуется добавить дополнительные аннотации типов. + + + + Expected arguments to an instance member + Требуются аргументы элемента экземпляра + + + + This indexer expects {0} arguments but is here given {1} + Для индексатора требуется аргумент {0}, однако задан аргумент {1} + + + + Expecting a type supporting the operator '{0}' but given a function type. You may be missing an argument to a function. + Требуется тип, поддерживающий оператор "{0}", однако задан тип функции. Возможно, отсутствует аргумент функции. + + + + Expecting a type supporting the operator '{0}' but given a tuple type + Ожидался тип, поддерживающий оператор "{0}", однако указан кортежный тип + + + + None of the types '{0}' support the operator '{1}' + Ни один из типов "{0}" не поддерживает оператор "{1}" + + + + The type '{0}' does not support the operator '{1}' + Тип "{0}" не поддерживает оператор "{1}" + + + + None of the types '{0}' support the operator '{1}'. Consider opening the module 'Microsoft.FSharp.Linq.NullableOperators'. + Ни один из типов "{0}" не поддерживает оператор "{1}". Попробуйте открыть модуль Microsoft.FSharp.Linq.NullableOperators. + + + + The type '{0}' does not support the operator '{1}'. Consider opening the module 'Microsoft.FSharp.Linq.NullableOperators'. + Тип "{0}" не поддерживает оператор "{1}". Попробуйте открыть модуль Microsoft.FSharp.Linq.NullableOperators. + + + + The type '{0}' does not support a conversion to the type '{1}' + Тип "{0}" не поддерживает преобразование в тип "{1}" + + + + The type '{0}' has a method '{1}' (full name '{2}'), but the method is static + Тип "{0}" содержит метод "{1}" (полное имя "{2}"), являющийся статическим + + + + The type '{0}' has a method '{1}' (full name '{2}'), but the method is not static + Тип "{0}" содержит метод "{1}" (полное имя "{2}"), не являющийся статическим + + + + The constraints 'struct' and 'not struct' are inconsistent + Противоречивые ограничения "struct" и "not struct" + + + + The type '{0}' does not have 'null' as a proper value + Тип "{0}" не содержит собственное значение "null" + + + + The type '{0}' does not have 'null' as a proper value. To create a null value for a Nullable type use 'System.Nullable()'. + NULL не является собственным значением типа "{0}". Чтобы создать значение NULL для типа, допускающего это значение, используйте структуру System.Nullable(). + + + + The type '{0}' does not support the 'comparison' constraint because it has the 'NoComparison' attribute + Тип "{0}" не поддерживает ограничение "comparison", поскольку содержит атрибут "NoComparison" + + + + The type '{0}' does not support the 'comparison' constraint. For example, it does not support the 'System.IComparable' interface + Тип "{0}" не поддерживает ограничение "comparison". Например, он не поддерживает интерфейс "System.IComparable" + + + + The type '{0}' does not support the 'comparison' constraint because it is a record, union or struct with one or more structural element types which do not support the 'comparison' constraint. Either avoid the use of comparison with this type, or add the 'StructuralComparison' attribute to the type to determine which field type does not support comparison + Тип "{0}" не поддерживает ограничение "comparison", поскольку он является записью, объединением или структурой с одним или несколькими типами структурных элементов, которые не поддерживают ограничение "comparison". Исключите ограничение "comparison" из типа или добавьте в него атрибут "StructuralComparison", определяющий типы полей, которые не поддерживают ограничение "comparison" + + + + The type '{0}' does not support the 'equality' constraint because it has the 'NoEquality' attribute + Тип "{0}" не поддерживает ограничение "equality", поскольку содержит атрибут "NoEquality" + + + + The type '{0}' does not support the 'equality' constraint because it is a function type + Тип "{0}" не поддерживает ограничение "equality", поскольку он является типом функции + + + + The type '{0}' does not support the 'equality' constraint because it is a record, union or struct with one or more structural element types which do not support the 'equality' constraint. Either avoid the use of equality with this type, or add the 'StructuralEquality' attribute to the type to determine which field type does not support equality + Тип "{0}" не поддерживает ограничение "equality", поскольку он является записью, объединением или структурой с одним или несколькими типами структурных элементов, которые не поддерживают ограничение "equality". Исключите ограничение "equality" из типа или добавьте в него атрибут "StructuralEquality", определяющий типы полей, которые не поддерживают ограничение "equality" + + + + The type '{0}' is not a CLI enum type + Тип "{0}" не является перечисляемым типом CLI + + + + The type '{0}' has a non-standard delegate type + Тип "{0}" имеет нестандартный тип делегата + + + + The type '{0}' is not a CLI delegate type + Тип "{0}" не является делегатным типом CLI + + + + This type parameter cannot be instantiated to 'Nullable'. This is a restriction imposed in order to ensure the meaning of 'null' in some CLI languages is not confusing when used in conjunction with 'Nullable' values. + Не удается создать экземпляр "Nullable" для этого параметра типа. Это ограничение позволяет отличить значение "null" в некоторых языках CLI от используемых совместно с ним значений "Nullable". + + + + A generic construct requires that the type '{0}' is a CLI or F# struct type + В универсальной конструкции требуется использовать тип "{0}", являющийся типом структуры CLI или F# + + + + A generic construct requires that the type '{0}' is an unmanaged type + В универсальной конструкции тип "{0}" должен быть неуправляемым + + + + The type '{0}' is not compatible with any of the types {1}, arising from the use of a printf-style format string + Тип "{0}" несовместим с любыми типами {1}, возникающими при использовании строки формата printf-style + + + + A generic construct requires that the type '{0}' have reference semantics, but it does not, i.e. it is a struct + В универсальной конструкции требуется использовать тип "{0}", содержащий семантику ссылки, однако заданный тип эту семантику не содержит, т. е. является структурой + + + + A generic construct requires that the type '{0}' be non-abstract + В универсальной конструкции требуется использовать неабстрактный тип "{0}" + + + + A generic construct requires that the type '{0}' have a public default constructor + В универсальной конструкции требуется использовать тип "{0}", содержащий открытый конструктор по умолчанию + + + + Type instantiation length mismatch + Несоответствие длины создаваемого экземпляра типа + + + + Optional arguments not permitted here + Использование дополнительных аргументов не допускается + + + + {0} is not a static member + {0} не является статическим элементом + + + + {0} is not an instance member + {0} не является экземплярным элементом + + + + Argument length mismatch + Несоответствие длин аргументов + + + + The argument types don't match + Типы аргументов не совпадают + + + + This method expects a CLI 'params' parameter in this position. 'params' is a way of passing a variable number of arguments to a method in languages such as C#. Consider passing an array for this argument + В этой позиции метода требуется параметр CLI "params". В таких языках, как C#, параметр "params" используется для передачи переменного числа аргументов в метод. Рекомендуется передавать в качестве аргумента массив + + + + The member or object constructor '{0}' is not {1} + Конструктор элемента или объекта "{0}" не является {1} + + + + The member or object constructor '{0}' is not {1}. Private members may only be accessed from within the declaring type. Protected members may only be accessed from an extending type and cannot be accessed from inner lambda expressions. + Конструктор элемента или объекта "{0}" не является {1}. Закрытые элементы доступны только внутри типа, в котором они объявляются. Защищенные типы доступны только из расширяющего типа и недоступны из внутренних лямбда-выражений. + + + + {0} is not a static method + {0} не является статическим методом + + + + {0} is not an instance method + {0} не является экземплярным методом + + + + The member or object constructor '{0}' has no argument or settable return property '{1}'. {2}. + Конструктор элемента или объекта "{0}" не содержит аргумент или задаваемое возвращаемое свойство "{1}". {2}. + + + + The object constructor '{0}' has no argument or settable return property '{1}'. {2}. + Конструктор объектов "{0}" не содержит аргумент или задаваемое возвращаемое свойство "{1}". {2}. + + + + The required signature is {0} + Необходимая сигнатура: "{0}" + + + + The member or object constructor '{0}' requires {1} argument(s). The required signature is '{2}'. + Для конструктора элемента или объекта "{0}" требуется следующее число аргументов: {1}. Необходимая сигнатура: "{2}". + + + + The member or object constructor '{0}' requires {1} additional argument(s). The required signature is '{2}'. + Для конструктора элемента или объекта "{0}" требуется следующее число дополнительных аргументов: {1}. Необходимая сигнатура: "{2}". + + + + The member or object constructor '{0}' requires {1} argument(s). The required signature is '{2}'. Some names for missing arguments are {3}. + Для конструктора элемента или объекта "{0}" требуется следующее число аргументов: {1}. Необходимая сигнатура: "{2}". Некоторые имена отсутствующих аргументов: {3}. + + + + The member or object constructor '{0}' requires {1} additional argument(s). The required signature is '{2}'. Some names for missing arguments are {3}. + Для конструктора элемента или объекта "{0}" требуется следующее число дополнительных аргументов: {1}. Необходимая сигнатура: "{2}". Некоторые имена отсутствующих аргументов: {3}. + + + + The member or object constructor '{0}' requires {1} argument(s) but is here given {2} unnamed and {3} named argument(s). The required signature is '{4}'. + Для конструктора элемента или объекта "{0}" требуется следующее число аргументов: {1}, однако здесь задано следующее число аргументов: неименованные ({2}) и именованные ({3}). Необходимая сигнатура: "{4}". + + + + The member or object constructor '{0}' takes {1} argument(s) but is here given {2}. The required signature is '{3}'. + Для конструктора элемента или объекта "{0}" требуется следующее число аргументов: {1}, однако здесь задано следующее число аргументов: {2}. Необходимая сигнатура: "{3}". + + + + The object constructor '{0}' takes {1} argument(s) but is here given {2}. The required signature is '{3}'. + Конструктор объектов "{0}" принимает определенное число аргументов (а именно: {1}), но здесь ему предоставлено {2}. Требуется сигнатура "{3}". + + + + The object constructor '{0}' takes {1} argument(s) but is here given {2}. The required signature is '{3}'. If some of the arguments are meant to assign values to properties, consider separating those arguments with a comma (','). + Конструктор объектов "{0}" принимает определенное число аргументов (а именно: {1}), но здесь ему предоставлено {2}. Требуется сигнатура "{3}". Если некоторые аргументы предполагают назначение значений свойствам, рекомендуется отделить их запятой (","). + + + + The member or object constructor '{0}' takes {1} type argument(s) but is here given {2}. The required signature is '{3}'. + Для конструктора элемента или объекта "{0}" требуется следующее число аргументов типа: {1}, однако здесь задано следующее число аргументов: {2}. Необходимая сигнатура: "{3}". + + + + A member or object constructor '{0}' taking {1} arguments is not accessible from this code location. All accessible versions of method '{2}' take {3} arguments. + Конструктор элементов или объектов "{0}", принимающий следующее число аргументов: {1}, недоступен из этой точки кода. Все доступные версии метода "{2}" принимают следующее число аргументов: {3}. + + + + Incorrect generic instantiation. No {0} member named '{1}' takes {2} generic arguments. + Недопустимое создание универсального экземпляра. Отсутствует элемент "{0}" с именем "{1}", принимающий универсальные аргументы {2}. + + + + The member or object constructor '{0}' does not take {1} argument(s). An overload was found taking {2} arguments. + Конструктор элемента или объекта "{0}" не принимает следующее число аргументов: {1}. Обнаружена перегрузка, принимающая следующее число аргументов: {2}. + + + + No {0} member or object constructor named '{1}' takes {2} arguments + Отсутствуют конструкторы элемента или объекта {0} с именем "{1}", принимающие следующее число аргументов: {2} + + + + No {0} member or object constructor named '{1}' takes {2} arguments. Note the call to this member also provides {3} named arguments. + Отсутствуют конструкторы элемента или объекта {0} с именем "{1}", принимающие следующее число аргументов: {2}. Обратите внимание, что при вызове этого члена также предоставляется следующее число именованных аргументов: {3}. + + + + No {0} member or object constructor named '{1}' takes {2} arguments. The named argument '{3}' doesn't correspond to any argument or settable return property for any overload. + Отсутствуют конструкторы элемента или объекта {0} с именем "{1}", принимающие следующее число аргументов: {2}. Именованный аргумент "{3}" не соответствует какому-либо аргументу или задаваемому возвращаемому свойству для какой-либо перегрузки. + + + + Method or object constructor '{0}' not found + Не найден конструктор метода или объекта "{0}" + + + + No overloads match for method '{0}'. + Отсутствуют перегрузки метода "{0}". + + + + A unique overload for method '{0}' could not be determined based on type information prior to this program point. A type annotation may be needed. + Невозможно определить уникальную перегрузку метода "{0}" на основе сведений о типе, заданных до данной точки программы. Возможно, требуется аннотация типа. + + + + Candidates: {0} + Кандидаты: {0} + + + + The available overloads are shown below. + Доступные перегрузки показаны ниже. + + + + Accessibility modifiers are not permitted on 'do' bindings, but '{0}' was given. + Использование модификаторов доступности в привязках "do" не допускается, но указан "{0}". + + + + End of file in #if section begun at or after here + Конец файла в директиве #if начался в этой позиции или после нее + + + + End of file in string begun at or before here + Конец файла в строке начался в этой позиции или до нее + + + + End of file in verbatim string begun at or before here + Конец файла в строке verbatim начался в этой позиции или до нее + + + + End of file in comment begun at or before here + Конец файла в комментарии начался в этой позиции или до нее + + + + End of file in string embedded in comment begun at or before here + Конец файла во встроенной в комментарий строке начался в этой позиции или до нее + + + + End of file in verbatim string embedded in comment begun at or before here + Конец файла во встроенной в комментарий строке verbatim начался в этой позиции или до нее + + + + End of file in IF-OCAML section begun at or before here + Конец файла в разделе IF-OCAML начался в этой позиции или до нее + + + + End of file in directive begun at or before here + Конец файла в директиве начался в этой позиции или до нее + + + + No #endif found for #if or #else + Отсутствует директива #endif для директивы #if или #else + + + + Attributes have been ignored in this construct + Атрибуты в этой конструкции пропущены + + + + 'use' bindings are not permitted in primary constructors + Использование привязок use в первичных конструкторах не допускается + + + + 'use' bindings are not permitted in modules and are treated as 'let' bindings + привязки "use" недопустимы в модулях и обрабатываются как привязки "let" + + + + An integer for loop must use a simple identifier + В целочисленном цикле for необходимо использовать простой идентификатор + + + + At most one 'with' augmentation is permitted + Допускается использование не более одного приращения "with" + + + + A semicolon is not expected at this point + В этой точке кода не требуется точка с запятой + + + + Unexpected end of input + Непредвиденный конец входных данных + + + + Accessibility modifiers are not permitted here, but '{0}' was given. + Использование модификаторов доступности не допускается, но указан "{0}". + + + + Only '#' compiler directives may occur prior to the first 'namespace' declaration + Перед первым объявлением "namespace" можно указывать только директивы компилятора "#" + + + + Accessibility modifiers should come immediately prior to the identifier naming a construct + Модификаторы доступности следует указывать непосредственно перед идентификатором, определяющим имя конструкции + + + + Files should begin with either a namespace or module declaration, e.g. 'namespace SomeNamespace.SubNamespace' or 'module SomeNamespace.SomeModule', but not both. To define a module within a namespace use 'module SomeModule = ...' + В начале файла необходимо указывать либо пространство имен либо объявление модуля, например "namespace SomeNamespace.SubNamespace" или "module SomeNamespace.SomeModule". Чтобы определить модуль внутри пространства имен, используйте синтаксис "module SomeModule = ..." + + + + A module abbreviation must be a simple name, not a path + Сокращенная форма модуля может быть простым именем, но не путем + + + + Ignoring attributes on module abbreviation + Пропуск атрибутов в сокращенной форме модуля + + + + The '{0}' accessibility attribute is not allowed on module abbreviation. Module abbreviations are always private. + Атрибут доступности "{0}" запрещен в сокращенной форме модуля. В сокращенных формах модуля всегда используются закрытые атрибуты. + + + + The '{0}' visibility attribute is not allowed on module abbreviation. Module abbreviations are always private. + Атрибут видимости "{0}" запрещен в сокращенной форме модуля. В сокращенных формах модуля всегда используются закрытые атрибуты. + + + + Unclosed block + Незакрытый блок + + + + Unmatched 'begin' or 'struct' + Несогласованный "begin" или "struct" + + + + A module name must be a simple name, not a path + Имя модуля может быть простым именем, но не путем + + + + Unexpected empty type moduleDefn list + Недопустимый пустой список типа moduleDefn + + + + Attributes should be placed before 'val' + Атрибуты не должны располагаться перед выражением "val" + + + + Attributes are not permitted on interface implementations + Использование атрибутов в реализациях интерфейса не допускается + + + + Syntax error + Синтаксическая ошибка + + + + Augmentations are not permitted on delegate type moduleDefns + Использование приращений для типа делегата moduleDefns не допускается + + + + Unmatched 'class', 'interface' or 'struct' + Несогласованный "class", "interface" или "struct" + + + + A type definition requires one or more members or other declarations. If you intend to define an empty class, struct or interface, then use 'type ... = class end', 'interface end' or 'struct end'. + В определении типа требуются один или несколько элементов или других объявлений. Если предполагается определение пустых класса, структуры или объединения, используйте выражения "type ... = class end", "interface end" или "struct end". + + + + Unmatched 'with' or badly formatted 'with' block + Несоответствующий или неправильно отформатированный блок "with" + + + + 'get', 'set' or 'get,set' required + Требуется "get", "set" и (или) "get,set" + + + + Only class types may take value arguments + Только типы класса могут принимать аргументы "значение" + + + + Unmatched 'begin' + Несогласованный "begin" + + + + Invalid declaration syntax + Недопустимый синтаксис объявления + + + + 'get' and/or 'set' required + Требуется "get" и (или) "set" + + + + Type annotations on property getters and setters must be given after the 'get()' or 'set(v)', e.g. 'with get() : string = ...' + Аннотации типов для методов получения или задания свойства необходимо указывать после выражений "get()" или "set(v)", например, "with get() : string = ..." + + + + A getter property is expected to be a function, e.g. 'get() = ...' or 'get(index) = ...' + Свойство метода получения должно быть функцией, например, "get() = ..." или "get(index) = ..." + + + + Multiple accessibilities given for property getter or setter + Задано несколько модификаторов доступности для метода получения или задания свойства + + + + Property setters must be defined using 'set value = ', 'set idx value = ' or 'set (idx1,...,idxN) value = ... ' + Для определения методов присваивания свойств необходимо использовать синтаксис "set value = ", "set idx value = " или "set (idx1,...,idxN) value = ... ' + + + + Interfaces always have the same visibility as the enclosing type + Видимость интерфейсов всегда соответствует видимости включающего их типа + + + + Accessibility modifiers are not allowed on this member. Abstract slots always have the same visibility as the enclosing type. + Использование модификаторов доступности для этого элемента не допускается. Видимость абстрактных слотов всегда соответствует видимости включающего их типа. + + + + Attributes are not permitted on 'inherit' declarations + Использование атрибутов в объявлениях "inherit" не допускается + + + + Accessibility modifiers are not permitted on an 'inherits' declaration + Использование модификаторов доступности в объявлении "inherits" не допускается + + + + 'inherit' declarations cannot have 'as' bindings. To access members of the base class when overriding a method, the syntax 'base.SomeMember' may be used; 'base' is a keyword. Remove this 'as' binding. + Объявления "inherit" не могут содержать привязки "as". Для доступа к элементам базового класса при переопределении метода можно использовать синтаксис "base.SomeMember", где "base" -- это ключевое слово. Удалить эту привязку "as". + + + + Attributes are not allowed here + Использование атрибутов не допускается + + + + Accessibility modifiers are not permitted in this position for type abbreviations + Использование модификаторов доступности в этой позиции для сокращенных форм типов не допускается + + + + Accessibility modifiers are not permitted in this position for enum types + Использование модификаторов доступности в этой позиции для перечисляемых типов не допускается + + + + All enum fields must be given values + Всем перечисляемым полям необходимо присвоить значения + + + + Accessibility modifiers are not permitted on inline assembly code types + Использование модификаторов доступности в типах встроенного кода сборки не допускается + + + + Unexpected identifier: '{0}' + Недопустимый идентификатор: '{0}' + + + + Accessibility modifiers are not permitted on union cases. Use 'type U = internal ...' or 'type U = private ...' to give an accessibility to the whole representation. + Использование модификаторов доступности в вариантах объединения не допускается. Чтобы обеспечить доступность всего представления, используйте синтаксис "type U = internal ..." или "type U = private ...". + + + + Accessibility modifiers are not permitted on enumeration fields + Использование модификаторов доступности в полях перечисления не допускается + + + + Consider using a separate record type instead + Вместо этого рекомендуется использовать отдельный тип записи + + + + Accessibility modifiers are not permitted on record fields. Use 'type R = internal ...' or 'type R = private ...' to give an accessibility to the whole representation. + Использование модификаторов доступности в полях записи не допускается. Чтобы обеспечить доступность всего представления, используйте синтаксис "type R = internal ..." или "type R = private ...". + + + + The declaration form 'let ... and ...' for non-recursive bindings is not used in F# code. Consider using a sequence of 'let' bindings + Форма объявления "let ... and ..." для нерекурсивных привязок не используется в коде F#. Рекомендуется использовать последовательность привязок "let" + + + + Unmatched '(' + Несогласованный "(" + + + + Successive patterns should be separated by spaces or tupled + Последовательные шаблоны следует разделять пробелами или включать в кортежи + + + + No matching 'in' found for this 'let' + Отсутствует маркер "in", соответствующий этому маркеру "let" + + + + Error in the return expression for this 'let'. Possible incorrect indentation. + Ошибка в выражении return для этого выражения "let". Возможно, неправильные отступы. + + + + The block following this '{0}' is unfinished. Every code block is an expression and must have a result. '{1}' cannot be the final code element in a block. Consider giving this block an explicit result. + Блок, следующий за блоком "{0}", не закончен. Каждый блок кода является выражением и должен иметь результат. "{1}" не может быть заключительным элементом кода в блоке. Рекомендуется предоставить для этого блока явный результат. + + + + Incomplete conditional. Expected 'if <expr> then <expr>' or 'if <expr> then <expr> else <expr>'. + Незавершенное условное выражение. Ожидалось "if <выражение> then <выражение>" или "if <выражение> then <выражение> else <выражение>". + + + + 'assert' may not be used as a first class value. Use 'assert <expr>' instead. + assert нельзя использовать в качестве значения первого класса. Вместо этого используйте "assert <expr>". + + + + Identifier expected + Требуется идентификатор. + + + + 'in' or '=' expected + Ожидалось "in" или "=" + + + + The use of '->' in sequence and computation expressions is limited to the form 'for pat in expr -> expr'. Use the syntax 'for ... in ... do ... yield...' to generate elements in more complex sequence expressions. + Использование "->" в выражениях последовательности и вычисления ограничивается формой "for pat in expr -> expr". Использование синтаксиса "for ... in ... do ... yield..." для создания элементов в более сложных выражениях последовательности. + + + + Successive arguments should be separated by spaces or tupled, and arguments involving function or method applications should be parenthesized + Последовательные аргументы следует разделять пробелами или включать в кортежи; аргументы, предполагающие применение функции или метода, следует заключать в круглые скобки + + + + Unmatched '[' + Несогласованный "[" + + + + Missing qualification after '.' + Отсутствует квалификация после "." + + + + In F# code you may use 'expr.[expr]'. A type annotation may be required to indicate the first expression is an array + В коде F# вы можете использовать выражения вида "expr.[expr]". Может потребоваться заметка с типом, чтобы указать, что первое выражение это массив + + + + Mismatched quotation, beginning with '{0}' + Несоответствующие кавычки, начиная с "{0}" + + + + Unmatched '{0}' + Несогласованный "{0}". + + + + Unmatched '[|' + Несогласованный "[|" + + + + Unmatched '{{' + Несогласованный "{{" + + + + Field bindings must have the form 'id = expr;' + Привязка поля должна иметь вид "id = expr;" + + + + This member is not permitted in an object implementation + Использование этого элемента в реализации объекта не допускается + + + + Missing function body + Отсутствует тело функции + + + + Syntax error in labelled type argument + Ошибка синтаксиса в аргументе типа с меткой + + + + Unexpected infix operator in type expression + Недопустимый инфиксный оператор в выражении типа + + + + The syntax '(typ,...,typ) ident' is not used in F# code. Consider using 'ident<typ,...,typ>' instead + Синтаксис "(typ,...,typ) ident" не используется в коде F#. Вместо этого рекомендуется использовать синтаксис "ident<typ,...,typ>" + + + + Invalid literal in type + Недопустимый литерал в типе + + + + Unexpected infix operator in unit-of-measure expression. Legal operators are '*', '/' and '^'. + Недопустимый инфиксный оператор в выражении единицы измерения. Допустимые операторы: "*", "/" и "^". + + + + Unexpected integer literal in unit-of-measure expression + Недопустимый целочисленный литерал в выражении единицы измерения + + + + Syntax error: unexpected type parameter specification + Синтаксическая ошибка: недопустимая спецификация параметра типа + + + + Mismatched quotation operator name, beginning with '{0}' + Несоответствующее имя оператора кавычки, начиная с "{0}" + + + + Active pattern case identifiers must begin with an uppercase letter + Активные идентификаторы вариантов шаблона должны начинаться с прописной буквы + + + + The '|' character is not permitted in active pattern case identifiers + Символ "|" запрещено использовать в идентификаторах вариантов активного шаблона + + + + Denominator must not be 0 in unit-of-measure exponent + Делитель в экспоненте единицы измерения не должен равняться 0. + + + + No '=' symbol should follow a 'namespace' declaration + После объявления "namespace" отсутствует символ "=" + + + + The syntax 'module ... = struct .. end' is not used in F# code. Consider using 'module ... = begin .. end' + Синтаксис "module ... = struct .. end" не используется в код F#. Рекомендуется использовать синтаксис "module ... = begin .. end" + + + + The syntax 'module ... : sig .. end' is not used in F# code. Consider using 'module ... = begin .. end' + Синтаксис "module ... : sig .. end" не используется в коде F#. Рекомендуется использовать синтаксис "module ... = begin .. end" + + + + A static field was used where an instance field is expected + Там, где требовалось поле экземпляра, было использовано статическое поле + + + + Method '{0}' is not accessible from this code location + Метод "{0}" недоступен из данного расположения в коде + + + + Implicit product of measures following / + Далее неявный результат измерений / + + + + Unexpected SynMeasure.Anon + Непредвиденное значение SynMeasure.Anon + + + + Non-zero constants cannot have generic units. For generic zero, write 0.0<_>. + Ненулевые константы не могут иметь базовых единиц. Для базового нуля введите 0.0<_>. + + + + In sequence expressions, results are generated using 'yield' + В выражениях последовательности результаты создаются с помощью "yield" + + + + Unexpected big rational constant + Недопустимая большая рациональная константа + + + + Units-of-measure supported only on float, float32, decimal and signed integer types + Единицы измерения поддерживаются только с типами float, float32, decimal и signed integer + + + + Unexpected Const_uint16array + Недопустимый Const_uint16array + + + + Unexpected Const_bytearray + Недопустимый Const_bytearray + + + + A parameter with attributes must also be given a name, e.g. '[<Attribute>] Name : Type' + Также обязательно укажите имя параметра с атрибутами, например "[<Attribute>] Имя : Тип" + + + + Return values cannot have names + Значения возврата не могут иметь имен + + + + MemberKind.PropertyGetSet only expected in parse trees + MemberKind.PropertyGetSet требуется только в деревьях синтаксического анализа + + + + Namespaces cannot contain values. Consider using a module to hold your value declarations. + Пространство имен не может содержать значений. Рекомендуется использовать модуль для удержания объявлений значений. + + + + Namespaces cannot contain extension members except in the same file and namespace declaration group where the type is defined. Consider using a module to hold declarations of extension members. + Пространства имен не могут содержать элементы расширения, кроме элементов в том же файле и группе объявлений пространства имен, где определен тип. Рекомендуется использовать модуль для объявлений элементов расширения. + + + + Multiple visibility attributes have been specified for this identifier + Для данного идентификатора были указаны множественные атрибуты видимости + + + + Multiple visibility attributes have been specified for this identifier. 'let' bindings in classes are always private, as are any 'let' bindings inside expressions. + Для данного идентификатора были указаны множественные атрибуты видимости. привязки "let" в классах всегда являются закрытыми, так же, как и привязки "let" внутри выражений. + + + + The name '({0})' 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 '{1}' instead. + Имя "({0})" не может использоваться в качестве имени элемента. Чтобы определить для типа семантику сравнения, реализуйте интерфейс "System.IComparable". При определении статического элемента для использования из других языков CLI, используйте имя "{1}". + + + + The name '({0})' 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 '{1}' instead. + Имя "({0})" не может использоваться в качестве имени элемента. Чтобы определить для типа семантику равенства, переопределите элемент "Object.Equals". При определении статического элемента для использования из других языков CLI, используйте имя "{1}". + + + + The name '({0})' should not be used as a member name. If defining a static member for use from other CLI languages then use the name '{1}' instead. + Имя "({0})" не может использоваться в качестве имени элемента. При определении статического элемента для использования из других языков CLI, используйте имя "{1}". + + + + The name '({0})' should not be used as a member name because it is given a standard definition in the F# library over fixed types + Имя "({0})" не должно использоваться в качестве имени элемента, так как оно получает стандартное определение в библиотеке F# поверх исправленных типов + + + + The '{0}' operator should not normally be redefined. To define overloaded comparison semantics for a particular type, implement the 'System.IComparable' interface in the definition of that type. + Оператор "{0}" обычно не должен быть переопределен. Чтобы определить для типа семантику сравнения, реализуйте интерфейс "System.IComparable" в определении этого типа. + + + + The '{0}' operator should not normally be redefined. To define equality semantics for a type, override the 'Object.Equals' member in the definition of that type. + Оператор "{0}" обычно не должен быть переопределен. Чтобы определить для типа семантику равенства, переопределите элемент "Object.Equals" в определении этого типа. + + + + The '{0}' operator should not normally be redefined. Consider using a different operator name + Оператор "{0}" обычно не должен быть переопределен. Рекомендуется использовать другое имя оператора + + + + The '{0}' operator cannot be redefined. Consider using a different operator name + Оператор "{0}" не может быть переопределен. Рекомендуется использовать другое имя оператора + + + + Expected module or namespace parent {0} + Требуется модуль или родительский элемент пространства имен {0} + + + + The struct, record or union type '{0}' implements the interface 'System.IComparable' explicitly. You must apply the 'CustomComparison' attribute to the type. + Тип структуры, записи или объединения "{0}" явно реализует интерфейс "System.IComparable". Необходимо применить к типу атрибут "CustomComparison". + + + + The struct, record or union type '{0}' implements the interface 'System.IComparable<_>' explicitly. You must apply the 'CustomComparison' attribute to the type, and should also provide a consistent implementation of the non-generic interface System.IComparable. + Тип структуры, записи или объединения "{0}" явно реализует интерфейс "System.IComparable<_>". К типу необходимо применить атрибут "CustomComparison", а также предоставить постоянную реализацию небазового интерфейса System.IComparable. + + + + The struct, record or union type '{0}' implements the interface 'System.IStructuralComparable' explicitly. Apply the 'CustomComparison' attribute to the type. + Тип структуры, записи или объединения "{0}" явно реализует интерфейс "System.IStructuralComparable". Необходимо применить к типу атрибут "CustomComparison". + + + + This record contains fields from inconsistent types + Данная запись содержит поля из несогласованных типов + + + + DLLImport stubs cannot be inlined + Заглушки DLLImport не могут быть подставлены + + + + Structs may only bind a 'this' parameter at member declarations + Структуры могут выполнять привязку параметра "this" только в объявлениях элементов + + + + Unexpected expression at recursive inference point + Недопустимое выражение в точке рекурсивного выведения + + + + This code is less generic than required by its annotations because the explicit type variable '{0}' could not be generalized. It was constrained to be '{1}'. + Данный код является менее базовым, чем требуется его аннотациями, так как переменная явного типа "{0}" не может быть обобщена. Она была ограничена до "{1}". + + + + One or more of the explicit class or function type variables for this binding could not be generalized, because they were constrained to other types + Один или несколько явных классов или переменных типов функций для данной привязки не могут быть обобщены, так как они были ограничены на другие типы. + + + + A generic type parameter has been used in a way that constrains it to always be '{0}' + Был использован базовый параметр типа таким образом, что он всегда ограничен до "{0}" + + + + This type parameter has been used in a way that constrains it to always be '{0}' + Данный параметр типа был использован так, что был ограничен до постоянного значения "{0}" + + + + The type parameters inferred for this value are not stable under the erasure of type abbreviations. This is due to the use of type abbreviations which drop or reorder type parameters, e.g. \n\ttype taggedInt<'a> = int or\n\ttype swap<'a,'b> = 'b * 'a.\nConsider declaring the type parameters for this value explicitly, e.g.\n\tlet f<'a,'b> ((x,y) : swap<'b,'a>) : swap<'a,'b> = (y,x). + Параметры типа, логически выведенные для данного значения, нестабильны при удалении сокращений типов. Это происходит из-за использования сокращений типов, которые удаляют или реорганизуют параметры типа, напр. \n\ttype taggedInt<'a> = int or\n\ttype swap<'a,'b> = 'b * 'a.\nРекомендуется явно объявить параметры типа для данного значения, напр.\n\tlet f<'a,'b> ((x,y) : swap<'b,'a>) : swap<'a,'b> = (y,x). + + + + Explicit type parameters may only be used on module or member bindings + Явные параметры типа могут быть использованы только в модуле или привязках элемента + + + + You must explicitly declare either all or no type parameters when overriding a generic abstract method + Необходимо явно объявить либо все параметры типа, либо не объявлять их вообще при переопределении базового абстрактного метода + + + + The field labels and expected type of this record expression or pattern do not uniquely determine a corresponding record type + Метки поля и требуемый тип данного выражения записи или шаблона не определяют уникально соответствующий тип записи + + + + The field '{0}' appears twice in this record expression or pattern + Поле "{0}" появляется дважды в данном выражении записи или шаблоне + + + + Unknown union case + Неизвестная ветвь объединения + + + + This code is not sufficiently generic. The type variable {0} could not be generalized because it would escape its scope. + Этот код является недостаточно базовым Переменная типа {0} не может быть обобщена, так как тогда она выйдет за пределы области. + + + + A property cannot have explicit type parameters. Consider using a method instead. + Свойство не может иметь явных параметров типа. Вместо этого рекомендуется использовать метод. + + + + A constructor cannot have explicit type parameters. Consider using a static construction method instead. + Конструктор не может иметь явных параметров типа. Возможно, требуется использовать статический метод. + + + + This instance member needs a parameter to represent the object being invoked. Make the member static or use the notation 'member x.Member(args) = ...'. + Для данного элемента экземпляра требуется параметр для представления вызываемого объекта. Сделайте элемент статическим, или же используйте нотацию "member x.Member(args) = ...". + + + + Unexpected source-level property specification in syntax tree + Недопустимая спецификация свойства уровня источника в синтаксическом дереве + + + + A static initializer requires an argument + Для статического инициализатора требуется аргумент + + + + An object constructor requires an argument + Конструктор объекта требует аргумент + + + + This static member should not have a 'this' parameter. Consider using the notation 'member Member(args) = ...'. + Данный статический элемент не должен иметь параметр "this". Рекомендуется использовать нотацию "member Member(args) = ...". + + + + An explicit static initializer should use the syntax 'static new(args) = expr' + Явный статический инициализатор должен использовать синтаксис "new(args) = expr" + + + + An explicit object constructor should use the syntax 'new(args) = expr' + Конструктор явного объекта должен использовать синтаксис "new(args) = expr" + + + + Unexpected source-level property specification + Недопустимая спецификация свойства уровня источника + + + + This form of object expression is not used in F#. Use 'member this.MemberName ... = ...' to define member implementations in object expressions. + Эта форма выражения объекта не используется в F#. Используйте "member this.MemberName ... = ...' для определения реализации элемента в выражениях объекта. + + + + Invalid declaration + Недопустимое объявление + + + + Attributes are not allowed within patterns + Использование атрибутов внутри шаблонов не допускается + + + + The generic function '{0}' must be given explicit type argument(s) + Базовой функции "{0}" должны быть даны явные аргументы типа. + + + + The method or function '{0}' should not be given explicit type argument(s) because it does not declare its type parameters explicitly + метод или функция "{0}" не должна получать явные аргументы типа, так как она не объявляет свои параметры типа явно + + + + This value, type or method expects {0} type parameter(s) but was given {1} + Для данного значения, типа или метода требуется {0} параметров типа, но получено {1} + + + + The default, zero-initializing constructor of a struct type may only be used if all the fields of the struct type admit default initialization + Конструктор нулевой инициализации типа структуры по умолчанию может использоваться только в случае, если все поля типа структуры допускают инициализацию по умолчанию. + + + + Couldn't find Dispose on IDisposable, or it was overloaded + Не удалось найти Dispose на IDisposable, возможно, оно перегружено. + + + + This value is not a literal and cannot be used in a pattern + Данное значение не является литералом и не может использоваться в шаблоне + + + + This field is readonly + Это поле доступно только для чтения + + + + Named arguments must appear after all other arguments + Именованные аргументы должны появиться после всех остальных аргументов + + + + This function value is being used to construct a delegate type whose signature includes a byref argument. You must use an explicit lambda expression taking {0} arguments. + Данное значение функции используется для конструирования типа делегата, подпись которого включает аргумент byref. Необходимо использовать явное лямбда выражение, принимающее {0} аргументов. + + + + The type '{0}' is not a type whose values can be enumerated with this syntax, i.e. is not compatible with either seq<_>, IEnumerable<_> or IEnumerable and does not have a GetEnumerator method + Тип "{0}" не является типом, элементы которого могут быть перечислены с помощью данного синтаксиса, напр., несовместимы с seq<_>, IEnumerable<_> или с IEnumerable, а также не имеют метода GetEnumerator + + + + This recursive binding uses an invalid mixture of recursive forms + Данная рекурсивная привязка использует недопустимое совмещение рекурсивных форм + + + + This is not a valid object construction expression. Explicit object constructors must either call an alternate constructor or initialize all fields of the object and specify a call to a super class constructor. + Это недопустимое выражение конструкции объекта. Конструкторы явных объектов должны либо вызывать альтернативный конструктор, либо инициализировать все поля объекта и указывать вызов конструктора суперкласса. + + + + Invalid constraint + Недопустимое ограничение + + + + Invalid constraint: the type used for the constraint is sealed, which means the constraint could only be satisfied by at most one solution + Недопустимое ограничение: тип, использованный для ограничения, запечатан, это означает, что ограничение может быть удовлетворено максимум одним решением. + + + + An 'enum' constraint must be of the form 'enum<type>' + Ограничение "enum" должно иметь форму "enum<type>" + + + + 'new' constraints must take one argument of type 'unit' and return the constructed type + Ограничения "new" должны принять один аргумент типа "unit" и возвратить сформированный тип. + + + + This property has an invalid type. Properties taking multiple indexer arguments should have types of the form 'ty1 * ty2 -> ty3'. Properties returning functions should have types of the form '(ty1 -> ty2)'. + Это свойство имеет недопустимый тип. Свойства, принимающие множественные аргументы индексатора, должны иметь типы формы "ty1 * ty2 -> ty3". Свойства, принимающие множественные аргументы индексатора, должны иметь типы формы "(ty1 -> ty2)". + + + + Expected unit-of-measure parameter, not type parameter. Explicit unit-of-measure parameters must be marked with the [<Measure>] attribute. + Ожидается параметр единицы измерения, а не параметр типа. Заданные в явном виде параметры единицы измерения должны быть помечены атрибутом [<Measure>]. + + + + Expected type parameter, not unit-of-measure parameter + Требуется параметр типа, а не параметр единицы измерения + + + + Expected type, not unit-of-measure + Требуется тип, а не единица измерения + + + + Expected unit-of-measure, not type + Требуется единица измерения, а не тип + + + + Units-of-measure cannot be used as prefix arguments to a type. Rewrite as postfix arguments in angle brackets. + Единицы измерения нельзя использовать как аргументы-префиксы для типа. Перепишите аргументы-постфиксы в угловых скобках. + + + + Unit-of-measure cannot be used in type constructor application + Единица измерения не может быть использована в приложении конструктора типов + + + + This control construct may only be used if the computation expression builder defines a '{0}' method + Конструкция данного элемента управления может использоваться только в том случае, если построитель вычислительного выражения определяет метод "{0}" + + + + This type has no nested types + Этот тип не имеет вложенных типов + + + + Unexpected {0} in type expression + Недопустимый {0} в выражении типа + + + + Type parameter cannot be used as type constructor + Тип параметра нельзя использовать в качестве конструктора типа + + + + Illegal syntax in type expression + Недопустимый синтаксис в выражении типа + + + + Anonymous unit-of-measure cannot be nested inside another unit-of-measure expression + Не допускается вложение анонимной единицы измерения в другое выражение единицы измерения + + + + Anonymous type variables are not permitted in this declaration + Использование анонимных переменных типа в этом объявлении не допускается + + + + Unexpected / in type + Недопустимый / в типе + + + + Unexpected type arguments + Недопустимые аргументы типа + + + + Optional arguments are only permitted on type members + Необязательные аргументы разрешены только в элементах типов + + + + Name '{0}' not bound in pattern context + Имя "{0}" не привязано в контексте шаблона + + + + Non-primitive numeric literal constants cannot be used in pattern matches because they can be mapped to multiple different types through the use of a NumericLiteral module. Consider using replacing with a variable, and use 'when <variable> = <constant>' at the end of the match clause. + Непримитивные числовые константы-литералы не могут использоваться в сопоставлении шаблонов, так как они могут сопоставляться с несколькими различными типами через использование модуля NumericLiteral. Рекомендуется произвести замену переменной, а в конце конструкции сопоставления использовать "when <variable> = <constant>" + + + + Type arguments cannot be specified here + Аргументы типа не могут быть здесь указаны + + + + Only active patterns returning exactly one result may accept arguments + Только активные шаблоны, возвращающие ровно один результат, могут принимать аргументы + + + + Invalid argument to parameterized pattern label + Недопустимый аргумент в параметризованной метке шаблона + + + + Internal error. Invalid index into active pattern array + Внутренняя ошибка. Недопустимый индекс в массив активного шаблона + + + + This union case does not take arguments + Данный случай объединения не принимает аргументов + + + + This union case takes one argument + Данный случай объединения принимает один аргумент + + + + This union case expects {0} arguments in tupled form + Для данного случая объединения требуется {0} аргументов в форме кортежа + + + + Field '{0}' is not static + Поле "{0}" не является статическим + + + + This field is not a literal and cannot be used in a pattern + Данное поле не является литералом и не может использоваться в шаблоне + + + + This is not a variable, constant, active recognizer or literal + Это не переменная, константа, активный распознаватель или литерал + + + + This is not a valid pattern + Недопустимый шаблон. + + + + Character range matches have been removed in F#. Consider using a 'when' pattern guard instead. + Совпадения диапазона символов были убраны из F#. Вместо этого рекомендуется использовать шаблон условия "when". + + + + Illegal pattern + Недопустимый шаблон + + + + Syntax error - unexpected '?' symbol + Ошибка синтаксиса - недопустимый символ "?" + + + + Expected {0} expressions, got {1} + Требуется {0} выражений, получено {1} + + + + TcExprUndelayed: delayed + TcExprUndelayed: инерционность + + + + This expression form may only be used in sequence and computation expressions + Данная форма выражения может использоваться только в выражениях последовательности и вычислений. + + + + Invalid object expression. Objects without overrides or interfaces should use the expression form 'new Type(args)' without braces. + Недопустимое выражение объекта. Объекты без переопределений или интерфейсов должны использовать форму выражения "new Type(args)" без фигурных скобок. + + + + Invalid object, sequence or record expression + Недопустимое выражение объекта, последовательности или записи + + + + Invalid record, sequence or computation expression. Sequence expressions should be of the form 'seq {{ ... }}' + Недопустимая запись, выражение последовательности или вычислительное выражение. Выражения последовательностей должны иметь форму "seq {{ ... }}' + + + + This list or array expression includes an element of the form 'if ... then ... else'. Parenthesize this expression to indicate it is an individual element of the list or array, to disambiguate this from a list generated using a sequence expression + Данный список выражений массива включает элемент формы "if ... then ... else". Заключите данное выражение в скобки, чтобы показать, что это отдельный элемент списка или массива, отличающийся от списка, созданного с использованием выражения последовательности + + + + Unable to parse format string '{0}' + Не удается выполнить синтаксический анализ строки формата "{0}" + + + + This list expression exceeds the maximum size for list literals. Use an array for larger literals and call Array.ToList. + Данное выражение списка превышает максимальный размер литералов списка. Для больших литералов используется массив и вызывается Array.ToList. + + + + The expression form 'expr then expr' may only be used as part of an explicit object constructor + Форма выражения ''expr then expr'' может использоваться только как часть конструктора явного объекта + + + + Named arguments cannot be given to member trait calls + Именованные аргументы не могут применяться к вызовам свойств элемента + + + + This is not a valid name for an enumeration case + Недопустимое имя для случая перечисления + + + + This field is not mutable + Это поле не является изменяемым + + + + This construct may only be used within list, array and sequence expressions, e.g. expressions of the form 'seq {{ ... }}', '[ ... ]' or '[| ... |]'. These use the syntax 'for ... in ... do ... yield...' to generate elements + Использовать эту конструкцию можно только в выражениях списка, массива и последовательности, например в выражениях формы "seq {{ … }}", "[ … ]" или "[| … |]". Они создают элементы с помощью синтаксиса "for … in … do … yield…" + + + + This construct may only be used within computation expressions. To return a value from an ordinary function simply write the expression without 'return'. + Данный конструктор может быть использован только в вычислительных выражениях Для возврата значения из обычной функции просто напишите выражение без "return". + + + + This construct may only be used within sequence or computation expressions + Данный конструктор может быть использован только в вычислительных выражениях или выражениях последовательностей + + + + This construct may only be used within computation expressions + Данный конструктор может быть использован только в вычислительных выражениях + + + + Invalid indexer expression + Недопустимое выражение индексатора + + + + The operator 'expr.[idx]' has been used on an object of indeterminate type based on information prior to this program point. Consider adding further type constraints + Оператор "expr.[idx]" применялся к объекту неопределенного типа на основе информации, полученной до этой точки программы. Попробуйте добавить дополнительные ограничения типа + + + + Cannot inherit from a variable type + Не удается реализовать наследование от типа переменной + + + + Calls to object constructors on type parameters cannot be given arguments + Вызовам конструкторов объектов на параметрах типа нельзя присваивать аргументы + + + + The 'CompiledName' attribute cannot be used with this language element + Атрибут "CompiledName" нельзя использовать с данным элементом языка. + + + + '{0}' may only be used with named types + {0} может использоваться только с именованными типами + + + + 'inherit' cannot be used on interface types. Consider implementing the interface by using 'interface ... with ... end' instead. + inherit не может использоваться в типах интерфейса. Рекомендуется реализовать интерфейс, используя "interface ... with ... end" + + + + 'new' cannot be used on interface types. Consider using an object expression '{{ new ... with ... }}' instead. + new не может использоваться в типах интерфейса. Вместо этого рекомендуется использовать выражение объекта "{{ new ... with ... }}" + + + + Instances of this type cannot be created since it has been marked abstract or not all methods have been given implementations. Consider using an object expression '{{ new ... with ... }}' instead. + Создание экземпляров этого типа невозможно, поскольку он помечен как abstract, и реализации представлены не для всех методов. Вместо этого рекомендуется использовать выражение объекта "{{ new ... with ... }}" + + + + It is recommended that objects supporting the IDisposable interface are created using the syntax 'new Type(args)', rather than 'Type(args)' or 'Type' as a function value representing the constructor, to indicate that resources may be owned by the generated value + Рекомендуется создавать объекты, поддерживающие интерфейс IDisposable с помощью "new Type(args)", а не "Type(args)" или "Type" в качестве значения функции, представляющего конструктор; это делается для того, чтобы указать, что ресурсы могут принадлежать созданному значению. + + + + '{0}' may only be used to construct object types + {0}" может использоваться только для формирования типов объектов + + + + Constructors for the type '{0}' must directly or indirectly call its implicit object constructor. Use a call to the implicit object constructor instead of a record expression. + Конструкторы для типа "{0}" должны напрямую или косвенно вызывать свой неявный конструктор объекта. Вместо выражения записи используйте вызов неявного конструктора объекта. + + + + The field '{0}' has been given a value, but is not present in the type '{1}' + Значение для поля "{0}" было задано, но не представлено в типе "{1}" + + + + No assignment given for field '{0}' of type '{1}' + Нет назначения для поля "{0}" типа "{1}" + + + + Extraneous fields have been given values + Посторонние поля получили значения + + + + Only overrides of abstract and virtual members may be specified in object expressions + В выражениях объектов могут указываться только переопределения абстрактных и виртуальных элементов + + + + The member '{0}' does not correspond to any abstract or virtual method available to override or implement. + Элемент "{0}" не соответствует какому-либо абстрактному или виртуальному методу, доступному для переопределения или реализации. + + + + The type {0} contains the member '{1}' but it is not a virtual or abstract method that is available to override or implement. + Тип {0} содержит элемент "{1}", но не является виртуальным или абстрактным методом, доступным для переопределения или реализации. + + + + The member '{0}' does not accept the correct number of arguments. {1} argument(s) are expected, but {2} were given. The required signature is '{3}'.{4} + Члену "{0}" передано неправильное число аргументов. Ожидалось аргументов: {1}, предоставлено аргументов: {2}. Требуемая сигнатура — "{3}".{4} + + + + The member '{0}' does not accept the correct number of arguments. One overload accepts {1} arguments, but {2} were given. The required signature is '{3}'.{4} + Члену "{0}" передано неправильное число аргументов. Одна перегрузка принимает следующее число аргументов: {1}, предоставлено аргументов: {2}. Требуемая сигнатура — "{3}".{4} + + + + A simple method name is required here + Здесь требуется простое имя метода + + + + The types System.ValueType, System.Enum, System.Delegate, System.MulticastDelegate and System.Array cannot be used as super types in an object expression or class + Типы System.ValueType, System.Enum, System.Delegate, System.MulticastDelegate и System.Array не могут использоваться в качестве супертипа в выражении объекта или классе объекта + + + + 'new' must be used with a named type + new необходимо использовать с именованным типом + + + + Cannot create an extension of a sealed type + Не удается создать расширение запечатанного типа + + + + No arguments may be given when constructing a record value + Невозможно предоставить аргументы при формировании значения записи. + + + + Interface implementations cannot be given on construction expressions + Реализации интерфейса не могут быть даны в выражениях конструкций + + + + Object construction expressions may only be used to implement constructors in class types + Выражения конструкции объекта могут использоваться только для реализации конструкторов в типах классов + + + + Only simple bindings of the form 'id = expr' can be used in construction expressions + Только простые привязки вида "id = expr" могут использоваться в выражениях конструкции + + + + Objects must be initialized by an object construction expression that calls an inherited object constructor and assigns a value to each field + Объекты должны инициализироваться выражением конструкции объекта, вызывающим конструктор унаследованного объекта и назначающим значение для каждого поля + + + + Expected an interface type + Требуется интерфейсный тип + + + + Constructor expressions for interfaces do not take arguments + Выражения конструктора для интерфейсов не принимают аргументы + + + + This object constructor requires arguments + Данный конструктор объекта требует аргументов. + + + + 'new' may only be used with object constructors + new может использоваться только с конструкторами объектов + + + + At least one override did not correctly implement its corresponding abstract member + Как минимум в одном переопределении неправильно реализован соответствующий абстрактный элемент + + + + This numeric literal requires that a module '{0}' defining functions FromZero, FromOne, FromInt32, FromInt64 and FromString be in scope + Данный числовой литерал требует наличия в области модуля "{0}" определяющих функций FromZero, FromOne, FromInt32, FromInt64 и FromString + + + + Invalid record construction + Недопустимая конструкция записи + + + + The expression form {{ expr with ... }} may only be used with record types. To build object types use {{ new Type(...) with ... }} + Форма выражения {{ expr with ... }} может использоваться только с типами записи. Для сборки типов объекта используется {{ new Type(...) with ... }} + + + + The inherited type is not an object model type + Унаследованный тип не является типом модели объекта + + + + Object construction expressions (i.e. record expressions with inheritance specifications) may only be used to implement constructors in object model types. Use 'new ObjectType(args)' to construct instances of object model types outside of constructors + Выражения конструкции объекта (напр. выражений записи со спецификациями наследования) могут использоваться только для реализации конструкторов в типах моделей объектов. Для формирования экземпляров типов моделей объектов вне конструкторов используется "new ObjectType(args)" + + + + '{{ }}' is not a valid expression. Records must include at least one field. Empty sequences are specified by using Seq.empty or an empty list '[]'. + Выражение "{{ }}" недопустимо. Записи должны включать по меньшей мере одно поле. Пустые последовательности задаются с использованием Seq.empty или пустого списка "[]". + + + + This type is not a record type. Values of class and struct types must be created using calls to object constructors. + Этот тип не является типом записи. Значения типов класса и структуры должны создаваться, используя вызовы конструкторов объекта. + + + + This type is not a record type + Этот тип не является типом записи + + + + This construct is ambiguous as part of a computation expression. Nested expressions may be written using 'let _ = (...)' and nested computations using 'let! res = builder {{ ... }}'. + Этот конструктор является неоднозначным как часть вычислительного выражения. Вложенные выражения могут записываться с использованием "let _ = (...)", а вложенные вычисления - с использованием "let! res = builder {{ ... }}". + + + + This construct is ambiguous as part of a sequence expression. Nested expressions may be written using 'let _ = (...)' and nested sequences using 'yield! seq {{... }}'. + Этот конструктор является неоднозначным как часть выражения последовательности. Вложенные выражения могут записываться с использованием "let _ = (...)", а вложенные последовательности - с использованием "yield! seq {{... }}". + + + + 'do!' cannot be used within sequence expressions + do! нельзя использовать в выражениях последовательности + + + + The use of 'let! x = coll' in sequence expressions is not permitted. Use 'for x in coll' instead. + Использование "let! x = coll" в выражениях последовательности не разрешается. Вместо этого используется "for x in coll". + + + + 'try'/'with' cannot be used within sequence expressions + ''try''/''with'' не могут использоваться внутри (within) выражений последовательностей + + + + In sequence expressions, multiple results are generated using 'yield!' + В выражениях последовательности множественные результаты создаются с помощью "yield!" + + + + Invalid assignment + Недопустимое присваивание + + + + Invalid use of a type name + Недопустимое использование имени типа + + + + This type has no accessible object constructors + Этот тип не имеет доступных конструкторов объекта + + + + Invalid use of an interface type + Недопустимое использование интерфейсного типа + + + + Invalid use of a delegate constructor. Use the syntax 'new Type(args)' or just 'Type(args)'. + Недопустимое использование конструктора делегата. Допустимый синтаксис: "new Type(args)" или "Type(args)". + + + + Property '{0}' is not static + Свойство "{0}" не является статическим + + + + Property '{0}' is not readable + Свойство "{0}" недоступно для чтения + + + + This lookup cannot be used here + Данный поиск не может быть использован здесь. + + + + Property '{0}' is static + Свойство "{0}" является статическим + + + + Property '{0}' cannot be set + Нельзя задать свойство "{0}". + + + + Constructors must be applied to arguments and cannot be used as first-class values. If necessary use an anonymous function '(fun arg1 ... argN -> new Type(arg1,...,argN))'. + Конструкторы должны применяться к аргументам и не должны использоваться как значения первого класса. При необходимости используйте анонимную функцию "(fun arg1 ... argN -> new Type(arg1,...,argN))". + + + + The syntax 'expr.id' may only be used with record labels, properties and fields + Синтаксис "expr.id" может использоваться только с метками записей, свойствами и полями + + + + Event '{0}' is static + Событие "{0}" является статическим + + + + Event '{0}' is not static + Событие "{0}" не является статическим + + + + The named argument '{0}' did not match any argument or mutable property + Именованный аргумент "{0}" не совпал ни с одним аргументом или изменяемым свойством + + + + One or more of the overloads of this method has curried arguments. Consider redesigning these members to take arguments in tupled form. + Одна или несколько перегрузок данного метода имеет переданные аргументы. Рекомендуется изменить эти элементы так, чтобы они принимали аргументы в форме кортежа + + + + The unnamed arguments do not form a prefix of the arguments of the method called + Аргументы без названий не образуют префикса аргументов вызываемого метода + + + + Static optimization conditionals are only for use within the F# library + Условия статической оптимизации используются только в библиотеке F# + + + + The corresponding formal argument is not optional + Соответствующий формат аргумента не является необязательным. + + + + Invalid optional assignment to a property or field + Недопустимое необязательное назначение свойству или полю + + + + A delegate constructor must be passed a single function value + Конструктору делегата необходимо передать отдельное значение функции + + + + A binding cannot be marked both 'use' and 'rec' + Привязка не может быть одновременно отмечена как "use" и "rec" + + + + The 'VolatileField' attribute may only be used on 'let' bindings in classes + Атрибут "VolatileField" может использоваться только в привязках "let" в классах + + + + Attributes are not permitted on 'let' bindings in expressions + Использование атрибутов для привязок "let" в выражениях не допускается + + + + The 'DefaultValue' attribute may only be used on 'val' declarations + Атрибут "DefaultValue" может использоваться только в объявлениях "val" + + + + The 'ConditionalAttribute' attribute may only be used on members + Атрибут "ConditionalAttribute" может использоваться только с элементами + + + + This is not a valid name for an active pattern + Недопустимое имя для активного шаблона + + + + The 'EntryPointAttribute' attribute may only be used on function definitions in modules + Атрибут "EntryPointAttribute" может использоваться только в определениях функций в модулях + + + + Mutable values cannot be marked 'inline' + Изменяемые значения не могут помечаться как "inline" + + + + Mutable values cannot have generic parameters + Изменяемые значения не могут иметь базовых параметров + + + + Mutable function values should be written 'let mutable f = (fun args -> ...)' + Изменяемые значения функции должны записываться, как "let mutable f = (fun args -> ...)" + + + + Only functions may be marked 'inline' + Только функции могут помечаться как "inline" + + + + A literal value cannot be given the [<ThreadStatic>] or [<ContextStatic>] attributes + Значение литерала не может получить атрибуты [<ThreadStatic>] или [<ContextStatic>] + + + + A literal value cannot be marked 'mutable' + Значение литерала нельзя пометить как "mutable" + + + + A literal value cannot be marked 'inline' + Значение литерала нельзя пометить как "inline" + + + + Literal values cannot have generic parameters + Значения литералов не могут иметь базовых параметров + + + + This is not a valid constant expression + Это недопустимое постоянное выражение. + + + + This type is not accessible from this code location + Этот тип недоступен из данного расположения в коде + + + + Unexpected condition in imported assembly: failed to decode AttributeUsage attribute + Недопустимое условие в импортированной сборке: не удалось декодировать атрибут AttributeUsage + + + + Unrecognized attribute target. Valid attribute targets are 'assembly', 'module', 'type', 'method', 'property', 'return', 'param', 'field', 'event', 'constructor'. + Нераспознанная цель атрибута. Допустимыми целями атрибута являются "assembly", "module", "type", "method", "property", "return", "param", "field", "event", "constructor". + + + + This attribute is not valid for use on this language element. Assembly attributes should be attached to a 'do ()' declaration, if necessary within an F# module. + Не допускается использование этого атрибута для этого элемента языка. Атрибуты сборки необходимо присоединять к объявлению "do ()" (при необходимости внутри модуля F#). + + + + This attribute is not valid for use on this language element + Не допускается использование этого атрибута для этого элемента языка + + + + Optional arguments cannot be used in custom attributes + Необязательные аргументы не могут использоваться в пользовательских атрибутах + + + + This property cannot be set + Это свойство задать нельзя + + + + This property or field was not found on this custom attribute type + Данное свойство или поле не было найдено в этом пользовательском типе атрибута + + + + A custom attribute must be a reference type + Пользовательский атрибут должен являться ссылочным типом + + + + The number of args for a custom attribute does not match the expected number of args for the attribute constructor + Количество аргументов пользовательского атрибута не совпадает с требуемым числом аргументов для конструктора атрибутов + + + + A custom attribute must invoke an object constructor + Пользовательский атрибут должен вызывать конструктор объекта + + + + Attribute expressions must be calls to object constructors + Выражения атрибутов должны вызывать конструкторы объектов + + + + This attribute cannot be used in this version of F# + Данный атрибут не может быть использован в этой версии F# + + + + Invalid inline specification + Недопустимая встроенная спецификация + + + + 'use' bindings must be of the form 'use <var> = <expr>' + привязки "use" должны иметь форму "use <var> = <expr>" + + + + Abstract members are not permitted in an augmentation - they must be defined as part of the type itself + Использование абстрактных элементов в приращении не допускается; такие элементы должны быть определены непосредственно в самом типе + + + + Method overrides and interface implementations are not permitted here + Переопределения методов и реализации интерфейсов здесь не разрешаются + + + + No abstract or interface member was found that corresponds to this override + Не было найдено ни одного абстрактного элемента либо элемента интерфейса, соответствующего данному переопределению + + + + This override takes a different number of arguments to the corresponding abstract member. The following abstract members were found:{0} + Это переопределение передает другое число аргументов соответствующему абстрактному элементу. Найдены следующие абстрактные элементы: {0}. + + + + This method already has a default implementation + Этот метод уже имеет реализацию по умолчанию + + + + The method implemented by this default is ambiguous + Метод, реализованный этим вариантом по умолчанию, является неоднозначным + + + + No abstract property was found that corresponds to this override + Не было найдено ни одного абстрактного свойства, соответствующего данному переопределению + + + + This property overrides or implements an abstract property but the abstract property doesn't have a corresponding {0} + Это свойство переопределяет или реализует абстрактное свойство, однако абстрактное свойство не имеет соответствующего {0} + + + + Invalid signature for set member + Недопустимая сигнатура для элемента множества + + + + This new member hides the abstract member '{0}'. Rename the member or use 'override' instead. + Этот новый элемент скрывает абстрактный элемент "{0}". Переименуйте элемент или используйте "override". + + + + This new member hides the abstract member '{0}' once tuples, functions, units of measure and/or provided types are erased. Rename the member or use 'override' instead. + Этот новый элемент скрывает абстрактный элемент "{0}" после удаления кортежей, функций, единиц измерения и предоставляемых типов. Переименуйте элемент или используйте override. + + + + Interfaces cannot contain definitions of static initializers + Интерфейсы не могут содержать определения статических инициализаторов + + + + Interfaces cannot contain definitions of object constructors + Интерфейсы не могут содержать определения конструкторов объектов + + + + Interfaces cannot contain definitions of member overrides + Интерфейсы не могут содержать определения переопределений элементов + + + + Interfaces cannot contain definitions of concrete members. You may need to define a constructor on your type to indicate that the type is a class. + Интерфейсы не могут содержать определений конкретных элементов. Чтобы указать, что тип является классом, возможно, потребуется определить конструктор для типа. + + + + Constructors cannot be specified in exception augmentations + Конструкторы нельзя указывать в приращениях исключений + + + + Structs cannot have an object constructor with no arguments. This is a restriction imposed on all CLI languages as structs automatically support a default constructor. + Структуры не могут иметь конструктор объектов без аргументов. Это ограничение, накладываемое на все языки CLI, так как структуры автоматически поддерживают конструктор по умолчанию. + + + + Constructors cannot be defined for this type + Для данного типа не удается определить конструкторы + + + + Recursive bindings that include member specifications can only occur as a direct augmentation of a type + Рекурсивные привязки, включающие спецификации элементов, могут встречаться только как прямое приращение типа + + + + Only simple variable patterns can be bound in 'let rec' constructs + Только простые шаблоны переменных могут быть связаны в конструкциях "let rec" + + + + Only record fields and simple, non-recursive 'let' bindings may be marked mutable + Только поля записей и простые нерекурсивные привязки "let" могут быть помечены как изменяемые + + + + This member is not sufficiently generic + Данный элемент является недостаточно базовым + + + + A declaration may only be the [<Literal>] attribute if a constant value is also given, e.g. 'val x : int = 1' + Определение может быть атрибутом [<Literal>], только если также указано постоянное значение, например "val x : int = 1" + + + + A declaration may only be given a value in a signature if the declaration has the [<Literal>] attribute + Объявление может получать в сигнатуре значение, только если у объявления есть атрибут [<Literal>] + + + + Thread-static and context-static variables must be static and given the [<DefaultValue>] attribute to indicate that the value is initialized to the default value on each new thread + Потоко- и контекстностатические переменные должны быть статическими, и им нужно присвоить атрибут [<DefaultValue>], который указывает, что они инициализируются со значением по умолчанию в каждом новом потоке + + + + Volatile fields must be marked 'mutable' and cannot be thread-static + Временные поля должны быть помечены как "mutable"; они также не могут быть потокостатическими + + + + Uninitialized 'val' fields must be mutable and marked with the '[<DefaultValue>]' attribute. Consider using a 'let' binding instead of a 'val' field. + Неинициализированные поля "val" должны быть изменяемыми и должны быть помечены атрибутом "[<DefaultValue>]". Попробуйте использовать вместо поля "val" привязку "let". + + + + Static 'val' fields in types must be mutable, private and marked with the '[<DefaultValue>]' attribute. They are initialized to the 'null' or 'zero' value for their type. Consider also using a 'static let mutable' binding in a class type. + Статические поля ''val'' в типах должны быть изменяемыми, частными и помеченными атрибутом ''[<DefaultValue>]". Они инициализируются со значением "NULL" или "zero" для своего типа. Попробуйте также использовать в типе класса привязку "static let mutable". + + + + This field requires a name + Для этого поля требуется имя + + + + Invalid namespace, module, type or union case name + Недопустимое имя пространства имен, типа или ветви объединения + + + + Explicit type declarations for constructors must be of the form 'ty1 * ... * tyN -> resTy'. Parentheses may be required around 'resTy' + Явные объявления типа для конструкторов должны иметь форму "ty1 * ... * tyN -> resTy". Вокруг "resTy" могут потребоваться круглые скобки. + + + + Return types of union cases must be identical to the type being defined, up to abbreviations + Типы возвращаемых значений случаев объединений должны быть идентичны определяемому типу, вплоть до сокращений + + + + This is not a valid value for an enumeration literal + Это не является допустимым значением для литерала перечисления + + + + The type '{0}' is not an interface type + Тип "{0}" не является интерфейсным типом + + + + Duplicate specification of an interface + Дублированная спецификация интерфейса + + + + A field/val declaration is not permitted here + Объявление field/val здесь не разрешено + + + + A inheritance declaration is not permitted here + Объявление наследования здесь не разрешено + + + + This declaration opens the module '{0}', which is marked as 'RequireQualifiedAccess'. Adjust your code to use qualified references to the elements of the module instead, e.g. 'List.map' instead of 'map'. This change will ensure that your code is robust as new constructs are added to libraries. + Данное объявление открывает модуль "{0}", помеченный как "RequireQualifiedAccess". Измените код так, чтобы вместо этого использовались квалифицированные ссылки на элементы модуля, напр. 'List.map' вместо 'map'. Данное изменение обеспечит надежность кода при добавлении конструкций в библиотеки. + + + + This declaration opens the namespace or module '{0}' through a partially qualified path. Adjust this code to use the full path of the namespace. This change will make your code more robust as new constructs are added to the F# and CLI libraries. + Это объявление открывает пространство имен или модуль "{0}" через частичный путь. Измените этот код для использования полного пути пространства имен. Данное изменение обеспечит надежность кода при добавлении новых конструкций в библиотеки F# и CLI. + + + + Local class bindings cannot be marked inline. Consider lifting the definition out of the class or else do not mark it as inline. + Привязки локального класса нельзя пометить как "inline" Рекомендуется удалить определение из класса, или не помечать его как "inline". + + + + Type abbreviations cannot have members + Сокращения типов не могут иметь элементов + + + + As of F# 4.1, the accessibility of type abbreviations is checked at compile-time. Consider changing the accessibility of the type abbreviation. Ignoring this warning might lead to runtime errors. + В версии F# 4.1 доступность сокращений типов проверяется во время компиляции. Рекомендуется изменить доступность сокращений типов. Если проигнорировать это предупреждение, возможны ошибки во время выполнения. + + + + Enumerations cannot have members + Перечисления не могут содержать элементы + + + + Measure declarations may have only static members + Определения измерений могут иметь только статические элементы + + + + Structs cannot contain 'do' bindings because the default constructor for structs would not execute these bindings + Структуры не могут содержать привязок "do", так как конструктор по умолчанию для структур не будет выполнять эти привязки + + + + Structs cannot contain value definitions because the default constructor for structs will not execute these bindings. Consider adding additional arguments to the primary constructor for the type. + Структуры не могут содержать определений значений, так как конструктор по умолчанию для структур не будет выполнять эти привязки. Попробуйте добавить к первичному конструктору для типа дополнительные аргументы. + + + + Static value definitions may only be used in types with a primary constructor. Consider adding arguments to the type definition, e.g. 'type X(args) = ...'. + Статические определения значений можно использовать только в типах с первичными конструкторами. Попробуйте добавить в определение типа аргументы, напр. "type X(args) = ...". + + + + Measure declarations may have only static members: constructors are not available + Определения измерений могут иметь только статические элементы: конструкторы недоступны + + + + A member and a local class binding both have the name '{0}' + Элемент и привязка локального класса имеют одно имя "{0}" + + + + Type abbreviations cannot have interface declarations + Сокращения типов не могут иметь объявлений интерфейса + + + + Enumerations cannot have interface declarations + Перечисления не могут содержать объявления элементов + + + + This type is not an interface type + Этот тип не является интерфейсным типом + + + + All implemented interfaces should be declared on the initial declaration of the type + В исходном объявлении типа должны быть объявлены все реализованные интерфейсы + + + + A default implementation of this interface has already been added because the explicit implementation of the interface was not specified at the definition of the type + Реализация по умолчанию для данного интерфейса уже была добавлена, так как в определении типа не была указана явная реализация интерфейса + + + + This member is not permitted in an interface implementation + Этот элемент не разрешается в реализации интерфейса + + + + This declaration element is not permitted in an augmentation + Данный элемент объявления не допускается в приращении + + + + Types cannot contain nested type definitions + Типы не могут содержать вложенные определения типов + + + + type, exception or module + тип, исключение или модуль + + + + type or module + тип или модуль + + + + The struct, record or union type '{0}' implements the interface 'System.IStructuralEquatable' explicitly. Apply the 'CustomEquality' attribute to the type. + Тип структуры, записи или объединения "{0}" явно реализует интерфейс "System.IStructuralEquatable". Необходимо применить к типу атрибут "CustomEquality". + + + + The struct, record or union type '{0}' implements the interface 'System.IEquatable<_>' explicitly. Apply the 'CustomEquality' attribute to the type and provide a consistent implementation of the non-generic override 'System.Object.Equals(obj)'. + Тип структуры, записи или объединения "{0}" явно реализует интерфейс "'System.IEquatable<_>". К типу необходимо применить атрибут "CustomEquality", а также предоставить постоянную реализацию небазового переопределения "System.Object.Equals(obj)". + + + + Explicit type specifications cannot be used for exception constructors + Явные спецификации типа не могут быть использованы для конструкторов исключений + + + + Exception abbreviations should not have argument lists + Сокращения исключений не должны иметь списков аргументов + + + + Abbreviations for Common IL exceptions cannot take arguments + Сокращенные формы исключений общего промежуточного языка не поддерживают получение аргументов + + + + Exception abbreviations must refer to existing exceptions or F# types deriving from System.Exception + Сокращения исключений должны ссылаться на существующие исключения или типы F#, производные от System.Exception + + + + Abbreviations for Common IL exception types must have a matching object constructor + Сокращенные формы исключений общего промежуточного языка должны иметь соответствующий конструктор объекта + + + + Not an exception + Не является исключением + + + + Invalid module name + Недопустимое имя модуля + + + + Invalid type extension + Недопустимое расширение типа + + + + The attributes of this type specify multiple kinds for the type + Атрибуты этого типа задают несколько видов типа + + + + The kind of the type specified by its attributes does not match the kind implied by its definition + Вид типа, указанный его атрибутами, не совпадает с видом, подразумеваемым его определением + + + + Measure definitions cannot have type parameters + Определения измерений не могут иметь параметры типа + + + + This type requires a definition + Для этого типа требуется определение + + + + This type abbreviation has one or more declared type parameters that do not appear in the type being abbreviated. Type abbreviations must use all declared type parameters in the type being abbreviated. Consider removing one or more type parameters, or use a concrete type definition that wraps an underlying type, such as 'type C<'a> = C of ...'. + Сокращение данного типа имеет один или несколько объявленных параметров типа, не находящихся в сокращаемом типе. Сокращения типов должны использовать все объявленные параметры в сокращаемом типе. Рекомендуется удалить один или несколько параметров типа либо использовать определение конкретного типа, переносящего основной тип, такое как "type C<'a> = C of ...". + + + + Structs, interfaces, enums and delegates cannot inherit from other types + Структуры, интерфейсы, перечисления и делегаты не могут наследовать от других типов + + + + Types cannot inherit from multiple concrete types + Типы не могут наследовать от множественных конкретных типов + + + + Records, union, abbreviations and struct types cannot have the 'AllowNullLiteral' attribute + Типы записей, объединений, сокращений и структур не могут иметь атрибут "AllowNullLiteral" + + + + Types with the 'AllowNullLiteral' attribute may only inherit from or implement types which also allow the use of the null literal + Типы с атрибутом "AllowNullLiteral" могут наследоваться только от типов, поддерживающих пустые литералы, и реализовать только такие типы + + + + Generic types cannot be given the 'StructLayout' attribute + Базовые типы не могут получать атрибут "StructLayout" + + + + Only structs and classes without primary constructors may be given the 'StructLayout' attribute + Атрибут StructLayout может присваиваться только структурам и классам без первичных конструкторов + + + + The representation of this type is hidden by the signature. It must be given an attribute such as [<Sealed>], [<Class>] or [<Interface>] to indicate the characteristics of the type. + Представление этого типа скрыто сигнатурой. Ему нужно присвоить атрибут, такой как [<Sealed>], [<Class>] или [<Interface>], чтобы указать характеристики типа. + + + + Only classes may be given the 'AbstractClass' attribute + Атрибут "AbstractClass" может присваиваться только классам + + + + Only types representing units-of-measure may be given the 'Measure' attribute + Атрибут "Measure" может присваиваться только типам, представляющим единицы измерения + + + + Accessibility modifiers are not permitted on overrides or interface implementations + Модификаторы специальных возможностей не разрешаются на переопределениях или реализациях интерфейса + + + + Discriminated union types are always sealed + Типы различаемых объединений всегда являются запечатанными + + + + Record types are always sealed + Типы записей всегда являются запечатанными + + + + Assembly code types are always sealed + Типы кодов сборок всегда являются запечатанными + + + + Struct types are always sealed + Типы структур всегда являются запечатанными + + + + Delegate types are always sealed + Делегатные типы всегда являются запечатанными + + + + Enum types are always sealed + Перечисляемые типы всегда являются запечатанными + + + + Interface types and delegate types cannot contain fields + Типы интерфейсов и типы делегатов не могут содержать поля + + + + Abbreviated types cannot be given the 'Sealed' attribute + Не допускается присваивание атрибута "Sealed" сокращенным типам + + + + Cannot inherit a sealed type + Не удается реализовать наследование от запечатанного типа + + + + Cannot inherit from interface type. Use interface ... with instead. + Не удается реализовать наследование от типа интерфейса. Вместо этого используйте выражение "interface ... with". + + + + Struct types cannot contain abstract members + Типы структуры не могут содержать абстрактных элементов + + + + Interface types cannot be sealed + Типы интерфейсов не могут быть запечатаны + + + + Delegate specifications must be of the form 'typ -> typ' + Спецификации делегатов должны иметь форму "typ -> typ" + + + + Delegate specifications must not be curried types. Use 'typ * ... * typ -> typ' for multi-argument delegates, and 'typ -> (typ -> typ)' for delegates returning function values. + Спецификации делегатов не должны являться переданными типами. Используйте "typ * ... * typ -> typ" для мульти-аргументных делегатов, и "typ -> (typ -> typ)" для делегатов, возвращающих значения функций. + + + + Literal enumerations must have type int, uint, int16, uint16, int64, uint64, byte, sbyte or char + Перечисления литералов должны иметь тип int, uint, int16, uint16, int64, uint64, byte, sbyte или char + + + + This type definition involves an immediate cyclic reference through an abbreviation + Определение данного типа включает прямую циклическую ссылку через сокращение + + + + This type definition involves an immediate cyclic reference through a struct field or inheritance relation + Определение данного типа включает циклическую ссылку верхнего уровня через поле структуры или отношение наследования + + + + The syntax 'type X with ...' is reserved for augmentations. Types whose representations are hidden but which have members are now declared in signatures using 'type X = ...'. You may also need to add the '[<Sealed>] attribute to the type definition in the signature + Синтаксис "type X with …" зарезервирован для приращений. Типы, представления которых скрыты, но при этом имеющие элементы, теперь объявляются в сигнатурах с использованием "type X = …". Возможно, к определению типа в сигнатуре также нужно будет добавить атрибут "[<Sealed>]". + + + + Members that extend interface, delegate or enum types must be placed in a module separate to the definition of the type. This module must either have the AutoOpen attribute or be opened explicitly by client code to bring the extension members into scope. + Элементы, расширяющие типы интерфейса, делегатов или перечисления, должны помещаться в отдельном от определения типа модуле. Данный модуль должен либо иметь атрибут AutoOpen, либо открываться явно клиентским кодом для запуска элементов расширения в области. + + + + One or more of the declared type parameters for this type extension have a missing or wrong type constraint not matching the original type constraints on '{0}' + В одном объявленном параметре типа или нескольких для этого расширения типа отсутствует ограничение типа или содержится неверное ограничение типа, не совпадающее с исходными ограничениями типа для "{0}" + + + + Type definitions may only have one 'inherit' specification and it must be the first declaration + Определения типа могут иметь только одну спецификацию inherit, и она должна являться первым объявлением + + + + 'let' and 'do' bindings must come before member and interface definitions in type definitions + Привязки let и do должны располагаться до определений элементов и интерфейсов в определениях типов + + + + This 'inherit' declaration specifies the inherited type but no arguments. Consider supplying arguments, e.g. 'inherit BaseType(args)'. + Данное объявление "inherit" указывает унаследованный тип, и не указывает аргументов. Рекомендуется предоставить аргументы, напр. "inherit BaseType(args)". + + + + This 'inherit' declaration has arguments, but is not in a type with a primary constructor. Consider adding arguments to your type definition, e.g. 'type X(args) = ...'. + Данное объявление inherit содержит аргументы, но не находится в типе с первичным конструктором. Попробуйте добавить в определение типа аргументы, напр. "type X(args) = ...". + + + + This definition may only be used in a type with a primary constructor. Consider adding arguments to your type definition, e.g. 'type X(args) = ...'. + Это определение можно использовать только в типе с первичным конструктором. Попробуйте добавить в определение типа аргумент, напр. "type X(args) = ...". + + + + Type abbreviations cannot have augmentations + Сокращения типов не могут иметь приращений + + + + The path '{0}' is a namespace. A module abbreviation may not abbreviate a namespace. + Путь {0} указывает на пространство имен. Сокращение модуля не может уменьшать длину пространства имен. + + + + The type '{0}' is used in an invalid way. A value prior to '{1}' has an inferred type involving '{2}', which is an invalid forward reference. + Тип "{0}" используется недопустимо. Значение перед "{1}" имеет логически выведенный тип, включающий "{2}", что является недопустимой короткой ссылкой. + + + + The member '{0}' is used in an invalid way. A use of '{1}' has been inferred prior to the definition of '{2}', which is an invalid forward reference. + Элемент "{0}" используется недопустимо. Использование "{1}" было логически выведено перед определением "{2}", что является недопустимой короткой ссылкой. + + + + The attribute 'AutoOpen(\"{0}\")' in the assembly '{1}' did not refer to a valid module or namespace in that assembly and has been ignored + Атрибут "AutoOpen(\"{0}\")" в сборке "{1}" пропущен, поскольку он не ссылается на допустимые модуль или пространство имен в этой сборке + + + + Undefined value '{0}' + Неопределенное значение "{0}" + + + + Label {0} not found + Метка {0} не найдена + + + + Incorrect number of type arguments to local call + Недопустимое число аргументов типа для локального вызова + + + + Dynamic invocation of {0} is not supported + Динамический вызов {0} не поддерживается + + + + Taking the address of a literal field is invalid + Недопустимое получение адреса поля литерала + + + + This operation involves taking the address of a value '{0}' represented using a local variable or other special representation. This is invalid. + В этой операции осуществляется получение адреса значения "{0}", представленного с помощью локальной переменной или другого специального представления. Это не допускается. + + + + Custom marshallers cannot be specified in F# code. Consider using a C# helper function. + Не допускается указание пользовательского маршаллера в коде F#. Рекомендуется использовать вспомогательную функцию C#. + + + + The MarshalAs attribute could not be decoded + Не удается декодировать атрибут MarshalAs + + + + The signature for this external function contains type parameters. Constrain the argument and return types to indicate the types of the corresponding C function. + Сигнатура этой внешней функции содержит параметры типа. Ограничьте типы аргументов и возвращаемых значений, чтобы обозначить типы соответствующих функций C. + + + + The DllImport attribute could not be decoded + Не удается декодировать атрибут DllImport + + + + Literal fields cannot be set + Поля литералов нельзя задавать + + + + GenSetStorage: {0} was represented as a static method but was not an appropriate lambda expression + GenSetStorage: {0} представлен как статический метод, однако не является допустимым лямбда-выражением + + + + Mutable variables cannot escape their method + Изменяемые переменные не могут обходить собственные методы + + + + Compiler error: unexpected unrealized value + Ошибка компилятора: недопустимое нереализованное значение + + + + Main module of program is empty: nothing will happen when it is run + Основной модуль программы пуст: при запуске программы не будет выполнено никаких действий + + + + This type cannot be used for a literal field + Этот тип не может использоваться для поля литерала + + + + Unexpected GetSet annotation on a property + Недопустимая аннотация GetSet для свойства + + + + The FieldOffset attribute could not be decoded + Не удается декодировать атрибут FieldOffset + + + + The StructLayout attribute could not be decoded + Не удается декодировать атрибут StructLayout + + + + The DefaultAugmentation attribute could not be decoded + Не удается декодировать атрибут DefaultAugmentation + + + + Reflected definitions cannot contain uses of the prefix splice operator '%' + Отраженные определения не могут включать использование оператора соединения префикса "%" + + + + Problem with codepage '{0}': {1} + Неполадка с кодовой страницей "{0}": {1} + + + + Copyright (c) Microsoft Corporation. All Rights Reserved. + (c) Корпорация Майкрософт (Microsoft Corp.). Все права защищены. + + + + Freely distributed under the MIT Open Source License. https://github.com/Microsoft/visualfsharp/blob/master/License.txt + Распространяется бесплатно по лицензии MIT Open Source License. https://github.com/Microsoft/visualfsharp/blob/master/License.txt + + + + Name of the output file (Short form: -o) + Имя выходного файла (краткая форма: -o) + + + + Build a console executable + Собрать консольный исполняемый файл + + + + Build a Windows executable + Выполнить сборку исполняемого файла Windows + + + + Build a library (Short form: -a) + Собрать библиотеку (краткая форма: -a) + + + + Build a module that can be added to another assembly + Сборка модуля, который может быть добавлен в другую сборку + + + + Delay-sign the assembly using only the public portion of the strong name key + Использовать отложенную подпись для сборки, используя только открытую часть ключа строгого имени + + + + Public-sign the assembly using only the public portion of the strong name key, and mark the assembly as signed + Выполнить общедоступную подпись сборки, используя только открытую часть ключа строгого имени, и пометить сборку как подписанную + + + + Write the xmldoc of the assembly to the given file + Запись xmldoc сборки в заданный файл + + + + Specify a strong name key file + Укажите файл ключей строгого имени + + + + Specify a strong name key container + Укажите контейнер ключей строгого имени + + + + Limit which platforms this code can run on: x86, Itanium, x64, anycpu32bitpreferred, or anycpu. The default is anycpu. + Выберите платформы, на которых может выполняться этот код: x86, Itanium, x64, anycpu32bitpreferred или anycpu. По умолчанию используется любой процессор (anycpu). + + + + Only include optimization information essential for implementing inlined constructs. Inhibits cross-module inlining but improves binary compatibility. + Включать только данные оптимизации, необходимые для реализации встроенных конструкций. Отключение межмодульного встраивания и повышение совместимости на уровне двоичного кода. + + + + Don't add a resource to the generated assembly containing F#-specific metadata + Не добавлять ресурс к создаваемой сборке, содержащей специальные метаданные F# + + + + Print the inferred interface of the assembly to a file + Печатать выведенный интерфейс сборки в файл + + + + Reference an assembly (Short form: -r) + Ссылка на сборку (краткая форма: -r) + + + + Specify a Win32 resource file (.res) + Укажите файл ресурсов Win32 (.res) + + + + Specify a Win32 manifest file + Задать файл манифеста Win32 + + + + Do not include the default Win32 manifest + Не включать манифест Win32 по умолчанию + + + + Embed all source files in the portable PDB file + Внедрить все исходные файлы в переносимый PDB-файл + + + + Embed specific source files in the portable PDB file + Внедрить конкретные исходные файлы в переносимый PDB-файл + + + + Source link information file to embed in the portable PDB file + Файл со сведениями о компоновке источников, внедряемый в переносимый PDB-файл + + + + --embed switch only supported when emitting a Portable PDB (--debug:portable or --debug:embedded) + Параметр --embed поддерживается только при создании переносимого PDB-файла (--debug:portable или --debug:embedded). + + + + --sourcelink switch only supported when emitting a Portable PDB (--debug:portable or --debug:embedded) + Параметр --sourcelink поддерживается только при создании переносимого PDB-файла (--debug:portable или --debug:embedded). + + + + Source file is too large to embed in a portable PDB + Исходный файл слишком велик для внедрения в переносимый PDB-файл. + + + + Embed the specified managed resource + Внедрить указанный управляемый ресурс + + + + Link the specified resource to this assembly where the resinfo format is <file>[,<string name>[,public|private]] + Связать указанный ресурс с этой сборкой, где формат resinfo: <файл>[,<имя_строки>[,public|private]] + + + + Emit debug information (Short form: -g) + Вывод отладочной информации (краткая форма: -g) + + + + Specify debugging type: full, portable, embedded, pdbonly. ('{0}' is the default if no debuggging type specified and enables attaching a debugger to a running program, 'portable' is a cross-platform format, 'embedded' is a cross-platform format embedded into the output file). + Укажите тип отладки: full, portable, embedded, pdbonly (если тип отладки не указан, по умолчанию используется тип "{0}", позволяющий подключить отладчик к выполняющейся программе; тип portable представляет собой кроссплатформенный формат; тип embedded — кроссплатформенный формат, встроенный в выходной файл). + + + + Enable optimizations (Short form: -O) + Включить оптимизацию (краткая форма: -O) + + + + Enable or disable tailcalls + Включение или отключение концевых вызовов + + + + Produce a deterministic assembly (including module version GUID and timestamp) + Создать детерминированную сборку (включая GUID версии модуля и метку времени) + + + + Enable or disable cross-module optimizations + Включение или отключение межмодульной оптимизации + + + + Report all warnings as errors + Обрабатывать все предупреждения как ошибки + + + + Report specific warnings as errors + Обрабатывать указанные предупреждения как ошибки + + + + Set a warning level (0-5) + Задать уровень предупреждений (0-5) + + + + Disable specific warning messages + Отключить указанные предупреждения + + + + Enable specific warnings that may be off by default + Включить конкретные предупреждения, которые по умолчанию могут быть отключенными + + + + Generate overflow checks + Сформировать проверки переполнений + + + + Define conditional compilation symbols (Short form: -d) + Определить символы условной компиляции (краткая форма: -d) + + + + Ignore ML compatibility warnings + Игнорировать предупреждения многоязыковой совместимости + + + + + Display this usage message (Short form: -?) + Вывод данного сообщения об использовании (краткая форма: -?) + + + + Read response file for more options + Считывать файл ответа с дополнительными параметрами + + + + Specify the codepage used to read source files + Укажите кодовую страницу, которая будет использоваться для чтения исходных файлов + + + + Output messages in UTF-8 encoding + Выводит сообщения в кодировке UTF-8 + + + + Output messages with fully qualified paths + Вывод сообщений с полными путями + + + + Specify a directory for the include path which is used to resolve source files and assemblies (Short form: -I) + Укажите каталог для поиска включаемых файлов, который будет использоваться для разрешения исходных файлов и сборок (краткая форма: -I) + + + + Base address for the library to be built + Базовый адрес библиотеки, для которой будет выполнена сборка + + + + Do not reference the default CLI assemblies by default + Не обращаться к сборкам CLI по умолчанию + + + + Statically link the F# library and all referenced DLLs that depend on it into the assembly being generated + Статическая компоновка библиотеки F# и всех зависимых от нее библиотек DLL, на которые существуют ссылки, в создаваемую сборку + + + + Statically link the given assembly and all referenced DLLs that depend on this assembly. Use an assembly name e.g. mylib, not a DLL name. + Статическая компоновка заданной сборки и всех зависимых от нее библиотек DLL, на которые существуют ссылки. Используйте имя сборки, например, mylib, вместо имени библиотеки DLL. + + + + Use a resident background compilation service to improve compiler startup times. + Используйте службу фоновой резидентной компиляции, чтобы сократить время запуска компилятора. + + + + Name the output debug file + Имя выходного файла отладки + + + + Resolve assembly references using directory-based rules rather than MSBuild resolution + Разрешать ссылки на сборку с помощью основанных на каталоге правил вместо разрешения MSBuild + + + + Unrecognized target '{0}', expected 'exe', 'winexe', 'library' or 'module' + Нераспознанный целевой формат "{0}"; требуется "exe", "winexe", "library" или "module" + + + + Unrecognized debug type '{0}', expected 'pdbonly' or 'full' + Нераспознанный тип отладки "{0}"; требуется "pdbonly" или "full" + + + + Invalid warning level '{0}' + Недопустимый уровень предупреждения "{0}". + + + + Short form of '{0}' + Краткая форма "{0}" + + + + The command-line option '--cliroot' has been deprecated. Use an explicit reference to a specific copy of mscorlib.dll instead. + Параметр командной строки "--cliroot" не рекомендуется к использованию. Используйте явную ссылку на конкретную копию библиотеки mscorlib.dll. + + + + Use to override where the compiler looks for mscorlib.dll and framework components + Используйте этот параметр, чтобы переопределить место для поиска компилятором библиотеки mscorlib.dll и компонентов инфраструктуры + + + + - OUTPUT FILES - + - ВЫХОДНЫЕ ФАЙЛЫ - + + + + - INPUT FILES - + - ВХОДНЫЕ ФАЙЛЫ - + + + + - RESOURCES - + - РЕСУРСЫ - + + + + - CODE GENERATION - + - ФОРМИРОВАНИЕ КОДА - + + + + - ADVANCED - + - ДОПОЛНИТЕЛЬНО - + + + + - MISCELLANEOUS - + - ПРОЧЕЕ - + + + + - LANGUAGE - + - ЯЗЫК - + + + + - ERRORS AND WARNINGS - + - ОШИБКИ И ПРЕДУПРЕЖДЕНИЯ - + + + + Unknown --test argument: '{0}' + Неизвестный аргумент --test: '{0}' + + + + Unrecognized platform '{0}', valid values are 'x86', 'x64', 'Itanium', 'anycpu32bitpreferred', and 'anycpu' + Нераспознанная платформа "{0}"; допустимые значения: x86, x64, Itanium, anycpu32bitpreferred и anycpu + + + + The command-line option '{0}' is for test purposes only + Параметр командной строки "{0}" предназначен только для тестирования + + + + The command-line option '{0}' has been deprecated + Параметр командной строки "{0}" не рекомендуется к использованию + + + + The command-line option '{0}' has been deprecated. Use '{1}' instead. + Параметр командной строки "{0}" не рекомендуется к использованию. Вместо этого используйте объект "{1}". + + + + The command-line option '{0}' has been deprecated. HTML document generation is now part of the F# Power Pack, via the tool FsHtmlDoc.exe. + Параметр командной строки "{0}" не рекомендуется к использованию. Функции создания документа HTML теперь реализуются с помощью средства из состава пакета F# Power Pack. + + + + Output warning and error messages in color + Цветные выходные предупреждения и сообщения об ошибках + + + + Enable high-entropy ASLR + Включить технологию ASLR с высокой энтропией + + + + Specify subsystem version of this assembly + Укажите версию подсистемы этой сборки + + + + Specify target framework profile of this assembly. Valid values are mscorlib, netcore or netstandard. Default - mscorlib + Укажите профиль целевой платформы этой сборки. Допустимые значения: mscorlib, netcore и netstandard. Значение по умолчанию — mscorlib. + + + + Emit debug information in quotations + Вывод отладочной информации в кавычках + + + + Specify the preferred output language culture name (e.g. es-ES, ja-JP) + Укажите предпочитаемое имя языка и региональных параметров (например, es-ES, ja-JP) + + + + Don't copy FSharp.Core.dll along the produced binaries + Не копировать FSharp.Core.dll вместе с созданными двоичными файлами + + + + Invalid version '{0}' for '--subsystemversion'. The version must be 4.00 or greater. + Недопустимая версия "{0}" для "--subsystemversion". Должна быть версия 4.00 или больше. + + + + Invalid value '{0}' for '--targetprofile', valid values are 'mscorlib', 'netcore' or 'netstandard'. + Недопустимое значение "{0}" параметра --targetprofile; допустимые значения: mscorlib, netcore и netstandard. + + + + Full name + Полное имя + + + + and {0} other overloads + и {0} других перегрузок + + + + union case + ветвь объединения + + + + active pattern result + активный результат шаблона + + + + active recognizer + активный распознаватель + + + + field + поле + + + + event + событие + + + + property + свойство + + + + extension + расширение + + + + custom operation + пользовательская операция + + + + argument + аргумент + + + + patvar + patvar + + + + namespace + пространство имен + + + + module + модуль + + + + namespace/module + пространство имен/модуль + + + + from {0} + из {0} + + + + also from {0} + также из {0} + + + + generated property + созданное свойство + + + + generated type + созданный тип + + + + Found by AssemblyFolders registry key + Найдено по разделу реестра AssemblyFolders + + + + Found by AssemblyFoldersEx registry key + Найдено по разделу реестра AssemblyFoldersEx + + + + .NET Framework + .NET Framework + + + + Global Assembly Cache + Глобальный кэш сборок + + + + Recursive class hierarchy in type '{0}' + Рекурсивная иерархия классов в типе "{0}" + + + + Invalid recursive reference to an abstract slot + Недопустимая рекурсивная ссылка на абстрактный слот + + + + The event '{0}' has a non-standard type. If this event is declared in another CLI language, you may need to access this event using the explicit {1} and {2} methods for the event. If this event is declared in F#, make the type of the event an instantiation of either 'IDelegateEvent<_>' or 'IEvent<_,_>'. + Событие "{0}" имеет нестандартный тип. Если это событие объявлено в другом языке CLI, для доступа к нему может потребоваться использование методов {1} и {2} события. Если это событие объявлено в языке F#, используйте в качестве типа события экземпляр "IDelegateEvent<_>" или "IEvent<_,_>". + + + + The type '{0}' is not accessible from this code location + Тип "{0}" недоступен из данного расположения в коде + + + + The union cases or fields of the type '{0}' are not accessible from this code location + Случаи объединения или поля типа "{0}" недоступны из данного расположения в коде + + + + The value '{0}' is not accessible from this code location + Значение "{0}" недоступно из данного расположения в коде + + + + The union case '{0}' is not accessible from this code location + Случай объединения "{0}" недоступен из данного расположения в коде + + + + The record, struct or class field '{0}' is not accessible from this code location + Поле записи, структуры или класса "{0}" недоступно из этой точки кода + + + + The struct or class field '{0}' is not accessible from this code location + Поле структуры или класса "{0}" недоступно из этой точки кода + + + + This construct is experimental + Экспериментальная конструкция + + + + No Invoke methods found for delegate type + Отсутствуют методы Invoke для типа делегата + + + + More than one Invoke method found for delegate type + Обнаружено более одного метода Invoke для типа делегата + + + + Delegates are not allowed to have curried signatures + В делегатах не поддерживаются переданные сигнатуры + + + + Unexpected Expr.TyChoose + Непредвиденное значение Expr.TyChoose + + + + Note: Lambda-lifting optimizations have not been applied because of the use of this local constrained generic function as a first class value. Adding type constraints may resolve this condition. + Примечание. Оптимизации замыкания лямбда-выражения не были применены, так как данная локальная ограниченная универсальная функция была использована в качестве первого значения класса. Устранить эту проблему можно путем добавления ограничений типов. + + + + Identifiers containing '@' are reserved for use in F# code generation + Идентификаторы, содержащие "@", зарезервированы для будущего использования при создании кода на языке F# + + + + The identifier '{0}' is reserved for future use by F# + Идентификатор "{0}" зарезервирован для будущего использования в языке F# + + + + Missing variable '{0}' + Отсутствует переменная "{0}" + + + + Partial active patterns may only generate one result + Частично активные шаблоны могут возвращать только один результат + + + + The type '{0}' is required here and is unavailable. You must add a reference to assembly '{1}'. + Требуемый здесь тип "{0}" недоступен. Следует добавить ссылку на сборку "{1}". + + + + A reference to the type '{0}' in assembly '{1}' was found, but the type could not be found in that assembly + Обнаружена ссылка на тип "{0}" в сборке "{1}", который отсутствует в этой сборке + + + + Internal error or badly formed metadata: not enough type parameters were in scope while importing + Внутренняя ошибка или поврежденные метаданные: недостаточно параметров типа в области видимости в процессе импорта + + + + A reference to the DLL {0} is required by assembly {1}. The imported type {2} is located in the first assembly and could not be resolved. + Ссылка на библиотеку DLL {0} требуется для сборки {1}. Импортированный тип {2} расположен в первой сборке и не может быть разрешен. + + + + An imported assembly uses the type '{0}' but that type is not public + В импортированной сборке используется тип "{0}", который не является открытым + + + + The value '{0}' was marked inline but its implementation makes use of an internal or private function which is not sufficiently accessible + Значение "{0}" отмечено как "inline", однако в его реализации используется недостаточно доступная внутренняя или закрытая функция + + + + The value '{0}' was marked inline but was not bound in the optimization environment + Значение "{0}" отмечено как "inline", однако не было привязано в среде оптимизации + + + + Local value {0} not found during optimization + В процессе оптимизации не найдено локальное значение {0} + + + + A value marked as 'inline' has an unexpected value + Недопустимое значение для значения, отмеченного как "inline" + + + + A value marked as 'inline' could not be inlined + Не удалось встроить значение, отмеченное как "inline" + + + + Failed to inline the value '{0}' marked 'inline', perhaps because a recursive value was marked 'inline' + Не удалось встроить значение "{0}", отмеченное как "inline", возможно, в связи с отметкой рекурсивного значения как "inline" + + + + Recursive ValValue {0} + Рекурсивное значение ValValue {0} + + + + The indentation of this 'in' token is incorrect with respect to the corresponding 'let' + Недопустимый отступ токена "in" по отношению к соответствующему токену "let" + + + + Possible incorrect indentation: this token is offside of context started at position {0}. Try indenting this token further or using standard formatting conventions. + Возможно, неправильные отступы: этот токен находится вне контекста, начиная с позиции {0}. Попробуйте увеличить отступ токена или использовать стандартные соглашения о форматировании. + + + + The '|' tokens separating rules of this pattern match are misaligned by one column. Consider realigning your code or using further indentation. + Токены "|", разделяющие правила этого сопоставления шаблону, неправильно выровнены по одному столбцу. Рекомендуется выровнять код или увеличить отступ. + + + + Invalid module/expression/type + Недопустимый модуль, выражение или тип + + + + Multiple types exist called '{0}', taking different numbers of generic parameters. Provide a type instantiation to disambiguate the type resolution, e.g. '{1}'. + Существует несколько типов, вызываемых "{0}" и принимающих различное число универсальных параметров. Предоставьте создание экземпляра типа, чтобы однозначно определить разрешение типа, например, "{1}". + + + + The instantiation of the generic type '{0}' is missing and can't be inferred from the arguments or return type of this member. Consider providing a type instantiation when accessing this type, e.g. '{1}'. + Создание экземпляра универсального типа "{0}" отсутствует и не может быть выведено из типа аргументов или возвращаемого значения этого элемента. Рекомендуется предоставить создание экземпляра типа при доступе к типу, например, "{1}". + + + + 'global' may only be used as the first name in a qualified path + Параметр "global" может использоваться только в качестве первого имени в полном пути + + + + This is not a constructor or literal, or a constructor is being used incorrectly + Объект не является конструктором или литералом, либо конструктор используется неправильно + + + + Unexpected empty long identifier + Недопустимый пустой длинный идентификатор + + + + The record type '{0}' does not contain a label '{1}'. + Тип записи "{0}" не содержит метку "{1}". + + + + Invalid field label + Недопустимая метка поля + + + + Invalid expression '{0}' + Недопустимое выражение "{0}" + + + + No constructors are available for the type '{0}' + Недоступны конструкторы для типа "{0}" + + + + The union type for union case '{0}' was defined with the RequireQualifiedAccessAttribute. Include the name of the union type ('{1}') in the name you are using. + Тип объединения для ветви объединения "{0}" определен с RequireQualifiedAccessAttribute. Включите имя типа объединения ("{1}") в используемое имя. + + + + The record type for the record field '{0}' was defined with the RequireQualifiedAccessAttribute. Include the name of the record type ('{1}') in the name you are using. + Тип записи для поля записи "{0}" определен с RequireQualifiedAccessAttribute. Включите имя типа записи ("{1}") в используемое имя. + + + + Unexpected error creating debug information file '{0}' + Непредвиденная ошибка при создании файла отладочной информации "{0}" + + + + This number is outside the allowable range for this integer type + Это число находится вне допустимого диапазона для целого типа + + + + '{0}' is not permitted as a character in operator names and is reserved for future use + {0} не может использоваться в качестве знака в именах операторов и зарезервирован для будущего использования + + + + Unexpected character '{0}' + Недопустимый символ "{0}". + + + + This byte array literal contains characters that do not encode as a single byte + Этот литерал массива байтов содержит знаки, не поддерживающие однобайтовую кодировку + + + + Identifiers followed by '{0}' are reserved for future use + Идентификаторы, после которых следует "{0}", зарезервированы для будущего использования + + + + This number is outside the allowable range for 8-bit signed integers + Это число находится вне допустимого диапазона для 8-битных целых чисел со знаком + + + + This number is outside the allowable range for hexadecimal 8-bit signed integers + Это число находится вне допустимого диапазона для 8-битных шестнадцатеричных целых чисел со знаком + + + + This number is outside the allowable range for 8-bit unsigned integers + Это число находится вне допустимого диапазона для 8-битных целых чисел без знака + + + + This number is outside the allowable range for 16-bit signed integers + Это число находится вне допустимого диапазона для 16-битных целых чисел со знаком + + + + This number is outside the allowable range for 16-bit unsigned integers + Это число находится вне допустимого диапазона для 16-битных целых чисел без знака + + + + This number is outside the allowable range for 32-bit signed integers + Это число находится вне допустимого диапазона для 32-битных целых чисел со знаком + + + + This number is outside the allowable range for 32-bit unsigned integers + Это число находится вне допустимого диапазона для 32-битных целых чисел без знака + + + + This number is outside the allowable range for 64-bit signed integers + Это число находится вне допустимого диапазона для 64-битных целых чисел со знаком + + + + This number is outside the allowable range for 64-bit unsigned integers + Это число находится вне допустимого диапазона для 64-битных целых чисел без знака + + + + This number is outside the allowable range for signed native integers + Это число находится вне допустимого диапазона для собственных целых чисел со знаком + + + + This number is outside the allowable range for unsigned native integers + Это число находится вне допустимого диапазона для собственных целых чисел без знака + + + + Invalid floating point number + Недопустимое число с плавающей точкой + + + + This number is outside the allowable range for decimal literals + Это число находится вне допустимого диапазона для десятичных литералов + + + + This number is outside the allowable range for 32-bit floats + Это число находится вне допустимого диапазона для 32-битных чисел с плавающей точкой + + + + This is not a valid numeric literal. Valid numeric literals include 1, 0x1, 0b0001 (int), 1u (uint32), 1L (int64), 1UL (uint64), 1s (int16), 1y (sbyte), 1uy (byte), 1.0 (float), 1.0f (float32), 1.0m (decimal), 1I (BigInteger). + Не является допустимым числовым литералом. Допустимые числовые литералы: 1, 0x1, 0b0001 (int), 1u (uint32), 1L (int64), 1UL (uint64), 1s (int16), 1y (sbyte), 1uy (byte), 1.0 (float), 1.0f (float32), 1.0m (decimal), 1I (BigInteger). + + + + This is not a valid byte literal + Не является допустимым байтовым литералом. + + + + This is not a valid character literal + Не является допустимым символьным литералом. + + + + This Unicode encoding is only valid in string literals + Эта кодировка Юникод может использоваться только в строковых литералах + + + + This token is reserved for future use + Этот токен зарезервирован для будущего использования + + + + TABs are not allowed in F# code unless the #indent \"off\" option is used + В коде F# табуляция может использоваться только при использовании параметра #indent \"off\" + + + + Invalid line number: '{0}' + Недопустимый номер строки: '{0}' + + + + #if directive must appear as the first non-whitespace character on a line + Перед директивами #if могут находиться только знаки пробела + + + + #else has no matching #if + Отсутствует директива #if, соответствующая директиве #else + + + + #endif required for #else + Для директивы #else требуется директива #endif + + + + #else directive must appear as the first non-whitespace character on a line + Перед директивами #else могут находиться только знаки пробела + + + + #endif has no matching #if + Отсутствует директива #if, соответствующая директиве #endif + + + + #endif directive must appear as the first non-whitespace character on a line + Перед директивами #endif могут находиться только знаки пробела + + + + #if directive should be immediately followed by an identifier + Сразу после директивы #if необходимо указать идентификатор + + + + Syntax error. Wrong nested #endif, unexpected tokens before it. + Синтаксическая ошибка. Неправильный вложенный #endif; недопустимые лексемы перед ним. + + + + #! may only appear as the first line at the start of a file. + #! может отображаться только в качестве первой строки в начале файла. + + + + Expected single line comment or end of line + Ожидается однострочный комментарий или конец строки + + + + Infix operator member '{0}' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ... + Элемент инфиксного оператора "{0}" не имеет аргументов. Требуется кортеж из 2 аргументов, например: static member (+) (x,y) = ... + + + + Infix operator member '{0}' has {1} initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ... + Элемент инфиксного оператора "{0}" имеет {1} начальных аргументов. Требуется кортеж из 2 аргументов, например: static member (+) (x,y) = ... + + + + Infix operator member '{0}' has extra curried arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ... + Элемент инфиксного оператора "{0}" имеет лишние переданные аргументы. Требуется кортеж из 2 аргументов, например: static member (+) (x,y) = ... + + + + All record, union and struct types in FSharp.Core.dll must be explicitly labelled with 'StructuralComparison' or 'NoComparison' + Все типы записи, объединений и структур в FSharp.Core.dll должны быть явно помечены "StructuralComparison" или "NoComparison" + + + + The struct, record or union type '{0}' has the 'StructuralComparison' attribute but the type parameter '{1}' does not satisfy the 'comparison' constraint. Consider adding the 'comparison' constraint to the type parameter + Тип структуры, записи или объединения "{0}" имеет атрибут "StructuralComparison", но параметр типа "{1}" не удовлетворяет ограничению "comparison". Рекомендуется добавить к параметру типа ограничение "comparison" + + + + The struct, record or union type '{0}' has the 'StructuralComparison' attribute but the component type '{1}' does not satisfy the 'comparison' constraint + Тип структуры, записи или объединения "{0}" имеет атрибут "StructuralComparison", но тип компонента "{1}" не удовлетворяет ограничению "comparison" + + + + The struct, record or union type '{0}' is not structurally comparable because the type parameter {1} does not satisfy the 'comparison' constraint. Consider adding the 'NoComparison' attribute to the type '{2}' to clarify that the type is not comparable + Тип структуры, записи или объединения "{0}" не сравним структурно, так как параметр типа {1} не удовлетворяет ограничению "comparison". Рекомендуется добавить к типу "{2}" атрибут "NoComparison", чтобы пояснить, что тип не является сравнимым + + + + The struct, record or union type '{0}' is not structurally comparable because the type '{1}' does not satisfy the 'comparison' constraint. Consider adding the 'NoComparison' attribute to the type '{2}' to clarify that the type is not comparable + Тип структуры, записи или объединения "{0}" не сравним структурно, так как тип {1} не удовлетворяет ограничению "comparison". Рекомендуется добавить к типу "{2}" атрибут "NoComparison", чтобы пояснить, что тип не является сравнимым + + + + The struct, record or union type '{0}' does not support structural equality because the type parameter {1} does not satisfy the 'equality' constraint. Consider adding the 'NoEquality' attribute to the type '{2}' to clarify that the type does not support structural equality + Тип структуры, записи или объединения "{0}" не поддерживает структурное равенство, так как параметр типа {1} не удовлетворяет ограничению "equality". Рекомендуется добавить к типу "{2}" атрибут "NoEquality", чтобы пояснить, что тип не поддерживает структурное равенство + + + + The struct, record or union type '{0}' does not support structural equality because the type '{1}' does not satisfy the 'equality' constraint. Consider adding the 'NoEquality' attribute to the type '{2}' to clarify that the type does not support structural equality + Тип структуры, записи или объединения "{0}" поддерживает структурное равенство, так как параметр типа {1} не удовлетворяет ограничению "equality". Рекомендуется добавить к типу "{2}" атрибут "NoEquality", чтобы пояснить, что тип не поддерживает структурное равенство + + + + The struct, record or union type '{0}' has the 'StructuralEquality' attribute but the type parameter '{1}' does not satisfy the 'equality' constraint. Consider adding the 'equality' constraint to the type parameter + Тип структуры, записи или объединения "{0}" имеет атрибут "StructuralEquality", но параметр типа "{1}" не удовлетворяет ограничению "equality". Рекомендуется добавить к параметру типа ограничение "equality" + + + + The struct, record or union type '{0}' has the 'StructuralEquality' attribute but the component type '{1}' does not satisfy the 'equality' constraint + Тип структуры, записи или объединения "{0}" имеет атрибут "StructuralEquality", но тип компонента "{1}" не удовлетворяет ограничению "equality" + + + + Each argument of the primary constructor for a struct must be given a type, for example 'type S(x1:int, x2: int) = ...'. These arguments determine the fields of the struct. + Каждый аргумент первичного конструктора для структуры должен получить тип, например "type S(x1:int, x2: int) = ...". Эти аргументы определяют поля структуры. + + + + The value '{0}' is unused + Значение "{0}" не используется + + + + The recursive object reference '{0}' is unused. The presence of a recursive object reference adds runtime initialization checks to members in this and derived types. Consider removing this recursive object reference. + Рекурсивная ссылка на объект "{0}" не используется. Наличие рекурсивных ссылок на объект увеличивает число проверок инициализации, проводимых во время выполнения для элементов этого типа и его производных типов. Рекомендуется удалить рекурсивную ссылку на объект. + + + + A getter property may have at most one argument group + Свойство метода получения может иметь не более одной группы аргументов + + + + A setter property may have at most two argument groups + Свойство метода присваивания значения может иметь не более двух групп аргументов + + + + Invalid property getter or setter + Недопустимый метод получения или задания свойства + + + + An indexer property must be given at least one argument + Свойству индексатора необходимо присвоить как минимум один аргумент + + + + This operation accesses a mutable top-level value defined in another assembly in an unsupported way. The value cannot be accessed through its address. Consider copying the expression to a mutable local, e.g. 'let mutable x = ...', and if necessary assigning the value back after the completion of the operation + Эта операция обращается к изменяемому значению верхнего уровня, определенному в другой сборке неподдерживаемым способом. Не удается получить доступ к значению по его адресу. Рекомендуется скопировать выражение в локальную изменяемую переменную, например, "let mutable x = ...", и, при необходимости, снова присвоить это значение по завершении операции + + + + Remove spaces between the type name and type parameter, e.g. \"type C<'T>\", not type \"C <'T>\". Type parameters must be placed directly adjacent to the type name. + Параметры типа необходимо указывать непосредственно после имени типа, например, \"type C<'T>\", но не type \"C <'T>\" + + + + Remove spaces between the type name and type parameter, e.g. \"C<'T>\", not \"C <'T>\". Type parameters must be placed directly adjacent to the type name. + Аргументы типа необходимо указывать непосредственно после имени типа, например \"C<'T>\", но не \"C <'T>\" + + + + The use of the type syntax 'int C' and 'C <int>' is not permitted here. Consider adjusting this type to be written in the form 'C<int>' + Использование синтаксиса "int C" и "C <int>" не допускается. Рекомендуется изменить форму типа на "C<int>" + + + + The module/namespace '{0}' from compilation unit '{1}' did not contain the module/namespace '{2}' + Модуль или пространство имен "{0}" из блока компиляции "{1}" не содержит модуль или пространство имен "{2}" + + + + The module/namespace '{0}' from compilation unit '{1}' did not contain the val '{2}' + Модуль или пространство имен "{0}" из блока компиляции "{1}" не содержит значение "{2}" + + + + The module/namespace '{0}' from compilation unit '{1}' did not contain the namespace, module or type '{2}' + Модуль или пространство имен "{0}" из блока компиляции "{1}" не содержит пространство имен, модуль или тип "{2}" + + + + The 'UseNullAsTrueValue' attribute flag may only be used with union types that have one nullary case and at least one non-nullary case + Флаг атрибута "UseNullAsTrueValue" может использоваться только с типами объединений, имеющими один нулевой случай и по меньшей мере один ненулевой случай. + + + + The parameter '{0}' was inferred to have byref type. Parameters of byref type must be given an explicit type annotation, e.g. 'x1: byref<int>'. When used, a byref parameter is implicitly dereferenced. + Предполагается, что параметр "{0}" имеет тип byref. Параметры типа byref должны сопровождаться явной аннотацией типа, например "x1: byref<int>". При использовании параметра byref происходит неявное разыменование ссылки. + + + + The generic member '{0}' has been used at a non-uniform instantiation prior to this program point. Consider reordering the members so this member occurs first. Alternatively, specify the full type of the member explicitly, including argument types, return type and any additional generic parameters and constraints. + Базовый элемент "{0}" использовался при неоднородном создании экземпляров ранее этой точки программы. Рассмотрите возможность изменения порядка элементов таким образом, чтобы данный элемент следовал первым. Альтернативное решение - задать полный тип элемента в явном виде, включая типы аргументов, тип возвращаемого значения и все дополнительные универсальные параметры и ограничения. + + + + The attribute '{0}' appears in both the implementation and the signature, but the attribute arguments differ. Only the attribute from the signature will be included in the compiled code. + Атрибут "{0}" присутствует как в реализации, так и в сигнатуре, но с разными аргументами. В скомпилированный код будет включен только атрибут из сигнатуры. + + + + Cannot call an abstract base member: '{0}' + Не удается вызвать абстрактный член базового класса: '{0}' + + + + Could not resolve the ambiguity in the use of a generic construct with an 'unmanaged' constraint at or near this position + Не удалось разрешить неоднозначность в использовании базовой конструкции с ограничением "unmanaged" в этой позиции или рядом с ней + + + + This construct is for ML compatibility. {0}. You can disable this warning by using '--mlcompatibility' or '--nowarn:62'. + Эта конструкция предназначена для многоязыковой совместимости. {0}. Это предупреждение можно отключить с помощью параметра "--mlcompatibility" или "--nowarn:62". + + + + The type '{0}' has been marked as having an Explicit layout, but the field '{1}' has not been marked with the 'FieldOffset' attribute + Тип "{0}" был помечен как имеющий явно заданный макет, но поле "{1}" не было помечено атрибутом FieldOffset + + + + Interfaces inherited by other interfaces should be declared using 'inherit ...' instead of 'interface ...' + Для объявления интерфейсов, наследуемых другими интерфейсами, следует использовать "inherit ...", а не "interface ..." + + + + Invalid prefix operator + Недопустимый префиксный оператор + + + + Invalid operator definition. Prefix operator definitions must use a valid prefix operator name. + Недопустимое определение оператора. Определения префиксных операторов должны использовать допустимые имена префиксных операторов. + + + + The file extensions '.ml' and '.mli' are for ML compatibility + Расширения файлов ".ml" и ".mli" предназначены для многоязыковой совместимости + + + + Consider using a file with extension '.ml' or '.mli' instead + Рассмотрите возможность использования файла с расширением ".ml" или ".mli" + + + + Active pattern '{0}' is not a function + Активный шаблон "{0}" не является функцией + + + + Active pattern '{0}' 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' + Активный шаблон "{0}" имеет тип результата, содержащий переменные типа, которые не определены входными данными. Обычно эта ошибка возникает, когда не упоминается тестовый случай результата, например "let (|A|B|) (x:int) = A x". Для ее устранения можно ввести ограничение типа, например "let (|A|B|) (x:int) : Choice<int,unit> = A x" + + + + The FieldOffset attribute can only be placed on members of types marked with the StructLayout(LayoutKind.Explicit) + Атрибут FieldOffset может назначаться только членам типов, для которых используется StructLayout(LayoutKind.Explicit). + + + + Optional arguments must come at the end of the argument list, after any non-optional arguments + Необязательные аргументы должны следовать в конце списка аргументов, после обязательных + + + + Attribute 'System.Diagnostics.ConditionalAttribute' is only valid on methods or attribute classes + Атрибут System.Diagnostics.ConditionalAttribute допустим только в методах или классах атрибутов + + + + Extension members cannot provide operator overloads. Consider defining the operator as part of the type definition instead. + Элементы расширения не могут предоставлять перегрузку операторов. Вместо этого рекомендуется определить оператор как часть определения типа. + + + + The name of the MDB file must be <assembly-file-name>.mdb. The --pdb option will be ignored. + MDB-файл должен иметь имя <имя_файла_сборки>.mdb. Параметр --pdb будет проигнорирован. + + + + MDB generation failed. Could not find compatible member {0} + Сбой при создании MDB-файла. Не удалось найти совместимый элемент {0} + + + + Cannot generate MDB debug information. Failed to load the 'MonoSymbolWriter' type from the 'Mono.CompilerServices.SymbolWriter.dll' assembly. + Невозможно создать сведения об отладке MDB. Не удалось загрузить тип MonoSymbolWriter из сборки Mono.CompilerServices.SymbolWriter.dll. + + + + The union case named '{0}' conflicts with the generated type '{1}' + Ветвь объединения с именем "{0}" вступает в конфликт с созданным типом "{1}" + + + + ReflectedDefinitionAttribute may not be applied to an instance member on a struct type, because the instance member takes an implicit 'this' byref parameter + Атрибут ReflectedDefinitionAttribute не может применяться к элементам экземпляров типа struct, поскольку элемент экземпляра принимает неявный параметр this byref + + + + DLLImport bindings must be static members in a class or function definitions in a module + Привязки DLLImport должны быть статическими элементами в определениях класса или функции в модуле + + + + When mscorlib.dll or FSharp.Core.dll is explicitly referenced the {0} option must also be passed + При явной ссылке на mscorlib.dll или FSharp.Core.dll также должен передаваться параметр {0} + + + + FSharp.Core.sigdata not found alongside FSharp.Core. File expected in {0}. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required. + Ресурс FSharp.Core.sigdata не найден вместе с FSharp.Core. Файл ожидался в {0}. Рекомендуется обновление до более новой версии FSharp.Core, где этот файл не требуется. + + + + File '{0}' not found alongside FSharp.Core. File expected in {1}. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required. + Файл "{0}" не найден вместе с FSharp.Core. Файл ожидался в {1}. Рекомендуется обновление до более новой версии FSharp.Core, где этот файл не требуется. + + + + Filename '{0}' contains invalid character '{1}' + Имя файла "{0}" содержит недопустимый символ "{1}" + + + + 'use!' bindings must be of the form 'use! <var> = <expr>' + Привязки "use!" должны иметь форму "use! <переменная> = <выражение>" + + + + Inner generic functions are not permitted in quoted expressions. Consider adding some type constraints until this function is no longer generic. + Использование внутренних универсальных функций в выражениях в кавычках не допускается. Рекомендуется добавить ограничения типа, чтобы функция более не являлась универсальной. + + + + The type '{0}' is not a valid enumerator type , i.e. does not have a 'MoveNext()' method returning a bool, and a 'Current' property + Тип "{0}" не является допустимым типом перечислителя, т. е. у него нет метода MoveNext(), возвращающего логическое значение, и свойства Current + + + + End of file in triple-quote string begun at or before here + Конец файла в строке с тройными кавычками, начавшейся здесь или ранее + + + + End of file in triple-quote string embedded in comment begun at or before here + Конец файла в строке с тройными кавычками, вставленной в комментарий, который начался здесь или ранее + + + + This type test or downcast will ignore the unit-of-measure '{0}' + При такой проверке типа или нисходящем приведении единица измерения "{0}" будет проигнорирована + + + + Expected type argument or static argument + Ожидался аргумент типа или статический аргумент + + + + Unmatched '<'. Expected closing '>' + Непарная скобка "<". Ожидалась закрывающая скобка ">" + + + + Unexpected quotation operator '<@' in type definition. If you intend to pass a verbatim string as a static argument to a type provider, put a space between the '<' and '@' characters. + Непредвиденный оператор цитирования "<@" в определении типа. Если планируется передать строку verbatim в качестве статического аргумента поставщику типов, вставьте пробел между символами "<" и "@". + + + + Attempted to parse this as an operator name, but failed + Предпринята попытка синтаксического анализа этого имени оператора, однако она завершилась неудачно + + + + \U{0} is not a valid Unicode character escape sequence + \U{0} не является допустимой escape-последовательностью символов Юникода + + + + '{0}' must be applied to an argument of type '{1}', but has been applied to an argument of type '{2}' + "{0}" следует применять только к аргументу типа "{1}", но этот элемент был применен к аргументу типа "{2}" + + + + '{0}' can only be applied to optional arguments + {0} можно применять только к дополнительным аргументам + + + + The specified .NET Framework version '{0}' is not supported. Please specify a value from the enumeration Microsoft.Build.Utilities.TargetDotNetFrameworkVersion. + Указанная версия платформы .NET Framework ("{0}") не поддерживается. Укажите значение из перечисления Microsoft.Build.Utilities.TargetDotNetFrameworkVersion. + + + + Invalid Magic value in CLR Header + Недопустимое магическое значение в заголовке CLR + + + + Bad image format + Неправильный формат изображения + + + + Private key expected + Ожидался закрытый ключ + + + + RSA key expected + Ожидался ключ RSA + + + + Invalid bit Length + Недопустимая длина в битах + + + + Invalid RSAParameters structure - '{{0}}' expected + Недопустимая структура RSAParameters — ожидалось "{{0}}" + + + + Invalid algId - 'Exponent' expected + Недопустимый algId — ожидалось "Exponent" + + + + Invalid signature size + Недопустимый размер сигнатуры + + + + No signature directory + Нет каталога сигнатуры + + + + Invalid Public Key blob + Недопустимый BLOB-объект открытого ключа + + + + Exiting - too many errors + Осуществляется выход - слишком много ошибок + + + + The documentation file has no .xml suffix + У файла документации нет суффикса .xml + + + + No implementation files specified + Файлы реализации не указаны + + + + The attribute {0} specified version '{1}', but this value is invalid and has been ignored + В атрибуте {0} указана версия "{1}", однако это значение недопустимо и было проигнорировано + + + + Conflicting options specified: 'win32manifest' and 'win32res'. Only one of these can be used. + Указаны противоречащие друг другу параметры: win32manifest и win32res. Можно использовать только один из них. + + + + The code in assembly '{0}' makes uses of quotation literals. Static linking may not include components that make use of quotation literals unless all assemblies are compiled with at least F# 4.0. + В коде сборки "{0}" используются литералы кавычек. При статическом связывании компоненты, использующие литералы кавычек, могут быть не включены, если все сборки не скомпилированы в версии F# не ниже 4.0. + + + + Code in this assembly makes uses of quotation literals. Static linking may not include components that make use of quotation literals unless all assemblies are compiled with at least F# 4.0. + В коде этой сборки используются литералы кавычек. При статическом связывании компоненты, использующие литералы кавычек, могут быть не включены, если все сборки не скомпилированы в версии F# не ниже 4.0. + + + + Static linking may not include a .EXE + Статическое связывание может не включать EXE-файл + + + + Static linking may not include a mixed managed/unmanaged DLL + Статическое связывание может не включать DLL-файл смешанного (управляемого и неуправляемого) типа + + + + Ignoring mixed managed/unmanaged assembly '{0}' during static linking + Игнорирование сборки смешанного (управляемого и неуправляемого) типа "{0}" во время статического связывания + + + + Assembly '{0}' was referenced transitively and the assembly could not be resolved automatically. Static linking will assume this DLL has no dependencies on the F# library or other statically linked DLLs. Consider adding an explicit reference to this DLL. + Ссылка на сборку "{0}" была задана транзитивно, поэтому автоматически разрешить сборку не удалось. При статическом связывании предполагается, что у этого DLL-файла нет зависимостей от библиотеки F# или других DLL-файлов со статическим связыванием. Попробуйте добавить явную ссылку на этот DLL-файл. + + + + Assembly '{0}' not found in dependency set of target binary. Statically linked roots should be specified using an assembly name, without a DLL or EXE extension. If this assembly was referenced explicitly then it is possible the assembly was not actually required by the generated binary, in which case it should not be statically linked. + Сборка "{0}" не найдена в наборе зависимостей целевого двоичного файла. Корневые элементы со статическим связыванием должны указываться с помощью имени сборки без расширения DLL или EXE. Если сборка задана в ссылке явным образом, возможно, сборка на самом деле не требовалась для созданного двоичного файла. Это означает, что для нее не требуется статическое связывание. + + + + The key file '{0}' could not be opened + Не удалось открыть файл ключей "{0}" + + + + A problem occurred writing the binary '{0}': {1} + Проблема при записи двоичного файла "{0}": {1} + + + + The 'AssemblyVersionAttribute' has been ignored because a version was given using a command line option + Атрибут AssemblyVersionAttribute был проигнорирован, поскольку версия задана с помощью параметра командной строки + + + + Error emitting 'System.Reflection.AssemblyCultureAttribute' attribute -- 'Executables cannot be satellite assemblies, Culture should always be empty' + Ошибка при создании атрибута System.Reflection.AssemblyCultureAttribute - "Исполняемые файлы не могут быть вспомогательными сборками; свойство " Культура" должно обязательно быть пустым" + + + + Option '--delaysign' overrides attribute 'System.Reflection.AssemblyDelaySignAttribute' given in a source file or added module + Параметр --delaysign переопределяет атрибут System.Reflection.AssemblyDelaySignAttribute, заданный в файле с исходным кодом или в добавленном модуле + + + + Option '--keyfile' overrides attribute 'System.Reflection.AssemblyKeyFileAttribute' given in a source file or added module + Параметр --keyfile переопределяет атрибут System.Reflection.AssemblyKeyFileAttribute, заданный в файле с исходным кодом или в добавленном модуле + + + + Option '--keycontainer' overrides attribute 'System.Reflection.AssemblyNameAttribute' given in a source file or added module + Параметр --keycontainer переопределяет атрибут System.Reflection.AssemblyNameAttribute, заданный в файле с исходным кодом или добавленном модуле + + + + The assembly '{0}' is listed on the command line. Assemblies should be referenced using a command line flag such as '-r'. + Сборка "{0}" указана в командной строке. Ссылки на сборки следует задавать с помощью флага командной строки, например флага "-r". + + + + The resident compilation service was not used because a problem occured in communicating with the server. + Служба резидентной компиляции не использовалась, поскольку возникла проблема при взаимодействии с сервером. + + + + Problem with filename '{0}': Illegal characters in path. + Проблема с именем файла "{0}": недопустимые символы в пути. + + + + Passing a .resx file ({0}) as a source file to the compiler is deprecated. Use resgen.exe to transform the .resx file into a .resources file to pass as a --resource option. If you are using MSBuild, this can be done via an <EmbeddedResource> item in the .fsproj project file. + Не рекомендуется передавать RESX-файл ({0}) компилятору в качестве исходного файла. С помощью программы resgen.exe преобразуйте RESX-файл в RESOURCES-файл для передачи с параметром --resource. При использовании MSBuild это можно сделать с помощью элемента <EmbeddedResource> в FSPROJ-файле проекта. + + + + Static linking may not be used on an assembly referencing mscorlib (e.g. a .NET Framework assembly) when generating an assembly that references System.Runtime (e.g. a .NET Core or Portable assembly). + Статическая компоновка не позволяет использовать сборку, которая ссылается на mscorlib (например, сборку .NET Framework), при создании сборки, которая ссылается на System.Runtime (например, сборки .NET Core или переносимой сборки). + + + + An {0} specified version '{1}', but this value is a wildcard, and you have requested a deterministic build, these are in conflict. + Пользователь {0} указал версию "{1}", но это значение является подстановочным знаком, а вы запросили детерминированную сборку: возник конфликт. + + + + Determinstic builds only support portable PDBs (--debug:portable or --debug:embedded) + Детерминированные сборки поддерживают только переносимые PDB-файлы (--debug:portable или --debug:embedded) + + + + Character '{0}' is not allowed in provided namespace name '{1}' + Не допускается использовать символ "{0}" в указанном имени пространства имен "{1}" + + + + The provided type '{0}' returned a member with a null or empty member name + Предоставленный тип "{0}" вернул элемент с именем NULL или пустым именем + + + + The provided type '{0}' returned a null member + Предоставленный тип "{0}" вернул элемент с NULL + + + + The provided type '{0}' member info '{1}' has null declaring type + Сведения об элементе "{1}" предоставленного типа "{0}" содержат объявляющий тип NULL + + + + The provided type '{0}' has member '{1}' which has declaring type '{2}'. Expected declaring type to be the same as provided type. + Предоставленный тип "{0}" имеет элемент "{1}" с объявляющим типом "{2}". Ожидается, что объявляющий тип будет совпадать с предоставленным типом. + + + + Referenced assembly '{0}' has assembly level attribute '{1}' but no public type provider classes were found + Сборка "{0}", на которую указывает ссылка, содержит атрибут уровня сборки "{1}", однако классы поставщика открытых типов не обнаружены + + + + Type '{0}' from type provider '{1}' has an empty namespace. Use 'null' for the global namespace. + Тип "{0}" поставщика типов "{1}" имеет пустое пространство имен. Используйте null для глобального пространства имен. + + + + Empty namespace found from the type provider '{0}'. Use 'null' for the global namespace. + У поставщика типов "{0}" обнаружено пустое пространство имен. Используйте null для глобального пространства имен. + + + + Provided type '{0}' has 'IsGenericType' as true, but generic types are not supported. + Предоставленный тип "{0}" имеет свойство IsGenericType, равное true, однако универсальные типы не поддерживаются. + + + + Provided type '{0}' has 'IsArray' as true, but array types are not supported. + Предоставленный тип "{0}" имеет свойство IsArray, равное true, однако типы массивов не поддерживаются. + + + + Invalid member '{0}' on provided type '{1}'. Provided type members must be public, and not be generic, virtual, or abstract. + Недопустимый элемент "{0}" предоставленного типа "{1}". Элементы предоставленного типа должны быть открытыми, а не универсальными, виртуальными или абстрактными. + + + + Invalid member '{0}' on provided type '{1}'. Only properties, methods and constructors are allowed + Недопустимый элемент "{0}" предоставленного типа "{1}". Разрешены только свойства, методы и конструкторы + + + + Property '{0}' on provided type '{1}' has CanRead=true but there was no value from GetGetMethod() + У свойства "{0}" предоставленного типа "{1}" CanRead=true, однако значение GetGetMethod() не получено + + + + Property '{0}' on provided type '{1}' has CanRead=false but GetGetMethod() returned a method + У свойства "{0}" предоставленного типа "{1}" CanRead=false, но метод GetGetMethod() вернул метод + + + + Property '{0}' on provided type '{1}' has CanWrite=true but there was no value from GetSetMethod() + У свойства "{0}" предоставленного типа "{1}" CanWrite=true, однако значение GetSetMethod() не получено + + + + Property '{0}' on provided type '{1}' has CanWrite=false but GetSetMethod() returned a method + У свойства "{0}" предоставленного типа "{1}" CanWrite=false, но метод GetSetMethod() вернул метод + + + + One or more errors seen during provided type setup + При настройке предоставленного типа были обнаружены одна или более ошибок + + + + Unexpected exception from provided type '{0}' member '{1}': {2} + Непредвиденное исключение, полученное из элемента "{1}" предоставленного типа "{0}": {2} + + + + Unsupported constant type '{0}'. Quotations provided by type providers can only contain simple constants. The implementation of the type provider may need to be adjusted by moving a value declared outside a provided quotation literal to be a 'let' binding inside the quotation literal. + Неподдерживаемый тип константы "{0}". Цитирования, предоставляемые поставщиками типов, могут содержать только простые константы. Может потребоваться изменить реализацию поставщика типов, переместив значение, объявленное вне предоставленного литерала цитирования, в литерал цитирования с привязкой let. + + + + Unsupported expression '{0}' from type provider. If you are the author of this type provider, consider adjusting it to provide a different provided expression. + Неподдерживаемое выражение "{0}" от поставщика типов. Если вы являетесь автором этого поставщика типов, попробуйте изменить его для предоставления другого выражения. + + + + Expected provided type named '{0}' but provided type has 'Name' with value '{1}' + Ожидался предоставленный тип с именем "{0}", однако у предоставленного типа значение Name равнялось "{1}" + + + + Event '{0}' on provided type '{1}' has no value from GetAddMethod() + Событие "{0}" предоставленного типа "{1}" не имеет значения, полученного от метода GetAddMethod() + + + + Event '{0}' on provided type '{1}' has no value from GetRemoveMethod() + Событие "{0}" предоставленного типа "{1}" не имеет значения, полученного от метода GetRemoveMethod() + + + + Assembly attribute '{0}' refers to a designer assembly '{1}' which cannot be loaded or doesn't exist. {2} + Атрибут сборки "{0}" ссылается на сборку конструктора "{1}", которая не может быть загружена или не существует. {2} + + + + The type provider does not have a valid constructor. A constructor taking either no arguments or one argument of type 'TypeProviderConfig' was expected. + У поставщика типов нет допустимого конструктора. Ожидался конструктор, принимающий один аргумент типа TypeProviderConfig или не принимающий ни одного аргумента этого типа. + + + + The type provider '{0}' reported an error: {1} + Поставщик типов "{0}" сообщил об ошибке: {1} + + + + The type provider '{0}' used an invalid parameter in the ParameterExpression: {1} + Поставщик типов "{0}" использовал недопустимый параметр в выражении ParameterExpression: {1} + + + + The type provider '{0}' provided a method with a name '{1}' and metadata token '{2}', which is not reported among its methods of its declaring type '{3}' + Поставщик типов "{0}" предоставил метод с именем "{1}" и токеном метаданных "{2}", который отсутствует в списке методов соответствующего объявляющего типа "{3}" + + + + The type provider '{0}' provided a constructor which is not reported among the constructors of its declaring type '{1}' + Поставщик типов "{0}" предоставил конструктор, который не указан среди конструкторов его объявляющего типа "{1}" + + + + A direct reference to the generated type '{0}' is not permitted. Instead, use a type definition, e.g. 'type TypeAlias = <path>'. This indicates that a type provider adds generated types to your assembly. + Прямые ссылки на создаваемый тип "{0}" запрещены. Вместо этого следует использовать определение типа, напр. "type TypeAlias = <path>". Оно показывает, что поставщик типов добавляет создаваемые типы в сборку. + + + + Expected provided type with path '{0}' but provided type has path '{1}' + Ожидался предоставленный тип с путем "{0}", однако предоставленный тип имеет путь "{1}" + + + + Unexpected 'null' return value from provided type '{0}' member '{1}' + Непредвиденное возвращаемое значение NULL, полученное из элемента "{1}" предоставленного типа "{0}" + + + + Unexpected exception from member '{0}' of provided type '{1}' member '{2}': {3} + Непредвиденное исключение, полученное из элемента "{0}" предоставленного типа "{1}", элемент "{2}": {3} + + + + Nested provided types do not take static arguments or generic parameters + Вложенные предоставленные типы не принимают статических аргументов или универсальных параметров + + + + Invalid static argument to provided type. Expected an argument of kind '{0}'. + Недопустимый статический аргумент предоставленного типа. Ожидался аргумент вида "{0}". + + + + An error occured applying the static arguments to a provided type + Ошибка при применении статических аргументов к предоставленному типу + + + + Unknown static argument kind '{0}' when resolving a reference to a provided type or method '{1}' + Неизвестный вид статического аргумента "{0}" при разрешении ссылки на предоставленный тип или метод "{1}" + + + + invalid namespace for provided type + недопустимое пространство имен для предоставленного типа + + + + invalid full name for provided type + недопустимое полное имя для предоставленного типа + + + + The type provider returned 'null', which is not a valid return value from '{0}' + Поставщик типов вернул значение NULL, которое не является допустимым возвращаемым значением для "{0}" + + + + The type provider constructor has thrown an exception: {0} + Конструктор поставщика типов создал исключение: {0} + + + + Type provider '{0}' returned null from GetInvokerExpression. + Поставщик типов "{0}" вернул значение NULL в результате вызова метода GetInvokerExpression. + + + + The type provider '{0}' returned an invalid type from 'ApplyStaticArguments'. A type with name '{1}' was expected, but a type with name '{2}' was returned. + Поставщик типов "{0}" вернул недопустимый тип из метода ApplyStaticArguments. Ожидался тип с именем "{1}", но был возвращен тип с именем "{2}". + + + + The type provider '{0}' returned an invalid method from 'ApplyStaticArgumentsForMethod'. A method with name '{1}' was expected, but a method with name '{2}' was returned. + Поставщик типов "{0}" вернул недействительный метод из ApplyStaticArgumentsForMethod. Предполагалось, что вернется метод "{1}" , но был возвращен метод "{2}". + + + + This type test or downcast will erase the provided type '{0}' to the type '{1}' + Это нисходящее приведение или проверка типа сотрет предоставленный тип "{0}" до типа "{1}". + + + + This downcast will erase the provided type '{0}' to the type '{1}'. + Это нисходящее приведение типа сотрет предоставленный тип "{0}" до типа "{1}". + + + + This type test with a provided type '{0}' is not allowed because this provided type will be erased to '{1}' at runtime. + Такая проверка предоставленного типа "{0}" запрещена, поскольку при этом предоставленный тип будет во время выполнения стерт до типа "{1}". + + + + Cannot inherit from erased provided type + Невозможно наследование от удаленного предоставленного типа + + + + Assembly '{0}' hase TypeProviderAssembly attribute with invalid value '{1}'. The value should be a valid assembly name + У сборки "{0}" имеется атрибут TypeProviderAssembly с недопустимым значением "{1}". Значение должно представлять собой допустимое имя сборки + + + + Invalid member name. Members may not have name '.ctor' or '.cctor' + Недопустимое имя элемента. Элементы не могут иметь имя ".ctor" или ".cctor" + + + + The function or member '{0}' is used in a way that requires further type annotations at its definition to ensure consistency of inferred types. The inferred signature is '{1}'. + Функция или элемент "{0}" используются таким образом, что для подтверждения согласованности выводимых типов требуются дополнительные аннотации типов при их определении. Выводимая сигнатура: "{1}". + + + + The number of type arguments did not match: '{0}' given, '{1}' expected. This may be related to a previously reported error. + Число аргументов типа не совпадает. Задано: {0}, ожидалось: {1}. Это может быть связано с ошибкой, о которой сообщалось ранее. + + + + Cannot override inherited member '{0}' because it is sealed + Невозможно переопределить унаследованный элемент "{0}", поскольку он является запечатанным + + + + The type provider '{0}' reported an error in the context of provided type '{1}', member '{2}'. The error: {3} + Поставщик типов сообщил об ошибке "{0}" в контексте предоставленного типа "{1}", элемент "{2}". Ошибка: {3} + + + + An exception occurred when accessing the '{0}' of a provided type: {1} + Исключение при обращении к "{0}" предоставленного типа: {1} + + + + The '{0}' of a provided type was null or empty. + Значение "{0}" предоставленного типа равнялось NULL или было пустым. + + + + Character '{0}' is not allowed in provided type name '{1}' + Не допускается использовать символ "{0}" в указанном имени типа "{1}" + + + + In queries, '{0}' must use a simple pattern + В запросах для "{0}" следует использовать простой шаблон + + + + A custom query operation for '{0}' is required but not specified + Пользовательская операция запроса для "{0}" является обязательной, но не указана + + + + Named static arguments must come after all unnamed static arguments + Именованные статические аргументы должны располагаться после неименованных статических аргументов + + + + The static parameter '{0}' of the provided type or method '{1}' requires a value. Static parameters to type providers may be optionally specified using named arguments, e.g. '{2}<{3}=...>'. + Для статического параметра "{0}" предоставленного типа или метода "{1}" требуется значение. Статические параметры поставщиков типов могут задаваться с помощью именованных аргументов, например: "{2}<{3}=...>". + + + + No static parameter exists with name '{0}' + Имя "{0}" не имеет статических параметров + + + + The static parameter '{0}' has already been given a value + Для статического параметра "{0}" уже было задано значение + + + + Multiple static parameters exist with name '{0}' + Имя "{0}" имеет несколько статических параметров + + + + A custom operation may not be used in conjunction with a non-value or recursive 'let' binding in another part of this computation expression + Пользовательскую операцию нельзя использовать в сочетании c не содержащей значения или рекурсивной привязкой let в другой части этого выражения с вычислениями + + + + A custom operation may not be used in conjunction with 'use', 'try/with', 'try/finally', 'if/then/else' or 'match' operators within this computation expression + Пользовательскую операцию нельзя использовать в сочетании с операторами use, try/with, try/finally, if/then/else и match в этом выражении с вычислениями + + + + The custom operation '{0}' refers to a method which is overloaded. The implementations of custom operations may not be overloaded. + Пользовательский оператор "{0}" ссылается на перегруженный метод. Нельзя перегружать реализации пользовательских операций. + + + + An if/then/else expression may not be used within queries. Consider using either an if/then expression, or use a sequence expression instead. + В запросах нельзя использовать выражения if/then/else. Попробуйте использовать выражение if/then или используйте вместо этого выражение последовательности. + + + + Invalid argument to 'methodhandleof' during codegen + Недопустимый аргумент methodhandleof во время создания кода + + + + A reference to a provided type was missing a value for the static parameter '{0}'. You may need to recompile one or more referenced assemblies. + В ссылке на предоставленный тип отсутствовало значение статического параметра "{0}". Может потребоваться перекомпилировать одну или более сборок, на которые указывают ссылки. + + + + A reference to a provided type had an invalid value '{0}' for a static parameter. You may need to recompile one or more referenced assemblies. + Ссылка на предоставленный тип имеет недопустимое значение "{0}" статического параметра. Может потребоваться перекомпилировать одну или более сборок, на которые указывают ссылки. + + + + '{0}' is not used correctly. This is a custom operation in this query or computation expression. + {0} используется неверно. Это пользовательская операция в данном запросе или выражении с вычислениями. + + + + '{0}' is not used correctly. Usage: {1}. This is a custom operation in this query or computation expression. + "{0}" используется неверно. Использование: {1}. Это пользовательская операция в данном запросе или выражении с вычислениями. + + + + {0} var in collection {1} (outerKey = innerKey). Note that parentheses are required after '{2}' + Переменная {0} в коллекции {1} (outerKey = innerKey). Обратите внимание, что после "{2}" нужны круглые скобки + + + + {0} var in collection {1} (outerKey = innerKey) into group. Note that parentheses are required after '{2}' + Переменная {0} из коллекции {1} (outerKey = innerKey) в группе. Обратите внимание, что после "{2}" нужны круглые скобки + + + + {0} var in collection + Переменная {0} в коллекции + + + + '{0}' must be followed by a variable name. Usage: {1}. + После "{0}" должно идти имя переменной. Использование: {1}. + + + + Incorrect syntax for '{0}'. Usage: {1}. + Неверный синтаксис для "{0}". Использование: {1}. + + + + '{0}' must come after a 'for' selection clause and be followed by the rest of the query. Syntax: ... {1} ... + Перед "{0}" должно идти предложение выбора "for", а после — оставшаяся часть запроса. Синтаксис: … {1} … + + + + '{0}' is used with an incorrect number of arguments. This is a custom operation in this query or computation expression. Expected {1} argument(s), but given {2}. + "{0}" используется с неверным числом аргументов. Это пользовательская операция в данном запросе или выражении с вычислениями. Ожидалось аргументов: {1}. Задано аргументов: {2}. + + + + Expected an expression after this point + После этой точки ожидалось выражение + + + + Expected a type after this point + После этой точки ожидался тип + + + + Unmatched '[<'. Expected closing '>]' + Нет парной скобки у "[<". Ожидалась закрывающая скобка ">]" + + + + Unexpected end of input in 'match' expression. Expected 'match <expr> with | <pat> -> <expr> | <pat> -> <expr> ...'. + Непредвиденный конец входных данных в выражении match. Ожидалось "match <выражение> with | <шаблон> -> <выражение> | <шаблон> -> <выражение> ...". + + + + Unexpected end of input in 'try' expression. Expected 'try <expr> with <rules>' or 'try <expr> finally <expr>'. + Непредвиденный конец входных данных в выражении try. Ожидалось "try <выражение> with <правила>" или "try <выражение> finally <выражение>". + + + + Unexpected end of input in 'while' expression. Expected 'while <expr> do <expr>'. + Непредвиденный конец входных данных в выражении while. Ожидалось "while <выражение> do <выражение>". + + + + Unexpected end of input in 'for' expression. Expected 'for <pat> in <expr> do <expr>'. + Непредвиденный конец входных данных в выражении for. Ожидалось "for <шаблон> in <выражение> do <выражение>". + + + + Unexpected end of input in 'match' or 'try' expression + Непредвиденный конец входных данных в выражении "match" или "try" + + + + Unexpected end of input in 'then' branch of conditional expression. Expected 'if <expr> then <expr>' or 'if <expr> then <expr> else <expr>'. + Непредвиденный конец входных данных в ветви then условного выражения. Ожидалось "if <выражение> then <выражение>" или "if <выражение> then <выражение> else <выражение>". + + + + Unexpected end of input in 'else' branch of conditional expression. Expected 'if <expr> then <expr>' or 'if <expr> then <expr> else <expr>'. + Непредвиденный конец входных данных в ветви else условного выражения. Ожидалось "if <выражение> then <выражение>" или "if <выражение> then <выражение> else <выражение>". + + + + Unexpected end of input in body of lambda expression. Expected 'fun <pat> ... <pat> -> <expr>'. + Непредвиденный конец входных данных в теле лямбда-выражения. Ожидалось "fun <шаблон> ... <шаблон> -> <выражение>". + + + + Unexpected end of input in type arguments + Непредвиденный конец входных данных в аргументах типа + + + + Unexpected end of input in type signature + Непредвиденный конец входных данных в сигнатуре типа + + + + Unexpected end of input in type definition + Непредвиденный конец входных данных в определении типа + + + + Unexpected end of input in object members + Непредвиденный конец входных данных в элементах объекта + + + + Unexpected end of input in value, function or member definition + Непредвиденный конец входных данных в определении значения, функции или элемента + + + + Unexpected end of input in expression + Непредвиденный конец входных данных в выражении + + + + Unexpected end of type. Expected a name after this point. + Непредвиденный конец файла. После этой точки ожидалось имя. + + + + Incomplete value or function definition. If this is in an expression, the body of the expression must be indented to the same column as the 'let' keyword. + Неполное определение значения или функции. Если оно находится в выражении, тело выражения должно располагаться с таким же отступом, что и ключевое слово let. + + + + Incomplete value definition. If this is in an expression, the body of the expression must be indented to the same column as the 'let!' keyword. + Неполное определение значения. Если оно находится в выражении, тело выражения должно располагаться с таким же отступом, что и ключевое слово "let!". + + + + Incomplete value definition. If this is in an expression, the body of the expression must be indented to the same column as the 'use!' keyword. + Неполное определение значения. Если оно находится в выражении, тело выражения должно располагаться с таким же отступом, что и ключевое слово "use!". + + + + Incomplete value definition. If this is in an expression, the body of the expression must be indented to the same column as the 'use' keyword. + Неполное определение значения. Если оно находится в выражении, тело выражения должно располагаться с таким же отступом, что и ключевое слово use. + + + + Missing 'do' in 'while' expression. Expected 'while <expr> do <expr>'. + В выражении while отсутствует do. Ожидалось "while <выражение> do <выражение>". + + + + Missing 'do' in 'for' expression. Expected 'for <pat> in <expr> do <expr>'. + В выражении for отсутствует do. Ожидалось "for <шаблон> in <выражение> do <выражение>". + + + + Invalid join relation in '{0}'. Expected 'expr <op> expr', where <op> is =, =?, ?= or ?=?. + Недопустимое отношение соединения в "{0}". Ожидалось "expr <оператор> expr", где в качестве <оператор> может использоваться =, =?, ?= или ?=?. + + + + Calls + Вызовы + + + + Invalid number of generic arguments to type '{0}' in provided type. Expected '{1}' arguments, given '{2}'. + Недопустимое число универсальных аргументов для типа "{0}" в предоставленном типе. Ожидалось аргументов: "{1}", задано аргументов: "{2}". + + + + Invalid value '{0}' for unit-of-measure parameter '{1}' + Недопустимое значение "{0}" параметра единицы измерения "{1}" + + + + Invalid value unit-of-measure parameter '{0}' + Недопустимое значение параметра единицы измерения "{0}" + + + + Property '{0}' on provided type '{1}' is neither readable nor writable as it has CanRead=false and CanWrite=false + Свойство "{0}" предоставленного типа "{1}" не доступно ни для чтения, ни для записи, поскольку у него CanRead=false и CanWrite=false + + + + A use of 'into' must be followed by the remainder of the computation + После использования into должна располагаться оставшаяся часть вычислений + + + + The operator '{0}' does not accept the use of 'into' + Оператор "{0}" не принимает использование into + + + + The definition of the custom operator '{0}' does not use a valid combination of attribute flags + В определении пользовательского оператора "{0}" используется недопустимое сочетание флагов атрибутов + + + + This type definition may not have the 'CLIMutable' attribute. Only record types may have this attribute. + Определение этого типа не может содержать атрибута CLIMutable. Этот атрибут можно использовать только в типах записей. + + + + 'member val' definitions are only permitted in types with a primary constructor. Consider adding arguments to your type definition, e.g. 'type X(args) = ...'. + Определения "member val" разрешены только в типах с первичным конструктором. Попробуйте добавить в определение типа аргументы, напр. "type X(args) = ...". + + + + Property definitions may not be declared mutable. To indicate that this property can be set, use 'member val PropertyName = expr with get,set'. + Определения свойств не могут объявляться как изменяемые. Чтобы показать, что свойство можно задавать, используйте конструкцию "member val PropertyName = expr with get,set". + + + + To indicate that this property can be set, use 'member val PropertyName = expr with get,set'. + Чтобы показать, что свойство можно задавать, используйте конструкцию "member val PropertyName = expr with get,set". + + + + Type '{0}' is illegal because in byref<T>, T cannot contain byref types. + Тип "{0}" является недопустимым, поскольку в byref<T> T не может содержать типы byref. + + + + F# supports array ranks between 1 and 32. The value {0} is not allowed. + F# поддерживает массивы рангом от 1 до 32. Значение {0} не допускается. + + + + In queries, use the form 'for x in n .. m do ...' for ranging over integers + В запросах используйте для перебора интервала целых чисел форму "for x in n .. m do ..." + + + + 'while' expressions may not be used in queries + В запросах нельзя использовать выражения while + + + + 'try/finally' expressions may not be used in queries + В запросах нельзя использовать выражения try/finally + + + + 'use' expressions may not be used in queries + В запросах нельзя использовать выражения use + + + + 'let!', 'use!' and 'do!' expressions may not be used in queries + В запросах нельзя использовать выражения "let!", "'use!" и "do!" + + + + 'return' and 'return!' may not be used in queries + В запросах нельзя использовать "return" и "return!" + + + + This is not a known query operator. Query operators are identifiers such as 'select', 'where', 'sortBy', 'thenBy', 'groupBy', 'groupValBy', 'join', 'groupJoin', 'sumBy' and 'averageBy', defined using corresponding methods on the 'QueryBuilder' type. + Это неизвестный оператора запроса. Операторы запросов представляют собой идентификаторы, такие как select, where, sortBy, thenBy, groupBy, groupValBy, join, groupJoin,sumBy и averageBy, определяемые с помощью соответствующих методов типа QueryBuilder. + + + + 'try/with' expressions may not be used in queries + В запросах нельзя использовать выражения try/with + + + + This 'let' definition may not be used in a query. Only simple value definitions may be used in queries. + Определение let нельзя использовать в запросе. В запросах можно использовать только простые определения значений. + + + + Too many static parameters. Expected at most {0} parameters, but got {1} unnamed and {2} named parameters. + Слишком много статических параметров. Ожидалось не более {0} параметров, однако было получено {1} неименованных и {2} именованных параметров. + + + + Invalid provided literal value '{0}' + Недопустимое предоставленное значение литерала "{0}" + + + + The 'anycpu32bitpreferred' platform can only be used with EXE targets. You must use 'anycpu' instead. + Платформу anycpu32bitpreferred можно использовать только с целевыми файлами EXE. Вместо этого необходимо использовать платформу anycpu. + + + + This member, function or value declaration may not be declared 'inline' + Этот элемент, функция или значение не могут быть объявлены как inline + + + + The provider '{0}' returned a non-generated type '{1}' in the context of a set of generated types. Consider adjusting the type provider to only return generated types. + Поставщик "{0}" вернул несоздаваемый тип "{1}" в контексте набора создаваемых типов. Попробуйте изменить поставщик типов, чтобы он возвращал только создаваемые типы. + + + + Arguments to query operators may require parentheses, e.g. 'where (x > y)' or 'groupBy (x.Length / 10)' + Аргументы операторов запросов могут требовать использования скобок, напр. "where (x > y)" или "groupBy (x.Length / 10)" + + + + A quotation may not involve an assignment to or taking the address of a captured local variable + Цитата может не включать присваивание полученной локальной переменной или получение ее адреса + + + + + 1 overload + + 1 перегрузка + + + + + {0} overloads + + {0} перегрузок + + + + Erased to + Стерт до + + + + Unexpected token '{0}' or incomplete expression + Ожидался токен "{0}" или неполное выражение + + + + Cannot find code target for this attribute, possibly because the code after the attribute is incomplete. + Не удается найти целевой код для этого атрибута; возможно, это вызвано тем, что код после атрибута незавершен. + + + + Type name cannot be empty. + Имя типа не может быть пустым. + + + + Problem reading assembly '{0}': {1} + Проблема при чтении сборки "{0}": {1} + + + + Invalid provided field. Provided fields of erased provided types must be literals. + Недопустимое предоставляемое поле. Предоставляемые поля удаленных предоставляемых типов должны быть литералами. + + + + (loading description...) + (идет загрузка описания...) + + + + (description unavailable...) + (описание недоступно...) + + + + A type variable has been constrained by multiple different class types. A type variable may only have one class constraint. + Переменная типа ограничена несколькими различными типами классов. Переменная типа может иметь только одно ограничение класса. + + + + 'match' expressions may not be used in queries + В запросах нельзя использовать выражения match + + + + Infix operator member '{0}' has {1} initial argument(s). Expected a tuple of 3 arguments + Элемент инфиксного оператора "{0}" имеет {1} начальных аргументов. Ожидался кортеж из 3 аргументов + + + + The operator '{0}' cannot be resolved. Consider opening the module 'Microsoft.FSharp.Linq.NullableOperators'. + Не удается разрешить оператор "{0}". Попробуйте открыть модуль Microsoft.FSharp.Linq.NullableOperators. + + + + '{0}' must be followed by 'in'. Usage: {1}. + После "{0}" должно следовать "in". Использование: {1}. + + + + Neither 'member val' nor 'override val' definitions are permitted in object expressions. + В выражениях объектов не разрешены определения "member val" и "override val". + + + + Copy-and-update record expressions must include at least one field. + Выражения записей копирования и обновления должны включать хотя бы одно поле. + + + + '_' cannot be used as field name + Символ "_" нельзя использовать как имя поля + + + + The provided types generated by this use of a type provider may not be used from other F# assemblies and should be marked internal or private. Consider using 'type internal TypeName = ...' or 'type private TypeName = ...'. + Предоставленные типы, созданные в результате данного использования поставщика типов, не могут использоваться из других сборок F#, и их следует пометить модификатором internal или private. Попробуйте использовать конструкцию "type internal TypeName = ..." или "type private TypeName = ...". + + + + A property's getter and setter must have the same type. Property '{0}' has getter of type '{1}' but setter of type '{2}'. + Метод получения и метод задания свойства должны относиться к одному типу. Свойство "{0}" имеет метод получения типа "{1}" и метод задания типа "{2}". + + + + Array method '{0}' is supplied by the runtime and cannot be directly used in code. For operations with array elements consider using family of GetArray/SetArray functions from LanguagePrimitives.IntrinsicFunctions module. + Метод массива "{0}" предоставляет средой выполнения и не может использовать непосредственно в коде. Для операций с элементами используйте семейство функций GetArray/SetArray из модуля LanguagePrimitives.IntrinsicFunctions. + + + + The union case '{0}' does not have a field named '{1}'. + Ветвь объединения/исключение "{0}" не содержит поля с именем "{1}". + + + + Union case/exception field '{0}' cannot be used more than once. + Поле "{0}" ветви объединения/исключения не может использоваться более одного раза. + + + + Named field '{0}' is used more than once. + Именованное поле "{0}" используется более одного раза. + + + + Named field '{0}' conflicts with autogenerated name for anonymous field. + Конфликт именованного поля "{0}" с автоматически созданным именем для анонимного поля. + + + + This literal expression or attribute argument results in an arithmetic overflow. + Это строковое выражение или аргумент атрибута вызывает арифметическое переполнение. + + + + This is not valid literal expression. The [<Literal>] attribute will be ignored. + Недопустимое выражение литерала. Атрибут [<Literal>] будет пропущен. + + + + System.Runtime.InteropServices assembly is required to use UnknownWrapper\DispatchWrapper classes. + Для использования классов UnknownWrapper\DispatchWrapper требуется сборка System.Runtime.InteropServices. + + + + The mutable local '{0}' is implicitly allocated as a reference cell because it has been captured by a closure. This warning is for informational purposes only to indicate where implicit allocations are performed. + Локальная изменяемая переменная "{0}" была неявно выделена в качестве ссылочной ячейки, поскольку она попала в замыкание. Это предупреждение отображается только в ознакомительных целях, чтобы указать на неявно определенные выделения. + + + + A type provider implemented GetStaticParametersForMethod, but ApplyStaticArgumentsForMethod was not implemented or invalid + Поставщик типов реализовал GetStaticParametersForMethod, но поддержка аргумента ApplyStaticArgumentsForMethod не была реализована или была реализована неправильно + + + + An error occured applying the static arguments to a provided method + Произошла ошибка при применении статических аргументов к предоставленному методу + + + + Unexpected character '{0}' in preprocessor expression + Неожиданный символ "{0}" в выражении препроцессора + + + + Unexpected token '{0}' in preprocessor expression + Неожиданный токен "{0}" в выражении препроцессора + + + + Incomplete preprocessor expression + Неполное выражение препроцессора + + + + Missing token '{0}' in preprocessor expression + Отсутствует токен "{0}" в выражении препроцессора + + + + An error occurred while reading the F# metadata node at position {0} in table '{1}' of assembly '{2}'. The node had no matching declaration. Please report this warning. You may need to recompile the F# assembly you are using. + Произошла ошибка при чтении узла метаданных F# в позиции {0} в таблице "{1}" сборки "{2}". В узле отсутствовало соответствующее объявление. Отправьте это предупреждение в отчете. Вам может потребоваться повторно скомпилировать сборку F#, которую вы используете. + + + + Type inference caused the type variable {0} to escape its scope. Consider adding an explicit type parameter declaration or adjusting your code to be less generic. + Определение типа привело к выходу за пределы области переменной типа {0}. Попробуйте добавить явное объявление параметра типа или скорректировать код таким образом, чтобы он был менее универсальным. + + + + Type inference caused an inference type variable to escape its scope. Consider adding type annotations to make your code less generic. + Определение типа привело к выходу за пределы области переменной типа определения. Попробуйте добавить аннотации типа, чтобы сделать код менее универсальным. + + + + Redundant arguments are being ignored in function '{0}'. Expected {1} but got {2} arguments. + Избыточные аргументы игнорируются в функции "{0}". Ожидался аргумент {1}, но получен аргумент {2}. + + + + Lowercase literal '{0}' is being shadowed by a new pattern with the same name. Only uppercase and module-prefixed literals can be used as named patterns. + Литерал в нижнем регистре "{0}" скрыт новым шаблоном с тем же именем. Только литералы в верхнем регистре и литералы с модулем в качестве префикса можно использовать в качестве именованного шаблона. + + + + This literal pattern does not take arguments + Этот шаблон литерала не включает аргументы. + + + + Constructors are not permitted as extension members - they must be defined as part of the original definition of the type + Не допускается использование конструкторов в качестве элементов расширений — они должны быть определены в рамках исходного определения типа. + + + + Invalid response file '{0}' ( '{1}' ) + Недопустимый файл ответов "{0}" ("{1}") + + + + Response file '{0}' not found in '{1}' + Файл ответа "{0}" не найден в "{1}". + + + + Response file name '{0}' is empty, contains invalid characters, has a drive specification without an absolute path, or is too long + Имя файла ответа "{0}" пустое, содержит недопустимые символы, имеет имя диска без абсолютного пути или слишком длинное. + + + + Cannot find FSharp.Core.dll in compiler's directory + Не удается найти FSharp.Core.dll в каталоге компилятора. + + + + One tuple type is a struct tuple, the other is a reference tuple + Один тип кортежа является кортежем структуры, другой — эталонным кортежем + + + + This provided method requires static parameters + Этому предоставленному методу требуются статические параметры + + + + The conversion from {0} to {1} is a compile-time safe upcast, not a downcast. Consider using 'upcast' instead of 'downcast'. + Преобразование {0} в {1} является безопасным повышением времени компиляции, а не понижением. Рекомендуется использовать "upcast" вместо "downcast". + + + + The conversion from {0} to {1} is a compile-time safe upcast, not a downcast. Consider using the :> (upcast) operator instead of the :?> (downcast) operator. + Преобразование {0} в {1} является безопасным повышением времени компиляции, а не понижением. Рекомендуется использовать оператор :> (upcast) вместо оператора :?> (downcast). + + + + The 'rec' on this module is implied by an outer 'rec' declaration and is being ignored + Ключевое слово "rec" в этом модуле подразумевается согласно внешнему объявлению "rec" и будет пропущено + + + + In a recursive declaration group, 'open' declarations must come first in each module + В группе рекурсивных объявлений объявления "open" должны стоять первыми в каждом модуле + + + + In a recursive declaration group, module abbreviations must come after all 'open' declarations and before other declarations + В группе рекурсивных объявлений сокращенные формы модулей должны следовать после всех объявлений "open" и до других объявлений + + + + This declaration is not supported in recursive declaration groups + Это объявление не поддерживается в группах рекурсивных объявлений + + + + Invalid use of 'rec' keyword + Недопустимое использование ключевого слова "rec" + + + + If a union type has more than one case and is a struct, then all fields within the union type must be given unique names. + Если тип объединения имеет более одного варианта и является структурой, всем полям в типе объединения необходимо присвоить уникальные имена. + + + + The CallerMemberNameAttribute applied to parameter '{0}' will have no effect. It is overridden by the CallerFilePathAttribute. + Атрибут CallerMemberNameAttribute, примененный для параметра "{0}", не будет действовать. Он будет переопределен атрибутом CallerFilePathAttribute. + + + + Invalid use of 'fixed'. 'fixed' may only be used in a declaration of the form 'use x = fixed expr' where the expression is an array, the address of a field, the address of an array element or a string' + Недопустимое использование выражения "fixed". Выражение "fixed" можно использовать только в объявлении формы "use x = fixed expr", где выражение является массивом, адресом поля, адресом элемента массива или строки. + + + + Could not find method System.Runtime.CompilerServices.OffsetToStringData in references when building 'fixed' expression. + Не удалось найти в ссылках метод System.Runtime.CompilerServices.OffsetToStringData при создании выражения "fixed". + + + + {0} is an active pattern and cannot be treated as a discriminated union case with named fields. + {0} является активным шаблоном и не может обрабатываться как различаемая ветвь объединения с именованными полями. + + + + The default value does not have the same type as the argument. The DefaultParameterValue attribute and any Optional attribute will be ignored. Note: 'null' needs to be annotated with the correct type, e.g. 'DefaultParameterValue(null:obj)'. + Значение по умолчанию и аргумент имеют разные типы. Атрибут DefaultParameterValue и любые атрибуты Optional будут игнорироваться. Примечание: null необходимо аннотировать правильным типом, например DefaultParameterValue(null:obj). + + + + The system type '{0}' was required but no referenced system DLL contained this type + Требуется системный тип "{0}", а в этом типе нет упоминаемой системой библиотеки DLL. + + + + The member '{0}' matches multiple overloads of the same method.\nPlease restrict it to one of the following:{1}. + Элемент "{0}" соответствует нескольким перегрузкам одного метода.\nНеобходимо ограничить его одним из следующих: {1}. + + + + Method or object constructor '{0}' is not static + Метод или конструктор объекта "{0}" не является статическим + + + + Unexpected symbol '=' in expression. Did you intend to use 'for x in y .. z do' instead? + Непредвиденный символ = в выражении. Возможно, предполагалось использовать for x in y .. z do? + + + + Indicates a method that either has no implementation in the type in which it is declared or that is virtual and has a default implementation. + Обозначает метод, который не имеет реализации в типе, в котором он объявлен, или является виртуальным и имеет реализацию по умолчанию. + + + + Used in mutually recursive bindings, in property declarations, and with multiple constraints on generic parameters. + Используется во взаимно рекурсивных привязках, объявлениях свойств и с несколькими ограничениями для универсальных параметров. + + + + Used to give the current class object an object name. Also used to give a name to a whole pattern within a pattern match. + Используется для присвоения текущему объекту класса имени объекта. Также используется для присвоения имени всему шаблону в пределах сопоставления шаблонов. + + + + Used to verify code during debugging. + Используется для проверки кода во время отладки. + + + + Used as the name of the base class object. + Используется в качестве имени объекта базового класса. + + + + In verbose syntax, indicates the start of a code block. + В подробном синтаксисе обозначает начало блока кода. + + + + In verbose syntax, indicates the start of a class definition. + В подробном синтаксисе обозначает начало определения класса. + + + + Indicates an implementation of an abstract method; used together with an abstract method declaration to create a virtual method. + Обозначает реализацию абстрактного метода; используется вместе с объявлением абстрактного метода для создания виртуального метода. + + + + Used to declare a delegate. + Используется для объявления делегата. + + + + Used in looping constructs or to execute imperative code. + Используется в циклических конструкциях или для выполнения императивного кода. + + + + In verbose syntax, indicates the end of a block of code in a looping expression. + В подробном синтаксисе обозначает окончание блока кода в циклическом выражении. + + + + Used to convert to a type that is lower in the inheritance chain. + Используется для преобразования в тип, который находится ниже в цепочке наследования. + + + + In a for expression, used when counting in reverse. + В выражении for используется для счета в обратном порядке. + + + + Used in conditional branching. A short form of else if. + Используется в условном ветвлении. Краткая форма else if. + + + + Used in conditional branching. + Используется в условном ветвлении. + + + + In type definitions and type extensions, indicates the end of a section of member definitions. In verbose syntax, used to specify the end of a code block that starts with the begin keyword. + В определениях и расширениях типов обозначает окончание раздела определений членов. В подробном синтаксисе используется для указания окончания блока кода, который начинается с ключевого слова begin. + + + + Used to declare an exception type. + Используется для объявления типа исключения. + + + + Indicates that a declared program element is defined in another binary or assembly. + Указывает, что объявленный элемент программы определяется в другом двоичном файле или сборке. + + + + Used as a Boolean literal. + Используется в качестве логического литерала. + + + + Used together with try to introduce a block of code that executes regardless of whether an exception occurs. + Используется вместе с ключевым словом try для введения блока кода, который выполняется независимо от того, возникает ли исключение. + + + + Used in looping constructs. + Используется в циклических конструкциях. + + + + Used in lambda expressions, also known as anonymous functions. + Используется в лямбда-выражениях, также известных как анонимные функции. + + + + Used as a shorter alternative to the fun keyword and a match expression in a lambda expression that has pattern matching on a single argument. + Используется в качестве краткого варианта ключевого слова fun и выражения сопоставления в лямбда-выражении с сопоставлением шаблонов по одному аргументу. + + + + Used to reference the top-level .NET namespace. + Используется для ссылки на пространство имен .NET верхнего уровня. + + + + Used in conditional branching constructs. + Используется в конструкциях условного ветвления. + + + + Used for sequence expressions and, in verbose syntax, to separate expressions from bindings. + Используется для выражений последовательностей и (в подробном синтаксисе) для отделения выражений от привязок. + + + + Used to specify a base class or base interface. + Используется для указания базового класса или базового интерфейса. + + + + Used to indicate a function that should be integrated directly into the caller's code. + Используется для обозначения функции, которая должна быть интегрирована непосредственно в код вызывающего объекта. + + + + Used to declare and implement interfaces. + Используется для объявления и реализации интерфейсов. + + + + Used to specify that a member is visible inside an assembly but not outside it. + Используется для указания того, что член доступен внутри сборки, но не за ее пределами. + + + + Used to specify a computation that is to be performed only when a result is needed. + Используется для указания вычисления, которое должно быть выполнено, только когда требуется результат. + + + + Used to associate, or bind, a name to a value or function. + Используется для связывания (или привязки) имени со значением или функцией. + + + + Used in computation expressions to bind a name to the result of another computation expression. + Используется в асинхронных рабочих процессах для привязки к результату асинхронного вычисления или (в других вычислительных выражениях) для привязки имени к результату, который имеет тип вычисления. + + + + Used to branch by comparing a value to a pattern. + Используется для ветвления путем сравнения значения с шаблоном. + + + + Used to declare a property or method in an object type. + Используется для объявления свойства или метода в типе объекта. + + + + Used to associate a name with a group of related types, values, and functions, to logically separate it from other code. + Используется для связывания имени с группой соответствующих типов, значений и функций для логического отделения их от других частей кода. + + + + Used to declare a variable, that is, a value that can be changed. + Используется для объявления переменной, то есть значения, которое может быть изменено. + + + + Used to associate a name with a group of related types and modules, to logically separate it from other code. + Используется для связывания имени с группой соответствующих типов и модулей для логического отделения их от других частей кода. + + + + Used to declare, define, or invoke a constructor that creates or that can create an object. Also used in generic parameter constraints to indicate that a type must have a certain constructor. + Используется для объявления, определения или вызова конструктора, который создает или может создать объект. Также используется в ограничениях универсальных параметров, чтобы указать, что тип должен иметь определенный конструктор. + + + + Not actually a keyword. However, not struct in combination is used as a generic parameter constraint. + Не является ключевым словом. Тем не менее структура not в сочетаниях используется как ограничение универсальных параметров. + + + + Indicates the absence of an object. Also used in generic parameter constraints. + Указывает на отсутствие объекта. Также используется в ограничениях универсальных параметров. + + + + Used in discriminated unions to indicate the type of categories of values, and in delegate and exception declarations. + Используется в размеченных объединениях для обозначения типа категорий значений, а также в объявлениях делегатов и исключений. + + + + Used to make the contents of a namespace or module available without qualification. + Используется для предоставления доступа к содержимому пространства имен или модуля без квалификации. + + + + Used with Boolean conditions as a Boolean or operator. Equivalent to ||. Also used in member constraints. + Используется с логическими условиями в качестве логического значения или оператора. Эквивалентно ||. Также используется в ограничениях членов. + + + + Used to implement a version of an abstract or virtual method that differs from the base version. + Используется для реализации версии абстрактного или виртуального метода, который отличается от базовой версии. + + + + Restricts access to a member to code in the same type or module. + Ограничивает доступ к члену для кода в том же типе или модуле. + + + + Allows access to a member from outside the type. + Разрешает доступ к члену из-за пределов типа. + + + + Used to indicate that a function is recursive. + Используется для обозначения того, что функция является рекурсивной. + + + + Used to provide a value for the result of the containing computation expression. + Используется для указания значения, предоставляемого как результат вычислительного выражения. + + + + Used to provide a value for the result of the containing computation expression, where that value itself comes from the result another computation expression. + Используется для обозначения вычислительного выражения, при вычислении которого выдается результат содержащего его вычислительного выражения. + + + + Used in query expressions to specify what fields or columns to extract. Note that this is a contextual keyword, which means that it is not actually a reserved word and it only acts like a keyword in appropriate context. + Используется в выражениях запроса для указания полей или столбцов для извлечения. Обратите внимание, что это контекстно-зависимое ключевое слово, то есть фактически оно не является зарезервированным словом и функционирует как ключевое слово только в соответствующем контексте. + + + + Used to indicate a method or property that can be called without an instance of a type, or a value member that is shared among all instances of a type. + Используется для обозначения метода или свойства, которые могут вызываться без экземпляра типа, или члена значения, общего для всех экземпляров типа. + + + + Used to declare a structure type. Also used in generic parameter constraints. Used for OCaml compatibility in module definitions. + Используется для объявления типа структуры. Также используется в ограничениях универсальных параметров. Используется для обеспечения совместимости с OCaml в определениях модулей. + + + + Used in conditional expressions. Also used to perform side effects after object construction. + Используется в условных выражениях. Также используется для выполнения побочных эффектов после создания объекта. + + + + Used in for loops to indicate a range. + Используется в циклах for для обозначения диапазона. + + + + Used to introduce a block of code that might generate an exception. Used together with with or finally. + Используется для введения блока кода, который может создать исключение. Используется вместе с with или finally. + + + + Used to declare a class, record, structure, discriminated union, enumeration type, unit of measure, or type abbreviation. + Используется для объявления класса, записи, структуры, размеченного объединения, типа перечисления, единицы измерения или аббревиатуры типа. + + + + Used to convert to a type that is higher in the inheritance chain. + Используется для преобразования в тип, который находится выше в цепочке наследования. + + + + Used instead of let for values that implement IDisposable" + Используется вместо let для значений, требующих вызова Dispose для освобождения ресурсов. + + + + Used instead of let! in computation expressions for computation expression results that implement IDisposable. + Используется вместо let! в асинхронных рабочих процессах и других вычислительных выражениях для значений, требующих вызова Dispose для освобождения ресурсов. + + + + Used in a signature to indicate a value, or in a type to declare a member, in limited situations. + Используется в сигнатуре для обозначения значения или в типе для объявления члена (в ограниченных ситуациях). + + + + Indicates the .NET void type. Used when interoperating with other .NET languages. + Обозначает тип void .NET. Используется при взаимодействии с другими языками .NET. + + + + Used for Boolean conditions (when guards) on pattern matches and to introduce a constraint clause for a generic type parameter. + Используется для логических условий (условий when) для сопоставлений шаблонов и для введения предложения ограничения для параметра универсального типа. + + + + Introduces a looping construct. + Вводит циклическую конструкцию. + + + + Used together with the match keyword in pattern matching expressions. Also used in object expressions, record copying expressions, and type extensions to introduce member definitions, and to introduce exception handlers. + Используется с ключевым словом match в выражениях сопоставления шаблонов. Также используется в выражениях объектов, выражениях копирования записей и расширениях типов для введения определений членов и обработчиков исключений. + + + + Used in a sequence expression to produce a value for a sequence. + Используется в выражении последовательности для получения значения для последовательности. + + + + Used in a computation expression to append the result of a given computation expression to a collection of results for the containing computation expression. + Используется в вычислительном выражении для добавления результата данного вычислительного выражения в набор результатов для содержащего его вычислительного выражения. + + + + In function types, delimits arguments and return values. Yields an expression (in sequence expressions); equivalent to the yield keyword. Used in match expressions + В типах функций разделяет аргументы и возвращаемые значения. Выдает выражение (в выражениях последовательности); эквивалентно ключевому слову yield. Используется в выражениях сопоставления. + + + + Assigns a value to a variable. + Назначает значение переменной. + + + + Converts a type to type that is higher in the hierarchy. + Преобразует тип в тип, находящийся выше в иерархии. + + + + Converts a type to a type that is lower in the hierarchy. + Преобразует тип в тип, находящийся ниже в иерархии. + + + + Delimits a typed code quotation. + Отделяет типизированную цитату кода. + + + + Delimits a untyped code quotation. + Отделяет нетипизированную цитату кода. + + + + {0} '{1}' not found in assembly '{2}'. A possible cause may be a version incompatibility. You may need to explicitly reference the correct version of this assembly to allow all referenced components to use the correct version. + {0} "{1}" не найден в сборке "{2}". Это может быть вызвано несовместимостью версий. Вам может потребоваться явно сослаться на правильную версию этой сборки, чтобы ее могли использовать все указанные в ссылке компоненты. + + + + {0} '{1}' not found in type '{2}' from assembly '{3}'. A possible cause may be a version incompatibility. You may need to explicitly reference the correct version of this assembly to allow all referenced components to use the correct version. + {0} "{1}" не найден в типе "{2}" из сборки "{3}". Это может быть вызвано несовместимостью версий. Вам может потребоваться явно сослаться на правильную версию этой сборки, чтобы ее могли использовать все указанные в ссылке компоненты. + + + + is + является + + + + This value is not a function and cannot be applied. + Это значение не является функцией, и применить его невозможно. + + + + This value is not a function and cannot be applied. Did you intend to access the indexer via {0}.[index] instead? + Это значение не является функцией, и применить его невозможно. Вы хотели обратиться к индексатору с помощью {0}.[индекс]? + + + + This expression is not a function and cannot be applied. Did you intend to access the indexer via expr.[index] instead? + Это выражение не является функцией, и применить его невозможно. Вы хотели обратиться к индексатору с помощью <выражение>.[индекс]? + + + + This value is not a function and cannot be applied. Did you forget to terminate a declaration? + Данное значение не является функцией и не может быть применено. Забыли завершить объявление? + + + + The argument names in the signature '{0}' and implementation '{1}' do not match. The argument name from the signature file will be used. This may cause problems when debugging or profiling. + Имена аргументов в сигнатуре "{0}" и реализации "{1}" не совпадают. Будет использоваться имя аргумента из файла сигнатуры. Это может вызвать проблемы при отладке или профилировании. + + + + An error occurred while reading the F# metadata of assembly '{0}'. A reserved construct was utilized. You may need to upgrade your F# compiler or use an earlier version of the assembly that doesn't make use of a specific construct. + Произошла ошибка при чтении метаданных F# сборки "{0}". Использовалась зарезервированная конструкция. Попробуйте обновить компилятор F# или применить более раннюю версию сборки, где конкретная конструкция не используется. + + + + This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. + Этот метод или свойство обычно не используется в коде F#. Вместо этого используйте явный шаблон кортежа для деконструкции. + + + + This expression returns a value of type '{0}' but is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to use the expression as a value in the sequence then use an explicit 'yield'. + Это выражение возвращает значение типа "{0}", но оно неявно отбрасывается. Чтобы привязать результат к какому-то имени, используйте "let", например: "let <результат> = <выражение>". Если вы собирались использовать выражение как значение в последовательности, используйте в явном виде "yield". + + + + This expression returns a value of type '{0}' but is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to use the expression as a value in the sequence then use an explicit 'yield!'. + Это выражение возвращает значение типа "{0}", но оно неявно отбрасывается. Чтобы привязать результат к какому-то имени, используйте "let", например: "let <результат> = <выражение>". Если вы собирались использовать выражение как значение в последовательности, используйте в явном виде "yield!". + + + + Used in computation expressions to pattern match directly over the result of another computation expression. + Используется в выражениях вычислений для сопоставления шаблонов непосредственно с результатом другого выражения вычислений. + + + + The file '{0}' changed on disk unexpectedly, please reload. + Файл "{0}" был неожиданно изменен на диске, повторите загрузку. + + + + The byref pointer is readonly, so this write is not permitted. + Указатель byref доступен только для чтения, поэтому операция записи запрещена. + + + + A value must be mutable in order to mutate the contents or take the address of a value type, e.g. 'let mutable x = ...' + Чтобы изменить содержимое или получить адрес типа значения, значение должно быть изменяемым, например, "let mutable x = ..." + + + + A ReadOnly attribute has been applied to a struct type with a mutable field. + Атрибут ReadOnly был применен к типу структуры с изменяемым полем. + + + + A byref pointer returned by a function or method is implicitly dereferenced as of F# 4.5. To acquire the return value as a pointer, use the address-of operator, e.g. '&f(x)' or '&obj.Method(arg1, arg2)'. + Указатель byref, возвращаемый функцией или методом, неявным образом разыменовывается в F# 4.5. Для получения возвращаемого значения в виде указателя используйте оператор address-of, например &f(x) или &obj.Method(arg1, arg2). + + + + A type annotated with IsByRefLike must also be a struct. Consider adding the [<Struct>] attribute to the type. + Тип с аннотацией IsByRefLike также должен быть структурой. Рекомендуется добавить к типу атрибут [<Struct>]. + + + + The address of the variable '{0}' or a related expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + На этом этапе невозможно использовать адрес переменной "{0}" или связанного выражения. В этом случае гарантируется, что адрес локального значения не обходит свою область. + + + + This value can't be assigned because the target '{0}' may refer to non-stack-local memory, while the expression being assigned is assessed to potentially refer to stack-local memory. This is to help prevent pointers to stack-bound memory escaping their scope. + Это значение не может быть назначено, так как целевой элемент "{0}" может ссылаться на отличную от локальной для стека память, тогда как назначаемое выражение оценивается как потенциально ссылающееся на локальную для стека память. В этом случае гарантируется, что указатели на привязанную к стеку память не обходят свою область. + + + + A value defined in a module must be mutable in order to take its address, e.g. 'let mutable x = ...' + Чтобы получить свой адрес, значение, определенное в модуле, должно быть изменяемым, например "let mutable x = ...". + + + + A type annotated with IsReadOnly must also be a struct. Consider adding the [<Struct>] attribute to the type. + Тип с аннотацией IsReadOnly также должен быть структурой. Рекомендуется добавить к типу атрибут [<Struct>]. + + + + Struct members cannot return the address of fields of the struct by reference + Члены структуры не могут возвращать адрес полей структуры по ссылке + + + + The function or method call cannot be used at this point, because one argument that is a byref of a non-stack-local Span or IsByRefLike type is used with another argument that is a stack-local Span or IsByRefLike type. This is to ensure the address of the local value does not escape its scope. + На этом этапе невозможно использовать вызов функции или метода, так как один аргумент, представляющий собой byref с отличным от локального для стека типом Span или IsByRefLike, используется с другим аргументом, имеющим локальный для стека тип Span или IsByRefLike. В этом случае гарантируется, что адрес локального значения не обходит свою область. + + + + The address of a value returned from the expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + На этом этапе невозможно использовать адрес значения, возвращаемого выражением. В этом случае гарантируется, что адрес локального значения не обходит свою область. + + + + The Span or IsByRefLike variable '{0}' cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + На этом этапе невозможно использовать переменную Span или IsByRefLike "{0}". В этом случае гарантируется, что адрес локального значения не обходит свою область. + + + + A Span or IsByRefLike value returned from the expression cannot be used at ths point. This is to ensure the address of the local value does not escape its scope. + На этом этапе невозможно использовать значение Span или IsByRefLike, возвращаемое выражением. В этом случае гарантируется, что адрес локального значения не обходит свою область. + + + + Cannot take the address of the value returned from the expression. Assign the returned value to a let-bound value before taking the address. + Невозможно получить адрес значения, возвращенного из выражения. Используйте возвращенное значение в качестве значения с привязкой let, прежде чем получить адрес. + + + + The Span or IsByRefLike expression cannot be returned from this function or method, because it is composed using elements that may escape their scope. + The Span or IsByRefLike expression cannot be returned from this function or method, because it is composed using elements that may escape their scope. + + + + This type does not inherit Attribute, it will not work correctly with other .NET languages. + This type does not inherit Attribute, it will not work correctly with other .NET languages. + + + + The exception '{0}' does not have a field named '{1}'. + The exception '{0}' does not have a field named '{1}'. + + + + The constructor does not have a field named '{0}'. + The constructor does not have a field named '{0}'. + + + + Active patterns do not have fields. This syntax is invalid. + Active patterns do not have fields. This syntax is invalid. + + + + + \ No newline at end of file diff --git a/src/fsharp/xlf/FSComp.txt.tr.xlf b/src/fsharp/xlf/FSComp.txt.tr.xlf new file mode 100644 index 00000000000..9c9f740dcb7 --- /dev/null +++ b/src/fsharp/xlf/FSComp.txt.tr.xlf @@ -0,0 +1,7087 @@ + + + + + + The namespace '{0}' is not defined. + '{0}' ad alanı tanımlı değil. + + + + The namespace or module '{0}' is not defined. + '{0}' ad alanı veya modülü tanımlı değil. + + + + The field, constructor or member '{0}' is not defined. + '{0}' alanı, oluşturucusu veya üyesi tanımlı değil. + + + + The value, constructor, namespace or type '{0}' is not defined. + '{0}' değeri, oluşturucusu, ad alanı veya türü tanımlı değil. + + + + The value or constructor '{0}' is not defined. + '{0}' değer veya oluşturucusu tanımlı değil. + + + + The value, namespace, type or module '{0}' is not defined. + '{0}' değeri, ad alanı, türü veya modülü tanımlı değil. + + + + The constructor, module or namespace '{0}' is not defined. + '{0}' oluşturucusu, modülü veya ad alanı tanımlı değil. + + + + The type '{0}' is not defined. + '{0}' türü tanımlı değil. + + + + The type '{0}' is not defined in '{1}'. + {0}' türü '{1}' içinde tanımlı değil. + + + + The record label or namespace '{0}' is not defined. + '{0}' kayıt etiketi veya ad alanı tanımlı değil. + + + + The record label '{0}' is not defined. + '{0}' kayıt etiketi tanımlı değil. + + + + Maybe you want one of the following: + Aşağıdakilerden birini arıyor olabilirsiniz: + + + + The type parameter {0} is not defined. + '{0}' tür parametresi tanımlı değil. + + + + The pattern discriminator '{0}' is not defined. + '{0}' desen ayrıştırıcısı tanımlı değil. + + + + Replace with '{0}' + '{0}' ile değiştir + + + + Add . for indexer access. + Dizin oluşturucu erişimi için . ekleyin. + + + + All elements of a list must be of the same type as the first element, which here is '{0}'. This element has type '{1}'. + Bir list constructor ifadesinin tüm öğeleri aynı türe sahip olmalıdır. Bu ifadenin '{0}' türünde olması bekleniyordu ancak burada '{1}' türünde. + + + + All elements of an array must be of the same type as the first element, which here is '{0}'. This element has type '{1}'. + Bir array constructor ifadesinin tüm öğeleri aynı türe sahip olmalıdır. Bu ifadenin '{0}' türünde olması bekleniyordu ancak burada '{1}' türünde. + + + + This 'if' expression is missing an 'else' branch. Because 'if' is an expression, and not a statement, add an 'else' branch which also returns a value of type '{0}'. + 'if' ifadesinde bir 'else' dalı eksik. 'then' dalı '{0}' türünde. 'if' bir ifade değil deyim olduğundan, aynı türde değer döndüren bir 'else' dalı eklemeniz gerekir. + + + + The 'if' expression needs to have type '{0}' to satisfy context type requirements. It currently has type '{1}'. + if' ifadesinin bağlam türü gereksinimlerini karşılayabilmesi için '{0}' türüne sahip olması gerekir. Şu anda '{1}' türüne sahip. + + + + All branches of an 'if' expression must return values of the same type as the first branch, which here is '{0}'. This branch returns a value of type '{1}'. + Bir 'if' ifadesinin tüm dalları aynı türe sahip olmalıdır. Bu ifadenin '{0}' türünde olması bekleniyordu ancak burada '{1}' türünde. + + + + All branches of a pattern match expression must return values of the same type as the first branch, which here is '{0}'. This branch returns a value of type '{1}'. + Bir desen eşleştirme ifadesinin tüm dalları aynı türdeki değerleri döndürmelidir. Birinci dal '{0}' türünde bir değer döndürdü ancak bu dal '{1}' türünde bir değer döndürdü. + + + + A pattern match guard must be of type 'bool', but this 'when' expression is of type '{0}'. + Bir desen eşleşmesi koruyucusunun 'bool' türünde olması gerekir, ancak bu 'when' ifadesi '{0}' türünde. + + + + A ';' is used to separate field values in records. Consider replacing ',' with ';'. + Kayıtlarda alan değerlerini ayırmak için ';' kullanılır. ',' karakterini ';' ile değiştirmeyi düşünün. + + + + The '!' operator is used to dereference a ref cell. Consider using 'not expr' here. + '!' operatörü bir ref hücresine başvurmak için kullanılır. Burada 'not expr' kullanmayı deneyin. + + + + The non-generic type '{0}' does not expect any type arguments, but here is given {1} type argument(s) + Genel olmayan '{0}' türü herhangi bir tür bağımsız değişkeni beklemez, ancak burada {1} tür bağımsız değişkenleri verilmiş + + + + Consider using 'return!' instead of 'return'. + 'return' yerine 'return!' kullanmayı deneyin. + + + + Consider using 'yield!' instead of 'yield'. + 'yield' yerine 'yield!' kullanmayı deneyin. + + + + \nA tuple type is required for one or more arguments. Consider wrapping the given arguments in additional parentheses or review the definition of the interface. + \nBir veya daha çok bağımsız değişken için demet türü gerekli. Verilen bağımsız değişkenleri ek parantezlerle sarmalamanız veya arabirimin tanımını gözden geçirmeniz önerilir. + + + + Invalid warning number '{0}' + Geçersiz uyarı numarası '{0}' + + + + Invalid version string '{0}' + Geçersiz sürüm dizesi '{0}' + + + + Invalid version file '{0}' + Geçersiz dosya sürümü '{0}' + + + + Microsoft (R) F# Compiler version {0} + Microsoft (R) F# Derleyicisi sürümü {0} + + + + F# Compiler for F# {0} + F# {0} için F# Derleyicisi + + + + Problem with filename '{0}': {1} + Dosya adında hata: '{0}': {1} + + + + No inputs specified + Bir giriş belirtilmedi + + + + The '--pdb' option requires the '--debug' option to be used + '--pdb' seçeneği '--debug' seçeneğinin kullanılmasını gerektirir + + + + The search directory '{0}' is invalid + Arama dizini '{0}' geçersiz + + + + The search directory '{0}' could not be found + Arama dizini '{0}' bulunamadı + + + + '{0}' is not a valid filename + '{0}' geçerli bir dosya adı değil + + + + '{0}' is not a valid assembly name + '{0}' geçerli bir bütünleştirilmiş kod adı değil + + + + Unrecognized privacy setting '{0}' for managed resource, valid options are 'public' and 'private' + Yönetilen kaynak için tanınmayan gizlilik ayarı '{0}'; geçerli seçenekler: 'public' ve 'private' + + + + Multiple references to '{0}.dll' are not permitted + Birden çok '{0}.dll' başvurusuna izin verilmiyor + + + + Could not read version from mscorlib.dll + Sürüm, mscorlib.dll'den okunamadı + + + + Unable to read assembly '{0}' + '{0}' bütünleştirilmiş kodu okunamıyor + + + + Assembly resolution failure at or near this location + Bu konumda veya yakınında bütünleştirilmiş kod çözme hatası + + + + The declarations in this file will be placed in an implicit module '{0}' based on the file name '{1}'. However this is not a valid F# identifier, so the contents will not be accessible from other files. Consider renaming the file or adding a 'module' or 'namespace' declaration at the top of the file. + Bu dosyadaki bildirimler, '{1}' dosya adı temelinde örtük '{0}' modülüne yerleştirilecek. Ancak bu geçerli bir F# tanımlayıcısı olmadığından, içeriğine diğer dosyalardan erişilemeyecek. Dosyayı yeniden adlandırmayı veya dosyanın başına 'modül' ya da 'ad alanı' bildirimi eklemeyi düşünün. + + + + Files in libraries or multiple-file applications must begin with a namespace or module declaration, e.g. 'namespace SomeNamespace.SubNamespace' or 'module SomeNamespace.SomeModule'. Only the last source file of an application may omit such a declaration. + Kitaplıklardaki veya çok dosyalı uygulamalardaki dosyalar ad alanı veya modül bildirimiyle başlamalıdır, örn. 'namespace SomeNamespace.SubNamespace' veya 'module SomeNamespace.SomeModule'. Bir uygulamanın yalnızca son kaynak dosyasında böyle bir bildirim atlanabilir. + + + + Files in libraries or multiple-file applications must begin with a namespace or module declaration. When using a module declaration at the start of a file the '=' sign is not allowed. If this is a top-level module, consider removing the = to resolve this error. + Kitaplıklar veya çok dosyalı uygulamalardaki dosyalar bir ad alanı veya modül bildirimiyle başlamalıdır. Bir dosyanın başında modül bildirimi kullanılırken '=' işaretine izin verilmez. Bu bir üst düzey modülse, bu hatayı çözmek için = işaretini kaldırmayı düşünün. + + + + This file contains multiple declarations of the form 'module SomeNamespace.SomeModule'. Only one declaration of this form is permitted in a file. Change your file to use an initial namespace declaration and/or use 'module ModuleName = ...' to define your modules. + Bu dosya, 'module SomeNamespace.SomeModule' formunun birden çok bildirimini içeriyor. Bir dosyada, bu formun yalnızca bir bildirimine izin verilir. Dosyanızı başlangıç ad alanı bildirimi kullanacak şekilde değiştirin ve/veya modüllerinizi tanımlamak için 'module ModuleName = ...' kullanın. + + + + Option requires parameter: {0} + Seçenek şu parametreyi gerektiriyor: {0} + + + + Source file '{0}' could not be found + Kaynak dosya '{0}' bulunamadı + + + + The file extension of '{0}' is not recognized. Source files must have extension .fs, .fsi, .fsx, .fsscript, .ml or .mli. + Dosya uzantısı '{0}' tanınmadı. Kaynak dosyaların uzantısı .fs, .fsi, .fsx, .fsscript, .ml veya .mli olmalıdır. + + + + Could not resolve assembly '{0}' + '{0}' bütünleştirilmiş kodu çözümlenemedi + + + + Could not resolve assembly '{0}' required by '{1}' + {1}' tarafından istenen '{0}' bütünleştirilmiş kodu çözümlenemedi + + + + Error opening binary file '{0}': {1} + {0}': {1} ikili dosyasını açma işleminde hata + + + + The F#-compiled DLL '{0}' needs to be recompiled to be used with this version of F# + F# ile derlenen '{0}' DLL dosyasının, F# dilinin bu sürümünde kullanılabilmesi için yeniden derlenmesi gerekiyor + + + + Invalid directive. Expected '#I \"<path>\"'. + Geçersiz yönerge. Beklenen: '#I \"<yol>\"'. + + + + Invalid directive. Expected '#r \"<file-or-assembly>\"'. + Geçersiz yönerge. Beklenen: '#r \"<dosya-veya-bütünleştirilmiş kod>\"'. + + + + Invalid directive. Expected '#load \"<file>\" ... \"<file>\"'. + Geçersiz yönerge. Beklenen: '#load \"<dosya>\" ... \"<dosya>\"'. + + + + Invalid directive. Expected '#time', '#time \"on\"' or '#time \"off\"'. + Geçersiz yönerge. Beklenen: '#time', '#time \"on\"' veya '#time \"off\"'. + + + + Directives inside modules are ignored + Modül içi yönergeler yoksayılır + + + + A signature for the file or module '{0}' has already been specified + '{0}' dosyasının veya modülünün imzası zaten belirtilmiş + + + + An implementation of file or module '{0}' has already been given. Compilation order is significant in F# because of type inference. You may need to adjust the order of your files to place the signature file before the implementation. In Visual Studio files are type-checked in the order they appear in the project file, which can be edited manually or adjusted using the solution explorer. + '{0}' dosyasını veya modülünü uygulama örneği zaten verildi. Tür çıkarımı nedeniyle F# dilinde derleme sırası önemlidir. Uygulamadan önce imza dosyasını yerleştirmek için dosyalarınızın sırasını ayarlamanız gerekebilir. Visual Studio'da dosyalar, el ile düzenlenebilen veya çözüm gezgini kullanılarak ayarlanabilen proje dosyasında göründükleri sırada türlerine göre denetlenir. + + + + An implementation of the file or module '{0}' has already been given + '{0}' dosyasını veya modülünü uygulama örneği zaten verildi + + + + The signature file '{0}' does not have a corresponding implementation file. If an implementation file exists then check the 'module' and 'namespace' declarations in the signature and implementation files match. + '{0}' imza dosyasında eşleşen bir uygulama dosyası yok. Bir uygulama dosyası varsa imza ve uygulama dosyalarındaki 'module' ve 'namespace' bildirimlerinin eşleştiğini kontrol edin. + + + + '{0}' is not a valid integer argument + '{0}' geçerli bir tamsayı bağımsız değişkeni değil + + + + '{0}' is not a valid floating point argument + '{0}' geçerli bir kayan nokta bağımsız değişkeni değil + + + + Unrecognized option: '{0}' + Tanınmayan seçenek: '{0}' + + + + Invalid module or namespace name + Geçersiz modül veya ad alanı adı + + + + Error reading/writing metadata for the F# compiled DLL '{0}'. Was the DLL compiled with an earlier version of the F# compiler? (error: '{1}'). + F# ile derlenmiş DLL '{0}' meta verilerini hatalı okuma/yazma. DLL, F# derleyicisinin önceki bir sürümüyle mi derlenmişti? (hata: '{1}'). + + + + The type/module '{0}' is not a concrete module or type + '{0}' türü/modülü somut bir modül veya tür değil + + + + The type '{0}' has an inline assembly code representation + '{0}' türünün satır içi bir bütünleştirilmiş kod kodu temsili var + + + + A namespace and a module named '{0}' both occur in two parts of this assembly + Bir ad alanı ve '{0}' adlı modülün ikisi birden bu bütünleştirilmiş kodun iki yerinde geçiyor + + + + Two modules named '{0}' occur in two parts of this assembly + '{0}' adlı iki modül bu bütünleştirilmiş kodun iki yerinde geçiyor + + + + Two type definitions named '{0}' occur in namespace '{1}' in two parts of this assembly + {0}' adlı iki tür tanımı bu bütünleştirilmiş kodun iki yerinde '{1}' ad alanında geçiyor + + + + A module and a type definition named '{0}' occur in namespace '{1}' in two parts of this assembly + {0}' adlı bir modül ve tür tanımı bu bütünleştirilmiş kodun iki yerinde '{1}' ad alanında geçiyor + + + + Invalid member signature encountered because of an earlier error + Önceki bir hata nedeniyle geçersiz üye imzasıyla karşılaşıldı + + + + This value does not have a valid property setter type + Bu değerin geçerli bir özellik ayarlayıcı türü yok + + + + Invalid form for a property getter. At least one '()' argument is required when using the explicit syntax. + Özellik alıcı için geçersiz biçim. Açık sözdizimini kullanırken en az bir '()' bağımsız değişkeni gereklidir. + + + + Invalid form for a property setter. At least one argument is required. + Özellik ayarlayıcı için geçersiz biçim. En az bir bağımsız değişken gereklidir. + + + + Unexpected use of a byref-typed variable + Beklenmeyen byref olarak belirtilmiş değişken kullanımı + + + + Invalid mutation of a constant expression. Consider copying the expression to a mutable local, e.g. 'let mutable x = ...'. + Sabit ifadesinin geçersiz olarak değiştirilmesi. İfadeyi değiştirilebilir bir yerel değere kopyalamayı düşünün, örn. 'let mutable x = ...'. + + + + The value has been copied to ensure the original is not mutated by this operation or because the copy is implicit when returning a struct from a member and another member is then accessed + Bu işlemin özgün değeri değiştirmemesi veya bir üyeden yapı döndürülürken başka bir üyeye erişildiğinde kopyalanmış değer örtük olduğu için, değer kopyalandı + + + + Recursively defined values cannot appear directly as part of the construction of a tuple value within a recursive binding + Özyinelemeli tanımlanmış değerler özyinelemeli bir bağlama içinde demet değer oluşumunun parçası olarak doğrudan görünemez + + + + Recursive values cannot appear directly as a construction of the type '{0}' within a recursive binding. This feature has been removed from the F# language. Consider using a record instead. + Özyinelemeli değerler, özyinelemeli bir bağlama içinde '{0}' türünün doğrudan oluşturulması olarak görünemez. Bu özellik F# dilinden kaldırılmıştır. Onun yerine bir kayıt kullanmayı düşünün. + + + + Recursive values cannot be directly assigned to the non-mutable field '{0}' of the type '{1}' within a recursive binding. Consider using a mutable field instead. + Özyinelemeli değerler, özyinelemeli bir bağlama içinde '{1}' türünün değiştirilemeyen '{0}' alanına dorudan atanamaz. Onun yerine değiştirilebilir alan kullanmayı düşünün. + + + + Unexpected decode of AutoOpenAttribute + Beklenmeyen AutoOpenAttribute kod çözümü + + + + Unexpected decode of InternalsVisibleToAttribute + Beklenmeyen InternalsVisibleToAttribute kod çözümü + + + + Unexpected decode of InterfaceDataVersionAttribute + Beklenmeyen InterfaceDataVersionAttribute kod çözümü + + + + Active patterns cannot return more than 7 possibilities + Etkin desenler 7 olasılıktan fazlasını döndüremez + + + + This is not a valid constant expression or custom attribute value + Bu geçerli bir sabit ifade veya özel öznitelik değeri değil + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe mutability attributes differ + {0}' modülü\n {1} \niçeriyor ancak imzasında\n {2} \nbelirtiliyor. Değişebilirlik öznitelikleri farklı + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe names differ + {0}' modülü\n {1} \niçeriyor ancak imzasında\n {2} \nbelirtiliyor. Adlar farklı + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe compiled names differ + {0}' modülü\n {1} \niçeriyor ancak imzasında\n {2} \nbelirtiliyor. Derlenen adlar farklı + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe display names differ + {0}' modülü\n {1} \niçeriyor ancak imzasında\n {2} \nbelirtiliyor. Görünen adlar farklı + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe accessibility specified in the signature is more than that specified in the implementation + {0}' modülü\n {1} \niçeriyor ancak imzasında\n {2} \nbelirtiliyor. İmzada belirtilen erişilebilirlik uygulamada belirtilenden daha fazla + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe inline flags differ + {0}' modülü\n {1} \niçeriyor ancak imzasında\n {2} \nbelirtiliyor. Satır içi bayraklar farklı + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe literal constant values and/or attributes differ + {0}' modülü\n {1} \niçeriyor ancak imzasında\n {2} \nbelirtiliyor. Sabit değerler ve/veya öznitelikler farklı + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is a type function and the other is not. The signature requires explicit type parameters if they are present in the implementation. + {0}' modülü\n {1} \niçeriyor ancak imzasında\n {2} \nbelirtiliyor. Biri tür işlevi, diğeri değil. Açık tür parametreleri uygulamada varsa imza için bunlar gerekiyor. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe respective type parameter counts differ + {0}' modülü\n {1} \niçeriyor ancak imzasında\n {2} \nbelirtiliyor. İlgili tür parametresi sayıları farklı + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe types differ + {0}' modülü\n {1} \niçeriyor ancak imzasında\n {2} \nbelirtiliyor. Türler farklı + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is an extension member and the other is not + {0}' modülü\n {1} \niçeriyor ancak imzasında\n {2} \nbelirtiliyor. Biri uzantı üyesi, diğeri değil + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nAn arity was not inferred for this value + {0}' modülü\n {1} \niçeriyor ancak imzasında\n {2} \nbelirtiliyor. Bu değer için parametre sayısı çıkarılmadı + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe number of generic parameters in the signature and implementation differ (the signature declares {3} but the implementation declares {4} + {0}' modülü\n {1} \niçeriyor ancak imzasında\n {2} \nbelirtiliyor. İmzadaki ve uygulamadaki genel parametrelerin sayısı farklı (imzada {3}, ancak uygulamada {4} tanımlanıyor + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe generic parameters in the signature and implementation have different kinds. Perhaps there is a missing [<Measure>] attribute. + '{0}' modülü\n {1} \niçeriyor ancak imzasında\n {2} \nbelirtiliyor. İmzadaki ve uygulamadaki genel parametrelerin çeşitleri farklı. Eksik bir [<Measure>] özniteliği olabilir. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe arities in the signature and implementation differ. The signature specifies that '{3}' is function definition or lambda expression accepting at least {4} argument(s), but the implementation is a computed function value. To declare that a computed function value is a permitted implementation simply parenthesize its type in the signature, e.g.\n\tval {5}: int -> (int -> int)\ninstead of\n\tval {6}: int -> int -> int. + {0}' modülü\n {1} \niçeriyor ancak imzasında\n {2} \nbelirtiliyor. İmzadaki parametre sayısı ile uygulamadaki farklı. İmzada '{3}' öğesinin en az {4} bağımsız değişken kabul eden bir işlem tanımı veya lambda ifadesi olduğu belirtiliyor, ancak uygulama hesaplanan bir işlev değeri. Hesaplanan işlev değerinin izin verilen bir uygulama olduğunu tanımlamak için imzada türünü ayraç içine almak yeterlidir, örn.\n\tval {6}: int -> int -> int\nyerine\n\tval {5}: int -> (int -> int). + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe CLI member names differ + {0}' modülü\n {1} \niçeriyor ancak imzasında\n {2} \nbelirtiliyor. CLI üye adları farklı + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is static and the other isn't + {0}' modülü\n {1} \niçeriyor ancak imzasında\n {2} \nbelirtiliyor. Biri statik, diğeri değil + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is virtual and the other isn't + {0}' modülü\n {1} \niçeriyor ancak imzasında\n {2} \nbelirtiliyor. Biri sanal, diğeri değil + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is abstract and the other isn't + {0}' modülü\n {1} \niçeriyor ancak imzasında\n {2} \nbelirtiliyor. Biri soyut, diğeri değil + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is final and the other isn't + {0}' modülü\n {1} \niçeriyor ancak imzasında\n {2} \nbelirtiliyor. Biri nihai, diğeri değil + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is marked as an override and the other isn't + {0}' modülü\n {1} \niçeriyor ancak imzasında\n {2} \nbelirtiliyor. Biri geçersiz kılma olarak işaretlenmiş, diğeri işaretlenmemiş + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is a constructor/property and the other is not + {0}' modülü\n {1} \niçeriyor ancak imzasında\n {2} \nbelirtiliyor. Biri oluşturucu/özellik, diğeri değil + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe compiled representation of this method is as a static member but the signature indicates its compiled representation is as an instance member + {0}' modülü\n {1} \niçeriyor ancak imzasında\n {2} \nbelirtiliyor. Bu metodun derlenen temsili statik üye olarak gösteriliyor ancak imzada derlenmiş gösterim örnek üye olarak belirtiliyor + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe compiled representation of this method is as an instance member, but the signature indicates its compiled representation is as a static member + {0}' modülü\n {1} \niçeriyor ancak imzasında\n {2} \nbelirtiliyor. Bu metodun derlenen gösterimi örnek üye olarak verilmiş, ancak imzada derlenen gösterim statik üye olarak belirtiliyor + + + + The {0} definitions in the signature and implementation are not compatible because the names differ. The type is called '{1}' in the signature file but '{2}' in implementation. + Adları farklı olduğundan, imza ve uygulamadaki {0} tanımları uyumlu değil. Türün adı, imzada '{1}' olmasına rağmen uygulamada '{2}'. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the respective type parameter counts differ + İlgili tür parametresi sayıları farklı olduğundan, imza ve uygulamadaki '{1}' türü için {0} tanımları uyumlu değil + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the accessibility specified in the signature is more than that specified in the implementation + İmzada belirtilen erişilebilirlik uygulamada belirtilenden daha fazla olduğundan, imza ve uygulamadaki '{1}' türü için {0} tanımları uyumlu değil + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature requires that the type supports the interface {2} but the interface has not been implemented + İmzanın, türün {2} arabirimini desteklemesini gerektirmesine rağmen arabirim uygulanmadığından, imza ve uygulamadaki '{1}' türü için {0} tanımları uyumlu değil + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation says this type may use nulls as a representation but the signature does not + Uygulamada bu türün temsil olarak null değerleri kullanabileceği belirtilmesine rağmen imzada bu belirtmediğinden, imza ve uygulamadaki '{1}' türü için {0} tanımları uyumlu değil + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation says this type may use nulls as an extra value but the signature does not + Uygulamada bu türün ek değer olarak null değerleri kullanabileceği belirtilmesine rağmen imzada bu belirtmediğinden, imza ve uygulamadaki '{1}' türü için {0} tanımları uyumlu değil + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature says this type may use nulls as a representation but the implementation does not + İmzada bu türün temsil olarak null değerleri kullanabileceği belirtilmesine rağmen uygulamada bu belirtilmediğinden, imza ve uygulamadaki '{1}' türü için {0} tanımları uyumlu değil + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature says this type may use nulls as an extra value but the implementation does not + İmzada bu türün ek değer olarak null değerleri kullanabileceği belirtilmesine rağmen uygulamada bu belirtilmediğinden, imza ve uygulamadaki '{1}' türü için {0} tanımları uyumlu değil + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation type is sealed but the signature implies it is not. Consider adding the [<Sealed>] attribute to the signature. + Uygulama türü mühürlü olmasına rağmen imza korumalı olmadığını belirttiğinden, imza ve uygulamadaki '{1}' türü için {0} tanımları uyumlu değil. İmzaya [<Sealed>] özniteliğini eklemeyi düşünün. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation type is not sealed but signature implies it is. Consider adding the [<Sealed>] attribute to the implementation. + Uygulama türü mühürlü olmamasına rağmen imza korumalı olduğunu belirttiğinden, imza ve uygulamadaki '{1}' türü için {0} tanımları uyumlu değil. Uygulamaya [<Sealed>] özniteliğini eklemeyi düşünün. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation is an abstract class but the signature is not. Consider adding the [<AbstractClass>] attribute to the signature. + Uygulama bir soyut sınıf olmasına rağmen imza soyut sınıf olmadığından, imza ve uygulamadaki '{1}' türü için {0} tanımları uyumlu değil. İmzaya [<AbstractClass>] özniteliğini eklemeyi düşünün. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature is an abstract class but the implementation is not. Consider adding the [<AbstractClass>] attribute to the implementation. + İmza bir soyut sınıf olmasına rağmen uygulama soyut sınıf olmadığından, imza ve uygulamadaki '{1}' türü için {0} tanımları uyumlu değil. Uygulamaya [<AbstractClass>] özniteliğini eklemeyi düşünün. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the types have different base types + Türler farklı temel türlere sahip olduğundan, imza ve uygulamadaki '{1}' türü için {0} tanımları uyumlu değil + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the number of {2}s differ + {2} sayıları farklı olduğundan, imza ve uygulamadaki '{1}' türü için {0} tanımları uyumlu değil + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature defines the {2} '{3}' but the implementation does not (or does, but not in the same order) + İmzada '{3}' adlı {2} tanımlanmasına rağmen uygulamada tanımlanmadığından (veya farklı sırayla tanımlandığından), imza ve uygulamadaki '{1}' türü için {0} tanımları uyumlu değil + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation defines the {2} '{3}' but the signature does not (or does, but not in the same order) + Uygulamada '{3}' adlı {2} tanımlanmasına rağmen imzada tanımlanmadığından (veya farklı sırada tanımlandığından), imza ve uygulamadaki '{1}' türü için {0} tanımları uyumlu değil + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation defines a struct but the signature defines a type with a hidden representation + Uygulamada bir struct tanımlanmasına rağmen imzada gizli temsili olan bir tür tanımlandığından, imza ve uygulamadaki '{1}' türü için {0} tanımları uyumlu değil + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because a CLI type representation is being hidden by a signature + Bir CLI tür temsili imza ile gizlendiğinden, imza ve uygulamadaki '{1}' türü için {0} tanımları uyumlu değil + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because a type representation is being hidden by a signature + Bir tür temsili imza ile gizlendiğinden, imza ve uygulamadaki '{1}' türü için {0} tanımları uyumlu değil + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the types are of different kinds + Türler farklı çeşitlerde olduğundan, imza ve uygulamadaki '{1}' türü için {0} tanımları uyumlu değil + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the IL representations differ + IL temsilleri farklı olduğundan, imza ve uygulamadaki '{1}' türü için {0} tanımları uyumlu değil + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the representations differ + Temsiller farklı olduğundan, imza ve uygulamadaki '{1}' türü için {0} tanımları uyumlu değil + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the field {2} was present in the implementation but not in the signature + {2} alanı uygulamada mevcut olmasına rağmen imzada mevcut olmadığından, imza ve uygulamadaki '{1}' türü için {0} tanımları uyumlu değil + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the order of the fields is different in the signature and implementation + Alanların sırası imzada ve uygulamada farklı olduğundan, imza ve uygulamadaki '{1}' türü için {0} tanımları uyumlu değil + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the field {2} was required by the signature but was not specified by the implementation + {2} alanı imza için gerekmesine rağmen uygulama tarafından belirtilmediğinden, imza ve uygulamadaki '{1}' türü için {0} tanımları uyumlu değil + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the field '{2}' was present in the implementation but not in the signature. Struct types must now reveal their fields in the signature for the type, though the fields may still be labelled 'private' or 'internal'. + {2}' alanı uygulamada mevcut olmasına rağmen imzada mevcut olmadığından, imza ve uygulamadaki '{1}' türü için {0} tanımları uyumlu değil. Struct türleri artık tür imzasında alanlarını göstermelidir, ancak bu alanlar yine de 'private' veya 'internal' olarak etiketlenebilir. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the abstract member '{2}' was required by the signature but was not specified by the implementation + {2}' soyut üyesi imza için gerekmesine rağmen uygulama tarafından belirtilmediğinden, imza ve uygulamadaki '{1}' türü için {0} tanımları uyumlu değil + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the abstract member '{2}' was present in the implementation but not in the signature + {2}' soyut üyesi uygulamada mevcut olmasına rağmen imzada mevcut olmadığından, imza ve uygulamadaki '{1}' türü için {0} tanımları uyumlu değil + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature declares a {2} while the implementation declares a {3} + İmzada {2} bildirilirken uygulamada {3} bildirildiğinden, imza ve uygulamadaki '{1}' türü için {0} tanımları uyumlu değil + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the abbreviations differ: {2} versus {3} + Kısaltmalar farklı olduğundan ({2} ve {3}), imza ve uygulamadaki '{1}' türü için {0} tanımları uyumlu değil + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because an abbreviation is being hidden by a signature. The abbreviation must be visible to other CLI languages. Consider making the abbreviation visible in the signature. + Bir kısaltma imza ile gizlendiğinden, imza ve uygulamadaki '{1}' türü için {0} tanımları uyumlu değil. Kısaltmanın diğer CLI dilleri tarafından görünebilir olması gerekir. Kısaltmayı imzada görünür yapmayı düşünün. + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature has an abbreviation while the implementation does not + İmzanın kısaltması olmasına rağmen uygulamanın olmadığından, imza ve uygulamadaki '{1}' türü için {0} tanımları uyumlu değil + + + + The module contains the constructor\n {0} \nbut its signature specifies\n {1} \nThe names differ + Modül\n {0} \noluşturucusunu içeriyor ancak imzasında\n {1} \nbelirtiliyor. Adlar farklı + + + + The module contains the constructor\n {0} \nbut its signature specifies\n {1} \nThe respective number of data fields differ + Modül\n {0} \noluşturucusunu içeriyor ancak imzasında\n {1} \nbelirtiliyor. İlgili veri alanı sayısı farklı + + + + The module contains the constructor\n {0} \nbut its signature specifies\n {1} \nThe types of the fields differ + Modül\n {0} \noluşturucusunu içeriyor ancak imzasında\n {1} \nbelirtiliyor. Alanların türleri farklı + + + + The module contains the constructor\n {0} \nbut its signature specifies\n {1} \nthe accessibility specified in the signature is more than that specified in the implementation + Modül\n {0} \noluşturucusunu içeriyor ancak imzasında\n {1} \nbelirtiliyor; imzada belirtilen erişilebilirlik uygulamada belirtilenden daha fazla + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe names differ + Modül\n {0} \nalanını içeriyor ancak imzasında\n {1} \nbelirtiliyor. Adlar farklı + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nthe accessibility specified in the signature is more than that specified in the implementation + Modül\n {0} \nalanını içeriyor ancak imzasında\n {1} \nbelirtiliyor; imzada belirtilen erişilebilirlik uygulamada belirtilenden daha fazla + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe 'static' modifiers differ + Modül\n {0} \nalanını içeriyor ancak imzasında\n {1} \nbelirtiliyor. 'static' değiştiricileri farklı + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe 'mutable' modifiers differ + Modül\n {0} \nalanını içeriyor ancak imzasında\n {1} \nbelirtiliyor. 'mutable' değiştiricileri farklı + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe 'literal' modifiers differ + Modül\n {0} \nalanını içeriyor ancak imzasında\n {1} \nbelirtiliyor. 'literal' değiştiricileri farklı + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe types differ + Modül\n {0} \nalanını içeriyor ancak imzasında\n {1} \nbelirtiliyor. Türler farklı + + + + The implicit instantiation of a generic construct at or near this point could not be resolved because it could resolve to multiple unrelated types, e.g. '{0}' and '{1}'. Consider using type annotations to resolve the ambiguity + Genel yapının bu konumda veya yakınında örtük olarak örneklenmesi çözümlenemedi, çünkü ilişkisiz birden çok türe çözümlenebiliyordu, örn. '{0}' ve '{1}'. Belirsizliği çözümlemek için tür ek açıklamaları kullanmayı düşünün + + + + Could not resolve the ambiguity inherent in the use of a 'printf'-style format string + 'printf' stilindeki biçim dizesinin kullanılmasına bulunan belirsizlik çözümlenemedi. + + + + Could not resolve the ambiguity in the use of a generic construct with an 'enum' constraint at or near this position + Bu konumda veya yakınında 'enum' kısıtlaması olan bir genel yapının kullanımındaki belirsizlik çözümlenemedi + + + + Could not resolve the ambiguity in the use of a generic construct with a 'delegate' constraint at or near this position + Bu konumda veya yakınında 'delegate' kısıtlaması olan bir genel yapının kullanımındaki belirsizlik çözümlenemedi + + + + Invalid value + Geçersiz değer + + + + The signature and implementation are not compatible because the respective type parameter counts differ + İlgili tür parametresi sayıları farklı olduğu için imza ve uygulama uyumlu değil + + + + The signature and implementation are not compatible because the type parameter in the class/signature has a different compile-time requirement to the one in the member/implementation + Sınıf/imzadaki tür parametresinin üye/uygulama içindekinden farklı bir derleme zamanı gereksinimi olduğu için imza ve uygulama uyumlu değil + + + + The signature and implementation are not compatible because the declaration of the type parameter '{0}' requires a constraint of the form {1} + {0}' tür parametresinin bildirimi {1} biçiminin kısıtlamasını gerektirdiği için imza ve uygulama uyumlu değil + + + + The signature and implementation are not compatible because the type parameter '{0}' has a constraint of the form {1} but the implementation does not. Either remove this constraint from the signature or add it to the implementation. + {0}' tür parametresinde {1} biçiminde bir kısıtlama olmasına karşın uygulamada olmadığı için imza ve uygulama uyumlu değil. Bu kısıtlamayı ya imzadan kaldırın ya da uygulamaya ekleyin. + + + + The type '{0}' implements 'System.IComparable'. Consider also adding an explicit override for 'Object.Equals' + '{0}' türü 'System.IComparable' metodunu uyguluyor. Ayrıca 'Object.Equals' için açık bir geçersiz kılma eklemeyi düşünün + + + + The type '{0}' implements 'System.IComparable' explicitly but provides no corresponding override for 'Object.Equals'. An implementation of 'Object.Equals' has been automatically provided, implemented via 'System.IComparable'. Consider implementing the override 'Object.Equals' explicitly + '{0}' türü 'System.IComparable' metodunu açık olarak uyguluyor ancak 'Object.Equals' için buna karşılık gelen bir geçersiz kılma sağlamıyor. 'System.IComparable' aracılığıyla uygulanan 'Object.Equals' metodunun uygulaması otomatik olarak sağlandı. 'Object.Equals' geçersiz kılma işlemini açık olarak uygulamayı düşünün + + + + The struct, record or union type '{0}' has an explicit implementation of 'Object.GetHashCode' or 'Object.Equals'. You must apply the 'CustomEquality' attribute to the type + '{0}' yapı, kayıt veya birleşim türünde açık 'Object.GetHashCode' veya 'Object.Equals' uygulaması var. Türe 'CustomEquality' özniteliğini uygulamanız gerekiyor + + + + The struct, record or union type '{0}' has an explicit implementation of 'Object.GetHashCode'. Consider implementing a matching override for 'Object.Equals(obj)' + '{0}' yapı, kayıt veya birleşim türünde açık 'Object.GetHashCode' uygulaması var. 'Object.Equals(obj)' için bununla eşleşen bir geçersiz kılma uygulamayı düşünün + + + + The struct, record or union type '{0}' has an explicit implementation of 'Object.Equals'. Consider implementing a matching override for 'Object.GetHashCode()' + '{0}' yapı, kayıt veya birleşim türünde açık 'Object.Equals' uygulaması var. 'Object.GetHashCode()' için bununla eşleşen bir geçersiz kılma uygulamayı düşünün + + + + The exception definitions are not compatible because a CLI exception mapping is being hidden by a signature. The exception mapping must be visible to other modules. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1} + CLI özel durum eşlemesi imza aracılığıyla gizlendiği için özel durum tanımları uyumlu değil. Özel durum eşlemesi diğer modüllere görünmelidir. Modül,\n {0} \nözel durum tanımını içeriyor ancak imzasında\n\t{1} belirtiliyor. + + + + The exception definitions are not compatible because the CLI representations differ. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1} + CLI temsilleri farklı olduğu için özel durum tanımları uyumlu değil. Modül,\n {0} \nözel durum tanımını içeriyor ancak imzasında\n\t{1} belirtiliyor + + + + The exception definitions are not compatible because the exception abbreviation is being hidden by the signature. The abbreviation must be visible to other CLI languages. Consider making the abbreviation visible in the signature. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1}. + Özel durum kısaltması imza tarafından gizlendiği için özel durum tanımları uyumlu değil. Kısaltmanın diğer CLI dillerine görünmesi gerekir. Bu kısaltmayı imzada görünür yapmayı düşünün. Modül,\n {0} \nözel durum tanımını içeriyor ancak imzasında\n\t{1} belirtiliyor. + + + + The exception definitions are not compatible because the exception abbreviations in the signature and implementation differ. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1}. + Özel durum kısaltmaları imza ve uygulamada farklı olduğu için özel durum tanımları uyumlu değil. Modül,\n {0} \nözel durum tanımını içeriyor ancak imzasında\n\t{1} belirtiliyor. + + + + The exception definitions are not compatible because the exception declarations differ. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1}. + Özel durum bildirimleri farklı olduğu için özel durum tanımları uyumlu değil. Modül,\n {0} \nözel durum tanımını içeriyor ancak imzasında\n\t{1} belirtiliyor. + + + + The exception definitions are not compatible because the field '{0}' was required by the signature but was not specified by the implementation. The module contains the exception definition\n {1} \nbut its signature specifies\n\t{2}. + {0}' alanı imza için gerekmesine karşın uygulama tarafından belirtilmediği için özel durum tanımları uyumlu değil. Modül,\n {1} \nözel durum tanımını içeriyor ancak imzasında\n\t{2} belirtiliyor. + + + + The exception definitions are not compatible because the field '{0}' was present in the implementation but not in the signature. The module contains the exception definition\n {1} \nbut its signature specifies\n\t{2}. + {0}' alanı uygulamada olup imzada olmadığı için özel durum tanımları uyumlu değil. Modül,\n {1} \nözel durum tanımını içeriyor ancak imzasında\n\t{2} belirtiliyor. + + + + The exception definitions are not compatible because the order of the fields is different in the signature and implementation. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1}. + Alanların sırası imza ve uygulamada farklı olduğu için özel durum tanımları uyumlu değil. Modül,\n {0} \nözel durum tanımını içeriyor ancak imzasında\n\t{1} belirtiliyor. + + + + The namespace or module attributes differ between signature and implementation + Ad alanı veya modül öznitelikleri imza ile uygulama arasında farklılık gösteriyor + + + + This method is over-constrained in its type parameters + Bu metot tür parametrelerinde aşırı kısıtlanmış + + + + No implementations of '{0}' had the correct number of arguments and type parameters. The required signature is '{1}'. + Hiçbir '{0}' uygulamasında doğru sayıda bağımsız değişken ve tür parametresi yoktu. Gereken imza: '{1}'. + + + + The override for '{0}' was ambiguous + '{0}' geçersiz kılma işlemi belirsizdi + + + + More than one override implements '{0}' + Birden fazla geçersiz kılma '{0}' uyguluyor + + + + The method '{0}' is sealed and cannot be overridden + '{0}' metodu mühürlü olduğundan geçersiz kılınamaz + + + + The override '{0}' implements more than one abstract slot, e.g. '{1}' and '{2}' + {0}' geçersiz kılma işlemi birden fazla soyut yuva uyguluyor, örn. '{1}' ve '{2}' + + + + Duplicate or redundant interface + Yinelenen veya gereksiz arabirim + + + + The interface '{0}' is included in multiple explicitly implemented interface types. Add an explicit implementation of this interface. + '{0}' arabirimi, birden fazla açık olarak uygulanan arabirim türüne eklenmiş. Bu arabirimin açık uygulamasını ekleyin. + + + + A named argument has been assigned more than one value + Adlandırılmış bir bağımsız değişken birden fazla değere atanmış + + + + No implementation was given for '{0}' + '{0}' için bir uygulama verilmedi + + + + No implementation was given for '{0}'. Note that all interface members must be implemented and listed under an appropriate 'interface' declaration, e.g. 'interface ... with member ...'. + '{0}' için bir uygulama verilmedi. Tüm arabirim üyelerinin uygulanması ve uygun bir 'interface' bildirimi, örn. 'interface ... with member ...' altında listelenmesi gerektiğine dikkat edin. + + + + The member '{0}' does not have the correct number of arguments. The required signature is '{1}'. + Üye '{0}', doğru sayıda bağımsız değişkene sahip değil. Gereken imza: '{1}'. + + + + The member '{0}' does not have the correct number of method type parameters. The required signature is '{1}'. + Üye '{0}', doğru sayıda metot türü parametresine sahip değil. Gereken imza: '{1}'. + + + + The member '{0}' does not have the correct kinds of generic parameters. The required signature is '{1}'. + Üye '{0}', doğru tür genel parametrelere sahip değil. Gereken imza: '{1}'. + + + + The member '{0}' cannot be used to implement '{1}'. The required signature is '{2}'. + Üye '{0}', '{1}' uygulamak için kullanılamaz. Gerekli imza: '{2}'. + + + + Error while parsing embedded IL + Gömülü IL ayrıştırılırken hata oluştu + + + + Error while parsing embedded IL type + Gömülü IL türü ayrıştırılırken hata oluştu + + + + This indexer notation has been removed from the F# language + Bu dizin erişimcisi gösterimi F# dilinden kaldırıldı + + + + Invalid expression on left of assignment + Atamanın solunda geçersiz ifade + + + + The 'ReferenceEquality' attribute cannot be used on structs. Consider using the 'StructuralEquality' attribute instead, or implement an override for 'System.Object.Equals(obj)'. + 'ReferenceEquality' özniteliği struct öğelerinde kullanılamaz. Onun yerine 'StructuralEquality' özniteliğini kullanın veya 'System.Object.Equals(obj)' için geçersiz kılma uygulayın. + + + + This type uses an invalid mix of the attributes 'NoEquality', 'ReferenceEquality', 'StructuralEquality', 'NoComparison' and 'StructuralComparison' + Bu tür, 'NoEquality', 'ReferenceEquality', 'StructuralEquality', 'NoComparison' ve 'StructuralComparison' özniteliklerini geçersiz bir karışımda kullanıyor + + + + The 'NoEquality' attribute must be used in conjunction with the 'NoComparison' attribute + 'NoEquality' özniteliği, 'NoComparison' özniteliği ile bağlantılı kullanılmalıdır + + + + The 'StructuralComparison' attribute must be used in conjunction with the 'StructuralEquality' attribute + 'StructuralComparison' özniteliği, 'StructuralEquality' özniteliği ile bağlantılı kullanılmalıdır + + + + The 'StructuralEquality' attribute must be used in conjunction with the 'NoComparison' or 'StructuralComparison' attributes + 'StructuralEquality' özniteliği, 'NoComparison' veya 'StructuralComparison' öznitelikleriyle bağlantılı kullanılmalıdır + + + + A type cannot have both the 'ReferenceEquality' and 'StructuralEquality' or 'StructuralComparison' attributes + Bir türde 'ReferenceEquality' ile 'StructuralEquality' veya 'StructuralComparison' öznitelikleri aynı anda olamaz + + + + Only record, union, exception and struct types may be augmented with the 'ReferenceEquality', 'StructuralEquality' and 'StructuralComparison' attributes + Yalnızca kayıt, birleşim, özel durum ve yapı türleri 'ReferenceEquality', 'StructuralEquality' ve 'StructuralComparison' öznitelikleriyle büyütülebilir + + + + A type with attribute 'ReferenceEquality' cannot have an explicit implementation of 'Object.Equals(obj)', 'System.IEquatable<_>' or 'System.Collections.IStructuralEquatable' + 'ReferenceEquality' özniteliği olan bir türde, 'Object.Equals(obj)', 'System.IEquatable<_>' veya 'System.Collections.IStructuralEquatable' metotları açık olarak uygulanmış olamaz + + + + A type with attribute 'CustomEquality' must have an explicit implementation of at least one of 'Object.Equals(obj)', 'System.IEquatable<_>' or 'System.Collections.IStructuralEquatable' + 'CustomEquality' özniteliği olan bir türde, 'Object.Equals(obj)', 'System.IEquatable<_>' veya 'System.Collections.IStructuralEquatable' metotlarından en az biri açık olarak uygulanmış olmalıdır + + + + A type with attribute 'CustomComparison' must have an explicit implementation of at least one of 'System.IComparable' or 'System.Collections.IStructuralComparable' + 'CustomComparison' özniteliği olan bir türde, 'System.IComparable' veya 'System.Collections.IStructuralComparable' yöntemlerinden en az biri açık olarak uygulanmış olmalıdır + + + + A type with attribute 'NoEquality' should not usually have an explicit implementation of 'Object.Equals(obj)'. Disable this warning if this is intentional for interoperability purposes + 'NoEquality' özniteliği olan bir türde, genellikle açık olarak uygulanmış 'Object.Equals(obj)' metodu olmamalıdır. Bu birlikte çalışabilme amacıyla bilerek yapılmışsa bu uyarıyı devre dışı bırakın + + + + A type with attribute 'NoComparison' should not usually have an explicit implementation of 'System.IComparable', 'System.IComparable<_>' or 'System.Collections.IStructuralComparable'. Disable this warning if this is intentional for interoperability purposes + 'NoComparison' özniteliği olan bir türde, genellikle açık olarak uygulanmış 'System.IComparable', 'System.IComparable<_>' veya 'System.Collections.IStructuralComparable' yöntemleri olmamalıdır. Bu birlikte çalışabilme amacıyla bilerek yapılmışsa bu uyarıyı devre dışı bırakın + + + + The 'CustomEquality' attribute must be used in conjunction with the 'NoComparison' or 'CustomComparison' attributes + 'CustomEquality' özniteliği, 'NoComparison' veya 'CustomComparison' öznitelikleri ile bağlantılı kullanılmalıdır + + + + Positional specifiers are not permitted in format strings + Biçim dizelerinde konum tanımlayıcılara izin verilmiyor + + + + Missing format specifier + Biçim belirticisi eksik + + + + '{0}' flag set twice + '{0}' bayrağı iki kez ayarlandı + + + + Prefix flag (' ' or '+') set twice + Ön ek bayrağı (' ' veya '+') iki kez ayarlandı + + + + The # formatting modifier is invalid in F# + # biçimlendirme değiştiricisi F# içinde geçersizdir + + + + Bad precision in format specifier + Biçim tanımlayıcıda hatalı duyarlık + + + + Bad width in format specifier + Biçim tanımlayıcıda hatalı genişlik + + + + '{0}' format does not support '0' flag + '{0}' biçimi '0' bayrağını desteklemiyor + + + + Precision missing after the '.' + '.' karakterinden sonra duyarlık eksik + + + + '{0}' format does not support precision + '{0}' biçimi duyarlığı desteklemiyor + + + + Bad format specifier (after l or L): Expected ld,li,lo,lu,lx or lX. In F# code you can use %d, %x, %o or %u instead, which are overloaded to work with all basic integer types. + Hatalı biçim tanımlayıcı (l veya L'den sonra): ld,li,lo,lu,lx veya lX bekleniyordu. Bunun yerine F# kodunda, tüm temel tamsayı türleriyle çalışmak üzere aşırı yüklenmiş olan %d, %x, %o veya %u kullanabilirsiniz. + + + + The 'l' or 'L' in this format specifier is unnecessary. In F# code you can use %d, %x, %o or %u instead, which are overloaded to work with all basic integer types. + Bu biçim tanımlayıcıdaki 'l' veya 'L' gereksiz. Bunun yerine F# kodunda, tüm temel tamsayı türleriyle çalışmak üzere aşırı yüklenmiş olan %d, %x, %o veya %u kullanabilirsiniz. + + + + The 'h' or 'H' in this format specifier is unnecessary. You can use %d, %x, %o or %u instead, which are overloaded to work with all basic integer types. + Bu biçim tanımlayıcıdaki 'h' veya 'H' gereksiz. Bunun yerine, tüm temel tamsayı türleriyle çalışmak üzere aşırı yüklenmiş olan %d, %x, %o veya %u kullanabilirsiniz. + + + + '{0}' does not support prefix '{1}' flag + '{0}', ön ek '{1}' bayrağını desteklemiyor + + + + Bad format specifier: '{0}' + Hatalı biçim tanımlayıcı: '{0}' + + + + System.Environment.Exit did not exit + System.Environment.Exit yoktu + + + + The treatment of this operator is now handled directly by the F# compiler and its meaning cannot be redefined + Bu işlecin işlemleri artık doğrudan F# derleyicisi tarafından işlendiğinden anlamı yeniden tanımlanamaz + + + + A protected member is called or 'base' is being used. This is only allowed in the direct implementation of members since they could escape their object scope. + Korunan bir üye çağrıldı veya 'base' kullanılıyor. Üyeler nesne kapsamlarını kaçırabildikleri için buna yalnızca üyeler doğrudan uygulandığında izin verilir. + + + + The byref-typed variable '{0}' is used in an invalid way. Byrefs cannot be captured by closures or passed to inner functions. + Byref olarak belirtilmiş '{0}' değişkeni geçersiz bir biçimde kullanılmış. Byref değerleri, kapanışlar ile yakalanamaz veya iç işlevlere geçirilemez. + + + + The 'base' keyword is used in an invalid way. Base calls cannot be used in closures. Consider using a private member to make base calls. + 'Base' anahtar sözcüğü geçersiz bir biçimde kullanılmış. Base çağrıları kapanışlarda kullanılamaz. Base çağrıları yapmak için özel üye kullanmayı düşünün. + + + + The variable '{0}' is used in an invalid way + '{0}' değişkeni geçersiz bir biçimde kullanılmış + + + + The type '{0}' is less accessible than the value, member or type '{1}' it is used in. + {0}' türünün erişilebilirliği, içinde kullanıldığı değer, üye veya '{1}' türünden daha düşük düzeyde. + + + + 'System.Void' can only be used as 'typeof<System.Void>' in F# + 'System.Void', F# dilinde yalnızca 'typeof<System.Void>' olarak kullanılabilir + + + + A type instantiation involves a byref type. This is not permitted by the rules of Common IL. + Tür örnek oluşturma işlemi byref türünü içerir. Ortak Ara Dil (CIL) kurallarında buna izin verilmez. + + + + Calls to 'reraise' may only occur directly in a handler of a try-with + 'Reraise' çağrıları yalnızca doğrudan try-with ifadesinin işleyicisinde oluşabilir + + + + Expression-splicing operators may only be used within quotations + İfade ekleme işleçleri yalnızca tırnak içinde kullanılabilir + + + + First-class uses of the expression-splicing operator are not permitted + İfade ekleme işlecinin birinci sınıf kullanımlarına izin verilmiyor + + + + First-class uses of the address-of operators are not permitted + Address-of işleçlerinin birinci sınıf kullanımlarına izin verilmiyor + + + + First-class uses of the 'reraise' function is not permitted + 'reraise' işlevinin birinci sınıf kullanımlarına izin verilmiyor + + + + The byref typed value '{0}' cannot be used at this point + Türü byref olarak belirtilmiş '{0}' değeri bu noktada kullanılamaz + + + + 'base' values may only be used to make direct calls to the base implementations of overridden members + 'base' değerleri yalnızca geçersiz kılınmış üyelerin taban uygulamalarına doğrudan çağrı yapmak için kullanılabilir + + + + Object constructors cannot directly use try/with and try/finally prior to the initialization of the object. This includes constructs such as 'for x in ...' that may elaborate to uses of these constructs. This is a limitation imposed by Common IL. + Nesne oluşturucular, nesnenin başlatılmasından önce try/with ve try/finally ifadelerini doğrudan kullanamazlar. Buna bu yapıların kullanımını çeşitlendirebilen 'for x in ...' gibi yapılar da dahildir. Bu, Ortak Ara Dilin getirdiği bir kısıtlamadır. + + + + The address of the variable '{0}' cannot be used at this point + '{0}' değişkeninin adresi bu noktada kullanılamaz + + + + The address of the static field '{0}' cannot be used at this point + '{0}' statik alanının adresi bu noktada kullanılamaz + + + + The address of the field '{0}' cannot be used at this point + '{0}' alanının adresi bu noktada kullanılamaz + + + + The address of an array element cannot be used at this point + Dizi öğesinin adresi bu noktada kullanılamaz + + + + The type of a first-class function cannot contain byrefs + Birinci sınıf bir işlevin türü byref'ler içeremez + + + + A method return type would contain byrefs which is not permitted + Bir metot dönüş türü byref'ler içeriyordu, buna izin verilmez + + + + Invalid custom attribute value (not a constant or literal) + Geçersiz özel öznitelik değeri (sabit veya değişmez değerli değil) + + + + The attribute type '{0}' has 'AllowMultiple=false'. Multiple instances of this attribute cannot be attached to a single language element. + '{0}' öznitelik türünde 'AllowMultiple=false' değeri var. Bu özniteliğin birden çok örneği tek bir dil öğesine iliştirilemez. + + + + The member '{0}' is used in an invalid way. A use of '{1}' has been inferred prior to its definition at or near '{2}'. This is an invalid forward reference. + {0}' üyesi geçersiz bir biçimde kullanılmış. '{1}' kullanımı, '{2}' konumunda veya yakınındaki tanımından önce çıkarılmış. Bu geçersiz bir ileriye doğru başvurudur. + + + + A byref typed value would be stored here. Top-level let-bound byref values are not permitted. + Türü byref olarak belirtilmiş bir değer buraya depolanacaktı. Üst düzeyde let ile bağlanmış byref değerlerine izin verilmez. + + + + [<ReflectedDefinition>] terms cannot contain uses of the prefix splice operator '%' + [<ReflectedDefinition>] terimleri ön ek ekleme işleci '%' kullanımı içeremez + + + + A function labeled with the 'EntryPointAttribute' attribute must be the last declaration in the last file in the compilation sequence. + 'EntryPointAttribute' özniteliği ile etiketlenmiş bir işlev, derleme dizisinin sonuncu dosyasındaki sonuncu bildirim olmalıdır. + + + + compiled form of the union case + birleşim durumunun derlenmiş biçimi + + + + default augmentation of the union case + birleşim durumunun varsayılan genişletmesi + + + + The property '{0}' has the same name as a method in type '{1}'. + {0}' özelliği, '{1}' türündeki bir metotla aynı ada sahip. + + + + The property '{0}' of type '{1}' has a getter and a setter that do not match. If one is abstract then the other must be as well. + {1}' türündeki '{0}' özelliğinin alıcısı ve ayarlayıcısı eşleşmiyor. Biri soyut ise diğeri de soyut olmalıdır. + + + + The property '{0}' has the same name as another property in type '{1}', but one takes indexer arguments and the other does not. You may be missing an indexer argument to one of your properties. + {0}' özelliği, '{1}' türündeki başka bir özellikle aynı ada sahip ancak bunlardan biri dizin oluşturucu bağımsız değişkenleri alırken diğeri almıyor. Özelliklerinizden birinde dizin oluşturucu bağımsız değişkeni eksik olabilir. + + + + A type would store a byref typed value. This is not permitted by Common IL. + Bir türde byref olarak belirtilmiş değer depolanmak istendi. Ortak Ara Dilde (CIL) buna izin verilmez. + + + + Duplicate method. The method '{0}' has the same name and signature as another method in type '{1}'. + Yinelenen metot. '{0}' metodu, '{1}' türündeki başka bir metotla aynı ada ve imzaya sahip. + + + + Duplicate method. The method '{0}' has the same name and signature as another method in type '{1}' once tuples, functions, units of measure and/or provided types are erased. + Yinelenen metot. Demetler, işlevler, ölçü birimleri ve/veya sağlanan türler silindikten sonra '{0}' metodu, '{1}' türündeki başka bir metotla aynı ada ve imzaya sahip oluyor. + + + + The method '{0}' has curried arguments but has the same name as another method in type '{1}'. Methods with curried arguments cannot be overloaded. Consider using a method taking tupled arguments. + {0}' metodunda Curry biçimli bağımsız değişkenler var ancak metodun adı, '{1}' türündeki başka bir metodun adıyla aynı. Curry biçimli bağımsız değişkenleri olan metotlar aşırı yüklenemez. Demet olarak tanımlanmış bağımsız değişkenler alan bir metot kullanmanız önerilir. + + + + Methods with curried arguments cannot declare 'out', 'ParamArray', 'optional', 'ReflectedDefinition', 'byref', 'CallerLineNumber', 'CallerMemberName', or 'CallerFilePath' arguments + Curry bağımsız değişkenlerine sahip metotlar 'out', 'ParamArray', 'optional', 'ReflectedDefinition', 'byref', 'CallerLineNumber', 'CallerMemberName' veya 'CallerFilePath' bağımsız değişkenlerini bildiremez + + + + Duplicate property. The property '{0}' has the same name and signature as another property in type '{1}'. + Yinelenen özellik. '{0}' özelliği, '{1}' türündeki başka bir özellikle aynı ada ve imzaya sahip. + + + + Duplicate property. The property '{0}' has the same name and signature as another property in type '{1}' once tuples, functions, units of measure and/or provided types are erased. + Yinelenen özellik. Demetler, işlevler, ölçü birimleri ve/veya sağlanan türler silindikten sonra '{0}' özelliği, '{1}' türündeki başka bir özellikle aynı ada ve imzaya sahip oluyor. + + + + Duplicate method. The abstract method '{0}' has the same name and signature as an abstract method in an inherited type. + Yinelenen metot. Soyut '{0}' metodu, devralınan türdeki soyut metotla aynı ada ve imzaya sahip. + + + + Duplicate method. The abstract method '{0}' has the same name and signature as an abstract method in an inherited type once tuples, functions, units of measure and/or provided types are erased. + Yinelenen metot. Demetler, işlevler, ölçü birimleri ve/veya sağlanan türler silindikten sonra, soyut '{0}' metodu, devralınan türdeki soyut metotla aynı ada ve imzaya sahip. + + + + This type implements the same interface at different generic instantiations '{0}' and '{1}'. This is not permitted in this version of F#. + Bu tür, farklı '{0}' ve '{1}' genel örneklemelerinde aynı arabirimi uyguluyor. F# dilinin bu sürümünde buna izin verilmez. + + + + The type of a field using the 'DefaultValue' attribute must admit default initialization, i.e. have 'null' as a proper value or be a struct type whose fields all admit default initialization. You can use 'DefaultValue(false)' to disable this check + 'DefaultValue' özniteliğini kullanan alanın türü varsayılan başlatmayı kabul etmelidir, yani uygun değer olarak 'null' değerli olmalı veya alanlarının tümü varsayılan başlatmayı kabul eden yapı türünde olmalıdır. Bu denetimi devre dışı bırakmak için 'DefaultValue(false)' kullanabilirsiniz + + + + The type abbreviation contains byrefs. This is not permitted by F#. + Tür kısaltması byref değerleri içeriyor. F# dilinde buna izin verilmez. + + + + The variable '{0}' is bound in a quotation but is used as part of a spliced expression. This is not permitted since it may escape its scope. + '{0}' değişkeni bir alıntı içine bağlanmış ancak eklenmiş ifadenin parçası olarak kullanılmış. Kapsamından kaçabileceği için buna izin verilmez. + + + + Quotations cannot contain uses of generic expressions + Alıntılar, genel ifade kullanımları içeremez + + + + Quotations cannot contain function definitions that are inferred or declared to be generic. Consider adding some type constraints to make this a valid quoted expression. + Alıntılar, genel olduğu çıkarılmış veya tanımlanmış işlev tanımları içeremez. Bunu geçerli bir alıntı ifadesi yapmak için bazı tür kısıtlamaları eklemeyi düşünün. + + + + Quotations cannot contain object expressions + Alıntılar, nesne ifadeleri içeremez + + + + Quotations cannot contain expressions that take the address of a field + Alıntılar, bir alanın adresini alan ifadeler içeremez + + + + Quotations cannot contain expressions that fetch static fields + Alıntılar, statik alanlar getiren ifadeler içeremez + + + + Quotations cannot contain inline assembly code or pattern matching on arrays + Alıntılar, satır içi bütünleştirilmiş kod kodu veya dizilerde desen eşleştirme içeremez + + + + Quotations cannot contain descending for loops + Alıntılar, döngülere yönelik azalan sıra içeremez + + + + Quotations cannot contain expressions that fetch union case indexes + Alıntılar, birleşim durumu dizinleri getiren ifadeler içeremez + + + + Quotations cannot contain expressions that set union case fields + Alıntılar, birleşim durumu alanları ayarlayan ifadeler içeremez + + + + Quotations cannot contain expressions that set fields in exception values + Alıntılar, özel durum değerleri içinde alanlar ayarlayan ifadeler içeremez + + + + Quotations cannot contain expressions that require byref pointers + Alıntılar, byref işaretçileri gerektiren ifadeler içeremez + + + + Quotations cannot contain expressions that make member constraint calls, or uses of operators that implicitly resolve to a member constraint call + Alıntılar, üye kısıtlama çağrıları yapan veya örtük olarak üye kısıtlama çağrısına çözümlenen işleçler kullanan ifadeler içeremez + + + + Quotations cannot contain this kind of constant + Alıntılar, bu tür bir sabit içeremez + + + + Quotations cannot contain this kind of pattern match + Alıntılar, bu tür bir desen eşleştirme içeremez + + + + Quotations cannot contain array pattern matching + Alıntılar, dizi deseni eşleştirmesi içeremez + + + + Quotations cannot contain this kind of type + Alıntılar, böyle bir tür içeremez + + + + The declared type parameter '{0}' cannot be used here since the type parameter cannot be resolved at compile time + Tanımlanan tür parametresi '{0}' derleme zamanında çözümlenemediği için burada kullanılamaz + + + + This code is less generic than indicated by its annotations. A unit-of-measure specified using '_' has been determined to be '1', i.e. dimensionless. Consider making the code generic, or removing the use of '_'. + Bu kod, ek açıklamalarında belirtilenden daha az genel. '_' kullanılarak belirtilen bir ölçü biriminin '1', yani boyutsuz olduğu belirlendi. Kodu genel yapmayı veya '_' kullanımını kaldırmayı düşünün. + + + + Type inference problem too complicated (maximum iteration depth reached). Consider adding further type annotations. + Tür çıkarma sorunu çok karmaşık (en fazla yinelenme derinliğine ulaşıldı). İlave tür ek açıklamaları eklemeyi düşünün. + + + + Expected arguments to an instance member + Örnek üye için bağımsız değişkenler bekleniyordu + + + + This indexer expects {0} arguments but is here given {1} + Bu dizin erişimcisi {0} bağımsız değişkenlerini bekliyor ancak burada {1} verilmiş + + + + Expecting a type supporting the operator '{0}' but given a function type. You may be missing an argument to a function. + '{0}' işlecini destekleyen bir tür bekleniyor ancak bir işlev türü verildi. Bir işlevde bağımsız değişkeniniz eksik olabilir. + + + + Expecting a type supporting the operator '{0}' but given a tuple type + '{0}' işlecini destekleyen bir tür bekleniyor ancak bir demet türü verildi. + + + + None of the types '{0}' support the operator '{1}' + {0}' türlerinin hiçbiri '{1}' işlecini desteklemez + + + + The type '{0}' does not support the operator '{1}' + {0}' türü '{1}' işlecini desteklemez + + + + None of the types '{0}' support the operator '{1}'. Consider opening the module 'Microsoft.FSharp.Linq.NullableOperators'. + {0}' türlerinin hiçbiri '{1}' işlecini desteklemez. 'Microsoft.FSharp.Linq.NullableOperators' modülünü açmayı düşünün. + + + + The type '{0}' does not support the operator '{1}'. Consider opening the module 'Microsoft.FSharp.Linq.NullableOperators'. + {0}' türü '{1}' işlecini desteklemez. 'Microsoft.FSharp.Linq.NullableOperators' modülünü açmayı düşünün. + + + + The type '{0}' does not support a conversion to the type '{1}' + {0}' türü '{1}' türüne dönüşümü desteklemez + + + + The type '{0}' has a method '{1}' (full name '{2}'), but the method is static + {0}' türünün '{1}' metodu var (tam adı '{2}'), ancak bu metot statik + + + + The type '{0}' has a method '{1}' (full name '{2}'), but the method is not static + {0}' türünün '{1}' metodu var (tam adı '{2}'), ancak bu metot statik değil + + + + The constraints 'struct' and 'not struct' are inconsistent + 'struct' ve 'not struct' kısıtlamaları tutarsız + + + + The type '{0}' does not have 'null' as a proper value + '{0}' türünde uygun değer olarak 'null' yoktur + + + + The type '{0}' does not have 'null' as a proper value. To create a null value for a Nullable type use 'System.Nullable()'. + '{0}' türünün uygun değer olarak bir 'null' değeri yok. Boş değer atanabilir türe bir boş değer atamak için 'System.Nullable()' kullanın. + + + + The type '{0}' does not support the 'comparison' constraint because it has the 'NoComparison' attribute + '{0}' türünün 'NoComparison' özniteliği olduğu için 'comparison' kısıtlamasını desteklemez + + + + The type '{0}' does not support the 'comparison' constraint. For example, it does not support the 'System.IComparable' interface + '{0}' türü 'comparison' kısıtlamasını desteklemez. Örneğin, 'System.IComparable' arabirimini desteklemez + + + + The type '{0}' does not support the 'comparison' constraint because it is a record, union or struct with one or more structural element types which do not support the 'comparison' constraint. Either avoid the use of comparison with this type, or add the 'StructuralComparison' attribute to the type to determine which field type does not support comparison + '{0}' türü, 'comparison' kısıtlamasını desteklemeyen bir veya daha fazla yapısal öğe türünün olduğu bir record, union veya struct olduğu için 'comparison' kısıtlamasını desteklemez. Bu türde karşılaştırma kullanmayın veya hangi alan türünün karşılaştırmayı desteklemediğini belirlemek için 'StructuralComparison' özniteliğini türe ekleyin + + + + The type '{0}' does not support the 'equality' constraint because it has the 'NoEquality' attribute + '{0}' türünün 'NoEquality' özniteliği olduğu için 'equality' kısıtlamasını desteklemez + + + + The type '{0}' does not support the 'equality' constraint because it is a function type + '{0}' türünün bir işlev türü olduğu için 'equality' kısıtlamasını desteklemez + + + + The type '{0}' does not support the 'equality' constraint because it is a record, union or struct with one or more structural element types which do not support the 'equality' constraint. Either avoid the use of equality with this type, or add the 'StructuralEquality' attribute to the type to determine which field type does not support equality + '{0}' türü, 'equality' kısıtlamasını desteklemeyen bir veya daha fazla yapısal öğe türünün olduğu bir record, union veya struct olduğu için 'equality' kısıtlamasını desteklemez. Bu türde eşitlik kullanmayın veya hangi alan türünün eşitliği desteklemediğini belirlemek için 'StructuralEquality' özniteliğini türe ekleyin + + + + The type '{0}' is not a CLI enum type + '{0}' türü bir CLI enum türü değil + + + + The type '{0}' has a non-standard delegate type + '{0}' türünün standart olmayan temsilci türü var + + + + The type '{0}' is not a CLI delegate type + '{0}' türü bir CLI temsilci türü değil + + + + This type parameter cannot be instantiated to 'Nullable'. This is a restriction imposed in order to ensure the meaning of 'null' in some CLI languages is not confusing when used in conjunction with 'Nullable' values. + Bu tür parametresi 'Nullable' olarak örneklenemez. Bu, bazı CLI dillerinde 'null' ifadesinin anlamının 'Nullable' değerlerle birlikte kullanıldığında karışıklık yaratmamasını sağlamak amacıyla getirilmiş bir kısıtlamadır. + + + + A generic construct requires that the type '{0}' is a CLI or F# struct type + Genel bir yapı, '{0}' türünün bir CLI veya F# struct türü olmasını gerektirir + + + + A generic construct requires that the type '{0}' is an unmanaged type + Genel bir yapı, '{0}' türünün yönetilmeyen bir tür olmasını gerektirir + + + + The type '{0}' is not compatible with any of the types {1}, arising from the use of a printf-style format string + {0}' türü, printf tarzı biçim dizesinin kullanımından kaynaklanan {1} türlerinden herhangi biriyle uyumlu değil + + + + A generic construct requires that the type '{0}' have reference semantics, but it does not, i.e. it is a struct + Genel bir yapı, '{0}' türünde başvuru semantiği olmasını gerektirir ancak bu söz konusu değil, yani bu bir struct + + + + A generic construct requires that the type '{0}' be non-abstract + Genel bir yapı, '{0}' türünün soyut olmamasını gerektirir + + + + A generic construct requires that the type '{0}' have a public default constructor + Genel bir yapı, '{0}' türünde ortak varsayılan oluşturucu olmasını gerektirir + + + + Type instantiation length mismatch + Tür örnekleme uzunluğu uyuşmazlığı + + + + Optional arguments not permitted here + İsteğe bağlı bağımsız değişkenler burada kullanılamaz + + + + {0} is not a static member + {0} bir statik üye değil + + + + {0} is not an instance member + {0} bir örnek üyesi değil + + + + Argument length mismatch + Bağımsız değişken uzunluğu mismatch uyuşmazlığı + + + + The argument types don't match + Bağımsız değişken türleri eşleşmiyor + + + + This method expects a CLI 'params' parameter in this position. 'params' is a way of passing a variable number of arguments to a method in languages such as C#. Consider passing an array for this argument + Bu metot bu konumda CLI 'params' parametresini bekler. 'params', C# gibi dillerde değişken sayıda bağımsız değişkeni bir metoda geçirme yoludur. Bu bağımsız değişken için bir dizi geçirmeyi düşünün + + + + The member or object constructor '{0}' is not {1} + Üye veya nesne oluşturucu '{0}', {1} değil + + + + The member or object constructor '{0}' is not {1}. Private members may only be accessed from within the declaring type. Protected members may only be accessed from an extending type and cannot be accessed from inner lambda expressions. + Üye veya nesne oluşturucu '{0}', {1} değil. Özel üyelere yalnızca tanımlayan türün içinden erişilebilir. Korunan üyelere yalnızca genişletilen bir türden erişilebilir, iç lambda ifadelerinden erişilemez. + + + + {0} is not a static method + {0} bir statik metot değil + + + + {0} is not an instance method + {0} bir örnek metodu değil + + + + The member or object constructor '{0}' has no argument or settable return property '{1}'. {2}. + Üye veya nesne oluşturucu '{0}' bağımsız değişkene veya ayarlanabilen '{1}' dönüş özelliğine sahip değil. {2}. + + + + The object constructor '{0}' has no argument or settable return property '{1}'. {2}. + {0}' nesne oluşturucusu, bağımsız değişkene veya ayarlanabilen '{1}' dönüş özelliğine sahip değil. {2}. + + + + The required signature is {0} + Gereken imza: {0} + + + + The member or object constructor '{0}' requires {1} argument(s). The required signature is '{2}'. + Üye veya nesne oluşturucu '{0}' {1} bağımsız değişken gerektirir. Gereken imza: '{2}'. + + + + The member or object constructor '{0}' requires {1} additional argument(s). The required signature is '{2}'. + Üye veya nesne oluşturucu '{0}' {1} bağımsız değişken daha gerektiriyor. Gereken imza: '{2}'. + + + + The member or object constructor '{0}' requires {1} argument(s). The required signature is '{2}'. Some names for missing arguments are {3}. + Üye veya nesne oluşturucu '{0}' {1} bağımsız değişken gerektirir. Gereken imza: '{2}'. Eksik bağımsız değişkenlerden bazılarının adları: {3}. + + + + The member or object constructor '{0}' requires {1} additional argument(s). The required signature is '{2}'. Some names for missing arguments are {3}. + Üye veya nesne oluşturucu '{0}' {1} bağımsız değişken daha gerektirir. Gereken imza: '{2}'. Eksik bağımsız değişkenlerden bazılarının adları: {3}. + + + + The member or object constructor '{0}' requires {1} argument(s) but is here given {2} unnamed and {3} named argument(s). The required signature is '{4}'. + Üye veya nesne oluşturucu '{0}' {1} bağımsız değişken alır ancak burada adlandırılmamış {2} ve adlandırılmış {3} bağımsız değişken verilmiş. Gereken imza: '{4}'. + + + + The member or object constructor '{0}' takes {1} argument(s) but is here given {2}. The required signature is '{3}'. + Üye veya nesne oluşturucu '{0}' {1} bağımsız değişken alır ancak burada {2} bağımsız değişken verilmiş. Gereken imza: '{3}'. + + + + The object constructor '{0}' takes {1} argument(s) but is here given {2}. The required signature is '{3}'. + {0}' nesne oluşturucusunun {1} bağımsız değişken alması gerekiyor, ancak burada {2} bağımsız değişken almış. Gerekli imza: '{3}'. + + + + The object constructor '{0}' takes {1} argument(s) but is here given {2}. The required signature is '{3}'. If some of the arguments are meant to assign values to properties, consider separating those arguments with a comma (','). + {0}' nesne oluşturucusunun {1} bağımsız değişken alması gerekiyor, ancak burada {2} bağımsız değişken almış. Gerekli imza: '{3}'. Bazı bağımsız değişkenler özelliklere değer atamak için kullanıldıysa, bu bağımsız değişkenleri virgül (',') ile ayırmanız önerilir. + + + + The member or object constructor '{0}' takes {1} type argument(s) but is here given {2}. The required signature is '{3}'. + Üye veya nesne oluşturucu '{0}' {1} tür bağımsız değişkeni alır ancak burada {2} bağımsız değişken verilmiş. Gereken imza: '{3}'. + + + + A member or object constructor '{0}' taking {1} arguments is not accessible from this code location. All accessible versions of method '{2}' take {3} arguments. + {1} bağımsız değişken alan '{0}' adlı üyeye veya nesne oluşturucusuna bu kod konumundan erişilemiyor. '{2}' metodunun erişilebilen tüm sürümleri {3} bağımsız değişken alır. + + + + Incorrect generic instantiation. No {0} member named '{1}' takes {2} generic arguments. + Yanlış genel örnekleme. '{1}' adlı hiçbir {0} üyesi {2} genel bağımsız değişkenlerini almıyor. + + + + The member or object constructor '{0}' does not take {1} argument(s). An overload was found taking {2} arguments. + Üye veya nesne oluşturucu '{0}', {1} bağımsız değişkenlerini almaz. {2} bağımsız değişkenler alınırken aşırı yükleme bulundu. + + + + No {0} member or object constructor named '{1}' takes {2} arguments + Hiçbir {0} üyesi veya '{1}' adlı nesne oluşturucusu {2} bağımsız değişken almaz + + + + No {0} member or object constructor named '{1}' takes {2} arguments. Note the call to this member also provides {3} named arguments. + Hiçbir {0} üyesi veya '{1}' adlı nesne oluşturucusu {2} bağımsız değişken almaz. Bu üyeye çağrı yapılmasının {3} adlandırılmış bağımsız değişken sağladığına ayrıca dikkat edin. + + + + No {0} member or object constructor named '{1}' takes {2} arguments. The named argument '{3}' doesn't correspond to any argument or settable return property for any overload. + Hiçbir {0} üyesi veya '{1}' adlı nesne oluşturucusu {2} bağımsız değişken almaz. '{3}' adlandırılmış bağımsız değişkeni, herhangi bir aşırı yüklemeye yönelik hiçbir bağımsız değişkene veya ayarlanabilen dönüş özelliğine karşılık gelmiyor. + + + + Method or object constructor '{0}' not found + Metot veya nesne oluşturucusu '{0}' bulunamadı + + + + No overloads match for method '{0}'. + Hiçbir aşırı yükleme '{0}' metodu ile eşleşmiyor. + + + + A unique overload for method '{0}' could not be determined based on type information prior to this program point. A type annotation may be needed. + Bu program noktasından önce, tür bilgilerine dayalı olarak '{0}' metodu için benzersiz bir aşırı yükleme belirlenemedi. Tür ek açıklaması gerekebilir. + + + + Candidates: {0} + Adaylar: {0} + + + + The available overloads are shown below. + Kullanılabilen aşırı yüklemeler aşağıda gösterilmiştir. + + + + Accessibility modifiers are not permitted on 'do' bindings, but '{0}' was given. + Erişilebilirlik değiştiricilerine 'do' bağlamalarında izin verilmez, ancak '{0}' belirtildi. + + + + End of file in #if section begun at or after here + #if bölümünde dosya sonu burada veya daha önce başlatıldı + + + + End of file in string begun at or before here + Dizede dosya sonu burada veya daha önce başlatıldı + + + + End of file in verbatim string begun at or before here + Tam dizede dosya sonu burada veya daha önce başlatıldı + + + + End of file in comment begun at or before here + Açıklamada dosya sonu burada veya daha önce başlatıldı + + + + End of file in string embedded in comment begun at or before here + Açıklamaya gömülü dizede dosya sonu burada veya daha önce başlatıldı + + + + End of file in verbatim string embedded in comment begun at or before here + Açıklamaya gömülü tam dizede dosya sonu burada veya daha önce başlatıldı + + + + End of file in IF-OCAML section begun at or before here + IF-OCAML bölümünde dosya sonu burada veya daha önce başlatıldı + + + + End of file in directive begun at or before here + Yönergede dosya sonu burada veya daha önce başlatıldı + + + + No #endif found for #if or #else + #if veya #else için bir #endif bulunamadı + + + + Attributes have been ignored in this construct + Bu yapıda öznitelikler yok sayıldı + + + + 'use' bindings are not permitted in primary constructors + birincil oluşturucularda 'use' bağlamalarına izin verilmez + + + + 'use' bindings are not permitted in modules and are treated as 'let' bindings + modüllerde 'use' bağlamalarına izin verilmez ve 'let' bağlamaları gibi işlem yapılır + + + + An integer for loop must use a simple identifier + Döngü tamsayısı basit tanımlayıcı kullanmalıdır + + + + At most one 'with' augmentation is permitted + En çok bir 'with' genişletmesine izin verilir + + + + A semicolon is not expected at this point + Bu aşamada noktalı virgül beklenmiyor + + + + Unexpected end of input + Beklenmeyen giriş sonu + + + + Accessibility modifiers are not permitted here, but '{0}' was given. + Erişilebilirlik değiştiricilerine burada izin verilmez, ancak '{0}' belirtildi. + + + + Only '#' compiler directives may occur prior to the first 'namespace' declaration + İlk 'namespace' bildiriminden önce yalnızca '#' derleyici yönergeleri gerçekleşebilir + + + + Accessibility modifiers should come immediately prior to the identifier naming a construct + Erişilebilirlik değiştiricileri bir yapıyı adlandıran tanımlayıcıdan hemen önce gelmelidir + + + + Files should begin with either a namespace or module declaration, e.g. 'namespace SomeNamespace.SubNamespace' or 'module SomeNamespace.SomeModule', but not both. To define a module within a namespace use 'module SomeModule = ...' + Dosyalar ad alanıyla veya modül bildirimiyle başlamalıdır, örn. 'namespace SomeNamespace.SubNamespace' veya 'module SomeNamespace.SomeModule', ikisiyle birden değil. Ad alanı içinde bir modül tanımlamak için 'module SomeModule = ...' kullanın + + + + A module abbreviation must be a simple name, not a path + Modül kısaltması yol değil, basit ad olmalıdır + + + + Ignoring attributes on module abbreviation + Modül kısaltmasındaki öznitelikler yoksayılıyor + + + + The '{0}' accessibility attribute is not allowed on module abbreviation. Module abbreviations are always private. + Modül kısaltmasında '{0}' erişilebilirlik özniteliğine izin verilmez. Modül kısaltmaları her zaman özeldir. + + + + The '{0}' visibility attribute is not allowed on module abbreviation. Module abbreviations are always private. + Modül kısaltmasında '{0}' görünürlük özniteliğine izin verilmez. Modül kısaltmaları her zaman özeldir. + + + + Unclosed block + Kapatılmamış blok + + + + Unmatched 'begin' or 'struct' + Eşleşmeyen 'begin' veya 'struct' + + + + A module name must be a simple name, not a path + Modül adı yol değil, basit ad olmalıdır + + + + Unexpected empty type moduleDefn list + Beklenmeyen boş tür moduleDefn listesi + + + + Attributes should be placed before 'val' + Öznitelikler 'val' öğesinin önüne konulmalıdır + + + + Attributes are not permitted on interface implementations + Arabirim uygulamalarında özniteliklere izin verilmez + + + + Syntax error + Sözdizimi hatası + + + + Augmentations are not permitted on delegate type moduleDefns + moduleDefns temsilci türünde genişletmelere izin verilmiyor + + + + Unmatched 'class', 'interface' or 'struct' + Eşleşmeyen 'class', 'interface' veya 'struct' + + + + A type definition requires one or more members or other declarations. If you intend to define an empty class, struct or interface, then use 'type ... = class end', 'interface end' or 'struct end'. + Tür tanımı, bir veya daha fazla üyeyi ya da diğer tanımlamaları gerektirir. Boş bir class, struct veya interface tanımlamayı planlıyorsanız 'type ... = class end', 'interface end' veya 'struct end' kullanın. + + + + Unmatched 'with' or badly formatted 'with' block + Eşleşmeyen 'with' veya hatalı biçimlendirilmiş 'with' bloğu + + + + 'get', 'set' or 'get,set' required + 'get', 'set' veya 'get,set' gerekiyor + + + + Only class types may take value arguments + Yalnızca sınıf türleri değer bağımsız değişkenleri alabilir + + + + Unmatched 'begin' + Eşleşmeyen 'begin' + + + + Invalid declaration syntax + Geçersiz bildirim sözdizimi + + + + 'get' and/or 'set' required + 'get' ve/veya 'set' gerekiyor + + + + Type annotations on property getters and setters must be given after the 'get()' or 'set(v)', e.g. 'with get() : string = ...' + Özellik alıcılar ve ayarlayıcılardaki tür ek açıklamaları 'get()' veya 'set(v)' ifadesinden sonra verilmelidir, örn. 'with get() : string = ...' + + + + A getter property is expected to be a function, e.g. 'get() = ...' or 'get(index) = ...' + Alıcı özelliğinin işlev olması bekleniyor, örn. 'get() = ...' veya 'get(index) = ...' + + + + Multiple accessibilities given for property getter or setter + Özellik alıcı veya ayarlayıcı için birden çok erişilebilirlik verildi + + + + Property setters must be defined using 'set value = ', 'set idx value = ' or 'set (idx1,...,idxN) value = ... ' + Özellik ayarlayıcıları 'set value = ', 'set idx value = ' veya 'set (idx1,...,idxN) value = ... ' kullanılarak tanımlanmalıdır + + + + Interfaces always have the same visibility as the enclosing type + Arabirimler her zaman kapsayan tür ile aynı görünürlüğe sahiptir + + + + Accessibility modifiers are not allowed on this member. Abstract slots always have the same visibility as the enclosing type. + Erişilebilirlik değiştiricilerine bu üyede izin verilmiyor. Soyut yuvalar, kapsayan tür ile her zaman aynı görünürlüğe sahiptir. + + + + Attributes are not permitted on 'inherit' declarations + 'inherit' tanımlamalarında özniteliklere izin verilmez + + + + Accessibility modifiers are not permitted on an 'inherits' declaration + 'inherits' bildiriminde erişilebilirlik değiştiricilerine izin verilmez + + + + 'inherit' declarations cannot have 'as' bindings. To access members of the base class when overriding a method, the syntax 'base.SomeMember' may be used; 'base' is a keyword. Remove this 'as' binding. + 'inherit' tanımlamalarının 'as' bağlamaları olamaz. Bir metodu geçersiz kılarken temel sınıfın üyelerine erişmek için 'base.SomeMember' sözdizimi kullanılabilir; 'base' bir anahtar sözcüktür. Bu 'as' bağlamasını kaldırın. + + + + Attributes are not allowed here + Özniteliklere burada izin verilmez + + + + Accessibility modifiers are not permitted in this position for type abbreviations + Erişilebilirlik değiştiricilerine tür kısaltmalarının bu konumunda izin verilmez + + + + Accessibility modifiers are not permitted in this position for enum types + Erişilebilirlik değiştiricilerine enum türlerinin bu konumunda izin verilmez + + + + All enum fields must be given values + Tüm enum alanları verilen değerler olmalıdır + + + + Accessibility modifiers are not permitted on inline assembly code types + Erişilebilirlik değiştiricilerine satır içi bütünleştirilmiş kod kodu türlerinde izin verilmez + + + + Unexpected identifier: '{0}' + Beklenmeyen tanımlayıcı: '{0}' + + + + Accessibility modifiers are not permitted on union cases. Use 'type U = internal ...' or 'type U = private ...' to give an accessibility to the whole representation. + Birleşim durumlarında erişilebilirlik değiştiricilerine izin verilmez. Temsilin tamamına erişilebilirlik kazandırmak için 'type U = internal ...' veya 'type U = private ...' kullanın. + + + + Accessibility modifiers are not permitted on enumeration fields + Erişilebilirlik değiştiricilerine sabit listesi alanlarında izin verilmez + + + + Consider using a separate record type instead + Onun yerine ayrı bir kayıt türü kullanmayı deneyin + + + + Accessibility modifiers are not permitted on record fields. Use 'type R = internal ...' or 'type R = private ...' to give an accessibility to the whole representation. + Kayıt alanlarında erişilebilirlik değiştiricilerine izin verilmez. Temsilin tamamına erişilebilirlik kazandırmak için 'type R = internal ...' veya 'type R = private ...' kullanın. + + + + The declaration form 'let ... and ...' for non-recursive bindings is not used in F# code. Consider using a sequence of 'let' bindings + Özyinelemeli olmayan bağlamalar için 'let ... and ...' bildirim biçimi F# kodunda kullanılmaz. 'let' bağlama sırası kullanmayı düşünün + + + + Unmatched '(' + Eşleşmeyen '(' + + + + Successive patterns should be separated by spaces or tupled + Ardışık desenler boşluklarla veya grup olarak tanımlayarak ayrılmalıdır + + + + No matching 'in' found for this 'let' + Bu 'let' için eşleşen bir 'in' bulunamadı + + + + Error in the return expression for this 'let'. Possible incorrect indentation. + Bu 'let' için dönüş ifadesinde hata. Muhtemelen hatalı girinti. + + + + The block following this '{0}' is unfinished. Every code block is an expression and must have a result. '{1}' cannot be the final code element in a block. Consider giving this block an explicit result. + Bu '{0}' öğesini izleyen blok tamamlanmadı. Her kod bloğu bir ifadedir ve bir sonucu olmalıdır. '{1}' bir bloktaki son kod öğesi olamaz. Bu bloğa açık bir sonuç vermeyi düşünün. + + + + Incomplete conditional. Expected 'if <expr> then <expr>' or 'if <expr> then <expr> else <expr>'. + Eksik koşul. 'if <ifade> then <ifade>' veya 'if <ifade> then <ifade> else <ifade>' bekleniyordu. + + + + 'assert' may not be used as a first class value. Use 'assert <expr>' instead. + 'assert' birinci sınıf değer olarak kullanılamaz. Onun yerine 'assert <ifade>' kullanın. + + + + Identifier expected + Tanımlayıcı bekleniyor + + + + 'in' or '=' expected + 'in' veya '=' bekleniyor + + + + The use of '->' in sequence and computation expressions is limited to the form 'for pat in expr -> expr'. Use the syntax 'for ... in ... do ... yield...' to generate elements in more complex sequence expressions. + Dizi ve hesaplama ifadelerinde '->' kullanımı 'for pat in expr -> expr' biçimiyle sınırlıdır. Daha karmaşık dizi ifadelerinde öğeler oluşturmak için 'for ... in ... do ... yield...' sözdizimini kullanın. + + + + Successive arguments should be separated by spaces or tupled, and arguments involving function or method applications should be parenthesized + Ardışık bağımsız değişkenler boşluklarla veya grup olarak tanımlayarak ayrılmalı ve işlev veya metot uygulamaları içeren bağımsız değişkenler ayraç içine alınmalıdır + + + + Unmatched '[' + Eşleşmeyen '[' + + + + Missing qualification after '.' + '.' sonrasında eksik nitelik + + + + In F# code you may use 'expr.[expr]'. A type annotation may be required to indicate the first expression is an array + F# kodunda 'expr.[expr]' kullanabilirsiniz. İlk ifadenin dizi olduğunu belirtmek için tür ek açıklaması gerekebilir + + + + Mismatched quotation, beginning with '{0}' + '{0}' ile başlayan, eşleşmeyen alıntı + + + + Unmatched '{0}' + Eşleşmeyen '{0}' + + + + Unmatched '[|' + Eşleşmeyen '[|' + + + + Unmatched '{{' + Eşleşmeyen '{{' + + + + Field bindings must have the form 'id = expr;' + Alan bağlamaları 'id = expr;' biçiminde olmalıdır + + + + This member is not permitted in an object implementation + Nesne uygulamasında bu üyeye izin verilmez + + + + Missing function body + Eksik işlev gövdesi + + + + Syntax error in labelled type argument + Etiketli tür bağımsız değişkeninde sözdizimi hatası + + + + Unexpected infix operator in type expression + Tür ifadesinde beklenmeyen içtakı işleci + + + + The syntax '(typ,...,typ) ident' is not used in F# code. Consider using 'ident<typ,...,typ>' instead + '(typ,...,typ) ident' sözdizimi F# kodunda kullanılmaz. Onun yerine 'ident<typ,...,typ>' kullanmayı düşünün + + + + Invalid literal in type + Türde geçersiz sabit değer + + + + Unexpected infix operator in unit-of-measure expression. Legal operators are '*', '/' and '^'. + Ölçü birimi ifadesinde beklenmeyen içtakı işleci. Geçerli işleçler: '*', '/' ve '^'. + + + + Unexpected integer literal in unit-of-measure expression + Ölçü birimi ifadesinde beklenmeyen tamsayı sabit değeri + + + + Syntax error: unexpected type parameter specification + Sözdizimi hatası: beklenmeyen tür parametresi belirtimi + + + + Mismatched quotation operator name, beginning with '{0}' + '{0}' ile başlayan, eşleşmeyen alıntı işleci adı + + + + Active pattern case identifiers must begin with an uppercase letter + Etkin desen örneği tanımlayıcıları büyük harfle başlamalıdır + + + + The '|' character is not permitted in active pattern case identifiers + '|' karakterine ektin desen örneği tanımlayıcılarında izin verilmez + + + + Denominator must not be 0 in unit-of-measure exponent + Ölçü birimi üssünde payda 0 olmamalıdır + + + + No '=' symbol should follow a 'namespace' declaration + 'namespace' bildirimini bir '=' simgesi izleyemez + + + + The syntax 'module ... = struct .. end' is not used in F# code. Consider using 'module ... = begin .. end' + 'module ... = struct .. end' sözdizimi F# kodunda kullanılmaz. 'module ... = begin .. end' kullanmayı düşünün + + + + The syntax 'module ... : sig .. end' is not used in F# code. Consider using 'module ... = begin .. end' + 'module ... : sig .. end' sözdizimi F# kodunda kullanılmaz. 'module ... = begin .. end' kullanmayı düşünün + + + + A static field was used where an instance field is expected + Örnek alanı beklenen yerde statik alan kullanılmış + + + + Method '{0}' is not accessible from this code location + '{0}' metoduna bu kod konumundan erişilemiyor + + + + Implicit product of measures following / + / sonrasındaki ölçülerin örtük çarpımı + + + + Unexpected SynMeasure.Anon + Beklenmeyen SynMeasure.Anon + + + + Non-zero constants cannot have generic units. For generic zero, write 0.0<_>. + Sıfır olmayan sabitlerin genel birimleri olamaz. Genel sıfır için 0.0<_> yazın. + + + + In sequence expressions, results are generated using 'yield' + Dizi ifadelerinde, sonuçlar 'yield' kullanılarak oluşturulur + + + + Unexpected big rational constant + Beklenmeyen büyüklükte oran sabiti + + + + Units-of-measure supported only on float, float32, decimal and signed integer types + Ölçü birimleri yalnızca kayan, float32, ondalık ve işaretli tamsayı türlerinde desteklenir + + + + Unexpected Const_uint16array + Beklenmeyen Const_uint16array + + + + Unexpected Const_bytearray + Beklenmeyen Const_bytearray + + + + A parameter with attributes must also be given a name, e.g. '[<Attribute>] Name : Type' + Özniteliklere sahip bir parametreye ayrıca bir ad verilmelidir, örn. '[<Attribute>] Ad : Tür' + + + + Return values cannot have names + Dönüş değerlerinin adları olamaz + + + + MemberKind.PropertyGetSet only expected in parse trees + MemberKind.PropertyGetSet yalnızca ayrıştırma ağaçlarında beklenir + + + + Namespaces cannot contain values. Consider using a module to hold your value declarations. + Ad alanları değer içeremez. Değer bildirimlerinizi tutmak için modül kullanmayı düşünün. + + + + Namespaces cannot contain extension members except in the same file and namespace declaration group where the type is defined. Consider using a module to hold declarations of extension members. + Ad alanları, türün tanımlandığı dosya ve ad alanı bildirim grubundakiler dışında uzantı üyeleri içeremez. Uzantı üyesi bildirimlerini tutmak için bir modül kullanmayı düşünün. + + + + Multiple visibility attributes have been specified for this identifier + Bu tanımlayıcı için birden çok görünürlük özniteliği belirtilmiş + + + + Multiple visibility attributes have been specified for this identifier. 'let' bindings in classes are always private, as are any 'let' bindings inside expressions. + Bu tanımlayıcı için birden çok görünürlük özniteliği belirtilmiş. İfade içlerindeki tüm 'let' bağlamaları her zaman özel olduğu gibi sınıflardaki 'let' bağlamaları da her zaman özeldir. + + + + The name '({0})' 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 '{1}' instead. + ({0})' adı üye adı olarak kullanılmamalıdır. Türe yönelik karşılaştırma semantiğini tanımlamak için 'System.IComparable' arabirimini uygulayın. Diğer CLI dillerinden kullanılacak statik bir üye tanımlıyorsanız onun yerine '{1}' adını kullanın. + + + + The name '({0})' 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 '{1}' instead. + ({0})' adı üye adı olarak kullanılmamalıdır. Türe yönelik eşitlik semantiğini tanımlamak için 'Object.Equals' üyesini geçersiz kılın. Diğer CLI dillerinden kullanılacak statik bir üye tanımlıyorsanız onun yerine '{1}' adını kullanın. + + + + The name '({0})' should not be used as a member name. If defining a static member for use from other CLI languages then use the name '{1}' instead. + ({0})' adı üye adı olarak kullanılmamalıdır. Diğer CLI dillerinden kullanılacak statik bir üye tanımlıyorsanız onun yerine '{1}' adını kullanın. + + + + The name '({0})' should not be used as a member name because it is given a standard definition in the F# library over fixed types + '({0})' adına F# kitaplığında sabit türler üzerinden standart bir tanım verildiği için üye adı olarak kullanılmamalıdır + + + + The '{0}' operator should not normally be redefined. To define overloaded comparison semantics for a particular type, implement the 'System.IComparable' interface in the definition of that type. + '{0}' işleci normalde yeniden tanımlanmamalıdır. Belirli bir türün aşırı yüklenmiş karşılaştırma semantiğini tanımlamak için o türün tanımında 'System.IComparable' arabirimini uygulayın. + + + + The '{0}' operator should not normally be redefined. To define equality semantics for a type, override the 'Object.Equals' member in the definition of that type. + '{0}' işleci normalde yeniden tanımlanmamalıdır. Bir türün eşitlik semantiğini tanımlamak için o türün tanımında 'Object.Equals' üyesini geçersiz kılın. + + + + The '{0}' operator should not normally be redefined. Consider using a different operator name + '{0}' işleci normalde yeniden tanımlanmamalıdır. Farklı bir işleç adı kullanmayı düşünün + + + + The '{0}' operator cannot be redefined. Consider using a different operator name + '{0}' işleci yeniden tanımlanamaz. Farklı bir işleç adı kullanmayı düşünün + + + + Expected module or namespace parent {0} + Modül veya ad alanı üst öğesi {0} bekleniyordu + + + + The struct, record or union type '{0}' implements the interface 'System.IComparable' explicitly. You must apply the 'CustomComparison' attribute to the type. + Yapı, kayıt veya birleşim türü '{0}', 'System.IComparable' arabirimini açık olarak uyguluyor. Türe 'CustomComparison' özniteliğini uygulamanız gerekir. + + + + The struct, record or union type '{0}' implements the interface 'System.IComparable<_>' explicitly. You must apply the 'CustomComparison' attribute to the type, and should also provide a consistent implementation of the non-generic interface System.IComparable. + Yapı, kayıt veya birleşim türü '{0}', 'System.IComparable<_>' arabirimini açık olarak uyguluyor. Türe 'CustomComparison' özniteliğini uygulamanız ve aynı zamanda genel olmayan System.IComparable arabiriminin tutarlı bir uygulamasını sağlamanız gerekir. + + + + The struct, record or union type '{0}' implements the interface 'System.IStructuralComparable' explicitly. Apply the 'CustomComparison' attribute to the type. + Yapı, kayıt veya birleşim türü '{0}', 'System.IStructuralComparable' arabirimini açık olarak uyguluyor. Türe 'CustomComparison' özniteliğini uygulayın. + + + + This record contains fields from inconsistent types + Bu kayıt tutarsız türlere ait alanlar içeriyor + + + + DLLImport stubs cannot be inlined + DLLImport saplamaları satır içine alınamaz + + + + Structs may only bind a 'this' parameter at member declarations + Yapılar üye bildirimlerinde yalnızca 'this' parametresini bağlayabilirler + + + + Unexpected expression at recursive inference point + Özyinelemeli çıkarım noktasında beklenmeyen ifade + + + + This code is less generic than required by its annotations because the explicit type variable '{0}' could not be generalized. It was constrained to be '{1}'. + Açık tür değişkeni '{0}' oluşturulamadığı için bu kod ek açıklamalarının gerektirdiğinden daha az genel. '{1}' olacak şekilde kısıtlanmıştı. + + + + One or more of the explicit class or function type variables for this binding could not be generalized, because they were constrained to other types + Bu bağlamanın bir veya daha fazla açık sınıf veya işlev türü değişkeni diğer türlerle kısıtlandığı için oluşturulamadı + + + + A generic type parameter has been used in a way that constrains it to always be '{0}' + Genel bir tür parametresi, her zaman '{0}' olarak kısıtlanacak şekilde kullanılmış + + + + This type parameter has been used in a way that constrains it to always be '{0}' + Bu tür parametresi, her zaman '{0}' olarak kısıtlanacak şekilde kullanılmış + + + + The type parameters inferred for this value are not stable under the erasure of type abbreviations. This is due to the use of type abbreviations which drop or reorder type parameters, e.g. \n\ttype taggedInt<'a> = int or\n\ttype swap<'a,'b> = 'b * 'a.\nConsider declaring the type parameters for this value explicitly, e.g.\n\tlet f<'a,'b> ((x,y) : swap<'b,'a>) : swap<'a,'b> = (y,x). + Bu değer için çıkartılan tür parametreleri tür kısaltmalarının silinmesi altında kararlı değil. Bunun nedeni, tür parametrelerini bırakan veya yeniden sıralayan tür kısaltmalarının kullanılmasıdır, örn. \n\ttype taggedInt<'a> = int veya\n\ttype swap<'a,'b> = 'b * 'a.\nBu değerin parametrelerini açık olarak tanımlamayı düşünün, örn.\n\tlet f<'a,'b> ((x,y) : swap<'b,'a>) : swap<'a,'b> = (y,x). + + + + Explicit type parameters may only be used on module or member bindings + Açık tür parametreleri yalnızca modülde veya üye bağlamalarında kullanılabilir + + + + You must explicitly declare either all or no type parameters when overriding a generic abstract method + Genel soyut metodu geçersiz kılarken tür parametrelerinin ya tümünü açık olarak tanımlamanız ya da hiçbirini açık olarak tanımlamamanız gerekir + + + + The field labels and expected type of this record expression or pattern do not uniquely determine a corresponding record type + Bu kayıt ifadesinin veya deseninin alan etiketleri ve beklenen türü, karşılık gelen bir kayıt türünü benzersiz olarak belirlemiyor + + + + The field '{0}' appears twice in this record expression or pattern + '{0}' alanı bu kayıt ifadesinde veya deseninde iki kez görünüyor + + + + Unknown union case + Bilinmeyen birleşim durumu + + + + This code is not sufficiently generic. The type variable {0} could not be generalized because it would escape its scope. + Bu kod yeterince genel değil. Tür değişkeni {0}, kapsamını kaçıracağı için genelleştirilemedi. + + + + A property cannot have explicit type parameters. Consider using a method instead. + Bir özelliğin açık tür parametreleri olamaz. Onun yerine metot kullanmayı düşünün. + + + + A constructor cannot have explicit type parameters. Consider using a static construction method instead. + Bir oluşturucunun açık tür parametreleri olamaz. Onun yerine statik oluşturma metodu kullanmayı düşünün. + + + + This instance member needs a parameter to represent the object being invoked. Make the member static or use the notation 'member x.Member(args) = ...'. + Bu örnek üyesinin çağrılan nesneyi temsil etmek için parametreye ihtiyacı var. Üyeyi statik yapın veya 'member x.Member(args) = ...' gösterimini kullanın. + + + + Unexpected source-level property specification in syntax tree + Sözdizimi ağacında beklenmeyen kaynak düzeyli özellik belirtimi + + + + A static initializer requires an argument + Statik başlatıcı için bağımsız değişken gerekiyor + + + + An object constructor requires an argument + Nesne oluşturucusu bağımsız değişken gerektiriyor + + + + This static member should not have a 'this' parameter. Consider using the notation 'member Member(args) = ...'. + Bu statik üyenin 'this' parametresi olmamalıdır. 'member Member(args) = ...' gösterimini kullanmayı düşünün. + + + + An explicit static initializer should use the syntax 'static new(args) = expr' + Açık statik başlatıcı 'static new(args) = expr' sözdizimini kullanmalıdır + + + + An explicit object constructor should use the syntax 'new(args) = expr' + Açık nesne oluşturucusu 'new(args) = expr' sözdizimini kullanmalıdır + + + + Unexpected source-level property specification + Beklenmeyen kaynak düzeyli özellik belirtimi + + + + This form of object expression is not used in F#. Use 'member this.MemberName ... = ...' to define member implementations in object expressions. + Nesne ifadesinin bu biçimi F# dilinde kullanılmaz. Nesne ifadelerinde üye uygulamalarını tanımlamak için 'member this.MemberName ... = ...' kullanın. + + + + Invalid declaration + Geçersiz bildirim + + + + Attributes are not allowed within patterns + Desen içinde özniteliğe izin verilmez + + + + The generic function '{0}' must be given explicit type argument(s) + '{0}' genel işlevine açık tür bağımsız değişkenleri verilmesi gerekiyor + + + + The method or function '{0}' should not be given explicit type argument(s) because it does not declare its type parameters explicitly + '{0}' metodu veya işlevi kendi tür parametrelerini açık olarak tanımlamadığı için açık tür bağımsız değişkenleri verilmemelidir + + + + This value, type or method expects {0} type parameter(s) but was given {1} + Bu değer, tür veya metot {0} tür parametrelerini bekliyor ancak {1} verilmiş + + + + The default, zero-initializing constructor of a struct type may only be used if all the fields of the struct type admit default initialization + Varsayılan seçenek olan yapı türünün sıfır ile başlayan oluşturucusu yalnızca yapı türünün tüm alanları varsayılan başlatmayı kabul ediyorsa kullanılabilir + + + + Couldn't find Dispose on IDisposable, or it was overloaded + IDisposable üzerinde Dispose bulunamadı veya aşırı yüklenmişti + + + + This value is not a literal and cannot be used in a pattern + Bu değer bir sabit değer olmadığından desende kullanılamaz + + + + This field is readonly + Bu alan salt okunur + + + + Named arguments must appear after all other arguments + Adlandırılmış bağımsız değişkenler diğer tüm bağımsız değişkenlerden sonra görünmelidir + + + + This function value is being used to construct a delegate type whose signature includes a byref argument. You must use an explicit lambda expression taking {0} arguments. + Bu işlev değeri, imzası byref bağımsız değişkeni içeren bir temsilci türü oluşturmak için kullanılıyor. {0} bağımsız değişken alan açık lambda ifadesi kullanmanız gerekir. + + + + The type '{0}' is not a type whose values can be enumerated with this syntax, i.e. is not compatible with either seq<_>, IEnumerable<_> or IEnumerable and does not have a GetEnumerator method + '{0}' türü, değerleri bu sözdizimiyle sabit listesi oluşturabilen bir tür değildir, yani seq<_>, IEnumerable<_> veya IEnumerable ile uyumlu değildir ve GetEnumerator metodu yoktur + + + + This recursive binding uses an invalid mixture of recursive forms + Bu özyinelemeli bağlama özyinelemeli biçimlerin geçersiz bir karışımını kullanıyor + + + + This is not a valid object construction expression. Explicit object constructors must either call an alternate constructor or initialize all fields of the object and specify a call to a super class constructor. + Bu geçerli bir nesne oluşturma ifadesi değil. Açık nesne oluşturucular ya alternatif bir oluşturucu çağırmalı ya da nesnenin tüm alanlarını başlatmalı ve üst sınıf oluşturucuya çağrı belirtmelidir. + + + + Invalid constraint + Geçersiz kısıtlama + + + + Invalid constraint: the type used for the constraint is sealed, which means the constraint could only be satisfied by at most one solution + Geçersiz kısıtlama: kısıtlama için kullanılan tür mühürlü, yani bu kısıtlama yalnızca en çok tek çözümde karşılanabilir + + + + An 'enum' constraint must be of the form 'enum<type>' + 'enum' kısıtlaması 'enum<tür>' biçiminde olmalıdır + + + + 'new' constraints must take one argument of type 'unit' and return the constructed type + 'new' kısıtlamaları 'unit' türünde bir bağımsız değişken almalı ve oluşturulan türü döndürmelidir + + + + This property has an invalid type. Properties taking multiple indexer arguments should have types of the form 'ty1 * ty2 -> ty3'. Properties returning functions should have types of the form '(ty1 -> ty2)'. + Bu özellikte geçersiz bir tür var. Birden çok dizin erişimcisi bağımsız değişkeni alan özelliklerin 'ty1 * ty2 -> ty3' biçiminde türleri olmalıdır. İşlev döndüren özelliklerin '(ty1 -> ty2)' biçiminde türleri olmalıdır. + + + + Expected unit-of-measure parameter, not type parameter. Explicit unit-of-measure parameters must be marked with the [<Measure>] attribute. + Tür parametresi değil ölçü birimi parametresi bekleniyordu. Açık ölçü birimi parametreleri [<Measure>] özniteliğiyle işaretlenmelidir. + + + + Expected type parameter, not unit-of-measure parameter + Ölçü birimi parametresi değil tür parametresi bekleniyordu + + + + Expected type, not unit-of-measure + Ölçü birimi değil tür bekleniyordu + + + + Expected unit-of-measure, not type + Tür değil ölçü birimi bekleniyordu + + + + Units-of-measure cannot be used as prefix arguments to a type. Rewrite as postfix arguments in angle brackets. + Ölçü birimleri bir türün ön ek bağımsız değişkenleri olarak kullanılamaz. Açılı ayraç içinde son ek bağımsız değişkeni olarak yeniden yazın. + + + + Unit-of-measure cannot be used in type constructor application + Tür oluşturucu uygulamasında ölçü birimi kullanılamaz + + + + This control construct may only be used if the computation expression builder defines a '{0}' method + Bu denetim yapısı, yalnızca hesaplama ifadesi oluşturucu '{0}' metodunu tanımlıyorsa kullanılabilir + + + + This type has no nested types + Bu türde hiç iç içe tür yok + + + + Unexpected {0} in type expression + Tür ifadesinde beklenmeyen {0} + + + + Type parameter cannot be used as type constructor + Tür parametresi tür oluşturucusu olarak kullanılamaz + + + + Illegal syntax in type expression + Tür ifadesinde geçersiz sözdizimi + + + + Anonymous unit-of-measure cannot be nested inside another unit-of-measure expression + Anonim ölçü birimi başka bir ölçü birimi ifadesinin içine konamaz + + + + Anonymous type variables are not permitted in this declaration + Bu bildirimde anonim tür değişkenlerine izin verilmez + + + + Unexpected / in type + Türde beklenmeyen / + + + + Unexpected type arguments + Beklenmeyen tür bağımsız değişkenleri + + + + Optional arguments are only permitted on type members + İsteğe bağlı bağımsız değişkenlere yalnızca tür üyelerinde izin verilir + + + + Name '{0}' not bound in pattern context + '{0}' adı desen bağlamında bağlanmamış + + + + Non-primitive numeric literal constants cannot be used in pattern matches because they can be mapped to multiple different types through the use of a NumericLiteral module. Consider using replacing with a variable, and use 'when <variable> = <constant>' at the end of the match clause. + Temel olmayan sayısal sabit değer sabitleri NumericLiteral modülünün kullanılması aracılığıyla birçok farklı türe eşlenebileceği için desen eşlemelerinde kullanılamazlar. Bir değişkenle değiştirmeyi ve eşleştirme yan tümcesinin sonunda 'when <variable> = <constant>' kullanmayı düşünün. + + + + Type arguments cannot be specified here + Tür bağımsız değişkenleri burada belirtilemez + + + + Only active patterns returning exactly one result may accept arguments + Yalnızca tam olarak bir sonuç döndüren etkin desenler bağımsız değişken kabul edilebilir + + + + Invalid argument to parameterized pattern label + Parametreli desen etiketine geçersiz bağımsız değişken + + + + Internal error. Invalid index into active pattern array + İç hata. Etkin desen dizisi için geçersiz dizin + + + + This union case does not take arguments + Bu birleşim durumu bağımsız değişken almaz + + + + This union case takes one argument + Bu birleşim durumu bir bağımsız değişken alır + + + + This union case expects {0} arguments in tupled form + Bu birleşim durumu grup olarak tanımlanmış biçimde {0} bağımsız değişken bekliyor + + + + Field '{0}' is not static + '{0}' alanı statik değil + + + + This field is not a literal and cannot be used in a pattern + Bu alan sabit değer olmadığından desende kullanılamaz + + + + This is not a variable, constant, active recognizer or literal + Bu bir değişkeni sabit, etkin tanıyıcı veya sabit değer değil + + + + This is not a valid pattern + Bu geçerli bir desen değil + + + + Character range matches have been removed in F#. Consider using a 'when' pattern guard instead. + Karakter aralığı eşleştirmeler F# dilinde kaldırılmıştır. Onun yerine 'when' desen koruma kullanmayı düşünün. + + + + Illegal pattern + Geçersiz desen + + + + Syntax error - unexpected '?' symbol + Sözdizimi hatası - beklenmeyen '?' simgesi + + + + Expected {0} expressions, got {1} + {0} ifadeleri bekleniyordu, {1} alındı + + + + TcExprUndelayed: delayed + TcExprUndelayed: gecikti + + + + This expression form may only be used in sequence and computation expressions + Bu ifade biçimi yalnızca dizi ve hesaplama ifadelerinde kullanılabilir + + + + Invalid object expression. Objects without overrides or interfaces should use the expression form 'new Type(args)' without braces. + Geçersiz nesne ifadesi. Geçersiz kılmaların ve arabirimlerin olmadığı nesneler küme ayraçsız 'new Type(args)' ifade biçimini kullanmalıdır. + + + + Invalid object, sequence or record expression + Geçersiz nesne, dizi veya kayıt ifadesi + + + + Invalid record, sequence or computation expression. Sequence expressions should be of the form 'seq {{ ... }}' + Geçersiz kayıt, dizi veya hesaplama ifadesi. Dizi ifadeleri 'seq {{ ... }}' biçiminde olmalıdır + + + + This list or array expression includes an element of the form 'if ... then ... else'. Parenthesize this expression to indicate it is an individual element of the list or array, to disambiguate this from a list generated using a sequence expression + Liste veya dizi ifadesi 'if ... then ... else' biçiminde bir öğe içeriyor. Listenin veya dizinin bağımsız bir öğesi olduğunu belirtmek, dizi ifadesi kullanılarak oluşturulmuş listeden ayırt etmek için bu ifadeyi ayraç içine alın + + + + Unable to parse format string '{0}' + '{0}' biçim dizesi ayrıştırılamıyor + + + + This list expression exceeds the maximum size for list literals. Use an array for larger literals and call Array.ToList. + Bu liste ifadesi liste sabit değerlerinin en büyük boyutunu aşıyor. Daha büyük sabit değerler için dizi kullanın ve Array.ToList işlevini çağırın. + + + + The expression form 'expr then expr' may only be used as part of an explicit object constructor + 'expr then expr' ifade biçimi yalnızca açık nesne oluşturucunun parçası olarak kullanılabilir + + + + Named arguments cannot be given to member trait calls + Adlandırılmış bağımsız değişkenler üye nitelik çağrılarına verilemez + + + + This is not a valid name for an enumeration case + Bu, sabit listesi durumu olarak geçerli bir ad değil + + + + This field is not mutable + Bu alan değiştirilebilir değil + + + + This construct may only be used within list, array and sequence expressions, e.g. expressions of the form 'seq {{ ... }}', '[ ... ]' or '[| ... |]'. These use the syntax 'for ... in ... do ... yield...' to generate elements + Bu yapı, yalnızca liste, dizi ve sıra ifadeleri içinde (örn. 'seq {{ ... }}', '[ ... ]' veya '[| ... |]' biçimindeki ifadelerde) kullanılabilir. Bunlarda öğe oluşturmak için 'for ... in ... do ... yield...' söz dizimi kullanılır + + + + This construct may only be used within computation expressions. To return a value from an ordinary function simply write the expression without 'return'. + Bu yapı yalnızca hesaplama ifadeleri içinde kullanılabilir. Normal bir işlevden değer döndürmek için sadece ifadeyi 'return' olmadan yazın. + + + + This construct may only be used within sequence or computation expressions + Bu yapı yalnızca dizi ve hesaplama ifadeleri içinde kullanılabilir + + + + This construct may only be used within computation expressions + Bu yapı yalnızca hesaplama ifadeleri içinde kullanılabilir + + + + Invalid indexer expression + Geçersiz dizin erişimcisi ifadesi + + + + The operator 'expr.[idx]' has been used on an object of indeterminate type based on information prior to this program point. Consider adding further type constraints + Bu program noktasından önceki bilgiler temelinde 'expr.[idx]' işleci belirsiz türdeki bir nesnede kullanılmış. Başka tür kısıtlamaları eklemeyi düşünün + + + + Cannot inherit from a variable type + Değişken türünden devralınamıyor + + + + Calls to object constructors on type parameters cannot be given arguments + Tür parametrelerindeki nesne oluşturucu çağrılarına bağımsız değişken verilemez + + + + The 'CompiledName' attribute cannot be used with this language element + 'CompiledName' özniteliği bu dil öğesiyle kullanılamaz + + + + '{0}' may only be used with named types + '{0}' yalnızca adlandırılmış türlerle kullanılır + + + + 'inherit' cannot be used on interface types. Consider implementing the interface by using 'interface ... with ... end' instead. + Arabirim türlerinde 'inherit' kullanılamaz. Onun yerine arabirimi 'interface ... with ... end' kullanarak uygulamayı düşünün. + + + + 'new' cannot be used on interface types. Consider using an object expression '{{ new ... with ... }}' instead. + 'new' arabirim türlerinde kullanılamaz. Bunun yerine bir nesne ifadesi '{{ new ... with ... }}' kullanmayı düşünün. + + + + Instances of this type cannot be created since it has been marked abstract or not all methods have been given implementations. Consider using an object expression '{{ new ... with ... }}' instead. + Bu tür soyut olarak işaretlendiği veya metotlarının tümüne uygulama verilmediği için örnekleri oluşturulamaz. Onun yerine bir nesne ifadesi '{{ new ... with ... }}' kullanmayı düşünün. + + + + It is recommended that objects supporting the IDisposable interface are created using the syntax 'new Type(args)', rather than 'Type(args)' or 'Type' as a function value representing the constructor, to indicate that resources may be owned by the generated value + Kaynakların oluşturulan değer tarafından sahiplenilebileceğini belirtmek için, IDisposable arabirimini destekleyen nesnelerin, oluşturucuyu temsil eden bir işlev değeri olarak 'Type(args)' veya 'Type' yerine 'new Type(args)' söz dizimi kullanılarak oluşturulması önerilir + + + + '{0}' may only be used to construct object types + '{0}' yalnızca nesne türlerini oluşturmak için kullanılabilir + + + + Constructors for the type '{0}' must directly or indirectly call its implicit object constructor. Use a call to the implicit object constructor instead of a record expression. + '{0}' türünün oluşturucuları doğrudan veya dolaylı olarak kendi örtük nesne oluşturucusunu çağırmalıdır. Kayıt ifadesi yerine örtük nesne oluşturucusu çağrısını kullanın. + + + + The field '{0}' has been given a value, but is not present in the type '{1}' + {0}' alanına bir değer verilmiş ancak '{1}' türünde bu yok + + + + No assignment given for field '{0}' of type '{1}' + {1}' türündeki '{0}' alanı için bir atama verilmedi + + + + Extraneous fields have been given values + Dış alanlara değerler verilmiş + + + + Only overrides of abstract and virtual members may be specified in object expressions + Nesne ifadelerinde yalnızca soyut ve sanal üyelerin geçersiz kılmaları belirtilebilir + + + + The member '{0}' does not correspond to any abstract or virtual method available to override or implement. + '{0}' adlı üye, geçersiz kılma veya uygulama için kullanılabilen herhangi bir soyut veya sanal metoda karşılık gelmiyor. + + + + The type {0} contains the member '{1}' but it is not a virtual or abstract method that is available to override or implement. + {0} türü, '{1}' üyesini içeriyor ancak bu, geçersiz kılma veya uygulama için kullanılabilen bir sanal veya soyut metot değil. + + + + The member '{0}' does not accept the correct number of arguments. {1} argument(s) are expected, but {2} were given. The required signature is '{3}'.{4} + {0}' üyesine doğru sayıda bağımsız değişken geçirilmedi. {1} bağımsız değişken bekleniyor ancak geçerli sayı, {2}. Gerekli imza: '{3}'.{4} + + + + The member '{0}' does not accept the correct number of arguments. One overload accepts {1} arguments, but {2} were given. The required signature is '{3}'.{4} + {0}' üyesine doğru sayıda bağımsız değişken geçirilmedi. Bir aşırı yükleme {1} bağımsız değişken kabul ediyor ancak geçerli sayı {2}. Gerekli imza: '{3}'.{4} + + + + A simple method name is required here + Burada basit metot adı gereklidir + + + + The types System.ValueType, System.Enum, System.Delegate, System.MulticastDelegate and System.Array cannot be used as super types in an object expression or class + System.ValueType, System.Enum, System.Delegate, System.MulticastDelegate ve System.Array türleri bir nesne ifadesinde veya sınıfta üst tür olarak kullanılamaz + + + + 'new' must be used with a named type + 'new' adlandırılmış türle kullanılmalıdır + + + + Cannot create an extension of a sealed type + Mühürlü türün uzantısı oluşturulamıyor + + + + No arguments may be given when constructing a record value + Kayıt değeri oluşturulurken bir bağımsız değişken verilemez + + + + Interface implementations cannot be given on construction expressions + Arabirim uygulamaları oluşturma ifadelerinde verilemez + + + + Object construction expressions may only be used to implement constructors in class types + Nesne oluşturma ifadeleri yalnızca sınıf türlerinde oluşturucuları uygulamak için kullanılabilir + + + + Only simple bindings of the form 'id = expr' can be used in construction expressions + Yalnızca 'id = expr' biçimindeki basit bağlamalar oluşturma ifadelerinde kullanılabilir + + + + Objects must be initialized by an object construction expression that calls an inherited object constructor and assigns a value to each field + Nesneler devralınan nesne oluşturucusunu çağıran ve her alana bir değer atayan bir nesne oluşturma ifadesi ile başlatılmalıdır + + + + Expected an interface type + Arabirim türü bekleniyordu + + + + Constructor expressions for interfaces do not take arguments + Arabirimlerin oluşturucu ifadeleri bağımsız değişken almaz + + + + This object constructor requires arguments + Bu nesne oluşturucusu bağımsız değişken gerektirir + + + + 'new' may only be used with object constructors + 'new' yalnızca nesne oluşturucularla kullanılabilir + + + + At least one override did not correctly implement its corresponding abstract member + En az bir geçersiz kılma işlemi kendisine karşılık gelen soyut üyeyi doğru uygulamadı + + + + This numeric literal requires that a module '{0}' defining functions FromZero, FromOne, FromInt32, FromInt64 and FromString be in scope + Bu sayısal sabit değer FromZero, FromOne, FromInt32, FromInt64 ve FromString işlevlerini tanımlayan '{0}' modülünün kapsamda olmasını gerektirir + + + + Invalid record construction + Geçersiz kayıt oluşturma + + + + The expression form {{ expr with ... }} may only be used with record types. To build object types use {{ new Type(...) with ... }} + {{ expr with ... }} ifade biçimi yalnızca kayıt türleriyle kullanılabilir. Nesne türleri oluşturmak için {{ new Type(...) with ... }} kullanın + + + + The inherited type is not an object model type + Devralınan tür bir nesne modeli türü değil + + + + Object construction expressions (i.e. record expressions with inheritance specifications) may only be used to implement constructors in object model types. Use 'new ObjectType(args)' to construct instances of object model types outside of constructors + Nesne oluşturma ifadeleri (yani devralma belirtimleri olan kayıt ifadeleri) yalnızca nesne modeli türlerinde oluşturucuları uygulamak için kullanılabilir. Nesne modeli türlerinin örneklerini oluşturucuların dışında oluşturmak için 'new ObjectType(args)' kullanın + + + + '{{ }}' is not a valid expression. Records must include at least one field. Empty sequences are specified by using Seq.empty or an empty list '[]'. + '{{ }}' geçerli bir ifade değil. Kayıtlar en az bir alan içermelidir. Boş diziler Seq.empty veya boş liste '[]' kullanılarak belirtilir. + + + + This type is not a record type. Values of class and struct types must be created using calls to object constructors. + Bu tür bir kayıt türü değil. Nesne oluşturucularına yapılan çağrılar kullanılarak sınıf ve yapı türlerinin değerlerinin oluşturulması gerekiyor. + + + + This type is not a record type + Bu tür bir kayıt türü değil + + + + This construct is ambiguous as part of a computation expression. Nested expressions may be written using 'let _ = (...)' and nested computations using 'let! res = builder {{ ... }}'. + Bu yapı, bir hesaplama ifadesinin parçası olarak belirsiz. İç içe ifadeler 'let _ = (...)' kullanılarak ve iç içe hesaplamalar 'let! res = builder {{ ... }}' kullanılarak yazılabilir. + + + + This construct is ambiguous as part of a sequence expression. Nested expressions may be written using 'let _ = (...)' and nested sequences using 'yield! seq {{... }}'. + Bu yapı, bir dizi ifadesinin parçası olarak belirsiz. İç içe ifadeler 'let _ = (...)' kullanılarak ve iç içe diziler 'yield! seq {{... }}' kullanılarak yazılabilir. + + + + 'do!' cannot be used within sequence expressions + 'do!' dizi ifadeleri içinde kullanılamaz + + + + The use of 'let! x = coll' in sequence expressions is not permitted. Use 'for x in coll' instead. + Dizi ifadelerinde 'let! x = coll' kullanımına izin verilmez. Onun yerine 'for x in coll' kullanın. + + + + 'try'/'with' cannot be used within sequence expressions + Dizi ifadeleri içinde 'try'/'with' kullanılamaz + + + + In sequence expressions, multiple results are generated using 'yield!' + Dizi ifadelerinde, 'yield!' kullanılarak birden çok sonuç oluşturulur + + + + Invalid assignment + Geçersiz atama + + + + Invalid use of a type name + Geçersiz tür adı kullanımı + + + + This type has no accessible object constructors + Bu türün erişilebilir bir nesne oluşturucusu yok + + + + Invalid use of an interface type + Geçersiz arabirim türü kullanımı + + + + Invalid use of a delegate constructor. Use the syntax 'new Type(args)' or just 'Type(args)'. + Geçersiz temsilci oluşturucu kullanımı. 'new Type(args)' sözdizimini kullanın veya yalnızca 'Type(args)' kullanın. + + + + Property '{0}' is not static + '{0}' özelliği statik değil + + + + Property '{0}' is not readable + '{0}' özelliği okunamıyor + + + + This lookup cannot be used here + Bu arama burada kullanılamaz + + + + Property '{0}' is static + '{0}' özelliği statik + + + + Property '{0}' cannot be set + '{0}' özelliği ayarlanamaz + + + + Constructors must be applied to arguments and cannot be used as first-class values. If necessary use an anonymous function '(fun arg1 ... argN -> new Type(arg1,...,argN))'. + Oluşturucular bağımsız değişkenlere uygulanmalıdır ve birinci sınıf değer olarak kullanılamazlar. Gerekirse anonim bir işlev kullanın: '(fun arg1 ... argN -> new Type(arg1,...,argN))'. + + + + The syntax 'expr.id' may only be used with record labels, properties and fields + 'expr.id' sözdizimi yalnızca kayıt etiketleri, özellikler ve alanlarla kullanılabilir + + + + Event '{0}' is static + '{0}' olayı statik + + + + Event '{0}' is not static + '{0}' olayı statik değil + + + + The named argument '{0}' did not match any argument or mutable property + '{0}' adlandırılmış bağımsız değişkeni herhangi bir bağımsız değişkenle veya değişebilir özelliğiyle eşleşmedi + + + + One or more of the overloads of this method has curried arguments. Consider redesigning these members to take arguments in tupled form. + Bu metodun bir veya daha fazla aşırı yüklemesinde eksiltimli bağımsız değişkenler var. Bu üyeleri grup olarak tanımlanmış biçimde bağımsız değişkenler alacak şekilde yeniden tasarlamayı düşünün. + + + + The unnamed arguments do not form a prefix of the arguments of the method called + Adlandırılmamış bağımsız değişkenler çağrılan metodun bağımsız değişkenlerinin ön ekini oluşturmaz + + + + Static optimization conditionals are only for use within the F# library + Statik iyileştirme koşulları yalnızca F# kitaplığı içinde kullanım içindir + + + + The corresponding formal argument is not optional + Karşılık gelen biçimsel bağımsız değişken isteğe bağlı değil + + + + Invalid optional assignment to a property or field + Özelliğe veya alana geçersiz isteğe bağlı atama + + + + A delegate constructor must be passed a single function value + Temsilci oluşturucuya tek bir işlev değeri geçirilmesi gerekiyor + + + + A binding cannot be marked both 'use' and 'rec' + Bir bağlama hem 'use' hem de 'rec' olarak işaretlenemez + + + + The 'VolatileField' attribute may only be used on 'let' bindings in classes + 'VolatileField' özniteliği yalnızca sınıflardaki 'let' bağlamalarında kullanılabilir + + + + Attributes are not permitted on 'let' bindings in expressions + İfadelerdeki 'let' bağlamalarında özniteliğe izin verilmez + + + + The 'DefaultValue' attribute may only be used on 'val' declarations + 'DefaultValue' özniteliği yalnızca 'val' bildirimlerinde kullanılabilir + + + + The 'ConditionalAttribute' attribute may only be used on members + 'ConditionalAttribute' özniteliği yalnızca üyelerde kullanılabilir + + + + This is not a valid name for an active pattern + Etkin desen için bu geçerli bir ad değil + + + + The 'EntryPointAttribute' attribute may only be used on function definitions in modules + 'EntryPointAttribute' özniteliği yalnızca modüllerdeki işlev tanımlarında kullanılabilir + + + + Mutable values cannot be marked 'inline' + Değişebilir değerler 'inline' olarak işaretlenemez + + + + Mutable values cannot have generic parameters + Değişebilir değerlerin genel parametreleri olamaz + + + + Mutable function values should be written 'let mutable f = (fun args -> ...)' + Değişebilir işlev değerleri 'let mutable f = (fun args -> ...)' şeklinde yazılmalıdır + + + + Only functions may be marked 'inline' + Yalnızca işlevler 'inline' olarak işaretlenebilir + + + + A literal value cannot be given the [<ThreadStatic>] or [<ContextStatic>] attributes + Bir sabit değere [<ThreadStatic>] veya [<ContextStatic>] öznitelikleri verilemez + + + + A literal value cannot be marked 'mutable' + Sabit değer 'mutable' olarak işaretlenemez + + + + A literal value cannot be marked 'inline' + Sabit değer 'inline' olarak işaretlenemez + + + + Literal values cannot have generic parameters + Sabit değerlerin genel parametreleri olamaz + + + + This is not a valid constant expression + Bu geçerli bir sabit ifade değil + + + + This type is not accessible from this code location + Bu türe bu kod konumundan erişilemiyor + + + + Unexpected condition in imported assembly: failed to decode AttributeUsage attribute + İçeri aktarılan bütünleştirilmiş kodda beklenmeyen koşul: AttributeUsage özniteliğinin kodu çözülemedi + + + + Unrecognized attribute target. Valid attribute targets are 'assembly', 'module', 'type', 'method', 'property', 'return', 'param', 'field', 'event', 'constructor'. + Tanınmayan öznitelik hedefi. Geçerli öznitelik hedefleri şunlardır: 'assembly', 'module', 'type', 'method', 'property', 'return', 'param', 'field', 'event', 'constructor'. + + + + This attribute is not valid for use on this language element. Assembly attributes should be attached to a 'do ()' declaration, if necessary within an F# module. + Bu öznitelik, bu dil öğesinde kullanılmak için geçerli değil. Bütünleştirilmiş kod öznitelikleri, bir 'do ()' bildirimine, gerekirse F# modülü içine iliştirilmelidir. + + + + This attribute is not valid for use on this language element + Bu öznitelik, bu dil öğesinde kullanılmak için geçerli değil + + + + Optional arguments cannot be used in custom attributes + İsteğe bağlı bağımsız değişkenler özel özniteliklerde kullanılamaz + + + + This property cannot be set + Bu özellik ayarlanamaz + + + + This property or field was not found on this custom attribute type + Bu özellik veya alan bu özel öznitelik türünde bulunamadı + + + + A custom attribute must be a reference type + Özel öznitelik başvuru türünde olmalıdır + + + + The number of args for a custom attribute does not match the expected number of args for the attribute constructor + Özel bir özniteliğin bağımsız değişken sayısı öznitelik oluşturucusunun beklenen bağımsız değişken sayısı ile eşleşmiyor + + + + A custom attribute must invoke an object constructor + Özel öznitelik nesne oluşturucusunu çağırmalıdır + + + + Attribute expressions must be calls to object constructors + Öznitelik ifadeleri nesne oluşturucu çağrısı olmalıdır + + + + This attribute cannot be used in this version of F# + Bu öznitelik F# dilinin bu sürümünde kullanılamaz + + + + Invalid inline specification + Geçersiz satır içi belirtim + + + + 'use' bindings must be of the form 'use <var> = <expr>' + 'use!' bağlamaları 'use <var> = <expr>' biçiminde olmalıdır + + + + Abstract members are not permitted in an augmentation - they must be defined as part of the type itself + Genişletmede soyut üyelere izin verilmez; bunlar türün kendi parçası olarak tanımlanmalıdır + + + + Method overrides and interface implementations are not permitted here + Burada metot geçersiz kılmalara ve arabirim uygulamalarına izin verilmez + + + + No abstract or interface member was found that corresponds to this override + Bu geçersiz kılmaya karşılık gelen bir soyut üye veya arabirim üyesi bulunamadı + + + + This override takes a different number of arguments to the corresponding abstract member. The following abstract members were found:{0} + Bu geçersiz kılma, karşılık gelen soyut üyeden farklı sayıda bağımsız değişken alıyor. Şu soyut üyeler bulundu: {0} + + + + This method already has a default implementation + Bu metodun zaten varsayılan uygulaması var + + + + The method implemented by this default is ambiguous + Bu varsayılan tarafından uygulanan metot belirsiz + + + + No abstract property was found that corresponds to this override + Bu geçersiz kılmaya karşılık gelen bir soyut özellik bulunamadı + + + + This property overrides or implements an abstract property but the abstract property doesn't have a corresponding {0} + Bu özellik, soyut bir özelliği geçersiz kılıyor veya uyguluyor ancak bu soyut özelliğe karşılık gelen bir {0} yok + + + + Invalid signature for set member + Küme üyesi için geçersiz imza + + + + This new member hides the abstract member '{0}'. Rename the member or use 'override' instead. + Bu yeni üye, '{0}' soyut üyesini gizliyor. Üyeyi yeniden adlandırın veya bunun yerine 'override' kullanın. + + + + This new member hides the abstract member '{0}' once tuples, functions, units of measure and/or provided types are erased. Rename the member or use 'override' instead. + Demetler, işlevler, ölçü birimleri ve/veya sağlanan türler silindikten sonra bu yeni üye, '{0}' soyut üyesini gizliyor. Üyeyi yeniden adlandırın veya bunun yerine 'override' kullanın. + + + + Interfaces cannot contain definitions of static initializers + Arabirimler statik başlatıcı tanımları içeremez + + + + Interfaces cannot contain definitions of object constructors + Arabirimler nesne oluşturucularının tanımlarını içeremez + + + + Interfaces cannot contain definitions of member overrides + Arabirimler üye geçersiz kılma tanımları içeremez + + + + Interfaces cannot contain definitions of concrete members. You may need to define a constructor on your type to indicate that the type is a class. + Arabirimler somut üyelerin tanımlarını içeremez. Türün sınıf olduğunu belirtmek için türünüzde bir oluşturucu tanımlamanız gerekebilir. + + + + Constructors cannot be specified in exception augmentations + Oluşturucular özel durum genişletmelerinde belirtilemez + + + + Structs cannot have an object constructor with no arguments. This is a restriction imposed on all CLI languages as structs automatically support a default constructor. + Yapıların bağımsız değişkensiz nesne oluşturucusu olamaz. Yapılar varsayılan oluşturucuyu otomatik olarak desteklediği için bu, tüm CLI dillerine getirilen bir kısıtlamadır. + + + + Constructors cannot be defined for this type + Oluşturucular bu tür için tanımlanamaz + + + + Recursive bindings that include member specifications can only occur as a direct augmentation of a type + Üye belirtimleri içeren özyinelemeli bağlamalar yalnızca türün doğrudan genişletmesi olarak oluşabilir + + + + Only simple variable patterns can be bound in 'let rec' constructs + 'let rec' yapılarında yalnızca basit değişken desenleri bağlanabilir + + + + Only record fields and simple, non-recursive 'let' bindings may be marked mutable + Yalnızca kayıt alanları ve basit, özyinelemeli olmayan 'let' bağlamaları değişebilir olarak işaretlenebilir + + + + This member is not sufficiently generic + Bu üye yeterince genel değil + + + + A declaration may only be the [<Literal>] attribute if a constant value is also given, e.g. 'val x : int = 1' + Sabit değer de verilmişse bir bildirim yalnızca [<Literal>] özniteliği olabilir, örn. 'val x : int = 1' + + + + A declaration may only be given a value in a signature if the declaration has the [<Literal>] attribute + Bir bildirime, imzası içinde yalnızca o bildirimin [<Literal>] özniteliği varsa değer verilebilir + + + + Thread-static and context-static variables must be static and given the [<DefaultValue>] attribute to indicate that the value is initialized to the default value on each new thread + Statik iş parçacıklı ve statik bağlamlı değişkenler statik olmalıdır ve her yeni iş parçacığında değerin varsayılan değerle başlatıldığını belirtmek için [<DefaultValue>] özniteliği verilmelidir + + + + Volatile fields must be marked 'mutable' and cannot be thread-static + Geçici alanlar 'mutable' olarak işaretlenmelidir ve bunlar statik iş parçacıklı olamaz + + + + Uninitialized 'val' fields must be mutable and marked with the '[<DefaultValue>]' attribute. Consider using a 'let' binding instead of a 'val' field. + Başlatılmamış 'val' alanları değişebilir olmalı ve '[<DefaultValue>]' özniteliğiyle işaretlenmelidir. 'val' alanı yerine 'let' bağlaması kullanmayı düşünün. + + + + Static 'val' fields in types must be mutable, private and marked with the '[<DefaultValue>]' attribute. They are initialized to the 'null' or 'zero' value for their type. Consider also using a 'static let mutable' binding in a class type. + Türlerdeki statik 'val' alanları değiştirilebilir, özel ve '[<DefaultValue>]' özniteliğiyle işaretlenmiş olmalıdır. Bunlar, türlerine yönelik olarak 'null' veya 'zero' ile başlatılır. Ayrıca sınıf türünde 'static let mutable' bağlaması kullanmayı düşünün. + + + + This field requires a name + Bu alan için ad gerekiyor + + + + Invalid namespace, module, type or union case name + Geçersiz ad alanı, modül, tür veya birleşim durumu adı + + + + Explicit type declarations for constructors must be of the form 'ty1 * ... * tyN -> resTy'. Parentheses may be required around 'resTy' + Oluşturucuların açık tür bildirimleri 'ty1 * ... * tyN -> resTy' biçiminde olmalıdır. 'resTy' etrafında ayraç gerekebilir + + + + Return types of union cases must be identical to the type being defined, up to abbreviations + Birleşim durumlarının dönüş türleri tanımlanmakta olan türle kısaltmalara kadar özdeş olmalıdır + + + + This is not a valid value for an enumeration literal + Bu, sabit listesi değeri olarak geçerli bir değer değil + + + + The type '{0}' is not an interface type + '{0}' türü bir arabirim türü değil + + + + Duplicate specification of an interface + Yinelenen arabirim belirtimi + + + + A field/val declaration is not permitted here + Alan/değer bildirimine burada izin verilmez + + + + A inheritance declaration is not permitted here + Devralma bildirimine burada izin verilmiyor + + + + This declaration opens the module '{0}', which is marked as 'RequireQualifiedAccess'. Adjust your code to use qualified references to the elements of the module instead, e.g. 'List.map' instead of 'map'. This change will ensure that your code is robust as new constructs are added to libraries. + Bu bildirim, 'RequireQualifiedAccess' olarak işaretlenmiş '{0}' modülünü açar. Bunun yerine, kodunuzu modülün öğelerine yapılan nitelikli başvuruları kullanacak şekilde ayarlayın, örn. 'map' yerine 'List.map'. Bu değişiklik, kitaplıklara yeni yapılar eklendikçe kodunuzun sağlam kalmasını sağlar. + + + + This declaration opens the namespace or module '{0}' through a partially qualified path. Adjust this code to use the full path of the namespace. This change will make your code more robust as new constructs are added to the F# and CLI libraries. + Bu bildirim, ad alanını veya '{0}' modülünü kısmen nitelenmiş yol aracılığıyla açıyor. Bu kodu, ad alanının tam yolunu kullanacak şekilde ayarlayın. Bu değişiklik, F# ve CLI kitaplıklarına yeni yapılar eklendikçe kodunuzun daha sağlam kılar. + + + + Local class bindings cannot be marked inline. Consider lifting the definition out of the class or else do not mark it as inline. + Yerel sınıf bağlamaları satır içi olarak işaretlenemez. Tanımı sınıftan çıkarmayı düşünün veya satır içi olarak işaretlemeyin. + + + + Type abbreviations cannot have members + Tür kısaltmalarının üyeleri olamaz + + + + As of F# 4.1, the accessibility of type abbreviations is checked at compile-time. Consider changing the accessibility of the type abbreviation. Ignoring this warning might lead to runtime errors. + F# 4.1 ve sonrasında tür kısaltmalarının erişilebilirliği, derleme zamanında denetlenmektedir. Tür kısaltmasının erişilebilirliğini değiştirmeniz önerilir. Bu uyarıyı yoksaymak, çalışma zamanı hatalarına neden olabilir. + + + + Enumerations cannot have members + Sabit listelerinde üyeler olamaz + + + + Measure declarations may have only static members + Ölçü bildirimlerinin yalnızca statik üyeleri olabilir + + + + Structs cannot contain 'do' bindings because the default constructor for structs would not execute these bindings + Yapıların varsayılan oluşturucusu 'do' bağlamalarını yürütmeyeceği için yapılar bu bağlamaları içeremez + + + + Structs cannot contain value definitions because the default constructor for structs will not execute these bindings. Consider adding additional arguments to the primary constructor for the type. + Yapıların varsayılan oluşturucusu bu bağlamaları yürütmeyeceği için yapılar değer tanımlarını içeremez. Türün birincil oluşturucusuna ek bağımsız değişkenler eklemeyi düşünün. + + + + Static value definitions may only be used in types with a primary constructor. Consider adding arguments to the type definition, e.g. 'type X(args) = ...'. + Statik değer tanımları yalnızca birincil oluşturucusu olan türlerde kullanılabilir. Tür tanımına bağımsız değişkenler eklemeyi düşünün, örn. 'type X(args) = ...'. + + + + Measure declarations may have only static members: constructors are not available + Ölçü bildirimlerinin yalnızca statik üyeleri olabilir: oluşturucular kullanılmaz + + + + A member and a local class binding both have the name '{0}' + Hem üyenin hem de yerel sınıf bağlamasının adı '{0}' olabilir + + + + Type abbreviations cannot have interface declarations + Tür kısaltmalarının arabirim bildirimleri olamaz + + + + Enumerations cannot have interface declarations + Sabit listelerinde arabirim bildirimleri olamaz + + + + This type is not an interface type + Bu tür bir arabirim türü değil + + + + All implemented interfaces should be declared on the initial declaration of the type + Türün ilk bildiriminde tüm uygulanan arabirimler tanımlanmalıdır + + + + A default implementation of this interface has already been added because the explicit implementation of the interface was not specified at the definition of the type + Bu arabirimin açık olarak uygulanması türün tanımında belirtilmediği için arabirimin varsayılan uygulaması zaten eklendi + + + + This member is not permitted in an interface implementation + Arabirim uygulamasında bu üyeye izin verilmez + + + + This declaration element is not permitted in an augmentation + Bir genişletmede bu tanımlama öğesine izin verilmez + + + + Types cannot contain nested type definitions + Türler iç içe tür tanımları içeremez + + + + type, exception or module + tür, özel durum veya modül + + + + type or module + tür veya modül + + + + The struct, record or union type '{0}' implements the interface 'System.IStructuralEquatable' explicitly. Apply the 'CustomEquality' attribute to the type. + Yapı, kayıt veya birleşim türü '{0}', 'System.IStructuralEquatable' arabirimini açık olarak uyguluyor. Türe 'CustomEquality' özniteliğini uygulayın. + + + + The struct, record or union type '{0}' implements the interface 'System.IEquatable<_>' explicitly. Apply the 'CustomEquality' attribute to the type and provide a consistent implementation of the non-generic override 'System.Object.Equals(obj)'. + Yapı, kayıt veya birleşim türü '{0}', 'System.IEquatable<_>' arabirimini açık olarak uyguluyor. Türe 'CustomEquality' özniteliğini uygulayın ve genel olmayan 'System.Object.Equals(obj)' geçersiz kılma işleminin tutarlı bir uygulamasını sağlayın. + + + + Explicit type specifications cannot be used for exception constructors + Açık tür belirtimleri özel durum oluşturucuları için kullanılamaz + + + + Exception abbreviations should not have argument lists + Özel durum kısaltmalarının bağımsız değişken listeleri olmamalıdır + + + + Abbreviations for Common IL exceptions cannot take arguments + Ortak Ara Dil özel durumlarının kısaltmaları bağımsız değişken alamaz + + + + Exception abbreviations must refer to existing exceptions or F# types deriving from System.Exception + Özel durum kısaltmaları mevcut özel durumlara veya System.Exception'dan türeyen F# türlerine başvurmalıdır + + + + Abbreviations for Common IL exception types must have a matching object constructor + Ortak Ara Dil özel durum türlerinin kısaltmalarının kendileriyle eşleşen nesne oluşturucuları olmalıdır + + + + Not an exception + Özel durum değil + + + + Invalid module name + Geçersiz modül adı + + + + Invalid type extension + Geçersiz tür uzantısı + + + + The attributes of this type specify multiple kinds for the type + Bu tür öznitelikler türün birden çok çeşidini belirtir + + + + The kind of the type specified by its attributes does not match the kind implied by its definition + Öznitelikleriyle belirtilen türün çeşidi tanımıyla kastedilen çeşitle eşleşmiyor + + + + Measure definitions cannot have type parameters + Ölçü tanımlarının tür parametreleri olamaz + + + + This type requires a definition + Bu tür için tanım gerekiyor + + + + This type abbreviation has one or more declared type parameters that do not appear in the type being abbreviated. Type abbreviations must use all declared type parameters in the type being abbreviated. Consider removing one or more type parameters, or use a concrete type definition that wraps an underlying type, such as 'type C<'a> = C of ...'. + Bu tür kısaltmasının kısaltılan türde görünmeyen bir veya daha fazla bildirilmiş tür parametresi var. Tür kısaltmaları, bildirilmiş tüm tür parametrelerini kısaltılan türde kullanmalıdır. Bir veya daha fazla tür parametresini kaldırmayı düşünün veya temel türü sarmalayan 'type C<'a> = C of ...' gibi somut bir tür tanımını kullanın. + + + + Structs, interfaces, enums and delegates cannot inherit from other types + Yapılar, arabirimler, sabit listeleri ve temsilciler diğer türlerden devralamaz + + + + Types cannot inherit from multiple concrete types + Türler birden çok somut türden devralamaz + + + + Records, union, abbreviations and struct types cannot have the 'AllowNullLiteral' attribute + Kayıtlar, birleşim, kısaltmalar ve yapı türlerinin 'AllowNullLiteral' özniteliği olamaz + + + + Types with the 'AllowNullLiteral' attribute may only inherit from or implement types which also allow the use of the null literal + 'AllowNullLiteral' özniteliğine sahip türler yalnızca null sabit değerinin kullanılmasına da izin veren türlerden devralabilir veya böyle türleri uygulayabilir + + + + Generic types cannot be given the 'StructLayout' attribute + Genel türlere 'StructLayout' özniteliği verilemez + + + + Only structs and classes without primary constructors may be given the 'StructLayout' attribute + Yalnızca birincil oluşturucuları olmayan yapılara ve sınıflara 'StructLayout' özniteliği verilebilir + + + + The representation of this type is hidden by the signature. It must be given an attribute such as [<Sealed>], [<Class>] or [<Interface>] to indicate the characteristics of the type. + Bu türün gösterimi imza ile gizlenir. Türün özelliğini belirtmek için [<Sealed>], [<Class>] veya [<Interface>] gibi bir öznitelik verilmelidir. + + + + Only classes may be given the 'AbstractClass' attribute + 'AbstractClass' özniteliği yalnızca sınıflara verilebilir + + + + Only types representing units-of-measure may be given the 'Measure' attribute + Yalnızca ölçü birimlerini temsil eden türlere 'Measure' özniteliği verilebilir + + + + Accessibility modifiers are not permitted on overrides or interface implementations + Geçersiz kılmalarda veya arabirim uygulamalarında erişilebilirlik değiştiricilerine izin verilmez + + + + Discriminated union types are always sealed + Ayırt edici birleşim türleri her zaman mühürlüdür + + + + Record types are always sealed + Kayıt türleri her zaman mühürlüdür + + + + Assembly code types are always sealed + Bütünleştirilmiş kod türleri her zaman mühürlüdür + + + + Struct types are always sealed + Yapı türleri her zaman mühürlüdür + + + + Delegate types are always sealed + Temsilci türleri her zaman mühürlüdür + + + + Enum types are always sealed + Sabit listesi türleri her zaman mühürlüdür + + + + Interface types and delegate types cannot contain fields + Arabirim türleri ve temsilci türleri alan içeremez + + + + Abbreviated types cannot be given the 'Sealed' attribute + Kısaltılmış türlere 'Sealed' özniteliği verilemez + + + + Cannot inherit a sealed type + Mühürlü tür devralınamıyor + + + + Cannot inherit from interface type. Use interface ... with instead. + Arabirim türünden devralınamıyor. Onun yerine interface ... with kullanın. + + + + Struct types cannot contain abstract members + Struct türleri soyut üyeler içeremez + + + + Interface types cannot be sealed + Arabirim türleri mühürlü olamaz + + + + Delegate specifications must be of the form 'typ -> typ' + Temsilci belirtimleri 'typ -> typ' biçiminde olmalıdır + + + + Delegate specifications must not be curried types. Use 'typ * ... * typ -> typ' for multi-argument delegates, and 'typ -> (typ -> typ)' for delegates returning function values. + Temsilci belirtimleri eksiltimli türler olmamalıdır. Çok bağımsız değişkenli temsilciler için 'typ * ... * typ -> typ' ve işlev değerleri döndüren temsilciler için 'typ -> (typ -> typ)' kullanın. + + + + Literal enumerations must have type int, uint, int16, uint16, int64, uint64, byte, sbyte or char + Sabit değer listelerinde int, uint, int16, uint16, int64, uint64, byte, sbyte veya char türü olmalıdır + + + + This type definition involves an immediate cyclic reference through an abbreviation + Bu tür tanımı, kısaltma aracılığıyla anlık döngüsel başvuru içeriyor + + + + This type definition involves an immediate cyclic reference through a struct field or inheritance relation + Bu tür tanımı, yapı alanı veya devralma ilişkisi aracılığıyla anlık döngüsel başvuru içeriyor + + + + The syntax 'type X with ...' is reserved for augmentations. Types whose representations are hidden but which have members are now declared in signatures using 'type X = ...'. You may also need to add the '[<Sealed>] attribute to the type definition in the signature + 'type X with ...' söz dizimi genişletmeler için ayrılmıştır. Gösterimleri gizli olan ancak üyeleri olan türler artık 'type X = ...' kullanılarak imzalarda bildirilmektedir. İmzadaki tür tanımına '[<Sealed>] özniteliğini de eklemeniz gerekebilir + + + + Members that extend interface, delegate or enum types must be placed in a module separate to the definition of the type. This module must either have the AutoOpen attribute or be opened explicitly by client code to bring the extension members into scope. + Arabirim, temsilci veya sabit listesi türlerini genişleten üyeler türün tanımından ayrı bir modüle yerleştirilmelidir. Bu modülün ya AutoOpen özniteliği olmalıdır ya da uzantı üyelerini kapsama çıkarmak için istemci kodu aracılığıyla açık olarak açılmalıdır. + + + + One or more of the declared type parameters for this type extension have a missing or wrong type constraint not matching the original type constraints on '{0}' + Bu tür uzantısı için bildirilen tür parametrelerinden bir veya daha fazlası, '{0}' üzerindeki özgün tür tür kısıtlamaları ile eşleşmeyen eksik veya yanlış bir tür kısıtlaması içeriyor + + + + Type definitions may only have one 'inherit' specification and it must be the first declaration + Tür tanımlarının yalnızca bir 'inherit' belirtimi olabilir ve bu ilk bildirim olmalıdır + + + + 'let' and 'do' bindings must come before member and interface definitions in type definitions + 'let' ve 'do' bağlamaları tür tanımlarında üye ve arabirim tanımlarından önce gelmelidir + + + + This 'inherit' declaration specifies the inherited type but no arguments. Consider supplying arguments, e.g. 'inherit BaseType(args)'. + Bu 'inherit' bildirimi devralınan türü belirtiyor ancak hiç bağımsız değişken yok. Bağımsız değişkenleri sağlamayı düşünün, örn. 'inherit BaseType(args)'. + + + + This 'inherit' declaration has arguments, but is not in a type with a primary constructor. Consider adding arguments to your type definition, e.g. 'type X(args) = ...'. + Bu 'inherit' bildiriminin bağımsız değişkenleri var, ancak birincil oluşturucuya sahip bir türde bulunmuyor. Tür tanımınıza bağımsız değişkenler eklemeyi düşünün, örn. 'type X(args) = ...'. + + + + This definition may only be used in a type with a primary constructor. Consider adding arguments to your type definition, e.g. 'type X(args) = ...'. + Bu tanım yalnızca birincil oluşturucusu olan bir türde kullanılabilir. Tür tanımınıza bağımsız değişkenler eklemeyi düşünün, örn. 'type X(args) = ...'. + + + + Type abbreviations cannot have augmentations + Tür kısaltmalarının genişletmeleri olamaz + + + + The path '{0}' is a namespace. A module abbreviation may not abbreviate a namespace. + '{0}' yolu bir ad alanı. Modül kısaltması bir ad alanını kısaltamaz. + + + + The type '{0}' is used in an invalid way. A value prior to '{1}' has an inferred type involving '{2}', which is an invalid forward reference. + {0}' türü geçersiz biçimde kullanılmış. '{1}' öğesinden önceki bir değer '{2}' içeren çıkarılmış türüne sahip, bu geçersiz bir ileriye doğru başvurudur. + + + + The member '{0}' is used in an invalid way. A use of '{1}' has been inferred prior to the definition of '{2}', which is an invalid forward reference. + {0}' üyesi geçersiz bir biçimde kullanılmış. '{1}' kullanımı, '{2}' tanımından önce çıkarılmış, bu geçersiz bir ileriye doğru başvurudur. + + + + The attribute 'AutoOpen(\"{0}\")' in the assembly '{1}' did not refer to a valid module or namespace in that assembly and has been ignored + {1}' bütünleştirilmiş kodundaki 'AutoOpen(\"{0}\")' özniteliği bu bütünleştirilmiş koddaki geçerli bir modüle veya ad alanına başvurmadığından yok sayıldı + + + + Undefined value '{0}' + Tanımsız değer '{0}' + + + + Label {0} not found + {0} etiketi bulunamadı + + + + Incorrect number of type arguments to local call + Yerel çağrı için hatalı sayıda tür bağımsız değişkeni + + + + Dynamic invocation of {0} is not supported + Dinamik {0} çağırma desteklenmiyor + + + + Taking the address of a literal field is invalid + Sabit değer alanının adresini almak geçersizdir + + + + This operation involves taking the address of a value '{0}' represented using a local variable or other special representation. This is invalid. + Bu işlem, yerel değişken kullanılarak veya başka bir özel gösterimle sunulan '{0}' değerinin adresini almayı içeriyor. Bu geçersizdir. + + + + Custom marshallers cannot be specified in F# code. Consider using a C# helper function. + F# kodunda özel hazırlayıcılar belirtilemez. C# yardım işlevi kullanmayı düşünün. + + + + The MarshalAs attribute could not be decoded + MarshalAs özniteliğinin kodu çözülemedi + + + + The signature for this external function contains type parameters. Constrain the argument and return types to indicate the types of the corresponding C function. + Bu dış işlevin imzası tür parametreleri içeriyor. Karşılık gelen C işlevi türlerini belirtmek için bağımsız değişkeni ve dönüş türlerini kısıtlayın. + + + + The DllImport attribute could not be decoded + DllImport özniteliğinin kodu çözülemedi + + + + Literal fields cannot be set + Sabit değer alanları ayarlanamaz + + + + GenSetStorage: {0} was represented as a static method but was not an appropriate lambda expression + GenSetStorage: {0} statik metot olarak gösterildi ancak bu uygun bir lambda ifadesi değildi + + + + Mutable variables cannot escape their method + Değişebilir değişkenler metotlarından kaçamaz + + + + Compiler error: unexpected unrealized value + Derleyici hatası: Beklenmeyen gerçekleşmemiş değer + + + + Main module of program is empty: nothing will happen when it is run + Ana program modülü boş: çalıştırıldığında hiçbir şey olmayacak + + + + This type cannot be used for a literal field + Bu tür, sabit değer alanı için kullanılamaz + + + + Unexpected GetSet annotation on a property + Özellikte beklenmeyen GetSet ek açıklaması + + + + The FieldOffset attribute could not be decoded + FieldOffset özniteliğinin kodu çözülemedi + + + + The StructLayout attribute could not be decoded + StructLayout özniteliğinin kodu çözülemedi + + + + The DefaultAugmentation attribute could not be decoded + DefaultAugmentation özniteliğinin kodu çözülemedi + + + + Reflected definitions cannot contain uses of the prefix splice operator '%' + Yansıtılmış tanımlar ön ek ekleme işleci '%' kullanımlarını içeremez + + + + Problem with codepage '{0}': {1} + {0}' kod sayfasında sorun: {1} + + + + Copyright (c) Microsoft Corporation. All Rights Reserved. + Telif hakkı (c) Microsoft Corporation. Tüm hakları saklıdır. + + + + Freely distributed under the MIT Open Source License. https://github.com/Microsoft/visualfsharp/blob/master/License.txt + MIT Açık Kaynak Lisansı altında ücretsiz olarak dağıtılır. https://github.com/Microsoft/visualfsharp/blob/master/License.txt + + + + Name of the output file (Short form: -o) + Çıkış dosyasının adı (Kısa biçimi: -o) + + + + Build a console executable + Çalıştırılabilir konsol dosyası oluştur + + + + Build a Windows executable + Windows yürütülebilir dosyası oluştur + + + + Build a library (Short form: -a) + Kitaplık oluştur (Kısa biçimi: -a) + + + + Build a module that can be added to another assembly + Başka bir derlemeye eklenebilir bir modül oluştur + + + + Delay-sign the assembly using only the public portion of the strong name key + Derlemeyi tanımlayıcı ad anahtarının yalnızca ortak kısmını kullanarak gecikmeli imzala + + + + Public-sign the assembly using only the public portion of the strong name key, and mark the assembly as signed + Tanımlayıcı ad anahtarının yalnızca genel bölümünü kullanarak, bütünleştirilmiş kodu genel olarak imzala ve bütünleştirilmiş kodu imzalanmış olarak işaretle + + + + Write the xmldoc of the assembly to the given file + Bütünleştirilmiş kodun xmldoc dosyasını verilen dosyaya yaz + + + + Specify a strong name key file + Tanımlayıcı ad anahtarı dosyası belirtin + + + + Specify a strong name key container + Tanımlayıcı ad anahtarı kapsayıcısı belirtin + + + + Limit which platforms this code can run on: x86, Itanium, x64, anycpu32bitpreferred, or anycpu. The default is anycpu. + Bu kodun üzerinde çalışabileceği platformları sınırlandırın: x86, Itanium, x64, anycpu32bitpreferred veya anycpu. Varsayılan: anycpu. + + + + Only include optimization information essential for implementing inlined constructs. Inhibits cross-module inlining but improves binary compatibility. + Yalnızca satır içindeki yapıları uygulamak için gerekli iyileştirme bilgilerini ekleyin. Modüller arasında satır içine yerleştirmeyi kısıtlar ancak ikili uyumluluğunu geliştirir. + + + + Don't add a resource to the generated assembly containing F#-specific metadata + F#-özel meta verilerini içeren oluşturulmuş bütünleştirilmiş koda kaynak ekleme + + + + Print the inferred interface of the assembly to a file + Bütünleştirilmiş kodun çıkartılan arabirimini dosyaya yazdır + + + + Reference an assembly (Short form: -r) + Bütünleştirilmiş koda başvur (Kısa biçimi: -r) + + + + Specify a Win32 resource file (.res) + Win32 kaynak dosyası (.res) belirtin + + + + Specify a Win32 manifest file + Win32 bildirim dosyası belirt + + + + Do not include the default Win32 manifest + Varsayılan Win32 bildirimini eklemeyin + + + + Embed all source files in the portable PDB file + Tüm kaynak dosyaları taşınabilir PDB dosyasına ekle + + + + Embed specific source files in the portable PDB file + Belirli kaynak dosyaları taşınabilir PDB dosyasına ekle + + + + Source link information file to embed in the portable PDB file + Taşınabilir PDB dosyasına eklenecek kaynak bağlantı bilgileri dosyası + + + + --embed switch only supported when emitting a Portable PDB (--debug:portable or --debug:embedded) + --embed anahtarı yalnızca Taşınabilir PDB gösterilirken desteklenir (--debug:portable veya --debug:embedded) + + + + --sourcelink switch only supported when emitting a Portable PDB (--debug:portable or --debug:embedded) + --sourcelink anahtarı yalnızca Taşınabilir PDB gösterilirken desteklenir (--debug:portable veya --debug:embedded) + + + + Source file is too large to embed in a portable PDB + Kaynak dosya, taşınabilir PDB dosyasına eklemek için çok büyük + + + + Embed the specified managed resource + Belirtilen yönetilen kaynağı katıştır + + + + Link the specified resource to this assembly where the resinfo format is <file>[,<string name>[,public|private]] + Belirtilen kaynağı bu bütünleştirilmiş koda bağlayın. Burada resinfo biçimi: <dosya>[,<dize adı>[,public|private]] + + + + Emit debug information (Short form: -g) + Hata ayıklama bilgilerini yay (Kısa biçimi: -g) + + + + Specify debugging type: full, portable, embedded, pdbonly. ('{0}' is the default if no debuggging type specified and enables attaching a debugger to a running program, 'portable' is a cross-platform format, 'embedded' is a cross-platform format embedded into the output file). + Hata ayıklama türünü belirtin: full, portable, embedded, pdbonly. (Hata ayıklama türü belirtilmemişse '{0}' varsayılandır ve çalışan bir programa hata ayıklayıcı iliştirmeyi etkinleştirir. 'portable' bir çoklu platform biçimidir, 'embedded' çıkış dosyasına gömülü bir çoklu platform biçimidir). + + + + Enable optimizations (Short form: -O) + İyileştirmeleri etkinleştir (Kısa biçimi: -O) + + + + Enable or disable tailcalls + Tail çağrılarını etkinleştir veya devre dışı bırak + + + + Produce a deterministic assembly (including module version GUID and timestamp) + Belirleyici bir bütünleştirilmiş kod oluşturun (modül sürümü GUID'i ve zaman damgası dahil) + + + + Enable or disable cross-module optimizations + Modüller arası iyileştirmeleri etkinleştir veya devre dışı bırak + + + + Report all warnings as errors + Tüm uyarıları hata olarak bildir + + + + Report specific warnings as errors + Belirli uyarıları hata olarak bildir + + + + Set a warning level (0-5) + Uyarı düzeyini ayarla (0-5) + + + + Disable specific warning messages + Belirli uyarı iletilerini devre dışı bırak + + + + Enable specific warnings that may be off by default + Varsayılan seçenek olarak kapalı olabilen özel uyarıları etkinleştir + + + + Generate overflow checks + Taşma denetimleri oluştur + + + + Define conditional compilation symbols (Short form: -d) + Koşullu derleme simgelerini tanımla (Kısa biçimi: -d) + + + + Ignore ML compatibility warnings + ML uyumluluk uyarılarını yoksay + + + + + Display this usage message (Short form: -?) + Bu kullanım iletisini görüntüle (Kısa biçimi: -?) + + + + Read response file for more options + Daha fazla seçenek için yanıt dosyasını okuyun + + + + Specify the codepage used to read source files + Kaynak dosyaları okumak için kullanılan kod sayfasını belirtin + + + + Output messages in UTF-8 encoding + UTF-8 kodlamasında çıkış iletileri + + + + Output messages with fully qualified paths + Tam yollu çıkış iletileri + + + + Specify a directory for the include path which is used to resolve source files and assemblies (Short form: -I) + Kaynak dosyalarını ve bütünleştirilmiş kodları çözümlemek için kullanılan ekleme yolu için bir dizin belirtin (Kısa biçimi: -I) + + + + Base address for the library to be built + Oluşturulacak kitaplığın temel adresi + + + + Do not reference the default CLI assemblies by default + Varsayılan seçenek olarak varsayılan CLI bütünleştirilmiş kodlarına başvurma + + + + Statically link the F# library and all referenced DLLs that depend on it into the assembly being generated + F# kitaplığını ve ona bağlı tüm başvurulan DLL'leri, oluşturulmakta olan bütünleştirilmiş koda statik olarak bağla + + + + Statically link the given assembly and all referenced DLLs that depend on this assembly. Use an assembly name e.g. mylib, not a DLL name. + Verilen bütünleştirilmiş kodu ve bu bütünleştirilmiş koda bağlı tüm başvurulan DLL'leri, statik olarak bağlayın. DLL adı değil bütünleştirilmiş kod adı kullanın, örn. mylib. + + + + Use a resident background compilation service to improve compiler startup times. + Derleyici başlatma sürelerini geliştirmek için yerleşik bir arka planda derleme hizmetini kullanın. + + + + Name the output debug file + Çıkış hata ayıklama dosyasını adlandır + + + + Resolve assembly references using directory-based rules rather than MSBuild resolution + Bütünleştirilmiş kod başvurularını MSBuild çözümlemesi yerine dizin tabanlı kurallar kullanarak çözümle + + + + Unrecognized target '{0}', expected 'exe', 'winexe', 'library' or 'module' + Tanınmayan hedef '{0}'; 'exe', 'winexe', 'library' veya 'module' bekleniyordu + + + + Unrecognized debug type '{0}', expected 'pdbonly' or 'full' + Tanınmayan hata ayıklama türü: '{0}'; 'pdbonly' veya 'full' bekleniyordu + + + + Invalid warning level '{0}' + Geçersiz uyarı düzeyi '{0}' + + + + Short form of '{0}' + '{0}' öğesinin kısa biçimi + + + + The command-line option '--cliroot' has been deprecated. Use an explicit reference to a specific copy of mscorlib.dll instead. + Komut satırı seçeneği '--cliroot' kullanım dışı bırakıldı. Onun yerine özel bir mscorlib.dll kopyasına açık başvuru kullanın. + + + + Use to override where the compiler looks for mscorlib.dll and framework components + Derleyicinin mscorlib.dll ve çerçeve bileşenlerini aradığı yeri geçersiz kılmak için kullanın + + + + - OUTPUT FILES - + - ÇIKIŞ DOSYALARI - + + + + - INPUT FILES - + - GİRİŞ DOSYALARI - + + + + - RESOURCES - + - KAYNAKLAR - + + + + - CODE GENERATION - + - KOD ÜRETİMİ - + + + + - ADVANCED - + - GELİŞMİŞ - + + + + - MISCELLANEOUS - + - ÇEŞİTLİ - + + + + - LANGUAGE - + - DİL - + + + + - ERRORS AND WARNINGS - + - HATALAR VE UYARILAR - + + + + Unknown --test argument: '{0}' + Bilinmeyen --test bağımsız değişkeni: '{0}' + + + + Unrecognized platform '{0}', valid values are 'x86', 'x64', 'Itanium', 'anycpu32bitpreferred', and 'anycpu' + Tanınmayan platform '{0}', geçerli değerler: 'x86', 'x64', 'Itanium', 'anycpu32bitpreferred' ve 'anycpu' + + + + The command-line option '{0}' is for test purposes only + '{0}' komut satırı seçeneği yalnızca test amaçlıdır + + + + The command-line option '{0}' has been deprecated + Komut satırı seçeneği '{0}' kullanım dışı bırakıldı + + + + The command-line option '{0}' has been deprecated. Use '{1}' instead. + Komut satırı seçeneği '{0}' kullanım dışı bırakıldı. Onun yerine '{1}' kullanın. + + + + The command-line option '{0}' has been deprecated. HTML document generation is now part of the F# Power Pack, via the tool FsHtmlDoc.exe. + Komut satırı seçeneği '{0}' kullanım dışı bırakıldı. HTML belgesi oluşturma şimdi FsHtmlDoc.exe aracı yoluyla F# Power Pack'in bir parçası. + + + + Output warning and error messages in color + Renkli çıkış uyarısı ve hata iletileri + + + + Enable high-entropy ASLR + Yüksek entropili ASLR'yi etkinleştir + + + + Specify subsystem version of this assembly + Bu derlemenin alt sistem sürümünü belirtin + + + + Specify target framework profile of this assembly. Valid values are mscorlib, netcore or netstandard. Default - mscorlib + Bu bütünleştirilmiş kodun hedef çerçeve profilini belirtin. Geçerli değerler: mscorlib, netcore veya netstandard. Varsayılan: - mscorlib + + + + Emit debug information in quotations + Tırnak içindeki hata ayıklama bilgilerini yay + + + + Specify the preferred output language culture name (e.g. es-ES, ja-JP) + Tercih edilen çıkış dili kültür adını (örn. es-ES, ja-JP) belirtin + + + + Don't copy FSharp.Core.dll along the produced binaries + FSharp.Core.dll dosyasını üretilen ikili dosyalarla birlikte kopyalama + + + + Invalid version '{0}' for '--subsystemversion'. The version must be 4.00 or greater. + '--subsystemversion' için geçersiz sürüm '{0}'. Sürümün 4.00 veya üzeri olması gerekir. + + + + Invalid value '{0}' for '--targetprofile', valid values are 'mscorlib', 'netcore' or 'netstandard'. + '--targetprofile' için geçersiz değer: '{0}'; geçerli değerler: 'mscorlib', 'netcore' veya 'netstandard'. + + + + Full name + Tam ad + + + + and {0} other overloads + ve {0} başka aşırı yükleme + + + + union case + birleşim durumu + + + + active pattern result + etkin desen sonucu + + + + active recognizer + etkin tanıyıcı + + + + field + alan + + + + event + olay + + + + property + özellik + + + + extension + uzantı + + + + custom operation + özel işlem + + + + argument + bağımsız değişken + + + + patvar + patvar + + + + namespace + ad alanı + + + + module + modül + + + + namespace/module + ad alanı/modül + + + + from {0} + {0} dalından + + + + also from {0} + ayrıca {0} öğesinden + + + + generated property + oluşturulan özellik + + + + generated type + oluşturulan tür + + + + Found by AssemblyFolders registry key + AssemblyFolders kayıt defteri anahtarı ile bulunur + + + + Found by AssemblyFoldersEx registry key + AssemblyFoldersEx kayıt defteri anahtarı ile bulunur + + + + .NET Framework + .NET Framework + + + + Global Assembly Cache + Genel Bütünleştirilmiş Kod Önbelleği + + + + Recursive class hierarchy in type '{0}' + '{0}' türünde özyinelemeli sınıf hiyerarşisi + + + + Invalid recursive reference to an abstract slot + Soyut yuvaya geçersiz özyinelemeli başvuru + + + + The event '{0}' has a non-standard type. If this event is declared in another CLI language, you may need to access this event using the explicit {1} and {2} methods for the event. If this event is declared in F#, make the type of the event an instantiation of either 'IDelegateEvent<_>' or 'IEvent<_,_>'. + {0}' olayı standard olmayan türe sahip. Bu olay başka bir CLI dilinde tanımlanıyorsa olayın açık {1} ve {2} metotlarını kullanarak bu olaya erişmeniz gerekebilir. Bu olay F# dilinde tanımlanıyorsa, olayın türünü bir 'IDelegateEvent<_>' veya 'IEvent<_,_>' örneklemesi yapın. + + + + The type '{0}' is not accessible from this code location + Bu '{0}' türüne bu kod konumundan erişilemiyor + + + + The union cases or fields of the type '{0}' are not accessible from this code location + '{0}' türünün birleşim durumlarına veya alanlarına bu kod konumundan erişilemiyor + + + + The value '{0}' is not accessible from this code location + '{0}' değerine bu kod konumundan erişilemiyor + + + + The union case '{0}' is not accessible from this code location + '{0}' birleşim durumuna bu kod konumundan erişilemiyor + + + + The record, struct or class field '{0}' is not accessible from this code location + Record, struct veya class alanı '{0}' öğesine bu kod konumundan erişilemiyor + + + + The struct or class field '{0}' is not accessible from this code location + '{0}' yapısına veya sınıf alanına bu kod konumundan erişilemiyor + + + + This construct is experimental + Bu yapı deneyseldir + + + + No Invoke methods found for delegate type + Temsilci türü için bir Invoke metodu bulunamadı + + + + More than one Invoke method found for delegate type + Temsilci türü için birden fazla Invoke metodu bulundu + + + + Delegates are not allowed to have curried signatures + Temsilcilerin eksiltimli imzaları olmasına izin verilmez + + + + Unexpected Expr.TyChoose + Beklenmeyen Expr.TyChoose + + + + Note: Lambda-lifting optimizations have not been applied because of the use of this local constrained generic function as a first class value. Adding type constraints may resolve this condition. + Not: Yerel olarak kısıtlanmış bir genel işlev olan lambda kaldırma iyileştirmelerinin birinci sınıf değer olarak kullanılması nedeniyle bu iyileştirmeler uygulanmamıştır. Tür kısıtlamaları eklemek bu durumu çözebilir. + + + + Identifiers containing '@' are reserved for use in F# code generation + '@' içeren tanımlayıcılar F# kodunu oluşturmada kullanmak için ayrılmıştır + + + + The identifier '{0}' is reserved for future use by F# + '{0}' tanımlayıcısı F# tarafından ileride kullanılmak üzere ayrılmıştır + + + + Missing variable '{0}' + Eksik değişken: '{0}' + + + + Partial active patterns may only generate one result + Kısmen etkin desenler yalnızca bir sonuç oluşturabilir + + + + The type '{0}' is required here and is unavailable. You must add a reference to assembly '{1}'. + Burada '{0}' türü gerekiyor ancak tür bulunamıyor. '{1}' bütünleştirilmiş koduna başvuru eklemeniz gerekiyor. + + + + A reference to the type '{0}' in assembly '{1}' was found, but the type could not be found in that assembly + {1}' bütünleştirilmiş kodunda '{0}' türüne başvuru bulundu, ancak bu tür o bütünleştirilmiş kodda bulunamadı + + + + Internal error or badly formed metadata: not enough type parameters were in scope while importing + İç hata veya hatalı oluşturulmuş meta veri: içeri aktarma sırasında kapsamda yeterli tür parametresi yoktu + + + + A reference to the DLL {0} is required by assembly {1}. The imported type {2} is located in the first assembly and could not be resolved. + {1} bütünleştirilmiş kodu için {0} DLL'sine başvuru gerekli oldu. İçeri aktarılan {2} türü ilk bütünleştirilmiş kodda bulunuyordu ve çözümlenemedi. + + + + An imported assembly uses the type '{0}' but that type is not public + İçeri aktarılmış bir bütünleştirilmiş kod '{0}' türünü kullanıyor bu tür ortak değil + + + + The value '{0}' was marked inline but its implementation makes use of an internal or private function which is not sufficiently accessible + '{0}' değeri satır içi olarak işaretlenmiş ancak uygulamasında yeterince erişilemeyen bir iç veya özel işlev kullanılıyor + + + + The value '{0}' was marked inline but was not bound in the optimization environment + '{0}' değeri satır içi olarak işaretlenmiş ancak iyileştirme ortamında bağlanmamış + + + + Local value {0} not found during optimization + İyileştirme sırasında {0} yerel değeri bulunamadı + + + + A value marked as 'inline' has an unexpected value + 'inline' olarak işaretlenmiş değerde beklenmeyen bir değer var + + + + A value marked as 'inline' could not be inlined + 'inline' olarak işaretlenmiş bir değer satır içine alınamadı + + + + Failed to inline the value '{0}' marked 'inline', perhaps because a recursive value was marked 'inline' + Muhtemelen özyinelemeli bir değer 'inline' olarak işaretlendiği için 'inline' olarak işaretlenmiş '{0}' değeri satır içine alınamadı + + + + Recursive ValValue {0} + Özyinelemeli ValValue {0} + + + + The indentation of this 'in' token is incorrect with respect to the corresponding 'let' + Bu 'in' belirtecinin girintisi kendisine karşılık gelen 'let''e göre hatalı + + + + Possible incorrect indentation: this token is offside of context started at position {0}. Try indenting this token further or using standard formatting conventions. + Olası hatalı girinti: {0} konumundan başlatılan bu belirteç bağlam dışıdır. Bu belirteci daha fazla girintilemeyi veya standart biçimlendirme kurallarını kullanmayı deneyin. + + + + The '|' tokens separating rules of this pattern match are misaligned by one column. Consider realigning your code or using further indentation. + Bu desen eşleşmesinin ayırma kurallarındaki '|' belirteçleri bir sütun kadar yanlış hizalı. Kodunuzu yeniden hizalamayı veya daha fazla girinti kullanmayı düşünün. + + + + Invalid module/expression/type + Geçersiz modül/ifade/tür + + + + Multiple types exist called '{0}', taking different numbers of generic parameters. Provide a type instantiation to disambiguate the type resolution, e.g. '{1}'. + Farklı sayıda genel parametreler alan '{0}' adlı birden çok tür var. Tür çözümleme belirsizliğini gidermek için bir tür örneği sağlayın, örn. '{1}'. + + + + The instantiation of the generic type '{0}' is missing and can't be inferred from the arguments or return type of this member. Consider providing a type instantiation when accessing this type, e.g. '{1}'. + {0}' genel türünün örneklenmesi eksik ve bu üyenin bağımsız değişkenlerinden ya da dönüş türünden çıkartılamıyor. Bu türe erişirken bir tür örneği sağlamayı düşünün, örn. '{1}'. + + + + 'global' may only be used as the first name in a qualified path + 'global' yalnızca tam yoldaki ilk ad olarak kullanılabilir + + + + This is not a constructor or literal, or a constructor is being used incorrectly + Bu bir oluşturucu veya sabit değer değil ya da bir oluşturucu hatalı kullanılıyor + + + + Unexpected empty long identifier + Beklenmeyen boş long tanımlayıcısı + + + + The record type '{0}' does not contain a label '{1}'. + {0}' kayıt türü bir '{1}' etiketi içermiyor. + + + + Invalid field label + Geçersiz alan etiketi + + + + Invalid expression '{0}' + Geçersiz ifade: '{0}' + + + + No constructors are available for the type '{0}' + '{0}' türü için kullanılabilir bir oluşturucu yok + + + + The union type for union case '{0}' was defined with the RequireQualifiedAccessAttribute. Include the name of the union type ('{1}') in the name you are using. + {0}' birleşim durumunun birleşim türü RequireQualifiedAccessAttribute ile tanımlanmış. Kullandığınız ada birleşim türünün adını ('{1}') dahil edin. + + + + The record type for the record field '{0}' was defined with the RequireQualifiedAccessAttribute. Include the name of the record type ('{1}') in the name you are using. + {0}' kayıt alanının kayıt türü RequireQualifiedAccessAttribute ile tanımlanmış. Kullandığınız ada kayıt türünün adını ('{1}') dahil edin. + + + + Unexpected error creating debug information file '{0}' + Hata ayıklama bilgileri dosyası '{0}' oluşturulurken beklenmeyen hata + + + + This number is outside the allowable range for this integer type + Bu sayı, bu tamsayı türü için izin verilen aralığın dışında + + + + '{0}' is not permitted as a character in operator names and is reserved for future use + İşleç adlarında karakter olarak '{0}' kullanılmasına izin verilmez; ileride kullanılmak üzere ayrılmıştır + + + + Unexpected character '{0}' + Beklenmeyen karakter: '{0}' + + + + This byte array literal contains characters that do not encode as a single byte + Bu bayt dizisi sabit değeri tek bayt olarak kodlanmayan karakterler içeriyor + + + + Identifiers followed by '{0}' are reserved for future use + Ardından '{0}' gelen tanımlayıcılar ileride kullanılmak üzere ayrılmıştır + + + + This number is outside the allowable range for 8-bit signed integers + Bu sayı, 8 bit işaretli tamsayılar için izin verilen aralığın dışında + + + + This number is outside the allowable range for hexadecimal 8-bit signed integers + Bu sayı, onaltılık 8 bit işaretli tamsayılar için izin verilen aralığın dışında + + + + This number is outside the allowable range for 8-bit unsigned integers + Bu sayı, 8 bit işaretsiz tamsayılar için izin verilen aralığın dışında + + + + This number is outside the allowable range for 16-bit signed integers + Bu sayı, 16 bit işaretli tamsayılar için izin verilen aralığın dışında + + + + This number is outside the allowable range for 16-bit unsigned integers + Bu sayı, 16 bit işaretsiz tamsayılar için izin verilen aralığın dışında + + + + This number is outside the allowable range for 32-bit signed integers + Bu sayı, 32 bit işaretli tamsayılar için izin verilen aralığın dışında + + + + This number is outside the allowable range for 32-bit unsigned integers + Bu sayı, 32 bit işaretsiz tamsayılar için izin verilen aralığın dışında + + + + This number is outside the allowable range for 64-bit signed integers + Bu sayı, 64 bit işaretli tamsayılar için izin verilen aralığın dışında + + + + This number is outside the allowable range for 64-bit unsigned integers + Bu sayı, 64 bit işaretsiz tamsayılar için izin verilen aralığın dışında + + + + This number is outside the allowable range for signed native integers + Bu sayı, işaretli yerel tamsayılar için izin verilen aralığın dışında + + + + This number is outside the allowable range for unsigned native integers + Bu sayı, işaretsiz yerel tamsayılar için izin verilen aralığın dışında + + + + Invalid floating point number + Geçersiz kayan noktalı sayı + + + + This number is outside the allowable range for decimal literals + Bu sayı, ondalık sabit değerleri için izin verilen aralığın dışında + + + + This number is outside the allowable range for 32-bit floats + Bu sayı, 32 bit kayan noktalı sayılar için izin verilen aralığın dışında + + + + This is not a valid numeric literal. Valid numeric literals include 1, 0x1, 0b0001 (int), 1u (uint32), 1L (int64), 1UL (uint64), 1s (int16), 1y (sbyte), 1uy (byte), 1.0 (float), 1.0f (float32), 1.0m (decimal), 1I (BigInteger). + Bu geçerli bir sayısal sabit değer değil. Geçerli sayısal sabit değerler şunları içerir: 1, 0x1, 0b0001 (int), 1u (uint32), 1L (int64), 1UL (uint64), 1s (int16), 1y (sbyte), 1uy (byte), 1.0 (float), 1.0f (float32), 1.0m (decimal), 1I (BigInteger). + + + + This is not a valid byte literal + Bu geçerli bir bayt sabit değeri değil + + + + This is not a valid character literal + Bu geçerli bir karakter sabit değeri değil + + + + This Unicode encoding is only valid in string literals + Bu Unicode kodlaması yalnızca dize sabit değerlerinde geçerlidir + + + + This token is reserved for future use + Bu belirteç ileride kullanılmak üzere ayrılmıştır + + + + TABs are not allowed in F# code unless the #indent \"off\" option is used + #indent \"off\" seçeneği kullanılmadığı sürece F# kodunda SEKMELERE izin verilmez + + + + Invalid line number: '{0}' + Geçersiz satır numarası '{0}' + + + + #if directive must appear as the first non-whitespace character on a line + #if yönergesi satırdaki ilk boşluk olmayan karakter olarak görünmelidir + + + + #else has no matching #if + #else ile eşleşen bir #if yok + + + + #endif required for #else + #else için #endif gerekli + + + + #else directive must appear as the first non-whitespace character on a line + #else yönergesi satırdaki ilk boşluk olmayan karakter olarak görünmelidir + + + + #endif has no matching #if + #endif ile eşleşen bir #if yok + + + + #endif directive must appear as the first non-whitespace character on a line + #endif yönergesi satırdaki ilk boşluk olmayan karakter olarak görünmelidir + + + + #if directive should be immediately followed by an identifier + #if yönergesinin hemen ardından tanımlayıcı gelmelidir + + + + Syntax error. Wrong nested #endif, unexpected tokens before it. + Sözdizimi hatası. Yanlış girintiye yerleştirilmiş #endif, önünde beklenmeyen belirteçler var. + + + + #! may only appear as the first line at the start of a file. + #! yalnızca bir dosyanın başlangıcında ilk satırda geçebilir. + + + + Expected single line comment or end of line + Tek satırlık açıklama veya satır sonu bekleniyordu + + + + Infix operator member '{0}' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ... + '{0}' Infix işleç üyesinde hiç bağımsız değişken yok. 2 bağımsız değişkenli bir demet bekleniyordu, ör. statik üye (+) (x,y) = ... + + + + Infix operator member '{0}' has {1} initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ... + Infix işleç üyesi '{0}', {1} başlangıç bağımsız değişkenine sahip. 2 bağımsız değişkenli bir demet bekleniyordu, ör. statik üye (+) (x,y) = ... + + + + Infix operator member '{0}' has extra curried arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ... + Infix işleç üyesi '{0}', fazladan eksiltimli bağımsız değişkenlere sahip. 2 bağımsız değişkenli bir demet bekleniyordu, ör. statik üye (+) (x,y) = ... + + + + All record, union and struct types in FSharp.Core.dll must be explicitly labelled with 'StructuralComparison' or 'NoComparison' + FSharp.Core.dll'sindeki tüm kayıt, birleşim ve yapı türleri 'StructuralComparison' veya 'NoComparison' ile açık olarak etiketlenmelidir + + + + The struct, record or union type '{0}' has the 'StructuralComparison' attribute but the type parameter '{1}' does not satisfy the 'comparison' constraint. Consider adding the 'comparison' constraint to the type parameter + Yapı, kayıt veya birleşim türü '{0}', 'StructuralComparison' özniteliğine sahip ancak tür parametresi '{1}' 'comparison' kısıtlamasını karşılamıyor. Tür parametresine 'comparison' kısıtlamasını eklemeyi düşünün + + + + The struct, record or union type '{0}' has the 'StructuralComparison' attribute but the component type '{1}' does not satisfy the 'comparison' constraint + Yapı, kayıt veya birleşim türü '{0}', 'StructuralComparison' özniteliğine sahip ancak bileşen türü '{1}' 'comparison' kısıtlamasını karşılamıyor + + + + The struct, record or union type '{0}' is not structurally comparable because the type parameter {1} does not satisfy the 'comparison' constraint. Consider adding the 'NoComparison' attribute to the type '{2}' to clarify that the type is not comparable + Tür parametresi {1} 'comparison' kısıtlamasını yerine getirmediği için yapı, kayıt veya birleşim türü '{0}' yapısal olarak karşılaştırılabilir değil. Türün karşılaştırılabilir olmadığını netleştirmek için '{2}' türüne 'NoComparison' özniteliği eklemeyi düşünün + + + + The struct, record or union type '{0}' is not structurally comparable because the type '{1}' does not satisfy the 'comparison' constraint. Consider adding the 'NoComparison' attribute to the type '{2}' to clarify that the type is not comparable + {1}' türü 'comparison' kısıtlamasını yerine getirmediği için yapı, kayıt veya birleşim türü '{0}' yapısal olarak karşılaştırılabilir değil. Türün karşılaştırılabilir olmadığını netleştirmek için '{2}' türüne 'NoComparison' özniteliği eklemeyi düşünün + + + + The struct, record or union type '{0}' does not support structural equality because the type parameter {1} does not satisfy the 'equality' constraint. Consider adding the 'NoEquality' attribute to the type '{2}' to clarify that the type does not support structural equality + Tür parametresi {1} 'equality' kısıtlamasını yerine getirmediği için yapı, kayıt veya birleşim türü '{0}' yapısal eşitliği desteklemez. Türün yapısal eşitliği desteklemediğini netleştirmek için '{2}' türüne 'NoEquality' özniteliği eklemeyi düşünün + + + + The struct, record or union type '{0}' does not support structural equality because the type '{1}' does not satisfy the 'equality' constraint. Consider adding the 'NoEquality' attribute to the type '{2}' to clarify that the type does not support structural equality + {1}' türü 'equality' kısıtlamasını yerine getirmediği için yapı, kayıt veya birleşim türü '{0}' yapısal eşitliği desteklemez. Türün yapısal eşitliği desteklemediğini netleştirmek için '{2}' türüne 'NoEquality' özniteliği eklemeyi düşünün + + + + The struct, record or union type '{0}' has the 'StructuralEquality' attribute but the type parameter '{1}' does not satisfy the 'equality' constraint. Consider adding the 'equality' constraint to the type parameter + Yapı, kayıt veya birleşim türü '{0}', 'StructuralEquality' özniteliğine sahip ancak tür parametresi '{1}' 'equality' kısıtlamasını karşılamıyor. Tür parametresine 'equality' kısıtlamasını eklemeyi düşünün + + + + The struct, record or union type '{0}' has the 'StructuralEquality' attribute but the component type '{1}' does not satisfy the 'equality' constraint + Yapı, kayıt veya birleşim türü '{0}', 'StructuralEquality' özniteliğine sahip ancak bileşen türü '{1}' 'equality' kısıtlamasını karşılamıyor + + + + Each argument of the primary constructor for a struct must be given a type, for example 'type S(x1:int, x2: int) = ...'. These arguments determine the fields of the struct. + Bir struct türünün birincil oluşturucusunun her bağımsız değişkenine bir tür verilmelidir, örneğin 'type S(x1:int, x2: int) = ...'. Bu bağımsız değişkenler yapının alanlarını belirler. + + + + The value '{0}' is unused + '{0}' değeri kullanılmıyor + + + + The recursive object reference '{0}' is unused. The presence of a recursive object reference adds runtime initialization checks to members in this and derived types. Consider removing this recursive object reference. + Özyinelemeli nesne başvurusu '{0}' kullanılmıyor. Özyinelemeli nesne başvurusunun varlığı, bu ve bundan türetilmiş türlerdeki üyelere çalışma zamanı başlatma denetimleri ekler. Bu özyinelemeli nesne başvurusunu kaldırmayı değerlendirin. + + + + A getter property may have at most one argument group + Alıcı özelliğinin en çok bir bağımsız değişken grubu olabilir + + + + A setter property may have at most two argument groups + Ayarlayıcı özelliğinin en çok iki bağımsız değişken grubu olabilir + + + + Invalid property getter or setter + Geçersiz özellik alıcı veya ayarlayıcı + + + + An indexer property must be given at least one argument + Dizin erişimcisi özelliğine en az bir bağımsız değişken verilmelidir + + + + This operation accesses a mutable top-level value defined in another assembly in an unsupported way. The value cannot be accessed through its address. Consider copying the expression to a mutable local, e.g. 'let mutable x = ...', and if necessary assigning the value back after the completion of the operation + Bu işlem, başka bir bütünleştirilmiş kodda desteklenmeyen bir şekilde tanımlanmış değiştirilebilen bir üst düzey değere erişiyor. Değere adresi üzerinden erişilemiyor. İfadeyi değiştirilebilen bir yerel değere kopyalamayı, örn. 'let mutable x = ...' ve gerekirse işlem tamamlandıktan sonra değeri geri atamayı düşünün + + + + Remove spaces between the type name and type parameter, e.g. \"type C<'T>\", not type \"C <'T>\". Type parameters must be placed directly adjacent to the type name. + Tür parametreleri doğrudan tür adının bitişiğine yerleştirilmelidir, örn. type \"C <'T>\" değil \"type C<'T>\" + + + + Remove spaces between the type name and type parameter, e.g. \"C<'T>\", not \"C <'T>\". Type parameters must be placed directly adjacent to the type name. + Tür bağımsız değişkenleri doğrudan tür adının bitişiğine yerleştirilmelidir, örn. \"C <'T>\" değil \"C<'T>\" + + + + The use of the type syntax 'int C' and 'C <int>' is not permitted here. Consider adjusting this type to be written in the form 'C<int>' + 'int C' ve 'C <int>' tür sözdizimi kullanımına burada izin verilmez. Bu türü 'C<int>' biçiminde yazılacak şekilde ayarlamayı düşünün + + + + The module/namespace '{0}' from compilation unit '{1}' did not contain the module/namespace '{2}' + {1}' derleme birimindeki '{0}' modülü/ad alanı '{2}' modülünü/ad alanını içermiyordu + + + + The module/namespace '{0}' from compilation unit '{1}' did not contain the val '{2}' + {1}' derleme birimindeki '{0}' modülü/ad alanı '{2}' değerini içermiyordu + + + + The module/namespace '{0}' from compilation unit '{1}' did not contain the namespace, module or type '{2}' + {1}' derleme birimindeki '{0}' modülü/ad alanı '{2}' ad alanını, modülünü veya türünü içermiyordu + + + + The 'UseNullAsTrueValue' attribute flag may only be used with union types that have one nullary case and at least one non-nullary case + 'UseNullAsTrueValue' öznitelik bayrağı yalnızca bir adet işlenensiz durumu ve en az bir adet işlenenli durumu olan birleşim türleriyle kullanılabilir + + + + The parameter '{0}' was inferred to have byref type. Parameters of byref type must be given an explicit type annotation, e.g. 'x1: byref<int>'. When used, a byref parameter is implicitly dereferenced. + '{0}' parametresinin byref türüne sahip olduğu çıkartıldı. byref türündeki parametrelerin açık bir türün ek açıklamasında verilmesi gerekir, örn. 'x1: byref<int>'. Kullanıldığında, örtük olarak byref parametresinin başvurusu kaldırılır. + + + + The generic member '{0}' has been used at a non-uniform instantiation prior to this program point. Consider reordering the members so this member occurs first. Alternatively, specify the full type of the member explicitly, including argument types, return type and any additional generic parameters and constraints. + '{0}' genel üyesi, bu program noktasından önce düzenli olmayan bir örneklemede kullanıldı. Bu üye önce olacak şekilde üyeleri yeniden sıralamayı düşünün. Alternatif olarak, bağımsız değişken türleri, dönüş türü ve diğer ek genel parametreler ve kısıtlamalar dahil üyenin tam türünü açık olarak belirtin. + + + + The attribute '{0}' appears in both the implementation and the signature, but the attribute arguments differ. Only the attribute from the signature will be included in the compiled code. + '{0}' özniteliği hem uygulamada hem de imzada görünüyor ancak özniteliğin bağımsız değişkenleri farklı. Derlenmiş koda yalnızca imzadaki öznitelik eklenecek. + + + + Cannot call an abstract base member: '{0}' + Soyut bir temel üye çağrılamaz: '{0}' + + + + Could not resolve the ambiguity in the use of a generic construct with an 'unmanaged' constraint at or near this position + 'unmanaged' kısıtlaması olan bir genel yapının bu konumda veya yakınında kullanılmasındaki belirsizlik çözümlenemedi + + + + This construct is for ML compatibility. {0}. You can disable this warning by using '--mlcompatibility' or '--nowarn:62'. + Bu yapı ML uyumluluğu içindir. {0}. '--mlcompatibility' veya '--nowarn:62' kullanarak bu uyarıyı devre dışı bırakabilirsiniz. + + + + The type '{0}' has been marked as having an Explicit layout, but the field '{1}' has not been marked with the 'FieldOffset' attribute + {0}' türünün Açık düzeni olduğu işaretlenmiş, ancak '{1}' alanı 'FieldOffset' özniteliğiyle işaretlenmemiş + + + + Interfaces inherited by other interfaces should be declared using 'inherit ...' instead of 'interface ...' + Diğer arabirimlerce devralınan arabirimler 'interface ...' yerine 'inherit ...' kullanılarak tanımlanmalıdır + + + + Invalid prefix operator + Geçersiz ön ek işleci + + + + Invalid operator definition. Prefix operator definitions must use a valid prefix operator name. + Geçersiz işleç tanımı. Ön ek işleç tanımları geçerli bir ön ek işleci adı kullanmalıdır. + + + + The file extensions '.ml' and '.mli' are for ML compatibility + '.ml' ve '.mli' dosya uzantıları ML uyumluluğu içindir + + + + Consider using a file with extension '.ml' or '.mli' instead + Bunun yerine uzantısı '.ml' veya '.mli' olan dosya kullanmayı düşünün + + + + Active pattern '{0}' is not a function + '{0}' etkin deseni bir işlev değil + + + + Active pattern '{0}' 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' + '{0}' etkin deseninde, giriş tarafından belirlenmeyen tür değişkenleri içeren bir sonuç türü var. Sonuç örneğinin belirtilmemesi bunun yaygın görülen nedenidir, örn. 'let (|A|B|) (x:int) = A x'. Bu durum, tür kısıtlaması ile düzeltilebilir, örn. 'let (|A|B|) (x:int) : Choice<int,unit> = A x' + + + + The FieldOffset attribute can only be placed on members of types marked with the StructLayout(LayoutKind.Explicit) + FieldOffset özniteliği yalnızca StructLayout(LayoutKind.Explicit) ile işaretlenmiş türlerdeki üyelere koyulabilir + + + + Optional arguments must come at the end of the argument list, after any non-optional arguments + İsteğe bağlı bağımsız değişkenler bağımsız değişken listesinin sonunda, isteğe bağlı olmayan tüm bağımsız değişkenlerden sonra gelmelidir + + + + Attribute 'System.Diagnostics.ConditionalAttribute' is only valid on methods or attribute classes + 'System.Diagnostics.ConditionalAttribute' özniteliği yalnızca metotlarda veya öznitelik sınıflarında geçerlidir + + + + Extension members cannot provide operator overloads. Consider defining the operator as part of the type definition instead. + Uzantı üyeleri işleç aşırı yüklemeleri sağlayamaz. Bunun yerine işleci tür tanımının parçası olarak tanımlamayı düşünün. + + + + The name of the MDB file must be <assembly-file-name>.mdb. The --pdb option will be ignored. + MDB dosyasının adı <bütünleştirilmiş kod-dosyası-adı>.mdb olmalıdır. --pdb seçeneği yok sayılacak. + + + + MDB generation failed. Could not find compatible member {0} + MDB oluşturulamadı. Uyumlu üye {0} bulunamadı + + + + Cannot generate MDB debug information. Failed to load the 'MonoSymbolWriter' type from the 'Mono.CompilerServices.SymbolWriter.dll' assembly. + MDB hata ayıklama bilgileri oluşturulamıyor. 'MonoSymbolWriter' türü 'Mono.CompilerServices.SymbolWriter.dll' bütünleştirilmiş kodundan yüklenemedi. + + + + The union case named '{0}' conflicts with the generated type '{1}' + {0}' adlı birleşim durumu oluşturulan '{1}' türüyle çakışıyor + + + + ReflectedDefinitionAttribute may not be applied to an instance member on a struct type, because the instance member takes an implicit 'this' byref parameter + Örnek üyesi örtük 'this' byref parametresini aldığı için ReflectedDefinitionAttribute, yapı türündeki bir örnek üyesine uygulanamaz + + + + DLLImport bindings must be static members in a class or function definitions in a module + DLLImport bağlamaları bir sınıf içinde statik üyeler veya bir modül içinde işlev tanımları olmalıdır + + + + When mscorlib.dll or FSharp.Core.dll is explicitly referenced the {0} option must also be passed + mscorlib.dll veya FSharp.Core.dll dosyalarına açık olarak başvurulduğunda {0} seçeneği de geçirilmelidir + + + + FSharp.Core.sigdata not found alongside FSharp.Core. File expected in {0}. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required. + FSharp.Core.sigdata, FSharp.Core ile birlikte bulunamadı. Dosyanın {0} içinde olması bekleniyordu. Bu dosyayı gerektirmeyen daha yeni bir FSharp.Core sürümüne yükseltmeniz önerilir. + + + + File '{0}' not found alongside FSharp.Core. File expected in {1}. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required. + {0}' dosyası FSharp.Core ile birlikte bulunamadı. Dosyanın {1} içinde olması bekleniyordu. Bu dosyayı gerektirmeyen daha yeni bir FSharp.Core sürümüne yükseltmeniz önerilir. + + + + Filename '{0}' contains invalid character '{1}' + Dosya adı '{0}', geçersiz '{1}' karakterini içeriyor + + + + 'use!' bindings must be of the form 'use! <var> = <expr>' + 'use!' bağlamaları 'use! <var> = <expr>' biçiminde olmalıdır + + + + Inner generic functions are not permitted in quoted expressions. Consider adding some type constraints until this function is no longer generic. + Tırnak içindeki ifadelerde iç genel işlevlere izin verilmez. Bu işlev artık genel olmayacak şekilde bazı tür kısıtlamaları eklemeyi düşünün. + + + + The type '{0}' is not a valid enumerator type , i.e. does not have a 'MoveNext()' method returning a bool, and a 'Current' property + '{0}' türü geçerli bir numaralandırıcı türü değil, yani bool döndüren bir 'MoveNext()' metodu ve 'Current' özelliği yok + + + + End of file in triple-quote string begun at or before here + Üç tırnak işaretli dizede dosya sonu burada veya daha önce başlatıldı + + + + End of file in triple-quote string embedded in comment begun at or before here + Üç tırnak işaretli açıklamaya gömülü dizede dosya sonu burada veya daha önce başlatıldı + + + + This type test or downcast will ignore the unit-of-measure '{0}' + Bu tür testi veya alt türe çevirme işlemi '{0}' ölçü birimini yok sayacak + + + + Expected type argument or static argument + Tür bağımsız değişkeni veya statik bağımsız değişken bekleniyor + + + + Unmatched '<'. Expected closing '>' + Eşleşmeyen '<'. Kapanış karakteri '>' bekleniyordu + + + + Unexpected quotation operator '<@' in type definition. If you intend to pass a verbatim string as a static argument to a type provider, put a space between the '<' and '@' characters. + Tür tanımında beklenmeyen alıntı işleci '<@'. Statik bağımsız değişken olarak bir tam dizeyi tür sağlayıcısına geçirmeyi düşünüyorsanız '<' ve '@' karakterleri arasına boşluk koyun. + + + + Attempted to parse this as an operator name, but failed + Bu bir işleç adı olarak ayrıştırılmaya çalışıldı, ancak yapılamadı + + + + \U{0} is not a valid Unicode character escape sequence + \U{0} geçerli bir Unicode karakter kaçış sırası değil + + + + '{0}' must be applied to an argument of type '{1}', but has been applied to an argument of type '{2}' + '{0}', '{1}' türündeki bağımsız değişkene uygulanmalıdır, ancak '{2}' türündeki bağımsız değişkene uygulanmış + + + + '{0}' can only be applied to optional arguments + '{0}' sadece isteğe bağlı bağımsız değişkenlere uygulanabilir + + + + The specified .NET Framework version '{0}' is not supported. Please specify a value from the enumeration Microsoft.Build.Utilities.TargetDotNetFrameworkVersion. + Belirtilen '{0}' .NET Framework sürümü desteklenmiyor. Lütfen Microsoft.Build.Utilities.TargetDotNetFrameworkVersion sabit listesinden bir değer belirtin. + + + + Invalid Magic value in CLR Header + CLR Üst Bilgisindeki Magic değeri geçersiz + + + + Bad image format + Bozuk görüntü biçimi + + + + Private key expected + Özel anahtar bekleniyordu + + + + RSA key expected + RSA anahtarı bekleniyordu + + + + Invalid bit Length + Bit Uzunluğu geçersiz + + + + Invalid RSAParameters structure - '{{0}}' expected + Geçersiz RSAParameters yapısı - ' {{0}}' bekleniyordu + + + + Invalid algId - 'Exponent' expected + Geçersiz algId - 'Üs' bekleniyordu + + + + Invalid signature size + Geçersiz imza boyutu + + + + No signature directory + İmza dizini yok + + + + Invalid Public Key blob + Ortak Anahtar blobu geçersiz + + + + Exiting - too many errors + Çıkılıyor - çok fazla hata var + + + + The documentation file has no .xml suffix + Belge dosyasında bir .xml son eki yok + + + + No implementation files specified + Bir uygulama dosyası belirtilmedi + + + + The attribute {0} specified version '{1}', but this value is invalid and has been ignored + {0} özniteliğinde '{1}' sürümü belirtildi, ancak bu değer geçersiz olduğundan yoksayıldı + + + + Conflicting options specified: 'win32manifest' and 'win32res'. Only one of these can be used. + Çakışan seçenekler belirtildi: 'win32manifest' ve 'win32res'. Bunlardan yalnızca biri kullanılabilir. + + + + The code in assembly '{0}' makes uses of quotation literals. Static linking may not include components that make use of quotation literals unless all assemblies are compiled with at least F# 4.0. + '{0}' bütünleştirilmiş kodundaki kod tırnak içinde sabit değerler kullanıyor. Bütün bütünleştirilmiş kodlar en az F# 4.0 ile derlenmediği sürece, statik bağlama tırnak içinde sabit değerler kullanan bileşenler içeremez. + + + + Code in this assembly makes uses of quotation literals. Static linking may not include components that make use of quotation literals unless all assemblies are compiled with at least F# 4.0. + Bu bütünleştirilmiş kod tırnak içinde sabit değerler kullanıyor. Tüm bütünleştirilmiş kodlar en az F# 4.0 ile derlenmediği sürece, statik bağlama tırnak içinde sabit değerler kullanan bileşenler içeremez. + + + + Static linking may not include a .EXE + Statik bağlama .EXE içeremez + + + + Static linking may not include a mixed managed/unmanaged DLL + Statik bağlama karışık bir yönetilen/yönetilmeyen DLL içeremez + + + + Ignoring mixed managed/unmanaged assembly '{0}' during static linking + Yönetilen/yönetilmeyen karışık '{0}' bütünleştirilmiş kodu statik bağlama sırasında yok sayılıyor + + + + Assembly '{0}' was referenced transitively and the assembly could not be resolved automatically. Static linking will assume this DLL has no dependencies on the F# library or other statically linked DLLs. Consider adding an explicit reference to this DLL. + '{0}' bütünleştirilmiş koduna geçişli olarak başvuruldu ve bütünleştirilmiş kod otomatik olarak çözümlenemedi. Statik bağlantı, bu DLL'nin F# kitaplığına veya statik bağlanmış diğer DLL'lere hiçbir bağımlılığı olmadığını kabul eder. Bu DLL'ye açık başvuru eklemeyi düşünün. + + + + Assembly '{0}' not found in dependency set of target binary. Statically linked roots should be specified using an assembly name, without a DLL or EXE extension. If this assembly was referenced explicitly then it is possible the assembly was not actually required by the generated binary, in which case it should not be statically linked. + '{0}' bütünleştirilmiş kodu hedef ikilinin bağımlılık kümesinde bulunamadı. Statik olarak bağlanmış kökler, DLL veya EXE uzantısı olmadan bütünleştirilmiş kod adı kullanılarak belirtilmelidir. Bu bütünleştirilmiş koda açık olarak başvurulmuşsa bütünleştirilmiş koda aslında oluşturulan ikili dosya tarafından ihtiyaç duyulmamış olması mümkündür ve bu durumda statik olarak bağlanmamalıdır. + + + + The key file '{0}' could not be opened + Anahtar dosyası '{0}' açılamadı + + + + A problem occurred writing the binary '{0}': {1} + {0}' ikili dosyası yazılırken bir sorun oluştu: {1} + + + + The 'AssemblyVersionAttribute' has been ignored because a version was given using a command line option + Komut satırı seçeneği kullanılarak sürüm verildiği için 'AssemblyVersionAttribute' yok sayıldı + + + + Error emitting 'System.Reflection.AssemblyCultureAttribute' attribute -- 'Executables cannot be satellite assemblies, Culture should always be empty' + 'System.Reflection.AssemblyCultureAttribute' özniteliği yayılırken hata oluştu -- 'Çalıştırılabilir dosyalar uydu bütünleştirilmiş kodlar olamaz, Kültür her zaman boş olmalıdır' + + + + Option '--delaysign' overrides attribute 'System.Reflection.AssemblyDelaySignAttribute' given in a source file or added module + '--delaysign' seçeneği kaynak dosyasında veya ekli modülde verilen 'System.Reflection.AssemblyDelaySignAttribute' özniteliğini geçersiz kılar + + + + Option '--keyfile' overrides attribute 'System.Reflection.AssemblyKeyFileAttribute' given in a source file or added module + '--keyfile' seçeneği kaynak dosyasında veya ekli modülde verilen 'System.Reflection.AssemblyKeyFileAttribute' özniteliğini geçersiz kılar + + + + Option '--keycontainer' overrides attribute 'System.Reflection.AssemblyNameAttribute' given in a source file or added module + '--keycontainer' seçeneği kaynak dosyasında veya ekli modülde verilen 'System.Reflection.AssemblyNameAttribute' özniteliğini geçersiz kılar + + + + The assembly '{0}' is listed on the command line. Assemblies should be referenced using a command line flag such as '-r'. + '{0}' bütünleştirilmiş kodu komut satırında listeleniyor. Bütünleştirilmiş kodlara '-r' gibi bir komut satırı bayrağı kullanılarak başvurulmalıdır. + + + + The resident compilation service was not used because a problem occured in communicating with the server. + Sunucuyla iletişimde bir sorun oluştuğu için yerleşik derleme hizmeti kullanılmadı. + + + + Problem with filename '{0}': Illegal characters in path. + '{0}' dosya adında sorun: Yolda geçersiz karakterler var. + + + + Passing a .resx file ({0}) as a source file to the compiler is deprecated. Use resgen.exe to transform the .resx file into a .resources file to pass as a --resource option. If you are using MSBuild, this can be done via an <EmbeddedResource> item in the .fsproj project file. + .resx dosyasını ({0}) kaynak dosya olarak derleyiciye geçirmek kullanım dışı bırakıldı. .resx dosyasını bir --resource seçeneği olarak geçirmek üzere .resources dosyasına dönüştürmek için resgen.exe kullanın. MSBuild kullanıyorsanız, .fsproj proje dosyasındaki <EmbeddedResource> öğesi aracılığıyla bu yapılabilir. + + + + Static linking may not be used on an assembly referencing mscorlib (e.g. a .NET Framework assembly) when generating an assembly that references System.Runtime (e.g. a .NET Core or Portable assembly). + System.Runtime'a başvuran bir bütünleştirilmiş kod oluşturulurken (örneğin, .NET Core veya Taşınabilir bütünleştirilmiş kod), mscorlib'e başvuran bir bütünleştirilmiş kodda (örneğin, .NET Framework bütünleştirilmiş kodu) statik bağlama kullanılamaz. + + + + An {0} specified version '{1}', but this value is a wildcard, and you have requested a deterministic build, these are in conflict. + Bir {0} tarafından '{1}' sürümü belirtildi. Ancak siz belirleyici bir derleme istediniz, bu ise bir joker karakter ve bunlar çakışıyor. + + + + Determinstic builds only support portable PDBs (--debug:portable or --debug:embedded) + Belirleyici derlemeler yalnızca taşınabilir PDB'leri (--debug:portable veya --debug:embedded) destekler + + + + Character '{0}' is not allowed in provided namespace name '{1}' + {1}' sağlanan ad alanı adında '{0}' karakterine izin verilmez + + + + The provided type '{0}' returned a member with a null or empty member name + '{0}' sağlanan türü null veya boş üye adı olan bir üye döndürdü + + + + The provided type '{0}' returned a null member + '{0}' sağlanan türü bir null üye döndürdü + + + + The provided type '{0}' member info '{1}' has null declaring type + {0}' sağlanan türünün '{1}' üye bilgisinde null tanımlama türü var + + + + The provided type '{0}' has member '{1}' which has declaring type '{2}'. Expected declaring type to be the same as provided type. + {0}' sağlanan türünde '{2}' tanımlama türüne sahip '{1}' üyesi var. Tanımlama türünün sağlanan türle aynı olması bekleniyordu. + + + + Referenced assembly '{0}' has assembly level attribute '{1}' but no public type provider classes were found + Başvurulan '{0}' bütünleştirilmiş kodunda '{1}' bütünleştirilmiş kod düzeyi özniteliği var ancak hiç ortak tür sağlayıcısı sınıfı bulunamadı + + + + Type '{0}' from type provider '{1}' has an empty namespace. Use 'null' for the global namespace. + {1}' tür sağlayıcısından '{0}' türünün boş ad alanı var. Genel ad alanı için 'null' kullanın. + + + + Empty namespace found from the type provider '{0}'. Use 'null' for the global namespace. + '{0}' tür sağlayıcısından boş ad alanı bulundu. Genel ad alanı için 'null' kullanın. + + + + Provided type '{0}' has 'IsGenericType' as true, but generic types are not supported. + '{0}' sağlanan türünde 'IsGenericType' true olarak mevcut, ancak genel türler desteklenmiyor. + + + + Provided type '{0}' has 'IsArray' as true, but array types are not supported. + '{0}' sağlanan türünde 'IsArray' true olarak mevcut, ancak dizi türleri desteklenmiyor. + + + + Invalid member '{0}' on provided type '{1}'. Provided type members must be public, and not be generic, virtual, or abstract. + {1}' sağlanan türünde geçersiz '{0}' üyesi. Sağlanan tür üyeleri genel, sanal veya soyut değil ortak olmalıdır. + + + + Invalid member '{0}' on provided type '{1}'. Only properties, methods and constructors are allowed + {1}' sağlanan türünde geçersiz '{0}' üyesi. Yalnızca özelliklere, metotlara ve oluşturuculara izin verilir + + + + Property '{0}' on provided type '{1}' has CanRead=true but there was no value from GetGetMethod() + {1}' sağlanan türündeki '{0}' özelliğinde CanRead=true var, ancak GetGetMethod() yönteminden bir değer yok + + + + Property '{0}' on provided type '{1}' has CanRead=false but GetGetMethod() returned a method + {1}' sağlanan türündeki '{0}' özelliğinde CanRead=false var, ancak GetGetMethod() metodu bir metot döndürdü + + + + Property '{0}' on provided type '{1}' has CanWrite=true but there was no value from GetSetMethod() + {1}' sağlanan türündeki '{0}' özelliğinde CanWrite=true var, ancak GetSetMethod() yönteminden bir değer yok + + + + Property '{0}' on provided type '{1}' has CanWrite=false but GetSetMethod() returned a method + {1}' sağlanan türündeki '{0}' özelliğinde CanWrite=false var, ancak GetSetMethod() metodu bir metot döndürdü + + + + One or more errors seen during provided type setup + Sağlanan tür ayarları sırasında bir veya daha fazla hata görüldü + + + + Unexpected exception from provided type '{0}' member '{1}': {2} + {0}' sağlanan türü '{1}' üyesinden beklenmeyen özel durum: {2} + + + + Unsupported constant type '{0}'. Quotations provided by type providers can only contain simple constants. The implementation of the type provider may need to be adjusted by moving a value declared outside a provided quotation literal to be a 'let' binding inside the quotation literal. + Desteklenmeyen sabit türü '{0}'. Tür sağlayıcıları tarafından sağlanan alıntılar yalnızca basit sabitler içerebilir. Tür sağlayıcısı uygulamasının; sağlanmış alıntı sabit değerinin dışında bildirilen bir değer, alıntı sabit değerinin içindeki bir 'let' bağlaması olacak şekilde taşınarak ayarlanması gerekebilir. + + + + Unsupported expression '{0}' from type provider. If you are the author of this type provider, consider adjusting it to provide a different provided expression. + Tür sağlayıcısından desteklenmeyen '{0}' ifadesi. Bu tür sağlayıcısının yazarı sizseniz, farklı bir sağlanan ifade sağlayacak şekilde ayarlamayı düşünün. + + + + Expected provided type named '{0}' but provided type has 'Name' with value '{1}' + {0}' adlı sağlanan tür bekleniyordu ancak sağlanan türde '{1}' değerli 'Name' öğesi var + + + + Event '{0}' on provided type '{1}' has no value from GetAddMethod() + {1}' sağlanan türündeki '{0}' olayının bir GetAddMethod() değeri yok + + + + Event '{0}' on provided type '{1}' has no value from GetRemoveMethod() + {1}' sağlanan türündeki '{0}' olayının bir GetRemoveMethod() değeri yok + + + + Assembly attribute '{0}' refers to a designer assembly '{1}' which cannot be loaded or doesn't exist. {2} + Bütünleştirilmiş kod özniteliği '{0}', yüklenemeyen veya var olmayan '{1}' tasarımcı bütünleştirilmiş koduna başvuruyor. {2} + + + + The type provider does not have a valid constructor. A constructor taking either no arguments or one argument of type 'TypeProviderConfig' was expected. + Tür sağlayıcısının geçerli bir oluşturucusu yok. Hiç bağımsız değişken almayan veya 'TypeProviderConfig' türü bağımsız değişken alan bir oluşturucu bekleniyordu. + + + + The type provider '{0}' reported an error: {1} + Tür sağlayıcısı '{0}' bir hata bildirdi: {1} + + + + The type provider '{0}' used an invalid parameter in the ParameterExpression: {1} + Tür sağlayıcısı '{0}', ParameterExpression ifadesinde geçersiz parametre kullandı: {1} + + + + The type provider '{0}' provided a method with a name '{1}' and metadata token '{2}', which is not reported among its methods of its declaring type '{3}' + Tür sağlayıcısı '{0}', kendisinin '{3}' tanımlayan türünün metotları arasında bildirilmeyen '{1}' adlı ve meta veri belirteci '{2}' olan bir metot sağladı + + + + The type provider '{0}' provided a constructor which is not reported among the constructors of its declaring type '{1}' + Tür sağlayıcısı '{0}', kendisinin '{1}' tanımlayan türünün oluşturucuları arasında bildirilmeyen bir oluşturucu sağladı + + + + A direct reference to the generated type '{0}' is not permitted. Instead, use a type definition, e.g. 'type TypeAlias = <path>'. This indicates that a type provider adds generated types to your assembly. + '{0}' oluşturulmuş türüne doğrudan başvuruya izin verilmez. Onun yerine tür tanımını kullanın. örn. 'type TypeAlias = <yol>'. Bu, oluşturulmuş türleri bütünleştirilmiş kodunuza bir tür sağlayıcısının eklediğini gösterir. + + + + Expected provided type with path '{0}' but provided type has path '{1}' + Yolu '{0}' olan bir sağlanan tür bekleniyordu ancak sağlanan türde '{1}' yolu var + + + + Unexpected 'null' return value from provided type '{0}' member '{1}' + {0}' sağlanan türü '{1}' üyesinden beklenmeyen 'null' dönüş değeri + + + + Unexpected exception from member '{0}' of provided type '{1}' member '{2}': {3} + {1}' sağlanan türü '{2}' üyesinin '{0}' üyesinden beklenmeyen özel durum: {3} + + + + Nested provided types do not take static arguments or generic parameters + İç içe sağlanan türler bağımsız değişken veya genel parametre almaz + + + + Invalid static argument to provided type. Expected an argument of kind '{0}'. + Sağlanan türe, geçersiz statik bağımsız değişken verildi. '{0}' türünden bir bağımsız değişken bekleniyordu. + + + + An error occured applying the static arguments to a provided type + Sağlanan türe statik bağımsız değişkenler uygulanırken bir hata oluştu + + + + Unknown static argument kind '{0}' when resolving a reference to a provided type or method '{1}' + Sağlanan '{1}' türüne yapılan bir başvuru çözümlenirken '{0}' türünde bilinmeyen statik bağımsız değişken + + + + invalid namespace for provided type + sağlanan tür için geçersiz ad alanı + + + + invalid full name for provided type + sağlanan tür için geçersiz tam ad + + + + The type provider returned 'null', which is not a valid return value from '{0}' + Tür sağlayıcısı 'null' döndürdü; bu '{0}' öğesinden gelen geçerli bir dönüş değeri değil + + + + The type provider constructor has thrown an exception: {0} + Tür sağlayıcısı oluşturucu bir özel durum oluşturdu: {0} + + + + Type provider '{0}' returned null from GetInvokerExpression. + '{0}' tür sağlayıcısı GetInvokerExpression yönteminden null döndürdü. + + + + The type provider '{0}' returned an invalid type from 'ApplyStaticArguments'. A type with name '{1}' was expected, but a type with name '{2}' was returned. + {0}' tür sağlayıcısı 'ApplyStaticArguments' yönteminden geçersiz bir tür döndürdü. '{1}' adlı tür bekleniyordu, ancak '{2}' adlı tür döndürüldü. + + + + The type provider '{0}' returned an invalid method from 'ApplyStaticArgumentsForMethod'. A method with name '{1}' was expected, but a method with name '{2}' was returned. + Tür sağlayıcısı '{0}', 'ApplyStaticArgumentsForMethod' öğesinden geçersiz bir metot döndürdü. '{1}' adlı bir metot bekleniyordu ancak '{2}' adlı bir metot döndürüldü. + + + + This type test or downcast will erase the provided type '{0}' to the type '{1}' + Bu tür testi veya alt türe çevirme işlemi '{0}' sağlanan türünü '{1}' türüne silecek + + + + This downcast will erase the provided type '{0}' to the type '{1}'. + Bu alt türe çevirme işlemi '{0}' sağlanan türünü '{1}' türüne siler. + + + + This type test with a provided type '{0}' is not allowed because this provided type will be erased to '{1}' at runtime. + {0}' sağlanan türü çalışma zamanında '{1}' olarak silineceği için bu sağlanan türe sahip bu tür testine izin verilmez. + + + + Cannot inherit from erased provided type + Silinmiş sağlanan türden devralınamıyor + + + + Assembly '{0}' hase TypeProviderAssembly attribute with invalid value '{1}'. The value should be a valid assembly name + {0}' bütünleştirilmiş kodunun geçersiz '{1}' değerli TypeProviderAssembly özniteliği var. Bu değer geçerli bir bütünleştirilmiş kod adı olmalıdır + + + + Invalid member name. Members may not have name '.ctor' or '.cctor' + Geçersiz üye adı. Üyelerin adı '.ctor' veya '.cctor' olamaz + + + + The function or member '{0}' is used in a way that requires further type annotations at its definition to ensure consistency of inferred types. The inferred signature is '{1}'. + {0}' işlevi veya üyesi, çıkartılan türlerin tutarlı olmasını sağlamak için tanımında başka tür ek açıklamaları gerektirecek şekilde kullanılmış. Çıkartılan imza: '{1}'. + + + + The number of type arguments did not match: '{0}' given, '{1}' expected. This may be related to a previously reported error. + Tür bağımsız değişkenlerinin sayısı eşleşmedi: '{0}' verildi, '{1}' bekleniyordu. Bu, önceden bildirilmiş bir hatayla ilişkili olabilir. + + + + Cannot override inherited member '{0}' because it is sealed + Devralınan üye '{0}' mühürlü olduğu için geçersiz kılınamıyor + + + + The type provider '{0}' reported an error in the context of provided type '{1}', member '{2}'. The error: {3} + Tür sağlayıcısı '{0}', sağlanan tür '{1}', üye '{2}' bağlamında bir hata bildirdi. Hata: {3} + + + + An exception occurred when accessing the '{0}' of a provided type: {1} + {1} sağlanan türünün '{0}' öğesine erişirken bir özel durum oluştu + + + + The '{0}' of a provided type was null or empty. + Sağlanan türün '{0}' öğesi null veya boştu. + + + + Character '{0}' is not allowed in provided type name '{1}' + {1}' sağlanan tür adında '{0}' karakterine izin verilmez + + + + In queries, '{0}' must use a simple pattern + Sorgularda, '{0}' basit desen kullanmalıdır + + + + A custom query operation for '{0}' is required but not specified + '{0}' için özel bir sorgu işlemi gerekiyor ancak belirtilmemiş + + + + Named static arguments must come after all unnamed static arguments + Adlandırılmış statik bağımsız değişkenler, adlandırılmamış statik bağımsız değişkenlerin tümünden sonra gelmelidir + + + + The static parameter '{0}' of the provided type or method '{1}' requires a value. Static parameters to type providers may be optionally specified using named arguments, e.g. '{2}<{3}=...>'. + {1}' sağlanan tür veya metodunun '{0}' statik parametresi için bir değer gerekiyor. Tür sağlayıcılarının statik parametreleri adlandırılmış bağımsız değişkenler kullanılarak isteğe göre belirtilebilir: Örn. '{2}<{3}=...>'. + + + + No static parameter exists with name '{0}' + '{0}' adında hiç statik parametre yok + + + + The static parameter '{0}' has already been given a value + '{0}' statik parametresine zaten bir değer verildi + + + + Multiple static parameters exist with name '{0}' + '{0}' adında birden çok statik parametre var + + + + A custom operation may not be used in conjunction with a non-value or recursive 'let' binding in another part of this computation expression + Özel işlem, bu hesaplama ifadesinin başka bir kısmında değersiz veya özyinelemeli 'let' bağlaması ile bağlantılı olarak kullanılamaz + + + + A custom operation may not be used in conjunction with 'use', 'try/with', 'try/finally', 'if/then/else' or 'match' operators within this computation expression + Özel işlem, bu hesaplama ifadesi içinde 'use', 'try/with', 'try/finally', 'if/then/else' veya 'match' işleçleri ile bağlantılı olarak kullanılamaz + + + + The custom operation '{0}' refers to a method which is overloaded. The implementations of custom operations may not be overloaded. + '{0}' özel işlemi aşırı yüklenmiş bir metoda başvuruyor. Özel işlemlerin uygulamaları aşırı yüklenemez. + + + + An if/then/else expression may not be used within queries. Consider using either an if/then expression, or use a sequence expression instead. + Sorgularda if/then/else ifadesi kullanılamaz. Ya if/then ifadesi kullanmayı düşünün ya da onun yerine dizi ifadesi kullanın. + + + + Invalid argument to 'methodhandleof' during codegen + Kod oluşturma sırasında geçersiz 'methodhandleof' bağımsız değişkeni + + + + A reference to a provided type was missing a value for the static parameter '{0}'. You may need to recompile one or more referenced assemblies. + Sağlanan türe yapılan başvuruda '{0}' statik parametresinin bir değeri yoktu. Bir veya daha fazla başvurulan bütünleştirilmiş kodu yeniden derlemeniz gerekiyor. + + + + A reference to a provided type had an invalid value '{0}' for a static parameter. You may need to recompile one or more referenced assemblies. + Sağlanan türe yapılan başvuruda statik parametre için geçersiz '{0}' değeri vardı. Bir veya daha fazla başvurulan bütünleştirilmiş kodu yeniden derlemeniz gerekiyor. + + + + '{0}' is not used correctly. This is a custom operation in this query or computation expression. + '{0}' doğru kullanılmadı. Bu, geçerli sorguda veya hesaplama ifadesinde özel bir işlemdir. + + + + '{0}' is not used correctly. Usage: {1}. This is a custom operation in this query or computation expression. + '{0}' doğru kullanılmadı. Kullanım: {1}. Bu, geçerli sorgudaki veya hesaplama ifadesindeki özel bir işlemdir. + + + + {0} var in collection {1} (outerKey = innerKey). Note that parentheses are required after '{2}' + {1} koleksiyonunda {0} değişkeni (outerKey = innerKey). '{2}' öğesinden sonra parantez eklenmesi gerektiğini unutmayın + + + + {0} var in collection {1} (outerKey = innerKey) into group. Note that parentheses are required after '{2}' + {1} koleksiyonunda {0} değişkeni (outerKey = innerKey) gruba eklendi. '{2}' öğesinden sonra parantez eklenmesi gerektiğini unutmayın + + + + {0} var in collection + Koleksiyonda {0} değişkeni + + + + '{0}' must be followed by a variable name. Usage: {1}. + '{0}' ifadesini değişken adı izlemelidir. Kullanım: {1}. + + + + Incorrect syntax for '{0}'. Usage: {1}. + {0}' için hatalı sözdizimi. Kullanım: {1}. + + + + '{0}' must come after a 'for' selection clause and be followed by the rest of the query. Syntax: ... {1} ... + '{0}' ifadesi bir 'for' seçim yan tümcesinden sonra gelmelidir ve bu ifadeyi sorgunun geri kalanı izlemelidir. Söz dizimi: ... {1} ... + + + + '{0}' is used with an incorrect number of arguments. This is a custom operation in this query or computation expression. Expected {1} argument(s), but given {2}. + '{0}' hatalı sayıda bağımsız değişkenle kullanıldı. Bu, geçerli sorgudaki veya hesaplama ifadesindeki özel bir işlemdir. {1} bağımsız değişken bekleniyordu, ancak {2} verildi. + + + + Expected an expression after this point + Bu noktadan sonra bir ifade bekleniyordu + + + + Expected a type after this point + Bu noktadan sonra bir tür bekleniyordu + + + + Unmatched '[<'. Expected closing '>]' + Eşleşmeyen '[<'. Kapanış karakteri '>]' bekleniyordu + + + + Unexpected end of input in 'match' expression. Expected 'match <expr> with | <pat> -> <expr> | <pat> -> <expr> ...'. + 'match' ifadesinde beklenmeyen giriş sonu. 'match <ifade> with | <pat> -> <ifade> | <pat> -> <ifade> ...' bekleniyordu. + + + + Unexpected end of input in 'try' expression. Expected 'try <expr> with <rules>' or 'try <expr> finally <expr>'. + 'try' ifadesinde beklenmeyen giriş sonu. 'try <ifade> with <kurallar>' veya 'try <ifade> finally <ifade>' bekleniyordu. + + + + Unexpected end of input in 'while' expression. Expected 'while <expr> do <expr>'. + 'while' ifadesinde beklenmeyen giriş sonu. 'while <expr> do <expr>' bekleniyordu. + + + + Unexpected end of input in 'for' expression. Expected 'for <pat> in <expr> do <expr>'. + 'for' ifadesinde beklenmeyen giriş sonu. 'for <pat> in <ifade> do <ifade>' bekleniyordu. + + + + Unexpected end of input in 'match' or 'try' expression + 'match' veya 'try' ifadesinde beklenmeyen giriş sonu + + + + Unexpected end of input in 'then' branch of conditional expression. Expected 'if <expr> then <expr>' or 'if <expr> then <expr> else <expr>'. + Koşullu ifadenin 'then' dalında beklenmeyen giriş sonu. 'if <ifade> then <ifade>' veya 'if <ifade> then <ifade> else <ifade>' bekleniyordu. + + + + Unexpected end of input in 'else' branch of conditional expression. Expected 'if <expr> then <expr>' or 'if <expr> then <expr> else <expr>'. + Koşullu ifadenin 'else' dalında beklenmeyen giriş sonu. 'if <ifade> then <ifade>' veya 'if <ifade> then <ifade> else <ifade>' bekleniyordu. + + + + Unexpected end of input in body of lambda expression. Expected 'fun <pat> ... <pat> -> <expr>'. + Lambda ifadesi gövdesinde beklenmeyen giriş sonu. 'fun <pat> ... <pat> -> <ifade>' bekleniyordu. + + + + Unexpected end of input in type arguments + Tür bağımsız değişkenlerinde beklenmeyen giriş sonu + + + + Unexpected end of input in type signature + Tür imzasında beklenmeyen giriş sonu + + + + Unexpected end of input in type definition + Tür tanımında beklenmeyen giriş sonu + + + + Unexpected end of input in object members + Nesne üyelerinde beklenmeyen giriş sonu + + + + Unexpected end of input in value, function or member definition + Değer, işlev veya üye tanımında beklenmeyen giriş sonu + + + + Unexpected end of input in expression + İfadede beklenmeyen giriş sonu + + + + Unexpected end of type. Expected a name after this point. + Beklenmeyen tür sonu. Bu noktadan sonra bir ad bekleniyordu. + + + + Incomplete value or function definition. If this is in an expression, the body of the expression must be indented to the same column as the 'let' keyword. + Eksik değer veya işlev tanımı. Bu bir ifadeyse ifadenin gövdesi 'let' anahtar sözcüğü ile aynı sütuna girintilenmelidir. + + + + Incomplete value definition. If this is in an expression, the body of the expression must be indented to the same column as the 'let!' keyword. + Eksik değer tanımı. Bu bir ifadeyse ifadenin gövdesi 'let!' anahtar sözcüğü ile aynı sütuna girintilenmelidir. + + + + Incomplete value definition. If this is in an expression, the body of the expression must be indented to the same column as the 'use!' keyword. + Eksik değer tanımı. Bu bir ifadeyse ifadenin gövdesi 'use!' anahtar sözcüğü ile aynı sütuna girintilenmelidir. + + + + Incomplete value definition. If this is in an expression, the body of the expression must be indented to the same column as the 'use' keyword. + Eksik değer tanımı. Bu bir ifadeyse ifadenin gövdesi 'use' anahtar sözcüğü ile aynı sütuna girintilenmelidir. + + + + Missing 'do' in 'while' expression. Expected 'while <expr> do <expr>'. + 'while' ifadesinde eksik 'do'. 'while <ifade> do <<ifade>' bekleniyordu. + + + + Missing 'do' in 'for' expression. Expected 'for <pat> in <expr> do <expr>'. + 'for' ifadesinde eksik 'do'. 'for <pat> in <ifade> do <ifade>' bekleniyordu. + + + + Invalid join relation in '{0}'. Expected 'expr <op> expr', where <op> is =, =?, ?= or ?=?. + '{0}' öğesinde geçersiz join ilişkisi. 'expr <op> expr' bekleniyordu, burada <op> ifadesi: =, =?, ?= veya ?=?. + + + + Calls + Çağrılar + + + + Invalid number of generic arguments to type '{0}' in provided type. Expected '{1}' arguments, given '{2}'. + Sağlanan türdeki '{0}' türünde geçersiz sayıda genel bağımsız değişken. '{1}' bağımsız değişken bekleniyordu, '{2}' verildi. + + + + Invalid value '{0}' for unit-of-measure parameter '{1}' + Ölçü birimi parametresi '{1}' için geçersiz '{0}' değeri + + + + Invalid value unit-of-measure parameter '{0}' + Geçersiz değerli ölçü birimi parametresi '{0}' + + + + Property '{0}' on provided type '{1}' is neither readable nor writable as it has CanRead=false and CanWrite=false + {1}' sağlanan türündeki '{0}' özelliğinde CanRead=false ve CanWrite=false olduğu için özellik okunabilir veya yazılabilir değil + + + + A use of 'into' must be followed by the remainder of the computation + 'into' kullanımını hesaplamanın geri kalanı izlemelidir + + + + The operator '{0}' does not accept the use of 'into' + '{0}' işleci 'into' kullanımını kabul etmez + + + + The definition of the custom operator '{0}' does not use a valid combination of attribute flags + '{0}' özel işlecinin tanımı geçerli bir öznitelik bayrakları bileşimi kullanmıyor + + + + This type definition may not have the 'CLIMutable' attribute. Only record types may have this attribute. + Bu tür tanımının 'CLIMutable' özniteliği olamaz. Yalnızca kayıt türleri bu özniteliğe sahip olabilir. + + + + 'member val' definitions are only permitted in types with a primary constructor. Consider adding arguments to your type definition, e.g. 'type X(args) = ...'. + 'member val' tanımlarına yalnızca birincil oluşturucusu olan türlerde izin verilir. Tür tanımınıza bağımsız değişkenler eklemeyi düşünün, örn. 'type X(args) = ...'. + + + + Property definitions may not be declared mutable. To indicate that this property can be set, use 'member val PropertyName = expr with get,set'. + Özellik tanımları değişebilir olarak tanımlanamaz. Bu özelliğin ayarlanabileceğini belirtmek için 'member val PropertyName = expr with get,set' kullanın. + + + + To indicate that this property can be set, use 'member val PropertyName = expr with get,set'. + Bu özelliğin ayarlanabileceğini belirtmek için 'member val PropertyName = expr with get,set' kullanın. + + + + Type '{0}' is illegal because in byref<T>, T cannot contain byref types. + '{0}' türü byref<T> içinde olduğu için geçersiz, T byref türlerini içeremez. + + + + F# supports array ranks between 1 and 32. The value {0} is not allowed. + F#, 1 ile 32 arasındaki dizi derecelerini destekler. {0} değeri kullanılamaz. + + + + In queries, use the form 'for x in n .. m do ...' for ranging over integers + Sorgularda, tamsayı aralığını belirlemek için 'for x in n .. m do ...' biçimini kullanın + + + + 'while' expressions may not be used in queries + 'while' ifadeleri sorgularda kullanılamaz + + + + 'try/finally' expressions may not be used in queries + 'try/finally' ifadeleri sorgularda kullanılamaz + + + + 'use' expressions may not be used in queries + 'use' ifadeleri sorgularda kullanılamaz + + + + 'let!', 'use!' and 'do!' expressions may not be used in queries + 'let!', 'use!' ve 'do!' ifadeleri sorgularda kullanılamaz + + + + 'return' and 'return!' may not be used in queries + 'return' ve 'return!' sorgularda kullanılamaz + + + + This is not a known query operator. Query operators are identifiers such as 'select', 'where', 'sortBy', 'thenBy', 'groupBy', 'groupValBy', 'join', 'groupJoin', 'sumBy' and 'averageBy', defined using corresponding methods on the 'QueryBuilder' type. + Bu bilinen bir sorgu işleci değil. Sorgu işleçleri, 'QueryBuilder' türündeki ilgili metotlar kullanılarak tanımlanan 'select', 'where', 'sortBy', 'thenBy', 'groupBy', 'groupValBy', 'join', 'groupJoin', 'sumBy' ve 'averageBy' gibi tanımlayıcılardır. + + + + 'try/with' expressions may not be used in queries + 'try/with' ifadeleri sorgularda kullanılamaz + + + + This 'let' definition may not be used in a query. Only simple value definitions may be used in queries. + Bu 'let' tanımı sorguda kullanılamaz. Sorgularda yalnızca basit değer tanımları kullanılabilir. + + + + Too many static parameters. Expected at most {0} parameters, but got {1} unnamed and {2} named parameters. + Çok fazla statik parametre. En çok {0} parametre bekleniyordu, ancak {1} adlandırılmamış ve {2} adlandırılmış parametre alındı. + + + + Invalid provided literal value '{0}' + Sağlanan sabit değer '{0}' geçersiz + + + + The 'anycpu32bitpreferred' platform can only be used with EXE targets. You must use 'anycpu' instead. + 'anycpu32bitpreferred' platformu yalnızca EXE hedefleriyle kullanılabilir. Onun yerine 'anycpu' kullanmalısınız. + + + + This member, function or value declaration may not be declared 'inline' + Bu üye, işlev veya değer bildirimi 'inline' olarak tanımlanamaz + + + + The provider '{0}' returned a non-generated type '{1}' in the context of a set of generated types. Consider adjusting the type provider to only return generated types. + {0}' sağlayıcısı, oluşturulmuş türler kümesi bağlamında oluşturulmamış '{1}' türünü döndürdü. Tür sağlayıcısını yalnızca oluşturulmuş türleri döndürecek şekilde ayarlamayı düşünün. + + + + Arguments to query operators may require parentheses, e.g. 'where (x > y)' or 'groupBy (x.Length / 10)' + Sorgu işleçlerinin bağımsız değişkenleri ayraç gerektirebilir, örn. 'where (x > y)' veya 'groupBy (x.Length / 10)' + + + + A quotation may not involve an assignment to or taking the address of a captured local variable + Bir alıntı, yakalanan yerel değişkenin adresine atama içeremez veya bu adresi alamaz + + + + + 1 overload + + 1 aşırı yükleme + + + + + {0} overloads + + {0} aşırı yükleme + + + + Erased to + Silindiği öğe: + + + + Unexpected token '{0}' or incomplete expression + Beklenmeyen '{0}' belirteci veya eksik ifade + + + + Cannot find code target for this attribute, possibly because the code after the attribute is incomplete. + Bu özniteliğin kod hedefi, muhtemelen öznitelikten sonraki kod eksik olduğu için bulunamıyor. + + + + Type name cannot be empty. + Tür adı boş olamaz. + + + + Problem reading assembly '{0}': {1} + Bütünleştirilmiş kod okuma hatası: '{0}': {1} + + + + Invalid provided field. Provided fields of erased provided types must be literals. + Geçersiz sağlanan alan. Silinmiş sağlanan türlerin sağlanan alanları sabit değerler olmalıdır. + + + + (loading description...) + (açıklama yükleniyor...) + + + + (description unavailable...) + (açıklama yok...) + + + + A type variable has been constrained by multiple different class types. A type variable may only have one class constraint. + Bir tür değişkeni, birden çok farklı sınıf türü tarafından kısıtlanmış. Bir tür değişkeninin yalnızca bir sınıf kısıtlaması olabilir. + + + + 'match' expressions may not be used in queries + 'match' ifadeleri sorgularda kullanılamaz + + + + Infix operator member '{0}' has {1} initial argument(s). Expected a tuple of 3 arguments + Infix işleç üyesi '{0}', {1} başlangıç bağımsız değişkenine sahip. 3 bağımsız değişkenli bir demet bekleniyordu + + + + The operator '{0}' cannot be resolved. Consider opening the module 'Microsoft.FSharp.Linq.NullableOperators'. + '{0}' işleci çözümlenemiyor. 'Microsoft.FSharp.Linq.NullableOperators' modülünü açmayı düşünün. + + + + '{0}' must be followed by 'in'. Usage: {1}. + '{0}' öğesinden sonra 'in' gelmelidir. Kullanım: {1}. + + + + Neither 'member val' nor 'override val' definitions are permitted in object expressions. + Nesne ifadelerinde 'member val' ve 'override val' tanımlarına izin verilmez. + + + + Copy-and-update record expressions must include at least one field. + Kayıt kopyalama ve güncelleştirme ifadeleri en az bir alan içermelidir. + + + + '_' cannot be used as field name + '_' alan adı olarak kullanılamaz + + + + The provided types generated by this use of a type provider may not be used from other F# assemblies and should be marked internal or private. Consider using 'type internal TypeName = ...' or 'type private TypeName = ...'. + Tür sağlayıcısının bu kullanımının oluşturduğu sağlanan türler diğer F# bütünleştirilmiş kodlarından kullanılamaz ve iç veya özel olarak işaretlenmeleri gerekir. 'type internal TypeName = ...' veya 'type private TypeName = ...' kullanmayı düşünün. + + + + A property's getter and setter must have the same type. Property '{0}' has getter of type '{1}' but setter of type '{2}'. + Bir özelliğin alıcısı ve ayarlayıcısı aynı türde olmalıdır. '{0}' özelliğinin alıcı türü '{1}' ancak ayarlayıcı türü '{2}'. + + + + Array method '{0}' is supplied by the runtime and cannot be directly used in code. For operations with array elements consider using family of GetArray/SetArray functions from LanguagePrimitives.IntrinsicFunctions module. + Dizi metodu '{0}', çalışma zamanı tarafından sağlanır ve kodda doğrudan kullanılamaz. Dizi öğeleriyle işlemler için LanguagePrimitives.IntrinsicFunctions modülünden GetArray/SetArray işlev ailesini kullanmayı düşünün. + + + + The union case '{0}' does not have a field named '{1}'. + {0}' birleşim durumu/özel durumunda '{1}' adlı alan yok. + + + + Union case/exception field '{0}' cannot be used more than once. + '{0}' birleşim durumu/özel durumu alanı birden çok kez kullanılamaz. + + + + Named field '{0}' is used more than once. + Adlandırılmış alan '{0}', birden çok kez kullanıldı. + + + + Named field '{0}' conflicts with autogenerated name for anonymous field. + Adlandırılmış alan '{0}', anonim alanın otomatik oluşturulmuş adıyla çakışıyor. + + + + This literal expression or attribute argument results in an arithmetic overflow. + Bu sabit değer ifadesi veya öznitelik bağımsız değişkeni aritmetik taşma ile sonuçlanıyor. + + + + This is not valid literal expression. The [<Literal>] attribute will be ignored. + Bu geçerli bir sabit değer ifadesi değil. [<Literal>] özniteliği yoksayılacak. + + + + System.Runtime.InteropServices assembly is required to use UnknownWrapper\DispatchWrapper classes. + UnknownWrapper\DispatchWrapper sınıflarını kullanmak için System.Runtime.InteropServices bütünleştirilmiş kodu gerekiyor. + + + + The mutable local '{0}' is implicitly allocated as a reference cell because it has been captured by a closure. This warning is for informational purposes only to indicate where implicit allocations are performed. + Değişebilir yerel '{0}' bir kapanış tarafından yakalandığından, örtülü bir biçimde bir başvuru hücresi olarak ayrıldı. Bu uyarı, yalnızca örtülü ayırma işlemlerinin gerçekleştirildiğine dair bilgilendirme amacı taşır. + + + + A type provider implemented GetStaticParametersForMethod, but ApplyStaticArgumentsForMethod was not implemented or invalid + Bir tür sağlayıcısı tarafından GetStaticParametersForMethod uygulandı, ancak ApplyStaticArgumentsForMethod uygulanmadı veya geçersiz + + + + An error occured applying the static arguments to a provided method + Sağlanan metoda statik bağımsız değişkenler uygulanırken bir sorun oluştu + + + + Unexpected character '{0}' in preprocessor expression + Önişlemci ifadesinde beklenmeyen karakter: '{0}' + + + + Unexpected token '{0}' in preprocessor expression + Önişlemci ifadesinde beklenmeyen belirteç: '{0}' + + + + Incomplete preprocessor expression + Eksik önişlemci ifadesi + + + + Missing token '{0}' in preprocessor expression + Önişlemci ifadesinde eksik belirteç: '{0}' + + + + An error occurred while reading the F# metadata node at position {0} in table '{1}' of assembly '{2}'. The node had no matching declaration. Please report this warning. You may need to recompile the F# assembly you are using. + {2}' bütünleştirilmiş kodunun '{1}' tablosundaki {0} konumunda bulunan F# meta veri düğümü okunurken bir hata oluştu. Düğüm, eşleşen bildirim içermiyor. Lütfen bu uyarıyı bildirin. Kullandığınız F# bütünleştirilmiş kodunu yeniden derlemeniz gerekebilir. + + + + Type inference caused the type variable {0} to escape its scope. Consider adding an explicit type parameter declaration or adjusting your code to be less generic. + Tür çıkarımı, {0} tür değişkeninin kapsamından çıkmasına neden oldu. Açık bir tür parametresi bildirimi ekleyebilir ya da kodunuzu ayarlayarak daha az genel hale getirebilirsiniz. + + + + Type inference caused an inference type variable to escape its scope. Consider adding type annotations to make your code less generic. + Tür çıkarımı, bir tür değişkeninin kapsamından çıkmasına neden oldu. Tür açıklamaları ekleyerek kodunuzu daha az genel hale getirebilirsiniz. + + + + Redundant arguments are being ignored in function '{0}'. Expected {1} but got {2} arguments. + {0}' işlevindeki gereksiz bağımsız değişkenler yoksayılıyor. {1} bekleniyordu, ancak {2} bağımsız değişken alındı. + + + + Lowercase literal '{0}' is being shadowed by a new pattern with the same name. Only uppercase and module-prefixed literals can be used as named patterns. + Küçük harf '{0}' değişmez değeri aynı ada sahip yeni bir desen tarafından engelleniyor. Adlandırılmış desenler olarak yalnızca büyük harf ve module ön eki almış değişmez değerler kullanılabilir. + + + + This literal pattern does not take arguments + Bu sabit değer deseninde bağımsız değişken kullanılamaz + + + + Constructors are not permitted as extension members - they must be defined as part of the original definition of the type + Oluşturucuların, uzantı üyesi olarak kullanılmalarına izin verilmez. Türün özgün tanımının bir parçası olarak tanımlanmaları gerekir. + + + + Invalid response file '{0}' ( '{1}' ) + Geçersiz yanıt dosyası '{0}' ( '{1}' ) + + + + Response file '{0}' not found in '{1}' + Yanıt dosyası '{0}', '{1}' içinde bulunamadı + + + + Response file name '{0}' is empty, contains invalid characters, has a drive specification without an absolute path, or is too long + Yanıt dosyası adı '{0}' boş, geçersiz karakter içeriyor, mutlak yolu olmayan bir sürücüyü belirtiyor veya çok uzun + + + + Cannot find FSharp.Core.dll in compiler's directory + Derleyici dizininde FSharp.Core.dll bulunamıyor + + + + One tuple type is a struct tuple, the other is a reference tuple + Demetlerden biri yapı demeti, diğeri ise başvuru demeti + + + + This provided method requires static parameters + Sağlanan bu metot statik parametreler gerektirir + + + + The conversion from {0} to {1} is a compile-time safe upcast, not a downcast. Consider using 'upcast' instead of 'downcast'. + {0} türünden {1} türüne dönüştürme, bir alt türe çevirme değil, derleme zamanında güvenli bir üst türe çevirmedir. 'downcast' yerine 'upcast' kullanmayı düşünün. + + + + The conversion from {0} to {1} is a compile-time safe upcast, not a downcast. Consider using the :> (upcast) operator instead of the :?> (downcast) operator. + {0} türünden {1} türüne dönüştürme, bir alt türe çevirme değil, derleme zamanında güvenli bir üst türe çevirmedir. :?> (alt türe çevirme) işleci yerine :> (üst türe çevirme) işlecini kullanmayı düşünün. + + + + The 'rec' on this module is implied by an outer 'rec' declaration and is being ignored + Bu modüldeki 'rec', bir dış 'rec' bildirimi tarafından kapsanıyor ve yoksayılıyor + + + + In a recursive declaration group, 'open' declarations must come first in each module + Özyinelemeli bir bildirim grubunda, 'open' bildirimleri her modülde en başta olmalıdır + + + + In a recursive declaration group, module abbreviations must come after all 'open' declarations and before other declarations + Özyinelemeli bir bildirim grubunda modül kısaltmaları, tüm 'open' bildirimleri ve diğer bildirimlerden sonra gelmelidir + + + + This declaration is not supported in recursive declaration groups + Bu bildirim, özyinelemeli bildirim gruplarında desteklenmez + + + + Invalid use of 'rec' keyword + 'rec' anahtar sözcüğü geçersiz şekilde kullanıldı + + + + If a union type has more than one case and is a struct, then all fields within the union type must be given unique names. + Bir birleşim türü büyük ve küçük harfler içeriyorsa ve bir yapıysa, birleşim türü içindeki tüm alanlara benzersiz adlar verilmelidir. + + + + The CallerMemberNameAttribute applied to parameter '{0}' will have no effect. It is overridden by the CallerFilePathAttribute. + '{0}' parametresine uygulanan CallerMemberNameAttribute etkisiz olacak. Bu işlem CallerFilePathAttribute tarafından geçersiz kılınmış. + + + + Invalid use of 'fixed'. 'fixed' may only be used in a declaration of the form 'use x = fixed expr' where the expression is an array, the address of a field, the address of an array element or a string' + Geçersiz 'fixed' kullanımı. 'fixed' yalnızca 'use x = fixed expr' biçimindeki bir bildirimde kullanılabilir. Burada ifade bir dizi, bir alanın adresi, bir dizi öğesinin adresi veya bir dizedir + + + + Could not find method System.Runtime.CompilerServices.OffsetToStringData in references when building 'fixed' expression. + 'fixed' ifadesi derlenirken başvurularda System.Runtime.CompilerServices.OffsetToStringData metodu bulunamadı. + + + + {0} is an active pattern and cannot be treated as a discriminated union case with named fields. + {0} etkin bir desen ve adlandırılmış alanlar içeren bir ayırt edici birleşim durumu olarak değerlendirilemez. + + + + The default value does not have the same type as the argument. The DefaultParameterValue attribute and any Optional attribute will be ignored. Note: 'null' needs to be annotated with the correct type, e.g. 'DefaultParameterValue(null:obj)'. + Varsayılan değer, bağımsız değişkenle aynı türde değil. DefaultParameterValue özniteliği ve tüm İsteğe Bağlı öznitelikler yoksayılacak. Not: 'null'un doğru tür ile eklenmesi gerekir, örneğin 'DefaultParameterValue(null:obj)'. + + + + The system type '{0}' was required but no referenced system DLL contained this type + '{0}' sistem türü gerekiyordu, ancak başvurulan hiçbir sistem DLL'si bu türü içermiyordu + + + + The member '{0}' matches multiple overloads of the same method.\nPlease restrict it to one of the following:{1}. + {0}' adlı üye, aynı metodun birden fazla aşırı yüklemesiyle eşleşiyor.\nLütfen şunlardan biriyle kısıtlayın: {1}. + + + + Method or object constructor '{0}' is not static + '{0}' metodu veya nesne oluşturucusu, statik değil + + + + Unexpected symbol '=' in expression. Did you intend to use 'for x in y .. z do' instead? + İfadede beklenmeyen '=' sembolü. Bunun yerine 'for x in y .. z do' kullanmak mı istemiştiniz? + + + + Indicates a method that either has no implementation in the type in which it is declared or that is virtual and has a default implementation. + İçinde bildirildiği türde hiç uygulaması olmayan veya sanal olup varsayılan uygulaması olan bir metodu belirtir. + + + + Used in mutually recursive bindings, in property declarations, and with multiple constraints on generic parameters. + Karşılıklı yinelemeli bağlamalarda, özellik bildirimlerinde ve genel parametreler üzerinde birden çok kısıtlamayla kullanılır. + + + + Used to give the current class object an object name. Also used to give a name to a whole pattern within a pattern match. + Geçerli sınıf nesnesine bir nesne adı vermek için kullanılır. Desen eşleştirmesi içindeki bir tam desene ad vermek için de kullanılır. + + + + Used to verify code during debugging. + Hata ayıklama sırasında kodu doğrulamak için kullanılır. + + + + Used as the name of the base class object. + Temel sınıf nesnesinin adı olarak kullanılır. + + + + In verbose syntax, indicates the start of a code block. + Ayrıntılı söz diziminde kod bloğunun başlangıcını gösterir. + + + + In verbose syntax, indicates the start of a class definition. + Ayrıntılı söz diziminde, sınıf tanımının başlangıcını belirtir. + + + + Indicates an implementation of an abstract method; used together with an abstract method declaration to create a virtual method. + Soyut bir metodun uygulamasını belirtir; sanal metot oluşturmak üzere soyut metot bildirimi ile birlikte kullanılır. + + + + Used to declare a delegate. + Bir temsilci bildirmek için kullanılır. + + + + Used in looping constructs or to execute imperative code. + Döngü yapılarında veya kesinlik temelli kod yürütmek için kullanılır. + + + + In verbose syntax, indicates the end of a block of code in a looping expression. + Ayrıntılı söz diziminde, döngü ifadesindeki bir kod bloğunun sonunu gösterir. + + + + Used to convert to a type that is lower in the inheritance chain. + Devralma zincirinde daha aşağıda bulunan bir türe dönüştürmek için kullanılır. + + + + In a for expression, used when counting in reverse. + Bir for ifadesinde, tersten sayım sırasında kullanılır. + + + + Used in conditional branching. A short form of else if. + Koşullu dallanmada kullanılır. else if'in kısa bir biçimidir. + + + + Used in conditional branching. + Koşullu dallanmada kullanılır. + + + + In type definitions and type extensions, indicates the end of a section of member definitions. In verbose syntax, used to specify the end of a code block that starts with the begin keyword. + Tür tanımlarında ve tür uzantılarında, üye tanımları bölümünün sonunu gösterir. Ayrıntılı söz diziminde, begin anahtar sözcüğü ile başlayan bir kod bloğunun sonunu belirtmek için kullanılır. + + + + Used to declare an exception type. + Bir özel durum türünü bildirmek için kullanılır. + + + + Indicates that a declared program element is defined in another binary or assembly. + Bildirilen bir program öğesinin başka bir ikili dosyada veya bütünleştirilmiş kodda tanımlandığını belirtir. + + + + Used as a Boolean literal. + Boolean sabit değeri olarak kullanılır. + + + + Used together with try to introduce a block of code that executes regardless of whether an exception occurs. + Özel durumun oluşup oluşmadığına bakılmaksızın yürütülen bir kod bloğunu tanıtmak için try ile birlikte kullanılır. + + + + Used in looping constructs. + Döngü yapılarında kullanılır. + + + + Used in lambda expressions, also known as anonymous functions. + Anonim işlevler olarak da bilinen lambda ifadelerinde kullanılır. + + + + Used as a shorter alternative to the fun keyword and a match expression in a lambda expression that has pattern matching on a single argument. + Tek bir bağımsız değişkende desen eşleştirmesine sahip bir lambda ifadesinde fun anahtar sözcüğünün ve match ifadesinin daha kısa bir alternatifi olarak kullanılır. + + + + Used to reference the top-level .NET namespace. + En üst düzey .NET ad alanına başvurmak için kullanılır. + + + + Used in conditional branching constructs. + Koşullu dallanma yapılarında kullanılır. + + + + Used for sequence expressions and, in verbose syntax, to separate expressions from bindings. + Dizi ifadeleri için ve ayrıntılı söz diziminde ifadeleri bağlamalardan ayırmak için kullanılır. + + + + Used to specify a base class or base interface. + Temel sınıfı veya temel arabirimi belirtmek için kullanılır. + + + + Used to indicate a function that should be integrated directly into the caller's code. + Doğrudan çağıranın koduyla tümleştirilmesi gereken bir işlevi belirtmek için kullanılır. + + + + Used to declare and implement interfaces. + Arabirimleri bildirmek ve uygulamak için kullanılır. + + + + Used to specify that a member is visible inside an assembly but not outside it. + Bir üyenin bütünleştirilmiş kodun içinde görünür olduğunu, dışında ise görünmediğini belirtmek için kullanılır. + + + + Used to specify a computation that is to be performed only when a result is needed. + Yalnızca bir sonuç gerekli olduğunda gerçekleştirilecek bir hesaplamayı belirtmek için kullanılır. + + + + Used to associate, or bind, a name to a value or function. + Adı bir değer veya işlevle ilişkilendirmek ya da bağlamak için kullanılır. + + + + Used in computation expressions to bind a name to the result of another computation expression. + Zaman uyumsuz iş akışlarında adı zaman uyumsuz hesaplamanın sonucuna bağlamak için veya diğer hesaplama ifadelerinde adı hesaplama türünden bir sonuca bağlamak için kullanılır. + + + + Used to branch by comparing a value to a pattern. + Değeri bir desenle karşılaştırarak dal oluşturmak için kullanılır. + + + + Used to declare a property or method in an object type. + Bir nesne türü içinde özellik veya metot bildirmek için kullanılır. + + + + Used to associate a name with a group of related types, values, and functions, to logically separate it from other code. + Bir adı diğer kodlardan mantıksal olarak ayırmak amacıyla, birbiriyle ilişkili bir tür, değer ve işlev grubuyla ilişkilendirmek için kullanılır. + + + + Used to declare a variable, that is, a value that can be changed. + Bir değişkeni, başka bir deyişle değiştirilebilir bir değeri bildirmek için kullanılır. + + + + Used to associate a name with a group of related types and modules, to logically separate it from other code. + Bir adı diğer kodlardan mantıksal olarak ayırmak amacıyla, birbiriyle ilişkili bir tür ve modül grubuyla ilişkilendirmek için kullanılır. + + + + Used to declare, define, or invoke a constructor that creates or that can create an object. Also used in generic parameter constraints to indicate that a type must have a certain constructor. + Nesne oluşturan veya oluşturabilen bir oluşturucuyu bildirmek, tanımlamak veya çağırmak için kullanılır. Ayrıca bir türün belirli bir oluşturucusu olması gerektiğini belirtmek için genel parametre kısıtlamalarında kullanılır. + + + + Not actually a keyword. However, not struct in combination is used as a generic parameter constraint. + Aslında bir anahtar sözcük değildir. Ancak not yapısı, bir genel parametre kısıtlaması olarak kombine şekilde kullanılır. + + + + Indicates the absence of an object. Also used in generic parameter constraints. + Bir nesnenin olmadığını belirtir. Ayrıca genel parametre kısıtlamalarında kullanılır. + + + + Used in discriminated unions to indicate the type of categories of values, and in delegate and exception declarations. + Değer kategorilerinin türünü belirtmek için ayırt edici birleşimlerde, temsilci ve özel durum bildirimlerinde kullanılır. + + + + Used to make the contents of a namespace or module available without qualification. + Bir ad alanının veya modülün içeriğinin sınırlama olmaksızın kullanılabilmesini sağlamak için kullanılır. + + + + Used with Boolean conditions as a Boolean or operator. Equivalent to ||. Also used in member constraints. + Bir Boolean değeri veya işleci olarak Boolean koşullarıyla birlikte kullanılır. Eşdeğeri || simgesidir. Ayrıca üye kısıtlamalarında kullanılır. + + + + Used to implement a version of an abstract or virtual method that differs from the base version. + Soyut veya sanal metodun temel sürümden farklı olan bir sürümünü uygulamak için kullanılır. + + + + Restricts access to a member to code in the same type or module. + Üyeye erişimi aynı türdeki veya modüldeki kodla sınırlandırır. + + + + Allows access to a member from outside the type. + Türün dışından üyeye erişim sağlar. + + + + Used to indicate that a function is recursive. + Bir işlevin özyinelemeli olduğunu belirtmek için kullanılır. + + + + Used to provide a value for the result of the containing computation expression. + Bir hesaplama ifadesinin sonucu olarak sağlanacak değeri belirtmek için kullanılır. + + + + Used to provide a value for the result of the containing computation expression, where that value itself comes from the result another computation expression. + Değerlendirildiğinde, içerdiği hesaplama ifadesinin sonucu veren bir hesaplama ifadesini belirtmek için kullanılır. + + + + Used in query expressions to specify what fields or columns to extract. Note that this is a contextual keyword, which means that it is not actually a reserved word and it only acts like a keyword in appropriate context. + Hangi alanların veya sütunların ayıklanacağını belirtmek için sorgu ifadelerinde kullanılır. Bunun bağlamsal bir anahtar sözcük olduğuna dikkat edin, yani aslında bir ayrılmış anahtar sözcük değildir ve yalnızca uygun bağlamda anahtar sözcük gibi davranır. + + + + Used to indicate a method or property that can be called without an instance of a type, or a value member that is shared among all instances of a type. + Bir türün örneği olmadan veya türün tüm örnekleri arasında paylaşılan bir değer üyesi olmadan çağrılabilecek bir metodu veya özelliği belirtmek için kullanılır. + + + + Used to declare a structure type. Also used in generic parameter constraints. Used for OCaml compatibility in module definitions. + Yapı türü bildirmek için kullanılır. Ayrıca genel parametre kısıtlamaları içinde kullanılır. Modül tanımlarında OCaml uyumluluğu için kullanılır. + + + + Used in conditional expressions. Also used to perform side effects after object construction. + Koşullu ifadelerde kullanılır. Ayrıca nesne oluşturmadan sonra yan etkileri gerçekleştirmek için kullanılır. + + + + Used in for loops to indicate a range. + For döngülerinde aralık belirtmek için kullanılır. + + + + Used to introduce a block of code that might generate an exception. Used together with with or finally. + Özel durum oluşturabilen bir kod bloğunu tanıtmak için kullanılır. with veya finally ile birlikte kullanılır. + + + + Used to declare a class, record, structure, discriminated union, enumeration type, unit of measure, or type abbreviation. + Bir sınıf, kayıt, yapı, ayırt edici birleşim, sabit listesi türü, ölçü birimi veya tür kısaltması bildirmek için kullanılır. + + + + Used to convert to a type that is higher in the inheritance chain. + Devralma zincirinde daha yukarıda bulunan bir türe dönüştürmek için kullanılır. + + + + Used instead of let for values that implement IDisposable" + Dispose'un boş kaynaklara çağrılmasını gerektiren değerler için let yerine kullanılır. + + + + Used instead of let! in computation expressions for computation expression results that implement IDisposable. + Zaman uyumsuz iş akışlarında ve diğer hesaplama ifadelerinde Dispose'un boş kaynaklara çağrılmasını gerektiren değerler için let! yerine kullanılır. + + + + Used in a signature to indicate a value, or in a type to declare a member, in limited situations. + Değer belirtmek için imzada veya sınırlı durumlarda üye bildirmek için türde kullanılır. + + + + Indicates the .NET void type. Used when interoperating with other .NET languages. + .NET void türünü belirtir. Diğer .NET dilleriyle birlikte çalışırken kullanılır. + + + + Used for Boolean conditions (when guards) on pattern matches and to introduce a constraint clause for a generic type parameter. + Desen eşleştirmelerde ve genel türde bir parametreye yönelik olarak bir kısıtlama yan tümcesi eklemek amacıyla Boolean koşulları (when korumaları) için kullanılır. + + + + Introduces a looping construct. + Döngü yapısını tanıtır. + + + + Used together with the match keyword in pattern matching expressions. Also used in object expressions, record copying expressions, and type extensions to introduce member definitions, and to introduce exception handlers. + Desen eşleştirme ifadelerinde match anahtar sözcüğü ile birlikte kullanılır. Ayrıca nesne ifadelerinde, kayıt kopyalama ifadelerinde ve tür uzantılarında üye tanımlarını ve özel durum işleyicilerini tanıtmak için kullanılır. + + + + Used in a sequence expression to produce a value for a sequence. + Diziye ait bir değer üretmek için dizi ifadesinde kullanılır. + + + + Used in a computation expression to append the result of a given computation expression to a collection of results for the containing computation expression. + Verilen bir hesaplama ifadesinin sonucunu, bu hesaplama ifadesinin içerdiği sonuç koleksiyonuna eklemek için hesaplama ifadelerinde kullanılır. + + + + In function types, delimits arguments and return values. Yields an expression (in sequence expressions); equivalent to the yield keyword. Used in match expressions + İşlev türlerinde, bağımsız değişkenleri ve dönüş değerlerini ayırır. Bir ifade verir (dizi ifadelerinde); yield anahtar sözcüğüne eşdeğerdir. Eşleştirme ifadelerinde kullanılır + + + + Assigns a value to a variable. + Değişkene değer atar. + + + + Converts a type to type that is higher in the hierarchy. + Bir türü hiyerarşide daha yukarıdaki bir türe dönüştürür. + + + + Converts a type to a type that is lower in the hierarchy. + Bir türü hiyerarşide daha aşağıdaki bir türe dönüştürür. + + + + Delimits a typed code quotation. + Türü belirtilmiş kod alıntısını ayırır. + + + + Delimits a untyped code quotation. + Türü belirtilmemiş kod alıntısını ayırır. + + + + {0} '{1}' not found in assembly '{2}'. A possible cause may be a version incompatibility. You may need to explicitly reference the correct version of this assembly to allow all referenced components to use the correct version. + {2}' bütünleştirilmiş kodunda {0} '{1}' bulunamadı. Bunun nedeni sürüm uyumsuzluğu olabilir. Başvurulan tüm bileşenlerin doğru sürümü kullanmasına izin vermek için bu bütünleştirilmiş kodun doğru sürümüne açıkça başvurmanız gerekebilir. + + + + {0} '{1}' not found in type '{2}' from assembly '{3}'. A possible cause may be a version incompatibility. You may need to explicitly reference the correct version of this assembly to allow all referenced components to use the correct version. + {3}' bütünleştirilmiş kodundaki '{2}' türünde {0} '{1}' bulunamadı. Bunun nedeni sürüm uyumsuzluğu olabilir. Başvurulan tüm bileşenlerin doğru sürümü kullanmasına izin vermek için bu bütünleştirilmiş kodun doğru sürümüne açıkça başvurmanız gerekebilir. + + + + is + : + + + + This value is not a function and cannot be applied. + Bu değer, bir işlev değil ve uygulanamaz. + + + + This value is not a function and cannot be applied. Did you intend to access the indexer via {0}.[index] instead? + Bu değer, bir işlev değil ve uygulanamaz. Dizin oluşturucuya bunun yerine {0}.[index] üzerinden erişmeye mi çalışıyordunuz? + + + + This expression is not a function and cannot be applied. Did you intend to access the indexer via expr.[index] instead? + Bu ifade, bir işlev değil ve uygulanamaz. Dizin oluşturucuya bunun yerine expr.[index] üzerinden erişmeye mi çalışıyordunuz? + + + + This value is not a function and cannot be applied. Did you forget to terminate a declaration? + Bu değer bir işlev değil ve uygulanamaz. Bir bildirimi sonlandırmayı mı unuttunuz? + + + + The argument names in the signature '{0}' and implementation '{1}' do not match. The argument name from the signature file will be used. This may cause problems when debugging or profiling. + {0}' imzası ve '{1}' uygulaması içindeki bağımsız değişken adları eşleşmiyor. İmza dosyasındaki bağımsız değişken adı kullanılacak. Bu, hata ayıklama veya profil oluşturma sırasında sorunlara neden olabilir. + + + + An error occurred while reading the F# metadata of assembly '{0}'. A reserved construct was utilized. You may need to upgrade your F# compiler or use an earlier version of the assembly that doesn't make use of a specific construct. + '{0}' bütünleştirilmiş kodunun F# meta verileri okunurken bir hata oluştu. Ayrılmış bir yapı kullanıldı. F# derleyicinizi yükseltmeniz veya bütünleştirilmiş kodun belirli bir yapıyı kullanmayan daha eski bir sürümünü kullanmanız gerekebilir. + + + + This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. + Bu metot veya özellik normalde F# kodundan kullanılmaz, bunun yerine ayrıştırma için açıkça bir demet deseni kullanın. + + + + This expression returns a value of type '{0}' but is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to use the expression as a value in the sequence then use an explicit 'yield'. + Bu ifade '{0}' türünde bir değer döndürür ancak örtük olarak atılır. Sonucu bir ada bağlamak için 'let' kullanabilirsiniz, örn. 'let sonuc = ifade'. İfadeyi dizide bir değer olarak kullanmayı amaçladıysanız açık bir 'yield' kullanın. + + + + This expression returns a value of type '{0}' but is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to use the expression as a value in the sequence then use an explicit 'yield!'. + Bu ifade '{0}' türünde bir değer döndürür ancak örtük olarak atılır. Sonucu bir ada bağlamak için 'let' kullanabilirsiniz, örn. 'let sonuc = ifade'. İfadeyi dizide bir değer olarak kullanmayı amaçladıysanız açık bir 'yield!' kullanın. + + + + Used in computation expressions to pattern match directly over the result of another computation expression. + Başka bir hesaplama ifadesinin sonucu üzerinde doğrudan desen eşleştirmesi için hesaplama ifadelerinde kullanılır. + + + + The file '{0}' changed on disk unexpectedly, please reload. + Diskte '{0}' dosyası beklenmedik şekilde değiştirildi. Lütfen yeniden yükleyin. + + + + The byref pointer is readonly, so this write is not permitted. + Byref işaretçisi salt okunur olduğundan bu yazma işlemine izin verilmiyor. + + + + A value must be mutable in order to mutate the contents or take the address of a value type, e.g. 'let mutable x = ...' + İçeriği değiştirmek veya değer türünün adresini almak için bir değerin değiştirilebilir olması gerekir, örn. 'let mutable x = ...' + + + + A ReadOnly attribute has been applied to a struct type with a mutable field. + Değiştirilebilir bir alana sahip bir yapı türüne ReadOnly özniteliği uygulandı. + + + + A byref pointer returned by a function or method is implicitly dereferenced as of F# 4.5. To acquire the return value as a pointer, use the address-of operator, e.g. '&f(x)' or '&obj.Method(arg1, arg2)'. + Bir işlev veya metot tarafından döndürülen bir byref işaretçisinin başvurusu F# 4.5 itibarıyla örtük olarak kaldırıldı. Dönüş değerini bir işaretçi olarak edinmek için address-of işlecini kullanın. Örn. '&f(x)' veya '&obj.Method(arg1, arg2)'. + + + + A type annotated with IsByRefLike must also be a struct. Consider adding the [<Struct>] attribute to the type. + IsByRefLike ek açıklaması eklenmiş bir tür aynı zamanda bir yapı olmalıdır. Türe [<Struct>] özniteliğini eklemeyi göz önünde bulundurun. + + + + The address of the variable '{0}' or a related expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + Bu noktada '{0}' değişkeninin veya ilgili bir değişkenin adresi kullanılamaz. Bunun amacı, yerel değerin adresinin kapsamı dışına kaçmasını engellemektir. + + + + This value can't be assigned because the target '{0}' may refer to non-stack-local memory, while the expression being assigned is assessed to potentially refer to stack-local memory. This is to help prevent pointers to stack-bound memory escaping their scope. + '{0}' hedefi yığında yerel olmayan belleğe başvurabileceğinden ve atanmakta olan ifadenin yığında yerel belleğe başvurma olasılığının olduğu tespit edildiğinden bu değer atanamaz. Bunun amacı, yığınla sınırlı belleğe yönelik işaretçilerin kapsamlarından kaçmasının önlenmesine yardımcı olmaktır. + + + + A value defined in a module must be mutable in order to take its address, e.g. 'let mutable x = ...' + Bir modülde tanımlanan bir değerin adresini alabilmesi için değiştirilebilir olması gerekir. Örn. 'let mutable x = ...' + + + + A type annotated with IsReadOnly must also be a struct. Consider adding the [<Struct>] attribute to the type. + IsReadOnly ek açıklaması eklenmiş bir tür aynı zamanda bir yapı olmalıdır. Türe [<Struct>] özniteliğini eklemeyi göz önünde bulundurun. + + + + Struct members cannot return the address of fields of the struct by reference + Yapı üyeleri, başvuruya göre yapı alanlarının adreslerini döndüremez + + + + The function or method call cannot be used at this point, because one argument that is a byref of a non-stack-local Span or IsByRefLike type is used with another argument that is a stack-local Span or IsByRefLike type. This is to ensure the address of the local value does not escape its scope. + Yığında yerel olmayan bir Span veya IsByRefLike türünün byref’i olan bir bağımsız değişken yığında yerel olan başka bir Span veya IsByRefLike türüyle birlikte kullanıldığından işlev veya metot çağrısı bu noktada kullanılamaz. Bunun amacı, yerel değerin adresinin kapsamından kaçmasının önlenmesine yardımcı olmaktır. + + + + The address of a value returned from the expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + Bu noktada ifadeden döndürülen bir değerin adresi kullanılamaz. Bunun amacı, yerel değerin adresinin kapsamı dışına kaçmasını engellemektir. + + + + The Span or IsByRefLike variable '{0}' cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + Bu noktada Span veya IsByRefLike değişkeni '{0}' kullanılamaz. Bunun amacı, yerel değerin adresinin kapsamı dışına kaçmasını engellemektir. + + + + A Span or IsByRefLike value returned from the expression cannot be used at ths point. This is to ensure the address of the local value does not escape its scope. + Bu noktada ifadeden döndürülen bir Span veya IsByRefLike değeri kullanılamaz. Bunun amacı, yerel değerin adresinin kapsamı dışına kaçmasını engellemektir. + + + + Cannot take the address of the value returned from the expression. Assign the returned value to a let-bound value before taking the address. + İfadeden döndürülen değerin adresi alınamaz. Adresi almadan önce, döndürülen değeri let ile bağlanmış bir değere atayın. + + + + The Span or IsByRefLike expression cannot be returned from this function or method, because it is composed using elements that may escape their scope. + The Span or IsByRefLike expression cannot be returned from this function or method, because it is composed using elements that may escape their scope. + + + + This type does not inherit Attribute, it will not work correctly with other .NET languages. + This type does not inherit Attribute, it will not work correctly with other .NET languages. + + + + The exception '{0}' does not have a field named '{1}'. + The exception '{0}' does not have a field named '{1}'. + + + + The constructor does not have a field named '{0}'. + The constructor does not have a field named '{0}'. + + + + Active patterns do not have fields. This syntax is invalid. + Active patterns do not have fields. This syntax is invalid. + + + + + \ No newline at end of file diff --git a/src/fsharp/xlf/FSComp.txt.zh-Hans.xlf b/src/fsharp/xlf/FSComp.txt.zh-Hans.xlf new file mode 100644 index 00000000000..180d2f95b6a --- /dev/null +++ b/src/fsharp/xlf/FSComp.txt.zh-Hans.xlf @@ -0,0 +1,7087 @@ + + + + + + The namespace '{0}' is not defined. + 未定义命名空间“{0}”。 + + + + The namespace or module '{0}' is not defined. + 未定义命名空间或模块“{0}”。 + + + + The field, constructor or member '{0}' is not defined. + 未定义字段、构造函数或成员“{0}”。 + + + + The value, constructor, namespace or type '{0}' is not defined. + 未定义值、构造函数、命名空间或类型“{0}”。 + + + + The value or constructor '{0}' is not defined. + 未定义值或构造函数“{0}”。 + + + + The value, namespace, type or module '{0}' is not defined. + 未定义值、命名空间、类型或模块“{0}”。 + + + + The constructor, module or namespace '{0}' is not defined. + 未定义构造函数、模块或命名空间“{0}”。 + + + + The type '{0}' is not defined. + 未定义类型“{0}”。 + + + + The type '{0}' is not defined in '{1}'. + 类型“{0}”未在“{1}”中定义。 + + + + The record label or namespace '{0}' is not defined. + 未定义记录标签或命名空间“{0}”。 + + + + The record label '{0}' is not defined. + 记录标签“{0}”未定义。 + + + + Maybe you want one of the following: + 你可能需要以下之一: + + + + The type parameter {0} is not defined. + 未定义类型参数 {0}。 + + + + The pattern discriminator '{0}' is not defined. + 未定义模式鉴别器“{0}”。 + + + + Replace with '{0}' + 替换为“{0}” + + + + Add . for indexer access. + 添加 . 进行索引器访问。 + + + + All elements of a list must be of the same type as the first element, which here is '{0}'. This element has type '{1}'. + 列表构造函数表达式的所有元素必须具有同一类型。此表达式的类型应为“{0}”,但此处类型为“{1}”。 + + + + All elements of an array must be of the same type as the first element, which here is '{0}'. This element has type '{1}'. + 数组构造函数表达式的所有元素必须具有同一类型。此表达式的类型应为“{0}”,但此处类型为“{1}”。 + + + + This 'if' expression is missing an 'else' branch. Because 'if' is an expression, and not a statement, add an 'else' branch which also returns a value of type '{0}'. + if 表达式缺少 "else" branch。"then" branch 的类型为“{0}”。因为 "if" 是一个表达式,而非语句,请添加将返回同一类型值的 "else" branch。 + + + + The 'if' expression needs to have type '{0}' to satisfy context type requirements. It currently has type '{1}'. + if 表达式需要具有类型“{0}”才能满足上下文类型要求。当前的类型为“{1}”。 + + + + All branches of an 'if' expression must return values of the same type as the first branch, which here is '{0}'. This branch returns a value of type '{1}'. + if 表达式的所有分支必须具有同一类型。此表达式的类型应为“{0}”,但此处类型为“{1}”。 + + + + All branches of a pattern match expression must return values of the same type as the first branch, which here is '{0}'. This branch returns a value of type '{1}'. + 模式匹配表达式的所有分支必须返回相同类型的值。第一个分支返回“{0}”类型的值,但此分支返回“{1}”类型的值。 + + + + A pattern match guard must be of type 'bool', but this 'when' expression is of type '{0}'. + 模式匹配临界必须是 "bool" 类型,但此 "when" 表达式的类型为“{0}”。 + + + + A ';' is used to separate field values in records. Consider replacing ',' with ';'. + 使用 ";" 来分隔记录中的字段值。考虑使用 ";" 替换 ","。 + + + + The '!' operator is used to dereference a ref cell. Consider using 'not expr' here. + ! 运算符用于取消引用引用的单元格。请考虑在此处使用 "not expr"。 + + + + The non-generic type '{0}' does not expect any type arguments, but here is given {1} type argument(s) + 非泛型类型“{0}”不需要任何类型参数,但此处给定了 {1} 个类型参数 + + + + Consider using 'return!' instead of 'return'. + 考虑使用 "return!",而非 "return"。 + + + + Consider using 'yield!' instead of 'yield'. + 考虑使用 "yield!",而非 "yield"。 + + + + \nA tuple type is required for one or more arguments. Consider wrapping the given arguments in additional parentheses or review the definition of the interface. + \n一个或多个参数需要元组类型。请考虑在额外的括号中换行给定的参数或评审接口的定义。 + + + + Invalid warning number '{0}' + 警告编号“{0}”无效 + + + + Invalid version string '{0}' + 版本字符串“{0}”无效 + + + + Invalid version file '{0}' + 版本文件“{0}”无效 + + + + Microsoft (R) F# Compiler version {0} + Microsoft(R) F# 编译器版本 {0} + + + + F# Compiler for F# {0} + 适用于 F# {0} 的 F# 编译器 + + + + Problem with filename '{0}': {1} + 文件名“{0}”存在问题: {1} + + + + No inputs specified + 未指定输入 + + + + The '--pdb' option requires the '--debug' option to be used + “--pdb”选项要求使用“--debug”选项 + + + + The search directory '{0}' is invalid + 搜索目录“{0}”无效 + + + + The search directory '{0}' could not be found + 未能找到搜索目录“{0}” + + + + '{0}' is not a valid filename + “{0}”不是有效的文件名 + + + + '{0}' is not a valid assembly name + “{0}”不是有效的程序集名称 + + + + Unrecognized privacy setting '{0}' for managed resource, valid options are 'public' and 'private' + 无法识别的托管资源隐私设置“{0}”,有效的选项为“public”和“private” + + + + Multiple references to '{0}.dll' are not permitted + 不允许多次引用“{0}.dll” + + + + Could not read version from mscorlib.dll + 未能从 mscorlib.dll 读取版本 + + + + Unable to read assembly '{0}' + 无法读取程序集“{0}” + + + + Assembly resolution failure at or near this location + 程序集解析在此位置或此位置附近失败 + + + + The declarations in this file will be placed in an implicit module '{0}' based on the file name '{1}'. However this is not a valid F# identifier, so the contents will not be accessible from other files. Consider renaming the file or adding a 'module' or 'namespace' declaration at the top of the file. + 此文件中的声明将置于基于文件名“{1}”的隐式模块“{0}”中。但由于这不是一个有效的 F# 标识符,因此将无法从其他文件访问该内容。请考虑重命名此文件或在文件的顶部添加“module”或“namespace”声明。 + + + + Files in libraries or multiple-file applications must begin with a namespace or module declaration, e.g. 'namespace SomeNamespace.SubNamespace' or 'module SomeNamespace.SomeModule'. Only the last source file of an application may omit such a declaration. + 库或多文件应用程序中的文件必须以命名空间或模块声明开头,例如 “namespace SomeNamespace.SubNamespace”或“module SomeNamespace.SomeModule”。仅应用程序的最后一个源文件可以忽略此类声明。 + + + + Files in libraries or multiple-file applications must begin with a namespace or module declaration. When using a module declaration at the start of a file the '=' sign is not allowed. If this is a top-level module, consider removing the = to resolve this error. + 库或多文件应用程序中的文件必须以命名空间或模块声明开头。当在文件开头使用模块声明时,"=" 号不被允许。如果这是顶级模块,请考虑删除 = 来解决此错误。 + + + + This file contains multiple declarations of the form 'module SomeNamespace.SomeModule'. Only one declaration of this form is permitted in a file. Change your file to use an initial namespace declaration and/or use 'module ModuleName = ...' to define your modules. + 此文件包含形式为“module SomeNamespace.SomeModule”的多个声明。一个文件中只能有一个此形式的声明。将您的文件更改为使用初始命名空间声明并且/或者使用“module ModuleName = ...”定义模块。 + + + + Option requires parameter: {0} + 选项需要参数: {0} + + + + Source file '{0}' could not be found + 未能找到源文件“{0}” + + + + The file extension of '{0}' is not recognized. Source files must have extension .fs, .fsi, .fsx, .fsscript, .ml or .mli. + 无法识别“{0}”的文件扩展名。源文件的扩展名必须为 .fs、.fsi、.fsx、.fsscript、.ml 或 .mli。 + + + + Could not resolve assembly '{0}' + 未能解析程序集“{0}” + + + + Could not resolve assembly '{0}' required by '{1}' + 未能解析“{1}”所需的程序集“{0}” + + + + Error opening binary file '{0}': {1} + 打开二进制文件“{0}”时出错: {1} + + + + The F#-compiled DLL '{0}' needs to be recompiled to be used with this version of F# + 必须对 F# 编译的 DLL“{0}”进行重新编译,才能将其用于此版本的 F# + + + + Invalid directive. Expected '#I \"<path>\"'. + 指令无效。应为“#I \"<路径>\"”。 + + + + Invalid directive. Expected '#r \"<file-or-assembly>\"'. + 指令无效。应为“#r \"<文件或程序集>\"”。 + + + + Invalid directive. Expected '#load \"<file>\" ... \"<file>\"'. + 指令无效。应为“#load \"<文件>\" ... \"<文件>\"”。 + + + + Invalid directive. Expected '#time', '#time \"on\"' or '#time \"off\"'. + 指令无效。应为“#time”、“#time \"on\"”或“#time \"off\"”。 + + + + Directives inside modules are ignored + 模块中的指令被忽略 + + + + A signature for the file or module '{0}' has already been specified + 已指定文件或模块“{0}”的签名 + + + + An implementation of file or module '{0}' has already been given. Compilation order is significant in F# because of type inference. You may need to adjust the order of your files to place the signature file before the implementation. In Visual Studio files are type-checked in the order they appear in the project file, which can be edited manually or adjusted using the solution explorer. + 已提供文件或模块“{0}”的实现。由于需要进行类型推理,因此编译顺序在 F# 中很重要。您可能需要调整文件的顺序,将签名文件放在实现之前。在 Visual Studio 中,将按照文件在项目文件中的显示顺序对这些文件执行类型检查,可以使用解决方案资源管理器手动编辑或调整此显示顺序。 + + + + An implementation of the file or module '{0}' has already been given + 已提供文件或模块“{0}”的实现 + + + + The signature file '{0}' does not have a corresponding implementation file. If an implementation file exists then check the 'module' and 'namespace' declarations in the signature and implementation files match. + 签名文件“{0}”没有相应的实现文件。如果存在实现文件,则检查签名文件和实现文件中的“module”和“namespace”声明是否匹配。 + + + + '{0}' is not a valid integer argument + “{0}”不是有效的整数参数 + + + + '{0}' is not a valid floating point argument + “{0}”不是有效的浮点型参数 + + + + Unrecognized option: '{0}' + 无法识别的选项: '{0}' + + + + Invalid module or namespace name + 模块或命名空间名称无效 + + + + Error reading/writing metadata for the F# compiled DLL '{0}'. Was the DLL compiled with an earlier version of the F# compiler? (error: '{1}'). + 读取/写入 F# 编译的 DLL“{0}”时出错。是否使用了早期版本的 F# 编译器编译 DLL? (错误: “{1}”)。 + + + + The type/module '{0}' is not a concrete module or type + 类型/模块“{0}”不是具体的模块或类型 + + + + The type '{0}' has an inline assembly code representation + 类型“{0}”具有内联程序集代码表示形式 + + + + A namespace and a module named '{0}' both occur in two parts of this assembly + 名称均为“{0}”的一个命名空间和一个模块同时出现在此程序集的两个部分中 + + + + Two modules named '{0}' occur in two parts of this assembly + 名为“{0}”的两个模块同时出现在此程序集的两个部分中 + + + + Two type definitions named '{0}' occur in namespace '{1}' in two parts of this assembly + 两个名为“{0}”的类型定义出现在命名空间“{1}”的此程序集的两个部分中 + + + + A module and a type definition named '{0}' occur in namespace '{1}' in two parts of this assembly + 名称均为“{0}”的一个模块和一个类型定义出现在命名空间“{1}”的此程序集的两个部分中 + + + + Invalid member signature encountered because of an earlier error + 遇到无效的成员签名,因为前面出现了错误 + + + + This value does not have a valid property setter type + 此值不具有有效的属性 setter 类型 + + + + Invalid form for a property getter. At least one '()' argument is required when using the explicit syntax. + 属性 Getter 的格式无效。在使用显式语法时,至少需要一个 "()" 参数。 + + + + Invalid form for a property setter. At least one argument is required. + 属性 setter 的格式无效。至少需要一个参数。 + + + + Unexpected use of a byref-typed variable + 对 byref 类型化变量的意外使用 + + + + Invalid mutation of a constant expression. Consider copying the expression to a mutable local, e.g. 'let mutable x = ...'. + 常数表达式的变化无效。请考虑将该表达式复制一个可变的本地变量,例如“let mutable x = ...”。 + + + + The value has been copied to ensure the original is not mutated by this operation or because the copy is implicit when returning a struct from a member and another member is then accessed + 已复制该值以确保此操作不会更改原始值,或由于该副本在从成员返回结构时为隐式,而随后访问了另一成员 + + + + Recursively defined values cannot appear directly as part of the construction of a tuple value within a recursive binding + 以递归方式定义的值在递归绑定内不能直接显示为元组值的构造的一部分 + + + + Recursive values cannot appear directly as a construction of the type '{0}' within a recursive binding. This feature has been removed from the F# language. Consider using a record instead. + 递归值在递归绑定内不能直接显示为类型“{0}”的构造。在 F# 语言中,此功能已删除。请考虑改用记录。 + + + + Recursive values cannot be directly assigned to the non-mutable field '{0}' of the type '{1}' within a recursive binding. Consider using a mutable field instead. + 递归值不能直接赋给递归绑定内的类型“{1}”的不可变字段“{0}”。请考虑改用可变字段。 + + + + Unexpected decode of AutoOpenAttribute + 对 AutoOpenAttribute 的意外解码 + + + + Unexpected decode of InternalsVisibleToAttribute + 对 InternalsVisibleToAttribute 的意外解码 + + + + Unexpected decode of InterfaceDataVersionAttribute + 对 InterfaceDataVersionAttribute 的意外解码 + + + + Active patterns cannot return more than 7 possibilities + 活动模式不能返回 7 个以上的可能结果 + + + + This is not a valid constant expression or custom attribute value + 这不是有效的常数表达式或自定义特性值 + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe mutability attributes differ + 模块“{0}”包含\n {1} \n而其签名指定\n {2} \n可变性特性不同 + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe names differ + 模块“{0}”包含\n {1} \n而其签名指定\n {2} \n名称不同 + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe compiled names differ + 模块“{0}”包含\n {1} \n而其签名指定\n {2} \n编译的名称不同 + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe display names differ + 模块“{0}”包含\n {1} \n而其签名指定\n {2} \n显示名称不同 + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe accessibility specified in the signature is more than that specified in the implementation + 模块“{0}”包含\n {1} \n而其签名指定\n {2} \n签名中指定的可访问性高于实现中指定的可访问性 + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe inline flags differ + 模块“{0}”包含\n {1} \n而其签名指定\n {2} \n内联标志不同 + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe literal constant values and/or attributes differ + 模块“{0}”包含\n {1} \n而其签名指定\n {2} \n文本常数值和/或特性不同 + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is a type function and the other is not. The signature requires explicit type parameters if they are present in the implementation. + 模块“{0}”包含\n {1} \n而其签名指定\n {2} \n一个是类型函数,另一个不是类型函数。如果实现中存在显式类型参数,则签名需要这些显式类型参数。 + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe respective type parameter counts differ + 模块“{0}”包含\n {1} \n而其签名指定\n {2} \n各自的类型参数计数不同 + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe types differ + 模块“{0}”包含\n {1} \n而其签名指定\n {2} \n类型不同 + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is an extension member and the other is not + 模块“{0}”包含\n {1} \n而其签名指定\n {2} \n一个是扩展成员,另一个不是扩展成员 + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nAn arity was not inferred for this value + 模块“{0}”包含\n {1} \n而其签名指定\n {2} \n未为此值推理 arity + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe number of generic parameters in the signature and implementation differ (the signature declares {3} but the implementation declares {4} + 模块“{0}”包含\n {1} \n而其签名指定\n {2} \n签名和实现中的泛型参数数目不同(签名声明 {3} 个泛型参数,而实现声明 {4} 个泛型参数 + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe generic parameters in the signature and implementation have different kinds. Perhaps there is a missing [<Measure>] attribute. + 模块“{0}”包含\n {1} \n而其签名指定\n {2} \n签名和实现中的泛型参数类型不同。可能缺少 [<Measure>] 特性。 + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe arities in the signature and implementation differ. The signature specifies that '{3}' is function definition or lambda expression accepting at least {4} argument(s), but the implementation is a computed function value. To declare that a computed function value is a permitted implementation simply parenthesize its type in the signature, e.g.\n\tval {5}: int -> (int -> int)\ninstead of\n\tval {6}: int -> int -> int. + 模块“{0}”包含\n {1} \n而其签名指定\n {2} \n签名和实现中的 arity 不同。签名指定“{3}”为函数定义或为接受至少个 {4} 参数的 lambda 表达式,而实现是计算出的函数值。若要声明计算出的函数值为允许的实现,只需在签名中用括号将其类型括起来,例如\n\tval {5}: int -> (int -> int)\n而非\n\tval {6}: int -> int -> int。 + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe CLI member names differ + 模块“{0}”包含\n {1} \n而其签名指定\n {2} \nCLI 成员名称不同 + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is static and the other isn't + 模块“{0}”包含\n {1} \n而其签名指定\n {2} \n一个是静态的,另一个不是静态的 + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is virtual and the other isn't + 模块“{0}”包含\n {1} \n而其签名指定\n {2} \n一个是虚拟的,另一个不是虚拟的 + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is abstract and the other isn't + 模块“{0}”包含\n {1} \n而其签名指定\n {2} \n一个是抽象的,另一个不是抽象的 + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is final and the other isn't + 模块“{0}”包含\n {1} \n而其签名指定\n {2} \n一个是最终的,另一个不是最终的 + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is marked as an override and the other isn't + 模块“{0}”包含\n {1} \n而其签名指定\n {2} \n一个标记为重写,另一个未标记为重写 + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is a constructor/property and the other is not + 模块“{0}”包含\n {1} \n而其签名指定\n {2} \n一个是构造函数/属性,另一个不是构造函数/属性 + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe compiled representation of this method is as a static member but the signature indicates its compiled representation is as an instance member + 模块“{0}”包含\n {1} \n而其签名指定\n {2} \n此方法的已编译表示形式作为一个静态成员,而签名指示其已编译表示形式作为一个实例成员 + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe compiled representation of this method is as an instance member, but the signature indicates its compiled representation is as a static member + 模块“{0}”包含\n {1} \n而其签名指定\n {2} \n此方法的已编译表示形式作为一个实例成员,而签名指示其已编译表示形式作为一个静态成员 + + + + The {0} definitions in the signature and implementation are not compatible because the names differ. The type is called '{1}' in the signature file but '{2}' in implementation. + 签名和实现中的 {0} 定义不兼容,因为名称不同。该类型在签名文件中称为“{1}”,但在实现中称为“{2}”。 + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the respective type parameter counts differ + 签名和实现中类型“{1}”的 {0} 定义不兼容,因为各自的类型参数计数不同 + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the accessibility specified in the signature is more than that specified in the implementation + 签名和实现中类型“{1}”的 {0} 定义不兼容,因为签名中指定的辅助功能比实现中指定的辅助功能多 + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature requires that the type supports the interface {2} but the interface has not been implemented + 签名和实现中类型“{1}”的 {0} 定义不兼容,因为签名要求此类型支持接口 {2},而该接口尚未实现 + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation says this type may use nulls as a representation but the signature does not + 签名和实现中类型“{1}”的 {0} 定义不兼容,因为实现指明此类型可以使用 null 作为表示形式,而签名未指明这一点 + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation says this type may use nulls as an extra value but the signature does not + 签名和实现中类型“{1}”的 {0} 定义不兼容,因为实现指明此类型可以使用 null 作为额外值,而签名未指明这一点 + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature says this type may use nulls as a representation but the implementation does not + 签名和实现中类型“{1}”的 {0} 定义不兼容,因为签名指明此类型可以使用 null 作为表示形式,而实现未指明这一点 + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature says this type may use nulls as an extra value but the implementation does not + 签名和实现中类型“{1}”的 {0} 定义不兼容,因为签名指明此类型可以使用 null 作为额外值,而实现未指明这一点 + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation type is sealed but the signature implies it is not. Consider adding the [<Sealed>] attribute to the signature. + 签名和实现中类型“{1}”的 {0} 定义不兼容,因为实现类型已密封,但签名暗示它未密封。请考虑将 [<Sealed>] 特性添加到签名。 + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation type is not sealed but signature implies it is. Consider adding the [<Sealed>] attribute to the implementation. + 签名和实现中类型“{1}”的 {0} 定义不兼容,因为实现类型未密封,但签名暗示它已密封。请考虑将 [<Sealed>] 特性添加到实现。 + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation is an abstract class but the signature is not. Consider adding the [<AbstractClass>] attribute to the signature. + 签名和实现中类型“{1}”的 {0} 定义不兼容,因为实现是抽象类,而签名不是。请考虑将 [<AbstractClass>] 特性添加到签名。 + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature is an abstract class but the implementation is not. Consider adding the [<AbstractClass>] attribute to the implementation. + 签名和实现中类型“{1}”的 {0} 定义不兼容,因为签名是抽象类,而实现不是。请考虑将 [<AbstractClass>] 特性添加到实现。 + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the types have different base types + 签名和实现中类型“{1}”的 {0} 定义不兼容,因为类型具有不同的基类型 + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the number of {2}s differ + 签名和实现中类型“{1}”的 {0} 定义不兼容,因为 {2} 的数量不同 + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature defines the {2} '{3}' but the implementation does not (or does, but not in the same order) + 签名和实现中类型“{1}”的 {0} 定义不兼容,因为签名定义了 {2}“{3}”,而实现没有定义(或者按不同的顺序进行了定义) + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation defines the {2} '{3}' but the signature does not (or does, but not in the same order) + 签名和实现中类型“{1}”的 {0} 定义不兼容,因为实现定义了 {2}“{3}”,而签名没有定义(或者按不同的顺序进行了定义) + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation defines a struct but the signature defines a type with a hidden representation + 签名和实现中类型“{1}”的 {0} 定义不兼容,因为实现定义了一个结构,而签名采用隐藏的表示形式定义了一个类型 + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because a CLI type representation is being hidden by a signature + 签名和实现中类型“{1}”的 {0} 定义不兼容,因为签名将隐藏 CLI 类型表示形式 + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because a type representation is being hidden by a signature + 签名和实现中类型“{1}”的 {0} 定义不兼容,因为签名将隐藏类型表示形式 + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the types are of different kinds + 签名和实现中类型“{1}”的 {0} 定义不兼容,因为类型的种类不相同 + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the IL representations differ + 签名和实现中类型“{1}”的 {0} 定义不兼容,因为 IL 表示形式不同 + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the representations differ + 签名和实现中类型“{1}”的 {0} 定义不兼容,因为表示形式不同 + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the field {2} was present in the implementation but not in the signature + 签名和实现中类型“{1}”的 {0} 定义不兼容,因为实现中具有字段“{2}”,而签名中没有该字段 + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the order of the fields is different in the signature and implementation + 签名和实现中类型“{1}”的 {0} 定义不兼容,因为签名和实现中的字段顺序不同 + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the field {2} was required by the signature but was not specified by the implementation + 签名和实现中类型“{1}”的 {0} 定义不兼容,因为签名需要字段“{2}”,而实现未指定该字段 + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the field '{2}' was present in the implementation but not in the signature. Struct types must now reveal their fields in the signature for the type, though the fields may still be labelled 'private' or 'internal'. + 签名和实现中类型“{1}”的 {0} 定义不兼容,因为实现中具有字段“{2}”,而签名中没有该字段。虽然这些字段可能仍标记为“私有”或“内部”,但是结构类型此时必须在该类型的签名中显示其字段。 + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the abstract member '{2}' was required by the signature but was not specified by the implementation + 签名和实现中类型“{1}”的 {0} 定义不兼容,因为签名需要抽象成员“{2}”,而实现未指定该成员 + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the abstract member '{2}' was present in the implementation but not in the signature + 签名和实现中类型“{1}”的 {0} 定义不兼容,因为实现中具有抽象成员“{2}”,而签名中没有该成员 + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature declares a {2} while the implementation declares a {3} + 签名和实现中类型“{1}”的 {0} 定义不兼容,因为签名声明的是 {2},而实现声明的是 {3} + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the abbreviations differ: {2} versus {3} + 签名和实现中类型“{1}”的 {0} 定义不兼容,因为缩写不同: {2} 与 {3} + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because an abbreviation is being hidden by a signature. The abbreviation must be visible to other CLI languages. Consider making the abbreviation visible in the signature. + 签名和实现中类型“{1}”的 {0} 定义不兼容,因为签名将隐藏缩写。缩写必须对其他 CLI 语言可见。请考虑使缩写在签名中可见。 + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature has an abbreviation while the implementation does not + 签名和实现中类型“{1}”的 {0} 定义不兼容,因为签名具有缩写,而实现没有缩写 + + + + The module contains the constructor\n {0} \nbut its signature specifies\n {1} \nThe names differ + 该模块包含构造函数\n {0} \n而其签名指定\n {1} \n名称不同 + + + + The module contains the constructor\n {0} \nbut its signature specifies\n {1} \nThe respective number of data fields differ + 该模块包含构造函数\n {0} \n而其签名指定\n {1} \n各自的数据字段数不同 + + + + The module contains the constructor\n {0} \nbut its signature specifies\n {1} \nThe types of the fields differ + 该模块包含构造函数\n {0} \n而其签名指定\n {1} \n字段的类型不同 + + + + The module contains the constructor\n {0} \nbut its signature specifies\n {1} \nthe accessibility specified in the signature is more than that specified in the implementation + 该模块包含构造函数\n {0} \n而其签名指定\n {1} \n签名中指定的可访问性高于实现中指定的可访问性 + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe names differ + 该模块包含字段\n {0} \n而其签名指定\n {1} \n名称不同 + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nthe accessibility specified in the signature is more than that specified in the implementation + 该模块包含字段\n {0} \n而其签名指定\n {1} \n签名中指定的可访问性高于实现中指定的可访问性 + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe 'static' modifiers differ + 该模块包含字段\n {0} \n而其签名指定\n {1} \n“static”修饰符不同 + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe 'mutable' modifiers differ + 该模块包含字段\n {0} \n而其签名指定\n {1} \n“mutable”修饰符不同 + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe 'literal' modifiers differ + 该模块包含字段\n {0} \n而其签名指定\n {1} \n“literal”修饰符不同 + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe types differ + 该模块包含字段\n {0} \n而其签名指定\n {1} \n类型不同 + + + + The implicit instantiation of a generic construct at or near this point could not be resolved because it could resolve to multiple unrelated types, e.g. '{0}' and '{1}'. Consider using type annotations to resolve the ambiguity + 未能解析在此点或其附近进行的泛型构造的隐式实例化,因为它可以解析为多个不相关的类型,例如“{0}”和“{1}”。请考虑使用类型批注来解析此多义性 + + + + Could not resolve the ambiguity inherent in the use of a 'printf'-style format string + 未能解析使用“printf”样式的格式字符串所产生的固有多义性 + + + + Could not resolve the ambiguity in the use of a generic construct with an 'enum' constraint at or near this position + 未能解析在此位置或其附近使用带“enum”约束的泛型构造所产生的多义性 + + + + Could not resolve the ambiguity in the use of a generic construct with a 'delegate' constraint at or near this position + 未能解析在此位置或其附近使用带“delegate”约束的泛型构造所产生的多义性 + + + + Invalid value + 值无效 + + + + The signature and implementation are not compatible because the respective type parameter counts differ + 签名和实现不兼容,因为各自的类型参数数目不同 + + + + The signature and implementation are not compatible because the type parameter in the class/signature has a different compile-time requirement to the one in the member/implementation + 签名和实现不兼容,因为类/签名中的类型参数与成员/实现中的类型参数具有的编译时要求不同 + + + + The signature and implementation are not compatible because the declaration of the type parameter '{0}' requires a constraint of the form {1} + 签名和实现不兼容,因为类型参数“{0}”的声明需要 {1} 格式的约束 + + + + The signature and implementation are not compatible because the type parameter '{0}' has a constraint of the form {1} but the implementation does not. Either remove this constraint from the signature or add it to the implementation. + 签名和实现不兼容,因为类型参数“{0}”具有 {1} 格式的约束,而实现没有此约束。从签名中删除此约束,或将此约束添加到实现。 + + + + The type '{0}' implements 'System.IComparable'. Consider also adding an explicit override for 'Object.Equals' + 类型“{0}”实现“System.IComparable”。请考虑同时添加“Object.Equals”的显式重写 + + + + The type '{0}' implements 'System.IComparable' explicitly but provides no corresponding override for 'Object.Equals'. An implementation of 'Object.Equals' has been automatically provided, implemented via 'System.IComparable'. Consider implementing the override 'Object.Equals' explicitly + 类型“{0}”显式实现“System.IComparable”,但未提供相对应的“Object.Equals”的重写。已自动提供“Object.Equals”的实现(通过“System.IComparable”实现)。请考虑显式实现重写“Object.Equals” + + + + The struct, record or union type '{0}' has an explicit implementation of 'Object.GetHashCode' or 'Object.Equals'. You must apply the 'CustomEquality' attribute to the type + 结构、记录或联合类型“{0}”具有“Object.GetHashCode”或“Object.Equals”的显式实现。您必须将“CustomEquality”特性应用于该类型 + + + + The struct, record or union type '{0}' has an explicit implementation of 'Object.GetHashCode'. Consider implementing a matching override for 'Object.Equals(obj)' + 结构、记录或联合类型“{0}”具有“Object.GetHashCode”的显式实现。请考虑为“Object.Equals(obj)”实现匹配的重写 + + + + The struct, record or union type '{0}' has an explicit implementation of 'Object.Equals'. Consider implementing a matching override for 'Object.GetHashCode()' + 结构、记录或联合类型“{0}”具有“Object.Equals”的显式实现。请考虑为“Object.GetHashCode()”实现匹配的重写 + + + + The exception definitions are not compatible because a CLI exception mapping is being hidden by a signature. The exception mapping must be visible to other modules. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1} + 异常定义不兼容,因为签名将隐藏 CLI 异常映射。此异常映射必须对其他模块可见。该模块包含异常定义\n {0} \n而其签名指定\n\t{1} + + + + The exception definitions are not compatible because the CLI representations differ. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1} + 异常定义不兼容,因为 CLI 表示形式不同。该模块包含异常定义\n {0} \n而其签名指定\n\t{1} + + + + The exception definitions are not compatible because the exception abbreviation is being hidden by the signature. The abbreviation must be visible to other CLI languages. Consider making the abbreviation visible in the signature. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1}. + 异常定义不兼容,因为签名将隐藏异常缩写词。缩写词必须对其他 CLI 语言可见。请考虑使缩写词在签名中可见。该模块包含异常定义\n {0} \n而其签名指定\n\t{1}。 + + + + The exception definitions are not compatible because the exception abbreviations in the signature and implementation differ. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1}. + 异常定义不兼容,因为签名和实现中的异常缩写词不同。该模块包含异常定义\n {0} \n而其签名指定\n\t{1}。 + + + + The exception definitions are not compatible because the exception declarations differ. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1}. + 异常定义不兼容,因为异常声明不同。该模块包含异常定义\n {0} \n而其签名指定\n\t{1}。 + + + + The exception definitions are not compatible because the field '{0}' was required by the signature but was not specified by the implementation. The module contains the exception definition\n {1} \nbut its signature specifies\n\t{2}. + 异常定义不兼容,因为签名需要字段“{0}”,而实现未指定该字段。该模块包含异常定义\n {1} \n而其签名指定\n\t{2}。 + + + + The exception definitions are not compatible because the field '{0}' was present in the implementation but not in the signature. The module contains the exception definition\n {1} \nbut its signature specifies\n\t{2}. + 异常定义不兼容,因为实现中具有字段“{0}”,而签名中没有该字段。该模块包含异常定义\n {1} \n而其签名指定\n\t{2}。 + + + + The exception definitions are not compatible because the order of the fields is different in the signature and implementation. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1}. + 异常定义不兼容,因为签名和实现中的字段顺序不同。该模块包含异常定义\n {0} \n而其签名指定\n\t{1}。 + + + + The namespace or module attributes differ between signature and implementation + 签名和实现中的命名空间或模块特性不同 + + + + This method is over-constrained in its type parameters + 此方法在其类型参数中过度约束 + + + + No implementations of '{0}' had the correct number of arguments and type parameters. The required signature is '{1}'. + “{0}”的任何实现都不具有正确数目的参数和类型参数。所需签名为“{1}”。 + + + + The override for '{0}' was ambiguous + “{0}”的重写具有多义性 + + + + More than one override implements '{0}' + 多个重写实现“{0}” + + + + The method '{0}' is sealed and cannot be overridden + 方法“{0}”是密封的,不能重写 + + + + The override '{0}' implements more than one abstract slot, e.g. '{1}' and '{2}' + 重写“{0}”实现多个抽象槽,例如“{1}”和“{2}” + + + + Duplicate or redundant interface + 重复或冗余的接口 + + + + The interface '{0}' is included in multiple explicitly implemented interface types. Add an explicit implementation of this interface. + 接口“{0}”包含在多个显式实现的接口类型中。添加此接口的显式实现。 + + + + A named argument has been assigned more than one value + 已为一个命名参数分配多个值 + + + + No implementation was given for '{0}' + 未为“{0}”给定任何实现 + + + + No implementation was given for '{0}'. Note that all interface members must be implemented and listed under an appropriate 'interface' declaration, e.g. 'interface ... with member ...'. + 未为“{0}”给定任何实现。请注意,必须在适当的“interface”声明下实现并列出所有接口成员,例如“interface ... with member ...”。 + + + + The member '{0}' does not have the correct number of arguments. The required signature is '{1}'. + 成员“{0}”不具有正确数目的参数。所需签名为“{1}”。 + + + + The member '{0}' does not have the correct number of method type parameters. The required signature is '{1}'. + 成员“{0}”不具有正确数目的方法类型参数。所需签名为“{1}”。 + + + + The member '{0}' does not have the correct kinds of generic parameters. The required signature is '{1}'. + 成员“{0}”不具有正确种类的泛型参数。所需签名为“{1}”。 + + + + The member '{0}' cannot be used to implement '{1}'. The required signature is '{2}'. + 成员“{0}”不能用于实现“{1}”。所需签名为“{2}”。 + + + + Error while parsing embedded IL + 分析嵌入的 IL 时出错 + + + + Error while parsing embedded IL type + 分析嵌入的 IL 类型时出错 + + + + This indexer notation has been removed from the F# language + 在 F# 语言中,此索引器表示法已删除 + + + + Invalid expression on left of assignment + 赋值运算左侧的表达式无效 + + + + The 'ReferenceEquality' attribute cannot be used on structs. Consider using the 'StructuralEquality' attribute instead, or implement an override for 'System.Object.Equals(obj)'. + 不能对结构使用“ReferenceEquality”特性。请考虑改用“StructuralEquality”特性,或实现对“System.Object.Equals(obj)”的重写。 + + + + This type uses an invalid mix of the attributes 'NoEquality', 'ReferenceEquality', 'StructuralEquality', 'NoComparison' and 'StructuralComparison' + 此类型使用的“NoEquality”、“ReferenceEquality”、“StructuralEquality”、“NoComparison”和“StructuralComparison”特性组合无效 + + + + The 'NoEquality' attribute must be used in conjunction with the 'NoComparison' attribute + “NoEquality”特性必须与“NoComparison”特性结合使用 + + + + The 'StructuralComparison' attribute must be used in conjunction with the 'StructuralEquality' attribute + “StructuralComparison”特性必须与“StructuralEquality”特性结合使用 + + + + The 'StructuralEquality' attribute must be used in conjunction with the 'NoComparison' or 'StructuralComparison' attributes + “StructuralEquality”特性必须与“NoComparison”或“StructuralComparison”特性结合使用 + + + + A type cannot have both the 'ReferenceEquality' and 'StructuralEquality' or 'StructuralComparison' attributes + 一个类型不能同时具有“ReferenceEquality”特性和“StructuralEquality”或“StructuralComparison”特性 + + + + Only record, union, exception and struct types may be augmented with the 'ReferenceEquality', 'StructuralEquality' and 'StructuralComparison' attributes + 只可以利用“ReferenceEquality”、“StructuralEquality”和“StructuralComparison”特性来扩大记录、联合、异常和结构类型 + + + + A type with attribute 'ReferenceEquality' cannot have an explicit implementation of 'Object.Equals(obj)', 'System.IEquatable<_>' or 'System.Collections.IStructuralEquatable' + 具有特性“ReferenceEquality”的类型不能显式实现“Object.Equals(obj)”、“System.IEquatable<_>”或“System.Collections.IStructuralEquatable” + + + + A type with attribute 'CustomEquality' must have an explicit implementation of at least one of 'Object.Equals(obj)', 'System.IEquatable<_>' or 'System.Collections.IStructuralEquatable' + 具有特性“CustomEquality”的类型必须至少显式实现“Object.Equals(obj)”、“System.IEquatable<_>”或“System.Collections.IStructuralEquatable”中的一个 + + + + A type with attribute 'CustomComparison' must have an explicit implementation of at least one of 'System.IComparable' or 'System.Collections.IStructuralComparable' + 具有特性“CustomComparison”的类型必须至少显式实现“System.IComparable”或“System.Collections.IStructuralComparable”中的一个 + + + + A type with attribute 'NoEquality' should not usually have an explicit implementation of 'Object.Equals(obj)'. Disable this warning if this is intentional for interoperability purposes + 具有特性“NoEquality”通常不应显式实现“Object.Equals(obj)”。如果这是为了实现互操作性而特意这样做的,请禁用此警告 + + + + A type with attribute 'NoComparison' should not usually have an explicit implementation of 'System.IComparable', 'System.IComparable<_>' or 'System.Collections.IStructuralComparable'. Disable this warning if this is intentional for interoperability purposes + 具有特性“NoComparison”的类型通常不应显式实现“System.IComparable”、“System.IComparable<_>”或“System.Collections.IStructuralComparable”。如果这是为了实现互操作性而特意这样做的,请禁用此警告 + + + + The 'CustomEquality' attribute must be used in conjunction with the 'NoComparison' or 'CustomComparison' attributes + “CustomEquality”特性必须与“NoComparison”或“CustomComparison”特性结合使用 + + + + Positional specifiers are not permitted in format strings + 格式字符串中不得有位置说明符 + + + + Missing format specifier + 缺少格式说明符 + + + + '{0}' flag set twice + “{0}”标志设置了两次 + + + + Prefix flag (' ' or '+') set twice + 前缀标志(“ ”或“+”)设置了两次 + + + + The # formatting modifier is invalid in F# + # 格式修饰符在 F# 中无效 + + + + Bad precision in format specifier + 格式说明符中的精度错误 + + + + Bad width in format specifier + 格式说明符中的宽度错误 + + + + '{0}' format does not support '0' flag + “{0}”格式不支持“0”标志 + + + + Precision missing after the '.' + “.”后缺少精度 + + + + '{0}' format does not support precision + “{0}”格式不支持精度 + + + + Bad format specifier (after l or L): Expected ld,li,lo,lu,lx or lX. In F# code you can use %d, %x, %o or %u instead, which are overloaded to work with all basic integer types. + 错误的格式说明符(位于 l 或 L 之后): 应为 ld、li、lo、lu、lx 或 lX。在 F# 代码中,可以改用 %d、%x、%o 或 %u,这些项将被重载以用于所有基本整数类型。 + + + + The 'l' or 'L' in this format specifier is unnecessary. In F# code you can use %d, %x, %o or %u instead, which are overloaded to work with all basic integer types. + 此格式说明符中不需要“l”或“L”。在 F# 代码中,可以改用 %d、%x、%o 或 %u,这些项将被重载以用于所有基本整数类型。 + + + + The 'h' or 'H' in this format specifier is unnecessary. You can use %d, %x, %o or %u instead, which are overloaded to work with all basic integer types. + 此格式说明符中不需要 "h" 或 "H"。可以改用 %d、%x、%o 或 %u,这些项将被重载以用于所有基本整数类型。 + + + + '{0}' does not support prefix '{1}' flag + “{0}”不支持前缀“{1}”标志 + + + + Bad format specifier: '{0}' + 错误的格式说明符: '{0}' + + + + System.Environment.Exit did not exit + System.Environment.Exit 未退出 + + + + The treatment of this operator is now handled directly by the F# compiler and its meaning cannot be redefined + 此时将通过 F# 编译器直接操作对此运算符的处理,并且不能重新定义其含义 + + + + A protected member is called or 'base' is being used. This is only allowed in the direct implementation of members since they could escape their object scope. + 调用了受保护的成员或正在使用“base”。只能在对成员的直接实现中这样做,因为它们可能会超出其对象范围。 + + + + The byref-typed variable '{0}' is used in an invalid way. Byrefs cannot be captured by closures or passed to inner functions. + byref 类型化变量“{0}”的使用方式无效。不能由闭包来捕获 Byref,也不能将其传递给内部函数。 + + + + The 'base' keyword is used in an invalid way. Base calls cannot be used in closures. Consider using a private member to make base calls. + “base”关键字的使用方式无效。在闭包中不能使用 base 调用。请考虑使用私有成员进行 base 调用。 + + + + The variable '{0}' is used in an invalid way + 变量“{0}”的使用方式无效 + + + + The type '{0}' is less accessible than the value, member or type '{1}' it is used in. + 类型“{0}”的可访问性低于其所用于的值、成员或类型“{1}”。 + + + + 'System.Void' can only be used as 'typeof<System.Void>' in F# + “System.Void”在 F# 中只能用作“typeof<System.Void>” + + + + A type instantiation involves a byref type. This is not permitted by the rules of Common IL. + 某个类型实例化涉及 byref 类型。通用 IL 的规则不允许这样做。 + + + + Calls to 'reraise' may only occur directly in a handler of a try-with + 只可以在 try-with 的处理程序中直接调用“reraise” + + + + Expression-splicing operators may only be used within quotations + 表达式拼接运算符只能在引号内使用 + + + + First-class uses of the expression-splicing operator are not permitted + 不允许优先使用表达式拼接运算符 + + + + First-class uses of the address-of operators are not permitted + 不允许优先使用 address-of 运算符 + + + + First-class uses of the 'reraise' function is not permitted + 不允许优先使用“reraise”函数 + + + + The byref typed value '{0}' cannot be used at this point + 此时无法使用 byref 类型化值“{0}” + + + + 'base' values may only be used to make direct calls to the base implementations of overridden members + “base”值只能用于直接调用重写成员的基实现 + + + + Object constructors cannot directly use try/with and try/finally prior to the initialization of the object. This includes constructs such as 'for x in ...' that may elaborate to uses of these constructs. This is a limitation imposed by Common IL. + 在初始化对象之前,对象构造函数不能直接使用 try/with 和 try/finally。这包括像“for x in ...”这样详细说明其构造使用方式的构造。这是由通用 IL 设定的限制。 + + + + The address of the variable '{0}' cannot be used at this point + 此时无法使用变量“{0}”的地址 + + + + The address of the static field '{0}' cannot be used at this point + 此时无法使用静态字段“{0}”的地址 + + + + The address of the field '{0}' cannot be used at this point + 此时无法使用字段“{0}”的地址 + + + + The address of an array element cannot be used at this point + 此时无法使用某个数组元素的地址 + + + + The type of a first-class function cannot contain byrefs + 第一类函数的类型不能包含 byref + + + + A method return type would contain byrefs which is not permitted + 方法返回类型将包含不允许使用的 byref + + + + Invalid custom attribute value (not a constant or literal) + 自定义特性值无效(不是常数或文本) + + + + The attribute type '{0}' has 'AllowMultiple=false'. Multiple instances of this attribute cannot be attached to a single language element. + 特性类型“{0}”具有“AllowMultiple=false”。不能向单个语言元素附加此特性的多个实例。 + + + + The member '{0}' is used in an invalid way. A use of '{1}' has been inferred prior to its definition at or near '{2}'. This is an invalid forward reference. + 成员“{0}”的使用方式无效。在“{2}”处或其附近给出定义之前,已推理使用了“{1}”。这是无效的前向引用。 + + + + A byref typed value would be stored here. Top-level let-bound byref values are not permitted. + 将在此处存储 byref 类型化值。不允许使用顶级的 let 绑定的 byref 值。 + + + + [<ReflectedDefinition>] terms cannot contain uses of the prefix splice operator '%' + [<ReflectedDefinition>] 条件中不能使用前缀拼接运算符“%” + + + + A function labeled with the 'EntryPointAttribute' attribute must be the last declaration in the last file in the compilation sequence. + 用 "EntryPointAttribute" 特性标记的函数必须是编译序列中最后一个文件中的最后一个声明。 + + + + compiled form of the union case + 联合用例的已编译形式 + + + + default augmentation of the union case + 联合用例的默认扩大 + + + + The property '{0}' has the same name as a method in type '{1}'. + 属性“{0}”与类型“{1}”中的某个方法具有相同的名称。 + + + + The property '{0}' of type '{1}' has a getter and a setter that do not match. If one is abstract then the other must be as well. + 类型为“{1}”的属性“{0}”存在不匹配的 Getter 和 Setter。如果其中一个是抽象的,则另一个也必须是抽象的。 + + + + The property '{0}' has the same name as another property in type '{1}', but one takes indexer arguments and the other does not. You may be missing an indexer argument to one of your properties. + 属性“{0}”与类型“{1}”中的另一个属性具有相同的名称,但是其中一个属性采用了索引器参数,而另一个属性未采用。可能缺少其中一个属性的索引器参数。 + + + + A type would store a byref typed value. This is not permitted by Common IL. + 某个类型将存储 byref 类型化值。通用 IL 不允许这样做。 + + + + Duplicate method. The method '{0}' has the same name and signature as another method in type '{1}'. + 重复方法。方法“{0}”与类型“{1}”中的另一个方法具有相同的名称和签名。 + + + + Duplicate method. The method '{0}' has the same name and signature as another method in type '{1}' once tuples, functions, units of measure and/or provided types are erased. + 重复方法。清除元组、函数、度量单位和/或提供的类型后,方法“{0}”与类型“{1}”中的另一个方法具有相同的名称和签名。 + + + + The method '{0}' has curried arguments but has the same name as another method in type '{1}'. Methods with curried arguments cannot be overloaded. Consider using a method taking tupled arguments. + 方法“{0}”具有扩充参数,并且与类型“{1}”中的另一个方法具有相同的名称。无法重载具有扩充参数的方法。请考虑使用采用元组化参数的方法。 + + + + Methods with curried arguments cannot declare 'out', 'ParamArray', 'optional', 'ReflectedDefinition', 'byref', 'CallerLineNumber', 'CallerMemberName', or 'CallerFilePath' arguments + 具有扩充参数的方法不能声明 "out"、"ParamArray"、"optional"、"ReflectedDefinition"、"byref"、"CallerLineNumber"、"CallerMemberName" 或 "CallerFilePath" 参数 + + + + Duplicate property. The property '{0}' has the same name and signature as another property in type '{1}'. + 重复属性。属性“{0}”与类型“{1}”中的另一个属性具有相同的名称和签名。 + + + + Duplicate property. The property '{0}' has the same name and signature as another property in type '{1}' once tuples, functions, units of measure and/or provided types are erased. + 重复属性。清除元组、函数、度量单位和/或提供的类型后,属性“{0}”与类型“{1}”中的另一个属性具有相同的名称和签名。 + + + + Duplicate method. The abstract method '{0}' has the same name and signature as an abstract method in an inherited type. + 重复方法。抽象方法“{0}”与继承类型中的某个抽象方法具有相同的名称和签名。 + + + + Duplicate method. The abstract method '{0}' has the same name and signature as an abstract method in an inherited type once tuples, functions, units of measure and/or provided types are erased. + 重复方法。在清除元组、函数、度量单位和/或所提供类型后,抽象方法“{0}”与继承类型中的某个抽象方法具有相同的名称和签名。 + + + + This type implements the same interface at different generic instantiations '{0}' and '{1}'. This is not permitted in this version of F#. + 此类型在不同的泛型实例化“{0}”和“{1}”实现了同样的接口。这在该版本 F# 中是不允许的。 + + + + The type of a field using the 'DefaultValue' attribute must admit default initialization, i.e. have 'null' as a proper value or be a struct type whose fields all admit default initialization. You can use 'DefaultValue(false)' to disable this check + 使用“DefaultValue”特性的字段的类型必须承认默认初始化,也就是说,此类型将“null”用作适当的值,或者此类型是一个结构类型,其中的所有字段均承认默认初始化。可以使用“DefaultValue(false)”禁用此检查 + + + + The type abbreviation contains byrefs. This is not permitted by F#. + 类型缩写词包含 byref。F# 不允许这样做。 + + + + The variable '{0}' is bound in a quotation but is used as part of a spliced expression. This is not permitted since it may escape its scope. + 虽然变量“{0}”在某个引用内容中进行了绑定,但它用作拼接表达式的一部分。不允许这样做,因为该变量可能会超出其范围。 + + + + Quotations cannot contain uses of generic expressions + 引用内容中不能使用泛型表达式 + + + + Quotations cannot contain function definitions that are inferred or declared to be generic. Consider adding some type constraints to make this a valid quoted expression. + 引用内容不能包含推理为或声明为泛型的函数声明。请考虑添加一些类型约束,以使此引用内容成为带引号的有效表达式。 + + + + Quotations cannot contain object expressions + 引用内容不能包含对象表达式 + + + + Quotations cannot contain expressions that take the address of a field + 引用内容不能包含采用字段地址的表达式 + + + + Quotations cannot contain expressions that fetch static fields + 引用内容不能包含获取静态字段的表达式 + + + + Quotations cannot contain inline assembly code or pattern matching on arrays + 引用内容不能包含内联程序集代码或数组模式匹配 + + + + Quotations cannot contain descending for loops + 引用内容不能包含循环的递减 + + + + Quotations cannot contain expressions that fetch union case indexes + 引用内容不能包含获取联合用例索引的表达式 + + + + Quotations cannot contain expressions that set union case fields + 引用内容不能包含设置联合用例字段的表达式 + + + + Quotations cannot contain expressions that set fields in exception values + 引用内容不能包含设置异常值中的字段的表达式 + + + + Quotations cannot contain expressions that require byref pointers + 引用内容不能包含需要 byref 指针的表达式 + + + + Quotations cannot contain expressions that make member constraint calls, or uses of operators that implicitly resolve to a member constraint call + 引用内容不能包含进行成员约束调用或使用隐式解析为成员约束调用的运算符的表达式 + + + + Quotations cannot contain this kind of constant + 引用内容不能包含这种常数 + + + + Quotations cannot contain this kind of pattern match + 引用内容不能包含这种模式匹配 + + + + Quotations cannot contain array pattern matching + 引用内容不能包含数组模式匹配 + + + + Quotations cannot contain this kind of type + 引用内容不能包含这种类型 + + + + The declared type parameter '{0}' cannot be used here since the type parameter cannot be resolved at compile time + 此处不能使用声明的类型参数“{0}”,因为编译时无法解析该类型参数 + + + + This code is less generic than indicated by its annotations. A unit-of-measure specified using '_' has been determined to be '1', i.e. dimensionless. Consider making the code generic, or removing the use of '_'. + 此代码并不像其批注所述的那样通用。使用“_”指定的度量单位已确定为“1”,即无度量。请考虑使此代码成为泛型代码,或删除对“_”的使用。 + + + + Type inference problem too complicated (maximum iteration depth reached). Consider adding further type annotations. + 类型推理问题太复杂(已达到最大迭代深度)。请考虑添加更多类型批注。 + + + + Expected arguments to an instance member + 应为实例成员的参数 + + + + This indexer expects {0} arguments but is here given {1} + 此索引器需要 {0} 个参数,而此处给定了 {1} 个参数 + + + + Expecting a type supporting the operator '{0}' but given a function type. You may be missing an argument to a function. + 应为支持运算符“{0}”的类型,但给定的是函数类型。可能缺少函数的参数。 + + + + Expecting a type supporting the operator '{0}' but given a tuple type + 需要一个支持运算符“{0}”的类型,但提供的是元组类型 + + + + None of the types '{0}' support the operator '{1}' + 任何类型“{0}”都不支持运算符“{1}” + + + + The type '{0}' does not support the operator '{1}' + 类型“{0}”不支持运算符“{1}” + + + + None of the types '{0}' support the operator '{1}'. Consider opening the module 'Microsoft.FSharp.Linq.NullableOperators'. + 任何类型“{0}”都不支持运算符“{1}”。请考虑打开模块“Microsoft.FSharp.Linq.NullableOperators”。 + + + + The type '{0}' does not support the operator '{1}'. Consider opening the module 'Microsoft.FSharp.Linq.NullableOperators'. + 类型“{0}”不支持运算符“{1}”。请考虑打开模块“Microsoft.FSharp.Linq.NullableOperators”。 + + + + The type '{0}' does not support a conversion to the type '{1}' + 类型“{0}”不支持转换为类型“{1}” + + + + The type '{0}' has a method '{1}' (full name '{2}'), but the method is static + 类型“{0}”具有方法“{1}”(全名为“{2}”),但此方法是静态的 + + + + The type '{0}' has a method '{1}' (full name '{2}'), but the method is not static + 类型“{0}”具有方法“{1}”(全名为“{2}”),但此方法不是静态的 + + + + The constraints 'struct' and 'not struct' are inconsistent + 约束“struct”和“not struct”不一致 + + + + The type '{0}' does not have 'null' as a proper value + 类型“{0}”未将“null”用作适当的值 + + + + The type '{0}' does not have 'null' as a proper value. To create a null value for a Nullable type use 'System.Nullable()'. + 类型“{0}”未将“null”用作适当的值。若要为可以为 null 的类型创建 null 值,请使用“System.Nullable()”。 + + + + The type '{0}' does not support the 'comparison' constraint because it has the 'NoComparison' attribute + 类型“{0}”不支持“comparison”约束,因为它具有“NoComparison”特性 + + + + The type '{0}' does not support the 'comparison' constraint. For example, it does not support the 'System.IComparable' interface + 类型“{0}”不支持“comparison”约束。例如,它不支持“System.IComparable”接口 + + + + The type '{0}' does not support the 'comparison' constraint because it is a record, union or struct with one or more structural element types which do not support the 'comparison' constraint. Either avoid the use of comparison with this type, or add the 'StructuralComparison' attribute to the type to determine which field type does not support comparison + 类型“{0}”不支持“comparison”约束,因为它是一个记录、联合或结构,其中的一个或多个结构化元素类型不支持“comparison”约束。请避免对此类型使用比较,或将“StructuralComparison”特性添加到此类型以确定哪些字段类型不支持比较 + + + + The type '{0}' does not support the 'equality' constraint because it has the 'NoEquality' attribute + 类型“{0}”不支持“equality”约束,因为它具有“NoEquality”特性 + + + + The type '{0}' does not support the 'equality' constraint because it is a function type + 类型“{0}”不支持“equality”约束,因为它是函数类型 + + + + The type '{0}' does not support the 'equality' constraint because it is a record, union or struct with one or more structural element types which do not support the 'equality' constraint. Either avoid the use of equality with this type, or add the 'StructuralEquality' attribute to the type to determine which field type does not support equality + 类型“{0}”不支持“equality”约束,因为它是一个记录、联合或结构,其中的一个或多个结构化元素类型不支持“equality”约束。请避免对此类型使用相等运算,或将“StructuralEquality”特性添加到此类型以确定哪些字段类型不支持相等运算 + + + + The type '{0}' is not a CLI enum type + 类型“{0}”不是 CLI 枚举类型 + + + + The type '{0}' has a non-standard delegate type + 类型“{0}”具有非标准委托类型 + + + + The type '{0}' is not a CLI delegate type + 类型“{0}”不是 CLI 委托类型 + + + + This type parameter cannot be instantiated to 'Nullable'. This is a restriction imposed in order to ensure the meaning of 'null' in some CLI languages is not confusing when used in conjunction with 'Nullable' values. + 无法将此类型参数实例化为“Nullable”。此限制是强制实施的,旨在确保在某些 CLI 语言中将“null”与“Nullable”值一起使用时,不会混淆二者的含义。 + + + + A generic construct requires that the type '{0}' is a CLI or F# struct type + 泛型构造要求类型“{0}”是 CLI 或 F# 结构类型 + + + + A generic construct requires that the type '{0}' is an unmanaged type + 泛型构造要求类型“{0}”是非托管类型 + + + + The type '{0}' is not compatible with any of the types {1}, arising from the use of a printf-style format string + 类型“{0}”与类型 {1} 中的任何类型都不兼容,因为使用了 printf 样式的格式字符串 + + + + A generic construct requires that the type '{0}' have reference semantics, but it does not, i.e. it is a struct + 泛型构造要求类型“{0}”具有引用语义,而该类型没有引用语义,也就是说,该类型是一个结构 + + + + A generic construct requires that the type '{0}' be non-abstract + 泛型构造要求类型“{0}”是非抽象的 + + + + A generic construct requires that the type '{0}' have a public default constructor + 泛型构造要求类型“{0}”具有公共的默认构造函数 + + + + Type instantiation length mismatch + 类型实例化长度不匹配 + + + + Optional arguments not permitted here + 此处不允许可选参数 + + + + {0} is not a static member + {0} 不是静态成员 + + + + {0} is not an instance member + {0} 不是实例成员 + + + + Argument length mismatch + 参数长度不匹配 + + + + The argument types don't match + 参数类型不匹配 + + + + This method expects a CLI 'params' parameter in this position. 'params' is a way of passing a variable number of arguments to a method in languages such as C#. Consider passing an array for this argument + 此方法需要在此位置提供有 CLI“params”参数。“params”是一种用于在 C# 等语言中向某个方法传递数量可变的参数的方式。请考虑为此参数传递一个数组 + + + + The member or object constructor '{0}' is not {1} + 成员或对象构造函数“{0}”不是 {1} + + + + The member or object constructor '{0}' is not {1}. Private members may only be accessed from within the declaring type. Protected members may only be accessed from an extending type and cannot be accessed from inner lambda expressions. + 成员或对象构造函数“{0}”不是 {1}。只可以从声明类型中访问私有成员。只可以从扩展类型访问受保护的成员,而不能从内部 lambda 表达式访问这些成员。 + + + + {0} is not a static method + {0} 不是静态方法 + + + + {0} is not an instance method + {0} 不是实例方法 + + + + The member or object constructor '{0}' has no argument or settable return property '{1}'. {2}. + 成员或对象构造函数“{0}”没有参数或可设置的返回属性“{1}”。{2}。 + + + + The object constructor '{0}' has no argument or settable return property '{1}'. {2}. + 对象构造函数“{0}”无参数或无可设置的返回属性“{1}”。{2}。 + + + + The required signature is {0} + 所需签名为 {0} + + + + The member or object constructor '{0}' requires {1} argument(s). The required signature is '{2}'. + 成员或对象构造函数“{0}”需要 {1} 个参数。所需签名为“{2}”。 + + + + The member or object constructor '{0}' requires {1} additional argument(s). The required signature is '{2}'. + 成员或对象构造函数“{0}”需要 {1} 个附加参数。所需签名为“{2}”。 + + + + The member or object constructor '{0}' requires {1} argument(s). The required signature is '{2}'. Some names for missing arguments are {3}. + 成员或对象构造函数“{0}”需要 {1} 个参数。所需签名为“{2}”。一些缺少的参数的名称为 {3}。 + + + + The member or object constructor '{0}' requires {1} additional argument(s). The required signature is '{2}'. Some names for missing arguments are {3}. + 成员或对象构造函数“{0}”需要 {1} 个附加参数。所需签名为“{2}”。一些缺少的参数的名称为 {3}。 + + + + The member or object constructor '{0}' requires {1} argument(s) but is here given {2} unnamed and {3} named argument(s). The required signature is '{4}'. + 成员或对象构造函数“{0}”需要 {1} 个参数,而此处给定了 {2} 个未命名参数和 {3} 个已命名参数。所需签名为“{4}”。 + + + + The member or object constructor '{0}' takes {1} argument(s) but is here given {2}. The required signature is '{3}'. + 成员或对象构造函数“{0}”需要 {1} 个参数,而此处给定了 {2} 个参数。所需签名为“{3}”。 + + + + The object constructor '{0}' takes {1} argument(s) but is here given {2}. The required signature is '{3}'. + 对象构造函数“{0}”有 {1} 个参数,但此处只提供 {2} 个。所需的签名为“{3}”。 + + + + The object constructor '{0}' takes {1} argument(s) but is here given {2}. The required signature is '{3}'. If some of the arguments are meant to assign values to properties, consider separating those arguments with a comma (','). + 对象构造函数“{0}”有 {1} 个参数,但此处只提供 {2} 个。所需的签名为“{3}”。如果某些参数用于向属性分配值,请考虑使用逗号(",")分隔这些参数。 + + + + The member or object constructor '{0}' takes {1} type argument(s) but is here given {2}. The required signature is '{3}'. + 成员或对象构造函数“{0}”需要 {1} 个类型参数,而此处给定了 {2} 个类型参数。所需签名为“{3}”。 + + + + A member or object constructor '{0}' taking {1} arguments is not accessible from this code location. All accessible versions of method '{2}' take {3} arguments. + 无法从此代码位置访问采用 {1} 个参数的成员或对象构造函数“{0}”。方法“{2}”的所有可访问版本都采用了 {3} 个参数。 + + + + Incorrect generic instantiation. No {0} member named '{1}' takes {2} generic arguments. + 泛型实例化不正确。没有名为“{1}”的 {0} 成员采用 {2} 个泛型参数。 + + + + The member or object constructor '{0}' does not take {1} argument(s). An overload was found taking {2} arguments. + 成员或对象构造函数“{0}”不采用 {1} 个参数。发现某个重载采用 {2} 个参数。 + + + + No {0} member or object constructor named '{1}' takes {2} arguments + 没有名为“{1}”的 {0} 成员或对象构造函数采用 {2} 个参数 + + + + No {0} member or object constructor named '{1}' takes {2} arguments. Note the call to this member also provides {3} named arguments. + 没有名为“{1}”的 {0} 成员或对象构造函数采用 {2} 个参数。注意,调用此成员也会提供 {3} 个已命名参数。 + + + + No {0} member or object constructor named '{1}' takes {2} arguments. The named argument '{3}' doesn't correspond to any argument or settable return property for any overload. + 没有名为“{1}”的 {0} 成员或对象构造函数采用 {2} 个参数。已命名参数“{3}”与针对任何重载的任何参数或可设置的返回属性均不对应。 + + + + Method or object constructor '{0}' not found + 未找到方法或对象构造函数“{0}” + + + + No overloads match for method '{0}'. + 没有与方法“{0}”匹配的重载。 + + + + A unique overload for method '{0}' could not be determined based on type information prior to this program point. A type annotation may be needed. + 未能根据此程序点之前的类型信息确定方法“{0}”的唯一重载。可能需要类型批注。 + + + + Candidates: {0} + 候选项: {0} + + + + The available overloads are shown below. + 下方显示了可用重载。 + + + + Accessibility modifiers are not permitted on 'do' bindings, but '{0}' was given. + 不允许对 "do" 绑定使用可访问性修饰符,但却给出了“{0}”。 + + + + End of file in #if section begun at or after here + 文件尾在此处或之后开始的 #if 节中 + + + + End of file in string begun at or before here + 文件尾在此处或之前开始的字符串中 + + + + End of file in verbatim string begun at or before here + 文件尾在此外或之前开始的原义字符串中 + + + + End of file in comment begun at or before here + 文件尾在此处或之前开始的注释中 + + + + End of file in string embedded in comment begun at or before here + 文件尾在此外或之前开始的注释中嵌入的字符串中 + + + + End of file in verbatim string embedded in comment begun at or before here + 文件尾在此处或之前开始的注释中嵌入的原义字符串中 + + + + End of file in IF-OCAML section begun at or before here + 文件尾在此处或之前开始的 IF-OCAML 节中 + + + + End of file in directive begun at or before here + 文件尾在此处或之前开始的指令中 + + + + No #endif found for #if or #else + 未找到与 #if 或 #else 对应的 #endif + + + + Attributes have been ignored in this construct + 此构造中已忽略特性 + + + + 'use' bindings are not permitted in primary constructors + 主构造函数中不允许使用“use”绑定 + + + + 'use' bindings are not permitted in modules and are treated as 'let' bindings + “use”绑定不允许在模块中使用并且将被视为“let”绑定 + + + + An integer for loop must use a simple identifier + 用于循环的整数必须使用简单的标识符 + + + + At most one 'with' augmentation is permitted + 最多允许一个“with”扩大 + + + + A semicolon is not expected at this point + 此时不应有分号 + + + + Unexpected end of input + 意外的输入结束 + + + + Accessibility modifiers are not permitted here, but '{0}' was given. + 此处不允许使用可访问性修饰符,但却给出了“{0}”。 + + + + Only '#' compiler directives may occur prior to the first 'namespace' declaration + 只有“#”编译器指令可以在第一个“namespace”声明之前出现 + + + + Accessibility modifiers should come immediately prior to the identifier naming a construct + 可访问性修饰符应紧接在用于命名构造函数的标识符的前面 + + + + Files should begin with either a namespace or module declaration, e.g. 'namespace SomeNamespace.SubNamespace' or 'module SomeNamespace.SomeModule', but not both. To define a module within a namespace use 'module SomeModule = ...' + 文件应以命名空间或模块声明(例如“namespace SomeNamespace.SubNamespace”或“module SomeNamespace.SomeModule”)开头,而不是同时以二者开头。若要定义命名空间中的模块,请使用“module SomeModule = ...” + + + + A module abbreviation must be a simple name, not a path + 模块缩写词必须是简单名称,而非路径 + + + + Ignoring attributes on module abbreviation + 在模块缩写词中忽略特性 + + + + The '{0}' accessibility attribute is not allowed on module abbreviation. Module abbreviations are always private. + 模块缩写词中不允许“{0}”可访问性特性。模块缩写词总是私有的。 + + + + The '{0}' visibility attribute is not allowed on module abbreviation. Module abbreviations are always private. + 模块缩写词中不允许“{0}”可见性特性。模块缩写词总是私有的。 + + + + Unclosed block + 未封闭的块 + + + + Unmatched 'begin' or 'struct' + 不匹配的“begin”或“struct” + + + + A module name must be a simple name, not a path + 模块名称必须是简单名称,而非路径 + + + + Unexpected empty type moduleDefn list + 意外的空类型 moduleDefn 列表 + + + + Attributes should be placed before 'val' + 特性应置于“val”之前 + + + + Attributes are not permitted on interface implementations + 不允许对接口实现使用特性 + + + + Syntax error + 语法错误 + + + + Augmentations are not permitted on delegate type moduleDefns + 不允许对委托类型 moduleDefns 使用扩大 + + + + Unmatched 'class', 'interface' or 'struct' + 不匹配的“class”、“interface”或“struct” + + + + A type definition requires one or more members or other declarations. If you intend to define an empty class, struct or interface, then use 'type ... = class end', 'interface end' or 'struct end'. + 类型定义需要一个或多个成员或者其他声明。如果您打算定义一个空的类、结构或接口,请使用“type ... = class end”、“interface end”或“struct end”。 + + + + Unmatched 'with' or badly formatted 'with' block + 不匹配的“with”或“with”块的格式不正确 + + + + 'get', 'set' or 'get,set' required + 需要“get”、“set”或“get,set” + + + + Only class types may take value arguments + 只有类类型可以采用值参数 + + + + Unmatched 'begin' + 不匹配的“begin” + + + + Invalid declaration syntax + 声明语法无效 + + + + 'get' and/or 'set' required + 需要“get”和/或“set” + + + + Type annotations on property getters and setters must be given after the 'get()' or 'set(v)', e.g. 'with get() : string = ...' + 必须在 "get()" 或 "set(v)" 后面提供属性 Getter 和 Setter 的类型批注,例如 "with get() : string = ..." + + + + A getter property is expected to be a function, e.g. 'get() = ...' or 'get(index) = ...' + Getter 属性应为一个函数,例如 "get() = ..." 或 "get(index) = ..." + + + + Multiple accessibilities given for property getter or setter + 为属性 Getter 或 Setter 给定了多个可访问性 + + + + Property setters must be defined using 'set value = ', 'set idx value = ' or 'set (idx1,...,idxN) value = ... ' + 必须使用“set value =”、“set idx value =”或“set (idx1,...,idxN) value = ...”定义属性 setter' + + + + Interfaces always have the same visibility as the enclosing type + 接口始终具有与封闭类型相同的可见性 + + + + Accessibility modifiers are not allowed on this member. Abstract slots always have the same visibility as the enclosing type. + 不允许对此成员使用可访问性修饰符。抽象槽总是具有与封闭类型相同的可见性。 + + + + Attributes are not permitted on 'inherit' declarations + 不允许对“inherit”声明使用特性 + + + + Accessibility modifiers are not permitted on an 'inherits' declaration + 不允许对“inherits”声明使用可访问性修饰符 + + + + 'inherit' declarations cannot have 'as' bindings. To access members of the base class when overriding a method, the syntax 'base.SomeMember' may be used; 'base' is a keyword. Remove this 'as' binding. + “inherit”声明不能具有“as”绑定。若要在重写某个方法时访问基类的成员,可以使用语法“base.SomeMember”;“base”为关键字。删除此“as”绑定。 + + + + Attributes are not allowed here + 此处不允许使用特性 + + + + Accessibility modifiers are not permitted in this position for type abbreviations + 对于类型缩写词,此位置不允许使用可访问性修饰符 + + + + Accessibility modifiers are not permitted in this position for enum types + 对于枚举类型,此位置不允许使用可访问性修饰符 + + + + All enum fields must be given values + 所有枚举字段都必须为给定值 + + + + Accessibility modifiers are not permitted on inline assembly code types + 不允许对内联程序集代码类型使用可访问性修饰符 + + + + Unexpected identifier: '{0}' + 意外的标识符: '{0}' + + + + Accessibility modifiers are not permitted on union cases. Use 'type U = internal ...' or 'type U = private ...' to give an accessibility to the whole representation. + 不允许对联合用例使用可访问性修饰符。请使用“type U = internal ...”或“type U = private ...”为整个表示形式给定可访问性。 + + + + Accessibility modifiers are not permitted on enumeration fields + 不允许对枚举字段使用可访问性修饰符 + + + + Consider using a separate record type instead + 请考虑改用单独的记录类型 + + + + Accessibility modifiers are not permitted on record fields. Use 'type R = internal ...' or 'type R = private ...' to give an accessibility to the whole representation. + 不允许对记录字段使用可访问性修饰符。请使用“type R = internal ...”或“type R = private ...”为整个表示形式给定可访问性。 + + + + The declaration form 'let ... and ...' for non-recursive bindings is not used in F# code. Consider using a sequence of 'let' bindings + 非递归绑定的声明格式“let ... and ...”不可用于 F# 代码。请考虑使用“let”绑定序列 + + + + Unmatched '(' + 不匹配的“(” + + + + Successive patterns should be separated by spaces or tupled + 应使用空格来分隔连续模式或将这些连续模式组成元组 + + + + No matching 'in' found for this 'let' + 未找到与此“let”匹配的“in” + + + + Error in the return expression for this 'let'. Possible incorrect indentation. + 此“let”的返回表达式出错。缩进可能不正确。 + + + + The block following this '{0}' is unfinished. Every code block is an expression and must have a result. '{1}' cannot be the final code element in a block. Consider giving this block an explicit result. + 此“{0}”后的程序块未完成。每个代码块均为表达式,且必须具有结果。“{1}”不能为程序块中最后的代码元素。考虑为此程序块提供显式结果。 + + + + Incomplete conditional. Expected 'if <expr> then <expr>' or 'if <expr> then <expr> else <expr>'. + 条件不完整。应为“if <表达式> then <表达式>”或“if <表达式> then <表达式> else <表达式>”。 + + + + 'assert' may not be used as a first class value. Use 'assert <expr>' instead. + “assert”不可用作一类值。请改用“assert <表达式>”。 + + + + Identifier expected + 应输入标识符 + + + + 'in' or '=' expected + 应为“in”或“=” + + + + The use of '->' in sequence and computation expressions is limited to the form 'for pat in expr -> expr'. Use the syntax 'for ... in ... do ... yield...' to generate elements in more complex sequence expressions. + 在序列和计算表达式中,“->”只能用于“for pat in expr -> expr”格式。使用语法“for ... in ... do ... yield...”可在更复杂的序列表达式中生成元素。 + + + + Successive arguments should be separated by spaces or tupled, and arguments involving function or method applications should be parenthesized + 应使用空格来分隔连续参数或将这些连续参数组成元组,并且应使用括号将涉及函数或方法应用的参数括起来 + + + + Unmatched '[' + 不匹配的“[” + + + + Missing qualification after '.' + “.”后缺少限定 + + + + In F# code you may use 'expr.[expr]'. A type annotation may be required to indicate the first expression is an array + 可在 F# 代码中使用“expr.[expr]”。可能需要进行类型批注以指明第一个表达式是一个数组 + + + + Mismatched quotation, beginning with '{0}' + 不匹配的引用(以“{0}”开头) + + + + Unmatched '{0}' + 不匹配的“{0}” + + + + Unmatched '[|' + 不匹配的“[|” + + + + Unmatched '{{' + 不匹配的“{{” + + + + Field bindings must have the form 'id = expr;' + 字段绑定的格式必须为“id = expr;” + + + + This member is not permitted in an object implementation + 对象实现中不允许使用此成员 + + + + Missing function body + 缺少函数体 + + + + Syntax error in labelled type argument + 带有标签的类型参数中的语法错误 + + + + Unexpected infix operator in type expression + 类型表达式中意外的中缀运算符 + + + + The syntax '(typ,...,typ) ident' is not used in F# code. Consider using 'ident<typ,...,typ>' instead + 语法“(typ,...,typ) ident”不可用于 F# 代码。请考虑改用“ident<typ,...,typ>” + + + + Invalid literal in type + 类型中的文本无效 + + + + Unexpected infix operator in unit-of-measure expression. Legal operators are '*', '/' and '^'. + 度量单位表达式中意外的中缀运算符。合法的运算符为“*”、“/”和“^”。 + + + + Unexpected integer literal in unit-of-measure expression + 度量单位表达式中意外的整数文本 + + + + Syntax error: unexpected type parameter specification + 语法错误: 意外的类型参数规范 + + + + Mismatched quotation operator name, beginning with '{0}' + 不匹配的引用运算符名称(以“{0}”开头) + + + + Active pattern case identifiers must begin with an uppercase letter + 活动模式用例标识符必须以大写字母开头 + + + + The '|' character is not permitted in active pattern case identifiers + 不允许在活动模式用例标识符中使用“|”字符 + + + + Denominator must not be 0 in unit-of-measure exponent + 度量单位指数中的分母不得为 0 + + + + No '=' symbol should follow a 'namespace' declaration + “namespace”声明后面不应有“=”符号 + + + + The syntax 'module ... = struct .. end' is not used in F# code. Consider using 'module ... = begin .. end' + 语法“module ... = struct .. end”不可用于 F# 代码。请考虑使用“module ... = begin .. end” + + + + The syntax 'module ... : sig .. end' is not used in F# code. Consider using 'module ... = begin .. end' + 语法“module ... : sig .. end”不可用于 F# 代码。请考虑使用“module ... = begin .. end” + + + + A static field was used where an instance field is expected + 在需要实例字段的位置使用了静态字段 + + + + Method '{0}' is not accessible from this code location + 无法从此代码位置访问方法“{0}” + + + + Implicit product of measures following / + / 后的度量值的隐式乘积 + + + + Unexpected SynMeasure.Anon + 意外的 SynMeasure.Anon + + + + Non-zero constants cannot have generic units. For generic zero, write 0.0<_>. + 非零常数不能具有泛型单位。对于泛型零,请编写 0.0<_>。 + + + + In sequence expressions, results are generated using 'yield' + 在序列表达式中,使用“yield”生成结果 + + + + Unexpected big rational constant + 意外的大有理常数 + + + + Units-of-measure supported only on float, float32, decimal and signed integer types + 仅 float、float32、decimal 和带符号整数类型支持度量单位 + + + + Unexpected Const_uint16array + 意外的 Const_uint16array + + + + Unexpected Const_bytearray + 意外的 Const_bytearray + + + + A parameter with attributes must also be given a name, e.g. '[<Attribute>] Name : Type' + 还必须为具有特性的参数提供名称,例如“[<特性>] Name : Type” + + + + Return values cannot have names + 返回值不能具有名称 + + + + MemberKind.PropertyGetSet only expected in parse trees + 仅分析树中需要 MemberKind.PropertyGetSet + + + + Namespaces cannot contain values. Consider using a module to hold your value declarations. + 命名空间不能包含值。请考虑使用模块来包含值声明。 + + + + Namespaces cannot contain extension members except in the same file and namespace declaration group where the type is defined. Consider using a module to hold declarations of extension members. + 命名空间不能包含扩展成员(在定义类型的同一文件和命名空间声明组中除外)。请考虑使用模块来包含扩展成员的声明。 + + + + Multiple visibility attributes have been specified for this identifier + 已为此标识符指定多个可见性特性 + + + + Multiple visibility attributes have been specified for this identifier. 'let' bindings in classes are always private, as are any 'let' bindings inside expressions. + 已为此标识符指定多个可见性特性。与表达式中的任何“let”绑定一样,类中的“let”绑定总是私有的。 + + + + The name '({0})' 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 '{1}' instead. + 名称“({0})”不应用作成员名称。若要为类型定义比较语义,请实现“System.IComparable”接口。如果从其他 CLI 语言中定义了要使用的静态成员,请改用名称“{1}”。 + + + + The name '({0})' 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 '{1}' instead. + 名称“({0})”不应用作成员名称。若要为类型定义相等语义,请重写“Object.Equals”成员。如果从其他 CLI 语言中定义了要使用的静态成员,请改用名称“{1}”。 + + + + The name '({0})' should not be used as a member name. If defining a static member for use from other CLI languages then use the name '{1}' instead. + 名称“({0})”不应用作成员名称。如果从其他 CLI 语言中定义了要使用的静态成员,请改用名称“{1}”。 + + + + The name '({0})' should not be used as a member name because it is given a standard definition in the F# library over fixed types + 名称“({0})”不应用作成员名称,因为在 F# 库中为此名称给定了针对固定类型的标准定义 + + + + The '{0}' operator should not normally be redefined. To define overloaded comparison semantics for a particular type, implement the 'System.IComparable' interface in the definition of that type. + 通常不应重新定义“{0}”运算符。若要为类型定义重载的比较语义,请在该类型的定义中实现“System.IComparable”接口。 + + + + The '{0}' operator should not normally be redefined. To define equality semantics for a type, override the 'Object.Equals' member in the definition of that type. + 通常不应重新定义“{0}”运算符。若要为类型定义相等语义,请在该类型的定义中重写“Object.Equals”成员。 + + + + The '{0}' operator should not normally be redefined. Consider using a different operator name + 通常不应重新定义“{0}”运算符。请考虑使用其他运算符名称 + + + + The '{0}' operator cannot be redefined. Consider using a different operator name + 无法重定义“{0}”运算符。请考虑使用其他运算符名称 + + + + Expected module or namespace parent {0} + 应为模块或命名空间父级 {0} + + + + The struct, record or union type '{0}' implements the interface 'System.IComparable' explicitly. You must apply the 'CustomComparison' attribute to the type. + 结构、记录或联合类型“{0}”显式实现接口“System.IComparable”。您必须将“CustomComparison”特性应用于相应的类型。 + + + + The struct, record or union type '{0}' implements the interface 'System.IComparable<_>' explicitly. You must apply the 'CustomComparison' attribute to the type, and should also provide a consistent implementation of the non-generic interface System.IComparable. + 结构、记录或联合类型“{0}”显式实现接口“System.IComparable<_>”。您必须将“CustomComparison”特性应用于相应的类型,并且应提供对非泛型接口 System.IComparable 的一致性实现。 + + + + The struct, record or union type '{0}' implements the interface 'System.IStructuralComparable' explicitly. Apply the 'CustomComparison' attribute to the type. + 结构、记录或联合类型“{0}”显式实现接口“System.IStructuralComparable”。将“CustomComparison”特性应用于相应的类型。 + + + + This record contains fields from inconsistent types + 此记录包含来自不一致的类型的字段 + + + + DLLImport stubs cannot be inlined + 无法内联 DLLImport 存根 + + + + Structs may only bind a 'this' parameter at member declarations + 结构只能在成员声明中绑定“this”参数 + + + + Unexpected expression at recursive inference point + 递归推理点中的意外的表达式 + + + + This code is less generic than required by its annotations because the explicit type variable '{0}' could not be generalized. It was constrained to be '{1}'. + 此代码并不像其批注要求的那样通用,因为未能对显式类型变量“{0}”进行一般化。它已被约束为“{1}”。 + + + + One or more of the explicit class or function type variables for this binding could not be generalized, because they were constrained to other types + 未能对此绑定的一个或多个显式类或函数类型变量进行一般化,因为它们已被约束为其他类型 + + + + A generic type parameter has been used in a way that constrains it to always be '{0}' + 使用泛型类型参数的方式已将其限定为始终为“{0}” + + + + This type parameter has been used in a way that constrains it to always be '{0}' + 使用此类型参数的方式已将其限定为始终为“{0}” + + + + The type parameters inferred for this value are not stable under the erasure of type abbreviations. This is due to the use of type abbreviations which drop or reorder type parameters, e.g. \n\ttype taggedInt<'a> = int or\n\ttype swap<'a,'b> = 'b * 'a.\nConsider declaring the type parameters for this value explicitly, e.g.\n\tlet f<'a,'b> ((x,y) : swap<'b,'a>) : swap<'a,'b> = (y,x). + 為這個值推斷的類型參數在清除類型縮寫後會不穩定。這是因為使用類型縮寫,導致卸除或重新排列類型參數,例如 \n\ttype taggedInt<'a> = int or\n\ttype swap<'a,'b> = 'b * 'a。\n請考慮明確宣告這個值的類型參數,例如\n\tlet f<'a,'b> ((x,y) : swap<'b,'a>) : swap<'a,'b> = (y,x)。 + + + + Explicit type parameters may only be used on module or member bindings + 显式类型参数只能用于模块或成员绑定 + + + + You must explicitly declare either all or no type parameters when overriding a generic abstract method + 在重写泛型抽象方法时,必须显式声明所有类型参数或不声明任何类型参数 + + + + The field labels and expected type of this record expression or pattern do not uniquely determine a corresponding record type + 此记录表达式或模式的字段标签和预期类型没有唯一确定相应的记录类型 + + + + The field '{0}' appears twice in this record expression or pattern + 字段“{0}”在此记录表达式或模式中出现了两次 + + + + Unknown union case + 未知的联合用例 + + + + This code is not sufficiently generic. The type variable {0} could not be generalized because it would escape its scope. + 此代码的通用程度不够。未能对类型变量 {0} 进行一般化,因为它会超出其范围。 + + + + A property cannot have explicit type parameters. Consider using a method instead. + 属性不能具有显式类型参数。请考虑改用方法。 + + + + A constructor cannot have explicit type parameters. Consider using a static construction method instead. + 构造函数不能具有显式类型参数。请考虑改用静态构造方法。 + + + + This instance member needs a parameter to represent the object being invoked. Make the member static or use the notation 'member x.Member(args) = ...'. + 此实例成员需要一个用于表示被调用的对象的参数。使此成员成为静态成员,或使用表示法“member x.Member(args) = ...”。 + + + + Unexpected source-level property specification in syntax tree + 语法树中意外的源级别属性规范 + + + + A static initializer requires an argument + 静态初始化表达式需要参数 + + + + An object constructor requires an argument + 对象构造函数需要参数 + + + + This static member should not have a 'this' parameter. Consider using the notation 'member Member(args) = ...'. + 此静态成员不应具有“this”参数。请考虑使用表示法“member Member(args) = ...”。 + + + + An explicit static initializer should use the syntax 'static new(args) = expr' + 显式静态初始化表达式应使用语法“static new(args) = expr” + + + + An explicit object constructor should use the syntax 'new(args) = expr' + 显式对象构造函数应使用语法“new(args) = expr” + + + + Unexpected source-level property specification + 意外的源级别属性规范 + + + + This form of object expression is not used in F#. Use 'member this.MemberName ... = ...' to define member implementations in object expressions. + 此对象表达式格式不可用于 F#。请使用“member this.MemberName ... = ...”来定义对象表达式中的成员实现。 + + + + Invalid declaration + 声明无效 + + + + Attributes are not allowed within patterns + 模式中不允许使用特性 + + + + The generic function '{0}' must be given explicit type argument(s) + 必须为泛型函数“{0}”给定显式类型参数 + + + + The method or function '{0}' should not be given explicit type argument(s) because it does not declare its type parameters explicitly + 不应为方法或函数“{0}”给定显式类型参数,因为它不显式声明其类型参数 + + + + This value, type or method expects {0} type parameter(s) but was given {1} + 此值、类型或方法需要 {0} 个类型参数,而给定了 {1} 个类型参数 + + + + The default, zero-initializing constructor of a struct type may only be used if all the fields of the struct type admit default initialization + 结构类型的默认零初始化构造函数只能在结构类型的所有字段都承认默认初始化时使用 + + + + Couldn't find Dispose on IDisposable, or it was overloaded + 未能找到 IDisposable 的 Dispose,或者它已被重载 + + + + This value is not a literal and cannot be used in a pattern + 此值不是文本,不能在模式中使用 + + + + This field is readonly + 此字段是只读的 + + + + Named arguments must appear after all other arguments + 命名参数必须出现在所有其他参数的后面 + + + + This function value is being used to construct a delegate type whose signature includes a byref argument. You must use an explicit lambda expression taking {0} arguments. + 此函数值将用于构造其签名包含 byref 参数的委托类型。您必须使用一个采用 {0} 个参数的显式 lambda 表达式。 + + + + The type '{0}' is not a type whose values can be enumerated with this syntax, i.e. is not compatible with either seq<_>, IEnumerable<_> or IEnumerable and does not have a GetEnumerator method + 类型“{0}”不属于其值可使用此语法进行枚举的类型,也就是说,此类型与 seq<_>、IEnumerable<_> 或 IEnumerable 不兼容且不具有 GetEnumerator 方法 + + + + This recursive binding uses an invalid mixture of recursive forms + 此递归绑定使用的递归格式组合无效 + + + + This is not a valid object construction expression. Explicit object constructors must either call an alternate constructor or initialize all fields of the object and specify a call to a super class constructor. + 这不是有效的对象构造表达式。显式对象构造函数必须调用一个替换构造函数,或者初始化对象的所有字段并指定一个对超类构造函数的调用。 + + + + Invalid constraint + 约束无效 + + + + Invalid constraint: the type used for the constraint is sealed, which means the constraint could only be satisfied by at most one solution + 约束无效: 用于约束的类型为 “sealed”,这表示最多只能有一个解决方案满足约束的条件 + + + + An 'enum' constraint must be of the form 'enum<type>' + “enum”约束的格式必须为“enum<type>” + + + + 'new' constraints must take one argument of type 'unit' and return the constructed type + “new”约束必须采用一个类型为“unit”的参数并返回构造化类型 + + + + This property has an invalid type. Properties taking multiple indexer arguments should have types of the form 'ty1 * ty2 -> ty3'. Properties returning functions should have types of the form '(ty1 -> ty2)'. + 此属性的某个类型无效。采用多个索引器参数的属性应具有格式为“ty1 * ty2 -> ty3”的类型。返回函数的属性应具有格式为“(ty1 -> ty2)”的类型。 + + + + Expected unit-of-measure parameter, not type parameter. Explicit unit-of-measure parameters must be marked with the [<Measure>] attribute. + 应为度量单位参数,而非类型参数。必须用 [<Measure>] 特性标记显式度量单位参数。 + + + + Expected type parameter, not unit-of-measure parameter + 应为类型参数,而非度量单位参数 + + + + Expected type, not unit-of-measure + 应为类型,而非度量单位 + + + + Expected unit-of-measure, not type + 应为度量单位,而非类型 + + + + Units-of-measure cannot be used as prefix arguments to a type. Rewrite as postfix arguments in angle brackets. + 度量单位不能用作类型的前缀参数。请重新编写为用尖括号括起的后缀参数。 + + + + Unit-of-measure cannot be used in type constructor application + 不能在类型构造函数应用程序中使用度量单位 + + + + This control construct may only be used if the computation expression builder defines a '{0}' method + 只有在计算表达式生成器定义“{0}”方法时才能使用此控制构造 + + + + This type has no nested types + 此类型不具有嵌套类型 + + + + Unexpected {0} in type expression + 类型表达式中的意外的 {0} + + + + Type parameter cannot be used as type constructor + 类型参数不能用作类型构造函数 + + + + Illegal syntax in type expression + 类型表达式中的非法语法 + + + + Anonymous unit-of-measure cannot be nested inside another unit-of-measure expression + 不能将匿名度量单位嵌入另一个度量单位表达式中 + + + + Anonymous type variables are not permitted in this declaration + 此声明中不允许有匿名类型变量 + + + + Unexpected / in type + 类型中的意外的 / + + + + Unexpected type arguments + 意外的类型参数 + + + + Optional arguments are only permitted on type members + 仅允许对类型成员使用可选参数 + + + + Name '{0}' not bound in pattern context + 模式上下文中未绑定名称“{0}” + + + + Non-primitive numeric literal constants cannot be used in pattern matches because they can be mapped to multiple different types through the use of a NumericLiteral module. Consider using replacing with a variable, and use 'when <variable> = <constant>' at the end of the match clause. + 非基元数值文本常数不能用于模式匹配,因为可以通过使用 NumericLiteral 模块将这些常数映射到多个不同类型。请考虑将其替换为一个变量,并在 match 子句的结尾使用“when <variable> = <constant>”。 + + + + Type arguments cannot be specified here + 无法在此处指定类型参数 + + + + Only active patterns returning exactly one result may accept arguments + 仅有正好返回一个结果的活动模式才可以接受参数 + + + + Invalid argument to parameterized pattern label + 参数化模式标签的参数无效 + + + + Internal error. Invalid index into active pattern array + 内部错误。活动模式数组中的索引无效 + + + + This union case does not take arguments + 此联合用例不采用参数 + + + + This union case takes one argument + 此联合用例采用一个参数 + + + + This union case expects {0} arguments in tupled form + 此联合用例需要 {0} 个元组格式的参数 + + + + Field '{0}' is not static + 字段“{0}”不是静态的 + + + + This field is not a literal and cannot be used in a pattern + 此字段不是文本,不能在模式中使用 + + + + This is not a variable, constant, active recognizer or literal + 这不是变量、常数、活动识别器或文本 + + + + This is not a valid pattern + 这不是有效的模式 + + + + Character range matches have been removed in F#. Consider using a 'when' pattern guard instead. + 在 F# 中,已删除字符范围匹配。请考虑改用“when”模式保护。 + + + + Illegal pattern + 非法模式 + + + + Syntax error - unexpected '?' symbol + 语法错误 - 意外的“?”符号 + + + + Expected {0} expressions, got {1} + 需要 {0} 个表达式,已获取 {1} 个 + + + + TcExprUndelayed: delayed + TcExprUndelayed: 已延迟 + + + + This expression form may only be used in sequence and computation expressions + 此表达式格式只能用于序列和计算表达式 + + + + Invalid object expression. Objects without overrides or interfaces should use the expression form 'new Type(args)' without braces. + 对象表达式无效。没有重写或接口的对象应使用不带括号的表达式格式“new Type(args)”。 + + + + Invalid object, sequence or record expression + 对象、序列或记录表达式无效 + + + + Invalid record, sequence or computation expression. Sequence expressions should be of the form 'seq {{ ... }}' + 记录、序列或计算表达式无效。序列表达式的格式应为“seq {{ ... }}”}}' + + + + This list or array expression includes an element of the form 'if ... then ... else'. Parenthesize this expression to indicate it is an individual element of the list or array, to disambiguate this from a list generated using a sequence expression + 此列表或数组表达式包括采用“if ... then ... else”格式的元素。请使用括号将此表达式括起来以指示它是列表或数组中的单个元素,从而将此表达式与使用序列表达式生成的列表进行区分 + + + + Unable to parse format string '{0}' + 无法分析格式字符串“{0}” + + + + This list expression exceeds the maximum size for list literals. Use an array for larger literals and call Array.ToList. + 此列表表达式超出列表文本的最大大小。请对大型的文本使用数组并调用 Array.ToList。 + + + + The expression form 'expr then expr' may only be used as part of an explicit object constructor + 表达式格式“expr then expr”只能用作显式对象构造函数的一部分 + + + + Named arguments cannot be given to member trait calls + 不能将命名参数提供给成员特征调用 + + + + This is not a valid name for an enumeration case + 对于枚举用例来说,这不是有效的名称 + + + + This field is not mutable + 此字段是不可变的 + + + + This construct may only be used within list, array and sequence expressions, e.g. expressions of the form 'seq {{ ... }}', '[ ... ]' or '[| ... |]'. These use the syntax 'for ... in ... do ... yield...' to generate elements + 只能在列表、数组和序列表达式中使用此构造函数,例如格式为“seq {{ ... }}”、“[ ... ]”或“[| ... |]”的表达式。它们将使用语法“for ... in ... do ... yield...”来生成元素 + + + + This construct may only be used within computation expressions. To return a value from an ordinary function simply write the expression without 'return'. + 只能在计算表达式中使用此构造。若要从普通函数返回值,只需编写不带“return”的表达式。 + + + + This construct may only be used within sequence or computation expressions + 只能在序列或计算表达式中使用此构造 + + + + This construct may only be used within computation expressions + 只能在计算表达式中使用此构造 + + + + Invalid indexer expression + 索引器表达式无效 + + + + The operator 'expr.[idx]' has been used on an object of indeterminate type based on information prior to this program point. Consider adding further type constraints + 已基于此程序点之前的信息对不确定类型的对象使用运算符“expr.[idx]”。请考虑添加更多类型约束 + + + + Cannot inherit from a variable type + 无法从变量类型继承 + + + + Calls to object constructors on type parameters cannot be given arguments + 不能为针对类型参数的对象构造函数调用提供参数 + + + + The 'CompiledName' attribute cannot be used with this language element + “CompiledName”特性不能用于此语言元素 + + + + '{0}' may only be used with named types + “{0}”只能用于命名类型 + + + + 'inherit' cannot be used on interface types. Consider implementing the interface by using 'interface ... with ... end' instead. + “inherit”不能用于接口类型。请考虑改用“interface ... with ... end”实现接口。 + + + + 'new' cannot be used on interface types. Consider using an object expression '{{ new ... with ... }}' instead. + “new”不能用于接口类型。请考虑改用对象表达式“{{ new ... with ... }}”。 + + + + Instances of this type cannot be created since it has been marked abstract or not all methods have been given implementations. Consider using an object expression '{{ new ... with ... }}' instead. + 无法创建此类型的实例,因为已将此类型标记为抽象的或者没有为所有方法给定实现。请考虑改用对象表达式“{{ new ... with ... }}”。 + + + + It is recommended that objects supporting the IDisposable interface are created using the syntax 'new Type(args)', rather than 'Type(args)' or 'Type' as a function value representing the constructor, to indicate that resources may be owned by the generated value + 建议通过将语法 "new Type(args)"(而非 "Type(args)" 或 "Type")用作表示构造函数的函数值来创建支持 IDisposable 接口的对象,以指示生成的值可拥有该资源 + + + + '{0}' may only be used to construct object types + “{0}”只能用于构造对象类型 + + + + Constructors for the type '{0}' must directly or indirectly call its implicit object constructor. Use a call to the implicit object constructor instead of a record expression. + 类型“{0}”的构造函数必须直接或间接调用其隐式对象构造函数。请使用对隐式对象构造函数的调用,而不是记录表达式。 + + + + The field '{0}' has been given a value, but is not present in the type '{1}' + 已为字段“{0}”给定值,但该字段未包含在类型“{1}”中 + + + + No assignment given for field '{0}' of type '{1}' + 未为类型“{1}”的字段“{0}”赋值 + + + + Extraneous fields have been given values + 已为外来字段给定值 + + + + Only overrides of abstract and virtual members may be specified in object expressions + 只能在对象表达式中指定抽象和虚拟成员的重写 + + + + The member '{0}' does not correspond to any abstract or virtual method available to override or implement. + 成员“{0}”与可用于替代或实现的任何抽象或虚拟方法均不对应。 + + + + The type {0} contains the member '{1}' but it is not a virtual or abstract method that is available to override or implement. + 类型 {0} 包含成员“{1}”,但其不是可用于替代或实现的虚拟或抽象方法。 + + + + The member '{0}' does not accept the correct number of arguments. {1} argument(s) are expected, but {2} were given. The required signature is '{3}'.{4} + 成员“{0}”未接受正确的参数数目。应为 {1} 个参数,但给出了 {2} 个参数。必需的签名为“{3}”。{4} + + + + The member '{0}' does not accept the correct number of arguments. One overload accepts {1} arguments, but {2} were given. The required signature is '{3}'.{4} + 成员“{0}”不支持正确的参数数目。一个重载只支持 {1} 个参数,但给出了 {2} 个参数。必需的签名为“{3}”。{4} + + + + A simple method name is required here + 此处需要简单的方法名称 + + + + The types System.ValueType, System.Enum, System.Delegate, System.MulticastDelegate and System.Array cannot be used as super types in an object expression or class + 类型 System.ValueType、System.Enum、System.Delegate、System.MulticastDelegate 和 System.Array 不能用作对象表达式或类中的超类型 + + + + 'new' must be used with a named type + “new”必须用于命名类型 + + + + Cannot create an extension of a sealed type + 无法创建密封类型的扩展 + + + + No arguments may be given when constructing a record value + 在构造记录值时,可能未给定任何参数 + + + + Interface implementations cannot be given on construction expressions + 不能在构造表达式中提供接口实现 + + + + Object construction expressions may only be used to implement constructors in class types + 对象构造表达式只能用于实现类类型中的构造函数 + + + + Only simple bindings of the form 'id = expr' can be used in construction expressions + 只能在构造表达式中使用“id = expr”格式的简单绑定 + + + + Objects must be initialized by an object construction expression that calls an inherited object constructor and assigns a value to each field + 对象必须由一个对象构造表达式进行初始化,该表达式将调用继承的对象构造函数并为每个字段赋值 + + + + Expected an interface type + 应为接口类型 + + + + Constructor expressions for interfaces do not take arguments + 接口的构造函数表达式不采用参数 + + + + This object constructor requires arguments + 此对象构造函数需要参数 + + + + 'new' may only be used with object constructors + “new”只能用于对象构造函数 + + + + At least one override did not correctly implement its corresponding abstract member + 至少有一个重写未正确实现其相应的抽象成员 + + + + This numeric literal requires that a module '{0}' defining functions FromZero, FromOne, FromInt32, FromInt64 and FromString be in scope + 此数值文本要求定义函数 FromZero、FromOne、FromInt32、FromInt64 和 FromString 的模块“{0}”位于范围内 + + + + Invalid record construction + 记录构造无效 + + + + The expression form {{ expr with ... }} may only be used with record types. To build object types use {{ new Type(...) with ... }} + 表达式格式 {{ expr with ... }} 只能用于记录类型。若要生成对象类型,请使用 {{ new Type(...) with ... }} + + + + The inherited type is not an object model type + 继承的类型不是对象模型类型 + + + + Object construction expressions (i.e. record expressions with inheritance specifications) may only be used to implement constructors in object model types. Use 'new ObjectType(args)' to construct instances of object model types outside of constructors + 对象构造函数表达式(即,具有继承规范的记录表达式)只能用于实现对象模型类型中的构造函数。请使用“new ObjectType(args)”在构造函数的外部构造对象模型类型的实例 + + + + '{{ }}' is not a valid expression. Records must include at least one field. Empty sequences are specified by using Seq.empty or an empty list '[]'. + “{{ }}”不是有效的表达式。记录必须至少包含一个字段。使用 Seq.empty 或空列表“[]”指定空序列。 + + + + This type is not a record type. Values of class and struct types must be created using calls to object constructors. + 此类型不是记录类型。必须使用对对象构造函数的调用来创建类和结构类型的值。 + + + + This type is not a record type + 此类型不是记录类型 + + + + This construct is ambiguous as part of a computation expression. Nested expressions may be written using 'let _ = (...)' and nested computations using 'let! res = builder {{ ... }}'. + 此构造作为计算表达式的一部分具有多义性。可以使用“let _ = (...)”来编写嵌套的表达式,并可以使用“let! res = builder {{ ... }}”来编写嵌套的计算。 + + + + This construct is ambiguous as part of a sequence expression. Nested expressions may be written using 'let _ = (...)' and nested sequences using 'yield! seq {{... }}'. + 此构造作为序列表达式的一部分具有多义性。可以使用“let _ = (...)”来编写嵌套的表达式,并可以使用“yield! seq {{... }}”来编写嵌套的序列。 + + + + 'do!' cannot be used within sequence expressions + 不能在序列表达式中使用“do! + + + + The use of 'let! x = coll' in sequence expressions is not permitted. Use 'for x in coll' instead. + 不允许在序列表达式中使用“let! x = coll”。请改用“for x in coll”。 + + + + 'try'/'with' cannot be used within sequence expressions + 不能在序列表达式中使用“try”/“with” + + + + In sequence expressions, multiple results are generated using 'yield!' + 在序列表达式中,使用“yield!”生成多个结果 + + + + Invalid assignment + 赋值无效 + + + + Invalid use of a type name + 类型名称的使用无效 + + + + This type has no accessible object constructors + 此类型不具有可访问的对象构造函数 + + + + Invalid use of an interface type + 接口类型的使用无效 + + + + Invalid use of a delegate constructor. Use the syntax 'new Type(args)' or just 'Type(args)'. + 委托构造函数的使用无效。请使用语法“new Type(args)”或直接使用“Type(args)”。 + + + + Property '{0}' is not static + 属性“{0}”不是静态的 + + + + Property '{0}' is not readable + 属性“{0}”不可读 + + + + This lookup cannot be used here + 不能在此处使用此查找 + + + + Property '{0}' is static + 属性“{0}”是静态的 + + + + Property '{0}' cannot be set + 无法设置属性“{0}” + + + + Constructors must be applied to arguments and cannot be used as first-class values. If necessary use an anonymous function '(fun arg1 ... argN -> new Type(arg1,...,argN))'. + 构造函数必须应用于参数,且不能用作第一类值。如有必要,请使用匿名函数“(fun arg1 ... argN -> new Type(arg1,...,argN))”。 + + + + The syntax 'expr.id' may only be used with record labels, properties and fields + 语法“expr.id”只能用于记录标签、属性和字段 + + + + Event '{0}' is static + 事件“{0}”是静态的 + + + + Event '{0}' is not static + 事件“{0}”不是静态的 + + + + The named argument '{0}' did not match any argument or mutable property + 命名参数“{0}”与任何参数或可变属性均不匹配 + + + + One or more of the overloads of this method has curried arguments. Consider redesigning these members to take arguments in tupled form. + 此方法的一个或多个重载具有扩充参数。请考虑将这些成员重新设计为采用元组格式的参数。 + + + + The unnamed arguments do not form a prefix of the arguments of the method called + 未命名的参数未形成已调用方法的参数的前缀 + + + + Static optimization conditionals are only for use within the F# library + 只能在 F# 库中使用静态优化条件 + + + + The corresponding formal argument is not optional + 相应的形参不是可选的 + + + + Invalid optional assignment to a property or field + 某个属性或字段的可选赋值无效 + + + + A delegate constructor must be passed a single function value + 必须向委托构造函数传递单个函数值 + + + + A binding cannot be marked both 'use' and 'rec' + 不能将一个绑定同时标记为“use”和“rec” + + + + The 'VolatileField' attribute may only be used on 'let' bindings in classes + 只能在类中的“let”绑定中使用“VolatileField”特性 + + + + Attributes are not permitted on 'let' bindings in expressions + 不允许对表达式中的“let”绑定使用特性 + + + + The 'DefaultValue' attribute may only be used on 'val' declarations + “DefaultValue”特性只能用于“val”声明 + + + + The 'ConditionalAttribute' attribute may only be used on members + “ConditionalAttribute”特性只能用于成员 + + + + This is not a valid name for an active pattern + 对于活动模式来说,这不是有效的名称 + + + + The 'EntryPointAttribute' attribute may only be used on function definitions in modules + “EntryPointAttribute”特性只能用于模块中的函数定义 + + + + Mutable values cannot be marked 'inline' + 不能将可变值标记为“inline” + + + + Mutable values cannot have generic parameters + 可变值不能具有泛型参数 + + + + Mutable function values should be written 'let mutable f = (fun args -> ...)' + 应按照“let mutable f = (fun args -> ...)”格式编写可变函数值 + + + + Only functions may be marked 'inline' + 只能将函数标记为“inline” + + + + A literal value cannot be given the [<ThreadStatic>] or [<ContextStatic>] attributes + 不能为文本值给定 [<ThreadStatic>] 或 [<ContextStatic>] 特性 + + + + A literal value cannot be marked 'mutable' + 不能将文本值标记为“mutable” + + + + A literal value cannot be marked 'inline' + 不能将文本值标记为“inline” + + + + Literal values cannot have generic parameters + 文本值不能具有泛型参数 + + + + This is not a valid constant expression + 这不是有效的常数表达式 + + + + This type is not accessible from this code location + 无法从此代码位置访问此类型 + + + + Unexpected condition in imported assembly: failed to decode AttributeUsage attribute + 导入的程序集中的意外条件: 未能对 AttributeUsage 特性进行解码 + + + + Unrecognized attribute target. Valid attribute targets are 'assembly', 'module', 'type', 'method', 'property', 'return', 'param', 'field', 'event', 'constructor'. + 无法识别的特性目标。有效的特性目标为“assembly”、“module”、“type”、“method”、“property”、“return”、“param”、“field”、“event”、“constructor”。 + + + + This attribute is not valid for use on this language element. Assembly attributes should be attached to a 'do ()' declaration, if necessary within an F# module. + 对此语言元素使用此特性无效。如有需要,应将程序集特性附加到 F# 模块中的“do ()”声明。 + + + + This attribute is not valid for use on this language element + 对此语言元素使用此特性无效 + + + + Optional arguments cannot be used in custom attributes + 自定义特性中不能使用可选参数 + + + + This property cannot be set + 无法设置此属性 + + + + This property or field was not found on this custom attribute type + 未在此自定义特性类型中找到此属性或字段 + + + + A custom attribute must be a reference type + 自定义特性必须是引用类型 + + + + The number of args for a custom attribute does not match the expected number of args for the attribute constructor + 自定义特性的参数数目与特性构造函数所需的参数数目不匹配 + + + + A custom attribute must invoke an object constructor + 自定义特性必须调用对象构造函数 + + + + Attribute expressions must be calls to object constructors + 特性表达式必须是对对象构造函数的调用 + + + + This attribute cannot be used in this version of F# + 不能在此版本的 F# 中使用该特性 + + + + Invalid inline specification + 内联规范无效 + + + + 'use' bindings must be of the form 'use <var> = <expr>' + “use”绑定的格式必须为“use <var> = <expr>” + + + + Abstract members are not permitted in an augmentation - they must be defined as part of the type itself + 扩大中不允许使用抽象成员 - 必须将它们定义为类型本身的一部分 + + + + Method overrides and interface implementations are not permitted here + 此处不允许使用方法重写和接口实现 + + + + No abstract or interface member was found that corresponds to this override + 未找到与此重写对应的抽象或接口成员 + + + + This override takes a different number of arguments to the corresponding abstract member. The following abstract members were found:{0} + 此替代使用的参数数量与对应的抽象成员的数量不同。找到以下抽象成员: {0} + + + + This method already has a default implementation + 此方法已具有默认实现 + + + + The method implemented by this default is ambiguous + 此默认值实现的方法具有多义性 + + + + No abstract property was found that corresponds to this override + 未找到与此重写对应的抽象属性 + + + + This property overrides or implements an abstract property but the abstract property doesn't have a corresponding {0} + 此属性会重写或实现一个抽象属性,但该抽象属性没有相应的 {0} + + + + Invalid signature for set member + 集成员的签名无效 + + + + This new member hides the abstract member '{0}'. Rename the member or use 'override' instead. + 此新成员隐藏了抽象成员“{0}”。重命名此成员或改用“override”。 + + + + This new member hides the abstract member '{0}' once tuples, functions, units of measure and/or provided types are erased. Rename the member or use 'override' instead. + 一旦清除元组、函数、度量单位和/或所提供的类型,此新成员就会隐藏抽象成员“{0}”。请重命名此成员或改用“override”。 + + + + Interfaces cannot contain definitions of static initializers + 接口不能包含静态初始化表达式的定义 + + + + Interfaces cannot contain definitions of object constructors + 接口不能包含对象构造函数的定义 + + + + Interfaces cannot contain definitions of member overrides + 接口不能包含成员重写的定义。 + + + + Interfaces cannot contain definitions of concrete members. You may need to define a constructor on your type to indicate that the type is a class. + 接口不能包含具体成员的定义。您可能需要定义类型的构造函数来指示该类型是类。 + + + + Constructors cannot be specified in exception augmentations + 不能在异常扩大中指定构造函数 + + + + Structs cannot have an object constructor with no arguments. This is a restriction imposed on all CLI languages as structs automatically support a default constructor. + 结构不能具有不带参数的对象构造函数。这是对所有 CLI 语言实施的限制,原因是结构自动支持默认构造函数。 + + + + Constructors cannot be defined for this type + 不能为此类型定义构造函数 + + + + Recursive bindings that include member specifications can only occur as a direct augmentation of a type + 包含成员规格的递归绑定只能作为类型的直接扩大出现 + + + + Only simple variable patterns can be bound in 'let rec' constructs + 只能在“let rec”构造中绑定简单的变量模式 + + + + Only record fields and simple, non-recursive 'let' bindings may be marked mutable + 只有记录字段和简单的非递归 "let" 绑定可能会被标记为“可变” + + + + This member is not sufficiently generic + 此成员的通用性不够 + + + + A declaration may only be the [<Literal>] attribute if a constant value is also given, e.g. 'val x : int = 1' + 如果同时给定了常数值(例如“val x : int = 1”),则声明只能为 [<Literal>] 特性 + + + + A declaration may only be given a value in a signature if the declaration has the [<Literal>] attribute + 仅在声明具有 [<Literal>] 特性时才可在签名中为声明给定值 + + + + Thread-static and context-static variables must be static and given the [<DefaultValue>] attribute to indicate that the value is initialized to the default value on each new thread + 线程静态和上下文静态变量必须是静态的,并且必须为二者给定 [<DefaultValue>] 特性以指示在每个新线程上将变量值初始化为默认值 + + + + Volatile fields must be marked 'mutable' and cannot be thread-static + 可变字段必须标记为“mutable”且不能是线程静态的 + + + + Uninitialized 'val' fields must be mutable and marked with the '[<DefaultValue>]' attribute. Consider using a 'let' binding instead of a 'val' field. + 未初始化的“val”字段必须是可变的,且须标记“[<DefaultValue>]”特性。请考虑使用“let”绑定,而不是“val”字段。 + + + + Static 'val' fields in types must be mutable, private and marked with the '[<DefaultValue>]' attribute. They are initialized to the 'null' or 'zero' value for their type. Consider also using a 'static let mutable' binding in a class type. + 类型中的静态“val”字段必须是可变的和私有的,且标记有“[<DefaultValue>]”特性。这些字段将被初始化为各自的类型的“null”或“零”值。请考虑在类类型中也使用“static let mutable”绑定。 + + + + This field requires a name + 此字段需要名称 + + + + Invalid namespace, module, type or union case name + 命名空间、模块、类型或联合用例名称无效 + + + + Explicit type declarations for constructors must be of the form 'ty1 * ... * tyN -> resTy'. Parentheses may be required around 'resTy' + 构造函数的显式类型声明的格式必须为“ty1 * ... * tyN -> resTy”。可能需要用括号将“resTy”括起来 + + + + Return types of union cases must be identical to the type being defined, up to abbreviations + 联合用例的返回类型必须与要定义的类型(直至类型的缩写词)相同 + + + + This is not a valid value for an enumeration literal + 对于枚举文本来说,这不是有效的值 + + + + The type '{0}' is not an interface type + 类型“{0}”不是接口类型 + + + + Duplicate specification of an interface + 重复的接口规范 + + + + A field/val declaration is not permitted here + 此处不允许使用字段/值声明 + + + + A inheritance declaration is not permitted here + 此处不允许使用继承声明 + + + + This declaration opens the module '{0}', which is marked as 'RequireQualifiedAccess'. Adjust your code to use qualified references to the elements of the module instead, e.g. 'List.map' instead of 'map'. This change will ensure that your code is robust as new constructs are added to libraries. + 此声明将打开标记为“RequireQualifiedAccess”的模块“{0}”。请调整您的代码以改用对模块元素的限定引用,例如“List.map”而非“map”。此更改将确保您的代码在库中不断添加新构造的情况下依然可靠。 + + + + This declaration opens the namespace or module '{0}' through a partially qualified path. Adjust this code to use the full path of the namespace. This change will make your code more robust as new constructs are added to the F# and CLI libraries. + 此声明通过部分限定的路径来打开命名空间或模块“{0}”。请调整此代码以使用命名空间的完整路径。此更改将使您的代码在 F# 和 CLI 库中不断添加新构造的情况下更为可靠。 + + + + Local class bindings cannot be marked inline. Consider lifting the definition out of the class or else do not mark it as inline. + 不能将本地类绑定标记为“inline”。请考虑将定义放到类的外部,否则不要将该类标记为“inline”。 + + + + Type abbreviations cannot have members + 类型缩写词不能具有成员 + + + + As of F# 4.1, the accessibility of type abbreviations is checked at compile-time. Consider changing the accessibility of the type abbreviation. Ignoring this warning might lead to runtime errors. + 从 F# 4.1 起,类型缩写词的辅助功能在编译时进行检查。请考虑更改类型缩写词的辅助功能。忽略此警告可能会导致运行时错误。 + + + + Enumerations cannot have members + 枚举不能具有成员 + + + + Measure declarations may have only static members + 度量声明只能具有静态成员 + + + + Structs cannot contain 'do' bindings because the default constructor for structs would not execute these bindings + 结构不能包含“do”绑定,因为结构的默认构造函数将不会执行这些绑定 + + + + Structs cannot contain value definitions because the default constructor for structs will not execute these bindings. Consider adding additional arguments to the primary constructor for the type. + 结构不能包含值定义,因为结构的默认构造函数将不会执行这些绑定。请考虑为该类型的主构造函数添加更多参数。 + + + + Static value definitions may only be used in types with a primary constructor. Consider adding arguments to the type definition, e.g. 'type X(args) = ...'. + 静态值定义只能在具有主构造函数的类型中使用。请考虑向类型定义添加参数,例如“type X(args) = ...”。 + + + + Measure declarations may have only static members: constructors are not available + 度量声明只能具有静态成员: 构造函数不可用 + + + + A member and a local class binding both have the name '{0}' + 一个成员和一个本地类绑定的名称都为“{0}” + + + + Type abbreviations cannot have interface declarations + 类型缩写词不能具有接口声明 + + + + Enumerations cannot have interface declarations + 枚举不能具有接口声明 + + + + This type is not an interface type + 此类型不是接口类型 + + + + All implemented interfaces should be declared on the initial declaration of the type + 应在类型的初始声明中声明所有实现的接口 + + + + A default implementation of this interface has already been added because the explicit implementation of the interface was not specified at the definition of the type + 已添加此接口的默认实现,因为在相应类型的定义中未指定接口的显式实现 + + + + This member is not permitted in an interface implementation + 接口实现中不允许使用此成员 + + + + This declaration element is not permitted in an augmentation + 扩大中不允许使用此声明元素 + + + + Types cannot contain nested type definitions + 类型不能包含嵌套的类型定义 + + + + type, exception or module + 类型、异常或模块 + + + + type or module + 类型或模块 + + + + The struct, record or union type '{0}' implements the interface 'System.IStructuralEquatable' explicitly. Apply the 'CustomEquality' attribute to the type. + 结构、记录或联合类型“{0}”显式实现接口“System.IStructuralEquatable”。将“CustomEquality”特性应用于相应的类型。 + + + + The struct, record or union type '{0}' implements the interface 'System.IEquatable<_>' explicitly. Apply the 'CustomEquality' attribute to the type and provide a consistent implementation of the non-generic override 'System.Object.Equals(obj)'. + 结构、记录或联合类型“{0}”显式实现接口“System.IEquatable<_>”。将“CustomEquality”特性应用于相应的类型,并提供对非泛型重写“System.Object.Equals(obj)”的一致性实现。 + + + + Explicit type specifications cannot be used for exception constructors + 显式类型规范不能用于异常构造函数 + + + + Exception abbreviations should not have argument lists + 异常缩写词不应具有参数列表 + + + + Abbreviations for Common IL exceptions cannot take arguments + 通用 IL 异常的缩写词不能采用参数 + + + + Exception abbreviations must refer to existing exceptions or F# types deriving from System.Exception + 异常缩写词必须引用现有异常或派生自 System.Exception 的 F# 类型 + + + + Abbreviations for Common IL exception types must have a matching object constructor + 通用 IL 异常类型的缩写词必须具有匹配的对象构造函数 + + + + Not an exception + 不是一个异常 + + + + Invalid module name + 模块名称无效 + + + + Invalid type extension + 类型扩展无效 + + + + The attributes of this type specify multiple kinds for the type + 此类型的特性指定此类型的多个种类 + + + + The kind of the type specified by its attributes does not match the kind implied by its definition + 类型的特性所指定的类型种类与类型的定义暗示的种类不匹配 + + + + Measure definitions cannot have type parameters + 度量定义不能具有类型参数 + + + + This type requires a definition + 此类型需要定义 + + + + This type abbreviation has one or more declared type parameters that do not appear in the type being abbreviated. Type abbreviations must use all declared type parameters in the type being abbreviated. Consider removing one or more type parameters, or use a concrete type definition that wraps an underlying type, such as 'type C<'a> = C of ...'. + 此类型缩写词具有一个或多个在要缩写的类型中不会显示的已声明类型参数。类型缩写词必须使用要缩写的类型中的所有已声明类型参数。请考虑删除一个或多个类型参数,或使用包装基础类型的具体类型定义,例如“type C<'a> = C of ...”。 + + + + Structs, interfaces, enums and delegates cannot inherit from other types + 结构、接口、枚举和委托不能从其他类型继承 + + + + Types cannot inherit from multiple concrete types + 类型不能从多个具体类型继承 + + + + Records, union, abbreviations and struct types cannot have the 'AllowNullLiteral' attribute + 记录、联合、缩写词和结构类型不能具有“AllowNullLiteral”特性 + + + + Types with the 'AllowNullLiteral' attribute may only inherit from or implement types which also allow the use of the null literal + 具有“AllowNullLiteral”特性的类型只能继承自或实现也允许使用 null 文本的类型 + + + + Generic types cannot be given the 'StructLayout' attribute + 不能为泛型类型给定“StructLayout”特性 + + + + Only structs and classes without primary constructors may be given the 'StructLayout' attribute + 只能为不带主构造函数的结构和类提供“StructLayout”特性 + + + + The representation of this type is hidden by the signature. It must be given an attribute such as [<Sealed>], [<Class>] or [<Interface>] to indicate the characteristics of the type. + 签名会隐藏此类型的表示形式。必须为此类型给定一个特性(如 [<Sealed>]、[<Class>] 或 [<Interface>])以指示其特征。 + + + + Only classes may be given the 'AbstractClass' attribute + 只能为类给定“AbstractClass”特性 + + + + Only types representing units-of-measure may be given the 'Measure' attribute + 只能为表示度量单位的类型给定“Measure”特性 + + + + Accessibility modifiers are not permitted on overrides or interface implementations + 不允许对重写或接口实现使用可访问性修饰符 + + + + Discriminated union types are always sealed + 已区分的联合类型始终是密封类型 + + + + Record types are always sealed + 记录类型始终是密封类型 + + + + Assembly code types are always sealed + 程序集代码类型始终是密封类型 + + + + Struct types are always sealed + 结构类型始终是密封类型 + + + + Delegate types are always sealed + 委托类型始终是密封类型 + + + + Enum types are always sealed + 枚举类型始终是密封类型 + + + + Interface types and delegate types cannot contain fields + 接口类型和委托类型不能包含字段 + + + + Abbreviated types cannot be given the 'Sealed' attribute + 不能为缩写的类型给定“Sealed”特性 + + + + Cannot inherit a sealed type + 无法继承密封类型 + + + + Cannot inherit from interface type. Use interface ... with instead. + 无法从接口类型继承。请改用 interface ... with。 + + + + Struct types cannot contain abstract members + 结构类型不能包含抽象成员 + + + + Interface types cannot be sealed + 接口类型不能为密封类型 + + + + Delegate specifications must be of the form 'typ -> typ' + 委托规范的格式必须为“typ -> typ” + + + + Delegate specifications must not be curried types. Use 'typ * ... * typ -> typ' for multi-argument delegates, and 'typ -> (typ -> typ)' for delegates returning function values. + 委托规范不得为扩充类型。请为多参数委托使用“typ * ... * typ -> typ”,并为返回函数值的委托使用“typ -> (typ -> typ)”。 + + + + Literal enumerations must have type int, uint, int16, uint16, int64, uint64, byte, sbyte or char + 文本枚举必须具有类型 int、uint、int16、uint16、int64、uint64、byte、sbyte 或 char + + + + This type definition involves an immediate cyclic reference through an abbreviation + 此类型定义涉及一个经由缩写词的直接循环引用 + + + + This type definition involves an immediate cyclic reference through a struct field or inheritance relation + 此类型定义涉及一个经由结构字段或继承关系的直接循环引用 + + + + The syntax 'type X with ...' is reserved for augmentations. Types whose representations are hidden but which have members are now declared in signatures using 'type X = ...'. You may also need to add the '[<Sealed>] attribute to the type definition in the signature + 已保留语法“type X with ...”以供扩大使用。对于其表示形式已隐藏但是具有成员的类型,现在将在签名中使用“type X = ...”声明这些类型。可能还需要向签名中的类型定义添加“[<Sealed>]”特性 + + + + Members that extend interface, delegate or enum types must be placed in a module separate to the definition of the type. This module must either have the AutoOpen attribute or be opened explicitly by client code to bring the extension members into scope. + 必须将扩展接口、委托或枚举类型的成员放置到与相应的类型定义分离的模块中。此模块必须具有 AutoOpen 特性或由客户端代码显式打开以将扩展成员纳入范围中。 + + + + One or more of the declared type parameters for this type extension have a missing or wrong type constraint not matching the original type constraints on '{0}' + 此类型扩展的一个或多个已声明类型参数具有缺失或错误的类型约束,与“{0}”上的原始类型约束不匹配 + + + + Type definitions may only have one 'inherit' specification and it must be the first declaration + 类型定义只能指定一个“inherit”,并且它必须是第一个声明 + + + + 'let' and 'do' bindings must come before member and interface definitions in type definitions + “let”和“do”绑定在类型定义中必须处于成员和接口定义之前 + + + + This 'inherit' declaration specifies the inherited type but no arguments. Consider supplying arguments, e.g. 'inherit BaseType(args)'. + 此“inherit”声明指定继承的类型,但没有参数。请考虑提供参数,例如“inherit BaseType(args)”。 + + + + This 'inherit' declaration has arguments, but is not in a type with a primary constructor. Consider adding arguments to your type definition, e.g. 'type X(args) = ...'. + 此“inherit”声明具有参数,但是不在具有主构造函数的类型中。请考虑向您的类型定义添加参数,例如“type X(args) = ...”。 + + + + This definition may only be used in a type with a primary constructor. Consider adding arguments to your type definition, e.g. 'type X(args) = ...'. + 此定义只能在具有主构造函数的类型中使用。请考虑向您的类型定义添加参数,例如“type X(args) = ...”。 + + + + Type abbreviations cannot have augmentations + 类型缩写词不能具有扩大 + + + + The path '{0}' is a namespace. A module abbreviation may not abbreviate a namespace. + 路径“{0}”是一个命名空间。模块缩写词可能不会缩写命名空间。 + + + + The type '{0}' is used in an invalid way. A value prior to '{1}' has an inferred type involving '{2}', which is an invalid forward reference. + 类型“{0}”的使用方式无效。“{1}”之前的值具有一个与“{2}”相关的推理类型,这是无效的前向引用。 + + + + The member '{0}' is used in an invalid way. A use of '{1}' has been inferred prior to the definition of '{2}', which is an invalid forward reference. + 成员“{0}”的使用方式无效。在给出“{2}”的定义之前,已推理出“{1}”的用法,这是无效的前向引用。 + + + + The attribute 'AutoOpen(\"{0}\")' in the assembly '{1}' did not refer to a valid module or namespace in that assembly and has been ignored + 程序集“{1}”中的特性“AutoOpen(\"{0}\")”未引用该程序集中的有效模块或命名空间,已忽略此特性 + + + + Undefined value '{0}' + 未定义的值“{0}” + + + + Label {0} not found + 未找到标签 {0} + + + + Incorrect number of type arguments to local call + 本地调用的类型参数的数目不正确 + + + + Dynamic invocation of {0} is not supported + 不支持动态调用 {0} + + + + Taking the address of a literal field is invalid + 采用文本字段的地址无效 + + + + This operation involves taking the address of a value '{0}' represented using a local variable or other special representation. This is invalid. + 此操作涉及到采用通过本地变量或其他特殊表示形式表示的值“{0}”的地址。这是无效的。 + + + + Custom marshallers cannot be specified in F# code. Consider using a C# helper function. + 无法使用 F# 代码指定自定义封送处理程序。请考虑使用 C# Helper 函数。 + + + + The MarshalAs attribute could not be decoded + 未能对 MarshalAs 特性进行解码 + + + + The signature for this external function contains type parameters. Constrain the argument and return types to indicate the types of the corresponding C function. + 此外部函数的签名包含类型参数。请约束此参数和返回类型以指示相应的 C 函数的类型。 + + + + The DllImport attribute could not be decoded + 未能对 DllImport 特性进行解码 + + + + Literal fields cannot be set + 无法设置文本字段 + + + + GenSetStorage: {0} was represented as a static method but was not an appropriate lambda expression + GenSetStorage: {0} 已表示为一个静态方法,而不是适当的 lambda 表达式 + + + + Mutable variables cannot escape their method + 可变变量不能脱离其方法 + + + + Compiler error: unexpected unrealized value + 编译器错误: 意外的未识别值 + + + + Main module of program is empty: nothing will happen when it is run + 程序的主模块为空: 运行此程序时将不会有任何反应 + + + + This type cannot be used for a literal field + 此类型不能用于文本字段 + + + + Unexpected GetSet annotation on a property + 某个属性的意外的 GetSet 批注 + + + + The FieldOffset attribute could not be decoded + 未能对 FieldOffset 特性进行解码 + + + + The StructLayout attribute could not be decoded + 未能对 StructLayout 特性进行解码 + + + + The DefaultAugmentation attribute could not be decoded + 未能对 DefaultAugmentation 特性进行解码 + + + + Reflected definitions cannot contain uses of the prefix splice operator '%' + 反射的定义中不能使用前缀拼接运算符“%” + + + + Problem with codepage '{0}': {1} + 代码页“{0}”存在问题: {1} + + + + Copyright (c) Microsoft Corporation. All Rights Reserved. + 版权所有(C) Microsoft Corporation。保留所有权利。 + + + + Freely distributed under the MIT Open Source License. https://github.com/Microsoft/visualfsharp/blob/master/License.txt + 免费分发在 MIT 开源许可证下。https://github.com/Microsoft/visualfsharp/blob/master/License.txt + + + + Name of the output file (Short form: -o) + 输出文件的名称(缩写: -o) + + + + Build a console executable + 生成控制台可执行文件 + + + + Build a Windows executable + 生成 Windows 可执行文件 + + + + Build a library (Short form: -a) + 生成库(缩写: -a) + + + + Build a module that can be added to another assembly + 生成可添加到其他程序集的模块 + + + + Delay-sign the assembly using only the public portion of the strong name key + 仅使用强名称密钥的公共部分对程序集进行延迟签名 + + + + Public-sign the assembly using only the public portion of the strong name key, and mark the assembly as signed + 仅使用强名称密钥的公用部分对该程序集进行公开签名, 并将该程序集标记为已签名 + + + + Write the xmldoc of the assembly to the given file + 将程序集的 xmldoc 写入到给定文件 + + + + Specify a strong name key file + 指定强名称密钥文件 + + + + Specify a strong name key container + 指定强名称密钥容器 + + + + Limit which platforms this code can run on: x86, Itanium, x64, anycpu32bitpreferred, or anycpu. The default is anycpu. + 限制可以运行此代码的平台: x86、Itanium、x64、anycpu32bitpreferred 或 anycpu。默认值为 anycpu。 + + + + Only include optimization information essential for implementing inlined constructs. Inhibits cross-module inlining but improves binary compatibility. + 仅包含实现内联构造所必需的优化信息。禁止跨模块内联,但会提高二进制兼容性。 + + + + Don't add a resource to the generated assembly containing F#-specific metadata + 不向包含 F# 特定元数据的生成程序集中添加资源 + + + + Print the inferred interface of the assembly to a file + 将推理出的程序集接口输出到文件 + + + + Reference an assembly (Short form: -r) + 引用一个程序集(缩写: -r) + + + + Specify a Win32 resource file (.res) + 指定 Win32 资源文件(.res) + + + + Specify a Win32 manifest file + 指定 Win32 清单文件 + + + + Do not include the default Win32 manifest + 不包括默认的 Win32 清单 + + + + Embed all source files in the portable PDB file + 将所有源文件嵌入可移植 PDB 文件 + + + + Embed specific source files in the portable PDB file + 将特定源文件嵌入可移植 PDB 文件 + + + + Source link information file to embed in the portable PDB file + 要嵌入可移植 PDB 文件中的源链接信息文件 + + + + --embed switch only supported when emitting a Portable PDB (--debug:portable or --debug:embedded) + #NAME? + + + + --sourcelink switch only supported when emitting a Portable PDB (--debug:portable or --debug:embedded) + #NAME? + + + + Source file is too large to embed in a portable PDB + 源文件太大,无法嵌入可移植 PDB + + + + Embed the specified managed resource + 嵌入指定的托管资源 + + + + Link the specified resource to this assembly where the resinfo format is <file>[,<string name>[,public|private]] + 将指定的资源链接到此程序集,其中 resinfo 格式为“<文件>[,<字符串名称>[,public|private]]” + + + + Emit debug information (Short form: -g) + 发出调试信息(缩写: -g) + + + + Specify debugging type: full, portable, embedded, pdbonly. ('{0}' is the default if no debuggging type specified and enables attaching a debugger to a running program, 'portable' is a cross-platform format, 'embedded' is a cross-platform format embedded into the output file). + 指定调试类型: full、portable、embedded、pdbonly。(若未指定调试类型,则默认为“{0}”,它允许将调试程序附加到正在运行的程序。"portable" 是跨平台格式,"embedded" 是嵌入到输出文件中的跨平台格式)。 + + + + Enable optimizations (Short form: -O) + 启用优化(缩写: -O) + + + + Enable or disable tailcalls + 启用或禁用尾调用 + + + + Produce a deterministic assembly (including module version GUID and timestamp) + 产生确定性的程序集(包括模块版本 GUID 和时间戳) + + + + Enable or disable cross-module optimizations + 启用或禁用跨模块优化 + + + + Report all warnings as errors + 将所有警告报告为错误 + + + + Report specific warnings as errors + 将特定警告报告为错误 + + + + Set a warning level (0-5) + 设置警告等级(0-5) + + + + Disable specific warning messages + 禁用特定的警告消息 + + + + Enable specific warnings that may be off by default + 启用默认情况下可能关闭的特定警告 + + + + Generate overflow checks + 生成溢出检查 + + + + Define conditional compilation symbols (Short form: -d) + 定义条件编译符号(缩写: -d) + + + + Ignore ML compatibility warnings + 忽略 ML 兼容性警告 + + + + + Display this usage message (Short form: -?) + 显示此用法消息(缩写为: -?) + + + + Read response file for more options + 读取响应文件以获取更多选项 + + + + Specify the codepage used to read source files + 指定用于读取源文件的代码页 + + + + Output messages in UTF-8 encoding + 以 UTF-8 编码格式输出消息 + + + + Output messages with fully qualified paths + 使用完全限定路径输出消息 + + + + Specify a directory for the include path which is used to resolve source files and assemblies (Short form: -I) + 指定用于解析源文件和程序集的包含路径的目录(缩写: -I) + + + + Base address for the library to be built + 要生成的库的基址 + + + + Do not reference the default CLI assemblies by default + 默认情况下不引用默认 CLI 程序集 + + + + Statically link the F# library and all referenced DLLs that depend on it into the assembly being generated + 以静态方式将 F# 库与依赖于此库的所有引用的 DLL 链接到所生成的程序集中 + + + + Statically link the given assembly and all referenced DLLs that depend on this assembly. Use an assembly name e.g. mylib, not a DLL name. + 以静态方式链接给定程序集与依赖于此程序集的所有引用的 DLL。使用程序集名称(例如 mylib)而非 DLL 名称。 + + + + Use a resident background compilation service to improve compiler startup times. + 使用驻留后台编译服务缩短编译器启动时间。 + + + + Name the output debug file + 对输出调试文件进行命名 + + + + Resolve assembly references using directory-based rules rather than MSBuild resolution + 使用基于目录的规则而非 MSBuild 解析来解析程序集引用 + + + + Unrecognized target '{0}', expected 'exe', 'winexe', 'library' or 'module' + 无法识别的目标“{0}”,应为“exe”、“winexe”、“library”或“module” + + + + Unrecognized debug type '{0}', expected 'pdbonly' or 'full' + 无法识别的调试类型“{0}”,应为“pdbonly”或“full” + + + + Invalid warning level '{0}' + 警告等级“{0}”无效 + + + + Short form of '{0}' + “{0}”的缩写 + + + + The command-line option '--cliroot' has been deprecated. Use an explicit reference to a specific copy of mscorlib.dll instead. + 命令行选项“--cliroot”已弃用。请改用对 mscorlib.dll 的特定副本的显式引用。 + + + + Use to override where the compiler looks for mscorlib.dll and framework components + 用于重写编译器查找 mscorlib.dll 和 Framework 组件的位置 + + + + - OUTPUT FILES - + - 输出文件 - + + + + - INPUT FILES - + - 输入文件 - + + + + - RESOURCES - + - 资源 - + + + + - CODE GENERATION - + - 代码生成 - + + + + - ADVANCED - + - 高级 - + + + + - MISCELLANEOUS - + - 杂项 - + + + + - LANGUAGE - + - 语言 - + + + + - ERRORS AND WARNINGS - + - 错误和警告 - + + + + Unknown --test argument: '{0}' + 未知的测试参数: '{0}' + + + + Unrecognized platform '{0}', valid values are 'x86', 'x64', 'Itanium', 'anycpu32bitpreferred', and 'anycpu' + 无法识别的平台“{0}”,有效值为“x86”、“x64”、“Itanium”、“anycpu32bitpreferred”和“anycpu” + + + + The command-line option '{0}' is for test purposes only + 命令行选项“{0}”仅用于测试目的 + + + + The command-line option '{0}' has been deprecated + 命令行选项“{0}”已弃用 + + + + The command-line option '{0}' has been deprecated. Use '{1}' instead. + 命令行选项“{0}”已弃用。请改用“{1}”。 + + + + The command-line option '{0}' has been deprecated. HTML document generation is now part of the F# Power Pack, via the tool FsHtmlDoc.exe. + 命令行选项“{0}”已弃用。HTML 文档生成现在是 F# Power Pack 的一部分(借助 FsHtmlDoc.exe 工具)。 + + + + Output warning and error messages in color + 以彩色输出警告和错误消息 + + + + Enable high-entropy ASLR + 启用高熵 ASLR + + + + Specify subsystem version of this assembly + 指定此程序集的子系统版本 + + + + Specify target framework profile of this assembly. Valid values are mscorlib, netcore or netstandard. Default - mscorlib + 指定此程序集的目标框架配置文件。有效值为 mscorlib、netcore 或 netstandard。默认值为 - mscorlib + + + + Emit debug information in quotations + 发出用引号引起来的调试信息 + + + + Specify the preferred output language culture name (e.g. es-ES, ja-JP) + 指定首选输出语言区域性名称(例如 es-ES、ja-JP) + + + + Don't copy FSharp.Core.dll along the produced binaries + 请勿从已生成的二进制文件中复制 FSharp.Core.dll + + + + Invalid version '{0}' for '--subsystemversion'. The version must be 4.00 or greater. + “--subsystemversion”的版本“{0}”无效。版本必须为 4.00 或更高版本。 + + + + Invalid value '{0}' for '--targetprofile', valid values are 'mscorlib', 'netcore' or 'netstandard'. + --targetprofile 的值“{0}”无效,有效值为 "mscorlib"、"netcore" 或 "netstandard"。 + + + + Full name + 全名 + + + + and {0} other overloads + 和 {0} 个其他重载 + + + + union case + 联合用例 + + + + active pattern result + 活动模式结果 + + + + active recognizer + 活动识别器 + + + + field + 字段 + + + + event + 事件 + + + + property + 属性 + + + + extension + 扩展 + + + + custom operation + 自定义运算 + + + + argument + 参数 + + + + patvar + patvar + + + + namespace + 命名空间 + + + + module + 模块 + + + + namespace/module + 命名空间/模块 + + + + from {0} + 自 {0} + + + + also from {0} + 也自 {0} + + + + generated property + 生成的属性 + + + + generated type + 生成的类型 + + + + Found by AssemblyFolders registry key + 已由 AssemblyFolders 注册表项找到 + + + + Found by AssemblyFoldersEx registry key + 已由 AssemblyFoldersEx 注册表项找到 + + + + .NET Framework + .NET Framework + + + + Global Assembly Cache + 全局程序集缓存 + + + + Recursive class hierarchy in type '{0}' + 类型“{0}”中的递归类层次结构 + + + + Invalid recursive reference to an abstract slot + 对抽象槽的递归引用无效 + + + + The event '{0}' has a non-standard type. If this event is declared in another CLI language, you may need to access this event using the explicit {1} and {2} methods for the event. If this event is declared in F#, make the type of the event an instantiation of either 'IDelegateEvent<_>' or 'IEvent<_,_>'. + 事件“{0}”具有非标准类型。如果此事件是在另一种 CLI 语言中声明的,则您可能需要使用此事件的显式 {1} 和 {2} 方法来访问此事件。如果此事件是在 F# 中声明的,则使此事件的类型成为“IDelegateEvent<_>”或“IEvent<_,_>”的实例化。 + + + + The type '{0}' is not accessible from this code location + 无法从此代码位置访问类型“{0}” + + + + The union cases or fields of the type '{0}' are not accessible from this code location + 无法从此代码位置访问类型“{0}”的联合用例或字段 + + + + The value '{0}' is not accessible from this code location + 无法从此代码位置访问值“{0}” + + + + The union case '{0}' is not accessible from this code location + 无法从此代码位置访问联合用例“{0}” + + + + The record, struct or class field '{0}' is not accessible from this code location + 无法从此代码位置访问记录、结构或类字段“{0}” + + + + The struct or class field '{0}' is not accessible from this code location + 无法从此代码位置访问结构或类字段“{0}” + + + + This construct is experimental + 此构造是试验性构造 + + + + No Invoke methods found for delegate type + 未找到委托类型的 Invoke 方法 + + + + More than one Invoke method found for delegate type + 已找到委托类型的多个 Invoke 方法 + + + + Delegates are not allowed to have curried signatures + 委托不得有扩充签名 + + + + Unexpected Expr.TyChoose + 意外的 Expr.TyChoose + + + + Note: Lambda-lifting optimizations have not been applied because of the use of this local constrained generic function as a first class value. Adding type constraints may resolve this condition. + 注意: 尚未应用 Lambda 提升优化,因为使用了此本地约束的泛型函数作为一类值。添加类型约束可以解析此条件。 + + + + Identifiers containing '@' are reserved for use in F# code generation + 已保留包含“@”的标识符以用于 F# 代码生成 + + + + The identifier '{0}' is reserved for future use by F# + 已保留标识符“{0}”以供 F# 将来使用 + + + + Missing variable '{0}' + 缺少变量“{0}” + + + + Partial active patterns may only generate one result + 部分激活的模式只能生成一个结果 + + + + The type '{0}' is required here and is unavailable. You must add a reference to assembly '{1}'. + 此处需要类型“{0}”,但此类型不可用。必须添加对程序集“{1}”的引用。 + + + + A reference to the type '{0}' in assembly '{1}' was found, but the type could not be found in that assembly + 在程序集“{1}”中找到了对类型“{0}”的引用,但在该程序集中未能找到此类型 + + + + Internal error or badly formed metadata: not enough type parameters were in scope while importing + 内部错误或元数据格式不正确: 导入时范围内没有足够多的类型参数 + + + + A reference to the DLL {0} is required by assembly {1}. The imported type {2} is located in the first assembly and could not be resolved. + 程序集 {1} 需要对 DLL {0} 的引用。导入的类型 {2} 位于第一个程序集中,未能解析此类型。 + + + + An imported assembly uses the type '{0}' but that type is not public + 导入的程序集使用类型“{0}”,但该类型不是公共类型 + + + + The value '{0}' was marked inline but its implementation makes use of an internal or private function which is not sufficiently accessible + 值“{0}”已标记为“inline”,而该值的实现使用了一个无法充分访问的内部或私有函数 + + + + The value '{0}' was marked inline but was not bound in the optimization environment + 值“{0}”已标记为“inline”,但其未在优化环境中绑定 + + + + Local value {0} not found during optimization + 优化过程中未找到本地值 {0} + + + + A value marked as 'inline' has an unexpected value + 标记为“inline”的值具有意外的值 + + + + A value marked as 'inline' could not be inlined + 未能内联标记为“inline”的值 + + + + Failed to inline the value '{0}' marked 'inline', perhaps because a recursive value was marked 'inline' + 未能内联标记为“inline”的值“{0}”,可能是因为已将某个递归值标记为“inline” + + + + Recursive ValValue {0} + 递归的 ValValue {0} + + + + The indentation of this 'in' token is incorrect with respect to the corresponding 'let' + 相对于相应的“let”,此“in”标记的缩进不正确 + + + + Possible incorrect indentation: this token is offside of context started at position {0}. Try indenting this token further or using standard formatting conventions. + 缩进可能不正确: 此标记位于从位置 {0} 开始的上下文的右侧。请尝试进一步缩进此标记,或使用标准格式设置约定。 + + + + The '|' tokens separating rules of this pattern match are misaligned by one column. Consider realigning your code or using further indentation. + 用于分离此模式匹配规则的“|”标记错开了一列。请考虑重新对齐代码或使用进一步的缩进。 + + + + Invalid module/expression/type + 模块/表达式/类型无效 + + + + Multiple types exist called '{0}', taking different numbers of generic parameters. Provide a type instantiation to disambiguate the type resolution, e.g. '{1}'. + 存在多个名为“{0}”的类型,这些类型采用的泛型参数的数目各不相同。请提供一个类型实例化以区分类型解析,例如“{1}”。 + + + + The instantiation of the generic type '{0}' is missing and can't be inferred from the arguments or return type of this member. Consider providing a type instantiation when accessing this type, e.g. '{1}'. + 缺少泛型类型“{0}”的实例化,并且不能从该成员的参数或返回类型推理此实例化。请考虑在访问此类型时提供一个类型实例化,例如“{1}”。 + + + + 'global' may only be used as the first name in a qualified path + “global”只能用作限定路径中的第一个名称 + + + + This is not a constructor or literal, or a constructor is being used incorrectly + 这不是一个构造函数或文本,或未正确使用某个构造函数 + + + + Unexpected empty long identifier + 意外的空白长标识符 + + + + The record type '{0}' does not contain a label '{1}'. + 记录类型“{0}”不包含标签“{1}”。 + + + + Invalid field label + 字段标签无效 + + + + Invalid expression '{0}' + 表达式“{0}”无效 + + + + No constructors are available for the type '{0}' + 没有对类型“{0}”可用的构造函数 + + + + The union type for union case '{0}' was defined with the RequireQualifiedAccessAttribute. Include the name of the union type ('{1}') in the name you are using. + 使用 RequireQualifiedAccessAttribute 定义联合用例“{0}”的联合类型。包括所使用的名称中联合类型 ('{1}') 的名称。 + + + + The record type for the record field '{0}' was defined with the RequireQualifiedAccessAttribute. Include the name of the record type ('{1}') in the name you are using. + 使用 RequireQualifiedAccessAttribute 定义记录字段“{0}”的记录类型。包括所使用的名称中记录类型 ('{1}') 的名称。 + + + + Unexpected error creating debug information file '{0}' + 创建调试信息文件“{0}”时出错 + + + + This number is outside the allowable range for this integer type + 此数字在允许的此整数类型范围之外 + + + + '{0}' is not permitted as a character in operator names and is reserved for future use + 不允许将“{0}”作为运算符名称中的字符,已将其保留以供将来使用 + + + + Unexpected character '{0}' + 意外的字符“{0}” + + + + This byte array literal contains characters that do not encode as a single byte + 此字节数组文本包含不会以单字节形式进行编码的字符 + + + + Identifiers followed by '{0}' are reserved for future use + 已保留后跟“{0}”的标识符以供将来使用 + + + + This number is outside the allowable range for 8-bit signed integers + 此数字在允许的 8 位带符号整数范围之外 + + + + This number is outside the allowable range for hexadecimal 8-bit signed integers + 此数字在允许的十六进制 8 位带符号整数范围之外 + + + + This number is outside the allowable range for 8-bit unsigned integers + 此数字在允许的 8 位无符号整数范围之外 + + + + This number is outside the allowable range for 16-bit signed integers + 此数字在允许的 16 位带符号整数范围之外 + + + + This number is outside the allowable range for 16-bit unsigned integers + 此数字在允许的 16 位无符号整数范围之外 + + + + This number is outside the allowable range for 32-bit signed integers + 此数字在允许的 32 位带符号整数范围之外 + + + + This number is outside the allowable range for 32-bit unsigned integers + 此数字在允许的 32 位无符号整数范围之外 + + + + This number is outside the allowable range for 64-bit signed integers + 此数字在允许的 64 位带符号整数范围之外 + + + + This number is outside the allowable range for 64-bit unsigned integers + 此数字在允许的 64 位无符号整数范围之外 + + + + This number is outside the allowable range for signed native integers + 此数字在允许的带符号本机整数范围之外 + + + + This number is outside the allowable range for unsigned native integers + 此数字在允许的无符号本机整数范围之外 + + + + Invalid floating point number + 浮点数无效 + + + + This number is outside the allowable range for decimal literals + 此数字在允许的十进制文本范围之外 + + + + This number is outside the allowable range for 32-bit floats + 此数字在允许的 32 位浮点数范围之外 + + + + This is not a valid numeric literal. Valid numeric literals include 1, 0x1, 0b0001 (int), 1u (uint32), 1L (int64), 1UL (uint64), 1s (int16), 1y (sbyte), 1uy (byte), 1.0 (float), 1.0f (float32), 1.0m (decimal), 1I (BigInteger). + 这不是有效的数字文本。有效的数字文本包括 1、0x1、0b0001 (int)、1u (uint32)、1L (int64)、1UL (uint64)、1s (int16)、1y (sbyte)、1uy (byte)、1.0 (float)、1.0f (float32)、1.0m (decimal)、1I (BigInteger)。 + + + + This is not a valid byte literal + 这不是有效的字节文本 + + + + This is not a valid character literal + 这不是有效的字符文本 + + + + This Unicode encoding is only valid in string literals + 此 Unicode 编码仅在字符串中有效 + + + + This token is reserved for future use + 已保留此标记供将来使用 + + + + TABs are not allowed in F# code unless the #indent \"off\" option is used + F# 代码中不允许使用制表符,除非使用了 #indent \"off\" 选项 + + + + Invalid line number: '{0}' + 行号“{0}”无效 + + + + #if directive must appear as the first non-whitespace character on a line + #if 指令必须作为一行的第一个非空白字符出现 + + + + #else has no matching #if + #else 没有匹配的 #if + + + + #endif required for #else + #else 需要 #endif + + + + #else directive must appear as the first non-whitespace character on a line + #else 指令必须作为一行的第一个非空白字符出现 + + + + #endif has no matching #if + #endif 没有匹配的 #if + + + + #endif directive must appear as the first non-whitespace character on a line + #endif 指令必须作为一行的第一个非空白字符出现 + + + + #if directive should be immediately followed by an identifier + #if 指令后应紧跟标识符 + + + + Syntax error. Wrong nested #endif, unexpected tokens before it. + 语法错误。嵌套的 #endif 出错,其前面存在意外的标记。 + + + + #! may only appear as the first line at the start of a file. + #!可能只在文件开头显示为第一行。 + + + + Expected single line comment or end of line + 应输入单行注释或行尾 + + + + Infix operator member '{0}' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ... + 中缀运算符成员“{0}”没有参数。需要一个由 2 个参数构成的元组,例如静态成员 (+) (x,y) = ... + + + + Infix operator member '{0}' has {1} initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ... + 中缀运算符成员“{0}”具有 {1} 个初始参数。需要一个由 2 个参数构成的元组,例如静态成员 (+) (x,y) = ... + + + + Infix operator member '{0}' has extra curried arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ... + 中缀运算符成员“{0}”具有额外的扩充参数。需要一个由 2 个参数构成的元组,例如静态成员 (+) (x,y) = ... + + + + All record, union and struct types in FSharp.Core.dll must be explicitly labelled with 'StructuralComparison' or 'NoComparison' + 必须使用“StructuralComparison”或“NoComparison”显式标记 FSharp.Core.dll 中的所有字段、联合和结构类型 + + + + The struct, record or union type '{0}' has the 'StructuralComparison' attribute but the type parameter '{1}' does not satisfy the 'comparison' constraint. Consider adding the 'comparison' constraint to the type parameter + 结构、记录或联合类型“{0}”具有“StructuralComparison”特性,但类型参数“{1}”不符合“comparison”约束的要求。请考虑将“comparison”约束添加到该类型参数 + + + + The struct, record or union type '{0}' has the 'StructuralComparison' attribute but the component type '{1}' does not satisfy the 'comparison' constraint + 结构、记录或联合类型“{0}”具有“StructuralComparison”特性,但组件类型“{1}”不符合“comparison”约束的要求 + + + + The struct, record or union type '{0}' is not structurally comparable because the type parameter {1} does not satisfy the 'comparison' constraint. Consider adding the 'NoComparison' attribute to the type '{2}' to clarify that the type is not comparable + 结构、记录或联合类型“{0}”在结构上是不可比较的,因为类型参数 {1} 不符合“comparison”约束的要求。请考虑将“NoComparison”特性添加到类型“{2}”以阐明此类型是不可比较的 + + + + The struct, record or union type '{0}' is not structurally comparable because the type '{1}' does not satisfy the 'comparison' constraint. Consider adding the 'NoComparison' attribute to the type '{2}' to clarify that the type is not comparable + 结构、记录或联合类型“{0}”在结构上是不可比较的,因为类型“{1}”不符合“comparison”约束的要求。请考虑将“NoComparison”特性添加到类型“{2}”以阐明此类型是不可比较的 + + + + The struct, record or union type '{0}' does not support structural equality because the type parameter {1} does not satisfy the 'equality' constraint. Consider adding the 'NoEquality' attribute to the type '{2}' to clarify that the type does not support structural equality + 结构、记录或联合类型“{0}”不支持结构相等比较,因为类型参数 {1} 不符合“equality”约束的要求。请考虑将“NoEquality”特性添加到类型“{2}”以阐明此类型不支持结构相等比较 + + + + The struct, record or union type '{0}' does not support structural equality because the type '{1}' does not satisfy the 'equality' constraint. Consider adding the 'NoEquality' attribute to the type '{2}' to clarify that the type does not support structural equality + 结构、记录或联合类型“{0}”不支持结构相等比较,因为类型“{1}”不符合“equality”约束的要求。请考虑将“NoEquality”特性添加到类型“{2}”以阐明此类型不支持结构相等比较 + + + + The struct, record or union type '{0}' has the 'StructuralEquality' attribute but the type parameter '{1}' does not satisfy the 'equality' constraint. Consider adding the 'equality' constraint to the type parameter + 结构、记录或联合类型“{0}”具有“StructuralEquality”特性,但类型参数“{1}”不符合“equality”约束的要求。请考虑将“equality”约束添加到该类型参数 + + + + The struct, record or union type '{0}' has the 'StructuralEquality' attribute but the component type '{1}' does not satisfy the 'equality' constraint + 结构、记录或联合类型“{0}”具有“StructuralEquality”特性,但组件类型“{1}”不符合“equality”约束的要求 + + + + Each argument of the primary constructor for a struct must be given a type, for example 'type S(x1:int, x2: int) = ...'. These arguments determine the fields of the struct. + 必须为结构的主构造函数的每个参数给定一个类型,例如“type S(x1:int, x2: int) = ...”。这些参数确定该结构的各个字段。 + + + + The value '{0}' is unused + 未使用值“{0}” + + + + The recursive object reference '{0}' is unused. The presence of a recursive object reference adds runtime initialization checks to members in this and derived types. Consider removing this recursive object reference. + 未使用递归对象引用“{0}”。如果存在递归对象引用,则会增加针对此类型和派生类型中的成员的运行时初始化检查。请考虑删除此递归对象引用。 + + + + A getter property may have at most one argument group + Getter 属性最多可以有一个参数组 + + + + A setter property may have at most two argument groups + setter 属性最多可以有两个参数组 + + + + Invalid property getter or setter + 属性 Getter 或 Setter 无效 + + + + An indexer property must be given at least one argument + 必须为索引器属性给定至少一个参数 + + + + This operation accesses a mutable top-level value defined in another assembly in an unsupported way. The value cannot be accessed through its address. Consider copying the expression to a mutable local, e.g. 'let mutable x = ...', and if necessary assigning the value back after the completion of the operation + 此操作用于访问在另一个程序集中定义的可变顶级值的方式不受支持。无法通过该值的地址来访问该值。请考虑将该表达式复制到一个可变本地变量,例如“let mutable x = ...”,另外如果需要,可在完成此操作后赋回该值 + + + + Remove spaces between the type name and type parameter, e.g. \"type C<'T>\", not type \"C <'T>\". Type parameters must be placed directly adjacent to the type name. + 必须将类型参数直接放置到类型名称的旁边,例如 \"type C<'T>\",而非 type \"C <'T>\" + + + + Remove spaces between the type name and type parameter, e.g. \"C<'T>\", not \"C <'T>\". Type parameters must be placed directly adjacent to the type name. + 必须将类型参数直接放置到类型名称的旁边,例如 \"C<'T>\",而非 \"C <'T>\" + + + + The use of the type syntax 'int C' and 'C <int>' is not permitted here. Consider adjusting this type to be written in the form 'C<int>' + 此处不允许使用类型语法“int C”和“C <int>”。请考虑将此类型调整为以格式“C<int>”编写 + + + + The module/namespace '{0}' from compilation unit '{1}' did not contain the module/namespace '{2}' + 编译单元“{1}”中的模块/命名空间“{0}”未包含模块/命名空间“{2}” + + + + The module/namespace '{0}' from compilation unit '{1}' did not contain the val '{2}' + 编译单元“{1}”中的模块/命名空间“{0}”未包含值“{2}” + + + + The module/namespace '{0}' from compilation unit '{1}' did not contain the namespace, module or type '{2}' + 编译单元“{1}”中的模块/命名空间“{0}”未包含命名空间、模块或类型“{2}” + + + + The 'UseNullAsTrueValue' attribute flag may only be used with union types that have one nullary case and at least one non-nullary case + “UseNullAsTrueValue”特性标志只能用于具有一个空用例和至少一个非空用例的联合类型 + + + + The parameter '{0}' was inferred to have byref type. Parameters of byref type must be given an explicit type annotation, e.g. 'x1: byref<int>'. When used, a byref parameter is implicitly dereferenced. + “{0}”参数被推断为具有 byref 类型。必须为 byref 类型的参数给定显式类型批注,例如“x1: byref<int>”。使用时,会隐式取消引用 byref 参数。 + + + + The generic member '{0}' has been used at a non-uniform instantiation prior to this program point. Consider reordering the members so this member occurs first. Alternatively, specify the full type of the member explicitly, including argument types, return type and any additional generic parameters and constraints. + 在此程序点之前,已在非统一实例化中使用了泛型成员“{0}”。请考虑重新排列成员顺序,以使此成员先出现。或者,也可以显式指定该成员的完整类型,包括实参类型、返回类型以及其他任何泛型形参和约束。 + + + + The attribute '{0}' appears in both the implementation and the signature, but the attribute arguments differ. Only the attribute from the signature will be included in the compiled code. + 特性“{0}”同时出现在实现和签名中,但它们的参数有所不同。只有签名中的该特性才会包括在已编译代码中。 + + + + Cannot call an abstract base member: '{0}' + 无法调用抽象基成员:“{0}” + + + + Could not resolve the ambiguity in the use of a generic construct with an 'unmanaged' constraint at or near this position + 对于在此位置或附近使用“unmanaged”约束的泛型构造的用法,无法解析其多义性 + + + + This construct is for ML compatibility. {0}. You can disable this warning by using '--mlcompatibility' or '--nowarn:62'. + 此构造适用于 ML 兼容性。{0}。可以通过使用“--mlcompatibility”或“--nowarn:62”来禁用此警告。 + + + + The type '{0}' has been marked as having an Explicit layout, but the field '{1}' has not been marked with the 'FieldOffset' attribute + 类型“{0}”已标记为具有显式布局,但字段“{1}”尚未用“FieldOffset”特性进行标记 + + + + Interfaces inherited by other interfaces should be declared using 'inherit ...' instead of 'interface ...' + 由其他接口继承的接口应使用“inherit ...”而非“interface ...”进行声明 + + + + Invalid prefix operator + 无效的前缀运算符 + + + + Invalid operator definition. Prefix operator definitions must use a valid prefix operator name. + 运算符定义无效。前缀运算符定义必须使用有效的前缀运算符名称。 + + + + The file extensions '.ml' and '.mli' are for ML compatibility + 文件扩展名“.ml”和“.mli”适用于 ML 兼容性 + + + + Consider using a file with extension '.ml' or '.mli' instead + 请考虑改用扩展名为“.ml”或“.mli”的文件 + + + + Active pattern '{0}' is not a function + 活动模式“{0}”不是一个函数 + + + + Active pattern '{0}' 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' + 活动模式“{0}”的结果类型中包含的类型变量不是由输入确定的。常见原因是未指出结果事例,例如“let (|A|B|) (x:int) = A x”。这可以通过使用类型约束来修复,例如“let (|A|B|) (x:int) : Choice<int,unit> = A x” + + + + The FieldOffset attribute can only be placed on members of types marked with the StructLayout(LayoutKind.Explicit) + FieldOffset 特性只能放置在标记为 StructLayout(LayoutKind.Explicit) 的类型的成员上 + + + + Optional arguments must come at the end of the argument list, after any non-optional arguments + 可选参数必须位于参数列表结尾的任何非可选参数的后面 + + + + Attribute 'System.Diagnostics.ConditionalAttribute' is only valid on methods or attribute classes + 特性“System.Diagnostics.ConditionalAttribute”仅对方法或特性类有效 + + + + Extension members cannot provide operator overloads. Consider defining the operator as part of the type definition instead. + 扩展成员无法提供运算符重载。 请考虑改为将运算符定义为类型定义的一部分。 + + + + The name of the MDB file must be <assembly-file-name>.mdb. The --pdb option will be ignored. + MDB 文件的名称必须是 <程序集文件名>.mdb。将忽略 --pdb 选项。 + + + + MDB generation failed. Could not find compatible member {0} + MDB 生成失败。找不到兼容成员 {0} + + + + Cannot generate MDB debug information. Failed to load the 'MonoSymbolWriter' type from the 'Mono.CompilerServices.SymbolWriter.dll' assembly. + 无法生成 MDB 调试信息。未能从“Mono.CompilerServices.SymbolWriter.dll”程序集加载“MonoSymbolWriter”类型。 + + + + The union case named '{0}' conflicts with the generated type '{1}' + 名为“{0}”的联合用例与生成的类型“{1}”冲突 + + + + ReflectedDefinitionAttribute may not be applied to an instance member on a struct type, because the instance member takes an implicit 'this' byref parameter + ReflectedDefinitionAttribute 不能应用于结构类型的实例成员,因为该实例成员采用隐式“this”byref 参数 + + + + DLLImport bindings must be static members in a class or function definitions in a module + DLLImport 绑定必须是类中的静态成员或模块中的函数定义 + + + + When mscorlib.dll or FSharp.Core.dll is explicitly referenced the {0} option must also be passed + 当显式引用 mscorlib.dll 或 FSharp.Core.dll 时,同时也必须传递 {0} 选项 + + + + FSharp.Core.sigdata not found alongside FSharp.Core. File expected in {0}. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required. + 未能在 FSharp.Core 旁找到 FSharp.Core.sigdata。文件应在 {0} 中。请考虑升级到更新版本的 FSharp.Core,该版本不再需要此文件。 + + + + File '{0}' not found alongside FSharp.Core. File expected in {1}. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required. + 未能在 FSharp.Core 旁找到文件“{0}”。文件应在 {1} 中。请考虑升级到更新版本的 FSharp.Core,该版本不再需要此文件。 + + + + Filename '{0}' contains invalid character '{1}' + 文件名“{0}”包含无效字符“{1}” + + + + 'use!' bindings must be of the form 'use! <var> = <expr>' + “use!”绑定的格式须为“use! <变量> = <表达式>” + + + + Inner generic functions are not permitted in quoted expressions. Consider adding some type constraints until this function is no longer generic. + 带引号的表达式中不允许有内部泛型函数。请考虑添加一些类型约束,直至此函数不再是泛型函数。 + + + + The type '{0}' is not a valid enumerator type , i.e. does not have a 'MoveNext()' method returning a bool, and a 'Current' property + 类型“{0}”不是有效枚举器类型,即,没有返回布尔值的“MoveNext()”方法和“Current”属性 + + + + End of file in triple-quote string begun at or before here + 文件尾在此处或之前开始的三重引号字符串中 + + + + End of file in triple-quote string embedded in comment begun at or before here + 文件尾在此处或之前开始的注释中嵌入的三重引号字符串中 + + + + This type test or downcast will ignore the unit-of-measure '{0}' + 此类型测试或向下转换将忽略度量单位“{0}” + + + + Expected type argument or static argument + 应为类型参数或静态参数 + + + + Unmatched '<'. Expected closing '>' + 不匹配的“<”。应为结束“>” + + + + Unexpected quotation operator '<@' in type definition. If you intend to pass a verbatim string as a static argument to a type provider, put a space between the '<' and '@' characters. + 类型定义中出现意外的引用运算符“<@”。如果您要将原义字符串作为静态参数传递给类型提供程序,请在“<”与“@”字符之间加一个空格。 + + + + Attempted to parse this as an operator name, but failed + 尝试将此分析为运算符名称,但未成功 + + + + \U{0} is not a valid Unicode character escape sequence + \U{0} 不是有效的 Unicode 字符转义序列 + + + + '{0}' must be applied to an argument of type '{1}', but has been applied to an argument of type '{2}' + “{0}”必须应用于类型“{1}”的参数,但却被应用于类型“{2}”的参数 + + + + '{0}' can only be applied to optional arguments + “{0}”只能应用于可选参数 + + + + The specified .NET Framework version '{0}' is not supported. Please specify a value from the enumeration Microsoft.Build.Utilities.TargetDotNetFrameworkVersion. + 不支持指定的 .NET Framework 版本“{0}”。请指定来自枚举 Microsoft.Build.Utilities.TargetDotNetFrameworkVersion 的值。 + + + + Invalid Magic value in CLR Header + CLR 标头中存在无效的 Magic 值 + + + + Bad image format + 错误的图像格式 + + + + Private key expected + 应使用私钥 + + + + RSA key expected + 应使用 RSA 密钥 + + + + Invalid bit Length + 位长度无效 + + + + Invalid RSAParameters structure - '{{0}}' expected + RSAParameters 结构无效 - 应为“{{0}}” + + + + Invalid algId - 'Exponent' expected + algId 无效 - 应为 "Exponent" + + + + Invalid signature size + 签名大小无效 + + + + No signature directory + 无签名目录 + + + + Invalid Public Key blob + 公钥 Blob 无效 + + + + Exiting - too many errors + 正在退出 - 错误太多 + + + + The documentation file has no .xml suffix + 该文档文件不带 .xml 后缀 + + + + No implementation files specified + 未指定任何实现文件 + + + + The attribute {0} specified version '{1}', but this value is invalid and has been ignored + 属性 {0} 指定版本“{1}”,但此值无效,已被忽略 + + + + Conflicting options specified: 'win32manifest' and 'win32res'. Only one of these can be used. + 以下指定选项发生冲突: “win32manifest”和“win32res”。只能使用其中的一个选项。 + + + + The code in assembly '{0}' makes uses of quotation literals. Static linking may not include components that make use of quotation literals unless all assemblies are compiled with at least F# 4.0. + 程序集“{0}”中的代码使用了引用文本。静态链接可能不包含使用引用文本的组件,除非所有程序集都使用至少 F# 4.0 进行编译。 + + + + Code in this assembly makes uses of quotation literals. Static linking may not include components that make use of quotation literals unless all assemblies are compiled with at least F# 4.0. + 此程序集中的代码使用了引用文本。静态链接可能不包含使用引用文本的组件,除非所有程序集都使用至少 F# 4.0 进行编译。 + + + + Static linking may not include a .EXE + 静态链接不能包含 .EXE + + + + Static linking may not include a mixed managed/unmanaged DLL + 静态链接不能包含混合的托管/非托管 DLL + + + + Ignoring mixed managed/unmanaged assembly '{0}' during static linking + 在静态链接期间忽略混合托管/非托管程序集“{0}” + + + + Assembly '{0}' was referenced transitively and the assembly could not be resolved automatically. Static linking will assume this DLL has no dependencies on the F# library or other statically linked DLLs. Consider adding an explicit reference to this DLL. + 已通过可传递的方式引用程序集“{0}”,但未能自动解析此程序集。静态链接将假定此 DLL 不依赖于 F# 库或其他静态链接的 DLL。请考虑添加对此 DLL 的显式引用。 + + + + Assembly '{0}' not found in dependency set of target binary. Statically linked roots should be specified using an assembly name, without a DLL or EXE extension. If this assembly was referenced explicitly then it is possible the assembly was not actually required by the generated binary, in which case it should not be statically linked. + 在目标二进制文件的依赖项集中未找到程序集“{0}”。应使用不带扩展名 DLL 或 EXE 的程序集名称指定静态链接的根目录。如果已显式引用此程序集,则生成的二进制文件实际上可能不需要此程序集,在此情况下,不应静态链接此程序集。 + + + + The key file '{0}' could not be opened + 未能打开密钥文件“{0}” + + + + A problem occurred writing the binary '{0}': {1} + 写入二进制文件“{0}”时出现问题: {1} + + + + The 'AssemblyVersionAttribute' has been ignored because a version was given using a command line option + 已忽略“AssemblyVersionAttribute”,因为已使用命令行选项给定一个版本 + + + + Error emitting 'System.Reflection.AssemblyCultureAttribute' attribute -- 'Executables cannot be satellite assemblies, Culture should always be empty' + 发出“System.Reflection.AssemblyCultureAttribute”特性时出错:“可执行文件不能是附属程序集,区域应始终为空” + + + + Option '--delaysign' overrides attribute 'System.Reflection.AssemblyDelaySignAttribute' given in a source file or added module + 选项“--delaysign”将重写源文件或添加的模块中给定的“System.Reflection.AssemblyDelaySignAttribute”特性 + + + + Option '--keyfile' overrides attribute 'System.Reflection.AssemblyKeyFileAttribute' given in a source file or added module + 选项“--keyfile”将重写源文件或添加的模块中给定的“System.Reflection.AssemblyKeyFileAttribute”特性 + + + + Option '--keycontainer' overrides attribute 'System.Reflection.AssemblyNameAttribute' given in a source file or added module + 选项“--keycontainer”将重写源文件或添加的模块中给定的“System.Reflection.AssemblyNameAttribute”特性 + + + + The assembly '{0}' is listed on the command line. Assemblies should be referenced using a command line flag such as '-r'. + 程序集“{0}”已在命令行中列出。应使用命令行标志(如“-r”)引用程序集。 + + + + The resident compilation service was not used because a problem occured in communicating with the server. + 未使用驻留编译服务,因为与服务器通信时发生问题。 + + + + Problem with filename '{0}': Illegal characters in path. + 文件名“{0}”出现问题: 路径中存在非法字符。 + + + + Passing a .resx file ({0}) as a source file to the compiler is deprecated. Use resgen.exe to transform the .resx file into a .resources file to pass as a --resource option. If you are using MSBuild, this can be done via an <EmbeddedResource> item in the .fsproj project file. + 不推荐将 .resx 文件({0})作为源文件传递给编译器。请使用 resgen.exe 将 .resx 文件转换为 .resources 文件以作为 --resource 选项进行传递。如果您使用的是 MSBuild,则可以通过 .fsproj 项目文件中的 <EmbeddedResource> 项完成此操作。 + + + + Static linking may not be used on an assembly referencing mscorlib (e.g. a .NET Framework assembly) when generating an assembly that references System.Runtime (e.g. a .NET Core or Portable assembly). + 当生成引用 System.Runtime 的程序集(如 .NET Core 或 Portable 程序集)时,静态链接不能用在引用 mscorlib 的程序集(如 .NET Framework 程序集)上。 + + + + An {0} specified version '{1}', but this value is a wildcard, and you have requested a deterministic build, these are in conflict. + {0} 指定了版本“{1}”,但该值为通配符,并且你已请求确定的版本,因此存在冲突。 + + + + Determinstic builds only support portable PDBs (--debug:portable or --debug:embedded) + 确定性的生成仅支持可移植 PDB (--debug:portable 或 --debug:embedded) + + + + Character '{0}' is not allowed in provided namespace name '{1}' + 所提供的命名空间名称“{1}”中不允许出现字符“{0}” + + + + The provided type '{0}' returned a member with a null or empty member name + 所提供的类型“{0}”返回了具有 null 或空成员名称的成员 + + + + The provided type '{0}' returned a null member + 所提供的类型“{0}”返回了 null 成员 + + + + The provided type '{0}' member info '{1}' has null declaring type + 所提供的类型“{0}”成员信息“{1}”具有 null 声明类型 + + + + The provided type '{0}' has member '{1}' which has declaring type '{2}'. Expected declaring type to be the same as provided type. + 所提供的类型“{0}”的成员“{1}”具有声明类型“{2}”。声明类型应与所提供的类型相同。 + + + + Referenced assembly '{0}' has assembly level attribute '{1}' but no public type provider classes were found + 引用的程序集“{0}”具有程序集级别特性“{1}”,但是找不到任何公共类型提供程序类 + + + + Type '{0}' from type provider '{1}' has an empty namespace. Use 'null' for the global namespace. + 来自类型提供程序“{1}”的类型“{0}”具有空命名空间。请将“null”用于全局命名空间。 + + + + Empty namespace found from the type provider '{0}'. Use 'null' for the global namespace. + 在类型提供程序“{0}”中发现空命名空间。请将“null”用于全局命名空间。 + + + + Provided type '{0}' has 'IsGenericType' as true, but generic types are not supported. + 所提供的类型“{0}”的“IsGenericType”为 true,但是不支持泛型类型。 + + + + Provided type '{0}' has 'IsArray' as true, but array types are not supported. + 所提供的类型“{0}”的“IsArray”为 true,但是不支持数组类型。 + + + + Invalid member '{0}' on provided type '{1}'. Provided type members must be public, and not be generic, virtual, or abstract. + 所提供的类型“{1}”的成员“{0}”无效。所提供类型的成员必须是公共成员,而不是泛型、虚拟或抽象成员。 + + + + Invalid member '{0}' on provided type '{1}'. Only properties, methods and constructors are allowed + 所提供类型“{1}”的成员“{0}”无效。仅允许使用属性、方法和构造函数 + + + + Property '{0}' on provided type '{1}' has CanRead=true but there was no value from GetGetMethod() + 所提供的类型“{1}”的属性“{0}”的 CanRead 为 true,但是没有来自 GetGetMethod() 的值 + + + + Property '{0}' on provided type '{1}' has CanRead=false but GetGetMethod() returned a method + 所提供的类型“{1}”的属性“{0}”的 CanRead 为 false,但是 GetGetMethod() 返回了方法 + + + + Property '{0}' on provided type '{1}' has CanWrite=true but there was no value from GetSetMethod() + 所提供的类型“{1}”的属性“{0}”的 CanWrite 为 true,但是没有来自 GetSetMethod() 的值 + + + + Property '{0}' on provided type '{1}' has CanWrite=false but GetSetMethod() returned a method + 所提供的类型“{1}”的属性“{0}”的 CanWrite 为 false,但是 GetSetMethod() 返回了方法 + + + + One or more errors seen during provided type setup + 在所提供的类型的设置过程中出现了一个或多个错误 + + + + Unexpected exception from provided type '{0}' member '{1}': {2} + 在所提供类型“{0}”成员“{1}”中发生意外异常: {2} + + + + Unsupported constant type '{0}'. Quotations provided by type providers can only contain simple constants. The implementation of the type provider may need to be adjusted by moving a value declared outside a provided quotation literal to be a 'let' binding inside the quotation literal. + 不支持的常数类型“{0}”。类型提供程序提供的引文只能包含简单常量。将提供的引文文本外声明的值移动为引文文本内的 "let" 绑定,可对类型提供程序的实现进行调整。 + + + + Unsupported expression '{0}' from type provider. If you are the author of this type provider, consider adjusting it to provide a different provided expression. + 类型提供程序提供的表达式“{0}”不受支持。如果您是此类型提供程序的作者,请考虑将它调整为提供不同的提供表达式。 + + + + Expected provided type named '{0}' but provided type has 'Name' with value '{1}' + 需要名为“{0}”的提供的类型,但所提供类型的“Name”值为“{1}” + + + + Event '{0}' on provided type '{1}' has no value from GetAddMethod() + 所提供类型“{1}”上的事件“{0}”没有来自 GetAddMethod() 的值 + + + + Event '{0}' on provided type '{1}' has no value from GetRemoveMethod() + 所提供类型“{1}”上的事件“{0}”没有来自 GetRemoveMethod() 的值 + + + + Assembly attribute '{0}' refers to a designer assembly '{1}' which cannot be loaded or doesn't exist. {2} + 程序集特性“{0}”引用的设计器程序集“{1}”无法加载或不存在。{2} + + + + The type provider does not have a valid constructor. A constructor taking either no arguments or one argument of type 'TypeProviderConfig' was expected. + 类型提供程序没有有效的构造函数。构造函数应不采用参数或仅采用一个“TypeProviderConfig”类型的参数。 + + + + The type provider '{0}' reported an error: {1} + 类型提供程序“{0}”报告了错误: {1} + + + + The type provider '{0}' used an invalid parameter in the ParameterExpression: {1} + 类型提供程序“{0}”在 ParameterExpression 中使用了无效参数: {1} + + + + The type provider '{0}' provided a method with a name '{1}' and metadata token '{2}', which is not reported among its methods of its declaring type '{3}' + 类型提供程序“{0}”提供了具有名称“{1}”和元数据标记“{2}”的方法,该方法不会在声明类型“{3}”的方法中进行报告 + + + + The type provider '{0}' provided a constructor which is not reported among the constructors of its declaring type '{1}' + 类型提供程序“{0}”提供的构造函数未在声明类型为“{1}”的构造函数中进行报告 + + + + A direct reference to the generated type '{0}' is not permitted. Instead, use a type definition, e.g. 'type TypeAlias = <path>'. This indicates that a type provider adds generated types to your assembly. + 不允许直接引用生成的类型“{0}”。而应使用类型定义,例如“type TypeAlias = <路径>”。这指示类型提供程序将生成的类型添加到您的程序集中。 + + + + Expected provided type with path '{0}' but provided type has path '{1}' + 需要路径为“{0}”的提供的类型,但所提供类型的路径为“{1}” + + + + Unexpected 'null' return value from provided type '{0}' member '{1}' + 来自所提供类型“{0}”成员“{1}”的意外“null”返回值 + + + + Unexpected exception from member '{0}' of provided type '{1}' member '{2}': {3} + 在所提供类型“{1}”成员“{2}”的成员“{0}”中发生意外异常: {3} + + + + Nested provided types do not take static arguments or generic parameters + 所提供的嵌套类型未采用静态实参或泛型形参 + + + + Invalid static argument to provided type. Expected an argument of kind '{0}'. + 所提供类型的静态参数无效。应是类型为“{0}”的参数。 + + + + An error occured applying the static arguments to a provided type + 将静态参数应用于所提供类型时发生错误 + + + + Unknown static argument kind '{0}' when resolving a reference to a provided type or method '{1}' + 解析对所提供类型或方法“{1}”的引用时出现未知静态参数类型“{0}” + + + + invalid namespace for provided type + 所提供类型的命名空间无效 + + + + invalid full name for provided type + 所提供类型的全名无效 + + + + The type provider returned 'null', which is not a valid return value from '{0}' + 类型提供程序返回了“null”,这不是来自“{0}”的有效返回值 + + + + The type provider constructor has thrown an exception: {0} + 类型提供程序构造函数引发异常: {0} + + + + Type provider '{0}' returned null from GetInvokerExpression. + 类型提供程序“{0}”从 GetInvokerExpression 返回了 null。 + + + + The type provider '{0}' returned an invalid type from 'ApplyStaticArguments'. A type with name '{1}' was expected, but a type with name '{2}' was returned. + 类型提供程序“{0}”从“ApplyStaticArguments”返回了无效类型。需要名称为“{1}”的类型,但返回了名称为“{2}”的类型。 + + + + The type provider '{0}' returned an invalid method from 'ApplyStaticArgumentsForMethod'. A method with name '{1}' was expected, but a method with name '{2}' was returned. + 类型提供程序“{0}”从 "ApplyStaticArgumentsForMethod" 返回了无效方法。需要名称为“{1}”的方法,但返回了名称为“{2}”的方法。 + + + + This type test or downcast will erase the provided type '{0}' to the type '{1}' + 此类型测试或向下转换会将提供的类型“{0}”清除为类型“{1}”。 + + + + This downcast will erase the provided type '{0}' to the type '{1}'. + 此向下转换会将所提供类型“{0}”清除到类型“{1}”。 + + + + This type test with a provided type '{0}' is not allowed because this provided type will be erased to '{1}' at runtime. + 不允许对提供的类型“{0}”执行此类型测试,因为该提供的类型在运行时将清除为“{1}”。 + + + + Cannot inherit from erased provided type + 无法从已清除的提供的类型中继承 + + + + Assembly '{0}' hase TypeProviderAssembly attribute with invalid value '{1}'. The value should be a valid assembly name + 程序集“{0}”的 TypeProviderAssembly 特性具有无效值“{1}”。该值应为有效的程序集名称 + + + + Invalid member name. Members may not have name '.ctor' or '.cctor' + 成员名称无效。成员名称不能为“.ctor”或“.cctor” + + + + The function or member '{0}' is used in a way that requires further type annotations at its definition to ensure consistency of inferred types. The inferred signature is '{1}'. + 函数或成员“{0}”的使用方式要求其在定义中提供进一步的类型批注,以确保推理类型的一致性。推理签名为“{1}”。 + + + + The number of type arguments did not match: '{0}' given, '{1}' expected. This may be related to a previously reported error. + 类型参数的数量不匹配: 提供了“{0}”个,应是“{1}”个。这可能与以前报告的错误有关。 + + + + Cannot override inherited member '{0}' because it is sealed + 无法重写继承的成员“{0}”,因为该成员是密封的 + + + + The type provider '{0}' reported an error in the context of provided type '{1}', member '{2}'. The error: {3} + 类型提供程序“{0}”在所提供类型“{1}”、成员“{2}”的上下文中报告了错误。错误: {3} + + + + An exception occurred when accessing the '{0}' of a provided type: {1} + 访问所提供类型的“{0}”时发生异常: {1} + + + + The '{0}' of a provided type was null or empty. + 所提供类型的“{0}”为 null 或为空。 + + + + Character '{0}' is not allowed in provided type name '{1}' + 所提供的类型名称“{1}”中不允许出现字符“{0}” + + + + In queries, '{0}' must use a simple pattern + 在查询中,“{0}”必须使用简单模式 + + + + A custom query operation for '{0}' is required but not specified + 需要“{0}”的自定义查询运算,但未指定该运算 + + + + Named static arguments must come after all unnamed static arguments + 命名静态参数必须位于所有未命名静态参数之后 + + + + The static parameter '{0}' of the provided type or method '{1}' requires a value. Static parameters to type providers may be optionally specified using named arguments, e.g. '{2}<{3}=...>'. + 提供的类型或方法“{1}”的静态参数“{0}”需要一个值。类型提供程序的静态参数可以选择使用命名参数指定,例如“{2}<{3}=...>”。 + + + + No static parameter exists with name '{0}' + 不存在名称为“{0}”的静态参数 + + + + The static parameter '{0}' has already been given a value + 已向静态参数“{0}”提供了值 + + + + Multiple static parameters exist with name '{0}' + 存在多个名称为“{0}”的静态参数 + + + + A custom operation may not be used in conjunction with a non-value or recursive 'let' binding in another part of this computation expression + 在此计算表达式的其他部分,不能与非值或递归“let”绑定一起使用自定义运算符 + + + + A custom operation may not be used in conjunction with 'use', 'try/with', 'try/finally', 'if/then/else' or 'match' operators within this computation expression + 在此计算表达式中,不能与“use”、“try/with”、“try/finally”、“if/then/else”或“match”运算符一起使用自定义运算 + + + + The custom operation '{0}' refers to a method which is overloaded. The implementations of custom operations may not be overloaded. + 自定义运算“{0}”引用了重载的方法。自定义运算的实现不能进行重载。 + + + + An if/then/else expression may not be used within queries. Consider using either an if/then expression, or use a sequence expression instead. + if/then/else 表达式不能在查询中使用。请考虑使用 if/then 表达式,或改用序列表达式。 + + + + Invalid argument to 'methodhandleof' during codegen + codegen 过程中出现无效“methodhandleof”参数 + + + + A reference to a provided type was missing a value for the static parameter '{0}'. You may need to recompile one or more referenced assemblies. + 对所提供类型的引用缺少静态参数“{0}”的值。可能需要重新编译一个或多个引用的程序集。 + + + + A reference to a provided type had an invalid value '{0}' for a static parameter. You may need to recompile one or more referenced assemblies. + 对所提供类型的引用具有无效的静态参数值“{0}”。可能需要重新编译一个或多个引用的程序集。 + + + + '{0}' is not used correctly. This is a custom operation in this query or computation expression. + “{0}”使用有误。这是此查询或计算表达式中的自定义运算。 + + + + '{0}' is not used correctly. Usage: {1}. This is a custom operation in this query or computation expression. + “{0}”使用有误。用法: {1}。这是此查询或计算表达式中的自定义运算。 + + + + {0} var in collection {1} (outerKey = innerKey). Note that parentheses are required after '{2}' + {0} var in collection {1} (outerKey = innerKey)。请注意,“{2}”后需使用括号 + + + + {0} var in collection {1} (outerKey = innerKey) into group. Note that parentheses are required after '{2}' + {0} var in collection {1} (outerKey = innerKey) into group。请注意,“{2}”后需使用括号。 + + + + {0} var in collection + {0} var in collection + + + + '{0}' must be followed by a variable name. Usage: {1}. + “{0}”后面必须跟变量名。用法: {1}。 + + + + Incorrect syntax for '{0}'. Usage: {1}. + “{0}”的语法不正确。用法: {1}。 + + + + '{0}' must come after a 'for' selection clause and be followed by the rest of the query. Syntax: ... {1} ... + “{0}”的前面必须是“for”选择子句,后面必须是查询的剩余部分。语法: ... {1} ... + + + + '{0}' is used with an incorrect number of arguments. This is a custom operation in this query or computation expression. Expected {1} argument(s), but given {2}. + “{0}”使用的参数数量有误。这是此查询或计算表达式中的自定义运算。应为 {1} 个参数,但提供了 {2} 个。 + + + + Expected an expression after this point + 此点之后应是表达式 + + + + Expected a type after this point + 此点之后应是类型 + + + + Unmatched '[<'. Expected closing '>]' + 不匹配的“[<”。应为结束“>]” + + + + Unexpected end of input in 'match' expression. Expected 'match <expr> with | <pat> -> <expr> | <pat> -> <expr> ...'. + “match”表达式中出现意外的输入结尾。应为“match <表达式> with | <分区> -> <表达式> | <分区> -> <表达式> ...”。 + + + + Unexpected end of input in 'try' expression. Expected 'try <expr> with <rules>' or 'try <expr> finally <expr>'. + “try”表达式中出现意外的输入结尾。应为“try <表达式> with <规则>”或“try <表达式> finally <表达式>”。 + + + + Unexpected end of input in 'while' expression. Expected 'while <expr> do <expr>'. + “while”表达式中出现意外的输入结尾。应为“while <表达式> do <表达式>”。 + + + + Unexpected end of input in 'for' expression. Expected 'for <pat> in <expr> do <expr>'. + “for”表达式中出现意外的输入结尾。应为“for <模式> in <表达式> do <表达式>”。 + + + + Unexpected end of input in 'match' or 'try' expression + “match”或“try”表达式中出现意外的输入结尾 + + + + Unexpected end of input in 'then' branch of conditional expression. Expected 'if <expr> then <expr>' or 'if <expr> then <expr> else <expr>'. + 条件表达式的“then”分支中出现意外的输入结尾。应为“if <表达式> then <表达式>”或“if <表达式> then <表达式> else <表达式>”。 + + + + Unexpected end of input in 'else' branch of conditional expression. Expected 'if <expr> then <expr>' or 'if <expr> then <expr> else <expr>'. + 条件表达式的“else”分支中出现意外的输入结尾。应为“if <表达式> then <表达式>”或“if <表达式> then <表达式> else <表达式>”。 + + + + Unexpected end of input in body of lambda expression. Expected 'fun <pat> ... <pat> -> <expr>'. + lambda 表达式体中出现意外的输入结尾。应为“fun <分区> ... <分区> -> <表达式>”。 + + + + Unexpected end of input in type arguments + 类型参数中出现意外的输入结尾 + + + + Unexpected end of input in type signature + 类型签名中出现意外的输入结尾 + + + + Unexpected end of input in type definition + 类型定义中出现意外的输入结尾 + + + + Unexpected end of input in object members + 对象成员中出现意外的输入结尾 + + + + Unexpected end of input in value, function or member definition + 值、函数或成员定义中出现意外的输入结尾 + + + + Unexpected end of input in expression + 表达式中出现意外的输入结尾 + + + + Unexpected end of type. Expected a name after this point. + 意外的类型结尾。此点之后应是名称。 + + + + Incomplete value or function definition. If this is in an expression, the body of the expression must be indented to the same column as the 'let' keyword. + 值或函数定义不完整。如果该定义处于表达式中,则表达式体必须与“let”关键字缩进到相同的列。 + + + + Incomplete value definition. If this is in an expression, the body of the expression must be indented to the same column as the 'let!' keyword. + 值定义不完整。如果该定义处于表达式中,则表达式体必须与“let!”关键字缩进到相同的列。 + + + + Incomplete value definition. If this is in an expression, the body of the expression must be indented to the same column as the 'use!' keyword. + 值定义不完整。如果该定义处于表达式中,则表达式体必须与“use!”关键字缩进到相同的列。 + + + + Incomplete value definition. If this is in an expression, the body of the expression must be indented to the same column as the 'use' keyword. + 值定义不完整。如果该定义处于表达式中,则表达式体必须与“use”关键字缩进到相同的列。 + + + + Missing 'do' in 'while' expression. Expected 'while <expr> do <expr>'. + “while”表达式中缺少“do”。应为“while <表达式> do <表达式>”。 + + + + Missing 'do' in 'for' expression. Expected 'for <pat> in <expr> do <expr>'. + “for”表达式中缺少“do”。应为“for <模式> in <表达式> do <表达式>”。 + + + + Invalid join relation in '{0}'. Expected 'expr <op> expr', where <op> is =, =?, ?= or ?=?. + “{0}”中的联接关系无效。应为“expr <op> expr”,其中 <op> 为 =、=?、?= 或 ?=?。 + + + + Calls + 调用 + + + + Invalid number of generic arguments to type '{0}' in provided type. Expected '{1}' arguments, given '{2}'. + 所提供类型中的类型“{0}”的泛型参数数量无效。应是“{1}”个参数,提供了“{2}”个。 + + + + Invalid value '{0}' for unit-of-measure parameter '{1}' + 度量单位参数“{1}”的值“{0}”无效 + + + + Invalid value unit-of-measure parameter '{0}' + 值度量单位参数“{0}”无效 + + + + Property '{0}' on provided type '{1}' is neither readable nor writable as it has CanRead=false and CanWrite=false + 所提供的类型“{1}”的属性“{0}”即不可读也不可写,因为该属性的 CanRead 为 false,且 CanWrite 也为 false + + + + A use of 'into' must be followed by the remainder of the computation + “into”的使用必须后跟计算的剩余部分 + + + + The operator '{0}' does not accept the use of 'into' + 运算符“{0}”不接受“into”的用法 + + + + The definition of the custom operator '{0}' does not use a valid combination of attribute flags + 自定义运算符“{0}”的定义未使用有效的特性标志组合 + + + + This type definition may not have the 'CLIMutable' attribute. Only record types may have this attribute. + 此类型定义不能具有“CLIMutable”特性。只有记录类型可以有此特性。 + + + + 'member val' definitions are only permitted in types with a primary constructor. Consider adding arguments to your type definition, e.g. 'type X(args) = ...'. + “member val”定义仅允许用于具有主构造函数的类型中。请考虑向您的类型定义添加参数,例如“type X(args) = ...”。 + + + + Property definitions may not be declared mutable. To indicate that this property can be set, use 'member val PropertyName = expr with get,set'. + 属性定义不能声明为可变。若要指示此属性可以进行设置,请使用“member val PropertyName = expr with get,set”。 + + + + To indicate that this property can be set, use 'member val PropertyName = expr with get,set'. + 若要指示此属性可以进行设置,请使用“member val PropertyName = expr with get,set”。 + + + + Type '{0}' is illegal because in byref<T>, T cannot contain byref types. + 类型“{0}”非法,因为在 byref<T> 中,T 不能包含 byref 类型。 + + + + F# supports array ranks between 1 and 32. The value {0} is not allowed. + F# 支持 1 到 32 之间的数组秩。不允许使用值 {0}。 + + + + In queries, use the form 'for x in n .. m do ...' for ranging over integers + 在查询中,应使用“for x in n .. m do ...”的形式处理整数范围 + + + + 'while' expressions may not be used in queries + “while”表达式不能在查询中使用 + + + + 'try/finally' expressions may not be used in queries + “try/finally”表达式不能在查询中使用 + + + + 'use' expressions may not be used in queries + “use”表达式不能在查询中使用 + + + + 'let!', 'use!' and 'do!' expressions may not be used in queries + “let!”、“use!”和“do!”表达式不能用于查询中 + + + + 'return' and 'return!' may not be used in queries + “return”和“return!”不能在查询中使用 + + + + This is not a known query operator. Query operators are identifiers such as 'select', 'where', 'sortBy', 'thenBy', 'groupBy', 'groupValBy', 'join', 'groupJoin', 'sumBy' and 'averageBy', defined using corresponding methods on the 'QueryBuilder' type. + 这不是已知的查询运算符。查询运算符是使用“QueryBuilder”类型的对应方法定义的标识符,如“select”、“where”、“sortBy”、“thenBy”、“groupBy”、“groupValBy”、“join”、“groupJoin”、“sumBy”和“averageBy”。 + + + + 'try/with' expressions may not be used in queries + “try/with”表达式不能在查询中使用 + + + + This 'let' definition may not be used in a query. Only simple value definitions may be used in queries. + 此“let”定义不能在查询中使用。查询中只能使用简单值定义。 + + + + Too many static parameters. Expected at most {0} parameters, but got {1} unnamed and {2} named parameters. + 静态参数太多。最多应为 {0} 个参数,但是获得了 {1} 个未命名参数和 {2} 个命名参数。 + + + + Invalid provided literal value '{0}' + 所提供文本值“{0}”无效 + + + + The 'anycpu32bitpreferred' platform can only be used with EXE targets. You must use 'anycpu' instead. + “anycpu32bitpreferred”平台只能用于 EXE 目标。必须改用“anycpu”。 + + + + This member, function or value declaration may not be declared 'inline' + 此成员、函数或值声明不能声明为“inline” + + + + The provider '{0}' returned a non-generated type '{1}' in the context of a set of generated types. Consider adjusting the type provider to only return generated types. + 提供程序“{0}”在一组生成类型的上下文中返回了非生成类型“{1}”。请考虑调整类型提供程序以仅返回生成类型。 + + + + Arguments to query operators may require parentheses, e.g. 'where (x > y)' or 'groupBy (x.Length / 10)' + 查询运算符的参数可能需要括号,例如“where (x > y)”或“groupBy (x.Length / 10)” + + + + A quotation may not involve an assignment to or taking the address of a captured local variable + 引号可能不涉及对捕获的本地变量赋值或获取其地址 + + + + + 1 overload + + 1 重载 + + + + + {0} overloads + + {0} 重载 + + + + Erased to + 已清除到的位置 + + + + Unexpected token '{0}' or incomplete expression + 意外的标记“{0}”或不完整的表达式 + + + + Cannot find code target for this attribute, possibly because the code after the attribute is incomplete. + 无法找到此特性的代码目标,可能是因为此特性后面的代码不完整。 + + + + Type name cannot be empty. + 类型名不能是空的。 + + + + Problem reading assembly '{0}': {1} + 读取程序集“{0}”时出现问题: {1} + + + + Invalid provided field. Provided fields of erased provided types must be literals. + 提供的字段无效。属于已清除的提供类型的提供字段必须为文本。 + + + + (loading description...) + (正在加载说明...) + + + + (description unavailable...) + (说明不可用...) + + + + A type variable has been constrained by multiple different class types. A type variable may only have one class constraint. + 一个类型变量已由多个不同的类类型进行约束。一个类型变量只能有一个类约束。 + + + + 'match' expressions may not be used in queries + “match”表达式不能在查询中使用 + + + + Infix operator member '{0}' has {1} initial argument(s). Expected a tuple of 3 arguments + 中缀运算符成员“{0}”具有 {1} 个初始参数。需要一个由 3 个参数构成的元组。 + + + + The operator '{0}' cannot be resolved. Consider opening the module 'Microsoft.FSharp.Linq.NullableOperators'. + 无法解析运算符“{0}”。请考虑打开模块“Microsoft.FSharp.Linq.NullableOperators”。 + + + + '{0}' must be followed by 'in'. Usage: {1}. + “{0}”后面必须跟“in”。用法: {1}。 + + + + Neither 'member val' nor 'override val' definitions are permitted in object expressions. + 对象表达式中既不允许使用“member val”定义也不允许使用“override val”定义。 + + + + Copy-and-update record expressions must include at least one field. + 复制和更新记录表达式必须包含至少一个字段。 + + + + '_' cannot be used as field name + “_”不能用作字段名称 + + + + The provided types generated by this use of a type provider may not be used from other F# assemblies and should be marked internal or private. Consider using 'type internal TypeName = ...' or 'type private TypeName = ...'. + 通过这种类型提供程序使用方式生成的提供的类型不能从其他 F# 程序集使用,应标记为内部或私有的。请考虑使用“type internal TypeName = ...”或“type private TypeName = ...”。 + + + + A property's getter and setter must have the same type. Property '{0}' has getter of type '{1}' but setter of type '{2}'. + 属性的 Getter 和 Setter 的类型必须相同。属性“{0}”的 Getter 的类型为“{1}”,而 Setter 的类型为“{2}”。 + + + + Array method '{0}' is supplied by the runtime and cannot be directly used in code. For operations with array elements consider using family of GetArray/SetArray functions from LanguagePrimitives.IntrinsicFunctions module. + 数组方法“{0}”由运行时提供且不能直接在代码中使用。对于带数组元素的操作,请考虑使用 LanguagePrimitives.IntrinsicFunctions 模块中的 GetArray/SetArray 函数系列。 + + + + The union case '{0}' does not have a field named '{1}'. + 联合用例/异常“{0}”没有名为“{1}”的字段。 + + + + Union case/exception field '{0}' cannot be used more than once. + 无法多次使用联合用例/异常字段“{0}”。 + + + + Named field '{0}' is used more than once. + 命名字段“{0}”多次被使用。 + + + + Named field '{0}' conflicts with autogenerated name for anonymous field. + 命名字段“{0}”与匿名字段的自动生成名称发生冲突。 + + + + This literal expression or attribute argument results in an arithmetic overflow. + 此文本表达式或特性参数会导致算术溢出。 + + + + This is not valid literal expression. The [<Literal>] attribute will be ignored. + 这不是有效的文本表达式。将忽略 [<Literal>] 特性。 + + + + System.Runtime.InteropServices assembly is required to use UnknownWrapper\DispatchWrapper classes. + 要使用 UnknownWrapper\DispatchWrapper 类,System.Runtime.InteropServices 程序集是必须的。 + + + + The mutable local '{0}' is implicitly allocated as a reference cell because it has been captured by a closure. This warning is for informational purposes only to indicate where implicit allocations are performed. + 可变本地变量“{0}”隐式分配为引用单元格,因为它已由关闭事件捕获。此警告只是为了提供信息,用于指示执行了隐式分配的情况。 + + + + A type provider implemented GetStaticParametersForMethod, but ApplyStaticArgumentsForMethod was not implemented or invalid + 一个类型提供程序实现了 GetStaticParametersForMethod,但是 ApplyStaticArgumentsForMethod 未实现或无效 + + + + An error occured applying the static arguments to a provided method + 将静态参数应用于提供的方法时发生错误 + + + + Unexpected character '{0}' in preprocessor expression + 预处理器表达式中意外的字符“{0}” + + + + Unexpected token '{0}' in preprocessor expression + 预处理器表达式中意外的标记“{0}” + + + + Incomplete preprocessor expression + 不完整的预处理器表达式 + + + + Missing token '{0}' in preprocessor expression + 预处理器表达式中缺少的标记“{0}” + + + + An error occurred while reading the F# metadata node at position {0} in table '{1}' of assembly '{2}'. The node had no matching declaration. Please report this warning. You may need to recompile the F# assembly you are using. + 于程序集“{2}”的表“{1}”中的位置 {0} 处读取 F# 元数据节点时出错。该节点没有匹配的声明。请报告此警告。你可能需要重新编译正在使用的 F# 程序集。 + + + + Type inference caused the type variable {0} to escape its scope. Consider adding an explicit type parameter declaration or adjusting your code to be less generic. + 类型推理使类型变量 {0} 逸出其范围。请考虑添加显示类型参数声明或调整代码使其通用性降低。 + + + + Type inference caused an inference type variable to escape its scope. Consider adding type annotations to make your code less generic. + 类型推理使推理类型变量逸出其范围。请考虑添加类型批注,使代码通用性降低。 + + + + Redundant arguments are being ignored in function '{0}'. Expected {1} but got {2} arguments. + 冗余参数在函数“{0}”中被忽略。期望 {1} 但获得 {2} 参数。 + + + + Lowercase literal '{0}' is being shadowed by a new pattern with the same name. Only uppercase and module-prefixed literals can be used as named patterns. + 小写文字“{0}”被具有相同名称的新模式隐藏。只有大写文字和模块作为前缀的文字可以用作命名模式。 + + + + This literal pattern does not take arguments + 此文本模式不带有参数 + + + + Constructors are not permitted as extension members - they must be defined as part of the original definition of the type + 不允许将构造函数作为扩展成员 - 必须将它们定义为类型原始定义的一部分 + + + + Invalid response file '{0}' ( '{1}' ) + 无效的响应文件“{0}”(“{1}”) + + + + Response file '{0}' not found in '{1}' + 在“{1}”中找不到响应文件“{0}” + + + + Response file name '{0}' is empty, contains invalid characters, has a drive specification without an absolute path, or is too long + 响应文件名“{0}”为空,包含无效字符,具有没有绝对路径的驱动器规格,或过长 + + + + Cannot find FSharp.Core.dll in compiler's directory + 在编译器目录中找不到 FSharp.Core.dll + + + + One tuple type is a struct tuple, the other is a reference tuple + 有一个元组类型是结构元组,而另一个则是引用元组 + + + + This provided method requires static parameters + 所提供方法需要静态参数 + + + + The conversion from {0} to {1} is a compile-time safe upcast, not a downcast. Consider using 'upcast' instead of 'downcast'. + 从 {0} 到 {1} 的转换是编译时安全的向上转换,而非向下转换。考虑使用 "upcast",而非 "downcast"。 + + + + The conversion from {0} to {1} is a compile-time safe upcast, not a downcast. Consider using the :> (upcast) operator instead of the :?> (downcast) operator. + 从 {0} 到 {1} 的转换是编译时安全的向上转换,而非向下转换。考虑使用 :> (向上转换)运算符,而非 :?> (向下转换)运算符。 + + + + The 'rec' on this module is implied by an outer 'rec' declaration and is being ignored + 此模块上的 "rec" 由外部 "rec" 声明暗示,正被忽略 + + + + In a recursive declaration group, 'open' declarations must come first in each module + 在递归声明组中,"open" 声明必须位于每个模块的首位 + + + + In a recursive declaration group, module abbreviations must come after all 'open' declarations and before other declarations + 在递归声明组中,模块缩写必须处于所有 "open" 声明之后,并且在其他声明之前 + + + + This declaration is not supported in recursive declaration groups + 递归声明组中不支持此声明 + + + + Invalid use of 'rec' keyword + 无效的 "rec" 关键字使用 + + + + If a union type has more than one case and is a struct, then all fields within the union type must be given unique names. + 如果联合类型有多个用例且为结构,则必须赋予此联合类型中的所有字段唯一的名称。 + + + + The CallerMemberNameAttribute applied to parameter '{0}' will have no effect. It is overridden by the CallerFilePathAttribute. + 应用于参数“{0}”的 CallerMemberNameAttribute 不会起作用。它已由 CallerFilePathAttribute 替代。 + + + + Invalid use of 'fixed'. 'fixed' may only be used in a declaration of the form 'use x = fixed expr' where the expression is an array, the address of a field, the address of an array element or a string' + 无效的 "fixed" 使用。"fixed" 只能用在 "use x = fixed expr" 形式的声明中,其中表达式为数组、字段的地址、数组元素或字符串的地址 + + + + Could not find method System.Runtime.CompilerServices.OffsetToStringData in references when building 'fixed' expression. + 生成 "fixed" 表达式时,在引用中找不到方法 System.Runtime.CompilerServices.OffsetToStringData。 + + + + {0} is an active pattern and cannot be treated as a discriminated union case with named fields. + {0} 为活动模式,不能将其作为带命名字段的可区分联合用例。 + + + + The default value does not have the same type as the argument. The DefaultParameterValue attribute and any Optional attribute will be ignored. Note: 'null' needs to be annotated with the correct type, e.g. 'DefaultParameterValue(null:obj)'. + 默认值与参数的类型不同。将忽略 DefaultParameterValue 属性以及任何可选属性。注意: "null" 需要用正确的类型进行批注,例如 "DefaultParameterValue(null:obj)"。 + + + + The system type '{0}' was required but no referenced system DLL contained this type + 需要系统类型“{0}”,但没有引用系统 DLL 包含此类型 + + + + The member '{0}' matches multiple overloads of the same method.\nPlease restrict it to one of the following:{1}. + 成员“{0}”与同一方法的多个重载匹配。\n请将其限制为下面其中一项: {1}。 + + + + Method or object constructor '{0}' is not static + 方法或对象构造函数“{0}”不是静态的 + + + + Unexpected symbol '=' in expression. Did you intend to use 'for x in y .. z do' instead? + 表达式中出现意外符号 "="。是否想要改用 "for x in y .. z do"? + + + + Indicates a method that either has no implementation in the type in which it is declared or that is virtual and has a default implementation. + 表示一种方法,该方法在进行声明的类型中没有任何实现,或该方法为虚拟方法且包含默认实现。 + + + + Used in mutually recursive bindings, in property declarations, and with multiple constraints on generic parameters. + 用于互相递归绑定、属性声明,并用于对泛型参数的多个约束。 + + + + Used to give the current class object an object name. Also used to give a name to a whole pattern within a pattern match. + 用于向当前类对象提供对象名称。另外,也用于向模式匹配中的整个模式提供名称。 + + + + Used to verify code during debugging. + 用于在调试期间验证代码。 + + + + Used as the name of the base class object. + 用作基类对象的名称。 + + + + In verbose syntax, indicates the start of a code block. + 在详细语法中,指示程序块的开头。 + + + + In verbose syntax, indicates the start of a class definition. + 在详细语法中,表示类定义的开头。 + + + + Indicates an implementation of an abstract method; used together with an abstract method declaration to create a virtual method. + 表示抽象方法的实现;与抽象方法声明配合使用可创建虚拟方法。 + + + + Used to declare a delegate. + 用于声明委托。 + + + + Used in looping constructs or to execute imperative code. + 用于循环构造或执行强制性代码。 + + + + In verbose syntax, indicates the end of a block of code in a looping expression. + 在详细语法中,表示循环表达式中程序块的结尾。 + + + + Used to convert to a type that is lower in the inheritance chain. + 用于转换为较低继承链中的类型。 + + + + In a for expression, used when counting in reverse. + 在 for 表达式中,在反向计数时使用。 + + + + Used in conditional branching. A short form of else if. + 用于条件性分支。Else if 的缩写形式。 + + + + Used in conditional branching. + 用于条件性分支。 + + + + In type definitions and type extensions, indicates the end of a section of member definitions. In verbose syntax, used to specify the end of a code block that starts with the begin keyword. + 在类型定义和类型扩展中,表示成员定义的某部分的结尾。在详细语法中,用于指定以 begin 关键字开头的程序块的结尾。 + + + + Used to declare an exception type. + 用于声明异常类型。 + + + + Indicates that a declared program element is defined in another binary or assembly. + 表示声明的计划元素在其他二进制文件或程序集中定义。 + + + + Used as a Boolean literal. + 用作布尔文本 + + + + Used together with try to introduce a block of code that executes regardless of whether an exception occurs. + 与 try 配合使用,以引入无论是否发生异常都将执行的代码块。 + + + + Used in looping constructs. + 用于循环构造。 + + + + Used in lambda expressions, also known as anonymous functions. + 用于 lambda 表达式,也称为异步函数。 + + + + Used as a shorter alternative to the fun keyword and a match expression in a lambda expression that has pattern matching on a single argument. + 用作 fun 关键字的更短替代项以及 lambda 表达式中具有单个参数模式匹配的匹配表达式。 + + + + Used to reference the top-level .NET namespace. + 用于引用顶级 .NET 命名空间。 + + + + Used in conditional branching constructs. + 用于条件性分支构造。 + + + + Used for sequence expressions and, in verbose syntax, to separate expressions from bindings. + 用于序列表达式,并且在详细语法中,用于分隔绑定中的表达式。 + + + + Used to specify a base class or base interface. + 用于指定基类或基接口。 + + + + Used to indicate a function that should be integrated directly into the caller's code. + 用于表示应直接集成到调用方代码中的函数。 + + + + Used to declare and implement interfaces. + 用于声明和实现接口。 + + + + Used to specify that a member is visible inside an assembly but not outside it. + 用于指定某成员在程序集内可见,但在程序集外不可见。 + + + + Used to specify a computation that is to be performed only when a result is needed. + 用于指定仅当需要结果时要执行的计算。 + + + + Used to associate, or bind, a name to a value or function. + 用于将名称关联或绑定到值或函数。 + + + + Used in computation expressions to bind a name to the result of another computation expression. + 在异步工作流中用于将名称绑定到异步计算的结果,或在其他计算表达式中,用于将名称绑定到属于计算类型的结果。 + + + + Used to branch by comparing a value to a pattern. + 用于通过比较值与模式来进行分支。 + + + + Used to declare a property or method in an object type. + 用于声明对象类型中的属性或方法。 + + + + Used to associate a name with a group of related types, values, and functions, to logically separate it from other code. + 用于将名称与一组相关类型、值和函数关联,从逻辑上将其与其他代码分开。 + + + + Used to declare a variable, that is, a value that can be changed. + 用于声明变量,即可更改的值。 + + + + Used to associate a name with a group of related types and modules, to logically separate it from other code. + 用于将名称与一组相关类型和模块关联,从逻辑上将其与其他代码分开。 + + + + Used to declare, define, or invoke a constructor that creates or that can create an object. Also used in generic parameter constraints to indicate that a type must have a certain constructor. + 用于声明、定义或调用创建或可创建对象的构造函数。另外,也用于泛型参数约束,以表示类型必需包含某构造函数。 + + + + Not actually a keyword. However, not struct in combination is used as a generic parameter constraint. + 实际上不是关键字。但是,组合中的结构不会用作泛型参数约束。 + + + + Indicates the absence of an object. Also used in generic parameter constraints. + 表示缺少对象。另外,还用于泛型参数约束。 + + + + Used in discriminated unions to indicate the type of categories of values, and in delegate and exception declarations. + 在可区分的联合中用于表示值类别的类型,并用于委托和异常声明。 + + + + Used to make the contents of a namespace or module available without qualification. + 用于使命名空间或模块的内容无需限定即可使用。 + + + + Used with Boolean conditions as a Boolean or operator. Equivalent to ||. Also used in member constraints. + 与布尔条件配合使用,作为布尔值或运算符。相当于 ||。另外,也用于成员约束。 + + + + Used to implement a version of an abstract or virtual method that differs from the base version. + 用于实现与基础版本不同的抽象或虚拟方法的版本。 + + + + Restricts access to a member to code in the same type or module. + 限制成员使用相同类型或模块编码的权限。 + + + + Allows access to a member from outside the type. + 允许访问类型外的成员。 + + + + Used to indicate that a function is recursive. + 用于表示某函数为递归函数。 + + + + Used to provide a value for the result of the containing computation expression. + 用于表示一个可作为计算表达式的结果提供的值。 + + + + Used to provide a value for the result of the containing computation expression, where that value itself comes from the result another computation expression. + 用于表示一种计算表达式,该表达式在计算时,提供包含计算表达式的结果。 + + + + Used in query expressions to specify what fields or columns to extract. Note that this is a contextual keyword, which means that it is not actually a reserved word and it only acts like a keyword in appropriate context. + 在查询表达式中用于指定要提取的字段或列。注意,这是上下文关键字,意味着它实际上并不是保留字,而只会充当相应上下文中的关键字。 + + + + Used to indicate a method or property that can be called without an instance of a type, or a value member that is shared among all instances of a type. + 用于表示可在没有类型实例的情况下调用的方法或属性,或者在某类型的所有实例中共享的值成员。 + + + + Used to declare a structure type. Also used in generic parameter constraints. Used for OCaml compatibility in module definitions. + 用于声明结构类型。另外,也用于泛型参数约束。用于模块定义中的 OCaml 兼容性。 + + + + Used in conditional expressions. Also used to perform side effects after object construction. + 用于条件表达式。另外,也用于处理构造对象后的意外结果。 + + + + Used in for loops to indicate a range. + 在 for 循环中用于表示范围。 + + + + Used to introduce a block of code that might generate an exception. Used together with with or finally. + 用于引入可能产生异常的代码块。与 with 或 finally 配合使用。 + + + + Used to declare a class, record, structure, discriminated union, enumeration type, unit of measure, or type abbreviation. + 用于声明类、记录、结构、可区分的联合、枚举类型、度量单位或类型缩写。 + + + + Used to convert to a type that is higher in the inheritance chain. + 用于转换为较高继承链中的类型。 + + + + Used instead of let for values that implement IDisposable" + 用于替代 let,以便要求 Dispose 的值可调用到免费资源。 + + + + Used instead of let! in computation expressions for computation expression results that implement IDisposable. + 用于替代异步工作流和其他计算表达式中的 let!,以便要求 Dispose 的值可调用到免费资源。 + + + + Used in a signature to indicate a value, or in a type to declare a member, in limited situations. + 在签名中用于表示值,或在类型中用于声明成员,但情况有限。 + + + + Indicates the .NET void type. Used when interoperating with other .NET languages. + 表示 .NET void 类型。在与其他 .NET 语言交互操作时使用。 + + + + Used for Boolean conditions (when guards) on pattern matches and to introduce a constraint clause for a generic type parameter. + 用于模式匹配的布尔条件(临界时)以及用于引入泛型类型参数的约束子句。 + + + + Introduces a looping construct. + 引入循环构造。 + + + + Used together with the match keyword in pattern matching expressions. Also used in object expressions, record copying expressions, and type extensions to introduce member definitions, and to introduce exception handlers. + 在模式匹配表达式中与 match 关键字配合使用。此外,也用于在对象表达式、记录复制表达式和类型扩展,以引入成员定义和异常处理程序。 + + + + Used in a sequence expression to produce a value for a sequence. + 在序列表达式中用于产生序列的值。 + + + + Used in a computation expression to append the result of a given computation expression to a collection of results for the containing computation expression. + 在计算表达式中用于将给定计算表达式的结果追加到包含计算表达式的结果集合。 + + + + In function types, delimits arguments and return values. Yields an expression (in sequence expressions); equivalent to the yield keyword. Used in match expressions + 在函数类型中,分隔参数并返回值。生成表达式(在序列表达式中);相当于 yield 关键字。用于匹配表达式中。 + + + + Assigns a value to a variable. + 将一个值赋予变量。 + + + + Converts a type to type that is higher in the hierarchy. + 将某类型转换为较高层次结构中的类型。 + + + + Converts a type to a type that is lower in the hierarchy. + 将某类型转换为较低层次结构中的类型。 + + + + Delimits a typed code quotation. + 分隔泛型代码引用。 + + + + Delimits a untyped code quotation. + 分隔泛型代码引用。 + + + + {0} '{1}' not found in assembly '{2}'. A possible cause may be a version incompatibility. You may need to explicitly reference the correct version of this assembly to allow all referenced components to use the correct version. + {0} 程序集“{2}”中找不到“{1}”。可能的原因或许是版本不兼容。可能需要显式引用此程序集的正确版本,以便所有引用的组件都能使用正确的版本。 + + + + {0} '{1}' not found in type '{2}' from assembly '{3}'. A possible cause may be a version incompatibility. You may need to explicitly reference the correct version of this assembly to allow all referenced components to use the correct version. + {0} 从程序集“{3}”的类型“{2}”中找不到“{1}”。可能的原因或许是版本不兼容。可能需要显式引用此程序集的正确版本,以便所有引用的组件都能使用正确的版本。 + + + + is + + + + + This value is not a function and cannot be applied. + 此值不是一个函数,无法应用。 + + + + This value is not a function and cannot be applied. Did you intend to access the indexer via {0}.[index] instead? + 此值不是一个函数,无法应用。是否曾打算改为通过 {0}.[index] 访问索引器? + + + + This expression is not a function and cannot be applied. Did you intend to access the indexer via expr.[index] instead? + 此值不是一个函数,无法应用。是否曾打算改为通过 expr.[index] 访问索引器? + + + + This value is not a function and cannot be applied. Did you forget to terminate a declaration? + 此值不是一个函数,无法应用。您是否忘记结束某个声明? + + + + The argument names in the signature '{0}' and implementation '{1}' do not match. The argument name from the signature file will be used. This may cause problems when debugging or profiling. + 签名“{0}”和实现“{1}”中的参数名称不匹配。将使用签名文件中的参数名称。在进行调试或分析时这可能会导致问题。 + + + + An error occurred while reading the F# metadata of assembly '{0}'. A reserved construct was utilized. You may need to upgrade your F# compiler or use an earlier version of the assembly that doesn't make use of a specific construct. + 读取程序集“{0}”的 F# 元数据时出错。使用了保留的构造。可能需要升级 F# 编译器或使用不用特定构造的较早版本的程序集。 + + + + This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. + 通常不通过 F# 代码使用此方法或属性,而是改用显式元组模式进行析构。 + + + + This expression returns a value of type '{0}' but is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to use the expression as a value in the sequence then use an explicit 'yield'. + 此表达式返回类型为“{0}”的值,但被隐式放弃。请考虑使用 "let" 将结果绑定到名称,例如 "let result = expression"。如果要使用该表达式作为序列中的值,则使用显式 "yield"。 + + + + This expression returns a value of type '{0}' but is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to use the expression as a value in the sequence then use an explicit 'yield!'. + 此表达式返回类型为“{0}”的值,但被隐式放弃。请考虑使用 "let" 将结果绑定到名称,例如 "let result = expression"。如果要使用该表达式作为序列中的值,则使用显式 "yield!"。 + + + + Used in computation expressions to pattern match directly over the result of another computation expression. + 在计算表达式中用于直接对另一个计算表达式的结果进行模式匹配。 + + + + The file '{0}' changed on disk unexpectedly, please reload. + 文件“{0}”在磁盘上意外更改,请重新加载。 + + + + The byref pointer is readonly, so this write is not permitted. + 此 byref 指针为只读,因此,不允许此写入。 + + + + A value must be mutable in order to mutate the contents or take the address of a value type, e.g. 'let mutable x = ...' + 值必须是可变的,以便更改内容或采用值类型的地址,例如“let mutable x = ...” + + + + A ReadOnly attribute has been applied to a struct type with a mutable field. + 已对包含可变字段的结构类型应用只读属性。 + + + + A byref pointer returned by a function or method is implicitly dereferenced as of F# 4.5. To acquire the return value as a pointer, use the address-of operator, e.g. '&f(x)' or '&obj.Method(arg1, arg2)'. + 截至 F# 4.5,隐式取消引用函数或方法返回的 byref 指针。若要获取返回值作为指针,请使用 address-of 运算符,例如 “&f(x)” 或 “&obj.Method(arg1, arg2)”。 + + + + A type annotated with IsByRefLike must also be a struct. Consider adding the [<Struct>] attribute to the type. + 使用 IsByRefLike 注释的类型也必须为结构。考虑将 [<Struct>] 属性添加到类型中。 + + + + The address of the variable '{0}' or a related expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + 此时无法使用变量“{0}”或相关表达式的地址。这是为了确保本地值的地址不超出其范围。 + + + + This value can't be assigned because the target '{0}' may refer to non-stack-local memory, while the expression being assigned is assessed to potentially refer to stack-local memory. This is to help prevent pointers to stack-bound memory escaping their scope. + 无法分配此值,因为目标“{0}”可能涉及非堆栈本地内存,而分配的表达式经评估可能涉及堆栈本地内存。这有助于防止指向堆栈绑定内存的指针超出其范围。 + + + + A value defined in a module must be mutable in order to take its address, e.g. 'let mutable x = ...' + 在模块中定义的值必须是可变的,以便获取其地址,例如 “let mutable x = ...” + + + + A type annotated with IsReadOnly must also be a struct. Consider adding the [<Struct>] attribute to the type. + 使用 IsReadOnly 注释的类型也必须为结构。考虑将 [<Struct>] 属性添加到类型中。 + + + + Struct members cannot return the address of fields of the struct by reference + 结构成员无法通过引用返回此结构的字段地址 + + + + The function or method call cannot be used at this point, because one argument that is a byref of a non-stack-local Span or IsByRefLike type is used with another argument that is a stack-local Span or IsByRefLike type. This is to ensure the address of the local value does not escape its scope. + 此时无法使用函数或方法调用,因为结合使用了一个非堆栈本地 Span 或 IsByRefLike 类型的 byref 参数和另一堆栈本地 Span 或 IsByRefLike 类型的参数。这是为了确保本地值的地址不超出其范围。 + + + + The address of a value returned from the expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + 此时无法使用从表达式返回的值的地址。这是为了确保本地值的地址不超出其范围。 + + + + The Span or IsByRefLike variable '{0}' cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + 此时无法使用 Span 或 IsByRefLike 变量“{0}”。这是为了确保本地值的地址不超出其范围。 + + + + A Span or IsByRefLike value returned from the expression cannot be used at ths point. This is to ensure the address of the local value does not escape its scope. + 此时无法使用从表达式返回的 Span 或 IsByRefLike 值。这是为了确保本地值的地址不超出其范围。 + + + + Cannot take the address of the value returned from the expression. Assign the returned value to a let-bound value before taking the address. + 无法采用从表达式返回的地址值。在采用地址前将返回值分配给 let 绑定值。 + + + + The Span or IsByRefLike expression cannot be returned from this function or method, because it is composed using elements that may escape their scope. + The Span or IsByRefLike expression cannot be returned from this function or method, because it is composed using elements that may escape their scope. + + + + This type does not inherit Attribute, it will not work correctly with other .NET languages. + This type does not inherit Attribute, it will not work correctly with other .NET languages. + + + + The exception '{0}' does not have a field named '{1}'. + The exception '{0}' does not have a field named '{1}'. + + + + The constructor does not have a field named '{0}'. + The constructor does not have a field named '{0}'. + + + + Active patterns do not have fields. This syntax is invalid. + Active patterns do not have fields. This syntax is invalid. + + + + + \ No newline at end of file diff --git a/src/fsharp/xlf/FSComp.txt.zh-Hant.xlf b/src/fsharp/xlf/FSComp.txt.zh-Hant.xlf new file mode 100644 index 00000000000..6e0f7e50c20 --- /dev/null +++ b/src/fsharp/xlf/FSComp.txt.zh-Hant.xlf @@ -0,0 +1,7087 @@ + + + + + + The namespace '{0}' is not defined. + 未定義命名空間 '{0}'。 + + + + The namespace or module '{0}' is not defined. + 未定義命名空間或模組 '{0}'。 + + + + The field, constructor or member '{0}' is not defined. + 未定義欄位、建構函式或成員 '{0}'。 + + + + The value, constructor, namespace or type '{0}' is not defined. + 未定義值、建構函式、命名空間或類型 '{0}'。 + + + + The value or constructor '{0}' is not defined. + 未定義值或建構函式 '{0}'。 + + + + The value, namespace, type or module '{0}' is not defined. + 未定義值、命名空間、類型或模組 '{0}'。 + + + + The constructor, module or namespace '{0}' is not defined. + 未定義建構函式、模組或命名空間 '{0}'。 + + + + The type '{0}' is not defined. + 未定義類型 '{0}'。 + + + + The type '{0}' is not defined in '{1}'. + {1}' 中未定義類型 '{0}'。 + + + + The record label or namespace '{0}' is not defined. + 未定義記錄標籤或命名空間 '{0}'。 + + + + The record label '{0}' is not defined. + 未定義記錄標籤 '{0}'。 + + + + Maybe you want one of the following: + 您可能需要下列其中一項: + + + + The type parameter {0} is not defined. + 未定義類型參數 {0}。 + + + + The pattern discriminator '{0}' is not defined. + 未定義模式鑑別子 '{0}'。 + + + + Replace with '{0}' + 取代為 '{0}' + + + + Add . for indexer access. + 為索引子存取新增 .。 + + + + All elements of a list must be of the same type as the first element, which here is '{0}'. This element has type '{1}'. + 清單建構函式運算式的所有分支都必須是同一種類型。此運算式應具備類型 '{0}',但卻為類型 '{1}'。 + + + + All elements of an array must be of the same type as the first element, which here is '{0}'. This element has type '{1}'. + 陣列建構函式運算式的所有項目都必須是同一種類型。此運算式應具備類型 '{0}',但卻是類型 '{1}'。 + + + + This 'if' expression is missing an 'else' branch. Because 'if' is an expression, and not a statement, add an 'else' branch which also returns a value of type '{0}'. + 'if' 運算式遺漏 'else' 分支。'then' 分支具有類型 '{0}'。因為 'if' 為運算式而非陳述式,所以請新增會傳回的值類型相同的 'else' 分支。 + + + + The 'if' expression needs to have type '{0}' to satisfy context type requirements. It currently has type '{1}'. + if' 運算式必須具備類型 '{0}',才能滿足內容類型的需求。其目前的類型為 '{1}'。 + + + + All branches of an 'if' expression must return values of the same type as the first branch, which here is '{0}'. This branch returns a value of type '{1}'. + if' 運算式的所有分支都必須是同一種類型。此運算式應具備類型 '{0}',但卻是類型 '{1}'。 + + + + All branches of a pattern match expression must return values of the same type as the first branch, which here is '{0}'. This branch returns a value of type '{1}'. + 模式比對運算式的所有分支,都必須傳回相同類型的值。第一個分支傳回了類型 '{0}' 的值,但此分支卻傳回了類型 '{1}' 的值。 + + + + A pattern match guard must be of type 'bool', but this 'when' expression is of type '{0}'. + 模式比對成立條件必須是類型 'bool',但此 'when' 運算式卻是類型 '{0}'。 + + + + A ';' is used to separate field values in records. Consider replacing ',' with ';'. + 記錄中使用 ';' 來分隔欄位值。請考慮以 ';' 取代 ','。 + + + + The '!' operator is used to dereference a ref cell. Consider using 'not expr' here. + '!' 運算子用於將 ref 儲存格取值 (Dereference)。請考慮在此使用 'not expr'。 + + + + The non-generic type '{0}' does not expect any type arguments, but here is given {1} type argument(s) + 非泛型型別 '{0}' 不需要任何型別引數,但此處指定了 {1} 個型別引數 + + + + Consider using 'return!' instead of 'return'. + 請考慮使用 'return!',而不使用 'return'。 + + + + Consider using 'yield!' instead of 'yield'. + 請考慮使用 'yield!' 而不使用 'yield'。 + + + + \nA tuple type is required for one or more arguments. Consider wrapping the given arguments in additional parentheses or review the definition of the interface. + \n有一或多個引數需要元組類型。請考慮用額外的括弧括住提供的引數,或檢閱介面定義。 + + + + Invalid warning number '{0}' + 無效的警告編號 '{0}' + + + + Invalid version string '{0}' + 無效的版本字串 '{0}' + + + + Invalid version file '{0}' + 無效的版本檔案 '{0}' + + + + Microsoft (R) F# Compiler version {0} + Microsoft (R) F# 編譯器版本 {0} + + + + F# Compiler for F# {0} + 適用於 F# {0} 的 F# 編譯器 + + + + Problem with filename '{0}': {1} + 檔名 '{0}' 有問題: {1} + + + + No inputs specified + 未指定輸入 + + + + The '--pdb' option requires the '--debug' option to be used + '--pdb' 選項要求必須使用 '--debug' 選項 + + + + The search directory '{0}' is invalid + 搜尋目錄 '{0}' 無效。 + + + + The search directory '{0}' could not be found + 找不到搜尋目錄 '{0}' + + + + '{0}' is not a valid filename + '{0}' 不是有效的檔名 + + + + '{0}' is not a valid assembly name + '{0}' 不是有效的組件名稱 + + + + Unrecognized privacy setting '{0}' for managed resource, valid options are 'public' and 'private' + 受控資源的無法辨識隱私設定 '{0}',有效的選項是 'public' 和 'private' + + + + Multiple references to '{0}.dll' are not permitted + 不允許多次參考 '{0}.dll' + + + + Could not read version from mscorlib.dll + 無法從 mscorlib.dll 讀取版本 + + + + Unable to read assembly '{0}' + 無法讀取組件 '{0}' + + + + Assembly resolution failure at or near this location + 組件解析在這個位置或附近失敗 + + + + The declarations in this file will be placed in an implicit module '{0}' based on the file name '{1}'. However this is not a valid F# identifier, so the contents will not be accessible from other files. Consider renaming the file or adding a 'module' or 'namespace' declaration at the top of the file. + 這個檔案中的宣告將根據檔案名稱 '{1}' 放在隱含模組 '{0}' 中。但因為這並不是有效的 F# 識別碼,所以無法從其他檔案存取其內容。請考慮重新命名檔案,或在檔案最上方加入 'module' 或 'namespace' 宣告。 + + + + Files in libraries or multiple-file applications must begin with a namespace or module declaration, e.g. 'namespace SomeNamespace.SubNamespace' or 'module SomeNamespace.SomeModule'. Only the last source file of an application may omit such a declaration. + 程式庫或多檔案應用程式中的檔案應該以命名空間或模組宣告開頭,例如 'namespace SomeNamespace.SubNamespace' 或 'module SomeNamespace.SomeModule'。只有應用程式的最後一個原始程式檔可以省略這樣的宣告。 + + + + Files in libraries or multiple-file applications must begin with a namespace or module declaration. When using a module declaration at the start of a file the '=' sign is not allowed. If this is a top-level module, consider removing the = to resolve this error. + 程式庫或多檔案應用程式中的檔案必須以命名空間或模組宣告為開頭。在檔案開頭使用模組宣告時,不允許 '=' 符號。如果這是頂層模組,請考慮移除 = 以解決此錯誤。 + + + + This file contains multiple declarations of the form 'module SomeNamespace.SomeModule'. Only one declaration of this form is permitted in a file. Change your file to use an initial namespace declaration and/or use 'module ModuleName = ...' to define your modules. + 這個檔案包含 'module SomeNamespace.SomeModule' 形式的多個宣告。一個檔案只允許一個這種形式的宣告。請將檔案變更成使用初始命名空間宣告,和/或使用 'module ModuleName = ...' 來定義模組。 + + + + Option requires parameter: {0} + 選項需要參數: {0} + + + + Source file '{0}' could not be found + 找不到原始程式檔 '{0}' + + + + The file extension of '{0}' is not recognized. Source files must have extension .fs, .fsi, .fsx, .fsscript, .ml or .mli. + 無法辨識 '{0}' 的副檔名。原始程式檔的副檔名必須是 .fs、.fsi、.fsx、.fsscript、.ml 或 .mli。 + + + + Could not resolve assembly '{0}' + 無法解析組件 '{0}' + + + + Could not resolve assembly '{0}' required by '{1}' + 無法解析 '{1}' 所需的組件 '{0}' + + + + Error opening binary file '{0}': {1} + 開啟二進位檔案 '{0}' 時發生錯誤: {1} + + + + The F#-compiled DLL '{0}' needs to be recompiled to be used with this version of F# + F# 編譯的 DLL '{0}' 必須重新編譯後,才能用於這個版本的 F# + + + + Invalid directive. Expected '#I \"<path>\"'. + 無效的指示詞。必須是 '#I \"<path>\"'。 + + + + Invalid directive. Expected '#r \"<file-or-assembly>\"'. + 無效的指示詞。必須是 '#r \"<file-or-assembly>\"'。 + + + + Invalid directive. Expected '#load \"<file>\" ... \"<file>\"'. + 無效的指示詞。必須是 '#load \"<file>\" ... \"<file>\"'。 + + + + Invalid directive. Expected '#time', '#time \"on\"' or '#time \"off\"'. + 無效的指示詞。必須是 '#time'、'#time \"on\"' 或 '#time \"off\"'。 + + + + Directives inside modules are ignored + 已忽略模組內的指示詞 + + + + A signature for the file or module '{0}' has already been specified + 已經指定檔案或模組 '{0}' 的簽章 + + + + An implementation of file or module '{0}' has already been given. Compilation order is significant in F# because of type inference. You may need to adjust the order of your files to place the signature file before the implementation. In Visual Studio files are type-checked in the order they appear in the project file, which can be edited manually or adjusted using the solution explorer. + 已經指定檔案或模組 '{0}' 的實作。因為類型推斷的關係,F# 中不同的編譯順序會有不同的結果。您必須調整檔案的順序,使簽章檔放在實作之前。在 Visual Studio 中,檔案會依照它們出現在專案檔中的順序進行類型檢查,這個順序可以用手動方式編輯,或使用方案總管調整。 + + + + An implementation of the file or module '{0}' has already been given + 已經指定檔案或模組 '{0}' 的實作 + + + + The signature file '{0}' does not have a corresponding implementation file. If an implementation file exists then check the 'module' and 'namespace' declarations in the signature and implementation files match. + 簽章檔 '{0}' 沒有對應的實作檔。如果實作檔的確存在,請檢查簽章檔與實作檔中的 'module' 和 'namespace' 宣告是否相符。 + + + + '{0}' is not a valid integer argument + '{0}' 不是有效的整數引數 + + + + '{0}' is not a valid floating point argument + '{0}' 不是有效的浮點引數 + + + + Unrecognized option: '{0}' + 選項無法辨認: '{0}' + + + + Invalid module or namespace name + 無效的模組或命名空間名稱 + + + + Error reading/writing metadata for the F# compiled DLL '{0}'. Was the DLL compiled with an earlier version of the F# compiler? (error: '{1}'). + 讀取/寫入 F# 編譯的 DLL '{0}' 的中繼資料時發生錯誤。這個 DLL 是用舊版 F# 編譯器編譯的嗎? (錯誤: '{1}') + + + + The type/module '{0}' is not a concrete module or type + 類型/模組 '{0}' 不是具象模組或類型 + + + + The type '{0}' has an inline assembly code representation + 類型 '{0}' 有內嵌組譯程式碼表示 + + + + A namespace and a module named '{0}' both occur in two parts of this assembly + 名稱為 '{0}' 的命名空間和模組都出現在這個組件的兩個部分中 + + + + Two modules named '{0}' occur in two parts of this assembly + 名稱為 '{0}' 的兩個模組出現在這個組件的兩個部分中 + + + + Two type definitions named '{0}' occur in namespace '{1}' in two parts of this assembly + 兩個名稱為 '{0}' 的類型定義出現在這個組件兩個部分的命名空間 '{1}' 中 + + + + A module and a type definition named '{0}' occur in namespace '{1}' in two parts of this assembly + 名稱為 '{0}' 的模組和類型定義出現在這個組件兩個部分的命名空間 '{1}' 中 + + + + Invalid member signature encountered because of an earlier error + 因為先前的錯誤,導致發生無效的成員簽章 + + + + This value does not have a valid property setter type + 這個值沒有有效的屬性 setter 類型 + + + + Invalid form for a property getter. At least one '()' argument is required when using the explicit syntax. + 屬性 getter 的形式無效。使用明確語法時至少要有一個 '()' 引數。 + + + + Invalid form for a property setter. At least one argument is required. + 屬性 setter 的形式無效。至少要有一個引數。 + + + + Unexpected use of a byref-typed variable + 未預期的 ByRef 類型變數用法 + + + + Invalid mutation of a constant expression. Consider copying the expression to a mutable local, e.g. 'let mutable x = ...'. + 常數運算式無效的變動。請考慮將運算式複製到可變動的區域變數,例如 'let mutable x = ...'。 + + + + The value has been copied to ensure the original is not mutated by this operation or because the copy is implicit when returning a struct from a member and another member is then accessed + 已複製值確保此作業不會變動原始值,或因為從成員傳回結構,再存取其他成員意味著已複製 + + + + Recursively defined values cannot appear directly as part of the construction of a tuple value within a recursive binding + 遞迴定義的值不能直接顯示為遞迴繫結內元組值的一部分建構 + + + + Recursive values cannot appear directly as a construction of the type '{0}' within a recursive binding. This feature has been removed from the F# language. Consider using a record instead. + 遞迴值無法直接顯示為遞迴繫結內類型 '{0}' 的建構。這項功能已從 F# 語言移除。請考慮改用記錄。 + + + + Recursive values cannot be directly assigned to the non-mutable field '{0}' of the type '{1}' within a recursive binding. Consider using a mutable field instead. + 遞迴值無法直接指派給遞迴繫結內類型 '{1}' 的不可變動欄位 '{0}'。請考慮改用可變動的欄位。 + + + + Unexpected decode of AutoOpenAttribute + 未預期的 AutoOpenAttribute 解碼 + + + + Unexpected decode of InternalsVisibleToAttribute + 未預期的 InternalsVisibleToAttribute 解碼 + + + + Unexpected decode of InterfaceDataVersionAttribute + 未預期的 InterfaceDataVersionAttribute 解碼 + + + + Active patterns cannot return more than 7 possibilities + 現用模式不能傳回超過 7 種可能性 + + + + This is not a valid constant expression or custom attribute value + 這不是有效的常數運算式或自訂屬性值 + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe mutability attributes differ + 模組 '{0}' 包含\n {1} \n但它的簽章卻指定\n {2} \n可變動性屬性不同 + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe names differ + 模組 '{0}' 包含\n {1} \n但它的簽章卻指定\n {2} \n名稱不同 + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe compiled names differ + 模組 '{0}' 包含\n {1} \n但它的簽章卻指定\n {2} \n編譯的名稱不同 + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe display names differ + 模組 '{0}' 包含\n {1} \n但它的簽章卻指定\n {2} \n顯示名稱不同 + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe accessibility specified in the signature is more than that specified in the implementation + 模組 '{0}' 包含\n {1} \n但它的簽章卻指定\n {2} \n簽章中指定的存取範圍大於實作中指定的存取範圍 + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe inline flags differ + 模組 '{0}' 包含\n {1} \n但它的簽章卻指定\n {2} \n內嵌旗標不同 + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe literal constant values and/or attributes differ + 模組 '{0}' 包含\n {1} \n但它的簽章卻指定\n {2} \n常值常數值和/或屬性不同 + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is a type function and the other is not. The signature requires explicit type parameters if they are present in the implementation. + 模組 '{0}' 包含\n {1} \n但它的簽章卻指定\n {2} \n其中一個是類型函式,另一個卻不是。如果型別參數出現在實作中,簽章就需要明確的型別參數參數。 + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe respective type parameter counts differ + 模組 '{0}' 包含\n {1} \n但其簽章卻指定\n {2} \n個別的型別參數計數不同 + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe types differ + 模組 '{0}' 包含\n {1} \n但它的簽章卻指定\n {2} \n類型不同 + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is an extension member and the other is not + 模組 '{0}' 包含\n {1} \n但它的簽章卻指定\n {2} \n其中一個是擴充成員,另一個卻不是 + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nAn arity was not inferred for this value + 模組 '{0}' 包含\n {1} \n但它的簽章卻指定\n {2} \n未針對這個值推斷 Arity + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe number of generic parameters in the signature and implementation differ (the signature declares {3} but the implementation declares {4} + 模組 '{0}' 包含\n {1} \n但它的簽章卻指定\n {2} \n簽章與實作中泛型參數的數目不同 (簽章宣告了 {3} 個,但實作宣告了 {4} 個 + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe generic parameters in the signature and implementation have different kinds. Perhaps there is a missing [<Measure>] attribute. + 模組 '{0}' 包含\n {1} \n但其簽章卻指定了\n {2} \n簽章與實作中泛型參數的種類不同。可能遺漏了 [<Measure>] 屬性。 + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe arities in the signature and implementation differ. The signature specifies that '{3}' is function definition or lambda expression accepting at least {4} argument(s), but the implementation is a computed function value. To declare that a computed function value is a permitted implementation simply parenthesize its type in the signature, e.g.\n\tval {5}: int -> (int -> int)\ninstead of\n\tval {6}: int -> int -> int. + 模組 '{0}' 包含\n {1} \n但它的簽章卻指定\n {2} \n簽章與實作中的 Arity 不同。簽章指定 '{3}' 是函式定義或 Lambda 運算式,且接受至少 {4} 個引數,但實作則是計算的函式值。若要宣告計算的函式值是允許的實作,只要將簽章中它的類型括在括號內,例如\n\tval {5}: int -> (int -> int)\n而不是\n\tval {6}: int -> int -> int。 + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe CLI member names differ + 模組 '{0}' 包含\n {1} \n但它的簽章卻指定\n {2} \nCLI 成員名稱不同 + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is static and the other isn't + 模組 '{0}' 包含\n {1} \n但它的簽章卻指定\n {2} \n其中一個是靜態的,另一個卻不是 + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is virtual and the other isn't + 模組 '{0}' 包含\n {1} \n但它的簽章卻指定\n {2} \n其中一個是虛擬的,另一個卻不是 + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is abstract and the other isn't + 模組 '{0}' 包含\n {1} \n但它的簽章卻指定\n {2} \n其中一個是抽象的,另一個卻不是 + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is final and the other isn't + 模組 '{0}' 包含\n {1} \n但它的簽章卻指定\n {2} \n其中一個是最後的,另一個卻不是 + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is marked as an override and the other isn't + 模組 '{0}' 包含\n {1} \n但它的簽章卻指定\n {2} \n其中一個標記為覆寫,另一個卻不是 + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is a constructor/property and the other is not + 模組 '{0}' 包含\n {1} \n但它的簽章卻指定\n {2} \n其中一個是建構函式/屬性,另一個卻不是 + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe compiled representation of this method is as a static member but the signature indicates its compiled representation is as an instance member + 模組 '{0}' 包含\n {1} \n但它的簽章卻指定\n {2} \n這個方法的編譯表示是做為靜態成員,但簽章卻指示它的編譯表示是做為執行個體成員 + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe compiled representation of this method is as an instance member, but the signature indicates its compiled representation is as a static member + 模組 '{0}' 包含\n {1} \n但它的簽章卻指定\n {2} \n這個方法的編譯表示是做為執行個體成員,但簽章卻指示它的編譯表示是做為靜態成員 + + + + The {0} definitions in the signature and implementation are not compatible because the names differ. The type is called '{1}' in the signature file but '{2}' in implementation. + 簽章與名稱的 {0} 定義不相容,因為名稱不同。類型在簽名檔稱為 '{1}',但在實作稱為 '{2}'。 + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the respective type parameter counts differ + 簽章與實作中類型 '{1}' 的 {0} 定義不相容,因為個別的型別參數計數不同 + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the accessibility specified in the signature is more than that specified in the implementation + 簽章與實作中類型 '{1}' 的 {0} 定義不相容,因為簽章中指定的存取範圍大於實作中指定的存取範圍 + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature requires that the type supports the interface {2} but the interface has not been implemented + 簽章與實作中類型 '{1}' 的 {0} 定義不相容,因為簽章要求類型必須支援介面 {2},但這個介面尚未實作 + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation says this type may use nulls as a representation but the signature does not + 簽章與實作中類型 '{1}' 的 {0} 定義不相容,因為實作宣稱這個類型可以使用 null 作為表示法,但簽章未宣稱 + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation says this type may use nulls as an extra value but the signature does not + 簽章與實作中類型 '{1}' 的 {0} 定義不相容,因為實作宣稱這個類型可以使用 null 作為額外值,但簽章未宣稱 + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature says this type may use nulls as a representation but the implementation does not + 簽章與實作中類型 '{1}' 的 {0} 定義不相容,因為簽章宣稱這個類型可以使用 null 作為表示法,但實作未宣稱 + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature says this type may use nulls as an extra value but the implementation does not + 簽章與實作中類型 '{1}' 的 {0} 定義不相容,因為簽章宣稱這個類型可以使用 null 作為額外值,但實作未宣稱 + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation type is sealed but the signature implies it is not. Consider adding the [<Sealed>] attribute to the signature. + 因為實作類型為已密封,但簽章卻將其隱含為非密封,所以簽章與實作中類型 '{1}' 的 {0} 定義不相容。請考慮將 [<Sealed>] 屬性新增至簽章。 + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation type is not sealed but signature implies it is. Consider adding the [<Sealed>] attribute to the implementation. + 因為實作類型為非密封,但簽章卻將其隱含為已密封,所以簽章與實作中類型 '{1}' 的 {0} 定義不相容。請考慮將 [<Sealed>] 屬性新增至實作。 + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation is an abstract class but the signature is not. Consider adding the [<AbstractClass>] attribute to the signature. + 因為實作為抽象類別,但簽章卻不是,所以簽章與實作中類型 '{1}' 的 {0} 定義不相容。請考慮將 [<AbstractClass>] 屬性新增至簽章。 + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature is an abstract class but the implementation is not. Consider adding the [<AbstractClass>] attribute to the implementation. + 因為簽章為抽象類別,但實作卻不是,所以簽章與實作中類型 '{1}' 的 {0} 定義不相容。請考慮將 [<AbstractClass>] 屬性新增至實作。 + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the types have different base types + 簽章與實作中類型 '{1}' 的 {0} 定義不相容,因為類型具有不同的基底類型 + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the number of {2}s differ + 簽章與實作中類型 '{1}' 的 {0} 定義不相容,因為 {2} 數目不同 + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature defines the {2} '{3}' but the implementation does not (or does, but not in the same order) + 簽章與實作中類型 '{1}' 的 {0} 定義不相容,因為簽章定義了 {2} '{3}',但實作沒有 (或雖然定義了,但順序不同) + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation defines the {2} '{3}' but the signature does not (or does, but not in the same order) + 簽章與實作中類型 '{1}' 的 {0} 定義不相容,因為實作定義了 {2} '{3}',但簽章沒有 (或雖然定義了,但順序不同) + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation defines a struct but the signature defines a type with a hidden representation + 簽章與實作中類型 '{1}' 的 {0} 定義不相容,因為實作定義了結構,但簽章定義了具隱藏表示法的類型 + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because a CLI type representation is being hidden by a signature + 簽章與實作中類型 '{1}' 的 {0} 定義不相容,因為簽章隱藏了某 CLI 類型表示法 + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because a type representation is being hidden by a signature + 簽章與實作中類型 '{1}' 的 {0} 定義不相容,因為簽章隱藏了某類型表示法 + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the types are of different kinds + 簽章與實作中類型 '{1}' 的 {0} 定義不相容,因為類型屬於不同類型 + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the IL representations differ + 簽章與實作中類型 '{1}' 的 {0} 定義不相容,因為 IL 表示法不同 + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the representations differ + 簽章與實作中類型 '{1}' 的 {0} 定義不相容,因為表示法不同 + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the field {2} was present in the implementation but not in the signature + 簽章與實作中類型 '{1}' 的 {0} 定義不相容,因為實作中有欄位 {2},但簽章中沒有 + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the order of the fields is different in the signature and implementation + 簽章與實作中類型 '{1}' 的 {0} 定義不相容,因為簽章與實作中的欄位順序不同 + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the field {2} was required by the signature but was not specified by the implementation + 簽章與實作中類型 '{1}' 的 {0} 定義不相容,因為簽章需要欄位 {2},但實作卻未指定 + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the field '{2}' was present in the implementation but not in the signature. Struct types must now reveal their fields in the signature for the type, though the fields may still be labelled 'private' or 'internal'. + 簽章與實作中類型 '{1}' 的 {0} 定義不相容,因為實作中有欄位 '{2}',但簽章中沒有。結構類型現在必須在類型的簽章中顯示其欄位,但欄位仍可以標示為 'private' 或 'internal'。 + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the abstract member '{2}' was required by the signature but was not specified by the implementation + 簽章與實作中類型 '{1}' 的 {0} 定義不相容,因為簽章需要抽象成員 '{2}',但實作卻未指定 + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the abstract member '{2}' was present in the implementation but not in the signature + 簽章與實作中類型 '{1}' 的 {0} 定義不相容,因為實作中有抽象成員 '{2}',但簽章中沒有 + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature declares a {2} while the implementation declares a {3} + 簽章與實作中類型 '{1}' 的 {0} 定義不相容,因為簽章宣告 {2},而實作則宣告 {3} + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the abbreviations differ: {2} versus {3} + 簽章與實作中類型 '{1}' 的 {0} 定義不相容,因為縮寫不同: {2} 與 {3} + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because an abbreviation is being hidden by a signature. The abbreviation must be visible to other CLI languages. Consider making the abbreviation visible in the signature. + 簽章與實作中類型 '{1}' 的 {0} 定義不相容,因為簽章隱藏了某縮寫。其他 CLI 語言必須可看見該縮寫。請考慮使縮寫在簽章中可見。 + + + + The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature has an abbreviation while the implementation does not + 簽章與實作中類型 '{1}' 的 {0} 定義不相容,因為簽章有縮寫,但實作沒有 + + + + The module contains the constructor\n {0} \nbut its signature specifies\n {1} \nThe names differ + 模組包含建構函式\n {0} \n但它的簽章卻指定\n {1} \n名稱不同 + + + + The module contains the constructor\n {0} \nbut its signature specifies\n {1} \nThe respective number of data fields differ + 模組包含建構函式\n {0} \n但它的簽章卻指定\n {1} \n個別的資料欄位數不同 + + + + The module contains the constructor\n {0} \nbut its signature specifies\n {1} \nThe types of the fields differ + 模組包含建構函式\n {0} \n但它的簽章卻指定\n {1} \n欄位的類型不同 + + + + The module contains the constructor\n {0} \nbut its signature specifies\n {1} \nthe accessibility specified in the signature is more than that specified in the implementation + 模組包含建構函式\n {0} \n但它的簽章卻指定\n {1} \n簽章中指定的存取範圍大於實作中指定的存取範圍 + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe names differ + 模組包含欄位\n {0} \n但它的簽章卻指定\n {1} \n名稱不同 + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nthe accessibility specified in the signature is more than that specified in the implementation + 模組包含欄位\n {0} \n但它的簽章卻指定\n {1} \n簽章中指定的存取範圍大於實作中指定的存取範圍 + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe 'static' modifiers differ + 模組包含欄位\n {0} \n但它的簽章卻指定\n {1} \n'static' 修飾詞不同 + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe 'mutable' modifiers differ + 模組包含欄位\n {0} \n但它的簽章卻指定\n {1} \n'mutable' 修飾詞不同 + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe 'literal' modifiers differ + 模組包含欄位\n {0} \n但它的簽章卻指定\n {1} \n'literal' 修飾詞不同 + + + + The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe types differ + 模組包含欄位\n {0} \n但它的簽章卻指定\n {1} \n類型不同 + + + + The implicit instantiation of a generic construct at or near this point could not be resolved because it could resolve to multiple unrelated types, e.g. '{0}' and '{1}'. Consider using type annotations to resolve the ambiguity + 無法解決在這個點或附近的泛型建構的隱含具現化,因為它可能解析成多個不相關的類型,例如 '{0}' 和 '{1}'。請考慮使用類型註釋來解決模稜兩可 + + + + Could not resolve the ambiguity inherent in the use of a 'printf'-style format string + 無法解決使用 'printf' 樣式的格式字串時固有的模稜兩可 + + + + Could not resolve the ambiguity in the use of a generic construct with an 'enum' constraint at or near this position + 無法解決在這個位置或附近使用具有 'enum' 條件約束的泛型建構時造成的模稜兩可 + + + + Could not resolve the ambiguity in the use of a generic construct with a 'delegate' constraint at or near this position + 無法解決在這個位置或附近使用具有 'delegate' 條件約束的泛型建構時造成的模稜兩可 + + + + Invalid value + 無效值 + + + + The signature and implementation are not compatible because the respective type parameter counts differ + 簽章與實作不相容,因為個別的型別參數計數不同 + + + + The signature and implementation are not compatible because the type parameter in the class/signature has a different compile-time requirement to the one in the member/implementation + 簽章與實作不相容,因為類別/簽章中的型別參數與成員/實作中的型別參數具有不同的編譯時間需求 + + + + The signature and implementation are not compatible because the declaration of the type parameter '{0}' requires a constraint of the form {1} + 簽章與實作不相容,因為型別參數 '{0}' 的宣告需要 {1} 形式的條件約束 + + + + The signature and implementation are not compatible because the type parameter '{0}' has a constraint of the form {1} but the implementation does not. Either remove this constraint from the signature or add it to the implementation. + 簽章與實作不相容,因為型別參數 '{0}' 有 {1} 形式的條件約束,但實作沒有。請從簽章移除這個條件約束,或將它加入實作。 + + + + The type '{0}' implements 'System.IComparable'. Consider also adding an explicit override for 'Object.Equals' + 類型 '{0}' 實作了 'System.IComparable'。請考慮也加入 'Object.Equals' 的明確覆寫 + + + + The type '{0}' implements 'System.IComparable' explicitly but provides no corresponding override for 'Object.Equals'. An implementation of 'Object.Equals' has been automatically provided, implemented via 'System.IComparable'. Consider implementing the override 'Object.Equals' explicitly + 類型 '{0}' 明確實作了 'System.IComparable',但是未提供 'Object.Equals' 的對應覆寫。系統已自動提供透過 'System.IComparable' 實作的 'Object.Equals' 的實作。請考慮明確實作覆寫 'Object.Equals' + + + + The struct, record or union type '{0}' has an explicit implementation of 'Object.GetHashCode' or 'Object.Equals'. You must apply the 'CustomEquality' attribute to the type + 結構、記錄或等位型別 '{0}' 有 'Object.GetHashCode' 或 'Object.Equals' 的明確實作。您必須將 'CustomEquality' 屬性套用到該型別 + + + + The struct, record or union type '{0}' has an explicit implementation of 'Object.GetHashCode'. Consider implementing a matching override for 'Object.Equals(obj)' + 結構、記錄或等位型別 '{0}' 有 'Object.GetHashCode' 的明確實作。請考慮為 'Object.Equals(obj)' 實作對應的覆寫 + + + + The struct, record or union type '{0}' has an explicit implementation of 'Object.Equals'. Consider implementing a matching override for 'Object.GetHashCode()' + 結構、記錄或等位型別 '{0}' 有 'Object.Equals' 的明確實作。請考慮為 'Object.GetHashCode()' 實作對應的覆寫 + + + + The exception definitions are not compatible because a CLI exception mapping is being hidden by a signature. The exception mapping must be visible to other modules. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1} + 例外狀況定義不相容,因為簽章隱藏了 CLI 例外狀況對應。例外狀況對應必須是其他模組可見的。模組包含例外狀況定義\n {0} \n但它的簽章卻指定\n\t{1} + + + + The exception definitions are not compatible because the CLI representations differ. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1} + 例外狀況定義不相容,因為 CLI 表示不同。模組包含例外狀況定義\n {0} \n但它的簽章卻指定\n\t{1} + + + + The exception definitions are not compatible because the exception abbreviation is being hidden by the signature. The abbreviation must be visible to other CLI languages. Consider making the abbreviation visible in the signature. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1}. + 例外狀況定義不相容,因為簽章隱藏了例外狀況縮寫。這個縮寫必須是其他 CLI 語言可見的。請考慮使縮寫在簽章中可見。模組包含例外狀況定義\n {0} \n但它的簽章卻指定\n\t{1}。 + + + + The exception definitions are not compatible because the exception abbreviations in the signature and implementation differ. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1}. + 例外狀況定義不相容,因為簽章與實作中的例外狀況縮寫不同。模組包含例外狀況定義\n {0} \n但它的簽章卻指定\n\t{1}。 + + + + The exception definitions are not compatible because the exception declarations differ. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1}. + 例外狀況定義不相容,因為例外狀況宣告不同。模組包含例外狀況定義\n {0} \n但它的簽章卻指定\n\t{1}。 + + + + The exception definitions are not compatible because the field '{0}' was required by the signature but was not specified by the implementation. The module contains the exception definition\n {1} \nbut its signature specifies\n\t{2}. + 例外狀況定義不相容,因為簽章需要欄位'{0}',但實作卻未指定。模組包含例外狀況定義\n {1} \n但它的簽章卻指定\n\t{2}。 + + + + The exception definitions are not compatible because the field '{0}' was present in the implementation but not in the signature. The module contains the exception definition\n {1} \nbut its signature specifies\n\t{2}. + 例外狀況定義不相容,因為實作中有欄位 '{0}',但簽章中沒有。模組包含例外狀況定義\n {1} \n但它的簽章卻指定\n\t{2}。 + + + + The exception definitions are not compatible because the order of the fields is different in the signature and implementation. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1}. + 例外狀況定義不相容,因為簽章與實作中的欄位順序不同。模組包含例外狀況定義\n {0} \n但它的簽章卻指定\n\t{1}。 + + + + The namespace or module attributes differ between signature and implementation + 簽章與實作的命名空間或模組屬性不同 + + + + This method is over-constrained in its type parameters + 這個方法在其類型參數中被過度限制 + + + + No implementations of '{0}' had the correct number of arguments and type parameters. The required signature is '{1}'. + {0}' 的任何實作都沒有正確數目的引數和型別參數。需要的簽章是 '{1}'。 + + + + The override for '{0}' was ambiguous + '{0}' 的覆寫模稜兩可 + + + + More than one override implements '{0}' + 有多個覆寫實作了 '{0}' + + + + The method '{0}' is sealed and cannot be overridden + 方法 '{0}' 是密封的,無法覆寫 + + + + The override '{0}' implements more than one abstract slot, e.g. '{1}' and '{2}' + 覆寫 '{0}' 實作了多個抽象位置,例如 '{1}' 和 '{2}' + + + + Duplicate or redundant interface + 重複或多餘的介面 + + + + The interface '{0}' is included in multiple explicitly implemented interface types. Add an explicit implementation of this interface. + 介面 '{0}' 包含在多個明確實作的介面類型中。請加入這個介面的明確實作。 + + + + A named argument has been assigned more than one value + 已經為具名引數指派多個值 + + + + No implementation was given for '{0}' + 未指定 '{0}' 的任何實作 + + + + No implementation was given for '{0}'. Note that all interface members must be implemented and listed under an appropriate 'interface' declaration, e.g. 'interface ... with member ...'. + 未指定 '{0}' 的任何實作。注意,所有介面成員都必須實作並列示在適當的 'interface' 宣告底下,例如 'interface ... with member ...'。 + + + + The member '{0}' does not have the correct number of arguments. The required signature is '{1}'. + 成員 '{0}' 沒有正確數目的引數。需要的簽章是 '{1}'。 + + + + The member '{0}' does not have the correct number of method type parameters. The required signature is '{1}'. + 成員 '{0}' 沒有正確數目的方法型別參數。需要的簽章是 '{1}'。 + + + + The member '{0}' does not have the correct kinds of generic parameters. The required signature is '{1}'. + 成員 '{0}' 沒有正確的泛型參數類型。需要的簽章是 '{1}'。 + + + + The member '{0}' cannot be used to implement '{1}'. The required signature is '{2}'. + 成員 '{0}' 不可用來實作 '{1}'。需要的簽章是 '{2}'。 + + + + Error while parsing embedded IL + 剖析內嵌的 IL 時發生錯誤 + + + + Error while parsing embedded IL type + 剖析內嵌的 IL 類型時發生錯誤 + + + + This indexer notation has been removed from the F# language + 這個索引子標記法已從 F# 語言移除 + + + + Invalid expression on left of assignment + 指派左側的運算式無效 + + + + The 'ReferenceEquality' attribute cannot be used on structs. Consider using the 'StructuralEquality' attribute instead, or implement an override for 'System.Object.Equals(obj)'. + 'ReferenceEquality' 屬性無法用在結構上。請考慮改用 'StructuralEquality' 屬性,或實作 'System.Object.Equals(obj)' 的覆寫。 + + + + This type uses an invalid mix of the attributes 'NoEquality', 'ReferenceEquality', 'StructuralEquality', 'NoComparison' and 'StructuralComparison' + 這個類型使用屬性 'NoEquality'、'ReferenceEquality'、'StructuralEquality'、'NoComparison' 和 'StructuralComparison' 的無效混合 + + + + The 'NoEquality' attribute must be used in conjunction with the 'NoComparison' attribute + 'NoEquality' 屬性必須搭配 'NoComparison' 屬性一起使用 + + + + The 'StructuralComparison' attribute must be used in conjunction with the 'StructuralEquality' attribute + 'StructuralComparison' 屬性必須搭配 'StructuralEquality' 屬性一起使用 + + + + The 'StructuralEquality' attribute must be used in conjunction with the 'NoComparison' or 'StructuralComparison' attributes + 'StructuralEquality' 屬性必須搭配 'NoComparison' 或 'StructuralComparison' 屬性一起使用 + + + + A type cannot have both the 'ReferenceEquality' and 'StructuralEquality' or 'StructuralComparison' attributes + 類型不能同時具有 'ReferenceEquality' 和 'StructuralEquality' 或 'StructuralComparison' 屬性 + + + + Only record, union, exception and struct types may be augmented with the 'ReferenceEquality', 'StructuralEquality' and 'StructuralComparison' attributes + 只有記錄、等位、例外狀況和結構類型可以用 'ReferenceEquality'、'StructuralEquality' 和 'StructuralComparison' 屬性增強 + + + + A type with attribute 'ReferenceEquality' cannot have an explicit implementation of 'Object.Equals(obj)', 'System.IEquatable<_>' or 'System.Collections.IStructuralEquatable' + 具 'ReferenceEquality' 屬性的類型不能有 'Object.Equals(obj)'、'System.IEquatable<_>' 或 'System.Collections.IStructuralEquatable' 的明確實作 + + + + A type with attribute 'CustomEquality' must have an explicit implementation of at least one of 'Object.Equals(obj)', 'System.IEquatable<_>' or 'System.Collections.IStructuralEquatable' + 具 'CustomEquality' 屬性的類型必須至少有 'Object.Equals(obj)'、'System.IEquatable<_>' 或 'System.Collections.IStructuralEquatable' 其中之一的明確實作 + + + + A type with attribute 'CustomComparison' must have an explicit implementation of at least one of 'System.IComparable' or 'System.Collections.IStructuralComparable' + 具 'CustomComparison' 屬性的類型必須至少有 'System.IComparable' 或 'System.Collections.IStructuralComparable' 其中之一的明確實作 + + + + A type with attribute 'NoEquality' should not usually have an explicit implementation of 'Object.Equals(obj)'. Disable this warning if this is intentional for interoperability purposes + 具 'NoEquality' 屬性的類型通常不應該有 'Object.Equals(obj)' 的明確實作。如果是為了互通性,請停用這個警告 + + + + A type with attribute 'NoComparison' should not usually have an explicit implementation of 'System.IComparable', 'System.IComparable<_>' or 'System.Collections.IStructuralComparable'. Disable this warning if this is intentional for interoperability purposes + 具 'NoComparison' 屬性的類型通常不應該有 'System.IComparable'、'System.IComparable<_>' 或 'System.Collections.IStructuralComparable' 的明確實作。如果是為了互通性,請停用這個警告 + + + + The 'CustomEquality' attribute must be used in conjunction with the 'NoComparison' or 'CustomComparison' attributes + 'CustomEquality' 屬性必須搭配 'NoComparison' 或 'CustomComparison' 屬性一起使用 + + + + Positional specifiers are not permitted in format strings + 格式字串中不允許使用位置規範 + + + + Missing format specifier + 遺漏格式修飾詞 + + + + '{0}' flag set twice + '{0}' 旗標設定兩次 + + + + Prefix flag (' ' or '+') set twice + 前置詞旗標 (' ' 或 '+') 設定兩次 + + + + The # formatting modifier is invalid in F# + # 格式修飾詞在 F# 中無效 + + + + Bad precision in format specifier + 格式規範中精確度不正確 + + + + Bad width in format specifier + 格式規範中寬度不正確 + + + + '{0}' format does not support '0' flag + '{0}' 格式不支援 '0' 旗標 + + + + Precision missing after the '.' + 在 '.' 後遺漏精確度 + + + + '{0}' format does not support precision + '{0}' 格式不支援精確度 + + + + Bad format specifier (after l or L): Expected ld,li,lo,lu,lx or lX. In F# code you can use %d, %x, %o or %u instead, which are overloaded to work with all basic integer types. + 不正確的格式規範 (在 l 或 L 之後): 必須是 ld、li、lo、lu、lx 或 lX。在 F# 程式碼中,您可以改用 %d、%x、%o 或 %u,這些格式經過多載,可以搭配所有基本的整數類型使用。 + + + + The 'l' or 'L' in this format specifier is unnecessary. In F# code you can use %d, %x, %o or %u instead, which are overloaded to work with all basic integer types. + 這個格式規範中的 'l' 或 'L' 是不必要的。在 F# 程式碼中,您可以改用 %d、%x、%o 或 %u,這些格式經過多載,可以搭配所有基本的整數類型使用。 + + + + The 'h' or 'H' in this format specifier is unnecessary. You can use %d, %x, %o or %u instead, which are overloaded to work with all basic integer types. + 這個格式規範中的 'h' 或 'H' 為不必要。您可以改用 %d、%x、%o 或 %u,這些格式經過多載,可以搭配所有基本的整數類型使用。 + + + + '{0}' does not support prefix '{1}' flag + {0}' 不支援前置詞 '{1}' 旗標 + + + + Bad format specifier: '{0}' + 不正確的格式規範: '{0}' + + + + System.Environment.Exit did not exit + System.Environment.Exit 未結束 + + + + The treatment of this operator is now handled directly by the F# compiler and its meaning cannot be redefined + 這個運算子的處理方式現在是直接由 F# 編譯器處理,其意義無法重新定義 + + + + A protected member is called or 'base' is being used. This is only allowed in the direct implementation of members since they could escape their object scope. + 呼叫受保護的成員,或使用 'base'。只有在成員的直接實作中才允許這種作法,因為它們可能會逸出其物件範圍。 + + + + The byref-typed variable '{0}' is used in an invalid way. Byrefs cannot be captured by closures or passed to inner functions. + ByRef 類型變數 '{0}' 的使用方式無效。ByRef 無法由關閉捕捉或傳遞到內部函式。 + + + + The 'base' keyword is used in an invalid way. Base calls cannot be used in closures. Consider using a private member to make base calls. + 'base' 關鍵字的使用方式無效。基本呼叫不能用在關閉中。請考慮使用私用成員來執行基本呼叫。 + + + + The variable '{0}' is used in an invalid way + 變數 '{0}' 的使用方式無效 + + + + The type '{0}' is less accessible than the value, member or type '{1}' it is used in. + 類型 '{0}' 比使用這個類型的值、成員或類型 '{1}' 更不容易存取。 + + + + 'System.Void' can only be used as 'typeof<System.Void>' in F# + 'System.Void' 在 F# 中只能以 'typeof<System.Void>' 形式使用 + + + + A type instantiation involves a byref type. This is not permitted by the rules of Common IL. + 類型具現化涉及 ByRef 類型。這是 Common IL 的規則所不允許的作法。 + + + + Calls to 'reraise' may only occur directly in a handler of a try-with + 呼叫 'reraise' 只能直接發生在 try-with 的處理常式中 + + + + Expression-splicing operators may only be used within quotations + 運算式接合運算子只能用在引號內 + + + + First-class uses of the expression-splicing operator are not permitted + 不允許運算式接合運算子的第一級用法 + + + + First-class uses of the address-of operators are not permitted + 不允許傳址運算子的第一級用法 + + + + First-class uses of the 'reraise' function is not permitted + 不允許 'reraise' 函式的第一級用法 + + + + The byref typed value '{0}' cannot be used at this point + 目前無法使用 ByRef 類型的值 '{0}' + + + + 'base' values may only be used to make direct calls to the base implementations of overridden members + 'base' 值只能用來直接呼叫覆寫成員的基底實作 + + + + Object constructors cannot directly use try/with and try/finally prior to the initialization of the object. This includes constructs such as 'for x in ...' that may elaborate to uses of these constructs. This is a limitation imposed by Common IL. + 物件建構函式不能在物件初始化之前直接使用 try/with 和 try/finally。這包括 'for x in ...' 這類可以詳述這些建構用途的建構函式。這是 Common IL 的限制。 + + + + The address of the variable '{0}' cannot be used at this point + 目前無法使用變數 '{0}' 的位址 + + + + The address of the static field '{0}' cannot be used at this point + 目前無法使用靜態欄位 '{0}' 的位址 + + + + The address of the field '{0}' cannot be used at this point + 目前無法使用欄位 '{0}' 的位址 + + + + The address of an array element cannot be used at this point + 目前無法使用陣列元素的位址 + + + + The type of a first-class function cannot contain byrefs + 第一級函式的類型不能包含 ByRef + + + + A method return type would contain byrefs which is not permitted + 方法傳回型別會包含不允許的 ByRef + + + + Invalid custom attribute value (not a constant or literal) + 無效的自訂屬性值 (不是常數或常值) + + + + The attribute type '{0}' has 'AllowMultiple=false'. Multiple instances of this attribute cannot be attached to a single language element. + 屬性類型 '{0}' 有 'AllowMultiple=false'。無法將這個屬性的多個執行個體附加到單一語言項目。 + + + + The member '{0}' is used in an invalid way. A use of '{1}' has been inferred prior to its definition at or near '{2}'. This is an invalid forward reference. + 成員 '{0}' 的使用方式無效。系統推斷 '{1}' 在其定義之前已在 '{2}' 或附近使用過。這是無效的向前參考。 + + + + A byref typed value would be stored here. Top-level let-bound byref values are not permitted. + ByRef 類型的值將儲存在這裡。不允許最上層 LET 繫結的 ByRef 值。 + + + + [<ReflectedDefinition>] terms cannot contain uses of the prefix splice operator '%' + [<ReflectedDefinition>] 字詞不可使用前置接合運算子 '%' + + + + A function labeled with the 'EntryPointAttribute' attribute must be the last declaration in the last file in the compilation sequence. + 標記了 'EntryPointAttribute' 屬性的函式必須是編譯順序中最後一個檔案中的最後一個宣告。 + + + + compiled form of the union case + 聯集的編譯形式 + + + + default augmentation of the union case + 聯集的預設增強指定 + + + + The property '{0}' has the same name as a method in type '{1}'. + 屬性 '{0}' 與類型 '{1}' 中的方法同名。 + + + + The property '{0}' of type '{1}' has a getter and a setter that do not match. If one is abstract then the other must be as well. + 類型為 '{1}' 之屬性 '{0}' 的 getter 與 setter 不匹配。若其中一個為抽象,另一個也必須為抽象。 + + + + The property '{0}' has the same name as another property in type '{1}', but one takes indexer arguments and the other does not. You may be missing an indexer argument to one of your properties. + 屬性 '{0}' 與類型 '{1}' 中的另一個屬性同名,但其中一個接受索引子引數,另一個不接受。您的其中一個屬性可能缺少了索引子引數。 + + + + A type would store a byref typed value. This is not permitted by Common IL. + 類型將儲存 ByRef 類型的值。這是 Common IL 所不允許的作法。 + + + + Duplicate method. The method '{0}' has the same name and signature as another method in type '{1}'. + 方法重複。方法 '{0}' 與類型 '{1}' 中另一個方法同名,且簽章也相同。 + + + + Duplicate method. The method '{0}' has the same name and signature as another method in type '{1}' once tuples, functions, units of measure and/or provided types are erased. + 方法重複。當元組、函式、測量單位及 (或) 提供的類型清除之後,方法 '{0}' 與類型 '{1}' 中另一個方法同名,且簽章也相同。 + + + + The method '{0}' has curried arguments but has the same name as another method in type '{1}'. Methods with curried arguments cannot be overloaded. Consider using a method taking tupled arguments. + 方法 '{0}' 有局部調用引數,與類型 '{1}' 中另一個方法同名。具有局部調用引數的方法無法多載。請考慮使用接受元組引數的方法。 + + + + Methods with curried arguments cannot declare 'out', 'ParamArray', 'optional', 'ReflectedDefinition', 'byref', 'CallerLineNumber', 'CallerMemberName', or 'CallerFilePath' arguments + 具有局部調用引數的方法不得宣告 'out'、'ParamArray'、'optional'、'ReflectedDefinition'、'byref'、'CallerLineNumber'、'CallerMemberName' 或 'CallerFilePath' 引數 + + + + Duplicate property. The property '{0}' has the same name and signature as another property in type '{1}'. + 屬性重複。屬性 '{0}' 與類型 '{1}' 中另一個屬性同名,且簽章也相同。 + + + + Duplicate property. The property '{0}' has the same name and signature as another property in type '{1}' once tuples, functions, units of measure and/or provided types are erased. + 屬性重複。當元組、函式、測量單位及 (或) 提供的類型清除之後,屬性 '{0}' 與類型 '{1}' 中另一個屬性同名,且簽章也相同。 + + + + Duplicate method. The abstract method '{0}' has the same name and signature as an abstract method in an inherited type. + 重複的方法。抽象方法 '{0}' 與繼承類型中的某抽象方法具有相同的名稱和簽章。 + + + + Duplicate method. The abstract method '{0}' has the same name and signature as an abstract method in an inherited type once tuples, functions, units of measure and/or provided types are erased. + 重複的方法。抽象方法 '{0}' 在清除元組、函式、測量單位和/或提供的類型後,會與繼承類型中的某抽象方法具有相同的名稱和簽章。 + + + + This type implements the same interface at different generic instantiations '{0}' and '{1}'. This is not permitted in this version of F#. + 此類型會在不同的泛型具現化 '{0}' 及 '{1}' 中實作相同的介面。本版 F# 不允許此作法。 + + + + The type of a field using the 'DefaultValue' attribute must admit default initialization, i.e. have 'null' as a proper value or be a struct type whose fields all admit default initialization. You can use 'DefaultValue(false)' to disable this check + 使用 'DefaultValue' 屬性之欄位的類型必須允許預設初始化,即使用 'null' 做為適當的值或做為所有欄位都允許預設初始化的結構類型。您可以使用 'DefaultValue(false)' 停用這個檢查 + + + + The type abbreviation contains byrefs. This is not permitted by F#. + 類型縮寫包含 ByRef。F# 不允許這種作法。 + + + + The variable '{0}' is bound in a quotation but is used as part of a spliced expression. This is not permitted since it may escape its scope. + 變數 '{0}' 雖括在引號中,卻做為接合運算式的一部分使用。這是不允許的作法,因為這樣可能會逸出其範圍。 + + + + Quotations cannot contain uses of generic expressions + 引號內不能使用泛型運算式 + + + + Quotations cannot contain function definitions that are inferred or declared to be generic. Consider adding some type constraints to make this a valid quoted expression. + 引號內不能包含推斷或宣告為泛型的函式定義。請考慮加入一些類型條件約束,使它成為有效的加引號運算式。 + + + + Quotations cannot contain object expressions + 引號內不能包含物件運算式 + + + + Quotations cannot contain expressions that take the address of a field + 引號內不能包含接受欄位位址的運算式 + + + + Quotations cannot contain expressions that fetch static fields + 引號內不能包含擷取靜態欄位的運算式 + + + + Quotations cannot contain inline assembly code or pattern matching on arrays + 引號內不能包含內嵌組譯程式碼或陣列上的模式比對 + + + + Quotations cannot contain descending for loops + 引號內不能包含迴圈的遞減 + + + + Quotations cannot contain expressions that fetch union case indexes + 引號內不能包含擷取聯集索引的運算式 + + + + Quotations cannot contain expressions that set union case fields + 引號內不能包含設定聯集欄位的運算式 + + + + Quotations cannot contain expressions that set fields in exception values + 引號內不能包含設定例外狀況值中欄位的運算式 + + + + Quotations cannot contain expressions that require byref pointers + 引號內不能包含需要 ByRef 指標的運算式 + + + + Quotations cannot contain expressions that make member constraint calls, or uses of operators that implicitly resolve to a member constraint call + 引號內不能包含進行成員條件約束呼叫的運算式,或使用隱含解析成成員條件約束呼叫的運算子 + + + + Quotations cannot contain this kind of constant + 引號內不能包含這種常數 + + + + Quotations cannot contain this kind of pattern match + 引號內不能包含這種模式比對 + + + + Quotations cannot contain array pattern matching + 引號內不能包含陣列模式比對 + + + + Quotations cannot contain this kind of type + 引號內不能包含這種類型 + + + + The declared type parameter '{0}' cannot be used here since the type parameter cannot be resolved at compile time + 此處不能使用宣告的型別參數 '{0}',因為型別參數無法於編譯時間解析 + + + + This code is less generic than indicated by its annotations. A unit-of-measure specified using '_' has been determined to be '1', i.e. dimensionless. Consider making the code generic, or removing the use of '_'. + 這個程式碼的一般程度低於註釋所指示的程度。系統判定使用 '_' 指定的測量單位為 '1',也就是無維度。請考慮使程式碼變成泛型程式碼,或移除 '_'。 + + + + Type inference problem too complicated (maximum iteration depth reached). Consider adding further type annotations. + 類型推斷問題太複雜 (已達到反覆項目深度上限)。請考慮加入進一步的類型註釋。 + + + + Expected arguments to an instance member + 引數必須是執行個體成員 + + + + This indexer expects {0} arguments but is here given {1} + 這個索引子需要 {0} 個引數,但此處指定了 {1} 個 + + + + Expecting a type supporting the operator '{0}' but given a function type. You may be missing an argument to a function. + 必須是支援運算子 '{0}' 的類型,但提供的卻是函式類型。您可能遺漏函式的引數。 + + + + Expecting a type supporting the operator '{0}' but given a tuple type + 必須是支援運算子 '{0}' 的型別,但指定的是元組型別 + + + + None of the types '{0}' support the operator '{1}' + 類型 '{0}' 都不支援運算子 '{1}' + + + + The type '{0}' does not support the operator '{1}' + 類型 '{0}' 不支援運算子 '{1}' + + + + None of the types '{0}' support the operator '{1}'. Consider opening the module 'Microsoft.FSharp.Linq.NullableOperators'. + 類型 '{0}' 都不支援運算子 '{1}'。請考慮開啟模組 'Microsoft.FSharp.Linq.NullableOperators'。 + + + + The type '{0}' does not support the operator '{1}'. Consider opening the module 'Microsoft.FSharp.Linq.NullableOperators'. + 類型 '{0}' 不支援運算子 '{1}'。請考慮開啟模組 'Microsoft.FSharp.Linq.NullableOperators'。 + + + + The type '{0}' does not support a conversion to the type '{1}' + 類型 '{0}' 不支援轉換成類型 '{1}' + + + + The type '{0}' has a method '{1}' (full name '{2}'), but the method is static + 類型 '{0}' 有方法 '{1}' (完整名稱 '{2}'),但這個方法是靜態的 + + + + The type '{0}' has a method '{1}' (full name '{2}'), but the method is not static + 類型 '{0}' 有方法 '{1}' (完整名稱 '{2}'),但這個方法不是靜態的 + + + + The constraints 'struct' and 'not struct' are inconsistent + 條件約束 'struct' 與 'not struct' 不一致 + + + + The type '{0}' does not have 'null' as a proper value + 類型 '{0}' 不是用 'null' 做為適當的值 + + + + The type '{0}' does not have 'null' as a proper value. To create a null value for a Nullable type use 'System.Nullable()'. + 類型 '{0}' 不是用 'null' 做為適當的值。若要替可為 Null 的類型建立 null 值,請使用 'System.Nullable()'。 + + + + The type '{0}' does not support the 'comparison' constraint because it has the 'NoComparison' attribute + 類型 '{0}' 不支援 'comparison' 條件約束,因為它有 'NoComparison' 屬性 + + + + The type '{0}' does not support the 'comparison' constraint. For example, it does not support the 'System.IComparable' interface + 類型 '{0}' 不支援 'comparison' 條件約束。例如,它不支援 'System.IComparable' 介面 + + + + The type '{0}' does not support the 'comparison' constraint because it is a record, union or struct with one or more structural element types which do not support the 'comparison' constraint. Either avoid the use of comparison with this type, or add the 'StructuralComparison' attribute to the type to determine which field type does not support comparison + 類型 '{0}' 不支援 'comparison' 條件約束,因為它是記錄、等位或結構,且具有一個或多個不支援 'comparison' 條件約束的結構化項目類型。請避免使用這種類型的比較,或將 'StructuralComparison' 屬性加入類型,以判斷哪個欄位類型不支援比較 + + + + The type '{0}' does not support the 'equality' constraint because it has the 'NoEquality' attribute + 類型 '{0}' 不支援 'equality' 條件約束,因為它有 'NoEquality' 屬性 + + + + The type '{0}' does not support the 'equality' constraint because it is a function type + 類型 '{0}' 不支援 'equality' 條件約束,因為它是函式類型 + + + + The type '{0}' does not support the 'equality' constraint because it is a record, union or struct with one or more structural element types which do not support the 'equality' constraint. Either avoid the use of equality with this type, or add the 'StructuralEquality' attribute to the type to determine which field type does not support equality + 類型 '{0}' 不支援 'equality' 條件約束,因為它是記錄、等位或結構,且具有一個或多個不支援 'equality' 條件約束的結構化項目類型。請避免使用這種類型的相等,或將 'StructuralEquality' 屬性加入類型,以判斷哪個欄位類型不支援相等 + + + + The type '{0}' is not a CLI enum type + 類型 '{0}' 不是 CLI 列舉類型 + + + + The type '{0}' has a non-standard delegate type + 類型 '{0}' 有非標準的委派類型 + + + + The type '{0}' is not a CLI delegate type + 類型 '{0}' 不是 CLI 委派類型 + + + + This type parameter cannot be instantiated to 'Nullable'. This is a restriction imposed in order to ensure the meaning of 'null' in some CLI languages is not confusing when used in conjunction with 'Nullable' values. + 這個型別參數無法具現化成 'Nullable'。施加這個限制的原因是為了確保在某些 CLI 中,將 'null' 搭配 'Nullable' 值一起使用時意義不會混淆。 + + + + A generic construct requires that the type '{0}' is a CLI or F# struct type + 泛型建構要求類型 '{0}' 必須是 CLI 或 F# 結構類型 + + + + A generic construct requires that the type '{0}' is an unmanaged type + 泛型建構要求類型 '{0}' 必須是非受控類型 + + + + The type '{0}' is not compatible with any of the types {1}, arising from the use of a printf-style format string + 類型 '{0}' 與任何類型 {1} 都不相容,原因是使用了 printf 樣式的格式字串 + + + + A generic construct requires that the type '{0}' have reference semantics, but it does not, i.e. it is a struct + 泛型建構要求類型 '{0}' 必須有參考語意,但它卻沒有,也就是說它是結構 + + + + A generic construct requires that the type '{0}' be non-abstract + 泛型建構要求類型 '{0}' 必須是非抽象的 + + + + A generic construct requires that the type '{0}' have a public default constructor + 泛型建構要求類型 '{0}' 必須有公用預設建構函式 + + + + Type instantiation length mismatch + 類型具現化長度不符 + + + + Optional arguments not permitted here + 此處不允許選擇性引數 + + + + {0} is not a static member + {0} 不是靜態成員 + + + + {0} is not an instance member + {0} 不是執行個體成員 + + + + Argument length mismatch + 引數長度不符 + + + + The argument types don't match + 引數類型不符 + + + + This method expects a CLI 'params' parameter in this position. 'params' is a way of passing a variable number of arguments to a method in languages such as C#. Consider passing an array for this argument + 這個方法預期這個位置是一個 CLI 'params' 參數。'params' 是一種傳遞變數的方法,可將可變數目的引數傳遞給 C# 一類語這的方法。請考慮傳遞這個引數的陣列 + + + + The member or object constructor '{0}' is not {1} + 成員或物件建構函式 '{0}' 不是 {1} + + + + The member or object constructor '{0}' is not {1}. Private members may only be accessed from within the declaring type. Protected members may only be accessed from an extending type and cannot be accessed from inner lambda expressions. + 成員或物件建構函式 '{0}' 不是 {1}。私用成員只能從宣告類型中存取。受保護的成員只能從擴充類型存取,無法從內部 Lambda 運算式存取。 + + + + {0} is not a static method + {0} 不是靜態方法 + + + + {0} is not an instance method + {0} 不是執行個體方法 + + + + The member or object constructor '{0}' has no argument or settable return property '{1}'. {2}. + 成員或物件建構函式 '{0}' 沒有引數或可設定的傳回屬性 '{1}'。{2}。 + + + + The object constructor '{0}' has no argument or settable return property '{1}'. {2}. + 物件建構函式 '{0}' 沒有引數或可設定的傳回屬性 '{1}'。{2}。 + + + + The required signature is {0} + 需要的簽章是 {0} + + + + The member or object constructor '{0}' requires {1} argument(s). The required signature is '{2}'. + 成員或物件建構函式 '{0}' 需要 {1} 個引數。需要的簽章是 '{2}'。 + + + + The member or object constructor '{0}' requires {1} additional argument(s). The required signature is '{2}'. + 成員或物件建構函式 '{0}' 還需要 {1} 個其他引數。需要的簽章是 '{2}'。 + + + + The member or object constructor '{0}' requires {1} argument(s). The required signature is '{2}'. Some names for missing arguments are {3}. + 成員或物件建構函式 '{0}' 需要 {1} 個引數。需要的簽章是 '{2}'。遺漏引數的部分名稱是 {3}。 + + + + The member or object constructor '{0}' requires {1} additional argument(s). The required signature is '{2}'. Some names for missing arguments are {3}. + 成員或物件建構函式 '{0}' 還需要 {1} 個其他引數。需要的簽章是 '{2}'。遺漏引數的部分名稱是 {3}。 + + + + The member or object constructor '{0}' requires {1} argument(s) but is here given {2} unnamed and {3} named argument(s). The required signature is '{4}'. + 成員或物件建構函式 '{0}' 需要 {1} 個引數,但此處指定了 {2} 個未命名和 {3} 個具名引數。需要的簽章是 '{4}'。 + + + + The member or object constructor '{0}' takes {1} argument(s) but is here given {2}. The required signature is '{3}'. + 成員或物件建構函式 '{0}' 接受 {1} 個引數,但此處指定了 {2} 個。需要的簽章是 '{3}'。 + + + + The object constructor '{0}' takes {1} argument(s) but is here given {2}. The required signature is '{3}'. + 物件建構函式 '{0}' 要用到 {1} 個引數,但此處提供了 {2} 個引數。需要的簽章是 '{3}'。 + + + + The object constructor '{0}' takes {1} argument(s) but is here given {2}. The required signature is '{3}'. If some of the arguments are meant to assign values to properties, consider separating those arguments with a comma (','). + 物件建構函式 '{0}' 要用到 {1} 個引數,但此處提供了 {2} 個引數。需要的簽章是 '{3}'。如果有部分引數是要為屬性指派值,請考慮以逗號 (',') 分隔這些引數。 + + + + The member or object constructor '{0}' takes {1} type argument(s) but is here given {2}. The required signature is '{3}'. + 成員或物件建構函式 '{0}' 接受 {1} 個型別引數,但此處指定了 {2} 個。需要的簽章是 '{3}'。 + + + + A member or object constructor '{0}' taking {1} arguments is not accessible from this code location. All accessible versions of method '{2}' take {3} arguments. + 無法從這個程式碼位置存取接受 {1} 個引數的成員或物件建構函式 '{0}'。方法 '{2}' 的所有可存取版本都接受 {3} 個引數。 + + + + Incorrect generic instantiation. No {0} member named '{1}' takes {2} generic arguments. + 泛型具現化錯誤。沒有名稱為 '{1}' 的 {0} 成員接受 {2} 個泛型引數。 + + + + The member or object constructor '{0}' does not take {1} argument(s). An overload was found taking {2} arguments. + 成員或物件建構函式 '{0}' 不接受 {1} 個引數。找到接受 {2} 個引數的多載。 + + + + No {0} member or object constructor named '{1}' takes {2} arguments + 沒有名稱為 '{1}' 的 {0} 成員或物件建構函式接受 {2} 個引數 + + + + No {0} member or object constructor named '{1}' takes {2} arguments. Note the call to this member also provides {3} named arguments. + 沒有名稱為 '{1}' 的 {0} 成員或物件建構函式接受 {2} 個引數。注意,呼叫這個成員也會提供 {3} 個具名引數。 + + + + No {0} member or object constructor named '{1}' takes {2} arguments. The named argument '{3}' doesn't correspond to any argument or settable return property for any overload. + 沒有名稱為 '{1}' 的 {0} 成員或物件建構函式接受 {2} 個引數。具名引數 '{3}' 未對應到任何引數或任何多載的可設定傳回屬性。 + + + + Method or object constructor '{0}' not found + 找不到方法或物件建構函式 '{0}' + + + + No overloads match for method '{0}'. + 沒有符合方法 '{0}' 的多載。 + + + + A unique overload for method '{0}' could not be determined based on type information prior to this program point. A type annotation may be needed. + 無法根據這個程式點之前的類型資訊,判斷方法 '{0}' 的唯一多載。可能需要有類型註釋。 + + + + Candidates: {0} + 候選: {0} + + + + The available overloads are shown below. + 可用的多載顯示如下。 + + + + Accessibility modifiers are not permitted on 'do' bindings, but '{0}' was given. + 'do' 繫結不得包含存取範圍修飾詞,但卻提供了 '{0}'。 + + + + End of file in #if section begun at or after here + #if 區段中的檔案結尾於此處或之後開始 + + + + End of file in string begun at or before here + 字串中的檔案結尾於此處或之前開始 + + + + End of file in verbatim string begun at or before here + 逐字字串中的檔案結尾於此處或之前開始 + + + + End of file in comment begun at or before here + 註解中的檔案結尾於此處或之前開始 + + + + End of file in string embedded in comment begun at or before here + 內嵌在註解中的字串中的檔案結尾於此處或之前開始 + + + + End of file in verbatim string embedded in comment begun at or before here + 內嵌在註解中的逐字字串中的檔案結尾於此處或之前開始 + + + + End of file in IF-OCAML section begun at or before here + IF-OCAML 區段中的檔案結尾於此處或之前開始 + + + + End of file in directive begun at or before here + 指示詞中的檔案結尾於此處或之前開始 + + + + No #endif found for #if or #else + 找不到 #if 或 #else 的 #endif + + + + Attributes have been ignored in this construct + 已忽略這個建構中的屬性 + + + + 'use' bindings are not permitted in primary constructors + 不允許在主要建構函式中使用 'use' 繫結 + + + + 'use' bindings are not permitted in modules and are treated as 'let' bindings + 不允許在模組中使用 'use' 繫結,將當做 'let' 繫結處理 + + + + An integer for loop must use a simple identifier + 用於迴圈的整數必須使用簡單識別碼 + + + + At most one 'with' augmentation is permitted + 最多只允許一個 'with' 增強指定 + + + + A semicolon is not expected at this point + 目前不需要分號 + + + + Unexpected end of input + 未預期的輸入結束 + + + + Accessibility modifiers are not permitted here, but '{0}' was given. + 此處不得使用存取範圍修飾詞,但卻提供了 '{0}'。 + + + + Only '#' compiler directives may occur prior to the first 'namespace' declaration + 在第一個 'namespace' 宣告前只能出現 '#' 編譯器指示詞 + + + + Accessibility modifiers should come immediately prior to the identifier naming a construct + 存取範圍修飾詞應該放在為建構命名的識別碼正前方 + + + + Files should begin with either a namespace or module declaration, e.g. 'namespace SomeNamespace.SubNamespace' or 'module SomeNamespace.SomeModule', but not both. To define a module within a namespace use 'module SomeModule = ...' + 檔案應該以命名空間或模組宣告開始,例如 'namespace SomeNamespace.SubNamespace' 或 'module SomeNamespace.SomeModule',但不能兩者都有。若要在命名空間中定義模組,請使用 'module SomeModule = ...' + + + + A module abbreviation must be a simple name, not a path + 模組縮寫必須是簡單名稱,不是路徑 + + + + Ignoring attributes on module abbreviation + 即將忽略模組縮寫的屬性 + + + + The '{0}' accessibility attribute is not allowed on module abbreviation. Module abbreviations are always private. + 模組縮寫不得包含 '{0}' 存取範圍屬性。模組縮寫一律為私用。 + + + + The '{0}' visibility attribute is not allowed on module abbreviation. Module abbreviations are always private. + 模組縮寫不得包含 '{0}' 可視性屬性。模組縮寫一律為私用。 + + + + Unclosed block + 未封閉的區塊 + + + + Unmatched 'begin' or 'struct' + 無對應的 'begin' 或 'struct' + + + + A module name must be a simple name, not a path + 模組名稱必須是簡單名稱,不是路徑 + + + + Unexpected empty type moduleDefn list + 未預期的空白類型 moduleDefn 清單 + + + + Attributes should be placed before 'val' + 屬性應該放在 'val' 之前 + + + + Attributes are not permitted on interface implementations + 不允許在介面實作上使用屬性 + + + + Syntax error + 語法錯誤 + + + + Augmentations are not permitted on delegate type moduleDefns + 不允許在委派類型 moduleDefns 上使用增強指定 + + + + Unmatched 'class', 'interface' or 'struct' + 無對應的 'class'、'interface' 或 'struct' + + + + A type definition requires one or more members or other declarations. If you intend to define an empty class, struct or interface, then use 'type ... = class end', 'interface end' or 'struct end'. + 類型定義需要一個或多個成員或其他宣告。如果您打算定義空的類別、結構或介面,請使用 'type ... = class end'、'interface end' 或 'struct end'。 + + + + Unmatched 'with' or badly formatted 'with' block + 無對應的 'with',或 'with' 區塊的格式錯誤 + + + + 'get', 'set' or 'get,set' required + 需要 'get'、'set' 或 'get,set' + + + + Only class types may take value arguments + 只有類別類型可接受數值引數 + + + + Unmatched 'begin' + 無對應的 'begin' + + + + Invalid declaration syntax + 無效的宣告語法 + + + + 'get' and/or 'set' required + 需要 'get' 和/或 'set' + + + + Type annotations on property getters and setters must be given after the 'get()' or 'set(v)', e.g. 'with get() : string = ...' + 屬性 getter 和 setter 的類型註釋必須在 'get()' 或 'set(v)' 之後指定,例如 'with get() : string = ...' + + + + A getter property is expected to be a function, e.g. 'get() = ...' or 'get(index) = ...' + getter 屬性必須是函式,例如 'get() = ...' 或 'get(index) = ...' + + + + Multiple accessibilities given for property getter or setter + 為屬性 getter 或 setter 指定了多個存取範圍 + + + + Property setters must be defined using 'set value = ', 'set idx value = ' or 'set (idx1,...,idxN) value = ... ' + 必須使用 'set value = '、'set idx value = ' 或 'set (idx1,...,idxN) value = ... ' 定義屬性 setter + + + + Interfaces always have the same visibility as the enclosing type + 介面一定與封入類型採用相同的可見性 + + + + Accessibility modifiers are not allowed on this member. Abstract slots always have the same visibility as the enclosing type. + 不允許在這個成員上使用存取範圍修飾詞。抽象位置一定與封入類型採用相同的可見性。 + + + + Attributes are not permitted on 'inherit' declarations + 不允許在 'inherit' 宣告上使用屬性 + + + + Accessibility modifiers are not permitted on an 'inherits' declaration + 不允許在 'inherits' 宣告上使用存取範圍修飾詞 + + + + 'inherit' declarations cannot have 'as' bindings. To access members of the base class when overriding a method, the syntax 'base.SomeMember' may be used; 'base' is a keyword. Remove this 'as' binding. + 'inherit' 宣告不能有 'as' 繫結。若要在覆寫方法時存取基底類別的成員,可以使用 'base.SomeMember' 語法,其中 'base' 是關鍵字。請移除這個 'as' 繫結。 + + + + Attributes are not allowed here + 這裡不允許屬性 + + + + Accessibility modifiers are not permitted in this position for type abbreviations + 不允許在類型縮寫的這個位置使用存取範圍修飾詞 + + + + Accessibility modifiers are not permitted in this position for enum types + 不允許在列舉類型的這個位置使用存取範圍修飾詞 + + + + All enum fields must be given values + 所有列舉欄位都必須指定值 + + + + Accessibility modifiers are not permitted on inline assembly code types + 不允許在內嵌組譯程式碼類型上使用存取範圍修飾詞 + + + + Unexpected identifier: '{0}' + 未預期的識別碼: '{0}' + + + + Accessibility modifiers are not permitted on union cases. Use 'type U = internal ...' or 'type U = private ...' to give an accessibility to the whole representation. + 不允許在聯集上使用存取範圍修飾詞。請使用 'type U = internal ...' 或 'type U = private ...' 為整個表示指定存取範圍。 + + + + Accessibility modifiers are not permitted on enumeration fields + 不允許在列舉欄位上使用存取範圍修飾詞 + + + + Consider using a separate record type instead + 請考慮改用不同的記錄類型 + + + + Accessibility modifiers are not permitted on record fields. Use 'type R = internal ...' or 'type R = private ...' to give an accessibility to the whole representation. + 不允許在記錄欄位上使用存取範圍修飾詞。請使用 'type R = internal ...' 或 'type R = private ...' 為整個表示指定存取範圍。 + + + + The declaration form 'let ... and ...' for non-recursive bindings is not used in F# code. Consider using a sequence of 'let' bindings + F# 程式碼中不使用非遞迴繫結的宣告形式 'let ... and ...'。請考慮使用 'let' 繫結序列 + + + + Unmatched '(' + 無對應的 '(' + + + + Successive patterns should be separated by spaces or tupled + 後續引數應該用空格分隔或採用 Tuple 形式 + + + + No matching 'in' found for this 'let' + 找不到這個 'let' 的對應 'in' + + + + Error in the return expression for this 'let'. Possible incorrect indentation. + 這個 'let' 的傳回運算式中有錯。可能是縮排不正確。 + + + + The block following this '{0}' is unfinished. Every code block is an expression and must have a result. '{1}' cannot be the final code element in a block. Consider giving this block an explicit result. + 此 '{0}' 後跟隨的區塊未完成。每個程式碼區塊都是運算式,且必須要有結果。'{1}' 不得為區塊中最後一個程式碼項目。請考慮為此區塊提供明確結果。 + + + + Incomplete conditional. Expected 'if <expr> then <expr>' or 'if <expr> then <expr> else <expr>'. + 不完整的條件式。必須是 'if <expr> then <expr>' 或 'if <expr> then <expr> else <expr>'。 + + + + 'assert' may not be used as a first class value. Use 'assert <expr>' instead. + 'assert' 無法當做第一個類別值使用。請改用 'assert <expr>'。 + + + + Identifier expected + 必須是識別項 + + + + 'in' or '=' expected + 必須是 'in' 或 '=' + + + + The use of '->' in sequence and computation expressions is limited to the form 'for pat in expr -> expr'. Use the syntax 'for ... in ... do ... yield...' to generate elements in more complex sequence expressions. + 在循序項運算式和計算運算式中使用 '->' 僅限於 'for pat in expr -> expr' 形式。使用 'for ... in ... do ... yield...' 語法可在更為複雜的循序項運算式中產生項目。 + + + + Successive arguments should be separated by spaces or tupled, and arguments involving function or method applications should be parenthesized + 後續引數應該用空格分隔或採用 Tuple 形式,而且涉及函式或方法應用程式的引數應該用括號括住 + + + + Unmatched '[' + 無對應的 '[' + + + + Missing qualification after '.' + 在 '.' 後遺漏限定性 + + + + In F# code you may use 'expr.[expr]'. A type annotation may be required to indicate the first expression is an array + 在 F# 程式碼中,您可使用 'expr.[expr]'。需要類型註釋來指示第一個運算式為陣列 + + + + Mismatched quotation, beginning with '{0}' + 不相符的引號,以 '{0}' 開頭 + + + + Unmatched '{0}' + 無對應的 '{0}' + + + + Unmatched '[|' + 無對應的 '[|' + + + + Unmatched '{{' + 無對應的 '{{' + + + + Field bindings must have the form 'id = expr;' + 欄位繫結必須具有 'id = expr;' 形式 + + + + This member is not permitted in an object implementation + 不允許在物件實作中使用這個成員 + + + + Missing function body + 遺漏函式主體 + + + + Syntax error in labelled type argument + 有標籤的型別引數中語法錯誤 + + + + Unexpected infix operator in type expression + 類型運算式中未預期的中置運算子 + + + + The syntax '(typ,...,typ) ident' is not used in F# code. Consider using 'ident<typ,...,typ>' instead + F# 程式碼中不使用語法 '(typ,...,typ) ident'。請考慮改用 'ident<typ,...,typ>' + + + + Invalid literal in type + 類型中的常值無效 + + + + Unexpected infix operator in unit-of-measure expression. Legal operators are '*', '/' and '^'. + 測量單位運算式中未預期的中置運算子。合法的運算子為 '*'、'/' 和 '^'。 + + + + Unexpected integer literal in unit-of-measure expression + 測量單位運算式中未預期的整數常值 + + + + Syntax error: unexpected type parameter specification + 語法錯誤: 未預期的型別參數規格 + + + + Mismatched quotation operator name, beginning with '{0}' + 不相符的引號運算子名稱,以 '{0}' 開頭 + + + + Active pattern case identifiers must begin with an uppercase letter + 現用模式大小寫識別項必須以大寫字母開頭 + + + + The '|' character is not permitted in active pattern case identifiers + 現用模式大小寫識別碼不得使用字元 '|' + + + + Denominator must not be 0 in unit-of-measure exponent + 度量單位指數的分母不得為 0 + + + + No '=' symbol should follow a 'namespace' declaration + 不得將 '=' 符號跟在 'namespace' 宣告之後 + + + + The syntax 'module ... = struct .. end' is not used in F# code. Consider using 'module ... = begin .. end' + F# 程式碼中不使用語法 'module ... = struct .. end'。請考慮使用 'module ... = begin .. end' + + + + The syntax 'module ... : sig .. end' is not used in F# code. Consider using 'module ... = begin .. end' + F# 程式碼中不使用語法 'module ... : sig .. end'。請考慮使用 'module ... = begin .. end' + + + + A static field was used where an instance field is expected + 在需要執行個體欄位的地方使用了靜態欄位 + + + + Method '{0}' is not accessible from this code location + 無法從這個程式碼位置存取方法 '{0}' + + + + Implicit product of measures following / + 在 / 後有隱含的測量乘積 + + + + Unexpected SynMeasure.Anon + 未預期的 SynMeasure.Anon + + + + Non-zero constants cannot have generic units. For generic zero, write 0.0<_>. + 非零常數不能有泛型單位。請將泛型的零寫成 0.0<_>。 + + + + In sequence expressions, results are generated using 'yield' + 在循序項運算式中,結果是使用 'yield' 產生的 + + + + Unexpected big rational constant + 未預期的大型有理數常數 + + + + Units-of-measure supported only on float, float32, decimal and signed integer types + 只有 float、float32、decimal 和有正負號的整數類型支援測量單位 + + + + Unexpected Const_uint16array + 未預期的 Const_uint16array + + + + Unexpected Const_bytearray + 未預期的 Const_bytearray + + + + A parameter with attributes must also be given a name, e.g. '[<Attribute>] Name : Type' + 必須為有屬性的參數指定名稱,例如 '[<Attribute>] Name : Type' + + + + Return values cannot have names + 傳回值不能有名稱 + + + + MemberKind.PropertyGetSet only expected in parse trees + 只有剖析樹狀目錄中需要 MemberKind.PropertyGetSet + + + + Namespaces cannot contain values. Consider using a module to hold your value declarations. + 命名空間不能包含值。請考慮使用模組來存放值宣告。 + + + + Namespaces cannot contain extension members except in the same file and namespace declaration group where the type is defined. Consider using a module to hold declarations of extension members. + 命名空間不能包含擴充成員,除非在已定義類型的相同檔案和命名空間宣告群組內。請考慮使用模組來保留擴充成員的宣告。 + + + + Multiple visibility attributes have been specified for this identifier + 已經為這個識別碼指定多個可見性屬性 + + + + Multiple visibility attributes have been specified for this identifier. 'let' bindings in classes are always private, as are any 'let' bindings inside expressions. + 已經為這個識別碼指定多個可見性屬性。類別中的 'let' 繫結一定是私用的,就如同運算式內的任何 'let' 繫結一樣。 + + + + The name '({0})' 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 '{1}' instead. + 名稱 '({0})' 不應該做為成員名稱使用。若要定義類型的比較語意,請實作 'System.IComparable' 介面。如果要定義靜態成員以用於其他 CLI 語言,請改用名稱 '{1}'。 + + + + The name '({0})' 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 '{1}' instead. + 名稱 '({0})' 不應該做為成員名稱使用。若要定義類型的相等語意,請覆寫 'Object.Equals' 成員。如果要定義靜態成員以用於其他 CLI 語言,請改用名稱 '{1}'。 + + + + The name '({0})' should not be used as a member name. If defining a static member for use from other CLI languages then use the name '{1}' instead. + 名稱 '({0})' 不應該做為成員名稱使用。如果要定義靜態成員以用於其他 CLI 語言,請改用名稱 '{1}'。 + + + + The name '({0})' should not be used as a member name because it is given a standard definition in the F# library over fixed types + 名稱 '({0})' 不應該做為成員名稱使用,因為已經在 F# 程式庫中透過固定類型為它指定標準定義 + + + + The '{0}' operator should not normally be redefined. To define overloaded comparison semantics for a particular type, implement the 'System.IComparable' interface in the definition of that type. + 通常不應該重新定義 '{0}' 運算子。若要定義特定類型的多載比較語意,請在該類型的定義中實作 'System.IComparable' 介面。 + + + + The '{0}' operator should not normally be redefined. To define equality semantics for a type, override the 'Object.Equals' member in the definition of that type. + 通常不應該重新定義 '{0}' 運算子。若要定義類型的相等語意,請在該類型的定義中覆寫 'Object.Equals' 成員。 + + + + The '{0}' operator should not normally be redefined. Consider using a different operator name + 通常不應該重新定義 '{0}' 運算子。請考慮使用其他運算子名稱 + + + + The '{0}' operator cannot be redefined. Consider using a different operator name + 不能重新定義 '{0}' 運算子。請考慮使用其他運算子名稱 + + + + Expected module or namespace parent {0} + 必須是模組或命名空間父代 {0} + + + + The struct, record or union type '{0}' implements the interface 'System.IComparable' explicitly. You must apply the 'CustomComparison' attribute to the type. + 結構、記錄或等位型別 '{0}' 明確實作了介面 'System.IComparable'。您必須將 'CustomComparison' 屬性套用到該型別。 + + + + The struct, record or union type '{0}' implements the interface 'System.IComparable<_>' explicitly. You must apply the 'CustomComparison' attribute to the type, and should also provide a consistent implementation of the non-generic interface System.IComparable. + 結構、記錄或等位型別 '{0}' 明確實作了介面 'System.IComparable<_>'。您必須將 'CustomComparison' 屬性套用到該型別,也應該為非泛型介面 System.Icomparable 提供一致的實作。 + + + + The struct, record or union type '{0}' implements the interface 'System.IStructuralComparable' explicitly. Apply the 'CustomComparison' attribute to the type. + 結構、記錄或等位型別 '{0}' 明確實作了介面 'System.IStructuralComparable'。請將 'CustomComparison' 屬性套用到該型別。 + + + + This record contains fields from inconsistent types + 這個記錄包含來自不一致類型的欄位 + + + + DLLImport stubs cannot be inlined + 無法內嵌 DLLImport Stub + + + + Structs may only bind a 'this' parameter at member declarations + 結構只能在成員宣告中繫結 'this' 參數 + + + + Unexpected expression at recursive inference point + 於遞迴推斷點有未預期的運算式 + + + + This code is less generic than required by its annotations because the explicit type variable '{0}' could not be generalized. It was constrained to be '{1}'. + 這個程式碼的一般程度小於其註釋要求的程度,因為無法一般化明確類型變數 '{0}'。它受限於必須是 '{1}'。 + + + + One or more of the explicit class or function type variables for this binding could not be generalized, because they were constrained to other types + 無法一般化這個繫結的一個或多個明確類別或函式類型變數,因為它們受限於其他類型 + + + + A generic type parameter has been used in a way that constrains it to always be '{0}' + 泛型型別參數的使用方式導致它始終受限為 '{0}' + + + + This type parameter has been used in a way that constrains it to always be '{0}' + 這個型別參數的使用方式導致它始終受限為 '{0}' + + + + The type parameters inferred for this value are not stable under the erasure of type abbreviations. This is due to the use of type abbreviations which drop or reorder type parameters, e.g. \n\ttype taggedInt<'a> = int or\n\ttype swap<'a,'b> = 'b * 'a.\nConsider declaring the type parameters for this value explicitly, e.g.\n\tlet f<'a,'b> ((x,y) : swap<'b,'a>) : swap<'a,'b> = (y,x). + 為這個值推斷的型別參數在清除類型縮寫後會不穩定。這是因為使用類型縮寫,導致卸除或重新排列型別參數,例如 \n\ttype taggedInt<'a> = int or\n\ttype swap<'a,'b> = 'b * 'a。\n請考慮明確宣告這個值的型別參數,例如\n\tlet f<'a,'b> ((x,y) : swap<'b,'a>) : swap<'a,'b> = (y,x)。 + + + + Explicit type parameters may only be used on module or member bindings + 明確的類型參數只能用在模組或成員繫結上 + + + + You must explicitly declare either all or no type parameters when overriding a generic abstract method + 覆寫泛型抽象方法時,必須明確宣告所有類型參數或不宣告任何類型參數 + + + + The field labels and expected type of this record expression or pattern do not uniquely determine a corresponding record type + 這個記錄運算式或模式的欄位標籤和預期類型無法唯一決定對應的記錄類型 + + + + The field '{0}' appears twice in this record expression or pattern + 欄位 '{0}' 在這個記錄運算式或模式中出現兩次 + + + + Unknown union case + 未知的聯集 + + + + This code is not sufficiently generic. The type variable {0} could not be generalized because it would escape its scope. + 這個程式碼的一般程度不足。無法一般化類型變數 {0},因為它會逸出其範圍。 + + + + A property cannot have explicit type parameters. Consider using a method instead. + 屬性不能有明確的類型參數。請考慮改用方法。 + + + + A constructor cannot have explicit type parameters. Consider using a static construction method instead. + 建構函式不能有明確的類型參數。請考慮改用靜態建構方法。 + + + + This instance member needs a parameter to represent the object being invoked. Make the member static or use the notation 'member x.Member(args) = ...'. + 這個執行個體成員需要參數來代表所叫用的物件。請將成員設為靜態成員,或使用 'member x.Member(args) = ...' 標記法。 + + + + Unexpected source-level property specification in syntax tree + 語法樹狀目錄中有未預期的來源層級屬性規格 + + + + A static initializer requires an argument + 靜態初始設定式需要引數 + + + + An object constructor requires an argument + 物件建構函式需要引數 + + + + This static member should not have a 'this' parameter. Consider using the notation 'member Member(args) = ...'. + 這個靜態成員不應該有 'this' 參數。請考慮使用 'member Member(args) = ...' 標記法。 + + + + An explicit static initializer should use the syntax 'static new(args) = expr' + 明確的靜態初始設定式應該使用 'static new(args) = expr' 語法 + + + + An explicit object constructor should use the syntax 'new(args) = expr' + 明確的物件建構函式應該使用 'new(args) = expr' 語法 + + + + Unexpected source-level property specification + 未預期的來源層級屬性規格 + + + + This form of object expression is not used in F#. Use 'member this.MemberName ... = ...' to define member implementations in object expressions. + F# 中不使用這種形式的物件運算式。請使用 'member this.MemberName ... = ...' 來定義物件運算式中的成員實作。 + + + + Invalid declaration + 無效的宣告 + + + + Attributes are not allowed within patterns + 不允許在模式內使用屬性 + + + + The generic function '{0}' must be given explicit type argument(s) + 必須為泛型函式 '{0}' 指定明確的型別引數 + + + + The method or function '{0}' should not be given explicit type argument(s) because it does not declare its type parameters explicitly + 不應該為方法或函式 '{0}' 指定明確的型別引數,因為它未明確宣告其型別參數 + + + + This value, type or method expects {0} type parameter(s) but was given {1} + 這個值、型別或方法需要 {0} 個型別參數,卻指定了 {1} 個 + + + + The default, zero-initializing constructor of a struct type may only be used if all the fields of the struct type admit default initialization + 結構類型的預設、零初始化建構函式只能用在結構類型的所有欄位都允許預設初始化時 + + + + Couldn't find Dispose on IDisposable, or it was overloaded + 找不到 IDisposable 上的 Dispose,或已被多載 + + + + This value is not a literal and cannot be used in a pattern + 這個值不是常值,無法用在模式中 + + + + This field is readonly + 這是唯讀欄位 + + + + Named arguments must appear after all other arguments + 具名引數必須出現在所有其他引數之後 + + + + This function value is being used to construct a delegate type whose signature includes a byref argument. You must use an explicit lambda expression taking {0} arguments. + 這個函式值正用來建構簽章包含 ByRef 引數的委派類型。您必須使用接受 {0} 引數的明確 Lambda 運算式。 + + + + The type '{0}' is not a type whose values can be enumerated with this syntax, i.e. is not compatible with either seq<_>, IEnumerable<_> or IEnumerable and does not have a GetEnumerator method + 類型 '{0}' 不是可以用這個語法列舉值的類型,也就是它與 seq<_>、IEnumerable<_> 或 IEnumerable 不相容,而且沒有 GetEnumerator 方法 + + + + This recursive binding uses an invalid mixture of recursive forms + 這個遞迴繫結使用無效的混合遞迴形式 + + + + This is not a valid object construction expression. Explicit object constructors must either call an alternate constructor or initialize all fields of the object and specify a call to a super class constructor. + 這不是有效的物件建構運算式。明確物件建構函式必須呼叫替代建構函式,或初始化該物件的所有欄位並且指定超級類別建構函式的呼叫。 + + + + Invalid constraint + 無效的條件約束 + + + + Invalid constraint: the type used for the constraint is sealed, which means the constraint could only be satisfied by at most one solution + 無效的條件約束: 用於條件約束的類型是密封的,表示條件約束最多只能由一個方案滿足 + + + + An 'enum' constraint must be of the form 'enum<type>' + 'enum' 條件約束必須採用 'enum<type>' 形式 + + + + 'new' constraints must take one argument of type 'unit' and return the constructed type + 'new' 條件約束必須接受一個類型 'unit' 的引數,並傳回建構的類型 + + + + This property has an invalid type. Properties taking multiple indexer arguments should have types of the form 'ty1 * ty2 -> ty3'. Properties returning functions should have types of the form '(ty1 -> ty2)'. + 這個屬性有無效的類型。接受多個索引子引數的屬性應該具有 'ty1 * ty2 -> ty3' 格式的類型。傳回函式的屬性應該具有 '(ty1 -> ty2)' 形式的類型。 + + + + Expected unit-of-measure parameter, not type parameter. Explicit unit-of-measure parameters must be marked with the [<Measure>] attribute. + 必須是測量單位參數,而非型別參數。明確的測量單位參數必須標記有 [<Measure>] 屬性。 + + + + Expected type parameter, not unit-of-measure parameter + 必須是型別參數,不是測量單位參數 + + + + Expected type, not unit-of-measure + 必須是類型,不是測量單位 + + + + Expected unit-of-measure, not type + 必須是測量單位,不是類型 + + + + Units-of-measure cannot be used as prefix arguments to a type. Rewrite as postfix arguments in angle brackets. + 測量單位不能做為類型的前置引數使用。請重寫成括在角括號中的後置引數。 + + + + Unit-of-measure cannot be used in type constructor application + 測量單位不能用在類型建構函式應用程式中 + + + + This control construct may only be used if the computation expression builder defines a '{0}' method + 這個控制建構只能用在計算運算式產生器定義 '{0}' 方法時 + + + + This type has no nested types + 這種類型沒有巢狀類型 + + + + Unexpected {0} in type expression + 類型運算式中有未預期的 {0} + + + + Type parameter cannot be used as type constructor + 型別參數不能作為型別建構函式使用 + + + + Illegal syntax in type expression + 類型運算式中不合法的語法 + + + + Anonymous unit-of-measure cannot be nested inside another unit-of-measure expression + 匿名的測量單位無法巢狀於另一個測量單位運算式內 + + + + Anonymous type variables are not permitted in this declaration + 不允許在這個宣告中使用匿名的類型變數 + + + + Unexpected / in type + 類型中有未預期的 / + + + + Unexpected type arguments + 未預期的類型引數 + + + + Optional arguments are only permitted on type members + 只允許在類型成員上使用選擇性的引數 + + + + Name '{0}' not bound in pattern context + 名稱 '{0}' 未在模式內容中繫結 + + + + Non-primitive numeric literal constants cannot be used in pattern matches because they can be mapped to multiple different types through the use of a NumericLiteral module. Consider using replacing with a variable, and use 'when <variable> = <constant>' at the end of the match clause. + 非基本數值常值常數不能用在模式比對中,因為它們可以透過使用 NumericLiteral 模組對應到多種不同類型。請考慮用變數取代,並在比對子句結尾使用 'when <variable> = <constant>'。 + + + + Type arguments cannot be specified here + 此處不能指定類型引數 + + + + Only active patterns returning exactly one result may accept arguments + 只有剛好傳回一個結果的現用模式可以接受引數 + + + + Invalid argument to parameterized pattern label + 參數化模式標籤的引數無效 + + + + Internal error. Invalid index into active pattern array + 內部錯誤。現用模式陣列的索引無效 + + + + This union case does not take arguments + 這個聯集不接受引數 + + + + This union case takes one argument + 這個聯集接受一個引數 + + + + This union case expects {0} arguments in tupled form + 這個聯集需要 {0} 個 Tuple 形式的引數 + + + + Field '{0}' is not static + 欄位 '{0}' 不是靜態的 + + + + This field is not a literal and cannot be used in a pattern + 這個欄位不是常值,無法用在模式中 + + + + This is not a variable, constant, active recognizer or literal + 這不是變數、常數、現用辨識器或常值 + + + + This is not a valid pattern + 這不是有效的模式 + + + + Character range matches have been removed in F#. Consider using a 'when' pattern guard instead. + 字元範圍比對已從 F# 中移除。請考慮改用 'when' 模式成立條件。 + + + + Illegal pattern + 不合法的模式 + + + + Syntax error - unexpected '?' symbol + 語法錯誤 - 未預期的 '?' 符號 + + + + Expected {0} expressions, got {1} + 必須是 {0} 運算式,卻得到 {1} + + + + TcExprUndelayed: delayed + TcExprUndelayed: 已延遲 + + + + This expression form may only be used in sequence and computation expressions + 這種運算式形式只能用在循序項運算式和計算運算式中 + + + + Invalid object expression. Objects without overrides or interfaces should use the expression form 'new Type(args)' without braces. + 無效的物件運算式。沒有覆寫或介面的物件應該使用不加大括號的運算式形式 'new Type(args)'。 + + + + Invalid object, sequence or record expression + 無效的物件、順序或記錄運算式 + + + + Invalid record, sequence or computation expression. Sequence expressions should be of the form 'seq {{ ... }}' + 無效的記錄、循序項或計算運算式。循序項運算式應該是 'seq {{ ... }}' 形式。 + + + + This list or array expression includes an element of the form 'if ... then ... else'. Parenthesize this expression to indicate it is an individual element of the list or array, to disambiguate this from a list generated using a sequence expression + 這個清單或陣列運算式包含 'if ... then ... else' 形式的項目。請將這個運算式括在括號內,表示它是清單或陣列的個別項目,以區別這一項與使用循序項運算式產生的清單 + + + + Unable to parse format string '{0}' + 無法剖析格式字串 '{0}' + + + + This list expression exceeds the maximum size for list literals. Use an array for larger literals and call Array.ToList. + 這個清單運算式已超過清單常值的大小上限。請使用供較大常值使用的陣列,並呼叫 Array.ToList。 + + + + The expression form 'expr then expr' may only be used as part of an explicit object constructor + 運算式形式 'expr then expr' 只能用來做為明確物件建構函式的一部分 + + + + Named arguments cannot be given to member trait calls + 不能將具名引數指定給成員特性呼叫 + + + + This is not a valid name for an enumeration case + 這不是列舉案例的有效名稱 + + + + This field is not mutable + 這個欄位不是可變動的欄位 + + + + This construct may only be used within list, array and sequence expressions, e.g. expressions of the form 'seq {{ ... }}', '[ ... ]' or '[| ... |]'. These use the syntax 'for ... in ... do ... yield...' to generate elements + 此建構只可用於清單、陣列以及循序項運算式內,例如 'seq {{ ... }}'、'[ ... ]' 或 '[| ... |]' 形式的運算式。這些運算式使用語法 'for ... in ... do ... yield...' 來產生元素 + + + + This construct may only be used within computation expressions. To return a value from an ordinary function simply write the expression without 'return'. + 這個建構只能用在計算運算式內。若要從一般函式傳回值,只要撰寫沒有的 'return' 運算式。 + + + + This construct may only be used within sequence or computation expressions + 這個建構只能用在循序項運算式或計算運算式內 + + + + This construct may only be used within computation expressions + 這個建構只能用在計算運算式內 + + + + Invalid indexer expression + 無效的索引子運算式 + + + + The operator 'expr.[idx]' has been used on an object of indeterminate type based on information prior to this program point. Consider adding further type constraints + 運算子 'expr.[idx]' 已依據此程式點之前的資訊,用於不定類型的物件。請考慮新增進一步的類型限制式 + + + + Cannot inherit from a variable type + 無法繼承自變數類型 + + + + Calls to object constructors on type parameters cannot be given arguments + 呼叫類型參數的物件建構函式時不能指定引數 + + + + The 'CompiledName' attribute cannot be used with this language element + 'CompiledName' 屬性不能搭配這個語言項目一起使用 + + + + '{0}' may only be used with named types + '{0}' 只能搭配具名類型一起使用 + + + + 'inherit' cannot be used on interface types. Consider implementing the interface by using 'interface ... with ... end' instead. + 'inherit' 不能用在介面類型上。請考慮改用 'interface ... with ... end' 來實作介面。 + + + + 'new' cannot be used on interface types. Consider using an object expression '{{ new ... with ... }}' instead. + 'new' 不能用在介面類型上。請考慮改用物件運算式 '{{ new ... with ... }}'。 + + + + Instances of this type cannot be created since it has been marked abstract or not all methods have been given implementations. Consider using an object expression '{{ new ... with ... }}' instead. + 無法建立這種類型的執行個體,因為它已標記為抽象或不是所有方法都有實作。請考慮改用物件運算式 '{{ new ... with ... }}'。 + + + + It is recommended that objects supporting the IDisposable interface are created using the syntax 'new Type(args)', rather than 'Type(args)' or 'Type' as a function value representing the constructor, to indicate that resources may be owned by the generated value + 建議不要使用 'Type(args)' 或 'Type' 做為函式值來代表建構函式,而應使用 'new Type(args)' 來建立支援 IDisposable 介面的物件,以表示資源可由產生的值擁有 + + + + '{0}' may only be used to construct object types + '{0}' 只能用來建構物件類型 + + + + Constructors for the type '{0}' must directly or indirectly call its implicit object constructor. Use a call to the implicit object constructor instead of a record expression. + 類型 '{0}' 的建構函式必須直接或間接呼叫其隱含物件建構函式。請不要使用記錄運算式,改為呼叫隱含物件建構函式。 + + + + The field '{0}' has been given a value, but is not present in the type '{1}' + 欄位 '{0}' 已經指定值,但是未出現在類型 '{1}' 中 + + + + No assignment given for field '{0}' of type '{1}' + 未針對類型 '{1}' 的欄位 '{0}' 指定指派 + + + + Extraneous fields have been given values + 已經為沒有直接關聯的欄位指定值 + + + + Only overrides of abstract and virtual members may be specified in object expressions + 只有抽象和虛擬成員的覆寫可以在物件運算式中指定 + + + + The member '{0}' does not correspond to any abstract or virtual method available to override or implement. + 成員 '{0}' 未對應到可用於覆寫或實作的任何抽象或虛擬方法。 + + + + The type {0} contains the member '{1}' but it is not a virtual or abstract method that is available to override or implement. + 類型 {0} 包含成員 '{1}',但它不是可用於覆寫或實作的虛擬或抽象方法。 + + + + The member '{0}' does not accept the correct number of arguments. {1} argument(s) are expected, but {2} were given. The required signature is '{3}'.{4} + 成員 '{0}' 不接受正確數目的引數。應為 {1} 個引數,但提供了 {2} 個。必要特徵標記為 '{3}'。{4} + + + + The member '{0}' does not accept the correct number of arguments. One overload accepts {1} arguments, but {2} were given. The required signature is '{3}'.{4} + 成員 '{0}' 不接受正確數目的引數。一次多載接受 {1} 個引數,但提供了 {2} 個。必要特徵標記為 '{3}'。{4} + + + + A simple method name is required here + 此處要有簡單方法名稱 + + + + The types System.ValueType, System.Enum, System.Delegate, System.MulticastDelegate and System.Array cannot be used as super types in an object expression or class + 類型 System.ValueType、System.Enum、System.Delegate、System.MulticastDelegate 和 System.Array 不能做為物件運算式或類別中的超級類型使用 + + + + 'new' must be used with a named type + 'new' 必須搭配具名類型一起使用 + + + + Cannot create an extension of a sealed type + 無法建立密封類型的擴充 + + + + No arguments may be given when constructing a record value + 建構記錄值時未指定任何引數 + + + + Interface implementations cannot be given on construction expressions + 不能在建構運算式中指定介面實作 + + + + Object construction expressions may only be used to implement constructors in class types + 物件建構運算式只能用來實作類別類型中的建構函式 + + + + Only simple bindings of the form 'id = expr' can be used in construction expressions + 只有 'id = expr' 形式的簡單繫結可以用在建構運算式中 + + + + Objects must be initialized by an object construction expression that calls an inherited object constructor and assigns a value to each field + 物件必須用物件建構運算式初始化,該運算式必須呼叫繼承的物件建構函式,並為每個欄位指派值 + + + + Expected an interface type + 必須是介面類型 + + + + Constructor expressions for interfaces do not take arguments + 介面的建構函式運算式不接受引數 + + + + This object constructor requires arguments + 這個物件建構函式需要引數 + + + + 'new' may only be used with object constructors + 'new' 只能搭配物件建構函式一起使用 + + + + At least one override did not correctly implement its corresponding abstract member + 至少有一個覆寫未正確實作對應的抽象成員 + + + + This numeric literal requires that a module '{0}' defining functions FromZero, FromOne, FromInt32, FromInt64 and FromString be in scope + 這個數值常值要求定義函式 FromZero、FromOne、FromInt32、FromInt64 和 FromString 的模組 '{0}' 必須在範圍內 + + + + Invalid record construction + 無效的記錄建構 + + + + The expression form {{ expr with ... }} may only be used with record types. To build object types use {{ new Type(...) with ... }} + 運算式形式 {{ expr with ... }} 只能搭配記錄類型一起使用。若要建置物件類型,請使用 {{ new Type(...) with ... }} + + + + The inherited type is not an object model type + 繼承類型不是物件模型類型 + + + + Object construction expressions (i.e. record expressions with inheritance specifications) may only be used to implement constructors in object model types. Use 'new ObjectType(args)' to construct instances of object model types outside of constructors + 物件建構運算式 (亦即,含繼承規格的記錄運算式) 只能用來實作物件模型類型中的建構函式。請使用 'new ObjectType(args)' 來建構在建構函式外之物件模型類型的執行個體 + + + + '{{ }}' is not a valid expression. Records must include at least one field. Empty sequences are specified by using Seq.empty or an empty list '[]'. + '{{ }}' 不是有效的運算式。記錄至少必須包含一個欄位。使用 Seq.empty 或空白清單 '[]' 指定了空白順序。 + + + + This type is not a record type. Values of class and struct types must be created using calls to object constructors. + 這種類型不是記錄類型。類別和結構類型的值必須呼叫物件建構函式來建立。 + + + + This type is not a record type + 這種類型不是記錄類型 + + + + This construct is ambiguous as part of a computation expression. Nested expressions may be written using 'let _ = (...)' and nested computations using 'let! res = builder {{ ... }}'. + 這個建構是計算運算式中模稜兩可的一部分。巢狀運算式可以使用 'let _ = (...)' 撰寫,巢狀計算則使用 'let! res = builder {{ ... }}'。 + + + + This construct is ambiguous as part of a sequence expression. Nested expressions may be written using 'let _ = (...)' and nested sequences using 'yield! seq {{... }}'. + 這個建構是循序項運算式中模稜兩可的一部分。巢狀運算式可以使用 'let _ = (...)' 撰寫,巢狀順序則使用 'yield! seq {{... }}'。 + + + + 'do!' cannot be used within sequence expressions + 無法在循序項運算式內使用 'do!' + + + + The use of 'let! x = coll' in sequence expressions is not permitted. Use 'for x in coll' instead. + 不允許在循序項運算式中使用 'let! x = coll'。請改用 'for x in coll'。 + + + + 'try'/'with' cannot be used within sequence expressions + 'try'/'with' 不能搭配循序項運算式一起使用 + + + + In sequence expressions, multiple results are generated using 'yield!' + 在循序項運算式中,多個結果是使用 'yield!' 產生的 + + + + Invalid assignment + 無效的指派 + + + + Invalid use of a type name + 無效的類型名稱使用方式 + + + + This type has no accessible object constructors + 這種類型沒有可存取的物件建構函式 + + + + Invalid use of an interface type + 無效的介面類型使用方式 + + + + Invalid use of a delegate constructor. Use the syntax 'new Type(args)' or just 'Type(args)'. + 無效的委派建構函式使用方式。請使用 'new Type(args)' 語法或只用 'Type(args)'。 + + + + Property '{0}' is not static + 屬性 '{0}' 不是靜態的 + + + + Property '{0}' is not readable + 無法讀取屬性 '{0}' + + + + This lookup cannot be used here + 此處不能使用這個查詢 + + + + Property '{0}' is static + 屬性 '{0}' 是靜態的 + + + + Property '{0}' cannot be set + 無法設定屬性 '{0}' + + + + Constructors must be applied to arguments and cannot be used as first-class values. If necessary use an anonymous function '(fun arg1 ... argN -> new Type(arg1,...,argN))'. + 建構函式必須套用到引數,不能做為第一級值使用。如有必要,請使用匿名函式 '(fun arg1 ... argN -> new Type(arg1,...,argN))'。 + + + + The syntax 'expr.id' may only be used with record labels, properties and fields + 語法 'expr.id' 只能搭配記錄標籤、屬性和欄位一起使用 + + + + Event '{0}' is static + 事件 '{0}' 是靜態的 + + + + Event '{0}' is not static + 事件 '{0}' 不是靜態的 + + + + The named argument '{0}' did not match any argument or mutable property + 具名引數 '{0}' 不符合任何引數或可變動的屬性 + + + + One or more of the overloads of this method has curried arguments. Consider redesigning these members to take arguments in tupled form. + 這個方法的一個或多個多載有局部調用引數。請考慮重新設計這些成員,以接受 Tuple 形式的引數。 + + + + The unnamed arguments do not form a prefix of the arguments of the method called + 未命名引數不會構成所呼叫方法的引數前置詞 + + + + Static optimization conditionals are only for use within the F# library + 靜態最佳化條件式只用於 F# 程式庫內 + + + + The corresponding formal argument is not optional + 對應的正式引數不是選擇性的 + + + + Invalid optional assignment to a property or field + 無效的選擇性指派給屬性或欄位 + + + + A delegate constructor must be passed a single function value + 必須傳遞單一函式值給委派建構函式 + + + + A binding cannot be marked both 'use' and 'rec' + 無法同時將繫結標記為 'use' 和 'rec' + + + + The 'VolatileField' attribute may only be used on 'let' bindings in classes + 'VolatileField' 屬性只能用在類別的 'let' 繫結上 + + + + Attributes are not permitted on 'let' bindings in expressions + 不允許在運算式的 'let' 繫結上使用屬性 + + + + The 'DefaultValue' attribute may only be used on 'val' declarations + 'DefaultValue' 屬性只能用在 'val' 宣告上 + + + + The 'ConditionalAttribute' attribute may only be used on members + 'ConditionalAttribute' 屬性只能用在成員上 + + + + This is not a valid name for an active pattern + 這不是現用模式的有效名稱 + + + + The 'EntryPointAttribute' attribute may only be used on function definitions in modules + 'EntryPointAttribute' 屬性不能用在模組的函式定義上 + + + + Mutable values cannot be marked 'inline' + 可變動的值不能標記為 'inline' + + + + Mutable values cannot have generic parameters + 可變動的值不能有泛型參數 + + + + Mutable function values should be written 'let mutable f = (fun args -> ...)' + 可變動的函式值應該寫成 'let mutable f = (fun args -> ...)' + + + + Only functions may be marked 'inline' + 只有函式可以標記為 'inline' + + + + A literal value cannot be given the [<ThreadStatic>] or [<ContextStatic>] attributes + 無法為常值指定 [<ThreadStatic>] 或 [<ContextStatic>] 屬性 + + + + A literal value cannot be marked 'mutable' + 常值不能標記為 'mutable' + + + + A literal value cannot be marked 'inline' + 常值不能標記為 'inline' + + + + Literal values cannot have generic parameters + 常值不能有泛型參數 + + + + This is not a valid constant expression + 這不是有效的常數運算式 + + + + This type is not accessible from this code location + 無法從這個程式碼位置存取這種類型 + + + + Unexpected condition in imported assembly: failed to decode AttributeUsage attribute + 匯入的組件中有未預期的條件: 無法解碼 AttributeUsage 屬性 + + + + Unrecognized attribute target. Valid attribute targets are 'assembly', 'module', 'type', 'method', 'property', 'return', 'param', 'field', 'event', 'constructor'. + 無法辨識的屬性目標。有效的屬性目標為 'assembly'、'module'、'type'、'method'、'property'、'return'、'param'、'field'、'event'、'constructor'。 + + + + This attribute is not valid for use on this language element. Assembly attributes should be attached to a 'do ()' declaration, if necessary within an F# module. + 這個屬性不能用在這個語言項目上。組件屬性應該附加到 'do ()' 宣告 (如果 F# 模組中需要的話)。 + + + + This attribute is not valid for use on this language element + 這個屬性不能用在這個語言項目上 + + + + Optional arguments cannot be used in custom attributes + 選擇性的引數不能用在自訂屬性中 + + + + This property cannot be set + 無法設定這個屬性 + + + + This property or field was not found on this custom attribute type + 在這個自訂屬性類型上找不到這個屬性或欄位 + + + + A custom attribute must be a reference type + 自訂屬性必須是參考類型 + + + + The number of args for a custom attribute does not match the expected number of args for the attribute constructor + 自訂屬性的引數數目不符合屬性建構函式預期的引數數目 + + + + A custom attribute must invoke an object constructor + 自訂屬性必須叫用物件建構函式 + + + + Attribute expressions must be calls to object constructors + 屬性運算式必須是對物件建構函式的呼叫 + + + + This attribute cannot be used in this version of F# + 這個屬性不能用在這個版本的 F# 中 + + + + Invalid inline specification + 無效的內嵌規格 + + + + 'use' bindings must be of the form 'use <var> = <expr>' + 'use' 繫結必須採用 'use <var> = <expr>' 形式 + + + + Abstract members are not permitted in an augmentation - they must be defined as part of the type itself + 不允許在增強指定中使用抽象成員,必須將它們定義為類型自身的一部分 + + + + Method overrides and interface implementations are not permitted here + 此處不允許方法覆寫和介面實作 + + + + No abstract or interface member was found that corresponds to this override + 找不到對應到這個覆寫的抽象或介面成員 + + + + This override takes a different number of arguments to the corresponding abstract member. The following abstract members were found:{0} + 這項覆寫會針對對應的抽象成員,採用不同數目的引數。找到下列抽象成員: {0} + + + + This method already has a default implementation + 這個方法已經有預設實作 + + + + The method implemented by this default is ambiguous + 這個預設所實作的方法模稜兩可 + + + + No abstract property was found that corresponds to this override + 找不到對應到這個覆寫的抽象屬性 + + + + This property overrides or implements an abstract property but the abstract property doesn't have a corresponding {0} + 這個屬性會覆寫或實作抽象屬性,但抽象屬性沒有對應的 {0} + + + + Invalid signature for set member + 無效的集合成員簽章 + + + + This new member hides the abstract member '{0}'. Rename the member or use 'override' instead. + 這個新成員會隱藏抽象成員 '{0}'。請重新命名成員或改用 'override'。 + + + + This new member hides the abstract member '{0}' once tuples, functions, units of measure and/or provided types are erased. Rename the member or use 'override' instead. + 這個新成員在清除元組、函式、測量單位和/或提供的類型後會隱藏抽象成員 '{0}'。請重新命名成員或改用 'override'。 + + + + Interfaces cannot contain definitions of static initializers + 介面不能包含靜態初始設定式的定義 + + + + Interfaces cannot contain definitions of object constructors + 介面不能包含物件建構函式的定義 + + + + Interfaces cannot contain definitions of member overrides + 介面不能包含成員覆寫的定義 + + + + Interfaces cannot contain definitions of concrete members. You may need to define a constructor on your type to indicate that the type is a class. + 介面不能包含具象成員的定義。您必須在類型上定義建構函式,以指示類型是類別。 + + + + Constructors cannot be specified in exception augmentations + 建構函式不能在例外狀況增強指定中指定 + + + + Structs cannot have an object constructor with no arguments. This is a restriction imposed on all CLI languages as structs automatically support a default constructor. + 結構不能有不含引數的物件建構函式。這是對所有 CLI 語言施加的限制,因為結構會自動支援預設建構函式。 + + + + Constructors cannot be defined for this type + 無法為這個類型定義建構函式 + + + + Recursive bindings that include member specifications can only occur as a direct augmentation of a type + 包含成員規格的遞迴繫結只能做為類型的直接增強指定 + + + + Only simple variable patterns can be bound in 'let rec' constructs + 只有簡單的變數模式可以在 'let rec' 建構中繫結 + + + + Only record fields and simple, non-recursive 'let' bindings may be marked mutable + 只有記錄欄位及簡單的非遞迴 'let' 繫結可以標記為可變動 + + + + This member is not sufficiently generic + 這個成員的一般程度不足 + + + + A declaration may only be the [<Literal>] attribute if a constant value is also given, e.g. 'val x : int = 1' + 如果一併指定了常數值,則宣告只可為 [<Literal>] 屬性,例如 'val x : int = 1' + + + + A declaration may only be given a value in a signature if the declaration has the [<Literal>] attribute + 只有當宣告有 [<Literal>] 屬性時,才能為簽章中的宣告指定值 + + + + Thread-static and context-static variables must be static and given the [<DefaultValue>] attribute to indicate that the value is initialized to the default value on each new thread + Thread-static 與 context-static 變數必須是靜態變數,且必須為其指定 [<DefaultValue>] 屬性,以表示每個新執行緒的該值都會初始化為預設值 + + + + Volatile fields must be marked 'mutable' and cannot be thread-static + Volatile 欄位必須標記為 'mutable',而且不能是 Thread 靜態的 + + + + Uninitialized 'val' fields must be mutable and marked with the '[<DefaultValue>]' attribute. Consider using a 'let' binding instead of a 'val' field. + 未初始化的 'val' 欄位必須是可變動欄位,並標記有 '[<DefaultValue>]' 屬性。請考慮使用 'let' 繫結來取代 'val' 欄位。 + + + + Static 'val' fields in types must be mutable, private and marked with the '[<DefaultValue>]' attribute. They are initialized to the 'null' or 'zero' value for their type. Consider also using a 'static let mutable' binding in a class type. + 類型中的靜態 'val' 欄位必須是可變動欄位且為私用,並標記有 '[<DefaultValue>]' 屬性。它們會始化為成其類型的 'null' 或 'zero' 值。請一併考慮在類別類型中使用 'static let mutable' 繫結。 + + + + This field requires a name + 這個欄位需要名稱 + + + + Invalid namespace, module, type or union case name + 無效的命名空間、模組、類型或聯集名稱 + + + + Explicit type declarations for constructors must be of the form 'ty1 * ... * tyN -> resTy'. Parentheses may be required around 'resTy' + 建構函式的明確類型宣告必須採用 'ty1 * ... * tyN -> resTy' 形式。可能必須在 'resTy' 周圍使用括號 + + + + Return types of union cases must be identical to the type being defined, up to abbreviations + 聯集的傳回類型必須與所定義的類型一樣,直到縮寫為止 + + + + This is not a valid value for an enumeration literal + 這不是列舉常值的有效值 + + + + The type '{0}' is not an interface type + 類型 '{0}' 不是介面類型 + + + + Duplicate specification of an interface + 介面有重複的規格 + + + + A field/val declaration is not permitted here + 此處不允許欄位/val 宣告 + + + + A inheritance declaration is not permitted here + 此處不允許繼承宣告 + + + + This declaration opens the module '{0}', which is marked as 'RequireQualifiedAccess'. Adjust your code to use qualified references to the elements of the module instead, e.g. 'List.map' instead of 'map'. This change will ensure that your code is robust as new constructs are added to libraries. + 這個宣告會開啟標記為 'RequireQualifiedAccess' 的模組 '{0}'。請將您的程式碼調整為改用模組項目的限定參考,例如 'List.map',而不是 'map'。這項變更將確保在新建構加入至程式庫時,您的程式碼可以更為強固。 + + + + This declaration opens the namespace or module '{0}' through a partially qualified path. Adjust this code to use the full path of the namespace. This change will make your code more robust as new constructs are added to the F# and CLI libraries. + 這個宣告會透過部分限定名稱開啟命名空間或模組 '{0}'。請調整這個程式碼,使用命名空間的完整路徑。這項變更將確保在新建構加入至 F# 和 CLI 程式庫時,您的程式碼可以更為強固。 + + + + Local class bindings cannot be marked inline. Consider lifting the definition out of the class or else do not mark it as inline. + 區域類別繫結不能標記為內嵌。請考慮將定義移出類別,或不將它標記為內嵌。 + + + + Type abbreviations cannot have members + 類型縮寫不能有成員 + + + + As of F# 4.1, the accessibility of type abbreviations is checked at compile-time. Consider changing the accessibility of the type abbreviation. Ignoring this warning might lead to runtime errors. + 自 F# 4.1 起,類型縮寫的協助工具會於編譯時期經過檢查。請考慮變更類型縮寫的協助工具。略過此警告會導致執行階段錯誤。 + + + + Enumerations cannot have members + 列舉值不能有成員 + + + + Measure declarations may have only static members + 測量宣告只能有靜態成員 + + + + Structs cannot contain 'do' bindings because the default constructor for structs would not execute these bindings + 結構不能包含 'do' 繫結,因為結構的預設建構函式不會執行這些繫結 + + + + Structs cannot contain value definitions because the default constructor for structs will not execute these bindings. Consider adding additional arguments to the primary constructor for the type. + 結構不能包含值定義,因為結構的預設建構函式不會執行這些繫結。請考慮將其他引數加入類型的主要建構函式。 + + + + Static value definitions may only be used in types with a primary constructor. Consider adding arguments to the type definition, e.g. 'type X(args) = ...'. + 靜態值定義只能用於含有主要建構函式的類型中。請考慮在類型定義加入引數,例如 'type X(args) = ...'。 + + + + Measure declarations may have only static members: constructors are not available + 測量宣告只能有靜態成員: 無法使用建構函式 + + + + A member and a local class binding both have the name '{0}' + 成員和區域類別繫結都有名稱 '{0}' + + + + Type abbreviations cannot have interface declarations + 類型縮寫不能有介面宣告 + + + + Enumerations cannot have interface declarations + 列舉值不能有介面宣告 + + + + This type is not an interface type + 這種類型不是介面類型 + + + + All implemented interfaces should be declared on the initial declaration of the type + 所有實作的介面都應該在類型的初始宣告上宣告 + + + + A default implementation of this interface has already been added because the explicit implementation of the interface was not specified at the definition of the type + 已經加入這個介面的預設實作,因為未在類型的定義指定介面的明確實作 + + + + This member is not permitted in an interface implementation + 不允許在介面實作中使用這個成員 + + + + This declaration element is not permitted in an augmentation + 不允許在增強指定中使用這個宣告項目 + + + + Types cannot contain nested type definitions + 類型不能包含巢狀類型定義 + + + + type, exception or module + 類型、例外狀況或模組 + + + + type or module + 類型或模組 + + + + The struct, record or union type '{0}' implements the interface 'System.IStructuralEquatable' explicitly. Apply the 'CustomEquality' attribute to the type. + 結構、記錄或等位型別 '{0}' 明確實作了介面 'System.IStructuralEquatable'。請將 'CustomEquality' 屬性套用到該型別。 + + + + The struct, record or union type '{0}' implements the interface 'System.IEquatable<_>' explicitly. Apply the 'CustomEquality' attribute to the type and provide a consistent implementation of the non-generic override 'System.Object.Equals(obj)'. + 結構、記錄或等位型別 '{0}' 明確實作了介面 'System.IEquatable<_>'。您必須將 'CustomEquality' 屬性套用到該型別,並為非泛型覆寫 'System.Object.Equals(obj)' 提供一致的實作。 + + + + Explicit type specifications cannot be used for exception constructors + 明確的類型規格不能用於例外狀況建構函式 + + + + Exception abbreviations should not have argument lists + 例外狀況縮寫不應該有引數清單 + + + + Abbreviations for Common IL exceptions cannot take arguments + Common IL 例外狀況的縮寫不能接受引數 + + + + Exception abbreviations must refer to existing exceptions or F# types deriving from System.Exception + 例外狀況縮寫必須參考現有的例外狀況,或衍生自 System.Exception 的 F# 類型 + + + + Abbreviations for Common IL exception types must have a matching object constructor + Common IL 例外狀況類型的縮寫必須有對應的物件建構函式 + + + + Not an exception + 不是例外狀況 + + + + Invalid module name + 無效的模組名稱 + + + + Invalid type extension + 無效的類型擴充 + + + + The attributes of this type specify multiple kinds for the type + 這種類型的屬性為類型指定了多種類型 + + + + The kind of the type specified by its attributes does not match the kind implied by its definition + 由其屬性指定的類型類型不符合其定義所隱含的類型 + + + + Measure definitions cannot have type parameters + 測量定義不能有類型參數 + + + + This type requires a definition + 這個類型需要定義 + + + + This type abbreviation has one or more declared type parameters that do not appear in the type being abbreviated. Type abbreviations must use all declared type parameters in the type being abbreviated. Consider removing one or more type parameters, or use a concrete type definition that wraps an underlying type, such as 'type C<'a> = C of ...'. + 這個類型縮寫有一個或多個未出現在所縮寫類型中的宣告型別參數。類型縮寫必須使用所縮寫類型中的所有宣告型別參數。請考慮移除一個或多個型別參數,或使用包裝基礎類型的具象類型定義,例如 'type C<'a> = C of ...'。 + + + + Structs, interfaces, enums and delegates cannot inherit from other types + 結構、介面、列舉和委派不能繼承自其他類型 + + + + Types cannot inherit from multiple concrete types + 類型不能繼承自多個具象類型 + + + + Records, union, abbreviations and struct types cannot have the 'AllowNullLiteral' attribute + 記錄、等位、縮寫和結構類型不能有 'AllowNullLiteral' 屬性 + + + + Types with the 'AllowNullLiteral' attribute may only inherit from or implement types which also allow the use of the null literal + 具 'AllowNullLiteral' 屬性的類型只能繼承自或實作允許使用 null 常值的類型 + + + + Generic types cannot be given the 'StructLayout' attribute + 不能為泛型類型指定 'StructLayout' 屬性 + + + + Only structs and classes without primary constructors may be given the 'StructLayout' attribute + 只能為不含主要建構函式的結構和類別指定 'StructLayout' 屬性 + + + + The representation of this type is hidden by the signature. It must be given an attribute such as [<Sealed>], [<Class>] or [<Interface>] to indicate the characteristics of the type. + 此類型的表示法已由簽章所隱藏。必須為其指定 [<Sealed>]、[<Class>] 或 [<Interface>] 一類的屬性,以指示該類型的特性。 + + + + Only classes may be given the 'AbstractClass' attribute + 只能為類別指定 'AbstractClass' 屬性 + + + + Only types representing units-of-measure may be given the 'Measure' attribute + 只能為代表測量單位的類型指定 'Measure' 屬性 + + + + Accessibility modifiers are not permitted on overrides or interface implementations + 不允許在覆寫或介面實作上使用存取範圍修飾詞 + + + + Discriminated union types are always sealed + 差別等位類型永遠是密封的 + + + + Record types are always sealed + 記錄類型永遠是密封的 + + + + Assembly code types are always sealed + 組譯程式碼類型永遠是密封的 + + + + Struct types are always sealed + 結構類型永遠是密封的 + + + + Delegate types are always sealed + 委派類型永遠是密封的 + + + + Enum types are always sealed + 列舉類型永遠是密封的 + + + + Interface types and delegate types cannot contain fields + 介面類型和委派類型不能包含欄位 + + + + Abbreviated types cannot be given the 'Sealed' attribute + 不能為縮寫的類型指定 'Sealed' 屬性 + + + + Cannot inherit a sealed type + 無法繼承密封類型 + + + + Cannot inherit from interface type. Use interface ... with instead. + 無法繼承自介面類型。請改用 interface ... with。 + + + + Struct types cannot contain abstract members + 結構類型不能包含抽象成員 + + + + Interface types cannot be sealed + 介面類型不可以是密封的 + + + + Delegate specifications must be of the form 'typ -> typ' + 委派規格必須採用 'typ -> typ' 形式 + + + + Delegate specifications must not be curried types. Use 'typ * ... * typ -> typ' for multi-argument delegates, and 'typ -> (typ -> typ)' for delegates returning function values. + 委派規格不可以是局部調用類型。請使用 'typ * ... * typ -> typ' 用於多引數委派,使用 'typ -> (typ -> typ)' 用於傳回函式值的委派。 + + + + Literal enumerations must have type int, uint, int16, uint16, int64, uint64, byte, sbyte or char + 常值列舉值必須為類型 int、uint、int16、uint16、int64、uint64、byte、sbyte 或 char + + + + This type definition involves an immediate cyclic reference through an abbreviation + 這個類型定義涉及透過縮寫的立即循環參考 + + + + This type definition involves an immediate cyclic reference through a struct field or inheritance relation + 這個類型定義涉及透過結構欄位或繼承關係的立即循環參考 + + + + The syntax 'type X with ...' is reserved for augmentations. Types whose representations are hidden but which have members are now declared in signatures using 'type X = ...'. You may also need to add the '[<Sealed>] attribute to the type definition in the signature + 語法 'type X with ...' 已保留供增強指定使用。對於其表示式已隱藏,但是有成員的類型而言,現在會使用 'type X = ...' 宣告於簽章中。您也必須將 '[<Sealed>] 屬性新增至簽章中的類型定義 + + + + Members that extend interface, delegate or enum types must be placed in a module separate to the definition of the type. This module must either have the AutoOpen attribute or be opened explicitly by client code to bring the extension members into scope. + 擴充介面、委派或列舉類型的成員必須放在模組中,與類型的定義分開。這個模組必須有 AutoOpen 屬性,或是由用戶端程式碼明確開啟,來將擴充成員帶入範圍內。 + + + + One or more of the declared type parameters for this type extension have a missing or wrong type constraint not matching the original type constraints on '{0}' + 此類型延伸模組所宣告的型別參數中,有一或多個缺少類型條件約束,或類型條件約束不正確,不符合 '{0}' 的原始類型條件約束 + + + + Type definitions may only have one 'inherit' specification and it must be the first declaration + 類型定義只能有一個 'inherit' 規格,而且必須是第一個宣告 + + + + 'let' and 'do' bindings must come before member and interface definitions in type definitions + 'let' 和 'do' 繫結必須在類型定義中的成員和介面定義的前面 + + + + This 'inherit' declaration specifies the inherited type but no arguments. Consider supplying arguments, e.g. 'inherit BaseType(args)'. + 這個 'inherit' 宣告指定繼承類型,但沒有引數。請考慮提供引數,例如 'inherit BaseType(args)'。 + + + + This 'inherit' declaration has arguments, but is not in a type with a primary constructor. Consider adding arguments to your type definition, e.g. 'type X(args) = ...'. + 這個 'inherit' 宣告具有引數,但不在含有主要建構函式的類型中。請考慮在您的類型定義加入引數,例如 'type X(args) = ...'。 + + + + This definition may only be used in a type with a primary constructor. Consider adding arguments to your type definition, e.g. 'type X(args) = ...'. + 這個定義只能用於含有主要建構函式的類型中。請考慮在您的類型定義加入引數,例如 'type X(args) = ...'。 + + + + Type abbreviations cannot have augmentations + 類型縮寫不能有增強指定 + + + + The path '{0}' is a namespace. A module abbreviation may not abbreviate a namespace. + 路徑 '{0}' 是命名空間。模組縮寫不可用來縮寫命名空間。 + + + + The type '{0}' is used in an invalid way. A value prior to '{1}' has an inferred type involving '{2}', which is an invalid forward reference. + 類型 '{0}' 的使用方式無效。在 '{1}' 之前的值具有涉及 '{2}' 的推斷類型,這是無效的向前參考。 + + + + The member '{0}' is used in an invalid way. A use of '{1}' has been inferred prior to the definition of '{2}', which is an invalid forward reference. + 成員 '{0}' 的使用方式無效。系統推斷 '{1}' 在 '{2}' 的定義之前已經使用過,這是無效的向前參考。 + + + + The attribute 'AutoOpen(\"{0}\")' in the assembly '{1}' did not refer to a valid module or namespace in that assembly and has been ignored + 組件 '{1}' 中的 'AutoOpen(\"{0}\")' 屬性未參考該組件中有效的模組或命名空間,所以已予以忽略 + + + + Undefined value '{0}' + 未定義的值 '{0}' + + + + Label {0} not found + 找不到標籤 {0} + + + + Incorrect number of type arguments to local call + 區域呼叫的類型引數數目不正確 + + + + Dynamic invocation of {0} is not supported + 不支援 {0} 的動態引動 + + + + Taking the address of a literal field is invalid + 接受常值欄位的位址無效 + + + + This operation involves taking the address of a value '{0}' represented using a local variable or other special representation. This is invalid. + 這項作業涉及接受值 '{0}' 的位址,且這個值是使用區域變數或其他特殊表示方式表示。這種作法無效。 + + + + Custom marshallers cannot be specified in F# code. Consider using a C# helper function. + 在 F# 程式碼中不能指定自訂封送處理器。請考慮使用 C# 協助程式函式。 + + + + The MarshalAs attribute could not be decoded + 無法解碼 MarshalAs 屬性 + + + + The signature for this external function contains type parameters. Constrain the argument and return types to indicate the types of the corresponding C function. + 這個外部函式的簽章包含型別參數。請限制引數和傳回型別,以指示對應 C 函式的類型。 + + + + The DllImport attribute could not be decoded + 無法解碼 DllImport 屬性 + + + + Literal fields cannot be set + 無法設定常值欄位 + + + + GenSetStorage: {0} was represented as a static method but was not an appropriate lambda expression + GenSetStorage: {0} 是以靜態方法表示,但它不是適當的 Lambda 運算式 + + + + Mutable variables cannot escape their method + 可變動的變數無法逸出其方法 + + + + Compiler error: unexpected unrealized value + 編譯器錯誤: 非預期的未實現值 + + + + Main module of program is empty: nothing will happen when it is run + 程式的主要模組是空的: 執行時不會產生任何作用 + + + + This type cannot be used for a literal field + 這種類型不能做為常值欄位使用 + + + + Unexpected GetSet annotation on a property + 屬性有非預期的 GetSet 註釋 + + + + The FieldOffset attribute could not be decoded + 無法解碼 FieldOffset 屬性 + + + + The StructLayout attribute could not be decoded + 無法解碼 StructLayout 屬性 + + + + The DefaultAugmentation attribute could not be decoded + 無法解碼 DefaultAugmentation 屬性 + + + + Reflected definitions cannot contain uses of the prefix splice operator '%' + 反映的定義不能含有前置接合運算子 '%' 的用法 + + + + Problem with codepage '{0}': {1} + 字碼頁 '{0}' 有問題: {1} + + + + Copyright (c) Microsoft Corporation. All Rights Reserved. + Copyright (c) Microsoft Corporation. 著作權所有,並保留一切權利。 + + + + Freely distributed under the MIT Open Source License. https://github.com/Microsoft/visualfsharp/blob/master/License.txt + 依 MIT 開啟來源授權自由散發。https://github.com/Microsoft/visualfsharp/blob/master/License.txt + + + + Name of the output file (Short form: -o) + 輸出檔的名稱 (簡短形式: -o) + + + + Build a console executable + 建置主控台可執行檔 + + + + Build a Windows executable + 建置 Windows 可執行檔 + + + + Build a library (Short form: -a) + 建置程式庫 (簡短形式: -a) + + + + Build a module that can be added to another assembly + 建置可以加入至其他組件的模組 + + + + Delay-sign the assembly using only the public portion of the strong name key + 只使用強式名稱金鑰的公開金鑰延遲簽署組件 + + + + Public-sign the assembly using only the public portion of the strong name key, and mark the assembly as signed + 僅使用強式名稱金鑰的公開金鑰公開簽署組件,並將組件標記為已簽署 + + + + Write the xmldoc of the assembly to the given file + 將組件的 xmldoc 寫入指定檔案 + + + + Specify a strong name key file + 指定強式名稱金鑰檔 + + + + Specify a strong name key container + 指定強式名稱金鑰容器 + + + + Limit which platforms this code can run on: x86, Itanium, x64, anycpu32bitpreferred, or anycpu. The default is anycpu. + 限制這個程式碼可以在哪些平台執行: x86、Itanium、x64、anycpu32bitpreferred 或 anycpu。預設為 anycpu。 + + + + Only include optimization information essential for implementing inlined constructs. Inhibits cross-module inlining but improves binary compatibility. + 只包含實作內嵌建構必要的最佳化資訊。禁止跨模組內嵌,但改進了二進位碼相容性。 + + + + Don't add a resource to the generated assembly containing F#-specific metadata + 不將資源加入包含 F# 特有中繼資料的產生組件 + + + + Print the inferred interface of the assembly to a file + 將組件的推斷介面列印到檔案 + + + + Reference an assembly (Short form: -r) + 參考組件 (簡短形式: -r) + + + + Specify a Win32 resource file (.res) + 指定 Win32 資源檔 (.res) + + + + Specify a Win32 manifest file + 指定 Win32 資訊清單檔案 + + + + Do not include the default Win32 manifest + 不要包含預設的 Win32 資訊清單 + + + + Embed all source files in the portable PDB file + 內嵌可攜式 PDB 檔案中的所有來源檔案 + + + + Embed specific source files in the portable PDB file + 內嵌可攜式 PDB 檔案中的特定來源檔案 + + + + Source link information file to embed in the portable PDB file + 要內嵌於可攜式 PDB 檔案中的來源連結資訊檔案 + + + + --embed switch only supported when emitting a Portable PDB (--debug:portable or --debug:embedded) + 僅在發出可攜式 PDB 時才支援 --embed 參數 (--debug:portable 或 --debug:embedded) + + + + --sourcelink switch only supported when emitting a Portable PDB (--debug:portable or --debug:embedded) + 僅在發出可攜式 PDB 時才支援 --sourcelink 參數 (--debug:portable 或 --debug:embedded) + + + + Source file is too large to embed in a portable PDB + 來源檔案過大,無法內嵌於可攜式 PDB 中 + + + + Embed the specified managed resource + 嵌入指定的受控資源 + + + + Link the specified resource to this assembly where the resinfo format is <file>[,<string name>[,public|private]] + 將指定的資源連結至此組件,其中 resinfo 的格式是 <檔案>[,<字串名稱>[,public|private]] + + + + Emit debug information (Short form: -g) + 發出偵錯資訊 (簡短形式: -g) + + + + Specify debugging type: full, portable, embedded, pdbonly. ('{0}' is the default if no debuggging type specified and enables attaching a debugger to a running program, 'portable' is a cross-platform format, 'embedded' is a cross-platform format embedded into the output file). + 指定偵錯類型: full、portable、embedded、pdbonly。(如果未指定偵錯類型,即預設為 '{0}',並允許將偵錯工具附加到正在執行的程式,'portable' 為跨平台格式,'embedded' 為輸出檔案內嵌的跨平台格式)。 + + + + Enable optimizations (Short form: -O) + 啟用最佳化 (簡短形式: -O) + + + + Enable or disable tailcalls + 啟用或停用 Tail 呼叫 + + + + Produce a deterministic assembly (including module version GUID and timestamp) + 產生確定性組件 (包括模組版本 GUID 及時間戳記) + + + + Enable or disable cross-module optimizations + 啟用或停用跨模組最佳化 + + + + Report all warnings as errors + 將所有警告回報為錯誤 + + + + Report specific warnings as errors + 將特定的警告回報為錯誤 + + + + Set a warning level (0-5) + 設定警告層級 (0-5) + + + + Disable specific warning messages + 停用特定的警告訊息 + + + + Enable specific warnings that may be off by default + 啟用預設可能關閉的特定警告 + + + + Generate overflow checks + 產生溢位核對 + + + + Define conditional compilation symbols (Short form: -d) + 定義條件式編譯的符號 (簡短形式: -d) + + + + Ignore ML compatibility warnings + 忽略 ML 相容性警告 + + + + + Display this usage message (Short form: -?) + 顯示此訊息 (簡短形式: -?) + + + + Read response file for more options + 如需了解更多選項,請參閱回應檔 + + + + Specify the codepage used to read source files + 指定用來讀取原始程式檔的字碼頁 + + + + Output messages in UTF-8 encoding + 以 UTF-8 編碼輸出訊息 + + + + Output messages with fully qualified paths + 輸出含完整路徑的訊息 + + + + Specify a directory for the include path which is used to resolve source files and assemblies (Short form: -I) + 指定用於 Include 路徑的目錄,它是用來解析原始程式檔和組件 (簡短形式: -I) + + + + Base address for the library to be built + 要建置程式庫的基底位址 + + + + Do not reference the default CLI assemblies by default + 不預設參考預設的 CLI 組件 + + + + Statically link the F# library and all referenced DLLs that depend on it into the assembly being generated + 將 F# 程式庫和所有依存於它的被參考 DLL 靜態連結到所產生的組件中 + + + + Statically link the given assembly and all referenced DLLs that depend on this assembly. Use an assembly name e.g. mylib, not a DLL name. + 靜態連結指定的組件和所有依存於這個組件的被參考 DLL。請使用組件名稱 (例如 mylib) 而不是 DLL 名稱。 + + + + Use a resident background compilation service to improve compiler startup times. + 使用常駐背景編譯服務改善編譯器的啟動時間。 + + + + Name the output debug file + 為輸出偵錯檔命名 + + + + Resolve assembly references using directory-based rules rather than MSBuild resolution + 使用以目錄為基礎的規則解析組件參考,而不使用 MSBuild 解析 + + + + Unrecognized target '{0}', expected 'exe', 'winexe', 'library' or 'module' + 無法辨識的目標 '{0}',必須是 'exe'、'winexe'、'library' 或 'module' + + + + Unrecognized debug type '{0}', expected 'pdbonly' or 'full' + 無法辨識的偵錯類型 '{0}',必須是 'pdbonly' 或 'full' + + + + Invalid warning level '{0}' + 無效的警告層級 '{0}' + + + + Short form of '{0}' + '{0}' 的簡短形式 + + + + The command-line option '--cliroot' has been deprecated. Use an explicit reference to a specific copy of mscorlib.dll instead. + 命令列選項 '--cliroot' 已被取代。請改用明確參考,來指定 mscorlib.dll 的複本。 + + + + Use to override where the compiler looks for mscorlib.dll and framework components + 用來覆寫編譯器尋找 mscorlib.dll 和 Framework 元件的位置 + + + + - OUTPUT FILES - + - 輸出檔 - + + + + - INPUT FILES - + - 輸入檔 - + + + + - RESOURCES - + - 資源 - + + + + - CODE GENERATION - + - 程式碼產生 - + + + + - ADVANCED - + - 進階 - + + + + - MISCELLANEOUS - + - 其他 - + + + + - LANGUAGE - + - 語言 - + + + + - ERRORS AND WARNINGS - + - 錯誤和警告 - + + + + Unknown --test argument: '{0}' + 未知的 --test 引數: '{0}' + + + + Unrecognized platform '{0}', valid values are 'x86', 'x64', 'Itanium', 'anycpu32bitpreferred', and 'anycpu' + 無法辨識的平台 '{0}',有效的值是 'x86'、'x64'、'Itanium'、'anycpu32bitpreferred' 和 'anycpu' + + + + The command-line option '{0}' is for test purposes only + 命令列選項 '{0}' 僅供測試用途 + + + + The command-line option '{0}' has been deprecated + 命令列選項 '{0}' 已被取代 + + + + The command-line option '{0}' has been deprecated. Use '{1}' instead. + 命令列選項 '{0}' 已被取代。請改用 '{1}'。 + + + + The command-line option '{0}' has been deprecated. HTML document generation is now part of the F# Power Pack, via the tool FsHtmlDoc.exe. + 命令列選項 '{0}' 已被取代。HTML 文件產生現在是 F# Power Pack 的一部分,會透過工具 FsHtmlDoc.exe 進行。 + + + + Output warning and error messages in color + 輸出彩色的警告和錯誤訊息 + + + + Enable high-entropy ASLR + 啟用高熵 ASLR + + + + Specify subsystem version of this assembly + 指定這個組件的子系統版本 + + + + Specify target framework profile of this assembly. Valid values are mscorlib, netcore or netstandard. Default - mscorlib + 指定此組件的目標 Framework 設定檔。有效值為 mscorlib 或 netcore 或 netstandard。預設值 - mscorlib + + + + Emit debug information in quotations + 發出在引號內的偵錯資訊 + + + + Specify the preferred output language culture name (e.g. es-ES, ja-JP) + 指定慣用輸出語言的文化特性名稱 (例如 es-ES、ja-JP) + + + + Don't copy FSharp.Core.dll along the produced binaries + 不同時複製 FSharp.Core.dll 及所產生的二進位檔案 + + + + Invalid version '{0}' for '--subsystemversion'. The version must be 4.00 or greater. + '--subsystemversion' 的版本 '{0}' 無效。版本必須是 4.00 (含) 以上版本。 + + + + Invalid value '{0}' for '--targetprofile', valid values are 'mscorlib', 'netcore' or 'netstandard'. + '--targetprofile' 的值 '{0}' 無效。有效值為 'mscorlib'、'netcore' 或 'netstandard'。 + + + + Full name + 完整名稱 + + + + and {0} other overloads + 和 {0} 個其他多載 + + + + union case + 聯集 + + + + active pattern result + 現用模式結果 + + + + active recognizer + 現用辨識器 + + + + field + 欄位 + + + + event + 事件 + + + + property + 屬性 + + + + extension + 擴充功能 + + + + custom operation + 自訂作業 + + + + argument + 引數 + + + + patvar + patvar + + + + namespace + 命名空間 + + + + module + 模組 + + + + namespace/module + 命名空間/模組 + + + + from {0} + 來自 {0} + + + + also from {0} + 也來自 {0} + + + + generated property + 產生的屬性 + + + + generated type + 產生的類型 + + + + Found by AssemblyFolders registry key + 依 AssemblyFolders 登錄機碼找到 + + + + Found by AssemblyFoldersEx registry key + 依 AssemblyFoldersEx 登錄機碼找到 + + + + .NET Framework + .NET Framework + + + + Global Assembly Cache + 全域組件快取 + + + + Recursive class hierarchy in type '{0}' + 類型 '{0}' 中有遞迴的類別階層 + + + + Invalid recursive reference to an abstract slot + 抽象位置的遞迴參考無效 + + + + The event '{0}' has a non-standard type. If this event is declared in another CLI language, you may need to access this event using the explicit {1} and {2} methods for the event. If this event is declared in F#, make the type of the event an instantiation of either 'IDelegateEvent<_>' or 'IEvent<_,_>'. + 事件 '{0}' 有非標準類型。如果這個事件是在另一個 CLI 語言中宣告,您必須使用這個事件的明確 {1} 和 {2} 方法來存取這個事件。如果這個事件是在 F# 中宣告,則請將事件的類型設為 'IDelegateEvent<_>' 或 'IEvent<_,_>' 的具現化。 + + + + The type '{0}' is not accessible from this code location + 無法從這個程式碼位置存取類型 '{0}' + + + + The union cases or fields of the type '{0}' are not accessible from this code location + 無法從這個程式碼位置存取類型 '{0}' 的聯集或欄位 + + + + The value '{0}' is not accessible from this code location + 無法從這個程式碼位置存取值 '{0}' + + + + The union case '{0}' is not accessible from this code location + 無法從這個程式碼位置存取聯集 '{0}' + + + + The record, struct or class field '{0}' is not accessible from this code location + 無法從這個程式碼位置存取記錄、結構或類別欄位 '{0}' + + + + The struct or class field '{0}' is not accessible from this code location + 無法從這個程式碼位置存取結構或類別欄位 '{0}' + + + + This construct is experimental + 這個建構是實驗性質的 + + + + No Invoke methods found for delegate type + 找不到委派類型的 Invoke 方法 + + + + More than one Invoke method found for delegate type + 找到委派類型的多個 Invoke 方法 + + + + Delegates are not allowed to have curried signatures + 不允許委派有局部調用簽章 + + + + Unexpected Expr.TyChoose + 未預期的 Expr.TyChoose + + + + Note: Lambda-lifting optimizations have not been applied because of the use of this local constrained generic function as a first class value. Adding type constraints may resolve this condition. + 注意: 尚未套用 Lambda-lifting 最佳化,因為使用這個區域變數會將泛型函式限制為第一級值。加入類型條件約束或許可以解決這個狀況。 + + + + Identifiers containing '@' are reserved for use in F# code generation + 包含 '@' 的識別碼已保留供 F# 程式碼產生使用 + + + + The identifier '{0}' is reserved for future use by F# + 識別碼 '{0}' 已保留供 F# 未來使用 + + + + Missing variable '{0}' + 遺漏變數 '{0}' + + + + Partial active patterns may only generate one result + 部分現用模式只能產生一個結果 + + + + The type '{0}' is required here and is unavailable. You must add a reference to assembly '{1}'. + 此處需要類型 '{0}',但無法取得。您必須加入組件 '{1}' 的參考。 + + + + A reference to the type '{0}' in assembly '{1}' was found, but the type could not be found in that assembly + 發現組件 '{1}' 中類型 '{0}' 的參考,但在該組件中找不到該類型 + + + + Internal error or badly formed metadata: not enough type parameters were in scope while importing + 內部錯誤或形式不正確的中繼資料: 匯入時範圍中的型別參數不足 + + + + A reference to the DLL {0} is required by assembly {1}. The imported type {2} is located in the first assembly and could not be resolved. + 組件 {1} 需要 DLL {0} 的參考。匯入的類型 {2} 位在第一個組件中,但無法解析。 + + + + An imported assembly uses the type '{0}' but that type is not public + 匯入的組件使用類型 '{0}',但該類型不是公用類型 + + + + The value '{0}' was marked inline but its implementation makes use of an internal or private function which is not sufficiently accessible + 值 '{0}' 已標記為內嵌,但它的實作利用到無法存取的內部或私用函式 + + + + The value '{0}' was marked inline but was not bound in the optimization environment + 值 '{0}' 已標記為內嵌,但是未在最佳化環境中繫結 + + + + Local value {0} not found during optimization + 最佳化期間找不到區域數值 {0} + + + + A value marked as 'inline' has an unexpected value + 標記為 'inline' 的值有未預期的值 + + + + A value marked as 'inline' could not be inlined + 無法內嵌標記為 'inline' 的值 + + + + Failed to inline the value '{0}' marked 'inline', perhaps because a recursive value was marked 'inline' + 無法內嵌標記為 'inline' 的值 '{0}',可能是因為遞迴值標記了 'inline' + + + + Recursive ValValue {0} + 遞迴的 ValValue {0} + + + + The indentation of this 'in' token is incorrect with respect to the corresponding 'let' + 這個 'in' 語彙基元的縮排就對應的 'let' 而言並不正確 + + + + Possible incorrect indentation: this token is offside of context started at position {0}. Try indenting this token further or using standard formatting conventions. + 縮排可能不正確: 這個語彙基元於內容的位置 {0} 處開始越位。請嘗試進一步縮排這個語彙基元,或使用標準的格式設定慣例。 + + + + The '|' tokens separating rules of this pattern match are misaligned by one column. Consider realigning your code or using further indentation. + 用以分隔這個模式比對之規則的 '|' 語彙基元有一欄未對齊。請考慮重新對齊程式碼或使用進一步的縮排。 + + + + Invalid module/expression/type + 無效的模組/運算式/類型 + + + + Multiple types exist called '{0}', taking different numbers of generic parameters. Provide a type instantiation to disambiguate the type resolution, e.g. '{1}'. + 有多個名稱為 '{0}' 的類型,各接受不同數目的泛型參數。請提供類型具現化,使類型解析意義清楚,例如 '{1}'。 + + + + The instantiation of the generic type '{0}' is missing and can't be inferred from the arguments or return type of this member. Consider providing a type instantiation when accessing this type, e.g. '{1}'. + 遺漏泛型型別 '{0}' 的具現化,而且無法從這個成員的引數或傳回型別推斷。存取這種型別時,請考慮提供具現化,例如 '{1}'。 + + + + 'global' may only be used as the first name in a qualified path + 'global' 只能做為完整路徑的第一個名稱使用 + + + + This is not a constructor or literal, or a constructor is being used incorrectly + 這不是建構函式或常值,或者是建構函式的使用方式錯誤 + + + + Unexpected empty long identifier + 未預期的空白長識別碼 + + + + The record type '{0}' does not contain a label '{1}'. + 記錄類型 '{0}' 未包含標籤 '{1}'。 + + + + Invalid field label + 無效的欄位標籤 + + + + Invalid expression '{0}' + 無效的運算式 '{0}' + + + + No constructors are available for the type '{0}' + 沒有可供類型 '{0}' 使用的建構函式 + + + + The union type for union case '{0}' was defined with the RequireQualifiedAccessAttribute. Include the name of the union type ('{1}') in the name you are using. + 聯集 '{0}' 的等位型別由 RequireQualifiedAccessAttribute 定義。請在您使用的名稱中,加入等位型別 '{1}' 的名稱。 + + + + The record type for the record field '{0}' was defined with the RequireQualifiedAccessAttribute. Include the name of the record type ('{1}') in the name you are using. + 記錄欄位 '{0}' 的記錄類型定義有 RequireQualifiedAccessAttribute。請在您使用的名稱中,加入記錄類型 ('{1}') 的名稱。 + + + + Unexpected error creating debug information file '{0}' + 建立偵錯資訊檔 '{0}' 時發生未預期的錯誤 + + + + This number is outside the allowable range for this integer type + 這個數字已經超出這個整數類型允許的範圍 + + + + '{0}' is not permitted as a character in operator names and is reserved for future use + 不允許將 '{0}' 當做運算子名稱中的字元,它已保留供未來使用 + + + + Unexpected character '{0}' + 未預期的字元 '{0}' + + + + This byte array literal contains characters that do not encode as a single byte + 這個位元組陣列常值包含不會編碼成單一位元組的字元 + + + + Identifiers followed by '{0}' are reserved for future use + 後面接著 '{0}' 的識別碼已保留供未來使用 + + + + This number is outside the allowable range for 8-bit signed integers + 這個數字已經超出 8 位元有正負號整數允許的範圍 + + + + This number is outside the allowable range for hexadecimal 8-bit signed integers + 這個數字已經超出十六進位 8 位元有正負號整數允許的範圍 + + + + This number is outside the allowable range for 8-bit unsigned integers + 這個數字已經超出 8 位元無正負號整數允許的範圍 + + + + This number is outside the allowable range for 16-bit signed integers + 這個數字已經超出 16 位元有正負號整數允許的範圍 + + + + This number is outside the allowable range for 16-bit unsigned integers + 這個數字已經超出 16 位元無正負號整數允許的範圍 + + + + This number is outside the allowable range for 32-bit signed integers + 這個數字已經超出 32 位元有正負號整數允許的範圍 + + + + This number is outside the allowable range for 32-bit unsigned integers + 這個數字已經超出 32 位元無正負號整數允許的範圍 + + + + This number is outside the allowable range for 64-bit signed integers + 這個數字已經超出 64 位元有正負號整數允許的範圍 + + + + This number is outside the allowable range for 64-bit unsigned integers + 這個數字已經超出 64 位元無正負號整數允許的範圍 + + + + This number is outside the allowable range for signed native integers + 這個數字已經超出有正負號原生整數允許的範圍 + + + + This number is outside the allowable range for unsigned native integers + 這個數字已經超出無正負號原生整數允許的範圍 + + + + Invalid floating point number + 無效的浮點數 + + + + This number is outside the allowable range for decimal literals + 這個數字已經超出十進位常值允許的範圍 + + + + This number is outside the allowable range for 32-bit floats + 這個數字已經超出 32 位元浮點數允許的範圍 + + + + This is not a valid numeric literal. Valid numeric literals include 1, 0x1, 0b0001 (int), 1u (uint32), 1L (int64), 1UL (uint64), 1s (int16), 1y (sbyte), 1uy (byte), 1.0 (float), 1.0f (float32), 1.0m (decimal), 1I (BigInteger). + 這不是有效的數值常值。有效的數值常值包括 1、0x1、0b0001 (int)、1u (uint32)、1L (int64)、1UL (uint64)、1s (int16)、1y (sbyte)、1uy (byte)、1.0 (float)、1.0f (float32)、1.0m (decimal)、1I (BigInteger)。 + + + + This is not a valid byte literal + 這不是有效的位元組常值 + + + + This is not a valid character literal + 這不是有效的字元常值 + + + + This Unicode encoding is only valid in string literals + 這個 Unicode 編碼只在字串常值中才有效 + + + + This token is reserved for future use + 這個語彙基元已保留供未來使用 + + + + TABs are not allowed in F# code unless the #indent \"off\" option is used + F# 程式碼中不允許使用 TAB,除非使用 #indent \"off\" 選項 + + + + Invalid line number: '{0}' + 無效的行號: '{0}' + + + + #if directive must appear as the first non-whitespace character on a line + #if 指示詞必須顯示為一行的第一個非空白字元 + + + + #else has no matching #if + #else 沒有對應的 #if + + + + #endif required for #else + #else 需要 #endif + + + + #else directive must appear as the first non-whitespace character on a line + #else 指示詞必須顯示為一行的第一個非空白字元 + + + + #endif has no matching #if + #endif 沒有對應的 #if + + + + #endif directive must appear as the first non-whitespace character on a line + #endif 指示詞必須顯示為一行的第一個非空白字元 + + + + #if directive should be immediately followed by an identifier + #if 指示詞後面應該緊接識別碼 + + + + Syntax error. Wrong nested #endif, unexpected tokens before it. + 語法錯誤。錯誤的巢狀 #endif,它前面必須有語彙基元。 + + + + #! may only appear as the first line at the start of a file. + #! 只能出現在檔案開頭的第一行。 + + + + Expected single line comment or end of line + 必須是單行註解或行結尾 + + + + Infix operator member '{0}' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ... + 中置運算子成員 '{0}' 沒有引數。必須是 2 個引數的元組,例如,靜態成員 (+) (x,y) = ... + + + + Infix operator member '{0}' has {1} initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ... + 中置運算子成員 '{0}' 有 {1} 個初始引數。必須是 2 個引數的元組,例如,靜態成員 (+) (x,y) = ... + + + + Infix operator member '{0}' has extra curried arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ... + 中置運算子成員 '{0}' 有額外的局部調用引數。必須是 2 個引數的元組,例如,靜態成員 (+) (x,y) = ... + + + + All record, union and struct types in FSharp.Core.dll must be explicitly labelled with 'StructuralComparison' or 'NoComparison' + FSharp.Core.dll 中的所有記錄、等位和結構類型都必須明確標示 'StructuralComparison' 或 'NoComparison' + + + + The struct, record or union type '{0}' has the 'StructuralComparison' attribute but the type parameter '{1}' does not satisfy the 'comparison' constraint. Consider adding the 'comparison' constraint to the type parameter + 結構、記錄或等位型別 '{0}' 有 'StructuralComparison' 屬性,但型別參數 '{1}' 不滿足 'comparison' 條件約束。請考慮將 'comparison' 條件約束加入型別參數 + + + + The struct, record or union type '{0}' has the 'StructuralComparison' attribute but the component type '{1}' does not satisfy the 'comparison' constraint + 結構、記錄或等位型別 '{0}' 有 'StructuralComparison' 屬性,但元件型別 '{1}' 不滿足 'comparison' 條件約束 + + + + The struct, record or union type '{0}' is not structurally comparable because the type parameter {1} does not satisfy the 'comparison' constraint. Consider adding the 'NoComparison' attribute to the type '{2}' to clarify that the type is not comparable + 結構、記錄或等位型別 '{0}' 在結構上無法比較,因為型別參數 {1} 不滿足 'comparison' 條件約束。請考慮將 'NoComparison' 屬性加入型別 '{2}',以釐清該型別為不可比較 + + + + The struct, record or union type '{0}' is not structurally comparable because the type '{1}' does not satisfy the 'comparison' constraint. Consider adding the 'NoComparison' attribute to the type '{2}' to clarify that the type is not comparable + 結構、記錄或等位型別 '{0}' 在結構上無法比較,因為型別 '{1}' 不滿足 'comparison' 條件約束。請考慮將 'NoComparison' 屬性加入型別 '{2}',以釐清該型別為不可比較 + + + + The struct, record or union type '{0}' does not support structural equality because the type parameter {1} does not satisfy the 'equality' constraint. Consider adding the 'NoEquality' attribute to the type '{2}' to clarify that the type does not support structural equality + 結構、記錄或等位型別 '{0}' 不支援結構相等,因為型別參數 {1} 不滿足 'equality' 條件約束。請考慮將 'NoEquality' 屬性加入型別 '{2}',以釐清該型別不支援結構相等 + + + + The struct, record or union type '{0}' does not support structural equality because the type '{1}' does not satisfy the 'equality' constraint. Consider adding the 'NoEquality' attribute to the type '{2}' to clarify that the type does not support structural equality + 結構、記錄或等位型別 '{0}' 不支援結構相等,因為型別 '{1}' 不滿足 'equality' 條件約束。請考慮將 'NoEquality' 屬性加入型別 '{2}',以釐清該型別不支援結構相等 + + + + The struct, record or union type '{0}' has the 'StructuralEquality' attribute but the type parameter '{1}' does not satisfy the 'equality' constraint. Consider adding the 'equality' constraint to the type parameter + 結構、記錄或等位型別 '{0}' 有 'StructuralEquality' 屬性,但型別參數 '{1}' 不滿足 'equality' 條件約束。請考慮將 'equality' 條件約束加入型別參數 + + + + The struct, record or union type '{0}' has the 'StructuralEquality' attribute but the component type '{1}' does not satisfy the 'equality' constraint + 結構、記錄或等位型別 '{0}' 有 'StructuralEquality' 屬性,但元件型別 '{1}' 不滿足 'equality' 條件約束 + + + + Each argument of the primary constructor for a struct must be given a type, for example 'type S(x1:int, x2: int) = ...'. These arguments determine the fields of the struct. + 必須為類型的主要建構函式的每個引數指定類型,例如 'type S(x1:int, x2: int) = ...'。這些引數會決定結構的欄位。 + + + + The value '{0}' is unused + 值 '{0}' 未使用到 + + + + The recursive object reference '{0}' is unused. The presence of a recursive object reference adds runtime initialization checks to members in this and derived types. Consider removing this recursive object reference. + 遞迴物件參考 '{0}' 未使用到。有了遞迴物件參考,就會在這個類型和衍生類型的成員中加入執行階段初始化檢查。請考慮移除這個遞迴物件參考。 + + + + A getter property may have at most one argument group + getter 屬性最多只能有一個引數群組 + + + + A setter property may have at most two argument groups + 屬性 setter 最多可以有兩個引數群組 + + + + Invalid property getter or setter + 無效的屬性 getter 或 setter + + + + An indexer property must be given at least one argument + 必須至少為索引子屬性指定一個引數 + + + + This operation accesses a mutable top-level value defined in another assembly in an unsupported way. The value cannot be accessed through its address. Consider copying the expression to a mutable local, e.g. 'let mutable x = ...', and if necessary assigning the value back after the completion of the operation + 這項作業以不支援的方式存取另一個組件中定義的可變動最上層值。值無法透過其位址存取。請考慮將運算式複製到可變動的區域變數,例如 'let mutable x = ...',並視需要在作業完成後將值指派回來 + + + + Remove spaces between the type name and type parameter, e.g. \"type C<'T>\", not type \"C <'T>\". Type parameters must be placed directly adjacent to the type name. + 型別參數必須放在緊鄰類型名稱的位置,例如 \"type C<'T>\",而不是 type \"C <'T>\" + + + + Remove spaces between the type name and type parameter, e.g. \"C<'T>\", not \"C <'T>\". Type parameters must be placed directly adjacent to the type name. + 型別引數必須放在緊鄰類型名稱的位置,例如 \"C<'T>\",而不是 \"C <'T>\" + + + + The use of the type syntax 'int C' and 'C <int>' is not permitted here. Consider adjusting this type to be written in the form 'C<int>' + 此處不允許使用類型語法 'int C' 和 'C <int>'。請考慮調整這種類型,寫成 'C<int>' 形式 + + + + The module/namespace '{0}' from compilation unit '{1}' did not contain the module/namespace '{2}' + 來自編譯單位 '{1}' 的模組/命名空間 '{0}' 不包含模組/命名空間 '{2}' + + + + The module/namespace '{0}' from compilation unit '{1}' did not contain the val '{2}' + 來自編譯單位 '{1}' 的模組/命名空間 '{0}' 不包含 val '{2}' + + + + The module/namespace '{0}' from compilation unit '{1}' did not contain the namespace, module or type '{2}' + 來自編譯單位 '{1}' 的模組/命名空間 '{0}' 不包含命名空間、模組或類型 '{2}' + + + + The 'UseNullAsTrueValue' attribute flag may only be used with union types that have one nullary case and at least one non-nullary case + 'UseNullAsTrueValue' 屬性旗標只能搭配等位型別一起使用,該等位型別有一個零元案例和至少一個非零元案例 + + + + The parameter '{0}' was inferred to have byref type. Parameters of byref type must be given an explicit type annotation, e.g. 'x1: byref<int>'. When used, a byref parameter is implicitly dereferenced. + 參數 '{0}' 已被推斷為具有 ByRef 類型。具有 ByRef 類型的參數都必須指定明確的類型註釋,例如 'x1: byref<int>'。使用時會隱含解除對 ByRef 參數的參照。 + + + + The generic member '{0}' has been used at a non-uniform instantiation prior to this program point. Consider reordering the members so this member occurs first. Alternatively, specify the full type of the member explicitly, including argument types, return type and any additional generic parameters and constraints. + 在這個程式點之前,泛型成員 '{0}' 已用於非統一具現化。請考慮重新排列此成員,以便讓此成員最先出現。或者,明確指定此成員的完整型別,包括引數型別、傳回型別和任何其他泛型參數和條件約束。 + + + + The attribute '{0}' appears in both the implementation and the signature, but the attribute arguments differ. Only the attribute from the signature will be included in the compiled code. + 屬性 '{0}' 同時出現在實作和簽章中,但是屬性引數不同。編譯的程式碼中將只包含來自簽章的屬性。 + + + + Cannot call an abstract base member: '{0}' + 無法呼叫抽象基底成員: '{0}' + + + + Could not resolve the ambiguity in the use of a generic construct with an 'unmanaged' constraint at or near this position + 無法解決在這個位置或附近使用具有 'unmanaged' 條件約束的泛型建構時造成的模稜兩可 + + + + This construct is for ML compatibility. {0}. You can disable this warning by using '--mlcompatibility' or '--nowarn:62'. + 這個建構是用於 ML 相容性。{0}。您可以使用 '--mlcompatibility' 或 '--nowarn:62' 停用這項警告 + + + + The type '{0}' has been marked as having an Explicit layout, but the field '{1}' has not been marked with the 'FieldOffset' attribute + 類型 '{0}' 已標記為有明確配置,但是 '{1}' 卻未以 'FieldOffset' 屬性標記 + + + + Interfaces inherited by other interfaces should be declared using 'inherit ...' instead of 'interface ...' + 由其他介面繼承的介面應該使用 'inherit ...' 宣告,不要使用 'interface ...' + + + + Invalid prefix operator + 無效的前置運算子 + + + + Invalid operator definition. Prefix operator definitions must use a valid prefix operator name. + 無效的運算子定義。前置運算子定義必須使用有效的前置運算子名稱。 + + + + The file extensions '.ml' and '.mli' are for ML compatibility + 副檔名 '.ml' 和 '.mli' 是使用於 ML 相容性 + + + + Consider using a file with extension '.ml' or '.mli' instead + 請考慮改用副檔名為 '.ml' 或 '.mli' 的檔案 + + + + Active pattern '{0}' is not a function + 現用模式 '{0}' 不是函式 + + + + Active pattern '{0}' 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' + 現用模式 '{0}' 的結果類型包含不是由輸入決定的類型變數。發生的原因通常是因為未提及結果案例,例如 'let (|A|B|) (x:int) = A x'。使用類型條件約束就可以修正這種情況,例如 'let (|A|B|) (x:int) : Choice<int,unit> = A x' + + + + The FieldOffset attribute can only be placed on members of types marked with the StructLayout(LayoutKind.Explicit) + FieldOffset 屬性僅能置於標記為 StructLayout(LayoutKind.Explicit) 類型的成員上 + + + + Optional arguments must come at the end of the argument list, after any non-optional arguments + 選擇性引數必須位於引數清單末端,在所有非選擇性引數之後 + + + + Attribute 'System.Diagnostics.ConditionalAttribute' is only valid on methods or attribute classes + 屬性 'System.Diagnostics.ConditionalAttribute' 只有在方法或屬性類別上才有效 + + + + Extension members cannot provide operator overloads. Consider defining the operator as part of the type definition instead. + 擴充成員無法提供運算子多載。請考慮將運算子改成定義為類型定義的一部分。 + + + + The name of the MDB file must be <assembly-file-name>.mdb. The --pdb option will be ignored. + MDB 檔案的名稱必須是 <assembly-file-name>.mdb。將忽略 --pdb 選項。 + + + + MDB generation failed. Could not find compatible member {0} + MDB 產生失敗。找不到相容的成員 {0} + + + + Cannot generate MDB debug information. Failed to load the 'MonoSymbolWriter' type from the 'Mono.CompilerServices.SymbolWriter.dll' assembly. + 無法產生 MDB 偵錯資訊。無法從 'Mono.CompilerServices.SymbolWriter.dll' 組件載入 'MonoSymbolWriter' 類型。 + + + + The union case named '{0}' conflicts with the generated type '{1}' + 名為 '{0}' 的聯集與產生的類型 '{1}' 衝突 + + + + ReflectedDefinitionAttribute may not be applied to an instance member on a struct type, because the instance member takes an implicit 'this' byref parameter + ReflectedDefinitionAttribute 不能套用到結構類型上的執行個體成員,因為執行個體成員接受隱含 'this' byref 參數 + + + + DLLImport bindings must be static members in a class or function definitions in a module + DLLImport 繫結必須是類別中的靜態成員或模組中的函式定義 + + + + When mscorlib.dll or FSharp.Core.dll is explicitly referenced the {0} option must also be passed + 如果明確參考了 mscorlib.dll 或 FSharp.Core.dll,就必須同時傳遞 {0} 選項 + + + + FSharp.Core.sigdata not found alongside FSharp.Core. File expected in {0}. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required. + 找不到與 FSharp.Core 並存的 FSharp.Core.sigdata。檔案應位於 {0}。請考慮升級至最新版的 FSharp.Core,其中不再需要此檔案。 + + + + File '{0}' not found alongside FSharp.Core. File expected in {1}. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required. + 找不到與 FSharp.Core 並存的檔案 '{0}'。檔案應位於 {1}。請考慮升級至最新版的 FSharp.Core,其中不再需要此檔案。 + + + + Filename '{0}' contains invalid character '{1}' + 檔名 '{0}' 包含無效的字元 '{1}' + + + + 'use!' bindings must be of the form 'use! <var> = <expr>' + 'use!' 繫結的格式必須是 'use! <var> = <expr>' + + + + Inner generic functions are not permitted in quoted expressions. Consider adding some type constraints until this function is no longer generic. + 加引號的運算式中不允許內部泛型函式。請考慮加入一些類型條件約束,直到這個函式不是泛型為止。 + + + + The type '{0}' is not a valid enumerator type , i.e. does not have a 'MoveNext()' method returning a bool, and a 'Current' property + 類型 '{0}' 不是有效的列舉程式類型,例如,沒有傳回 bool 的 'MoveNext()' 方法,也沒有 'Current' 屬性 + + + + End of file in triple-quote string begun at or before here + 三引號字串中的檔案結尾於此處或之前開始 + + + + End of file in triple-quote string embedded in comment begun at or before here + 內嵌在註解中的三引號字串中的檔案結尾於此處或之前開始 + + + + This type test or downcast will ignore the unit-of-measure '{0}' + 這個類型測試或向下轉型將忽略測量單位 '{0}' + + + + Expected type argument or static argument + 必須是型別引數或靜態引數 + + + + Unmatched '<'. Expected closing '>' + 不成對的 '<'。必須有結束 '>' + + + + Unexpected quotation operator '<@' in type definition. If you intend to pass a verbatim string as a static argument to a type provider, put a space between the '<' and '@' characters. + 型別定義中不能有引號運算子 '<@'。如果您想要將逐字字串當做靜態引數傳遞至型別提供者,請在 '<' 和 '@' 字元之間加上一個空格。 + + + + Attempted to parse this as an operator name, but failed + 嘗試將此剖析為運算子名稱,但是失敗 + + + + \U{0} is not a valid Unicode character escape sequence + \U{0} 不是有效的 Unicode 字元逸出序列 + + + + '{0}' must be applied to an argument of type '{1}', but has been applied to an argument of type '{2}' + '{0}' 必須套用至類型 '{1}' 的引數,但卻套用至了類型 '{2}' 的引數 + + + + '{0}' can only be applied to optional arguments + '{0}' 只能套用至選擇性引數 + + + + The specified .NET Framework version '{0}' is not supported. Please specify a value from the enumeration Microsoft.Build.Utilities.TargetDotNetFrameworkVersion. + 不支援指定的 .NET Framework 版本 '{0}'。請從列舉 Microsoft.Build.Utilities.TargetDotNetFrameworkVersion 指定值。 + + + + Invalid Magic value in CLR Header + CLR 標頭中的 Magic 值無效 + + + + Bad image format + 錯誤的影像格式 + + + + Private key expected + 必須是私密金鑰 + + + + RSA key expected + 必須是 RSA 金鑰 + + + + Invalid bit Length + 位元長度無效 + + + + Invalid RSAParameters structure - '{{0}}' expected + RSAParameters 結構無效 - 必須是 '{{0}}' + + + + Invalid algId - 'Exponent' expected + algId 無效 - 必須是 'Exponent' + + + + Invalid signature size + 簽章大小無效 + + + + No signature directory + 沒有簽章目錄 + + + + Invalid Public Key blob + 公開金鑰 Blob 無效 + + + + Exiting - too many errors + 正在結束 - 錯誤太多。 + + + + The documentation file has no .xml suffix + 此文件檔沒有 .xml 後置字元 + + + + No implementation files specified + 未指定實作檔案 + + + + The attribute {0} specified version '{1}', but this value is invalid and has been ignored + 屬性 {0} 指定了版本 '{1}',但該值無效,所以已忽略。 + + + + Conflicting options specified: 'win32manifest' and 'win32res'. Only one of these can be used. + 指定了衝突的選項: 'win32manifest' 和 'win32res'。只能使用它們其中一個。 + + + + The code in assembly '{0}' makes uses of quotation literals. Static linking may not include components that make use of quotation literals unless all assemblies are compiled with at least F# 4.0. + 組件 '{0}' 中的程式碼使用了引號常值。除非所有組件都使用 F# 4.0 (含) 以上的版本編譯,否則靜態連結不會包含使用引號常值的元件。 + + + + Code in this assembly makes uses of quotation literals. Static linking may not include components that make use of quotation literals unless all assemblies are compiled with at least F# 4.0. + 此組件中的程式碼使用引號常值。除非所有組件都使用 F# 4.0 (含) 以上的版本編譯,否則靜態連結不得包含使用引號常值的元件。 + + + + Static linking may not include a .EXE + 靜態連結不可包含 .EXE + + + + Static linking may not include a mixed managed/unmanaged DLL + 靜態連結不可包含混合的受控/非受控 DLL + + + + Ignoring mixed managed/unmanaged assembly '{0}' during static linking + 在靜態連結期間忽略混合的受控/非受控組件 '{0}' + + + + Assembly '{0}' was referenced transitively and the assembly could not be resolved automatically. Static linking will assume this DLL has no dependencies on the F# library or other statically linked DLLs. Consider adding an explicit reference to this DLL. + 組件 '{0}' 是以可轉移方式被參考,而且此組件無法自動解析。靜態連結會假設這個 DLL 在 F# 程式庫或其他以靜態方式連結的 DLL 上沒有相依性。請考慮加入這個 DLL 的明確參考。 + + + + Assembly '{0}' not found in dependency set of target binary. Statically linked roots should be specified using an assembly name, without a DLL or EXE extension. If this assembly was referenced explicitly then it is possible the assembly was not actually required by the generated binary, in which case it should not be statically linked. + 在目標二進位檔的相依性集中找不到組件 '{0}'。以靜態方式連結的根應該使用組件名稱指定,不加 DLL 或 EXE 副檔名。如果以明確方式參考這個組件,那麼所產生的二進位檔可能實際上不一定需要這個組件,在這種情況下,它就不應該以靜態方式連結。 + + + + The key file '{0}' could not be opened + 無法開啟金鑰檔 '{0}' + + + + A problem occurred writing the binary '{0}': {1} + 寫入二進位檔 '{0}' 時發生問題: {1} + + + + The 'AssemblyVersionAttribute' has been ignored because a version was given using a command line option + 忽略 'AssemblyVersionAttribute',因為已經使用命令列選項指定了版本 + + + + Error emitting 'System.Reflection.AssemblyCultureAttribute' attribute -- 'Executables cannot be satellite assemblies, Culture should always be empty' + 發出 'System.Reflection.AssemblyCultureAttribute' 屬性時發生錯誤 -- '可執行檔不可以是附屬組件,文化特性需保持空白' + + + + Option '--delaysign' overrides attribute 'System.Reflection.AssemblyDelaySignAttribute' given in a source file or added module + 選項 '--delaysign' 會覆寫原始程式檔或加入的模組中指定的屬性 'System.Reflection.AssemblyDelaySignAttribute' + + + + Option '--keyfile' overrides attribute 'System.Reflection.AssemblyKeyFileAttribute' given in a source file or added module + 選項 '--keyfile' 會覆寫原始程式檔或加入的模組中指定的屬性 'System.Reflection.AssemblyKeyFileAttribute' + + + + Option '--keycontainer' overrides attribute 'System.Reflection.AssemblyNameAttribute' given in a source file or added module + 選項 '--keycontainer' 會覆寫原始程式檔或加入的模組中指定的屬性 'System.Reflection.AssemblyNameAttribute' + + + + The assembly '{0}' is listed on the command line. Assemblies should be referenced using a command line flag such as '-r'. + 組件 '{0}' 列在命令列中。請使用命令列旗標 (例如 '-r') 來參考組件。 + + + + The resident compilation service was not used because a problem occured in communicating with the server. + 未使用常駐編譯服務,因為伺服器發生通訊問題。 + + + + Problem with filename '{0}': Illegal characters in path. + 檔名 '{0}' 有問題: 路徑中有不合法的字元。 + + + + Passing a .resx file ({0}) as a source file to the compiler is deprecated. Use resgen.exe to transform the .resx file into a .resources file to pass as a --resource option. If you are using MSBuild, this can be done via an <EmbeddedResource> item in the .fsproj project file. + 將 .resx 檔案 ({0}) 當做原始程式檔傳遞至編譯器已被取代。請使用 resgen.exe 將 .resx 檔案轉換為 .resources 檔案,然後傳遞做為 --resource 選項。如果您要使用 MSBuild,可以透過 .fsproj 專案檔中的 <EmbeddedResource> 項目來完成。 + + + + Static linking may not be used on an assembly referencing mscorlib (e.g. a .NET Framework assembly) when generating an assembly that references System.Runtime (e.g. a .NET Core or Portable assembly). + 產生參考 System.Runtime 的組件 (例如 .NET Core 或可攜式組件) 時,參考 mscorlib 的組件 (例如 .NET Framework 組件) 無法使用靜態連結。 + + + + An {0} specified version '{1}', but this value is a wildcard, and you have requested a deterministic build, these are in conflict. + {0} 已指定版本 '{1}',但這個值為萬用字元,且您已要求確定性組建,所以發生衝突。 + + + + Determinstic builds only support portable PDBs (--debug:portable or --debug:embedded) + 確定性組建僅支援可攜式 PDB (--debug:portable 或 --debug:embedded) + + + + Character '{0}' is not allowed in provided namespace name '{1}' + 提供的命名空間名稱 '{1}' 中不允許使用字元 '{0}' + + + + The provided type '{0}' returned a member with a null or empty member name + 提供的類型 '{0}' 傳回具有 null 或空白成員名稱的成員 + + + + The provided type '{0}' returned a null member + 提供的類型 '{0}' 傳回 null 成員 + + + + The provided type '{0}' member info '{1}' has null declaring type + 提供的類型 '{0}' 成員資訊 '{1}' 具有 null 宣告類型 + + + + The provided type '{0}' has member '{1}' which has declaring type '{2}'. Expected declaring type to be the same as provided type. + 提供之類型 '{0}' 的成員 '{1}' 具有宣告類型 '{2}'。宣告類型必須與提供的類型相同。 + + + + Referenced assembly '{0}' has assembly level attribute '{1}' but no public type provider classes were found + 參考的組件 '{0}' 具有組件層級屬性 '{1}',但找不到公用型別提供者類別 + + + + Type '{0}' from type provider '{1}' has an empty namespace. Use 'null' for the global namespace. + 型別提供者 '{1}' 中的型別 '{0}' 具有空白命名空間。請將 'null' 用於全域命名空間。 + + + + Empty namespace found from the type provider '{0}'. Use 'null' for the global namespace. + 在型別提供者 '{0}' 中找到空白命名空間。請將 'null' 用於全域命名空間。 + + + + Provided type '{0}' has 'IsGenericType' as true, but generic types are not supported. + 提供之類型 '{0}' 的 'IsGenericType' 為 true,但不支援泛型類型。 + + + + Provided type '{0}' has 'IsArray' as true, but array types are not supported. + 提供之類型 '{0}' 的 'IsArray' 為 true,但不支援陣列類型。 + + + + Invalid member '{0}' on provided type '{1}'. Provided type members must be public, and not be generic, virtual, or abstract. + 提供之類型 '{1}' 上的成員 '{0}' 無效。提供之類型成員必須是公用,而不是泛型、虛擬或抽象。 + + + + Invalid member '{0}' on provided type '{1}'. Only properties, methods and constructors are allowed + 提供之類型 '{1}' 上的成員 '{0}' 無效。只允許屬性、方法和建構函式 + + + + Property '{0}' on provided type '{1}' has CanRead=true but there was no value from GetGetMethod() + 提供之類型 '{1}' 上的屬性 '{0}' 具有 CanRead=true,但沒有來自 GetGetMethod() 的值 + + + + Property '{0}' on provided type '{1}' has CanRead=false but GetGetMethod() returned a method + 提供之類型 '{1}' 上的屬性 '{0}' 具有 CanRead=false,但 GetGetMethod() 傳回了方法 + + + + Property '{0}' on provided type '{1}' has CanWrite=true but there was no value from GetSetMethod() + 提供之類型 '{1}' 上的屬性 '{0}' 具有 CanWrite=true,但沒有來自 GetSetMethod() 的值 + + + + Property '{0}' on provided type '{1}' has CanWrite=false but GetSetMethod() returned a method + 提供之類型 '{1}' 上的屬性 '{0}' 具有 CanWrite=false,但 GetSetMethod() 傳回了方法 + + + + One or more errors seen during provided type setup + 在設定提供的類型期間已發生一或多個錯誤 + + + + Unexpected exception from provided type '{0}' member '{1}': {2} + 提供之類型 '{0}' 成員 '{1}' 發生未預期的例外狀況: {2} + + + + Unsupported constant type '{0}'. Quotations provided by type providers can only contain simple constants. The implementation of the type provider may need to be adjusted by moving a value declared outside a provided quotation literal to be a 'let' binding inside the quotation literal. + 不支援的常數類型 '{0}'。型別提供者所提供的引號只能包含簡單的常數。實作型別提供者可能需要調整,方法是將在提供的引號外宣告的值移為引號常值內的 'let' 繫結。 + + + + Unsupported expression '{0}' from type provider. If you are the author of this type provider, consider adjusting it to provide a different provided expression. + 型別提供者有不支援的運算式 '{0}'。如果您是這個型別提供者的作者,請考慮進行調整以提供其他提供的運算式。 + + + + Expected provided type named '{0}' but provided type has 'Name' with value '{1}' + 提供的類型必須命名為 '{0}' 但卻具有值為 '{1}' 的 'Name' + + + + Event '{0}' on provided type '{1}' has no value from GetAddMethod() + 提供的類型 '{1}' 中的事件 '{0}' 沒有來自 GetAddMethod() 的值 + + + + Event '{0}' on provided type '{1}' has no value from GetRemoveMethod() + 提供的類型 '{1}' 中的事件 '{0}' 沒有來自 GetRemoveMethod() 的值 + + + + Assembly attribute '{0}' refers to a designer assembly '{1}' which cannot be loaded or doesn't exist. {2} + 組件屬性 '{0}' 參考的設計工具組件 '{1}' 無法載入或不存在。{2} + + + + The type provider does not have a valid constructor. A constructor taking either no arguments or one argument of type 'TypeProviderConfig' was expected. + 型別提供者沒有有效的建構函式。建構函式必須不接受任何引數,或是接受型別 'TypeProviderConfig' 的一個引數。 + + + + The type provider '{0}' reported an error: {1} + 型別提供者 '{0}' 已回報錯誤: {1} + + + + The type provider '{0}' used an invalid parameter in the ParameterExpression: {1} + 型別提供者 '{0}' 在 ParameterExpression 中使用的參數無效: {1} + + + + The type provider '{0}' provided a method with a name '{1}' and metadata token '{2}', which is not reported among its methods of its declaring type '{3}' + 型別提供者 '{0}' 提供的方法具有名稱 '{1}',以及中繼資料語彙基元 '{2}',其中該語彙基元未在其宣告類型 '{3}' 的方法中報告 + + + + The type provider '{0}' provided a constructor which is not reported among the constructors of its declaring type '{1}' + 型別提供者 '{0}' 所提供的建構函式未在宣告類型 '{1}' 的任何建構函式中報告 + + + + A direct reference to the generated type '{0}' is not permitted. Instead, use a type definition, e.g. 'type TypeAlias = <path>'. This indicates that a type provider adds generated types to your assembly. + 不允許所產生型別 '{0}' 的直接參考。請改用型別定義,例如 'type TypeAlias = <path>'。這表示型別提供者會將產生的型別加入您的組件。 + + + + Expected provided type with path '{0}' but provided type has path '{1}' + 提供之類型的路徑必須是 '{0}' 但卻具有路徑 '{1}' + + + + Unexpected 'null' return value from provided type '{0}' member '{1}' + 提供之類型 '{0}' 成員 '{1}' 中有未預期的 'null' 傳回值 + + + + Unexpected exception from member '{0}' of provided type '{1}' member '{2}': {3} + 提供之類型 '{1}' 成員 '{2}' 的成員 '{0}' 發生未預期的例外狀況: {3} + + + + Nested provided types do not take static arguments or generic parameters + 提供的巢狀類型不接受靜態引數或泛型參數 + + + + Invalid static argument to provided type. Expected an argument of kind '{0}'. + 提供之類型的靜態引數無效。必須是 '{0}' 類型的引數。 + + + + An error occured applying the static arguments to a provided type + 將靜態引數套用至提供的類型時發生錯誤 + + + + Unknown static argument kind '{0}' when resolving a reference to a provided type or method '{1}' + 為所提供的類型或方法 '{1}' 解析參考時,發現未知的靜態引數類型 '{0}' + + + + invalid namespace for provided type + 提供之類型的命名空間無效 + + + + invalid full name for provided type + 提供之類型的完整名稱無效 + + + + The type provider returned 'null', which is not a valid return value from '{0}' + 型別提供者傳回的 'null' 不是 '{0}' 中的有效傳回值 + + + + The type provider constructor has thrown an exception: {0} + 型別提供者建構函式擲回例外狀況: {0} + + + + Type provider '{0}' returned null from GetInvokerExpression. + 型別提供者 '{0}' 從 GetInvokerExpression 傳回 null。 + + + + The type provider '{0}' returned an invalid type from 'ApplyStaticArguments'. A type with name '{1}' was expected, but a type with name '{2}' was returned. + 型別提供者 '{0}' 從 'ApplyStaticArguments' 傳回的型別無效。必須是名為 '{1}' 的型別,但傳回名為 '{2}' 的型別。 + + + + The type provider '{0}' returned an invalid method from 'ApplyStaticArgumentsForMethod'. A method with name '{1}' was expected, but a method with name '{2}' was returned. + 型別提供者 '{0}' 從 'ApplyStaticArgumentsForMethod' 傳回的方法無效。必須是名為 '{1}' 的方法,但傳回名為 '{2}' 的方法。 + + + + This type test or downcast will erase the provided type '{0}' to the type '{1}' + 這個類型測試或向下轉型會將提供的類型 '{0}' 清除為類型 '{1}'。 + + + + This downcast will erase the provided type '{0}' to the type '{1}'. + 這個向下轉型會將提供的類型 '{0}' 清除為類型 '{1}'。 + + + + This type test with a provided type '{0}' is not allowed because this provided type will be erased to '{1}' at runtime. + 不允許這個含有提供之類型 '{0}' 的類型測試,因為這個提供的類型將在執行階段清除為 '{1}'。 + + + + Cannot inherit from erased provided type + 無法繼承自清除的提供類型 + + + + Assembly '{0}' hase TypeProviderAssembly attribute with invalid value '{1}'. The value should be a valid assembly name + 組件 '{0}' 的 TypeProviderAssembly 屬性值 '{1}' 無效。此值必須是有效的屬性名稱 + + + + Invalid member name. Members may not have name '.ctor' or '.cctor' + 無效的成員名稱。成員不能有名稱 '.ctor' 或 '.cctor' + + + + The function or member '{0}' is used in a way that requires further type annotations at its definition to ensure consistency of inferred types. The inferred signature is '{1}'. + 函式或成員 '{0}' 的使用方式要求在定義處必須有進一步的類型註釋,才能確保推斷類型的一致性。推斷的簽章為 '{1}'。 + + + + The number of type arguments did not match: '{0}' given, '{1}' expected. This may be related to a previously reported error. + 型別引數的數目不符: 提供了 '{0}',但必須是 '{1}'。這可能與先前報告的錯誤有關。 + + + + Cannot override inherited member '{0}' because it is sealed + 無法覆寫繼承的成員 '{0}',因為它已密封 + + + + The type provider '{0}' reported an error in the context of provided type '{1}', member '{2}'. The error: {3} + 型別提供者 '{0}' 已回報所提供型別 '{1}',成員 '{2}' 的內容中出現錯誤。錯誤: {3} + + + + An exception occurred when accessing the '{0}' of a provided type: {1} + 存取提供之類型的 '{0}' 時發生例外狀況: {1} + + + + The '{0}' of a provided type was null or empty. + 提供之類型的 '{0}' 為 null 或空白。 + + + + Character '{0}' is not allowed in provided type name '{1}' + 提供的類型名稱 '{1}' 中不允許使用字元 '{0}' + + + + In queries, '{0}' must use a simple pattern + 在查詢中,'{0}' 必須使用簡單模式 + + + + A custom query operation for '{0}' is required but not specified + 需要 '{0}' 的自訂查詢作業,但未指定 + + + + Named static arguments must come after all unnamed static arguments + 具名靜態引數必須在所有未命名靜態引數的後面 + + + + The static parameter '{0}' of the provided type or method '{1}' requires a value. Static parameters to type providers may be optionally specified using named arguments, e.g. '{2}<{3}=...>'. + 所提供之類型或方法 '{1}' 的靜態參數 '{0}' 需要值。型別提供者可以選擇使用具名引數 (例如 '{2}<{3}=...>') 來指定靜態參數。 + + + + No static parameter exists with name '{0}' + 沒有名稱為 '{0}' 的靜態參數 + + + + The static parameter '{0}' has already been given a value + 已經為靜態參數 '{0}' 指定值 + + + + Multiple static parameters exist with name '{0}' + 有多個名稱為 '{0}' 的靜態參數 + + + + A custom operation may not be used in conjunction with a non-value or recursive 'let' binding in another part of this computation expression + 自訂作業不能與這個計算運算式另一部分中的非值或遞迴 'let' 繫結一起使用 + + + + A custom operation may not be used in conjunction with 'use', 'try/with', 'try/finally', 'if/then/else' or 'match' operators within this computation expression + 自訂作業不能與這個計算運算式內的 'use'、'try/with'、'try/finally'、'if/then/else' 或 'match' 運算子一起使用 + + + + The custom operation '{0}' refers to a method which is overloaded. The implementations of custom operations may not be overloaded. + 自訂作業 '{0}' 參考的方法已多載。可能無法多載自訂作業的實作。 + + + + An if/then/else expression may not be used within queries. Consider using either an if/then expression, or use a sequence expression instead. + 不可以在查詢中使用 if/then/else 運算式。請考慮使用 if/then 運算式,或者改用循序項運算式。 + + + + Invalid argument to 'methodhandleof' during codegen + codegen 期間 'methodhandleof' 的引數無效 + + + + A reference to a provided type was missing a value for the static parameter '{0}'. You may need to recompile one or more referenced assemblies. + 提供之類型的參考遺漏靜態參數 '{0}' 的值。您可能需要重新編譯一或多個參考的組件。 + + + + A reference to a provided type had an invalid value '{0}' for a static parameter. You may need to recompile one or more referenced assemblies. + 提供之類型的參考具有靜態參數的無效值 '{0}'。您可能需要重新編譯一或多個參考的組件。 + + + + '{0}' is not used correctly. This is a custom operation in this query or computation expression. + '{0}' 未正確使用。這是這個查詢或計算運算式中的自訂作業。 + + + + '{0}' is not used correctly. Usage: {1}. This is a custom operation in this query or computation expression. + 未正確使用 '{0}'。使用方式: {1}。此為這個查詢或計算運算式中的自訂作業。 + + + + {0} var in collection {1} (outerKey = innerKey). Note that parentheses are required after '{2}' + {0} var in collection {1} (outerKey = innerKey)。注意: '{2}' 之後須有括號 + + + + {0} var in collection {1} (outerKey = innerKey) into group. Note that parentheses are required after '{2}' + {0} var in collection {1} (outerKey = innerKey) into group。注意: '{2}' 之後須有括號 + + + + {0} var in collection + {0} var in collection + + + + '{0}' must be followed by a variable name. Usage: {1}. + '{0}' 之後必須接著變數名稱。使用方式: {1}。 + + + + Incorrect syntax for '{0}'. Usage: {1}. + {0}' 的語法不正確。使用方式: {1}。 + + + + '{0}' must come after a 'for' selection clause and be followed by the rest of the query. Syntax: ... {1} ... + '{0}' 必須跟在 'for' 選取範圍子句後面,之後再接其餘的查詢。語法: ... {1} ... + + + + '{0}' is used with an incorrect number of arguments. This is a custom operation in this query or computation expression. Expected {1} argument(s), but given {2}. + '{0}' 搭配使用的引數數目不正確。這是此查詢或計算運算式中的自訂作業。必須是 {1} 個引數,但提供了 {2} 個。 + + + + Expected an expression after this point + 在這個點之後必須有運算式 + + + + Expected a type after this point + 在這個點之後必須有類型 + + + + Unmatched '[<'. Expected closing '>]' + '[<' 不成對。必須要有結尾的 '>]' + + + + Unexpected end of input in 'match' expression. Expected 'match <expr> with | <pat> -> <expr> | <pat> -> <expr> ...'. + 'match' 運算式中不能以輸入結尾。必須是 'match <expr> with | <pat> -> <expr> | <pat> -> <expr> ...'。 + + + + Unexpected end of input in 'try' expression. Expected 'try <expr> with <rules>' or 'try <expr> finally <expr>'. + 'try' 運算式中不能以輸入結尾。必須是 'try <expr> with <rules>' 或 'try <expr> finally <expr>'。 + + + + Unexpected end of input in 'while' expression. Expected 'while <expr> do <expr>'. + 'while' 運算式中不能以輸入結尾。必須是 'while <expr> do <expr>'。 + + + + Unexpected end of input in 'for' expression. Expected 'for <pat> in <expr> do <expr>'. + 'for' 運算式中不能以輸入結尾。必須是 'for <pat> in <expr> do <expr>'。 + + + + Unexpected end of input in 'match' or 'try' expression + 'match' 或 'try' 運算式中不能以輸入結尾 + + + + Unexpected end of input in 'then' branch of conditional expression. Expected 'if <expr> then <expr>' or 'if <expr> then <expr> else <expr>'. + 條件運算式的 'then' 分支中不能以輸入結尾。必須是 'if <expr> then <expr>' 或 'if <expr> then <expr> else <expr>'。 + + + + Unexpected end of input in 'else' branch of conditional expression. Expected 'if <expr> then <expr>' or 'if <expr> then <expr> else <expr>'. + 條件運算式的 'else' 分支中不能以輸入結尾。必須是 'if <expr> then <expr>' 或 'if <expr> then <expr> else <expr>'。 + + + + Unexpected end of input in body of lambda expression. Expected 'fun <pat> ... <pat> -> <expr>'. + Lambda 運算式的主體中不能以輸入結尾。必須是 'fun <pat> ... <pat> -> <expr>'。 + + + + Unexpected end of input in type arguments + 類型引數中不能以輸入結尾 + + + + Unexpected end of input in type signature + 類型簽章中不能以輸入結尾 + + + + Unexpected end of input in type definition + 類型定義中不能以輸入結尾 + + + + Unexpected end of input in object members + 物件成員中不能以輸入結尾 + + + + Unexpected end of input in value, function or member definition + 值、函式或成員定義中不能以輸入結尾 + + + + Unexpected end of input in expression + 運算式中不能以輸入結尾 + + + + Unexpected end of type. Expected a name after this point. + 不能以類型結尾。在這個點之後必須有名稱。 + + + + Incomplete value or function definition. If this is in an expression, the body of the expression must be indented to the same column as the 'let' keyword. + 不完整的值或函式定義。如果這是運算式,運算式的主體必須縮排成與 'let' 關鍵字在同一欄。 + + + + Incomplete value definition. If this is in an expression, the body of the expression must be indented to the same column as the 'let!' keyword. + 不完整的值定義。如果這是運算式,運算式的主體必須縮排成與 'let!' 關鍵字在同一欄。 + + + + Incomplete value definition. If this is in an expression, the body of the expression must be indented to the same column as the 'use!' keyword. + 不完整的值定義。如果這是運算式,運算式的主體必須縮排成與 'use!' 關鍵字在同一欄。 + + + + Incomplete value definition. If this is in an expression, the body of the expression must be indented to the same column as the 'use' keyword. + 不完整的值定義。如果這是運算式,運算式的主體必須縮排成與 'use' 關鍵字在同一欄。 + + + + Missing 'do' in 'while' expression. Expected 'while <expr> do <expr>'. + 'while' 運算式中遺漏 'do'。必須是 'while <expr> do <expr>'。 + + + + Missing 'do' in 'for' expression. Expected 'for <pat> in <expr> do <expr>'. + 'for' 運算式中遺漏 'do'。必須是 'for <pat> in <expr> do <expr>'。 + + + + Invalid join relation in '{0}'. Expected 'expr <op> expr', where <op> is =, =?, ?= or ?=?. + '{0}' 中的聯結關聯無效。必須是 'expr <op> expr',其中 <op> 是 =、=?、?= 或 ?=?。 + + + + Calls + 呼叫 + + + + Invalid number of generic arguments to type '{0}' in provided type. Expected '{1}' arguments, given '{2}'. + 提供之類型中類型 '{0}' 的泛型引數數目無效。必須是 '{1}' 個引數,但提供了 '{2}' 個。 + + + + Invalid value '{0}' for unit-of-measure parameter '{1}' + 測量單位參數 '{1}' 的值 '{0}' 無效 + + + + Invalid value unit-of-measure parameter '{0}' + 無效的測量單位參數 '{0}' 值 + + + + Property '{0}' on provided type '{1}' is neither readable nor writable as it has CanRead=false and CanWrite=false + 提供之類型 '{1}' 上的屬性 '{0}' 不是可讀取的,也不是可寫入的,因為它具有 CanRead=false 和 CanWrite=false + + + + A use of 'into' must be followed by the remainder of the computation + 使用 'into' 時,之後必須接計算的其餘部分 + + + + The operator '{0}' does not accept the use of 'into' + 運算子 '{0}' 不接受使用 'into' + + + + The definition of the custom operator '{0}' does not use a valid combination of attribute flags + 自訂運算子 '{0}' 的定義未使用屬性旗標的有效組合 + + + + This type definition may not have the 'CLIMutable' attribute. Only record types may have this attribute. + 這個類型定義不能有 'CLIMutable' 屬性。只有記錄類型可以有這個屬性。 + + + + 'member val' definitions are only permitted in types with a primary constructor. Consider adding arguments to your type definition, e.g. 'type X(args) = ...'. + 'member val' 定義只能用於含有主要建構函式的類型中。請考慮在您的類型定義加入引數,例如 'type X(args) = ...'。 + + + + Property definitions may not be declared mutable. To indicate that this property can be set, use 'member val PropertyName = expr with get,set'. + 屬性定義不可以宣告為可變動。若要表示這個屬性可以設定,請使用 'member val PropertyName = expr with get,set'。 + + + + To indicate that this property can be set, use 'member val PropertyName = expr with get,set'. + 若要表示這個屬性可以設定,請使用 'member val PropertyName = expr with get,set'。 + + + + Type '{0}' is illegal because in byref<T>, T cannot contain byref types. + 類型 '{0}' 不合法,因為在 byref<T> 中,T 不能包含 byref 類型。 + + + + F# supports array ranks between 1 and 32. The value {0} is not allowed. + F# 支援 1 至 32 個陣列陣序。不允許值 {0}。 + + + + In queries, use the form 'for x in n .. m do ...' for ranging over integers + 在查詢中,請針對涵蓋的整數使用 'for x in n .. m do ...' 格式 + + + + 'while' expressions may not be used in queries + 'while' 運算式不可用於查詢中 + + + + 'try/finally' expressions may not be used in queries + 'try/finally' 運算式不可用於查詢中 + + + + 'use' expressions may not be used in queries + 'use' 運算式不可用於查詢中 + + + + 'let!', 'use!' and 'do!' expressions may not be used in queries + 'let!'、'use!' 和 'do!' 運算式不可用於查詢 + + + + 'return' and 'return!' may not be used in queries + 'return' 和 'return!' 不可用於查詢中 + + + + This is not a known query operator. Query operators are identifiers such as 'select', 'where', 'sortBy', 'thenBy', 'groupBy', 'groupValBy', 'join', 'groupJoin', 'sumBy' and 'averageBy', defined using corresponding methods on the 'QueryBuilder' type. + 這不是已知的查詢運算子。查詢運算子是 'QueryBuilder' 類型上使用對應方法定義的識別碼,例如 'select'、'where'、'sortBy'、'thenBy'、'groupBy'、'groupValBy'、'join'、'groupJoin'、'sumBy' 和 'averageBy'。 + + + + 'try/with' expressions may not be used in queries + 不可以在查詢中使用 'try/with' 運算式 + + + + This 'let' definition may not be used in a query. Only simple value definitions may be used in queries. + 這個 'let' 定義不可用於查詢中。只有簡單值定義可用於查詢中。 + + + + Too many static parameters. Expected at most {0} parameters, but got {1} unnamed and {2} named parameters. + 靜態參數太多。最多必須有 {0} 個參數,但收到 {1} 個未命名參數及 {2} 個具名參數。 + + + + Invalid provided literal value '{0}' + 提供的常值 '{0}' 無效 + + + + The 'anycpu32bitpreferred' platform can only be used with EXE targets. You must use 'anycpu' instead. + 'anycpu32bitpreferred' 平台只能與 EXE 目標搭配使用。您必須改用 'anycpu'。 + + + + This member, function or value declaration may not be declared 'inline' + 這個成員、函式或值宣告不能宣告為 'inline' + + + + The provider '{0}' returned a non-generated type '{1}' in the context of a set of generated types. Consider adjusting the type provider to only return generated types. + 提供者 '{0}' 在一組所產生型別的內容中,傳回非產生的型別 '{1}'。請考慮調整型別提供者以便僅傳回產生的型別。 + + + + Arguments to query operators may require parentheses, e.g. 'where (x > y)' or 'groupBy (x.Length / 10)' + 查詢運算子的引數可能需要括號,例如 'where (x > y)' 或 'groupBy (x.Length / 10)' + + + + A quotation may not involve an assignment to or taking the address of a captured local variable + 引號可能與指派無關或與採用擷取之區域變數的位址無關 + + + + + 1 overload + + 1 個多載 + + + + + {0} overloads + + {0} 個多載 + + + + Erased to + 清除為 + + + + Unexpected token '{0}' or incomplete expression + 未預期的語彙基元 '{0}' 或不完整的運算式 + + + + Cannot find code target for this attribute, possibly because the code after the attribute is incomplete. + 找不到以此屬性為目標的程式碼,可能是因為屬性之後的程式碼不完整。 + + + + Type name cannot be empty. + 類型名稱不可為空白。 + + + + Problem reading assembly '{0}': {1} + 讀取組件 '{0}' 時發生問題: {1} + + + + Invalid provided field. Provided fields of erased provided types must be literals. + 提供的欄位無效。所清除之提供類型的提供欄位必須為常值。 + + + + (loading description...) + (正在載入描述...) + + + + (description unavailable...) + (無法使用描述...) + + + + A type variable has been constrained by multiple different class types. A type variable may only have one class constraint. + 類型變數受到多種不同類別類型約束。類型變數只能有一個類別條件約束。 + + + + 'match' expressions may not be used in queries + 不可以在查詢中使用 'match' 運算式 + + + + Infix operator member '{0}' has {1} initial argument(s). Expected a tuple of 3 arguments + 中置運算子成員 '{0}' 有 {1} 個初始引數。必須是 3 個引數的元組 + + + + The operator '{0}' cannot be resolved. Consider opening the module 'Microsoft.FSharp.Linq.NullableOperators'. + 無法解析運算子 '{0}'。請考慮開啟模組 'Microsoft.FSharp.Linq.NullableOperators'。 + + + + '{0}' must be followed by 'in'. Usage: {1}. + ’{0}' 之後必須是 'in'。使用方式: {1}。 + + + + Neither 'member val' nor 'override val' definitions are permitted in object expressions. + 物件運算式中不允許使用 'member val' 和 'override val' 定義。 + + + + Copy-and-update record expressions must include at least one field. + 複製並更新記錄運算式必須至少包含一個欄位。 + + + + '_' cannot be used as field name + '_' 不可做為欄位名稱 + + + + The provided types generated by this use of a type provider may not be used from other F# assemblies and should be marked internal or private. Consider using 'type internal TypeName = ...' or 'type private TypeName = ...'. + 以這種方式使用型別提供者所產生的提供型別不能在其他 F# 組件中使用,而且應該標記為內部或私用。請考慮使用 'type internal TypeName = ...' 或 'type private TypeName = ...'。 + + + + A property's getter and setter must have the same type. Property '{0}' has getter of type '{1}' but setter of type '{2}'. + 屬性的 getter 和 setter 必須具有相同類型。屬性 '{0}' 的 getter 類型為 '{1}',但 setter 類型為 '{2}'。 + + + + Array method '{0}' is supplied by the runtime and cannot be directly used in code. For operations with array elements consider using family of GetArray/SetArray functions from LanguagePrimitives.IntrinsicFunctions module. + 陣列方法 '{0}' 是由執行階段所提供,無法直接用於程式碼中。對於含有陣列元素的作業,請考慮使用 LanguagePrimitives.IntrinsicFunctions 模組中的 GetArray/SetArray 函式系列。 + + + + The union case '{0}' does not have a field named '{1}'. + 等位/例外狀況 '{0}' 沒有名為 '{1}' 的欄位。 + + + + Union case/exception field '{0}' cannot be used more than once. + 等位/例外狀況欄位 '{0}' 不可以重複使用。 + + + + Named field '{0}' is used more than once. + 具名欄位 '{0}' 使用一次以上。 + + + + Named field '{0}' conflicts with autogenerated name for anonymous field. + 具名欄位 '{0}' 與匿名欄位的自動產生名稱相衝突。 + + + + This literal expression or attribute argument results in an arithmetic overflow. + 這個常值運算式或屬性引數會導致算術溢位。 + + + + This is not valid literal expression. The [<Literal>] attribute will be ignored. + 這不是有效的常值運算式。將忽略 [<Literal>] 屬性。 + + + + System.Runtime.InteropServices assembly is required to use UnknownWrapper\DispatchWrapper classes. + 使用 UnknownWrapper\DispatchWrapper 類別需要 System.Runtime.InteropServices 組件。 + + + + The mutable local '{0}' is implicitly allocated as a reference cell because it has been captured by a closure. This warning is for informational purposes only to indicate where implicit allocations are performed. + 可變動的本機 '{0}' 已隱含地配置為參考儲存格,因為關閉符號已將其擷取。此警告僅供參考,目的是要指出執行隱含配置的位置。 + + + + A type provider implemented GetStaticParametersForMethod, but ApplyStaticArgumentsForMethod was not implemented or invalid + 型別提供者已實作 GetStaticParametersForMethod,但 ApplyStaticArgumentsForMethod 未實作或無效 + + + + An error occured applying the static arguments to a provided method + 將靜態引數套用至所提供的方法時,發生錯誤 + + + + Unexpected character '{0}' in preprocessor expression + 前置處理器運算式包含未預期的字元 '{0}' + + + + Unexpected token '{0}' in preprocessor expression + 前置處理器運算式包含未預期的語彙基元 '{0}' + + + + Incomplete preprocessor expression + 前置處理器運算式不完整 + + + + Missing token '{0}' in preprocessor expression + 前置處理器運算式缺少語彙基元 '{0}' + + + + An error occurred while reading the F# metadata node at position {0} in table '{1}' of assembly '{2}'. The node had no matching declaration. Please report this warning. You may need to recompile the F# assembly you are using. + 讀取組件 '{2}' 的資料表 '{1}' 中位置 {0} 上之 F# 中繼資料節點時發生錯誤。節點沒有相符的宣告。請回報此警告。您可能需要重新編譯正在使用的 F# 組件。 + + + + Type inference caused the type variable {0} to escape its scope. Consider adding an explicit type parameter declaration or adjusting your code to be less generic. + 型別推斷會造成型別變數 {0} 溢出其範圍。請考慮加入明確的型別參數宣告,或將您的程式碼調整到低於一般程度。 + + + + Type inference caused an inference type variable to escape its scope. Consider adding type annotations to make your code less generic. + 型別推斷會造成推斷型別變數溢出其範圍。請考慮加入型別附註,可讓您的程式碼低於一般程度。 + + + + Redundant arguments are being ignored in function '{0}'. Expected {1} but got {2} arguments. + 正在忽略函式 '{0}' 中多餘的引數。預期為 {1} 個引數,但找到 {2} 個。 + + + + Lowercase literal '{0}' is being shadowed by a new pattern with the same name. Only uppercase and module-prefixed literals can be used as named patterns. + 小寫常值 '{0}' 正由名稱相同的新模式所遮蔽。只有大寫及模組前置的常值可做為具名的模式使用。 + + + + This literal pattern does not take arguments + 此常值模式不接受引數 + + + + Constructors are not permitted as extension members - they must be defined as part of the original definition of the type + 建構函式不得是擴充成員 - 其必須在類型的原始定義中定義 + + + + Invalid response file '{0}' ( '{1}' ) + 回應檔 '{0}' ( '{1}' ) 無效 + + + + Response file '{0}' not found in '{1}' + 在 '{1}' 中找不到回應檔 '{0}' + + + + Response file name '{0}' is empty, contains invalid characters, has a drive specification without an absolute path, or is too long + 回應檔名稱 '{0}' 為空白、包含無效的字元、未使用絕對路徑指定磁碟機或太長 + + + + Cannot find FSharp.Core.dll in compiler's directory + 在編譯器的目錄中找不到 FSharp.Core.dll + + + + One tuple type is a struct tuple, the other is a reference tuple + 一個元組類型為結構元組,另一個則為參考元組 + + + + This provided method requires static parameters + 此提供的方法需要靜態參數 + + + + The conversion from {0} to {1} is a compile-time safe upcast, not a downcast. Consider using 'upcast' instead of 'downcast'. + 從 {0} 轉換為 {1} 屬於編譯時間安全的向上轉換,而非向下轉換。請考慮使用 'upcast' 而不使用 'downcast'。 + + + + The conversion from {0} to {1} is a compile-time safe upcast, not a downcast. Consider using the :> (upcast) operator instead of the :?> (downcast) operator. + 從 {0} 轉換為 {1} 屬於編譯時間安全的向上轉換,而非向下轉換。請考慮使用 :> (upcast) 運算子而不使用 :?> (downcast) 運算子。 + + + + The 'rec' on this module is implied by an outer 'rec' declaration and is being ignored + 此模組上的 'rec' 是由外部 'rec' 宣告所默示,已略過 + + + + In a recursive declaration group, 'open' declarations must come first in each module + 在遞迴宣告群組中,'open' 宣告必須優先出現在每個模組中 + + + + In a recursive declaration group, module abbreviations must come after all 'open' declarations and before other declarations + 在遞迴宣告群組中,模組縮寫必須出現在所有 'open' 宣告之後、其他宣告之前 + + + + This declaration is not supported in recursive declaration groups + 遞迴宣告群組中不支援此宣告 + + + + Invalid use of 'rec' keyword + 不當使用 'rec' 關鍵字 + + + + If a union type has more than one case and is a struct, then all fields within the union type must be given unique names. + 如果等位型別有一個以上的案例並且為結構,等位型別內所有欄位的名稱就都不得重複。 + + + + The CallerMemberNameAttribute applied to parameter '{0}' will have no effect. It is overridden by the CallerFilePathAttribute. + 套用至參數 '{0}' 的 CallerMemberNameAttribute 將不會有作用。CallerFilePathAttribute 會加以覆寫。 + + + + Invalid use of 'fixed'. 'fixed' may only be used in a declaration of the form 'use x = fixed expr' where the expression is an array, the address of a field, the address of an array element or a string' + 使用 'fixed' 無效。'fixed' 僅能用於格式為 'use x = fixed expr' 的宣告中,其中運算式為陣列、欄位的位址、陣列元素的位址或字串 + + + + Could not find method System.Runtime.CompilerServices.OffsetToStringData in references when building 'fixed' expression. + 建置 'fixed' 運算式時,在參考中找不到方法 System.Runtime.CompilerServices.OffsetToStringData。 + + + + {0} is an active pattern and cannot be treated as a discriminated union case with named fields. + {0} 是現用模式,無法視為具名欄位的差別聯集。 + + + + The default value does not have the same type as the argument. The DefaultParameterValue attribute and any Optional attribute will be ignored. Note: 'null' needs to be annotated with the correct type, e.g. 'DefaultParameterValue(null:obj)'. + 預設值並沒有與引數相同的類型。將略過 DefaultParameterValue 屬性及任何 Optional 屬性。注意: 'null' 需要加上正確的加註類型,例如 'DefaultParameterValue(null:obj)'。 + + + + The system type '{0}' was required but no referenced system DLL contained this type + 需要系統類型 '{0}',但參考的系統 DLL 均未包含此類型 + + + + The member '{0}' matches multiple overloads of the same method.\nPlease restrict it to one of the following:{1}. + 成員 '{0}' 符合相同方法的多個多載。\n請將它限制為下列其中一項: {1}。 + + + + Method or object constructor '{0}' is not static + 方法或物件建構函式 '{0}' 不是靜態的 + + + + Unexpected symbol '=' in expression. Did you intend to use 'for x in y .. z do' instead? + 運算式中有非預期的符號 '='。您其實要使用 'for x in y .. z do' 嗎? + + + + Indicates a method that either has no implementation in the type in which it is declared or that is virtual and has a default implementation. + 指出方法,此方法可能在其宣告的類型中沒有實作,或者是虛擬方法而具有預設實作。 + + + + Used in mutually recursive bindings, in property declarations, and with multiple constraints on generic parameters. + 用於互相遞迴的繫結、屬性宣告,以及搭配泛型參數的多個條件約束。 + + + + Used to give the current class object an object name. Also used to give a name to a whole pattern within a pattern match. + 用以提供物件名稱給目前的類別物件。也用以提供名稱給模式比對內的整個模式。 + + + + Used to verify code during debugging. + 用以在偵錯期間驗證程式碼。 + + + + Used as the name of the base class object. + 用作基底類別物件的名稱。 + + + + In verbose syntax, indicates the start of a code block. + 在詳細資訊語法中指定程式碼區塊的開頭。 + + + + In verbose syntax, indicates the start of a class definition. + 在詳細資訊語法中,指出類別定義的開頭。 + + + + Indicates an implementation of an abstract method; used together with an abstract method declaration to create a virtual method. + 指出抽象方法的實作; 與抽象方法宣告一併使用,以建立虛擬方法。 + + + + Used to declare a delegate. + 用以宣告委派。 + + + + Used in looping constructs or to execute imperative code. + 用於重複的建構或用以執行命令式程式碼。 + + + + In verbose syntax, indicates the end of a block of code in a looping expression. + 在詳細資訊語法中,指出重複運算式中程式碼區塊的結尾。 + + + + Used to convert to a type that is lower in the inheritance chain. + 用以將類型轉換為繼承鏈結中較低的類型。 + + + + In a for expression, used when counting in reverse. + 在 for 運算式中,在倒數時使用。 + + + + Used in conditional branching. A short form of else if. + 用於條件式分支。else if 的簡短形式。 + + + + Used in conditional branching. + 用於條件式分支。 + + + + In type definitions and type extensions, indicates the end of a section of member definitions. In verbose syntax, used to specify the end of a code block that starts with the begin keyword. + 在類型定義及類型延伸模組中,指出成員定義區段的結尾。在詳細資訊語法中,用以指定開頭為 begin 關鍵字之程式碼區塊的結尾。 + + + + Used to declare an exception type. + 用以宣告例外狀況類型。 + + + + Indicates that a declared program element is defined in another binary or assembly. + 指出宣告的程式元素已在另一個二進位檔或組件中定義。 + + + + Used as a Boolean literal. + 用作布林值常數。 + + + + Used together with try to introduce a block of code that executes regardless of whether an exception occurs. + 當與 with 並用時,可引入無論例外狀況發生與否皆會執行的程式碼區塊。 + + + + Used in looping constructs. + 用於重複的建構。 + + + + Used in lambda expressions, also known as anonymous functions. + 用於 Lambda 運算式,也稱作匿名函式。 + + + + Used as a shorter alternative to the fun keyword and a match expression in a lambda expression that has pattern matching on a single argument. + 用作 fun 關鍵字的較短替代項,以及在單一引數有模式比對之 Lambda 運算式中的比對運算式。 + + + + Used to reference the top-level .NET namespace. + 用以參考頂層 .NET 命名空間。 + + + + Used in conditional branching constructs. + 用於條件式分支建構。 + + + + Used for sequence expressions and, in verbose syntax, to separate expressions from bindings. + 用於順序運算式及詳細資料語法中,以從繫結分隔運算式。 + + + + Used to specify a base class or base interface. + 用以指定基底類別或基底介面。 + + + + Used to indicate a function that should be integrated directly into the caller's code. + 用以指出應直接整合到呼叫者程式碼中的函式。 + + + + Used to declare and implement interfaces. + 用以宣告及實作介面。 + + + + Used to specify that a member is visible inside an assembly but not outside it. + 用以指定在組件內可見,但在組件外不可見的成員。 + + + + Used to specify a computation that is to be performed only when a result is needed. + 用以指定只會在需要結果時才執行的計算。 + + + + Used to associate, or bind, a name to a value or function. + 用以對值或函式建立名稱的關聯或繫結。 + + + + Used in computation expressions to bind a name to the result of another computation expression. + 用於非同步工作流程,以將名稱繫結到非同步計算的結果,或在其他計算運算式中,用於將名稱繫結到屬於計算類型的結果。 + + + + Used to branch by comparing a value to a pattern. + 用以對模式比較值,以進行分支。 + + + + Used to declare a property or method in an object type. + 用以宣告物件類型中的屬性或方法。 + + + + Used to associate a name with a group of related types, values, and functions, to logically separate it from other code. + 用以在名稱與相關類型、值及函式的群組之間建立關聯,以邏輯方式從其他程式碼分隔出名稱。 + + + + Used to declare a variable, that is, a value that can be changed. + 用以宣告變數,亦即可變更的值。 + + + + Used to associate a name with a group of related types and modules, to logically separate it from other code. + 用以在名稱與相關類型及模組的群組之間建立關聯,以邏輯方式從其他程式碼分隔出名稱。 + + + + Used to declare, define, or invoke a constructor that creates or that can create an object. Also used in generic parameter constraints to indicate that a type must have a certain constructor. + 用以宣告、定義或叫用會建立或可建立物件的建構函式。也用於泛型參數條件約束,以指出類型必須有特定建構函式。 + + + + Not actually a keyword. However, not struct in combination is used as a generic parameter constraint. + 實際上不是關鍵字。不過,組合的 not struct 可用作泛型參數條件約束。 + + + + Indicates the absence of an object. Also used in generic parameter constraints. + 指出物件的缺少情形。也會用在泛型參數條件約束中。 + + + + Used in discriminated unions to indicate the type of categories of values, and in delegate and exception declarations. + 用於差別聯集以指出值分類的類型,並用於委派和例外狀況宣告。 + + + + Used to make the contents of a namespace or module available without qualification. + 用以製作不需資格即可使用的命名空間或模組內容。 + + + + Used with Boolean conditions as a Boolean or operator. Equivalent to ||. Also used in member constraints. + 搭配布林值條件使用,作為布林值或運算子。相當於 ||。也用於成員條件約束。 + + + + Used to implement a version of an abstract or virtual method that differs from the base version. + 用以實作不同於基底版本的抽象或虛擬方法版本。 + + + + Restricts access to a member to code in the same type or module. + 將成員的存取限制為類型或模組相同的程式碼。 + + + + Allows access to a member from outside the type. + 允許存取來自類型外的成員。 + + + + Used to indicate that a function is recursive. + 用以指出函式是遞迴的。 + + + + Used to provide a value for the result of the containing computation expression. + 用以指出要作為計算運算式結果提供的值。 + + + + Used to provide a value for the result of the containing computation expression, where that value itself comes from the result another computation expression. + 用以指出在評估時提供內含計算運算式結果的計算運算式。 + + + + Used in query expressions to specify what fields or columns to extract. Note that this is a contextual keyword, which means that it is not actually a reserved word and it only acts like a keyword in appropriate context. + 用於查詢運算式,以指定要擷取的欄位或資料行。請注意這是內容關鍵字,表示這實際上不是保留字,而只會在適當內容中以關鍵字形式運作。 + + + + Used to indicate a method or property that can be called without an instance of a type, or a value member that is shared among all instances of a type. + 用以指出不需要類型執行個體即可呼叫的方法或屬性,或在所有類型執行個體間共用的值成員。 + + + + Used to declare a structure type. Also used in generic parameter constraints. Used for OCaml compatibility in module definitions. + 用以宣告結構類型。也會用在泛型參數條件約束中。用於模組定義中的 OCaml 相容性。 + + + + Used in conditional expressions. Also used to perform side effects after object construction. + 用於條件運算式。也可在物件建構後用來執行副作用。 + + + + Used in for loops to indicate a range. + 用於 for 迴圈以指出範圍。 + + + + Used to introduce a block of code that might generate an exception. Used together with with or finally. + 用於引入可能會產生例外狀況的程式碼區塊。這會與 with 或 finally 並用。 + + + + Used to declare a class, record, structure, discriminated union, enumeration type, unit of measure, or type abbreviation. + 用以宣告類別、記錄、結構、差別聯集、列舉類型、測量單位或類型縮寫。 + + + + Used to convert to a type that is higher in the inheritance chain. + 用以將類型轉換為繼承鏈結中較高的類型。 + + + + Used instead of let for values that implement IDisposable" + 用來對需要 Dispose 才能呼叫以釋放資源的值取代 let。 + + + + Used instead of let! in computation expressions for computation expression results that implement IDisposable. + 用來在非同步工作流程或其他計算運算式中,對需要 Dispose 才能呼叫以釋放資源的值取代 let!。 + + + + Used in a signature to indicate a value, or in a type to declare a member, in limited situations. + 在有限的情形下用於簽章中以指出值,或於類型中以宣告成員。 + + + + Indicates the .NET void type. Used when interoperating with other .NET languages. + 指出 .NET void 類型。在與其他 .NET 語言交互操作時使用。 + + + + Used for Boolean conditions (when guards) on pattern matches and to introduce a constraint clause for a generic type parameter. + 用於模式比對時的布林值條件 (when 成立條件),以及為泛型型別參數引入條件約束時用。 + + + + Introduces a looping construct. + 引進重複的條件約束。 + + + + Used together with the match keyword in pattern matching expressions. Also used in object expressions, record copying expressions, and type extensions to introduce member definitions, and to introduce exception handlers. + 在模式比對運算式中搭配 match 關鍵字使用。也用在物件運算式、記錄複製運算式及類型運算時,以引入成員定義,並用以引入例外狀況處理常式。 + + + + Used in a sequence expression to produce a value for a sequence. + 用於順序運算式中,以產生順序的值。 + + + + Used in a computation expression to append the result of a given computation expression to a collection of results for the containing computation expression. + 用於計算運算式中,以將指定計算運算式的結果附加到內含計算運算式的結果集合。 + + + + In function types, delimits arguments and return values. Yields an expression (in sequence expressions); equivalent to the yield keyword. Used in match expressions + 在函式類型中,分隔引數並傳回值。產生運算式 (循序運算式); 相當於 yield 關鍵字。用於比對運算式 + + + + Assigns a value to a variable. + 將值指派給變數。 + + + + Converts a type to type that is higher in the hierarchy. + 將類型轉換為階層中較高的類型。 + + + + Converts a type to a type that is lower in the hierarchy. + 將類型轉換為階層中較低的類型。 + + + + Delimits a typed code quotation. + 分隔具型別的程式碼引號。 + + + + Delimits a untyped code quotation. + 分隔不具型別的程式碼引號。 + + + + {0} '{1}' not found in assembly '{2}'. A possible cause may be a version incompatibility. You may need to explicitly reference the correct version of this assembly to allow all referenced components to use the correct version. + 組件 '{2}' 中找不到 {0} '{1}'。可能的原因為版本不相容。您可能需要明確參考此組件的正確版本,以允許所有參考的元件使用正確的版本。 + + + + {0} '{1}' not found in type '{2}' from assembly '{3}'. A possible cause may be a version incompatibility. You may need to explicitly reference the correct version of this assembly to allow all referenced components to use the correct version. + 組件 '{3}' 的類型 '{2}' 中找不到 {0} '{1}'。可能的原因為版本不相容。您可能需要明確參考此組件的正確版本,以允許所有參考的元件使用正確的版本。 + + + + is + + + + + This value is not a function and cannot be applied. + 此值不是函式,無法套用。 + + + + This value is not a function and cannot be applied. Did you intend to access the indexer via {0}.[index] instead? + 此值並非函式,因而無法套用。您要改用 {0}.[index] 來存取索引子嗎? + + + + This expression is not a function and cannot be applied. Did you intend to access the indexer via expr.[index] instead? + 此運算式並非函式,因而無法套用。您要改用 expr.[index] 來存取索引子嗎? + + + + This value is not a function and cannot be applied. Did you forget to terminate a declaration? + 這個值不是函式,無法套用。您是不是忘記終止宣告了? + + + + The argument names in the signature '{0}' and implementation '{1}' do not match. The argument name from the signature file will be used. This may cause problems when debugging or profiling. + 特徵標記 '{0}' 和實作 '{1}' 中的引數名稱不相符。將會使用特徵標記檔案中的引數名稱。這可能會在偵錯或分析時造成問題。 + + + + An error occurred while reading the F# metadata of assembly '{0}'. A reserved construct was utilized. You may need to upgrade your F# compiler or use an earlier version of the assembly that doesn't make use of a specific construct. + 讀取組件 '{0}' 的 F# 中繼資料時發生錯誤。已使用保留的建構。建議您升級 F# 編譯器,或使用不會用特定建構的舊版組件。 + + + + This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. + F# 程式碼不常使用這個方法或屬性,請改用明確的元組模式進行解構。 + + + + This expression returns a value of type '{0}' but is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to use the expression as a value in the sequence then use an explicit 'yield'. + 此運算式會傳回類型為 '{0}' 的值,但會被間接捨棄。請考慮使用 'let' 將結果繫結到名稱。例如 'let result = expression'。若您想要在序列中,以值的形式使用運算式,請直接使用 'yield'。 + + + + This expression returns a value of type '{0}' but is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to use the expression as a value in the sequence then use an explicit 'yield!'. + 此運算式會傳回類型為 '{0}' 的值,但會被間接捨棄。請考慮使用 'let' 將結果繫結到名稱。例如 'let result = expression'。若您想要在序列中,以值的形式使用運算式,請直接使用 'yield!'。 + + + + Used in computation expressions to pattern match directly over the result of another computation expression. + 用於計算運算式中,直接對另一個計算運算式的結果進行模式比對。 + + + + The file '{0}' changed on disk unexpectedly, please reload. + 檔案 '{0}' 在磁碟上意外變更,請重新載入。 + + + + The byref pointer is readonly, so this write is not permitted. + byref 指標為唯讀指標,所以不允許此寫入。 + + + + A value must be mutable in order to mutate the contents or take the address of a value type, e.g. 'let mutable x = ...' + 值必須是可變動的,才能變動內容或接受實值類型的位址,例如 'let mutable x = ...' + + + + A ReadOnly attribute has been applied to a struct type with a mutable field. + 已將 ReadOnly 屬性套用至具備可變動欄位的結構類型。 + + + + A byref pointer returned by a function or method is implicitly dereferenced as of F# 4.5. To acquire the return value as a pointer, use the address-of operator, e.g. '&f(x)' or '&obj.Method(arg1, arg2)'. + 函式或方法所傳回的 byref 指標,隱含會取值為 F# 4.5。如需將傳回值擷取為指標,請使用 address-of 運算子,例如 '&f(x)' 或 '&obj.Method(arg1, arg2)'。 + + + + A type annotated with IsByRefLike must also be a struct. Consider adding the [<Struct>] attribute to the type. + 標註有 IsByRefLike 的類型,必須是結構。請考慮對該類型新增 [<Struct>] 屬性。 + + + + The address of the variable '{0}' or a related expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + 此時不可使用變數 '{0}' 或相關運算式的位址。如此可確保本機值的位址不會逸出其範圍。 + + + + This value can't be assigned because the target '{0}' may refer to non-stack-local memory, while the expression being assigned is assessed to potentially refer to stack-local memory. This is to help prevent pointers to stack-bound memory escaping their scope. + 因為目標 '{0}' 會參考非本機堆疊的記憶體,所以無法指派此值。而目前所指派的運算式則評定為可能會參考本機堆疊的記憶體。如此可有助於避免進入受堆疊拘束記憶體的指標會逸出其範圍。 + + + + A value defined in a module must be mutable in order to take its address, e.g. 'let mutable x = ...' + 模組中定義的值必須可以變動,才可取用其位址,例如 'let mutable x = ...' + + + + A type annotated with IsReadOnly must also be a struct. Consider adding the [<Struct>] attribute to the type. + 標註有 IsReadOnly 的類型,必須是結構。請考慮對該類型新增 [<Struct>] 屬性。 + + + + Struct members cannot return the address of fields of the struct by reference + 結構成員無法經由參考方式,傳回結構欄位的位址 + + + + The function or method call cannot be used at this point, because one argument that is a byref of a non-stack-local Span or IsByRefLike type is used with another argument that is a stack-local Span or IsByRefLike type. This is to ensure the address of the local value does not escape its scope. + 此時不可使用函式或方法呼叫,原因是非本機堆疊 Span 或 IsByRefLike 類型的 byref 引數,目前與本機堆疊 Span 或 IsByRefLike 類型的引數一起使用。如此可確保本機值的位址不會逸出其範圍。 + + + + The address of a value returned from the expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + 此時不可使用運算式傳回值的位址。如此可確保本機值的位址不會逸出其範圍。 + + + + The Span or IsByRefLike variable '{0}' cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + 此時不可使用 Span 或 IsByRefLike 變數 '{0}'。如此可確保本機值的位址不會逸出其範圍。 + + + + A Span or IsByRefLike value returned from the expression cannot be used at ths point. This is to ensure the address of the local value does not escape its scope. + 此時不可使用運算式傳回值的 Span 或 IsByRefLike。如此可確保本機值的位址不會逸出其範圍。 + + + + Cannot take the address of the value returned from the expression. Assign the returned value to a let-bound value before taking the address. + 無法使用運算式傳回值的位址。在使用位址前,先將傳回值指派給以 let 繫結的值。 + + + + The Span or IsByRefLike expression cannot be returned from this function or method, because it is composed using elements that may escape their scope. + The Span or IsByRefLike expression cannot be returned from this function or method, because it is composed using elements that may escape their scope. + + + + This type does not inherit Attribute, it will not work correctly with other .NET languages. + This type does not inherit Attribute, it will not work correctly with other .NET languages. + + + + The exception '{0}' does not have a field named '{1}'. + The exception '{0}' does not have a field named '{1}'. + + + + The constructor does not have a field named '{0}'. + The constructor does not have a field named '{0}'. + + + + Active patterns do not have fields. This syntax is invalid. + Active patterns do not have fields. This syntax is invalid. + + + + + \ No newline at end of file diff --git a/src/fsharp/xlf/FSInteractiveSettings.txt.cs.xlf b/src/fsharp/xlf/FSInteractiveSettings.txt.cs.xlf new file mode 100644 index 00000000000..ff6a38f6104 --- /dev/null +++ b/src/fsharp/xlf/FSInteractiveSettings.txt.cs.xlf @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/fsharp/xlf/FSInteractiveSettings.txt.de.xlf b/src/fsharp/xlf/FSInteractiveSettings.txt.de.xlf new file mode 100644 index 00000000000..7f0a5d1e6f5 --- /dev/null +++ b/src/fsharp/xlf/FSInteractiveSettings.txt.de.xlf @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/fsharp/xlf/FSInteractiveSettings.txt.en.xlf b/src/fsharp/xlf/FSInteractiveSettings.txt.en.xlf new file mode 100644 index 00000000000..10fa30b41f5 --- /dev/null +++ b/src/fsharp/xlf/FSInteractiveSettings.txt.en.xlf @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/fsharp/xlf/FSInteractiveSettings.txt.es.xlf b/src/fsharp/xlf/FSInteractiveSettings.txt.es.xlf new file mode 100644 index 00000000000..b793caaa80c --- /dev/null +++ b/src/fsharp/xlf/FSInteractiveSettings.txt.es.xlf @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/fsharp/xlf/FSInteractiveSettings.txt.fr.xlf b/src/fsharp/xlf/FSInteractiveSettings.txt.fr.xlf new file mode 100644 index 00000000000..b76ab91f5c1 --- /dev/null +++ b/src/fsharp/xlf/FSInteractiveSettings.txt.fr.xlf @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/fsharp/xlf/FSInteractiveSettings.txt.it.xlf b/src/fsharp/xlf/FSInteractiveSettings.txt.it.xlf new file mode 100644 index 00000000000..b8662ce2a50 --- /dev/null +++ b/src/fsharp/xlf/FSInteractiveSettings.txt.it.xlf @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/fsharp/xlf/FSInteractiveSettings.txt.ja.xlf b/src/fsharp/xlf/FSInteractiveSettings.txt.ja.xlf new file mode 100644 index 00000000000..eb18a6c2f4a --- /dev/null +++ b/src/fsharp/xlf/FSInteractiveSettings.txt.ja.xlf @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/fsharp/xlf/FSInteractiveSettings.txt.ko.xlf b/src/fsharp/xlf/FSInteractiveSettings.txt.ko.xlf new file mode 100644 index 00000000000..d416d3df5dc --- /dev/null +++ b/src/fsharp/xlf/FSInteractiveSettings.txt.ko.xlf @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/fsharp/xlf/FSInteractiveSettings.txt.pl.xlf b/src/fsharp/xlf/FSInteractiveSettings.txt.pl.xlf new file mode 100644 index 00000000000..570cc88ba2b --- /dev/null +++ b/src/fsharp/xlf/FSInteractiveSettings.txt.pl.xlf @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/fsharp/xlf/FSInteractiveSettings.txt.pt-BR.xlf b/src/fsharp/xlf/FSInteractiveSettings.txt.pt-BR.xlf new file mode 100644 index 00000000000..97c7c4d15dd --- /dev/null +++ b/src/fsharp/xlf/FSInteractiveSettings.txt.pt-BR.xlf @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/fsharp/xlf/FSInteractiveSettings.txt.ru.xlf b/src/fsharp/xlf/FSInteractiveSettings.txt.ru.xlf new file mode 100644 index 00000000000..2f74e182901 --- /dev/null +++ b/src/fsharp/xlf/FSInteractiveSettings.txt.ru.xlf @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/fsharp/xlf/FSInteractiveSettings.txt.tr.xlf b/src/fsharp/xlf/FSInteractiveSettings.txt.tr.xlf new file mode 100644 index 00000000000..8da962f026d --- /dev/null +++ b/src/fsharp/xlf/FSInteractiveSettings.txt.tr.xlf @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/fsharp/xlf/FSInteractiveSettings.txt.zh-Hans.xlf b/src/fsharp/xlf/FSInteractiveSettings.txt.zh-Hans.xlf new file mode 100644 index 00000000000..433cbf17e93 --- /dev/null +++ b/src/fsharp/xlf/FSInteractiveSettings.txt.zh-Hans.xlf @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/fsharp/xlf/FSInteractiveSettings.txt.zh-Hant.xlf b/src/fsharp/xlf/FSInteractiveSettings.txt.zh-Hant.xlf new file mode 100644 index 00000000000..0ce44db71af --- /dev/null +++ b/src/fsharp/xlf/FSInteractiveSettings.txt.zh-Hant.xlf @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/fsharp/xlf/FSStrings.cs.xlf b/src/fsharp/xlf/FSStrings.cs.xlf new file mode 100644 index 00000000000..dd20d2c3294 --- /dev/null +++ b/src/fsharp/xlf/FSStrings.cs.xlf @@ -0,0 +1,1622 @@ + + + + + + . See also {0}. + . Viz taky {0}. + + + + The tuples have differing lengths of {0} and {1} + {0} a {1} mají v řazených kolekcích členů různou délku. + + + + The types '{0}' and '{1}' cannot be unified. + Typy {0} a {1} nemůžou být sjednocené. + + + + A type parameter is missing a constraint '{0}' + V parametru typu chybí omezení {0}. + + + + The unit of measure '{0}' does not match the unit of measure '{1}' + Měrná jednotka {0} se neshoduje s měrnou jednotkou {1}. + + + + The type '{0}' does not match the type '{1}' + Typ {0} se neshoduje s typem {1}. + + + + The type '{0}' is not compatible with the type '{1}'{2} + Typ {0} není kompatibilní s typem {1}{2}. + + + + This expression was expected to have type\n '{1}' \nbut here has type\n '{0}' {2} + U tohoto výrazu se očekával typ\n {1}, \nale tady je typu\n {0} {2}. + + + + Type mismatch. Expecting a\n '{0}' \nbut given a\n '{1}' {2}\n + Neshoda v typu. Očekávaný typ je \n {0}, \nale předávaný je\n {1} {2}.\n + + + + Type constraint mismatch when applying the default type '{0}' for a type inference variable. + Neshoda v omezení typu při použití výchozího typu {0} na proměnnou rozhraní typu + + + + Consider adding further type constraints + Zvažte přidání dalších omezení typu. + + + + Type constraint mismatch. The type \n '{0}' \nis not compatible with type\n '{1}' {2}\n + Neshoda v omezení typu. Typ \n {0} \nnení kompatibilní s typem\n {1}. {2}\n + + + + Uppercase variable identifiers should not generally be used in patterns, and may indicate a misspelt pattern name. + Identifikátory proměnných psané velkými písmeny se ve vzorech obecně nedoporučují. Můžou označovat špatně napsaný název vzoru. + + + + Discriminated union cases and exception labels must be uppercase identifiers + Rozlišené případy typu union a popisky výjimek musí být identifikátory, které jsou psané velkými písmeny. + + + + Possible overload: '{0}'. {1}. + Možné přetížení: {0}. {1}. + + + + \n\nPossible best overload: '{0}'. + \n\nNejlepší možné přetížení: {0}. + + + + This function takes too many arguments, or is used in a context where a function is not expected + Tato funkce přebírá příliš mnoho argumentů, nebo se používá v kontextu, ve kterém se funkce neočekává. + + + + Member constraints with the name '{0}' are given special status by the F# compiler as certain .NET types are implicitly augmented with this member. This may result in runtime failures if you attempt to invoke the member constraint from your own code. + Kompilátor F# udělil omezením člena s názvem {0} zvláštní statut, protože některé typy .NET jsou o tento člen implicitně rozšířené. Pokud se budete pokoušet vyvolat omezení člena z vlastního kódu, může to způsobit potíže za běhu. + + + + A definition to be compiled as a .NET event does not have the expected form. Only property members can be compiled as .NET events. + Definice, která se má zkompilovat jako událost .NET, nemá očekávanou podobu. Jako události .NET se dají zkompilovat jenom členové vlastností. + + + + Implicit object constructors for structs must take at least one argument + Implicitní konstruktory objektu pro struktury musí přebírat aspoň jeden argument. + + + + The type implements the interface '{0}' but this is not revealed by the signature. You should list the interface in the signature, as the interface will be discoverable via dynamic type casts and/or reflection. + Typ implementuje rozhraní {0}, které ale signatura neposkytuje. Měli byste toto rozhraní uvést v signatuře, aby bylo prostřednictvím dynamického přetypování nebo reflexe zjistitelné. + + + + The type '{0}' expects {1} type argument(s) but is given {2} + Počet argumentů typu, které typ {0} očekává, je {1}, ale počet předávaných je {2}. + + + + Lookup on object of indeterminate type based on information prior to this program point. A type annotation may be needed prior to this program point to constrain the type of the object. This may allow the lookup to be resolved. + Definovali jste vyhledávání u objektu neurčitého typu založeného na informacích před tímto místem v programu. Aby se typ objektu omezil, bude možná potřeba přidat před tímto místem v programu poznámku typu. Tím se problém s vyhledáváním pravděpodobně vyřeší. + + + + Duplicate definition of {0} '{1}' + Duplicitní definice: {0} {1} + + + + The {0} '{1}' can not be defined because the name '{2}' clashes with the {3} '{4}' in this type or module + {0} {1} se nedá definovat, protože název {2} a {3} {4} v tomto typu nebo modulu jsou v konfliktu. + + + + Two members called '{0}' have the same signature + Dva členové s názvem {0} mají stejnou signaturu. + + + + Duplicate definition of {0} '{1}' + Duplicitní definice: {0} {1} + + + + A construct with this name was found in FSharp.PowerPack.dll, which contains some modules and types that were implicitly referenced in some previous versions of F#. You may need to add an explicit reference to this DLL in order to compile this code. + Konstruktor s tímto názvem se našel v knihovně FSharp.PowerPack.dll, která obsahuje určité moduly a typy implicitně odkazované v některých dřívějších verzích F#. Abyste tento kód mohli zkompilovat, bude možná potřeba přidat explicitní odkaz na tuto knihovnu DLL. + + + + This field is not mutable + Toto pole není měnitelné. + + + + The fields '{0}' and '{1}' are from different types + Pole {0} a {1} jsou odlišného typu. + + + + '{0}' is bound twice in this pattern + {0} má v tomto vzoru dvě vazby. + + + + A use of the function '{0}' does not match a type inferred elsewhere. The inferred type of the function is\n {1}. \nThe type of the function required at this point of use is\n {2} {3}\nThis error may be due to limitations associated with generic recursion within a 'let rec' collection or within a group of classes. Consider giving a full type signature for the targets of recursive calls including type annotations for both argument and return types. + Použití funkce {0} neodpovídá typu, který se odvozuje na jiném místě. Odvozený typ funkce je\n {1}. \nTyp funkce, který se na tomto místě požaduje, je \n {2} {3}.\nTato chyba může být způsobená omezeními, která jsou přidružená k obecné rekurzi v kolekci let rec nebo ve skupině tříd. Zvažte možnost zadat úplnou signaturu typu pro cíle rekurzivních volání včetně poznámek typu pro argumenty i návratových typů. + + + + Invalid runtime coercion or type test from type {0} to {1}\n{2} + Neplatný test typu nebo konverze za běhu z typu {0} na {1}\n{2} + + + + This runtime coercion or type test from type\n {0} \n to \n {1} \ninvolves an indeterminate type based on information prior to this program point. Runtime type tests are not allowed on some types. Further type annotations are needed. + Tento test typu nebo konverze za běhu z typu\n {0} \n na \n {1} \nzahrnuje neurčitý typ založený na informacích před tímto místem v programu. Testy typu za běhu nejsou u některých typů povolené. Je potřeba, abyste k typu doplnili další poznámky. + + + + The static coercion from type\n {0} \nto \n {1} \n involves an indeterminate type based on information prior to this program point. Static coercions are not allowed on some types. Further type annotations are needed. + Statická konverze z typu\n {0} \nna typ \n {1} \n zahrnuje neurčitý typ založený na informacích před tímto místem v programu. Statické konverze nejsou u některých typů povolené. Je potřeba, abyste k typu doplnili další poznámky. + + + + A coercion from the value type \n {0} \nto the type \n {1} \nwill involve boxing. Consider using 'box' instead + Při konverzi z typu hodnoty \n {0} \nna typ \n {1} \nproběhne zabalení. Zvažte možnost použít místo toho klíčové slovo box. + + + + This type is 'abstract' since some abstract members have not been given an implementation. If this is intentional then add the '[<AbstractClass>]' attribute to your type. + Toto je typ abstract, protože se neimplementovali někteří abstraktní členové. Pokud je to záměr, pak do typu přidejte atribut [<AbstractClass>]. + + + + This construct causes code to be less generic than indicated by its type annotations. The type variable implied by the use of a '#', '_' or other type annotation at or near '{0}' has been constrained to be type '{1}'. + Konstruktor způsobuje, že kód je míň obecný, než udávají jeho poznámky typu. Proměnná typu odvozená pomocí #, _ nebo jiné poznámky typu na pozici {0} nebo blízko ní se omezila na typ {1}. + + + + This construct causes code to be less generic than indicated by the type annotations. The unit-of-measure variable '{0} has been constrained to be measure '{1}'. + Tento konstruktor způsobuje, že kód je míň obecný, než udávají jeho poznámky typu. Proměnná měrné jednotky {0} se omezila na měrnou jednotku {1}. + + + + This construct causes code to be less generic than indicated by the type annotations. The type variable '{0} has been constrained to be type '{1}'. + Tento konstruktor způsobuje, že kód je míň obecný, než udávají jeho poznámky typu. Proměnná typu {0} se omezila na typ {1}. + + + + identifier + identifikátor + + + + integer literal + celočíselný literál + + + + floating point literal + literál s plovoucí desetinnou čárkou + + + + decimal literal + desítkový literál + + + + character literal + znakový literál + + + + keyword 'base' + klíčové slovo base + + + + symbol '(*)' + symbol (*) + + + + symbol '$' + symbol $ + + + + infix operator + operátor vpony + + + + infix operator + operátor vpony + + + + symbol ':>' + symbol :> + + + + symbol '::' + symbol :: + + + + symbol '{0} + symbol {0} + + + + infix operator + operátor vpony + + + + infix operator + operátor vpony + + + + infix operator + operátor vpony + + + + prefix operator + operátor předpony + + + + symbol ':?>' + symbol :?> + + + + infix operator + operátor vpony + + + + infix operator + operátor vpony + + + + symbol '&' + symbol „&“ + + + + symbol '&&' + symbol && + + + + symbol '||' + symbol || + + + + symbol '<' + symbol < + + + + symbol '>' + symbol > + + + + symbol '?' + symbol ? + + + + symbol '??' + symbol ?? + + + + symbol ':?' + symbol :? + + + + integer.. + celé číslo.. + + + + symbol '..' + symbol .. + + + + quote symbol + symbol citace + + + + symbol '*' + symbol * + + + + type application + použití typu + + + + symbol ':' + symbol : + + + + symbol ':=' + symbol := + + + + symbol '<-' + symbol <- + + + + symbol '=' + symbol = + + + + symbol '>|]' + symbol >|] + + + + symbol '-' + symbol - + + + + prefix operator + operátor předpony + + + + operator name + název operátora + + + + symbol ',' + symbol , + + + + symbol '.' + symbol . + + + + symbol '|' + symbol | + + + + symbol # + symbol # + + + + symbol '_' + symbol _ + + + + symbol ';' + symbol ; + + + + symbol ';;' + symbol ;; + + + + symbol '(' + symbol ( + + + + symbol ')' + symbol ) + + + + symbol 'splice' + symbol splice + + + + start of quotation + začátek citace + + + + symbol '[' + symbol [ + + + + symbol '[|' + symbol [| + + + + symbol '[<' + symbol [< + + + + symbol '{' + symbol { + + + + symbol '{<' + symbol {< + + + + symbol '|]' + symbol |] + + + + symbol '>}' + symbol >} + + + + symbol '>]' + symbol >] + + + + end of quotation + konec citace + + + + symbol ']' + symbol ] + + + + symbol '}' + symbol } + + + + keyword 'public' + klíčové slovo public + + + + keyword 'private' + klíčové slovo private + + + + keyword 'internal' + klíčové slovo internal + + + + keyword 'fixed' + klíčové slovo fixed + + + + keyword 'constraint' + klíčové slovo constraint + + + + keyword 'instance' + klíčové slovo instance + + + + keyword 'delegate' + klíčové slovo delegate + + + + keyword 'inherit' + klíčové slovo inherit + + + + keyword 'constructor' + klíčové slovo constructor + + + + keyword 'default' + klíčové slovo default + + + + keyword 'override' + klíčové slovo override + + + + keyword 'abstract' + klíčové slovo abstract + + + + keyword 'class' + klíčové slovo class + + + + keyword 'member' + klíčové slovo member + + + + keyword 'static' + klíčové slovo static + + + + keyword 'namespace' + klíčové slovo namespace + + + + start of structured construct + začátek strukturovaného konstruktoru + + + + incomplete structured construct at or before this point + neúplný strukturovaný konstruktor na této pozici nebo před ní + + + + Incomplete structured construct at or before this point + Neúplný strukturovaný konstruktor na této pozici nebo před ní + + + + keyword 'then' + klíčové slovo then + + + + keyword 'else' + klíčové slovo else + + + + keyword 'let' or 'use' + klíčové slovo let nebo use + + + + binder keyword + klíčové slovo vazače + + + + keyword 'do' + klíčové slovo do + + + + keyword 'const' + klíčové slovo const + + + + keyword 'with' + klíčové slovo with + + + + keyword 'function' + klíčové slovo function + + + + keyword 'fun' + klíčové slovo fun + + + + end of input + konec vstupu + + + + internal dummy token + interní fiktivní token + + + + keyword 'do!' + klíčové slovo do! + + + + yield + yield + + + + yield! + yield! + + + + keyword 'interface' + klíčové slovo interface + + + + keyword 'elif' + klíčové slovo elif + + + + symbol '->' + symbol -> + + + + keyword 'sig' + klíčové slovo sig + + + + keyword 'struct' + klíčové slovo struct + + + + keyword 'upcast' + klíčové slovo upcast + + + + keyword 'downcast' + klíčové slovo downcast + + + + keyword 'null' + klíčové slovo null + + + + reserved keyword + vyhrazené klíčové slovo + + + + keyword 'module' + klíčové slovo module + + + + keyword 'and' + klíčové slovo and + + + + keyword 'as' + klíčové slovo as + + + + keyword 'assert' + klíčové slovo assert + + + + keyword 'asr' + klíčové slovo asr + + + + keyword 'downto' + klíčové slovo downto + + + + keyword 'exception' + klíčové slovo exception + + + + keyword 'false' + klíčové slovo false + + + + keyword 'for' + klíčové slovo for + + + + keyword 'fun' + klíčové slovo fun + + + + keyword 'function' + klíčové slovo function + + + + keyword 'finally' + klíčové slovo finally + + + + keyword 'lazy' + klíčové slovo lazy + + + + keyword 'match' + klíčové slovo match + + + + keyword 'match!' + klíčové slovo match! + + + + keyword 'mutable' + klíčové slovo mutable + + + + keyword 'new' + klíčové slovo new + + + + keyword 'of' + klíčové slovo of + + + + keyword 'open' + klíčové slovo open + + + + keyword 'or' + klíčové slovo or + + + + keyword 'void' + klíčové slovo void + + + + keyword 'extern' + klíčové slovo extern + + + + keyword 'interface' + klíčové slovo interface + + + + keyword 'rec' + klíčové slovo rec + + + + keyword 'to' + klíčové slovo to + + + + keyword 'true' + klíčové slovo true + + + + keyword 'try' + klíčové slovo try + + + + keyword 'type' + klíčové slovo type + + + + keyword 'val' + klíčové slovo val + + + + keyword 'inline' + klíčové slovo inline + + + + keyword 'when' + klíčové slovo when + + + + keyword 'while' + klíčové slovo while + + + + keyword 'with' + klíčové slovo with + + + + keyword 'if' + klíčové slovo if + + + + keyword 'do' + klíčové slovo do + + + + keyword 'global' + klíčové slovo global + + + + keyword 'done' + klíčové slovo done + + + + keyword 'in' + klíčové slovo in + + + + symbol '(' + symbol ( + + + + symbol'[' + symbol [ + + + + keyword 'begin' + klíčové slovo begin + + + + keyword 'end' + klíčové slovo end + + + + directive + direktiva + + + + inactive code + neaktivní kód + + + + lex failure + selhání lex + + + + whitespace + prázdný znak + + + + comment + komentář + + + + line comment + řádkový komentář + + + + string text + text řetězce + + + + compiler generated literal + literál generovaný kompilátorem + + + + byte array literal + literál bajtového pole + + + + string literal + řetězcový literál + + + + end of input + konec vstupu + + + + Unexpected end of input + Neočekávaný konec vstupu + + + + Unexpected {0} + Neočekávaný {0} + + + + in interaction + v interakci + + + + in directive + v direktivě + + + + in field declaration + v deklaraci pole + + + + in discriminated union case declaration + v deklaracích rozlišených případů typu union + + + + in binding + ve vazbě + + + + in binding + ve vazbě + + + + in member definition + v definici člena + + + + in definitions + v definicích + + + + in member signature + v signatuře člena + + + + in value signature + v signatuře hodnoty + + + + in type signature + v signatuře typu + + + + in lambda expression + ve výrazu lambda + + + + in union case + v případu typu union + + + + in extern declaration + v externí deklaraci + + + + in object expression + v objektovém výrazu + + + + in if/then/else expression + ve výrazu if/then/else + + + + in open declaration + v otevřené deklaraci + + + + in module or namespace signature + v signatuře oboru názvů nebo modulu + + + + in pattern matching + v porovnávání vzorů + + + + in begin/end expression + ve výrazu begin/end + + + + in record expression + ve výrazu záznamu + + + + in type definition + v definici typu + + + + in exception definition + v definici výjimky + + + + in type name + v názvu typu + + + + in attribute list + v seznamu atributů + + + + in quotation literal + v literálu citace + + + + in type constraint + v omezení typu + + + + in implementation file + v souboru implementace + + + + in definition + v definici + + + + in signature file + v souboru signatury + + + + in pattern + ve vzoru + + + + in expression + ve výrazu + + + + in type + v typu + + + + in type arguments + v argumentech typu + + + + keyword + klíčové slovo + + + + symbol + symbol + + + + (due to indentation-aware syntax) + (kvůli syntaxi, která reflektuje odsazení) + + + + . Expected {0} or other token. + . Očekával se token {0} nebo nějaký jiný. + + + + . Expected {0}, {1} or other token. + . Očekával se token {0}, {1} nebo nějaký jiný. + + + + . Expected {0}, {1}, {2} or other token. + . Očekával se token {0}, {1}, {2} nebo nějaký jiný. + + + + The type '{0}' cannot be used as the source of a type test or runtime coercion + Typ {0} se jako zdroj testu typu nebo konverze za běhu použít nedá. + + + + The type '{0}' does not have any proper subtypes and cannot be used as the source of a type test or runtime coercion. + Typ {0} nemá žádné správné podtypy a nedá se použít jako zdroj testu typu nebo konverze za běhu. + + + + The type '{0}' does not have any proper subtypes and need not be used as the target of a static coercion + Typ {0} nemá žádné správné podtypy a není potřeba ho používat jako cíl statické konverze. + + + + This upcast is unnecessary - the types are identical + Toto přetypování směrem nahoru není nutné: oba typy jsou identické. + + + + This type test or downcast will always hold + Tento test typu nebo přetypování směrem dolů se vždycky uloží. + + + + The member '{0}' does not have the correct type to override any given virtual method + Člen {0} není správného typu, aby mohl přepsat libovolné předané virtuální metody. + + + + The member '{0}' does not have the correct type to override the corresponding abstract method. + Člen {0} není správného typu, aby mohl přepsat odpovídající abstraktní metodu. + + + + The required signature is '{0}'. + Požadovaná signatura je {0}. + + + + The member '{0}' is specialized with 'unit' but 'unit' can't be used as return type of an abstract method parameterized on return type. + Člen {0} je specializovaný s typem unit, ale typ unit není možné použít jako návratový typ abstraktní metody parametrizované u návratového typu. + + + + This constructor is applied to {0} argument(s) but expects {1} + Počet argumentů, pro které se používá tento konstruktor, je {0}, ale očekávaný počet je {1}. + + + + The two sides of this 'or' pattern bind different sets of variables + Obě strany tohoto vzoru or vážou jinou sadu proměnných. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \n{3}. + Modul {0} obsahuje hodnotu\n {1}, \nale jeho signatura definuje hodnotu\n {2}. \n{3}. + + + + Module '{0}' requires a {1} '{2}' + Modul {0} vyžaduje {1} {2}. + + + + The use of native pointers may result in unverifiable .NET IL code + Použití nativních ukazatelů může způsobit vygenerování neověřitelného kódu .NET IL. + + + + {0} + {0} + + + + Thread static and context static 'let' bindings are deprecated. Instead use a declaration of the form 'static val mutable <ident> : <type>' in a class. Add the 'DefaultValue' attribute to this declaration to indicate that the value is initialized to the default value on each new thread. + Vazby let, které jsou statické na úrovni vlákna nebo kontextu, jsou zastaralé. Použijte místo nich deklaraci ve třídě v podobě static val mutable <ident> : <type>. Přidáním atributu DefaultValue do této deklarace můžete určit, že se bude hodnota v každém novém vláknu inicializovat na výchozí hodnotu. + + + + This expression is a function value, i.e. is missing arguments. Its type is {0}. + Tento výraz je hodnotou funkce, to znamená, že u něj chybí argumenty. Je typu {0}. + + + + The result of this expression has type '{0}' and is implicitly ignored. Consider using 'ignore' to discard this value explicitly, e.g. 'expr |> ignore', or 'let' to bind the result to a name, e.g. 'let result = expr'. + Výsledek tohoto výrazu má typ {0} a implicitně se ignoruje. Zvažte možnost použít klíčové slovo ignore, aby se tato hodnota explicitně zahodila, třeba expr |> ignore, nebo klíčové slovo let, aby se výsledek svázal s názvem, třeba let výsledek = expr. + + + + The result of this equality expression has type '{0}' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. + Výsledek tohoto výrazu rovnosti má typ {0} a implicitně se zruší. Zvažte vytvoření vazby mezi výsledkem a názvem pomocí klíčového slova let, např. let výsledek = výraz. + + + + The result of this equality expression has type '{0}' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to set a value to a property, then use the '<-' operator e.g. '{1}.{2} <- expression'. + Výsledek tohoto výrazu rovnosti má typ {0} a implicitně se zruší. Zvažte vytvoření vazby mezi výsledkem a názvem pomocí klíčového slova let, např. let výsledek = výraz. Pokud jste chtěli nastavit hodnotu na vlastnost, použijte operátor <-, např. {1}.{2} <- výraz. + + + + The result of this equality expression has type '{0}' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to mutate a value, then mark the value 'mutable' and use the '<-' operator e.g. '{1} <- expression'. + Výsledek tohoto výrazu rovnosti má typ {0} a implicitně se zruší. Zvažte vytvoření vazby mezi výsledkem a názvem pomocí klíčového slova let, např. let výsledek = výraz. Pokud jste chtěli mutovat hodnotu, označte hodnotu jako mutable a použijte operátor <-, např. {1} <- výraz. + + + + The result of this equality expression has type '{0}' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to mutate a value, then use the '<-' operator e.g. '{1} <- expression'. + Výsledek tohoto výrazu rovnosti má typ {0} a implicitně se zruší. Zvažte vytvoření vazby mezi výsledkem a názvem pomocí klíčového slova let, např. let výsledek = výraz. Pokud jste chtěli mutovat hodnotu, použijte operátor <-, např. {1} <- výraz. + + + + This recursive use will be checked for initialization-soundness at runtime. This warning is usually harmless, and may be suppressed by using '#nowarn "21"' or '--nowarn:21'. + U tohoto rekurzivního použití se bude kontrolovat stabilita inicializace za běhu. Toto upozornění je obvykle neškodné a pomocí #nowarn "21" nebo --nowarn:21 se dá potlačit. + + + + The value '{0}' will be evaluated as part of its own definition + Hodnota {0} se vyhodnotí v rámci její vlastní definice. + + + + This value will be eventually evaluated as part of its own definition. You may need to make the value lazy or a function. Value '{0}'{1}. + Tato hodnota se nakonec vyhodnotí v rámci její vlastní definice. Možná bude potřeba, abyste hodnotu změnili na opožděnou nebo na funkci. Hodnota {0}{1}. + + + + will evaluate '{0}' + se vyhodnotí jako {0} + + + + Bindings may be executed out-of-order because of this forward reference. + Vazby se můžou kvůli tomuto dopřednému odkazu provádět ve špatném pořadí. + + + + This and other recursive references to the object(s) being defined will be checked for initialization-soundness at runtime through the use of a delayed reference. This is because you are defining one or more recursive objects, rather than recursive functions. This warning may be suppressed by using '#nowarn "40"' or '--nowarn:40'. + U tohoto a dalších rekurzivních odkazů na definované objekty se bude kontrolovat stabilita inicializace za běhu pomocí zpožděného odkazování. Je to kvůli tomu, že definujete rekurzivní objekty místo rekurzivních funkcí. Toto upozornění se dá pomocí #nowarn "40" nebo --nowarn:40 potlačit. + + + + Recursive references to the object being defined will be checked for initialization soundness at runtime through the use of a delayed reference. Consider placing self-references in members or within a trailing expression of the form '<ctor-expr> then <expr>'. + U rekurzivních odkazů na definované objekty se bude kontrolovat stabilita inicializace za běhu pomocí zpožděného odkazování. Zvažte možnost přidat do členů nebo koncového výrazu v podobě <výraz-konstruktoru> then <výraz> odkazy na sebe sama. + + + + Recursive references to the object being defined will be checked for initialization soundness at runtime through the use of a delayed reference. Consider placing self-references within 'do' statements after the last 'let' binding in the construction sequence. + U rekurzivních odkazů na definované objekty se bude kontrolovat stabilita inicializace za běhu pomocí zpožděného odkazování. Zvažte možnost přidat do příkazů do za poslední vazbou let v sekvenci konstruktoru odkazy na sebe sama. + + + + The containing type can use 'null' as a representation value for its nullary union case. Invoking an abstract or virtual member or an interface implementation on a null value will lead to an exception. If necessary add a dummy data value to the nullary constructor to avoid 'null' being used as a representation for this type. + Nadřazený typ může použít null jako hodnotu reprezentace pro svůj prázdný případ typu union. Vyvolání abstraktního nebo virtuálního člena nebo implementace rozhraní u hodnoty null způsobí výjimku. Pokud je to nutné, přidejte do prázdného konstruktoru fiktivní datovou hodnotu, abyste předešli tomu, že se null použije jako reprezentace tohoto typu. + + + + The containing type can use 'null' as a representation value for its nullary union case. This member will be compiled as a static member. + Nadřazený typ může použít null jako hodnotu reprezentace pro svůj prázdný případ typu union. Tento člen se kompiluje jako statický. + + + + The member '{0}' doesn't correspond to a unique abstract slot based on name and argument count alone + Člen {0} neodpovídá unikátní abstraktní datové oblasti založené jenom na názvu a počtu argumentů. + + + + . Multiple implemented interfaces have a member with this name and argument count + . Víc implementovaných rozhraní má člena s tímto názvem a počtem argumentů. + + + + . Consider implementing interfaces '{0}' and '{1}' explicitly. + . Zvažte explicitní implementaci rozhraní {0} a {1}. + + + + . Additional type annotations may be required to indicate the relevant override. This warning can be disabled using '#nowarn "70"' or '--nowarn:70'. + . Můžou se vyžadovat další poznámky typu k určení příslušného přepsání. Toto upozornění se dá pomocí #nowarn "70" nebo --nowarn:70 vypnout. + + + + parse error + Chyba analýzy + + + + parse error: unexpected end of file + Chyba analýzy: neočekávaný konec souboru + + + + {0} + {0} + + + + internal error: {0} + Vnitřní chyba: {0} + + + + {0} + {0} + + + + Incomplete pattern matches on this expression. + Neúplné porovnávání vzorů u tohoto výrazu + + + + For example, the value '{0}' may indicate a case not covered by the pattern(s). + Třeba hodnota {0} může označovat případ, na který se vzor nevztahuje. + + + + For example, the value '{0}' may indicate a case not covered by the pattern(s). However, a pattern rule with a 'when' clause might successfully match this value. + Třeba hodnota {0} může označovat případ, na který se vzor nevztahuje. Pravidlo vzoru s klauzulí with se ale s touto hodnotou úspěšně shodovat může. + + + + Unmatched elements will be ignored. + Nespárované prvky se budou ignorovat. + + + + Enums may take values outside known cases. + Výčty můžou získávat hodnoty mimo známé případy. + + + + This rule will never be matched + Pro toto pravidlo nebude nikdy existovat shoda. + + + + This value is not mutable. Consider using the mutable keyword, e.g. 'let mutable {0} = expression'. + Tato hodnota není proměnlivá. Zvažte použití proměnlivého klíčového slova, třeba let mutable {0} = expression. + + + + This value is not local + Tato hodnota není lokální. + + + + This construct is deprecated + Tento konstruktor je zastaralý. + + + + . {0} + . {0} + + + + {0}. This warning can be disabled using '--nowarn:57' or '#nowarn "57"'. + {0}. Toto upozornění se dá pomocí --nowarn:57 nebo #nowarn "57" vypnout. + + + + Uses of this construct may result in the generation of unverifiable .NET IL code. This warning can be disabled using '--nowarn:9' or '#nowarn "9"'. + Použití tohoto konstruktoru může způsobit vygenerování neověřitelného kódu .NET IL. Toto upozornění se dá pomocí --nowarn:9 nebo #nowarn "9" vypnout. + + + + This construct is deprecated: {0} + Tento konstruktor je zastaralý: {0} + + + + This construct is deprecated: it is only for use in the F# library + Tento konstruktor je zastaralý: používá se jenom v knihovně F#. + + + + The following fields require values: {0} + Následující pole vyžadují hodnoty: {0} + + + + Value restriction. The value '{0}' has generic type\n {1} \nEither make the arguments to '{2}' explicit or, if you do not intend for it to be generic, add a type annotation. + Omezení hodnoty. Hodnota {0} je obecného typu\n {1}. \nBuď změňte argumenty pro {2} na explicitní, nebo (pokud hodnota nemá být obecná) přidejte poznámku typu. + + + + Value restriction. The value '{0}' has generic type\n {1} \nEither make '{2}' into a function with explicit arguments or, if you do not intend for it to be generic, add a type annotation. + Omezení hodnoty. Hodnota {0} je obecného typu\n {1}. \nZměňte {2} na funkci s explicitními argumenty nebo (pokud hodnota nemá být obecná) přidejte poznámku typu. + + + + Value restriction. This member has been inferred to have generic type\n {0} \nConstructors and property getters/setters cannot be more generic than the enclosing type. Add a type annotation to indicate the exact types involved. + Omezení hodnoty. Tento člen se odvodil jako člen obecného typu\n {0}. \nKonstruktory a metody getter nebo setter vlastnosti nemůžou být obecnější než nadřazený typ. Přidejte poznámku typu, abyste přesně určili, které typy se mají zahrnout. + + + + Value restriction. The value '{0}' has been inferred to have generic type\n {1} \nEither make the arguments to '{2}' explicit or, if you do not intend for it to be generic, add a type annotation. + Omezení hodnoty. Hodnota {0} se odvodila jako hodnota obecného typu\n {1}. \nBuď změňte argumenty pro {2} na explicitní, nebo (pokud hodnota nemá být obecná) přidejte poznámku typu. + + + + Value restriction. The value '{0}' has been inferred to have generic type\n {1} \nEither define '{2}' as a simple data term, make it a function with explicit arguments or, if you do not intend for it to be generic, add a type annotation. + Omezení hodnoty. Hodnota {0} se odvodila jako hodnota obecného typu\n {1}. \nDefinujte {2} jako jednoduchý datový výraz, změňte ji na funkci s explicitními argumenty nebo (pokud hodnota nemá být obecná) přidejte poznámku typu. + + + + syntax error + chyba syntaxe + + + + {0} + {0} + + + + {0} + {0} + + + + Override implementations in augmentations are now deprecated. Override implementations should be given as part of the initial declaration of a type. + Implementace přepsání v rozšířeních jsou už zastaralé. Implementace přepsání by se měly provádět při počáteční deklaraci typu. + + + + Override implementations should be given as part of the initial declaration of a type. + Implementace přepsání by se měly provádět při počáteční deklaraci typu. + + + + Interface implementations in augmentations are now deprecated. Interface implementations should be given on the initial declaration of a type. + Implementace rozhraní v rozšířeních jsou už zastaralé. Implementace rozhraní by se měly provádět při počáteční deklaraci typu. + + + + Interface implementations should be given on the initial declaration of a type. + Implementace rozhraní by se měly provádět při počáteční deklaraci typu. + + + + A required assembly reference is missing. You must add a reference to assembly '{0}'. + Chybí požadovaný odkaz na sestavení. Musíte k sestavení {0} přidat odkaz. + + + + The type referenced through '{0}' is defined in an assembly that is not referenced. You must add a reference to assembly '{1}'. + Typ odkazovaný pomocí {0} je definovaný v sestavení, na které se neodkazuje. Musíte přidat odkaz na sestavení {1}. + + + + #I directives may only occur in F# script files (extensions .fsx or .fsscript). Either move this code to a script file, add a '-I' compiler option for this reference or delimit the directive with delimit it with '#if INTERACTIVE'/'#endif'. + Direktivy #I se můžou vyskytovat jenom v souborech skriptu F# (s příponou .fsx nebo .fsscript). Přesuňte tento kód do souboru skriptu nebo přidejte pro tento odkaz možnost kompilátoru -I anebo direktivu ohraničte pomocí notace #if INTERACTIVE/#endif. + + + + #r directives may only occur in F# script files (extensions .fsx or .fsscript). Either move this code to a script file or replace this reference with the '-r' compiler option. If this directive is being executed as user input, you may delimit it with '#if INTERACTIVE'/'#endif'. + Direktivy #r se můžou vyskytovat jenom v souborech skriptu F# (s příponou .fsx nebo .fsscript). Buď přesuňte tento kód do souboru skriptu, nebo nahraďte tento odkaz možností kompilátoru -r. Pokud se tato direktiva provádí jako uživatelský vstup, můžete ji ohraničit pomocí notace #if INTERACTIVE'/'#endif. + + + + This directive may only be used in F# script files (extensions .fsx or .fsscript). Either remove the directive, move this code to a script file or delimit the directive with '#if INTERACTIVE'/'#endif'. + Tato direktiva se dá použít jenom v souborech skriptu F# (s příponou .fsx nebo .fsscript). Buď direktivu odeberte, nebo tento kód přesuňte do souboru skriptu, anebo direktivu ohraničte pomocí notace #if INTERACTIVE/#endif. + + + + Unable to find the file '{0}' in any of\n {1} + Soubor {0} se nepovedlo najít v žádné(m)\n {1}. + + + + Assembly reference '{0}' was not found or is invalid + Odkaz na sestavení {0} se nenašel nebo je neplatný. + + + + One or more warnings in loaded file.\n + V načteném souboru je nejmíň jedno upozornění.\n + + + + One or more errors in loaded file.\n + V načteném souboru je nejmíň jedna chyba.\n + + + + Loaded files may only be F# source files (extension .fs). This F# script file (.fsx or .fsscript) will be treated as an F# source file + Načtené soubory můžou být jenom zdrojové soubory F# (s příponou .fs). Tento soubor skriptu F# (s příponou .fsx nebo .fsscript) se zpracuje jako zdrojový soubor F#. + + + + Invalid assembly name '{0}' from InternalsVisibleTo attribute in {1} + Neplatný název sestavení {0} z atributu InternalsVisibleTo v {1} + + + + Invalid assembly name '{0}' from InternalsVisibleTo attribute (assembly filename not available) + Neplatný název sestavení {0} z atributu InternalsVisibleTo (název souboru sestavení není dostupný) + + + + Could not load file '{0}' because it does not exist or is inaccessible + Soubor {0} se nedal načíst, protože neexistuje nebo není dostupný. + + + + {0} (Code={1}) + {0} (Kód={1}) + + + + internal error: {0} + Vnitřní chyba: {0} + + + + + \ No newline at end of file diff --git a/src/fsharp/xlf/FSStrings.de.xlf b/src/fsharp/xlf/FSStrings.de.xlf new file mode 100644 index 00000000000..11c588c25a1 --- /dev/null +++ b/src/fsharp/xlf/FSStrings.de.xlf @@ -0,0 +1,1622 @@ + + + + + + . See also {0}. + . Siehe auch "{0}". + + + + The tuples have differing lengths of {0} and {1} + Die Tupel haben eine unterschiedliche Länge von {0} und {1}. + + + + The types '{0}' and '{1}' cannot be unified. + Die Typen "{0}" und "{1}" können nicht vereinheitlicht werden. + + + + A type parameter is missing a constraint '{0}' + Einem Typparameter fehlt die Einschränkung "{0}". + + + + The unit of measure '{0}' does not match the unit of measure '{1}' + Die Maßeinheit "{0}" stimmt nicht mit der Maßeinheit "{1}" überein. + + + + The type '{0}' does not match the type '{1}' + Der Typ "{0}" stimmt nicht mit dem Typ "{1}" überein. + + + + The type '{0}' is not compatible with the type '{1}'{2} + Der Typ "{0}" ist nicht mit dem Typ "{1}"{2} kompatibel. + + + + This expression was expected to have type\n '{1}' \nbut here has type\n '{0}' {2} + Dieser Ausdruck sollte den folgenden Typ aufweisen:\n "{1}" \nEr ist jedoch vom folgenden Typ:\n "{0}" {2} + + + + Type mismatch. Expecting a\n '{0}' \nbut given a\n '{1}' {2}\n + Typenkonflikt. Erwartet:\n "{0}" \nErhalten:\n "{1}" {2}\n + + + + Type constraint mismatch when applying the default type '{0}' for a type inference variable. + Typeinschränkungen stimmen nicht überein, wenn der Standardtyp "{0}" auf eine Typrückschlussvariable angewendet wird. + + + + Consider adding further type constraints + Fügen Sie ggf. weitere Typeinschränkungen hinzu. + + + + Type constraint mismatch. The type \n '{0}' \nis not compatible with type\n '{1}' {2}\n + Die Typeinschränkungen stimmen nicht überein. Der Typ \n "{0}" \nist nicht mit folgendem Typ kompatibel:\n "{1}" {2}\n + + + + Uppercase variable identifiers should not generally be used in patterns, and may indicate a misspelt pattern name. + Variablenbezeichner in Großbuchstaben sollten im Allgemeinen nicht in Mustern verwendet werden und können ein Hinweis auf einen falsch geschriebenen Musternamen sein. + + + + Discriminated union cases and exception labels must be uppercase identifiers + Diskriminierte Union-Fälle und Ausnahmebezeichnungen müssen Bezeichner in Großbuchstaben sein. + + + + Possible overload: '{0}'. {1}. + Mögliche Überladung: '{0}'. {1}. + + + + \n\nPossible best overload: '{0}'. + \n\nMögliche beste Überladung: "{0}". + + + + This function takes too many arguments, or is used in a context where a function is not expected + Diese Funktion akzeptiert zu viele Argumente oder wird in einem Kontext verwendet, in dem keine Funktion erwartet wird. + + + + Member constraints with the name '{0}' are given special status by the F# compiler as certain .NET types are implicitly augmented with this member. This may result in runtime failures if you attempt to invoke the member constraint from your own code. + Membereinschränkungen mit dem Namen "{0}" erhalten vom F#-Compiler einen Sonderstatus, da bestimmte .NET-Typen mit diesem Member implizit augmentiert werden. Dies kann Laufzeitfehler zur Folge haben, falls Sie versuchen, die Membereinschränkung in Ihrem eigenen Code aufzurufen. + + + + A definition to be compiled as a .NET event does not have the expected form. Only property members can be compiled as .NET events. + Eine Definition, die als .NET-Ereignis kompiliert werden soll, weist nicht die erwartete Form auf. Nur Eigenschaftenmember können als .NET-Ereignisse kompiliert werden. + + + + Implicit object constructors for structs must take at least one argument + Implizite Objektkonstruktoren für Strukturen müssen mindestens ein Argument akzeptieren. + + + + The type implements the interface '{0}' but this is not revealed by the signature. You should list the interface in the signature, as the interface will be discoverable via dynamic type casts and/or reflection. + Der Typ implementiert die {0}-Schnittstelle, das wird jedoch von der Signatur nicht offengelegt. Sie sollten die Schnittstelle in der Signatur auflisten, da die Schnittstelle durch dynamische Typumwandlungen und/oder Reflektion erkannt werden kann. + + + + The type '{0}' expects {1} type argument(s) but is given {2} + Der Typ "{0}" erwartet {1} Typargument(e), erhält aber {2}. + + + + Lookup on object of indeterminate type based on information prior to this program point. A type annotation may be needed prior to this program point to constrain the type of the object. This may allow the lookup to be resolved. + Lookup für ein Objekt unbestimmten Typs, der auf Informationen vor diesem Programmpunkt basiert. Möglicherweise ist vor diesem Programmpunkt eine Typanmerkung erforderlich, um den Objekttyp einzuschränken. Dadurch kann das Lookup möglicherweise aufgelöst werden. + + + + Duplicate definition of {0} '{1}' + Doppelte Definition von {0} "{1}" + + + + The {0} '{1}' can not be defined because the name '{2}' clashes with the {3} '{4}' in this type or module + {0} "{1}" kann nicht definiert werden, weil der Name "{2}" einen Konflikt mit {3} "{4}" in diesem Typ oder Modul verursacht. + + + + Two members called '{0}' have the same signature + Zwei Member namens "{0}" weisen dieselbe Signatur auf. + + + + Duplicate definition of {0} '{1}' + Doppelte Definition von {0} "{1}" + + + + A construct with this name was found in FSharp.PowerPack.dll, which contains some modules and types that were implicitly referenced in some previous versions of F#. You may need to add an explicit reference to this DLL in order to compile this code. + Ein Konstrukt mit diesem Namen wurde in "FSharp.PowerPack.dll" gefunden; diese DLL enthält einige Module und Typen, auf die in früheren Versionen von F# implizit verwiesen wurde. Möglicherweise müssen Sie einen expliziten Verweis auf diese DLL hinzufügen, um den Code kompilieren zu können. + + + + This field is not mutable + Dieses Feld ist nicht änderbar. + + + + The fields '{0}' and '{1}' are from different types + Die Felder "{0}" und "{1}" stammen aus unterschiedlichen Typen. + + + + '{0}' is bound twice in this pattern + {0} ist in diesem Muster doppelt gebunden. + + + + A use of the function '{0}' does not match a type inferred elsewhere. The inferred type of the function is\n {1}. \nThe type of the function required at this point of use is\n {2} {3}\nThis error may be due to limitations associated with generic recursion within a 'let rec' collection or within a group of classes. Consider giving a full type signature for the targets of recursive calls including type annotations for both argument and return types. + Ein Vorkommen der Funktion "{0}" stimmt nicht mit einem an anderer Stelle per Rückschluss abgeleiteten Typ überein. Der abgeleitete Typ der Funktion ist:\n {1}. \nAn diesem Verwendungsort ist folgender Funktionstyp erforderlich:\n {2} {3}\nDieser Fehler kann auf Einschränkungen im Zusammenhang mit der generischen Rekursion innerhalb einer "let rec"-Sammlung oder innerhalb einer Gruppe von Klassen zurückzuführen sein. Definieren Sie ggf. eine vollständige Typsignatur für die Ziele von rekursiven Aufrufen, einschließlich Typanmerkungen für Argument- und Rückgabetyp. + + + + Invalid runtime coercion or type test from type {0} to {1}\n{2} + Ungültige Laufzeitkoersion oder ungültiger Typtest von Typ "{0}" in "{1}"\n{2} + + + + This runtime coercion or type test from type\n {0} \n to \n {1} \ninvolves an indeterminate type based on information prior to this program point. Runtime type tests are not allowed on some types. Further type annotations are needed. + Diese Laufzeitkoersion oder dieser Typtest vom Typ\n {0} \n in \n {1} \numfasst einen unbestimmten Typ, der auf Informationen vor diesem Programmpunkt basiert. Laufzeittyptests sind für einige Typen nicht zulässig. Weitere Typanmerkungen sind erforderlich. + + + + The static coercion from type\n {0} \nto \n {1} \n involves an indeterminate type based on information prior to this program point. Static coercions are not allowed on some types. Further type annotations are needed. + Die statische Koersion vom Typ\n {0} \nin \n {1} \n umfasst einen unbestimmten Typ, der auf Informationen vor diesem Programmpunkt basiert. Statische Koersionen sind für einige Typen nicht zulässig. Weitere Typanmerkungen sind erforderlich. + + + + A coercion from the value type \n {0} \nto the type \n {1} \nwill involve boxing. Consider using 'box' instead + Eine Koersion vom Werttyp \n {0} \nin den Typ \n {1} \nerfordert Boxing. Verwenden Sie stattdessen "box". + + + + This type is 'abstract' since some abstract members have not been given an implementation. If this is intentional then add the '[<AbstractClass>]' attribute to your type. + Dieser Typ ist "abstract", da einige abstrakte Member keine Implementierung erhalten haben. Falls dies beabsichtigt ist, fügen Sie dem Typ das [<AbstractClass>]-Attribut hinzu. + + + + This construct causes code to be less generic than indicated by its type annotations. The type variable implied by the use of a '#', '_' or other type annotation at or near '{0}' has been constrained to be type '{1}'. + Durch dieses Konstrukt wird der Code weniger generisch, als aus den Typanmerkungen hervorgeht. Die durch die Verwendung von "#", "_" oder einer anderen Typanmerkung bei oder in der Nähe von "{0}" implizierte Typvariable wurde auf den Typ "{1}" eingeschränkt. + + + + This construct causes code to be less generic than indicated by the type annotations. The unit-of-measure variable '{0} has been constrained to be measure '{1}'. + Durch dieses Konstrukt wird der Code weniger generisch, als aus den Typanmerkungen hervorgeht. Die Maßeinheitenvariable "{0}" wurde auf die Maßeinheit "{1}" eingeschränkt. + + + + This construct causes code to be less generic than indicated by the type annotations. The type variable '{0} has been constrained to be type '{1}'. + Durch dieses Konstrukt wird der Code weniger generisch, als aus den Typanmerkungen hervorgeht. Die Typvariable "{0}" wurde auf den Typ "{1}" eingeschränkt. + + + + identifier + Bezeichner + + + + integer literal + Integer-Literal + + + + floating point literal + Gleitkommaliteral + + + + decimal literal + Dezimalliteral + + + + character literal + Zeichenliteral + + + + keyword 'base' + Schlüsselwort "base" + + + + symbol '(*)' + Symbol "(*)" + + + + symbol '$' + Symbol "$" + + + + infix operator + infix-Operator + + + + infix operator + infix-Operator + + + + symbol ':>' + Symbol ":>" + + + + symbol '::' + Symbol "::" + + + + symbol '{0} + Symbol "{0}" + + + + infix operator + infix-Operator + + + + infix operator + infix-Operator + + + + infix operator + infix-Operator + + + + prefix operator + Präfixoperator + + + + symbol ':?>' + Symbol ":?>" + + + + infix operator + infix-Operator + + + + infix operator + infix-Operator + + + + symbol '&' + Symbol "&" + + + + symbol '&&' + Symbol "&&" + + + + symbol '||' + Symbol "||" + + + + symbol '<' + Symbol "<" + + + + symbol '>' + Symbol ">" + + + + symbol '?' + Symbol "?" + + + + symbol '??' + Symbol "??" + + + + symbol ':?' + Symbol ":?" + + + + integer.. + integer.. + + + + symbol '..' + Symbol ".." + + + + quote symbol + Anführungszeichensymbol + + + + symbol '*' + Symbol "*" + + + + type application + Typanwendung + + + + symbol ':' + Symbol ":" + + + + symbol ':=' + Symbol ":=" + + + + symbol '<-' + Symbol "<-" + + + + symbol '=' + Symbol "=" + + + + symbol '>|]' + Symbol ">|]" + + + + symbol '-' + Symbol "-" + + + + prefix operator + Präfixoperator + + + + operator name + Operatorname + + + + symbol ',' + Symbol "," + + + + symbol '.' + Symbol "." + + + + symbol '|' + Symbol "|" + + + + symbol # + Symbol "#" + + + + symbol '_' + Symbol "_" + + + + symbol ';' + Symbol ";" + + + + symbol ';;' + Symbol ";;" + + + + symbol '(' + Symbol "(" + + + + symbol ')' + Symbol ")" + + + + symbol 'splice' + Symbol "splice" + + + + start of quotation + Zitat Anfang + + + + symbol '[' + Symbol "[" + + + + symbol '[|' + Symbol "[|" + + + + symbol '[<' + Symbol "[<" + + + + symbol '{' + Symbol "{" + + + + symbol '{<' + Symbol "{<" + + + + symbol '|]' + Symbol "|]" + + + + symbol '>}' + Symbol ">}" + + + + symbol '>]' + Symbol ">]" + + + + end of quotation + Zitat Ende + + + + symbol ']' + Symbol "]" + + + + symbol '}' + Symbol "}" + + + + keyword 'public' + Schlüsselwort "public" + + + + keyword 'private' + Schlüsselwort "private" + + + + keyword 'internal' + Schlüsselwort "internal" + + + + keyword 'fixed' + Schlüsselwort "fixed" + + + + keyword 'constraint' + Schlüsselwort "constraint" + + + + keyword 'instance' + Schlüsselwort "instance" + + + + keyword 'delegate' + Schlüsselwort "delegate" + + + + keyword 'inherit' + Schlüsselwort "inherit" + + + + keyword 'constructor' + Schlüsselwort "constructor" + + + + keyword 'default' + Schlüsselwort "default" + + + + keyword 'override' + Schlüsselwort "override" + + + + keyword 'abstract' + Schlüsselwort "abstract" + + + + keyword 'class' + Schlüsselwort "class" + + + + keyword 'member' + Schlüsselwort "member" + + + + keyword 'static' + Schlüsselwort "static" + + + + keyword 'namespace' + Schlüsselwort "namespace" + + + + start of structured construct + Anfang des strukturierten Konstrukts + + + + incomplete structured construct at or before this point + Unvollständig strukturiertes Konstrukt vor oder bis zu diesem Punkt + + + + Incomplete structured construct at or before this point + Unvollständig strukturiertes Konstrukt vor oder bis zu diesem Punkt + + + + keyword 'then' + Schlüsselwort "then" + + + + keyword 'else' + Schlüsselwort "else" + + + + keyword 'let' or 'use' + Schlüsselwort "let" oder "use" + + + + binder keyword + Schlüsselwort "binder" + + + + keyword 'do' + Schlüsselwort "do" + + + + keyword 'const' + Schlüsselwort 'const' + + + + keyword 'with' + Schlüsselwort "with" + + + + keyword 'function' + Schlüsselwort "function" + + + + keyword 'fun' + Schlüsselwort "fun" + + + + end of input + Ende der Eingabe + + + + internal dummy token + internes Platzhaltertoken + + + + keyword 'do!' + Schlüsselwort "do!" + + + + yield + yield + + + + yield! + yield! + + + + keyword 'interface' + Schlüsselwort "interface" + + + + keyword 'elif' + Schlüsselwort "elif" + + + + symbol '->' + Symbol "->" + + + + keyword 'sig' + Schlüsselwort "sig" + + + + keyword 'struct' + Schlüsselwort "struct" + + + + keyword 'upcast' + Schlüsselwort "upcast" + + + + keyword 'downcast' + Schlüsselwort "downcast" + + + + keyword 'null' + Schlüsselwort "null" + + + + reserved keyword + reserviertes Schlüsselwort + + + + keyword 'module' + Schlüsselwort "module" + + + + keyword 'and' + Schlüsselwort "and" + + + + keyword 'as' + Schlüsselwort "as" + + + + keyword 'assert' + Schlüsselwort "assert" + + + + keyword 'asr' + Schlüsselwort "asr" + + + + keyword 'downto' + Schlüsselwort "downto" + + + + keyword 'exception' + Schlüsselwort "exception" + + + + keyword 'false' + Schlüsselwort "false" + + + + keyword 'for' + Schlüsselwort "for" + + + + keyword 'fun' + Schlüsselwort "fun" + + + + keyword 'function' + Schlüsselwort "function" + + + + keyword 'finally' + Schlüsselwort "finally" + + + + keyword 'lazy' + Schlüsselwort "lazy" + + + + keyword 'match' + Schlüsselwort "match" + + + + keyword 'match!' + Schlüsselwort "match!" + + + + keyword 'mutable' + Schlüsselwort "mutable" + + + + keyword 'new' + Schlüsselwort "new" + + + + keyword 'of' + Schlüsselwort "of" + + + + keyword 'open' + Schlüsselwort "open" + + + + keyword 'or' + Schlüsselwort "or" + + + + keyword 'void' + Schlüsselwort "void" + + + + keyword 'extern' + Schlüsselwort "extern" + + + + keyword 'interface' + Schlüsselwort "interface" + + + + keyword 'rec' + Schlüsselwort "rec" + + + + keyword 'to' + Schlüsselwort "to" + + + + keyword 'true' + Schlüsselwort "true" + + + + keyword 'try' + Schlüsselwort "try" + + + + keyword 'type' + Schlüsselwort "type" + + + + keyword 'val' + Schlüsselwort "val" + + + + keyword 'inline' + Schlüsselwort "inline" + + + + keyword 'when' + Schlüsselwort "when" + + + + keyword 'while' + Schlüsselwort "while" + + + + keyword 'with' + Schlüsselwort "with" + + + + keyword 'if' + Schlüsselwort "if" + + + + keyword 'do' + Schlüsselwort "do" + + + + keyword 'global' + Schlüsselwort "global" + + + + keyword 'done' + Schlüsselwort "done" + + + + keyword 'in' + Schlüsselwort "in" + + + + symbol '(' + Symbol "(" + + + + symbol'[' + Symbol "[" + + + + keyword 'begin' + Schlüsselwort "begin" + + + + keyword 'end' + Schlüsselwort "end" + + + + directive + Direktive + + + + inactive code + inaktiver Code + + + + lex failure + Lexfehler + + + + whitespace + Leerzeichen + + + + comment + Kommentar + + + + line comment + Zeilenkommentar + + + + string text + Zeichenfolgentext + + + + compiler generated literal + vom Compiler generiertes Literal + + + + byte array literal + Bytearrayliteral + + + + string literal + Zeichenfolgenliteral + + + + end of input + Ende der Eingabe + + + + Unexpected end of input + Unerwartetes Ende der Eingabe + + + + Unexpected {0} + Unerwartete(s/r) {0}. + + + + in interaction + in Interaktion + + + + in directive + in Direktive + + + + in field declaration + in Felddeklaration + + + + in discriminated union case declaration + in diskriminierter Union-Falldeklaration + + + + in binding + in Bindung + + + + in binding + in Bindung + + + + in member definition + in Memberdefinition + + + + in definitions + in Definitionen + + + + in member signature + in Membersignatur + + + + in value signature + in Wertsignatur + + + + in type signature + in Typsignatur + + + + in lambda expression + in lambda-Ausdruck + + + + in union case + in Union-Fall + + + + in extern declaration + in externer Deklaration + + + + in object expression + in Objektausdruck + + + + in if/then/else expression + in if/then/else-Ausdruck + + + + in open declaration + in open-Deklaration + + + + in module or namespace signature + in Modul- oder Namespacesignatur + + + + in pattern matching + in Mustervergleich + + + + in begin/end expression + in begin/end-Ausdruck + + + + in record expression + in Datensatzausdruck + + + + in type definition + in Typdefinition + + + + in exception definition + in Ausnahmedefinition + + + + in type name + in Typname + + + + in attribute list + in Attributliste + + + + in quotation literal + in Quotation-Literal + + + + in type constraint + in Typeinschränkung + + + + in implementation file + in Implementierungsdatei + + + + in definition + in Definition + + + + in signature file + in Signaturdatei + + + + in pattern + in Muster + + + + in expression + in Ausdruck + + + + in type + in Typ + + + + in type arguments + in Typargumenten + + + + keyword + Schlüsselwort + + + + symbol + Symbol + + + + (due to indentation-aware syntax) + (aufgrund der einzugsabhängigen Syntax) + + + + . Expected {0} or other token. + . "{0}" oder ein anderes Token wurde erwartet. + + + + . Expected {0}, {1} or other token. + . "{0}", "{1}" oder ein anderes Token wurde erwartet. + + + + . Expected {0}, {1}, {2} or other token. + . "{0}", "{1}", "{2}" oder ein anderes Token wurde erwartet. + + + + The type '{0}' cannot be used as the source of a type test or runtime coercion + Der Typ "{0}" kann nicht als Quelle eines Typtests oder einer Laufzeitkoersion verwendet werden. + + + + The type '{0}' does not have any proper subtypes and cannot be used as the source of a type test or runtime coercion. + Der Typ "{0}" besitzt keine geeigneten Untertypen und kann nicht als Quelle eines Typtests oder einer Laufzeitkoersion verwendet werden. + + + + The type '{0}' does not have any proper subtypes and need not be used as the target of a static coercion + Der Typ "{0}" besitzt keine geeigneten Untertypen und darf nicht als Ziel einer statischen Koersion verwendet werden. + + + + This upcast is unnecessary - the types are identical + Diese Typumwandlung nach oben (Upcast) ist nicht notwendig, da die Typen identisch sind. + + + + This type test or downcast will always hold + Dieser Typtest oder diese Typumwandlung nach unten (Downcast) ist immer erfolgreich. + + + + The member '{0}' does not have the correct type to override any given virtual method + Der Member "{0}" weist nicht den richtigen Typ auf, um eine beliebige virtuelle Methode zu überschreiben. + + + + The member '{0}' does not have the correct type to override the corresponding abstract method. + Der Member "{0}" weist nicht den richtigen Typ auf, um die entsprechende abstrakte Methode zu überschreiben. + + + + The required signature is '{0}'. + Die erforderliche Signatur lautet "{0}". + + + + The member '{0}' is specialized with 'unit' but 'unit' can't be used as return type of an abstract method parameterized on return type. + Der Member "{0}" ist mit "unit" spezialisiert, "unit" kann aber nicht als Rückgabetyp einer abstrakten Methode verwendet werden, die für den Rückgabetyp parametrisiert wird. + + + + This constructor is applied to {0} argument(s) but expects {1} + Dieser Konstruktor wird auf {0} Argument(e) angewendet, erwartet aber {1}. + + + + The two sides of this 'or' pattern bind different sets of variables + Die beiden Seiten dieses or-Musters binden unterschiedliche Variablensätze. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \n{3}. + Das Modul "{0}" enthält\n {1} \nDie Signatur gibt aber Folgendes an:\n {2} \n{3}. + + + + Module '{0}' requires a {1} '{2}' + Das Modul "{0}" erfordert eine(n) {1} "{2}". + + + + The use of native pointers may result in unverifiable .NET IL code + Durch die Verwendung von nativen Zeigern kann nicht verifizierbarer .NET-IL-Code entstehen. + + + + {0} + {0} + + + + Thread static and context static 'let' bindings are deprecated. Instead use a declaration of the form 'static val mutable <ident> : <type>' in a class. Add the 'DefaultValue' attribute to this declaration to indicate that the value is initialized to the default value on each new thread. + Threadstatische und kontextstatische let-Bindungen sind veraltet. Verwenden Sie stattdessen eine Deklaration im Format "static val mutable <ident> : <Typ>" in einer Klasse. Fügen Sie dieser Deklaration das DefaultValue-Attribut hinzu, um anzugeben, dass der Wert bei jedem neuen Thread mit dem Standardwert initialisiert wird. + + + + This expression is a function value, i.e. is missing arguments. Its type is {0}. + Dieser Ausdruck ist ein Funktionswert, d.h., es fehlen Argumente. Typ: {0}. + + + + The result of this expression has type '{0}' and is implicitly ignored. Consider using 'ignore' to discard this value explicitly, e.g. 'expr |> ignore', or 'let' to bind the result to a name, e.g. 'let result = expr'. + Das Ergebnis dieses Ausdrucks weist den Typ "{0}" auf und wird implizit ignoriert. Verwenden Sie ggf. "ignore", um diesen Wert explizit zu verwerfen, z. B. "expr |> ignore" oder "let" zum Binden des Ergebnisses an einen Namen, z. B. "let result = expr". + + + + The result of this equality expression has type '{0}' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. + Das Ergebnis dieses Gleichheitsausdrucks weist den Typ "{0}" auf und wird implizit verworfen. Verwenden Sie ggf. "let", um das Ergebnis an einen Namen zu binden. Beispiel: "let Ergebnis = Ausdruck". + + + + The result of this equality expression has type '{0}' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to set a value to a property, then use the '<-' operator e.g. '{1}.{2} <- expression'. + Das Ergebnis dieses Gleichheitsausdrucks weist den Typ "{0}" auf und wird implizit verworfen. Verwenden Sie ggf. "let", um das Ergebnis an einen Namen zu binden. Beispiel: "let Ergebnis = Ausdruck". Falls Sie einen Wert auf eine Eigenschaft festlegen möchten, verwenden Sie den Operator "<-". Beispiel: "{1}.{2} <-Ausdruck". + + + + The result of this equality expression has type '{0}' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to mutate a value, then mark the value 'mutable' and use the '<-' operator e.g. '{1} <- expression'. + Das Ergebnis dieses Gleichheitsausdrucks weist den Typ "{0}" auf und wird implizit verworfen. Verwenden Sie ggf. "let", um das Ergebnis an einen Namen zu binden. Beispiel: "let Ergebnis = Ausdruck". Falls Sie einen Wert mutieren möchten, markieren Sie ihn als "mutable", und verwenden Sie den Operator "<-". Beispiel: "{1} <- Ausdruck". + + + + The result of this equality expression has type '{0}' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to mutate a value, then use the '<-' operator e.g. '{1} <- expression'. + Das Ergebnis dieses Gleichheitsausdrucks weist den Typ "{0}" auf und wird implizit verworfen. Verwenden Sie ggf. "let", um das Ergebnis an einen Namen zu binden. Beispiel: "let Ergebnis = Ausdruck". Falls Sie einen Wert mutieren möchten, verwenden Sie den Operator "<-". Beispiel: "{1} <- Ausdruck". + + + + This recursive use will be checked for initialization-soundness at runtime. This warning is usually harmless, and may be suppressed by using '#nowarn "21"' or '--nowarn:21'. + Diese rekursive Verwendung wird zur Laufzeit auf ihre ordnungsgemäße Initialisierung geprüft. Diese Warnung ist in der Regel harmlos und kann mithilfe von "#nowarn "21"" oder "--nowarn 21" unterdrückt werden. + + + + The value '{0}' will be evaluated as part of its own definition + Der Wert "{0}" wird als Teil seiner eigenen Definition ausgewertet. + + + + This value will be eventually evaluated as part of its own definition. You may need to make the value lazy or a function. Value '{0}'{1}. + Dieser Wert wird schließlich als Teil seiner eigenen Definition ausgewertet. Möglicherweise müssen Sie den Wert verzögern oder als Funktion festlegen. Wert "{0}"{1}. + + + + will evaluate '{0}' + wird zu "{0}" ausgewertet + + + + Bindings may be executed out-of-order because of this forward reference. + Bindungen werden aufgrund dieses Vorwärtsverweises möglicherweise in der falschen Reihenfolge ausgeführt. + + + + This and other recursive references to the object(s) being defined will be checked for initialization-soundness at runtime through the use of a delayed reference. This is because you are defining one or more recursive objects, rather than recursive functions. This warning may be suppressed by using '#nowarn "40"' or '--nowarn:40'. + Dieser und andere rekursive Verweise auf das bzw. die definierte(n) Objekt(e) werden zur Laufzeit mithilfe eines verzögerten Verweises auf ihre ordnungsgemäße Initialisierung geprüft. Der Grund hierfür ist, dass Sie mindestens ein rekursives Objekt definieren, keine rekursiven Funktionen. Diese Warnung kann mithilfe von "#nowarn "40"" oder "--nowarn 40" unterdrückt werden. + + + + Recursive references to the object being defined will be checked for initialization soundness at runtime through the use of a delayed reference. Consider placing self-references in members or within a trailing expression of the form '<ctor-expr> then <expr>'. + Rekursive Verweise auf das definierte Objekt werden zur Laufzeit mithilfe eines verzögerten Verweises auf ihre ordnungsgemäße Initialisierung geprüft. Sie sollten in Membern oder innerhalb eines nachgestellten Ausdrucks Eigenverweise im Format "<ctor-expr>" gefolgt von "<Ausdruck>" platzieren. + + + + Recursive references to the object being defined will be checked for initialization soundness at runtime through the use of a delayed reference. Consider placing self-references within 'do' statements after the last 'let' binding in the construction sequence. + Rekursive Verweise auf das definierte Objekt werden zur Laufzeit mithilfe eines verzögerten Verweises auf ihre ordnungsgemäße Iniitalisierung geprüft. Sie sollten in do-Anweisungen hinter der letzten let-Bindung in der Konstruktionssequenz Eigenverweise platzieren. + + + + The containing type can use 'null' as a representation value for its nullary union case. Invoking an abstract or virtual member or an interface implementation on a null value will lead to an exception. If necessary add a dummy data value to the nullary constructor to avoid 'null' being used as a representation for this type. + Der enthaltende Typ kann NULL als Darstellungswert für seinen nullären Union-Fall verwenden. Das Aufrufen eines abstrakten oder virtuellen Members oder einer Schnittstellenimplementierung für einen NULL-Wert verursacht eine Ausnahme. Fügen Sie dem nullären Konstruktor bei Bedarf einen Platzhalterdatenwert hinzu, damit NULL nicht als Darstellung für diesen Typ verwendet wird. + + + + The containing type can use 'null' as a representation value for its nullary union case. This member will be compiled as a static member. + Der enthaltende Typ kann NULL als Darstellungswert für seinen nullären Union-Fall verwenden. Dieser Member wird als statischer Member kompiliert. + + + + The member '{0}' doesn't correspond to a unique abstract slot based on name and argument count alone + Der Member "{0}" kann anhand des Namens und der Anzahl der Argumente keinem eindeutigen abstrakten Umsetzungsplatz zugeordnet werden. + + + + . Multiple implemented interfaces have a member with this name and argument count + . Mehrere implementierte Schnittstellen besitzen einen Member mit diesem Namen und dieser Anzahl von Argumenten. + + + + . Consider implementing interfaces '{0}' and '{1}' explicitly. + . Implementieren Sie die {0}-Schnittstelle und die {1}-Schnittstelle explizit. + + + + . Additional type annotations may be required to indicate the relevant override. This warning can be disabled using '#nowarn "70"' or '--nowarn:70'. + . Möglicherweise sind zusätzliche Typanmerkungen erforderlich, um die relevante Überschreibung anzugeben. Diese Warnung kann mit "#nowarn "70"" oder "--nowarn 70" deaktiviert werden. + + + + parse error + Analysefehler + + + + parse error: unexpected end of file + Analysefehler: Unerwartetes Ende der Datei. + + + + {0} + {0} + + + + internal error: {0} + Interner Fehler: {0} + + + + {0} + {0} + + + + Incomplete pattern matches on this expression. + Unvollständige Musterübereinstimmungen für diesen Ausdruck. + + + + For example, the value '{0}' may indicate a case not covered by the pattern(s). + Beispielsweise kann der Wert "{0}" einen Fall kennzeichnen, der nicht von dem bzw. den Muster(n) abgedeckt wird. + + + + For example, the value '{0}' may indicate a case not covered by the pattern(s). However, a pattern rule with a 'when' clause might successfully match this value. + Beispielsweise kann der Wert "{0}" einen Fall kennzeichnen, der nicht von dem bzw. den Muster(n) abgedeckt wird. Mit einer Musterregel mit einer when-Klausel kann dieser Wert allerdings unter Umständen erfolgreich abgeglichen werden. + + + + Unmatched elements will be ignored. + Nicht zugeordnete Elemente werden ignoriert. + + + + Enums may take values outside known cases. + Enumerationen können Werte außerhalb bekannter Fälle verwenden. + + + + This rule will never be matched + Für diese Regel wird niemals eine Übereinstimmung gefunden. + + + + This value is not mutable. Consider using the mutable keyword, e.g. 'let mutable {0} = expression'. + Dieser Wert ist nicht änderbar. Verwenden Sie ggf. ein änderbares Schlüsselwort, z. B. "let mutable {0} = Ausdruck". + + + + This value is not local + Dieser Wert ist nicht lokal. + + + + This construct is deprecated + Dieses Konstrukt ist veraltet. + + + + . {0} + . {0} + + + + {0}. This warning can be disabled using '--nowarn:57' or '#nowarn "57"'. + {0}. Diese Warnung kann mit "--nowarn 57" oder "#nowarn "57"" deaktiviert werden. + + + + Uses of this construct may result in the generation of unverifiable .NET IL code. This warning can be disabled using '--nowarn:9' or '#nowarn "9"'. + Die Verwendung dieses Konstrukts kann die Erzeugung von nicht verifizierbarem .NET-IL-Code zur Folge haben. Diese Warnung kann mit "--nowarn 9" oder "#nowarn "9"" deaktiviert werden. + + + + This construct is deprecated: {0} + Dieses Konstrukt ist veraltet: {0} + + + + This construct is deprecated: it is only for use in the F# library + Dieses Konstrukt ist veraltet: Es wird nur in der F#-Bibliothek verwendet. + + + + The following fields require values: {0} + Für die folgenden Felder sind Werte erforderlich: {0} + + + + Value restriction. The value '{0}' has generic type\n {1} \nEither make the arguments to '{2}' explicit or, if you do not intend for it to be generic, add a type annotation. + Werteinschränkung. Der Wert "{0}" hat den generischen Typ\n {1} \nLegen Sie die Argumente für "{2}" entweder als explizit fest, oder fügen Sie eine Typanmerkung hinzu, wenn der Typ nicht generisch sein soll. + + + + Value restriction. The value '{0}' has generic type\n {1} \nEither make '{2}' into a function with explicit arguments or, if you do not intend for it to be generic, add a type annotation. + Werteinschränkung. Der Wert "{0}" hat den generischen Typ\n {1} \nDefinieren Sie "{2}" entweder als Funktion mit expliziten Argumenten, oder fügen Sie eine Typanmerkung hinzu, wenn der Typ nicht generisch sein soll. + + + + Value restriction. This member has been inferred to have generic type\n {0} \nConstructors and property getters/setters cannot be more generic than the enclosing type. Add a type annotation to indicate the exact types involved. + Werteinschränkung. Dieser Member wurde per Rückschluss abgeleitet als generischer Typ\n {0} \nKonstruktoren und Eigenschaftengetter/-setter dürfen nicht generischer sein als der einschließende Typ. Fügen Sie eine Typanmerkung hinzu, um die genauen Typen anzugeben. + + + + Value restriction. The value '{0}' has been inferred to have generic type\n {1} \nEither make the arguments to '{2}' explicit or, if you do not intend for it to be generic, add a type annotation. + Werteinschränkung. Der Wert "{0}" wurde per Rückschluss abgeleitet als generischer Typ\n {1} \nLegen Sie die Argumente für "{2}" entweder als explizit fest, oder fügen Sie eine Typanmerkung hinzu, wenn der Typ nicht generisch sein soll. + + + + Value restriction. The value '{0}' has been inferred to have generic type\n {1} \nEither define '{2}' as a simple data term, make it a function with explicit arguments or, if you do not intend for it to be generic, add a type annotation. + Werteinschränkung. Der Wert "{0}" wurde per Rückschluss abgeleitet als generischer Typ\n {1} \nDefinieren Sie "{2}" entweder als einfachen Ausdruck oder als Funktion mit expliziten Argumenten, oder fügen Sie eine Typanmerkung hinzu, wenn der Typ nicht generisch sein soll. + + + + syntax error + Syntaxfehler + + + + {0} + {0} + + + + {0} + {0} + + + + Override implementations in augmentations are now deprecated. Override implementations should be given as part of the initial declaration of a type. + Überschreibungsimplementierungen in Augmentationen sind jetzt veraltet. Überschreibungsimplementierungen sollten als Teil der ersten Deklaration eines Typs angegeben werden. + + + + Override implementations should be given as part of the initial declaration of a type. + Überschreibungsimplementierungen sollten als Teil der ersten Deklaration eines Typs angegeben werden. + + + + Interface implementations in augmentations are now deprecated. Interface implementations should be given on the initial declaration of a type. + Schnittstellenimplementierungen in Augmentationen sind jetzt veraltet. Schnittstellenimplementierungen sollten in der ersten Deklaration eines Typs angegeben werden. + + + + Interface implementations should be given on the initial declaration of a type. + Schnittstellenimplementierungen sollten in der ersten Deklaration eines Typs angegeben werden. + + + + A required assembly reference is missing. You must add a reference to assembly '{0}'. + Ein erforderlicher Assemblyverweis fehlt. Sie müssen einen Verweis auf Assembly "{0}" hinzufügen. + + + + The type referenced through '{0}' is defined in an assembly that is not referenced. You must add a reference to assembly '{1}'. + Der Typ, auf den über "{0}" verwiesen wird, wird in einer Assembly definiert, auf die nicht verwiesen wird. Sie müssen einen Verweis auf Assembly "{1}" hinzufügen. + + + + #I directives may only occur in F# script files (extensions .fsx or .fsscript). Either move this code to a script file, add a '-I' compiler option for this reference or delimit the directive with delimit it with '#if INTERACTIVE'/'#endif'. + #I-Direktiven dürfen nur in F#-Skriptdateien (Dateierweiterungen .fsx oder .fsscript) verwendet werden. Verschieben Sie entweder diesen Code in eine Skriptdatei, fügen Sie die Compileroption "-I" für diesen Verweis hinzu, oder trennen Sie die Direktive mit "#if INTERACTIVE'/'#endif" ab. + + + + #r directives may only occur in F# script files (extensions .fsx or .fsscript). Either move this code to a script file or replace this reference with the '-r' compiler option. If this directive is being executed as user input, you may delimit it with '#if INTERACTIVE'/'#endif'. + #r-Anweisungen dürfen nur in F#-Skriptdateien (Dateierweiterungen .fsx oder .fsscript) verwendet werden. Verschieben Sie entweder diesen Code in eine Skriptdatei, oder ersetzen Sie diesen Verweis durch die Compileroption "-r". Wenn diese Anweisung als Benutzereingabe ausgeführt wird, trennen Sie sie mit "#if INTERACTIVE'/'#endif" ab. + + + + This directive may only be used in F# script files (extensions .fsx or .fsscript). Either remove the directive, move this code to a script file or delimit the directive with '#if INTERACTIVE'/'#endif'. + Diese Direktive darf nur in F#-Skriptdateien (Dateierweiterungen .fsx oder .fsscript) verwendet werden. Entfernen Sie entweder die Direktive, verschieben Sie diesen Code in eine Skriptdatei, oder trennen Sie die Direktive mit "#if INTERACTIVE'/'#endif" ab. + + + + Unable to find the file '{0}' in any of\n {1} + Die Datei "{0}" kann nicht gefunden werden in:\n {1} + + + + Assembly reference '{0}' was not found or is invalid + Der Assemblyverweis "{0}" wurde nicht gefunden oder ist ungültig. + + + + One or more warnings in loaded file.\n + Mindestens eine Warnung in geladener Datei.\n + + + + One or more errors in loaded file.\n + Mindestens ein Fehler in geladener Datei.\n + + + + Loaded files may only be F# source files (extension .fs). This F# script file (.fsx or .fsscript) will be treated as an F# source file + Geladene Dateien dürfen nur F#-Quellcodedateien (Dateierweiterung .fs) sein. Diese F#-Skriptdatei (.fsx oder .fsscript) wird wie eine F#-Quellcodedatei behandelt. + + + + Invalid assembly name '{0}' from InternalsVisibleTo attribute in {1} + Ungültiger Assemblyname "{0}" aus dem InternalsVisibleTo-Attribut in "{1}". + + + + Invalid assembly name '{0}' from InternalsVisibleTo attribute (assembly filename not available) + Ungültiger Assemblyname "{0}" aus dem InternalsVisibleTo-Attribut (Assemblydateiname nicht verfügbar). + + + + Could not load file '{0}' because it does not exist or is inaccessible + Datei "{0}" konnte nicht geladen werden, weil sie nicht vorhanden oder nicht zugreifbar ist. + + + + {0} (Code={1}) + {0} (Code={1}) + + + + internal error: {0} + Interner Fehler: {0} + + + + + \ No newline at end of file diff --git a/src/fsharp/xlf/FSStrings.en.xlf b/src/fsharp/xlf/FSStrings.en.xlf new file mode 100644 index 00000000000..c7f55180a55 --- /dev/null +++ b/src/fsharp/xlf/FSStrings.en.xlf @@ -0,0 +1,1622 @@ + + + + + + . See also {0}. + . See also {0}. + + + + The tuples have differing lengths of {0} and {1} + The tuples have differing lengths of {0} and {1} + + + + The types '{0}' and '{1}' cannot be unified. + The types '{0}' and '{1}' cannot be unified. + + + + A type parameter is missing a constraint '{0}' + A type parameter is missing a constraint '{0}' + + + + The unit of measure '{0}' does not match the unit of measure '{1}' + The unit of measure '{0}' does not match the unit of measure '{1}' + + + + The type '{0}' does not match the type '{1}' + The type '{0}' does not match the type '{1}' + + + + The type '{0}' is not compatible with the type '{1}'{2} + The type '{0}' is not compatible with the type '{1}'{2} + + + + This expression was expected to have type\n '{1}' \nbut here has type\n '{0}' {2} + This expression was expected to have type\n '{1}' \nbut here has type\n '{0}' {2} + + + + Type mismatch. Expecting a\n '{0}' \nbut given a\n '{1}' {2}\n + Type mismatch. Expecting a\n '{0}' \nbut given a\n '{1}' {2}\n + + + + Type constraint mismatch when applying the default type '{0}' for a type inference variable. + Type constraint mismatch when applying the default type '{0}' for a type inference variable. + + + + Consider adding further type constraints + Consider adding further type constraints + + + + Type constraint mismatch. The type \n '{0}' \nis not compatible with type\n '{1}' {2}\n + Type constraint mismatch. The type \n '{0}' \nis not compatible with type\n '{1}' {2}\n + + + + Uppercase variable identifiers should not generally be used in patterns, and may indicate a misspelt pattern name. + Uppercase variable identifiers should not generally be used in patterns, and may indicate a misspelt pattern name. + + + + Discriminated union cases and exception labels must be uppercase identifiers + Discriminated union cases and exception labels must be uppercase identifiers + + + + Possible overload: '{0}'. {1}. + Possible overload: '{0}'. {1}. + + + + \n\nPossible best overload: '{0}'. + \n\nPossible best overload: '{0}'. + + + + This function takes too many arguments, or is used in a context where a function is not expected + This function takes too many arguments, or is used in a context where a function is not expected + + + + Member constraints with the name '{0}' are given special status by the F# compiler as certain .NET types are implicitly augmented with this member. This may result in runtime failures if you attempt to invoke the member constraint from your own code. + Member constraints with the name '{0}' are given special status by the F# compiler as certain .NET types are implicitly augmented with this member. This may result in runtime failures if you attempt to invoke the member constraint from your own code. + + + + A definition to be compiled as a .NET event does not have the expected form. Only property members can be compiled as .NET events. + A definition to be compiled as a .NET event does not have the expected form. Only property members can be compiled as .NET events. + + + + Implicit object constructors for structs must take at least one argument + Implicit object constructors for structs must take at least one argument + + + + The type implements the interface '{0}' but this is not revealed by the signature. You should list the interface in the signature, as the interface will be discoverable via dynamic type casts and/or reflection. + The type implements the interface '{0}' but this is not revealed by the signature. You should list the interface in the signature, as the interface will be discoverable via dynamic type casts and/or reflection. + + + + The type '{0}' expects {1} type argument(s) but is given {2} + The type '{0}' expects {1} type argument(s) but is given {2} + + + + Lookup on object of indeterminate type based on information prior to this program point. A type annotation may be needed prior to this program point to constrain the type of the object. This may allow the lookup to be resolved. + Lookup on object of indeterminate type based on information prior to this program point. A type annotation may be needed prior to this program point to constrain the type of the object. This may allow the lookup to be resolved. + + + + Duplicate definition of {0} '{1}' + Duplicate definition of {0} '{1}' + + + + The {0} '{1}' can not be defined because the name '{2}' clashes with the {3} '{4}' in this type or module + The {0} '{1}' can not be defined because the name '{2}' clashes with the {3} '{4}' in this type or module + + + + Two members called '{0}' have the same signature + Two members called '{0}' have the same signature + + + + Duplicate definition of {0} '{1}' + Duplicate definition of {0} '{1}' + + + + A construct with this name was found in FSharp.PowerPack.dll, which contains some modules and types that were implicitly referenced in some previous versions of F#. You may need to add an explicit reference to this DLL in order to compile this code. + A construct with this name was found in FSharp.PowerPack.dll, which contains some modules and types that were implicitly referenced in some previous versions of F#. You may need to add an explicit reference to this DLL in order to compile this code. + + + + This field is not mutable + This field is not mutable + + + + The fields '{0}' and '{1}' are from different types + The fields '{0}' and '{1}' are from different types + + + + '{0}' is bound twice in this pattern + '{0}' is bound twice in this pattern + + + + A use of the function '{0}' does not match a type inferred elsewhere. The inferred type of the function is\n {1}. \nThe type of the function required at this point of use is\n {2} {3}\nThis error may be due to limitations associated with generic recursion within a 'let rec' collection or within a group of classes. Consider giving a full type signature for the targets of recursive calls including type annotations for both argument and return types. + A use of the function '{0}' does not match a type inferred elsewhere. The inferred type of the function is\n {1}. \nThe type of the function required at this point of use is\n {2} {3}\nThis error may be due to limitations associated with generic recursion within a 'let rec' collection or within a group of classes. Consider giving a full type signature for the targets of recursive calls including type annotations for both argument and return types. + + + + Invalid runtime coercion or type test from type {0} to {1}\n{2} + Invalid runtime coercion or type test from type {0} to {1}\n{2} + + + + This runtime coercion or type test from type\n {0} \n to \n {1} \ninvolves an indeterminate type based on information prior to this program point. Runtime type tests are not allowed on some types. Further type annotations are needed. + This runtime coercion or type test from type\n {0} \n to \n {1} \ninvolves an indeterminate type based on information prior to this program point. Runtime type tests are not allowed on some types. Further type annotations are needed. + + + + The static coercion from type\n {0} \nto \n {1} \n involves an indeterminate type based on information prior to this program point. Static coercions are not allowed on some types. Further type annotations are needed. + The static coercion from type\n {0} \nto \n {1} \n involves an indeterminate type based on information prior to this program point. Static coercions are not allowed on some types. Further type annotations are needed. + + + + A coercion from the value type \n {0} \nto the type \n {1} \nwill involve boxing. Consider using 'box' instead + A coercion from the value type \n {0} \nto the type \n {1} \nwill involve boxing. Consider using 'box' instead + + + + This type is 'abstract' since some abstract members have not been given an implementation. If this is intentional then add the '[<AbstractClass>]' attribute to your type. + This type is 'abstract' since some abstract members have not been given an implementation. If this is intentional then add the '[<AbstractClass>]' attribute to your type. + + + + This construct causes code to be less generic than indicated by its type annotations. The type variable implied by the use of a '#', '_' or other type annotation at or near '{0}' has been constrained to be type '{1}'. + This construct causes code to be less generic than indicated by its type annotations. The type variable implied by the use of a '#', '_' or other type annotation at or near '{0}' has been constrained to be type '{1}'. + + + + This construct causes code to be less generic than indicated by the type annotations. The unit-of-measure variable '{0} has been constrained to be measure '{1}'. + This construct causes code to be less generic than indicated by the type annotations. The unit-of-measure variable '{0} has been constrained to be measure '{1}'. + + + + This construct causes code to be less generic than indicated by the type annotations. The type variable '{0} has been constrained to be type '{1}'. + This construct causes code to be less generic than indicated by the type annotations. The type variable '{0} has been constrained to be type '{1}'. + + + + identifier + identifier + + + + integer literal + integer literal + + + + floating point literal + floating point literal + + + + decimal literal + decimal literal + + + + character literal + character literal + + + + keyword 'base' + keyword 'base' + + + + symbol '(*)' + symbol '(*)' + + + + symbol '$' + symbol '$' + + + + infix operator + infix operator + + + + infix operator + infix operator + + + + symbol ':>' + symbol ':>' + + + + symbol '::' + symbol '::' + + + + symbol '{0} + symbol '{0} + + + + infix operator + infix operator + + + + infix operator + infix operator + + + + infix operator + infix operator + + + + prefix operator + prefix operator + + + + symbol ':?>' + symbol ':?>' + + + + infix operator + infix operator + + + + infix operator + infix operator + + + + symbol '&' + symbol '&' + + + + symbol '&&' + symbol '&&' + + + + symbol '||' + symbol '||' + + + + symbol '<' + symbol '<' + + + + symbol '>' + symbol '>' + + + + symbol '?' + symbol '?' + + + + symbol '??' + symbol '??' + + + + symbol ':?' + symbol ':?' + + + + integer.. + integer.. + + + + symbol '..' + symbol '..' + + + + quote symbol + quote symbol + + + + symbol '*' + symbol '*' + + + + type application + type application + + + + symbol ':' + symbol ':' + + + + symbol ':=' + symbol ':=' + + + + symbol '<-' + symbol '<-' + + + + symbol '=' + symbol '=' + + + + symbol '>|]' + symbol '>|]' + + + + symbol '-' + symbol '-' + + + + prefix operator + prefix operator + + + + operator name + operator name + + + + symbol ',' + symbol ',' + + + + symbol '.' + symbol '.' + + + + symbol '|' + symbol '|' + + + + symbol # + symbol # + + + + symbol '_' + symbol '_' + + + + symbol ';' + symbol ';' + + + + symbol ';;' + symbol ';;' + + + + symbol '(' + symbol '(' + + + + symbol ')' + symbol ')' + + + + symbol 'splice' + symbol 'splice' + + + + start of quotation + start of quotation + + + + symbol '[' + symbol '[' + + + + symbol '[|' + symbol '[|' + + + + symbol '[<' + symbol '[<' + + + + symbol '{' + symbol '{' + + + + symbol '{<' + symbol '{<' + + + + symbol '|]' + symbol '|]' + + + + symbol '>}' + symbol '>}' + + + + symbol '>]' + symbol '>]' + + + + end of quotation + end of quotation + + + + symbol ']' + symbol ']' + + + + symbol '}' + symbol '}' + + + + keyword 'public' + keyword 'public' + + + + keyword 'private' + keyword 'private' + + + + keyword 'internal' + keyword 'internal' + + + + keyword 'fixed' + keyword 'fixed' + + + + keyword 'constraint' + keyword 'constraint' + + + + keyword 'instance' + keyword 'instance' + + + + keyword 'delegate' + keyword 'delegate' + + + + keyword 'inherit' + keyword 'inherit' + + + + keyword 'constructor' + keyword 'constructor' + + + + keyword 'default' + keyword 'default' + + + + keyword 'override' + keyword 'override' + + + + keyword 'abstract' + keyword 'abstract' + + + + keyword 'class' + keyword 'class' + + + + keyword 'member' + keyword 'member' + + + + keyword 'static' + keyword 'static' + + + + keyword 'namespace' + keyword 'namespace' + + + + start of structured construct + start of structured construct + + + + incomplete structured construct at or before this point + incomplete structured construct at or before this point + + + + Incomplete structured construct at or before this point + Incomplete structured construct at or before this point + + + + keyword 'then' + keyword 'then' + + + + keyword 'else' + keyword 'else' + + + + keyword 'let' or 'use' + keyword 'let' or 'use' + + + + binder keyword + binder keyword + + + + keyword 'do' + keyword 'do' + + + + keyword 'const' + keyword 'const' + + + + keyword 'with' + keyword 'with' + + + + keyword 'function' + keyword 'function' + + + + keyword 'fun' + keyword 'fun' + + + + end of input + end of input + + + + internal dummy token + internal dummy token + + + + keyword 'do!' + keyword 'do!' + + + + yield + yield + + + + yield! + yield! + + + + keyword 'interface' + keyword 'interface' + + + + keyword 'elif' + keyword 'elif' + + + + symbol '->' + symbol '->' + + + + keyword 'sig' + keyword 'sig' + + + + keyword 'struct' + keyword 'struct' + + + + keyword 'upcast' + keyword 'upcast' + + + + keyword 'downcast' + keyword 'downcast' + + + + keyword 'null' + keyword 'null' + + + + reserved keyword + reserved keyword + + + + keyword 'module' + keyword 'module' + + + + keyword 'and' + keyword 'and' + + + + keyword 'as' + keyword 'as' + + + + keyword 'assert' + keyword 'assert' + + + + keyword 'asr' + keyword 'asr' + + + + keyword 'downto' + keyword 'downto' + + + + keyword 'exception' + keyword 'exception' + + + + keyword 'false' + keyword 'false' + + + + keyword 'for' + keyword 'for' + + + + keyword 'fun' + keyword 'fun' + + + + keyword 'function' + keyword 'function' + + + + keyword 'finally' + keyword 'finally' + + + + keyword 'lazy' + keyword 'lazy' + + + + keyword 'match' + keyword 'match' + + + + keyword 'match!' + keyword 'match!' + + + + keyword 'mutable' + keyword 'mutable' + + + + keyword 'new' + keyword 'new' + + + + keyword 'of' + keyword 'of' + + + + keyword 'open' + keyword 'open' + + + + keyword 'or' + keyword 'or' + + + + keyword 'void' + keyword 'void' + + + + keyword 'extern' + keyword 'extern' + + + + keyword 'interface' + keyword 'interface' + + + + keyword 'rec' + keyword 'rec' + + + + keyword 'to' + keyword 'to' + + + + keyword 'true' + keyword 'true' + + + + keyword 'try' + keyword 'try' + + + + keyword 'type' + keyword 'type' + + + + keyword 'val' + keyword 'val' + + + + keyword 'inline' + keyword 'inline' + + + + keyword 'when' + keyword 'when' + + + + keyword 'while' + keyword 'while' + + + + keyword 'with' + keyword 'with' + + + + keyword 'if' + keyword 'if' + + + + keyword 'do' + keyword 'do' + + + + keyword 'global' + keyword 'global' + + + + keyword 'done' + keyword 'done' + + + + keyword 'in' + keyword 'in' + + + + symbol '(' + symbol '(' + + + + symbol'[' + symbol'[' + + + + keyword 'begin' + keyword 'begin' + + + + keyword 'end' + keyword 'end' + + + + directive + directive + + + + inactive code + inactive code + + + + lex failure + lex failure + + + + whitespace + whitespace + + + + comment + comment + + + + line comment + line comment + + + + string text + string text + + + + compiler generated literal + compiler generated literal + + + + byte array literal + byte array literal + + + + string literal + string literal + + + + end of input + end of input + + + + Unexpected end of input + Unexpected end of input + + + + Unexpected {0} + Unexpected {0} + + + + in interaction + in interaction + + + + in directive + in directive + + + + in field declaration + in field declaration + + + + in discriminated union case declaration + in discriminated union case declaration + + + + in binding + in binding + + + + in binding + in binding + + + + in member definition + in member definition + + + + in definitions + in definitions + + + + in member signature + in member signature + + + + in value signature + in value signature + + + + in type signature + in type signature + + + + in lambda expression + in lambda expression + + + + in union case + in union case + + + + in extern declaration + in extern declaration + + + + in object expression + in object expression + + + + in if/then/else expression + in if/then/else expression + + + + in open declaration + in open declaration + + + + in module or namespace signature + in module or namespace signature + + + + in pattern matching + in pattern matching + + + + in begin/end expression + in begin/end expression + + + + in record expression + in record expression + + + + in type definition + in type definition + + + + in exception definition + in exception definition + + + + in type name + in type name + + + + in attribute list + in attribute list + + + + in quotation literal + in quotation literal + + + + in type constraint + in type constraint + + + + in implementation file + in implementation file + + + + in definition + in definition + + + + in signature file + in signature file + + + + in pattern + in pattern + + + + in expression + in expression + + + + in type + in type + + + + in type arguments + in type arguments + + + + keyword + keyword + + + + symbol + symbol + + + + (due to indentation-aware syntax) + (due to indentation-aware syntax) + + + + . Expected {0} or other token. + . Expected {0} or other token. + + + + . Expected {0}, {1} or other token. + . Expected {0}, {1} or other token. + + + + . Expected {0}, {1}, {2} or other token. + . Expected {0}, {1}, {2} or other token. + + + + The type '{0}' cannot be used as the source of a type test or runtime coercion + The type '{0}' cannot be used as the source of a type test or runtime coercion + + + + The type '{0}' does not have any proper subtypes and cannot be used as the source of a type test or runtime coercion. + The type '{0}' does not have any proper subtypes and cannot be used as the source of a type test or runtime coercion. + + + + The type '{0}' does not have any proper subtypes and need not be used as the target of a static coercion + The type '{0}' does not have any proper subtypes and need not be used as the target of a static coercion + + + + This upcast is unnecessary - the types are identical + This upcast is unnecessary - the types are identical + + + + This type test or downcast will always hold + This type test or downcast will always hold + + + + The member '{0}' does not have the correct type to override any given virtual method + The member '{0}' does not have the correct type to override any given virtual method + + + + The member '{0}' does not have the correct type to override the corresponding abstract method. + The member '{0}' does not have the correct type to override the corresponding abstract method. + + + + The required signature is '{0}'. + The required signature is '{0}'. + + + + The member '{0}' is specialized with 'unit' but 'unit' can't be used as return type of an abstract method parameterized on return type. + The member '{0}' is specialized with 'unit' but 'unit' can't be used as return type of an abstract method parameterized on return type. + + + + This constructor is applied to {0} argument(s) but expects {1} + This constructor is applied to {0} argument(s) but expects {1} + + + + The two sides of this 'or' pattern bind different sets of variables + The two sides of this 'or' pattern bind different sets of variables + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \n{3}. + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \n{3}. + + + + Module '{0}' requires a {1} '{2}' + Module '{0}' requires a {1} '{2}' + + + + The use of native pointers may result in unverifiable .NET IL code + The use of native pointers may result in unverifiable .NET IL code + + + + {0} + {0} + + + + Thread static and context static 'let' bindings are deprecated. Instead use a declaration of the form 'static val mutable <ident> : <type>' in a class. Add the 'DefaultValue' attribute to this declaration to indicate that the value is initialized to the default value on each new thread. + Thread static and context static 'let' bindings are deprecated. Instead use a declaration of the form 'static val mutable <ident> : <type>' in a class. Add the 'DefaultValue' attribute to this declaration to indicate that the value is initialized to the default value on each new thread. + + + + This expression is a function value, i.e. is missing arguments. Its type is {0}. + This expression is a function value, i.e. is missing arguments. Its type is {0}. + + + + The result of this expression has type '{0}' and is implicitly ignored. Consider using 'ignore' to discard this value explicitly, e.g. 'expr |> ignore', or 'let' to bind the result to a name, e.g. 'let result = expr'. + The result of this expression has type '{0}' and is implicitly ignored. Consider using 'ignore' to discard this value explicitly, e.g. 'expr |> ignore', or 'let' to bind the result to a name, e.g. 'let result = expr'. + + + + The result of this equality expression has type '{0}' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. + The result of this equality expression has type '{0}' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. + + + + The result of this equality expression has type '{0}' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to set a value to a property, then use the '<-' operator e.g. '{1}.{2} <- expression'. + The result of this equality expression has type '{0}' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to set a value to a property, then use the '<-' operator e.g. '{1}.{2} <- expression'. + + + + The result of this equality expression has type '{0}' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to mutate a value, then mark the value 'mutable' and use the '<-' operator e.g. '{1} <- expression'. + The result of this equality expression has type '{0}' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to mutate a value, then mark the value 'mutable' and use the '<-' operator e.g. '{1} <- expression'. + + + + The result of this equality expression has type '{0}' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to mutate a value, then use the '<-' operator e.g. '{1} <- expression'. + The result of this equality expression has type '{0}' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to mutate a value, then use the '<-' operator e.g. '{1} <- expression'. + + + + This recursive use will be checked for initialization-soundness at runtime. This warning is usually harmless, and may be suppressed by using '#nowarn "21"' or '--nowarn:21'. + This recursive use will be checked for initialization-soundness at runtime. This warning is usually harmless, and may be suppressed by using '#nowarn "21"' or '--nowarn:21'. + + + + The value '{0}' will be evaluated as part of its own definition + The value '{0}' will be evaluated as part of its own definition + + + + This value will be eventually evaluated as part of its own definition. You may need to make the value lazy or a function. Value '{0}'{1}. + This value will be eventually evaluated as part of its own definition. You may need to make the value lazy or a function. Value '{0}'{1}. + + + + will evaluate '{0}' + will evaluate '{0}' + + + + Bindings may be executed out-of-order because of this forward reference. + Bindings may be executed out-of-order because of this forward reference. + + + + This and other recursive references to the object(s) being defined will be checked for initialization-soundness at runtime through the use of a delayed reference. This is because you are defining one or more recursive objects, rather than recursive functions. This warning may be suppressed by using '#nowarn "40"' or '--nowarn:40'. + This and other recursive references to the object(s) being defined will be checked for initialization-soundness at runtime through the use of a delayed reference. This is because you are defining one or more recursive objects, rather than recursive functions. This warning may be suppressed by using '#nowarn "40"' or '--nowarn:40'. + + + + Recursive references to the object being defined will be checked for initialization soundness at runtime through the use of a delayed reference. Consider placing self-references in members or within a trailing expression of the form '<ctor-expr> then <expr>'. + Recursive references to the object being defined will be checked for initialization soundness at runtime through the use of a delayed reference. Consider placing self-references in members or within a trailing expression of the form '<ctor-expr> then <expr>'. + + + + Recursive references to the object being defined will be checked for initialization soundness at runtime through the use of a delayed reference. Consider placing self-references within 'do' statements after the last 'let' binding in the construction sequence. + Recursive references to the object being defined will be checked for initialization soundness at runtime through the use of a delayed reference. Consider placing self-references within 'do' statements after the last 'let' binding in the construction sequence. + + + + The containing type can use 'null' as a representation value for its nullary union case. Invoking an abstract or virtual member or an interface implementation on a null value will lead to an exception. If necessary add a dummy data value to the nullary constructor to avoid 'null' being used as a representation for this type. + The containing type can use 'null' as a representation value for its nullary union case. Invoking an abstract or virtual member or an interface implementation on a null value will lead to an exception. If necessary add a dummy data value to the nullary constructor to avoid 'null' being used as a representation for this type. + + + + The containing type can use 'null' as a representation value for its nullary union case. This member will be compiled as a static member. + The containing type can use 'null' as a representation value for its nullary union case. This member will be compiled as a static member. + + + + The member '{0}' doesn't correspond to a unique abstract slot based on name and argument count alone + The member '{0}' doesn't correspond to a unique abstract slot based on name and argument count alone + + + + . Multiple implemented interfaces have a member with this name and argument count + . Multiple implemented interfaces have a member with this name and argument count + + + + . Consider implementing interfaces '{0}' and '{1}' explicitly. + . Consider implementing interfaces '{0}' and '{1}' explicitly. + + + + . Additional type annotations may be required to indicate the relevant override. This warning can be disabled using '#nowarn "70"' or '--nowarn:70'. + . Additional type annotations may be required to indicate the relevant override. This warning can be disabled using '#nowarn "70"' or '--nowarn:70'. + + + + parse error + parse error + + + + parse error: unexpected end of file + parse error: unexpected end of file + + + + {0} + {0} + + + + internal error: {0} + internal error: {0} + + + + {0} + {0} + + + + Incomplete pattern matches on this expression. + Incomplete pattern matches on this expression. + + + + For example, the value '{0}' may indicate a case not covered by the pattern(s). + For example, the value '{0}' may indicate a case not covered by the pattern(s). + + + + For example, the value '{0}' may indicate a case not covered by the pattern(s). However, a pattern rule with a 'when' clause might successfully match this value. + For example, the value '{0}' may indicate a case not covered by the pattern(s). However, a pattern rule with a 'when' clause might successfully match this value. + + + + Unmatched elements will be ignored. + Unmatched elements will be ignored. + + + + Enums may take values outside known cases. + Enums may take values outside known cases. + + + + This rule will never be matched + This rule will never be matched + + + + This value is not mutable. Consider using the mutable keyword, e.g. 'let mutable {0} = expression'. + This value is not mutable. Consider using the mutable keyword, e.g. 'let mutable {0} = expression'. + + + + This value is not local + This value is not local + + + + This construct is deprecated + This construct is deprecated + + + + . {0} + . {0} + + + + {0}. This warning can be disabled using '--nowarn:57' or '#nowarn "57"'. + {0}. This warning can be disabled using '--nowarn:57' or '#nowarn "57"'. + + + + Uses of this construct may result in the generation of unverifiable .NET IL code. This warning can be disabled using '--nowarn:9' or '#nowarn "9"'. + Uses of this construct may result in the generation of unverifiable .NET IL code. This warning can be disabled using '--nowarn:9' or '#nowarn "9"'. + + + + This construct is deprecated: {0} + This construct is deprecated: {0} + + + + This construct is deprecated: it is only for use in the F# library + This construct is deprecated: it is only for use in the F# library + + + + The following fields require values: {0} + The following fields require values: {0} + + + + Value restriction. The value '{0}' has generic type\n {1} \nEither make the arguments to '{2}' explicit or, if you do not intend for it to be generic, add a type annotation. + Value restriction. The value '{0}' has generic type\n {1} \nEither make the arguments to '{2}' explicit or, if you do not intend for it to be generic, add a type annotation. + + + + Value restriction. The value '{0}' has generic type\n {1} \nEither make '{2}' into a function with explicit arguments or, if you do not intend for it to be generic, add a type annotation. + Value restriction. The value '{0}' has generic type\n {1} \nEither make '{2}' into a function with explicit arguments or, if you do not intend for it to be generic, add a type annotation. + + + + Value restriction. This member has been inferred to have generic type\n {0} \nConstructors and property getters/setters cannot be more generic than the enclosing type. Add a type annotation to indicate the exact types involved. + Value restriction. This member has been inferred to have generic type\n {0} \nConstructors and property getters/setters cannot be more generic than the enclosing type. Add a type annotation to indicate the exact types involved. + + + + Value restriction. The value '{0}' has been inferred to have generic type\n {1} \nEither make the arguments to '{2}' explicit or, if you do not intend for it to be generic, add a type annotation. + Value restriction. The value '{0}' has been inferred to have generic type\n {1} \nEither make the arguments to '{2}' explicit or, if you do not intend for it to be generic, add a type annotation. + + + + Value restriction. The value '{0}' has been inferred to have generic type\n {1} \nEither define '{2}' as a simple data term, make it a function with explicit arguments or, if you do not intend for it to be generic, add a type annotation. + Value restriction. The value '{0}' has been inferred to have generic type\n {1} \nEither define '{2}' as a simple data term, make it a function with explicit arguments or, if you do not intend for it to be generic, add a type annotation. + + + + syntax error + syntax error + + + + {0} + {0} + + + + {0} + {0} + + + + Override implementations in augmentations are now deprecated. Override implementations should be given as part of the initial declaration of a type. + Override implementations in augmentations are now deprecated. Override implementations should be given as part of the initial declaration of a type. + + + + Override implementations should be given as part of the initial declaration of a type. + Override implementations should be given as part of the initial declaration of a type. + + + + Interface implementations in augmentations are now deprecated. Interface implementations should be given on the initial declaration of a type. + Interface implementations in augmentations are now deprecated. Interface implementations should be given on the initial declaration of a type. + + + + Interface implementations should be given on the initial declaration of a type. + Interface implementations should be given on the initial declaration of a type. + + + + A required assembly reference is missing. You must add a reference to assembly '{0}'. + A required assembly reference is missing. You must add a reference to assembly '{0}'. + + + + The type referenced through '{0}' is defined in an assembly that is not referenced. You must add a reference to assembly '{1}'. + The type referenced through '{0}' is defined in an assembly that is not referenced. You must add a reference to assembly '{1}'. + + + + #I directives may only occur in F# script files (extensions .fsx or .fsscript). Either move this code to a script file, add a '-I' compiler option for this reference or delimit the directive with delimit it with '#if INTERACTIVE'/'#endif'. + #I directives may only occur in F# script files (extensions .fsx or .fsscript). Either move this code to a script file, add a '-I' compiler option for this reference or delimit the directive with delimit it with '#if INTERACTIVE'/'#endif'. + + + + #r directives may only occur in F# script files (extensions .fsx or .fsscript). Either move this code to a script file or replace this reference with the '-r' compiler option. If this directive is being executed as user input, you may delimit it with '#if INTERACTIVE'/'#endif'. + #r directives may only occur in F# script files (extensions .fsx or .fsscript). Either move this code to a script file or replace this reference with the '-r' compiler option. If this directive is being executed as user input, you may delimit it with '#if INTERACTIVE'/'#endif'. + + + + This directive may only be used in F# script files (extensions .fsx or .fsscript). Either remove the directive, move this code to a script file or delimit the directive with '#if INTERACTIVE'/'#endif'. + This directive may only be used in F# script files (extensions .fsx or .fsscript). Either remove the directive, move this code to a script file or delimit the directive with '#if INTERACTIVE'/'#endif'. + + + + Unable to find the file '{0}' in any of\n {1} + Unable to find the file '{0}' in any of\n {1} + + + + Assembly reference '{0}' was not found or is invalid + Assembly reference '{0}' was not found or is invalid + + + + One or more warnings in loaded file.\n + One or more warnings in loaded file.\n + + + + One or more errors in loaded file.\n + One or more errors in loaded file.\n + + + + Loaded files may only be F# source files (extension .fs). This F# script file (.fsx or .fsscript) will be treated as an F# source file + Loaded files may only be F# source files (extension .fs). This F# script file (.fsx or .fsscript) will be treated as an F# source file + + + + Invalid assembly name '{0}' from InternalsVisibleTo attribute in {1} + Invalid assembly name '{0}' from InternalsVisibleTo attribute in {1} + + + + Invalid assembly name '{0}' from InternalsVisibleTo attribute (assembly filename not available) + Invalid assembly name '{0}' from InternalsVisibleTo attribute (assembly filename not available) + + + + Could not load file '{0}' because it does not exist or is inaccessible + Could not load file '{0}' because it does not exist or is inaccessible + + + + {0} (Code={1}) + {0} (Code={1}) + + + + internal error: {0} + internal error: {0} + + + + + \ No newline at end of file diff --git a/src/fsharp/xlf/FSStrings.es.xlf b/src/fsharp/xlf/FSStrings.es.xlf new file mode 100644 index 00000000000..a64fb622684 --- /dev/null +++ b/src/fsharp/xlf/FSStrings.es.xlf @@ -0,0 +1,1622 @@ + + + + + + . See also {0}. + . Vea también {0}. + + + + The tuples have differing lengths of {0} and {1} + Las tuplas tienen longitudes diferentes de {0} y {1}. + + + + The types '{0}' and '{1}' cannot be unified. + Los tipos '{0}' y '{1}' no se pueden unificar. + + + + A type parameter is missing a constraint '{0}' + Falta una restricción '{0}' en un parámetro de tipo. + + + + The unit of measure '{0}' does not match the unit of measure '{1}' + La unidad de medida '{0}' no coincide con la unidad de medida '{1}'. + + + + The type '{0}' does not match the type '{1}' + El tipo '{0}' no coincide con el tipo '{1}'. + + + + The type '{0}' is not compatible with the type '{1}'{2} + El tipo '{0}' no es compatible con el tipo '{1}'{2}. + + + + This expression was expected to have type\n '{1}' \nbut here has type\n '{0}' {2} + Se esperaba que esta expresión tuviera el tipo\n '{1}' \npero aquí tiene el tipo\n '{0}' {2} + + + + Type mismatch. Expecting a\n '{0}' \nbut given a\n '{1}' {2}\n + No coinciden los tipos. Se esperaba\n '{0}' \npero se dio\n '{1}' {2}\n + + + + Type constraint mismatch when applying the default type '{0}' for a type inference variable. + No coinciden las restricciones de tipo cuando se aplica el tipo predeterminado '{0}' para una variable de inferencia de tipos. + + + + Consider adding further type constraints + Considere agregar más restricciones de tipo. + + + + Type constraint mismatch. The type \n '{0}' \nis not compatible with type\n '{1}' {2}\n + No coinciden las restricciones de tipo. El tipo \n '{0}' \nno es compatible con el tipo\n '{1}' {2}\n + + + + Uppercase variable identifiers should not generally be used in patterns, and may indicate a misspelt pattern name. + En general, los identificadores de variable en mayúscula no deben usarse en patrones y pueden indicar un nombre de patrón mal escrito. + + + + Discriminated union cases and exception labels must be uppercase identifiers + Las etiquetas de casos de unión discriminada y de excepciones deben ser identificadores en mayúscula. + + + + Possible overload: '{0}'. {1}. + Sobrecarga posible: '{0}'. {1}. + + + + \n\nPossible best overload: '{0}'. + \n\nMejor sobrecarga posible: '{0}'. + + + + This function takes too many arguments, or is used in a context where a function is not expected + Esta función toma demasiados argumentos o se usa en un contexto donde no se espera una función. + + + + Member constraints with the name '{0}' are given special status by the F# compiler as certain .NET types are implicitly augmented with this member. This may result in runtime failures if you attempt to invoke the member constraint from your own code. + El compilador de F# da un estado especial a las restricciones de miembro con el nombre '{0}' porque determinados tipos .NET aumentan de forma implícita con este miembro. Esto puede dar lugar a errores en tiempo de ejecución si intenta invocar la restricción de miembro desde su propio código. + + + + A definition to be compiled as a .NET event does not have the expected form. Only property members can be compiled as .NET events. + Una definición que debe compilarse como un evento .NET no tiene el formato esperado. Solo los miembros de propiedad se pueden compilar como eventos .NET. + + + + Implicit object constructors for structs must take at least one argument + Los constructores de objetos implícitos para structs deben tomar al menos un argumento. + + + + The type implements the interface '{0}' but this is not revealed by the signature. You should list the interface in the signature, as the interface will be discoverable via dynamic type casts and/or reflection. + El tipo implementa la interfaz '{0}', pero la signatura no revela esto. Debe incluir la interfaz en la signatura, ya que se podrá detectar la interfaz mediante reflexión o conversiones de tipo dinámicas. + + + + The type '{0}' expects {1} type argument(s) but is given {2} + El tipo '{0}' espera {1} argumentos de tipo, pero se proporcionaron {2}. + + + + Lookup on object of indeterminate type based on information prior to this program point. A type annotation may be needed prior to this program point to constrain the type of the object. This may allow the lookup to be resolved. + Búsqueda de un objeto de tipo indeterminado basado en información anterior a este punto del programa. Puede ser necesaria una anotación de tipo anterior a este punto del programa para restringir el tipo del objeto. Esto puede permitir que se resuelva la búsqueda. + + + + Duplicate definition of {0} '{1}' + Definición duplicada de {0} '{1}' + + + + The {0} '{1}' can not be defined because the name '{2}' clashes with the {3} '{4}' in this type or module + No se puede definir el {0} '{1}' porque el nombre '{2}' está en conflicto con el {3} '{4}' de este tipo o módulo. + + + + Two members called '{0}' have the same signature + Dos miembros denominados '{0}' tienen la misma signatura. + + + + Duplicate definition of {0} '{1}' + Definición duplicada de {0} '{1}' + + + + A construct with this name was found in FSharp.PowerPack.dll, which contains some modules and types that were implicitly referenced in some previous versions of F#. You may need to add an explicit reference to this DLL in order to compile this code. + Se encontró una construcción con este nombre en FSharp.PowerPack.dll, que contiene algunos módulos y tipos a los que se hacía referencia de forma implícita en algunas versiones anteriores de F#. Puede ser necesario agregar una referencia explícita a este archivo DLL para compilar este código. + + + + This field is not mutable + Este campo no es mutable. + + + + The fields '{0}' and '{1}' are from different types + Los campos '{0}' y '{1}' son de tipos diferentes. + + + + '{0}' is bound twice in this pattern + '{0}' está enlazado dos veces en este patrón + + + + A use of the function '{0}' does not match a type inferred elsewhere. The inferred type of the function is\n {1}. \nThe type of the function required at this point of use is\n {2} {3}\nThis error may be due to limitations associated with generic recursion within a 'let rec' collection or within a group of classes. Consider giving a full type signature for the targets of recursive calls including type annotations for both argument and return types. + Un uso de la función '{0}' no coincide con un tipo inferido en otro lugar. El tipo inferido de la función es\n {1}. \nEl tipo de la función necesaria en este punto del uso es\n {2} {3}\nEste error puede deberse a limitaciones asociadas con la recursión genérica en una colección 'let rec' o en un grupo de clases. Considere proporcionar una signatura de tipo completa para los destinos de las llamadas recursivas que incluyen anotaciones de tipo tanto para tipos de argumento como para tipos de valor devuelto. + + + + Invalid runtime coercion or type test from type {0} to {1}\n{2} + Conversión o prueba de tipo en tiempo de ejecución no válida del tipo {0} a {1}\n{2} + + + + This runtime coercion or type test from type\n {0} \n to \n {1} \ninvolves an indeterminate type based on information prior to this program point. Runtime type tests are not allowed on some types. Further type annotations are needed. + Esta conversión o prueba de tipo en tiempo de ejecución del tipo\n {0} \n a \n {1} \nimplica un tipo indeterminado basado en información anterior a este punto del programa. En algunos tipos, no se permiten pruebas de tipo en tiempo de ejecución. Se necesitan más anotaciones de tipo. + + + + The static coercion from type\n {0} \nto \n {1} \n involves an indeterminate type based on information prior to this program point. Static coercions are not allowed on some types. Further type annotations are needed. + La conversión estática del tipo\n {0} \na \n {1} \n implica un tipo indeterminado basado en información anterior a este punto del programa. En algunos tipos, no se permiten conversiones estáticas. Se necesitan más anotaciones de tipo. + + + + A coercion from the value type \n {0} \nto the type \n {1} \nwill involve boxing. Consider using 'box' instead + Una conversión del tipo de valor \n {0} \nal tipo \n {1} \nimplicará conversión boxing. Considere el uso de 'box' en su lugar + + + + This type is 'abstract' since some abstract members have not been given an implementation. If this is intentional then add the '[<AbstractClass>]' attribute to your type. + Este tipo es "abstract" porque no se ha proporcionado implementación a algunos miembros abstractos. Si esto es intencionado, agregue el atributo "[<AbstractClass>]" al tipo. + + + + This construct causes code to be less generic than indicated by its type annotations. The type variable implied by the use of a '#', '_' or other type annotation at or near '{0}' has been constrained to be type '{1}'. + Esta construcción da lugar a que el código sea menos genérico que lo indicado por las anotaciones de tipo. La variable de tipo que implica el uso de '#', '_' u otra anotación de tipo en '{0}' o cerca se ha restringido al tipo '{1}'. + + + + This construct causes code to be less generic than indicated by the type annotations. The unit-of-measure variable '{0} has been constrained to be measure '{1}'. + Esta construcción da lugar a que el código sea menos genérico que lo indicado por las anotaciones de tipo. La variable de unidad de medida '{0} se ha restringido a la medida '{1}'. + + + + This construct causes code to be less generic than indicated by the type annotations. The type variable '{0} has been constrained to be type '{1}'. + Esta construcción da lugar a que el código sea menos genérico que lo indicado por las anotaciones de tipo. La variable de tipo '{0} se ha restringido al tipo '{1}'. + + + + identifier + Identificador + + + + integer literal + Literal de tipo Integer + + + + floating point literal + literal de punto flotante + + + + decimal literal + literal decimal + + + + character literal + literal de carácter + + + + keyword 'base' + palabra clave 'base' + + + + symbol '(*)' + símbolo '(*)' + + + + symbol '$' + símbolo '$' + + + + infix operator + operador de infijo + + + + infix operator + operador de infijo + + + + symbol ':>' + símbolo ':>' + + + + symbol '::' + símbolo '::' + + + + symbol '{0} + símbolo '{0} + + + + infix operator + operador de infijo + + + + infix operator + operador de infijo + + + + infix operator + operador de infijo + + + + prefix operator + operador de prefijo + + + + symbol ':?>' + símbolo ':?>' + + + + infix operator + operador de infijo + + + + infix operator + operador de infijo + + + + symbol '&' + símbolo '&' + + + + symbol '&&' + símbolo '&&' + + + + symbol '||' + símbolo '||' + + + + symbol '<' + símbolo '<' + + + + symbol '>' + símbolo '>' + + + + symbol '?' + símbolo '?' + + + + symbol '??' + símbolo '??' + + + + symbol ':?' + símbolo ':?' + + + + integer.. + entero.. + + + + symbol '..' + símbolo '..' + + + + quote symbol + símbolo de comilla + + + + symbol '*' + símbolo '*' + + + + type application + aplicación de tipo + + + + symbol ':' + símbolo ':' + + + + symbol ':=' + símbolo ':=' + + + + symbol '<-' + símbolo '<-' + + + + symbol '=' + símbolo '=' + + + + symbol '>|]' + símbolo ">|]" + + + + symbol '-' + símbolo '-' + + + + prefix operator + operador de prefijo + + + + operator name + nombre de operador + + + + symbol ',' + símbolo ',' + + + + symbol '.' + símbolo '.' + + + + symbol '|' + símbolo '|' + + + + symbol # + símbolo # + + + + symbol '_' + símbolo '_' + + + + symbol ';' + símbolo ';' + + + + symbol ';;' + símbolo ';;' + + + + symbol '(' + símbolo '(' + + + + symbol ')' + símbolo ')' + + + + symbol 'splice' + símbolo 'splice' + + + + start of quotation + inicio de expresión de código delimitada + + + + symbol '[' + símbolo '[' + + + + symbol '[|' + símbolo '[|' + + + + symbol '[<' + símbolo '[<' + + + + symbol '{' + símbolo '{' + + + + symbol '{<' + símbolo '{<' + + + + symbol '|]' + símbolo "|]" + + + + symbol '>}' + símbolo '>}' + + + + symbol '>]' + símbolo ">]" + + + + end of quotation + final de expresión de código delimitada + + + + symbol ']' + símbolo "]" + + + + symbol '}' + símbolo '}' + + + + keyword 'public' + palabra clave 'public' + + + + keyword 'private' + palabra clave 'private' + + + + keyword 'internal' + palabra clave 'internal' + + + + keyword 'fixed' + palabra clave "fixed" + + + + keyword 'constraint' + palabra clave 'constraint' + + + + keyword 'instance' + palabra clave 'instance' + + + + keyword 'delegate' + palabra clave 'delegate' + + + + keyword 'inherit' + palabra clave 'inherit' + + + + keyword 'constructor' + palabra clave 'constructor' + + + + keyword 'default' + palabra clave 'default' + + + + keyword 'override' + palabra clave 'override' + + + + keyword 'abstract' + palabra clave 'abstract' + + + + keyword 'class' + palabra clave 'class' + + + + keyword 'member' + palabra clave 'member' + + + + keyword 'static' + palabra clave 'static' + + + + keyword 'namespace' + palabra clave 'namespace' + + + + start of structured construct + inicio de construcción estructurada + + + + incomplete structured construct at or before this point + Construcción estructurada incompleta en este punto o antes. + + + + Incomplete structured construct at or before this point + Construcción estructurada incompleta en este punto o antes. + + + + keyword 'then' + palabra clave 'then' + + + + keyword 'else' + palabra clave 'else' + + + + keyword 'let' or 'use' + palabra clave 'let' o 'use' + + + + binder keyword + palabra clave de enlazador + + + + keyword 'do' + palabra clave 'do' + + + + keyword 'const' + palabra clave 'const' + + + + keyword 'with' + palabra clave 'with' + + + + keyword 'function' + palabra clave 'function' + + + + keyword 'fun' + palabra clave 'fun' + + + + end of input + fin de entrada + + + + internal dummy token + token ficticio interno + + + + keyword 'do!' + palabra clave 'do!' + + + + yield + producción + + + + yield! + producción + + + + keyword 'interface' + palabra clave 'interface' + + + + keyword 'elif' + palabra clave 'elif' + + + + symbol '->' + símbolo '->' + + + + keyword 'sig' + palabra clave 'sig' + + + + keyword 'struct' + palabra clave 'struct' + + + + keyword 'upcast' + palabra clave 'upcast' + + + + keyword 'downcast' + palabra clave 'downcast' + + + + keyword 'null' + palabra clave 'null' + + + + reserved keyword + palabra clave reservada + + + + keyword 'module' + palabra clave 'module' + + + + keyword 'and' + palabra clave 'and' + + + + keyword 'as' + palabra clave 'as' + + + + keyword 'assert' + palabra clave 'assert' + + + + keyword 'asr' + palabra clave 'asr' + + + + keyword 'downto' + palabra clave 'downto' + + + + keyword 'exception' + palabra clave 'exception' + + + + keyword 'false' + palabra clave 'false' + + + + keyword 'for' + palabra clave 'for' + + + + keyword 'fun' + palabra clave 'fun' + + + + keyword 'function' + palabra clave 'function' + + + + keyword 'finally' + palabra clave 'finally' + + + + keyword 'lazy' + palabra clave 'lazy' + + + + keyword 'match' + palabra clave 'match' + + + + keyword 'match!' + palabra clave 'match!' + + + + keyword 'mutable' + palabra clave 'mutable' + + + + keyword 'new' + palabra clave 'new' + + + + keyword 'of' + palabra clave 'of' + + + + keyword 'open' + palabra clave 'open' + + + + keyword 'or' + palabra clave 'or' + + + + keyword 'void' + palabra clave 'void' + + + + keyword 'extern' + palabra clave 'extern' + + + + keyword 'interface' + palabra clave 'interface' + + + + keyword 'rec' + palabra clave 'rec' + + + + keyword 'to' + palabra clave 'to' + + + + keyword 'true' + palabra clave 'true' + + + + keyword 'try' + palabra clave 'try' + + + + keyword 'type' + palabra clave 'type' + + + + keyword 'val' + palabra clave 'val' + + + + keyword 'inline' + palabra clave 'inline' + + + + keyword 'when' + palabra clave 'when' + + + + keyword 'while' + palabra clave 'while' + + + + keyword 'with' + palabra clave 'with' + + + + keyword 'if' + palabra clave 'if' + + + + keyword 'do' + palabra clave 'do' + + + + keyword 'global' + palabra clave 'global' + + + + keyword 'done' + palabra clave 'done' + + + + keyword 'in' + palabra clave 'in' + + + + symbol '(' + símbolo '(' + + + + symbol'[' + símbolo'[' + + + + keyword 'begin' + palabra clave 'begin' + + + + keyword 'end' + palabra clave 'end' + + + + directive + directiva + + + + inactive code + código inactivo + + + + lex failure + error de LEX + + + + whitespace + espacio en blanco + + + + comment + comentario + + + + line comment + comentario de línea + + + + string text + texto de cadena + + + + compiler generated literal + literal generado por el compilador + + + + byte array literal + literal de matriz de bytes + + + + string literal + Literal de cadena + + + + end of input + fin de entrada + + + + Unexpected end of input + Final de entrada inesperado. + + + + Unexpected {0} + No se esperaba {0}. + + + + in interaction + en interacción + + + + in directive + en directiva + + + + in field declaration + en declaración de campo + + + + in discriminated union case declaration + en declaración de caso de unión discriminada + + + + in binding + en enlace + + + + in binding + en enlace + + + + in member definition + en definición de miembro + + + + in definitions + en definiciones + + + + in member signature + en signatura de miembro + + + + in value signature + en signatura de valor + + + + in type signature + en signatura de tipo + + + + in lambda expression + en expresión lambda + + + + in union case + en caso de unión + + + + in extern declaration + en declaración externa + + + + in object expression + en expresión de objeto + + + + in if/then/else expression + en expresión if/then/else + + + + in open declaration + en declaración abierta + + + + in module or namespace signature + en signatura de módulo o espacio de nombres + + + + in pattern matching + en detección de patrones + + + + in begin/end expression + en expresión de principio o final + + + + in record expression + en expresión de registro + + + + in type definition + en definición de tipo + + + + in exception definition + en definición de excepción + + + + in type name + en nombre de tipo + + + + in attribute list + en lista de atributos + + + + in quotation literal + en literal de expresión de código delimitada + + + + in type constraint + en restricción de tipo + + + + in implementation file + en archivo de implementación + + + + in definition + en definición + + + + in signature file + en archivo de signatura + + + + in pattern + en patrón + + + + in expression + en expresión + + + + in type + en tipo + + + + in type arguments + en argumentos de tipo + + + + keyword + palabra clave + + + + symbol + símbolo + + + + (due to indentation-aware syntax) + (debido a sintaxis que tiene en cuenta la sangría) + + + + . Expected {0} or other token. + . Se esperaba {0} u otro token. + + + + . Expected {0}, {1} or other token. + . Se esperaba {0}, {1} un otro token. + + + + . Expected {0}, {1}, {2} or other token. + . Se esperaba {0}, {1}, {2} u otro token. + + + + The type '{0}' cannot be used as the source of a type test or runtime coercion + El tipo '{0}' no se puede usar como origen de una prueba de tipo o una conversión en tiempo de ejecución. + + + + The type '{0}' does not have any proper subtypes and cannot be used as the source of a type test or runtime coercion. + El tipo '{0}' no tiene subtipos propios y no se puede usar como origen de una prueba de tipo o una conversión en tiempo de ejecución. + + + + The type '{0}' does not have any proper subtypes and need not be used as the target of a static coercion + El tipo '{0}' no tiene los subtipos adecuados y no debe usarse como destino de una conversión estática. + + + + This upcast is unnecessary - the types are identical + Esta conversión hacia arriba es innecesaria, los tipos son idénticos. + + + + This type test or downcast will always hold + Esta prueba de tipo o conversión hacia abajo siempre se llevará a cabo. + + + + The member '{0}' does not have the correct type to override any given virtual method + El miembro '{0}' no tiene el tipo correcto para invalidar cualquier método virtual dado. + + + + The member '{0}' does not have the correct type to override the corresponding abstract method. + El miembro '{0}' no tiene el tipo correcto para invalidar el método abstracto correspondiente. + + + + The required signature is '{0}'. + La signatura necesaria es '{0}'. + + + + The member '{0}' is specialized with 'unit' but 'unit' can't be used as return type of an abstract method parameterized on return type. + El miembro '{0}' está especializado con 'unit', pero 'unit' no se puede usar como tipo de valor devuelto de un método abstracto parametrizado en el tipo de valor devuelto. + + + + This constructor is applied to {0} argument(s) but expects {1} + Este constructor se ha aplicado a {0} argumentos, pero espera {1}. + + + + The two sides of this 'or' pattern bind different sets of variables + Las dos partes de este patrón 'or' enlazan conjuntos de variables diferentes. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \n{3}. + El módulo '{0}' contiene\n {1} \npero su signatura especifica \n {2} \n{3}. + + + + Module '{0}' requires a {1} '{2}' + El módulo '{0}' requiere un {1} '{2}'. + + + + The use of native pointers may result in unverifiable .NET IL code + El uso de punteros nativos puede dar lugar a código .NET de IL que no se puede comprobar. + + + + {0} + {0} + + + + Thread static and context static 'let' bindings are deprecated. Instead use a declaration of the form 'static val mutable <ident> : <type>' in a class. Add the 'DefaultValue' attribute to this declaration to indicate that the value is initialized to the default value on each new thread. + Los enlaces 'let' estáticos Thread y Context están en desuso. En su lugar, use una declaración con el formato 'static val mutable <ident> : <tipo>' en una clase. Agregue el atributo 'DefaultValue' a esta declaración para indicar que el valor se inicializa con el valor predeterminado en cada nuevo subproceso. + + + + This expression is a function value, i.e. is missing arguments. Its type is {0}. + Esta expresión es un valor de función, es decir, le faltan argumentos. Es de tipo {0}. + + + + The result of this expression has type '{0}' and is implicitly ignored. Consider using 'ignore' to discard this value explicitly, e.g. 'expr |> ignore', or 'let' to bind the result to a name, e.g. 'let result = expr'. + Implícitamente se omite el resultado de esta expresión, que tiene el tipo "{0}". Considere el uso de "ignore" para descartar este valor explícitamente, por ejemplo, "expr |> ignore" o "let" para vincular el resultado a un nombre, por ejemplo, "let result = expr". + + + + The result of this equality expression has type '{0}' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. + El resultado de esta expresión de igualdad, de tipo "{0}", se descarta de forma implícita. Considere la posibilidad de usar "let" para enlazar el resultado a un nombre, por ejemplo "let resultado = expresión". + + + + The result of this equality expression has type '{0}' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to set a value to a property, then use the '<-' operator e.g. '{1}.{2} <- expression'. + El resultado de esta expresión de igualdad, de tipo "{0}", se descarta de forma implícita. Considere la posibilidad de usar "let" para enlazar el resultado a un nombre, por ejemplo "let resultado = expresión". Si desea establecer un valor en una propiedad, use el operador "<-". Por ejemplo: "{1}.{2} <- expresión". + + + + The result of this equality expression has type '{0}' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to mutate a value, then mark the value 'mutable' and use the '<-' operator e.g. '{1} <- expression'. + El resultado de esta expresión de igualdad, de tipo "{0}", se descarta de forma implícita. Considere la posibilidad de usar "let" para enlazar el resultado a un nombre, por ejemplo "let resultado = expresión". Si desea mutar un valor, marque el valor como "mutable" y use el operador "<-". Por ejemplo: "{1} <- expresión". + + + + The result of this equality expression has type '{0}' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to mutate a value, then use the '<-' operator e.g. '{1} <- expression'. + El resultado de esta expresión de igualdad, de tipo "{0}", se descarta de forma implícita. Considere la posibilidad de usar "let" para enlazar el resultado a un nombre, por ejemplo "let resultado = expresión". Si desea mutar un valor, use el operador "<-". Por ejemplo: "{1} <- expresión". + + + + This recursive use will be checked for initialization-soundness at runtime. This warning is usually harmless, and may be suppressed by using '#nowarn "21"' or '--nowarn:21'. + Este uso recursivo se comprobará para ver si tiene inicialización silenciosa en tiempo de ejecución. Esta advertencia suele ser inocua y se puede suprimir con '#nowarn "21"' o '--nowarn:21'. + + + + The value '{0}' will be evaluated as part of its own definition + El valor '{0}' se evaluará como parte de su propia definición. + + + + This value will be eventually evaluated as part of its own definition. You may need to make the value lazy or a function. Value '{0}'{1}. + Este valor se evaluará finalmente como parte de su propia definición. Puede ser necesario convertir el valor en Lazy o una función. Valor '{0}'{1}. + + + + will evaluate '{0}' + evaluará '{0}'. + + + + Bindings may be executed out-of-order because of this forward reference. + Los enlaces se pueden ejecutar sin orden debido a esta referencia adelantada. + + + + This and other recursive references to the object(s) being defined will be checked for initialization-soundness at runtime through the use of a delayed reference. This is because you are defining one or more recursive objects, rather than recursive functions. This warning may be suppressed by using '#nowarn "40"' or '--nowarn:40'. + Esta y otras referencias recursivas al objeto que se va a definir se comprobarán para ver si tienen inicialización silenciosa en tiempo de ejecución mediante el uso de una referencia retardada. Esto se debe a que está definiendo uno o varios objetos recursivos en lugar de funciones recursivas. Esta advertencia se puede suprimir con '#nowarn "40" o --nowarn:40'. + + + + Recursive references to the object being defined will be checked for initialization soundness at runtime through the use of a delayed reference. Consider placing self-references in members or within a trailing expression of the form '<ctor-expr> then <expr>'. + Las referencias recursivas al objeto que se va a definir se comprobarán para ver si tienen inicialización silenciosa en tiempo de ejecución mediante el uso de una referencia retardada. Considere poner autorreferencias en los miembros o en una expresión final con el formato '<ctor-expr> then <expr>'. + + + + Recursive references to the object being defined will be checked for initialization soundness at runtime through the use of a delayed reference. Consider placing self-references within 'do' statements after the last 'let' binding in the construction sequence. + Las referencias recursivas al objeto que se va a definir se comprobarán para ver si tienen inicialización silenciosa en tiempo de ejecución mediante el uso de una referencia retardada. Considere poner autorreferencias en instrucciones 'do' después del último enlace 'let' en la secuencia de construcción. + + + + The containing type can use 'null' as a representation value for its nullary union case. Invoking an abstract or virtual member or an interface implementation on a null value will lead to an exception. If necessary add a dummy data value to the nullary constructor to avoid 'null' being used as a representation for this type. + El tipo contenedor puede usar 'null' como valor de representación para el caso de unión que acepta valores NULL. Si se invoca un miembro abstracto o virtual, o una implementación de interfaz con un valor NULL, se producirá una excepción. Si es necesario, agregue un valor de datos ficticio al constructor que acepta valores NULL para evitar que se use 'null' como representación de este tipo. + + + + The containing type can use 'null' as a representation value for its nullary union case. This member will be compiled as a static member. + El tipo contenedor puede usar 'null' como valor de representación para el caso de unión que acepta valores NULL. Este miembro se compilará como miembro estático. + + + + The member '{0}' doesn't correspond to a unique abstract slot based on name and argument count alone + El miembro '{0}' no corresponde a una única ranura abstracta según el nombre y el número de argumentos. + + + + . Multiple implemented interfaces have a member with this name and argument count + . Varias interfaces implementadas tienen un miembro con este nombre y número de argumentos. + + + + . Consider implementing interfaces '{0}' and '{1}' explicitly. + . Considere implementar las interfaces '{0}' y '{1}' de forma explícita. + + + + . Additional type annotations may be required to indicate the relevant override. This warning can be disabled using '#nowarn "70"' or '--nowarn:70'. + . Pueden ser necesarias anotaciones de tipo adicionales para indicar la invalidación relevante. Esta advertencia se puede deshabilitar con '#nowarn "70"' o '--nowarn:70'. + + + + parse error + error de análisis + + + + parse error: unexpected end of file + error de análisis: final de archivo inesperado + + + + {0} + {0} + + + + internal error: {0} + error interno: {0} + + + + {0} + {0} + + + + Incomplete pattern matches on this expression. + Detecciones de patrones incompletas en esta expresión. + + + + For example, the value '{0}' may indicate a case not covered by the pattern(s). + Por ejemplo, el valor '{0}' puede indicar un caso no cubierto por los patrones. + + + + For example, the value '{0}' may indicate a case not covered by the pattern(s). However, a pattern rule with a 'when' clause might successfully match this value. + Por ejemplo, el valor '{0}' puede indicar un caso no cubierto por los patrones. Sin embargo, una regla de patrón con una cláusula 'when' puede coincidir correctamente con este valor. + + + + Unmatched elements will be ignored. + Los elementos que no coinciden se omitirán. + + + + Enums may take values outside known cases. + Las enumeraciones pueden tomar valores fuera de las clases conocidas. + + + + This rule will never be matched + Nunca se buscarán coincidencias con esta regla. + + + + This value is not mutable. Consider using the mutable keyword, e.g. 'let mutable {0} = expression'. + Este valor no es mutable. Considere la posibilidad de usar la palabra clave mutable, por ejemplo, "let mutable {0} = expression". + + + + This value is not local + Este valor no es local. + + + + This construct is deprecated + Esta construcción está en desuso + + + + . {0} + . {0} + + + + {0}. This warning can be disabled using '--nowarn:57' or '#nowarn "57"'. + {0}. Esta advertencia se puede deshabilitar con '--nowarn:57' o '#nowarn "57"'. + + + + Uses of this construct may result in the generation of unverifiable .NET IL code. This warning can be disabled using '--nowarn:9' or '#nowarn "9"'. + El uso de esta construcción puede dar lugar a que se genere código .NET de IL que no se puede comprobar. Esta advertencia se puede deshabilitar con '--nowarn:9' o '#nowarn "9"'. + + + + This construct is deprecated: {0} + Esta construcción está en desuso: {0}. + + + + This construct is deprecated: it is only for use in the F# library + Esta construcción está en desuso: es solo para usarla en la biblioteca de F#. + + + + The following fields require values: {0} + Los campos siguientes requieren valores: {0}. + + + + Value restriction. The value '{0}' has generic type\n {1} \nEither make the arguments to '{2}' explicit or, if you do not intend for it to be generic, add a type annotation. + Restricción de valor. El valor '{0}' tiene el tipo genérico\n {1} \nConvierta los argumentos de '{2}' en explícitos o, si su intención no es que sea genérico, agregue una anotación de tipo. + + + + Value restriction. The value '{0}' has generic type\n {1} \nEither make '{2}' into a function with explicit arguments or, if you do not intend for it to be generic, add a type annotation. + Restricción de valor. El valor '{0}' tiene el tipo genérico\n {1} \nConvierta '{2}' en una función con argumentos explícitos o, si su intención no es que sea genérico, agregue una anotación de tipo. + + + + Value restriction. This member has been inferred to have generic type\n {0} \nConstructors and property getters/setters cannot be more generic than the enclosing type. Add a type annotation to indicate the exact types involved. + Restricción de valor. Se ha inferido que este miembro tiene el tipo genérico\n {0} \nLos constructores y los captadores y establecedores de propiedades no pueden ser más genéricos que el tipo envolvente. Agregue una anotación de tipo para indicar los tipos exactos implicados. + + + + Value restriction. The value '{0}' has been inferred to have generic type\n {1} \nEither make the arguments to '{2}' explicit or, if you do not intend for it to be generic, add a type annotation. + Restricción de valor. Se ha inferido que el valor '{0}' tiene el tipo genérico\n {1} \nConvierta los argumentos de '{2}' en explícitos o, si su intención no es que sea genérico, agregue una anotación de tipo. + + + + Value restriction. The value '{0}' has been inferred to have generic type\n {1} \nEither define '{2}' as a simple data term, make it a function with explicit arguments or, if you do not intend for it to be generic, add a type annotation. + Restricción de valor. Se ha inferido que el valor '{0}' tiene el tipo genérico\n {1} \nDefina '{2}' como un término de datos simple, conviértalo en una función con argumentos explícitos o, si su intención no es que sea genérico, agregue una anotación de tipo. + + + + syntax error + error de sintaxis + + + + {0} + {0} + + + + {0} + {0} + + + + Override implementations in augmentations are now deprecated. Override implementations should be given as part of the initial declaration of a type. + Las implementaciones de invalidación en aumentos están en desuso. Las implementaciones de invalidación deben proporcionarse como parte de la declaración inicial de un tipo. + + + + Override implementations should be given as part of the initial declaration of a type. + Las implementaciones de invalidación deben proporcionarse como parte de la declaración inicial de un tipo. + + + + Interface implementations in augmentations are now deprecated. Interface implementations should be given on the initial declaration of a type. + Las implementaciones de interfaz en aumentos están en desuso. Las implementaciones de interfaz deben proporcionarse en la declaración inicial de un tipo. + + + + Interface implementations should be given on the initial declaration of a type. + Las implementaciones de interfaz deben proporcionarse en la declaración inicial de un tipo. + + + + A required assembly reference is missing. You must add a reference to assembly '{0}'. + Falta una referencia de ensamblado necesaria. Debe agregar una referencia al ensamblado '{0}'. + + + + The type referenced through '{0}' is defined in an assembly that is not referenced. You must add a reference to assembly '{1}'. + El tipo al que se hace referencia a través de '{0}' está definido en un ensamblado al que no se hace referencia. Debe agregar una referencia al ensamblado '{1}'. + + + + #I directives may only occur in F# script files (extensions .fsx or .fsscript). Either move this code to a script file, add a '-I' compiler option for this reference or delimit the directive with delimit it with '#if INTERACTIVE'/'#endif'. + Las directivas #I pueden existir solo en archivos de script de F# (extensiones .fsx o .fsscript). Mueva este código a un archivo de script, agregue una opción de compilador '-I' para esta referencia o delimite la directiva con '#if INTERACTIVE'/'#endif'. + + + + #r directives may only occur in F# script files (extensions .fsx or .fsscript). Either move this code to a script file or replace this reference with the '-r' compiler option. If this directive is being executed as user input, you may delimit it with '#if INTERACTIVE'/'#endif'. + Las directivas #r pueden existir solo en archivos de script de F# (extensiones .fsx o .fsscript). Mueva este código a un archivo de script o sustituta esta referencia por la opción de compilador '-r'. Si esta directiva se ejecuta como entrada de usuario, puede delimitarla con '#if INTERACTIVE'/'#endif'. + + + + This directive may only be used in F# script files (extensions .fsx or .fsscript). Either remove the directive, move this code to a script file or delimit the directive with '#if INTERACTIVE'/'#endif'. + Esta directiva se puede usar solo en archivos de script de F# (extensiones .fsx o .fsscript). Quite la directiva, mueva este código a un archivo de script o delimite la directiva con '#if INTERACTIVE'/'#endif'. + + + + Unable to find the file '{0}' in any of\n {1} + No se encuentra el archivo '{0}' en\n {1} + + + + Assembly reference '{0}' was not found or is invalid + No se encontró la referencia de ensamblado '{0}' o no es válida. + + + + One or more warnings in loaded file.\n + Hay una varias advertencias en el archivo cargado.\n + + + + One or more errors in loaded file.\n + Hay uno o varios errores en el archivo cargado.\n + + + + Loaded files may only be F# source files (extension .fs). This F# script file (.fsx or .fsscript) will be treated as an F# source file + Los archivos cargados pueden ser solo archivos de código fuente de F# (extensión .fs). Este archivo de script de F# (.fsx o .fsscript) se tratará como un archivo de código fuente de F#. + + + + Invalid assembly name '{0}' from InternalsVisibleTo attribute in {1} + Nombre de ensamblado '{0}' no válido del atributo InternalsVisibleTo attribute en {1}. + + + + Invalid assembly name '{0}' from InternalsVisibleTo attribute (assembly filename not available) + Nombre de ensamblado '{0}' no válido del atributo InternalsVisibleTo (nombre de archivo de ensamblado no disponible). + + + + Could not load file '{0}' because it does not exist or is inaccessible + No se pudo cargar el archivo '{0}' porque no existe o no está accesible. + + + + {0} (Code={1}) + {0} (código={1}) + + + + internal error: {0} + error interno: {0} + + + + + \ No newline at end of file diff --git a/src/fsharp/xlf/FSStrings.fr.xlf b/src/fsharp/xlf/FSStrings.fr.xlf new file mode 100644 index 00000000000..a56bd5baadd --- /dev/null +++ b/src/fsharp/xlf/FSStrings.fr.xlf @@ -0,0 +1,1622 @@ + + + + + + . See also {0}. + . Voir aussi {0}. + + + + The tuples have differing lengths of {0} and {1} + Les tuples ont des longueurs différentes de {0} et {1} + + + + The types '{0}' and '{1}' cannot be unified. + Impossible d'unifier les types '{0}' et '{1}'. + + + + A type parameter is missing a constraint '{0}' + Contrainte manquante dans un paramètre de type '{0}' + + + + The unit of measure '{0}' does not match the unit of measure '{1}' + L'unité de mesure '{0}' ne correspond pas à l'unité de mesure '{1}' + + + + The type '{0}' does not match the type '{1}' + Le type '{0}' ne correspond pas au type '{1}' + + + + The type '{0}' is not compatible with the type '{1}'{2} + Le type '{0}' n'est pas compatible avec le type '{1}'{2} + + + + This expression was expected to have type\n '{1}' \nbut here has type\n '{0}' {2} + Cette expression était censée avoir le type\n {1} \nmais elle a ici le type\n {0} {2} + + + + Type mismatch. Expecting a\n '{0}' \nbut given a\n '{1}' {2}\n + Incompatibilité de type. Attente de\n {0} \nmais obtention de\n {1} {2}\n + + + + Type constraint mismatch when applying the default type '{0}' for a type inference variable. + Incompatibilité de contrainte de type lors de l'application du type par défaut '{0}' pour une variable d'inférence de type. + + + + Consider adding further type constraints + Ajoutez des contraintes de type supplémentaires + + + + Type constraint mismatch. The type \n '{0}' \nis not compatible with type\n '{1}' {2}\n + Incompatibilité de contrainte de type. Le type \n {0} \nn'est pas compatible avec le type\n {1} {2}\n + + + + Uppercase variable identifiers should not generally be used in patterns, and may indicate a misspelt pattern name. + En règle générale, les identificateurs de variable en majuscules ne doivent pas être utilisés dans les modèles. En outre, ils peuvent indiquer une erreur d'orthographe dans le nom du modèle. + + + + Discriminated union cases and exception labels must be uppercase identifiers + Les cas d'union discriminés et les étiquettes d'exception doivent être des identificateurs en majuscules + + + + Possible overload: '{0}'. {1}. + Surcharge possible : '{0}'. {1}. + + + + \n\nPossible best overload: '{0}'. + \n\nMeilleure surcharge possible : '{0}'. + + + + This function takes too many arguments, or is used in a context where a function is not expected + Cette fonction accepte trop d'arguments ou est utilisée dans un contexte où aucune fonction n'est attendue + + + + Member constraints with the name '{0}' are given special status by the F# compiler as certain .NET types are implicitly augmented with this member. This may result in runtime failures if you attempt to invoke the member constraint from your own code. + Les contraintes de membre portant le nom '{0}' reçoivent un état spécial de la part du compilateur F#, car certains types .NET sont augmentés implicitement avec ce membre. Cela peut entraîner des problèmes de runtime si vous tentez d'appeler la contrainte de membre à partir de votre propre code. + + + + A definition to be compiled as a .NET event does not have the expected form. Only property members can be compiled as .NET events. + Une définition qui doit être compilée en tant qu'événement .NET n'a pas la forme attendue. Seuls les membres de propriété peuvent être compilés en tant qu'événements .NET. + + + + Implicit object constructors for structs must take at least one argument + Les constructeurs d'objets implicites des structs doivent accepter au moins un argument + + + + The type implements the interface '{0}' but this is not revealed by the signature. You should list the interface in the signature, as the interface will be discoverable via dynamic type casts and/or reflection. + Le type implémente l'interface '{0}' mais cela n'est pas révélé par la signature. Vous devez lister l'interface dans la signature, car l'interface est détectable via des casts et/ou une réflexion de type dynamic. + + + + The type '{0}' expects {1} type argument(s) but is given {2} + Le type '{0}' attend {1} argument(s) de type mais en a reçu {2} + + + + Lookup on object of indeterminate type based on information prior to this program point. A type annotation may be needed prior to this program point to constrain the type of the object. This may allow the lookup to be resolved. + Recherche d'un objet de type indéterminé basé sur des informations situées avant ce point du programme. Une annotation de type peut être nécessaire avant ce point du programme pour contraindre le type de l'objet. Cela peut permettre la résolution de la recherche. + + + + Duplicate definition of {0} '{1}' + Définition dupliquée de {0} '{1}' + + + + The {0} '{1}' can not be defined because the name '{2}' clashes with the {3} '{4}' in this type or module + Impossible de définir le {0} '{1}', car le nom '{2}' est en conflit avec le {3} '{4}' dans ce type ou module + + + + Two members called '{0}' have the same signature + Deux membres appelés '{0}' ont la même signature + + + + Duplicate definition of {0} '{1}' + Définition dupliquée de {0} '{1}' + + + + A construct with this name was found in FSharp.PowerPack.dll, which contains some modules and types that were implicitly referenced in some previous versions of F#. You may need to add an explicit reference to this DLL in order to compile this code. + Une construction portant ce nom a été trouvée dans FSharp.PowerPack.dll, qui contient certains modules et types implicitement référencés dans des versions antérieures de F#. Vous pouvez ajouter une référence explicite à cette DLL pour compiler ce code. + + + + This field is not mutable + Ce champ n'est pas mutable + + + + The fields '{0}' and '{1}' are from different types + Les champs '{0}' et '{1}' sont de types différents + + + + '{0}' is bound twice in this pattern + '{0}' est lié à deux reprises dans ce modèle + + + + A use of the function '{0}' does not match a type inferred elsewhere. The inferred type of the function is\n {1}. \nThe type of the function required at this point of use is\n {2} {3}\nThis error may be due to limitations associated with generic recursion within a 'let rec' collection or within a group of classes. Consider giving a full type signature for the targets of recursive calls including type annotations for both argument and return types. + Une utilisation de la fonction '{0}' ne correspond pas à un type déduit ailleurs. Le type déduit de la fonction est\n {1}. \nLe type de la fonction nécessaire à ce stade de l'utilisation est\n {2} {3}\nCette erreur peut être due à des limitations associées à la récursivité générique dans une collection 'let rec' ou dans un groupe de classes. Fournissez une signature de type complète pour les cibles des appels récursifs en incluant les annotations de type des arguments et des types de retour. + + + + Invalid runtime coercion or type test from type {0} to {1}\n{2} + Forçage de type ou test de type au moment de l'exécution non valide, du type {0} en {1}\n{2} + + + + This runtime coercion or type test from type\n {0} \n to \n {1} \ninvolves an indeterminate type based on information prior to this program point. Runtime type tests are not allowed on some types. Further type annotations are needed. + Ce forçage de type ou test de type au moment de l'exécution du type\n {0} \n en \n {1} \nimplique un type indéterminé basé sur des informations situées avant ce point du programme. Les tests de types au moment de l'exécution ne sont pas autorisés sur certains types. Des annotations de type supplémentaires sont nécessaires. + + + + The static coercion from type\n {0} \nto \n {1} \n involves an indeterminate type based on information prior to this program point. Static coercions are not allowed on some types. Further type annotations are needed. + Le forçage de type statique du type\n {0} \nen \n {1} \n implique un type indéterminé basé sur des informations situées avant ce point du programme. Les forçages de types statiques ne sont pas autorisés sur certains types. Des annotations de type supplémentaires sont nécessaires. + + + + A coercion from the value type \n {0} \nto the type \n {1} \nwill involve boxing. Consider using 'box' instead + Un forçage de type du type valeur \n {0} \nen type \n {1} \nimplique un boxing. Utilisez 'box' à la place + + + + This type is 'abstract' since some abstract members have not been given an implementation. If this is intentional then add the '[<AbstractClass>]' attribute to your type. + Ce type est 'abstract', car certains membres abstraits n'ont pas reçu d'implémentation. Si cela est intentionnel, ajoutez l'attribut '[<AbstractClass>]' à votre type. + + + + This construct causes code to be less generic than indicated by its type annotations. The type variable implied by the use of a '#', '_' or other type annotation at or near '{0}' has been constrained to be type '{1}'. + Cette construction rend le code moins générique que ne l'indiquaient ses annotations de type. La variable de type impliquée par l'utilisation d'un '#', '_' ou de toute autre annotation de type à l'emplacement ou à proximité de '{0}' a été contrainte de représenter le type '{1}'. + + + + This construct causes code to be less generic than indicated by the type annotations. The unit-of-measure variable '{0} has been constrained to be measure '{1}'. + Cette construction rend le code moins générique que ne l'indiquaient les annotations de type. La variable d'unité de mesure '{0} a été contrainte de représenter la mesure '{1}'. + + + + This construct causes code to be less generic than indicated by the type annotations. The type variable '{0} has been constrained to be type '{1}'. + Cette construction rend le code moins générique que ne l'indiquaient les annotations de type. La variable de type '{0} a été contrainte de représenter le type '{1}'. + + + + identifier + identificateur + + + + integer literal + littéral d'entier + + + + floating point literal + littéral à virgule flottante + + + + decimal literal + littéral décimal + + + + character literal + littéral de caractère + + + + keyword 'base' + mot clé 'base' + + + + symbol '(*)' + symbole '(*)' + + + + symbol '$' + symbole '$' + + + + infix operator + opérateur infixe + + + + infix operator + opérateur infixe + + + + symbol ':>' + symbole ':>' + + + + symbol '::' + symbole '::' + + + + symbol '{0} + symbole '{0} + + + + infix operator + opérateur infixe + + + + infix operator + opérateur infixe + + + + infix operator + opérateur infixe + + + + prefix operator + opérateur préfixé + + + + symbol ':?>' + symbole ':?>' + + + + infix operator + opérateur infixe + + + + infix operator + opérateur infixe + + + + symbol '&' + symbole '&' + + + + symbol '&&' + symbole '&&' + + + + symbol '||' + symbole '||' + + + + symbol '<' + symbole '<' + + + + symbol '>' + symbole '>' + + + + symbol '?' + symbole '?' + + + + symbol '??' + symbole '??' + + + + symbol ':?' + symbole ':?' + + + + integer.. + entier.. + + + + symbol '..' + symbole '..' + + + + quote symbol + symbole de quotation + + + + symbol '*' + symbole '*' + + + + type application + application de type + + + + symbol ':' + symbole ':' + + + + symbol ':=' + symbole ':=' + + + + symbol '<-' + symbole '<-' + + + + symbol '=' + symbole '=' + + + + symbol '>|]' + symbole '>|]' + + + + symbol '-' + symbole '-' + + + + prefix operator + opérateur préfixé + + + + operator name + nom d'opérateur + + + + symbol ',' + symbole ',' + + + + symbol '.' + symbole '.' + + + + symbol '|' + symbole '|' + + + + symbol # + symbole # + + + + symbol '_' + symbole '_' + + + + symbol ';' + symbole ';' + + + + symbol ';;' + symbole ';;' + + + + symbol '(' + symbole '(' + + + + symbol ')' + symbole ')' + + + + symbol 'splice' + symbole 'splice' + + + + start of quotation + début de la quotation + + + + symbol '[' + symbole '[' + + + + symbol '[|' + symbole '[|' + + + + symbol '[<' + symbole '[<' + + + + symbol '{' + symbole '{' + + + + symbol '{<' + symbole '{<' + + + + symbol '|]' + symbole '|]' + + + + symbol '>}' + symbole '>}' + + + + symbol '>]' + symbole '>]' + + + + end of quotation + fin de la quotation + + + + symbol ']' + symbole ']' + + + + symbol '}' + symbole '}' + + + + keyword 'public' + mot clé 'public' + + + + keyword 'private' + mot clé 'private' + + + + keyword 'internal' + mot clé 'internal' + + + + keyword 'fixed' + mot clé 'fixed' + + + + keyword 'constraint' + mot clé 'constraint' + + + + keyword 'instance' + mot clé 'instance' + + + + keyword 'delegate' + mot clé 'delegate' + + + + keyword 'inherit' + mot clé 'inherit' + + + + keyword 'constructor' + mot clé 'constructor' + + + + keyword 'default' + mot clé 'default' + + + + keyword 'override' + mot clé 'override' + + + + keyword 'abstract' + mot clé 'abstract' + + + + keyword 'class' + mot clé 'class' + + + + keyword 'member' + mot clé 'member' + + + + keyword 'static' + mot clé 'static' + + + + keyword 'namespace' + mot clé 'namespace' + + + + start of structured construct + début de la construction structurée + + + + incomplete structured construct at or before this point + construction structurée incomplète à cet emplacement ou avant + + + + Incomplete structured construct at or before this point + Construction structurée incomplète à cet emplacement ou avant + + + + keyword 'then' + mot clé 'then' + + + + keyword 'else' + mot clé 'else' + + + + keyword 'let' or 'use' + mot clé 'let' ou 'use' + + + + binder keyword + mot clé binder + + + + keyword 'do' + mot clé 'do' + + + + keyword 'const' + mot-clé 'const' + + + + keyword 'with' + mot clé 'with' + + + + keyword 'function' + mot clé 'function' + + + + keyword 'fun' + mot clé 'fun' + + + + end of input + entrée terminée + + + + internal dummy token + jeton factice interne + + + + keyword 'do!' + mot clé 'do!' + + + + yield + yield + + + + yield! + yield! + + + + keyword 'interface' + mot clé 'interface' + + + + keyword 'elif' + mot clé 'elif' + + + + symbol '->' + symbole '->' + + + + keyword 'sig' + mot clé 'sig' + + + + keyword 'struct' + mot clé 'struct' + + + + keyword 'upcast' + mot clé 'upcast' + + + + keyword 'downcast' + mot clé 'downcast' + + + + keyword 'null' + mot clé 'null' + + + + reserved keyword + mot clé réservé + + + + keyword 'module' + mot clé 'module' + + + + keyword 'and' + mot clé 'and' + + + + keyword 'as' + mot clé 'as' + + + + keyword 'assert' + mot clé 'assert' + + + + keyword 'asr' + mot clé 'asr' + + + + keyword 'downto' + mot clé 'downto' + + + + keyword 'exception' + mot clé 'exception' + + + + keyword 'false' + mot clé 'false' + + + + keyword 'for' + mot clé 'for' + + + + keyword 'fun' + mot clé 'fun' + + + + keyword 'function' + mot clé 'function' + + + + keyword 'finally' + mot clé 'finally' + + + + keyword 'lazy' + mot clé 'lazy' + + + + keyword 'match' + mot clé 'match' + + + + keyword 'match!' + mot clé 'match!' + + + + keyword 'mutable' + mot clé 'mutable' + + + + keyword 'new' + mot clé 'new' + + + + keyword 'of' + mot clé 'of' + + + + keyword 'open' + mot clé 'open' + + + + keyword 'or' + mot clé 'or' + + + + keyword 'void' + mot clé 'void' + + + + keyword 'extern' + mot clé 'extern' + + + + keyword 'interface' + mot clé 'interface' + + + + keyword 'rec' + mot clé 'rec' + + + + keyword 'to' + mot clé 'to' + + + + keyword 'true' + mot clé 'true' + + + + keyword 'try' + mot clé 'try' + + + + keyword 'type' + mot clé 'type' + + + + keyword 'val' + mot clé 'val' + + + + keyword 'inline' + mot clé 'inline' + + + + keyword 'when' + mot clé 'when' + + + + keyword 'while' + mot clé 'while' + + + + keyword 'with' + mot clé 'with' + + + + keyword 'if' + mot clé 'if' + + + + keyword 'do' + mot clé 'do' + + + + keyword 'global' + mot clé 'global' + + + + keyword 'done' + mot clé 'done' + + + + keyword 'in' + mot clé 'in' + + + + symbol '(' + symbole '(' + + + + symbol'[' + symbole '[' + + + + keyword 'begin' + mot clé 'begin' + + + + keyword 'end' + mot clé 'end' + + + + directive + directive + + + + inactive code + code inactif + + + + lex failure + erreur lex + + + + whitespace + espace blanc + + + + comment + commentaire + + + + line comment + commentaire de ligne + + + + string text + chaîne de texte + + + + compiler generated literal + littéral généré par le compilateur + + + + byte array literal + littéral de tableau d'octets + + + + string literal + littéral de chaîne + + + + end of input + entrée terminée + + + + Unexpected end of input + Fin d'entrée inattendue + + + + Unexpected {0} + {0} inattendu + + + + in interaction + dans l'interaction + + + + in directive + dans la directive + + + + in field declaration + dans la déclaration de champ + + + + in discriminated union case declaration + dans la déclaration de cas d'union discriminé + + + + in binding + dans la liaison + + + + in binding + dans la liaison + + + + in member definition + dans la définition de membre + + + + in definitions + dans les définitions + + + + in member signature + dans la signature de membre + + + + in value signature + dans la signature de valeur + + + + in type signature + dans la signature de type + + + + in lambda expression + dans l'expression lambda + + + + in union case + dans le cas d'union + + + + in extern declaration + dans la déclaration extern + + + + in object expression + dans l'expression d'objet + + + + in if/then/else expression + dans l'expression if/then/else + + + + in open declaration + dans la déclaration open + + + + in module or namespace signature + dans la signature du module ou de l'espace de noms + + + + in pattern matching + dans les critères spéciaux + + + + in begin/end expression + dans l'expression begin/end + + + + in record expression + dans l'expression d'enregistrement + + + + in type definition + dans la définition de type + + + + in exception definition + dans la définition de l'exception + + + + in type name + dans le nom de type + + + + in attribute list + dans la liste d'attributs + + + + in quotation literal + dans le littéral de quotation + + + + in type constraint + dans la contrainte de type + + + + in implementation file + dans le fichier d'implémentation + + + + in definition + dans la définition + + + + in signature file + dans le fichier de signature + + + + in pattern + dans le modèle + + + + in expression + dans l'expression + + + + in type + dans le type + + + + in type arguments + dans les arguments de type + + + + keyword + mot clé + + + + symbol + symbole + + + + (due to indentation-aware syntax) + (en raison de la syntaxe de mise en retrait) + + + + . Expected {0} or other token. + . {0} ou autre jeton attendu. + + + + . Expected {0}, {1} or other token. + . {0}, {1} ou autre jeton attendu. + + + + . Expected {0}, {1}, {2} or other token. + . {0}, {1}, {2} ou autre jeton attendu. + + + + The type '{0}' cannot be used as the source of a type test or runtime coercion + Impossible d'utiliser le type '{0}' en tant que source d'un test de type ou d'un forçage de type au moment de l'exécution + + + + The type '{0}' does not have any proper subtypes and cannot be used as the source of a type test or runtime coercion. + Le type '{0}' n'a pas de sous-types appropriés et ne peut pas être utilisé en tant que source d'un test de type ou d'un forçage de type au moment de l'exécution. + + + + The type '{0}' does not have any proper subtypes and need not be used as the target of a static coercion + Le type '{0}' n'a pas de sous-types appropriés et n'a pas à être utilisé en tant que cible d'un forçage de type statique + + + + This upcast is unnecessary - the types are identical + Ce cast d'un type dérivé en l'une de ses classes de base est inutile - les types sont identiques + + + + This type test or downcast will always hold + Ce test de type ou ce cast d'une classe de base en une classe dérivée contiendra toujours + + + + The member '{0}' does not have the correct type to override any given virtual method + Le membre '{0}' n'a pas le type approprié pour substituer une méthode virtuelle donnée + + + + The member '{0}' does not have the correct type to override the corresponding abstract method. + Le membre '{0}' n'a pas le type approprié pour substituer la méthode abstraite correspondante. + + + + The required signature is '{0}'. + La signature requise est '{0}'. + + + + The member '{0}' is specialized with 'unit' but 'unit' can't be used as return type of an abstract method parameterized on return type. + Le membre '{0}' est spécialisé avec 'unit' mais 'unit' ne peut pas être utilisé en tant que type de retour d'une méthode abstraite paramétrable sur le type de retour. + + + + This constructor is applied to {0} argument(s) but expects {1} + Ce constructeur est appliqué à {0} argument(s) mais en attend {1} + + + + The two sides of this 'or' pattern bind different sets of variables + Les deux faces de ce modèle 'or' lient des ensembles de variables différents + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \n{3}. + Le module '{0}' contient\n {1} \nmais sa signature spécifie\n {2} \n{3}. + + + + Module '{0}' requires a {1} '{2}' + Le module '{0}' requiert un {1} '{2}' + + + + The use of native pointers may result in unverifiable .NET IL code + L'utilisation de pointeurs natifs peut rendre le code IL (Intermediate Language) .NET non vérifiable + + + + {0} + {0} + + + + Thread static and context static 'let' bindings are deprecated. Instead use a declaration of the form 'static val mutable <ident> : <type>' in a class. Add the 'DefaultValue' attribute to this declaration to indicate that the value is initialized to the default value on each new thread. + Les liaisons 'let' statiques de thread et de contexte sont déconseillées. Utilisez plutôt une déclaration sous la forme 'static val mutable <ident> : <type>' dans une classe. Ajoutez l'attribut 'DefaultValue' à cette déclaration pour indiquer que la valeur est initialisée à la valeur par défaut pour chaque nouveau thread. + + + + This expression is a function value, i.e. is missing arguments. Its type is {0}. + Cette expression est une valeur de fonction, c'est-à-dire qu'il lui manque des arguments. Son type est {0}. + + + + The result of this expression has type '{0}' and is implicitly ignored. Consider using 'ignore' to discard this value explicitly, e.g. 'expr |> ignore', or 'let' to bind the result to a name, e.g. 'let result = expr'. + Le résultat de cette expression a le type '{0}' et est implicitement ignoré. Utilisez 'ignore' pour abandonner cette valeur de manière explicite, par exemple 'expr |> ignore', ou 'let' pour lier le résultat à un nom, par exemple 'let result = expr'. + + + + The result of this equality expression has type '{0}' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. + Le résultat de cette expression d'égalité a le type '{0}' et est implicitement abandonné. Utilisez 'let' pour lier le résultat à un nom, par exemple 'let result = expression'. + + + + The result of this equality expression has type '{0}' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to set a value to a property, then use the '<-' operator e.g. '{1}.{2} <- expression'. + Le résultat de cette expression d'égalité a le type '{0}' et est implicitement abandonné. Utilisez 'let' pour lier le résultat à un nom, par exemple 'let result = expression'. Si vous avez l'intention de définir une valeur pour une propriété, utilisez l'opérateur '<-'. Exemple : '{1}.{2} <- expression'. + + + + The result of this equality expression has type '{0}' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to mutate a value, then mark the value 'mutable' and use the '<-' operator e.g. '{1} <- expression'. + Le résultat de cette expression d'égalité a le type '{0}' et est implicitement abandonné. Utilisez 'let' pour lier le résultat à un nom, par exemple 'let result = expression'. Si vous avez l'intention de muter une valeur, marquez cette valeur à l'aide de 'mutable' et utilisez l'opérateur '<-'. Exemple : '{1} <- expression'. + + + + The result of this equality expression has type '{0}' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to mutate a value, then use the '<-' operator e.g. '{1} <- expression'. + Le résultat de cette expression d'égalité a le type '{0}' et est implicitement abandonné. Utilisez 'let' pour lier le résultat à un nom, par exemple 'let result = expression'. Si vous avez l'intention de muter une valeur, utilisez l'opérateur '<-'. Exemple : '{1} <- expression'. + + + + This recursive use will be checked for initialization-soundness at runtime. This warning is usually harmless, and may be suppressed by using '#nowarn "21"' or '--nowarn:21'. + Cette utilisation récursive sera soumise à un contrôle de l'initialisation au moment de l'exécution. En règle générale, cet avertissement est sans danger et peut être supprimé à l'aide de '#nowarn "21"' ou '--nowarn:21'. + + + + The value '{0}' will be evaluated as part of its own definition + La valeur '{0}' sera évaluée dans le cadre de sa propre définition + + + + This value will be eventually evaluated as part of its own definition. You may need to make the value lazy or a function. Value '{0}'{1}. + Cette valeur sera finalement évaluée dans le cadre de sa propre définition. Vous pouvez en faire une valeur tardive ou une fonction. Valeur '{0}'{1}. + + + + will evaluate '{0}' + va prendre la valeur '{0}' + + + + Bindings may be executed out-of-order because of this forward reference. + Des liaisons peuvent être exécutées dans le désordre en raison de cette référence anticipée. + + + + This and other recursive references to the object(s) being defined will be checked for initialization-soundness at runtime through the use of a delayed reference. This is because you are defining one or more recursive objects, rather than recursive functions. This warning may be suppressed by using '#nowarn "40"' or '--nowarn:40'. + Toutes les références récursives aux objets définis seront soumises à un contrôle de l'initialisation au moment de l'exécution via l'utilisation d'une référence différée. En effet, vous définissez un ou plusieurs objets récursifs à la place de fonctions récursives. Cet avertissement peut être supprimé à l'aide de '#nowarn "40"' ou '--nowarn:40'. + + + + Recursive references to the object being defined will be checked for initialization soundness at runtime through the use of a delayed reference. Consider placing self-references in members or within a trailing expression of the form '<ctor-expr> then <expr>'. + Les références récursives à l'objet défini seront soumises à un contrôle de l'initialisation au moment de l'exécution via l'utilisation d'une référence différée. Placez des auto-références dans les membres ou dans une expression de fin sous la forme '<ctor-expr> then <expr>'. + + + + Recursive references to the object being defined will be checked for initialization soundness at runtime through the use of a delayed reference. Consider placing self-references within 'do' statements after the last 'let' binding in the construction sequence. + Les références récursives à l'objet défini seront soumises à un contrôle de l'initialisation au moment de l'exécution via l'utilisation d'une référence différée. Placez des auto-références dans les instructions 'do' après la dernière liaison 'let' de la séquence de construction. + + + + The containing type can use 'null' as a representation value for its nullary union case. Invoking an abstract or virtual member or an interface implementation on a null value will lead to an exception. If necessary add a dummy data value to the nullary constructor to avoid 'null' being used as a representation for this type. + Le type conteneur peut utiliser 'null' en tant que valeur de représentation pour son cas d'union nullaire. L'appel d'un membre abstrait ou virtuel, ou d'une implémentation d'interface, sur une valeur null entraîne la levée d'une exception. Si nécessaire, ajoutez une valeur de données factice au constructeur nullaire pour éviter d'utiliser 'null' en tant que représentation pour ce type. + + + + The containing type can use 'null' as a representation value for its nullary union case. This member will be compiled as a static member. + Le type conteneur peut utiliser 'null' en tant que valeur de représentation pour son cas d'union nullaire. Ce membre sera compilé en tant que membre statique. + + + + The member '{0}' doesn't correspond to a unique abstract slot based on name and argument count alone + Le membre '{0}' ne correspond pas à un emplacement abstrait unique basé seulement sur le nom et le nombre d'arguments + + + + . Multiple implemented interfaces have a member with this name and argument count + . Plusieurs interfaces implémentées ont un membre portant ce nom et ayant ce nombre d'arguments + + + + . Consider implementing interfaces '{0}' and '{1}' explicitly. + . Implémentez explicitement les interfaces '{0}' et '{1}'. + + + + . Additional type annotations may be required to indicate the relevant override. This warning can be disabled using '#nowarn "70"' or '--nowarn:70'. + . Des annotations de type supplémentaires peuvent être requises pour indiquer la substitution appropriée. Cet avertissement peut être désactivé à l'aide de '#nowarn "70"' ou '--nowarn:70'. + + + + parse error + erreur d'analyse + + + + parse error: unexpected end of file + erreur d'analyse : fin de fichier inattendue + + + + {0} + {0} + + + + internal error: {0} + erreur interne : {0} + + + + {0} + {0} + + + + Incomplete pattern matches on this expression. + Critères spéciaux incomplets dans cette expression. + + + + For example, the value '{0}' may indicate a case not covered by the pattern(s). + Par exemple, la valeur '{0}' peut indiquer un cas non traité par le ou les modèles. + + + + For example, the value '{0}' may indicate a case not covered by the pattern(s). However, a pattern rule with a 'when' clause might successfully match this value. + Par exemple, la valeur '{0}' peut indiquer un cas non traité par le ou les modèles. Toutefois, une règle de modèle avec une clause 'when' peut correspondre à cette valeur. + + + + Unmatched elements will be ignored. + Les éléments non appariés seront ignorés. + + + + Enums may take values outside known cases. + Les enums peuvent accepter des valeurs en dehors des cas connus. + + + + This rule will never be matched + Cette règle n'aura aucune correspondance + + + + This value is not mutable. Consider using the mutable keyword, e.g. 'let mutable {0} = expression'. + Cette valeur n'est pas mutable. Utilisez le mot clé mutable, par exemple, 'let mutable {0} = expression'. + + + + This value is not local + Cette valeur n'est pas locale + + + + This construct is deprecated + Cette construction est déconseillée + + + + . {0} + . {0} + + + + {0}. This warning can be disabled using '--nowarn:57' or '#nowarn "57"'. + {0}. Cet avertissement peut être désactivé à l'aide de '--nowarn:57' ou '#nowarn "57"'. + + + + Uses of this construct may result in the generation of unverifiable .NET IL code. This warning can be disabled using '--nowarn:9' or '#nowarn "9"'. + Les utilisations de cette construction peuvent entraîner la génération de code IL (Intermediate Language) .NET non vérifiable. Cet avertissement peut être désactivé à l'aide de '--nowarn:9' ou '#nowarn "9"'. + + + + This construct is deprecated: {0} + Cette construction est déconseillée : {0} + + + + This construct is deprecated: it is only for use in the F# library + Cette construction est déconseillée : elle ne doit être utilisée que dans la bibliothèque F# + + + + The following fields require values: {0} + Les champs suivants requièrent des valeurs : {0} + + + + Value restriction. The value '{0}' has generic type\n {1} \nEither make the arguments to '{2}' explicit or, if you do not intend for it to be generic, add a type annotation. + Restriction de valeur. La valeur '{0}' a le type générique\n {1} \nRendez les arguments de '{2}' explicites ou, si votre but n'est pas d'utiliser un type générique, ajoutez une annotation de type. + + + + Value restriction. The value '{0}' has generic type\n {1} \nEither make '{2}' into a function with explicit arguments or, if you do not intend for it to be generic, add a type annotation. + Restriction de valeur. La valeur '{0}' a le type générique\n {1} \nChangez '{2}' en fonction avec des arguments explicites ou, si votre but n'est pas d'utiliser un type générique, ajoutez une annotation de type. + + + + Value restriction. This member has been inferred to have generic type\n {0} \nConstructors and property getters/setters cannot be more generic than the enclosing type. Add a type annotation to indicate the exact types involved. + Restriction de valeur. Il a été déduit que ce membre avait un type générique\n {0} \nLes constructeurs, ainsi que les méthodes getter/setter d'une propriété ne peuvent pas être plus génériques que le type englobant. Ajoutez une annotation de type pour indiquer les types exacts impliqués. + + + + Value restriction. The value '{0}' has been inferred to have generic type\n {1} \nEither make the arguments to '{2}' explicit or, if you do not intend for it to be generic, add a type annotation. + Restriction de valeur. Il a été déduit que la valeur '{0}' avait le type générique\n {1} \nRendez les arguments de '{2}' explicites ou, si votre but n'est pas d'utiliser un type générique, ajoutez une annotation de type. + + + + Value restriction. The value '{0}' has been inferred to have generic type\n {1} \nEither define '{2}' as a simple data term, make it a function with explicit arguments or, if you do not intend for it to be generic, add a type annotation. + Restriction de valeur. Il a été déduit que la valeur '{0}' avait le type générique\n {1} \nDéfinissez '{2}' en tant que terme de données simple, faites-en une fonction avec des arguments explicites ou, si votre but n'est pas d'utiliser un type générique, ajoutez une annotation de type. + + + + syntax error + erreur de syntaxe + + + + {0} + {0} + + + + {0} + {0} + + + + Override implementations in augmentations are now deprecated. Override implementations should be given as part of the initial declaration of a type. + Les implémentations de substitution dans les augmentations sont désormais déconseillées. Les implémentations de substitution doivent être fournies dans le cadre de la déclaration initiale d'un type. + + + + Override implementations should be given as part of the initial declaration of a type. + Les implémentations de substitution doivent être fournies dans le cadre de la déclaration initiale d'un type. + + + + Interface implementations in augmentations are now deprecated. Interface implementations should be given on the initial declaration of a type. + Les implémentations d'interfaces dans les augmentations sont désormais déconseillées. Les implémentations d'interfaces doivent être fournies dans la déclaration initiale d'un type. + + + + Interface implementations should be given on the initial declaration of a type. + Les implémentations d'interfaces doivent être fournies dans la déclaration initiale d'un type. + + + + A required assembly reference is missing. You must add a reference to assembly '{0}'. + Une référence d'assembly requise est manquante. Vous devez ajouter une référence à l'assembly '{0}'. + + + + The type referenced through '{0}' is defined in an assembly that is not referenced. You must add a reference to assembly '{1}'. + Le type référencé via '{0}' est défini dans un assembly qui n'est pas référencé. Vous devez ajouter une référence à l'assembly '{1}'. + + + + #I directives may only occur in F# script files (extensions .fsx or .fsscript). Either move this code to a script file, add a '-I' compiler option for this reference or delimit the directive with delimit it with '#if INTERACTIVE'/'#endif'. + Les directives #I ne peuvent être présentes que dans les fichiers de script F# (extensions .fsx ou .fsscript). Déplacez ce code vers un fichier de script, ajoutez une option de compilateur '-I' pour cette référence ou délimitez la directive par '#if INTERACTIVE'/'#endif'. + + + + #r directives may only occur in F# script files (extensions .fsx or .fsscript). Either move this code to a script file or replace this reference with the '-r' compiler option. If this directive is being executed as user input, you may delimit it with '#if INTERACTIVE'/'#endif'. + Les directives #r ne peuvent être présentes que dans les fichiers de script F# (extensions .fsx ou .fsscript). Déplacez ce code vers un fichier de script ou remplacez cette référence par l'option de compilateur '-r'. Si cette directive est exécutée en tant qu'entrée d'utilisateur, vous pouvez la délimiter avec '#if INTERACTIVE'/'#endif'. + + + + This directive may only be used in F# script files (extensions .fsx or .fsscript). Either remove the directive, move this code to a script file or delimit the directive with '#if INTERACTIVE'/'#endif'. + Cette directive ne peut être utilisée que dans les fichiers de script F# (extensions .fsx ou .fsscript). Supprimez la directive, déplacez ce code vers un fichier de script ou délimitez la directive par '#if INTERACTIVE'/'#endif'. + + + + Unable to find the file '{0}' in any of\n {1} + Impossible de trouver le fichier '{0}' dans\n {1} + + + + Assembly reference '{0}' was not found or is invalid + La référence d'assembly '{0}' est introuvable ou non valide + + + + One or more warnings in loaded file.\n + Un ou plusieurs avertissements dans le fichier chargé.\n + + + + One or more errors in loaded file.\n + Une ou plusieurs erreurs dans le fichier chargé.\n + + + + Loaded files may only be F# source files (extension .fs). This F# script file (.fsx or .fsscript) will be treated as an F# source file + Les fichiers chargés ne peuvent être que des fichiers sources F# (extension .fs). Ce fichier de script F# (.fsx ou .fsscript) sera traité en tant que fichier source F# + + + + Invalid assembly name '{0}' from InternalsVisibleTo attribute in {1} + Nom d'assembly non valide '{0}' de l'attribut InternalsVisibleTo dans {1} + + + + Invalid assembly name '{0}' from InternalsVisibleTo attribute (assembly filename not available) + Nom d'assembly non valide '{0}' de l'attribut InternalsVisibleTo (nom de fichier d'assembly non disponible) + + + + Could not load file '{0}' because it does not exist or is inaccessible + Impossible de charger le fichier '{0}', car il n'existe pas ou n'est pas accessible + + + + {0} (Code={1}) + {0} (Code={1}) + + + + internal error: {0} + erreur interne : {0} + + + + + \ No newline at end of file diff --git a/src/fsharp/xlf/FSStrings.it.xlf b/src/fsharp/xlf/FSStrings.it.xlf new file mode 100644 index 00000000000..b8a0c2aa385 --- /dev/null +++ b/src/fsharp/xlf/FSStrings.it.xlf @@ -0,0 +1,1622 @@ + + + + + + . See also {0}. + . Vedere anche {0}. + + + + The tuples have differing lengths of {0} and {1} + Le tuple sono di lunghezza diversa, ovvero {0} e {1} + + + + The types '{0}' and '{1}' cannot be unified. + Non è possibile unificare i tipi '{0}' e '{1}'. + + + + A type parameter is missing a constraint '{0}' + Vincolo '{0}' mancante in un parametro di tipo + + + + The unit of measure '{0}' does not match the unit of measure '{1}' + L'unità di misura '{0}' non corrisponde all'unità di misura '{1}' + + + + The type '{0}' does not match the type '{1}' + Il tipo '{0}' non corrisponde al tipo '{1}' + + + + The type '{0}' is not compatible with the type '{1}'{2} + Il tipo '{0}' non è compatibile con il tipo '{1}'{2} + + + + This expression was expected to have type\n '{1}' \nbut here has type\n '{0}' {2} + Il tipo previsto di questa espressione è\n '{1}' \nma quello effettivo è\n '{0}' {2} + + + + Type mismatch. Expecting a\n '{0}' \nbut given a\n '{1}' {2}\n + Tipo non corrispondente. Il tipo previsto è\n '{0}' \nma quello specificato è\n '{1}' {2}\n + + + + Type constraint mismatch when applying the default type '{0}' for a type inference variable. + Vincolo di tipo non corrispondente all'applicazione del tipo predefinito '{0}' per una variabile di inferenza del tipo. + + + + Consider adding further type constraints + Provare ad aggiungere ulteriori vincoli di tipo + + + + Type constraint mismatch. The type \n '{0}' \nis not compatible with type\n '{1}' {2}\n + Vincolo di tipo non corrispondente. Il tipo \n '{0}' \nnon è compatibile con il tipo\n '{1}' {2}\n + + + + Uppercase variable identifiers should not generally be used in patterns, and may indicate a misspelt pattern name. + In genere non è consigliabile usare identificatori di variabili in lettere maiuscole nei criteri perché potrebbero indicare un nome di criterio con ortografia errata. + + + + Discriminated union cases and exception labels must be uppercase identifiers + I case di unione discriminati e le etichette di eccezioni devono essere identificatori in lettere maiuscole + + + + Possible overload: '{0}'. {1}. + Possibile overload: '{0}'. {1}. + + + + \n\nPossible best overload: '{0}'. + \n\nPossibile overload migliore: '{0}'. + + + + This function takes too many arguments, or is used in a context where a function is not expected + Questa funzione utilizza troppi argomenti oppure è utilizzata in un contesto in cui non è prevista una funzione + + + + Member constraints with the name '{0}' are given special status by the F# compiler as certain .NET types are implicitly augmented with this member. This may result in runtime failures if you attempt to invoke the member constraint from your own code. + Ai vincoli di membro con nome '{0}' è assegnato uno stato speciale dal compilatore F# perché determinati tipi .NET sono aumentati in modo implicito con il membro. Ciò potrebbe causare errori di runtime se si prova a richiamare il vincolo del membro dal codice. + + + + A definition to be compiled as a .NET event does not have the expected form. Only property members can be compiled as .NET events. + Una definizione da compilare come evento .NET non è nel formato previsto. È possibile compilare come eventi .NET solo membri di proprietà. + + + + Implicit object constructors for structs must take at least one argument + I costruttori di oggetto impliciti per gli struct devono utilizzare almeno un argomento + + + + The type implements the interface '{0}' but this is not revealed by the signature. You should list the interface in the signature, as the interface will be discoverable via dynamic type casts and/or reflection. + Il tipo implementa l'interfaccia '{0}', ma questo non è indicato dalla firma. È necessario elencare l'interfaccia nella firma, perché sarà individuabile tramite cast e/o reflection di tipi dinamici. + + + + The type '{0}' expects {1} type argument(s) but is given {2} + Il tipo '{0}' prevede {1} argomento/i tipo, tuttavia il numero di argomenti tipo specificati è pari a {2} + + + + Lookup on object of indeterminate type based on information prior to this program point. A type annotation may be needed prior to this program point to constrain the type of the object. This may allow the lookup to be resolved. + Ricerca in un oggetto di tipo non determinato basato su informazioni che si trovano prima di questo punto del programma. Potrebbe essere necessaria un'annotazione di tipo prima di questo punto del programma per vincolare il tipo dell'oggetto. Questa modifica potrebbe consentire la risoluzione della ricerca. + + + + Duplicate definition of {0} '{1}' + Definizione duplicata di {0} '{1}' + + + + The {0} '{1}' can not be defined because the name '{2}' clashes with the {3} '{4}' in this type or module + Non è possibile definire {0} '{1}' perché il nome '{2}' è in conflitto con {3} '{4}' in questo tipo o modulo + + + + Two members called '{0}' have the same signature + Due membri denominati '{0}' hanno la stessa firma + + + + Duplicate definition of {0} '{1}' + Definizione duplicata di {0} '{1}' + + + + A construct with this name was found in FSharp.PowerPack.dll, which contains some modules and types that were implicitly referenced in some previous versions of F#. You may need to add an explicit reference to this DLL in order to compile this code. + Trovato costrutto con questo nome in FSharp.PowerPack.dll, contenente alcuni moduli e tipi a cui viene fatto riferimento implicito in alcune versioni precedenti di F#. Potrebbe essere necessario aggiungere un riferimento esplicito a questa DLL per compilare il codice. + + + + This field is not mutable + Questo campo non è modificabile + + + + The fields '{0}' and '{1}' are from different types + I campi '{0}' e '{1}' sono di tipi diversi + + + + '{0}' is bound twice in this pattern + '{0}' è associato due volte in questo criterio + + + + A use of the function '{0}' does not match a type inferred elsewhere. The inferred type of the function is\n {1}. \nThe type of the function required at this point of use is\n {2} {3}\nThis error may be due to limitations associated with generic recursion within a 'let rec' collection or within a group of classes. Consider giving a full type signature for the targets of recursive calls including type annotations for both argument and return types. + Un utilizzo della funzione '{0}' non corrisponde a un tipo dedotto in un'altra posizione. Il tipo dedotto della funzione è\n {1}. \nIl tipo della funzione richiesto in questo punto dell'utilizzo è\n {2} {3}\nQuesto errore potrebbe essere dovuto a limitazioni associate alla ricorsione generica in una raccolta 'let rec' o in un gruppo di classi. Provare a specificare una firma di tipo completa per le destinazioni delle chiamate ricorsive con annotazioni di tipo per i tipi restituiti e di argomento. + + + + Invalid runtime coercion or type test from type {0} to {1}\n{2} + Test di tipo o coercizione di runtime non valido del tipo {0} in {1}\n{2} + + + + This runtime coercion or type test from type\n {0} \n to \n {1} \ninvolves an indeterminate type based on information prior to this program point. Runtime type tests are not allowed on some types. Further type annotations are needed. + Questo test di tipo o coercizione di runtime del tipo \n {0} \n in \n {1} \nprevede un tipo non determinato basato su informazioni che si trovano prima di questo punto del programma. I test dei tipi di runtime non sono consentiti per alcuni tipi. Sono necessarie ulteriori annotazioni di tipo. + + + + The static coercion from type\n {0} \nto \n {1} \n involves an indeterminate type based on information prior to this program point. Static coercions are not allowed on some types. Further type annotations are needed. + Questa coercizione statica del tipo\n {0} \nin \n {1} \n prevede un tipo non determinato basato su informazioni che si trovano prima di questo punto del programma. Le coercizioni statiche non sono consentite per alcuni tipi. Sono necessarie ulteriori annotazioni di tipo. + + + + A coercion from the value type \n {0} \nto the type \n {1} \nwill involve boxing. Consider using 'box' instead + Una coercizione dal tipo di valore \n {0} \nal tipo \n {1} \nimplica una conversione boxing. Provare a utilizzare invece 'box' + + + + This type is 'abstract' since some abstract members have not been given an implementation. If this is intentional then add the '[<AbstractClass>]' attribute to your type. + Questo tipo è 'abstract' perché non è stata specificata un'implementazione per alcuni membri astratti. Se questa scelta è intenzionale, aggiungere l'attributo '[<AbstractClass>]' al tipo. + + + + This construct causes code to be less generic than indicated by its type annotations. The type variable implied by the use of a '#', '_' or other type annotation at or near '{0}' has been constrained to be type '{1}'. + Questo costrutto rende il codice meno generico di quanto indicato dalle relative annotazioni di tipo. La variabile di tipo prevista in base all'uso di un'annotazione di tipo '#', '_' o altra in corrispondenza o in prossimità di '{0}' è stata vincolata in modo da essere di tipo '{1}'. + + + + This construct causes code to be less generic than indicated by the type annotations. The unit-of-measure variable '{0} has been constrained to be measure '{1}'. + Questo costrutto rende il codice meno generico di quanto indicato dalle annotazioni di tipo. La variabile di unità di misura '{0} è stata vincolata in modo da essere la misura '{1}'. + + + + This construct causes code to be less generic than indicated by the type annotations. The type variable '{0} has been constrained to be type '{1}'. + Questo costrutto rende il codice meno generico di quanto indicato dalle annotazioni di tipo. La variabile di tipo '{0} è stata vincolata in modo da essere il tipo '{1}'. + + + + identifier + identificatore + + + + integer literal + valore letterale Integer + + + + floating point literal + valore letterale a virgola mobile + + + + decimal literal + valore letterale decimale + + + + character literal + valore letterale carattere + + + + keyword 'base' + parola chiave 'base' + + + + symbol '(*)' + simbolo '(*)' + + + + symbol '$' + simbolo '$' + + + + infix operator + operatore infisso + + + + infix operator + operatore infisso + + + + symbol ':>' + simbolo ':>' + + + + symbol '::' + simbolo '::' + + + + symbol '{0} + simbolo '{0} + + + + infix operator + operatore infisso + + + + infix operator + operatore infisso + + + + infix operator + operatore infisso + + + + prefix operator + operatore prefisso + + + + symbol ':?>' + simbolo ':?>' + + + + infix operator + operatore infisso + + + + infix operator + operatore infisso + + + + symbol '&' + simbolo '&' + + + + symbol '&&' + simbolo '&&' + + + + symbol '||' + simbolo '||' + + + + symbol '<' + simbolo '<' + + + + symbol '>' + simbolo '>' + + + + symbol '?' + simbolo '?' + + + + symbol '??' + simbolo '??' + + + + symbol ':?' + simbolo ':?' + + + + integer.. + Integer.. + + + + symbol '..' + simbolo '..' + + + + quote symbol + simbolo di quotation + + + + symbol '*' + simbolo '*' + + + + type application + applicazione tipo + + + + symbol ':' + simbolo ':' + + + + symbol ':=' + simbolo ':=' + + + + symbol '<-' + simbolo '<-' + + + + symbol '=' + simbolo '=' + + + + symbol '>|]' + simbolo '>|]' + + + + symbol '-' + simbolo '-' + + + + prefix operator + operatore prefisso + + + + operator name + nome operatore + + + + symbol ',' + simbolo ',' + + + + symbol '.' + simbolo '.' + + + + symbol '|' + simbolo '|' + + + + symbol # + simbolo # + + + + symbol '_' + simbolo '_' + + + + symbol ';' + simbolo ';' + + + + symbol ';;' + simbolo ';;' + + + + symbol '(' + simbolo '(' + + + + symbol ')' + simbolo ')' + + + + symbol 'splice' + simbolo 'splice' + + + + start of quotation + inizio quotation + + + + symbol '[' + simbolo '[' + + + + symbol '[|' + simbolo '[|' + + + + symbol '[<' + simbolo '[<' + + + + symbol '{' + simbolo '{' + + + + symbol '{<' + simbolo '{<' + + + + symbol '|]' + simbolo '|]' + + + + symbol '>}' + simbolo '>}' + + + + symbol '>]' + simbolo '>]' + + + + end of quotation + fine quotation + + + + symbol ']' + simbolo ']' + + + + symbol '}' + simbolo '}' + + + + keyword 'public' + parola chiave 'public' + + + + keyword 'private' + parola chiave 'private' + + + + keyword 'internal' + parola chiave 'internal' + + + + keyword 'fixed' + parola chiave 'fixed' + + + + keyword 'constraint' + parola chiave 'constraint' + + + + keyword 'instance' + parola chiave 'instance' + + + + keyword 'delegate' + parola chiave 'delegate' + + + + keyword 'inherit' + parola chiave 'inherit' + + + + keyword 'constructor' + parola chiave 'constructor' + + + + keyword 'default' + parola chiave 'default' + + + + keyword 'override' + parola chiave 'override' + + + + keyword 'abstract' + parola chiave 'abstract' + + + + keyword 'class' + parola chiave 'class' + + + + keyword 'member' + parola chiave 'member' + + + + keyword 'static' + parola chiave 'static' + + + + keyword 'namespace' + parola chiave 'namespace' + + + + start of structured construct + inizio costrutto strutturato + + + + incomplete structured construct at or before this point + costrutto strutturato incompleto in questo punto o prima di esso + + + + Incomplete structured construct at or before this point + Costrutto strutturato incompleto in questo punto o prima di esso + + + + keyword 'then' + parola chiave 'then' + + + + keyword 'else' + parola chiave 'else' + + + + keyword 'let' or 'use' + parola chiave 'let' o 'use' + + + + binder keyword + parola chiave binder + + + + keyword 'do' + parola chiave 'do' + + + + keyword 'const' + parola chiave 'const' + + + + keyword 'with' + parola chiave 'with' + + + + keyword 'function' + parola chiave 'function' + + + + keyword 'fun' + parola chiave 'fun' + + + + end of input + fine input + + + + internal dummy token + token fittizio interno + + + + keyword 'do!' + parola chiave 'do!' + + + + yield + yield + + + + yield! + yield! + + + + keyword 'interface' + parola chiave 'interface' + + + + keyword 'elif' + parola chiave 'elif' + + + + symbol '->' + simbolo '->' + + + + keyword 'sig' + parola chiave 'sig' + + + + keyword 'struct' + parola chiave 'struct' + + + + keyword 'upcast' + parola chiave 'upcast' + + + + keyword 'downcast' + parola chiave 'downcast' + + + + keyword 'null' + parola chiave 'null' + + + + reserved keyword + parola chiave riservata + + + + keyword 'module' + parola chiave 'module' + + + + keyword 'and' + parola chiave 'and' + + + + keyword 'as' + parola chiave 'as' + + + + keyword 'assert' + parola chiave 'assert' + + + + keyword 'asr' + parola chiave 'asr' + + + + keyword 'downto' + parola chiave 'downto' + + + + keyword 'exception' + parola chiave 'exception' + + + + keyword 'false' + parola chiave 'false' + + + + keyword 'for' + parola chiave 'for' + + + + keyword 'fun' + parola chiave 'fun' + + + + keyword 'function' + parola chiave 'function' + + + + keyword 'finally' + parola chiave 'finally' + + + + keyword 'lazy' + parola chiave 'lazy' + + + + keyword 'match' + parola chiave 'match' + + + + keyword 'match!' + parola chiave 'match!' + + + + keyword 'mutable' + parola chiave 'mutable' + + + + keyword 'new' + parola chiave 'new' + + + + keyword 'of' + parola chiave 'of' + + + + keyword 'open' + parola chiave 'open' + + + + keyword 'or' + parola chiave 'or' + + + + keyword 'void' + parola chiave 'void' + + + + keyword 'extern' + parola chiave 'extern' + + + + keyword 'interface' + parola chiave 'interface' + + + + keyword 'rec' + parola chiave 'rec' + + + + keyword 'to' + parola chiave 'to' + + + + keyword 'true' + parola chiave 'true' + + + + keyword 'try' + parola chiave 'try' + + + + keyword 'type' + parola chiave 'type' + + + + keyword 'val' + parola chiave 'val' + + + + keyword 'inline' + parola chiave 'inline' + + + + keyword 'when' + parola chiave 'when' + + + + keyword 'while' + parola chiave 'while' + + + + keyword 'with' + parola chiave 'with' + + + + keyword 'if' + parola chiave 'if' + + + + keyword 'do' + parola chiave 'do' + + + + keyword 'global' + parola chiave 'global' + + + + keyword 'done' + parola chiave 'done' + + + + keyword 'in' + parola chiave 'in' + + + + symbol '(' + simbolo '(' + + + + symbol'[' + simbolo '[' + + + + keyword 'begin' + parola chiave 'begin' + + + + keyword 'end' + parola chiave 'end' + + + + directive + direttiva + + + + inactive code + codice inattivo + + + + lex failure + errore lex + + + + whitespace + spazio vuoto + + + + comment + commento + + + + line comment + commento riga + + + + string text + testo stringa + + + + compiler generated literal + valore letterale generato dal compilatore + + + + byte array literal + valore letterale della matrice di byte + + + + string literal + valore letterale stringa + + + + end of input + fine input + + + + Unexpected end of input + Fine di input non prevista + + + + Unexpected {0} + {0} imprevisto/a + + + + in interaction + durante l'interazione + + + + in directive + in una direttiva + + + + in field declaration + in una dichiarazione di campo + + + + in discriminated union case declaration + in una dichiarazione di case di unione discriminato + + + + in binding + nel binding + + + + in binding + nel binding + + + + in member definition + in una definizione di membro + + + + in definitions + in definizioni + + + + in member signature + in una firma di membro + + + + in value signature + in una firma di valore + + + + in type signature + in una firma di tipo + + + + in lambda expression + in un'espressione lambda + + + + in union case + in un case di unione + + + + in extern declaration + in una dichiarazione extern + + + + in object expression + in un'espressione dell'oggetto + + + + in if/then/else expression + in un'espressione if/then/else + + + + in open declaration + in una dichiarazione aperta + + + + in module or namespace signature + in una firma di modulo o spazio dei nomi + + + + in pattern matching + in criteri di ricerca + + + + in begin/end expression + in un'espressione iniziale/finale + + + + in record expression + in un'espressione di record + + + + in type definition + in una definizione di tipo + + + + in exception definition + in una definizione di eccezione + + + + in type name + in un nome di tipo + + + + in attribute list + in un elenco di attributi + + + + in quotation literal + in valori letterali di quotation + + + + in type constraint + in un vincolo di tipo + + + + in implementation file + in un file di implementazione + + + + in definition + in una definizione + + + + in signature file + in un file di firma + + + + in pattern + in un criterio + + + + in expression + in un'espressione + + + + in type + in un tipo + + + + in type arguments + in argomenti tipo + + + + keyword + parola chiave + + + + symbol + simbolo + + + + (due to indentation-aware syntax) + (a causa di sintassi dipendente dal rientro) + + + + . Expected {0} or other token. + . Previsto {0} o altro token. + + + + . Expected {0}, {1} or other token. + . Previsto {0}, {1} o altro token. + + + + . Expected {0}, {1}, {2} or other token. + . Previsto {0}, {1}, {2} o altro token. + + + + The type '{0}' cannot be used as the source of a type test or runtime coercion + Non è possibile usare il tipo '{0}' come origine di un test del tipo o di una coercizione di runtime + + + + The type '{0}' does not have any proper subtypes and cannot be used as the source of a type test or runtime coercion. + Il tipo '{0}' non dispone di alcun sottotipo appropriato e non può essere utilizzato come origine di un test del tipo o di coercizione di runtime. + + + + The type '{0}' does not have any proper subtypes and need not be used as the target of a static coercion + Il tipo '{0}' non dispone di alcun sottotipo appropriato e non deve essere utilizzato come destinazione di una coercizione statica + + + + This upcast is unnecessary - the types are identical + Upcast non necessario: i tipi sono identici + + + + This type test or downcast will always hold + Questo downcast o test di tipo sarà sempre sospeso + + + + The member '{0}' does not have the correct type to override any given virtual method + Il membro '{0}' non dispone del tipo corretto per eseguire l'override di eventuali metodi virtuali specificati + + + + The member '{0}' does not have the correct type to override the corresponding abstract method. + Il membro '{0}' non dispone del tipo corretto per eseguire l'override del metodo astratto corrispondente. + + + + The required signature is '{0}'. + La firma necessaria è '{0}'. + + + + The member '{0}' is specialized with 'unit' but 'unit' can't be used as return type of an abstract method parameterized on return type. + Il membro '{0}' è specializzato con 'unit' ma non è possibile usare 'unit' come tipo restituito di un metodo astratto con parametri basati sul tipo restituito. + + + + This constructor is applied to {0} argument(s) but expects {1} + Questo costruttore è applicato a {0} argomento/i, tuttavia il numero di argomenti previsto è pari a {1} + + + + The two sides of this 'or' pattern bind different sets of variables + I due lati di questo criterio 'or' consentono di eseguire il binding di set di variabili diversi + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \n{3}. + Il modulo '{0}' contiene\n {1} \ntuttavia la relativa firma specifica\n {2} \n{3}. + + + + Module '{0}' requires a {1} '{2}' + Il modulo '{0}' richiede {1} '{2}' + + + + The use of native pointers may result in unverifiable .NET IL code + L'utilizzo di puntatori nativi potrebbe rendere il codice IL .NET non verificabile + + + + {0} + {0} + + + + Thread static and context static 'let' bindings are deprecated. Instead use a declaration of the form 'static val mutable <ident> : <type>' in a class. Add the 'DefaultValue' attribute to this declaration to indicate that the value is initialized to the default value on each new thread. + I binding 'let' statici a livello di thread e a livello di contesto sono deprecati. Usare invece una dichiarazione nel formato 'static val mutable <ident> : <type>' in una classe. Aggiungere l'attributo 'DefaultValue' alla dichiarazione per indicare che il valore deve essere inizializzato con il valore predefinito in ogni nuovo thread. + + + + This expression is a function value, i.e. is missing arguments. Its type is {0}. + Questa espressione è un valore di funzione, ovvero sono assenti argomenti. Il relativo tipo è {0}. + + + + The result of this expression has type '{0}' and is implicitly ignored. Consider using 'ignore' to discard this value explicitly, e.g. 'expr |> ignore', or 'let' to bind the result to a name, e.g. 'let result = expr'. + Il risultato di questa espressione è di tipo '{0}' e viene ignorato in modo implicito. Provare a usare 'ignore' per rimuovere esplicitamente questo valore, ad esempio 'expr |> ignore', oppure 'let' per eseguire il binding del risultato a un nome, ad esempio 'let result = expr'. + + + + The result of this equality expression has type '{0}' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. + Il risultato di questa espressione di uguaglianza è di tipo '{0}' e viene rimosso in modo implicito. Provare a usare 'let' per eseguire il binding del risultato a un nome, ad esempio 'let result = espressione'. + + + + The result of this equality expression has type '{0}' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to set a value to a property, then use the '<-' operator e.g. '{1}.{2} <- expression'. + Il risultato di questa espressione di uguaglianza è di tipo '{0}' e viene rimosso in modo implicito. Provare a usare 'let' per eseguire il binding del risultato a un nome, ad esempio 'let result = espressione'. Se si intende impostare un valore su una proprietà, usare l'operatore '<-', ad esempio '{1}.{2} <- espressione'. + + + + The result of this equality expression has type '{0}' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to mutate a value, then mark the value 'mutable' and use the '<-' operator e.g. '{1} <- expression'. + Il risultato di questa espressione di uguaglianza è di tipo '{0}' e viene rimosso in modo implicito. Provare a usare 'let' per eseguire il binding del risultato a un nome, ad esempio 'let result = espressione'. Se si intende modificare un valore, contrassegnare il valore 'mutable' e usare l'operatore '<-', ad esempio '{1} <- espressione'. + + + + The result of this equality expression has type '{0}' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to mutate a value, then use the '<-' operator e.g. '{1} <- expression'. + Il risultato di questa espressione di uguaglianza è di tipo '{0}' e viene rimosso in modo implicito. Provare a usare 'let' per eseguire il binding del risultato a un nome, ad esempio 'let result = espressione'. Se si intende modificare un valore, usare l'operatore '<-', ad esempio '{1} <- espressione'. + + + + This recursive use will be checked for initialization-soundness at runtime. This warning is usually harmless, and may be suppressed by using '#nowarn "21"' or '--nowarn:21'. + La correttezza dell'inizializzazione al runtime di questo utilizzo ricorsivo verrà verificata. Questo avviso non indica in genere un problema concreto e può essere disabilitato mediante '#nowarn "21"' o '--nowarn:21'. + + + + The value '{0}' will be evaluated as part of its own definition + Il valore '{0}' verrà valutato come parte della propria definizione + + + + This value will be eventually evaluated as part of its own definition. You may need to make the value lazy or a function. Value '{0}'{1}. + Questo valore verrà in seguito valutato come parte della propria definizione. Potrebbe essere necessario rendere il valore lazy o una funzione. Valore '{0}'{1}. + + + + will evaluate '{0}' + valuterà '{0}' + + + + Bindings may be executed out-of-order because of this forward reference. + I binding potrebbero non essere eseguiti nell'ordine corretto a causa di questo riferimento in avanti. + + + + This and other recursive references to the object(s) being defined will be checked for initialization-soundness at runtime through the use of a delayed reference. This is because you are defining one or more recursive objects, rather than recursive functions. This warning may be suppressed by using '#nowarn "40"' or '--nowarn:40'. + Questo e altri riferimenti ricorsivi a uno o più oggetti in fase di definizione verranno controllati per verificare la correttezza dell'inizializzazione al runtime tramite un riferimento ritardato. Tale verifica è necessaria perché si stanno definendo uno o più oggetti ricorsivi, invece di funzioni ricorsive. La visualizzazione di questo avviso può essere impedita mediante '#nowarn "40"' o '--nowarn:40'. + + + + Recursive references to the object being defined will be checked for initialization soundness at runtime through the use of a delayed reference. Consider placing self-references in members or within a trailing expression of the form '<ctor-expr> then <expr>'. + I riferimenti ricorsivi all'oggetto in fase di definizione verranno controllati per verificare la correttezza dell'inizializzazione al runtime tramite l'utilizzo di un riferimento ritardato. Provare a inserire autoriferimenti nei membri o in un'espressione finale nel formato '<ctor-expr> then <expr>'. + + + + Recursive references to the object being defined will be checked for initialization soundness at runtime through the use of a delayed reference. Consider placing self-references within 'do' statements after the last 'let' binding in the construction sequence. + I riferimenti ricorsivi all'oggetto in fase di definizione verranno controllati per verificare la correttezza dell'inizializzazione al runtime tramite un riferimento ritardato. Provare a inserire autoriferimenti in istruzioni 'do' dopo l'ultimo binding 'let' nella sequenza di costruzione. + + + + The containing type can use 'null' as a representation value for its nullary union case. Invoking an abstract or virtual member or an interface implementation on a null value will lead to an exception. If necessary add a dummy data value to the nullary constructor to avoid 'null' being used as a representation for this type. + Il tipo contenitore può utilizzare 'null' come valore di rappresentazione per il relativo case di unione nullary. Se si richiama un membro astratto o virtuale oppure un'implementazione di interfaccia su un valore Null, verrà generata un'eccezione. Se necessario, aggiungere un valore di dati fittizio al costruttore nullary in modo da evitare che sia utilizzato 'null' come rappresentazione per il tipo. + + + + The containing type can use 'null' as a representation value for its nullary union case. This member will be compiled as a static member. + Il tipo contenitore può utilizzare 'null' come valore di rappresentazione per il relativo case di unione nullary. Questo membro verrà compilato come membro statico. + + + + The member '{0}' doesn't correspond to a unique abstract slot based on name and argument count alone + Il membro '{0}' non corrisponde a uno slot astratto univoco in base al conteggio di argomenti e al nome + + + + . Multiple implemented interfaces have a member with this name and argument count + . Più interfacce implementate hanno un membro con questo conteggio di argomenti e nome + + + + . Consider implementing interfaces '{0}' and '{1}' explicitly. + . Provare a implementare le interfacce '{0}' e '{1}' in modo esplicito. + + + + . Additional type annotations may be required to indicate the relevant override. This warning can be disabled using '#nowarn "70"' or '--nowarn:70'. + . Potrebbero essere necessarie ulteriori annotazioni di tipo per indicare l'override rilevante. Questo avviso può essere disabilitato mediante '#nowarn "70"' o '--nowarn:70'. + + + + parse error + errore di analisi + + + + parse error: unexpected end of file + errore di analisi: fine del file non prevista + + + + {0} + {0} + + + + internal error: {0} + errore interno: {0} + + + + {0} + {0} + + + + Incomplete pattern matches on this expression. + Criteri di ricerca incompleti in questa espressione. + + + + For example, the value '{0}' may indicate a case not covered by the pattern(s). + Ad esempio, il valore '{0}' può indicare un caso non previsto dai criteri. + + + + For example, the value '{0}' may indicate a case not covered by the pattern(s). However, a pattern rule with a 'when' clause might successfully match this value. + Ad esempio, il valore '{0}' può indicare un caso non previsto dai criteri. Tuttavia, la corrispondenza con il valore potrebbe essere individuata mediante una regola criteri con clausola 'when'. + + + + Unmatched elements will be ignored. + Gli elementi senza corrispondenza verranno ignorati. + + + + Enums may take values outside known cases. + Le enumerazioni possono accettare valori esterni a casi noti. + + + + This rule will never be matched + Questa regola non avrà mai alcuna corrispondenza + + + + This value is not mutable. Consider using the mutable keyword, e.g. 'let mutable {0} = expression'. + Questo valore non è modificabile. Provare a usare la parola chiave mutable, ad esempio 'let mutable {0} = espressione'. + + + + This value is not local + Questo valore non è locale + + + + This construct is deprecated + Questo costrutto è deprecato + + + + . {0} + . {0} + + + + {0}. This warning can be disabled using '--nowarn:57' or '#nowarn "57"'. + {0}. Questo avviso può essere disabilitato mediante '--nowarn:57' o '#nowarn "57"'. + + + + Uses of this construct may result in the generation of unverifiable .NET IL code. This warning can be disabled using '--nowarn:9' or '#nowarn "9"'. + Gli utilizzi di questo costruttore potrebbero determinare la generazione di codice IL .NET non verificabile. Questo avviso può essere disabilitato mediante '--nowarn:9' o '#nowarn "9"'. + + + + This construct is deprecated: {0} + Costrutto deprecato: {0} + + + + This construct is deprecated: it is only for use in the F# library + Costrutto deprecato: è destinato esclusivamente all'uso nella libreria F# + + + + The following fields require values: {0} + Immissione valori obbligatoria per i campi seguenti: {0} + + + + Value restriction. The value '{0}' has generic type\n {1} \nEither make the arguments to '{2}' explicit or, if you do not intend for it to be generic, add a type annotation. + Limitazione valore. Il valore '{0}' ha il tipo generico\n {1} \nRendere gli argomenti di '{2}' espliciti oppure, se non si intende renderlo generico, aggiungere un'annotazione di tipo. + + + + Value restriction. The value '{0}' has generic type\n {1} \nEither make '{2}' into a function with explicit arguments or, if you do not intend for it to be generic, add a type annotation. + Limitazione valore. Il valore '{0}' ha il tipo generico\n {1} \nRendere '{2}' una funzione con argomenti espliciti oppure, se non si intende renderlo generico, aggiungere un'annotazione di tipo. + + + + Value restriction. This member has been inferred to have generic type\n {0} \nConstructors and property getters/setters cannot be more generic than the enclosing type. Add a type annotation to indicate the exact types involved. + Restrizione relativa ai valori. È stato dedotto che il membro ha il tipo generico\n {0} \nI getter/setter di proprietà e i costruttori non possono essere più generici del tipo di inclusione. Aggiungere un'annotazione di tipo per indicare i tipi esatti previsti. + + + + Value restriction. The value '{0}' has been inferred to have generic type\n {1} \nEither make the arguments to '{2}' explicit or, if you do not intend for it to be generic, add a type annotation. + Limitazione valore. È stato dedotto che il valore '{0}' ha il tipo generico\n {1} \nRendere gli argomenti di '{2}' espliciti, oppure se non si intende renderlo generico, aggiungere un'annotazione di tipo. + + + + Value restriction. The value '{0}' has been inferred to have generic type\n {1} \nEither define '{2}' as a simple data term, make it a function with explicit arguments or, if you do not intend for it to be generic, add a type annotation. + Limitazione valore. È stato dedotto che il valore '{0}' ha il tipo generico\n {1} \nDefinire '{2}' come termine di dati semplice, renderlo una funzione con argomenti espliciti oppure, se non si intende renderlo generico, aggiungere un'annotazione di tipo. + + + + syntax error + errore di sintassi + + + + {0} + {0} + + + + {0} + {0} + + + + Override implementations in augmentations are now deprecated. Override implementations should be given as part of the initial declaration of a type. + Le implementazioni degli override negli aumenti sono ora deprecate. Le implementazioni degli override devono essere specificate all'interno della dichiarazione iniziale di un tipo. + + + + Override implementations should be given as part of the initial declaration of a type. + Le implementazioni degli override devono essere specificate all'interno della dichiarazione iniziale di un tipo. + + + + Interface implementations in augmentations are now deprecated. Interface implementations should be given on the initial declaration of a type. + Le implementazioni di interfaccia negli aumenti sono ora deprecate. Le implementazioni di interfaccia devono essere specificate nella dichiarazione iniziale di un tipo. + + + + Interface implementations should be given on the initial declaration of a type. + Le implementazioni di interfaccia devono essere specificate nella dichiarazione iniziale di un tipo. + + + + A required assembly reference is missing. You must add a reference to assembly '{0}'. + Riferimento ad assembly mancante. Aggiungere un riferimento all'assembly '{0}'. + + + + The type referenced through '{0}' is defined in an assembly that is not referenced. You must add a reference to assembly '{1}'. + Il tipo a cui viene fatto riferimento tramite '{0}' è definito in un assembly a cui non viene fatto riferimento. Aggiungere un riferimento all'assembly '{1}'. + + + + #I directives may only occur in F# script files (extensions .fsx or .fsscript). Either move this code to a script file, add a '-I' compiler option for this reference or delimit the directive with delimit it with '#if INTERACTIVE'/'#endif'. + Le direttive #I possono trovarsi solo in file di script F# (estensioni fsx o fsscript). Spostare il codice in un file di script, aggiungere un'opzione di compilazione '-I' per questo riferimento oppure delimitare la direttiva con '#if INTERACTIVE'/'#endif'. + + + + #r directives may only occur in F# script files (extensions .fsx or .fsscript). Either move this code to a script file or replace this reference with the '-r' compiler option. If this directive is being executed as user input, you may delimit it with '#if INTERACTIVE'/'#endif'. + Le direttive #r possono trovarsi solo in file di script F# (estensioni fsx o fsscript). Spostare il codice in un file di script oppure sostituire questo riferimento con l'opzione del compilatore '-r'. Se questa direttiva viene eseguita come input utente, è possibile delimitarla con '#if INTERACTIVE'/'#endif'. + + + + This directive may only be used in F# script files (extensions .fsx or .fsscript). Either remove the directive, move this code to a script file or delimit the directive with '#if INTERACTIVE'/'#endif'. + Questa direttiva può essere utilizzata solo in file di script F# (estensioni fsx o fsscript). Rimuovere la direttiva, spostare il codice in un file di script oppure delimitarla con '#if INTERACTIVE'/'#endif'. + + + + Unable to find the file '{0}' in any of\n {1} + Il file '{0}' non è stato trovato in \n {1} + + + + Assembly reference '{0}' was not found or is invalid + Riferimento ad assembly '{0}' non trovato o non valido + + + + One or more warnings in loaded file.\n + Uno o più avvisi nel file caricato.\n + + + + One or more errors in loaded file.\n + Uno o più errori nel file caricato.\n + + + + Loaded files may only be F# source files (extension .fs). This F# script file (.fsx or .fsscript) will be treated as an F# source file + I file caricati possono essere solo file di origine F# (estensione fs). Questo file di script F# (fsx o fsscript) verrà considerato come un file di origine F# + + + + Invalid assembly name '{0}' from InternalsVisibleTo attribute in {1} + Nome assembly non valido '{0}' dall'attributo InternalsVisibleTo in {1} + + + + Invalid assembly name '{0}' from InternalsVisibleTo attribute (assembly filename not available) + Nome assembly non valido '{0}' dall'attributo InternalsVisibleTo (nome file di assembly non disponibile) + + + + Could not load file '{0}' because it does not exist or is inaccessible + Non è stato possibile caricare il file '{0}' perché non esiste o non è accessibile + + + + {0} (Code={1}) + {0} (codice={1}) + + + + internal error: {0} + errore interno: {0} + + + + + \ No newline at end of file diff --git a/src/fsharp/xlf/FSStrings.ja.xlf b/src/fsharp/xlf/FSStrings.ja.xlf new file mode 100644 index 00000000000..e2bc61160be --- /dev/null +++ b/src/fsharp/xlf/FSStrings.ja.xlf @@ -0,0 +1,1622 @@ + + + + + + . See also {0}. + 。{0} も参照してください。 + + + + The tuples have differing lengths of {0} and {1} + タプルには異なる長さの {0} と {1} があります + + + + The types '{0}' and '{1}' cannot be unified. + 型 '{0}' と型 '{1}' は統合できません。 + + + + A type parameter is missing a constraint '{0}' + 型パラメーターに制約 '{0}' がありません + + + + The unit of measure '{0}' does not match the unit of measure '{1}' + 測定単位 '{0}' は測定単位 '{1}' と一致しません + + + + The type '{0}' does not match the type '{1}' + 型 '{0}' は型 '{1}' と一致しません + + + + The type '{0}' is not compatible with the type '{1}'{2} + 型 '{0}' は型 '{1}'{2} と互換性がありません + + + + This expression was expected to have type\n '{1}' \nbut here has type\n '{0}' {2} + この式に必要な型は\n '{1}' \nですが、ここでは次の型が指定されています\n '{0}' {2} + + + + Type mismatch. Expecting a\n '{0}' \nbut given a\n '{1}' {2}\n + 型が一致しません。\n '{0}' \nという指定が必要ですが、\n '{1}' {2}\nが指定されました。 + + + + Type constraint mismatch when applying the default type '{0}' for a type inference variable. + 既定の型 '{0}' を型推論の変数に適用するときに、型の制約が一致しませんでした。 + + + + Consider adding further type constraints + 型の制約を増やしてください + + + + Type constraint mismatch. The type \n '{0}' \nis not compatible with type\n '{1}' {2}\n + 型の制約が一致しません。次の型\n '{0}' \nは次の型と互換性がありません\n '{1}' {2}\n + + + + Uppercase variable identifiers should not generally be used in patterns, and may indicate a misspelt pattern name. + 通常、大文字の変数識別子はパターンに使用しません。また、つづりが間違っているパターン名を示す可能性があります。 + + + + Discriminated union cases and exception labels must be uppercase identifiers + 判別された共用体ケースと例外のラベルは、大文字の識別子にする必要があります + + + + Possible overload: '{0}'. {1}. + 使用できるオーバーロードは '{0}' です。{1}。 + + + + \n\nPossible best overload: '{0}'. + \n\n使用できる中で最適なオーバーロードは '{0}' です。 + + + + This function takes too many arguments, or is used in a context where a function is not expected + この関数の引数が多すぎるか、関数を使用できない場所で関数が使用されています + + + + Member constraints with the name '{0}' are given special status by the F# compiler as certain .NET types are implicitly augmented with this member. This may result in runtime failures if you attempt to invoke the member constraint from your own code. + '{0}' というメンバーである .NET 型が暗黙的に拡張される場合、このメンバーの制約には F# コンパイラーによって特殊な状態が付与されます。その結果、作成したコードからこのメンバーの制約を呼び出そうとすると、ランタイム エラーが発生します。 + + + + A definition to be compiled as a .NET event does not have the expected form. Only property members can be compiled as .NET events. + .NET イベントとしてコンパイルされる定義の形式に誤りがあります。.NET イベントとしてコンパイルできるのはプロパティ メンバーのみです。 + + + + Implicit object constructors for structs must take at least one argument + 構造体の暗黙的なオブジェクト コンストラクターには、少なくとも 1 つの引数が必要です + + + + The type implements the interface '{0}' but this is not revealed by the signature. You should list the interface in the signature, as the interface will be discoverable via dynamic type casts and/or reflection. + この型はインターフェイス '{0}' を実装していますが、シグネチャでは公開されていません。シグネチャにこのインターフェイスを列挙してください。動的な型のキャストやリフレクションによってインターフェイスを検出できるようになります。 + + + + The type '{0}' expects {1} type argument(s) but is given {2} + 型 '{0}' には {1} 個の型引数が必要ですが、指定されたのは {2} 個です + + + + Lookup on object of indeterminate type based on information prior to this program point. A type annotation may be needed prior to this program point to constrain the type of the object. This may allow the lookup to be resolved. + このプログラムの場所の前方にある情報に基づく不確定の型のオブジェクトに対する参照です。場合によっては、オブジェクトの型を制約する型の注釈がこのプログラムの場所の前に必要です。この操作で参照が解決される可能性があります。 + + + + Duplicate definition of {0} '{1}' + {0} '{1}' の定義が重複しています + + + + The {0} '{1}' can not be defined because the name '{2}' clashes with the {3} '{4}' in this type or module + 名前 '{2}' がこの型またはモジュールの {3} '{4}' と競合するため、{0} '{1}' を定義できません + + + + Two members called '{0}' have the same signature + '{0}' という 2 つのメンバーが同じシグネチャを使用しています + + + + Duplicate definition of {0} '{1}' + {0} '{1}' の定義が重複しています + + + + A construct with this name was found in FSharp.PowerPack.dll, which contains some modules and types that were implicitly referenced in some previous versions of F#. You may need to add an explicit reference to this DLL in order to compile this code. + この名前を持つコンストラクトが FSharp.PowerPack.dll に見つかりました。この DLL には、F# の以前のバージョンの一部で暗黙的に参照されていたモジュールおよび型がいくつか含まれます。場合によっては、このコードをコンパイルするために、この DLL への明示的な参照を追加する必要があります。 + + + + This field is not mutable + このフィールドは変更可能ではありません + + + + The fields '{0}' and '{1}' are from different types + フィールド '{0}' と '{1}' は異なる型です + + + + '{0}' is bound twice in this pattern + このパターンで '{0}' が 2 回バインドされています + + + + A use of the function '{0}' does not match a type inferred elsewhere. The inferred type of the function is\n {1}. \nThe type of the function required at this point of use is\n {2} {3}\nThis error may be due to limitations associated with generic recursion within a 'let rec' collection or within a group of classes. Consider giving a full type signature for the targets of recursive calls including type annotations for both argument and return types. + 関数 '{0}' の使用方法は、推論される型のいずれとも一致しません。この関数の推論される型は次のとおりです。\n {1} \nこの使用時点で必要な関数の型は次のとおりです。\n {2} {3}\nこのエラーの原因は、'let rec' コレクション内、またはクラスのグループ内のジェネリック再帰に関連する制限の可能性があります。引数と戻り値の型の両方に型の注釈を指定するなど、再帰呼び出しのターゲットに完全な型のシグネチャを指定してください。 + + + + Invalid runtime coercion or type test from type {0} to {1}\n{2} + 型 {0} から型 {1} への無効なランタイム型変換または型テストです\n{2} + + + + This runtime coercion or type test from type\n {0} \n to \n {1} \ninvolves an indeterminate type based on information prior to this program point. Runtime type tests are not allowed on some types. Further type annotations are needed. + この型\n {0} \nから型\n {1} \nへのランタイム型変換またはランタイム型テストには、このプログラムの場所の前方にある情報に基づく不確定の型が使用されています。ランタイム型テストが許可されていない型もあります。型の注釈を増やしてください。 + + + + The static coercion from type\n {0} \nto \n {1} \n involves an indeterminate type based on information prior to this program point. Static coercions are not allowed on some types. Further type annotations are needed. + 型\n {0} \nから型\n {1} \nへの静的型変換には、このプログラムの場所の前方にある情報に基づく不確定の型が使用されています。静的型変換が許可されていない型もあります。型の注釈を増やしてください。 + + + + A coercion from the value type \n {0} \nto the type \n {1} \nwill involve boxing. Consider using 'box' instead + 次の値の型\n {0} \nから型\n {1} \nへの型変換はボックス化を伴います。代わりに 'box' を使用してください。 + + + + This type is 'abstract' since some abstract members have not been given an implementation. If this is intentional then add the '[<AbstractClass>]' attribute to your type. + 一部の抽象メンバーが実装されなかったため、この型は 'abstract' です。これが意図的な場合、型に '[<AbstractClass>]' 属性を追加してください。 + + + + This construct causes code to be less generic than indicated by its type annotations. The type variable implied by the use of a '#', '_' or other type annotation at or near '{0}' has been constrained to be type '{1}'. + このコンストラクトによって、コードの総称性は型の注釈よりも低くなります。'{0}' またはその付近にある '#'、'_'、または他の型の注釈を使用して示された型変数は、型 '{1}' に制約されました。 + + + + This construct causes code to be less generic than indicated by the type annotations. The unit-of-measure variable '{0} has been constrained to be measure '{1}'. + このコンストラクトによって、コードの総称性は型の注釈よりも低くなります。単位変数 '{0}' は単位 '{1}' に制約されました。 + + + + This construct causes code to be less generic than indicated by the type annotations. The type variable '{0} has been constrained to be type '{1}'. + このコンストラクトによって、コードの総称性は型の注釈よりも低くなります。型変数 '{0}' は型 '{1}' に制約されました。 + + + + identifier + 識別子 + + + + integer literal + 整数リテラル + + + + floating point literal + 浮動小数点リテラル + + + + decimal literal + 10 進リテラル + + + + character literal + 文字リテラル + + + + keyword 'base' + キーワード 'base' + + + + symbol '(*)' + シンボル '(*)' + + + + symbol '$' + シンボル '$' + + + + infix operator + 挿入演算子 + + + + infix operator + 挿入演算子 + + + + symbol ':>' + シンボル ':>' + + + + symbol '::' + シンボル '::' + + + + symbol '{0} + シンボル'{0}' + + + + infix operator + 挿入演算子 + + + + infix operator + 挿入演算子 + + + + infix operator + 挿入演算子 + + + + prefix operator + プレフィックス演算子 + + + + symbol ':?>' + シンボル ':?>' + + + + infix operator + 挿入演算子 + + + + infix operator + 挿入演算子 + + + + symbol '&' + シンボル '&' + + + + symbol '&&' + シンボル '&&' + + + + symbol '||' + シンボル '||' + + + + symbol '<' + シンボル '<' + + + + symbol '>' + シンボル '>' + + + + symbol '?' + シンボル '?' + + + + symbol '??' + シンボル '??' + + + + symbol ':?' + シンボル ':?' + + + + integer.. + 整数.. + + + + symbol '..' + シンボル '..' + + + + quote symbol + 引用シンボル + + + + symbol '*' + シンボル '*' + + + + type application + 型応用 + + + + symbol ':' + シンボル ':' + + + + symbol ':=' + シンボル ':=' + + + + symbol '<-' + シンボル '<-' + + + + symbol '=' + シンボル '=' + + + + symbol '>|]' + シンボル '>|]' + + + + symbol '-' + シンボル '-' + + + + prefix operator + プレフィックス演算子 + + + + operator name + 演算子名 + + + + symbol ',' + シンボル ',' + + + + symbol '.' + シンボル '.' + + + + symbol '|' + シンボル '|' + + + + symbol # + シンボル # + + + + symbol '_' + シンボル '_' + + + + symbol ';' + シンボル ';' + + + + symbol ';;' + シンボル ';;' + + + + symbol '(' + シンボル '(' + + + + symbol ')' + シンボル ')' + + + + symbol 'splice' + シンボル 'splice' + + + + start of quotation + 引用の開始 + + + + symbol '[' + シンボル '[' + + + + symbol '[|' + シンボル '[|' + + + + symbol '[<' + シンボル '[<' + + + + symbol '{' + シンボル '{' + + + + symbol '{<' + シンボル '{<' + + + + symbol '|]' + シンボル '|]' + + + + symbol '>}' + シンボル '>}' + + + + symbol '>]' + シンボル '>]' + + + + end of quotation + 引用の終わり + + + + symbol ']' + シンボル ']' + + + + symbol '}' + シンボル '}' + + + + keyword 'public' + キーワード 'public' + + + + keyword 'private' + キーワード 'private' + + + + keyword 'internal' + キーワード 'internal' + + + + keyword 'fixed' + キーワード 'fixed' + + + + keyword 'constraint' + キーワード 'constraint' + + + + keyword 'instance' + キーワード 'instance' + + + + keyword 'delegate' + キーワード 'delegate' + + + + keyword 'inherit' + キーワード 'inherit' + + + + keyword 'constructor' + キーワード 'constructor' + + + + keyword 'default' + キーワード 'default' + + + + keyword 'override' + キーワード 'override' + + + + keyword 'abstract' + キーワード 'abstract' + + + + keyword 'class' + キーワード 'class' + + + + keyword 'member' + キーワード 'member' + + + + keyword 'static' + キーワード 'static' + + + + keyword 'namespace' + キーワード 'namespace' + + + + start of structured construct + 構造化コンストラクトの開始 + + + + incomplete structured construct at or before this point + このポイントまたはその前にある構造化コンストラクトが不完全です + + + + Incomplete structured construct at or before this point + この場所またはその前にある構造化コンストラクトが不完全です + + + + keyword 'then' + キーワード 'then' + + + + keyword 'else' + キーワード 'else' + + + + keyword 'let' or 'use' + キーワード 'let' または 'use' + + + + binder keyword + バインダー キーワード + + + + keyword 'do' + キーワード 'do' + + + + keyword 'const' + キーワード 'const' + + + + keyword 'with' + キーワード 'with' + + + + keyword 'function' + キーワード 'function' + + + + keyword 'fun' + キーワード 'fun' + + + + end of input + 入力の終わり + + + + internal dummy token + 内部ダミー トークン + + + + keyword 'do!' + キーワード 'do!' + + + + yield + yield + + + + yield! + yield! + + + + keyword 'interface' + キーワード 'interface' + + + + keyword 'elif' + キーワード 'elif' + + + + symbol '->' + シンボル '->' + + + + keyword 'sig' + キーワード 'sig' + + + + keyword 'struct' + キーワード 'struct' + + + + keyword 'upcast' + キーワード 'upcast' + + + + keyword 'downcast' + キーワード 'downcast' + + + + keyword 'null' + キーワード 'null' + + + + reserved keyword + 予約済みのキーワード + + + + keyword 'module' + キーワード 'module' + + + + keyword 'and' + キーワード 'and' + + + + keyword 'as' + キーワード 'as' + + + + keyword 'assert' + キーワード 'assert' + + + + keyword 'asr' + キーワード 'asr' + + + + keyword 'downto' + キーワード 'downto' + + + + keyword 'exception' + キーワード 'exception' + + + + keyword 'false' + キーワード 'false' + + + + keyword 'for' + キーワード 'for' + + + + keyword 'fun' + キーワード 'fun' + + + + keyword 'function' + キーワード 'function' + + + + keyword 'finally' + キーワード 'finally' + + + + keyword 'lazy' + キーワード 'lazy' + + + + keyword 'match' + キーワード 'match' + + + + keyword 'match!' + キーワード 'match!' + + + + keyword 'mutable' + キーワード 'mutable' + + + + keyword 'new' + キーワード 'new' + + + + keyword 'of' + キーワード 'of' + + + + keyword 'open' + キーワード 'open' + + + + keyword 'or' + キーワード 'or' + + + + keyword 'void' + キーワード 'void' + + + + keyword 'extern' + キーワード 'extern' + + + + keyword 'interface' + キーワード 'interface' + + + + keyword 'rec' + キーワード 'rec' + + + + keyword 'to' + キーワード 'to' + + + + keyword 'true' + キーワード 'true' + + + + keyword 'try' + キーワード 'try' + + + + keyword 'type' + キーワード 'type' + + + + keyword 'val' + キーワード 'val' + + + + keyword 'inline' + キーワード 'inline' + + + + keyword 'when' + キーワード 'when' + + + + keyword 'while' + キーワード 'while' + + + + keyword 'with' + キーワード 'with' + + + + keyword 'if' + キーワード 'if' + + + + keyword 'do' + キーワード 'do' + + + + keyword 'global' + キーワード 'global' + + + + keyword 'done' + キーワード 'done' + + + + keyword 'in' + キーワード 'in' + + + + symbol '(' + シンボル '(' + + + + symbol'[' + シンボル '[' + + + + keyword 'begin' + キーワード 'begin' + + + + keyword 'end' + キーワード 'end' + + + + directive + ディレクティブ + + + + inactive code + 非アクティブ コード + + + + lex failure + lex エラー + + + + whitespace + スペース + + + + comment + コメント + + + + line comment + 行コメント + + + + string text + 文字列テキスト + + + + compiler generated literal + コンパイラーで生成されたリテラル + + + + byte array literal + バイト配列リテラル + + + + string literal + 文字列リテラル + + + + end of input + 入力の終わり + + + + Unexpected end of input + 予期しない入力の終わりです: + + + + Unexpected {0} + 予期しない {0} です + + + + in interaction + 相互作用内 + + + + in directive + ディレクティブ内 + + + + in field declaration + フィールドの宣言内 + + + + in discriminated union case declaration + 判別された共用体ケースの宣言内 + + + + in binding + 束縛内 + + + + in binding + 束縛内 + + + + in member definition + メンバー定義内 + + + + in definitions + 定義内 + + + + in member signature + メンバーのシグネチャ内 + + + + in value signature + 値のシグネチャ内 + + + + in type signature + 型のシグネチャ内 + + + + in lambda expression + ラムダ式内 + + + + in union case + 共用体ケース内 + + + + in extern declaration + extern 宣言内 + + + + in object expression + オブジェクト式内 + + + + in if/then/else expression + if/then/else 式内 + + + + in open declaration + open 宣言内 + + + + in module or namespace signature + モジュールまたは名前空間のシグネチャ内 + + + + in pattern matching + パターン マッチ内 + + + + in begin/end expression + begin/end 式内 + + + + in record expression + レコード式内 + + + + in type definition + 型定義内 + + + + in exception definition + 例外の定義内 + + + + in type name + 型名内 + + + + in attribute list + 属性リスト内 + + + + in quotation literal + 引用リテラル内 + + + + in type constraint + 型制約内 + + + + in implementation file + 実装ファイル内 + + + + in definition + 定義内 + + + + in signature file + シグネチャ ファイル内 + + + + in pattern + パターン内 + + + + in expression + 式内 + + + + in type + 型内 + + + + in type arguments + 型引数内 + + + + keyword + キーワード + + + + symbol + シンボル + + + + (due to indentation-aware syntax) + (インデント対応構文のため) + + + + . Expected {0} or other token. + 。{0} または他のトークンを指定してください。 + + + + . Expected {0}, {1} or other token. + 。{0}、{1}、または他のトークンを指定してください。 + + + + . Expected {0}, {1}, {2} or other token. + 。{0}、{1}、{2}、または他のトークンを指定してください。 + + + + The type '{0}' cannot be used as the source of a type test or runtime coercion + 型 '{0}' は型テストまたはランタイム型変換のソースとして使用できません + + + + The type '{0}' does not have any proper subtypes and cannot be used as the source of a type test or runtime coercion. + 型 '{0}' には適切なサブタイプがないため、型テストまたはランタイム型変換のソースとして使用できません。 + + + + The type '{0}' does not have any proper subtypes and need not be used as the target of a static coercion + 型 '{0}' には適切なサブタイプが含まれないため、この型は必ずしも静的型変換のターゲットとして使用されません + + + + This upcast is unnecessary - the types are identical + この upcast は不要です。型は同一です。 + + + + This type test or downcast will always hold + この型テストまたはダウンキャストは常に維持されます + + + + The member '{0}' does not have the correct type to override any given virtual method + メンバー '{0}' には、指定した仮想メソッドをオーバーライドする正しい型がありません + + + + The member '{0}' does not have the correct type to override the corresponding abstract method. + メンバー '{0}' には、対応する抽象メソッドをオーバーライドする正しい型がありません + + + + The required signature is '{0}'. + 必要なシグネチャは '{0}' です。 + + + + The member '{0}' is specialized with 'unit' but 'unit' can't be used as return type of an abstract method parameterized on return type. + メンバー '{0}' は 'unit' で特定されますが、'unit' は、戻り値の型に関してパラメーター化された抽象メソッドの戻り値の型としては使用できません。 + + + + This constructor is applied to {0} argument(s) but expects {1} + このコンストラクターには {0} 個の引数が適用されていますが、必要なのは {1} 個です + + + + The two sides of this 'or' pattern bind different sets of variables + この 'or' パターンの両側は、異なる変数セットをバインドしています + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \n{3}. + モジュール '{0}' には\n {1} \nが含まれますが、シグネチャには\n {2} \nを指定しています。{3}。 + + + + Module '{0}' requires a {1} '{2}' + モジュール '{0}' には {1} '{2}' が必要です + + + + The use of native pointers may result in unverifiable .NET IL code + ネイティブ ポインターを使用すると、.NET IL コードを検証できなくなる可能性があります + + + + {0} + {0} + + + + Thread static and context static 'let' bindings are deprecated. Instead use a declaration of the form 'static val mutable <ident> : <type>' in a class. Add the 'DefaultValue' attribute to this declaration to indicate that the value is initialized to the default value on each new thread. + thread-static および context-static の 'let' 束縛は使用されなくなりました。代わりに、クラスには 'static val mutable <ident> : <type>' という形式の宣言を使用してください。また、この宣言に 'DefaultValue' 属性を追加し、新しいスレッドごとに値が既定値に初期化されることを示してください。 + + + + This expression is a function value, i.e. is missing arguments. Its type is {0}. + この式は関数値です (つまり、引数が足りません)。型は {0} です。 + + + + The result of this expression has type '{0}' and is implicitly ignored. Consider using 'ignore' to discard this value explicitly, e.g. 'expr |> ignore', or 'let' to bind the result to a name, e.g. 'let result = expr'. + この式の結果は型 '{0}' を持ち、暗黙的に無視されます。'expr |> ignore' のように 'ignore' を使用してこの値を明示的に破棄するか、'let result = expr' のように 'let' を使用して結果を名前にバインドすることをご考慮ください。 + + + + The result of this equality expression has type '{0}' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. + この等式の結果は型 '{0}' を持ち、暗黙的に破棄されます。'let' を使用して結果を名前にバインドすることを検討してください。例: 'let result = expression'。 + + + + The result of this equality expression has type '{0}' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to set a value to a property, then use the '<-' operator e.g. '{1}.{2} <- expression'. + この等式の結果は型 '{0}' を持ち、暗黙的に破棄されます。'let' を使用して結果を名前にバインドすることを検討してください。例: 'let result = expression'。値をプロパティに設定する場合は、'<-' 演算子を使用します。例: '{1}.{2} <- expression'。 + + + + The result of this equality expression has type '{0}' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to mutate a value, then mark the value 'mutable' and use the '<-' operator e.g. '{1} <- expression'. + この等式の結果は型 '{0}' を持ち、暗黙的に破棄されます。'let' を使用して結果を名前にバインドすることを検討してください。例: 'let result = expression'。値を変換する場合は、値 'mutable' をマークして、'<-' 演算子を使用します。例: '{1} <- expression'。 + + + + The result of this equality expression has type '{0}' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to mutate a value, then use the '<-' operator e.g. '{1} <- expression'. + この等式の結果は型 '{0}' を持ち、暗黙的に破棄されます。'let' を使用して結果を名前にバインドすることを検討してください。例: 'let result = expression'。値を変換する場合は、'<-' 演算子を使用します。例: '{1} <- expression'。 + + + + This recursive use will be checked for initialization-soundness at runtime. This warning is usually harmless, and may be suppressed by using '#nowarn "21"' or '--nowarn:21'. + この再帰的な用法は、実行時に初期化の正常性がチェックされます。通常、この警告は害がないため、'#nowarn "21"' または '--nowarn:21' を使用して抑制することができます。 + + + + The value '{0}' will be evaluated as part of its own definition + 値 '{0}' はその定義の一部として評価されます + + + + This value will be eventually evaluated as part of its own definition. You may need to make the value lazy or a function. Value '{0}'{1}. + 最終的に、この値はその定義の一部として評価されます。必要に応じて、値を 'lazy' にするか、関数にしてください。値 '{0}'{1}。 + + + + will evaluate '{0}' + は '{0}' を評価します + + + + Bindings may be executed out-of-order because of this forward reference. + この前方参照があるため、束縛が順序どおりに実行されない可能性があります。 + + + + This and other recursive references to the object(s) being defined will be checked for initialization-soundness at runtime through the use of a delayed reference. This is because you are defining one or more recursive objects, rather than recursive functions. This warning may be suppressed by using '#nowarn "40"' or '--nowarn:40'. + 定義されるオブジェクトに対するこの再帰参照および他の再帰参照は、遅延参照を使用して、実行時に初期化の正常性がチェックされます。これは、再帰関数ではなく、1 つまたは複数の再帰オブジェクトを定義しているためです。この警告を抑制するには、'#nowarn "40"' または '--nowarn:40' を使用してください。 + + + + Recursive references to the object being defined will be checked for initialization soundness at runtime through the use of a delayed reference. Consider placing self-references in members or within a trailing expression of the form '<ctor-expr> then <expr>'. + 定義されるオブジェクトに対する再帰参照は、遅延参照を使用して、実行時に初期化の正常性がチェックされます。メンバー内、または '<ctor-expr> then <expr>' 形式の後続の式内に自己参照を配置してください。 + + + + Recursive references to the object being defined will be checked for initialization soundness at runtime through the use of a delayed reference. Consider placing self-references within 'do' statements after the last 'let' binding in the construction sequence. + 定義されるオブジェクトに対する再帰参照は、遅延参照を使用して、実行時に初期化の正常性がチェックされます。構築シーケンスの最後の 'let' 束縛の後にある 'do' ステートメント内に、自己参照を配置してください。 + + + + The containing type can use 'null' as a representation value for its nullary union case. Invoking an abstract or virtual member or an interface implementation on a null value will lead to an exception. If necessary add a dummy data value to the nullary constructor to avoid 'null' being used as a representation for this type. + 含まれる型は、引数がない共用体ケースの表現値として 'null' を使用できます。null 値で抽象メンバー、仮想メンバー、またはインターフェイスの実装を呼び出すと、例外が発生します。必要に応じて、引数がないコンストラクターにダミーのデータ値を追加して、この型の表現として 'null' が使用されないようにしてください。 + + + + The containing type can use 'null' as a representation value for its nullary union case. This member will be compiled as a static member. + 含まれる型は、引数がない共用体ケースの表現値として 'null' を使用できます。このメンバーは静的メンバーとしてコンパイルされます。 + + + + The member '{0}' doesn't correspond to a unique abstract slot based on name and argument count alone + 名前と引数の数だけに基づいて、メンバー '{0}' を一意の抽象スロットに対応付けることができません + + + + . Multiple implemented interfaces have a member with this name and argument count + 。実装された複数のインターフェイスに、この名前と引数の数を持つメンバーがあります + + + + . Consider implementing interfaces '{0}' and '{1}' explicitly. + 。インターフェイス '{0}' と '{1}' を明示的に実装してください。 + + + + . Additional type annotations may be required to indicate the relevant override. This warning can be disabled using '#nowarn "70"' or '--nowarn:70'. + 。場合によっては、関連するオーバーライドを示すために追加の型の参照が必要です。この警告を無効にするには、'#nowarn "70"' または '--nowarn:70' を使用してください。 + + + + parse error + 解析エラー + + + + parse error: unexpected end of file + 解析エラー: 予期しないファイルの終わりです + + + + {0} + {0} + + + + internal error: {0} + 内部エラー: {0} + + + + {0} + {0} + + + + Incomplete pattern matches on this expression. + この式のパターン マッチが不完全です + + + + For example, the value '{0}' may indicate a case not covered by the pattern(s). + たとえば、値 '{0}' はパターンに含まれないケースを示す可能性があります。 + + + + For example, the value '{0}' may indicate a case not covered by the pattern(s). However, a pattern rule with a 'when' clause might successfully match this value. + たとえば、値 '{0}' はパターンに含まれないケースを示す可能性があります。ただし、'when' 句を含むパターン規則であれば、この値に一致する場合もあります。 + + + + Unmatched elements will be ignored. + 一致しない要素は無視されます。 + + + + Enums may take values outside known cases. + 列挙型は既知のケースの外の値を使用する可能性があります。 + + + + This rule will never be matched + この規則には一致しません + + + + This value is not mutable. Consider using the mutable keyword, e.g. 'let mutable {0} = expression'. + この値は変更可能ではありません。変更可能なキーワードを使用することを検討してください。例: 'let mutable {0} = expression'。 + + + + This value is not local + この値はローカルではありません + + + + This construct is deprecated + このコンストラクトは使用されなくなりました + + + + . {0} + 。{0} + + + + {0}. This warning can be disabled using '--nowarn:57' or '#nowarn "57"'. + {0}。この警告を無効にするには、'--nowarn:57' または '#nowarn "57"' を使用します。 + + + + Uses of this construct may result in the generation of unverifiable .NET IL code. This warning can be disabled using '--nowarn:9' or '#nowarn "9"'. + このコンストラクトを使用すると、検証できない .NET IL コードが生成される可能性があります。この警告を無効にするには、'--nowarn:9' または '#nowarn "9"' を使用してください。 + + + + This construct is deprecated: {0} + このコンストラクトは使用されなくなりました: {0} + + + + This construct is deprecated: it is only for use in the F# library + このコンストラクトは使用されなくなりました。これは F# ライブラリでのみ使用されます。 + + + + The following fields require values: {0} + 次のフィールドには値が必要です: {0} + + + + Value restriction. The value '{0}' has generic type\n {1} \nEither make the arguments to '{2}' explicit or, if you do not intend for it to be generic, add a type annotation. + 値の制限。値 '{0}' は次のジェネリック型です。\n {1} \n明示的に引数を '{2}' にするか、ジェネリックにする意図がない場合は型の注釈を追加してください。 + + + + Value restriction. The value '{0}' has generic type\n {1} \nEither make '{2}' into a function with explicit arguments or, if you do not intend for it to be generic, add a type annotation. + 値の制限。値 '{0}' は次のジェネリック型です。\n {1} \n明示的な引数を使用して '{2}' を関数にするか、ジェネリックにする意図がない場合は型の注釈を追加してください。 + + + + Value restriction. This member has been inferred to have generic type\n {0} \nConstructors and property getters/setters cannot be more generic than the enclosing type. Add a type annotation to indicate the exact types involved. + 値の制限。このメンバーは次のジェネリック型を持つと推論されました。\n {0} \nコンストラクターとプロパティのゲッター/セッターは、それを囲む型よりも総称性を高くすることができません。関係する正確な型を示すために、型の注釈を追加してください。 + + + + Value restriction. The value '{0}' has been inferred to have generic type\n {1} \nEither make the arguments to '{2}' explicit or, if you do not intend for it to be generic, add a type annotation. + 値の制限。値 '{0}' は次のジェネリック型を持つと推論されました。\n {1} \n明示的に引数を '{2}' にするか、ジェネリックにする意図がない場合は型の注釈を追加してください。 + + + + Value restriction. The value '{0}' has been inferred to have generic type\n {1} \nEither define '{2}' as a simple data term, make it a function with explicit arguments or, if you do not intend for it to be generic, add a type annotation. + 値の制限。値 '{0}' は次のジェネリック型を持つと推論されました。\n {1} \n単純なデータ用語として '{2}' を定義するか、明示的な引数を使用して関数にするか、ジェネリックにする意図がない場合は型の注釈を追加してください。 + + + + syntax error + 構文エラーです + + + + {0} + {0} + + + + {0} + {0} + + + + Override implementations in augmentations are now deprecated. Override implementations should be given as part of the initial declaration of a type. + 拡張内のオーバーライドの実装は使用されなくなりました。オーバーライドの実装は、型の最初の宣言の一部として指定してください。 + + + + Override implementations should be given as part of the initial declaration of a type. + オーバーライドの実装は、型の最初の宣言の一部として指定してください。 + + + + Interface implementations in augmentations are now deprecated. Interface implementations should be given on the initial declaration of a type. + 拡張内のインターフェイスの実装は使用されなくなりました。インターフェイスの実装は、型の最初の宣言で指定してください。 + + + + Interface implementations should be given on the initial declaration of a type. + インターフェイスの実装は、型の最初の宣言で指定してください。 + + + + A required assembly reference is missing. You must add a reference to assembly '{0}'. + 必要なアセンブリ参照が見つかりません。アセンブリ '{0}' に参照を追加してください。 + + + + The type referenced through '{0}' is defined in an assembly that is not referenced. You must add a reference to assembly '{1}'. + {0}' によって参照される型が、参照されていないアセンブリで定義されています。アセンブリ '{1}' への参照を追加してください。 + + + + #I directives may only occur in F# script files (extensions .fsx or .fsscript). Either move this code to a script file, add a '-I' compiler option for this reference or delimit the directive with delimit it with '#if INTERACTIVE'/'#endif'. + #I ディレクティブを使用できるのは F# スクリプト ファイル (拡張子は .fsx または .fsscript) のみです。このコードをスクリプト ファイルに移動するか、この参照に '-I' コンパイラー オプションを追加するか、ディレクティブを '#if INTERACTIVE'/'#endif' で区切ってください。 + + + + #r directives may only occur in F# script files (extensions .fsx or .fsscript). Either move this code to a script file or replace this reference with the '-r' compiler option. If this directive is being executed as user input, you may delimit it with '#if INTERACTIVE'/'#endif'. + #r ディレクティブは F# スクリプト ファイル (拡張子は .fsx または .fsscript) 内でのみ使用できます。このコードをスクリプト ファイルに移動するか、この参照を '-r' コンパイラ オプションに置き換えてください。このディレクティブがユーザー入力として実行されている場合は、'#if INTERACTIVE'/'#endif' でディレクティブを区切ることができます。 + + + + This directive may only be used in F# script files (extensions .fsx or .fsscript). Either remove the directive, move this code to a script file or delimit the directive with '#if INTERACTIVE'/'#endif'. + このディレクティブを使用できるのは F# スクリプト ファイル (拡張子は .fsx または .fsscript) のみです。ディレクティブを削除するか、このコードをスクリプト ファイルに移動するか、ディレクティブを '#if INTERACTIVE'/'#endif' で区切ってください。 + + + + Unable to find the file '{0}' in any of\n {1} + 次の中からファイル '{0}' が見つかりませんでした\n {1} + + + + Assembly reference '{0}' was not found or is invalid + アセンブリ参照 '{0}' が見つからないか、無効です + + + + One or more warnings in loaded file.\n + 読み込まれたファイルに 1 つまたは複数の警告があります。\n + + + + One or more errors in loaded file.\n + 読み込まれたファイルに 1 つまたは複数のエラーがあります。\n + + + + Loaded files may only be F# source files (extension .fs). This F# script file (.fsx or .fsscript) will be treated as an F# source file + 読み込むことができるファイルは F# ソース ファイル (拡張子は .fs) のみです。この F# スクリプト ファイル (.fsx または .fsscript) は F# ソース ファイルとして扱われます。 + + + + Invalid assembly name '{0}' from InternalsVisibleTo attribute in {1} + {1} の InternalsVisibleTo 属性のアセンブリ名 '{0}' が無効です + + + + Invalid assembly name '{0}' from InternalsVisibleTo attribute (assembly filename not available) + InternalsVisibleTo 属性のアセンブリ名 '{0}' が無効です (アセンブリ ファイル名が使用できません) + + + + Could not load file '{0}' because it does not exist or is inaccessible + ファイル '{0}' が存在しないか、アクセスできないため、ファイルを読み込むことができません + + + + {0} (Code={1}) + {0} (Code={1}) + + + + internal error: {0} + 内部エラー: {0} + + + + + \ No newline at end of file diff --git a/src/fsharp/xlf/FSStrings.ko.xlf b/src/fsharp/xlf/FSStrings.ko.xlf new file mode 100644 index 00000000000..8f398f713c4 --- /dev/null +++ b/src/fsharp/xlf/FSStrings.ko.xlf @@ -0,0 +1,1622 @@ + + + + + + . See also {0}. + {0}도 참조하세요. + + + + The tuples have differing lengths of {0} and {1} + 튜플의 길이가 {0}과(와) {1}(으)로 서로 다릅니다. + + + + The types '{0}' and '{1}' cannot be unified. + 형식 '{0}' 및 '{1}'을(를) 통합할 수 없습니다. + + + + A type parameter is missing a constraint '{0}' + 형식 매개 변수에 제약 조건 '{0}'이(가) 없습니다. + + + + The unit of measure '{0}' does not match the unit of measure '{1}' + 측정 단위 '{0}'이(가) 측정 단위 '{1}'과(와) 일치하지 않습니다. + + + + The type '{0}' does not match the type '{1}' + {0}' 형식이 '{1}' 형식과 일치하지 않습니다. + + + + The type '{0}' is not compatible with the type '{1}'{2} + {0}' 형식이 '{1}'{2} 형식과 호환되지 않습니다. + + + + This expression was expected to have type\n '{1}' \nbut here has type\n '{0}' {2} + 이 식에는\n '{1}' 형식이 필요하지만 \n여기에서는\n '{0}' 형식이 지정되었습니다. {2} + + + + Type mismatch. Expecting a\n '{0}' \nbut given a\n '{1}' {2}\n + 형식이 일치하지 않습니다.\n '{0}'이(가) \n필요하지만\n '{1}'이(가) 지정되었습니다. {2}\n + + + + Type constraint mismatch when applying the default type '{0}' for a type inference variable. + 형식 유추 변수의 기본 형식 '{0}'을(를) 적용할 때 형식 제약 조건이 일치하지 않았습니다. + + + + Consider adding further type constraints + 형식 제약 조건을 더 추가하세요. + + + + Type constraint mismatch. The type \n '{0}' \nis not compatible with type\n '{1}' {2}\n + 형식 제약 조건이 일치하지 않습니다. \n '{0}' \n형식이\n '{1}' 형식과 호환되지 않습니다. {2}\n + + + + Uppercase variable identifiers should not generally be used in patterns, and may indicate a misspelt pattern name. + 일반적으로 대문자 변수 식별자는 패턴에 사용하지 말아야 합니다. 이러한 식별자는 철자가 잘못된 패턴 이름을 나타낼 수 있습니다. + + + + Discriminated union cases and exception labels must be uppercase identifiers + 구분된 공용 구조체 케이스 및 예외 레이블은 대문자로 된 식별자여야 합니다. + + + + Possible overload: '{0}'. {1}. + 가능한 오버로드: '{0}'. {1}. + + + + \n\nPossible best overload: '{0}'. + \n\n가능한 최적의 오버로드: '{0}' + + + + This function takes too many arguments, or is used in a context where a function is not expected + 이 함수는 너무 많은 인수를 사용하거나 함수가 필요하지 않은 컨텍스트에서 사용되었습니다. + + + + Member constraints with the name '{0}' are given special status by the F# compiler as certain .NET types are implicitly augmented with this member. This may result in runtime failures if you attempt to invoke the member constraint from your own code. + 이름이 '{0}'인 멤버 제약 조건에는 F# 컴파일러에 의해 특수한 상태가 지정됩니다(특정 .NET 형식은 이 멤버를 사용하여 암시적으로 확대될 수 있음). 이로 인해 사용자 코드로부터 멤버 제약 조건을 호출할 경우 런타임 오류가 발생할 수 있습니다. + + + + A definition to be compiled as a .NET event does not have the expected form. Only property members can be compiled as .NET events. + .NET 이벤트로 컴파일될 정의의 형식이 필요한 형식이 아닙니다. 속성 멤버만 .NET 이벤트로 컴파일될 수 있습니다. + + + + Implicit object constructors for structs must take at least one argument + 구조체에 대한 암시적 개체 생성자는 하나 이상의 인수를 사용해야 합니다. + + + + The type implements the interface '{0}' but this is not revealed by the signature. You should list the interface in the signature, as the interface will be discoverable via dynamic type casts and/or reflection. + 형식이 '{0}' 인터페이스를 구현하지만 이 사실이 시그니처에 의해 표시되지 않습니다. 시그니처에 인터페이스를 나열해야 합니다. 이렇게 하면 동적 형식 캐스팅 및/또는 리플렉션을 통해 인터페이스를 검색할 수 있게 됩니다. + + + + The type '{0}' expects {1} type argument(s) but is given {2} + {0}' 형식에 {1}개의 형식 인수가 필요한데 {2}개를 받았습니다. + + + + Lookup on object of indeterminate type based on information prior to this program point. A type annotation may be needed prior to this program point to constrain the type of the object. This may allow the lookup to be resolved. + 이 프로그램 지점 전의 정보를 기반으로 하는 확인할 수 없는 형식의 개체를 대상으로 조회를 수행합니다. 개체의 형식을 제한하기 위해 이 프로그램 지점 전에 형식 주석이 필요할 수 있습니다. 이를 통해 조회가 확인될 수도 있습니다. + + + + Duplicate definition of {0} '{1}' + {0} '{1}'의 정의가 중복되었습니다. + + + + The {0} '{1}' can not be defined because the name '{2}' clashes with the {3} '{4}' in this type or module + 이름 '{2}'이(가) 이 형식 또는 모듈의 {3} '{4}'과(와) 충돌하므로 {0} '{1}'을(를) 정의할 수 없습니다. + + + + Two members called '{0}' have the same signature + '{0}'(이)라는 두 멤버의 시그니처가 같습니다. + + + + Duplicate definition of {0} '{1}' + {0} '{1}'의 정의가 중복되었습니다. + + + + A construct with this name was found in FSharp.PowerPack.dll, which contains some modules and types that were implicitly referenced in some previous versions of F#. You may need to add an explicit reference to this DLL in order to compile this code. + 이 이름의 구문을 FSharp.PowerPack.dll에서 찾았습니다. 이 DLL에는 일부 이전 버전의 F#에서 암시적으로 참조된 모듈 및 형식이 일부 포함되어 있습니다. 이 코드를 컴파일하려면 이 DLL에 대한 명시적 참조를 추가해야 할 수 있습니다. + + + + This field is not mutable + 이 필드는 변경할 수 없습니다. + + + + The fields '{0}' and '{1}' are from different types + {0}' 필드와 '{1}' 필드의 소스 형식이 서로 다릅니다. + + + + '{0}' is bound twice in this pattern + '{0}'은(는) 이 패턴에서 두 번 바인딩되었습니다. + + + + A use of the function '{0}' does not match a type inferred elsewhere. The inferred type of the function is\n {1}. \nThe type of the function required at this point of use is\n {2} {3}\nThis error may be due to limitations associated with generic recursion within a 'let rec' collection or within a group of classes. Consider giving a full type signature for the targets of recursive calls including type annotations for both argument and return types. + {0}' 함수의 사용이 다른 위치에서 유추된 형식과 일치하지 않습니다. 함수의 유추 형식은\n {1}입니다. \n여기서 필요한 함수의 형식은\n {2}입니다. {3}\n이 오류는 'let rec' 컬렉션 또는 클래스 그룹 내에서 제네릭 재귀와 관련된 제한으로 인해 발생할 수 있습니다. 인수 및 반환 형식 모두에 대한 형식 주석을 비롯하여 재귀적 호출의 대상에 전체 형식 시그니처를 지정하세요. + + + + Invalid runtime coercion or type test from type {0} to {1}\n{2} + 런타임 강제 변환 또는 형식 테스트(소스: {0} 형식, 대상: {1} 형식)가 잘못되었습니다.\n{2} + + + + This runtime coercion or type test from type\n {0} \n to \n {1} \ninvolves an indeterminate type based on information prior to this program point. Runtime type tests are not allowed on some types. Further type annotations are needed. + 이 런타임 강제 변환 또는 형식 테스트(소스:\n {0} 형식, \n대상: \n {1} 형식)를 \n수행하려면 이 프로그램 지점 전의 정보를 기반으로 하는 확인할 수 없는 형식이 필요합니다. 일부 형식의 경우 런타임 형식 테스트가 허용되지 않습니다. 형식 주석이 더 필요합니다. + + + + The static coercion from type\n {0} \nto \n {1} \n involves an indeterminate type based on information prior to this program point. Static coercions are not allowed on some types. Further type annotations are needed. + 정적 강제 변환(소스:\n {0} 형식, \n대상: \n {1} 형식)을 \n수행하려면 이 프로그램 지점 전의 정보를 기반으로 하는 확인할 수 없는 형식이 필요합니다. 일부 형식의 경우 정적 강제 변환이 허용되지 않습니다. 형식 주석이 더 필요합니다. + + + + A coercion from the value type \n {0} \nto the type \n {1} \nwill involve boxing. Consider using 'box' instead + 값 형식 \n {0}을(를) \n{1} 형식으로 \n 강제 변환하려면 \nboxing이 필요합니다. 대신 'box'를 사용하세요. + + + + This type is 'abstract' since some abstract members have not been given an implementation. If this is intentional then add the '[<AbstractClass>]' attribute to your type. + 일부 추상 멤버에 구현이 지정되지 않았으므로 이 형식은 'abstract'입니다. 의도적으로 구현을 지정하지 않은 경우에는 형식에 '[<AbstractClass>]' 특성을 추가하세요. + + + + This construct causes code to be less generic than indicated by its type annotations. The type variable implied by the use of a '#', '_' or other type annotation at or near '{0}' has been constrained to be type '{1}'. + 이 구문을 사용하면 코드가 해당 형식 주석에 표시된 것보다 일반적이지 않게 됩니다. '{0}' 또는 이 근처에서 '#', '_' 또는 기타 형식 주석을 사용하여 암시된 형식 변수가 '{1}' 형식으로 제한되었습니다. + + + + This construct causes code to be less generic than indicated by the type annotations. The unit-of-measure variable '{0} has been constrained to be measure '{1}'. + 이 구문을 사용하면 코드가 해당 형식 주석에 표시된 것보다 일반적이지 않게 됩니다. 측정 단위 변수 '{0}'은(는) 측정값 '{1}'(으)로 제한되었습니다. + + + + This construct causes code to be less generic than indicated by the type annotations. The type variable '{0} has been constrained to be type '{1}'. + 이 구문을 사용하면 코드가 해당 형식 주석에 표시된 것보다 일반적이지 않게 됩니다. 형식 변수 '{0}'은(는) '{1}' 형식으로 제한되었습니다. + + + + identifier + 식별자 + + + + integer literal + 정수 리터럴 + + + + floating point literal + 부동 소수점 리터럴 + + + + decimal literal + 10진 리터럴 + + + + character literal + 문자 리터럴 + + + + keyword 'base' + 'base' 키워드 + + + + symbol '(*)' + '(*)' 기호 + + + + symbol '$' + '$' 기호 + + + + infix operator + 중위 연산자 + + + + infix operator + 중위 연산자 + + + + symbol ':>' + ':>' 기호 + + + + symbol '::' + '::' 기호 + + + + symbol '{0} + '{0}' 기호 + + + + infix operator + 중위 연산자 + + + + infix operator + 중위 연산자 + + + + infix operator + 중위 연산자 + + + + prefix operator + 전위 연산자 + + + + symbol ':?>' + ':?>' 기호 + + + + infix operator + 중위 연산자 + + + + infix operator + 중위 연산자 + + + + symbol '&' + '&' 기호 + + + + symbol '&&' + '&&' 기호 + + + + symbol '||' + '||' 기호 + + + + symbol '<' + '<' 기호 + + + + symbol '>' + '>' 기호 + + + + symbol '?' + '?' 기호 + + + + symbol '??' + '??' 기호 + + + + symbol ':?' + ':?' 기호 + + + + integer.. + 정수.. + + + + symbol '..' + '..' 기호 + + + + quote symbol + 인용 기호 + + + + symbol '*' + '*' 기호 + + + + type application + 형식 적용 + + + + symbol ':' + ':' 기호 + + + + symbol ':=' + ':=' 기호 + + + + symbol '<-' + '<-' 기호 + + + + symbol '=' + '=' 기호 + + + + symbol '>|]' + '>|]' 기호 + + + + symbol '-' + '-' 기호 + + + + prefix operator + 전위 연산자 + + + + operator name + 연산자 이름 + + + + symbol ',' + ',' 기호 + + + + symbol '.' + '.' 기호 + + + + symbol '|' + '|' 기호 + + + + symbol # + # 기호 + + + + symbol '_' + '_' 기호 + + + + symbol ';' + ';' 기호 + + + + symbol ';;' + ';;' 기호 + + + + symbol '(' + '(' 기호 + + + + symbol ')' + ')' 기호 + + + + symbol 'splice' + 'splice' 기호 + + + + start of quotation + 인용구의 시작 + + + + symbol '[' + '[' 기호 + + + + symbol '[|' + '[|' 기호 + + + + symbol '[<' + '[<' 기호 + + + + symbol '{' + '{' 기호 + + + + symbol '{<' + '{<' 기호 + + + + symbol '|]' + '|]' 기호 + + + + symbol '>}' + '>}' 기호 + + + + symbol '>]' + '>]' 기호 + + + + end of quotation + 인용구의 끝 + + + + symbol ']' + ']' 기호 + + + + symbol '}' + '}' 기호 + + + + keyword 'public' + 'public' 키워드 + + + + keyword 'private' + 'private' 키워드 + + + + keyword 'internal' + 'internal' 키워드 + + + + keyword 'fixed' + 키워드 '수정됨' + + + + keyword 'constraint' + 'constraint' 키워드 + + + + keyword 'instance' + 'instance' 키워드 + + + + keyword 'delegate' + 'delegate' 키워드 + + + + keyword 'inherit' + 'inherit' 키워드 + + + + keyword 'constructor' + 'constructor' 키워드 + + + + keyword 'default' + 'default' 키워드 + + + + keyword 'override' + 'override' 키워드 + + + + keyword 'abstract' + 'abstract' 키워드 + + + + keyword 'class' + 'class' 키워드 + + + + keyword 'member' + 'member' 키워드 + + + + keyword 'static' + 'static' 키워드 + + + + keyword 'namespace' + 'namespace' 키워드 + + + + start of structured construct + 구조적 구문의 시작 + + + + incomplete structured construct at or before this point + 이 지점 또는 이 지점 전의 불완전한 구조적 구문 + + + + Incomplete structured construct at or before this point + 이 지점 또는 이 지점 전에서 구조적 구문이 완전하지 않습니다. + + + + keyword 'then' + 'then' 키워드 + + + + keyword 'else' + 'else' 키워드 + + + + keyword 'let' or 'use' + 'let' 또는 'use' 키워드 + + + + binder keyword + 바인더 키워드 + + + + keyword 'do' + 'do' 키워드 + + + + keyword 'const' + 키워드 'const' + + + + keyword 'with' + 'with' 키워드 + + + + keyword 'function' + 'function' 키워드 + + + + keyword 'fun' + 'fun' 키워드 + + + + end of input + 입력의 끝 + + + + internal dummy token + 내부 더미 토큰 + + + + keyword 'do!' + 'do!' 키워드 + + + + yield + yield + + + + yield! + yield! + + + + keyword 'interface' + 'interface' 키워드 + + + + keyword 'elif' + 'elif' 키워드 + + + + symbol '->' + '->' 기호 + + + + keyword 'sig' + 'sig' 키워드 + + + + keyword 'struct' + 'struct' 키워드 + + + + keyword 'upcast' + 'upcast' 키워드 + + + + keyword 'downcast' + 'downcast' 키워드 + + + + keyword 'null' + 'null' 키워드 + + + + reserved keyword + 예약된 키워드 + + + + keyword 'module' + 'module' 키워드 + + + + keyword 'and' + 'and' 키워드 + + + + keyword 'as' + 'as' 키워드 + + + + keyword 'assert' + 'assert' 키워드 + + + + keyword 'asr' + 'asr' 키워드 + + + + keyword 'downto' + 'downto' 키워드 + + + + keyword 'exception' + 'exception' 키워드 + + + + keyword 'false' + 'false' 키워드 + + + + keyword 'for' + 'for' 키워드 + + + + keyword 'fun' + 'fun' 키워드 + + + + keyword 'function' + 'function' 키워드 + + + + keyword 'finally' + 'finally' 키워드 + + + + keyword 'lazy' + 'lazy' 키워드 + + + + keyword 'match' + 'match' 키워드 + + + + keyword 'match!' + 'match!' 키워드 + + + + keyword 'mutable' + 'mutable' 키워드 + + + + keyword 'new' + 'new' 키워드 + + + + keyword 'of' + 'of' 키워드 + + + + keyword 'open' + 'open' 키워드 + + + + keyword 'or' + 'or' 키워드 + + + + keyword 'void' + 'void' 키워드 + + + + keyword 'extern' + 'extern' 키워드 + + + + keyword 'interface' + 'interface' 키워드 + + + + keyword 'rec' + 'rec' 키워드 + + + + keyword 'to' + 'to' 키워드 + + + + keyword 'true' + 'true' 키워드 + + + + keyword 'try' + 'try' 키워드 + + + + keyword 'type' + 'type' 키워드 + + + + keyword 'val' + 'val' 키워드 + + + + keyword 'inline' + 'inline' 키워드 + + + + keyword 'when' + 'when' 키워드 + + + + keyword 'while' + 'while' 키워드 + + + + keyword 'with' + 'with' 키워드 + + + + keyword 'if' + 'if' 키워드 + + + + keyword 'do' + 'do' 키워드 + + + + keyword 'global' + 'global' 키워드 + + + + keyword 'done' + 'done' 키워드 + + + + keyword 'in' + 'in' 키워드 + + + + symbol '(' + '(' 기호 + + + + symbol'[' + '[' 기호 + + + + keyword 'begin' + 'begin' 키워드 + + + + keyword 'end' + 'end' 키워드 + + + + directive + 지시문 + + + + inactive code + 비활성 코드 + + + + lex failure + lex 실패 + + + + whitespace + 공백 + + + + comment + 주석 + + + + line comment + 줄 주석 + + + + string text + 문자열 텍스트 + + + + compiler generated literal + 컴파일러 생성 리터럴 + + + + byte array literal + 바이트 배열 리터럴 + + + + string literal + 문자열 리터럴 + + + + end of input + 입력의 끝 + + + + Unexpected end of input + 예기치 않은 입력의 끝입니다. + + + + Unexpected {0} + 예기치 않은 {0}입니다. + + + + in interaction + 상호 작용 + + + + in directive + 지시문 + + + + in field declaration + 필드 선언 + + + + in discriminated union case declaration + 구분된 공용 구조체 케이스 선언 + + + + in binding + 바인딩 + + + + in binding + 바인딩 + + + + in member definition + 멤버 정의 + + + + in definitions + 정의 + + + + in member signature + 멤버 시그니처 + + + + in value signature + 값 시그니처 + + + + in type signature + 형식 시그니처 + + + + in lambda expression + 람다 식 + + + + in union case + 공용 구조체 케이스 + + + + in extern declaration + extern 선언 + + + + in object expression + 개체 식 + + + + in if/then/else expression + if/then/else 식 + + + + in open declaration + 열려 있는 선언 + + + + in module or namespace signature + 모듈 또는 네임스페이스 시그니처 + + + + in pattern matching + 패턴 일치 + + + + in begin/end expression + begin/end 식 + + + + in record expression + 레코드 식 + + + + in type definition + 형식 정의 + + + + in exception definition + 예외 정의 + + + + in type name + 형식 이름 + + + + in attribute list + 특성 목록 + + + + in quotation literal + 인용구 리터럴 + + + + in type constraint + 형식 제약 조건 + + + + in implementation file + 구현 파일 + + + + in definition + 정의 + + + + in signature file + 시그니처 파일 + + + + in pattern + 패턴 + + + + in expression + + + + + in type + 형식 + + + + in type arguments + 형식 인수 + + + + keyword + 키워드 + + + + symbol + 기호 + + + + (due to indentation-aware syntax) + (들여쓰기 인식 구문 때문) + + + + . Expected {0} or other token. + {0} 또는 기타 토큰이 필요합니다. + + + + . Expected {0}, {1} or other token. + {0}, {1} 또는 기타 토큰이 필요합니다. + + + + . Expected {0}, {1}, {2} or other token. + {0}, {1}, {2} 또는 기타 토큰이 필요합니다. + + + + The type '{0}' cannot be used as the source of a type test or runtime coercion + '{0}' 형식은 형식 테스트 또는 런타임 강제 변환의 소스로 사용할 수 없습니다. + + + + The type '{0}' does not have any proper subtypes and cannot be used as the source of a type test or runtime coercion. + '{0}' 형식에 적절한 하위 형식이 없으며 해당 형식을 형식 테스트 또는 런타임 강제 변환의 소스로 사용할 수 없습니다. + + + + The type '{0}' does not have any proper subtypes and need not be used as the target of a static coercion + '{0}' 형식에 적절한 하위 형식이 없으며 해당 형식을 정적 강제 변환의 대상으로 사용할 필요가 없습니다. + + + + This upcast is unnecessary - the types are identical + 이 업캐스트는 불필요합니다. 형식이 동일합니다. + + + + This type test or downcast will always hold + 이 형식 테스트 또는 다운캐스트는 항상 보류됩니다. + + + + The member '{0}' does not have the correct type to override any given virtual method + '{0}' 멤버에 임의의 지정된 가상 메서드를 재정의하기 위한 올바른 형식이 없습니다. + + + + The member '{0}' does not have the correct type to override the corresponding abstract method. + '{0}' 멤버에 해당하는 추상 메서드를 재정의하기 위한 올바른 형식이 없습니다. + + + + The required signature is '{0}'. + 필요한 시그니처는 '{0}'입니다. + + + + The member '{0}' is specialized with 'unit' but 'unit' can't be used as return type of an abstract method parameterized on return type. + '{0}' 멤버가 'unit'으로 특수화되었지만 'unit'은 반환 형식에 대한 매개 변수가 있는 추상 메서드의 반환 형식으로 사용될 수 없습니다. + + + + This constructor is applied to {0} argument(s) but expects {1} + 이 생성자는 {0}개의 인수에 적용되었지만 {1}개를 필요로 합니다. + + + + The two sides of this 'or' pattern bind different sets of variables + 이 'or' 패턴의 양쪽이 서로 다른 변수 집합을 바인딩합니다. + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \n{3}. + {0}' 모듈에\n {1}이(가) 포함되어 있지만 \n해당 시그니처는\n {2}을(를) 지정합니다. \n{3}. + + + + Module '{0}' requires a {1} '{2}' + {0}' 모듈에는 {1} '{2}'이(가) 필요합니다. + + + + The use of native pointers may result in unverifiable .NET IL code + 기본 포인터를 사용하면 확인할 수 없는 .NET IL 코드가 생성될 수 있습니다. + + + + {0} + {0} + + + + Thread static and context static 'let' bindings are deprecated. Instead use a declaration of the form 'static val mutable <ident> : <type>' in a class. Add the 'DefaultValue' attribute to this declaration to indicate that the value is initialized to the default value on each new thread. + Thread 정적 및 Context 정적 'let' 바인딩은 사용되지 않습니다. 대신 클래스에 'static val mutable <ident> : <type>' 형식의 선언을 사용하세요. 값이 각 새 스레드에서 기본값으로 초기화됨을 나타내려면 'DefaultValue' 특성을 추가하세요. + + + + This expression is a function value, i.e. is missing arguments. Its type is {0}. + 이 식은 함수 값입니다. 즉, 인수가 없습니다. 해당 형식은 {0}입니다. + + + + The result of this expression has type '{0}' and is implicitly ignored. Consider using 'ignore' to discard this value explicitly, e.g. 'expr |> ignore', or 'let' to bind the result to a name, e.g. 'let result = expr'. + 이 식의 결과는 ‘{0}’ 형식이며 암시적으로 무시됩니다. 'ignore'를 사용하여 이 값을 명시적으로 버리거나(예: 'expr |> ignore'), 'let'을 사용하여 결과를 이름에 바인딩하세요(예: 'let result = expr'). + + + + The result of this equality expression has type '{0}' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. + 이 같음 식의 결과는 ‘{0}’ 형식이며 암시적으로 삭제됩니다. 결과를 이름에 바인딩하려면 'let'을 사용하세요(예: 'let result = expression'). + + + + The result of this equality expression has type '{0}' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to set a value to a property, then use the '<-' operator e.g. '{1}.{2} <- expression'. + 이 같음 식의 결과는 ‘{0}’ 형식이며 암시적으로 삭제됩니다. 결과를 이름에 바인딩하려면 'let'을 사용하세요(예: 'let result = expression'). 값을 속성으로 설정하려면 '<-' 연산자를 사용하세요(예: '{1}.{2} <- expression'). + + + + The result of this equality expression has type '{0}' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to mutate a value, then mark the value 'mutable' and use the '<-' operator e.g. '{1} <- expression'. + 이 같음 식의 결과는 ‘{0}’ 형식이며 암시적으로 삭제됩니다. 결과를 이름에 바인딩하려면 'let'을 사용하세요(예: 'let result = expression'). 값을 변경하려면 값을 'mutable'로 표시하고 '<-' 연산자를 사용하세요(예: '{1} <- expression'). + + + + The result of this equality expression has type '{0}' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to mutate a value, then use the '<-' operator e.g. '{1} <- expression'. + 이 같음 식의 결과는 ‘{0}’ 형식이며 암시적으로 삭제됩니다. 결과를 이름에 바인딩하려면 'let'을 사용하세요(예: 'let result = expression'). 값을 변경하려면 '<-' 연산자를 사용하세요(예: '{1} <- expression'). + + + + This recursive use will be checked for initialization-soundness at runtime. This warning is usually harmless, and may be suppressed by using '#nowarn "21"' or '--nowarn:21'. + 이러한 재귀적 사용은 런타임에 초기화 적합성이 확인됩니다. 이 경고는 일반적으로 무해하며 '#nowarn "21"' 또는 '--nowarn:21'을 사용하여 표시하지 않을 수 있습니다. + + + + The value '{0}' will be evaluated as part of its own definition + 값 '{0}'은(는) 자체 정의의 일부로 계산됩니다. + + + + This value will be eventually evaluated as part of its own definition. You may need to make the value lazy or a function. Value '{0}'{1}. + 이 값은 결국 자체 정의의 일부로 계산됩니다. 값을 지연 값 또는 함수로 만들어야 할 수 있습니다. 값 '{0}'{1}입니다. + + + + will evaluate '{0}' + '{0}'을(를) 계산합니다. + + + + Bindings may be executed out-of-order because of this forward reference. + 이 전방 참조로 인해 바인딩을 순서에 상관없이 실행할 수 있습니다. + + + + This and other recursive references to the object(s) being defined will be checked for initialization-soundness at runtime through the use of a delayed reference. This is because you are defining one or more recursive objects, rather than recursive functions. This warning may be suppressed by using '#nowarn "40"' or '--nowarn:40'. + 이 재귀 참조와 정의 대상 개체에 대한 기타 재귀 참조는 런타임에 지연된 참조를 사용하여 초기화 적합성이 확인됩니다. 이는 사용자가 재귀 함수 대신 하나 이상의 재귀적 개체를 정의하기 때문입니다. 이 경고는 '#nowarn "40"' 또는 '--nowarn:40'을 사용하여 표시하지 않을 수 있습니다. + + + + Recursive references to the object being defined will be checked for initialization soundness at runtime through the use of a delayed reference. Consider placing self-references in members or within a trailing expression of the form '<ctor-expr> then <expr>'. + 정의 대상 개체에 대한 재귀 참조는 런타임에 지연된 참조를 사용하여 초기화 적합성이 확인됩니다. 멤버 또는 '<ctor-expr> then <expr>' 형식의 후행 식 내에 자기 참조를 배치하세요. + + + + Recursive references to the object being defined will be checked for initialization soundness at runtime through the use of a delayed reference. Consider placing self-references within 'do' statements after the last 'let' binding in the construction sequence. + 정의 대상 개체에 대한 재귀 참조는 런타임에 지연된 참조를 사용하여 초기화 적합성이 확인됩니다. 생성 시퀀스의 'do' 문 내에서 마지막 'let' 바인딩 다음에 자기 참조를 배치하세요. + + + + The containing type can use 'null' as a representation value for its nullary union case. Invoking an abstract or virtual member or an interface implementation on a null value will lead to an exception. If necessary add a dummy data value to the nullary constructor to avoid 'null' being used as a representation for this type. + 포함하는 형식은 'null'을 해당 nullary 공용 구조체 케이스에 대한 표현 값으로 사용할 수 있습니다. null 값에 대해 추상 또는 가상 멤버나 인터페이스 구현을 호출하면 예외가 발생합니다. 필요한 경우 nullary 생성자에 더미 데이터 값을 추가하여 'null'이 이 형식의 표현으로 사용되지 않게 하세요. + + + + The containing type can use 'null' as a representation value for its nullary union case. This member will be compiled as a static member. + 포함하는 형식은 'null'을 해당 nullary 공용 구조체 케이스에 대한 표현 값으로 사용할 수 있습니다. 이 멤버는 정적 멤버로 컴파일됩니다. + + + + The member '{0}' doesn't correspond to a unique abstract slot based on name and argument count alone + '{0}' 멤버는 이름 및 인수 수만 볼 때 고유한 추상 슬롯에 해당하지 않습니다. + + + + . Multiple implemented interfaces have a member with this name and argument count + 구현된 여러 인터페이스에 이 이름 및 인수 수가 지정된 멤버가 있습니다. + + + + . Consider implementing interfaces '{0}' and '{1}' explicitly. + '{0}' 및 '{1}' 인터페이스를 명시적으로 구현하세요. + + + + . Additional type annotations may be required to indicate the relevant override. This warning can be disabled using '#nowarn "70"' or '--nowarn:70'. + 관련 재정의를 나타내기 위해 추가 형식 주석이 필요할 수 있습니다. 이 경고는 '#nowarn "70"' 또는 '--nowarn:70'을 통해 사용할 수 없도록 설정할 수 있습니다. + + + + parse error + 구문 분석 오류 + + + + parse error: unexpected end of file + 구문 분석 오류: 예기치 않은 파일의 끝입니다. + + + + {0} + {0} + + + + internal error: {0} + 내부 오류: {0} + + + + {0} + {0} + + + + Incomplete pattern matches on this expression. + 이 식의 패턴 일치가 완전하지 않습니다. + + + + For example, the value '{0}' may indicate a case not covered by the pattern(s). + 예를 들어, 값 '{0}'은(는) 패턴에 포함되지 않은 케이스를 나타낼 수 있습니다. + + + + For example, the value '{0}' may indicate a case not covered by the pattern(s). However, a pattern rule with a 'when' clause might successfully match this value. + 예를 들어, 값 '{0}'은(는) 패턴에 포함되지 않은 케이스를 나타낼 수 있습니다. 그러나 'when' 절이 있는 패턴 규칙은 이 값과 성공적으로 일치할 수 있습니다. + + + + Unmatched elements will be ignored. + 일치하지 않는 요소는 무시됩니다. + + + + Enums may take values outside known cases. + 열거형이 알려진 사례를 벗어난 값을 사용할 수 있습니다. + + + + This rule will never be matched + 이 규칙은 일치시킬 수 없습니다. + + + + This value is not mutable. Consider using the mutable keyword, e.g. 'let mutable {0} = expression'. + 이 값은 변경할 수 없습니다. 변경 가능한 키워드(예: 'let mutable {0} = expression')를 사용하세요. + + + + This value is not local + 로컬 값이 아닙니다. + + + + This construct is deprecated + 이 구문은 사용되지 않습니다. + + + + . {0} + {0} + + + + {0}. This warning can be disabled using '--nowarn:57' or '#nowarn "57"'. + {0}. 이 경고는 '--nowarn:57' 또는 '#nowarn "57"'을 통해 사용할 수 없도록 설정할 수 있습니다. + + + + Uses of this construct may result in the generation of unverifiable .NET IL code. This warning can be disabled using '--nowarn:9' or '#nowarn "9"'. + 이 구문을 사용하면 확인할 수 없는 .NET IL 코드가 생성될 수 있습니다. 이 경고는 '--nowarn:9' 또는 '#nowarn "9"'를 통해 사용할 수 없도록 설정할 수 있습니다. + + + + This construct is deprecated: {0} + 이 구문은 사용되지 않습니다. {0} + + + + This construct is deprecated: it is only for use in the F# library + 이 구문은 사용되지 않으며 F# 라이브러리에서만 사용할 수 있습니다. + + + + The following fields require values: {0} + 다음 필드에는 값이 필요합니다. {0} + + + + Value restriction. The value '{0}' has generic type\n {1} \nEither make the arguments to '{2}' explicit or, if you do not intend for it to be generic, add a type annotation. + 값 제한이 있습니다. 값 '{0}'에 제네릭 형식\n {1}이(가) 있습니다. \n'{2}'에 대한 인수를 명시적으로 만들거나, 제네릭 요소로 만들지 않으려는 경우 형식 주석을 추가하세요. + + + + Value restriction. The value '{0}' has generic type\n {1} \nEither make '{2}' into a function with explicit arguments or, if you do not intend for it to be generic, add a type annotation. + 값 제한이 있습니다. 값 '{0}'에 제네릭 형식\n {1}이(가) 있습니다. \n'{2}'을(를) 명시적 인수가 포함된 함수로 만들거나, 제네릭 요소로 만들지 않으려는 경우 형식 주석을 추가하세요. + + + + Value restriction. This member has been inferred to have generic type\n {0} \nConstructors and property getters/setters cannot be more generic than the enclosing type. Add a type annotation to indicate the exact types involved. + 값 제한이 있습니다. 이 멤버는 제네릭 형식\n {0}을(를) 가지는 것으로 유추되었습니다. \n생성자 및 속성 getter/setter는 바깥쪽 형식보다 일반적일 수 없습니다. 형식 주석을 추가하여 관련 형식을 정확히 나타내세요. + + + + Value restriction. The value '{0}' has been inferred to have generic type\n {1} \nEither make the arguments to '{2}' explicit or, if you do not intend for it to be generic, add a type annotation. + 값 제한이 있습니다. 값 '{0}'은(는) 제네릭 형식\n {1}을(를) 가지는 것으로 유추되었습니다. \n'{2}'에 대한 인수를 명시적으로 만들거나, 제네릭 요소로 만들지 않으려는 경우 형식 주석을 추가하세요. + + + + Value restriction. The value '{0}' has been inferred to have generic type\n {1} \nEither define '{2}' as a simple data term, make it a function with explicit arguments or, if you do not intend for it to be generic, add a type annotation. + 값 제한이 있습니다. 값 '{0}'은(는) 제네릭 형식\n {1}을(를) 가지는 것으로 유추되었습니다. \n'{2}'을(를) 단순 데이터 용어로 정의하거나, 명시적 인수가 포함된 함수로 만들거나, 제네릭 요소로 만들지 않으려는 경우 형식 주석을 추가하세요. + + + + syntax error + 구문 오류입니다. + + + + {0} + {0} + + + + {0} + {0} + + + + Override implementations in augmentations are now deprecated. Override implementations should be given as part of the initial declaration of a type. + 확대의 재정의 구현은 이제 사용되지 않습니다. 재정의 구현은 초기 형식 선언의 일부로 지정해야 합니다. + + + + Override implementations should be given as part of the initial declaration of a type. + 재정의 구현은 초기 형식 선언의 일부로 지정해야 합니다. + + + + Interface implementations in augmentations are now deprecated. Interface implementations should be given on the initial declaration of a type. + 확대의 인터페이스 구현은 이제 사용되지 않습니다. 인터페이스 구현은 초기 형식 선언 시 지정해야 합니다. + + + + Interface implementations should be given on the initial declaration of a type. + 인터페이스 구현은 초기 형식 선언 시 지정해야 합니다. + + + + A required assembly reference is missing. You must add a reference to assembly '{0}'. + 필요한 어셈블리 참조가 없습니다. '{0}' 어셈블리에 대한 참조를 추가해야 합니다. + + + + The type referenced through '{0}' is defined in an assembly that is not referenced. You must add a reference to assembly '{1}'. + {0}'을(를) 통해 참조되는 형식이 참조되지 않는 어셈블리에 정의되어 있습니다. '{1}' 어셈블리에 대한 참조를 추가해야 합니다. + + + + #I directives may only occur in F# script files (extensions .fsx or .fsscript). Either move this code to a script file, add a '-I' compiler option for this reference or delimit the directive with delimit it with '#if INTERACTIVE'/'#endif'. + #I 지시문은 F# 스크립트 파일(확장명 .fsx 또는 .fsscript)에서만 발생할 수 있습니다. 이 코드를 스크립트 파일로 이동하거나, 이 참조에 대한 '-I' 컴파일러 옵션을 추가하거나, 지시문을 '#if INTERACTIVE'/'#endif'로 구분하세요. + + + + #r directives may only occur in F# script files (extensions .fsx or .fsscript). Either move this code to a script file or replace this reference with the '-r' compiler option. If this directive is being executed as user input, you may delimit it with '#if INTERACTIVE'/'#endif'. + #r 지시문은 F# 스크립트 파일(확장명 .fsx 또는 .fsscript)에서만 발생할 수 있습니다. 이 코드를 스크립트 파일로 이동하거나 이 참조를 '-r' 컴파일러 옵션으로 바꾸세요. 이 지시문이 사용자 입력으로 실행되는 경우 지시문을 '#if INTERACTIVE'/'#endif'로 구분할 수 있습니다. + + + + This directive may only be used in F# script files (extensions .fsx or .fsscript). Either remove the directive, move this code to a script file or delimit the directive with '#if INTERACTIVE'/'#endif'. + 이 지시문은 F# 스크립트 파일(확장명 .fsx 또는 .fsscript)에서만 사용할 수 있습니다. 지시문을 제거하거나, 이 코드를 스크립트 파일로 이동하거나, 지시문을 '#if INTERACTIVE'/'#endif'로 구분하세요. + + + + Unable to find the file '{0}' in any of\n {1} + 다음에서 '{0}' 파일을 찾을 수 없습니다.\n {1} + + + + Assembly reference '{0}' was not found or is invalid + 어셈블리 참조 '{0}'이(가) 없거나 잘못되었습니다. + + + + One or more warnings in loaded file.\n + 로드된 파일에 하나 이상의 경고가 있습니다.\n + + + + One or more errors in loaded file.\n + 로드된 파일에 하나 이상의 오류가 있습니다.\n + + + + Loaded files may only be F# source files (extension .fs). This F# script file (.fsx or .fsscript) will be treated as an F# source file + 로드된 파일은 F# 소스 파일(확장명 .fs)일 수만 있습니다. 이 F# 스크립트 파일(.fsx 또는 .fsscript)은 F# 소스 파일로 처리됩니다. + + + + Invalid assembly name '{0}' from InternalsVisibleTo attribute in {1} + {1}에 있는 InternalsVisibleTo 특성의 어셈블리 이름 '{0}'이(가) 잘못되었습니다. + + + + Invalid assembly name '{0}' from InternalsVisibleTo attribute (assembly filename not available) + InternalsVisibleTo 특성의 어셈블리 이름 '{0}'이(가) 잘못되었습니다. 어셈블리 파일 이름을 사용할 수 없습니다. + + + + Could not load file '{0}' because it does not exist or is inaccessible + '{0}' 파일이 없거나 이 파일에 액세스할 수 없으므로 파일을 로드할 수 없습니다. + + + + {0} (Code={1}) + {0}(코드={1}) + + + + internal error: {0} + 내부 오류: {0} + + + + + \ No newline at end of file diff --git a/src/fsharp/xlf/FSStrings.pl.xlf b/src/fsharp/xlf/FSStrings.pl.xlf new file mode 100644 index 00000000000..b634fb8ab9d --- /dev/null +++ b/src/fsharp/xlf/FSStrings.pl.xlf @@ -0,0 +1,1622 @@ + + + + + + . See also {0}. + . Zobacz też {0}. + + + + The tuples have differing lengths of {0} and {1} + Krotki mają różną długość ({0} i {1}) + + + + The types '{0}' and '{1}' cannot be unified. + Typy „{0}” i „{1}” nie mogą zostać ujednolicone. + + + + A type parameter is missing a constraint '{0}' + W parametrze typu brakuje ograniczenia „{0}” + + + + The unit of measure '{0}' does not match the unit of measure '{1}' + Jednostka miary „{0}” nie jest zgodna z jednostką miary „{1}” + + + + The type '{0}' does not match the type '{1}' + Typ „{0}” nie jest zgodny z typem „{1}” + + + + The type '{0}' is not compatible with the type '{1}'{2} + Typ „{0}” nie jest zgodny z typem „{1}”{2} + + + + This expression was expected to have type\n '{1}' \nbut here has type\n '{0}' {2} + Oczekiwany typ tego wyrażenia:\n „{1}” \nTyp w tym miejscu:\n „{0}” {2} + + + + Type mismatch. Expecting a\n '{0}' \nbut given a\n '{1}' {2}\n + Niezgodność typów. Oczekiwany typ:\n „{0}” \nOtrzymany typ:\n „{1}” {2}\n + + + + Type constraint mismatch when applying the default type '{0}' for a type inference variable. + Niezgodność ograniczeń podczas stosowania typu domyślnego „{0}” zmiennej wnioskowania typu. + + + + Consider adding further type constraints + Rozważ dodanie kolejnych ograniczeń typów + + + + Type constraint mismatch. The type \n '{0}' \nis not compatible with type\n '{1}' {2}\n + Niezgodność ograniczeń typów. Typ \n „{0}” \nnie jest zgodny z typem\n „{1}” {2}\n + + + + Uppercase variable identifiers should not generally be used in patterns, and may indicate a misspelt pattern name. + Identyfikatory zmiennych pisane wielkimi literami nie powinny być używane we wzorcach i mogą oznaczać nazwę wzorca z błędami pisowni. + + + + Discriminated union cases and exception labels must be uppercase identifiers + Rozróżniane przypadki unii i etykiety wyjątków muszą mieć postać identyfikatorów pisanych wielkimi literami + + + + Possible overload: '{0}'. {1}. + Możliwe przeciążenie: „{0}”. {1}. + + + + \n\nPossible best overload: '{0}'. + \n\nNajlepsze możliwe przeciążenie: „{0}”. + + + + This function takes too many arguments, or is used in a context where a function is not expected + Ta funkcja akceptuje za dużo argumentów lub jest używana w kontekście, w którym funkcja nie jest oczekiwana + + + + Member constraints with the name '{0}' are given special status by the F# compiler as certain .NET types are implicitly augmented with this member. This may result in runtime failures if you attempt to invoke the member constraint from your own code. + Ograniczenia elementu członkowskiego o nazwie „{0}” mają specjalny stan określony przez kompilator języka F#, ponieważ pewne typy platformy .NET zostały niejawnie rozszerzone przy użyciu tego elementu członkowskiego. Może to powodować błędy środowiska uruchomieniowego, jeśli będziesz próbować wywołać ograniczenie elementu członkowskiego ze swojego kodu. + + + + A definition to be compiled as a .NET event does not have the expected form. Only property members can be compiled as .NET events. + Definicja, która ma zostać skompilowana jako zdarzenie platformy .NET, nie ma oczekiwanej formy. Tylko elementy członkowskie właściwości mogą być kompilowane jako zdarzenia platformy .NET. + + + + Implicit object constructors for structs must take at least one argument + Niejawne konstruktory obiektów struktur muszą akceptować co najmniej jeden argument + + + + The type implements the interface '{0}' but this is not revealed by the signature. You should list the interface in the signature, as the interface will be discoverable via dynamic type casts and/or reflection. + Typ zawiera implementację interfejsu „{0}”, ale nie uwzględniono tego w sygnaturze. Dodaj interfejs do sygnatury, ponieważ interfejs będzie wykrywalny przez rzutowanie i/lub dynamiczne odbicia typów. + + + + The type '{0}' expects {1} type argument(s) but is given {2} + Typ „{0}” oczekuje następującej liczby argumentów typu: {1}. Podana liczba argumentów: {2} + + + + Lookup on object of indeterminate type based on information prior to this program point. A type annotation may be needed prior to this program point to constrain the type of the object. This may allow the lookup to be resolved. + Odnośnik do obiektu nieokreślonego typu na podstawie informacji przed tym punktem programu. Może być wymagana adnotacja typu przed tym punktem programu w celu ograniczenia typu obiektu. Może to umożliwić rozpoznanie odnośnika. + + + + Duplicate definition of {0} '{1}' + Zduplikowana definicja elementu {0} „{1}” + + + + The {0} '{1}' can not be defined because the name '{2}' clashes with the {3} '{4}' in this type or module + Nie można zdefiniować elementu {0} „{1}”, ponieważ nazwa „{2}” powoduje konflikt z elementem {3} „{4}” w tym typie lub module + + + + Two members called '{0}' have the same signature + Dwa elementy członkowskie o nazwie „{0}” mają taką samą sygnaturę + + + + Duplicate definition of {0} '{1}' + Zduplikowana definicja elementu {0} „{1}” + + + + A construct with this name was found in FSharp.PowerPack.dll, which contains some modules and types that were implicitly referenced in some previous versions of F#. You may need to add an explicit reference to this DLL in order to compile this code. + Konstrukcję o tej nazwie odnaleziono w pliku FSharp.PowerPack.dll. Zawiera on pewne moduły i typy, których dotyczyły niejawne odwołania w niektórych wcześniejszych wersjach języka F#. Skompilowanie tego kodu może wymagać dodania jawnego odwołania do tego pliku DLL. + + + + This field is not mutable + Nie można modyfikować tego pola + + + + The fields '{0}' and '{1}' are from different types + Pola „{0}” i „{1}” są polami różnego typu + + + + '{0}' is bound twice in this pattern + Zmienna „{0}” została powiązana dwa razy w tym wzorcu + + + + A use of the function '{0}' does not match a type inferred elsewhere. The inferred type of the function is\n {1}. \nThe type of the function required at this point of use is\n {2} {3}\nThis error may be due to limitations associated with generic recursion within a 'let rec' collection or within a group of classes. Consider giving a full type signature for the targets of recursive calls including type annotations for both argument and return types. + Użycie funkcji „{0}” nie jest zgodne z typem wywnioskowanym w innym miejscu. Wywnioskowany typ funkcji:\n {1}. \nTyp funkcji wymagany w tym punkcie użycia:\n {2} {3}\nTen błąd może być spowodowany przez ograniczenia związane z ogólnym cyklem w kolekcji „let rec” lub grupie klas. Rozważ określenie pełnej sygnatury typu dla elementów docelowych wywołań cyklicznych, łącznie z adnotacjami typów dla typów argumentów i zwracanych typów. + + + + Invalid runtime coercion or type test from type {0} to {1}\n{2} + Nieprawidłowa koercja środowiska uruchomieniowego lub test typu z typu {0} w typ {1}\n{2} + + + + This runtime coercion or type test from type\n {0} \n to \n {1} \ninvolves an indeterminate type based on information prior to this program point. Runtime type tests are not allowed on some types. Further type annotations are needed. + Ta koercja środowiska uruchomieniowego lub ten test typu z typu\n {0} \n w typ \n {1} \nobejmuje nieokreślony typ na podstawie informacji przed tym punktem programu. Testy typów środowiska uruchomieniowego nie są dozwolone w przypadku niektórych typów. Wymagane są dodatkowe adnotacje typów. + + + + The static coercion from type\n {0} \nto \n {1} \n involves an indeterminate type based on information prior to this program point. Static coercions are not allowed on some types. Further type annotations are needed. + Koercja statyczna z typu\n {0} \n w typ \n {1} \n obejmuje nieokreślony typ na podstawie informacji przed tym punktem programu. Koercje statyczne nie są dozwolone w przypadku niektórych typów. Wymagane są dodatkowe adnotacje typów. + + + + A coercion from the value type \n {0} \nto the type \n {1} \nwill involve boxing. Consider using 'box' instead + Koercja typu wartości \n {0} \nw typ \n {1} \nobejmuje konwersję boxing. Zamiast tego rozważ użycie instrukcji „box” + + + + This type is 'abstract' since some abstract members have not been given an implementation. If this is intentional then add the '[<AbstractClass>]' attribute to your type. + Ten typ ma wartość „abstract”, ponieważ niektóre abstrakcyjne elementy członkowskie nie mają określonej implementacji. Jeśli jest to zamierzone działanie, dodaj atrybut „[<AbstractClass>]” do typu. + + + + This construct causes code to be less generic than indicated by its type annotations. The type variable implied by the use of a '#', '_' or other type annotation at or near '{0}' has been constrained to be type '{1}'. + Ta konstrukcja powoduje, że kod jest mniej ogólny niż określają to adnotacje typu. Zmienna typu implikowana przy użyciu znaku „#” lub „_” albo innej adnotacji typu w miejscu „{0}” lub w jego pobliżu została ograniczona do typu „{1}”. + + + + This construct causes code to be less generic than indicated by the type annotations. The unit-of-measure variable '{0} has been constrained to be measure '{1}'. + Ta konstrukcja powoduje, że kod jest mniej ogólny, niż określają to jego adnotacje typów. Zmienna jednostki miary „{0}” została ograniczona do miary „{1}”. + + + + This construct causes code to be less generic than indicated by the type annotations. The type variable '{0} has been constrained to be type '{1}'. + Ta konstrukcja powoduje, że kod jest mniej ogólny, niż określają to jego adnotacje typów. Zmienna typu „{0}” została ograniczona do typu „{1}”. + + + + identifier + identyfikator + + + + integer literal + literał całkowity + + + + floating point literal + literał zmiennoprzecinkowy + + + + decimal literal + literał dziesiętny + + + + character literal + literał znaków + + + + keyword 'base' + słowo kluczowe „base” + + + + symbol '(*)' + symbol „(*)” + + + + symbol '$' + symbol „$” + + + + infix operator + operator infiksu + + + + infix operator + operator infiksu + + + + symbol ':>' + symbol „:>” + + + + symbol '::' + symbol „::” + + + + symbol '{0} + symbol „{0}” + + + + infix operator + operator infiksu + + + + infix operator + operator infiksu + + + + infix operator + operator infiksu + + + + prefix operator + operator prefiksu + + + + symbol ':?>' + symbol „:?>” + + + + infix operator + operator infiksu + + + + infix operator + operator infiksu + + + + symbol '&' + symbol „&” + + + + symbol '&&' + symbol „&&” + + + + symbol '||' + symbol „||” + + + + symbol '<' + symbol „<” + + + + symbol '>' + symbol „>” + + + + symbol '?' + symbol „?” + + + + symbol '??' + symbol „??” + + + + symbol ':?' + symbol „:?” + + + + integer.. + liczba całkowita.. + + + + symbol '..' + symbol „..” + + + + quote symbol + symbol cudzysłowu + + + + symbol '*' + symbol „*” + + + + type application + zastosowanie typu + + + + symbol ':' + symbol „:” + + + + symbol ':=' + symbol „:=” + + + + symbol '<-' + symbol „<-” + + + + symbol '=' + symbol „=” + + + + symbol '>|]' + symbol „>|]” + + + + symbol '-' + symbol „-” + + + + prefix operator + operator prefiksu + + + + operator name + nazwa operatora + + + + symbol ',' + symbol „,” + + + + symbol '.' + symbol „.” + + + + symbol '|' + symbol „|” + + + + symbol # + symbol # + + + + symbol '_' + symbol „_” + + + + symbol ';' + symbol „;” + + + + symbol ';;' + symbol „;;” + + + + symbol '(' + symbol „(” + + + + symbol ')' + symbol „)” + + + + symbol 'splice' + symbol „splice” + + + + start of quotation + początek cytatu + + + + symbol '[' + symbol „[” + + + + symbol '[|' + symbol „[|” + + + + symbol '[<' + symbol „[<” + + + + symbol '{' + symbol „{” + + + + symbol '{<' + symbol „{<” + + + + symbol '|]' + symbol „|]” + + + + symbol '>}' + symbol „>}” + + + + symbol '>]' + symbol „>]” + + + + end of quotation + koniec cytatu + + + + symbol ']' + symbol „]” + + + + symbol '}' + symbol „}” + + + + keyword 'public' + słowo kluczowe „public” + + + + keyword 'private' + słowo kluczowe „private” + + + + keyword 'internal' + słowo kluczowe „internal” + + + + keyword 'fixed' + słowo kluczowe „naprawione” + + + + keyword 'constraint' + słowo kluczowe „constraint” + + + + keyword 'instance' + słowo kluczowe „instance” + + + + keyword 'delegate' + słowo kluczowe „delegate” + + + + keyword 'inherit' + słowo kluczowe „inherit” + + + + keyword 'constructor' + słowo kluczowe „constructor” + + + + keyword 'default' + słowo kluczowe „default” + + + + keyword 'override' + słowo kluczowe „override” + + + + keyword 'abstract' + słowo kluczowe „abstract” + + + + keyword 'class' + słowo kluczowe „class” + + + + keyword 'member' + słowo kluczowe „member” + + + + keyword 'static' + słowo kluczowe „static” + + + + keyword 'namespace' + słowo kluczowe „namespace” + + + + start of structured construct + początek konstrukcji strukturalnej + + + + incomplete structured construct at or before this point + niepełna konstrukcja strukturalna w tym punkcie lub przed nim + + + + Incomplete structured construct at or before this point + Niepełna konstrukcja strukturalna w tym punkcie lub przed nim + + + + keyword 'then' + słowo kluczowe „then” + + + + keyword 'else' + słowo kluczowe „else” + + + + keyword 'let' or 'use' + słowo kluczowe „let” lub „use” + + + + binder keyword + słowo kluczowe integratora + + + + keyword 'do' + słowo kluczowe „do” + + + + keyword 'const' + słowo kluczowe „const” + + + + keyword 'with' + słowo kluczowe „with” + + + + keyword 'function' + słowo kluczowe „function” + + + + keyword 'fun' + słowo kluczowe „fun” + + + + end of input + koniec danych wejściowych + + + + internal dummy token + wewnętrzny token fikcyjny + + + + keyword 'do!' + słowo kluczowe „do!” + + + + yield + yield + + + + yield! + yield! + + + + keyword 'interface' + słowo kluczowe „interface” + + + + keyword 'elif' + słowo kluczowe „elif” + + + + symbol '->' + symbol „->” + + + + keyword 'sig' + słowo kluczowe „sig” + + + + keyword 'struct' + słowo kluczowe „struct” + + + + keyword 'upcast' + słowo kluczowe „upcast” + + + + keyword 'downcast' + słowo kluczowe „downcast” + + + + keyword 'null' + słowo kluczowe „null” + + + + reserved keyword + zastrzeżone słowo kluczowe + + + + keyword 'module' + słowo kluczowe „module” + + + + keyword 'and' + słowo kluczowe „and” + + + + keyword 'as' + słowo kluczowe „as” + + + + keyword 'assert' + słowo kluczowe „assert” + + + + keyword 'asr' + słowo kluczowe „asr” + + + + keyword 'downto' + słowo kluczowe „downto” + + + + keyword 'exception' + słowo kluczowe „exception” + + + + keyword 'false' + słowo kluczowe „false” + + + + keyword 'for' + słowo kluczowe „for” + + + + keyword 'fun' + słowo kluczowe „fun” + + + + keyword 'function' + słowo kluczowe „function” + + + + keyword 'finally' + słowo kluczowe „finally” + + + + keyword 'lazy' + słowo kluczowe „lazy” + + + + keyword 'match' + słowo kluczowe „match” + + + + keyword 'match!' + słowo kluczowe „match!” + + + + keyword 'mutable' + słowo kluczowe „mutable” + + + + keyword 'new' + słowo kluczowe „new” + + + + keyword 'of' + słowo kluczowe „of” + + + + keyword 'open' + słowo kluczowe „open” + + + + keyword 'or' + słowo kluczowe „or” + + + + keyword 'void' + słowo kluczowe „void” + + + + keyword 'extern' + słowo kluczowe „extern” + + + + keyword 'interface' + słowo kluczowe „interface” + + + + keyword 'rec' + słowo kluczowe „rec” + + + + keyword 'to' + słowo kluczowe „to” + + + + keyword 'true' + słowo kluczowe „true” + + + + keyword 'try' + słowo kluczowe „try” + + + + keyword 'type' + słowo kluczowe „type” + + + + keyword 'val' + słowo kluczowe „val” + + + + keyword 'inline' + słowo kluczowe „inline” + + + + keyword 'when' + słowo kluczowe „when” + + + + keyword 'while' + słowo kluczowe „while” + + + + keyword 'with' + słowo kluczowe „with” + + + + keyword 'if' + słowo kluczowe „if” + + + + keyword 'do' + słowo kluczowe „do” + + + + keyword 'global' + słowo kluczowe „global” + + + + keyword 'done' + słowo kluczowe „done” + + + + keyword 'in' + słowo kluczowe „in” + + + + symbol '(' + symbol „(” + + + + symbol'[' + symbol „[” + + + + keyword 'begin' + słowo kluczowe „begin” + + + + keyword 'end' + słowo kluczowe „end” + + + + directive + dyrektywa + + + + inactive code + nieaktywny kod + + + + lex failure + błąd leksykonu + + + + whitespace + odstęp + + + + comment + komentarz + + + + line comment + komentarz wiersza + + + + string text + tekst ciągu + + + + compiler generated literal + wygenerowany literał kompilatora + + + + byte array literal + literał tablicy bajtów + + + + string literal + literał ciągu + + + + end of input + koniec danych wejściowych + + + + Unexpected end of input + Nieoczekiwany koniec danych wejściowych + + + + Unexpected {0} + Nieoczekiwany element {0} + + + + in interaction + w interakcji + + + + in directive + w dyrektywie + + + + in field declaration + w deklaracji pola + + + + in discriminated union case declaration + w deklaracji przypadku unii rozłącznej + + + + in binding + w powiązaniu + + + + in binding + w powiązaniu + + + + in member definition + w definicji elementu członkowskiego + + + + in definitions + w definicjach + + + + in member signature + w sygnaturze elementu członkowskiego + + + + in value signature + w sygnaturze wartości + + + + in type signature + w sygnaturze typu + + + + in lambda expression + w wyrażeniu lambda + + + + in union case + w przypadku unii + + + + in extern declaration + w deklaracji zewnętrznej + + + + in object expression + w wyrażeniu obiektu + + + + in if/then/else expression + w wyrażeniu if/then/else + + + + in open declaration + w otwartej deklaracji + + + + in module or namespace signature + w sygnaturze modułu lub przestrzeni nazw + + + + in pattern matching + w dopasowaniu wzorca + + + + in begin/end expression + w wyrażeniu begin/end + + + + in record expression + w wyrażeniu rekordu + + + + in type definition + w definicji typu + + + + in exception definition + w definicji wyjątku + + + + in type name + w nazwie typu + + + + in attribute list + na liście atrybutów + + + + in quotation literal + w literale cytatu + + + + in type constraint + w ograniczeniu typu + + + + in implementation file + w pliku implementacji + + + + in definition + w definicji + + + + in signature file + w pliku sygnatury + + + + in pattern + we wzorcu + + + + in expression + w wyrażeniu + + + + in type + w typie + + + + in type arguments + w argumentach typu + + + + keyword + słowo kluczowe + + + + symbol + symbol + + + + (due to indentation-aware syntax) + (z powodu składni uwzględniającej wcięcia) + + + + . Expected {0} or other token. + . Oczekiwany jest element {0} lub inny token. + + + + . Expected {0}, {1} or other token. + . Oczekiwany jest element {0}, {1} lub inny token. + + + + . Expected {0}, {1}, {2} or other token. + . Oczekiwany jest element {0}, {1}, {2} lub inny token. + + + + The type '{0}' cannot be used as the source of a type test or runtime coercion + Typ „{0}” nie może być używany jako źródło testu typu lub koercji środowiska uruchomieniowego + + + + The type '{0}' does not have any proper subtypes and cannot be used as the source of a type test or runtime coercion. + Typ „{0}” nie ma żadnych właściwych podtypów i nie może być używany jako źródło testu typu lub koercji środowiska uruchomieniowego. + + + + The type '{0}' does not have any proper subtypes and need not be used as the target of a static coercion + Typ „{0}” nie zawiera żadnych poprawnych podtypów i nie może być używany jako element docelowy przekształcenia statycznego + + + + This upcast is unnecessary - the types are identical + To przypisanie elementu nadrzędnego jest niepotrzebne — typy są identyczne + + + + This type test or downcast will always hold + Ten test typu lub to przypisanie elementu podrzędnego będą zawsze spełnione + + + + The member '{0}' does not have the correct type to override any given virtual method + Element członkowski „{0}” nie ma poprawnego typu do przesłonięcia żadnej podanej metody wirtualnej + + + + The member '{0}' does not have the correct type to override the corresponding abstract method. + Element członkowski „{0}” nie ma poprawnego typu do przesłonięcia odpowiedniej metody abstrakcyjnej. + + + + The required signature is '{0}'. + Wymagana sygnatura: „{0}”. + + + + The member '{0}' is specialized with 'unit' but 'unit' can't be used as return type of an abstract method parameterized on return type. + Element członkowski „{0}” jest wyspecjalizowany przy użyciu parametru „unit”, ale parametru „unit” nie można używać jako zwracanego typu metody abstrakcyjnej z parametrami zwracanego typu. + + + + This constructor is applied to {0} argument(s) but expects {1} + Ten konstruktor został zastosowany do następującej liczby argumentów: {0}. Oczekiwana liczba argumentów: {1} + + + + The two sides of this 'or' pattern bind different sets of variables + Dwie strony tego wzorca „or” tworzą powiązanie różnych zestawów zmiennych + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \n{3}. + Moduł „{0}” zawiera element\n {1} \nW podpisie modułu określono element\n {2} \n{3}. + + + + Module '{0}' requires a {1} '{2}' + Moduł „{0}” wymaga elementu {1} „{2}” + + + + The use of native pointers may result in unverifiable .NET IL code + Użycie wskaźników natywnych może spowodować utworzenie kodu .NET IL, którego nie można zweryfikować + + + + {0} + {0} + + + + Thread static and context static 'let' bindings are deprecated. Instead use a declaration of the form 'static val mutable <ident> : <type>' in a class. Add the 'DefaultValue' attribute to this declaration to indicate that the value is initialized to the default value on each new thread. + Powiązania „let” statyczne dla wątku i kontekstu są przestarzałe. Zamiast tego użyj deklaracji w postaci „static val mutable <identyfikator> : <typ>” w klasie. Dodaj atrybut „DefaultValue” do tej deklaracji, aby określić, że wartość jest inicjowana przy użyciu wartości domyślnej w każdym nowym wątku. + + + + This expression is a function value, i.e. is missing arguments. Its type is {0}. + To wyrażenie jest wartością funkcji, co oznacza, że brakuje argumentów. Typ wyrażenia: {0}. + + + + The result of this expression has type '{0}' and is implicitly ignored. Consider using 'ignore' to discard this value explicitly, e.g. 'expr |> ignore', or 'let' to bind the result to a name, e.g. 'let result = expr'. + Wynik tego wyrażenia ma typ „{0}” i jest niejawnie ignorowany. Rozważ użycie elementu „ignore”, aby jawnie odrzucić tę wartość (np. „expr |> ignore”), lub elementu „let”, aby powiązać wynik z nazwą (np. „let result = expr”). + + + + The result of this equality expression has type '{0}' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. + Wynik tego wyrażenia równości ma typ „{0}” i jest niejawnie odrzucany. Rozważ użycie słowa kluczowego „let” do powiązania wyniku z nazwą, np. „let wynik = wyrażenie”. + + + + The result of this equality expression has type '{0}' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to set a value to a property, then use the '<-' operator e.g. '{1}.{2} <- expression'. + Wynik tego wyrażenia równości ma typ „{0}” i jest niejawnie odrzucany. Rozważ użycie słowa kluczowego „let” do powiązania wyniku z nazwą, np. „let wynik = wyrażenie”. Jeśli chcesz ustawić wartość właściwości, użyj operatora „<-”, np. „{1}.{2} <- wyrażenie”. + + + + The result of this equality expression has type '{0}' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to mutate a value, then mark the value 'mutable' and use the '<-' operator e.g. '{1} <- expression'. + Wynik tego wyrażenia równości ma typ „{0}” i jest niejawnie odrzucany. Rozważ użycie słowa kluczowego „let” do powiązania wyniku z nazwą, np. „let wynik = wyrażenie”. Jeśli chcesz zmutować wartość, oznacz ją za pomocą deklaratora „mutable” i użyj operatora „<-”, np. „{1} <- wyrażenie”. + + + + The result of this equality expression has type '{0}' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to mutate a value, then use the '<-' operator e.g. '{1} <- expression'. + Wynik tego wyrażenia równości ma typ „{0}” i jest niejawnie odrzucany. Rozważ użycie słowa kluczowego „let” do powiązania wyniku z nazwą, np. „let wynik = wyrażenie”. Jeśli chcesz zmutować wartość, użyj operatora „<-”, np. „{1} <- wyrażenie”. + + + + This recursive use will be checked for initialization-soundness at runtime. This warning is usually harmless, and may be suppressed by using '#nowarn "21"' or '--nowarn:21'. + To użycie cykliczne zostanie sprawdzone pod kątem poprawności inicjalizacji w środowisku uruchomieniowym. To ostrzeżenie zazwyczaj nie jest szkodliwe i można je pominąć przy użyciu elementu „#nowarn "21"” lub „--nowarn:21”. + + + + The value '{0}' will be evaluated as part of its own definition + Wartość „{0}” zostanie obliczona w ramach swojej definicji + + + + This value will be eventually evaluated as part of its own definition. You may need to make the value lazy or a function. Value '{0}'{1}. + Ta wartość zostanie ostatecznie obliczona w ramach swojej definicji. Może być konieczne ustawienie wartości jako wartości opóźnionej lub funkcji. Wartość: „{0}”{1}. + + + + will evaluate '{0}' + obliczy wartość „{0}” + + + + Bindings may be executed out-of-order because of this forward reference. + Powiązania mogą być wykonywane w niepoprawnej kolejności z powodu tego odwołania w przód. + + + + This and other recursive references to the object(s) being defined will be checked for initialization-soundness at runtime through the use of a delayed reference. This is because you are defining one or more recursive objects, rather than recursive functions. This warning may be suppressed by using '#nowarn "40"' or '--nowarn:40'. + To i inne odwołania rekursywne do definiowanych obiektów zostaną sprawdzone pod kątem poprawności inicjalizacji w środowisku uruchomieniowym przy użyciu opóźnionego odwołania. Jest to spowodowane tym, że definiujesz co najmniej jeden obiekt rekursywny zamiast funkcji rekursywnych. To ostrzeżenie można pominąć przy użyciu elementu „#nowarn "40"” lub „--nowarn:40”. + + + + Recursive references to the object being defined will be checked for initialization soundness at runtime through the use of a delayed reference. Consider placing self-references in members or within a trailing expression of the form '<ctor-expr> then <expr>'. + Odwołania cykliczne do definiowanego obiektu zostaną sprawdzone pod kątem poprawności inicjalizacji w środowisku uruchomieniowym przy użyciu opóźnionego odwołania. Rozważ umieszczenie odwołań własnych w elementach członkowskich lub w wyrażeniu końcowym w postaci „<wyrażenie-konstruktora> then <wyrażenie>”. + + + + Recursive references to the object being defined will be checked for initialization soundness at runtime through the use of a delayed reference. Consider placing self-references within 'do' statements after the last 'let' binding in the construction sequence. + Odwołania cykliczne do definiowanego obiektu zostaną sprawdzone pod kątem poprawności inicjalizacji w środowisku uruchomieniowym przy użyciu opóźnionego odwołania. Rozważ umieszczenie odwołań własnych w instrukcjach „do” po ostatnim powiązaniu „let” w sekwencji konstrukcji. + + + + The containing type can use 'null' as a representation value for its nullary union case. Invoking an abstract or virtual member or an interface implementation on a null value will lead to an exception. If necessary add a dummy data value to the nullary constructor to avoid 'null' being used as a representation for this type. + Zawierający typ może używać wartości „null” jako wartości reprezentacji przypadku unii o wartości null. Wywołanie abstrakcyjnego lub wirtualnego elementu członkowskiego albo implementacji interfejsu z wartością null spowoduje wystąpienie wyjątku. Jeśli to konieczne, dodaj fikcyjną wartość danych do konstruktora o wartości null, aby wartość „null” nie była używana jako reprezentacja tego typu. + + + + The containing type can use 'null' as a representation value for its nullary union case. This member will be compiled as a static member. + Typ zawierający ten element może używać wartości „null” jako wartości reprezentacji przypadku unii o wartości null. Ten element członkowski zostanie skompilowany jako statyczny element członkowski. + + + + The member '{0}' doesn't correspond to a unique abstract slot based on name and argument count alone + Element członkowski „{0}” nie odpowiada unikatowemu miejscu abstrakcyjnemu na podstawie samej nazwy i liczby argumentów + + + + . Multiple implemented interfaces have a member with this name and argument count + . Wiele zaimplementowanych interfejsów ma element członkowski o tej nazwie i z tą liczbą argumentów + + + + . Consider implementing interfaces '{0}' and '{1}' explicitly. + . Rozważ jawne zaimplementowanie interfejsów „{0}” i „{1}”. + + + + . Additional type annotations may be required to indicate the relevant override. This warning can be disabled using '#nowarn "70"' or '--nowarn:70'. + . Mogą być wymagane dodatkowe adnotacje typów w celu określenia odpowiedniego przesłonięcia. To ostrzeżenie można wyłączyć przy użyciu elementu „#nowarn "70"” lub „--nowarn:70”. + + + + parse error + błąd analizy + + + + parse error: unexpected end of file + błąd analizy: nieoczekiwany koniec pliku + + + + {0} + {0} + + + + internal error: {0} + błąd wewnętrzny: {0} + + + + {0} + {0} + + + + Incomplete pattern matches on this expression. + Niepełne dopasowania wzorca w tym wyrażeniu. + + + + For example, the value '{0}' may indicate a case not covered by the pattern(s). + Na przykład wartość „{0}” może wskazywać przypadek, który nie jest zgodny ze wzorcem. + + + + For example, the value '{0}' may indicate a case not covered by the pattern(s). However, a pattern rule with a 'when' clause might successfully match this value. + Na przykład wartość „{0}” może wskazywać przypadek, który nie jest zgodny ze wzorcem. Jednak reguła wzorca z klauzulą „when” może pomyślnie dopasować tę wartość. + + + + Unmatched elements will be ignored. + Niedopasowane elementy zostaną zignorowane. + + + + Enums may take values outside known cases. + Wyliczenia mogą przyjmować wartości spoza znanych przypadków. + + + + This rule will never be matched + Ta reguła nigdy nie zostanie dopasowana + + + + This value is not mutable. Consider using the mutable keyword, e.g. 'let mutable {0} = expression'. + Ta wartość nie jest modyfikowalna. Rozważ użycie modyfikowalnego słowa kluczowego, np. „let mutable {0} = expression”. + + + + This value is not local + Ta wartość nie jest lokalna + + + + This construct is deprecated + Ta konstrukcja jest przestarzała + + + + . {0} + . {0} + + + + {0}. This warning can be disabled using '--nowarn:57' or '#nowarn "57"'. + {0}. To ostrzeżenie można wyłączyć przy użyciu elementu „--nowarn:57” lub „#nowarn "57"”. + + + + Uses of this construct may result in the generation of unverifiable .NET IL code. This warning can be disabled using '--nowarn:9' or '#nowarn "9"'. + Użycie tej konstrukcji może spowodować wygenerowanie kodu .NET IL, którego nie można zweryfikować. To ostrzeżenie można wyłączyć przy użyciu elementu „--nowarn:9” lub „#nowarn "9"”. + + + + This construct is deprecated: {0} + Ta konstrukcja jest przestarzała: {0} + + + + This construct is deprecated: it is only for use in the F# library + Ta konstrukcja jest przestarzała: może być używana tylko w bibliotece języka F# + + + + The following fields require values: {0} + Następujące pola wymagają wartości: {0} + + + + Value restriction. The value '{0}' has generic type\n {1} \nEither make the arguments to '{2}' explicit or, if you do not intend for it to be generic, add a type annotation. + Ograniczenie wartości. Wartość „{0}” jest wartością typu ogólnego\n {1} \nOkreśl argumenty elementu „{2}” jako jawne lub dodaj adnotację typu, jeśli nie chcesz, aby wartość była ogólna. + + + + Value restriction. The value '{0}' has generic type\n {1} \nEither make '{2}' into a function with explicit arguments or, if you do not intend for it to be generic, add a type annotation. + Ograniczenie wartości. Wartość „{0}” jest wartością typu ogólnego\n {1} \nUstaw element „{2}” jako funkcję z jawnymi argumentami lub dodaj adnotację typu, jeśli nie chcesz, aby wartość była ogólna. + + + + Value restriction. This member has been inferred to have generic type\n {0} \nConstructors and property getters/setters cannot be more generic than the enclosing type. Add a type annotation to indicate the exact types involved. + Ograniczenie wartości. Wywnioskowano, że ten element członkowski jest elementem typu ogólnego\n {0} \nKonstruktory i metody pobierające/ustawiające właściwości nie mogą być bardziej ogólne niż typ otaczający. Dodaj adnotację typu, aby dokładnie wskazać uwzględnione typy. + + + + Value restriction. The value '{0}' has been inferred to have generic type\n {1} \nEither make the arguments to '{2}' explicit or, if you do not intend for it to be generic, add a type annotation. + Ograniczenie wartości. Wywnioskowano, że wartość „{0}” jest wartością typu ogólnego\n {1} \nOkreśl argumenty elementu „{2}” jako jawne lub dodaj adnotację typu, jeśli nie chcesz, aby wartość była ogólna. + + + + Value restriction. The value '{0}' has been inferred to have generic type\n {1} \nEither define '{2}' as a simple data term, make it a function with explicit arguments or, if you do not intend for it to be generic, add a type annotation. + Ograniczenie wartości. Wywnioskowano, że wartość „{0}” jest wartością typu ogólnego\n {1} \nZdefiniuj element „{2}” jako prosty termin danych, określ go jako funkcję z jawnymi argumentami lub dodaj adnotację typu, jeśli nie chcesz, aby wartość była ogólna. + + + + syntax error + błąd składni + + + + {0} + {0} + + + + {0} + {0} + + + + Override implementations in augmentations are now deprecated. Override implementations should be given as part of the initial declaration of a type. + Implementacje przesłonięć w rozszerzeniach są obecnie przestarzałe. Implementacje przesłonięć powinny występować w początkowej deklaracji typu. + + + + Override implementations should be given as part of the initial declaration of a type. + Implementacje przesłonięć powinny występować w początkowej deklaracji typu. + + + + Interface implementations in augmentations are now deprecated. Interface implementations should be given on the initial declaration of a type. + Implementacje interfejsów w powiększeniach są teraz przestarzałe. Implementacje interfejsów powinny występować w początkowej deklaracji typu. + + + + Interface implementations should be given on the initial declaration of a type. + Implementacje interfejsów powinny występować w początkowej deklaracji typu. + + + + A required assembly reference is missing. You must add a reference to assembly '{0}'. + Brak wymaganego odwołania do zestawu. Musisz dodać odwołanie do zestawu „{0}”. + + + + The type referenced through '{0}' is defined in an assembly that is not referenced. You must add a reference to assembly '{1}'. + Typ, do którego utworzono odwołanie za pośrednictwem elementu „{0}”, jest zdefiniowany w zestawie, do którego nie utworzono odwołania. Musisz dodać odwołanie do zestawu „{1}”. + + + + #I directives may only occur in F# script files (extensions .fsx or .fsscript). Either move this code to a script file, add a '-I' compiler option for this reference or delimit the directive with delimit it with '#if INTERACTIVE'/'#endif'. + Dyrektywy #I mogą występować tylko w plikach skryptu języka F# (rozszerzenie fsx lub fsscript). Przenieś ten kod do pliku skryptu, dodaj opcję kompilatora „-I” dla tego odwołania lub rozdziel dyrektywę przy użyciu elementu „#if INTERACTIVE”/„#endif”. + + + + #r directives may only occur in F# script files (extensions .fsx or .fsscript). Either move this code to a script file or replace this reference with the '-r' compiler option. If this directive is being executed as user input, you may delimit it with '#if INTERACTIVE'/'#endif'. + Dyrektywy #r mogą występować tylko w plikach skryptu języka F# (rozszerzenie fsx lub fsscript). Przenieś ten kod do pliku skryptu lub zastąp to odwołanie za pomocą opcji kompilatora „-r”. Jeśli ta dyrektywa jest wykonywana jako dane wejściowe użytkownika, możesz ją ograniczyć przy użyciu elementu „#if INTERACTIVE”/„#endif”. + + + + This directive may only be used in F# script files (extensions .fsx or .fsscript). Either remove the directive, move this code to a script file or delimit the directive with '#if INTERACTIVE'/'#endif'. + Ta dyrektywa może być używana tylko w plikach skryptu języka F# (rozszerzenie fsx lub fsscript). Przenieś dyrektywę, przenieś jej kod do pliku skryptu lub rozdziel dyrektywę przy użyciu elementu „#if INTERACTIVE”/„#endif”. + + + + Unable to find the file '{0}' in any of\n {1} + Nie można odnaleźć pliku „{0}” w żadnym z elementów\n {1} + + + + Assembly reference '{0}' was not found or is invalid + Nie odnaleziono odwołania do zestawu „{0}” lub jest ono nieprawidłowe + + + + One or more warnings in loaded file.\n + Co najmniej jedno ostrzeżenie w załadowanym pliku.\n + + + + One or more errors in loaded file.\n + Co najmniej jeden błąd w załadowanym pliku.\n + + + + Loaded files may only be F# source files (extension .fs). This F# script file (.fsx or .fsscript) will be treated as an F# source file + Ładowane mogą być tylko pliki źródłowe języka F# (rozszerzenie fs). Ten plik skryptu języka F# (rozszerzenie fsx lub fsscript) będzie traktowany jako plik źródłowy języka F# + + + + Invalid assembly name '{0}' from InternalsVisibleTo attribute in {1} + Nieprawidłowa nazwa zestawu „{0}” w atrybucie InternalsVisibleTo w elemencie {1} + + + + Invalid assembly name '{0}' from InternalsVisibleTo attribute (assembly filename not available) + Nieprawidłowa nazwa zestawu „{0}” w atrybucie InternalsVisibleTo (nazwa pliku zestawu jest niedostępna) + + + + Could not load file '{0}' because it does not exist or is inaccessible + Nie można załadować pliku „{0}”, ponieważ nie istnieje lub jest niedostępny + + + + {0} (Code={1}) + {0} (Kod={1}) + + + + internal error: {0} + błąd wewnętrzny: {0} + + + + + \ No newline at end of file diff --git a/src/fsharp/xlf/FSStrings.pt-BR.xlf b/src/fsharp/xlf/FSStrings.pt-BR.xlf new file mode 100644 index 00000000000..0d185ea82f5 --- /dev/null +++ b/src/fsharp/xlf/FSStrings.pt-BR.xlf @@ -0,0 +1,1622 @@ + + + + + + . See also {0}. + . Consulte também {0}. + + + + The tuples have differing lengths of {0} and {1} + As tuplas tem comprimentos diferentes de {0} e {1} + + + + The types '{0}' and '{1}' cannot be unified. + Os tipos '{0}' e '{1}' não podem ser unificados. + + + + A type parameter is missing a constraint '{0}' + Um parâmetro de tipo não possui uma restrição '{0}' + + + + The unit of measure '{0}' does not match the unit of measure '{1}' + A unidade de medida '{0}' não coincide com a unidade de medida '{1}' + + + + The type '{0}' does not match the type '{1}' + O tipo '{0}' não coincide com o tipo '{1}' + + + + The type '{0}' is not compatible with the type '{1}'{2} + O tipo '{0}' não é compatível com o tipo '{1}'{2} + + + + This expression was expected to have type\n '{1}' \nbut here has type\n '{0}' {2} + Esperava-se que esta expressão tivesse o tipo\n '{1}' \n, mas aqui ela tem o tipo\n '{0}' {2} + + + + Type mismatch. Expecting a\n '{0}' \nbut given a\n '{1}' {2}\n + Tipos incompatíveis. Esperando um\n '{0}' \n, mas foi fornecido um\n '{1}' {2}\n + + + + Type constraint mismatch when applying the default type '{0}' for a type inference variable. + Restrições de tipo incompatíveis ao aplicar o tipo padrão '{0}' para uma variável de inferência de tipo. + + + + Consider adding further type constraints + Considerar adicionar novas restrições de tipo + + + + Type constraint mismatch. The type \n '{0}' \nis not compatible with type\n '{1}' {2}\n + Restrições de tipo incompatíveis. O tipo \n '{0}' \nnão é compatível com o tipo\n '{1}' {2}\n + + + + Uppercase variable identifiers should not generally be used in patterns, and may indicate a misspelt pattern name. + Identificadores de variáveis maiúsculas geralmente não devem ser usados nos padrões, podendo indicar um nome de padrão escrito incorretamente. + + + + Discriminated union cases and exception labels must be uppercase identifiers + Casos união discriminados e rótulos de exceção devem ser identificadores com maiúsculas + + + + Possible overload: '{0}'. {1}. + Sobrecarga possível: '{0}'. {1}. + + + + \n\nPossible best overload: '{0}'. + \n\nMelhor sobrecarga possível: '{0}'. + + + + This function takes too many arguments, or is used in a context where a function is not expected + Esta função obtém muitos argumentos, ou é usada em um contexto onde uma função não é esperada + + + + Member constraints with the name '{0}' are given special status by the F# compiler as certain .NET types are implicitly augmented with this member. This may result in runtime failures if you attempt to invoke the member constraint from your own code. + O compilador de F# concedeu status especial às restrições de membros com o nome '{0}', pois certos tipos .NET são aumentados implicitamente com seus membros. Isto pode resultar em falhas em tempo de execução se você tentar chamar a restrição de membro de seu próprio código. + + + + A definition to be compiled as a .NET event does not have the expected form. Only property members can be compiled as .NET events. + Uma definição a ser compilada como um evento .NET não tem a forma esperada. Apenas membros de propriedade podem ser compilados como eventos .NET. + + + + Implicit object constructors for structs must take at least one argument + Construtores de objetos implícitos para structs devem obter pelo menos um argumento + + + + The type implements the interface '{0}' but this is not revealed by the signature. You should list the interface in the signature, as the interface will be discoverable via dynamic type casts and/or reflection. + O tipo implementa a interface '{0}' mas isto não é revelado pela assinatura. Você deveria listar a interface na assinatura, uma vez que a interface será detectável via conversões de tipo dinâmico e/ou reflexão. + + + + The type '{0}' expects {1} type argument(s) but is given {2} + O tipo '{0}' espera argumento(s) de tipo {1} mas é dado {2} + + + + Lookup on object of indeterminate type based on information prior to this program point. A type annotation may be needed prior to this program point to constrain the type of the object. This may allow the lookup to be resolved. + Pesquisa por um objeto de tipo indeterminado baseado em informações anteriores a este ponto do programa. Uma anotação de tipo pode ser necessária antes deste ponto do programa para restringir o tipo do objeto. Isto deverá permitir que a pesquisa seja resolvida. + + + + Duplicate definition of {0} '{1}' + Definição duplicada de {0} '{1}' + + + + The {0} '{1}' can not be defined because the name '{2}' clashes with the {3} '{4}' in this type or module + O {0} '{1}' não pode ser definido porque o nome '{2}' conflita com {3} '{4}' neste tipo ou módulo + + + + Two members called '{0}' have the same signature + Dois membros chamados '{0}' possuem a mesma assinatura + + + + Duplicate definition of {0} '{1}' + Definição duplicada de {0} '{1}' + + + + A construct with this name was found in FSharp.PowerPack.dll, which contains some modules and types that were implicitly referenced in some previous versions of F#. You may need to add an explicit reference to this DLL in order to compile this code. + Um constructo com esse nome foi encontrado em FSharp.PowerPack.dll, que contém alguns módulos e tipos que foram referenciados implicitamente em alguma versão prévia de F#. Talvez seja necessário adicionar uma referência explícita a esse DLL para compilar seu código. + + + + This field is not mutable + Este campo não é mutável + + + + The fields '{0}' and '{1}' are from different types + Os campos '{0}' e '{1}' são de tipos diferentes + + + + '{0}' is bound twice in this pattern + '{0}' é associado duas vezes neste padrão + + + + A use of the function '{0}' does not match a type inferred elsewhere. The inferred type of the function is\n {1}. \nThe type of the function required at this point of use is\n {2} {3}\nThis error may be due to limitations associated with generic recursion within a 'let rec' collection or within a group of classes. Consider giving a full type signature for the targets of recursive calls including type annotations for both argument and return types. + O uso da função '{0}' não corresponde a um tipo inferido em outro local. O tipo inferido da função é\n {1}. \nO tipo da função necessária neste ponto de uso é\n {2} {3}\nEste erro pode ocorrer devido a limitações associadas à recursão genérica em uma coleção 'let rec' ou em um grupo de classes. Considere fornecer uma assinatura de tipo completo para os destinos de chamadas recursivas incluindo anotações de tipo para tipos de argumento e de retorno. + + + + Invalid runtime coercion or type test from type {0} to {1}\n{2} + Teste de tipo ou coerção em tempo de execução inválido do tipo {0} para {1}\n{2} + + + + This runtime coercion or type test from type\n {0} \n to \n {1} \ninvolves an indeterminate type based on information prior to this program point. Runtime type tests are not allowed on some types. Further type annotations are needed. + Este teste de tipo ou coerção em tempo de execução do tipo\n {0} \n para \n {1} \nenvolve um tipo indeterminado com base na informação anterior a este ponto do programa. Testes de tipos em tempo de execução não são permitidos em alguns tipos. São necessárias novas anotações de tipo. + + + + The static coercion from type\n {0} \nto \n {1} \n involves an indeterminate type based on information prior to this program point. Static coercions are not allowed on some types. Further type annotations are needed. + A coerção estática do tipo\n {0} \npara \n {1} \n requer um tipo indeterminado baseado nas informações anteriores a este ponto do programa. Coerções estáticas não são permitidas em alguns tipos e são necessárias novas anotações de tipo. + + + + A coercion from the value type \n {0} \nto the type \n {1} \nwill involve boxing. Consider using 'box' instead + Uma coerção no tipo de valor \n {0} \npara o tipo \n {1} \nenvolverá conversão boxing. Considere usar 'box' em vez disso + + + + This type is 'abstract' since some abstract members have not been given an implementation. If this is intentional then add the '[<AbstractClass>]' attribute to your type. + Este tipo é 'abstract', uma vez que os membros abstratos não receberam uma implementação. Se esta for a intenção, adicione o atributo '[<AbstractClass>]' ao seu tipo. + + + + This construct causes code to be less generic than indicated by its type annotations. The type variable implied by the use of a '#', '_' or other type annotation at or near '{0}' has been constrained to be type '{1}'. + Esta construção faz com que o código seja menos genérico que o indicado por suas anotações de tipo. A variável de tipo implicada pelo uso de '#', '_' ou outra anotação de tipo em '{0}', ou próximo a ele, foi restrita a ser do tipo '{1}'. + + + + This construct causes code to be less generic than indicated by the type annotations. The unit-of-measure variable '{0} has been constrained to be measure '{1}'. + Esta construção faz com que o código seja menos genérico que o indicado por suas anotações de tipo. A variável de unidade de medida '{0} foi restringida para ser medida '{1}'. + + + + This construct causes code to be less generic than indicated by the type annotations. The type variable '{0} has been constrained to be type '{1}'. + Esta construção faz com que o código seja menos genérico que o indicado por suas anotações de tipo. A variável de tipo '{0} foi restringida a ser tipo '{1}'. + + + + identifier + identificador + + + + integer literal + literal de inteiro + + + + floating point literal + ponto flutuante literal + + + + decimal literal + literal decimal + + + + character literal + literal de caractere + + + + keyword 'base' + palavra-chave 'base' + + + + symbol '(*)' + símbolo '(*)' + + + + symbol '$' + símbolo '$' + + + + infix operator + operador infixo + + + + infix operator + operador infixo + + + + symbol ':>' + símbolo ':>' + + + + symbol '::' + símbolo '::' + + + + symbol '{0} + símbolo '{0} + + + + infix operator + operador infixo + + + + infix operator + operador infixo + + + + infix operator + operador infixo + + + + prefix operator + operador pré-fixo + + + + symbol ':?>' + símbolo ':?>' + + + + infix operator + operador infixo + + + + infix operator + operador infixo + + + + symbol '&' + símbolo '&' + + + + symbol '&&' + símbolo '&&' + + + + symbol '||' + símbolo '||' + + + + symbol '<' + símbolo '<' + + + + symbol '>' + símbolo '>' + + + + symbol '?' + símbolo '?' + + + + symbol '??' + símbolo '??' + + + + symbol ':?' + símbolo ':?' + + + + integer.. + inteiro.. + + + + symbol '..' + símbolo '..' + + + + quote symbol + símbolo de cotação + + + + symbol '*' + símbolo '*' + + + + type application + aplicação de tipo + + + + symbol ':' + símbolo ':' + + + + symbol ':=' + símbolo ':=' + + + + symbol '<-' + símbolo '<-' + + + + symbol '=' + símbolo '=' + + + + symbol '>|]' + símbolo '>|]' + + + + symbol '-' + símbolo '-' + + + + prefix operator + operador pré-fixo + + + + operator name + nome de operador + + + + symbol ',' + símbolo ',' + + + + symbol '.' + símbolo '.' + + + + symbol '|' + símbolo '|' + + + + symbol # + símbolo # + + + + symbol '_' + símbolo '_' + + + + symbol ';' + símbolo ';' + + + + symbol ';;' + símbolo ';;' + + + + symbol '(' + símbolo '(' + + + + symbol ')' + símbolo ')' + + + + symbol 'splice' + símbolo 'splice' + + + + start of quotation + início de cotação + + + + symbol '[' + símbolo '[' + + + + symbol '[|' + símbolo '[|' + + + + symbol '[<' + símbolo '[<' + + + + symbol '{' + símbolo '{' + + + + symbol '{<' + símbolo '{<' + + + + symbol '|]' + símbolo '|]' + + + + symbol '>}' + símbolo '>}' + + + + symbol '>]' + símbolo '>]' + + + + end of quotation + final de cotação + + + + symbol ']' + símbolo ']' + + + + symbol '}' + símbolo '}' + + + + keyword 'public' + palavra-chave 'public' + + + + keyword 'private' + palavra-chave 'private' + + + + keyword 'internal' + palavra-chave 'internal' + + + + keyword 'fixed' + palavra-chave 'fixo' + + + + keyword 'constraint' + palavra-chave 'constraint' + + + + keyword 'instance' + palavra-chave 'instance' + + + + keyword 'delegate' + palavra-chave 'delegate' + + + + keyword 'inherit' + palavra-chave 'inherit' + + + + keyword 'constructor' + palavra-chave 'constructor' + + + + keyword 'default' + palavra-chave 'default' + + + + keyword 'override' + palavra-chave 'override' + + + + keyword 'abstract' + palavra-chave 'abstract' + + + + keyword 'class' + palavra-chave 'class' + + + + keyword 'member' + palavra-chave 'member' + + + + keyword 'static' + palavra-chave 'static' + + + + keyword 'namespace' + palavra-chave 'namespace' + + + + start of structured construct + início do constructo estruturado + + + + incomplete structured construct at or before this point + constructo estruturado incompleto neste ponto ou antes dele + + + + Incomplete structured construct at or before this point + Constructo estruturado incompleto neste ponto ou antes dele + + + + keyword 'then' + palavra-chave 'then' + + + + keyword 'else' + palavra-chave 'else' + + + + keyword 'let' or 'use' + palavra-chave 'let' ou 'use' + + + + binder keyword + palavra-chave de fichário + + + + keyword 'do' + palavra-chave 'do' + + + + keyword 'const' + palavra-chave 'const' + + + + keyword 'with' + palavra-chave 'with' + + + + keyword 'function' + palavra-chave 'function' + + + + keyword 'fun' + palavra-chave 'fun' + + + + end of input + fim de entrada + + + + internal dummy token + token fictício interno + + + + keyword 'do!' + palavra-chave 'do!' + + + + yield + rendimento + + + + yield! + rendimento! + + + + keyword 'interface' + palavra-chave 'interface' + + + + keyword 'elif' + palavra-chave 'elif' + + + + symbol '->' + símbolo '->' + + + + keyword 'sig' + palavra-chave 'sig' + + + + keyword 'struct' + palavra-chave 'struct' + + + + keyword 'upcast' + palavra-chave 'upcast' + + + + keyword 'downcast' + palavra-chave 'downcast' + + + + keyword 'null' + palavra-chave 'null' + + + + reserved keyword + palavra-chave reservada + + + + keyword 'module' + palavra-chave 'module' + + + + keyword 'and' + palavra-chave 'and' + + + + keyword 'as' + palavra-chave 'as' + + + + keyword 'assert' + palavra-chave 'assert' + + + + keyword 'asr' + palavra-chave 'asr' + + + + keyword 'downto' + palavra-chave 'downto' + + + + keyword 'exception' + palavra-chave 'exception' + + + + keyword 'false' + palavra-chave 'false' + + + + keyword 'for' + palavra-chave 'for' + + + + keyword 'fun' + palavra-chave 'fun' + + + + keyword 'function' + palavra-chave 'function' + + + + keyword 'finally' + palavra-chave 'finally' + + + + keyword 'lazy' + palavra-chave 'lazy' + + + + keyword 'match' + palavra-chave 'match' + + + + keyword 'match!' + palavra-chave 'match!' + + + + keyword 'mutable' + palavra-chave 'mutable' + + + + keyword 'new' + palavra-chave 'new' + + + + keyword 'of' + palavra-chave 'of' + + + + keyword 'open' + palavra-chave 'open' + + + + keyword 'or' + palavra-chave 'or' + + + + keyword 'void' + palavra-chave 'void' + + + + keyword 'extern' + palavra-chave 'extern' + + + + keyword 'interface' + palavra-chave 'interface' + + + + keyword 'rec' + palavra-chave 'rec' + + + + keyword 'to' + palavra-chave 'to' + + + + keyword 'true' + palavra-chave 'true' + + + + keyword 'try' + palavra-chave 'try' + + + + keyword 'type' + palavra-chave 'type' + + + + keyword 'val' + palavra-chave 'val' + + + + keyword 'inline' + palavra-chave 'inline' + + + + keyword 'when' + palavra-chave 'when' + + + + keyword 'while' + palavra-chave 'while' + + + + keyword 'with' + palavra-chave 'with' + + + + keyword 'if' + palavra-chave 'if' + + + + keyword 'do' + palavra-chave 'do' + + + + keyword 'global' + palavra-chave 'global' + + + + keyword 'done' + palavra-chave 'done' + + + + keyword 'in' + palavra-chave 'in' + + + + symbol '(' + símbolo '(' + + + + symbol'[' + símbolo'[' + + + + keyword 'begin' + palavra-chave 'begin' + + + + keyword 'end' + palavra-chave 'end' + + + + directive + diretiva + + + + inactive code + código inativo + + + + lex failure + falha de lex + + + + whitespace + espaço em branco + + + + comment + comentário + + + + line comment + comentário de linha + + + + string text + texto de cadeia de caracteres + + + + compiler generated literal + literal gerado por compilador + + + + byte array literal + literal de matriz de bytes + + + + string literal + literal de cadeia de caracteres + + + + end of input + fim de entrada + + + + Unexpected end of input + Final da entrada inesperado + + + + Unexpected {0} + {0} inesperado + + + + in interaction + em interação + + + + in directive + em diretiva + + + + in field declaration + em declaração de campo + + + + in discriminated union case declaration + em declaração de caso união discriminada + + + + in binding + em associação + + + + in binding + em associação + + + + in member definition + em definição de membro + + + + in definitions + em definições + + + + in member signature + em assinatura de membro + + + + in value signature + em assinatura de valor + + + + in type signature + em assinatura de tipo + + + + in lambda expression + em expressão lambda + + + + in union case + em caso união + + + + in extern declaration + em declaração externa + + + + in object expression + em expressão de objeto + + + + in if/then/else expression + em expressão if/then/else + + + + in open declaration + em declaração aberta + + + + in module or namespace signature + em assinatura de módulo ou namespace + + + + in pattern matching + em correspondência padrão + + + + in begin/end expression + em expressão de início/fim + + + + in record expression + em expressão de registro + + + + in type definition + em definição de tipo + + + + in exception definition + em definição de exceção + + + + in type name + em nome de tipo + + + + in attribute list + em lista de atributo + + + + in quotation literal + em literal de cotação + + + + in type constraint + em restrição de tipo + + + + in implementation file + em arquivo de implementação + + + + in definition + em definição + + + + in signature file + em arquivo de assinatura + + + + in pattern + em padrão + + + + in expression + em expressão + + + + in type + em tipo + + + + in type arguments + em argumentos de tipo + + + + keyword + palavra-chave + + + + symbol + símbolo + + + + (due to indentation-aware syntax) + (devido à sintaxe com reconhecimento de recuo) + + + + . Expected {0} or other token. + . {0} ou outro token são esperados. + + + + . Expected {0}, {1} or other token. + . {0}, {1} ou outro token são esperados. + + + + . Expected {0}, {1}, {2} or other token. + . {0}, {1}, {2} ou outro token são esperados. + + + + The type '{0}' cannot be used as the source of a type test or runtime coercion + O tipo '{0}' não pode ser usado como a fonte de um teste de tipo ou coerção de tempo de execução + + + + The type '{0}' does not have any proper subtypes and cannot be used as the source of a type test or runtime coercion. + O tipo '{0}' não tem nenhum subtipo apropriado e não pode ser usado como a fonte de um teste de tipo ou coerção em tempo de execução. + + + + The type '{0}' does not have any proper subtypes and need not be used as the target of a static coercion + O tipo '{0}' não tem quaisquer subtipos adequados e não precisa ser usado como o destino de uma coerção estática + + + + This upcast is unnecessary - the types are identical + Este upcast é desnecessário - os tipos são idênticos + + + + This type test or downcast will always hold + Este tipo de teste ou downcast sempre será mantido + + + + The member '{0}' does not have the correct type to override any given virtual method + O membro '{0}' não tem um tipo correto para substituir qualquer método virtual dado + + + + The member '{0}' does not have the correct type to override the corresponding abstract method. + O membro '{0}' não tem o tipo correto para substituir o método abstrato correspondente. + + + + The required signature is '{0}'. + A assinatura requerida é '{0}'. + + + + The member '{0}' is specialized with 'unit' but 'unit' can't be used as return type of an abstract method parameterized on return type. + O membro '{0}' é especializado com 'unit', mas 'unit' não pode ser usado como um tipo de retorno de um método abstrato parametrizado no tipo de retorno. + + + + This constructor is applied to {0} argument(s) but expects {1} + Este construtor é aplicado aos argumentos {0}, mas espera {1} + + + + The two sides of this 'or' pattern bind different sets of variables + Os dois lados deste padrão 'or' vinculam diferentes conjuntos de variáveis + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \n{3}. + O módulo '{0}' contém\n {1} \n, mas sua assinatura especifica\n {2} \n{3}. + + + + Module '{0}' requires a {1} '{2}' + O módulo '{0}' requer um {1} '{2}' + + + + The use of native pointers may result in unverifiable .NET IL code + O uso de ponteiros nativos podem resultar em código .NET IL não verificável + + + + {0} + {0} + + + + Thread static and context static 'let' bindings are deprecated. Instead use a declaration of the form 'static val mutable <ident> : <type>' in a class. Add the 'DefaultValue' attribute to this declaration to indicate that the value is initialized to the default value on each new thread. + Associações 'let' do thread estático e do contexto estático foram preteridas. Ao invés delas, utilize uma declaração da forma 'static val mutable <ident> : <type>' na classe. Adicione o atributo 'DefaultValue' a esta declaração para indicar que o valor é iniciado com o valor padrão a cada novo thread. + + + + This expression is a function value, i.e. is missing arguments. Its type is {0}. + Esta expressão é um valor de função, isto é, faltam argumentos. Seu tipo é {0}. + + + + The result of this expression has type '{0}' and is implicitly ignored. Consider using 'ignore' to discard this value explicitly, e.g. 'expr |> ignore', or 'let' to bind the result to a name, e.g. 'let result = expr'. + O resultado dessa expressão contém o tipo '{0}' e é ignorado de forma implícita. Considere o uso de 'ignore' para descartar esse valor de forma explícita, por exemplo, 'expr |> ignore' ou 'let' para associar o resultado a um nome, por exemplo, 'let result = expr'. + + + + The result of this equality expression has type '{0}' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. + O resultado dessa expressão de igualdade contém o tipo '{0}' e é descartado de forma implícita. Considere o uso de 'let' para associar o resultado a um nome, por exemplo, 'let result = expression'. + + + + The result of this equality expression has type '{0}' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to set a value to a property, then use the '<-' operator e.g. '{1}.{2} <- expression'. + O resultado dessa expressão de igualdade contém o tipo '{0}' e é descartado de forma implícita. Considere o uso de 'let' para associar o resultado a um nome, por exemplo, 'let result = expression'. Se você pretende definir um valor com uma propriedade, use o operador '<-', por exemplo, '{1}.{2} <- expression'. + + + + The result of this equality expression has type '{0}' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to mutate a value, then mark the value 'mutable' and use the '<-' operator e.g. '{1} <- expression'. + O resultado dessa expressão de igualdade contém o tipo '{0}' e é descartado de forma implícita. Considere o uso de 'let' para associar o resultado a um nome, por exemplo, 'let result = expression'. Se você pretende alterar um valor, marque-o como 'mutable' e use o operador '<-', por exemplo, '{1} <- expression'. + + + + The result of this equality expression has type '{0}' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to mutate a value, then use the '<-' operator e.g. '{1} <- expression'. + O resultado dessa expressão de igualdade contém o tipo '{0}' e é descartado de forma implícita. Considere o uso de 'let' para associar o resultado a um nome, por exemplo, 'let result = expression'. Se você pretende alterar um valor, use o operador '<-', por exemplo, '{1} <- expression'. + + + + This recursive use will be checked for initialization-soundness at runtime. This warning is usually harmless, and may be suppressed by using '#nowarn "21"' or '--nowarn:21'. + Este uso recursivo passará por verificação de solidez de inicialização no tempo de execução. Este aviso normalmente é inofensivo e pode ser suprimido usando '#nowarn "21"' ou '--nowarn:21'. + + + + The value '{0}' will be evaluated as part of its own definition + O valor '{0}' será avaliado como parte de sua própria definição + + + + This value will be eventually evaluated as part of its own definition. You may need to make the value lazy or a function. Value '{0}'{1}. + Este valor será eventualmente avaliado como parte de sua própria definição. Talvez seja necessário tornar o valor ocioso ou transformá-lo em uma função. Valor '{0}'{1}. + + + + will evaluate '{0}' + avaliará '{0}' + + + + Bindings may be executed out-of-order because of this forward reference. + Associações podem ser executadas fora de ordem devido a esta referência de encaminhamento. + + + + This and other recursive references to the object(s) being defined will be checked for initialization-soundness at runtime through the use of a delayed reference. This is because you are defining one or more recursive objects, rather than recursive functions. This warning may be suppressed by using '#nowarn "40"' or '--nowarn:40'. + Esta e outras referências recursivas dos objetos que estão sendo definidos passarão por verificação de solidez de inicialização em tempo de execução através do uso de uma referência atrasada. Isto porque você está definindo um ou mais objetos recursivos ao invés de funções recursivas. Este aviso pode ser suprimido com o uso de '#nowarn "40"' ou '--nowarn:40'. + + + + Recursive references to the object being defined will be checked for initialization soundness at runtime through the use of a delayed reference. Consider placing self-references in members or within a trailing expression of the form '<ctor-expr> then <expr>'. + Referências recursivas ao objeto que está sendo definido terão sua solidez de inicialização verificada no tempo de execução, por meio do uso de uma referência atrasada. Considere colocar autorreferências em membros ou em expressões à direita da forma '<ctor-expr> then <expr>'. + + + + Recursive references to the object being defined will be checked for initialization soundness at runtime through the use of a delayed reference. Consider placing self-references within 'do' statements after the last 'let' binding in the construction sequence. + Referências recursivas ao objeto que está sendo definido terão sua solidez de inicialização verificada em tempo de execução, por meio do uso de uma referência atrasada. Considere colocar autorreferências em instruções 'do' após a última associação 'let' na sequência de construção. + + + + The containing type can use 'null' as a representation value for its nullary union case. Invoking an abstract or virtual member or an interface implementation on a null value will lead to an exception. If necessary add a dummy data value to the nullary constructor to avoid 'null' being used as a representation for this type. + O tipo recipiente pode usar 'null' como um valor de representação para seu caso união nulário. Chame um membro virtual ou abstrato, caso contrário, uma implementação de interface em um valor nulo levará a uma exceção. Se necessário, adicione um valor fictício ao construtor nulário para evitar que 'null' seja usado como uma representação para este tipo. + + + + The containing type can use 'null' as a representation value for its nullary union case. This member will be compiled as a static member. + O tipo de recipiente pode usar 'null' como um valor de representação para seu caso união nulário. Este membro será compilado como um membro estático. + + + + The member '{0}' doesn't correspond to a unique abstract slot based on name and argument count alone + O membro '{0}' não corresponde a um slot abstrato exclusivo baseado somente no nome e contagem do argumento + + + + . Multiple implemented interfaces have a member with this name and argument count + . Interfaces múltiplas implementadas têm um membro com este nome e contagem de argumento + + + + . Consider implementing interfaces '{0}' and '{1}' explicitly. + . Considere implementar interfaces '{0}' e '{1}' explicitamente. + + + + . Additional type annotations may be required to indicate the relevant override. This warning can be disabled using '#nowarn "70"' or '--nowarn:70'. + . Anotações de tipo adicionais podem ser necessárias para indicar a substituição relevante. Este aviso pode ser desabilitado usando '#nowarn "70"' ou '--nowarn:70'. + + + + parse error + erro de análise + + + + parse error: unexpected end of file + erro de análise: fim de arquivo inesperado + + + + {0} + {0} + + + + internal error: {0} + erro interno: {0} + + + + {0} + {0} + + + + Incomplete pattern matches on this expression. + Correspondências de padrão incompletas presentes nesta expressão. + + + + For example, the value '{0}' may indicate a case not covered by the pattern(s). + Por exemplo, o valor '{0}' pode indicar um caso que não é abrangido pelos padrões. + + + + For example, the value '{0}' may indicate a case not covered by the pattern(s). However, a pattern rule with a 'when' clause might successfully match this value. + Por exemplo, o valor '{0}' pode indicar um caso não abrangido por tais padrões. Entretanto, uma regra de padrão com uma cláusula 'when' pode corresponder a este valor com êxito. + + + + Unmatched elements will be ignored. + Elementos incompatíveis serão ignorados. + + + + Enums may take values outside known cases. + As enumerações pode usar valores fora de casos conhecidos. + + + + This rule will never be matched + Esta regra nunca será correspondida + + + + This value is not mutable. Consider using the mutable keyword, e.g. 'let mutable {0} = expression'. + Esse valor não é mutável. Considere usar a palavra-chave mutable, por exemplo, 'let mutable {0} = expression'. + + + + This value is not local + Este valor não é local + + + + This construct is deprecated + Este constructo foi preterido + + + + . {0} + . {0} + + + + {0}. This warning can be disabled using '--nowarn:57' or '#nowarn "57"'. + {0}. Este aviso foi desabilitado com o uso de '--nowarn:57' ou '#nowarn "57"'. + + + + Uses of this construct may result in the generation of unverifiable .NET IL code. This warning can be disabled using '--nowarn:9' or '#nowarn "9"'. + O uso desse construto pode resultar na geração de código .NET IL não verificável. Este aviso pode ser desabilitado usando '--nowarn:9' ou '#nowarn "9"'. + + + + This construct is deprecated: {0} + Este constructo foi preterido: {0} + + + + This construct is deprecated: it is only for use in the F# library + Este constructo foi preterido: ele somente pode ser usado na biblioteca F# + + + + The following fields require values: {0} + Os campos a seguir requerem valores: {0} + + + + Value restriction. The value '{0}' has generic type\n {1} \nEither make the arguments to '{2}' explicit or, if you do not intend for it to be generic, add a type annotation. + Restrição de valor. O valor '{0}' tem um tipo genérico\n {1} \nTorne os argumentos '{2}' explícitos ou, se sua intenção não for deixá-los genéricos, adicione uma anotação de tipo. + + + + Value restriction. The value '{0}' has generic type\n {1} \nEither make '{2}' into a function with explicit arguments or, if you do not intend for it to be generic, add a type annotation. + Restrição de valor. O valor '{0}' tem um tipo genérico\n {1} \nInsira '{2}' em uma função com argumentos explícitos ou, se você não desejar que ele seja genérico, adicione uma anotação de tipo. + + + + Value restriction. This member has been inferred to have generic type\n {0} \nConstructors and property getters/setters cannot be more generic than the enclosing type. Add a type annotation to indicate the exact types involved. + Restrição de valor. Este membro foi inferido para ter um tipo genérico\n {0} \nConstrutores e getters/setters de propriedade não podem ser mais genéricos que o tipo de delimitador. Adicione uma anotação de tipo para indicar os tipos exatos envolvidos. + + + + Value restriction. The value '{0}' has been inferred to have generic type\n {1} \nEither make the arguments to '{2}' explicit or, if you do not intend for it to be generic, add a type annotation. + Restrição de valor. O valor '{0}' foi inferido para ter um tipo genérico\n {1} \nTorne os argumentos '{2}' explícitos ou, se sua intenção não for deixá-los genéricos, adicione uma anotação de tipo. + + + + Value restriction. The value '{0}' has been inferred to have generic type\n {1} \nEither define '{2}' as a simple data term, make it a function with explicit arguments or, if you do not intend for it to be generic, add a type annotation. + Restrição de valor. O valor '{0}' foi inferido para ter um tipo genérico\n {1} \nDefina '{2}' como um termo de dado simples e torne-o uma função com argumentos explícitos ou, se sua intenção for deixá-los genéricos, adicione uma anotação de tipo. + + + + syntax error + erro de sintaxe + + + + {0} + {0} + + + + {0} + {0} + + + + Override implementations in augmentations are now deprecated. Override implementations should be given as part of the initial declaration of a type. + Implementações de substituições foram preteridas em aumentos. Implementações de substituições devem ser dadas como parte da declaração inicial de um tipo. + + + + Override implementations should be given as part of the initial declaration of a type. + Implementações de substituições devem ser dadas como parte de declaração inicial de um tipo. + + + + Interface implementations in augmentations are now deprecated. Interface implementations should be given on the initial declaration of a type. + Implementações de interface em aumentos agora são preteridas. Implementações de interface devem ser dadas nas declarações de tipo iniciais. + + + + Interface implementations should be given on the initial declaration of a type. + Implementações de interfaces devem ser dadas nas declarações de tipo iniciais. + + + + A required assembly reference is missing. You must add a reference to assembly '{0}'. + Uma referência de assembly necessária está faltando. Você deve adicionar uma referência ao assembly '{0}'. + + + + The type referenced through '{0}' is defined in an assembly that is not referenced. You must add a reference to assembly '{1}'. + O tipo referenciado através de '{0}' é definido no assembly não referenciado. Você deve adicionar uma referência ao assembly '{1}'. + + + + #I directives may only occur in F# script files (extensions .fsx or .fsscript). Either move this code to a script file, add a '-I' compiler option for this reference or delimit the directive with delimit it with '#if INTERACTIVE'/'#endif'. + Diretivas #I só podem ocorrer em arquivos de script F# (extensões .fsx ou .fsscript). Mova este código para o arquivo de script e adicione uma opção de compilador '-I' para esta referência, ou então, delimite a diretiva com '#if INTERACTIVE'/'#endif'. + + + + #r directives may only occur in F# script files (extensions .fsx or .fsscript). Either move this code to a script file or replace this reference with the '-r' compiler option. If this directive is being executed as user input, you may delimit it with '#if INTERACTIVE'/'#endif'. + Diretivas #r só podem ocorrer em arquivos de script F# (extensões .fsx ou .fsscript). Mova este código para um arquivo de script ou substitua essa referência com a opção do compilador '-r'. Se essa diretiva estiver sendo executada como uma entrada do usuário, você poderá delimitá-lo com '#if INTERACTIVE'/'#endif'. + + + + This directive may only be used in F# script files (extensions .fsx or .fsscript). Either remove the directive, move this code to a script file or delimit the directive with '#if INTERACTIVE'/'#endif'. + Esta diretiva só pode ser usada em arquivos de script F# (extensões .fsx ou .fsscript). Remova a diretiva e mova este código para um arquivo de script, ou então, delimite a diretiva com '#if INTERACTIVE'/'#endif'. + + + + Unable to find the file '{0}' in any of\n {1} + Não foi possível encontrar o arquivo '{0}' em qualquer um dos\n {1} + + + + Assembly reference '{0}' was not found or is invalid + A referência de assembly '{0}' não foi localizada ou é inválida + + + + One or more warnings in loaded file.\n + O arquivo carregado possui um ou mais avisos.\n + + + + One or more errors in loaded file.\n + O arquivo carregado possui um ou mais erros\n + + + + Loaded files may only be F# source files (extension .fs). This F# script file (.fsx or .fsscript) will be treated as an F# source file + Arquivos carregados só podem ser arquivos de origem F# (extensão .fs). Este arquivo de script F# (.fsx ou .fsscript) será tratado como um arquivo de origem F# + + + + Invalid assembly name '{0}' from InternalsVisibleTo attribute in {1} + Nome de assembly inválido '{0}' do atributo InternalsVisibleTo em {1} + + + + Invalid assembly name '{0}' from InternalsVisibleTo attribute (assembly filename not available) + Nome de assembly inválido '{0}' do atributo InternalsVisibleTo (o nome de arquivo de assembly não está disponível) + + + + Could not load file '{0}' because it does not exist or is inaccessible + Não foi possível carregar o arquivo '{0}' porque ele não existe ou não está acessível + + + + {0} (Code={1}) + {0} (Code={1}) + + + + internal error: {0} + erro interno: {0} + + + + + \ No newline at end of file diff --git a/src/fsharp/xlf/FSStrings.ru.xlf b/src/fsharp/xlf/FSStrings.ru.xlf new file mode 100644 index 00000000000..ebae0bf0ec3 --- /dev/null +++ b/src/fsharp/xlf/FSStrings.ru.xlf @@ -0,0 +1,1622 @@ + + + + + + . See also {0}. + . См. также {0}. + + + + The tuples have differing lengths of {0} and {1} + Кортежи имеют различающиеся длины {0} и {1} + + + + The types '{0}' and '{1}' cannot be unified. + Невозможно объединить типы "{0}" и "{1}". + + + + A type parameter is missing a constraint '{0}' + В параметре типа отсутствует ограничение "{0}" + + + + The unit of measure '{0}' does not match the unit of measure '{1}' + Единица измерения "{0}" не совпадает с единицей измерения "{1}" + + + + The type '{0}' does not match the type '{1}' + Тип "{0}" не совпадает с типом "{1}" + + + + The type '{0}' is not compatible with the type '{1}'{2} + Тип "{0}" несовместим с типом "{1}"{2} + + + + This expression was expected to have type\n '{1}' \nbut here has type\n '{0}' {2} + В данном выражении требовалось наличие типа\n "{1}" \n, но получен тип\n "{0}" {2} + + + + Type mismatch. Expecting a\n '{0}' \nbut given a\n '{1}' {2}\n + Несоответствие типов. Требуется \n "{0}" \n, но получен\n "{1}" {2}\n + + + + Type constraint mismatch when applying the default type '{0}' for a type inference variable. + Несоответствие ограничений типов при применении типа по умолчанию "{0}" в качестве переменной определения типа. + + + + Consider adding further type constraints + Попробуйте добавить дополнительные ограничения типа + + + + Type constraint mismatch. The type \n '{0}' \nis not compatible with type\n '{1}' {2}\n + Несоответствие ограничений типов. Тип \n "{0}" \nнесовместим с типом\n "{1}" {2}\n + + + + Uppercase variable identifiers should not generally be used in patterns, and may indicate a misspelt pattern name. + Идентификаторы переменных в верхнем регистре обычно не должны использоваться в шаблонах, и могут указывать на неправильно написанное имя шаблона. + + + + Discriminated union cases and exception labels must be uppercase identifiers + Дискриминированные случаи объединения и метки исключений должны являться идентификаторами верхнего регистра + + + + Possible overload: '{0}'. {1}. + Возможная перегрузка: "{0}". {1}. + + + + \n\nPossible best overload: '{0}'. + \n\nВозможная наилучшая перегрузка: '{0}'. + + + + This function takes too many arguments, or is used in a context where a function is not expected + Эта функция принимает слишком много аргументов либо используется в контексте, где функции не допускаются + + + + Member constraints with the name '{0}' are given special status by the F# compiler as certain .NET types are implicitly augmented with this member. This may result in runtime failures if you attempt to invoke the member constraint from your own code. + Ограничения элементов с именем "{0}" получают особый статус в компиляторе F#, так как некоторые типы .NET неявно приращиваются к этим элементам. Результатом могут послужить сбои во время выполнения при попытке вызова ограничения элемента из собственного кода. + + + + A definition to be compiled as a .NET event does not have the expected form. Only property members can be compiled as .NET events. + Определение к компиляции в качестве события .NET не имеет требуемой формы. Только элементы свойств могут компилироваться как события .NET. + + + + Implicit object constructors for structs must take at least one argument + Конструкторы неявных объектов для структур должны принимать по меньшей мере один аргумент + + + + The type implements the interface '{0}' but this is not revealed by the signature. You should list the interface in the signature, as the interface will be discoverable via dynamic type casts and/or reflection. + Тип реализует интерфейс "{0}", но это не показывается сигнатурой. Следует указать список в сигнатуре, так как интерфейс можно будет найти через динамические приведения и (или) отражение типов. + + + + The type '{0}' expects {1} type argument(s) but is given {2} + Для типа "{0}" потребуется {1} аргументов типа, получено {2} + + + + Lookup on object of indeterminate type based on information prior to this program point. A type annotation may be needed prior to this program point to constrain the type of the object. This may allow the lookup to be resolved. + Поиск объекта неопределенного типа, основанного на информации до данной точки программы. Возможно, перед данной точкой программы потребуется аннотация типа, с целью ограничения типа объекта. Возможно, это позволит разрешить поиск. + + + + Duplicate definition of {0} '{1}' + Повторяющееся определение {0} "{1}" + + + + The {0} '{1}' can not be defined because the name '{2}' clashes with the {3} '{4}' in this type or module + {0} "{1}" не удается определить, так как имя "{2}" конфликтует с {3} "{4}" в данном типе или модуле + + + + Two members called '{0}' have the same signature + Два элемента с именем "{0}" имеют одну и ту же сигнатуру + + + + Duplicate definition of {0} '{1}' + Повторяющееся определение {0} "{1}" + + + + A construct with this name was found in FSharp.PowerPack.dll, which contains some modules and types that were implicitly referenced in some previous versions of F#. You may need to add an explicit reference to this DLL in order to compile this code. + Конструкция с данным именем была найдена в FSharp.PowerPack.dll; она содержит некоторые модели и типы, на которые есть неявные ссылки в некоторых предыдущих версиях F#. Возможно, потребуется добавить явную ссылку на данный DLL, чтобы скомпилировать этот код. + + + + This field is not mutable + Это поле не является изменяемым + + + + The fields '{0}' and '{1}' are from different types + Поля "{0}" и "{1}" принадлежат различным типам + + + + '{0}' is bound twice in this pattern + {0} в данном шаблоне привязан дважды + + + + A use of the function '{0}' does not match a type inferred elsewhere. The inferred type of the function is\n {1}. \nThe type of the function required at this point of use is\n {2} {3}\nThis error may be due to limitations associated with generic recursion within a 'let rec' collection or within a group of classes. Consider giving a full type signature for the targets of recursive calls including type annotations for both argument and return types. + Использование функции "{0}" не совпадает с типом, логически выводимым где-то еще. Логически выводимым типом функции является \n {1}. \nТипом требуемой в данный момент использования функцией является \n {2} {3}\nДанная ошибка может происходить из-за ограничений, связанных с базовой рекурсией внутри коллекции "let rec", или внутри группы классов. Рекомендуется предоставить сигнатуру полного типа для целей рекурсивных вызовов, включая аннотации типов для типов возвращаемых значений и аргумента. + + + + Invalid runtime coercion or type test from type {0} to {1}\n{2} + Недопустимое приведение или проверка типа во время выполнения от типа {0} к {1}\n{2} + + + + This runtime coercion or type test from type\n {0} \n to \n {1} \ninvolves an indeterminate type based on information prior to this program point. Runtime type tests are not allowed on some types. Further type annotations are needed. + Данное приведение или проверка типа во время выполнения от типа\n {0} \n к \n {1} \nвключает неопределенный тип, основанный на информации до данной точки программы. Проверки типов во время выполнения не разрешены для некоторых типов. Необходимы дополнительные примечания типа. + + + + The static coercion from type\n {0} \nto \n {1} \n involves an indeterminate type based on information prior to this program point. Static coercions are not allowed on some types. Further type annotations are needed. + Статическое приведение от типа \n {0} \nк \n {1} \n включает неопределенный тип, основанный на информации до данной точки программы. Статическое приведение не разрешено для некоторых типов. Необходимы дополнительные примечания типа. + + + + A coercion from the value type \n {0} \nto the type \n {1} \nwill involve boxing. Consider using 'box' instead + Приведение от типа-значения \n {0} \nк типу \n {1} \nвызовет упаковку. Рекомендуется вместо этого использовать "box" + + + + This type is 'abstract' since some abstract members have not been given an implementation. If this is intentional then add the '[<AbstractClass>]' attribute to your type. + Данный тип является "абстрактным", так как у некоторых абстрактных элементов нет реализации. Если это сделано намеренно, добавьте к своему типу атрибут "[<AbstractClass>]". + + + + This construct causes code to be less generic than indicated by its type annotations. The type variable implied by the use of a '#', '_' or other type annotation at or near '{0}' has been constrained to be type '{1}'. + Данная конструкция служит причиной того, что код становится менее базовым, чем указано в аннотации его типа. Переменная типа, подразумеваемая использованием "#", "_" или другой аннотации типа в "{0}" или рядом, была ограничена до типа "{1}". + + + + This construct causes code to be less generic than indicated by the type annotations. The unit-of-measure variable '{0} has been constrained to be measure '{1}'. + Данная конструкция служит причиной того, что код становится менее базовым, чем указано в аннотациях типа. Переменная единицы измерения "{0}" была ограничена до измерения "{1}". + + + + This construct causes code to be less generic than indicated by the type annotations. The type variable '{0} has been constrained to be type '{1}'. + Данная конструкция служит причиной того, что код становится менее базовым, чем указано в аннотациях типа. Переменная типа "{0}" была ограничена до типа "{1}". + + + + identifier + идентификатор + + + + integer literal + целочисленный литерал + + + + floating point literal + литерал с плавающей точкой + + + + decimal literal + десятичный литерал + + + + character literal + символьный литерал + + + + keyword 'base' + ключевое слово "base" + + + + symbol '(*)' + символ "(*)" + + + + symbol '$' + символ "$" + + + + infix operator + инфиксный оператор + + + + infix operator + инфиксный оператор + + + + symbol ':>' + символ ":>" + + + + symbol '::' + символ "::" + + + + symbol '{0} + символ "{0} + + + + infix operator + инфиксный оператор + + + + infix operator + инфиксный оператор + + + + infix operator + инфиксный оператор + + + + prefix operator + префиксный оператор + + + + symbol ':?>' + символ ":?>" + + + + infix operator + инфиксный оператор + + + + infix operator + инфиксный оператор + + + + symbol '&' + символ "&" + + + + symbol '&&' + символ "&&" + + + + symbol '||' + символ "||" + + + + symbol '<' + символ "<" + + + + symbol '>' + символ ">" + + + + symbol '?' + символ "?" + + + + symbol '??' + символ "??" + + + + symbol ':?' + символ ":?" + + + + integer.. + целое.. + + + + symbol '..' + символ ".." + + + + quote symbol + символ кавычки + + + + symbol '*' + символ "*" + + + + type application + приложение типа + + + + symbol ':' + символ ":" + + + + symbol ':=' + символ ":=" + + + + symbol '<-' + символ "<-" + + + + symbol '=' + символ "=" + + + + symbol '>|]' + символ ">|]" + + + + symbol '-' + символ "-" + + + + prefix operator + префиксный оператор + + + + operator name + имя оператора + + + + symbol ',' + символ "," + + + + symbol '.' + символ "." + + + + symbol '|' + символ "|" + + + + symbol # + символ # + + + + symbol '_' + символ "_" + + + + symbol ';' + символ ";" + + + + symbol ';;' + символ ";;" + + + + symbol '(' + символ "(" + + + + symbol ')' + символ ")" + + + + symbol 'splice' + символ "splice" + + + + start of quotation + начало цитирования + + + + symbol '[' + символ "[" + + + + symbol '[|' + символ "[|" + + + + symbol '[<' + символ "[<" + + + + symbol '{' + символ "{" + + + + symbol '{<' + символ "{<" + + + + symbol '|]' + символ "|]" + + + + symbol '>}' + символ ">}" + + + + symbol '>]' + символ ">]" + + + + end of quotation + конец цитирования + + + + symbol ']' + символ "]" + + + + symbol '}' + символ "}" + + + + keyword 'public' + ключевое слово "public" + + + + keyword 'private' + ключевое слово "private" + + + + keyword 'internal' + ключевое слово "internal" + + + + keyword 'fixed' + ключевое слово "fixed" + + + + keyword 'constraint' + ключевое слово "constraint" + + + + keyword 'instance' + ключевое слово "instance" + + + + keyword 'delegate' + ключевое слово "delegate" + + + + keyword 'inherit' + ключевое слово "inherit" + + + + keyword 'constructor' + ключевое слово "constructor" + + + + keyword 'default' + ключевое слово "default" + + + + keyword 'override' + ключевое слово "override" + + + + keyword 'abstract' + ключевое слово "abstract" + + + + keyword 'class' + ключевое слово "class" + + + + keyword 'member' + ключевое слово "member" + + + + keyword 'static' + ключевое слово "static" + + + + keyword 'namespace' + ключевое слово "namespace" + + + + start of structured construct + начало структурированной конструкции + + + + incomplete structured construct at or before this point + неполный структурированный конструктор в текущей точке или перед ней + + + + Incomplete structured construct at or before this point + Неполный структурированный конструктор в текущей точке или перед ней + + + + keyword 'then' + ключевое слово "then" + + + + keyword 'else' + ключевое слово "else" + + + + keyword 'let' or 'use' + ключевое слово "let" или "use" + + + + binder keyword + ключевое слово binder + + + + keyword 'do' + ключевое слово "do" + + + + keyword 'const' + ключевое слово const + + + + keyword 'with' + ключевое слово "with" + + + + keyword 'function' + ключевое слово "function" + + + + keyword 'fun' + ключевое слово "fun" + + + + end of input + конец входных данных + + + + internal dummy token + внутренняя лексема-заполнитель + + + + keyword 'do!' + ключевое слово "do!" + + + + yield + yield + + + + yield! + yield! + + + + keyword 'interface' + ключевое слово "interface" + + + + keyword 'elif' + ключевое слово "elif" + + + + symbol '->' + символ "->" + + + + keyword 'sig' + ключевое слово "sig" + + + + keyword 'struct' + ключевое слово "struct" + + + + keyword 'upcast' + ключевое слово "upcast" + + + + keyword 'downcast' + ключевое слово "downcast" + + + + keyword 'null' + ключевое слово "null" + + + + reserved keyword + зарезервированное ключевое слово + + + + keyword 'module' + ключевое слово "module" + + + + keyword 'and' + ключевое слово "and" + + + + keyword 'as' + ключевое слово "as" + + + + keyword 'assert' + ключевое слово "assert" + + + + keyword 'asr' + ключевое слово "asr" + + + + keyword 'downto' + ключевое слово "downto" + + + + keyword 'exception' + ключевое слово "exception" + + + + keyword 'false' + ключевое слово "false" + + + + keyword 'for' + ключевое слово "for" + + + + keyword 'fun' + ключевое слово "fun" + + + + keyword 'function' + ключевое слово "function" + + + + keyword 'finally' + ключевое слово "finally" + + + + keyword 'lazy' + ключевое слово "lazy" + + + + keyword 'match' + ключевое слово "match" + + + + keyword 'match!' + ключевое слово "match!" + + + + keyword 'mutable' + ключевое слово "mutable" + + + + keyword 'new' + ключевое слово "new" + + + + keyword 'of' + ключевое слово "of" + + + + keyword 'open' + ключевое слово "open" + + + + keyword 'or' + ключевое слово "or" + + + + keyword 'void' + ключевое слово "void" + + + + keyword 'extern' + ключевое слово "extern" + + + + keyword 'interface' + ключевое слово "interface" + + + + keyword 'rec' + ключевое слово "rec" + + + + keyword 'to' + ключевое слово "to" + + + + keyword 'true' + ключевое слово "true" + + + + keyword 'try' + ключевое слово "try" + + + + keyword 'type' + ключевое слово "type" + + + + keyword 'val' + ключевое слово "val" + + + + keyword 'inline' + ключевое слово "inline" + + + + keyword 'when' + ключевое слово "when" + + + + keyword 'while' + ключевое слово "while" + + + + keyword 'with' + ключевое слово "with" + + + + keyword 'if' + ключевое слово "if" + + + + keyword 'do' + ключевое слово "do" + + + + keyword 'global' + ключевое слово "global" + + + + keyword 'done' + ключевое слово "done" + + + + keyword 'in' + ключевое слово "in" + + + + symbol '(' + символ "(" + + + + symbol'[' + символ "[" + + + + keyword 'begin' + ключевое слово "begin" + + + + keyword 'end' + ключевое слово "end" + + + + directive + директива + + + + inactive code + неактивный код + + + + lex failure + лексическая ошибка + + + + whitespace + пустое пространство + + + + comment + комментарий + + + + line comment + строчный комментарий + + + + string text + строковый текст + + + + compiler generated literal + сформированный компилятором литерал + + + + byte array literal + литерал массива байтов + + + + string literal + строковый литерал + + + + end of input + конец входных данных + + + + Unexpected end of input + Непредвиденный конец входных данных + + + + Unexpected {0} + Недопустимый {0} + + + + in interaction + в взаимодействии + + + + in directive + в директиве + + + + in field declaration + в объявлении поля + + + + in discriminated union case declaration + в объявлении ветви различаемого объединения + + + + in binding + в привязке + + + + in binding + в привязке + + + + in member definition + в определении элемента + + + + in definitions + в определениях + + + + in member signature + в сигнатуре элемента + + + + in value signature + в сигнатуре значения + + + + in type signature + в сигнатуре типа + + + + in lambda expression + в лямбда-выражении + + + + in union case + в ветви объединения + + + + in extern declaration + в объявлении extern + + + + in object expression + в выражении объекта + + + + in if/then/else expression + в выражении if/then/else + + + + in open declaration + в объявлении open + + + + in module or namespace signature + в сигнатуре модуля или пространства имен + + + + in pattern matching + в сопоставлении шаблона + + + + in begin/end expression + в выражении begin/end + + + + in record expression + в выражении записи + + + + in type definition + в определении типа + + + + in exception definition + в определении исключения + + + + in type name + в имени типа + + + + in attribute list + в списке атрибутов + + + + in quotation literal + в литерале цитирования + + + + in type constraint + в ограничении типа + + + + in implementation file + в файле реализации + + + + in definition + в определении + + + + in signature file + в файле сигнатуры + + + + in pattern + в шаблоне + + + + in expression + в выражении + + + + in type + в типе + + + + in type arguments + в аргументах типа + + + + keyword + ключевое слово + + + + symbol + символ + + + + (due to indentation-aware syntax) + (из-за синтаксиса с учетом отступов) + + + + . Expected {0} or other token. + . Требуется {0} или другая лексема. + + + + . Expected {0}, {1} or other token. + . Требуется {0}, {1} или другая лексема. + + + + . Expected {0}, {1}, {2} or other token. + . Требуется {0}, {1}, {2} или другая лексема. + + + + The type '{0}' cannot be used as the source of a type test or runtime coercion + Тип "{0}" не может быть использован, как источник типового теста или преобразование во время выполнения + + + + The type '{0}' does not have any proper subtypes and cannot be used as the source of a type test or runtime coercion. + Тип "{0}" не имеет подходящих подтипов и не может использоваться как источник проверки или приведения типов во время выполнения. + + + + The type '{0}' does not have any proper subtypes and need not be used as the target of a static coercion + Тип "{0}" не имеет каких-либо корректных подтипов и не должен использоваться в качестве цели статического преобразования + + + + This upcast is unnecessary - the types are identical + Нет необходимости в данном повышении - типы идентичны + + + + This type test or downcast will always hold + Данная проверка типа или понижение будет всегда сохраняться + + + + The member '{0}' does not have the correct type to override any given virtual method + Элемент "{0}" не имеет корректного типа для переопределения какого-либо данного виртуального метода + + + + The member '{0}' does not have the correct type to override the corresponding abstract method. + Элемент "{0}" не имеет корректного типа для переопределения какого-либо данного абстрактного метода + + + + The required signature is '{0}'. + Необходимая сигнатура: {0}. + + + + The member '{0}' is specialized with 'unit' but 'unit' can't be used as return type of an abstract method parameterized on return type. + Член "{0}" специализирован с помощью "unit", но "unit" нельзя использовать в качестве типа возвращаемого значения абстрактного метода, параметризованного по типу возвращаемого значения. + + + + This constructor is applied to {0} argument(s) but expects {1} + Данный конструктор применен к {0} аргументам; требуется {1} + + + + The two sides of this 'or' pattern bind different sets of variables + Две стороны данного шаблона "or" связывают различные наборы переменных + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \n{3}. + Модуль "{0}" содержит\n {1} \nоднако его сигнатура задает\n {2} \n{3}. + + + + Module '{0}' requires a {1} '{2}' + Для модуля "{0}" требуется {1} "{2}" + + + + The use of native pointers may result in unverifiable .NET IL code + Использование собственных указателей может повлечь за собой непроверяемый код .NET IL + + + + {0} + {0} + + + + Thread static and context static 'let' bindings are deprecated. Instead use a declaration of the form 'static val mutable <ident> : <type>' in a class. Add the 'DefaultValue' attribute to this declaration to indicate that the value is initialized to the default value on each new thread. + Привязки статического потока и статического контекста "let" не рекомендуются к использованию. Вместо них используется объявление формы "static val mutable <ident> : <type>" в классе. Добавьте атрибут "DefaultValue", чтобы показать, что значение инициализируется как значение по умолчанию в каждом новом потоке. + + + + This expression is a function value, i.e. is missing arguments. Its type is {0}. + Данное выражение является значением функции, напр. в нем отсутствуют аргументы. Его тип - {0}. + + + + The result of this expression has type '{0}' and is implicitly ignored. Consider using 'ignore' to discard this value explicitly, e.g. 'expr |> ignore', or 'let' to bind the result to a name, e.g. 'let result = expr'. + Результат этого выражения имеет тип "{0}" и неявно игнорируется. Попробуйте использовать "ignore", чтобы явным образом удалить это значение (например: "expr |> ignore"), или используйте "let", чтобы привязать результат к имени (например: "let result = expr"). + + + + The result of this equality expression has type '{0}' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. + Результат этого выражения равенства имеет тип "{0}" и неявно отбрасывается. Попробуйте использовать "let", чтобы привязать результат к имени, например: "let result = expression". + + + + The result of this equality expression has type '{0}' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to set a value to a property, then use the '<-' operator e.g. '{1}.{2} <- expression'. + Результат этого выражения равенства имеет тип "{0}" и неявно отбрасывается. Попробуйте использовать "let", чтобы привязать результат к имени, например "let result = expression". Если вы собирались присвоить значение свойству, используйте оператор "<-", например: "{1}.{2} <- expression". + + + + The result of this equality expression has type '{0}' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to mutate a value, then mark the value 'mutable' and use the '<-' operator e.g. '{1} <- expression'. + Результат этого выражения равенства имеет тип "{0}" и неявно отбрасывается. Попробуйте использовать "let", чтобы привязать результат к имени, например "let result = expression". Если вы собирались изменять значение, отметьте его как "mutable" и используйте оператор "<-", например: "{1} <- expression". + + + + The result of this equality expression has type '{0}' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to mutate a value, then use the '<-' operator e.g. '{1} <- expression'. + Результат этого выражения равенства имеет тип "{0}" и неявно отбрасывается. Попробуйте использовать "let", чтобы привязать результат к имени, например "let result = expression". Если вы собирались изменять значение, используйте оператор "<-", например: "{1} <- expression". + + + + This recursive use will be checked for initialization-soundness at runtime. This warning is usually harmless, and may be suppressed by using '#nowarn "21"' or '--nowarn:21'. + Это рекурсивное использование будет проверено на правильность инициализации во время выполнения. Данное предупреждение обычно безвредно; его можно отменить, используя #nowarn "21" или --nowarn 21. + + + + The value '{0}' will be evaluated as part of its own definition + Значение "{0}" будет оценено как часть его собственного определения + + + + This value will be eventually evaluated as part of its own definition. You may need to make the value lazy or a function. Value '{0}'{1}. + Это значение впоследствии будет оценено как часть его собственного определения. Может потребоваться сделать значение неактивным или функцией. Значение "{0}"{1}. + + + + will evaluate '{0}' + вычислит "{0}" + + + + Bindings may be executed out-of-order because of this forward reference. + Из-за этой короткой ссылки привязки могут выполняться с нарушением порядка. + + + + This and other recursive references to the object(s) being defined will be checked for initialization-soundness at runtime through the use of a delayed reference. This is because you are defining one or more recursive objects, rather than recursive functions. This warning may be suppressed by using '#nowarn "40"' or '--nowarn:40'. + Эта и другие рекурсивные ссылки на определяемый объект будут проверены на правильность инициализации во время выполнения посредством использования отложенной ссылки. Это происходит потому, что вы определяете один или несколько рекурсивных объектов, а не рекурсивных функций. Данное предупреждение можно отменить, используя #nowarn "40" или --nowarn 40. + + + + Recursive references to the object being defined will be checked for initialization soundness at runtime through the use of a delayed reference. Consider placing self-references in members or within a trailing expression of the form '<ctor-expr> then <expr>'. + Рекурсивные ссылки на определяемый объект будут проверены на правильность инициализации во время выполнения посредством использования отложенной ссылки. Попробуйте разместить рекурсивные ссылки в элементах или в завершающем выражении в форме "<ctor-expr> then <expr>". + + + + Recursive references to the object being defined will be checked for initialization soundness at runtime through the use of a delayed reference. Consider placing self-references within 'do' statements after the last 'let' binding in the construction sequence. + Рекурсивные ссылки на определяемый объект будут проверены на правильность инициализации во время выполнения посредством использования отложенной ссылки. Попробуйте разместить рекурсивные ссылки в операторах "do" после последнего "let" с привязкой к последовательности конструкторов. + + + + The containing type can use 'null' as a representation value for its nullary union case. Invoking an abstract or virtual member or an interface implementation on a null value will lead to an exception. If necessary add a dummy data value to the nullary constructor to avoid 'null' being used as a representation for this type. + Содержащийся тип может использовать для своего случая нулевого объединения "null". Вызов абстрактного или виртуального элемента, или же реализации интерфейса на нулевом значении приведет к исключению. При необходимости добавьте в нулевой конструктор значение-заполнитель, чтобы избежать использования "null" в качестве представления для данного типа. + + + + The containing type can use 'null' as a representation value for its nullary union case. This member will be compiled as a static member. + Содержащийся тип может использовать для своего случая нулевого объединения "null". Данный элемент будет скомпилирован, как статический. + + + + The member '{0}' doesn't correspond to a unique abstract slot based on name and argument count alone + Элемент "{0}" не соответствует с уникальным абстрактным слотом, основанным только на имени и числе аргументов + + + + . Multiple implemented interfaces have a member with this name and argument count + . Несколько реализованных интерфейсов имеют элемент с этим именем и числом аргументов + + + + . Consider implementing interfaces '{0}' and '{1}' explicitly. + . Рекомендуется явно реализовать интерфейсы "{0}" и "{1}". + + + + . Additional type annotations may be required to indicate the relevant override. This warning can be disabled using '#nowarn "70"' or '--nowarn:70'. + . Для указания соответствующего переопределения могут потребоваться дополнительные аннотации типа. Данное предупреждение можно отключить, используя #nowarn "70" или --nowarn 70. + + + + parse error + ошибка синтаксического анализа + + + + parse error: unexpected end of file + ошибка синтаксического анализа: непредвиденный конец файла + + + + {0} + {0} + + + + internal error: {0} + внутренняя ошибка: {0} + + + + {0} + {0} + + + + Incomplete pattern matches on this expression. + Незавершенный шаблон соответствует данному выражению. + + + + For example, the value '{0}' may indicate a case not covered by the pattern(s). + К примеру, значение "{0}" может указывать на случай, не покрытый шаблоном(ами). + + + + For example, the value '{0}' may indicate a case not covered by the pattern(s). However, a pattern rule with a 'when' clause might successfully match this value. + К примеру, значение "{0}" может указывать на случай, не покрытый шаблоном(ами). Однако, правило шаблона с конструкцией "when" может совпасть с этим значением. + + + + Unmatched elements will be ignored. + Элементы без соответствий будут проигнорированы. + + + + Enums may take values outside known cases. + Перечисления могут принимать значения, выходящие за пределы известных случаев. + + + + This rule will never be matched + Данное правило никогда не будет сопоставлено + + + + This value is not mutable. Consider using the mutable keyword, e.g. 'let mutable {0} = expression'. + Это значение не является изменяемым. Рекомендуется использовать ключевое слово с возможностью изменения, например "let mutable {0} = expression". + + + + This value is not local + Это значение не является локальным + + + + This construct is deprecated + Такая конструкция не рекомендуется к использованию + + + + . {0} + . {0} + + + + {0}. This warning can be disabled using '--nowarn:57' or '#nowarn "57"'. + {0}. Данное предупреждение можно отключить, используя --nowarn 57 или #nowarn "57". + + + + Uses of this construct may result in the generation of unverifiable .NET IL code. This warning can be disabled using '--nowarn:9' or '#nowarn "9"'. + Использование данной конструкции может повлечь за собой создание непроверяемого кода .NET IL. Данное предупреждение можно отключить, используя --nowarn 9 или #nowarn "9". + + + + This construct is deprecated: {0} + Такая конструкция не рекомендуется к использованию: {0} + + + + This construct is deprecated: it is only for use in the F# library + Такая конструкция не рекомендуется к использованию: она используется только в библиотеке F# + + + + The following fields require values: {0} + Для следующих полей требуются значения: {0} + + + + Value restriction. The value '{0}' has generic type\n {1} \nEither make the arguments to '{2}' explicit or, if you do not intend for it to be generic, add a type annotation. + Ограничение значения. Значение "{0}" имеет универсальный тип\n {1} \nЛибо сделайте аргументы для "{2}" явными либо (если универсальный тип не требуется) добавьте аннотацию типа. + + + + Value restriction. The value '{0}' has generic type\n {1} \nEither make '{2}' into a function with explicit arguments or, if you do not intend for it to be generic, add a type annotation. + Ограничение значения. Значение "{0}" имеет универсальный тип\n {1} \nЛибо сделайте "{2}" функцией с явными аргументами, либо (если универсальный тип не требуется) добавьте аннотацию типа. + + + + Value restriction. This member has been inferred to have generic type\n {0} \nConstructors and property getters/setters cannot be more generic than the enclosing type. Add a type annotation to indicate the exact types involved. + Ограничение значения. Данный выведенный элемент должен иметь универсальный тип\n {0} \nМетоды получения или задания свойств и конструкторов не могут быть более универсальными, чем вмещающий тип. Добавьте аннотацию типа, чтобы точно обозначить затрагиваемые типы. + + + + Value restriction. The value '{0}' has been inferred to have generic type\n {1} \nEither make the arguments to '{2}' explicit or, if you do not intend for it to be generic, add a type annotation. + Ограничение значения. Выведенное значение "{0}" должно иметь универсальный тип\n {1} \nЛибо сделайте аргументы для "{2}" явными, либо (если универсальный тип не требуется) добавьте аннотацию типа. + + + + Value restriction. The value '{0}' has been inferred to have generic type\n {1} \nEither define '{2}' as a simple data term, make it a function with explicit arguments or, if you do not intend for it to be generic, add a type annotation. + Ограничение значения. Выведенное значение "{0}" должно иметь универсальный тип\n {1} \nЛибо определите "{2}" как простой член данных, либо сделайте его функцией с явными аргументами, либо (если универсальный тип не требуется) добавьте аннотацию типа. + + + + syntax error + синтаксическая ошибка + + + + {0} + {0} + + + + {0} + {0} + + + + Override implementations in augmentations are now deprecated. Override implementations should be given as part of the initial declaration of a type. + Реализации переопределений в приращениях теперь не рекомендуются к использованию. Реализации переопределений должны быть даны при первичном объявлении типа. + + + + Override implementations should be given as part of the initial declaration of a type. + Реализации переопределений должны быть даны при первичном объявлении типа. + + + + Interface implementations in augmentations are now deprecated. Interface implementations should be given on the initial declaration of a type. + Реализации интерфейсов в приращениях теперь являются не рекомендуемыми к использованию. Реализации интерфейсов должны быть даны при первичном объявлении типа. + + + + Interface implementations should be given on the initial declaration of a type. + Реализации интерфейсов должны быть даны при первичном объявлении типа. + + + + A required assembly reference is missing. You must add a reference to assembly '{0}'. + Ссылка на требуемую сборку отсутствует. Необходимо добавить ссылку на сборку "{0}". + + + + The type referenced through '{0}' is defined in an assembly that is not referenced. You must add a reference to assembly '{1}'. + Тип, на который есть ссылка через "{0}", определен в сборке, ссылка на которую отсутствует. Необходимо добавить ссылку на сборку "{1}". + + + + #I directives may only occur in F# script files (extensions .fsx or .fsscript). Either move this code to a script file, add a '-I' compiler option for this reference or delimit the directive with delimit it with '#if INTERACTIVE'/'#endif'. + Директивы #I могут встречаться только в файлах скриптов F# (расширения .fsx или .fsscript). Нужно либо переместить данный код в файл скрипта, либо добавить для данной ссылки параметр компилятора "-I", либо ограничить директиву с помощью "#if INTERACTIVE"/"#endif". + + + + #r directives may only occur in F# script files (extensions .fsx or .fsscript). Either move this code to a script file or replace this reference with the '-r' compiler option. If this directive is being executed as user input, you may delimit it with '#if INTERACTIVE'/'#endif'. + Директивы #r могут встречаться только в файлах сценариев F# (файлы с расширениями .fsx или .fsscript). Переместите этот код в файл сценария или замените эту ссылку параметром компилятора "-r". Если эта директива выполняется в качестве пользовательских входных данных, вы можете заключить ее в блок "#if INTERACTIVE"/"#endif". + + + + This directive may only be used in F# script files (extensions .fsx or .fsscript). Either remove the directive, move this code to a script file or delimit the directive with '#if INTERACTIVE'/'#endif'. + Данная директива может использоваться только в файлах скриптов F# (расширения .fsx или .fsscript). Нужно либо удалить директиву, либо переместить данный код в файл скрипта, либо ограничить директиву с помощью "#if INTERACTIVE"/"#endif". + + + + Unable to find the file '{0}' in any of\n {1} + Не удается найти файл "{0}" в любом из\n {1} + + + + Assembly reference '{0}' was not found or is invalid + Ссылка на сборку "{0}" не была найдена либо является недопустимой + + + + One or more warnings in loaded file.\n + Одно или несколько предупреждений в загруженном файле.\n + + + + One or more errors in loaded file.\n + Одна или несколько ошибок в загруженном файле.\n + + + + Loaded files may only be F# source files (extension .fs). This F# script file (.fsx or .fsscript) will be treated as an F# source file + Загруженные файлы могут являться только исходными файлами F# (расширение .fs). Данный файл скрипта F# (.fsx или .fsscript) будет рассмотрен, как исходный файл F# + + + + Invalid assembly name '{0}' from InternalsVisibleTo attribute in {1} + Недопустимое имя сборки "{0}" из атрибута InternalsVisibleTo в {1} + + + + Invalid assembly name '{0}' from InternalsVisibleTo attribute (assembly filename not available) + Недопустимое имя сборки "{0}" из атрибута InternalsVisibleTo (имя файла сборки недоступно) + + + + Could not load file '{0}' because it does not exist or is inaccessible + Не удалось загрузить файл "{0}", так как он не существует или недоступен + + + + {0} (Code={1}) + {0} (Код={1}) + + + + internal error: {0} + внутренняя ошибка: {0} + + + + + \ No newline at end of file diff --git a/src/fsharp/xlf/FSStrings.tr.xlf b/src/fsharp/xlf/FSStrings.tr.xlf new file mode 100644 index 00000000000..bc70825fa2c --- /dev/null +++ b/src/fsharp/xlf/FSStrings.tr.xlf @@ -0,0 +1,1622 @@ + + + + + + . See also {0}. + . Ayrıca bkz. {0}. + + + + The tuples have differing lengths of {0} and {1} + Demetlerde farklı {0} ve {1} uzunlukları var + + + + The types '{0}' and '{1}' cannot be unified. + {0}' ve '{1}' türleri birleştirilemez. + + + + A type parameter is missing a constraint '{0}' + Bir tür parametresinde kısıtlama eksik '{0}' + + + + The unit of measure '{0}' does not match the unit of measure '{1}' + {0}' ölçü birimi '{1}' ölçü birimi ile eşleşmiyor + + + + The type '{0}' does not match the type '{1}' + {0}' türü '{1}' türü ile eşleşmiyor + + + + The type '{0}' is not compatible with the type '{1}'{2} + {0}' türü '{1}'{2} türüyle uyumlu değil + + + + This expression was expected to have type\n '{1}' \nbut here has type\n '{0}' {2} + Bu ifadenin\n '{1}' \ntüründe olması bekleniyordu ancak buradaki tür\n '{0}' {2} + + + + Type mismatch. Expecting a\n '{0}' \nbut given a\n '{1}' {2}\n + Tür uyumsuzluğu. Beklenen şuydu:\n '{0}' \nancak şu sağlandı:\n '{1}' {2}\n + + + + Type constraint mismatch when applying the default type '{0}' for a type inference variable. + Tür çıkarma değişkeni için varsayılan '{0}' türü uygulanırken tür kısıtlaması uyuşmazlığı. + + + + Consider adding further type constraints + Yeni tür kısıtlamaları eklemeyi düşünün + + + + Type constraint mismatch. The type \n '{0}' \nis not compatible with type\n '{1}' {2}\n + Tür kısıtlaması uyumsuzluğu. \n '{0}' \ntürü şu türle uyumlu değil:\n '{1}' {2}\n + + + + Uppercase variable identifiers should not generally be used in patterns, and may indicate a misspelt pattern name. + Büyük harfli değişken tanımlayıcıları desenlerde genel olarak kullanılmamalıdır, yanlış yazılmış bir desen adının göstergesi olabilirler. + + + + Discriminated union cases and exception labels must be uppercase identifiers + Ayırt edici birleşim durumları ve özel durum etiketleri büyük harfli tanımlayıcılar olmalıdır + + + + Possible overload: '{0}'. {1}. + Olası aşırı yükleme: '{0}'. {1}. + + + + \n\nPossible best overload: '{0}'. + \n\nOlası en iyi aşırı yükleme: '{0}'. + + + + This function takes too many arguments, or is used in a context where a function is not expected + Bu işlev çok fazla bağımsız değişken alıyor veya bir işlev beklenmeyen bağlamda kullanılıyor + + + + Member constraints with the name '{0}' are given special status by the F# compiler as certain .NET types are implicitly augmented with this member. This may result in runtime failures if you attempt to invoke the member constraint from your own code. + Belirli .NET türleri örtük olarak bu üyeyle genişletildiği için '{0}' adlı üye kısıtlamalarına F# derleyicisi tarafından özel durum verildi. Üye kısıtlamasını kendi kodunuzdan çağırmayı denerseniz, bu, çalışma zamanı hatalarıyla sonuçlanabilir. + + + + A definition to be compiled as a .NET event does not have the expected form. Only property members can be compiled as .NET events. + .NET olayı olarak derlenecek bir tanım beklenen biçimde değil. Yalnızca özellik üyeleri .NET olayları olarak tanımlanabilir. + + + + Implicit object constructors for structs must take at least one argument + Yapıların örtük nesne oluşturucuları en az bir bağımsız değişken almalıdır + + + + The type implements the interface '{0}' but this is not revealed by the signature. You should list the interface in the signature, as the interface will be discoverable via dynamic type casts and/or reflection. + Bu tür '{0}' arabirimini uyguluyor ancak bu durum imza ile gösterilmiyor. Arabirim dinamik tür atamaları ve/veya yansıtma aracılığıyla bulunabileceği için arabirimi imzada listelemeniz gerekir. + + + + The type '{0}' expects {1} type argument(s) but is given {2} + {0}' türü {1} tür bağımsız değişkeni bekliyor ancak {2} verilmiş + + + + Lookup on object of indeterminate type based on information prior to this program point. A type annotation may be needed prior to this program point to constrain the type of the object. This may allow the lookup to be resolved. + Bu program noktasından önceki bilgilere dayalı olarak belirsiz türdeki nesne araması. Bu program noktasından önce nesnenin türünü kısıtlamak için bir tür ek açıklaması gerekebilir. Bu, aramanın çözümlenmesine izin verebilir. + + + + Duplicate definition of {0} '{1}' + Yinelenen {0} '{1}' tanımı + + + + The {0} '{1}' can not be defined because the name '{2}' clashes with the {3} '{4}' in this type or module + {2}' adı bu türde veya modülde {3} '{4}' ile çakıştığı için {0} '{1}' tanımlanamıyor + + + + Two members called '{0}' have the same signature + '{0}' çağrısı yapan iki üye aynı imzaya sahip + + + + Duplicate definition of {0} '{1}' + Yinelenen {0} '{1}' tanımı + + + + A construct with this name was found in FSharp.PowerPack.dll, which contains some modules and types that were implicitly referenced in some previous versions of F#. You may need to add an explicit reference to this DLL in order to compile this code. + Bu adlı bir yapı, F# dilinin önceki bazı sürümlerinde örtük olarak başvurulan bazı modül ve türleri içeren FSharp.PowerPack.dll dosyasında bulundu. Bu kodu derleyebilmek için bu DLL'ye açık başvuru eklemeniz gerekebilir. + + + + This field is not mutable + Bu alan değiştirilebilir değil + + + + The fields '{0}' and '{1}' are from different types + {0}' ve '{1}' alanları farklı türlerde + + + + '{0}' is bound twice in this pattern + '{0}' bu desende iki kez bağlandı + + + + A use of the function '{0}' does not match a type inferred elsewhere. The inferred type of the function is\n {1}. \nThe type of the function required at this point of use is\n {2} {3}\nThis error may be due to limitations associated with generic recursion within a 'let rec' collection or within a group of classes. Consider giving a full type signature for the targets of recursive calls including type annotations for both argument and return types. + {0}' işlevinin kullanımı başka bir yerde çıkarılmış türle eşleşmiyor. İşlevin çıkarılan türü\n {1}. \nBu kullanım noktasında gereken işlevin türü\n {2} {3}\nBu hata, 'let rec' koleksiyonu veya bir sınıf grubu içindeki genel özyineleme ile ilişkili sınırlamalar nedeniyle olabilir. Hem bağımsız değişken hem de dönüş türleri için tür ek açıklamaları ekleyerek özyinelemeli çağrıların hedefleri için tam tür imzası vermeyi düşünün. + + + + Invalid runtime coercion or type test from type {0} to {1}\n{2} + {0} türünden şu türe geçersiz çalışma zamanı zorlaması veya tür testi: {1}\n{2} + + + + This runtime coercion or type test from type\n {0} \n to \n {1} \ninvolves an indeterminate type based on information prior to this program point. Runtime type tests are not allowed on some types. Further type annotations are needed. + Tür\n {0} \n ile \n {1} \narasındaki bu çalışma zamanı zorlaması veya tür testi, bu program noktasından önceki bilgilere dayalı olarak belirsiz bir tür içeriyor. Çalışma zamanı tür testlerine bazı türlerde izin verilmez. Yeni tür ek açıklamaları gereklidir. + + + + The static coercion from type\n {0} \nto \n {1} \n involves an indeterminate type based on information prior to this program point. Static coercions are not allowed on some types. Further type annotations are needed. + Bu program noktasından önceki bilgilere dayalı olarak\n {0} \ntüründen \n {1} \n türüne statik zorlama belirsiz bir tür içeriyor. Statik zorlamalara bazı türlerde izin verilmez. Yeni tür ek açıklamaları gereklidir. + + + + A coercion from the value type \n {0} \nto the type \n {1} \nwill involve boxing. Consider using 'box' instead + Zorlamanın \n {0} \ndeğer türünden \n {1} \ntürüne yapılması kutulama gerektirir. Bunun yerine 'box' kullanmayı düşünün + + + + This type is 'abstract' since some abstract members have not been given an implementation. If this is intentional then add the '[<AbstractClass>]' attribute to your type. + Bazı soyut üyelere bir uygulama verilmediğinden bu bir 'abstract' türdür. Bu bilerek yapıldıysa, türünüze '[<AbstractClass>]' özniteliğini ekleyin. + + + + This construct causes code to be less generic than indicated by its type annotations. The type variable implied by the use of a '#', '_' or other type annotation at or near '{0}' has been constrained to be type '{1}'. + Bu yapı, kodun kendi tür ek açıklamaları ile belirtilenden daha az genel olmasına neden olur. '#', '_' kullanılmasıyla veya '{0}' konumundaki ya da yakınındaki başka bir tür ek açıklamasıyla işaret edilen tür değişkeni '{1}' türü olacak şekilde kısıtlandı. + + + + This construct causes code to be less generic than indicated by the type annotations. The unit-of-measure variable '{0} has been constrained to be measure '{1}'. + Bu yapı, kodun kendi tür ek açıklamaları ile belirtilenden daha az genel olmasına neden olur. Ölçü birimi değişkeni '{0}, '{1}' ölçüsü olacak şekilde kısıtlandı. + + + + This construct causes code to be less generic than indicated by the type annotations. The type variable '{0} has been constrained to be type '{1}'. + Bu yapı, kodun kendi tür ek açıklamaları ile belirtilenden daha az genel olmasına neden olur. Tür değişkeni '{0}, '{1}' türü olacak şekilde kısıtlandı. + + + + identifier + tanımlayıcı + + + + integer literal + tamsayı sabit değeri + + + + floating point literal + kayan nokta sabit değeri + + + + decimal literal + ondalık sabit değeri + + + + character literal + karakter sabit değeri + + + + keyword 'base' + 'base' anahtar sözcüğü + + + + symbol '(*)' + '(*)' simgesi + + + + symbol '$' + '$' simgesi + + + + infix operator + içtakı işleci + + + + infix operator + içtakı işleci + + + + symbol ':>' + ':>' simgesi + + + + symbol '::' + '::' simgesi + + + + symbol '{0} + '{0} simgesi + + + + infix operator + içtakı işleci + + + + infix operator + içtakı işleci + + + + infix operator + içtakı işleci + + + + prefix operator + ön ek işleci + + + + symbol ':?>' + ':?>' simgesi + + + + infix operator + içtakı işleci + + + + infix operator + içtakı işleci + + + + symbol '&' + '&' simgesi + + + + symbol '&&' + '&&' simgesi + + + + symbol '||' + '||' simgesi + + + + symbol '<' + '<' simgesi + + + + symbol '>' + '>' simgesi + + + + symbol '?' + '?' simgesi + + + + symbol '??' + '??' simgesi + + + + symbol ':?' + ':?' simgesi + + + + integer.. + tamsayı.. + + + + symbol '..' + '..' simgesi + + + + quote symbol + alıntı simgesi + + + + symbol '*' + '*' simgesi + + + + type application + tür uygulaması + + + + symbol ':' + ':' simgesi + + + + symbol ':=' + ':=' simgesi + + + + symbol '<-' + '<-' simgesi + + + + symbol '=' + '=' simgesi + + + + symbol '>|]' + '>|]' simgesi + + + + symbol '-' + '-' simgesi + + + + prefix operator + ön ek işleci + + + + operator name + işleç adı + + + + symbol ',' + ',' simgesi + + + + symbol '.' + '.' simgesi + + + + symbol '|' + '|' simgesi + + + + symbol # + # simgesi + + + + symbol '_' + '_' simgesi + + + + symbol ';' + ';' simgesi + + + + symbol ';;' + ';;' simgesi + + + + symbol '(' + '(' simgesi + + + + symbol ')' + ')' simgesi + + + + symbol 'splice' + 'splice' simgesi + + + + start of quotation + alıntı başlangıcı + + + + symbol '[' + '[' simgesi + + + + symbol '[|' + '[|' simgesi + + + + symbol '[<' + '[<' simgesi + + + + symbol '{' + '{' simgesi + + + + symbol '{<' + '{<' simgesi + + + + symbol '|]' + '|]' simgesi + + + + symbol '>}' + '>}' simgesi + + + + symbol '>]' + '>]' simgesi + + + + end of quotation + alıntı sonu + + + + symbol ']' + ']' simgesi + + + + symbol '}' + '}' simgesi + + + + keyword 'public' + 'public' anahtar sözcüğü + + + + keyword 'private' + 'private' anahtar sözcüğü + + + + keyword 'internal' + 'internal' anahtar sözcüğü + + + + keyword 'fixed' + 'fixed' anahtar sözcüğü + + + + keyword 'constraint' + 'constraint' anahtar sözcüğü + + + + keyword 'instance' + 'instance' anahtar sözcüğü + + + + keyword 'delegate' + 'delegate' anahtar sözcüğü + + + + keyword 'inherit' + 'inherit' anahtar sözcüğü + + + + keyword 'constructor' + 'constructor' anahtar sözcüğü + + + + keyword 'default' + 'default' anahtar sözcüğü + + + + keyword 'override' + 'override' anahtar sözcüğü + + + + keyword 'abstract' + 'abstract' anahtar sözcüğü + + + + keyword 'class' + 'class' anahtar sözcüğü + + + + keyword 'member' + 'member' anahtar sözcüğü + + + + keyword 'static' + 'static' anahtar sözcüğü + + + + keyword 'namespace' + 'namespace' anahtar sözcüğü + + + + start of structured construct + yapılandırılmış yapı başlangıcı + + + + incomplete structured construct at or before this point + bu noktada veya daha önce eksik yapılandırılmış yapı + + + + Incomplete structured construct at or before this point + Bu noktada veya daha önce eksik yapılandırılmış yapı + + + + keyword 'then' + 'then' anahtar sözcüğü + + + + keyword 'else' + 'else' anahtar sözcüğü + + + + keyword 'let' or 'use' + 'let' veya 'use' anahtar sözcüğü + + + + binder keyword + binder anahtar sözcüğü + + + + keyword 'do' + 'do' anahtar sözcüğü + + + + keyword 'const' + 'const' anahtar sözcüğü + + + + keyword 'with' + 'with' anahtar sözcüğü + + + + keyword 'function' + 'function' anahtar sözcüğü + + + + keyword 'fun' + 'fun' anahtar sözcüğü + + + + end of input + girişin sonu + + + + internal dummy token + iç sahte belirteç + + + + keyword 'do!' + 'do!' anahtar sözcüğü + + + + yield + yield + + + + yield! + yield! + + + + keyword 'interface' + 'interface' anahtar sözcüğü + + + + keyword 'elif' + 'elif' anahtar sözcüğü + + + + symbol '->' + '->' simgesi + + + + keyword 'sig' + 'sig' anahtar sözcüğü + + + + keyword 'struct' + 'struct' anahtar sözcüğü + + + + keyword 'upcast' + 'upcast' anahtar sözcüğü + + + + keyword 'downcast' + 'downcast' anahtar sözcüğü + + + + keyword 'null' + 'null' anahtar sözcüğü + + + + reserved keyword + ayrılmış anahtar sözcük + + + + keyword 'module' + 'module' anahtar sözcüğü + + + + keyword 'and' + 'and' anahtar sözcüğü + + + + keyword 'as' + 'as' anahtar sözcüğü + + + + keyword 'assert' + 'assert' anahtar sözcüğü + + + + keyword 'asr' + 'asr' anahtar sözcüğü + + + + keyword 'downto' + 'downto' anahtar sözcüğü + + + + keyword 'exception' + 'exception' anahtar sözcüğü + + + + keyword 'false' + 'false' anahtar sözcüğü + + + + keyword 'for' + 'for' anahtar sözcüğü + + + + keyword 'fun' + 'fun' anahtar sözcüğü + + + + keyword 'function' + 'function' anahtar sözcüğü + + + + keyword 'finally' + 'finally' anahtar sözcüğü + + + + keyword 'lazy' + 'lazy' anahtar sözcüğü + + + + keyword 'match' + 'match' anahtar sözcüğü + + + + keyword 'match!' + 'match!' anahtar sözcüğü + + + + keyword 'mutable' + 'mutable' anahtar sözcüğü + + + + keyword 'new' + 'new' anahtar sözcüğü + + + + keyword 'of' + 'of' anahtar sözcüğü + + + + keyword 'open' + 'open' anahtar sözcüğü + + + + keyword 'or' + 'or' anahtar sözcüğü + + + + keyword 'void' + 'void' anahtar sözcüğü + + + + keyword 'extern' + 'extern' anahtar sözcüğü + + + + keyword 'interface' + 'interface' anahtar sözcüğü + + + + keyword 'rec' + 'rec' anahtar sözcüğü + + + + keyword 'to' + 'to' anahtar sözcüğü + + + + keyword 'true' + 'true' anahtar sözcüğü + + + + keyword 'try' + 'try' anahtar sözcüğü + + + + keyword 'type' + 'type' anahtar sözcüğü + + + + keyword 'val' + 'val' anahtar sözcüğü + + + + keyword 'inline' + 'inline' anahtar sözcüğü + + + + keyword 'when' + 'when' anahtar sözcüğü + + + + keyword 'while' + 'while' anahtar sözcüğü + + + + keyword 'with' + 'with' anahtar sözcüğü + + + + keyword 'if' + 'if' anahtar sözcüğü + + + + keyword 'do' + 'do' anahtar sözcüğü + + + + keyword 'global' + 'global' anahtar sözcüğü + + + + keyword 'done' + 'done' anahtar sözcüğü + + + + keyword 'in' + 'in' anahtar sözcüğü + + + + symbol '(' + '(' simgesi + + + + symbol'[' + '[' simgesi + + + + keyword 'begin' + 'begin' anahtar sözcüğü + + + + keyword 'end' + 'end' anahtar sözcüğü + + + + directive + yönerge + + + + inactive code + pasif kod + + + + lex failure + lex hatası + + + + whitespace + whitespace + + + + comment + açıklama + + + + line comment + satır açıklaması + + + + string text + dize metni + + + + compiler generated literal + derleyicinin oluşturduğu sabit değer + + + + byte array literal + bayt dizisi sabit değeri + + + + string literal + dize sabit değeri + + + + end of input + girişin sonu + + + + Unexpected end of input + Beklenmeyen giriş sonu + + + + Unexpected {0} + Beklenmeyen {0} + + + + in interaction + etkileşimde + + + + in directive + yönergede + + + + in field declaration + alan bildiriminde + + + + in discriminated union case declaration + ayırt edici birleşim durumu bildiriminde + + + + in binding + bağlamada + + + + in binding + bağlamada + + + + in member definition + üye tanımında + + + + in definitions + tanımlarda + + + + in member signature + üye imzasında + + + + in value signature + değer imzasında + + + + in type signature + tür imzasında + + + + in lambda expression + lambda ifadesinde + + + + in union case + birleşim durumunda + + + + in extern declaration + dış bildirimde + + + + in object expression + nesne ifadesinde + + + + in if/then/else expression + if/then/else ifadesinde + + + + in open declaration + açık bildirimde + + + + in module or namespace signature + modül veya ad alanı imzasında + + + + in pattern matching + desen eşleştirmede + + + + in begin/end expression + begin/end ifadesinde + + + + in record expression + kayıt ifadesinde + + + + in type definition + tür tanımında + + + + in exception definition + özel durum tanımında + + + + in type name + tür adında + + + + in attribute list + öznitelik listesinde + + + + in quotation literal + alıntı sabit değerinde + + + + in type constraint + tür kısıtlamasında + + + + in implementation file + uygulama dosyasında + + + + in definition + tanımda + + + + in signature file + imza dosyasında + + + + in pattern + desende + + + + in expression + ifadede + + + + in type + türde + + + + in type arguments + tür bağımsız değişkenlerinde + + + + keyword + anahtar sözcük + + + + symbol + simge + + + + (due to indentation-aware syntax) + (girinti tanıyan sözdizimine bağlı olarak) + + + + . Expected {0} or other token. + . {0} veya başka bir belirteç bekleniyordu. + + + + . Expected {0}, {1} or other token. + . {0}, {1} veya başka bir belirteç bekleniyordu. + + + + . Expected {0}, {1}, {2} or other token. + . {0}, {1}, {2} veya başka bir belirteç bekleniyordu. + + + + The type '{0}' cannot be used as the source of a type test or runtime coercion + '{0}' türü bir tür testinin veya çalışma zamanı zorlamasının kaynağı olarak kullanılamaz + + + + The type '{0}' does not have any proper subtypes and cannot be used as the source of a type test or runtime coercion. + '{0}' türünün herhangi bir uygun alt türü yok ve bir tür testinin veya çalışma zamanı zorlamasının kaynağı olarak kullanılamaz. + + + + The type '{0}' does not have any proper subtypes and need not be used as the target of a static coercion + '{0}' türünün herhangi bir uygun alt türü yok ve statik zorlama hedefi olarak kullanılması gerekmiyor + + + + This upcast is unnecessary - the types are identical + Bu üst türe çevirme işlemi gereksiz, bu türler özdeş + + + + This type test or downcast will always hold + Bu tür testi veya alt türe çevirme işlemi her zaman tutar + + + + The member '{0}' does not have the correct type to override any given virtual method + '{0}' üyesi, verilen herhangi bir metodu geçersiz kılmak için doğru türe sahip değil + + + + The member '{0}' does not have the correct type to override the corresponding abstract method. + '{0}' üyesi, ilgili soyut metodu geçersiz kılmak için doğru türe sahip değil. + + + + The required signature is '{0}'. + Gereken imza: '{0}'. + + + + The member '{0}' is specialized with 'unit' but 'unit' can't be used as return type of an abstract method parameterized on return type. + '{0}' üyesi 'unit' ile özelleştirilmiş ancak 'unit', dönüş türünde parametreleştirilen bir özet metodunun dönüş türü olarak kullanılamaz. + + + + This constructor is applied to {0} argument(s) but expects {1} + Bu oluşturucu {0} bağımsız değişkene uygulandı ancak {1} bekliyor + + + + The two sides of this 'or' pattern bind different sets of variables + Bu 'or' deseninin her iki tarafı farklı değişken kümelerini bağlıyor + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \n{3}. + {0}' modülü\n {1} \niçeriyor ancak imzasında\n {2} \n{3} belirtiliyor. + + + + Module '{0}' requires a {1} '{2}' + {0}' modülü için {1} '{2}' gerekiyor + + + + The use of native pointers may result in unverifiable .NET IL code + Yerel işaretçilerin kullanılması doğrulanamayan .NET IL koduyla sonuçlanabilir + + + + {0} + {0} + + + + Thread static and context static 'let' bindings are deprecated. Instead use a declaration of the form 'static val mutable <ident> : <type>' in a class. Add the 'DefaultValue' attribute to this declaration to indicate that the value is initialized to the default value on each new thread. + Statik iş parçacıklı ve statik bağlamlı 'let' bağlamaları kullanım dışıdır. Onun yerine bir sınıfta 'static val mutable <ident> : <tür>' biçimindeki bildirimi kullanın. Değerin her yeni iş parçacığında varsayılan değerle başlatıldığını belirtmek için bu bildirime 'DefaultValue' özniteliğini ekleyin. + + + + This expression is a function value, i.e. is missing arguments. Its type is {0}. + Bu ifade bir işlev değeri, yani bağımsız değişkenleri eksik. Türü: {0}. + + + + The result of this expression has type '{0}' and is implicitly ignored. Consider using 'ignore' to discard this value explicitly, e.g. 'expr |> ignore', or 'let' to bind the result to a name, e.g. 'let result = expr'. + Bu ifadenin sonucu '{0}' türüne sahip ve örtük olarak yoksayılır. Bu değeri açıkça atmak için 'ignore' kullanmayı (örn. 'deyim |> ignore') veya sonucu bir ada bağlamak için 'let' kullanmayı (örn. 'let sonuc = deyim') deneyin. + + + + The result of this equality expression has type '{0}' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. + Bu eşitlik ifadesinin sonucu '{0}' türüne sahip ve örtük olarak atılır. Sonucu bir ada bağlamak için 'let' kullanmayı düşünün (örneğin, 'let sonuc = deyim'). + + + + The result of this equality expression has type '{0}' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to set a value to a property, then use the '<-' operator e.g. '{1}.{2} <- expression'. + Bu eşitlik ifadesinin sonucu '{0}' türüne sahip ve örtük olarak atılır. Sonucu bir ada bağlamak için 'let' kullanmayı düşünün (örneğin, 'let sonuc = deyim'). Bir özelliğin değerini ayarlamak istiyorsanız, '<-' işlecini kullanın (örneğin, '{1}.{2} <- deyim'). + + + + The result of this equality expression has type '{0}' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to mutate a value, then mark the value 'mutable' and use the '<-' operator e.g. '{1} <- expression'. + Bu eşitlik ifadesinin sonucu '{0}' türüne sahip ve örtük olarak atılır. Sonucu bir ada bağlamak için 'let' kullanmayı düşünün (örneğin, 'let sonuc = deyim'). Bir değeri değiştirmek istiyorsanız, değeri 'mutable' olarak işaretleyin ve '<-' işlecini kullanın; örneğin, '{1} <- deyim'. + + + + The result of this equality expression has type '{0}' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to mutate a value, then use the '<-' operator e.g. '{1} <- expression'. + Bu eşitlik ifadesinin sonucu '{0}' türüne sahip ve örtük olarak atılır. Sonucu bir ada bağlamak için 'let' kullanmayı düşünün (örneğin 'let sonuc = deyim'). Bir değeri değiştirmek istiyorsanız, '<-' işlecini kullanın; örneğin, '{1} <- deyim'. + + + + This recursive use will be checked for initialization-soundness at runtime. This warning is usually harmless, and may be suppressed by using '#nowarn "21"' or '--nowarn:21'. + Bu özyinelemeli kullanım çalışma zamanında başlatma sağlamlığı açısından denetlenecek. Bu uyarı genellikle zararsızdır ve '#nowarn "21"' veya '--nowarn:21' kullanılarak gizlenebilir. + + + + The value '{0}' will be evaluated as part of its own definition + '{0}' değeri kendi tanımının parçası olarak hesaplanacak + + + + This value will be eventually evaluated as part of its own definition. You may need to make the value lazy or a function. Value '{0}'{1}. + Bu değer sonuç olarak kendi tanımının parçası olarak hesaplanacak. Bu değeri geç değer veya işlev yapmanız gerekebilir. Değer: '{0}'{1}. + + + + will evaluate '{0}' + '{0}' sonucunu verecek + + + + Bindings may be executed out-of-order because of this forward reference. + Bu ileriye doğru başvuru nedeniyle bağlamalar sırasız yürütülebilir. + + + + This and other recursive references to the object(s) being defined will be checked for initialization-soundness at runtime through the use of a delayed reference. This is because you are defining one or more recursive objects, rather than recursive functions. This warning may be suppressed by using '#nowarn "40"' or '--nowarn:40'. + Tanımlanmakta olan nesnelere yönelik bu ve diğer özyinelemeli başvurular, gecikmeli başvuru kullanımı aracılığıyla başlatma sağlamlığı açısından çalışma zamanında denetlenecek. Bunun nedeni, özyinelemeli işlev yerine bir veya daha fazla özyinelemeli nesne tanımlamanızdır. Bu uyarı, '#nowarn "40"' veya '--nowarn:40' kullanılarak gizlenebilir. + + + + Recursive references to the object being defined will be checked for initialization soundness at runtime through the use of a delayed reference. Consider placing self-references in members or within a trailing expression of the form '<ctor-expr> then <expr>'. + Tanımlanmakta olan nesneye yapılan özyinelemeli başvurular, geç başvuru kullanımı aracılığıyla çalışma zamanında başlatma sağlamlığı açısından denetlenecek. Kendine yapılan başvuruları üyelere veya '<ctor-expr> then <expr>' biçimindeki izleyen ifadenin içine yerleştirmeyi düşünün. + + + + Recursive references to the object being defined will be checked for initialization soundness at runtime through the use of a delayed reference. Consider placing self-references within 'do' statements after the last 'let' binding in the construction sequence. + Tanımlanmakta olan nesneye yapılan özyinelemeli başvurular, geç başvuru kullanımı aracılığıyla çalışma zamanında başlatma sağlamlığı açısından denetlenecek. Kendine yapılan başvuruları yapı dizisindeki sonuncu 'let' bağlamasından sonra 'do' deyimlerinin içine yerleştirmeyi düşünün. + + + + The containing type can use 'null' as a representation value for its nullary union case. Invoking an abstract or virtual member or an interface implementation on a null value will lead to an exception. If necessary add a dummy data value to the nullary constructor to avoid 'null' being used as a representation for this type. + Kapsayıcı tür, kendisinin işlenensiz birleşim durumunun temsili değeri olarak 'null' kullanabilir. Null bir değerde soyut veya sanal bir üyeyi ya da bir arabirim uygulamasını çağırmak özel duruma neden olur. Gerekirse bu türün temsili olarak 'null' kullanılmasına engel olmak için işlenensiz oluşturucuya sahte veri değeri ekleyin. + + + + The containing type can use 'null' as a representation value for its nullary union case. This member will be compiled as a static member. + Kapsayıcı tür, kendisinin işlenensiz birleşim durumunun temsili değeri olarak 'null' kullanabilir. Bu üye, statik üye olarak derlenecek. + + + + The member '{0}' doesn't correspond to a unique abstract slot based on name and argument count alone + '{0}' üyesi yalnızca ada ve bağımsız değişken sayısına dayalı olarak benzersiz bir soyut yuvaya karşılık gelmiyor + + + + . Multiple implemented interfaces have a member with this name and argument count + . Birden fazla sayıda uygulanmış arabirimde bu ada ve bağımsız değişken sayısına sahip üye var + + + + . Consider implementing interfaces '{0}' and '{1}' explicitly. + . '{0}' ve '{1}' arabirimlerini açık olarak uygulamayı düşünün. + + + + . Additional type annotations may be required to indicate the relevant override. This warning can be disabled using '#nowarn "70"' or '--nowarn:70'. + . İlgili geçersiz kılmayı belirtmek için yeni tür ek açıklamaları gerekebilir. Bu uyarı, '#nowarn "70"' veya '--nowarn:70' kullanılarak devre dışı bırakılabilir. + + + + parse error + ayrıştırma hatası + + + + parse error: unexpected end of file + ayrıştırma hatası: beklenmeyen dosya sonu + + + + {0} + {0} + + + + internal error: {0} + iç hata: {0} + + + + {0} + {0} + + + + Incomplete pattern matches on this expression. + Bu ifadede eksik desen eşleşmeleri var. + + + + For example, the value '{0}' may indicate a case not covered by the pattern(s). + Örneğin, '{0}' değeri desenlerin kapsamadığı bir duruma işaret edebilir. + + + + For example, the value '{0}' may indicate a case not covered by the pattern(s). However, a pattern rule with a 'when' clause might successfully match this value. + Örneğin, '{0}' değeri desenlerin kapsamadığı bir duruma işaret edebilir. Ancak, 'when' yan tümcesinin olduğu bir desen kuralı bu değeri başarıyla eşleştirebilir. + + + + Unmatched elements will be ignored. + Eşleşmeyen öğeler yok sayılacak. + + + + Enums may take values outside known cases. + Numaralandırmalar, bilinen durumlar dışından değerler alabilir. + + + + This rule will never be matched + Bu kural hiçbir zaman eşleştirilmeyecek + + + + This value is not mutable. Consider using the mutable keyword, e.g. 'let mutable {0} = expression'. + Bu değer değiştirilebilir değil. mutable anahtar sözcüğünü (örn. 'let mutable {0} = expression') kullanmayı düşünün. + + + + This value is not local + Bu değer yerel değil + + + + This construct is deprecated + Bu yapı kullanım dışı + + + + . {0} + . {0} + + + + {0}. This warning can be disabled using '--nowarn:57' or '#nowarn "57"'. + {0}. Bu uyarı, '--nowarn:57' veya '#nowarn "57"' kullanılarak devre dışı bırakılabilir. + + + + Uses of this construct may result in the generation of unverifiable .NET IL code. This warning can be disabled using '--nowarn:9' or '#nowarn "9"'. + Bu yapının kullanılması doğrulanamayan .NET IL kodunun oluşturulmasıyla sonuçlanabilir. Bu uyarı, '--nowarn:9' veya '#nowarn "9"' kullanılarak devre dışı bırakılabilir. + + + + This construct is deprecated: {0} + Bu yapı kullanım dışı: {0} + + + + This construct is deprecated: it is only for use in the F# library + Bu yapı kullanım dışıdır: yalnızca F# kitaplığında kullanım içindir + + + + The following fields require values: {0} + Aşağıdaki alanlar için değerler gerekiyor: {0} + + + + Value restriction. The value '{0}' has generic type\n {1} \nEither make the arguments to '{2}' explicit or, if you do not intend for it to be generic, add a type annotation. + Değer kısıtlaması. '{0}' değerinin genel türü:\n {1} \nYa '{2}' bağımsız değişkenlerini açık yapın ya da genel olmasını istemiyorsanız bir tür ek açıklaması ekleyin. + + + + Value restriction. The value '{0}' has generic type\n {1} \nEither make '{2}' into a function with explicit arguments or, if you do not intend for it to be generic, add a type annotation. + Değer kısıtlaması. '{0}' değerinin genel türü:\n {1} \nYa açık bağımsız değişkenlerle '{2}' için işlev dönüşümü yapın ya da genel olmasını istemiyorsanız bir tür ek açıklaması ekleyin. + + + + Value restriction. This member has been inferred to have generic type\n {0} \nConstructors and property getters/setters cannot be more generic than the enclosing type. Add a type annotation to indicate the exact types involved. + Değer kısıtlaması. Bu üyenin şu genel türü olduğu çıkarıldı\n {0} \nOluşturucular ve özellik alıcıları/ayarlayıcıları kapsayan türden daha genel olamaz. Söz konusu türleri tam olarak belirtmek için bir tür ek açıklaması ekleyin. + + + + Value restriction. The value '{0}' has been inferred to have generic type\n {1} \nEither make the arguments to '{2}' explicit or, if you do not intend for it to be generic, add a type annotation. + Değer kısıtlaması. '{0}' değerinin şu genel türü olduğu çıkarıldı:\n {1} \nYa '{2}' bağımsız değişkenlerini açık yapın ya da genel olmasını istemiyorsanız bir tür ek açıklaması ekleyin. + + + + Value restriction. The value '{0}' has been inferred to have generic type\n {1} \nEither define '{2}' as a simple data term, make it a function with explicit arguments or, if you do not intend for it to be generic, add a type annotation. + Değer kısıtlaması. '{0}' değerinin şu genel türü olduğu çıkarıldı:\n {1} \nYa '{2}' tanımını basit veri terimi olarak yaparak onu açık bağımsız değişkenlerle bir işlev yapın ya da genel olmasını istemiyorsanız bir tür ek açıklaması ekleyin. + + + + syntax error + sözdizimi hatası + + + + {0} + {0} + + + + {0} + {0} + + + + Override implementations in augmentations are now deprecated. Override implementations should be given as part of the initial declaration of a type. + Genişletmelerdeki geçersiz kılma uygulamaları artık kullanım dışı bırakıldı. Geçersiz kılma uygulamaları bir türün ilk bildiriminin parçası olarak verilmelidir. + + + + Override implementations should be given as part of the initial declaration of a type. + Geçersiz kılma uygulamaları bir türün ilk bildiriminin parçası olarak verilmelidir. + + + + Interface implementations in augmentations are now deprecated. Interface implementations should be given on the initial declaration of a type. + Genişletmelerdeki arabirim uygulamaları artık kullanım dışı bırakıldı. Arabirim uygulamaları bir türün ilk bildiriminde verilmelidir. + + + + Interface implementations should be given on the initial declaration of a type. + Arabirim uygulamaları bir türün ilk bildiriminde verilmelidir. + + + + A required assembly reference is missing. You must add a reference to assembly '{0}'. + Gerekli bir bütünleştirilmiş kod başvurusu eksik. '{0}' bütünleştirilmiş koduna başvuru eklemeniz gerekiyor. + + + + The type referenced through '{0}' is defined in an assembly that is not referenced. You must add a reference to assembly '{1}'. + {0}' aracılığıyla başvurulan tür başvurulmayan bir bütünleştirilmiş kodda tanımlanıyor. '{1}' bütünleştirilmiş koduna başvuru eklemeniz gerekiyor. + + + + #I directives may only occur in F# script files (extensions .fsx or .fsscript). Either move this code to a script file, add a '-I' compiler option for this reference or delimit the directive with delimit it with '#if INTERACTIVE'/'#endif'. + #I yönergeleri yalnızca F# betik dosyalarında (.fsx veya .fsscript uzantılı) görülebilir. Ya bu kodu bir betik dosyasına taşıyıp bu başvuru için bir '-I' derleyici seçeneği ekleyin ya da yönergeyi '#if INTERACTIVE'/'#endif' ile sınırlandırın. + + + + #r directives may only occur in F# script files (extensions .fsx or .fsscript). Either move this code to a script file or replace this reference with the '-r' compiler option. If this directive is being executed as user input, you may delimit it with '#if INTERACTIVE'/'#endif'. + #r yönergeleri yalnızca F# betik dosyalarında (.fsx veya .fsscript uzantılı) görülebilir. Bu kodu bir betik dosyasına taşıyın veya bu başvuruyu '-r' derleyici seçeneği ile değiştirin. Yönerge kullanıcı girişi olarak yürütülüyorsa, yönergeyi '#if INTERACTIVE'/'#endif' ile sınırlandırabilirsiniz. + + + + This directive may only be used in F# script files (extensions .fsx or .fsscript). Either remove the directive, move this code to a script file or delimit the directive with '#if INTERACTIVE'/'#endif'. + Bu yönerge yalnızca F# betik dosyalarında (.fsx veya .fsscript uzantılı) kullanılabilir. Ya yönergeyi kaldırıp bu kodu betik dosyasına taşıyın ya da yönergeyi '#if INTERACTIVE'/'#endif' ile sınırlandırın. + + + + Unable to find the file '{0}' in any of\n {1} + {0}' dosyası şunların hiçbirinde bulunamıyor:\n {1} + + + + Assembly reference '{0}' was not found or is invalid + Bütünleştirilmiş kod başvurusu '{0}' bulunamadı veya geçersiz + + + + One or more warnings in loaded file.\n + Yüklenen dosyada bir veya daha fazla uyarı var.\n + + + + One or more errors in loaded file.\n + Yüklenen dosyada bir veya daha fazla hata var.\n + + + + Loaded files may only be F# source files (extension .fs). This F# script file (.fsx or .fsscript) will be treated as an F# source file + Yüklenen dosyalar yalnızca F# kaynak dosyaları (.fs uzantılı) olabilir. Bu F# betik dosyasına (.fsx veya .fsscript) F# kaynak dosyası gibi işlem yapılacak + + + + Invalid assembly name '{0}' from InternalsVisibleTo attribute in {1} + {1} içindeki InternalsVisibleTo özniteliğinden geçersiz bütünleştirilmiş kod adı '{0}' + + + + Invalid assembly name '{0}' from InternalsVisibleTo attribute (assembly filename not available) + InternalsVisibleTo özniteliğinden geçersiz bütünleştirilmiş kod adı '{0}' (bütünleştirilmiş kod dosya adı kullanılamıyor) + + + + Could not load file '{0}' because it does not exist or is inaccessible + '{0}' dosyası olmadığı veya ona erişilemediği için yüklenemedi + + + + {0} (Code={1}) + {0} (Kod={1}) + + + + internal error: {0} + iç hata: {0} + + + + + \ No newline at end of file diff --git a/src/fsharp/xlf/FSStrings.zh-Hans.xlf b/src/fsharp/xlf/FSStrings.zh-Hans.xlf new file mode 100644 index 00000000000..12be2851596 --- /dev/null +++ b/src/fsharp/xlf/FSStrings.zh-Hans.xlf @@ -0,0 +1,1622 @@ + + + + + + . See also {0}. + 。请参见 {0}。 + + + + The tuples have differing lengths of {0} and {1} + 元组具有不同长度的 {0} 和 {1} + + + + The types '{0}' and '{1}' cannot be unified. + 类型“{0}”和“{1}”无法联合。 + + + + A type parameter is missing a constraint '{0}' + 类型参数缺少约束“{0}” + + + + The unit of measure '{0}' does not match the unit of measure '{1}' + 度量单位“{0}”与度量单位“{1}”不匹配 + + + + The type '{0}' does not match the type '{1}' + 类型“{0}”与类型“{1}”不匹配 + + + + The type '{0}' is not compatible with the type '{1}'{2} + 类型“{0}”与类型“{1}”{2} 不兼容 + + + + This expression was expected to have type\n '{1}' \nbut here has type\n '{0}' {2} + 此表达式应具有类型\n “{1}” \n而此处具有类型\n “{0}” {2} + + + + Type mismatch. Expecting a\n '{0}' \nbut given a\n '{1}' {2}\n + 类型不匹配。应为\n “{0}” \n而给定的是\n “{1}” {2}\n + + + + Type constraint mismatch when applying the default type '{0}' for a type inference variable. + 在为类型推理变量应用默认类型“{0}”时,类型约束不匹配。 + + + + Consider adding further type constraints + 请考虑添加更多类型约束 + + + + Type constraint mismatch. The type \n '{0}' \nis not compatible with type\n '{1}' {2}\n + 类型约束不匹配。类型 \n “{0}” \n与类型\n “{1}” {2} 不兼容\n + + + + Uppercase variable identifiers should not generally be used in patterns, and may indicate a misspelt pattern name. + 通常不应在模式中使用大写的变量标识符,这可能标明某个模式名称存在拼写错误。 + + + + Discriminated union cases and exception labels must be uppercase identifiers + 可区分的联合用例和异常标签必须是大写的标识符 + + + + Possible overload: '{0}'. {1}. + 可能的重载:“{0}”。{1}。 + + + + \n\nPossible best overload: '{0}'. + \n\n可能的最佳重载:“{0}”。 + + + + This function takes too many arguments, or is used in a context where a function is not expected + 此函数采用的参数过多,或者用于不需要函数的上下文中 + + + + Member constraints with the name '{0}' are given special status by the F# compiler as certain .NET types are implicitly augmented with this member. This may result in runtime failures if you attempt to invoke the member constraint from your own code. + F# 编译器为名称为“{0}”的成员约束给定了特殊状态,因为使用此成员隐式扩大了某些 .NET 类型。如果您尝试从自己的代码中调用该成员约束,则可能会导致运行时失败。 + + + + A definition to be compiled as a .NET event does not have the expected form. Only property members can be compiled as .NET events. + 要编译为 .NET 事件的定义不具有预期格式。只可以将属性成员编译为 .NET 事件。 + + + + Implicit object constructors for structs must take at least one argument + 结构的隐式对象构造函数必须采用至少一个参数 + + + + The type implements the interface '{0}' but this is not revealed by the signature. You should list the interface in the signature, as the interface will be discoverable via dynamic type casts and/or reflection. + 类型实现了接口“{0}”,而签名未显示此接口。您应在签名中列出此接口,因为通过动态类型强制转换和/或反射将可以发现此接口。 + + + + The type '{0}' expects {1} type argument(s) but is given {2} + 类型“{0}”需要 {1} 个类型参数,而给定了 {2} 个类型参数 + + + + Lookup on object of indeterminate type based on information prior to this program point. A type annotation may be needed prior to this program point to constrain the type of the object. This may allow the lookup to be resolved. + 查找基于此程序点之前的信息的不确定类型的对象。在此程序点之前可能需要类型批注来约束对象的类型。这可能允许解析查找。 + + + + Duplicate definition of {0} '{1}' + {0}“{1}”的定义重复 + + + + The {0} '{1}' can not be defined because the name '{2}' clashes with the {3} '{4}' in this type or module + 无法定义 {0}“{1}”,因为名称“{2}”与此类型或模块中的 {3}“{4}”冲突 + + + + Two members called '{0}' have the same signature + 名为“{0}”的两个成员具有相同的签名 + + + + Duplicate definition of {0} '{1}' + {0}“{1}”的定义重复 + + + + A construct with this name was found in FSharp.PowerPack.dll, which contains some modules and types that were implicitly referenced in some previous versions of F#. You may need to add an explicit reference to this DLL in order to compile this code. + 在 FSharp.PowerPack.dll 中找到了同名构造,其中包含某些早期版本的 F# 中已隐式引用的一些模块和类型。您可能需要添加对此 DLL 的显式引用以编译此代码。 + + + + This field is not mutable + 此字段是不可变的 + + + + The fields '{0}' and '{1}' are from different types + 字段“{0}”和“{1}”来自不同的类型 + + + + '{0}' is bound twice in this pattern + “{0}”在此模式中绑定了两次 + + + + A use of the function '{0}' does not match a type inferred elsewhere. The inferred type of the function is\n {1}. \nThe type of the function required at this point of use is\n {2} {3}\nThis error may be due to limitations associated with generic recursion within a 'let rec' collection or within a group of classes. Consider giving a full type signature for the targets of recursive calls including type annotations for both argument and return types. + 对函数“{0}”的使用与在其他位置推理出的类型不匹配。推理出的函数的类型为\n {1}。 \n此时需要使用的函数的类型为\n {2} {3}\n此错误可能是由于与一个“let rec”集合或一组类中的泛型递归相关联的限制所导致的。请考虑为递归调用的目标给定完整的类型签名,包括参数和返回类型的类型批注。 + + + + Invalid runtime coercion or type test from type {0} to {1}\n{2} + 从类型 {0} 到 {1} 的运行时强制或类型测试无效\n{2} + + + + This runtime coercion or type test from type\n {0} \n to \n {1} \ninvolves an indeterminate type based on information prior to this program point. Runtime type tests are not allowed on some types. Further type annotations are needed. + 这个从类型\n {0} \n 到 \n {1} 的运行时强制或\n类型测试涉及一个基于此程序点之前的信息的不确定类型。不允许对某些类型执行运行时类型测试。需要更多的类型批注。 + + + + The static coercion from type\n {0} \nto \n {1} \n involves an indeterminate type based on information prior to this program point. Static coercions are not allowed on some types. Further type annotations are needed. + 这个从类型\n {0} \n到 \n {1} \n的静态强制涉及一个基于此程序点之前的信息的不确定类型。不允许对某些类型进行静态强制。需要更多的类型批注。 + + + + A coercion from the value type \n {0} \nto the type \n {1} \nwill involve boxing. Consider using 'box' instead + 从值类型 \n {0} \n到类型 \n {1} \n的强制将涉及装箱。请考虑改用“box” + + + + This type is 'abstract' since some abstract members have not been given an implementation. If this is intentional then add the '[<AbstractClass>]' attribute to your type. + 由于未为一些抽象成员给定实现,因此此类型为“abstract”。如果是有意为之,请为类型添加“[<AbstractClass>]”特性。 + + + + This construct causes code to be less generic than indicated by its type annotations. The type variable implied by the use of a '#', '_' or other type annotation at or near '{0}' has been constrained to be type '{1}'. + 此构造导致代码并不像其类型批注指明的那样通用。通过使用“{0}”处或其附近的“#”、“_”或其他类型批注暗示的类型变量已被约束为类型“{1}”。 + + + + This construct causes code to be less generic than indicated by the type annotations. The unit-of-measure variable '{0} has been constrained to be measure '{1}'. + 此构造导致代码并不像类型批注指明的那样通用。度量单位变量“{0}”已被约束为度量“{1}”。 + + + + This construct causes code to be less generic than indicated by the type annotations. The type variable '{0} has been constrained to be type '{1}'. + 此构造导致代码并不像类型批注指明的那样通用。类型变量“{0}”已被约束为类型“{1}”。 + + + + identifier + 标识符 + + + + integer literal + 整数文本 + + + + floating point literal + 浮点文本 + + + + decimal literal + 十进制文本 + + + + character literal + 字符文本 + + + + keyword 'base' + 关键字“base” + + + + symbol '(*)' + 符号“(*)” + + + + symbol '$' + 符号“$” + + + + infix operator + 中缀运算符 + + + + infix operator + 中缀运算符 + + + + symbol ':>' + 符号“:>” + + + + symbol '::' + 符号“::” + + + + symbol '{0} + 符号“{0}” + + + + infix operator + 中缀运算符 + + + + infix operator + 中缀运算符 + + + + infix operator + 中缀运算符 + + + + prefix operator + 前缀运算符 + + + + symbol ':?>' + 符号“:?>” + + + + infix operator + 中缀运算符 + + + + infix operator + 中缀运算符 + + + + symbol '&' + 符号 '&' + + + + symbol '&&' + 符号“&&” + + + + symbol '||' + 符号“||” + + + + symbol '<' + 符号“<” + + + + symbol '>' + 符号“>” + + + + symbol '?' + 符号“?” + + + + symbol '??' + 符号“??” + + + + symbol ':?' + 符号“:?” + + + + integer.. + 整数.. + + + + symbol '..' + 符号“..” + + + + quote symbol + 引用符号 + + + + symbol '*' + 符号“*” + + + + type application + 类型应用程序 + + + + symbol ':' + 符号“:” + + + + symbol ':=' + 符号“:=” + + + + symbol '<-' + 符号“<-” + + + + symbol '=' + 符号“=” + + + + symbol '>|]' + 符号“>|]” + + + + symbol '-' + 符号“-” + + + + prefix operator + 前缀运算符 + + + + operator name + 运算符名称 + + + + symbol ',' + 符号“,” + + + + symbol '.' + 符号“.” + + + + symbol '|' + 符号“|” + + + + symbol # + 意外的 + + + + symbol '_' + 符号“_” + + + + symbol ';' + 符号“;” + + + + symbol ';;' + 符号“;;” + + + + symbol '(' + 符号“(” + + + + symbol ')' + 符号“)” + + + + symbol 'splice' + 符号“splice” + + + + start of quotation + 引用开始 + + + + symbol '[' + 符号“[” + + + + symbol '[|' + 符号“[|” + + + + symbol '[<' + 符号“[<” + + + + symbol '{' + 符号“{” + + + + symbol '{<' + 符号“{<” + + + + symbol '|]' + 符号“|]” + + + + symbol '>}' + 符号“>}” + + + + symbol '>]' + 符号“>]” + + + + end of quotation + 引用结束 + + + + symbol ']' + 符号“]” + + + + symbol '}' + 符号“}” + + + + keyword 'public' + 关键字“public” + + + + keyword 'private' + 关键字“private” + + + + keyword 'internal' + 关键字“internal” + + + + keyword 'fixed' + 关键字 "fixed" + + + + keyword 'constraint' + 关键字“constraint” + + + + keyword 'instance' + 关键字“instance” + + + + keyword 'delegate' + 关键字“delegate” + + + + keyword 'inherit' + 关键字“inherit” + + + + keyword 'constructor' + 关键字“constructor” + + + + keyword 'default' + 关键字“default” + + + + keyword 'override' + 关键字“override” + + + + keyword 'abstract' + 关键字“abstract” + + + + keyword 'class' + 关键字“class” + + + + keyword 'member' + 关键字“member” + + + + keyword 'static' + 关键字“static” + + + + keyword 'namespace' + 关键字“namespace” + + + + start of structured construct + 结构化构造开始 + + + + incomplete structured construct at or before this point + 此点或之前的结构化构造不完整 + + + + Incomplete structured construct at or before this point + 此点或之前的结构化构造不完整 + + + + keyword 'then' + 关键字“then” + + + + keyword 'else' + 关键字“else” + + + + keyword 'let' or 'use' + 关键字“let”或“use” + + + + binder keyword + 联编程序关键字 + + + + keyword 'do' + 关键字“do” + + + + keyword 'const' + 关键字“const” + + + + keyword 'with' + 关键字“with” + + + + keyword 'function' + 关键字“function” + + + + keyword 'fun' + 关键字“fun” + + + + end of input + 输入结束 + + + + internal dummy token + 内部虚拟标记 + + + + keyword 'do!' + 关键字“do! + + + + yield + yield + + + + yield! + yield! + + + + keyword 'interface' + 关键字“interface” + + + + keyword 'elif' + 关键字“elif” + + + + symbol '->' + 符号“->” + + + + keyword 'sig' + 关键字“sig” + + + + keyword 'struct' + 关键字“struct” + + + + keyword 'upcast' + 关键字“upcast” + + + + keyword 'downcast' + 关键字“downcast” + + + + keyword 'null' + 关键字“null” + + + + reserved keyword + 保留的关键字 + + + + keyword 'module' + 关键字“module” + + + + keyword 'and' + 关键字“and” + + + + keyword 'as' + 关键字“as” + + + + keyword 'assert' + 关键字“assert” + + + + keyword 'asr' + 关键字“asr” + + + + keyword 'downto' + 关键字“downto” + + + + keyword 'exception' + 关键字“exception” + + + + keyword 'false' + 关键字“false” + + + + keyword 'for' + 关键字“for” + + + + keyword 'fun' + 关键字“fun” + + + + keyword 'function' + 关键字“function” + + + + keyword 'finally' + 关键字“finally” + + + + keyword 'lazy' + 关键字“lazy” + + + + keyword 'match' + 关键字“match” + + + + keyword 'match!' + 关键字“match!” + + + + keyword 'mutable' + 关键字“mutable” + + + + keyword 'new' + 关键字“new” + + + + keyword 'of' + 关键字“of” + + + + keyword 'open' + 关键字“open” + + + + keyword 'or' + 关键字“or” + + + + keyword 'void' + 关键字“void” + + + + keyword 'extern' + 关键字“extern” + + + + keyword 'interface' + 关键字“interface” + + + + keyword 'rec' + 关键字“rec” + + + + keyword 'to' + 关键字“to” + + + + keyword 'true' + 关键字“true” + + + + keyword 'try' + 关键字“try” + + + + keyword 'type' + 关键字“type” + + + + keyword 'val' + 关键字“val” + + + + keyword 'inline' + 关键字“inline” + + + + keyword 'when' + 关键字“when” + + + + keyword 'while' + 关键字“while” + + + + keyword 'with' + 关键字“with” + + + + keyword 'if' + 关键字“if” + + + + keyword 'do' + 关键字“do” + + + + keyword 'global' + 关键字“global” + + + + keyword 'done' + 关键字“done” + + + + keyword 'in' + 关键字“in” + + + + symbol '(' + 符号“(” + + + + symbol'[' + 符号“[” + + + + keyword 'begin' + 关键字“begin” + + + + keyword 'end' + 关键字“end” + + + + directive + 指令 + + + + inactive code + 非活动代码 + + + + lex failure + lex 失败 + + + + whitespace + 空白 + + + + comment + 注释 + + + + line comment + 行注释 + + + + string text + 字符串文本 + + + + compiler generated literal + 编译器生成的文本 + + + + byte array literal + 字节数组文本 + + + + string literal + 字符串 + + + + end of input + 输入结束 + + + + Unexpected end of input + 意外的输入结束 + + + + Unexpected {0} + 意外的 {0} + + + + in interaction + 在交互中 + + + + in directive + 在指令中 + + + + in field declaration + 在字段声明中 + + + + in discriminated union case declaration + 在可区分的联合用例声明中 + + + + in binding + 在绑定中 + + + + in binding + 在绑定中 + + + + in member definition + 在成员定义中 + + + + in definitions + 在定义中 + + + + in member signature + 在成员签名中 + + + + in value signature + 在值签名中 + + + + in type signature + 在类型签名中 + + + + in lambda expression + 在 lambda 表达式中 + + + + in union case + 在联合用例中 + + + + in extern declaration + 在外部声明中 + + + + in object expression + 在对象表达式中 + + + + in if/then/else expression + 在 if/then/else 表达式中 + + + + in open declaration + 在开放的声明中 + + + + in module or namespace signature + 在模块或命名空间签名中 + + + + in pattern matching + 在模式匹配中 + + + + in begin/end expression + 在开始/结束表达式中 + + + + in record expression + 在记录表达式中 + + + + in type definition + 在类型定义中 + + + + in exception definition + 在异常定义中 + + + + in type name + 在类型名称中 + + + + in attribute list + 在特性列表中 + + + + in quotation literal + 在引用文本中 + + + + in type constraint + 在类型约束中 + + + + in implementation file + 在实现文件中 + + + + in definition + 在定义中 + + + + in signature file + 在签名文件中 + + + + in pattern + 在模式中 + + + + in expression + 在表达式中 + + + + in type + 在类型中 + + + + in type arguments + 在类型参数中 + + + + keyword + 关键字 + + + + symbol + 符号 + + + + (due to indentation-aware syntax) + (因为可识别缩进的语法) + + + + . Expected {0} or other token. + 。应为 {0} 或其他标记。 + + + + . Expected {0}, {1} or other token. + 。应为 {0}、{1} 或其他标记。 + + + + . Expected {0}, {1}, {2} or other token. + 。应为 {0}、{1}、{2} 或其他标记。 + + + + The type '{0}' cannot be used as the source of a type test or runtime coercion + 类型“{0}”不能用作类型测试或运行时强制的源 + + + + The type '{0}' does not have any proper subtypes and cannot be used as the source of a type test or runtime coercion. + 类型“{0}”不具有任何适当的子类型,且不能用作类型测试或运行时强制的源。 + + + + The type '{0}' does not have any proper subtypes and need not be used as the target of a static coercion + 类型“{0}”不具有任何适当的子类型,且无需用作静态强制的目标 + + + + This upcast is unnecessary - the types are identical + 不需要此向上转换 - 类型都是相同的 + + + + This type test or downcast will always hold + 将始终保持此类型测试或向下转换 + + + + The member '{0}' does not have the correct type to override any given virtual method + 成员“{0}”不具有用于重写任何给定虚方法的正确类型 + + + + The member '{0}' does not have the correct type to override the corresponding abstract method. + 成员“{0}”不具有用于重写相应的抽象方法的正确类型。 + + + + The required signature is '{0}'. + 所需签名为“{0}”。 + + + + The member '{0}' is specialized with 'unit' but 'unit' can't be used as return type of an abstract method parameterized on return type. + 成员“{0}”已通过 "unit" 特例化,但 "unit" 不能用作针对返回类型参数化的抽象方法的返回类型。 + + + + This constructor is applied to {0} argument(s) but expects {1} + 此构造函数应用于 {0} 个参数,但应为 {1} 个参数 + + + + The two sides of this 'or' pattern bind different sets of variables + 此“or”模式的两侧绑定了不同的变量组 + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \n{3}. + 模块“{0}”包含\n {1} \n而其签名指定\n {2} \n{3}。 + + + + Module '{0}' requires a {1} '{2}' + 模块“{0}”需要 {1}“{2}” + + + + The use of native pointers may result in unverifiable .NET IL code + 使用本机指针可能会导致无法验证的 .NET IL 代码 + + + + {0} + {0} + + + + Thread static and context static 'let' bindings are deprecated. Instead use a declaration of the form 'static val mutable <ident> : <type>' in a class. Add the 'DefaultValue' attribute to this declaration to indicate that the value is initialized to the default value on each new thread. + 线程静态的和上下文静态的“let”绑定已弃用。请改为在类中使用“static val mutable <ident> : <type>”格式的声明。将“DefaultValue”特性添加到此声明以指示在每个新线程上将该值初始化为默认值。 + + + + This expression is a function value, i.e. is missing arguments. Its type is {0}. + 此表达式是一个函数值,也就是说,缺少参数。其类型为 {0}。 + + + + The result of this expression has type '{0}' and is implicitly ignored. Consider using 'ignore' to discard this value explicitly, e.g. 'expr |> ignore', or 'let' to bind the result to a name, e.g. 'let result = expr'. + 此表达式的结果为类型“{0}”且被隐式忽略。请考虑使用 "ignore" 显式放弃该值,例如使用 "expr |> ignore" 或 "let" 将结果绑定到名称,例如 "let result = expr"。 + + + + The result of this equality expression has type '{0}' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. + 此等式表达式的结果为类型“{0}”且被隐式放弃。请考虑使用 "let" 将结果绑定到名称,例如 "let result = expression"。 + + + + The result of this equality expression has type '{0}' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to set a value to a property, then use the '<-' operator e.g. '{1}.{2} <- expression'. + 此等式表达式的结果为类型“{0}”且被隐式放弃。请考虑使用 "let" 将结果绑定到名称,例如 "let result = expression"。如果要为某属性设置值,请使用 "<-" 运算符,例如 "{1}.{2} <- expression"。 + + + + The result of this equality expression has type '{0}' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to mutate a value, then mark the value 'mutable' and use the '<-' operator e.g. '{1} <- expression'. + 此等式表达式的结果为类型“{0}”且被隐式放弃。请考虑使用 "let" 将结果绑定到名称,例如 "let result = expression"。如果要转变某个值,则将此值标记为 "mutable" 并使用 "<-" 运算符,例如 "{1} <- expression"。 + + + + The result of this equality expression has type '{0}' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to mutate a value, then use the '<-' operator e.g. '{1} <- expression'. + 此等式表达式的结果为类型“{0}”且被隐式放弃。请考虑使用 "let" 将结果绑定到名称,例如 "let result = expression"。如果要转变某个值,请使用 "<-" 运算符,例如 "{1} <- expression"。 + + + + This recursive use will be checked for initialization-soundness at runtime. This warning is usually harmless, and may be suppressed by using '#nowarn "21"' or '--nowarn:21'. + 将检查此递归使用能否在运行时完整地进行初始化。此警告通常是无害的,可以使用“#nowarn "21"”或“--nowarn:21”来取消显示此警告。 + + + + The value '{0}' will be evaluated as part of its own definition + 值“{0}”将作为其自身定义的一部分进行计算 + + + + This value will be eventually evaluated as part of its own definition. You may need to make the value lazy or a function. Value '{0}'{1}. + 此值最终将作为其自身定义的一部分进行计算。您可能需要采用延迟值或函数。值“{0}”{1}。 + + + + will evaluate '{0}' + 将计算“{0}” + + + + Bindings may be executed out-of-order because of this forward reference. + 可以执行无序绑定,因为存在此前向引用。 + + + + This and other recursive references to the object(s) being defined will be checked for initialization-soundness at runtime through the use of a delayed reference. This is because you are defining one or more recursive objects, rather than recursive functions. This warning may be suppressed by using '#nowarn "40"' or '--nowarn:40'. + 将检查对要定义的对象的此引用和其他递归引用,以查看其在运行时能否通过使用延迟的引用来完整地进行初始化。这是因为您定义的是一个或多个递归对象,而不是递归函数。可以使用“#nowarn "40"”或“--nowarn:40”来禁止显示此警告。 + + + + Recursive references to the object being defined will be checked for initialization soundness at runtime through the use of a delayed reference. Consider placing self-references in members or within a trailing expression of the form '<ctor-expr> then <expr>'. + 将检查对要定义的对象的递归引用,以查看其在运行时能否通过使用延迟的引用来完整地进行初始化。请考虑在成员中或“<ctor-expr> then <expr>”格式的尾随表达式中放置自引用。 + + + + Recursive references to the object being defined will be checked for initialization soundness at runtime through the use of a delayed reference. Consider placing self-references within 'do' statements after the last 'let' binding in the construction sequence. + 将检查对要定义的对象的递归引用,以查看其在运行时能否通过使用延迟的引用来完整地进行初始化。请考虑在构造序列中的最后一个“let”绑定后的“do”语句中放置自引用。 + + + + The containing type can use 'null' as a representation value for its nullary union case. Invoking an abstract or virtual member or an interface implementation on a null value will lead to an exception. If necessary add a dummy data value to the nullary constructor to avoid 'null' being used as a representation for this type. + 包含类型可以将“null”用作其空联合用例的表示形式值。对 null 值调用抽象/虚拟成员或接口实现将会导致出现异常。如有必要,可将虚拟数据值添加到空构造函数以避免将“null”用作此值的表示形式。 + + + + The containing type can use 'null' as a representation value for its nullary union case. This member will be compiled as a static member. + 包含类型可以将“null”用作其空联合用例的表示形式值。此成员将编译为静态成员。 + + + + The member '{0}' doesn't correspond to a unique abstract slot based on name and argument count alone + 成员“{0}”与只基于名称和参数数目的唯一抽象槽不对应 + + + + . Multiple implemented interfaces have a member with this name and argument count + 。多个实现的接口包含具有此名称和参数数目的成员 + + + + . Consider implementing interfaces '{0}' and '{1}' explicitly. + 。请考虑显式实现接口“{0}”和“{1}”。 + + + + . Additional type annotations may be required to indicate the relevant override. This warning can be disabled using '#nowarn "70"' or '--nowarn:70'. + 。可能需要其他类型批注来指示相关重写。可以使用“#nowarn "70"”或“--nowarn:70”禁用此警告。 + + + + parse error + 分析错误 + + + + parse error: unexpected end of file + 分析错误: 意外的文件尾 + + + + {0} + {0} + + + + internal error: {0} + 内部错误: {0} + + + + {0} + {0} + + + + Incomplete pattern matches on this expression. + 此表达式中的模式匹配不完整。 + + + + For example, the value '{0}' may indicate a case not covered by the pattern(s). + 例如,值“{0}”可以指示模式未涵盖的用例。 + + + + For example, the value '{0}' may indicate a case not covered by the pattern(s). However, a pattern rule with a 'when' clause might successfully match this value. + 例如,值“{0}”可以指示模式未涵盖的用例。不过,包含“when”子句的模式规则可能会与此值成功匹配。 + + + + Unmatched elements will be ignored. + 将忽略不匹配的元素。 + + + + Enums may take values outside known cases. + 枚举可能使用已知用例外的值。 + + + + This rule will never be matched + 从不与此规则匹配 + + + + This value is not mutable. Consider using the mutable keyword, e.g. 'let mutable {0} = expression'. + 此值不是可变的。请考虑使用可变的关键字,如 "let mutable {0} = expression"。 + + + + This value is not local + 此值不是本地的 + + + + This construct is deprecated + 此构造已弃用 + + + + . {0} + 。{0} + + + + {0}. This warning can be disabled using '--nowarn:57' or '#nowarn "57"'. + {0}。可以使用“--nowarn:57”或“#nowarn "57"”禁用此警告。 + + + + Uses of this construct may result in the generation of unverifiable .NET IL code. This warning can be disabled using '--nowarn:9' or '#nowarn "9"'. + 使用此构造可能会导致生成不可验证的 .NET IL 代码。可以使用“--nowarn:9”或“#nowarn "9"”禁用此警告。 + + + + This construct is deprecated: {0} + 此构造已弃用: {0} + + + + This construct is deprecated: it is only for use in the F# library + 此构造已弃用: 只能在 F# 库中使用此构造 + + + + The following fields require values: {0} + 以下字段需要值: {0} + + + + Value restriction. The value '{0}' has generic type\n {1} \nEither make the arguments to '{2}' explicit or, if you do not intend for it to be generic, add a type annotation. + 值限制。值“{0}”具有泛型类型\n {1} \n使“{2}”的参数成为显式参数,或添加类型批注(如果您不希望它是泛型的)。 + + + + Value restriction. The value '{0}' has generic type\n {1} \nEither make '{2}' into a function with explicit arguments or, if you do not intend for it to be generic, add a type annotation. + 值限制。值“{0}”具有泛型类型\n {1} \n使“{2}”成为具有显式参数的函数,或添加类型批注(如果您不希望它是泛型的)。 + + + + Value restriction. This member has been inferred to have generic type\n {0} \nConstructors and property getters/setters cannot be more generic than the enclosing type. Add a type annotation to indicate the exact types involved. + 值限制。已推理出此成员具有泛型类型\n {0} \n构造函数和属性 Getter/Setter 不能比封闭类型更通用。 添加类型批注以指示涉及到的确切类型。 + + + + Value restriction. The value '{0}' has been inferred to have generic type\n {1} \nEither make the arguments to '{2}' explicit or, if you do not intend for it to be generic, add a type annotation. + 值限制。已推理出值“{0}”具有泛型类型\n {1} \n使“{2}”的参数成为显式参数,或添加类型批注(如果您不希望它是泛型的)。 + + + + Value restriction. The value '{0}' has been inferred to have generic type\n {1} \nEither define '{2}' as a simple data term, make it a function with explicit arguments or, if you do not intend for it to be generic, add a type annotation. + 值限制。已推理出值“{0}”具有泛型类型\n {1} \n将“{2}”定义为简单的数据条目,使其成为具有显式参数的函数,或添加类型批注(如果您不希望它是泛型的)。 + + + + syntax error + 语法错误 + + + + {0} + {0} + + + + {0} + {0} + + + + Override implementations in augmentations are now deprecated. Override implementations should be given as part of the initial declaration of a type. + 扩大中的重写实现现已弃用。应将重写实现作为类型的初始声明的一部分提供。 + + + + Override implementations should be given as part of the initial declaration of a type. + 应将重写实现作为类型的初始声明的一部分提供。 + + + + Interface implementations in augmentations are now deprecated. Interface implementations should be given on the initial declaration of a type. + 扩大中的接口实现现已弃用。应在类型的初始声明中提供接口实现。 + + + + Interface implementations should be given on the initial declaration of a type. + 应在类型的初始声明中提供接口实现。 + + + + A required assembly reference is missing. You must add a reference to assembly '{0}'. + 缺少所需的程序集引用。必须添加对程序集“{0}”的引用。 + + + + The type referenced through '{0}' is defined in an assembly that is not referenced. You must add a reference to assembly '{1}'. + 通过“{0}”引用的类型是在一个未被引用的程序集中定义的。必须添加对程序集“{1}”的引用。 + + + + #I directives may only occur in F# script files (extensions .fsx or .fsscript). Either move this code to a script file, add a '-I' compiler option for this reference or delimit the directive with delimit it with '#if INTERACTIVE'/'#endif'. + #I 指令只能出现在 F# 脚本文件(扩展名为 .fsx 或 .fsscript)中。请将此代码添加到脚本文件中、添加此引用的“-I”编译器选项或使用“#if INTERACTIVE”/“#endif”分隔此指令。 + + + + #r directives may only occur in F# script files (extensions .fsx or .fsscript). Either move this code to a script file or replace this reference with the '-r' compiler option. If this directive is being executed as user input, you may delimit it with '#if INTERACTIVE'/'#endif'. + #r 指令只能出现在 F# 脚本文件(扩展名为 .fsx 或 .fsscript)中。请将此代码移动到脚本文件或使用 "-r" 编译器选项替换此引用。如果该指令作为用户输入执行,则可以使用 "#if INTERACTIVE'/'#endif" 分隔它。 + + + + This directive may only be used in F# script files (extensions .fsx or .fsscript). Either remove the directive, move this code to a script file or delimit the directive with '#if INTERACTIVE'/'#endif'. + 只能在 F# 脚本文件(扩展名为 .fsx 或 .fsscript)中使用此指令。请删除此指令、将此代码移动到脚本文件中或使用“#if INTERACTIVE”/“#endif”分隔此指令。 + + + + Unable to find the file '{0}' in any of\n {1} + 无法在任何 {1} 中找到\n 文件“{0}” + + + + Assembly reference '{0}' was not found or is invalid + 程序集引用“{0}”未找到或无效 + + + + One or more warnings in loaded file.\n + 加载的文件中出现一个或多个警告。\n + + + + One or more errors in loaded file.\n + 加载的文件中出现一个或多个错误。\n + + + + Loaded files may only be F# source files (extension .fs). This F# script file (.fsx or .fsscript) will be treated as an F# source file + 加载的文件只能是 F# 源文件(扩展名为 .fs)。此 F# 脚本文件(.fsx 或 .fsscript)将被视为一个 F# 源文件 + + + + Invalid assembly name '{0}' from InternalsVisibleTo attribute in {1} + 来自 {1} 中的 InternalsVisibleTo 特性的程序集名称“{0}”无效 + + + + Invalid assembly name '{0}' from InternalsVisibleTo attribute (assembly filename not available) + 来自 InternalsVisibleTo 特性的程序集名称“{0}”无效(程序集文件名不可用) + + + + Could not load file '{0}' because it does not exist or is inaccessible + 未能加载文件“{0}”,因为该文件不存在或无法访问 + + + + {0} (Code={1}) + {0} (代码={1}) + + + + internal error: {0} + 内部错误: {0} + + + + + \ No newline at end of file diff --git a/src/fsharp/xlf/FSStrings.zh-Hant.xlf b/src/fsharp/xlf/FSStrings.zh-Hant.xlf new file mode 100644 index 00000000000..81cad28dd59 --- /dev/null +++ b/src/fsharp/xlf/FSStrings.zh-Hant.xlf @@ -0,0 +1,1622 @@ + + + + + + . See also {0}. + 。請參閱 {0}。 + + + + The tuples have differing lengths of {0} and {1} + 元組有 {0} 和 {1} 兩個不同長度 + + + + The types '{0}' and '{1}' cannot be unified. + 無法整合類型 '{0}' 與 '{1}'。 + + + + A type parameter is missing a constraint '{0}' + 型別參數遺漏條件約束 '{0}' + + + + The unit of measure '{0}' does not match the unit of measure '{1}' + 測量單位 '{0}' 不符合測量單位 '{1}' + + + + The type '{0}' does not match the type '{1}' + 類型 '{0}' 不符合類型 '{1}' + + + + The type '{0}' is not compatible with the type '{1}'{2} + 類型 '{0}' 與類型 '{1}'{2} 不相容 + + + + This expression was expected to have type\n '{1}' \nbut here has type\n '{0}' {2} + 這個運算式必須為類型\n '{1}' \n但此處卻是類型\n '{0}' {2} + + + + Type mismatch. Expecting a\n '{0}' \nbut given a\n '{1}' {2}\n + 類型不符。必須是\n '{0}' \n但指定的是\n '{1}' {2}\n + + + + Type constraint mismatch when applying the default type '{0}' for a type inference variable. + 套用類型推斷變數的預設類型 '{0}' 時,發生類型條件約束不符。 + + + + Consider adding further type constraints + 請考慮加入進一步的類型條件約束 + + + + Type constraint mismatch. The type \n '{0}' \nis not compatible with type\n '{1}' {2}\n + 類型條件約束不符。類型\n '{0}' \n不相容於類型\n '{1}' {2}\n + + + + Uppercase variable identifiers should not generally be used in patterns, and may indicate a misspelt pattern name. + 模式中通常不應該使用大寫的變數識別項,這可能表示模式名稱拼字錯誤。 + + + + Discriminated union cases and exception labels must be uppercase identifiers + 差別聯集和例外狀況標籤必須是大寫的識別項 + + + + Possible overload: '{0}'. {1}. + 可能的多載: '{0}'。{1}。 + + + + \n\nPossible best overload: '{0}'. + \n\n可能的最佳多載: '{0}'。 + + + + This function takes too many arguments, or is used in a context where a function is not expected + 這個函式接受太多引數,或是用在不需要函式的內容中 + + + + Member constraints with the name '{0}' are given special status by the F# compiler as certain .NET types are implicitly augmented with this member. This may result in runtime failures if you attempt to invoke the member constraint from your own code. + F# 編譯器會為名稱為 '{0}' 的成員條件約束指定特殊狀態,因為某些 .NET 類型會隱含用這個成員增強。如果您試圖從您自己的程式碼叫用這個成員條件約束,可能導致執行階段失敗。 + + + + A definition to be compiled as a .NET event does not have the expected form. Only property members can be compiled as .NET events. + 要編譯為 .NET 事件的定義不是採用需要的形式。只有屬性成員可以編譯為 .NET 事件。 + + + + Implicit object constructors for structs must take at least one argument + 結構的隱含物件建構函式必須至少接受一個引數 + + + + The type implements the interface '{0}' but this is not revealed by the signature. You should list the interface in the signature, as the interface will be discoverable via dynamic type casts and/or reflection. + 類型實作了介面 '{0}',但是未由簽章顯示。您應該在簽章中列出這個介面,因為透過動態類型轉型和/或反映即可瀏覽這個介面。 + + + + The type '{0}' expects {1} type argument(s) but is given {2} + 型別 '{0}' 需要 {1} 個型別引數,卻指定了 {2} 個 + + + + Lookup on object of indeterminate type based on information prior to this program point. A type annotation may be needed prior to this program point to constrain the type of the object. This may allow the lookup to be resolved. + 根據這個程式點之前的資訊,查詢是針對不定類型的物件。在這個程式點之前可能需要類型註釋,以限制物件的類型。這樣或許可以讓查詢能夠解析。 + + + + Duplicate definition of {0} '{1}' + 重複的 {0} '{1}' 定義 + + + + The {0} '{1}' can not be defined because the name '{2}' clashes with the {3} '{4}' in this type or module + 無法定義 {0} '{1}',因為名稱 '{2}' 與這個類型或模組中的 {3} '{4}' 相衝突 + + + + Two members called '{0}' have the same signature + 名稱為 '{0}' 的兩個成員具有相同的簽章 + + + + Duplicate definition of {0} '{1}' + 重複的 {0} '{1}' 定義 + + + + A construct with this name was found in FSharp.PowerPack.dll, which contains some modules and types that were implicitly referenced in some previous versions of F#. You may need to add an explicit reference to this DLL in order to compile this code. + 在 FSharp.PowerPack.dll 中找到這個名稱的建構,它包含部分舊版 F# 中隱含參考的一些模組和類型。您可能必須加入這個 DLL 的明確參考,才能編譯這個程式碼。 + + + + This field is not mutable + 這個欄位不是可變動的欄位 + + + + The fields '{0}' and '{1}' are from different types + 欄位 '{0}' 和 '{1}' 來自不同類型 + + + + '{0}' is bound twice in this pattern + '{0}' 在這個模式中繫結兩次 + + + + A use of the function '{0}' does not match a type inferred elsewhere. The inferred type of the function is\n {1}. \nThe type of the function required at this point of use is\n {2} {3}\nThis error may be due to limitations associated with generic recursion within a 'let rec' collection or within a group of classes. Consider giving a full type signature for the targets of recursive calls including type annotations for both argument and return types. + 函式 '{0}' 的使用方式不符合由他處推斷的類型。函式的推斷類型是\n {1}。 \n在這個使用點需要的函式類型是\n {2} {3}\n這個錯誤可能是 'let rec' 集合內或類別群組內泛型遞迴的相關限制所致。請考慮為遞迴呼叫的目標指定完整類型的簽章,包含引數和傳回型別兩者的類型註釋。 + + + + Invalid runtime coercion or type test from type {0} to {1}\n{2} + 從類型 {0} 到 {1} 的執行階段強制型轉或類型測試無效\n{2} + + + + This runtime coercion or type test from type\n {0} \n to \n {1} \ninvolves an indeterminate type based on information prior to this program point. Runtime type tests are not allowed on some types. Further type annotations are needed. + 根據這個程式點之前的資訊,這個從類型\n {0} \n 到 \n {1} \n的執行階段強制型轉或類型測試涉及不定的類型。不允許在某些類型上使用執行階段類型測試。需要進一步的類型註釋。 + + + + The static coercion from type\n {0} \nto \n {1} \n involves an indeterminate type based on information prior to this program point. Static coercions are not allowed on some types. Further type annotations are needed. + 根據這個程式點之前的資訊,從類型\n {0} \n到 \n {1} \n的靜態強制型轉涉及不定的類型。不允許在某些類型上執行靜態強制型轉。需要進一步的類型註釋。 + + + + A coercion from the value type \n {0} \nto the type \n {1} \nwill involve boxing. Consider using 'box' instead + 從實值類型 \n {0} \n到類型 \n {1} \n的強制型轉將涉及 Boxing。請考慮改用 'box' + + + + This type is 'abstract' since some abstract members have not been given an implementation. If this is intentional then add the '[<AbstractClass>]' attribute to your type. + 因為尚未對一些抽象成員提供實作,所以此類型為「抽象」。若故意形成此情況,請將 '[<AbstractClass>]' 屬性新增至您的類型。 + + + + This construct causes code to be less generic than indicated by its type annotations. The type variable implied by the use of a '#', '_' or other type annotation at or near '{0}' has been constrained to be type '{1}'. + 這個建構會導致程式碼的一般程度低於其類型註釋所指示的程度。在 '{0}' 或附近使用 '#'、'_' 或其他類型註釋所隱含的類型變數已被限於必須是類型 '{1}'。 + + + + This construct causes code to be less generic than indicated by the type annotations. The unit-of-measure variable '{0} has been constrained to be measure '{1}'. + 這個建構會導致程式碼的一般程度低於類型註釋所指示的程度。測量單位變數 '{0}' 已被限於必須是測量 '{1}'。 + + + + This construct causes code to be less generic than indicated by the type annotations. The type variable '{0} has been constrained to be type '{1}'. + 這個建構會導致程式碼的一般程度低於類型註釋所指示的程度。類型變數 '{0}' 已被限於必須是類型 '{1}'。 + + + + identifier + 識別碼 + + + + integer literal + 整數常值 + + + + floating point literal + 浮點常值 + + + + decimal literal + 十進位常值 + + + + character literal + 字元常值 + + + + keyword 'base' + 關鍵字 'base' + + + + symbol '(*)' + 符號 '(*)' + + + + symbol '$' + 符號 '$' + + + + infix operator + 中置運算子 + + + + infix operator + 中置運算子 + + + + symbol ':>' + 符號 ':>' + + + + symbol '::' + 符號 '::' + + + + symbol '{0} + 符號 '{0} + + + + infix operator + 中置運算子 + + + + infix operator + 中置運算子 + + + + infix operator + 中置運算子 + + + + prefix operator + 前置運算子 + + + + symbol ':?>' + 符號 ':?>' + + + + infix operator + 中置運算子 + + + + infix operator + 中置運算子 + + + + symbol '&' + 符號 '&' + + + + symbol '&&' + 符號 '&&' + + + + symbol '||' + 符號 '||' + + + + symbol '<' + 符號 '<' + + + + symbol '>' + 符號 '>' + + + + symbol '?' + 符號 '?' + + + + symbol '??' + 符號 '??' + + + + symbol ':?' + 符號 ':?' + + + + integer.. + 整數 + + + + symbol '..' + 符號 '..' + + + + quote symbol + 引號符號 + + + + symbol '*' + 符號 '*' + + + + type application + 類型應用程式 + + + + symbol ':' + 符號 ':' + + + + symbol ':=' + 符號 ':=' + + + + symbol '<-' + 符號 '<-' + + + + symbol '=' + 符號 '=' + + + + symbol '>|]' + 符號 '>|]' + + + + symbol '-' + 符號 '-' + + + + prefix operator + 前置運算子 + + + + operator name + 運算子名稱 + + + + symbol ',' + 符號 ',' + + + + symbol '.' + 符號 '.' + + + + symbol '|' + 符號 '|' + + + + symbol # + 符號 # + + + + symbol '_' + 符號 '_' + + + + symbol ';' + 符號 ';' + + + + symbol ';;' + 符號 ';;' + + + + symbol '(' + 符號 '(' + + + + symbol ')' + 符號 ')' + + + + symbol 'splice' + 符號 'splice' + + + + start of quotation + 引號開頭 + + + + symbol '[' + 符號 '[' + + + + symbol '[|' + 符號 '[|' + + + + symbol '[<' + 符號 '[<' + + + + symbol '{' + 符號 '{' + + + + symbol '{<' + 符號 '{<' + + + + symbol '|]' + 符號 '|]' + + + + symbol '>}' + 符號 '>}' + + + + symbol '>]' + 符號 '>]' + + + + end of quotation + 引號結尾 + + + + symbol ']' + 符號 ']' + + + + symbol '}' + 符號 '}' + + + + keyword 'public' + 關鍵字 'public' + + + + keyword 'private' + 關鍵字 'private' + + + + keyword 'internal' + 關鍵字 'internal' + + + + keyword 'fixed' + 關鍵字 'fixed' + + + + keyword 'constraint' + 關鍵字 'constraint' + + + + keyword 'instance' + 關鍵字 'instance' + + + + keyword 'delegate' + 關鍵字 'delegate' + + + + keyword 'inherit' + 關鍵字 'inherit' + + + + keyword 'constructor' + 關鍵字 'constructor' + + + + keyword 'default' + 關鍵字 'default' + + + + keyword 'override' + 關鍵字 'override' + + + + keyword 'abstract' + 關鍵字 'abstract' + + + + keyword 'class' + 關鍵字 'class' + + + + keyword 'member' + 關鍵字 'member' + + + + keyword 'static' + 關鍵字 'static' + + + + keyword 'namespace' + 關鍵字 'namespace' + + + + start of structured construct + 結構化建構開頭 + + + + incomplete structured construct at or before this point + 在以下或以下之前有結構不完整的建構: 這一點 + + + + Incomplete structured construct at or before this point + 在這一點或之前有結構不完整的建構 + + + + keyword 'then' + 關鍵字 'then' + + + + keyword 'else' + 關鍵字 'else' + + + + keyword 'let' or 'use' + 關鍵字 'let' 或 'use' + + + + binder keyword + 繫結器關鍵字 + + + + keyword 'do' + 關鍵字 'do' + + + + keyword 'const' + 關鍵字 'const' + + + + keyword 'with' + 關鍵字 'with' + + + + keyword 'function' + 關鍵字 'function' + + + + keyword 'fun' + 關鍵字 'fun' + + + + end of input + 輸入的結尾 + + + + internal dummy token + 內部虛擬語彙基元 + + + + keyword 'do!' + 關鍵字 'do!' + + + + yield + yield + + + + yield! + yield! + + + + keyword 'interface' + 關鍵字 'interface' + + + + keyword 'elif' + 關鍵字 'elif' + + + + symbol '->' + 符號 '->' + + + + keyword 'sig' + 關鍵字 'sig' + + + + keyword 'struct' + 關鍵字 'struct' + + + + keyword 'upcast' + 關鍵字 'upcast' + + + + keyword 'downcast' + 關鍵字 'downcast' + + + + keyword 'null' + 關鍵字 'null' + + + + reserved keyword + 保留的關鍵字 + + + + keyword 'module' + 關鍵字 'module' + + + + keyword 'and' + 關鍵字 'and' + + + + keyword 'as' + 關鍵字 'as' + + + + keyword 'assert' + 關鍵字 'assert' + + + + keyword 'asr' + 關鍵字 'asr' + + + + keyword 'downto' + 關鍵字 'downto' + + + + keyword 'exception' + 關鍵字 'exception' + + + + keyword 'false' + 關鍵字 'false' + + + + keyword 'for' + 關鍵字 'for' + + + + keyword 'fun' + 關鍵字 'fun' + + + + keyword 'function' + 關鍵字 'function' + + + + keyword 'finally' + 關鍵字 'finally' + + + + keyword 'lazy' + 關鍵字 'lazy' + + + + keyword 'match' + 關鍵字 'match' + + + + keyword 'match!' + 關鍵字 'match!' + + + + keyword 'mutable' + 關鍵字 'mutable' + + + + keyword 'new' + 關鍵字 'new' + + + + keyword 'of' + 關鍵字 'of' + + + + keyword 'open' + 關鍵字 'open' + + + + keyword 'or' + 關鍵字 'or' + + + + keyword 'void' + 關鍵字 'void' + + + + keyword 'extern' + 關鍵字 'extern' + + + + keyword 'interface' + 關鍵字 'interface' + + + + keyword 'rec' + 關鍵字 'rec' + + + + keyword 'to' + 關鍵字 'to' + + + + keyword 'true' + 關鍵字 'true' + + + + keyword 'try' + 關鍵字 'try' + + + + keyword 'type' + 關鍵字 'type' + + + + keyword 'val' + 關鍵字 'val' + + + + keyword 'inline' + 關鍵字 'inline' + + + + keyword 'when' + 關鍵字 'when' + + + + keyword 'while' + 關鍵字 'while' + + + + keyword 'with' + 關鍵字 'with' + + + + keyword 'if' + 關鍵字 'if' + + + + keyword 'do' + 關鍵字 'do' + + + + keyword 'global' + 關鍵字 'global' + + + + keyword 'done' + 關鍵字 'done' + + + + keyword 'in' + 關鍵字 'in' + + + + symbol '(' + 符號 '(' + + + + symbol'[' + 符號 '[' + + + + keyword 'begin' + 關鍵字 'begin' + + + + keyword 'end' + 關鍵字 'end' + + + + directive + 指示詞 + + + + inactive code + 非作用中的程式碼 + + + + lex failure + 語彙失敗 + + + + whitespace + 空白 + + + + comment + 註解 + + + + line comment + 行註解 + + + + string text + 字串文字 + + + + compiler generated literal + 編譯器產生的常值 + + + + byte array literal + 位元組陣列常值 + + + + string literal + 字串常值 + + + + end of input + 輸入的結尾 + + + + Unexpected end of input + 未預期的輸入結束 + + + + Unexpected {0} + 未預期的 {0} + + + + in interaction + 在互動中 + + + + in directive + 在指示詞中 + + + + in field declaration + 在欄位宣告中 + + + + in discriminated union case declaration + 在差別聯集宣告中 + + + + in binding + 在繫結中 + + + + in binding + 在繫結中 + + + + in member definition + 在成員定義中 + + + + in definitions + 在定義中 + + + + in member signature + 在成員簽章中 + + + + in value signature + 在值簽章中 + + + + in type signature + 在類型簽章中 + + + + in lambda expression + 在 Lambda 運算式中 + + + + in union case + 在聯集中 + + + + in extern declaration + 在外部宣告中 + + + + in object expression + 在物件運算式中 + + + + in if/then/else expression + 在 if/then/else 運算式中 + + + + in open declaration + 在公開宣告中 + + + + in module or namespace signature + 在模組或命名空間簽章中 + + + + in pattern matching + 在模式比對中 + + + + in begin/end expression + 在 begin/end 運算式中 + + + + in record expression + 在記錄運算式中 + + + + in type definition + 在類型定義中 + + + + in exception definition + 在例外狀況定義中 + + + + in type name + 在類型名稱中 + + + + in attribute list + 在屬性清單中 + + + + in quotation literal + 在引號常值中 + + + + in type constraint + 在類型條件約束中 + + + + in implementation file + 在實作檔中 + + + + in definition + 在定義中 + + + + in signature file + 在簽章檔中 + + + + in pattern + 在模式中 + + + + in expression + 在運算式中 + + + + in type + 在類型中 + + + + in type arguments + 在型別引數中 + + + + keyword + 關鍵字 + + + + symbol + 符號 + + + + (due to indentation-aware syntax) + (因縮排感知的語法所致) + + + + . Expected {0} or other token. + 。必須是{0} 或其他語彙基元。 + + + + . Expected {0}, {1} or other token. + 。必須是 {0}、{1} 或其他語彙基元。 + + + + . Expected {0}, {1}, {2} or other token. + 。必須是{0}、{1}、{2} 或其他語彙基元。 + + + + The type '{0}' cannot be used as the source of a type test or runtime coercion + 不能使用類型 '{0}' 做為類型測試或執行階段強制型轉的來源 + + + + The type '{0}' does not have any proper subtypes and cannot be used as the source of a type test or runtime coercion. + 類型 '{0}' 沒有任何正確的子類型,不能做為類型測試或執行階段強制型轉的來源。 + + + + The type '{0}' does not have any proper subtypes and need not be used as the target of a static coercion + 類型 '{0}' 沒有任何正確的子類型,不必做為靜態強制型轉的目標使用 + + + + This upcast is unnecessary - the types are identical + 這個向上轉型是不必要的 - 類型一樣 + + + + This type test or downcast will always hold + 這個類型測試或向下轉型永遠有效 + + + + The member '{0}' does not have the correct type to override any given virtual method + 成員 '{0}' 沒有正確的類型可覆寫任何指定的虛擬方法 + + + + The member '{0}' does not have the correct type to override the corresponding abstract method. + 成員 '{0}' 沒有正確的類型可覆寫對應的抽象方法。 + + + + The required signature is '{0}'. + 需要的簽章是 '{0}'。 + + + + The member '{0}' is specialized with 'unit' but 'unit' can't be used as return type of an abstract method parameterized on return type. + 成員 '{0}' 以 'unit' 特製化,但無法用 'unit' 當作在傳回類型上參數化之抽象方法的傳回類型。 + + + + This constructor is applied to {0} argument(s) but expects {1} + 這個建構函式是套用到 {0} 個引數,但必須是 {1} 個 + + + + The two sides of this 'or' pattern bind different sets of variables + 這個 'or' 模式的兩邊各繫結不同的變數集合 + + + + Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \n{3}. + 模組 '{0}' 包含\n {1} \n但它的簽章卻指定\n {2} \n{3}。 + + + + Module '{0}' requires a {1} '{2}' + 模組 '{0}' 需要 {1} '{2}' + + + + The use of native pointers may result in unverifiable .NET IL code + 使用原生指標可能產生無法驗證的 .NET IL 程式碼 + + + + {0} + {0} + + + + Thread static and context static 'let' bindings are deprecated. Instead use a declaration of the form 'static val mutable <ident> : <type>' in a class. Add the 'DefaultValue' attribute to this declaration to indicate that the value is initialized to the default value on each new thread. + Thread 靜態和 Context 靜態的 'let' 繫結已被取代。請改成在類別中使用 'static val mutable <ident> : <type>' 形式的宣告。將 'DefaultValue' 屬性加入這個宣告以表示會在每個新執行緒時將值初始化成預設值。 + + + + This expression is a function value, i.e. is missing arguments. Its type is {0}. + 這個運算式是函式值,也就是遺漏引數。它的類型是 {0}。 + + + + The result of this expression has type '{0}' and is implicitly ignored. Consider using 'ignore' to discard this value explicitly, e.g. 'expr |> ignore', or 'let' to bind the result to a name, e.g. 'let result = expr'. + 這個運算式的結果類型為 '{0}',已隱含略過。請考慮使用 'ignore' 以明確捨棄此值,例如 'expr |> ignore',或使用 'let' 將結果繫結至名稱,例如 'let result = expr'。 + + + + The result of this equality expression has type '{0}' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. + 這個等號比較運算式的結果類型為 '{0}',已隱含捨棄。請考慮使用 'let' 將結果繫結至名稱,例如 'let result = expression'。 + + + + The result of this equality expression has type '{0}' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to set a value to a property, then use the '<-' operator e.g. '{1}.{2} <- expression'. + 這個等號比較運算式的結果類型為 '{0}',已隱含捨棄。請考慮使用 'let' 將結果繫結至名稱,例如 'let result = expression'。若您要設定屬性值,請使用 '<-' 運算子,例如 '{1}.{2} <- expression'。 + + + + The result of this equality expression has type '{0}' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to mutate a value, then mark the value 'mutable' and use the '<-' operator e.g. '{1} <- expression'. + 這個等號比較運算式的結果類型為 '{0}',已隱含捨棄。請考慮使用 'let' 將結果繫結至名稱,例如 'let result = expression'。若您要變動值,請將值標示為「可變動」,並使用 '<-' 運算子,例如 '{1} <- expression'。 + + + + The result of this equality expression has type '{0}' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to mutate a value, then use the '<-' operator e.g. '{1} <- expression'. + 這個等號比較運算式的結果類型為 '{0}',已隱含捨棄。請考慮使用 'let' 將結果繫結至名稱,例如 'let result = expression'。若您要變動值,請使用 '<-' 運算子,例如 '{1} <- expression'。 + + + + This recursive use will be checked for initialization-soundness at runtime. This warning is usually harmless, and may be suppressed by using '#nowarn "21"' or '--nowarn:21'. + 這個遞迴用途會在執行階段檢查初始化是否正確。這個警告通常是無害的,可以使用 '#nowarn "21"' 或 '--nowarn:21' 予以隱藏。 + + + + The value '{0}' will be evaluated as part of its own definition + 值 '{0}' 將在它自己的定義內評估 + + + + This value will be eventually evaluated as part of its own definition. You may need to make the value lazy or a function. Value '{0}'{1}. + 這個值最後將在它自己的定義內評估。您必須將這個值設為 Lazy 或函式。值 '{0}'{1}。 + + + + will evaluate '{0}' + 將評估 '{0}' + + + + Bindings may be executed out-of-order because of this forward reference. + 因為這個向前參考的關係,繫結可能未依序執行。 + + + + This and other recursive references to the object(s) being defined will be checked for initialization-soundness at runtime through the use of a delayed reference. This is because you are defining one or more recursive objects, rather than recursive functions. This warning may be suppressed by using '#nowarn "40"' or '--nowarn:40'. + 這個和其他對所定義物件的遞迴參考,將在執行階段透過使用延遲參考來檢查初始化是否正確。這是因為您定義的是一個或多個遞迴物件,而不是遞迴函式。使用 '#nowarn "40"' 或 '--nowarn:40' 可以隱藏這個警告。 + + + + Recursive references to the object being defined will be checked for initialization soundness at runtime through the use of a delayed reference. Consider placing self-references in members or within a trailing expression of the form '<ctor-expr> then <expr>'. + 對所定義物件的遞迴參考,將在執行階段透過使用延遲參考來檢查初始化是否正確。請考慮將自我參考放在成員中或 '<ctor-expr> then <expr>' 形式的尾端運算式內。 + + + + Recursive references to the object being defined will be checked for initialization soundness at runtime through the use of a delayed reference. Consider placing self-references within 'do' statements after the last 'let' binding in the construction sequence. + 對所定義物件的遞迴參考,將在執行階段透過使用延遲參考來檢查初始化是否正確。請考慮將自我參考放在建構順序中最後一個 'let' 繫結後的 'do' 陳述式內。 + + + + The containing type can use 'null' as a representation value for its nullary union case. Invoking an abstract or virtual member or an interface implementation on a null value will lead to an exception. If necessary add a dummy data value to the nullary constructor to avoid 'null' being used as a representation for this type. + 包含類型可以使用 'null' 做為其零元聯集的表示值。叫用抽象或虛擬成員或 null 值的介面實作將產生例外狀況。如有必要,請將虛擬資料值加入零元建構函式,以免將 'null' 當做這種類型的表示。 + + + + The containing type can use 'null' as a representation value for its nullary union case. This member will be compiled as a static member. + 包含類型可以使用 'null' 做為其零元聯集的表示值。這個成員將編譯成靜態成員。 + + + + The member '{0}' doesn't correspond to a unique abstract slot based on name and argument count alone + 只根據名稱和引數計數,成員 '{0}' 未對應到唯一的抽象位置 + + + + . Multiple implemented interfaces have a member with this name and argument count + 。多個實作的介面具有這個名稱和引數計數的成員 + + + + . Consider implementing interfaces '{0}' and '{1}' explicitly. + 。請考慮明確實作介面 '{0}' 和 '{1}'。 + + + + . Additional type annotations may be required to indicate the relevant override. This warning can be disabled using '#nowarn "70"' or '--nowarn:70'. + 。可能需要其他類型註釋,指示相關覆寫。使用 '#nowarn "70"' 或 '--nowarn:70' 可以停用這個警告。 + + + + parse error + 剖析錯誤 + + + + parse error: unexpected end of file + 剖析錯誤: 未預期的檔案結尾 + + + + {0} + {0} + + + + internal error: {0} + 內部錯誤: {0} + + + + {0} + {0} + + + + Incomplete pattern matches on this expression. + 這個運算式的模式比對不完整。 + + + + For example, the value '{0}' may indicate a case not covered by the pattern(s). + 例如,值 '{0}' 可能表示模式未涵蓋的案例。 + + + + For example, the value '{0}' may indicate a case not covered by the pattern(s). However, a pattern rule with a 'when' clause might successfully match this value. + 例如,值 '{0}' 可能表示模式未涵蓋的案例。但是具有 'when' 子句的模式規則或許可以成功比對這個值。 + + + + Unmatched elements will be ignored. + 無對應的項目將會被忽略。 + + + + Enums may take values outside known cases. + 列舉可能會採用來自已知案例之外的值。 + + + + This rule will never be matched + 這個規則絕不會比對到 + + + + This value is not mutable. Consider using the mutable keyword, e.g. 'let mutable {0} = expression'. + 此值不可變動。請考慮使用可變動的關鍵字,例如 'let mutable {0} = expression'。 + + + + This value is not local + 這不是區域值 + + + + This construct is deprecated + 這個建構已被取代 + + + + . {0} + 。{0} + + + + {0}. This warning can be disabled using '--nowarn:57' or '#nowarn "57"'. + {0}。使用 '--nowarn:57' 或 '#nowarn "57"' 可以停用這個警告。 + + + + Uses of this construct may result in the generation of unverifiable .NET IL code. This warning can be disabled using '--nowarn:9' or '#nowarn "9"'. + 使用這個建構可能導致產生無法驗證的 .NET IL 程式碼。使用 '--nowarn:9' 或 '#nowarn "9"' 可以停用這個警告。 + + + + This construct is deprecated: {0} + 這個建構已被取代: {0} + + + + This construct is deprecated: it is only for use in the F# library + 這個建構已被取代: 它只用在 F# 程式庫中 + + + + The following fields require values: {0} + 下列欄位需要值: {0} + + + + Value restriction. The value '{0}' has generic type\n {1} \nEither make the arguments to '{2}' explicit or, if you do not intend for it to be generic, add a type annotation. + 值限制。值 '{0}' 具有泛型類型\n {1} \n請將 '{2}' 的引數設為明確的,或者如果不想將它設為泛型,請加入類型註釋。 + + + + Value restriction. The value '{0}' has generic type\n {1} \nEither make '{2}' into a function with explicit arguments or, if you do not intend for it to be generic, add a type annotation. + 值限制。值 '{0}' 具有泛型類型\n {1} \n請將 '{2}' 設為具有明確引數的函式,或者如果不想將它設為泛型,請加入類型註釋。 + + + + Value restriction. This member has been inferred to have generic type\n {0} \nConstructors and property getters/setters cannot be more generic than the enclosing type. Add a type annotation to indicate the exact types involved. + 值限制。這個成員已被推斷為具有泛型類型\n {0} \n建構函式和屬性 getter/setter 不能比封入類型更為泛型。請加入類型註釋,以指示涉及的確切類型。 + + + + Value restriction. The value '{0}' has been inferred to have generic type\n {1} \nEither make the arguments to '{2}' explicit or, if you do not intend for it to be generic, add a type annotation. + 值限制。值 '{0}' 已被推斷為具有泛型類型\n {1} \n請將 '{2}' 的引數設為明確的,或者如果不想將它設為泛型,請加入類型註釋。 + + + + Value restriction. The value '{0}' has been inferred to have generic type\n {1} \nEither define '{2}' as a simple data term, make it a function with explicit arguments or, if you do not intend for it to be generic, add a type annotation. + 值限制。值 '{0}' 已被推斷為具有泛型類型\n {1} \n請將 '{2}' 定義為簡單資料項、將它設為具有明確引數的函式,或者如果不想將它設為泛型,請加入類型註釋。 + + + + syntax error + 語法錯誤 + + + + {0} + {0} + + + + {0} + {0} + + + + Override implementations in augmentations are now deprecated. Override implementations should be given as part of the initial declaration of a type. + 增強指定中的覆寫實作現在已被取代。應該在類型的初始宣告上指定覆寫實作。 + + + + Override implementations should be given as part of the initial declaration of a type. + 應該在類型的初始宣告上指定覆寫實作。 + + + + Interface implementations in augmentations are now deprecated. Interface implementations should be given on the initial declaration of a type. + 增強指定中的介面實作現在已被取代。應該在類型的初始宣告上指定介面實作。 + + + + Interface implementations should be given on the initial declaration of a type. + 應該在類型的初始宣告上指定介面實作。 + + + + A required assembly reference is missing. You must add a reference to assembly '{0}'. + 遺漏需要的組件參考。您必須加入組件 '{0}' 的參考。 + + + + The type referenced through '{0}' is defined in an assembly that is not referenced. You must add a reference to assembly '{1}'. + 透過 '{0}' 參考的類型是定義在未參考的組件中。您必須加入組件 '{1}' 的參考。 + + + + #I directives may only occur in F# script files (extensions .fsx or .fsscript). Either move this code to a script file, add a '-I' compiler option for this reference or delimit the directive with delimit it with '#if INTERACTIVE'/'#endif'. + #I 指示詞只能出現在 F# 指令碼檔案 (副檔名 .fsx 或 .fsscript) 中。請將這個程式碼移到指令碼檔案、為這個參考加入 '-I' 編譯器選項,或用 '#if INTERACTIVE'/'#endif' 分隔這個指示詞。 + + + + #r directives may only occur in F# script files (extensions .fsx or .fsscript). Either move this code to a script file or replace this reference with the '-r' compiler option. If this directive is being executed as user input, you may delimit it with '#if INTERACTIVE'/'#endif'. + #r 指示詞只能出現在 F# 指令碼檔案 (副檔名為 .fsx 或 .fsscript) 中。請將此程式碼移至指令碼檔案,或以 '-r' 編譯器選項取代此參考。若此指示詞要以使用者輸入的方式執行,可以使用 '#if INTERACTIVE'/'#endif' 加以分隔。 + + + + This directive may only be used in F# script files (extensions .fsx or .fsscript). Either remove the directive, move this code to a script file or delimit the directive with '#if INTERACTIVE'/'#endif'. + 這個指示詞只能用在 F# 指令碼檔案 (副檔名 .fsx 或 .fsscript) 中。請移除指示詞,或將這個程式碼移到指令碼檔案,或用 '#if INTERACTIVE'/'#endif' 分隔這個指示詞。 + + + + Unable to find the file '{0}' in any of\n {1} + 在下列任何位置都找不到檔案 '{0}'\n {1} + + + + Assembly reference '{0}' was not found or is invalid + 找不到組件參考 '{0}',或者無效 + + + + One or more warnings in loaded file.\n + 載入的檔案中有一個或多個警告。\n + + + + One or more errors in loaded file.\n + 載入的檔案中有一個或多個錯誤。\n + + + + Loaded files may only be F# source files (extension .fs). This F# script file (.fsx or .fsscript) will be treated as an F# source file + 載入的檔案只能是 F# 原始程式檔 (副檔名 .fs)。這個 F# 指令碼檔案 (.fsx 或 .fsscript) 將被視為 F# 原始程式檔 + + + + Invalid assembly name '{0}' from InternalsVisibleTo attribute in {1} + {1} 中的 InternalsVisibleTo 屬性有無效的組件名稱 '{0}' + + + + Invalid assembly name '{0}' from InternalsVisibleTo attribute (assembly filename not available) + InternalsVisibleTo 屬性中有無效的組件名稱 '{0}' (無法取得組件檔名) + + + + Could not load file '{0}' because it does not exist or is inaccessible + 無法載入檔案 '{0}',因為它不存在或無法存取 + + + + {0} (Code={1}) + {0} (程式碼={1}) + + + + internal error: {0} + 內部錯誤: {0} + + + + + \ No newline at end of file diff --git a/src/ilx/EraseClosures.fs b/src/ilx/EraseClosures.fs index 80329249c38..92476961fe9 100644 --- a/src/ilx/EraseClosures.fs +++ b/src/ilx/EraseClosures.fs @@ -13,6 +13,7 @@ open Microsoft.FSharp.Compiler.AbstractIL.Extensions.ILX.IlxSettings open Microsoft.FSharp.Compiler.AbstractIL.Morphs open Microsoft.FSharp.Compiler.AbstractIL.IL open Microsoft.FSharp.Compiler.PrettyNaming +open System.Reflection // -------------------------------------------------------------------- // Erase closures and function types @@ -122,8 +123,8 @@ type cenv = addFieldNeverAttrs: ILFieldDef -> ILFieldDef addMethodGeneratedAttrs: ILMethodDef -> ILMethodDef } -let addMethodGeneratedAttrsToTypeDef cenv tdef = - { tdef with Methods = tdef.Methods.AsList |> List.map (fun md -> md |> cenv.addMethodGeneratedAttrs) |> mkILMethods } +let addMethodGeneratedAttrsToTypeDef cenv (tdef: ILTypeDef) = + tdef.With(methods = (tdef.Methods.AsList |> List.map (fun md -> md |> cenv.addMethodGeneratedAttrs) |> mkILMethods)) let newIlxPubCloEnv(ilg, addMethodGeneratedAttrs, addFieldGeneratedAttrs, addFieldNeverAttrs) = { ilg = ilg @@ -313,8 +314,8 @@ let convMethodBody thisClo = function | x -> x let convMethodDef thisClo (md: ILMethodDef) = - let b' = convMethodBody thisClo (md.mdBody.Contents) - {md with mdBody=mkMethBodyAux b'} + let b' = convMethodBody thisClo (md.Body.Contents) + md.With(body=mkMethBodyAux b') // -------------------------------------------------------------------- // Make fields for free variables of a type abstraction. @@ -359,7 +360,6 @@ let rec convIlxClosureDef cenv encl (td: ILTypeDef) clo = let tagApp = (Lazy.force clo.cloCode).SourceMarker let tyargsl, tmargsl, laterStruct = stripSupportedAbstraction clo.cloStructure - let laterAccess = td.Access // Adjust all the argument and environment accesses let rewriteCodeToAccessArgsFromEnv laterCloSpec (argToFreeVarMap: (int * IlxClosureFreeVar) list) = @@ -428,9 +428,7 @@ let rec convIlxClosureDef cenv encl (td: ILTypeDef) clo = let laterCode = rewriteCodeToAccessArgsFromEnv laterCloSpec [(0, selfFreeVar)] let laterTypeDefs = convIlxClosureDef cenv encl - {td with GenericParams=laterGenericParams - Access=laterAccess - Name=laterTypeName} + (td.With(genericParams=laterGenericParams, name=laterTypeName)) {clo with cloStructure=laterStruct cloFreeVars=laterFields cloCode=notlazy laterCode} @@ -480,29 +478,27 @@ let rec convIlxClosureDef cenv encl (td: ILTypeDef) clo = |> cenv.addMethodGeneratedAttrs let cloTypeDef = - { Name = td.Name - GenericParams= td.GenericParams - Access=td.Access - Implements = List.empty - IsAbstract = false - NestedTypes = emptyILTypeDefs - IsSealed = true - IsSerializable=td.IsSerializable - IsComInterop=false - IsSpecialName=false - Layout=ILTypeDefLayout.Auto - Encoding=ILDefaultPInvokeEncoding.Ansi - InitSemantics=ILTypeInit.BeforeField - Extends= Some cenv.mkILTyFuncTy - Methods= mkILMethods ([ctorMethodDef] @ [nowApplyMethDef]) - Fields= mkILFields (mkILCloFldDefs cenv nowFields) - CustomAttrs=emptyILCustomAttrs - MethodImpls=emptyILMethodImpls - Properties=emptyILProperties - Events=emptyILEvents - HasSecurity=false - SecurityDecls=emptyILSecurityDecls - tdKind = ILTypeDefKind.Class} + ILTypeDef(name = td.Name, + genericParams= td.GenericParams, + attributes = td.Attributes, + implements = [], + nestedTypes = emptyILTypeDefs, + layout=ILTypeDefLayout.Auto, + extends= Some cenv.mkILTyFuncTy, + methods= mkILMethods ([ctorMethodDef] @ [nowApplyMethDef]) , + fields= mkILFields (mkILCloFldDefs cenv nowFields), + customAttrs=emptyILCustomAttrs, + methodImpls=emptyILMethodImpls, + properties=emptyILProperties, + events=emptyILEvents, + securityDecls=emptyILSecurityDecls) + .WithSpecialName(false) + .WithImport(false) + .WithHasSecurity(false) + .WithAbstract(false) + .WithSealed(true) + .WithInitSemantics(ILTypeInit.BeforeField) + .WithEncoding(ILDefaultPInvokeEncoding.Ansi) [ cloTypeDef] // CASE 2 - Term Application @@ -546,9 +542,7 @@ let rec convIlxClosureDef cenv encl (td: ILTypeDef) clo = let laterTypeDefs = convIlxClosureDef cenv encl - {td with GenericParams=laterGenericParams - Access=laterAccess - Name=laterTypeName} + (td.With(genericParams=laterGenericParams, name=laterTypeName)) {clo with cloStructure=laterStruct cloFreeVars=laterFields cloCode=notlazy laterCode} @@ -581,29 +575,27 @@ let rec convIlxClosureDef cenv encl (td: ILTypeDef) clo = ILMemberAccess.Assembly) |> cenv.addMethodGeneratedAttrs - { Name = td.Name - GenericParams= td.GenericParams - Access = td.Access - Implements = [] - IsAbstract = false - IsSealed = true - IsSerializable=td.IsSerializable - IsComInterop=false - IsSpecialName=false - Layout=ILTypeDefLayout.Auto - Encoding=ILDefaultPInvokeEncoding.Ansi - InitSemantics=ILTypeInit.BeforeField - NestedTypes = emptyILTypeDefs - Extends= Some nowEnvParentClass - Methods= mkILMethods ([ctorMethodDef] @ [nowApplyMethDef]) - Fields= mkILFields (mkILCloFldDefs cenv nowFields) - CustomAttrs=emptyILCustomAttrs - MethodImpls=emptyILMethodImpls - Properties=emptyILProperties - Events=emptyILEvents - HasSecurity=false - SecurityDecls=emptyILSecurityDecls - tdKind = ILTypeDefKind.Class } + ILTypeDef(name = td.Name, + genericParams= td.GenericParams, + attributes = td.Attributes, + implements = [], + layout=ILTypeDefLayout.Auto, + nestedTypes = emptyILTypeDefs, + extends= Some nowEnvParentClass, + methods= mkILMethods ([ctorMethodDef] @ [nowApplyMethDef]), + fields= mkILFields (mkILCloFldDefs cenv nowFields), + customAttrs=emptyILCustomAttrs, + methodImpls=emptyILMethodImpls, + properties=emptyILProperties, + events=emptyILEvents, + securityDecls=emptyILSecurityDecls) + .WithHasSecurity(false) + .WithSpecialName(false) + .WithAbstract(false) + .WithImport(false) + .WithEncoding(ILDefaultPInvokeEncoding.Ansi) + .WithSealed(true) + .WithInitSemantics(ILTypeInit.BeforeField) [cloTypeDef] @@ -633,14 +625,12 @@ let rec convIlxClosureDef cenv encl (td: ILTypeDef) clo = None)) let cloTypeDef = - { td with - Implements= td.Implements - Extends= (match td.Extends with None -> Some cenv.ilg.typ_Object | Some x -> Some(x)) - Name = td.Name - GenericParams= td.GenericParams - Methods= mkILMethods (ctorMethodDef :: List.map (convMethodDef (Some nowCloSpec)) td.Methods.AsList) - Fields= mkILFields (mkILCloFldDefs cenv nowFields @ td.Fields.AsList) - tdKind = ILTypeDefKind.Class } + td.With(implements= td.Implements, + extends= (match td.Extends with None -> Some cenv.ilg.typ_Object | Some x -> Some(x)), + name = td.Name, + genericParams= td.GenericParams, + methods= mkILMethods (ctorMethodDef :: List.map (convMethodDef (Some nowCloSpec)) td.Methods.AsList), + fields= mkILFields (mkILCloFldDefs cenv nowFields @ td.Fields.AsList)) [cloTypeDef] diff --git a/src/ilx/EraseUnions.fs b/src/ilx/EraseUnions.fs index c75ab90f05f..b6fb95c4bdb 100644 --- a/src/ilx/EraseUnions.fs +++ b/src/ilx/EraseUnions.fs @@ -14,6 +14,7 @@ open Microsoft.FSharp.Compiler.AbstractIL.IL open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library open Microsoft.FSharp.Compiler.AbstractIL.Extensions.ILX open Microsoft.FSharp.Compiler.AbstractIL.Extensions.ILX.Types +open System.Reflection [] @@ -168,7 +169,7 @@ let cuspecRepr = (fun cuspec -> cuspec.HasHelpers = IlxUnionHasHelpers.SpecialFSharpListHelpers), (fun cuspec -> cuspec.Boxity = ILBoxity.AsValue), (fun (alt:IlxUnionAlternative) -> alt.Name), - (fun cuspec -> cuspec.EnclosingType), + (fun cuspec -> cuspec.DeclaringType), (fun (cuspec,nm) -> mkILNamedTy cuspec.Boxity (mkILTyRefInTyRef (mkCasesTypeRef cuspec, nm)) cuspec.GenericArgs)) type NoTypesGeneratedViaThisReprDecider = NoTypesGeneratedViaThisReprDecider @@ -178,7 +179,7 @@ let cudefRepr = (fun (_td,cud) -> cud.cudNullPermitted), (fun (alt:IlxUnionAlternative) -> alt.IsNullary), (fun (_td,cud) -> cud.cudHasHelpers = IlxUnionHasHelpers.SpecialFSharpListHelpers), - (fun (td,_cud) -> match td.tdKind with ILTypeDefKind.ValueType -> true | _ -> false), + (fun (td:ILTypeDef,_cud) -> td.IsStruct), (fun (alt:IlxUnionAlternative) -> alt.Name), (fun (_td,_cud) -> NoTypesGeneratedViaThisReprDecider), (fun ((_td,_cud),_nm) -> NoTypesGeneratedViaThisReprDecider)) @@ -609,27 +610,26 @@ let emitDataSwitch ilg (cg: ICodeGen<'Mark>) (avoidHelpers, cuspec, cases) = //--------------------------------------------------- // Generate the union classes -let mkMethodsAndPropertiesForFields (addMethodGeneratedAttrs, addPropertyGeneratedAttrs) access attr hasHelpers (typ: ILType) (fields: IlxUnionField[]) = +let mkMethodsAndPropertiesForFields (addMethodGeneratedAttrs, addPropertyGeneratedAttrs) access attr hasHelpers (ilTy: ILType) (fields: IlxUnionField[]) = let basicProps = fields |> Array.map (fun field -> - { Name=adjustFieldName hasHelpers field.Name - IsRTSpecialName=false - IsSpecialName=false - SetMethod=None - GetMethod = Some (mkILMethRef (typ.TypeRef, ILCallingConv.Instance, "get_" + adjustFieldName hasHelpers field.Name, 0, [], field.Type)) - CallingConv=ILThisConvention.Instance - Type=field.Type - Init=None - Args = [] - CustomAttrs= field.ILField.CustomAttrs } + ILPropertyDef(name = adjustFieldName hasHelpers field.Name, + attributes = PropertyAttributes.None, + setMethod = None, + getMethod = Some (mkILMethRef (ilTy.TypeRef, ILCallingConv.Instance, "get_" + adjustFieldName hasHelpers field.Name, 0, [], field.Type)), + callingConv = ILThisConvention.Instance, + propertyType = field.Type, + init = None, + args = [], + customAttrs = field.ILField.CustomAttrs) |> addPropertyGeneratedAttrs ) |> Array.toList let basicMethods = [ for field in fields do - let fspec = mkILFieldSpecInTy(typ,field.LowerName,field.Type) + let fspec = mkILFieldSpecInTy(ilTy,field.LowerName,field.Type) yield mkILNonGenericInstanceMethod ("get_" + adjustFieldName hasHelpers field.Name, @@ -648,7 +648,7 @@ let convAlternativeDef (addMethodGeneratedAttrs, addPropertyGeneratedAttrs, addP let repr = cudefRepr // Attributes on unions get attached to the construction methods in the helpers - let addAltAttribs (mdef: ILMethodDef) = { mdef with CustomAttrs=alt.altCustomAttrs } + let addAltAttribs (mdef: ILMethodDef) = mdef.With(customAttrs=alt.altCustomAttrs) // The stdata instruction is only ever used for the F# "List" type // @@ -667,7 +667,7 @@ let convAlternativeDef (addMethodGeneratedAttrs, addPropertyGeneratedAttrs, addP | _ -> if alt.IsNullary && repr.MaintainPossiblyUniqueConstantFieldForAlternative (info,alt) then let methName = "get_" + altName - let meth = + let meth = mkILNonGenericStaticMethod (methName, cud.cudReprAccess,[],mkILReturn(baseTy), @@ -698,16 +698,15 @@ let convAlternativeDef (addMethodGeneratedAttrs, addPropertyGeneratedAttrs, addP mkMethodBody(true,[],2,nonBranchingInstrsToCode ([ mkLdarg0 ] @ mkIsData ilg (true, cuspec, num)), attr)) |> addMethodGeneratedAttrs ], - [ { Name=mkTesterName altName - IsRTSpecialName=false - IsSpecialName=false - SetMethod=None - GetMethod = Some (mkILMethRef (baseTy.TypeRef, ILCallingConv.Instance, "get_" + mkTesterName altName, 0, [], ilg.typ_Bool)) - CallingConv=ILThisConvention.Instance - Type=ilg.typ_Bool - Init=None - Args = [] - CustomAttrs=emptyILCustomAttrs } + [ ILPropertyDef(name = mkTesterName altName, + attributes = PropertyAttributes.None, + setMethod = None, + getMethod = Some (mkILMethRef (baseTy.TypeRef, ILCallingConv.Instance, "get_" + mkTesterName altName, 0, [], ilg.typ_Bool)), + callingConv = ILThisConvention.Instance, + propertyType = ilg.typ_Bool, + init = None, + args = [], + customAttrs = emptyILCustomAttrs) |> addPropertyGeneratedAttrs |> addPropertyNeverAttrs ] @@ -727,16 +726,15 @@ let convAlternativeDef (addMethodGeneratedAttrs, addPropertyGeneratedAttrs, addP let nullaryProp = - { Name=altName - IsRTSpecialName=false - IsSpecialName=false - SetMethod=None - GetMethod = Some (mkILMethRef (baseTy.TypeRef, ILCallingConv.Static, "get_" + altName, 0, [], baseTy)) - CallingConv=ILThisConvention.Static - Type=baseTy - Init=None - Args = [] - CustomAttrs=emptyILCustomAttrs } + ILPropertyDef(name = altName, + attributes = PropertyAttributes.None, + setMethod = None, + getMethod = Some (mkILMethRef (baseTy.TypeRef, ILCallingConv.Static, "get_" + altName, 0, [], baseTy)), + callingConv = ILThisConvention.Static, + propertyType = baseTy, + init = None, + args = [], + customAttrs = emptyILCustomAttrs) |> addPropertyGeneratedAttrs |> addPropertyNeverAttrs @@ -770,12 +768,12 @@ let convAlternativeDef (addMethodGeneratedAttrs, addPropertyGeneratedAttrs, addP else let altNullaryFields = if repr.MaintainPossiblyUniqueConstantFieldForAlternative(info,alt) then - let basic = + let basic : ILFieldDef = mkILStaticField (constFieldName altName, baseTy, None, None, ILMemberAccess.Assembly) |> addFieldNeverAttrs |> addFieldGeneratedAttrs - let uniqObjField = { basic with IsInitOnly=true } + let uniqObjField = basic.WithInitOnly(true) let inRootClass = cuspecRepr.OptimizeAlternativeToRootClass (cuspec,alt) [ (info,alt, altTy,num,uniqObjField,inRootClass) ] else @@ -820,7 +818,7 @@ let convAlternativeDef (addMethodGeneratedAttrs, addPropertyGeneratedAttrs, addP mkMethodBody(true,[],2, nonBranchingInstrsToCode [ mkLdarg0 - (match td.tdKind with ILTypeDefKind.ValueType -> mkNormalLdflda | _ -> mkNormalLdfld) + (if td.IsStruct then mkNormalLdflda else mkNormalLdfld) (mkILFieldSpecInTy (debugProxyTy,debugProxyFieldName,altTy)) mkNormalLdfld (mkILFieldSpecInTy(altTy,fldName,fldTy))],None)) |> addMethodGeneratedAttrs ) @@ -829,16 +827,15 @@ let convAlternativeDef (addMethodGeneratedAttrs, addPropertyGeneratedAttrs, addP let debugProxyGetterProps = fields |> Array.map (fun fdef -> - { Name=fdef.Name - IsRTSpecialName=false - IsSpecialName=false - SetMethod=None - GetMethod=Some(mkILMethRef(debugProxyTy.TypeRef,ILCallingConv.Instance,"get_" + fdef.Name,0,[],fdef.Type)) - CallingConv=ILThisConvention.Instance - Type=fdef.Type - Init=None - Args = [] - CustomAttrs= fdef.ILField.CustomAttrs } + ILPropertyDef(name = fdef.Name, + attributes = PropertyAttributes.None, + setMethod = None, + getMethod = Some(mkILMethRef(debugProxyTy.TypeRef,ILCallingConv.Instance,"get_" + fdef.Name,0,[],fdef.Type)), + callingConv = ILThisConvention.Instance, + propertyType = fdef.Type, + init = None, + args = [], + customAttrs = fdef.ILField.CustomAttrs) |> addPropertyGeneratedAttrs) |> Array.toList @@ -855,7 +852,7 @@ let convAlternativeDef (addMethodGeneratedAttrs, addPropertyGeneratedAttrs, addP emptyILCustomAttrs, ILTypeInit.BeforeField) - [ { debugProxyTypeDef with IsSpecialName=true } ], + [ debugProxyTypeDef.WithSpecialName(true) ], ( [mkDebuggerTypeProxyAttribute debugProxyTy] @ cud.cudDebugDisplayAttributes) let altTypeDef = @@ -864,11 +861,11 @@ let convAlternativeDef (addMethodGeneratedAttrs, addPropertyGeneratedAttrs, addP |> Array.map (fun field -> let fldName,fldTy = mkUnionCaseFieldId field let fdef = mkILInstanceField (fldName,fldTy, None, ILMemberAccess.Assembly) |> addFieldNeverAttrs |> addFieldGeneratedAttrs - { fdef with IsInitOnly=isTotallyImmutable }) + fdef.WithInitOnly(isTotallyImmutable)) |> Array.toList - let basicProps, basicMethods = mkMethodsAndPropertiesForFields (addMethodGeneratedAttrs, addPropertyGeneratedAttrs) cud.cudReprAccess attr cud.cudHasHelpers altTy fields + let basicProps, basicMethods = mkMethodsAndPropertiesForFields (addMethodGeneratedAttrs, addPropertyGeneratedAttrs) (cud.cudReprAccess) attr cud.cudHasHelpers altTy fields let basicCtorMeth = mkILStorageCtor @@ -884,7 +881,7 @@ let convAlternativeDef (addMethodGeneratedAttrs, addPropertyGeneratedAttrs, addP | TailOrNull -> failwith "unreachable" ], altTy, - (basicFields |> List.map (fun fdef -> fdef.Name, fdef.Type) ), + (basicFields |> List.map (fun fdef -> fdef.Name, fdef.FieldType) ), (if cuspec.HasHelpers = AllHelpers then ILMemberAccess.Assembly else cud.cudReprAccess)) |> addMethodGeneratedAttrs @@ -902,7 +899,7 @@ let convAlternativeDef (addMethodGeneratedAttrs, addPropertyGeneratedAttrs, addP mkILCustomAttrs debugAttrs, ILTypeInit.BeforeField) - { altTypeDef with IsSerializable=td.IsSerializable; IsSpecialName=true } + altTypeDef.WithSpecialName(true).WithSerializable(td.IsSerializable) [ altTypeDef ], altDebugTypeDefs @@ -912,8 +909,8 @@ let convAlternativeDef (addMethodGeneratedAttrs, addPropertyGeneratedAttrs, addP baseMakerMeths, baseMakerProps, altUniqObjMeths, typeDefs, altDebugTypeDefs, altNullaryFields -let mkClassUnionDef (addMethodGeneratedAttrs, addPropertyGeneratedAttrs, addPropertyNeverAttrs, addFieldGeneratedAttrs: ILFieldDef -> ILFieldDef, addFieldNeverAttrs: ILFieldDef -> ILFieldDef, mkDebuggerTypeProxyAttribute) ilg tref td cud = - let boxity = match td.tdKind with ILTypeDefKind.ValueType -> ILBoxity.AsValue | _ -> ILBoxity.AsObject +let mkClassUnionDef (addMethodGeneratedAttrs, addPropertyGeneratedAttrs, addPropertyNeverAttrs, addFieldGeneratedAttrs: ILFieldDef -> ILFieldDef, addFieldNeverAttrs: ILFieldDef -> ILFieldDef, mkDebuggerTypeProxyAttribute) ilg tref (td:ILTypeDef) cud = + let boxity = if td.IsStruct then ILBoxity.AsValue else ILBoxity.AsObject let baseTy = mkILFormalNamedTy boxity tref td.GenericParams let cuspec = IlxUnionSpec(IlxUnionRef(boxity,baseTy.TypeRef, cud.cudAlternatives, cud.cudNullPermitted, cud.cudHasHelpers), baseTy.GenericArgs) let info = (td,cud) @@ -937,7 +934,7 @@ let mkClassUnionDef (addMethodGeneratedAttrs, addPropertyGeneratedAttrs, addProp | SingleCase | RuntimeTypes | TailOrNull -> [] | IntegerTag -> [ mkTagFieldId ilg cuspec ] - let isStruct = match td.tdKind with ILTypeDefKind.ValueType -> true | _ -> false + let isStruct = td.IsStruct let selfFields, selfMeths, selfProps = @@ -950,7 +947,7 @@ let mkClassUnionDef (addMethodGeneratedAttrs, addPropertyGeneratedAttrs, addProp if isStruct then None else match td.Extends with | None -> Some ilg.typ_Object.TypeSpec - | Some typ -> Some typ.TypeSpec + | Some ilTy -> Some ilTy.TypeSpec let extraParamsForCtor = if isStruct && takesExtraParams cud.cudAlternatives then @@ -969,7 +966,7 @@ let mkClassUnionDef (addMethodGeneratedAttrs, addPropertyGeneratedAttrs, addProp (if cuspec.HasHelpers = AllHelpers then ILMemberAccess.Assembly else cud.cudReprAccess)) |> addMethodGeneratedAttrs - let props, meths = mkMethodsAndPropertiesForFields (addMethodGeneratedAttrs, addPropertyGeneratedAttrs) cud.cudReprAccess cud.cudWhere cud.cudHasHelpers baseTy alt.FieldDefs + let props, meths = mkMethodsAndPropertiesForFields (addMethodGeneratedAttrs, addPropertyGeneratedAttrs) (cud.cudReprAccess) cud.cudWhere cud.cudHasHelpers baseTy alt.FieldDefs yield (fields,([ctor] @ meths),props) ] |> List.unzip3 |> (fun (a,b,c) -> List.concat a, List.concat b, List.concat c) @@ -977,7 +974,7 @@ let mkClassUnionDef (addMethodGeneratedAttrs, addPropertyGeneratedAttrs, addProp let selfAndTagFields = [ for (fldName,fldTy) in (selfFields @ tagFieldsInObject) do let fdef = mkILInstanceField (fldName,fldTy, None, ILMemberAccess.Assembly) |> addFieldNeverAttrs |> addFieldGeneratedAttrs - yield { fdef with IsInitOnly= (not isStruct && isTotallyImmutable) } ] + yield fdef.WithInitOnly(not isStruct && isTotallyImmutable) ] let ctorMeths = if (List.isEmpty selfFields && List.isEmpty tagFieldsInObject && not (List.isEmpty selfMeths)) @@ -989,7 +986,7 @@ let mkClassUnionDef (addMethodGeneratedAttrs, addPropertyGeneratedAttrs, addProp else [ mkILSimpleStorageCtor (cud.cudWhere, - Some (match td.Extends with None -> ilg.typ_Object | Some typ -> typ).TypeSpec, + Some (match td.Extends with None -> ilg.typ_Object | Some ilTy -> ilTy).TypeSpec, baseTy, [], tagFieldsInObject, @@ -1042,16 +1039,15 @@ let mkClassUnionDef (addMethodGeneratedAttrs, addPropertyGeneratedAttrs, addProp [ mkILNonGenericInstanceMethod("get_" + tagPropertyName,cud.cudHelpersAccess,[],mkILReturn tagFieldType,body) |> addMethodGeneratedAttrs ], - [ { Name=tagPropertyName - IsRTSpecialName=false - IsSpecialName=false - SetMethod=None - GetMethod=Some(mkILMethRef(baseTy.TypeRef,ILCallingConv.Instance,"get_" + tagPropertyName,0,[], tagFieldType)) - CallingConv=ILThisConvention.Instance - Type=tagFieldType - Init=None - Args = [] - CustomAttrs=emptyILCustomAttrs } + [ ILPropertyDef(name = tagPropertyName, + attributes = PropertyAttributes.None, + setMethod = None, + getMethod = Some(mkILMethRef(baseTy.TypeRef,ILCallingConv.Instance,"get_" + tagPropertyName,0,[], tagFieldType)), + callingConv = ILThisConvention.Instance, + propertyType = tagFieldType, + init = None, + args = [], + customAttrs = emptyILCustomAttrs) |> addPropertyGeneratedAttrs |> addPropertyNeverAttrs ] @@ -1069,46 +1065,39 @@ let mkClassUnionDef (addMethodGeneratedAttrs, addPropertyGeneratedAttrs, addProp if tagEnumFields.Length <= 1 then None else - Some - { Name = "Tags" - NestedTypes = emptyILTypeDefs - GenericParams= td.GenericParams - Access = ILTypeDefAccess.Nested cud.cudReprAccess - IsAbstract = true - IsSealed = true - IsSerializable=false - IsComInterop=false - Layout=ILTypeDefLayout.Auto - IsSpecialName=false - Encoding=ILDefaultPInvokeEncoding.Ansi - Implements = [] - Extends= Some ilg.typ_Object - Methods= emptyILMethods - SecurityDecls=emptyILSecurityDecls - HasSecurity=false - Fields=mkILFields tagEnumFields - MethodImpls=emptyILMethodImpls - InitSemantics=ILTypeInit.OnAny - Events=emptyILEvents - Properties=emptyILProperties - CustomAttrs= emptyILCustomAttrs - tdKind = ILTypeDefKind.Enum } + let tdef = + ILTypeDef(name = "Tags", + nestedTypes = emptyILTypeDefs, + genericParams= td.GenericParams, + attributes = enum 0, + layout=ILTypeDefLayout.Auto, + implements = [], + extends= Some ilg.typ_Object, + methods= emptyILMethods, + securityDecls=emptyILSecurityDecls, + fields=mkILFields tagEnumFields, + methodImpls=emptyILMethodImpls, + events=emptyILEvents, + properties=emptyILProperties, + customAttrs= emptyILCustomAttrs) + .WithNestedAccess(cud.cudReprAccess) + .WithAbstract(true) + .WithSealed(true) + .WithImport(false) + .WithEncoding(ILDefaultPInvokeEncoding.Ansi) + .WithHasSecurity(false) + Some tdef let baseTypeDef = - { td with - NestedTypes = mkILTypeDefs (Option.toList enumTypeDef @ altTypeDefs @ altDebugTypeDefs @ td.NestedTypes.AsList) - IsAbstract = isAbstract - IsSealed = altTypeDefs.IsEmpty - IsComInterop=false - Extends= (match td.Extends with None -> Some ilg.typ_Object | _ -> td.Extends) - Methods= mkILMethods (ctorMeths @ baseMethsFromAlt @ selfMeths @ tagMeths @ altUniqObjMeths @ existingMeths) - Fields=mkILFields (selfAndTagFields @ List.map (fun (_,_,_,_,fdef,_) -> fdef) altNullaryFields @ td.Fields.AsList) - InitSemantics=ILTypeInit.BeforeField - Properties=mkILProperties (tagProps @ basePropsFromAlt @ selfProps @ existingProps) - tdKind = ILTypeDefKind.Class } + td.WithInitSemantics(ILTypeInit.BeforeField) + .With(nestedTypes = mkILTypeDefs (Option.toList enumTypeDef @ altTypeDefs @ altDebugTypeDefs @ td.NestedTypes.AsList), + extends= (match td.Extends with None -> Some ilg.typ_Object | _ -> td.Extends), + methods= mkILMethods (ctorMeths @ baseMethsFromAlt @ selfMeths @ tagMeths @ altUniqObjMeths @ existingMeths), + fields=mkILFields (selfAndTagFields @ List.map (fun (_,_,_,_,fdef,_) -> fdef) altNullaryFields @ td.Fields.AsList), + properties=mkILProperties (tagProps @ basePropsFromAlt @ selfProps @ existingProps)) // The .cctor goes on the Cases type since that's where the constant fields for nullary constructors live |> addConstFieldInit - baseTypeDef + baseTypeDef.WithAbstract(isAbstract).WithSealed(altTypeDefs.IsEmpty) diff --git a/src/scripts/VerifyAllTranslations.fsx b/src/scripts/VerifyAllTranslations.fsx new file mode 100644 index 00000000000..24e2d4eebb3 --- /dev/null +++ b/src/scripts/VerifyAllTranslations.fsx @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +// verifies that all translations in all .xlf files have `state="translated"`. + +#r "System.Xml.Linq" + +open System +open System.IO +open System.Xml.Linq + +// usage: fsi VerifyAllTranslations.fsx -- baseDirectory +let baseDirectory = + Environment.GetCommandLineArgs() + |> Seq.skipWhile ((<>) "--") + |> Seq.skip 1 + |> Seq.head + +let hasUntranslatedStrings (xlfFile:string) = + let doc = XDocument.Load(xlfFile) + let untranslatedStates = + doc.Root.Descendants() + |> Seq.filter (fun (elem:XElement) -> elem.Name.LocalName = "target") + |> Seq.map (fun (elem:XElement) -> elem.Attribute(XName.op_Implicit("state"))) + |> Seq.filter (isNull >> not) + |> Seq.map (fun (attr:XAttribute) -> attr.Value) + |> Seq.filter ((<>) "translated") + Seq.length untranslatedStates > 0 + +let filesWithMissingTranslations = + Directory.EnumerateFiles(baseDirectory, "*.xlf", SearchOption.AllDirectories) + |> Seq.filter (fun (file:string) -> file.EndsWith(".en.xlf") |> not) // the english baseline files are never translated + |> Seq.filter hasUntranslatedStrings + |> Seq.toList + +match filesWithMissingTranslations with +| [] -> printfn "All .xlf files have translations assigned." +| _ -> + printfn "The following .xlf files have untranslated strings (state != 'translated'):\n\t%s" (String.Join("\n\t", filesWithMissingTranslations)) + Environment.Exit(1) diff --git a/src/scripts/fssrgen.fsx b/src/scripts/fssrgen.fsx index 0bee9b79e11..32c5b4fa58c 100644 --- a/src/scripts/fssrgen.fsx +++ b/src/scripts/fssrgen.fsx @@ -1,4 +1,7 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. +open System +open System.IO + let PrintErr(filename, line, msg) = printfn "%s(%d): error : %s" filename line msg @@ -229,14 +232,14 @@ let StringBoilerPlate filename = // BEGIN BOILERPLATE static let getCurrentAssembly () = - #if DNXCORE50 || NETSTANDARD1_5 || NETSTANDARD1_6 || NETCOREAPP1_0 + #if FX_RESHAPED_REFLECTION typeof.GetTypeInfo().Assembly #else System.Reflection.Assembly.GetExecutingAssembly() #endif static let getTypeInfo (t: System.Type) = - #if DNXCORE50 || NETSTANDARD1_5 || NETSTANDARD1_6 || NETCOREAPP1_0 + #if FX_RESHAPED_REFLECTION t.GetTypeInfo() #else t @@ -362,8 +365,8 @@ let RunMain(filename, outFilename, outXmlFilenameOpt, projectNameOpt) = allStrs.Add(str,(line,ident)) printfn "fssrgen.fsx: Generating %s" outFilename - use outStream = System.IO.File.Create outFilename - use out = new System.IO.StreamWriter(outStream) + + use out = new System.IO.StringWriter() fprintfn out "// This is a generated file; the original input is '%s'" filename fprintfn out "namespace %s" justfilename if Option.isNone outXmlFilenameOpt then @@ -377,8 +380,8 @@ let RunMain(filename, outFilename, outXmlFilenameOpt, projectNameOpt) = printfn "fssrgen.fsx: Generating resource methods for %s" outFilename // gen each resource method stringInfos |> Seq.iter (fun (lineNum, (optErrNum,ident), str, holes, netFormatString) -> - let formalArgs = new System.Text.StringBuilder() - let actualArgs = new System.Text.StringBuilder() + let formalArgs = System.Text.StringBuilder() + let actualArgs = System.Text.StringBuilder() let firstTime = ref true let n = ref 0 formalArgs.Append "(" |> ignore @@ -420,7 +423,14 @@ let RunMain(filename, outFilename, outXmlFilenameOpt, projectNameOpt) = fprintfn out " ignore(GetString(\"%s\"))" ident ) fprintfn out " ()" // in case there are 0 strings, we need the generated code to parse - // gen to resx + + let outFileNewText = out.ToString() + let nothingChanged = try File.Exists(outFilename) && File.ReadAllText(outFilename) = outFileNewText with _ -> false + if not nothingChanged then + File.WriteAllText(outFilename, outFileNewText, System.Text.Encoding.UTF8) + + if Option.isSome outXmlFilenameOpt then + // gen resx let xd = new System.Xml.XmlDocument() xd.LoadXml(xmlBoilerPlateString) stringInfos |> Seq.iter (fun (lineNum, (optErrNum,ident), str, holes, netFormatString) -> @@ -432,8 +442,16 @@ let RunMain(filename, outFilename, outXmlFilenameOpt, projectNameOpt) = xnc.AppendChild(xd.CreateTextNode netFormatString) |> ignore xd.LastChild.AppendChild xn |> ignore ) - use outXmlStream = System.IO.File.Create outXmlFilenameOpt.Value - xd.Save outXmlStream + let outXmlFileNewText = + use outXmlStream = new System.IO.StringWriter() + xd.Save outXmlStream + outXmlStream.ToString() + let outXmlFile = outXmlFilenameOpt.Value + let nothingChanged = try File.Exists(outXmlFile) && File.ReadAllText(outXmlFile) = outXmlFileNewText with _ -> false + if not nothingChanged then + File.WriteAllText(outXmlFile, outXmlFileNewText, System.Text.Encoding.Unicode) + + printfn "fssrgen.fsx: Done %s" outFilename 0 with e -> diff --git a/src/scripts/fssrgen.targets b/src/scripts/fssrgen.targets index 220a971bbdb..3458dd5bff5 100644 --- a/src/scripts/fssrgen.targets +++ b/src/scripts/fssrgen.targets @@ -13,7 +13,7 @@ Copyright (C) Microsoft Corporation. All Rights Reserved. - ProcessFsSrGen;$(PrepareForBuildDependsOn) + ProcessFsSrGen;$(BuildDependsOn) diff --git a/src/scripts/scriptlib.fsx b/src/scripts/scriptlib.fsx index cc797e30599..f77e5e5578d 100644 --- a/src/scripts/scriptlib.fsx +++ b/src/scripts/scriptlib.fsx @@ -7,6 +7,7 @@ namespace global open System open System.IO +open System.Text open System.Diagnostics [] @@ -36,7 +37,7 @@ module Scripting = #if INTERACTIVE let argv = Microsoft.FSharp.Compiler.Interactive.Settings.fsi.CommandLineArgs |> Seq.skip 1 |> Seq.toArray - let getCmdLineArgOptional switchName = + let getCmdLineArgOptional (switchName: string) = argv |> Array.filter(fun t -> t.StartsWith(switchName)) |> Array.map(fun t -> t.Remove(0, switchName.Length).Trim()) |> Array.tryHead let getCmdLineArg switchName defaultValue = @@ -59,15 +60,15 @@ module Scripting = let (++) a b = Path.Combine(a,b) - let getBasename a = Path.GetFileNameWithoutExtension a - let getFullPath a = Path.GetFullPath a - let getFilename a = Path.GetFileName a - let getDirectoryName a = Path.GetDirectoryName a + let getBasename (a: string) = Path.GetFileNameWithoutExtension(a) + let getFullPath a = Path.GetFullPath(a) + let getFilename (a: string) = Path.GetFileName(a) + let getDirectoryName (a: string) = Path.GetDirectoryName(a) let copyFile source dir = let dest = if not (Directory.Exists dir) then Directory.CreateDirectory dir |>ignore - let result = Path.Combine(dir, Path.GetFileName source) + let result = Path.Combine(dir, getFilename source) result //printfn "Copy %s --> %s" source dest File.Copy(source, dest, true) @@ -95,7 +96,7 @@ module Scripting = let processExePath baseDir exe = if Path.IsPathRooted(exe) then exe else - match Path.GetDirectoryName(exe) with + match getDirectoryName exe with | "" -> exe | _ -> Path.Combine(baseDir,exe) |> Path.GetFullPath @@ -107,7 +108,7 @@ module Scripting = processInfo.UseShellExecute <- false processInfo.WorkingDirectory <- workDir -#if FX_PORTABLE_OR_NETSTANDARD +#if NETSTANDARD1_6 ignore envs // work out what to do about this #else envs @@ -117,15 +118,23 @@ module Scripting = let p = new Process() p.EnableRaisingEvents <- true p.StartInfo <- processInfo + let out = StringBuilder() + let err = StringBuilder() cmdArgs.RedirectOutput|> Option.iter (fun f -> processInfo.RedirectStandardOutput <- true - p.OutputDataReceived.Add (fun ea -> if ea.Data <> null then f ea.Data) + p.OutputDataReceived.Add (fun ea -> + if ea.Data <> null then + out.Append(ea.Data + Environment.NewLine) |> ignore + f ea.Data) ) cmdArgs.RedirectError |> Option.iter (fun f -> processInfo.RedirectStandardError <- true - p.ErrorDataReceived.Add (fun ea -> if ea.Data <> null then f ea.Data) + p.ErrorDataReceived.Add (fun ea -> + if ea.Data <> null then + err.Append(ea.Data + Environment.NewLine) |> ignore + f ea.Data) ) cmdArgs.RedirectInput @@ -151,7 +160,7 @@ module Scripting = match p.ExitCode with | 0 -> Success | err -> - let msg = sprintf "Error running command '%s' with args '%s' in directory '%s'" exePath arguments workDir + let msg = sprintf "Error running command '%s' with args '%s' in directory '%s'.\n---- stdout below --- \n%s\n---- stderr below --- \n%s " exePath arguments workDir (out.ToString()) (err.ToString()) ErrorLevel (msg, err) type OutPipe (writer: TextWriter) = diff --git a/src/utils/CompilerLocationUtils.fs b/src/utils/CompilerLocationUtils.fs index 2cc60b183d9..3499e7e5b21 100644 --- a/src/utils/CompilerLocationUtils.fs +++ b/src/utils/CompilerLocationUtils.fs @@ -12,7 +12,7 @@ open System.Runtime.InteropServices module internal FSharpEnvironment = /// The F# version reported in the banner - let FSharpBannerVersion = "4.1" + let FSharpBannerVersion = "10.2.3 for F# 4.5" let versionOf<'t> = #if FX_RESHAPED_REFLECTION @@ -210,41 +210,20 @@ module internal FSharpEnvironment = let result = tryAppConfig "fsharp-compiler-location" match result with | Some _ -> result - | None -> - + | None -> + let safeExists f = (try File.Exists(f) with _ -> false) // Look in the probePoint if given, e.g. look for a compiler alongside of FSharp.Build.dll match probePoint with | Some p when safeExists (Path.Combine(p,"FSharp.Core.dll")) -> Some p | _ -> - - // On windows the location of the compiler is via a registry key - - // Note: If the keys below change, be sure to update code in: - // Property pages (ApplicationPropPage.vb) - - let key1 = @"Software\Microsoft\FSharp\4.1\Runtime\v4.0" - let key2 = @"Software\Microsoft\FSharp\4.0\Runtime\v4.0" - - let result = tryRegKey key1 - match result with - | Some _ -> result - | None -> - let result = tryRegKey key2 - match result with - | Some _ -> result - | None -> - - // On Unix we let you set FSHARP_COMPILER_BIN. I've rarely seen this used and its not documented in the install instructions. - let result = - let var = System.Environment.GetEnvironmentVariable("FSHARP_COMPILER_BIN") - if String.IsNullOrEmpty(var) then None - else Some(var) - match result with - | Some _ -> result - | None -> - // For the prototype compiler, we can just use the current domain - tryCurrentDomain() + // We let you set FSHARP_COMPILER_BIN. I've rarely seen this used and its not documented in the install instructions. + let result = System.Environment.GetEnvironmentVariable("FSHARP_COMPILER_BIN") + if not (String.IsNullOrEmpty(result)) then + Some result + else + // For the prototype compiler, we can just use the current domain + tryCurrentDomain() with e -> System.Diagnostics.Debug.Assert(false, "Error while determining default location of F# compiler") None diff --git a/src/utils/HashMultiMap.fs b/src/utils/HashMultiMap.fs index 134597efc6a..693c500566a 100644 --- a/src/utils/HashMultiMap.fs +++ b/src/utils/HashMultiMap.fs @@ -10,10 +10,13 @@ open Microsoft.FSharp.Collections // one entry. So use two hash tables: one for the main entries and one for the overflow. [] type internal HashMultiMap<'Key,'Value>(n: int, hasheq: IEqualityComparer<'Key>) = + let firstEntries = Dictionary<_,_>(n,hasheq) + let rest = Dictionary<_,_>(3,hasheq) new (hasheq : IEqualityComparer<'Key>) = HashMultiMap<'Key,'Value>(11, hasheq) + new (seq : seq<'Key * 'Value>, hasheq : IEqualityComparer<'Key>) as x = new HashMultiMap<'Key,'Value>(11, hasheq) then seq |> Seq.iter (fun (k,v) -> x.Add(k,v)) @@ -35,7 +38,9 @@ type internal HashMultiMap<'Key,'Value>(n: int, hasheq: IEqualityComparer<'Key>) rest.Clear() member x.FirstEntries = firstEntries + member x.Rest = rest + member x.Copy() = let res = HashMultiMap<'Key,'Value>(firstEntries.Count,firstEntries.Comparer) for kvp in firstEntries do @@ -114,6 +119,7 @@ type internal HashMultiMap<'Key,'Value>(n: int, hasheq: IEqualityComparer<'Key>) member x.Count = firstEntries.Count interface IEnumerable> with + member s.GetEnumerator() = let elems = List<_>(firstEntries.Count + rest.Count) for kvp in firstEntries do @@ -123,34 +129,51 @@ type internal HashMultiMap<'Key,'Value>(n: int, hasheq: IEqualityComparer<'Key>) (elems.GetEnumerator() :> IEnumerator<_>) interface System.Collections.IEnumerable with + member s.GetEnumerator() = ((s :> seq<_>).GetEnumerator() :> System.Collections.IEnumerator) interface IDictionary<'Key, 'Value> with + member s.Item with get x = s.[x] and set x v = s.[x] <- v member s.Keys = ([| for kvp in s -> kvp.Key |] :> ICollection<'Key>) + member s.Values = ([| for kvp in s -> kvp.Value |] :> ICollection<'Value>) + member s.Add(k,v) = s.[k] <- v + member s.ContainsKey(k) = s.ContainsKey(k) - member s.TryGetValue(k,r) = if s.ContainsKey(k) then (r <- s.[k]; true) else false + + member s.TryGetValue(k,r) = match s.TryFind k with Some v-> (r <- v; true) | _ -> false + member s.Remove(k:'Key) = let res = s.ContainsKey(k) in s.Remove(k); res interface ICollection> with + member s.Add(x) = s.[x.Key] <- x.Value + member s.Clear() = s.Clear() + member s.Remove(x) = - let res = s.ContainsKey(x.Key) - if res && Unchecked.equals s.[x.Key] x.Value then - s.Remove(x.Key); - res - member s.Contains(x) = - s.ContainsKey(x.Key) && - Unchecked.equals s.[x.Key] x.Value + match s.TryFind x.Key with + | Some v -> + if Unchecked.equals v x.Value then + s.Remove(x.Key) + true + | _ -> false + + member s.Contains(x) = + match s.TryFind x.Key with + | Some v when Unchecked.equals v x.Value -> true + | _ -> false + member s.CopyTo(arr,arrIndex) = s |> Seq.iteri (fun j x -> arr.[arrIndex+j] <- x) + member s.IsReadOnly = false + member s.Count = s.Count diff --git a/src/utils/ResizeArray.fs b/src/utils/ResizeArray.fs index b8720222dea..66613044349 100644 --- a/src/utils/ResizeArray.fs +++ b/src/utils/ResizeArray.fs @@ -10,9 +10,13 @@ open Microsoft.FSharp.Core.OptimizedClosures module internal ResizeArray = let length (arr: ResizeArray<'T>) = arr.Count + let get (arr: ResizeArray<'T>) (n: int) = arr.[n] + let set (arr: ResizeArray<'T>) (n: int) (x:'T) = arr.[n] <- x + let create (n: int) x = new ResizeArray<_> (seq { for _ in 1 .. n -> x }) + let init (n: int) (f: int -> 'T) = new ResizeArray<_> (seq { for i in 0 .. n-1 -> f i }) let blit (arr1: ResizeArray<'T>) start1 (arr2: ResizeArray<'T>) start2 len = @@ -25,6 +29,7 @@ module internal ResizeArray = arr2.[start2+i] <- arr1.[start1 + i] let concat (arrs: ResizeArray<'T> list) = new ResizeArray<_> (seq { for arr in arrs do for x in arr do yield x }) + let append (arr1: ResizeArray<'T>) (arr2: ResizeArray<'T>) = concat [arr1; arr2] let sub (arr: ResizeArray<'T>) start len = @@ -176,10 +181,13 @@ module internal ResizeArray = res let toArray (arr: ResizeArray<'T>) = arr.ToArray() + let ofArray (arr: 'T[]) = new ResizeArray<_>(arr) + let toSeq (arr: ResizeArray<'T>) = Seq.readonly arr let sort f (arr: ResizeArray<'T>) = arr.Sort (System.Comparison(f)) + let sortBy f (arr: ResizeArray<'T>) = arr.Sort (System.Comparison(fun x y -> compare (f x) (f y))) diff --git a/src/utils/TaggedCollections.fsi b/src/utils/TaggedCollections.fsi index ba99df33762..c877cbe7eb5 100644 --- a/src/utils/TaggedCollections.fsi +++ b/src/utils/TaggedCollections.fsi @@ -107,10 +107,13 @@ namespace Internal.Utilities.Collections.Tagged member ToArray: unit -> 'T array interface ICollection<'T> + interface IEnumerable<'T> + interface System.Collections.IEnumerable interface System.IComparable + override Equals : obj -> bool type internal Set<'T> = Set<'T, IComparer<'T>> @@ -128,14 +131,13 @@ namespace Internal.Utilities.Collections.Tagged /// Immutable maps. A constraint tag carries information about the class of key-comparers being used. [] type internal Map<'Key,'Value,'ComparerTag> when 'ComparerTag :> IComparer<'Key> = + /// Return a new map with the binding added to the given map. member Add: 'Key * 'Value -> Map<'Key,'Value,'ComparerTag> /// Return True if there are no bindings in the map. member IsEmpty: bool - //member Comparer : 'ComparerTag - /// The empty map, and use the given comparer comparison function for all operations associated /// with any maps built from this map. static member Empty: 'ComparerTag -> Map<'Key,'Value,'ComparerTag> @@ -213,7 +215,9 @@ namespace Internal.Utilities.Collections.Tagged interface IEnumerable> interface System.Collections.IEnumerable + interface System.IComparable + override Equals : obj -> bool type internal Map<'Key,'Value> = Map<'Key, 'Value, IComparer<'Key>> diff --git a/src/utils/filename.fs b/src/utils/filename.fs index 93a8c96994d..35d6d5a769a 100644 --- a/src/utils/filename.fs +++ b/src/utils/filename.fs @@ -14,7 +14,7 @@ let checkPathForIllegalChars = if chars.Contains c then raise(IllegalFileNameChar(path, c))) // Case sensitive (original behaviour preserved). -let checkSuffix (x:string) (y:string) = x.EndsWith(y,System.StringComparison.Ordinal) +let checkSuffix (x:string) (y:string) = x.EndsWithOrdinal(y) let hasExtensionWithValidate (validate:bool) (s:string) = if validate then (checkPathForIllegalChars s) |> ignore diff --git a/src/utils/prim-lexing.fs b/src/utils/prim-lexing.fs index 1d497641c0b..531e3e5f183 100644 --- a/src/utils/prim-lexing.fs +++ b/src/utils/prim-lexing.fs @@ -145,7 +145,6 @@ namespace Internal.Utilities.Text.Lexing buffer <- repl - // A full type signature is required on this method because it is used at more specific types within its own scope static member FromFunction (f : 'Char[] * int * int -> int) : LexBuffer<'Char> = let extension= Array.zeroCreate 4096 let filler (lexBuffer: LexBuffer<'Char>) = @@ -155,15 +154,20 @@ namespace Internal.Utilities.Text.Lexing lexBuffer.BufferMaxScanLength <- lexBuffer.BufferScanLength + n new LexBuffer<'Char>(filler) - // A full type signature is required on this method because it is used at more specific types within its own scope - static member FromArray (s: 'Char[]) : LexBuffer<'Char> = + // Important: This method takes ownership of the array + static member FromArrayNoCopy (buffer: 'Char[]) : LexBuffer<'Char> = let lexBuffer = new LexBuffer<'Char>(fun _ -> ()) - let buffer = Array.copy s - lexBuffer.Buffer <- buffer; - lexBuffer.BufferMaxScanLength <- buffer.Length; + lexBuffer.Buffer <- buffer + lexBuffer.BufferMaxScanLength <- buffer.Length lexBuffer - static member FromChars (arr:char[]) = LexBuffer.FromArray arr + // Important: this method does copy the array + static member FromArray (s: 'Char[]) : LexBuffer<'Char> = + let buffer = Array.copy s + LexBuffer<'Char>.FromArrayNoCopy buffer + + // Important: This method takes ownership of the array + static member FromChars (arr:char[]) = LexBuffer.FromArrayNoCopy arr module GenericImplFragments = let startInterpret(lexBuffer:LexBuffer)= diff --git a/src/utils/prim-lexing.fsi b/src/utils/prim-lexing.fsi index 19e78d57ef6..49eb2e6bc40 100644 --- a/src/utils/prim-lexing.fsi +++ b/src/utils/prim-lexing.fsi @@ -65,6 +65,7 @@ type internal LexBuffer<'Char> = member IsPastEndOfStream: bool with get,set /// Create a lex buffer suitable for Unicode lexing that reads characters from the given array. + /// Important: does take ownership of the array. static member FromChars: char[] -> LexBuffer /// Create a lex buffer that reads character or byte inputs by using the given function. static member FromFunction: ('Char[] * int * int -> int) -> LexBuffer<'Char> diff --git a/src/utils/reshapedmsbuild.fs b/src/utils/reshapedmsbuild.fs index f52d0a61f3f..925b904e3e2 100644 --- a/src/utils/reshapedmsbuild.fs +++ b/src/utils/reshapedmsbuild.fs @@ -218,8 +218,7 @@ module internal ToolLocationHelper = let dotNetFrameworkFolderPrefix = dotNetFrameworkVersionFolderPrefix let frameworkName = FrameworkName(dotNetFrameworkIdentifier, version) -#if FX_NO_WIN_REGISTRY -#else +#if !FX_NO_WIN_REGISTRY let findRegistryValueUnderKey registryBaseKeyName registryKeyName registryView = try use baseKey = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, registryView) diff --git a/src/utils/reshapedreflection.fs b/src/utils/reshapedreflection.fs index 19be659bfd6..b1f0aeca8d4 100644 --- a/src/utils/reshapedreflection.fs +++ b/src/utils/reshapedreflection.fs @@ -24,24 +24,10 @@ module internal XmlAdapters = #if FX_RESHAPED_REFLECTION module internal ReflectionAdapters = open System -#if FX_RESHAPED_REFLECTION_CORECLR - open System.Runtime.Loader -#endif open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators open Microsoft.FSharp.Collections open PrimReflectionAdapters -#if FX_NO_SYSTEM_BINDINGFLAGS - [] - type BindingFlags = - | DeclaredOnly = 2 - | Instance = 4 - | Static = 8 - | Public = 16 - | NonPublic = 32 - | InvokeMethod = 0x100 -#endif - let inline hasFlag (flag : BindingFlags) f = (f &&& flag) = flag let isDeclaredFlag f = hasFlag BindingFlags.DeclaredOnly f let isPublicFlag f = hasFlag BindingFlags.Public f @@ -49,23 +35,6 @@ module internal ReflectionAdapters = let isInstanceFlag f = hasFlag BindingFlags.Instance f let isNonPublicFlag f = hasFlag BindingFlags.NonPublic f -#if FX_NO_TYPECODE - [] - type TypeCode = - | Int32 = 0 - | Int64 = 1 - | Byte = 2 - | SByte = 3 - | Int16 = 4 - | UInt16 = 5 - | UInt32 = 6 - | UInt64 = 7 - | Single = 8 - | Double = 9 - | Decimal = 10 - | Object = 11 -#endif - let isAcceptable bindingFlags isStatic isPublic = // 1. check if member kind (static\instance) was specified in flags ((isStaticFlag bindingFlags && isStatic) || (isInstanceFlag bindingFlags && not isStatic)) && @@ -112,11 +81,13 @@ module internal ReflectionAdapters = (if isDeclaredFlag bindingFlags then this.GetTypeInfo().DeclaredMethods else this.GetRuntimeMethods()) |> Seq.filter (fun m -> isAcceptable bindingFlags m.IsStatic m.IsPublic) |> Seq.toArray + // use different sources based on Declared flag member this.GetFields(bindingFlags) = (if isDeclaredFlag bindingFlags then this.GetTypeInfo().DeclaredFields else this.GetRuntimeFields()) |> Seq.filter (fun f -> isAcceptable bindingFlags f.IsStatic f.IsPublic) |> Seq.toArray + // use different sources based on Declared flag member this.GetProperties(?bindingFlags) = let bindingFlags = defaultArg bindingFlags publicFlags @@ -127,7 +98,7 @@ module internal ReflectionAdapters = else isAcceptable bindingFlags mi.IsStatic mi.IsPublic ) |> Seq.toArray -#if FX_RESHAPED_REFLECTION_CORECLR + member this.GetEvents(?bindingFlags) = let bindingFlags = defaultArg bindingFlags publicFlags (if isDeclaredFlag bindingFlags then this.GetTypeInfo().DeclaredEvents else this.GetRuntimeEvents()) @@ -137,26 +108,31 @@ module internal ReflectionAdapters = else isAcceptable bindingFlags m.IsStatic m.IsPublic ) |> Seq.toArray + member this.GetEvent(name, ?bindingFlags) = let bindingFlags = defaultArg bindingFlags publicFlags this.GetEvents(bindingFlags) |> Array.filter (fun ei -> ei.Name = name) |> commit -#endif + member this.GetConstructor(bindingFlags, _binder, argsT:Type[], _parameterModifiers) = this.GetConstructor(bindingFlags,argsT) + member this.GetMethod(name, ?bindingFlags) = let bindingFlags = defaultArg bindingFlags publicFlags this.GetMethods(bindingFlags) |> Array.filter(fun m -> m.Name = name) |> commit + member this.GetMethod(name, _bindingFlags, _binder, argsT:Type[], _parameterModifiers) = this.GetMethod(name, argsT) + // use different sources based on Declared flag member this.GetProperty(name, bindingFlags) = this.GetProperties(bindingFlags) |> Array.filter (fun pi -> pi.Name = name) |> commit + member this.GetMethod(methodName, args:Type[], ?bindingFlags) = let bindingFlags = defaultArg bindingFlags publicFlags let compareSequences parms args = @@ -164,6 +140,7 @@ module internal ReflectionAdapters = this.GetMethods(bindingFlags) |> Array.filter(fun m -> m.Name = methodName && (compareSequences (m.GetParameters() |> Seq.map(fun x -> x.ParameterType)) args) = 0) |> commit + member this.GetNestedTypes(?bindingFlags) = let bindingFlags = defaultArg bindingFlags publicFlags this.GetTypeInfo().DeclaredNestedTypes @@ -172,26 +149,35 @@ module internal ReflectionAdapters = (isNonPublicFlag bindingFlags && (nestedTy.IsNestedPrivate || nestedTy.IsNestedFamily || nestedTy.IsNestedAssembly || nestedTy.IsNestedFamORAssem || nestedTy.IsNestedFamANDAssem))) |> Seq.map (fun ti -> ti.AsType()) |> Seq.toArray + member this.GetEnumUnderlyingType() = Enum.GetUnderlyingType(this) -#if FX_RESHAPED_REFLECTION_CORECLR + member this.InvokeMember(memberName, bindingFlags, _binder, target:obj, arguments:obj[], _cultureInfo) = let m = this.GetMethod(memberName, (arguments |> Seq.map(fun x -> x.GetType()) |> Seq.toArray), bindingFlags) match m with | null -> raise <| System.MissingMethodException(String.Format("Method '{0}.{1}' not found.", this.FullName, memberName)) | _ -> m.Invoke(target, arguments) -#endif + member this.IsGenericType = this.GetTypeInfo().IsGenericType + member this.IsGenericTypeDefinition = this.GetTypeInfo().IsGenericTypeDefinition + member this.GetGenericArguments() = if this.IsGenericTypeDefinition then this.GetTypeInfo().GenericTypeParameters elif this.IsGenericType then this.GenericTypeArguments else [||] + member this.IsInterface = this.GetTypeInfo().IsInterface + member this.IsPublic = this.GetTypeInfo().IsPublic + member this.IsNestedPublic = this.GetTypeInfo().IsNestedPublic + member this.IsClass = this.GetTypeInfo().IsClass + member this.IsValueType = this.GetTypeInfo().IsValueType + member this.IsSealed = this.GetTypeInfo().IsSealed member this.BaseType = this.GetTypeInfo().BaseType @@ -221,15 +207,22 @@ module internal ReflectionAdapters = // MSDN: returns an array of Type objects representing all the interfaces implemented or inherited by the current Type. member this.GetInterfaces() = this.GetTypeInfo().ImplementedInterfaces |> Seq.toArray + member this.GetMethods() = this.GetMethods(publicFlags) + member this.Assembly = this.GetTypeInfo().Assembly + member this.IsSubclassOf(otherTy : Type) = this.GetTypeInfo().IsSubclassOf(otherTy) + member this.IsEnum = this.GetTypeInfo().IsEnum; + member this.GetField(name, bindingFlags) = this.GetFields(bindingFlags) |> Array.filter (fun fi -> fi.Name = name) |> commit + member this.GetField(name) = RuntimeReflectionExtensions.GetRuntimeField(this, name) + member this.GetProperty(name, propertyType, parameterTypes : Type[]) = this.GetProperties() |> Array.filter (fun pi -> @@ -266,10 +259,13 @@ module internal ReflectionAdapters = s.GetHashCode() type System.Reflection.EventInfo with + member this.GetAddMethod() = this.AddMethod + member this.GetRemoveMethod() = this.RemoveMethod + member this.MetadataToken = // TODO: is this an adequate replacement for MetadataToken let s = String.Format("{0},{0}", this.DeclaringType.ToString(), this.ToString()) @@ -278,6 +274,7 @@ module internal ReflectionAdapters = type System.Reflection.FieldInfo with member this.GetRawConstantValue() = this.GetValue(null) + member this.MetadataToken = // TODO: is this an adequate replacement for MetadataToken let s = String.Format("{0},{0}", this.DeclaringType.ToString(), this.ToString()) @@ -285,6 +282,7 @@ module internal ReflectionAdapters = type System.Reflection.MemberInfo with member this.GetCustomAttributes(attrTy, inherits) : obj[] = downcast box(CustomAttributeExtensions.GetCustomAttributes(this, attrTy, inherits) |> Seq.toArray) + // TODO: is this an adequate replacement for MetadataToken member this.MetadataToken = // TODO: is this an adequate replacement for MetadataToken @@ -292,16 +290,21 @@ module internal ReflectionAdapters = s.GetHashCode() type System.Reflection.MethodInfo with + member this.GetCustomAttributes(inherits : bool) : obj[] = downcast box(CustomAttributeExtensions.GetCustomAttributes(this, inherits) |> Seq.toArray) + member this.Invoke(obj, _bindingFlags, _binder, args, _ci) = this.Invoke(obj, args) + member this.MetadataToken = // TODO: is this an adequate replacement for MetadataToken let s = String.Format("{0},{0}", this.DeclaringType.ToString(), this.ToString()) s.GetHashCode() type System.Reflection.ParameterInfo with + member this.RawDefaultValue = this.DefaultValue + member this.MetadataToken = // TODO: is this an adequate replacement for MetadataToken // I really do not understand why: sprintf "%s,%s" (this.ReflectedType.ToString()) (this.ToString()) did not work @@ -309,69 +312,50 @@ module internal ReflectionAdapters = s.GetHashCode() type System.Reflection.PropertyInfo with + member this.GetGetMethod(nonPublic) = let mi = this.GetMethod if canUseAccessor mi nonPublic then mi else null + member this.GetSetMethod(nonPublic) = let mi = this.SetMethod if canUseAccessor mi nonPublic then mi else null - member this.GetGetMethod() = this.GetMethod - member this.GetSetMethod() = this.SetMethod - -#if FX_RESHAPED_REFLECTION_CORECLR - type CustomAssemblyResolver() = - inherit AssemblyLoadContext() - override this.Load (assemblyName:AssemblyName):Assembly = - this.LoadFromAssemblyName(assemblyName) + member this.GetGetMethod() = this.GetMethod - let globalLoadContext = - // This is an unfortunate temporary fix!!!! - // ======================================== - // We need to run fsi tests on a very old version of the corclr because of an unfortunate test framework - // This hack detects that, and uses the old code. - // On slightly newer code AssemblyLoadContext.Default is the way to go. - match Seq.tryHead (typeof.GetTypeInfo().Assembly.GetCustomAttributes()) with - | Some a when a.Version = "4.6.24410.01" -> new CustomAssemblyResolver() :> AssemblyLoadContext - | _ -> AssemblyLoadContext.Default + member this.GetSetMethod() = this.SetMethod -#endif type System.Reflection.Assembly with + member this.GetTypes() = this.DefinedTypes |> Seq.map (fun ti -> ti.AsType()) |> Seq.toArray + member this.GetExportedTypes() = this.DefinedTypes |> Seq.filter(fun ti -> ti.IsPublic) |> Seq.map (fun ti -> ti.AsType()) |> Seq.toArray + member this.Location = this.ManifestModule.FullyQualifiedName -#if FX_RESHAPED_REFLECTION_CORECLR - static member LoadFrom(filename:string) = - globalLoadContext.LoadFromAssemblyPath(filename) - - static member UnsafeLoadFrom(filename:string) = - globalLoadContext.LoadFromAssemblyPath(filename) - - type System.Reflection.AssemblyName with - static member GetAssemblyName(path) = - System.Runtime.Loader.AssemblyLoadContext.GetAssemblyName(path) -#endif - type System.Delegate with + static member CreateDelegate(delegateType, methodInfo : MethodInfo) = methodInfo.CreateDelegate(delegateType) + static member CreateDelegate(delegateType, obj : obj, methodInfo : MethodInfo) = methodInfo.CreateDelegate(delegateType, obj) type System.Object with member this.GetPropertyValue(propName) = this.GetType().GetProperty(propName, BindingFlags.Public).GetValue(this, null) + member this.SetPropertyValue(propName, propValue) = this.GetType().GetProperty(propName, BindingFlags.Public).SetValue(this, propValue, null) + member this.GetMethod(methodName, argTypes) = this.GetType().GetMethod(methodName, argTypes, BindingFlags.Public) @@ -384,4 +368,34 @@ module internal ReflectionAdapters = let s = this.FullyQualifiedName s.GetHashCode() +#if COMPILER // This part includes global state in globalLoadContext. Only include this support "once", i.e. when compiling FSharp.Compiler.Private.dll, FSharp.Compiler.Service.dll, fsc-proto.exe + + type CustomAssemblyResolver() = + inherit System.Runtime.Loader.AssemblyLoadContext() + override this.Load (assemblyName:AssemblyName):Assembly = + this.LoadFromAssemblyName(assemblyName) + + let globalLoadContext = + // This is an unfortunate temporary fix!!!! + // ======================================== + // We need to run fsi tests on a very old version of the corclr because of an unfortunate test framework + // This hack detects that, and uses the old code. + // On slightly newer code AssemblyLoadContext.Default is the way to go. + match Seq.tryHead (typeof.GetTypeInfo().Assembly.GetCustomAttributes()) with + | Some a when a.Version = "4.6.24410.01" -> new CustomAssemblyResolver() :> System.Runtime.Loader.AssemblyLoadContext + | _ -> System.Runtime.Loader.AssemblyLoadContext.Default + + type System.Reflection.Assembly with + static member LoadFrom(filename:string) = + globalLoadContext.LoadFromAssemblyPath(filename) + + static member UnsafeLoadFrom(filename:string) = + globalLoadContext.LoadFromAssemblyPath(filename) + + type System.Reflection.AssemblyName with + static member GetAssemblyName(path) = + System.Runtime.Loader.AssemblyLoadContext.GetAssemblyName(path) + +#endif + #endif diff --git a/src/utils/sformat.fs b/src/utils/sformat.fs index 849ff5326fe..d2d35117771 100644 --- a/src/utils/sformat.fs +++ b/src/utils/sformat.fs @@ -370,7 +370,7 @@ namespace Microsoft.FSharp.Text.StructuredPrintfImpl | UnitType | ObjectType of Type - let isNamedType(typ:Type) = not (typ.IsArray || typ.IsByRef || typ.IsPointer) + let isNamedType (ty:Type) = not (ty.IsArray || ty.IsByRef || ty.IsPointer) let equivHeadTypes (ty1:Type) (ty2:Type) = isNamedType(ty1) && if ty1.IsGenericType then @@ -381,11 +381,11 @@ namespace Microsoft.FSharp.Text.StructuredPrintfImpl let option = typedefof let func = typedefof<(obj -> obj)> - let isOptionTy typ = equivHeadTypes typ (typeof) - let isUnitType typ = equivHeadTypes typ (typeof) - let isListType typ = - FSharpType.IsUnion typ && - (let cases = FSharpType.GetUnionCases typ + let isOptionTy ty = equivHeadTypes ty (typeof) + let isUnitType ty = equivHeadTypes ty (typeof) + let isListType ty = + FSharpType.IsUnion ty && + (let cases = FSharpType.GetUnionCases ty cases.Length > 0 && equivHeadTypes (typedefof>) cases.[0].DeclaringType) [] @@ -463,19 +463,19 @@ namespace Microsoft.FSharp.Text.StructuredPrintfImpl // statically-known type information to aid in the // analysis of null values. - let GetValueInfo bindingFlags (x : 'a, typ : Type) (* x could be null *) = + let GetValueInfo bindingFlags (x : 'a, ty : Type) (* x could be null *) = let obj = (box x) match obj with | null -> let isNullaryUnion = - match typ.GetCustomAttributes(typeof, false) with + match ty.GetCustomAttributes(typeof, false) with | [|:? CompilationRepresentationAttribute as attr|] -> (attr.Flags &&& CompilationRepresentationFlags.UseNullAsTrueValue) = CompilationRepresentationFlags.UseNullAsTrueValue | _ -> false if isNullaryUnion then - let nullaryCase = FSharpType.GetUnionCases typ |> Array.filter (fun uc -> uc.GetFields().Length = 0) |> Array.item 0 + let nullaryCase = FSharpType.GetUnionCases ty |> Array.filter (fun uc -> uc.GetFields().Length = 0) |> Array.item 0 ConstructorValue(nullaryCase.Name, []) - elif isUnitType typ then UnitValue + elif isUnitType ty then UnitValue else ObjectValue(obj) | _ -> GetValueInfoOfObject bindingFlags (obj) @@ -488,22 +488,15 @@ namespace Microsoft.FSharp.Text.StructuredPrintfImpl let string_of_int (i:int) = i.ToString() - let typeUsesSystemObjectToString (typ:System.Type) = -#if FX_PORTABLE_OR_NETSTANDARD + let typeUsesSystemObjectToString (ty:System.Type) = try #if FX_RESHAPED_REFLECTION - let methInfo = typ.GetRuntimeMethod("ToString",[| |]) - methInfo.DeclaringType = typeof + let methInfo = ty.GetRuntimeMethod("ToString",[| |]) #else - let methInfo = typ.GetMethod("ToString",[| |]) - methInfo.DeclaringType = typeof + let methInfo = ty.GetMethod("ToString",BindingFlags.Public ||| BindingFlags.Instance,null,[| |],null) #endif - with e -> false -#else - try let methInfo = typ.GetMethod("ToString",BindingFlags.Public ||| BindingFlags.Instance,null,[| |],null) methInfo.DeclaringType = typeof with e -> false -#endif /// If "str" ends with "ending" then remove it from "str", otherwise no change. let trimEnding (ending:string) (str:string) = if str.EndsWith(ending,StringComparison.Ordinal) then @@ -740,18 +733,18 @@ namespace Microsoft.FSharp.Text.StructuredPrintfImpl // pprinter: using general-purpose reflection... // -------------------------------------------------------------------- - let getValueInfo bindingFlags (x:'a, typ:Type) = Value.GetValueInfo bindingFlags (x, typ) + let getValueInfo bindingFlags (x:'a, ty:Type) = Value.GetValueInfo bindingFlags (x, ty) let unpackCons recd = match recd with | [(_,h);(_,t)] -> (h,t) | _ -> failwith "unpackCons" - let getListValueInfo bindingFlags (x:obj, typ:Type) = + let getListValueInfo bindingFlags (x:obj, ty:Type) = match x with | null -> None | _ -> - match getValueInfo bindingFlags (x, typ) with + match getValueInfo bindingFlags (x, ty) with | ConstructorValue ("Cons",recd) -> Some (unpackCons recd) | ConstructorValue ("Empty",[]) -> None | _ -> failwith "List value had unexpected ValueInfo" @@ -805,20 +798,13 @@ namespace Microsoft.FSharp.Text.StructuredPrintfImpl // -------------------------------------------------------------------- let getProperty (ty: Type) (obj: obj) name = -#if FX_PORTABLE_OR_NETSTANDARD +#if FX_RESHAPED_REFLECTION let prop = ty.GetProperty(name, (BindingFlags.Instance ||| BindingFlags.Public ||| BindingFlags.NonPublic)) if not (isNull prop) then prop.GetValue(obj,[||]) -#if FX_NO_MISSINGMETHODEXCEPTION - // Profile 7, 47, 78 and 259 raise MissingMemberException - else - let msg = System.String.Concat([| "Method '"; ty.FullName; "."; name; "' not found." |]) - raise (System.MissingMemberException(msg)) -#else // Others raise MissingMethodException else let msg = System.String.Concat([| "Method '"; ty.FullName; "."; name; "' not found." |]) raise (System.MissingMethodException(msg)) -#endif #else ty.InvokeMember(name, (BindingFlags.GetProperty ||| BindingFlags.Instance ||| BindingFlags.Public ||| BindingFlags.NonPublic), null, obj, [| |],CultureInfo.InvariantCulture) #endif @@ -879,10 +865,10 @@ namespace Microsoft.FSharp.Text.StructuredPrintfImpl | ShowTopLevelBinding // polymorphic and inner recursion limitations prevent us defining polyL in the recursive loop - let polyL bindingFlags (objL: ShowMode -> int -> Precedence -> ValueInfo -> obj -> Layout) showMode i prec (x:'a ,typ : Type) (* x could be null *) = - objL showMode i prec (getValueInfo bindingFlags (x, typ)) (box x) + let polyL bindingFlags (objL: ShowMode -> int -> Precedence -> ValueInfo -> obj -> Layout) showMode i prec (x:'a ,ty : Type) (* x could be null *) = + objL showMode i prec (getValueInfo bindingFlags (x, ty)) (box x) - let anyL showMode bindingFlags (opts:FormatOptions) (x:'a, typ:Type) = + let anyL showMode bindingFlags (opts:FormatOptions) (x:'a, ty:Type) = // showMode = ShowTopLevelBinding on the outermost expression when called from fsi.exe, // This allows certain outputs, e.g. objects that would print as to be suppressed, etc. See 4343. // Calls to layout proper sub-objects should pass showMode = ShowAll. @@ -899,8 +885,8 @@ namespace Microsoft.FSharp.Text.StructuredPrintfImpl let stopShort _ = exceededPrintSize() // for unfoldL // Recursive descent - let rec objL depthLim prec (x:obj, typ:Type) = polyL bindingFlags objWithReprL ShowAll depthLim prec (x, typ) // showMode for inner expr - and sameObjL depthLim prec (x:obj, typ:Type) = polyL bindingFlags objWithReprL showMode depthLim prec (x, typ) // showMode preserved + let rec objL depthLim prec (x:obj, ty:Type) = polyL bindingFlags objWithReprL ShowAll depthLim prec (x, ty) // showMode for inner expr + and sameObjL depthLim prec (x:obj, ty:Type) = polyL bindingFlags objWithReprL showMode depthLim prec (x, ty) // showMode preserved and objWithReprL showMode depthLim prec (info:ValueInfo) (x:obj) (* x could be null *) = try @@ -1051,9 +1037,9 @@ namespace Microsoft.FSharp.Text.StructuredPrintfImpl bracketIfL (prec <= Precedence.BracketIfTuple) basicL | RecordValue items -> - let itemL (name,x,typ) = + let itemL (name,x,ty) = countNodes 1 // record labels are counted as nodes. [REVIEW: discussion under 4090]. - (tagRecordField name,objL depthLim Precedence.BracketIfTuple (x, typ)) + (tagRecordField name,objL depthLim Precedence.BracketIfTuple (x, ty)) makeRecordL (List.map itemL items) | ConstructorValue (constr,recd) when // x is List. Note: "null" is never a valid list value. @@ -1166,7 +1152,7 @@ namespace Microsoft.FSharp.Text.StructuredPrintfImpl let word = "seq" let it = ie.GetEnumerator() let ty = ie.GetType().GetInterfaces() |> Array.filter (fun ty -> ty.IsGenericType && ty.Name = "IEnumerable`1") |> Array.tryItem 0 - let ty = Option.map (fun (typ:Type) -> typ.GetGenericArguments().[0]) ty + let ty = Option.map (fun (ty:Type) -> ty.GetGenericArguments().[0]) ty try let itemLs = boundedUnfoldL (objL depthLim Precedence.BracketIfTuple) (fun () -> if it.MoveNext() then Some((it.Current, match ty with | None -> it.Current.GetType() | Some ty -> ty),()) else None) stopShort () (1+opts.PrintLength/30) (wordL (tagClass word) --- makeListL itemLs) |> bracketIfL (prec <= Precedence.BracketIfTupleOrNotAtomic) @@ -1189,7 +1175,7 @@ namespace Microsoft.FSharp.Text.StructuredPrintfImpl // If the leafFormatter was directly here, then layout leaves could store strings. match obj with | _ when opts.ShowProperties -> -#if FX_PORTABLE_OR_NETSTANDARD +#if FX_RESHAPED_REFLECTION let props = ty.GetProperties(BindingFlags.Instance ||| BindingFlags.Public) #else let props = ty.GetProperties(BindingFlags.GetField ||| BindingFlags.Instance ||| BindingFlags.Public) @@ -1208,7 +1194,7 @@ namespace Microsoft.FSharp.Text.StructuredPrintfImpl // massively reign in deep printing of properties let nDepth = depthLim/10 -#if FX_PORTABLE_OR_NETSTANDARD +#if NETSTANDARD1_6 || NETSTANDARD2_0 Array.Sort((propsAndFields),{ new IComparer with member this.Compare(p1,p2) = compare (p1.Name) (p2.Name) } ); #else Array.Sort((propsAndFields :> Array),{ new System.Collections.IComparer with member this.Compare(p1,p2) = compare ((p1 :?> MemberInfo).Name) ((p2 :?> MemberInfo).Name) } ); @@ -1228,7 +1214,7 @@ namespace Microsoft.FSharp.Text.StructuredPrintfImpl | _ -> basicL | UnitValue -> countNodes 1; measureL - polyL bindingFlags objWithReprL showMode opts.PrintDepth Precedence.BracketIfTuple (x, typ) + polyL bindingFlags objWithReprL showMode opts.PrintDepth Precedence.BracketIfTuple (x, ty) // -------------------------------------------------------------------- // pprinter: leafFormatter diff --git a/src/utils/sformat.fsi b/src/utils/sformat.fsi index d39b2b6457c..fb768703e17 100644 --- a/src/utils/sformat.fsi +++ b/src/utils/sformat.fsi @@ -15,7 +15,7 @@ // all 4 cases the layout types are really different types. #if COMPILER -// fsc-proto.exe: +// fsc.exe: // FSharp.Compiler.Service.dll: namespace Internal.Utilities.StructuredFormat #else @@ -36,26 +36,18 @@ namespace Microsoft.FSharp.Text.StructuredPrintfImpl type internal TaggedText = abstract Tag: LayoutTag abstract Text: string -#else // FSharp.Compiler.Service.dll, fsc-proto.exe +#else // FSharp.Compiler.Service.dll, fsc.exe /// Data representing joints in structured layouts of terms. The representation /// of this data type is only for the consumption of formatting engines. [] -#if COMPILER_PUBLIC_API - type Joint = -#else - type internal Joint = -#endif + type public Joint = | Unbreakable | Breakable of int | Broken of int [] -#if COMPILER_PUBLIC_API - type LayoutTag = -#else - type internal LayoutTag = -#endif + type public LayoutTag = | ActivePatternCase | ActivePatternResult | Alias @@ -90,39 +82,27 @@ namespace Microsoft.FSharp.Text.StructuredPrintfImpl | UnknownType | UnknownEntity -#if COMPILER_PUBLIC_API - type TaggedText = -#else - type internal TaggedText = -#endif + type public TaggedText = abstract Tag : LayoutTag abstract Text : string -#if COMPILER_PUBLIC_API - type TaggedTextWriter = -#else - type internal TaggedTextWriter = -#endif + type public TaggedTextWriter = abstract Write: t: TaggedText -> unit abstract WriteLine: unit -> unit /// Data representing structured layouts of terms. The representation /// of this data type is only for the consumption of formatting engines. [] -#if COMPILER_PUBLIC_API - type Layout = -#else - type internal Layout = -#endif + type public Layout = | ObjLeaf of bool * obj * bool | Leaf of bool * TaggedText * bool | Node of bool * Layout * bool * Layout * bool * Joint | Attr of string * (string * string) list * Layout #endif -#if COMPILER_PUBLIC_API - module TaggedTextOps = +#if COMPILER + module public TaggedTextOps = #else module internal TaggedTextOps = #endif @@ -172,12 +152,8 @@ namespace Microsoft.FSharp.Text.StructuredPrintfImpl val arrow : TaggedText val questionMark : TaggedText -#if !FSHARP_CORE // FSharp.Core.dll doesn't use PrintIntercepts -#if COMPILER_PUBLIC_API - type IEnvironment = -#else - type internal IEnvironment = -#endif +#if COMPILER + type public IEnvironment = /// Return to the layout-generation /// environment to layout any otherwise uninterpreted object abstract GetLayout : obj -> Layout @@ -196,14 +172,15 @@ namespace Microsoft.FSharp.Text.StructuredPrintfImpl /// A joint is either unbreakable, breakable or broken. /// If a joint is broken the RHS layout occurs on the next line with optional indentation. /// A layout can be squashed to for given width which forces breaks as required. -#if COMPILER_PUBLIC_API - module LayoutOps = +#if COMPILER + module public LayoutOps = #else module internal LayoutOps = #endif /// The empty layout val emptyL : Layout + /// Is it the empty layout? val isEmptyL : layout:Layout -> bool @@ -214,25 +191,34 @@ namespace Microsoft.FSharp.Text.StructuredPrintfImpl /// An string leaf val wordL : text:TaggedText -> Layout + /// An string which requires no spaces either side. val sepL : text:TaggedText -> Layout + /// An string which is right parenthesis (no space on the left). val rightL : text:TaggedText -> Layout + /// An string which is left parenthesis (no space on the right). val leftL : text:TaggedText -> Layout /// Join, unbreakable. val ( ^^ ) : layout1:Layout -> layout2:Layout -> Layout + /// Join, possible break with indent=0 val ( ++ ) : layout1:Layout -> layout2:Layout -> Layout + /// Join, possible break with indent=1 val ( -- ) : layout1:Layout -> layout2:Layout -> Layout + /// Join, possible break with indent=2 val ( --- ) : layout1:Layout -> layout2:Layout -> Layout + /// Join broken with ident=0 val ( @@ ) : layout1:Layout -> layout2:Layout -> Layout + /// Join broken with ident=1 val ( @@- ) : layout1:Layout -> layout2:Layout -> Layout + /// Join broken with ident=2 val ( @@-- ) : layout1:Layout -> layout2:Layout -> Layout @@ -250,19 +236,25 @@ namespace Microsoft.FSharp.Text.StructuredPrintfImpl /// Wrap round brackets around Layout. val bracketL : layout:Layout -> Layout + /// Wrap square brackets around layout. val squareBracketL : layout:Layout -> Layout + /// Wrap braces around layout. val braceL : layout:Layout -> Layout + /// Form tuple of layouts. val tupleL : layouts:Layout list -> Layout + /// Layout two vertically. val aboveL : layout1:Layout -> layout2:Layout -> Layout + /// Layout list vertically. val aboveListL : layouts:Layout list -> Layout /// Layout like an F# option. val optionL : selector:('T -> Layout) -> value:'T option -> Layout + /// Layout like an F# list. val listL : selector:('T -> Layout) -> value:'T list -> Layout @@ -296,8 +288,8 @@ namespace Microsoft.FSharp.Text.StructuredPrintfImpl /// /// [] -#if COMPILER_PUBLIC_API - type FormatOptions = +#if COMPILER + type public FormatOptions = #else type internal FormatOptions = #endif @@ -321,8 +313,8 @@ namespace Microsoft.FSharp.Text.StructuredPrintfImpl ShowIEnumerable: bool } static member Default : FormatOptions -#if COMPILER_PUBLIC_API - module Display = +#if COMPILER + module public Display = #else module internal Display = #endif diff --git a/tests/EndToEndBuildTests/.gitignore b/tests/EndToEndBuildTests/.gitignore new file mode 100644 index 00000000000..d4f588edfef --- /dev/null +++ b/tests/EndToEndBuildTests/.gitignore @@ -0,0 +1 @@ +artifacts/ diff --git a/tests/EndToEndBuildTests/BasicProvider/BasicProvider.DesignTime/BasicProvider.DesignTime.fsproj b/tests/EndToEndBuildTests/BasicProvider/BasicProvider.DesignTime/BasicProvider.DesignTime.fsproj new file mode 100644 index 00000000000..61c08733e88 --- /dev/null +++ b/tests/EndToEndBuildTests/BasicProvider/BasicProvider.DesignTime/BasicProvider.DesignTime.fsproj @@ -0,0 +1,29 @@ + + + + Library + netcoreapp2.0;net461 + typeproviders + NO_GENERATIVE + IS_DESIGNTIME + + + + + + BasicProvider.Runtime.fs + + + + + ProvidedTypes\ProvidedTypes.fsi + + + + ProvidedTypes\ProvidedTypes.fs + + + + + + \ No newline at end of file diff --git a/tests/EndToEndBuildTests/BasicProvider/BasicProvider.DesignTime/BasicProvider.Provider.fs b/tests/EndToEndBuildTests/BasicProvider/BasicProvider.DesignTime/BasicProvider.Provider.fs new file mode 100644 index 00000000000..0d209d439ed --- /dev/null +++ b/tests/EndToEndBuildTests/BasicProvider/BasicProvider.DesignTime/BasicProvider.Provider.fs @@ -0,0 +1,92 @@ + +namespace ProviderImplementation + +open ProviderImplementation +open ProviderImplementation.ProvidedTypes +open FSharp.Quotations +open FSharp.Core.CompilerServices +open System.Reflection + +[] +type BasicErasingProvider (config : TypeProviderConfig) as this = + inherit TypeProviderForNamespaces (config, assemblyReplacementMap=[("BasicProvider.DesignTime", "BasicProvider")]) + + let ns = "BasicProvider.Provided" + let asm = Assembly.GetExecutingAssembly() + + // check we contain a copy of runtime files, and are not referencing the runtime DLL + do assert (typeof.Assembly.GetName().Name = asm.GetName().Name) + + let createTypes () = + let myType = ProvidedTypeDefinition(asm, ns, "MyType", Some typeof) + + let ctor = ProvidedConstructor([], invokeCode = fun args -> <@@ "My internal state" :> obj @@>) + myType.AddMember(ctor) + + let ctor2 = ProvidedConstructor([ProvidedParameter("InnerState", typeof)], invokeCode = fun args -> <@@ (%%(args.[0]):string) :> obj @@>) + myType.AddMember(ctor2) + + let innerState = ProvidedProperty("InnerState", typeof, getterCode = fun args -> <@@ (%%(args.[0]) :> obj) :?> string @@>) + myType.AddMember(innerState) + + let meth = ProvidedMethod("StaticMethod", [], typeof, isStatic=true, invokeCode = (fun args -> Expr.Value(null, typeof))) + myType.AddMember(meth) + + let nameOf = + let param = ProvidedParameter("p", typeof>) + param.AddCustomAttribute { + new CustomAttributeData() with + member __.Constructor = typeof.GetConstructor([||]) + member __.ConstructorArguments = [||] :> _ + member __.NamedArguments = [||] :> _ + } + ProvidedMethod("NameOf", [ param ], typeof, isStatic = true, invokeCode = fun args -> + <@@ + match (%%args.[0]) : Microsoft.FSharp.Quotations.Expr with + | Microsoft.FSharp.Quotations.Patterns.ValueWithName (_, _, n) -> n + | e -> failwithf "Invalid quotation argument (expected ValueWithName): %A" e + @@>) + myType.AddMember(nameOf) + + [myType] + + do + this.AddNamespace(ns, createTypes()) + +[] +type BasicGenerativeProvider (config : TypeProviderConfig) as this = + inherit TypeProviderForNamespaces (config, assemblyReplacementMap=[("BasicGenerativeProvider.DesignTime", "BasicProvider")]) + + let ns = "BasicProvider" + let asm = Assembly.GetExecutingAssembly() + + // check we contain a copy of runtime files, and are not referencing the runtime DLL + do assert (typeof.Assembly.GetName().Name = asm.GetName().Name) + + let createType typeName (count:int) = + let asm = ProvidedAssembly() + let myType = ProvidedTypeDefinition(asm, ns, typeName, Some typeof, isErased=false) + + let ctor = ProvidedConstructor([], invokeCode = fun args -> <@@ "My internal state" :> obj @@>) + myType.AddMember(ctor) + + let ctor2 = ProvidedConstructor([ProvidedParameter("InnerState", typeof)], invokeCode = fun args -> <@@ (%%(args.[1]):string) :> obj @@>) + myType.AddMember(ctor2) + + for i in 1 .. count do + let prop = ProvidedProperty("Property" + string i, typeof, getterCode = fun args -> <@@ i @@>) + myType.AddMember(prop) + + let meth = ProvidedMethod("StaticMethod", [], typeof, isStatic=true, invokeCode = (fun args -> Expr.Value(null, typeof))) + myType.AddMember(meth) + asm.AddTypes [ myType ] + + myType + + let myParamType = + let t = ProvidedTypeDefinition(asm, ns, "GenerativeProvider", Some typeof, isErased=false) + t.DefineStaticParameters( [ProvidedStaticParameter("Count", typeof)], fun typeName args -> createType typeName (unbox args.[0])) + t + do + this.AddNamespace(ns, [myParamType]) + diff --git a/tests/EndToEndBuildTests/BasicProvider/BasicProvider.Tests/BasicProvider.Tests.fs b/tests/EndToEndBuildTests/BasicProvider/BasicProvider.Tests/BasicProvider.Tests.fs new file mode 100644 index 00000000000..2fd8402901d --- /dev/null +++ b/tests/EndToEndBuildTests/BasicProvider/BasicProvider.Tests/BasicProvider.Tests.fs @@ -0,0 +1,39 @@ +#if INTERACTIVE +#r @"../test/BasicProvider.dll" +#endif + +module BasicProvider.Tests + +open BasicProvider.Provided +open Xunit + +[] +let ``Default constructor should create instance`` () = + Assert.Equal("My internal state", MyType().InnerState) + +[] +let ``Constructor with parameter should create instance`` () = + Assert.Equal("override", MyType("override").InnerState) + +[] +let ``Method with ReflectedDefinition parameter should get its name`` () = + let myValue = 2 + Assert.Equal("myValue", MyType.NameOf(myValue)) + +type Generative2 = BasicProvider.GenerativeProvider<2> +type Generative4 = BasicProvider.GenerativeProvider<4> + +[] +let ``Can access properties of generative provider 2`` () = + let obj = Generative2() + Assert.Equal(obj.Property1, 1) + Assert.Equal(obj.Property2, 2) + +[] +let ``Can access properties of generative provider 4`` () = + let obj = Generative4() + Assert.Equal(obj.Property1, 1) + Assert.Equal(obj.Property2, 2) + Assert.Equal(obj.Property3, 3) + Assert.Equal(obj.Property4, 4) + diff --git a/tests/EndToEndBuildTests/BasicProvider/BasicProvider.Tests/BasicProvider.Tests.fsproj b/tests/EndToEndBuildTests/BasicProvider/BasicProvider.Tests/BasicProvider.Tests.fsproj new file mode 100644 index 00000000000..ea6a3b75b5a --- /dev/null +++ b/tests/EndToEndBuildTests/BasicProvider/BasicProvider.Tests/BasicProvider.Tests.fsproj @@ -0,0 +1,32 @@ + + + + Library + netcoreapp2.0 + $(TestTargetFramework) + false + NO_GENERATIVE + None + + + + + + + PreserveNewest + + + + + + + + + + + + + + + + diff --git a/tests/EndToEndBuildTests/BasicProvider/BasicProvider.Tests/NuGet.config b/tests/EndToEndBuildTests/BasicProvider/BasicProvider.Tests/NuGet.config new file mode 100644 index 00000000000..82abc6e8d3e --- /dev/null +++ b/tests/EndToEndBuildTests/BasicProvider/BasicProvider.Tests/NuGet.config @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/tests/EndToEndBuildTests/BasicProvider/BasicProvider.Tests/Program.fs b/tests/EndToEndBuildTests/BasicProvider/BasicProvider.Tests/Program.fs new file mode 100644 index 00000000000..2ad94bd4a51 --- /dev/null +++ b/tests/EndToEndBuildTests/BasicProvider/BasicProvider.Tests/Program.fs @@ -0,0 +1,2 @@ +module Program +let [] main _ = 0 diff --git a/tests/EndToEndBuildTests/BasicProvider/BasicProvider.Tests/xunit.runner.json b/tests/EndToEndBuildTests/BasicProvider/BasicProvider.Tests/xunit.runner.json new file mode 100644 index 00000000000..c6fd41b7143 --- /dev/null +++ b/tests/EndToEndBuildTests/BasicProvider/BasicProvider.Tests/xunit.runner.json @@ -0,0 +1,3 @@ +{ + "parallelizeTestCollections": false + } \ No newline at end of file diff --git a/tests/EndToEndBuildTests/BasicProvider/BasicProvider/BasicProvider.Runtime.fs b/tests/EndToEndBuildTests/BasicProvider/BasicProvider/BasicProvider.Runtime.fs new file mode 100644 index 00000000000..078dffb5dfd --- /dev/null +++ b/tests/EndToEndBuildTests/BasicProvider/BasicProvider/BasicProvider.Runtime.fs @@ -0,0 +1,15 @@ +#if INTERACTIVE +#load "../../src/ProvidedTypes.fsi" "../../src/ProvidedTypes.fs" +#endif + +namespace BasicProvider.Helpers + +type SomeRuntimeHelper() = + static member Help() = "help" + +#if !IS_DESIGNTIME +// Put the TypeProviderAssemblyAttribute in the runtime DLL, pointing to the design-time DLL +[] +do () +#endif + diff --git a/tests/EndToEndBuildTests/BasicProvider/BasicProvider/BasicProvider.fsproj b/tests/EndToEndBuildTests/BasicProvider/BasicProvider/BasicProvider.fsproj new file mode 100644 index 00000000000..9380a9ee3f4 --- /dev/null +++ b/tests/EndToEndBuildTests/BasicProvider/BasicProvider/BasicProvider.fsproj @@ -0,0 +1,21 @@ + + + + Library + netcoreapp2.0;net461 + typeproviders + typeproviders + + + + + + + + + true + all + + + + \ No newline at end of file diff --git a/tests/EndToEndBuildTests/BasicProvider/TestBasicProvider.cmd b/tests/EndToEndBuildTests/BasicProvider/TestBasicProvider.cmd new file mode 100644 index 00000000000..7d8475c39c3 --- /dev/null +++ b/tests/EndToEndBuildTests/BasicProvider/TestBasicProvider.cmd @@ -0,0 +1,60 @@ +@echo off + +rem +rem End to end tests for TypeProviders +rem To succeed it depends on both the coreclr compiler and the net40 desktop compiler being built +rem It only runs under ci_part3 +rem + +setlocal +set __scriptpath=%~dp0 + +pushd %__scriptpath% +rem +rem Build typeprovider package with desktop compiler +rem Test it with both desktop and coreclr compilers +rem + +if not '%NUGET_PACKAGES%' == '' rd %NUGET_PACKAGES%\BasicProvider /s /q + +@echo %__scriptpath%..\..\..\tools\dotnet20\dotnet.exe pack BasicProvider\BasicProvider.fsproj -o %~dp0artifacts -c release -v minimal -p:FSharpTestCompilerVersion=net40 +%__scriptpath%..\..\..\tools\dotnet20\dotnet.exe pack BasicProvider\BasicProvider.fsproj -o %~dp0artifacts -c release -v minimal -p:FSharpTestCompilerVersion=net40 +@if ERRORLEVEL 1 echo Error: TestBasicProvider failed && goto :failure + +@echo %__scriptpath%..\..\..\tools\dotnet20\dotnet.exe test BasicProvider.Tests\BasicProvider.Tests.fsproj -c release -v minimal -p:TestTargetFramework=net461 -p:FSharpTestCompilerVersion=net40 +%__scriptpath%..\..\..\tools\dotnet20\dotnet.exe test BasicProvider.Tests\BasicProvider.Tests.fsproj -c release -v minimal -p:TestTargetFramework=net461 -p:FSharpTestCompilerVersion=net40 +@if ERRORLEVEL 1 echo Error: TestBasicProvider failed && goto :failure + +@echo %__scriptpath%..\..\..\tools\dotnet20\dotnet.exe test BasicProvider.Tests\BasicProvider.Tests.fsproj -c release -v minimal -p:TestTargetFramework=netcoreapp2.0 -p:FSharpTestCompilerVersion=coreclr +%__scriptpath%..\..\..\tools\dotnet20\dotnet.exe test BasicProvider.Tests\BasicProvider.Tests.fsproj -c release -v minimal -p:TestTargetFramework=netcoreapp2.0 -p:FSharpTestCompilerVersion=coreclr +@if ERRORLEVEL 1 echo Error: TestBasicProvider failed && goto :failure + +rem +rem Build typeprovider package with coreclr compiler +rem Test it with both desktop and coreclr compilers +rem +if not '%NUGET_PACKAGES%' == '' rd %NUGET_PACKAGES%\BasicProvider /s /q + +@echo %__scriptpath%..\..\..\tools\dotnet20\dotnet.exe pack BasicProvider\BasicProvider.fsproj -o %~dp0artifacts -c release -v minimal -p:FSharpTestCompilerVersion=coreclr +%__scriptpath%..\..\..\tools\dotnet20\dotnet.exe pack BasicProvider\BasicProvider.fsproj -o %~dp0artifacts -c release -v minimal -p:FSharpTestCompilerVersion=coreclr +@if ERRORLEVEL 1 echo Error: TestBasicProvider failed && goto :failure + +@echo%__scriptpath%..\..\..\tools\dotnet20\dotnet.exe test BasicProvider.Tests\BasicProvider.Tests.fsproj -c release -v minimal -p:TestTargetFramework=net461 -p:FSharpTestCompilerVersion=net40 +%__scriptpath%..\..\..\tools\dotnet20\dotnet.exe test BasicProvider.Tests\BasicProvider.Tests.fsproj -c release -v minimal -p:TestTargetFramework=net461 -p:FSharpTestCompilerVersion=net40 +@if ERRORLEVEL 1 echo Error: TestBasicProvider failed && goto :failure + +@echo %__scriptpath%..\..\..\tools\dotnet20\dotnet.exe test BasicProvider.Tests\BasicProvider.Tests.fsproj -c release -v minimal -p:TestTargetFramework=netcoreapp2.0 -p:FSharpTestCompilerVersion=coreclr +%__scriptpath%..\..\..\tools\dotnet20\dotnet.exe test BasicProvider.Tests\BasicProvider.Tests.fsproj -c release -v minimal -p:TestTargetFramework=netcoreapp2.0 -p:FSharpTestCompilerVersion=coreclr +@if ERRORLEVEL 1 echo Error: TestBasicProvider failed && goto :failure + +:success +endlocal +echo Succeeded +popd +exit /b 0 + +:failure +endlocal +echo Failed +popd +exit /b 1 diff --git a/tests/EndToEndBuildTests/ComboProvider/ComboProvider.Tests/ComboProvider.Tests.fs b/tests/EndToEndBuildTests/ComboProvider/ComboProvider.Tests/ComboProvider.Tests.fs new file mode 100644 index 00000000000..3586a760893 --- /dev/null +++ b/tests/EndToEndBuildTests/ComboProvider/ComboProvider.Tests/ComboProvider.Tests.fs @@ -0,0 +1,28 @@ +#if INTERACTIVE +#r @"../test/ComboProvider.dll" +#endif + +module ComboProvider.Tests + +open ComboProvider.Provided +open Xunit + +[] +let ``Default constructor should create instance`` () = + Assert.Equal("My internal state", MyType().InnerState) + +[] +let ``Constructor with parameter should create instance`` () = + Assert.Equal("override", MyType("override").InnerState) + +[] +let ``Static method returns an object of right type`` () = + Assert.Equal("SomeRuntimeHelper", MyType.StaticMethod().GetType().Name) + +[] +let ``StaticMethod2 returns a null`` () = + Assert.True(MyType.StaticMethod2() = null) + +let ``MyType supports null`` () = + Assert.True(MyType("test it") <> null) + \ No newline at end of file diff --git a/tests/EndToEndBuildTests/ComboProvider/ComboProvider.Tests/ComboProvider.Tests.fsproj b/tests/EndToEndBuildTests/ComboProvider/ComboProvider.Tests/ComboProvider.Tests.fsproj new file mode 100644 index 00000000000..7101aa290ba --- /dev/null +++ b/tests/EndToEndBuildTests/ComboProvider/ComboProvider.Tests/ComboProvider.Tests.fsproj @@ -0,0 +1,32 @@ + + + + Library + netcoreapp2.0 + $(TestTargetFramework) + false + NO_GENERATIVE + None + + + + + + + PreserveNewest + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/EndToEndBuildTests/ComboProvider/ComboProvider.Tests/NuGet.config b/tests/EndToEndBuildTests/ComboProvider/ComboProvider.Tests/NuGet.config new file mode 100644 index 00000000000..82abc6e8d3e --- /dev/null +++ b/tests/EndToEndBuildTests/ComboProvider/ComboProvider.Tests/NuGet.config @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/tests/EndToEndBuildTests/ComboProvider/ComboProvider.Tests/Program.fs b/tests/EndToEndBuildTests/ComboProvider/ComboProvider.Tests/Program.fs new file mode 100644 index 00000000000..2ad94bd4a51 --- /dev/null +++ b/tests/EndToEndBuildTests/ComboProvider/ComboProvider.Tests/Program.fs @@ -0,0 +1,2 @@ +module Program +let [] main _ = 0 diff --git a/tests/EndToEndBuildTests/ComboProvider/ComboProvider.Tests/xunit.runner.json b/tests/EndToEndBuildTests/ComboProvider/ComboProvider.Tests/xunit.runner.json new file mode 100644 index 00000000000..c6fd41b7143 --- /dev/null +++ b/tests/EndToEndBuildTests/ComboProvider/ComboProvider.Tests/xunit.runner.json @@ -0,0 +1,3 @@ +{ + "parallelizeTestCollections": false + } \ No newline at end of file diff --git a/tests/EndToEndBuildTests/ComboProvider/ComboProvider/ComboProvider.fs b/tests/EndToEndBuildTests/ComboProvider/ComboProvider/ComboProvider.fs new file mode 100644 index 00000000000..532094f6f0f --- /dev/null +++ b/tests/EndToEndBuildTests/ComboProvider/ComboProvider/ComboProvider.fs @@ -0,0 +1,52 @@ + +namespace ProviderImplementation + +open ProviderImplementation +open ProviderImplementation.ProvidedTypes +open FSharp.Quotations +open FSharp.Core.CompilerServices +open System.Reflection + + +type SomeRuntimeHelper() = + static member Help() = "help" + +[] +type SomeRuntimeHelper2() = + static member Help() = "help" + +[] +type ComboProvider (config : TypeProviderConfig) as this = + inherit TypeProviderForNamespaces (config, assemblyReplacementMap=[("ComboProvider.DesignTime", "ComboProvider")]) + + let ns = "ComboProvider.Provided" + let asm = Assembly.GetExecutingAssembly() + + // check we contain a copy of runtime files, and are not referencing the runtime DLL + do assert (typeof.Assembly.GetName().Name = asm.GetName().Name) + + let createTypes () = + let myType = ProvidedTypeDefinition(asm, ns, "MyType", Some typeof) + + let ctor = ProvidedConstructor([], invokeCode = fun args -> <@@ "My internal state" :> obj @@>) + myType.AddMember(ctor) + + let ctor2 = ProvidedConstructor([ProvidedParameter("InnerState", typeof)], invokeCode = fun args -> <@@ (%%(args.[0]):string) :> obj @@>) + myType.AddMember(ctor2) + + let innerState = ProvidedProperty("InnerState", typeof, getterCode = fun args -> <@@ (%%(args.[0]) :> obj) :?> string @@>) + myType.AddMember(innerState) + + let meth = ProvidedMethod("StaticMethod", [], typeof, isStatic=true, invokeCode = (fun args -> <@@ SomeRuntimeHelper() @@>)) + myType.AddMember(meth) + + let meth2 = ProvidedMethod("StaticMethod2", [], typeof, isStatic=true, invokeCode = (fun args -> Expr.Value(null, typeof))) + myType.AddMember(meth2) + + [myType] + + do + this.AddNamespace(ns, createTypes()) + +[] +do () diff --git a/tests/EndToEndBuildTests/ComboProvider/ComboProvider/ComboProvider.fsproj b/tests/EndToEndBuildTests/ComboProvider/ComboProvider/ComboProvider.fsproj new file mode 100644 index 00000000000..31419a4b3f8 --- /dev/null +++ b/tests/EndToEndBuildTests/ComboProvider/ComboProvider/ComboProvider.fsproj @@ -0,0 +1,18 @@ + + + + Library + netcoreapp2.0;net461 + + + + + ProvidedTypes\ProvidedTypes.fsi + + + ProvidedTypes\ProvidedTypes.fs + + + + + \ No newline at end of file diff --git a/tests/EndToEndBuildTests/ComboProvider/TestComboProvider.cmd b/tests/EndToEndBuildTests/ComboProvider/TestComboProvider.cmd new file mode 100644 index 00000000000..ccd8c4d2e3b --- /dev/null +++ b/tests/EndToEndBuildTests/ComboProvider/TestComboProvider.cmd @@ -0,0 +1,57 @@ +@echo off + +rem +rem End to end tests for TypeProviders +rem To succeed it depends on both the coreclr compiler and the net40 desktop compiler being built +rem It only runs under ci_part3 +rem + +setlocal +set __scriptpath=%~dp0 + +rem +rem Build typeprovider package with desktop compiler +rem Test it with both desktop and coreclr compilers +rem + +if not '%NUGET_PACKAGES%' == '' rd %NUGET_PACKAGES%\ComboProvider /s /q + +@echo %__scriptpath%..\..\..\tools\dotnet20\dotnet.exe pack ComboProvider\ComboProvider\ComboProvider.fsproj -o %~dp0artifacts -c release -v minimal -p:FSharpTestCompilerVersion=net40 +%__scriptpath%..\..\..\tools\dotnet20\dotnet.exe pack ComboProvider\ComboProvider\ComboProvider.fsproj -o %~dp0artifacts -c release -v minimal -p:FSharpTestCompilerVersion=net40 +@if ERRORLEVEL 1 echo Error: ComboProvider failed && goto :failure + +@echo %__scriptpath%..\..\..\tools\dotnet20\dotnet.exe test ComboProvider\ComboProvider.Tests\ComboProvider.Tests.fsproj -c release -v minimal -p:TestTargetFramework=net461 -p:FSharpTestCompilerVersion=net40 +%__scriptpath%..\..\..\tools\dotnet20\dotnet.exe test ComboProvider\ComboProvider.Tests\ComboProvider.Tests.fsproj -c release -v minimal -p:TestTargetFramework=net461 -p:FSharpTestCompilerVersion=net40 +@if ERRORLEVEL 1 echo Error: ComboProvider failed && goto :failure + +@echo %__scriptpath%..\..\..\tools\dotnet20\dotnet.exe test ComboProvider\ComboProvider.Tests\ComboProvider.Tests.fsproj -c release -v minimal -p:TestTargetFramework=netcoreapp2.0 -p:FSharpTestCompilerVersion=coreclr +%__scriptpath%..\..\..\tools\dotnet20\dotnet.exe test ComboProvider\ComboProvider.Tests\ComboProvider.Tests.fsproj -c release -v minimal -p:TestTargetFramework=netcoreapp2.0 -p:FSharpTestCompilerVersion=coreclr +@if ERRORLEVEL 1 echo Error: ComboProviderProvider failed && goto :failure + +rem +rem Build typeprovider package with coreclr compiler +rem Test it with both desktop and coreclr compilers +rem +if not '%NUGET_PACKAGES%' == '' rd %NUGET_PACKAGES%\ComboProvider /s /q + +@echo %__scriptpath%..\..\..\tools\dotnet20\dotnet.exe pack ComboProvider\ComboProvider\ComboProvider.fsproj -o %~dp0artifacts -c release -v minimal -p:FSharpTestCompilerVersion=coreclr +%__scriptpath%..\..\..\tools\dotnet20\dotnet.exe pack ComboProvider\ComboProvider\ComboProvider.fsproj -o %~dp0artifacts -c release -v minimal -p:FSharpTestCompilerVersion=coreclr +@if ERRORLEVEL 1 echo Error: ComboProviderProvider failed && goto :failure + +@echo%__scriptpath%..\..\..\tools\dotnet20\dotnet.exe test ComboProvider\ComboProvider.Tests\ComboProvider.Tests.fsproj -c release -v minimal -p:TestTargetFramework=net461 -p:FSharpTestCompilerVersion=net40 +%__scriptpath%..\..\..\tools\dotnet20\dotnet.exe test ComboProvider\ComboProvider.Tests\ComboProvider.Tests.fsproj -c release -v minimal -p:TestTargetFramework=net461 -p:FSharpTestCompilerVersion=net40 +@if ERRORLEVEL 1 echo Error: TestBasicProvider failed && goto :failure + +@echo %__scriptpath%..\..\..\tools\dotnet20\dotnet.exe test ComboProvider\ComboProvider.Tests\ComboProvider.Tests.fsproj -v minimal -p:TestTargetFramework=netcoreapp2.0 -p:FSharpTestCompilerVersion=coreclr +%__scriptpath%..\..\..\tools\dotnet20\dotnet.exe test ComboProvider\ComboProvider.Tests\ComboProvider.Tests.fsproj -c release -v minimal -p:TestTargetFramework=netcoreapp2.0 -p:FSharpTestCompilerVersion=coreclr +@if ERRORLEVEL 1 echo Error: ComboProvider failed && goto :failure + +:success +endlocal +echo Succeeded +exit /b 0 + +:failure +endlocal +echo Failed +exit /b 1 diff --git a/tests/EndToEndBuildTests/Directory.Build.props b/tests/EndToEndBuildTests/Directory.Build.props new file mode 100644 index 00000000000..417e310b671 --- /dev/null +++ b/tests/EndToEndBuildTests/Directory.Build.props @@ -0,0 +1,9 @@ + + + + net40 + + + + + diff --git a/tests/EndToEndBuildTests/Directory.Build.targets b/tests/EndToEndBuildTests/Directory.Build.targets new file mode 100644 index 00000000000..08d85f4f821 --- /dev/null +++ b/tests/EndToEndBuildTests/Directory.Build.targets @@ -0,0 +1,5 @@ + + + + + diff --git a/tests/EndToEndBuildTests/EndToEndBuildTests.cmd b/tests/EndToEndBuildTests/EndToEndBuildTests.cmd new file mode 100644 index 00000000000..f1cb22c49ea --- /dev/null +++ b/tests/EndToEndBuildTests/EndToEndBuildTests.cmd @@ -0,0 +1,27 @@ +@echo off +rem +rem End to end tests +rem TestTypeProviders +rem + +setlocal +set __scriptpath=%~dp0 + +@echo %__scriptpath%BasicProvider\TestBasicProvider.cmd +call %__scriptpath%BasicProvider\TestBasicProvider.cmd +@if ERRORLEVEL 1 echo Error: TestBasicProvider failed && goto :failure + +@echo %__scriptpath%ComboProvider\TestComboProvider.cmd +call %__scriptpath%ComboProvider\TestComboProvider.cmd +@if ERRORLEVEL 1 echo Error: TestComboProvider failed && goto :failure + +:success +endlocal +echo Succeeded +exit /b 0 + + +:failure +endlocal +echo Failed +exit /b 1 diff --git a/tests/EndToEndBuildTests/ProvidedTypes/ProvidedTypes.fs b/tests/EndToEndBuildTests/ProvidedTypes/ProvidedTypes.fs new file mode 100644 index 00000000000..c1494b9081a --- /dev/null +++ b/tests/EndToEndBuildTests/ProvidedTypes/ProvidedTypes.fs @@ -0,0 +1,14433 @@ +// Copyright (c) Microsoft Corporation, Tomas Petricek, Gustavo Guerra, and other contributors +// +// Licensed under the MIT License see LICENSE.md in this project + +namespace ProviderImplementation.ProvidedTypes + + #nowarn "1182" + + // This file contains a set of helper types and methods for providing types in an implementation + // of ITypeProvider. + // + // This code has been modified and is appropriate for use in conjunction with the F# 4.x releases + + open System + open System.Reflection + open System.Collections.Generic + open System.Diagnostics + + open Microsoft.FSharp.Quotations + open Microsoft.FSharp.Quotations.Patterns + open Microsoft.FSharp.Core.CompilerServices + + [] + module Utils = + let K x = (fun () -> x) + let isNull x = match x with null -> true | _ -> false + let isNil x = match x with [] -> true | _ -> false + let isEmpty x = match x with [| |] -> true | _ -> false + + module Option = + let toObj x = match x with None -> null | Some x -> x + let ofObj x = match x with null -> None | _ -> Some x + + [] + type StructOption<'T> (hasValue: bool, value: 'T) = + member __.IsNone = not hasValue + member __.HasValue = hasValue + member __.Value = value + override __.ToString() = if hasValue then match box value with null -> "null" | x -> x.ToString() else "" + + type uoption<'T> = StructOption<'T> + + let UNone<'T> = uoption<'T>(false, Unchecked.defaultof<'T>) + let USome v = uoption<'T>(true, v) + let (|UNone|USome|) (x:uoption<'T>) = if x.HasValue then USome x.Value else UNone + + module StructOption = + let toObj x = match x with UNone -> null | USome x -> x + let ofObj x = match x with null -> UNone | x -> USome x + + + let tryFindMulti k map = match Map.tryFind k map with Some res -> res | None -> [| |] + + let splitNameAt (nm:string) idx = + if idx < 0 then failwith "splitNameAt: idx < 0"; + let last = nm.Length - 1 + if idx > last then failwith "splitNameAt: idx > last"; + (nm.Substring(0,idx)), + (if idx < last then nm.Substring (idx+1,last - idx) else "") + + let splitILTypeName (nm:string) = + match nm.LastIndexOf '.' with + | -1 -> UNone, nm + | idx -> let a,b = splitNameAt nm idx in USome a, b + + let joinILTypeName (nspace: string uoption) (nm:string) = + match nspace with + | UNone -> nm + | USome ns -> ns + "." + nm + + let lengthsEqAndForall2 (arr1: 'T1[]) (arr2: 'T2[]) f = + (arr1.Length = arr2.Length) && + (arr1,arr2) ||> Array.forall2 f + + /// General implementation of .Equals(Type) logic for System.Type over symbol types. You can use this with other types too. + let rec eqTypes (ty1: Type) (ty2: Type) = + if Object.ReferenceEquals(ty1,ty2) then true + elif ty1.IsGenericTypeDefinition then ty2.IsGenericTypeDefinition && ty1.Equals(ty2) + elif ty1.IsGenericType then ty2.IsGenericType && not ty2.IsGenericTypeDefinition && eqTypes (ty1.GetGenericTypeDefinition()) (ty2.GetGenericTypeDefinition()) && lengthsEqAndForall2 (ty1.GetGenericArguments()) (ty2.GetGenericArguments()) eqTypes + elif ty1.IsArray then ty2.IsArray && ty1.GetArrayRank() = ty2.GetArrayRank() && eqTypes (ty1.GetElementType()) (ty2.GetElementType()) + elif ty1.IsPointer then ty2.IsPointer && eqTypes (ty1.GetElementType()) (ty2.GetElementType()) + elif ty1.IsByRef then ty2.IsByRef && eqTypes (ty1.GetElementType()) (ty2.GetElementType()) + else ty1.Equals(box ty2) + + /// General implementation of .Equals(obj) logic for System.Type over symbol types. You can use this with other types too. + let eqTypeObj (this: Type) (other: obj) = + match other with + | :? Type as otherTy -> eqTypes this otherTy + | _ -> false + + /// General implementation of .IsAssignableFrom logic for System.Type, regardless of specific implementation + let isAssignableFrom (ty: Type) (otherTy: Type) = + eqTypes ty otherTy || (match otherTy.BaseType with null -> false | bt -> ty.IsAssignableFrom(bt)) + + /// General implementation of .IsSubclassOf logic for System.Type, regardless of specific implementation, with + /// an added hack to make the types usable with the FSharp.Core quotations implementation + let isSubclassOf (this: Type) (otherTy: Type) = + (this.IsClass && otherTy.IsClass && this.IsAssignableFrom(otherTy) && not (eqTypes this otherTy)) + // The FSharp.Core implementation of FSharp.Quotations uses + // let isDelegateType (typ:Type) = + // if typ.IsSubclassOf(typeof) then ... + // This means even target type definitions must process the case where ``otherTy`` is typeof rather than + // the System.Delegate type for the target assemblies. + || (match this.BaseType with + | null -> false + | bt -> bt.FullName = "System.MulticastDelegate" && (let fn = otherTy.FullName in fn = "System.Delegate" || fn = "System.MulticastDelegate" )) + + + /// General implementation of .GetAttributeFlags logic for System.Type over symbol types + let getAttributeFlagsImpl (ty: Type) = + if ty.IsGenericType then ty.GetGenericTypeDefinition().Attributes + elif ty.IsArray then typeof.Attributes + elif ty.IsPointer then typeof.MakePointerType().Attributes + elif ty.IsByRef then typeof.MakeByRefType().Attributes + else Unchecked.defaultof + + let bindAll = BindingFlags.DeclaredOnly ||| BindingFlags.Public ||| BindingFlags.NonPublic ||| BindingFlags.Static ||| BindingFlags.Instance + let bindSome isStatic = BindingFlags.DeclaredOnly ||| BindingFlags.Public ||| BindingFlags.NonPublic ||| (if isStatic then BindingFlags.Static else BindingFlags.Instance) + + let memberBinds isType (bindingFlags: BindingFlags) isStatic isPublic = + (isType || bindingFlags.HasFlag(if isStatic then BindingFlags.Static else BindingFlags.Instance)) && + ((bindingFlags.HasFlag(BindingFlags.Public) && isPublic) || (bindingFlags.HasFlag(BindingFlags.NonPublic) && not isPublic)) + + let rec instType inst (ty:Type) = + if isNull ty then null + elif ty.IsGenericType then + let typeArgs = Array.map (instType inst) (ty.GetGenericArguments()) + ty.GetGenericTypeDefinition().MakeGenericType(typeArgs) + elif ty.HasElementType then + let ety = instType inst (ty.GetElementType()) + if ty.IsArray then + let rank = ty.GetArrayRank() + if rank = 1 then ety.MakeArrayType() + else ety.MakeArrayType(rank) + elif ty.IsPointer then ety.MakePointerType() + elif ty.IsByRef then ety.MakeByRefType() + else ty + elif ty.IsGenericParameter then + let pos = ty.GenericParameterPosition + let (inst1: Type[], inst2: Type[]) = inst + if pos < inst1.Length then inst1.[pos] + elif pos < inst1.Length + inst2.Length then inst2.[pos - inst1.Length] + else ty + else ty + + + let mutable token = 0 + let genToken() = token <- token + 1; token + /// Internal code of .NET expects the obj[] returned by GetCustomAttributes to be an Attribute[] even in the case of empty arrays + let emptyAttributes = (([| |]: Attribute[]) |> box |> unbox) + + let nonNull str x = if isNull x then failwithf "Null in '%s', stacktrace = '%s'" str Environment.StackTrace else x + let nonNone str x = match x with None -> failwithf "No value has been specified for '%s', stacktrace = '%s'" str Environment.StackTrace | Some v -> v + let patchOption v f = match v with None -> f() | Some _ -> failwithf "Already patched, stacktrace = '%s'" Environment.StackTrace + + let notRequired this opname item = + let msg = sprintf "The operation '%s' on item '%s' should not be called on provided type, member or parameter of type '%O'. Stack trace:\n%s" opname item (this.GetType()) Environment.StackTrace + Debug.Assert (false, msg) + raise (NotSupportedException msg) + + + let adjustTypeAttributes isNested attrs = + let visibilityAttributes = + match attrs &&& TypeAttributes.VisibilityMask with + | TypeAttributes.Public when isNested -> TypeAttributes.NestedPublic + | TypeAttributes.NotPublic when isNested -> TypeAttributes.NestedAssembly + | TypeAttributes.NestedPublic when not isNested -> TypeAttributes.Public + | TypeAttributes.NestedAssembly + | TypeAttributes.NestedPrivate + | TypeAttributes.NestedFamORAssem + | TypeAttributes.NestedFamily + | TypeAttributes.NestedFamANDAssem when not isNested -> TypeAttributes.NotPublic + | a -> a + (attrs &&& ~~~TypeAttributes.VisibilityMask) ||| visibilityAttributes + + + type ConstructorInfo with + member m.GetDefinition() = + let dty = m.DeclaringType + if (dty.IsGenericType && not dty.IsGenericTypeDefinition) then + // Search through the original type definition looking for the one with a matching metadata token + let gdty = dty.GetGenericTypeDefinition() + gdty.GetConstructors(bindAll) + |> Array.tryFind (fun c -> c.MetadataToken = m.MetadataToken) + |> function Some m2 -> m2 | None -> failwithf "couldn't rebind %O::%s back to generic constructor definition via metadata token, stacktrace = '%s'" m.DeclaringType m.Name Environment.StackTrace + else + m + + type PropertyInfo with + member m.GetDefinition() = + let dty = m.DeclaringType + if (dty.IsGenericType && not dty.IsGenericTypeDefinition) then + // Search through the original type definition looking for the one with a matching metadata token + let gdty = dty.GetGenericTypeDefinition() + gdty.GetProperties(bindAll) + |> Array.tryFind (fun c -> c.MetadataToken = m.MetadataToken) + |> function Some m2 -> m2 | None -> failwithf "couldn't rebind %O::%s back to generic property definition via metadata token" m.DeclaringType m.Name + else + m + + member p.IsStatic = p.CanRead && p.GetGetMethod().IsStatic || p.CanWrite && p.GetSetMethod().IsStatic + member p.IsPublic = p.CanRead && p.GetGetMethod().IsPublic || p.CanWrite && p.GetSetMethod().IsPublic + + type EventInfo with + member m.GetDefinition() = + let dty = m.DeclaringType + if (dty.IsGenericType && not dty.IsGenericTypeDefinition) then + // Search through the original type definition looking for the one with a matching metadata token + let gdty = dty.GetGenericTypeDefinition() + gdty.GetEvents(bindAll) + |> Array.tryFind (fun c -> c.MetadataToken = m.MetadataToken) + |> function Some m2 -> m2 | None -> failwithf "couldn't rebind %O::%s back to generic event definition via metadata token" m.DeclaringType m.Name + else + m + + member p.IsStatic = p.GetAddMethod().IsStatic || p.GetRemoveMethod().IsStatic + member p.IsPublic = p.GetAddMethod().IsPublic || p.GetRemoveMethod().IsPublic + + type FieldInfo with + member m.GetDefinition() = + let dty = m.DeclaringType + if (dty.IsGenericType && not dty.IsGenericTypeDefinition) then + // Search through the original type definition looking for the one with a matching metadata token + let gdty = dty.GetGenericTypeDefinition() + gdty.GetFields(bindAll) + |> Array.tryFind (fun c -> c.MetadataToken = m.MetadataToken) + |> function Some m2 -> m2 | None -> failwithf "couldn't rebind %O::%s back to generic event definition via metadata token" m.DeclaringType m.Name + else + m + + type MethodInfo with + member m.GetDefinition() = + let dty = m.DeclaringType + if (m.IsGenericMethod && not dty.IsGenericType) then m.GetGenericMethodDefinition() + elif (m.IsGenericMethod && (not m.IsGenericMethodDefinition || not dty.IsGenericTypeDefinition)) || + (dty.IsGenericType && not dty.IsGenericTypeDefinition) then + + // Search through ALL the methods on the original type definition looking for the one + // with a matching metadata token + let gdty = if dty.IsGenericType then dty.GetGenericTypeDefinition() else dty + gdty.GetMethods(bindSome m.IsStatic) + |> Array.tryFind (fun c -> c.MetadataToken = m.MetadataToken) + |> function Some m2 -> m2 | None -> failwithf "couldn't rebind generic instantiation of %O::%s back to generic method definition via metadata token" m.DeclaringType m.Name + + else + m + + let canBindConstructor (bindingFlags: BindingFlags) (c: ConstructorInfo) = + bindingFlags.HasFlag(BindingFlags.Public) && c.IsPublic || bindingFlags.HasFlag(BindingFlags.NonPublic) && not c.IsPublic + + let canBindMethod (bindingFlags: BindingFlags) (c: MethodInfo) = + bindingFlags.HasFlag(BindingFlags.Public) && c.IsPublic || bindingFlags.HasFlag(BindingFlags.NonPublic) && not c.IsPublic + + let canBindProperty (bindingFlags: BindingFlags) (c: PropertyInfo) = + bindingFlags.HasFlag(BindingFlags.Public) && c.IsPublic || bindingFlags.HasFlag(BindingFlags.NonPublic) && not c.IsPublic + + let canBindField (bindingFlags: BindingFlags) (c: FieldInfo) = + bindingFlags.HasFlag(BindingFlags.Public) && c.IsPublic || bindingFlags.HasFlag(BindingFlags.NonPublic) && not c.IsPublic + + let canBindEvent (bindingFlags: BindingFlags) (c: EventInfo) = + bindingFlags.HasFlag(BindingFlags.Public) && c.IsPublic || bindingFlags.HasFlag(BindingFlags.NonPublic) && not c.IsPublic + + let canBindNestedType (bindingFlags: BindingFlags) (c: Type) = + bindingFlags.HasFlag(BindingFlags.Public) && c.IsNestedPublic || bindingFlags.HasFlag(BindingFlags.NonPublic) && not c.IsNestedPublic + + //-------------------------------------------------------------------------------- + // UncheckedQuotations + + // The FSharp.Core 2.0 - 4.0 (4.0.0.0 - 4.4.0.0) quotations implementation is overly strict in that it doesn't allow + // generation of quotations for cross-targeted FSharp.Core. Below we define a series of Unchecked methods + // implemented via reflection hacks to allow creation of various nodes when using a cross-targets FSharp.Core and + // mscorlib.dll. + // + // - Most importantly, these cross-targeted quotations can be provided to the F# compiler by a type provider. + // They are generally produced via the AssemblyReplacer.fs component through a process of rewriting design-time quotations that + // are not cross-targeted. + // + // - However, these quotation values are a bit fragile. Using existing FSharp.Core.Quotations.Patterns + // active patterns on these quotation nodes will generally work correctly. But using ExprShape.RebuildShapeCombination + // on these new nodes will not succed, nor will operations that build new quotations such as Expr.Call. + // Instead, use the replacement provided in this module. + // + // - Likewise, some operations in these quotation values like "expr.Type" may be a bit fragile, possibly returning non cross-targeted types in + // the result. However those operations are not used by the F# compiler. + [] + module UncheckedQuotations = + + let qTy = typeof.Assembly.GetType("Microsoft.FSharp.Quotations.ExprConstInfo") + assert (not (isNull qTy)) + let pTy = typeof.Assembly.GetType("Microsoft.FSharp.Quotations.PatternsModule") + assert (not (isNull pTy)) + + // These are handles to the internal functions that create quotation nodes of different sizes. Although internal, + // these function names have been stable since F# 2.0. + let mkFE0 = pTy.GetMethod("mkFE0", bindAll) + assert (not (isNull mkFE0)) + let mkFE1 = pTy.GetMethod("mkFE1", bindAll) + assert (not (isNull mkFE1)) + let mkFE2 = pTy.GetMethod("mkFE2", bindAll) + assert (mkFE2 |> isNull |> not) + let mkFE3 = pTy.GetMethod("mkFE3", bindAll) + assert (mkFE3 |> isNull |> not) + let mkFEN = pTy.GetMethod("mkFEN", bindAll) + assert (mkFEN |> isNull |> not) + + // These are handles to the internal tags attached to quotation nodes of different sizes. Although internal, + // these function names have been stable since F# 2.0. + let newDelegateOp = qTy.GetMethod("NewNewDelegateOp", bindAll) + assert (newDelegateOp |> isNull |> not) + let instanceCallOp = qTy.GetMethod("NewInstanceMethodCallOp", bindAll) + assert (instanceCallOp |> isNull |> not) + let staticCallOp = qTy.GetMethod("NewStaticMethodCallOp", bindAll) + assert (staticCallOp |> isNull |> not) + let newObjectOp = qTy.GetMethod("NewNewObjectOp", bindAll) + assert (newObjectOp |> isNull |> not) + let newArrayOp = qTy.GetMethod("NewNewArrayOp", bindAll) + assert (newArrayOp |> isNull |> not) + let appOp = qTy.GetMethod("get_AppOp", bindAll) + assert (appOp |> isNull |> not) + let instancePropGetOp = qTy.GetMethod("NewInstancePropGetOp", bindAll) + assert (instancePropGetOp |> isNull |> not) + let staticPropGetOp = qTy.GetMethod("NewStaticPropGetOp", bindAll) + assert (staticPropGetOp |> isNull |> not) + let instancePropSetOp = qTy.GetMethod("NewInstancePropSetOp", bindAll) + assert (instancePropSetOp |> isNull |> not) + let staticPropSetOp = qTy.GetMethod("NewStaticPropSetOp", bindAll) + assert (staticPropSetOp |> isNull |> not) + let instanceFieldGetOp = qTy.GetMethod("NewInstanceFieldGetOp", bindAll) + assert (instanceFieldGetOp |> isNull |> not) + let staticFieldGetOp = qTy.GetMethod("NewStaticFieldGetOp", bindAll) + assert (staticFieldGetOp |> isNull |> not) + let instanceFieldSetOp = qTy.GetMethod("NewInstanceFieldSetOp", bindAll) + assert (instanceFieldSetOp |> isNull |> not) + let staticFieldSetOp = qTy.GetMethod("NewStaticFieldSetOp", bindAll) + assert (staticFieldSetOp |> isNull |> not) + let tupleGetOp = qTy.GetMethod("NewTupleGetOp", bindAll) + assert (tupleGetOp |> isNull |> not) + let letOp = qTy.GetMethod("get_LetOp", bindAll) + assert (letOp |> isNull |> not) + let forIntegerRangeLoopOp = qTy.GetMethod("get_ForIntegerRangeLoopOp", bindAll) + assert (forIntegerRangeLoopOp |> isNull |> not) + let whileLoopOp = qTy.GetMethod("get_WhileLoopOp", bindAll) + assert (whileLoopOp |> isNull |> not) + let ifThenElseOp = qTy.GetMethod("get_IfThenElseOp", bindAll) + assert (ifThenElseOp |> isNull |> not) + + type Microsoft.FSharp.Quotations.Expr with + + static member NewDelegateUnchecked (ty: Type, vs: Var list, body: Expr) = + let e = List.foldBack (fun v acc -> Expr.Lambda(v,acc)) vs body + let op = newDelegateOp.Invoke(null, [| box ty |]) + mkFE1.Invoke(null, [| box op; box e |]) :?> Expr + + static member NewObjectUnchecked (cinfo: ConstructorInfo, args: Expr list) = + let op = newObjectOp.Invoke(null, [| box cinfo |]) + mkFEN.Invoke(null, [| box op; box args |]) :?> Expr + + static member NewArrayUnchecked (elementType: Type, elements: Expr list) = + let op = newArrayOp.Invoke(null, [| box elementType |]) + mkFEN.Invoke(null, [| box op; box elements |]) :?> Expr + + static member CallUnchecked (minfo: MethodInfo, args: Expr list) = + let op = staticCallOp.Invoke(null, [| box minfo |]) + mkFEN.Invoke(null, [| box op; box args |]) :?> Expr + + static member CallUnchecked (obj: Expr, minfo: MethodInfo, args: Expr list) = + let op = instanceCallOp.Invoke(null, [| box minfo |]) + mkFEN.Invoke(null, [| box op; box (obj::args) |]) :?> Expr + + static member ApplicationUnchecked (f: Expr, x: Expr) = + let op = appOp.Invoke(null, [| |]) + mkFE2.Invoke(null, [| box op; box f; box x |]) :?> Expr + + static member PropertyGetUnchecked (pinfo: PropertyInfo, args: Expr list) = + let op = staticPropGetOp.Invoke(null, [| box pinfo |]) + mkFEN.Invoke(null, [| box op; box args |]) :?> Expr + + static member PropertyGetUnchecked (obj: Expr, pinfo: PropertyInfo, ?args: Expr list) = + let args = defaultArg args [] + let op = instancePropGetOp.Invoke(null, [| box pinfo |]) + mkFEN.Invoke(null, [| box op; box (obj::args) |]) :?> Expr + + static member PropertySetUnchecked (pinfo: PropertyInfo, value: Expr, ?args: Expr list) = + let args = defaultArg args [] + let op = staticPropSetOp.Invoke(null, [| box pinfo |]) + mkFEN.Invoke(null, [| box op; box (args@[value]) |]) :?> Expr + + static member PropertySetUnchecked (obj: Expr, pinfo: PropertyInfo, value: Expr, args: Expr list) = + let op = instancePropSetOp.Invoke(null, [| box pinfo |]) + mkFEN.Invoke(null, [| box op; box (obj::(args@[value])) |]) :?> Expr + + static member FieldGetUnchecked (pinfo: FieldInfo) = + let op = staticFieldGetOp.Invoke(null, [| box pinfo |]) + mkFE0.Invoke(null, [| box op; |]) :?> Expr + + static member FieldGetUnchecked (obj: Expr, pinfo: FieldInfo) = + let op = instanceFieldGetOp.Invoke(null, [| box pinfo |]) + mkFE1.Invoke(null, [| box op; box obj |]) :?> Expr + + static member FieldSetUnchecked (pinfo: FieldInfo, value: Expr) = + let op = staticFieldSetOp.Invoke(null, [| box pinfo |]) + mkFE1.Invoke(null, [| box op; box value |]) :?> Expr + + static member FieldSetUnchecked (obj: Expr, pinfo: FieldInfo, value: Expr) = + let op = instanceFieldSetOp.Invoke(null, [| box pinfo |]) + mkFE2.Invoke(null, [| box op; box obj; box value |]) :?> Expr + + static member TupleGetUnchecked (e: Expr, n:int) = + let op = tupleGetOp.Invoke(null, [| box e.Type; box n |]) + mkFE1.Invoke(null, [| box op; box e |]) :?> Expr + + static member LetUnchecked (v:Var, e: Expr, body:Expr) = + let lam = Expr.Lambda(v,body) + let op = letOp.Invoke(null, [| |]) + mkFE2.Invoke(null, [| box op; box e; box lam |]) :?> Expr + + static member ForIntegerRangeLoopUnchecked (loopVariable, startExpr:Expr, endExpr:Expr, body:Expr) = + let lam = Expr.Lambda(loopVariable, body) + let op = forIntegerRangeLoopOp.Invoke(null, [| |]) + mkFE3.Invoke(null, [| box op; box startExpr; box endExpr; box lam |] ) :?> Expr + + static member WhileLoopUnchecked (guard:Expr, body:Expr) = + let op = whileLoopOp.Invoke(null, [| |]) + mkFE2.Invoke(null, [| box op; box guard; box body |] ):?> Expr + + static member IfThenElseUnchecked (e:Expr, t:Expr, f:Expr) = + let op = ifThenElseOp.Invoke(null, [| |]) + mkFE3.Invoke(null, [| box op; box e; box t; box f |] ):?> Expr + + type Shape = Shape of (Expr list -> Expr) + + let (|ShapeCombinationUnchecked|ShapeVarUnchecked|ShapeLambdaUnchecked|) e = + match e with + | NewObject (cinfo, args) -> + ShapeCombinationUnchecked (Shape (function args -> Expr.NewObjectUnchecked (cinfo, args)), args) + | NewArray (ty, args) -> + ShapeCombinationUnchecked (Shape (function args -> Expr.NewArrayUnchecked (ty, args)), args) + | NewDelegate (t, vars, expr) -> + ShapeCombinationUnchecked (Shape (function [expr] -> Expr.NewDelegateUnchecked (t, vars, expr) | _ -> invalidArg "expr" "invalid shape"), [expr]) + | TupleGet (expr, n) -> + ShapeCombinationUnchecked (Shape (function [expr] -> Expr.TupleGetUnchecked (expr, n) | _ -> invalidArg "expr" "invalid shape"), [expr]) + | Application (f, x) -> + ShapeCombinationUnchecked (Shape (function [f; x] -> Expr.ApplicationUnchecked (f, x) | _ -> invalidArg "expr" "invalid shape"), [f; x]) + | Call (objOpt, minfo, args) -> + match objOpt with + | None -> ShapeCombinationUnchecked (Shape (function args -> Expr.CallUnchecked (minfo, args)), args) + | Some obj -> ShapeCombinationUnchecked (Shape (function (obj::args) -> Expr.CallUnchecked (obj, minfo, args) | _ -> invalidArg "expr" "invalid shape"), obj::args) + | PropertyGet (objOpt, pinfo, args) -> + match objOpt with + | None -> ShapeCombinationUnchecked (Shape (function args -> Expr.PropertyGetUnchecked (pinfo, args)), args) + | Some obj -> ShapeCombinationUnchecked (Shape (function (obj::args) -> Expr.PropertyGetUnchecked (obj, pinfo, args) | _ -> invalidArg "expr" "invalid shape"), obj::args) + | PropertySet (objOpt, pinfo, args, value) -> + match objOpt with + | None -> ShapeCombinationUnchecked (Shape (function (value::args) -> Expr.PropertySetUnchecked (pinfo, value, args) | _ -> invalidArg "expr" "invalid shape"), value::args) + | Some obj -> ShapeCombinationUnchecked (Shape (function (obj::value::args) -> Expr.PropertySetUnchecked (obj, pinfo, value, args) | _ -> invalidArg "expr" "invalid shape"), obj::value::args) + | FieldGet (objOpt, pinfo) -> + match objOpt with + | None -> ShapeCombinationUnchecked (Shape (function _ -> Expr.FieldGetUnchecked (pinfo)), []) + | Some obj -> ShapeCombinationUnchecked (Shape (function [obj] -> Expr.FieldGetUnchecked (obj, pinfo) | _ -> invalidArg "expr" "invalid shape"), [obj]) + | FieldSet (objOpt, pinfo, value) -> + match objOpt with + | None -> ShapeCombinationUnchecked (Shape (function [value] -> Expr.FieldSetUnchecked (pinfo, value) | _ -> invalidArg "expr" "invalid shape"), [value]) + | Some obj -> ShapeCombinationUnchecked (Shape (function [obj;value] -> Expr.FieldSetUnchecked (obj, pinfo, value) | _ -> invalidArg "expr" "invalid shape"), [obj; value]) + | Let (var, value, body) -> + ShapeCombinationUnchecked (Shape (function [value;Lambda(var, body)] -> Expr.LetUnchecked(var, value, body) | _ -> invalidArg "expr" "invalid shape"), [value; Expr.Lambda(var, body)]) + | ForIntegerRangeLoop (loopVar, first, last, body) -> + ShapeCombinationUnchecked (Shape (function [first; last; Lambda(loopVar, body)] -> Expr.ForIntegerRangeLoopUnchecked (loopVar, first, last, body) | _ -> invalidArg "expr" "invalid shape"), [first; last; Expr.Lambda(loopVar, body)]) + | WhileLoop (cond, body) -> + ShapeCombinationUnchecked (Shape (function [cond; body] -> Expr.WhileLoopUnchecked (cond, body) | _ -> invalidArg "expr" "invalid shape"), [cond; body]) + | IfThenElse (g, t, e) -> + ShapeCombinationUnchecked (Shape (function [g; t; e] -> Expr.IfThenElseUnchecked (g, t, e) | _ -> invalidArg "expr" "invalid shape"), [g; t; e]) + | TupleGet (expr, i) -> + ShapeCombinationUnchecked (Shape (function [expr] -> Expr.TupleGetUnchecked (expr, i) | _ -> invalidArg "expr" "invalid shape"), [expr]) + | ExprShape.ShapeCombination (comb,args) -> + ShapeCombinationUnchecked (Shape (fun args -> ExprShape.RebuildShapeCombination(comb, args)), args) + | ExprShape.ShapeVar v -> ShapeVarUnchecked v + | ExprShape.ShapeLambda (v, e) -> ShapeLambdaUnchecked (v,e) + + let RebuildShapeCombinationUnchecked (Shape comb,args) = comb args + + //-------------------------------------------------------------------------------- + // Instantiated symbols + // + + /// Represents the type constructor in a provided symbol type. + [] + type ProvidedTypeSymbolKind = + | SDArray + | Array of int + | Pointer + | ByRef + | Generic of Type + | FSharpTypeAbbreviation of (Assembly * string * string[]) + + + /// Represents an array or other symbolic type involving a provided type as the argument. + /// See the type provider spec for the methods that must be implemented. + /// Note that the type provider specification does not require us to implement pointer-equality for provided types. + type ProvidedTypeSymbol(kind: ProvidedTypeSymbolKind, typeArgs: Type list) as this = + inherit TypeDelegator() + let typeArgs = Array.ofList typeArgs + + do this.typeImpl <- this + + /// Substitute types for type variables. + override __.FullName = + match kind,typeArgs with + | ProvidedTypeSymbolKind.SDArray,[| arg |] -> arg.FullName + "[]" + | ProvidedTypeSymbolKind.Array _,[| arg |] -> arg.FullName + "[*]" + | ProvidedTypeSymbolKind.Pointer,[| arg |] -> arg.FullName + "*" + | ProvidedTypeSymbolKind.ByRef,[| arg |] -> arg.FullName + "&" + | ProvidedTypeSymbolKind.Generic gty, typeArgs -> gty.FullName + "[" + (typeArgs |> Array.map (fun arg -> arg.ToString()) |> String.concat ",") + "]" + | ProvidedTypeSymbolKind.FSharpTypeAbbreviation (_,nsp,path),typeArgs -> String.concat "." (Array.append [| nsp |] path) + (match typeArgs with [| |] -> "" | _ -> typeArgs.ToString()) + | _ -> failwith "unreachable" + + /// Although not strictly required by the type provider specification, this is required when doing basic operations like FullName on + /// .NET symbolic types made from this type, e.g. when building Nullable.FullName + override __.DeclaringType = + match kind with + | ProvidedTypeSymbolKind.SDArray -> null + | ProvidedTypeSymbolKind.Array _ -> null + | ProvidedTypeSymbolKind.Pointer -> null + | ProvidedTypeSymbolKind.ByRef -> null + | ProvidedTypeSymbolKind.Generic gty -> gty.DeclaringType + | ProvidedTypeSymbolKind.FSharpTypeAbbreviation _ -> null + + override __.Name = + match kind,typeArgs with + | ProvidedTypeSymbolKind.SDArray,[| arg |] -> arg.Name + "[]" + | ProvidedTypeSymbolKind.Array _,[| arg |] -> arg.Name + "[*]" + | ProvidedTypeSymbolKind.Pointer,[| arg |] -> arg.Name + "*" + | ProvidedTypeSymbolKind.ByRef,[| arg |] -> arg.Name + "&" + | ProvidedTypeSymbolKind.Generic gty, _typeArgs -> gty.Name + | ProvidedTypeSymbolKind.FSharpTypeAbbreviation (_,_,path),_ -> path.[path.Length-1] + | _ -> failwith "unreachable" + + override __.BaseType = + match kind with + | ProvidedTypeSymbolKind.SDArray -> typeof + | ProvidedTypeSymbolKind.Array _ -> typeof + | ProvidedTypeSymbolKind.Pointer -> typeof + | ProvidedTypeSymbolKind.ByRef -> typeof + | ProvidedTypeSymbolKind.Generic gty -> + if isNull gty.BaseType then null else + instType (typeArgs, [| |]) gty.BaseType + | ProvidedTypeSymbolKind.FSharpTypeAbbreviation _ -> typeof + + override __.GetArrayRank() = (match kind with ProvidedTypeSymbolKind.Array n -> n | ProvidedTypeSymbolKind.SDArray -> 1 | _ -> failwithf "non-array type '%O'" this) + override __.IsValueTypeImpl() = (match kind with ProvidedTypeSymbolKind.Generic gtd -> gtd.IsValueType | _ -> false) + override __.IsArrayImpl() = (match kind with ProvidedTypeSymbolKind.Array _ | ProvidedTypeSymbolKind.SDArray -> true | _ -> false) + override __.IsByRefImpl() = (match kind with ProvidedTypeSymbolKind.ByRef _ -> true | _ -> false) + override __.IsPointerImpl() = (match kind with ProvidedTypeSymbolKind.Pointer _ -> true | _ -> false) + override __.IsPrimitiveImpl() = false + override __.IsGenericType = (match kind with ProvidedTypeSymbolKind.Generic _ -> true | _ -> false) + override this.GetGenericArguments() = (match kind with ProvidedTypeSymbolKind.Generic _ -> typeArgs | _ -> failwithf "non-generic type '%O'" this) + override this.GetGenericTypeDefinition() = (match kind with ProvidedTypeSymbolKind.Generic e -> e | _ -> failwithf "non-generic type '%O'" this) + override __.IsCOMObjectImpl() = false + override __.HasElementTypeImpl() = (match kind with ProvidedTypeSymbolKind.Generic _ -> false | _ -> true) + override __.GetElementType() = (match kind,typeArgs with (ProvidedTypeSymbolKind.Array _ | ProvidedTypeSymbolKind.SDArray | ProvidedTypeSymbolKind.ByRef | ProvidedTypeSymbolKind.Pointer),[| e |] -> e | _ -> failwithf "not an array, pointer or byref type") + + override this.Assembly = + match kind, typeArgs with + | ProvidedTypeSymbolKind.FSharpTypeAbbreviation (assembly,_nsp,_path), _ -> assembly + | ProvidedTypeSymbolKind.Generic gty, _ -> gty.Assembly + | ProvidedTypeSymbolKind.SDArray,[| arg |] -> arg.Assembly + | ProvidedTypeSymbolKind.Array _,[| arg |] -> arg.Assembly + | ProvidedTypeSymbolKind.Pointer,[| arg |] -> arg.Assembly + | ProvidedTypeSymbolKind.ByRef,[| arg |] -> arg.Assembly + | _ -> notRequired this "Assembly" this.FullName + + override this.Namespace = + match kind,typeArgs with + | ProvidedTypeSymbolKind.SDArray,[| arg |] -> arg.Namespace + | ProvidedTypeSymbolKind.Array _,[| arg |] -> arg.Namespace + | ProvidedTypeSymbolKind.Pointer,[| arg |] -> arg.Namespace + | ProvidedTypeSymbolKind.ByRef,[| arg |] -> arg.Namespace + | ProvidedTypeSymbolKind.Generic gty,_ -> gty.Namespace + | ProvidedTypeSymbolKind.FSharpTypeAbbreviation (_assembly,nsp,_path),_ -> nsp + | _ -> notRequired this "Namespace" this.FullName + + override x.Module = x.Assembly.ManifestModule + + override __.GetHashCode() = + match kind,typeArgs with + | ProvidedTypeSymbolKind.SDArray,[| arg |] -> 10 + hash arg + | ProvidedTypeSymbolKind.Array _,[| arg |] -> 163 + hash arg + | ProvidedTypeSymbolKind.Pointer,[| arg |] -> 283 + hash arg + | ProvidedTypeSymbolKind.ByRef,[| arg |] -> 43904 + hash arg + | ProvidedTypeSymbolKind.Generic gty,_ -> 9797 + hash gty + Array.sumBy hash typeArgs + | ProvidedTypeSymbolKind.FSharpTypeAbbreviation _,_ -> 3092 + | _ -> failwith "unreachable" + + override this.Equals(other: obj) = eqTypeObj this other + + override this.Equals(otherTy: Type) = eqTypes this otherTy + + override this.IsAssignableFrom(otherTy: Type) = isAssignableFrom this otherTy + + override this.IsSubclassOf(otherTy: Type) = isSubclassOf this otherTy + + member __.Kind = kind + + member __.Args = typeArgs + + member __.IsFSharpTypeAbbreviation = match kind with FSharpTypeAbbreviation _ -> true | _ -> false + + // For example, int + member __.IsFSharpUnitAnnotated = match kind with ProvidedTypeSymbolKind.Generic gtd -> not gtd.IsGenericTypeDefinition | _ -> false + + override __.GetConstructorImpl(_bindingFlags, _binder, _callConventions, _types, _modifiers) = null + + override this.GetMethodImpl(name, bindingFlags, _binderBinder, _callConvention, _types, _modifiers) = + match kind with + | Generic gtd -> + let ty = gtd.GetGenericTypeDefinition().MakeGenericType(typeArgs) + ty.GetMethod(name, bindingFlags) + | _ -> notRequired this "GetMethodImpl" this.FullName + + + override this.GetField(_name, _bindingFlags) = notRequired this "GetField" this.FullName + + override this.GetPropertyImpl(_name, _bindingFlags, _binder, _returnType, _types, _modifiers) = notRequired this "GetPropertyImpl" this.FullName + + override this.GetEvent(_name, _bindingFlags) = notRequired this "GetEvent" this.FullName + + override this.GetNestedType(_name, _bindingFlags) = notRequired this "GetNestedType" this.FullName + + override this.GetConstructors _bindingFlags = notRequired this "GetConstructors" this.FullName + + override this.GetMethods _bindingFlags = notRequired this "GetMethods" this.FullName + + override this.GetFields _bindingFlags = notRequired this "GetFields" this.FullName + + override this.GetProperties _bindingFlags = notRequired this "GetProperties" this.FullName + + override this.GetEvents _bindingFlags = notRequired this "GetEvents" this.FullName + + override this.GetNestedTypes _bindingFlags = notRequired this "GetNestedTypes" this.FullName + + override this.GetMembers _bindingFlags = notRequired this "GetMembers" this.FullName + + override this.GetInterface(_name, _ignoreCase) = notRequired this "GetInterface" this.FullName + + override this.GetInterfaces() = notRequired this "GetInterfaces" this.FullName + + override this.GetAttributeFlagsImpl() = getAttributeFlagsImpl this + + override this.UnderlyingSystemType = + match kind with + | ProvidedTypeSymbolKind.SDArray + | ProvidedTypeSymbolKind.Array _ + | ProvidedTypeSymbolKind.Pointer + | ProvidedTypeSymbolKind.FSharpTypeAbbreviation _ + | ProvidedTypeSymbolKind.ByRef -> upcast this + | ProvidedTypeSymbolKind.Generic gty -> gty.UnderlyingSystemType + + override __.GetCustomAttributesData() = ([| |] :> IList<_>) + + override this.MemberType = notRequired this "MemberType" this.FullName + + override this.GetMember(_name,_mt,_bindingFlags) = notRequired this "GetMember" this.FullName + + override this.GUID = notRequired this "GUID" this.FullName + + override this.InvokeMember(_name, _invokeAttr, _binder, _target, _args, _modifiers, _culture, _namedParameters) = notRequired this "InvokeMember" this.FullName + + override this.AssemblyQualifiedName = notRequired this "AssemblyQualifiedName" this.FullName + + override __.GetCustomAttributes(_inherit) = emptyAttributes + + override __.GetCustomAttributes(_attributeType, _inherit) = emptyAttributes + + override __.IsDefined(_attributeType, _inherit) = false + + override this.MakeArrayType() = ProvidedTypeSymbol(ProvidedTypeSymbolKind.SDArray, [this]) :> Type + + override this.MakeArrayType arg = ProvidedTypeSymbol(ProvidedTypeSymbolKind.Array arg, [this]) :> Type + + override __.MetadataToken = + match kind with + | ProvidedTypeSymbolKind.SDArray -> typeof.MetadataToken + | ProvidedTypeSymbolKind.Array _ -> typeof.MetadataToken + | ProvidedTypeSymbolKind.Pointer -> typeof.MetadataToken + | ProvidedTypeSymbolKind.ByRef -> typeof.MetadataToken + | ProvidedTypeSymbolKind.Generic gty -> gty.MetadataToken + | ProvidedTypeSymbolKind.FSharpTypeAbbreviation _ -> typeof.MetadataToken + + override this.GetEvents() = this.GetEvents(BindingFlags.Public ||| BindingFlags.Instance ||| BindingFlags.Static) // Needed because TypeDelegator.cs provides a delegting implementation of this, and we are self-delegating + + override this.ToString() = this.FullName + + type ProvidedSymbolMethod(genericMethodDefinition: MethodInfo, parameters: Type[]) = + inherit MethodInfo() + + let convParam (p:ParameterInfo) = + { new ParameterInfo() with + override __.Name = p.Name + override __.ParameterType = instType (parameters, [| |]) p.ParameterType + override __.Attributes = p.Attributes + override __.RawDefaultValue = p.RawDefaultValue + override __.GetCustomAttributesData() = p.GetCustomAttributesData() + } + + override this.IsGenericMethod = + (if this.DeclaringType.IsGenericType then this.DeclaringType.GetGenericArguments().Length else 0) < parameters.Length + + override this.GetGenericArguments() = + Seq.skip (if this.DeclaringType.IsGenericType then this.DeclaringType.GetGenericArguments().Length else 0) parameters |> Seq.toArray + + override __.GetGenericMethodDefinition() = genericMethodDefinition + + override __.DeclaringType = instType (parameters, [| |]) genericMethodDefinition.DeclaringType + override __.ToString() = "Method " + genericMethodDefinition.Name + override __.Name = genericMethodDefinition.Name + override __.MetadataToken = genericMethodDefinition.MetadataToken + override __.Attributes = genericMethodDefinition.Attributes + override __.CallingConvention = genericMethodDefinition.CallingConvention + override __.MemberType = genericMethodDefinition.MemberType + + override this.IsDefined(_attributeType, _inherit): bool = notRequired this "IsDefined" genericMethodDefinition.Name + override __.ReturnType = instType (parameters, [| |]) genericMethodDefinition.ReturnType + override __.GetParameters() = genericMethodDefinition.GetParameters() |> Array.map convParam + override __.ReturnParameter = genericMethodDefinition.ReturnParameter |> convParam + override this.ReturnTypeCustomAttributes = notRequired this "ReturnTypeCustomAttributes" genericMethodDefinition.Name + override this.GetBaseDefinition() = notRequired this "GetBaseDefinition" genericMethodDefinition.Name + override this.GetMethodImplementationFlags() = notRequired this "GetMethodImplementationFlags" genericMethodDefinition.Name + override this.MethodHandle = notRequired this "MethodHandle" genericMethodDefinition.Name + override this.Invoke(_obj, _invokeAttr, _binder, _parameters, _culture) = notRequired this "Invoke" genericMethodDefinition.Name + override this.ReflectedType = notRequired this "ReflectedType" genericMethodDefinition.Name + override __.GetCustomAttributes(_inherit) = emptyAttributes + override __.GetCustomAttributes(_attributeType, _inherit) = emptyAttributes + + //-------------------------------------------------------------------------------- + // ProvidedMethod, ProvidedConstructor, ProvidedTypeDefinition and other provided objects + + + [] + module Misc = + + + let mkParamArrayCustomAttributeData() = + { new CustomAttributeData() with + member __.Constructor = typeof.GetConstructors().[0] + member __.ConstructorArguments = upcast [| |] + member __.NamedArguments = upcast [| |] } + + let mkEditorHideMethodsCustomAttributeData() = + { new CustomAttributeData() with + member __.Constructor = typeof.GetConstructors().[0] + member __.ConstructorArguments = upcast [| |] + member __.NamedArguments = upcast [| |] } + + let mkAllowNullLiteralCustomAttributeData value = + { new CustomAttributeData() with + member __.Constructor = typeof.GetConstructors().[0] + member __.ConstructorArguments = upcast [| CustomAttributeTypedArgument(typeof, value) |] + member __.NamedArguments = upcast [| |] } + + /// This makes an xml doc attribute w.r.t. an amortized computation of an xml doc string. + /// It is important that the text of the xml doc only get forced when poking on the ConstructorArguments + /// for the CustomAttributeData object. + let mkXmlDocCustomAttributeDataLazy(lazyText: Lazy) = + { new CustomAttributeData() with + member __.Constructor = typeof.GetConstructors().[0] + member __.ConstructorArguments = upcast [| CustomAttributeTypedArgument(typeof, lazyText.Force()) |] + member __.NamedArguments = upcast [| |] } + + let mkXmlDocCustomAttributeData(s:string) = mkXmlDocCustomAttributeDataLazy (lazy s) + + let mkDefinitionLocationAttributeCustomAttributeData(line:int,column:int,filePath:string) = + { new CustomAttributeData() with + member __.Constructor = typeof.GetConstructors().[0] + member __.ConstructorArguments = upcast [| |] + member __.NamedArguments = + upcast [| CustomAttributeNamedArgument(typeof.GetProperty("FilePath"), CustomAttributeTypedArgument(typeof, filePath)); + CustomAttributeNamedArgument(typeof.GetProperty("Line"), CustomAttributeTypedArgument(typeof, line)) ; + CustomAttributeNamedArgument(typeof.GetProperty("Column"), CustomAttributeTypedArgument(typeof, column)) + |] } + let mkObsoleteAttributeCustomAttributeData(message:string, isError: bool) = + { new CustomAttributeData() with + member __.Constructor = typeof.GetConstructors() |> Array.find (fun x -> x.GetParameters().Length = 2) + member __.ConstructorArguments = upcast [|CustomAttributeTypedArgument(typeof, message) ; CustomAttributeTypedArgument(typeof, isError) |] + member __.NamedArguments = upcast [| |] } + + let mkReflectedDefinitionCustomAttributeData() = + { new CustomAttributeData() with + member __.Constructor = typeof.GetConstructors().[0] + member __.ConstructorArguments = upcast [| |] + member __.NamedArguments = upcast [| |] } + + type CustomAttributesImpl(customAttributesData) = + let customAttributes = ResizeArray() + let mutable hideObjectMethods = false + let mutable nonNullable = false + let mutable obsoleteMessage = None + let mutable xmlDocDelayed = None + let mutable xmlDocAlwaysRecomputed = None + let mutable hasParamArray = false + let mutable hasReflectedDefinition = false + + // XML doc text that we only compute once, if any. This must _not_ be forced until the ConstructorArguments + // property of the custom attribute is foced. + let xmlDocDelayedText = + lazy + (match xmlDocDelayed with None -> assert false; "" | Some f -> f()) + + // Custom atttributes that we only compute once + let customAttributesOnce = + lazy + [| if hideObjectMethods then yield mkEditorHideMethodsCustomAttributeData() + if nonNullable then yield mkAllowNullLiteralCustomAttributeData false + match xmlDocDelayed with None -> () | Some _ -> customAttributes.Add(mkXmlDocCustomAttributeDataLazy xmlDocDelayedText) + match obsoleteMessage with None -> () | Some s -> customAttributes.Add(mkObsoleteAttributeCustomAttributeData s) + if hasParamArray then yield mkParamArrayCustomAttributeData() + if hasReflectedDefinition then yield mkReflectedDefinitionCustomAttributeData() + yield! customAttributesData() + yield! customAttributes |] + + member __.AddDefinitionLocation(line:int,column:int,filePath:string) = customAttributes.Add(mkDefinitionLocationAttributeCustomAttributeData(line, column, filePath)) + member __.AddObsolete(message: string, isError) = obsoleteMessage <- Some (message,isError) + member __.HasParamArray with get() = hasParamArray and set(v) = hasParamArray <- v + member __.HasReflectedDefinition with get() = hasReflectedDefinition and set(v) = hasReflectedDefinition <- v + member __.AddXmlDocComputed xmlDocFunction = xmlDocAlwaysRecomputed <- Some xmlDocFunction + member __.AddXmlDocDelayed xmlDocFunction = xmlDocDelayed <- Some xmlDocFunction + member __.AddXmlDoc xmlDoc = xmlDocDelayed <- Some (K xmlDoc) + member __.HideObjectMethods with get() = hideObjectMethods and set v = hideObjectMethods <- v + member __.NonNullable with get () = nonNullable and set v = nonNullable <- v + member __.AddCustomAttribute(attribute) = customAttributes.Add(attribute) + member __.GetCustomAttributesData() = + [| yield! customAttributesOnce.Force() + // Recomputed XML doc is evaluated on every call to GetCustomAttributesData() + match xmlDocAlwaysRecomputed with None -> () | Some f -> yield mkXmlDocCustomAttributeData (f()) |] + :> IList<_> + + + type ProvidedStaticParameter(isTgt: bool, parameterName:string, parameterType:Type, parameterDefaultValue:obj option, customAttributesData) = + inherit ParameterInfo() + + let customAttributesImpl = CustomAttributesImpl(customAttributesData) + + new (parameterName:string, parameterType:Type, ?parameterDefaultValue:obj) = + ProvidedStaticParameter(false, parameterName, parameterType, parameterDefaultValue, (K [| |])) + + member __.AddXmlDocDelayed xmlDocFunction = customAttributesImpl.AddXmlDocDelayed xmlDocFunction + member __.AddXmlDocComputed xmlDocFunction = customAttributesImpl.AddXmlDocComputed xmlDocFunction + member __.AddXmlDoc xmlDoc = customAttributesImpl.AddXmlDoc xmlDoc + + member __.ParameterDefaultValue = parameterDefaultValue + member __.BelongsToTargetModel = isTgt + + override __.RawDefaultValue = defaultArg parameterDefaultValue null + override __.Attributes = if parameterDefaultValue.IsNone then enum 0 else ParameterAttributes.Optional + override __.Position = 0 + override __.ParameterType = parameterType + override __.Name = parameterName + override __.GetCustomAttributes(_inherit) = emptyAttributes + override __.GetCustomAttributes(_attributeType, _inherit) = emptyAttributes + override __.GetCustomAttributesData() = customAttributesImpl.GetCustomAttributesData() + + type ProvidedParameter(isTgt: bool, parameterName:string, attrs, parameterType:Type, optionalValue:obj option, customAttributesData) = + + inherit ParameterInfo() + + let customAttributesImpl = CustomAttributesImpl(customAttributesData) + + new (parameterName:string, parameterType:Type, ?isOut:bool, ?optionalValue:obj) = + ProvidedParameter(false, parameterName, parameterType, isOut, optionalValue) + + new (_isTgt, parameterName:string, parameterType:Type, isOut:bool option, optionalValue:obj option) = + let isOut = defaultArg isOut false + let attrs = (if isOut then ParameterAttributes.Out else enum 0) ||| + (match optionalValue with None -> enum 0 | Some _ -> ParameterAttributes.Optional ||| ParameterAttributes.HasDefault) + ProvidedParameter(false, parameterName, attrs, parameterType, optionalValue, K [| |]) + + member __.IsParamArray with set(v) = customAttributesImpl.HasParamArray <- v + member __.IsReflectedDefinition with set(v) = customAttributesImpl.HasReflectedDefinition <- v + member __.OptionalValue = optionalValue + member __.HasDefaultParameterValue = Option.isSome optionalValue + member __.BelongsToTargetModel = isTgt + member __.AddCustomAttribute(attribute) = customAttributesImpl.AddCustomAttribute(attribute) + + override __.Name = parameterName + override __.ParameterType = parameterType + override __.Attributes = attrs + override __.RawDefaultValue = defaultArg optionalValue null + override __.GetCustomAttributesData() = customAttributesImpl.GetCustomAttributesData() + + and ProvidedConstructor(isTgt: bool, attrs: MethodAttributes, parameters: ProvidedParameter[], invokeCode: (Expr list -> Expr), baseCall, isImplicitCtor, customAttributesData) = + + inherit ConstructorInfo() + let parameterInfos = parameters |> Array.map (fun p -> p :> ParameterInfo) + let mutable baseCall = baseCall + let mutable declaringType : ProvidedTypeDefinition option = None + let mutable isImplicitCtor = isImplicitCtor + let mutable attrs = attrs + let isStatic() = attrs.HasFlag(MethodAttributes.Static) + + let customAttributesImpl = CustomAttributesImpl(customAttributesData) + + new (parameters, invokeCode) = + ProvidedConstructor(false, MethodAttributes.Public ||| MethodAttributes.RTSpecialName, Array.ofList parameters, invokeCode, None, false, K [| |]) + + member __.IsTypeInitializer + with get() = isStatic() && attrs.HasFlag(MethodAttributes.Private) + and set(v) = + let typeInitializerAttributes = MethodAttributes.Static ||| MethodAttributes.Private + attrs <- if v then attrs ||| typeInitializerAttributes else attrs &&& ~~~typeInitializerAttributes + + member __.AddXmlDocComputed xmlDocFunction = customAttributesImpl.AddXmlDocComputed xmlDocFunction + member __.AddXmlDocDelayed xmlDocFunction = customAttributesImpl.AddXmlDocDelayed xmlDocFunction + member __.AddXmlDoc xmlDoc = customAttributesImpl.AddXmlDoc xmlDoc + member __.AddObsoleteAttribute (message,?isError) = customAttributesImpl.AddObsolete (message,defaultArg isError false) + member __.AddDefinitionLocation(line,column,filePath) = customAttributesImpl.AddDefinitionLocation(line, column, filePath) + + member __.PatchDeclaringType x = patchOption declaringType (fun () -> declaringType <- Some x) + member this.BaseConstructorCall + with set (d:Expr list -> (ConstructorInfo * Expr list)) = + match baseCall with + | None -> baseCall <- Some d + | Some _ -> failwithf "ProvidedConstructor: base call already given for '%s'" this.Name + + member __.IsImplicitConstructor with get() = isImplicitCtor and set v = isImplicitCtor <- v + member __.BaseCall = baseCall + member __.Parameters = parameters + member __.GetInvokeCode args = invokeCode args + member __.BelongsToTargetModel = isTgt + member __.DeclaringProvidedType = declaringType + member this.IsErased = (nonNone "DeclaringType" this.DeclaringProvidedType).IsErased + + // Implement overloads + override __.GetParameters() = parameterInfos + override __.Attributes = attrs + override __.Name = if isStatic() then ".cctor" else ".ctor" + override __.DeclaringType = declaringType |> nonNone "DeclaringType" :> Type + override __.IsDefined(_attributeType, _inherit) = true + + override this.Invoke(_invokeAttr, _binder, _parameters, _culture) = notRequired this "Invoke" this.Name + override this.Invoke(_obj, _invokeAttr, _binder, _parameters, _culture) = notRequired this "Invoke" this.Name + override this.ReflectedType = notRequired this "ReflectedType" this.Name + override this.GetMethodImplementationFlags() = notRequired this "GetMethodImplementationFlags" this.Name + override this.MethodHandle = notRequired this "MethodHandle" this.Name + override __.GetCustomAttributes(_inherit) = emptyAttributes + override __.GetCustomAttributes(_attributeType, _inherit) = emptyAttributes + override __.GetCustomAttributesData() = customAttributesImpl.GetCustomAttributesData() + + and ProvidedMethod(isTgt: bool, methodName: string, attrs: MethodAttributes, parameters: ProvidedParameter[], returnType: Type, invokeCode: (Expr list -> Expr), staticParams, staticParamsApply, customAttributesData) = + inherit MethodInfo() + let parameterInfos = parameters |> Array.map (fun p -> p :> ParameterInfo) + + let mutable declaringType : ProvidedTypeDefinition option = None + let mutable attrs = attrs + let mutable staticParams = staticParams + let mutable staticParamsApply = staticParamsApply + let customAttributesImpl = CustomAttributesImpl(customAttributesData) + + /// The public constructor for the design-time/source model + new (methodName, parameters, returnType, invokeCode, ?isStatic) = + let isStatic = defaultArg isStatic false + let attrs = if isStatic then MethodAttributes.Public ||| MethodAttributes.Static else MethodAttributes.Public + ProvidedMethod(false, methodName, attrs, Array.ofList parameters, returnType, invokeCode, [], None, K [| |]) + + member __.AddXmlDocComputed xmlDocFunction = customAttributesImpl.AddXmlDocComputed xmlDocFunction + member __.AddXmlDocDelayed xmlDocFunction = customAttributesImpl.AddXmlDocDelayed xmlDocFunction + member __.AddXmlDoc xmlDoc = customAttributesImpl.AddXmlDoc xmlDoc + member __.AddObsoleteAttribute (message,?isError) = customAttributesImpl.AddObsolete (message,defaultArg isError false) + member __.AddDefinitionLocation(line,column,filePath) = customAttributesImpl.AddDefinitionLocation(line, column, filePath) + member __.AddCustomAttribute(attribute) = customAttributesImpl.AddCustomAttribute(attribute) + + member __.SetMethodAttrs attributes = attrs <- attributes + member __.AddMethodAttrs attributes = attrs <- attrs ||| attributes + member __.PatchDeclaringType x = patchOption declaringType (fun () -> declaringType <- Some x) + + /// Abstract a type to a parametric-type. Requires "formal parameters" and "instantiation function". + member __.DefineStaticParameters(parameters: ProvidedStaticParameter list, instantiationFunction: (string -> obj[] -> ProvidedMethod)) = + staticParams <- parameters + staticParamsApply <- Some instantiationFunction + + /// Get ParameterInfo[] for the parametric type parameters + member __.GetStaticParametersInternal() = [| for p in staticParams -> p :> ParameterInfo |] + + /// Instantiate parametric method + member this.ApplyStaticArguments(mangledName:string, args:obj[]) = + if staticParams.Length <> args.Length then + failwithf "ProvidedMethod: expecting %d static parameters but given %d for method %s" staticParams.Length args.Length methodName + if staticParams.Length > 0 then + match staticParamsApply with + | None -> failwith "ProvidedMethod: DefineStaticParameters was not called" + | Some f -> f mangledName args + else + this + + member __.Parameters = parameters + member __.GetInvokeCode args = invokeCode args + member __.StaticParams = staticParams + member __.StaticParamsApply = staticParamsApply + member __.BelongsToTargetModel = isTgt + member __.DeclaringProvidedType = declaringType + member this.IsErased = (nonNone "DeclaringType" this.DeclaringProvidedType).IsErased + + // Implement overloads + override __.GetParameters() = parameterInfos + override __.Attributes = attrs + override __.Name = methodName + override __.DeclaringType = declaringType |> nonNone "DeclaringType" :> Type + override __.IsDefined(_attributeType, _inherit): bool = true + override __.MemberType = MemberTypes.Method + override x.CallingConvention = + let cc = CallingConventions.Standard + let cc = if not x.IsStatic then cc ||| CallingConventions.HasThis else cc + cc + override __.ReturnType = returnType + override __.ReturnParameter = null // REVIEW: Give it a name and type? + override __.ToString() = "Method " + methodName + + // These don't have to return fully accurate results - they are used + // by the F# Quotations library function SpecificCall as a pre-optimization + // when comparing methods + override __.MetadataToken = genToken() + override __.MethodHandle = RuntimeMethodHandle() + + override this.ReturnTypeCustomAttributes = notRequired this "ReturnTypeCustomAttributes" methodName + override this.GetBaseDefinition() = notRequired this "GetBaseDefinition" methodName + override this.GetMethodImplementationFlags() = notRequired this "GetMethodImplementationFlags" methodName + override this.Invoke(_obj, _invokeAttr, _binder, _parameters, _culture) = notRequired this "Invoke" methodName + override this.ReflectedType = notRequired this "ReflectedType" methodName + override __.GetCustomAttributes(_inherit) = emptyAttributes + override __.GetCustomAttributes(_attributeType, _inherit) = emptyAttributes + override __.GetCustomAttributesData() = customAttributesImpl.GetCustomAttributesData() + + + and ProvidedProperty(isTgt: bool, propertyName: string, attrs: PropertyAttributes, propertyType: Type, isStatic: bool, getter: (unit -> MethodInfo) option, setter: (unit -> MethodInfo) option, indexParameters: ProvidedParameter[], customAttributesData) = + inherit PropertyInfo() + + let mutable declaringType : ProvidedTypeDefinition option = None + + let customAttributesImpl = CustomAttributesImpl(customAttributesData) + + /// The public constructor for the design-time/source model + new (propertyName, propertyType, ?getterCode, ?setterCode, ?isStatic, ?indexParameters) = + let isStatic = defaultArg isStatic false + let indexParameters = defaultArg indexParameters [] + let pattrs = (if isStatic then MethodAttributes.Static else enum(0)) ||| MethodAttributes.Public ||| MethodAttributes.SpecialName + let getter = getterCode |> Option.map (fun code -> ProvidedMethod(false, "get_" + propertyName, pattrs, Array.ofList indexParameters, propertyType, code, [], None, K [| |]) :> MethodInfo) + let setter = setterCode |> Option.map (fun code -> ProvidedMethod(false, "set_" + propertyName, pattrs, [| yield! indexParameters; yield ProvidedParameter(false, "value",propertyType,isOut=Some false,optionalValue=None) |], typeof,code, [], None, K [| |]) :> MethodInfo) + ProvidedProperty(false, propertyName, PropertyAttributes.None, propertyType, isStatic, Option.map K getter, Option.map K setter, Array.ofList indexParameters, K [| |]) + + member __.AddXmlDocComputed xmlDocFunction = customAttributesImpl.AddXmlDocComputed xmlDocFunction + member __.AddXmlDocDelayed xmlDocFunction = customAttributesImpl.AddXmlDocDelayed xmlDocFunction + member __.AddXmlDoc xmlDoc = customAttributesImpl.AddXmlDoc xmlDoc + member __.AddObsoleteAttribute (message,?isError) = customAttributesImpl.AddObsolete (message,defaultArg isError false) + member __.AddDefinitionLocation(line,column,filePath) = customAttributesImpl.AddDefinitionLocation(line, column, filePath) + member __.AddCustomAttribute attribute = customAttributesImpl.AddCustomAttribute attribute + override __.GetCustomAttributesData() = customAttributesImpl.GetCustomAttributesData() + + member __.PatchDeclaringType x = + if not isTgt then + match getter with Some f -> (match f() with (:? ProvidedMethod as g) -> g.PatchDeclaringType x | _ -> ()) | _ -> () + match setter with Some f -> (match f() with (:? ProvidedMethod as s) -> s.PatchDeclaringType x | _ -> ()) | _ -> () + patchOption declaringType (fun () -> declaringType <- Some x) + + member __.IsStatic = isStatic + member __.IndexParameters = indexParameters + member __.BelongsToTargetModel = isTgt + member __.Getter = getter + member __.Setter = setter + + override __.PropertyType = propertyType + override this.SetValue(_obj, _value, _invokeAttr, _binder, _index, _culture) = notRequired this "SetValue" propertyName + override this.GetAccessors _nonPublic = notRequired this "nonPublic" propertyName + override __.GetGetMethod _nonPublic = match getter with None -> null | Some g -> g() + override __.GetSetMethod _nonPublic = match setter with None -> null | Some s -> s() + override __.GetIndexParameters() = [| for p in indexParameters -> upcast p |] + override __.Attributes = attrs + override __.CanRead = getter.IsSome + override __.CanWrite = setter.IsSome + override this.GetValue(_obj, _invokeAttr, _binder, _index, _culture): obj = notRequired this "GetValue" propertyName + override __.Name = propertyName + override __.DeclaringType = declaringType |> nonNone "DeclaringType":> Type + override __.MemberType: MemberTypes = MemberTypes.Property + + override this.ReflectedType = notRequired this "ReflectedType" propertyName + override __.GetCustomAttributes(_inherit) = emptyAttributes + override __.GetCustomAttributes(_attributeType, _inherit) = emptyAttributes + override this.IsDefined(_attributeType, _inherit) = notRequired this "IsDefined" propertyName + + and ProvidedEvent(isTgt: bool, eventName:string, attrs: EventAttributes, eventHandlerType:Type, isStatic: bool, adder: (unit -> MethodInfo), remover: (unit -> MethodInfo), customAttributesData) = + inherit EventInfo() + + let mutable declaringType : ProvidedTypeDefinition option = None + + let customAttributesImpl = CustomAttributesImpl(customAttributesData) + + new (eventName, eventHandlerType, adderCode, removerCode, ?isStatic) = + let isStatic = defaultArg isStatic false + let pattrs = (if isStatic then MethodAttributes.Static else enum(0)) ||| MethodAttributes.Public ||| MethodAttributes.SpecialName + let adder = ProvidedMethod(false, "add_" + eventName, pattrs, [| ProvidedParameter(false, "handler", eventHandlerType, isOut=Some false, optionalValue=None) |], typeof, adderCode, [], None, K [| |]) :> MethodInfo + let remover = ProvidedMethod(false, "remove_" + eventName, pattrs, [| ProvidedParameter(false, "handler", eventHandlerType, isOut=Some false, optionalValue=None) |], typeof, removerCode, [], None, K [| |]) :> MethodInfo + ProvidedEvent(false, eventName, EventAttributes.None, eventHandlerType, isStatic, K adder, K remover, K [| |]) + + member __.AddXmlDocComputed xmlDocFunction = customAttributesImpl.AddXmlDocComputed xmlDocFunction + member __.AddXmlDocDelayed xmlDocFunction = customAttributesImpl.AddXmlDocDelayed xmlDocFunction + member __.AddXmlDoc xmlDoc = customAttributesImpl.AddXmlDoc xmlDoc + member __.AddDefinitionLocation(line,column,filePath) = customAttributesImpl.AddDefinitionLocation(line, column, filePath) + + member __.PatchDeclaringType x = + if not isTgt then + match adder() with :? ProvidedMethod as a -> a.PatchDeclaringType x | _ -> () + match remover() with :? ProvidedMethod as r -> r.PatchDeclaringType x | _ -> () + patchOption declaringType (fun () -> declaringType <- Some x) + + member __.IsStatic = isStatic + member __.Adder = adder() + member __.Remover = remover() + member __.BelongsToTargetModel = isTgt + + override __.EventHandlerType = eventHandlerType + override __.GetAddMethod _nonPublic = adder() + override __.GetRemoveMethod _nonPublic = remover() + override __.Attributes = attrs + override __.Name = eventName + override __.DeclaringType = declaringType |> nonNone "DeclaringType":> Type + override __.MemberType: MemberTypes = MemberTypes.Event + + override this.GetRaiseMethod _nonPublic = notRequired this "GetRaiseMethod" eventName + override this.ReflectedType = notRequired this "ReflectedType" eventName + override __.GetCustomAttributes(_inherit) = emptyAttributes + override __.GetCustomAttributes(_attributeType, _inherit) = emptyAttributes + override this.IsDefined(_attributeType, _inherit) = notRequired this "IsDefined" eventName + override __.GetCustomAttributesData() = customAttributesImpl.GetCustomAttributesData() + + and ProvidedField(isTgt: bool, fieldName:string, attrs, fieldType:Type, rawConstantValue: obj, customAttributesData) = + inherit FieldInfo() + + let mutable declaringType : ProvidedTypeDefinition option = None + + let customAttributesImpl = CustomAttributesImpl(customAttributesData) + let mutable attrs = attrs + + new (fieldName:string, fieldType:Type) = ProvidedField(false, fieldName, FieldAttributes.Private, fieldType, null, (K [| |])) + + member __.AddXmlDocComputed xmlDocFunction = customAttributesImpl.AddXmlDocComputed xmlDocFunction + member __.AddXmlDocDelayed xmlDocFunction = customAttributesImpl.AddXmlDocDelayed xmlDocFunction + member __.AddXmlDoc xmlDoc = customAttributesImpl.AddXmlDoc xmlDoc + member __.AddObsoleteAttribute (message,?isError) = customAttributesImpl.AddObsolete (message,defaultArg isError false) + member __.AddDefinitionLocation(line,column,filePath) = customAttributesImpl.AddDefinitionLocation(line, column, filePath) + + member __.SetFieldAttributes attributes = attrs <- attributes + member __.BelongsToTargetModel = isTgt + + member __.PatchDeclaringType x = patchOption declaringType (fun () -> declaringType <- Some x) + + override __.GetCustomAttributesData() = customAttributesImpl.GetCustomAttributesData() + + // Implement overloads + override __.FieldType = fieldType + override __.GetRawConstantValue() = rawConstantValue + override __.Attributes = attrs + override __.Name = fieldName + override __.DeclaringType = declaringType |> nonNone "DeclaringType":> Type + override __.MemberType: MemberTypes = MemberTypes.Field + + override this.ReflectedType = notRequired this "ReflectedType" fieldName + override __.GetCustomAttributes(_inherit) = emptyAttributes + override __.GetCustomAttributes(_attributeType, _inherit) = emptyAttributes + override this.IsDefined(_attributeType, _inherit) = notRequired this "IsDefined" fieldName + + override this.SetValue(_obj, _value, _invokeAttr, _binder, _culture) = notRequired this "SetValue" fieldName + override this.GetValue(_obj): obj = notRequired this "GetValue" fieldName + override this.FieldHandle = notRequired this "FieldHandle" fieldName + + static member Literal(fieldName:string, fieldType:Type, literalValue: obj) = + ProvidedField(false, fieldName, (FieldAttributes.Static ||| FieldAttributes.Literal ||| FieldAttributes.Public), fieldType, literalValue, K [| |]) + + + and ProvidedMeasureBuilder() = + + // TODO: this shouldn't be hardcoded, but without creating a dependency on FSharp.Compiler.Service + // there seems to be no way to check if a type abbreviation exists + static let unitNamesTypeAbbreviations = + [ "meter"; "hertz"; "newton"; "pascal"; "joule"; "watt"; "coulomb"; + "volt"; "farad"; "ohm"; "siemens"; "weber"; "tesla"; "henry" + "lumen"; "lux"; "becquerel"; "gray"; "sievert"; "katal" ] + |> Set.ofList + + static let unitSymbolsTypeAbbreviations = + [ "m"; "kg"; "s"; "A"; "K"; "mol"; "cd"; "Hz"; "N"; "Pa"; "J"; "W"; "C" + "V"; "F"; "S"; "Wb"; "T"; "lm"; "lx"; "Bq"; "Gy"; "Sv"; "kat"; "H" ] + |> Set.ofList + + static member One = typeof + static member Product (measure1, measure2) = typedefof>.MakeGenericType [| measure1;measure2 |] + static member Inverse denominator = typedefof>.MakeGenericType [| denominator |] + static member Ratio (numerator, denominator) = ProvidedMeasureBuilder.Product(numerator, ProvidedMeasureBuilder.Inverse denominator) + static member Square m = ProvidedMeasureBuilder.Product(m, m) + + // If the unit is not a valid type, instead + // of assuming it's a type abbreviation, which may not be the case and cause a + // problem later on, check the list of valid abbreviations + static member SI (unitName:string) = + let mLowerCase = unitName.ToLowerInvariant() + let abbreviation = + if unitNamesTypeAbbreviations.Contains mLowerCase then + Some ("Microsoft.FSharp.Data.UnitSystems.SI.UnitNames", mLowerCase) + elif unitSymbolsTypeAbbreviations.Contains unitName then + Some ("Microsoft.FSharp.Data.UnitSystems.SI.UnitSymbols", unitName) + else + None + match abbreviation with + | Some (ns, unitName) -> + ProvidedTypeSymbol(ProvidedTypeSymbolKind.FSharpTypeAbbreviation(typeof.Assembly,ns,[| unitName |]), []) :> Type + | None -> + typedefof>.Assembly.GetType("Microsoft.FSharp.Data.UnitSystems.SI.UnitNames." + mLowerCase) + + static member AnnotateType (basic, argument) = ProvidedTypeSymbol(Generic basic, argument) :> Type + + and + [] + TypeContainer = + | Namespace of (unit -> Assembly) * string // namespace + | Type of ProvidedTypeDefinition + | TypeToBeDecided + + and ProvidedTypeDefinition(isTgt: bool, container:TypeContainer, className: string, getBaseType: (unit -> Type option), attrs: TypeAttributes, getEnumUnderlyingType, staticParams, staticParamsApply, initialData, customAttributesData, nonNullable, hideObjectMethods) as this = + inherit TypeDelegator() + + do match container, !ProvidedTypeDefinition.Logger with + | TypeContainer.Namespace _, Some logger when not isTgt -> logger (sprintf "Creating ProvidedTypeDefinition %s [%d]" className (System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode this)) + | _ -> () + + static let defaultAttributes isErased = + TypeAttributes.Public ||| + TypeAttributes.Class ||| + TypeAttributes.Sealed ||| + enum (if isErased then int32 TypeProviderTypeAttributes.IsErased else 0) + + // state + let mutable attrs = attrs + let mutable enumUnderlyingType = lazy getEnumUnderlyingType() + let mutable baseType = lazy getBaseType() + + /// Represents the evaluated members so far + let members = ResizeArray() + + /// Represents delayed members, as yet uncomputed + let membersQueue = ResizeArray<(unit -> MemberInfo[])>() + + let mutable staticParamsDefined = false + let mutable staticParams = staticParams + let mutable staticParamsApply = staticParamsApply + let mutable container = container + let interfaceImpls = ResizeArray() + let interfacesQueue = ResizeArray Type[]>() + let methodOverrides = ResizeArray() + let methodOverridesQueue = ResizeArray (ProvidedMethod * MethodInfo)[]>() + + do match initialData with + | None -> () + | Some (getFreshMembers, getFreshInterfaces, getFreshMethodOverrides) -> + membersQueue.Add getFreshMembers + interfacesQueue.Add getFreshInterfaces + methodOverridesQueue.Add getFreshMethodOverrides + + let evalMembers() = + if membersQueue.Count > 0 then + let elems = membersQueue |> Seq.toArray // take a copy in case more elements get added + membersQueue.Clear() + for f in elems do + for m in f() do + members.Add m + + // Implicitly add the property and event methods (only for the source model where they are not explicitly declared) + match m with + | :? ProvidedProperty as p -> + if not p.BelongsToTargetModel then + if p.CanRead then members.Add (p.GetGetMethod true) + if p.CanWrite then members.Add (p.GetSetMethod true) + | :? ProvidedEvent as e -> + if not e.BelongsToTargetModel then + members.Add (e.GetAddMethod true) + members.Add (e.GetRemoveMethod true) + | _ -> () + + // re-add the getFreshMembers call from the initialData to make sure we fetch the latest translated members from the source model + match initialData with + | None -> () + | Some (getFreshMembers, _getInterfaceImpls, _getMethodOverrides) -> + membersQueue.Add getFreshMembers + + + let getMembers() = + evalMembers() + members.ToArray() + + let evalInterfaces() = + if interfacesQueue.Count > 0 then + let elems = interfacesQueue |> Seq.toArray // take a copy in case more elements get added + interfacesQueue.Clear() + for f in elems do + for i in f() do + interfaceImpls.Add i + match initialData with + | None -> () + | Some (_getFreshMembers, getInterfaces, _getMethodOverrides) -> + interfacesQueue.Add getInterfaces + + let getInterfaces() = + evalInterfaces() + interfaceImpls.ToArray() + + let evalMethodOverrides () = + if methodOverridesQueue.Count > 0 then + let elems = methodOverridesQueue |> Seq.toArray // take a copy in case more elements get added + methodOverridesQueue.Clear() + for f in elems do + for i in f() do + methodOverrides.Add i + match initialData with + | None -> () + | Some (_getFreshMembers, _getInterfaceImpls, getMethodOverrides) -> + methodOverridesQueue.Add getMethodOverrides + + let getMethodOverrides () = + evalMethodOverrides () + methodOverrides.ToArray() + + let customAttributesImpl = CustomAttributesImpl(customAttributesData) + + do if nonNullable then customAttributesImpl.NonNullable <- true + do if hideObjectMethods then customAttributesImpl.HideObjectMethods <- true + do this.typeImpl <- this + + override __.GetCustomAttributesData() = customAttributesImpl.GetCustomAttributesData() + + new (assembly:Assembly, namespaceName, className, baseType, ?hideObjectMethods, ?nonNullable, ?isErased) = + let isErased = defaultArg isErased true + let nonNullable = defaultArg nonNullable false + let hideObjectMethods = defaultArg hideObjectMethods false + let attrs = defaultAttributes isErased + //if not isErased && assembly.GetType().Name <> "ProvidedAssembly" then failwithf "a non-erased (i.e. generative) ProvidedTypeDefinition '%s.%s' was placed in an assembly '%s' that is not a ProvidedAssembly" namespaceName className (assembly.GetName().Name) + ProvidedTypeDefinition(false, TypeContainer.Namespace (K assembly,namespaceName), className, K baseType, attrs, K None, [], None, None, K [| |], nonNullable, hideObjectMethods) + + new (className:string, baseType, ?hideObjectMethods, ?nonNullable, ?isErased) = + let isErased = defaultArg isErased true + let nonNullable = defaultArg nonNullable false + let hideObjectMethods = defaultArg hideObjectMethods false + let attrs = defaultAttributes isErased + ProvidedTypeDefinition(false, TypeContainer.TypeToBeDecided, className, K baseType, attrs, K None, [], None, None, K [| |], nonNullable, hideObjectMethods) + + // state ops + + override __.UnderlyingSystemType = typeof + + // Implement overloads + override __.Assembly = + match container with + | TypeContainer.Namespace (theAssembly,_) -> theAssembly() + | TypeContainer.Type t -> t.Assembly + | TypeContainer.TypeToBeDecided -> failwithf "type '%s' was not yet added as a member to a declaring type, stacktrace = %s" className Environment.StackTrace + + override __.FullName = + match container with + | TypeContainer.Type declaringType -> declaringType.FullName + "+" + className + | TypeContainer.Namespace (_,namespaceName) -> + if namespaceName="" then failwith "use null for global namespace" + match namespaceName with + | null -> className + | _ -> namespaceName + "." + className + | TypeContainer.TypeToBeDecided -> failwithf "type '%s' was not added as a member to a declaring type" className + + override __.Namespace = + match container with + | TypeContainer.Namespace (_,nsp) -> nsp + | TypeContainer.Type t -> t.Namespace + | TypeContainer.TypeToBeDecided -> failwithf "type '%s' was not added as a member to a declaring type" className + + override __.BaseType = match baseType.Value with Some ty -> ty | None -> null + + override __.GetConstructors bindingFlags = + getMembers() + |> Array.choose (function :? ConstructorInfo as c when memberBinds false bindingFlags c.IsStatic c.IsPublic -> Some c | _ -> None) + + override this.GetMethods bindingFlags = + getMembers() + |> Array.choose (function :? MethodInfo as m when memberBinds false bindingFlags m.IsStatic m.IsPublic -> Some m | _ -> None) + |> (if bindingFlags.HasFlag(BindingFlags.DeclaredOnly) || this.BaseType = null then id else (fun mems -> Array.append mems (this.ErasedBaseType.GetMethods(bindingFlags)))) + + override this.GetFields bindingFlags = + getMembers() + |> Array.choose (function :? FieldInfo as m when memberBinds false bindingFlags m.IsStatic m.IsPublic -> Some m | _ -> None) + |> (if bindingFlags.HasFlag(BindingFlags.DeclaredOnly) || this.BaseType = null then id else (fun mems -> Array.append mems (this.ErasedBaseType.GetFields(bindingFlags)))) + + override this.GetProperties bindingFlags = + getMembers() + |> Array.choose (function :? PropertyInfo as m when memberBinds false bindingFlags m.IsStatic m.IsPublic -> Some m | _ -> None) + |> (if bindingFlags.HasFlag(BindingFlags.DeclaredOnly) || this.BaseType = null then id else (fun mems -> Array.append mems (this.ErasedBaseType.GetProperties(bindingFlags)))) + + override this.GetEvents bindingFlags = + getMembers() + |> Array.choose (function :? EventInfo as m when memberBinds false bindingFlags m.IsStatic m.IsPublic -> Some m | _ -> None) + |> (if bindingFlags.HasFlag(BindingFlags.DeclaredOnly) || this.BaseType = null then id else (fun mems -> Array.append mems (this.ErasedBaseType.GetEvents(bindingFlags)))) + + override __.GetNestedTypes bindingFlags = + getMembers() + |> Array.choose (function :? Type as m when memberBinds true bindingFlags false m.IsPublic || m.IsNestedPublic -> Some m | _ -> None) + |> (if bindingFlags.HasFlag(BindingFlags.DeclaredOnly) || this.BaseType = null then id else (fun mems -> Array.append mems (this.ErasedBaseType.GetNestedTypes(bindingFlags)))) + + override this.GetConstructorImpl(bindingFlags, _binder, _callConventions, _types, _modifiers) = + let xs = this.GetConstructors bindingFlags |> Array.filter (fun m -> m.Name = ".ctor") + if xs.Length > 1 then failwith "GetConstructorImpl. not support overloads" + if xs.Length > 0 then xs.[0] else null + + override __.GetMethodImpl(name, bindingFlags, _binderBinder, _callConvention, _types, _modifiers): MethodInfo = + let xs = this.GetMethods bindingFlags |> Array.filter (fun m -> m.Name = name) + if xs.Length > 1 then failwithf "GetMethodImpl. not support overloads, name = '%s', methods - '%A', callstack = '%A'" name xs Environment.StackTrace + if xs.Length > 0 then xs.[0] else null + + override this.GetField(name, bindingFlags) = + let xs = this.GetFields bindingFlags |> Array.filter (fun m -> m.Name = name) + if xs.Length > 0 then xs.[0] else null + + override __.GetPropertyImpl(name, bindingFlags, _binder, _returnType, _types, _modifiers) = + let xs = this.GetProperties bindingFlags |> Array.filter (fun m -> m.Name = name) + if xs.Length > 0 then xs.[0] else null + + override __.GetEvent(name, bindingFlags) = + let xs = this.GetEvents bindingFlags |> Array.filter (fun m -> m.Name = name) + if xs.Length > 0 then xs.[0] else null + + override __.GetNestedType(name, bindingFlags) = + let xs = this.GetNestedTypes bindingFlags |> Array.filter (fun m -> m.Name = name) + if xs.Length > 0 then xs.[0] else null + + override __.GetInterface(_name, _ignoreCase) = notRequired this "GetInterface" this.Name + + override __.GetInterfaces() = getInterfaces() + + + override __.MakeArrayType() = ProvidedTypeSymbol(ProvidedTypeSymbolKind.SDArray, [this]) :> Type + + override __.MakeArrayType arg = ProvidedTypeSymbol(ProvidedTypeSymbolKind.Array arg, [this]) :> Type + + override __.MakePointerType() = ProvidedTypeSymbol(ProvidedTypeSymbolKind.Pointer, [this]) :> Type + + override __.MakeByRefType() = ProvidedTypeSymbol(ProvidedTypeSymbolKind.ByRef, [this]) :> Type + + // The binding attributes are always set to DeclaredOnly ||| Static ||| Instance ||| Public when GetMembers is called directly by the F# compiler + // However, it's possible for the framework to generate other sets of flags in some corner cases (e.g. via use of `enum` with a provided type as the target) + override __.GetMembers bindingFlags = + [| for m in getMembers() do + match m with + | :? ConstructorInfo as c when memberBinds false bindingFlags c.IsStatic c.IsPublic -> yield (c :> MemberInfo) + | :? MethodInfo as m when memberBinds false bindingFlags m.IsStatic m.IsPublic -> yield (m :> _) + | :? FieldInfo as m when memberBinds false bindingFlags m.IsStatic m.IsPublic -> yield (m :> _) + | :? PropertyInfo as m when memberBinds false bindingFlags m.IsStatic m.IsPublic -> yield (m :> _) + | :? EventInfo as m when memberBinds false bindingFlags m.IsStatic m.IsPublic -> yield (m :> _) + | :? Type as m when memberBinds true bindingFlags false m.IsPublic || m.IsNestedPublic -> yield (m :> _) + | _ -> () |] + + override this.GetMember(name,mt,_bindingFlags) = + let mt = if mt.HasFlag(MemberTypes.NestedType) then mt ||| MemberTypes.TypeInfo else mt + this.GetMembers() |> Array.filter (fun m -> 0 <> int(m.MemberType &&& mt) && m.Name = name) + + // Attributes, etc.. + override __.GetAttributeFlagsImpl() = adjustTypeAttributes this.IsNested attrs + + override this.IsValueTypeImpl() = + match this.BaseType with + | null -> false + | bt -> bt.FullName = "System.Enum" || bt.FullName = "System.ValueType" || bt.IsValueType + + override __.IsEnum = + match this.BaseType with + | null -> false + | bt -> bt.FullName = "System.Enum" || bt.IsEnum + + override __.GetEnumUnderlyingType() = + if this.IsEnum then + match enumUnderlyingType.Force() with + | None -> typeof + | Some ty -> ty + else failwithf "not enum type" + + override __.IsArrayImpl() = false + override __.IsByRefImpl() = false + override __.IsPointerImpl() = false + override __.IsPrimitiveImpl() = false + override __.IsCOMObjectImpl() = false + override __.HasElementTypeImpl() = false + override __.Name = className + + override __.DeclaringType = + match container with + | TypeContainer.Namespace _ -> null + | TypeContainer.Type enclosingTyp -> (enclosingTyp :> Type) + | TypeContainer.TypeToBeDecided -> failwithf "type '%s' was not added as a member to a declaring type" className + + override __.MemberType = if this.IsNested then MemberTypes.NestedType else MemberTypes.TypeInfo + + override x.GetHashCode() = x.Namespace.GetHashCode() ^^^ className.GetHashCode() + override this.Equals(that: obj) = Object.ReferenceEquals(this, that) + override this.Equals(that: Type) = Object.ReferenceEquals(this, that) + + override this.IsAssignableFrom(otherTy: Type) = isAssignableFrom this otherTy + + override this.IsSubclassOf(otherTy: Type) = isSubclassOf this otherTy + + override __.GetGenericArguments() = [||] + + override __.ToString() = this.Name + + override x.Module = x.Assembly.ManifestModule + + override __.GUID = Guid.Empty + override __.GetCustomAttributes(_inherit) = emptyAttributes + override __.GetCustomAttributes(_attributeType, _inherit) = emptyAttributes + override __.IsDefined(_attributeType: Type, _inherit) = false + + override __.GetElementType() = notRequired this "Module" this.Name + override __.InvokeMember(_name, _invokeAttr, _binder, _target, _args, _modifiers, _culture, _namedParameters) = notRequired this "Module" this.Name + override __.AssemblyQualifiedName = notRequired this "Module" this.Name + // Needed because TypeDelegator.cs provides a delegting implementation of this, and we are self-delegating + override this.GetEvents() = this.GetEvents(BindingFlags.Public ||| BindingFlags.Instance ||| BindingFlags.Static) // Needed because TypeDelegator.cs provides a delegting implementation of this, and we are self-delegating + + // Get the model + member __.BelongsToTargetModel = isTgt + member __.AttributesRaw = attrs + member __.EnumUnderlyingTypeRaw() = enumUnderlyingType.Force() + member __.Container = container + member __.BaseTypeRaw() = baseType.Force() + member __.StaticParams = staticParams + member __.StaticParamsApply = staticParamsApply + + // Fetch the members declared since the indicated position in the members list. This allows the target model to observe + // incremental additions made to the source model + member __.GetMembersFromCursor(idx: int) = evalMembers(); members.GetRange(idx, members.Count - idx).ToArray(), members.Count + + // Fetch the interfaces declared since the indicated position in the interfaces list + member __.GetInterfaceImplsFromCursor(idx: int) = evalInterfaces(); interfaceImpls.GetRange(idx, interfaceImpls.Count - idx).ToArray(), interfaceImpls.Count + + // Fetch the method overrides declared since the indicated position in the list + member __.GetMethodOverridesFromCursor(idx: int) = evalMethodOverrides(); methodOverrides.GetRange(idx, methodOverrides.Count - idx).ToArray(), methodOverrides.Count + + // Fetch the method overrides + member __.GetMethodOverrides() = getMethodOverrides() + + member this.ErasedBaseType : Type = ProvidedTypeDefinition.EraseType(this.BaseType) + + member __.AddXmlDocComputed xmlDocFunction = customAttributesImpl.AddXmlDocComputed xmlDocFunction + member __.AddXmlDocDelayed xmlDocFunction = customAttributesImpl.AddXmlDocDelayed xmlDocFunction + member __.AddXmlDoc xmlDoc = customAttributesImpl.AddXmlDoc xmlDoc + member __.AddObsoleteAttribute (message,?isError) = customAttributesImpl.AddObsolete (message,defaultArg isError false) + member __.AddDefinitionLocation(line,column,filePath) = customAttributesImpl.AddDefinitionLocation(line, column, filePath) + member __.HideObjectMethods with get() = customAttributesImpl.HideObjectMethods and set v = customAttributesImpl.HideObjectMethods <- v + member __.NonNullable with get() = customAttributesImpl.NonNullable and set v = customAttributesImpl.NonNullable <- v + member __.AddCustomAttribute attribute = customAttributesImpl.AddCustomAttribute attribute + + member __.SetEnumUnderlyingType(ty) = enumUnderlyingType <- lazy Some ty + member __.SetBaseType t = + if baseType.IsValueCreated then failwithf "The base type has already been evaluated for this type. Please call SetBaseType before any operations which traverse the type hierarchy. stacktrace = %A" Environment.StackTrace + baseType <- lazy Some t + member __.SetBaseTypeDelayed baseTypeFunction = + if baseType.IsValueCreated then failwithf "The base type has already been evaluated for this type. Please call SetBaseType before any operations which traverse the type hierarchy. stacktrace = %A" Environment.StackTrace + baseType <- lazy (Some (baseTypeFunction())) + member __.SetAttributes x = attrs <- x + + member this.AddMembers(memberInfos:list<#MemberInfo>) = + memberInfos |> List.iter this.PatchDeclaringTypeOfMember + membersQueue.Add (fun () -> memberInfos |> List.toArray |> Array.map (fun x -> x :> MemberInfo )) + + member __.AddMember(memberInfo:MemberInfo) = + this.AddMembers [memberInfo] + + member __.AddMembersDelayed(membersFunction: unit -> list<#MemberInfo>) = + membersQueue.Add (fun () -> membersFunction() |> List.toArray |> Array.map (fun x -> this.PatchDeclaringTypeOfMember x; x :> MemberInfo )) + + member __.AddMemberDelayed(memberFunction: unit -> #MemberInfo) = + this.AddMembersDelayed(fun () -> [memberFunction()]) + + member __.AddAssemblyTypesAsNestedTypesDelayed (assemblyFunction: unit -> Assembly) = + let bucketByPath nodef tipf (items: (string list * 'Value) list) = + // Find all the items with an empty key list and call 'tipf' + let tips = + [ for (keylist,v) in items do + match keylist with + | [] -> yield tipf v + | _ -> () ] + + // Find all the items with a non-empty key list. Bucket them together by + // the first key. For each bucket, call 'nodef' on that head key and the bucket. + let nodes = + let buckets = new Dictionary<_,_>(10) + for (keylist,v) in items do + match keylist with + | [] -> () + | key::rest -> + buckets.[key] <- (rest,v) :: (if buckets.ContainsKey key then buckets.[key] else []); + + [ for (KeyValue(key,items)) in buckets -> nodef key items ] + + tips @ nodes + this.AddMembersDelayed (fun _ -> + let topTypes = [ for ty in assemblyFunction().GetTypes() do + if not ty.IsNested then + let namespaceParts = match ty.Namespace with null -> [] | s -> s.Split '.' |> Array.toList + yield namespaceParts, ty ] + let rec loop types = + types + |> bucketByPath + (fun namespaceComponent typesUnderNamespaceComponent -> + let t = ProvidedTypeDefinition(namespaceComponent, baseType = Some typeof) + t.AddMembers (loop typesUnderNamespaceComponent) + (t :> Type)) + id + loop topTypes) + + /// Abstract a type to a parametric-type. Requires "formal parameters" and "instantiation function". + member __.DefineStaticParameters(parameters: ProvidedStaticParameter list, instantiationFunction: (string -> obj[] -> ProvidedTypeDefinition)) = + if staticParamsDefined then failwithf "Static parameters have already been defined for this type. stacktrace = %A" Environment.StackTrace + staticParamsDefined <- true + staticParams <- parameters + staticParamsApply <- Some instantiationFunction + + /// Get ParameterInfo[] for the parametric type parameters + member __.GetStaticParametersInternal() = [| for p in staticParams -> p :> ParameterInfo |] + + /// Instantiate parametric type + member this.ApplyStaticArguments(name:string, args:obj[]) = + if staticParams.Length <> args.Length then + failwithf "ProvidedTypeDefinition: expecting %d static parameters but given %d for type %s" staticParams.Length args.Length this.FullName + if staticParams.Length > 0 then + match staticParamsApply with + | None -> failwith "ProvidedTypeDefinition: DefineStaticParameters was not called" + | Some f -> f name args + else + this + + member __.PatchDeclaringType x = container <- TypeContainer.Type x + + member __.IsErased + with get() = (attrs &&& enum (int32 TypeProviderTypeAttributes.IsErased)) <> enum 0 + and set v = + if v then attrs <- attrs ||| enum (int32 TypeProviderTypeAttributes.IsErased) + else attrs <- attrs &&& ~~~(enum (int32 TypeProviderTypeAttributes.IsErased)) + + member __.SuppressRelocation + with get() = (attrs &&& enum (int32 TypeProviderTypeAttributes.SuppressRelocate)) <> enum 0 + and set v = + if v then attrs <- attrs ||| enum (int32 TypeProviderTypeAttributes.SuppressRelocate) + else attrs <- attrs &&& ~~~(enum (int32 TypeProviderTypeAttributes.SuppressRelocate)) + + member __.AddInterfaceImplementation interfaceType = interfaceImpls.Add interfaceType + + member __.AddInterfaceImplementationsDelayed interfacesFunction = interfacesQueue.Add (interfacesFunction >> Array.ofList) + + member __.SetAssemblyInternal (assembly: unit -> Assembly) = + match container with + | TypeContainer.Namespace (_, ns) -> container <- TypeContainer.Namespace (assembly, ns) + | TypeContainer.Type _ -> failwithf "can't set assembly of nested type '%s'" className + | TypeContainer.TypeToBeDecided -> failwithf "type '%s' was not added as a member to a declaring type" className + + member __.DefineMethodOverride (methodInfoBody,methodInfoDeclaration) = methodOverrides.Add (methodInfoBody, methodInfoDeclaration) + member __.DefineMethodOverridesDelayed f = methodOverridesQueue.Add (f >> Array.ofList) + + // This method is used by Debug.fs and QuotationBuilder.fs. + // Emulate the F# type provider type erasure mechanism to get the + // actual (erased) type. We erase ProvidedTypes to their base type + // and we erase array of provided type to array of base type. In the + // case of generics all the generic type arguments are also recursively + // replaced with the erased-to types + static member EraseType(typ:Type): Type = + match typ with + | :? ProvidedTypeDefinition as ptd when ptd.IsErased -> ProvidedTypeDefinition.EraseType typ.BaseType + | t when t.IsArray -> + let rank = t.GetArrayRank() + let et = ProvidedTypeDefinition.EraseType (t.GetElementType()) + if rank = 0 then et.MakeArrayType() else et.MakeArrayType(rank) + | :? ProvidedTypeSymbol as sym when sym.IsFSharpUnitAnnotated -> + typ.UnderlyingSystemType + | t when t.IsGenericType && not t.IsGenericTypeDefinition -> + let genericTypeDefinition = t.GetGenericTypeDefinition() + let genericArguments = t.GetGenericArguments() |> Array.map ProvidedTypeDefinition.EraseType + genericTypeDefinition.MakeGenericType(genericArguments) + | t -> t + + + member this.PatchDeclaringTypeOfMember (m:MemberInfo) = + match m with + | :? ProvidedConstructor as c -> c.PatchDeclaringType this + | :? ProvidedMethod as m -> m.PatchDeclaringType this + | :? ProvidedProperty as p -> p.PatchDeclaringType this + | :? ProvidedEvent as e -> e.PatchDeclaringType this + | :? ProvidedTypeDefinition as t -> t.PatchDeclaringType this + | :? ProvidedField as l -> l.PatchDeclaringType this + | _ -> () + + static member Logger: (string -> unit) option ref = ref None + + +//==================================================================================================== +// AssemblyReader for ProvidedTypesContext +// +// A lightweight .NET assembly reader that fits in a single F# file. Based on the well-tested Abstract IL +// binary reader code. Used by the type provider to read referenced asssemblies. + +namespace ProviderImplementation.ProvidedTypes.AssemblyReader + + #nowarn "1182" + + open System + open System.Collections.Generic + open System.Collections.Concurrent + open System.IO + open System.Reflection + open System.Text + open ProviderImplementation.ProvidedTypes + + [] + module Utils = + + let singleOfBits (x:int32) = System.BitConverter.ToSingle(System.BitConverter.GetBytes(x),0) + let doubleOfBits (x:int64) = System.BitConverter.Int64BitsToDouble(x) + + //--------------------------------------------------------------------- + // SHA1 hash-signing algorithm. Used to get the public key token from + // the public key. + //--------------------------------------------------------------------- + + // Little-endian encoding of int32 + let b0 n = byte (n &&& 0xFF) + let b1 n = byte ((n >>> 8) &&& 0xFF) + let b2 n = byte ((n >>> 16) &&& 0xFF) + let b3 n = byte ((n >>> 24) &&& 0xFF) + + // Little-endian encoding of int64 + let dw7 n = byte ((n >>> 56) &&& 0xFFL) + let dw6 n = byte ((n >>> 48) &&& 0xFFL) + let dw5 n = byte ((n >>> 40) &&& 0xFFL) + let dw4 n = byte ((n >>> 32) &&& 0xFFL) + let dw3 n = byte ((n >>> 24) &&& 0xFFL) + let dw2 n = byte ((n >>> 16) &&& 0xFFL) + let dw1 n = byte ((n >>> 8) &&& 0xFFL) + let dw0 n = byte (n &&& 0xFFL) + + + module SHA1 = + let inline (>>>&) (x:int) (y:int) = int32 (uint32 x >>> y) + let f(t,b,c,d) = + if t < 20 then (b &&& c) ||| ((~~~b) &&& d) + elif t < 40 then b ^^^ c ^^^ d + elif t < 60 then (b &&& c) ||| (b &&& d) ||| (c &&& d) + else b ^^^ c ^^^ d + + let [] k0to19 = 0x5A827999 + let [] k20to39 = 0x6ED9EBA1 + let [] k40to59 = 0x8F1BBCDC + let [] k60to79 = 0xCA62C1D6 + + let k t = + if t < 20 then k0to19 + elif t < 40 then k20to39 + elif t < 60 then k40to59 + else k60to79 + + type SHAStream = + { stream: byte[]; + mutable pos: int; + mutable eof: bool; } + + let rotLeft32 x n = (x <<< n) ||| (x >>>& (32-n)) + + // padding and length (in bits!) recorded at end + let shaAfterEof sha = + let n = sha.pos + let len = sha.stream.Length + if n = len then 0x80 + else + let paddedLen = (((len + 9 + 63) / 64) * 64) - 8 + if n < paddedLen - 8 then 0x0 + elif (n &&& 63) = 56 then int32 ((int64 len * int64 8) >>> 56) &&& 0xff + elif (n &&& 63) = 57 then int32 ((int64 len * int64 8) >>> 48) &&& 0xff + elif (n &&& 63) = 58 then int32 ((int64 len * int64 8) >>> 40) &&& 0xff + elif (n &&& 63) = 59 then int32 ((int64 len * int64 8) >>> 32) &&& 0xff + elif (n &&& 63) = 60 then int32 ((int64 len * int64 8) >>> 24) &&& 0xff + elif (n &&& 63) = 61 then int32 ((int64 len * int64 8) >>> 16) &&& 0xff + elif (n &&& 63) = 62 then int32 ((int64 len * int64 8) >>> 8) &&& 0xff + elif (n &&& 63) = 63 then (sha.eof <- true; int32 (int64 len * int64 8) &&& 0xff) + else 0x0 + + let shaRead8 sha = + let s = sha.stream + let b = if sha.pos >= s.Length then shaAfterEof sha else int32 s.[sha.pos] + sha.pos <- sha.pos + 1 + b + + let shaRead32 sha = + let b0 = shaRead8 sha + let b1 = shaRead8 sha + let b2 = shaRead8 sha + let b3 = shaRead8 sha + let res = (b0 <<< 24) ||| (b1 <<< 16) ||| (b2 <<< 8) ||| b3 + res + + let sha1Hash sha = + let mutable h0 = 0x67452301 + let mutable h1 = 0xEFCDAB89 + let mutable h2 = 0x98BADCFE + let mutable h3 = 0x10325476 + let mutable h4 = 0xC3D2E1F0 + let mutable a = 0 + let mutable b = 0 + let mutable c = 0 + let mutable d = 0 + let mutable e = 0 + let w = Array.create 80 0x00 + while (not sha.eof) do + for i = 0 to 15 do + w.[i] <- shaRead32 sha + for t = 16 to 79 do + w.[t] <- rotLeft32 (w.[t-3] ^^^ w.[t-8] ^^^ w.[t-14] ^^^ w.[t-16]) 1 + a <- h0 + b <- h1 + c <- h2 + d <- h3 + e <- h4 + for t = 0 to 79 do + let temp = (rotLeft32 a 5) + f(t,b,c,d) + e + w.[t] + k(t) + e <- d + d <- c + c <- rotLeft32 b 30 + b <- a + a <- temp + h0 <- h0 + a + h1 <- h1 + b + h2 <- h2 + c + h3 <- h3 + d + h4 <- h4 + e + h0,h1,h2,h3,h4 + + let sha1HashBytes s = + let (_h0,_h1,_h2,h3,h4) = sha1Hash { stream = s; pos = 0; eof = false } // the result of the SHA algorithm is stored in registers 3 and 4 + Array.map byte [| b0 h4; b1 h4; b2 h4; b3 h4; b0 h3; b1 h3; b2 h3; b3 h3; |] + + + let sha1HashBytes s = SHA1.sha1HashBytes s + + + [] + type PublicKey = + | PublicKey of byte[] + | PublicKeyToken of byte[] + member x.IsKey=match x with PublicKey _ -> true | _ -> false + member x.IsKeyToken=match x with PublicKeyToken _ -> true | _ -> false + member x.Key=match x with PublicKey b -> b | _ -> failwithf "not a key" + member x.KeyToken=match x with PublicKeyToken b -> b | _ -> failwithf"not a key token" + + member x.ToToken() = + match x with + | PublicKey bytes -> SHA1.sha1HashBytes bytes + | PublicKeyToken token -> token + static member KeyAsToken(k) = PublicKeyToken(PublicKey(k).ToToken()) + + [] + type ILAssemblyRef(name: string, hash: byte[] uoption, publicKey: PublicKey uoption, retargetable: bool, version: Version uoption, locale: string uoption) = + member __.Name=name + member __.Hash=hash + member __.PublicKey=publicKey + member __.Retargetable=retargetable + member __.Version=version + member __.Locale=locale + + member x.ToAssemblyName() = + let asmName = AssemblyName(Name=x.Name) + match x.PublicKey with + | USome bytes -> asmName.SetPublicKeyToken(bytes.ToToken()) + | UNone -> () + match x.Version with + | USome v -> asmName.Version <- v + | UNone -> () + #if NETSTANDARD + asmName.CultureName <- System.Globalization.CultureInfo.InvariantCulture.Name + #else + asmName.CultureInfo <- System.Globalization.CultureInfo.InvariantCulture + #endif + asmName + + static member FromAssemblyName (aname:AssemblyName) = + let locale = UNone + let publicKey = + match aname.GetPublicKey() with + | null | [| |] -> + match aname.GetPublicKeyToken() with + | null | [| |] -> UNone + | bytes -> USome (PublicKeyToken bytes) + | bytes -> + USome (PublicKey.KeyAsToken(bytes)) + + let version = + match aname.Version with + | null -> UNone + | v -> USome (Version(v.Major,v.Minor,v.Build,v.Revision)) + + let retargetable = aname.Flags = System.Reflection.AssemblyNameFlags.Retargetable + + ILAssemblyRef(aname.Name,UNone,publicKey,retargetable,version,locale) + + member aref.QualifiedName = + let b = new StringBuilder(100) + let add (s:string) = (b.Append(s) |> ignore) + let addC (s:char) = (b.Append(s) |> ignore) + add(aref.Name); + match aref.Version with + | UNone -> () + | USome v -> + add ", Version="; + add (string v.Major) + add "."; + add (string v.Minor) + add "."; + add (string v.Build) + add "."; + add (string v.Revision) + add ", Culture=" + match aref.Locale with + | UNone -> add "neutral" + | USome b -> add b + add ", PublicKeyToken=" + match aref.PublicKey with + | UNone -> add "null" + | USome pki -> + let pkt = pki.ToToken() + let convDigit(digit) = + let digitc = + if digit < 10 + then System.Convert.ToInt32 '0' + digit + else System.Convert.ToInt32 'a' + (digit - 10) + System.Convert.ToChar(digitc) + for i = 0 to pkt.Length-1 do + let v = pkt.[i] + addC (convDigit(System.Convert.ToInt32(v)/16)) + addC (convDigit(System.Convert.ToInt32(v)%16)) + // retargetable can be true only for system assemblies that definitely have Version + if aref.Retargetable then + add ", Retargetable=Yes" + b.ToString() + override x.ToString() = x.QualifiedName + + + type ILModuleRef(name:string, hasMetadata: bool, hash: byte[] uoption) = + member __.Name=name + member __.HasMetadata=hasMetadata + member __.Hash=hash + override __.ToString() = "module " + name + + + [] + type ILScopeRef = + | Local + | Module of ILModuleRef + | Assembly of ILAssemblyRef + member x.IsLocalRef = match x with ILScopeRef.Local -> true | _ -> false + member x.IsModuleRef = match x with ILScopeRef.Module _ -> true | _ -> false + member x.IsAssemblyRef= match x with ILScopeRef.Assembly _ -> true | _ -> false + member x.ModuleRef = match x with ILScopeRef.Module x -> x | _ -> failwith "not a module reference" + member x.AssemblyRef = match x with ILScopeRef.Assembly x -> x | _ -> failwith "not an assembly reference" + + member x.QualifiedName = + match x with + | ILScopeRef.Local -> "" + | ILScopeRef.Module mref -> "module "+mref.Name + | ILScopeRef.Assembly aref -> aref.QualifiedName + + override x.ToString() = x.QualifiedName + + type ILArrayBound = int32 option + type ILArrayBounds = ILArrayBound * ILArrayBound + + [] + type ILArrayShape = + | ILArrayShape of ILArrayBounds[] (* lobound/size pairs *) + member x.Rank = (let (ILArrayShape l) = x in l.Length) + static member SingleDimensional = ILArrayShapeStatics.SingleDimensional + static member FromRank n = if n = 1 then ILArrayShape.SingleDimensional else ILArrayShape(List.replicate n (Some 0,None) |> List.toArray) + + + and ILArrayShapeStatics() = + static let singleDimensional = ILArrayShape [| (Some 0, None) |] + static member SingleDimensional = singleDimensional + + /// Calling conventions. These are used in method pointer types. + [] + type ILArgConvention = + | Default + | CDecl + | StdCall + | ThisCall + | FastCall + | VarArg + + [] + type ILThisConvention = + | Instance + | InstanceExplicit + | Static + + [] + type ILCallingConv = + | Callconv of ILThisConvention * ILArgConvention + member x.ThisConv = let (Callconv(a,_b)) = x in a + member x.BasicConv = let (Callconv(_a,b)) = x in b + member x.IsInstance = match x.ThisConv with ILThisConvention.Instance -> true | _ -> false + member x.IsInstanceExplicit = match x.ThisConv with ILThisConvention.InstanceExplicit -> true | _ -> false + member x.IsStatic = match x.ThisConv with ILThisConvention.Static -> true | _ -> false + + static member Instance = ILCallingConvStatics.Instance + static member Static = ILCallingConvStatics.Static + + /// Static storage to amortize the allocation of ILCallingConv.Instance and ILCallingConv.Static + and ILCallingConvStatics() = + static let instanceCallConv = Callconv(ILThisConvention.Instance,ILArgConvention.Default) + static let staticCallConv = Callconv(ILThisConvention.Static,ILArgConvention.Default) + static member Instance = instanceCallConv + static member Static = staticCallConv + + type ILBoxity = + | AsObject + | AsValue + + [] + type ILTypeRefScope = + | Top of ILScopeRef + | Nested of ILTypeRef + member x.QualifiedNameExtension = + match x with + | Top scoref -> + let sco = scoref.QualifiedName + if sco = "" then "" else ", " + sco + | Nested tref -> + tref.QualifiedNameExtension + + + // IL type references have a pre-computed hash code to enable quick lookup tables during binary generation. + and ILTypeRef(enc: ILTypeRefScope, nsp: string uoption, name: string) = + + member __.Scope = enc + member __.Name = name + member __.Namespace = nsp + + member tref.FullName = + match enc with + | ILTypeRefScope.Top _ -> joinILTypeName tref.Namespace tref.Name + | ILTypeRefScope.Nested enc -> enc.FullName + "." + tref.Name + + member tref.BasicQualifiedName = + match enc with + | ILTypeRefScope.Top _ -> joinILTypeName tref.Namespace tref.Name + | ILTypeRefScope.Nested enc -> enc.BasicQualifiedName + "+" + tref.Name + + member __.QualifiedNameExtension = enc.QualifiedNameExtension + + member tref.QualifiedName = tref.BasicQualifiedName + enc.QualifiedNameExtension + + override x.ToString() = x.FullName + + + and ILTypeSpec(typeRef: ILTypeRef, inst: ILGenericArgs) = + member __.TypeRef = typeRef + member x.Scope = x.TypeRef.Scope + member x.Name = x.TypeRef.Name + member x.Namespace = x.TypeRef.Namespace + member __.GenericArgs = inst + member x.BasicQualifiedName = + let tc = x.TypeRef.BasicQualifiedName + if x.GenericArgs.Length = 0 then + tc + else + tc + "[" + String.concat "," (x.GenericArgs |> Array.map (fun arg -> "[" + arg.QualifiedName + "]")) + "]" + + member x.QualifiedNameExtension = + x.TypeRef.QualifiedNameExtension + + member x.FullName = x.TypeRef.FullName + + override x.ToString() = x.TypeRef.ToString() + (if x.GenericArgs.Length = 0 then "" else "<...>") + + and [] + ILType = + | Void + | Array of ILArrayShape * ILType + | Value of ILTypeSpec + | Boxed of ILTypeSpec + | Ptr of ILType + | Byref of ILType + | FunctionPointer of ILCallingSignature + | Var of int + | Modified of bool * ILTypeRef * ILType + + member x.BasicQualifiedName = + match x with + | ILType.Var n -> "!" + string n + | ILType.Modified(_,_ty1,ty2) -> ty2.BasicQualifiedName + | ILType.Array (ILArrayShape(s),ty) -> ty.BasicQualifiedName + "[" + System.String(',',s.Length-1) + "]" + | ILType.Value tr | ILType.Boxed tr -> tr.BasicQualifiedName + | ILType.Void -> "void" + | ILType.Ptr _ty -> failwith "unexpected pointer type" + | ILType.Byref _ty -> failwith "unexpected byref type" + | ILType.FunctionPointer _mref -> failwith "unexpected function pointer type" + + member x.QualifiedNameExtension = + match x with + | ILType.Var _n -> "" + | ILType.Modified(_,_ty1,ty2) -> ty2.QualifiedNameExtension + | ILType.Array (ILArrayShape(_s),ty) -> ty.QualifiedNameExtension + | ILType.Value tr | ILType.Boxed tr -> tr.QualifiedNameExtension + | ILType.Void -> failwith "void" + | ILType.Ptr _ty -> failwith "unexpected pointer type" + | ILType.Byref _ty -> failwith "unexpected byref type" + | ILType.FunctionPointer _mref -> failwith "unexpected function pointer type" + + member x.QualifiedName = + x.BasicQualifiedName + x.QualifiedNameExtension + + member x.TypeSpec = + match x with + | ILType.Boxed tr | ILType.Value tr -> tr + | _ -> failwithf "not a nominal type" + + member x.Boxity = + match x with + | ILType.Boxed _ -> AsObject + | ILType.Value _ -> AsValue + | _ -> failwithf "not a nominal type" + + member x.TypeRef = + match x with + | ILType.Boxed tspec | ILType.Value tspec -> tspec.TypeRef + | _ -> failwithf "not a nominal type" + + member x.IsNominal = + match x with + | ILType.Boxed _ | ILType.Value _ -> true + | _ -> false + + member x.GenericArgs = + match x with + | ILType.Boxed tspec | ILType.Value tspec -> tspec.GenericArgs + | _ -> [| |] + + member x.IsTyvar = + match x with + | ILType.Var _ -> true | _ -> false + + override x.ToString() = x.QualifiedName + + and ILCallingSignature(callingConv: ILCallingConv, argTypes: ILTypes, returnType: ILType) = + member __.CallingConv = callingConv + member __.ArgTypes = argTypes + member __.ReturnType = returnType + + and ILGenericArgs = ILType[] + and ILTypes = ILType[] + + + type ILMethodRef(parent: ILTypeRef, callconv: ILCallingConv, genericArity: int, name: string, args: ILTypes, ret: ILType) = + member __.EnclosingTypeRef = parent + member __.CallingConv = callconv + member __.Name = name + member __.GenericArity = genericArity + member __.ArgCount = args.Length + member __.ArgTypes = args + member __.ReturnType = ret + + member x.CallingSignature = ILCallingSignature (x.CallingConv,x.ArgTypes,x.ReturnType) + override x.ToString() = x.EnclosingTypeRef.ToString() + "::" + x.Name + "(...)" + + + type ILFieldRef(enclosingTypeRef: ILTypeRef, name: string, typ: ILType) = + member __.EnclosingTypeRef = enclosingTypeRef + member __.Name = name + member __.Type = typ + override x.ToString() = x.EnclosingTypeRef.ToString() + "::" + x.Name + + type ILMethodSpec(methodRef: ILMethodRef, enclosingType: ILType, methodInst: ILGenericArgs) = + member __.MethodRef = methodRef + member __.EnclosingType = enclosingType + member __.GenericArgs = methodInst + member x.Name = x.MethodRef.Name + member x.CallingConv = x.MethodRef.CallingConv + member x.GenericArity = x.MethodRef.GenericArity + member x.FormalArgTypes = x.MethodRef.ArgTypes + member x.FormalReturnType = x.MethodRef.ReturnType + override x.ToString() = x.MethodRef.ToString() + "(...)" + + type ILFieldSpec(fieldRef: ILFieldRef, enclosingType: ILType) = + member __.FieldRef = fieldRef + member __.EnclosingType = enclosingType + member __.FormalType = fieldRef.Type + member __.Name = fieldRef.Name + member __.EnclosingTypeRef = fieldRef.EnclosingTypeRef + override x.ToString() = x.FieldRef.ToString() + + type ILCodeLabel = int + + // -------------------------------------------------------------------- + // Instruction set. + // -------------------------------------------------------------------- + + type ILBasicType = + | DT_R + | DT_I1 + | DT_U1 + | DT_I2 + | DT_U2 + | DT_I4 + | DT_U4 + | DT_I8 + | DT_U8 + | DT_R4 + | DT_R8 + | DT_I + | DT_U + | DT_REF + + [] + type ILToken = + | ILType of ILType + | ILMethod of ILMethodSpec + | ILField of ILFieldSpec + + [] + type ILConst = + | I4 of int32 + | I8 of int64 + | R4 of single + | R8 of double + + type ILTailcall = + | Tailcall + | Normalcall + + type ILAlignment = + | Aligned + | Unaligned1 + | Unaligned2 + | Unaligned4 + + type ILVolatility = + | Volatile + | Nonvolatile + + type ILReadonly = + | ReadonlyAddress + | NormalAddress + + type ILVarArgs = ILTypes option + + [] + type ILComparisonInstr = + | I_beq + | I_bge + | I_bge_un + | I_bgt + | I_bgt_un + | I_ble + | I_ble_un + | I_blt + | I_blt_un + | I_bne_un + | I_brfalse + | I_brtrue + + +#if DEBUG_INFO + type ILSourceMarker = + { sourceDocument: ILSourceDocument; + sourceLine: int; + sourceColumn: int; + sourceEndLine: int; + sourceEndColumn: int } + static member Create(document, line, column, endLine, endColumn) = + { sourceDocument=document; + sourceLine=line; + sourceColumn=column; + sourceEndLine=endLine; + sourceEndColumn=endColumn } + member x.Document=x.sourceDocument + member x.Line=x.sourceLine + member x.Column=x.sourceColumn + member x.EndLine=x.sourceEndLine + member x.EndColumn=x.sourceEndColumn + override x.ToString() = sprintf "(%d,%d)-(%d,%d)" x.Line x.Column x.EndLine x.EndColumn +#endif + + [] + type ILInstr = + | I_add + | I_add_ovf + | I_add_ovf_un + | I_and + | I_div + | I_div_un + | I_ceq + | I_cgt + | I_cgt_un + | I_clt + | I_clt_un + | I_conv of ILBasicType + | I_conv_ovf of ILBasicType + | I_conv_ovf_un of ILBasicType + | I_mul + | I_mul_ovf + | I_mul_ovf_un + | I_rem + | I_rem_un + | I_shl + | I_shr + | I_shr_un + | I_sub + | I_sub_ovf + | I_sub_ovf_un + | I_xor + | I_or + | I_neg + | I_not + | I_ldnull + | I_dup + | I_pop + | I_ckfinite + | I_nop + | I_ldc of ILBasicType * ILConst + | I_ldarg of int + | I_ldarga of int + | I_ldind of ILAlignment * ILVolatility * ILBasicType + | I_ldloc of int + | I_ldloca of int + | I_starg of int + | I_stind of ILAlignment * ILVolatility * ILBasicType + | I_stloc of int + + | I_br of ILCodeLabel + | I_jmp of ILMethodSpec + | I_brcmp of ILComparisonInstr * ILCodeLabel + | I_switch of ILCodeLabel list + | I_ret + + | I_call of ILTailcall * ILMethodSpec * ILVarArgs + | I_callvirt of ILTailcall * ILMethodSpec * ILVarArgs + | I_callconstraint of ILTailcall * ILType * ILMethodSpec * ILVarArgs + | I_calli of ILTailcall * ILCallingSignature * ILVarArgs + | I_ldftn of ILMethodSpec + | I_newobj of ILMethodSpec * ILVarArgs + + | I_throw + | I_endfinally + | I_endfilter + | I_leave of ILCodeLabel + | I_rethrow + + | I_ldsfld of ILVolatility * ILFieldSpec + | I_ldfld of ILAlignment * ILVolatility * ILFieldSpec + | I_ldsflda of ILFieldSpec + | I_ldflda of ILFieldSpec + | I_stsfld of ILVolatility * ILFieldSpec + | I_stfld of ILAlignment * ILVolatility * ILFieldSpec + | I_ldstr of string + | I_isinst of ILType + | I_castclass of ILType + | I_ldtoken of ILToken + | I_ldvirtftn of ILMethodSpec + + | I_cpobj of ILType + | I_initobj of ILType + | I_ldobj of ILAlignment * ILVolatility * ILType + | I_stobj of ILAlignment * ILVolatility * ILType + | I_box of ILType + | I_unbox of ILType + | I_unbox_any of ILType + | I_sizeof of ILType + + | I_ldelem of ILBasicType + | I_stelem of ILBasicType + | I_ldelema of ILReadonly * ILArrayShape * ILType + | I_ldelem_any of ILArrayShape * ILType + | I_stelem_any of ILArrayShape * ILType + | I_newarr of ILArrayShape * ILType + | I_ldlen + + | I_mkrefany of ILType + | I_refanytype + | I_refanyval of ILType + + | I_break +#if EMIT_DEBUG_INFO + | I_seqpoint of ILSourceMarker +#endif + | I_arglist + + | I_localloc + | I_cpblk of ILAlignment * ILVolatility + | I_initblk of ILAlignment * ILVolatility + + (* FOR EXTENSIONS, e.g. MS-ILX *) + | EI_ilzero of ILType + | EI_ldlen_multi of int32 * int32 + + + [] + type ILExceptionClause = + | Finally of (ILCodeLabel * ILCodeLabel) + | Fault of (ILCodeLabel * ILCodeLabel) + | FilterCatch of (ILCodeLabel * ILCodeLabel) * (ILCodeLabel * ILCodeLabel) + | TypeCatch of ILType * (ILCodeLabel * ILCodeLabel) + + [] + type ILExceptionSpec = + { Range: (ILCodeLabel * ILCodeLabel); + Clause: ILExceptionClause } + + /// Indicates that a particular local variable has a particular source + /// language name within a given set of ranges. This does not effect local + /// variable numbering, which is global over the whole method. + [] + type ILLocalDebugMapping = + { LocalIndex: int; + LocalName: string; } + + [] + type ILLocalDebugInfo = + { Range: (ILCodeLabel * ILCodeLabel); + DebugMappings: ILLocalDebugMapping[] } + + [] + type ILCode = + { Labels: Dictionary + Instrs:ILInstr[] + Exceptions: ILExceptionSpec[] + Locals: ILLocalDebugInfo[] } + + [] + type ILLocal = + { Type: ILType; + IsPinned: bool; + DebugInfo: (string * int * int) option } + + type ILLocals = ILLocal[] + + [] + type ILMethodBody = + { IsZeroInit: bool + MaxStack: int32 + Locals: ILLocals + Code: ILCode +#if EMIT_DEBUG_INFO + SourceMarker: ILSourceMarker option +#endif + } + + type ILPlatform = + | X86 + | AMD64 + | IA64 + + type ILCustomAttrNamedArg = ILCustomAttrNamedArg of (string * ILType * obj) + + type ILCustomAttribute = + { Method: ILMethodSpec + Data: byte[] + Elements: obj list} + + type ILCustomAttrs = + abstract Entries: ILCustomAttribute[] + + type ILCustomAttrsStatics() = + static let empty = { new ILCustomAttrs with member __.Entries = [| |] } + static member Empty = empty + + [] + type ILMemberAccess = + | Assembly + | CompilerControlled + | FamilyAndAssembly + | FamilyOrAssembly + | Family + | Private + | Public + static member OfFlags (flags: int) = + let f = (flags &&& 0x00000007) + if f = 0x00000001 then ILMemberAccess.Private + elif f = 0x00000006 then ILMemberAccess.Public + elif f = 0x00000004 then ILMemberAccess.Family + elif f = 0x00000002 then ILMemberAccess.FamilyAndAssembly + elif f = 0x00000005 then ILMemberAccess.FamilyOrAssembly + elif f = 0x00000003 then ILMemberAccess.Assembly + else ILMemberAccess.CompilerControlled + + [] + type ILFieldInit = obj + + type ILParameter = + { Name: string uoption + ParameterType: ILType + Default: ILFieldInit uoption + //Marshal: ILNativeType option + Attributes: ParameterAttributes + CustomAttrs: ILCustomAttrs } + member x.IsIn = ((x.Attributes &&& ParameterAttributes.In) <> enum 0) + member x.IsOut = ((x.Attributes &&& ParameterAttributes.Out) <> enum 0) + member x.IsOptional = ((x.Attributes &&& ParameterAttributes.Optional) <> enum 0) + + type ILParameters = ILParameter[] + + type ILReturn = + { //Marshal: ILNativeType option; + Type: ILType; + CustomAttrs: ILCustomAttrs } + + type ILOverridesSpec = + | OverridesSpec of ILMethodRef * ILType + member x.MethodRef = let (OverridesSpec(mr,_ty)) = x in mr + member x.EnclosingType = let (OverridesSpec(_mr,ty)) = x in ty + + [] + type ILGenericVariance = + | NonVariant + | CoVariant + | ContraVariant + + type ILGenericParameterDef = + { Name: string + Constraints: ILTypes + Attributes: GenericParameterAttributes + CustomAttrs: ILCustomAttrs + Token: int } + + member x.HasReferenceTypeConstraint= (x.Attributes &&& GenericParameterAttributes.ReferenceTypeConstraint) <> enum 0 + member x.HasNotNullableValueTypeConstraint= (x.Attributes &&& GenericParameterAttributes.NotNullableValueTypeConstraint) <> enum 0 + member x.HasDefaultConstructorConstraint= (x.Attributes &&& GenericParameterAttributes.DefaultConstructorConstraint) <> enum 0 + member x.IsCovariant = (x.Attributes &&& GenericParameterAttributes.Covariant) <> enum 0 + member x.IsContravariant = (x.Attributes &&& GenericParameterAttributes.Contravariant) <> enum 0 + override x.ToString() = x.Name + + type ILGenericParameterDefs = ILGenericParameterDef[] + + [] + type ILMethodDef = + { Token: int32 + Name: string + CallingConv: ILCallingConv + Parameters: ILParameters + Return: ILReturn + Body: ILMethodBody option + ImplAttributes: MethodImplAttributes + //SecurityDecls: ILPermissions + //HasSecurity: bool + IsEntryPoint:bool + Attributes: MethodAttributes + GenericParams: ILGenericParameterDefs + CustomAttrs: ILCustomAttrs } + member x.ParameterTypes = x.Parameters |> Array.map (fun p -> p.ParameterType) + static member ComputeIsStatic attrs = attrs &&& MethodAttributes.Static <> enum 0 + member x.IsStatic = ILMethodDef.ComputeIsStatic x.Attributes + member x.IsAbstract = x.Attributes &&& MethodAttributes.Abstract <> enum 0 + member x.IsVirtual = x.Attributes &&& MethodAttributes.Virtual <> enum 0 + member x.IsCheckAccessOnOverride = x.Attributes &&& MethodAttributes.CheckAccessOnOverride <> enum 0 + member x.IsNewSlot = x.Attributes &&& MethodAttributes.NewSlot <> enum 0 + member x.IsFinal = x.Attributes &&& MethodAttributes.Final <> enum 0 + member x.IsSpecialName = x.Attributes &&& MethodAttributes.SpecialName <> enum 0 + member x.IsRTSpecialName = x.Attributes &&& MethodAttributes.RTSpecialName <> enum 0 + member x.IsHideBySig = x.Attributes &&& MethodAttributes.HideBySig <> enum 0 + member x.IsClassInitializer = x.Name = ".cctor" + member x.IsConstructor = x.Name = ".ctor" + member x.IsInternalCall = (int x.ImplAttributes &&& 0x1000 <> 0) + member x.IsManaged = (int x.ImplAttributes &&& 0x0004 = 0) + member x.IsForwardRef = (int x.ImplAttributes &&& 0x0010 <> 0) + member x.IsPreserveSig = (int x.ImplAttributes &&& 0x0080 <> 0) + member x.IsMustRun = (int x.ImplAttributes &&& 0x0040 <> 0) + member x.IsSynchronized = (int x.ImplAttributes &&& 0x0020 <> 0) + member x.IsNoInline = (int x.ImplAttributes &&& 0x0008 <> 0) + member x.Access = ILMemberAccess.OfFlags (int x.Attributes) + + member md.CallingSignature = ILCallingSignature (md.CallingConv,md.ParameterTypes,md.Return.Type) + override x.ToString() = "method " + x.Name + + type ILMethodDefs(larr: Lazy) = + + let mutable lmap = null + let getmap() = + if lmap = null then + lmap <- Dictionary() + for y in larr.Force() do + let key = y.Name + if lmap.ContainsKey key then + lmap.[key] <- Array.append [| y |] lmap.[key] + else + lmap.[key] <- [| y |] + lmap + + member __.Entries = larr.Force() + member __.FindByName nm = getmap().[nm] + member x.FindByNameAndArity (nm,arity) = x.FindByName nm |> Array.filter (fun x -> x.Parameters.Length = arity) + member x.TryFindUniqueByName name = + match x.FindByName(name) with + | [| md |] -> Some md + | [| |] -> None + | _ -> failwithf "multiple methods exist with name %s" name + + [] + type ILEventDef = + { //EventHandlerType: ILType option + Name: string + Attributes: System.Reflection.EventAttributes + AddMethod: ILMethodRef + RemoveMethod: ILMethodRef + //FireMethod: ILMethodRef option + //OtherMethods: ILMethodRef[] + CustomAttrs: ILCustomAttrs + Token: int } + member x.EventHandlerType = x.AddMethod.ArgTypes.[0] + member x.IsStatic = x.AddMethod.CallingConv.IsStatic + member x.IsSpecialName = (x.Attributes &&& EventAttributes.SpecialName) <> enum<_>(0) + member x.IsRTSpecialName = (x.Attributes &&& EventAttributes.RTSpecialName) <> enum<_>(0) + override x.ToString() = "event " + x.Name + + type ILEventDefs = + abstract Entries: ILEventDef[] + + [] + type ILPropertyDef = + { Name: string + Attributes: System.Reflection.PropertyAttributes + SetMethod: ILMethodRef option + GetMethod: ILMethodRef option + CallingConv: ILThisConvention + PropertyType: ILType + Init: ILFieldInit option + IndexParameterTypes: ILTypes + CustomAttrs: ILCustomAttrs + Token: int } + member x.IsStatic = (match x.CallingConv with ILThisConvention.Static -> true | _ -> false) + member x.IndexParameters = + x.IndexParameterTypes |> Array.mapi (fun i ty -> + { Name = USome("arg"+string i) + ParameterType = ty + Default = UNone + Attributes = ParameterAttributes.None + CustomAttrs = ILCustomAttrsStatics.Empty }) + member x.IsSpecialName = x.Attributes &&& PropertyAttributes.SpecialName <> enum 0 + member x.IsRTSpecialName = x.Attributes &&& PropertyAttributes.RTSpecialName <> enum 0 + override x.ToString() = "property " + x.Name + + type ILPropertyDefs = + abstract Entries: ILPropertyDef[] + + [] + type ILFieldDef = + { Name: string + FieldType: ILType + Attributes: FieldAttributes + //Data: byte[] option + LiteralValue: ILFieldInit option + Offset: int32 option + //Marshal: ILNativeType option + CustomAttrs: ILCustomAttrs + Token: int } + member x.IsStatic = x.Attributes &&& FieldAttributes.Static <> enum 0 + member x.IsInitOnly = x.Attributes &&& FieldAttributes.InitOnly <> enum 0 + member x.IsLiteral = x.Attributes &&& FieldAttributes.Literal <> enum 0 + member x.NotSerialized = x.Attributes &&& FieldAttributes.NotSerialized <> enum 0 + member x.IsSpecialName = x.Attributes &&& FieldAttributes.SpecialName <> enum 0 + //let isStatic = (flags &&& 0x0010) <> 0 + //{ Name = nm + // FieldType = readBlobHeapAsFieldSig numtypars typeIdx + // IsInitOnly = (flags &&& 0x0020) <> 0 + // IsLiteral = (flags &&& 0x0040) <> 0 + // NotSerialized = (flags &&& 0x0080) <> 0 + // IsSpecialName = (flags &&& 0x0200) <> 0 || (flags &&& 0x0400) <> 0 (* REVIEW: RTSpecialName *) + member x.Access = ILMemberAccess.OfFlags (int x.Attributes) + override x.ToString() = "field " + x.Name + + + type ILFieldDefs = + abstract Entries: ILFieldDef[] + + type ILMethodImplDef = + { Overrides: ILOverridesSpec + OverrideBy: ILMethodSpec } + + // Index table by name and arity. + type ILMethodImplDefs = + abstract Entries: ILMethodImplDef[] + + [] + type ILTypeInit = + | BeforeField + | OnAny + + [] + type ILDefaultPInvokeEncoding = + | Ansi + | Auto + | Unicode + + [] + type ILTypeDefLayout = + | Auto + | Sequential of ILTypeDefLayoutInfo + | Explicit of ILTypeDefLayoutInfo + + and ILTypeDefLayoutInfo = + { Size: int32 option + Pack: uint16 option } + + type ILTypeDefAccess = + | Public + | Private + | Nested of ILMemberAccess + static member OfFlags flags = + let f = (flags &&& 0x00000007) + if f = 0x00000001 then ILTypeDefAccess.Public + elif f = 0x00000002 then ILTypeDefAccess.Nested ILMemberAccess.Public + elif f = 0x00000003 then ILTypeDefAccess.Nested ILMemberAccess.Private + elif f = 0x00000004 then ILTypeDefAccess.Nested ILMemberAccess.Family + elif f = 0x00000006 then ILTypeDefAccess.Nested ILMemberAccess.FamilyAndAssembly + elif f = 0x00000007 then ILTypeDefAccess.Nested ILMemberAccess.FamilyOrAssembly + elif f = 0x00000005 then ILTypeDefAccess.Nested ILMemberAccess.Assembly + else ILTypeDefAccess.Private + + [] + type ILTypeDefKind = + | Class + | ValueType + | Interface + | Enum + | Delegate + + [] + type ILTypeDef = + { Namespace: string uoption + Name: string + GenericParams: ILGenericParameterDefs + Attributes: TypeAttributes + NestedTypes: ILTypeDefs + Layout: ILTypeDefLayout + Implements: ILTypes + Extends: ILType option + Methods: ILMethodDefs + Fields: ILFieldDefs + MethodImpls: ILMethodImplDefs + Events: ILEventDefs + Properties: ILPropertyDefs + CustomAttrs: ILCustomAttrs + Token: int } + static member ComputeKind flags (super: ILType option) (nsp: string uoption) (nm: string) = + if (flags &&& 0x00000020) <> 0x0 then ILTypeDefKind.Interface else + let isEnum = (match super with None -> false | Some ty -> ty.TypeSpec.Namespace = USome "System" && ty.TypeSpec.Name = "Enum") + let isDelegate = (match super with None -> false | Some ty -> ty.TypeSpec.Namespace = USome "System" && ty.TypeSpec.Name = "Delegate") + let isMulticastDelegate = (match super with None -> false | Some ty -> ty.TypeSpec.Namespace = USome "System" && ty.TypeSpec.Name = "MulticastDelegate") + let selfIsMulticastDelegate = (nsp = USome "System" && nm = "MulticastDelegate") + let isValueType = (match super with None -> false | Some ty -> ty.TypeSpec.Namespace = USome "System" && ty.TypeSpec.Name = "ValueType" && not (nsp = USome "System" && nm = "Enum")) + if isEnum then ILTypeDefKind.Enum + elif (isDelegate && not selfIsMulticastDelegate) || isMulticastDelegate then ILTypeDefKind.Delegate + elif isValueType then ILTypeDefKind.ValueType + else ILTypeDefKind.Class + + member x.Kind = ILTypeDef.ComputeKind (int x.Attributes) x.Extends x.Namespace x.Name + member x.IsClass = (match x.Kind with ILTypeDefKind.Class -> true | _ -> false) + member x.IsInterface = (match x.Kind with ILTypeDefKind.Interface -> true | _ -> false) + member x.IsEnum = (match x.Kind with ILTypeDefKind.Enum -> true | _ -> false) + member x.IsDelegate = (match x.Kind with ILTypeDefKind.Delegate -> true | _ -> false) + member x.IsAbstract= (x.Attributes &&& TypeAttributes.Abstract) <> enum 0 + member x.IsSealed= (x.Attributes &&& TypeAttributes.Sealed) <> enum 0 + member x.IsSerializable= (x.Attributes &&& TypeAttributes.Serializable) <> enum 0 + member x.IsComInterop= (x.Attributes &&& TypeAttributes.Import) <> enum 0 + member x.IsSpecialName= (x.Attributes &&& TypeAttributes.SpecialName) <> enum 0 + member x.Access = ILTypeDefAccess.OfFlags (int x.Attributes) + + member x.IsNested = + match x.Access with + | ILTypeDefAccess.Nested _ -> true + | _ -> false + + member tdef.IsStructOrEnum = + match tdef.Kind with + | ILTypeDefKind.ValueType | ILTypeDefKind.Enum -> true + | _ -> false + + member x.Encoding = + let f = (int x.Attributes &&& 0x00030000) + if f = 0x00020000 then ILDefaultPInvokeEncoding.Auto + elif f = 0x00010000 then ILDefaultPInvokeEncoding.Unicode + else ILDefaultPInvokeEncoding.Ansi + + member x.InitSemantics = + if x.Kind = ILTypeDefKind.Interface then ILTypeInit.OnAny + elif (int x.Attributes &&& 0x00100000) <> 0x0 then ILTypeInit.BeforeField + else ILTypeInit.OnAny + + override x.ToString() = "type " + x.Name + + and ILTypeDefs(larr: Lazy<(string uoption * string * Lazy)[]>) = + + let mutable lmap = null + let getmap() = + if lmap = null then + lmap <- Dictionary() + for (nsp, nm, ltd) in larr.Force() do + let key = nsp, nm + lmap.[key] <- ltd + lmap + + member __.Entries = + [| for (_,_,td) in larr.Force() -> td.Force() |] + + member __.TryFindByName (nsp,nm) = + let tdefs = getmap() + let key = (nsp,nm) + if tdefs.ContainsKey key then + Some (tdefs.[key].Force()) + else + None + + type ILNestedExportedType = + { Name: string + Access: ILMemberAccess + Nested: ILNestedExportedTypesAndForwarders + CustomAttrs: ILCustomAttrs } + override x.ToString() = "nested fwd " + x.Name + + and ILNestedExportedTypesAndForwarders(larr:Lazy) = + let lmap = lazy ((Map.empty, larr.Force()) ||> Array.fold (fun m x -> m.Add(x.Name,x))) + member __.Entries = larr.Force() + member __.TryFindByName nm = lmap.Force().TryFind nm + + and [] + ILExportedTypeOrForwarder = + { ScopeRef: ILScopeRef + Namespace: string uoption + Name: string + IsForwarder: bool + Access: ILTypeDefAccess; + Nested: ILNestedExportedTypesAndForwarders; + CustomAttrs: ILCustomAttrs } + override x.ToString() = "fwd " + x.Name + + and ILExportedTypesAndForwarders(larr:Lazy) = + let mutable lmap = null + let getmap() = + if lmap = null then + lmap <- Dictionary() + for ltd in larr.Force() do + let key = ltd.Namespace, ltd.Name + lmap.[key] <- ltd + lmap + member __.Entries = larr.Force() + member __.TryFindByName (nsp,nm) = match getmap().TryGetValue ((nsp,nm)) with true,v -> Some v | false, _ -> None + + [] + type ILResourceAccess = + | Public + | Private + + [] + type ILResourceLocation = + | Local of (unit -> byte[]) + | File of ILModuleRef * int32 + | Assembly of ILAssemblyRef + + type ILResource = + { Name: string + Location: ILResourceLocation + Access: ILResourceAccess + CustomAttrs: ILCustomAttrs } + override x.ToString() = "resource " + x.Name + + type ILResources(larr: Lazy) = + member __.Entries = larr.Force() + + type ILAssemblyManifest = + { Name: string + AuxModuleHashAlgorithm: int32 + PublicKey: byte[] uoption + Version: Version uoption + Locale: string uoption + CustomAttrs: ILCustomAttrs + //AssemblyLongevity: ILAssemblyLongevity + DisableJitOptimizations: bool + JitTracking: bool + IgnoreSymbolStoreSequencePoints: bool + Retargetable: bool + ExportedTypes: ILExportedTypesAndForwarders + EntrypointElsewhere: ILModuleRef option } + + member x.GetName() = + let asmName = AssemblyName(Name=x.Name) + match x.PublicKey with + | USome bytes -> asmName.SetPublicKey(bytes) + | UNone -> () + match x.Version with + | USome v -> asmName.Version <- v + | UNone -> () + #if NETSTANDARD + asmName.CultureName <- System.Globalization.CultureInfo.InvariantCulture.Name + #else + asmName.CultureInfo <- System.Globalization.CultureInfo.InvariantCulture + #endif + asmName + + override x.ToString() = "manifest " + x.Name + + type ILModuleDef = + { Manifest: ILAssemblyManifest option + CustomAttrs: ILCustomAttrs + Name: string + TypeDefs: ILTypeDefs + SubsystemVersion: int * int + UseHighEntropyVA: bool + (* Random bits of relatively uninteresting data *) + SubSystemFlags: int32 + IsDLL: bool + IsILOnly: bool + Platform: ILPlatform option + StackReserveSize: int32 option + Is32Bit: bool + Is32BitPreferred: bool + Is64Bit: bool + VirtualAlignment: int32 + PhysicalAlignment: int32 + ImageBase: int32 + MetadataVersion: string + Resources: ILResources } + + member x.ManifestOfAssembly = + match x.Manifest with + | Some m -> m + | None -> failwith "no manifest" + + member m.HasManifest = m.Manifest.IsSome + + override x.ToString() = "module " + x.Name + + + [] + type ILGlobals = + { typ_Object: ILType + typ_String: ILType + typ_Type: ILType + typ_TypedReference: ILType option + typ_SByte: ILType + typ_Int16: ILType + typ_Int32: ILType + typ_Array: ILType + typ_Int64: ILType + typ_Byte: ILType + typ_UInt16: ILType + typ_UInt32: ILType + typ_UInt64: ILType + typ_Single: ILType + typ_Double: ILType + typ_Boolean: ILType + typ_Char: ILType + typ_IntPtr: ILType + typ_UIntPtr: ILType + systemRuntimeScopeRef: ILScopeRef } + override __.ToString() = "" + + [] + + [] + type ILTableName(idx: int) = + member __.Index = idx + static member FromIndex n = ILTableName n + + module ILTableNames = + let Module = ILTableName 0 + let TypeRef = ILTableName 1 + let TypeDef = ILTableName 2 + let FieldPtr = ILTableName 3 + let Field = ILTableName 4 + let MethodPtr = ILTableName 5 + let Method = ILTableName 6 + let ParamPtr = ILTableName 7 + let Param = ILTableName 8 + let InterfaceImpl = ILTableName 9 + let MemberRef = ILTableName 10 + let Constant = ILTableName 11 + let CustomAttribute = ILTableName 12 + let FieldMarshal = ILTableName 13 + let Permission = ILTableName 14 + let ClassLayout = ILTableName 15 + let FieldLayout = ILTableName 16 + let StandAloneSig = ILTableName 17 + let EventMap = ILTableName 18 + let EventPtr = ILTableName 19 + let Event = ILTableName 20 + let PropertyMap = ILTableName 21 + let PropertyPtr = ILTableName 22 + let Property = ILTableName 23 + let MethodSemantics = ILTableName 24 + let MethodImpl = ILTableName 25 + let ModuleRef = ILTableName 26 + let TypeSpec = ILTableName 27 + let ImplMap = ILTableName 28 + let FieldRVA = ILTableName 29 + let ENCLog = ILTableName 30 + let ENCMap = ILTableName 31 + let Assembly = ILTableName 32 + let AssemblyProcessor = ILTableName 33 + let AssemblyOS = ILTableName 34 + let AssemblyRef = ILTableName 35 + let AssemblyRefProcessor = ILTableName 36 + let AssemblyRefOS = ILTableName 37 + let File = ILTableName 38 + let ExportedType = ILTableName 39 + let ManifestResource = ILTableName 40 + let Nested = ILTableName 41 + let GenericParam = ILTableName 42 + let MethodSpec = ILTableName 43 + let GenericParamConstraint = ILTableName 44 + let UserStrings = ILTableName 0x70 (* Special encoding of embedded UserString tokens - See 1.9 Partition III *) + + /// Which tables are sorted and by which column. + // + // Sorted bit-vector as stored by CLR V1: 00fa 0133 0002 0000 + // But what does this mean? The ECMA spec does not say! + // Metainfo -schema reports sorting as shown below. + // But some sorting, e.g. EventMap does not seem to show + let sortedTableInfo = + [ (InterfaceImpl,0) + (Constant, 1) + (CustomAttribute, 0) + (FieldMarshal, 0) + (Permission, 1) + (ClassLayout, 2) + (FieldLayout, 1) + (MethodSemantics, 2) + (MethodImpl, 0) + (ImplMap, 1) + (FieldRVA, 1) + (Nested, 0) + (GenericParam, 2) + (GenericParamConstraint, 0) ] + + [] + type TypeDefOrRefOrSpecTag(tag: int32) = + member __.Tag = tag + static member TypeDef = TypeDefOrRefOrSpecTag 0x00 + static member TypeRef = TypeDefOrRefOrSpecTag 0x01 + static member TypeSpec = TypeDefOrRefOrSpecTag 0x2 + + [] + type HasConstantTag(tag: int32) = + member __.Tag = tag + static member FieldDef = HasConstantTag 0x0 + static member ParamDef = HasConstantTag 0x1 + static member Property = HasConstantTag 0x2 + + [] + type HasCustomAttributeTag(tag: int32) = + member __.Tag = tag + static member MethodDef = HasCustomAttributeTag 0x0 + static member FieldDef = HasCustomAttributeTag 0x1 + static member TypeRef = HasCustomAttributeTag 0x2 + static member TypeDef = HasCustomAttributeTag 0x3 + static member ParamDef = HasCustomAttributeTag 0x4 + static member InterfaceImpl = HasCustomAttributeTag 0x5 + static member MemberRef = HasCustomAttributeTag 0x6 + static member Module = HasCustomAttributeTag 0x7 + static member Permission = HasCustomAttributeTag 0x8 + static member Property = HasCustomAttributeTag 0x9 + static member Event = HasCustomAttributeTag 0xa + static member StandAloneSig = HasCustomAttributeTag 0xb + static member ModuleRef = HasCustomAttributeTag 0xc + static member TypeSpec = HasCustomAttributeTag 0xd + static member Assembly = HasCustomAttributeTag 0xe + static member AssemblyRef = HasCustomAttributeTag 0xf + static member File = HasCustomAttributeTag 0x10 + static member ExportedType = HasCustomAttributeTag 0x11 + static member ManifestResource = HasCustomAttributeTag 0x12 + static member GenericParam = HasCustomAttributeTag 0x13 + static member GenericParamConstraint = HasCustomAttributeTag 0x14 + static member MethodSpec = HasCustomAttributeTag 0x15 + + [] + type HasFieldMarshalTag(tag: int32) = + member __.Tag = tag + static member FieldDef = HasFieldMarshalTag 0x00 + static member ParamDef = HasFieldMarshalTag 0x01 + + [] + type HasDeclSecurityTag(tag: int32) = + member __.Tag = tag + static member TypeDef = HasDeclSecurityTag 0x00 + static member MethodDef = HasDeclSecurityTag 0x01 + static member Assembly = HasDeclSecurityTag 0x02 + + [] + type MemberRefParentTag(tag: int32) = + member __.Tag = tag + static member TypeRef = MemberRefParentTag 0x01 + static member ModuleRef = MemberRefParentTag 0x02 + static member MethodDef = MemberRefParentTag 0x03 + static member TypeSpec = MemberRefParentTag 0x04 + + [] + type HasSemanticsTag(tag: int32) = + member __.Tag = tag + static member Event = HasSemanticsTag 0x00 + static member Property = HasSemanticsTag 0x01 + + [] + type MethodDefOrRefTag(tag: int32) = + member __.Tag = tag + static member MethodDef = MethodDefOrRefTag 0x00 + static member MemberRef = MethodDefOrRefTag 0x01 + static member MethodSpec = MethodDefOrRefTag 0x02 + + [] + type MemberForwardedTag(tag: int32) = + member __.Tag = tag + static member FieldDef = MemberForwardedTag 0x00 + static member MethodDef = MemberForwardedTag 0x01 + + [] + type ImplementationTag(tag: int32) = + member __.Tag = tag + static member File = ImplementationTag 0x00 + static member AssemblyRef = ImplementationTag 0x01 + static member ExportedType = ImplementationTag 0x02 + + [] + type CustomAttributeTypeTag(tag: int32) = + member __.Tag = tag + static member MethodDef = CustomAttributeTypeTag 0x02 + static member MemberRef = CustomAttributeTypeTag 0x03 + + [] + type ResolutionScopeTag(tag: int32) = + member __.Tag = tag + static member Module = ResolutionScopeTag 0x00 + static member ModuleRef = ResolutionScopeTag 0x01 + static member AssemblyRef = ResolutionScopeTag 0x02 + static member TypeRef = ResolutionScopeTag 0x03 + + [] + type TypeOrMethodDefTag(tag: int32) = + member __.Tag = tag + static member TypeDef = TypeOrMethodDefTag 0x00 + static member MethodDef = TypeOrMethodDefTag 0x01 + + [] + type TaggedIndex<'T> = + val tag: 'T + val index: int32 + new(tag,index) = { tag=tag; index=index } + + + type ILImageChunk = { size: int32; addr: int32 } + + type ILRowElementKind = + | UShort + | ULong + | Byte + | Data + | GGuid + | Blob + | SString + | SimpleIndex of ILTableName + | TypeDefOrRefOrSpec + | TypeOrMethodDef + | HasConstant + | HasCustomAttribute + | HasFieldMarshal + | HasDeclSecurity + | MemberRefParent + | HasSemantics + | MethodDefOrRef + | MemberForwarded + | Implementation + | CustomAttributeType + | ResolutionScope + + type ILRowKind = ILRowKind of ILRowElementKind list + + type TypeDefAsTypIdx = TypeDefAsTypIdx of ILBoxity * ILGenericArgs * int + type TypeRefAsTypIdx = TypeRefAsTypIdx of ILBoxity * ILGenericArgs * int + type BlobAsMethodSigIdx = BlobAsMethodSigIdx of int * int32 + type BlobAsFieldSigIdx = BlobAsFieldSigIdx of int * int32 + type BlobAsPropSigIdx = BlobAsPropSigIdx of int * int32 + type BlobAsLocalSigIdx = BlobAsLocalSigIdx of int * int32 + type MemberRefAsMspecIdx = MemberRefAsMspecIdx of int * int + type MethodSpecAsMspecIdx = MethodSpecAsMspecIdx of int * int + type MemberRefAsFspecIdx = MemberRefAsFspecIdx of int * int + type CustomAttrIdx = CustomAttrIdx of CustomAttributeTypeTag * int * int32 + type SecurityDeclIdx = SecurityDeclIdx of uint16 * int32 + type GenericParamsIdx = GenericParamsIdx of int * TypeOrMethodDefTag * int + + type MethodData = MethodData of ILType * ILCallingConv * string * ILTypes * ILType * ILTypes + type VarArgMethodData = VarArgMethodData of ILType * ILCallingConv * string * ILTypes * ILVarArgs * ILType * ILTypes + + [] + module Constants = + let et_END = 0x00uy + let et_VOID = 0x01uy + let et_BOOLEAN = 0x02uy + let et_CHAR = 0x03uy + let et_I1 = 0x04uy + let et_U1 = 0x05uy + let et_I2 = 0x06uy + let et_U2 = 0x07uy + let et_I4 = 0x08uy + let et_U4 = 0x09uy + let et_I8 = 0x0Auy + let et_U8 = 0x0Buy + let et_R4 = 0x0Cuy + let et_R8 = 0x0Duy + let et_STRING = 0x0Euy + let et_PTR = 0x0Fuy + let et_BYREF = 0x10uy + let et_VALUETYPE = 0x11uy + let et_CLASS = 0x12uy + let et_VAR = 0x13uy + let et_ARRAY = 0x14uy + let et_WITH = 0x15uy + let et_TYPEDBYREF = 0x16uy + let et_I = 0x18uy + let et_U = 0x19uy + let et_FNPTR = 0x1Buy + let et_OBJECT = 0x1Cuy + let et_SZARRAY = 0x1Duy + let et_MVAR = 0x1euy + let et_CMOD_REQD = 0x1Fuy + let et_CMOD_OPT = 0x20uy + + let et_SENTINEL = 0x41uy // sentinel for varargs + let et_PINNED = 0x45uy + + let e_IMAGE_CEE_CS_CALLCONV_FASTCALL = 0x04uy + let e_IMAGE_CEE_CS_CALLCONV_STDCALL = 0x02uy + let e_IMAGE_CEE_CS_CALLCONV_THISCALL = 0x03uy + let e_IMAGE_CEE_CS_CALLCONV_CDECL = 0x01uy + let e_IMAGE_CEE_CS_CALLCONV_VARARG = 0x05uy + let e_IMAGE_CEE_CS_CALLCONV_FIELD = 0x06uy + let e_IMAGE_CEE_CS_CALLCONV_LOCAL_SIG = 0x07uy + let e_IMAGE_CEE_CS_CALLCONV_PROPERTY = 0x08uy + + let e_IMAGE_CEE_CS_CALLCONV_GENERICINST = 0x0auy + let e_IMAGE_CEE_CS_CALLCONV_GENERIC = 0x10uy + let e_IMAGE_CEE_CS_CALLCONV_INSTANCE = 0x20uy + let e_IMAGE_CEE_CS_CALLCONV_INSTANCE_EXPLICIT = 0x40uy + + + // Logical shift right treating int32 as unsigned integer. + // Code that uses this should probably be adjusted to use unsigned integer types. + let (>>>&) (x:int32) (n:int32) = int32 (uint32 x >>> n) + + let align alignment n = ((n + alignment - 0x1) / alignment) * alignment + + let uncodedToken (tab:ILTableName) idx = ((tab.Index <<< 24) ||| idx) + + let i32ToUncodedToken tok = + let idx = tok &&& 0xffffff + let tab = tok >>>& 24 + (ILTableName.FromIndex tab, idx) + + + let uncodedTokenToTypeDefOrRefOrSpec (tab,tok) = + let tag = + if tab = ILTableNames.TypeDef then TypeDefOrRefOrSpecTag.TypeDef + elif tab = ILTableNames.TypeRef then TypeDefOrRefOrSpecTag.TypeRef + elif tab = ILTableNames.TypeSpec then TypeDefOrRefOrSpecTag.TypeSpec + else failwith "bad table in uncodedTokenToTypeDefOrRefOrSpec" + TaggedIndex(tag,tok) + + let uncodedTokenToMethodDefOrRef (tab,tok) = + let tag = + if tab = ILTableNames.Method then MethodDefOrRefTag.MethodDef + elif tab = ILTableNames.MemberRef then MethodDefOrRefTag.MemberRef + else failwith "bad table in uncodedTokenToMethodDefOrRef" + TaggedIndex(tag,tok) + + let (|TaggedIndex|) (x:TaggedIndex<'T>) = x.tag, x.index + let tokToTaggedIdx f nbits tok = + let tagmask = + if nbits = 1 then 1 + elif nbits = 2 then 3 + elif nbits = 3 then 7 + elif nbits = 4 then 15 + elif nbits = 5 then 31 + else failwith "too many nbits" + let tag = tok &&& tagmask + let idx = tok >>>& nbits + TaggedIndex(f tag, idx) + + let i_nop = 0x00 + let i_break = 0x01 + let i_ldarg_0 = 0x02 + let i_ldarg_1 = 0x03 + let i_ldarg_2 = 0x04 + let i_ldarg_3 = 0x05 + let i_ldloc_0 = 0x06 + let i_ldloc_1 = 0x07 + let i_ldloc_2 = 0x08 + let i_ldloc_3 = 0x09 + let i_stloc_0 = 0x0a + let i_stloc_1 = 0x0b + let i_stloc_2 = 0x0c + let i_stloc_3 = 0x0d + let i_ldarg_s = 0x0e + let i_ldarga_s = 0x0f + let i_starg_s = 0x10 + let i_ldloc_s = 0x11 + let i_ldloca_s = 0x12 + let i_stloc_s = 0x13 + let i_ldnull = 0x14 + let i_ldc_i4_m1 = 0x15 + let i_ldc_i4_0 = 0x16 + let i_ldc_i4_1 = 0x17 + let i_ldc_i4_2 = 0x18 + let i_ldc_i4_3 = 0x19 + let i_ldc_i4_4 = 0x1a + let i_ldc_i4_5 = 0x1b + let i_ldc_i4_6 = 0x1c + let i_ldc_i4_7 = 0x1d + let i_ldc_i4_8 = 0x1e + let i_ldc_i4_s = 0x1f + let i_ldc_i4 = 0x20 + let i_ldc_i8 = 0x21 + let i_ldc_r4 = 0x22 + let i_ldc_r8 = 0x23 + let i_dup = 0x25 + let i_pop = 0x26 + let i_jmp = 0x27 + let i_call = 0x28 + let i_calli = 0x29 + let i_ret = 0x2a + let i_br_s = 0x2b + let i_brfalse_s = 0x2c + let i_brtrue_s = 0x2d + let i_beq_s = 0x2e + let i_bge_s = 0x2f + let i_bgt_s = 0x30 + let i_ble_s = 0x31 + let i_blt_s = 0x32 + let i_bne_un_s = 0x33 + let i_bge_un_s = 0x34 + let i_bgt_un_s = 0x35 + let i_ble_un_s = 0x36 + let i_blt_un_s = 0x37 + let i_br = 0x38 + let i_brfalse = 0x39 + let i_brtrue = 0x3a + let i_beq = 0x3b + let i_bge = 0x3c + let i_bgt = 0x3d + let i_ble = 0x3e + let i_blt = 0x3f + let i_bne_un = 0x40 + let i_bge_un = 0x41 + let i_bgt_un = 0x42 + let i_ble_un = 0x43 + let i_blt_un = 0x44 + let i_switch = 0x45 + let i_ldind_i1 = 0x46 + let i_ldind_u1 = 0x47 + let i_ldind_i2 = 0x48 + let i_ldind_u2 = 0x49 + let i_ldind_i4 = 0x4a + let i_ldind_u4 = 0x4b + let i_ldind_i8 = 0x4c + let i_ldind_i = 0x4d + let i_ldind_r4 = 0x4e + let i_ldind_r8 = 0x4f + let i_ldind_ref = 0x50 + let i_stind_ref = 0x51 + let i_stind_i1 = 0x52 + let i_stind_i2 = 0x53 + let i_stind_i4 = 0x54 + let i_stind_i8 = 0x55 + let i_stind_r4 = 0x56 + let i_stind_r8 = 0x57 + let i_add = 0x58 + let i_sub = 0x59 + let i_mul = 0x5a + let i_div = 0x5b + let i_div_un = 0x5c + let i_rem = 0x5d + let i_rem_un = 0x5e + let i_and = 0x5f + let i_or = 0x60 + let i_xor = 0x61 + let i_shl = 0x62 + let i_shr = 0x63 + let i_shr_un = 0x64 + let i_neg = 0x65 + let i_not = 0x66 + let i_conv_i1 = 0x67 + let i_conv_i2 = 0x68 + let i_conv_i4 = 0x69 + let i_conv_i8 = 0x6a + let i_conv_r4 = 0x6b + let i_conv_r8 = 0x6c + let i_conv_u4 = 0x6d + let i_conv_u8 = 0x6e + let i_callvirt = 0x6f + let i_cpobj = 0x70 + let i_ldobj = 0x71 + let i_ldstr = 0x72 + let i_newobj = 0x73 + let i_castclass = 0x74 + let i_isinst = 0x75 + let i_conv_r_un = 0x76 + let i_unbox = 0x79 + let i_throw = 0x7a + let i_ldfld = 0x7b + let i_ldflda = 0x7c + let i_stfld = 0x7d + let i_ldsfld = 0x7e + let i_ldsflda = 0x7f + let i_stsfld = 0x80 + let i_stobj = 0x81 + let i_conv_ovf_i1_un= 0x82 + let i_conv_ovf_i2_un= 0x83 + let i_conv_ovf_i4_un= 0x84 + let i_conv_ovf_i8_un= 0x85 + let i_conv_ovf_u1_un= 0x86 + let i_conv_ovf_u2_un= 0x87 + let i_conv_ovf_u4_un= 0x88 + let i_conv_ovf_u8_un= 0x89 + let i_conv_ovf_i_un = 0x8a + let i_conv_ovf_u_un = 0x8b + let i_box = 0x8c + let i_newarr = 0x8d + let i_ldlen = 0x8e + let i_ldelema = 0x8f + let i_ldelem_i1 = 0x90 + let i_ldelem_u1 = 0x91 + let i_ldelem_i2 = 0x92 + let i_ldelem_u2 = 0x93 + let i_ldelem_i4 = 0x94 + let i_ldelem_u4 = 0x95 + let i_ldelem_i8 = 0x96 + let i_ldelem_i = 0x97 + let i_ldelem_r4 = 0x98 + let i_ldelem_r8 = 0x99 + let i_ldelem_ref = 0x9a + let i_stelem_i = 0x9b + let i_stelem_i1 = 0x9c + let i_stelem_i2 = 0x9d + let i_stelem_i4 = 0x9e + let i_stelem_i8 = 0x9f + let i_stelem_r4 = 0xa0 + let i_stelem_r8 = 0xa1 + let i_stelem_ref = 0xa2 + let i_conv_ovf_i1 = 0xb3 + let i_conv_ovf_u1 = 0xb4 + let i_conv_ovf_i2 = 0xb5 + let i_conv_ovf_u2 = 0xb6 + let i_conv_ovf_i4 = 0xb7 + let i_conv_ovf_u4 = 0xb8 + let i_conv_ovf_i8 = 0xb9 + let i_conv_ovf_u8 = 0xba + let i_refanyval = 0xc2 + let i_ckfinite = 0xc3 + let i_mkrefany = 0xc6 + let i_ldtoken = 0xd0 + let i_conv_u2 = 0xd1 + let i_conv_u1 = 0xd2 + let i_conv_i = 0xd3 + let i_conv_ovf_i = 0xd4 + let i_conv_ovf_u = 0xd5 + let i_add_ovf = 0xd6 + let i_add_ovf_un = 0xd7 + let i_mul_ovf = 0xd8 + let i_mul_ovf_un = 0xd9 + let i_sub_ovf = 0xda + let i_sub_ovf_un = 0xdb + let i_endfinally = 0xdc + let i_leave = 0xdd + let i_leave_s = 0xde + let i_stind_i = 0xdf + let i_conv_u = 0xe0 + let i_arglist = 0xfe00 + let i_ceq = 0xfe01 + let i_cgt = 0xfe02 + let i_cgt_un = 0xfe03 + let i_clt = 0xfe04 + let i_clt_un = 0xfe05 + let i_ldftn = 0xfe06 + let i_ldvirtftn = 0xfe07 + let i_ldarg = 0xfe09 + let i_ldarga = 0xfe0a + let i_starg = 0xfe0b + let i_ldloc = 0xfe0c + let i_ldloca = 0xfe0d + let i_stloc = 0xfe0e + let i_localloc = 0xfe0f + let i_endfilter = 0xfe11 + let i_unaligned = 0xfe12 + let i_volatile = 0xfe13 + let i_constrained = 0xfe16 + let i_readonly = 0xfe1e + let i_tail = 0xfe14 + let i_initobj = 0xfe15 + let i_cpblk = 0xfe17 + let i_initblk = 0xfe18 + let i_rethrow = 0xfe1a + let i_sizeof = 0xfe1c + let i_refanytype = 0xfe1d + + let i_ldelem_any = 0xa3 + let i_stelem_any = 0xa4 + let i_unbox_any = 0xa5 + + let mk_ldc i = I_ldc (DT_I4,ILConst.I4 i) + let mk_ldc_i8 i = I_ldc (DT_I8,ILConst.I8 i) + let mkNormalCall mspec = I_call (Normalcall, mspec, None) + let mkILFormalGenericArgs numtypars (n:int) = + Array.init n (fun i -> ILType.Var (numtypars + i)) + + + let noArgInstrs = + lazy [ i_ldc_i4_0, mk_ldc 0 + i_ldc_i4_1, mk_ldc 1 + i_ldc_i4_2, mk_ldc 2 + i_ldc_i4_3, mk_ldc 3 + i_ldc_i4_4, mk_ldc 4 + i_ldc_i4_5, mk_ldc 5 + i_ldc_i4_6, mk_ldc 6 + i_ldc_i4_7, mk_ldc 7 + i_ldc_i4_8, mk_ldc 8 + i_ldc_i4_m1, mk_ldc -1 + 0x0a, I_stloc 0 + 0x0b, I_stloc 1 + 0x0c, I_stloc 2 + 0x0d, I_stloc 3 + 0x06, I_ldloc 0 + 0x07, I_ldloc 1 + 0x08, I_ldloc 2 + 0x09, I_ldloc 3 + 0x02, I_ldarg 0 + 0x03, I_ldarg 1 + 0x04, I_ldarg 2 + 0x05, I_ldarg 3 + 0x2a, I_ret + 0x58, I_add + 0xd6, I_add_ovf + 0xd7, I_add_ovf_un + 0x5f, I_and + 0x5b, I_div + 0x5c, I_div_un + 0xfe01, I_ceq + 0xfe02, I_cgt + 0xfe03, I_cgt_un + 0xfe04, I_clt + 0xfe05, I_clt_un + 0x67, I_conv DT_I1 + 0x68, I_conv DT_I2 + 0x69, I_conv DT_I4 + 0x6a, I_conv DT_I8 + 0xd3, I_conv DT_I + 0x6b, I_conv DT_R4 + 0x6c, I_conv DT_R8 + 0xd2, I_conv DT_U1 + 0xd1, I_conv DT_U2 + 0x6d, I_conv DT_U4 + 0x6e, I_conv DT_U8 + 0xe0, I_conv DT_U + 0x76, I_conv DT_R + 0xb3, I_conv_ovf DT_I1 + 0xb5, I_conv_ovf DT_I2 + 0xb7, I_conv_ovf DT_I4 + 0xb9, I_conv_ovf DT_I8 + 0xd4, I_conv_ovf DT_I + 0xb4, I_conv_ovf DT_U1 + 0xb6, I_conv_ovf DT_U2 + 0xb8, I_conv_ovf DT_U4 + 0xba, I_conv_ovf DT_U8 + 0xd5, I_conv_ovf DT_U + 0x82, I_conv_ovf_un DT_I1 + 0x83, I_conv_ovf_un DT_I2 + 0x84, I_conv_ovf_un DT_I4 + 0x85, I_conv_ovf_un DT_I8 + 0x8a, I_conv_ovf_un DT_I + 0x86, I_conv_ovf_un DT_U1 + 0x87, I_conv_ovf_un DT_U2 + 0x88, I_conv_ovf_un DT_U4 + 0x89, I_conv_ovf_un DT_U8 + 0x8b, I_conv_ovf_un DT_U + 0x9c, I_stelem DT_I1 + 0x9d, I_stelem DT_I2 + 0x9e, I_stelem DT_I4 + 0x9f, I_stelem DT_I8 + 0xa0, I_stelem DT_R4 + 0xa1, I_stelem DT_R8 + 0x9b, I_stelem DT_I + 0xa2, I_stelem DT_REF + 0x90, I_ldelem DT_I1 + 0x92, I_ldelem DT_I2 + 0x94, I_ldelem DT_I4 + 0x96, I_ldelem DT_I8 + 0x91, I_ldelem DT_U1 + 0x93, I_ldelem DT_U2 + 0x95, I_ldelem DT_U4 + 0x98, I_ldelem DT_R4 + 0x99, I_ldelem DT_R8 + 0x97, I_ldelem DT_I + 0x9a, I_ldelem DT_REF + 0x5a, I_mul + 0xd8, I_mul_ovf + 0xd9, I_mul_ovf_un + 0x5d, I_rem + 0x5e, I_rem_un + 0x62, I_shl + 0x63, I_shr + 0x64, I_shr_un + 0x59, I_sub + 0xda, I_sub_ovf + 0xdb, I_sub_ovf_un + 0x61, I_xor + 0x60, I_or + 0x65, I_neg + 0x66, I_not + i_ldnull, I_ldnull + i_dup, I_dup + i_pop, I_pop + i_ckfinite, I_ckfinite + i_nop, I_nop + i_break, I_break + i_arglist, I_arglist + i_endfilter, I_endfilter + i_endfinally, I_endfinally + i_refanytype, I_refanytype + i_localloc, I_localloc + i_throw, I_throw + i_ldlen, I_ldlen + i_rethrow, I_rethrow ] + + let isNoArgInstr i = + match i with + | I_ldc (DT_I4, ILConst.I4 n) when -1 <= n && n <= 8 -> true + | I_stloc n | I_ldloc n | I_ldarg n when n <= 3 -> true + | I_ret + | I_add + | I_add_ovf + | I_add_ovf_un + | I_and + | I_div + | I_div_un + | I_ceq + | I_cgt + | I_cgt_un + | I_clt + | I_clt_un + | I_conv DT_I1 + | I_conv DT_I2 + | I_conv DT_I4 + | I_conv DT_I8 + | I_conv DT_I + | I_conv DT_R4 + | I_conv DT_R8 + | I_conv DT_U1 + | I_conv DT_U2 + | I_conv DT_U4 + | I_conv DT_U8 + | I_conv DT_U + | I_conv DT_R + | I_conv_ovf DT_I1 + | I_conv_ovf DT_I2 + | I_conv_ovf DT_I4 + | I_conv_ovf DT_I8 + | I_conv_ovf DT_I + | I_conv_ovf DT_U1 + | I_conv_ovf DT_U2 + | I_conv_ovf DT_U4 + | I_conv_ovf DT_U8 + | I_conv_ovf DT_U + | I_conv_ovf_un DT_I1 + | I_conv_ovf_un DT_I2 + | I_conv_ovf_un DT_I4 + | I_conv_ovf_un DT_I8 + | I_conv_ovf_un DT_I + | I_conv_ovf_un DT_U1 + | I_conv_ovf_un DT_U2 + | I_conv_ovf_un DT_U4 + | I_conv_ovf_un DT_U8 + | I_conv_ovf_un DT_U + | I_stelem DT_I1 + | I_stelem DT_I2 + | I_stelem DT_I4 + | I_stelem DT_I8 + | I_stelem DT_R4 + | I_stelem DT_R8 + | I_stelem DT_I + | I_stelem DT_REF + | I_ldelem DT_I1 + | I_ldelem DT_I2 + | I_ldelem DT_I4 + | I_ldelem DT_I8 + | I_ldelem DT_U1 + | I_ldelem DT_U2 + | I_ldelem DT_U4 + | I_ldelem DT_R4 + | I_ldelem DT_R8 + | I_ldelem DT_I + | I_ldelem DT_REF + | I_mul + | I_mul_ovf + | I_mul_ovf_un + | I_rem + | I_rem_un + | I_shl + | I_shr + | I_shr_un + | I_sub + | I_sub_ovf + | I_sub_ovf_un + | I_xor + | I_or + | I_neg + | I_not + | I_ldnull + | I_dup + | I_pop + | I_ckfinite + | I_nop + | I_break + | I_arglist + | I_endfilter + | I_endfinally + | I_refanytype + | I_localloc + | I_throw + | I_ldlen + | I_rethrow -> true + | _ -> false + + let ILCmpInstrMap = + lazy ( + let dict = Dictionary 12 + dict.Add (I_beq , i_beq ) + dict.Add (I_bgt , i_bgt ) + dict.Add (I_bgt_un , i_bgt_un ) + dict.Add (I_bge , i_bge ) + dict.Add (I_bge_un , i_bge_un ) + dict.Add (I_ble , i_ble ) + dict.Add (I_ble_un , i_ble_un ) + dict.Add (I_blt , i_blt ) + dict.Add (I_blt_un , i_blt_un ) + dict.Add (I_bne_un , i_bne_un ) + dict.Add (I_brfalse , i_brfalse ) + dict.Add (I_brtrue , i_brtrue ) + dict + ) + + let ILCmpInstrRevMap = + lazy ( + let dict = Dictionary 12 + dict.Add ( I_beq , i_beq_s ) + dict.Add ( I_bgt , i_bgt_s ) + dict.Add ( I_bgt_un , i_bgt_un_s ) + dict.Add ( I_bge , i_bge_s ) + dict.Add ( I_bge_un , i_bge_un_s ) + dict.Add ( I_ble , i_ble_s ) + dict.Add ( I_ble_un , i_ble_un_s ) + dict.Add ( I_blt , i_blt_s ) + dict.Add ( I_blt_un , i_blt_un_s ) + dict.Add ( I_bne_un , i_bne_un_s ) + dict.Add ( I_brfalse , i_brfalse_s ) + dict.Add ( I_brtrue , i_brtrue_s ) + dict + ) + + // From corhdr.h + + let nt_VOID = 0x1uy + let nt_BOOLEAN = 0x2uy + let nt_I1 = 0x3uy + let nt_U1 = 0x4uy + let nt_I2 = 0x5uy + let nt_U2 = 0x6uy + let nt_I4 = 0x7uy + let nt_U4 = 0x8uy + let nt_I8 = 0x9uy + let nt_U8 = 0xAuy + let nt_R4 = 0xBuy + let nt_R8 = 0xCuy + let nt_SYSCHAR = 0xDuy + let nt_VARIANT = 0xEuy + let nt_CURRENCY = 0xFuy + let nt_PTR = 0x10uy + let nt_DECIMAL = 0x11uy + let nt_DATE = 0x12uy + let nt_BSTR = 0x13uy + let nt_LPSTR = 0x14uy + let nt_LPWSTR = 0x15uy + let nt_LPTSTR = 0x16uy + let nt_FIXEDSYSSTRING = 0x17uy + let nt_OBJECTREF = 0x18uy + let nt_IUNKNOWN = 0x19uy + let nt_IDISPATCH = 0x1Auy + let nt_STRUCT = 0x1Buy + let nt_INTF = 0x1Cuy + let nt_SAFEARRAY = 0x1Duy + let nt_FIXEDARRAY = 0x1Euy + let nt_INT = 0x1Fuy + let nt_UINT = 0x20uy + let nt_NESTEDSTRUCT = 0x21uy + let nt_BYVALSTR = 0x22uy + let nt_ANSIBSTR = 0x23uy + let nt_TBSTR = 0x24uy + let nt_VARIANTBOOL = 0x25uy + let nt_FUNC = 0x26uy + let nt_ASANY = 0x28uy + let nt_ARRAY = 0x2Auy + let nt_LPSTRUCT = 0x2Buy + let nt_CUSTOMMARSHALER = 0x2Cuy + let nt_ERROR = 0x2Duy + let nt_MAX = 0x50uy + + // From c:/clrenv.i386/Crt/Inc/i386/hs.h + + let vt_EMPTY = 0 + let vt_NULL = 1 + let vt_I2 = 2 + let vt_I4 = 3 + let vt_R4 = 4 + let vt_R8 = 5 + let vt_CY = 6 + let vt_DATE = 7 + let vt_BSTR = 8 + let vt_DISPATCH = 9 + let vt_ERROR = 10 + let vt_BOOL = 11 + let vt_VARIANT = 12 + let vt_UNKNOWN = 13 + let vt_DECIMAL = 14 + let vt_I1 = 16 + let vt_UI1 = 17 + let vt_UI2 = 18 + let vt_UI4 = 19 + let vt_I8 = 20 + let vt_UI8 = 21 + let vt_INT = 22 + let vt_UINT = 23 + let vt_VOID = 24 + let vt_HRESULT = 25 + let vt_PTR = 26 + let vt_SAFEARRAY = 27 + let vt_CARRAY = 28 + let vt_USERDEFINED = 29 + let vt_LPSTR = 30 + let vt_LPWSTR = 31 + let vt_RECORD = 36 + let vt_FILETIME = 64 + let vt_BLOB = 65 + let vt_STREAM = 66 + let vt_STORAGE = 67 + let vt_STREAMED_OBJECT = 68 + let vt_STORED_OBJECT = 69 + let vt_BLOB_OBJECT = 70 + let vt_CF = 71 + let vt_CLSID = 72 + let vt_VECTOR = 0x1000 + let vt_ARRAY = 0x2000 + let vt_BYREF = 0x4000 + + + + let e_CorILMethod_TinyFormat = 0x02uy + let e_CorILMethod_FatFormat = 0x03uy + let e_CorILMethod_FormatMask = 0x03uy + let e_CorILMethod_MoreSects = 0x08uy + let e_CorILMethod_InitLocals = 0x10uy + + + let e_CorILMethod_Sect_EHTable = 0x1uy + let e_CorILMethod_Sect_FatFormat = 0x40uy + let e_CorILMethod_Sect_MoreSects = 0x80uy + + let e_COR_ILEXCEPTION_CLAUSE_EXCEPTION = 0x0 + let e_COR_ILEXCEPTION_CLAUSE_FILTER = 0x1 + let e_COR_ILEXCEPTION_CLAUSE_FINALLY = 0x2 + let e_COR_ILEXCEPTION_CLAUSE_FAULT = 0x4 + + + module Bytes = + + let dWw1 n = int32 ((n >>> 32) &&& 0xFFFFFFFFL) + let dWw0 n = int32 (n &&& 0xFFFFFFFFL) + + let get (b:byte[]) n = int32 (Array.get b n) + let zeroCreate n: byte[] = Array.zeroCreate n + + let sub ( b:byte[]) s l = Array.sub b s l + let blit (a:byte[]) b c d e = Array.blit a b c d e + + let ofInt32Array (arr:int[]) = Array.init arr.Length (fun i -> byte arr.[i]) + + let stringAsUtf8NullTerminated (s:string) = + Array.append (Encoding.UTF8.GetBytes s) (ofInt32Array [| 0x0 |]) + + let stringAsUnicodeNullTerminated (s:string) = + Array.append (Encoding.Unicode.GetBytes s) (ofInt32Array [| 0x0;0x0 |]) + + type ByteStream = + { bytes: byte[] + mutable pos: int + max: int } + member b.ReadByte() = + if b.pos >= b.max then failwith "end of stream" + let res = b.bytes.[b.pos] + b.pos <- b.pos + 1 + res + member b.ReadUtf8String n = + let res = Encoding.UTF8.GetString(b.bytes,b.pos,n) + b.pos <- b.pos + n; res + + static member FromBytes (b:byte[],n,len) = + if n < 0 || (n+len) > b.Length then failwith "FromBytes" + { bytes = b; pos = n; max = n+len } + + member b.ReadBytes n = + if b.pos + n > b.max then failwith "ReadBytes: end of stream" + let res = Bytes.sub b.bytes b.pos n + b.pos <- b.pos + n + res + + member b.Position = b.pos + + + type ByteBuffer = + { mutable bbArray: byte[] + mutable bbCurrent: int } + + member buf.Ensure newSize = + let oldBufSize = buf.bbArray.Length + if newSize > oldBufSize then + let old = buf.bbArray + buf.bbArray <- Bytes.zeroCreate (max newSize (oldBufSize * 2)) + Bytes.blit old 0 buf.bbArray 0 buf.bbCurrent + + member buf.Close () = Bytes.sub buf.bbArray 0 buf.bbCurrent + + member buf.EmitIntAsByte (i:int) = + let newSize = buf.bbCurrent + 1 + buf.Ensure newSize + buf.bbArray.[buf.bbCurrent] <- byte i + buf.bbCurrent <- newSize + + member buf.EmitByte (b:byte) = buf.EmitIntAsByte (int b) + + member buf.EmitIntsAsBytes (arr:int[]) = + let n = arr.Length + let newSize = buf.bbCurrent + n + buf.Ensure newSize + let bbarr = buf.bbArray + let bbbase = buf.bbCurrent + for i = 0 to n - 1 do + bbarr.[bbbase + i] <- byte arr.[i] + buf.bbCurrent <- newSize + + member bb.FixupInt32 pos n = + bb.bbArray.[pos] <- (b0 n |> byte) + bb.bbArray.[pos + 1] <- (b1 n |> byte) + bb.bbArray.[pos + 2] <- (b2 n |> byte) + bb.bbArray.[pos + 3] <- (b3 n |> byte) + + member buf.EmitInt32 n = + let newSize = buf.bbCurrent + 4 + buf.Ensure newSize + buf.FixupInt32 buf.bbCurrent n + buf.bbCurrent <- newSize + + member buf.EmitBytes (i:byte[]) = + let n = i.Length + let newSize = buf.bbCurrent + n + buf.Ensure newSize + Bytes.blit i 0 buf.bbArray buf.bbCurrent n + buf.bbCurrent <- newSize + + member buf.EmitInt32AsUInt16 n = + let newSize = buf.bbCurrent + 2 + buf.Ensure newSize + buf.bbArray.[buf.bbCurrent] <- (b0 n |> byte) + buf.bbArray.[buf.bbCurrent + 1] <- (b1 n |> byte) + buf.bbCurrent <- newSize + + member buf.EmitBoolAsByte (b:bool) = buf.EmitIntAsByte (if b then 1 else 0) + + member buf.EmitUInt16 (x:uint16) = buf.EmitInt32AsUInt16 (int32 x) + + member buf.EmitInt64 x = + buf.EmitInt32 (Bytes.dWw0 x) + buf.EmitInt32 (Bytes.dWw1 x) + + member buf.Position = buf.bbCurrent + + static member Create sz = + { bbArray=Bytes.zeroCreate sz + bbCurrent = 0 } + + /// Z32 = compressed unsigned integer + static member Z32Size n = + if n <= 0x7F then 1 + elif n <= 0x3FFF then 2 + else 4 + + /// Emit int32 as compressed unsigned integer + member buf.EmitZ32 n = + if n >= 0 && n <= 0x7F then + buf.EmitIntAsByte n + elif n >= 0x80 && n <= 0x3FFF then + buf.EmitIntAsByte (0x80 ||| (n >>> 8)) + buf.EmitIntAsByte (n &&& 0xFF) + else + buf.EmitIntAsByte (0xc0l ||| ((n >>> 24) &&& 0xFF)) + buf.EmitIntAsByte ( (n >>> 16) &&& 0xFF) + buf.EmitIntAsByte ( (n >>> 8) &&& 0xFF) + buf.EmitIntAsByte ( n &&& 0xFF) + + static member Z32 n = let bb = ByteBuffer.Create (ByteBuffer.Z32Size n) in bb.EmitZ32 n; bb.Close() + + member buf.EmitPadding n = + for i = 0 to n-1 do + buf.EmitByte 0x0uy + + // Emit compressed untagged integer + member buf.EmitZUntaggedIndex big idx = + if big then buf.EmitInt32 idx + elif idx > 0xffff then failwith "EmitZUntaggedIndex: too big for small address or simple index" + else buf.EmitInt32AsUInt16 idx + + // Emit compressed tagged integer + member buf.EmitZTaggedIndex tag nbits big idx = + let idx2 = (idx <<< nbits) ||| tag + if big then buf.EmitInt32 idx2 + else buf.EmitInt32AsUInt16 idx2 + + //--------------------------------------------------------------------- + // Byte, byte array fragments and other concrete representations + // manipulations. + //--------------------------------------------------------------------- + + let bitsOfSingle (x:float32) = System.BitConverter.ToInt32(System.BitConverter.GetBytes(x), 0) + let bitsOfDouble (x:float) = System.BitConverter.DoubleToInt64Bits(x) + + type ByteFile(bytes:byte[]) = + + member __.Bytes = bytes + member __.ReadByte addr = bytes.[addr] + member __.ReadBytes addr len = Array.sub bytes addr len + member __.CountUtf8String addr = + let mutable p = addr + while bytes.[p] <> 0uy do + p <- p + 1 + p - addr + + member m.ReadUTF8String addr = + let n = m.CountUtf8String addr + Encoding.UTF8.GetString (bytes, addr, n) + + member is.ReadInt32 addr = + let b0 = is.ReadByte addr + let b1 = is.ReadByte (addr+1) + let b2 = is.ReadByte (addr+2) + let b3 = is.ReadByte (addr+3) + int b0 ||| (int b1 <<< 8) ||| (int b2 <<< 16) ||| (int b3 <<< 24) + + member is.ReadUInt16 addr = + let b0 = is.ReadByte addr + let b1 = is.ReadByte (addr+1) + uint16 b0 ||| (uint16 b1 <<< 8) + + [] + module Reader = + let seekReadByte (is:ByteFile) addr = is.ReadByte addr + let seekReadBytes (is:ByteFile) addr len = is.ReadBytes addr len + let seekReadInt32 (is:ByteFile) addr = is.ReadInt32 addr + let seekReadUInt16 (is:ByteFile) addr = is.ReadUInt16 addr + + let seekReadByteAsInt32 is addr = int32 (seekReadByte is addr) + + let seekReadInt64 is addr = + let b0 = seekReadByte is addr + let b1 = seekReadByte is (addr+1) + let b2 = seekReadByte is (addr+2) + let b3 = seekReadByte is (addr+3) + let b4 = seekReadByte is (addr+4) + let b5 = seekReadByte is (addr+5) + let b6 = seekReadByte is (addr+6) + let b7 = seekReadByte is (addr+7) + int64 b0 ||| (int64 b1 <<< 8) ||| (int64 b2 <<< 16) ||| (int64 b3 <<< 24) ||| + (int64 b4 <<< 32) ||| (int64 b5 <<< 40) ||| (int64 b6 <<< 48) ||| (int64 b7 <<< 56) + + let seekReadUInt16AsInt32 is addr = int32 (seekReadUInt16 is addr) + + let seekReadCompressedUInt32 is addr = + let b0 = seekReadByte is addr + if b0 <= 0x7Fuy then int b0, addr+1 + elif b0 <= 0xBFuy then + let b0 = b0 &&& 0x7Fuy + let b1 = seekReadByteAsInt32 is (addr+1) + (int b0 <<< 8) ||| int b1, addr+2 + else + let b0 = b0 &&& 0x3Fuy + let b1 = seekReadByteAsInt32 is (addr+1) + let b2 = seekReadByteAsInt32 is (addr+2) + let b3 = seekReadByteAsInt32 is (addr+3) + (int b0 <<< 24) ||| (int b1 <<< 16) ||| (int b2 <<< 8) ||| int b3, addr+4 + + let seekReadSByte is addr = sbyte (seekReadByte is addr) + + let rec seekCountUtf8String is addr n = + let c = seekReadByteAsInt32 is addr + if c = 0 then n + else seekCountUtf8String is (addr+1) (n+1) + + let seekReadUTF8String is addr = + let n = seekCountUtf8String is addr 0 + let bytes = seekReadBytes is addr n + Encoding.UTF8.GetString (bytes, 0, bytes.Length) + + let seekReadBlob is addr = + let len, addr = seekReadCompressedUInt32 is addr + seekReadBytes is addr len + + let seekReadUserString is addr = + let len, addr = seekReadCompressedUInt32 is addr + let bytes = seekReadBytes is addr (len - 1) + Encoding.Unicode.GetString(bytes, 0, bytes.Length) + + let seekReadGuid is addr = seekReadBytes is addr 0x10 + + let seekReadUncodedToken is addr = + i32ToUncodedToken (seekReadInt32 is addr) + + let sigptrGetByte (bytes:byte[]) sigptr = + bytes.[sigptr], sigptr + 1 + + let sigptrGetBool bytes sigptr = + let b0,sigptr = sigptrGetByte bytes sigptr + (b0 = 0x01uy) ,sigptr + + let sigptrGetSByte bytes sigptr = + let i,sigptr = sigptrGetByte bytes sigptr + sbyte i,sigptr + + let sigptrGetUInt16 bytes sigptr = + let b0,sigptr = sigptrGetByte bytes sigptr + let b1,sigptr = sigptrGetByte bytes sigptr + uint16 (int b0 ||| (int b1 <<< 8)),sigptr + + let sigptrGetInt16 bytes sigptr = + let u,sigptr = sigptrGetUInt16 bytes sigptr + int16 u,sigptr + + let sigptrGetInt32 (bytes: byte[]) sigptr = + let b0 = bytes.[sigptr] + let b1 = bytes.[sigptr+1] + let b2 = bytes.[sigptr+2] + let b3 = bytes.[sigptr+3] + let res = int b0 ||| (int b1 <<< 8) ||| (int b2 <<< 16) ||| (int b3 <<< 24) + res, sigptr + 4 + + let sigptrGetUInt32 bytes sigptr = + let u,sigptr = sigptrGetInt32 bytes sigptr + uint32 u,sigptr + + let sigptrGetUInt64 bytes sigptr = + let u0,sigptr = sigptrGetUInt32 bytes sigptr + let u1,sigptr = sigptrGetUInt32 bytes sigptr + (uint64 u0 ||| (uint64 u1 <<< 32)),sigptr + + let sigptrGetInt64 bytes sigptr = + let u,sigptr = sigptrGetUInt64 bytes sigptr + int64 u,sigptr + + let sigptrGetSingle bytes sigptr = + let u,sigptr = sigptrGetInt32 bytes sigptr + singleOfBits u,sigptr + + let sigptrGetDouble bytes sigptr = + let u,sigptr = sigptrGetInt64 bytes sigptr + doubleOfBits u,sigptr + + let sigptrGetZInt32 bytes sigptr = + let b0,sigptr = sigptrGetByte bytes sigptr + if b0 <= 0x7Fuy then int b0, sigptr + elif b0 <= 0xBFuy then + let b0 = b0 &&& 0x7Fuy + let b1,sigptr = sigptrGetByte bytes sigptr + (int b0 <<< 8) ||| int b1, sigptr + else + let b0 = b0 &&& 0x3Fuy + let b1,sigptr = sigptrGetByte bytes sigptr + let b2,sigptr = sigptrGetByte bytes sigptr + let b3,sigptr = sigptrGetByte bytes sigptr + (int b0 <<< 24) ||| (int b1 <<< 16) ||| (int b2 <<< 8) ||| int b3, sigptr + + let rec sigptrFoldAcc f n (bytes:byte[]) (sigptr:int) i acc = + if i < n then + let x,sp = f bytes sigptr + sigptrFoldAcc f n bytes sp (i+1) (x::acc) + else + Array.ofList (List.rev acc), sigptr + + let sigptrFold f n (bytes:byte[]) (sigptr:int) = + sigptrFoldAcc f n bytes sigptr 0 [] + + let sigptrGetBytes n (bytes:byte[]) sigptr = + let res = Array.zeroCreate n + for i = 0 to (n - 1) do + res.[i] <- bytes.[sigptr + i] + res, sigptr + n + + let sigptrGetString n bytes sigptr = + let bytearray,sigptr = sigptrGetBytes n bytes sigptr + (Encoding.UTF8.GetString(bytearray, 0, bytearray.Length)),sigptr + + let chunk sz next = ({addr=next; size=sz},next + sz) + let nochunk next = ({addr= 0x0;size= 0x0; } ,next) + + + let kindAssemblyRef = ILRowKind [ UShort; UShort; UShort; UShort; ULong; Blob; SString; SString; Blob; ] + let kindModuleRef = ILRowKind [ SString ] + let kindFileRef = ILRowKind [ ULong; SString; Blob ] + let kindTypeRef = ILRowKind [ ResolutionScope; SString; SString ] + let kindTypeSpec = ILRowKind [ Blob ] + let kindTypeDef = ILRowKind [ ULong; SString; SString; TypeDefOrRefOrSpec; SimpleIndex ILTableNames.Field; SimpleIndex ILTableNames.Method ] + let kindPropertyMap = ILRowKind [ SimpleIndex ILTableNames.TypeDef; SimpleIndex ILTableNames.Property ] + let kindEventMap = ILRowKind [ SimpleIndex ILTableNames.TypeDef; SimpleIndex ILTableNames.Event ] + let kindInterfaceImpl = ILRowKind [ SimpleIndex ILTableNames.TypeDef; TypeDefOrRefOrSpec ] + let kindNested = ILRowKind [ SimpleIndex ILTableNames.TypeDef; SimpleIndex ILTableNames.TypeDef ] + let kindCustomAttribute = ILRowKind [ HasCustomAttribute; CustomAttributeType; Blob ] + let kindDeclSecurity = ILRowKind [ UShort; HasDeclSecurity; Blob ] + let kindMemberRef = ILRowKind [ MemberRefParent; SString; Blob ] + let kindStandAloneSig = ILRowKind [ Blob ] + let kindFieldDef = ILRowKind [ UShort; SString; Blob ] + let kindFieldRVA = ILRowKind [ Data; SimpleIndex ILTableNames.Field ] + let kindFieldMarshal = ILRowKind [ HasFieldMarshal; Blob ] + let kindConstant = ILRowKind [ UShort;HasConstant; Blob ] + let kindFieldLayout = ILRowKind [ ULong; SimpleIndex ILTableNames.Field ] + let kindParam = ILRowKind [ UShort; UShort; SString ] + let kindMethodDef = ILRowKind [ ULong; UShort; UShort; SString; Blob; SimpleIndex ILTableNames.Param ] + let kindMethodImpl = ILRowKind [ SimpleIndex ILTableNames.TypeDef; MethodDefOrRef; MethodDefOrRef ] + let kindImplMap = ILRowKind [ UShort; MemberForwarded; SString; SimpleIndex ILTableNames.ModuleRef ] + let kindMethodSemantics = ILRowKind [ UShort; SimpleIndex ILTableNames.Method; HasSemantics ] + let kindProperty = ILRowKind [ UShort; SString; Blob ] + let kindEvent = ILRowKind [ UShort; SString; TypeDefOrRefOrSpec ] + let kindManifestResource = ILRowKind [ ULong; ULong; SString; Implementation ] + let kindClassLayout = ILRowKind [ UShort; ULong; SimpleIndex ILTableNames.TypeDef ] + let kindExportedType = ILRowKind [ ULong; ULong; SString; SString; Implementation ] + let kindAssembly = ILRowKind [ ULong; UShort; UShort; UShort; UShort; ULong; Blob; SString; SString ] + let kindGenericParam_v1_1 = ILRowKind [ UShort; UShort; TypeOrMethodDef; SString; TypeDefOrRefOrSpec ] + let kindGenericParam_v2_0 = ILRowKind [ UShort; UShort; TypeOrMethodDef; SString ] + let kindMethodSpec = ILRowKind [ MethodDefOrRef; Blob ] + let kindGenericParamConstraint = ILRowKind [ SimpleIndex ILTableNames.GenericParam; TypeDefOrRefOrSpec ] + let kindModule = ILRowKind [ UShort; SString; GGuid; GGuid; GGuid ] + let kindIllegal = ILRowKind [ ] + + let hcCompare (TaggedIndex((t1: HasConstantTag), (idx1:int))) (TaggedIndex((t2: HasConstantTag), idx2)) = + if idx1 < idx2 then -1 elif idx1 > idx2 then 1 else compare t1.Tag t2.Tag + + let hsCompare (TaggedIndex((t1:HasSemanticsTag), (idx1:int))) (TaggedIndex((t2:HasSemanticsTag), idx2)) = + if idx1 < idx2 then -1 elif idx1 > idx2 then 1 else compare t1.Tag t2.Tag + + let hcaCompare (TaggedIndex((t1:HasCustomAttributeTag), (idx1:int))) (TaggedIndex((t2:HasCustomAttributeTag), idx2)) = + if idx1 < idx2 then -1 elif idx1 > idx2 then 1 else compare t1.Tag t2.Tag + + let mfCompare (TaggedIndex((t1:MemberForwardedTag), (idx1:int))) (TaggedIndex((t2:MemberForwardedTag), idx2)) = + if idx1 < idx2 then -1 elif idx1 > idx2 then 1 else compare t1.Tag t2.Tag + + let hdsCompare (TaggedIndex((t1:HasDeclSecurityTag), (idx1:int))) (TaggedIndex((t2:HasDeclSecurityTag), idx2)) = + if idx1 < idx2 then -1 elif idx1 > idx2 then 1 else compare t1.Tag t2.Tag + + let hfmCompare (TaggedIndex((t1:HasFieldMarshalTag), idx1)) (TaggedIndex((t2:HasFieldMarshalTag), idx2)) = + if idx1 < idx2 then -1 elif idx1 > idx2 then 1 else compare t1.Tag t2.Tag + + let tomdCompare (TaggedIndex((t1:TypeOrMethodDefTag), idx1)) (TaggedIndex((t2:TypeOrMethodDefTag), idx2)) = + if idx1 < idx2 then -1 elif idx1 > idx2 then 1 else compare t1.Tag t2.Tag + + let simpleIndexCompare (idx1:int) (idx2:int) = + compare idx1 idx2 + + let mkCacheInt32 lowMem _infile _nm _sz = + if lowMem then (fun f x -> f x) else + let cache = ref null + fun f (idx:int32) -> + let cache = + match !cache with + | null -> cache := new Dictionary(11) + | _ -> () + !cache + let mutable res = Unchecked.defaultof<_> + let ok = cache.TryGetValue(idx, &res) + if ok then + res + else + let res = f idx + cache.[idx] <- res; + res + + let mkCacheGeneric lowMem _inbase _nm _sz = + if lowMem then (fun f x -> f x) else + let cache = ref null + fun f (idx :'T) -> + let cache = + match !cache with + | null -> cache := new Dictionary<_,_>(11 (* sz:int *) ) + | _ -> () + !cache + if cache.ContainsKey idx then cache.[idx] + else let res = f idx in cache.[idx] <- res; res + + let seekFindRow numRows rowChooser = + let mutable i = 1 + while (i <= numRows && not (rowChooser i)) do + i <- i + 1; + i + + // search for rows satisfying predicate + let seekReadIndexedRows (numRows, rowReader, keyFunc, keyComparer, binaryChop, rowConverter) = + if binaryChop then + let mutable low = 0 + let mutable high = numRows + 1 + begin + let mutable fin = false + while not fin do + if high - low <= 1 then + fin <- true + else + let mid = (low + high) / 2 + let midrow = rowReader mid + let c = keyComparer (keyFunc midrow) + if c > 0 then + low <- mid + elif c < 0 then + high <- mid + else + fin <- true + end; + let mutable res = [] + if high - low > 1 then + // now read off rows, forward and backwards + let mid = (low + high) / 2 + // read forward + begin + let mutable fin = false + let mutable curr = mid + while not fin do + if curr > numRows then + fin <- true; + else + let currrow = rowReader curr + if keyComparer (keyFunc currrow) = 0 then + res <- rowConverter currrow :: res; + else + fin <- true; + curr <- curr + 1; + done; + end; + res <- List.rev res; + // read backwards + begin + let mutable fin = false + let mutable curr = mid - 1 + while not fin do + if curr = 0 then + fin <- true + else + let currrow = rowReader curr + if keyComparer (keyFunc currrow) = 0 then + res <- rowConverter currrow :: res; + else + fin <- true; + curr <- curr - 1; + end; + res |> List.toArray + else + let res = ref [] + for i = 1 to numRows do + let rowinfo = rowReader i + if keyComparer (keyFunc rowinfo) = 0 then + res := rowConverter rowinfo :: !res; + List.rev !res |> List.toArray + + + let seekReadOptionalIndexedRow (info) = + match seekReadIndexedRows info with + | [| |] -> None + | xs -> Some xs.[0] + + let seekReadIndexedRow (info) = + match seekReadOptionalIndexedRow info with + | Some row -> row + | None -> failwith ("no row found for key when indexing table") + + let getName (ltd: Lazy) = + let td = ltd.Force() + (td.Name,ltd) + + let emptyILEvents = { new ILEventDefs with member __.Entries = [| |] } + let emptyILProperties = { new ILPropertyDefs with member __.Entries = [| |] } + let emptyILTypeDefs = ILTypeDefs (lazy [| |]) + let emptyILCustomAttrs = { new ILCustomAttrs with member __.Entries = [| |] } + let mkILCustomAttrs x = { new ILCustomAttrs with member __.Entries = x } + let emptyILMethodImpls = { new ILMethodImplDefs with member __.Entries = [| |] } + let emptyILMethods = ILMethodDefs (lazy [| |]) + let emptyILFields = { new ILFieldDefs with member __.Entries = [| |] } + + let mkILTy boxed tspec = + match boxed with + | AsObject -> ILType.Boxed tspec + | _ -> ILType.Value tspec + + let mkILArr1DTy ty = ILType.Array (ILArrayShape.SingleDimensional, ty) + + let typeNameForGlobalFunctions = "" + + let mkILNonGenericTySpec tref = ILTypeSpec (tref,[| |]) + let mkILTypeForGlobalFunctions scoref = ILType.Boxed (mkILNonGenericTySpec (ILTypeRef(ILTypeRefScope.Top scoref, UNone, typeNameForGlobalFunctions))) + let mkILArrTy (ty, shape) = ILType.Array(shape,ty) + + let mkILMethSpecInTyRaw (typ:ILType, cc, nm, args, rty, minst:ILGenericArgs) = + ILMethodSpec (ILMethodRef (typ.TypeRef,cc,minst.Length,nm,args,rty),typ,minst) + + let mkILFieldSpecInTy (typ:ILType,nm,fty) = + ILFieldSpec (ILFieldRef (typ.TypeRef,nm,fty), typ) + + let mkILGlobals systemRuntimeScopeRef = + let mkILTyspec nsp nm = mkILNonGenericTySpec(ILTypeRef(ILTypeRefScope.Top(systemRuntimeScopeRef),USome nsp,nm)) + { typ_Object = ILType.Boxed (mkILTyspec "System" "Object") + typ_String = ILType.Boxed (mkILTyspec "System" "String") + typ_Type = ILType.Boxed (mkILTyspec "System" "Type") + typ_Int64 = ILType.Value (mkILTyspec "System" "Int64") + typ_UInt64 = ILType.Value (mkILTyspec "System" "UInt64") + typ_Int32 = ILType.Value (mkILTyspec "System" "Int32") + typ_Array = ILType.Boxed (mkILTyspec "System" "Array") + typ_UInt32 = ILType.Value (mkILTyspec "System" "UInt32") + typ_Int16 = ILType.Value (mkILTyspec "System" "Int16") + typ_UInt16 = ILType.Value (mkILTyspec "System" "UInt16") + typ_SByte = ILType.Value (mkILTyspec "System" "SByte") + typ_Byte = ILType.Value (mkILTyspec "System" "Byte") + typ_Single = ILType.Value (mkILTyspec "System" "Single") + typ_Double = ILType.Value (mkILTyspec "System" "Double") + typ_Boolean = ILType.Value (mkILTyspec "System" "Boolean") + typ_Char = ILType.Value (mkILTyspec "System" "Char") + typ_IntPtr = ILType.Value (mkILTyspec "System" "IntPtr") + typ_TypedReference = Some (ILType.Value (mkILTyspec "System" "TypedReference")) + typ_UIntPtr = ILType.Value (mkILTyspec "System" "UIntPtr") + systemRuntimeScopeRef = systemRuntimeScopeRef } + + type ILModuleReader(infile: string, is: ByteFile, ilg: ILGlobals, lowMem: bool) = + + //----------------------------------------------------------------------- + // Crack the binary headers, build a reader context and return the lazy + // read of the AbsIL module. + // ---------------------------------------------------------------------- + + (* MSDOS HEADER *) + let peSignaturePhysLoc = seekReadInt32 is 0x3c + + (* PE HEADER *) + let peFileHeaderPhysLoc = peSignaturePhysLoc + 0x04 + let peOptionalHeaderPhysLoc = peFileHeaderPhysLoc + 0x14 + let peSignature = seekReadInt32 is (peSignaturePhysLoc + 0) + do if peSignature <> 0x4550 then failwithf "not a PE file - bad magic PE number 0x%08x, is = %A" peSignature is; + + + (* PE SIGNATURE *) + let machine = seekReadUInt16AsInt32 is (peFileHeaderPhysLoc + 0) + let numSections = seekReadUInt16AsInt32 is (peFileHeaderPhysLoc + 2) + let optHeaderSize = seekReadUInt16AsInt32 is (peFileHeaderPhysLoc + 16) + do if optHeaderSize <> 0xe0 && + optHeaderSize <> 0xf0 then failwith "not a PE file - bad optional header size"; + let x64adjust = optHeaderSize - 0xe0 + let only64 = (optHeaderSize = 0xf0) (* May want to read in the optional header Magic number and check that as well... *) + let platform = match machine with | 0x8664 -> Some(AMD64) | 0x200 -> Some(IA64) | _ -> Some(X86) + let sectionHeadersStartPhysLoc = peOptionalHeaderPhysLoc + optHeaderSize + + let flags = seekReadUInt16AsInt32 is (peFileHeaderPhysLoc + 18) + let isDll = (flags &&& 0x2000) <> 0x0 + + (* OPTIONAL PE HEADER *) + (* x86: 000000a0 *) + (* x86: 000000b0 *) + let dataSegmentAddr = seekReadInt32 is (peOptionalHeaderPhysLoc + 24) (* e.g. 0x0000c000 *) + let imageBaseReal = if only64 then dataSegmentAddr else seekReadInt32 is (peOptionalHeaderPhysLoc + 28) (* Image Base Always 0x400000 (see Section 23.1). - QUERY: no it's not always 0x400000, e.g. 0x034f0000 *) + let alignVirt = seekReadInt32 is (peOptionalHeaderPhysLoc + 32) (* Section Alignment Always 0x2000 (see Section 23.1). *) + let alignPhys = seekReadInt32 is (peOptionalHeaderPhysLoc + 36) (* File Alignment Either 0x200 or 0x1000. *) + (* x86: 000000c0 *) + let subsysMajor = seekReadUInt16AsInt32 is (peOptionalHeaderPhysLoc + 48) (* SubSys Major Always 4 (see Section 23.1). *) + let subsysMinor = seekReadUInt16AsInt32 is (peOptionalHeaderPhysLoc + 50) (* SubSys Minor Always 0 (see Section 23.1). *) + (* x86: 000000d0 *) + let subsys = seekReadUInt16 is (peOptionalHeaderPhysLoc + 68) (* SubSystem Subsystem required to run this image. Shall be either IMAGE_SUBSYSTEM_WINDOWS_CE_GUI (!0x3) or IMAGE_SUBSYSTEM_WINDOWS_GUI (!0x2). QUERY: Why is this 3 on the images ILASM produces??? *) + let useHighEntropyVA = + let n = seekReadUInt16 is (peOptionalHeaderPhysLoc + 70) + let highEnthropyVA = 0x20us + (n &&& highEnthropyVA) = highEnthropyVA + + (* x86: 000000e0 *) + (* x86: 000000f0, x64: 00000100 *) + (* x86: 00000100 - these addresses are for x86 - for the x64 location, add x64adjust (0x10) *) + (* x86: 00000110 *) + (* x86: 00000120 *) + (* x86: 00000130 *) + (* x86: 00000140 *) + (* x86: 00000150 *) + (* x86: 00000160 *) + let cliHeaderAddr = seekReadInt32 is (peOptionalHeaderPhysLoc + 208 + x64adjust) + + let anyV2P (n,v) = + let rec look i pos = + if i >= numSections then (failwith (infile + ": bad "+n+", rva "+string v); 0x0) + else + let virtSize = seekReadInt32 is (pos + 8) + let virtAddr = seekReadInt32 is (pos + 12) + let physLoc = seekReadInt32 is (pos + 20) + if (v >= virtAddr && (v < virtAddr + virtSize)) then (v - virtAddr) + physLoc + else look (i+1) (pos + 0x28) + look 0 sectionHeadersStartPhysLoc + + let cliHeaderPhysLoc = anyV2P ("cli header",cliHeaderAddr) + + let metadataAddr = seekReadInt32 is (cliHeaderPhysLoc + 8) + let cliFlags = seekReadInt32 is (cliHeaderPhysLoc + 16) + let ilOnly = (cliFlags &&& 0x01) <> 0x00 + let only32 = (cliFlags &&& 0x02) <> 0x00 + let is32bitpreferred = (cliFlags &&& 0x00020003) <> 0x00 + + let entryPointToken = seekReadUncodedToken is (cliHeaderPhysLoc + 20) + let resourcesAddr = seekReadInt32 is (cliHeaderPhysLoc + 24) + + let metadataPhysLoc = anyV2P ("metadata",metadataAddr) + let magic = seekReadUInt16AsInt32 is metadataPhysLoc + do if magic <> 0x5342 then failwith (infile + ": bad metadata magic number: " + string magic); + let magic2 = seekReadUInt16AsInt32 is (metadataPhysLoc + 2) + do if magic2 <> 0x424a then failwith "bad metadata magic number"; + + let versionLength = seekReadInt32 is (metadataPhysLoc + 12) + let ilMetadataVersion = seekReadBytes is (metadataPhysLoc + 16) versionLength |> Array.filter (fun b -> b <> 0uy) + let x = align 0x04 (16 + versionLength) + let numStreams = seekReadUInt16AsInt32 is (metadataPhysLoc + x + 2) + let streamHeadersStart = (metadataPhysLoc + x + 4) + + (* Crack stream headers *) + + let tryFindStream name = + let rec look i pos = + if i >= numStreams then None + else + let offset = seekReadInt32 is (pos + 0) + let length = seekReadInt32 is (pos + 4) + let res = ref true + let fin = ref false + let n = ref 0 + // read and compare the stream name byte by byte + while (not !fin) do + let c= seekReadByteAsInt32 is (pos + 8 + (!n)) + if c = 0 then + fin := true + elif !n >= Array.length name || c <> name.[!n] then + res := false; + incr n + if !res then Some(offset + metadataPhysLoc,length) + else look (i+1) (align 0x04 (pos + 8 + (!n))) + look 0 streamHeadersStart + + let findStream name = + match tryFindStream name with + | None -> (0x0, 0x0) + | Some positions -> positions + + let (tablesStreamPhysLoc, _tablesStreamSize) = + match tryFindStream [| 0x23; 0x7e |] (* #~ *) with + | Some res -> res + | None -> + match tryFindStream [| 0x23; 0x2d |] (* #-: at least one DLL I've seen uses this! *) with + | Some res -> res + | None -> + let firstStreamOffset = seekReadInt32 is (streamHeadersStart + 0) + let firstStreamLength = seekReadInt32 is (streamHeadersStart + 4) + firstStreamOffset,firstStreamLength + + let (stringsStreamPhysicalLoc, stringsStreamSize) = findStream [| 0x23; 0x53; 0x74; 0x72; 0x69; 0x6e; 0x67; 0x73; |] (* #Strings *) + let (blobsStreamPhysicalLoc, blobsStreamSize) = findStream [| 0x23; 0x42; 0x6c; 0x6f; 0x62; |] (* #Blob *) + + let tablesStreamMajorVersion = seekReadByteAsInt32 is (tablesStreamPhysLoc + 4) + let tablesStreamMinorVersion = seekReadByteAsInt32 is (tablesStreamPhysLoc + 5) + + let usingWhidbeyBeta1TableSchemeForGenericParam = (tablesStreamMajorVersion = 1) && (tablesStreamMinorVersion = 1) + + let tableKinds = + [|kindModule (* Table 0 *); + kindTypeRef (* Table 1 *); + kindTypeDef (* Table 2 *); + kindIllegal (* kindFieldPtr *) (* Table 3 *); + kindFieldDef (* Table 4 *); + kindIllegal (* kindMethodPtr *) (* Table 5 *); + kindMethodDef (* Table 6 *); + kindIllegal (* kindParamPtr *) (* Table 7 *); + kindParam (* Table 8 *); + kindInterfaceImpl (* Table 9 *); + kindMemberRef (* Table 10 *); + kindConstant (* Table 11 *); + kindCustomAttribute (* Table 12 *); + kindFieldMarshal (* Table 13 *); + kindDeclSecurity (* Table 14 *); + kindClassLayout (* Table 15 *); + kindFieldLayout (* Table 16 *); + kindStandAloneSig (* Table 17 *); + kindEventMap (* Table 18 *); + kindIllegal (* kindEventPtr *) (* Table 19 *); + kindEvent (* Table 20 *); + kindPropertyMap (* Table 21 *); + kindIllegal (* kindPropertyPtr *) (* Table 22 *); + kindProperty (* Table 23 *); + kindMethodSemantics (* Table 24 *); + kindMethodImpl (* Table 25 *); + kindModuleRef (* Table 26 *); + kindTypeSpec (* Table 27 *); + kindImplMap (* Table 28 *); + kindFieldRVA (* Table 29 *); + kindIllegal (* kindENCLog *) (* Table 30 *); + kindIllegal (* kindENCMap *) (* Table 31 *); + kindAssembly (* Table 32 *); + kindIllegal (* kindAssemblyProcessor *) (* Table 33 *); + kindIllegal (* kindAssemblyOS *) (* Table 34 *); + kindAssemblyRef (* Table 35 *); + kindIllegal (* kindAssemblyRefProcessor *) (* Table 36 *); + kindIllegal (* kindAssemblyRefOS *) (* Table 37 *); + kindFileRef (* Table 38 *); + kindExportedType (* Table 39 *); + kindManifestResource (* Table 40 *); + kindNested (* Table 41 *); + (if usingWhidbeyBeta1TableSchemeForGenericParam then kindGenericParam_v1_1 else kindGenericParam_v2_0); (* Table 42 *) + kindMethodSpec (* Table 43 *); + kindGenericParamConstraint (* Table 44 *); + kindIllegal (* Table 45 *); + kindIllegal (* Table 46 *); + kindIllegal (* Table 47 *); + kindIllegal (* Table 48 *); + kindIllegal (* Table 49 *); + kindIllegal (* Table 50 *); + kindIllegal (* Table 51 *); + kindIllegal (* Table 52 *); + kindIllegal (* Table 53 *); + kindIllegal (* Table 54 *); + kindIllegal (* Table 55 *); + kindIllegal (* Table 56 *); + kindIllegal (* Table 57 *); + kindIllegal (* Table 58 *); + kindIllegal (* Table 59 *); + kindIllegal (* Table 60 *); + kindIllegal (* Table 61 *); + kindIllegal (* Table 62 *); + kindIllegal (* Table 63 *); + |] + + let heapSizes = seekReadByteAsInt32 is (tablesStreamPhysLoc + 6) + let valid = seekReadInt64 is (tablesStreamPhysLoc + 8) + let sorted = seekReadInt64 is (tablesStreamPhysLoc + 16) + let tableRowCount, startOfTables = + let numRows = Array.create 64 0 + let prevNumRowIdx = ref (tablesStreamPhysLoc + 24) + for i = 0 to 63 do + if (valid &&& (int64 1 <<< i)) <> int64 0 then + numRows.[i] <- (seekReadInt32 is !prevNumRowIdx); + prevNumRowIdx := !prevNumRowIdx + 4 + numRows, !prevNumRowIdx + + let getNumRows (tab:ILTableName) = tableRowCount.[tab.Index] + let stringsBigness = (heapSizes &&& 1) <> 0 + let guidsBigness = (heapSizes &&& 2) <> 0 + let blobsBigness = (heapSizes &&& 4) <> 0 + + let tableBigness = Array.map (fun n -> n >= 0x10000) tableRowCount + + let codedBigness nbits tab = + let rows = getNumRows tab + rows >= (0x10000 >>>& nbits) + + let tdorBigness = + codedBigness 2 ILTableNames.TypeDef || + codedBigness 2 ILTableNames.TypeRef || + codedBigness 2 ILTableNames.TypeSpec + + let tomdBigness = + codedBigness 1 ILTableNames.TypeDef || + codedBigness 1 ILTableNames.Method + + let hcBigness = + codedBigness 2 ILTableNames.Field || + codedBigness 2 ILTableNames.Param || + codedBigness 2 ILTableNames.Property + + let hcaBigness = + codedBigness 5 ILTableNames.Method || + codedBigness 5 ILTableNames.Field || + codedBigness 5 ILTableNames.TypeRef || + codedBigness 5 ILTableNames.TypeDef || + codedBigness 5 ILTableNames.Param || + codedBigness 5 ILTableNames.InterfaceImpl || + codedBigness 5 ILTableNames.MemberRef || + codedBigness 5 ILTableNames.Module || + codedBigness 5 ILTableNames.Permission || + codedBigness 5 ILTableNames.Property || + codedBigness 5 ILTableNames.Event || + codedBigness 5 ILTableNames.StandAloneSig || + codedBigness 5 ILTableNames.ModuleRef || + codedBigness 5 ILTableNames.TypeSpec || + codedBigness 5 ILTableNames.Assembly || + codedBigness 5 ILTableNames.AssemblyRef || + codedBigness 5 ILTableNames.File || + codedBigness 5 ILTableNames.ExportedType || + codedBigness 5 ILTableNames.ManifestResource || + codedBigness 5 ILTableNames.GenericParam || + codedBigness 5 ILTableNames.GenericParamConstraint || + codedBigness 5 ILTableNames.MethodSpec + + + let hfmBigness = + codedBigness 1 ILTableNames.Field || + codedBigness 1 ILTableNames.Param + + let hdsBigness = + codedBigness 2 ILTableNames.TypeDef || + codedBigness 2 ILTableNames.Method || + codedBigness 2 ILTableNames.Assembly + + let mrpBigness = + codedBigness 3 ILTableNames.TypeRef || + codedBigness 3 ILTableNames.ModuleRef || + codedBigness 3 ILTableNames.Method || + codedBigness 3 ILTableNames.TypeSpec + + let hsBigness = + codedBigness 1 ILTableNames.Event || + codedBigness 1 ILTableNames.Property + + let mdorBigness = + codedBigness 1 ILTableNames.Method || + codedBigness 1 ILTableNames.MemberRef + + let mfBigness = + codedBigness 1 ILTableNames.Field || + codedBigness 1 ILTableNames.Method + + let iBigness = + codedBigness 2 ILTableNames.File || + codedBigness 2 ILTableNames.AssemblyRef || + codedBigness 2 ILTableNames.ExportedType + + let catBigness = + codedBigness 3 ILTableNames.Method || + codedBigness 3 ILTableNames.MemberRef + + let rsBigness = + codedBigness 2 ILTableNames.Module || + codedBigness 2 ILTableNames.ModuleRef || + codedBigness 2 ILTableNames.AssemblyRef || + codedBigness 2 ILTableNames.TypeRef + + let rowKindSize (ILRowKind kinds) = + kinds |> List.sumBy (fun x -> + match x with + | UShort -> 2 + | ULong -> 4 + | Byte -> 1 + | Data -> 4 + | GGuid -> (if guidsBigness then 4 else 2) + | Blob -> (if blobsBigness then 4 else 2) + | SString -> (if stringsBigness then 4 else 2) + | SimpleIndex tab -> (if tableBigness.[tab.Index] then 4 else 2) + | TypeDefOrRefOrSpec -> (if tdorBigness then 4 else 2) + | TypeOrMethodDef -> (if tomdBigness then 4 else 2) + | HasConstant -> (if hcBigness then 4 else 2) + | HasCustomAttribute -> (if hcaBigness then 4 else 2) + | HasFieldMarshal -> (if hfmBigness then 4 else 2) + | HasDeclSecurity -> (if hdsBigness then 4 else 2) + | MemberRefParent -> (if mrpBigness then 4 else 2) + | HasSemantics -> (if hsBigness then 4 else 2) + | MethodDefOrRef -> (if mdorBigness then 4 else 2) + | MemberForwarded -> (if mfBigness then 4 else 2) + | Implementation -> (if iBigness then 4 else 2) + | CustomAttributeType -> (if catBigness then 4 else 2) + | ResolutionScope -> (if rsBigness then 4 else 2)) + + let tableRowSizes = tableKinds |> Array.map rowKindSize + + let tablePhysLocations = + let res = Array.create 64 0x0 + let prevTablePhysLoc = ref startOfTables + for i = 0 to 63 do + res.[i] <- !prevTablePhysLoc; + prevTablePhysLoc := !prevTablePhysLoc + (tableRowCount.[i] * tableRowSizes.[i]); + res + + // All the caches. The sizes are guesstimates for the rough sharing-density of the assembly + let cacheAssemblyRef = mkCacheInt32 lowMem infile "ILAssemblyRef" (getNumRows ILTableNames.AssemblyRef) + let cacheMemberRefAsMemberData = mkCacheGeneric lowMem infile "MemberRefAsMemberData" (getNumRows ILTableNames.MemberRef / 20 + 1) + let cacheTypeRef = mkCacheInt32 lowMem infile "ILTypeRef" (getNumRows ILTableNames.TypeRef / 20 + 1) + let cacheTypeRefAsType = mkCacheGeneric lowMem infile "TypeRefAsType" (getNumRows ILTableNames.TypeRef / 20 + 1) + let cacheBlobHeapAsPropertySig = mkCacheGeneric lowMem infile "BlobHeapAsPropertySig" (getNumRows ILTableNames.Property / 20 + 1) + let cacheBlobHeapAsFieldSig = mkCacheGeneric lowMem infile "BlobHeapAsFieldSig" (getNumRows ILTableNames.Field / 20 + 1) + let cacheBlobHeapAsMethodSig = mkCacheGeneric lowMem infile "BlobHeapAsMethodSig" (getNumRows ILTableNames.Method / 20 + 1) + let cacheTypeDefAsType = mkCacheGeneric lowMem infile "TypeDefAsType" (getNumRows ILTableNames.TypeDef / 20 + 1) + let cacheMethodDefAsMethodData = mkCacheInt32 lowMem infile "MethodDefAsMethodData" (getNumRows ILTableNames.Method / 20 + 1) + // nb. Lots and lots of cache hits on this cache, hence never optimize cache away + let cacheStringHeap = mkCacheInt32 false infile "string heap" ( stringsStreamSize / 50 + 1) + let cacheBlobHeap = mkCacheInt32 lowMem infile "blob heap" ( blobsStreamSize / 50 + 1) + + //----------------------------------------------------------------------- + + let rowAddr (tab:ILTableName) idx = tablePhysLocations.[tab.Index] + (idx - 1) * tableRowSizes.[tab.Index] + + let seekReadUInt16Adv (addr: byref) = + let res = seekReadUInt16 is addr + addr <- addr + 2 + res + + let seekReadInt32Adv (addr: byref) = + let res = seekReadInt32 is addr + addr <- addr+4 + res + + let seekReadUInt16AsInt32Adv (addr: byref) = + let res = seekReadUInt16AsInt32 is addr + addr <- addr+2 + res + + let seekReadTaggedIdx f nbits big (addr: byref) = + let tok = if big then seekReadInt32Adv &addr else seekReadUInt16AsInt32Adv &addr + tokToTaggedIdx f nbits tok + + + let seekReadIdx big (addr: byref) = + if big then seekReadInt32Adv &addr else seekReadUInt16AsInt32Adv &addr + + let seekReadUntaggedIdx (tab:ILTableName) (addr: byref) = + seekReadIdx tableBigness.[tab.Index] &addr + + + let seekReadResolutionScopeIdx (addr: byref) = seekReadTaggedIdx (fun idx -> ResolutionScopeTag idx) 2 rsBigness &addr + let seekReadTypeDefOrRefOrSpecIdx (addr: byref) = seekReadTaggedIdx (fun idx -> TypeDefOrRefOrSpecTag idx) 2 tdorBigness &addr + let seekReadTypeOrMethodDefIdx (addr: byref) = seekReadTaggedIdx (fun idx -> TypeOrMethodDefTag idx) 1 tomdBigness &addr + let seekReadHasConstantIdx (addr: byref) = seekReadTaggedIdx (fun idx -> HasConstantTag idx) 2 hcBigness &addr + let seekReadHasCustomAttributeIdx (addr: byref) = seekReadTaggedIdx (fun idx -> HasCustomAttributeTag idx) 5 hcaBigness &addr + //let seekReadHasFieldMarshalIdx (addr: byref) = seekReadTaggedIdx (fun idx -> HasFieldMarshalTag idx) 1 hfmBigness &addr + //let seekReadHasDeclSecurityIdx (addr: byref) = seekReadTaggedIdx (fun idx -> HasDeclSecurityTag idx) 2 hdsBigness &addr + let seekReadMemberRefParentIdx (addr: byref) = seekReadTaggedIdx (fun idx -> MemberRefParentTag idx) 3 mrpBigness &addr + let seekReadHasSemanticsIdx (addr: byref) = seekReadTaggedIdx (fun idx -> HasSemanticsTag idx) 1 hsBigness &addr + let seekReadMethodDefOrRefIdx (addr: byref) = seekReadTaggedIdx (fun idx -> MethodDefOrRefTag idx) 1 mdorBigness &addr + let seekReadImplementationIdx (addr: byref) = seekReadTaggedIdx (fun idx -> ImplementationTag idx) 2 iBigness &addr + let seekReadCustomAttributeTypeIdx (addr: byref) = seekReadTaggedIdx (fun idx -> CustomAttributeTypeTag idx) 3 catBigness &addr + let seekReadStringIdx (addr: byref) = seekReadIdx stringsBigness &addr + let seekReadGuidIdx (addr: byref) = seekReadIdx guidsBigness &addr + let seekReadBlobIdx (addr: byref) = seekReadIdx blobsBigness &addr + + let seekReadModuleRow idx = + if idx = 0 then failwith "cannot read Module table row 0"; + let mutable addr = rowAddr ILTableNames.Module idx + let generation = seekReadUInt16Adv &addr + let nameIdx = seekReadStringIdx &addr + let mvidIdx = seekReadGuidIdx &addr + let encidIdx = seekReadGuidIdx &addr + let encbaseidIdx = seekReadGuidIdx &addr + (generation, nameIdx, mvidIdx, encidIdx, encbaseidIdx) + + /// Read Table ILTypeRef + let seekReadTypeRefRow idx = + let mutable addr = rowAddr ILTableNames.TypeRef idx + let scopeIdx = seekReadResolutionScopeIdx &addr + let nameIdx = seekReadStringIdx &addr + let namespaceIdx = seekReadStringIdx &addr + (scopeIdx,nameIdx,namespaceIdx) + + /// Read Table ILTypeDef + let seekReadTypeDefRow idx = + let mutable addr = rowAddr ILTableNames.TypeDef idx + let flags = seekReadInt32Adv &addr + let nameIdx = seekReadStringIdx &addr + let namespaceIdx = seekReadStringIdx &addr + let extendsIdx = seekReadTypeDefOrRefOrSpecIdx &addr + let fieldsIdx = seekReadUntaggedIdx ILTableNames.Field &addr + let methodsIdx = seekReadUntaggedIdx ILTableNames.Method &addr + (flags, nameIdx, namespaceIdx, extendsIdx, fieldsIdx, methodsIdx) + + /// Read Table Field + let seekReadFieldRow idx = + let mutable addr = rowAddr ILTableNames.Field idx + let flags = seekReadUInt16AsInt32Adv &addr + let nameIdx = seekReadStringIdx &addr + let typeIdx = seekReadBlobIdx &addr + (flags,nameIdx,typeIdx) + + /// Read Table Method + let seekReadMethodRow idx = + let mutable addr = rowAddr ILTableNames.Method idx + let codeRVA = seekReadInt32Adv &addr + let implflags = seekReadUInt16AsInt32Adv &addr + let flags = seekReadUInt16AsInt32Adv &addr + let nameIdx = seekReadStringIdx &addr + let typeIdx = seekReadBlobIdx &addr + let paramIdx = seekReadUntaggedIdx ILTableNames.Param &addr + (codeRVA, implflags, flags, nameIdx, typeIdx, paramIdx) + + /// Read Table Param + let seekReadParamRow idx = + let mutable addr = rowAddr ILTableNames.Param idx + let flags = seekReadUInt16AsInt32Adv &addr + let seq = seekReadUInt16AsInt32Adv &addr + let nameIdx = seekReadStringIdx &addr + (flags,seq,nameIdx) + + let seekReadInterfaceImplRow idx = + let mutable addr = rowAddr ILTableNames.InterfaceImpl idx + let tidx = seekReadUntaggedIdx ILTableNames.TypeDef &addr + let intfIdx = seekReadTypeDefOrRefOrSpecIdx &addr + (tidx,intfIdx) + + /// Read Table MemberRef + let seekReadMemberRefRow idx = + let mutable addr = rowAddr ILTableNames.MemberRef idx + let mrpIdx = seekReadMemberRefParentIdx &addr + let nameIdx = seekReadStringIdx &addr + let typeIdx = seekReadBlobIdx &addr + (mrpIdx,nameIdx,typeIdx) + + /// Read Table Constant + let seekReadConstantRow idx = + let mutable addr = rowAddr ILTableNames.Constant idx + let kind = seekReadUInt16Adv &addr + let parentIdx = seekReadHasConstantIdx &addr + let valIdx = seekReadBlobIdx &addr + (kind, parentIdx, valIdx) + + /// Read Table CustomAttribute + let seekReadCustomAttributeRow idx = + let mutable addr = rowAddr ILTableNames.CustomAttribute idx + let parentIdx = seekReadHasCustomAttributeIdx &addr + let typeIdx = seekReadCustomAttributeTypeIdx &addr + let valIdx = seekReadBlobIdx &addr + (parentIdx, typeIdx, valIdx) + + //let seekReadFieldMarshalRow idx = + // let mutable addr = rowAddr TableNames.FieldMarshal idx + // let parentIdx = seekReadHasFieldMarshalIdx &addr + // let typeIdx = seekReadBlobIdx &addr + // (parentIdx, typeIdx) + + /// Read Table ClassLayout. + let seekReadClassLayoutRow idx = + let mutable addr = rowAddr ILTableNames.ClassLayout idx + let pack = seekReadUInt16Adv &addr + let size = seekReadInt32Adv &addr + let tidx = seekReadUntaggedIdx ILTableNames.TypeDef &addr + (pack, size, tidx) + + /// Read Table FieldLayout. + let seekReadFieldLayoutRow idx = + let mutable addr = rowAddr ILTableNames.FieldLayout idx + let offset = seekReadInt32Adv &addr + let fidx = seekReadUntaggedIdx ILTableNames.Field &addr + (offset, fidx) + + /// Read Table EventMap + let seekReadEventMapRow idx = + let mutable addr = rowAddr ILTableNames.EventMap idx + let tidx = seekReadUntaggedIdx ILTableNames.TypeDef &addr + let eventsIdx = seekReadUntaggedIdx ILTableNames.Event &addr + (tidx,eventsIdx) + + /// Read Table Event + let seekReadEventRow idx = + let mutable addr = rowAddr ILTableNames.Event idx + let flags = seekReadUInt16AsInt32Adv &addr + let nameIdx = seekReadStringIdx &addr + let typIdx = seekReadTypeDefOrRefOrSpecIdx &addr + (flags,nameIdx,typIdx) + + /// Read Table PropertyMap + let seekReadPropertyMapRow idx = + let mutable addr = rowAddr ILTableNames.PropertyMap idx + let tidx = seekReadUntaggedIdx ILTableNames.TypeDef &addr + let propsIdx = seekReadUntaggedIdx ILTableNames.Property &addr + (tidx,propsIdx) + + /// Read Table Property + let seekReadPropertyRow idx = + let mutable addr = rowAddr ILTableNames.Property idx + let flags = seekReadUInt16AsInt32Adv &addr + let nameIdx = seekReadStringIdx &addr + let typIdx = seekReadBlobIdx &addr + (flags,nameIdx,typIdx) + + /// Read Table MethodSemantics + let seekReadMethodSemanticsRow idx = + let mutable addr = rowAddr ILTableNames.MethodSemantics idx + let flags = seekReadUInt16AsInt32Adv &addr + let midx = seekReadUntaggedIdx ILTableNames.Method &addr + let assocIdx = seekReadHasSemanticsIdx &addr + (flags,midx,assocIdx) + + let seekReadMethodImplRow idx = + let mutable addr = rowAddr ILTableNames.MethodImpl idx + let tidx = seekReadUntaggedIdx ILTableNames.TypeDef &addr + let mbodyIdx = seekReadMethodDefOrRefIdx &addr + let mdeclIdx = seekReadMethodDefOrRefIdx &addr + (tidx, mbodyIdx, mdeclIdx) + + /// Read Table ILModuleRef + let seekReadModuleRefRow idx = + let mutable addr = rowAddr ILTableNames.ModuleRef idx + let nameIdx = seekReadStringIdx &addr + nameIdx + + /// Read Table ILTypeSpec + let seekReadTypeSpecRow idx = + let mutable addr = rowAddr ILTableNames.TypeSpec idx + let blobIdx = seekReadBlobIdx &addr + blobIdx + + /// Read Table Assembly + let seekReadAssemblyRow idx = + let mutable addr = rowAddr ILTableNames.Assembly idx + let hash = seekReadInt32Adv &addr + let v1 = seekReadUInt16Adv &addr + let v2 = seekReadUInt16Adv &addr + let v3 = seekReadUInt16Adv &addr + let v4 = seekReadUInt16Adv &addr + let flags = seekReadInt32Adv &addr + let publicKeyIdx = seekReadBlobIdx &addr + let nameIdx = seekReadStringIdx &addr + let localeIdx = seekReadStringIdx &addr + (hash,v1,v2,v3,v4,flags,publicKeyIdx, nameIdx, localeIdx) + + /// Read Table ILAssemblyRef + let seekReadAssemblyRefRow idx = + let mutable addr = rowAddr ILTableNames.AssemblyRef idx + let v1 = seekReadUInt16Adv &addr + let v2 = seekReadUInt16Adv &addr + let v3 = seekReadUInt16Adv &addr + let v4 = seekReadUInt16Adv &addr + let flags = seekReadInt32Adv &addr + let publicKeyOrTokenIdx = seekReadBlobIdx &addr + let nameIdx = seekReadStringIdx &addr + let localeIdx = seekReadStringIdx &addr + let hashValueIdx = seekReadBlobIdx &addr + (v1,v2,v3,v4,flags,publicKeyOrTokenIdx, nameIdx, localeIdx,hashValueIdx) + + /// Read Table File + let seekReadFileRow idx = + let mutable addr = rowAddr ILTableNames.File idx + let flags = seekReadInt32Adv &addr + let nameIdx = seekReadStringIdx &addr + let hashValueIdx = seekReadBlobIdx &addr + (flags, nameIdx, hashValueIdx) + + /// Read Table ILExportedTypeOrForwarder + let seekReadExportedTypeRow idx = + let mutable addr = rowAddr ILTableNames.ExportedType idx + let flags = seekReadInt32Adv &addr + let tok = seekReadInt32Adv &addr + let nameIdx = seekReadStringIdx &addr + let namespaceIdx = seekReadStringIdx &addr + let implIdx = seekReadImplementationIdx &addr + (flags,tok,nameIdx,namespaceIdx,implIdx) + + /// Read Table ManifestResource + let seekReadManifestResourceRow idx = + let mutable addr = rowAddr ILTableNames.ManifestResource idx + let offset = seekReadInt32Adv &addr + let flags = seekReadInt32Adv &addr + let nameIdx = seekReadStringIdx &addr + let implIdx = seekReadImplementationIdx &addr + (offset,flags,nameIdx,implIdx) + + /// Read Table Nested + let seekReadNestedRow idx = + let mutable addr = rowAddr ILTableNames.Nested idx + let nestedIdx = seekReadUntaggedIdx ILTableNames.TypeDef &addr + let enclIdx = seekReadUntaggedIdx ILTableNames.TypeDef &addr + (nestedIdx,enclIdx) + + /// Read Table GenericParam + let seekReadGenericParamRow idx = + let mutable addr = rowAddr ILTableNames.GenericParam idx + let seq = seekReadUInt16Adv &addr + let flags = seekReadUInt16Adv &addr + let ownerIdx = seekReadTypeOrMethodDefIdx &addr + let nameIdx = seekReadStringIdx &addr + (idx,seq,flags,ownerIdx,nameIdx) + + // Read Table GenericParamConstraint + let seekReadGenericParamConstraintRow idx = + let mutable addr = rowAddr ILTableNames.GenericParamConstraint idx + let pidx = seekReadUntaggedIdx ILTableNames.GenericParam &addr + let constraintIdx = seekReadTypeDefOrRefOrSpecIdx &addr + (pidx,constraintIdx) + + //let readUserStringHeapUncached idx = seekReadUserString is (userStringsStreamPhysicalLoc + idx) + //let readUserStringHeap = cacheUserStringHeap readUserStringHeapUncached + + let readStringHeapUncached idx = seekReadUTF8String is (stringsStreamPhysicalLoc + idx) + let readStringHeap = cacheStringHeap readStringHeapUncached + let readStringHeapOption idx = if idx = 0 then UNone else USome (readStringHeap idx) + + let emptyByteArray: byte[] = [||] + let readBlobHeapUncached idx = + // valid index lies in range [1..streamSize) + // NOTE: idx cannot be 0 - Blob\String heap has first empty element that is one byte 0 + if idx <= 0 || idx >= blobsStreamSize then emptyByteArray + else seekReadBlob is (blobsStreamPhysicalLoc + idx) + let readBlobHeap = cacheBlobHeap readBlobHeapUncached + let readBlobHeapOption idx = if idx = 0 then UNone else USome (readBlobHeap idx) + + //let readGuidHeap idx = seekReadGuid is (guidsStreamPhysicalLoc + idx) + + // read a single value out of a blob heap using the given function + let readBlobHeapAsBool vidx = fst (sigptrGetBool (readBlobHeap vidx) 0) + let readBlobHeapAsSByte vidx = fst (sigptrGetSByte (readBlobHeap vidx) 0) + let readBlobHeapAsInt16 vidx = fst (sigptrGetInt16 (readBlobHeap vidx) 0) + let readBlobHeapAsInt32 vidx = fst (sigptrGetInt32 (readBlobHeap vidx) 0) + let readBlobHeapAsInt64 vidx = fst (sigptrGetInt64 (readBlobHeap vidx) 0) + let readBlobHeapAsByte vidx = fst (sigptrGetByte (readBlobHeap vidx) 0) + let readBlobHeapAsUInt16 vidx = fst (sigptrGetUInt16 (readBlobHeap vidx) 0) + let readBlobHeapAsUInt32 vidx = fst (sigptrGetUInt32 (readBlobHeap vidx) 0) + let readBlobHeapAsUInt64 vidx = fst (sigptrGetUInt64 (readBlobHeap vidx) 0) + let readBlobHeapAsSingle vidx = fst (sigptrGetSingle (readBlobHeap vidx) 0) + let readBlobHeapAsDouble vidx = fst (sigptrGetDouble (readBlobHeap vidx) 0) + + //----------------------------------------------------------------------- + // Read the AbsIL structure (lazily) by reading off the relevant rows. + // ---------------------------------------------------------------------- + + let isSorted (tab:ILTableName) = ((sorted &&& (int64 1 <<< tab.Index)) <> int64 0x0) + + //let subsysversion = (subsysMajor, subsysMinor) + let ilMetadataVersion = Encoding.UTF8.GetString (ilMetadataVersion, 0, ilMetadataVersion.Length) + + let rec seekReadModule (subsys, subsysversion, useHighEntropyVA, ilOnly, only32, is32bitpreferred, only64, platform, isDll, alignVirt, alignPhys, imageBaseReal, ilMetadataVersion) idx = + let (_generation, nameIdx, _mvidIdx, _encidIdx, _encbaseidIdx) = seekReadModuleRow idx + let ilModuleName = readStringHeap nameIdx + //let nativeResources = readNativeResources tgt + + { Manifest = + if getNumRows (ILTableNames.Assembly) > 0 then Some (seekReadAssemblyManifest 1) + else None; + CustomAttrs = seekReadCustomAttrs (TaggedIndex(HasCustomAttributeTag.Module,idx)); + Name = ilModuleName; + //NativeResources=nativeResources; + TypeDefs = ILTypeDefs (lazy (seekReadTopTypeDefs ())); + SubSystemFlags = int32 subsys; + IsILOnly = ilOnly; + SubsystemVersion = subsysversion + UseHighEntropyVA = useHighEntropyVA + Platform = platform; + StackReserveSize = None; + Is32Bit = only32; + Is32BitPreferred = is32bitpreferred; + Is64Bit = only64; + IsDLL=isDll; + VirtualAlignment = alignVirt; + PhysicalAlignment = alignPhys; + ImageBase = imageBaseReal; + MetadataVersion = ilMetadataVersion; + Resources = seekReadManifestResources (); + } + + and seekReadAssemblyManifest idx = + let (hash,v1,v2,v3,v4,flags,publicKeyIdx, nameIdx, localeIdx) = seekReadAssemblyRow idx + let name = readStringHeap nameIdx + let pubkey = readBlobHeapOption publicKeyIdx + { Name= name; + AuxModuleHashAlgorithm=hash + //SecurityDecls= seekReadSecurityDecls (TaggedIndex(hds_Assembly,idx)); + PublicKey= pubkey; + Version= USome (Version(int v1,int v2,int v3,int v4)); + Locale= readStringHeapOption localeIdx; + CustomAttrs = seekReadCustomAttrs (TaggedIndex(HasCustomAttributeTag.Assembly,idx)); + ExportedTypes= seekReadTopExportedTypes (); + EntrypointElsewhere=(if fst entryPointToken = ILTableNames.File then Some (seekReadFile (snd entryPointToken)) else None); + Retargetable = 0 <> (flags &&& 0x100); + DisableJitOptimizations = 0 <> (flags &&& 0x4000); + JitTracking = 0 <> (flags &&& 0x8000) + IgnoreSymbolStoreSequencePoints = 0 <> (flags &&& 0x2000) + } + + and seekReadAssemblyRef idx = cacheAssemblyRef seekReadAssemblyRefUncached idx + and seekReadAssemblyRefUncached idx = + let (v1,v2,v3,v4,flags,publicKeyOrTokenIdx, nameIdx, localeIdx,hashValueIdx) = seekReadAssemblyRefRow idx + let nm = readStringHeap nameIdx + let publicKey = + match readBlobHeapOption publicKeyOrTokenIdx with + | UNone -> UNone + | USome blob -> USome (if (flags &&& 0x0001) <> 0x0 then PublicKey blob else PublicKeyToken blob) + + ILAssemblyRef + (name=nm, + hash=readBlobHeapOption hashValueIdx, + publicKey=publicKey, + retargetable=((flags &&& 0x0100) <> 0x0), + version=USome(Version(int v1,int v2,int v3,int v4)), + locale=readStringHeapOption localeIdx;) + + and seekReadModuleRef idx = + let nameIdx = seekReadModuleRefRow idx + ILModuleRef(name=readStringHeap nameIdx, hasMetadata=true, hash=UNone) + + and seekReadFile idx = + let (flags, nameIdx, hashValueIdx) = seekReadFileRow idx + ILModuleRef(name = readStringHeap nameIdx, + hasMetadata= ((flags &&& 0x0001) = 0x0), + hash= readBlobHeapOption hashValueIdx) + + and seekReadClassLayout idx = + match seekReadOptionalIndexedRow (getNumRows ILTableNames.ClassLayout,seekReadClassLayoutRow,(fun (_,_,tidx) -> tidx),simpleIndexCompare idx,isSorted ILTableNames.ClassLayout,(fun (pack,size,_) -> pack,size)) with + | None -> { Size = None; Pack = None } + | Some (pack,size) -> { Size = Some size; Pack = Some pack; } + + + and typeLayoutOfFlags flags tidx = + let f = (flags &&& 0x00000018) + if f = 0x00000008 then ILTypeDefLayout.Sequential (seekReadClassLayout tidx) + elif f = 0x00000010 then ILTypeDefLayout.Explicit (seekReadClassLayout tidx) + else ILTypeDefLayout.Auto + + and isTopTypeDef flags = + (ILTypeDefAccess.OfFlags flags = ILTypeDefAccess.Private) || + ILTypeDefAccess.OfFlags flags = ILTypeDefAccess.Public + + and seekIsTopTypeDefOfIdx idx = + let (flags,_,_, _, _,_) = seekReadTypeDefRow idx + isTopTypeDef flags + + and readStringHeapAsTypeName (nameIdx,namespaceIdx) = + let name = readStringHeap nameIdx + let nspace = readStringHeapOption namespaceIdx + nspace, name + + and seekReadTypeDefRowExtents _info (idx:int) = + if idx >= getNumRows ILTableNames.TypeDef then + getNumRows ILTableNames.Field + 1, + getNumRows ILTableNames.Method + 1 + else + let (_, _, _, _, fieldsIdx, methodsIdx) = seekReadTypeDefRow (idx + 1) + fieldsIdx, methodsIdx + + and seekReadTypeDefRowWithExtents (idx:int) = + let info= seekReadTypeDefRow idx + info,seekReadTypeDefRowExtents info idx + + and seekReadTypeDef toponly (idx:int) = + let (flags, nameIdx, namespaceIdx, _, _, _) = seekReadTypeDefRow idx + if toponly && not (isTopTypeDef flags) then None + else + + let name = readStringHeap nameIdx + let nspace = readStringHeapOption namespaceIdx + let rest = + lazy + let ((flags,nameIdx,namespaceIdx, extendsIdx, fieldsIdx, methodsIdx) as info) = seekReadTypeDefRow idx + let name = readStringHeap nameIdx + let nspace = readStringHeapOption namespaceIdx + let (endFieldsIdx, endMethodsIdx) = seekReadTypeDefRowExtents info idx + let typars = seekReadGenericParams 0 (TypeOrMethodDefTag.TypeDef,idx) + let numtypars = typars.Length + let super = seekReadOptionalTypeDefOrRef numtypars AsObject extendsIdx + let layout = typeLayoutOfFlags flags idx + //let hasLayout = (match layout with ILTypeDefLayout.Explicit _ -> true | _ -> false) + let hasLayout = false + let mdefs = seekReadMethods numtypars methodsIdx endMethodsIdx + let fdefs = seekReadFields (numtypars,hasLayout) fieldsIdx endFieldsIdx + let nested = seekReadNestedTypeDefs idx + let intfs = seekReadInterfaceImpls numtypars idx + //let sdecls = seekReadSecurityDecls (TaggedIndex(hds_TypeDef,idx)) + let mimpls = seekReadMethodImpls numtypars idx + let props = seekReadProperties numtypars idx + let events = seekReadEvents numtypars idx + let cas = seekReadCustomAttrs (TaggedIndex(HasCustomAttributeTag.TypeDef,idx)) + { Namespace=nspace + Name=name + GenericParams=typars + Attributes = enum flags + Layout = layout + NestedTypes= nested + Implements = intfs + Extends = super + Methods = mdefs + + //SecurityDecls = sdecls + //HasSecurity=(flags &&& 0x00040000) <> 0x0 + Fields=fdefs + MethodImpls=mimpls + Events= events + Properties=props + CustomAttrs=cas + Token = idx } + Some (nspace, name, rest) + + and seekReadTopTypeDefs () = + [| for i = 1 to getNumRows ILTableNames.TypeDef do + match seekReadTypeDef true i with + | None -> () + | Some td -> yield td |] + + and seekReadNestedTypeDefs tidx = + ILTypeDefs + (lazy + let nestedIdxs = seekReadIndexedRows (getNumRows ILTableNames.Nested,seekReadNestedRow,snd,simpleIndexCompare tidx,false,fst) + [| for i in nestedIdxs do + match seekReadTypeDef false i with + | None -> () + | Some td -> yield td |]) + + and seekReadInterfaceImpls numtypars tidx = + seekReadIndexedRows (getNumRows ILTableNames.InterfaceImpl,seekReadInterfaceImplRow ,fst,simpleIndexCompare tidx,isSorted ILTableNames.InterfaceImpl,(snd >> seekReadTypeDefOrRef numtypars AsObject [| |])) + + and seekReadGenericParams numtypars (a,b): ILGenericParameterDefs = + let pars = + seekReadIndexedRows + (getNumRows ILTableNames.GenericParam,seekReadGenericParamRow, + (fun (_,_,_,tomd,_) -> tomd), + tomdCompare (TaggedIndex(a,b)), + isSorted ILTableNames.GenericParam, + (fun (gpidx,seq,flags,_,nameIdx) -> + let constraints = seekReadGenericParamConstraintsUncached numtypars gpidx + let cas = seekReadCustomAttrs (TaggedIndex(HasCustomAttributeTag.GenericParam,gpidx)) + seq, {Name=readStringHeap nameIdx + Constraints= constraints + CustomAttrs=cas + Attributes = enum (int32 flags) + Token=gpidx })) + pars |> Array.sortBy fst |> Array.map snd + + and seekReadGenericParamConstraintsUncached numtypars gpidx = + seekReadIndexedRows + (getNumRows ILTableNames.GenericParamConstraint, + seekReadGenericParamConstraintRow, + fst, + simpleIndexCompare gpidx, + isSorted ILTableNames.GenericParamConstraint, + (snd >> seekReadTypeDefOrRef numtypars AsObject (*ok*) [| |])) + + and seekReadTypeDefAsType boxity (ginst:ILTypes) idx = cacheTypeDefAsType seekReadTypeDefAsTypeUncached (TypeDefAsTypIdx (boxity,ginst,idx)) + + and seekReadTypeDefAsTypeUncached (TypeDefAsTypIdx (boxity,ginst,idx)) = + mkILTy boxity (ILTypeSpec(seekReadTypeDefAsTypeRef idx, ginst)) + + and seekReadTypeDefAsTypeRef idx = + let enc = + if seekIsTopTypeDefOfIdx idx then ILTypeRefScope.Top ILScopeRef.Local + else + let enclIdx = seekReadIndexedRow (getNumRows ILTableNames.Nested,seekReadNestedRow,fst,simpleIndexCompare idx,isSorted ILTableNames.Nested,snd) + let tref = seekReadTypeDefAsTypeRef enclIdx + ILTypeRefScope.Nested tref + let (_, nameIdx, namespaceIdx, _, _, _) = seekReadTypeDefRow idx + let nsp, nm = readStringHeapAsTypeName (nameIdx,namespaceIdx) + ILTypeRef(enc=enc, nsp = nsp, name = nm ) + + and seekReadTypeRef idx = cacheTypeRef seekReadTypeRefUncached idx + and seekReadTypeRefUncached idx = + let scopeIdx,nameIdx,namespaceIdx = seekReadTypeRefRow idx + let enc = seekReadTypeRefScope scopeIdx + let nsp, nm = readStringHeapAsTypeName (nameIdx,namespaceIdx) + ILTypeRef(enc, nsp, nm) + + and seekReadTypeRefAsType boxity ginst idx = cacheTypeRefAsType seekReadTypeRefAsTypeUncached (TypeRefAsTypIdx (boxity,ginst,idx)) + and seekReadTypeRefAsTypeUncached (TypeRefAsTypIdx (boxity,ginst,idx)) = + mkILTy boxity (ILTypeSpec(seekReadTypeRef idx, ginst)) + + and seekReadTypeDefOrRef numtypars boxity (ginst:ILTypes) (TaggedIndex(tag,idx) ) = + match tag with + | tag when tag = TypeDefOrRefOrSpecTag.TypeDef -> seekReadTypeDefAsType boxity ginst idx + | tag when tag = TypeDefOrRefOrSpecTag.TypeRef -> seekReadTypeRefAsType boxity ginst idx + | tag when tag = TypeDefOrRefOrSpecTag.TypeSpec -> readBlobHeapAsType numtypars (seekReadTypeSpecRow idx) + | _ -> failwith "seekReadTypeDefOrRef" + + and seekReadTypeDefOrRefAsTypeRef (TaggedIndex(tag,idx) ) = + match tag with + | tag when tag = TypeDefOrRefOrSpecTag.TypeDef -> seekReadTypeDefAsTypeRef idx + | tag when tag = TypeDefOrRefOrSpecTag.TypeRef -> seekReadTypeRef idx + | tag when tag = TypeDefOrRefOrSpecTag.TypeSpec -> ilg.typ_Object.TypeRef + | _ -> failwith "seekReadTypeDefOrRefAsTypeRef_readTypeDefOrRefOrSpec" + + and seekReadMethodRefParent numtypars (TaggedIndex(tag,idx)) = + match tag with + | tag when tag = MemberRefParentTag.TypeRef -> seekReadTypeRefAsType AsObject (* not ok - no way to tell if a member ref parent is a value type or not *) [| |] idx + | tag when tag = MemberRefParentTag.ModuleRef -> mkILTypeForGlobalFunctions (ILScopeRef.Module (seekReadModuleRef idx)) + | tag when tag = MemberRefParentTag.MethodDef -> + let (MethodData(enclTyp, cc, nm, argtys, retty, minst)) = seekReadMethodDefAsMethodData idx + let mspec = mkILMethSpecInTyRaw(enclTyp, cc, nm, argtys, retty, minst) + mspec.EnclosingType + | tag when tag = MemberRefParentTag.TypeSpec -> readBlobHeapAsType numtypars (seekReadTypeSpecRow idx) + | _ -> failwith "seekReadMethodRefParent" + + + and seekReadMethodDefOrRef numtypars (TaggedIndex(tag, idx)) = + match tag with + | tag when tag = MethodDefOrRefTag.MethodDef -> + let (MethodData(enclTyp, cc, nm, argtys, retty, minst)) = seekReadMethodDefAsMethodData idx + VarArgMethodData(enclTyp, cc, nm, argtys, None, retty, minst) + | tag when tag = MethodDefOrRefTag.MemberRef -> + seekReadMemberRefAsMethodData numtypars idx + | _ -> failwith "seekReadMethodDefOrRef ctxt" + + and seekReadMethodDefOrRefNoVarargs numtypars x = + let (VarArgMethodData(enclTyp, cc, nm, argtys, varargs, retty, minst)) = seekReadMethodDefOrRef numtypars x + MethodData(enclTyp, cc, nm, argtys, retty, minst) + + and seekReadCustomAttrType (TaggedIndex(tag,idx) ) = + match tag with + | tag when tag = CustomAttributeTypeTag.MethodDef -> + let (MethodData(enclTyp, cc, nm, argtys, retty, minst)) = seekReadMethodDefAsMethodData idx + mkILMethSpecInTyRaw (enclTyp, cc, nm, argtys, retty, minst) + | tag when tag = CustomAttributeTypeTag.MemberRef -> + let (MethodData(enclTyp, cc, nm, argtys, retty, minst)) = seekReadMemberRefAsMethDataNoVarArgs 0 idx + mkILMethSpecInTyRaw (enclTyp, cc, nm, argtys, retty, minst) + | _ -> failwith "seekReadCustomAttrType" + + and seekReadImplAsScopeRef (TaggedIndex(tag,idx) ) = + if idx = 0 then ILScopeRef.Local + else + match tag with + | tag when tag = ImplementationTag.File -> ILScopeRef.Module (seekReadFile idx) + | tag when tag = ImplementationTag.AssemblyRef -> ILScopeRef.Assembly (seekReadAssemblyRef idx) + | tag when tag = ImplementationTag.ExportedType -> failwith "seekReadImplAsScopeRef" + | _ -> failwith "seekReadImplAsScopeRef" + + and seekReadTypeRefScope (TaggedIndex(tag,idx) ): ILTypeRefScope = + match tag with + | tag when tag = ResolutionScopeTag.Module -> ILTypeRefScope.Top(ILScopeRef.Local) + | tag when tag = ResolutionScopeTag.ModuleRef -> ILTypeRefScope.Top(ILScopeRef.Module (seekReadModuleRef idx)) + | tag when tag = ResolutionScopeTag.AssemblyRef -> ILTypeRefScope.Top(ILScopeRef.Assembly (seekReadAssemblyRef idx)) + | tag when tag = ResolutionScopeTag.TypeRef -> ILTypeRefScope.Nested (seekReadTypeRef idx) + | _ -> failwith "seekReadTypeRefScope" + + and seekReadOptionalTypeDefOrRef numtypars boxity idx = + if idx = TaggedIndex(TypeDefOrRefOrSpecTag.TypeDef, 0) then None + else Some (seekReadTypeDefOrRef numtypars boxity [| |] idx) + + and seekReadField (numtypars, hasLayout) (idx:int) = + let (flags,nameIdx,typeIdx) = seekReadFieldRow idx + let nm = readStringHeap nameIdx + let isStatic = (flags &&& 0x0010) <> 0 + { Name = nm + FieldType = readBlobHeapAsFieldSig numtypars typeIdx + LiteralValue = if (flags &&& 0x8000) = 0 then None else Some (seekReadConstant (TaggedIndex(HasConstantTag.FieldDef,idx))) + //Marshal = + // if (flags &&& 0x1000) = 0 then None else + // Some (seekReadIndexedRow (getNumRows ILTableNames.FieldMarshal,seekReadFieldMarshalRow, + // fst,hfmCompare (TaggedIndex(hfm_FieldDef,idx)), + // isSorted ILTableNames.FieldMarshal, + // (snd >> readBlobHeapAsNativeType ctxt))) + //Data = + // if (flags &&& 0x0100) = 0 then None + // else + // let rva = seekReadIndexedRow (getNumRows ILTableNames.FieldRVA,seekReadFieldRVARow, + // snd,simpleIndexCompare idx,isSorted ILTableNames.FieldRVA,fst) + // Some (rvaToData "field" rva) + Attributes = enum(flags) + Offset = + if hasLayout && not isStatic then + Some (seekReadIndexedRow (getNumRows ILTableNames.FieldLayout,seekReadFieldLayoutRow, + snd,simpleIndexCompare idx,isSorted ILTableNames.FieldLayout,fst)) else None + CustomAttrs=seekReadCustomAttrs (TaggedIndex(HasCustomAttributeTag.FieldDef,idx)) + Token = idx } + + and seekReadFields (numtypars, hasLayout) fidx1 fidx2 = + { new ILFieldDefs with + member __.Entries = + [| for i = fidx1 to fidx2 - 1 do + yield seekReadField (numtypars, hasLayout) i |] } + + and seekReadMethods numtypars midx1 midx2 = + ILMethodDefs + (lazy + [| for i = midx1 to midx2 - 1 do + yield seekReadMethod numtypars i |]) + + and sigptrGetTypeDefOrRefOrSpecIdx bytes sigptr = + let n, sigptr = sigptrGetZInt32 bytes sigptr + if (n &&& 0x01) = 0x0 then (* Type Def *) + TaggedIndex(TypeDefOrRefOrSpecTag.TypeDef, (n >>>& 2)), sigptr + else (* Type Ref *) + TaggedIndex(TypeDefOrRefOrSpecTag.TypeRef, (n >>>& 2)), sigptr + + and sigptrGetTy numtypars bytes sigptr = + let b0,sigptr = sigptrGetByte bytes sigptr + if b0 = et_OBJECT then ilg.typ_Object , sigptr + elif b0 = et_STRING then ilg.typ_String, sigptr + elif b0 = et_I1 then ilg.typ_SByte, sigptr + elif b0 = et_I2 then ilg.typ_Int16, sigptr + elif b0 = et_I4 then ilg.typ_Int32, sigptr + elif b0 = et_I8 then ilg.typ_Int64, sigptr + elif b0 = et_I then ilg.typ_IntPtr, sigptr + elif b0 = et_U1 then ilg.typ_Byte, sigptr + elif b0 = et_U2 then ilg.typ_UInt16, sigptr + elif b0 = et_U4 then ilg.typ_UInt32, sigptr + elif b0 = et_U8 then ilg.typ_UInt64, sigptr + elif b0 = et_U then ilg.typ_UIntPtr, sigptr + elif b0 = et_R4 then ilg.typ_Single, sigptr + elif b0 = et_R8 then ilg.typ_Double, sigptr + elif b0 = et_CHAR then ilg.typ_Char, sigptr + elif b0 = et_BOOLEAN then ilg.typ_Boolean, sigptr + elif b0 = et_WITH then + let b0,sigptr = sigptrGetByte bytes sigptr + let tdorIdx, sigptr = sigptrGetTypeDefOrRefOrSpecIdx bytes sigptr + let n, sigptr = sigptrGetZInt32 bytes sigptr + let argtys,sigptr = sigptrFold (sigptrGetTy numtypars) n bytes sigptr + seekReadTypeDefOrRef numtypars (if b0 = et_CLASS then AsObject else AsValue) argtys tdorIdx, + sigptr + + elif b0 = et_CLASS then + let tdorIdx, sigptr = sigptrGetTypeDefOrRefOrSpecIdx bytes sigptr + seekReadTypeDefOrRef numtypars AsObject [| |] tdorIdx, sigptr + elif b0 = et_VALUETYPE then + let tdorIdx, sigptr = sigptrGetTypeDefOrRefOrSpecIdx bytes sigptr + seekReadTypeDefOrRef numtypars AsValue [| |] tdorIdx, sigptr + elif b0 = et_VAR then + let n, sigptr = sigptrGetZInt32 bytes sigptr + ILType.Var n,sigptr + elif b0 = et_MVAR then + let n, sigptr = sigptrGetZInt32 bytes sigptr + ILType.Var (n + numtypars), sigptr + elif b0 = et_BYREF then + let typ, sigptr = sigptrGetTy numtypars bytes sigptr + ILType.Byref typ, sigptr + elif b0 = et_PTR then + let typ, sigptr = sigptrGetTy numtypars bytes sigptr + ILType.Ptr typ, sigptr + elif b0 = et_SZARRAY then + let typ, sigptr = sigptrGetTy numtypars bytes sigptr + mkILArr1DTy typ, sigptr + elif b0 = et_ARRAY then + let typ, sigptr = sigptrGetTy numtypars bytes sigptr + let rank, sigptr = sigptrGetZInt32 bytes sigptr + let numSized, sigptr = sigptrGetZInt32 bytes sigptr + let sizes, sigptr = sigptrFold sigptrGetZInt32 numSized bytes sigptr + let numLoBounded, sigptr = sigptrGetZInt32 bytes sigptr + let lobounds, sigptr = sigptrFold sigptrGetZInt32 numLoBounded bytes sigptr + let shape = + let dim i = + (if i < numLoBounded then Some lobounds.[i] else None), + (if i < numSized then Some sizes.[i] else None) + ILArrayShape (Array.init rank dim) + ILType.Array (shape, typ), sigptr + + elif b0 = et_VOID then ILType.Void, sigptr + elif b0 = et_TYPEDBYREF then + match ilg.typ_TypedReference with + | Some t -> t, sigptr + | _ -> failwith "system runtime doesn't contain System.TypedReference" + elif b0 = et_CMOD_REQD || b0 = et_CMOD_OPT then + let tdorIdx, sigptr = sigptrGetTypeDefOrRefOrSpecIdx bytes sigptr + let typ, sigptr = sigptrGetTy numtypars bytes sigptr + ILType.Modified((b0 = et_CMOD_REQD), seekReadTypeDefOrRefAsTypeRef tdorIdx, typ), sigptr + elif b0 = et_FNPTR then + let ccByte,sigptr = sigptrGetByte bytes sigptr + let generic,cc = byteAsCallConv ccByte + if generic then failwith "fptr sig may not be generic" + let numparams,sigptr = sigptrGetZInt32 bytes sigptr + let retty,sigptr = sigptrGetTy numtypars bytes sigptr + let argtys,sigptr = sigptrFold (sigptrGetTy numtypars) ( numparams) bytes sigptr + ILType.FunctionPointer (ILCallingSignature(cc, argtys, retty)),sigptr + elif b0 = et_SENTINEL then failwith "varargs NYI" + else ILType.Void , sigptr + + and sigptrGetVarArgTys n numtypars bytes sigptr = + sigptrFold (sigptrGetTy numtypars) n bytes sigptr + + and sigptrGetArgTys n numtypars bytes sigptr acc = + if n <= 0 then (Array.ofList (List.rev acc),None),sigptr + else + let b0,sigptr2 = sigptrGetByte bytes sigptr + if b0 = et_SENTINEL then + let varargs,sigptr = sigptrGetVarArgTys n numtypars bytes sigptr2 + (Array.ofList (List.rev acc),Some( varargs)),sigptr + else + let x,sigptr = sigptrGetTy numtypars bytes sigptr + sigptrGetArgTys (n-1) numtypars bytes sigptr (x::acc) + + and readBlobHeapAsMethodSig numtypars blobIdx = cacheBlobHeapAsMethodSig readBlobHeapAsMethodSigUncached (BlobAsMethodSigIdx (numtypars,blobIdx)) + + and readBlobHeapAsMethodSigUncached (BlobAsMethodSigIdx (numtypars,blobIdx)) = + let bytes = readBlobHeap blobIdx + let sigptr = 0 + let ccByte,sigptr = sigptrGetByte bytes sigptr + let generic,cc = byteAsCallConv ccByte + let genarity,sigptr = if generic then sigptrGetZInt32 bytes sigptr else 0x0,sigptr + let numparams,sigptr = sigptrGetZInt32 bytes sigptr + let retty,sigptr = sigptrGetTy numtypars bytes sigptr + let (argtys,varargs),_sigptr = sigptrGetArgTys ( numparams) numtypars bytes sigptr [] + generic,genarity,cc,retty,argtys,varargs + + and readBlobHeapAsType numtypars blobIdx = + let bytes = readBlobHeap blobIdx + let ty,_sigptr = sigptrGetTy numtypars bytes 0 + ty + + and readBlobHeapAsFieldSig numtypars blobIdx = cacheBlobHeapAsFieldSig readBlobHeapAsFieldSigUncached (BlobAsFieldSigIdx (numtypars,blobIdx)) + + and readBlobHeapAsFieldSigUncached (BlobAsFieldSigIdx (numtypars,blobIdx)) = + let bytes = readBlobHeap blobIdx + let sigptr = 0 + let _ccByte,sigptr = sigptrGetByte bytes sigptr + let retty,_sigptr = sigptrGetTy numtypars bytes sigptr + retty + + + and readBlobHeapAsPropertySig numtypars blobIdx = cacheBlobHeapAsPropertySig readBlobHeapAsPropertySigUncached (BlobAsPropSigIdx (numtypars,blobIdx)) + and readBlobHeapAsPropertySigUncached (BlobAsPropSigIdx (numtypars,blobIdx)) = + let bytes = readBlobHeap blobIdx + let sigptr = 0 + let ccByte,sigptr = sigptrGetByte bytes sigptr + let hasthis = byteAsHasThis ccByte + let numparams,sigptr = sigptrGetZInt32 bytes sigptr + let retty,sigptr = sigptrGetTy numtypars bytes sigptr + let argtys,_sigptr = sigptrFold (sigptrGetTy numtypars) ( numparams) bytes sigptr + hasthis,retty, argtys + + and byteAsHasThis b = + let hasthis_masked = b &&& 0x60uy + if hasthis_masked = e_IMAGE_CEE_CS_CALLCONV_INSTANCE then ILThisConvention.Instance + elif hasthis_masked = e_IMAGE_CEE_CS_CALLCONV_INSTANCE_EXPLICIT then ILThisConvention.InstanceExplicit + else ILThisConvention.Static + + and byteAsCallConv b = + let cc = + let ccMaxked = b &&& 0x0Fuy + if ccMaxked = e_IMAGE_CEE_CS_CALLCONV_FASTCALL then ILArgConvention.FastCall + elif ccMaxked = e_IMAGE_CEE_CS_CALLCONV_STDCALL then ILArgConvention.StdCall + elif ccMaxked = e_IMAGE_CEE_CS_CALLCONV_THISCALL then ILArgConvention.ThisCall + elif ccMaxked = e_IMAGE_CEE_CS_CALLCONV_CDECL then ILArgConvention.CDecl + elif ccMaxked = e_IMAGE_CEE_CS_CALLCONV_VARARG then ILArgConvention.VarArg + else ILArgConvention.Default + let generic = (b &&& e_IMAGE_CEE_CS_CALLCONV_GENERIC) <> 0x0uy + generic, Callconv (byteAsHasThis b,cc) + + and seekReadMemberRefAsMethodData numtypars idx: VarArgMethodData = cacheMemberRefAsMemberData seekReadMemberRefAsMethodDataUncached (MemberRefAsMspecIdx (numtypars,idx)) + + and seekReadMemberRefAsMethodDataUncached (MemberRefAsMspecIdx (numtypars,idx)) = + let (mrpIdx,nameIdx,typeIdx) = seekReadMemberRefRow idx + let nm = readStringHeap nameIdx + let enclTyp = seekReadMethodRefParent numtypars mrpIdx + let _generic,genarity,cc,retty,argtys,varargs = readBlobHeapAsMethodSig enclTyp.GenericArgs.Length typeIdx + let minst = Array.init genarity (fun n -> ILType.Var (numtypars+n)) + (VarArgMethodData(enclTyp, cc, nm, argtys, varargs,retty,minst)) + + and seekReadMemberRefAsMethDataNoVarArgs numtypars idx: MethodData = + let (VarArgMethodData(enclTyp, cc, nm, argtys, _varargs, retty,minst)) = seekReadMemberRefAsMethodData numtypars idx + (MethodData(enclTyp, cc, nm, argtys, retty,minst)) + + // One extremely annoying aspect of the MD format is that given a + // ILMethodDef token it is non-trivial to find which ILTypeDef it belongs + // to. So we do a binary chop through the ILTypeDef table + // looking for which ILTypeDef has the ILMethodDef within its range. + // Although the ILTypeDef table is not "sorted", it is effectively sorted by + // method-range and field-range start/finish indexes + and seekReadMethodDefAsMethodData idx = cacheMethodDefAsMethodData seekReadMethodDefAsMethodDataUncached idx + and seekReadMethodDefAsMethodDataUncached idx = + let (_code_rva, _implflags, _flags, nameIdx, typeIdx, _paramIdx) = seekReadMethodRow idx + let nm = readStringHeap nameIdx + // Look for the method def parent. + let tidx = + seekReadIndexedRow (getNumRows ILTableNames.TypeDef, + (fun i -> i, seekReadTypeDefRowWithExtents i), + (fun r -> r), + (fun (_,((_, _, _, _, _, methodsIdx), + (_, endMethodsIdx))) -> + if endMethodsIdx <= idx then 1 + elif methodsIdx <= idx && idx < endMethodsIdx then 0 + else -1), + true,fst) + let _generic,_genarity,cc,retty,argtys,_varargs = readBlobHeapAsMethodSig 0 typeIdx + let ctps = seekReadGenericParams 0 (TypeOrMethodDefTag.TypeDef,tidx) + let mtps = seekReadGenericParams ctps.Length (TypeOrMethodDefTag.MethodDef,idx) + let finst = mkILFormalGenericArgs 0 ctps.Length + let minst = mkILFormalGenericArgs ctps.Length mtps.Length + let enclTyp = seekReadTypeDefAsType AsObject finst tidx + MethodData(enclTyp, cc, nm, argtys, retty, minst) + + and seekReadMethod numtypars (idx:int) = + let (_codeRVA, implflags, flags, nameIdx, typeIdx, paramIdx) = seekReadMethodRow idx + let nm = readStringHeap nameIdx + let _generic,_genarity,cc,retty,argtys,_varargs = readBlobHeapAsMethodSig numtypars typeIdx + + let endParamIdx = + if idx >= getNumRows ILTableNames.Method then + getNumRows ILTableNames.Param + 1 + else + let (_,_,_,_,_, paramIdx) = seekReadMethodRow (idx + 1) + paramIdx + + let ret,ilParams = seekReadParams (retty,argtys) paramIdx endParamIdx + + { Token=idx // This value is not a strict metadata token but it's good enough (if needed we could get the real one pretty easily) + Name=nm + Attributes = enum(flags) + //SecurityDecls=seekReadSecurityDecls (TaggedIndex(hds_MethodDef,idx)) + //IsEntryPoint= (fst entryPointToken = ILTableNames.Method && snd entryPointToken = idx) + ImplAttributes= enum implflags + GenericParams=seekReadGenericParams numtypars (TypeOrMethodDefTag.MethodDef,idx) + CustomAttrs=seekReadCustomAttrs (TaggedIndex(HasCustomAttributeTag.MethodDef,idx)) + Parameters= ilParams + CallingConv=cc + Return=ret + Body= None + //SecurityDecls + //HasSecurity= false + IsEntryPoint= false (* unused by reader *) + } + + + and seekReadParams (retty,argtys) pidx1 pidx2 = + let retRes: ILReturn ref = ref { (* Marshal=None *) Type=retty; CustomAttrs=ILCustomAttrsStatics.Empty } + let paramsRes = + argtys + |> Array.map (fun ty -> + { Name=UNone + Default=UNone + //Marshal=None + Attributes= ParameterAttributes.None + ParameterType=ty + CustomAttrs=ILCustomAttrsStatics.Empty }) + for i = pidx1 to pidx2 - 1 do + seekReadParamExtras (retRes,paramsRes) i + !retRes, paramsRes + + and seekReadParamExtras (retRes,paramsRes) (idx:int) = + let (flags,seq,nameIdx) = seekReadParamRow idx + //let _hasMarshal = (flags &&& 0x2000) <> 0x0 + let hasDefault = (flags &&& 0x1000) <> 0x0 + //let fmReader idx = seekReadIndexedRow (getNumRows ILTableNames.FieldMarshal,seekReadFieldMarshalRow,fst,hfmCompare idx,isSorted ILTableNames.FieldMarshal,(snd >> readBlobHeapAsNativeType ctxt)) + let cas = seekReadCustomAttrs (TaggedIndex(HasCustomAttributeTag.ParamDef,idx)) + if seq = 0 then + retRes := { !retRes with + //Marshal=(if hasMarshal then Some (fmReader (TaggedIndex(hfm_ParamDef,idx))) else None); + CustomAttrs = cas } + else + paramsRes.[seq - 1] <- + { paramsRes.[seq - 1] with + //Marshal=(if hasMarshal then Some (fmReader (TaggedIndex(hfm_ParamDef,idx))) else None) + Default = (if hasDefault then USome (seekReadConstant (TaggedIndex(HasConstantTag.ParamDef,idx))) else UNone) + Name = readStringHeapOption nameIdx + Attributes = enum flags + CustomAttrs = cas } + + and seekReadMethodImpls numtypars tidx = + { new ILMethodImplDefs with + member __.Entries = + let mimpls = seekReadIndexedRows (getNumRows ILTableNames.MethodImpl,seekReadMethodImplRow,(fun (a,_,_) -> a),simpleIndexCompare tidx,isSorted ILTableNames.MethodImpl,(fun (_,b,c) -> b,c)) + mimpls |> Array.map (fun (b,c) -> + { OverrideBy= + let (MethodData(enclTyp, cc, nm, argtys, retty,minst)) = seekReadMethodDefOrRefNoVarargs numtypars b + mkILMethSpecInTyRaw (enclTyp, cc, nm, argtys, retty,minst); + Overrides= + let (MethodData(enclTyp, cc, nm, argtys, retty,minst)) = seekReadMethodDefOrRefNoVarargs numtypars c + let mspec = mkILMethSpecInTyRaw (enclTyp, cc, nm, argtys, retty,minst) + OverridesSpec(mspec.MethodRef, mspec.EnclosingType) }) } + + and seekReadMultipleMethodSemantics (flags,id) = + seekReadIndexedRows + (getNumRows ILTableNames.MethodSemantics , + seekReadMethodSemanticsRow, + (fun (_flags,_,c) -> c), + hsCompare id, + isSorted ILTableNames.MethodSemantics, + (fun (a,b,_c) -> + let (MethodData(enclTyp, cc, nm, argtys, retty, minst)) = seekReadMethodDefAsMethodData b + a, (mkILMethSpecInTyRaw (enclTyp, cc, nm, argtys, retty, minst)).MethodRef)) + |> Array.filter (fun (flags2,_) -> flags = flags2) + |> Array.map snd + + + and seekReadOptionalMethodSemantics id = + match seekReadMultipleMethodSemantics id with + | [| |] -> None + | xs -> Some xs.[0] + + and seekReadMethodSemantics id = + match seekReadOptionalMethodSemantics id with + | None -> failwith "seekReadMethodSemantics ctxt: no method found" + | Some x -> x + + and seekReadEvent _numtypars idx = + let (flags,nameIdx,_typIdx) = seekReadEventRow idx + { Name = readStringHeap nameIdx + //EventHandlerType = seekReadOptionalTypeDefOrRef numtypars AsObject typIdx + Attributes = enum(flags) + AddMethod= seekReadMethodSemantics (0x0008,TaggedIndex(HasSemanticsTag.Event, idx)) + RemoveMethod=seekReadMethodSemantics (0x0010,TaggedIndex(HasSemanticsTag.Event,idx)) + //FireMethod=seekReadOptionalMethodSemantics (0x0020,TaggedIndex(HasSemanticsTag.Event,idx)) + //OtherMethods = seekReadMultipleMethodSemantics (0x0004, TaggedIndex(HasSemanticsTag.Event, idx)) + CustomAttrs=seekReadCustomAttrs (TaggedIndex(HasCustomAttributeTag.Event,idx)) + Token = idx} + + and seekReadEvents numtypars tidx = + { new ILEventDefs with + member __.Entries = + match seekReadOptionalIndexedRow (getNumRows ILTableNames.EventMap,(fun i -> i, seekReadEventMapRow i),(fun (_,row) -> fst row),compare tidx,false,(fun (i,row) -> (i,snd row))) with + | None -> [| |] + | Some (rowNum,beginEventIdx) -> + let endEventIdx = + if rowNum >= getNumRows ILTableNames.EventMap then + getNumRows ILTableNames.Event + 1 + else + let (_, endEventIdx) = seekReadEventMapRow (rowNum + 1) + endEventIdx + + [| for i in beginEventIdx .. endEventIdx - 1 do + yield seekReadEvent numtypars i |] } + + and seekReadProperty numtypars idx = + let (flags,nameIdx,typIdx) = seekReadPropertyRow idx + let cc,retty,argtys = readBlobHeapAsPropertySig numtypars typIdx + let setter= seekReadOptionalMethodSemantics (0x0001,TaggedIndex(HasSemanticsTag.Property,idx)) + let getter = seekReadOptionalMethodSemantics (0x0002,TaggedIndex(HasSemanticsTag.Property,idx)) + let cc2 = + match getter with + | Some mref -> mref.CallingConv.ThisConv + | None -> + match setter with + | Some mref -> mref.CallingConv .ThisConv + | None -> cc + { Name=readStringHeap nameIdx + CallingConv = cc2 + Attributes = enum(flags) + SetMethod=setter; + GetMethod=getter; + PropertyType=retty; + Init= if (flags &&& 0x1000) = 0 then None else Some (seekReadConstant (TaggedIndex(HasConstantTag.Property,idx))); + IndexParameterTypes=argtys; + CustomAttrs=seekReadCustomAttrs (TaggedIndex(HasCustomAttributeTag.Property,idx)) + Token = idx } + + and seekReadProperties numtypars tidx = + { new ILPropertyDefs with + member __.Entries = + match seekReadOptionalIndexedRow (getNumRows ILTableNames.PropertyMap,(fun i -> i, seekReadPropertyMapRow i),(fun (_,row) -> fst row),compare tidx,false,(fun (i,row) -> (i,snd row))) with + | None -> [| |] + | Some (rowNum,beginPropIdx) -> + let endPropIdx = + if rowNum >= getNumRows ILTableNames.PropertyMap then + getNumRows ILTableNames.Property + 1 + else + let (_, endPropIdx) = seekReadPropertyMapRow (rowNum + 1) + endPropIdx + [| for i in beginPropIdx .. endPropIdx - 1 do + yield seekReadProperty numtypars i |] } + + + and seekReadCustomAttrs idx = + { new ILCustomAttrs with + member __.Entries = + seekReadIndexedRows (getNumRows ILTableNames.CustomAttribute, + seekReadCustomAttributeRow,(fun (a,_,_) -> a), + hcaCompare idx, + isSorted ILTableNames.CustomAttribute, + (fun (_,b,c) -> seekReadCustomAttr (b,c))) } + + and seekReadCustomAttr (catIdx,valIdx) = + let data = + match readBlobHeapOption valIdx with + | USome bytes -> bytes + | UNone -> [| |] + { Method=seekReadCustomAttrType catIdx; + Data= data + Elements = [] } + + (* + and seekReadSecurityDecls idx = + mkILLazySecurityDecls + (lazy + seekReadIndexedRows (getNumRows ILTableNames.Permission, + seekReadPermissionRow, + (fun (_,par,_) -> par), + hdsCompare idx, + isSorted ILTableNames.Permission, + (fun (act,_,ty) -> seekReadSecurityDecl (act,ty)))) + + and seekReadSecurityDecl (a,b) = + ctxt.seekReadSecurityDecl (SecurityDeclIdx (a,b)) + + and seekReadSecurityDeclUncached ctxtH (SecurityDeclIdx (act,ty)) = + PermissionSet ((if List.memAssoc (int act) (Lazy.force ILSecurityActionRevMap) then List.assoc (int act) (Lazy.force ILSecurityActionRevMap) else failwith "unknown security action"), + readBlobHeap ty) + + *) + + and seekReadConstant idx = + let kind,vidx = seekReadIndexedRow (getNumRows ILTableNames.Constant, + seekReadConstantRow, + (fun (_,key,_) -> key), + hcCompare idx,isSorted ILTableNames.Constant,(fun (kind,_,v) -> kind,v)) + match kind with + | x when x = uint16 et_STRING -> + let blobHeap = readBlobHeap vidx + let s = Encoding.Unicode.GetString(blobHeap, 0, blobHeap.Length) + box s + | x when x = uint16 et_BOOLEAN -> box (readBlobHeapAsBool vidx) + | x when x = uint16 et_CHAR -> box (readBlobHeapAsUInt16 vidx) + | x when x = uint16 et_I1 -> box (readBlobHeapAsSByte vidx) + | x when x = uint16 et_I2 -> box (readBlobHeapAsInt16 vidx) + | x when x = uint16 et_I4 -> box (readBlobHeapAsInt32 vidx) + | x when x = uint16 et_I8 -> box (readBlobHeapAsInt64 vidx) + | x when x = uint16 et_U1 -> box (readBlobHeapAsByte vidx) + | x when x = uint16 et_U2 -> box (readBlobHeapAsUInt16 vidx) + | x when x = uint16 et_U4 -> box (readBlobHeapAsUInt32 vidx) + | x when x = uint16 et_U8 -> box (readBlobHeapAsUInt64 vidx) + | x when x = uint16 et_R4 -> box (readBlobHeapAsSingle vidx) + | x when x = uint16 et_R8 -> box (readBlobHeapAsDouble vidx) + | x when x = uint16 et_CLASS || x = uint16 et_OBJECT -> null + | _ -> null + + and seekReadManifestResources () = + ILResources + (lazy + [| for i = 1 to getNumRows ILTableNames.ManifestResource do + let (offset,flags,nameIdx,implIdx) = seekReadManifestResourceRow i + let scoref = seekReadImplAsScopeRef implIdx + let datalab = + match scoref with + | ILScopeRef.Local -> + let start = anyV2P ("resource",offset + resourcesAddr) + let len = seekReadInt32 is start + ILResourceLocation.Local (fun () -> seekReadBytes is (start + 4) len) + | ILScopeRef.Module mref -> ILResourceLocation.File (mref,offset) + | ILScopeRef.Assembly aref -> ILResourceLocation.Assembly aref + + let r = + { Name= readStringHeap nameIdx; + Location = datalab; + Access = (if (flags &&& 0x01) <> 0x0 then ILResourceAccess.Public else ILResourceAccess.Private); + CustomAttrs = seekReadCustomAttrs (TaggedIndex(HasCustomAttributeTag.ManifestResource, i)) } + yield r |]) + + and seekReadNestedExportedTypes parentIdx = + ILNestedExportedTypesAndForwarders + (lazy + [| for i = 1 to getNumRows ILTableNames.ExportedType do + let (flags,_tok,nameIdx,namespaceIdx,implIdx) = seekReadExportedTypeRow i + if not (isTopTypeDef flags) then + let (TaggedIndex(tag,idx) ) = implIdx + match tag with + | tag when tag = ImplementationTag.ExportedType && idx = parentIdx -> + let _nsp, nm = readStringHeapAsTypeName (nameIdx,namespaceIdx) + yield + { Name=nm + Access=(match ILTypeDefAccess.OfFlags flags with ILTypeDefAccess.Nested n -> n | _ -> failwith "non-nested access for a nested type described as being in an auxiliary module") + Nested=seekReadNestedExportedTypes i + CustomAttrs=seekReadCustomAttrs (TaggedIndex(HasCustomAttributeTag.ExportedType, i)) } + | _ -> () |]) + + and seekReadTopExportedTypes () = + ILExportedTypesAndForwarders + (lazy + [| for i = 1 to getNumRows ILTableNames.ExportedType do + let (flags,_tok,nameIdx,namespaceIdx,implIdx) = seekReadExportedTypeRow i + if isTopTypeDef flags then + let (TaggedIndex(tag,_idx) ) = implIdx + + // the nested types will be picked up by their enclosing types + if tag <> ImplementationTag.ExportedType then + let nsp, nm = readStringHeapAsTypeName (nameIdx,namespaceIdx) + + let scoref = seekReadImplAsScopeRef implIdx + + let entry = + { ScopeRef=scoref + Namespace=nsp + Name=nm + IsForwarder = ((flags &&& 0x00200000) <> 0) + Access=ILTypeDefAccess.OfFlags flags + Nested=seekReadNestedExportedTypes i + CustomAttrs=seekReadCustomAttrs (TaggedIndex(HasCustomAttributeTag.ExportedType, i)) } + yield entry |]) + + + let ilModule = seekReadModule (subsys, (subsysMajor, subsysMinor), useHighEntropyVA, ilOnly, only32, is32bitpreferred, only64, platform, isDll, alignVirt, alignPhys, imageBaseReal, ilMetadataVersion) 1 + let ilAssemblyRefs = [ for i in 1 .. getNumRows ILTableNames.AssemblyRef do yield seekReadAssemblyRef i ] + + member __.Bytes = is.Bytes + member __.ILGlobals = ilg + member __.ILModuleDef = ilModule + member __.ILAssemblyRefs = ilAssemblyRefs + + let sigptr_get_byte (bytes: byte[]) sigptr = + int bytes.[sigptr], sigptr + 1 + + let sigptr_get_u8 bytes sigptr = + let b0,sigptr = sigptr_get_byte bytes sigptr + byte b0,sigptr + + let sigptr_get_bool bytes sigptr = + let b0,sigptr = sigptr_get_byte bytes sigptr + (b0 = 0x01) ,sigptr + + let sigptr_get_i8 bytes sigptr = + let i,sigptr = sigptr_get_u8 bytes sigptr + sbyte i,sigptr + + let sigptr_get_u16 bytes sigptr = + let b0,sigptr = sigptr_get_byte bytes sigptr + let b1,sigptr = sigptr_get_byte bytes sigptr + uint16 (b0 ||| (b1 <<< 8)),sigptr + + let sigptr_get_i16 bytes sigptr = + let u,sigptr = sigptr_get_u16 bytes sigptr + int16 u,sigptr + + let sigptr_get_i32 bytes sigptr = + let b0,sigptr = sigptr_get_byte bytes sigptr + let b1,sigptr = sigptr_get_byte bytes sigptr + let b2,sigptr = sigptr_get_byte bytes sigptr + let b3,sigptr = sigptr_get_byte bytes sigptr + b0 ||| (b1 <<< 8) ||| (b2 <<< 16) ||| (b3 <<< 24),sigptr + + let sigptr_get_u32 bytes sigptr = + let u,sigptr = sigptr_get_i32 bytes sigptr + uint32 u,sigptr + + let sigptr_get_i64 bytes sigptr = + let b0,sigptr = sigptr_get_byte bytes sigptr + let b1,sigptr = sigptr_get_byte bytes sigptr + let b2,sigptr = sigptr_get_byte bytes sigptr + let b3,sigptr = sigptr_get_byte bytes sigptr + let b4,sigptr = sigptr_get_byte bytes sigptr + let b5,sigptr = sigptr_get_byte bytes sigptr + let b6,sigptr = sigptr_get_byte bytes sigptr + let b7,sigptr = sigptr_get_byte bytes sigptr + int64 b0 ||| (int64 b1 <<< 8) ||| (int64 b2 <<< 16) ||| (int64 b3 <<< 24) ||| + (int64 b4 <<< 32) ||| (int64 b5 <<< 40) ||| (int64 b6 <<< 48) ||| (int64 b7 <<< 56), + sigptr + + let sigptr_get_u64 bytes sigptr = + let u,sigptr = sigptr_get_i64 bytes sigptr + uint64 u,sigptr + + + let ieee32_of_bits (x:int32) = System.BitConverter.ToSingle(System.BitConverter.GetBytes(x),0) + let ieee64_of_bits (x:int64) = System.BitConverter.Int64BitsToDouble(x) + + let sigptr_get_ieee32 bytes sigptr = + let u,sigptr = sigptr_get_i32 bytes sigptr + ieee32_of_bits u,sigptr + + let sigptr_get_ieee64 bytes sigptr = + let u,sigptr = sigptr_get_i64 bytes sigptr + ieee64_of_bits u,sigptr + + let u8AsBytes (i:byte) = [| i |] + let u16AsBytes x = let n = (int x) in [| b0 n; b1 n |] + let i32AsBytes i = [| b0 i; b1 i; b2 i; b3 i |] + let i64AsBytes i = [| dw0 i; dw1 i; dw2 i; dw3 i; dw4 i; dw5 i; dw6 i; dw7 i |] + + let i8AsBytes (i:sbyte) = u8AsBytes (byte i) + let i16AsBytes (i:int16) = u16AsBytes (uint16 i) + let u32AsBytes (i:uint32) = i32AsBytes (int32 i) + let u64AsBytes (i:uint64) = i64AsBytes (int64 i) + let bits_of_float32 (x:float32) = BitConverter.ToInt32(BitConverter.GetBytes(x),0) + let bits_of_float (x:float) = BitConverter.DoubleToInt64Bits(x) + + let ieee32AsBytes i = i32AsBytes (bits_of_float32 i) + let ieee64AsBytes i = i64AsBytes (bits_of_float i) + + + let (|ElementType|_|) (ty: ILType) = + match ty with + | ILType.Boxed tspec -> + match tspec.Namespace, tspec.Name with + | USome "System", "String"-> Some et_STRING + | USome "System", "Object"-> Some et_OBJECT + | _ -> None + | ILType.Value tspec -> + match tspec.Namespace, tspec.Name with + | USome "System", "Int32" -> Some et_I4 + | USome "System", "SByte" -> Some et_I1 + | USome "System", "Int16"-> Some et_I2 + | USome "System", "Int64" -> Some et_I8 + | USome "System", "IntPtr" -> Some et_I + | USome "System", "Byte" -> Some et_U1 + | USome "System", "UInt16"-> Some et_U2 + | USome "System", "UInt32" -> Some et_U4 + | USome "System", "UInt64" -> Some et_U8 + | USome "System", "UIntPtr" -> Some et_U + | USome "System", "Double" -> Some et_R8 + | USome "System", "Single" -> Some et_R4 + | USome "System", "Char" -> Some et_CHAR + | USome "System", "Boolean" -> Some et_BOOLEAN + | USome "System", "TypedReference" -> Some et_TYPEDBYREF + | _ -> None + | _ -> None + + let encodeCustomAttrString (s: string) = + let arr = Encoding.UTF8.GetBytes s + Array.concat [ ByteBuffer.Z32 arr.Length; arr ] + + let rec encodeCustomAttrElemType x = + match x with + | ILType.Boxed tspec when tspec.Namespace = USome "System" && tspec.Name = "Object" -> [| 0x51uy |] + | ILType.Boxed tspec when tspec.Namespace = USome "System" && tspec.Name = "Type" -> [| 0x50uy |] + | ElementType et -> [| et |] + | ILType.Value tspec -> Array.append [| 0x55uy |] (encodeCustomAttrString tspec.TypeRef.QualifiedName) + | ILType.Array (shape, elemType) when shape = ILArrayShape.SingleDimensional -> + Array.append [| et_SZARRAY |] (encodeCustomAttrElemType elemType) + | _ -> failwith "encodeCustomAttrElemType: unrecognized custom element type" + + /// Given a custom attribute element, work out the type of the .NET argument for that element. + let rec encodeCustomAttrElemTypeForObject (x: obj) = + match x with + | :? string -> [| et_STRING |] + | :? bool -> [| et_BOOLEAN |] + | :? char -> [| et_CHAR |] + | :? sbyte -> [| et_I1 |] + | :? int16 -> [| et_I2 |] + | :? int32 -> [| et_I4 |] + | :? int64 -> [| et_I8 |] + | :? byte -> [| et_U1 |] + | :? uint16 -> [| et_U2 |] + | :? uint32 -> [| et_U4 |] + | :? uint64 -> [| et_U8 |] + | :? ILType -> [| 0x50uy |] + | :? Type -> [| 0x50uy |] + | null -> [| et_STRING |]// yes, the 0xe prefix is used when passing a "null" to a property or argument of type "object" here + | :? single -> [| et_R4 |] + | :? double -> [| et_R8 |] + | :? (obj[]) -> failwith "TODO: can't yet emit arrays in attrs" // [| yield et_SZARRAY; yield! encodeCustomAttrElemType elemTy |] + | _ -> failwith "unexpected value in custom attribute" + + /// Given a custom attribute element, encode it to a binary representation according to the rules in Ecma 335 Partition II. + let rec encodeCustomAttrPrimValue (c: obj) = + match c with + | :? bool as b -> [| (if b then 0x01uy else 0x00uy) |] + | null -> [| 0xFFuy |] + | :? string as s -> encodeCustomAttrString s + | :? char as x -> u16AsBytes (uint16 x) + | :? SByte as x -> i8AsBytes x + | :? Int16 as x -> i16AsBytes x + | :? Int32 as x -> i32AsBytes x + | :? Int64 as x -> i64AsBytes x + | :? Byte as x -> u8AsBytes x + | :? UInt16 as x -> u16AsBytes x + | :? UInt32 as x -> u32AsBytes x + | :? UInt64 as x -> u64AsBytes x + | :? Single as x -> ieee32AsBytes x + | :? Double as x -> ieee64AsBytes x + | :? ILType as ty -> encodeCustomAttrString ty.QualifiedName + | :? Type as ty -> encodeCustomAttrString ty.FullName + | :? (obj[]) as elems -> + [| yield! i32AsBytes elems.Length; for elem in elems do yield! encodeCustomAttrPrimValue elem |] + | _ -> failwith "unexpected value in custom attribute" + + and encodeCustomAttrValue ty (c: obj) = + match ty, c with + | ILType.Boxed tspec, _ when tspec.Namespace = USome "System" && tspec.Name = "Object" -> + [| yield! encodeCustomAttrElemTypeForObject c; yield! encodeCustomAttrPrimValue c |] + | ILType.Array (shape, _), null when shape = ILArrayShape.SingleDimensional -> + [| yield! i32AsBytes 0xFFFFFFFF |] + | ILType.Array (shape, elemType), (:? (obj[]) as elems) when shape = ILArrayShape.SingleDimensional -> + [| yield! i32AsBytes elems.Length; for elem in elems do yield! encodeCustomAttrValue elemType elem |] + | _ -> + encodeCustomAttrPrimValue c + + let encodeCustomAttrNamedArg prop (ILCustomAttrNamedArg (nm, ty, elem)) = + [| yield (if prop then 0x54uy else 0x53uy) + yield! encodeCustomAttrElemType ty + yield! encodeCustomAttrString nm + yield! encodeCustomAttrValue ty elem |] + + let mkILCustomAttribMethRef (mspec:ILMethodSpec, fixedArgs: obj list, propArgs: ILCustomAttrNamedArg list, fieldArgs: ILCustomAttrNamedArg list) = + let argtys = mspec.MethodRef.ArgTypes + let nnamed = propArgs.Length + fieldArgs.Length + let data = + [| yield! [| 0x01uy; 0x00uy; |] + for (argty,fixedArg) in Seq.zip argtys fixedArgs do + yield! encodeCustomAttrValue argty fixedArg + yield! u16AsBytes (uint16 nnamed ) + for arg in propArgs do + yield! encodeCustomAttrNamedArg true arg + for arg in fieldArgs do + yield! encodeCustomAttrNamedArg false arg |] + //printfn "mkILCustomAttribMethRef, nnamed = %d, data.Length = %d, data = %A" nnamed data.Length data + { Method = mspec; + Data = data; + Elements = fixedArgs @ (propArgs |> List.map(fun (ILCustomAttrNamedArg(_,_,e)) -> e)) @ (fieldArgs |> List.map(fun (ILCustomAttrNamedArg(_,_,e)) -> e)) } + + let rec decodeCustomAttrElemType ilg bytes sigptr x = + match x with + | x when x = et_I1 -> ilg.typ_SByte, sigptr + | x when x = et_U1 -> ilg.typ_Byte, sigptr + | x when x = et_I2 -> ilg.typ_Int16, sigptr + | x when x = et_U2 -> ilg.typ_UInt16, sigptr + | x when x = et_I4 -> ilg.typ_Int32, sigptr + | x when x = et_U4 -> ilg.typ_UInt32, sigptr + | x when x = et_I8 -> ilg.typ_Int64, sigptr + | x when x = et_U8 -> ilg.typ_UInt64, sigptr + | x when x = et_R8 -> ilg.typ_Double, sigptr + | x when x = et_R4 -> ilg.typ_Single, sigptr + | x when x = et_CHAR -> ilg.typ_Char, sigptr + | x when x = et_BOOLEAN -> ilg.typ_Boolean, sigptr + | x when x = et_STRING -> ilg.typ_String, sigptr + | x when x = et_OBJECT -> ilg.typ_Object, sigptr + | x when x = et_SZARRAY -> + let et,sigptr = sigptr_get_u8 bytes sigptr + let elemTy,sigptr = decodeCustomAttrElemType ilg bytes sigptr et + mkILArr1DTy elemTy, sigptr + | x when x = 0x50uy -> ilg.typ_Type, sigptr + | _ -> failwithf "decodeCustomAttrElemType ilg: sigptr = %d, unrecognized custom element type: %A, bytes = %A" sigptr x bytes + + // Parse an IL type signature argument within a custom attribute blob + type ILTypeSigParser(tstring: string) = + + let mutable startPos = 0 + let mutable currentPos = 0 + + //let reset() = startPos <- 0 ; currentPos <- 0 + let nil = '\r' // cannot appear in a type sig + + // take a look at the next value, but don't advance + let peek() = if currentPos < (tstring.Length-1) then tstring.[currentPos+1] else nil + let peekN(skip) = if currentPos < (tstring.Length - skip) then tstring.[currentPos+skip] else nil + // take a look at the current value, but don't advance + let here() = if currentPos < tstring.Length then tstring.[currentPos] else nil + // move on to the next character + let step() = currentPos <- currentPos+1 + // ignore the current lexeme + let skip() = startPos <- currentPos + // ignore the current lexeme, advance + let drop() = skip() ; step() ; skip() + // return the current lexeme, advance + let take() = + let s = if currentPos < tstring.Length then tstring.[startPos..currentPos] else "" + drop() + s + + // The format we accept is + // "{`[,+]}{}{}" E.g., + // + // System.Collections.Generic.Dictionary + // `2[ + // [System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089], + // dev.virtualearth.net.webservices.v1.search.CategorySpecificPropertySet], + // mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" + // + // Note that + // • Since we're only reading valid IL, we assume that the signature is properly formed + // • For type parameters, if the type is non-local, it will be wrapped in brackets ([]) + member x.ParseType() = + + // Does the type name start with a leading '['? If so, ignore it + // (if the specialization type is in another module, it will be wrapped in bracket) + if here() = '[' then drop() + + // 1. Iterate over beginning of type, grabbing the type name and determining if it's generic or an array + let typeName = + while (peek() <> '`') && (peek() <> '[') && (peek() <> ']') && (peek() <> ',') && (peek() <> nil) do step() + take() + + // 2. Classify the type + + // Is the type generic? + let typeName, specializations = + if here() = '`' then + drop() // step to the number + // fetch the arity + let arity = + while (int(here()) >= (int('0'))) && (int(here()) <= ((int('9')))) && (int(peek()) >= (int('0'))) && (int(peek()) <= ((int('9')))) do step() + System.Int32.Parse(take()) + + // typically types are saturated, i.e. if generic they have arguments. However, assembly metadata for reflectedDefinitions they occur free. + // this code takes care of exactly this case. + if here () = '[' then + // skip the '[' + drop() + // get the specializations + typeName+"`"+(arity.ToString()), Some(([| for _i in 0..arity-1 do yield x.ParseType() |])) + else + typeName+"`"+(arity.ToString()), None + else + typeName, None + + // Is the type an array? + let rank = + if here() = '[' then + let mutable rank = 0 + + while here() <> ']' do + rank <- rank + 1 + step() + drop() + + Some(ILArrayShape(Array.create rank (Some 0, None))) + else + None + + // Is there a scope? + let scope = + if (here() = ',' || here() = ' ') && (peek() <> '[' && peekN(2) <> '[') then + let grabScopeComponent() = + if here() = ',' then drop() // ditch the ',' + if here() = ' ' then drop() // ditch the ' ' + + while (peek() <> ',' && peek() <> ']' && peek() <> nil) do step() + take() + + let scope = + [ yield grabScopeComponent() // assembly + yield grabScopeComponent() // version + yield grabScopeComponent() // culture + yield grabScopeComponent() // public key token + ] |> String.concat "," + ILScopeRef.Assembly(ILAssemblyRef.FromAssemblyName(System.Reflection.AssemblyName(scope))) + else + ILScopeRef.Local + + // strip any extraneous trailing brackets or commas + if (here() = ']') then drop() + if (here() = ',') then drop() + + // build the IL type + let tref = + let nsp, nm = splitILTypeName typeName + ILTypeRef(ILTypeRefScope.Top scope, nsp, nm) + + let genericArgs = + match specializations with + | None -> [| |] + | Some(genericArgs) -> genericArgs + let tspec = ILTypeSpec(tref,genericArgs) + let ilty = + match tspec.Name with + | "System.SByte" + | "System.Byte" + | "System.Int16" + | "System.UInt16" + | "System.Int32" + | "System.UInt32" + | "System.Int64" + | "System.UInt64" + | "System.Char" + | "System.Double" + | "System.Single" + | "System.Boolean" -> ILType.Value(tspec) + | _ -> ILType.Boxed(tspec) + + // if it's an array, wrap it - otherwise, just return the IL type + match rank with + | Some(r) -> ILType.Array(r,ilty) + | _ -> ilty + + + let sigptr_get_bytes n (bytes:byte[]) sigptr = + let res = Array.zeroCreate n + for i = 0 to n - 1 do + res.[i] <- bytes.[sigptr + i] + res, sigptr + n + + let sigptr_get_string n bytes sigptr = + let intarray,sigptr = sigptr_get_bytes n bytes sigptr + Encoding.UTF8.GetString(intarray , 0, intarray.Length), sigptr + + let sigptr_get_serstring bytes sigptr = + let len,sigptr = sigptrGetZInt32 bytes sigptr + sigptr_get_string len bytes sigptr + + let sigptr_get_serstring_possibly_null bytes sigptr = + let b0,new_sigptr = sigptr_get_byte bytes sigptr + if b0 = 0xFF then // null case + None,new_sigptr + else // throw away new_sigptr, getting length & text advance + let len,sigptr = sigptrGetZInt32 bytes sigptr + let s, sigptr = sigptr_get_string len bytes sigptr + Some(s),sigptr + + let decodeILCustomAttribData ilg (ca: ILCustomAttribute) = + let bytes = ca.Data + let sigptr = 0 + let bb0,sigptr = sigptr_get_byte bytes sigptr + let bb1,sigptr = sigptr_get_byte bytes sigptr + if not (bb0 = 0x01 && bb1 = 0x00) then failwith "decodeILCustomAttribData: invalid data"; + + let rec parseVal argty sigptr = + match argty with + | ILType.Value tspec when tspec.Namespace = USome "System" && tspec.Name = "SByte" -> + let n,sigptr = sigptr_get_i8 bytes sigptr + (argty, box n), sigptr + | ILType.Value tspec when tspec.Namespace = USome "System" && tspec.Name = "Byte" -> + let n,sigptr = sigptr_get_u8 bytes sigptr + (argty, box n), sigptr + | ILType.Value tspec when tspec.Namespace = USome "System" && tspec.Name = "Int16" -> + let n,sigptr = sigptr_get_i16 bytes sigptr + (argty, box n), sigptr + | ILType.Value tspec when tspec.Namespace = USome "System" && tspec.Name = "UInt16" -> + let n,sigptr = sigptr_get_u16 bytes sigptr + (argty, box n), sigptr + | ILType.Value tspec when tspec.Namespace = USome "System" && tspec.Name = "Int32" -> + let n,sigptr = sigptr_get_i32 bytes sigptr + (argty, box n), sigptr + | ILType.Value tspec when tspec.Namespace = USome "System" && tspec.Name = "UInt32" -> + let n,sigptr = sigptr_get_u32 bytes sigptr + (argty, box n), sigptr + | ILType.Value tspec when tspec.Namespace = USome "System" && tspec.Name = "Int64" -> + let n,sigptr = sigptr_get_i64 bytes sigptr + (argty, box n), sigptr + | ILType.Value tspec when tspec.Namespace = USome "System" && tspec.Name = "UInt64" -> + let n,sigptr = sigptr_get_u64 bytes sigptr + (argty, box n), sigptr + | ILType.Value tspec when tspec.Namespace = USome "System" && tspec.Name = "Double" -> + let n,sigptr = sigptr_get_ieee64 bytes sigptr + (argty, box n), sigptr + | ILType.Value tspec when tspec.Namespace = USome "System" && tspec.Name = "Single" -> + let n,sigptr = sigptr_get_ieee32 bytes sigptr + (argty, box n), sigptr + | ILType.Value tspec when tspec.Namespace = USome "System" && tspec.Name = "Char" -> + let n,sigptr = sigptr_get_u16 bytes sigptr + (argty, box (char n)), sigptr + | ILType.Value tspec when tspec.Namespace = USome "System" && tspec.Name = "Boolean" -> + let n,sigptr = sigptr_get_byte bytes sigptr + (argty, box (not (n = 0))), sigptr + | ILType.Boxed tspec when tspec.Namespace = USome "System" && tspec.Name = "String" -> + //printfn "parsing string, sigptr = %d" sigptr + let n,sigptr = sigptr_get_serstring_possibly_null bytes sigptr + //printfn "got string, sigptr = %d" sigptr + (argty, box (match n with None -> null | Some s -> s)), sigptr + | ILType.Boxed tspec when tspec.Namespace = USome "System" && tspec.Name = "Type" -> + let nOpt,sigptr = sigptr_get_serstring_possibly_null bytes sigptr + match nOpt with + | None -> (argty, box null) , sigptr // TODO: read System.Type attrs + | Some n -> + try + let parser = ILTypeSigParser(n) + parser.ParseType() |> ignore + (argty, box null) , sigptr // TODO: read System.Type attributes + with e -> + failwithf "decodeILCustomAttribData: error parsing type in custom attribute blob: %s" e.Message + | ILType.Boxed tspec when tspec.Namespace = USome "System" && tspec.Name = "Object" -> + let et,sigptr = sigptr_get_u8 bytes sigptr + if et = 0xFFuy then + (argty, null), sigptr + else + let ty,sigptr = decodeCustomAttrElemType ilg bytes sigptr et + parseVal ty sigptr + | ILType.Array(shape,elemTy) when shape = ILArrayShape.SingleDimensional -> + let n,sigptr = sigptr_get_i32 bytes sigptr + if n = 0xFFFFFFFF then (argty, null),sigptr else + let rec parseElems acc n sigptr = + if n = 0 then List.rev acc, sigptr else + let v,sigptr = parseVal elemTy sigptr + parseElems (v ::acc) (n-1) sigptr + let elems, sigptr = parseElems [] n sigptr + let elems = elems |> List.map snd |> List.toArray + (argty, box elems), sigptr + | ILType.Value _ -> (* assume it is an enumeration *) + let n,sigptr = sigptr_get_i32 bytes sigptr + (argty, box n), sigptr + | _ -> failwith "decodeILCustomAttribData: attribute data involves an enum or System.Type value" + + let rec parseFixed argtys sigptr = + match argtys with + | [] -> [],sigptr + | h::t -> + let nh,sigptr = parseVal h sigptr + let nt,sigptr = parseFixed t sigptr + nh ::nt, sigptr + + let fixedArgs,sigptr = parseFixed (List.ofArray ca.Method.FormalArgTypes) sigptr + let nnamed,sigptr = sigptr_get_u16 bytes sigptr + //printfn "nnamed = %d" nnamed + + try + let rec parseNamed acc n sigptr = + if n = 0 then List.rev acc else + let isPropByte,sigptr = sigptr_get_u8 bytes sigptr + let isProp = (int isPropByte = 0x54) + let et,sigptr = sigptr_get_u8 bytes sigptr + // We have a named value + let ty,sigptr = + if ((* 0x50 = (int et) || *) 0x55 = (int et)) then + let qualified_tname,sigptr = sigptr_get_serstring bytes sigptr + let unqualified_tname, rest = + let pieces = qualified_tname.Split(',') + if pieces.Length > 1 then + pieces.[0], Some (String.concat "," pieces.[1..]) + else + pieces.[0], None + let scoref = + match rest with + | Some aname -> ILTypeRefScope.Top(ILScopeRef.Assembly(ILAssemblyRef.FromAssemblyName(System.Reflection.AssemblyName(aname)))) + | None -> ilg.typ_Boolean.TypeSpec.Scope + + let nsp, nm = splitILTypeName unqualified_tname + let tref = ILTypeRef (scoref, nsp, nm) + let tspec = mkILNonGenericTySpec tref + ILType.Value(tspec),sigptr + else + decodeCustomAttrElemType ilg bytes sigptr et + let nm,sigptr = sigptr_get_serstring bytes sigptr + let (_,v),sigptr = parseVal ty sigptr + parseNamed ((nm,ty,isProp,v) :: acc) (n-1) sigptr + let named = parseNamed [] (int nnamed) sigptr + fixedArgs, named + + with err -> + failwithf "FAILED decodeILCustomAttribData, data.Length = %d, data = %A, meth = %A, argtypes = %A, fixedArgs=%A, nnamed = %A, sigptr before named = %A, innerError = %A" bytes.Length bytes ca.Method.EnclosingType ca.Method.FormalArgTypes fixedArgs nnamed sigptr (err.ToString()) + + type CacheValue = ILModuleReader + let (|CacheValue|_|) (wr: WeakReference) = match wr.Target with null -> None | v -> Some (v :?> CacheValue) + let CacheValue (reader: CacheValue) = System.WeakReference reader + + // Amortize readers weakly - this is enough that all the type providers in this DLL will at least share + // resources when all instantiated at the same time. + let readersWeakCache = ConcurrentDictionary<(string * string), WeakReference>() + + let ILModuleReaderAfterReadingAllBytes (file:string, ilGlobals: ILGlobals) = + let bytes = File.ReadAllBytes file + let key = (file, ilGlobals.systemRuntimeScopeRef.QualifiedName) + match readersWeakCache.TryGetValue (key) with + | true, CacheValue mr2 when bytes = mr2.Bytes -> + mr2 // throw away the bytes we just read and recycle the existing ILModuleReader + | _ -> + let mr = ILModuleReader(file, ByteFile(bytes), ilGlobals, true) + readersWeakCache.[key] <- CacheValue (mr) + mr + + + (* NOTE: ecma_ prefix refers to the standard "mscorlib" *) + let EcmaPublicKey = PublicKeyToken ([|0xdeuy; 0xaduy; 0xbeuy; 0xefuy; 0xcauy; 0xfeuy; 0xfauy; 0xceuy |]) + let EcmaMscorlibScopeRef = ILScopeRef.Assembly (ILAssemblyRef("mscorlib", UNone, USome EcmaPublicKey, true, UNone, UNone)) + +//==================================================================================================== +// TargetAssembly +// +// An implementation of reflection objects over on-disk assemblies, sufficient to give +// System.Type, System.MethodInfo, System.ConstructorInfo etc. objects +// that can be referred to in quotations and used as backing information for cross- +// targeting F# type providers. + + +namespace ProviderImplementation.ProvidedTypes + + #nowarn "1182" + + // + // The on-disk assemblies are read by AssemblyReader. + // + // Background + // ---------- + // + // Provided type/member definitions need to refer to non-provided definitions like "System.Object" and "System.String". + // + // For cross-targeting F# type providers, these can be references to assemblies that can't easily be loaded by .NET + // reflection. For this reason, an implementation of the .NET reflection objects is needed. At minimum this + // implementation must support the operations used by the F# compiler to interrogate the reflection objects. + // + // For a System.Assembly, the information must be sufficient to allow the Assembly --> ILScopeRef conversion + // in ExtensionTyping.fs of the F# compiler. This requires: + // Assembly.GetName() + // + // For a System.Type representing a reference to a named type definition, the information must be sufficient + // to allow the Type --> ILTypeRef conversion in the F# compiler. This requires: + // typ.DeclaringType + // typ.Name + // typ.Namespace + // + // For a System.Type representing a type expression, the information must be sufficient to allow the Type --> ILType.Var conversion in the F# compiler. + // typeof.Equals(typ) + // typ.IsGenericParameter + // typ.GenericParameterPosition + // typ.IsArray + // typ.GetElementType() + // typ.GetArrayRank() + // typ.IsByRef + // typ.GetElementType() + // typ.IsPointer + // typ.GetElementType() + // typ.IsGenericType + // typ.GetGenericArguments() + // typ.GetGenericTypeDefinition() + // + // For a System.MethodBase --> ILType.ILMethodRef conversion: + // + // :?> MethodInfo as minfo + // + // minfo.IsGenericMethod || minfo.DeclaringType.IsGenericType + // minfo.DeclaringType.GetGenericTypeDefinition + // minfo.DeclaringType.GetMethods().MetadataToken + // minfo.MetadataToken + // minfo.IsGenericMethod + // minfo.GetGenericArguments().Length + // minfo.ReturnType + // minfo.GetParameters | .ParameterType + // minfo.Name + // + // :?> ConstructorInfo as cinfo + // + // cinfo.DeclaringType.IsGenericType + // cinfo.DeclaringType.GetGenericTypeDefinition + // cinfo.DeclaringType.GetConstructors() GetParameters | .ParameterType + // + + #nowarn "40" + + open System + open System.IO + open System.Collections.Generic + open System.Reflection + open ProviderImplementation.ProvidedTypes.AssemblyReader + + + [] + module Utils2 = + + // A table tracking how wrapped type definition objects are translated to cloned objects. + // Unique wrapped type definition objects must be translated to unique wrapper objects, based + // on object identity. + type TxTable<'T2>() = + let tab = Dictionary() + member __.Get inp f = + if tab.ContainsKey inp then + tab.[inp] + else + let res = f() + tab.[inp] <- res + res + + member __.ContainsKey inp = tab.ContainsKey inp + + + let instParameterInfo inst (inp: ParameterInfo) = + { new ParameterInfo() with + override __.Name = inp.Name + override __.ParameterType = inp.ParameterType |> instType inst + override __.Attributes = inp.Attributes + override __.RawDefaultValue = inp.RawDefaultValue + override __.GetCustomAttributesData() = inp.GetCustomAttributesData() + override __.ToString() = inp.ToString() + "@inst" } + + let hashILParameterTypes (ps: ILParameters) = + // This hash code doesn't need to be very good as hashing by name is sufficient to give decent hash granularity + ps.Length + + let eqILScopeRef (_sco1: ILScopeRef) (_sco2: ILScopeRef) = + true // TODO (though omitting this is not a problem in practice since type equivalence by name is sufficient to bind methods) + + let eqAssemblyAndILScopeRef (_ass1: Assembly) (_sco2: ILScopeRef) = + true // TODO (though omitting this is not a problem in practice since type equivalence by name is sufficient to bind methods) + + + let rec eqILTypeRef (ty1: ILTypeRef) (ty2: ILTypeRef) = + ty1.Name = ty2.Name && eqILTypeRefScope ty1.Scope ty2.Scope + + and eqILTypeRefScope (ty1: ILTypeRefScope) (ty2: ILTypeRefScope) = + match ty1, ty2 with + | ILTypeRefScope.Top scoref1, ILTypeRefScope.Top scoref2 -> eqILScopeRef scoref1 scoref2 + | ILTypeRefScope.Nested tref1, ILTypeRefScope.Nested tref2 -> eqILTypeRef tref1 tref2 + | _ -> false + + and eqILTypes (tys1: ILType[]) (tys2: ILType[]) = + lengthsEqAndForall2 tys1 tys2 eqILType + + and eqILType (ty1: ILType) (ty2: ILType) = + match ty1, ty2 with + | (ILType.Value(tspec1) | ILType.Boxed(tspec1)), (ILType.Value(tspec2) | ILType.Boxed(tspec2))-> + eqILTypeRef tspec1.TypeRef tspec2.TypeRef && eqILTypes tspec1.GenericArgs tspec2.GenericArgs + | ILType.Array(rank1, arg1), ILType.Array(rank2, arg2) -> + rank1 = rank2 && eqILType arg1 arg2 + | ILType.Ptr(arg1), ILType.Ptr(arg2) -> + eqILType arg1 arg2 + | ILType.Byref(arg1), ILType.Byref(arg2) -> + eqILType arg1 arg2 + | ILType.Var(arg1), ILType.Var(arg2) -> + arg1 = arg2 + | _ -> false + + let rec eqTypeAndILTypeRef (ty1: Type) (ty2: ILTypeRef) = + ty1.Name = ty2.Name && + ty1.Namespace = (StructOption.toObj ty2.Namespace) && + match ty2.Scope with + | ILTypeRefScope.Top scoref2 -> eqAssemblyAndILScopeRef ty1.Assembly scoref2 + | ILTypeRefScope.Nested tref2 -> ty1.IsNested && eqTypeAndILTypeRef ty1.DeclaringType tref2 + + let rec eqTypesAndILTypes (tys1: Type[]) (tys2: ILType[]) = + eqTypesAndILTypesWithInst [| |] tys1 tys2 + + and eqTypesAndILTypesWithInst inst2 (tys1: Type[]) (tys2: ILType[]) = + lengthsEqAndForall2 tys1 tys2 (eqTypeAndILTypeWithInst inst2) + + and eqTypeAndILTypeWithInst inst2 (ty1: Type) (ty2: ILType) = + match ty2 with + | (ILType.Value(tspec2) | ILType.Boxed(tspec2))-> + if tspec2.GenericArgs.Length > 0 then + ty1.IsGenericType && eqTypeAndILTypeRef (ty1.GetGenericTypeDefinition()) tspec2.TypeRef && eqTypesAndILTypesWithInst inst2 (ty1.GetGenericArguments()) tspec2.GenericArgs + else + not ty1.IsGenericType && eqTypeAndILTypeRef ty1 tspec2.TypeRef + | ILType.Array(rank2, arg2) -> + ty1.IsArray && ty1.GetArrayRank() = rank2.Rank && eqTypeAndILTypeWithInst inst2 (ty1.GetElementType()) arg2 + | ILType.Ptr(arg2) -> + ty1.IsPointer && eqTypeAndILTypeWithInst inst2 (ty1.GetElementType()) arg2 + | ILType.Byref(arg2) -> + ty1.IsByRef && eqTypeAndILTypeWithInst inst2 (ty1.GetElementType()) arg2 + | ILType.Var(arg2) -> + if int arg2 < inst2.Length then + eqTypes ty1 inst2.[int arg2] + else + ty1.IsGenericParameter && ty1.GenericParameterPosition = int arg2 + + | _ -> false + + let eqParametersAndILParameterTypesWithInst inst2 (ps1: ParameterInfo[]) (ps2: ILParameters) = + lengthsEqAndForall2 ps1 ps2 (fun p1 p2 -> eqTypeAndILTypeWithInst inst2 p1.ParameterType p2.ParameterType) + + + type MethodSymbol2(gmd: MethodInfo, gargs: Type[]) = + inherit MethodInfo() + let dty = gmd.DeclaringType + let dinst = (if dty.IsGenericType then dty.GetGenericArguments() else [| |]) + + override __.Attributes = gmd.Attributes + override __.Name = gmd.Name + override __.DeclaringType = dty + override __.MemberType = gmd.MemberType + + override __.GetParameters() = gmd.GetParameters() |> Array.map (instParameterInfo (dinst, gargs)) + override __.CallingConvention = gmd.CallingConvention + override __.ReturnType = gmd.ReturnType |> instType (dinst, gargs) + override __.GetGenericMethodDefinition() = gmd + override __.IsGenericMethod = gmd.IsGenericMethod + override __.GetGenericArguments() = gargs + override __.MetadataToken = gmd.MetadataToken + + override __.GetCustomAttributesData() = gmd.GetCustomAttributesData() + override __.MakeGenericMethod(typeArgs) = MethodSymbol2(gmd, typeArgs) :> MethodInfo + override __.GetHashCode() = gmd.MetadataToken + override this.Equals(that:obj) = + match that with + | :? MethodInfo as that -> this.MetadataToken = that.MetadataToken && eqTypes dty that.DeclaringType && lengthsEqAndForall2 (gmd.GetGenericArguments()) (that.GetGenericArguments()) (=) + | _ -> false + + + override this.MethodHandle = notRequired this "MethodHandle" this.Name + override this.ReturnParameter = notRequired this "ReturnParameter" this.Name + override this.IsDefined(_attributeType, _inherited) = notRequired this "IsDefined" this.Name + override this.ReturnTypeCustomAttributes = notRequired this "ReturnTypeCustomAttributes" this.Name + override this.GetBaseDefinition() = notRequired this "GetBaseDefinition" this.Name + override this.GetMethodImplementationFlags() = notRequired this "GetMethodImplementationFlags" this.Name + override this.Invoke(_obj, _invokeAttr, _binder, _parameters, _culture) = notRequired this "Invoke" this.Name + override this.ReflectedType = notRequired this "ReflectedType" this.Name + override __.GetCustomAttributes(_inherited) = emptyAttributes + override __.GetCustomAttributes(_attributeType, _inherited) = emptyAttributes + + override __.ToString() = gmd.ToString() + "@inst" + + + /// Represents a constructor in an instantiated type + type ConstructorSymbol (declTy: Type, inp: ConstructorInfo) = + inherit ConstructorInfo() + let gps = ((if declTy.IsGenericType then declTy.GetGenericArguments() else [| |]), [| |]) + + override __.Name = ".ctor" + override __.Attributes = inp.Attributes + override __.MemberType = MemberTypes.Constructor + override __.DeclaringType = declTy + + override __.GetParameters() = inp.GetParameters() |> Array.map (instParameterInfo gps) + override __.GetCustomAttributesData() = inp.GetCustomAttributesData() + override __.MetadataToken = inp.MetadataToken + + override __.GetHashCode() = inp.GetHashCode() + override this.Equals(that:obj) = + match that with + | :? ConstructorInfo as that -> this.MetadataToken = that.MetadataToken && eqTypes declTy that.DeclaringType + | _ -> false + + override this.IsDefined(_attributeType, _inherited) = notRequired this "IsDefined" this.Name + override this.Invoke(_invokeAttr, _binder, _parameters, _culture) = notRequired this "Invoke" this.Name + override this.Invoke(_obj, _invokeAttr, _binder, _parameters, _culture) = notRequired this "Invoke" this.Name + override this.ReflectedType = notRequired this "ReflectedType" this.Name + override this.GetMethodImplementationFlags() = notRequired this "GetMethodImplementationFlags" this.Name + override this.MethodHandle = notRequired this "MethodHandle" this.Name + override this.GetCustomAttributes(_inherited) = notRequired this "GetCustomAttributes" this.Name + override this.GetCustomAttributes(_attributeType, _inherited) = notRequired this "GetCustomAttributes" this.Name + + override __.ToString() = sprintf "tgt constructor(...) in type %s" declTy.FullName + static member Make (declTy: Type) md = ConstructorSymbol (declTy, md) :> ConstructorInfo + + /// Represents a method in an instantiated type + type MethodSymbol (declTy: Type, inp: MethodInfo) = + inherit MethodInfo() + let gps1 = (if declTy.IsGenericType then declTy.GetGenericArguments() else [| |]) + let gps2 = inp.GetGenericArguments() + let gps = (gps1, gps2) + + override __.Name = inp.Name + override __.DeclaringType = declTy + override __.MemberType = inp.MemberType + override __.Attributes = inp.Attributes + override __.GetParameters() = inp.GetParameters() |> Array.map (instParameterInfo gps) + override __.CallingConvention = inp.CallingConvention + override __.ReturnType = inp.ReturnType |> instType gps + override __.GetCustomAttributesData() = inp.GetCustomAttributesData() + override __.GetGenericArguments() = gps2 + override __.IsGenericMethod = (gps2.Length <> 0) + override __.IsGenericMethodDefinition = __.IsGenericMethod + + override __.GetHashCode() = inp.GetHashCode() + override this.Equals(that:obj) = + match that with + | :? MethodInfo as that -> this.MetadataToken = that.MetadataToken && eqTypes this.DeclaringType that.DeclaringType + | _ -> false + + override this.MakeGenericMethod(args) = MethodSymbol2(this, args) :> MethodInfo + + override __.MetadataToken = inp.MetadataToken + + override this.MethodHandle = notRequired this "MethodHandle" this.Name + override this.ReturnParameter = notRequired this "ReturnParameter" this.Name + override this.IsDefined(_attributeType, _inherited) = notRequired this "IsDefined" this.Name + override this.ReturnTypeCustomAttributes = notRequired this "ReturnTypeCustomAttributes" this.Name + override this.GetBaseDefinition() = notRequired this "GetBaseDefinition" this.Name + override this.GetMethodImplementationFlags() = notRequired this "GetMethodImplementationFlags" this.Name + override this.Invoke(_obj, _invokeAttr, _binder, _parameters, _culture) = notRequired this "Invoke" this.Name + override this.ReflectedType = notRequired this "ReflectedType" this.Name + override this.GetCustomAttributes(_inherited) = notRequired this "GetCustomAttributes" this.Name + override this.GetCustomAttributes(_attributeType, _inherited) = notRequired this "GetCustomAttributes" this.Name + + override __.ToString() = sprintf "tgt method %s(...) in type %s" inp.Name declTy.FullName + + static member Make (declTy: Type) md = MethodSymbol (declTy, md) :> MethodInfo + + /// Represents a property in an instantiated type + type PropertySymbol (declTy: Type, inp: PropertyInfo) = + inherit PropertyInfo() + let gps = ((if declTy.IsGenericType then declTy.GetGenericArguments() else [| |]), [| |]) + + override __.Name = inp.Name + override __.Attributes = inp.Attributes + override __.MemberType = MemberTypes.Property + override __.DeclaringType = declTy + + override __.PropertyType = inp.PropertyType |> instType gps + override __.GetGetMethod(nonPublic) = inp.GetGetMethod(nonPublic) |> Option.ofObj |> Option.map (MethodSymbol.Make declTy) |> Option.toObj + override __.GetSetMethod(nonPublic) = inp.GetSetMethod(nonPublic) |> Option.ofObj |> Option.map (MethodSymbol.Make declTy) |> Option.toObj + override __.GetIndexParameters() = inp.GetIndexParameters() |> Array.map (instParameterInfo gps) + override __.CanRead = inp.GetGetMethod(false) |> isNull |> not + override __.CanWrite = inp.GetSetMethod(false) |> isNull |> not + override __.GetCustomAttributesData() = inp.GetCustomAttributesData() + override __.MetadataToken = inp.MetadataToken + + override __.GetHashCode() = inp.GetHashCode() + override this.Equals(that:obj) = + match that with + | :? PropertyInfo as that -> this.MetadataToken = that.MetadataToken && eqTypes this.DeclaringType that.DeclaringType + | _ -> false + + override this.GetValue(_obj, _invokeAttr, _binder, _index, _culture) = notRequired this "GetValue" this.Name + override this.SetValue(_obj, _value, _invokeAttr, _binder, _index, _culture) = notRequired this "SetValue" this.Name + override this.GetAccessors(_nonPublic) = notRequired this "GetAccessors" this.Name + override this.ReflectedType = notRequired this "ReflectedType" this.Name + override this.GetCustomAttributes(_inherited) = notRequired this "GetCustomAttributes" this.Name + override this.GetCustomAttributes(_attributeType, _inherited) = notRequired this "GetCustomAttributes" this.Name + override this.IsDefined(_attributeType, _inherited) = notRequired this "IsDefined" this.Name + + override __.ToString() = sprintf "tgt property %s(...) in type %s" inp.Name declTy.Name + + static member Make (declTy: Type) md = PropertySymbol (declTy, md) :> PropertyInfo + + /// Represents an event in an instantiated type + type EventSymbol (declTy: Type, inp: EventInfo) = + inherit EventInfo() + let gps = if declTy.IsGenericType then declTy.GetGenericArguments() else [| |] + + override __.Name = inp.Name + override __.Attributes = inp.Attributes + override __.MemberType = MemberTypes.Event + override __.DeclaringType = declTy + + override __.EventHandlerType = inp.EventHandlerType |> instType (gps, [| |]) + override __.GetAddMethod(nonPublic) = inp.GetAddMethod(nonPublic) |> Option.ofObj |> Option.map (MethodSymbol.Make declTy) |> Option.toObj + override __.GetRemoveMethod(nonPublic) = inp.GetRemoveMethod(nonPublic) |> Option.ofObj |> Option.map (MethodSymbol.Make declTy) |> Option.toObj + override __.GetCustomAttributesData() = inp.GetCustomAttributesData() + override __.MetadataToken = inp.MetadataToken + + override __.GetHashCode() = inp.GetHashCode() + override this.Equals(that:obj) = + match that with + | :? EventInfo as that -> this.MetadataToken = that.MetadataToken && eqTypes this.DeclaringType that.DeclaringType + | _ -> false + + override this.GetRaiseMethod(_nonPublic) = notRequired this "GetRaiseMethod" this.Name + override this.ReflectedType = notRequired this "ReflectedType" this.Name + override this.GetCustomAttributes(_inherited) = notRequired this "GetCustomAttributes" this.Name + override this.GetCustomAttributes(_attributeType, _inherited) = notRequired this "GetCustomAttributes" this.Name + override this.IsDefined(_attributeType, _inherited) = notRequired this "IsDefined" this.Name + + override __.ToString() = sprintf "tgt event %s(...) in type %s" inp.Name declTy.FullName + + static member Make (declTy: Type) md = EventSymbol (declTy, md) :> EventInfo + + /// Represents a field in an instantiated type + type FieldSymbol (declTy: Type, inp: FieldInfo) = + inherit FieldInfo() + let gps = if declTy.IsGenericType then declTy.GetGenericArguments() else [| |] + + override __.Name = inp.Name + override __.Attributes = inp.Attributes + override __.MemberType = MemberTypes.Field + override __.DeclaringType = declTy + + override __.FieldType = inp.FieldType |> instType (gps, [| |]) + override __.GetRawConstantValue() = inp.GetRawConstantValue() + override __.GetCustomAttributesData() = inp.GetCustomAttributesData() + override __.MetadataToken = inp.MetadataToken + + override __.GetHashCode() = inp.GetHashCode() + override this.Equals(that:obj) = + match that with + | :? FieldInfo as that -> this.MetadataToken = that.MetadataToken && eqTypes this.DeclaringType that.DeclaringType + | _ -> false + + override this.ReflectedType = notRequired this "ReflectedType" this.Name + override this.GetCustomAttributes(_inherited) = notRequired this "GetCustomAttributes" this.Name + override this.GetCustomAttributes(_attributeType, _inherited) = notRequired this "GetCustomAttributes" this.Name + override this.IsDefined(_attributeType, _inherited) = notRequired this "IsDefined" this.Name + override this.SetValue(_obj, _value, _invokeAttr, _binder, _culture) = notRequired this "SetValue" this.Name + override this.GetValue(_obj) = notRequired this "GetValue" this.Name + override this.FieldHandle = notRequired this "FieldHandle" this.Name + + override __.ToString() = sprintf "tgt literal field %s(...) in type %s" inp.Name declTy.FullName + + static member Make (declTy: Type) md = FieldSymbol (declTy, md) :> FieldInfo + + /// Represents the type constructor in a provided symbol type. + [] + type TypeSymbolKind = + | SDArray + | Array of int + | Pointer + | ByRef + | TargetGeneric of TargetTypeDefinition + | OtherGeneric of Type + + + /// Represents an array or other symbolic type involving a provided type as the argument. + /// See the type provider spec for the methods that must be implemented. + /// Note that the type provider specification does not require us to implement pointer-equality for provided types. + and TypeSymbol(kind: TypeSymbolKind, typeArgs: Type[]) as this = + inherit TypeDelegator() + do this.typeImpl <- this + + override this.FullName = + if this.IsArray then this.GetElementType().FullName + "[]" + elif this.IsPointer then this.GetElementType().FullName + "*" + elif this.IsByRef then this.GetElementType().FullName + "&" + elif this.IsGenericType then this.GetGenericTypeDefinition().FullName + "[" + (this.GetGenericArguments() |> Array.map (fun arg -> arg.FullName) |> String.concat ",") + "]" + else failwithf "unreachable, stack trace = %A" Environment.StackTrace + + override this.DeclaringType = + if this.IsArray || this.IsPointer || this.IsByRef then this.GetElementType().DeclaringType + elif this.IsGenericType then this.GetGenericTypeDefinition().DeclaringType + else failwithf "unreachable, stack trace = %A" Environment.StackTrace + + override this.Name = + if this.IsArray then this.GetElementType().Name + "[]" + elif this.IsPointer then this.GetElementType().Name + "*" + elif this.IsByRef then this.GetElementType().Name + "&" + elif this.IsGenericType then this.GetGenericTypeDefinition().Name + else failwithf "unreachable, stack trace = %A" Environment.StackTrace + + override this.BaseType = + if this.IsArray then typeof + elif this.IsPointer then typeof + elif this.IsByRef then typeof + elif this.IsGenericType then instType (this.GetGenericArguments(), [| |]) (this.GetGenericTypeDefinition().BaseType) + else failwithf "unreachable, stack trace = %A" Environment.StackTrace + + override this.MetadataToken = + if this.IsArray then typeof.MetadataToken + elif this.IsPointer then typeof.MetadataToken + elif this.IsByRef then typeof.MetadataToken + elif this.IsGenericType then this.GetGenericTypeDefinition().MetadataToken + else failwithf "unreachable, stack trace = %A" Environment.StackTrace + + override this.Assembly = + if this.IsArray || this.IsPointer || this.IsByRef then this.GetElementType().Assembly + elif this.IsGenericType then this.GetGenericTypeDefinition().Assembly + else failwithf "unreachable, stack trace = %A" Environment.StackTrace + + override this.Namespace = + if this.IsArray || this.IsPointer || this.IsByRef then this.GetElementType().Namespace + elif this.IsGenericType then this.GetGenericTypeDefinition().Namespace + else failwithf "unreachable, stack trace = %A" Environment.StackTrace + + override __.GetArrayRank() = (match kind with TypeSymbolKind.Array n -> n | TypeSymbolKind.SDArray -> 1 | _ -> failwithf "non-array type") + override __.IsValueTypeImpl() = this.IsGenericType && this.GetGenericTypeDefinition().IsValueType + override __.IsArrayImpl() = (match kind with TypeSymbolKind.Array _ | TypeSymbolKind.SDArray -> true | _ -> false) + override __.IsByRefImpl() = (match kind with TypeSymbolKind.ByRef _ -> true | _ -> false) + override __.IsPointerImpl() = (match kind with TypeSymbolKind.Pointer _ -> true | _ -> false) + override __.IsPrimitiveImpl() = false + override __.IsGenericType = (match kind with TypeSymbolKind.TargetGeneric _ | TypeSymbolKind.OtherGeneric _ -> true | _ -> false) + override __.GetGenericArguments() = (match kind with TypeSymbolKind.TargetGeneric _ | TypeSymbolKind.OtherGeneric _ -> typeArgs | _ -> [| |]) + override __.GetGenericTypeDefinition() = (match kind with TypeSymbolKind.TargetGeneric e -> (e :> Type) | TypeSymbolKind.OtherGeneric gtd -> gtd | _ -> failwithf "non-generic type") + override __.IsCOMObjectImpl() = false + override __.HasElementTypeImpl() = (match kind with TypeSymbolKind.TargetGeneric _ | TypeSymbolKind.OtherGeneric _ -> false | _ -> true) + override __.GetElementType() = (match kind,typeArgs with (TypeSymbolKind.Array _ | TypeSymbolKind.SDArray | TypeSymbolKind.ByRef | TypeSymbolKind.Pointer),[| e |] -> e | _ -> failwithf "%A, %A: not an array, pointer or byref type" kind typeArgs) + + override x.Module = x.Assembly.ManifestModule + + override this.GetHashCode() = + if this.IsArray then 10 + hash (this.GetElementType()) + elif this.IsPointer then 163 + hash (this.GetElementType()) + elif this.IsByRef then 283 + hash (this.GetElementType()) + else this.GetGenericTypeDefinition().MetadataToken + + override this.Equals(other: obj) = eqTypeObj this other + + override this.Equals(otherTy: Type) = eqTypes this otherTy + + override this.IsAssignableFrom(otherTy: Type) = isAssignableFrom this otherTy + + override this.IsSubclassOf(otherTy: Type) = isSubclassOf this otherTy + + member __.Kind = kind + member __.Args = typeArgs + + override this.GetConstructors bindingFlags = + match kind with + | TypeSymbolKind.TargetGeneric gtd -> + gtd.Metadata.Methods.Entries + |> Array.filter (fun md -> md.Name = ".ctor" || md.Name = ".cctor") + |> Array.map (gtd.MakeConstructorInfo this) + |> Array.filter (canBindConstructor bindingFlags) + | TypeSymbolKind.OtherGeneric gtd -> + gtd.GetConstructors(bindingFlags) + |> Array.map (ConstructorSymbol.Make this) + | _ -> notRequired this "GetConstructors" this.Name + + override this.GetMethods bindingFlags = + match kind with + | TypeSymbolKind.TargetGeneric gtd -> + gtd.Metadata.Methods.Entries + |> Array.filter (fun md -> md.Name <> ".ctor" && md.Name <> ".cctor") + |> Array.map (gtd.MakeMethodInfo this) + |> Array.filter (canBindMethod bindingFlags) + | TypeSymbolKind.OtherGeneric gtd -> + gtd.GetMethods(bindingFlags) + |> Array.map (MethodSymbol.Make this) + | _ -> notRequired this "GetMethods" this.Name + + override this.GetFields bindingFlags = + match kind with + | TypeSymbolKind.TargetGeneric gtd -> + gtd.Metadata.Fields.Entries + |> Array.map (gtd.MakeFieldInfo this) + |> Array.filter (canBindField bindingFlags) + | TypeSymbolKind.OtherGeneric gtd -> + gtd.GetFields(bindingFlags) + |> Array.map (FieldSymbol.Make this) + | _ -> notRequired this "GetFields" this.Name + + override this.GetProperties bindingFlags = + match kind with + | TypeSymbolKind.TargetGeneric gtd -> + gtd.Metadata.Properties.Entries + |> Array.map (gtd.MakePropertyInfo this) + |> Array.filter (canBindProperty bindingFlags) + | TypeSymbolKind.OtherGeneric gtd -> + gtd.GetProperties(bindingFlags) + |> Array.map (PropertySymbol.Make this) + | _ -> notRequired this "GetProperties" this.Name + + override this.GetEvents bindingFlags = + match kind with + | TypeSymbolKind.TargetGeneric gtd -> + gtd.Metadata.Events.Entries + |> Array.map (gtd.MakeEventInfo this) + |> Array.filter (canBindEvent bindingFlags) + | TypeSymbolKind.OtherGeneric gtd -> + gtd.GetEvents(bindingFlags) + |> Array.map (EventSymbol.Make this) + | _ -> notRequired this "GetEvents" this.Name + + override this.GetNestedTypes bindingFlags = + match kind with + | TypeSymbolKind.TargetGeneric gtd -> + gtd.Metadata.NestedTypes.Entries + |> Array.map (gtd.MakeNestedTypeInfo this) + |> Array.filter (canBindNestedType bindingFlags) + | TypeSymbolKind.OtherGeneric gtd -> + gtd.GetNestedTypes(bindingFlags) + | _ -> notRequired this "GetNestedTypes" this.Name + + override this.GetConstructorImpl(bindingFlags, _binderBinder, _callConvention, types, _modifiers) = + let ctors = this.GetConstructors(bindingFlags) |> Array.filter (fun c -> match types with null -> true | t -> c.GetParameters().Length = t.Length) + match ctors with + | [| |] -> null + | [| ci |] -> ci + | _ -> failwithf "multiple constructors exist" + + override this.GetMethodImpl(name, bindingFlags, _binderBinder, _callConvention, types, _modifiers) = + match kind with + | TypeSymbolKind.TargetGeneric gtd -> + let md = + match types with + | null -> gtd.Metadata.Methods.TryFindUniqueByName(name) + | _ -> + let mds = gtd.Metadata.Methods.FindByNameAndArity(name, types.Length) + match mds |> Array.filter (fun md -> eqTypesAndILTypesWithInst typeArgs types md.ParameterTypes) with + | [| |] -> None + | [| md |] -> Some md + | _ -> failwithf "multiple methods exist with name %s" name + md |> Option.map (gtd.MakeMethodInfo this) |> Option.toObj + | TypeSymbolKind.OtherGeneric _ -> + match this.GetMethods(bindingFlags) |> Array.filter (fun c -> name = c.Name && match types with null -> true | t -> c.GetParameters().Length = t.Length) with + | [| |] -> null + | [| mi |] -> mi + | _ -> failwithf "multiple methods exist with name %s" name + | _ -> notRequired this "GetMethodImpl" this.Name + + override this.GetField(name, bindingFlags) = + match kind with + | TypeSymbolKind.TargetGeneric gtd -> + gtd.Metadata.Fields.Entries |> Array.tryFind (fun md -> md.Name = name) + |> Option.map (gtd.MakeFieldInfo this) + |> Option.toObj + | TypeSymbolKind.OtherGeneric gtd -> + gtd.GetFields(bindingFlags) + |> Array.tryFind (fun md -> md.Name = name) + |> Option.map (FieldSymbol.Make this) + |> Option.toObj + + | _ -> notRequired this "GetField" this.Name + + override this.GetPropertyImpl(name, bindingFlags, _binder, _returnType, _types, _modifiers) = + match kind with + | TypeSymbolKind.TargetGeneric gtd -> + gtd.Metadata.Properties.Entries + |> Array.tryFind (fun md -> md.Name = name) + |> Option.map (gtd.MakePropertyInfo this) + |> Option.toObj + | TypeSymbolKind.OtherGeneric gtd -> + gtd.GetProperties(bindingFlags) + |> Array.tryFind (fun md -> md.Name = name) + |> Option.map (PropertySymbol.Make this) + |> Option.toObj + + | _ -> notRequired this "GetPropertyImpl" this.Name + + override this.GetEvent(name, bindingFlags) = + match kind with + | TypeSymbolKind.TargetGeneric gtd -> + gtd.Metadata.Events.Entries + |> Array.tryFind (fun md -> md.Name = name) + |> Option.map (gtd.MakeEventInfo this) + |> Option.toObj + | TypeSymbolKind.OtherGeneric gtd -> + gtd.GetEvents(bindingFlags) + |> Array.tryFind (fun md -> md.Name = name) + |> Option.map (EventSymbol.Make this) + |> Option.toObj + | _ -> notRequired this "GetEvent" this.Name + + override this.GetNestedType(_name, _bindingFlags) = notRequired this "GetNestedType" this.Name + + override this.AssemblyQualifiedName = "[" + this.Assembly.FullName + "]" + this.FullName + + override this.GetAttributeFlagsImpl() = getAttributeFlagsImpl this + + override this.UnderlyingSystemType = (this :> Type) + + override __.GetCustomAttributesData() = ([| |] :> IList<_>) + + override this.GetMembers _bindingFlags = notRequired this "GetMembers" this.Name + override this.GetInterface(_name, _ignoreCase) = notRequired this "GetInterface" this.Name + override this.GetInterfaces() = notRequired this "GetInterfaces" this.Name + override __.GetCustomAttributes(_inherit) = emptyAttributes + override __.GetCustomAttributes(_attributeType, _inherit) = emptyAttributes + override __.IsDefined(_attributeType, _inherit) = false + + override this.MemberType = notRequired this "MemberType" this.Name + override this.GetMember(_name,_mt,_bindingFlags) = notRequired this "GetMember" this.Name + override this.GUID = notRequired this "GUID" this.Name + override this.InvokeMember(_name, _invokeAttr, _binder, _target, _args, _modifiers, _culture, _namedParameters) = notRequired this "InvokeMember" this.Name + override this.MakeArrayType() = TypeSymbol(TypeSymbolKind.SDArray, [| this |]) :> Type + override this.MakeArrayType arg = TypeSymbol(TypeSymbolKind.Array arg, [| this |]) :> Type + override this.MakePointerType() = TypeSymbol(TypeSymbolKind.Pointer, [| this |]) :> Type + override this.MakeByRefType() = TypeSymbol(TypeSymbolKind.ByRef, [| this |]) :> Type + + override this.GetEvents() = this.GetEvents(BindingFlags.Public ||| BindingFlags.Instance ||| BindingFlags.Static) // Needed because TypeDelegator.cs provides a delegting implementation of this, and we are self-delegating + override this.ToString() = this.FullName + + + /// Clones namespaces, type providers, types and members provided by tp, renaming namespace nsp1 into namespace nsp2. + + /// Makes a type definition read from a binary available as a System.Type. Not all methods are implemented. + and TargetTypeDefinition(ilGlobals: ILGlobals, tryBindAssembly: ILAssemblyRef -> Choice, asm: TargetAssembly, declTyOpt: Type option, inp: ILTypeDef) as this = + inherit TypeDelegator() + + // Note: For F# type providers we never need to view the custom attributes + let rec txCustomAttributesArg ((ty:ILType,v:obj)) = + CustomAttributeTypedArgument(txILType ([| |], [| |]) ty, v) + + and txCustomAttributesDatum (inp: ILCustomAttribute) = + let args, namedArgs = decodeILCustomAttribData ilGlobals inp + { new CustomAttributeData () with + member __.Constructor = txILConstructorRef inp.Method.MethodRef + member __.ConstructorArguments = [| for arg in args -> txCustomAttributesArg arg |] :> IList<_> + // Note, named arguments of custom attributes are not required by F# compiler on binding context elements. + member __.NamedArguments = [| |] :> IList<_> + } + + and txCustomAttributesData (inp: ILCustomAttrs) = + [| for a in inp.Entries do + yield txCustomAttributesDatum a |] + :> IList + + /// Makes a parameter definition read from a binary available as a ParameterInfo. Not all methods are implemented. + and txILParameter gps (inp: ILParameter) = + { new ParameterInfo() with + + override __.Name = StructOption.toObj inp.Name + override __.ParameterType = inp.ParameterType |> txILType gps + override __.RawDefaultValue = (match inp.Default with UNone -> null | USome v -> v) + override __.Attributes = inp.Attributes + override __.GetCustomAttributesData() = inp.CustomAttrs |> txCustomAttributesData + + override x.ToString() = sprintf "tgt parameter %s" x.Name } + + /// Makes a method definition read from a binary available as a ConstructorInfo. Not all methods are implemented. + and txILConstructorDef (declTy: Type) (inp: ILMethodDef) = + let gps = if declTy.IsGenericType then declTy.GetGenericArguments() else [| |] + { new ConstructorInfo() with + + override __.Name = ".ctor" + override __.Attributes = inp.Attributes + override __.MemberType = MemberTypes.Constructor + override __.DeclaringType = declTy + + override __.GetParameters() = inp.Parameters |> Array.map (txILParameter (gps, [| |])) + override __.GetCustomAttributesData() = inp.CustomAttrs |> txCustomAttributesData + override __.MetadataToken = inp.Token + + override __.GetHashCode() = inp.Token + + override this.Equals(that:obj) = + match that with + | :? ConstructorInfo as that -> this.MetadataToken = that.MetadataToken && eqTypes declTy that.DeclaringType + | _ -> false + + override this.IsDefined(_attributeType, _inherited) = notRequired this "IsDefined" this.Name + override this.Invoke(_invokeAttr, _binder, _parameters, _culture) = notRequired this "Invoke" this.Name + override this.Invoke(_obj, _invokeAttr, _binder, _parameters, _culture) = notRequired this "Invoke" this.Name + override this.ReflectedType = notRequired this "ReflectedType" this.Name + override this.GetMethodImplementationFlags() = notRequired this "GetMethodImplementationFlags" this.Name + override this.MethodHandle = notRequired this "MethodHandle" this.Name + override this.GetCustomAttributes(_inherited) = notRequired this "GetCustomAttributes" this.Name + override this.GetCustomAttributes(_attributeType, _inherited) = notRequired this "GetCustomAttributes" this.Name + + override __.ToString() = sprintf "tgt constructor(...) in type %s" declTy.FullName } + + /// Makes a method definition read from a binary available as a MethodInfo. Not all methods are implemented. + and txILMethodDef (declTy: Type) (inp: ILMethodDef) = + let gps = if declTy.IsGenericType then declTy.GetGenericArguments() else [| |] + let rec gps2 = inp.GenericParams |> Array.mapi (fun i gp -> txILGenericParam (fun () -> gps, gps2) (i + gps.Length) gp) + { new MethodInfo() with + + override __.Name = inp.Name + override __.DeclaringType = declTy + override __.MemberType = MemberTypes.Method + override __.Attributes = inp.Attributes + override __.GetParameters() = inp.Parameters |> Array.map (txILParameter (gps, gps2)) + override __.CallingConvention = if inp.IsStatic then CallingConventions.Standard else CallingConventions.HasThis ||| CallingConventions.Standard + override __.ReturnType = inp.Return.Type |> txILType (gps, gps2) + override __.GetCustomAttributesData() = inp.CustomAttrs |> txCustomAttributesData + override __.GetGenericArguments() = gps2 + override __.IsGenericMethod = (gps2.Length <> 0) + override __.IsGenericMethodDefinition = __.IsGenericMethod + + override __.GetHashCode() = inp.Token + + override this.Equals(that:obj) = + match that with + | :? MethodInfo as that -> this.MetadataToken = that.MetadataToken && eqTypes this.DeclaringType that.DeclaringType + | _ -> false + + override this.MakeGenericMethod(args) = MethodSymbol2(this, args) :> MethodInfo + + override __.MetadataToken = inp.Token + + // unused + override this.MethodHandle = notRequired this "MethodHandle" this.Name + override this.ReturnParameter = notRequired this "ReturnParameter" this.Name + override this.IsDefined(_attributeType, _inherited) = notRequired this "IsDefined" this.Name + override this.ReturnTypeCustomAttributes = notRequired this "ReturnTypeCustomAttributes" this.Name + override this.GetBaseDefinition() = notRequired this "GetBaseDefinition" this.Name + override this.GetMethodImplementationFlags() = notRequired this "GetMethodImplementationFlags" this.Name + override this.Invoke(_obj, _invokeAttr, _binder, _parameters, _culture) = notRequired this "Invoke" this.Name + override this.ReflectedType = notRequired this "ReflectedType" this.Name + override this.GetCustomAttributes(_inherited) = notRequired this "GetCustomAttributes" this.Name + override this.GetCustomAttributes(_attributeType, _inherited) = notRequired this "GetCustomAttributes" this.Name + + override __.ToString() = sprintf "tgt method %s(...) in type %s" inp.Name declTy.FullName } + + /// Makes a property definition read from a binary available as a PropertyInfo. Not all methods are implemented. + and txILPropertyDef (declTy: Type) (inp: ILPropertyDef) = + let gps = if declTy.IsGenericType then declTy.GetGenericArguments() else [| |] + { new PropertyInfo() with + + override __.Name = inp.Name + override __.Attributes = inp.Attributes + override __.MemberType = MemberTypes.Property + override __.DeclaringType = declTy + + override __.PropertyType = inp.PropertyType |> txILType (gps, [| |]) + override __.GetGetMethod(_nonPublic) = inp.GetMethod |> Option.map (txILMethodRef declTy) |> Option.toObj + override __.GetSetMethod(_nonPublic) = inp.SetMethod |> Option.map (txILMethodRef declTy) |> Option.toObj + override __.GetIndexParameters() = inp.IndexParameters |> Array.map (txILParameter (gps, [| |])) + override __.CanRead = inp.GetMethod.IsSome + override __.CanWrite = inp.SetMethod.IsSome + override __.GetCustomAttributesData() = inp.CustomAttrs |> txCustomAttributesData + override __.MetadataToken = inp.Token + + override __.GetHashCode() = inp.Token + + override this.Equals(that:obj) = + match that with + | :? PropertyInfo as that -> this.MetadataToken = that.MetadataToken && eqTypes this.DeclaringType that.DeclaringType + | _ -> false + + override this.GetValue(_obj, _invokeAttr, _binder, _index, _culture) = notRequired this "GetValue" this.Name + override this.SetValue(_obj, _value, _invokeAttr, _binder, _index, _culture) = notRequired this "SetValue" this.Name + override this.GetAccessors(nonPublic) = notRequired this "GetAccessors" this.Name + override this.ReflectedType = notRequired this "ReflectedType" this.Name + override this.GetCustomAttributes(_inherited) = notRequired this "GetCustomAttributes" this.Name + override this.GetCustomAttributes(_attributeType, _inherited) = notRequired this "GetCustomAttributes" this.Name + override this.IsDefined(_attributeType, _inherited) = notRequired this "IsDefined" this.Name + + override __.ToString() = sprintf "tgt property %s(...) in type %s" inp.Name declTy.Name } + + /// Make an event definition read from a binary available as an EventInfo. Not all methods are implemented. + and txILEventDef (declTy: Type) (inp: ILEventDef) = + let gps = if declTy.IsGenericType then declTy.GetGenericArguments() else [| |] + { new EventInfo() with + + override __.Name = inp.Name + override __.Attributes = inp.Attributes + override __.MemberType = MemberTypes.Event + override __.DeclaringType = declTy + + override __.EventHandlerType = inp.EventHandlerType |> txILType (gps, [| |]) + override __.GetAddMethod(_nonPublic) = inp.AddMethod |> txILMethodRef declTy + override __.GetRemoveMethod(_nonPublic) = inp.RemoveMethod |> txILMethodRef declTy + override __.GetCustomAttributesData() = inp.CustomAttrs |> txCustomAttributesData + override __.MetadataToken = inp.Token + + override __.GetHashCode() = inp.Token + + override this.Equals(that:obj) = + match that with + | :? EventInfo as that -> this.MetadataToken = that.MetadataToken && eqTypes this.DeclaringType that.DeclaringType + | _ -> false + + override this.GetRaiseMethod(_nonPublic) = notRequired this "GetRaiseMethod" this.Name + override this.ReflectedType = notRequired this "ReflectedType" this.Name + override this.GetCustomAttributes(_inherited) = notRequired this "GetCustomAttributes" this.Name + override this.GetCustomAttributes(_attributeType, _inherited) = notRequired this "GetCustomAttributes" this.Name + override this.IsDefined(_attributeType, _inherited) = notRequired this "IsDefined" this.Name + + override __.ToString() = sprintf "tgt event %s(...) in type %s" inp.Name declTy.FullName } + + /// Makes a field definition read from a binary available as a FieldInfo. Not all methods are implemented. + and txILFieldDef (declTy: Type) (inp: ILFieldDef) = + let gps = if declTy.IsGenericType then declTy.GetGenericArguments() else [| |] + { new FieldInfo() with + + override __.Name = inp.Name + override __.Attributes = inp.Attributes + override __.MemberType = MemberTypes.Field + override __.DeclaringType = declTy + + override __.FieldType = inp.FieldType |> txILType (gps, [| |]) + override __.GetRawConstantValue() = match inp.LiteralValue with None -> null | Some v -> v + override __.GetCustomAttributesData() = inp.CustomAttrs |> txCustomAttributesData + override __.MetadataToken = inp.Token + + override __.GetHashCode() = inp.Token + + override this.Equals(that:obj) = + match that with + | :? FieldInfo as that -> this.MetadataToken = that.MetadataToken && eqTypes this.DeclaringType that.DeclaringType + | _ -> false + + override this.ReflectedType = notRequired this "ReflectedType" this.Name + override this.GetCustomAttributes(_inherited) = notRequired this "GetCustomAttributes" this.Name + override this.GetCustomAttributes(_attributeType, _inherited) = notRequired this "GetCustomAttributes" this.Name + override this.IsDefined(_attributeType, _inherited) = notRequired this "IsDefined" this.Name + override this.SetValue(_obj, _value, _invokeAttr, _binder, _culture) = notRequired this "SetValue" this.Name + override this.GetValue(_obj) = notRequired this "GetValue" this.Name + override this.FieldHandle = notRequired this "FieldHandle" this.Name + + override __.ToString() = sprintf "tgt literal field %s(...) in type %s" inp.Name declTy.FullName } + + /// Bind a reference to an assembly + and txScopeRef(sref: ILScopeRef) = + match sref with + | ILScopeRef.Assembly aref -> match tryBindAssembly aref with Choice1Of2 asm -> asm | Choice2Of2 exn -> raise exn + | ILScopeRef.Local -> (asm :> Assembly) + | ILScopeRef.Module _ -> (asm :> Assembly) + + /// Bind a reference to a type + and txILTypeRef(tref: ILTypeRef): Type = + match tref.Scope with + | ILTypeRefScope.Top scoref -> txScopeRef(scoref).GetType(joinILTypeName tref.Namespace tref.Name) + | ILTypeRefScope.Nested encl -> txILTypeRef(encl).GetNestedType(tref.Name,bindAll) + + /// Bind a reference to a constructor + and txILConstructorRef (mref: ILMethodRef) = + let declTy = txILTypeRef(mref.EnclosingTypeRef) + let gps = if declTy.IsGenericType then declTy.GetGenericArguments() else [| |] + let argTypes = Array.map (txILType (gps, [| |])) mref.ArgTypes + let cons = declTy.GetConstructor(bindAll, null, argTypes, null) + if isNull cons then failwithf "constructor reference '%A' not resolved" mref + cons + + /// Bind a reference to a method + and txILMethodRef (declTy: Type) (mref: ILMethodRef) = + let gps = if declTy.IsGenericType then declTy.GetGenericArguments() else [| |] + let argTypes = mref.ArgTypes |> Array.map (txILType (gps, [| |])) + let meth = declTy.GetMethod(mref.Name, bindAll, null, argTypes, null) + if isNull meth then failwithf "method reference '%A' not resolved" mref + meth + + /// Convert an ILType read from a binary to a System.Type backed by TargetTypeDefinitions + and txILType gps (ty: ILType) = + + match ty with + | ILType.Void -> typeof + | ILType.Value tspec + | ILType.Boxed tspec -> + let tdefR = txILTypeRef tspec.TypeRef + match tspec.GenericArgs with + | [| |] -> tdefR + | args -> tdefR.MakeGenericType(Array.map (txILType gps) args) + | ILType.Array(rank, arg) -> + let argR = txILType gps arg + if rank.Rank = 1 then argR.MakeArrayType() + else argR.MakeArrayType(rank.Rank) + | ILType.FunctionPointer _ -> failwith "unexpected function type" + | ILType.Ptr(arg) -> (txILType gps arg).MakePointerType() + | ILType.Byref(arg) -> (txILType gps arg).MakeByRefType() + | ILType.Modified(_,_mod,arg) -> txILType gps arg + | ILType.Var(n) -> + let (gps1:Type[]),(gps2:Type[]) = gps + if n < gps1.Length then gps1.[n] + elif n < gps1.Length + gps2.Length then gps2.[n - gps1.Length] + else failwithf "generic parameter index out of range: %d" n + + /// Convert an ILGenericParameterDef read from a binary to a System.Type. + and txILGenericParam gpsf pos (inp: ILGenericParameterDef) = + { new Type() with + override __.Name = inp.Name + override __.Assembly = (asm :> Assembly) + override __.FullName = inp.Name + override __.IsGenericParameter = true + override __.GenericParameterPosition = pos + override __.GetGenericParameterConstraints() = inp.Constraints |> Array.map (txILType (gpsf())) + + override __.MemberType = enum 0 + override __.MetadataToken = inp.Token + + override __.Namespace = null //notRequired this "Namespace" + override this.DeclaringType = notRequired this "DeclaringType" this.Name + override __.BaseType = null //notRequired this "BaseType" this.Name + override this.GetInterfaces() = notRequired this "GetInterfaces" this.Name + + override this.GetConstructors(_bindingFlags) = notRequired this "GetConstructors" this.Name + override this.GetMethods(_bindingFlags) = notRequired this "GetMethods" this.Name + override this.GetFields(_bindingFlags) = notRequired this "GetFields" this.Name + override this.GetProperties(_bindingFlags) = notRequired this "GetProperties" this.Name + override this.GetEvents(_bindingFlags) = notRequired this "GetEvents" this.Name + override this.GetNestedTypes(_bindingFlags) = notRequired this "GetNestedTypes" this.Name + + override this.GetConstructorImpl(_bindingFlags, _binder, _callConvention, _types, _modifiers) = notRequired this "txILGenericParam: GetConstructorImpl" this.Name + override this.GetMethodImpl(_name, _bindingFlags, _binder, _callConvention, _types, _modifiers) = notRequired this "txILGenericParam: GetMethodImpl" this.Name + override this.GetField(_name, _bindingFlags) = notRequired this "GetField" this.Name + override this.GetPropertyImpl(_name, _bindingFlags, _binder, _returnType, _types, _modifiers) = notRequired this "GetPropertyImpl" this.Name + override this.GetNestedType(_name, _bindingFlags) = notRequired this "GetNestedType" this.Name + override this.GetEvent(_name, _bindingFlags) = notRequired this "GetEvent" this.Name + + override this.GetMembers(_bindingFlags) = notRequired this "GetMembers" this.Name + + override this.MakeGenericType(_args) = notRequired this "MakeGenericType" this.Name + override this.MakeArrayType() = TypeSymbol(TypeSymbolKind.SDArray, [| this |]) :> Type + override this.MakeArrayType arg = TypeSymbol(TypeSymbolKind.Array arg, [| this |]) :> Type + override this.MakePointerType() = TypeSymbol(TypeSymbolKind.Pointer, [| this |]) :> Type + override this.MakeByRefType() = TypeSymbol(TypeSymbolKind.ByRef, [| this |]) :> Type + + override __.GetAttributeFlagsImpl() = TypeAttributes.Public ||| TypeAttributes.Class ||| TypeAttributes.Sealed + + override __.IsArrayImpl() = false + override __.IsByRefImpl() = false + override __.IsPointerImpl() = false + override __.IsPrimitiveImpl() = false + override __.IsCOMObjectImpl() = false + override __.IsGenericType = false + override __.IsGenericTypeDefinition = false + + override __.HasElementTypeImpl() = false + + override this.UnderlyingSystemType = this + override __.GetCustomAttributesData() = inp.CustomAttrs |> txCustomAttributesData + + override this.Equals(that:obj) = System.Object.ReferenceEquals (this, that) + + override __.ToString() = sprintf "tgt generic param %s" inp.Name + + override this.AssemblyQualifiedName = "[" + this.Assembly.FullName + "]" + this.FullName + + override this.GetGenericArguments() = notRequired this "GetGenericArguments" this.Name + override this.GetGenericTypeDefinition() = notRequired this "GetGenericTypeDefinition" this.Name + override this.GetMember(_name, _mt, _bindingFlags) = notRequired this "txILGenericParam: GetMember" this.Name + override this.GUID = notRequired this "txILGenericParam: GUID" this.Name + override this.GetCustomAttributes(_inherited) = notRequired this "txILGenericParam: GetCustomAttributes" this.Name + override this.GetCustomAttributes(_attributeType, _inherited) = notRequired this "txILGenericParam: GetCustomAttributes" this.Name + override this.IsDefined(_attributeType, _inherited) = notRequired this "txILGenericParam: IsDefined" this.Name + override this.GetInterface(_name, _ignoreCase) = notRequired this "txILGenericParam: GetInterface" this.Name + override this.Module = notRequired this "txILGenericParam: Module" this.Name: Module + override this.GetElementType() = notRequired this "txILGenericParam: GetElementType" this.Name + override this.InvokeMember(_name, _invokeAttr, _binder, _target, _args, _modifiers, _culture, _namedParameters) = notRequired this "txILGenericParam: InvokeMember" this.Name + + } + + let rec gps = inp.GenericParams |> Array.mapi (fun i gp -> txILGenericParam (fun () -> gps, [| |]) i gp) + + let isNested = declTyOpt.IsSome + + do this.typeImpl <- this + override __.Name = inp.Name + override __.Assembly = (asm :> Assembly) + override __.DeclaringType = declTyOpt |> Option.toObj + override __.MemberType = if isNested then MemberTypes.NestedType else MemberTypes.TypeInfo + override __.MetadataToken = inp.Token + + override __.FullName = + match declTyOpt with + | None -> + match inp.Namespace with + | UNone -> inp.Name + | USome nsp -> nsp + "." + inp.Name + | Some declTy -> + declTy.FullName + "+" + inp.Name + + override __.Namespace = inp.Namespace |> StructOption.toObj + override __.BaseType = inp.Extends |> Option.map (txILType (gps, [| |])) |> Option.toObj + override __.GetInterfaces() = inp.Implements |> Array.map (txILType (gps, [| |])) + + override this.GetConstructors(bindingFlags) = + inp.Methods.Entries + |> Array.filter (fun x -> x.Name = ".ctor" || x.Name = ".cctor") + |> Array.map (txILConstructorDef this) + |> Array.filter (canBindConstructor bindingFlags) + + override this.GetMethods(bindingFlags) = + inp.Methods.Entries + |> Array.filter (fun x -> x.Name <> ".ctor" && x.Name <> ".cctor") + |> Array.map (txILMethodDef this) + |> Array.filter (canBindMethod bindingFlags) + + override this.GetFields(bindingFlags) = + inp.Fields.Entries + |> Array.map (txILFieldDef this) + |> Array.filter (canBindField bindingFlags) + + override this.GetEvents(bindingFlags) = + inp.Events.Entries + |> Array.map (txILEventDef this) + |> Array.filter (canBindEvent bindingFlags) + + override this.GetProperties(bindingFlags) = + inp.Properties.Entries + |> Array.map (txILPropertyDef this) + |> Array.filter (canBindProperty bindingFlags) + + override this.GetNestedTypes(bindingFlags) = + inp.NestedTypes.Entries + |> Array.map (asm.TxILTypeDef (Some (this :> Type))) + |> Array.filter (canBindNestedType bindingFlags) + + override this.GetConstructorImpl(_bindingFlags, _binder, _callConvention, types, _modifiers) = + let md = + match types with + | null -> inp.Methods.TryFindUniqueByName(".ctor") + | _ -> + inp.Methods.FindByNameAndArity(".ctor", types.Length) + |> Array.tryFind (fun md -> eqTypesAndILTypes types md.ParameterTypes) + md + |> Option.map (txILConstructorDef this) + |> Option.toObj + + override this.GetMethodImpl(name, _bindingFlags, _binder, _callConvention, types, _modifiers) = + let md = + match types with + | null -> inp.Methods.TryFindUniqueByName(name) + | _ -> + inp.Methods.FindByNameAndArity(name, types.Length) + |> Array.tryFind (fun md -> eqTypesAndILTypes types md.ParameterTypes) + md |> Option.map (txILMethodDef this) |> Option.toObj + + override this.GetField(name, _bindingFlags) = + inp.Fields.Entries + |> Array.tryPick (fun p -> if p.Name = name then Some (txILFieldDef this p) else None) + |> Option.toObj + + override this.GetPropertyImpl(name, _bindingFlags, _binder, _returnType, _types, _modifiers) = + inp.Properties.Entries + |> Array.tryPick (fun p -> if p.Name = name then Some (txILPropertyDef this p) else None) + |> Option.toObj + + override this.GetEvent(name, _bindingFlags) = + inp.Events.Entries + |> Array.tryPick (fun ev -> if ev.Name = name then Some (txILEventDef this ev) else None) + |> Option.toObj + + override this.GetNestedType(name, _bindingFlags) = + inp.NestedTypes.TryFindByName(UNone, name) |> Option.map (asm.TxILTypeDef (Some (this :> Type))) |> Option.toObj + + + override this.GetMembers(bindingFlags) = + [| for x in this.GetConstructors(bindingFlags) do yield (x :> MemberInfo) + for x in this.GetMethods(bindingFlags) do yield (x :> MemberInfo) + for x in this.GetFields(bindingFlags) do yield (x :> MemberInfo) + for x in this.GetProperties(bindingFlags) do yield (x :> MemberInfo) + for x in this.GetEvents(bindingFlags) do yield (x :> MemberInfo) + for x in this.GetNestedTypes(bindingFlags) do yield (x :> MemberInfo) |] + + override this.MakeGenericType(args) = TypeSymbol(TypeSymbolKind.TargetGeneric this, args) :> Type + override this.MakeArrayType() = TypeSymbol(TypeSymbolKind.SDArray, [| this |]) :> Type + override this.MakeArrayType arg = TypeSymbol(TypeSymbolKind.Array arg, [| this |]) :> Type + override this.MakePointerType() = TypeSymbol(TypeSymbolKind.Pointer, [| this |]) :> Type + override this.MakeByRefType() = TypeSymbol(TypeSymbolKind.ByRef, [| this |]) :> Type + + override __.GetAttributeFlagsImpl() = + let attr = TypeAttributes.Public ||| TypeAttributes.Class + let attr = if inp.IsSealed then attr ||| TypeAttributes.Sealed else attr + let attr = if inp.IsInterface then attr ||| TypeAttributes.Interface else attr + let attr = if inp.IsSerializable then attr ||| TypeAttributes.Serializable else attr + if isNested then adjustTypeAttributes isNested attr else attr + + override __.IsValueTypeImpl() = inp.IsStructOrEnum + + override __.IsEnum = + match this.BaseType with + | null -> false + | bt -> bt.FullName = "System.Enum" || bt.IsEnum + + override __.GetEnumUnderlyingType() = + if this.IsEnum then + txILType ([| |], [| |]) ilGlobals.typ_Int32 // TODO: in theory the assumption of "Int32" is not accurate for all enums, howver in practice .NET only uses enums with backing field Int32 + else failwithf "not enum type" + + override __.IsArrayImpl() = false + override __.IsByRefImpl() = false + override __.IsPointerImpl() = false + override __.IsPrimitiveImpl() = false + override __.IsCOMObjectImpl() = false + override __.IsGenericType = (gps.Length <> 0) + override __.IsGenericTypeDefinition = (gps.Length <> 0) + override __.HasElementTypeImpl() = false + + override this.UnderlyingSystemType = (this :> Type) + override __.GetCustomAttributesData() = inp.CustomAttrs |> txCustomAttributesData + + override this.Equals(that:obj) = System.Object.ReferenceEquals (this, that) + override this.Equals(that:Type) = System.Object.ReferenceEquals (this, that) + override __.GetHashCode() = inp.Token + + override this.IsAssignableFrom(otherTy: Type) = isAssignableFrom this otherTy + + override this.IsSubclassOf(otherTy: Type) = isSubclassOf this otherTy + + override this.AssemblyQualifiedName = "[" + this.Assembly.FullName + "]" + this.FullName + + override this.ToString() = sprintf "tgt type %s" this.FullName + + override __.GetGenericArguments() = gps + override this.GetGenericTypeDefinition() = (this :> Type) + + override x.Module = x.Assembly.ManifestModule + + override this.GetMember(_name, _memberType, _bindingFlags) = notRequired this "GetMember" inp.Name + override this.GUID = notRequired this "GUID" inp.Name + override this.GetCustomAttributes(_inherited) = notRequired this "GetCustomAttributes" inp.Name + override this.GetCustomAttributes(_attributeType, _inherited) = notRequired this "GetCustomAttributes" inp.Name + override this.IsDefined(_attributeType, _inherited) = notRequired this "IsDefined" inp.Name + override this.GetInterface(_name, _ignoreCase) = notRequired this "GetInterface" inp.Name + override this.GetElementType() = notRequired this "GetElementType" inp.Name + override this.InvokeMember(_name, _invokeAttr, _binder, _target, _args, _modifiers, _culture, _namedParameters) = notRequired this "InvokeMember" inp.Name + + member __.Metadata: ILTypeDef = inp + member __.MakeMethodInfo (declTy: Type) md = txILMethodDef declTy md + member __.MakeConstructorInfo (declTy: Type) md = txILConstructorDef declTy md + member __.MakePropertyInfo (declTy: Type) md = txILPropertyDef declTy md + member __.MakeEventInfo (declTy: Type) md = txILEventDef declTy md + member __.MakeFieldInfo (declTy: Type) md = txILFieldDef declTy md + member __.MakeNestedTypeInfo (declTy: Type) md = asm.TxILTypeDef (Some declTy) md + override this.GetEvents() = this.GetEvents(BindingFlags.Public ||| BindingFlags.Instance ||| BindingFlags.Static) // Needed because TypeDelegator.cs provides a delegting implementation of this, and we are self-delegating + + and TargetModule(location: string) = + inherit Module() + override __.MetadataToken = hash location + + /// Implements System.Reflection.Assembly backed by .NET metadata provided by an ILModuleReader + and TargetAssembly(ilGlobals, tryBindAssembly: ILAssemblyRef -> Choice, reader: ILModuleReader option, location: string) as asm = + inherit Assembly() + + // A table tracking how type definition objects are translated. + let txTable = TxTable() + let mutable reader = reader + let manifestModule = TargetModule(location) + let getReader() = match reader with None -> failwith "the reader on the TargetAssembly has not been set" | Some r -> r + + let txILTypeDef (declTyOpt: Type option) (inp: ILTypeDef) = + txTable.Get inp.Token (fun () -> + // We never create target types for the types of primitive values that are accepted by the F# compiler as Expr.Value nodes, + // which fortunately also correspond to element types. We just use the design-time types instead. + // See convertConstExpr in the compiler, e.g. + // https://github.com/Microsoft/visualfsharp/blob/44fa027b308681a1b78a089e44fa1ab35ff77b41/src/fsharp/MethodCalls.fs#L842 + // for the accepted types. + match inp.Namespace, inp.Name with + | USome "System", "Void"-> typeof + (* + | USome "System", "Boolean" -> typeof + | USome "System", "String"-> typeof + | USome "System", "Object"-> typeof + | USome "System", "Int32" -> typeof + | USome "System", "SByte" -> typeof + | USome "System", "Int16"-> typeof + | USome "System", "Int64" -> typeof + | USome "System", "IntPtr" -> typeof + | USome "System", "Byte" -> typeof + | USome "System", "UInt16"-> typeof + | USome "System", "UInt32" -> typeof + | USome "System", "UInt64" -> typeof + | USome "System", "UIntPtr" -> typeof + | USome "System", "Double" -> typeof + | USome "System", "Single" -> typeof + | USome "System", "Char" -> typeof + *) + | _ -> + TargetTypeDefinition(ilGlobals, tryBindAssembly, asm, declTyOpt, inp) :> System.Type) + + let types = lazy [| for td in getReader().ILModuleDef.TypeDefs.Entries -> txILTypeDef None td |] + + + override __.GetReferencedAssemblies() = [| for aref in getReader().ILAssemblyRefs -> aref.ToAssemblyName() |] + + override __.GetTypes () = types.Force() + + override x.GetType (nm:string) = + if nm.Contains("+") then + let i = nm.LastIndexOf("+") + let enc,nm2 = nm.[0..i-1], nm.[i+1..] + match x.GetType(enc) with + | null -> null + | t -> t.GetNestedType(nm2,bindAll) + elif nm.Contains(".") then + let i = nm.LastIndexOf(".") + let nsp,nm2 = nm.[0..i-1], nm.[i+1..] + x.TryBindType(USome nsp, nm2) |> Option.toObj + else + x.TryBindType(UNone, nm) |> Option.toObj + + override __.GetName() = getReader().ILModuleDef.ManifestOfAssembly.GetName() + + override x.FullName = x.GetName().ToString() + + override __.Location = location + override __.ManifestModule = (manifestModule :> Module) + + override __.ReflectionOnly = true + + override x.GetManifestResourceStream(resourceName:string) = + let r = getReader().ILModuleDef.Resources.Entries |> Seq.find (fun r -> r.Name = resourceName) + match r.Location with + | ILResourceLocation.Local f -> new MemoryStream(f()) :> Stream + | _ -> notRequired x "reading manifest resource %s from non-embedded location" resourceName + + member __.TxILTypeDef declTyOpt inp = txILTypeDef declTyOpt inp + + member __.Reader with get() = reader and set v = (if reader.IsSome then failwith "reader on TargetAssembly already set"); reader <- v + + member __.TryBindType(nsp:string uoption, nm:string): Type option = + match getReader().ILModuleDef.TypeDefs.TryFindByName(nsp, nm) with + | Some td -> asm.TxILTypeDef None td |> Some + | None -> + match getReader().ILModuleDef.ManifestOfAssembly.ExportedTypes.TryFindByName(nsp, nm) with + | Some tref -> + match tref.ScopeRef with + | ILScopeRef.Assembly aref2 -> + let ass2opt = tryBindAssembly(aref2) + match ass2opt with + | Choice1Of2 ass2 -> + match ass2.GetType(joinILTypeName nsp nm) with + | null -> None + | ty -> Some ty + | Choice2Of2 _err -> None + | _ -> + printfn "unexpected non-forwarder during binding" + None + | None -> None + + member x.BindType(nsp:string uoption, nm:string) = + match x.TryBindType(nsp, nm) with + | None -> failwithf "failed to bind type %s in assembly %s" nm asm.FullName + | Some res -> res + + override x.ToString() = "tgt assembly " + x.FullName + + + + type ProvidedAssembly(isTgt: bool, assemblyName:AssemblyName, assemblyFileName: string) = + + inherit Assembly() + let theTypes = ResizeArray() + + let addTypes (ptds:ProvidedTypeDefinition[], enclosingTypeNames: string list option) = + for pt in ptds do + if pt.IsErased then failwith ("The provided type "+pt.Name+"is marked as erased and cannot be converted to a generated type. Set 'IsErased=false' on the ProvidedTypeDefinition") + if not isTgt && pt.BelongsToTargetModel then failwithf "Expected '%O' to be a source ProvidedTypeDefinition. Please report this bug to https://github.com/fsprojects/FSharp.TypeProviders.SDK/issues" pt + if isTgt && not pt.BelongsToTargetModel then failwithf "Expected '%O' to be a target ProvidedTypeDefinition. Please report this bug to https://github.com/fsprojects/FSharp.TypeProviders.SDK/issues" pt + theTypes.Add (ptds, enclosingTypeNames) + + let theTypesArray = lazy (theTypes.ToArray() |> Array.collect (function (ptds, None) -> Array.map (fun ptd -> (ptd :> Type)) ptds | _ -> [| |])) + + override __.GetReferencedAssemblies() = [| |] //notRequired x "GetReferencedAssemblies" (assemblyName.ToString()) + + override __.GetName() = assemblyName + + override __.FullName = assemblyName.ToString() + + override __.Location = assemblyFileName + + override __.ReflectionOnly = true + + override __.GetTypes () = theTypesArray.Force() + + override x.GetType (nm: string) = + if nm.Contains("+") then + let i = nm.LastIndexOf("+") + let enc,nm2 = nm.[0..i-1], nm.[i+1..] + match x.GetType(enc) with + | null -> null + | t -> t.GetNestedType(nm2,bindAll) + else + theTypesArray.Force() + |> Array.tryPick (fun ty -> if ty.FullName = nm then Some ty else None) + |> Option.toObj + + new () = + let tmpFile = Path.GetTempFileName() + let assemblyFileName = Path.ChangeExtension(tmpFile, "dll") + File.Delete(tmpFile) + let simpleName = Path.GetFileNameWithoutExtension(assemblyFileName) + ProvidedAssembly(AssemblyName(simpleName), assemblyFileName) + + new (assemblyName, assemblyFileName) = + ProvidedAssembly(false, assemblyName, assemblyFileName) + + member __.BelongsToTargetModel = isTgt + + member __.AddNestedTypes (types, enclosingGeneratedTypeNames) = + addTypes (Array.ofList types, Some enclosingGeneratedTypeNames) + + member __.AddTypes (types) = + addTypes (Array.ofList types, None) + + member __.AddTheTypes (types, enclosingGeneratedTypeNames) = + addTypes (types, enclosingGeneratedTypeNames) + + member __.GetTheTypes () = theTypes.ToArray() + +//==================================================================================================== +// ProvidedTypesContext +// +// A binding context for cross-targeting type providers + +namespace ProviderImplementation.ProvidedTypes + + + #nowarn "8796" + #nowarn "1182" + + open System + open System.Diagnostics + open System.IO + open System.Collections.Concurrent + open System.Collections.Generic + open System.Reflection + + open Microsoft.FSharp.Quotations + open Microsoft.FSharp.Quotations.Patterns + open Microsoft.FSharp.Quotations.DerivedPatterns + open Microsoft.FSharp.Core.CompilerServices + open Microsoft.FSharp.Reflection + + open ProviderImplementation.ProvidedTypes + open ProviderImplementation.ProvidedTypes.AssemblyReader + + [] + module private ImplementationUtils = + type System.Object with + member x.GetProperty(nm) = + let ty = x.GetType() + let prop = ty.GetProperty(nm, bindAll) + let v = prop.GetValue(x,null) + v + + member x.GetField(nm) = + let ty = x.GetType() + let fld = ty.GetField(nm, bindAll) + let v = fld.GetValue(x) + v + + member x.HasProperty(nm) = + let ty = x.GetType() + let p = ty.GetProperty(nm, bindAll) + p |> isNull |> not + + member x.HasField(nm) = + let ty = x.GetType() + let fld = ty.GetField(nm, bindAll) + fld |> isNull |> not + + member x.GetElements() = [ for v in (x :?> System.Collections.IEnumerable) do yield v ] + + + + type ProvidedTypeBuilder() = + static let tupleNames = + [| "System.Tuple`1"; "System.Tuple`2"; "System.Tuple`3"; + "System.Tuple`4"; "System.Tuple`5"; "System.Tuple`6"; + "System.Tuple`7"; "System.Tuple`8"; "System.Tuple" + "System.ValueTuple`1"; "System.ValueTuple`2"; "System.ValueTuple`3"; + "System.ValueTuple`4"; "System.ValueTuple`5"; "System.ValueTuple`6"; + "System.ValueTuple`7"; "System.ValueTuple`8"; "System.ValueTuple" |] + + + static member MakeGenericType(genericTypeDefinition: Type, genericArguments: Type list) = + if genericArguments.Length = 0 then genericTypeDefinition else + match genericTypeDefinition with + | :? TargetTypeDefinition -> failwithf "unexpected target model in ProvidedTypeBuilder.MakeGenericType, stacktrace = %s " Environment.StackTrace + | :? ProvidedTypeDefinition as ptd when ptd.BelongsToTargetModel -> failwithf "unexpected target model ptd in MakeGenericType, stacktrace = %s " Environment.StackTrace + | :? ProvidedTypeDefinition -> ProvidedTypeSymbol(ProvidedTypeSymbolKind.Generic genericTypeDefinition, genericArguments) :> Type + | _ -> TypeSymbol(TypeSymbolKind.OtherGeneric genericTypeDefinition, List.toArray genericArguments) :> Type + + static member MakeGenericMethod(genericMethodDefinition, genericArguments: Type list) = + if genericArguments.Length = 0 then genericMethodDefinition else + MethodSymbol2(genericMethodDefinition, Array.ofList genericArguments) :> MethodInfo + + static member MakeTupleType(types) = + let rec mkTupleType isStruct (asm:Assembly) (tys:Type list) = + let maxTuple = 8 + + let n = min tys.Length maxTuple + let tupleFullName = tupleNames.[n - 1 + (if isStruct then 9 else 0)] + let ty = asm.GetType(tupleFullName) + if tys.Length >= maxTuple then + let tysA = (Array.ofList tys).[0..maxTuple-2] |> List.ofArray + let tysB = (Array.ofList tys).[maxTuple-1..] |> List.ofArray + let tyB = mkTupleType isStruct asm tysB + ProvidedTypeBuilder.MakeGenericType(ty, List.append tysA [ tyB ]) + else + ProvidedTypeBuilder.MakeGenericType(ty, tys) + mkTupleType false (typeof.Assembly) types + + //-------------------------------------------------------------------------------- + // The quotation simplifier + // + // This is invoked for each quotation specified by the type provider, as part of the translation to + /// the target model, i.e. before it is handed to the F# compiler (for erasing type providers) or + // the TPSDK IL code generator (for generative type providers). This allows a broader range of quotations + // to be used when authoring type providers than are strictly allowed by those tools. + // + // Specifically we accept: + // + // - NewTuple nodes (for generative type providers) + // - TupleGet nodes (for generative type providers) + // - array and list values as constants + // - PropertyGet and PropertySet nodes + // - Application, NewUnionCase, NewRecord, UnionCaseTest nodes + // - Let nodes (defining "byref" values) + // - LetRecursive nodes + // + // Additionally, a set of code optimizations are applied for generative type providers: + // - inlineRightPipe + // - optimizeCurriedApplications + // - inlineValueBindings + + // Note, the QuotationSimplifier works over source quotations, not target quotations + type QuotationSimplifier(isGenerated: bool) = + + let rec simplifyExpr q = + match q with + +#if !NO_GENERATIVE + // Convert NewTuple to the call to the constructor of the Tuple type (only for generated types, + // the F# compile does the job for erased types when it receives the quotation) + | NewTuple(items) when isGenerated -> + let rec mkCtor args ty = + let ctor, restTyOpt = Reflection.FSharpValue.PreComputeTupleConstructorInfo ty + match restTyOpt with + | None -> Expr.NewObjectUnchecked(ctor, List.map simplifyExpr args) + | Some restTy -> + let curr = [for a in Seq.take 7 args -> simplifyExpr a] + let rest = List.ofSeq (Seq.skip 7 args) + Expr.NewObjectUnchecked(ctor, curr @ [mkCtor rest restTy]) + let tys = [ for e in items -> e.Type ] + let tupleTy = ProvidedTypeBuilder.MakeTupleType(tys) + simplifyExpr (mkCtor items tupleTy) + + // convert TupleGet to the chain of PropertyGet calls (only for generated types) + | TupleGet(e, i) when isGenerated -> + let rec mkGet ty i (e: Expr) = + let pi, restOpt = Reflection.FSharpValue.PreComputeTuplePropertyInfo(ty, i) + let propGet = Expr.PropertyGetUnchecked(e, pi) + match restOpt with + | None -> propGet + | Some (restTy, restI) -> mkGet restTy restI propGet + simplifyExpr (mkGet e.Type i (simplifyExpr e)) +#endif + + | Value(value, ty) -> + if value |> isNull |> not then + let tyOfValue = value.GetType() + transValue(value, tyOfValue, ty) + else q + + // Eliminate F# property gets to method calls + | PropertyGet(obj,propInfo,args) -> + match obj with + | None -> simplifyExpr (Expr.CallUnchecked(propInfo.GetGetMethod(),args)) + | Some o -> simplifyExpr (Expr.CallUnchecked(simplifyExpr o,propInfo.GetGetMethod(),args)) + + // Eliminate F# property sets to method calls + | PropertySet(obj,propInfo,args,v) -> + match obj with + | None -> simplifyExpr (Expr.CallUnchecked(propInfo.GetSetMethod(),args@[v])) + | Some o -> simplifyExpr (Expr.CallUnchecked(simplifyExpr o,propInfo.GetSetMethod(),args@[v])) + + // Eliminate F# function applications to FSharpFunc<_,_>.Invoke calls + | Application(f,e) -> + simplifyExpr (Expr.CallUnchecked(simplifyExpr f, f.Type.GetMethod "Invoke", [ e ]) ) + + // Eliminate F# union operations + | NewUnionCase(ci, es) -> + simplifyExpr (Expr.CallUnchecked(Reflection.FSharpValue.PreComputeUnionConstructorInfo ci, es) ) + + // Eliminate F# union operations + | UnionCaseTest(e,uc) -> + let tagInfo = Reflection.FSharpValue.PreComputeUnionTagMemberInfo uc.DeclaringType + let tagExpr = + match tagInfo with + | :? PropertyInfo as tagProp -> + simplifyExpr (Expr.PropertyGet(e,tagProp) ) + | :? MethodInfo as tagMeth -> + if tagMeth.IsStatic then simplifyExpr (Expr.Call(tagMeth, [e])) + else simplifyExpr (Expr.Call(e,tagMeth,[])) + | _ -> failwith "unreachable: unexpected result from PreComputeUnionTagMemberInfo. Please report this bug to https://github.com/fsprojects/FSharp.TypeProviders.SDK/issues" + let tagNumber = uc.Tag + simplifyExpr <@@ (%%(tagExpr): int) = tagNumber @@> + + // Eliminate F# record operations + | NewRecord(ci, es) -> + simplifyExpr (Expr.NewObjectUnchecked(Reflection.FSharpValue.PreComputeRecordConstructorInfo ci, es) ) + + // Explicitly handle weird byref variables in lets (used to populate out parameters), since the generic handlers can't deal with byrefs. + // + // The binding must have leaves that are themselves variables (due to the limited support for byrefs in expressions) + // therefore, we can perform inlining to translate this to a form that can be compiled + | Let(v,vexpr,bexpr) when v.Type.IsByRef -> transLetOfByref v vexpr bexpr + + // Eliminate recursive let bindings (which are unsupported by the type provider API) to regular let bindings + | LetRecursive(bindings, expr) -> simplifyLetRec bindings expr + + // Handle the generic cases + | ShapeLambdaUnchecked(v,body) -> Expr.Lambda(v, simplifyExpr body) + | ShapeCombinationUnchecked(comb,args) -> RebuildShapeCombinationUnchecked(comb,List.map simplifyExpr args) + | ShapeVarUnchecked _ -> q + + and simplifyLetRec bindings expr = + // This uses a "lets and sets" approach, converting something like + // let rec even = function + // | 0 -> true + // | n -> odd (n-1) + // and odd = function + // | 0 -> false + // | n -> even (n-1) + // X + // to something like + // let even = ref Unchecked.defaultof<_> + // let odd = ref Unchecked.defaultof<_> + // even := function + // | 0 -> true + // | n -> !odd (n-1) + // odd := function + // | 0 -> false + // | n -> !even (n-1) + // X' + // where X' is X but with occurrences of even/odd substituted by !even and !odd (since now even and odd are references) + // Translation relies on typedefof<_ ref> - does this affect ability to target different runtime and design time environments? + let vars = List.map fst bindings + let refVars = vars |> List.map (fun v -> Var(v.Name, ProvidedTypeBuilder.MakeGenericType(typedefof<_ ref>, [v.Type]))) + + // "init t" generates the equivalent of <@ ref Unchecked.defaultof @> + let init (t:Type) = + let r = match <@ ref 1 @> with Call(None, r, [_]) -> r | _ -> failwith "Extracting MethodInfo from <@ 1 @> failed" + let d = match <@ Unchecked.defaultof<_> @> with Call(None, d, []) -> d | _ -> failwith "Extracting MethodInfo from <@ Unchecked.defaultof<_> @> failed" + let ir = ProvidedTypeBuilder.MakeGenericMethod(r.GetGenericMethodDefinition(), [ t ]) + let id = ProvidedTypeBuilder.MakeGenericMethod(d.GetGenericMethodDefinition(), [ t ]) + Expr.CallUnchecked(ir, [Expr.CallUnchecked(id, [])]) + + // deref v generates the equivalent of <@ !v @> + // (so v's type must be ref) + let deref (v:Var) = + let m = match <@ !(ref 1) @> with Call(None, m, [_]) -> m | _ -> failwith "Extracting MethodInfo from <@ !(ref 1) @> failed" + let tyArgs = v.Type.GetGenericArguments() + let im = ProvidedTypeBuilder.MakeGenericMethod(m.GetGenericMethodDefinition(), Array.toList tyArgs) + Expr.CallUnchecked(im, [Expr.Var v]) + + // substitution mapping a variable v to the expression <@ !v' @> using the corresponding new variable v' of ref type + let subst = + let map = [ for v in refVars -> v.Name, deref v ] |> Map.ofList + fun (v:Var) -> Map.tryFind v.Name map + + let refExpr = expr.Substitute(subst) + + // maps variables to new variables + let varDict = [ for (v, rv) in List.zip vars refVars -> v.Name, rv ] |> dict + + // given an old variable v and an expression e, returns a quotation like <@ v' := e @> using the corresponding new variable v' of ref type + let setRef (v:Var) e = + let m = match <@ (ref 1) := 2 @> with Call(None, m, [_;_]) -> m | _ -> failwith "Extracting MethodInfo from <@ (ref 1) := 2 @> failed" + let im = ProvidedTypeBuilder.MakeGenericMethod(m.GetGenericMethodDefinition(), [ v.Type ]) + Expr.CallUnchecked(im, [Expr.Var varDict.[v.Name]; e]) + + // Something like + // <@ + // v1 := e1' + // v2 := e2' + // ... + // refExpr + // @> + // Note that we must substitute our new variable dereferences into the bound expressions + let body = + bindings + |> List.fold (fun b (v,e) -> Expr.Sequential(setRef v (e.Substitute subst), b)) refExpr + + // Something like + // let v1 = ref Unchecked.defaultof + // let v2 = ref Unchecked.defaultof + // ... + // body + (body, vars) + ||> List.fold (fun b v -> Expr.LetUnchecked(varDict.[v.Name], init v.Type, b)) + |> simplifyExpr + + + and transLetOfByref v vexpr bexpr = + match vexpr with + | Sequential(e',vexpr') -> + (* let v = (e'; vexpr') in bexpr => e'; let v = vexpr' in bexpr *) + Expr.Sequential(e', transLetOfByref v vexpr' bexpr) + |> simplifyExpr + | IfThenElse(c,b1,b2) -> + (* let v = if c then b1 else b2 in bexpr => if c then let v = b1 in bexpr else let v = b2 in bexpr *) + // + // Note, this duplicates "bexpr" + Expr.IfThenElseUnchecked(c, transLetOfByref v b1 bexpr, transLetOfByref v b2 bexpr) + |> simplifyExpr + | Var _ -> + (* let v = v1 in bexpr => bexpr[v/v1] *) + bexpr.Substitute(fun v' -> if v = v' then Some vexpr else None) + |> simplifyExpr + | _ -> + failwithf "Unexpected byref binding: %A = %A. Please report this bug to https://github.com/fsprojects/FSharp.TypeProviders.SDK/issues" v vexpr + + and transValueArray (o: Array, ty: Type) = + let elemTy = ty.GetElementType() + let converter = getValueConverterForType elemTy + let elements = [ for el in o -> converter el ] + Expr.NewArrayUnchecked(elemTy, elements) + + and transValueList(o, ty: Type, nil, cons) = + let converter = getValueConverterForType (ty.GetGenericArguments().[0]) + o + |> Seq.cast + |> List.ofSeq + |> fun l -> List.foldBack(fun o s -> Expr.NewUnionCase(cons, [ converter(o); s ])) l (Expr.NewUnionCase(nil, [])) + |> simplifyExpr + + and getValueConverterForType (ty: Type) = + if ty.IsArray then + fun (v: obj) -> transValueArray(v :?> Array, ty) + elif ty.IsGenericType && ty.GetGenericTypeDefinition() = typedefof<_ list> then + let nil, cons = + let cases = Reflection.FSharpType.GetUnionCases(ty) + let a = cases.[0] + let b = cases.[1] + if a.Name = "Empty" then a,b + else b,a + + fun v -> transValueList (v :?> System.Collections.IEnumerable, ty, nil, cons) + else + fun v -> Expr.Value(v, ty) + + and transValue (v: obj, tyOfValue: Type, expectedTy: Type) = + let converter = getValueConverterForType tyOfValue + let r = converter v + if tyOfValue <> expectedTy then Expr.Coerce(r, expectedTy) + else r + +#if !NO_GENERATIVE + let getFastFuncType (args: list) resultType = + let types = + [| for arg in args -> arg.Type + yield resultType |] + let fastFuncTy = + match List.length args with + | 2 -> typedefof>.MakeGenericType(types) + | 3 -> typedefof>.MakeGenericType(types) + | 4 -> typedefof>.MakeGenericType(types) + | 5 -> typedefof>.MakeGenericType(types) + | _ -> invalidArg "args" "incorrect number of arguments" + fastFuncTy.GetMethod("Adapt") + + let (===) a b = LanguagePrimitives.PhysicalEquality a b + + let traverse f = + let rec fallback e = + match e with + | Let(v, value, body) -> + let fixedValue = f fallback value + let fixedBody = f fallback body + if fixedValue === value && fixedBody === body then + e + else + Expr.LetUnchecked(v, fixedValue, fixedBody) + | ShapeVarUnchecked _ -> e + | ShapeLambdaUnchecked(v, body) -> + let fixedBody = f fallback body + if fixedBody === body then + e + else + Expr.Lambda(v, fixedBody) + | ShapeCombinationUnchecked(shape, exprs) -> + let exprs1 = List.map (f fallback) exprs + if List.forall2 (===) exprs exprs1 then + e + else + RebuildShapeCombinationUnchecked(shape, exprs1) + fun e -> f fallback e + + let rightPipe = <@@ (|>) @@> + let inlineRightPipe expr = + let rec loop expr = traverse loopCore expr + and loopCore fallback orig = + match orig with + | SpecificCall rightPipe (None, _, [operand; applicable]) -> + let fixedOperand = loop operand + match loop applicable with + | Lambda(arg, body) -> + let v = Var("__temp", operand.Type) + let ev = Expr.Var v + + let fixedBody = loop body + Expr.Let(v, fixedOperand, fixedBody.Substitute(fun v1 -> if v1 = arg then Some ev else None)) + | fixedApplicable -> Expr.Application(fixedApplicable, fixedOperand) + | x -> fallback x + loop expr + + + let inlineValueBindings e = + let map = Dictionary(HashIdentity.Reference) + let rec loop expr = traverse loopCore expr + and loopCore fallback orig = + match orig with + | Let(id, (Value(_) as v), body) when not id.IsMutable -> + map.[id] <- v + let fixedBody = loop body + map.Remove(id) |> ignore + fixedBody + | ShapeVarUnchecked v -> + match map.TryGetValue v with + | true, e -> e + | _ -> orig + | x -> fallback x + loop e + + + let optimizeCurriedApplications expr = + let rec loop expr = traverse loopCore expr + and loopCore fallback orig = + match orig with + | Application(e, arg) -> + let e1 = tryPeelApplications e [loop arg] + if e1 === e then + orig + else + e1 + | x -> fallback x + and tryPeelApplications orig args = + let n = List.length args + match orig with + | Application(e, arg) -> + let e1 = tryPeelApplications e ((loop arg)::args) + if e1 === e then + orig + else + e1 + | Let(id, applicable, (Lambda(_) as body)) when n > 0 -> + let numberOfApplication = countPeelableApplications body id 0 + if numberOfApplication = 0 then orig + elif n = 1 then Expr.Application(applicable, List.head args) + elif n <= 5 then + let resultType = + applicable.Type + |> Seq.unfold (fun t -> + if not t.IsGenericType then None else + let args = t.GetGenericArguments() + if args.Length <> 2 then None else + Some (args.[1], args.[1]) + ) + |> Seq.toArray + |> (fun arr -> arr.[n - 1]) + + let adaptMethod = getFastFuncType args resultType + let adapted = Expr.Call(adaptMethod, [loop applicable]) + let invoke = adapted.Type.GetMethod("Invoke", [| for arg in args -> arg.Type |]) + Expr.Call(adapted, invoke, args) + else + (applicable, args) ||> List.fold (fun e a -> Expr.Application(e, a)) + | _ -> + orig + and countPeelableApplications expr v n = + match expr with + // v - applicable entity obtained on the prev step + // \arg -> let v1 = (f arg) in rest ==> f + | Lambda(arg, Let(v1, Application(Var f, Var arg1), rest)) when v = f && arg = arg1 -> countPeelableApplications rest v1 (n + 1) + // \arg -> (f arg) ==> f + | Lambda(arg, Application(Var f, Var arg1)) when v = f && arg = arg1 -> n + | _ -> n + loop expr +#endif + + member __.TranslateExpression q = simplifyExpr q + + member __.TranslateQuotationToCode qexprf (paramNames: string[]) (argExprs: Expr[]) = + // Use the real variable names instead of indices, to improve output of Debug.fs + // Add let bindings for arguments to ensure that arguments will be evaluated + let varDecisions = argExprs |> Array.mapi (fun i e -> match e with Var v when v.Name = paramNames.[i] -> false, v | _ -> true, Var(paramNames.[i], e.Type)) + let vars = varDecisions |> Array.map snd + let expr = qexprf ([for v in vars -> Expr.Var v]) + + let pairs = Array.zip argExprs varDecisions + let expr = Array.foldBack (fun (arg, (replace, var)) e -> if replace then Expr.LetUnchecked(var, arg, e) else e) pairs expr +#if !NO_GENERATIVE + let expr = + if isGenerated then + let e1 = inlineRightPipe expr + let e2 = optimizeCurriedApplications e1 + let e3 = inlineValueBindings e2 + e3 + else + expr +#endif + + simplifyExpr expr + + /// A cross-targeting type provider must ultimately provide quotations and reflection objects w.r.t. + /// the type binding context for the target assembly reference set. + /// + /// To make building a cross-targeting type provider palatable, the type provider is written w.r.t. to + /// homogeneous quotations and reflection objects referring to a copy of the target runtime constructs held + /// in the design-time assembly itself. These are then systematically remapped (replaced/translated) to the + /// corresponding reflection objects in the target assembly reference set. + /// + /// The ProvidedTypesContext acts as a way of creating provided objects where the replacement is automatically and + /// systematically applied. + + + /// Represents the type binding context for the type provider based on the set of assemblies + /// referenced by the compilation. + type ProvidedTypesContext(referencedAssemblyPaths: string list, assemblyReplacementMap: (string*string) list, sourceAssemblies: Assembly list) as this = + + // A duplicate 'mscorlib' appears in the paths reported by the F# compiler + let referencedAssemblyPaths = referencedAssemblyPaths |> Seq.distinctBy Path.GetFileNameWithoutExtension |> Seq.toList + //do System.Diagnostics.Debugger.Break() + + /// Find which assembly defines System.Object etc. + let systemRuntimeScopeRef = + lazy + referencedAssemblyPaths |> List.tryPick (fun path -> + try + let simpleName = Path.GetFileNameWithoutExtension path + if simpleName = "mscorlib" || simpleName = "System.Runtime" || simpleName = "netstandard" then + let reader = ILModuleReaderAfterReadingAllBytes (path, mkILGlobals EcmaMscorlibScopeRef) + let mdef = reader.ILModuleDef + match mdef.TypeDefs.TryFindByName(USome "System", "Object") with + | None -> None + | Some _ -> + let m = mdef.ManifestOfAssembly + let assRef = ILAssemblyRef(m.Name, UNone, (match m.PublicKey with USome k -> USome (PublicKey.KeyAsToken(k)) | UNone -> UNone), m.Retargetable, m.Version, m.Locale) + Some (ILScopeRef.Assembly assRef) + else + None + with _ -> None ) + |> function + | None -> EcmaMscorlibScopeRef // failwith "no reference to mscorlib.dll or System.Runtime.dll or netstandard.dll found" + | Some r -> r + + let fsharpCoreRefVersion = + lazy + referencedAssemblyPaths |> List.tryPick (fun path -> + try + let simpleName = Path.GetFileNameWithoutExtension path + if simpleName = "FSharp.Core" then + let reader = ILModuleReaderAfterReadingAllBytes (path, mkILGlobals (systemRuntimeScopeRef.Force())) + match reader.ILModuleDef.Manifest with + | Some m -> match m.Version with USome v -> Some v | UNone -> None + | None -> None + else + None + with _ -> None ) + |> function + | None -> typeof.Assembly.GetName().Version // failwith "no reference to FSharp.Core found" + | Some r -> r + + let ilGlobals = + lazy mkILGlobals (systemRuntimeScopeRef.Force()) + + let mkReader ref = + try let reader = ILModuleReaderAfterReadingAllBytes(ref, ilGlobals.Force()) + Choice1Of2(TargetAssembly(ilGlobals.Force(), this.TryBindILAssemblyRefToTgt, Some reader, ref) :> Assembly) + with err -> Choice2Of2 err + + let targetAssembliesTable_ = ConcurrentDictionary>() + let targetAssemblies_ = ResizeArray() + let targetAssembliesQueue = ResizeArray<_>() + do targetAssembliesQueue.Add (fun () -> + for ref in referencedAssemblyPaths do + let reader = mkReader ref + let simpleName = Path.GetFileNameWithoutExtension ref + targetAssembliesTable_.[simpleName] <- reader + match reader with + | Choice2Of2 _ -> () + | Choice1Of2 asm -> targetAssemblies_.Add asm) + let flush() = + let qs = targetAssembliesQueue.ToArray() + targetAssembliesQueue.Clear() + for q in qs do q() + let getTargetAssemblies() = flush(); targetAssemblies_ + let getTargetAssembliesTable() = flush(); targetAssembliesTable_ + + let tryBindTargetAssemblySimple(simpleName:string): Choice = + let table = getTargetAssembliesTable() + if table.ContainsKey(simpleName) then table.[simpleName] + else Choice2Of2 (Exception(sprintf "assembly %s not found" simpleName)) + + let sourceAssembliesTable_ = ConcurrentDictionary() + let sourceAssemblies_ = ResizeArray<_>() + let sourceAssembliesQueue = ResizeArray<_>() + + let enqueueReferencedAssemblies(asm: Assembly) = + do sourceAssembliesQueue.Add (fun () -> + [| for referencedAssemblyName in asm.GetReferencedAssemblies() do + let referencedAssembly = try Assembly.Load(referencedAssemblyName) with _ -> null + if not (isNull referencedAssembly) then + yield referencedAssembly |]) + + do sourceAssembliesQueue.Add (fun () -> List.toArray sourceAssemblies) + + let getSourceAssemblies() = + while sourceAssembliesQueue.Count > 0 do + let qs = sourceAssembliesQueue.ToArray() + sourceAssembliesQueue.Clear() + for q in qs do + for asm in q() do + let simpleName = asm.GetName().Name + if not (sourceAssembliesTable_.ContainsKey(simpleName)) then + sourceAssembliesTable_.[simpleName] <- asm + sourceAssemblies_.Add asm + // Find the transitive closure of all referenced assemblies + enqueueReferencedAssemblies asm + + sourceAssemblies_ + + /// When translating quotations, Expr.Var's are translated to new variable respecting reference equality. + let varTableFwd = Dictionary() + let varTableBwd = Dictionary() + let assemblyTableFwd = Dictionary() + let typeTableFwd = Dictionary() + let typeTableBwd = Dictionary() + + let fixName (fullName:string) = + if fullName.StartsWith("FSI_") then + // when F# Interactive is the host of the design time assembly, + // all namespaces are prefixed with FSI_, in the runtime assembly + // the name won't have that prefix + fullName.Substring(fullName.IndexOf('.') + 1) + else + fullName + + let tryGetTypeFromAssembly toTgt (originalAssemblyName:string) fullName (asm:Assembly) = + // if the original assembly of the type being replaced is in `assemblyReplacementMap`, + // then we only map it to assemblies with a name specified in `assemblyReplacementMap` + let restrictedAndMatching = + assemblyReplacementMap + |> Seq.exists (fun (originalName:string, newName:string) -> + originalAssemblyName.StartsWith originalName && not (asm.FullName.StartsWith(newName))) + + // Check if the assembly can be queried for types yet. Cross-assembly recursive linking back to generated assemblies + // is not supported in some cases where recursive linking is needed during the process of generation itself. + let canQuery = (match asm with :? TargetAssembly as t -> t.Reader.IsSome | _ -> true) + + if not canQuery then None + elif restrictedAndMatching then None + elif asm.FullName.StartsWith "FSI-ASSEMBLY" then + // when F# Interactive is the host of the design time assembly, + // for each type in the runtime assembly there might be multiple + // versions (FSI_0001.FullTypeName, FSI_0002.FullTypeName, etc). + // Get the last one. + asm.GetTypes() + |> Seq.filter (fun t -> fixName t.FullName = fullName) + |> Seq.sortBy (fun t -> t.FullName) + |> Seq.toList + |> function [] -> None | xs -> Some (Seq.last xs, false) + else + asm.GetType fullName |> function null -> None | x -> Some (x, true) + + + let rec convTypeRef toTgt (t:Type) = + let table = (if toTgt then typeTableFwd else typeTableBwd) + match table.TryGetValue(t) with + | true, newT -> newT + | false, _ -> + match t with + | :? ProvidedTypeDefinition as ptd when toTgt (* && ptd.IsErased *) -> + if ptd.BelongsToTargetModel then failwithf "unexpected erased target ProvidedTypeDefinition '%O'" ptd + // recursively get the provided type. + convTypeDefToTgt t + + | _ -> + let asms = (if toTgt then getTargetAssemblies() else getSourceAssemblies()) + let fullName = fixName t.FullName + + // TODO: this linear search through all available source/target assemblies feels as if it must be too slow in some cases. + // However, we store type translations in various tables (typeTableFwd and typeTableBwd) so perhaps it is not a problem + match asms |> Seq.tryPick (tryGetTypeFromAssembly toTgt t.Assembly.FullName fullName) with + | Some (newT, canSave) -> + if canSave then table.[t] <- newT + newT + | _ -> + let msg = + if toTgt then sprintf "The design-time type '%O' utilized by a type provider was not found in the target reference assembly set '%A'. You may be referencing a profile which contains fewer types than those needed by the type provider you are using." t (getTargetAssemblies() |> Seq.toList) + elif getSourceAssemblies() |> Seq.length = 0 then sprintf "A failure occured while determining compilation references" + else sprintf "The target type '%O' utilized by a type provider was not found in the design-time assembly set '%A'. Please report this problem to the project site for the type provider." t (getSourceAssemblies() |> Seq.toList) + failwith msg + + + and convType toTgt (t:Type) = + let table = (if toTgt then typeTableFwd else typeTableBwd) + match table.TryGetValue(t) with + | true, newT -> newT + | false, _ -> + if t :? ProvidedTypeSymbol && (t :?> ProvidedTypeSymbol).IsFSharpTypeAbbreviation then t + // Types annotated with units-of-measure + elif t :? ProvidedTypeSymbol && (t :?> ProvidedTypeSymbol).IsFSharpUnitAnnotated then + let genericType = t.GetGenericTypeDefinition() + let newT = convTypeRef toTgt genericType + let typeArguments = t.GetGenericArguments() |> Array.map (convType toTgt) |> Array.toList + ProvidedMeasureBuilder.AnnotateType(newT, typeArguments) + elif t.IsGenericType && not t.IsGenericTypeDefinition then + let genericType = t.GetGenericTypeDefinition() + let newT = convTypeRef toTgt genericType + let typeArguments = t.GetGenericArguments() |> Array.map (convType toTgt) + newT.MakeGenericType(typeArguments) + elif t.IsGenericParameter then t + elif t.IsArray || t.IsByRef || t.IsPointer then + let elemType = t.GetElementType() + let elemTypeT = convType toTgt elemType + if t.IsArray then + let rank = t.GetArrayRank() + if rank = 1 then elemTypeT.MakeArrayType() else elemTypeT.MakeArrayType(t.GetArrayRank()) + elif t.IsByRef then elemTypeT.MakeByRefType() + else elemTypeT.MakePointerType() + + else + convTypeRef toTgt t + + and convTypeToTgt ty = convType true ty + and convTypeToSrc ty = convType false ty + + and convPropertyRefToTgt (p: PropertyInfo) = + Debug.Assert((match p with :? ProvidedProperty as x -> not x.BelongsToTargetModel | _ -> true), "unexpected target ProvidedProperty") + let t = convTypeToTgt p.DeclaringType + let bindingFlags = bindSome p.IsStatic + let pT = t.GetProperty(p.Name, bindingFlags) + if isNull pT then failwithf "Property '%O' of type '%O' not found. This property may be missing in the types available in the target assemblies." p t + Debug.Assert((match pT with :? ProvidedProperty as x -> x.BelongsToTargetModel | _ -> true), "expected a target ProvidedProperty") + pT + + and convFieldRefToTgt (f: FieldInfo) = + Debug.Assert((match f with :? ProvidedField as x -> not x.BelongsToTargetModel | _ -> true), "unexpected target ProvidedField") + let t = convTypeToTgt f.DeclaringType + let fT = t.GetField(f.Name, bindSome f.IsStatic) + if isNull fT then failwithf "Field '%O' of type '%O' not found. This field may be missing in the types available in the target assemblies." f t + Debug.Assert((match fT with :? ProvidedField as x -> x.BelongsToTargetModel | _ -> true), "expected a target ProvidedField") + fT + + and convMethodRefToTgt (m: MethodInfo) = + Debug.Assert((match m with :? ProvidedMethod as x -> not x.BelongsToTargetModel | _ -> true), "unexpected target ProvidedMethod") + //Debug.Assert (m.Name <> "get_Item1" || m.DeclaringType.Name <> "Tuple`2") + let declTyT = convTypeToTgt m.DeclaringType + let mT = + if m.IsGenericMethod then + let genericMethod = m.GetGenericMethodDefinition() + let parameterTypesT = genericMethod.GetParameters() |> Array.map (fun p -> convTypeToTgt p.ParameterType) + let genericMethodT = declTyT.GetMethod(genericMethod.Name, bindSome m.IsStatic, null, parameterTypesT, null) + if isNull genericMethodT then null else + let typeArgumentsT = m.GetGenericArguments() |> Array.map convTypeToTgt + genericMethodT.MakeGenericMethod(typeArgumentsT) + else + let parameterTypesT = m.GetParameters() |> Array.map (fun p -> convTypeToTgt p.ParameterType) + declTyT.GetMethod(m.Name, bindSome m.IsStatic, null, parameterTypesT, null) + match mT with + | null -> failwithf "Method '%O' not found in type '%O'. This method may be missing in the types available in the target assemblies." m mT + | _ -> + Debug.Assert((match mT with :? ProvidedMethod as x -> x.BelongsToTargetModel | _ -> true), "expected a target ProvidedMethod") + mT + + and convConstructorRefToTgt (cons: ConstructorInfo) = + Debug.Assert((match cons with :? ProvidedConstructor as x -> not x.BelongsToTargetModel | _ -> true), "unexpected target ProvidedConstructor") + let declTyT = convTypeToTgt cons.DeclaringType + let parameterTypesT = cons.GetParameters() |> Array.map (fun p -> convTypeToTgt p.ParameterType) + let consT = declTyT.GetConstructor(parameterTypesT) + match consT with + | null -> failwithf "Constructor '%O' not found in type '%O'. This constructor may be missing in the types available in the target assemblies." cons declTyT + | _ -> + Debug.Assert((match consT with :? ProvidedConstructor as x -> x.BelongsToTargetModel | _ -> true), "expected a target ProvidedConstructor") + consT + + and convVarToSrc (v: Var) = + match varTableBwd.TryGetValue v with + | true, v -> v + | false, _ -> + let newVar = Var (v.Name, convTypeToSrc v.Type, v.IsMutable) + // store the original var as we'll have to revert to it later + varTableBwd.Add(v, newVar) + varTableFwd.Add(newVar, v) + newVar + + and convVarExprToSrc quotation = + match quotation with + | ShapeVarUnchecked v -> + Expr.Var (convVarToSrc v) + | _ -> failwithf "Unexpected non-variable argument: %A" quotation + + and convVarToTgt (v: Var) = + match varTableFwd.TryGetValue v with + | true, v -> v + | false, _ -> + // It's a variable local to the quotation + let newVar = Var (v.Name, convTypeToTgt v.Type, v.IsMutable) + // store it so we reuse it from now on + varTableFwd.Add(v, newVar) + varTableBwd.Add(newVar, v) + newVar + + + and convExprToTgt quotation = + match quotation with + | Call (obj, m, args) -> + let mR = convMethodRefToTgt m + let argsR = List.map convExprToTgt args + match obj with + | Some obj -> Expr.CallUnchecked (convExprToTgt obj, mR, argsR) + | None -> Expr.CallUnchecked (mR, argsR) + | PropertyGet (obj, p, indexArgs) -> + let pR = convPropertyRefToTgt p + let indexArgsR = List.map convExprToTgt indexArgs + match obj with + | Some obj -> Expr.PropertyGetUnchecked (convExprToTgt obj, pR, indexArgsR) + | None -> Expr.PropertyGetUnchecked (pR, indexArgsR) + | PropertySet (obj, p, indexArgs, value) -> + let pR = convPropertyRefToTgt p + let indexArgsR = List.map convExprToTgt indexArgs + match obj with + | Some obj -> Expr.PropertySetUnchecked (convExprToTgt obj, pR, convExprToTgt value, indexArgsR) + | None -> Expr.PropertySetUnchecked (pR, convExprToTgt value, indexArgsR) + | NewObject (c, exprs) -> + let exprsR = List.map convExprToTgt exprs + Expr.NewObjectUnchecked (convConstructorRefToTgt c, exprsR) + | Coerce (expr, t) -> + Expr.Coerce (convExprToTgt expr, convTypeToTgt t) + | NewArray (t, exprs) -> + Expr.NewArrayUnchecked (convTypeToTgt t, List.map convExprToTgt exprs) + | NewTuple (exprs) -> + Expr.NewTuple (List.map convExprToTgt exprs) + | Lambda (v,expr) -> + Expr.Lambda (convVarToTgt v, convExprToTgt expr) + | TupleGet (expr, i) -> + Expr.TupleGetUnchecked (convExprToTgt expr, i) + | NewDelegate (t, vars, expr) -> + Expr.NewDelegateUnchecked (convTypeToTgt t, List.map convVarToTgt vars, convExprToTgt expr) + | FieldGet (obj, f) -> + match obj with + | Some obj -> Expr.FieldGetUnchecked (convExprToTgt obj, convFieldRefToTgt f) + | None -> Expr.FieldGetUnchecked (convFieldRefToTgt f) + | FieldSet (obj, f, value) -> + match obj with + | Some obj -> Expr.FieldSetUnchecked (convExprToTgt obj, convFieldRefToTgt f, convExprToTgt value) + | None -> Expr.FieldSetUnchecked (convFieldRefToTgt f, convExprToTgt value) + | Let (var, value, body) -> + Expr.LetUnchecked(convVarToTgt var, convExprToTgt value, convExprToTgt body) + + // Eliminate some F# constructs which do not cross-target well + | Application(f,e) -> + convExprToTgt (Expr.CallUnchecked(f, f.Type.GetMethod "Invoke", [ e ]) ) + | NewUnionCase(ci, es) -> + convExprToTgt (Expr.CallUnchecked(Reflection.FSharpValue.PreComputeUnionConstructorInfo ci, es) ) + | NewRecord(ci, es) -> + convExprToTgt (Expr.NewObjectUnchecked(FSharpValue.PreComputeRecordConstructorInfo ci, es) ) + | UnionCaseTest(e,uc) -> + let tagInfo = FSharpValue.PreComputeUnionTagMemberInfo uc.DeclaringType + let tagExpr = + match tagInfo with + | :? PropertyInfo as tagProp -> Expr.PropertyGetUnchecked(e,tagProp) + | :? MethodInfo as tagMeth -> + if tagMeth.IsStatic then Expr.CallUnchecked(tagMeth, [e]) + else Expr.CallUnchecked(e,tagMeth,[]) + | _ -> failwith "unreachable: unexpected result from PreComputeUnionTagMemberInfo" + let tagNumber = uc.Tag + convExprToTgt <@@ (%%(tagExpr): int) = tagNumber @@> + + | Value (obj,ty) -> + match obj with + | :? Type as vty -> Expr.Value(convTypeToTgt vty, ty) + | _ -> Expr.Value(obj, convTypeToTgt ty) + + // Traverse remaining constructs + | ShapeVarUnchecked v -> + Expr.Var (convVarToTgt v) + | ShapeLambdaUnchecked _ as d -> + failwithf "It's not possible to use construct %O when cross targetting to a different FSharp.Core. Make sure you're not calling a function with signature A->(B->C) instead of A->B->C (using |> causes this)." d + | ShapeCombinationUnchecked (o, exprs) -> + RebuildShapeCombinationUnchecked (o, List.map convExprToTgt exprs) + + and convCodeToTgt (codeFun: Expr list -> Expr, isStatic, isCtor, parameters: ProvidedParameter[], isGenerated) = + (fun argsT -> + let args = List.map convVarExprToSrc argsT + let paramNames = + // https://github.com/fsprojects/SwaggerProvider/blob/cfb7a665fada77fd0200591f62faba0ba44e172c/src/SwaggerProvider.DesignTime/SwaggerProviderConfig.fs#L79 + // "Erased constructors should not pass the instance as the first argument when calling invokeCode!" + // "Generated constructors should always pass the instance as the first argument when calling invokeCode!" + [| if not isStatic && (not isCtor || isGenerated) then yield "this" + for p in parameters do yield p.Name |] + let code2 = QuotationSimplifier(isGenerated).TranslateQuotationToCode codeFun paramNames (Array.ofList args) + let codeT = convExprToTgt code2 + codeT) + + and convBaseCallToTgt (codeFun: Expr list -> ConstructorInfo * Expr list, isGenerated) = + (fun argsT -> + let args = List.map convVarExprToSrc argsT + let ctor, argExprs = codeFun args + let argExprs2 = List.map (QuotationSimplifier(isGenerated).TranslateExpression) argExprs + //let code2 = QuotationSimplifier(false).TranslateQuotationToCode code paramNames + let ctorT = convConstructorRefToTgt ctor + let codeT = List.map convExprToTgt argExprs2 + ctorT, codeT) + + and convCustomAttributesDataToTgt (d: IList) = Seq.toArray d // TODO: Consider converting these + + and convProvidedTypeDefToTgt (x: ProvidedTypeDefinition) = + if x.BelongsToTargetModel then failwithf "unexpected target type definition '%O'" x + match typeTableFwd.TryGetValue(x) with + | true, newT -> (newT :?> ProvidedTypeDefinition) + | false, _ -> + let container = + match x.Container with + | TypeContainer.Namespace(assemf, nm) -> + TypeContainer.Namespace((fun () -> + match assemf() with + | :? ProvidedAssembly as assembly -> convProvidedAssembly assembly + | assembly -> + assemblyReplacementMap + |> Seq.tryPick (fun (originalName, newName) -> + if assembly.GetName().Name = originalName then + match this.TryBindSimpleAssemblyNameToTarget(newName) with + | Choice1Of2 replacementAssembly -> Some replacementAssembly + | Choice2Of2 _ -> None + else + None) + |> function None -> assembly | Some replacementAssembly -> replacementAssembly + ), nm) + | c -> c // nested types patched below + + // Create the type definition with contents mapped to the target + // Use a 'let rec' to allow access to the target as the declaring + // type of the contents in a delayed way. + let rec xT : ProvidedTypeDefinition = + ProvidedTypeDefinition(true, container, x.Name, + (x.BaseTypeRaw >> Option.map convTypeToTgt), + x.AttributesRaw, + (x.EnumUnderlyingTypeRaw >> Option.map convTypeToTgt), + x.StaticParams |> List.map convStaticParameterDefToTgt, + x.StaticParamsApply |> Option.map (fun f s p -> + let t = f s p + let tT = convProvidedTypeDefToTgt t + tT), + Some ((let mutable idx = 0 in fun () -> let vs, idx2 = x.GetMembersFromCursor(idx) in idx <- idx2; vs |> Array.map (convMemberDefToTgt xT)), + (let mutable idx = 0 in fun () -> let vs, idx2 = x.GetInterfaceImplsFromCursor(idx) in idx <- idx2; vs |> Array.map convTypeToTgt), + (let mutable idx = 0 in fun () -> let vs, idx2 = x.GetMethodOverridesFromCursor(idx) in idx <- idx2; vs |> Array.map (fun (a,b) -> (convMethodRefToTgt a :?> ProvidedMethod), convMethodRefToTgt b))), + (x.GetCustomAttributesData >> convCustomAttributesDataToTgt), + x.HideObjectMethods, + x.NonNullable) + + Debug.Assert(not (typeTableFwd.ContainsKey(x))) + typeTableFwd.[x] <- xT + if x.IsNested then + let parentT = (convTypeToTgt x.DeclaringType :?> ProvidedTypeDefinition) + parentT.PatchDeclaringTypeOfMember xT + xT + + and convTypeDefToTgt (x: Type) = + match x with + | :? ProvidedTypeDefinition as x -> convProvidedTypeDefToTgt x :> Type + | _ -> x + + and convParameterDefToTgt (x: ProvidedParameter) = + Debug.Assert (not x.BelongsToTargetModel, "unexpected target ProvidedParameter") + ProvidedParameter(true, x.Name, x.Attributes, + x.ParameterType |> convTypeToTgt, + x.OptionalValue, + (x.GetCustomAttributesData >> convCustomAttributesDataToTgt)) + + and convStaticParameterDefToTgt (x: ProvidedStaticParameter) = + Debug.Assert (not x.BelongsToTargetModel, "unexpected target ProvidedStaticParameter") + ProvidedStaticParameter(x.Name, convTypeToTgt x.ParameterType, ?parameterDefaultValue=x.ParameterDefaultValue) + + and convMemberDefToTgt declTyT (x: MemberInfo) = + let xT : MemberInfo = + match x with + | :? ProvidedField as x -> + Debug.Assert (not x.BelongsToTargetModel, "unexpected target ProvidedField") + ProvidedField(true, x.Name, x.Attributes, + x.FieldType |> convTypeToTgt, + x.GetRawConstantValue(), + (x.GetCustomAttributesData >> convCustomAttributesDataToTgt)) :> _ + | :? ProvidedProperty as x -> + Debug.Assert (not x.BelongsToTargetModel, "unexpected target ProvidedProperty") + ProvidedProperty(true, x.Name, x.Attributes, + x.PropertyType |> convTypeToTgt, + x.IsStatic, + x.Getter |> Option.map (fun f -> f >> convMethodRefToTgt), + x.Setter |> Option.map (fun f -> f >> convMethodRefToTgt), + x.IndexParameters |> Array.map convParameterDefToTgt, + (x.GetCustomAttributesData >> convCustomAttributesDataToTgt)) :> _ + | :? ProvidedEvent as x -> + Debug.Assert (not x.BelongsToTargetModel, "unexpected target ProvidedEvent") + ProvidedEvent(true, x.Name, x.Attributes, + x.EventHandlerType |> convTypeToTgt, + x.IsStatic, + (fun () -> convMethodRefToTgt x.Adder), + (fun () -> convMethodRefToTgt x.Remover), + (x.GetCustomAttributesData >> convCustomAttributesDataToTgt)) :> _ + | :? ProvidedConstructor as x -> + Debug.Assert (not x.BelongsToTargetModel, "unexpected target ProvidedConstructor") + ProvidedConstructor(true, x.Attributes, + x.Parameters |> Array.map convParameterDefToTgt, + convCodeToTgt (x.GetInvokeCode, x.IsStatic, true, x.Parameters, not x.IsErased), + (match x.BaseCall with None -> None | Some f -> Some (convBaseCallToTgt(f, not x.IsErased))), + x.IsImplicitConstructor, + (x.GetCustomAttributesData >> convCustomAttributesDataToTgt)) :> _ + | :? ProvidedMethod as x -> + Debug.Assert (not x.BelongsToTargetModel, "unexpected target ProvidedMethod") + ProvidedMethod(true, x.Name, x.Attributes, + x.Parameters |> Array.map convParameterDefToTgt, + x.ReturnType |> convTypeToTgt, + convCodeToTgt (x.GetInvokeCode, x.IsStatic, false, x.Parameters, not x.IsErased), + x.StaticParams |> List.map convStaticParameterDefToTgt, + x.StaticParamsApply |> Option.map (fun f s p -> f s p |> convProvidedMethodDefToTgt declTyT), + (x.GetCustomAttributesData >> convCustomAttributesDataToTgt)) :> _ + | :? ProvidedTypeDefinition as x -> convTypeDefToTgt x :> _ + | _ -> failwith "unknown member type" + Debug.Assert(declTyT.BelongsToTargetModel) + declTyT.PatchDeclaringTypeOfMember xT + Debug.Assert(xT.DeclaringType :? ProvidedTypeDefinition) + Debug.Assert((xT.DeclaringType :?> ProvidedTypeDefinition).BelongsToTargetModel) + xT + + and convProvidedMethodDefToTgt declTyT (x: ProvidedMethod) = + convMemberDefToTgt declTyT x :?> ProvidedMethod + + and convProvidedAssembly (assembly: ProvidedAssembly) = + match assemblyTableFwd.TryGetValue(assembly) with + | true, newT -> newT + | false, _ -> + let tgtAssembly = ProvidedAssembly(true, assembly.GetName(), assembly.Location) + + for (types, enclosingGeneratedTypeNames) in assembly.GetTheTypes() do + let typesT = Array.map convProvidedTypeDefToTgt types + tgtAssembly.AddTheTypes (typesT, enclosingGeneratedTypeNames) + + assemblyTableFwd.Add(assembly, tgtAssembly) + this.AddSourceAssembly(assembly) + this.AddTargetAssembly(assembly.GetName(), tgtAssembly) + (tgtAssembly :> Assembly) + + let rec convNamespaceToTgt (x: IProvidedNamespace) = + { new IProvidedNamespace with + member __.GetNestedNamespaces() = Array.map convNamespaceToTgt (x.GetNestedNamespaces()) + member __.NamespaceName = x.NamespaceName + member __.GetTypes() = Array.map convTypeDefToTgt (x.GetTypes()) + member __.ResolveTypeName typeName = convTypeDefToTgt (x.ResolveTypeName typeName) } + + /// Gets the equivalent target type + member __.ConvertSourceTypeToTarget t = convTypeToTgt t + + member __.ConvertTargetTypeToSource t = convTypeToSrc t + + member __.ConvertSourceExprToTarget e = convExprToTgt e + + member __.ConvertSourceNamespaceToTarget ns = convNamespaceToTgt ns + member __.ConvertSourceProvidedTypeDefinitionToTarget ptd = convProvidedTypeDefToTgt ptd + member __.TryBindILAssemblyRefToTgt(aref: ILAssemblyRef): Choice = tryBindTargetAssemblySimple(aref.Name) + + member __.TryBindAssemblyNameToTarget(aref: AssemblyName): Choice = tryBindTargetAssemblySimple(aref.Name) + + member __.TryBindSimpleAssemblyNameToTarget(assemblyName: string) = tryBindTargetAssemblySimple(assemblyName) + + member __.ILGlobals = ilGlobals.Value + + member __.ReferencedAssemblyPaths = referencedAssemblyPaths + + member __.GetTargetAssemblies() = getTargetAssemblies().ToArray() + + member __.GetSourceAssemblies() = getSourceAssemblies().ToArray() + + member __.FSharpCoreAssemblyVersion = fsharpCoreRefVersion.Force() + + member this.ReadRelatedAssembly(fileName) = + let ilg = ilGlobals.Force() + let reader = ILModuleReaderAfterReadingAllBytes(fileName, ilg) + TargetAssembly(ilg, this.TryBindILAssemblyRefToTgt, Some reader, fileName) :> Assembly + + member this.ReadRelatedAssembly(bytes:byte[]) = + let fileName = "file.dll" + let ilg = ilGlobals.Force() + let reader = ILModuleReader(fileName, ByteFile(bytes), ilg, true) + TargetAssembly(ilg, this.TryBindILAssemblyRefToTgt, Some reader, fileName) :> Assembly + + member __.AddSourceAssembly(asm: Assembly) = + sourceAssembliesQueue.Add (fun () -> [| asm |]) + + member __.AddTargetAssembly(asmName: AssemblyName, asm: Assembly) = + targetAssembliesQueue.Add (fun () -> + targetAssembliesTable_.[asmName.Name] <- Choice1Of2 asm + targetAssemblies_.Add asm) + + static member Create (config: TypeProviderConfig, assemblyReplacementMap, sourceAssemblies) = + + // Use the reflection hack to determine the set of referenced assemblies by reflecting over the SystemRuntimeContainsType + // closure in the TypeProviderConfig object. + let referencedAssemblyPaths = + try + + let hostConfigType = config.GetType() + let hostAssembly = hostConfigType.Assembly + let hostAssemblyLocation = hostAssembly.Location + + let msg = sprintf "Host is assembly '%A' at location '%s'" (hostAssembly.GetName()) hostAssemblyLocation + + if isNull (hostConfigType.GetField("systemRuntimeContainsType",bindAll)) then + failwithf "Invalid host of cross-targeting type provider: a field called systemRuntimeContainsType must exist in the TypeProviderConfiguration object. Please check that the type provider being hosted by the F# compiler tools or a simulation of them. %s" msg + + let systemRuntimeContainsTypeObj = config.GetField("systemRuntimeContainsType") + + // Account for https://github.com/Microsoft/visualfsharp/pull/591 + let systemRuntimeContainsTypeObj2 = + if systemRuntimeContainsTypeObj.HasField("systemRuntimeContainsTypeRef") then + systemRuntimeContainsTypeObj.GetField("systemRuntimeContainsTypeRef").GetProperty("Value") + else + systemRuntimeContainsTypeObj + + if not (systemRuntimeContainsTypeObj2.HasField("tcImports")) then + failwithf "Invalid host of cross-targeting type provider: a field called tcImports must exist in the systemRuntimeContainsType closure. Please check that the type provider being hosted by the F# compiler tools or a simulation of them. %s" msg + + let tcImports = systemRuntimeContainsTypeObj2.GetField("tcImports") + + if not (tcImports.HasField("dllInfos")) then + failwithf "Invalid host of cross-targeting type provider: a field called dllInfos must exist in the tcImports object. Please check that the type provider being hosted by the F# compiler tools or a simulation of them. %s" msg + + if not (tcImports.HasProperty("Base")) then + failwithf "Invalid host of cross-targeting type provider: a field called Base must exist in the tcImports object. Please check that the type provider being hosted by the F# compiler tools or a simulation of them. %s" msg + + let dllInfos = tcImports.GetField("dllInfos") + if isNull dllInfos then + let ty = dllInfos.GetType() + let fld = ty.GetField("dllInfos", bindAll) + failwithf """Invalid host of cross-targeting type provider: unexpected 'null' value in dllInfos field of TcImports, ty = %A, fld = %A. %s""" ty fld msg + + let baseObj = tcImports.GetProperty("Base") + + [ for dllInfo in dllInfos.GetElements() -> (dllInfo.GetProperty("FileName") :?> string) + if not (isNull baseObj) then + let baseObjValue = baseObj.GetProperty("Value") + if isNull baseObjValue then + let ty = baseObjValue.GetType() + let prop = ty.GetProperty("Value", bindAll) + failwithf """Invalid host of cross-targeting type provider: unexpected 'null' value in Value property of baseObj, ty = %A, prop = %A. %s""" ty prop msg + + let baseDllInfos = baseObjValue.GetField("dllInfos") + + if isNull baseDllInfos then + let ty = baseDllInfos.GetType() + let fld = ty.GetField("dllInfos", bindAll) + failwithf """Invalid host of cross-targeting type provider: unexpected 'null' value in dllInfos field of baseDllInfos, ty = %A, fld = %A. %s""" ty fld msg + + for baseDllInfo in baseDllInfos.GetElements() -> (baseDllInfo.GetProperty("FileName") :?> string) ] + with e -> + failwithf "Invalid host of cross-targeting type provider. Exception: %A" e + + + ProvidedTypesContext(referencedAssemblyPaths, assemblyReplacementMap, sourceAssemblies) + + + +#if !NO_GENERATIVE + +namespace ProviderImplementation.ProvidedTypes + + #nowarn "1182" + module BinaryWriter = + + open System + open System.Diagnostics + open System.IO + open System.Collections.Concurrent + open System.Collections.Generic + open System.Reflection + open System.Text + + open Microsoft.FSharp.Quotations + open Microsoft.FSharp.Quotations.DerivedPatterns + open Microsoft.FSharp.Quotations.Patterns + open Microsoft.FSharp.Quotations.ExprShape + open Microsoft.FSharp.Core.CompilerServices + open Microsoft.FSharp.Reflection + + open ProviderImplementation.ProvidedTypes + open ProviderImplementation.ProvidedTypes.AssemblyReader + open ProviderImplementation.ProvidedTypes.UncheckedQuotations + + let formatCodeLabel (x:int) = "L"+string x + + let emitBytesViaBuffer f = let bb = ByteBuffer.Create 10 in f bb; bb.Close() + + /// Alignment and padding + let align alignment n = ((n + alignment - 1) / alignment) * alignment + + //--------------------------------------------------------------------- + // Concrete token representations etc. used in PE files + //--------------------------------------------------------------------- + + + let getUncodedToken (tab:ILTableName) idx = ((tab.Index <<< 24) ||| idx) + + let markerForUnicodeBytes (b:byte[]) = + let len = b.Length + let rec scan i = + i < len/2 && + (let b1 = Bytes.get b (i*2) + let b2 = Bytes.get b (i*2+1) + (b2 <> 0) + || (b1 >= 0x01 && b1 <= 0x08) // as per ECMA and C# + || (b1 >= 0xE && b1 <= 0x1F) // as per ECMA and C# + || (b1 = 0x27) // as per ECMA and C# + || (b1 = 0x2D) // as per ECMA and C# + || (b1 > 0x7F) // as per C# (but ECMA omits this) + || scan (i+1)) + let marker = if scan 0 then 0x01 else 0x00 + marker + + + // -------------------------------------------------------------------- + // Fixups + // -------------------------------------------------------------------- + + /// Check that the data held at a fixup is some special magic value, as a sanity check + /// to ensure the fixup is being placed at a ood location. + let checkFixup32 (data: byte[]) offset exp = + if data.[offset + 3] <> b3 exp then failwith "fixup sanity check failed" + if data.[offset + 2] <> b2 exp then failwith "fixup sanity check failed" + if data.[offset + 1] <> b1 exp then failwith "fixup sanity check failed" + if data.[offset] <> b0 exp then failwith "fixup sanity check failed" + + let applyFixup32 (data:byte[]) offset v = + data.[offset] <- b0 v + data.[offset+1] <- b1 v + data.[offset+2] <- b2 v + data.[offset+3] <- b3 v + + //--------------------------------------------------------------------- + // TYPES FOR TABLES + //--------------------------------------------------------------------- + + module RowElementTags = + let [] UShort = 0 + let [] ULong = 1 + let [] Data = 2 + let [] DataResources = 3 + let [] Guid = 4 + let [] Blob = 5 + let [] String = 6 + let [] SimpleIndexMin = 7 + let SimpleIndex (t: ILTableName) = assert (t.Index <= 112); SimpleIndexMin + t.Index + let [] SimpleIndexMax = 119 + + let [] TypeDefOrRefOrSpecMin = 120 + let TypeDefOrRefOrSpec (t: TypeDefOrRefOrSpecTag) = assert (t.Tag <= 2); TypeDefOrRefOrSpecMin + t.Tag (* + 111 + 1 = 0x70 + 1 = max ILTableName.Tndex + 1 *) + let [] TypeDefOrRefOrSpecMax = 122 + + let [] TypeOrMethodDefMin = 123 + let TypeOrMethodDef (t: TypeOrMethodDefTag) = assert (t.Tag <= 1); TypeOrMethodDefMin + t.Tag (* + 2 + 1 = max TypeDefOrRefOrSpec.Tag + 1 *) + let [] TypeOrMethodDefMax = 124 + + let [] HasConstantMin = 125 + let HasConstant (t: HasConstantTag) = assert (t.Tag <= 2); HasConstantMin + t.Tag (* + 1 + 1 = max TypeOrMethodDef.Tag + 1 *) + let [] HasConstantMax = 127 + + let [] HasCustomAttributeMin = 128 + let HasCustomAttribute (t: HasCustomAttributeTag) = assert (t.Tag <= 21); HasCustomAttributeMin + t.Tag (* + 2 + 1 = max HasConstant.Tag + 1 *) + let [] HasCustomAttributeMax = 149 + + let [] HasFieldMarshalMin = 150 + let HasFieldMarshal (t: HasFieldMarshalTag) = assert (t.Tag <= 1); HasFieldMarshalMin + t.Tag (* + 21 + 1 = max HasCustomAttribute.Tag + 1 *) + let [] HasFieldMarshalMax = 151 + + let [] HasDeclSecurityMin = 152 + let HasDeclSecurity (t: HasDeclSecurityTag) = assert (t.Tag <= 2); HasDeclSecurityMin + t.Tag (* + 1 + 1 = max HasFieldMarshal.Tag + 1 *) + let [] HasDeclSecurityMax = 154 + + let [] MemberRefParentMin = 155 + let MemberRefParent (t: MemberRefParentTag) = assert (t.Tag <= 4); MemberRefParentMin + t.Tag (* + 2 + 1 = max HasDeclSecurity.Tag + 1 *) + let [] MemberRefParentMax = 159 + + let [] HasSemanticsMin = 160 + let HasSemantics (t: HasSemanticsTag) = assert (t.Tag <= 1); HasSemanticsMin + t.Tag (* + 4 + 1 = max MemberRefParent.Tag + 1 *) + let [] HasSemanticsMax = 161 + + let [] MethodDefOrRefMin = 162 + let MethodDefOrRef (t: MethodDefOrRefTag) = assert (t.Tag <= 2); MethodDefOrRefMin + t.Tag (* + 1 + 1 = max HasSemantics.Tag + 1 *) + let [] MethodDefOrRefMax = 164 + + let [] MemberForwardedMin = 165 + let MemberForwarded (t: MemberForwardedTag) = assert (t.Tag <= 1); MemberForwardedMin + t.Tag (* + 2 + 1 = max MethodDefOrRef.Tag + 1 *) + let [] MemberForwardedMax = 166 + + let [] ImplementationMin = 167 + let Implementation (t: ImplementationTag) = assert (t.Tag <= 2); ImplementationMin + t.Tag (* + 1 + 1 = max MemberForwarded.Tag + 1 *) + let [] ImplementationMax = 169 + + let [] CustomAttributeTypeMin = 170 + let CustomAttributeType (t: CustomAttributeTypeTag) = assert (t.Tag <= 3); CustomAttributeTypeMin + t.Tag (* + 2 + 1 = max Implementation.Tag + 1 *) + let [] CustomAttributeTypeMax = 173 + + let [] ResolutionScopeMin = 174 + let ResolutionScope (t: ResolutionScopeTag) = assert (t.Tag <= 4); ResolutionScopeMin + t.Tag (* + 3 + 1 = max CustomAttributeType.Tag + 1 *) + let [] ResolutionScopeMax = 178 + + [] + type RowElement(tag:int32, idx: int32) = + + member __.Tag = tag + member __.Val = idx + + // These create RowElements + let UShort (x:uint16) = RowElement(RowElementTags.UShort, int32 x) + let ULong (x:int32) = RowElement(RowElementTags.ULong, x) + /// Index into cenv.data or cenv.resources. Gets fixed up later once we known an overall + /// location for the data section. flag indicates if offset is relative to cenv.resources. + let Data (x:int, k:bool) = RowElement((if k then RowElementTags.DataResources else RowElementTags.Data ), x) + /// pos. in guid array + let Guid (x:int) = RowElement(RowElementTags.Guid, x) + /// pos. in blob array + let Blob (x:int) = RowElement(RowElementTags.Blob, x) + /// pos. in string array + let StringE (x:int) = RowElement(RowElementTags.String, x) + /// pos. in some table + let SimpleIndex (t, x:int) = RowElement(RowElementTags.SimpleIndex t, x) + let TypeDefOrRefOrSpec (t, x:int) = RowElement(RowElementTags.TypeDefOrRefOrSpec t, x) + let TypeOrMethodDef (t, x:int) = RowElement(RowElementTags.TypeOrMethodDef t, x) + let HasConstant (t, x:int) = RowElement(RowElementTags.HasConstant t, x) + let HasCustomAttribute (t, x:int) = RowElement(RowElementTags.HasCustomAttribute t, x) + let HasFieldMarshal (t, x:int) = RowElement(RowElementTags.HasFieldMarshal t, x) + let HasDeclSecurity (t, x:int) = RowElement(RowElementTags.HasDeclSecurity t, x) + let MemberRefParent (t, x:int) = RowElement(RowElementTags.MemberRefParent t, x) + let HasSemantics (t, x:int) = RowElement(RowElementTags.HasSemantics t, x) + let MethodDefOrRef (t, x:int) = RowElement(RowElementTags.MethodDefOrRef t, x) + let MemberForwarded (t, x:int) = RowElement(RowElementTags.MemberForwarded t, x) + let Implementation (t, x:int) = RowElement(RowElementTags.Implementation t, x) + let CustomAttributeType (t, x:int) = RowElement(RowElementTags.CustomAttributeType t, x) + let ResolutionScope (t, x:int) = RowElement(RowElementTags.ResolutionScope t, x) + + type BlobIndex = int + type StringIndex = int + + let BlobIndex (x:BlobIndex): int = x + let StringIndex (x:StringIndex): int = x + + let inline combineHash x2 acc = 37 * acc + x2 // (acc <<< 6 + acc >>> 2 + x2 + 0x9e3779b9) + + let hashRow (elems:RowElement[]) = + let mutable acc = 0 + for i in 0 .. elems.Length - 1 do + acc <- (acc <<< 1) + elems.[i].Tag + elems.[i].Val + 631 + acc + + let equalRows (elems:RowElement[]) (elems2:RowElement[]) = + if elems.Length <> elems2.Length then false else + let mutable ok = true + let n = elems.Length + let mutable i = 0 + while ok && i < n do + if elems.[i].Tag <> elems2.[i].Tag || elems.[i].Val <> elems2.[i].Val then ok <- false + i <- i + 1 + ok + + + type GenericRow = RowElement[] + + /// This is the representation of shared rows is used for most shared row types. + /// Rows ILAssemblyRef and ILMethodRef are very common and are given their own + /// representations. + [] + type SharedRow(elems: RowElement[], hashCode: int) = + member __.GenericRow = elems + override __.GetHashCode() = hashCode + override __.Equals(obj:obj) = + match obj with + | :? SharedRow as y -> equalRows elems y.GenericRow + | _ -> false + + let SharedRow(elems: RowElement[]) = new SharedRow(elems, hashRow elems) + + /// Special representation: Note, only hashing by name + let AssemblyRefRow(s1, s2, s3, s4, l1, b1, nameIdx, str2, b2) = + let hashCode = hash nameIdx + let genericRow = [| UShort s1; UShort s2; UShort s3; UShort s4; ULong l1; Blob b1; StringE nameIdx; StringE str2; Blob b2 |] + new SharedRow(genericRow, hashCode) + + /// Special representation the computes the hash more efficiently + let MemberRefRow(mrp:RowElement, nmIdx:StringIndex, blobIdx:BlobIndex) = + let hashCode = combineHash (hash blobIdx) (combineHash (hash nmIdx) (hash mrp)) + let genericRow = [| mrp; StringE nmIdx; Blob blobIdx |] + new SharedRow(genericRow, hashCode) + + /// Unshared rows are used for definitional tables where elements do not need to be made unique + /// e.g. ILMethodDef and ILTypeDef. Most tables are like this. We don't precompute a + /// hash code for these rows, and indeed the GetHashCode and Equals should not be needed. + [] + type UnsharedRow(elems: RowElement[]) = + member __.GenericRow = elems + override __.GetHashCode() = hashRow elems + override __.Equals(obj:obj) = + match obj with + | :? UnsharedRow as y -> equalRows elems y.GenericRow + | _ -> false + + + //===================================================================== + //===================================================================== + // IL --> TABLES+CODE + //===================================================================== + //===================================================================== + + // This environment keeps track of how many generic parameters are in scope. + // This lets us translate AbsIL type variable number to IL type variable numbering + type ILTypeWriterEnv = { EnclosingTyparCount: int } + let envForTypeDef (td:ILTypeDef) = { EnclosingTyparCount=td.GenericParams.Length } + let envForMethodRef env (typ:ILType) = { EnclosingTyparCount=(match typ with ILType.Array _ -> env.EnclosingTyparCount | _ -> typ.GenericArgs.Length) } + let envForNonGenericMethodRef _mref = { EnclosingTyparCount=System.Int32.MaxValue } + let envForFieldSpec (fspec:ILFieldSpec) = { EnclosingTyparCount=fspec.EnclosingType.GenericArgs.Length } + let envForOverrideSpec (ospec:ILOverridesSpec) = { EnclosingTyparCount=ospec.EnclosingType.GenericArgs.Length } + + //--------------------------------------------------------------------- + // TABLES + //--------------------------------------------------------------------- + + [] + type MetadataTable<'T> = + { name: string + dict: Dictionary<'T, int> // given a row, find its entry number + mutable rows: ResizeArray<'T> } + member x.Count = x.rows.Count + + static member New(nm, hashEq) = + { name=nm + dict = new Dictionary<_, _>(100, hashEq) + rows= new ResizeArray<_>() } + + member tbl.EntriesAsArray = + tbl.rows.ToArray() + + member tbl.Entries = + tbl.rows.ToArray() |> Array.toList + + member tbl.AddSharedEntry x = + let n = tbl.rows.Count + 1 + tbl.dict.[x] <- n + tbl.rows.Add(x) + n + + member tbl.AddUnsharedEntry x = + let n = tbl.rows.Count + 1 + tbl.rows.Add(x) + n + + member tbl.FindOrAddSharedEntry x = + let mutable res = Unchecked.defaultof<_> + let ok = tbl.dict.TryGetValue(x, &res) + if ok then res + else tbl.AddSharedEntry x + + + /// This is only used in one special place - see further below. + member tbl.SetRowsOfTable (t: _[]) = + tbl.rows <- ResizeArray(t) + let h = tbl.dict + h.Clear() + t |> Array.iteri (fun i x -> h.[x] <- (i+1)) + + member tbl.AddUniqueEntry nm geterr x = + if tbl.dict.ContainsKey x then failwith ("duplicate entry '"+geterr x+"' in "+nm+" table") + else tbl.AddSharedEntry x + + member tbl.GetTableEntry x = tbl.dict.[x] + member tbl.GetTableKeys() = tbl.dict.Keys |> Seq.toArray + + //--------------------------------------------------------------------- + // Keys into some of the tables + //--------------------------------------------------------------------- + + /// We use this key type to help find ILMethodDefs for MethodRefs + type MethodDefKey(tidx:int, garity:int, nm:string, rty:ILType, argtys:ILTypes, isStatic:bool) = + // Precompute the hash. The hash doesn't include the return type or + // argument types (only argument type count). This is very important, since + // hashing these is way too expensive + let hashCode = + hash tidx + |> combineHash (hash garity) + |> combineHash (hash nm) + |> combineHash (hash argtys.Length) + |> combineHash (hash isStatic) + member __.TypeIdx = tidx + member __.GenericArity = garity + member __.Name = nm + member __.ReturnType = rty + member __.ArgTypes = argtys + member __.IsStatic = isStatic + override __.ToString() = sprintf "%A" (tidx, garity, nm, rty, argtys, isStatic) + override __.GetHashCode() = hashCode + override __.Equals(obj:obj) = + match obj with + | :? MethodDefKey as y -> + tidx = y.TypeIdx && + garity = y.GenericArity && + nm = y.Name && + // note: these next two use structural equality on AbstractIL ILType values + rty = y.ReturnType && + argtys = y.ArgTypes && + isStatic = y.IsStatic + | _ -> false + + /// We use this key type to help find ILFieldDefs for FieldRefs + type FieldDefKey(tidx:int, nm:string, ty:ILType) = + // precompute the hash. hash doesn't include the type + let hashCode = hash tidx |> combineHash (hash nm) + member __.TypeIdx = tidx + member __.Name = nm + member __.Type = ty + override __.GetHashCode() = hashCode + override __.Equals(obj:obj) = + match obj with + | :? FieldDefKey as y -> + tidx = y.TypeIdx && + nm = y.Name && + ty = y.Type + | _ -> false + + type PropertyTableKey = PropKey of int (* type. def. idx. *) * string * ILType * ILTypes + type EventTableKey = EventKey of int (* type. def. idx. *) * string + type TypeDefTableKey = TdKey of string list * string uoption * string + + //--------------------------------------------------------------------- + // The Writer Target + //--------------------------------------------------------------------- + + [] + type MetadataTable = + | Shared of MetadataTable + | Unshared of MetadataTable + member t.FindOrAddSharedEntry(x) = match t with Shared u -> u.FindOrAddSharedEntry(x) | Unshared u -> failwithf "FindOrAddSharedEntry: incorrect table kind, u.name = %s" u.name + member t.AddSharedEntry(x) = match t with | Shared u -> u.AddSharedEntry(x) | Unshared u -> failwithf "AddSharedEntry: incorrect table kind, u.name = %s" u.name + member t.AddUnsharedEntry(x) = match t with Unshared u -> u.AddUnsharedEntry(x) | Shared u -> failwithf "AddUnsharedEntry: incorrect table kind, u.name = %s" u.name + member t.GenericRowsOfTable = match t with Unshared u -> u.EntriesAsArray |> Array.map (fun x -> x.GenericRow) | Shared u -> u.EntriesAsArray |> Array.map (fun x -> x.GenericRow) + member t.SetRowsOfSharedTable rows = match t with Shared u -> u.SetRowsOfTable (Array.map SharedRow rows) | Unshared u -> failwithf "SetRowsOfSharedTable: incorrect table kind, u.name = %s" u.name + member t.Count = match t with Unshared u -> u.Count | Shared u -> u.Count + + + [] + type cenv = + { ilg: ILGlobals + emitTailcalls: bool + deterministic: bool + showTimes: bool + desiredMetadataVersion: Version + requiredDataFixups: ResizeArray<(int32 * (int * bool))> + /// References to strings in codestreams: offset of code and a (fixup-location , string token) list) + mutable requiredStringFixups: ResizeArray<(int32 * (int * int)[])> + codeChunks: ByteBuffer + mutable nextCodeAddr: int32 + + // Collected debug information + mutable moduleGuid: byte[] + generatePdb: bool + /// Raw data, to go into the data section + data: ByteBuffer + /// Raw resource data, to go into the data section + resources: ByteBuffer + mutable entrypoint: (bool * int) option + + /// Caches + trefCache: Dictionary + + /// The following are all used to generate unique items in the output + tables: MetadataTable[] + AssemblyRefs: MetadataTable + fieldDefs: MetadataTable + methodDefIdxsByKey: MetadataTable + methodDefIdxs: Dictionary + propertyDefs: MetadataTable + eventDefs: MetadataTable + typeDefs: MetadataTable + guids: MetadataTable + blobs: MetadataTable + strings: MetadataTable + userStrings: MetadataTable + } + member cenv.GetTable (tab:ILTableName) = cenv.tables.[tab.Index] + + + member cenv.AddCode ((reqdStringFixupsOffset, requiredStringFixups), code) = + cenv.requiredStringFixups.Add ((cenv.nextCodeAddr + reqdStringFixupsOffset, requiredStringFixups)) + cenv.codeChunks.EmitBytes code + cenv.nextCodeAddr <- cenv.nextCodeAddr + code.Length + + member cenv.GetCode() = cenv.codeChunks.Close() + + + let FindOrAddSharedRow (cenv:cenv) tbl x = cenv.GetTable(tbl).FindOrAddSharedEntry x + + // Shared rows must be hash-cons'd to be made unique (no duplicates according to contents) + let AddSharedRow (cenv:cenv) tbl x = cenv.GetTable(tbl).AddSharedEntry x + + // Unshared rows correspond to definition elements (e.g. a ILTypeDef or a ILMethodDef) + let AddUnsharedRow (cenv:cenv) tbl (x:UnsharedRow) = cenv.GetTable(tbl).AddUnsharedEntry x + + let metadataSchemaVersionSupportedByCLRVersion v = 2, 0 + + let headerVersionSupportedByCLRVersion v = + // The COM20HEADER version number + // Whidbey version numbers are 2.5 + // Earlier are 2.0 + // From an email from jeffschw: "Be built with a compiler that marks the COM20HEADER with Major >=2 and Minor >= 5. The V2.0 compilers produce images with 2.5, V1.x produces images with 2.0." + 2, 5 + + let peOptionalHeaderByteByCLRVersion v = + // A flag in the PE file optional header seems to depend on CLI version + // Whidbey version numbers are 8 + // Earlier are 6 + // Tools are meant to ignore this, but the VS Profiler wants it to have the right value + 8 + + // returned by writeBinaryAndReportMappings + [] + type ILTokenMappings = + { TypeDefTokenMap: ILTypeDef list * ILTypeDef -> int32 + FieldDefTokenMap: ILTypeDef list * ILTypeDef -> ILFieldDef -> int32 + MethodDefTokenMap: ILTypeDef list * ILTypeDef -> ILMethodDef -> int32 + PropertyTokenMap: ILTypeDef list * ILTypeDef -> ILPropertyDef -> int32 + EventTokenMap: ILTypeDef list * ILTypeDef -> ILEventDef -> int32 } + + let recordRequiredDataFixup (requiredDataFixups: ResizeArray<_>) (buf: ByteBuffer) pos lab = + requiredDataFixups.Add((pos, lab)) + // Write a special value in that we check later when applying the fixup + buf.EmitInt32 0xdeaddddd + + //--------------------------------------------------------------------- + // The UserString, BlobHeap, GuidHeap tables + //--------------------------------------------------------------------- + + let GetUserStringHeapIdx cenv s = + cenv.userStrings.FindOrAddSharedEntry s + + let GetBytesAsBlobIdx cenv (bytes:byte[]) = + if bytes.Length = 0 then 0 + else cenv.blobs.FindOrAddSharedEntry bytes + + let GetStringHeapIdx cenv s = + if s = "" then 0 + else cenv.strings.FindOrAddSharedEntry s + + let GetGuidIdx cenv info = cenv.guids.FindOrAddSharedEntry info + + let GetStringHeapIdxOption cenv sopt = + match sopt with + | USome ns -> GetStringHeapIdx cenv ns + | UNone -> 0 + + + let splitNameAt (nm:string) idx = + if idx < 0 then failwith "splitNameAt: idx < 0"; + let last = nm.Length - 1 + if idx > last then failwith "splitNameAt: idx > last"; + (nm.Substring(0,idx)), + (if idx < last then nm.Substring (idx+1,last - idx) else "") + + + module String = + let indexNotFound() = raise (new System.Collections.Generic.KeyNotFoundException("An index for the character was not found in the string")) + + let index (s:string) (c:char) = + let r = s.IndexOf(c) + if r = -1 then indexNotFound() else r + + let rindex (s:string) (c:char) = + let r = s.LastIndexOf(c) + if r = -1 then indexNotFound() else r + + let contains (s:string) (c:char) = + s.IndexOf(c,0,String.length s) <> -1 + + let splitTypeNameRightAux nm = + if String.contains nm '.' then + let idx = String.rindex nm '.' + let s1,s2 = splitNameAt nm idx + Some s1,s2 + else None, nm + + let splitTypeNameRight nm = + splitTypeNameRightAux nm + + let GetTypeNameAsElemPair cenv (n1,n2) = + StringE (GetStringHeapIdxOption cenv n1), + StringE (GetStringHeapIdx cenv n2) + + //===================================================================== + // Pass 1 - allocate indexes for types + //===================================================================== + + let addILTypeName enc (td: ILTypeDef) = enc@[(if td.IsNested then td.Name else joinILTypeName td.Namespace td.Name)] + + let rec GenTypeDefPass1 enc cenv (td:ILTypeDef) = + ignore (cenv.typeDefs.AddUniqueEntry "type index" (fun (TdKey (_, _, n)) -> n) (TdKey (enc, td.Namespace, td.Name))) + GenTypeDefsPass1 (addILTypeName enc td) cenv td.NestedTypes.Entries + + and GenTypeDefsPass1 enc cenv tds = Array.iter (GenTypeDefPass1 enc cenv) tds + + //===================================================================== + // Pass 2 - allocate indexes for methods and fields and write rows for types + //===================================================================== + + let rec GetIdxForTypeDef cenv key = + try cenv.typeDefs.GetTableEntry key + with + :? KeyNotFoundException -> + let (TdKey (enc, nsp, n) ) = key + failwithf "One of your modules expects the type '%s' to be defined within the module being emitted. keys = %A" (String.concat "." (enc@[joinILTypeName nsp n])) (cenv.typeDefs.GetTableKeys()) + 0 + + // -------------------------------------------------------------------- + // Assembly and module references + // -------------------------------------------------------------------- + + let rec GetAssemblyRefAsRow cenv (aref:ILAssemblyRef) = + AssemblyRefRow + ((match aref.Version with UNone -> 0us | USome v -> uint16 v.Major), + (match aref.Version with UNone -> 0us | USome v -> uint16 v.Minor), + (match aref.Version with UNone -> 0us | USome v -> uint16 v.Build), + (match aref.Version with UNone -> 0us | USome v -> uint16 v.Revision), + ((match aref.PublicKey with USome (PublicKey _) -> 0x0001 | _ -> 0x0000) + ||| (if aref.Retargetable then 0x0100 else 0x0000)), + BlobIndex (match aref.PublicKey with + | UNone -> 0 + | USome (PublicKey b | PublicKeyToken b) -> GetBytesAsBlobIdx cenv b), + StringIndex (GetStringHeapIdx cenv aref.Name), + StringIndex (match aref.Locale with UNone -> 0 | USome s -> GetStringHeapIdx cenv s), + BlobIndex (match aref.Hash with UNone -> 0 | USome s -> GetBytesAsBlobIdx cenv s)) + + and GetAssemblyRefAsIdx cenv aref = + FindOrAddSharedRow cenv ILTableNames.AssemblyRef (GetAssemblyRefAsRow cenv aref) + + and GetModuleRefAsRow cenv (mref:ILModuleRef) = + SharedRow + [| StringE (GetStringHeapIdx cenv mref.Name) |] + + and GetModuleRefAsFileRow cenv (mref:ILModuleRef) = + SharedRow + [| ULong (if mref.HasMetadata then 0x0000 else 0x0001) + StringE (GetStringHeapIdx cenv mref.Name) + (match mref.Hash with UNone -> Blob 0 | USome s -> Blob (GetBytesAsBlobIdx cenv s)) |] + + and GetModuleRefAsIdx cenv mref = + FindOrAddSharedRow cenv ILTableNames.ModuleRef (GetModuleRefAsRow cenv mref) + + and GetModuleRefAsFileIdx cenv mref = + FindOrAddSharedRow cenv ILTableNames.File (GetModuleRefAsFileRow cenv mref) + + // -------------------------------------------------------------------- + // Does a ILScopeRef point to this module? + // -------------------------------------------------------------------- + + let isScopeRefLocal scoref = (scoref = ILScopeRef.Local) + let rec isTypeRefLocal (tref:ILTypeRef) = + isILTypeScopeRefLocal tref.Scope + and isILTypeScopeRefLocal (scoref:ILTypeRefScope) = + match scoref with + | ILTypeRefScope.Top t -> isScopeRefLocal t + | ILTypeRefScope.Nested tref -> isTypeRefLocal tref + let rec enclosing (scoref:ILTypeRefScope) = + match scoref with + | ILTypeRefScope.Top _ -> [] + | ILTypeRefScope.Nested tref -> enclosing tref.Scope @ [joinILTypeName tref.Namespace tref.Name] + + let isTypeLocal (typ:ILType) = typ.IsNominal && isEmpty typ.GenericArgs && isTypeRefLocal typ.TypeRef + + // -------------------------------------------------------------------- + // Scopes to Implementation elements. + // -------------------------------------------------------------------- + + let GetScopeRefAsImplementationElem cenv scoref = + match scoref with + | ILScopeRef.Local -> (ImplementationTag.AssemblyRef, 0) + | ILScopeRef.Assembly aref -> (ImplementationTag.AssemblyRef, GetAssemblyRefAsIdx cenv aref) + | ILScopeRef.Module mref -> (ImplementationTag.File, GetModuleRefAsFileIdx cenv mref) + + // -------------------------------------------------------------------- + // Type references, types etc. + // -------------------------------------------------------------------- + + let rec GetTypeRefAsTypeRefRow cenv (tref:ILTypeRef) = + let nselem, nelem = GetTypeNameAsElemPair cenv (tref.Namespace, tref.Name) + let rs1, rs2 = GetResolutionScopeAsElem cenv tref.Scope + SharedRow [| ResolutionScope (rs1, rs2); nelem; nselem |] + + and GetTypeRefAsTypeRefIdx cenv tref = + let mutable res = 0 + if cenv.trefCache.TryGetValue(tref, &res) then res else + let res = FindOrAddSharedRow cenv ILTableNames.TypeRef (GetTypeRefAsTypeRefRow cenv tref) + cenv.trefCache.[tref] <- res + res + + and GetTypeDescAsTypeRefIdx cenv (enc, nsp, n) = + GetTypeRefAsTypeRefIdx cenv (ILTypeRef (enc, nsp, n)) + + and GetResolutionScopeAsElem cenv scoref = + match scoref with + | ILTypeRefScope.Top s -> + match s with + | ILScopeRef.Local -> (ResolutionScopeTag.Module, 1) + | ILScopeRef.Assembly aref -> (ResolutionScopeTag.AssemblyRef, GetAssemblyRefAsIdx cenv aref) + | ILScopeRef.Module mref -> (ResolutionScopeTag.ModuleRef, GetModuleRefAsIdx cenv mref) + + | ILTypeRefScope.Nested tref -> + (ResolutionScopeTag.TypeRef, GetTypeRefAsTypeRefIdx cenv tref) + + + let emitTypeInfoAsTypeDefOrRefEncoded cenv (bb: ByteBuffer) (scoref, nsp, nm) = + if isILTypeScopeRefLocal scoref then + let idx = GetIdxForTypeDef cenv (TdKey(enclosing scoref, nsp, nm)) + bb.EmitZ32 (idx <<< 2) // ECMA 22.2.8 TypeDefOrRefEncoded - ILTypeDef + else + let idx = GetTypeDescAsTypeRefIdx cenv (scoref, nsp, nm) + bb.EmitZ32 ((idx <<< 2) ||| 0x01) // ECMA 22.2.8 TypeDefOrRefEncoded - ILTypeRef + + let getTypeDefOrRefAsUncodedToken (tag, idx) = + let tab = + if tag = TypeDefOrRefOrSpecTag.TypeDef then ILTableNames.TypeDef + elif tag = TypeDefOrRefOrSpecTag.TypeRef then ILTableNames.TypeRef + elif tag = TypeDefOrRefOrSpecTag.TypeSpec then ILTableNames.TypeSpec + else failwith "getTypeDefOrRefAsUncodedToken" + getUncodedToken tab idx + + // REVIEW: write into an accumuating buffer + let EmitArrayShape (bb: ByteBuffer) (ILArrayShape shape) = + let sized = Array.filter (function (_, Some _) -> true | _ -> false) shape + let lobounded = Array.filter (function (Some _, _) -> true | _ -> false) shape + bb.EmitZ32 shape.Length + bb.EmitZ32 sized.Length + sized |> Array.iter (function (_, Some sz) -> bb.EmitZ32 sz | _ -> failwith "?") + bb.EmitZ32 lobounded.Length + lobounded |> Array.iter (function (Some low, _) -> bb.EmitZ32 low | _ -> failwith "?") + + let hasthisToByte hasthis = + match hasthis with + | ILThisConvention.Instance -> e_IMAGE_CEE_CS_CALLCONV_INSTANCE + | ILThisConvention.InstanceExplicit -> e_IMAGE_CEE_CS_CALLCONV_INSTANCE_EXPLICIT + | ILThisConvention.Static -> 0x00uy + + let callconvToByte ntypars (Callconv (hasthis, bcc)) = + hasthisToByte hasthis ||| + (if ntypars > 0 then e_IMAGE_CEE_CS_CALLCONV_GENERIC else 0x00uy) ||| + (match bcc with + | ILArgConvention.FastCall -> e_IMAGE_CEE_CS_CALLCONV_FASTCALL + | ILArgConvention.StdCall -> e_IMAGE_CEE_CS_CALLCONV_STDCALL + | ILArgConvention.ThisCall -> e_IMAGE_CEE_CS_CALLCONV_THISCALL + | ILArgConvention.CDecl -> e_IMAGE_CEE_CS_CALLCONV_CDECL + | ILArgConvention.Default -> 0x00uy + | ILArgConvention.VarArg -> e_IMAGE_CEE_CS_CALLCONV_VARARG) + + + // REVIEW: write into an accumuating buffer + let rec EmitTypeSpec cenv env (bb: ByteBuffer) (et, tspec:ILTypeSpec) = + if isEmpty tspec.GenericArgs then + bb.EmitByte et + emitTypeInfoAsTypeDefOrRefEncoded cenv bb (tspec.Scope, tspec.Namespace, tspec.Name) + else + bb.EmitByte et_WITH + bb.EmitByte et + emitTypeInfoAsTypeDefOrRefEncoded cenv bb (tspec.Scope, tspec.Namespace, tspec.Name) + bb.EmitZ32 tspec.GenericArgs.Length + EmitTypes cenv env bb tspec.GenericArgs + + and GetTypeAsTypeDefOrRef cenv env (ty:ILType) = + if isTypeLocal ty then + let tref = ty.TypeRef + (TypeDefOrRefOrSpecTag.TypeDef, GetIdxForTypeDef cenv (TdKey(enclosing tref.Scope, tref.Namespace, tref.Name))) + elif ty.IsNominal && isEmpty ty.GenericArgs then + (TypeDefOrRefOrSpecTag.TypeRef, GetTypeRefAsTypeRefIdx cenv ty.TypeRef) + else + (TypeDefOrRefOrSpecTag.TypeSpec, GetTypeAsTypeSpecIdx cenv env ty) + + and GetTypeAsBytes cenv env ty = emitBytesViaBuffer (fun bb -> EmitType cenv env bb ty) + + and GetTypeOfLocalAsBytes cenv env (l: ILLocal) = + emitBytesViaBuffer (fun bb -> EmitLocalInfo cenv env bb l) + + and GetTypeAsBlobIdx cenv env (ty:ILType) = + GetBytesAsBlobIdx cenv (GetTypeAsBytes cenv env ty) + + and GetTypeAsTypeSpecRow cenv env (ty:ILType) = + SharedRow [| Blob (GetTypeAsBlobIdx cenv env ty) |] + + and GetTypeAsTypeSpecIdx cenv env ty = + FindOrAddSharedRow cenv ILTableNames.TypeSpec (GetTypeAsTypeSpecRow cenv env ty) + + + and EmitType cenv env bb ty = + match ty with + | ElementType et -> bb.EmitByte et + | ILType.Boxed tspec -> EmitTypeSpec cenv env bb (et_CLASS, tspec) + | ILType.Value tspec -> EmitTypeSpec cenv env bb (et_VALUETYPE, tspec) + | ILType.Array (shape, ty) -> + if shape = ILArrayShape.SingleDimensional then (bb.EmitByte et_SZARRAY ; EmitType cenv env bb ty) + else (bb.EmitByte et_ARRAY; EmitType cenv env bb ty; EmitArrayShape bb shape) + | ILType.Var tv -> + let cgparams = env.EnclosingTyparCount + if int32 tv < cgparams then + bb.EmitByte et_VAR + bb.EmitZ32 (int32 tv) + else + bb.EmitByte et_MVAR + bb.EmitZ32 (int32 tv - cgparams) + + | ILType.Byref typ -> + bb.EmitByte et_BYREF + EmitType cenv env bb typ + | ILType.Ptr typ -> + bb.EmitByte et_PTR + EmitType cenv env bb typ + | ILType.Void -> + bb.EmitByte et_VOID + | ILType.FunctionPointer x -> + bb.EmitByte et_FNPTR + EmitCallsig cenv env bb (x.CallingConv, x.ArgTypes, x.ReturnType, None, 0) + | ILType.Modified (req, tref, ty) -> + bb.EmitByte (if req then et_CMOD_REQD else et_CMOD_OPT) + emitTypeInfoAsTypeDefOrRefEncoded cenv bb (tref.Scope, tref.Namespace, tref.Name) + EmitType cenv env bb ty + | _ -> failwith "EmitType" + + and EmitLocalInfo cenv env (bb:ByteBuffer) (l:ILLocal) = + if l.IsPinned then + bb.EmitByte et_PINNED + EmitType cenv env bb l.Type + + and EmitCallsig cenv env (bb:ByteBuffer) (callconv, args:ILTypes, ret, varargs:ILVarArgs, genarity) = + bb.EmitByte (callconvToByte genarity callconv) + if genarity > 0 then bb.EmitZ32 genarity + bb.EmitZ32 ((args.Length + (match varargs with None -> 0 | Some l -> l.Length))) + EmitType cenv env bb ret + args |> Array.iter (EmitType cenv env bb) + match varargs with + | None -> ()// no extra arg = no sentinel + | Some tys -> + if isEmpty tys then () // no extra arg = no sentinel + else + bb.EmitByte et_SENTINEL + Array.iter (EmitType cenv env bb) tys + + and GetCallsigAsBytes cenv env x = emitBytesViaBuffer (fun bb -> EmitCallsig cenv env bb x) + + and EmitTypes cenv env bb (inst: ILTypes) = + inst |> Array.iter (EmitType cenv env bb) + + let GetTypeAsMemberRefParent cenv env ty = + match GetTypeAsTypeDefOrRef cenv env ty with + | (tag, _) when tag = TypeDefOrRefOrSpecTag.TypeDef -> printfn "GetTypeAsMemberRefParent: mspec should have been encoded as mdtMethodDef?"; MemberRefParent (MemberRefParentTag.TypeRef, 1) + | (tag, tok) when tag = TypeDefOrRefOrSpecTag.TypeRef -> MemberRefParent (MemberRefParentTag.TypeRef, tok) + | (tag, tok) when tag = TypeDefOrRefOrSpecTag.TypeSpec -> MemberRefParent (MemberRefParentTag.TypeSpec, tok) + | _ -> failwith "GetTypeAsMemberRefParent" + + + + + // -------------------------------------------------------------------- + // Native types + // -------------------------------------------------------------------- + + let rec GetFieldInitAsBlobIdx cenv (x:ILFieldInit) = + GetBytesAsBlobIdx cenv (emitBytesViaBuffer (fun bb -> GetFieldInit bb x)) + + // REVIEW: write into an accumuating buffer + and GetFieldInit (bb: ByteBuffer) x = + match x with + | :? string as b -> bb.EmitBytes (Encoding.Unicode.GetBytes b) + | :? bool as b -> bb.EmitByte (if b then 0x01uy else 0x00uy) + | :? char as x -> bb.EmitUInt16 (uint16 x) + | :? int8 as x -> bb.EmitByte (byte x) + | :? int16 as x -> bb.EmitUInt16 (uint16 x) + | :? int32 as x -> bb.EmitInt32 x + | :? int64 as x -> bb.EmitInt64 x + | :? uint8 as x -> bb.EmitByte x + | :? uint16 as x -> bb.EmitUInt16 x + | :? uint32 as x -> bb.EmitInt32 (int32 x) + | :? uint64 as x -> bb.EmitInt64 (int64 x) + | :? single as x -> bb.EmitInt32 (bitsOfSingle x) + | :? double as x -> bb.EmitInt64 (bitsOfDouble x) + | _ -> bb.EmitInt32 0 + + and GetFieldInitFlags (i: ILFieldInit) = + UShort + (uint16 + (match i with + | :? string -> et_STRING + | :? bool -> et_BOOLEAN + | :? char -> et_CHAR + | :? int8 -> et_I1 + | :? int16 -> et_I2 + | :? int32 -> et_I4 + | :? int64 -> et_I8 + | :? uint8 -> et_U1 + | :? uint16 -> et_U2 + | :? uint32 -> et_U4 + | :? uint64 -> et_U8 + | :? single -> et_R4 + | :? double -> et_R8 + | _ -> et_CLASS)) + + // -------------------------------------------------------------------- + // Type definitions + // -------------------------------------------------------------------- + + let GetMemberAccessFlags access = + match access with + | ILMemberAccess.CompilerControlled -> 0x00000000 + | ILMemberAccess.Public -> 0x00000006 + | ILMemberAccess.Private -> 0x00000001 + | ILMemberAccess.Family -> 0x00000004 + | ILMemberAccess.FamilyAndAssembly -> 0x00000002 + | ILMemberAccess.FamilyOrAssembly -> 0x00000005 + | ILMemberAccess.Assembly -> 0x00000003 + + let GetTypeAccessFlags access = + match access with + | ILTypeDefAccess.Public -> 0x00000001 + | ILTypeDefAccess.Private -> 0x00000000 + | ILTypeDefAccess.Nested ILMemberAccess.Public -> 0x00000002 + | ILTypeDefAccess.Nested ILMemberAccess.Private -> 0x00000003 + | ILTypeDefAccess.Nested ILMemberAccess.Family -> 0x00000004 + | ILTypeDefAccess.Nested ILMemberAccess.FamilyAndAssembly -> 0x00000006 + | ILTypeDefAccess.Nested ILMemberAccess.FamilyOrAssembly -> 0x00000007 + | ILTypeDefAccess.Nested ILMemberAccess.Assembly -> 0x00000005 + | ILTypeDefAccess.Nested ILMemberAccess.CompilerControlled -> failwith "bad type acccess" + + let rec GetTypeDefAsRow cenv env _enc (td:ILTypeDef) = + let nselem, nelem = GetTypeNameAsElemPair cenv (td.Namespace, td.Name) + let flags = + if td.Name = "" then 0x00000000 + else + + int td.Attributes ||| + begin + match td.Layout with + | ILTypeDefLayout.Auto -> 0x00000000 + | ILTypeDefLayout.Sequential _ -> 0x00000008 + | ILTypeDefLayout.Explicit _ -> 0x00000010 + end ||| + begin + match td.Kind with + | ILTypeDefKind.Interface -> 0x00000020 + | _ -> 0x00000000 + end ||| +#if EMIT_SECURITY_DECLS +// @REVIEW (if rtspecialname_of_tdef td then 0x00000800 else 0x00000000) ||| + (if td.HasSecurity || not td.SecurityDecls.Entries.IsEmpty then 0x00040000 else 0x00000000) +#endif + 0x0 + + let tdorTag, tdorRow = GetTypeOptionAsTypeDefOrRef cenv env td.Extends + UnsharedRow + [| ULong flags + nelem + nselem + TypeDefOrRefOrSpec (tdorTag, tdorRow) + SimpleIndex (ILTableNames.Field, cenv.fieldDefs.Count + 1) + SimpleIndex (ILTableNames.Method, cenv.methodDefIdxsByKey.Count + 1) |] + + and GetTypeOptionAsTypeDefOrRef cenv env tyOpt = + match tyOpt with + | None -> (TypeDefOrRefOrSpecTag.TypeDef, 0) + | Some ty -> (GetTypeAsTypeDefOrRef cenv env ty) + + and GetTypeDefAsPropertyMapRow cenv tidx = + UnsharedRow + [| SimpleIndex (ILTableNames.TypeDef, tidx) + SimpleIndex (ILTableNames.Property, cenv.propertyDefs.Count + 1) |] + + and GetTypeDefAsEventMapRow cenv tidx = + UnsharedRow + [| SimpleIndex (ILTableNames.TypeDef, tidx) + SimpleIndex (ILTableNames.Event, cenv.eventDefs.Count + 1) |] + + and GetKeyForFieldDef tidx (fd: ILFieldDef) = + FieldDefKey (tidx, fd.Name, fd.FieldType) + + and GenFieldDefPass2 cenv tidx fd = + ignore (cenv.fieldDefs.AddUniqueEntry "field" (fun (fdkey:FieldDefKey) -> fdkey.Name) (GetKeyForFieldDef tidx fd)) + + and GetKeyForMethodDef tidx (md: ILMethodDef) = + MethodDefKey (tidx, md.GenericParams.Length, md.Name, md.Return.Type, md.ParameterTypes, md.CallingConv.IsStatic) + + and GenMethodDefPass2 cenv tidx md = + let idx = + cenv.methodDefIdxsByKey.AddUniqueEntry + "method" + (fun (key:MethodDefKey) -> + printfn "Duplicate in method table is:" + printfn "%s" (" Type index: "+string key.TypeIdx) + printfn "%s" (" Method name: "+key.Name) + printfn "%s" (" Method arity (num generic params): "+string key.GenericArity) + key.Name + ) + (GetKeyForMethodDef tidx md) + + cenv.methodDefIdxs.[md] <- idx + + and GetKeyForPropertyDef tidx (x: ILPropertyDef) = + PropKey (tidx, x.Name, x.PropertyType, x.IndexParameterTypes) + + and GenPropertyDefPass2 cenv tidx x = + ignore (cenv.propertyDefs.AddUniqueEntry "property" (fun (PropKey (_, n, _, _)) -> n) (GetKeyForPropertyDef tidx x)) + + and GetTypeAsImplementsRow cenv env tidx ty = + let tdorTag, tdorRow = GetTypeAsTypeDefOrRef cenv env ty + UnsharedRow + [| SimpleIndex (ILTableNames.TypeDef, tidx) + TypeDefOrRefOrSpec (tdorTag, tdorRow) |] + + and GenImplementsPass2 cenv env tidx ty = + AddUnsharedRow cenv ILTableNames.InterfaceImpl (GetTypeAsImplementsRow cenv env tidx ty) |> ignore + + and GetKeyForEvent tidx (x: ILEventDef) = + EventKey (tidx, x.Name) + + and GenEventDefPass2 cenv tidx x = + ignore (cenv.eventDefs.AddUniqueEntry "event" (fun (EventKey(_, b)) -> b) (GetKeyForEvent tidx x)) + + and GenTypeDefPass2 pidx enc cenv (td:ILTypeDef) = + try + let env = envForTypeDef td + let tidx = GetIdxForTypeDef cenv (TdKey(enc, td.Namespace, td.Name)) + let tidx2 = AddUnsharedRow cenv ILTableNames.TypeDef (GetTypeDefAsRow cenv env enc td) + if tidx <> tidx2 then failwith "index of typedef on second pass does not match index on first pass" + + // Add entries to auxiliary mapping tables, e.g. Nested, PropertyMap etc. + // Note Nested is organised differently to the others... + if not (isNil enc) then + AddUnsharedRow cenv ILTableNames.Nested + (UnsharedRow + [| SimpleIndex (ILTableNames.TypeDef, tidx) + SimpleIndex (ILTableNames.TypeDef, pidx) |]) |> ignore + let props = td.Properties.Entries + if not (isEmpty props) then + AddUnsharedRow cenv ILTableNames.PropertyMap (GetTypeDefAsPropertyMapRow cenv tidx) |> ignore + let events = td.Events.Entries + if not (isEmpty events) then + AddUnsharedRow cenv ILTableNames.EventMap (GetTypeDefAsEventMapRow cenv tidx) |> ignore + + // Now generate or assign index numbers for tables referenced by the maps. + // Don't yet generate contents of these tables - leave that to pass3, as + // code may need to embed these entries. + td.Implements |> Array.iter (GenImplementsPass2 cenv env tidx) + props |> Array.iter (GenPropertyDefPass2 cenv tidx) + events |> Array.iter (GenEventDefPass2 cenv tidx) + td.Fields.Entries |> Array.iter (GenFieldDefPass2 cenv tidx) + td.Methods.Entries |> Array.iter (GenMethodDefPass2 cenv tidx) + td.NestedTypes.Entries |> GenTypeDefsPass2 tidx (addILTypeName enc td) cenv + with e -> + failwith ("Error in pass2 for type "+td.Name+", error: "+e.Message) + + and GenTypeDefsPass2 pidx enc cenv tds = + Array.iter (GenTypeDefPass2 pidx enc cenv) tds + + //===================================================================== + // Pass 3 - write details of methods, fields, IL code, custom attrs etc. + //===================================================================== + + exception MethodDefNotFound + let FindMethodDefIdx cenv mdkey = + try cenv.methodDefIdxsByKey.GetTableEntry mdkey + with :? KeyNotFoundException -> + let typeNameOfIdx i = + match + (cenv.typeDefs.dict + |> Seq.fold (fun sofar kvp -> + let tkey2 = kvp.Key + let tidx2 = kvp.Value + if i = tidx2 then + if sofar = None then + Some tkey2 + else failwith "multiple type names map to index" + else sofar) None) with + | Some x -> x + | None -> raise MethodDefNotFound + let (TdKey (tenc, tnsp, tname)) = typeNameOfIdx mdkey.TypeIdx + printfn "%s" ("The local method '"+(String.concat "." (tenc@[tname]))+"'::'"+mdkey.Name+"' was referenced but not declared") + printfn "generic arity: %s " (string mdkey.GenericArity) + cenv.methodDefIdxsByKey.dict |> Seq.iter (fun (KeyValue(mdkey2, _)) -> + if mdkey2.TypeIdx = mdkey.TypeIdx && mdkey.Name = mdkey2.Name then + let (TdKey (tenc2, tnsp2, tname2)) = typeNameOfIdx mdkey2.TypeIdx + printfn "%s" ("A method in '"+(String.concat "." (tenc2@[tname2]))+"' had the right name but the wrong signature:") + printfn "%s" ("generic arity: "+string mdkey2.GenericArity) + printfn "mdkey2 = %s" (mdkey2.ToString())) + raise MethodDefNotFound + + + let rec GetMethodDefIdx cenv md = + cenv.methodDefIdxs.[md] + + and FindFieldDefIdx cenv fdkey = + try cenv.fieldDefs.GetTableEntry fdkey + with :? KeyNotFoundException -> + failwith ("The local field "+fdkey.Name+" was referenced but not declared") + 1 + + and GetFieldDefAsFieldDefIdx cenv tidx fd = + FindFieldDefIdx cenv (GetKeyForFieldDef tidx fd) + + // -------------------------------------------------------------------- + // ILMethodRef --> ILMethodDef. + // + // Only successfuly converts ILMethodRef's referring to + // methods in the module being emitted. + // -------------------------------------------------------------------- + + let GetMethodRefAsMethodDefIdx cenv (mref:ILMethodRef) = + let tref = mref.EnclosingTypeRef + try + if not (isTypeRefLocal tref) then + failwithf "method referred to by method impl, event or property is not in a type defined in this module, method ref is %A" mref + let tidx = GetIdxForTypeDef cenv (TdKey(enclosing tref.Scope, tref.Namespace, tref.Name)) + let mdkey = MethodDefKey (tidx, mref.GenericArity, mref.Name, mref.ReturnType, mref.ArgTypes, mref.CallingConv.IsStatic) + FindMethodDefIdx cenv mdkey + with e -> + failwithf "Error in GetMethodRefAsMethodDefIdx for mref = %A, error: %s" (mref.Name, tref.Name) e.Message + + let rec MethodRefInfoAsMemberRefRow cenv env fenv (nm, typ, callconv, args, ret, varargs, genarity) = + MemberRefRow(GetTypeAsMemberRefParent cenv env typ, + GetStringHeapIdx cenv nm, + GetMethodRefInfoAsBlobIdx cenv fenv (callconv, args, ret, varargs, genarity)) + + and GetMethodRefInfoAsBlobIdx cenv env info = + GetBytesAsBlobIdx cenv (GetCallsigAsBytes cenv env info) + + let GetMethodRefInfoAsMemberRefIdx cenv env ((_, typ, _, _, _, _, _) as minfo) = + let fenv = envForMethodRef env typ + FindOrAddSharedRow cenv ILTableNames.MemberRef (MethodRefInfoAsMemberRefRow cenv env fenv minfo) + + let GetMethodRefInfoAsMethodRefOrDef isAlwaysMethodDef cenv env ((nm, typ:ILType, cc, args, ret, varargs, genarity) as minfo) = + if Option.isNone varargs && (isAlwaysMethodDef || isTypeLocal typ) then + if not typ.IsNominal then failwith "GetMethodRefInfoAsMethodRefOrDef: unexpected local tref-typ" + try (MethodDefOrRefTag.MethodDef, GetMethodRefAsMethodDefIdx cenv (ILMethodRef (typ.TypeRef, cc, genarity, nm, args, ret))) + with MethodDefNotFound -> (MethodDefOrRefTag.MemberRef, GetMethodRefInfoAsMemberRefIdx cenv env minfo) + else (MethodDefOrRefTag.MemberRef, GetMethodRefInfoAsMemberRefIdx cenv env minfo) + + + // -------------------------------------------------------------------- + // ILMethodSpec --> ILMethodRef/ILMethodDef/ILMethodSpec + // -------------------------------------------------------------------- + + let rec GetMethodSpecInfoAsMethodSpecIdx cenv env (nm, typ, cc, args, ret, varargs, minst:ILGenericArgs) = + let mdorTag, mdorRow = GetMethodRefInfoAsMethodRefOrDef false cenv env (nm, typ, cc, args, ret, varargs, minst.Length) + let blob = + emitBytesViaBuffer (fun bb -> + bb.EmitByte e_IMAGE_CEE_CS_CALLCONV_GENERICINST + bb.EmitZ32 minst.Length + minst |> Array.iter (EmitType cenv env bb)) + FindOrAddSharedRow cenv ILTableNames.MethodSpec + (SharedRow + [| MethodDefOrRef (mdorTag, mdorRow) + Blob (GetBytesAsBlobIdx cenv blob) |]) + + and GetMethodDefOrRefAsUncodedToken (tag, idx) = + let tab = + if tag = MethodDefOrRefTag.MethodDef then ILTableNames.Method + elif tag = MethodDefOrRefTag.MemberRef then ILTableNames.MemberRef + else failwith "GetMethodDefOrRefAsUncodedToken" + getUncodedToken tab idx + + and GetMethodSpecInfoAsUncodedToken cenv env ((_, _, _, _, _, _, minst:ILGenericArgs) as minfo) = + if minst.Length > 0 then + getUncodedToken ILTableNames.MethodSpec (GetMethodSpecInfoAsMethodSpecIdx cenv env minfo) + else + GetMethodDefOrRefAsUncodedToken (GetMethodRefInfoAsMethodRefOrDef false cenv env (GetMethodRefInfoOfMethodSpecInfo minfo)) + + and GetMethodSpecAsUncodedToken cenv env mspec = + GetMethodSpecInfoAsUncodedToken cenv env (InfoOfMethodSpec mspec) + + and GetMethodRefInfoOfMethodSpecInfo (nm, typ, cc, args, ret, varargs, minst:ILGenericArgs) = + (nm, typ, cc, args, ret, varargs, minst.Length) + + and GetMethodSpecAsMethodDefOrRef cenv env (mspec, varargs) = + GetMethodRefInfoAsMethodRefOrDef false cenv env (GetMethodRefInfoOfMethodSpecInfo (InfoOfMethodSpec (mspec, varargs))) + + and GetMethodSpecAsMethodDef cenv env (mspec, varargs) = + GetMethodRefInfoAsMethodRefOrDef true cenv env (GetMethodRefInfoOfMethodSpecInfo (InfoOfMethodSpec (mspec, varargs))) + + and InfoOfMethodSpec (mspec:ILMethodSpec, varargs) = + (mspec.Name, + mspec.EnclosingType, + mspec.CallingConv, + mspec.MethodRef.ArgTypes, + mspec.FormalReturnType, + varargs, + mspec.GenericArgs) + + // -------------------------------------------------------------------- + // method_in_parent --> ILMethodRef/ILMethodDef + // + // Used for MethodImpls. + // -------------------------------------------------------------------- + + let rec GetOverridesSpecAsMemberRefIdx cenv env ospec = + let fenv = envForOverrideSpec ospec + let row = MethodRefInfoAsMemberRefRow cenv env fenv (ospec.MethodRef.Name, ospec.EnclosingType, ospec.MethodRef.CallingConv, ospec.MethodRef.ArgTypes, ospec.MethodRef.ReturnType, None, ospec.MethodRef.GenericArity) + FindOrAddSharedRow cenv ILTableNames.MemberRef row + + and GetOverridesSpecAsMethodDefOrRef cenv env (ospec:ILOverridesSpec) = + let typ = ospec.EnclosingType + if isTypeLocal typ then + if not typ.IsNominal then failwith "GetOverridesSpecAsMethodDefOrRef: unexpected local tref-typ" + try (MethodDefOrRefTag.MethodDef, GetMethodRefAsMethodDefIdx cenv ospec.MethodRef) + with MethodDefNotFound -> (MethodDefOrRefTag.MemberRef, GetOverridesSpecAsMemberRefIdx cenv env ospec) + else + (MethodDefOrRefTag.MemberRef, GetOverridesSpecAsMemberRefIdx cenv env ospec) + + // -------------------------------------------------------------------- + // ILMethodRef --> ILMethodRef/ILMethodDef + // + // Used for Custom Attrs. + // -------------------------------------------------------------------- + + let rec GetMethodRefAsMemberRefIdx cenv env fenv (mref:ILMethodRef) = + let row = MethodRefInfoAsMemberRefRow cenv env fenv (mref.Name, ILType.Boxed (ILTypeSpec (mref.EnclosingTypeRef, [| |])), mref.CallingConv, mref.ArgTypes, mref.ReturnType, None, mref.GenericArity) + FindOrAddSharedRow cenv ILTableNames.MemberRef row + + and GetMethodRefAsCustomAttribType cenv (mref:ILMethodRef) = + let fenv = envForNonGenericMethodRef mref + let tref = mref.EnclosingTypeRef + if isTypeRefLocal tref then + try (CustomAttributeTypeTag.MethodDef, GetMethodRefAsMethodDefIdx cenv mref) + with MethodDefNotFound -> (CustomAttributeTypeTag.MemberRef, GetMethodRefAsMemberRefIdx cenv fenv fenv mref) + else + (CustomAttributeTypeTag.MemberRef, GetMethodRefAsMemberRefIdx cenv fenv fenv mref) + + // -------------------------------------------------------------------- + // ILCustomAttrs --> CustomAttribute rows + // -------------------------------------------------------------------- + + let rec GetCustomAttrDataAsBlobIdx cenv (data:byte[]) = + if data.Length = 0 then 0 else GetBytesAsBlobIdx cenv data + + and GetCustomAttrRow cenv hca attr = + let cat = GetMethodRefAsCustomAttribType cenv attr.Method.MethodRef + for element in attr.Elements do + match element with + | :? ILType as ty when ty.IsNominal -> GetTypeRefAsTypeRefIdx cenv ty.TypeRef |> ignore + | _ -> () + + UnsharedRow + [| HasCustomAttribute (fst hca, snd hca) + CustomAttributeType (fst cat, snd cat) + Blob (GetCustomAttrDataAsBlobIdx cenv attr.Data) + |] + + and GenCustomAttrPass3Or4 cenv hca attr = + AddUnsharedRow cenv ILTableNames.CustomAttribute (GetCustomAttrRow cenv hca attr) |> ignore + + and GenCustomAttrsPass3Or4 cenv hca (attrs: ILCustomAttrs) = + attrs.Entries |> Array.iter (GenCustomAttrPass3Or4 cenv hca) + + // -------------------------------------------------------------------- + // ILPermissionSet --> DeclSecurity rows + // -------------------------------------------------------------------- *) + +#if EMIT_SECURITY_DECLS + let rec GetSecurityDeclRow cenv hds (PermissionSet (action, s)) = + UnsharedRow + [| UShort (uint16 (List.assoc action (Lazy.force ILSecurityActionMap))) + HasDeclSecurity (fst hds, snd hds) + Blob (GetBytesAsBlobIdx cenv s) |] + + and GenSecurityDeclPass3 cenv hds attr = + AddUnsharedRow cenv ILTableNames.Permission (GetSecurityDeclRow cenv hds attr) |> ignore + + and GenSecurityDeclsPass3 cenv hds attrs = + List.iter (GenSecurityDeclPass3 cenv hds) attrs +#endif + + // -------------------------------------------------------------------- + // ILFieldSpec --> FieldRef or ILFieldDef row + // -------------------------------------------------------------------- + + let rec GetFieldSpecAsMemberRefRow cenv env fenv (fspec:ILFieldSpec) = + MemberRefRow (GetTypeAsMemberRefParent cenv env fspec.EnclosingType, + GetStringHeapIdx cenv fspec.Name, + GetFieldSpecSigAsBlobIdx cenv fenv fspec) + + and GetFieldSpecAsMemberRefIdx cenv env fspec = + let fenv = envForFieldSpec fspec + FindOrAddSharedRow cenv ILTableNames.MemberRef (GetFieldSpecAsMemberRefRow cenv env fenv fspec) + + // REVIEW: write into an accumuating buffer + and EmitFieldSpecSig cenv env (bb: ByteBuffer) (fspec:ILFieldSpec) = + bb.EmitByte e_IMAGE_CEE_CS_CALLCONV_FIELD + EmitType cenv env bb fspec.FormalType + + and GetFieldSpecSigAsBytes cenv env x = + emitBytesViaBuffer (fun bb -> EmitFieldSpecSig cenv env bb x) + + and GetFieldSpecSigAsBlobIdx cenv env x = + GetBytesAsBlobIdx cenv (GetFieldSpecSigAsBytes cenv env x) + + and GetFieldSpecAsFieldDefOrRef cenv env (fspec:ILFieldSpec) = + let typ = fspec.EnclosingType + if isTypeLocal typ then + if not typ.IsNominal then failwith "GetFieldSpecAsFieldDefOrRef: unexpected local tref-typ" + let tref = typ.TypeRef + let tidx = GetIdxForTypeDef cenv (TdKey(enclosing tref.Scope, tref.Namespace, tref.Name)) + let fdkey = FieldDefKey (tidx, fspec.Name, fspec.FormalType) + (true, FindFieldDefIdx cenv fdkey) + else + (false, GetFieldSpecAsMemberRefIdx cenv env fspec) + + and GetFieldDefOrRefAsUncodedToken (tag, idx) = + let tab = if tag then ILTableNames.Field else ILTableNames.MemberRef + getUncodedToken tab idx + + // -------------------------------------------------------------------- + // callsig --> StandAloneSig + // -------------------------------------------------------------------- + + let GetCallsigAsBlobIdx cenv env (callsig:ILCallingSignature, varargs) = + GetBytesAsBlobIdx cenv + (GetCallsigAsBytes cenv env (callsig.CallingConv, + callsig.ArgTypes, + callsig.ReturnType, varargs, 0)) + + let GetCallsigAsStandAloneSigRow cenv env x = + SharedRow [| Blob (GetCallsigAsBlobIdx cenv env x) |] + + let GetCallsigAsStandAloneSigIdx cenv env info = + FindOrAddSharedRow cenv ILTableNames.StandAloneSig (GetCallsigAsStandAloneSigRow cenv env info) + + // -------------------------------------------------------------------- + // local signatures --> BlobHeap idx + // -------------------------------------------------------------------- + + let EmitLocalSig cenv env (bb: ByteBuffer) (locals: ILLocals) = + bb.EmitByte e_IMAGE_CEE_CS_CALLCONV_LOCAL_SIG + bb.EmitZ32 locals.Length + locals |> Array.iter (EmitLocalInfo cenv env bb) + + let GetLocalSigAsBlobHeapIdx cenv env locals = + GetBytesAsBlobIdx cenv (emitBytesViaBuffer (fun bb -> EmitLocalSig cenv env bb locals)) + + let GetLocalSigAsStandAloneSigIdx cenv env locals = + SharedRow [| Blob (GetLocalSigAsBlobHeapIdx cenv env locals) |] + + + + type ExceptionClauseKind = + | FinallyClause + | FaultClause + | TypeFilterClause of int32 + | FilterClause of int + + type ExceptionClauseSpec = (int * int * int * int * ExceptionClauseKind) + + type CodeBuffer = + + // -------------------------------------------------------------------- + // Buffer to write results of emitting code into. Also record: + // - branch sources (where fixups will occur) + // - possible branch destinations + // - locations of embedded handles into the string table + // - the exception table + // -------------------------------------------------------------------- + { code: ByteBuffer + /// (instruction; optional short form); start of instr in code buffer; code loc for the end of the instruction the fixup resides in ; where is the destination of the fixup + mutable reqdBrFixups: ResizeArray<((int * int option) * int * ILCodeLabel list)> + availBrFixups: Dictionary + /// code loc to fixup in code buffer + mutable reqdStringFixupsInMethod: ResizeArray<(int * int)> + /// data for exception handling clauses + mutable seh: ResizeArray +#if DEBUG_INFO + seqpoints: ResizeArray +#endif + } + + static member Create _nm = + { seh = ResizeArray() + code= ByteBuffer.Create 200 + reqdBrFixups= ResizeArray() + reqdStringFixupsInMethod=ResizeArray() + availBrFixups = Dictionary<_, _>(10, HashIdentity.Structural) +#if DEBUG_INFO + seqpoints = new ResizeArray<_>(10) +#endif + } + + member codebuf.EmitExceptionClause seh = codebuf.seh.Add(seh) + +#if DEBUG_INFO + member codebuf.EmitSeqPoint cenv (m:ILSourceMarker) = () + if cenv.generatePdb then + // table indexes are 1-based, document array indexes are 0-based + let doc = (cenv.documents.FindOrAddSharedEntry m.Document) - 1 + codebuf.seqpoints.Add + { Document=doc + Offset= codebuf.code.Position + Line=m.Line + Column=m.Column + EndLine=m.EndLine + EndColumn=m.EndColumn } +#endif + + member codebuf.EmitByte x = codebuf.code.EmitIntAsByte x + member codebuf.EmitUInt16 x = codebuf.code.EmitUInt16 x + member codebuf.EmitInt32 x = codebuf.code.EmitInt32 x + member codebuf.EmitInt64 x = codebuf.code.EmitInt64 x + + member codebuf.EmitUncodedToken u = codebuf.EmitInt32 u + + member codebuf.RecordReqdStringFixup stringidx = + codebuf.reqdStringFixupsInMethod.Add((codebuf.code.Position, stringidx)) + // Write a special value in that we check later when applying the fixup + codebuf.EmitInt32 0xdeadbeef + + member codebuf.RecordReqdBrFixups i tgs = + codebuf.reqdBrFixups.Add ((i, codebuf.code.Position, tgs)) + // Write a special value in that we check later when applying the fixup + // Value is 0x11 {deadbbbb}* where 11 is for the instruction and deadbbbb is for each target + codebuf.EmitByte 0x11 // for the instruction + (if fst i = i_switch then + codebuf.EmitInt32 tgs.Length) + List.iter (fun _ -> codebuf.EmitInt32 0xdeadbbbb) tgs + + member codebuf.RecordReqdBrFixup i tg = codebuf.RecordReqdBrFixups i [tg] + member codebuf.RecordAvailBrFixup tg = + codebuf.availBrFixups.[tg] <- codebuf.code.Position + + module Codebuf = + // -------------------------------------------------------------------- + // Applying branch fixups. Use short versions of instructions + // wherever possible. Sadly we can only determine if we can use a short + // version after we've layed out the code for all other instructions. + // This in turn means that using a short version may change + // the various offsets into the code. + // -------------------------------------------------------------------- + + let binaryChop p (arr: 'T[]) = + let rec go n m = + if n > m then raise (KeyNotFoundException("binary chop did not find element")) + else + let i = (n+m)/2 + let c = p arr.[i] + if c = 0 then i elif c < 0 then go n (i-1) else go (i+1) m + go 0 (Array.length arr) + + let applyBrFixups (origCode :byte[]) origExnClauses origReqdStringFixups (origAvailBrFixups: Dictionary) origReqdBrFixups = + let orderedOrigReqdBrFixups = origReqdBrFixups |> Array.sortBy (fun (_, fixuploc, _) -> fixuploc) + + let newCode = ByteBuffer.Create origCode.Length + + // Copy over all the code, working out whether the branches will be short + // or long and adjusting the branch destinations. Record an adjust function to adjust all the other + // gumpf that refers to fixed offsets in the code stream. + let newCode, newReqdBrFixups, adjuster = + let remainingReqdFixups = ref (Array.toList orderedOrigReqdBrFixups) + let origWhere = ref 0 + let newWhere = ref 0 + let doneLast = ref false + let newReqdBrFixups = ref [] + + let adjustments = ref [] + + while (not (isNil !remainingReqdFixups) || not !doneLast) do + let doingLast = isNil !remainingReqdFixups + let origStartOfNoBranchBlock = !origWhere + let newStartOfNoBranchBlock = !newWhere + + let origEndOfNoBranchBlock = + if doingLast then origCode.Length + else + let (_, origStartOfInstr, _) = List.head !remainingReqdFixups + origStartOfInstr + + // Copy over a chunk of non-branching code + let nobranch_len = origEndOfNoBranchBlock - origStartOfNoBranchBlock + newCode.EmitBytes origCode.[origStartOfNoBranchBlock..origStartOfNoBranchBlock+nobranch_len-1] + + // Record how to adjust addresses in this range, including the branch instruction + // we write below, or the end of the method if we're doing the last bblock + adjustments := (origStartOfNoBranchBlock, origEndOfNoBranchBlock, newStartOfNoBranchBlock) :: !adjustments + + // Increment locations to the branch instruction we're really interested in + origWhere := origEndOfNoBranchBlock + newWhere := !newWhere + nobranch_len + + // Now do the branch instruction. Decide whether the fixup will be short or long in the new code + if doingLast then + doneLast := true + else + let (i, origStartOfInstr, tgs:ILCodeLabel list) = List.head !remainingReqdFixups + remainingReqdFixups := List.tail !remainingReqdFixups + if origCode.[origStartOfInstr] <> 0x11uy then failwith "br fixup sanity check failed (1)" + let i_length = if fst i = i_switch then 5 else 1 + origWhere := !origWhere + i_length + + let origEndOfInstr = origStartOfInstr + i_length + 4 * tgs.Length + let newEndOfInstrIfSmall = !newWhere + i_length + 1 + let newEndOfInstrIfBig = !newWhere + i_length + 4 * tgs.Length + + let short = + match i, tgs with + | (_, Some i_short), [tg] + when + begin + // Use the original offsets to compute if the branch is small or large. This is + // a safe approximation because code only gets smaller. + if not (origAvailBrFixups.ContainsKey tg) then + printfn "%s" ("branch target " + formatCodeLabel tg + " not found in code") + let origDest = + if origAvailBrFixups.ContainsKey tg then origAvailBrFixups.[tg] + else 666666 + let origRelOffset = origDest - origEndOfInstr + -128 <= origRelOffset && origRelOffset <= 127 + end + -> + newCode.EmitIntAsByte i_short + true + | (i_long, _), _ -> + newCode.EmitIntAsByte i_long + (if i_long = i_switch then + newCode.EmitInt32 tgs.Length) + false + + newWhere := !newWhere + i_length + if !newWhere <> newCode.Position then printfn "mismatch between newWhere and newCode" + + tgs |> List.iter (fun tg -> + let origFixupLoc = !origWhere + checkFixup32 origCode origFixupLoc 0xdeadbbbb + + if short then + newReqdBrFixups := (!newWhere, newEndOfInstrIfSmall, tg, true) :: !newReqdBrFixups + newCode.EmitIntAsByte 0x98 (* sanity check *) + newWhere := !newWhere + 1 + else + newReqdBrFixups := (!newWhere, newEndOfInstrIfBig, tg, false) :: !newReqdBrFixups + newCode.EmitInt32 0xf00dd00f (* sanity check *) + newWhere := !newWhere + 4 + if !newWhere <> newCode.Position then printfn "mismatch between newWhere and newCode" + origWhere := !origWhere + 4) + + if !origWhere <> origEndOfInstr then printfn "mismatch between origWhere and origEndOfInstr" + + let adjuster = + let arr = Array.ofList (List.rev !adjustments) + fun addr -> + let i = + try binaryChop (fun (a1, a2, _) -> if addr < a1 then -1 elif addr > a2 then 1 else 0) arr + with + :? KeyNotFoundException -> + failwith ("adjuster: address "+string addr+" is out of range") + let (origStartOfNoBranchBlock, _, newStartOfNoBranchBlock) = arr.[i] + addr - (origStartOfNoBranchBlock - newStartOfNoBranchBlock) + + newCode.Close(), + List.toArray !newReqdBrFixups, + adjuster + + // Now adjust everything + let newAvailBrFixups = + let tab = Dictionary<_, _>(10, HashIdentity.Structural) + for (KeyValue(tglab, origBrDest)) in origAvailBrFixups do + tab.[tglab] <- adjuster origBrDest + tab + let newReqdStringFixups = Array.map (fun (origFixupLoc, stok) -> adjuster origFixupLoc, stok) origReqdStringFixups +#if EMIT_DEBUG_INFO + let newSeqPoints = Array.map (fun (sp:PdbSequencePoint) -> {sp with Offset=adjuster sp.Offset}) origSeqPoints +#endif + let newExnClauses = + origExnClauses |> Array.map (fun (st1, sz1, st2, sz2, kind) -> + (adjuster st1, (adjuster (st1 + sz1) - adjuster st1), + adjuster st2, (adjuster (st2 + sz2) - adjuster st2), + (match kind with + | FinallyClause | FaultClause | TypeFilterClause _ -> kind + | FilterClause n -> FilterClause (adjuster n)))) + +#if EMIT_DEBUG_INFO + let newScopes = + let rec remap scope = + {scope with StartOffset = adjuster scope.StartOffset + EndOffset = adjuster scope.EndOffset + Children = Array.map remap scope.Children } + Array.map remap origScopes +#endif + + // Now apply the adjusted fixups in the new code + newReqdBrFixups |> Array.iter (fun (newFixupLoc, endOfInstr, tg, small) -> + if not (newAvailBrFixups.ContainsKey tg) then + failwith ("target "+formatCodeLabel tg+" not found in new fixups") + try + let n = newAvailBrFixups.[tg] + let relOffset = (n - endOfInstr) + if small then + if Bytes.get newCode newFixupLoc <> 0x98 then failwith "br fixupsanity check failed" + newCode.[newFixupLoc] <- b0 relOffset + else + checkFixup32 newCode newFixupLoc 0xf00dd00fl + applyFixup32 newCode newFixupLoc relOffset + with :? KeyNotFoundException -> ()) + + newCode, newReqdStringFixups, newExnClauses + + + // -------------------------------------------------------------------- + // Structured residue of emitting instructions: SEH exception handling + // and scopes for local variables. + // -------------------------------------------------------------------- + + // Emitting instructions generates a tree of seh specifications + // We then emit the exception handling specs separately. + // nb. ECMA spec says the SEH blocks must be returned inside-out + type SEHTree = + | Node of ExceptionClauseSpec option * SEHTree[] + + + // -------------------------------------------------------------------- + // Table of encodings for instructions without arguments, also indexes + // for all instructions. + // -------------------------------------------------------------------- + + let encodingsForNoArgInstrs = Dictionary<_, _>(300, HashIdentity.Structural) + let _ = + List.iter + (fun (x, mk) -> encodingsForNoArgInstrs.[mk] <- x) + (noArgInstrs.Force()) + let encodingsOfNoArgInstr si = encodingsForNoArgInstrs.[si] + + // -------------------------------------------------------------------- + // Emit instructions + // -------------------------------------------------------------------- + + /// Emit the code for an instruction + let emitInstrCode (codebuf: CodeBuffer) i = + if i > 0xFF then + assert (i >>> 8 = 0xFE) + codebuf.EmitByte ((i >>> 8) &&& 0xFF) + codebuf.EmitByte (i &&& 0xFF) + else + codebuf.EmitByte i + + let emitTypeInstr cenv codebuf env i ty = + emitInstrCode codebuf i + codebuf.EmitUncodedToken (getTypeDefOrRefAsUncodedToken (GetTypeAsTypeDefOrRef cenv env ty)) + + let emitMethodSpecInfoInstr cenv codebuf env i mspecinfo = + emitInstrCode codebuf i + codebuf.EmitUncodedToken (GetMethodSpecInfoAsUncodedToken cenv env mspecinfo) + + let emitMethodSpecInstr cenv codebuf env i mspec = + emitInstrCode codebuf i + codebuf.EmitUncodedToken (GetMethodSpecAsUncodedToken cenv env mspec) + + let emitFieldSpecInstr cenv codebuf env i fspec = + emitInstrCode codebuf i + codebuf.EmitUncodedToken (GetFieldDefOrRefAsUncodedToken (GetFieldSpecAsFieldDefOrRef cenv env fspec)) + + let emitShortUInt16Instr codebuf (i_short, i) x = + let n = int32 x + if n <= 255 then + emitInstrCode codebuf i_short + codebuf.EmitByte n + else + emitInstrCode codebuf i + codebuf.EmitUInt16 x + + let emitShortInt32Instr codebuf (i_short, i) x = + if x >= (-128) && x <= 127 then + emitInstrCode codebuf i_short + codebuf.EmitByte (if x < 0x0 then x + 256 else x) + else + emitInstrCode codebuf i + codebuf.EmitInt32 x + + let emitTailness (cenv: cenv) codebuf tl = + if tl = Tailcall && cenv.emitTailcalls then emitInstrCode codebuf i_tail + + //let emitAfterTailcall codebuf tl = + // if tl = Tailcall then emitInstrCode codebuf i_ret + + let emitVolatility codebuf tl = + if tl = Volatile then emitInstrCode codebuf i_volatile + + let emitConstrained cenv codebuf env ty = + emitInstrCode codebuf i_constrained + codebuf.EmitUncodedToken (getTypeDefOrRefAsUncodedToken (GetTypeAsTypeDefOrRef cenv env ty)) + + let emitAlignment codebuf tl = + match tl with + | Aligned -> () + | Unaligned1 -> emitInstrCode codebuf i_unaligned; codebuf.EmitByte 0x1 + | Unaligned2 -> emitInstrCode codebuf i_unaligned; codebuf.EmitByte 0x2 + | Unaligned4 -> emitInstrCode codebuf i_unaligned; codebuf.EmitByte 0x4 + + let rec emitInstr cenv codebuf env instr = + match instr with + | si when isNoArgInstr si -> + emitInstrCode codebuf (encodingsOfNoArgInstr si) + | I_brcmp (cmp, tg1) -> + codebuf.RecordReqdBrFixup (ILCmpInstrMap.Value.[cmp], Some ILCmpInstrRevMap.Value.[cmp]) tg1 + | I_br tg -> codebuf.RecordReqdBrFixup (i_br, Some i_br_s) tg +#if EMIT_DEBUG_INFO + | I_seqpoint s -> codebuf.EmitSeqPoint cenv s +#endif + | I_leave tg -> codebuf.RecordReqdBrFixup (i_leave, Some i_leave_s) tg + | I_call (tl, mspec, varargs) -> + emitTailness cenv codebuf tl + emitMethodSpecInstr cenv codebuf env i_call (mspec, varargs) + //emitAfterTailcall codebuf tl + | I_callvirt (tl, mspec, varargs) -> + emitTailness cenv codebuf tl + emitMethodSpecInstr cenv codebuf env i_callvirt (mspec, varargs) + //emitAfterTailcall codebuf tl + | I_callconstraint (tl, ty, mspec, varargs) -> + emitTailness cenv codebuf tl + emitConstrained cenv codebuf env ty + emitMethodSpecInstr cenv codebuf env i_callvirt (mspec, varargs) + //emitAfterTailcall codebuf tl + | I_newobj (mspec, varargs) -> + emitMethodSpecInstr cenv codebuf env i_newobj (mspec, varargs) + | I_ldftn mspec -> + emitMethodSpecInstr cenv codebuf env i_ldftn (mspec, None) + | I_ldvirtftn mspec -> + emitMethodSpecInstr cenv codebuf env i_ldvirtftn (mspec, None) + + | I_calli (tl, callsig, varargs) -> + emitTailness cenv codebuf tl + emitInstrCode codebuf i_calli + codebuf.EmitUncodedToken (getUncodedToken ILTableNames.StandAloneSig (GetCallsigAsStandAloneSigIdx cenv env (callsig, varargs))) + //emitAfterTailcall codebuf tl + + | I_ldarg x -> emitShortUInt16Instr codebuf (i_ldarg_s, i_ldarg) (uint16 x) + | I_starg x -> emitShortUInt16Instr codebuf (i_starg_s, i_starg) (uint16 x) + | I_ldarga x -> emitShortUInt16Instr codebuf (i_ldarga_s, i_ldarga) (uint16 x) + | I_ldloc x -> emitShortUInt16Instr codebuf (i_ldloc_s, i_ldloc) (uint16 x) + | I_stloc x -> emitShortUInt16Instr codebuf (i_stloc_s, i_stloc) (uint16 x) + | I_ldloca x -> emitShortUInt16Instr codebuf (i_ldloca_s, i_ldloca) (uint16 x) + + | I_cpblk (al, vol) -> + emitAlignment codebuf al + emitVolatility codebuf vol + emitInstrCode codebuf i_cpblk + | I_initblk (al, vol) -> + emitAlignment codebuf al + emitVolatility codebuf vol + emitInstrCode codebuf i_initblk + + | (I_ldc (DT_I4, ILConst.I4 x)) -> + emitShortInt32Instr codebuf (i_ldc_i4_s, i_ldc_i4) x + | (I_ldc (DT_I8, ILConst.I8 x)) -> + emitInstrCode codebuf i_ldc_i8 + codebuf.EmitInt64 x + | (I_ldc (_, ILConst.R4 x)) -> + emitInstrCode codebuf i_ldc_r4 + codebuf.EmitInt32 (bitsOfSingle x) + | (I_ldc (_, ILConst.R8 x)) -> + emitInstrCode codebuf i_ldc_r8 + codebuf.EmitInt64 (bitsOfDouble x) + + | I_ldind (al, vol, dt) -> + emitAlignment codebuf al + emitVolatility codebuf vol + emitInstrCode codebuf + (match dt with + | DT_I -> i_ldind_i + | DT_I1 -> i_ldind_i1 + | DT_I2 -> i_ldind_i2 + | DT_I4 -> i_ldind_i4 + | DT_U1 -> i_ldind_u1 + | DT_U2 -> i_ldind_u2 + | DT_U4 -> i_ldind_u4 + | DT_I8 -> i_ldind_i8 + | DT_R4 -> i_ldind_r4 + | DT_R8 -> i_ldind_r8 + | DT_REF -> i_ldind_ref + | _ -> failwith "ldind") + + | I_stelem dt -> + emitInstrCode codebuf + (match dt with + | DT_I | DT_U -> i_stelem_i + | DT_U1 | DT_I1 -> i_stelem_i1 + | DT_I2 | DT_U2 -> i_stelem_i2 + | DT_I4 | DT_U4 -> i_stelem_i4 + | DT_I8 | DT_U8 -> i_stelem_i8 + | DT_R4 -> i_stelem_r4 + | DT_R8 -> i_stelem_r8 + | DT_REF -> i_stelem_ref + | _ -> failwith "stelem") + + | I_ldelem dt -> + emitInstrCode codebuf + (match dt with + | DT_I -> i_ldelem_i + | DT_I1 -> i_ldelem_i1 + | DT_I2 -> i_ldelem_i2 + | DT_I4 -> i_ldelem_i4 + | DT_I8 -> i_ldelem_i8 + | DT_U1 -> i_ldelem_u1 + | DT_U2 -> i_ldelem_u2 + | DT_U4 -> i_ldelem_u4 + | DT_R4 -> i_ldelem_r4 + | DT_R8 -> i_ldelem_r8 + | DT_REF -> i_ldelem_ref + | _ -> failwith "ldelem") + + | I_stind (al, vol, dt) -> + emitAlignment codebuf al + emitVolatility codebuf vol + emitInstrCode codebuf + (match dt with + | DT_U | DT_I -> i_stind_i + | DT_U1 | DT_I1 -> i_stind_i1 + | DT_U2 | DT_I2 -> i_stind_i2 + | DT_U4 | DT_I4 -> i_stind_i4 + | DT_U8 | DT_I8 -> i_stind_i8 + | DT_R4 -> i_stind_r4 + | DT_R8 -> i_stind_r8 + | DT_REF -> i_stind_ref + | _ -> failwith "stelem") + + | I_switch labs -> codebuf.RecordReqdBrFixups (i_switch, None) labs + + | I_ldfld (al, vol, fspec) -> + emitAlignment codebuf al + emitVolatility codebuf vol + emitFieldSpecInstr cenv codebuf env i_ldfld fspec + | I_ldflda fspec -> + emitFieldSpecInstr cenv codebuf env i_ldflda fspec + | I_ldsfld (vol, fspec) -> + emitVolatility codebuf vol + emitFieldSpecInstr cenv codebuf env i_ldsfld fspec + | I_ldsflda fspec -> + emitFieldSpecInstr cenv codebuf env i_ldsflda fspec + | I_stfld (al, vol, fspec) -> + emitAlignment codebuf al + emitVolatility codebuf vol + emitFieldSpecInstr cenv codebuf env i_stfld fspec + | I_stsfld (vol, fspec) -> + emitVolatility codebuf vol + emitFieldSpecInstr cenv codebuf env i_stsfld fspec + + | I_ldtoken tok -> + emitInstrCode codebuf i_ldtoken + codebuf.EmitUncodedToken + (match tok with + | ILToken.ILType typ -> + match GetTypeAsTypeDefOrRef cenv env typ with + | (tag, idx) when tag = TypeDefOrRefOrSpecTag.TypeDef -> getUncodedToken ILTableNames.TypeDef idx + | (tag, idx) when tag = TypeDefOrRefOrSpecTag.TypeRef -> getUncodedToken ILTableNames.TypeRef idx + | (tag, idx) when tag = TypeDefOrRefOrSpecTag.TypeSpec -> getUncodedToken ILTableNames.TypeSpec idx + | _ -> failwith "?" + | ILToken.ILMethod mspec -> + match GetMethodSpecAsMethodDefOrRef cenv env (mspec, None) with + | (tag, idx) when tag = MethodDefOrRefTag.MethodDef -> getUncodedToken ILTableNames.Method idx + | (tag, idx) when tag = MethodDefOrRefTag.MemberRef -> getUncodedToken ILTableNames.MemberRef idx + | _ -> failwith "?" + + | ILToken.ILField fspec -> + match GetFieldSpecAsFieldDefOrRef cenv env fspec with + | (true, idx) -> getUncodedToken ILTableNames.Field idx + | (false, idx) -> getUncodedToken ILTableNames.MemberRef idx) + | I_ldstr s -> + emitInstrCode codebuf i_ldstr + codebuf.RecordReqdStringFixup (GetUserStringHeapIdx cenv s) + + | I_box ty -> emitTypeInstr cenv codebuf env i_box ty + | I_unbox ty -> emitTypeInstr cenv codebuf env i_unbox ty + | I_unbox_any ty -> emitTypeInstr cenv codebuf env i_unbox_any ty + + | I_newarr (shape, ty) -> + if (shape = ILArrayShape.SingleDimensional) then + emitTypeInstr cenv codebuf env i_newarr ty + else + let args = Array.init shape.Rank (fun _ -> cenv.ilg.typ_Int32) + emitMethodSpecInfoInstr cenv codebuf env i_newobj (".ctor", mkILArrTy(ty, shape), ILCallingConv.Instance, args, ILType.Void, None, [| |]) + + | I_stelem_any (shape, ty) -> + if (shape = ILArrayShape.SingleDimensional) then + emitTypeInstr cenv codebuf env i_stelem_any ty + else + let args = Array.init (shape.Rank+1) (fun i -> if i < shape.Rank then cenv.ilg.typ_Int32 else ty) + emitMethodSpecInfoInstr cenv codebuf env i_call ("Set", mkILArrTy(ty, shape), ILCallingConv.Instance, args, ILType.Void, None, [| |]) + + | I_ldelem_any (shape, ty) -> + if (shape = ILArrayShape.SingleDimensional) then + emitTypeInstr cenv codebuf env i_ldelem_any ty + else + let args = Array.init shape.Rank (fun _ -> cenv.ilg.typ_Int32) + emitMethodSpecInfoInstr cenv codebuf env i_call ("Get", mkILArrTy(ty, shape), ILCallingConv.Instance, args, ty, None, [| |]) + + | I_ldelema (ro, shape, ty) -> + if (ro = ReadonlyAddress) then + emitInstrCode codebuf i_readonly + if (shape = ILArrayShape.SingleDimensional) then + emitTypeInstr cenv codebuf env i_ldelema ty + else + let args = Array.init shape.Rank (fun _ -> cenv.ilg.typ_Int32) + emitMethodSpecInfoInstr cenv codebuf env i_call ("Address", mkILArrTy(ty, shape), ILCallingConv.Instance, args, ILType.Byref ty, None, [| |]) + + | I_castclass ty -> emitTypeInstr cenv codebuf env i_castclass ty + | I_isinst ty -> emitTypeInstr cenv codebuf env i_isinst ty + | I_refanyval ty -> emitTypeInstr cenv codebuf env i_refanyval ty + | I_mkrefany ty -> emitTypeInstr cenv codebuf env i_mkrefany ty + | I_initobj ty -> emitTypeInstr cenv codebuf env i_initobj ty + | I_ldobj (al, vol, ty) -> + emitAlignment codebuf al + emitVolatility codebuf vol + emitTypeInstr cenv codebuf env i_ldobj ty + | I_stobj (al, vol, ty) -> + emitAlignment codebuf al + emitVolatility codebuf vol + emitTypeInstr cenv codebuf env i_stobj ty + | I_cpobj ty -> emitTypeInstr cenv codebuf env i_cpobj ty + | I_sizeof ty -> emitTypeInstr cenv codebuf env i_sizeof ty + | EI_ldlen_multi (_, m) -> + emitShortInt32Instr codebuf (i_ldc_i4_s, i_ldc_i4) m + let mspec = mkILMethSpecInTyRaw(cenv.ilg.typ_Array, ILCallingConv.Instance, "GetLength", [|cenv.ilg.typ_Int32|], cenv.ilg.typ_Int32, [| |]) + emitInstr cenv codebuf env (mkNormalCall mspec) + + | _ -> failwith "an IL instruction cannot be emitted" + + + // Used to put local debug scopes and exception handlers into a tree form + let rangeInsideRange (start_pc1, end_pc1) (start_pc2, end_pc2) = + (start_pc1:int) >= start_pc2 && start_pc1 < end_pc2 && + (end_pc1:int) > start_pc2 && end_pc1 <= end_pc2 + + let lranges_of_clause cl = + match cl with + | ILExceptionClause.Finally r1 -> [r1] + | ILExceptionClause.Fault r1 -> [r1] + | ILExceptionClause.FilterCatch (r1, r2) -> [r1;r2] + | ILExceptionClause.TypeCatch (_ty, r1) -> [r1] + + + let labelsToRange (lab2pc: Dictionary) p = let (l1, l2) = p in lab2pc.[l1], lab2pc.[l2] + + let labelRangeInsideLabelRange lab2pc ls1 ls2 = + rangeInsideRange (labelsToRange lab2pc ls1) (labelsToRange lab2pc ls2) + +// This file still gets used when targeting FSharp.Core 3.1.0.0, e.g. in FSharp.Data +#if !ABOVE_FSCORE_4_0_0_0 + let mapFold f acc (array: _[]) = + match array.Length with + | 0 -> [| |], acc + | len -> + let f = OptimizedClosures.FSharpFunc<_,_,_>.Adapt(f) + let mutable acc = acc + let res = Array.zeroCreate len + for i = 0 to array.Length-1 do + let h',s' = f.Invoke(acc,array.[i]) + res.[i] <- h' + acc <- s' + res, acc +#endif + let findRoots contains vs = + // For each item, either make it a root or make it a child of an existing root + let addToRoot roots x = + // Look to see if 'x' is inside one of the roots + let roots, found = + (false, roots) ||> mapFold (fun found (r, children) -> + if found then ((r, children), true) + elif contains x r then ((r, Array.append [| x |] children), true) + else ((r, children), false)) + + if found then roots + else + // Find the ones that 'x' encompasses and collapse them + let yes, others = roots |> Array.partition (fun (r, _) -> contains r x) + let yesChild = yes |> Array.collect (fun (r, ch) -> Array.append [| r |] ch) + Array.append [| (x, yesChild) |] others + + ([| |], vs) ||> Array.fold addToRoot + + let rec makeSEHTree cenv env (pc2pos: int[]) (lab2pc: Dictionary) (exs: ILExceptionSpec[]) = + + let clause_inside_lrange cl lr = + List.forall (fun lr1 -> labelRangeInsideLabelRange lab2pc lr1 lr) (lranges_of_clause cl) + + let tryspec_inside_lrange (tryspec1: ILExceptionSpec) lr = + (labelRangeInsideLabelRange lab2pc tryspec1.Range lr && clause_inside_lrange tryspec1.Clause lr) + + let tryspec_inside_clause tryspec1 cl = + List.exists (fun lr -> tryspec_inside_lrange tryspec1 lr) (lranges_of_clause cl) + + let tryspec_inside_tryspec tryspec1 (tryspec2: ILExceptionSpec) = + tryspec_inside_lrange tryspec1 tryspec2.Range || + tryspec_inside_clause tryspec1 tryspec2.Clause + + let roots = findRoots tryspec_inside_tryspec exs + let trees = + roots |> Array.map (fun (cl, ch) -> + let r1 = labelsToRange lab2pc cl.Range + let conv ((s1, e1), (s2, e2)) x = pc2pos.[s1], pc2pos.[e1] - pc2pos.[s1], pc2pos.[s2], pc2pos.[e2] - pc2pos.[s2], x + let children = makeSEHTree cenv env pc2pos lab2pc ch + let n = + match cl.Clause with + | ILExceptionClause.Finally r2 -> + conv (r1, labelsToRange lab2pc r2) ExceptionClauseKind.FinallyClause + | ILExceptionClause.Fault r2 -> + conv (r1, labelsToRange lab2pc r2) ExceptionClauseKind.FaultClause + | ILExceptionClause.FilterCatch ((filterStart, _), r3) -> + conv (r1, labelsToRange lab2pc r3) (ExceptionClauseKind.FilterClause (pc2pos.[lab2pc.[filterStart]])) + | ILExceptionClause.TypeCatch (typ, r2) -> + conv (r1, labelsToRange lab2pc r2) (TypeFilterClause (getTypeDefOrRefAsUncodedToken (GetTypeAsTypeDefOrRef cenv env typ))) + SEHTree.Node (Some n, children) ) + + trees + +#if EMIT_DEBUG_INFO + let rec makeLocalsTree cenv localSigs (pc2pos: int[]) (lab2pc: Dictionary) (exs: ILLocalDebugInfo[]) = + let localInsideLocal (locspec1: ILLocalDebugInfo) (locspec2: ILLocalDebugInfo) = + labelRangeInsideLabelRange lab2pc locspec1.Range locspec2.Range + + let roots = findRoots localInsideLocal exs + + let trees = + roots |> Array.collect (fun (cl, ch) -> + let (s1, e1) = labelsToRange lab2pc cl.Range + let (s1, e1) = pc2pos.[s1], pc2pos.[e1] + let children = makeLocalsTree cenv localSigs pc2pos lab2pc ch + mkScopeNode cenv localSigs (s1, e1, cl.DebugMappings, children)) + trees +#endif + + + // Emit the SEH tree + let rec emitExceptionHandlerTree (codebuf: CodeBuffer) (Node (x, childSEH)) = + childSEH |> Array.iter (emitExceptionHandlerTree codebuf) // internal first + x |> Option.iter codebuf.EmitExceptionClause + + let emitCode cenv localSigs (codebuf: CodeBuffer) env (code: ILCode) = + let instrs = code.Instrs + + // Build a table mapping Abstract IL pcs to positions in the generated code buffer + let pc2pos = Array.zeroCreate (instrs.Length+1) + let pc2labs = Dictionary() + for (KeyValue(lab, pc)) in code.Labels do + if pc2labs.ContainsKey pc then pc2labs.[pc] <- lab :: pc2labs.[pc] else pc2labs.[pc] <- [lab] + + // Emit the instructions + for pc = 0 to instrs.Length do + if pc2labs.ContainsKey pc then + for lab in pc2labs.[pc] do + codebuf.RecordAvailBrFixup lab + pc2pos.[pc] <- codebuf.code.Position + if pc < instrs.Length then + match instrs.[pc] with + | I_br l when code.Labels.[l] = pc + 1 -> () // compress I_br to next instruction + | i -> emitInstr cenv codebuf env i + + // Build the exceptions and locals information, ready to emit + let SEHTree = makeSEHTree cenv env pc2pos code.Labels code.Exceptions + Array.iter (emitExceptionHandlerTree codebuf) SEHTree + +#if EMIT_DEBUG_INFO + // Build the locals information, ready to emit + let localsTree = makeLocalsTree cenv localSigs pc2pos code.Labels code.Locals + localsTree +#endif + + let EmitTopCode cenv localSigs env nm code = + let codebuf = CodeBuffer.Create nm + let origScopes = emitCode cenv localSigs codebuf env code + let origCode = codebuf.code.Close() + let origExnClauses = codebuf.seh.ToArray() + let origReqdStringFixups = codebuf.reqdStringFixupsInMethod.ToArray() + let origAvailBrFixups = codebuf.availBrFixups + let origReqdBrFixups = codebuf.reqdBrFixups.ToArray() +#if EMIT_DEBUG_INFO + let origSeqPoints = codebuf.seqpoints.ToArray() +#endif + + let newCode, newReqdStringFixups, newExnClauses = + applyBrFixups origCode origExnClauses origReqdStringFixups origAvailBrFixups origReqdBrFixups + +#if EMIT_DEBUG_INFO + let rootScope = + { Children= newScopes + StartOffset=0 + EndOffset=newCode.Length + Locals=[| |] } +#endif + + (newReqdStringFixups, newExnClauses, newCode) + + // -------------------------------------------------------------------- + // ILMethodBody --> bytes + // -------------------------------------------------------------------- + let GetFieldDefTypeAsBlobIdx cenv env ty = + let bytes = emitBytesViaBuffer (fun bb -> bb.EmitByte e_IMAGE_CEE_CS_CALLCONV_FIELD + EmitType cenv env bb ty) + GetBytesAsBlobIdx cenv bytes + + let GenILMethodBody mname cenv env (il: ILMethodBody) = + let localSigs = + if cenv.generatePdb then + il.Locals |> Array.map (fun l -> + // Write a fake entry for the local signature headed by e_IMAGE_CEE_CS_CALLCONV_FIELD. This is referenced by the PDB file + ignore (FindOrAddSharedRow cenv ILTableNames.StandAloneSig (SharedRow [| Blob (GetFieldDefTypeAsBlobIdx cenv env l.Type) |])) + // Now write the type + GetTypeOfLocalAsBytes cenv env l) + else + [| |] + + let requiredStringFixups, seh, code (* , seqpoints, scopes *) = Codebuf.EmitTopCode cenv localSigs env mname il.Code + let codeSize = code.Length + let methbuf = ByteBuffer.Create (codeSize * 3) + // Do we use the tiny format? + if isEmpty il.Locals && il.MaxStack <= 8 && isEmpty seh && codeSize < 64 then + // Use Tiny format + let alignedCodeSize = align 4 (codeSize + 1) + let codePadding = (alignedCodeSize - (codeSize + 1)) + let requiredStringFixups' = (1, requiredStringFixups) + methbuf.EmitByte (byte codeSize <<< 2 ||| e_CorILMethod_TinyFormat) + methbuf.EmitBytes code + methbuf.EmitPadding codePadding + 0x0, (requiredStringFixups', methbuf.Close()) // , seqpoints, scopes + else + // Use Fat format + let flags = + e_CorILMethod_FatFormat ||| + (if not (isEmpty seh) then e_CorILMethod_MoreSects else 0x0uy) ||| + (if il.IsZeroInit then e_CorILMethod_InitLocals else 0x0uy) + + let localToken = + if isEmpty il.Locals then 0x0 else + getUncodedToken ILTableNames.StandAloneSig + (FindOrAddSharedRow cenv ILTableNames.StandAloneSig (GetLocalSigAsStandAloneSigIdx cenv env il.Locals)) + + let alignedCodeSize = align 0x4 codeSize + let codePadding = (alignedCodeSize - codeSize) + + methbuf.EmitByte flags + methbuf.EmitByte 0x30uy // last four bits record size of fat header in 4 byte chunks - this is always 12 bytes = 3 four word chunks + methbuf.EmitUInt16 (uint16 il.MaxStack) + methbuf.EmitInt32 codeSize + methbuf.EmitInt32 localToken + methbuf.EmitBytes code + methbuf.EmitPadding codePadding + + if not (isEmpty seh) then + // Can we use the small exception handling table format? + let smallSize = (seh.Length * 12 + 4) + let canUseSmall = + smallSize <= 0xFF && + seh |> Array.forall (fun (st1, sz1, st2, sz2, _) -> + st1 <= 0xFFFF && st2 <= 0xFFFF && sz1 <= 0xFF && sz2 <= 0xFF) + + let kindAsInt32 k = + match k with + | FinallyClause -> e_COR_ILEXCEPTION_CLAUSE_FINALLY + | FaultClause -> e_COR_ILEXCEPTION_CLAUSE_FAULT + | FilterClause _ -> e_COR_ILEXCEPTION_CLAUSE_FILTER + | TypeFilterClause _ -> e_COR_ILEXCEPTION_CLAUSE_EXCEPTION + let kindAsExtraInt32 k = + match k with + | FinallyClause | FaultClause -> 0x0 + | FilterClause i -> i + | TypeFilterClause uncoded -> uncoded + + if canUseSmall then + methbuf.EmitByte e_CorILMethod_Sect_EHTable + methbuf.EmitByte (b0 smallSize |> byte) + methbuf.EmitByte 0x00uy + methbuf.EmitByte 0x00uy + seh |> Array.iter (fun (st1, sz1, st2, sz2, kind) -> + let k32 = kindAsInt32 kind + methbuf.EmitInt32AsUInt16 k32 + methbuf.EmitInt32AsUInt16 st1 + methbuf.EmitByte (b0 sz1 |> byte) + methbuf.EmitInt32AsUInt16 st2 + methbuf.EmitByte (b0 sz2 |> byte) + methbuf.EmitInt32 (kindAsExtraInt32 kind)) + else + let bigSize = (seh.Length * 24 + 4) + methbuf.EmitByte (e_CorILMethod_Sect_EHTable ||| e_CorILMethod_Sect_FatFormat) + methbuf.EmitByte (b0 bigSize |> byte) + methbuf.EmitByte (b1 bigSize |> byte) + methbuf.EmitByte (b2 bigSize |> byte) + seh |> Array.iter (fun (st1, sz1, st2, sz2, kind) -> + let k32 = kindAsInt32 kind + methbuf.EmitInt32 k32 + methbuf.EmitInt32 st1 + methbuf.EmitInt32 sz1 + methbuf.EmitInt32 st2 + methbuf.EmitInt32 sz2 + methbuf.EmitInt32 (kindAsExtraInt32 kind)) + + let requiredStringFixups' = (12, requiredStringFixups) + + localToken, (requiredStringFixups', methbuf.Close()) //, seqpoints, scopes + + // -------------------------------------------------------------------- + // ILFieldDef --> FieldDef Row + // -------------------------------------------------------------------- + + let rec GetFieldDefAsFieldDefRow cenv env (fd: ILFieldDef) = + let flags = int fd.Attributes ||| (if (fd.LiteralValue <> None) then 0x8000 else 0x0) //||| + //(if (fd.Marshal <> None) then 0x1000 else 0x0) ||| + //(if (fd.Data <> None) then 0x0100 else 0x0) + UnsharedRow + [| UShort (uint16 flags) + StringE (GetStringHeapIdx cenv fd.Name) + Blob (GetFieldDefSigAsBlobIdx cenv env fd ) |] + + and GetFieldDefSigAsBlobIdx cenv env fd = GetFieldDefTypeAsBlobIdx cenv env fd.FieldType + + and GenFieldDefPass3 cenv env fd = + let fidx = AddUnsharedRow cenv ILTableNames.Field (GetFieldDefAsFieldDefRow cenv env fd) + GenCustomAttrsPass3Or4 cenv (HasCustomAttributeTag.FieldDef, fidx) fd.CustomAttrs +#if EMIT_FIELD_DATA + // Write FieldRVA table - fixups into data section done later + match fd.Data with + | None -> () + | Some b -> + let offs = cenv.data.Position + cenv.data.EmitBytes b + AddUnsharedRow cenv ILTableNames.FieldRVA + (UnsharedRow [| Data (offs, false); SimpleIndex (ILTableNames.Field, fidx) |]) |> ignore + // Write FieldMarshal table + match fd.Marshal with + | None -> () + | Some ntyp -> + AddUnsharedRow cenv ILTableNames.FieldMarshal + (UnsharedRow [| HasFieldMarshal (hfm_FieldDef, fidx) + Blob (GetNativeTypeAsBlobIdx cenv ntyp) |]) |> ignore +#endif + // Write Content table + match fd.LiteralValue with + | None -> () + | Some i -> + AddUnsharedRow cenv ILTableNames.Constant + (UnsharedRow + [| GetFieldInitFlags i + HasConstant (HasConstantTag.FieldDef, fidx) + Blob (GetFieldInitAsBlobIdx cenv i) |]) |> ignore + // Write FieldLayout table + match fd.Offset with + | None -> () + | Some offset -> + AddUnsharedRow cenv ILTableNames.FieldLayout + (UnsharedRow [| ULong offset; SimpleIndex (ILTableNames.Field, fidx) |]) |> ignore + + + // -------------------------------------------------------------------- + // ILGenericParameterDef --> GenericParam Row + // -------------------------------------------------------------------- + + let rec GetGenericParamAsGenericParamRow cenv _env idx owner (gp: ILGenericParameterDef) = + let flags = + (if gp.IsCovariant then 0x0001 else 0x0000) ||| + (if gp.IsContravariant then 0x0002 else 0x0000) ||| + (if gp.HasReferenceTypeConstraint then 0x0004 else 0x0000) ||| + (if gp.HasNotNullableValueTypeConstraint then 0x0008 else 0x0000) ||| + (if gp.HasDefaultConstructorConstraint then 0x0010 else 0x0000) + + let mdVersionMajor, _ = metadataSchemaVersionSupportedByCLRVersion cenv.desiredMetadataVersion + if (mdVersionMajor = 1) then + SharedRow + [| UShort (uint16 idx) + UShort (uint16 flags) + TypeOrMethodDef (fst owner, snd owner) + StringE (GetStringHeapIdx cenv gp.Name) + TypeDefOrRefOrSpec (TypeDefOrRefOrSpecTag.TypeDef, 0) (* empty kind field in deprecated metadata *) |] + else + SharedRow + [| UShort (uint16 idx) + UShort (uint16 flags) + TypeOrMethodDef (fst owner, snd owner) + StringE (GetStringHeapIdx cenv gp.Name) |] + + and GenTypeAsGenericParamConstraintRow cenv env gpidx ty = + let tdorTag, tdorRow = GetTypeAsTypeDefOrRef cenv env ty + UnsharedRow + [| SimpleIndex (ILTableNames.GenericParam, gpidx) + TypeDefOrRefOrSpec (tdorTag, tdorRow) |] + + and GenGenericParamConstraintPass4 cenv env gpidx ty = + AddUnsharedRow cenv ILTableNames.GenericParamConstraint (GenTypeAsGenericParamConstraintRow cenv env gpidx ty) |> ignore + + and GenGenericParamPass3 cenv env idx owner gp = + // here we just collect generic params, its constraints\custom attributes will be processed on pass4 + // shared since we look it up again below in GenGenericParamPass4 + AddSharedRow cenv ILTableNames.GenericParam (GetGenericParamAsGenericParamRow cenv env idx owner gp) + |> ignore + + + and GenGenericParamPass4 cenv env idx owner (gp: ILGenericParameterDef) = + let gpidx = FindOrAddSharedRow cenv ILTableNames.GenericParam (GetGenericParamAsGenericParamRow cenv env idx owner gp) + GenCustomAttrsPass3Or4 cenv (HasCustomAttributeTag.GenericParam, gpidx) gp.CustomAttrs + gp.Constraints |> Array.iter (GenGenericParamConstraintPass4 cenv env gpidx) + + // -------------------------------------------------------------------- + // param and return --> Param Row + // -------------------------------------------------------------------- + + let rec GetParamAsParamRow cenv _env seq (param: ILParameter) = + let flags = + (if param.IsIn then 0x0001 else 0x0000) ||| + (if param.IsOut then 0x0002 else 0x0000) ||| + (if param.IsOptional then 0x0010 else 0x0000) ||| + (if param.Default.HasValue then 0x1000 else 0x0000) //||| + //(if param.Marshal <> None then 0x2000 else 0x0000) + + UnsharedRow + [| UShort (uint16 flags) + UShort (uint16 seq) + StringE (GetStringHeapIdxOption cenv param.Name) |] + + and GenParamPass3 cenv env seq (param: ILParameter) = + if not param.IsIn && not param.IsOut && not param.IsOptional && param.Default.IsNone && param.Name.IsNone // && Option.isNone param.Marshal + then () + else + let pidx = AddUnsharedRow cenv ILTableNames.Param (GetParamAsParamRow cenv env seq param) + GenCustomAttrsPass3Or4 cenv (HasCustomAttributeTag.ParamDef, pidx) param.CustomAttrs +#if EMIT_FIELD_MARSHAL + // Write FieldRVA table - fixups into data section done later + match param.Marshal with + | None -> () + | Some ntyp -> + AddUnsharedRow cenv ILTableNames.FieldMarshal + (UnsharedRow [| HasFieldMarshal (hfm_ParamDef, pidx); Blob (GetNativeTypeAsBlobIdx cenv ntyp) |]) |> ignore + // Write Content table for DefaultParameterValue attr +#endif + match param.Default with + | UNone -> () + | USome i -> + AddUnsharedRow cenv ILTableNames.Constant + (UnsharedRow + [| GetFieldInitFlags i + HasConstant (HasConstantTag.ParamDef, pidx) + Blob (GetFieldInitAsBlobIdx cenv i) |]) |> ignore + + let GenReturnAsParamRow (returnv: ILReturn) = + let flags = 0x0000 // || (if returnv.Marshal <> None then 0x2000 else 0x0000) + UnsharedRow + [| UShort (uint16 flags) + UShort 0us (* sequence num. *) + StringE 0 |] + + let GenReturnPass3 cenv (returnv: ILReturn) = + if (* Option.isSome returnv.Marshal || *) not (isEmpty returnv.CustomAttrs.Entries) then + let pidx = AddUnsharedRow cenv ILTableNames.Param (GenReturnAsParamRow returnv) + GenCustomAttrsPass3Or4 cenv (HasCustomAttributeTag.ParamDef, pidx) returnv.CustomAttrs +#if EMIT_MARSHAL + match returnv.Marshal with + | None -> () + | Some ntyp -> + AddUnsharedRow cenv ILTableNames.FieldMarshal + (UnsharedRow + [| HasFieldMarshal (hfm_ParamDef, pidx) + Blob (GetNativeTypeAsBlobIdx cenv ntyp) |]) |> ignore +#endif + + // -------------------------------------------------------------------- + // ILMethodDef --> ILMethodDef Row + // -------------------------------------------------------------------- + + let GetMethodDefSigAsBytes cenv env (mdef: ILMethodDef) = + emitBytesViaBuffer (fun bb -> + bb.EmitByte (callconvToByte mdef.GenericParams.Length mdef.CallingConv) + if mdef.GenericParams.Length > 0 then bb.EmitZ32 mdef.GenericParams.Length + bb.EmitZ32 mdef.Parameters.Length + EmitType cenv env bb mdef.Return.Type + mdef.ParameterTypes |> Array.iter (EmitType cenv env bb)) + + let GenMethodDefSigAsBlobIdx cenv env mdef = + GetBytesAsBlobIdx cenv (GetMethodDefSigAsBytes cenv env mdef) + + let GenMethodDefAsRow cenv env midx (md: ILMethodDef) = + let flags = int md.Attributes + let implflags = int md.ImplAttributes + + if md.IsEntryPoint then + if cenv.entrypoint <> None then failwith "duplicate entrypoint" + else cenv.entrypoint <- Some (true, midx) + let codeAddr = + (match md.Body with + | Some ilmbody -> + let addr = cenv.nextCodeAddr + let (localToken, code (* , seqpoints, rootScope *) ) = GenILMethodBody md.Name cenv env ilmbody + +#if EMIT_DEBUG_INFO + // Now record the PDB record for this method - we write this out later. + if cenv.generatePdb then + cenv.pdbinfo.Add + { MethToken=getUncodedToken ILTableNames.Method midx + MethName=md.Name + LocalSignatureToken=localToken + Params= [| |] (* REVIEW *) + RootScope = Some rootScope + Range= + match ilmbody.SourceMarker with + | Some m when cenv.generatePdb -> + // table indexes are 1-based, document array indexes are 0-based + let doc = (cenv.documents.FindOrAddSharedEntry m.Document) - 1 + + Some ({ Document=doc + Line=m.Line + Column=m.Column }, + { Document=doc + Line=m.EndLine + Column=m.EndColumn }) + | _ -> None + SequencePoints=seqpoints } +#endif + + cenv.AddCode code + addr +#if EMIT_DEBUG_INFO + | MethodBody.Abstract -> + // Now record the PDB record for this method - we write this out later. + if cenv.generatePdb then + cenv.pdbinfo.Add + { MethToken = getUncodedToken ILTableNames.Method midx + MethName = md.Name + LocalSignatureToken = 0x0 // No locals it's abstract + Params = [| |] + RootScope = None + Range = None + SequencePoints = [| |] } + 0x0000 + | MethodBody.Native -> + failwith "cannot write body of native method - Abstract IL cannot roundtrip mixed native/managed binaries" +#endif + | _ -> 0x0000) + + UnsharedRow + [| ULong codeAddr + UShort (uint16 implflags) + UShort (uint16 flags) + StringE (GetStringHeapIdx cenv md.Name) + Blob (GenMethodDefSigAsBlobIdx cenv env md) + SimpleIndex(ILTableNames.Param, cenv.GetTable(ILTableNames.Param).Count + 1) |] + + let GenMethodImplPass3 cenv env _tgparams tidx mimpl = + let midxTag, midxRow = GetMethodSpecAsMethodDef cenv env (mimpl.OverrideBy, None) + let midx2Tag, midx2Row = GetOverridesSpecAsMethodDefOrRef cenv env mimpl.Overrides + AddUnsharedRow cenv ILTableNames.MethodImpl + (UnsharedRow + [| SimpleIndex (ILTableNames.TypeDef, tidx) + MethodDefOrRef (midxTag, midxRow) + MethodDefOrRef (midx2Tag, midx2Row) |]) |> ignore + + let GenMethodDefPass3 cenv env (md:ILMethodDef) = + let midx = GetMethodDefIdx cenv md + let idx2 = AddUnsharedRow cenv ILTableNames.Method (GenMethodDefAsRow cenv env midx md) + if midx <> idx2 then failwith "index of method def on pass 3 does not match index on pass 2" + GenReturnPass3 cenv md.Return + md.Parameters |> Array.iteri (fun n param -> GenParamPass3 cenv env (n+1) param) + md.CustomAttrs |> GenCustomAttrsPass3Or4 cenv (HasCustomAttributeTag.MethodDef, midx) +#if EMIT_SECURITY_DECLS + md.SecurityDecls.Entries |> GenSecurityDeclsPass3 cenv (hds_MethodDef, midx) +#endif + md.GenericParams |> Array.iteri (fun n gp -> GenGenericParamPass3 cenv env n (TypeOrMethodDefTag.MethodDef, midx) gp) +#if EMIT_PINVOKE + match md.Body.Contents with + | MethodBody.PInvoke attr -> + let flags = + begin match attr.CallingConv with + | PInvokeCallingConvention.None -> 0x0000 + | PInvokeCallingConvention.Cdecl -> 0x0200 + | PInvokeCallingConvention.Stdcall -> 0x0300 + | PInvokeCallingConvention.Thiscall -> 0x0400 + | PInvokeCallingConvention.Fastcall -> 0x0500 + | PInvokeCallingConvention.WinApi -> 0x0100 + end ||| + begin match attr.CharEncoding with + | PInvokeCharEncoding.None -> 0x0000 + | PInvokeCharEncoding.Ansi -> 0x0002 + | PInvokeCharEncoding.Unicode -> 0x0004 + | PInvokeCharEncoding.Auto -> 0x0006 + end ||| + begin match attr.CharBestFit with + | PInvokeCharBestFit.UseAssembly -> 0x0000 + | PInvokeCharBestFit.Enabled -> 0x0010 + | PInvokeCharBestFit.Disabled -> 0x0020 + end ||| + begin match attr.ThrowOnUnmappableChar with + | PInvokeThrowOnUnmappableChar.UseAssembly -> 0x0000 + | PInvokeThrowOnUnmappableChar.Enabled -> 0x1000 + | PInvokeThrowOnUnmappableChar.Disabled -> 0x2000 + end ||| + (if attr.NoMangle then 0x0001 else 0x0000) ||| + (if attr.LastError then 0x0040 else 0x0000) + AddUnsharedRow cenv ILTableNames.ImplMap + (UnsharedRow + [| UShort (uint16 flags) + MemberForwarded (mf_MethodDef, midx) + StringE (GetStringHeapIdx cenv attr.Name) + SimpleIndex (ILTableNames.ModuleRef, GetModuleRefAsIdx cenv attr.Where) |]) |> ignore + | _ -> () +#endif + + let GenMethodDefPass4 cenv env md = + let midx = GetMethodDefIdx cenv md + md.GenericParams |> Array.iteri (fun n gp -> GenGenericParamPass4 cenv env n (TypeOrMethodDefTag.MethodDef, midx) gp) + + let GenPropertyMethodSemanticsPass3 cenv pidx kind mref = + // REVIEW: why are we catching exceptions here? + let midx = try GetMethodRefAsMethodDefIdx cenv mref with MethodDefNotFound -> 1 + AddUnsharedRow cenv ILTableNames.MethodSemantics + (UnsharedRow + [| UShort (uint16 kind) + SimpleIndex (ILTableNames.Method, midx) + HasSemantics (HasSemanticsTag.Property, pidx) |]) |> ignore + + let rec GetPropertySigAsBlobIdx cenv env prop = + GetBytesAsBlobIdx cenv (GetPropertySigAsBytes cenv env prop) + + and GetPropertySigAsBytes cenv env prop = + emitBytesViaBuffer (fun bb -> + let b = ((hasthisToByte prop.CallingConv) ||| e_IMAGE_CEE_CS_CALLCONV_PROPERTY) + bb.EmitByte b + bb.EmitZ32 prop.IndexParameterTypes.Length + EmitType cenv env bb prop.PropertyType + prop.IndexParameterTypes |> Array.iter (EmitType cenv env bb)) + + and GetPropertyAsPropertyRow cenv env (prop:ILPropertyDef) = + let flags = + (if prop.IsSpecialName then 0x0200 else 0x0) ||| + (if prop.IsRTSpecialName then 0x0400 else 0x0) ||| + (if prop.Init <> None then 0x1000 else 0x0) + UnsharedRow + [| UShort (uint16 flags) + StringE (GetStringHeapIdx cenv prop.Name) + Blob (GetPropertySigAsBlobIdx cenv env prop) |] + + /// ILPropertyDef --> Property Row + MethodSemantics entries + and GenPropertyPass3 cenv env prop = + let pidx = AddUnsharedRow cenv ILTableNames.Property (GetPropertyAsPropertyRow cenv env prop) + prop.SetMethod |> Option.iter (GenPropertyMethodSemanticsPass3 cenv pidx 0x0001) + prop.GetMethod |> Option.iter (GenPropertyMethodSemanticsPass3 cenv pidx 0x0002) + // Write Constant table + match prop.Init with + | None -> () + | Some i -> + AddUnsharedRow cenv ILTableNames.Constant + (UnsharedRow + [| GetFieldInitFlags i + HasConstant (HasConstantTag.Property, pidx) + Blob (GetFieldInitAsBlobIdx cenv i) |]) |> ignore + GenCustomAttrsPass3Or4 cenv (HasCustomAttributeTag.Property, pidx) prop.CustomAttrs + + let rec GenEventMethodSemanticsPass3 cenv eidx kind mref = + let addIdx = try GetMethodRefAsMethodDefIdx cenv mref with MethodDefNotFound -> 1 + AddUnsharedRow cenv ILTableNames.MethodSemantics + (UnsharedRow + [| UShort (uint16 kind) + SimpleIndex (ILTableNames.Method, addIdx) + HasSemantics (HasSemanticsTag.Event, eidx) |]) |> ignore + + /// ILEventDef --> Event Row + MethodSemantics entries + and GenEventAsEventRow cenv env (md: ILEventDef) = + let flags = + (if md.IsSpecialName then 0x0200 else 0x0) ||| + (if md.IsRTSpecialName then 0x0400 else 0x0) + let tdorTag, tdorRow = GetTypeAsTypeDefOrRef cenv env md.EventHandlerType + UnsharedRow + [| UShort (uint16 flags) + StringE (GetStringHeapIdx cenv md.Name) + TypeDefOrRefOrSpec (tdorTag, tdorRow) |] + + and GenEventPass3 cenv env (md: ILEventDef) = + let eidx = AddUnsharedRow cenv ILTableNames.Event (GenEventAsEventRow cenv env md) + md.AddMethod |> GenEventMethodSemanticsPass3 cenv eidx 0x0008 + md.RemoveMethod |> GenEventMethodSemanticsPass3 cenv eidx 0x0010 + //Option.iter (GenEventMethodSemanticsPass3 cenv eidx 0x0020) md.FireMethod + //List.iter (GenEventMethodSemanticsPass3 cenv eidx 0x0004) md.OtherMethods + GenCustomAttrsPass3Or4 cenv (HasCustomAttributeTag.Event, eidx) md.CustomAttrs + + + // -------------------------------------------------------------------- + // resource --> generate ... + // -------------------------------------------------------------------- + + let rec GetResourceAsManifestResourceRow cenv r = + let data, impl = + match r.Location with + | ILResourceLocation.Local bf -> + let b = bf() + // Embedded managed resources must be word-aligned. However resource format is + // not specified in ECMA. Some mscorlib resources appear to be non-aligned - it seems it doesn't matter.. + let offset = cenv.resources.Position + let alignedOffset = (align 0x8 offset) + let pad = alignedOffset - offset + let resourceSize = b.Length + cenv.resources.EmitPadding pad + cenv.resources.EmitInt32 resourceSize + cenv.resources.EmitBytes b + Data (alignedOffset, true), (ImplementationTag.File, 0) + | ILResourceLocation.File (mref, offset) -> ULong offset, (ImplementationTag.File, GetModuleRefAsFileIdx cenv mref) + | ILResourceLocation.Assembly aref -> ULong 0x0, (ImplementationTag.AssemblyRef, GetAssemblyRefAsIdx cenv aref) + UnsharedRow + [| data + ULong (match r.Access with ILResourceAccess.Public -> 0x01 | ILResourceAccess.Private -> 0x02) + StringE (GetStringHeapIdx cenv r.Name) + Implementation (fst impl, snd impl) |] + + and GenResourcePass3 cenv r = + let idx = AddUnsharedRow cenv ILTableNames.ManifestResource (GetResourceAsManifestResourceRow cenv r) + GenCustomAttrsPass3Or4 cenv (HasCustomAttributeTag.ManifestResource, idx) r.CustomAttrs + + // -------------------------------------------------------------------- + // ILTypeDef --> generate ILFieldDef, ILMethodDef, ILPropertyDef etc. rows + // -------------------------------------------------------------------- + + let rec GenTypeDefPass3 enc cenv (td:ILTypeDef) = + try + let env = envForTypeDef td + let tidx = GetIdxForTypeDef cenv (TdKey(enc, td.Namespace, td.Name)) + td.Properties.Entries |> Array.iter (GenPropertyPass3 cenv env) + td.Events.Entries |> Array.iter (GenEventPass3 cenv env) + td.Fields.Entries |> Array.iter (GenFieldDefPass3 cenv env) + td.Methods.Entries |> Array.iter (GenMethodDefPass3 cenv env) + td.MethodImpls.Entries |> Array.iter (GenMethodImplPass3 cenv env td.GenericParams.Length tidx) + // ClassLayout entry if needed + match td.Layout with + | ILTypeDefLayout.Auto -> () + | ILTypeDefLayout.Sequential layout | ILTypeDefLayout.Explicit layout -> + if Option.isSome layout.Pack || Option.isSome layout.Size then + AddUnsharedRow cenv ILTableNames.ClassLayout + (UnsharedRow + [| UShort (defaultArg layout.Pack (uint16 0x0)) + ULong (defaultArg layout.Size 0x0) + SimpleIndex (ILTableNames.TypeDef, tidx) |]) |> ignore + +#if EMIT_SECURITY_DECLS + td.SecurityDecls.Entries |> GenSecurityDeclsPass3 cenv (hds_TypeDef, tidx) +#endif + td.CustomAttrs |> GenCustomAttrsPass3Or4 cenv (HasCustomAttributeTag.TypeDef, tidx) + td.GenericParams |> Array.iteri (fun n gp -> GenGenericParamPass3 cenv env n (TypeOrMethodDefTag.TypeDef, tidx) gp) + td.NestedTypes.Entries |> GenTypeDefsPass3 (addILTypeName enc td) cenv + with e -> + failwith ("Error in pass3 for type "+td.Name+", error: "+e.Message) + reraise() + raise e + + and GenTypeDefsPass3 enc cenv tds = + Array.iter (GenTypeDefPass3 enc cenv) tds + + /// ILTypeDef --> generate generic params on ILMethodDef: ensures + /// GenericParam table is built sorted by owner. + + let rec GenTypeDefPass4 enc cenv (td:ILTypeDef) = + try + let env = envForTypeDef td + let tidx = GetIdxForTypeDef cenv (TdKey(enc, td.Namespace, td.Name)) + td.Methods.Entries |> Array.iter (GenMethodDefPass4 cenv env) + td.GenericParams |> Array.iteri (fun n gp -> GenGenericParamPass4 cenv env n (TypeOrMethodDefTag.TypeDef, tidx) gp) + GenTypeDefsPass4 (addILTypeName enc td) cenv td.NestedTypes.Entries + with e -> + failwith ("Error in pass4 for type "+td.Name+", error: "+e.Message) + reraise() + raise e + + and GenTypeDefsPass4 enc cenv tds = + Array.iter (GenTypeDefPass4 enc cenv) tds + + + let DateTime1970Jan01 = new System.DateTime(1970,1,1,0,0,0,System.DateTimeKind.Utc) (* ECMA Spec (Oct2002), Part II, 24.2.2 PE File Header. *) + let timestamp = (System.DateTime.UtcNow - DateTime1970Jan01).TotalSeconds |> int + + // -------------------------------------------------------------------- + // ILExportedTypesAndForwarders --> ILExportedTypeOrForwarder table + // -------------------------------------------------------------------- + + let rec GenNestedExportedTypePass3 cenv cidx (ce: ILNestedExportedType) = + let flags = GetMemberAccessFlags ce.Access + let nidx = + AddUnsharedRow cenv ILTableNames.ExportedType + (UnsharedRow + [| ULong flags + ULong 0x0 + StringE (GetStringHeapIdx cenv ce.Name) + StringE 0 + Implementation (ImplementationTag.ExportedType, cidx) |]) + GenCustomAttrsPass3Or4 cenv (HasCustomAttributeTag.ExportedType, nidx) ce.CustomAttrs + GenNestedExportedTypesPass3 cenv nidx ce.Nested + + and GenNestedExportedTypesPass3 cenv nidx (nce: ILNestedExportedTypesAndForwarders) = + nce.Entries |> Array.iter (GenNestedExportedTypePass3 cenv nidx) + + and GenExportedTypePass3 cenv (ce: ILExportedTypeOrForwarder) = + let nselem, nelem = GetTypeNameAsElemPair cenv (ce.Namespace, ce.Name) + let flags = GetTypeAccessFlags ce.Access + let flags = if ce.IsForwarder then 0x00200000 ||| flags else flags + let impl = GetScopeRefAsImplementationElem cenv ce.ScopeRef + let cidx = + AddUnsharedRow cenv ILTableNames.ExportedType + (UnsharedRow + [| ULong flags + ULong 0x0 + nelem + nselem + Implementation (fst impl, snd impl) |]) + GenCustomAttrsPass3Or4 cenv (HasCustomAttributeTag.ExportedType, cidx) ce.CustomAttrs + GenNestedExportedTypesPass3 cenv cidx ce.Nested + + + + // -------------------------------------------------------------------- + // manifest --> generate Assembly row + // -------------------------------------------------------------------- + + and GetManifsetAsAssemblyRow cenv m = + UnsharedRow + [|ULong m.AuxModuleHashAlgorithm + UShort (match m.Version with UNone -> 0us | USome v -> uint16 v.Major) + UShort (match m.Version with UNone -> 0us | USome v -> uint16 v.Minor) + UShort (match m.Version with UNone -> 0us | USome v -> uint16 v.Build) + UShort (match m.Version with UNone -> 0us | USome v -> uint16 v.Revision) + ULong + ( //(match m.AssemblyLongevity with + //| ILAssemblyLongevity.Unspecified -> 0x0000 + //| ILAssemblyLongevity.Library -> 0x0002 + //| ILAssemblyLongevity.PlatformAppDomain -> 0x0004 + // | ILAssemblyLongevity.PlatformProcess -> 0x0006 + // | ILAssemblyLongevity.PlatformSystem -> 0x0008) ||| + (if m.Retargetable then 0x100 else 0x0) ||| + // Setting these causes peverify errors. Hence both ilread and ilwrite ignore them and refuse to set them. + // Any debugging customattributes will automatically propagate + // REVIEW: No longer appears to be the case + (if m.JitTracking then 0x8000 else 0x0) ||| + (match m.PublicKey with UNone -> 0x0000 | USome _ -> 0x0001) ||| 0x0000) + (match m.PublicKey with UNone -> Blob 0 | USome x -> Blob (GetBytesAsBlobIdx cenv x)) + StringE (GetStringHeapIdx cenv m.Name) + (match m.Locale with UNone -> StringE 0 | USome x -> StringE (GetStringHeapIdx cenv x)) |] + + and GenManifestPass3 cenv m = + let aidx = AddUnsharedRow cenv ILTableNames.Assembly (GetManifsetAsAssemblyRow cenv m) +#if EMIT_SECURITY_DECLS + GenSecurityDeclsPass3 cenv (hds_Assembly, aidx) m.SecurityDecls.Entries +#endif + GenCustomAttrsPass3Or4 cenv (HasCustomAttributeTag.Assembly, aidx) m.CustomAttrs + m.ExportedTypes.Entries |> Array.iter (GenExportedTypePass3 cenv) + // Record the entrypoint decl if needed. + match m.EntrypointElsewhere with + | Some mref -> + if cenv.entrypoint <> None then failwith "duplicate entrypoint" + else cenv.entrypoint <- Some (false, GetModuleRefAsIdx cenv mref) + | None -> () + + and newGuid (modul: ILModuleDef) = + let n = timestamp + let m = hash n + let m2 = hash modul.Name + [| b0 m; b1 m; b2 m; b3 m; b0 m2; b1 m2; b2 m2; b3 m2; 0xa7uy; 0x45uy; 0x03uy; 0x83uy; b0 n; b1 n; b2 n; b3 n |] + + and deterministicGuid (modul: ILModuleDef) = + let n = 16909060 + let m = hash n + let m2 = hash modul.Name + [| b0 m; b1 m; b2 m; b3 m; b0 m2; b1 m2; b2 m2; b3 m2; 0xa7uy; 0x45uy; 0x03uy; 0x83uy; b0 n; b1 n; b2 n; b3 n |] + + and GetModuleAsRow (cenv:cenv) (modul: ILModuleDef) = + // Store the generated MVID in the environment (needed for generating debug information) + let modulGuid = if cenv.deterministic then deterministicGuid modul else newGuid modul + cenv.moduleGuid <- modulGuid + UnsharedRow + [| UShort (uint16 0x0) + StringE (GetStringHeapIdx cenv modul.Name) + Guid (GetGuidIdx cenv modulGuid) + Guid 0 + Guid 0 |] + + + let rowElemCompare (e1: RowElement) (e2: RowElement) = + let c = compare e1.Val e2.Val + if c <> 0 then c else + compare e1.Tag e2.Tag + + module List = + let rec assoc x l = + match l with + | [] -> failwith "index not found" + | ((h,r)::t) -> if x = h then r else assoc x t + + let rec memAssoc x l = + match l with + | [] -> false + | ((h,_)::t) -> x = h || memAssoc x t + + let TableRequiresSorting tab = + List.memAssoc tab ILTableNames.sortedTableInfo + + let SortTableRows tab (rows:GenericRow[]) = + assert (TableRequiresSorting tab) + let col = List.assoc tab ILTableNames.sortedTableInfo + rows + // This needs to be a stable sort, so we use List.sortWith + |> Array.toList + |> List.sortWith (fun r1 r2 -> rowElemCompare r1.[col] r2.[col]) + |> Array.ofList + //|> Array.map SharedRow + + + let mkILSimpleClass (ilg: ILGlobals) (nsp, nm, methods, fields, nestedTypes, props, events, attrs) = + { Namespace=nsp + Name=nm + GenericParams= [| |] + Implements = [| |] + Attributes = TypeAttributes.Class ||| TypeAttributes.BeforeFieldInit ||| TypeAttributes.Public + Layout=ILTypeDefLayout.Auto + Extends = Some ilg.typ_Object + Methods= methods + Fields= fields + NestedTypes=nestedTypes + CustomAttrs=attrs + MethodImpls=emptyILMethodImpls + Properties=props + Events=events + Token=0 + //SecurityDecls=emptyILSecurityDecls; + //HasSecurity=false; + } + let mkILTypeDefForGlobalFunctions ilg (methods,fields) = + mkILSimpleClass ilg (UNone, typeNameForGlobalFunctions, methods, fields, emptyILTypeDefs, emptyILProperties, emptyILEvents, emptyILCustomAttrs) + + let destTypeDefsWithGlobalFunctionsFirst ilg (tdefs: ILTypeDefs) = + let l = tdefs.Entries + let top,nontop = l |> Array.partition (fun td -> td.Name = typeNameForGlobalFunctions) + let top2 = if isEmpty top then [| mkILTypeDefForGlobalFunctions ilg (emptyILMethods, emptyILFields) |] else top + Array.append top2 nontop + + let GenModule (cenv: cenv) (modul: ILModuleDef) = + let midx = AddUnsharedRow cenv ILTableNames.Module (GetModuleAsRow cenv modul) + Array.iter (GenResourcePass3 cenv) modul.Resources.Entries + let tds = destTypeDefsWithGlobalFunctionsFirst cenv.ilg modul.TypeDefs + GenTypeDefsPass1 [] cenv tds + GenTypeDefsPass2 0 [] cenv tds + (match modul.Manifest with None -> () | Some m -> GenManifestPass3 cenv m) + GenTypeDefsPass3 [] cenv tds + GenCustomAttrsPass3Or4 cenv (HasCustomAttributeTag.Module, midx) modul.CustomAttrs + // GenericParam is the only sorted table indexed by Columns in other tables (GenericParamConstraint\CustomAttributes). + // Hence we need to sort it before we emit any entries in GenericParamConstraint\CustomAttributes that are attached to generic params. + // Note this mutates the rows in a table. 'SetRowsOfTable' clears + // the key --> index map since it is no longer valid + cenv.GetTable(ILTableNames.GenericParam).SetRowsOfSharedTable (SortTableRows ILTableNames.GenericParam (cenv.GetTable(ILTableNames.GenericParam).GenericRowsOfTable)) + GenTypeDefsPass4 [] cenv tds + + let generateIL requiredDataFixups (desiredMetadataVersion, generatePdb, ilg: ILGlobals, emitTailcalls, deterministic, showTimes) (m: ILModuleDef) cilStartAddress = + let isDll = m.IsDLL + + let cenv = + { emitTailcalls=emitTailcalls + deterministic = deterministic + showTimes=showTimes + ilg = ilg + desiredMetadataVersion=desiredMetadataVersion + requiredDataFixups= requiredDataFixups + requiredStringFixups = ResizeArray() + codeChunks=ByteBuffer.Create 40000 + nextCodeAddr = cilStartAddress + data = ByteBuffer.Create 200 + resources = ByteBuffer.Create 200 + tables= + Array.init 64 (fun i -> + if (i = ILTableNames.AssemblyRef.Index || + i = ILTableNames.MemberRef.Index || + i = ILTableNames.ModuleRef.Index || + i = ILTableNames.File.Index || + i = ILTableNames.TypeRef.Index || + i = ILTableNames.TypeSpec.Index || + i = ILTableNames.MethodSpec.Index || + i = ILTableNames.StandAloneSig.Index || + i = ILTableNames.GenericParam.Index) then + MetadataTable.Shared (MetadataTable.New ("row table "+string i, EqualityComparer.Default)) + else + MetadataTable.Unshared (MetadataTable.New ("row table "+string i, EqualityComparer.Default))) + + AssemblyRefs = MetadataTable<_>.New("ILAssemblyRef", EqualityComparer.Default) + //documents=MetadataTable<_>.New("pdbdocs", EqualityComparer.Default) + trefCache=new Dictionary<_, _>(100) +#if EMIT_DEBUG_INFO + pdbinfo= new ResizeArray<_>(200) +#endif + moduleGuid= Array.zeroCreate 16 + fieldDefs= MetadataTable<_>.New("field defs", EqualityComparer.Default) + methodDefIdxsByKey = MetadataTable<_>.New("method defs", EqualityComparer.Default) + // This uses reference identity on ILMethodDef objects + methodDefIdxs = new Dictionary<_, _>(100, HashIdentity.Reference) + propertyDefs = MetadataTable<_>.New("property defs", EqualityComparer.Default) + eventDefs = MetadataTable<_>.New("event defs", EqualityComparer.Default) + typeDefs = MetadataTable<_>.New("type defs", EqualityComparer.Default) + entrypoint=None + generatePdb=generatePdb + // These must use structural comparison since they are keyed by arrays + guids=MetadataTable<_>.New("guids", HashIdentity.Structural) + blobs= MetadataTable<_>.New("blobs", HashIdentity.Structural) + strings= MetadataTable<_>.New("strings", EqualityComparer.Default) + userStrings= MetadataTable<_>.New("user strings", EqualityComparer.Default) } + + // Now the main compilation step + GenModule cenv m + + // .exe files have a .entrypoint instruction. Do not write it to the entrypoint when writing dll. + let entryPointToken = + match cenv.entrypoint with + | Some (epHere, tok) -> + if isDll then 0x0 + else getUncodedToken (if epHere then ILTableNames.Method else ILTableNames.File) tok + | None -> + if not isDll then printfn "warning: no entrypoint specified in executable binary" + 0x0 + +#if EMIT_DEBUG_INFO + let pdbData = + { EntryPoint= (if isDll then None else Some entryPointToken) + Timestamp = timestamp + ModuleID = cenv.moduleGuid + Documents = cenv.documents.EntriesAsArray + Methods = cenv.pdbinfo.ToArray() + TableRowCounts = cenv.tables |> Seq.map(fun t -> t.Count) |> Seq.toArray } +#else + let pdbData = () +#endif + + let idxForNextedTypeDef (tds:ILTypeDef list, td:ILTypeDef) = + let enc = tds |> List.map (fun td -> td.Name) + GetIdxForTypeDef cenv (TdKey(enc, td.Namespace, td.Name)) + + let strings = Array.map Bytes.stringAsUtf8NullTerminated cenv.strings.EntriesAsArray + let userStrings = cenv.userStrings.EntriesAsArray |> Array.map Encoding.Unicode.GetBytes + let blobs = cenv.blobs.EntriesAsArray + let guids = cenv.guids.EntriesAsArray + let tables = cenv.tables + let code = cenv.GetCode() + // turn idx tbls into token maps + let mappings = + { TypeDefTokenMap = (fun t -> + getUncodedToken ILTableNames.TypeDef (idxForNextedTypeDef t)) + FieldDefTokenMap = (fun t fd -> + let tidx = idxForNextedTypeDef t + getUncodedToken ILTableNames.Field (GetFieldDefAsFieldDefIdx cenv tidx fd)) + MethodDefTokenMap = (fun t md -> + let tidx = idxForNextedTypeDef t + getUncodedToken ILTableNames.Method (FindMethodDefIdx cenv (GetKeyForMethodDef tidx md))) + PropertyTokenMap = (fun t pd -> + let tidx = idxForNextedTypeDef t + getUncodedToken ILTableNames.Property (cenv.propertyDefs.GetTableEntry (GetKeyForPropertyDef tidx pd))) + EventTokenMap = (fun t ed -> + let tidx = idxForNextedTypeDef t + getUncodedToken ILTableNames.Event (cenv.eventDefs.GetTableEntry (EventKey (tidx, ed.Name)))) } + // New return the results + let data = cenv.data.Close() + let resources = cenv.resources.Close() + (strings, userStrings, blobs, guids, tables, entryPointToken, code, cenv.requiredStringFixups, data, resources, pdbData, mappings) + + + //===================================================================== + // TABLES+BLOBS --> PHYSICAL METADATA+BLOBS + //===================================================================== + let chunk sz next = ({addr=next; size=sz}, next + sz) + let nochunk next = ({addr= 0x0;size= 0x0; } , next) + + let count f arr = + Array.fold (fun x y -> x + f y) 0x0 arr + + let writeILMetadataAndCode (generatePdb, desiredMetadataVersion, ilg, emitTailcalls, deterministic, showTimes) modul cilStartAddress = + + // When we know the real RVAs of the data section we fixup the references for the FieldRVA table. + // These references are stored as offsets into the metadata we return from this function + let requiredDataFixups = ResizeArray() + + let next = cilStartAddress + + let strings, userStrings, blobs, guids, tables, entryPointToken, code, requiredStringFixups, data, resources, pdbData, mappings = + generateIL requiredDataFixups (desiredMetadataVersion, generatePdb, ilg, emitTailcalls, deterministic, showTimes) modul cilStartAddress + + let tableSize (tab: ILTableName) = tables.[tab.Index].Count + + // Now place the code + let codeSize = code.Length + let alignedCodeSize = align 0x4 codeSize + let codep, next = chunk codeSize next + let codePadding = Array.create (alignedCodeSize - codeSize) 0x0uy + let _codePaddingChunk, next = chunk codePadding.Length next + + // Now layout the chunks of metadata and IL + let metadataHeaderStartChunk, _next = chunk 0x10 next + + let numStreams = 0x05 + + let (mdtableVersionMajor, mdtableVersionMinor) = metadataSchemaVersionSupportedByCLRVersion desiredMetadataVersion + + let version = + Encoding.UTF8.GetBytes (sprintf "v%d.%d.%d" desiredMetadataVersion.Major desiredMetadataVersion.Minor desiredMetadataVersion.Build) + + + let paddedVersionLength = align 0x4 (Array.length version) + + // Most addresses after this point are measured from the MD root + // Switch to md-rooted addresses + let next = metadataHeaderStartChunk.size + let _metadataHeaderVersionChunk, next = chunk paddedVersionLength next + let _metadataHeaderEndChunk, next = chunk 0x04 next + let _tablesStreamHeaderChunk, next = chunk (0x08 + (align 4 ("#~".Length + 0x01))) next + let _stringsStreamHeaderChunk, next = chunk (0x08 + (align 4 ("#Strings".Length + 0x01))) next + let _userStringsStreamHeaderChunk, next = chunk (0x08 + (align 4 ("#US".Length + 0x01))) next + let _guidsStreamHeaderChunk, next = chunk (0x08 + (align 4 ("#GUID".Length + 0x01))) next + let _blobsStreamHeaderChunk, next = chunk (0x08 + (align 4 ("#Blob".Length + 0x01))) next + + let tablesStreamStart = next + + let stringsStreamUnpaddedSize = count (fun (s:byte[]) -> s.Length) strings + 1 + let stringsStreamPaddedSize = align 4 stringsStreamUnpaddedSize + + let userStringsStreamUnpaddedSize = count (fun (s:byte[]) -> let n = s.Length + 1 in n + ByteBuffer.Z32Size n) userStrings + 1 + let userStringsStreamPaddedSize = align 4 userStringsStreamUnpaddedSize + + let guidsStreamUnpaddedSize = (Array.length guids) * 0x10 + let guidsStreamPaddedSize = align 4 guidsStreamUnpaddedSize + + let blobsStreamUnpaddedSize = count (fun (blob:byte[]) -> let n = blob.Length in n + ByteBuffer.Z32Size n) blobs + 1 + let blobsStreamPaddedSize = align 4 blobsStreamUnpaddedSize + + let guidsBig = guidsStreamPaddedSize >= 0x10000 + let stringsBig = stringsStreamPaddedSize >= 0x10000 + let blobsBig = blobsStreamPaddedSize >= 0x10000 + + // 64bit bitvector indicating which tables are in the metadata. + let (valid1, valid2), _ = + (((0, 0), 0), tables) ||> Array.fold (fun ((valid1, valid2) as valid, n) rows -> + let valid = + if rows.Count = 0 then valid else + ( (if n < 32 then valid1 ||| (1 <<< n ) else valid1), + (if n >= 32 then valid2 ||| (1 <<< (n-32)) else valid2) ) + (valid, n+1)) + + // 64bit bitvector indicating which tables are sorted. + // Constant - REVIEW: make symbolic! compute from sorted table info! + let sorted1 = 0x3301fa00 + let sorted2 = + // If there are any generic parameters in the binary we're emitting then mark that + // table as sorted, otherwise don't. This maximizes the number of assemblies we emit + // which have an ECMA-v.1. compliant set of sorted tables. + (if tableSize (ILTableNames.GenericParam) > 0 then 0x00000400 else 0x00000000) ||| + (if tableSize (ILTableNames.GenericParamConstraint) > 0 then 0x00001000 else 0x00000000) ||| + 0x00000200 + + + let guidAddress n = (if n = 0 then 0 else (n - 1) * 0x10 + 0x01) + + let stringAddressTable = + let tab = Array.create (strings.Length + 1) 0 + let pos = ref 1 + for i = 1 to strings.Length do + tab.[i] <- !pos + let s = strings.[i - 1] + pos := !pos + s.Length + tab + + let stringAddress n = + if n >= Array.length stringAddressTable then failwith ("string index "+string n+" out of range") + stringAddressTable.[n] + + let userStringAddressTable = + let tab = Array.create (Array.length userStrings + 1) 0 + let pos = ref 1 + for i = 1 to Array.length userStrings do + tab.[i] <- !pos + let s = userStrings.[i - 1] + let n = s.Length + 1 + pos := !pos + n + ByteBuffer.Z32Size n + tab + + let userStringAddress n = + if n >= Array.length userStringAddressTable then failwith "userString index out of range" + userStringAddressTable.[n] + + let blobAddressTable = + let tab = Array.create (blobs.Length + 1) 0 + let pos = ref 1 + for i = 1 to blobs.Length do + tab.[i] <- !pos + let blob = blobs.[i - 1] + pos := !pos + blob.Length + ByteBuffer.Z32Size blob.Length + tab + + let blobAddress n = + if n >= blobAddressTable.Length then failwith "blob index out of range" + blobAddressTable.[n] + + + let sortedTables = + Array.init 64 (fun i -> + let tab = tables.[i] + let tabName = ILTableName.FromIndex i + let rows = tab.GenericRowsOfTable + if TableRequiresSorting tabName then SortTableRows tabName rows else rows) + + + let codedTables = + + let bignessTable = Array.map (fun rows -> Array.length rows >= 0x10000) sortedTables + let bigness (tab:int32) = bignessTable.[tab] + + let codedBigness nbits tab = + (tableSize tab) >= (0x10000 >>> nbits) + + let tdorBigness = + codedBigness 2 ILTableNames.TypeDef || + codedBigness 2 ILTableNames.TypeRef || + codedBigness 2 ILTableNames.TypeSpec + + let tomdBigness = + codedBigness 1 ILTableNames.TypeDef || + codedBigness 1 ILTableNames.Method + + let hcBigness = + codedBigness 2 ILTableNames.Field || + codedBigness 2 ILTableNames.Param || + codedBigness 2 ILTableNames.Property + + let hcaBigness = + codedBigness 5 ILTableNames.Method || + codedBigness 5 ILTableNames.Field || + codedBigness 5 ILTableNames.TypeRef || + codedBigness 5 ILTableNames.TypeDef || + codedBigness 5 ILTableNames.Param || + codedBigness 5 ILTableNames.InterfaceImpl || + codedBigness 5 ILTableNames.MemberRef || + codedBigness 5 ILTableNames.Module || + codedBigness 5 ILTableNames.Permission || + codedBigness 5 ILTableNames.Property || + codedBigness 5 ILTableNames.Event || + codedBigness 5 ILTableNames.StandAloneSig || + codedBigness 5 ILTableNames.ModuleRef || + codedBigness 5 ILTableNames.TypeSpec || + codedBigness 5 ILTableNames.Assembly || + codedBigness 5 ILTableNames.AssemblyRef || + codedBigness 5 ILTableNames.File || + codedBigness 5 ILTableNames.ExportedType || + codedBigness 5 ILTableNames.ManifestResource || + codedBigness 5 ILTableNames.GenericParam || + codedBigness 5 ILTableNames.GenericParamConstraint || + codedBigness 5 ILTableNames.MethodSpec + + + let hfmBigness = + codedBigness 1 ILTableNames.Field || + codedBigness 1 ILTableNames.Param + + let hdsBigness = + codedBigness 2 ILTableNames.TypeDef || + codedBigness 2 ILTableNames.Method || + codedBigness 2 ILTableNames.Assembly + + let mrpBigness = + codedBigness 3 ILTableNames.TypeRef || + codedBigness 3 ILTableNames.ModuleRef || + codedBigness 3 ILTableNames.Method || + codedBigness 3 ILTableNames.TypeSpec + + let hsBigness = + codedBigness 1 ILTableNames.Event || + codedBigness 1 ILTableNames.Property + + let mdorBigness = + codedBigness 1 ILTableNames.Method || + codedBigness 1 ILTableNames.MemberRef + + let mfBigness = + codedBigness 1 ILTableNames.Field || + codedBigness 1 ILTableNames.Method + + let iBigness = + codedBigness 2 ILTableNames.File || + codedBigness 2 ILTableNames.AssemblyRef || + codedBigness 2 ILTableNames.ExportedType + + let catBigness = + codedBigness 3 ILTableNames.Method || + codedBigness 3 ILTableNames.MemberRef + + let rsBigness = + codedBigness 2 ILTableNames.Module || + codedBigness 2 ILTableNames.ModuleRef || + codedBigness 2 ILTableNames.AssemblyRef || + codedBigness 2 ILTableNames.TypeRef + + let tablesBuf = ByteBuffer.Create 20000 + + // Now the coded tables themselves - first the schemata header + tablesBuf.EmitIntsAsBytes + [| 0x00; 0x00; 0x00; 0x00; + mdtableVersionMajor // major version of table schemata + mdtableVersionMinor // minor version of table schemata + + ((if stringsBig then 0x01 else 0x00) ||| // bit vector for heap size + (if guidsBig then 0x02 else 0x00) ||| + (if blobsBig then 0x04 else 0x00)) + 0x01 (* reserved, always 1 *) |] + + tablesBuf.EmitInt32 valid1 + tablesBuf.EmitInt32 valid2 + tablesBuf.EmitInt32 sorted1 + tablesBuf.EmitInt32 sorted2 + + // Numbers of rows in various tables + for rows in sortedTables do + if rows.Length <> 0 then + tablesBuf.EmitInt32 rows.Length + + + + // The tables themselves + for rows in sortedTables do + for row in rows do + for x in row do + // Emit the coded token for the array element + let t = x.Tag + let n = x.Val + match t with + | _ when t = RowElementTags.UShort -> tablesBuf.EmitUInt16 (uint16 n) + | _ when t = RowElementTags.ULong -> tablesBuf.EmitInt32 n + | _ when t = RowElementTags.Data -> recordRequiredDataFixup requiredDataFixups tablesBuf (tablesStreamStart + tablesBuf.Position) (n, false) + | _ when t = RowElementTags.DataResources -> recordRequiredDataFixup requiredDataFixups tablesBuf (tablesStreamStart + tablesBuf.Position) (n, true) + | _ when t = RowElementTags.Guid -> tablesBuf.EmitZUntaggedIndex guidsBig (guidAddress n) + | _ when t = RowElementTags.Blob -> tablesBuf.EmitZUntaggedIndex blobsBig (blobAddress n) + | _ when t = RowElementTags.String -> tablesBuf.EmitZUntaggedIndex stringsBig (stringAddress n) + | _ when t <= RowElementTags.SimpleIndexMax -> tablesBuf.EmitZUntaggedIndex (bigness (t - RowElementTags.SimpleIndexMin)) n + | _ when t <= RowElementTags.TypeDefOrRefOrSpecMax -> tablesBuf.EmitZTaggedIndex (t - RowElementTags.TypeDefOrRefOrSpecMin) 2 tdorBigness n + | _ when t <= RowElementTags.TypeOrMethodDefMax -> tablesBuf.EmitZTaggedIndex (t - RowElementTags.TypeOrMethodDefMin) 1 tomdBigness n + | _ when t <= RowElementTags.HasConstantMax -> tablesBuf.EmitZTaggedIndex (t - RowElementTags.HasConstantMin) 2 hcBigness n + | _ when t <= RowElementTags.HasCustomAttributeMax -> tablesBuf.EmitZTaggedIndex (t - RowElementTags.HasCustomAttributeMin) 5 hcaBigness n + | _ when t <= RowElementTags.HasFieldMarshalMax -> tablesBuf.EmitZTaggedIndex (t - RowElementTags.HasFieldMarshalMin) 1 hfmBigness n + | _ when t <= RowElementTags.HasDeclSecurityMax -> tablesBuf.EmitZTaggedIndex (t - RowElementTags.HasDeclSecurityMin) 2 hdsBigness n + | _ when t <= RowElementTags.MemberRefParentMax -> tablesBuf.EmitZTaggedIndex (t - RowElementTags.MemberRefParentMin) 3 mrpBigness n + | _ when t <= RowElementTags.HasSemanticsMax -> tablesBuf.EmitZTaggedIndex (t - RowElementTags.HasSemanticsMin) 1 hsBigness n + | _ when t <= RowElementTags.MethodDefOrRefMax -> tablesBuf.EmitZTaggedIndex (t - RowElementTags.MethodDefOrRefMin) 1 mdorBigness n + | _ when t <= RowElementTags.MemberForwardedMax -> tablesBuf.EmitZTaggedIndex (t - RowElementTags.MemberForwardedMin) 1 mfBigness n + | _ when t <= RowElementTags.ImplementationMax -> tablesBuf.EmitZTaggedIndex (t - RowElementTags.ImplementationMin) 2 iBigness n + | _ when t <= RowElementTags.CustomAttributeTypeMax -> tablesBuf.EmitZTaggedIndex (t - RowElementTags.CustomAttributeTypeMin) 3 catBigness n + | _ when t <= RowElementTags.ResolutionScopeMax -> tablesBuf.EmitZTaggedIndex (t - RowElementTags.ResolutionScopeMin) 2 rsBigness n + | _ -> failwith "invalid tag in row element" + + tablesBuf.Close() + + + let tablesStreamUnpaddedSize = codedTables.Length + // QUERY: extra 4 empty bytes in array.exe - why? Include some extra padding after + // the tables just in case there is a mistake in the ECMA spec. + let tablesStreamPaddedSize = align 4 (tablesStreamUnpaddedSize + 4) + let tablesChunk, next = chunk tablesStreamPaddedSize next + let tablesStreamPadding = tablesChunk.size - tablesStreamUnpaddedSize + + let stringsChunk, next = chunk stringsStreamPaddedSize next + let stringsStreamPadding = stringsChunk.size - stringsStreamUnpaddedSize + let userStringsChunk, next = chunk userStringsStreamPaddedSize next + let userStringsStreamPadding = userStringsChunk.size - userStringsStreamUnpaddedSize + let guidsChunk, next = chunk (0x10 * guids.Length) next + let blobsChunk, _next = chunk blobsStreamPaddedSize next + let blobsStreamPadding = blobsChunk.size - blobsStreamUnpaddedSize + + + let metadata, guidStart = + let mdbuf = ByteBuffer.Create 500000 + mdbuf.EmitIntsAsBytes + [| 0x42; 0x53; 0x4a; 0x42; // Magic signature + 0x01; 0x00; // Major version + 0x01; 0x00; // Minor version + |]; + mdbuf.EmitInt32 0x0; // Reserved + + mdbuf.EmitInt32 paddedVersionLength; + mdbuf.EmitBytes version; + for i = 1 to (paddedVersionLength - Array.length version) do + mdbuf.EmitIntAsByte 0x00; + + mdbuf.EmitBytes + [| 0x00uy; 0x00uy; // flags, reserved + b0 numStreams; b1 numStreams; |]; + mdbuf.EmitInt32 tablesChunk.addr; + mdbuf.EmitInt32 tablesChunk.size; + mdbuf.EmitIntsAsBytes [| 0x23; 0x7e; 0x00; 0x00; (* #~00 *)|]; + mdbuf.EmitInt32 stringsChunk.addr; + mdbuf.EmitInt32 stringsChunk.size; + mdbuf.EmitIntsAsBytes [| 0x23; 0x53; 0x74; 0x72; 0x69; 0x6e; 0x67; 0x73; 0x00; 0x00; 0x00; 0x00 (* "#Strings0000" *)|]; + mdbuf.EmitInt32 userStringsChunk.addr; + mdbuf.EmitInt32 userStringsChunk.size; + mdbuf.EmitIntsAsBytes [| 0x23; 0x55; 0x53; 0x00; (* #US0*) |]; + mdbuf.EmitInt32 guidsChunk.addr; + mdbuf.EmitInt32 guidsChunk.size; + mdbuf.EmitIntsAsBytes [| 0x23; 0x47; 0x55; 0x49; 0x44; 0x00; 0x00; 0x00; (* #GUID000 *)|]; + mdbuf.EmitInt32 blobsChunk.addr; + mdbuf.EmitInt32 blobsChunk.size; + mdbuf.EmitIntsAsBytes [| 0x23; 0x42; 0x6c; 0x6f; 0x62; 0x00; 0x00; 0x00; (* #Blob000 *)|]; + + // Now the coded tables themselves + mdbuf.EmitBytes codedTables; + for i = 1 to tablesStreamPadding do + mdbuf.EmitIntAsByte 0x00; + + // The string stream + mdbuf.EmitByte 0x00uy; + for s in strings do + mdbuf.EmitBytes s; + for i = 1 to stringsStreamPadding do + mdbuf.EmitIntAsByte 0x00; + // The user string stream + mdbuf.EmitByte 0x00uy; + for s in userStrings do + mdbuf.EmitZ32 (s.Length + 1); + mdbuf.EmitBytes s; + mdbuf.EmitIntAsByte (markerForUnicodeBytes s) + for i = 1 to userStringsStreamPadding do + mdbuf.EmitIntAsByte 0x00; + + // The GUID stream + let guidStart = mdbuf.Position + Array.iter mdbuf.EmitBytes guids; + + // The blob stream + mdbuf.EmitByte 0x00uy; + for s in blobs do + mdbuf.EmitZ32 s.Length; + mdbuf.EmitBytes s + for i = 1 to blobsStreamPadding do + mdbuf.EmitIntAsByte 0x00; + // Done - close the buffer and return the result. + mdbuf.Close(), guidStart + + + // Now we know the user string tables etc. we can fixup the + // uses of strings in the code + for (codeStartAddr, l) in requiredStringFixups do + for (codeOffset, userStringIndex) in l do + if codeStartAddr < codep.addr || codeStartAddr >= codep.addr + codep.size then failwith "strings-in-code fixup: a group of fixups is located outside the code array"; + let locInCode = ((codeStartAddr + codeOffset) - codep.addr) + checkFixup32 code locInCode 0xdeadbeef; + let token = getUncodedToken ILTableNames.UserStrings (userStringAddress userStringIndex) + if (Bytes.get code (locInCode-1) <> i_ldstr) then failwith "strings-in-code fixup: not at ldstr instruction!"; + applyFixup32 code locInCode token + + entryPointToken, code, codePadding, metadata, data, resources, requiredDataFixups.ToArray(), pdbData, mappings, guidStart + + //--------------------------------------------------------------------- + // PHYSICAL METADATA+BLOBS --> PHYSICAL PE FORMAT + //--------------------------------------------------------------------- + + // THIS LAYS OUT A 2-SECTION .NET PE BINARY + // SECTIONS + // TEXT: physical 0x0200 --> RVA 0x00020000 + // e.g. raw size 0x9600, + // e.g. virt size 0x9584 + // RELOC: physical 0x9800 --> RVA 0x0000c000 + // i.e. physbase --> rvabase + // where physbase = textbase + text raw size + // phsrva = roundup(0x2000, 0x0002000 + text virt size) + + let msdosHeader: byte[] = + [| 0x4duy; 0x5auy; 0x90uy; 0x00uy; 0x03uy; 0x00uy; 0x00uy; 0x00uy + 0x04uy; 0x00uy; 0x00uy; 0x00uy; 0xFFuy; 0xFFuy; 0x00uy; 0x00uy + 0xb8uy; 0x00uy; 0x00uy; 0x00uy; 0x00uy; 0x00uy; 0x00uy; 0x00uy + 0x40uy; 0x00uy; 0x00uy; 0x00uy; 0x00uy; 0x00uy; 0x00uy; 0x00uy + 0x00uy; 0x00uy; 0x00uy; 0x00uy; 0x00uy; 0x00uy; 0x00uy; 0x00uy + 0x00uy; 0x00uy; 0x00uy; 0x00uy; 0x00uy; 0x00uy; 0x00uy; 0x00uy + 0x00uy; 0x00uy; 0x00uy; 0x00uy; 0x00uy; 0x00uy; 0x00uy; 0x00uy + 0x00uy; 0x00uy; 0x00uy; 0x00uy; 0x80uy; 0x00uy; 0x00uy; 0x00uy + 0x0euy; 0x1fuy; 0xbauy; 0x0euy; 0x00uy; 0xb4uy; 0x09uy; 0xcduy + 0x21uy; 0xb8uy; 0x01uy; 0x4cuy; 0xcduy; 0x21uy; 0x54uy; 0x68uy + 0x69uy; 0x73uy; 0x20uy; 0x70uy; 0x72uy; 0x6fuy; 0x67uy; 0x72uy + 0x61uy; 0x6duy; 0x20uy; 0x63uy; 0x61uy; 0x6euy; 0x6euy; 0x6fuy + 0x74uy; 0x20uy; 0x62uy; 0x65uy; 0x20uy; 0x72uy; 0x75uy; 0x6euy + 0x20uy; 0x69uy; 0x6euy; 0x20uy; 0x44uy; 0x4fuy; 0x53uy; 0x20uy + 0x6duy; 0x6fuy; 0x64uy; 0x65uy; 0x2euy; 0x0duy; 0x0duy; 0x0auy + 0x24uy; 0x00uy; 0x00uy; 0x00uy; 0x00uy; 0x00uy; 0x00uy; 0x00uy |] + + let writeInt64 (os: BinaryWriter) x = + os.Write (dw0 x); + os.Write (dw1 x); + os.Write (dw2 x); + os.Write (dw3 x); + os.Write (dw4 x); + os.Write (dw5 x); + os.Write (dw6 x); + os.Write (dw7 x) + + let writeInt32 (os: BinaryWriter) x = + os.Write (b0 x) + os.Write (b1 x) + os.Write (b2 x) + os.Write (b3 x) + + let writeInt32AsUInt16 (os: BinaryWriter) x = + os.Write (b0 x) + os.Write (b1 x) + + let writeDirectory os dict = + writeInt32 os (if dict.size = 0x0 then 0x0 else dict.addr); + writeInt32 os dict.size + + let writeBytes (os: BinaryWriter) (chunk:byte[]) = os.Write(chunk, 0, chunk.Length) + + let writeBinaryAndReportMappings (outfile, + ilg: ILGlobals, pdbfile: string option, (* signer: ILStrongNameSigner option, *) portablePDB, embeddedPDB, + embedAllSource, embedSourceList, sourceLink, emitTailcalls, deterministic, showTimes, dumpDebugInfo ) modul = + let isDll = modul.IsDLL + + let os = + try + // Ensure the output directory exists otherwise it will fail + let dir = Path.GetDirectoryName(outfile) + if not (Directory.Exists(dir)) then Directory.CreateDirectory(dir) |>ignore + new BinaryWriter(System.IO.File.OpenWrite(outfile)) + with e -> + failwith ("Could not open file for writing (binary mode): " + outfile + "\n" + e.ToString()) + + let pdbData, pdbOpt, debugDirectoryChunk, debugDataChunk, debugEmbeddedPdbChunk, textV2P, mappings = + try + + let imageBaseReal = modul.ImageBase // FIXED CHOICE + let alignVirt = modul.VirtualAlignment // FIXED CHOICE + let alignPhys = modul.PhysicalAlignment // FIXED CHOICE + + let isItanium = modul.Platform = Some(IA64) + + let numSections = 3 // .text, .sdata, .reloc + + + // HEADERS + let next = 0x0 + let headerSectionPhysLoc = 0x0 + let headerAddr = next + let next = headerAddr + + let msdosHeaderSize = 0x80 + let msdosHeaderChunk, next = chunk msdosHeaderSize next + + let peSignatureSize = 0x04 + let peSignatureChunk, next = chunk peSignatureSize next + + let peFileHeaderSize = 0x14 + let peFileHeaderChunk, next = chunk peFileHeaderSize next + + let peOptionalHeaderSize = if modul.Is64Bit then 0xf0 else 0xe0 + let peOptionalHeaderChunk, next = chunk peOptionalHeaderSize next + + let textSectionHeaderSize = 0x28 + let textSectionHeaderChunk, next = chunk textSectionHeaderSize next + + let dataSectionHeaderSize = 0x28 + let dataSectionHeaderChunk, next = chunk dataSectionHeaderSize next + + let relocSectionHeaderSize = 0x28 + let relocSectionHeaderChunk, next = chunk relocSectionHeaderSize next + + let headerSize = next - headerAddr + let nextPhys = align alignPhys (headerSectionPhysLoc + headerSize) + let headerSectionPhysSize = nextPhys - headerSectionPhysLoc + let next = align alignVirt (headerAddr + headerSize) + + // TEXT SECTION: 8 bytes IAT table 72 bytes CLI header + + let textSectionPhysLoc = nextPhys + let textSectionAddr = next + let next = textSectionAddr + + let importAddrTableChunk, next = chunk 0x08 next + let cliHeaderPadding = (if isItanium then (align 16 next) else next) - next + let next = next + cliHeaderPadding + let cliHeaderChunk, next = chunk 0x48 next + + let desiredMetadataVersion = + if modul.MetadataVersion <> "" then + Version.Parse modul.MetadataVersion + else + match ilg.systemRuntimeScopeRef with + | ILScopeRef.Local -> failwith "Expected mscorlib to be ILScopeRef.Assembly was ILScopeRef.Local" + | ILScopeRef.Module(_) -> failwith "Expected mscorlib to be ILScopeRef.Assembly was ILScopeRef.Module" + | ILScopeRef.Assembly(aref) -> + match aref.Version with + | USome v -> v + | UNone -> failwith "Expected msorlib to have a version number" + + let entryPointToken, code, codePadding, metadata, data, resources, requiredDataFixups, pdbData, mappings, guidStart = + writeILMetadataAndCode ((pdbfile <> None), desiredMetadataVersion, ilg, emitTailcalls, deterministic, showTimes) modul next + + let _codeChunk, next = chunk code.Length next + let _codePaddingChunk, next = chunk codePadding.Length next + + let metadataChunk, next = chunk metadata.Length next + +#if EMIT_STRONG_NAME + let strongnameChunk, next = + match signer with + | None -> nochunk next + | Some s -> chunk s.SignatureSize next +#else + let strongnameChunk, next = nochunk next +#endif + + let resourcesChunk, next = chunk resources.Length next + + let rawdataChunk, next = chunk data.Length next + + let vtfixupsChunk, next = nochunk next // Note: only needed for mixed mode assemblies + let importTableChunkPrePadding = (if isItanium then (align 16 next) else next) - next + let next = next + importTableChunkPrePadding + let importTableChunk, next = chunk 0x28 next + let importLookupTableChunk, next = chunk 0x14 next + let importNameHintTableChunk, next = chunk 0x0e next + let mscoreeStringChunk, next = chunk 0x0c next + + let next = align 0x10 (next + 0x05) - 0x05 + let importTableChunk = { addr=importTableChunk.addr; size = next - importTableChunk.addr} + let importTableChunkPadding = importTableChunk.size - (0x28 + 0x14 + 0x0e + 0x0c) + + let next = next + 0x03 + let entrypointCodeChunk, next = chunk 0x06 next + let globalpointerCodeChunk, next = chunk (if isItanium then 0x8 else 0x0) next + +#if EMIT_DEBUG_INFO + let pdbOpt = + match portablePDB with + | true -> + let (uncompressedLength, contentId, stream) as pdbStream = generatePortablePdb embedAllSource embedSourceList sourceLink showTimes pdbData deterministic + if embeddedPDB then Some (compressPortablePdbStream uncompressedLength contentId stream) + else Some (pdbStream) + | _ -> None + + let debugDirectoryChunk, next = + chunk (if pdbfile = None then + 0x0 + else if embeddedPDB && portablePDB then + sizeof_IMAGE_DEBUG_DIRECTORY * 2 + else + sizeof_IMAGE_DEBUG_DIRECTORY + ) next + + // The debug data is given to us by the PDB writer and appears to + // typically be the type of the data plus the PDB file name. We fill + // this in after we've written the binary. We approximate the size according + // to what PDB writers seem to require and leave extra space just in case... + let debugDataJustInCase = 40 + let debugDataChunk, next = + chunk (align 0x4 (match pdbfile with + | None -> 0 + | Some f -> (24 + + Encoding.Unicode.GetByteCount(f) // See bug 748444 + + debugDataJustInCase))) next + + let debugEmbeddedPdbChunk, next = + let streamLength = + match pdbOpt with + | Some (_, _, stream) -> int(stream.Length) + | None -> 0 + chunk (align 0x4 (match embeddedPDB with + | true -> 8 + streamLength + | _ -> 0 )) next + +#else + let pdbOpt = None + let debugDirectoryChunk, next = chunk 0x0 next + let debugDataChunk, next = chunk (align 0x4 0) next + let debugEmbeddedPdbChunk, next = chunk (align 0x4 0) next +#endif + + let textSectionSize = next - textSectionAddr + let nextPhys = align alignPhys (textSectionPhysLoc + textSectionSize) + let textSectionPhysSize = nextPhys - textSectionPhysLoc + let next = align alignVirt (textSectionAddr + textSectionSize) + + // .RSRC SECTION (DATA) + let dataSectionPhysLoc = nextPhys + let dataSectionAddr = next + let dataSectionVirtToPhys v = v - dataSectionAddr + dataSectionPhysLoc + + +#if EMIT_NATIVE_RESOURCES + let resourceFormat = if modul.Is64Bit then Support.X64 else Support.X86 + let nativeResources = + match modul.NativeResources with + | [] -> [||] + | resources -> + if runningOnMono then + [||] + else + let unlinkedResources = List.map Lazy.force resources + begin + try linkNativeResources unlinkedResources next resourceFormat (Path.GetDirectoryName(outfile)) + with e -> failwith ("Linking a native resource failed: "+e.Message+"") + end + let nativeResourcesSize = nativeResources.Length + let nativeResourcesChunk, next = chunk nativeResourcesSize next +#else + let nativeResourcesChunk, next = chunk 0x0 next +#endif + + + let dummydatap, next = chunk (if next = dataSectionAddr then 0x01 else 0x0) next + + let dataSectionSize = next - dataSectionAddr + let nextPhys = align alignPhys (dataSectionPhysLoc + dataSectionSize) + let dataSectionPhysSize = nextPhys - dataSectionPhysLoc + let next = align alignVirt (dataSectionAddr + dataSectionSize) + + // .RELOC SECTION base reloc table: 0x0c size + let relocSectionPhysLoc = nextPhys + let relocSectionAddr = next + let baseRelocTableChunk, next = chunk 0x0c next + + let relocSectionSize = next - relocSectionAddr + let nextPhys = align alignPhys (relocSectionPhysLoc + relocSectionSize) + let relocSectionPhysSize = nextPhys - relocSectionPhysLoc + let next = align alignVirt (relocSectionAddr + relocSectionSize) + + // Now we know where the data section lies we can fix up the + // references into the data section from the metadata tables. + begin + requiredDataFixups |> Array.iter + (fun (metadataOffset32, (dataOffset, kind)) -> + let metadataOffset = metadataOffset32 + if metadataOffset < 0 || metadataOffset >= metadata.Length - 4 then failwith "data RVA fixup: fixup located outside metadata"; + checkFixup32 metadata metadataOffset 0xdeaddddd; + let dataRva = + if kind then + let res = dataOffset + if res >= resourcesChunk.size then printfn ("resource offset bigger than resource data section"); + res + else + let res = rawdataChunk.addr + dataOffset + if res < rawdataChunk.addr then printfn ("data rva before data section"); + if res >= rawdataChunk.addr + rawdataChunk.size then printfn "%s" ("data rva after end of data section, dataRva = "+string res+", rawdataChunk.addr = "+string rawdataChunk.addr+", rawdataChunk.size = "+string rawdataChunk.size); + res + applyFixup32 metadata metadataOffset dataRva); + end; + + // IMAGE TOTAL SIZE + let imageEndSectionPhysLoc = nextPhys + let imageEndAddr = next + + + let write p (os: BinaryWriter) chunkName chunk = + match p with + | None -> () + | Some pExpected -> + os.Flush(); + let pCurrent = int32 os.BaseStream.Position + if pCurrent <> pExpected then + failwith ("warning: "+chunkName+" not where expected, pCurrent = "+string pCurrent+", p.addr = "+string pExpected) + writeBytes os chunk + + let writePadding (os: BinaryWriter) _comment sz = + if sz < 0 then failwith "writePadding: size < 0"; + for i = 0 to sz - 1 do + os.Write 0uy + + // Now we've computed all the offsets, write the image + + write (Some msdosHeaderChunk.addr) os "msdos header" msdosHeader; + + write (Some peSignatureChunk.addr) os "pe signature" [| |]; + + writeInt32 os 0x4550; + + write (Some peFileHeaderChunk.addr) os "pe file header" [| |]; + + if (modul.Platform = Some(AMD64)) then + writeInt32AsUInt16 os 0x8664 // Machine - IMAGE_FILE_MACHINE_AMD64 + elif isItanium then + writeInt32AsUInt16 os 0x200 + else + writeInt32AsUInt16 os 0x014c; // Machine - IMAGE_FILE_MACHINE_I386 + + writeInt32AsUInt16 os numSections; + +#if EMIT_DEBUG_INFO + let pdbData = + if deterministic then + // Hash code, data and metadata + use sha = System.Security.Cryptography.SHA1.Create() // IncrementalHash is core only + let hCode = sha.ComputeHash code + let hData = sha.ComputeHash data + let hMeta = sha.ComputeHash metadata + let final = [| hCode; hData; hMeta |] |> Array.collect id |> sha.ComputeHash + + // Confirm we have found the correct data and aren't corrupting the metadata + if metadata.[ guidStart..guidStart+3] <> [| 4uy; 3uy; 2uy; 1uy |] then failwith "Failed to find MVID" + if metadata.[ guidStart+12..guidStart+15] <> [| 4uy; 3uy; 2uy; 1uy |] then failwith "Failed to find MVID" + + // Update MVID guid in metadata + Array.blit final 0 metadata guidStart 16 + + // Use last 4 bytes for timestamp - High bit set, to stop tool chains becoming confused + let timestamp = int final.[16] ||| (int final.[17] <<< 8) ||| (int final.[18] <<< 16) ||| (int (final.[19] ||| 128uy) <<< 24) + writeInt32 os timestamp + // Update pdbData with new guid and timestamp. Portable and embedded PDBs don't need the ModuleID + // Full and PdbOnly aren't supported under deterministic builds currently, they rely on non-determinsitic Windows native code + { pdbData with ModuleID = final.[0..15] ; Timestamp = timestamp } + else + writeInt32 os timestamp // date since 1970 + pdbData +#else + writeInt32 os timestamp // date since 1970 +#endif + + writeInt32 os 0x00; // Pointer to Symbol Table Always 0 + // 00000090 + writeInt32 os 0x00; // Number of Symbols Always 0 + writeInt32AsUInt16 os peOptionalHeaderSize; // Size of the optional header, the format is described below. + + // 64bit: IMAGE_FILE_32BIT_MACHINE ||| IMAGE_FILE_LARGE_ADDRESS_AWARE + // 32bit: IMAGE_FILE_32BIT_MACHINE + // Yes, 32BIT_MACHINE is set for AMD64... + let iMachineCharacteristic = match modul.Platform with | Some IA64 -> 0x20 | Some AMD64 -> 0x0120 | _ -> 0x0100 + + writeInt32AsUInt16 os ((if isDll then 0x2000 else 0x0000) ||| 0x0002 ||| 0x0004 ||| 0x0008 ||| iMachineCharacteristic); + + // Now comes optional header + + let peOptionalHeaderByte = peOptionalHeaderByteByCLRVersion desiredMetadataVersion + + write (Some peOptionalHeaderChunk.addr) os "pe optional header" [| |]; + if modul.Is64Bit then + writeInt32AsUInt16 os 0x020B // Magic number is 0x020B for 64-bit + else + writeInt32AsUInt16 os 0x010b; // Always 0x10B (see Section 23.1). + writeInt32AsUInt16 os peOptionalHeaderByte; // ECMA spec says 6, some binaries, e.g. fscmanaged.exe say 7, Whidbey binaries say 8 + writeInt32 os textSectionPhysSize; // Size of the code (text) section, or the sum of all code sections if there are multiple sections. + // 000000a0 + writeInt32 os dataSectionPhysSize; // Size of the initialized data section, or the sum of all such sections if there are multiple data sections. + writeInt32 os 0x00; // Size of the uninitialized data section, or the sum of all such sections if there are multiple uninitialized data sections. + writeInt32 os entrypointCodeChunk.addr; // RVA of entry point , needs to point to bytes 0xFF 0x25 followed by the RVA+!0x4000000 in a section marked execute/read for EXEs or 0 for DLLs e.g. 0x0000b57e + writeInt32 os textSectionAddr; // e.g. 0x0002000 + // 000000b0 + if modul.Is64Bit then + writeInt64 os ((int64)imageBaseReal) // REVIEW: For 64-bit, we should use a 64-bit image base + else + writeInt32 os dataSectionAddr; // e.g. 0x0000c000 + writeInt32 os imageBaseReal; // Image Base Always 0x400000 (see Section 23.1). - QUERY: no it's not always 0x400000, e.g. 0x034f0000 + + writeInt32 os alignVirt; // Section Alignment Always 0x2000 (see Section 23.1). + writeInt32 os alignPhys; // File Alignment Either 0x200 or 0x1000. + // 000000c0 + writeInt32AsUInt16 os 0x04; // OS Major Always 4 (see Section 23.1). + writeInt32AsUInt16 os 0x00; // OS Minor Always 0 (see Section 23.1). + writeInt32AsUInt16 os 0x00; // User Major Always 0 (see Section 23.1). + writeInt32AsUInt16 os 0x00; // User Minor Always 0 (see Section 23.1). + do + let (major, minor) = modul.SubsystemVersion + writeInt32AsUInt16 os major; + writeInt32AsUInt16 os minor; + writeInt32 os 0x00; // Reserved Always 0 (see Section 23.1). + // 000000d0 + writeInt32 os imageEndAddr; // Image Size: Size, in bytes, of image, including all headers and padding; shall be a multiple of Section Alignment. e.g. 0x0000e000 + writeInt32 os headerSectionPhysSize; // Header Size Combined size of MS-DOS Header, PE Header, PE Optional Header and padding; shall be a multiple of the file alignment. + writeInt32 os 0x00; // File Checksum Always 0 (see Section 23.1). QUERY: NOT ALWAYS ZERO + writeInt32AsUInt16 os modul.SubSystemFlags; // SubSystem Subsystem required to run this image. Shall be either IMAGE_SUBSYSTEM_WINDOWS_CE_GUI (0x3) or IMAGE_SUBSYSTEM_WINDOWS_GUI (0x2). QUERY: Why is this 3 on the images ILASM produces + // DLL Flags Always 0x400 (no unmanaged windows exception handling - see Section 23.1). + // Itanium: see notes at end of file + // IMAGE_DLLCHARACTERISTICS_NX_COMPAT: See FSharp 1.0 bug 5019 and http://blogs.msdn.com/ed_maurer/archive/2007/12/14/nxcompat-and-the-c-compiler.aspx + // Itanium: IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE | IMAGE_DLLCHARACTERISTICS_ NO_SEH | IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE | IMAGE_DLLCHARACTERISTICS_NX_COMPAT + // x86: IMAGE_DLLCHARACTERISTICS_ NO_SEH | IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE | IMAGE_DLLCHARACTERISTICS_NX_COMPAT + // x64: IMAGE_DLLCHARACTERISTICS_ NO_SEH | IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE | IMAGE_DLLCHARACTERISTICS_NX_COMPAT + let dllCharacteristics = + let flags = + if modul.Is64Bit then (if isItanium then 0x8540 else 0x540) + else 0x540 + if modul.UseHighEntropyVA then flags ||| 0x20 // IMAGE_DLLCHARACTERISTICS_HIGH_ENTROPY_VA + else flags + writeInt32AsUInt16 os dllCharacteristics + // 000000e0 + // Note that the defaults differ between x86 and x64 + if modul.Is64Bit then + let size = defaultArg modul.StackReserveSize 0x400000 |> int64 + writeInt64 os size // Stack Reserve Size Always 0x400000 (4Mb) (see Section 23.1). + writeInt64 os 0x4000L // Stack Commit Size Always 0x4000 (16Kb) (see Section 23.1). + writeInt64 os 0x100000L // Heap Reserve Size Always 0x100000 (1Mb) (see Section 23.1). + writeInt64 os 0x2000L // Heap Commit Size Always 0x800 (8Kb) (see Section 23.1). + else + let size = defaultArg modul.StackReserveSize 0x100000 + writeInt32 os size // Stack Reserve Size Always 0x100000 (1Mb) (see Section 23.1). + writeInt32 os 0x1000 // Stack Commit Size Always 0x1000 (4Kb) (see Section 23.1). + writeInt32 os 0x100000 // Heap Reserve Size Always 0x100000 (1Mb) (see Section 23.1). + writeInt32 os 0x1000 // Heap Commit Size Always 0x1000 (4Kb) (see Section 23.1). + // 000000f0 - x86 location, moving on, for x64, add 0x10 + writeInt32 os 0x00 // Loader Flags Always 0 (see Section 23.1) + writeInt32 os 0x10 // Number of Data Directories: Always 0x10 (see Section 23.1). + writeInt32 os 0x00 + writeInt32 os 0x00 // Export Table Always 0 (see Section 23.1). + // 00000100 + writeDirectory os importTableChunk // Import Table RVA of Import Table, (see clause 24.3.1). e.g. 0000b530 + // Native Resource Table: ECMA says Always 0 (see Section 23.1), but mscorlib and other files with resources bound into executable do not. For the moment assume the resources table is always the first resource in the file. + writeDirectory os nativeResourcesChunk + + // 00000110 + writeInt32 os 0x00 // Exception Table Always 0 (see Section 23.1). + writeInt32 os 0x00 // Exception Table Always 0 (see Section 23.1). + writeInt32 os 0x00 // Certificate Table Always 0 (see Section 23.1). + writeInt32 os 0x00 // Certificate Table Always 0 (see Section 23.1). + // 00000120 + writeDirectory os baseRelocTableChunk + writeDirectory os debugDirectoryChunk // Debug Directory + // 00000130 + writeInt32 os 0x00 // Copyright Always 0 (see Section 23.1). + writeInt32 os 0x00 // Copyright Always 0 (see Section 23.1). + writeInt32 os 0x00 // Global Ptr Always 0 (see Section 23.1). + writeInt32 os 0x00 // Global Ptr Always 0 (see Section 23.1). + // 00000140 + writeInt32 os 0x00 // Load Config Table Always 0 (see Section 23.1). + writeInt32 os 0x00 // Load Config Table Always 0 (see Section 23.1). + writeInt32 os 0x00 // TLS Table Always 0 (see Section 23.1). + writeInt32 os 0x00 // TLS Table Always 0 (see Section 23.1). + // 00000150 + writeInt32 os 0x00 // Bound Import Always 0 (see Section 23.1). + writeInt32 os 0x00 // Bound Import Always 0 (see Section 23.1). + writeDirectory os importAddrTableChunk // Import Addr Table, (see clause 24.3.1). e.g. 0x00002000 + // 00000160 + writeInt32 os 0x00 // Delay Import Descriptor Always 0 (see Section 23.1). + writeInt32 os 0x00 // Delay Import Descriptor Always 0 (see Section 23.1). + writeDirectory os cliHeaderChunk + // 00000170 + writeInt32 os 0x00 // Reserved Always 0 (see Section 23.1). + writeInt32 os 0x00 // Reserved Always 0 (see Section 23.1). + + write (Some textSectionHeaderChunk.addr) os "text section header" [| |] + + // 00000178 + writeBytes os [| 0x2euy; 0x74uy; 0x65uy; 0x78uy; 0x74uy; 0x00uy; 0x00uy; 0x00uy; |] // ".text\000\000\000" + // 00000180 + writeInt32 os textSectionSize // VirtualSize: Total size of the section when loaded into memory in bytes rounded to Section Alignment. If this value is greater than Size of Raw Data, the section is zero-padded. e.g. 0x00009584 + writeInt32 os textSectionAddr // VirtualAddress For executable images this is the address of the first byte of the section, when loaded into memory, relative to the image base. e.g. 0x00020000 + writeInt32 os textSectionPhysSize // SizeOfRawData Size of the initialized data on disk in bytes, shall be a multiple of FileAlignment from the PE header. If this is less than VirtualSize the remainder of the section is zero filled. Because this field is rounded while the VirtualSize field is not it is possible for this to be greater than VirtualSize as well. When a section contains only uninitialized data, this field should be 0. 0x00009600 + writeInt32 os textSectionPhysLoc // PointerToRawData RVA to section's first page within the PE file. This shall be a multiple of FileAlignment from the optional header. When a section contains only uninitialized data, this field should be 0. e.g. 00000200 + // 00000190 + writeInt32 os 0x00 // PointerToRelocations RVA of Relocation section. + writeInt32 os 0x00 // PointerToLineNumbers Always 0 (see Section 23.1). + // 00000198 + writeInt32AsUInt16 os 0x00// NumberOfRelocations Number of relocations, set to 0 if unused. + writeInt32AsUInt16 os 0x00 // NumberOfLinenumbers Always 0 (see Section 23.1). + writeBytes os [| 0x20uy; 0x00uy; 0x00uy; 0x60uy |] // Characteristics Flags describing section's characteristics, see below. IMAGE_SCN_CNT_CODE || IMAGE_SCN_MEM_EXECUTE || IMAGE_SCN_MEM_READ + + write (Some dataSectionHeaderChunk.addr) os "data section header" [| |] + + // 000001a0 + writeBytes os [| 0x2euy; 0x72uy; 0x73uy; 0x72uy; 0x63uy; 0x00uy; 0x00uy; 0x00uy; |] // ".rsrc\000\000\000" + // writeBytes os [| 0x2e; 0x73; 0x64; 0x61; 0x74; 0x61; 0x00; 0x00; |] // ".sdata\000\000" + writeInt32 os dataSectionSize // VirtualSize: Total size of the section when loaded into memory in bytes rounded to Section Alignment. If this value is greater than Size of Raw Data, the section is zero-padded. e.g. 0x0000000c + writeInt32 os dataSectionAddr // VirtualAddress For executable images this is the address of the first byte of the section, when loaded into memory, relative to the image base. e.g. 0x0000c000 + // 000001b0 + writeInt32 os dataSectionPhysSize // SizeOfRawData Size of the initialized data on disk in bytes, shall be a multiple of FileAlignment from the PE header. If this is less than VirtualSize the remainder of the section is zero filled. Because this field is rounded while the VirtualSize field is not it is possible for this to be greater than VirtualSize as well. When a section contains only uninitialized data, this field should be 0. e.g. 0x00000200 + writeInt32 os dataSectionPhysLoc // PointerToRawData QUERY: Why does ECMA say "RVA" here? Offset to section's first page within the PE file. This shall be a multiple of FileAlignment from the optional header. When a section contains only uninitialized data, this field should be 0. e.g. 0x00009800 + // 000001b8 + writeInt32 os 0x00 // PointerToRelocations RVA of Relocation section. + writeInt32 os 0x00 // PointerToLineNumbers Always 0 (see Section 23.1). + // 000001c0 + writeInt32AsUInt16 os 0x00 // NumberOfRelocations Number of relocations, set to 0 if unused. + writeInt32AsUInt16 os 0x00 // NumberOfLinenumbers Always 0 (see Section 23.1). + writeBytes os [| 0x40uy; 0x00uy; 0x00uy; 0x40uy |] // Characteristics Flags: IMAGE_SCN_MEM_READ | IMAGE_SCN_CNT_INITIALIZED_DATA + + write (Some relocSectionHeaderChunk.addr) os "reloc section header" [| |] + // 000001a0 + writeBytes os [| 0x2euy; 0x72uy; 0x65uy; 0x6cuy; 0x6fuy; 0x63uy; 0x00uy; 0x00uy; |] // ".reloc\000\000" + writeInt32 os relocSectionSize // VirtualSize: Total size of the section when loaded into memory in bytes rounded to Section Alignment. If this value is greater than Size of Raw Data, the section is zero-padded. e.g. 0x0000000c + writeInt32 os relocSectionAddr // VirtualAddress For executable images this is the address of the first byte of the section, when loaded into memory, relative to the image base. e.g. 0x0000c000 + // 000001b0 + writeInt32 os relocSectionPhysSize // SizeOfRawData Size of the initialized reloc on disk in bytes, shall be a multiple of FileAlignment from the PE header. If this is less than VirtualSize the remainder of the section is zero filled. Because this field is rounded while the VirtualSize field is not it is possible for this to be greater than VirtualSize as well. When a section contains only uninitialized reloc, this field should be 0. e.g. 0x00000200 + writeInt32 os relocSectionPhysLoc // PointerToRawData QUERY: Why does ECMA say "RVA" here? Offset to section's first page within the PE file. This shall be a multiple of FileAlignment from the optional header. When a section contains only uninitialized reloc, this field should be 0. e.g. 0x00009800 + // 000001b8 + writeInt32 os 0x00 // PointerToRelocations RVA of Relocation section. + writeInt32 os 0x00 // PointerToLineNumbers Always 0 (see Section 23.1). + // 000001c0 + writeInt32AsUInt16 os 0x00 // NumberOfRelocations Number of relocations, set to 0 if unused. + writeInt32AsUInt16 os 0x00 // NumberOfLinenumbers Always 0 (see Section 23.1). + writeBytes os [| 0x40uy; 0x00uy; 0x00uy; 0x42uy |] // Characteristics Flags: IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_MEM_READ | + + writePadding os "pad to text begin" (textSectionPhysLoc - headerSize) + + // TEXT SECTION: e.g. 0x200 + + let textV2P v = v - textSectionAddr + textSectionPhysLoc + + // e.g. 0x0200 + write (Some (textV2P importAddrTableChunk.addr)) os "import addr table" [| |] + writeInt32 os importNameHintTableChunk.addr + writeInt32 os 0x00 // QUERY 4 bytes of zeros not 2 like ECMA 24.3.1 says + + // e.g. 0x0208 + + let flags = + (if modul.IsILOnly then 0x01 else 0x00) ||| + (if modul.Is32Bit then 0x02 else 0x00) ||| + (if modul.Is32BitPreferred then 0x00020003 else 0x00) ||| +#if EMIT_STRONG_NAME + (if (match signer with None -> false | Some s -> s.IsFullySigned) then 0x08 else 0x00) ||| +#endif + 0x0000 + + let headerVersionMajor, headerVersionMinor = headerVersionSupportedByCLRVersion desiredMetadataVersion + + writePadding os "pad to cli header" cliHeaderPadding + write (Some (textV2P cliHeaderChunk.addr)) os "cli header" [| |] + writeInt32 os 0x48 // size of header + writeInt32AsUInt16 os headerVersionMajor // Major part of minimum version of CLR reqd. + writeInt32AsUInt16 os headerVersionMinor // Minor part of minimum version of CLR reqd. ... + // e.g. 0x0210 + writeDirectory os metadataChunk + writeInt32 os flags + + writeInt32 os entryPointToken + write None os "rest of cli header" [| |] + + // e.g. 0x0220 + writeDirectory os resourcesChunk + writeDirectory os strongnameChunk + // e.g. 0x0230 + writeInt32 os 0x00 // code manager table, always 0 + writeInt32 os 0x00 // code manager table, always 0 + writeDirectory os vtfixupsChunk + // e.g. 0x0240 + writeInt32 os 0x00 // export addr table jumps, always 0 + writeInt32 os 0x00 // export addr table jumps, always 0 + writeInt32 os 0x00 // managed native header, always 0 + writeInt32 os 0x00 // managed native header, always 0 + + writeBytes os code + write None os "code padding" codePadding + + writeBytes os metadata + +#if EMIT_STRONG_NAME + // write 0x80 bytes of empty space for encrypted SHA1 hash, written by SN.EXE or call to signing API + if signer <> None then + write (Some (textV2P strongnameChunk.addr)) os "strongname" (Array.create strongnameChunk.size 0x0uy) +#endif + + write (Some (textV2P resourcesChunk.addr)) os "raw resources" [| |] + writeBytes os resources + write (Some (textV2P rawdataChunk.addr)) os "raw data" [| |] + writeBytes os data + + writePadding os "start of import table" importTableChunkPrePadding + + // vtfixups would go here + write (Some (textV2P importTableChunk.addr)) os "import table" [| |] + + writeInt32 os importLookupTableChunk.addr + writeInt32 os 0x00 + writeInt32 os 0x00 + writeInt32 os mscoreeStringChunk.addr + writeInt32 os importAddrTableChunk.addr + writeInt32 os 0x00 + writeInt32 os 0x00 + writeInt32 os 0x00 + writeInt32 os 0x00 + writeInt32 os 0x00 + + write (Some (textV2P importLookupTableChunk.addr)) os "import lookup table" [| |] + writeInt32 os importNameHintTableChunk.addr + writeInt32 os 0x00 + writeInt32 os 0x00 + writeInt32 os 0x00 + writeInt32 os 0x00 + + + write (Some (textV2P importNameHintTableChunk.addr)) os "import name hint table" [| |] + // Two zero bytes of hint, then Case sensitive, null-terminated ASCII string containing name to import. + // Shall _CorExeMain a .exe file _CorDllMain for a .dll file. + if isDll then + writeBytes os [| 0x00uy; 0x00uy; 0x5fuy; 0x43uy ; 0x6fuy; 0x72uy; 0x44uy; 0x6cuy; 0x6cuy; 0x4duy; 0x61uy; 0x69uy; 0x6euy; 0x00uy |] + else + writeBytes os [| 0x00uy; 0x00uy; 0x5fuy; 0x43uy; 0x6fuy; 0x72uy; 0x45uy; 0x78uy; 0x65uy; 0x4duy; 0x61uy; 0x69uy; 0x6euy; 0x00uy |] + + write (Some (textV2P mscoreeStringChunk.addr)) os "mscoree string" + [| 0x6duy; 0x73uy; 0x63uy; 0x6fuy ; 0x72uy; 0x65uy ; 0x65uy; 0x2euy ; 0x64uy; 0x6cuy ; 0x6cuy; 0x00uy ; |] + + writePadding os "end of import tab" importTableChunkPadding + + writePadding os "head of entrypoint" 0x03 + let ep = (imageBaseReal + textSectionAddr) + write (Some (textV2P entrypointCodeChunk.addr)) os " entrypoint code" + [| 0xFFuy; 0x25uy; (* x86 Instructions for entry *) b0 ep; b1 ep; b2 ep; b3 ep |] + if isItanium then + write (Some (textV2P globalpointerCodeChunk.addr)) os " itanium global pointer" + [| 0x0uy; 0x0uy; 0x0uy; 0x0uy; 0x0uy; 0x0uy; 0x0uy; 0x0uy |] + + if pdbfile.IsSome then + write (Some (textV2P debugDirectoryChunk.addr)) os "debug directory" (Array.create debugDirectoryChunk.size 0x0uy) + write (Some (textV2P debugDataChunk.addr)) os "debug data" (Array.create debugDataChunk.size 0x0uy) + + if embeddedPDB then + write (Some (textV2P debugEmbeddedPdbChunk.addr)) os "debug data" (Array.create debugEmbeddedPdbChunk.size 0x0uy) + + writePadding os "end of .text" (dataSectionPhysLoc - textSectionPhysLoc - textSectionSize) + + // DATA SECTION +#if EMIT_NATIVE_RESOURCES + match nativeResources with + | [||] -> () + | resources -> + write (Some (dataSectionVirtToPhys nativeResourcesChunk.addr)) os "raw native resources" [| |] + writeBytes os resources +#endif + + if dummydatap.size <> 0x0 then + write (Some (dataSectionVirtToPhys dummydatap.addr)) os "dummy data" [| 0x0uy |] + + writePadding os "end of .rsrc" (relocSectionPhysLoc - dataSectionPhysLoc - dataSectionSize) + + // RELOC SECTION + + // See ECMA 24.3.2 + let relocV2P v = v - relocSectionAddr + relocSectionPhysLoc + + let entrypointFixupAddr = entrypointCodeChunk.addr + 0x02 + let entrypointFixupBlock = (entrypointFixupAddr / 4096) * 4096 + let entrypointFixupOffset = entrypointFixupAddr - entrypointFixupBlock + let reloc = (if modul.Is64Bit then 0xA000 (* IMAGE_REL_BASED_DIR64 *) else 0x3000 (* IMAGE_REL_BASED_HIGHLOW *)) ||| entrypointFixupOffset + // For the itanium, you need to set a relocation entry for the global pointer + let reloc2 = + if not isItanium then + 0x0 + else + 0xA000 ||| (globalpointerCodeChunk.addr - ((globalpointerCodeChunk.addr / 4096) * 4096)) + + write (Some (relocV2P baseRelocTableChunk.addr)) os "base reloc table" + [| b0 entrypointFixupBlock; b1 entrypointFixupBlock; b2 entrypointFixupBlock; b3 entrypointFixupBlock; + 0x0cuy; 0x00uy; 0x00uy; 0x00uy; + b0 reloc; b1 reloc; + b0 reloc2; b1 reloc2; |] + writePadding os "end of .reloc" (imageEndSectionPhysLoc - relocSectionPhysLoc - relocSectionSize) + + os.Dispose() + + pdbData, pdbOpt, debugDirectoryChunk, debugDataChunk, debugEmbeddedPdbChunk, textV2P, mappings + + // Looks like a finally + with e -> + (try + os.Dispose() + File.Delete outfile + with _ -> ()) + reraise() + + //Finished writing and signing the binary and debug info... + mappings + + type options = + { ilg: ILGlobals + pdbfile: string option + portablePDB: bool + embeddedPDB: bool + embedAllSource: bool + embedSourceList: string list + sourceLink: string +#if EMIT_STRONG_NAME + signer: ILStrongNameSigner option +#endif + emitTailcalls: bool + deterministic: bool + showTimes: bool + dumpDebugInfo:bool } + + let WriteILBinary (outfile, (args: options), modul) = + writeBinaryAndReportMappings (outfile, + args.ilg, args.pdbfile, (* args.signer, *) args.portablePDB, args.embeddedPDB, args.embedAllSource, + args.embedSourceList, args.sourceLink, args.emitTailcalls, args.deterministic, args.showTimes, args.dumpDebugInfo) modul + |> ignore + +//==================================================================================================== +// ProvidedAssembly - model for generated assembly fragments + +namespace ProviderImplementation.ProvidedTypes + + #nowarn "1182" + open System + open System.Diagnostics + open System.IO + open System.Collections.Concurrent + open System.Collections.Generic + open System.Reflection + + open Microsoft.FSharp.Quotations + open Microsoft.FSharp.Quotations.DerivedPatterns + open Microsoft.FSharp.Quotations.Patterns + open Microsoft.FSharp.Quotations.ExprShape + open Microsoft.FSharp.Core.CompilerServices + open Microsoft.FSharp.Reflection + + open ProviderImplementation.ProvidedTypes + open ProviderImplementation.ProvidedTypes.AssemblyReader + open ProviderImplementation.ProvidedTypes.UncheckedQuotations + + + type ILLocalBuilder(i: int) = + member __.LocalIndex = i + + type ILGenerator(methodName) = + let mutable locals = ResizeArray() + let mutable instrs = ResizeArray() + let mutable labelCount = 0 + let mutable labels = Dictionary() + + member __.Content = + { IsZeroInit = true + MaxStack = instrs.Count + Locals = locals.ToArray() + Code = + { Labels=labels + Instrs=instrs.ToArray() + Exceptions = [| |] // TODO + Locals = [| |] (* TODO ILLocalDebugInfo *) } + } + + member __.DeclareLocal(ty: ILType) = + let idx = locals.Count + let local = { Type = ty; IsPinned = false; DebugInfo = None } + locals.Add(local) + ILLocalBuilder(idx) + + member __.DefineLabel() = labelCount <- labelCount + 1; labelCount + member __.MarkLabel(label) = labels.[label] <- instrs.Count + member __.Emit(opcode) = instrs.Add(opcode) + override __.ToString() = "generator for " + methodName + + + type ILFieldBuilder(enclosing: ILType, nm: string, fty: ILType, attrs: FieldAttributes) = + + let mutable lit = None + let cattrs = ResizeArray() + + member __.SetConstant(lit2) = (lit <- Some lit2) + member __.SetCustomAttribute(ca) = cattrs.Add(ca) + member __.FormalFieldRef = ILFieldRef(enclosing.TypeRef, nm, fty) + member this.FormalFieldSpec = ILFieldSpec(this.FormalFieldRef, enclosing) + member __.Name = nm + + member __.Content = + { Name = nm + FieldType = fty + LiteralValue = lit + Attributes = attrs + Offset = None + CustomAttrs = mkILCustomAttrs (cattrs.ToArray()) + Token = genToken() } + override __.ToString() = "builder for " + nm + + type ILGenericParameterBuilder(nm, attrs: GenericParameterAttributes) = + + let mutable constraints = ResizeArray() + let cattrs = ResizeArray() + + member __.AddConstraint(ty) = constraints.Add(ty) + member __.SetCustomAttribute(ca) = cattrs.Add(ca) + + member __.Content = + { Name=nm + Constraints= constraints.ToArray() + Attributes = attrs + CustomAttrs = mkILCustomAttrs (cattrs.ToArray()) + Token = genToken() } + override __.ToString() = "builder for " + nm + + type ILParameterBuilder(ty: ILType) = + + let mutable attrs = ParameterAttributes.None + let mutable nm = UNone + let mutable dflt = UNone + let cattrs = ResizeArray() + + member __.SetData(attrs2,nm2) = attrs <- attrs2; nm <- USome nm2 + member __.SetConstant(obj) = dflt <- USome obj + member __.SetCustomAttribute(ca) = cattrs.Add(ca) + + member __.Content = + { Name=nm + ParameterType=ty + Default=dflt + Attributes = attrs + CustomAttrs = mkILCustomAttrs (cattrs.ToArray()) } + + type ILMethodBuilder(enclosing: ILType, methodName: string, attrs: MethodAttributes, retty: ILType, argtys:ILType[]) = + + let ilParams = [| yield ILParameterBuilder(retty); for argty in argtys do yield ILParameterBuilder(argty) |] + let mutable implflags = MethodImplAttributes.IL + let gparams = ResizeArray() + let cattrs = ResizeArray() + let mutable body = None + + member __.DefineGenericParameter(name, attrs) = let eb = ILGenericParameterBuilder(name, attrs) in gparams.Add eb; eb + member __.DefineParameter(i, attrs, parameterName) = ilParams.[i].SetData(attrs, parameterName) ; ilParams.[i] + member __.SetCustomAttribute(ca) = cattrs.Add(ca) + member __.GetILGenerator() = let ilg = ILGenerator(methodName) in body <- Some ilg; ilg + member __.FormalMethodRef = + let cc = (if ILMethodDef.ComputeIsStatic attrs then ILCallingConv.Static else ILCallingConv.Instance) + ILMethodRef (enclosing.TypeRef, cc, gparams.Count, methodName, argtys, retty) + member this.FormalMethodSpec = + ILMethodSpec(this.FormalMethodRef, enclosing, mkILFormalGenericArgs enclosing.TypeSpec.GenericArgs.Length gparams.Count) + + member __.Content = + { Token = genToken() + Name = methodName + Attributes = attrs + ImplAttributes = implflags + GenericParams = [| for x in gparams -> x.Content |] + CustomAttrs = mkILCustomAttrs (cattrs.ToArray()) + Parameters = [| for p in ilParams.[1..] -> p.Content |] + CallingConv = (if attrs &&& MethodAttributes.Static <> enum<_>(0) then ILCallingConv.Static else ILCallingConv.Instance) + Return = (let p = ilParams.[0].Content in { Type = p.ParameterType; CustomAttrs = p.CustomAttrs }) + Body = body |> Option.map (fun b -> b.Content) + IsEntryPoint = false } + override __.ToString() = "builder for " + methodName + + type ILPropertyBuilder(nm, attrs: PropertyAttributes, retty: ILType, argtys: ILType[]) = + + let mutable setMethod = None + let mutable getMethod = None + let cattrs = ResizeArray() + + member __.SetGetMethod(mb: ILMethodBuilder) = getMethod <- Some mb + member __.SetSetMethod(mb: ILMethodBuilder) = setMethod <- Some mb + member __.SetCustomAttribute(ca) = cattrs.Add(ca) + + member __.Content = + { Name=nm + CallingConv = + (if (getMethod.IsSome && getMethod.Value.Content.IsStatic) || + (setMethod.IsSome && setMethod.Value.Content.IsStatic) then + ILThisConvention.Static + else ILThisConvention.Instance) + Attributes = attrs + GetMethod = (getMethod |> Option.map (fun mb -> mb.FormalMethodRef)) + SetMethod = (setMethod |> Option.map (fun mb -> mb.FormalMethodRef)) + CustomAttrs = mkILCustomAttrs (cattrs.ToArray()) + PropertyType=retty + Init= None // TODO if (attrs &&& PropertyAttributes.HasDefault) = 0 then None else + IndexParameterTypes=argtys + Token = genToken() } + override __.ToString() = "builder for " + nm + + type ILEventBuilder(nm, attrs: EventAttributes) = + + let mutable addMethod = None + let mutable removeMethod = None + let cattrs = ResizeArray() + + member __.SetAddOnMethod(mb: ILMethodBuilder) = addMethod <- Some mb + member __.SetRemoveOnMethod(mb: ILMethodBuilder) = removeMethod <- Some mb + member __.SetCustomAttribute(ca) = cattrs.Add(ca) + member __.Content = + { Name = nm + Attributes = attrs + AddMethod = addMethod.Value.FormalMethodRef + RemoveMethod = removeMethod.Value.FormalMethodRef + CustomAttrs = mkILCustomAttrs (cattrs.ToArray()) + Token = genToken()} + override __.ToString() = "builder for " + nm + + type ILTypeBuilder(scoref, nsp: string uoption, nm: string, attrs: TypeAttributes) = + + let mutable extends = None + let implements = ResizeArray() + let nestedTypes = ResizeArray() + let methods = ResizeArray() + let fields = ResizeArray() + let props = ResizeArray() + let events = ResizeArray() + let gparams = ResizeArray() + let methodImpls = ResizeArray() + let cattrs = ResizeArray() + + member __.ILTypeRef = ILTypeRef(scoref, nsp, nm) + member this.ILTypeSpec = ILTypeSpec(this.ILTypeRef, mkILFormalGenericArgs 0 gparams.Count) + member this.ILType = + match ILTypeDef.ComputeKind (int attrs) extends nsp nm with + | ILTypeDefKind.ValueType | ILTypeDefKind.Enum -> ILType.Value this.ILTypeSpec + | _ -> ILType.Boxed this.ILTypeSpec + + member this.DefineNestedType(name, attrs) = let tb = ILTypeBuilder(ILTypeRefScope.Nested this.ILTypeRef, UNone, name, attrs) in nestedTypes.Add tb; tb + + member this.DefineField(name, retty, attrs) = let fb = ILFieldBuilder(this.ILType, name, retty, attrs) in fields.Add fb; fb + member this.DefineMethod(name, attrs, retty, argtys) = let mb = ILMethodBuilder(this.ILType, name, attrs, retty, argtys) in methods.Add mb; mb + member this.DefineConstructor(attrs, argtys) = let mb = ILMethodBuilder(this.ILType, ".ctor", attrs ||| MethodAttributes.SpecialName ||| MethodAttributes.RTSpecialName, ILType.Void, argtys) in methods.Add mb; mb + member __.DefineProperty(name, attrs, propty, argtys) = let pb = ILPropertyBuilder(name, attrs, propty, argtys) in props.Add pb; pb + member __.DefineEvent(name, attrs) = let eb = ILEventBuilder(name, attrs) in events.Add eb; eb + member __.DefineMethodOverride(mimpl) = methodImpls.Add (mimpl) + member __.DefineGenericParameter(name, attrs) = let eb = ILGenericParameterBuilder(name, attrs) in gparams.Add eb; eb + member __.SetCustomAttribute(ca) = cattrs.Add(ca) + member __.AddInterfaceImplementation(ty) = implements.Add(ty) + member this.DefineTypeInitializer () = let mb = ILMethodBuilder(this.ILType, ".cctor", MethodAttributes.Static ||| MethodAttributes.SpecialName, ILType.Void, [| |]) in methods.Add mb; mb + member __.SetParent ty = (extends <- Some ty) + member this.DefineDefaultConstructor(attrs, baseCtor: ILMethodSpec) = + let ctor = this.DefineConstructor(attrs, [| |]) + let ilg = ctor.GetILGenerator() + ilg.Emit(I_ldarg 0) + ilg.Emit(I_call (Normalcall, baseCtor, None)) + ilg.Emit(I_ret) + ctor + + + member __.Content = + { Namespace=nsp + Name=nm + GenericParams= [| for x in gparams -> x.Content |] + Implements = implements.ToArray() + Attributes = attrs + Layout=ILTypeDefLayout.Auto + Extends=extends + Token=genToken() + //SecurityDecls=emptyILSecurityDecls; + //HasSecurity=false; + NestedTypes = ILTypeDefs( lazy [| for x in nestedTypes -> let td = x.Content in td.Namespace, td.Name, lazy td |] ) + Fields = { new ILFieldDefs with member __.Entries = [| for x in fields -> x.Content |] } + Properties = { new ILPropertyDefs with member __.Entries = [| for x in props -> x.Content |] } + Events = { new ILEventDefs with member __.Entries = [| for x in events -> x.Content |] } + Methods = ILMethodDefs (lazy [| for x in methods -> x.Content |]) + MethodImpls = { new ILMethodImplDefs with member __.Entries = methodImpls.ToArray() } + CustomAttrs = mkILCustomAttrs (cattrs.ToArray()) + } + override __.ToString() = "builder for " + joinILTypeName nsp nm + + type ILModuleBuilder(scoref, moduleName, manifest) = + let typeDefs = ResizeArray() + let cattrs = ResizeArray() + + member __.DefineType(nsp, name, attrs) = let tb = ILTypeBuilder(ILTypeRefScope.Top scoref, nsp, name, attrs) in typeDefs.Add tb; tb + member __.SetCustomAttribute(ca) = cattrs.Add(ca) + + member __.Content = + { Manifest=manifest + Name=moduleName + SubsystemVersion = (4, 0) + UseHighEntropyVA = false + SubSystemFlags=3 + IsDLL=true + IsILOnly=true + Platform=None + StackReserveSize=None + Is32Bit=false + Is32BitPreferred=false + Is64Bit=false + PhysicalAlignment=512 + VirtualAlignment=0x2000 + ImageBase=0x034f0000 + MetadataVersion="" + Resources=ILResources (lazy [| |]) + TypeDefs = ILTypeDefs( lazy [| for x in typeDefs-> let td = x.Content in td.Namespace, td.Name, lazy td |] ) + CustomAttrs = { new ILCustomAttrs with member __.Entries = cattrs.ToArray() } + } + override __.ToString() = "builder for " + moduleName + + type ILAssemblyBuilder(assemblyName: AssemblyName, fileName, ilg) = + let manifest = + { Name = assemblyName.Name + AuxModuleHashAlgorithm = 0x8004 // SHA1 + PublicKey = UNone + Version = UNone + Locale = UNone + CustomAttrs = emptyILCustomAttrs + //AssemblyLongevity=ILAssemblyLongevity.Unspecified + DisableJitOptimizations = false + JitTracking = true + IgnoreSymbolStoreSequencePoints = false + Retargetable = false + ExportedTypes = ILExportedTypesAndForwarders (lazy [| |]) + EntrypointElsewhere=None } + let mb = ILModuleBuilder(ILScopeRef.Local, "MainModule", Some manifest) + member __.MainModule = mb + member __.Save() = + let il = mb.Content + let options: BinaryWriter.options = { ilg = ilg; pdbfile = None; portablePDB = false; embeddedPDB = false; embedAllSource = false; embedSourceList = []; sourceLink = ""; emitTailcalls = true; deterministic = false; showTimes = false; dumpDebugInfo = false } + BinaryWriter.WriteILBinary (fileName, options, il) + override __.ToString() = "builder for " + (assemblyName.ToString()) + + + type ExpectedStackState = + | Empty = 1 + | Address = 2 + | Value = 3 + + type CodeGenerator(assemblyMainModule: ILModuleBuilder, + genUniqueTypeName: (unit -> string), + implicitCtorArgsAsFields: ILFieldBuilder list, + convTypeToTgt: Type -> Type, + transType: Type -> ILType, + transFieldSpec: FieldInfo -> ILFieldSpec, + transMeth: MethodInfo -> ILMethodSpec, + transMethRef: MethodInfo -> ILMethodRef, + transCtorSpec: ConstructorInfo -> ILMethodSpec, + ilg: ILGenerator, + localsMap:Dictionary, + parameterVars) = + + // TODO: this works over FSharp.Core 4.4.0.0 types and methods. These types need to be retargeted to the target runtime. + + let getTypeFromHandleMethod() = (convTypeToTgt typeof).GetMethod("GetTypeFromHandle") + let languagePrimitivesType() = (convTypeToTgt (typedefof>.Assembly.GetType("Microsoft.FSharp.Core.LanguagePrimitives"))) + let parseInt32Method() = (convTypeToTgt (languagePrimitivesType())).GetMethod "ParseInt32" + let decimalConstructor() = (convTypeToTgt typeof).GetConstructor([| typeof; typeof; typeof; typeof; typeof |]) + let dateTimeConstructor() = (convTypeToTgt typeof).GetConstructor([| typeof; typeof |]) + let dateTimeOffsetConstructor() = (convTypeToTgt typeof).GetConstructor([| typeof; typeof |]) + let timeSpanConstructor() = (convTypeToTgt typeof).GetConstructor([|typeof|]) + + let isEmpty s = (s = ExpectedStackState.Empty) + let isAddress s = (s = ExpectedStackState.Address) + let rec emitLambda(callSiteIlg: ILGenerator, v: Var, body: Expr, freeVars: seq, lambdaLocals: Dictionary<_, ILLocalBuilder>, parameters) = + let lambda: ILTypeBuilder = assemblyMainModule.DefineType(UNone, genUniqueTypeName(), TypeAttributes.Class) + let baseType = convTypeToTgt (typedefof>.MakeGenericType(v.Type, body.Type)) + lambda.SetParent(transType baseType) + let baseCtor = baseType.GetConstructor(bindAll, null, [| |], null) + if isNull baseCtor then failwithf "Couldn't find default constructor on %O" baseType + let ctor = lambda.DefineDefaultConstructor(MethodAttributes.Public, transCtorSpec baseCtor) + let decl = baseType.GetMethod "Invoke" + let paramTypes = [| for p in decl.GetParameters() -> transType p.ParameterType |] + let retType = transType decl.ReturnType + let invoke = lambda.DefineMethod("Invoke", MethodAttributes.Virtual ||| MethodAttributes.Final ||| MethodAttributes.Public, retType, paramTypes) + lambda.DefineMethodOverride + { Overrides = OverridesSpec(transMethRef decl, transType decl.DeclaringType) + OverrideBy = invoke.FormalMethodSpec } + + // promote free vars to fields + let fields = ResizeArray() + for v in freeVars do + let f = lambda.DefineField(v.Name, transType v.Type, FieldAttributes.Assembly) + //Debug.Assert (v.Name <> "formatValue") + fields.Add(v, f) + + let lambdaLocals = Dictionary() + + let ilg = invoke.GetILGenerator() + for (v, f) in fields do + let l = ilg.DeclareLocal(transType v.Type) + ilg.Emit(I_ldarg 0) + ilg.Emit(I_ldfld (ILAlignment.Aligned, ILVolatility.Nonvolatile, f.FormalFieldSpec)) + ilg.Emit(I_stloc l.LocalIndex) + lambdaLocals.[v] <- l + + let expectedState = if (retType = ILType.Void) then ExpectedStackState.Empty else ExpectedStackState.Value + let lambadParamVars = [| Var("this", typeof); v|] + let codeGen = CodeGenerator(assemblyMainModule, genUniqueTypeName, implicitCtorArgsAsFields, convTypeToTgt, transType, transFieldSpec, transMeth, transMethRef, transCtorSpec, ilg, lambdaLocals, lambadParamVars) + codeGen.EmitExpr (expectedState, body) + ilg.Emit(I_ret) + + callSiteIlg.Emit(I_newobj (ctor.FormalMethodSpec, None)) + for (v, f) in fields do + callSiteIlg.Emit(I_dup) + match localsMap.TryGetValue v with + | true, loc -> + callSiteIlg.Emit(I_ldloc loc.LocalIndex) + | false, _ -> + let index = parameters |> Array.findIndex ((=) v) + callSiteIlg.Emit(I_ldarg index) + callSiteIlg.Emit(I_stfld (ILAlignment.Aligned, ILVolatility.Nonvolatile, f.FormalFieldSpec)) + + and emitExpr expectedState expr = + let pop () = ilg.Emit(I_pop) + let popIfEmptyExpected s = if isEmpty s then pop() + let emitConvIfNecessary t1 = + if t1 = typeof then + ilg.Emit(I_conv DT_I2) + elif t1 = typeof then + ilg.Emit(I_conv DT_U2) + elif t1 = typeof then + ilg.Emit(I_conv DT_I1) + elif t1 = typeof then + ilg.Emit(I_conv DT_U1) + + /// emits given expression to corresponding IL + match expr with + | ForIntegerRangeLoop(loopVar, first, last, body) -> + // for(loopVar = first..last) body + let lb = + match localsMap.TryGetValue loopVar with + | true, lb -> lb + | false, _ -> + let lb = ilg.DeclareLocal(transType loopVar.Type) + localsMap.Add(loopVar, lb) + lb + + // loopVar = first + emitExpr ExpectedStackState.Value first + ilg.Emit(I_stloc lb.LocalIndex) + + let before = ilg.DefineLabel() + let after = ilg.DefineLabel() + + ilg.MarkLabel before + ilg.Emit(I_ldloc lb.LocalIndex) + + emitExpr ExpectedStackState.Value last + ilg.Emit(I_brcmp (I_bgt, after)) + + emitExpr ExpectedStackState.Empty body + + // loopVar++ + ilg.Emit(I_ldloc lb.LocalIndex) + ilg.Emit(mk_ldc 1) + ilg.Emit(I_add) + ilg.Emit(I_stloc lb.LocalIndex) + + ilg.Emit(I_br before) + ilg.MarkLabel(after) + + | NewArray(elementTy, elements) -> + ilg.Emit(mk_ldc (List.length elements)) + ilg.Emit(I_newarr (ILArrayShape.SingleDimensional, transType elementTy)) + + elements + |> List.iteri (fun i el -> + ilg.Emit(I_dup) + ilg.Emit(mk_ldc i) + emitExpr ExpectedStackState.Value el + ilg.Emit(I_stelem_any (ILArrayShape.SingleDimensional, transType elementTy))) + + popIfEmptyExpected expectedState + + | WhileLoop(cond, body) -> + let before = ilg.DefineLabel() + let after = ilg.DefineLabel() + + ilg.MarkLabel before + emitExpr ExpectedStackState.Value cond + ilg.Emit(I_brcmp (I_brfalse, after)) + emitExpr ExpectedStackState.Empty body + ilg.Emit(I_br before) + + ilg.MarkLabel after + + | Var v -> + if isEmpty expectedState then () else + + // Try to interpret this as a method parameter + let methIdx = parameterVars |> Array.tryFindIndex (fun p -> p = v) + match methIdx with + | Some idx -> + ilg.Emit((if isAddress expectedState then I_ldarga idx else I_ldarg idx) ) + | None -> + + // Try to interpret this as an implicit field in a class + let implicitCtorArgFieldOpt = implicitCtorArgsAsFields |> List.tryFind (fun f -> f.Name = v.Name) + match implicitCtorArgFieldOpt with + | Some ctorArgField -> + ilg.Emit(I_ldarg 0) + ilg.Emit(I_ldfld (ILAlignment.Aligned, ILVolatility.Nonvolatile, ctorArgField.FormalFieldSpec)) + | None -> + + // Try to interpret this as a local + match localsMap.TryGetValue v with + | true, localBuilder -> + let idx = localBuilder.LocalIndex + ilg.Emit(if isAddress expectedState then I_ldloca idx else I_ldloc idx) + | false, _ -> + failwith "unknown parameter/field" + + | Coerce (arg,ty) -> + // castClass may lead to observable side-effects - InvalidCastException + emitExpr ExpectedStackState.Value arg + let argTy = arg.Type + let targetTy = ty + if argTy.IsValueType && not targetTy.IsValueType then + ilg.Emit(I_box (transType argTy)) + elif not argTy.IsValueType && targetTy.IsValueType then + ilg.Emit(I_unbox_any (transType targetTy)) + else + ilg.Emit(I_castclass (transType targetTy)) + + popIfEmptyExpected expectedState + + | SpecificCall <@ LanguagePrimitives.IntrinsicFunctions.GetArray @> (None, [ty], [arr; index]) -> + // observable side-effect - IndexOutOfRangeException + emitExpr ExpectedStackState.Value arr + emitExpr ExpectedStackState.Value index + if isAddress expectedState then + ilg.Emit(I_ldelema (ILReadonly.ReadonlyAddress, ILArrayShape.SingleDimensional, transType ty)) + else + ilg.Emit(I_ldelem_any (ILArrayShape.SingleDimensional, transType ty)) + + popIfEmptyExpected expectedState + + | SpecificCall <@ LanguagePrimitives.IntrinsicFunctions.GetArray2D @> (None, _ty, arr::indices) + | SpecificCall <@ LanguagePrimitives.IntrinsicFunctions.GetArray3D @> (None, _ty, arr::indices) + | SpecificCall <@ LanguagePrimitives.IntrinsicFunctions.GetArray4D @> (None, _ty, arr::indices) -> + + let meth = + let name = if isAddress expectedState then "Address" else "Get" + arr.Type.GetMethod(name) + + // observable side-effect - IndexOutOfRangeException + emitExpr ExpectedStackState.Value arr + for index in indices do + emitExpr ExpectedStackState.Value index + + //if isAddress expectedState then + // ilg.Emit(I_readonly) + + ilg.Emit(mkNormalCall (transMeth meth)) + + popIfEmptyExpected expectedState + + + | FieldGet (None,field) when field.DeclaringType.IsEnum -> + if expectedState <> ExpectedStackState.Empty then + emitExpr expectedState (Expr.Value(field.GetRawConstantValue(), field.FieldType.GetEnumUnderlyingType())) + + | FieldGet (objOpt,field) -> + objOpt |> Option.iter (fun e -> + let s = if e.Type.IsValueType then ExpectedStackState.Address else ExpectedStackState.Value + emitExpr s e) + if field.IsStatic then + ilg.Emit(I_ldsfld (ILVolatility.Nonvolatile, transFieldSpec field)) + else + ilg.Emit(I_ldfld (ILAlignment.Aligned, ILVolatility.Nonvolatile, transFieldSpec field)) + + | FieldSet (objOpt,field,v) -> + objOpt |> Option.iter (fun e -> + let s = if e.Type.IsValueType then ExpectedStackState.Address else ExpectedStackState.Value + emitExpr s e) + emitExpr ExpectedStackState.Value v + if field.IsStatic then + ilg.Emit(I_stsfld (ILVolatility.Nonvolatile, transFieldSpec field)) + else + ilg.Emit(I_stfld (ILAlignment.Aligned, ILVolatility.Nonvolatile, transFieldSpec field)) + + | Call (objOpt,meth,args) -> + objOpt |> Option.iter (fun e -> + let s = if e.Type.IsValueType then ExpectedStackState.Address else ExpectedStackState.Value + emitExpr s e) + + for pe in args do + emitExpr ExpectedStackState.Value pe + + // Handle the case where this is a generic method instantiated at a type being compiled + let mappedMeth = transMeth meth + + match objOpt with + | Some obj when meth.IsAbstract || meth.IsVirtual -> + if obj.Type.IsValueType then + ilg.Emit(I_callconstraint (Normalcall, transType obj.Type, mappedMeth, None)) + else + ilg.Emit(I_callvirt (Normalcall, mappedMeth, None)) + | _ -> + ilg.Emit(mkNormalCall mappedMeth) + + let returnTypeIsVoid = (mappedMeth.FormalReturnType = ILType.Void) + match returnTypeIsVoid, (isEmpty expectedState) with + | false, true -> + // method produced something, but we don't need it + pop() + | true, false when expr.Type = typeof -> + // if we need result and method produce void and result should be unit - push null as unit value on stack + ilg.Emit(I_ldnull) + | _ -> () + + | NewObject (ctor,args) -> + for pe in args do + emitExpr ExpectedStackState.Value pe + ilg.Emit(I_newobj (transCtorSpec ctor, None)) + + popIfEmptyExpected expectedState + + | Value (obj, _ty) -> + let rec emitC (v:obj) = + match v with + | :? string as x -> ilg.Emit(I_ldstr x) + | :? int8 as x -> ilg.Emit(mk_ldc (int32 x)) + | :? uint8 as x -> ilg.Emit(mk_ldc (int32 x)) + | :? int16 as x -> ilg.Emit(mk_ldc (int32 x)) + | :? uint16 as x -> ilg.Emit(mk_ldc (int32 x)) + | :? int32 as x -> ilg.Emit(mk_ldc x) + | :? uint32 as x -> ilg.Emit(mk_ldc (int32 x)) + | :? int64 as x -> ilg.Emit(mk_ldc_i8 x) + | :? uint64 as x -> ilg.Emit(mk_ldc_i8 (int64 x)) + | :? char as x -> ilg.Emit(mk_ldc (int32 x)) + | :? bool as x -> ilg.Emit(mk_ldc (if x then 1 else 0)) + | :? float32 as x -> ilg.Emit(I_ldc (DT_R4, ILConst.R4 x)) + | :? float as x -> ilg.Emit(I_ldc(DT_R8, ILConst.R8 x)) + #if !FX_NO_GET_ENUM_UNDERLYING_TYPE + | :? Enum as x when x.GetType().GetEnumUnderlyingType() = typeof -> ilg.Emit(mk_ldc (unbox v)) + #endif + | :? Type as ty -> + ilg.Emit(I_ldtoken (ILToken.ILType (transType ty))) + ilg.Emit(mkNormalCall (transMeth (getTypeFromHandleMethod()))) + | :? decimal as x -> + let bits = Decimal.GetBits x + ilg.Emit(mk_ldc bits.[0]) + ilg.Emit(mk_ldc bits.[1]) + ilg.Emit(mk_ldc bits.[2]) + do + let sign = (bits.[3] &&& 0x80000000) <> 0 + ilg.Emit(if sign then mk_ldc 1 else mk_ldc 0) + do + let scale = (bits.[3] >>> 16) &&& 0x7F + ilg.Emit(mk_ldc scale) + ilg.Emit(I_newobj (transCtorSpec (decimalConstructor()), None)) + | :? DateTime as x -> + ilg.Emit(mk_ldc_i8 x.Ticks) + ilg.Emit(mk_ldc (int x.Kind)) + ilg.Emit(I_newobj (transCtorSpec (dateTimeConstructor()), None)) + | :? DateTimeOffset as x -> + ilg.Emit(mk_ldc_i8 x.Ticks) + ilg.Emit(mk_ldc_i8 x.Offset.Ticks) + ilg.Emit(I_newobj (transCtorSpec (timeSpanConstructor()), None)) + ilg.Emit(I_newobj (transCtorSpec (dateTimeOffsetConstructor()), None)) + | null -> ilg.Emit(I_ldnull) + | _ -> failwithf "unknown constant '%A' of type '%O' in generated method. You may need to avoid variable capture in a quotation specifying a type provider." v (v.GetType()) + if isEmpty expectedState then () + else emitC obj + + | Let(v,e,b) -> + let ty = transType v.Type + let lb = ilg.DeclareLocal ty + //printfn "declared local %d of original type %O and target type %O for variable %O" lb.LocalIndex v.Type ty v + localsMap.Add (v, lb) + emitExpr ExpectedStackState.Value e + ilg.Emit(I_stloc lb.LocalIndex) + emitExpr expectedState b + + | Sequential(e1, e2) -> + emitExpr ExpectedStackState.Empty e1 + emitExpr expectedState e2 + + | IfThenElse(cond, ifTrue, ifFalse) -> + let ifFalseLabel = ilg.DefineLabel() + let endLabel = ilg.DefineLabel() + + emitExpr ExpectedStackState.Value cond + + ilg.Emit(I_brcmp (I_brfalse, ifFalseLabel)) + + emitExpr expectedState ifTrue + ilg.Emit(I_br endLabel) + + ilg.MarkLabel(ifFalseLabel) + emitExpr expectedState ifFalse + + ilg.Emit(I_nop) + ilg.MarkLabel(endLabel) + +#if EMIT_TRY_WITH + | TryWith(body, _filterVar, _filterBody, catchVar, catchBody) -> + + let stres, ldres = + if isEmpty expectedState then ignore, ignore + else + let local = ilg.DeclareLocal (transType body.Type) + let stres = fun () -> ilg.Emit(I_stloc local.LocalIndex) + let ldres = fun () -> ilg.Emit(I_ldloc local.LocalIndex) + stres, ldres + + let exceptionVar = ilg.DeclareLocal(transType catchVar.Type) + locals.Add(catchVar, exceptionVar) + + let _exnBlock = ilg.BeginExceptionBlock() + + emitExpr expectedState body + stres() + + ilg.BeginCatchBlock(transType catchVar.Type) + ilg.Emit(I_stloc exceptionVar.LocalIndex) + emitExpr expectedState catchBody + stres() + ilg.EndExceptionBlock() + + ldres() +#endif + + | VarSet(v,e) -> + emitExpr ExpectedStackState.Value e + match localsMap.TryGetValue v with + | true, localBuilder -> + ilg.Emit(I_stloc localBuilder.LocalIndex) + | false, _ -> + failwith "unknown parameter/field in assignment. Only assignments to locals are currently supported by TypeProviderEmit" + | Lambda(v, body) -> + let lambdaLocals = Dictionary() + emitLambda(ilg, v, body, expr.GetFreeVars(), lambdaLocals, parameterVars) + popIfEmptyExpected expectedState + | n -> + failwithf "unknown expression '%A' in generated method" n + + member __.EmitExpr (expectedState, expr) = emitExpr expectedState expr + + //------------------------------------------------------------------------------------------------- + // AssemblyCompiler: the assembly compiler for generative type providers. + + /// Implements System.Reflection.Assembly backed by ILModuleReader over generated bytes + type AssemblyCompiler(targetAssembly: ProvidedAssembly, context: ProvidedTypesContext) = + + + let typeMap = Dictionary(HashIdentity.Reference) + let typeMapExtra = Dictionary(HashIdentity.Structural) + let ctorMap = Dictionary(HashIdentity.Reference) + let methMap = Dictionary(HashIdentity.Reference) + let fieldMap = Dictionary(HashIdentity.Reference) + let genUniqueTypeName() = + // lambda name should be unique across all types that all type provider might contribute in result assembly + sprintf "Lambda%O" (Guid.NewGuid()) + + let convTypeToTgt ty = context.ConvertSourceTypeToTarget ty + let rec defineNestedTypes (tb:ILTypeBuilder) (td: ProvidedTypeDefinition) = + Debug.Assert(td.BelongsToTargetModel, "expected a target ProvidedTypeDefinition in nested type") + for ntd in td.GetNestedTypes(bindAll) do + defineNestedType tb ntd + + and defineNestedType (tb:ILTypeBuilder) (ntd: Type) = + match ntd with + | :? ProvidedTypeDefinition as pntd -> + if pntd.IsErased then failwith ("The nested provided type "+pntd.Name+" is marked as erased and cannot be converted to a generated type. Set 'IsErased=false' on the ProvidedTypeDefinition") + Debug.Assert(pntd.BelongsToTargetModel, "expected a target ProvidedTypeDefinition in nested type") + // Adjust the attributes - we're codegen'ing this type as nested + let attributes = adjustTypeAttributes true ntd.Attributes + let ntb = tb.DefineNestedType(pntd.Name,attributes) + typeMap.[pntd] <- ntb + defineNestedTypes ntb pntd + | _ -> () + + let rec transType (ty:Type) = + if (match ty with :? ProvidedTypeDefinition as ty -> not ty.BelongsToTargetModel | _ -> false) then failwithf "expected '%O' to belong to the target model" ty + if ty.IsGenericParameter then ILType.Var ty.GenericParameterPosition + elif ty.HasElementType then + let ety = transType (ty.GetElementType()) + if ty.IsArray then + let rank = ty.GetArrayRank() + if rank = 1 then ILType.Array(ILArrayShape.SingleDimensional, ety) + else ILType.Array(ILArrayShape.FromRank rank, ety) + elif ty.IsPointer then ILType.Ptr ety + elif ty.IsByRef then ILType.Byref ety + else failwith "unexpected type with element type" + elif ty.Namespace = "System" && ty.Name = "Void" then ILType.Void + elif ty.IsValueType then ILType.Value (transTypeSpec ty) + else ILType.Boxed (transTypeSpec ty) + + and transTypeSpec (ty: Type) = + if ty.IsGenericType then + ILTypeSpec(transTypeRef (ty.GetGenericTypeDefinition()), Array.map transType (ty.GetGenericArguments())) + else + ILTypeSpec(transTypeRef ty, [| |]) + + and transTypeRef (ty: Type) = + let ty = if ty.IsGenericType then ty.GetGenericTypeDefinition() else ty + ILTypeRef(transTypeRefScope ty, StructOption.ofObj (if ty.IsNested then null else ty.Namespace), ty.Name) + + and transTypeRefScope (ty: Type): ILTypeRefScope = + match ty.DeclaringType with + | null -> + if ty.Assembly = null then failwithf "null assembly for type %s" ty.FullName + ILTypeRefScope.Top (transScopeRef ty.Assembly) + | dt -> ILTypeRefScope.Nested (transTypeRef dt) + + and transScopeRef (assem: Assembly): ILScopeRef = + // Note: this simple equality check on assembly objects doesn't work on Mono, there must be some small difference in the + // implementation of equality on System.Assembly objects + // if assem = (targetAssembly :> Assembly) then ILScopeRef.Local + if assem.GetName().Name = targetAssembly.GetName().Name then ILScopeRef.Local + else ILScopeRef.Assembly (ILAssemblyRef.FromAssemblyName (assem.GetName())) + + let transCtorRef (m:ConstructorInfo) = + // Remove the generic instantiations to get the uninstantiated identity of the method + let m2 = m.GetDefinition() + let cc = (if m2.IsStatic then ILCallingConv.Static else ILCallingConv.Instance) + let ptys = [| for p in m2.GetParameters() -> transType p.ParameterType |] + ILMethodRef (transTypeRef m2.DeclaringType, cc, 0, m2.Name, ptys, ILType.Void) + + let transCtorSpec (f:ConstructorInfo) = + if (match f with :? ProvidedConstructor as f -> not f.BelongsToTargetModel | _ -> false) then failwithf "expected '%O' to belong to the target model" f + match f with + | :? ProvidedConstructor as pc when ctorMap.ContainsKey pc -> ctorMap.[pc].FormalMethodSpec + | m -> ILMethodSpec(transCtorRef f, transType m.DeclaringType, [| |]) + + let transFieldSpec (f:FieldInfo) = + if (match f with :? ProvidedField as f -> not f.BelongsToTargetModel | _ -> false) then failwithf "expected '%O' to belong to the target model" f + match f with + | :? ProvidedField as pf when fieldMap.ContainsKey pf -> fieldMap.[pf].FormalFieldSpec + | f -> + let f2 = f.GetDefinition() + ILFieldSpec(ILFieldRef (transTypeRef f2.DeclaringType, f2.Name, transType f2.FieldType), transType f.DeclaringType) + + let transMethRef (m:MethodInfo) = + if (match m with :? ProvidedMethod as m -> not m.BelongsToTargetModel | _ -> false) then failwithf "expected '%O' to belong to the target model" m + // Remove the generic instantiations to get the uninstantiated identity of the method + let m2 = m.GetDefinition() + let ptys = [| for p in m2.GetParameters() -> transType p.ParameterType |] + let genarity = (if m2.IsGenericMethod then m2.GetGenericArguments().Length else 0) + let cc = (if m2.IsStatic then ILCallingConv.Static else ILCallingConv.Instance) + ILMethodRef (transTypeRef m2.DeclaringType, cc, genarity, m2.Name, ptys, transType m2.ReturnType) + + let transMeth (m:MethodInfo): ILMethodSpec = + match m with + | :? ProvidedMethod as pm when methMap.ContainsKey pm -> methMap.[pm].FormalMethodSpec + | m -> + //Debug.Assert (m.Name <> "get_Item1" || m.DeclaringType.Name <> "Tuple`2") + let mref = transMethRef m + let minst = (if m.IsGenericMethod then Array.map transType (m.GetGenericArguments()) else [| |]) + ILMethodSpec(mref, transType m.DeclaringType, minst) + + let iterateTypes f providedTypeDefinitions = + let rec typeMembers (ptd: ProvidedTypeDefinition) = + let tb = typeMap.[ptd] + f tb (Some ptd) + for ntd in ptd.GetNestedTypes(bindAll) do + nestedType ntd + + and nestedType (ntd: Type) = + match ntd with + | :? ProvidedTypeDefinition as pntd -> typeMembers pntd + | _ -> () + + for (pt,enclosingGeneratedTypeNames) in providedTypeDefinitions do + match enclosingGeneratedTypeNames with + | None -> + typeMembers pt + | Some ns -> + let _fullName = + ("",ns) ||> List.fold (fun fullName n -> + let fullName = if fullName = "" then n else fullName + "." + n + f typeMapExtra.[fullName] None + fullName) + nestedType pt + + let defineCustomAttrs f (cattrs: IList) = + for attr in cattrs do + let constructorArgs = [ for x in attr.ConstructorArguments -> x.Value ] + let transValue (o:obj) = + match o with + | :? Type as t -> box (transType t) + | v -> v + let namedProps = [ for x in attr.NamedArguments do match x.MemberInfo with :? PropertyInfo as pi -> yield ILCustomAttrNamedArg(pi.Name, transType x.TypedValue.ArgumentType, x.TypedValue.Value) | _ -> () ] + let namedFields = [ for x in attr.NamedArguments do match x.MemberInfo with :? FieldInfo as pi -> yield ILCustomAttrNamedArg(pi.Name, transType x.TypedValue.ArgumentType, x.TypedValue.Value) | _ -> () ] + let ca = mkILCustomAttribMethRef (transCtorSpec attr.Constructor, constructorArgs, namedProps, namedFields) + f ca + + member __.Compile(isHostedExecution) = + let providedTypeDefinitionsT = targetAssembly.GetTheTypes() |> Array.collect (fun (tds,nsps) -> Array.map (fun td -> (td,nsps)) tds) + let ilg = context.ILGlobals + let assemblyName = targetAssembly.GetName() + let assemblyFileName = targetAssembly.Location + let assemblyBuilder = ILAssemblyBuilder(assemblyName, assemblyFileName, ilg) + let assemblyMainModule = assemblyBuilder.MainModule + + // Set the Assembly on the type definitions + for (ptdT,_) in providedTypeDefinitionsT do + if not ptdT.BelongsToTargetModel then failwithf "expected '%O' to belong to the target model" ptdT + ptdT.SetAssemblyInternal (K (targetAssembly :> Assembly)) + + // phase 1 - define types + for (pt,enclosingGeneratedTypeNames) in providedTypeDefinitionsT do + match enclosingGeneratedTypeNames with + | None -> + // Filter out the additional TypeProviderTypeAttributes flags + let attributes = pt.Attributes &&& ~~~(enum (int32 TypeProviderTypeAttributes.SuppressRelocate)) + &&& ~~~(enum (int32 TypeProviderTypeAttributes.IsErased)) + // Adjust the attributes - we're codegen'ing as non-nested + let attributes = adjustTypeAttributes false attributes + let tb = assemblyMainModule.DefineType(StructOption.ofObj pt.Namespace, pt.Name, attributes) + typeMap.[pt] <- tb + defineNestedTypes tb pt + + | Some ns -> + let otb,_ = + ((None,""),ns) ||> List.fold (fun (otb:ILTypeBuilder option,fullName) n -> + let fullName = if fullName = "" then n else fullName + "." + n + let priorType = if typeMapExtra.ContainsKey(fullName) then Some typeMapExtra.[fullName] else None + let tb = + match priorType with + | Some tbb -> tbb + | None -> + // OK, the implied nested type is not defined, define it now + let attributes = TypeAttributes.Public ||| TypeAttributes.Class ||| TypeAttributes.Sealed + let attributes = adjustTypeAttributes otb.IsSome attributes + let tb = + match otb with + | None -> + let nsp, n = splitILTypeName n + assemblyMainModule.DefineType(nsp, n,attributes) + | Some (otb:ILTypeBuilder) -> + otb.DefineNestedType(n,attributes) + typeMapExtra.[fullName] <- tb + tb + (Some tb, fullName)) + defineNestedType otb.Value pt + + + // phase 1b - emit base types + providedTypeDefinitionsT |> iterateTypes (fun tb ptdT -> + match ptdT with + | None -> () + | Some ptdT -> + match ptdT.BaseType with + | null -> () + | bt -> tb.SetParent(transType bt)) + + // phase 2 - emit member definitions + providedTypeDefinitionsT |> iterateTypes (fun tb ptdT -> + match ptdT with + | None -> () + | Some ptdT -> + for cinfo in ptdT.GetConstructors(bindAll) do + match cinfo with + | :? ProvidedConstructor as pcinfo when not (ctorMap.ContainsKey pcinfo) -> + let cb = + if pcinfo.IsTypeInitializer then + if (cinfo.GetParameters()).Length <> 0 then failwith "Type initializer should not have parameters" + tb.DefineTypeInitializer() + else + let cb = tb.DefineConstructor(cinfo.Attributes, [| for p in cinfo.GetParameters() -> transType p.ParameterType |]) + for (i,p) in cinfo.GetParameters() |> Seq.mapi (fun i x -> (i,x)) do + cb.DefineParameter(i+1, ParameterAttributes.None, p.Name) |> ignore + cb + ctorMap.[pcinfo] <- cb + | _ -> () + + if ptdT.IsEnum then + tb.DefineField("value__", transType (ptdT.GetEnumUnderlyingType()), FieldAttributes.Public ||| FieldAttributes.SpecialName ||| FieldAttributes.RTSpecialName) + |> ignore + + for finfo in ptdT.GetFields(bindAll) do + match finfo with + | :? ProvidedField as pinfo -> + let fb = tb.DefineField(finfo.Name, transType finfo.FieldType, finfo.Attributes) + + if finfo.IsLiteral then + fb.SetConstant (pinfo.GetRawConstantValue()) + + defineCustomAttrs fb.SetCustomAttribute (pinfo.GetCustomAttributesData()) + + fieldMap.[finfo] <- fb + + | _ -> () + + for minfo in ptdT.GetMethods(bindAll) do + match minfo with + | :? ProvidedMethod as pminfo when not (methMap.ContainsKey pminfo) -> + let mb = tb.DefineMethod(minfo.Name, minfo.Attributes, transType minfo.ReturnType, [| for p in minfo.GetParameters() -> transType p.ParameterType |]) + + for (i, p) in minfo.GetParameters() |> Seq.mapi (fun i x -> (i,x :?> ProvidedParameter)) do + + let pb = mb.DefineParameter(i+1, p.Attributes, p.Name) + if p.HasDefaultParameterValue then + let ctor = typeof.GetConstructor([|typeof|]) + let ca = mkILCustomAttribMethRef (transCtorSpec ctor, [p.RawDefaultValue], [], []) + pb.SetCustomAttribute ca + + let ctor = typeof.GetConstructor([||]) + let ca = mkILCustomAttribMethRef (transCtorSpec ctor, [], [], []) + pb.SetCustomAttribute ca + + pb.SetConstant p.RawDefaultValue + + methMap.[pminfo] <- mb + + | _ -> () + + for ityp in ptdT.GetInterfaces() do + tb.AddInterfaceImplementation (transType ityp)) + + // phase 3 - emit member code + providedTypeDefinitionsT |> iterateTypes (fun tb ptdT -> + match ptdT with + | None -> () + | Some ptdT -> + + defineCustomAttrs tb.SetCustomAttribute (ptdT.GetCustomAttributesData()) + + // Allow at most one constructor, and use its arguments as the fields of the type + let ctors = + ptdT.GetConstructors(bindAll) // exclude type initializer + |> Seq.choose (function :? ProvidedConstructor as pcinfo when not pcinfo.IsTypeInitializer -> Some pcinfo | _ -> None) + |> Seq.toList + + let implictCtorArgs = + match ctors |> List.filter (fun x -> x.IsImplicitConstructor) with + | [] -> [] + | [ pcinfo ] -> [ for p in pcinfo.GetParameters() -> p ] + | _ -> failwith "at most one implicit constructor allowed" + + let implicitCtorArgsAsFields = + [ for ctorArg in implictCtorArgs -> + tb.DefineField(ctorArg.Name, transType ctorArg.ParameterType, FieldAttributes.Private) ] + + + // Emit the constructor (if any) + for pcinfo in ctors do + assert ctorMap.ContainsKey pcinfo + if not pcinfo.BelongsToTargetModel then failwithf "expected '%O' to be a target ProvidedConstructor. Please report this bug to https://github.com/fsprojects/FSharp.TypeProviders.SDK/issues" pcinfo + let cb = ctorMap.[pcinfo] + + defineCustomAttrs cb.SetCustomAttribute (pcinfo.GetCustomAttributesData()) + + let ilg = cb.GetILGenerator() + let ctorLocals = Dictionary() + let parameterVars = + [| yield Var("this", pcinfo.DeclaringType) + for p in pcinfo.GetParameters() do + yield Var(p.Name, p.ParameterType) |] + + let codeGen = CodeGenerator(assemblyMainModule, genUniqueTypeName, implicitCtorArgsAsFields, convTypeToTgt, transType, transFieldSpec, transMeth, transMethRef, transCtorSpec, ilg, ctorLocals, parameterVars) + + let parameters = [ for v in parameterVars -> Expr.Var v ] + + match pcinfo.BaseCall with + | None -> + ilg.Emit(I_ldarg 0) + let cinfo = ptdT.BaseType.GetConstructor(bindAll, null, [| |], null) + ilg.Emit(mkNormalCall (transCtorSpec cinfo)) + | Some f -> + // argExprs should always include 'this' + let (cinfo,argExprs) = f parameters + for argExpr in argExprs do + codeGen.EmitExpr (ExpectedStackState.Value, argExpr) + ilg.Emit(mkNormalCall (transCtorSpec cinfo)) + + if pcinfo.IsImplicitConstructor then + for ctorArgsAsFieldIdx,ctorArgsAsField in List.mapi (fun i x -> (i,x)) implicitCtorArgsAsFields do + ilg.Emit(I_ldarg 0) + ilg.Emit(I_ldarg (ctorArgsAsFieldIdx+1)) + ilg.Emit(I_stfld (ILAlignment.Aligned, ILVolatility.Nonvolatile, ctorArgsAsField.FormalFieldSpec)) + else + let code = pcinfo.GetInvokeCode parameters + codeGen.EmitExpr (ExpectedStackState.Empty, code) + ilg.Emit(I_ret) + + match ptdT.GetConstructors(bindAll) |> Seq.tryPick (function :? ProvidedConstructor as pc when pc.IsTypeInitializer -> Some pc | _ -> None) with + | None -> () + | Some pc -> + let cb = ctorMap.[pc] + let ilg = cb.GetILGenerator() + + defineCustomAttrs cb.SetCustomAttribute (pc.GetCustomAttributesData()) + + let expr = pc.GetInvokeCode [ ] + let ctorLocals = new Dictionary<_, _>() + let codeGen = CodeGenerator(assemblyMainModule, genUniqueTypeName, implicitCtorArgsAsFields, convTypeToTgt, transType, transFieldSpec, transMeth, transMethRef, transCtorSpec, ilg, ctorLocals, [| |]) + codeGen.EmitExpr (ExpectedStackState.Empty, expr) + ilg.Emit I_ret + + // Emit the methods + for minfo in ptdT.GetMethods(bindAll) do + match minfo with + | :? ProvidedMethod as pminfo -> + if not pminfo.BelongsToTargetModel then failwithf "expected '%O' to be a target ProvidedMethod. Please report this bug to https://github.com/fsprojects/FSharp.TypeProviders.SDK/issues" pminfo + let mb = methMap.[pminfo] + let ilg = mb.GetILGenerator() + defineCustomAttrs mb.SetCustomAttribute (pminfo.GetCustomAttributesData()) + + let parameterVars = + [| if not pminfo.IsStatic then + yield Var("this", pminfo.DeclaringType) + for p in pminfo.GetParameters() do + yield Var(p.Name, p.ParameterType) |] + let parameters = + [ for v in parameterVars -> Expr.Var v ] + + let expr = pminfo.GetInvokeCode parameters + + let methLocals = Dictionary() + + let expectedState = if (transType minfo.ReturnType = ILType.Void) then ExpectedStackState.Empty else ExpectedStackState.Value + let codeGen = CodeGenerator(assemblyMainModule, genUniqueTypeName, implicitCtorArgsAsFields, convTypeToTgt, transType, transFieldSpec, transMeth, transMethRef, transCtorSpec, ilg, methLocals, parameterVars) + codeGen.EmitExpr (expectedState, expr) + ilg.Emit I_ret + | _ -> () + + for (bodyMethInfo,declMethInfo) in ptdT.GetMethodOverrides() do + let bodyMethBuilder = methMap.[bodyMethInfo] + tb.DefineMethodOverride + { Overrides = OverridesSpec(transMethRef declMethInfo, transType declMethInfo.DeclaringType) + OverrideBy = bodyMethBuilder.FormalMethodSpec } + + for evt in ptdT.GetEvents(bindAll) |> Seq.choose (function :? ProvidedEvent as pe -> Some pe | _ -> None) do + if not evt.BelongsToTargetModel then failwithf "expected '%O' to be a target ProvidedEvent. Please report this bug to https://github.com/fsprojects/FSharp.TypeProviders.SDK/issues" evt + let eb = tb.DefineEvent(evt.Name, evt.Attributes) + defineCustomAttrs eb.SetCustomAttribute (evt.GetCustomAttributesData()) + eb.SetAddOnMethod(methMap.[evt.GetAddMethod(true) :?> _]) + eb.SetRemoveOnMethod(methMap.[evt.GetRemoveMethod(true) :?> _]) + + for pinfo in ptdT.GetProperties(bindAll) |> Seq.choose (function :? ProvidedProperty as pe -> Some pe | _ -> None) do + + let pb = tb.DefineProperty(pinfo.Name, pinfo.Attributes, transType pinfo.PropertyType, [| for p in pinfo.GetIndexParameters() -> transType p.ParameterType |]) + + defineCustomAttrs pb.SetCustomAttribute (pinfo.GetCustomAttributesData()) + + if pinfo.CanRead then + let minfo = pinfo.GetGetMethod(true) + pb.SetGetMethod (methMap.[minfo :?> ProvidedMethod ]) + + if pinfo.CanWrite then + let minfo = pinfo.GetSetMethod(true) + pb.SetSetMethod (methMap.[minfo :?> ProvidedMethod ])) + + //printfn "saving generated binary to '%s'" assemblyFileName + assemblyBuilder.Save () + //printfn "re-reading generated binary from '%s'" assemblyFileName + let reader = ILModuleReaderAfterReadingAllBytes(assemblyFileName, ilg) +#if DEBUG + printfn "generated binary is at '%s'" assemblyFileName +#else + File.Delete assemblyFileName +#endif + let bytes = reader.Bytes + + // Use a real Reflection Load when running in F# Interactive + if isHostedExecution then + let realTargetAssembly = Assembly.Load(bytes) + for (ptdT,_) in providedTypeDefinitionsT do + ptdT.SetAssemblyInternal (K realTargetAssembly) + + bytes + + +#endif // NO_GENERATIVE + +//------------------------------------------------------------------------------------------------- +// TypeProviderForNamespaces + +namespace ProviderImplementation.ProvidedTypes + + #nowarn "1182" + open System + open System.Diagnostics + open System.IO + open System.Collections.Concurrent + open System.Collections.Generic + open System.Reflection + + open Microsoft.FSharp.Quotations + open Microsoft.FSharp.Quotations.DerivedPatterns + open Microsoft.FSharp.Quotations.Patterns + open Microsoft.FSharp.Quotations.ExprShape + open Microsoft.FSharp.Core.CompilerServices + open Microsoft.FSharp.Reflection + + open ProviderImplementation.ProvidedTypes + open ProviderImplementation.ProvidedTypes.AssemblyReader + open ProviderImplementation.ProvidedTypes.UncheckedQuotations + + type TypeProviderForNamespaces(config: TypeProviderConfig, namespacesAndTypes: list<(string * list)>, assemblyReplacementMap: (string*string) list, sourceAssemblies: Assembly list) as this = + + let ctxt = ProvidedTypesContext.Create (config, assemblyReplacementMap, sourceAssemblies) + + +#if !NO_GENERATIVE + let theTable = ConcurrentDictionary() + + // When using hosted execution (i.e. in F# Interactive), ensure the generated assembly for a generated type is + // actually fully compiled and loaded as a reflection-load assembly before handing the type back to the API. + let ensureCompiled (t: Type) = + match t with + | :? ProvidedTypeDefinition as pt when pt.IsErased || pt.GetStaticParametersInternal().Length > 0 || not config.IsHostedExecution -> t + | _ -> + let origAssembly = t.Assembly + + // We expect the results reported by t.Assembly to actually change after this call, because the act of compilation + // when isHostedExecution=true replaces the Assembly object reported. + (this :> ITypeProvider).GetGeneratedAssemblyContents(origAssembly) |> ignore + + //printfn "t.Assembly = %O" t.Assembly + //printfn "t.Assembly.Location = %O" t.Assembly.Location + //printfn "t.FullName = %O" t.FullName + //printfn "t.Assembly.GetTypes() = %A" (t.Assembly.GetTypes()) + let tyName = t.FullName.Replace(",","\\,") + let newAssembly = t.Assembly + let newAssemblyName = newAssembly.GetName().Name + let origAssemblyName = origAssembly.GetName().Name + // check the assembly was generated with the correct name + if newAssemblyName <> origAssemblyName then + failwithf "expected identical assembly name keys '%s' and '%s'" origAssemblyName newAssemblyName + + // check the type really exists + if t.Assembly.GetType(tyName) = null then + failwithf "couldn't find type '%s' in assembly '%O'" tyName t.Assembly + + t + +#else + let ensureCompiled (t: Type) = t +#endif + + let makeProvidedNamespace (namespaceName:string) (typesSrc:ProvidedTypeDefinition list) = + let typesSrc = [| for ty in typesSrc -> ty :> Type |] + let nsSrc = + { new IProvidedNamespace with + member __.GetNestedNamespaces() = [| |] + member __.NamespaceName = namespaceName + member __.GetTypes() = typesSrc |> Array.map ensureCompiled + member __.ResolveTypeName typeName = typesSrc |> Array.tryFind (fun ty -> ty.Name = typeName) |> Option.map ensureCompiled |> Option.toObj } + let nsT = ctxt.ConvertSourceNamespaceToTarget nsSrc + nsT + + let namespacesT = ResizeArray() + + do for (namespaceName,types) in namespacesAndTypes do + namespacesT.Add (makeProvidedNamespace namespaceName types) + + let invalidateE = new Event() + + let disposing = Event() + + +#if !FX_NO_LOCAL_FILESYSTEM + let probingFolders = ResizeArray() + let handler = ResolveEventHandler(fun _ args -> this.ResolveAssembly(args)) + do AppDomain.CurrentDomain.add_AssemblyResolve handler +#endif + + new (config, namespaceName, types, ?sourceAssemblies, ?assemblyReplacementMap) = + let sourceAssemblies = defaultArg sourceAssemblies [ Assembly.GetCallingAssembly() ] + let assemblyReplacementMap = defaultArg assemblyReplacementMap [] + new TypeProviderForNamespaces(config, [(namespaceName,types)], assemblyReplacementMap=assemblyReplacementMap, sourceAssemblies=sourceAssemblies) + + new (config, ?sourceAssemblies, ?assemblyReplacementMap) = + let sourceAssemblies = defaultArg sourceAssemblies [ Assembly.GetCallingAssembly() ] + let assemblyReplacementMap = defaultArg assemblyReplacementMap [] + new TypeProviderForNamespaces(config, [], assemblyReplacementMap=assemblyReplacementMap, sourceAssemblies=sourceAssemblies) + + member __.TargetContext = ctxt + + [] + member __.Disposing = disposing.Publish + +#if FX_NO_LOCAL_FILESYSTEM + + interface IDisposable with + member x.Dispose() = + disposing.Trigger(x, EventArgs.Empty) + +#else + + abstract member ResolveAssembly: args: ResolveEventArgs -> Assembly + + default __.ResolveAssembly(args) = + let expectedName = (AssemblyName(args.Name)).Name + ".dll" + let expectedLocationOpt = + probingFolders + |> Seq.map (fun f -> Path.Combine(f, expectedName)) + |> Seq.tryFind File.Exists + match expectedLocationOpt with + | Some f -> Assembly.LoadFrom f + | None -> null + + member __.RegisterProbingFolder (folder) = + // use GetFullPath to ensure that folder is valid + ignore(Path.GetFullPath folder) + probingFolders.Add folder + + member __.RegisterRuntimeAssemblyLocationAsProbingFolder (config: TypeProviderConfig) = + config.RuntimeAssembly + |> Path.GetDirectoryName + |> this.RegisterProbingFolder + + interface IDisposable with + member x.Dispose() = + disposing.Trigger(x, EventArgs.Empty) + AppDomain.CurrentDomain.remove_AssemblyResolve handler +#endif + + member __.AddNamespace (namespaceName, types) = namespacesT.Add (makeProvidedNamespace namespaceName types) + + member __.Namespaces = namespacesT.ToArray() + + member this.Invalidate() = invalidateE.Trigger(this,EventArgs()) + + member __.GetStaticParametersForMethod(mb: MethodBase) = + match mb with + | :? ProvidedMethod as t -> t.GetStaticParametersInternal() + | _ -> [| |] + + member __.ApplyStaticArgumentsForMethod(mb: MethodBase, mangledName, objs) = + match mb with + | :? ProvidedMethod as t -> t.ApplyStaticArguments(mangledName, objs) :> MethodBase + | _ -> failwithf "ApplyStaticArguments: static parameters for method %s are unexpected. Please report this bug to https://github.com/fsprojects/FSharp.TypeProviders.SDK/issues" mb.Name + + interface ITypeProvider with + + [] + member __.Invalidate = invalidateE.Publish + + member __.GetNamespaces() = namespacesT.ToArray() + + member __.GetInvokerExpression(methodBaseT, parametersT) = + + /// This checks that the GetInvokeCodeInternal doesn't return things containing calls to other provided methods or constructors. + let rec check expr = + match expr with + | NewObject((:? ProvidedConstructor), _) + | Call(_, :? ProvidedMethod, _) -> failwithf "The invokeCode for a ProvidedConstructor or ProvidedMethod included a use or another ProvidedConstructor or ProvidedMethod '%A'. This is not allowed. Instead, the invokeCode should be the compiled representation without invoking other provided objects" expr + | ShapeCombinationUnchecked(shape, args) -> RebuildShapeCombinationUnchecked(shape, List.map check args) + | ShapeVarUnchecked v -> Expr.Var v + | ShapeLambdaUnchecked(v, body) -> Expr.Lambda(v, check body) + + match methodBaseT with + | :? ProvidedMethod as mT when (match methodBaseT.DeclaringType with :? ProvidedTypeDefinition as pt -> pt.IsErased | _ -> true) -> + let exprT = mT.GetInvokeCode(Array.toList parametersT) + check exprT + + | :? ProvidedConstructor as mT when (match methodBaseT.DeclaringType with :? ProvidedTypeDefinition as pt -> pt.IsErased | _ -> true) -> + let exprT = mT.GetInvokeCode(Array.toList parametersT) + check exprT + + // Otherwise, assume this is a generative assembly and just emit a call to the constructor or method + | :? ConstructorInfo as cinfoT -> + Expr.NewObjectUnchecked(cinfoT, Array.toList parametersT) + + | :? MethodInfo as minfoT -> + if minfoT.IsStatic then + Expr.CallUnchecked(minfoT, Array.toList parametersT) + else + Expr.CallUnchecked(parametersT.[0], minfoT, Array.toList parametersT.[1..]) + + | _ -> failwith ("TypeProviderForNamespaces.GetInvokerExpression: not a ProvidedMethod/ProvidedConstructor/ConstructorInfo/MethodInfo, name=" + methodBaseT.Name + " class=" + methodBaseT.GetType().FullName) + + member __.GetStaticParameters(ty) = + match ty with + | :? ProvidedTypeDefinition as t -> + if ty.Name = t.Name then + t.GetStaticParametersInternal() + else + [| |] + | _ -> [| |] + + member __.ApplyStaticArguments(ty, typePathAfterArguments:string[], objs) = + let typePathAfterArguments = typePathAfterArguments.[typePathAfterArguments.Length-1] + match ty with + | :? ProvidedTypeDefinition as t -> + let ty = (t.ApplyStaticArguments(typePathAfterArguments, objs) :> Type) + ensureCompiled ty + + | _ -> failwithf "ApplyStaticArguments: static params for type %s are unexpected, it is not a provided type definition. Please report this bug to https://github.com/fsprojects/FSharp.TypeProviders.SDK/issues" ty.FullName + + member __.GetGeneratedAssemblyContents(assembly:Assembly) = +#if NO_GENERATIVE + ignore assembly; failwith "no generative assemblies" +#else + //printfn "looking up assembly '%s'" assembly.FullName + let key = assembly.GetName().Name + match theTable.TryGetValue key with + | true,bytes -> bytes + | _ -> + let bytes = + match assembly with + | :? ProvidedAssembly as targetAssembly -> AssemblyCompiler(targetAssembly, ctxt).Compile(config.IsHostedExecution) + | _ -> File.ReadAllBytes assembly.ManifestModule.FullyQualifiedName + theTable.[key] <- bytes + bytes + +#if !NO_GENERATIVE + member __.RegisterGeneratedTargetAssembly (fileName:string) = + let assemblyBytes = File.ReadAllBytes fileName + //printfn "registering assembly in '%s'" fileName + let assembly = + if config.IsHostedExecution then + Assembly.Load(assemblyBytes) // we need a real on-disk assembly + else + ctxt.ReadRelatedAssembly(fileName) + ctxt.AddTargetAssembly(assembly.GetName(), assembly) + let key = assembly.GetName().Name + theTable.[key] <- assemblyBytes + assembly + +#endif +#endif + diff --git a/tests/EndToEndBuildTests/ProvidedTypes/ProvidedTypes.fsi b/tests/EndToEndBuildTests/ProvidedTypes/ProvidedTypes.fsi new file mode 100644 index 00000000000..f822c21eafe --- /dev/null +++ b/tests/EndToEndBuildTests/ProvidedTypes/ProvidedTypes.fsi @@ -0,0 +1,543 @@ +// Copyright (c) Microsoft Corporation 2005-2014 and other contributors. +// This sample code is provided "as is" without warranty of any kind. +// We disclaim all warranties, either express or implied, including the +// warranties of merchantability and fitness for a particular purpose. +// +// This file contains a set of helper types and methods for providing types in an implementation +// of ITypeProvider. +// +// This code has been modified and is appropriate for use in conjunction with the F# 3.0-4.0 releases + + +namespace ProviderImplementation.ProvidedTypes + + open System + open System.Collections.Generic + open System.Reflection + open System.Linq.Expressions + open Microsoft.FSharp.Quotations + open Microsoft.FSharp.Core.CompilerServices + + /// Represents an erased provided parameter + [] + type ProvidedParameter = + inherit ParameterInfo + + /// Create a new provided parameter. + new : parameterName: string * parameterType: Type * ?isOut: bool * ?optionalValue: obj -> ProvidedParameter + + /// Indicates if the parameter is marked as ParamArray + member IsParamArray: bool with set + + /// Indicates if the parameter is marked as ReflectedDefinition + member IsReflectedDefinition: bool with set + + /// Indicates if the parameter has a default value + member HasDefaultParameterValue: bool + + /// Add a custom attribute to the provided parameter. + member AddCustomAttribute: CustomAttributeData -> unit + + /// Represents a provided static parameter. + [] + type ProvidedStaticParameter = + inherit ParameterInfo + + /// Create a new provided static parameter, for use with DefineStaticParamaeters on a provided type definition. + new: parameterName: string * parameterType: Type * ?parameterDefaultValue: obj -> ProvidedStaticParameter + + /// Add XML documentation information to this provided constructor + member AddXmlDoc: xmlDoc: string -> unit + + /// Add XML documentation information to this provided constructor, where the computation of the documentation is delayed until necessary + member AddXmlDocDelayed: xmlDocFunction: (unit -> string) -> unit + + + /// Represents an erased provided constructor. + [] + type ProvidedConstructor = + inherit ConstructorInfo + + /// When making a cross-targeting type provider, use this method instead of the ProvidedConstructor constructor from ProvidedTypes + new: parameters: ProvidedParameter list * invokeCode: (Expr list -> Expr) -> ProvidedConstructor + + /// Add a 'Obsolete' attribute to this provided constructor + member AddObsoleteAttribute: message: string * ?isError: bool -> unit + + /// Add XML documentation information to this provided constructor + member AddXmlDoc: xmlDoc: string -> unit + + /// Add XML documentation information to this provided constructor, where the computation of the documentation is delayed until necessary + member AddXmlDocDelayed: xmlDocFunction: (unit -> string) -> unit + + /// Add XML documentation information to this provided constructor, where the documentation is re-computed every time it is required. + member AddXmlDocComputed: xmlDocFunction: (unit -> string) -> unit + + /// Set the target and arguments of the base constructor call. Only used for generated types. + member BaseConstructorCall: (Expr list -> ConstructorInfo * Expr list) with set + + /// Set a flag indicating that the constructor acts like an F# implicit constructor, so the + /// parameters of the constructor become fields and can be accessed using Expr.GlobalVar with the + /// same name. + member IsImplicitConstructor: bool with get,set + + /// Add definition location information to the provided constructor. + member AddDefinitionLocation: line:int * column:int * filePath:string -> unit + + member IsTypeInitializer: bool with get,set + + /// This method is for internal use only in the type provider SDK + member internal GetInvokeCode: Expr list -> Expr + + + + [] + type ProvidedMethod = + inherit MethodInfo + + /// When making a cross-targeting type provider, use this method instead of the ProvidedMethod constructor from ProvidedTypes + new: methodName: string * parameters: ProvidedParameter list * returnType: Type * invokeCode: (Expr list -> Expr) * ?isStatic: bool -> ProvidedMethod + + /// Add XML documentation information to this provided method + member AddObsoleteAttribute: message: string * ?isError: bool -> unit + + /// Add XML documentation information to this provided constructor + member AddXmlDoc: xmlDoc: string -> unit + + /// Add XML documentation information to this provided constructor, where the computation of the documentation is delayed until necessary + member AddXmlDocDelayed: xmlDocFunction: (unit -> string) -> unit + + /// Add XML documentation information to this provided constructor, where the computation of the documentation is delayed until necessary + /// The documentation is re-computed every time it is required. + member AddXmlDocComputed: xmlDocFunction: (unit -> string) -> unit + + member AddMethodAttrs: attributes:MethodAttributes -> unit + + /// Set the method attributes of the method. By default these are simple 'MethodAttributes.Public' + member SetMethodAttrs: attributes:MethodAttributes -> unit + + /// Add definition location information to the provided type definition. + member AddDefinitionLocation: line:int * column:int * filePath:string -> unit + + /// Add a custom attribute to the provided method definition. + member AddCustomAttribute: CustomAttributeData -> unit + + /// Define the static parameters available on a statically parameterized method + member DefineStaticParameters: parameters: ProvidedStaticParameter list * instantiationFunction: (string -> obj[] -> ProvidedMethod) -> unit + + /// This method is for internal use only in the type provider SDK + member internal GetInvokeCode: Expr list -> Expr + + + /// Represents an erased provided property. + [] + type ProvidedProperty = + inherit PropertyInfo + + /// Create a new provided property. It is not initially associated with any specific provided type definition. + new: propertyName: string * propertyType: Type * ?getterCode: (Expr list -> Expr) * ?setterCode: (Expr list -> Expr) * ?isStatic: bool * ?indexParameters: ProvidedParameter list -> ProvidedProperty + + /// Add a 'Obsolete' attribute to this provided property + member AddObsoleteAttribute: message: string * ?isError: bool -> unit + + /// Add XML documentation information to this provided constructor + member AddXmlDoc: xmlDoc: string -> unit + + /// Add XML documentation information to this provided constructor, where the computation of the documentation is delayed until necessary + member AddXmlDocDelayed: xmlDocFunction: (unit -> string) -> unit + + /// Add XML documentation information to this provided constructor, where the computation of the documentation is delayed until necessary + /// The documentation is re-computed every time it is required. + member AddXmlDocComputed: xmlDocFunction: (unit -> string) -> unit + + /// Get or set a flag indicating if the property is static. + member IsStatic: bool + + /// Add definition location information to the provided type definition. + member AddDefinitionLocation: line:int * column:int * filePath:string -> unit + + /// Add a custom attribute to the provided property definition. + member AddCustomAttribute: CustomAttributeData -> unit + + + /// Represents an erased provided property. + [] + type ProvidedEvent = + inherit EventInfo + + /// Create a new provided event. It is not initially associated with any specific provided type definition. + new: eventName: string * eventHandlerType: Type * adderCode: (Expr list -> Expr) * removerCode: (Expr list -> Expr) * ?isStatic: bool -> ProvidedEvent + + /// Add XML documentation information to this provided constructor + member AddXmlDoc: xmlDoc: string -> unit + + /// Add XML documentation information to this provided constructor, where the computation of the documentation is delayed until necessary + member AddXmlDocDelayed: xmlDocFunction: (unit -> string) -> unit + + /// Add XML documentation information to this provided constructor, where the computation of the documentation is delayed until necessary + /// The documentation is re-computed every time it is required. + member AddXmlDocComputed: xmlDocFunction: (unit -> string) -> unit + + /// Get a flag indicating if the property is static. + member IsStatic: bool with get + + /// Add definition location information to the provided type definition. + member AddDefinitionLocation: line:int * column:int * filePath:string -> unit + + + /// Represents an erased provided field. + [] + type ProvidedField = + inherit FieldInfo + + /// Create a new provided field. It is not initially associated with any specific provided type definition. + new: fieldName: string * fieldType: Type -> ProvidedField + + /// Add a 'Obsolete' attribute to this provided field + member AddObsoleteAttribute: message: string * ?isError: bool -> unit + + /// Add XML documentation information to this provided field + member AddXmlDoc: xmlDoc: string -> unit + + /// Add XML documentation information to this provided field, where the computation of the documentation is delayed until necessary + member AddXmlDocDelayed: xmlDocFunction: (unit -> string) -> unit + + /// Add XML documentation information to this provided field, where the computation of the documentation is delayed until necessary + /// The documentation is re-computed every time it is required. + member AddXmlDocComputed: xmlDocFunction: (unit -> string) -> unit + + /// Add definition location information to the provided field definition. + member AddDefinitionLocation: line:int * column:int * filePath:string -> unit + + member SetFieldAttributes: attributes: FieldAttributes -> unit + + /// Create a new provided literal field. It is not initially associated with any specific provided type definition. + static member Literal : fieldName: string * fieldType: Type * literalValue:obj -> ProvidedField + + + /// Represents an array or other symbolic type involving a provided type as the argument. + /// See the type provider spec for the methods that must be implemented. + /// Note that the type provider specification does not require us to implement pointer-equality for provided types. + [] + type ProvidedTypeSymbol = + inherit TypeDelegator + + /// For example, kg + member IsFSharpTypeAbbreviation: bool + + /// For example, int or int + member IsFSharpUnitAnnotated: bool + + /// Helpers to build symbolic provided types + [] + type ProvidedTypeBuilder = + + /// Like typ.MakeGenericType, but will also work with unit-annotated types + static member MakeGenericType: genericTypeDefinition: Type * genericArguments: Type list -> Type + + /// Like methodInfo.MakeGenericMethod, but will also work with unit-annotated types and provided types + static member MakeGenericMethod: genericMethodDefinition: MethodInfo * genericArguments: Type list -> MethodInfo + + /// Like FsharpType.MakeTupleType, but will also work with unit-annotated types and provided types + static member MakeTupleType: args: Type list -> Type + + + /// Helps create erased provided unit-of-measure annotations. + [] + type ProvidedMeasureBuilder = + + /// Gets the measure indicating the "1" unit of measure, that is the unitless measure. + static member One: Type + + /// Returns the measure indicating the product of two units of measure, e.g. kg * m + static member Product: measure1: Type * measure2: Type -> Type + + /// Returns the measure indicating the inverse of two units of measure, e.g. 1 / s + static member Inverse: denominator: Type -> Type + + /// Returns the measure indicating the ratio of two units of measure, e.g. kg / m + static member Ratio: numerator: Type * denominator: Type -> Type + + /// Returns the measure indicating the square of a unit of measure, e.g. m * m + static member Square: ``measure``: Type -> Type + + /// Returns the measure for an SI unit from the F# core library, where the string is in capitals and US spelling, e.g. Meter + static member SI: unitName:string -> Type + + /// Returns a type where the type has been annotated with the given types and/or units-of-measure. + /// e.g. float, Vector + static member AnnotateType: basic: Type * argument: Type list -> Type + + + /// Represents a provided type definition. + [] + type ProvidedTypeDefinition = + inherit TypeDelegator + + /// When making a cross-targeting type provider, use this method instead of the corresponding ProvidedTypeDefinition constructor from ProvidedTypes + new: className: string * baseType: Type option * ?hideObjectMethods: bool * ?nonNullable: bool * ?isErased: bool -> ProvidedTypeDefinition + + /// When making a cross-targeting type provider, use this method instead of the corresponding ProvidedTypeDefinition constructor from ProvidedTypes + new: assembly: Assembly * namespaceName: string * className: string * baseType: Type option * ?hideObjectMethods: bool * ?nonNullable: bool * ?isErased: bool -> ProvidedTypeDefinition + + /// Add the given type as an implemented interface. + member AddInterfaceImplementation: interfaceType: Type -> unit + + /// Add the given function as a set of on-demand computed interfaces. + member AddInterfaceImplementationsDelayed: interfacesFunction:(unit -> Type list)-> unit + + /// Specifies that the given method body implements the given method declaration. + member DefineMethodOverride: methodInfoBody: ProvidedMethod * methodInfoDeclaration: MethodInfo -> unit + + /// Specifies that the given method bodies implement the given method declarations + member DefineMethodOverridesDelayed: (unit -> (ProvidedMethod * MethodInfo) list) -> unit + + /// Add a 'Obsolete' attribute to this provided type definition + member AddObsoleteAttribute: message: string * ?isError: bool -> unit + + /// Add XML documentation information to this provided constructor + member AddXmlDoc: xmlDoc: string -> unit + + /// Set the base type + member SetBaseType: Type -> unit + + /// Set the base type to a lazily evaluated value. Use this to delay realization of the base type as late as possible. + member SetBaseTypeDelayed: baseTypeFunction:(unit -> Type) -> unit + + /// Set underlying type for generated enums + member SetEnumUnderlyingType: Type -> unit + + /// Add XML documentation information to this provided constructor, where the computation of the documentation is delayed until necessary. + /// The documentation is only computed once. + member AddXmlDocDelayed: xmlDocFunction: (unit -> string) -> unit + + /// Add XML documentation information to this provided constructor, where the computation of the documentation is delayed until necessary + /// The documentation is re-computed every time it is required. + member AddXmlDocComputed: xmlDocFunction: (unit -> string) -> unit + + /// Set the attributes on the provided type. This fully replaces the default TypeAttributes. + member SetAttributes: TypeAttributes -> unit + + /// Add a method, property, nested type or other member to a ProvidedTypeDefinition + member AddMember: memberInfo:MemberInfo -> unit + + /// Add a set of members to a ProvidedTypeDefinition + member AddMembers: memberInfos:list<#MemberInfo> -> unit + + /// Add a member to a ProvidedTypeDefinition, delaying computation of the members until required by the compilation context. + member AddMemberDelayed: memberFunction:(unit -> #MemberInfo) -> unit + + /// Add a set of members to a ProvidedTypeDefinition, delaying computation of the members until required by the compilation context. + member AddMembersDelayed: membersFunction:(unit -> list<#MemberInfo>) -> unit + + /// Add the types of the generated assembly as generative types, where types in namespaces get hierarchically positioned as nested types. + member AddAssemblyTypesAsNestedTypesDelayed: assemblyFunction:(unit -> Assembly) -> unit + + /// Define the static parameters available on a statically parameterized type + member DefineStaticParameters: parameters: ProvidedStaticParameter list * instantiationFunction: (string -> obj[] -> ProvidedTypeDefinition) -> unit + + /// Add definition location information to the provided type definition. + member AddDefinitionLocation: line:int * column:int * filePath:string -> unit + + /// Suppress Object entries in intellisense menus in instances of this provided type + member HideObjectMethods: bool + + /// Disallows the use of the null literal. + member NonNullable: bool + + /// Get a flag indicating if the ProvidedTypeDefinition is erased + member IsErased: bool + + /// Get or set a flag indicating if the ProvidedTypeDefinition has type-relocation suppressed + [] + member SuppressRelocation: bool with get,set + + // This method is used by Debug.fs + member ApplyStaticArguments: name:string * args:obj[] -> ProvidedTypeDefinition + + /// Add a custom attribute to the provided type definition. + member AddCustomAttribute: CustomAttributeData -> unit + + /// Emulate the F# type provider type erasure mechanism to get the + /// actual (erased) type. We erase ProvidedTypes to their base type + /// and we erase array of provided type to array of base type. In the + /// case of generics all the generic type arguments are also recursively + /// replaced with the erased-to types + static member EraseType: typ:Type -> Type + + /// Get or set a utility function to log the creation of root Provided Type. Used to debug caching/invalidation. + static member Logger: (string -> unit) option ref + + +#if !NO_GENERATIVE + /// A provided generated assembly + type ProvidedAssembly = + + inherit Assembly + + /// Create a provided generated assembly + new: assemblyName: AssemblyName * assemblyFileName:string -> ProvidedAssembly + + /// Create a provided generated assembly using a temporary file as the interim assembly storage + new: unit -> ProvidedAssembly + + /// Emit the given provided type definitions as part of the assembly + /// and adjust the 'Assembly' property of all provided type definitions to return that + /// assembly. + /// + /// The assembly is only emitted when the Assembly property on the root type is accessed for the first time. + /// The host F# compiler does this when processing a generative type declaration for the type. + member AddTypes: types: ProvidedTypeDefinition list -> unit + + /// + /// Emit the given nested provided type definitions as part of the assembly. + /// and adjust the 'Assembly' property of all provided type definitions to return that + /// assembly. + /// + /// A path of type names to wrap the generated types. The generated types are then generated as nested types. + member AddNestedTypes: types: ProvidedTypeDefinition list * enclosingGeneratedTypeNames: string list -> unit + +#endif + + + + [] + /// Represents the context for which code is to be generated. Normally you should not need to use this directly. + type ProvidedTypesContext = + + /// Try to find the given target assembly in the context + member TryBindAssemblyNameToTarget: aref: AssemblyName -> Choice + + /// Try to find the given target assembly in the context + member TryBindSimpleAssemblyNameToTarget: assemblyName: string -> Choice + + /// Get the list of referenced assemblies determined by the type provider configuration + member ReferencedAssemblyPaths: string list + + /// Get the resolved referenced assemblies determined by the type provider configuration + member GetTargetAssemblies : unit -> Assembly[] + + /// Get the set of design-time assemblies available to use as a basis for authoring provided types. + member GetSourceAssemblies : unit -> Assembly[] + + /// Add an assembly to the set of design-time assemblies available to use as a basis for authoring provided types + member AddSourceAssembly : Assembly -> unit + + /// Try to get the version of FSharp.Core referenced. May raise an exception if FSharp.Core has not been correctly resolved + member FSharpCoreAssemblyVersion: Version + + /// Returns a type from the referenced assemblies that corresponds to the given design-time type. Normally + /// this method should not be used directly when authoring a type provider. + member ConvertSourceTypeToTarget: Type -> Type + + /// Returns the design-time type that corresponds to the given type from the target referenced assemblies. Normally + /// this method should not be used directly when authoring a type provider. + member ConvertTargetTypeToSource: Type -> Type + + /// Returns a quotation rebuilt with resepct to the types from the target referenced assemblies. Normally + /// this method should not be used directly when authoring a type provider. + member ConvertSourceExprToTarget: Expr -> Expr + + /// Read the assembly related to this context + member ReadRelatedAssembly: fileName: string -> Assembly + + /// Read the assembly related to this context + member ReadRelatedAssembly: bytes: byte[] -> Assembly + + /// A base type providing default implementations of type provider functionality. + type TypeProviderForNamespaces = + + /// Initializes a type provider to provide the types in the given namespace. + /// + /// Optionally specify the design-time assemblies available to use as a basis for authoring provided types. + /// The transitive dependencies of these assemblies are also included. By default + /// Assembly.GetCallingAssembly() and its transitive dependencies are used. + /// + /// + /// + /// Optionally specify a map of assembly names from source model to referenced assemblies. + /// + new: config: TypeProviderConfig * namespaceName:string * types: ProvidedTypeDefinition list * ?sourceAssemblies: Assembly list * ?assemblyReplacementMap: (string * string) list -> TypeProviderForNamespaces + + /// Initializes a type provider. + /// + /// Optionally specify the design-time assemblies available to use as a basis for authoring provided types. + /// The transitive dependencies of these assemblies are also included. By default + /// Assembly.GetCallingAssembly() and its transitive dependencies are used. + /// + /// + /// + /// Optionally specify a map of assembly names from source model to referenced assemblies. + /// + new: config: TypeProviderConfig * ?sourceAssemblies: Assembly list * ?assemblyReplacementMap: (string * string) list -> TypeProviderForNamespaces + + /// Invoked by the type provider to add a namespace of provided types in the specification of the type provider. + member AddNamespace: namespaceName:string * types: ProvidedTypeDefinition list -> unit + + /// Invoked by the type provider to get all provided namespaces with their provided types. + member Namespaces: IProvidedNamespace[] + + /// Invoked by the type provider to invalidate the information provided by the provider + member Invalidate: unit -> unit + + /// Invoked by the host of the type provider to get the static parameters for a method. + member GetStaticParametersForMethod: MethodBase -> ParameterInfo[] + + /// Invoked by the host of the type provider to apply the static argumetns for a method. + member ApplyStaticArgumentsForMethod: MethodBase * string * obj[] -> MethodBase + +#if !FX_NO_LOCAL_FILESYSTEM + /// AssemblyResolve handler. Default implementation searches .dll file in registered folders + abstract ResolveAssembly: ResolveEventArgs -> Assembly + default ResolveAssembly: ResolveEventArgs -> Assembly + + /// Registers custom probing path that can be used for probing assemblies + member RegisterProbingFolder: folder: string -> unit + + /// Registers location of RuntimeAssembly (from TypeProviderConfig) as probing folder + member RegisterRuntimeAssemblyLocationAsProbingFolder: config: TypeProviderConfig -> unit + +#endif + +#if !NO_GENERATIVE + /// Register that a given file is a provided generated target assembly, e.g. an assembly produced by an external + /// code generation tool. This assembly should be a target assembly, i.e. use the same asssembly references + /// as given by TargetContext.ReferencedAssemblyPaths + member RegisterGeneratedTargetAssembly: fileName: string -> Assembly +#endif + + [] + member Disposing: IEvent + + /// The context for which code is eventually to be generated. You should not normally + /// need to use this property directly, as translation from the compiler-hosted context to + /// the design-time context will normally be performed automatically. + member TargetContext: ProvidedTypesContext + + interface ITypeProvider + + + module internal UncheckedQuotations = + + type Expr with + static member NewDelegateUnchecked: ty:Type * vs:Var list * body:Expr -> Expr + static member NewObjectUnchecked: cinfo:ConstructorInfo * args:Expr list -> Expr + static member NewArrayUnchecked: elementType:Type * elements:Expr list -> Expr + static member CallUnchecked: minfo:MethodInfo * args:Expr list -> Expr + static member CallUnchecked: obj:Expr * minfo:MethodInfo * args:Expr list -> Expr + static member ApplicationUnchecked: f:Expr * x:Expr -> Expr + static member PropertyGetUnchecked: pinfo:PropertyInfo * args:Expr list -> Expr + static member PropertyGetUnchecked: obj:Expr * pinfo:PropertyInfo * ?args:Expr list -> Expr + static member PropertySetUnchecked: pinfo:PropertyInfo * value:Expr * ?args:Expr list -> Expr + static member PropertySetUnchecked: obj:Expr * pinfo:PropertyInfo * value:Expr * args:Expr list -> Expr + static member FieldGetUnchecked: pinfo:FieldInfo -> Expr + static member FieldGetUnchecked: obj:Expr * pinfo:FieldInfo -> Expr + static member FieldSetUnchecked: pinfo:FieldInfo * value:Expr -> Expr + static member FieldSetUnchecked: obj:Expr * pinfo:FieldInfo * value:Expr -> Expr + static member TupleGetUnchecked: e:Expr * n:int -> Expr + static member LetUnchecked: v:Var * e:Expr * body:Expr -> Expr + + type Shape + val ( |ShapeCombinationUnchecked|ShapeVarUnchecked|ShapeLambdaUnchecked| ): e:Expr -> Choice<(Shape * Expr list),Var, (Var * Expr)> + val RebuildShapeCombinationUnchecked: Shape * args:Expr list -> Expr + diff --git a/tests/EndToEndBuildTests/ProvidedTypes/readme.md b/tests/EndToEndBuildTests/ProvidedTypes/readme.md new file mode 100644 index 00000000000..49d7cce20d6 --- /dev/null +++ b/tests/EndToEndBuildTests/ProvidedTypes/readme.md @@ -0,0 +1,4 @@ +ProvidedTypes.fs and fs retrieved from: https://github.com/fsprojects/FSharp.TypeProviders.SDK + +For commit Hash: f0c4a6300db313eb2616c4f792cd6ae68c255e56 + diff --git a/tests/FSharp.Build.UnitTests/FSharp.Build.UnitTests.fsproj b/tests/FSharp.Build.UnitTests/FSharp.Build.UnitTests.fsproj new file mode 100644 index 00000000000..93cf3dfa3b6 --- /dev/null +++ b/tests/FSharp.Build.UnitTests/FSharp.Build.UnitTests.fsproj @@ -0,0 +1,102 @@ + + + + + $(MSBuildProjectDirectory)\..\..\src + {400FAB03-786E-40CC-85A8-04B0C2869B14} + true + false + + + + Debug + AnyCPU + 2.0 + true + true + Library + false + FSharp.Build.UnitTests + netcore + + + $(DefineConstants);$(TargetDotnetProfile.ToLower()) + + + true + false + $(DefineConstants);DEBUG;TRACE + prompt + 3 + + + true + $(DefineConstants);TRACE + prompt + 3 + + + + true + True + $(NUnitLibDir)\nunit.framework.dll + + + + + $(FSharpSourcesRoot)\..\packages\Microsoft.Build.Framework.$(MicrosoftBuildFrameworkPackageVersion)\lib\net46\Microsoft.Build.Framework.dll + + + $(FSharpSourcesRoot)\..\packages\Microsoft.Build.$(MicrosoftBuildPackageVersion)\lib\net46\Microsoft.Build.dll + + + $(FSharpSourcesRoot)\..\packages\Microsoft.Build.Utilities.Core.$(MicrosoftBuildUtilitiesCorePackageVersion)\lib\net46\Microsoft.Build.Utilities.Core.dll + + + $(FSharpSourcesRoot)\..\packages\Microsoft.Build.Tasks.Core.$(MicrosoftBuildTasksCorePackageVersion)\lib\net46\Microsoft.Build.Tasks.Core.dll + + + $(FSharpSourcesRoot)\..\packages\Microsoft.Build.Tasks.Core.$(MicrosoftBuildTasksCorePackageVersion)\lib\net46\Microsoft.Build.Tasks.Core.dll + + + $(FSharpSourcesRoot)\..\packages\System.IO.Compression.$(SystemIoCompressionPackageVersion)\lib\net46\System.IO.Compression.dll + + + $(FSharpSourcesRoot)\..\packages\Microsoft.VisualFSharp.Type.Providers.Redist.$(MicrosoftVisualFSharpTypeProvidersRedistPackageVersion)\content\4.3.0.0\FSharp.Data.TypeProviders.dll + + + + + $(FSharpSourcesRoot)\..\packages\Microsoft.Build.Framework.14.3.0\lib\net45\Microsoft.Build.Framework.dll + + + $(FSharpSourcesRoot)\..\packages\Microsoft.Build.14.3.0\lib\net45\Microsoft.Build.dll + + + $(FSharpSourcesRoot)\..\packages\Microsoft.Build.Utilities.Core.14.3.0\lib\net45\Microsoft.Build.Utilities.Core.dll + + + $(FSharpSourcesRoot)\..\packages\Microsoft.Build.Tasks.Core.14.3.0\lib\net45\Microsoft.Build.Tasks.Core.dll + + + + + {702A7979-BCF9-4C41-853E-3ADFC9897890} + FSharp.Build + + + {DED3BBD7-53F4-428A-8C9F-27968E768605} + FSharp.Core + + + + + + + + + + + + + diff --git a/tests/FSharp.Build.UnitTests/NuGet.Config b/tests/FSharp.Build.UnitTests/NuGet.Config new file mode 100644 index 00000000000..0a86752fee0 --- /dev/null +++ b/tests/FSharp.Build.UnitTests/NuGet.Config @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/src/fsharp/FSharp.Build.UnitTests/Program.fs b/tests/FSharp.Build.UnitTests/Program.fs similarity index 100% rename from src/fsharp/FSharp.Build.UnitTests/Program.fs rename to tests/FSharp.Build.UnitTests/Program.fs diff --git a/tests/FSharp.Build.UnitTests/WriteCodeFragmentTests.fs b/tests/FSharp.Build.UnitTests/WriteCodeFragmentTests.fs new file mode 100644 index 00000000000..977c265be01 --- /dev/null +++ b/tests/FSharp.Build.UnitTests/WriteCodeFragmentTests.fs @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace FSharp.Build.UnitTests + +open Microsoft.Build.Framework +open Microsoft.Build.Utilities +open Microsoft.FSharp.Build +open NUnit.Framework + +[] +type WriteCodeFragmentFSharpTests() = + + let verifyAttribute (attributeName:string) (parameters:(string*string) list) (expectedAttributeText:string) = + let taskItem = TaskItem(attributeName) + parameters |> List.iter (fun (key, value) -> taskItem.SetMetadata(key, value)) + let actualAttributeText = WriteCodeFragment.GenerateAttribute (taskItem :> ITaskItem, "f#") + let fullExpectedAttributeText = "[]" + Assert.AreEqual(fullExpectedAttributeText, actualAttributeText) + + [] + member this.``No parameters``() = + verifyAttribute "SomeAttribute" [] "SomeAttribute()" + + [] + member this.``Skipped and out of order positional parameters``() = + verifyAttribute "SomeAttribute" [("_Parameter3", "3"); ("_Parameter5", "5"); ("_Parameter2", "2")] "SomeAttribute(null, \"2\", \"3\", null, \"5\")" + + [] + member this.``Named parameters``() = + verifyAttribute "SomeAttribute" [("One", "1"); ("Two", "2")] "SomeAttribute(One = \"1\", Two = \"2\")" + + [] + member this.``Named and positional parameters``() = + verifyAttribute "SomeAttribute" [("One", "1"); ("_Parameter2", "2.2"); ("Two", "2")] "SomeAttribute(null, \"2.2\", One = \"1\", Two = \"2\")" + + [] + member this.``Escaped string parameters``() = + verifyAttribute "SomeAttribute" [("_Parameter1", "\"uno\"")] "SomeAttribute(\"\\\"uno\\\"\")" + // this should look like: SomeAttribute("\"uno\"") + + +[] +type WriteCodeFragmentCSharpTests() = + + let verifyAttribute (attributeName:string) (parameters:(string*string) list) (expectedAttributeText:string) = + let taskItem = TaskItem(attributeName) + parameters |> List.iter (fun (key, value) -> taskItem.SetMetadata(key, value)) + let actualAttributeText = WriteCodeFragment.GenerateAttribute (taskItem :> ITaskItem, "c#") + let fullExpectedAttributeText = "[assembly: " + expectedAttributeText + "]" + Assert.AreEqual(fullExpectedAttributeText, actualAttributeText) + + [] + member this.``No parameters``() = + verifyAttribute "SomeAttribute" [] "SomeAttribute()" + + [] + member this.``Skipped and out of order positional parameters``() = + verifyAttribute "SomeAttribute" [("_Parameter3", "3"); ("_Parameter5", "5"); ("_Parameter2", "2")] "SomeAttribute(null, \"2\", \"3\", null, \"5\")" + + [] + member this.``Named parameters``() = + verifyAttribute "SomeAttribute" [("One", "1"); ("Two", "2")] "SomeAttribute(One = \"1\", Two = \"2\")" + + [] + member this.``Named and positional parameters``() = + verifyAttribute "SomeAttribute" [("One", "1"); ("_Parameter2", "2.2"); ("Two", "2")] "SomeAttribute(null, \"2.2\", One = \"1\", Two = \"2\")" + + [] + member this.``Escaped string parameters``() = + verifyAttribute "SomeAttribute" [("_Parameter1", "\"uno\"")] "SomeAttribute(\"\\\"uno\\\"\")" + // this should look like: SomeAttribute("\"uno\"") + + +[] +type WriteCodeFragmentVisualBasicTests() = + + let verifyAttribute (attributeName:string) (parameters:(string*string) list) (expectedAttributeText:string) = + let taskItem = TaskItem(attributeName) + parameters |> List.iter (fun (key, value) -> taskItem.SetMetadata(key, value)) + let actualAttributeText = WriteCodeFragment.GenerateAttribute (taskItem :> ITaskItem, "vb") + let fullExpectedAttributeText = "" + Assert.AreEqual(fullExpectedAttributeText, actualAttributeText) + + [] + member this.``No parameters``() = + verifyAttribute "SomeAttribute" [] "SomeAttribute()" + + [] + member this.``Skipped and out of order positional parameters``() = + verifyAttribute "SomeAttribute" [("_Parameter3", "3"); ("_Parameter5", "5"); ("_Parameter2", "2")] "SomeAttribute(null, \"2\", \"3\", null, \"5\")" + + [] + member this.``Named parameters``() = + verifyAttribute "SomeAttribute" [("One", "1"); ("Two", "2")] "SomeAttribute(One = \"1\", Two = \"2\")" + + [] + member this.``Named and positional parameters``() = + verifyAttribute "SomeAttribute" [("One", "1"); ("_Parameter2", "2.2"); ("Two", "2")] "SomeAttribute(null, \"2.2\", One = \"1\", Two = \"2\")" + + [] + member this.``Escaped string parameters``() = + verifyAttribute "SomeAttribute" [("_Parameter1", "\"uno\"")] "SomeAttribute(\"\\\"uno\\\"\")" + // this should look like: SomeAttribute("\"uno\"") + diff --git a/tests/FSharp.Build.UnitTests/project.json b/tests/FSharp.Build.UnitTests/project.json new file mode 100644 index 00000000000..91e95a04872 --- /dev/null +++ b/tests/FSharp.Build.UnitTests/project.json @@ -0,0 +1,34 @@ +{ + "version": "1.0.0-*", + "name": "FSharp.Build.UnitTests", + "buildOptions": { + "debugType": "portable", + "emitEntryPoint": true + }, + "dependencies": { + "nunit": "3.5.0", + "nunitlite": "3.5.0", + "Microsoft.Build": "15.1.548", + "Microsoft.Build.Framework": "15.1.548", + "Microsoft.Build.Tasks.Core": "15.1.548", + "Testing.FSharp.Core": "4.2.4", + "Microsoft.Build.Utilities.Core": "15.1.548" + }, + "runtimes": { + "win7-x86": {}, + "win7-x64": {}, + "osx.10.11-x64": {}, + "ubuntu.14.04-x64": {} + }, + "frameworks": { + "netcoreapp1.0": { + "dependencies": { + "Microsoft.NETCore.App": { + "type": "platform", + "version": "1.0.1" + } + }, + "imports": [ "netstandard1.1", "netstandard1.6", "portable-net45+win8+wp8+wpa81" ] + } + } +} diff --git a/src/fsharp/FSharp.Compiler.Unittests/CompilerTestHelpers.fs b/tests/FSharp.Compiler.UnitTests/CompilerTestHelpers.fs similarity index 89% rename from src/fsharp/FSharp.Compiler.Unittests/CompilerTestHelpers.fs rename to tests/FSharp.Compiler.UnitTests/CompilerTestHelpers.fs index f0570aa93a1..fc60eaa42a7 100644 --- a/src/fsharp/FSharp.Compiler.Unittests/CompilerTestHelpers.fs +++ b/tests/FSharp.Compiler.UnitTests/CompilerTestHelpers.fs @@ -1,4 +1,4 @@ -namespace FSharp.Compiler.Unittests +namespace FSharp.Compiler.UnitTests [] module CompilerTestHelpers = diff --git a/src/fsharp/FSharp.Compiler.Unittests/EditDistance.fs b/tests/FSharp.Compiler.UnitTests/EditDistance.fs similarity index 96% rename from src/fsharp/FSharp.Compiler.Unittests/EditDistance.fs rename to tests/FSharp.Compiler.UnitTests/EditDistance.fs index 5e8d7f7275c..2e12544ebab 100644 --- a/src/fsharp/FSharp.Compiler.Unittests/EditDistance.fs +++ b/tests/FSharp.Compiler.UnitTests/EditDistance.fs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -namespace FSharp.Compiler.Unittests +namespace FSharp.Compiler.UnitTests open System open System.Globalization diff --git a/tests/FSharp.Compiler.UnitTests/FSharp.Compiler.UnitTests.fsproj b/tests/FSharp.Compiler.UnitTests/FSharp.Compiler.UnitTests.fsproj new file mode 100644 index 00000000000..06b8a4b422a --- /dev/null +++ b/tests/FSharp.Compiler.UnitTests/FSharp.Compiler.UnitTests.fsproj @@ -0,0 +1,69 @@ + + + + + $(MSBuildProjectDirectory)\..\..\src + {a8d9641a-9170-4cf4-8fe0-6db8c134e1b5} + + + + AnyCPU + 2.0 + true + true + Library + FSharp.Compiler.UnitTests + + false + false + + + true + false + bin\Debug\ + DEBUG;TRACE + prompt + 3 + + + true + bin\Release\ + TRACE + prompt + 3 + + + + True + $(NUnitLibDir)\nunit.framework.dll + + + + + + + + + ..\..\..\packages\System.ValueTuple.$(SystemValueTuplePackageVersion)\lib\netstandard1.0\System.ValueTuple.dll + + + + + + + + + + + + + FSharp.Compiler.Private + {2e4d67b4-522d-4cf7-97e4-ba940f0b18f3} + + + {DED3BBD7-53F4-428A-8C9F-27968E768605} + FSharp.Core + + + + \ No newline at end of file diff --git a/src/fsharp/FSharp.Compiler.Unittests/HashIfExpression.fs b/tests/FSharp.Compiler.UnitTests/HashIfExpression.fs similarity index 99% rename from src/fsharp/FSharp.Compiler.Unittests/HashIfExpression.fs rename to tests/FSharp.Compiler.UnitTests/HashIfExpression.fs index 005f43c8f9e..7e9139bc30f 100644 --- a/src/fsharp/FSharp.Compiler.Unittests/HashIfExpression.fs +++ b/tests/FSharp.Compiler.UnitTests/HashIfExpression.fs @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -namespace FSharp.Compiler.Unittests +namespace FSharp.Compiler.UnitTests open System open System.Text diff --git a/src/fsharp/FSharp.Compiler.Unittests/ManglingNameOfProvidedTypes.fs b/tests/FSharp.Compiler.UnitTests/ManglingNameOfProvidedTypes.fs similarity index 98% rename from src/fsharp/FSharp.Compiler.Unittests/ManglingNameOfProvidedTypes.fs rename to tests/FSharp.Compiler.UnitTests/ManglingNameOfProvidedTypes.fs index 10612d540c5..d56fd040e05 100644 --- a/src/fsharp/FSharp.Compiler.Unittests/ManglingNameOfProvidedTypes.fs +++ b/tests/FSharp.Compiler.UnitTests/ManglingNameOfProvidedTypes.fs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -namespace FSharp.Compiler.Unittests +namespace FSharp.Compiler.UnitTests open System open System.Text diff --git a/src/fsharp/FSharp.Compiler.Unittests/NunitHelpers.fs b/tests/FSharp.Compiler.UnitTests/NunitHelpers.fs similarity index 100% rename from src/fsharp/FSharp.Compiler.Unittests/NunitHelpers.fs rename to tests/FSharp.Compiler.UnitTests/NunitHelpers.fs diff --git a/tests/FSharp.Compiler.UnitTests/ProductVersion.fs b/tests/FSharp.Compiler.UnitTests/ProductVersion.fs new file mode 100644 index 00000000000..6395d2e39ac --- /dev/null +++ b/tests/FSharp.Compiler.UnitTests/ProductVersion.fs @@ -0,0 +1,109 @@ +namespace FSharp.Compiler.UnitTests + +open System +open System.IO +open System.Text +open NUnit.Framework + +open Microsoft.FSharp.Compiler.AbstractIL.IL +open Microsoft.FSharp.Compiler.Driver.MainModuleBuilder + +#nowarn "3180" + +module FileVersionTest = + + let fileVersionAttrName = typeof.FullName + + [] + let parseILVersion () = + "0.0.0.0" |> parseILVersion |> Assert.areEqual (0us,0us,0us,0us) + "1.2.3.4" |> parseILVersion |> Assert.areEqual (1us,2us,3us,4us) + + [] + let ``should use AssemblyFileVersionAttribute if set`` () = + let findStringAttr n = n |> Assert.areEqual fileVersionAttrName; Some "1.2.3.4" + fileVersion findStringAttr (1us,0us,0us,0us) |> Assert.areEqual (1us,2us,3us,4us) + + [] + let ``should fallback if AssemblyFileVersionAttribute is not a valid version`` () = + fileVersion (fun _ -> Some "1.2a.3.3") (3us,7us,8us,6us) + |> Assert.areEqual (3us,7us,8us,6us) + + [] + let ``should fallback to assemblyVersion if AssemblyFileVersionAttribute not set`` () = + let findStringAttr n = n |> Assert.areEqual fileVersionAttrName; None; + fileVersion findStringAttr (1us,0us,0us,4us) |> Assert.areEqual (1us,0us,0us,4us) + +module ProductVersionTest = + + let informationalVersionAttrName = typeof.FullName + let fileVersionAttrName = typeof.FullName + + [] + let ``should use AssemblyInformationalVersionAttribute if set`` () = + let mutable args = [] + let findStrAttr x = args <- List.append args [x]; Some "12.34.56.78" + productVersion findStrAttr (1us,0us,0us,6us) |> Assert.areEqual "12.34.56.78" + args |> Assert.areEqual [ informationalVersionAttrName ] + + [] + let ``should fallback if AssemblyInformationalVersionAttribute is not a valid version`` () = + productVersion (fun _ -> Some "1.2.3-main (build #12)") (1us,0us,0us,6us) + |> Assert.areEqual "1.2.3-main (build #12)" + + [] + let ``should fallback to fileVersion if AssemblyInformationalVersionAttribute not set or empty`` () = + productVersion (fun _ -> None) (3us,2us,1us,0us) |> Assert.areEqual "3.2.1.0" + productVersion (fun _ -> Some "") (3us,2us,1us,0us) |> Assert.areEqual "3.2.1.0" + + let validValues () = + let max = System.UInt16.MaxValue + [ "1.2.3.4", (1us,2us,3us,4us) + "0.0.0.0", (0us,0us,0us,0us) + "3213.57843.32382.59493", (3213us,57843us,32382us,59493us) + (sprintf "%d.%d.%d.%d" max max max max), (max,max,max,max) ] + + [] + let ``should use values if valid major.minor.revision.build version format`` () = + for (v, expected) in validValues() do + v |> productVersionToILVersionInfo |> Assert.areEqual expected + + let invalidValues () = + [ "1.2.3.4", (1us,2us,3us,4us) + "1.2.3.4a", (1us,2us,3us,0us) + "1.2.c3.4", (1us,2us,0us,0us) + "1.2-d.3.4", (1us,0us,0us,0us) + "1dd.2.3.4", (0us,0us,0us,0us) + "1dd.2da.d3hj.dd4ds", (0us,0us,0us,0us) + "1.5.6.7.dasd", (1us,5us,6us,7us) + "9.3", (9us,3us,0us,0us) + "", (0us,0us,0us,0us) + "70000.80000.90000.100000", (0us,0us,0us,0us) + (sprintf "%d.70000.80000.90000" System.UInt16.MaxValue), (System.UInt16.MaxValue,0us,0us,0us) ] + + [] + let ``should zero starting from first invalid version part`` () = + for (v, expected) in invalidValues() do + v |> productVersionToILVersionInfo |> Assert.areEqual expected + +module TypeProviderDesignTimeComponentLoading = + + + [] + let ``check tooling paths for type provider design time component loading`` () = + let expected = + [ Path.Combine("typeproviders", "fsharp41", "net461") + Path.Combine("tools", "fsharp41", "net461") + Path.Combine("typeproviders", "fsharp41", "net452") + Path.Combine("tools", "fsharp41", "net452") + Path.Combine("typeproviders", "fsharp41", "net451") + Path.Combine("tools", "fsharp41", "net451") + Path.Combine("typeproviders", "fsharp41", "net45") + Path.Combine("tools", "fsharp41", "net45") + Path.Combine("typeproviders", "fsharp41", "netstandard2.0") + Path.Combine("tools", "fsharp41", "netstandard2.0") + ] + let actual = Microsoft.FSharp.Compiler.ExtensionTyping.toolingCompatiblePaths() + printfn "actual = %A" actual + printfn "expected = %A" expected + Assert.True((expected=actual)) diff --git a/src/fsharp/FSharp.Core.Unittests/App.xaml b/tests/FSharp.Core.UnitTests/App.xaml similarity index 100% rename from src/fsharp/FSharp.Core.Unittests/App.xaml rename to tests/FSharp.Core.UnitTests/App.xaml diff --git a/src/fsharp/FSharp.Core.Unittests/App.xaml.cs b/tests/FSharp.Core.UnitTests/App.xaml.cs similarity index 98% rename from src/fsharp/FSharp.Core.Unittests/App.xaml.cs rename to tests/FSharp.Core.UnitTests/App.xaml.cs index 63520ef79b5..5de02cd88c1 100644 --- a/src/fsharp/FSharp.Core.Unittests/App.xaml.cs +++ b/tests/FSharp.Core.UnitTests/App.xaml.cs @@ -33,7 +33,7 @@ private void Application_Startup(object sender, StartupEventArgs e) NUnit.Framework.Assert.IsTrue(true); // force NUnitFarmework.dll to load UnitTestSystem.RegisterUnitTestProvider(new NUnitProvider()); UnitTestSettings settings = UnitTestSystem.CreateDefaultSettings(); - settings.TestAssemblies.Add(typeof(global::FSharp.Core.Unittests.LibraryTestFx).Assembly); + settings.TestAssemblies.Add(typeof(global::FSharp.Core.UnitTests.LibraryTestFx).Assembly); RootVisual = UnitTestSystem.CreateTestPage(settings); } diff --git a/src/fsharp/FSharp.Core.Unittests/FSharp.Core.UnitTests.TestApp.csproj b/tests/FSharp.Core.UnitTests/FSharp.Core.UnitTests.TestApp.csproj similarity index 96% rename from src/fsharp/FSharp.Core.Unittests/FSharp.Core.UnitTests.TestApp.csproj rename to tests/FSharp.Core.UnitTests/FSharp.Core.UnitTests.TestApp.csproj index d8b1cedefbc..e426fdfe99e 100644 --- a/src/fsharp/FSharp.Core.Unittests/FSharp.Core.UnitTests.TestApp.csproj +++ b/tests/FSharp.Core.UnitTests/FSharp.Core.UnitTests.TestApp.csproj @@ -1,7 +1,7 @@ - $(MSBuildProjectDirectory)\..\.. + $(MSBuildProjectDirectory)\..\..\src $(FSharpSourcesRoot)\..\tools\nUnit.Silverlight @@ -59,9 +59,9 @@ False $(OutputPath)\..\bin\FSharp.Core.dll - + False - $(OutputPath)\..\bin\FSharp.Core.Unittests.dll + $(OutputPath)\..\bin\FSharp.Core.UnitTests.dll False diff --git a/src/fsharp/FSharp.Core.Unittests/FSharp.Core.Unittests.dll.config b/tests/FSharp.Core.UnitTests/FSharp.Core.UnitTests.dll.config similarity index 100% rename from src/fsharp/FSharp.Core.Unittests/FSharp.Core.Unittests.dll.config rename to tests/FSharp.Core.UnitTests/FSharp.Core.UnitTests.dll.config diff --git a/tests/FSharp.Core.UnitTests/FSharp.Core.UnitTests.fsproj b/tests/FSharp.Core.UnitTests/FSharp.Core.UnitTests.fsproj new file mode 100644 index 00000000000..689f832ee5b --- /dev/null +++ b/tests/FSharp.Core.UnitTests/FSharp.Core.UnitTests.fsproj @@ -0,0 +1,129 @@ + + + + + $(MSBuildProjectDirectory)\..\..\src + {88e2d422-6852-46e3-a740-83e391dc7973} + true + false + + + + Debug + AnyCPU + 2.0 + true + true + Library + false + FSharp.Core.UnitTests + + false + false + netcore + $(NoWarn);217 + + + $(DefineConstants);$(TargetDotnetProfile.ToLower()) + + + true + false + $(DefineConstants);DEBUG;TRACE + prompt + 3 + + + true + $(DefineConstants);TRACE + prompt + 3 + + + + + true + True + $(NUnitLibDir)\nunit.framework.dll + + + true + True + $(FsCheckLibDir)\net452\FsCheck.dll + + + ..\..\packages\System.ValueTuple.$(SystemValueTuplePackageVersion)\lib\portable-net40+sl4+win8+wp8\System.ValueTuple.dll + True + + + + + {DED3BBD7-53F4-428A-8C9F-27968E768605} + FSharp.Core + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + FSharp.Core.UnitTests.dll.config + FSCoreVersion + $(FSCoreVersion) + + + + \ No newline at end of file diff --git a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/ComparersRegression.fs b/tests/FSharp.Core.UnitTests/FSharp.Core/ComparersRegression.fs similarity index 99% rename from src/fsharp/FSharp.Core.Unittests/FSharp.Core/ComparersRegression.fs rename to tests/FSharp.Core.UnitTests/FSharp.Core/ComparersRegression.fs index c118abac09b..4333e5316af 100644 --- a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/ComparersRegression.fs +++ b/tests/FSharp.Core.UnitTests/FSharp.Core/ComparersRegression.fs @@ -1,11 +1,11 @@ // A set of regression tests for equality/relational operators and the IComparer<> and IEqualityComparer<> // implementation provided by ComparisonIdentity.Structural and HashIdentity.Structural -namespace FSharp.Core.Unittests.FSharp_Core.Microsoft_FSharp_Core +namespace FSharp.Core.UnitTests.FSharp_Core.Microsoft_FSharp_Core open System open System.Numerics -open FSharp.Core.Unittests.LibraryTestFx +open FSharp.Core.UnitTests.LibraryTestFx open NUnit.Framework module ComparersRegression = @@ -1628,7 +1628,7 @@ module ComparersRegression = static member I = inlinable static member N = noninlinable -#if !FX_PORTABLE_OR_NETSTANDARD +#if !NETSTANDARD1_6 let create<'a,'b when 'b : equality> name operation (f:IOperation<'a>) (items:array<'a>) = printf """ [] member __.``%s %s``() = diff --git a/tests/FSharp.Core.UnitTests/FSharp.Core/CreateComparersRegression.fsx b/tests/FSharp.Core.UnitTests/FSharp.Core/CreateComparersRegression.fsx new file mode 100644 index 00000000000..bbd68226a07 --- /dev/null +++ b/tests/FSharp.Core.UnitTests/FSharp.Core/CreateComparersRegression.fsx @@ -0,0 +1,6 @@ +// run as "fsi --exec CreateComparersRegression.fsx > tmp.txt" +// and then copy text in tmp.txt into the bottom of ComparersRegression.fs + +#r @"..\..\..\..\Release\net40\bin\FSharp.Core.UnitTests.dll" + +FSharp.Core.UnitTests.FSharp_Core.Microsoft_FSharp_Core.ComparersRegression.createData () \ No newline at end of file diff --git a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/DiscrimantedUnionType.fs b/tests/FSharp.Core.UnitTests/FSharp.Core/DiscrimantedUnionType.fs similarity index 95% rename from src/fsharp/FSharp.Core.Unittests/FSharp.Core/DiscrimantedUnionType.fs rename to tests/FSharp.Core.UnitTests/FSharp.Core/DiscrimantedUnionType.fs index e4bcb8aa1bc..90d30f40a6c 100644 --- a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/DiscrimantedUnionType.fs +++ b/tests/FSharp.Core.UnitTests/FSharp.Core/DiscrimantedUnionType.fs @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -module FSharp.Core.Unittests.FSharp_Core.Microsoft_FSharp_Core.DiscriminatedUnionTypes +module FSharp.Core.UnitTests.FSharp_Core.Microsoft_FSharp_Core.DiscriminatedUnionTypes open System open System.Numerics open System.Reflection open System.Runtime.InteropServices -open FSharp.Core.Unittests.LibraryTestFx +open FSharp.Core.UnitTests.LibraryTestFx open NUnit.Framework open FsCheck open FsCheck.PropOperators @@ -249,3 +249,10 @@ let [] ``can properly construct a struct union using FSharpValue.MakeUnion let c2 = (fieldVals.[1] :?> int) Assert.AreEqual (3456, c2) +let [] ``struct unions does optimization correctly on pattern matching`` () = + let arr = ResizeArray() + match arr.Add(1); ValueSome () with + | ValueSome () -> () + | ValueNone -> () + + Assert.AreEqual(1, arr.Count) diff --git a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/Array2Module.fs b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/Array2Module.fs similarity index 99% rename from src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/Array2Module.fs rename to tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/Array2Module.fs index 166695acd40..b8fb043157f 100644 --- a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/Array2Module.fs +++ b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/Array2Module.fs @@ -3,10 +3,10 @@ // Various tests for the: // Microsoft.FSharp.Collections.Array2D module -namespace FSharp.Core.Unittests.FSharp_Core.Microsoft_FSharp_Collections +namespace FSharp.Core.UnitTests.FSharp_Core.Microsoft_FSharp_Collections open System -open FSharp.Core.Unittests.LibraryTestFx +open FSharp.Core.UnitTests.LibraryTestFx open NUnit.Framework (* diff --git a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/Array3Module.fs b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/Array3Module.fs similarity index 99% rename from src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/Array3Module.fs rename to tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/Array3Module.fs index 5aaa245ffb3..bb6c5a0846b 100644 --- a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/Array3Module.fs +++ b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/Array3Module.fs @@ -3,10 +3,10 @@ // Various tests for the: // Microsoft.FSharp.Collections.Array3D module -namespace FSharp.Core.Unittests.FSharp_Core.Microsoft_FSharp_Collections +namespace FSharp.Core.UnitTests.FSharp_Core.Microsoft_FSharp_Collections open System -open FSharp.Core.Unittests.LibraryTestFx +open FSharp.Core.UnitTests.LibraryTestFx open NUnit.Framework (* diff --git a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/Array4Module.fs b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/Array4Module.fs similarity index 98% rename from src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/Array4Module.fs rename to tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/Array4Module.fs index 5cf6bc938b0..d67fb17cd89 100644 --- a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/Array4Module.fs +++ b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/Array4Module.fs @@ -3,10 +3,10 @@ // Various tests for the: // Microsoft.FSharp.Collections.Array4D module -namespace FSharp.Core.Unittests.FSharp_Core.Microsoft_FSharp_Collections +namespace FSharp.Core.UnitTests.FSharp_Core.Microsoft_FSharp_Collections open System -open FSharp.Core.Unittests.LibraryTestFx +open FSharp.Core.UnitTests.LibraryTestFx open NUnit.Framework (* diff --git a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/ArrayModule.fs b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/ArrayModule.fs similarity index 99% rename from src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/ArrayModule.fs rename to tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/ArrayModule.fs index a42b83e8338..725775bf751 100644 --- a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/ArrayModule.fs +++ b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/ArrayModule.fs @@ -3,10 +3,10 @@ // Various tests for the: // Microsoft.FSharp.Collections.Array module -namespace FSharp.Core.Unittests.FSharp_Core.Microsoft_FSharp_Collections +namespace FSharp.Core.UnitTests.FSharp_Core.Microsoft_FSharp_Collections open System -open FSharp.Core.Unittests.LibraryTestFx +open FSharp.Core.UnitTests.LibraryTestFx open NUnit.Framework (* @@ -416,11 +416,9 @@ type ArrayModule() = member this.Choose() = this.ChooseTester Array.choose Array.choose -#if !FX_NO_TPL_PARALLEL [] member this.``Parallel.Choose`` () = this.ChooseTester Array.Parallel.choose Array.Parallel.choose -#endif member private this.CollectTester collectInt collectString = @@ -463,11 +461,9 @@ type ArrayModule() = Array.collect f [|1;2;3|] |> ignore Assert.AreEqual(3,!stamp) -#if !FX_NO_TPL_PARALLEL [] member this.``Parallel.Collect`` () = this.CollectTester Array.Parallel.collect Array.Parallel.collect -#endif [] member this.compareWith() = @@ -1279,11 +1275,9 @@ type ArrayModule() = Array.init 10 f |> ignore Assert.AreEqual (10, !stamp) -#if !FX_NO_TPL_PARALLEL [] member this.``Parallel.Init``() = this.InitTester Array.Parallel.init Array.Parallel.init -#endif [] member this.IsEmpty() = @@ -1491,11 +1485,9 @@ type ArrayModule() = Array.map f [| 1..100 |] |> ignore Assert.AreEqual(100,!stamp) -#if !FX_NO_TPL_PARALLEL [] member this.``Parallel.Map`` () = this.MapTester Array.Parallel.map Array.Parallel.map -#endif member private this.MapiTester mapiInt mapiString = // empty array @@ -1533,7 +1525,6 @@ type ArrayModule() = Assert.AreEqual(100,!stamp) () -#if !FX_NO_TPL_PARALLEL [] member this.``Parallel.Mapi`` () = this.MapiTester Array.Parallel.mapi Array.Parallel.mapi @@ -1603,7 +1594,6 @@ type ArrayModule() = CheckThrowsArgumentNullException (fun () -> Array.Parallel.iteri funStr nullArr |> ignore) () -#endif member private this.PartitionTester partInt partString = // int array @@ -1648,11 +1638,9 @@ type ArrayModule() = Assert.AreEqual([|[]|], Array.singleton []) Assert.IsTrue([|[||]|] = Array.singleton [||]) -#if !FX_NO_TPL_PARALLEL [] member this.``Parallel.Partition`` () = this.PartitionTester Array.Parallel.partition Array.Parallel.partition -#endif [] member this.Contains() = diff --git a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/ArrayModule2.fs b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/ArrayModule2.fs similarity index 97% rename from src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/ArrayModule2.fs rename to tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/ArrayModule2.fs index 4df85c5ef04..20a6a0d7af3 100644 --- a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/ArrayModule2.fs +++ b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/ArrayModule2.fs @@ -3,10 +3,10 @@ // Various tests for the: // Microsoft.FSharp.Collections.Array module -namespace FSharp.Core.Unittests.FSharp_Core.Microsoft_FSharp_Collections +namespace FSharp.Core.UnitTests.FSharp_Core.Microsoft_FSharp_Collections open System -open FSharp.Core.Unittests.LibraryTestFx +open FSharp.Core.UnitTests.LibraryTestFx open NUnit.Framework (* @@ -921,6 +921,31 @@ type ArrayModule2() = () + [] + member this.Transpose() = + // integer array + Assert.AreEqual([|[|1;4|]; [|2;5|]; [|3;6|]|], Array.transpose (seq [[|1..3|]; [|4..6|]])) + Assert.AreEqual([|[|1|]; [|2|]; [|3|]|], Array.transpose [|[|1..3|]|]) + Assert.AreEqual([|[|1..2|]|], Array.transpose [|[|1|]; [|2|]|]) + + // string array + Assert.AreEqual([|[|"a";"d"|]; [|"b";"e"|]; [|"c";"f"|]|], Array.transpose (seq [[|"a";"b";"c"|]; [|"d";"e";"f"|]])) + + // empty array + Assert.AreEqual([| |], Array.transpose [| |]) + + // array of empty arrays - m x 0 array transposes to 0 x m (i.e. empty) + Assert.AreEqual([| |], Array.transpose [| [||] |]) + Assert.AreEqual([| |], Array.transpose [| [||]; [||] |]) + + // null array + let nullArr = null: string[][] + CheckThrowsArgumentNullException (fun () -> nullArr |> Array.transpose |> ignore) + + // jagged arrays + CheckThrowsArgumentException (fun () -> Array.transpose [| [|1; 2|]; [|3|] |] |> ignore) + CheckThrowsArgumentException (fun () -> Array.transpose [| [|1|]; [|2; 3|] |] |> ignore) + [] member this.Truncate() = // integer array diff --git a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/ArrayProperties.fs b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/ArrayProperties.fs similarity index 95% rename from src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/ArrayProperties.fs rename to tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/ArrayProperties.fs index 1f26e7f1424..941cfc9de44 100644 --- a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/ArrayProperties.fs +++ b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/ArrayProperties.fs @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. [][] -module FSharp.Core.Unittests.FSharp_Core.Microsoft_FSharp_Collections.ArrayProperties +module FSharp.Core.UnitTests.FSharp_Core.Microsoft_FSharp_Collections.ArrayProperties open System open System.Collections.Generic diff --git a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/CollectionModulesConsistency.fs b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/CollectionModulesConsistency.fs similarity index 99% rename from src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/CollectionModulesConsistency.fs rename to tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/CollectionModulesConsistency.fs index 1615db1f805..c85ff999f67 100644 --- a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/CollectionModulesConsistency.fs +++ b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/CollectionModulesConsistency.fs @@ -3,7 +3,7 @@ [] [] [] -module FSharp.Core.Unittests.FSharp_Core.Microsoft_FSharp_Collections.CollectionModulesConsistency +module FSharp.Core.UnitTests.FSharp_Core.Microsoft_FSharp_Collections.CollectionModulesConsistency open System open System.Collections.Generic diff --git a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/ComparisonIdentityModule.fs b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/ComparisonIdentityModule.fs similarity index 94% rename from src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/ComparisonIdentityModule.fs rename to tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/ComparisonIdentityModule.fs index 09f79908324..f16f20a491b 100644 --- a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/ComparisonIdentityModule.fs +++ b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/ComparisonIdentityModule.fs @@ -3,10 +3,10 @@ // Various tests for the: // Microsoft.FSharp.Collections.ComparisonIdentity module -namespace FSharp.Core.Unittests.FSharp_Core.Microsoft_FSharp_Collections +namespace FSharp.Core.UnitTests.FSharp_Core.Microsoft_FSharp_Collections open System -open FSharp.Core.Unittests.LibraryTestFx +open FSharp.Core.UnitTests.LibraryTestFx open NUnit.Framework (* diff --git a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/HashIdentityModule.fs b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/HashIdentityModule.fs similarity index 96% rename from src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/HashIdentityModule.fs rename to tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/HashIdentityModule.fs index db93656e12e..b6bbe392c53 100644 --- a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/HashIdentityModule.fs +++ b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/HashIdentityModule.fs @@ -3,10 +3,10 @@ // Various tests for the: // Microsoft.FSharp.Collections.HashIdentity module -namespace FSharp.Core.Unittests.FSharp_Core.Microsoft_FSharp_Collections +namespace FSharp.Core.UnitTests.FSharp_Core.Microsoft_FSharp_Collections open System -open FSharp.Core.Unittests.LibraryTestFx +open FSharp.Core.UnitTests.LibraryTestFx open NUnit.Framework open System.Collections.Generic diff --git a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/ListModule.fs b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/ListModule.fs similarity index 99% rename from src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/ListModule.fs rename to tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/ListModule.fs index 2bd1d4402ea..e9784237119 100644 --- a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/ListModule.fs +++ b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/ListModule.fs @@ -3,10 +3,10 @@ // Various tests for the: // Microsoft.FSharp.Collections.List module -namespace FSharp.Core.Unittests.FSharp_Core.Microsoft_FSharp_Collections +namespace FSharp.Core.UnitTests.FSharp_Core.Microsoft_FSharp_Collections open System -open FSharp.Core.Unittests.LibraryTestFx +open FSharp.Core.UnitTests.LibraryTestFx open NUnit.Framework (* diff --git a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/ListModule2.fs b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/ListModule2.fs similarity index 97% rename from src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/ListModule2.fs rename to tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/ListModule2.fs index 3ebec0af3c9..63ae937b561 100644 --- a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/ListModule2.fs +++ b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/ListModule2.fs @@ -3,10 +3,10 @@ // Various tests for the: // Microsoft.FSharp.Collections.List module -namespace FSharp.Core.Unittests.FSharp_Core.Microsoft_FSharp_Collections +namespace FSharp.Core.UnitTests.FSharp_Core.Microsoft_FSharp_Collections open System -open FSharp.Core.Unittests.LibraryTestFx +open FSharp.Core.UnitTests.LibraryTestFx open NUnit.Framework (* @@ -813,6 +813,27 @@ type ListModule02() = () + [] + member this.Transpose() = + // integer list + Assert.AreEqual([[1; 4]; [2; 5]; [3; 6]], List.transpose (seq [[1..3]; [4..6]])) + Assert.AreEqual([[1]; [2]; [3]], List.transpose [[1..3]]) + Assert.AreEqual([[1..2]], List.transpose [[1]; [2]]) + + // string list + Assert.AreEqual([["a";"d"]; ["b";"e"]; ["c";"f"]], List.transpose (seq [["a";"b";"c"]; ["d";"e";"f"]])) + + // empty list + Assert.AreEqual([], List.transpose []) + + // list of empty lists - m x 0 list transposes to 0 x m (i.e. empty) + Assert.AreEqual([], List.transpose [[]]) + Assert.AreEqual([], List.transpose [[]; []]) + + // jagged lists + CheckThrowsArgumentException (fun () -> List.transpose [[1; 2]; [3]] |> ignore) + CheckThrowsArgumentException (fun () -> List.transpose [[1]; [2; 3]] |> ignore) + [] member this.Truncate() = // integer list diff --git a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/ListProperties.fs b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/ListProperties.fs similarity index 99% rename from src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/ListProperties.fs rename to tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/ListProperties.fs index 7a20ddca643..ae84d693f89 100644 --- a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/ListProperties.fs +++ b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/ListProperties.fs @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. [][] -module FSharp.Core.Unittests.FSharp_Core.Microsoft_FSharp_Collections.ListProperties +module FSharp.Core.UnitTests.FSharp_Core.Microsoft_FSharp_Collections.ListProperties open System open System.Collections.Generic diff --git a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/ListType.fs b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/ListType.fs similarity index 95% rename from src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/ListType.fs rename to tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/ListType.fs index 452add35fdd..80c13757f6d 100644 --- a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/ListType.fs +++ b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/ListType.fs @@ -3,12 +3,12 @@ // Various tests for the: // Microsoft.FSharp.Collections.List type -namespace FSharp.Core.Unittests.FSharp_Core.Microsoft_FSharp_Collections +namespace FSharp.Core.UnitTests.FSharp_Core.Microsoft_FSharp_Collections open System open System.Collections open System.Collections.Generic -open FSharp.Core.Unittests.LibraryTestFx +open FSharp.Core.UnitTests.LibraryTestFx open NUnit.Framework (* @@ -83,7 +83,6 @@ type ListType() = Assert.AreEqual(false, enum.MoveNext()) CheckThrowsInvalidOperationExn(fun () -> enum.Current |> ignore) - #if !FSCORE_PORTABLE_OLD [] member this.IReadOnlyCollection_T() = @@ -100,8 +99,22 @@ type ListType() = let c = [] :> IReadOnlyCollection Assert.AreEqual(c.Count, 0) -#endif - + + [] + member this.IReadOnlyList_T() = + + let c = ['a'; 'b'; 'c'] :> IReadOnlyList + + Assert.AreEqual(c.[1], 'b') + + let c = [1..10] :> IReadOnlyList + + Assert.AreEqual(c.[5], 6) + + let c = [] :> IReadOnlyList + + CheckThrowsArgumentException(fun () -> c.[0] |> ignore) + // Base class methods [] member this.ObjectToString() = diff --git a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/MapModule.fs b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/MapModule.fs similarity index 99% rename from src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/MapModule.fs rename to tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/MapModule.fs index fa49cc2b088..16145eb62f2 100644 --- a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/MapModule.fs +++ b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/MapModule.fs @@ -3,10 +3,10 @@ // Various tests for the: // Microsoft.FSharp.Collections.Map module -namespace FSharp.Core.Unittests.FSharp_Core.Microsoft_FSharp_Collections +namespace FSharp.Core.UnitTests.FSharp_Core.Microsoft_FSharp_Collections open System -open FSharp.Core.Unittests.LibraryTestFx +open FSharp.Core.UnitTests.LibraryTestFx open NUnit.Framework (* diff --git a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/MapType.fs b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/MapType.fs similarity index 88% rename from src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/MapType.fs rename to tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/MapType.fs index f95ce3e47ce..c0f85ccf28c 100644 --- a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/MapType.fs +++ b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/MapType.fs @@ -3,12 +3,12 @@ // Various tests for the: // Microsoft.FSharp.Collections.Map type -namespace FSharp.Core.Unittests.FSharp_Core.Microsoft_FSharp_Collections +namespace FSharp.Core.UnitTests.FSharp_Core.Microsoft_FSharp_Collections open System open System.Collections open System.Collections.Generic -open FSharp.Core.Unittests.LibraryTestFx +open FSharp.Core.UnitTests.LibraryTestFx open NUnit.Framework (* @@ -111,6 +111,27 @@ type MapType() = CheckThrowsKeyNotFoundException(fun () -> id.[1] |> ignore) Assert.AreEqual(id.Keys, [| |] ) Assert.AreEqual(id.Values, [| |] ) + + [] + member this.IReadOnlyDictionary() = + let irod = (Map.ofArray [|(1,1);(2,4);(3,9)|]) :> IReadOnlyDictionary<_,_> + + Assert.IsTrue(irod.ContainsKey(1)) + Assert.IsFalse(irod.ContainsKey(5)) + Assert.AreEqual(irod.[1], 1) + Assert.AreEqual(irod.[3], 9) + Assert.AreEqual(irod.Keys, [| 1; 2; 3|]) + Assert.AreEqual(irod.Values, [| 1; 4; 9|]) + + Assert.IsTrue(irod.TryGetValue(1, ref 1)) + Assert.IsFalse(irod.TryGetValue(100, ref 1)) + + // Empty IROD + let irod = Map.empty :> IReadOnlyDictionary // Note no type args + Assert.IsFalse(irod.ContainsKey(5)) + CheckThrowsKeyNotFoundException(fun () -> irod.[1] |> ignore) + Assert.AreEqual(irod.Keys, [| |] ) + Assert.AreEqual(irod.Values, [| |] ) [] member this.ICollection() = @@ -136,6 +157,18 @@ type MapType() = let newArr = Array.create 5 (new KeyValuePair(0,0)) ic.CopyTo(newArr,0) + [] + member this.IReadOnlyCollection() = + // Legit IROC + let iroc = (Map.ofArray [|(1,1);(2,4);(3,9)|]) :> IReadOnlyCollection> + + Assert.AreEqual(iroc.Count, 3) + + // Empty IROC + let iroc = Map.empty :> IReadOnlyCollection> + + Assert.AreEqual(iroc.Count, 0) + [] member this.IComparable() = // Legit IC diff --git a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/ObsoleteListFunctions.fs b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/ObsoleteListFunctions.fs similarity index 88% rename from src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/ObsoleteListFunctions.fs rename to tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/ObsoleteListFunctions.fs index a293bb14278..2a8027f32f1 100644 --- a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/ObsoleteListFunctions.fs +++ b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/ObsoleteListFunctions.fs @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. #nowarn "44" // This construct is deprecated. please use List.item -namespace FSharp.Core.Unittests.FSharp_Core.Microsoft_FSharp_Collections +namespace FSharp.Core.UnitTests.FSharp_Core.Microsoft_FSharp_Collections open System -open FSharp.Core.Unittests.LibraryTestFx +open FSharp.Core.UnitTests.LibraryTestFx open NUnit.Framework [][][] diff --git a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/ObsoleteSeqFunctions.fs b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/ObsoleteSeqFunctions.fs similarity index 92% rename from src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/ObsoleteSeqFunctions.fs rename to tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/ObsoleteSeqFunctions.fs index 47e431b3f33..3d57f01aac1 100644 --- a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/ObsoleteSeqFunctions.fs +++ b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/ObsoleteSeqFunctions.fs @@ -1,12 +1,12 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. #nowarn "44" // This construct is deprecated. please use Seq.item -namespace FSharp.Core.Unittests.FSharp_Core.Microsoft_FSharp_Collections +namespace FSharp.Core.UnitTests.FSharp_Core.Microsoft_FSharp_Collections open System open NUnit.Framework -open FSharp.Core.Unittests.LibraryTestFx +open FSharp.Core.UnitTests.LibraryTestFx [][][] type ObsoleteSeqFunctions() = diff --git a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/SeqModule.fs b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/SeqModule.fs similarity index 99% rename from src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/SeqModule.fs rename to tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/SeqModule.fs index d9c402f4130..5e0346b152d 100644 --- a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/SeqModule.fs +++ b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/SeqModule.fs @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -namespace FSharp.Core.Unittests.FSharp_Core.Microsoft_FSharp_Collections +namespace FSharp.Core.UnitTests.FSharp_Core.Microsoft_FSharp_Collections open System open NUnit.Framework -open FSharp.Core.Unittests.LibraryTestFx +open FSharp.Core.UnitTests.LibraryTestFx // Various tests for the: // Microsoft.FSharp.Collections.seq type diff --git a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/SeqModule2.fs b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/SeqModule2.fs similarity index 97% rename from src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/SeqModule2.fs rename to tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/SeqModule2.fs index 102c045c6e5..87483598568 100644 --- a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/SeqModule2.fs +++ b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/SeqModule2.fs @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -namespace FSharp.Core.Unittests.FSharp_Core.Microsoft_FSharp_Collections +namespace FSharp.Core.UnitTests.FSharp_Core.Microsoft_FSharp_Collections open System open NUnit.Framework -open FSharp.Core.Unittests.LibraryTestFx +open FSharp.Core.UnitTests.LibraryTestFx type SeqWindowedTestInput<'t> = { @@ -1522,7 +1522,32 @@ type SeqModule2() = // null Seq CheckThrowsArgumentNullException(fun() -> Seq.toList null |> ignore) () - + + [] + member this.Transpose() = + // integer seq + VerifySeqsEqual [seq [1; 4]; seq [2; 5]; seq [3; 6]] <| Seq.transpose (seq [seq {1..3}; seq {4..6}]) + VerifySeqsEqual [seq [1]; seq [2]; seq [3]] <| Seq.transpose (seq [seq {1..3}]) + VerifySeqsEqual [seq {1..2}] <| Seq.transpose (seq [seq [1]; seq [2]]) + + // string seq + VerifySeqsEqual [seq ["a";"d"]; seq ["b";"e"]; seq ["c";"f"]] <| Seq.transpose (seq [seq ["a";"b";"c"]; seq ["d";"e";"f"]]) + + // empty seq + VerifySeqsEqual Seq.empty <| Seq.transpose Seq.empty + + // seq of empty seqs - m x 0 seq transposes to 0 x m (i.e. empty) + VerifySeqsEqual Seq.empty <| Seq.transpose (seq [Seq.empty]) + VerifySeqsEqual Seq.empty <| Seq.transpose (seq [Seq.empty; Seq.empty]) + + // null seq + let nullSeq = null : seq> + CheckThrowsArgumentNullException (fun () -> Seq.transpose nullSeq |> ignore) + + // sequences of lists + VerifySeqsEqual [seq ["a";"c"]; seq ["b";"d"]] <| Seq.transpose [["a";"b"]; ["c";"d"]] + VerifySeqsEqual [seq ["a";"c"]; seq ["b";"d"]] <| Seq.transpose (seq { yield ["a";"b"]; yield ["c";"d"] }) + [] member this.Truncate() = // integer Seq diff --git a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/SeqProperties.fs b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/SeqProperties.fs similarity index 95% rename from src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/SeqProperties.fs rename to tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/SeqProperties.fs index 17a75aa09b0..d962b6e3393 100644 --- a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/SeqProperties.fs +++ b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/SeqProperties.fs @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. [][] -module FSharp.Core.Unittests.FSharp_Core.Microsoft_FSharp_Collections.SeqProperties +module FSharp.Core.UnitTests.FSharp_Core.Microsoft_FSharp_Collections.SeqProperties open System open System.Collections.Generic diff --git a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/SetModule.fs b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/SetModule.fs similarity index 99% rename from src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/SetModule.fs rename to tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/SetModule.fs index 8bf3921e36b..00b8b103ef0 100644 --- a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/SetModule.fs +++ b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/SetModule.fs @@ -3,10 +3,10 @@ // Various tests for the: // Microsoft.FSharp.Collections.Set module -namespace FSharp.Core.Unittests.FSharp_Core.Microsoft_FSharp_Collections +namespace FSharp.Core.UnitTests.FSharp_Core.Microsoft_FSharp_Collections open System -open FSharp.Core.Unittests.LibraryTestFx +open FSharp.Core.UnitTests.LibraryTestFx open NUnit.Framework (* diff --git a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/SetType.fs b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/SetType.fs similarity index 95% rename from src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/SetType.fs rename to tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/SetType.fs index aa556c5aa05..9b069902b16 100644 --- a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/SetType.fs +++ b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/SetType.fs @@ -3,12 +3,12 @@ // Various tests for the: // Microsoft.FSharp.Collections.Set type -namespace FSharp.Core.Unittests.FSharp_Core.Microsoft_FSharp_Collections +namespace FSharp.Core.UnitTests.FSharp_Core.Microsoft_FSharp_Collections open System open System.Collections open System.Collections.Generic -open FSharp.Core.Unittests.LibraryTestFx +open FSharp.Core.UnitTests.LibraryTestFx open NUnit.Framework (* @@ -99,6 +99,16 @@ type SetType() = Assert.IsFalse(ic.Contains("A") ) let newArr = Array.create 5 "a" ic.CopyTo(newArr,0) + + [] + member this.IReadOnlyCollection() = + // Legit IROC + let iroc = (new Set([1;2;3;4])) :> IReadOnlyCollection + Assert.AreEqual(iroc.Count, 4) + + // Empty IROC + let iroc = (new Set([])) :> IReadOnlyCollection + Assert.AreEqual(iroc.Count, 0) [] member this.IComparable() = diff --git a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/StringModule.fs b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/StringModule.fs similarity index 97% rename from src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/StringModule.fs rename to tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/StringModule.fs index 5e3c2cbf0ac..a74fcba3019 100644 --- a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/StringModule.fs +++ b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/StringModule.fs @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -namespace FSharp.Core.Unittests.FSharp_Core.Microsoft_FSharp_Collections +namespace FSharp.Core.UnitTests.FSharp_Core.Microsoft_FSharp_Collections open System open NUnit.Framework -open FSharp.Core.Unittests.LibraryTestFx +open FSharp.Core.UnitTests.LibraryTestFx // Various tests for the: // Microsoft.FSharp.Collections.seq type diff --git a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/Utils.fs b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/Utils.fs similarity index 93% rename from src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/Utils.fs rename to tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/Utils.fs index c6fbc7698f7..b446e15ab74 100644 --- a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/Utils.fs +++ b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Collections/Utils.fs @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -module FSharp.Core.Unittests.FSharp_Core.Microsoft_FSharp_Collections.Utils +module FSharp.Core.UnitTests.FSharp_Core.Microsoft_FSharp_Collections.Utils type Result<'a> = | Success of 'a diff --git a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Control/App.config b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Control/App.config similarity index 100% rename from src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Control/App.config rename to tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Control/App.config diff --git a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Control/AsyncModule.fs b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Control/AsyncModule.fs similarity index 97% rename from src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Control/AsyncModule.fs rename to tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Control/AsyncModule.fs index d0574d52d60..c2afaa88d5f 100644 --- a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Control/AsyncModule.fs +++ b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Control/AsyncModule.fs @@ -3,15 +3,13 @@ // Various tests for the: // Microsoft.FSharp.Control.Async module -namespace FSharp.Core.Unittests.FSharp_Core.Microsoft_FSharp_Control +namespace FSharp.Core.UnitTests.FSharp_Core.Microsoft_FSharp_Control open System open System.Threading -open FSharp.Core.Unittests.LibraryTestFx +open FSharp.Core.UnitTests.LibraryTestFx open NUnit.Framework -#if !(FSCORE_PORTABLE_OLD || FSCORE_PORTABLE_NEW) open FsCheck -#endif module Utils = let internal memoizeAsync f = @@ -25,7 +23,6 @@ type [] Dummy (x: int) = member this.Dispose () = () -#if !(FSCORE_PORTABLE_OLD || FSCORE_PORTABLE_NEW) [] module ChoiceUtils = @@ -139,8 +136,6 @@ module ChoiceUtils = let minTimeoutOps = ops |> Seq.filter (fun op -> op.Timeout <= minTimeout) |> Seq.length Assert.LessOrEqual(!completed, minTimeoutOps) -#endif - module LeakUtils = // when testing for liveness, the things that we want to observe must always be created in // a nested function call to avoid the GC (possibly) treating them as roots past the last use in the block. @@ -417,7 +412,7 @@ type AsyncModule() = Assert.Fail("TimeoutException expected") with :? System.TimeoutException -> () -#if !FSCORE_PORTABLE_OLD + [] member this.``RunSynchronously.NoThreadJumpsAndTimeout.DifferentSyncContexts``() = let run syncContext = @@ -434,7 +429,6 @@ type AsyncModule() = if !failed then Assert.Fail("TimeoutException expected") run null run (System.Threading.SynchronizationContext()) -#endif [] member this.``RaceBetweenCancellationAndError.AwaitWaitHandle``() = @@ -447,7 +441,7 @@ type AsyncModule() = member this.``RaceBetweenCancellationAndError.Sleep``() = testErrorAndCancelRace (Async.Sleep (-5)) -#if !(FSCORE_PORTABLE_OLD || FSCORE_PORTABLE_NEW || coreclr) +#if !coreclr [] // takes 3 minutes! member this.``Async.Choice specification test``() = ThreadPool.SetMinThreads(100,100) |> ignore @@ -499,7 +493,6 @@ type AsyncModule() = } Async.RunSynchronously(test) -#if !FSCORE_PORTABLE_NEW [] member this.``FromContinuationsCanTailCallCurrentThread``() = let cnt = ref 0 @@ -520,7 +513,6 @@ type AsyncModule() = f 5000 |> Async.StartImmediate Assert.AreEqual(origTid, !finalTid) Assert.AreEqual(5000, !cnt) -#endif [] member this.``AwaitWaitHandle With Cancellation``() = @@ -573,8 +565,7 @@ type AsyncModule() = Assert.AreEqual("boom", !r) -#if !FSCORE_PORTABLE_OLD && !FSCORE_PORTABLE_NEW - [] + [] member this.``SleepContinuations``() = let okCount = ref 0 let errCount = ref 0 @@ -600,7 +591,6 @@ type AsyncModule() = for i = 1 to 3 do test() Assert.AreEqual(0, !okCount) Assert.AreEqual(0, !errCount) -#endif [] member this.``Async caching should work``() = @@ -612,24 +602,30 @@ type AsyncModule() = x := !x + 1 // Side effect! return "" } - let memFunc = Utils.memoizeAsync <| someSlowFunc + let memFunc : string -> Async = Utils.memoizeAsync <| someSlowFunc async { + Console.WriteLine "Do the same memoized thing many ways...." do! memFunc "a" |> Async.Ignore do! memFunc "a" |> Async.Ignore do! memFunc "a" |> Async.Ignore do! [|1 .. 30|] |> Seq.map(fun _ -> (memFunc "a")) |> Async.Parallel |> Async.Ignore + + Console.WriteLine "Still more ways...." for _i = 1 to 30 do Async.Start( memFunc "a" |> Async.Ignore ) Async.Start( memFunc "a" |> Async.Ignore ) do! Async.Sleep 500 do! memFunc "a" |> Async.Ignore do! memFunc "a" |> Async.Ignore + Console.WriteLine "Still more ways again...." for _i = 1 to 30 do Async.Start( memFunc "a" |> Async.Ignore ) + Console.WriteLine "Still more ways again again...." do! [|1 .. 30|] |> Seq.map(fun _ -> (memFunc "a")) |> Async.Parallel |> Async.Ignore } |> Async.RunSynchronously + Console.WriteLine "Checking result...." Assert.AreEqual(1, !x) diff --git a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Control/AsyncType.fs b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Control/AsyncType.fs similarity index 80% rename from src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Control/AsyncType.fs rename to tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Control/AsyncType.fs index c1cfe673bfa..d2fe26e0c00 100644 --- a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Control/AsyncType.fs +++ b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Control/AsyncType.fs @@ -3,16 +3,13 @@ // Various tests for the: // Microsoft.FSharp.Control.Async type -namespace FSharp.Core.Unittests.FSharp_Core.Microsoft_FSharp_Control +namespace FSharp.Core.UnitTests.FSharp_Core.Microsoft_FSharp_Control open System -open FSharp.Core.Unittests.LibraryTestFx +open FSharp.Core.UnitTests.LibraryTestFx open NUnit.Framework open System.Threading - -#if !FX_NO_TPL_PARALLEL open System.Threading.Tasks -#endif type RunWithContinuationsTest_WhatToDo = | Exit @@ -128,8 +125,6 @@ type AsyncType() = Assert.IsTrue(!result = "Cancel" || !result = "Ok") ) -#if !FX_NO_TPL_PARALLEL - member private this.WaitASec (t:Task) = let result = t.Wait(TimeSpan(hours=0,minutes=0,seconds=1)) Assert.IsTrue(result, "Task did not finish after waiting for a second.") @@ -139,7 +134,7 @@ type AsyncType() = member this.CreateTask () = let s = "Hello tasks!" let a = async { return s } -#if FSCORE_PORTABLE_NEW || coreclr +#if NETSTANDARD1_6 let t : Task = #else use t : Task = @@ -156,7 +151,7 @@ type AsyncType() = let a = async { cts.CancelAfter (100) do! tcs.Task |> Async.AwaitTask } -#if FSCORE_PORTABLE_NEW || coreclr +#if NETSTANDARD1_6 let t : Task = #else use t : Task = @@ -183,7 +178,7 @@ type AsyncType() = member this.StartTask () = let s = "Hello tasks!" let a = async { return s } -#if FSCORE_PORTABLE_NEW || coreclr +#if NETSTANDARD1_6 let t = #else use t = @@ -213,7 +208,7 @@ type AsyncType() = let a = async { do raise (Exception ()) } -#if FSCORE_PORTABLE_NEW || coreclr +#if NETSTANDARD1_6 let t = #else use t = @@ -232,7 +227,7 @@ type AsyncType() = let a = async { while true do () } -#if FSCORE_PORTABLE_NEW || coreclr +#if NETSTANDARD1_6 let t = #else use t = @@ -257,7 +252,7 @@ type AsyncType() = } let cts = new CancellationTokenSource() let token = cts.Token -#if FSCORE_PORTABLE_NEW || coreclr +#if NETSTANDARD1_6 let t = #else use t = @@ -275,11 +270,109 @@ type AsyncType() = Assert.IsTrue(t.IsCanceled) Assert.IsTrue(!cancelled) + [] + member this.CreateImmediateAsTask () = + let s = "Hello tasks!" + let a = async { return s } +#if FSCORE_PORTABLE_NEW || coreclr + let t : Task = +#else + use t : Task = +#endif + Async.StartImmediateAsTask a + this.WaitASec t + Assert.IsTrue (t.IsCompleted) + Assert.AreEqual(s, t.Result) + + [] + member this.StartImmediateAsTask () = + let s = "Hello tasks!" + let a = async { return s } +#if FSCORE_PORTABLE_NEW || coreclr + let t = +#else + use t = +#endif + Async.StartImmediateAsTask a + this.WaitASec t + Assert.IsTrue (t.IsCompleted) + Assert.AreEqual(s, t.Result) + + + [] + member this.ExceptionPropagatesToImmediateTask () = + let a = async { + do raise (Exception ()) + } +#if FSCORE_PORTABLE_NEW || coreclr + let t = +#else + use t = +#endif + Async.StartImmediateAsTask a + let mutable exceptionThrown = false + try + this.WaitASec t + with + e -> exceptionThrown <- true + Assert.IsTrue (t.IsFaulted) + Assert.IsTrue(exceptionThrown) + + [] + [] + member this.CancellationPropagatesToImmediateTask () = + let a = async { + while true do () + } +#if FSCORE_PORTABLE_NEW || coreclr + let t = +#else + use t = +#endif + Async.StartImmediateAsTask a + Async.CancelDefaultToken () + let mutable exceptionThrown = false + try + this.WaitASec t + with e -> exceptionThrown <- true + Assert.IsTrue (exceptionThrown) + Assert.IsTrue(t.IsCanceled) + + [] + [] + member this.CancellationPropagatesToGroupImmediate () = + let ewh = new ManualResetEvent(false) + let cancelled = ref false + let a = async { + use! holder = Async.OnCancel (fun _ -> cancelled := true) + ewh.Set() |> Assert.IsTrue + while true do () + } + let cts = new CancellationTokenSource() + let token = cts.Token +#if FSCORE_PORTABLE_NEW || coreclr + let t = +#else + use t = +#endif + Async.StartImmediateAsTask(a, cancellationToken=token) +// printfn "%A" t.Status + ewh.WaitOne() |> Assert.IsTrue + cts.Cancel() +// printfn "%A" t.Status + let mutable exceptionThrown = false + try + this.WaitASec t + with e -> exceptionThrown <- true + Assert.IsTrue (exceptionThrown) + Assert.IsTrue(t.IsCanceled) + Assert.IsTrue(!cancelled) + [] member this.TaskAsyncValue () = let s = "Test" -#if FSCORE_PORTABLE_NEW || coreclr +#if NETSTANDARD1_6 let t = #else use t = @@ -319,7 +412,7 @@ type AsyncType() = [] member this.TaskAsyncValueException () = -#if FSCORE_PORTABLE_NEW || coreclr +#if NETSTANDARD1_6 let t = #else use t = @@ -338,7 +431,7 @@ type AsyncType() = use ewh = new ManualResetEvent(false) let cts = new CancellationTokenSource() let token = cts.Token -#if FSCORE_PORTABLE_NEW || coreclr +#if NETSTANDARD1_6 let t : Task= #else use t : Task= @@ -357,7 +450,7 @@ type AsyncType() = [] member this.NonGenericTaskAsyncValue () = let hasBeenCalled = ref false -#if FSCORE_PORTABLE_NEW || coreclr +#if NETSTANDARD1_6 let t = #else use t = @@ -372,7 +465,7 @@ type AsyncType() = [] member this.NonGenericTaskAsyncValueException () = -#if FSCORE_PORTABLE_NEW || coreclr +#if NETSTANDARD1_6 let t = #else use t = @@ -391,7 +484,7 @@ type AsyncType() = use ewh = new ManualResetEvent(false) let cts = new CancellationTokenSource() let token = cts.Token -#if FSCORE_PORTABLE_NEW || coreclr +#if NETSTANDARD1_6 let t = #else use t = @@ -407,4 +500,3 @@ type AsyncType() = cts.Cancel() ewh.WaitOne(10000) |> ignore -#endif diff --git a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Control/Cancellation.fs b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Control/Cancellation.fs similarity index 99% rename from src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Control/Cancellation.fs rename to tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Control/Cancellation.fs index 19bd5062e5d..47f241f2462 100644 --- a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Control/Cancellation.fs +++ b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Control/Cancellation.fs @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -namespace FSharp.Core.Unittests.FSharp_Core.Microsoft_FSharp_Control +namespace FSharp.Core.UnitTests.FSharp_Core.Microsoft_FSharp_Control #nowarn "52" open System -open FSharp.Core.Unittests.LibraryTestFx +open FSharp.Core.UnitTests.LibraryTestFx open NUnit.Framework open System.Threading @@ -306,3 +306,5 @@ type CancellationType() = Assert.IsFalse((r1a <> r1a')) Assert.IsTrue((r1a <> r1b)) Assert.IsTrue((r1a <> r2)) + + diff --git a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Control/ContinuationsThreadingDetailsStandaloneExe.fs b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Control/ContinuationsThreadingDetailsStandaloneExe.fs similarity index 100% rename from src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Control/ContinuationsThreadingDetailsStandaloneExe.fs rename to tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Control/ContinuationsThreadingDetailsStandaloneExe.fs diff --git a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Control/EventModule.fs b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Control/EventModule.fs similarity index 98% rename from src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Control/EventModule.fs rename to tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Control/EventModule.fs index 0afb0c98310..84ac5f34e6e 100644 --- a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Control/EventModule.fs +++ b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Control/EventModule.fs @@ -3,10 +3,10 @@ // Various tests for the: // Microsoft.FSharp.Control.Event module -namespace FSharp.Core.Unittests.FSharp_Core.Microsoft_FSharp_Control +namespace FSharp.Core.UnitTests.FSharp_Core.Microsoft_FSharp_Control open System -open FSharp.Core.Unittests.LibraryTestFx +open FSharp.Core.UnitTests.LibraryTestFx open NUnit.Framework (* diff --git a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Control/LazyType.fs b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Control/LazyType.fs similarity index 97% rename from src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Control/LazyType.fs rename to tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Control/LazyType.fs index 2e31018e763..4e114adfa35 100644 --- a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Control/LazyType.fs +++ b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Control/LazyType.fs @@ -1,12 +1,12 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -namespace FSharp.Core.Unittests.FSharp_Core.Microsoft_FSharp_Control +namespace FSharp.Core.UnitTests.FSharp_Core.Microsoft_FSharp_Control open System open NUnit.Framework open Microsoft.FSharp.Collections -open FSharp.Core.Unittests.LibraryTestFx +open FSharp.Core.UnitTests.LibraryTestFx [] type LazyType() = diff --git a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Control/MailboxProcessorType.fs b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Control/MailboxProcessorType.fs similarity index 85% rename from src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Control/MailboxProcessorType.fs rename to tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Control/MailboxProcessorType.fs index 27fba0c03d3..de56a4b1455 100644 --- a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Control/MailboxProcessorType.fs +++ b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Control/MailboxProcessorType.fs @@ -3,10 +3,10 @@ // Various tests for the: // Microsoft.FSharp.Control.MailboxProcessor type -namespace FSharp.Core.Unittests.FSharp_Core.Microsoft_FSharp_Control +namespace FSharp.Core.UnitTests.FSharp_Core.Microsoft_FSharp_Control open System -open FSharp.Core.Unittests.LibraryTestFx +open FSharp.Core.UnitTests.LibraryTestFx open NUnit.Framework open System.Threading open System.Collections.Generic @@ -292,3 +292,43 @@ type MailboxProcessorType() = test() + [] + member this.PostAndAsyncReply_Cancellation() = + + use cancel = new CancellationTokenSource(500) + let mutable gotGood = false + let mutable gotBad = false + + let goodAsync = async { + try + for i in Seq.initInfinite (fun i -> i) do + if i % 10000000 = 0 then + printfn "good async working..." + finally + printfn "good async exited - that's what we want" + gotGood <- true + } + + let badAsync (mbox:MailboxProcessor>) = async { + try + printfn "bad async working..." + let! result = mbox.PostAndAsyncReply id // <- got stuck in here forever + printfn "%d" result + finally + printfn "bad async exited - that's what we want" // <- we never got here + gotBad <- true + } + + let mbox = MailboxProcessor.Start(fun inbox -> async { + let! (reply : AsyncReplyChannel) = inbox.Receive() + do! Async.Sleep 1000000 + reply.Reply (200) + }, cancel.Token) + + [goodAsync; badAsync mbox] + |> Async.Parallel + |> Async.Ignore + |> fun x -> Async.Start(x, cancel.Token) + System.Threading.Thread.Sleep(1000) // cancellation after 500 + if not gotGood || not gotBad then + failwith "Exected both good and bad async's to be cancelled afteMailbox should not fail!" diff --git a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Control/ObservableModule.fs b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Control/ObservableModule.fs similarity index 98% rename from src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Control/ObservableModule.fs rename to tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Control/ObservableModule.fs index 9770915f844..4562af90b7b 100644 --- a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Control/ObservableModule.fs +++ b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Control/ObservableModule.fs @@ -3,10 +3,10 @@ // Various tests for the: // Microsoft.FSharp.Control.Observable module -namespace FSharp.Core.Unittests.FSharp_Core.Microsoft_FSharp_Control +namespace FSharp.Core.UnitTests.FSharp_Core.Microsoft_FSharp_Control open System -open FSharp.Core.Unittests.LibraryTestFx +open FSharp.Core.UnitTests.LibraryTestFx open NUnit.Framework (* diff --git a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Core/BigIntType.fs b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Core/BigIntType.fs similarity index 98% rename from src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Core/BigIntType.fs rename to tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Core/BigIntType.fs index d3dfeb3c649..0434153fbb6 100644 --- a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Core/BigIntType.fs +++ b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Core/BigIntType.fs @@ -3,12 +3,12 @@ // Various tests for the: // System.Numerics.BigInteger struct -namespace FSharp.Core.Unittests.FSharp_Core.Microsoft_FSharp_Math +namespace FSharp.Core.UnitTests.FSharp_Core.Microsoft_FSharp_Math #nowarn "52" // error FS0052: The value has been copied to ensure the original is not mutated by this operation open System -open FSharp.Core.Unittests.LibraryTestFx +open FSharp.Core.UnitTests.LibraryTestFx open NUnit.Framework open Microsoft.FSharp.Math open System.Numerics @@ -183,8 +183,7 @@ type BigIntType() = Assert.AreEqual(BigInteger.GreatestCommonDivisor(bigPositiveA, bigPositiveB), 900000000090I) Assert.AreEqual(BigInteger.GreatestCommonDivisor(bigNegativeA, bigNegativeB), 900000000090I) Assert.AreEqual(BigInteger.GreatestCommonDivisor(0I, bigPositiveA), bigPositiveA) -#if CROSS_PLATFORM_COMPILER // see https://bugzilla.xamarin.com/show_bug.cgi?id=22591 -#else +#if !CROSS_PLATFORM_COMPILER // see https://bugzilla.xamarin.com/show_bug.cgi?id=22591 Assert.AreEqual(BigInteger.GreatestCommonDivisor(BigInteger(), bigPositiveA), bigPositiveA) Assert.AreEqual(BigInteger.GreatestCommonDivisor(bigPositiveA, BigInteger()), bigPositiveA) Assert.AreEqual(BigInteger.GreatestCommonDivisor(BigInteger(), bigNegativeA), bigPositiveA) @@ -196,9 +195,8 @@ type BigIntType() = [] member this.One() = Assert.AreEqual(BigInteger.One,1I) - () -#if !FSCORE_PORTABLE_OLD + [] member this.Parse() = Assert.AreEqual(BigInteger.Parse("12345678901234567890"), @@ -220,7 +218,6 @@ type BigIntType() = CheckThrowsArgumentNullException(fun() -> BigInteger.Parse(null) |> ignore) () -#endif [] member this.Pow() = diff --git a/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Core/ExtraTopLevelOperatorsTests.fs b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Core/ExtraTopLevelOperatorsTests.fs new file mode 100644 index 00000000000..f861189ae8f --- /dev/null +++ b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Core/ExtraTopLevelOperatorsTests.fs @@ -0,0 +1,222 @@ +namespace FSharp.Core.UnitTests.FSharp_Core.Microsoft_FSharp_Core + +open NUnit.Framework +open FSharp.Core.UnitTests.LibraryTestFx +open System.Collections +open System.Collections.Generic + +[] +type DictTests () = + + [] + member this.IEnumerable() = + // Legit IE + let ie = (dict [|(1,1);(2,4);(3,9)|]) :> IEnumerable + let enum = ie.GetEnumerator() + + let testStepping() = + CheckThrowsInvalidOperationExn(fun () -> enum.Current |> ignore) + Assert.AreEqual(enum.MoveNext(), true) + Assert.AreEqual(enum.Current, new KeyValuePair(1,1)) + + Assert.AreEqual(enum.MoveNext(), true) + Assert.AreEqual(enum.Current, new KeyValuePair(2,4)) + Assert.AreEqual(enum.MoveNext(), true) + Assert.AreEqual(enum.Current, new KeyValuePair(3,9)) + Assert.AreEqual(enum.MoveNext(), false) + CheckThrowsInvalidOperationExn(fun () -> enum.Current |> ignore) + + testStepping() + enum.Reset() + testStepping() + + // Empty IE + let ie = [] |> dict :> IEnumerable // Note no type args + let enum = ie.GetEnumerator() + + CheckThrowsInvalidOperationExn(fun () -> enum.Current |> ignore) + Assert.AreEqual(enum.MoveNext(), false) + CheckThrowsInvalidOperationExn(fun () -> enum.Current |> ignore) + + [] + member this.IEnumerable_T() = + // Legit IE + let ie = (dict [|(1,1);(2,4);(3,9)|]) :> IEnumerable> + let enum = ie.GetEnumerator() + + let testStepping() = + CheckThrowsInvalidOperationExn(fun () -> enum.Current |> ignore) + Assert.AreEqual(enum.MoveNext(), true) + Assert.AreEqual(enum.Current, new KeyValuePair(1,1)) + + Assert.AreEqual(enum.MoveNext(), true) + Assert.AreEqual(enum.Current, new KeyValuePair(2,4)) + Assert.AreEqual(enum.MoveNext(), true) + Assert.AreEqual(enum.Current, new KeyValuePair(3,9)) + Assert.AreEqual(enum.MoveNext(), false) + CheckThrowsInvalidOperationExn(fun () -> enum.Current |> ignore) + + testStepping() + enum.Reset() + testStepping() + + // Empty IE + let ie = [] |> dict :> IEnumerable // Note no type args + let enum = ie.GetEnumerator() + + CheckThrowsInvalidOperationExn(fun () -> enum.Current |> ignore) + Assert.AreEqual(enum.MoveNext(), false) + CheckThrowsInvalidOperationExn(fun () -> enum.Current |> ignore) + + + [] + member this.IDictionary() = + // Legit ID + let id = (dict [|(1,1);(2,4);(3,9)|]) :> IDictionary<_,_> + + Assert.IsTrue(id.ContainsKey(1)) + Assert.IsFalse(id.ContainsKey(5)) + Assert.AreEqual(id.[1], 1) + Assert.AreEqual(id.[3], 9) + Assert.AreEqual(id.Keys, [| 1; 2; 3|]) + Assert.AreEqual(id.Values, [| 1; 4; 9|]) + + CheckThrowsNotSupportedException(fun () -> id.[2] <-88) + + CheckThrowsNotSupportedException(fun () -> id.Add(new KeyValuePair(4,16))) + let mutable value = 0 + Assert.IsTrue(id.TryGetValue(2, &value)) + Assert.AreEqual(4, value) + Assert.IsFalse(id.TryGetValue(100, &value)) + Assert.AreEqual(4, value) + CheckThrowsNotSupportedException(fun () -> id.Remove(1) |> ignore) + + // Empty ID + let id = dict [] :> IDictionary // Note no type args + Assert.IsFalse(id.ContainsKey(5)) + CheckThrowsKeyNotFoundException(fun () -> id.[1] |> ignore) + Assert.AreEqual(id.Keys, [| |] ) + Assert.AreEqual(id.Values, [| |] ) + + [] + member this.``IReadOnlyDictionary on readOnlyDict``() = + let irod = (readOnlyDict [|(1,1);(2,4);(3,9)|]) :> IReadOnlyDictionary<_,_> + + Assert.IsTrue(irod.ContainsKey(1)) + Assert.IsFalse(irod.ContainsKey(5)) + Assert.AreEqual(irod.[1], 1) + Assert.AreEqual(irod.[3], 9) + Assert.AreEqual(irod.Keys, [| 1; 2; 3|]) + Assert.AreEqual(irod.Values, [| 1; 4; 9|]) + + let mutable value = 0 + Assert.IsTrue(irod.TryGetValue(2, &value)) + Assert.AreEqual(4, value) + + Assert.IsFalse(irod.TryGetValue(100, &value)) + + // value should not have been modified + Assert.AreEqual(4, value) + + // Empty IROD + let irod = readOnlyDict [] :> IReadOnlyDictionary // Note no type args + Assert.IsFalse(irod.ContainsKey(5)) + CheckThrowsKeyNotFoundException(fun () -> irod.[1] |> ignore) + Assert.AreEqual(irod.Keys, [| |] ) + Assert.AreEqual(irod.Values, [| |] ) + + [] + member this.ICollection() = + // Legit IC + let ic = (dict [|(1,1);(2,4);(3,9)|]) :> ICollection> + + Assert.AreEqual(ic.Count, 3) + Assert.IsTrue(ic.Contains(new KeyValuePair(3,9))) + let newArr = Array.create 5 (new KeyValuePair(3,9)) + ic.CopyTo(newArr,0) + Assert.IsTrue(ic.IsReadOnly) + + + // raise ReadOnlyCollection exception + CheckThrowsNotSupportedException(fun () -> ic.Add(new KeyValuePair(3,9)) |> ignore) + CheckThrowsNotSupportedException(fun () -> ic.Clear() |> ignore) + CheckThrowsNotSupportedException(fun () -> ic.Remove(new KeyValuePair(3,9)) |> ignore) + + + // Empty IC + let ic = dict [] :> ICollection> + Assert.IsFalse(ic.Contains(new KeyValuePair(3,9))) + let newArr = Array.create 5 (new KeyValuePair(0,0)) + ic.CopyTo(newArr,0) + + [] + member this.``IReadOnlyCollection on readOnlyDict``() = + // Legit IROC + let iroc = (readOnlyDict [|(1,1);(2,4);(3,9)|]) :> IReadOnlyCollection> + + Assert.AreEqual(iroc.Count, 3) + + // Empty IROC + let iroc = readOnlyDict [] :> IReadOnlyCollection> + + Assert.AreEqual(iroc.Count, 0) + + [] + member this.``IEnumerable on readOnlyDict``() = + // Legit IE + let ie = (readOnlyDict [|(1,1);(2,4);(3,9)|]) :> IEnumerable + let enum = ie.GetEnumerator() + + let testStepping() = + CheckThrowsInvalidOperationExn(fun () -> enum.Current |> ignore) + Assert.AreEqual(enum.MoveNext(), true) + Assert.AreEqual(enum.Current, new KeyValuePair(1,1)) + + Assert.AreEqual(enum.MoveNext(), true) + Assert.AreEqual(enum.Current, new KeyValuePair(2,4)) + Assert.AreEqual(enum.MoveNext(), true) + Assert.AreEqual(enum.Current, new KeyValuePair(3,9)) + Assert.AreEqual(enum.MoveNext(), false) + CheckThrowsInvalidOperationExn(fun () -> enum.Current |> ignore) + + testStepping() + enum.Reset() + testStepping() + + // Empty IE + let ie = [] |> readOnlyDict :> IEnumerable // Note no type args + let enum = ie.GetEnumerator() + + CheckThrowsInvalidOperationExn(fun () -> enum.Current |> ignore) + Assert.AreEqual(enum.MoveNext(), false) + CheckThrowsInvalidOperationExn(fun () -> enum.Current |> ignore) + + [] + member this.``IEnumerable_T on readOnlyDict``() = + // Legit IE + let ie = (readOnlyDict [|(1,1);(2,4);(3,9)|]) :> IEnumerable> + let enum = ie.GetEnumerator() + + let testStepping() = + CheckThrowsInvalidOperationExn(fun () -> enum.Current |> ignore) + Assert.AreEqual(enum.MoveNext(), true) + Assert.AreEqual(enum.Current, new KeyValuePair(1,1)) + + Assert.AreEqual(enum.MoveNext(), true) + Assert.AreEqual(enum.Current, new KeyValuePair(2,4)) + Assert.AreEqual(enum.MoveNext(), true) + Assert.AreEqual(enum.Current, new KeyValuePair(3,9)) + Assert.AreEqual(enum.MoveNext(), false) + CheckThrowsInvalidOperationExn(fun () -> enum.Current |> ignore) + + testStepping() + enum.Reset() + testStepping() + + // Empty IE + let ie = [] |> readOnlyDict :> IEnumerable // Note no type args + let enum = ie.GetEnumerator() + + CheckThrowsInvalidOperationExn(fun () -> enum.Current |> ignore) + Assert.AreEqual(enum.MoveNext(), false) + CheckThrowsInvalidOperationExn(fun () -> enum.Current |> ignore) diff --git a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Core/IntConversions.fs b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Core/IntConversions.fs similarity index 89% rename from src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Core/IntConversions.fs rename to tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Core/IntConversions.fs index fb05f2657fa..7aef9cc285d 100644 --- a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Core/IntConversions.fs +++ b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Core/IntConversions.fs @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -namespace FSharp.Core.Unittests.FSharp_Core.FSharp.Core +namespace FSharp.Core.UnitTests.FSharp_Core.FSharp.Core open System open NUnit.Framework -open FSharp.Core.Unittests.LibraryTestFx +open FSharp.Core.UnitTests.LibraryTestFx [] type IntConversions() = diff --git a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Core/IntConversionsGenerated.fs b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Core/IntConversionsGenerated.fs similarity index 99% rename from src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Core/IntConversionsGenerated.fs rename to tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Core/IntConversionsGenerated.fs index 571f69e74a4..71eabe6e84e 100644 --- a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Core/IntConversionsGenerated.fs +++ b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Core/IntConversionsGenerated.fs @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. // This file is automatically generated by IntConversionsTestGenerator.fsx -namespace FSharp.Core.Unittests.FSharp_Core.FSharp.Core +namespace FSharp.Core.UnitTests.FSharp_Core.FSharp.Core open System open NUnit.Framework -open FSharp.Core.Unittests.LibraryTestFx +open FSharp.Core.UnitTests.LibraryTestFx module UInt8 = let MinValue = Byte.MinValue diff --git a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Core/IntConversionsTestGenerator.fsx b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Core/IntConversionsTestGenerator.fsx similarity index 99% rename from src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Core/IntConversionsTestGenerator.fsx rename to tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Core/IntConversionsTestGenerator.fsx index 75fcfc4637a..3e6dd65d722 100644 --- a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Core/IntConversionsTestGenerator.fsx +++ b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Core/IntConversionsTestGenerator.fsx @@ -43,10 +43,10 @@ do let preamble = @" // This file is automatically generated by IntConversionsTestGenerator.fsx -namespace FSharp.Core.Unittests.FSharp_Core.FSharp.Core +namespace FSharp.Core.UnitTests.FSharp_Core.FSharp.Core open System open NUnit.Framework -open FSharp.Core.Unittests.LibraryTestFx +open FSharp.Core.UnitTests.LibraryTestFx module UInt8 = let MinValue = Byte.MinValue diff --git a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Core/OptionModule.fs b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Core/OptionModule.fs similarity index 81% rename from src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Core/OptionModule.fs rename to tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Core/OptionModule.fs index 7b5fbc89098..5726775deff 100644 --- a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Core/OptionModule.fs +++ b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Core/OptionModule.fs @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -namespace FSharp.Core.Unittests.FSharp_Core.Microsoft_FSharp_Core +namespace FSharp.Core.UnitTests.FSharp_Core.Microsoft_FSharp_Core open NUnit.Framework @@ -215,4 +215,37 @@ type OptionModule() = member this.MapBindEquivalenceProperties () = let fn x = x + 3 Assert.AreEqual(Option.map fn None, Option.bind (fn >> Some) None) - Assert.AreEqual(Option.map fn (Some 5), Option.bind (fn >> Some) (Some 5)) \ No newline at end of file + Assert.AreEqual(Option.map fn (Some 5), Option.bind (fn >> Some) (Some 5)) + +[] +type ValueOptionTests() = + + let assertWasNotCalledThunk () = raise (exn "Thunk should not have been called.") + + [] + member this.ValueOptionBasics () = + Assert.AreEqual( (ValueNone: int voption), (ValueNone: int voption)) + Assert.True( (ValueNone: int voption) <= (ValueNone: int voption)) + Assert.True( (ValueNone: int voption) >= (ValueNone: int voption)) + Assert.True( (ValueNone: int voption) < (ValueSome 1: int voption)) + Assert.True( (ValueSome 0: int voption) < (ValueSome 1: int voption)) + Assert.True( (ValueSome 1: int voption) > (ValueSome 0: int voption)) + Assert.False( (ValueSome 1: int voption) < (ValueNone : int voption)) + Assert.True( (ValueSome 1: int voption) <= (ValueSome 1: int voption)) + Assert.AreEqual( compare (ValueSome 1) (ValueSome 1), 0) + Assert.True( compare (ValueSome 0) (ValueSome 1) < 0) + Assert.True( compare (ValueNone: int voption) (ValueSome 1) < 0) + Assert.True( compare (ValueSome 1) (ValueNone : int voption) > 0) + Assert.AreEqual( ValueSome 1, ValueSome 1) + Assert.AreNotEqual( ValueSome 2, ValueSome 1) + Assert.AreEqual( ValueSome 2, ValueSome 2) + Assert.AreEqual( ValueSome (ValueSome 2), ValueSome (ValueSome 2)) + Assert.AreNotEqual( ValueSome (ValueSome 2), ValueSome (ValueSome 1)) + Assert.AreNotEqual( ValueSome (ValueSome 0), ValueSome ValueNone) + Assert.AreEqual( ValueSome (ValueNone: int voption), ValueSome (ValueNone: int voption)) + Assert.AreEqual( (ValueSome (ValueNone: int voption)).Value, (ValueNone: int voption)) + Assert.AreEqual( (ValueSome 1).Value, 1) + Assert.AreEqual( (ValueSome (1,2)).Value, (1,2)) + Assert.AreEqual(defaultValueArg ValueNone 1, 1) + Assert.AreEqual(defaultValueArg (ValueSome 3) 1, 3) + diff --git a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Core/PrintfTests.fs b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Core/PrintfTests.fs similarity index 86% rename from src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Core/PrintfTests.fs rename to tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Core/PrintfTests.fs index d9a77d90cbd..1454ea80e7e 100644 --- a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Core/PrintfTests.fs +++ b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Core/PrintfTests.fs @@ -3,10 +3,10 @@ // Various tests for: // Microsoft.FSharp.Core.ExtraTopLevelOperators.printf -namespace FSharp.Core.Unittests.FSharp_Core.Microsoft_FSharp_Core +namespace FSharp.Core.UnitTests.FSharp_Core.Microsoft_FSharp_Core open System -open FSharp.Core.Unittests.LibraryTestFx +open FSharp.Core.UnitTests.LibraryTestFx open NUnit.Framework [] diff --git a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Core/ResultTests.fs b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Core/ResultTests.fs similarity index 95% rename from src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Core/ResultTests.fs rename to tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Core/ResultTests.fs index db4b6a94871..9b46df189e6 100644 --- a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Core/ResultTests.fs +++ b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Core/ResultTests.fs @@ -3,10 +3,10 @@ // Various tests for: // Microsoft.FSharp.Core.Result -namespace FSharp.Core.Unittests.FSharp_Core.Microsoft_FSharp_Core +namespace FSharp.Core.UnitTests.FSharp_Core.Microsoft_FSharp_Core open System -open FSharp.Core.Unittests.LibraryTestFx +open FSharp.Core.UnitTests.LibraryTestFx open NUnit.Framework type EmailValidation= diff --git a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Quotations/FSharpQuotations.fs b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Quotations/FSharpQuotations.fs similarity index 96% rename from src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Quotations/FSharpQuotations.fs rename to tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Quotations/FSharpQuotations.fs index abb238befa6..ab5e8f9bd2e 100644 --- a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Quotations/FSharpQuotations.fs +++ b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Quotations/FSharpQuotations.fs @@ -2,10 +2,10 @@ // Various tests for Microsoft.FSharp.Quotations -namespace FSharp.Core.Unittests.FSharp_Core.Microsoft_FSharp_Quotations +namespace FSharp.Core.UnitTests.FSharp_Core.Microsoft_FSharp_Quotations open System -open FSharp.Core.Unittests.LibraryTestFx +open FSharp.Core.UnitTests.LibraryTestFx open NUnit.Framework open Microsoft.FSharp.Quotations diff --git a/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Reflection/FSharpReflection.fs b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Reflection/FSharpReflection.fs new file mode 100644 index 00000000000..7e1dec5a2ff --- /dev/null +++ b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Reflection/FSharpReflection.fs @@ -0,0 +1,1272 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +// Various tests for Microsoft.FSharp.Reflection + +namespace FSharp.Core.UnitTests.FSharp_Core.Microsoft_FSharp_Reflection + +open System +open System.Reflection + +open FSharp.Core.UnitTests.LibraryTestFx +open NUnit.Framework + +open Microsoft.FSharp.Reflection + +(* +[Test Strategy] +Make sure each method works on: +* Generic types +* Null +* DiscriminatedUnion +* Delegate +* Record +* Exception +* Tuple +* Fuction +* Struct versions of the above +*) + +#if FX_RESHAPED_REFLECTION +module PrimReflectionAdapters = + open System.Linq + + type System.Type with + member this.Assembly = this.GetTypeInfo().Assembly + member this.IsGenericType = this.GetTypeInfo().IsGenericType + member this.IsValueType = this.GetTypeInfo().IsValueType + member this.IsAssignableFrom(otherTy : Type) = this.GetTypeInfo().IsAssignableFrom(otherTy.GetTypeInfo()) + member this.GetProperty(name) = this.GetRuntimeProperty(name) + member this.GetProperties() = this.GetRuntimeProperties() |> Array.ofSeq + member this.GetMethod(name, parameterTypes) = this.GetRuntimeMethod(name, parameterTypes) + member this.GetCustomAttributes(attrTy : Type, inherits : bool) : obj[] = + unbox (box (CustomAttributeExtensions.GetCustomAttributes(this.GetTypeInfo(), attrTy, inherits).ToArray())) + + type System.Reflection.MemberInfo with + member this.ReflectedType = this.DeclaringType + + type System.Reflection.Assembly with + member this.GetTypes() = this.DefinedTypes |> Seq.map (fun ti -> ti.AsType()) |> Array.ofSeq + +open PrimReflectionAdapters +#endif + +module IsModule = + type IsModuleType () = + member __.M = 1 + +type FSharpDelegate = delegate of int -> string + +type RecordType = { field1 : string; field2 : RecordType option; field3 : (unit -> RecordType * string) } +type GenericRecordType<'T, 'U> = { field1 : 'T; field2 : 'U; field3 : (unit -> GenericRecordType<'T, 'U>) } + +[] +type StructRecordType = { field1 : string; field2 : StructRecordType option; field3 : (unit -> StructRecordType * string) } + +type SingleNullaryCaseDiscUnion = SingleNullaryCaseTag +type SingleCaseDiscUnion = SingleCaseTag of float * float * float + +[] +type SingleNullaryCaseDiscStructUnion = SingleNullaryCaseTagStruct +[] +type SingleCaseDiscStructUnion = SingleCaseTagStruct of float * float * float + +type DiscUnionType<'T> = + | A // No data associated with tag + | B of 'T * DiscUnionType<'T> option + | C of float * string + +type DiscStructUnionType<'T> = + | A // No data associated with tag + | B of 'T + | C of float * string + +exception ExceptionInt of int + +exception DatalessException + +module FSharpModule = + type ModuleType() = + class + end + +[] +type FSharpValueTests() = + + // global variables + let rec record1 : RecordType = { field1 = "field1"; field2 = Some(record1); field3 = ( fun () -> (record1, "") )} + let record2 : RecordType = { field1 = "field2"; field2 = Some(record1); field3 = ( fun () -> (record1, "") )} + + // global variables + let rec structRecord1 : StructRecordType = { field1 = "field1"; field2 = None; field3 = ( fun () -> (structRecord1, "") )} + let structRecord2 : StructRecordType = { field1 = "field2"; field2 = Some(structRecord1); field3 = ( fun () -> (structRecord1, "") )} + + let rec genericRecordType1 : GenericRecordType = + { + field1 = "field1" + field2 = 1 + field3 = (fun () -> genericRecordType1) + } + + let genericRecordType2 : GenericRecordType = { field1 = "field1"; field2 = 1; field3 = ( fun () -> genericRecordType1 )} + + let nullValue = null + + let singleCaseUnion1 = SingleCaseDiscUnion.SingleCaseTag(1.0, 2.0, 3.0) + let singleCaseUnion2 = SingleCaseDiscUnion.SingleCaseTag(4.0, 5.0, 6.0) + + let singleCaseStructUnion1 = SingleCaseDiscStructUnion.SingleCaseTagStruct(1.0, 2.0, 3.0) + let singleCaseStructUnion2 = SingleCaseDiscStructUnion.SingleCaseTagStruct(4.0, 5.0, 6.0) + + let discUnionCaseA = DiscUnionType.A + let discUnionCaseB = DiscUnionType.B(1, Some(discUnionCaseA)) + let discUnionCaseC = DiscUnionType.C(1.0, "stringparam") + + let discUnionRecCaseB = DiscUnionType.B(1, Some(discUnionCaseB)) + + let discStructUnionCaseA = DiscStructUnionType.A + let discStructUnionCaseB = DiscStructUnionType.B(1) + let discStructUnionCaseC = DiscStructUnionType.C(1.0, "stringparam") + + + let fsharpDelegate1 = new FSharpDelegate(fun (x:int) -> "delegate1") + let fsharpDelegate2 = new FSharpDelegate(fun (x:int) -> "delegate2") + + let tuple1 = ( 1, "tuple1") + let tuple2 = ( 2, "tuple2", (fun x -> x + 1)) + let tuple3 = ( 1, ( 2, "tuple")) + + let structTuple1 = struct ( 1, "tuple1") + let structTuple2 = struct ( 2, "tuple2", (fun x -> x + 1)) + let structTuple3 = struct ( 1, struct ( 2, "tuple")) + + let func1 param = param + 1 + let func2 param = param + "" + + let exInt = ExceptionInt(1) + let exDataless = DatalessException + + [] + member __.Equals1() = + // Record value + Assert.IsTrue(FSharpValue.Equals(record1, record1)) + Assert.IsFalse(FSharpValue.Equals(record1, record2)) + + [] + member __.Equals2() = + Assert.IsTrue(FSharpValue.Equals(structRecord1, structRecord1)) + Assert.IsFalse(FSharpValue.Equals(structRecord1, structRecord2)) + Assert.IsFalse(FSharpValue.Equals(structRecord1, record2)) + Assert.IsFalse(FSharpValue.Equals(record1, structRecord1)) + Assert.IsFalse(FSharpValue.Equals(record2, structRecord2)) + + [] + member __.Equals3() = + // Generic Record value + Assert.IsTrue(FSharpValue.Equals(genericRecordType1, genericRecordType1)) + Assert.IsFalse(FSharpValue.Equals(genericRecordType1, genericRecordType2)) + + [] + member __.Equals4() = + // null value + Assert.IsTrue(FSharpValue.Equals(nullValue, nullValue)) + Assert.IsFalse(FSharpValue.Equals(nullValue, 1)) + + [] + member __.Equals5() = + // Single Case Union + Assert.IsTrue(FSharpValue.Equals(singleCaseUnion1, singleCaseUnion1)) + Assert.IsFalse(FSharpValue.Equals(singleCaseUnion1, singleCaseUnion2)) + + [] + member __.Equals6() = + // Single Case Union + Assert.IsTrue(FSharpValue.Equals(singleCaseStructUnion1, singleCaseStructUnion1)) + Assert.IsFalse(FSharpValue.Equals(singleCaseStructUnion1, singleCaseStructUnion2)) + + [] + member __.Equals7() = + // Discriminated Union + Assert.IsTrue(FSharpValue.Equals(discUnionCaseA, discUnionCaseA)) + Assert.IsFalse(FSharpValue.Equals(discUnionCaseB, discUnionCaseC)) + + [] + member __.Equals8() = + // Discriminated Union + Assert.IsTrue(FSharpValue.Equals(discStructUnionCaseA, discStructUnionCaseA)) + Assert.IsFalse(FSharpValue.Equals(discStructUnionCaseB, discStructUnionCaseC)) + + [] + member __.Equals9() = + // FSharpDelegate + Assert.IsTrue(FSharpValue.Equals(fsharpDelegate1, fsharpDelegate1)) + Assert.IsFalse(FSharpValue.Equals(fsharpDelegate1, fsharpDelegate2)) + + [] + member __.Equals10() = + // Tuple + Assert.IsTrue(FSharpValue.Equals(tuple1, tuple1)) + Assert.IsFalse(FSharpValue.Equals( (1, 2, 3), (4, 5, 6) )) + + [] + member __.Equals10b() = + // Tuple + Assert.IsTrue(FSharpValue.Equals(structTuple1, structTuple1)) + Assert.IsFalse(FSharpValue.Equals( struct (1, 2, 3), struct (4, 5, 6) )) + + [] + member __.Equals11() = + // Tuples of differing types + Assert.IsFalse(FSharpValue.Equals(tuple1, tuple2)) + + [] + member __.Equals12() = + // Exception + Assert.IsTrue(FSharpValue.Equals(exInt, exInt)) + Assert.IsFalse(FSharpValue.Equals(exInt, exDataless)) + + [] + member __.GetExceptionFields() = + + // int + Assert.AreEqual(FSharpValue.GetExceptionFields(exInt), ([|1|] : obj [])) + + // dataless + Assert.AreEqual(FSharpValue.GetExceptionFields(exDataless), [||]) + + // invalid type + CheckThrowsArgumentException(fun () -> FSharpValue.GetExceptionFields(1) |> ignore) + CheckThrowsArgumentException(fun () -> FSharpValue.GetExceptionFields( () ) |> ignore) + + // System Exception + CheckThrowsArgumentException(fun () -> FSharpValue.GetExceptionFields(new System.Exception("ex message")) |> ignore) + + // null + CheckThrowsArgumentException(fun () -> FSharpValue.GetExceptionFields(null) |> ignore) + + [] + member __.GetRecordField() = + + // Record + let propertyinfo1 = (typeof).GetProperty("field1") + Assert.AreEqual((FSharpValue.GetRecordField(record1, propertyinfo1)), "field1") + + // Generic Record value + let propertyinfo2 = (typeof>).GetProperty("field2") + Assert.AreEqual((FSharpValue.GetRecordField(genericRecordType1, propertyinfo2)), 1) + + // null value + CheckThrowsArgumentException(fun () ->FSharpValue.GetRecordField(null, propertyinfo1)|> ignore) + CheckThrowsArgumentException(fun () ->FSharpValue.GetRecordField( () , propertyinfo1)|> ignore) + + // invalid value + CheckThrowsArgumentException(fun () -> FSharpValue.GetRecordField("invalid", propertyinfo1) |> ignore) + + // invalid property info + let propertyinfoint = (typeof).GetProperty("fieldstring") + CheckThrowsArgumentException(fun () -> FSharpValue.GetRecordField("invalid", propertyinfoint) |> ignore) + + [] + member __.GetStructRecordField() = + + // Record + let propertyinfo1 = (typeof).GetProperty("field1") + Assert.AreEqual((FSharpValue.GetRecordField(structRecord1, propertyinfo1)), "field1") + + // null value + CheckThrowsArgumentException(fun () ->FSharpValue.GetRecordField(null, propertyinfo1)|> ignore) + CheckThrowsArgumentException(fun () ->FSharpValue.GetRecordField( () , propertyinfo1)|> ignore) + + // invalid value + CheckThrowsArgumentException(fun () -> FSharpValue.GetRecordField("invalid", propertyinfo1) |> ignore) + + // invalid property info + let propertyinfoint = (typeof).GetProperty("fieldstring") + CheckThrowsArgumentException(fun () -> FSharpValue.GetRecordField("invalid", propertyinfoint) |> ignore) + + [] + member __.GetRecordFields() = + // Record + let propertyinfo1 = (typeof).GetProperty("field1") + Assert.AreEqual((FSharpValue.GetRecordFields(record1)).[0], "field1") + + // Generic Record value + let propertyinfo2 = (typeof>).GetProperty("field1") + Assert.AreEqual((FSharpValue.GetRecordFields(genericRecordType1)).[0], "field1") + + // null value + CheckThrowsArgumentException(fun () -> FSharpValue.GetRecordFields(null)|> ignore) + CheckThrowsArgumentException(fun () -> FSharpValue.GetRecordFields( () )|> ignore) + + // invalid value + CheckThrowsArgumentException(fun () -> FSharpValue.GetRecordFields("invalid") |> ignore) + + [] + member __.GetStructRecordFields() = + let propertyinfo1 = (typeof).GetProperty("field1") + Assert.AreEqual((FSharpValue.GetRecordFields(structRecord1)).[0], "field1") + + [] + member __.GetTupleField() = + // Tuple + Assert.AreEqual((FSharpValue.GetTupleField(tuple1, 0)), 1) + + // Tuple with function element + Assert.AreEqual( FSharpValue.GetTupleField(tuple2, 1), "tuple2") + + // null value + CheckThrowsArgumentException(fun () -> FSharpValue.GetTupleField(null, 3)|> ignore) + CheckThrowsArgumentException(fun () -> FSharpValue.GetTupleField( () , 3)|> ignore) + + // invalid value + CheckThrowsArgumentException(fun () -> FSharpValue.GetTupleField("Invalid", 3)|> ignore) + + // index out of range + CheckThrowsArgumentException(fun () -> FSharpValue.GetTupleField(tuple2, 8)|> ignore) + + [] + member __.GetStructTupleField() = + // Tuple + Assert.AreEqual((FSharpValue.GetTupleField(structTuple1, 0)), 1) + + // Tuple with function element + Assert.AreEqual( FSharpValue.GetTupleField(structTuple2, 1), "tuple2") + + // index out of range + CheckThrowsArgumentException(fun () -> FSharpValue.GetTupleField(structTuple2, 8)|> ignore) + + [] + member __.GetTupleFields() = + // Tuple + Assert.AreEqual(FSharpValue.GetTupleFields(tuple1).[0], 1) + + // Tuple with function element + Assert.AreEqual( (FSharpValue.GetTupleFields(tuple2)).[1], "tuple2") + + // null value + CheckThrowsArgumentException(fun () -> FSharpValue.GetTupleFields(null)|> ignore) + CheckThrowsArgumentException(fun () -> FSharpValue.GetTupleFields( () )|> ignore) + + // invalid value + CheckThrowsArgumentException(fun () -> FSharpValue.GetTupleFields("Invalid")|> ignore) + + [] + member __.GetStructTupleFields() = + // Tuple + Assert.AreEqual(FSharpValue.GetTupleFields(structTuple1).[0], 1) + + // Tuple with function element + Assert.AreEqual( (FSharpValue.GetTupleFields(structTuple2)).[1], "tuple2") + + [] + member __.GetUnionFields() = + // single case union + let (singlecaseinfo, singlevaluearray) = FSharpValue.GetUnionFields(singleCaseUnion1, typeof) + Assert.AreEqual(singlevaluearray, ([|1.0;2.0;3.0|] : obj [])) + + // DiscUnionType + let (duCaseinfo, duValueArray) = FSharpValue.GetUnionFields(discUnionCaseB, typeof>) + Assert.AreEqual(duValueArray.[0], 1) + + // null value + CheckThrowsArgumentException(fun () -> FSharpValue.GetUnionFields(null, null)|> ignore) + CheckThrowsArgumentException(fun () -> FSharpValue.GetUnionFields( () , null)|> ignore) + + [] + member __.GetStructUnionFields() = + // single case union + let (_singlecaseinfo, singlevaluearray) = FSharpValue.GetUnionFields(singleCaseStructUnion1, typeof) + Assert.AreEqual(singlevaluearray, ([|1.0;2.0;3.0|] : obj [])) + + // DiscUnionType + let (_duCaseinfo, duValueArray) = FSharpValue.GetUnionFields(discStructUnionCaseB, typeof>) + Assert.AreEqual(duValueArray.[0], 1) + + [] + member __.MakeFunction() = + + // Int function + let implementationInt (x:obj) = box( unbox(x) + 1) + let resultFuncIntObj = FSharpValue.MakeFunction(typeof int>, implementationInt ) + let resultFuncInt = resultFuncIntObj :?> (int -> int) + Assert.AreEqual(resultFuncInt(5), 6) + + // String funcion + let implementationString (x:obj) = box( unbox(x) + " function") + let resultFuncStringObj = FSharpValue.MakeFunction(typeof string>, implementationString ) + let resultFuncString = resultFuncStringObj :?> (string -> string) + Assert.AreEqual(resultFuncString("parameter"), "parameter function") + + [] + member __.MakeRecord() = + // Record + let makeRecord = FSharpValue.MakeRecord(typeof, [| box"field1"; box(Some(record1)); box( fun () -> (record1, "")) |]) + Assert.AreEqual(FSharpValue.GetRecordFields(makeRecord).[0], "field1") + + // Generic Record value + let makeRecordGeneric = FSharpValue.MakeRecord(typeof>, [| box"field1"; box 1; box( fun () -> genericRecordType1) |]) + Assert.AreEqual(FSharpValue.GetRecordFields(makeRecordGeneric).[0], "field1") + + // null value + CheckThrowsArgumentException(fun () ->FSharpValue.MakeRecord(null, null)|> ignore) + + // invalid value + CheckThrowsArgumentException(fun () -> FSharpValue.MakeRecord(typeof>, [| box 1; box("invalid param"); box("invalid param") |])|> ignore) + + [] + member __.MakeStructRecord() = + // Record + let makeRecord = FSharpValue.MakeRecord(typeof, [| box"field1"; box(Some(structRecord1)); box( fun () -> (structRecord1, "")) |]) + Assert.AreEqual(FSharpValue.GetRecordFields(makeRecord).[0], "field1") + + [] + member __.MakeTuple() = + // Tuple + let makeTuple = FSharpValue.MakeTuple([| box 1; box("tuple") |], typeof>) + Assert.AreEqual(FSharpValue.GetTupleFields(makeTuple).[0], 1) + + // Tuple with function + let makeTuplewithFunc = FSharpValue.MakeTuple([| box 1; box "tuple with func"; box (fun x -> x + 1) |], typeof int)>>) + Assert.AreEqual(FSharpValue.GetTupleFields(makeTuplewithFunc).[1], "tuple with func") + + // null value + CheckThrowsArgumentNullException(fun () ->FSharpValue.MakeTuple(null, null)|> ignore) + + // invalid value + CheckThrowsArgumentException(fun () -> FSharpValue.MakeTuple([| box"invalid param"; box"invalid param"|], typeof>) |> ignore) + + [] + member __.MakeStructTuple() = + // Tuple + let makeTuple = FSharpValue.MakeTuple([| box 1; box("tuple") |], typeof) + Assert.AreEqual(FSharpValue.GetTupleFields(makeTuple).[0], 1) + Assert.AreEqual(FSharpValue.GetTupleFields(makeTuple).[1], "tuple") + + // Tuple with function + let makeTuplewithFunc = FSharpValue.MakeTuple([| box 1; box "tuple with func"; box (fun x -> x + 1) |], typeof int))>) + Assert.AreEqual(FSharpValue.GetTupleFields(makeTuplewithFunc).[0], 1) + Assert.AreEqual(FSharpValue.GetTupleFields(makeTuplewithFunc).[1], "tuple with func") + + // invalid value + CheckThrowsArgumentException(fun () -> FSharpValue.MakeTuple([| box"invalid param"; box"invalid param"|], typeof) |> ignore) + + [] + member __.MakeUnion() = + // single case union + let (singlecaseinfo, _singlevaluearray) = FSharpValue.GetUnionFields(singleCaseUnion1, typeof) + let resultSingleCaseUnion=FSharpValue.MakeUnion(singlecaseinfo, [| box 1.0; box 2.0; box 3.0|]) + Assert.AreEqual(resultSingleCaseUnion, singleCaseUnion1) + + // DiscUnionType + let (duCaseinfo, _duValueArray) = FSharpValue.GetUnionFields(discUnionCaseB, typeof>) + let resultDiscUnion=FSharpValue.MakeUnion(duCaseinfo, [| box 1; box (Some discUnionCaseB) |]) + Assert.AreEqual(resultDiscUnion, discUnionRecCaseB) + + [] + member __.MakeStructUnion() = + // single case union + let (singlecaseinfo, _singlevaluearray) = FSharpValue.GetUnionFields(singleCaseStructUnion1, typeof) + let resultSingleCaseUnion=FSharpValue.MakeUnion(singlecaseinfo, [| box 1.0; box 2.0; box 3.0|]) + Assert.AreEqual(resultSingleCaseUnion, singleCaseStructUnion1) + + // DiscUnionType + let (duCaseinfo, duValueArray) = FSharpValue.GetUnionFields(discStructUnionCaseB, typeof>) + FSharpValue.MakeUnion(duCaseinfo, [| box 1|]) |> ignore + + [] + member __.PreComputeRecordConstructor() = + // Record + let recCtor = FSharpValue.PreComputeRecordConstructor(typeof) + let resultRecordType = recCtor([| box("field1"); box(Some(record1)); box(fun () -> (record1, "")) |]) + Assert.AreEqual( (unbox(resultRecordType)).field1 , record1.field1) + + // Generic Record value + let genericRecCtor = FSharpValue.PreComputeRecordConstructor(typeof>) + let resultGenericRecordType = genericRecCtor([| box("field1"); box 2; box( fun () -> genericRecordType1) |]) + Assert.AreEqual( (unbox>(resultGenericRecordType)).field1, genericRecordType1.field1) + + // null value + CheckThrowsArgumentException(fun () ->FSharpValue.PreComputeRecordConstructor(null)|> ignore) + + // invalid value + CheckThrowsArgumentException(fun () -> FSharpValue.PreComputeRecordConstructor(typeof>) |> ignore) + + [] + member __.PreComputeStructRecordConstructor() = + // Record + let recCtor = FSharpValue.PreComputeRecordConstructor(typeof) + let resultRecordType = recCtor([| box("field1"); box(Some(structRecord1)); box(fun () -> (structRecord1, "")) |]) + Assert.AreEqual( (unbox(resultRecordType)).field1 , structRecord1.field1) + + + [] + member __.PreComputeRecordConstructorInfo() = + // Record + let recordCtorInfo = FSharpValue.PreComputeRecordConstructorInfo(typeof) + Assert.AreEqual(recordCtorInfo.ReflectedType, typeof ) + + // Generic Record value + let genericrecordCtorInfo = FSharpValue.PreComputeRecordConstructorInfo(typeof>) + Assert.AreEqual(genericrecordCtorInfo.ReflectedType, typeof>) + + // null value + CheckThrowsArgumentException(fun () ->FSharpValue.PreComputeRecordConstructorInfo(null)|> ignore) + + // invalid value + CheckThrowsArgumentException(fun () -> FSharpValue.PreComputeRecordConstructorInfo(typeof>) |> ignore) + + [] + member __.PreComputeStructRecordConstructorInfo() = + // Record + let recordCtorInfo = FSharpValue.PreComputeRecordConstructorInfo(typeof) + Assert.AreEqual(recordCtorInfo.ReflectedType, typeof ) + + [] + member __.PreComputeRecordFieldReader() = + // Record + let recordFieldReader = FSharpValue.PreComputeRecordFieldReader((typeof).GetProperty("field1")) + Assert.AreEqual(recordFieldReader(record1), box("field1")) + + // Generic Record value + let recordFieldReader = FSharpValue.PreComputeRecordFieldReader((typeof>).GetProperty("field1")) + Assert.AreEqual(recordFieldReader(genericRecordType1), box("field1")) + + // null value + CheckThrowsArgumentException(fun () -> FSharpValue.PreComputeRecordFieldReader(null)|> ignore) + + [] + member __.PreComputeStructRecordFieldReader() = + // Record + let recordFieldReader = FSharpValue.PreComputeRecordFieldReader((typeof).GetProperty("field1")) + Assert.AreEqual(recordFieldReader(structRecord1), box("field1")) + + [] + member __.PreComputeRecordReader() = + // Record + let recordReader = FSharpValue.PreComputeRecordReader(typeof) + Assert.AreEqual( (recordReader(record1)).[0], "field1") + + // Generic Record value + let genericrecordReader = FSharpValue.PreComputeRecordReader(typeof>) + Assert.AreEqual( (genericrecordReader(genericRecordType1)).[0], "field1") + + // null value + CheckThrowsArgumentException(fun () ->FSharpValue.PreComputeRecordReader(null)|> ignore) + + // invalid value + CheckThrowsArgumentException(fun () -> FSharpValue.PreComputeRecordReader(typeof>) |> ignore) + + [] + member __.PreComputeStructRecordReader() = + // Record + let recordReader = FSharpValue.PreComputeRecordReader(typeof) + Assert.AreEqual( (recordReader(structRecord1)).[0], "field1") + + [] + member __.PreComputeTupleConstructor() = + // Tuple + let tupleCtor = FSharpValue.PreComputeTupleConstructor(tuple1.GetType()) + Assert.AreEqual( tupleCtor([| box 1; box "tuple1" |]) , box(tuple1)) + + // Tuple with function member + let tuplewithFuncCtor = FSharpValue.PreComputeTupleConstructor(tuple2.GetType()) + let resultTuplewithFunc = tuplewithFuncCtor([| box 2; box "tuple2"; box (fun x -> x + 1) |]) + Assert.AreEqual( FSharpValue.GetTupleFields( box(resultTuplewithFunc)).[1] , "tuple2") + + // nested tuple + let tupleNestedCtor = FSharpValue.PreComputeTupleConstructor(tuple3.GetType()) + Assert.AreEqual( tupleNestedCtor([| box 1; box(2, "tuple") |] ), box(tuple3)) + + // null value + CheckThrowsArgumentException(fun () -> FSharpValue.PreComputeTupleConstructor(null)|> ignore) + + // invalid value + CheckThrowsArgumentException(fun () -> FSharpValue.PreComputeTupleConstructor(typeof>) |> ignore) + CheckThrowsArgumentException(fun () -> FSharpValue.PreComputeTupleConstructor(typeof) |> ignore) + + [] + member __.PreComputeStructTupleConstructor() = + // Tuple + let tupleCtor = FSharpValue.PreComputeTupleConstructor(structTuple1.GetType()) + Assert.AreEqual( tupleCtor([| box 1; box "tuple1" |]) , box(structTuple1)) + + // Tuple with function member + let tuplewithFuncCtor = FSharpValue.PreComputeTupleConstructor(structTuple2.GetType()) + let resultTuplewithFunc = tuplewithFuncCtor([| box 2; box "tuple2"; box (fun x -> x + 1) |]) + Assert.AreEqual( FSharpValue.GetTupleFields( box(resultTuplewithFunc)).[1] , "tuple2") + + // nested tuple + let tupleNestedCtor = FSharpValue.PreComputeTupleConstructor(structTuple3.GetType()) + Assert.AreEqual( tupleNestedCtor([| box 1; box (struct (2, "tuple")) |] ), box(structTuple3)) + + // invalid value + CheckThrowsArgumentException(fun () -> FSharpValue.PreComputeTupleConstructor(typeof>) |> ignore) + + [] + member __.PreComputeTupleConstructorInfo() = + // Tuple + let (tupleCtorInfo, _tupleType) = FSharpValue.PreComputeTupleConstructorInfo(typeof>) + Assert.AreEqual(tupleCtorInfo.ReflectedType, typeof> ) + + // Nested + let (nestedTupleCtorInfo, _nestedTupleType) = FSharpValue.PreComputeTupleConstructorInfo(typeof>>) + Assert.AreEqual(nestedTupleCtorInfo.ReflectedType, typeof>>) + + // null value + CheckThrowsArgumentException(fun () ->FSharpValue.PreComputeTupleConstructorInfo(null)|> ignore) + + // invalid value + CheckThrowsArgumentException(fun () -> FSharpValue.PreComputeTupleConstructorInfo(typeof) |> ignore) + + // invalid value + CheckThrowsArgumentException(fun () -> FSharpValue.PreComputeTupleConstructorInfo(typeof) |> ignore) + + [] + member __.PreComputeStructTupleConstructorInfo() = + // Tuple + let (tupleCtorInfo, _tupleType) = FSharpValue.PreComputeTupleConstructorInfo(typeof) + Assert.AreEqual(tupleCtorInfo.ReflectedType, typeof ) + + // Nested + let (nestedTupleCtorInfo, _nestedTupleType) = FSharpValue.PreComputeTupleConstructorInfo(typeof) + Assert.AreEqual(nestedTupleCtorInfo.ReflectedType, typeof) + + [] + member __.PreComputeTuplePropertyInfo() = + + // Tuple + let (tuplePropInfo, _typeindex) = FSharpValue.PreComputeTuplePropertyInfo(typeof>, 0) + Assert.AreEqual(tuplePropInfo.PropertyType, typeof) + + // Nested + let (tupleNestedPropInfo, _typeindex) = FSharpValue.PreComputeTuplePropertyInfo(typeof>>, 1) + Assert.AreEqual(tupleNestedPropInfo.PropertyType, typeof>) + + // null value + CheckThrowsArgumentException(fun () ->FSharpValue.PreComputeTuplePropertyInfo(null, 0)|> ignore) + + // invalid value + CheckThrowsArgumentException(fun () -> FSharpValue.PreComputeTuplePropertyInfo(typeof, 0) |> ignore) + + // invalid value + CheckThrowsArgumentException(fun () -> FSharpValue.PreComputeTuplePropertyInfo(typeof, 0) |> ignore) + + // This fails as no PropertyInfo's actually exist for struct tuple types. + // + //[] + //member __.PreComputeStructTuplePropertyInfo() = + // + // // Tuple + // let (tuplePropInfo, _typeindex) = FSharpValue.PreComputeTuplePropertyInfo(typeof, 0) + // Assert.AreEqual(tuplePropInfo.PropertyType, typeof) + // + // // Nested + // let (tupleNestedPropInfo, _typeindex) = FSharpValue.PreComputeTuplePropertyInfo(typeof, 1) + // Assert.AreEqual(tupleNestedPropInfo.PropertyType, typeof) + + [] + member __.PreComputeTupleReader() = + + // Tuple + let tuplereader = FSharpValue.PreComputeTupleReader(typeof>) + Assert.AreEqual(tuplereader(tuple1).[0], 1) + + // Nested + let nestedtuplereader = FSharpValue.PreComputeTupleReader(typeof>>) + Assert.AreEqual(nestedtuplereader(tuple3).[1], box(2, "tuple")) + + // null value + CheckThrowsArgumentException(fun () ->FSharpValue.PreComputeTupleReader(null)|> ignore) + + // invalid value + CheckThrowsArgumentException(fun () -> FSharpValue.PreComputeTupleReader(typeof) |> ignore) + + [] + member __.PreComputeStructTupleReader() = + + // Tuple + let tuplereader = FSharpValue.PreComputeTupleReader(typeof) + Assert.AreEqual(tuplereader(structTuple1).[0], 1) + + // Nested + let nestedtuplereader = FSharpValue.PreComputeTupleReader(typeof) + Assert.AreEqual(nestedtuplereader(structTuple3).[1], box (struct (2, "tuple"))) + + // invalid value + CheckThrowsArgumentException(fun () -> FSharpValue.PreComputeTupleReader(typeof) |> ignore) + + [] + member __.PreComputeUnionConstructor() = + + // SingleCaseUnion + let (singlecaseinfo, _singlevaluearray) = FSharpValue.GetUnionFields(singleCaseUnion1, typeof) + let singleUnionCtor = FSharpValue.PreComputeUnionConstructor(singlecaseinfo) + let resuleSingleCaseUnion = singleUnionCtor([| box 1.0; box 2.0; box 3.0|]) + Assert.AreEqual(resuleSingleCaseUnion, singleCaseUnion1) + + // DiscUnion + let (discunioninfo, _discunionvaluearray) = FSharpValue.GetUnionFields(discUnionCaseB, typeof>) + let discUnionCtor = FSharpValue.PreComputeUnionConstructor(discunioninfo) + let resuleDiscUnionB = discUnionCtor([| box 1; box(Some(discUnionCaseB)) |]) + Assert.AreEqual(resuleDiscUnionB, discUnionRecCaseB) + + [] + member __.PreComputeStructUnionConstructor() = + + // SingleCaseUnion + let (singlecaseinfo, _singlevaluearray) = FSharpValue.GetUnionFields(singleCaseStructUnion1, typeof) + let singleUnionCtor = FSharpValue.PreComputeUnionConstructor(singlecaseinfo) + let resuleSingleCaseUnion = singleUnionCtor([| box 1.0; box 2.0; box 3.0|]) + Assert.AreEqual(resuleSingleCaseUnion, singleCaseStructUnion1) + + // DiscUnion + let (discunioninfo, _discunionvaluearray) = FSharpValue.GetUnionFields(discStructUnionCaseB, typeof>) + let discUnionCtor = FSharpValue.PreComputeUnionConstructor(discunioninfo) + let resuleDiscUnionB = discUnionCtor([| box 1|]) + Assert.AreEqual(resuleDiscUnionB, discStructUnionCaseB) + + [] + member __.PreComputeUnionConstructorInfo() = + + // SingleCaseUnion + let (singlecaseinfo, _singlevaluearray) = FSharpValue.GetUnionFields(singleCaseUnion1, typeof) + let singlecaseMethodInfo = FSharpValue.PreComputeUnionConstructorInfo(singlecaseinfo) + Assert.AreEqual(singlecaseMethodInfo.ReflectedType, typeof) + + // DiscUnion + let (discUnionInfo, _discvaluearray) = FSharpValue.GetUnionFields(discUnionCaseB, typeof>) + let discUnionMethodInfo = FSharpValue.PreComputeUnionConstructorInfo(discUnionInfo) + Assert.AreEqual(discUnionMethodInfo.ReflectedType, typeof>) + + [] + member __.PreComputeStructUnionConstructorInfo() = + + // SingleCaseUnion + let (singlecaseinfo, _singlevaluearray) = FSharpValue.GetUnionFields(singleCaseStructUnion1, typeof) + let singlecaseMethodInfo = FSharpValue.PreComputeUnionConstructorInfo(singlecaseinfo) + Assert.AreEqual(singlecaseMethodInfo.ReflectedType, typeof) + + // DiscUnion + let (discUnionInfo, _discvaluearray) = FSharpValue.GetUnionFields(discStructUnionCaseB, typeof>) + let discUnionMethodInfo = FSharpValue.PreComputeUnionConstructorInfo(discUnionInfo) + Assert.AreEqual(discUnionMethodInfo.ReflectedType, typeof>) + + [] + member __.PreComputeUnionReader() = + + // SingleCaseUnion + let (singlecaseinfo, singlevaluearray) = FSharpValue.GetUnionFields(singleCaseUnion1, typeof) + let singlecaseUnionReader = FSharpValue.PreComputeUnionReader(singlecaseinfo) + Assert.AreEqual(singlecaseUnionReader(box(singleCaseUnion1)), [| box 1.0; box 2.0; box 3.0|]) + + // DiscUnion + let (discUnionInfo, discvaluearray) = FSharpValue.GetUnionFields(discUnionRecCaseB, typeof>) + let discUnionReader = FSharpValue.PreComputeUnionReader(discUnionInfo) + Assert.AreEqual(discUnionReader(box(discUnionRecCaseB)) , [| box 1; box(Some(discUnionCaseB)) |]) + + [] + member __.PreComputeStructUnionReader() = + + // SingleCaseUnion + let (singlecaseinfo, singlevaluearray) = FSharpValue.GetUnionFields(singleCaseStructUnion1, typeof) + let singlecaseUnionReader = FSharpValue.PreComputeUnionReader(singlecaseinfo) + Assert.AreEqual(singlecaseUnionReader(box(singleCaseStructUnion1)), [| box 1.0; box 2.0; box 3.0|]) + + // DiscUnion + let (discUnionInfo, discvaluearray) = FSharpValue.GetUnionFields(discStructUnionCaseB, typeof>) + let discUnionReader = FSharpValue.PreComputeUnionReader(discUnionInfo) + Assert.AreEqual(discUnionReader(box(discStructUnionCaseB)) , [| box 1|]) + + [] + member __.PreComputeUnionTagMemberInfo() = + + // SingleCaseUnion + let singlecaseUnionMemberInfo = FSharpValue.PreComputeUnionTagMemberInfo(typeof) + Assert.AreEqual(singlecaseUnionMemberInfo.ReflectedType, typeof) + + // DiscUnion + let discUnionMemberInfo = FSharpValue.PreComputeUnionTagMemberInfo(typeof>) + Assert.AreEqual(discUnionMemberInfo.ReflectedType, typeof>) + + // null value + CheckThrowsArgumentException(fun () ->FSharpValue.PreComputeUnionTagMemberInfo(null)|> ignore) + + // invalid value + CheckThrowsArgumentException(fun () -> FSharpValue.PreComputeUnionTagMemberInfo(typeof) |> ignore) + + [] + member __.PreComputeStructUnionTagMemberInfo() = + + // SingleCaseUnion + let singlecaseUnionMemberInfo = FSharpValue.PreComputeUnionTagMemberInfo(typeof) + Assert.AreEqual(singlecaseUnionMemberInfo.ReflectedType, typeof) + + // DiscUnion + let discUnionMemberInfo = FSharpValue.PreComputeUnionTagMemberInfo(typeof>) + Assert.AreEqual(discUnionMemberInfo.ReflectedType, typeof>) + + [] + member __.PreComputeUnionTagReader() = + + // SingleCaseUnion + let singlecaseUnionTagReader = FSharpValue.PreComputeUnionTagReader(typeof) + Assert.AreEqual(singlecaseUnionTagReader(box(singleCaseUnion1)), 0) + + // DiscUnion + let discUnionTagReader = FSharpValue.PreComputeUnionTagReader(typeof>) + Assert.AreEqual(discUnionTagReader(box(discUnionCaseB)), 1) + + // null value + CheckThrowsArgumentException(fun () ->FSharpValue.PreComputeUnionTagReader(null)|> ignore) + + // invalid value + CheckThrowsArgumentException(fun () -> FSharpValue.PreComputeUnionTagReader(typeof) |> ignore) + + [] + member __.PreComputeStructUnionTagReader() = + + // SingleCaseUnion + let singlecaseUnionTagReader = FSharpValue.PreComputeUnionTagReader(typeof) + Assert.AreEqual(singlecaseUnionTagReader(box(singleCaseStructUnion1)), 0) + + // DiscUnion + let discUnionTagReader = FSharpValue.PreComputeUnionTagReader(typeof>) + Assert.AreEqual(discUnionTagReader(box(discStructUnionCaseB)), 1) + + +[] +type FSharpTypeTests() = + + // instance for member __.ObjectEquals + let rec recordtype1 : RecordType = { field1 = "field1"; field2 = Some(recordtype1); field3 = ( fun () -> (recordtype1, "") )} + let recordtype2 : RecordType = { field1 = "field2"; field2 = Some(recordtype1); field3 = ( fun () -> (recordtype1, "") )} + let rec genericRecordType1 : GenericRecordType = { field1 = "field1"; field2 = 1; field3 = ( fun () -> genericRecordType1 )} + let genericRecordType2 : GenericRecordType = { field1 = "field1"; field2 = 1; field3 = ( fun () -> genericRecordType1 )} + + let nullValue = null + + let singlecaseunion1 = SingleCaseDiscUnion.SingleCaseTag(1.0, 2.0, 3.0) + let singlecaseunion2 = SingleCaseDiscUnion.SingleCaseTag(4.0, 5.0, 6.0) + + let discUniontypeA = DiscUnionType.A + let discUniontypeB = DiscUnionType.B(1, Some(discUniontypeA)) + let discUniontypeC = DiscUnionType.C(1.0, "stringparam") + + let fsharpdelegate1 = new FSharpDelegate(fun (x:int) -> "delegate1") + let fsharpdelegate2 = new FSharpDelegate(fun (x:int) -> "delegate2") + + + let tuple1 = ( 1, "tuple1") + let tuple2 = ( 2, "tuple2") + + let func1 param = param + 1 + let func2 param = param + "" + + let exInt = ExceptionInt(1) + let exDataless = DatalessException + + // Base class methods + [] + member __.ObjectEquals() = + + // Record value + Assert.IsTrue(FSharpValue.Equals(recordtype1, recordtype1)) + Assert.IsFalse(FSharpValue.Equals(recordtype1, recordtype2)) + + // Generic Record value + Assert.IsTrue(FSharpValue.Equals(genericRecordType1, genericRecordType1)) + Assert.IsFalse(FSharpValue.Equals(genericRecordType1, genericRecordType2)) + + // null value + Assert.IsTrue(FSharpValue.Equals(nullValue, nullValue)) + Assert.IsFalse(FSharpValue.Equals(nullValue, 1)) + + // Single Case Union + Assert.IsTrue(FSharpValue.Equals(singlecaseunion1, singlecaseunion1)) + Assert.IsFalse(FSharpValue.Equals(singlecaseunion1, singlecaseunion2)) + + // Discriminated Union + Assert.IsTrue(FSharpValue.Equals(discUniontypeA, discUniontypeA)) + Assert.IsFalse(FSharpValue.Equals(discUniontypeB, discUniontypeC)) + + // FSharpDelegate + Assert.IsTrue(FSharpValue.Equals(fsharpdelegate1, fsharpdelegate1)) + Assert.IsFalse(FSharpValue.Equals(fsharpdelegate1, fsharpdelegate2)) + + // Tuple + Assert.IsTrue(FSharpValue.Equals(tuple1, tuple1)) + Assert.IsFalse(FSharpValue.Equals(tuple1, tuple2)) + + // Exception + Assert.IsTrue(FSharpValue.Equals(exInt, exInt)) + Assert.IsFalse(FSharpValue.Equals(exInt, exDataless)) + + + // Static methods + [] + member __.GetExceptionFields() = + + // positive + let forallexistedInt = + FSharpType.GetExceptionFields(typeof) + |> Array.forall (fun property -> (Array.IndexOf(typeof.GetProperties(), property) > -1)) + + Assert.IsTrue(forallexistedInt) + + let forallexistedDataless = + FSharpType.GetExceptionFields(typeof) + |> Array.forall (fun property -> (Array.IndexOf(typeof.GetProperties(), property) > -1)) + Assert.IsTrue(forallexistedDataless) + + // Argument Exception + CheckThrowsArgumentException(fun () ->FSharpType.GetExceptionFields(typeof) |> ignore ) + + // null + CheckThrowsArgumentNullException(fun () ->FSharpType.GetExceptionFields(null) |> ignore ) + + + [] + member __.GetFunctionElements() = + + // positive + Assert.AreEqual(FSharpType.GetFunctionElements(typeof string>), (typeof, typeof)) + Assert.AreEqual(FSharpType.GetFunctionElements(typeof int -> string>), (typeof, typeof>)) + + // argument exception + CheckThrowsArgumentException(fun () ->FSharpType.GetFunctionElements(typeof) |> ignore ) + + // null + CheckThrowsArgumentNullException(fun () ->FSharpType.GetFunctionElements(null) |> ignore ) + + [] + member __.GetRecordFields() = + + // positive + Assert.AreEqual(FSharpType.GetRecordFields(typeof), (typeof.GetProperties())) + Assert.AreEqual(FSharpType.GetRecordFields(typeof>), (typeof>.GetProperties())) + + // argument exception + CheckThrowsArgumentException(fun () ->FSharpType.GetRecordFields(typeof) |> ignore ) + + // null + CheckThrowsArgumentNullException(fun () ->FSharpType.GetRecordFields(null) |> ignore ) + + + [] + member __.GetTupleElements() = + + // positive + Assert.AreEqual(FSharpType.GetTupleElements(typeof>), [|typeof; typeof|]) + Assert.AreEqual(FSharpType.GetTupleElements(typeof>), [|typeof; typeof;typeof|]) + + // argument exception + CheckThrowsArgumentException(fun () ->FSharpType.GetTupleElements(typeof) |> ignore ) + + // null + CheckThrowsArgumentNullException(fun () ->FSharpType.GetTupleElements(null) |> ignore ) + + [] + member __.GetUnionCases() = + // SingleCaseUnion + let singlecaseUnionCaseInfoArray = FSharpType.GetUnionCases(typeof) + let (expectedSinglecaseinfo, singlevaluearray) = FSharpValue.GetUnionFields(singlecaseunion1, typeof) + Assert.AreEqual(singlecaseUnionCaseInfoArray.[0], expectedSinglecaseinfo) + + // DiscUnionType + let discunionCaseInfoArray = FSharpType.GetUnionCases(typeof>) + let (expectedDuCaseinfoArray, duValueArray) = FSharpValue.GetUnionFields(discUniontypeB, typeof>) + Assert.AreEqual(discunionCaseInfoArray.[1], expectedDuCaseinfoArray) + + // null value + CheckThrowsArgumentNullException(fun () ->FSharpType.GetUnionCases(null)|> ignore) + + // invalid value + CheckThrowsArgumentException(fun () -> FSharpType.GetUnionCases(typeof) |> ignore) + + [] + member __.IsExceptionRepresentation() = + + // positive + Assert.IsTrue(FSharpType.IsExceptionRepresentation(typeof)) + Assert.IsTrue(FSharpType.IsExceptionRepresentation(typeof)) + + // negative + Assert.IsFalse(FSharpType.IsExceptionRepresentation(typeof)) + Assert.IsFalse(FSharpType.IsExceptionRepresentation(typeof)) + + // null + CheckThrowsArgumentNullException(fun () -> FSharpType.IsExceptionRepresentation(null) |> ignore ) + + [] + member __.IsFunction() = + + // positive + Assert.IsTrue(FSharpType.IsFunction(typeof int>)) + Assert.IsTrue(FSharpType.IsFunction(typeof int -> int>)) + + // negative + Assert.IsFalse(FSharpType.IsFunction(typeof)) + + // null + CheckThrowsArgumentNullException(fun () -> FSharpType.IsFunction(null) |> ignore ) + + [] + member __.IsModule() = + + let getasm (t : Type) = t.Assembly + + // Positive Test + let assemblyTypesPositive = (getasm (typeof)).GetTypes() + + let moduleType = + assemblyTypesPositive + |> Array.filter (fun ty -> ty.Name = "IsModule") + |> (fun arr -> arr.[0]) + + Assert.IsTrue(FSharpType.IsModule(moduleType)) //assemblyTypesPositive.[3] is Microsoft_FSharp_Reflection.FSharpModule which is module type + + // Negative Test + // FSharp Assembly + let asmCore = getasm (typeof>) + Assert.IsFalse(FSharpType.IsModule(asmCore.GetTypes().[0])) + + // .Net Assembly + let asmSystem = getasm (typeof) + Assert.IsFalse(FSharpType.IsModule(asmSystem.GetTypes().[0])) + + // custom Assembly + let asmCustom = getasm (typeof) + Assert.IsFalse(FSharpType.IsModule(asmCustom.GetTypes().[0])) + + // null + CheckThrowsArgumentNullException(fun () -> FSharpType.IsModule(null) |> ignore ) + + [] + member __.IsRecord() = + + // positive + Assert.IsTrue(FSharpType.IsRecord(typeof)) + Assert.IsTrue(FSharpType.IsRecord(typeof)) + Assert.IsTrue(FSharpType.IsRecord(typeof>)) + + // negative + Assert.IsFalse(FSharpType.IsRecord(typeof)) + + // null + CheckThrowsArgumentNullException(fun () ->FSharpType.IsRecord(null) |> ignore ) + + // Regression for 5588, Reflection: unit is still treated as a record type, but only if you pass BindingFlags.NonPublic + [] + member __.``IsRecord.Regression5588``() = + + // negative + Assert.IsFalse(FSharpType.IsRecord(typeof)) + +#if FX_RESHAPED_REFLECTION + Assert.IsFalse( FSharpType.IsRecord(typeof, true) ) +#else + Assert.IsFalse( FSharpType.IsRecord(typeof, System.Reflection.BindingFlags.NonPublic) ) +#endif + () + + + [] + member __.IsTuple() = + + // positive + Assert.IsTrue(FSharpType.IsTuple(typeof>)) + Assert.IsTrue(FSharpType.IsTuple(typeof>)) + + Assert.IsTrue(FSharpType.IsTuple(typeof)) + Assert.IsTrue(FSharpType.IsTuple(typeof)) + + // negative + Assert.IsFalse(FSharpType.IsTuple(typeof)) + Assert.IsFalse(FSharpType.IsTuple(typeof)) + + // null + CheckThrowsArgumentNullException(fun () ->FSharpType.IsTuple(null) |> ignore ) + + [] + member __.IsUnion() = + + // positive + Assert.IsTrue(FSharpType.IsUnion(typeof)) + Assert.IsTrue(FSharpType.IsUnion(typeof)) + Assert.IsTrue(FSharpType.IsUnion(typeof>)) + Assert.IsTrue(FSharpType.IsUnion(typeof>)) + + // negative + Assert.IsFalse(FSharpType.IsUnion(typeof)) + Assert.IsFalse(FSharpType.IsUnion(typeof)) + + // null + CheckThrowsArgumentNullException(fun () ->FSharpType.IsUnion(null) |> ignore ) + + [] + member __.MakeFunctionType() = + + // positive + Assert.AreEqual(FSharpType.MakeFunctionType(typeof, typeof), typeofstring>) + + // negative + Assert.AreNotEqual(FSharpType.MakeFunctionType(typeof, typeof), typeofstring->int>) + + // null + CheckThrowsArgumentNullException(fun () ->FSharpType.MakeFunctionType(null, null) |> ignore ) + + [] + member __.MakeTupleType() = + + // positive + Assert.AreEqual(FSharpType.MakeTupleType([|typeof; typeof|]), typeof>) + + // negative + Assert.AreNotEqual(FSharpType.MakeTupleType([|typeof; typeof|]), typeof>) + + // null + CheckThrowsArgumentException(fun () ->FSharpType.MakeTupleType([|null;null|]) |> ignore ) + + [] + member __.MakeStructTupleType() = + let asm = typeof.Assembly + // positive + Assert.AreEqual(FSharpType.MakeStructTupleType(asm, [|typeof; typeof|]), typeof) + + // negative + Assert.AreNotEqual(FSharpType.MakeStructTupleType(asm, [|typeof; typeof|]), typeof) + + // null + CheckThrowsArgumentException(fun () ->FSharpType.MakeStructTupleType(asm, [|null;null|]) |> ignore ) + + +[] +type UnionCaseInfoTests() = + + let singlenullarycaseunion = SingleNullaryCaseDiscUnion.SingleNullaryCaseTag + + let singlecaseunion1 = SingleCaseDiscUnion.SingleCaseTag(1.0, 2.0, 3.0) + let singlecaseunion2 = SingleCaseDiscUnion.SingleCaseTag(4.0, 5.0, 6.0) + + let discUniontypeA = DiscUnionType.A + let discUniontypeB = DiscUnionType.B(1, Some(discUniontypeA)) + let discUniontypeC = DiscUnionType.C(1.0, "stringparam") + + let recDiscUniontypeB = DiscUnionType.B(1, Some(discUniontypeB)) + + let ((singlenullarycaseinfo:UnionCaseInfo), singlenullaryvaluearray) = FSharpValue.GetUnionFields(singlenullarycaseunion, typeof) + + let ((singlecaseinfo:UnionCaseInfo), singlevaluearray) = FSharpValue.GetUnionFields(singlecaseunion1, typeof) + + let ((discUnionInfoA:UnionCaseInfo), discvaluearray) = FSharpValue.GetUnionFields(discUniontypeA, typeof>) + let ((discUnionInfoB:UnionCaseInfo), discvaluearray) = FSharpValue.GetUnionFields(discUniontypeB, typeof>) + let ((discUnionInfoC:UnionCaseInfo), discvaluearray) = FSharpValue.GetUnionFields(discUniontypeC, typeof>) + + let ((recDiscCaseinfo:UnionCaseInfo), recDiscCasevaluearray) = FSharpValue.GetUnionFields(recDiscUniontypeB, typeof>) + + [] + member __.Equals() = + //positive + // single case + Assert.IsTrue(singlecaseinfo.Equals(singlecaseinfo)) + + // disc union + Assert.IsTrue(discUnionInfoA.Equals(discUnionInfoA)) + + // rec disc union + Assert.IsTrue(recDiscCaseinfo.Equals(recDiscCaseinfo)) + + // negative + // single case + Assert.IsFalse(singlecaseinfo.Equals(discUnionInfoA)) + + // disc union + Assert.IsFalse(discUnionInfoA.Equals(discUnionInfoB)) + + // rec disc union + Assert.IsFalse(recDiscCaseinfo.Equals(discUnionInfoA)) + + // null + Assert.IsFalse(singlecaseinfo.Equals(null)) + + [] + member __.GetCustomAttributes() = + + // single case + let singlecaseAttribute = (singlecaseinfo.GetCustomAttributes()).[0] :?> Attribute + Assert.AreEqual(singlecaseAttribute.ToString(), "Microsoft.FSharp.Core.CompilationMappingAttribute" ) + + // disc union + let discunionAttribute = (discUnionInfoA.GetCustomAttributes()).[0] :?> Attribute + Assert.AreEqual(discunionAttribute.ToString(), "Microsoft.FSharp.Core.CompilationMappingAttribute" ) + + // rec disc union + let recdiscAttribute = (recDiscCaseinfo.GetCustomAttributes()).[0] :?> Attribute + Assert.AreEqual(recdiscAttribute.ToString(), "Microsoft.FSharp.Core.CompilationMappingAttribute" ) + + // null + CheckThrowsArgumentNullException(fun () -> singlecaseinfo.GetCustomAttributes(null) |> ignore ) + + [] + member __.GetFields() = + + // single case + let singlecaseFieldInfo = (singlecaseinfo.GetFields()).[0] + Assert.AreEqual(singlecaseFieldInfo.PropertyType , typeof<(float)>) + + // disc union null empty + let discunionFieldInfoEpt = discUnionInfoA.GetFields() + Assert.AreEqual(discunionFieldInfoEpt.Length , 0) + + // disc union int + let discunionFieldInfo = (discUnionInfoB.GetFields()).[0] + Assert.AreEqual(discunionFieldInfo.PropertyType , typeof) + + // rec disc union + let recdiscFieldInfo = (recDiscCaseinfo.GetFields()).[0] + Assert.AreEqual(recdiscFieldInfo.PropertyType , typeof) + + [] + member __.GetHashCode() = + + // positive + // single case + Assert.AreEqual(singlecaseinfo.GetHashCode(), singlecaseinfo.GetHashCode()) + + // disc union + + Assert.AreEqual(discUnionInfoA.GetHashCode(), discUnionInfoA.GetHashCode()) + + // rec disc union + + Assert.AreEqual(recDiscCaseinfo.GetHashCode(), recDiscCaseinfo.GetHashCode()) + + // negative + // disc union + Assert.AreNotEqual(discUnionInfoA.GetHashCode(), discUnionInfoB.GetHashCode()) + + [] + member __.GetType() = + + // single case + Assert.AreEqual(singlecaseinfo.GetType(), typeof ) + + // disc union + Assert.AreEqual(discUnionInfoA.GetType(), typeof ) + + // rec disc union + Assert.AreEqual(recDiscCaseinfo.GetType(), typeof ) + + [] + member __.ToString() = + + // single case + Assert.AreEqual(singlenullarycaseinfo.ToString(), "SingleNullaryCaseDiscUnion.SingleNullaryCaseTag") + + // single case + Assert.AreEqual(singlecaseinfo.ToString(), "SingleCaseDiscUnion.SingleCaseTag") + + // disc union + Assert.IsTrue((discUnionInfoA.ToString()).Contains("DiscUnionType") ) + + // rec disc union + Assert.IsTrue((recDiscCaseinfo.ToString()).Contains("DiscUnionType")) diff --git a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/OperatorsModule1.fs b/tests/FSharp.Core.UnitTests/FSharp.Core/OperatorsModule1.fs similarity index 100% rename from src/fsharp/FSharp.Core.Unittests/FSharp.Core/OperatorsModule1.fs rename to tests/FSharp.Core.UnitTests/FSharp.Core/OperatorsModule1.fs diff --git a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/OperatorsModule2.fs b/tests/FSharp.Core.UnitTests/FSharp.Core/OperatorsModule2.fs similarity index 100% rename from src/fsharp/FSharp.Core.Unittests/FSharp.Core/OperatorsModule2.fs rename to tests/FSharp.Core.UnitTests/FSharp.Core/OperatorsModule2.fs diff --git a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/PrimTypes.fs b/tests/FSharp.Core.UnitTests/FSharp.Core/PrimTypes.fs similarity index 98% rename from src/fsharp/FSharp.Core.Unittests/FSharp.Core/PrimTypes.fs rename to tests/FSharp.Core.UnitTests/FSharp.Core/PrimTypes.fs index a45eb027905..4f777facb31 100644 --- a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/PrimTypes.fs +++ b/tests/FSharp.Core.UnitTests/FSharp.Core/PrimTypes.fs @@ -3,11 +3,11 @@ // Various tests for the: // Microsoft.FSharp.Core.LanguagePrimitives module -namespace FSharp.Core.Unittests.FSharp_Core.Microsoft_FSharp_Core +namespace FSharp.Core.UnitTests.FSharp_Core.Microsoft_FSharp_Core open System open System.Numerics -open FSharp.Core.Unittests.LibraryTestFx +open FSharp.Core.UnitTests.LibraryTestFx open NUnit.Framework [] @@ -106,7 +106,7 @@ type LanguagePrimitivesModule() = Assert.AreEqual(1, resultRef) -#if FX_PORTABLE_OR_NETSTANDARD +#if NETSTANDARD1_6 // TODO named #define ? #else [] @@ -604,7 +604,7 @@ type UnitType() = CheckThrowsNullRefException(fun() ->u.Equals(null) |>ignore) -#if FX_PORTABLE_OR_NETSTANDARD +#if NETSTANDARD1_6 // TODO named #define ? #else [] @@ -816,3 +816,16 @@ type RangeTests() = if System.UIntPtr.Size >= 8 then RangeTestsHelpers.unsigned (System.UIntPtr System.UInt64.MinValue) (System.UIntPtr System.UInt64.MaxValue) +open NonStructuralComparison + + +[] +type NonStructuralComparisonTests() = + + [] + member __.CompareFloat32() = // https://github.com/Microsoft/visualfsharp/pull/4493 + + let x = 32 |> float32 + let y = 32 |> float32 + let comparison = compare x y + Assert.AreEqual(0, comparison) \ No newline at end of file diff --git a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/RecordTypes.fs b/tests/FSharp.Core.UnitTests/FSharp.Core/RecordTypes.fs similarity index 99% rename from src/fsharp/FSharp.Core.Unittests/FSharp.Core/RecordTypes.fs rename to tests/FSharp.Core.UnitTests/FSharp.Core/RecordTypes.fs index deb35c2e9b4..112c3509b1b 100644 --- a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/RecordTypes.fs +++ b/tests/FSharp.Core.UnitTests/FSharp.Core/RecordTypes.fs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -module FSharp.Core.Unittests.FSharp_Core.Microsoft_FSharp_Core.RecordTypes +module FSharp.Core.UnitTests.FSharp_Core.Microsoft_FSharp_Core.RecordTypes #nowarn "9" #nowarn "44" // deprecation of some APIs on CoreCLR diff --git a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/SampleTuples/Microsoft.FSharp.TupleSample.nuspec b/tests/FSharp.Core.UnitTests/FSharp.Core/SampleTuples/Microsoft.FSharp.TupleSample.nuspec similarity index 100% rename from src/fsharp/FSharp.Core.Unittests/FSharp.Core/SampleTuples/Microsoft.FSharp.TupleSample.nuspec rename to tests/FSharp.Core.UnitTests/FSharp.Core/SampleTuples/Microsoft.FSharp.TupleSample.nuspec diff --git a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/SampleTuples/Properties/AssemblyInfo.cs b/tests/FSharp.Core.UnitTests/FSharp.Core/SampleTuples/Properties/AssemblyInfo.cs similarity index 100% rename from src/fsharp/FSharp.Core.Unittests/FSharp.Core/SampleTuples/Properties/AssemblyInfo.cs rename to tests/FSharp.Core.UnitTests/FSharp.Core/SampleTuples/Properties/AssemblyInfo.cs diff --git a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/SampleTuples/TupleSample.cs b/tests/FSharp.Core.UnitTests/FSharp.Core/SampleTuples/TupleSample.cs similarity index 100% rename from src/fsharp/FSharp.Core.Unittests/FSharp.Core/SampleTuples/TupleSample.cs rename to tests/FSharp.Core.UnitTests/FSharp.Core/SampleTuples/TupleSample.cs diff --git a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/SampleTuples/TupleSample.csproj b/tests/FSharp.Core.UnitTests/FSharp.Core/SampleTuples/TupleSample.csproj similarity index 96% rename from src/fsharp/FSharp.Core.Unittests/FSharp.Core/SampleTuples/TupleSample.csproj rename to tests/FSharp.Core.UnitTests/FSharp.Core/SampleTuples/TupleSample.csproj index 23d1a8f54d8..c35cd8ac844 100644 --- a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/SampleTuples/TupleSample.csproj +++ b/tests/FSharp.Core.UnitTests/FSharp.Core/SampleTuples/TupleSample.csproj @@ -25,7 +25,7 @@ - ..\..\..\..\..\packages\System.ValueTuple.4.3.1\lib\portable-net40+sl4+win8+wp8\System.ValueTuple.dll + ..\..\..\..\..\packages\System.ValueTuple.4.3.0\lib\portable-net40+sl4+win8+wp8\System.ValueTuple.dll diff --git a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/SampleTuples/TupleSample.sln b/tests/FSharp.Core.UnitTests/FSharp.Core/SampleTuples/TupleSample.sln similarity index 100% rename from src/fsharp/FSharp.Core.Unittests/FSharp.Core/SampleTuples/TupleSample.sln rename to tests/FSharp.Core.UnitTests/FSharp.Core/SampleTuples/TupleSample.sln diff --git a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/SampleTuples/readme b/tests/FSharp.Core.UnitTests/FSharp.Core/SampleTuples/readme similarity index 100% rename from src/fsharp/FSharp.Core.Unittests/FSharp.Core/SampleTuples/readme rename to tests/FSharp.Core.UnitTests/FSharp.Core/SampleTuples/readme diff --git a/src/fsharp/FSharp.Core.Unittests/LibraryTestFx.fs b/tests/FSharp.Core.UnitTests/LibraryTestFx.fs similarity index 91% rename from src/fsharp/FSharp.Core.Unittests/LibraryTestFx.fs rename to tests/FSharp.Core.UnitTests/LibraryTestFx.fs index b86112c5f73..b58653a1de1 100644 --- a/src/fsharp/FSharp.Core.Unittests/LibraryTestFx.fs +++ b/tests/FSharp.Core.UnitTests/LibraryTestFx.fs @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -module FSharp.Core.Unittests.LibraryTestFx +module FSharp.Core.UnitTests.LibraryTestFx open System open System.Collections.Generic @@ -13,17 +13,12 @@ open NUnit.Framework /// Check that the lambda throws an exception of the given type. Otherwise /// calls Assert.Fail() let CheckThrowsExn<'a when 'a :> exn> (f : unit -> unit) = - let funcThrowsAsExpected = - try - let _ = f () - false // Did not throw! - with - | :? 'a - -> true // Thew null ref, OK - | _ -> false // Did now throw a null ref exception! - if funcThrowsAsExpected - then () - else Assert.Fail() + try + let _ = f () + sprintf "Expected %O exception, got no exception" typeof<'a> |> Assert.Fail + with + | :? 'a -> () + | e -> sprintf "Expected %O exception, got: %O" typeof<'a> e |> Assert.Fail let private CheckThrowsExn2<'a when 'a :> exn> s (f : unit -> unit) = let funcThrowsAsExpected = @@ -76,24 +71,24 @@ module SurfaceArea = // get current FSharp.Core let asm = - #if portable7 || portable78 || portable259 || coreclr +#if FX_RESHAPED_REFLECTION typeof.GetTypeInfo().Assembly - #else +#else typeof.Assembly - #endif +#endif // public types only let types = - #if portable7 || portable78 || portable259 || coreclr +#if FX_RESHAPED_REFLECTION asm.ExportedTypes |> Seq.filter (fun ty -> let ti = ty.GetTypeInfo() in ti.IsPublic || ti.IsNestedPublic) |> Array.ofSeq - #else +#else asm.GetExportedTypes() - #endif +#endif // extract canonical string form for every public member of every type let getTypeMemberStrings (t : Type) = // for System.Runtime-based profiles, need to do lots of manual work - #if portable7 || portable78 || portable259 || coreclr +#if FX_RESHAPED_REFLECTION let getMembers (t : Type) = let ti = t.GetTypeInfo() let cast (info : #MemberInfo) = (t, info :> MemberInfo) @@ -108,10 +103,10 @@ module SurfaceArea = getMembers t |> Array.map (fun (ty, m) -> sprintf "%s: %s" (ty.ToString()) (m.ToString())) - #else +#else t.GetMembers() |> Array.map (fun v -> sprintf "%s: %s" (v.ReflectedType.ToString()) (v.ToString())) - #endif +#endif let actual = types |> Array.collect getTypeMemberStrings diff --git a/src/fsharp/FSharp.Core.Unittests/NUnitFrameworkShims.fs b/tests/FSharp.Core.UnitTests/NUnitFrameworkShims.fs similarity index 100% rename from src/fsharp/FSharp.Core.Unittests/NUnitFrameworkShims.fs rename to tests/FSharp.Core.UnitTests/NUnitFrameworkShims.fs diff --git a/tests/FSharp.Core.UnitTests/NuGet.Config b/tests/FSharp.Core.UnitTests/NuGet.Config new file mode 100644 index 00000000000..0a86752fee0 --- /dev/null +++ b/tests/FSharp.Core.UnitTests/NuGet.Config @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/src/fsharp/FSharp.Core.Unittests/Program.fs b/tests/FSharp.Core.UnitTests/Program.fs similarity index 100% rename from src/fsharp/FSharp.Core.Unittests/Program.fs rename to tests/FSharp.Core.UnitTests/Program.fs diff --git a/src/fsharp/FSharp.Core.Unittests/Properties/AppManifest.xml b/tests/FSharp.Core.UnitTests/Properties/AppManifest.xml similarity index 100% rename from src/fsharp/FSharp.Core.Unittests/Properties/AppManifest.xml rename to tests/FSharp.Core.UnitTests/Properties/AppManifest.xml diff --git a/src/fsharp/FSharp.Core.Unittests/Properties/AssemblyInfo.cs b/tests/FSharp.Core.UnitTests/Properties/AssemblyInfo.cs similarity index 100% rename from src/fsharp/FSharp.Core.Unittests/Properties/AssemblyInfo.cs rename to tests/FSharp.Core.UnitTests/Properties/AssemblyInfo.cs diff --git a/src/fsharp/FSharp.Core.Unittests/StructTuples.fs b/tests/FSharp.Core.UnitTests/StructTuples.fs similarity index 98% rename from src/fsharp/FSharp.Core.Unittests/StructTuples.fs rename to tests/FSharp.Core.UnitTests/StructTuples.fs index 0c1728a5db1..63451250d12 100644 --- a/src/fsharp/FSharp.Core.Unittests/StructTuples.fs +++ b/tests/FSharp.Core.UnitTests/StructTuples.fs @@ -2,11 +2,11 @@ // Various tests for Microsoft.FSharp.Core type forwarding -namespace FSharp.Core.Unittests.FSharpStructTuples +namespace FSharp.Core.UnitTests.FSharpStructTuples #if TUPLE_SAMPLE open System -open FSharp.Core.Unittests.LibraryTestFx +open FSharp.Core.UnitTests.LibraryTestFx open NUnit.Framework open TupleSample diff --git a/src/fsharp/FSharp.Core.Unittests/SurfaceArea.coreclr.fs b/tests/FSharp.Core.UnitTests/SurfaceArea.coreclr.fs similarity index 97% rename from src/fsharp/FSharp.Core.Unittests/SurfaceArea.coreclr.fs rename to tests/FSharp.Core.UnitTests/SurfaceArea.coreclr.fs index c762979fd6f..841b5092f23 100644 --- a/src/fsharp/FSharp.Core.Unittests/SurfaceArea.coreclr.fs +++ b/tests/FSharp.Core.UnitTests/SurfaceArea.coreclr.fs @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -namespace FSharp.Core.Unittests.Portable.SurfaceArea +namespace FSharp.Core.UnitTests.Portable.SurfaceArea open NUnit.Framework -open FSharp.Core.Unittests.LibraryTestFx +open FSharp.Core.UnitTests.LibraryTestFx [] type SurfaceAreaTest() = @@ -177,6 +177,7 @@ Microsoft.FSharp.Collections.ArrayModule: T[] Where[T](Microsoft.FSharp.Core.FSh Microsoft.FSharp.Collections.ArrayModule: T[] ZeroCreate[T](Int32) Microsoft.FSharp.Collections.ArrayModule: T[][] ChunkBySize[T](Int32, T[]) Microsoft.FSharp.Collections.ArrayModule: T[][] SplitInto[T](Int32, T[]) +Microsoft.FSharp.Collections.ArrayModule: T[][] Transpose[T](System.Collections.Generic.IEnumerable`1[T[]]) Microsoft.FSharp.Collections.ArrayModule: T[][] Windowed[T](Int32, T[]) Microsoft.FSharp.Collections.ArrayModule: Void CopyTo[T](T[], Int32, T[], Int32, Int32) Microsoft.FSharp.Collections.ArrayModule: Void Fill[T](T[], Int32, Int32, T) @@ -257,6 +258,7 @@ Microsoft.FSharp.Collections.FSharpMap`2[TKey,TValue]: Int32 get_Count() Microsoft.FSharp.Collections.FSharpMap`2[TKey,TValue]: Microsoft.FSharp.Collections.FSharpMap`2[TKey,TValue] Add(TKey, TValue) Microsoft.FSharp.Collections.FSharpMap`2[TKey,TValue]: Microsoft.FSharp.Collections.FSharpMap`2[TKey,TValue] Remove(TKey) Microsoft.FSharp.Collections.FSharpMap`2[TKey,TValue]: Microsoft.FSharp.Core.FSharpOption`1[TValue] TryFind(TKey) +Microsoft.FSharp.Collections.FSharpMap`2[TKey,TValue]: Boolean TryGetValue(TKey, TValue ByRef) Microsoft.FSharp.Collections.FSharpMap`2[TKey,TValue]: System.String ToString() Microsoft.FSharp.Collections.FSharpMap`2[TKey,TValue]: System.Type GetType() Microsoft.FSharp.Collections.FSharpMap`2[TKey,TValue]: TValue Item [TKey] @@ -307,6 +309,7 @@ Microsoft.FSharp.Collections.ListModule: Int32 GetHashCode() Microsoft.FSharp.Collections.ListModule: Int32 Length[T](Microsoft.FSharp.Collections.FSharpList`1[T]) Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Collections.FSharpList`1[T]] ChunkBySize[T](Int32, Microsoft.FSharp.Collections.FSharpList`1[T]) Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Collections.FSharpList`1[T]] SplitInto[T](Int32, Microsoft.FSharp.Collections.FSharpList`1[T]) +Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Collections.FSharpList`1[T]] Transpose[T](System.Collections.Generic.IEnumerable`1[Microsoft.FSharp.Collections.FSharpList`1[T]]) Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Collections.FSharpList`1[T]] Windowed[T](Int32, Microsoft.FSharp.Collections.FSharpList`1[T]) Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[System.Tuple`2[System.Int32,T]] Indexed[T](Microsoft.FSharp.Collections.FSharpList`1[T]) Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[System.Tuple`2[T,T]] Pairwise[T](Microsoft.FSharp.Collections.FSharpList`1[T]) @@ -446,6 +449,7 @@ Microsoft.FSharp.Collections.SeqModule: Microsoft.FSharp.Core.FSharpOption`1[T] Microsoft.FSharp.Collections.SeqModule: Microsoft.FSharp.Core.FSharpOption`1[T] TryHead[T](System.Collections.Generic.IEnumerable`1[T]) Microsoft.FSharp.Collections.SeqModule: Microsoft.FSharp.Core.FSharpOption`1[T] TryItem[T](Int32, System.Collections.Generic.IEnumerable`1[T]) Microsoft.FSharp.Collections.SeqModule: Microsoft.FSharp.Core.FSharpOption`1[T] TryLast[T](System.Collections.Generic.IEnumerable`1[T]) +Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[T]] Transpose[TCollection,T](System.Collections.Generic.IEnumerable`1[TCollection]) Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[System.Tuple`2[System.Int32,T]] Indexed[T](System.Collections.Generic.IEnumerable`1[T]) Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[System.Tuple`2[T,T]] Pairwise[T](System.Collections.Generic.IEnumerable`1[T]) Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[System.Tuple`2[T1,T2]] AllPairs[T1,T2](System.Collections.Generic.IEnumerable`1[T1], System.Collections.Generic.IEnumerable`1[T2]) @@ -564,6 +568,29 @@ Microsoft.FSharp.Collections.SetModule: TState FoldBack[T,TState](Microsoft.FSha Microsoft.FSharp.Collections.SetModule: TState Fold[T,TState](Microsoft.FSharp.Core.FSharpFunc`2[TState,Microsoft.FSharp.Core.FSharpFunc`2[T,TState]], TState, Microsoft.FSharp.Collections.FSharpSet`1[T]) Microsoft.FSharp.Collections.SetModule: T[] ToArray[T](Microsoft.FSharp.Collections.FSharpSet`1[T]) Microsoft.FSharp.Collections.SetModule: Void Iterate[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.Unit], Microsoft.FSharp.Collections.FSharpSet`1[T]) +Microsoft.FSharp.Control.AsyncActivation`1[T]: Boolean Equals(System.Object) +Microsoft.FSharp.Control.AsyncActivation`1[T]: Boolean IsCancellationRequested +Microsoft.FSharp.Control.AsyncActivation`1[T]: Boolean get_IsCancellationRequested() +Microsoft.FSharp.Control.AsyncActivation`1[T]: Int32 GetHashCode() +Microsoft.FSharp.Control.AsyncActivation`1[T]: Microsoft.FSharp.Control.AsyncReturn OnCancellation() +Microsoft.FSharp.Control.AsyncActivation`1[T]: Void OnExceptionRaised() +Microsoft.FSharp.Control.AsyncActivation`1[T]: Microsoft.FSharp.Control.AsyncReturn OnSuccess(T) +Microsoft.FSharp.Control.AsyncActivation`1[T]: System.String ToString() +Microsoft.FSharp.Control.AsyncActivation`1[T]: System.Type GetType() +Microsoft.FSharp.Control.AsyncPrimitives: Boolean Equals(System.Object) +Microsoft.FSharp.Control.AsyncPrimitives: Int32 GetHashCode() +Microsoft.FSharp.Control.AsyncPrimitives: Microsoft.FSharp.Control.AsyncReturn Bind[T,TResult](Microsoft.FSharp.Control.AsyncActivation`1[T], Microsoft.FSharp.Control.FSharpAsync`1[TResult], Microsoft.FSharp.Core.FSharpFunc`2[TResult,Microsoft.FSharp.Control.FSharpAsync`1[T]]) +Microsoft.FSharp.Control.AsyncPrimitives: Microsoft.FSharp.Control.AsyncReturn CallThenInvoke[T,TResult](Microsoft.FSharp.Control.AsyncActivation`1[T], TResult, Microsoft.FSharp.Core.FSharpFunc`2[TResult,Microsoft.FSharp.Control.FSharpAsync`1[T]]) +Microsoft.FSharp.Control.AsyncPrimitives: Microsoft.FSharp.Control.AsyncReturn Invoke[T](Microsoft.FSharp.Control.FSharpAsync`1[T], Microsoft.FSharp.Control.AsyncActivation`1[T]) +Microsoft.FSharp.Control.AsyncPrimitives: Microsoft.FSharp.Control.AsyncReturn TryFinally[T](Microsoft.FSharp.Control.AsyncActivation`1[T], Microsoft.FSharp.Control.FSharpAsync`1[T], Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,Microsoft.FSharp.Core.Unit]) +Microsoft.FSharp.Control.AsyncPrimitives: Microsoft.FSharp.Control.AsyncReturn TryWith[T](Microsoft.FSharp.Control.AsyncActivation`1[T], Microsoft.FSharp.Control.FSharpAsync`1[T], Microsoft.FSharp.Core.FSharpFunc`2[System.Exception,Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Control.FSharpAsync`1[T]]]) +Microsoft.FSharp.Control.AsyncPrimitives: Microsoft.FSharp.Control.FSharpAsync`1[T] MakeAsync[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Control.AsyncActivation`1[T],Microsoft.FSharp.Control.AsyncReturn]) +Microsoft.FSharp.Control.AsyncPrimitives: System.String ToString() +Microsoft.FSharp.Control.AsyncPrimitives: System.Type GetType() +Microsoft.FSharp.Control.AsyncReturn: Boolean Equals(System.Object) +Microsoft.FSharp.Control.AsyncReturn: Int32 GetHashCode() +Microsoft.FSharp.Control.AsyncReturn: System.String ToString() +Microsoft.FSharp.Control.AsyncReturn: System.Type GetType() Microsoft.FSharp.Control.CommonExtensions: Boolean Equals(System.Object) Microsoft.FSharp.Control.CommonExtensions: Int32 GetHashCode() Microsoft.FSharp.Control.CommonExtensions: Microsoft.FSharp.Control.FSharpAsync`1[Microsoft.FSharp.Core.Unit] AsyncWrite(System.IO.Stream, Byte[], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32]) @@ -616,6 +643,7 @@ Microsoft.FSharp.Control.FSharpAsync: System.String ToString() Microsoft.FSharp.Control.FSharpAsync: System.Threading.CancellationToken DefaultCancellationToken Microsoft.FSharp.Control.FSharpAsync: System.Threading.CancellationToken get_DefaultCancellationToken() Microsoft.FSharp.Control.FSharpAsync: System.Threading.Tasks.Task`1[T] StartAsTask[T](Microsoft.FSharp.Control.FSharpAsync`1[T], Microsoft.FSharp.Core.FSharpOption`1[System.Threading.Tasks.TaskCreationOptions], Microsoft.FSharp.Core.FSharpOption`1[System.Threading.CancellationToken]) +Microsoft.FSharp.Control.FSharpAsync: System.Threading.Tasks.Task`1[T] StartImmediateAsTask[T](Microsoft.FSharp.Control.FSharpAsync`1[T], Microsoft.FSharp.Core.FSharpOption`1[System.Threading.CancellationToken]) Microsoft.FSharp.Control.FSharpAsync: System.Tuple`3[Microsoft.FSharp.Core.FSharpFunc`2[System.Tuple`3[TArg,System.AsyncCallback,System.Object],System.IAsyncResult],Microsoft.FSharp.Core.FSharpFunc`2[System.IAsyncResult,T],Microsoft.FSharp.Core.FSharpFunc`2[System.IAsyncResult,Microsoft.FSharp.Core.Unit]] AsBeginEnd[TArg,T](Microsoft.FSharp.Core.FSharpFunc`2[TArg,Microsoft.FSharp.Control.FSharpAsync`1[T]]) Microsoft.FSharp.Control.FSharpAsync: System.Type GetType() Microsoft.FSharp.Control.FSharpAsync: T RunSynchronously[T](Microsoft.FSharp.Control.FSharpAsync`1[T], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Threading.CancellationToken]) @@ -769,6 +797,25 @@ Microsoft.FSharp.Core.AutoSerializableAttribute: Int32 GetHashCode() Microsoft.FSharp.Core.AutoSerializableAttribute: System.String ToString() Microsoft.FSharp.Core.AutoSerializableAttribute: System.Type GetType() Microsoft.FSharp.Core.AutoSerializableAttribute: Void .ctor(Boolean) +Microsoft.FSharp.Core.ByRefKinds+In: Boolean Equals(System.Object) +Microsoft.FSharp.Core.ByRefKinds+In: Int32 GetHashCode() +Microsoft.FSharp.Core.ByRefKinds+In: System.String ToString() +Microsoft.FSharp.Core.ByRefKinds+In: System.Type GetType() +Microsoft.FSharp.Core.ByRefKinds+InOut: Boolean Equals(System.Object) +Microsoft.FSharp.Core.ByRefKinds+InOut: Int32 GetHashCode() +Microsoft.FSharp.Core.ByRefKinds+InOut: System.String ToString() +Microsoft.FSharp.Core.ByRefKinds+InOut: System.Type GetType() +Microsoft.FSharp.Core.ByRefKinds+Out: Boolean Equals(System.Object) +Microsoft.FSharp.Core.ByRefKinds+Out: Int32 GetHashCode() +Microsoft.FSharp.Core.ByRefKinds+Out: System.String ToString() +Microsoft.FSharp.Core.ByRefKinds+Out: System.Type GetType() +Microsoft.FSharp.Core.ByRefKinds: Boolean Equals(System.Object) +Microsoft.FSharp.Core.ByRefKinds: Int32 GetHashCode() +Microsoft.FSharp.Core.ByRefKinds: Microsoft.FSharp.Core.ByRefKinds+In +Microsoft.FSharp.Core.ByRefKinds: Microsoft.FSharp.Core.ByRefKinds+InOut +Microsoft.FSharp.Core.ByRefKinds: Microsoft.FSharp.Core.ByRefKinds+Out +Microsoft.FSharp.Core.ByRefKinds: System.String ToString() +Microsoft.FSharp.Core.ByRefKinds: System.Type GetType() Microsoft.FSharp.Core.CLIEventAttribute: Boolean Equals(System.Object) Microsoft.FSharp.Core.CLIEventAttribute: Boolean Match(System.Object) Microsoft.FSharp.Core.CLIEventAttribute: Int32 GetHashCode() @@ -1106,6 +1153,7 @@ Microsoft.FSharp.Core.ExtraTopLevelOperators: Microsoft.FSharp.Linq.QueryBuilder Microsoft.FSharp.Core.ExtraTopLevelOperators: SByte ToSByte[T](T) Microsoft.FSharp.Core.ExtraTopLevelOperators: Single ToSingle[T](T) Microsoft.FSharp.Core.ExtraTopLevelOperators: System.Collections.Generic.IDictionary`2[TKey,TValue] CreateDictionary[TKey,TValue](System.Collections.Generic.IEnumerable`1[System.Tuple`2[TKey,TValue]]) +Microsoft.FSharp.Core.ExtraTopLevelOperators: System.Collections.Generic.IReadOnlyDictionary`2[TKey,TValue] CreateReadOnlyDictionary[TKey,TValue](System.Collections.Generic.IEnumerable`1[System.Tuple`2[TKey,TValue]]) Microsoft.FSharp.Core.ExtraTopLevelOperators: System.String ToString() Microsoft.FSharp.Core.ExtraTopLevelOperators: System.Type GetType() Microsoft.FSharp.Core.ExtraTopLevelOperators: T LazyPattern[T](System.Lazy`1[T]) @@ -2111,6 +2159,36 @@ Microsoft.FSharp.Core.FSharpResult`2[T,TError]: T ResultValue Microsoft.FSharp.Core.FSharpResult`2[T,TError]: T get_ResultValue() Microsoft.FSharp.Core.FSharpResult`2[T,TError]: TError ErrorValue Microsoft.FSharp.Core.FSharpResult`2[T,TError]: TError get_ErrorValue() +Microsoft.FSharp.Core.FSharpValueOption`1+Tags[T]: Boolean Equals(System.Object) +Microsoft.FSharp.Core.FSharpValueOption`1+Tags[T]: Int32 GetHashCode() +Microsoft.FSharp.Core.FSharpValueOption`1+Tags[T]: Int32 ValueNone +Microsoft.FSharp.Core.FSharpValueOption`1+Tags[T]: Int32 ValueSome +Microsoft.FSharp.Core.FSharpValueOption`1+Tags[T]: System.String ToString() +Microsoft.FSharp.Core.FSharpValueOption`1+Tags[T]: System.Type GetType() +Microsoft.FSharp.Core.FSharpValueOption`1[T]: Boolean Equals(Microsoft.FSharp.Core.FSharpValueOption`1[T]) +Microsoft.FSharp.Core.FSharpValueOption`1[T]: Boolean Equals(System.Object) +Microsoft.FSharp.Core.FSharpValueOption`1[T]: Boolean Equals(System.Object, System.Collections.IEqualityComparer) +Microsoft.FSharp.Core.FSharpValueOption`1[T]: Int32 CompareTo(Microsoft.FSharp.Core.FSharpValueOption`1[T]) +Microsoft.FSharp.Core.FSharpValueOption`1[T]: Int32 CompareTo(System.Object) +Microsoft.FSharp.Core.FSharpValueOption`1[T]: Int32 CompareTo(System.Object, System.Collections.IComparer) +Microsoft.FSharp.Core.FSharpValueOption`1[T]: Int32 GetHashCode() +Microsoft.FSharp.Core.FSharpValueOption`1[T]: Int32 GetHashCode(System.Collections.IEqualityComparer) +Microsoft.FSharp.Core.FSharpValueOption`1[T]: Int32 Tag +Microsoft.FSharp.Core.FSharpValueOption`1[T]: Int32 get_Tag() +Microsoft.FSharp.Core.FSharpValueOption`1[T]: Microsoft.FSharp.Core.FSharpValueOption`1+Tags[T] +Microsoft.FSharp.Core.FSharpValueOption`1[T]: Microsoft.FSharp.Core.FSharpValueOption`1[T] ValueNone +Microsoft.FSharp.Core.FSharpValueOption`1[T]: Boolean IsValueNone +Microsoft.FSharp.Core.FSharpValueOption`1[T]: Boolean IsValueSome +Microsoft.FSharp.Core.FSharpValueOption`1[T]: Boolean get_IsValueNone() +Microsoft.FSharp.Core.FSharpValueOption`1[T]: Boolean get_IsValueSome() +Microsoft.FSharp.Core.FSharpValueOption`1[T]: Microsoft.FSharp.Core.FSharpValueOption`1[T] NewValueSome(T) +Microsoft.FSharp.Core.FSharpValueOption`1[T]: Microsoft.FSharp.Core.FSharpValueOption`1[T] get_ValueNone() +Microsoft.FSharp.Core.FSharpValueOption`1[T]: System.String ToString() +Microsoft.FSharp.Core.FSharpValueOption`1[T]: System.Type GetType() +Microsoft.FSharp.Core.FSharpValueOption`1[T]: T Item +Microsoft.FSharp.Core.FSharpValueOption`1[T]: T Value +Microsoft.FSharp.Core.FSharpValueOption`1[T]: T get_Item() +Microsoft.FSharp.Core.FSharpValueOption`1[T]: T get_Value() Microsoft.FSharp.Core.FSharpTypeFunc: Boolean Equals(System.Object) Microsoft.FSharp.Core.FSharpTypeFunc: Int32 GetHashCode() Microsoft.FSharp.Core.FSharpTypeFunc: System.Object Specialize[T]() @@ -2118,6 +2196,18 @@ Microsoft.FSharp.Core.FSharpTypeFunc: System.String ToString() Microsoft.FSharp.Core.FSharpTypeFunc: System.Type GetType() Microsoft.FSharp.Core.FSharpTypeFunc: Void .ctor() Microsoft.FSharp.Core.FuncConvert: Boolean Equals(System.Object) +Microsoft.FSharp.Core.FuncConvert: Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,Microsoft.FSharp.Core.Unit] FromAction(System.Action) +Microsoft.FSharp.Core.FuncConvert: Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.Unit] FromAction[T](System.Action`1[T]) +Microsoft.FSharp.Core.FuncConvert: Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,Microsoft.FSharp.Core.Unit]] FromAction[T1,T2](System.Action`2[T1,T2]) +Microsoft.FSharp.Core.FuncConvert: Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,Microsoft.FSharp.Core.FSharpFunc`2[T3,Microsoft.FSharp.Core.Unit]]] FromAction[T1,T2,T3](System.Action`3[T1,T2,T3]) +Microsoft.FSharp.Core.FuncConvert: Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,Microsoft.FSharp.Core.FSharpFunc`2[T3,Microsoft.FSharp.Core.FSharpFunc`2[T4,Microsoft.FSharp.Core.Unit]]]] FromAction[T1,T2,T3,T4](System.Action`4[T1,T2,T3,T4]) +Microsoft.FSharp.Core.FuncConvert: Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,Microsoft.FSharp.Core.FSharpFunc`2[T3,Microsoft.FSharp.Core.FSharpFunc`2[T4,Microsoft.FSharp.Core.FSharpFunc`2[T5,Microsoft.FSharp.Core.Unit]]]]] FromAction[T1,T2,T3,T4,T5](System.Action`5[T1,T2,T3,T4,T5]) +Microsoft.FSharp.Core.FuncConvert: Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,T] FromFunc[T](System.Func`1[T]) +Microsoft.FSharp.Core.FuncConvert: Microsoft.FSharp.Core.FSharpFunc`2[T,TResult] FromFunc[T,TResult](System.Func`2[T,TResult]) +Microsoft.FSharp.Core.FuncConvert: Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,TResult]] FromFunc[T1,T2,TResult](System.Func`3[T1,T2,TResult]) +Microsoft.FSharp.Core.FuncConvert: Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,Microsoft.FSharp.Core.FSharpFunc`2[T3,TResult]]] FromFunc[T1,T2,T3,TResult](System.Func`4[T1,T2,T3,TResult]) +Microsoft.FSharp.Core.FuncConvert: Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,Microsoft.FSharp.Core.FSharpFunc`2[T3,Microsoft.FSharp.Core.FSharpFunc`2[T4,TResult]]]] FromFunc[T1,T2,T3,T4,TResult](System.Func`5[T1,T2,T3,T4,TResult]) +Microsoft.FSharp.Core.FuncConvert: Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,Microsoft.FSharp.Core.FSharpFunc`2[T3,Microsoft.FSharp.Core.FSharpFunc`2[T4,Microsoft.FSharp.Core.FSharpFunc`2[T5,TResult]]]]] FromFunc[T1,T2,T3,T4,T5,TResult](System.Func`6[T1,T2,T3,T4,T5,TResult]) Microsoft.FSharp.Core.FuncConvert: Int32 GetHashCode() Microsoft.FSharp.Core.FuncConvert: Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.Unit] ToFSharpFunc[T](System.Action`1[T]) Microsoft.FSharp.Core.FuncConvert: Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,Microsoft.FSharp.Core.FSharpFunc`2[T3,Microsoft.FSharp.Core.FSharpFunc`2[T4,Microsoft.FSharp.Core.FSharpFunc`2[T5,TResult]]]]] FuncFromTupled[T1,T2,T3,T4,T5,TResult](Microsoft.FSharp.Core.FSharpFunc`2[System.Tuple`5[T1,T2,T3,T4,T5],TResult]) @@ -2539,6 +2629,7 @@ Microsoft.FSharp.Core.Operators: T Ceiling[T](T) Microsoft.FSharp.Core.Operators: T Cos[T](T) Microsoft.FSharp.Core.Operators: T Cosh[T](T) Microsoft.FSharp.Core.Operators: T DefaultArg[T](Microsoft.FSharp.Core.FSharpOption`1[T], T) +Microsoft.FSharp.Core.Operators: T DefaultValueArg[T](Microsoft.FSharp.Core.FSharpValueOption`1[T], T) Microsoft.FSharp.Core.Operators: T Exit[T](Int32) Microsoft.FSharp.Core.Operators: T Exp[T](T) Microsoft.FSharp.Core.Operators: T FailWith[T](System.String) @@ -3123,6 +3214,7 @@ Microsoft.FSharp.Linq.RuntimeHelpers.LeafExpressionConverter: System.String ToSt Microsoft.FSharp.Linq.RuntimeHelpers.LeafExpressionConverter: System.Type GetType() Microsoft.FSharp.Linq.RuntimeHelpers.LeafExpressionConverter: T MemberInitializationHelper[T](T) Microsoft.FSharp.Linq.RuntimeHelpers.LeafExpressionConverter: T NewAnonymousObjectHelper[T](T) +Microsoft.FSharp.NativeInterop.NativePtrModule: T& ToByRefInlined[T](IntPtr) Microsoft.FSharp.NativeInterop.NativePtrModule: Boolean Equals(System.Object) Microsoft.FSharp.NativeInterop.NativePtrModule: Int32 GetHashCode() Microsoft.FSharp.NativeInterop.NativePtrModule: IntPtr AddPointerInlined[T](IntPtr, Int32) @@ -3135,6 +3227,8 @@ Microsoft.FSharp.NativeInterop.NativePtrModule: T GetPointerInlined[T](IntPtr, I Microsoft.FSharp.NativeInterop.NativePtrModule: T ReadPointerInlined[T](IntPtr) Microsoft.FSharp.NativeInterop.NativePtrModule: Void SetPointerInlined[T](IntPtr, Int32, T) Microsoft.FSharp.NativeInterop.NativePtrModule: Void WritePointerInlined[T](IntPtr, T) +Microsoft.FSharp.NativeInterop.NativePtrModule: IntPtr OfVoidPtrInlined[T](Void*) +Microsoft.FSharp.NativeInterop.NativePtrModule: Void* ToVoidPtrInlined[T](IntPtr) Microsoft.FSharp.Quotations.DerivedPatternsModule: Boolean Equals(System.Object) Microsoft.FSharp.Quotations.DerivedPatternsModule: Int32 GetHashCode() Microsoft.FSharp.Quotations.DerivedPatternsModule: Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Quotations.FSharpExpr,Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`3[Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Quotations.FSharpExpr],Microsoft.FSharp.Collections.FSharpList`1[System.Type],Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpExpr]]]] SpecificCallPattern(Microsoft.FSharp.Quotations.FSharpExpr) diff --git a/src/fsharp/FSharp.Core.Unittests/SurfaceArea.net40.fs b/tests/FSharp.Core.UnitTests/SurfaceArea.net40.fs similarity index 97% rename from src/fsharp/FSharp.Core.Unittests/SurfaceArea.net40.fs rename to tests/FSharp.Core.UnitTests/SurfaceArea.net40.fs index 7db771e825d..fb3d061f045 100644 --- a/src/fsharp/FSharp.Core.Unittests/SurfaceArea.net40.fs +++ b/tests/FSharp.Core.UnitTests/SurfaceArea.net40.fs @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -namespace FSharp.Core.Unittests.SurfaceArea +namespace FSharp.Core.UnitTests.SurfaceArea open NUnit.Framework -open FSharp.Core.Unittests.LibraryTestFx +open FSharp.Core.UnitTests.LibraryTestFx [] type SurfaceAreaTest() = @@ -176,6 +176,7 @@ Microsoft.FSharp.Collections.ArrayModule: T[] Where[T](Microsoft.FSharp.Core.FSh Microsoft.FSharp.Collections.ArrayModule: T[] ZeroCreate[T](Int32) Microsoft.FSharp.Collections.ArrayModule: T[][] ChunkBySize[T](Int32, T[]) Microsoft.FSharp.Collections.ArrayModule: T[][] SplitInto[T](Int32, T[]) +Microsoft.FSharp.Collections.ArrayModule: T[][] Transpose[T](System.Collections.Generic.IEnumerable`1[T[]]) Microsoft.FSharp.Collections.ArrayModule: T[][] Windowed[T](Int32, T[]) Microsoft.FSharp.Collections.ArrayModule: Void CopyTo[T](T[], Int32, T[], Int32, Int32) Microsoft.FSharp.Collections.ArrayModule: Void Fill[T](T[], Int32, Int32, T) @@ -244,6 +245,7 @@ Microsoft.FSharp.Collections.FSharpMap`2[TKey,TValue]: Int32 get_Count() Microsoft.FSharp.Collections.FSharpMap`2[TKey,TValue]: Microsoft.FSharp.Collections.FSharpMap`2[TKey,TValue] Add(TKey, TValue) Microsoft.FSharp.Collections.FSharpMap`2[TKey,TValue]: Microsoft.FSharp.Collections.FSharpMap`2[TKey,TValue] Remove(TKey) Microsoft.FSharp.Collections.FSharpMap`2[TKey,TValue]: Microsoft.FSharp.Core.FSharpOption`1[TValue] TryFind(TKey) +Microsoft.FSharp.Collections.FSharpMap`2[TKey,TValue]: Boolean TryGetValue(TKey, TValue ByRef) Microsoft.FSharp.Collections.FSharpMap`2[TKey,TValue]: System.String ToString() Microsoft.FSharp.Collections.FSharpMap`2[TKey,TValue]: System.Type GetType() Microsoft.FSharp.Collections.FSharpMap`2[TKey,TValue]: TValue Item [TKey] @@ -294,6 +296,7 @@ Microsoft.FSharp.Collections.ListModule: Int32 GetHashCode() Microsoft.FSharp.Collections.ListModule: Int32 Length[T](Microsoft.FSharp.Collections.FSharpList`1[T]) Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Collections.FSharpList`1[T]] ChunkBySize[T](Int32, Microsoft.FSharp.Collections.FSharpList`1[T]) Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Collections.FSharpList`1[T]] SplitInto[T](Int32, Microsoft.FSharp.Collections.FSharpList`1[T]) +Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Collections.FSharpList`1[T]] Transpose[T](System.Collections.Generic.IEnumerable`1[Microsoft.FSharp.Collections.FSharpList`1[T]]) Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Collections.FSharpList`1[T]] Windowed[T](Int32, Microsoft.FSharp.Collections.FSharpList`1[T]) Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[System.Tuple`2[System.Int32,T]] Indexed[T](Microsoft.FSharp.Collections.FSharpList`1[T]) Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[System.Tuple`2[T,T]] Pairwise[T](Microsoft.FSharp.Collections.FSharpList`1[T]) @@ -433,6 +436,7 @@ Microsoft.FSharp.Collections.SeqModule: Microsoft.FSharp.Core.FSharpOption`1[T] Microsoft.FSharp.Collections.SeqModule: Microsoft.FSharp.Core.FSharpOption`1[T] TryHead[T](System.Collections.Generic.IEnumerable`1[T]) Microsoft.FSharp.Collections.SeqModule: Microsoft.FSharp.Core.FSharpOption`1[T] TryItem[T](Int32, System.Collections.Generic.IEnumerable`1[T]) Microsoft.FSharp.Collections.SeqModule: Microsoft.FSharp.Core.FSharpOption`1[T] TryLast[T](System.Collections.Generic.IEnumerable`1[T]) +Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[T]] Transpose[TCollection,T](System.Collections.Generic.IEnumerable`1[TCollection]) Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[System.Tuple`2[System.Int32,T]] Indexed[T](System.Collections.Generic.IEnumerable`1[T]) Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[System.Tuple`2[T,T]] Pairwise[T](System.Collections.Generic.IEnumerable`1[T]) Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[System.Tuple`2[T1,T2]] AllPairs[T1,T2](System.Collections.Generic.IEnumerable`1[T1], System.Collections.Generic.IEnumerable`1[T2]) @@ -551,6 +555,29 @@ Microsoft.FSharp.Collections.SetModule: TState FoldBack[T,TState](Microsoft.FSha Microsoft.FSharp.Collections.SetModule: TState Fold[T,TState](Microsoft.FSharp.Core.FSharpFunc`2[TState,Microsoft.FSharp.Core.FSharpFunc`2[T,TState]], TState, Microsoft.FSharp.Collections.FSharpSet`1[T]) Microsoft.FSharp.Collections.SetModule: T[] ToArray[T](Microsoft.FSharp.Collections.FSharpSet`1[T]) Microsoft.FSharp.Collections.SetModule: Void Iterate[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.Unit], Microsoft.FSharp.Collections.FSharpSet`1[T]) +Microsoft.FSharp.Control.AsyncActivation`1[T]: Boolean Equals(System.Object) +Microsoft.FSharp.Control.AsyncActivation`1[T]: Boolean IsCancellationRequested +Microsoft.FSharp.Control.AsyncActivation`1[T]: Boolean get_IsCancellationRequested() +Microsoft.FSharp.Control.AsyncActivation`1[T]: Int32 GetHashCode() +Microsoft.FSharp.Control.AsyncActivation`1[T]: Microsoft.FSharp.Control.AsyncReturn OnCancellation() +Microsoft.FSharp.Control.AsyncActivation`1[T]: Void OnExceptionRaised() +Microsoft.FSharp.Control.AsyncActivation`1[T]: Microsoft.FSharp.Control.AsyncReturn OnSuccess(T) +Microsoft.FSharp.Control.AsyncActivation`1[T]: System.String ToString() +Microsoft.FSharp.Control.AsyncActivation`1[T]: System.Type GetType() +Microsoft.FSharp.Control.AsyncPrimitives: Boolean Equals(System.Object) +Microsoft.FSharp.Control.AsyncPrimitives: Int32 GetHashCode() +Microsoft.FSharp.Control.AsyncPrimitives: Microsoft.FSharp.Control.AsyncReturn Bind[T,TResult](Microsoft.FSharp.Control.AsyncActivation`1[T], Microsoft.FSharp.Control.FSharpAsync`1[TResult], Microsoft.FSharp.Core.FSharpFunc`2[TResult,Microsoft.FSharp.Control.FSharpAsync`1[T]]) +Microsoft.FSharp.Control.AsyncPrimitives: Microsoft.FSharp.Control.AsyncReturn CallThenInvoke[T,TResult](Microsoft.FSharp.Control.AsyncActivation`1[T], TResult, Microsoft.FSharp.Core.FSharpFunc`2[TResult,Microsoft.FSharp.Control.FSharpAsync`1[T]]) +Microsoft.FSharp.Control.AsyncPrimitives: Microsoft.FSharp.Control.AsyncReturn Invoke[T](Microsoft.FSharp.Control.FSharpAsync`1[T], Microsoft.FSharp.Control.AsyncActivation`1[T]) +Microsoft.FSharp.Control.AsyncPrimitives: Microsoft.FSharp.Control.AsyncReturn TryFinally[T](Microsoft.FSharp.Control.AsyncActivation`1[T], Microsoft.FSharp.Control.FSharpAsync`1[T], Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,Microsoft.FSharp.Core.Unit]) +Microsoft.FSharp.Control.AsyncPrimitives: Microsoft.FSharp.Control.AsyncReturn TryWith[T](Microsoft.FSharp.Control.AsyncActivation`1[T], Microsoft.FSharp.Control.FSharpAsync`1[T], Microsoft.FSharp.Core.FSharpFunc`2[System.Exception,Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Control.FSharpAsync`1[T]]]) +Microsoft.FSharp.Control.AsyncPrimitives: Microsoft.FSharp.Control.FSharpAsync`1[T] MakeAsync[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Control.AsyncActivation`1[T],Microsoft.FSharp.Control.AsyncReturn]) +Microsoft.FSharp.Control.AsyncPrimitives: System.String ToString() +Microsoft.FSharp.Control.AsyncPrimitives: System.Type GetType() +Microsoft.FSharp.Control.AsyncReturn: Boolean Equals(System.Object) +Microsoft.FSharp.Control.AsyncReturn: Int32 GetHashCode() +Microsoft.FSharp.Control.AsyncReturn: System.String ToString() +Microsoft.FSharp.Control.AsyncReturn: System.Type GetType() Microsoft.FSharp.Control.CommonExtensions: Boolean Equals(System.Object) Microsoft.FSharp.Control.CommonExtensions: Int32 GetHashCode() Microsoft.FSharp.Control.CommonExtensions: Microsoft.FSharp.Control.FSharpAsync`1[Microsoft.FSharp.Core.Unit] AsyncWrite(System.IO.Stream, Byte[], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32]) @@ -603,6 +630,7 @@ Microsoft.FSharp.Control.FSharpAsync: System.String ToString() Microsoft.FSharp.Control.FSharpAsync: System.Threading.CancellationToken DefaultCancellationToken Microsoft.FSharp.Control.FSharpAsync: System.Threading.CancellationToken get_DefaultCancellationToken() Microsoft.FSharp.Control.FSharpAsync: System.Threading.Tasks.Task`1[T] StartAsTask[T](Microsoft.FSharp.Control.FSharpAsync`1[T], Microsoft.FSharp.Core.FSharpOption`1[System.Threading.Tasks.TaskCreationOptions], Microsoft.FSharp.Core.FSharpOption`1[System.Threading.CancellationToken]) +Microsoft.FSharp.Control.FSharpAsync: System.Threading.Tasks.Task`1[T] StartImmediateAsTask[T](Microsoft.FSharp.Control.FSharpAsync`1[T], Microsoft.FSharp.Core.FSharpOption`1[System.Threading.CancellationToken]) Microsoft.FSharp.Control.FSharpAsync: System.Tuple`3[Microsoft.FSharp.Core.FSharpFunc`2[System.Tuple`3[TArg,System.AsyncCallback,System.Object],System.IAsyncResult],Microsoft.FSharp.Core.FSharpFunc`2[System.IAsyncResult,T],Microsoft.FSharp.Core.FSharpFunc`2[System.IAsyncResult,Microsoft.FSharp.Core.Unit]] AsBeginEnd[TArg,T](Microsoft.FSharp.Core.FSharpFunc`2[TArg,Microsoft.FSharp.Control.FSharpAsync`1[T]]) Microsoft.FSharp.Control.FSharpAsync: System.Type GetType() Microsoft.FSharp.Control.FSharpAsync: T RunSynchronously[T](Microsoft.FSharp.Control.FSharpAsync`1[T], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Threading.CancellationToken]) @@ -773,6 +801,25 @@ Microsoft.FSharp.Core.AutoSerializableAttribute: System.Object get_TypeId() Microsoft.FSharp.Core.AutoSerializableAttribute: System.String ToString() Microsoft.FSharp.Core.AutoSerializableAttribute: System.Type GetType() Microsoft.FSharp.Core.AutoSerializableAttribute: Void .ctor(Boolean) +Microsoft.FSharp.Core.ByRefKinds+In: Boolean Equals(System.Object) +Microsoft.FSharp.Core.ByRefKinds+In: Int32 GetHashCode() +Microsoft.FSharp.Core.ByRefKinds+In: System.String ToString() +Microsoft.FSharp.Core.ByRefKinds+In: System.Type GetType() +Microsoft.FSharp.Core.ByRefKinds+InOut: Boolean Equals(System.Object) +Microsoft.FSharp.Core.ByRefKinds+InOut: Int32 GetHashCode() +Microsoft.FSharp.Core.ByRefKinds+InOut: System.String ToString() +Microsoft.FSharp.Core.ByRefKinds+InOut: System.Type GetType() +Microsoft.FSharp.Core.ByRefKinds+Out: Boolean Equals(System.Object) +Microsoft.FSharp.Core.ByRefKinds+Out: Int32 GetHashCode() +Microsoft.FSharp.Core.ByRefKinds+Out: System.String ToString() +Microsoft.FSharp.Core.ByRefKinds+Out: System.Type GetType() +Microsoft.FSharp.Core.ByRefKinds: Boolean Equals(System.Object) +Microsoft.FSharp.Core.ByRefKinds: Int32 GetHashCode() +Microsoft.FSharp.Core.ByRefKinds: Microsoft.FSharp.Core.ByRefKinds+In +Microsoft.FSharp.Core.ByRefKinds: Microsoft.FSharp.Core.ByRefKinds+InOut +Microsoft.FSharp.Core.ByRefKinds: Microsoft.FSharp.Core.ByRefKinds+Out +Microsoft.FSharp.Core.ByRefKinds: System.String ToString() +Microsoft.FSharp.Core.ByRefKinds: System.Type GetType() Microsoft.FSharp.Core.CLIEventAttribute: Boolean Equals(System.Object) Microsoft.FSharp.Core.CLIEventAttribute: Boolean IsDefaultAttribute() Microsoft.FSharp.Core.CLIEventAttribute: Boolean Match(System.Object) @@ -1179,6 +1226,7 @@ Microsoft.FSharp.Core.ExtraTopLevelOperators: Microsoft.FSharp.Linq.QueryBuilder Microsoft.FSharp.Core.ExtraTopLevelOperators: SByte ToSByte[T](T) Microsoft.FSharp.Core.ExtraTopLevelOperators: Single ToSingle[T](T) Microsoft.FSharp.Core.ExtraTopLevelOperators: System.Collections.Generic.IDictionary`2[TKey,TValue] CreateDictionary[TKey,TValue](System.Collections.Generic.IEnumerable`1[System.Tuple`2[TKey,TValue]]) +Microsoft.FSharp.Core.ExtraTopLevelOperators: System.Collections.Generic.IReadOnlyDictionary`2[TKey,TValue] CreateReadOnlyDictionary[TKey,TValue](System.Collections.Generic.IEnumerable`1[System.Tuple`2[TKey,TValue]]) Microsoft.FSharp.Core.ExtraTopLevelOperators: System.String ToString() Microsoft.FSharp.Core.ExtraTopLevelOperators: System.Type GetType() Microsoft.FSharp.Core.ExtraTopLevelOperators: T LazyPattern[T](System.Lazy`1[T]) @@ -2191,6 +2239,36 @@ Microsoft.FSharp.Core.FSharpResult`2[T,TError]: T ResultValue Microsoft.FSharp.Core.FSharpResult`2[T,TError]: T get_ResultValue() Microsoft.FSharp.Core.FSharpResult`2[T,TError]: TError ErrorValue Microsoft.FSharp.Core.FSharpResult`2[T,TError]: TError get_ErrorValue() +Microsoft.FSharp.Core.FSharpValueOption`1+Tags[T]: Boolean Equals(System.Object) +Microsoft.FSharp.Core.FSharpValueOption`1+Tags[T]: Int32 GetHashCode() +Microsoft.FSharp.Core.FSharpValueOption`1+Tags[T]: Int32 ValueNone +Microsoft.FSharp.Core.FSharpValueOption`1+Tags[T]: Int32 ValueSome +Microsoft.FSharp.Core.FSharpValueOption`1+Tags[T]: System.String ToString() +Microsoft.FSharp.Core.FSharpValueOption`1+Tags[T]: System.Type GetType() +Microsoft.FSharp.Core.FSharpValueOption`1[T]: Boolean Equals(Microsoft.FSharp.Core.FSharpValueOption`1[T]) +Microsoft.FSharp.Core.FSharpValueOption`1[T]: Boolean Equals(System.Object) +Microsoft.FSharp.Core.FSharpValueOption`1[T]: Boolean Equals(System.Object, System.Collections.IEqualityComparer) +Microsoft.FSharp.Core.FSharpValueOption`1[T]: Int32 CompareTo(Microsoft.FSharp.Core.FSharpValueOption`1[T]) +Microsoft.FSharp.Core.FSharpValueOption`1[T]: Int32 CompareTo(System.Object) +Microsoft.FSharp.Core.FSharpValueOption`1[T]: Int32 CompareTo(System.Object, System.Collections.IComparer) +Microsoft.FSharp.Core.FSharpValueOption`1[T]: Int32 GetHashCode() +Microsoft.FSharp.Core.FSharpValueOption`1[T]: Int32 GetHashCode(System.Collections.IEqualityComparer) +Microsoft.FSharp.Core.FSharpValueOption`1[T]: Int32 Tag +Microsoft.FSharp.Core.FSharpValueOption`1[T]: Int32 get_Tag() +Microsoft.FSharp.Core.FSharpValueOption`1[T]: Microsoft.FSharp.Core.FSharpValueOption`1+Tags[T] +Microsoft.FSharp.Core.FSharpValueOption`1[T]: Microsoft.FSharp.Core.FSharpValueOption`1[T] ValueNone +Microsoft.FSharp.Core.FSharpValueOption`1[T]: Boolean IsValueNone +Microsoft.FSharp.Core.FSharpValueOption`1[T]: Boolean IsValueSome +Microsoft.FSharp.Core.FSharpValueOption`1[T]: Boolean get_IsValueNone() +Microsoft.FSharp.Core.FSharpValueOption`1[T]: Boolean get_IsValueSome() +Microsoft.FSharp.Core.FSharpValueOption`1[T]: Microsoft.FSharp.Core.FSharpValueOption`1[T] NewValueSome(T) +Microsoft.FSharp.Core.FSharpValueOption`1[T]: Microsoft.FSharp.Core.FSharpValueOption`1[T] get_ValueNone() +Microsoft.FSharp.Core.FSharpValueOption`1[T]: System.String ToString() +Microsoft.FSharp.Core.FSharpValueOption`1[T]: System.Type GetType() +Microsoft.FSharp.Core.FSharpValueOption`1[T]: T Item +Microsoft.FSharp.Core.FSharpValueOption`1[T]: T Value +Microsoft.FSharp.Core.FSharpValueOption`1[T]: T get_Item() +Microsoft.FSharp.Core.FSharpValueOption`1[T]: T get_Value() Microsoft.FSharp.Core.FSharpTypeFunc: Boolean Equals(System.Object) Microsoft.FSharp.Core.FSharpTypeFunc: Int32 GetHashCode() Microsoft.FSharp.Core.FSharpTypeFunc: System.Object Specialize[T]() @@ -2198,6 +2276,18 @@ Microsoft.FSharp.Core.FSharpTypeFunc: System.String ToString() Microsoft.FSharp.Core.FSharpTypeFunc: System.Type GetType() Microsoft.FSharp.Core.FSharpTypeFunc: Void .ctor() Microsoft.FSharp.Core.FuncConvert: Boolean Equals(System.Object) +Microsoft.FSharp.Core.FuncConvert: Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,Microsoft.FSharp.Core.Unit] FromAction(System.Action) +Microsoft.FSharp.Core.FuncConvert: Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.Unit] FromAction[T](System.Action`1[T]) +Microsoft.FSharp.Core.FuncConvert: Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,Microsoft.FSharp.Core.Unit]] FromAction[T1,T2](System.Action`2[T1,T2]) +Microsoft.FSharp.Core.FuncConvert: Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,Microsoft.FSharp.Core.FSharpFunc`2[T3,Microsoft.FSharp.Core.Unit]]] FromAction[T1,T2,T3](System.Action`3[T1,T2,T3]) +Microsoft.FSharp.Core.FuncConvert: Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,Microsoft.FSharp.Core.FSharpFunc`2[T3,Microsoft.FSharp.Core.FSharpFunc`2[T4,Microsoft.FSharp.Core.Unit]]]] FromAction[T1,T2,T3,T4](System.Action`4[T1,T2,T3,T4]) +Microsoft.FSharp.Core.FuncConvert: Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,Microsoft.FSharp.Core.FSharpFunc`2[T3,Microsoft.FSharp.Core.FSharpFunc`2[T4,Microsoft.FSharp.Core.FSharpFunc`2[T5,Microsoft.FSharp.Core.Unit]]]]] FromAction[T1,T2,T3,T4,T5](System.Action`5[T1,T2,T3,T4,T5]) +Microsoft.FSharp.Core.FuncConvert: Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,T] FromFunc[T](System.Func`1[T]) +Microsoft.FSharp.Core.FuncConvert: Microsoft.FSharp.Core.FSharpFunc`2[T,TResult] FromFunc[T,TResult](System.Func`2[T,TResult]) +Microsoft.FSharp.Core.FuncConvert: Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,TResult]] FromFunc[T1,T2,TResult](System.Func`3[T1,T2,TResult]) +Microsoft.FSharp.Core.FuncConvert: Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,Microsoft.FSharp.Core.FSharpFunc`2[T3,TResult]]] FromFunc[T1,T2,T3,TResult](System.Func`4[T1,T2,T3,TResult]) +Microsoft.FSharp.Core.FuncConvert: Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,Microsoft.FSharp.Core.FSharpFunc`2[T3,Microsoft.FSharp.Core.FSharpFunc`2[T4,TResult]]]] FromFunc[T1,T2,T3,T4,TResult](System.Func`5[T1,T2,T3,T4,TResult]) +Microsoft.FSharp.Core.FuncConvert: Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,Microsoft.FSharp.Core.FSharpFunc`2[T3,Microsoft.FSharp.Core.FSharpFunc`2[T4,Microsoft.FSharp.Core.FSharpFunc`2[T5,TResult]]]]] FromFunc[T1,T2,T3,T4,T5,TResult](System.Func`6[T1,T2,T3,T4,T5,TResult]) Microsoft.FSharp.Core.FuncConvert: Int32 GetHashCode() Microsoft.FSharp.Core.FuncConvert: Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.Unit] ToFSharpFunc[T](System.Action`1[T]) Microsoft.FSharp.Core.FuncConvert: Microsoft.FSharp.Core.FSharpFunc`2[T,TResult] ToFSharpFunc[T,TResult](System.Converter`2[T,TResult]) @@ -2623,8 +2713,8 @@ Microsoft.FSharp.Core.Operators: System.Collections.Generic.IEnumerable`1[T] op_ Microsoft.FSharp.Core.Operators: System.Collections.Generic.IEnumerable`1[T] op_Range[T](T, T) Microsoft.FSharp.Core.Operators: System.Decimal ToDecimal[T](T) Microsoft.FSharp.Core.Operators: System.Exception Failure(System.String) -Microsoft.FSharp.Core.Operators: System.IO.TextReader ConsoleIn[T]() Microsoft.FSharp.Core.Operators: System.IO.TextWriter ConsoleError[T]() +Microsoft.FSharp.Core.Operators: System.IO.TextReader ConsoleIn[T]() Microsoft.FSharp.Core.Operators: System.IO.TextWriter ConsoleOut[T]() Microsoft.FSharp.Core.Operators: System.Object Box[T](T)" + #if DEBUG @@ -2647,6 +2737,7 @@ Microsoft.FSharp.Core.Operators: T Ceiling[T](T) Microsoft.FSharp.Core.Operators: T Cos[T](T) Microsoft.FSharp.Core.Operators: T Cosh[T](T) Microsoft.FSharp.Core.Operators: T DefaultArg[T](Microsoft.FSharp.Core.FSharpOption`1[T], T) +Microsoft.FSharp.Core.Operators: T DefaultValueArg[T](Microsoft.FSharp.Core.FSharpValueOption`1[T], T) Microsoft.FSharp.Core.Operators: T Exit[T](Int32) Microsoft.FSharp.Core.Operators: T Exp[T](T) Microsoft.FSharp.Core.Operators: T FailWith[T](System.String) @@ -3270,6 +3361,7 @@ Microsoft.FSharp.Linq.RuntimeHelpers.LeafExpressionConverter: System.String ToSt Microsoft.FSharp.Linq.RuntimeHelpers.LeafExpressionConverter: System.Type GetType() Microsoft.FSharp.Linq.RuntimeHelpers.LeafExpressionConverter: T MemberInitializationHelper[T](T) Microsoft.FSharp.Linq.RuntimeHelpers.LeafExpressionConverter: T NewAnonymousObjectHelper[T](T) +Microsoft.FSharp.NativeInterop.NativePtrModule: T& ToByRefInlined[T](IntPtr) Microsoft.FSharp.NativeInterop.NativePtrModule: Boolean Equals(System.Object) Microsoft.FSharp.NativeInterop.NativePtrModule: Int32 GetHashCode() Microsoft.FSharp.NativeInterop.NativePtrModule: IntPtr AddPointerInlined[T](IntPtr, Int32) @@ -3282,6 +3374,8 @@ Microsoft.FSharp.NativeInterop.NativePtrModule: T GetPointerInlined[T](IntPtr, I Microsoft.FSharp.NativeInterop.NativePtrModule: T ReadPointerInlined[T](IntPtr) Microsoft.FSharp.NativeInterop.NativePtrModule: Void SetPointerInlined[T](IntPtr, Int32, T) Microsoft.FSharp.NativeInterop.NativePtrModule: Void WritePointerInlined[T](IntPtr, T) +Microsoft.FSharp.NativeInterop.NativePtrModule: IntPtr OfVoidPtrInlined[T](Void*) +Microsoft.FSharp.NativeInterop.NativePtrModule: Void* ToVoidPtrInlined[T](IntPtr) Microsoft.FSharp.Quotations.DerivedPatternsModule: Boolean Equals(System.Object) Microsoft.FSharp.Quotations.DerivedPatternsModule: Int32 GetHashCode() Microsoft.FSharp.Quotations.DerivedPatternsModule: Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Quotations.FSharpExpr,Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`3[Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Quotations.FSharpExpr],Microsoft.FSharp.Collections.FSharpList`1[System.Type],Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpExpr]]]] SpecificCallPattern(Microsoft.FSharp.Quotations.FSharpExpr) diff --git a/src/fsharp/FSharp.Core.Unittests/TypeForwarding.fs b/tests/FSharp.Core.UnitTests/TypeForwarding.fs similarity index 91% rename from src/fsharp/FSharp.Core.Unittests/TypeForwarding.fs rename to tests/FSharp.Core.UnitTests/TypeForwarding.fs index 0476ad9d171..b0ca6fa9044 100644 --- a/src/fsharp/FSharp.Core.Unittests/TypeForwarding.fs +++ b/tests/FSharp.Core.UnitTests/TypeForwarding.fs @@ -2,13 +2,13 @@ // Various tests for Microsoft.FSharp.Core type forwarding -namespace FSharp.Core.Unittests.FSharp_Core.Type_Forwarding +namespace FSharp.Core.UnitTests.FSharp_Core.Type_Forwarding open System -open FSharp.Core.Unittests.LibraryTestFx +open FSharp.Core.UnitTests.LibraryTestFx open NUnit.Framework -#if FX_PORTABLE_OR_NETSTANDARD +#if NETSTANDARD1_6 // TODO named #define ? #else [] diff --git a/tests/FSharp.Core.UnitTests/project.json b/tests/FSharp.Core.UnitTests/project.json new file mode 100644 index 00000000000..901129da26d --- /dev/null +++ b/tests/FSharp.Core.UnitTests/project.json @@ -0,0 +1,33 @@ +{ + "version": "1.0.0-*", + "name": "FSharp.Core.UnitTests", + "buildOptions": { + "debugType": "portable", + "emitEntryPoint": true + }, + "dependencies": { + "nunit": "3.5.0", + "nunitlite": "3.5.0", + "System.ValueTuple": "4.3.0", + "FsCheck": "3.0.0-alpha3", + "Testing.FSharp.Core": "4.2.4", + "Microsoft.FSharp.TupleSample": "1.0.0-alpha-161112" + }, + "runtimes": { + "win7-x86": {}, + "win7-x64": {}, + "osx.10.11-x64": {}, + "ubuntu.14.04-x64": {} + }, + "frameworks": { + "netcoreapp1.0": { + "dependencies": { + "Microsoft.NETCore.App": { + "type": "platform", + "version": "1.0.1" + } + }, + "imports": [ "netstandard1.1", "netstandard1.6", "portable-net45+win8+wp8+wpa81" ] + } + }, +} diff --git a/tests/fsharp/FSharp.Tests.FSharpSuite.DrivingCoreCLR/FSharp.Tests.FSharpSuite.DrivingCoreCLR.fsproj b/tests/fsharp/FSharp.Tests.FSharpSuite.DrivingCoreCLR/FSharp.Tests.FSharpSuite.DrivingCoreCLR.fsproj index 46672cabef9..b236d1d93cb 100644 --- a/tests/fsharp/FSharp.Tests.FSharpSuite.DrivingCoreCLR/FSharp.Tests.FSharpSuite.DrivingCoreCLR.fsproj +++ b/tests/fsharp/FSharp.Tests.FSharpSuite.DrivingCoreCLR/FSharp.Tests.FSharpSuite.DrivingCoreCLR.fsproj @@ -29,7 +29,7 @@ scriptlib.fsx - + NunitHelpers.fs diff --git a/tests/fsharp/FSharp.Tests.FSharpSuite.fsproj b/tests/fsharp/FSharp.Tests.FSharpSuite.fsproj index 1c52cbf48ff..2ec2840bc85 100644 --- a/tests/fsharp/FSharp.Tests.FSharpSuite.fsproj +++ b/tests/fsharp/FSharp.Tests.FSharpSuite.fsproj @@ -30,14 +30,16 @@ scriptlib.fsx - + NunitHelpers.fs + + @@ -45,11 +47,11 @@ - $(FSharpSourcesRoot)\..\packages\System.Collections.Immutable.$(SystemCollectionsImmutableVersion)\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll + $(FSharpSourcesRoot)\..\packages\System.Collections.Immutable.$(SystemCollectionsImmutablePackageVersion)\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll True - $(FSharpSourcesRoot)\..\packages\System.Reflection.Metadata.1.4.2\lib\portable-net45+win8\System.Reflection.Metadata.dll + $(FSharpSourcesRoot)\..\packages\System.Reflection.Metadata.$(SystemReflectionMetadataPackageVersion)\lib\portable-net45+win8\System.Reflection.Metadata.dll True diff --git a/tests/fsharp/SDKTests/AllSdkTargetsTests.proj b/tests/fsharp/SDKTests/AllSdkTargetsTests.proj new file mode 100644 index 00000000000..8aecfd0263e --- /dev/null +++ b/tests/fsharp/SDKTests/AllSdkTargetsTests.proj @@ -0,0 +1,18 @@ + + + + release + + + + + + + + + + + + + + diff --git a/tests/fsharp/SDKTests/tests/DefaultImplicitReferenceTest.proj b/tests/fsharp/SDKTests/tests/DefaultImplicitReferenceTest.proj new file mode 100644 index 00000000000..beabbba8a29 --- /dev/null +++ b/tests/fsharp/SDKTests/tests/DefaultImplicitReferenceTest.proj @@ -0,0 +1,19 @@ + + + + + + + + + true + $(DefaultFSharpCorePackageVersion) + + true + $(DefaultValueTuplePackageVersion) + + + + + + diff --git a/tests/fsharp/SDKTests/tests/DisableImplicitReferenceTest.proj b/tests/fsharp/SDKTests/tests/DisableImplicitReferenceTest.proj new file mode 100644 index 00000000000..7f874c55e70 --- /dev/null +++ b/tests/fsharp/SDKTests/tests/DisableImplicitReferenceTest.proj @@ -0,0 +1,20 @@ + + + + + + true + true + + + + + + + false + false + + + + + diff --git a/tests/fsharp/SDKTests/tests/DisableImplicitReferenceWithInclude.proj b/tests/fsharp/SDKTests/tests/DisableImplicitReferenceWithInclude.proj new file mode 100644 index 00000000000..bdc77f8d859 --- /dev/null +++ b/tests/fsharp/SDKTests/tests/DisableImplicitReferenceWithInclude.proj @@ -0,0 +1,28 @@ + + + + + + true + true + + + + + + + + + + + + true + 99.99.99 + + true + 44.44.44 + + + + + diff --git a/tests/fsharp/SDKTests/tests/SetImplicitReferenceTest.proj b/tests/fsharp/SDKTests/tests/SetImplicitReferenceTest.proj new file mode 100644 index 00000000000..f5b878d572b --- /dev/null +++ b/tests/fsharp/SDKTests/tests/SetImplicitReferenceTest.proj @@ -0,0 +1,23 @@ + + + + + + 99.99.99 + 44.44.44 + + + + + + + true + 99.99.99 + + true + 44.44.44 + + + + + diff --git a/tests/fsharp/SDKTests/tests/Test.props b/tests/fsharp/SDKTests/tests/Test.props new file mode 100644 index 00000000000..fdfc314758e --- /dev/null +++ b/tests/fsharp/SDKTests/tests/Test.props @@ -0,0 +1,19 @@ + + + + + net46 + <_TargetFrameworkVersionWithoutV Condition="'$(_TargetFrameworkVersionWithoutV)' == ''">4.6 + .NETFramework + + release + $(MSBuildThisFileDirectory)..\..\..\..\$(Configuration)\net40\bin + + + AnyCPU + $(MSBuildThisFileDirectory) + + + + + diff --git a/tests/fsharp/SDKTests/tests/Test.targets b/tests/fsharp/SDKTests/tests/Test.targets new file mode 100644 index 00000000000..668f100f9e4 --- /dev/null +++ b/tests/fsharp/SDKTests/tests/Test.targets @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/fsharp/SDKTests/tests/UpdateReference.proj b/tests/fsharp/SDKTests/tests/UpdateReference.proj new file mode 100644 index 00000000000..31a0f4c1b64 --- /dev/null +++ b/tests/fsharp/SDKTests/tests/UpdateReference.proj @@ -0,0 +1,21 @@ + + + + + + + + + + + + + true + 99.99.99 + true + 44.44.44 + + + + + diff --git a/tests/fsharp/TypeProviderTests.fs b/tests/fsharp/TypeProviderTests.fs index 3a0f0443b2a..08a39395ef9 100644 --- a/tests/fsharp/TypeProviderTests.fs +++ b/tests/fsharp/TypeProviderTests.fs @@ -23,18 +23,23 @@ open SingleTest // Use these lines if you want to test CoreCLR let FSC_BASIC = FSC_CORECLR let FSI_BASIC = FSI_CORECLR +let FSIANYCPU_BASIC = FSI_CORECLR #else let FSC_BASIC = FSC_OPT_PLUS_DEBUG let FSI_BASIC = FSI_FILE +let FSIANYCPU_BASIC = FSIANYCPU_FILE #endif +(* [] let diamondAssembly () = let cfg = testConfig "typeProviders/diamondAssembly" rm cfg "provider.dll" - fsc cfg "%s" "--out:provided.dll -a" [".." ++ "helloWorld" ++ "provided.fs"] + // Add a version flag to make this generate native resources. The native resources aren't important and + // can be dropped when the provided.dll is linked but we need to tolerate generated DLLs that have them + fsc cfg "%s" "--out:provided.dll -a --version:0.0.0.1" [".." ++ "helloWorld" ++ "provided.fs"] fsc cfg "%s" "--out:provider.dll -a" [".." ++ "helloWorld" ++ "provider.fsx"] @@ -246,16 +251,69 @@ let ``negative type provider tests`` (name:string) = SingleTest.singleNegTest cfg name -[] -let splitAssembly () = - let cfg = testConfig "typeProviders/splitAssembly" +let splitAssembly subdir project = + + let cfg = testConfig project + + let clean() = + rm cfg "providerDesigner.dll" + rmdir cfg "typeproviders" + rmdir cfg "tools" + rmdir cfg (".." ++ "typeproviders") + rmdir cfg (".." ++ "tools") + + clean() fsc cfg "--out:provider.dll -a" ["provider.fs"] fsc cfg "--out:providerDesigner.dll -a" ["providerDesigner.fsx"] SingleTest.singleTestBuildAndRunAux cfg FSC_BASIC - + + SingleTest.singleTestBuildAndRunAux cfg FSI_BASIC + + SingleTest.singleTestBuildAndRunAux cfg FSIANYCPU_BASIC + + // Do the same thing with different load locations for the type provider design-time component + + clean() + + // check a few load locations + let someLoadPaths = + [ subdir ++ "fsharp41" ++ "net461" + subdir ++ "fsharp41" ++ "net45" + // include up one directory + ".." ++ subdir ++ "fsharp41" ++ "net45" + subdir ++ "fsharp41" ++ "netstandard2.0" ] + + for dir in someLoadPaths do + + clean() + + // put providerDesigner.dll into a different place + mkdir cfg dir + fsc cfg "--out:%s/providerDesigner.dll -a" dir ["providerDesigner.fsx"] + + SingleTest.singleTestBuildAndRunAux cfg FSC_BASIC + + for dir in someLoadPaths do + + clean() + + // put providerDesigner.dll into a different place + mkdir cfg dir + fsc cfg "--out:%s/providerDesigner.dll -a" dir ["providerDesigner.fsx"] + + SingleTest.singleTestBuildAndRunAux cfg FSI_BASIC + + clean() + +[] +let splitAssemblyTools () = splitAssembly "tools" "typeProviders/splitAssemblyTools" + +[] +let splitAssemblyTypeProviders () = splitAssembly "typeproviders" "typeProviders/splitAssemblyTypeproviders" + [] let wedgeAssembly () = let cfg = testConfig "typeProviders/wedgeAssembly" @@ -301,3 +359,4 @@ let wedgeAssembly () = peverify cfg "test3.exe" exec cfg ("." ++ "test3.exe") "" +*) diff --git a/tests/fsharp/app.config b/tests/fsharp/app.config index bd1c9c33df5..b64cfc5852a 100644 --- a/tests/fsharp/app.config +++ b/tests/fsharp/app.config @@ -4,7 +4,7 @@ - + diff --git a/tests/fsharp/core/.gitignore b/tests/fsharp/core/.gitignore index 03eded68ce4..49d72838fd2 100644 --- a/tests/fsharp/core/.gitignore +++ b/tests/fsharp/core/.gitignore @@ -9,6 +9,9 @@ tmptest1.exe access/fsc.cmd.args +byrefs/*.err +byrefs/*.vserr + fsi-reference/ImplementationAssembly/ReferenceAssemblyExample.dll fsi-reference/ReferenceAssembly/ReferenceAssemblyExample.dll @@ -49,6 +52,9 @@ quotesInMultipleModules/module2-opt.exe resources/Resources.resources +span/*.err +span/*.vserr + topinit/app69514.exe topinit/app69514.pdb topinit/app69514-noopt.exe @@ -77,3 +83,7 @@ members/basics/tmptest.exe members/basics/tmptest.fs members/basics/tmptest.fsi members/basics/tmptest1.exe + +versionAttributes/out.stderr.txt +versionAttributes/out.stdout.txt +versionAttributes/*.exe \ No newline at end of file diff --git a/tests/fsharp/core/array/test.fsx b/tests/fsharp/core/array/test.fsx index eb91597dd76..0e25ee5e966 100644 --- a/tests/fsharp/core/array/test.fsx +++ b/tests/fsharp/core/array/test.fsx @@ -589,7 +589,6 @@ module Array2Tests = begin end -#if !FSCORE_PORTABLE_OLD && !FSCORE_PORTABLE_NEW module ArrayNonZeroBasedTestsSlice = let runTest () = let arr = (Array2D.initBased 5 4 3 2 (fun i j -> (i,j))) @@ -636,7 +635,6 @@ module ArrayNonZeroBasedTestsSlice = test "fewoih16" (arr3d.[5,5,3] = (0,1,0)) test "fewoih16" (arr3d.[6,5,3] = (0,1,1)) let _ = runTest() -#endif module Array3Tests = begin @@ -1409,7 +1407,7 @@ module bug872632 = module CheckUnionTypesAreSealed = open System -#if FX_PORTABLE_OR_NETSTANDARD +#if NETCOREAPP1_0 open System.Reflection type System.Type with member this.IsSealed @@ -1471,7 +1469,7 @@ module manyIndexes = 0 -#if !FX_PORTABLE_OR_NETSTANDARD +#if !NETCOREAPP1_0 module bug6447 = let a = System.Array.CreateInstance(typeof, [|1|], [|1|]) let a1 = System.Array.CreateInstance(typeof, [|1|], [|3|]) diff --git a/tests/fsharp/core/asyncStackTraces/test.fsx b/tests/fsharp/core/asyncStackTraces/test.fsx new file mode 100644 index 00000000000..56b3810bf55 --- /dev/null +++ b/tests/fsharp/core/asyncStackTraces/test.fsx @@ -0,0 +1,170 @@ + +// Tests that async stack traces contain certain method names + +// See https://github.com/Microsoft/visualfsharp/pull/4867 + +// The focus of the tests is on the synchronous parts of async execution, and on exceptions. + +let mutable failures = [] +let syncObj = new obj() +let report_failure s = + stderr.WriteLine " NO"; + lock syncObj (fun () -> + failures <- s :: failures; + printfn "FAILURE: %s failed" s + ) + +let test s b = stderr.Write(s:string); if b then stderr.WriteLine " OK" else report_failure s + +let checkQuiet s x1 x2 = + if x1 <> x2 then + (test s false; + printfn "expected: %A, got %A" x2 x1) + +let check s x1 x2 = + if x1 = x2 then test s true + else (test s false; printfn "expected: %A, got %A" x2 x1) + + +let rec async_syncLoopViaTailCallFail(n) = async { + if n > 10 then + let! res = failwith "fail" + return res + else + return! async_syncLoopViaTailCallFail(n+1) +} + +let rec async_syncLoopViaNonTailCallFail(n) = async { + if n > 10 then + let! res = failwith "fail" + return Unchecked.defaultof<_> + else + let! n2 = async_syncLoopViaNonTailCallFail(n+1) + return n2 +} + +let rec async_syncWhileLoopFail() = async { + let mutable n = 0 + while true do + if n > 10 then + let! res = failwith "fail" + return res + else + n <- n + 1 +} + +let rec async_syncTryFinallyFail() = async { + try + failwith "fail" + finally + () +} + +// Raising an exception counts as an "asynchronous action" which wipes out the stack. +// +// This is because of a limitation in the .NET exception mechanism where stack traces are only populated +// up to the point where they are caught, so we need to catch them in the trampoline handler to get a good stack. +// +// This means that re-raising that exception (e.g. in a failed pattern match for a try-with) +// or throwing an exception from the "with" handler will not get a good stack. +// There is not yet any good workaround for this. +// +//let rec async_syncTryWithFail() = async { +// try +// failwith "fail" +// with _ -> () +//} + +let rec async_syncPreAsyncSleepFail() = async { + let! x = failwith "fail" // failure is in synchronous part of code + do! Async.Sleep 10 + return Unchecked.defaultof<_> +} + +let rec async_syncFail() = async { + failwith "fail" +} + +let asyncCheckEnvironmentStackTracesBottom() = async { + let stack = System.Diagnostics.StackTrace(true).ToString() + //test "vwerv0re0reer: stack = %s", stack); + test "clncw09ew09c1" (stack.Contains("asyncCheckEnvironmentStackTracesBottom")) + test "clncw09ew09c2" (stack.Contains(string (int __LINE__ - 3))) + test "clncw09ew09d3" (stack.Contains("asyncCheckEnvironmentStackTracesMid")) + test "clncw09ew09e4" (stack.Contains("asyncCheckEnvironmentStackTracesTop")) + return 1 +} + +let asyncCheckEnvironmentStackTracesMid() = async { + let! res = asyncCheckEnvironmentStackTracesBottom() + let stack = System.Diagnostics.StackTrace(true).ToString() + test "clncw09ew09d2" (stack.Contains("asyncCheckEnvironmentStackTracesMid")) + test "clncw09ew09c" (stack.Contains(string (int __LINE__ - 2))) + test "clncw09ew09e2" (stack.Contains("asyncCheckEnvironmentStackTracesTop")) + return res +} + +let asyncCheckEnvironmentStackTracesTop() = async { + let! res = asyncCheckEnvironmentStackTracesMid() + let stack = System.Diagnostics.StackTrace(true).ToString() + test "clncw09ew09f" (stack.Contains("asyncCheckEnvironmentStackTracesTop")) + test "clncw09ew09c" (stack.Contains(string (int __LINE__ - 2))) + + do! Async.Sleep 10 + let stack = System.Diagnostics.StackTrace(true).ToString() + test "clncw09ew09f" (stack.Contains("asyncCheckEnvironmentStackTracesTop")) + test "clncw09ew09c" (stack.Contains(string (int __LINE__ - 2))) + +} + +let asyncMid(f) = async { + + let! res = f() + () +} +let asyncTop2(f) = async { + + let! res = asyncMid(f) + return () +} + +let asyncTop3(f) = async { + + do! Async.Sleep 10 + let! res = asyncMid(f) + return () +} + + + +asyncCheckEnvironmentStackTracesTop() |> Async.RunSynchronously + +let testCasesThatRaiseExceptions = + [ ("async_syncFail", async_syncFail) + ("async_syncLoopViaTailCallFail", (fun () -> async_syncLoopViaTailCallFail(0))) + ("async_syncLoopViaNonTailCallFail", (fun () -> async_syncLoopViaNonTailCallFail(0))) + ("async_syncWhileLoopFail", async_syncWhileLoopFail) + ("async_syncTryFinallyFail", async_syncTryFinallyFail) + ("async_syncPreAsyncSleepFail", async_syncPreAsyncSleepFail) ] + +for (asyncTopName, asyncTop) in [("asyncTop2", asyncTop2); ("asyncTop3", asyncTop3) ] do + for functionName, asyncFunction in testCasesThatRaiseExceptions do + try + asyncTop(asyncFunction) |> Async.RunSynchronously |> ignore + failwith "should have raised exception" + with e -> + let stack = e.StackTrace + test (sprintf "case %s: clncw09ew09m0" functionName) (not (stack.Contains("line 0"))) + test (sprintf "case %s: clncw09ew09m1" functionName) (stack.Contains(functionName)) + test (sprintf "case %s: clncw09ew09n2" functionName) (stack.Contains("asyncMid")) + test (sprintf "case %s: clncw09ew09n3" functionName) (stack.Contains(asyncTopName)) + +let aa = + if not failures.IsEmpty then + stdout.WriteLine "Test Failed" + exit 1 + else + stdout.WriteLine "Test Passed" + System.IO.File.WriteAllText("test.ok","ok") + exit 0 + diff --git a/tests/fsharp/core/attributes/test.fsx b/tests/fsharp/core/attributes/test.fsx index e31a35b9106..66d6a183934 100644 --- a/tests/fsharp/core/attributes/test.fsx +++ b/tests/fsharp/core/attributes/test.fsx @@ -7,11 +7,11 @@ module Core_attributes #endif #light -#if !TESTS_AS_APP && !FX_PORTABLE_OR_NETSTANDARD +#if !TESTS_AS_APP && !NETCOREAPP1_0 #load "testlib.fsi" "testlib.fs" // a warning is expected here #endif -#if !TESTS_AS_APP && !FX_PORTABLE_OR_NETSTANDARD +#if !TESTS_AS_APP && !NETCOREAPP1_0 #r "cslib.dll" #endif @@ -38,7 +38,7 @@ open System.Diagnostics (* ATTRIBUTES *) -#if !TESTS_AS_APP && !FX_PORTABLE_OR_NETSTANDARD +#if !TESTS_AS_APP && !NETCOREAPP1_0 [] #endif @@ -58,7 +58,7 @@ let fx3 (x:x2) = fx2 x (* attribute on a method *) let [] myLoggingMethod x = stderr.WriteLine(x:string) -#if !FX_PORTABLE_OR_NETSTANDARD +#if !NETCOREAPP1_0 let [] myLoggingMethod2 x = stderr.WriteLine(x:string) #endif @@ -228,7 +228,7 @@ let ca4 = typeof.GetCustomAttributes(typeof,false) do if Array.length ca4 <> 1 then failwith "could not find CA on type" -#if !FX_PORTABLE_OR_NETSTANDARD +#if !NETCOREAPP1_0 open System.Runtime.InteropServices [] @@ -325,7 +325,7 @@ let ca7d = ty.Assembly.GetCustomAttributes(typeof,false) do if Array.length ca7d <> 1 then report_failure (sprintf "could not get parameterized CA on assembly, num CAs = %d" (Array.length ca7d)) -#if !FX_PORTABLE_OR_NETSTANDARD +#if !NETCOREAPP1_0 #if COMPILED [<``module``: DontPressThisButton3(1, "", -2)>] do() @@ -376,7 +376,7 @@ module CheckGenericParameterAttibutesAndNames = if typeof.GetMethod("M2").GetGenericArguments().[1].Name <> "V" then report_failure "wrong name on generic parameter (C)" if typeof.GetMethod("M3").GetGenericArguments().[0].Name <> "a" then report_failure "unexpected inferred name on generic parameter (D)" -#if !TESTS_AS_APP && !FX_PORTABLE_OR_NETSTANDARD +#if !TESTS_AS_APP && !NETCOREAPP1_0 module CheckAttributesOnElementsWithSignatures = let checkOneAttribute msg (cas: _ []) = @@ -432,7 +432,7 @@ end // -#if !FX_PORTABLE_OR_NETSTANDARD +#if !NETCOREAPP1_0 #r "System.Security.dll";; #r "System.Configuration.dll";; @@ -511,7 +511,7 @@ module ThreadStaticTest = begin static val mutable private results : int list static member Results with get() = C.results and set v = C.results <- v -#if !MONO && !FX_PORTABLE_OR_NETSTANDARD +#if !MONO && !NETCOREAPP1_0 let N = 1000 let main() = let t1 = @@ -561,7 +561,7 @@ end (*------------------------------------------------------------------------- !* System.Runtime.InteropServices.In/OUT attributes *------------------------------------------------------------------------- *) -#if !FX_PORTABLE_OR_NETSTANDARD +#if !NETCOREAPP1_0 open System let g ( [] x : int byref) = 0 let g2 (( [] x : int byref), ([] y : int byref)) = 0 @@ -611,7 +611,7 @@ type C = end -#if !FX_PORTABLE_OR_NETSTANDARD +#if !NETCOREAPP1_0 let test2179 = let ty = typeof in @@ -884,7 +884,7 @@ module Bug6161_PS_FSharp1_0_MoreAttributesWithArrayArguments = begin check "ce99pj32cweqT" (ca.[0].GetType()) (typeof) check "ce99pj32cweqY" (ca.[0] :?> AnyAttribute).Value (box [| 42 |]) -#if !TESTS_AS_APP && !FX_PORTABLE_OR_NETSTANDARD +#if !TESTS_AS_APP && !NETCOREAPP1_0 let _ = let ty = typeof let ca = ty.GetCustomAttributes(typeof,false) @@ -1090,7 +1090,7 @@ module NullsInAttributes = test "TestProperty5" (null, null, null, Some null, Some null, Some null) test "TestProperty6" (box "1", "2", typeof, Some (box "3"), Some "4", Some typeof) -#if !FX_PORTABLE_OR_NETSTANDARD +#if !NETCOREAPP1_0 module Bug5762 = open System open System.IO @@ -1333,7 +1333,7 @@ module BugWithOverloadedAttributes = [] type Bar = class end -#if !TESTS_AS_APP && !FX_PORTABLE_OR_NETSTANDARD +#if !TESTS_AS_APP && !NETCOREAPP1_0 module Bug719b = open TestLibModule.Bug719 diff --git a/tests/fsharp/core/attributes/testlib.fs b/tests/fsharp/core/attributes/testlib.fs index 7b3863ac70d..f83ed790953 100644 --- a/tests/fsharp/core/attributes/testlib.fs +++ b/tests/fsharp/core/attributes/testlib.fs @@ -118,7 +118,7 @@ module TypeParamAttributesDifferent = type ThisLibAssembly = X | Y -#if !FX_PORTABLE_OR_NETSTANDARD +#if !NETCOREAPP1_0 module Bug719 = open System.Runtime.InteropServices diff --git a/tests/fsharp/core/attributes/testlib.fsi b/tests/fsharp/core/attributes/testlib.fsi index 64eca10749a..e83aa9e4f11 100644 --- a/tests/fsharp/core/attributes/testlib.fsi +++ b/tests/fsharp/core/attributes/testlib.fsi @@ -103,7 +103,7 @@ type ThisLibAssembly -#if !FX_PORTABLE_OR_NETSTANDARD +#if !NETCOREAPP1_0 module Bug719 = open System.Runtime.InteropServices diff --git a/tests/fsharp/core/byrefs/test.bsl b/tests/fsharp/core/byrefs/test.bsl new file mode 100644 index 00000000000..c24101f3a4a --- /dev/null +++ b/tests/fsharp/core/byrefs/test.bsl @@ -0,0 +1,55 @@ + +test.fsx(31,34,31,40): typecheck error FS3224: The byref pointer is readonly, so this write is not permitted. + +test.fsx(34,32,34,40): typecheck error FS0257: Invalid mutation of a constant expression. Consider copying the expression to a mutable local, e.g. 'let mutable x = ...'. + +test.fsx(38,36,38,38): typecheck error FS0001: Type mismatch. Expecting a + 'byref<'T>' +but given a + 'inref<'T>' +The type 'ByRefKinds.InOut' does not match the type 'ByRefKinds.In' + +test.fsx(42,36,42,38): typecheck error FS0001: Type mismatch. Expecting a + 'outref<'T>' +but given a + 'inref<'T>' +The type 'ByRefKinds.Out' does not match the type 'ByRefKinds.In' + +test.fsx(47,38,47,40): typecheck error FS0001: Type mismatch. Expecting a + 'byref<'T>' +but given a + 'inref<'T>' +The type 'ByRefKinds.InOut' does not match the type 'ByRefKinds.In' + +test.fsx(52,38,52,40): typecheck error FS0001: Type mismatch. Expecting a + 'outref<'T>' +but given a + 'inref<'T>' +The type 'ByRefKinds.Out' does not match the type 'ByRefKinds.In' + +test.fsx(57,38,57,40): typecheck error FS0001: Type mismatch. Expecting a + 'byref<'T>' +but given a + 'inref<'T>' +The type 'ByRefKinds.InOut' does not match the type 'ByRefKinds.In' + +test.fsx(62,38,62,40): typecheck error FS0001: Type mismatch. Expecting a + 'outref<'T>' +but given a + 'inref<'T>' +The type 'ByRefKinds.Out' does not match the type 'ByRefKinds.In' + +test.fsx(66,34,66,47): typecheck error FS1204: This construct is for use in the FSharp.Core library and should not be used directly + +test.fsx(66,34,66,47): typecheck error FS1204: This construct is for use in the FSharp.Core library and should not be used directly + +test.fsx(71,21,71,23): typecheck error FS3237: Cannot take the address of the value returned from the expression. Assign the returned value to a let-bound value before taking the address. + +test.fsx(72,21,72,23): typecheck error FS3237: Cannot take the address of the value returned from the expression. Assign the returned value to a let-bound value before taking the address. + +test.fsx(78,21,78,37): typecheck error FS3237: Cannot take the address of the value returned from the expression. Assign the returned value to a let-bound value before taking the address. + +test.fsx(85,22,85,23): typecheck error FS0001: This expression was expected to have type + 'inref' +but here has type + 'System.DateTime' diff --git a/tests/fsharp/core/byrefs/test.fsx b/tests/fsharp/core/byrefs/test.fsx index 6c4f3d960b9..e2a85f718f4 100644 --- a/tests/fsharp/core/byrefs/test.fsx +++ b/tests/fsharp/core/byrefs/test.fsx @@ -1,9 +1,9 @@ // #Conformance #Constants #Recursion #LetBindings #MemberDefinitions #Mutable #if TESTS_AS_APP -module Core_apporder +module Core_byrefs #endif -#light + let failures = ref false let report_failure (s) = stderr.WriteLine ("NO: " + s); failures := true @@ -17,7 +17,386 @@ let check s actual expected = if actual = expected then printfn "%s: OK" s else report_failure (sprintf "%s: FAILED, expected %A, got %A" s expected actual) -let check2 s expected actual = check s actual expected +let check2 s expected actual = check s actual expected + +[] +type S = + [] + val mutable X : int + +#if NEGATIVE +module ByrefNegativeTests = + + module WriteToInRef = + let f1 (x: inref) = x <- 1 // not allowed + + module WriteToInRefStructInner = + let f1 (x: inref) = x.X <- 1 //not allowed + + module InRefToByRef = + let f1 (x: byref<'T>) = 1 + let f2 (x: inref<'T>) = f1 &x // not allowed + + module InRefToOutRef = + let f1 (x: outref<'T>) = 1 + let f2 (x: inref<'T>) = f1 &x // not allowed + + module InRefToByRefClassMethod = + type C() = + static member f1 (x: byref<'T>) = 1 + let f2 (x: inref<'T>) = C.f1 &x // not allowed + + module InRefToOutRefClassMethod = + type C() = + static member f1 (x: outref<'T>) = 1 // not allowed (not yet) + let f2 (x: inref<'T>) = C.f1 &x // not allowed + + module InRefToByRefClassMethod2 = + type C() = + static member f1 (x: byref<'T>) = 1 + let f2 (x: inref<'T>) = C.f1(&x) // not allowed + + module InRefToOutRefClassMethod2 = + type C() = + static member f1 (x: outref<'T>) = 1 // not allowed (not yet) + let f2 (x: inref<'T>) = C.f1(&x) // not allowed + + module UseOfLibraryOnly = + type C() = + static member f1 (x: byref<'T, 'U>) = 1 + + module CantTakeAddress = + + let test1 () = + let x = &1 // not allowed + let y = &2 // not allowed + x + y + + let test2_helper (x: byref) = x + let test2 () = + let mutable x = 1 + let y = &test2_helper &x // not allowed + () + + module InRefParam_DateTime = + type C() = + static member M(x: inref) = x + let w = System.DateTime.Now + let v = C.M(w) // not allowed + check "cweweoiwe51btw" v w + +#endif + +// Test a simple ref argument +module CompareExchangeTests = + let mutable x = 3 + let v = System.Threading.Interlocked.CompareExchange(&x, 4, 3) + check "cweweoiwekla" v 3 + let v2 = System.Threading.Interlocked.CompareExchange(&x, 5, 3) + check "cweweoiweklb" v2 4 + +// Test a simple out argument +module TryGetValueTests = + let d = dict [ (3,4) ] + let mutable res = 9 + let v = d.TryGetValue(3, &res) + check "cweweoiwekl1" v true + check "cweweoiwekl2" res 4 + let v2 = d.TryGetValue(5, &res) + check "cweweoiwekl3" v2 false + check "cweweoiwekl4" res 4 + + +module ByRefParam = + type C() = + static member M(x: byref) = x <- 5 + let mutable res = 9 + let v = C.M(&res) + check "cwvereweoiwekl4" res 5 + + let minfo = typeof.GetMethod("M") + check "cwnoreeker1" (minfo.GetParameters().[0].IsIn) false + check "cwnoreeker2" (minfo.GetParameters().[0].IsOut) false + check "cwnoreeker3" (minfo.ReturnParameter.IsIn) false + check "cwnoreeker4" (minfo.ReturnParameter.IsOut) false + +module ByRefParam_ExplicitOutAttribute = + type C() = + static member M([] x: byref) = x <- 5 + let mutable res = 9 + let v = C.M(&res) + check "cwvereweoiwekl4" res 5 + + let minfo = typeof.GetMethod("M") + check "cwnoreeker5" (minfo.GetParameters().[0].IsIn) false + check "cwnoreeker6a" (minfo.GetParameters().[0].IsOut) true + check "cwnoreeker6b" (minfo.GetParameters().[0].GetRequiredCustomModifiers().Length) 0 + check "cwnoreekers1" (minfo.ReturnParameter.GetRequiredCustomModifiers().Length) 0 + check "cwnoreeker7" (minfo.ReturnParameter.IsIn) false + check "cwnoreeker8" (minfo.ReturnParameter.IsOut) false + +module ByRefParam_ExplicitInAttribute = + type C() = + static member M([] x: byref) = x <- 5 + let mutable res = 9 + let v = C.M(&res) + check "cwvereweoiwekl4" res 5 + + let minfo = typeof.GetMethod("M") + check "cwnoreeker9" (minfo.GetParameters().[0].IsIn) true + check "cwnoreekerq" (minfo.GetParameters().[0].IsOut) false + check "cwnoreeker6c" (minfo.GetParameters().[0].GetRequiredCustomModifiers().Length) 0 + check "cwnoreekers2" (minfo.ReturnParameter.GetRequiredCustomModifiers().Length) 0 + check "cwnoreekerw" (minfo.ReturnParameter.IsIn) false + check "cwnoreekere" (minfo.ReturnParameter.IsOut) false + +module ByRefReturn = + type C() = + static member M(x: byref) = x <- x + 1; &x + let mutable res = 9 + let v = C.M(&res) + check "cwvereweoiwvw4" v 10 + + let minfo = typeof.GetMethod("M") + check "cwnoreeker6d" (minfo.GetParameters().[0].GetRequiredCustomModifiers().Length) 0 + check "cwnoreekerr" (minfo.ReturnParameter.IsIn) false + check "cwnoreekert" (minfo.ReturnParameter.IsOut) false + + +module Slot_ByRefReturn = + type I = + abstract M : x: byref -> byref + type C() = + interface I with + member __.M(x: byref) = x <- 5; &x + let mutable res = 9 + let v = (C() :> I).M(&res) + check "cweweoiwek28989" res 5 + check "cweweoiwek28989" v 5 + + let minfo = typeof.GetMethod("M") + check "cwnoreeker6e" (minfo.GetParameters().[0].GetRequiredCustomModifiers().Length) 0 + check "cwnoreekery" (minfo.GetParameters().[0].IsIn) false + check "cwnoreekeru" (minfo.GetParameters().[0].IsOut) false + check "cwnoreekeri" (minfo.ReturnParameter.IsIn) false + check "cwnoreekers" (minfo.ReturnParameter.GetRequiredCustomModifiers().Length) 0 + check "cwnoreekero" (minfo.ReturnParameter.IsOut) false + +module InRefReturn = + type C() = + static member M(x: inref) = &x + let mutable res = 9 + let v = C.M(&res) + check "cwvereweoiwvw4" v 9 + + let minfo = typeof.GetMethod("M") + check "cwnoreekerp" (minfo.GetParameters().[0].IsIn) true + check "cwnoreekera" (minfo.GetParameters().[0].IsOut) false + check "cwnoreeker6f" (minfo.GetParameters().[0].GetRequiredCustomModifiers().Length) 0 // modreq only placed on abstract/virtual + check "cwnoreekers3" (minfo.ReturnParameter.IsIn) false // has modreq 'In' but reflection never returns true for ReturnParameter.IsIn + check "cwnoreekers4" (minfo.ReturnParameter.GetRequiredCustomModifiers().Length) 1 + check "cwnoreekerd" (minfo.ReturnParameter.IsOut) false + +module Slot_InRefReturn = + type I = + abstract M : x: inref -> inref + type C() = + interface I with + member __.M(x: inref) = &x + let mutable res = 9 + let v = (C() :> I).M(&res) + check "cweweoiwek28989" res 9 + check "cweweoiwek28989" v 9 + + let minfo = typeof.GetMethod("M") + check "cwnoreekerp" (minfo.GetParameters().[0].IsIn) true + check "cwnoreekera" (minfo.GetParameters().[0].IsOut) false + check "cwnoreeker6g" (minfo.GetParameters().[0].GetRequiredCustomModifiers().Length) 1 + check "cwnoreekers5" (minfo.ReturnParameter.IsIn) false // has modreq 'In' but reflection never returns true for ReturnParameter.IsIn + check "cwnoreekers6" (minfo.ReturnParameter.GetRequiredCustomModifiers().Length) 1 + check "cwnoreekerd" (minfo.ReturnParameter.IsOut) false + + +module OutRefParam_ExplicitOutAttribute = + type C() = + static member M([] x: outref) = x <- 5 + let mutable res = 9 + C.M(&res) + check "cweweoiweklceew4" res 5 + +module OutRefParam = + type C() = + static member M(x: outref) = x <- 5 + let mutable res = 9 + C.M(&res) + check "cweweoiwek28989" res 5 + +module Slot_OutRefParam = + type I = + abstract M : x: outref -> unit + type C() = + interface I with + member __.M(x: outref) = x <- 5 + let mutable res = 9 + (C() :> I).M(&res) + check "cweweoiwek28989" res 5 + +module ByRefParam_OverloadedTest_ExplicitOutAttribute = + type C() = + static member M(a: int, [] x: byref) = x <- 7 + static member M(a: string, [] x: byref) = x <- 8 + let mutable res = 9 + C.M("a", &res) + check "cweweoiwek2cbe9" res 8 + C.M(3, &res) + check "cweweoiwek28498" res 7 + +module OutRefParam_Overloaded_ExplicitOutAttribute = + type C() = + static member M(a: int, [] x: outref) = x <- 7 + static member M(a: string, [] x: outref) = x <- 8 + let mutable res = 9 + C.M("a", &res) + check "cweweoiwek2v90" res 8 + C.M(3, &res) + check "cweweoiwek2c98" res 7 + +module OutRefParam_Overloaded = + type C() = + static member M(a: int, x: outref) = x <- 7 + static member M(a: string, x: outref) = x <- 8 + let mutable res = 9 + C.M("a", &res) + check "cweweoiwek2v99323" res 8 + C.M(3, &res) + check "cweweoiwe519" res 7 + +module InRefParam_ExplicitInAttribute = + type C() = + static member M([] x: inref) = () + let mutable res = 9 + C.M(&res) + check "cweweoiwe519btr" res 9 + +module InRefParam_ExplicitInAttributeDateTime = + type C() = + static member M([] x: inref) = x + let Test() = + let res = System.DateTime.Now + let v = C.M(&res) + check "cweweoiwe519cw" v res + Test() + +module InRefParam = + type C() = + static member M(x: inref) = x + let Test() = + let res = System.DateTime.Now + let v = C.M(&res) + check "cweweoiwe51btw" v res + + let minfo = typeof.GetMethod("M") + check "cwnoreekerf" (minfo.GetParameters().[0].IsIn) true + check "cwnoreekerg" (minfo.GetParameters().[0].IsOut) false + Test() + +module InRefParamOverload_ExplicitAddressOfAtCallSite = + type C() = + static member M(x: System.DateTime) = x.AddDays(1.0) + static member M(x: inref) = x.AddDays(2.0) + static member M2(x: System.DateTime, y: int) = x.AddDays(1.0) + static member M2(x: inref, y: int) = x.AddDays(2.0) + + let Test() = + let res = System.DateTime.Now + let v = C.M(&res) + check "cweweoiwe51btw8" v (res.AddDays(2.0)) + let v2 = C.M2(&res, 0) + check "cweweoiwe51btw6" v2 (res.AddDays(2.0)) + + Test() + +module InRefParamOverload_ImplicitAddressOfAtCallSite = + type C() = + static member M(x: System.DateTime) = x.AddDays(1.0) + static member M(x: inref) = x.AddDays(2.0) + static member M2(x: System.DateTime, y: int) = x.AddDays(1.0) + static member M2(x: inref, y: int) = x.AddDays(2.0) + let res = System.DateTime.Now + let v = C.M(res) + check "cweweoiwe51btw1" v (res.AddDays(1.0)) + let v2 = C.M2(res, 4) + check "cweweoiwe51btw2" v2 (res.AddDays(1.0)) + + +module InRefParamOverload_ImplicitAddressOfAtCallSite2 = + type C() = + static member M(x: System.DateTime) = x.AddDays(1.0) + static member M(x: inref) = x.AddDays(2.0) + static member M2(x: System.DateTime, y: int) = x.AddDays(1.0) + static member M2(x: inref, y: int) = x.AddDays(2.0) + let Test() = + let res = System.DateTime.Now + let v = C.M(res) + check "cweweoiwe51btw1" v (res.AddDays(1.0)) + let v2 = C.M2(res, 4) + check "cweweoiwe51btw2" v2 (res.AddDays(1.0)) + Test() + +#if IMPLICIT_ADDRESS_OF +module InRefParam_DateTime = + type C() = + static member M(x: inref) = x + let w = System.DateTime.Now + let v = C.M(w) + check "cweweoiwe51btw" v w + +module InRefParam_DateTime_ImplicitAddressOfAtCallSite = + type C() = + static member M(x: inref) = x + let v = C.M(System.DateTime.Now) + check "cweweoiwe51btw" v.Date System.DateTime.Now.Date + +module InRefParam_DateTime_ImplicitAddressOfAtCallSite2 = + type C() = + static member M(x: inref) = x + let v = C.M(System.DateTime.Now.AddDays(1.0)) + check "cweweoiwe51btw" v.Date (System.DateTime.Now.AddDays(1.0).Date) + +module InRefParam_DateTime_ImplicitAddressOfAtCallSite3 = + type C() = + static member M(x: inref) = x + let mutable w = System.DateTime.Now + let v = C.M(w) + check "cweweoiwe51btw" v w + +module InRefParam_DateTime_ImplicitAddressOfAtCallSite4 = + type C() = + static member M(x: inref) = x + let date = System.DateTime.Now.Date + let w = [| date |] + let v = C.M(w.[0]) + check "lmvjvwo1" v date +#endif + +module InRefParam_Generic_ExplicitAddressOfAttCallSite1 = + type C() = + static member M(x: inref<'T>) = x + let Test() = + let res = "abc" + let v = C.M(&res) + check "lmvjvwo2" res "abc" + check "lmvjvwo3" v "abc" + Test() + +module InRefParam_Generic_ExplicitAddressOfAttCallSite2 = + type C() = + static member M(x: inref<'T>) = x + let Test() = + let res = "abc" + let v = C.M(&res) + check "lmvjvwo4" v "abc" + Test() module ByrefReturnTests = @@ -27,11 +406,18 @@ module ByrefReturnTests = let f () = &x let test() = - let addr = f () + let addr : byref = &f() addr <- addr + 1 check2 "cepojcwem1" 2 x + + let test2() = + let v = f() + let res = v + 1 + check2 "cepojcwem1b" 3 res + test() + test2() module TestMatchReturn = let mutable x = 1 @@ -40,16 +426,23 @@ module ByrefReturnTests = let f inp = match inp with 3 -> &x | _ -> &y let test() = - let addr = f 3 + let addr = &f 3 addr <- addr + 1 check2 "cepojcwem2" 2 x check2 "cepojcwem3" 1 y - let addr = f 4 + let addr = &f 4 addr <- addr + 1 check2 "cepojcwem4" 2 x check2 "cepojcwem5" 2 y + let test2() = + let res = f 3 + let res2 = res + 1 + check2 "cepojcwem2b" 3 res2 + check2 "cepojcwem3b" 2 res + test() + test2() module TestConditionalReturn = let mutable x = 1 @@ -58,16 +451,23 @@ module ByrefReturnTests = let f inp = if inp = 3 then &x else &y let test() = - let addr = f 3 + let addr = &f 3 addr <- addr + 1 check2 "cepojcwem6" 2 x check2 "cepojcwem7" 1 y - let addr = f 4 + let addr = &f 4 addr <- addr + 1 check2 "cepojcwem8" 2 x check2 "cepojcwem9" 2 y + let test2() = + let res = f 3 + let res2 = res + 1 + check2 "cepojcwem8b" 3 res2 + check2 "cepojcwem9b" 2 res + test() + test2() module TestTryCatchReturn = let mutable x = 1 @@ -76,16 +476,23 @@ module ByrefReturnTests = let f inp = try &x with _ -> &y let test() = - let addr = f 3 + let addr = &f 3 addr <- addr + 1 check2 "cepojcwem6b" 2 x check2 "cepojcwem7b" 1 y - let addr = f 4 + let addr = &f 4 addr <- addr + 1 check2 "cepojcwem8b" 3 x check2 "cepojcwem9b" 1 y + let test2() = + let res = f 3 + let res2 = res + 1 + check2 "cepojcwem2ff" 4 res2 + check2 "cepojcwem3gg" 3 res + test() + test2() module TestTryFinallyReturn = let mutable x = 1 @@ -94,16 +501,23 @@ module ByrefReturnTests = let f inp = try &x with _ -> &y let test() = - let addr = f 3 + let addr = &f 3 addr <- addr + 1 check2 "cepojcwem6b" 2 x check2 "cepojcwem7b" 1 y - let addr = f 4 + let addr = &f 4 addr <- addr + 1 check2 "cepojcwem8b" 3 x check2 "cepojcwem9b" 1 y + let test2() = + let res = f 3 + let res2 = res + 1 + check2 "cepojcwem2tf" 4 res2 + check2 "cepojcwem3qw" 3 res + test() + test2() module TestOneArgument = @@ -111,7 +525,7 @@ module ByrefReturnTests = let test() = let mutable r1 = 1 - let addr = f &r1 + let addr = &f &r1 addr <- addr + 1 check2 "cepojcwem10" 2 r1 @@ -124,7 +538,7 @@ module ByrefReturnTests = let test() = let mutable r1 = 1 let mutable r2 = 0 - let addr = f (&r1, &r2) + let addr = &f (&r1, &r2) addr <- addr + 1 check2 "cepojcwem11" 2 r1 @@ -137,7 +551,7 @@ module ByrefReturnTests = let test() = let r = { z = 1 } - let addr = f r + let addr = &f r addr <- addr + 1 check2 "cepojcwem12" 2 r.z @@ -150,7 +564,7 @@ module ByrefReturnTests = let test() = let mutable r = { z = 1 } - let addr = f &r + let addr = &f &r addr <- addr + 1 check2 "cepojcwem13a" 2 r.z @@ -164,7 +578,7 @@ module ByrefReturnTests = let test() = let c = C() - let addr = f c + let addr = &f c addr <- addr + 1 check2 "cepojcwem13b" 1 c.z @@ -176,7 +590,7 @@ module ByrefReturnTests = let test() = let r = [| 1 |] - let addr = f r + let addr = &f r addr <- addr + 1 check2 "cepojcwem14" 2 r.[0] @@ -191,7 +605,7 @@ module ByrefReturnTests = let test() = let mutable r = { z = 1 } - let addr = f &r + let addr = &f &r addr <- addr + 1 check2 "cepojcwem15" 2 r.z @@ -211,12 +625,12 @@ module ByrefReturnTests = { new I with member this.M() = &x } - let f (i:I) = i.M() + let f (i:I) = &i.M() let test() = - let addr = f (C()) + let addr = &f (C()) addr <- addr + 1 - let addr = f (ObjExpr()) + let addr = &f (ObjExpr()) addr <- addr + 1 check2 "cepojcwem16" 3 x @@ -236,12 +650,12 @@ module ByrefReturnTests = { new I with member this.P = &x } - let f (i:I) = i.P + let f (i:I) = &i.P let test() = - let addr = f (C()) + let addr = &f (C()) addr <- addr + 1 - let addr = f (ObjExpr()) + let addr = &f (ObjExpr()) addr <- addr + 1 check2 "cepojcwem17" 3 x @@ -254,10 +668,10 @@ module ByrefReturnTests = let d() = D(fun () -> &x) - let f (d:D) = d.Invoke() + let f (d:D) = &d.Invoke() let test() = - let addr = f (d()) + let addr = &f (d()) check2 "cepojcwem18a" 1 x addr <- addr + 1 check2 "cepojcwem18b" 2 x @@ -284,17 +698,768 @@ module ByrefReturnTests = let d() = D(fun xb -> &xb) - let f (d:D) = d.Invoke(&x) + let f (d:D) = &d.Invoke(&x) let test() = - let addr = f (d()) + let addr = &f (d()) check2 "cepojcwem18a2" 1 x addr <- addr + 1 check2 "cepojcwem18b3" 2 x test() +module ByrefReturnMemberTests = + + module TestImmediateReturn = + let mutable x = 1 + + type C() = + static member M () = &x + + let test() = + let addr : byref = &C.M() + addr <- addr + 1 + check2 "mepojcwem1" 2 x + + + let test2() = + let v = &C.M() + let res = v + 1 + check2 "mepojcwem1b" 3 res + + test() + test2() + + module TestMatchReturn = + let mutable x = 1 + let mutable y = 1 + + type C() = + static member M inp = match inp with 3 -> &x | _ -> &y + + let test() = + let addr = &C.M 3 + addr <- addr + 1 + check2 "mepojcwem2" 2 x + check2 "mepojcwem3" 1 y + let addr = &C.M 4 + addr <- addr + 1 + check2 "mepojcwem4" 2 x + check2 "mepojcwem5" 2 y + + let test2() = + let res = &C.M 3 + let res2 = res + 1 + check2 "mepojcwem2b" 3 res2 + check2 "mepojcwem3b" 2 res + + test() + test2() + + module TestConditionalReturn = + let mutable x = 1 + let mutable y = 1 + + type C() = + static member M inp = if inp = 3 then &x else &y + + let test() = + let addr = &C.M 3 + addr <- addr + 1 + check2 "mepojcwem6" 2 x + check2 "mepojcwem7" 1 y + let addr = &C.M 4 + addr <- addr + 1 + check2 "mepojcwem8" 2 x + check2 "mepojcwem9" 2 y + + let test2() = + let res = &C.M 3 + let res2 = res + 1 + check2 "mepojcwem8b" 3 res2 + check2 "mepojcwem9b" 2 res + + test() + test2() + + module TestTryCatchReturn = + let mutable x = 1 + let mutable y = 1 + + type C() = + static member M inp = try &x with _ -> &y + + let test() = + let addr = &C.M 3 + addr <- addr + 1 + check2 "mepojcwem6b" 2 x + check2 "mepojcwem7b" 1 y + let addr = &C.M 4 + addr <- addr + 1 + check2 "mepojcwem8b" 3 x + check2 "mepojcwem9b" 1 y + + let test2() = + let res = &C.M 3 + let res2 = res + 1 + check2 "mepojcwem2ff" 4 res2 + check2 "mepojcwem3gg" 3 res + + test() + test2() + + module TestTryFinallyReturn = + let mutable x = 1 + let mutable y = 1 + + type C() = + static member M inp = try &x with _ -> &y + + let test() = + let addr = &C.M 3 + addr <- addr + 1 + check2 "mepojcwem6b" 2 x + check2 "mepojcwem7b" 1 y + let addr = &C.M 4 + addr <- addr + 1 + check2 "mepojcwem8b" 3 x + check2 "mepojcwem9b" 1 y + + let test2() = + let res = &C.M 3 + let res2 = res + 1 + check2 "mepojcwem2tf" 4 res2 + check2 "mepojcwem3qw" 3 res + + test() + test2() + + module TestOneArgument = + + type C() = + static member M (x:byref) = &x + + let test() = + let mutable r1 = 1 + let addr = &C.M (&r1) + addr <- addr + 1 + check2 "mepojcwem10" 2 r1 + + test() + + module TestOneArgumentInRefReturned = + + type C() = + static member M (x:inref) = &x + + let test() = + let mutable r1 = 1 + let addr = &C.M (&r1) + let x = addr + 1 + check2 "mepojcwem10" 1 r1 + check2 "mepojcwem10vr" 2 x + + test() + + module TestOneArgumentOutRef = + + type C() = + static member M (x:outref) = &x + + let test() = + let mutable r1 = 1 + let addr = &C.M (&r1) + addr <- addr + 1 + check2 "mepojcwem10" 2 r1 + + test() + + module TestTwoArguments = + + type C() = + static member M (x:byref, y:byref) = &x + + let test() = + let mutable r1 = 1 + let mutable r2 = 0 + let addr = &C.M (&r1, &r2) + addr <- addr + 1 + check2 "mepojcwem11" 2 r1 + + test() + + module TestRecordParam = + + type R = { mutable z : int } + type C() = + static member M (x:R) = &x.z + + let test() = + let r = { z = 1 } + let addr = &C.M r + addr <- addr + 1 + check2 "mepojcwem12" 2 r.z + + test() + + module TestRecordParam2 = + + type R = { mutable z : int } + type C() = + static member M (x:byref) = &x.z + + let test() = + let mutable r = { z = 1 } + let addr = &C.M(&r) + addr <- addr + 1 + check2 "mepojcwem13a" 2 r.z + + test() + + module TestClassParamMutableField = + + type C() = [] val mutable z : int + + type C2() = + static member M (x:C) = &x.z + + let test() = + let c = C() + let addr = &C2.M c + addr <- addr + 1 + check2 "mepojcwem13b" 1 c.z + + test() + + module TestArrayParam = + + type C() = + static member M (x:int[]) = &x.[0] + + let test() = + let r = [| 1 |] + let addr = &C.M r + addr <- addr + 1 + check2 "mepojcwem14" 2 r.[0] + + test() + + module TestStructParam = + + [] + type R = { mutable z : int } + + type C() = + static member M (x:byref) = &x.z + + let test() = + let mutable r = { z = 1 } + let addr = &C.M(&r) + addr <- addr + 1 + check2 "mepojcwem15" 2 r.z + + test() + + module TestInterfaceMethod = + let mutable x = 1 + + type I = + abstract M : unit -> byref + + type C() = + interface I with + member this.M() = &x + + let ObjExpr() = + { new I with + member this.M() = &x } + + let test() = + let addr = &(C() :> I).M() + addr <- addr + 1 + let addr = &(ObjExpr()).M() + addr <- addr + 1 + check2 "mepojcwem16" 3 x + + test() + + module TestInterfaceProperty = + let mutable x = 1 + + type I = + abstract P : byref + + type C() = + interface I with + member this.P = &x + + let ObjExpr() = + { new I with + member this.P = &x } + + let test() = + let addr = &(C() :> I).P + addr <- addr + 1 + let addr = &(ObjExpr()).P + addr <- addr + 1 + check2 "mepojcwem17" 3 x + + test() + + module TestDelegateMethod = + let mutable x = 1 + + type D = delegate of unit -> byref + + let test() = + let d = D(fun () -> &x) + let addr = &d.Invoke() + check2 "mepojcwem18a" 1 x + addr <- addr + 1 + check2 "mepojcwem18b" 2 x + + test() + + module TestBaseCall = + type Incrementor(z) = + abstract member Increment : int byref * int byref -> unit + default this.Increment(i : int byref,j : int byref) = + i <- i + z + + type Decrementor(z) = + inherit Incrementor(z) + override this.Increment(i, j) = + base.Increment(&i, &j) + + i <- i - z + + module TestDelegateMethod2 = + let mutable x = 1 + + type D = delegate of byref -> byref + + let d = D(fun xb -> &xb) + + let test() = + let addr = &d.Invoke(&x) + check2 "mepojcwem18a2" 1 x + addr <- addr + 1 + check2 "mepojcwem18b3" 2 x + + test() + + + module ByRefExtensionMethods1 = + + open System + open System.Runtime.CompilerServices + + [] + type Ext = + + [] + static member ExtDateTime2(dt: inref, x:int) = dt.AddDays(double x) + + module UseExt = + let now = DateTime.Now + let dt2 = now.ExtDateTime2(3) + check "£f3mllkm2" dt2 (now.AddDays(3.0)) + + +(* + module ByRefExtensionMethodsOverloading = + + open System + open System.Runtime.CompilerServices + + [] + type Ext = + [] + static member ExtDateTime(dt: DateTime, x:int) = dt.AddDays(double x) + + [] + static member ExtDateTime(dt: inref, x:int) = dt.AddDays(2.0 * double x) + + module UseExt = + let dt = DateTime.Now.ExtDateTime(3) + let dt2 = DateTime.Now.ExtDateTime(3) +*) + module TestReadOnlyAddressOfStaticField = + type C() = + static let x = 1 + static member F() = &x + + let test() = + let addr = &C.F() + check2 "mepojcwem18a2dw" 1 addr + + test() + + module TestAssignToReturnByref = + type C() = + static let mutable v = System.DateTime.Now + static member M() = &v + static member P = &v + member __.InstanceM() = &v + member __.InstanceP with get() = &v + static member Value = v + + let F1() = + let today = System.DateTime.Now.Date + C.M() <- today + check "cwecjc" C.Value today + C.P <- C.M().AddDays(1.0) + check "cwecjc1" C.Value (today.AddDays(1.0)) + let c = C() + c.InstanceM() <- today.AddDays(2.0) + check "cwecjc2" C.Value (today.AddDays(2.0)) + c.InstanceP <- today.AddDays(3.0) + check "cwecjc1" C.Value (today.AddDays(3.0)) + + F1() + + module TestAssignToReturnByref2 = + let mutable v = System.DateTime.Now + let M() = &v + + let F1() = + let today = System.DateTime.Now.Date + M() <- today + check "cwecjc" v today + + F1() + + module BaseCallByref = + + type Incrementor(z) = + abstract member Increment : int byref * int byref -> unit + default this.Increment(i : int byref,j : int byref) = + i <- i + z + + type Decrementor(z) = + inherit Incrementor(z) + override this.Increment(i, j) = + base.Increment(&i, &j) + + i <- i - z + + + module Bug820 = + + let inline f (x, r:byref<_>) = r <- x + let mutable x = Unchecked.defaultof<_> + f (0, &x) + + module Bug820b = + + type Bug820x() = + let f (x, r:byref<_>) = r <- x + let mutable x = Unchecked.defaultof<_> + member __.P = f (0, &x) + + // check recursive functions + module BeefModuleGeneric = + + let rec beef (unused: 'T) id (data: byref) : unit = + if id = 10 then + data <- 3uy + else + beef unused (id + 1) &data + let Test() = + let mutable x = 0uy + beef "unused" 0 &x + check "vruoer" x 3uy + Test() + + module BeefModuleNonGeneric = + + let rec beef id (data: byref) : unit = + if id = 10 then + data <- 3uy + else + beef (id + 1) &data + + let Test() = + let mutable x = 0uy + beef 0 &x + check "vruoer3r" x 3uy + Test() + + module BeefModuleNonGenericSubsume = + + let rec beef id (data: byref) (y: System.IComparable) : unit = + if id = 10 then + data <- 3uy + else + beef (id + 1) &data y + + let Test() = + let mutable x = 0uy + beef 0 &x Unchecked.defaultof + check "vruoer3r" x 3uy + + Test() + + type GenericBeefRecursive() = + + let rec beef unused id (data: byref) : unit = + if id = 10 then data <- 3uy else beef unused (id + 1) &data + + static do GenericBeefRecursive().Test() + + member __.Test() = + let mutable x = 0uy + beef "unused" 0 &x + check "vruoer3rv" x 3uy + let mutable z = 0uy + beef 6L 0 &z + check "vruoer3rvwqf" z 3uy + + type NonGenericBeefRecursiveInClass() = + + let rec beef id (data: byref) : unit = + if id = 10 then + data <- 3uy + else + beef (id + 1) &data + + static do NonGenericBeefRecursiveInClass().Test() + + member __.Test() = + let mutable x = 0uy + beef 0 &x + check "vruoer3rvvremtys" x 3uy + + + type NonGenericBeefRecursiveInClassSubsume() = + + let rec beef id (data: byref) (y:System.IComparable) : unit = + if id = 10 then + data <- 3uy + else + beef (id + 1) &data y + + static do NonGenericBeefRecursiveInClassSubsume().Test() + + member __.Test() = + let mutable x = 0uy + beef 0 &x Unchecked.defaultof + check "vruoer3rvvremtys" x 3uy + + type StaticGenericBeefRecursiveInClass() = + + static let rec beef unused id (data: byref) : unit = + if id = 10 then data <- 3uy else beef unused (id + 1) &data + + static do StaticGenericBeefRecursiveInClass.Test() + + static member Test() = + let mutable x = 0uy + beef "unused" 0 &x + check "vruoer3rv" x 3uy + let mutable z = 0uy + beef 6L 0 &z + check "vruoer3rvwqfgw" z 3uy + + type StaticNonGenericBeefRecursiveInClass() = + + static let rec beef id (data: byref) : unit = + if id = 10 then data <- 3uy else beef (id + 1) &data + + static do StaticNonGenericBeefRecursiveInClass.Test() + + static member Test() = + let mutable x = 0uy + beef 0 &x + check "vruoer3rvvrebae" x 3uy + + module TestInRefMutation = + [] + type TestMut = + + val mutable x : int + + member this.AnAction() = + this.x <- 1 + + let testAction (m: inref) = + m.AnAction() + check "vleoij" m.x 0 + + let test() = + let x = TestMut() + //testIn (&x) + testAction (&x) + x + test() + + module MutateInRef3 = + [] + type TestMut(x: int ref) = + + member this.X = x.contents + member this.XAddr = &x.contents + + let testIn (m: inref) = + // If the struct API indirectly reveals a byref return of a field in a reference type then + // there is nothing stopping it being written to. + m.XAddr <- 1 + + let test() = + let m = TestMut(ref 0) + testIn (&m) + check "vleoij" m.X 1 + + test() + + module MatrixOfTests = + + module ReturnAddressOfByRef = + let f1 (x: byref) = &x + + module ReturnAddressOfInRef = + let f1 (x: inref) = &x + + module ReturnAddressOfOutRef = + let f1 (x: outref) = &x + + //----- + + module ReadByRef = + let f1 (x: byref) = x + + module ReadInRef = + let f1 (x: inref) = x + + module ReadOutRef = + let f1 (x: outref) = x + + //----- + + module ReadByRefStructInner = + let f1 (x: byref) = x.X + + module ReadInRefStructInner = + let f1 (x: inref) = x.X + + module ReadOutRefStructInner = + let f1 (x: outref) = x.X + + //----- + module WriteToByRef = + let f1 (x: byref) = x <- 1 + + module WriteToOutRef = + let f1 (x: outref) = x <- 1 + + //----- + module WriteToByRefStructInner = + let f1 (x: byref) = x.X <- 1 + + module WriteToOutRefStructInner = + let f1 (x: outref) = x.X <- 1 + + //----- + module OutRefToByRef = + let f1 (x: byref<'T>) = 1 + let f2 (x: outref<'T>) = f1 &x + + module ByRefToByRef = + let f1 (x: byref<'T>) = 1 + let f2 (x: byref<'T>) = f1 &x + + module ByRefToOutRef = + let f1 (x: outref<'T>) = 1 + let f2 (x: byref<'T>) = f1 &x + + module OutRefToOutRef = + let f1 (x: outref<'T>) = 1 + let f2 (x: outref<'T>) = f1 &x + + module ByRefToInRef = + let f1 (x: inref<'T>) = 1 + let f2 (x: byref<'T>) = f1 &x + + module InRefToInRef = + let f1 (x: inref<'T>) = 1 + let f2 (x: inref<'T>) = f1 &x + + module OutRefToInRef = + let f1 (x: inref<'T>) = 1 + let f2 (x: outref<'T>) = f1 &x // allowed, because &outref are treated as byref, see RFC + + //--------------- + module OutRefToByRefClassMethod = + type C() = + static member f1 (x: byref<'T>) = 1 + let f2 (x: outref<'T>) = C.f1 &x + + module ByRefToByRefClassMethod = + type C() = + static member f1 (x: byref<'T>) = 1 + let f2 (x: byref<'T>) = C.f1 &x + + module ByRefToOutRefClassMethod = + type C() = + static member f1 (x: outref<'T>) = 1 + let f2 (x: byref<'T>) = C.f1 &x + + module OutRefToOutRefClassMethod = + type C() = + static member f1 (x: outref<'T>) = 1 + let f2 (x: outref<'T>) = C.f1 &x + + module ByRefToInRefClassMethod = + type C() = + static member f1 (x: inref<'T>) = 1 + let f2 (x: byref<'T>) = C.f1 &x + module InRefToInRefClassMethod = + type C() = + static member f1 (x: inref<'T>) = 1 + let f2 (x: inref<'T>) = C.f1 &x + + module OutRefToInRefClassMethod = + type C() = + static member f1 (x: inref<'T>) = 1 + let f2 (x: outref<'T>) = C.f1 &x + + //--------------- + module OutRefToByRefClassMethod2 = + type C() = + static member f1 (x: byref<'T>) = 1 + let f2 (x: outref<'T>) = C.f1(&x) + + module ByRefToByRefClassMethod2 = + type C() = + static member f1 (x: byref<'T>) = 1 + let f2 (x: byref<'T>) = C.f1(&x) + + module ByRefToOutRefClassMethod2 = + type C() = + static member f1 (x: outref<'T>) = 1 + let f2 (x: byref<'T>) = C.f1(&x) + + module OutRefToOutRefClassMethod2 = + type C() = + static member f1 (x: outref<'T>) = 1 + let f2 (x: outref<'T>) = C.f1(&x) + + module ByRefToInRefClassMethod2 = + type C() = + static member f1 (x: inref<'T>) = 1 + let f2 (x: byref<'T>) = C.f1(&x) + + module InRefToInRefClassMethod2 = + type C() = + static member f1 (x: inref<'T>) = 1 + let f2 (x: inref<'T>) = C.f1(&x) + + module OutRefToInRefClassMethod2 = + type C() = + static member f1 (x: inref<'T>) = 1 + let f2 (x: outref<'T>) = C.f1(&x) + let aa = if !failures then (stdout.WriteLine "Test Failed"; exit 1) else (stdout.WriteLine "Test Passed"; diff --git a/tests/fsharp/core/byrefs/test2.bsl b/tests/fsharp/core/byrefs/test2.bsl new file mode 100644 index 00000000000..5cdb952a471 --- /dev/null +++ b/tests/fsharp/core/byrefs/test2.bsl @@ -0,0 +1,30 @@ + +test2.fsx(29,18,29,19): typecheck error FS3209: The address of the variable 'y' or a related expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + +test2.fsx(36,18,36,19): typecheck error FS3209: The address of the variable 'z' or a related expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + +test2.fsx(45,14,45,15): typecheck error FS3209: The address of the variable 'x' or a related expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + +test2.fsx(49,14,49,15): typecheck error FS3209: The address of the variable 'y' or a related expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + +test2.fsx(56,14,56,15): typecheck error FS3209: The address of the variable 'x' or a related expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + +test2.fsx(59,14,59,15): typecheck error FS3209: The address of the variable 'y' or a related expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + +test2.fsx(68,18,68,19): typecheck error FS3209: The address of the variable 'z' or a related expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + +test2.fsx(69,10,69,11): typecheck error FS3209: The address of the variable 'y' or a related expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + +test2.fsx(79,14,79,29): typecheck error FS3228: The address of a value returned from the expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + +test2.fsx(87,14,87,29): typecheck error FS3228: The address of a value returned from the expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + +test2.fsx(93,28,93,29): typecheck error FS0421: The address of the variable 'x' cannot be used at this point + +test2.fsx(93,17,93,29): typecheck error FS0425: The type of a first-class function cannot contain byrefs + +test2.fsx(93,17,93,29): typecheck error FS0425: The type of a first-class function cannot contain byrefs + +test2.fsx(112,53,112,54): typecheck error FS3209: The address of the variable 'x' or a related expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + +test2.fsx(124,33,124,34): typecheck error FS3209: The address of the variable 'x' or a related expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope. diff --git a/tests/fsharp/core/byrefs/test2.fsx b/tests/fsharp/core/byrefs/test2.fsx new file mode 100644 index 00000000000..a65471c145e --- /dev/null +++ b/tests/fsharp/core/byrefs/test2.fsx @@ -0,0 +1,145 @@ +#if TESTS_AS_APP +module Core_byrefs +#endif + +let failures = ref false +let report_failure (s) = + stderr.WriteLine ("NO: " + s); failures := true +let test s b = if b then () else report_failure(s) + +(* TEST SUITE FOR Int32 *) + +let out r (s:string) = r := !r @ [s] + +let check s actual expected = + if actual = expected then printfn "%s: OK" s + else report_failure (sprintf "%s: FAILED, expected %A, got %A" s expected actual) + +let check2 s expected actual = check s actual expected + +// POST INFERENCE CHECKS +#if NEGATIVE +module NegativeTests = + + let test1 doIt = + let mutable x = 42 + let r = + if doIt then + let mutable y = 1 + &y // not allowed + else + &x + + let c = + if doIt then + let mutable z = 2 + &z // not allowed + else + &x + + x + r + c + + let test2 () = + let x = + let mutable x = 1 + &x // not allowed + + let y = + let mutable y = 2 + &y // not allowed + + x + y + + let test3 doIt = + let mutable x = 1 + if doIt then + &x // not allowed + else + let mutable y = 1 + &y // not allowed + + let test4 doIt = + let mutable x = 1 + let y = + if doIt then + &x + else + let mutable z = 1 + &z // not allowed + &y // not allowed + + type Coolio() = + + static member Cool(x: inref) = &x + + let test5 () = + + let y = + let x = 1 + &Coolio.Cool(&x) // not allowed + + () + + let test6 () = + + let y = + let mutable x = 1 + &Coolio.Cool(&x) // not allowed + + () + + let test7 () = + let mutable x = 1 + let f = fun () -> &x // not allowed + + () + + type ByRefInterface = + + abstract Test : byref * byref -> byref + + type Test() = + + member __.Beef() = + let mutable a = Unchecked.defaultof + let obj = { new ByRefInterface with + + member __.Test(x,y) = + let mutable x = 1 + let obj2 = + { new ByRefInterface with + + member __.Test(_x,y) = &x } // is not allowed + a <- obj2 + &y + } + let mutable x = 500 + let mutable y = 500 + obj.Test(&x, &y) |> ignore + a + + type Beef = delegate of unit-> byref + let testBeef () = + let mutable x = 1 + let f = Beef(fun () -> &x) // is not allowed + () +#endif + +module Tests = + + let test1 () = + let x = 1 + let f = fun () -> + let y = &x // is allowed + () + + let g = fun () -> + let y = &x // is allowed + () + () + +let aa = + if !failures then (stdout.WriteLine "Test Failed"; exit 1) + else (stdout.WriteLine "Test Passed"; + System.IO.File.WriteAllText("test2.ok","ok"); + exit 0) \ No newline at end of file diff --git a/tests/fsharp/core/comprehensions-hw/test.fsx b/tests/fsharp/core/comprehensions-hw/test.fsx index 38d7f8c316f..19535574cd1 100644 --- a/tests/fsharp/core/comprehensions-hw/test.fsx +++ b/tests/fsharp/core/comprehensions-hw/test.fsx @@ -447,7 +447,7 @@ test "coic23" -#if !FX_PORTABLE_OR_NETSTANDARD +#if !NETCOREAPP1_0 let pickering() = let files = Directory.GetFiles(@"C:\Program Files\Microsoft Enterprise Library January 2006\", "*.csproj", SearchOption.AllDirectories) for file in files do @@ -557,7 +557,7 @@ module RandomSmallIfThenElseTest = do () return a } -#if !FX_PORTABLE_OR_NETSTANDARD +#if !NETCOREAPP1_0 module MoreExtensions = open Microsoft.FSharp.Control diff --git a/tests/fsharp/core/comprehensions/test.fsx b/tests/fsharp/core/comprehensions/test.fsx index 1339196c638..3bf078fcc8d 100644 --- a/tests/fsharp/core/comprehensions/test.fsx +++ b/tests/fsharp/core/comprehensions/test.fsx @@ -15,10 +15,6 @@ let test (s : string) b = if b then stderr.WriteLine " OK" else report_failure (s) -#if FSCORE_PORTABLE_OLD -let printfn s = printfn "%s" s -#endif - let _ = test "coic23a" (Seq.toList { 'a' .. 'c' } = ['a';'b';'c']) let _ = test "coic23q" (Seq.toList {1 .. 0} = []) @@ -522,7 +518,7 @@ module MaxIntMinIntBOundaryCases = begin end -#if !FX_PORTABLE_OR_NETSTANDARD +#if !NETCOREAPP1_0 open System.IO open System.Xml diff --git a/tests/fsharp/core/control/test.fsx b/tests/fsharp/core/control/test.fsx index 86bd362be32..ea2aafcd663 100644 --- a/tests/fsharp/core/control/test.fsx +++ b/tests/fsharp/core/control/test.fsx @@ -4,7 +4,7 @@ module Core_control #endif #light -#if FX_PORTABLE_OR_NETSTANDARD +#if NETCOREAPP1_0 open System.Threading.Tasks #endif @@ -32,7 +32,7 @@ let report_failure s = log (sprintf "FAILURE: %s failed" s) ) -#if !FX_PORTABLE_OR_NETSTANDARD +#if !NETCOREAPP1_0 System.AppDomain.CurrentDomain.UnhandledException.AddHandler( fun _ (args:System.UnhandledExceptionEventArgs) -> lock syncObj (fun () -> @@ -355,7 +355,7 @@ module SpawnTests = do result <- 1 }); while result = 0 do printf "." -#if FX_PORTABLE_OR_NETSTANDARD +#if NETCOREAPP1_0 Task.Delay(10).Wait() #else System.Threading.Thread.Sleep(10) @@ -363,7 +363,7 @@ module SpawnTests = result) 1 -#if !FX_PORTABLE_OR_NETSTANDARD +#if !NETCOREAPP1_0 module FromBeginEndTests = // FromBeginEnd let FromBeginEndTest() = @@ -395,7 +395,7 @@ module FromBeginEndTests = if (!savedCallback).IsNone then failwith "expected a callback (loc cwowen903)" (!savedCallback).Value.Invoke iar else -#if FX_PORTABLE_OR_NETSTANDARD +#if NETCOREAPP1_0 Task.Run(fun _ -> Task.Delay(sleep).Wait() #else @@ -465,7 +465,7 @@ module Bug6078 = "foo" Test() -#if !MONO && !FX_PORTABLE_OR_NETSTANDARD +#if !MONO && !NETCOREAPP1_0 module AwaitEventTests = let AwaitEventTest() = // AwaitEvent @@ -486,7 +486,7 @@ module AwaitEventTests = if completeSynchronously then ev.Trigger(r) else -#if FX_PORTABLE_OR_NETSTANDARD +#if NETCOREAPP1_0 Task.Run(fun _ -> Task.Delay(sleep).Wait() #else @@ -773,7 +773,7 @@ module OnCancelTests = return () }, asyncGroup.Token); while count = 0 do do printfn "waiting to enter cancellation section" -#if FX_PORTABLE_OR_NETSTANDARD +#if NETCOREAPP1_0 Task.Delay(10).Wait() #else System.Threading.Thread.Sleep(10) @@ -782,7 +782,7 @@ module OnCancelTests = res) 0 -#if !TESTS_AS_APP && !FX_PORTABLE_OR_NETSTANDARD +#if !TESTS_AS_APP && !NETCOREAPP1_0 module SyncContextReturnTests = let p() = printfn "running on %A" System.Threading.SynchronizationContext.Current @@ -1082,7 +1082,7 @@ module ParallelTests = member x.Dispose() = // This gets run when the cancel happens // Sleep a bit to check we wait for the sleep after the cancel -#if FX_PORTABLE_OR_NETSTANDARD +#if NETCOREAPP1_0 Task.Delay(10).Wait() #else System.Threading.Thread.Sleep(10) @@ -1134,7 +1134,7 @@ module ParallelTests = [| 0..n-1 |] -#if !FX_PORTABLE_OR_NETSTANDARD +#if !NETCOREAPP1_0 module AsyncWaitOneTest1 = let Run() = @@ -1259,7 +1259,7 @@ Async.RunSynchronously (async { let! n = s.AsyncRead(buffer,0,9) in return n }) *) #endif -#if !FX_PORTABLE_OR_NETSTANDARD +#if !NETCOREAPP1_0 module AsyncGenerateTests = let Run() = for length in 1 .. 10 do @@ -1315,7 +1315,7 @@ module AsyncGenerateTests = [| 0 .. length-1|];; #endif -#if !FX_PORTABLE_OR_NETSTANDARD +#if !NETCOREAPP1_0 (* #This part of control suite disabled under bug#1809 module ThreadAbortTests = @@ -1401,7 +1401,7 @@ let catch a = let to_be_cancelled n flag1 flag2 = async { use! holder = Async.OnCancel(fun _ -> incr flag1) -#if FX_PORTABLE_OR_NETSTANDARD +#if NETCOREAPP1_0 do Task.Delay(n/8).Wait() #else do System.Threading.Thread.Sleep (n / 8) @@ -1422,7 +1422,7 @@ let test2 () = test "test2 - OnCancel" (!flag1 >= 0 && !flag1 < n && !flag2 >= 0 && !flag2 < n) -#if !FX_PORTABLE_OR_NETSTANDARD +#if !NETCOREAPP1_0 // SwitchToNewThread let test3 () = let ids = ref [] @@ -1484,7 +1484,7 @@ let test8() = let syncRoot = System.Object() let k = ref 0 let comp _ = async { return lock syncRoot (fun () -> incr k -#if FX_PORTABLE_OR_NETSTANDARD +#if NETCOREAPP1_0 Task.Delay(1).Wait() #else System.Threading.Thread.Sleep(1) @@ -1628,7 +1628,7 @@ let test15() = Async.Parallel2(a, cancel) |> Async.RunSynchronously |> ignore with _ -> () -#if FX_PORTABLE_OR_NETSTANDARD +#if NETCOREAPP1_0 Task.Delay(300).Wait() #else System.Threading.Thread.Sleep(300) @@ -1651,7 +1651,7 @@ let test15b() = let a = Async.TryCancelled(a, (fun _ -> p.Check -1)) a |> Async.RunSynchronously |> ignore with _ -> () -#if FX_PORTABLE_OR_NETSTANDARD +#if NETCOREAPP1_0 Task.Delay(100).Wait() #else System.Threading.Thread.Sleep(100) @@ -1659,7 +1659,7 @@ let test15b() = test1() test2() -#if !FX_PORTABLE_OR_NETSTANDARD +#if !NETCOREAPP1_0 test3() #endif test8() @@ -1685,7 +1685,7 @@ let test22() = let p = Path "test22" let a = async { do p.Check 1 -#if FX_PORTABLE_OR_NETSTANDARD +#if NETCOREAPP1_0 do Task.Delay(200).Wait() #else do System.Threading.Thread.Sleep(200) @@ -1703,14 +1703,14 @@ let test22() = let run = Async.TryCancelled(run, fun _ -> p.Check 4) let group = new System.Threading.CancellationTokenSource() Async.Start(run,group.Token) -#if FX_PORTABLE_OR_NETSTANDARD +#if NETCOREAPP1_0 Task.Delay(100).Wait() #else System.Threading.Thread.Sleep(100) #endif p.Check 2 group.Cancel() -#if FX_PORTABLE_OR_NETSTANDARD +#if NETCOREAPP1_0 Task.Delay(200).Wait() #else System.Threading.Thread.Sleep(200) @@ -1748,7 +1748,7 @@ module ParallelTest = member x.Dispose() = // This gets run when the cancel happens if i=n-1 then // last guy waits a long time to ensure client is blocked -#if FX_PORTABLE_OR_NETSTANDARD +#if NETCOREAPP1_0 Task.Delay(200).Wait() #else System.Threading.Thread.Sleep(2000) @@ -1780,7 +1780,7 @@ module ParallelTest = Test() -#if !TESTS_AS_APP && !FX_PORTABLE_OR_NETSTANDARD +#if !TESTS_AS_APP && !NETCOREAPP1_0 // See bug 5570, check we do not switch threads module CheckNoPumpingOrThreadSwitchingBecauseWeTrampolineSynchronousCode = let checkOnThread msg expectedThreadId = @@ -2053,7 +2053,7 @@ module Bug391710 = Async.Start(a1, cancellationToken = cts.Token) Async.Start(a2) -#if FX_PORTABLE_OR_NETSTANDARD +#if NETCOREAPP1_0 Task.Delay(500).Wait(); #else System.Threading.Thread.Sleep(500) @@ -2062,7 +2062,7 @@ module Bug391710 = try Bug391710() -#if FX_PORTABLE_OR_NETSTANDARD +#if NETCOREAPP1_0 Task.Delay(500).Wait(); #else System.Threading.Thread.Sleep(2000) @@ -2079,13 +2079,13 @@ let RunAll() = StartChildOutsideOfAsync.Run() SpawnTests.Run() AsBeginEndTests.AsBeginEndTest() -#if !MONO && !FX_PORTABLE_OR_NETSTANDARD +#if !MONO && !NETCOREAPP1_0 AwaitEventTests.AwaitEventTest() #endif OnCancelTests.Run() GenerateTests.Run() ParallelTests.Run() -#if !FX_PORTABLE_OR_NETSTANDARD +#if !NETCOREAPP1_0 AsyncWaitOneTest1.Run() AsyncGenerateTests.Run() #endif diff --git a/tests/fsharp/core/controlChamenos/test.fsx b/tests/fsharp/core/controlChamenos/test.fsx index f4199c92456..c4bc30f97a9 100644 --- a/tests/fsharp/core/controlChamenos/test.fsx +++ b/tests/fsharp/core/controlChamenos/test.fsx @@ -27,7 +27,7 @@ let report_failure s = log (sprintf "FAILURE: %s failed" s) ) -#if !FX_PORTABLE_OR_NETSTANDARD +#if !NETCOREAPP1_0 System.AppDomain.CurrentDomain.UnhandledException.AddHandler( fun _ (args:System.UnhandledExceptionEventArgs) -> lock syncObj (fun () -> diff --git a/tests/fsharp/core/controlMailbox/test.fsx b/tests/fsharp/core/controlMailbox/test.fsx index ac63919aef0..61345f46db9 100644 --- a/tests/fsharp/core/controlMailbox/test.fsx +++ b/tests/fsharp/core/controlMailbox/test.fsx @@ -6,7 +6,7 @@ module Core_controlMailBox #nowarn "40" // recursive references -#if FX_PORTABLE_OR_NETSTANDARD +#if NETCOREAPP1_0 open System.Threading.Tasks #endif @@ -31,7 +31,7 @@ let report_failure s = log (sprintf "FAILURE: %s failed" s) ) -#if !FX_PORTABLE_OR_NETSTANDARD +#if !NETCOREAPP1_0 System.AppDomain.CurrentDomain.UnhandledException.AddHandler( fun _ (args:System.UnhandledExceptionEventArgs) -> lock syncObj (fun () -> @@ -210,7 +210,7 @@ module MailboxProcessorBasicTests = while !received < n do if !received % 100 = 0 then printfn "received = %d" !received -#if FX_PORTABLE_OR_NETSTANDARD +#if NETCOREAPP1_0 Task.Delay(1).Wait() #else System.Threading.Thread.Sleep(1) @@ -233,7 +233,7 @@ module MailboxProcessorBasicTests = | Some _ -> do incr received }) mb1.Start(); for i in 0 .. n-1 do -#if FX_PORTABLE_OR_NETSTANDARD +#if NETCOREAPP1_0 Task.Delay(1).Wait(); #else System.Threading.Thread.Sleep(1) @@ -242,7 +242,7 @@ module MailboxProcessorBasicTests = while !received < n do if !received % 100 = 0 then printfn "main thread: received = %d" !received -#if FX_PORTABLE_OR_NETSTANDARD +#if NETCOREAPP1_0 Task.Delay(1).Wait(); #else System.Threading.Thread.Sleep(1) @@ -275,7 +275,7 @@ module MailboxProcessorBasicTests = w.Start() while w.ElapsedMilliseconds < 1000L && (!timedOut).IsNone do mb.Post(-1) -#if FX_PORTABLE_OR_NETSTANDARD +#if NETCOREAPP1_0 Task.Delay(1).Wait(); #else System.Threading.Thread.Sleep(1) @@ -298,7 +298,7 @@ module MailboxProcessorBasicTests = w.Start() while w.ElapsedMilliseconds < 100L do mb.Post(false) -#if FX_PORTABLE_OR_NETSTANDARD +#if NETCOREAPP1_0 Task.Delay(0).Wait(); #else System.Threading.Thread.Sleep(0) @@ -318,7 +318,7 @@ module MailboxProcessorErrorEventTests = let res = ref 100 mb1.Error.Add(fun _ -> res := 0) mb1.Start(); -#if FX_PORTABLE_OR_NETSTANDARD +#if NETCOREAPP1_0 Task.Delay(200).Wait(); #else System.Threading.Thread.Sleep(200) @@ -333,7 +333,7 @@ module MailboxProcessorErrorEventTests = let res = ref 0 mb1.Error.Add(fun _ -> res := 100) mb1.Start(); -#if FX_PORTABLE_OR_NETSTANDARD +#if NETCOREAPP1_0 Task.Delay(200).Wait(); #else System.Threading.Thread.Sleep(200) @@ -351,7 +351,7 @@ module MailboxProcessorErrorEventTests = mb1.Error.Add(function Err n -> res := n | _ -> check "rwe90r - unexpected error" 0 1) mb1.Start(); mb1.Post 100 -#if FX_PORTABLE_OR_NETSTANDARD +#if NETCOREAPP1_0 Task.Delay(200).Wait(); #else System.Threading.Thread.Sleep(200) @@ -473,7 +473,7 @@ let test7() = let timeoutboxes str = new MailboxProcessor<'b>(fun inbox -> async { for i in 1 .. 10 do -#if FX_PORTABLE_OR_NETSTANDARD +#if NETCOREAPP1_0 Task.Delay(200).Wait() #else do System.Threading.Thread.Sleep 200 @@ -586,7 +586,7 @@ module LotsOfMessages = check "celrv09ervkn" (queueLength >= logger.CurrentQueueLength) true queueLength <- logger.CurrentQueueLength -#if FX_PORTABLE_OR_NETSTANDARD +#if NETCOREAPP1_0 Task.Delay(10).Wait() #else System.Threading.Thread.Sleep(10) diff --git a/tests/fsharp/core/controlStackOverflow/test.fsx b/tests/fsharp/core/controlStackOverflow/test.fsx index 1a2da20aa49..6bc557ef28d 100644 --- a/tests/fsharp/core/controlStackOverflow/test.fsx +++ b/tests/fsharp/core/controlStackOverflow/test.fsx @@ -8,7 +8,7 @@ module Core_controlStackOverflow #nowarn "40" // recursive references -#if FX_PORTABLE_OR_NETSTANDARD +#if NETCOREAPP1_0 open System.Threading.Tasks #endif @@ -36,7 +36,7 @@ let report_failure s = log (sprintf "FAILURE: %s failed" s) ) -#if !FX_PORTABLE_OR_NETSTANDARD +#if !NETCOREAPP1_0 System.AppDomain.CurrentDomain.UnhandledException.AddHandler( fun _ (args:System.UnhandledExceptionEventArgs) -> lock syncObj (fun () -> @@ -231,7 +231,7 @@ module StackDiveTests = let quwiAsync x = Async.FromContinuations(fun (c,_,_) -> -#if FX_PORTABLE_OR_NETSTANDARD +#if NETCOREAPP1_0 Task.Run( fun _ -> async { diff --git a/tests/fsharp/core/csext/test.fsx b/tests/fsharp/core/csext/test.fsx index 16a8da62e7c..cfe0ec3759f 100644 --- a/tests/fsharp/core/csext/test.fsx +++ b/tests/fsharp/core/csext/test.fsx @@ -53,6 +53,266 @@ type Struct(i:int) = static member BlueStruct = blueStruct +#nowarn "3220" + +// See https://github.com/Microsoft/visualfsharp/pull/3729 +module TestsExplicitUseOfTupleProperties = + // all give a warning, suppressed in this file + let x1 = + [ (1,2).Item1 + (1,2).Item2 + (1,2,3).Item1 + (1,2,3).Item2 + (1,2,3).Item3 + (1,2,3,4).Item1 + (1,2,3,4).Item2 + (1,2,3,4).Item3 + (1,2,3,4).Item4 + (1,2,3,4,5).Item1 + (1,2,3,4,5).Item2 + (1,2,3,4,5).Item3 + (1,2,3,4,5).Item4 + (1,2,3,4,5).Item5 + (1,2,3,4,5,6).Item1 + (1,2,3,4,5,6).Item2 + (1,2,3,4,5,6).Item3 + (1,2,3,4,5,6).Item4 + (1,2,3,4,5,6).Item5 + (1,2,3,4,5,6).Item6 + (1,2,3,4,5,6,7).Item1 + (1,2,3,4,5,6,7).Item2 + (1,2,3,4,5,6,7).Item3 + (1,2,3,4,5,6,7).Item4 + (1,2,3,4,5,6,7).Item5 + (1,2,3,4,5,6,7).Item6 + (1,2,3,4,5,6,7).Item7 + (1,2,3,4,5,6,7,8).Item1 + (1,2,3,4,5,6,7,8).Item2 + (1,2,3,4,5,6,7,8).Item3 + (1,2,3,4,5,6,7,8).Item4 + (1,2,3,4,5,6,7,8).Item5 + (1,2,3,4,5,6,7,8).Item6 + (1,2,3,4,5,6,7,8).Item7 + (1,2,3,4,5,6,7,8,9).Item1 + (1,2,3,4,5,6,7,8,9).Item2 + (1,2,3,4,5,6,7,8,9).Item3 + (1,2,3,4,5,6,7,8,9).Item4 + (1,2,3,4,5,6,7,8,9).Item5 + (1,2,3,4,5,6,7,8,9).Item6 + (1,2,3,4,5,6,7,8,9).Item7 + (1,2).get_Item1() + (1,2).get_Item2() + (1,2,3).get_Item1() + (1,2,3).get_Item2() + (1,2,3).get_Item3() + (1,2,3,4).get_Item1() + (1,2,3,4).get_Item2() + (1,2,3,4).get_Item3() + (1,2,3,4).get_Item4() + (1,2,3,4,5).get_Item1() + (1,2,3,4,5).get_Item2() + (1,2,3,4,5).get_Item3() + (1,2,3,4,5).get_Item4() + (1,2,3,4,5).get_Item5() + (1,2,3,4,5,6).get_Item1() + (1,2,3,4,5,6).get_Item2() + (1,2,3,4,5,6).get_Item3() + (1,2,3,4,5,6).get_Item4() + (1,2,3,4,5,6).get_Item5() + (1,2,3,4,5,6).get_Item6() + (1,2,3,4,5,6,7).get_Item1() + (1,2,3,4,5,6,7).get_Item2() + (1,2,3,4,5,6,7).get_Item3() + (1,2,3,4,5,6,7).get_Item4() + (1,2,3,4,5,6,7).get_Item5() + (1,2,3,4,5,6,7).get_Item6() + (1,2,3,4,5,6,7).get_Item7() + (1,2,3,4,5,6,7,8).get_Item1() + (1,2,3,4,5,6,7,8).get_Item2() + (1,2,3,4,5,6,7,8).get_Item3() + (1,2,3,4,5,6,7,8).get_Item4() + (1,2,3,4,5,6,7,8).get_Item5() + (1,2,3,4,5,6,7,8).get_Item6() + (1,2,3,4,5,6,7,8).get_Item7() + (1,2,3,4,5,6,7,8,9).get_Item1() + (1,2,3,4,5,6,7,8,9).get_Item2() + (1,2,3,4,5,6,7,8,9).get_Item3() + (1,2,3,4,5,6,7,8,9).get_Item4() + (1,2,3,4,5,6,7,8,9).get_Item5() + (1,2,3,4,5,6,7,8,9).get_Item6() + (1,2,3,4,5,6,7,8,9).get_Item7() ] + + printfn "x1 = %A" x1 + check "vwhnwrvep01" x1 [1; 2; 1; 2; 3; 1; 2; 3; 4; 1; 2; 3; 4; 5; 1; 2; 3; 4; 5; 6; 1; 2; 3; 4; 5; 6; 7; 1; 2; 3; 4; 5; 6; 7; 1; 2; 3; 4; 5; 6; 7; + 1; 2; 1; 2; 3; 1; 2; 3; 4; 1; 2; 3; 4; 5; 1; 2; 3; 4; 5; 6; 1; 2; 3; 4; 5; 6; 7; 1; 2; 3; 4; 5; 6; 7; 1; 2; 3; 4; 5; 6; 7] + + let x2 : System.Tuple = (1,2,3,4,5,6,7,8).Rest // gives a warning, suppressed in this file + printfn "x2 = %A" x2 + check "vwhnwrvep02" x2 (System.Tuple(8)) + + let x3 : (int * int) = (1,2,3,4,5,6,7,8,9).Rest // gives a warning, suppressed in this file + printfn "x3 = %A" x3 + check "vwhnwrvep03" x3 (unbox (box (8,9))) + + // check a quotation of these + let tup = (1,2) + let x4 = <@ tup.Item1 @> + + let text = sprintf "%A" x4 + printfn "%s" text + check "vewjwervwver" text "PropertyGet (Some (PropertyGet (None, tup, [])), Item1, [])" + +(* +// See https://github.com/Microsoft/visualfsharp/pull/3729, struct tuple access to Item* and Rest* are not supported +module TestsExplicitUseOfStructTupleProperties = + // all give a warning, suppressed in this file + let x1 = + [ (struct (1,2)).Item1 + (struct (1,2)).Item2 + (struct (1,2,3)).Item1 + (struct (1,2,3)).Item2 + (struct (1,2,3)).Item3 + (struct (1,2,3,4)).Item1 + (struct (1,2,3,4)).Item2 + (struct (1,2,3,4)).Item3 + (struct (1,2,3,4)).Item4 + (struct (1,2,3,4,5)).Item1 + (struct (1,2,3,4,5)).Item2 + (struct (1,2,3,4,5)).Item3 + (struct (1,2,3,4,5)).Item4 + (struct (1,2,3,4,5)).Item5 + (struct (1,2,3,4,5,6)).Item1 + (struct (1,2,3,4,5,6)).Item2 + (struct (1,2,3,4,5,6)).Item3 + (struct (1,2,3,4,5,6)).Item4 + (struct (1,2,3,4,5,6)).Item5 + (struct (1,2,3,4,5,6)).Item6 + (struct (1,2,3,4,5,6,7)).Item1 + (struct (1,2,3,4,5,6,7)).Item2 + (struct (1,2,3,4,5,6,7)).Item3 + (struct (1,2,3,4,5,6,7)).Item4 + (struct (1,2,3,4,5,6,7)).Item5 + (struct (1,2,3,4,5,6,7)).Item6 + (struct (1,2,3,4,5,6,7)).Item7 + (struct (1,2,3,4,5,6,7,8)).Item1 + (struct (1,2,3,4,5,6,7,8)).Item2 + (struct (1,2,3,4,5,6,7,8)).Item3 + (struct (1,2,3,4,5,6,7,8)).Item4 + (struct (1,2,3,4,5,6,7,8)).Item5 + (struct (1,2,3,4,5,6,7,8)).Item6 + (struct (1,2,3,4,5,6,7,8)).Item7 + (struct (1,2,3,4,5,6,7,8,9)).Item1 + (struct (1,2,3,4,5,6,7,8,9)).Item2 + (struct (1,2,3,4,5,6,7,8,9)).Item3 + (struct (1,2,3,4,5,6,7,8,9)).Item4 + (struct (1,2,3,4,5,6,7,8,9)).Item5 + (struct (1,2,3,4,5,6,7,8,9)).Item6 + (struct (1,2,3,4,5,6,7,8,9)).Item7 + (struct (1,2)).get_Item1() + (struct (1,2)).get_Item2() + (struct (1,2,3)).get_Item1() + (struct (1,2,3)).get_Item2() + (struct (1,2,3)).get_Item3() + (struct (1,2,3,4)).get_Item1() + (struct (1,2,3,4)).get_Item2() + (struct (1,2,3,4)).get_Item3() + (struct (1,2,3,4)).get_Item4() + (struct (1,2,3,4,5)).get_Item1() + (struct (1,2,3,4,5)).get_Item2() + (struct (1,2,3,4,5)).get_Item3() + (struct (1,2,3,4,5)).get_Item4() + (struct (1,2,3,4,5)).get_Item5() + (struct (1,2,3,4,5,6)).get_Item1() + (struct (1,2,3,4,5,6)).get_Item2() + (struct (1,2,3,4,5,6)).get_Item3() + (struct (1,2,3,4,5,6)).get_Item4() + (struct (1,2,3,4,5,6)).get_Item5() + (struct (1,2,3,4,5,6)).get_Item6() + (struct (1,2,3,4,5,6,7)).get_Item1() + (struct (1,2,3,4,5,6,7)).get_Item2() + (struct (1,2,3,4,5,6,7)).get_Item3() + (struct (1,2,3,4,5,6,7)).get_Item4() + (struct (1,2,3,4,5,6,7)).get_Item5() + (struct (1,2,3,4,5,6,7)).get_Item6() + (struct (1,2,3,4,5,6,7)).get_Item7() + (struct (1,2,3,4,5,6,7,8)).get_Item1() + (struct (1,2,3,4,5,6,7,8)).get_Item2() + (struct (1,2,3,4,5,6,7,8)).get_Item3() + (struct (1,2,3,4,5,6,7,8)).get_Item4() + (struct (1,2,3,4,5,6,7,8)).get_Item5() + (struct (1,2,3,4,5,6,7,8)).get_Item6() + (struct (1,2,3,4,5,6,7,8)).get_Item7() + (struct (1,2,3,4,5,6,7,8,9)).get_Item1() + (struct (1,2,3,4,5,6,7,8,9)).get_Item2() + (struct (1,2,3,4,5,6,7,8,9)).get_Item3() + (struct (1,2,3,4,5,6,7,8,9)).get_Item4() + (struct (1,2,3,4,5,6,7,8,9)).get_Item5() + (struct (1,2,3,4,5,6,7,8,9)).get_Item6() + (struct (1,2,3,4,5,6,7,8,9)).get_Item7() ] + + printfn "x1 = %A" x1 + check "vwhnwrvep01" x1 [1; 2; 1; 2; 3; 1; 2; 3; 4; 1; 2; 3; 4; 5; 1; 2; 3; 4; 5; 6; 1; 2; 3; 4; 5; 6; 7; 1; 2; 3; 4; 5; 6; 7; 1; 2; 3; 4; 5; 6; 7; + 1; 2; 1; 2; 3; 1; 2; 3; 4; 1; 2; 3; 4; 5; 1; 2; 3; 4; 5; 6; 1; 2; 3; 4; 5; 6; 7; 1; 2; 3; 4; 5; 6; 7; 1; 2; 3; 4; 5; 6; 7] + + let x2 = (struct (1,2,3,4,5,6,7,8)).Rest // gives a warning, suppressed in this file + printfn "x2 = %A" x2 + check "vwhnwrvep02" x2 (System.Tuple(8)) + + let x3 = (struct (1,2,3,4,5,6,7,8,9)).Rest // gives a warning, suppressed in this file + printfn "x3 = %A" x3 + check "vwhnwrvep03" x3 (unbox (box (struct (8,9)))) + + // check a quotation of these + let tup = (struct (1,2)) + let x4 = <@ tup.Item1 @> + + let text = sprintf "%A" x4 + printfn "%s" text + check "vewjwervwver" text "PropertyGet (Some (PropertyGet (None, tup, [])), Item1, [])" +*) + +module TupleCtors = + let t1 x = new System.Tuple<_>(x) + let t2 (x1,x2) = new System.Tuple<_,_>(x1,x2) + let t3 (x1,x2,x3) = new System.Tuple<_,_,_>(x1,x2,x3) + let t4 (x1,x2,x3,x4) = new System.Tuple<_,_,_,_>(x1,x2,x3,x4) + let t5 (x1,x2,x3,x4,x5) = new System.Tuple<_,_,_,_,_>(x1,x2,x3,x4,x5) + let t6 (x1,x2,x3,x4,x5,x6) = new System.Tuple<_,_,_,_,_,_>(x1,x2,x3,x4,x5,x6) + let t7 (x1,x2,x3,x4,x5,x6,x7) = new System.Tuple<_,_,_,_,_,_,_>(x1,x2,x3,x4,x5,x6,x7) + let cp (x1,x2,x3,x4,x5,x6,x7) t = new System.Tuple<_,_,_,_,_,_,_,_>(x1,x2,x3,x4,x5,x6,x7, t) + +module TupleSRTP = + let t1 x = new System.Tuple<_>(x) + let t2 (x1,x2) = new System.Tuple<_,_>(x1,x2) + let t3 (x1,x2,x3) = new System.Tuple<_,_,_>(x1,x2,x3) + let t4 (x1,x2,x3,x4) = new System.Tuple<_,_,_,_>(x1,x2,x3,x4) + let t5 (x1,x2,x3,x4,x5) = new System.Tuple<_,_,_,_,_>(x1,x2,x3,x4,x5) + let t6 (x1,x2,x3,x4,x5,x6) = new System.Tuple<_,_,_,_,_,_>(x1,x2,x3,x4,x5,x6) + let t7 (x1,x2,x3,x4,x5,x6,x7) = new System.Tuple<_,_,_,_,_,_,_>(x1,x2,x3,x4,x5,x6,x7) + let cp (x1,x2,x3,x4,x5,x6,x7) t = new System.Tuple<_,_,_,_,_,_,_,_>(x1,x2,x3,x4,x5,x6,x7, t) + + type T = T with + static member inline ($) (T, t:System.Tuple<_,_,_,_,_,_,_,'rst>) = fun x -> cp (x,t.Item1, t.Item2,t.Item3,t.Item4,t.Item5,t.Item6) ((T $ t.Rest) t.Item7) + static member ($) (T, ()) = fun x -> t1 (x) + static member ($) (T, t:System.Tuple<_>) = fun x -> t2 (x,t.Item1) + static member ($) (T, t:System.Tuple<_,_>) = fun x -> t3 (x,t.Item1, t.Item2) + static member ($) (T, t:System.Tuple<_,_,_>) = fun x -> t4 (x,t.Item1, t.Item2,t.Item3) + static member ($) (T, t:System.Tuple<_,_,_,_>) = fun x -> t5 (x,t.Item1, t.Item2,t.Item3,t.Item4) + static member ($) (T, t:System.Tuple<_,_,_,_,_>) = fun x -> t6 (x,t.Item1, t.Item2,t.Item3,t.Item4,t.Item5) + static member ($) (T, t:System.Tuple<_,_,_,_,_,_>) = fun x -> t7 (x,t.Item1, t.Item2,t.Item3,t.Item4,t.Item5,t.Item6) + static member ($) (T, t:System.Tuple<_,_,_,_,_,_,_>) = fun x -> cp (x,t.Item1, t.Item2,t.Item3,t.Item4,t.Item5,t.Item6) (t1(t.Item7)) + + + let v1 = (^T : (member get_Item1 : unit -> _ ) (new System.Tuple(1,3))) + let v2 = (^T : (member get_Item1 : unit -> _ ) (System.Tuple(1,3))) + let v3 = (^T : (member get_Item1 : unit -> _ ) ((1,3))) + + + + let v1b = (^T : (member get_Item2 : unit -> _ ) (new System.Tuple(1,3))) + let v2b = (^T : (member get_Item2 : unit -> _ ) (System.Tuple(1,3))) + let v3b = (^T : (member get_Item2 : unit -> _ ) ((1,3))) + (*--------------------*) #if TESTS_AS_APP diff --git a/tests/fsharp/core/enum/test.fsx b/tests/fsharp/core/enum/test.fsx new file mode 100644 index 00000000000..2bc2d41d783 --- /dev/null +++ b/tests/fsharp/core/enum/test.fsx @@ -0,0 +1,58 @@ +// #Conformance #Regression +#if TESTS_AS_APP +module Core_enum +#endif + +open System.Reflection +let failures = ref [] + +let report_failure (s : string) = + stderr.Write" Failed: " + stderr.WriteLine s + failures := !failures @ [s] + +let test (s : string) b = + stderr.Write(s) + if b then stderr.WriteLine " Passed" + else report_failure (s) + +let check s b1 b2 = test s (b1 = b2) + +type internal internalEnum = Red=0 | Yellow=1 | Blue=2 +type public publicEnum = Red=0 | Yellow=1 | Blue=2 + +module enum = + + let AreCasesPublic (t:System.Type) = + let bindingFlags = BindingFlags.Static ||| BindingFlags.Public + try + let red = t.GetField("Red", bindingFlags) + let yellow = t.GetField("Yellow", bindingFlags) + let blue = t.GetField("Blue", bindingFlags) + let value__ = t.GetField("value__", bindingFlags ||| BindingFlags.Instance) + + if isNull red || not (red.IsPublic) then failwith (sprintf "Type: %s) - Red is not public. All enum cases should always be public" t.FullName) + if isNull yellow || not (yellow.IsPublic) then failwith (sprintf "Type: %s) - Yellow is not public. All enum cases should always be public" t.FullName) + if isNull blue || not (blue.IsPublic) then failwith (sprintf "Type: %s) - Blue is not public. All enum cases should always be public" t.FullName) + if isNull value__ || not (value__.IsPublic) then failwith (sprintf "Type: %s) - value__ is not public. value__ should always be public" t.FullName) + true + with _ -> false + + do check "publicEnum" (AreCasesPublic typeof) true + do check "internalEnum" (AreCasesPublic typeof) true + + +#if TESTS_AS_APP +let RUN() = !failures +#else +let aa = + match !failures with + | [] -> + stdout.WriteLine "Test Passed" + System.IO.File.WriteAllText("test.ok","ok") + exit 0 + | _ -> + stdout.WriteLine "Test Failed" + exit 1 +#endif + diff --git a/tests/fsharp/core/forexpression/test.fsx b/tests/fsharp/core/forexpression/test.fsx index 5ef6b494a91..671d67f820d 100644 --- a/tests/fsharp/core/forexpression/test.fsx +++ b/tests/fsharp/core/forexpression/test.fsx @@ -109,7 +109,7 @@ let sumOverRange () = let sumOverString () = let mutable sum = 0 for i in testString do -#if FX_PORTABLE_OR_NETSTANDARD +#if NETCOREAPP1_0 sum <- sum + ((int (i :?> char)) - (int '0')) #else sum <- sum + ((int i) - (int '0')) diff --git a/tests/fsharp/core/forwarders/a.cs b/tests/fsharp/core/forwarders/a.cs index 0f6180fe635..0299620719a 100644 --- a/tests/fsharp/core/forwarders/a.cs +++ b/tests/fsharp/core/forwarders/a.cs @@ -9,7 +9,7 @@ // 4. From F#, reference both the _split_ DLLs and the original b.dll and the original c.dll // and use a mix of types and functions from a.dll, b.dll and c.dll // -// The aim is to shake out type identity issues assocaited with type forwarders. +// The aim is to shake out type identity issues associated with type forwarders. #if PART1 public class C diff --git a/tests/fsharp/core/fsfromcs/test.cs b/tests/fsharp/core/fsfromcs/test.cs index 0d523ab2c95..5281b3469e0 100644 --- a/tests/fsharp/core/fsfromcs/test.cs +++ b/tests/fsharp/core/fsfromcs/test.cs @@ -56,21 +56,25 @@ static int Main() { Console.WriteLine("i = {0}", i);}), myList); + // tests op_Implicit ListModule.Iterate ((Converter) delegate(int i) { Console.WriteLine("i = {0} (2nd technique)", i); return null; }, myList); + // tests op_Implicit FSharpList myList2 = ListModule.Map (FuncConvert.ToFSharpFunc((Converter) delegate(int i) { return i.ToString() + i.ToString(); }), myList); + // tests op_Implicit ListModule.Iterate (FuncConvert.ToFSharpFunc((Action) delegate(string s) { Console.WriteLine("i after duplication = {0}", s);}), myList2); + // tests op_Implicit myList2 = ListModule.Map ((Converter) delegate(int i) { return i.ToString() + i.ToString(); }, @@ -81,6 +85,35 @@ static int Main() { Console.WriteLine("i after duplication (2nd technique) = {0}", s);}), myList2); + myList2 = + ListModule.Map + (FuncConvert.ToFSharpFunc(delegate(int i) { return i.ToString() + i.ToString(); }), + myList); + + myList2 = + ListModule.Map + (FuncConvert.FromFunc((Func) delegate(int i) { return i.ToString() + i.ToString(); }), + myList); + + ListModule.Iterate(FuncConvert.ToFSharpFunc(s => { Console.WriteLine("s = {0}", s);}),myList2); + ListModule.Iterate(FuncConvert.FromAction(s => { Console.WriteLine("s = {0}", s);}),myList2); + ListModule.Iterate(FuncConvert.FromFunc(s => null),myList2); + + myList2 = ListModule.Map(FuncConvert.ToFSharpFunc(i => i.ToString() + i.ToString()),myList); + myList2 = ListModule.Map(FuncConvert.FromFunc(i => i.ToString() + i.ToString()),myList); + myList2 = ListModule.MapIndexed(FuncConvert.FromFunc((i,j) => i.ToString() + j),myList); + + var trans3 = FuncConvert.FromFunc((i,j,k) => i + j + k); + var trans4 = FuncConvert.FromFunc((i,j,k,l) => i + j + k + l); + var trans5 = FuncConvert.FromFunc((i,j,k,l,m) => i + j + k + l + m); + + var action3 = FuncConvert.FromAction((i,j,k) => System.Console.WriteLine("action! {0}", i + j + k)); + var action4 = FuncConvert.FromAction((i,j,k,l) => System.Console.WriteLine("action! {0}", i + j + k + l)); + var action5 = FuncConvert.FromAction((i,j,k,l,m) => System.Console.WriteLine("action! {0}", i + j + k + l + m)); + ListModule.Iterate(FuncConvert.ToFSharpFunc(s => { Console.WriteLine("i after duplication (2nd technique) = {0}", s);}),myList2); + ListModule.Iterate(FuncConvert.FromAction(s => { Console.WriteLine("i after duplication (2nd technique) = {0}", s);}),myList2); + + } // Construct a value of each type from the library diff --git a/tests/fsharp/core/fsfromfsviacs/lib2.cs b/tests/fsharp/core/fsfromfsviacs/lib2.cs index 95671b926f2..eb6d6acc141 100644 --- a/tests/fsharp/core/fsfromfsviacs/lib2.cs +++ b/tests/fsharp/core/fsfromfsviacs/lib2.cs @@ -50,11 +50,26 @@ public static class Extensions { /// Extend an F# type + static public ref readonly DateTime ExtendCSharpTypeWithInRefReturnExtension(in this DateTime inp) { return ref inp; } + static public ref DateTime ExtendCSharpTypeWithRefReturnExtension(ref this DateTime inp) { return ref inp; } + static public void ExtendCSharpTypeWithOutRefExtension(ref this DateTime inp) { inp = inp.Date; } + static public int ExtendCSharpTypeWithInRefExtension(ref this DateTime inp) { return inp.Year; } static public int ExtendFSharpType(this Lib.recd1 recd) { return 5; } static public int ExtendCSharpType(this Lib2 recd) { return 4; } } } +namespace Fields +{ + public class Fields + { + + /// Extend an F# type + static public int StaticIntField => 3; + static public System.DateTime StaticDateTimeField => System.DateTime.Now.Date; + } +} + namespace Newtonsoft.Json.Converters { internal class SomeClass @@ -97,4 +112,16 @@ public static int MethodThatImplicitlyConvertsFSharpOption(int x) return opt.Value; } } +} + +namespace FSharpFuncTests +{ + public class ApiWrapper + { + public static Func f1 = new Func((int arg) => arg + 1); + public static Func f2 = new Func((int arg1, string arg2) => arg1 + arg2.Length + 1); + public static Func f3 = new Func((int arg1, string arg2, byte arg3) => arg1 + arg2.Length + 1 + arg3); + public static Func f4 = new Func((int arg1, string arg2, byte arg3, sbyte arg4) => arg1 + arg2.Length + 1 + arg3 + arg4); + public static Func f5 = new Func((int arg1, string arg2, byte arg3, sbyte arg4, Int16 arg5) => arg1 + arg2.Length + 1 + arg3 + arg4 + arg5); + } } \ No newline at end of file diff --git a/tests/fsharp/core/fsfromfsviacs/test.fsx b/tests/fsharp/core/fsfromfsviacs/test.fsx index 1fba263ef4a..137b4df15af 100644 --- a/tests/fsharp/core/fsfromfsviacs/test.fsx +++ b/tests/fsharp/core/fsfromfsviacs/test.fsx @@ -16,6 +16,11 @@ let test (s : string) b = if b then stderr.WriteLine " OK" else report_failure (s) +let check (s : string) x y = + stderr.Write(s) + if x = y then stderr.WriteLine " OK" + else report_failure (sprintf "%s: expected %A, got %A" s y x) + #if NO_LIB_REFERENCE // Test for https://github.com/Microsoft/visualfsharp/issues/2453#issuecomment-280946177 module TestExtensions = open CustomExtensions @@ -154,8 +159,27 @@ let TestAccessibility() = module TestExtensions = open CustomExtensions - test "dfeweeon" (r1.ExtendFSharpType() = 5) - test "dfeweeon" (Lib2().ExtendCSharpType() = 4) + check "dfeweeon" (r1.ExtendFSharpType()) 5 + check "dfeweeon" (Lib2().ExtendCSharpType()) 4 + + let x = System.DateTime.Now + check "dfeweeon1" (System.DateTime.Now.ExtendCSharpTypeWithInRefReturnExtension()).Date x.Date + check "dfeweeon2" (x.ExtendCSharpTypeWithInRefReturnExtension()).Date x.Date + + check "dfeweeon3" (x.ExtendCSharpTypeWithRefReturnExtension()).Date x.Date + + let mutable mx = x + check "dfeweeon4" (mx.ExtendCSharpTypeWithOutRefExtension(); mx) x.Date + + check "dfeweeon5" (x.ExtendCSharpTypeWithInRefExtension()) x.Year + + +let ToFSharpFunc() = + test "vkejhwew901" (FuncConvert.FromFunc(FSharpFuncTests.ApiWrapper.f1)(3) = FSharpFuncTests.ApiWrapper.f1.Invoke(3)) + test "vkejhwew902" (FuncConvert.FromFunc(FSharpFuncTests.ApiWrapper.f2)(3)("a") = FSharpFuncTests.ApiWrapper.f2.Invoke(3, "a")) + test "vkejhwew903" (FuncConvert.FromFunc(FSharpFuncTests.ApiWrapper.f3)(3)("a")(6uy) = FSharpFuncTests.ApiWrapper.f3.Invoke(3, "a", 6uy)) + test "vkejhwew904" (FuncConvert.FromFunc(FSharpFuncTests.ApiWrapper.f4)(3)("a")(6uy)(7y) = FSharpFuncTests.ApiWrapper.f4.Invoke(3, "a", 6uy, 7y)) + test "vkejhwew905" (FuncConvert.FromFunc(FSharpFuncTests.ApiWrapper.f5)(3)("a")(6uy)(7y)(7s) = FSharpFuncTests.ApiWrapper.f5.Invoke(3, "a", 6uy, 7y, 7s)) #endif diff --git a/tests/fsharp/core/fsiAndModifiers/prepare.fsx b/tests/fsharp/core/fsiAndModifiers/prepare.fsx index 6a5b171467c..1179c8623a7 100644 --- a/tests/fsharp/core/fsiAndModifiers/prepare.fsx +++ b/tests/fsharp/core/fsiAndModifiers/prepare.fsx @@ -31,4 +31,6 @@ try asmBuilder.Save(filename) exit 0 -with _ -> exit 1 \ No newline at end of file +with err -> + printfn "Error: %A" err + exit 1 \ No newline at end of file diff --git a/tests/fsharp/core/lazy/test.fsx b/tests/fsharp/core/lazy/test.fsx index 99ae8d4c24f..d16340be2a0 100644 --- a/tests/fsharp/core/lazy/test.fsx +++ b/tests/fsharp/core/lazy/test.fsx @@ -43,7 +43,7 @@ do test "fedeoin" (let x = 3 in Lazy.force (Lazy.force (lazy (lazy (x+x)))) = 6) do test "fedeoin" (let x = ref 3 in let y = lazy (x := !x + 1; 6) in ignore (Lazy.force y); ignore (Lazy.force y); !x = 4) do test "fedeoin" (let x = ref 3 in let y = lazy (x := !x + 1; "abc") in ignore (Lazy.force y); ignore (Lazy.force y); !x = 4) -#if !FX_PORTABLE_OR_NETSTANDARD +#if !NETCOREAPP1_0 module Bug5770 = open System.Threading do diff --git a/tests/fsharp/core/letrec/test.fsx b/tests/fsharp/core/letrec/test.fsx index 2fa38292ae6..2c07ef1edee 100644 --- a/tests/fsharp/core/letrec/test.fsx +++ b/tests/fsharp/core/letrec/test.fsx @@ -127,7 +127,7 @@ let WouldFailAtRuntimeTest2 () = and a3 = (fun x -> a2 + 2) 1 in a2 + a3 -#if !TESTS_AS_APP && !FX_PORTABLE_OR_NETSTANDARD +#if !TESTS_AS_APP && !NETCOREAPP1_0 open System open System.Windows.Forms @@ -303,7 +303,7 @@ module RecursiveInterfaceObjectExpressions = begin end -#if !TESTS_AS_APP && !FX_PORTABLE_OR_NETSTANDARD +#if !TESTS_AS_APP && !NETCOREAPP1_0 module RecursiveInnerConstrainedGenerics = begin open System.Windows.Forms diff --git a/tests/fsharp/core/libtest/test.fsx b/tests/fsharp/core/libtest/test.fsx index 95f90948f64..f6c432f55dd 100644 --- a/tests/fsharp/core/libtest/test.fsx +++ b/tests/fsharp/core/libtest/test.fsx @@ -2227,7 +2227,7 @@ do check "generic format m" "-1y" (sprintf "%A" (-1y)) do check "generic format n" "-1s" (sprintf "%A" (-1s)) do check "generic format o" "-1" (sprintf "%A" (-1)) do check "generic format p" "-1L" (sprintf "%A" (-1L)) -#if !FX_PORTABLE_OR_NETSTANDARD +#if !NETCOREAPP1_0 // See FSHARP1.0:4797 // On NetFx4.0 and above we do not emit the 'I' suffix let bigintsuffix = if (System.Environment.Version.Major, System.Environment.Version.Minor) > (2,0) then "" else "I" @@ -2409,11 +2409,8 @@ module IEnumerableTests = begin do check "Seq.averageBy" (Seq.averageBy float [0..100]) 50. do check "Seq.min" (Seq.min [1; 4; 2; 5; 8; 4; 0; 3]) 0 do check "Seq.max" (Seq.max [1; 4; 2; 5; 8; 4; 0; 3]) 8 -#if !FSCORE_PORTABLE_OLD && !FSCORE_PORTABLE_NEW - // strings don't have enumerators on portable do check "Seq.minBy" (Seq.minBy int "this is a test") ' ' do check "Seq.maxBy" (Seq.maxBy int "this is a test") 't' -#endif // Test where the key includes null values do check "dict - option key" (dict [ (None,10); (Some 3, 220) ]).[None] 10 @@ -2719,7 +2716,7 @@ module SeqTestsOnEnumerableEnforcingDisposalAtEnd = begin do check "" numActiveEnumerators 0 do check "Seq.max" (Seq.max (countEnumeratorsAndCheckedDisposedAtMostOnce [1; 4; 2; 5; 8; 4; 0; 3])) 8 do check "" numActiveEnumerators 0 -#if !FX_PORTABLE_OR_NETSTANDARD +#if !NETCOREAPP1_0 // strings don't have enumerators in portable do check "Seq.minBy" (Seq.minBy int (countEnumeratorsAndCheckedDisposedAtMostOnce "this is a test")) ' ' do check "" numActiveEnumerators 0 @@ -3521,7 +3518,6 @@ module GenericComparisonAndEquality = begin [] type RecordTypeA<'T> = {f1 : string ; f2 : 'T} -#if !FSCORE_PORTABLE_OLD && !FSCORE_PORTABLE_NEW // IComparable let _ = @@ -3557,7 +3553,6 @@ module GenericComparisonAndEquality = begin check "d3wiojd32icr" (l1 = l2) true ; check "d3wiojd32icu" (l3 = l4) true -#endif // IEquatable let _ = @@ -3699,7 +3694,7 @@ module MiscIEnumerableTests = begin open System.Net open System.IO -#if !FX_PORTABLE_OR_NETSTANDARD +#if !NETCOREAPP1_0 /// generate the sequence of lines read off an internet connection let httpSeq (nm:string) = Seq.generate @@ -3871,7 +3866,7 @@ module FloatParseTests = begin do check "FloatParse.A" (to_bits (of_string "Infinity")) 0x7ff0000000000000L // 9218868437227405312L do check "FloatParse.B" (to_bits (of_string "-Infinity")) 0xfff0000000000000L // (-4503599627370496L) do check "FloatParse.C" (to_bits (of_string "NaN")) 0xfff8000000000000L // (-2251799813685248L) -#if !FX_PORTABLE_OR_NETSTANDARD +#if !NETCOREAPP1_0 do check "FloatParse.D" (to_bits (of_string "-NaN")) ( // http://en.wikipedia.org/wiki/NaN let bit64 = System.IntPtr.Size = 8 in if bit64 && System.Environment.Version.Major < 4 then @@ -4083,7 +4078,7 @@ module SetTests = begin let unionTest n (nx,ny) = let check (xs:'a Set) = -#if DEBUG && !FSCORE_PORTABLE_OLD && !FSCORE_PORTABLE_NEW +#if DEBUG test "vwnwer" (xs.CheckBalanceInvariant); #endif xs in @@ -4276,7 +4271,7 @@ do check "clwnwe91" 10m 10m do check "clwnwe92" 10m 10.000m do check "clwnwe93" 1000000000m 1000000000m do check "clwnwe94" (4294967296000000000m.ToString()) "4294967296000000000" -#if !FX_PORTABLE_OR_NETSTANDARD +#if !NETCOREAPP1_0 do check "clwnwe95" (10.000m.ToString(System.Globalization.CultureInfo.GetCultureInfo(1033).NumberFormat)) "10.000" // The actual output of a vanilla .ToString() depends on current culture UI. For this reason I am specifying the en-us culture. #endif do check "clwnwe96" (10m.ToString()) "10" @@ -4327,7 +4322,7 @@ do check "lkvcnwd09g" 2.0M (20.0M % 6.00M) do check "lkvcnwd09h" 20.0M (floor 20.300M) do check "lkvcnwd09j" 20.0 (floor 20.300) do check "lkvcnwd09k" 20.0f (floor 20.300f) -#if !FX_PORTABLE_OR_NETSTANDARD +#if !NETCOREAPP1_0 do check "lkvcnwd09l" 20.0M (round 20.300M) do check "lkvcnwd09z" 20.0M (round 20.500M) do check "lkvcnwd09x" 22.0M (round 21.500M) @@ -5569,7 +5564,7 @@ module bug122495 = let c = C( P = a.[0..1]) -#if !FX_PORTABLE_OR_NETSTANDARD +#if !NETCOREAPP1_0 (*--------------------------------------------------------------------------- !* Bug 33760: wrong codegen for params[] Action overload *--------------------------------------------------------------------------- *) diff --git a/tests/fsharp/core/longnames/test.fsx b/tests/fsharp/core/longnames/test.fsx index be3521edcc3..aa1579ef2b8 100644 --- a/tests/fsharp/core/longnames/test.fsx +++ b/tests/fsharp/core/longnames/test.fsx @@ -112,7 +112,7 @@ let v12 = let v13 = Microsoft.FSharp.Core.Some(1) -#if !FX_PORTABLE_OR_NETSTANDARD +#if !NETCOREAPP1_0 (* check lid setting bug *) open System.Diagnostics diff --git a/tests/fsharp/core/map/test.fsx b/tests/fsharp/core/map/test.fsx index 63f2930052a..984ab4d24e0 100644 --- a/tests/fsharp/core/map/test.fsx +++ b/tests/fsharp/core/map/test.fsx @@ -24,9 +24,16 @@ let test_eq_range n m x = done; for i = n to m do test "ew9wef" (Map.tryFind i x = Some (i * 100)); + test "ew9wef" (x.TryGetValue(i) = (true, (i * 100))); + let mutable res = 0 + test "ew9wef" (x.TryGetValue(i, &res) = true); + test "ew9wef" (res = (i * 100)); done; for i = m+1 to m+100 do test "ew9wef" (Map.tryFind i x = None); + test "ew9wef" (x.TryGetValue(i) = (false, 0)); + let mutable res = 0 + test "ew9wef" (x.TryGetValue(i,&res) = false); done; for i = m+1 to m+5 do test "ew9cwef" ((try Some(Map.find i x) with :? System.Collections.Generic.KeyNotFoundException -> None) = None); diff --git a/tests/fsharp/core/math/numbers/test.fsx b/tests/fsharp/core/math/numbers/test.fsx index ef7a24261af..3a198932cf3 100644 --- a/tests/fsharp/core/math/numbers/test.fsx +++ b/tests/fsharp/core/math/numbers/test.fsx @@ -3,7 +3,7 @@ module Core_math_numbers #endif -#if NETSTANDARD1_6 +#if NETCOREAPP1_0 open CoreClrUtilities #endif diff --git a/tests/fsharp/core/math/numbersVS2008/test.fsx b/tests/fsharp/core/math/numbersVS2008/test.fsx index 857098de77a..b7e288616d2 100644 --- a/tests/fsharp/core/math/numbersVS2008/test.fsx +++ b/tests/fsharp/core/math/numbersVS2008/test.fsx @@ -248,7 +248,7 @@ let negative64s = (-4611686018427387905L , -4611686018427387904L , -4611686018427387903L); (999L , -9223372036854775808L , -9223372036854775807L); (* MinValue is -2^63 *) (999L , 999L , 999L)] -#if !FX_PORTABLE_OR_NETSTANDARD +#if !NETCOREAPP1_0 // Regression 3481: ToInt32 let triple k n project = let x = k * BigInteger.Pow(2I,n) in project (x - 1I),project x,project (x + 1I) diff --git a/tests/fsharp/core/measures/test.fsx b/tests/fsharp/core/measures/test.fsx index 3ab02fc80cc..9425bb52cdc 100644 --- a/tests/fsharp/core/measures/test.fsx +++ b/tests/fsharp/core/measures/test.fsx @@ -123,7 +123,7 @@ module FLOAT = let x23p = sinh (4.4<_>) let x23r = tan (4.4<_>) let x23s = tanh (4.4<_>) -#if !FX_PORTABLE_OR_NETSTANDARD +#if !NETCOREAPP1_0 let x23t = truncate (4.5<_>) #endif // check the types and values! @@ -313,7 +313,7 @@ module DECIMAL = let x1d : decimal = ceil 4.4M let x1h : decimal = floor 4.4M let x1l : decimal = pown 4.4M 3 -#if !FX_PORTABLE_OR_NETSTANDARD +#if !NETCOREAPP1_0 let x1m : decimal = round 4.4M #endif let x1n : int = sign 4.4M @@ -499,14 +499,12 @@ module MembersTest = let s = 2.0f let d = 2.0M -#if !FSCORE_PORTABLE_OLD && !FSCORE_PORTABLE_NEW let tmpCulture = System.Threading.Thread.CurrentThread.CurrentCulture System.Threading.Thread.CurrentThread.CurrentCulture <- System.Globalization.CultureInfo("en-US") test "f" (f.ToString().Equals("2")) test "s" (s.ToString().Equals("2")) test "d" (d.ToString().Equals("2.0")) System.Threading.Thread.CurrentThread.CurrentCulture <- tmpCulture -#endif let fc = (f :> System.IComparable>).CompareTo(f+f) let sc = (s :> System.IComparable>).CompareTo(s+s) @@ -518,7 +516,7 @@ module MembersTest = let f1 = (f :> System.IFormattable) let f2 = (f :> System.IComparable) let f3 = (f :> System.IEquatable>) -#if !FX_PORTABLE_OR_NETSTANDARD +#if !NETCOREAPP1_0 let f4 = (f :> System.IConvertible) #endif @@ -551,7 +549,7 @@ module WrappedFloatTypeTest = static member Sin (c1:C<1>) = C<1>(sin c1.V) static member Sinh (c1:C<1>) = C<1>(sinh c1.V) static member Tanh (c1:C<1>) = C<1>(tan c1.V) -#if !FX_PORTABLE_OR_NETSTANDARD +#if !NETCOREAPP1_0 static member Truncate (c1:C<1>) = C<1>(truncate c1.V) #endif static member Pow (c1:C<1>,c2:C<1>) = C<1>( c1.V ** c2.V) @@ -599,7 +597,7 @@ module WrappedFloatTypeTest = let c26 = sin (C<1>(0.5)) let c27 = sinh (C<1>(0.5)) let c28 = tanh (C<1>(0.5)) -#if !FX_PORTABLE_OR_NETSTANDARD +#if !NETCOREAPP1_0 let c29 = truncate (C<1>(0.5)) #endif let c30 = C<1>(0.5) ** C<1>(2.0) diff --git a/tests/fsharp/core/members/absil.fsi b/tests/fsharp/core/members/absil.fsi index ed03372264d..02c730d0d86 100644 --- a/tests/fsharp/core/members/absil.fsi +++ b/tests/fsharp/core/members/absil.fsi @@ -274,7 +274,7 @@ open System member FormalCallsig: CallSig member ActualReturnType: Type member ActualArgTypes: List - member ActualParent: TypeRef + member DeclaringEntity: TypeRef member ActualCallsig: CallSig member GenericArity: int diff --git a/tests/fsharp/core/members/basics-hw/test.fsx b/tests/fsharp/core/members/basics-hw/test.fsx index 2b807659d9a..3bb6859f0d1 100644 --- a/tests/fsharp/core/members/basics-hw/test.fsx +++ b/tests/fsharp/core/members/basics-hw/test.fsx @@ -58,7 +58,7 @@ test "fweoew093" ((f(1)).b = 2) open System open System.Collections -#if !FX_PORTABLE_OR_NETSTANDARD +#if !NETCOREAPP1_0 open System.Windows.Forms #endif @@ -66,7 +66,7 @@ open System.Windows.Forms // Some simple object-expression tests let x0 = { new System.Object() with member __.GetHashCode() = 3 } -#if !FX_PORTABLE_OR_NETSTANDARD +#if !NETCOREAPP1_0 let x1 = { new System.Windows.Forms.Form() with member __.GetHashCode() = 3 } #endif @@ -981,7 +981,7 @@ let [] button () = 1 // Test we can use base calls -#if !FX_PORTABLE_OR_NETSTANDARD +#if !NETCOREAPP1_0 open System.Windows.Forms type MyCanvas2 = @@ -1781,14 +1781,14 @@ module DefaultConstructorConstraints = begin let x1 = (f1() : obj) let x2 = (f1() : int) let x3 = (f1() : DateTime) -#if !FX_PORTABLE_OR_NETSTANDARD +#if !NETCOREAPP1_0 let x4 = (f1() : System.Windows.Forms.Form) #endif let f2 () = f1() let y1 = (f2() : obj) let y2 = (f2() : int) let y3 = (f2() : DateTime) -#if !FX_PORTABLE_OR_NETSTANDARD +#if !NETCOREAPP1_0 let y4 = (f2() : System.Windows.Forms.Form) #endif @@ -2031,7 +2031,7 @@ module T1 = Vector2D(1.0,1.0) = Vector2D(1.0,1.0) -#if !FX_PORTABLE_OR_NETSTANDARD +#if !NETCOREAPP1_0 module Ex5 = open System.Drawing type Label(?text,?font) = @@ -5584,7 +5584,7 @@ module Devdiv2_Bug_5385 = g "1" |> ignore; // note, use of non-generic 'g' within a generic, generalized memoized function 2 - and g : string -> int = memoize f // note, computed function value using generic f at an instance + and g : string -> int = memoize f // note, computed function value using generic �f� at an instance g "1" let res = test3e() diff --git a/tests/fsharp/core/members/basics/test.fs b/tests/fsharp/core/members/basics/test.fs index 5066bdf6ad0..27c9e6c3a40 100644 --- a/tests/fsharp/core/members/basics/test.fs +++ b/tests/fsharp/core/members/basics/test.fs @@ -293,7 +293,7 @@ module RecordTypeTest = begin with // properties override x.ToString() = x.instanceField - member x.InstanceProperty = x.instanceField^".InstanceProperty" + member x.InstanceProperty = x.instanceField + ".InstanceProperty" member x.RecursiveInstance = x.recursiveInstance member x.RecursiveInstanceMethod() = x.recursiveInstance member x.MutableInstanceProperty @@ -342,7 +342,7 @@ module RecordTypeTest = begin static member StaticMethod((s1:string),(s2:string)) = Printf.sprintf "AbstractType.StaticMethod(%s,%s)" s1 s2 // private versions of the above - member x.PrivateInstanceProperty = x.instanceField^".InstanceProperty" + member x.PrivateInstanceProperty = x.instanceField + ".InstanceProperty" member x.PrivateMutableInstanceProperty with get() = x.mutableInstanceField and set(v:string) = x.mutableInstanceField <- v diff --git a/tests/fsharp/core/members/incremental-hw/test.fsx b/tests/fsharp/core/members/incremental-hw/test.fsx index d65718a15fc..8454fd186a7 100644 --- a/tests/fsharp/core/members/incremental-hw/test.fsx +++ b/tests/fsharp/core/members/incremental-hw/test.fsx @@ -227,7 +227,7 @@ module WireVariations = //! Area variations -#if !FX_PORTABLE_OR_NETSTANDARD +#if !NETCOREAPP1_0 module AreaVariations = (* Accepted *) open System.Drawing @@ -404,7 +404,7 @@ module ScalaPersonExample = //! Forms -#if !FX_PORTABLE_OR_NETSTANDARD +#if !NETCOREAPP1_0 module Forms1 = open System.Drawing open System.Windows.Forms diff --git a/tests/fsharp/core/members/incremental/test.fsx b/tests/fsharp/core/members/incremental/test.fsx index bb27690f288..03076c34232 100644 --- a/tests/fsharp/core/members/incremental/test.fsx +++ b/tests/fsharp/core/members/incremental/test.fsx @@ -225,7 +225,7 @@ end //! Area variations -#if !MONO && !FX_PORTABLE_OR_NETSTANDARD +#if !MONO && !NETCOREAPP1_0 module AreaVariations = begin (* Accepted *) open System.Drawing @@ -402,7 +402,7 @@ end //! Forms -#if !MONO && !FX_PORTABLE_OR_NETSTANDARD +#if !MONO && !NETCOREAPP1_0 module Forms1 = begin open System.Drawing open System.Windows.Forms diff --git a/tests/fsharp/core/members/ops-mutrec/test.fs b/tests/fsharp/core/members/ops-mutrec/test.fs index 1fa82e5c373..a6605a5dbae 100644 --- a/tests/fsharp/core/members/ops-mutrec/test.fs +++ b/tests/fsharp/core/members/ops-mutrec/test.fs @@ -121,7 +121,7 @@ module OverloadSamples = type 'a GenericVector with - // Nb. For an operator assocaited with a generic type + // Nb. For an operator associated with a generic type // the the type parameters involved in the operator's definition must be the same // as the type parameters of the enclosing class. static member (+) ((x : 'a GenericVector),(y : 'a GenericVector)) = add x y diff --git a/tests/fsharp/core/members/ops/test.fsx b/tests/fsharp/core/members/ops/test.fsx index d4756db4233..677b7f60f88 100644 --- a/tests/fsharp/core/members/ops/test.fsx +++ b/tests/fsharp/core/members/ops/test.fsx @@ -126,7 +126,7 @@ module OverloadSamples = type 'a GenericVector with - // Nb. For an operator assocaited with a generic type + // Nb. For an operator associated with a generic type // the the type parameters involved in the operator's definition must be the same // as the type parameters of the enclosing class. static member (+) ((x : 'a GenericVector),(y : 'a GenericVector)) = add x y diff --git a/tests/fsharp/core/patterns/test.fsx b/tests/fsharp/core/patterns/test.fsx index 3c3152b62df..4b72133ee02 100644 --- a/tests/fsharp/core/patterns/test.fsx +++ b/tests/fsharp/core/patterns/test.fsx @@ -685,7 +685,7 @@ module Combinator_Examples = begin end -#if !FX_PORTABLE_OR_NETSTANDARD +#if !NETCOREAPP1_0 module XmlPattern_Examples = begin @@ -813,7 +813,7 @@ module RandomTEst = type IEvenCooler = inherit ICool -#if !FX_PORTABLE_OR_NETSTANDARD +#if !NETCOREAPP1_0 module RandomCodeFragment = open System @@ -1311,6 +1311,41 @@ module StructUnionMarshalingBug = let buffer = Marshal.AllocHGlobal(64) // HACK: just assumed a much larger size Marshal.StructureToPtr(msg1, buffer, false) +module MatchBangSimple = + type CardSuit = | Hearts | Diamonds | Clubs | Spades + let fetchSuit () = async { + // do something in order to not allow optimizing things away + Async.Sleep 1 + return Some Hearts } + + async { + match! fetchSuit () with + | Some Hearts -> printfn "hearts" + | Some Diamonds | Some Clubs | Some Spades | None -> report_failure "match! matched the wrong case" } + |> Async.RunSynchronously + +module MatchBangActivePattern = + type CardSuit = | Hearts | Diamonds | Clubs | Spades + + let (|RedSuit|BlackSuit|) suit = + match suit with + | Hearts | Diamonds -> RedSuit + | Clubs | Spades -> BlackSuit + + let fetchSuit () = async { + Async.Sleep 1 + return Hearts } + + async { + // make sure other syntactic elements nearby parse fine + let! x = async.Return 42 + match! fetchSuit () with + | RedSuit as suit -> printfn "%A suit is red" suit + | BlackSuit as suit -> printfn "%A suit is black" suit } + |> Async.RunSynchronously + + + (* check for failure else sign off "ok" *) diff --git a/tests/fsharp/core/printing/testLoadFile2.fsx b/tests/fsharp/core/printing/testLoadFile2.fsx index 347cad242cf..f4b3ba260f4 100644 --- a/tests/fsharp/core/printing/testLoadFile2.fsx +++ b/tests/fsharp/core/printing/testLoadFile2.fsx @@ -1,4 +1,4 @@ -#if NETSTANDARD1_6 +#if NETCOREAPP1_0 open CoreClrUtilities #endif diff --git a/tests/fsharp/core/queriesLeafExpressionConvert/test.fsx b/tests/fsharp/core/queriesLeafExpressionConvert/test.fsx index 2a0cec078b7..166d5255db3 100644 --- a/tests/fsharp/core/queriesLeafExpressionConvert/test.fsx +++ b/tests/fsharp/core/queriesLeafExpressionConvert/test.fsx @@ -565,7 +565,7 @@ module LeafExpressionEvaluationTests = checkEval "vrewoinrv09c" (<@ ceil 2.0 @>) (ceil 2.0) checkEval "vrewoinrv09v" (<@ sqrt 2.0 @>) (sqrt 2.0) checkEval "vrewoinrv09b" (<@ sign 2.0 @>) (sign 2.0) -#if !FX_PORTABLE_OR_NETSTANDARD +#if !NETCOREAPP1_0 checkEval "vrewoinrv09n" (<@ truncate 2.3 @>) (truncate 2.3) #endif checkEval "vrewoinrv09m" (<@ floor 2.3 @>) (floor 2.3) @@ -585,7 +585,7 @@ module LeafExpressionEvaluationTests = checkEval "vrewoinrv09D" (<@ ceil 2.0f @>) (ceil 2.0f) checkEval "vrewoinrv09F" (<@ sqrt 2.0f @>) (sqrt 2.0f) checkEval "vrewoinrv09G" (<@ sign 2.0f @>) (sign 2.0f) -#if !FX_PORTABLE_OR_NETSTANDARD +#if !NETCOREAPP1_0 checkEval "vrewoinrv09H" (<@ truncate 2.3f @>) (truncate 2.3f) #endif checkEval "vrewoinrv09J" (<@ floor 2.3f @>) (floor 2.3f) @@ -597,7 +597,7 @@ module LeafExpressionEvaluationTests = checkEval "vrewoinrv09V" (<@ ceil 2.0M @>) (ceil 2.0M) checkEval "vrewoinrv09B" (<@ sign 2.0M @>) (sign 2.0M) -#if !FX_PORTABLE_OR_NETSTANDARD +#if !NETCOREAPP1_0 checkEval "vrewoinrv09N" (<@ truncate 2.3M @>) (truncate 2.3M) #endif checkEval "vrewoinrv09M" (<@ floor 2.3M @>) (floor 2.3M) @@ -617,7 +617,7 @@ module LeafExpressionEvaluationTests = checkEval "vrewoinrv09SS" (<@ [ 0UL .. 10UL ] @>) [ 0UL .. 10UL ] //Comment this testcase under portable due to bug 500323:[FSharp] portable library can't run "round" function -#if !FX_PORTABLE_OR_NETSTANDARD +#if !NETCOREAPP1_0 // Round dynamic dispatch on Decimal checkEval "vrewoinrv09FF" (<@ round 2.3M @>) (round 2.3M) #endif diff --git a/tests/fsharp/core/quotes/test.fsx b/tests/fsharp/core/quotes/test.fsx index 513f95f7859..52ef066ea7e 100644 --- a/tests/fsharp/core/quotes/test.fsx +++ b/tests/fsharp/core/quotes/test.fsx @@ -1,10 +1,10 @@ -// #Conformance #Quotations #Interop #Classes #ObjectConstructors #Attributes #Reflection +// #Conformance #Quotations #Interop #Classes #ObjectConstructors #Attributes #Reflection #ComputationExpression #if TESTS_AS_APP module Core_quotes #endif #light -#if !TESTS_AS_APP && !FX_PORTABLE_OR_NETSTANDARD +#if !TESTS_AS_APP && !NETCOREAPP1_0 #r "cslib.dll" #endif @@ -352,7 +352,7 @@ module TypedTest = begin test "check PropertyGet (static)" ((<@ System.DateTime.Now @> |> (function PropertyGet(None,_,[]) -> true | _ -> false))) test "check PropertyGet (instance)" ((<@ ("1").Length @> |> (function PropertyGet(Some(String("1")),_,[]) -> true | _ -> false))) -#if !FX_PORTABLE_OR_NETSTANDARD +#if !NETCOREAPP1_0 test "check PropertySet (static)" ((<@ System.Environment.ExitCode <- 1 @> |> (function PropertySet(None,_,[],Int32(1)) -> true | _ -> false))) #endif test "check PropertySet (instance)" ((<@ ("1").Length @> |> (function PropertyGet(Some(String("1")),_,[]) -> true | _ -> false))) @@ -543,7 +543,7 @@ module TypedTest = begin | _ -> false end -#if !FSHARP_CORE_31 && !TESTS_AS_APP && !FX_PORTABLE_OR_NETSTANDARD +#if !FSHARP_CORE_31 && !TESTS_AS_APP && !NETCOREAPP1_0 test "check accesses to readonly fields in ReflectedDefinitions" begin let c1 = Class1("a") @@ -1681,7 +1681,7 @@ module QuotationConstructionTests = check "vcknwwe066" (try let _ = Expr.PropertyGet(getof <@@ System.DateTime.Now @@>,[ <@@ 1 @@> ]) in false with :? ArgumentException -> true) true check "vcknwwe077" (Expr.PropertyGet(<@@ "3" @@>, getof <@@ "1".Length @@>)) <@@ "3".Length @@> check "vcknwwe088" (Expr.PropertyGet(<@@ "3" @@>, getof <@@ "1".Length @@>,[ ])) <@@ "3".Length @@> -#if !TESTS_AS_APP && !FX_PORTABLE_OR_NETSTANDARD +#if !TESTS_AS_APP && !NETCOREAPP1_0 check "vcknwwe099" (Expr.PropertySet(<@@ (new System.Windows.Forms.Form()) @@>, setof <@@ (new System.Windows.Forms.Form()).Text <- "2" @@>, <@@ "3" @@> )) <@@ (new System.Windows.Forms.Form()).Text <- "3" @@> #endif check "vcknwwe099" (Expr.PropertySet(<@@ (new Foo()) @@>, setof <@@ (new Foo()).[3] <- 1 @@>, <@@ 2 @@> , [ <@@ 3 @@> ] )) <@@ (new Foo()).[3] <- 2 @@> @@ -2303,7 +2303,7 @@ module ReflectedDefinitionOnTypesWithImplicitCodeGen = module M = // This type has an implicit IComparable implementation, it is not accessible as a reflected definition type R = { x:int; y:string; z:System.DateTime } -#if FX_PORTABLE_OR_NETSTANDARD +#if NETCOREAPP1_0 for m in typeof.GetMethods() do #else for m in typeof.GetMethods(System.Reflection.BindingFlags.DeclaredOnly) do @@ -2337,7 +2337,7 @@ module ReflectedDefinitionOnTypesWithImplicitCodeGen = #endif check "celnwer35" (Quotations.Expr.TryGetReflectedDefinition(m).IsNone) true -#if !FX_PORTABLE_OR_NETSTANDARD +#if !NETCOREAPP1_0 module BasicUsingTEsts = let q1() = let a = ResizeArray<_>() @@ -3152,6 +3152,30 @@ module TestFuncNoArgs = check "clew0mmlvew" (foo.ToString()) "() => new SomeType()" testFunc2() + +module TestMatchBang = + let myAsync = async { + do! Async.Sleep 1 + return Some 42 } + + /// Unpacks code quotations containing computation expressions (CE) + let (|CEDelay|CEBind|Expr|) expr = + match expr with + | Application (Lambda (_, Call (_, mDelay, [Lambda (_, innerExpr)])), _) when mDelay.Name = "Delay" -> CEDelay innerExpr + | Call (_, mBind, [_; Lambda (_, innerExpr)]) when mBind.Name = "Bind" -> CEBind innerExpr + | _ -> Expr expr + + let testSimpleMatchBang() = + let quot1 = <@ async { match! myAsync with | Some (x: int) -> () | None -> () } @> + check "matchbangquot1" + (match quot1 with + | CEDelay(CEBind(IfThenElse expr)) -> Ok () + | CEDelay(CEBind(expr)) -> Error "if statement (representing `match`) is missing" + | CEDelay(expr) -> Error "Bind is incorrect" + | expr -> Error "Delay is incorrect") + (Ok ()) + + testSimpleMatchBang() #if !FX_RESHAPED_REFLECTION diff --git a/tests/fsharp/core/reflect/test2.fs b/tests/fsharp/core/reflect/test2.fs index 6b299c21b0e..9faf3bf07ca 100644 --- a/tests/fsharp/core/reflect/test2.fs +++ b/tests/fsharp/core/reflect/test2.fs @@ -30,7 +30,7 @@ module NewTests = let (|String|_|) (v:obj) = match v with :? string as s -> Some(s) | _ -> None let (|Int|_|) (v:obj) = match v with :? int as s -> Some(s) | _ -> None let showAll = -#if NETSTANDARD1_6 +#if NETCOREAPP1_0 true #else System.Reflection.BindingFlags.Public ||| System.Reflection.BindingFlags.NonPublic @@ -300,6 +300,28 @@ module TEst = let _ = printany printany (* =) *) +module DynamicCall = + open System + open System.Reflection + + module Test = + type Marker = class end + + let inline call (a : ^a) = + (^a : (member Stuff : Unit -> Unit) a) + + + let genericCallMethod = typeof.DeclaringType.GetMethod "call" + let callMethod = genericCallMethod.MakeGenericMethod [| typeof |] + + try + callMethod.Invoke (null, [| Object () |]) |> ignore + failwith "expected an exception" + with :? TargetInvocationException as ex -> + // The test should cause a NotSupportedException with the Message: + // "Dynamic invocation of %s is not supported" + // %s Will be Stuff Because thats the member that is not supported. + test "wcnr0vj" (ex.InnerException.Message.Contains("Stuff") && ex.InnerException.GetType() = typeof) #if TESTS_AS_APP let RUN() = !failures diff --git a/tests/fsharp/core/refnormalization/.gitignore b/tests/fsharp/core/refnormalization/.gitignore new file mode 100644 index 00000000000..8caa3419d23 --- /dev/null +++ b/tests/fsharp/core/refnormalization/.gitignore @@ -0,0 +1,2 @@ +version1/ +version2/ diff --git a/tests/fsharp/core/refnormalization/AscendentAssembly.fs b/tests/fsharp/core/refnormalization/AscendentAssembly.fs new file mode 100644 index 00000000000..8fa5173ce90 --- /dev/null +++ b/tests/fsharp/core/refnormalization/AscendentAssembly.fs @@ -0,0 +1,6 @@ +namespace AscendentAssembly + +module Ascendent = + + let hello () = + DependentAssembly.Say.hello "Ascendent" diff --git a/tests/fsharp/core/refnormalization/DependentAssembly.fs b/tests/fsharp/core/refnormalization/DependentAssembly.fs new file mode 100644 index 00000000000..20b28d5a35b --- /dev/null +++ b/tests/fsharp/core/refnormalization/DependentAssembly.fs @@ -0,0 +1,5 @@ +namespace DependentAssembly + +module Say = + + let hello name = printfn "Hello %s" name diff --git a/tests/fsharp/core/refnormalization/keyfile.snk b/tests/fsharp/core/refnormalization/keyfile.snk new file mode 100644 index 00000000000..a4f0542fbf3 Binary files /dev/null and b/tests/fsharp/core/refnormalization/keyfile.snk differ diff --git a/tests/fsharp/core/refnormalization/test.fs b/tests/fsharp/core/refnormalization/test.fs new file mode 100644 index 00000000000..40c34e96927 --- /dev/null +++ b/tests/fsharp/core/refnormalization/test.fs @@ -0,0 +1,29 @@ +open System.Reflection +open System.IO + +let _a () = + DependentAssembly.Say.hello "hello" + +let _b () = + AscendentAssembly.Ascendent.hello() + +type localType = class end +[] +let main args = + + let references = typeof.Assembly.GetReferencedAssemblies() + + let versions = + [| for reference in references do + if reference.Name = "DependentAssembly" then yield "DependentAssembly-" + reference.Version.ToString() + if reference.Name = "AscendentAssembly" then yield "AscendentAssembly-" + reference.Version.ToString() + |] + + if (Seq.compareWith (fun a v -> if a <> v then 1 else 0) args versions) <> 0 then + printfn "References don't match" + printfn "Expected: %A " args + printfn "Actual: %A " versions + 1 + else + File.WriteAllText("test.ok", "ok") + 0 diff --git a/tests/fsharp/core/samename/tempet.fsproj b/tests/fsharp/core/samename/tempet.fsproj index 66280fa2b63..d6ac10eab9b 100644 --- a/tests/fsharp/core/samename/tempet.fsproj +++ b/tests/fsharp/core/samename/tempet.fsproj @@ -1,4 +1,4 @@ - + netstandard1.6 @@ -15,9 +15,4 @@ - - - - - diff --git a/tests/fsharp/core/seq/test.fsx b/tests/fsharp/core/seq/test.fsx index b1a59d8b58c..14f71eb2940 100644 --- a/tests/fsharp/core/seq/test.fsx +++ b/tests/fsharp/core/seq/test.fsx @@ -712,9 +712,24 @@ module InfiniteSequenceExpressionsExecuteWithFiniteResources = yield factorial x ] - for f in factorials do printf "%i" f + check "vlklmkkl" factorials [1;1;2;6;24;120;720;5040;40320;362880;3628800] TestRecFuncInSeq() +module TestCollectOnStructSeq = + open System + + [] + type S = + interface System.Collections.Generic.IEnumerable with + member x.GetEnumerator() = (seq { yield 1; yield 2}).GetEnumerator() + interface System.Collections.IEnumerable with + member x.GetEnumerator() = (seq { yield 1; yield 2} :> System.Collections.IEnumerable).GetEnumerator() + + let iterate (x: S) = + seq { yield! Seq.collect (fun _ -> x) [1] } + + check "ccekecnwe" (iterate (Unchecked.defaultof) |> Seq.length) 2 + (*--------------------------------------------------------------------------- !* wrap up *--------------------------------------------------------------------------- *) diff --git a/tests/fsharp/core/span/test.bsl b/tests/fsharp/core/span/test.bsl new file mode 100644 index 00000000000..6b25d0d6af0 --- /dev/null +++ b/tests/fsharp/core/span/test.bsl @@ -0,0 +1,16 @@ + +test.fsx(303,46,303,86): typecheck error FS3234: The function or method call cannot be used at this point, because one argument that is a byref of a non-stack-local Span or IsByRefLike type is used with another argument that is a stack-local Span or IsByRefLike type. This is to ensure the address of the local value does not escape its scope. + +test.fsx(306,13,306,86): typecheck error FS3230: This value can't be assigned because the target 'param1' may refer to non-stack-local memory, while the expression being assigned is assessed to potentially refer to stack-local memory. This is to help prevent pointers to stack-bound memory escaping their scope. + +test.fsx(309,13,309,62): typecheck error FS3230: This value can't be assigned because the target 'param1' may refer to non-stack-local memory, while the expression being assigned is assessed to potentially refer to stack-local memory. This is to help prevent pointers to stack-bound memory escaping their scope. + +test.fsx(348,13,348,57): typecheck error FS3230: This value can't be assigned because the target 'addr' may refer to non-stack-local memory, while the expression being assigned is assessed to potentially refer to stack-local memory. This is to help prevent pointers to stack-bound memory escaping their scope. + +test.fsx(351,13,351,38): typecheck error FS3230: This value can't be assigned because the target 'param1' may refer to non-stack-local memory, while the expression being assigned is assessed to potentially refer to stack-local memory. This is to help prevent pointers to stack-bound memory escaping their scope. + +test.fsx(354,14,354,29): typecheck error FS3209: The address of the variable 'stackReferring3' or a related expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + +test.fsx(376,18,376,19): typecheck error FS3209: The address of the variable 'x' or a related expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + +test.fsx(380,18,380,33): typecheck error FS3228: The address of a value returned from the expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope. diff --git a/tests/fsharp/core/span/test.fsx b/tests/fsharp/core/span/test.fsx new file mode 100644 index 00000000000..81ac6b3c7a3 --- /dev/null +++ b/tests/fsharp/core/span/test.fsx @@ -0,0 +1,402 @@ +#r @"..\..\..\..\packages\System.Memory.4.5.0-rc1\lib\netstandard2.0\System.Memory.dll" +#r @"..\..\..\..\packages\NETStandard.Library.NETFramework.2.0.0-preview2-25405-01\build\net461\ref\netstandard.dll" + +#nowarn "9" +#nowarn "51" + +namespace System.Runtime.CompilerServices + + open System + open System.Runtime.CompilerServices + open System.Runtime.InteropServices + [] + [] + type IsReadOnlyAttribute() = + inherit System.Attribute() + + [] + [] + type IsByRefLikeAttribute() = + inherit System.Attribute() + +namespace Tests + open System + open System.Runtime.CompilerServices + open System.Runtime.InteropServices + open FSharp.NativeInterop + + [] + module Helpers = + let failures = ref false + let report_failure (s) = + stderr.WriteLine ("NO: " + s); + failures := true + let test s b = if b then () else report_failure(s) + + (* TEST SUITE FOR Int32 *) + + let out r (s:string) = r := !r @ [s] + + let check s actual expected = + if actual = expected then printfn "%s: OK" s + else report_failure (sprintf "%s: FAILED, expected %A, got %A" s expected actual) + + let check2 s expected actual = check s actual expected + + + [] + type ReadOnlyStruct(count1: int, count2: int) = + member x.Count1 = count1 + member x.Count2 = count2 + + [] + type ByRefLikeStruct(count1: int, count2: int) = + member x.Count1 = count1 + member x.Count2 = count2 + + module TypeRefTests = + + let f1 (x: ByRefLikeStruct) = () + let f2 (x: ReadOnlyStruct) = x.Count1 + let f3 (x: ReadOnlyStruct) = x + let f4 (x: Span) = () + let f5 (x: Memory) = () + let f6 (x: ReadOnlySpan) = () + let f7 (x: ReadOnlyMemory) = () + + module Sample1 = + open FSharp.NativeInterop + open System.Runtime.InteropServices + // this method does not care what kind of memory it works on + let SafeSum(bytes: Span) = + let mutable sum = 0 + for i in 0 .. bytes.Length - 1 do + sum <- sum + int bytes.[i] + sum + + let SafeSum2(bytes: Span) = + let mutable sum = 0 + for i in 0 .. bytes.Length - 1 do + let byteAddr = &bytes.[i] + sum <- sum + int byteAddr + sum + + let SafeSum3(bytes: Memory) = + let bytes = bytes.Span + let mutable sum = 0 + for i in 0 .. bytes.Length - 1 do + let byteAddr = &bytes.[i] + sum <- sum + int byteAddr + sum + + let SafeSum4(bytes: Memory) = + let bytes = bytes.Span + let mutable sum = 0 + for i in 0 .. bytes.Length - 1 do + sum <- sum + int bytes.[i] + sum + + let SafeSum5(bytes: ReadOnlySpan) = + let mutable sum = 0 + for i in 0 .. bytes.Length - 1 do + sum <- sum + int bytes.[i] + sum + + let SafeSum6(bytes: ReadOnlySpan) = + let mutable sum = 0 + for i in 0 .. bytes.Length - 1 do + let byte = bytes.[i] + sum <- sum + int byte + sum + + let SafeSum7(bytes: ReadOnlyMemory) = + let bytes = bytes.Span + let mutable sum = 0 + for i in 0 .. bytes.Length - 1 do + let byte = bytes.[i] + sum <- sum + int byte + sum + + let SafeSum8(bytes: ReadOnlyMemory) = + let bytes = bytes.Span + let mutable sum = 0 + for i in 0 .. bytes.Length - 1 do + sum <- sum + int bytes.[i] + sum + + + let f6() = + // managed memory + let arrayMemory = Array.zeroCreate(100) + let arraySpan = new Span(arrayMemory) + for i in 0 .. 99 do arrayMemory.[i] <- byte i + SafeSum(arraySpan)|> printfn "res = %d" + + // native memory + let nativeMemory = Marshal.AllocHGlobal(100) + let nativeSpan = new Span(nativeMemory.ToPointer(), 100) + for i in 0 .. 99 do Marshal.WriteByte(nativeMemory, i, byte i) + SafeSum(nativeSpan)|> printfn "res = %d" + Marshal.FreeHGlobal(nativeMemory) + + // stack memory + let mem = NativePtr.stackalloc(100) + let mem2 = mem |> NativePtr.toVoidPtr + for i in 0 .. 99 do NativePtr.set mem i (byte i) + let stackSpan = Span(mem2, 100) + SafeSum(stackSpan) |> printfn "res = %d" + f6() + + + + [] + type AllowedEvilStruct = + [] + val mutable v : int + member x.Replace(y:AllowedEvilStruct) = x <- y + + module SubsumptionOnMember = + type Doot() = class end + + [] + type GiantDad() = + + let test (data: Span) (doot: Doot) = + () + + member __.Test(data: Span) = + test data Unchecked.defaultof + + module AssignToByrefReturn = + type C() = + static let mutable v = System.DateTime.Now + static member M() = &v + + let F1() = + C.M() <- System.DateTime.Now + + module AssignToSpanItem = + let F2() = + let data = Span.Empty + data.[0] <- 1uy + + module AssignToSpanItemGeneric = + let F2<'T>() = + let data = Span<'T>.Empty + data.[0] <- Unchecked.defaultof<'T> + + module CheckReturnOfSpan1 = + let test () = + let s = Span.Empty + s + + module CheckReturnOfSpan2 = + + type Jopac() = + + member this.Create() = + let mutable x = 1 + this.Create(&x) + + member __.Create(x: byref) = + Span.Empty + + module CheckReturnOfSpan3 = + type Jopac_NotCompile_WhichIsMightBeIncorrect() = + + member __.Create(x: byref) = + Span.Empty + + member this.Create() = + let mutable x = 1 + let x = this.Create(&x) + x + + member this.CreateAgain() = + let mutable x = 1 + this.Create(&x) + + module ByRefSpanParam = + type C() = + static member M(x: byref>) = x.[0] <- 5 + + let Test() = + let mutable res = 9 + let mutable span = Span(NativePtr.toVoidPtr &&res,1) + let v = C.M(&span) + check "cwvereweoiwekl4" res 5 + + let minfo = typeof.GetMethod("M") + check "cwnoreeker1" (minfo.GetParameters().[0].IsIn) false + check "cwnoreeker2" (minfo.GetParameters().[0].IsOut) false + check "cwnoreeker3" (minfo.ReturnParameter.IsIn) false + check "cwnoreeker4" (minfo.ReturnParameter.IsOut) false + + Test() + + module SpanByRefReturn = + type C() = + static member M(x: byref>) = x.[0] <- x.[0] + 1; &x + + let Test() = + let mutable res = 9 + let mutable span = Span(NativePtr.toVoidPtr &&res,1) + let v = &C.M(&span) + check "cwvereweoiwvw4" v.[0] 10 + + let minfo = typeof.GetMethod("M") + check "cwnoreeker6d" (minfo.GetParameters().[0].GetRequiredCustomModifiers().Length) 0 + check "cwnoreekerr" (minfo.ReturnParameter.IsIn) false + check "cwnoreekert" (minfo.ReturnParameter.IsOut) false + + Test() + + + module SpanReturn = + type C() = + static member M(x: byref>) = x.[0] <- x.[0] + 1; x + + let Test() = + let mutable res = 9 + let mutable span = Span(NativePtr.toVoidPtr &&res,1) + let v = C.M(&span) + check "cwvereweoiwvw4" v.[0] 10 + + let minfo = typeof.GetMethod("M") + check "cwnoreeker6d" (minfo.GetParameters().[0].GetRequiredCustomModifiers().Length) 0 + check "cwnoreekerr" (minfo.ReturnParameter.IsIn) false + check "cwnoreekert" (minfo.ReturnParameter.IsOut) false + + Test() + + module SpanSafetyTests0 = + + type SpanLikeType = Span + + let m1 (x: byref>) (y: Span) = + // this is all valid, unconcerned with stack-referring stuff + let local = SpanLikeType() + x <- local + x + + module SpanSafetyTests1 = + type SpanLikeType = Span + let m1 (x: byref>) (y: Span) = + // this is all valid, unconcerned with stack-referring stuff + let local = SpanLikeType() + x <- local + x + let test1 (param1: byref>) (param2: Span) = + let mutable stackReferringBecauseMutable1 = Span() + + //let stackReferringBecauseMutable1 = Span(NativePtr.toVoidPtr(&&x), 1) + //let stackReferringBecauseMutable1 = Span(NativePtr.toVoidPtr(NativePtr.ofByRef(&&x)), 1) + //let stackReferring1 = Span(NativePtr.toVoidPtr(NativePtr.stackalloc< byte>(100), 1) + + let mutable stackReferringBecauseMutable2 = Span() + + // this is allowed + stackReferringBecauseMutable2 <- m1 &stackReferringBecauseMutable2 stackReferringBecauseMutable1 + +#if NEGATIVE + // this is NOT allowed + stackReferringBecauseMutable2 <- m1 ¶m1 stackReferringBecauseMutable1 + + // this is NOT allowed + param1 <- m1 &stackReferringBecauseMutable2 stackReferringBecauseMutable1 + + // this is NOT allowed + param1 <- stackReferringBecauseMutable2.Slice(10) +#endif + + // this is allowed + param1 <- Span() + + // this is allowed + stackReferringBecauseMutable2 <- param1 + + module SpanSafetyTests2 = + let m2 (x: byref>) = + // should compile + &x + + module SpanSafetyTests3 = + type SpanLikeType = Span + let m1 (x: byref>) (y: Span) = + // this is all valid, unconcerned with stack-referring stuff + let local = SpanLikeType() + x <- local + x + let m2 (x: byref>) = + // should compile + &x + + let test2 (param1: byref>) (param2: Span) = + let mutable stackReferringBecauseMutable1 = Span() + let mutable stackReferringBecauseMutable2 = Span() + + let stackReferring3 = &(m2 &stackReferringBecauseMutable2) + + // this is allowed + stackReferring3 <- m1 &stackReferringBecauseMutable2 stackReferringBecauseMutable1 + + // this is allowed + m2(&stackReferring3) <- stackReferringBecauseMutable2 + +#if NEGATIVE + // this is NOT allowed + m2(¶m1) <- stackReferringBecauseMutable2 + + // this is NOT allowed + param1 <- stackReferring3 + + // this is NOT allowed + &stackReferring3 +#endif + + // this is allowed + //¶m1 - uncomment to test return + + module SpanSafetyTests4 = + let test2 (param1: byref>) (param2: Span) = + // this is allowed + ¶m1 // uncomment to test return + +#if NEGATIVE + + module CheckReturnOfSpan4 = + type Jopac_NotCompile_WhichIsCorrect() = + + member __.Create(x: byref) = + &x + + member this.Create() = + let mutable x = 1 + let x = &this.Create(&x) + &x + + member this.CreateAgain() = + let mutable x = 1 + &this.Create(&x) + +#endif + +#if NOT_YET + +#if NEGATIVE + + // Disallow this: + [] + type DisallowedIsReadOnlyStruct = + [] + val mutable X : int + +#endif + + // Allow this: + [] + type ByRefLikeStructWithSpanField(count1: Span, count2: int) = + member x.Count1 = count1 + member x.Count2 = count2 + +#endif diff --git a/tests/fsharp/core/span/test2.bsl b/tests/fsharp/core/span/test2.bsl new file mode 100644 index 00000000000..49551f4fd39 --- /dev/null +++ b/tests/fsharp/core/span/test2.bsl @@ -0,0 +1,78 @@ + +test2.fsx(79,21,79,35): typecheck error FS0406: The byref-typed variable 'test' is used in an invalid way. Byrefs cannot be captured by closures or passed to inner functions. + +test2.fsx(79,21,79,35): typecheck error FS0406: The byref-typed variable 'test' is used in an invalid way. Byrefs cannot be captured by closures or passed to inner functions. + +test2.fsx(79,31,79,35): typecheck error FS0418: The byref typed value 'test' cannot be used at this point + +test2.fsx(79,21,79,35): typecheck error FS0425: The type of a first-class function cannot contain byrefs + +test2.fsx(79,21,79,35): typecheck error FS0425: The type of a first-class function cannot contain byrefs + +test2.fsx(84,14,84,15): typecheck error FS3209: The address of the variable 'x' or a related expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + +test2.fsx(91,14,91,15): typecheck error FS3209: The address of the variable 'y' or a related expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + +test2.fsx(100,14,100,15): typecheck error FS3209: The address of the variable 'y' or a related expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + +test2.fsx(106,14,106,15): typecheck error FS3209: The address of the variable 'y' or a related expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + +test2.fsx(111,14,111,15): typecheck error FS3209: The address of the variable 'y' or a related expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + +test2.fsx(115,14,115,30): typecheck error FS3228: The address of a value returned from the expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + +test2.fsx(119,14,119,37): typecheck error FS3228: The address of a value returned from the expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + +test2.fsx(124,14,124,15): typecheck error FS3209: The address of the variable 'y' or a related expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + +test2.fsx(128,13,128,42): typecheck error FS3236: A Span or IsByRefLike value returned from the expression cannot be used at ths point. This is to ensure the address of the local value does not escape its scope. + +test2.fsx(132,14,132,41): typecheck error FS3228: The address of a value returned from the expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + +test2.fsx(136,14,136,71): typecheck error FS3228: The address of a value returned from the expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + +test2.fsx(140,13,140,52): typecheck error FS3236: A Span or IsByRefLike value returned from the expression cannot be used at ths point. This is to ensure the address of the local value does not escape its scope. + +test2.fsx(144,13,144,14): typecheck error FS3235: The Span or IsByRefLike variable 's' cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + +test2.fsx(149,13,149,52): typecheck error FS3236: A Span or IsByRefLike value returned from the expression cannot be used at ths point. This is to ensure the address of the local value does not escape its scope. + +test2.fsx(153,21,153,84): typecheck error FS3234: The function or method call cannot be used at this point, because one argument that is a byref of a non-stack-local Span or IsByRefLike type is used with another argument that is a stack-local Span or IsByRefLike type. This is to ensure the address of the local value does not escape its scope. + +test2.fsx(154,13,154,14): typecheck error FS3235: The Span or IsByRefLike variable 'y' cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + +test2.fsx(158,13,158,83): typecheck error FS3236: A Span or IsByRefLike value returned from the expression cannot be used at ths point. This is to ensure the address of the local value does not escape its scope. + +test2.fsx(163,13,163,14): typecheck error FS3235: The Span or IsByRefLike variable 'y' cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + +test2.fsx(167,14,167,71): typecheck error FS3228: The address of a value returned from the expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + +test2.fsx(191,43,191,44): typecheck error FS3209: The address of the variable 'x' or a related expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + +test2.fsx(195,14,195,15): typecheck error FS3209: The address of the variable 'y' or a related expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + +test2.fsx(199,13,199,19): typecheck error FS3230: This value can't be assigned because the target 'x' may refer to non-stack-local memory, while the expression being assigned is assessed to potentially refer to stack-local memory. This is to help prevent pointers to stack-bound memory escaping their scope. + +test2.fsx(204,26,204,27): typecheck error FS0412: A type instantiation involves a byref type. This is not permitted by the rules of Common IL. + +test2.fsx(204,26,204,27): typecheck error FS0406: The byref-typed variable 'inputSequence' is used in an invalid way. Byrefs cannot be captured by closures or passed to inner functions. + +test2.fsx(204,26,204,27): typecheck error FS0412: A type instantiation involves a byref type. This is not permitted by the rules of Common IL. + +test2.fsx(204,26,204,27): typecheck error FS0425: The type of a first-class function cannot contain byrefs + +test2.fsx(204,26,204,27): typecheck error FS0412: A type instantiation involves a byref type. This is not permitted by the rules of Common IL. + +test2.fsx(204,26,204,27): typecheck error FS0412: A type instantiation involves a byref type. This is not permitted by the rules of Common IL. + +test2.fsx(209,13,209,18): typecheck error FS0412: A type instantiation involves a byref type. This is not permitted by the rules of Common IL. + +test2.fsx(208,14,208,18): typecheck error FS0437: A type would store a byref typed value. This is not permitted by Common IL. + +test2.fsx(214,13,214,18): typecheck error FS0412: A type instantiation involves a byref type. This is not permitted by the rules of Common IL. + +test2.fsx(213,14,213,19): typecheck error FS0437: A type would store a byref typed value. This is not permitted by Common IL. + +test2.fsx(222,18,222,23): typecheck error FS3228: The address of a value returned from the expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope. + +test2.fsx(231,17,231,18): typecheck error FS3235: The Span or IsByRefLike variable 's' cannot be used at this point. This is to ensure the address of the local value does not escape its scope. diff --git a/tests/fsharp/core/span/test2.fsx b/tests/fsharp/core/span/test2.fsx new file mode 100644 index 00000000000..e3be6f78871 --- /dev/null +++ b/tests/fsharp/core/span/test2.fsx @@ -0,0 +1,393 @@ +#r @"..\..\..\..\packages\System.Memory.4.5.0-rc1\lib\netstandard2.0\System.Memory.dll" +#r @"..\..\..\..\packages\NETStandard.Library.NETFramework.2.0.0-preview2-25405-01\build\net461\ref\netstandard.dll" + +#nowarn "9" +#nowarn "51" + +namespace System.Runtime.CompilerServices + + open System + open System.Runtime.CompilerServices + open System.Runtime.InteropServices + [] + [] + type IsReadOnlyAttribute() = + inherit System.Attribute() + + [] + [] + type IsByRefLikeAttribute() = + inherit System.Attribute() + +namespace Tests + open System + open System.Runtime.CompilerServices + open System.Runtime.InteropServices + open FSharp.NativeInterop + + module Tests = + let mutable beef = 1 + + let returning_span (x: byref) = Span.Empty + + let returning_ref (x: byref) = &x + + let returning_ref2 (x: byref) (y: byref) = &x + + let passing_span_returning_span (x: Span) = Span.Empty + + let passing_span_returnin_ref (x: Span) = &x.[0] + + let passing_span2 (x: Span) (y: Span) = () + + let passing_byref_of_span_returning_span (x: byref>) = x + + let passing_inref_of_span_returning_span (x: inref>) = x + + let passing_byref_of_span_returning_byref_of_span (x: byref>) = &x + + let passing_byref_of_span2_returning_byref_of_span (x: byref>) (y: byref>) = &y + + let passing_byref_of_span_and_span_returning_byref_of_span (x: byref>) (y: Span) = + let y = &x + &y + +#if NOT_YET + + [] + type StructRecordRefLike = + { + mutable value: Span + } + + member this.Set(data: Span) = + this.value <- data + + [] + type StructRefLike = + + val mutable value: Span + + new (value) = { value = value } + +#endif + +#if NEGATIVE + + let should_not_work () = + let test = ReadOnlySpan.Empty + let f = fun () -> test + () + + let should_not_work1 () = + let mutable x = 1 + &x + + let should_not_work2 () = + let mutable x = 1 + let mutable x = (let mutable y = &x in &y) + + let y = &returning_ref &x + &y + + let should_not_work3 () = + let mutable x = 1 + let mutable x = + match &x with + | x -> &x + + let y = &returning_ref &x + &y + + let should_not_work4 () = + let mutable x = 1 + let mutable y = &x + y <- 1 + &y + + let should_not_work5 () = + let x = 1 + let y = &x + &y + + let should_not_work6 () = + let mutable x = 1 + &returning_ref &x + + let should_not_work7 () = + let mutable x = 1 + &returning_ref2 &beef &x + + let should_not_work8 () = + let mutable x = 1 + let y = &returning_ref2 &beef &x + &y + + let should_not_work9 () = + let mutable s = Span.Empty + passing_span_returning_span s + + let should_not_work10 () = + let mutable s = Span.Empty + &passing_span_returnin_ref s + + let should_not_work11 () = + let mutable s = Span.Empty + &passing_span_returnin_ref (passing_span_returning_span s) + + let should_not_work12 () = + let mutable s = Span.Empty + passing_byref_of_span_returning_span &s + + let should_not_work13 () = + let mutable s = Span.Empty + s + + let should_not_work14 () = + let mutable s = Span.Empty + let mutable x = &s + passing_byref_of_span_returning_span &x + + let should_not_work15 (data: byref>) = + let mutable stackData = Span.Empty + let y = passing_byref_of_span2_returning_byref_of_span &stackData &data + y + + let should_not_work16 (data: byref>) = + let mutable stackData = Span.Empty + passing_byref_of_span_and_span_returning_byref_of_span &stackData data + + let should_not_work17 (data: byref>) = + let mutable stackData = Span.Empty + let y = &passing_byref_of_span_and_span_returning_byref_of_span &stackData data + y + + let should_not_work18 () = + let mutable s = Span.Empty + &passing_span_returnin_ref (passing_span_returning_span s) + +#if NOT_YET + + let should_not_work19 (data: byref) = + let mutable stackData = Span.Empty + data.value <- stackData + + let should_not_work20 () = + let mutable data = Span.Empty + let beef = { value = data } + beef + + let should_not_work21 () = + let mutable data = Span.Empty + let beef = StructRefLike(data) + beef + + let should_not_work22 (data: byref) = + let mutable x = Span.Empty + data.Set(x) + +#endif + + let should_not_work23 (x: int) = &x + + let should_not_work24 (x: int) = + let y = &x + &y + + let should_not_work25 (x: byref>) = + let mutable y = Span.Empty + x <- y + + let should_not_work26 () = + seq { + let s = Span.Empty + for x in s do + yield x + } + + type Nope = { + Funcn : ReadOnlySpan -> int + } + + type FuncType = ReadOnlySpan -> int + type Nope2 = { + Funcn : FuncType + } + + type TestDelegate_should_not_work27 = delegate of unit -> byref + + let should_not_work27 () = + let f = TestDelegate_should_not_work27(fun () -> + let mutable s = Span.Empty + &s.[0] + ) + () + + type TestDelegate_should_not_work28 = delegate of unit -> Span + + let should_not_work28 () = + let f = TestDelegate_should_not_work28(fun () -> + let mutable s = Span.Empty + s + ) + () +#endif + + let should_work1 () = + Span.Empty + + let should_work3 () = + let mutable beef = 1 + let y = &returning_ref &beef + y + + let should_work2 () = + let x = Span.Empty + x + + let should_work4 () = + &returning_ref2 &beef &beef + + let should_work5 () = + let mutable x = 1 + returning_ref2 &x &x + + let should_work6 () = + let mutable x = 1 + returning_span &x + + let should_work7 () = + let mutable x = 1 + let y = returning_span &x + y + + let should_work8 () = + let s = Span.Empty + passing_span_returning_span s + + let should_work9 () = + let mutable s = Span.Empty + passing_span_returnin_ref s + + let should_work10 () = + let mutable s = Span.Empty + passing_span_returnin_ref (passing_span_returning_span s) + + let should_work11 () = + let s = Span.Empty + &passing_span_returnin_ref (passing_span_returning_span s) + + let should_work12 () = + let s = Span.Empty + passing_inref_of_span_returning_span &s + + let should_work13 () = + let s = Span.Empty + let mutable x = &s + passing_inref_of_span_returning_span &x + + let should_work14 (s: byref>) = + passing_byref_of_span_returning_byref_of_span &s + + let should_work15 (s: byref>) = + let x = &s + let y = &passing_byref_of_span_returning_byref_of_span &x + &y + + type TestDelegate = delegate of byref> -> Span + + let should_work16 (s: byref>) = + let f = TestDelegate(fun _ -> Span.Empty) + f.Invoke(&s) + + type IBeef = + + abstract Test : byref> -> byref> + + let should_work17 () = + { new IBeef with + member __.Test s = &s + } + + let should_work18 (data: byref>) = + let y = passing_byref_of_span_and_span_returning_byref_of_span &data data + y + + let should_work19 (data: byref>) = + &passing_byref_of_span_and_span_returning_byref_of_span &data data + +#if NOT_YET + + let should_work20 () = + let data = Span.Empty + let beef = StructRefLike(data) + beef + + let should_work21 () = + let data = Span.Empty + let beef = { value = data } + beef + + let should_work22 (data: byref) = + let s = Span.Empty + data.value <- s + + let should_work23 (data: byref) = + let x = Span.Empty + data.Set(x) + + let should_work24 () = + let mutable s = Span.Empty + let mutable srl = StructRefLike() + let addr = &srl + addr.value <- s + + let should_work25 () = + let mutable s = Span.Empty + let mutable srl = StructRefLike() + srl.value <- s + + let should_work26 (data: byref) = + let mutable s = Span.Empty + let mutable srl = data + srl.value <- s + +#endif + + let should_work27 (s: Span) = &s.[0] + + let should_work28 (s: Span) = + let y = &s.[0] + &y + + let should_work29_helper (x: Span) (y: byref) = &y + + let should_work29 () = + let yopac = + let mutable s = Span.Empty + &should_work29_helper s &beef // this looks like it's out of scope, but this is coming from a stack referring span-like type. + () + + let should_work30 () = + let yopac = + let mutable s = Span.Empty + &s.[0] // this looks like it's out of scope, but this is coming from a stack referring span-like type. + () + + type TestDelegate_should_work31 = delegate of unit -> byref + + let should_work31 () = + let f = TestDelegate_should_work31(fun () -> + let s = Span.Empty + &s.[0] + ) + () + + type TestDelegate_should_work32 = delegate of unit -> Span + + let should_work32 () = + let f = TestDelegate_should_work32(fun () -> + let s = Span.Empty + s + ) + () \ No newline at end of file diff --git a/tests/fsharp/core/span/test3.bsl b/tests/fsharp/core/span/test3.bsl new file mode 100644 index 00000000000..da0e0fa6f8a --- /dev/null +++ b/tests/fsharp/core/span/test3.bsl @@ -0,0 +1,14 @@ + +test3.fsx(31,17,31,23): typecheck error FS0027: This value is not mutable. Consider using the mutable keyword, e.g. 'let mutable x = expression'. + +test3.fsx(39,21,39,27): typecheck error FS0027: This value is not mutable. Consider using the mutable keyword, e.g. 'let mutable x = expression'. + +test3.fsx(47,26,47,27): typecheck error FS0001: The type 'Span' is not compatible with the type 'seq<'a>' + +test3.fsx(48,21,48,27): typecheck error FS0027: This value is not mutable. Consider using the mutable keyword, e.g. 'let mutable x = expression'. + +test3.fsx(47,26,47,27): typecheck error FS0193: Type constraint mismatch. The type + 'Span' +is not compatible with type + 'seq<'a>' + diff --git a/tests/fsharp/core/span/test3.fsx b/tests/fsharp/core/span/test3.fsx new file mode 100644 index 00000000000..dc9ff0b2993 --- /dev/null +++ b/tests/fsharp/core/span/test3.fsx @@ -0,0 +1,51 @@ +#r @"..\..\..\..\packages\System.Memory.4.5.0-rc1\lib\netstandard2.0\System.Memory.dll" +#r @"..\..\..\..\packages\NETStandard.Library.NETFramework.2.0.0-preview2-25405-01\build\net461\ref\netstandard.dll" + +#nowarn "9" +#nowarn "51" + +namespace System.Runtime.CompilerServices + + open System + open System.Runtime.CompilerServices + open System.Runtime.InteropServices + [] + [] + type IsReadOnlyAttribute() = + inherit System.Attribute() + + [] + [] + type IsByRefLikeAttribute() = + inherit System.Attribute() + +namespace Tests + +open System + +// NOT POST INFERENCE CHECKS +#if NEGATIVE + module ForEachDeferenceSpanElementCheck = + let doSomething (s: Span) = + for x in s do + x <- 5 + () + + module ForEachDereferenceSpanElementSeqCheck = + let doSomething () = + seq { + let s = Span.Empty + for x in s do + x <- 5 + yield x + } + + module ForEachDereferenceSpanElementAsyncCheck = + let doSomething () = + async { + let s = Span.Empty + for x in s do + x <- 5 + () + } +#endif \ No newline at end of file diff --git a/tests/fsharp/core/span/testlib.fs b/tests/fsharp/core/span/testlib.fs new file mode 100644 index 00000000000..9f8ee206503 --- /dev/null +++ b/tests/fsharp/core/span/testlib.fs @@ -0,0 +1,15 @@ +namespace System.Runtime.CompilerServices + + open System + open System.Runtime.CompilerServices + open System.Runtime.InteropServices + [] + [] + type IsReadOnlyAttribute() = + inherit System.Attribute() + + [] + [] + type IsByRefLikeAttribute() = + inherit System.Attribute() + diff --git a/tests/fsharp/core/subtype/test.fsx b/tests/fsharp/core/subtype/test.fsx index db98179a6d7..b33a35e5f8a 100644 --- a/tests/fsharp/core/subtype/test.fsx +++ b/tests/fsharp/core/subtype/test.fsx @@ -31,7 +31,7 @@ open System.Collections.Generic let f1 (x: 'a[]) = (x :> ICollection<'a>) do let x = f1 [| 3;4; |] in test "test239809" (x.Contains(3)) -#if !FX_PORTABLE_OR_NETSTANDARD +#if !NETCOREAPP1_0 (* 'a[] :> IReadOnlyCollection<'a> *) let f1ReadOnly (x: 'a[]) = (x :> IReadOnlyCollection<'a>) do let x = f1ReadOnly [| 3;4; |] in test "test239809ReadOnly" (x.Count = 2) @@ -41,7 +41,7 @@ do let x = f1ReadOnly [| 3;4; |] in test "test239809ReadOnly" (x.Count = 2) let f2 (x: 'a[]) = (x :> IList<'a>) do let x = f2 [| 3;4; |] in test "test239810" (x.Item(1) = 4) -#if !FX_PORTABLE_OR_NETSTANDARD +#if !NETCOREAPP1_0 (* 'a[] :> IReadOnlyList<'a> *) let f2ReadOnly (x: 'a[]) = (x :> IReadOnlyList<'a>) do let x = f2ReadOnly [| 3;4; |] in test "test239810ReadOnly" (x.Item(1) = 4) @@ -55,7 +55,7 @@ do let x = f3 [| 3;4; |] in for x in x do (Printf.printf "val %d\n" x) done let f4 (x: 'a[]) = (x :> IList<'a>) do let x = f4 [| 31;42; |] in for x in x do (Printf.printf "val %d\n" x) done -#if !FX_PORTABLE_OR_NETSTANDARD +#if !NETCOREAPP1_0 (* Call 'foreachG' using an IReadOnlyList (solved to IEnumerable) *) let f4ReadOnly (x: 'a[]) = (x :> IReadOnlyList<'a>) do let x = f4ReadOnly [| 31;42; |] in for x in x do (Printf.printf "val %d\n" x) done @@ -65,7 +65,7 @@ do let x = f4ReadOnly [| 31;42; |] in for x in x do (Printf.printf "val %d\n" x) let f5 (x: 'a[]) = (x :> ICollection<'a>) do let x = f5 [| 31;42; |] in for x in x do (Printf.printf "val %d\n" x) done -#if !FX_PORTABLE_OR_NETSTANDARD +#if !NETCOREAPP1_0 (* Call 'foreachG' using an IReadOnlyCollection (solved to IEnumerable) *) let f5ReadOnly (x: 'a[]) = (x :> IReadOnlyCollection<'a>) do let x = f5ReadOnly [| 31;42; |] in for x in x do (Printf.printf "val %d\n" x) done @@ -106,7 +106,7 @@ let testUpcastToEnum1 (x: System.AttributeTargets) = (x :> System.Enum) let testUpcastToEnum6 (x: System.Enum) = (x :> System.Enum) // these delegates don't exist in portable -#if !UNIX && !FX_PORTABLE_OR_NETSTANDARD +#if !UNIX && !NETCOREAPP1_0 let testUpcastToDelegate1 (x: System.Threading.ThreadStart) = (x :> System.Delegate) let testUpcastToMulticastDelegate1 (x: System.Threading.ThreadStart) = (x :> System.MulticastDelegate) @@ -244,7 +244,7 @@ module SomeRandomOperatorConstraints = begin let sum64 seq : int64 = Seq.reduce (+) seq let sum32 seq : int64 = Seq.reduce (+) seq -#if !FX_PORTABLE_OR_NETSTANDARD +#if !NETCOREAPP1_0 let sumBigInt seq : BigInteger = Seq.reduce (+) seq #endif let sumDateTime (dt : DateTime) (seq : #seq) : DateTime = Seq.fold (+) dt seq @@ -1791,6 +1791,134 @@ module SRTPFix = printfn "%A" <| replace 'q' (test("HI")) *) + +module SRTPFixAmbiguity = + // Mini Repro from FSharpPlus https://github.com/gusty/FSharpPlus + type Id<'t>(v:'t) = member __.getValue = v + type Interface<'t> = abstract member getValue : 't + + type Monad = + static member inline InvokeReturn (x:'T) : '``Monad<'T>`` = + let inline call (mthd : ^M, output : ^R) = ((^M or ^R) : (static member Return: _ -> _) output) + call (Unchecked.defaultof, Unchecked.defaultof<'``Monad<'T>``>) x + static member Return (_:Interface<'a>) = fun (_:'a) -> Unchecked.defaultof> : Interface<'a> + static member Return (_:seq<'a> ) = fun x -> Seq.singleton x : seq<'a> + static member Return (_:option<'a> ) = fun x -> Some x : option<'a> + static member Return (_:Id<'a> ) = fun x -> Id x : Id<'a> + + static member inline InvokeBind (source : '``Monad<'T>``) (binder : 'T -> '``Monad<'U>``) : '``Monad<'U>`` = + let inline call (mthd : 'M, input : 'I, _output : 'R, f) = ((^M or ^I or ^R) : (static member Bind: _*_ -> _) input, f) + call (Unchecked.defaultof, source, Unchecked.defaultof<'``Monad<'U>``>, binder) + static member Bind (source : Interface<'T>, f : 'T -> Interface<'U>) = f source.getValue : Interface<'U> + static member Bind (source : seq<'T> , f : 'T -> seq<'U> ) = Seq.collect f source : seq<'U> + static member Bind (source : Id<'T> , f : 'T -> Id<'U> ) = f source.getValue : Id<'U> + static member Bind (source :option<'T> , f : 'T -> _ ) = Option.bind f source : option<'U> + + let inline result (x:'T) = Monad.InvokeReturn x :'``Monad<'T>`` + let inline (>>=) (x:'``Monad<'T>``) (f:'T->'``Monad<'U>``) = Monad.InvokeBind x f :'``Monad<'U>`` + + type ReaderT<'R,'``monad<'T>``> = ReaderT of ('R -> '``monad<'T>``) + let runReaderT (ReaderT x) = x : 'R -> '``Monad<'T>`` + type ReaderT<'R,'``monad<'T>``> with + static member inline Return _ = fun (x : 'T) -> ReaderT (fun _ -> result x) : ReaderT<'R, '``Monad<'T>``> + static member inline Bind (ReaderT (m:_->'``Monad<'T>``), f:'T->_) = ReaderT (fun r -> m r >>= (fun a -> runReaderT (f a) r)) : ReaderT<'R, '``Monad<'U>``> + + + let test1 : ReaderT> = ReaderT result >>= result + let test2 : ReaderT> = ReaderT result >>= result + let test3 : ReaderT> = ReaderT result >>= result + + +// See https://github.com/Microsoft/visualfsharp/issues/4040 +module InferenceRegression4040 = + type Foo() = + static let test (t : 'T) : 'T list = + let b : Bar<'T> = new Bar<'T>(t) + [b.Value] + + static member Test(t : int) = test t + + and Bar<'U>(value : 'U) = + member __.Value = value + + printfn "%A" (Foo.Test 42) + + +// See https://github.com/Microsoft/visualfsharp/issues/4040 +module InferenceRegression4040b = + type Foo() = + static let test (t : 'T) : 'T list = + let b : Bar<'T> = new Bar<'T>(t) + [b.Value] + + static member Test(t : int) = test t + + and Bar<'T>(value : 'T) = + member __.Value = value + + printfn "%A" (Foo.Test 42) + +// See https://github.com/Microsoft/visualfsharp/issues/4040 +module InferenceRegression4040C = + type Foo() = + static let test (t : 'T) : 'T list = + let b : Bar<'T> = new Bar<'T>(t) + [b.Value] + + static member Test(t : int) = test t + + and Bar<'U>(value : 'U) = + member __.Value : 'U = value + + printfn "%A" (Foo.Test 42) + + +module TestInheritFunc = + type Foo() = + inherit FSharpFunc() + override __.Invoke(a:int) = a + 1 + + check "cnwcki1" ((Foo() |> box |> unbox int> ) 5) 6 + +module TestInheritFuncGeneric = + type Foo<'T,'U>() = + inherit FSharpFunc<'T,'T>() + override __.Invoke(a:'T) = a + + check "cnwcki2" ((Foo() |> box |> unbox int> ) 5) 5 + + +module TestInheritFunc2 = + type Foo() = + inherit OptimizedClosures.FSharpFunc() + override f.Invoke(a:int) = (fun u -> f.Invoke(a,u)) + override __.Invoke(a:int,b:int) = a + b + 1 + + check "cnwcki3" ((Foo() |> box |> unbox int -> int> ) 5 6) 12 + +module TestInheritFunc3 = + type Foo() = + inherit OptimizedClosures.FSharpFunc() + override f.Invoke(t) = (fun u v -> f.Invoke(t,u,v)) + override __.Invoke(a:int,b:int,c:int) = a + b + c + 1 + + check "cnwcki4" ((Foo() |> box |> unbox int -> int -> int> ) 5 6 7) 19 + +#if !NETCOREAPP1_0 + +module TestConverter = + open System + + let fromConverter (f: Converter<'T1,'X>) = FSharp.Core.FSharpFunc.FromConverter f + let implicitConv (f: Converter<'T1,'X>) = FSharp.Core.FSharpFunc.op_Implicit f + let toConverter (f: 'T1 -> 'X) = FSharp.Core.FSharpFunc.ToConverter f + let toConverter2 (f: FSharpFunc<'T1, 'X>) = FSharp.Core.FSharpFunc.ToConverter f + + test "cenwceoiwe1" ((id |> toConverter |> fromConverter) 6 = 6) + test "cenwceoiwe2" ((id |> toConverter |> fromConverter |> toConverter2 |> implicitConv) 6 = 6) +#endif + + #if TESTS_AS_APP let RUN() = !failures #else diff --git a/tests/fsharp/core/syntax/test.fsx b/tests/fsharp/core/syntax/test.fsx index 57c217dfafb..cc3123be09c 100644 --- a/tests/fsharp/core/syntax/test.fsx +++ b/tests/fsharp/core/syntax/test.fsx @@ -837,7 +837,7 @@ let testTryFinallySyntaxOnOneLine () = try () finally () -#if !TESTS_AS_APP && !FX_PORTABLE_OR_NETSTANDARD +#if !TESTS_AS_APP && !NETCOREAPP1_0 type SampleForm = class inherit System.Windows.Forms.Form @@ -1035,7 +1035,7 @@ do test "vliwe94" (f -2L = - 2L) do test "vliwe95" (f -2n = - 2n) do test "vliwe96" (f -2.0 = - 2.0) do test "vliwe97" (f -2.0f = - 2.0f) -#if !FX_PORTABLE_OR_NETSTANDARD +#if !NETCOREAPP1_0 do test "vliwe99" (f -2I = - 2I) #endif diff --git a/tests/fsharp/core/unicode/kanji-unicode-utf16.fs b/tests/fsharp/core/unicode/kanji-unicode-utf16.fs index 4e0a7707703..4319c31f981 100644 Binary files a/tests/fsharp/core/unicode/kanji-unicode-utf16.fs and b/tests/fsharp/core/unicode/kanji-unicode-utf16.fs differ diff --git a/tests/fsharp/core/unicode/test.fsx b/tests/fsharp/core/unicode/test.fsx index 1e78bb2ed25..11add13debc 100644 --- a/tests/fsharp/core/unicode/test.fsx +++ b/tests/fsharp/core/unicode/test.fsx @@ -19,7 +19,7 @@ let test (s : string) b = (* TEST SUITE FOR UNICODE CHARS *) -#if !TESTS_AS_APP && !FX_PORTABLE_OR_NETSTANDARD +#if !TESTS_AS_APP && !NETCOREAPP1_0 let input_byte (x : System.IO.FileStream) = let b = x.ReadByte() if b = -1 then raise (System.IO.EndOfStreamException()) else b diff --git a/tests/fsharp/core/versionAttributes/NoWarn2003.fs b/tests/fsharp/core/versionAttributes/NoWarn2003.fs new file mode 100644 index 00000000000..be2350b451b --- /dev/null +++ b/tests/fsharp/core/versionAttributes/NoWarn2003.fs @@ -0,0 +1,12 @@ +namespace System +open System.Reflection + +do () + +namespace System +open System.Reflection +#nowarn "2003" + +[] + +do () \ No newline at end of file diff --git a/tests/fsharp/core/versionAttributes/NoWarn2003_2.fs b/tests/fsharp/core/versionAttributes/NoWarn2003_2.fs new file mode 100644 index 00000000000..f1ac27699ae --- /dev/null +++ b/tests/fsharp/core/versionAttributes/NoWarn2003_2.fs @@ -0,0 +1,8 @@ +namespace System +open System.Reflection + +#nowarn "2003" +[] +[] + +do () \ No newline at end of file diff --git a/tests/fsharp/core/versionAttributes/Warn2003_1.fs b/tests/fsharp/core/versionAttributes/Warn2003_1.fs new file mode 100644 index 00000000000..7090074eddc --- /dev/null +++ b/tests/fsharp/core/versionAttributes/Warn2003_1.fs @@ -0,0 +1,7 @@ +namespace System +open System.Reflection + +[] +[] + +do () \ No newline at end of file diff --git a/tests/fsharp/core/versionAttributes/Warn2003_2.fs b/tests/fsharp/core/versionAttributes/Warn2003_2.fs new file mode 100644 index 00000000000..45b31e21718 --- /dev/null +++ b/tests/fsharp/core/versionAttributes/Warn2003_2.fs @@ -0,0 +1,6 @@ +namespace System +open System.Reflection + +[] + +do () \ No newline at end of file diff --git a/tests/fsharp/core/versionAttributes/Warn2003_3.fs b/tests/fsharp/core/versionAttributes/Warn2003_3.fs new file mode 100644 index 00000000000..33fe04b3b28 --- /dev/null +++ b/tests/fsharp/core/versionAttributes/Warn2003_3.fs @@ -0,0 +1,6 @@ +namespace System +open System.Reflection + +[] + +do () \ No newline at end of file diff --git a/tests/fsharp/core/versionAttributes/out.stderr.bsl b/tests/fsharp/core/versionAttributes/out.stderr.bsl new file mode 100644 index 00000000000..89d567a7575 --- /dev/null +++ b/tests/fsharp/core/versionAttributes/out.stderr.bsl @@ -0,0 +1,26 @@ +Test 1================================================= + +NoWarn2003.fs(1,1): warning FS0988: Main module of program is empty: nothing will happen when it is run +Test 2================================================= + +NoWarn2003_2.fs(8,6): warning FS0988: Main module of program is empty: nothing will happen when it is run +Test 3================================================= + +Warn2003_1.fs(7,6): warning FS0988: Main module of program is empty: nothing will happen when it is run +Test 4================================================= + +Warn2003_2.fs(6,6): warning FS0988: Main module of program is empty: nothing will happen when it is run +Test 5================================================= + +Warn2003_3.fs(4,38): warning FS2003: The attribute System.Reflection.AssemblyVersionAttribute specified version '5.0.0-beta024', but this value is invalid and has been ignored + +Warn2003_3.fs(6,6): warning FS0988: Main module of program is empty: nothing will happen when it is run +Test 6================================================= + +Warn2003_1.fs(7,6): warning FS0988: Main module of program is empty: nothing will happen when it is run +Test 7================================================= + +Warn2003_2.fs(6,6): warning FS0988: Main module of program is empty: nothing will happen when it is run +Test 8================================================= + +Warn2003_3.fs(6,6): warning FS0988: Main module of program is empty: nothing will happen when it is run diff --git a/tests/fsharp/core/versionAttributes/out.stdout.bsl b/tests/fsharp/core/versionAttributes/out.stdout.bsl new file mode 100644 index 00000000000..fa893814754 --- /dev/null +++ b/tests/fsharp/core/versionAttributes/out.stdout.bsl @@ -0,0 +1,8 @@ +Test 1================================================= +Test 2================================================= +Test 3================================================= +Test 4================================================= +Test 5================================================= +Test 6================================================= +Test 7================================================= +Test 8================================================= diff --git a/tests/fsharp/packages.config b/tests/fsharp/packages.config index 4715cb922cb..cf755012d51 100644 --- a/tests/fsharp/packages.config +++ b/tests/fsharp/packages.config @@ -1,11 +1,11 @@  - + - - + + \ No newline at end of file diff --git a/tests/fsharp/regression/656/form.fs b/tests/fsharp/regression/656/form.fs index 67478804edd..9b4c8478d5d 100644 --- a/tests/fsharp/regression/656/form.fs +++ b/tests/fsharp/regression/656/form.fs @@ -156,13 +156,13 @@ let DisplaySample (form:Form) (measure, fileName) = let ShowStatistics count total skills = let (mean:float) = (total/(float) count ) in let _ = try if not form.IsDisposed then form.Invoke( new MethodInvoker( - fun _ -> try tip.SetToolTip(labelK1, "Mean: " ^ mean.ToString() ) with e -> LogWarning e + fun _ -> try tip.SetToolTip(labelK1, "Mean: " + mean.ToString() ) with e -> LogWarning e )) |> ignore with e -> LogWarning e in let deltaSquared = skills |> List.fold ( fun acc value -> let delta = (mean-value) in acc + (delta*delta) ) 0.0 in let sd = Math.Sqrt(deltaSquared / (float count)) in try if not form.IsDisposed then form.Invoke( new MethodInvoker( - fun _ -> try tip.SetToolTip(labelK2, "Standard Deviation: " ^ sd.ToString() ) with e -> LogWarning e + fun _ -> try tip.SetToolTip(labelK2, "Standard Deviation: " + sd.ToString() ) with e -> LogWarning e )) |>ignore with e -> LogWarning e |> ignore in lock lastFileLock ( fun _ -> @@ -275,7 +275,7 @@ let ChangeHandler measure path = // Check for tracked players file let trackFile = GetLatestFile path "Track-*.csv" in let _ = match trackFile with - | Some name -> let title = "Select Tracked Players (" ^ path ^ ")" in + | Some name -> let title = "Select Tracked Players (" + path + ")" in let form = match formDock.GetChildForm "track" with | Some child -> child.Text <- title; child | None -> let child = CreateForm title in @@ -292,7 +292,7 @@ let ChangeHandler measure path = // Check for leader board of players file let leadFile = GetLatestFile path "Lead-*.csv" in let _ = match leadFile with - | Some name -> let title = "Bar graph (" ^ path ^ ")" in + | Some name -> let title = "Bar graph (" + path + ")" in let form = match formDock.GetChildForm "lead" with | Some child -> child.Text<-title;child.Controls.Clear();child.Menu.MenuItems.Clear();child | None -> let child = CreateForm title in child.Show(); @@ -794,15 +794,15 @@ do menuEdit.MenuItems.Add(miEditCopy) |> ignore do menuEdit.MenuItems.Add(miEditPaste) |> ignore do miEditCopy.Click.Add( fun _ -> let levels = (!skillList) |> List.mapi ( fun i x -> - if pins.[i] then ("\t\t" ^ x.ToString() ^ "\r\n") else "") in - let value = "\r\n" ^ - "\t" ^ (GetRelativePath combos) ^ "\r\n" ^ - "\t" ^ (!k1).ToString() ^ "\r\n" ^ - "\t" ^ (!k2).ToString() ^ "\r\n" ^ - "\t" ^(!SigmaFactor).ToString() ^ "\r\n" ^ - "\t" ^ (!gamesPlayedStart).ToString() ^ "\r\n" ^ - "\t" ^ (!gamesPlayedEnd).ToString() ^ "\r\n" ^ - "\t\r\n" ^ System.String.Join("",levels |> List.toArray) ^ "\t\r\n" ^ + if pins.[i] then ("\t\t" + x.ToString() + "\r\n") else "") in + let value = "\r\n" + + "\t" + (GetRelativePath combos) + "\r\n" + + "\t" + (!k1).ToString() + "\r\n" + + "\t" + (!k2).ToString() + "\r\n" + + "\t" + (!SigmaFactor).ToString() + "\r\n" + + "\t" + (!gamesPlayedStart).ToString() + "\r\n" + + "\t" + (!gamesPlayedEnd).ToString() + "\r\n" + + "\t\r\n" + System.String.Join("",levels |> List.toArray) + "\t\r\n" + "\r\n" in Clipboard.SetDataObject(value) // Copy xml to clip board ) @@ -853,7 +853,7 @@ do miEditPaste.Click.Add( fun _ -> in () - with e -> MessageBox.Show("Paste failed: " ^ e.Message) |> ignore + with e -> MessageBox.Show("Paste failed: " + e.Message) |> ignore in () | _ -> () ) @@ -869,11 +869,11 @@ do miHelpAbout.Click.Add( fun _ -> box.SelectionAlignment <- HorizontalAlignment.Center; box.SelectedText <- "Experiment Viewer\r\n\r\n"; box.SelectionAlignment <- HorizontalAlignment.Left; - box.SelectedText <- "The starting folder can be specified from the command line or the File Menu.\r\n\r\n" ^ - "Once an experiment file has loaded the suggested values for K1 & K2 are viewable by hovering the mouse over the respective labels.\r\n" ^ - "The values for K1 & K2 are calculated as the mean and standard deviation of Mu-(n*Sigma).\r\n\r\n" ^ - "The setting can be copied and pasted as XML to and from the editable windows using CTRL-C & CTRL-V.\r\n\r\n" ^ - "The graphs can be panned by moving the mouse with the left mouse button down, and zoomed with the right mouse button down." ^ + box.SelectedText <- "The starting folder can be specified from the command line or the File Menu.\r\n\r\n" + + "Once an experiment file has loaded the suggested values for K1 & K2 are viewable by hovering the mouse over the respective labels.\r\n" + + "The values for K1 & K2 are calculated as the mean and standard deviation of Mu-(n*Sigma).\r\n\r\n" + + "The setting can be copied and pasted as XML to and from the editable windows using CTRL-C & CTRL-V.\r\n\r\n" + + "The graphs can be panned by moving the mouse with the left mouse button down, and zoomed with the right mouse button down." + "Press F5 to reset the view, and F3 to toggle the grid off and on."; box.Enabled <- false; dialog.Controls.Add(box); diff --git a/tests/fsharp/regression/656/mathhelper.fs b/tests/fsharp/regression/656/mathhelper.fs index c326e5b4211..d8bf7dce6c5 100644 --- a/tests/fsharp/regression/656/mathhelper.fs +++ b/tests/fsharp/regression/656/mathhelper.fs @@ -43,7 +43,7 @@ let histcex (sample:float list) edges counts = //let i2 = Array.FindIndex(edgePairs, (fun (l,u) -> (l <= x && x < u) )) in counts.(i2) <- counts.(i2) + 1 addone tree counts x ) sample - //timer.Stop(); Debug.WriteLine( "Elapsed " ^ timer.ElapsedMilliseconds.ToString() ); + //timer.Stop(); Debug.WriteLine( "Elapsed " + timer.ElapsedMilliseconds.ToString() ); let histc (sample:float list ) edges = let N = List.length edges in diff --git a/tests/fsharp/regression/656/misc.fs b/tests/fsharp/regression/656/misc.fs index f262417030d..ab0d2701cf7 100644 --- a/tests/fsharp/regression/656/misc.fs +++ b/tests/fsharp/regression/656/misc.fs @@ -15,8 +15,8 @@ let WriteEvent (source:string) (message:string) (entryType:EventLogEntryType) = /// Get exception message details let rec GetExceptionMessage (e:#Exception) = - (e.GetType()).Name ^ ": " ^ e.Message ^ "\r\n StackTrace: " ^ e.StackTrace ^ - if e.InnerException = null then "" else "Inner Exception: " ^ (GetExceptionMessage e.InnerException) + (e.GetType()).Name + ": " + e.Message + "\r\n StackTrace: " + e.StackTrace + + if e.InnerException = null then "" else "Inner Exception: " + (GetExceptionMessage e.InnerException) /// Log exception message let LogWarning e = diff --git a/tests/fsharp/regression/656/trackedplayers.fs b/tests/fsharp/regression/656/trackedplayers.fs index 77463253212..d35492efc98 100644 --- a/tests/fsharp/regression/656/trackedplayers.fs +++ b/tests/fsharp/regression/656/trackedplayers.fs @@ -66,10 +66,10 @@ let CreateTrajectories (gamertags:string array) table f = /// Create player check box let CreatePlayerCheckBox (toolTip:ToolTip) (player:PlayerRecord) eventHandler = let box = CreateCheckBox player.gamertag player eventHandler in - let tipText = "Mu(" ^ player.mu.ToString() ^ ")" - ^ ", TrueSkill(" ^ player.TrueSkill.ToString() ^ ")" - ^ ", Level(" ^ (player.Level !k1 !k2 k3).ToString() ^ ")" - ^ ", Played(" ^ player.games_played.ToString() ^ ")" in + let tipText = "Mu(" + player.mu.ToString() + ")" + + ", TrueSkill(" + player.TrueSkill.ToString() + ")" + + ", Level(" + (player.Level !k1 !k2 k3).ToString() + ")" + + ", Played(" + player.games_played.ToString() + ")" in toolTip.SetToolTip(box, tipText); box @@ -266,7 +266,7 @@ let PopulateForm (form:Form) (formDock:FormDockLocation) measure (playedStart,pl | _ -> () ); ); () - with e -> MessageBox.Show("Paste failed: " ^ e.Message) |> ignore + with e -> MessageBox.Show("Paste failed: " + e.Message) |> ignore in () | _ -> () ) in diff --git a/tests/fsharp/regression/OverloadResolution-bug/test.fsx b/tests/fsharp/regression/OverloadResolution-bug/test.fsx new file mode 100644 index 00000000000..ff87afb18cb --- /dev/null +++ b/tests/fsharp/regression/OverloadResolution-bug/test.fsx @@ -0,0 +1,35 @@ +(***************** Repro for issue#5246 ---- https://github.com/Microsoft/visualfsharp/issues/5246 *****************) +(* + When the bug was present we saw this error: + + Compile errors are raised: + error FS0041: A unique overload for method 'ofObject' could not be determined based on type + information prior to this program point. A type annotation may be needed. + Candidates: static member Methods.ofObject : t0:'a -> Methods option when 'a : null, + static member Methods.ofObject : t1:'a -> Methods option when 'a :> ITest1 and 'a : null + + Expected behavior + The code should compile fine (possibly with a warning on :? obj always succeeding). + +*) + +module TestOfObj = + + type [] ITest1 = interface end + + type Methods = + | Test1 of ITest1 + | Other of obj + + static member ofObject t1 = Option.ofObj t1 |> Option.map Test1 + static member ofObject t0 = Option.ofObj t0 |> Option.map Other + + static member convert (x: obj) = + match x with + | :? ITest1 as one -> Methods.ofObject one + | :? obj as one -> Methods.ofObject one + | _ -> None + + + System.IO.File.WriteAllText("test.ok","ok") + printfn "Succeeded" diff --git a/tests/fsharp/regression/literal-value-bug-1/test.fs b/tests/fsharp/regression/literal-value-bug-1/test.fs new file mode 100644 index 00000000000..cca0b9e0e2f --- /dev/null +++ b/tests/fsharp/regression/literal-value-bug-1/test.fs @@ -0,0 +1,6 @@ +[] +let x = 7 + +[] +let main argv = + 0 \ No newline at end of file diff --git a/tests/fsharp/regression/literal-value-bug-1/test.il.bsl b/tests/fsharp/regression/literal-value-bug-1/test.il.bsl new file mode 100644 index 00000000000..86655b9a6e7 --- /dev/null +++ b/tests/fsharp/regression/literal-value-bug-1/test.il.bsl @@ -0,0 +1,79 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.5.22220.0 + + + +// 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:4:3:0 +} +.assembly test +{ + .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.test +{ + // Offset: 0x00000000 Length: 0x00000274 + // WARNING: managed resource file FSharpSignatureData.test created +} +.mresource public FSharpOptimizationData.test +{ + // Offset: 0x00000278 Length: 0x0000006F + // WARNING: managed resource file FSharpOptimizationData.test created +} +.module test.exe + // MVID: {5AA663EB-D9C1-2E4E-A745-0383EB63A65A} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x02BF0000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed Test + 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 ) + .field public static literal int32 x = int32(0x00000007) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.LiteralAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public static int32 main(string[] argv) cil managed + { + .entrypoint + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.EntryPointAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 2 (0x2) + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: ret + } // end of method Test::main + +} // end of class Test + +.class private abstract auto ansi sealed ''.$Test + extends [mscorlib]System.Object +{ +} // end of class ''.$Test + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** +// WARNING: Created Win32 resource file test.res diff --git a/tests/fsharp/regression/literal-value-bug-2/test.fsx b/tests/fsharp/regression/literal-value-bug-2/test.fsx new file mode 100644 index 00000000000..e529df8c863 --- /dev/null +++ b/tests/fsharp/regression/literal-value-bug-2/test.fsx @@ -0,0 +1,37 @@ +open System +open System.Linq +open System.Reflection + +type thisAssembly (_dummy:System.Object) = class end + +module public MyLiteralFields = + [] + let public literalFieldX = 7 + +printfn "MyFields.literalFieldX = %d" MyLiteralFields.literalFieldX + +// Use dotnet reflection to verify that x is a Literal Constant +// This works on full desktop / coreclr and also fsi +let asm = thisAssembly(null).GetType().GetTypeInfo().Assembly +let typ = asm.GetTypes() |> Array.filter(fun t -> t.FullName.EndsWith("+MyLiteralFields")) |> Array.tryLast +let result = + match typ with + | Some typ -> + // Gets literalFieldX checks to see if it is marked "Literal" + let fieldInfo = typ.GetTypeInfo().DeclaredFields |> Seq.tryFind(fun fi -> fi.Name.StartsWith("literalFieldX")) + match fieldInfo with + | Some fieldInfo -> + if fieldInfo.IsLiteral = true then 0 else 2 + | None -> + printfn "Failed to find fieldliteralFieldX =" + 3 + | None -> + printfn "Failed to find module public MyLiteralFields =" + 1 + +if result = 0 then + System.IO.File.WriteAllText("test.ok","ok"); + printfn "Succeeded" +else + printfn "Failed: %d" result +exit result diff --git a/tests/fsharp/single-test.fs b/tests/fsharp/single-test.fs index 38bce9a806b..1b1fad560ef 100644 --- a/tests/fsharp/single-test.fs +++ b/tests/fsharp/single-test.fs @@ -12,6 +12,7 @@ type Permutation = | FSI_CORECLR #if !FSHARP_SUITE_DRIVES_CORECLR_TESTS | FSI_FILE + | FSIANYCPU_FILE | FSI_STDIN | GENERATED_SIGNATURE | FSC_OPT_MINUS_DEBUG @@ -46,7 +47,7 @@ let singleTestBuildAndRunCore cfg (copyFiles:string) p = makeDirectory (getDirectoryName outFile) let fscArgs = - sprintf """--debug:portable --debug+ --out:%s --target:exe -g --define:FX_RESHAPED_REFLECTION --define:NETSTANDARD1_6 --define:FSCORE_PORTABLE_NEW --define:FX_PORTABLE_OR_NETSTANDARD --define:FX_RESHAPED_REFLECTION "%s" %s """ + sprintf """--debug:portable --debug+ --out:%s --target:exe -g --define:FX_RESHAPED_REFLECTION --define:NETCOREAPP1_0 "%s" %s """ outFile extraSource (String.concat " " sources) @@ -71,7 +72,7 @@ let singleTestBuildAndRunCore cfg (copyFiles:string) p = let extraSource = (__SOURCE_DIRECTORY__ ++ "coreclr_utilities.fs") let outDir = (__SOURCE_DIRECTORY__ ++ sprintf @"../testbin/%s/coreclr/fsharp/core/%s" cfg.BUILD_CONFIG testName) let fsiArgs = - sprintf """ --define:NETSTANDARD1_6 --define:FSCORE_PORTABLE_NEW --define:FX_RESHAPED_REFLECTION --define:FX_PORTABLE_OR_NETSTANDARD "%s" %s """ + sprintf """ --define:NETCOREAPP1_0 --define:FX_RESHAPED_REFLECTION "%s" %s """ extraSource (String.concat " " sources) @@ -94,6 +95,14 @@ let singleTestBuildAndRunCore cfg (copyFiles:string) p = testOkFile.CheckExists() + | FSIANYCPU_FILE -> + use cleanup = (cleanUpFSharpCore cfg) + use testOkFile = new FileGuard (getfullpath cfg "test.ok") + + fsiAnyCpu cfg "%s" cfg.fsi_flags sources + + testOkFile.CheckExists() + | FSI_STDIN -> use cleanup = (cleanUpFSharpCore cfg) use testOkFile = new FileGuard (getfullpath cfg "test.ok") @@ -174,6 +183,8 @@ let singleTestBuildAndRun dir p = let singleNegTest (cfg: TestConfig) testname = + let cfg = { cfg with fsc_flags = sprintf "%s --define:NEGATIVE" cfg.fsc_flags } + // REM == Set baseline (fsc vs vs, in case the vs baseline exists) let VSBSLFILE = if (sprintf "%s.vsbsl" testname) |> (fileExists cfg) diff --git a/tests/fsharp/test-framework.fs b/tests/fsharp/test-framework.fs index 48d4d2834fb..aeb90af5ae8 100644 --- a/tests/fsharp/test-framework.fs +++ b/tests/fsharp/test-framework.fs @@ -40,6 +40,14 @@ module Commands = else (log "not found: %s p") |> ignore + let rmdir dir path = + let p = path |> getfullpath dir + if Directory.Exists(p) then + (log "rmdir /sy %s" p) |> ignore + Directory.Delete(p, true) + else + (log "not found: %s p") |> ignore + let pathAddBackslash (p: FilePath) = if String.IsNullOrWhiteSpace (p) then p else @@ -62,6 +70,8 @@ module Commands = #if FSC_IN_PROCESS // This is not yet complete + printfn "Hosted Compiler:" + printfn "workdir: %A\nargs: %A"workdir args let fscCompiler = FSharp.Compiler.Hosted.FscCompiler() let exitCode, _stdin, _stdout = FSharp.Compiler.Hosted.CompilerHelpers.fscCompile workDir (FSharp.Compiler.Hosted.CompilerHelpers.parseCommandLine args) @@ -74,6 +84,8 @@ module Commands = ignore workDir #if !FSHARP_SUITE_DRIVES_CORECLR_TESTS ignore dotNetExe + printfn "fscExe: %A" fscExe + printfn "args: %A" args exec fscExe args #else exec dotNetExe (fscExe + " " + args) @@ -113,6 +125,7 @@ type TestConfig = FSCBinPath : string FSCOREDLLPATH : string FSI : string + FSIANYCPU : string FSI_FOR_SCRIPTS : string fsi_flags : string ILDASM : string @@ -134,7 +147,7 @@ type FSLibPaths = { FSCOREDLLPATH : string } let requireFile nm = - if Commands.fileExists __SOURCE_DIRECTORY__ nm |> Option.isSome then nm else failwith (sprintf "couldn't find %s" nm) + if Commands.fileExists __SOURCE_DIRECTORY__ nm |> Option.isSome then nm else failwith (sprintf "couldn't find %s. Running 'build test' once might solve this issue" nm) let config configurationName envVars = @@ -146,7 +159,7 @@ let config configurationName envVars = let fsi_flags = "-r:System.Core.dll --nowarn:20 --define:INTERACTIVE --maxerrors:1 --abortonerror" let Is64BitOperatingSystem = WindowsPlatform.Is64BitOperatingSystem envVars let architectureMoniker = if Is64BitOperatingSystem then "x64" else "x86" - let CSC = requireFile (packagesDir ++ "Microsoft.Net.Compilers.2.4.0" ++ "tools" ++ "csc.exe") + let CSC = requireFile (packagesDir ++ "Microsoft.Net.Compilers.2.7.0" ++ "tools" ++ "csc.exe") let ILDASM = requireFile (packagesDir ++ ("runtime.win-" + architectureMoniker + ".Microsoft.NETCore.ILDAsm.2.0.3") ++ "runtimes" ++ ("win-" + architectureMoniker) ++ "native" ++ "ildasm.exe") let coreclrdll = requireFile (packagesDir ++ ("runtime.win-" + architectureMoniker + ".Microsoft.NETCore.Runtime.CoreCLR.2.0.3") ++ "runtimes" ++ ("win-" + architectureMoniker) ++ "native" ++ "coreclr.dll") let PEVERIFY = requireFile (SCRIPT_ROOT ++ ".." ++ "fsharpqa" ++ "testenv" ++ "src" ++ "PEVerify" ++ "bin" ++ configurationName ++ "net46" ++ "PEVerify.exe") @@ -167,10 +180,12 @@ let config configurationName envVars = #if !FSHARP_SUITE_DRIVES_CORECLR_TESTS let FSI = requireFile (FSCBinPath ++ "fsi.exe") + let FSIANYCPU = requireFile (FSCBinPath ++ "fsiAnyCpu.exe") let FSC = requireFile (FSCBinPath ++ "fsc.exe") let FSCOREDLLPATH = requireFile (FSCBinPath ++ "FSharp.Core.dll") #else let FSI = SCRIPT_ROOT ++ ".." ++ ".." ++ "tests" ++ "testbin" ++ configurationName ++ "coreclr" ++ "FSC" ++ "fsi.exe" + let FSIANYCPU = SCRIPT_ROOT ++ ".." ++ ".." ++ "tests" ++ "testbin" ++ configurationName ++ "coreclr" ++ "FSC" ++ "fsiAnyCpu.exe" let FSC = SCRIPT_ROOT ++ ".." ++ ".." ++ "tests" ++ "testbin" ++ configurationName ++ "coreclr" ++ "FSC" ++ "fsc.exe" let FSCOREDLLPATH = "" #endif @@ -191,6 +206,7 @@ let config configurationName envVars = BUILD_CONFIG = configurationName FSC = FSC FSI = FSI + FSIANYCPU = FSIANYCPU FSI_FOR_SCRIPTS = FSI_FOR_SCRIPTS csc_flags = csc_flags fsc_flags = fsc_flags @@ -211,6 +227,7 @@ let logConfig (cfg: TestConfig) = log "FSCBINPATH =%s" cfg.FSCBinPath log "FSCOREDLLPATH =%s" cfg.FSCOREDLLPATH log "FSI =%s" cfg.FSI + log "FSIANYCPU =%s" cfg.FSIANYCPU log "fsi_flags =%s" cfg.fsi_flags log "ILDASM =%s" cfg.ILDASM log "PEVERIFY =%s" cfg.PEVERIFY @@ -259,9 +276,11 @@ type public InitializeSuiteAttribute () = inherit TestActionAttribute() override x.BeforeTest details = - if details.IsSuite - then suiteHelpers.Force() |> ignore - + try + if details.IsSuite + then suiteHelpers.Force() |> ignore + with + | e -> raise (Exception("failed test suite initialization, debug code in InitializeSuiteAttribute", e)) override x.AfterTest _details = () @@ -418,6 +437,7 @@ let ildasm cfg arg = Printf.ksprintf (Commands.ildasm (exec cfg) cfg.ILDASM) arg let peverify cfg = Commands.peverify (exec cfg) cfg.PEVERIFY "/nologo" let peverifyWithArgs cfg args = Commands.peverify (exec cfg) cfg.PEVERIFY args let fsi cfg = Printf.ksprintf (Commands.fsi (exec cfg) cfg.FSI) +let fsiAnyCpu cfg = Printf.ksprintf (Commands.fsi (exec cfg) cfg.FSIANYCPU) let fsi_script cfg = Printf.ksprintf (Commands.fsi (exec cfg) cfg.FSI_FOR_SCRIPTS) let fsiExpectFail cfg = Printf.ksprintf (Commands.fsi (execExpectFail cfg) cfg.FSI) let fsiAppendIgnoreExitCode cfg stdoutPath stderrPath = Printf.ksprintf (Commands.fsi (execAppendIgnoreExitCode cfg stdoutPath stderrPath) cfg.FSI) @@ -427,6 +447,7 @@ let fileExists cfg = Commands.fileExists cfg.Directory >> Option.isSome let fsiStdin cfg stdinPath = Printf.ksprintf (Commands.fsi (execStdin cfg stdinPath) cfg.FSI) let fsiStdinAppendBothIgnoreExitCode cfg stdoutPath stderrPath stdinPath = Printf.ksprintf (Commands.fsi (execStdinAppendBothIgnoreExitCode cfg stdoutPath stderrPath stdinPath) cfg.FSI) let rm cfg x = Commands.rm cfg.Directory x +let rmdir cfg x = Commands.rmdir cfg.Directory x let mkdir cfg = Commands.mkdir_p cfg.Directory let copy_y cfg f = Commands.copy_y cfg.Directory f >> checkResult diff --git a/tests/fsharp/tests.fs b/tests/fsharp/tests.fs index 4a4d35de55b..72e48f87e90 100644 --- a/tests/fsharp/tests.fs +++ b/tests/fsharp/tests.fs @@ -1,5 +1,5 @@ -#if INTERACTIVE -//#r @"../../release/net40/bin/FSharp.Compiler.dll" +// vvvvvvvvvvvvv To run these tests in F# Interactive , 'build net40', then send this chunk, then evaluate body of a test vvvvvvvvvvvvvvvv +#if INTERACTIVE #r @"../../packages/NUnit.3.5.0/lib/net45/nunit.framework.dll" #load "../../src/scripts/scriptlib.fsx" #load "test-framework.fs" @@ -25,6 +25,7 @@ let FSI_BASIC = FSI_CORECLR let FSC_BASIC = FSC_OPT_PLUS_DEBUG let FSI_BASIC = FSI_FILE #endif +// ^^^^^^^^^^^^ To run these tests in F# Interactive , 'build net40', then send this chunk, then evaluate body of a test ^^^^^^^^^^^^ module CoreTests = // These tests are enabled for .NET Framework and .NET Core @@ -170,25 +171,110 @@ module CoreTests = [] let ``attributes-FSI_BASIC`` () = singleTestBuildAndRun "core/attributes" FSI_BASIC -#endif -#if !FSHARP_SUITE_DRIVES_CORECLR_TESTS [] let byrefs () = let cfg = testConfig "core/byrefs" + begin + use testOkFile = fileguard cfg "test.ok" + + fsc cfg "%s -o:test.exe -g" cfg.fsc_flags ["test.fsx"] + + singleNegTest cfg "test" + + exec cfg ("." ++ "test.exe") "" + + testOkFile.CheckExists() + end + + begin + use testOkFile = fileguard cfg "test.ok" + fsi cfg "" ["test.fsx"] + + testOkFile.CheckExists() + end + + begin + + use testOkFile = fileguard cfg "test.ok" + + fsiAnyCpu cfg "" ["test.fsx"] + + testOkFile.CheckExists() + end + + begin + use testOkFile = fileguard cfg "test2.ok" + + fsc cfg "%s -o:test2.exe -g" cfg.fsc_flags ["test2.fsx"] + + singleNegTest cfg "test2" + + exec cfg ("." ++ "test2.exe") "" + + testOkFile.CheckExists() + end + + [] + let span () = + + let cfg = testConfig "core/span" + + let cfg = { cfg with fsc_flags = sprintf "%s --test:StackSpan" cfg.fsc_flags} + + begin + use testOkFile = fileguard cfg "test.ok" + + fsc cfg "%s -o:test.exe -g" cfg.fsc_flags ["test.fsx"] + + singleNegTest cfg "test" + + // Execution is disabled until we can be sure .NET 4.7.2 is on the machine + //exec cfg ("." ++ "test.exe") "" + + //testOkFile.CheckExists() + end + + begin + use testOkFile = fileguard cfg "test2.ok" + + fsc cfg "%s -o:test2.exe -g" cfg.fsc_flags ["test2.fsx"] + + singleNegTest cfg "test2" + + // Execution is disabled until we can be sure .NET 4.7.2 is on the machine + //exec cfg ("." ++ "test.exe") "" + + //testOkFile.CheckExists() + end + + begin + use testOkFile = fileguard cfg "test3.ok" + + fsc cfg "%s -o:test3.exe -g" cfg.fsc_flags ["test3.fsx"] + + singleNegTest cfg "test3" + + // Execution is disabled until we can be sure .NET 4.7.2 is on the machine + //exec cfg ("." ++ "test.exe") "" + + //testOkFile.CheckExists() + end + + [] + let asyncStackTraces () = + let cfg = testConfig "core/asyncStackTraces" + use testOkFile = fileguard cfg "test.ok" - fsc cfg "%s -o:test.exe -g" cfg.fsc_flags ["test.fsx"] + fsc cfg "%s -o:test.exe -g --tailcalls- --optimize-" cfg.fsc_flags ["test.fsx"] exec cfg ("." ++ "test.exe") "" testOkFile.CheckExists() - fsi cfg "" ["test.fsx"] - - testOkFile.CheckExists() #endif [] @@ -226,6 +312,14 @@ module CoreTests = [] let csext () = singleTestBuildAndRun "core/csext" FSC_BASIC + + [] + let fscenum () = singleTestBuildAndRun "core/enum" FSC_BASIC + + [] + let fsienum () = singleTestBuildAndRun "core/enum" FSI_BASIC + + #if !FSHARP_SUITE_DRIVES_CORECLR_TESTS [] @@ -362,19 +456,22 @@ module CoreTests = peverify cfg "lib.dll" - csc cfg """/nologo /target:library /r:"%s" /r:lib.dll /out:lib2.dll""" cfg.FSCOREDLLPATH ["lib2.cs"] + csc cfg """/nologo /target:library /r:"%s" /r:lib.dll /out:lib2.dll /langversion:7.2""" cfg.FSCOREDLLPATH ["lib2.cs"] - csc cfg """/nologo /target:library /r:"%s" /out:lib3.dll""" cfg.FSCOREDLLPATH ["lib3.cs"] + csc cfg """/nologo /target:library /r:"%s" /out:lib3.dll /langversion:7.2""" cfg.FSCOREDLLPATH ["lib3.cs"] fsc cfg "%s -r:lib.dll -r:lib2.dll -r:lib3.dll -o:test.exe -g" cfg.fsc_flags ["test.fsx"] peverify cfg "test.exe" + exec cfg ("." ++ "test.exe") "" + // Same with library references the other way around fsc cfg "%s -r:lib.dll -r:lib3.dll -r:lib2.dll -o:test.exe -g" cfg.fsc_flags ["test.fsx"] peverify cfg "test.exe" + exec cfg ("." ++ "test.exe") "" // Same without the reference to lib.dll - testing an incomplete reference set, but only compiling a subset of the code fsc cfg "%s -r:System.Runtime.dll --noframework --define:NO_LIB_REFERENCE -r:lib3.dll -r:lib2.dll -o:test.exe -g" cfg.fsc_flags ["test.fsx"] @@ -843,6 +940,66 @@ module CoreTests = [] let recordResolution () = singleTestBuildAndRun "core/recordResolution" FSC_OPT_PLUS_DEBUG + [] + let ``no-warn-2003-tests`` () = + // see https://github.com/Microsoft/visualfsharp/issues/3139 + let cfg = testConfig "core/versionAttributes" + let stdoutPath = "out.stdout.txt" |> getfullpath cfg + let stderrPath = "out.stderr.txt" |> getfullpath cfg + let stderrBaseline = "out.stderr.bsl" |> getfullpath cfg + let stdoutBaseline = "out.stdout.bsl" |> getfullpath cfg + let echo text = + Commands.echoAppendToFile cfg.Directory text stdoutPath + Commands.echoAppendToFile cfg.Directory text stderrPath + + File.WriteAllText(stdoutPath, "") + File.WriteAllText(stderrPath, "") + + echo "Test 1=================================================" + fscAppend cfg stdoutPath stderrPath "--nologo" ["NoWarn2003.fs"] + + echo "Test 2=================================================" + fscAppend cfg stdoutPath stderrPath "--nologo" ["NoWarn2003_2.fs"] + + echo "Test 3=================================================" + fscAppend cfg stdoutPath stderrPath "--nologo" ["Warn2003_1.fs"] + + echo "Test 4=================================================" + fscAppend cfg stdoutPath stderrPath "--nologo" ["Warn2003_2.fs"] + + echo "Test 5=================================================" + fscAppend cfg stdoutPath stderrPath "--nologo" ["Warn2003_3.fs"] + + echo "Test 6=================================================" + fscAppend cfg stdoutPath stderrPath "--nologo --nowarn:2003" ["Warn2003_1.fs"] + + echo "Test 7=================================================" + fscAppend cfg stdoutPath stderrPath "--nologo --nowarn:2003" ["Warn2003_2.fs"] + + echo "Test 8=================================================" + fscAppend cfg stdoutPath stderrPath "--nologo --nowarn:2003" ["Warn2003_3.fs"] + + let normalizePaths f = + let text = File.ReadAllText(f) + let dummyPath = @"D:\staging\staging\src\tests\fsharp\core\load-script" + let contents = System.Text.RegularExpressions.Regex.Replace(text, System.Text.RegularExpressions.Regex.Escape(cfg.Directory), dummyPath) + File.WriteAllText(f, contents) + + normalizePaths stdoutPath + normalizePaths stderrPath + + let diffs = fsdiff cfg stdoutPath stdoutBaseline + + match diffs with + | "" -> () + | _ -> Assert.Fail (sprintf "'%s' and '%s' differ; %A" stdoutPath stdoutBaseline diffs) + + let diffs2 = fsdiff cfg stderrPath stderrBaseline + + match diffs2 with + | "" -> () + | _ -> Assert.Fail (sprintf "'%s' and '%s' differ; %A" stderrPath stderrBaseline diffs2) + [] let ``load-script`` () = let cfg = testConfig "core/load-script" @@ -1236,7 +1393,44 @@ module CoreTests = [] let reflect () = singleTestBuildAndRun "core/reflect" FSC_BASIC + #if !FSHARP_SUITE_DRIVES_CORECLR_TESTS + [] + let refnormalization () = + let cfg = testConfig "core/refnormalization" + + // Prepare by building multiple versions of the test assemblies + fsc cfg @"%s --target:library -o:version1\DependentAssembly.dll -g --version:1.0.0.0 --keyfile:keyfile.snk" cfg.fsc_flags [@"DependentAssembly.fs"] + fsc cfg @"%s --target:library -o:version1\AscendentAssembly.dll -g --version:1.0.0.0 --keyfile:keyfile.snk -r:version1\DependentAssembly.dll" cfg.fsc_flags [@"AscendentAssembly.fs"] + + fsc cfg @"%s --target:library -o:version2\DependentAssembly.dll -g --version:2.0.0.0" cfg.fsc_flags [@"DependentAssembly.fs"] + fsc cfg @"%s --target:library -o:version2\AscendentAssembly.dll -g --version:2.0.0.0 -r:version2\DependentAssembly.dll" cfg.fsc_flags [@"AscendentAssembly.fs"] + + //TestCase1 + // Build a program that references v2 of ascendent and v1 of dependent. + // Note that, even though ascendent v2 references dependent v2, the reference is marked as v1. + use TestOk = fileguard cfg "test.ok" + fsc cfg @"%s -o:test1.exe -r:version1\DependentAssembly.dll -r:version2\AscendentAssembly.dll --optimize- -g" cfg.fsc_flags ["test.fs"] + exec cfg ("." ++ "test1.exe") "DependentAssembly-1.0.0.0 AscendentAssembly-2.0.0.0" + TestOk.CheckExists() + + //TestCase2 + // Build a program that references v1 of ascendent and v2 of dependent. + // Note that, even though ascendent v1 references dependent v1, the reference is marked as v2 which was passed in. + use TestOk = fileguard cfg "test.ok" + fsc cfg @"%s -o:test2.exe -r:version2\DependentAssembly.dll -r:version1\AscendentAssembly.dll --optimize- -g" cfg.fsc_flags ["test.fs"] + exec cfg ("." ++ "test2.exe") "DependentAssembly-2.0.0.0 AscendentAssembly-1.0.0.0" + TestOk.CheckExists() + + //TestCase3 + // Build a program that references v1 of ascendent and v1 and v2 of dependent. + // Verifies that compiler uses first version of a duplicate assembly passed on command line. + use TestOk = fileguard cfg "test.ok" + fsc cfg @"%s -o:test3.exe -r:version1\DependentAssembly.dll -r:version2\DependentAssembly.dll -r:version1\AscendentAssembly.dll --optimize- -g" cfg.fsc_flags ["test.fs"] + exec cfg ("." ++ "test3.exe") "DependentAssembly-1.0.0.0 AscendentAssembly-1.0.0.0" + TestOk.CheckExists() + + [] let testResources () = let cfg = testConfig "core/resources" @@ -1457,11 +1651,23 @@ module ToolsTests = module RegressionTests = - [] + [] + let ``literal-value-bug-2-FSC_BASIC`` () = singleTestBuildAndRun "regression/literal-value-bug-2" FSC_BASIC + + [] + let ``literal-value-bug-2-FSI_BASIC`` () = singleTestBuildAndRun "regression/literal-value-bug-2" FSI_BASIC + + [] + let ``OverloadResolution-bug-FSC_BASIC`` () = singleTestBuildAndRun "regression/OverloadResolution-bug" FSC_BASIC + + [] + let ``OverloadResolution-bug-FSI_BASIC`` () = singleTestBuildAndRun "regression/OverloadResolution-bug" FSI_BASIC + + [] let ``struct-tuple-bug-1-FSC_BASIC`` () = singleTestBuildAndRun "regression/struct-tuple-bug-1" FSC_BASIC [] - let ``tuple-bug-1`` () = singleTestBuildAndRun "regression/tuple-bug-1" FSC_BASIC + let ``tuple-bug-1-FSC_BASIC`` () = singleTestBuildAndRun "regression/tuple-bug-1" FSC_BASIC [] let ``26`` () = singleTestBuildAndRun "regression/26" FSC_BASIC @@ -1678,12 +1884,24 @@ module TypecheckTests = #endif #if !FSHARP_SUITE_DRIVES_CORECLR_TESTS + + [] + let ``sigs pos26`` () = + let cfg = testConfig "typecheck/sigs" + fsc cfg "%s --target:exe -o:pos26.exe" cfg.fsc_flags ["pos26.fsi"; "pos26.fs"] + peverify cfg "pos26.exe" + + [] + let ``sigs pos25`` () = + let cfg = testConfig "typecheck/sigs" + fsc cfg "%s --target:exe -o:pos25.exe" cfg.fsc_flags ["pos25.fs"] + peverify cfg "pos25.exe" + [] let ``sigs pos27`` () = let cfg = testConfig "typecheck/sigs" fsc cfg "%s --target:exe -o:pos27.exe" cfg.fsc_flags ["pos27.fs"] copy_y cfg (cfg.FSCBinPath ++ "System.ValueTuple.dll") ("." ++ "System.ValueTuple.dll") - peverify cfg "pos27.exe" [] @@ -1693,16 +1911,16 @@ module TypecheckTests = peverify cfg "pos28.exe" [] - let ``sigs pos26`` () = + let ``sigs pos29`` () = let cfg = testConfig "typecheck/sigs" - fsc cfg "%s --target:exe -o:pos26.exe" cfg.fsc_flags ["pos26.fsi"; "pos26.fs"] - peverify cfg "pos26.exe" + fsc cfg "%s --target:exe -o:pos29.exe" cfg.fsc_flags ["pos29.fsi"; "pos29.fs"; "pos29.app.fs"] + peverify cfg "pos29.exe" [] - let ``sigs pos25`` () = + let ``sigs pos30`` () = let cfg = testConfig "typecheck/sigs" - fsc cfg "%s --target:exe -o:pos25.exe" cfg.fsc_flags ["pos25.fs"] - peverify cfg "pos25.exe" + fsc cfg "%s --target:exe -o:pos30.exe --warnaserror+" cfg.fsc_flags ["pos30.fs"] + peverify cfg "pos30.exe" [] let ``sigs pos24`` () = @@ -1710,6 +1928,12 @@ module TypecheckTests = fsc cfg "%s --target:exe -o:pos24.exe" cfg.fsc_flags ["pos24.fs"] peverify cfg "pos24.exe" + [] + let ``sigs pos31`` () = + let cfg = testConfig "typecheck/sigs" + fsc cfg "%s --target:exe -o:pos31.exe --warnaserror" cfg.fsc_flags ["pos31.fsi"; "pos31.fs"] + peverify cfg "pos31.exe" + [] let ``sigs pos23`` () = let cfg = testConfig "typecheck/sigs" @@ -2162,6 +2386,30 @@ module TypecheckTests = [] let ``type check neg101`` () = singleNegTest (testConfig "typecheck/sigs") "neg101" + [] + let ``type check neg102`` () = singleNegTest (testConfig "typecheck/sigs") "neg102" + + [] + let ``type check neg106`` () = singleNegTest (testConfig "typecheck/sigs") "neg106" + + [] + let ``type check neg107`` () = singleNegTest (testConfig "typecheck/sigs") "neg107" + + [] + let ``type check neg108`` () = singleNegTest (testConfig "typecheck/sigs") "neg108" + + [] + let ``type check neg109`` () = singleNegTest (testConfig "typecheck/sigs") "neg109" + + [] + let ``type check neg103`` () = singleNegTest (testConfig "typecheck/sigs") "neg103" + + [] + let ``type check neg104`` () = singleNegTest (testConfig "typecheck/sigs") "neg104" + + [] + let ``type check neg_issue_3752`` () = singleNegTest (testConfig "typecheck/sigs") "neg_issue_3752" + [] let ``type check neg_byref_1`` () = singleNegTest (testConfig "typecheck/sigs") "neg_byref_1" @@ -2297,7 +2545,7 @@ open System.Runtime.InteropServices fv.LegalTrademarks |> Assert.areEqual "CST \u2122" #endif -#if !FX_PORTABLE_OR_NETSTANDARD +#if !NETSTANDARD1_6 module ProductVersionTest = let informationalVersionAttrName = typeof.FullName diff --git a/tests/fsharp/tools/eval/test.fsx b/tests/fsharp/tools/eval/test.fsx index 80907e8a5c4..535a54799a4 100644 --- a/tests/fsharp/tools/eval/test.fsx +++ b/tests/fsharp/tools/eval/test.fsx @@ -1,6 +1,6 @@ #light -#if !FX_PORTABLE_OR_NETSTANDARD +#if !NETCOREAPP1_0 #r @"System.Core.dll" #r @"System.Data.Linq.dll" #endif diff --git a/tests/fsharp/typeProviders/helloWorld/provided.fs b/tests/fsharp/typeProviders/helloWorld/provided.fs index f3ce98f61d6..bcdc86452eb 100644 --- a/tests/fsharp/typeProviders/helloWorld/provided.fs +++ b/tests/fsharp/typeProviders/helloWorld/provided.fs @@ -1,5 +1,8 @@ namespace global +[] +do () + type TheGeneratedType1() = member x.Prop1 = 1 static member (+) (x1:TheGeneratedType1,x2:TheGeneratedType1) = x1 diff --git a/tests/fsharp/typeProviders/splitAssembly/provider.fs b/tests/fsharp/typeProviders/splitAssemblyTools/provider.fs similarity index 100% rename from tests/fsharp/typeProviders/splitAssembly/provider.fs rename to tests/fsharp/typeProviders/splitAssemblyTools/provider.fs diff --git a/tests/fsharp/typeProviders/splitAssembly/providerDesigner.fsx b/tests/fsharp/typeProviders/splitAssemblyTools/providerDesigner.fsx similarity index 100% rename from tests/fsharp/typeProviders/splitAssembly/providerDesigner.fsx rename to tests/fsharp/typeProviders/splitAssemblyTools/providerDesigner.fsx diff --git a/tests/fsharp/typeProviders/splitAssembly/test.fsx b/tests/fsharp/typeProviders/splitAssemblyTools/test.fsx similarity index 100% rename from tests/fsharp/typeProviders/splitAssembly/test.fsx rename to tests/fsharp/typeProviders/splitAssemblyTools/test.fsx diff --git a/tests/fsharp/typeProviders/splitAssemblyTypeproviders/provider.fs b/tests/fsharp/typeProviders/splitAssemblyTypeproviders/provider.fs new file mode 100644 index 00000000000..732486441a9 --- /dev/null +++ b/tests/fsharp/typeProviders/splitAssemblyTypeproviders/provider.fs @@ -0,0 +1,17 @@ +namespace Microsoft.FSharp.Core.CompilerServices + +type TypeProviderAssemblyAttribute(assemblyName) = + inherit System.Attribute() + + new() = TypeProviderAssemblyAttribute(null) + member this.AssemblyName + with get () = assemblyName + +[] +do() + + +namespace My + type Runtime = + static member Id x = x + diff --git a/tests/fsharp/typeProviders/splitAssemblyTypeproviders/providerDesigner.fsx b/tests/fsharp/typeProviders/splitAssemblyTypeproviders/providerDesigner.fsx new file mode 100644 index 00000000000..3f2183fd899 --- /dev/null +++ b/tests/fsharp/typeProviders/splitAssemblyTypeproviders/providerDesigner.fsx @@ -0,0 +1,51 @@ +namespace Provider +#load @"..\helloWorld\TypeMagic.fs" +open Microsoft.FSharp.Core.CompilerServices +open System.Collections.Generic +open System.IO +open System +open System.Reflection +open System.Linq.Expressions +open FSharp.TypeMagic + +[] +type public Provider(config : TypeProviderConfig) = + let runtimeAssembly = Assembly.ReflectionOnlyLoadFrom(config.RuntimeAssembly) + let modul = runtimeAssembly.GetModules().[0] + + let ``My.Runtime`` = runtimeAssembly.GetType("My.Runtime") + let rootNamespace = "FSharp.SplitAssembly" + let invalidation = new Event() + + let theType = + let rec members = + lazy + [| let p = TypeBuilder.CreateSyntheticProperty(theType,"Foo",typeof,isStatic=true) + yield! TypeBuilder.JoinPropertiesIntoMemberInfos [p] + |] + and theType = + TypeBuilder.CreateSimpleType(TypeContainer.Namespace(modul,rootNamespace),"TheType", members = members) + theType + + interface IProvidedNamespace with + member this.NamespaceName = rootNamespace + member this.GetNestedNamespaces() = [||] + member this.ResolveTypeName typeName = + match typeName with + | "TheType" -> theType + | _ -> null + member this.GetTypes() = [| theType |] + + interface IDisposable with + member __.Dispose() = () + interface ITypeProvider with + member this.ApplyStaticArguments (st,_,_) = st + member this.GetInvokerExpression(mb,p) = + let mi = ``My.Runtime``.GetMethod("Id").MakeGenericMethod([|typeof|]) + Quotations.Expr.Call(mi, [ Quotations.Expr.Value(42) ]) + member this.GetNamespaces() = [| this |] + member this.GetStaticParameters st = [||] + [] + member this.Invalidate = invalidation.Publish + member this.GetGeneratedAssemblyContents(assembly) = failwith "GetGeneratedAssemblyContents - only erased types were provided!!" + diff --git a/tests/fsharp/typeProviders/splitAssemblyTypeproviders/test.fsx b/tests/fsharp/typeProviders/splitAssemblyTypeproviders/test.fsx new file mode 100644 index 00000000000..e25871ab5f8 --- /dev/null +++ b/tests/fsharp/typeProviders/splitAssemblyTypeproviders/test.fsx @@ -0,0 +1,32 @@ +#r "provider.dll" + +let mutable failures = [] +let reportFailure s = + stdout.WriteLine "\n................TEST FAILED...............\n"; failures <- failures @ [s] + +let check s e r = + if r = e then stdout.WriteLine (s+": YES") + else (stdout.WriteLine ("\n***** "+s+": FAIL\n"); reportFailure s) + +let test s b = + if b then ( (* stdout.WriteLine ("passed: " + s) *) ) + else (stderr.WriteLine ("failure: " + s); + reportFailure s) +(*========================================================================*) + +check "fgdjkwefg" + FSharp.SplitAssembly.TheType.Foo + 42 + +(*--------------------------------------------------------------------------- +!* wrap up + *--------------------------------------------------------------------------- *) + +let _ = + if not failures.IsEmpty then (printfn "Test Failed, failures = %A" failures; exit 1) + +do (stdout.WriteLine "Test Passed"; + System.IO.File.WriteAllText("test.ok","ok"); + exit 0) + + diff --git a/tests/fsharp/typecheck/sigs/neg101.bsl b/tests/fsharp/typecheck/sigs/neg101.bsl index 65e8cf1fd44..84e53b5e6ab 100644 --- a/tests/fsharp/typecheck/sigs/neg101.bsl +++ b/tests/fsharp/typecheck/sigs/neg101.bsl @@ -1,2 +1,74 @@ -neg101.fs(7,11,7,14): typecheck error FS0039: The field, constructor or member 'Foo' is not defined. \ No newline at end of file +neg101.fs(7,11,7,14): typecheck error FS0039: The field, constructor or member 'Foo' is not defined. + +neg101.fs(14,6,14,17): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. + +neg101.fs(15,6,15,17): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. + +neg101.fs(16,6,16,19): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. + +neg101.fs(17,6,17,19): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. + +neg101.fs(18,6,18,19): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. + +neg101.fs(19,6,19,21): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. + +neg101.fs(20,6,20,21): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. + +neg101.fs(21,6,21,21): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. + +neg101.fs(22,6,22,21): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. + +neg101.fs(23,6,23,23): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. + +neg101.fs(24,6,24,23): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. + +neg101.fs(25,6,25,23): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. + +neg101.fs(26,6,26,23): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. + +neg101.fs(27,6,27,23): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. + +neg101.fs(28,6,28,25): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. + +neg101.fs(29,6,29,25): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. + +neg101.fs(30,6,30,25): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. + +neg101.fs(31,6,31,25): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. + +neg101.fs(32,6,32,25): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. + +neg101.fs(33,6,33,25): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. + +neg101.fs(34,6,34,27): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. + +neg101.fs(35,6,35,27): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. + +neg101.fs(36,6,36,27): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. + +neg101.fs(37,6,37,27): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. + +neg101.fs(38,6,38,27): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. + +neg101.fs(39,6,39,27): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. + +neg101.fs(40,6,40,27): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. + +neg101.fs(41,6,41,29): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. + +neg101.fs(42,6,42,29): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. + +neg101.fs(43,6,43,29): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. + +neg101.fs(44,6,44,29): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. + +neg101.fs(45,6,45,29): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. + +neg101.fs(46,6,46,29): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. + +neg101.fs(47,6,47,29): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. + +neg101.fs(49,10,49,32): typecheck error FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. + +neg101.fs(50,16,50,20): typecheck error FS0039: The field, constructor or member 'Rest' is not defined. diff --git a/tests/fsharp/typecheck/sigs/neg101.fs b/tests/fsharp/typecheck/sigs/neg101.fs index 482d68a2f40..46e642d20a9 100644 --- a/tests/fsharp/typecheck/sigs/neg101.fs +++ b/tests/fsharp/typecheck/sigs/neg101.fs @@ -1,9 +1,62 @@ module M - +open System type MyRec = { Foo: string } let x: int = 1 let y = x.Foo let f1 z = z.Foo let f2 (z: MyRec) = z.Foo + + +// all give a warning +let x1 = + [ (1,2).Item1 + (1,2).Item2 + (1,2,3).Item1 + (1,2,3).Item2 + (1,2,3).Item3 + (1,2,3,4).Item1 + (1,2,3,4).Item2 + (1,2,3,4).Item3 + (1,2,3,4).Item4 + (1,2,3,4,5).Item1 + (1,2,3,4,5).Item2 + (1,2,3,4,5).Item3 + (1,2,3,4,5).Item4 + (1,2,3,4,5).Item5 + (1,2,3,4,5,6).Item1 + (1,2,3,4,5,6).Item2 + (1,2,3,4,5,6).Item3 + (1,2,3,4,5,6).Item4 + (1,2,3,4,5,6).Item5 + (1,2,3,4,5,6).Item6 + (1,2,3,4,5,6,7).Item1 + (1,2,3,4,5,6,7).Item2 + (1,2,3,4,5,6,7).Item3 + (1,2,3,4,5,6,7).Item4 + (1,2,3,4,5,6,7).Item5 + (1,2,3,4,5,6,7).Item6 + (1,2,3,4,5,6,7).Item7 + (1,2,3,4,5,6,7,8).Item1 + (1,2,3,4,5,6,7,8).Item2 + (1,2,3,4,5,6,7,8).Item3 + (1,2,3,4,5,6,7,8).Item4 + (1,2,3,4,5,6,7,8).Item5 + (1,2,3,4,5,6,7,8).Item6 + (1,2,3,4,5,6,7,8).Item7 ] + +let x2 = (1,2,3,4,5,6,7,8).Rest // gives a warning +let x3 = (1,2).Rest // gives an actual error +let x4 = (struct (1,2)).ToTuple() // no error or warning + +open System.Runtime.CompilerServices + +[] +type TupleEx() = + [] + static member inline Do((x,y): (int*string)) = () + +let x = 1, "2" + +x.Do() // no warning diff --git a/tests/fsharp/typecheck/sigs/neg102.bsl b/tests/fsharp/typecheck/sigs/neg102.bsl new file mode 100644 index 00000000000..333f0e34d17 --- /dev/null +++ b/tests/fsharp/typecheck/sigs/neg102.bsl @@ -0,0 +1,18 @@ + +neg102.fs(9,14,9,22): typecheck error FS0025: Incomplete pattern matches on this expression. For example, the value 'B' may indicate a case not covered by the pattern(s). + +neg102.fs(12,14,12,22): typecheck error FS0025: Incomplete pattern matches on this expression. For example, the value '0' may indicate a case not covered by the pattern(s). + +neg102.fs(15,14,15,22): typecheck error FS0025: Incomplete pattern matches on this expression. For example, the value 'EnumABC.B' may indicate a case not covered by the pattern(s). + +neg102.fs(18,14,18,22): typecheck error FS0025: Incomplete pattern matches on this expression. For example, the value 'EnumABC.C' may indicate a case not covered by the pattern(s). + +neg102.fs(22,14,22,22): typecheck error FS0025: Incomplete pattern matches on this expression. For example, the value 'Some (EnumABC.C)' may indicate a case not covered by the pattern(s). + +neg102.fs(27,14,27,22): typecheck error FS0025: Incomplete pattern matches on this expression. For example, the value 'System.DateTimeKind.Utc' may indicate a case not covered by the pattern(s). + +neg102.fs(32,14,32,22): typecheck error FS0104: Enums may take values outside known cases. For example, the value 'enum (2)' may indicate a case not covered by the pattern(s). + +neg102.fs(37,14,37,22): typecheck error FS0104: Enums may take values outside known cases. For example, the value 'Some (enum (2))' may indicate a case not covered by the pattern(s). + +neg102.fs(44,14,44,22): typecheck error FS0104: Enums may take values outside known cases. For example, the value 'enum (3)' may indicate a case not covered by the pattern(s). diff --git a/tests/fsharp/typecheck/sigs/neg102.fs b/tests/fsharp/typecheck/sigs/neg102.fs new file mode 100644 index 00000000000..5eb13cdc79f --- /dev/null +++ b/tests/fsharp/typecheck/sigs/neg102.fs @@ -0,0 +1,47 @@ +module M +type EnumABC = A = 0 | B = 1 | C = 42 +type UnionAB = A | B + +module FS0025 = + // All of these should emit warning FS0025 ("Incomplete pattern match....") + + + let f1 = function + | UnionAB.A -> "A" + + let f2 = function + | 42 -> "forty-two" + + let f3 = function + | EnumABC.A -> "A" + + let f4 = function + | EnumABC.A -> "A" + | EnumABC.B -> "B" + + let f5 = function + | Some(EnumABC.A) | Some(EnumABC.B) -> "A|B" + | None -> "neither" + + // try a non-F#-defined enum + let f6 = function System.DateTimeKind.Unspecified -> 0 + +module FS0104 = + // These should emit warning FS0104 ("Enums may take values outside of known cases....") + + let f1 = function + | EnumABC.A -> "A" + | EnumABC.B -> "B" + | EnumABC.C -> "C" + + let f2 = function + | Some(EnumABC.A) -> "A" + | Some(EnumABC.B) -> "B" + | Some(EnumABC.C) -> "C" + | None -> "none" + + // try a non-F#-defined enum + let f3 = function + | System.DateTimeKind.Unspecified -> "Unspecified" + | System.DateTimeKind.Utc -> "Utc" + | System.DateTimeKind.Local -> "Local" \ No newline at end of file diff --git a/tests/fsharp/typecheck/sigs/neg103.bsl b/tests/fsharp/typecheck/sigs/neg103.bsl new file mode 100644 index 00000000000..422a9e3bf81 --- /dev/null +++ b/tests/fsharp/typecheck/sigs/neg103.bsl @@ -0,0 +1,25 @@ + +neg103.fs(7,12,7,22): typecheck error FS0001: This expression was expected to have type + 'Async<'a>' +but here has type + 'string' + +neg103.fs(12,7,12,15): typecheck error FS0001: This expression was expected to have type + 'int' +but here has type + 'MyUnion' + +neg103.fs(17,7,17,15): typecheck error FS0001: This expression was expected to have type + 'int' +but here has type + 'MyUnion' + +neg103.fs(21,7,21,9): typecheck error FS0001: This expression was expected to have type + 'Async' +but here has type + 'int' + +neg103.fs(25,11,25,19): typecheck error FS0001: This expression was expected to have type + 'int' +but here has type + 'MyUnion' diff --git a/tests/fsharp/typecheck/sigs/neg103.fs b/tests/fsharp/typecheck/sigs/neg103.fs new file mode 100644 index 00000000000..5531befe649 --- /dev/null +++ b/tests/fsharp/typecheck/sigs/neg103.fs @@ -0,0 +1,25 @@ +/// match! - type check errors +module M + +type MyUnion = | CaseA of int | CaseB | CaseC of string + +let a (notAnAsync: string) = async { + match! notAnAsync with + | x -> () } + +let b (myAsync: Async) = async { + match! myAsync with + | CaseA(_) | CaseB | CaseC(_) -> () } + +let c (myAsync: Async) = async { + match! myAsync with + | 42 -> () + | CaseA(_) -> () } + +let d (myAsyncChild: Async>) = async { + match! myAsyncChild with + | 42 -> () + match! myAsyncChild with + | x -> + match! x with + | CaseA(_) | CaseB | CaseC(_) -> () } diff --git a/tests/fsharp/typecheck/sigs/neg104.bsl b/tests/fsharp/typecheck/sigs/neg104.bsl new file mode 100644 index 00000000000..aa804860dfc --- /dev/null +++ b/tests/fsharp/typecheck/sigs/neg104.bsl @@ -0,0 +1,20 @@ + +neg104.fs(14,16,14,17): parse error FS0010: Unexpected symbol '}' in expression + +neg104.fs(17,18,17,19): parse error FS0010: Unexpected symbol '}' in expression. Expected 'with' or other token. + +neg104.fs(20,23,20,24): parse error FS0010: Incomplete structured construct at or before this point in expression + +neg104.fs(23,25,23,26): parse error FS0010: Incomplete structured construct at or before this point in expression + +neg104.fs(26,28,26,29): parse error FS0010: Incomplete structured construct at or before this point in pattern + +neg104.fs(29,31,29,32): parse error FS0010: Incomplete structured construct at or before this point in pattern matching + +neg104.fs(33,14,33,20): parse error FS0010: Unexpected keyword 'match!' in expression + +neg104.fs(32,27,32,28): parse error FS0604: Unmatched '{' + +neg104.fs(35,19,35,20): parse error FS0010: Unexpected symbol '}' in definition. Expected incomplete structured construct at or before this point or other token. + +neg104.fs(35,1,35,20): parse error FS0010: Incomplete structured construct at or before this point in implementation file diff --git a/tests/fsharp/typecheck/sigs/neg104.fs b/tests/fsharp/typecheck/sigs/neg104.fs new file mode 100644 index 00000000000..ee35527a251 --- /dev/null +++ b/tests/fsharp/typecheck/sigs/neg104.fs @@ -0,0 +1,35 @@ +/// match! - parsing errors +module M + +type AT = Async + +module A = + let a (x: AT) = + match! x with _ -> () + let b (x: int) = + match! x with _ -> () + +module B = + let a (x: AT) = async { + match! } + + let b (x: AT) = async { + match! x } + + let c (x: AT) = async { + match! x with } + + let d (x: AT) = async { + match! x with | } + + let e (x: AT) = async { + match! x with | x' } + + let f (x: AT) = async { + match! x with | x' -> } + +module C = + let a (x: AT) = async { + let! match! = x + let! x = match! + return () } \ No newline at end of file diff --git a/tests/fsharp/typecheck/sigs/neg104.vsbsl b/tests/fsharp/typecheck/sigs/neg104.vsbsl new file mode 100644 index 00000000000..1fe8b3683ef --- /dev/null +++ b/tests/fsharp/typecheck/sigs/neg104.vsbsl @@ -0,0 +1,34 @@ + +neg104.fs(14,16,14,17): parse error FS0010: Unexpected symbol '}' in expression + +neg104.fs(17,18,17,19): parse error FS0010: Unexpected symbol '}' in expression. Expected 'with' or other token. + +neg104.fs(20,23,20,24): parse error FS0010: Incomplete structured construct at or before this point in expression + +neg104.fs(23,25,23,26): parse error FS0010: Incomplete structured construct at or before this point in expression + +neg104.fs(26,28,26,29): parse error FS0010: Incomplete structured construct at or before this point in pattern + +neg104.fs(29,31,29,32): parse error FS0010: Incomplete structured construct at or before this point in pattern matching + +neg104.fs(33,14,33,20): parse error FS0010: Unexpected keyword 'match!' in expression + +neg104.fs(32,27,32,28): parse error FS0604: Unmatched '{' + +neg104.fs(35,19,35,20): parse error FS0010: Unexpected symbol '}' in definition. Expected incomplete structured construct at or before this point or other token. + +neg104.fs(35,1,35,20): parse error FS0010: Incomplete structured construct at or before this point in implementation file + +neg104.fs(8,9,8,30): typecheck error FS0750: This construct may only be used within computation expressions + +neg104.fs(10,9,10,30): typecheck error FS0750: This construct may only be used within computation expressions + +neg104.fs(20,9,20,22): typecheck error FS0025: Incomplete pattern matches on this expression. + +neg104.fs(23,9,23,22): typecheck error FS0025: Incomplete pattern matches on this expression. + +neg104.fs(26,9,26,22): typecheck error FS0025: Incomplete pattern matches on this expression. + +neg104.fs(32,21,32,26): typecheck error FS0003: This value is not a function and cannot be applied. + +neg104.fs(35,9,35,18): typecheck error FS0748: This construct may only be used within computation expressions. To return a value from an ordinary function simply write the expression without 'return'. diff --git a/tests/fsharp/typecheck/sigs/neg106.bsl b/tests/fsharp/typecheck/sigs/neg106.bsl new file mode 100644 index 00000000000..a2109823a23 --- /dev/null +++ b/tests/fsharp/typecheck/sigs/neg106.bsl @@ -0,0 +1,228 @@ + +neg106.fs(8,59,8,61): typecheck error FS3231: A value defined in a module must be mutable in order to take its address, e.g. 'let mutable x = ...' + +neg106.fs(13,18,13,72): typecheck error FS0041: No overloads match for method 'CompareExchange'. The available overloads are shown below. +neg106.fs(13,18,13,72): typecheck error FS0041: Possible overload: 'System.Threading.Interlocked.CompareExchange(location1: byref, value: int, comparand: int) : int'. Type constraint mismatch. The type + 'inref' +is not compatible with type + 'byref' +. +neg106.fs(13,18,13,72): typecheck error FS0041: Possible overload: 'System.Threading.Interlocked.CompareExchange(location1: byref, value: int64, comparand: int64) : int64'. Type constraint mismatch. The type + 'inref' +is not compatible with type + 'byref' +. +neg106.fs(13,18,13,72): typecheck error FS0041: Possible overload: 'System.Threading.Interlocked.CompareExchange(location1: byref, value: float32, comparand: float32) : float32'. Type constraint mismatch. The type + 'inref' +is not compatible with type + 'byref' +. +neg106.fs(13,18,13,72): typecheck error FS0041: Possible overload: 'System.Threading.Interlocked.CompareExchange(location1: byref, value: float, comparand: float) : float'. Type constraint mismatch. The type + 'inref' +is not compatible with type + 'byref' +. +neg106.fs(13,18,13,72): typecheck error FS0041: Possible overload: 'System.Threading.Interlocked.CompareExchange(location1: byref, value: obj, comparand: obj) : obj'. Type constraint mismatch. The type + 'inref' +is not compatible with type + 'byref' +. +neg106.fs(13,18,13,72): typecheck error FS0041: Possible overload: 'System.Threading.Interlocked.CompareExchange(location1: byref, value: nativeint, comparand: nativeint) : nativeint'. Type constraint mismatch. The type + 'inref' +is not compatible with type + 'byref' +. +neg106.fs(13,18,13,72): typecheck error FS0041: Possible overload: 'System.Threading.Interlocked.CompareExchange<'T when 'T : not struct>(location1: byref<'T>, value: 'T, comparand: 'T) : 'T'. Type constraint mismatch. The type + 'inref' +is not compatible with type + 'byref<'a>' +. + +neg106.fs(17,59,17,61): typecheck error FS3237: Cannot take the address of the value returned from the expression. Assign the returned value to a let-bound value before taking the address. + +neg106.fs(17,14,17,68): typecheck error FS0041: No overloads match for method 'CompareExchange'. The available overloads are shown below. +neg106.fs(17,14,17,68): typecheck error FS0041: Possible overload: 'System.Threading.Interlocked.CompareExchange(location1: byref, value: int, comparand: int) : int'. Type constraint mismatch. The type + 'inref' +is not compatible with type + 'byref' +. +neg106.fs(17,14,17,68): typecheck error FS0041: Possible overload: 'System.Threading.Interlocked.CompareExchange(location1: byref, value: int64, comparand: int64) : int64'. Type constraint mismatch. The type + 'inref' +is not compatible with type + 'byref' +. +neg106.fs(17,14,17,68): typecheck error FS0041: Possible overload: 'System.Threading.Interlocked.CompareExchange(location1: byref, value: float32, comparand: float32) : float32'. Type constraint mismatch. The type + 'inref' +is not compatible with type + 'byref' +. +neg106.fs(17,14,17,68): typecheck error FS0041: Possible overload: 'System.Threading.Interlocked.CompareExchange(location1: byref, value: float, comparand: float) : float'. Type constraint mismatch. The type + 'inref' +is not compatible with type + 'byref' +. +neg106.fs(17,14,17,68): typecheck error FS0041: Possible overload: 'System.Threading.Interlocked.CompareExchange(location1: byref, value: obj, comparand: obj) : obj'. Type constraint mismatch. The type + 'inref' +is not compatible with type + 'byref' +. +neg106.fs(17,14,17,68): typecheck error FS0041: Possible overload: 'System.Threading.Interlocked.CompareExchange(location1: byref, value: nativeint, comparand: nativeint) : nativeint'. Type constraint mismatch. The type + 'inref' +is not compatible with type + 'byref' +. +neg106.fs(17,14,17,68): typecheck error FS0041: Possible overload: 'System.Threading.Interlocked.CompareExchange<'T when 'T : not struct>(location1: byref<'T>, value: 'T, comparand: 'T) : 'T'. Type constraint mismatch. The type + 'inref' +is not compatible with type + 'byref<'a>' +. + +neg106.fs(23,35,23,39): typecheck error FS0001: Type mismatch. Expecting a + 'byref' +but given a + 'inref' +The type 'ByRefKinds.InOut' does not match the type 'ByRefKinds.In' + +neg106.fs(31,22,31,26): typecheck error FS0001: Type mismatch. Expecting a + 'byref' +but given a + 'inref' +The type 'ByRefKinds.InOut' does not match the type 'ByRefKinds.In' + +neg106.fs(40,18,40,32): typecheck error FS0041: No overloads match for method 'M'. The available overloads are shown below. +neg106.fs(40,18,40,32): typecheck error FS0041: Possible overload: 'static member C.M : a:string * x:byref -> unit'. Type constraint mismatch. The type + 'inref' +is not compatible with type + 'byref' +. +neg106.fs(40,18,40,32): typecheck error FS0041: Possible overload: 'static member C.M : a:int * x:byref -> unit'. Type constraint mismatch. The type + 'string' +is not compatible with type + 'int' +. + +neg106.fs(41,19,41,31): typecheck error FS0041: No overloads match for method 'M'. The available overloads are shown below. +neg106.fs(41,19,41,31): typecheck error FS0041: Possible overload: 'static member C.M : a:string * x:byref -> unit'. Type constraint mismatch. The type + 'int' +is not compatible with type + 'string' +. +neg106.fs(41,19,41,31): typecheck error FS0041: Possible overload: 'static member C.M : a:int * x:byref -> unit'. Type constraint mismatch. The type + 'inref' +is not compatible with type + 'byref' +. + +neg106.fs(49,22,49,26): typecheck error FS0001: Type mismatch. Expecting a + 'byref' +but given a + 'inref' +The type 'ByRefKinds.InOut' does not match the type 'ByRefKinds.In' + +neg106.fs(60,9,60,25): typecheck error FS3224: The byref pointer is readonly, so this write is not permitted. + +neg106.fs(65,42,65,48): typecheck error FS3224: The byref pointer is readonly, so this write is not permitted. + +neg106.fs(74,9,74,17): typecheck error FS0257: Invalid mutation of a constant expression. Consider copying the expression to a mutable local, e.g. 'let mutable x = ...'. + +neg106.fs(83,34,83,40): typecheck error FS3224: The byref pointer is readonly, so this write is not permitted. + +neg106.fs(86,32,86,40): typecheck error FS0257: Invalid mutation of a constant expression. Consider copying the expression to a mutable local, e.g. 'let mutable x = ...'. + +neg106.fs(90,36,90,38): typecheck error FS0001: Type mismatch. Expecting a + 'byref<'T>' +but given a + 'inref<'T>' +The type 'ByRefKinds.InOut' does not match the type 'ByRefKinds.In' + +neg106.fs(94,35,94,39): typecheck error FS0001: Type mismatch. Expecting a + 'byref' +but given a + 'inref' +The type 'ByRefKinds.InOut' does not match the type 'ByRefKinds.In' + +neg106.fs(98,36,98,38): typecheck error FS0001: Type mismatch. Expecting a + 'outref<'T>' +but given a + 'inref<'T>' +The type 'ByRefKinds.Out' does not match the type 'ByRefKinds.In' + +neg106.fs(102,37,102,40): typecheck error FS0072: Lookup on object of indeterminate type based on information prior to this program point. A type annotation may be needed prior to this program point to constrain the type of the object. This may allow the lookup to be resolved. + +neg106.fs(102,36,102,40): typecheck error FS0001: Type mismatch. Expecting a + 'outref<'a>' +but given a + 'inref<'a>' +The type 'ByRefKinds.Out' does not match the type 'ByRefKinds.In' + +neg106.fs(107,38,107,40): typecheck error FS0001: Type mismatch. Expecting a + 'byref<'T>' +but given a + 'inref<'T>' +The type 'ByRefKinds.InOut' does not match the type 'ByRefKinds.In' + +neg106.fs(112,39,112,42): typecheck error FS0072: Lookup on object of indeterminate type based on information prior to this program point. A type annotation may be needed prior to this program point to constrain the type of the object. This may allow the lookup to be resolved. + +neg106.fs(112,38,112,42): typecheck error FS0001: Type mismatch. Expecting a + 'byref<'a>' +but given a + 'inref<'a>' +The type 'ByRefKinds.InOut' does not match the type 'ByRefKinds.In' + +neg106.fs(117,38,117,40): typecheck error FS0001: Type mismatch. Expecting a + 'outref<'T>' +but given a + 'inref<'T>' +The type 'ByRefKinds.Out' does not match the type 'ByRefKinds.In' + +neg106.fs(122,39,122,42): typecheck error FS0072: Lookup on object of indeterminate type based on information prior to this program point. A type annotation may be needed prior to this program point to constrain the type of the object. This may allow the lookup to be resolved. + +neg106.fs(122,38,122,42): typecheck error FS0001: Type mismatch. Expecting a + 'outref<'a>' +but given a + 'inref<'a>' +The type 'ByRefKinds.Out' does not match the type 'ByRefKinds.In' + +neg106.fs(127,38,127,40): typecheck error FS0001: Type mismatch. Expecting a + 'byref<'T>' +but given a + 'inref<'T>' +The type 'ByRefKinds.InOut' does not match the type 'ByRefKinds.In' + +neg106.fs(132,39,132,42): typecheck error FS0072: Lookup on object of indeterminate type based on information prior to this program point. A type annotation may be needed prior to this program point to constrain the type of the object. This may allow the lookup to be resolved. + +neg106.fs(132,38,132,42): typecheck error FS0001: Type mismatch. Expecting a + 'byref<'a>' +but given a + 'inref<'a>' +The type 'ByRefKinds.InOut' does not match the type 'ByRefKinds.In' + +neg106.fs(137,38,137,40): typecheck error FS0001: Type mismatch. Expecting a + 'outref<'T>' +but given a + 'inref<'T>' +The type 'ByRefKinds.Out' does not match the type 'ByRefKinds.In' + +neg106.fs(142,39,142,42): typecheck error FS0072: Lookup on object of indeterminate type based on information prior to this program point. A type annotation may be needed prior to this program point to constrain the type of the object. This may allow the lookup to be resolved. + +neg106.fs(142,38,142,42): typecheck error FS0001: Type mismatch. Expecting a + 'outref<'a>' +but given a + 'inref<'a>' +The type 'ByRefKinds.Out' does not match the type 'ByRefKinds.In' + +neg106.fs(146,34,146,47): typecheck error FS1204: This construct is for use in the FSharp.Core library and should not be used directly + +neg106.fs(147,34,147,44): typecheck error FS1204: This construct is for use in the FSharp.Core library and should not be used directly + +neg106.fs(148,34,148,44): typecheck error FS1204: This construct is for use in the FSharp.Core library and should not be used directly + +neg106.fs(149,34,149,44): typecheck error FS1204: This construct is for use in the FSharp.Core library and should not be used directly + +neg106.fs(146,34,146,47): typecheck error FS1204: This construct is for use in the FSharp.Core library and should not be used directly + +neg106.fs(147,34,147,44): typecheck error FS1204: This construct is for use in the FSharp.Core library and should not be used directly + +neg106.fs(148,34,148,44): typecheck error FS1204: This construct is for use in the FSharp.Core library and should not be used directly + +neg106.fs(149,34,149,44): typecheck error FS1204: This construct is for use in the FSharp.Core library and should not be used directly diff --git a/tests/fsharp/typecheck/sigs/neg106.fs b/tests/fsharp/typecheck/sigs/neg106.fs new file mode 100644 index 00000000000..d7ad880333f --- /dev/null +++ b/tests/fsharp/typecheck/sigs/neg106.fs @@ -0,0 +1,149 @@ +module M + +//#r @"..\..\..\..\packages\System.Memory.4.5.0-rc1\lib\netstandard2.0\System.Memory.dll" +//#r @"..\..\..\..\packages\NETStandard.Library.NETFramework\2.0.0-preview2-25405-01\build\net461\ref\netstandard.dll" + +module CompareExchangeTests_Negative1 = + let x = 3 + let v = System.Threading.Interlocked.CompareExchange(&x, 3, 4) // No overloads match for method 'CompareExchange'. 'inref' is not compatible with type 'byref' + +module CompareExchangeTests_Negative1b = + let Test() = + let x = 3 + let v = System.Threading.Interlocked.CompareExchange(&x, 3, 4) // No overloads match for method 'CompareExchange'. 'inref' is not compatible with type 'byref' + () + +module CompareExchangeTests_Negative2 = + let v = System.Threading.Interlocked.CompareExchange(&3, 3, 4) // 'inref' is not compatible with type 'byref' + +module TryGetValueTests_Negative1 = + let Test() = + let d = dict [ (3,4) ] + let res = 9 + let v = d.TryGetValue(3, &res) // 'inref' is not compatible with type 'byref' + () + +module FSharpDeclaredOutParamTest_Negaative1 = + type C() = + static member M([] x: byref) = () + let Test() = + let res = 9 + let v = C.M(&res) //'inref' is not compatible with type 'byref' + () + +module FSharpDeclaredOverloadedOutParamTest_Negative1 = + type C() = + static member M(a: int, [] x: byref) = x <- 7 + static member M(a: string, [] x: byref) = x <- 8 + let Test() = + let res = 9 + let v = C.M("a", &res) //'inref' is not compatible with type 'byref' + let v2 = C.M(3, &res) //'inref' is not compatible with type 'byref' + () + +module FSharpDeclaredOutParamTest_Negative1 = + type C() = + static member M([] x: byref) = () + let Test() = + let res = 9 + let v = C.M(&res) // 'inref' is not compatible with type 'byref' + () + +module TestOneArgumentInRefThenMutate_Negative1 = + + type C() = + static member M (x:inref) = &x + + let test() = + let mutable r1 = 1 + let addr = &C.M (&r1) // Expecting a 'byref' but given a 'inref'. The type 'ByRefKinds.Out' does not match the type 'ByRefKinds.In' + addr <- addr + 1 // "The byref pointer is readonly, so this write is not permitted" + +module EvilStruct_Negative1 = + [] + type EvilStruct(s: int) = + member x.Replace(y:EvilStruct) = x <- y + +module MutateInRef1 = + [] + type TestMut = + + val mutable x : int + + let testIn (m: inref) = + m.x <- 1 + +module MatrixOfTests = + [] + type S = + [] + val mutable X : int + + module WriteToInRef = + let f1 (x: inref) = x <- 1 // not allowed + + module WriteToInRefStructInner = + let f1 (x: inref) = x.X <- 1 //not allowed + + module InRefToByRef = + let f1 (x: byref<'T>) = 1 + let f2 (x: inref<'T>) = f1 &x // not allowed + + module InRefToByRefStructInner = + let f1 (x: byref<'T>) = 1 + let f2 (x: inref) = f1 &x.X // not allowed + + module InRefToOutRef = + let f1 (x: outref<'T>) = 1 + let f2 (x: inref<'T>) = f1 &x // not allowed + + module InRefToOutRefStructInner = + let f1 (x: outref<'T>) = 1 + let f2 (x: inref<'T>) = f1 &x.X // not allowed + + module InRefToByRefClassMethod = + type C() = + static member f1 (x: byref<'T>) = 1 + let f2 (x: inref<'T>) = C.f1 &x // not allowed + + module InRefToByRefClassMethodStructInner = + type C() = + static member f1 (x: byref<'T>) = 1 + let f2 (x: inref<'T>) = C.f1 &x.X // not allowed + + module InRefToOutRefClassMethod = + type C() = + static member f1 (x: outref<'T>) = 1 // not allowed + let f2 (x: inref<'T>) = C.f1 &x + + module InRefToOutRefClassMethodStructInner = + type C() = + static member f1 (x: outref<'T>) = 1 // not allowed + let f2 (x: inref<'T>) = C.f1 &x.X + + module InRefToByRefClassMethod2 = + type C() = + static member f1 (x: byref<'T>) = 1 + let f2 (x: inref<'T>) = C.f1(&x) // not allowed + + module InRefToByRefClassMethod2StructInner = + type C() = + static member f1 (x: byref<'T>) = 1 + let f2 (x: inref<'T>) = C.f1(&x.X) // not allowed + + module InRefToOutRefClassMethod2 = + type C() = + static member f1 (x: outref<'T>) = 1 // not allowed + let f2 (x: inref<'T>) = C.f1(&x) + + module InRefToOutRefClassMethod2StructInner = + type C() = + static member f1 (x: outref<'T>) = 1 // not allowed + let f2 (x: inref<'T>) = C.f1(&x.X) + + module UseOfLibraryOnly = + type C() = + static member f1 (x: byref<'T, 'U>) = 1 // not allowed - library only + static member f2 (x: ByRefKinds.In) = 1 // not allowed - library only + static member f2 (x: ByRefKinds.InOut) = 1 // not allowed - library only + static member f2 (x: ByRefKinds.Out) = 1 // not allowed - library only diff --git a/tests/fsharp/typecheck/sigs/neg106.vsbsl b/tests/fsharp/typecheck/sigs/neg106.vsbsl new file mode 100644 index 00000000000..a2109823a23 --- /dev/null +++ b/tests/fsharp/typecheck/sigs/neg106.vsbsl @@ -0,0 +1,228 @@ + +neg106.fs(8,59,8,61): typecheck error FS3231: A value defined in a module must be mutable in order to take its address, e.g. 'let mutable x = ...' + +neg106.fs(13,18,13,72): typecheck error FS0041: No overloads match for method 'CompareExchange'. The available overloads are shown below. +neg106.fs(13,18,13,72): typecheck error FS0041: Possible overload: 'System.Threading.Interlocked.CompareExchange(location1: byref, value: int, comparand: int) : int'. Type constraint mismatch. The type + 'inref' +is not compatible with type + 'byref' +. +neg106.fs(13,18,13,72): typecheck error FS0041: Possible overload: 'System.Threading.Interlocked.CompareExchange(location1: byref, value: int64, comparand: int64) : int64'. Type constraint mismatch. The type + 'inref' +is not compatible with type + 'byref' +. +neg106.fs(13,18,13,72): typecheck error FS0041: Possible overload: 'System.Threading.Interlocked.CompareExchange(location1: byref, value: float32, comparand: float32) : float32'. Type constraint mismatch. The type + 'inref' +is not compatible with type + 'byref' +. +neg106.fs(13,18,13,72): typecheck error FS0041: Possible overload: 'System.Threading.Interlocked.CompareExchange(location1: byref, value: float, comparand: float) : float'. Type constraint mismatch. The type + 'inref' +is not compatible with type + 'byref' +. +neg106.fs(13,18,13,72): typecheck error FS0041: Possible overload: 'System.Threading.Interlocked.CompareExchange(location1: byref, value: obj, comparand: obj) : obj'. Type constraint mismatch. The type + 'inref' +is not compatible with type + 'byref' +. +neg106.fs(13,18,13,72): typecheck error FS0041: Possible overload: 'System.Threading.Interlocked.CompareExchange(location1: byref, value: nativeint, comparand: nativeint) : nativeint'. Type constraint mismatch. The type + 'inref' +is not compatible with type + 'byref' +. +neg106.fs(13,18,13,72): typecheck error FS0041: Possible overload: 'System.Threading.Interlocked.CompareExchange<'T when 'T : not struct>(location1: byref<'T>, value: 'T, comparand: 'T) : 'T'. Type constraint mismatch. The type + 'inref' +is not compatible with type + 'byref<'a>' +. + +neg106.fs(17,59,17,61): typecheck error FS3237: Cannot take the address of the value returned from the expression. Assign the returned value to a let-bound value before taking the address. + +neg106.fs(17,14,17,68): typecheck error FS0041: No overloads match for method 'CompareExchange'. The available overloads are shown below. +neg106.fs(17,14,17,68): typecheck error FS0041: Possible overload: 'System.Threading.Interlocked.CompareExchange(location1: byref, value: int, comparand: int) : int'. Type constraint mismatch. The type + 'inref' +is not compatible with type + 'byref' +. +neg106.fs(17,14,17,68): typecheck error FS0041: Possible overload: 'System.Threading.Interlocked.CompareExchange(location1: byref, value: int64, comparand: int64) : int64'. Type constraint mismatch. The type + 'inref' +is not compatible with type + 'byref' +. +neg106.fs(17,14,17,68): typecheck error FS0041: Possible overload: 'System.Threading.Interlocked.CompareExchange(location1: byref, value: float32, comparand: float32) : float32'. Type constraint mismatch. The type + 'inref' +is not compatible with type + 'byref' +. +neg106.fs(17,14,17,68): typecheck error FS0041: Possible overload: 'System.Threading.Interlocked.CompareExchange(location1: byref, value: float, comparand: float) : float'. Type constraint mismatch. The type + 'inref' +is not compatible with type + 'byref' +. +neg106.fs(17,14,17,68): typecheck error FS0041: Possible overload: 'System.Threading.Interlocked.CompareExchange(location1: byref, value: obj, comparand: obj) : obj'. Type constraint mismatch. The type + 'inref' +is not compatible with type + 'byref' +. +neg106.fs(17,14,17,68): typecheck error FS0041: Possible overload: 'System.Threading.Interlocked.CompareExchange(location1: byref, value: nativeint, comparand: nativeint) : nativeint'. Type constraint mismatch. The type + 'inref' +is not compatible with type + 'byref' +. +neg106.fs(17,14,17,68): typecheck error FS0041: Possible overload: 'System.Threading.Interlocked.CompareExchange<'T when 'T : not struct>(location1: byref<'T>, value: 'T, comparand: 'T) : 'T'. Type constraint mismatch. The type + 'inref' +is not compatible with type + 'byref<'a>' +. + +neg106.fs(23,35,23,39): typecheck error FS0001: Type mismatch. Expecting a + 'byref' +but given a + 'inref' +The type 'ByRefKinds.InOut' does not match the type 'ByRefKinds.In' + +neg106.fs(31,22,31,26): typecheck error FS0001: Type mismatch. Expecting a + 'byref' +but given a + 'inref' +The type 'ByRefKinds.InOut' does not match the type 'ByRefKinds.In' + +neg106.fs(40,18,40,32): typecheck error FS0041: No overloads match for method 'M'. The available overloads are shown below. +neg106.fs(40,18,40,32): typecheck error FS0041: Possible overload: 'static member C.M : a:string * x:byref -> unit'. Type constraint mismatch. The type + 'inref' +is not compatible with type + 'byref' +. +neg106.fs(40,18,40,32): typecheck error FS0041: Possible overload: 'static member C.M : a:int * x:byref -> unit'. Type constraint mismatch. The type + 'string' +is not compatible with type + 'int' +. + +neg106.fs(41,19,41,31): typecheck error FS0041: No overloads match for method 'M'. The available overloads are shown below. +neg106.fs(41,19,41,31): typecheck error FS0041: Possible overload: 'static member C.M : a:string * x:byref -> unit'. Type constraint mismatch. The type + 'int' +is not compatible with type + 'string' +. +neg106.fs(41,19,41,31): typecheck error FS0041: Possible overload: 'static member C.M : a:int * x:byref -> unit'. Type constraint mismatch. The type + 'inref' +is not compatible with type + 'byref' +. + +neg106.fs(49,22,49,26): typecheck error FS0001: Type mismatch. Expecting a + 'byref' +but given a + 'inref' +The type 'ByRefKinds.InOut' does not match the type 'ByRefKinds.In' + +neg106.fs(60,9,60,25): typecheck error FS3224: The byref pointer is readonly, so this write is not permitted. + +neg106.fs(65,42,65,48): typecheck error FS3224: The byref pointer is readonly, so this write is not permitted. + +neg106.fs(74,9,74,17): typecheck error FS0257: Invalid mutation of a constant expression. Consider copying the expression to a mutable local, e.g. 'let mutable x = ...'. + +neg106.fs(83,34,83,40): typecheck error FS3224: The byref pointer is readonly, so this write is not permitted. + +neg106.fs(86,32,86,40): typecheck error FS0257: Invalid mutation of a constant expression. Consider copying the expression to a mutable local, e.g. 'let mutable x = ...'. + +neg106.fs(90,36,90,38): typecheck error FS0001: Type mismatch. Expecting a + 'byref<'T>' +but given a + 'inref<'T>' +The type 'ByRefKinds.InOut' does not match the type 'ByRefKinds.In' + +neg106.fs(94,35,94,39): typecheck error FS0001: Type mismatch. Expecting a + 'byref' +but given a + 'inref' +The type 'ByRefKinds.InOut' does not match the type 'ByRefKinds.In' + +neg106.fs(98,36,98,38): typecheck error FS0001: Type mismatch. Expecting a + 'outref<'T>' +but given a + 'inref<'T>' +The type 'ByRefKinds.Out' does not match the type 'ByRefKinds.In' + +neg106.fs(102,37,102,40): typecheck error FS0072: Lookup on object of indeterminate type based on information prior to this program point. A type annotation may be needed prior to this program point to constrain the type of the object. This may allow the lookup to be resolved. + +neg106.fs(102,36,102,40): typecheck error FS0001: Type mismatch. Expecting a + 'outref<'a>' +but given a + 'inref<'a>' +The type 'ByRefKinds.Out' does not match the type 'ByRefKinds.In' + +neg106.fs(107,38,107,40): typecheck error FS0001: Type mismatch. Expecting a + 'byref<'T>' +but given a + 'inref<'T>' +The type 'ByRefKinds.InOut' does not match the type 'ByRefKinds.In' + +neg106.fs(112,39,112,42): typecheck error FS0072: Lookup on object of indeterminate type based on information prior to this program point. A type annotation may be needed prior to this program point to constrain the type of the object. This may allow the lookup to be resolved. + +neg106.fs(112,38,112,42): typecheck error FS0001: Type mismatch. Expecting a + 'byref<'a>' +but given a + 'inref<'a>' +The type 'ByRefKinds.InOut' does not match the type 'ByRefKinds.In' + +neg106.fs(117,38,117,40): typecheck error FS0001: Type mismatch. Expecting a + 'outref<'T>' +but given a + 'inref<'T>' +The type 'ByRefKinds.Out' does not match the type 'ByRefKinds.In' + +neg106.fs(122,39,122,42): typecheck error FS0072: Lookup on object of indeterminate type based on information prior to this program point. A type annotation may be needed prior to this program point to constrain the type of the object. This may allow the lookup to be resolved. + +neg106.fs(122,38,122,42): typecheck error FS0001: Type mismatch. Expecting a + 'outref<'a>' +but given a + 'inref<'a>' +The type 'ByRefKinds.Out' does not match the type 'ByRefKinds.In' + +neg106.fs(127,38,127,40): typecheck error FS0001: Type mismatch. Expecting a + 'byref<'T>' +but given a + 'inref<'T>' +The type 'ByRefKinds.InOut' does not match the type 'ByRefKinds.In' + +neg106.fs(132,39,132,42): typecheck error FS0072: Lookup on object of indeterminate type based on information prior to this program point. A type annotation may be needed prior to this program point to constrain the type of the object. This may allow the lookup to be resolved. + +neg106.fs(132,38,132,42): typecheck error FS0001: Type mismatch. Expecting a + 'byref<'a>' +but given a + 'inref<'a>' +The type 'ByRefKinds.InOut' does not match the type 'ByRefKinds.In' + +neg106.fs(137,38,137,40): typecheck error FS0001: Type mismatch. Expecting a + 'outref<'T>' +but given a + 'inref<'T>' +The type 'ByRefKinds.Out' does not match the type 'ByRefKinds.In' + +neg106.fs(142,39,142,42): typecheck error FS0072: Lookup on object of indeterminate type based on information prior to this program point. A type annotation may be needed prior to this program point to constrain the type of the object. This may allow the lookup to be resolved. + +neg106.fs(142,38,142,42): typecheck error FS0001: Type mismatch. Expecting a + 'outref<'a>' +but given a + 'inref<'a>' +The type 'ByRefKinds.Out' does not match the type 'ByRefKinds.In' + +neg106.fs(146,34,146,47): typecheck error FS1204: This construct is for use in the FSharp.Core library and should not be used directly + +neg106.fs(147,34,147,44): typecheck error FS1204: This construct is for use in the FSharp.Core library and should not be used directly + +neg106.fs(148,34,148,44): typecheck error FS1204: This construct is for use in the FSharp.Core library and should not be used directly + +neg106.fs(149,34,149,44): typecheck error FS1204: This construct is for use in the FSharp.Core library and should not be used directly + +neg106.fs(146,34,146,47): typecheck error FS1204: This construct is for use in the FSharp.Core library and should not be used directly + +neg106.fs(147,34,147,44): typecheck error FS1204: This construct is for use in the FSharp.Core library and should not be used directly + +neg106.fs(148,34,148,44): typecheck error FS1204: This construct is for use in the FSharp.Core library and should not be used directly + +neg106.fs(149,34,149,44): typecheck error FS1204: This construct is for use in the FSharp.Core library and should not be used directly diff --git a/tests/fsharp/typecheck/sigs/neg107.bsl b/tests/fsharp/typecheck/sigs/neg107.bsl new file mode 100644 index 00000000000..a999fa3c5c3 --- /dev/null +++ b/tests/fsharp/typecheck/sigs/neg107.bsl @@ -0,0 +1,76 @@ + +neg107.fsx(26,48,26,59): typecheck error FS0406: The byref-typed variable 'a' is used in an invalid way. Byrefs cannot be captured by closures or passed to inner functions. + +neg107.fsx(27,69,27,80): typecheck error FS0406: The byref-typed variable 'a' is used in an invalid way. Byrefs cannot be captured by closures or passed to inner functions. + +neg107.fsx(28,43,28,59): typecheck error FS0412: A type instantiation involves a byref type. This is not permitted by the rules of Common IL. + +neg107.fsx(28,47,28,58): typecheck error FS0406: The byref-typed variable 'a' is used in an invalid way. Byrefs cannot be captured by closures or passed to inner functions. + +neg107.fsx(28,57,28,58): typecheck error FS0418: The byref typed value 'a' cannot be used at this point + +neg107.fsx(28,47,28,58): typecheck error FS0425: The type of a first-class function cannot contain byrefs + +neg107.fsx(29,51,29,67): typecheck error FS0412: A type instantiation involves a byref type. This is not permitted by the rules of Common IL. + +neg107.fsx(29,55,29,66): typecheck error FS0406: The byref-typed variable 'a' is used in an invalid way. Byrefs cannot be captured by closures or passed to inner functions. + +neg107.fsx(29,65,29,66): typecheck error FS0418: The byref typed value 'a' cannot be used at this point + +neg107.fsx(29,55,29,66): typecheck error FS0425: The type of a first-class function cannot contain byrefs + +neg107.fsx(31,49,31,54): typecheck error FS0406: The byref-typed variable 'a' is used in an invalid way. Byrefs cannot be captured by closures or passed to inner functions. + +neg107.fsx(31,57,31,65): typecheck error FS0406: The byref-typed variable 'a' is used in an invalid way. Byrefs cannot be captured by closures or passed to inner functions. + +neg107.fsx(32,70,32,75): typecheck error FS0406: The byref-typed variable 'a' is used in an invalid way. Byrefs cannot be captured by closures or passed to inner functions. + +neg107.fsx(32,78,32,86): typecheck error FS0406: The byref-typed variable 'a' is used in an invalid way. Byrefs cannot be captured by closures or passed to inner functions. + +neg107.fsx(33,48,33,53): typecheck error FS0406: The byref-typed variable 'a' is used in an invalid way. Byrefs cannot be captured by closures or passed to inner functions. + +neg107.fsx(33,48,33,53): typecheck error FS0412: A type instantiation involves a byref type. This is not permitted by the rules of Common IL. + +neg107.fsx(33,56,33,64): typecheck error FS0406: The byref-typed variable 'a' is used in an invalid way. Byrefs cannot be captured by closures or passed to inner functions. + +neg107.fsx(33,56,33,64): typecheck error FS0412: A type instantiation involves a byref type. This is not permitted by the rules of Common IL. + +neg107.fsx(33,56,33,64): typecheck error FS0425: The type of a first-class function cannot contain byrefs + +neg107.fsx(33,48,33,53): typecheck error FS0425: The type of a first-class function cannot contain byrefs + +neg107.fsx(34,56,34,61): typecheck error FS0406: The byref-typed variable 'a' is used in an invalid way. Byrefs cannot be captured by closures or passed to inner functions. + +neg107.fsx(34,56,34,61): typecheck error FS0412: A type instantiation involves a byref type. This is not permitted by the rules of Common IL. + +neg107.fsx(34,64,34,72): typecheck error FS0406: The byref-typed variable 'a' is used in an invalid way. Byrefs cannot be captured by closures or passed to inner functions. + +neg107.fsx(34,64,34,72): typecheck error FS0412: A type instantiation involves a byref type. This is not permitted by the rules of Common IL. + +neg107.fsx(34,64,34,72): typecheck error FS0425: The type of a first-class function cannot contain byrefs + +neg107.fsx(34,56,34,61): typecheck error FS0425: The type of a first-class function cannot contain byrefs + +neg107.fsx(37,33,37,34): typecheck error FS0425: The type of a first-class function cannot contain byrefs + +neg107.fsx(37,33,37,34): typecheck error FS0425: The type of a first-class function cannot contain byrefs + +neg107.fsx(45,34,45,40): typecheck error FS3233: Struct members cannot return the address of fields of the struct by reference + +neg107.fsx(45,34,45,38): typecheck error FS3233: Struct members cannot return the address of fields of the struct by reference + +neg107.fsx(53,34,53,38): typecheck error FS3233: Struct members cannot return the address of fields of the struct by reference + +neg107.fsx(67,34,67,40): typecheck error FS3233: Struct members cannot return the address of fields of the struct by reference + +neg107.fsx(67,34,67,38): typecheck error FS3233: Struct members cannot return the address of fields of the struct by reference + +neg107.fsx(71,19,71,20): typecheck error FS0412: A type instantiation involves a byref type. This is not permitted by the rules of Common IL. + +neg107.fsx(71,14,71,18): typecheck error FS0437: A type would store a byref typed value. This is not permitted by Common IL. + +neg107.fsx(71,19,71,20): typecheck error FS0412: A type instantiation involves a byref type. This is not permitted by the rules of Common IL. + +neg107.fsx(71,19,71,20): typecheck error FS0412: A type instantiation involves a byref type. This is not permitted by the rules of Common IL. + +neg107.fsx(71,19,71,20): typecheck error FS0412: A type instantiation involves a byref type. This is not permitted by the rules of Common IL. diff --git a/tests/fsharp/typecheck/sigs/neg107.fsx b/tests/fsharp/typecheck/sigs/neg107.fsx new file mode 100644 index 00000000000..1df5dec5fd4 --- /dev/null +++ b/tests/fsharp/typecheck/sigs/neg107.fsx @@ -0,0 +1,74 @@ +#r @"..\..\..\..\packages\System.Memory.4.5.0-rc1\lib\netstandard2.0\System.Memory.dll" +#r @"..\..\..\..\packages\NETStandard.Library.NETFramework.2.0.0-preview2-25405-01\build\net461\ref\netstandard.dll" + +namespace System.Runtime.CompilerServices + + open System + open System.Runtime.CompilerServices + open System.Runtime.InteropServices + [] + [] + type IsReadOnlyAttribute() = + inherit System.Attribute() + + [] + [] + type IsByRefLikeAttribute() = + inherit System.Attribute() + +namespace Test + + open System.Runtime.CompilerServices + open System.Runtime.InteropServices + open System + + module Span_Negative1 = + let TestClosure1 (a: inref) = id (fun () -> a) + let TestClosure1b ([] a: byref) = id (fun () -> a) + let TestClosure2 (a: Span) = id (fun () -> a) + let TestClosure3 (a: ReadOnlySpan) = id (fun () -> a) + + let TestAsyncClosure1 (a: inref) = async { return a } + let TestAsyncClosure1b ([] a: byref) = async { return a } + let TestAsyncClosure2 (a: Span) = async { return a } + let TestAsyncClosure3 (a: ReadOnlySpan) = async { return a } + + module Span_Negative2 = + let TestLocal1 () = let x = Span() in x + + module MutateInRef2 = + [] + type TestMut = + + val mutable x : int + + member this.XAddr = &this.x // not allowed, Struct members cannot return the address of fields of the struct by reference", not entirely clear why C# disallowed this + + module MutateInRef3 = + [] + type TestMut = + + val mutable x : int + + member this.XAddr = &this // not allowed, Struct members cannot return the address of fields of the struct by reference", not entirely clear why C# disallowed this + + + module MutateInRef4 = + [] + type TestMut1 = + + val mutable x : int + + [] + type TestMut2 = + + val mutable x : TestMut1 + + member this.XAddr = &this.x.x // not allowed, Struct members cannot return the address of fields of the struct by reference", not entirely clear why C# disallowed this + + module DisallowIsByRefLikeWithByRefField = + [] + type Beef(x: byref) = + + member __.X = &x + diff --git a/tests/fsharp/typecheck/sigs/neg107.vsbsl b/tests/fsharp/typecheck/sigs/neg107.vsbsl new file mode 100644 index 00000000000..a999fa3c5c3 --- /dev/null +++ b/tests/fsharp/typecheck/sigs/neg107.vsbsl @@ -0,0 +1,76 @@ + +neg107.fsx(26,48,26,59): typecheck error FS0406: The byref-typed variable 'a' is used in an invalid way. Byrefs cannot be captured by closures or passed to inner functions. + +neg107.fsx(27,69,27,80): typecheck error FS0406: The byref-typed variable 'a' is used in an invalid way. Byrefs cannot be captured by closures or passed to inner functions. + +neg107.fsx(28,43,28,59): typecheck error FS0412: A type instantiation involves a byref type. This is not permitted by the rules of Common IL. + +neg107.fsx(28,47,28,58): typecheck error FS0406: The byref-typed variable 'a' is used in an invalid way. Byrefs cannot be captured by closures or passed to inner functions. + +neg107.fsx(28,57,28,58): typecheck error FS0418: The byref typed value 'a' cannot be used at this point + +neg107.fsx(28,47,28,58): typecheck error FS0425: The type of a first-class function cannot contain byrefs + +neg107.fsx(29,51,29,67): typecheck error FS0412: A type instantiation involves a byref type. This is not permitted by the rules of Common IL. + +neg107.fsx(29,55,29,66): typecheck error FS0406: The byref-typed variable 'a' is used in an invalid way. Byrefs cannot be captured by closures or passed to inner functions. + +neg107.fsx(29,65,29,66): typecheck error FS0418: The byref typed value 'a' cannot be used at this point + +neg107.fsx(29,55,29,66): typecheck error FS0425: The type of a first-class function cannot contain byrefs + +neg107.fsx(31,49,31,54): typecheck error FS0406: The byref-typed variable 'a' is used in an invalid way. Byrefs cannot be captured by closures or passed to inner functions. + +neg107.fsx(31,57,31,65): typecheck error FS0406: The byref-typed variable 'a' is used in an invalid way. Byrefs cannot be captured by closures or passed to inner functions. + +neg107.fsx(32,70,32,75): typecheck error FS0406: The byref-typed variable 'a' is used in an invalid way. Byrefs cannot be captured by closures or passed to inner functions. + +neg107.fsx(32,78,32,86): typecheck error FS0406: The byref-typed variable 'a' is used in an invalid way. Byrefs cannot be captured by closures or passed to inner functions. + +neg107.fsx(33,48,33,53): typecheck error FS0406: The byref-typed variable 'a' is used in an invalid way. Byrefs cannot be captured by closures or passed to inner functions. + +neg107.fsx(33,48,33,53): typecheck error FS0412: A type instantiation involves a byref type. This is not permitted by the rules of Common IL. + +neg107.fsx(33,56,33,64): typecheck error FS0406: The byref-typed variable 'a' is used in an invalid way. Byrefs cannot be captured by closures or passed to inner functions. + +neg107.fsx(33,56,33,64): typecheck error FS0412: A type instantiation involves a byref type. This is not permitted by the rules of Common IL. + +neg107.fsx(33,56,33,64): typecheck error FS0425: The type of a first-class function cannot contain byrefs + +neg107.fsx(33,48,33,53): typecheck error FS0425: The type of a first-class function cannot contain byrefs + +neg107.fsx(34,56,34,61): typecheck error FS0406: The byref-typed variable 'a' is used in an invalid way. Byrefs cannot be captured by closures or passed to inner functions. + +neg107.fsx(34,56,34,61): typecheck error FS0412: A type instantiation involves a byref type. This is not permitted by the rules of Common IL. + +neg107.fsx(34,64,34,72): typecheck error FS0406: The byref-typed variable 'a' is used in an invalid way. Byrefs cannot be captured by closures or passed to inner functions. + +neg107.fsx(34,64,34,72): typecheck error FS0412: A type instantiation involves a byref type. This is not permitted by the rules of Common IL. + +neg107.fsx(34,64,34,72): typecheck error FS0425: The type of a first-class function cannot contain byrefs + +neg107.fsx(34,56,34,61): typecheck error FS0425: The type of a first-class function cannot contain byrefs + +neg107.fsx(37,33,37,34): typecheck error FS0425: The type of a first-class function cannot contain byrefs + +neg107.fsx(37,33,37,34): typecheck error FS0425: The type of a first-class function cannot contain byrefs + +neg107.fsx(45,34,45,40): typecheck error FS3233: Struct members cannot return the address of fields of the struct by reference + +neg107.fsx(45,34,45,38): typecheck error FS3233: Struct members cannot return the address of fields of the struct by reference + +neg107.fsx(53,34,53,38): typecheck error FS3233: Struct members cannot return the address of fields of the struct by reference + +neg107.fsx(67,34,67,40): typecheck error FS3233: Struct members cannot return the address of fields of the struct by reference + +neg107.fsx(67,34,67,38): typecheck error FS3233: Struct members cannot return the address of fields of the struct by reference + +neg107.fsx(71,19,71,20): typecheck error FS0412: A type instantiation involves a byref type. This is not permitted by the rules of Common IL. + +neg107.fsx(71,14,71,18): typecheck error FS0437: A type would store a byref typed value. This is not permitted by Common IL. + +neg107.fsx(71,19,71,20): typecheck error FS0412: A type instantiation involves a byref type. This is not permitted by the rules of Common IL. + +neg107.fsx(71,19,71,20): typecheck error FS0412: A type instantiation involves a byref type. This is not permitted by the rules of Common IL. + +neg107.fsx(71,19,71,20): typecheck error FS0412: A type instantiation involves a byref type. This is not permitted by the rules of Common IL. diff --git a/tests/fsharp/typecheck/sigs/neg108.bsl b/tests/fsharp/typecheck/sigs/neg108.bsl new file mode 100644 index 00000000000..77e4943fa7c --- /dev/null +++ b/tests/fsharp/typecheck/sigs/neg108.bsl @@ -0,0 +1,2 @@ + +neg108.fs(5,3,5,15): typecheck error FS3242: This type does not inherit Attribute, it will not work correctly with other .NET languages. diff --git a/tests/fsharp/typecheck/sigs/neg108.fs b/tests/fsharp/typecheck/sigs/neg108.fs new file mode 100644 index 00000000000..974a0ffa7e9 --- /dev/null +++ b/tests/fsharp/typecheck/sigs/neg108.fs @@ -0,0 +1,8 @@ +module Neg108 +// check that a decent error is given when a type that does not inherit from System.Attribute is used as attribute +type NotAttribute() = class end + +[] +type T() = class end + +// note this test shouldn't contain any other code diff --git a/tests/fsharp/typecheck/sigs/neg109.bsl b/tests/fsharp/typecheck/sigs/neg109.bsl new file mode 100644 index 00000000000..453aed3521b --- /dev/null +++ b/tests/fsharp/typecheck/sigs/neg109.bsl @@ -0,0 +1,2 @@ + +neg109.fs(5,3,5,15): typecheck error FS3242: This type does not inherit Attribute, it will not work correctly with other .NET languages. diff --git a/tests/fsharp/typecheck/sigs/neg109.fs b/tests/fsharp/typecheck/sigs/neg109.fs new file mode 100644 index 00000000000..300fc55579c --- /dev/null +++ b/tests/fsharp/typecheck/sigs/neg109.fs @@ -0,0 +1,8 @@ +module rec Neg109 +// check that a decent error is given when a type that does not inherit from System.Attribute is used as attribute +type NotAttribute() = class end + +[] +type T() = class end + +// note this test shouldn't contain any other code diff --git a/tests/fsharp/typecheck/sigs/neg20.bsl b/tests/fsharp/typecheck/sigs/neg20.bsl index d8051fd7bb9..f9ec6909780 100644 --- a/tests/fsharp/typecheck/sigs/neg20.bsl +++ b/tests/fsharp/typecheck/sigs/neg20.bsl @@ -69,17 +69,17 @@ neg20.fs(53,38,53,39): typecheck error FS0001: This expression was expected to h but here has type 'int' -neg20.fs(60,26,60,33): typecheck error FS0001: All elements of a list constructor expression must have the same type. This expression was expected to have type 'B', but here has type 'A'. +neg20.fs(60,26,60,33): typecheck error FS0001: All elements of a list must be of the same type as the first element, which here is 'B'. This element has type 'A'. -neg20.fs(61,27,61,35): typecheck error FS0001: All elements of a list constructor expression must have the same type. This expression was expected to have type 'B1', but here has type 'B2'. +neg20.fs(61,27,61,35): typecheck error FS0001: All elements of a list must be of the same type as the first element, which here is 'B1'. This element has type 'B2'. -neg20.fs(62,26,62,33): typecheck error FS0001: All elements of a list constructor expression must have the same type. This expression was expected to have type 'C', but here has type 'B'. +neg20.fs(62,26,62,33): typecheck error FS0001: All elements of a list must be of the same type as the first element, which here is 'C'. This element has type 'B'. -neg20.fs(66,25,66,32): typecheck error FS0001: All elements of a list constructor expression must have the same type. This expression was expected to have type 'A', but here has type 'B'. +neg20.fs(66,25,66,32): typecheck error FS0001: All elements of a list must be of the same type as the first element, which here is 'A'. This element has type 'B'. -neg20.fs(67,27,67,34): typecheck error FS0001: All elements of a list constructor expression must have the same type. This expression was expected to have type 'B', but here has type 'C'. +neg20.fs(67,27,67,34): typecheck error FS0001: All elements of a list must be of the same type as the first element, which here is 'B'. This element has type 'C'. -neg20.fs(70,31,70,38): typecheck error FS0001: All elements of a list constructor expression must have the same type. This expression was expected to have type 'B', but here has type 'C'. +neg20.fs(70,31,70,38): typecheck error FS0001: All elements of a list must be of the same type as the first element, which here is 'B'. This element has type 'C'. neg20.fs(71,34,71,42): typecheck error FS0001: Type mismatch. Expecting a 'A list' @@ -110,9 +110,9 @@ but given a 'B list' The type 'A' does not match the type 'B' -neg20.fs(83,47,83,54): typecheck error FS0001: All branches of an 'if' expression must have the same type. This expression was expected to have type 'B', but here has type 'C'. +neg20.fs(83,47,83,54): typecheck error FS0001: All branches of an 'if' expression must return values of the same type as the first branch, which here is 'B'. This branch returns a value of type 'C'. -neg20.fs(87,54,87,61): typecheck error FS0001: All branches of a pattern match expression must have the same type. This expression was expected to have type 'B', but here has type 'C'. +neg20.fs(87,54,87,61): typecheck error FS0001: All branches of a pattern match expression must return values of the same type as the first branch, which here is 'B'. This branch returns a value of type 'C'. neg20.fs(92,19,92,26): typecheck error FS0001: This expression was expected to have type 'A' @@ -129,7 +129,7 @@ neg20.fs(97,26,97,33): typecheck error FS0001: This expression was expected to h but here has type 'B' -neg20.fs(99,26,99,33): typecheck error FS0001: All elements of a list constructor expression must have the same type. This expression was expected to have type 'B', but here has type 'A'. +neg20.fs(99,26,99,33): typecheck error FS0001: All elements of a list must be of the same type as the first element, which here is 'B'. This element has type 'A'. neg20.fs(108,12,108,16): typecheck error FS0001: Type mismatch. Expecting a 'B * B -> 'a' @@ -211,6 +211,26 @@ is not compatible with type 'int []' . +neg20.fs(183,29,183,34): typecheck error FS0001: This expression was expected to have type + 'int' +but here has type + 'obj' + +neg20.fs(183,29,183,34): typecheck error FS0001: This expression was expected to have type + 'int' +but here has type + 'obj' + +neg20.fs(183,35,183,40): typecheck error FS0001: This expression was expected to have type + 'int' +but here has type + 'obj' + +neg20.fs(183,35,183,40): typecheck error FS0001: This expression was expected to have type + 'int' +but here has type + 'obj' + neg20.fs(183,14,183,41): typecheck error FS0001: This expression was expected to have type 'unit' but here has type @@ -248,6 +268,26 @@ is not compatible with type 'string []' . +neg20.fs(189,29,189,34): typecheck error FS0001: This expression was expected to have type + 'string' +but here has type + 'obj' + +neg20.fs(189,29,189,34): typecheck error FS0001: This expression was expected to have type + 'string' +but here has type + 'obj' + +neg20.fs(189,35,189,40): typecheck error FS0001: This expression was expected to have type + 'string' +but here has type + 'obj' + +neg20.fs(189,35,189,40): typecheck error FS0001: This expression was expected to have type + 'string' +but here has type + 'obj' + neg20.fs(189,14,189,41): typecheck error FS0001: This expression was expected to have type 'unit' but here has type diff --git a/tests/fsharp/typecheck/sigs/neg63.bsl b/tests/fsharp/typecheck/sigs/neg63.bsl index 63f7da210c5..8898a017253 100644 --- a/tests/fsharp/typecheck/sigs/neg63.bsl +++ b/tests/fsharp/typecheck/sigs/neg63.bsl @@ -9,6 +9,6 @@ neg63.fs(11,5,11,13): typecheck error FS0412: A type instantiation involves a by neg63.fs(14,8,14,9): typecheck error FS3155: A quotation may not involve an assignment to or taking the address of a captured local variable -neg63.fs(18,6,18,7): typecheck error FS3209: The address of the variable 'x' cannot be used at this point. A method or function may not return the address of this local value. +neg63.fs(18,6,18,7): typecheck error FS3209: The address of the variable 'x' or a related expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope. -neg63.fs(26,6,26,10): typecheck error FS3209: The address of the variable 'addr' cannot be used at this point. A method or function may not return the address of this local value. +neg63.fs(26,6,26,10): typecheck error FS3209: The address of the variable 'addr' or a related expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope. diff --git a/tests/fsharp/typecheck/sigs/neg67.vsbsl b/tests/fsharp/typecheck/sigs/neg67.vsbsl index 6bb13163316..c501276ecf4 100644 --- a/tests/fsharp/typecheck/sigs/neg67.vsbsl +++ b/tests/fsharp/typecheck/sigs/neg67.vsbsl @@ -18,6 +18,6 @@ neg67.fsx(42,35,42,36): parse error FS0010: Unexpected symbol '}' in definition. neg67.fsx(41,9,41,14): typecheck error FS0001: This expression was expected to have type 'unit' but here has type - 'Async<'a>' + 'Async' neg67.fsx(30,1,41,37): typecheck error FS0003: This value is not a function and cannot be applied. diff --git a/tests/fsharp/typecheck/sigs/neg80.vsbsl b/tests/fsharp/typecheck/sigs/neg80.vsbsl index db4dba56a2f..d8bb6d1a0bb 100644 --- a/tests/fsharp/typecheck/sigs/neg80.vsbsl +++ b/tests/fsharp/typecheck/sigs/neg80.vsbsl @@ -3,6 +3,6 @@ neg80.fsx(79,5,79,6): parse error FS0010: Unexpected symbol '|' in pattern match neg80.fsx(79,5,79,6): parse error FS0010: Unexpected symbol '|' in pattern matching -neg80.fsx(79,6,79,6): typecheck error FS0001: All branches of a pattern match expression must have the same type. This expression was expected to have type 'string', but here has type 'unit'. +neg80.fsx(79,6,79,6): typecheck error FS0001: All branches of a pattern match expression must return values of the same type as the first branch, which here is 'string'. This branch returns a value of type 'unit'. neg80.fsx(76,11,76,13): typecheck error FS0025: Incomplete pattern matches on this expression. For example, the value 'Horizontal (_, _)' may indicate a case not covered by the pattern(s). diff --git a/tests/fsharp/typecheck/sigs/neg97.bsl b/tests/fsharp/typecheck/sigs/neg97.bsl index db02521eaf6..1e882f98b69 100644 --- a/tests/fsharp/typecheck/sigs/neg97.bsl +++ b/tests/fsharp/typecheck/sigs/neg97.bsl @@ -1,5 +1,5 @@ -neg97.fs(13,1,13,2): typecheck error FS0256: A value must be mutable in order to mutate the contents or take the address of a value type, e.g. 'let mutable x = ...' +neg97.fs(13,1,13,10): typecheck error FS0256: A value must be mutable in order to mutate the contents or take the address of a value type, e.g. 'let mutable x = ...' neg97.fs(16,9,16,10): typecheck error FS0009: Uses of this construct may result in the generation of unverifiable .NET IL code. This warning can be disabled using '--nowarn:9' or '#nowarn "9"'. diff --git a/tests/fsharp/typecheck/sigs/neg97.vsbsl b/tests/fsharp/typecheck/sigs/neg97.vsbsl new file mode 100644 index 00000000000..1e882f98b69 --- /dev/null +++ b/tests/fsharp/typecheck/sigs/neg97.vsbsl @@ -0,0 +1,28 @@ + +neg97.fs(13,1,13,10): typecheck error FS0256: A value must be mutable in order to mutate the contents or take the address of a value type, e.g. 'let mutable x = ...' + +neg97.fs(16,9,16,10): typecheck error FS0009: Uses of this construct may result in the generation of unverifiable .NET IL code. This warning can be disabled using '--nowarn:9' or '#nowarn "9"'. + +neg97.fs(16,9,16,10): typecheck error FS3207: Invalid use of 'fixed'. 'fixed' may only be used in a declaration of the form 'use x = fixed expr' where the expression is an array, the address of a field, the address of an array element or a string' + +neg97.fs(20,9,20,10): typecheck error FS0009: Uses of this construct may result in the generation of unverifiable .NET IL code. This warning can be disabled using '--nowarn:9' or '#nowarn "9"'. + +neg97.fs(20,9,20,10): typecheck error FS3207: Invalid use of 'fixed'. 'fixed' may only be used in a declaration of the form 'use x = fixed expr' where the expression is an array, the address of a field, the address of an array element or a string' + +neg97.fs(25,9,25,10): typecheck error FS0009: Uses of this construct may result in the generation of unverifiable .NET IL code. This warning can be disabled using '--nowarn:9' or '#nowarn "9"'. + +neg97.fs(25,9,25,10): typecheck error FS3207: Invalid use of 'fixed'. 'fixed' may only be used in a declaration of the form 'use x = fixed expr' where the expression is an array, the address of a field, the address of an array element or a string' + +neg97.fs(30,9,30,10): typecheck error FS0009: Uses of this construct may result in the generation of unverifiable .NET IL code. This warning can be disabled using '--nowarn:9' or '#nowarn "9"'. + +neg97.fs(30,9,30,10): typecheck error FS3207: Invalid use of 'fixed'. 'fixed' may only be used in a declaration of the form 'use x = fixed expr' where the expression is an array, the address of a field, the address of an array element or a string' + +neg97.fs(36,20,36,32): typecheck error FS0698: Invalid constraint: the type used for the constraint is sealed, which means the constraint could only be satisfied by at most one solution + +neg97.fs(36,20,36,32): typecheck error FS0064: This construct causes code to be less generic than indicated by the type annotations. The type variable 'T has been constrained to be type 'string'. + +neg97.fs(36,12,36,14): typecheck error FS0663: This type parameter has been used in a way that constrains it to always be 'string' + +neg97.fs(42,20,42,22): typecheck error FS0039: The type parameter 'T is not defined. Maybe you want one of the following: + + 'U diff --git a/tests/fsharp/typecheck/sigs/neg_byref_16.bsl b/tests/fsharp/typecheck/sigs/neg_byref_16.bsl index 91e5f4fe782..529156816da 100644 --- a/tests/fsharp/typecheck/sigs/neg_byref_16.bsl +++ b/tests/fsharp/typecheck/sigs/neg_byref_16.bsl @@ -1,2 +1,4 @@ neg_byref_16.fs(3,33,3,42): typecheck error FS0412: A type instantiation involves a byref type. This is not permitted by the rules of Common IL. + +neg_byref_16.fs(3,40,3,41): typecheck error FS0421: The address of the variable 'a' cannot be used at this point diff --git a/tests/fsharp/typecheck/sigs/neg_byref_17.bsl b/tests/fsharp/typecheck/sigs/neg_byref_17.bsl index 3d857907b80..270d06fbfc1 100644 --- a/tests/fsharp/typecheck/sigs/neg_byref_17.bsl +++ b/tests/fsharp/typecheck/sigs/neg_byref_17.bsl @@ -1,6 +1,10 @@ -neg_byref_17.fs(2,5,2,8): typecheck error FS0431: A byref typed value would be stored here. Top-level let-bound byref values are not permitted. +neg_byref_17.fs(2,17,2,27): typecheck error FS0001: This expression was expected to have type + 'byref' +but here has type + 'int' -neg_byref_17.fs(2,17,2,22): typecheck error FS0412: A type instantiation involves a byref type. This is not permitted by the rules of Common IL. - -neg_byref_17.fs(3,17,3,22): typecheck error FS0412: A type instantiation involves a byref type. This is not permitted by the rules of Common IL. +neg_byref_17.fs(3,17,3,24): typecheck error FS0001: This expression was expected to have type + 'byref' +but here has type + 'int' diff --git a/tests/fsharp/typecheck/sigs/neg_byref_22.bsl b/tests/fsharp/typecheck/sigs/neg_byref_22.bsl index 675eefac323..f295dc0d47c 100644 --- a/tests/fsharp/typecheck/sigs/neg_byref_22.bsl +++ b/tests/fsharp/typecheck/sigs/neg_byref_22.bsl @@ -1,4 +1,16 @@ +neg_byref_22.fs(3,16,3,20): typecheck error FS3226: A byref pointer returned by a function or method is implicitly dereferenced as of F# 4.5. To acquire the return value as a pointer, use the address-of operator, e.g. '&f(x)' or '&obj.Method(arg1, arg2)'. + +neg_byref_22.fs(3,16,3,20): typecheck error FS0001: This expression was expected to have type + 'byref' +but here has type + 'int' + +neg_byref_22.fs(3,16,3,20): typecheck error FS0001: This expression was expected to have type + 'byref' +but here has type + 'int' + neg_byref_22.fs(5,16,5,17): typecheck error FS0001: This expression was expected to have type 'float' but here has type diff --git a/tests/fsharp/typecheck/sigs/neg_byref_7.bsl b/tests/fsharp/typecheck/sigs/neg_byref_7.bsl index 8b085ebcf58..11f25ecb6d4 100644 --- a/tests/fsharp/typecheck/sigs/neg_byref_7.bsl +++ b/tests/fsharp/typecheck/sigs/neg_byref_7.bsl @@ -18,5 +18,3 @@ neg_byref_7.fs(2,47,2,53): typecheck error FS0412: A type instantiation involves neg_byref_7.fs(2,47,2,53): typecheck error FS0412: A type instantiation involves a byref type. This is not permitted by the rules of Common IL. neg_byref_7.fs(2,47,2,53): typecheck error FS0412: A type instantiation involves a byref type. This is not permitted by the rules of Common IL. - -neg_byref_7.fs(4,41,4,42): typecheck error FS3209: The address of the variable 'y' cannot be used at this point. A method or function may not return the address of this local value. diff --git a/tests/fsharp/typecheck/sigs/neg_issue_3752.bsl b/tests/fsharp/typecheck/sigs/neg_issue_3752.bsl new file mode 100644 index 00000000000..2f18f739a0a --- /dev/null +++ b/tests/fsharp/typecheck/sigs/neg_issue_3752.bsl @@ -0,0 +1,2 @@ + +neg_issue_3752.fs(4,19,4,46): typecheck error FS0064: This construct causes code to be less generic than indicated by the type annotations. The type variable 'a has been constrained to be type 'string'. diff --git a/tests/fsharp/typecheck/sigs/neg_issue_3752.fs b/tests/fsharp/typecheck/sigs/neg_issue_3752.fs new file mode 100644 index 00000000000..27d70b9490d --- /dev/null +++ b/tests/fsharp/typecheck/sigs/neg_issue_3752.fs @@ -0,0 +1,4 @@ +module Test +let memoizeBy (getKey : 'a -> string) (f: 'a -> 'b) : 'a -> 'b = + let cache = System.Collections.Concurrent.ConcurrentDictionary() + fun (x: 'a) -> cache.GetOrAdd(getKey x, f) diff --git a/tests/fsharp/typecheck/sigs/pos28.fs b/tests/fsharp/typecheck/sigs/pos28.fs index 2fded70c6fa..ae383989f47 100644 --- a/tests/fsharp/typecheck/sigs/pos28.fs +++ b/tests/fsharp/typecheck/sigs/pos28.fs @@ -23,3 +23,5 @@ module Test2 = let p1 = &&point.x NativePtr.read p1 + + \ No newline at end of file diff --git a/tests/fsharp/typecheck/sigs/pos29.app.fs b/tests/fsharp/typecheck/sigs/pos29.app.fs new file mode 100644 index 00000000000..01700c969bb --- /dev/null +++ b/tests/fsharp/typecheck/sigs/pos29.app.fs @@ -0,0 +1,3 @@ +module rec Pos29App + +let v = Pos29.x diff --git a/tests/fsharp/typecheck/sigs/pos29.fs b/tests/fsharp/typecheck/sigs/pos29.fs new file mode 100644 index 00000000000..8661305c29c --- /dev/null +++ b/tests/fsharp/typecheck/sigs/pos29.fs @@ -0,0 +1,4 @@ +module Pos29 + +type A = int +let x = 1 diff --git a/tests/fsharp/typecheck/sigs/pos29.fsi b/tests/fsharp/typecheck/sigs/pos29.fsi new file mode 100644 index 00000000000..743173c41d8 --- /dev/null +++ b/tests/fsharp/typecheck/sigs/pos29.fsi @@ -0,0 +1,4 @@ +module rec Pos29 + +val x : A +type A = int diff --git a/tests/fsharp/typecheck/sigs/pos30.fs b/tests/fsharp/typecheck/sigs/pos30.fs new file mode 100644 index 00000000000..cbc3c4041da --- /dev/null +++ b/tests/fsharp/typecheck/sigs/pos30.fs @@ -0,0 +1,70 @@ +module Pos30 + +module Test0 = + System.Console.WriteLine(format="{0}", arg = (Array.ofSeq <| seq { + yield box "hello" + })) + +module Test0b = + System.Console.WriteLine(seq { + yield 1 + }) + +module Test1 = + System.Console.WriteLine(format="{0}", arg = [| + "hello" + |]) + System.Console.WriteLine([| + "hello" + |]) + +module Test2 = + System.Console.WriteLine(format="{0}", arg = Array.ofList [ + "hello" + ]) + System.Console.WriteLine([ + "hello" + ]) + +module Test3 = + System.Console.WriteLine(format="{0}", arg = [| + |]) + System.Console.WriteLine([| + |]) + + +module Test4 = + System.Console.WriteLine(format="{0}", arg = Array.ofList [ + ]) + System.Console.WriteLine([ + ]) + +module Test5 = + System.Console.WriteLine(format="{0}", arg = [| + yield box "hello" + yield box "hello" + yield box "hello" + yield box "hello" + |]) + +module Test6 = + System.Console.WriteLine(format="{0}", arg = Array.ofList [ + yield box "hello" + yield box "hello" + yield box "hello" + yield box "hello" + yield box "hello" + ]) + + +module Test7 = + System.Console.WriteLine [| + yield "hello" + yield "hello" + yield "hello" + yield "hello" + yield "hello" + |] + + + \ No newline at end of file diff --git a/tests/fsharp/typecheck/sigs/pos31.fs b/tests/fsharp/typecheck/sigs/pos31.fs new file mode 100644 index 00000000000..cab65060062 --- /dev/null +++ b/tests/fsharp/typecheck/sigs/pos31.fs @@ -0,0 +1,22 @@ +module Pos31 + +let x1 : obj list = [ "" ] +let x2 : obj [] = [| "" |] +let x3 : obj list = [ yield "" ] +let x4 : obj[] = [| yield "" |] +let x5 : seq = seq { yield "" } +let x6 : seq = seq { yield "" :> obj } + +let g2 () : System.Reflection.MemberInfo[] = + [| yield (Unchecked.defaultof :> _) |] + +let g3 () : System.Reflection.MemberInfo[] = + [| yield Unchecked.defaultof |] + +let g4 () : System.Reflection.MemberInfo[] = + [| yield! g2() + yield Unchecked.defaultof |] + +let g5 xs : System.Reflection.MemberInfo[] = + [| for x in xs do yield x |] + diff --git a/tests/fsharp/typecheck/sigs/pos31.fsi b/tests/fsharp/typecheck/sigs/pos31.fsi new file mode 100644 index 00000000000..459fd7c0267 --- /dev/null +++ b/tests/fsharp/typecheck/sigs/pos31.fsi @@ -0,0 +1,13 @@ +module Pos31 +val x1 : obj list +val x2 : obj [] +val x3 : obj list +val x4 : obj [] +val x5 : seq +val x6 : seq +val g2 : unit -> System.Reflection.MemberInfo [] +val g3 : unit -> System.Reflection.MemberInfo [] +val g4 : unit -> System.Reflection.MemberInfo [] + +// This checks that IsCompatFlex ensures that a more generic type is not inferred +val g5 : xs:seq -> System.Reflection.MemberInfo [] \ No newline at end of file diff --git a/tests/fsharp/update.base.line.with.actuals.fsx b/tests/fsharp/update.base.line.with.actuals.fsx new file mode 100644 index 00000000000..8b391a2f459 --- /dev/null +++ b/tests/fsharp/update.base.line.with.actuals.fsx @@ -0,0 +1,27 @@ +open System.IO + +// this script is usefull for tests using a .bsl file (baseline) containing expected compiler output +// which is matched against .vserr or .err file aside once the test has run +// the script replaces all the .bsl/.bslpp with either .err or .vserr + +let directories = + [ + "typecheck/sigs" + "typeProviders/negTests" + ] + |> List.map (fun d -> Path.Combine(__SOURCE_DIRECTORY__, d) |> DirectoryInfo) + +let extensionPatterns = ["*.err"; "*.vserr"] +for d in directories do + for p in extensionPatterns do + for errFile in d.GetFiles p do + let baseLineFile = FileInfo(Path.ChangeExtension(errFile.FullName, "bsl")) + let baseLineFilePreProcess = FileInfo(Path.ChangeExtension(errFile.FullName, "bslpp")) + + if File.ReadAllText(errFile.FullName) <> File.ReadAllText(baseLineFile.FullName) then + let expectedFile = + if baseLineFilePreProcess.Exists then baseLineFilePreProcess + else baseLineFile + + printfn "%s not matching, replacing with %s" expectedFile.FullName errFile.FullName + errFile.CopyTo(expectedFile.FullName, true) |> ignore diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest1.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest1.il.bsl index ec794be06a1..3e69ae4967f 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest1.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest1.il.bsl @@ -13,7 +13,7 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 4:4:1:0 + .ver 4:4:3:0 } .assembly AsyncExpressionSteppingTest1 { @@ -29,20 +29,20 @@ } .mresource public FSharpSignatureData.AsyncExpressionSteppingTest1 { - // Offset: 0x00000000 Length: 0x0000024A + // Offset: 0x00000000 Length: 0x0000026C } .mresource public FSharpOptimizationData.AsyncExpressionSteppingTest1 { - // Offset: 0x00000250 Length: 0x000000B1 + // Offset: 0x00000270 Length: 0x000000B1 } .module AsyncExpressionSteppingTest1.dll -// MVID: {5A1F62A7-6394-B5D4-A745-0383A7621F5A} +// MVID: {5AF5DDAE-6394-B5D4-A745-0383AEDDF55A} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x05190000 +// Image base: 0x02880000 // =============== CLASS MEMBERS DECLARATION =================== @@ -83,7 +83,7 @@ // Code size 62 (0x3e) .maxstack 8 .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 6,6 : 17,32 'C:\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\AsyncExpressionStepping\\AsyncExpressionSteppingTest1.fs' + .line 6,6 : 17,32 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\AsyncExpressionStepping\\AsyncExpressionSteppingTest1.fs' IL_0000: ldstr "hello" IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.il.bsl index 6a87f0671a8..7bdb6a074c0 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.il.bsl @@ -13,7 +13,7 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 4:4:1:0 + .ver 4:4:3:0 } .assembly AsyncExpressionSteppingTest2 { @@ -29,20 +29,20 @@ } .mresource public FSharpSignatureData.AsyncExpressionSteppingTest2 { - // Offset: 0x00000000 Length: 0x0000024A + // Offset: 0x00000000 Length: 0x0000026C } .mresource public FSharpOptimizationData.AsyncExpressionSteppingTest2 { - // Offset: 0x00000250 Length: 0x000000B1 + // Offset: 0x00000270 Length: 0x000000B1 } .module AsyncExpressionSteppingTest2.dll -// MVID: {5A1F62A7-6394-D499-A745-0383A7621F5A} +// MVID: {5AF5DDAE-6394-D499-A745-0383AEDDF55A} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x00F10000 +// Image base: 0x04520000 // =============== CLASS MEMBERS DECLARATION =================== @@ -80,7 +80,7 @@ // Code size 15 (0xf) .maxstack 8 .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 6,6 : 23,29 'C:\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\AsyncExpressionStepping\\AsyncExpressionSteppingTest2.fs' + .line 6,6 : 23,29 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\AsyncExpressionStepping\\AsyncExpressionSteppingTest2.fs' IL_0000: ldarg.0 IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 AsyncExpressionSteppingTest2/AsyncExpressionSteppingTest2/'f2@6-1'::x IL_0006: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest3.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest3.il.bsl index 83b7070f112..6dfebd88b1e 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest3.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest3.il.bsl @@ -13,7 +13,7 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 4:4:1:0 + .ver 4:4:3:0 } .assembly AsyncExpressionSteppingTest3 { @@ -29,20 +29,20 @@ } .mresource public FSharpSignatureData.AsyncExpressionSteppingTest3 { - // Offset: 0x00000000 Length: 0x00000255 + // Offset: 0x00000000 Length: 0x00000277 } .mresource public FSharpOptimizationData.AsyncExpressionSteppingTest3 { - // Offset: 0x00000260 Length: 0x000000B1 + // Offset: 0x00000280 Length: 0x000000B1 } .module AsyncExpressionSteppingTest3.dll -// MVID: {5A1F62A7-6394-F35E-A745-0383A7621F5A} +// MVID: {5AF5DDAE-6394-F35E-A745-0383AEDDF55A} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x01210000 +// Image base: 0x04650000 // =============== CLASS MEMBERS DECLARATION =================== @@ -55,6 +55,44 @@ 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 sealed nested assembly beforefieldinit 'f3@10-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> + { + .field public int32 'value' + .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 assembly specialname rtspecialname + instance void .ctor(int32 'value') cil managed + { + .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 ) + // Code size 14 (0xe) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 AsyncExpressionSteppingTest3/AsyncExpressionSteppingTest3/'f3@10-1'::'value' + IL_000d: ret + } // end of method 'f3@10-1'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn + Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1 ctxt) cil managed + { + // Code size 14 (0xe) + .maxstack 8 + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 10,10 : 17,25 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\AsyncExpressionStepping\\AsyncExpressionSteppingTest3.fs' + IL_0000: ldarga.s ctxt + IL_0002: ldarg.0 + IL_0003: ldfld int32 AsyncExpressionSteppingTest3/AsyncExpressionSteppingTest3/'f3@10-1'::'value' + IL_0008: call instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1::OnSuccess(!0) + IL_000d: ret + } // end of method 'f3@10-1'::Invoke + + } // end of class 'f3@10-1' + .class auto ansi serializable sealed nested assembly beforefieldinit f3@5 extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { @@ -80,13 +118,14 @@ .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed { - // Code size 57 (0x39) + // Code size 67 (0x43) .maxstack 6 .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 x, [1] class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 y, - [2] int32 z) - .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 5,5 : 17,30 'C:\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\AsyncExpressionStepping\\AsyncExpressionSteppingTest3.fs' + [2] int32 z, + [3] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_3, + [4] int32 V_4) + .line 5,5 : 17,30 '' IL_0000: ldc.i4.0 IL_0001: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::Ref(!!0) IL_0006: stloc.0 @@ -112,10 +151,14 @@ .line 10,10 : 17,25 '' IL_002a: ldarg.0 IL_002b: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest3/AsyncExpressionSteppingTest3/f3@5::builder@ - IL_0030: ldloc.2 - IL_0031: tail. - IL_0033: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::Return(!!0) - IL_0038: ret + IL_0030: stloc.3 + IL_0031: ldloc.2 + IL_0032: stloc.s V_4 + IL_0034: ldloc.s V_4 + IL_0036: newobj instance void AsyncExpressionSteppingTest3/AsyncExpressionSteppingTest3/'f3@10-1'::.ctor(int32) + IL_003b: tail. + IL_003d: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) + IL_0042: ret } // end of method f3@5::Invoke } // end of class f3@5 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest4.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest4.il.bsl index 02e29ae2280..ce54bd4945d 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest4.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest4.il.bsl @@ -13,7 +13,7 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 4:4:1:0 + .ver 4:4:3:0 } .assembly AsyncExpressionSteppingTest4 { @@ -29,20 +29,20 @@ } .mresource public FSharpSignatureData.AsyncExpressionSteppingTest4 { - // Offset: 0x00000000 Length: 0x00000255 + // Offset: 0x00000000 Length: 0x00000277 } .mresource public FSharpOptimizationData.AsyncExpressionSteppingTest4 { - // Offset: 0x00000260 Length: 0x000000B1 + // Offset: 0x00000280 Length: 0x000000B1 } .module AsyncExpressionSteppingTest4.dll -// MVID: {5A1F62A7-6394-6D4B-A745-0383A7621F5A} +// MVID: {5AF5DDAE-6394-6D4B-A745-0383AEDDF55A} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x038C0000 +// Image base: 0x028F0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -55,6 +55,44 @@ 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 sealed nested assembly beforefieldinit 'f4@10-2' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> + { + .field public int32 'value' + .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 assembly specialname rtspecialname + instance void .ctor(int32 'value') cil managed + { + .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 ) + // Code size 14 (0xe) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/'f4@10-2'::'value' + IL_000d: ret + } // end of method 'f4@10-2'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn + Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1 ctxt) cil managed + { + // Code size 14 (0xe) + .maxstack 8 + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 10,10 : 21,29 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\AsyncExpressionStepping\\AsyncExpressionSteppingTest4.fs' + IL_0000: ldarga.s ctxt + IL_0002: ldarg.0 + IL_0003: ldfld int32 AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/'f4@10-2'::'value' + IL_0008: call instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1::OnSuccess(!0) + IL_000d: ret + } // end of method 'f4@10-2'::Invoke + + } // end of class 'f4@10-2' + .class auto ansi serializable sealed nested assembly beforefieldinit 'f4@7-1' extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { @@ -85,12 +123,13 @@ .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed { - // Code size 48 (0x30) + // Code size 56 (0x38) .maxstack 6 .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 y, - [1] int32 z) - .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 7,7 : 21,34 'C:\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\AsyncExpressionStepping\\AsyncExpressionSteppingTest4.fs' + [1] int32 z, + [2] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_2, + [3] int32 V_3) + .line 7,7 : 21,34 '' IL_0000: ldc.i4.0 IL_0001: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::Ref(!!0) IL_0006: stloc.0 @@ -109,15 +148,19 @@ .line 10,10 : 21,29 '' IL_0021: ldarg.0 IL_0022: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/'f4@7-1'::builder@ - IL_0027: ldloc.1 - IL_0028: tail. - IL_002a: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::Return(!!0) - IL_002f: ret + IL_0027: stloc.2 + IL_0028: ldloc.1 + IL_0029: stloc.3 + IL_002a: ldloc.3 + IL_002b: newobj instance void AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/'f4@10-2'::.ctor(int32) + IL_0030: tail. + IL_0032: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) + IL_0037: ret } // end of method 'f4@7-1'::Invoke } // end of class 'f4@7-1' - .class auto ansi serializable sealed nested assembly beforefieldinit 'f4@12-2' + .class auto ansi serializable sealed nested assembly beforefieldinit 'f4@12-3' extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 { .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 x @@ -132,9 +175,9 @@ IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() IL_0006: ldarg.0 IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/'f4@12-2'::x + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/'f4@12-3'::x IL_000d: ret - } // end of method 'f4@12-2'::.ctor + } // end of method 'f4@12-3'::.ctor .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.Unit Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed @@ -143,7 +186,7 @@ .maxstack 8 .line 12,12 : 20,26 '' IL_0000: ldarg.0 - IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/'f4@12-2'::x + IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/'f4@12-3'::x IL_0006: call void [FSharp.Core]Microsoft.FSharp.Core.Operators::Increment(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) IL_000b: nop .line 13,13 : 20,34 '' @@ -152,9 +195,59 @@ IL_0016: tail. IL_0018: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) IL_001d: ret - } // end of method 'f4@12-2'::Invoke + } // end of method 'f4@12-3'::Invoke - } // end of class 'f4@12-2' + } // end of class 'f4@12-3' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'f4@6-4' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> + { + .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation + .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 ) + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 compensation + .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 assembly specialname rtspecialname + instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 compensation) cil managed + { + .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 ) + // Code size 21 (0x15) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/'f4@6-4'::computation + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/'f4@6-4'::compensation + IL_0014: ret + } // end of method 'f4@6-4'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn + Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1 ctxt) cil managed + { + // Code size 21 (0x15) + .maxstack 8 + .line 6,6 : 17,20 '' + IL_0000: ldarg.1 + IL_0001: ldarg.0 + IL_0002: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/'f4@6-4'::computation + IL_0007: ldarg.0 + IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/'f4@6-4'::compensation + IL_000d: tail. + IL_000f: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::TryFinally(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) + IL_0014: ret + } // end of method 'f4@6-4'::Invoke + + } // end of class 'f4@6-4' .class auto ansi serializable sealed nested assembly beforefieldinit f4@5 extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> @@ -181,9 +274,12 @@ .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed { - // Code size 50 (0x32) - .maxstack 8 - .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 x) + // Code size 60 (0x3c) + .maxstack 7 + .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 x, + [1] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_1, + [2] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_2, + [3] class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 V_3) .line 5,5 : 17,30 '' IL_0000: ldc.i4.0 IL_0001: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::Ref(!!0) @@ -191,20 +287,26 @@ .line 6,6 : 17,20 '' IL_0007: ldarg.0 IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/f4@5::builder@ - IL_000d: ldarg.0 - IL_000e: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/f4@5::builder@ - IL_0013: ldarg.0 - IL_0014: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/f4@5::builder@ - IL_0019: ldloc.0 - IL_001a: newobj instance void AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/'f4@7-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder, + IL_000d: stloc.1 + IL_000e: ldarg.0 + IL_000f: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/f4@5::builder@ + IL_0014: ldarg.0 + IL_0015: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/f4@5::builder@ + IL_001a: ldloc.0 + IL_001b: newobj instance void AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/'f4@7-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder, class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_001f: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::Delay(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0024: ldloc.0 - IL_0025: newobj instance void AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/'f4@12-2'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_002a: tail. - IL_002c: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::TryFinally(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0031: ret + IL_0020: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::Delay(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_0025: stloc.2 + IL_0026: ldloc.0 + IL_0027: newobj instance void AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/'f4@12-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_002c: stloc.3 + IL_002d: ldloc.2 + IL_002e: ldloc.3 + IL_002f: newobj instance void AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/'f4@6-4'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) + IL_0034: tail. + IL_0036: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) + IL_003b: ret } // end of method f4@5::Invoke } // end of class f4@5 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest5.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest5.il.bsl index 50407f757c2..da554a3adf4 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest5.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest5.il.bsl @@ -13,7 +13,7 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 4:4:1:0 + .ver 4:4:3:0 } .assembly AsyncExpressionSteppingTest5 { @@ -29,20 +29,20 @@ } .mresource public FSharpSignatureData.AsyncExpressionSteppingTest5 { - // Offset: 0x00000000 Length: 0x00000296 + // Offset: 0x00000000 Length: 0x000002B8 } .mresource public FSharpOptimizationData.AsyncExpressionSteppingTest5 { - // Offset: 0x000002A0 Length: 0x000000BE + // Offset: 0x000002C0 Length: 0x000000BE } .module AsyncExpressionSteppingTest5.dll -// MVID: {5A1F62A7-6394-30E8-A745-0383A7621F5A} +// MVID: {5AF5DDAE-6394-30E8-A745-0383AEDDF55A} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x00C60000 +// Image base: 0x04430000 // =============== CLASS MEMBERS DECLARATION =================== @@ -84,7 +84,7 @@ .maxstack 5 .locals init ([0] int32 x) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 6,6 : 17,31 'C:\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\AsyncExpressionStepping\\AsyncExpressionSteppingTest5.fs' + .line 6,6 : 17,31 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\AsyncExpressionStepping\\AsyncExpressionSteppingTest5.fs' IL_0000: ldarg.1 IL_0001: stloc.0 .line 7,7 : 20,35 '' @@ -198,6 +198,91 @@ } // end of class 'f7@9-2' + .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@6-4' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation2 + .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 assembly specialname rtspecialname + instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation2) cil managed + { + .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 ) + // Code size 14 (0xe) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-4'::computation2 + IL_000d: ret + } // end of method 'f7@6-4'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 + Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar0) cil managed + { + // Code size 7 (0x7) + .maxstack 8 + .line 6,6 : 17,31 '' + IL_0000: ldarg.0 + IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-4'::computation2 + IL_0006: ret + } // end of method 'f7@6-4'::Invoke + + } // end of class 'f7@6-4' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@6-5' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> + { + .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation1 + .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 ) + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> part2 + .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 assembly specialname rtspecialname + instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> part2) cil managed + { + .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 ) + // Code size 21 (0x15) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-5'::computation1 + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-5'::part2 + IL_0014: ret + } // end of method 'f7@6-5'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn + Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1 ctxt) cil managed + { + // Code size 21 (0x15) + .maxstack 8 + .line 6,6 : 17,31 '' + IL_0000: ldarg.1 + IL_0001: ldarg.0 + IL_0002: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-5'::computation1 + IL_0007: ldarg.0 + IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-5'::part2 + IL_000d: tail. + IL_000f: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::Bind(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_0014: ret + } // end of method 'f7@6-5'::Invoke + + } // end of class 'f7@6-5' + .class auto ansi serializable sealed nested assembly beforefieldinit f7@6 extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { @@ -223,29 +308,42 @@ .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed { - // Code size 63 (0x3f) - .maxstack 8 + // Code size 80 (0x50) + .maxstack 7 + .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_0, + [1] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_1, + [2] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_2, + [3] class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_3) .line 6,6 : 17,31 '' IL_0000: ldarg.0 IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/f7@6::builder@ - IL_0006: ldarg.0 - IL_0007: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/f7@6::builder@ - IL_000c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5::get_es() - IL_0011: ldarg.0 - IL_0012: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/f7@6::builder@ - IL_0017: newobj instance void AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder) - IL_001c: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::For(class [mscorlib]System.Collections.Generic.IEnumerable`1, + IL_0006: stloc.0 + IL_0007: ldarg.0 + IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/f7@6::builder@ + IL_000d: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5::get_es() + IL_0012: ldarg.0 + IL_0013: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/f7@6::builder@ + IL_0018: newobj instance void AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder) + IL_001d: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::For(class [mscorlib]System.Collections.Generic.IEnumerable`1, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0021: ldarg.0 - IL_0022: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/f7@6::builder@ - IL_0027: ldarg.0 - IL_0028: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/f7@6::builder@ - IL_002d: newobj instance void AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-2'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder) - IL_0032: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::Delay(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0037: tail. - IL_0039: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::Combine(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, - class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1) - IL_003e: ret + IL_0022: stloc.1 + IL_0023: ldarg.0 + IL_0024: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/f7@6::builder@ + IL_0029: ldarg.0 + IL_002a: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/f7@6::builder@ + IL_002f: newobj instance void AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-2'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder) + IL_0034: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::Delay(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_0039: stloc.2 + IL_003a: ldloc.2 + IL_003b: newobj instance void AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-4'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1) + IL_0040: stloc.3 + IL_0041: ldloc.1 + IL_0042: ldloc.3 + IL_0043: newobj instance void AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-5'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_0048: tail. + IL_004a: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) + IL_004f: ret } // end of method f7@6::Invoke } // end of class f7@6 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest6.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest6.il.bsl index e027d172025..379ad6bbe7c 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest6.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest6.il.bsl @@ -13,7 +13,7 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 4:4:1:0 + .ver 4:4:3:0 } .assembly AsyncExpressionSteppingTest6 { @@ -29,20 +29,20 @@ } .mresource public FSharpSignatureData.AsyncExpressionSteppingTest6 { - // Offset: 0x00000000 Length: 0x00000281 + // Offset: 0x00000000 Length: 0x000002A3 } .mresource public FSharpOptimizationData.AsyncExpressionSteppingTest6 { - // Offset: 0x00000288 Length: 0x000000BE + // Offset: 0x000002A8 Length: 0x000000BE } .module AsyncExpressionSteppingTest6.dll -// MVID: {5A1F62A7-6394-4FAD-A745-0383A7621F5A} +// MVID: {5AF5DDAE-6394-4FAD-A745-0383AEDDF55A} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x03740000 +// Image base: 0x04C40000 // =============== CLASS MEMBERS DECLARATION =================== @@ -55,6 +55,44 @@ 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 sealed nested assembly beforefieldinit 'f2@10-4' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> + { + .field public int32 'value' + .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 assembly specialname rtspecialname + instance void .ctor(int32 'value') cil managed + { + .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 ) + // Code size 14 (0xe) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f2@10-4'::'value' + IL_000d: ret + } // end of method 'f2@10-4'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn + Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1 ctxt) cil managed + { + // Code size 14 (0xe) + .maxstack 8 + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 10,10 : 17,25 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\AsyncExpressionStepping\\AsyncExpressionSteppingTest6.fs' + IL_0000: ldarga.s ctxt + IL_0002: ldarg.0 + IL_0003: ldfld int32 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f2@10-4'::'value' + IL_0008: call instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1::OnSuccess(!0) + IL_000d: ret + } // end of method 'f2@10-4'::Invoke + + } // end of class 'f2@10-4' + .class auto ansi serializable sealed nested assembly beforefieldinit 'f2@5-3' extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { @@ -80,13 +118,14 @@ .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed { - // Code size 57 (0x39) + // Code size 67 (0x43) .maxstack 6 .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 x, [1] class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 y, - [2] int32 z) - .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 5,5 : 17,30 'C:\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\AsyncExpressionStepping\\AsyncExpressionSteppingTest6.fs' + [2] int32 z, + [3] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_3, + [4] int32 V_4) + .line 5,5 : 17,30 '' IL_0000: ldc.i4.0 IL_0001: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::Ref(!!0) IL_0006: stloc.0 @@ -112,15 +151,56 @@ .line 10,10 : 17,25 '' IL_002a: ldarg.0 IL_002b: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f2@5-3'::builder@ - IL_0030: ldloc.2 - IL_0031: tail. - IL_0033: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::Return(!!0) - IL_0038: ret + IL_0030: stloc.3 + IL_0031: ldloc.2 + IL_0032: stloc.s V_4 + IL_0034: ldloc.s V_4 + IL_0036: newobj instance void AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f2@10-4'::.ctor(int32) + IL_003b: tail. + IL_003d: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) + IL_0042: ret } // end of method 'f2@5-3'::Invoke } // end of class 'f2@5-3' - .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@19-5' + .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@20-7' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> + { + .field public int32 'value' + .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 assembly specialname rtspecialname + instance void .ctor(int32 'value') cil managed + { + .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 ) + // Code size 14 (0xe) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@20-7'::'value' + IL_000d: ret + } // end of method 'f3@20-7'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn + Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1 ctxt) cil managed + { + // Code size 14 (0xe) + .maxstack 8 + .line 20,20 : 17,25 '' + IL_0000: ldarga.s ctxt + IL_0002: ldarg.0 + IL_0003: ldfld int32 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@20-7'::'value' + IL_0008: call instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1::OnSuccess(!0) + IL_000d: ret + } // end of method 'f3@20-7'::Invoke + + } // end of class 'f3@20-7' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@19-6' extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@ @@ -142,31 +222,33 @@ IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() IL_0006: ldarg.0 IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@19-5'::builder@ + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@19-6'::builder@ IL_000d: ldarg.0 IL_000e: ldarg.2 - IL_000f: stfld int32 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@19-5'::x1 + IL_000f: stfld int32 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@19-6'::x1 IL_0014: ldarg.0 IL_0015: ldarg.3 - IL_0016: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@19-5'::y + IL_0016: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@19-6'::y IL_001b: ret - } // end of method 'f3@19-5'::.ctor + } // end of method 'f3@19-6'::.ctor .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(int32 _arg4) cil managed { - // Code size 38 (0x26) + // Code size 46 (0x2e) .maxstack 6 .locals init ([0] int32 x4, - [1] int32 z) + [1] int32 z, + [2] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_2, + [3] int32 V_3) .line 18,18 : 17,31 '' IL_0000: ldarg.1 IL_0001: stloc.0 .line 19,19 : 17,37 '' IL_0002: ldarg.0 - IL_0003: ldfld int32 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@19-5'::x1 + IL_0003: ldfld int32 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@19-6'::x1 IL_0008: ldarg.0 - IL_0009: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@19-5'::y + IL_0009: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@19-6'::y IL_000e: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) IL_0013: add IL_0014: ldloc.0 @@ -174,16 +256,70 @@ IL_0016: stloc.1 .line 20,20 : 17,25 '' IL_0017: ldarg.0 - IL_0018: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@19-5'::builder@ - IL_001d: ldloc.1 - IL_001e: tail. - IL_0020: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::Return(!!0) - IL_0025: ret - } // end of method 'f3@19-5'::Invoke + IL_0018: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@19-6'::builder@ + IL_001d: stloc.2 + IL_001e: ldloc.1 + IL_001f: stloc.3 + IL_0020: ldloc.3 + IL_0021: newobj instance void AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@20-7'::.ctor(int32) + IL_0026: tail. + IL_0028: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) + IL_002d: ret + } // end of method 'f3@19-6'::Invoke + + } // end of class 'f3@19-6' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@18-8' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> + { + .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation + .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 ) + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> binder + .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 assembly specialname rtspecialname + instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> binder) cil managed + { + .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 ) + // Code size 21 (0x15) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@18-8'::computation + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@18-8'::binder + IL_0014: ret + } // end of method 'f3@18-8'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn + Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1 ctxt) cil managed + { + // Code size 21 (0x15) + .maxstack 8 + .line 18,18 : 17,31 '' + IL_0000: ldarg.1 + IL_0001: ldarg.0 + IL_0002: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@18-8'::computation + IL_0007: ldarg.0 + IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@18-8'::binder + IL_000d: tail. + IL_000f: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::Bind(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_0014: ret + } // end of method 'f3@18-8'::Invoke - } // end of class 'f3@19-5' + } // end of class 'f3@18-8' - .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@16-4' + .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@16-5' extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@ @@ -203,20 +339,23 @@ IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() IL_0006: ldarg.0 IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@16-4'::builder@ + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@16-5'::builder@ IL_000d: ldarg.0 IL_000e: ldarg.2 - IL_000f: stfld int32 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@16-4'::x1 + IL_000f: stfld int32 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@16-5'::x1 IL_0014: ret - } // end of method 'f3@16-4'::.ctor + } // end of method 'f3@16-5'::.ctor .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(int32 _arg3) cil managed { - // Code size 53 (0x35) - .maxstack 9 + // Code size 65 (0x41) + .maxstack 7 .locals init ([0] int32 x3, - [1] class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 y) + [1] class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 y, + [2] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_2, + [3] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_3, + [4] class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_4) .line 15,15 : 17,31 '' IL_0000: ldarg.1 IL_0001: stloc.0 @@ -230,25 +369,81 @@ IL_000f: nop .line 18,18 : 17,31 '' IL_0010: ldarg.0 - IL_0011: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@16-4'::builder@ - IL_0016: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6::f2() - IL_001b: ldarg.0 - IL_001c: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@16-4'::builder@ - IL_0021: ldarg.0 - IL_0022: ldfld int32 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@16-4'::x1 - IL_0027: ldloc.1 - IL_0028: newobj instance void AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@19-5'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder, + IL_0011: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@16-5'::builder@ + IL_0016: stloc.2 + IL_0017: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6::f2() + IL_001c: stloc.3 + IL_001d: ldarg.0 + IL_001e: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@16-5'::builder@ + IL_0023: ldarg.0 + IL_0024: ldfld int32 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@16-5'::x1 + IL_0029: ldloc.1 + IL_002a: newobj instance void AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@19-6'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder, int32, class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_002d: tail. - IL_002f: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::Bind(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0034: ret - } // end of method 'f3@16-4'::Invoke + IL_002f: stloc.s V_4 + IL_0031: ldloc.3 + IL_0032: ldloc.s V_4 + IL_0034: newobj instance void AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@18-8'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_0039: tail. + IL_003b: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) + IL_0040: ret + } // end of method 'f3@16-5'::Invoke + + } // end of class 'f3@16-5' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@15-9' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> + { + .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation + .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 ) + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> binder + .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 assembly specialname rtspecialname + instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> binder) cil managed + { + .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 ) + // Code size 21 (0x15) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@15-9'::computation + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@15-9'::binder + IL_0014: ret + } // end of method 'f3@15-9'::.ctor - } // end of class 'f3@16-4' + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn + Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1 ctxt) cil managed + { + // Code size 21 (0x15) + .maxstack 8 + .line 15,15 : 17,31 '' + IL_0000: ldarg.1 + IL_0001: ldarg.0 + IL_0002: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@15-9'::computation + IL_0007: ldarg.0 + IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@15-9'::binder + IL_000d: tail. + IL_000f: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::Bind(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_0014: ret + } // end of method 'f3@15-9'::Invoke + + } // end of class 'f3@15-9' - .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@15-3' + .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@15-4' extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@ @@ -268,41 +463,100 @@ IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() IL_0006: ldarg.0 IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@15-3'::builder@ + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@15-4'::builder@ IL_000d: ldarg.0 IL_000e: ldarg.2 - IL_000f: stfld int32 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@15-3'::x1 + IL_000f: stfld int32 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@15-4'::x1 IL_0014: ret - } // end of method 'f3@15-3'::.ctor + } // end of method 'f3@15-4'::.ctor .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(int32 _arg2) cil managed { - // Code size 38 (0x26) - .maxstack 8 - .locals init ([0] int32 x2) + // Code size 48 (0x30) + .maxstack 6 + .locals init ([0] int32 x2, + [1] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_1, + [2] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_2, + [3] class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_3) .line 14,14 : 17,31 '' IL_0000: ldarg.1 IL_0001: stloc.0 .line 15,15 : 17,31 '' IL_0002: ldarg.0 - IL_0003: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@15-3'::builder@ - IL_0008: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6::f2() - IL_000d: ldarg.0 - IL_000e: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@15-3'::builder@ - IL_0013: ldarg.0 - IL_0014: ldfld int32 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@15-3'::x1 - IL_0019: newobj instance void AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@16-4'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder, + IL_0003: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@15-4'::builder@ + IL_0008: stloc.1 + IL_0009: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6::f2() + IL_000e: stloc.2 + IL_000f: ldarg.0 + IL_0010: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@15-4'::builder@ + IL_0015: ldarg.0 + IL_0016: ldfld int32 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@15-4'::x1 + IL_001b: newobj instance void AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@16-5'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder, int32) - IL_001e: tail. - IL_0020: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::Bind(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0025: ret - } // end of method 'f3@15-3'::Invoke + IL_0020: stloc.3 + IL_0021: ldloc.2 + IL_0022: ldloc.3 + IL_0023: newobj instance void AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@15-9'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_0028: tail. + IL_002a: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) + IL_002f: ret + } // end of method 'f3@15-4'::Invoke + + } // end of class 'f3@15-4' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@14-10' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> + { + .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation + .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 ) + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> binder + .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 assembly specialname rtspecialname + instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> binder) cil managed + { + .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 ) + // Code size 21 (0x15) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@14-10'::computation + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@14-10'::binder + IL_0014: ret + } // end of method 'f3@14-10'::.ctor - } // end of class 'f3@15-3' + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn + Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1 ctxt) cil managed + { + // Code size 21 (0x15) + .maxstack 8 + .line 14,14 : 17,31 '' + IL_0000: ldarg.1 + IL_0001: ldarg.0 + IL_0002: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@14-10'::computation + IL_0007: ldarg.0 + IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@14-10'::binder + IL_000d: tail. + IL_000f: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::Bind(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_0014: ret + } // end of method 'f3@14-10'::Invoke - .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@14-2' + } // end of class 'f3@14-10' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@14-3' extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@ @@ -320,37 +574,96 @@ IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() IL_0006: ldarg.0 IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@14-2'::builder@ + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@14-3'::builder@ IL_000d: ret - } // end of method 'f3@14-2'::.ctor + } // end of method 'f3@14-3'::.ctor .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(int32 _arg1) cil managed { - // Code size 33 (0x21) - .maxstack 8 - .locals init ([0] int32 x1) + // Code size 43 (0x2b) + .maxstack 6 + .locals init ([0] int32 x1, + [1] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_1, + [2] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_2, + [3] class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_3) .line 13,13 : 17,31 '' IL_0000: ldarg.1 IL_0001: stloc.0 .line 14,14 : 17,31 '' IL_0002: ldarg.0 - IL_0003: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@14-2'::builder@ - IL_0008: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6::f2() - IL_000d: ldarg.0 - IL_000e: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@14-2'::builder@ - IL_0013: ldloc.0 - IL_0014: newobj instance void AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@15-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder, + IL_0003: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@14-3'::builder@ + IL_0008: stloc.1 + IL_0009: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6::f2() + IL_000e: stloc.2 + IL_000f: ldarg.0 + IL_0010: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@14-3'::builder@ + IL_0015: ldloc.0 + IL_0016: newobj instance void AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@15-4'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder, int32) - IL_0019: tail. - IL_001b: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::Bind(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0020: ret - } // end of method 'f3@14-2'::Invoke + IL_001b: stloc.3 + IL_001c: ldloc.2 + IL_001d: ldloc.3 + IL_001e: newobj instance void AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@14-10'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_0023: tail. + IL_0025: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) + IL_002a: ret + } // end of method 'f3@14-3'::Invoke + + } // end of class 'f3@14-3' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@13-11' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> + { + .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation + .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 ) + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> binder + .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 assembly specialname rtspecialname + instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> binder) cil managed + { + .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 ) + // Code size 21 (0x15) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@13-11'::computation + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@13-11'::binder + IL_0014: ret + } // end of method 'f3@13-11'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn + Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1 ctxt) cil managed + { + // Code size 21 (0x15) + .maxstack 8 + .line 13,13 : 17,31 '' + IL_0000: ldarg.1 + IL_0001: ldarg.0 + IL_0002: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@13-11'::computation + IL_0007: ldarg.0 + IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@13-11'::binder + IL_000d: tail. + IL_000f: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::Bind(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_0014: ret + } // end of method 'f3@13-11'::Invoke - } // end of class 'f3@14-2' + } // end of class 'f3@13-11' - .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@13-1' + .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@13-2' extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@ @@ -368,29 +681,38 @@ IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() IL_0006: ldarg.0 IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@13-1'::builder@ + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@13-2'::builder@ IL_000d: ret - } // end of method 'f3@13-1'::.ctor + } // end of method 'f3@13-2'::.ctor .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed { - // Code size 30 (0x1e) - .maxstack 8 + // Code size 40 (0x28) + .maxstack 6 + .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_0, + [1] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_1, + [2] class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_2) .line 13,13 : 17,31 '' IL_0000: ldarg.0 - IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@13-1'::builder@ - IL_0006: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6::f2() - IL_000b: ldarg.0 - IL_000c: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@13-1'::builder@ - IL_0011: newobj instance void AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@14-2'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder) - IL_0016: tail. - IL_0018: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::Bind(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_001d: ret - } // end of method 'f3@13-1'::Invoke - - } // end of class 'f3@13-1' + IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@13-2'::builder@ + IL_0006: stloc.0 + IL_0007: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6::f2() + IL_000c: stloc.1 + IL_000d: ldarg.0 + IL_000e: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@13-2'::builder@ + IL_0013: newobj instance void AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@14-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder) + IL_0018: stloc.2 + IL_0019: ldloc.1 + IL_001a: ldloc.2 + IL_001b: newobj instance void AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@13-11'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_0020: tail. + IL_0022: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) + IL_0027: ret + } // end of method 'f3@13-2'::Invoke + + } // end of class 'f3@13-2' .method public static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 f2() cil managed @@ -420,7 +742,7 @@ IL_0005: stloc.0 IL_0006: ldloc.0 IL_0007: ldloc.0 - IL_0008: newobj instance void AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@13-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder) + IL_0008: newobj instance void AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@13-2'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder) IL_000d: tail. IL_000f: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::Delay(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) IL_0014: ret diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/GeneratedIterators/GenIter01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/GeneratedIterators/GenIter01.il.bsl index af881129c97..601e4ffc1e7 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/GeneratedIterators/GenIter01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/GeneratedIterators/GenIter01.il.bsl @@ -13,7 +13,7 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 4:4:1:0 + .ver 4:5:0:0 } .assembly GenIter01 { @@ -29,20 +29,20 @@ } .mresource public FSharpSignatureData.GenIter01 { - // Offset: 0x00000000 Length: 0x000001F7 + // Offset: 0x00000000 Length: 0x000001FF } .mresource public FSharpOptimizationData.GenIter01 { - // Offset: 0x00000200 Length: 0x0000007A + // Offset: 0x00000208 Length: 0x0000007A } .module GenIter01.exe -// MVID: {59B19213-F836-DC98-A745-03831392B159} +// MVID: {5B9A6329-F836-DC98-A745-038329639A5B} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x00720000 +// Image base: 0x01080000 // =============== CLASS MEMBERS DECLARATION =================== @@ -55,7 +55,6 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) - .field public int32 x .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' .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 ) @@ -69,35 +68,32 @@ .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 specialname rtspecialname - instance void .ctor(int32 x, - class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', int32 pc, int32 current) cil managed { - // Code size 36 (0x24) + // Code size 28 (0x1c) .maxstack 8 IL_0000: ldarg.0 IL_0001: ldarg.1 - IL_0002: stfld int32 GenIter01/squaresOfOneToTen@5::x + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 GenIter01/squaresOfOneToTen@5::'enum' IL_0007: ldarg.0 IL_0008: ldarg.2 - IL_0009: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 GenIter01/squaresOfOneToTen@5::'enum' + IL_0009: stfld int32 GenIter01/squaresOfOneToTen@5::pc IL_000e: ldarg.0 IL_000f: ldarg.3 - IL_0010: stfld int32 GenIter01/squaresOfOneToTen@5::pc + IL_0010: stfld int32 GenIter01/squaresOfOneToTen@5::current IL_0015: ldarg.0 - IL_0016: ldarg.s current - IL_0018: stfld int32 GenIter01/squaresOfOneToTen@5::current - IL_001d: ldarg.0 - IL_001e: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() - IL_0023: ret + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_001b: ret } // end of method squaresOfOneToTen@5::.ctor .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 182 (0xb6) + // Code size 157 (0x9d) .maxstack 8 + .locals init ([0] int32 x) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\GeneratedIterators\\GenIter01.fs' IL_0000: ldarg.0 @@ -108,7 +104,7 @@ IL_001b, IL_001d, IL_001f) - IL_0019: br.s IL_002d + IL_0019: br.s IL_002a IL_001b: br.s IL_0021 @@ -118,203 +114,194 @@ .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br.s IL_008c + IL_0022: br.s IL_0073 .line 100001,100001 : 0,0 '' IL_0024: nop - IL_0025: br.s IL_0082 + IL_0025: br.s IL_0070 .line 100001,100001 : 0,0 '' IL_0027: nop - IL_0028: br IL_00ad + IL_0028: br.s IL_0094 .line 100001,100001 : 0,0 '' - IL_002d: nop + IL_002a: nop .line 5,6 : 7,23 '' - IL_002e: ldarg.0 - IL_002f: ldc.i4.0 - IL_0030: ldc.i4.1 - IL_0031: ldc.i4.2 - IL_0032: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt32(int32, + IL_002b: ldarg.0 + IL_002c: ldc.i4.0 + IL_002d: ldc.i4.1 + IL_002e: ldc.i4.2 + IL_002f: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt32(int32, int32, int32) - IL_0037: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_003c: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 GenIter01/squaresOfOneToTen@5::'enum' - IL_0041: ldarg.0 - IL_0042: ldc.i4.1 - IL_0043: stfld int32 GenIter01/squaresOfOneToTen@5::pc + IL_0034: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0039: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 GenIter01/squaresOfOneToTen@5::'enum' + IL_003e: ldarg.0 + IL_003f: ldc.i4.1 + IL_0040: stfld int32 GenIter01/squaresOfOneToTen@5::pc .line 5,6 : 7,23 '' - IL_0048: ldarg.0 - IL_0049: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 GenIter01/squaresOfOneToTen@5::'enum' - IL_004e: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0053: brfalse.s IL_008c - - IL_0055: ldarg.0 - IL_0056: ldarg.0 - IL_0057: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 GenIter01/squaresOfOneToTen@5::'enum' - IL_005c: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0061: stfld int32 GenIter01/squaresOfOneToTen@5::x - IL_0066: ldarg.0 - IL_0067: ldc.i4.2 - IL_0068: stfld int32 GenIter01/squaresOfOneToTen@5::pc + IL_0045: ldarg.0 + IL_0046: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 GenIter01/squaresOfOneToTen@5::'enum' + IL_004b: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_0050: brfalse.s IL_0073 + + IL_0052: ldarg.0 + IL_0053: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 GenIter01/squaresOfOneToTen@5::'enum' + IL_0058: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_005d: stloc.0 + IL_005e: ldarg.0 + IL_005f: ldc.i4.2 + IL_0060: stfld int32 GenIter01/squaresOfOneToTen@5::pc .line 6,6 : 18,23 '' - IL_006d: ldarg.0 - IL_006e: ldarg.0 - IL_006f: ldfld int32 GenIter01/squaresOfOneToTen@5::x - IL_0074: ldarg.0 - IL_0075: ldfld int32 GenIter01/squaresOfOneToTen@5::x - IL_007a: mul - IL_007b: stfld int32 GenIter01/squaresOfOneToTen@5::current - IL_0080: ldc.i4.1 - IL_0081: ret + IL_0065: ldarg.0 + IL_0066: ldloc.0 + IL_0067: ldloc.0 + IL_0068: mul + IL_0069: stfld int32 GenIter01/squaresOfOneToTen@5::current + IL_006e: ldc.i4.1 + IL_006f: ret - .line 5,6 : 7,23 '' - IL_0082: ldarg.0 - IL_0083: ldc.i4.0 - IL_0084: stfld int32 GenIter01/squaresOfOneToTen@5::x .line 100001,100001 : 0,0 '' - IL_0089: nop - IL_008a: br.s IL_0048 + IL_0070: nop + IL_0071: br.s IL_0045 - IL_008c: ldarg.0 - IL_008d: ldc.i4.3 - IL_008e: stfld int32 GenIter01/squaresOfOneToTen@5::pc + IL_0073: ldarg.0 + IL_0074: ldc.i4.3 + IL_0075: stfld int32 GenIter01/squaresOfOneToTen@5::pc .line 5,6 : 7,23 '' - IL_0093: ldarg.0 - IL_0094: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 GenIter01/squaresOfOneToTen@5::'enum' - IL_0099: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_009e: nop - IL_009f: ldarg.0 - IL_00a0: ldnull - IL_00a1: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 GenIter01/squaresOfOneToTen@5::'enum' - IL_00a6: ldarg.0 - IL_00a7: ldc.i4.3 - IL_00a8: stfld int32 GenIter01/squaresOfOneToTen@5::pc - IL_00ad: ldarg.0 - IL_00ae: ldc.i4.0 - IL_00af: stfld int32 GenIter01/squaresOfOneToTen@5::current - IL_00b4: ldc.i4.0 - IL_00b5: ret + IL_007a: ldarg.0 + IL_007b: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 GenIter01/squaresOfOneToTen@5::'enum' + IL_0080: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0085: nop + IL_0086: ldarg.0 + IL_0087: ldnull + IL_0088: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 GenIter01/squaresOfOneToTen@5::'enum' + IL_008d: ldarg.0 + IL_008e: ldc.i4.3 + IL_008f: stfld int32 GenIter01/squaresOfOneToTen@5::pc + IL_0094: ldarg.0 + IL_0095: ldc.i4.0 + IL_0096: stfld int32 GenIter01/squaresOfOneToTen@5::current + IL_009b: ldc.i4.0 + IL_009c: ret } // end of method squaresOfOneToTen@5::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 150 (0x96) + // Code size 148 (0x94) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [FSharp.Core]Microsoft.FSharp.Core.Unit V_1, [2] class [mscorlib]System.Exception e) .line 100001,100001 : 0,0 '' - IL_0000: ldnull - IL_0001: stloc.0 - IL_0002: ldarg.0 - IL_0003: ldfld int32 GenIter01/squaresOfOneToTen@5::pc - IL_0008: ldc.i4.3 - IL_0009: sub - IL_000a: switch ( - IL_0015) - IL_0013: br.s IL_001b + IL_0000: ldarg.0 + IL_0001: ldfld int32 GenIter01/squaresOfOneToTen@5::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0019 .line 100001,100001 : 0,0 '' - IL_0015: nop - IL_0016: br IL_0089 + IL_0013: nop + IL_0014: br IL_0087 .line 100001,100001 : 0,0 '' - IL_001b: nop + IL_0019: nop .try { - IL_001c: ldarg.0 - IL_001d: ldfld int32 GenIter01/squaresOfOneToTen@5::pc - IL_0022: switch ( + IL_001a: ldarg.0 + IL_001b: ldfld int32 GenIter01/squaresOfOneToTen@5::pc + IL_0020: switch ( + IL_0037, IL_0039, IL_003b, - IL_003d, - IL_003f) - IL_0037: br.s IL_004d + IL_003d) + IL_0035: br.s IL_004b - IL_0039: br.s IL_0041 + IL_0037: br.s IL_003f - IL_003b: br.s IL_0044 + IL_0039: br.s IL_0042 - IL_003d: br.s IL_0047 + IL_003b: br.s IL_0045 - IL_003f: br.s IL_004a + IL_003d: br.s IL_0048 .line 100001,100001 : 0,0 '' - IL_0041: nop - IL_0042: br.s IL_0063 + IL_003f: nop + IL_0040: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_0044: nop - IL_0045: br.s IL_004f + IL_0042: nop + IL_0043: br.s IL_004d .line 100001,100001 : 0,0 '' - IL_0047: nop - IL_0048: br.s IL_004e + IL_0045: nop + IL_0046: br.s IL_004c .line 100001,100001 : 0,0 '' - IL_004a: nop - IL_004b: br.s IL_0063 + IL_0048: nop + IL_0049: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_004d: nop + IL_004b: nop .line 100001,100001 : 0,0 '' - IL_004e: nop - IL_004f: ldarg.0 - IL_0050: ldc.i4.3 - IL_0051: stfld int32 GenIter01/squaresOfOneToTen@5::pc - IL_0056: ldarg.0 - IL_0057: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 GenIter01/squaresOfOneToTen@5::'enum' - IL_005c: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_0061: nop + IL_004c: nop + IL_004d: ldarg.0 + IL_004e: ldc.i4.3 + IL_004f: stfld int32 GenIter01/squaresOfOneToTen@5::pc + IL_0054: ldarg.0 + IL_0055: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 GenIter01/squaresOfOneToTen@5::'enum' + IL_005a: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_005f: nop .line 100001,100001 : 0,0 '' - IL_0062: nop - IL_0063: ldarg.0 - IL_0064: ldc.i4.3 - IL_0065: stfld int32 GenIter01/squaresOfOneToTen@5::pc - IL_006a: ldarg.0 - IL_006b: ldc.i4.0 - IL_006c: stfld int32 GenIter01/squaresOfOneToTen@5::current - IL_0071: ldnull - IL_0072: stloc.1 - IL_0073: leave.s IL_0081 + IL_0060: nop + IL_0061: ldarg.0 + IL_0062: ldc.i4.3 + IL_0063: stfld int32 GenIter01/squaresOfOneToTen@5::pc + IL_0068: ldarg.0 + IL_0069: ldc.i4.0 + IL_006a: stfld int32 GenIter01/squaresOfOneToTen@5::current + IL_006f: ldnull + IL_0070: stloc.1 + IL_0071: leave.s IL_007f } // end .try catch [mscorlib]System.Object { - IL_0075: castclass [mscorlib]System.Exception - IL_007a: stloc.2 + IL_0073: castclass [mscorlib]System.Exception + IL_0078: stloc.2 .line 5,6 : 7,23 '' - IL_007b: ldloc.2 - IL_007c: stloc.0 - IL_007d: ldnull - IL_007e: stloc.1 - IL_007f: leave.s IL_0081 + IL_0079: ldloc.2 + IL_007a: stloc.0 + IL_007b: ldnull + IL_007c: stloc.1 + IL_007d: leave.s IL_007f .line 100001,100001 : 0,0 '' } // end handler - IL_0081: ldloc.1 - IL_0082: pop + IL_007f: ldloc.1 + IL_0080: pop .line 100001,100001 : 0,0 '' - IL_0083: nop - IL_0084: br IL_0002 + IL_0081: nop + IL_0082: br IL_0000 - IL_0089: ldloc.0 - IL_008a: ldnull - IL_008b: cgt.un - IL_008d: brfalse.s IL_0091 + IL_0087: ldloc.0 + IL_0088: ldnull + IL_0089: cgt.un + IL_008b: brfalse.s IL_008f - IL_008f: br.s IL_0093 + IL_008d: br.s IL_0091 - IL_0091: br.s IL_0095 + IL_008f: br.s IL_0093 .line 100001,100001 : 0,0 '' - IL_0093: ldloc.0 - IL_0094: throw + IL_0091: ldloc.0 + IL_0092: throw .line 100001,100001 : 0,0 '' - IL_0095: ret + IL_0093: ret } // end of method squaresOfOneToTen@5::Close .method public strict virtual instance bool @@ -385,17 +372,15 @@ { .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 ) - // Code size 10 (0xa) + // Code size 9 (0x9) .maxstack 8 - IL_0000: ldc.i4.0 - IL_0001: ldnull + IL_0000: ldnull + IL_0001: ldc.i4.0 IL_0002: ldc.i4.0 - IL_0003: ldc.i4.0 - IL_0004: newobj instance void GenIter01/squaresOfOneToTen@5::.ctor(int32, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0003: newobj instance void GenIter01/squaresOfOneToTen@5::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, int32) - IL_0009: ret + IL_0008: ret } // end of method squaresOfOneToTen@5::GetFreshEnumerator } // end of class squaresOfOneToTen@5 @@ -403,20 +388,18 @@ .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 squaresOfOneToTen() cil managed { - // Code size 17 (0x11) + // Code size 16 (0x10) .maxstack 8 .line 5,6 : 5,25 '' - IL_0000: ldc.i4.0 - IL_0001: ldnull + IL_0000: ldnull + IL_0001: ldc.i4.0 IL_0002: ldc.i4.0 - IL_0003: ldc.i4.0 - IL_0004: newobj instance void GenIter01/squaresOfOneToTen@5::.ctor(int32, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0003: newobj instance void GenIter01/squaresOfOneToTen@5::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, int32) - IL_0009: tail. - IL_000b: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0010: ret + IL_0008: tail. + IL_000a: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_000f: ret } // end of method GenIter01::squaresOfOneToTen } // end of class GenIter01 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/GeneratedIterators/GenIter02.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/GeneratedIterators/GenIter02.il.bsl index af512761609..aa203793fe4 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/GeneratedIterators/GenIter02.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/GeneratedIterators/GenIter02.il.bsl @@ -13,7 +13,7 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 4:4:1:0 + .ver 4:5:0:0 } .assembly GenIter02 { @@ -29,20 +29,20 @@ } .mresource public FSharpSignatureData.GenIter02 { - // Offset: 0x00000000 Length: 0x000001F8 + // Offset: 0x00000000 Length: 0x00000200 } .mresource public FSharpOptimizationData.GenIter02 { - // Offset: 0x00000200 Length: 0x0000007B + // Offset: 0x00000208 Length: 0x0000007B } .module GenIter02.exe -// MVID: {59B19213-F857-DC98-A745-03831392B159} +// MVID: {5B9A6329-F857-DC98-A745-038329639A5B} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x003A0000 +// Image base: 0x02900000 // =============== CLASS MEMBERS DECLARATION =================== @@ -55,7 +55,6 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) - .field public int32 x .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' .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 ) @@ -69,35 +68,32 @@ .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 specialname rtspecialname - instance void .ctor(int32 x, - class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', int32 pc, int32 current) cil managed { - // Code size 36 (0x24) + // Code size 28 (0x1c) .maxstack 8 IL_0000: ldarg.0 IL_0001: ldarg.1 - IL_0002: stfld int32 GenIter02/squaresOfOneToTenB@5::x + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 GenIter02/squaresOfOneToTenB@5::'enum' IL_0007: ldarg.0 IL_0008: ldarg.2 - IL_0009: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 GenIter02/squaresOfOneToTenB@5::'enum' + IL_0009: stfld int32 GenIter02/squaresOfOneToTenB@5::pc IL_000e: ldarg.0 IL_000f: ldarg.3 - IL_0010: stfld int32 GenIter02/squaresOfOneToTenB@5::pc + IL_0010: stfld int32 GenIter02/squaresOfOneToTenB@5::current IL_0015: ldarg.0 - IL_0016: ldarg.s current - IL_0018: stfld int32 GenIter02/squaresOfOneToTenB@5::current - IL_001d: ldarg.0 - IL_001e: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() - IL_0023: ret + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_001b: ret } // end of method squaresOfOneToTenB@5::.ctor .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 201 (0xc9) + // Code size 176 (0xb0) .maxstack 8 + .locals init ([0] int32 x) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\GeneratedIterators\\GenIter02.fs' IL_0000: ldarg.0 @@ -108,218 +104,209 @@ IL_001b, IL_001d, IL_001f) - IL_0019: br.s IL_0030 + IL_0019: br.s IL_002d IL_001b: br.s IL_0021 - IL_001d: br.s IL_0027 + IL_001d: br.s IL_0024 - IL_001f: br.s IL_002a + IL_001f: br.s IL_0027 .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br IL_009f + IL_0022: br.s IL_0086 .line 100001,100001 : 0,0 '' - IL_0027: nop - IL_0028: br.s IL_0095 + IL_0024: nop + IL_0025: br.s IL_0083 .line 100001,100001 : 0,0 '' - IL_002a: nop - IL_002b: br IL_00c0 + IL_0027: nop + IL_0028: br IL_00a7 .line 100001,100001 : 0,0 '' - IL_0030: nop + IL_002d: nop .line 5,7 : 7,23 '' - IL_0031: ldarg.0 - IL_0032: ldc.i4.0 - IL_0033: ldc.i4.1 - IL_0034: ldc.i4.2 - IL_0035: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt32(int32, + IL_002e: ldarg.0 + IL_002f: ldc.i4.0 + IL_0030: ldc.i4.1 + IL_0031: ldc.i4.2 + IL_0032: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt32(int32, int32, int32) - IL_003a: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_003f: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 GenIter02/squaresOfOneToTenB@5::'enum' - IL_0044: ldarg.0 - IL_0045: ldc.i4.1 - IL_0046: stfld int32 GenIter02/squaresOfOneToTenB@5::pc + IL_0037: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_003c: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 GenIter02/squaresOfOneToTenB@5::'enum' + IL_0041: ldarg.0 + IL_0042: ldc.i4.1 + IL_0043: stfld int32 GenIter02/squaresOfOneToTenB@5::pc .line 5,7 : 7,23 '' - IL_004b: ldarg.0 - IL_004c: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 GenIter02/squaresOfOneToTenB@5::'enum' - IL_0051: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0056: brfalse.s IL_009f - - IL_0058: ldarg.0 - IL_0059: ldarg.0 - IL_005a: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 GenIter02/squaresOfOneToTenB@5::'enum' - IL_005f: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0064: stfld int32 GenIter02/squaresOfOneToTenB@5::x + IL_0048: ldarg.0 + IL_0049: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 GenIter02/squaresOfOneToTenB@5::'enum' + IL_004e: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_0053: brfalse.s IL_0086 + + IL_0055: ldarg.0 + IL_0056: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 GenIter02/squaresOfOneToTenB@5::'enum' + IL_005b: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0060: stloc.0 .line 6,6 : 12,27 '' - IL_0069: ldstr "hello" - IL_006e: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_0073: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_0078: pop - IL_0079: ldarg.0 - IL_007a: ldc.i4.2 - IL_007b: stfld int32 GenIter02/squaresOfOneToTenB@5::pc + IL_0061: ldstr "hello" + IL_0066: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_006b: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0070: pop + IL_0071: ldarg.0 + IL_0072: ldc.i4.2 + IL_0073: stfld int32 GenIter02/squaresOfOneToTenB@5::pc .line 7,7 : 12,23 '' - IL_0080: ldarg.0 - IL_0081: ldarg.0 - IL_0082: ldfld int32 GenIter02/squaresOfOneToTenB@5::x - IL_0087: ldarg.0 - IL_0088: ldfld int32 GenIter02/squaresOfOneToTenB@5::x - IL_008d: mul - IL_008e: stfld int32 GenIter02/squaresOfOneToTenB@5::current - IL_0093: ldc.i4.1 - IL_0094: ret + IL_0078: ldarg.0 + IL_0079: ldloc.0 + IL_007a: ldloc.0 + IL_007b: mul + IL_007c: stfld int32 GenIter02/squaresOfOneToTenB@5::current + IL_0081: ldc.i4.1 + IL_0082: ret - .line 5,7 : 7,23 '' - IL_0095: ldarg.0 - IL_0096: ldc.i4.0 - IL_0097: stfld int32 GenIter02/squaresOfOneToTenB@5::x .line 100001,100001 : 0,0 '' - IL_009c: nop - IL_009d: br.s IL_004b + IL_0083: nop + IL_0084: br.s IL_0048 - IL_009f: ldarg.0 - IL_00a0: ldc.i4.3 - IL_00a1: stfld int32 GenIter02/squaresOfOneToTenB@5::pc + IL_0086: ldarg.0 + IL_0087: ldc.i4.3 + IL_0088: stfld int32 GenIter02/squaresOfOneToTenB@5::pc .line 5,7 : 7,23 '' - IL_00a6: ldarg.0 - IL_00a7: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 GenIter02/squaresOfOneToTenB@5::'enum' - IL_00ac: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_00b1: nop - IL_00b2: ldarg.0 - IL_00b3: ldnull - IL_00b4: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 GenIter02/squaresOfOneToTenB@5::'enum' - IL_00b9: ldarg.0 - IL_00ba: ldc.i4.3 - IL_00bb: stfld int32 GenIter02/squaresOfOneToTenB@5::pc - IL_00c0: ldarg.0 - IL_00c1: ldc.i4.0 - IL_00c2: stfld int32 GenIter02/squaresOfOneToTenB@5::current - IL_00c7: ldc.i4.0 - IL_00c8: ret + IL_008d: ldarg.0 + IL_008e: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 GenIter02/squaresOfOneToTenB@5::'enum' + IL_0093: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0098: nop + IL_0099: ldarg.0 + IL_009a: ldnull + IL_009b: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 GenIter02/squaresOfOneToTenB@5::'enum' + IL_00a0: ldarg.0 + IL_00a1: ldc.i4.3 + IL_00a2: stfld int32 GenIter02/squaresOfOneToTenB@5::pc + IL_00a7: ldarg.0 + IL_00a8: ldc.i4.0 + IL_00a9: stfld int32 GenIter02/squaresOfOneToTenB@5::current + IL_00ae: ldc.i4.0 + IL_00af: ret } // end of method squaresOfOneToTenB@5::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 150 (0x96) + // Code size 148 (0x94) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [FSharp.Core]Microsoft.FSharp.Core.Unit V_1, [2] class [mscorlib]System.Exception e) .line 100001,100001 : 0,0 '' - IL_0000: ldnull - IL_0001: stloc.0 - IL_0002: ldarg.0 - IL_0003: ldfld int32 GenIter02/squaresOfOneToTenB@5::pc - IL_0008: ldc.i4.3 - IL_0009: sub - IL_000a: switch ( - IL_0015) - IL_0013: br.s IL_001b + IL_0000: ldarg.0 + IL_0001: ldfld int32 GenIter02/squaresOfOneToTenB@5::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0019 .line 100001,100001 : 0,0 '' - IL_0015: nop - IL_0016: br IL_0089 + IL_0013: nop + IL_0014: br IL_0087 .line 100001,100001 : 0,0 '' - IL_001b: nop + IL_0019: nop .try { - IL_001c: ldarg.0 - IL_001d: ldfld int32 GenIter02/squaresOfOneToTenB@5::pc - IL_0022: switch ( + IL_001a: ldarg.0 + IL_001b: ldfld int32 GenIter02/squaresOfOneToTenB@5::pc + IL_0020: switch ( + IL_0037, IL_0039, IL_003b, - IL_003d, - IL_003f) - IL_0037: br.s IL_004d + IL_003d) + IL_0035: br.s IL_004b - IL_0039: br.s IL_0041 + IL_0037: br.s IL_003f - IL_003b: br.s IL_0044 + IL_0039: br.s IL_0042 - IL_003d: br.s IL_0047 + IL_003b: br.s IL_0045 - IL_003f: br.s IL_004a + IL_003d: br.s IL_0048 .line 100001,100001 : 0,0 '' - IL_0041: nop - IL_0042: br.s IL_0063 + IL_003f: nop + IL_0040: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_0044: nop - IL_0045: br.s IL_004f + IL_0042: nop + IL_0043: br.s IL_004d .line 100001,100001 : 0,0 '' - IL_0047: nop - IL_0048: br.s IL_004e + IL_0045: nop + IL_0046: br.s IL_004c .line 100001,100001 : 0,0 '' - IL_004a: nop - IL_004b: br.s IL_0063 + IL_0048: nop + IL_0049: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_004d: nop + IL_004b: nop .line 100001,100001 : 0,0 '' - IL_004e: nop - IL_004f: ldarg.0 - IL_0050: ldc.i4.3 - IL_0051: stfld int32 GenIter02/squaresOfOneToTenB@5::pc - IL_0056: ldarg.0 - IL_0057: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 GenIter02/squaresOfOneToTenB@5::'enum' - IL_005c: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_0061: nop + IL_004c: nop + IL_004d: ldarg.0 + IL_004e: ldc.i4.3 + IL_004f: stfld int32 GenIter02/squaresOfOneToTenB@5::pc + IL_0054: ldarg.0 + IL_0055: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 GenIter02/squaresOfOneToTenB@5::'enum' + IL_005a: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_005f: nop .line 100001,100001 : 0,0 '' - IL_0062: nop - IL_0063: ldarg.0 - IL_0064: ldc.i4.3 - IL_0065: stfld int32 GenIter02/squaresOfOneToTenB@5::pc - IL_006a: ldarg.0 - IL_006b: ldc.i4.0 - IL_006c: stfld int32 GenIter02/squaresOfOneToTenB@5::current - IL_0071: ldnull - IL_0072: stloc.1 - IL_0073: leave.s IL_0081 + IL_0060: nop + IL_0061: ldarg.0 + IL_0062: ldc.i4.3 + IL_0063: stfld int32 GenIter02/squaresOfOneToTenB@5::pc + IL_0068: ldarg.0 + IL_0069: ldc.i4.0 + IL_006a: stfld int32 GenIter02/squaresOfOneToTenB@5::current + IL_006f: ldnull + IL_0070: stloc.1 + IL_0071: leave.s IL_007f } // end .try catch [mscorlib]System.Object { - IL_0075: castclass [mscorlib]System.Exception - IL_007a: stloc.2 + IL_0073: castclass [mscorlib]System.Exception + IL_0078: stloc.2 .line 5,7 : 7,23 '' - IL_007b: ldloc.2 - IL_007c: stloc.0 - IL_007d: ldnull - IL_007e: stloc.1 - IL_007f: leave.s IL_0081 + IL_0079: ldloc.2 + IL_007a: stloc.0 + IL_007b: ldnull + IL_007c: stloc.1 + IL_007d: leave.s IL_007f .line 100001,100001 : 0,0 '' } // end handler - IL_0081: ldloc.1 - IL_0082: pop + IL_007f: ldloc.1 + IL_0080: pop .line 100001,100001 : 0,0 '' - IL_0083: nop - IL_0084: br IL_0002 + IL_0081: nop + IL_0082: br IL_0000 - IL_0089: ldloc.0 - IL_008a: ldnull - IL_008b: cgt.un - IL_008d: brfalse.s IL_0091 + IL_0087: ldloc.0 + IL_0088: ldnull + IL_0089: cgt.un + IL_008b: brfalse.s IL_008f - IL_008f: br.s IL_0093 + IL_008d: br.s IL_0091 - IL_0091: br.s IL_0095 + IL_008f: br.s IL_0093 .line 100001,100001 : 0,0 '' - IL_0093: ldloc.0 - IL_0094: throw + IL_0091: ldloc.0 + IL_0092: throw .line 100001,100001 : 0,0 '' - IL_0095: ret + IL_0093: ret } // end of method squaresOfOneToTenB@5::Close .method public strict virtual instance bool @@ -390,17 +377,15 @@ { .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 ) - // Code size 10 (0xa) + // Code size 9 (0x9) .maxstack 8 - IL_0000: ldc.i4.0 - IL_0001: ldnull + IL_0000: ldnull + IL_0001: ldc.i4.0 IL_0002: ldc.i4.0 - IL_0003: ldc.i4.0 - IL_0004: newobj instance void GenIter02/squaresOfOneToTenB@5::.ctor(int32, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0003: newobj instance void GenIter02/squaresOfOneToTenB@5::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, int32) - IL_0009: ret + IL_0008: ret } // end of method squaresOfOneToTenB@5::GetFreshEnumerator } // end of class squaresOfOneToTenB@5 @@ -408,20 +393,18 @@ .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 squaresOfOneToTenB() cil managed { - // Code size 17 (0x11) + // Code size 16 (0x10) .maxstack 8 .line 5,7 : 5,25 '' - IL_0000: ldc.i4.0 - IL_0001: ldnull + IL_0000: ldnull + IL_0001: ldc.i4.0 IL_0002: ldc.i4.0 - IL_0003: ldc.i4.0 - IL_0004: newobj instance void GenIter02/squaresOfOneToTenB@5::.ctor(int32, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0003: newobj instance void GenIter02/squaresOfOneToTenB@5::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, int32) - IL_0009: tail. - IL_000b: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0010: ret + IL_0008: tail. + IL_000a: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_000f: ret } // end of method GenIter02::squaresOfOneToTenB } // end of class GenIter02 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/GeneratedIterators/GenIter03.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/GeneratedIterators/GenIter03.il.bsl index 74b56691c27..88bd760bc85 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/GeneratedIterators/GenIter03.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/GeneratedIterators/GenIter03.il.bsl @@ -13,7 +13,7 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 4:4:1:0 + .ver 4:5:0:0 } .assembly GenIter03 { @@ -29,20 +29,20 @@ } .mresource public FSharpSignatureData.GenIter03 { - // Offset: 0x00000000 Length: 0x000001F8 + // Offset: 0x00000000 Length: 0x00000200 } .mresource public FSharpOptimizationData.GenIter03 { - // Offset: 0x00000200 Length: 0x0000007B + // Offset: 0x00000208 Length: 0x0000007B } .module GenIter03.exe -// MVID: {59B19213-F77C-DC98-A745-03831392B159} +// MVID: {5B9A6329-F77C-DC98-A745-038329639A5B} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x002F0000 +// Image base: 0x026B0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -55,7 +55,6 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) - .field public int32 x .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' .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 ) @@ -69,35 +68,32 @@ .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 specialname rtspecialname - instance void .ctor(int32 x, - class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', int32 pc, int32 current) cil managed { - // Code size 36 (0x24) + // Code size 28 (0x1c) .maxstack 8 IL_0000: ldarg.0 IL_0001: ldarg.1 - IL_0002: stfld int32 GenIter03/squaresOfOneToTenC@4::x + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 GenIter03/squaresOfOneToTenC@4::'enum' IL_0007: ldarg.0 IL_0008: ldarg.2 - IL_0009: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 GenIter03/squaresOfOneToTenC@4::'enum' + IL_0009: stfld int32 GenIter03/squaresOfOneToTenC@4::pc IL_000e: ldarg.0 IL_000f: ldarg.3 - IL_0010: stfld int32 GenIter03/squaresOfOneToTenC@4::pc + IL_0010: stfld int32 GenIter03/squaresOfOneToTenC@4::current IL_0015: ldarg.0 - IL_0016: ldarg.s current - IL_0018: stfld int32 GenIter03/squaresOfOneToTenC@4::current - IL_001d: ldarg.0 - IL_001e: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() - IL_0023: ret + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_001b: ret } // end of method squaresOfOneToTenC@4::.ctor .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 183 (0xb7) + // Code size 158 (0x9e) .maxstack 8 + .locals init ([0] int32 x) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\GeneratedIterators\\GenIter03.fs' IL_0000: ldarg.0 @@ -108,7 +104,7 @@ IL_001b, IL_001d, IL_001f) - IL_0019: br.s IL_002d + IL_0019: br.s IL_002a IL_001b: br.s IL_0021 @@ -118,203 +114,194 @@ .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br.s IL_008d + IL_0022: br.s IL_0074 .line 100001,100001 : 0,0 '' IL_0024: nop - IL_0025: br.s IL_0083 + IL_0025: br.s IL_0071 .line 100001,100001 : 0,0 '' IL_0027: nop - IL_0028: br IL_00ae + IL_0028: br.s IL_0095 .line 100001,100001 : 0,0 '' - IL_002d: nop + IL_002a: nop .line 4,4 : 30,55 '' - IL_002e: ldarg.0 - IL_002f: ldc.i4.0 - IL_0030: ldc.i4.1 - IL_0031: ldc.i4.s 10 - IL_0033: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt32(int32, + IL_002b: ldarg.0 + IL_002c: ldc.i4.0 + IL_002d: ldc.i4.1 + IL_002e: ldc.i4.s 10 + IL_0030: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt32(int32, int32, int32) - IL_0038: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_003d: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 GenIter03/squaresOfOneToTenC@4::'enum' - IL_0042: ldarg.0 - IL_0043: ldc.i4.1 - IL_0044: stfld int32 GenIter03/squaresOfOneToTenC@4::pc + IL_0035: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_003a: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 GenIter03/squaresOfOneToTenC@4::'enum' + IL_003f: ldarg.0 + IL_0040: ldc.i4.1 + IL_0041: stfld int32 GenIter03/squaresOfOneToTenC@4::pc .line 4,4 : 30,55 '' - IL_0049: ldarg.0 - IL_004a: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 GenIter03/squaresOfOneToTenC@4::'enum' - IL_004f: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0054: brfalse.s IL_008d - - IL_0056: ldarg.0 - IL_0057: ldarg.0 - IL_0058: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 GenIter03/squaresOfOneToTenC@4::'enum' - IL_005d: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0062: stfld int32 GenIter03/squaresOfOneToTenC@4::x - IL_0067: ldarg.0 - IL_0068: ldc.i4.2 - IL_0069: stfld int32 GenIter03/squaresOfOneToTenC@4::pc + IL_0046: ldarg.0 + IL_0047: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 GenIter03/squaresOfOneToTenC@4::'enum' + IL_004c: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_0051: brfalse.s IL_0074 + + IL_0053: ldarg.0 + IL_0054: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 GenIter03/squaresOfOneToTenC@4::'enum' + IL_0059: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_005e: stloc.0 + IL_005f: ldarg.0 + IL_0060: ldc.i4.2 + IL_0061: stfld int32 GenIter03/squaresOfOneToTenC@4::pc .line 4,4 : 50,55 '' - IL_006e: ldarg.0 - IL_006f: ldarg.0 - IL_0070: ldfld int32 GenIter03/squaresOfOneToTenC@4::x - IL_0075: ldarg.0 - IL_0076: ldfld int32 GenIter03/squaresOfOneToTenC@4::x - IL_007b: mul - IL_007c: stfld int32 GenIter03/squaresOfOneToTenC@4::current - IL_0081: ldc.i4.1 - IL_0082: ret + IL_0066: ldarg.0 + IL_0067: ldloc.0 + IL_0068: ldloc.0 + IL_0069: mul + IL_006a: stfld int32 GenIter03/squaresOfOneToTenC@4::current + IL_006f: ldc.i4.1 + IL_0070: ret - .line 4,4 : 30,55 '' - IL_0083: ldarg.0 - IL_0084: ldc.i4.0 - IL_0085: stfld int32 GenIter03/squaresOfOneToTenC@4::x .line 100001,100001 : 0,0 '' - IL_008a: nop - IL_008b: br.s IL_0049 + IL_0071: nop + IL_0072: br.s IL_0046 - IL_008d: ldarg.0 - IL_008e: ldc.i4.3 - IL_008f: stfld int32 GenIter03/squaresOfOneToTenC@4::pc + IL_0074: ldarg.0 + IL_0075: ldc.i4.3 + IL_0076: stfld int32 GenIter03/squaresOfOneToTenC@4::pc .line 4,4 : 30,55 '' - IL_0094: ldarg.0 - IL_0095: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 GenIter03/squaresOfOneToTenC@4::'enum' - IL_009a: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_009f: nop - IL_00a0: ldarg.0 - IL_00a1: ldnull - IL_00a2: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 GenIter03/squaresOfOneToTenC@4::'enum' - IL_00a7: ldarg.0 - IL_00a8: ldc.i4.3 - IL_00a9: stfld int32 GenIter03/squaresOfOneToTenC@4::pc - IL_00ae: ldarg.0 - IL_00af: ldc.i4.0 - IL_00b0: stfld int32 GenIter03/squaresOfOneToTenC@4::current - IL_00b5: ldc.i4.0 - IL_00b6: ret + IL_007b: ldarg.0 + IL_007c: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 GenIter03/squaresOfOneToTenC@4::'enum' + IL_0081: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0086: nop + IL_0087: ldarg.0 + IL_0088: ldnull + IL_0089: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 GenIter03/squaresOfOneToTenC@4::'enum' + IL_008e: ldarg.0 + IL_008f: ldc.i4.3 + IL_0090: stfld int32 GenIter03/squaresOfOneToTenC@4::pc + IL_0095: ldarg.0 + IL_0096: ldc.i4.0 + IL_0097: stfld int32 GenIter03/squaresOfOneToTenC@4::current + IL_009c: ldc.i4.0 + IL_009d: ret } // end of method squaresOfOneToTenC@4::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 150 (0x96) + // Code size 148 (0x94) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [FSharp.Core]Microsoft.FSharp.Core.Unit V_1, [2] class [mscorlib]System.Exception e) .line 100001,100001 : 0,0 '' - IL_0000: ldnull - IL_0001: stloc.0 - IL_0002: ldarg.0 - IL_0003: ldfld int32 GenIter03/squaresOfOneToTenC@4::pc - IL_0008: ldc.i4.3 - IL_0009: sub - IL_000a: switch ( - IL_0015) - IL_0013: br.s IL_001b + IL_0000: ldarg.0 + IL_0001: ldfld int32 GenIter03/squaresOfOneToTenC@4::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0019 .line 100001,100001 : 0,0 '' - IL_0015: nop - IL_0016: br IL_0089 + IL_0013: nop + IL_0014: br IL_0087 .line 100001,100001 : 0,0 '' - IL_001b: nop + IL_0019: nop .try { - IL_001c: ldarg.0 - IL_001d: ldfld int32 GenIter03/squaresOfOneToTenC@4::pc - IL_0022: switch ( + IL_001a: ldarg.0 + IL_001b: ldfld int32 GenIter03/squaresOfOneToTenC@4::pc + IL_0020: switch ( + IL_0037, IL_0039, IL_003b, - IL_003d, - IL_003f) - IL_0037: br.s IL_004d + IL_003d) + IL_0035: br.s IL_004b - IL_0039: br.s IL_0041 + IL_0037: br.s IL_003f - IL_003b: br.s IL_0044 + IL_0039: br.s IL_0042 - IL_003d: br.s IL_0047 + IL_003b: br.s IL_0045 - IL_003f: br.s IL_004a + IL_003d: br.s IL_0048 .line 100001,100001 : 0,0 '' - IL_0041: nop - IL_0042: br.s IL_0063 + IL_003f: nop + IL_0040: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_0044: nop - IL_0045: br.s IL_004f + IL_0042: nop + IL_0043: br.s IL_004d .line 100001,100001 : 0,0 '' - IL_0047: nop - IL_0048: br.s IL_004e + IL_0045: nop + IL_0046: br.s IL_004c .line 100001,100001 : 0,0 '' - IL_004a: nop - IL_004b: br.s IL_0063 + IL_0048: nop + IL_0049: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_004d: nop + IL_004b: nop .line 100001,100001 : 0,0 '' - IL_004e: nop - IL_004f: ldarg.0 - IL_0050: ldc.i4.3 - IL_0051: stfld int32 GenIter03/squaresOfOneToTenC@4::pc - IL_0056: ldarg.0 - IL_0057: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 GenIter03/squaresOfOneToTenC@4::'enum' - IL_005c: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_0061: nop + IL_004c: nop + IL_004d: ldarg.0 + IL_004e: ldc.i4.3 + IL_004f: stfld int32 GenIter03/squaresOfOneToTenC@4::pc + IL_0054: ldarg.0 + IL_0055: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 GenIter03/squaresOfOneToTenC@4::'enum' + IL_005a: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_005f: nop .line 100001,100001 : 0,0 '' - IL_0062: nop - IL_0063: ldarg.0 - IL_0064: ldc.i4.3 - IL_0065: stfld int32 GenIter03/squaresOfOneToTenC@4::pc - IL_006a: ldarg.0 - IL_006b: ldc.i4.0 - IL_006c: stfld int32 GenIter03/squaresOfOneToTenC@4::current - IL_0071: ldnull - IL_0072: stloc.1 - IL_0073: leave.s IL_0081 + IL_0060: nop + IL_0061: ldarg.0 + IL_0062: ldc.i4.3 + IL_0063: stfld int32 GenIter03/squaresOfOneToTenC@4::pc + IL_0068: ldarg.0 + IL_0069: ldc.i4.0 + IL_006a: stfld int32 GenIter03/squaresOfOneToTenC@4::current + IL_006f: ldnull + IL_0070: stloc.1 + IL_0071: leave.s IL_007f } // end .try catch [mscorlib]System.Object { - IL_0075: castclass [mscorlib]System.Exception - IL_007a: stloc.2 + IL_0073: castclass [mscorlib]System.Exception + IL_0078: stloc.2 .line 4,4 : 30,55 '' - IL_007b: ldloc.2 - IL_007c: stloc.0 - IL_007d: ldnull - IL_007e: stloc.1 - IL_007f: leave.s IL_0081 + IL_0079: ldloc.2 + IL_007a: stloc.0 + IL_007b: ldnull + IL_007c: stloc.1 + IL_007d: leave.s IL_007f .line 100001,100001 : 0,0 '' } // end handler - IL_0081: ldloc.1 - IL_0082: pop + IL_007f: ldloc.1 + IL_0080: pop .line 100001,100001 : 0,0 '' - IL_0083: nop - IL_0084: br IL_0002 + IL_0081: nop + IL_0082: br IL_0000 - IL_0089: ldloc.0 - IL_008a: ldnull - IL_008b: cgt.un - IL_008d: brfalse.s IL_0091 + IL_0087: ldloc.0 + IL_0088: ldnull + IL_0089: cgt.un + IL_008b: brfalse.s IL_008f - IL_008f: br.s IL_0093 + IL_008d: br.s IL_0091 - IL_0091: br.s IL_0095 + IL_008f: br.s IL_0093 .line 100001,100001 : 0,0 '' - IL_0093: ldloc.0 - IL_0094: throw + IL_0091: ldloc.0 + IL_0092: throw .line 100001,100001 : 0,0 '' - IL_0095: ret + IL_0093: ret } // end of method squaresOfOneToTenC@4::Close .method public strict virtual instance bool @@ -385,17 +372,15 @@ { .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 ) - // Code size 10 (0xa) + // Code size 9 (0x9) .maxstack 8 - IL_0000: ldc.i4.0 - IL_0001: ldnull + IL_0000: ldnull + IL_0001: ldc.i4.0 IL_0002: ldc.i4.0 - IL_0003: ldc.i4.0 - IL_0004: newobj instance void GenIter03/squaresOfOneToTenC@4::.ctor(int32, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0003: newobj instance void GenIter03/squaresOfOneToTenC@4::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, int32) - IL_0009: ret + IL_0008: ret } // end of method squaresOfOneToTenC@4::GetFreshEnumerator } // end of class squaresOfOneToTenC@4 @@ -403,20 +388,18 @@ .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 squaresOfOneToTenC() cil managed { - // Code size 17 (0x11) + // Code size 16 (0x10) .maxstack 8 .line 4,4 : 28,57 '' - IL_0000: ldc.i4.0 - IL_0001: ldnull + IL_0000: ldnull + IL_0001: ldc.i4.0 IL_0002: ldc.i4.0 - IL_0003: ldc.i4.0 - IL_0004: newobj instance void GenIter03/squaresOfOneToTenC@4::.ctor(int32, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0003: newobj instance void GenIter03/squaresOfOneToTenC@4::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, int32) - IL_0009: tail. - IL_000b: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0010: ret + IL_0008: tail. + IL_000a: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_000f: ret } // end of method GenIter03::squaresOfOneToTenC } // end of class GenIter03 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/GeneratedIterators/GenIter04.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/GeneratedIterators/GenIter04.il.bsl index 54b3666fec5..25a08dfd652 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/GeneratedIterators/GenIter04.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/GeneratedIterators/GenIter04.il.bsl @@ -13,7 +13,7 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 4:4:1:0 + .ver 4:5:0:0 } .assembly GenIter04 { @@ -29,20 +29,20 @@ } .mresource public FSharpSignatureData.GenIter04 { - // Offset: 0x00000000 Length: 0x000001E8 + // Offset: 0x00000000 Length: 0x000001F0 } .mresource public FSharpOptimizationData.GenIter04 { - // Offset: 0x000001F0 Length: 0x0000007B + // Offset: 0x000001F8 Length: 0x0000007B } .module GenIter04.exe -// MVID: {59B19213-F79D-DC98-A745-03831392B159} +// MVID: {5B9A6329-F79D-DC98-A745-038329639A5B} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x02FE0000 +// Image base: 0x00790000 // =============== CLASS MEMBERS DECLARATION =================== @@ -55,7 +55,6 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) - .field public int32 x .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' .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 ) @@ -69,35 +68,32 @@ .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 specialname rtspecialname - instance void .ctor(int32 x, - class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', int32 pc, int32 current) cil managed { - // Code size 36 (0x24) + // Code size 28 (0x1c) .maxstack 8 IL_0000: ldarg.0 IL_0001: ldarg.1 - IL_0002: stfld int32 GenIter04/squaresOfOneToTenD@4::x + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 GenIter04/squaresOfOneToTenD@4::'enum' IL_0007: ldarg.0 IL_0008: ldarg.2 - IL_0009: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 GenIter04/squaresOfOneToTenD@4::'enum' + IL_0009: stfld int32 GenIter04/squaresOfOneToTenD@4::pc IL_000e: ldarg.0 IL_000f: ldarg.3 - IL_0010: stfld int32 GenIter04/squaresOfOneToTenD@4::pc + IL_0010: stfld int32 GenIter04/squaresOfOneToTenD@4::current IL_0015: ldarg.0 - IL_0016: ldarg.s current - IL_0018: stfld int32 GenIter04/squaresOfOneToTenD@4::current - IL_001d: ldarg.0 - IL_001e: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() - IL_0023: ret + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_001b: ret } // end of method squaresOfOneToTenD@4::.ctor .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 183 (0xb7) + // Code size 158 (0x9e) .maxstack 8 + .locals init ([0] int32 x) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\GeneratedIterators\\GenIter04.fs' IL_0000: ldarg.0 @@ -108,7 +104,7 @@ IL_001b, IL_001d, IL_001f) - IL_0019: br.s IL_002d + IL_0019: br.s IL_002a IL_001b: br.s IL_0021 @@ -118,203 +114,194 @@ .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br.s IL_008d + IL_0022: br.s IL_0074 .line 100001,100001 : 0,0 '' IL_0024: nop - IL_0025: br.s IL_0083 + IL_0025: br.s IL_0071 .line 100001,100001 : 0,0 '' IL_0027: nop - IL_0028: br IL_00ae + IL_0028: br.s IL_0095 .line 100001,100001 : 0,0 '' - IL_002d: nop + IL_002a: nop .line 4,4 : 28,53 '' - IL_002e: ldarg.0 - IL_002f: ldc.i4.0 - IL_0030: ldc.i4.1 - IL_0031: ldc.i4.s 10 - IL_0033: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt32(int32, + IL_002b: ldarg.0 + IL_002c: ldc.i4.0 + IL_002d: ldc.i4.1 + IL_002e: ldc.i4.s 10 + IL_0030: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt32(int32, int32, int32) - IL_0038: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_003d: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 GenIter04/squaresOfOneToTenD@4::'enum' - IL_0042: ldarg.0 - IL_0043: ldc.i4.1 - IL_0044: stfld int32 GenIter04/squaresOfOneToTenD@4::pc + IL_0035: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_003a: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 GenIter04/squaresOfOneToTenD@4::'enum' + IL_003f: ldarg.0 + IL_0040: ldc.i4.1 + IL_0041: stfld int32 GenIter04/squaresOfOneToTenD@4::pc .line 4,4 : 28,53 '' - IL_0049: ldarg.0 - IL_004a: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 GenIter04/squaresOfOneToTenD@4::'enum' - IL_004f: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0054: brfalse.s IL_008d - - IL_0056: ldarg.0 - IL_0057: ldarg.0 - IL_0058: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 GenIter04/squaresOfOneToTenD@4::'enum' - IL_005d: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0062: stfld int32 GenIter04/squaresOfOneToTenD@4::x - IL_0067: ldarg.0 - IL_0068: ldc.i4.2 - IL_0069: stfld int32 GenIter04/squaresOfOneToTenD@4::pc + IL_0046: ldarg.0 + IL_0047: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 GenIter04/squaresOfOneToTenD@4::'enum' + IL_004c: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_0051: brfalse.s IL_0074 + + IL_0053: ldarg.0 + IL_0054: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 GenIter04/squaresOfOneToTenD@4::'enum' + IL_0059: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_005e: stloc.0 + IL_005f: ldarg.0 + IL_0060: ldc.i4.2 + IL_0061: stfld int32 GenIter04/squaresOfOneToTenD@4::pc .line 4,4 : 48,53 '' - IL_006e: ldarg.0 - IL_006f: ldarg.0 - IL_0070: ldfld int32 GenIter04/squaresOfOneToTenD@4::x - IL_0075: ldarg.0 - IL_0076: ldfld int32 GenIter04/squaresOfOneToTenD@4::x - IL_007b: mul - IL_007c: stfld int32 GenIter04/squaresOfOneToTenD@4::current - IL_0081: ldc.i4.1 - IL_0082: ret + IL_0066: ldarg.0 + IL_0067: ldloc.0 + IL_0068: ldloc.0 + IL_0069: mul + IL_006a: stfld int32 GenIter04/squaresOfOneToTenD@4::current + IL_006f: ldc.i4.1 + IL_0070: ret - .line 4,4 : 28,53 '' - IL_0083: ldarg.0 - IL_0084: ldc.i4.0 - IL_0085: stfld int32 GenIter04/squaresOfOneToTenD@4::x .line 100001,100001 : 0,0 '' - IL_008a: nop - IL_008b: br.s IL_0049 + IL_0071: nop + IL_0072: br.s IL_0046 - IL_008d: ldarg.0 - IL_008e: ldc.i4.3 - IL_008f: stfld int32 GenIter04/squaresOfOneToTenD@4::pc + IL_0074: ldarg.0 + IL_0075: ldc.i4.3 + IL_0076: stfld int32 GenIter04/squaresOfOneToTenD@4::pc .line 4,4 : 28,53 '' - IL_0094: ldarg.0 - IL_0095: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 GenIter04/squaresOfOneToTenD@4::'enum' - IL_009a: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_009f: nop - IL_00a0: ldarg.0 - IL_00a1: ldnull - IL_00a2: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 GenIter04/squaresOfOneToTenD@4::'enum' - IL_00a7: ldarg.0 - IL_00a8: ldc.i4.3 - IL_00a9: stfld int32 GenIter04/squaresOfOneToTenD@4::pc - IL_00ae: ldarg.0 - IL_00af: ldc.i4.0 - IL_00b0: stfld int32 GenIter04/squaresOfOneToTenD@4::current - IL_00b5: ldc.i4.0 - IL_00b6: ret + IL_007b: ldarg.0 + IL_007c: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 GenIter04/squaresOfOneToTenD@4::'enum' + IL_0081: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0086: nop + IL_0087: ldarg.0 + IL_0088: ldnull + IL_0089: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 GenIter04/squaresOfOneToTenD@4::'enum' + IL_008e: ldarg.0 + IL_008f: ldc.i4.3 + IL_0090: stfld int32 GenIter04/squaresOfOneToTenD@4::pc + IL_0095: ldarg.0 + IL_0096: ldc.i4.0 + IL_0097: stfld int32 GenIter04/squaresOfOneToTenD@4::current + IL_009c: ldc.i4.0 + IL_009d: ret } // end of method squaresOfOneToTenD@4::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 150 (0x96) + // Code size 148 (0x94) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [FSharp.Core]Microsoft.FSharp.Core.Unit V_1, [2] class [mscorlib]System.Exception e) .line 100001,100001 : 0,0 '' - IL_0000: ldnull - IL_0001: stloc.0 - IL_0002: ldarg.0 - IL_0003: ldfld int32 GenIter04/squaresOfOneToTenD@4::pc - IL_0008: ldc.i4.3 - IL_0009: sub - IL_000a: switch ( - IL_0015) - IL_0013: br.s IL_001b + IL_0000: ldarg.0 + IL_0001: ldfld int32 GenIter04/squaresOfOneToTenD@4::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0019 .line 100001,100001 : 0,0 '' - IL_0015: nop - IL_0016: br IL_0089 + IL_0013: nop + IL_0014: br IL_0087 .line 100001,100001 : 0,0 '' - IL_001b: nop + IL_0019: nop .try { - IL_001c: ldarg.0 - IL_001d: ldfld int32 GenIter04/squaresOfOneToTenD@4::pc - IL_0022: switch ( + IL_001a: ldarg.0 + IL_001b: ldfld int32 GenIter04/squaresOfOneToTenD@4::pc + IL_0020: switch ( + IL_0037, IL_0039, IL_003b, - IL_003d, - IL_003f) - IL_0037: br.s IL_004d + IL_003d) + IL_0035: br.s IL_004b - IL_0039: br.s IL_0041 + IL_0037: br.s IL_003f - IL_003b: br.s IL_0044 + IL_0039: br.s IL_0042 - IL_003d: br.s IL_0047 + IL_003b: br.s IL_0045 - IL_003f: br.s IL_004a + IL_003d: br.s IL_0048 .line 100001,100001 : 0,0 '' - IL_0041: nop - IL_0042: br.s IL_0063 + IL_003f: nop + IL_0040: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_0044: nop - IL_0045: br.s IL_004f + IL_0042: nop + IL_0043: br.s IL_004d .line 100001,100001 : 0,0 '' - IL_0047: nop - IL_0048: br.s IL_004e + IL_0045: nop + IL_0046: br.s IL_004c .line 100001,100001 : 0,0 '' - IL_004a: nop - IL_004b: br.s IL_0063 + IL_0048: nop + IL_0049: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_004d: nop + IL_004b: nop .line 100001,100001 : 0,0 '' - IL_004e: nop - IL_004f: ldarg.0 - IL_0050: ldc.i4.3 - IL_0051: stfld int32 GenIter04/squaresOfOneToTenD@4::pc - IL_0056: ldarg.0 - IL_0057: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 GenIter04/squaresOfOneToTenD@4::'enum' - IL_005c: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_0061: nop + IL_004c: nop + IL_004d: ldarg.0 + IL_004e: ldc.i4.3 + IL_004f: stfld int32 GenIter04/squaresOfOneToTenD@4::pc + IL_0054: ldarg.0 + IL_0055: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 GenIter04/squaresOfOneToTenD@4::'enum' + IL_005a: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_005f: nop .line 100001,100001 : 0,0 '' - IL_0062: nop - IL_0063: ldarg.0 - IL_0064: ldc.i4.3 - IL_0065: stfld int32 GenIter04/squaresOfOneToTenD@4::pc - IL_006a: ldarg.0 - IL_006b: ldc.i4.0 - IL_006c: stfld int32 GenIter04/squaresOfOneToTenD@4::current - IL_0071: ldnull - IL_0072: stloc.1 - IL_0073: leave.s IL_0081 + IL_0060: nop + IL_0061: ldarg.0 + IL_0062: ldc.i4.3 + IL_0063: stfld int32 GenIter04/squaresOfOneToTenD@4::pc + IL_0068: ldarg.0 + IL_0069: ldc.i4.0 + IL_006a: stfld int32 GenIter04/squaresOfOneToTenD@4::current + IL_006f: ldnull + IL_0070: stloc.1 + IL_0071: leave.s IL_007f } // end .try catch [mscorlib]System.Object { - IL_0075: castclass [mscorlib]System.Exception - IL_007a: stloc.2 + IL_0073: castclass [mscorlib]System.Exception + IL_0078: stloc.2 .line 4,4 : 28,53 '' - IL_007b: ldloc.2 - IL_007c: stloc.0 - IL_007d: ldnull - IL_007e: stloc.1 - IL_007f: leave.s IL_0081 + IL_0079: ldloc.2 + IL_007a: stloc.0 + IL_007b: ldnull + IL_007c: stloc.1 + IL_007d: leave.s IL_007f .line 100001,100001 : 0,0 '' } // end handler - IL_0081: ldloc.1 - IL_0082: pop + IL_007f: ldloc.1 + IL_0080: pop .line 100001,100001 : 0,0 '' - IL_0083: nop - IL_0084: br IL_0002 + IL_0081: nop + IL_0082: br IL_0000 - IL_0089: ldloc.0 - IL_008a: ldnull - IL_008b: cgt.un - IL_008d: brfalse.s IL_0091 + IL_0087: ldloc.0 + IL_0088: ldnull + IL_0089: cgt.un + IL_008b: brfalse.s IL_008f - IL_008f: br.s IL_0093 + IL_008d: br.s IL_0091 - IL_0091: br.s IL_0095 + IL_008f: br.s IL_0093 .line 100001,100001 : 0,0 '' - IL_0093: ldloc.0 - IL_0094: throw + IL_0091: ldloc.0 + IL_0092: throw .line 100001,100001 : 0,0 '' - IL_0095: ret + IL_0093: ret } // end of method squaresOfOneToTenD@4::Close .method public strict virtual instance bool @@ -385,17 +372,15 @@ { .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 ) - // Code size 10 (0xa) + // Code size 9 (0x9) .maxstack 8 - IL_0000: ldc.i4.0 - IL_0001: ldnull + IL_0000: ldnull + IL_0001: ldc.i4.0 IL_0002: ldc.i4.0 - IL_0003: ldc.i4.0 - IL_0004: newobj instance void GenIter04/squaresOfOneToTenD@4::.ctor(int32, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0003: newobj instance void GenIter04/squaresOfOneToTenD@4::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, int32) - IL_0009: ret + IL_0008: ret } // end of method squaresOfOneToTenD@4::GetFreshEnumerator } // end of class squaresOfOneToTenD@4 @@ -429,23 +414,21 @@ .method public static void main@() cil managed { .entrypoint - // Code size 22 (0x16) - .maxstack 6 + // Code size 21 (0x15) + .maxstack 5 .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 squaresOfOneToTenD) .line 4,4 : 1,55 '' - IL_0000: ldc.i4.0 - IL_0001: ldnull + IL_0000: ldnull + IL_0001: ldc.i4.0 IL_0002: ldc.i4.0 - IL_0003: ldc.i4.0 - IL_0004: newobj instance void GenIter04/squaresOfOneToTenD@4::.ctor(int32, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0003: newobj instance void GenIter04/squaresOfOneToTenD@4::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, int32) - IL_0009: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_000e: dup - IL_000f: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$GenIter04::squaresOfOneToTenD@4 - IL_0014: stloc.0 - IL_0015: ret + IL_0008: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_000d: dup + IL_000e: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$GenIter04::squaresOfOneToTenD@4 + IL_0013: stloc.0 + IL_0014: ret } // end of method $GenIter04::main@ } // end of class ''.$GenIter04 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest4.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest4.il.bsl index 07941a1b798..2d0ccb9e33d 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest4.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest4.il.bsl @@ -13,7 +13,7 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 4:4:1:0 + .ver 4:5:0:0 } .assembly ListExpressionSteppingTest4 { @@ -29,20 +29,20 @@ } .mresource public FSharpSignatureData.ListExpressionSteppingTest4 { - // Offset: 0x00000000 Length: 0x0000026D + // Offset: 0x00000000 Length: 0x00000275 } .mresource public FSharpOptimizationData.ListExpressionSteppingTest4 { - // Offset: 0x00000278 Length: 0x000000AF + // Offset: 0x00000280 Length: 0x000000AF } .module ListExpressionSteppingTest4.exe -// MVID: {59B1920C-3154-FA67-A745-03830C92B159} +// MVID: {5B9A68C1-3154-FA67-A745-0383C1689A5B} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x027F0000 +// Image base: 0x018D0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -61,7 +61,6 @@ .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 x .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 y - .field public int32 z .field public int32 pc .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 ) @@ -73,11 +72,10 @@ .method public specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 x, class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 y, - int32 z, int32 pc, int32 current) cil managed { - // Code size 44 (0x2c) + // Code size 36 (0x24) .maxstack 8 IL_0000: ldarg.0 IL_0001: ldarg.1 @@ -87,23 +85,21 @@ IL_0009: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 ListExpressionSteppingTest4/ListExpressionSteppingTest4/f3@6::y IL_000e: ldarg.0 IL_000f: ldarg.3 - IL_0010: stfld int32 ListExpressionSteppingTest4/ListExpressionSteppingTest4/f3@6::z + IL_0010: stfld int32 ListExpressionSteppingTest4/ListExpressionSteppingTest4/f3@6::pc IL_0015: ldarg.0 - IL_0016: ldarg.s pc - IL_0018: stfld int32 ListExpressionSteppingTest4/ListExpressionSteppingTest4/f3@6::pc + IL_0016: ldarg.s current + IL_0018: stfld int32 ListExpressionSteppingTest4/ListExpressionSteppingTest4/f3@6::current IL_001d: ldarg.0 - IL_001e: ldarg.s current - IL_0020: stfld int32 ListExpressionSteppingTest4/ListExpressionSteppingTest4/f3@6::current - IL_0025: ldarg.0 - IL_0026: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() - IL_002b: ret + IL_001e: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_0023: ret } // end of method f3@6::.ctor .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 210 (0xd2) - .maxstack 7 + // Code size 190 (0xbe) + .maxstack 6 + .locals init ([0] int32 z) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\ListExpressionStepping\\ListExpressionSteppingTest4.fs' IL_0000: ldarg.0 @@ -114,100 +110,94 @@ IL_001b, IL_001d, IL_001f) - IL_0019: br.s IL_0030 + IL_0019: br.s IL_002d IL_001b: br.s IL_0021 IL_001d: br.s IL_0024 - IL_001f: br.s IL_002a + IL_001f: br.s IL_0027 .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br.s IL_007b + IL_0022: br.s IL_0078 .line 100001,100001 : 0,0 '' IL_0024: nop - IL_0025: br IL_00ad + IL_0025: br.s IL_00a0 .line 100001,100001 : 0,0 '' - IL_002a: nop - IL_002b: br IL_00c9 + IL_0027: nop + IL_0028: br IL_00b5 .line 100001,100001 : 0,0 '' - IL_0030: nop + IL_002d: nop .line 6,6 : 11,24 '' - IL_0031: ldarg.0 - IL_0032: ldc.i4.0 - IL_0033: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::Ref(!!0) - IL_0038: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 ListExpressionSteppingTest4/ListExpressionSteppingTest4/f3@6::x + IL_002e: ldarg.0 + IL_002f: ldc.i4.0 + IL_0030: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::Ref(!!0) + IL_0035: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 ListExpressionSteppingTest4/ListExpressionSteppingTest4/f3@6::x .line 7,7 : 11,17 '' - IL_003d: ldarg.0 - IL_003e: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 ListExpressionSteppingTest4/ListExpressionSteppingTest4/f3@6::x - IL_0043: call void [FSharp.Core]Microsoft.FSharp.Core.Operators::Increment(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_0048: nop + IL_003a: ldarg.0 + IL_003b: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 ListExpressionSteppingTest4/ListExpressionSteppingTest4/f3@6::x + IL_0040: call void [FSharp.Core]Microsoft.FSharp.Core.Operators::Increment(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_0045: nop .line 8,8 : 11,24 '' - IL_0049: ldarg.0 - IL_004a: ldc.i4.0 - IL_004b: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::Ref(!!0) - IL_0050: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 ListExpressionSteppingTest4/ListExpressionSteppingTest4/f3@6::y + IL_0046: ldarg.0 + IL_0047: ldc.i4.0 + IL_0048: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::Ref(!!0) + IL_004d: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 ListExpressionSteppingTest4/ListExpressionSteppingTest4/f3@6::y .line 9,9 : 11,17 '' - IL_0055: ldarg.0 - IL_0056: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 ListExpressionSteppingTest4/ListExpressionSteppingTest4/f3@6::y - IL_005b: call void [FSharp.Core]Microsoft.FSharp.Core.Operators::Increment(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_0060: nop - IL_0061: ldarg.0 - IL_0062: ldc.i4.1 - IL_0063: stfld int32 ListExpressionSteppingTest4/ListExpressionSteppingTest4/f3@6::pc + IL_0052: ldarg.0 + IL_0053: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 ListExpressionSteppingTest4/ListExpressionSteppingTest4/f3@6::y + IL_0058: call void [FSharp.Core]Microsoft.FSharp.Core.Operators::Increment(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_005d: nop + IL_005e: ldarg.0 + IL_005f: ldc.i4.1 + IL_0060: stfld int32 ListExpressionSteppingTest4/ListExpressionSteppingTest4/f3@6::pc .line 10,10 : 11,19 '' - IL_0068: ldarg.0 - IL_0069: ldarg.0 - IL_006a: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 ListExpressionSteppingTest4/ListExpressionSteppingTest4/f3@6::x - IL_006f: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_0074: stfld int32 ListExpressionSteppingTest4/ListExpressionSteppingTest4/f3@6::current - IL_0079: ldc.i4.1 - IL_007a: ret + IL_0065: ldarg.0 + IL_0066: ldarg.0 + IL_0067: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 ListExpressionSteppingTest4/ListExpressionSteppingTest4/f3@6::x + IL_006c: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_0071: stfld int32 ListExpressionSteppingTest4/ListExpressionSteppingTest4/f3@6::current + IL_0076: ldc.i4.1 + IL_0077: ret .line 11,11 : 11,26 '' - IL_007b: ldarg.0 - IL_007c: ldarg.0 - IL_007d: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 ListExpressionSteppingTest4/ListExpressionSteppingTest4/f3@6::x - IL_0082: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_0087: ldarg.0 - IL_0088: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 ListExpressionSteppingTest4/ListExpressionSteppingTest4/f3@6::y - IL_008d: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_0092: add - IL_0093: stfld int32 ListExpressionSteppingTest4/ListExpressionSteppingTest4/f3@6::z - IL_0098: ldarg.0 - IL_0099: ldc.i4.2 - IL_009a: stfld int32 ListExpressionSteppingTest4/ListExpressionSteppingTest4/f3@6::pc + IL_0078: ldarg.0 + IL_0079: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 ListExpressionSteppingTest4/ListExpressionSteppingTest4/f3@6::x + IL_007e: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_0083: ldarg.0 + IL_0084: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 ListExpressionSteppingTest4/ListExpressionSteppingTest4/f3@6::y + IL_0089: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_008e: add + IL_008f: stloc.0 + IL_0090: ldarg.0 + IL_0091: ldc.i4.2 + IL_0092: stfld int32 ListExpressionSteppingTest4/ListExpressionSteppingTest4/f3@6::pc .line 12,12 : 11,18 '' - IL_009f: ldarg.0 - IL_00a0: ldarg.0 - IL_00a1: ldfld int32 ListExpressionSteppingTest4/ListExpressionSteppingTest4/f3@6::z - IL_00a6: stfld int32 ListExpressionSteppingTest4/ListExpressionSteppingTest4/f3@6::current - IL_00ab: ldc.i4.1 - IL_00ac: ret - - .line 11,11 : 15,16 '' - IL_00ad: ldarg.0 - IL_00ae: ldc.i4.0 - IL_00af: stfld int32 ListExpressionSteppingTest4/ListExpressionSteppingTest4/f3@6::z + IL_0097: ldarg.0 + IL_0098: ldloc.0 + IL_0099: stfld int32 ListExpressionSteppingTest4/ListExpressionSteppingTest4/f3@6::current + IL_009e: ldc.i4.1 + IL_009f: ret + .line 8,8 : 15,16 '' - IL_00b4: ldarg.0 - IL_00b5: ldnull - IL_00b6: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 ListExpressionSteppingTest4/ListExpressionSteppingTest4/f3@6::y - IL_00bb: ldarg.0 - IL_00bc: ldnull - IL_00bd: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 ListExpressionSteppingTest4/ListExpressionSteppingTest4/f3@6::x - IL_00c2: ldarg.0 - IL_00c3: ldc.i4.3 - IL_00c4: stfld int32 ListExpressionSteppingTest4/ListExpressionSteppingTest4/f3@6::pc - IL_00c9: ldarg.0 - IL_00ca: ldc.i4.0 - IL_00cb: stfld int32 ListExpressionSteppingTest4/ListExpressionSteppingTest4/f3@6::current - IL_00d0: ldc.i4.0 - IL_00d1: ret + IL_00a0: ldarg.0 + IL_00a1: ldnull + IL_00a2: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 ListExpressionSteppingTest4/ListExpressionSteppingTest4/f3@6::y + IL_00a7: ldarg.0 + IL_00a8: ldnull + IL_00a9: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 ListExpressionSteppingTest4/ListExpressionSteppingTest4/f3@6::x + IL_00ae: ldarg.0 + IL_00af: ldc.i4.3 + IL_00b0: stfld int32 ListExpressionSteppingTest4/ListExpressionSteppingTest4/f3@6::pc + IL_00b5: ldarg.0 + IL_00b6: ldc.i4.0 + IL_00b7: stfld int32 ListExpressionSteppingTest4/ListExpressionSteppingTest4/f3@6::current + IL_00bc: ldc.i4.0 + IL_00bd: ret } // end of method f3@6::GenerateNext .method public strict virtual instance void @@ -289,19 +279,17 @@ { .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 ) - // Code size 11 (0xb) - .maxstack 9 + // Code size 10 (0xa) + .maxstack 8 IL_0000: ldnull IL_0001: ldnull IL_0002: ldc.i4.0 IL_0003: ldc.i4.0 - IL_0004: ldc.i4.0 - IL_0005: newobj instance void ListExpressionSteppingTest4/ListExpressionSteppingTest4/f3@6::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1, + IL_0004: newobj instance void ListExpressionSteppingTest4/ListExpressionSteppingTest4/f3@6::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1, class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1, int32, - int32, int32) - IL_000a: ret + IL_0009: ret } // end of method f3@6::GetFreshEnumerator } // end of class f3@6 @@ -309,22 +297,20 @@ .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f3() cil managed { - // Code size 18 (0x12) + // Code size 17 (0x11) .maxstack 8 .line 6,12 : 9,20 '' IL_0000: ldnull IL_0001: ldnull IL_0002: ldc.i4.0 IL_0003: ldc.i4.0 - IL_0004: ldc.i4.0 - IL_0005: newobj instance void ListExpressionSteppingTest4/ListExpressionSteppingTest4/f3@6::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1, + IL_0004: newobj instance void ListExpressionSteppingTest4/ListExpressionSteppingTest4/f3@6::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1, class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1, int32, - int32, int32) - IL_000a: tail. - IL_000c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0011: ret + IL_0009: tail. + IL_000b: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0010: ret } // end of method ListExpressionSteppingTest4::f3 } // end of class ListExpressionSteppingTest4 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest5.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest5.il.bsl index acbfe103d48..39def210b7f 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest5.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest5.il.bsl @@ -13,7 +13,7 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 4:4:1:0 + .ver 4:5:0:0 } .assembly ListExpressionSteppingTest5 { @@ -29,20 +29,20 @@ } .mresource public FSharpSignatureData.ListExpressionSteppingTest5 { - // Offset: 0x00000000 Length: 0x0000026D + // Offset: 0x00000000 Length: 0x00000275 } .mresource public FSharpOptimizationData.ListExpressionSteppingTest5 { - // Offset: 0x00000278 Length: 0x000000AF + // Offset: 0x00000280 Length: 0x000000AF } .module ListExpressionSteppingTest5.exe -// MVID: {59B1920C-CBE3-BFEA-A745-03830C92B159} +// MVID: {5B9A6329-CBE3-BFEA-A745-038329639A5B} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x016B0000 +// Image base: 0x027C0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -61,7 +61,6 @@ .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 x .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 y - .field public int32 z .field public int32 pc .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 ) @@ -73,11 +72,10 @@ .method public specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 x, class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 y, - int32 z, int32 pc, int32 current) cil managed { - // Code size 44 (0x2c) + // Code size 36 (0x24) .maxstack 8 IL_0000: ldarg.0 IL_0001: ldarg.1 @@ -87,23 +85,21 @@ IL_0009: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 ListExpressionSteppingTest5/ListExpressionSteppingTest5/f4@6::y IL_000e: ldarg.0 IL_000f: ldarg.3 - IL_0010: stfld int32 ListExpressionSteppingTest5/ListExpressionSteppingTest5/f4@6::z + IL_0010: stfld int32 ListExpressionSteppingTest5/ListExpressionSteppingTest5/f4@6::pc IL_0015: ldarg.0 - IL_0016: ldarg.s pc - IL_0018: stfld int32 ListExpressionSteppingTest5/ListExpressionSteppingTest5/f4@6::pc + IL_0016: ldarg.s current + IL_0018: stfld int32 ListExpressionSteppingTest5/ListExpressionSteppingTest5/f4@6::current IL_001d: ldarg.0 - IL_001e: ldarg.s current - IL_0020: stfld int32 ListExpressionSteppingTest5/ListExpressionSteppingTest5/f4@6::current - IL_0025: ldarg.0 - IL_0026: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() - IL_002b: ret + IL_001e: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_0023: ret } // end of method f4@6::.ctor .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 249 (0xf9) - .maxstack 7 + // Code size 232 (0xe8) + .maxstack 6 + .locals init ([0] int32 z) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\ListExpressionStepping\\ListExpressionSteppingTest5.fs' IL_0000: ldarg.0 @@ -127,7 +123,7 @@ .line 100001,100001 : 0,0 '' IL_0027: nop - IL_0028: br IL_00bf + IL_0028: br IL_00ae .line 100001,100001 : 0,0 '' IL_002d: nop @@ -135,11 +131,11 @@ .line 100001,100001 : 0,0 '' IL_0030: nop - IL_0031: br.s IL_00b1 + IL_0031: br.s IL_00a7 .line 100001,100001 : 0,0 '' IL_0033: nop - IL_0034: br IL_00f0 + IL_0034: br IL_00df .line 100001,100001 : 0,0 '' IL_0039: nop @@ -175,193 +171,185 @@ .line 11,11 : 15,30 '' IL_007f: ldarg.0 - IL_0080: ldarg.0 - IL_0081: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 ListExpressionSteppingTest5/ListExpressionSteppingTest5/f4@6::x - IL_0086: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_008b: ldarg.0 - IL_008c: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 ListExpressionSteppingTest5/ListExpressionSteppingTest5/f4@6::y - IL_0091: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_0096: add - IL_0097: stfld int32 ListExpressionSteppingTest5/ListExpressionSteppingTest5/f4@6::z - IL_009c: ldarg.0 - IL_009d: ldc.i4.3 - IL_009e: stfld int32 ListExpressionSteppingTest5/ListExpressionSteppingTest5/f4@6::pc + IL_0080: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 ListExpressionSteppingTest5/ListExpressionSteppingTest5/f4@6::x + IL_0085: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_008a: ldarg.0 + IL_008b: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 ListExpressionSteppingTest5/ListExpressionSteppingTest5/f4@6::y + IL_0090: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_0095: add + IL_0096: stloc.0 + IL_0097: ldarg.0 + IL_0098: ldc.i4.3 + IL_0099: stfld int32 ListExpressionSteppingTest5/ListExpressionSteppingTest5/f4@6::pc .line 12,12 : 15,22 '' - IL_00a3: ldarg.0 - IL_00a4: ldarg.0 - IL_00a5: ldfld int32 ListExpressionSteppingTest5/ListExpressionSteppingTest5/f4@6::z - IL_00aa: stfld int32 ListExpressionSteppingTest5/ListExpressionSteppingTest5/f4@6::current - IL_00af: ldc.i4.1 - IL_00b0: ret - - .line 11,11 : 19,20 '' - IL_00b1: ldarg.0 - IL_00b2: ldc.i4.0 - IL_00b3: stfld int32 ListExpressionSteppingTest5/ListExpressionSteppingTest5/f4@6::z - IL_00b8: ldarg.0 - IL_00b9: ldnull - IL_00ba: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 ListExpressionSteppingTest5/ListExpressionSteppingTest5/f4@6::y - IL_00bf: ldarg.0 - IL_00c0: ldc.i4.4 - IL_00c1: stfld int32 ListExpressionSteppingTest5/ListExpressionSteppingTest5/f4@6::pc + IL_009e: ldarg.0 + IL_009f: ldloc.0 + IL_00a0: stfld int32 ListExpressionSteppingTest5/ListExpressionSteppingTest5/f4@6::current + IL_00a5: ldc.i4.1 + IL_00a6: ret + + IL_00a7: ldarg.0 + IL_00a8: ldnull + IL_00a9: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 ListExpressionSteppingTest5/ListExpressionSteppingTest5/f4@6::y + IL_00ae: ldarg.0 + IL_00af: ldc.i4.4 + IL_00b0: stfld int32 ListExpressionSteppingTest5/ListExpressionSteppingTest5/f4@6::pc .line 14,14 : 14,20 '' - IL_00c6: ldarg.0 - IL_00c7: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 ListExpressionSteppingTest5/ListExpressionSteppingTest5/f4@6::x - IL_00cc: call void [FSharp.Core]Microsoft.FSharp.Core.Operators::Increment(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_00d1: nop + IL_00b5: ldarg.0 + IL_00b6: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 ListExpressionSteppingTest5/ListExpressionSteppingTest5/f4@6::x + IL_00bb: call void [FSharp.Core]Microsoft.FSharp.Core.Operators::Increment(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_00c0: nop .line 15,15 : 14,28 '' - IL_00d2: ldstr "done" - IL_00d7: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_00dc: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_00e1: pop - IL_00e2: ldarg.0 - IL_00e3: ldnull - IL_00e4: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 ListExpressionSteppingTest5/ListExpressionSteppingTest5/f4@6::x - IL_00e9: ldarg.0 - IL_00ea: ldc.i4.4 - IL_00eb: stfld int32 ListExpressionSteppingTest5/ListExpressionSteppingTest5/f4@6::pc - IL_00f0: ldarg.0 - IL_00f1: ldc.i4.0 - IL_00f2: stfld int32 ListExpressionSteppingTest5/ListExpressionSteppingTest5/f4@6::current - IL_00f7: ldc.i4.0 - IL_00f8: ret + IL_00c1: ldstr "done" + IL_00c6: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_00cb: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_00d0: pop + IL_00d1: ldarg.0 + IL_00d2: ldnull + IL_00d3: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 ListExpressionSteppingTest5/ListExpressionSteppingTest5/f4@6::x + IL_00d8: ldarg.0 + IL_00d9: ldc.i4.4 + IL_00da: stfld int32 ListExpressionSteppingTest5/ListExpressionSteppingTest5/f4@6::pc + IL_00df: ldarg.0 + IL_00e0: ldc.i4.0 + IL_00e1: stfld int32 ListExpressionSteppingTest5/ListExpressionSteppingTest5/f4@6::current + IL_00e6: ldc.i4.0 + IL_00e7: ret } // end of method f4@6::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 178 (0xb2) + // Code size 176 (0xb0) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [FSharp.Core]Microsoft.FSharp.Core.Unit V_1, [2] class [mscorlib]System.Exception e) .line 100001,100001 : 0,0 '' - IL_0000: ldnull - IL_0001: stloc.0 - IL_0002: ldarg.0 - IL_0003: ldfld int32 ListExpressionSteppingTest5/ListExpressionSteppingTest5/f4@6::pc - IL_0008: ldc.i4.4 - IL_0009: sub - IL_000a: switch ( - IL_0015) - IL_0013: br.s IL_001b + IL_0000: ldarg.0 + IL_0001: ldfld int32 ListExpressionSteppingTest5/ListExpressionSteppingTest5/f4@6::pc + IL_0006: ldc.i4.4 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0019 .line 100001,100001 : 0,0 '' - IL_0015: nop - IL_0016: br IL_00a5 + IL_0013: nop + IL_0014: br IL_00a3 .line 100001,100001 : 0,0 '' - IL_001b: nop + IL_0019: nop .try { - IL_001c: ldarg.0 - IL_001d: ldfld int32 ListExpressionSteppingTest5/ListExpressionSteppingTest5/f4@6::pc - IL_0022: switch ( + IL_001a: ldarg.0 + IL_001b: ldfld int32 ListExpressionSteppingTest5/ListExpressionSteppingTest5/f4@6::pc + IL_0020: switch ( + IL_003b, IL_003d, IL_003f, IL_0041, - IL_0043, - IL_0045) - IL_003b: br.s IL_0056 + IL_0043) + IL_0039: br.s IL_0054 - IL_003d: br.s IL_0047 + IL_003b: br.s IL_0045 - IL_003f: br.s IL_004a + IL_003d: br.s IL_0048 - IL_0041: br.s IL_004d + IL_003f: br.s IL_004b - IL_0043: br.s IL_0050 + IL_0041: br.s IL_004e - IL_0045: br.s IL_0053 + IL_0043: br.s IL_0051 .line 100001,100001 : 0,0 '' - IL_0047: nop - IL_0048: br.s IL_007f + IL_0045: nop + IL_0046: br.s IL_007d .line 100001,100001 : 0,0 '' - IL_004a: nop - IL_004b: br.s IL_005b + IL_0048: nop + IL_0049: br.s IL_0059 .line 100001,100001 : 0,0 '' - IL_004d: nop - IL_004e: br.s IL_005a + IL_004b: nop + IL_004c: br.s IL_0058 .line 100001,100001 : 0,0 '' - IL_0050: nop - IL_0051: br.s IL_0057 + IL_004e: nop + IL_004f: br.s IL_0055 .line 100001,100001 : 0,0 '' - IL_0053: nop - IL_0054: br.s IL_007f + IL_0051: nop + IL_0052: br.s IL_007d .line 100001,100001 : 0,0 '' - IL_0056: nop + IL_0054: nop .line 100001,100001 : 0,0 '' - IL_0057: nop - IL_0058: br.s IL_005b + IL_0055: nop + IL_0056: br.s IL_0059 .line 100001,100001 : 0,0 '' - IL_005a: nop - IL_005b: ldarg.0 - IL_005c: ldc.i4.4 - IL_005d: stfld int32 ListExpressionSteppingTest5/ListExpressionSteppingTest5/f4@6::pc + IL_0058: nop + IL_0059: ldarg.0 + IL_005a: ldc.i4.4 + IL_005b: stfld int32 ListExpressionSteppingTest5/ListExpressionSteppingTest5/f4@6::pc .line 14,14 : 14,20 '' - IL_0062: ldarg.0 - IL_0063: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 ListExpressionSteppingTest5/ListExpressionSteppingTest5/f4@6::x - IL_0068: call void [FSharp.Core]Microsoft.FSharp.Core.Operators::Increment(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_006d: nop + IL_0060: ldarg.0 + IL_0061: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 ListExpressionSteppingTest5/ListExpressionSteppingTest5/f4@6::x + IL_0066: call void [FSharp.Core]Microsoft.FSharp.Core.Operators::Increment(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_006b: nop .line 15,15 : 14,28 '' - IL_006e: ldstr "done" - IL_0073: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_0078: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_007d: pop + IL_006c: ldstr "done" + IL_0071: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0076: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_007b: pop .line 100001,100001 : 0,0 '' - IL_007e: nop - IL_007f: ldarg.0 - IL_0080: ldc.i4.4 - IL_0081: stfld int32 ListExpressionSteppingTest5/ListExpressionSteppingTest5/f4@6::pc - IL_0086: ldarg.0 - IL_0087: ldc.i4.0 - IL_0088: stfld int32 ListExpressionSteppingTest5/ListExpressionSteppingTest5/f4@6::current - IL_008d: ldnull - IL_008e: stloc.1 - IL_008f: leave.s IL_009d + IL_007c: nop + IL_007d: ldarg.0 + IL_007e: ldc.i4.4 + IL_007f: stfld int32 ListExpressionSteppingTest5/ListExpressionSteppingTest5/f4@6::pc + IL_0084: ldarg.0 + IL_0085: ldc.i4.0 + IL_0086: stfld int32 ListExpressionSteppingTest5/ListExpressionSteppingTest5/f4@6::current + IL_008b: ldnull + IL_008c: stloc.1 + IL_008d: leave.s IL_009b } // end .try catch [mscorlib]System.Object { - IL_0091: castclass [mscorlib]System.Exception - IL_0096: stloc.2 + IL_008f: castclass [mscorlib]System.Exception + IL_0094: stloc.2 .line 6,6 : 15,16 '' - IL_0097: ldloc.2 - IL_0098: stloc.0 - IL_0099: ldnull - IL_009a: stloc.1 - IL_009b: leave.s IL_009d + IL_0095: ldloc.2 + IL_0096: stloc.0 + IL_0097: ldnull + IL_0098: stloc.1 + IL_0099: leave.s IL_009b .line 100001,100001 : 0,0 '' } // end handler - IL_009d: ldloc.1 - IL_009e: pop + IL_009b: ldloc.1 + IL_009c: pop .line 100001,100001 : 0,0 '' - IL_009f: nop - IL_00a0: br IL_0002 + IL_009d: nop + IL_009e: br IL_0000 - IL_00a5: ldloc.0 - IL_00a6: ldnull - IL_00a7: cgt.un - IL_00a9: brfalse.s IL_00ad + IL_00a3: ldloc.0 + IL_00a4: ldnull + IL_00a5: cgt.un + IL_00a7: brfalse.s IL_00ab - IL_00ab: br.s IL_00af + IL_00a9: br.s IL_00ad - IL_00ad: br.s IL_00b1 + IL_00ab: br.s IL_00af .line 100001,100001 : 0,0 '' - IL_00af: ldloc.0 - IL_00b0: throw + IL_00ad: ldloc.0 + IL_00ae: throw .line 100001,100001 : 0,0 '' - IL_00b1: ret + IL_00af: ret } // end of method f4@6::Close .method public strict virtual instance bool @@ -442,19 +430,17 @@ { .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 ) - // Code size 11 (0xb) - .maxstack 9 + // Code size 10 (0xa) + .maxstack 8 IL_0000: ldnull IL_0001: ldnull IL_0002: ldc.i4.0 IL_0003: ldc.i4.0 - IL_0004: ldc.i4.0 - IL_0005: newobj instance void ListExpressionSteppingTest5/ListExpressionSteppingTest5/f4@6::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1, + IL_0004: newobj instance void ListExpressionSteppingTest5/ListExpressionSteppingTest5/f4@6::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1, class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1, int32, - int32, int32) - IL_000a: ret + IL_0009: ret } // end of method f4@6::GetFreshEnumerator } // end of class f4@6 @@ -462,22 +448,20 @@ .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f4() cil managed { - // Code size 18 (0x12) + // Code size 17 (0x11) .maxstack 8 .line 6,15 : 9,30 '' IL_0000: ldnull IL_0001: ldnull IL_0002: ldc.i4.0 IL_0003: ldc.i4.0 - IL_0004: ldc.i4.0 - IL_0005: newobj instance void ListExpressionSteppingTest5/ListExpressionSteppingTest5/f4@6::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1, + IL_0004: newobj instance void ListExpressionSteppingTest5/ListExpressionSteppingTest5/f4@6::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1, class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1, int32, - int32, int32) - IL_000a: tail. - IL_000c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0011: ret + IL_0009: tail. + IL_000b: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0010: ret } // end of method ListExpressionSteppingTest5::f4 } // end of class ListExpressionSteppingTest5 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest6.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest6.il.bsl index be8004b797b..2d43c04e954 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest6.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest6.il.bsl @@ -13,7 +13,7 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 4:4:1:0 + .ver 4:5:0:0 } .assembly ListExpressionSteppingTest6 { @@ -29,20 +29,20 @@ } .mresource public FSharpSignatureData.ListExpressionSteppingTest6 { - // Offset: 0x00000000 Length: 0x00000295 + // Offset: 0x00000000 Length: 0x0000029D } .mresource public FSharpOptimizationData.ListExpressionSteppingTest6 { - // Offset: 0x000002A0 Length: 0x000000BC + // Offset: 0x000002A8 Length: 0x000000BC } .module ListExpressionSteppingTest6.exe -// MVID: {59B1920C-98A2-AB14-A745-03830C92B159} +// MVID: {5B9A6329-98A2-AB14-A745-038329639A5B} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x00F60000 +// Image base: 0x007B0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -59,8 +59,6 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) - .field public int32 x - .field public int32 x0 .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' .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 ) @@ -78,43 +76,37 @@ .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 specialname rtspecialname - instance void .ctor(int32 x, - int32 x0, - class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', class [mscorlib]System.Collections.Generic.IEnumerator`1 enum0, int32 pc, int32 current) cil managed { - // Code size 52 (0x34) + // Code size 36 (0x24) .maxstack 8 IL_0000: ldarg.0 IL_0001: ldarg.1 - IL_0002: stfld int32 ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::x + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::'enum' IL_0007: ldarg.0 IL_0008: ldarg.2 - IL_0009: stfld int32 ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::x0 + IL_0009: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::enum0 IL_000e: ldarg.0 IL_000f: ldarg.3 - IL_0010: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::'enum' + IL_0010: stfld int32 ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::pc IL_0015: ldarg.0 - IL_0016: ldarg.s enum0 - IL_0018: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::enum0 + IL_0016: ldarg.s current + IL_0018: stfld int32 ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::current IL_001d: ldarg.0 - IL_001e: ldarg.s pc - IL_0020: stfld int32 ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::pc - IL_0025: ldarg.0 - IL_0026: ldarg.s current - IL_0028: stfld int32 ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::current - IL_002d: ldarg.0 - IL_002e: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() - IL_0033: ret + IL_001e: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_0023: ret } // end of method f7@7::.ctor .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 341 (0x155) + // Code size 304 (0x130) .maxstack 6 + .locals init ([0] int32 x, + [1] int32 V_1) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\ListExpressionStepping\\ListExpressionSteppingTest6.fs' IL_0000: ldarg.0 @@ -127,303 +119,289 @@ IL_0027, IL_0029, IL_002b) - IL_0021: br.s IL_0048 + IL_0021: br.s IL_0045 IL_0023: br.s IL_002d - IL_0025: br.s IL_0033 + IL_0025: br.s IL_0030 - IL_0027: br.s IL_0036 + IL_0027: br.s IL_0033 - IL_0029: br.s IL_003c + IL_0029: br.s IL_0039 - IL_002b: br.s IL_0042 + IL_002b: br.s IL_003f .line 100001,100001 : 0,0 '' IL_002d: nop - IL_002e: br IL_00ad + IL_002e: br.s IL_0099 .line 100001,100001 : 0,0 '' - IL_0033: nop - IL_0034: br.s IL_00a3 + IL_0030: nop + IL_0031: br.s IL_0096 .line 100001,100001 : 0,0 '' - IL_0036: nop - IL_0037: br IL_012b + IL_0033: nop + IL_0034: br IL_0106 .line 100001,100001 : 0,0 '' - IL_003c: nop - IL_003d: br IL_0121 + IL_0039: nop + IL_003a: br IL_0103 .line 100001,100001 : 0,0 '' - IL_0042: nop - IL_0043: br IL_014c + IL_003f: nop + IL_0040: br IL_0127 .line 100001,100001 : 0,0 '' - IL_0048: nop + IL_0045: nop .line 7,9 : 11,21 '' - IL_0049: ldarg.0 - IL_004a: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ListExpressionSteppingTest6/ListExpressionSteppingTest6::get_es() - IL_004f: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0054: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::'enum' - IL_0059: ldarg.0 - IL_005a: ldc.i4.1 - IL_005b: stfld int32 ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::pc + IL_0046: ldarg.0 + IL_0047: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ListExpressionSteppingTest6/ListExpressionSteppingTest6::get_es() + IL_004c: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0051: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::'enum' + IL_0056: ldarg.0 + IL_0057: ldc.i4.1 + IL_0058: stfld int32 ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::pc .line 7,9 : 11,21 '' - IL_0060: ldarg.0 - IL_0061: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::'enum' - IL_0066: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_006b: brfalse.s IL_00ad - - IL_006d: ldarg.0 - IL_006e: ldarg.0 - IL_006f: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::'enum' - IL_0074: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0079: stfld int32 ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::x + IL_005d: ldarg.0 + IL_005e: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::'enum' + IL_0063: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_0068: brfalse.s IL_0099 + + IL_006a: ldarg.0 + IL_006b: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::'enum' + IL_0070: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0075: stloc.0 .line 8,8 : 14,29 '' - IL_007e: ldstr "hello" - IL_0083: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_0088: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_008d: pop - IL_008e: ldarg.0 - IL_008f: ldc.i4.2 - IL_0090: stfld int32 ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::pc + IL_0076: ldstr "hello" + IL_007b: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0080: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0085: pop + IL_0086: ldarg.0 + IL_0087: ldc.i4.2 + IL_0088: stfld int32 ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::pc .line 9,9 : 14,21 '' - IL_0095: ldarg.0 - IL_0096: ldarg.0 - IL_0097: ldfld int32 ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::x - IL_009c: stfld int32 ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::current - IL_00a1: ldc.i4.1 - IL_00a2: ret + IL_008d: ldarg.0 + IL_008e: ldloc.0 + IL_008f: stfld int32 ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::current + IL_0094: ldc.i4.1 + IL_0095: ret - .line 7,9 : 11,21 '' - IL_00a3: ldarg.0 - IL_00a4: ldc.i4.0 - IL_00a5: stfld int32 ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::x .line 100001,100001 : 0,0 '' - IL_00aa: nop - IL_00ab: br.s IL_0060 + IL_0096: nop + IL_0097: br.s IL_005d - IL_00ad: ldarg.0 - IL_00ae: ldc.i4.5 - IL_00af: stfld int32 ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::pc + IL_0099: ldarg.0 + IL_009a: ldc.i4.5 + IL_009b: stfld int32 ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::pc .line 7,9 : 11,21 '' - IL_00b4: ldarg.0 - IL_00b5: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::'enum' - IL_00ba: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_00bf: nop - IL_00c0: ldarg.0 - IL_00c1: ldnull - IL_00c2: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::'enum' + IL_00a0: ldarg.0 + IL_00a1: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::'enum' + IL_00a6: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_00ab: nop + IL_00ac: ldarg.0 + IL_00ad: ldnull + IL_00ae: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::'enum' .line 10,12 : 11,21 '' - IL_00c7: ldarg.0 - IL_00c8: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ListExpressionSteppingTest6/ListExpressionSteppingTest6::get_es() - IL_00cd: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_00d2: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::enum0 - IL_00d7: ldarg.0 - IL_00d8: ldc.i4.3 - IL_00d9: stfld int32 ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::pc + IL_00b3: ldarg.0 + IL_00b4: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ListExpressionSteppingTest6/ListExpressionSteppingTest6::get_es() + IL_00b9: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_00be: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::enum0 + IL_00c3: ldarg.0 + IL_00c4: ldc.i4.3 + IL_00c5: stfld int32 ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::pc .line 10,12 : 11,21 '' - IL_00de: ldarg.0 - IL_00df: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::enum0 - IL_00e4: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_00e9: brfalse.s IL_012b - - IL_00eb: ldarg.0 - IL_00ec: ldarg.0 - IL_00ed: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::enum0 - IL_00f2: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_00f7: stfld int32 ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::x0 + IL_00ca: ldarg.0 + IL_00cb: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::enum0 + IL_00d0: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_00d5: brfalse.s IL_0106 + + IL_00d7: ldarg.0 + IL_00d8: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::enum0 + IL_00dd: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_00e2: stloc.1 .line 11,11 : 14,31 '' - IL_00fc: ldstr "goodbye" - IL_0101: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_0106: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_010b: pop - IL_010c: ldarg.0 - IL_010d: ldc.i4.4 - IL_010e: stfld int32 ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::pc + IL_00e3: ldstr "goodbye" + IL_00e8: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_00ed: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_00f2: pop + IL_00f3: ldarg.0 + IL_00f4: ldc.i4.4 + IL_00f5: stfld int32 ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::pc .line 12,12 : 14,21 '' - IL_0113: ldarg.0 - IL_0114: ldarg.0 - IL_0115: ldfld int32 ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::x0 - IL_011a: stfld int32 ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::current - IL_011f: ldc.i4.1 - IL_0120: ret + IL_00fa: ldarg.0 + IL_00fb: ldloc.1 + IL_00fc: stfld int32 ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::current + IL_0101: ldc.i4.1 + IL_0102: ret - .line 10,12 : 11,21 '' - IL_0121: ldarg.0 - IL_0122: ldc.i4.0 - IL_0123: stfld int32 ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::x0 .line 100001,100001 : 0,0 '' - IL_0128: nop - IL_0129: br.s IL_00de + IL_0103: nop + IL_0104: br.s IL_00ca - IL_012b: ldarg.0 - IL_012c: ldc.i4.5 - IL_012d: stfld int32 ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::pc + IL_0106: ldarg.0 + IL_0107: ldc.i4.5 + IL_0108: stfld int32 ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::pc .line 10,12 : 11,21 '' - IL_0132: ldarg.0 - IL_0133: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::enum0 - IL_0138: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_013d: nop - IL_013e: ldarg.0 - IL_013f: ldnull - IL_0140: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::enum0 - IL_0145: ldarg.0 - IL_0146: ldc.i4.5 - IL_0147: stfld int32 ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::pc - IL_014c: ldarg.0 - IL_014d: ldc.i4.0 - IL_014e: stfld int32 ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::current - IL_0153: ldc.i4.0 - IL_0154: ret + IL_010d: ldarg.0 + IL_010e: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::enum0 + IL_0113: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0118: nop + IL_0119: ldarg.0 + IL_011a: ldnull + IL_011b: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::enum0 + IL_0120: ldarg.0 + IL_0121: ldc.i4.5 + IL_0122: stfld int32 ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::pc + IL_0127: ldarg.0 + IL_0128: ldc.i4.0 + IL_0129: stfld int32 ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::current + IL_012e: ldc.i4.0 + IL_012f: ret } // end of method f7@7::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 191 (0xbf) + // Code size 189 (0xbd) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [FSharp.Core]Microsoft.FSharp.Core.Unit V_1, [2] class [mscorlib]System.Exception e) .line 100001,100001 : 0,0 '' - IL_0000: ldnull - IL_0001: stloc.0 - IL_0002: ldarg.0 - IL_0003: ldfld int32 ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::pc - IL_0008: ldc.i4.5 - IL_0009: sub - IL_000a: switch ( - IL_0015) - IL_0013: br.s IL_001b + IL_0000: ldarg.0 + IL_0001: ldfld int32 ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::pc + IL_0006: ldc.i4.5 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0019 .line 100001,100001 : 0,0 '' - IL_0015: nop - IL_0016: br IL_00b2 + IL_0013: nop + IL_0014: br IL_00b0 .line 100001,100001 : 0,0 '' - IL_001b: nop + IL_0019: nop .try { - IL_001c: ldarg.0 - IL_001d: ldfld int32 ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::pc - IL_0022: switch ( + IL_001a: ldarg.0 + IL_001b: ldfld int32 ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::pc + IL_0020: switch ( + IL_003f, IL_0041, IL_0043, IL_0045, IL_0047, - IL_0049, - IL_004b) - IL_003f: br.s IL_005f + IL_0049) + IL_003d: br.s IL_005d - IL_0041: br.s IL_004d + IL_003f: br.s IL_004b - IL_0043: br.s IL_0050 + IL_0041: br.s IL_004e - IL_0045: br.s IL_0053 + IL_0043: br.s IL_0051 - IL_0047: br.s IL_0056 + IL_0045: br.s IL_0054 - IL_0049: br.s IL_0059 + IL_0047: br.s IL_0057 - IL_004b: br.s IL_005c + IL_0049: br.s IL_005a .line 100001,100001 : 0,0 '' - IL_004d: nop - IL_004e: br.s IL_008c + IL_004b: nop + IL_004c: br.s IL_008a .line 100001,100001 : 0,0 '' - IL_0050: nop - IL_0051: br.s IL_0078 + IL_004e: nop + IL_004f: br.s IL_0076 .line 100001,100001 : 0,0 '' - IL_0053: nop - IL_0054: br.s IL_0077 + IL_0051: nop + IL_0052: br.s IL_0075 .line 100001,100001 : 0,0 '' - IL_0056: nop - IL_0057: br.s IL_0061 + IL_0054: nop + IL_0055: br.s IL_005f .line 100001,100001 : 0,0 '' - IL_0059: nop - IL_005a: br.s IL_0060 + IL_0057: nop + IL_0058: br.s IL_005e .line 100001,100001 : 0,0 '' - IL_005c: nop - IL_005d: br.s IL_008c + IL_005a: nop + IL_005b: br.s IL_008a .line 100001,100001 : 0,0 '' - IL_005f: nop + IL_005d: nop .line 100001,100001 : 0,0 '' - IL_0060: nop - IL_0061: ldarg.0 - IL_0062: ldc.i4.5 - IL_0063: stfld int32 ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::pc - IL_0068: ldarg.0 - IL_0069: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::enum0 - IL_006e: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_0073: nop + IL_005e: nop + IL_005f: ldarg.0 + IL_0060: ldc.i4.5 + IL_0061: stfld int32 ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::pc + IL_0066: ldarg.0 + IL_0067: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::enum0 + IL_006c: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0071: nop .line 100001,100001 : 0,0 '' - IL_0074: nop - IL_0075: br.s IL_008c + IL_0072: nop + IL_0073: br.s IL_008a .line 100001,100001 : 0,0 '' - IL_0077: nop - IL_0078: ldarg.0 - IL_0079: ldc.i4.5 - IL_007a: stfld int32 ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::pc - IL_007f: ldarg.0 - IL_0080: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::'enum' - IL_0085: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_008a: nop + IL_0075: nop + IL_0076: ldarg.0 + IL_0077: ldc.i4.5 + IL_0078: stfld int32 ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::pc + IL_007d: ldarg.0 + IL_007e: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::'enum' + IL_0083: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0088: nop .line 100001,100001 : 0,0 '' - IL_008b: nop - IL_008c: ldarg.0 - IL_008d: ldc.i4.5 - IL_008e: stfld int32 ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::pc - IL_0093: ldarg.0 - IL_0094: ldc.i4.0 - IL_0095: stfld int32 ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::current - IL_009a: ldnull - IL_009b: stloc.1 - IL_009c: leave.s IL_00aa + IL_0089: nop + IL_008a: ldarg.0 + IL_008b: ldc.i4.5 + IL_008c: stfld int32 ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::pc + IL_0091: ldarg.0 + IL_0092: ldc.i4.0 + IL_0093: stfld int32 ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::current + IL_0098: ldnull + IL_0099: stloc.1 + IL_009a: leave.s IL_00a8 } // end .try catch [mscorlib]System.Object { - IL_009e: castclass [mscorlib]System.Exception - IL_00a3: stloc.2 + IL_009c: castclass [mscorlib]System.Exception + IL_00a1: stloc.2 .line 7,9 : 11,21 '' - IL_00a4: ldloc.2 - IL_00a5: stloc.0 - IL_00a6: ldnull - IL_00a7: stloc.1 - IL_00a8: leave.s IL_00aa + IL_00a2: ldloc.2 + IL_00a3: stloc.0 + IL_00a4: ldnull + IL_00a5: stloc.1 + IL_00a6: leave.s IL_00a8 .line 100001,100001 : 0,0 '' } // end handler - IL_00aa: ldloc.1 - IL_00ab: pop + IL_00a8: ldloc.1 + IL_00a9: pop .line 100001,100001 : 0,0 '' - IL_00ac: nop - IL_00ad: br IL_0002 + IL_00aa: nop + IL_00ab: br IL_0000 - IL_00b2: ldloc.0 - IL_00b3: ldnull - IL_00b4: cgt.un - IL_00b6: brfalse.s IL_00ba + IL_00b0: ldloc.0 + IL_00b1: ldnull + IL_00b2: cgt.un + IL_00b4: brfalse.s IL_00b8 - IL_00b8: br.s IL_00bc + IL_00b6: br.s IL_00ba - IL_00ba: br.s IL_00be + IL_00b8: br.s IL_00bc .line 100001,100001 : 0,0 '' - IL_00bc: ldloc.0 - IL_00bd: throw + IL_00ba: ldloc.0 + IL_00bb: throw .line 100001,100001 : 0,0 '' - IL_00be: ret + IL_00bc: ret } // end of method f7@7::Close .method public strict virtual instance bool @@ -514,21 +492,17 @@ { .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 ) - // Code size 12 (0xc) - .maxstack 10 - IL_0000: ldc.i4.0 - IL_0001: ldc.i4.0 - IL_0002: ldnull - IL_0003: ldnull - IL_0004: ldc.i4.0 - IL_0005: ldc.i4.0 - IL_0006: newobj instance void ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::.ctor(int32, - int32, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + // Code size 10 (0xa) + .maxstack 8 + IL_0000: ldnull + IL_0001: ldnull + IL_0002: ldc.i4.0 + IL_0003: ldc.i4.0 + IL_0004: newobj instance void ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, int32) - IL_000b: ret + IL_0009: ret } // end of method f7@7::GetFreshEnumerator } // end of class f7@7 @@ -545,24 +519,20 @@ .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f7() cil managed { - // Code size 19 (0x13) + // Code size 17 (0x11) .maxstack 8 .line 7,12 : 9,23 '' - IL_0000: ldc.i4.0 - IL_0001: ldc.i4.0 - IL_0002: ldnull - IL_0003: ldnull - IL_0004: ldc.i4.0 - IL_0005: ldc.i4.0 - IL_0006: newobj instance void ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::.ctor(int32, - int32, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0000: ldnull + IL_0001: ldnull + IL_0002: ldc.i4.0 + IL_0003: ldc.i4.0 + IL_0004: newobj instance void ListExpressionSteppingTest6/ListExpressionSteppingTest6/f7@7::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, int32) - IL_000b: tail. - IL_000d: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0012: ret + IL_0009: tail. + IL_000b: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0010: ret } // end of method ListExpressionSteppingTest6::f7 .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/LiteralValue/LiteralValue.fs b/tests/fsharpqa/Source/CodeGen/EmittedIL/LiteralValue/LiteralValue.fs new file mode 100644 index 00000000000..cca0b9e0e2f --- /dev/null +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/LiteralValue/LiteralValue.fs @@ -0,0 +1,6 @@ +[] +let x = 7 + +[] +let main argv = + 0 \ No newline at end of file diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/LiteralValue/LiteralValue.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/LiteralValue/LiteralValue.il.bsl new file mode 100644 index 00000000000..32a104642ee --- /dev/null +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/LiteralValue/LiteralValue.il.bsl @@ -0,0 +1,81 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.5.22220.0 + + + +// 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:4:3:0 +} +.assembly LiteralValue +{ + .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.LiteralValue +{ + // Offset: 0x00000000 Length: 0x00000274 + // WARNING: managed resource file FSharpSignatureData.test created +} +.mresource public FSharpOptimizationData.LiteralValue +{ + // Offset: 0x00000278 Length: 0x0000006F + // WARNING: managed resource file FSharpOptimizationData.test created +} +.module LiteralValue.exe + // MVID: {5AA663EB-D9C1-2E4E-A745-0383EB63A65A} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x02BF0000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed LiteralValue + 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 ) + .field public static literal int32 x = int32(0x00000007) + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.LiteralAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method public static int32 main(string[] argv) cil managed + { + .entrypoint + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.EntryPointAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 2 (0x2) + .maxstack 8 + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 6,6 : 5,6 'D:\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\LiteralValue\\LiteralValue.fs' + IL_0000: ldc.i4.0 + IL_0001: ret + } // end of method LiteralValue::main + +} // end of class LiteralValue + +.class private abstract auto ansi sealed ''.$LiteralValue + extends [mscorlib]System.Object +{ +} // end of class ''.$LiteralValue + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** +// WARNING: Created Win32 resource file test.res diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/LiteralValue/env.lst b/tests/fsharpqa/Source/CodeGen/EmittedIL/LiteralValue/env.lst new file mode 100644 index 00000000000..5566c4d1da8 --- /dev/null +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/LiteralValue/env.lst @@ -0,0 +1 @@ + SOURCE=LiteralValue.fs SCFLAGS="-g --test:LiteralValue --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd LiteralValue.exe" # LiteralValue.fs - \ No newline at end of file diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/StructsAsArrayElements01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/StructsAsArrayElements01.il.bsl index f0f93453aa4..e3e7795ebd4 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/StructsAsArrayElements01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/StructsAsArrayElements01.il.bsl @@ -13,7 +13,7 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 4:4:1:0 + .ver 4:4:3:0 } .assembly StructsAsArrayElements01 { @@ -29,20 +29,20 @@ } .mresource public FSharpSignatureData.StructsAsArrayElements01 { - // Offset: 0x00000000 Length: 0x00000764 + // Offset: 0x00000000 Length: 0x00000758 } .mresource public FSharpOptimizationData.StructsAsArrayElements01 { - // Offset: 0x00000768 Length: 0x0000022C + // Offset: 0x00000760 Length: 0x0000022C } .module StructsAsArrayElements01.dll -// MVID: {59B19213-29F3-6E68-A745-03831392B159} +// MVID: {5B17FC4F-29F3-6E68-A745-03834FFC175B} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x002D0000 +// Image base: 0x00E30000 // =============== CLASS MEMBERS DECLARATION =================== @@ -331,28 +331,26 @@ .method private specialname rtspecialname static void .cctor() cil managed { - // Code size 43 (0x2b) + // Code size 35 (0x23) .maxstack 4 .locals init ([0] valuetype StructsAsArrayElements01/T[] a, [1] valuetype StructsAsArrayElements01/T V_1) .line 11,11 : 1,48 '' IL_0000: ldc.i4.s 10 - IL_0002: ldloca.s V_1 - IL_0004: initobj StructsAsArrayElements01/T - IL_000a: ldloc.1 - IL_000b: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, + IL_0002: ldloc.1 + IL_0003: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.ArrayModule::Create(int32, !!0) - IL_0010: dup - IL_0011: stsfld valuetype StructsAsArrayElements01/T[] ''.$StructsAsArrayElements01::a@11 - IL_0016: stloc.0 + IL_0008: dup + IL_0009: stsfld valuetype StructsAsArrayElements01/T[] ''.$StructsAsArrayElements01::a@11 + IL_000e: stloc.0 .line 12,12 : 1,13 '' - IL_0017: call valuetype StructsAsArrayElements01/T[] StructsAsArrayElements01::get_a() - IL_001c: ldc.i4.0 - IL_001d: ldelema StructsAsArrayElements01/T - IL_0022: ldc.i4.s 27 - IL_0024: call instance void StructsAsArrayElements01/T::Set(int32) - IL_0029: nop - IL_002a: ret + IL_000f: call valuetype StructsAsArrayElements01/T[] StructsAsArrayElements01::get_a() + IL_0014: ldc.i4.0 + IL_0015: ldelema StructsAsArrayElements01/T + IL_001a: ldc.i4.s 27 + IL_001c: call instance void StructsAsArrayElements01/T::Set(int32) + IL_0021: nop + IL_0022: ret } // end of method $StructsAsArrayElements01::.cctor } // end of class ''.$StructsAsArrayElements01 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Mutation/Mutation02.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Mutation/Mutation02.il.bsl index 0a759b0de44..b26df9510b4 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Mutation/Mutation02.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Mutation/Mutation02.il.bsl @@ -13,7 +13,7 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 4:4:1:0 + .ver 4:5:0:0 } .assembly Mutation02 { @@ -29,20 +29,20 @@ } .mresource public FSharpSignatureData.Mutation02 { - // Offset: 0x00000000 Length: 0x0000019A + // Offset: 0x00000000 Length: 0x000001A2 } .mresource public FSharpOptimizationData.Mutation02 { - // Offset: 0x000001A0 Length: 0x0000006C + // Offset: 0x000001A8 Length: 0x0000006C } .module Mutation02.exe -// MVID: {59B19213-8C6A-2F0D-A745-03831392B159} +// MVID: {5B9A632A-8C6A-2F0D-A745-03832A639A5B} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x01720000 +// Image base: 0x02750000 // =============== CLASS MEMBERS DECLARATION =================== @@ -56,7 +56,7 @@ { // Code size 6 (0x6) .maxstack 8 - IL_0000: ldsfld valuetype [mscorlib]System.TimeSpan ''.$Mutation02::'x@4-13' + IL_0000: ldsfld valuetype [mscorlib]System.TimeSpan ''.$Mutation02::x@4 IL_0005: ret } // end of method Mutation02::get_x @@ -71,7 +71,7 @@ .class private abstract auto ansi sealed ''.$Mutation02 extends [mscorlib]System.Object { - .field static assembly valuetype [mscorlib]System.TimeSpan 'x@4-13' + .field static assembly valuetype [mscorlib]System.TimeSpan x@4 .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 ) @@ -88,7 +88,7 @@ .line 4,4 : 1,33 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\Mutation\\Mutation02.fs' IL_0000: ldsfld valuetype [mscorlib]System.TimeSpan [mscorlib]System.TimeSpan::MinValue IL_0005: dup - IL_0006: stsfld valuetype [mscorlib]System.TimeSpan ''.$Mutation02::'x@4-13' + IL_0006: stsfld valuetype [mscorlib]System.TimeSpan ''.$Mutation02::x@4 IL_000b: stloc.0 .line 5,5 : 1,13 '' IL_000c: call valuetype [mscorlib]System.TimeSpan Mutation02::get_x() diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Mutation/Mutation03.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Mutation/Mutation03.il.bsl index 34f12d567a2..e43810c10bf 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Mutation/Mutation03.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Mutation/Mutation03.il.bsl @@ -13,7 +13,7 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 4:4:1:0 + .ver 4:5:0:0 } .assembly Mutation03 { @@ -29,20 +29,20 @@ } .mresource public FSharpSignatureData.Mutation03 { - // Offset: 0x00000000 Length: 0x0000019A + // Offset: 0x00000000 Length: 0x000001A2 } .mresource public FSharpOptimizationData.Mutation03 { - // Offset: 0x000001A0 Length: 0x0000006C + // Offset: 0x000001A8 Length: 0x0000006C } .module Mutation03.exe -// MVID: {59B19213-8C6A-2EEC-A745-03831392B159} +// MVID: {5B9A632A-8C6A-2EEC-A745-03832A639A5B} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x00390000 +// Image base: 0x02CA0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -56,7 +56,7 @@ { // Code size 6 (0x6) .maxstack 8 - IL_0000: ldsfld valuetype [mscorlib]System.DateTime ''.$Mutation03::'x@4-15' + IL_0000: ldsfld valuetype [mscorlib]System.DateTime ''.$Mutation03::'x@4-2' IL_0005: ret } // end of method Mutation03::get_x @@ -71,7 +71,7 @@ .class private abstract auto ansi sealed ''.$Mutation03 extends [mscorlib]System.Object { - .field static assembly valuetype [mscorlib]System.DateTime 'x@4-15' + .field static assembly valuetype [mscorlib]System.DateTime 'x@4-2' .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 ) @@ -88,7 +88,7 @@ .line 4,4 : 1,28 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\Mutation\\Mutation03.fs' IL_0000: call valuetype [mscorlib]System.DateTime [mscorlib]System.DateTime::get_Now() IL_0005: dup - IL_0006: stsfld valuetype [mscorlib]System.DateTime ''.$Mutation03::'x@4-15' + IL_0006: stsfld valuetype [mscorlib]System.DateTime ''.$Mutation03::'x@4-2' IL_000b: stloc.0 .line 5,5 : 1,6 '' IL_000c: call valuetype [mscorlib]System.DateTime Mutation03::get_x() diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Mutation/Mutation04.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Mutation/Mutation04.il.bsl index d379dc13144..444d581fc63 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Mutation/Mutation04.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Mutation/Mutation04.il.bsl @@ -13,7 +13,7 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 4:4:1:0 + .ver 4:5:0:0 } .assembly Mutation04 { @@ -29,20 +29,20 @@ } .mresource public FSharpSignatureData.Mutation04 { - // Offset: 0x00000000 Length: 0x000001AD + // Offset: 0x00000000 Length: 0x000001B5 } .mresource public FSharpOptimizationData.Mutation04 { - // Offset: 0x000001B8 Length: 0x0000006C + // Offset: 0x000001C0 Length: 0x0000006C } .module Mutation04.exe -// MVID: {59B19213-8C6A-2E43-A745-03831392B159} +// MVID: {5B9A632A-8C6A-2E43-A745-03832A639A5B} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x013F0000 +// Image base: 0x02A80000 // =============== CLASS MEMBERS DECLARATION =================== @@ -56,7 +56,7 @@ { // Code size 6 (0x6) .maxstack 8 - IL_0000: ldsfld valuetype [mscorlib]System.Decimal ''.$Mutation04::'x@4-17' + IL_0000: ldsfld valuetype [mscorlib]System.Decimal ''.$Mutation04::'x@4-4' IL_0005: ret } // end of method Mutation04::get_x @@ -71,7 +71,7 @@ .class private abstract auto ansi sealed ''.$Mutation04 extends [mscorlib]System.Object { - .field static assembly valuetype [mscorlib]System.Decimal 'x@4-17' + .field static assembly valuetype [mscorlib]System.Decimal 'x@4-4' .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 ) @@ -88,7 +88,7 @@ .line 4,4 : 1,32 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\Mutation\\Mutation04.fs' IL_0000: ldsfld valuetype [mscorlib]System.Decimal [mscorlib]System.Decimal::MaxValue IL_0005: dup - IL_0006: stsfld valuetype [mscorlib]System.Decimal ''.$Mutation04::'x@4-17' + IL_0006: stsfld valuetype [mscorlib]System.Decimal ''.$Mutation04::'x@4-4' IL_000b: stloc.0 .line 5,5 : 1,13 '' IL_000c: call valuetype [mscorlib]System.Decimal Mutation04::get_x() diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Mutation/Mutation05.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Mutation/Mutation05.il.bsl index 8ea74f29990..fc052bb6e08 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Mutation/Mutation05.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Mutation/Mutation05.il.bsl @@ -13,7 +13,7 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 4:4:1:0 + .ver 4:5:0:0 } .assembly Mutation05 { @@ -29,20 +29,20 @@ } .mresource public FSharpSignatureData.Mutation05 { - // Offset: 0x00000000 Length: 0x000004C8 + // Offset: 0x00000000 Length: 0x000004CE } .mresource public FSharpOptimizationData.Mutation05 { - // Offset: 0x000004D0 Length: 0x00000127 + // Offset: 0x000004D8 Length: 0x00000127 } .module Mutation05.exe -// MVID: {59B19213-8C6A-2E22-A745-03831392B159} +// MVID: {5B9A632A-8C6A-2E22-A745-03832A639A5B} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x01290000 +// Image base: 0x008E0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -115,7 +115,7 @@ .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) .field static assembly int32 x .custom instance void [FSharp.Core]Microsoft.FSharp.Core.VolatileFieldAttribute::.ctor() = ( 01 00 00 00 ) - .field static assembly int32 'init@9-2' + .field static assembly int32 init@9 .method public specialname rtspecialname instance void .ctor() cil managed { @@ -137,7 +137,7 @@ .maxstack 8 .line 100001,100001 : 0,0 '' IL_0000: volatile. - IL_0002: ldsfld int32 Mutation05/StaticC::'init@9-2' + IL_0002: ldsfld int32 Mutation05/StaticC::init@9 IL_0007: ldc.i4.1 IL_0008: bge.s IL_000c @@ -167,7 +167,7 @@ .maxstack 8 .line 100001,100001 : 0,0 '' IL_0000: volatile. - IL_0002: ldsfld int32 Mutation05/StaticC::'init@9-2' + IL_0002: ldsfld int32 Mutation05/StaticC::init@9 IL_0007: ldc.i4.1 IL_0008: bge.s IL_000c @@ -231,7 +231,7 @@ IL_0003: stsfld int32 Mutation05/StaticC::x IL_0008: ldc.i4.1 IL_0009: volatile. - IL_000b: stsfld int32 Mutation05/StaticC::'init@9-2' + IL_000b: stsfld int32 Mutation05/StaticC::init@9 .line 9,9 : 6,13 '' IL_0010: ret } // end of method $Mutation05::main@ diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Aggregates01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Aggregates01.il.bsl index 2b6e9243808..78bfe96fcc7 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Aggregates01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Aggregates01.il.bsl @@ -13,7 +13,7 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 4:4:1:0 + .ver 4:5:0:0 } .assembly extern Utils { @@ -38,20 +38,20 @@ } .mresource public FSharpSignatureData.Linq101Aggregates01 { - // Offset: 0x00000000 Length: 0x000005F2 + // Offset: 0x00000000 Length: 0x00000614 } .mresource public FSharpOptimizationData.Linq101Aggregates01 { - // Offset: 0x000005F8 Length: 0x00000211 + // Offset: 0x00000618 Length: 0x00000211 } .module Linq101Aggregates01.exe -// MVID: {5A1F62A6-D281-4783-A745-0383A6621F5A} +// MVID: {5B9A632A-D281-4783-A745-03832A639A5B} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x01280000 +// Image base: 0x026B0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -64,11 +64,6 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) - .field public int32 _arg1 - .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 ) - .field public int32 n .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' .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 ) @@ -82,41 +77,35 @@ .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 specialname rtspecialname - instance void .ctor(int32 _arg1, - int32 n, - class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', int32 pc, int32 current) cil managed { - // Code size 44 (0x2c) + // Code size 28 (0x1c) .maxstack 8 IL_0000: ldarg.0 IL_0001: ldarg.1 - IL_0002: stfld int32 Linq101Aggregates01/uniqueFactors@12::_arg1 + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/uniqueFactors@12::'enum' IL_0007: ldarg.0 IL_0008: ldarg.2 - IL_0009: stfld int32 Linq101Aggregates01/uniqueFactors@12::n + IL_0009: stfld int32 Linq101Aggregates01/uniqueFactors@12::pc IL_000e: ldarg.0 IL_000f: ldarg.3 - IL_0010: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/uniqueFactors@12::'enum' + IL_0010: stfld int32 Linq101Aggregates01/uniqueFactors@12::current IL_0015: ldarg.0 - IL_0016: ldarg.s pc - IL_0018: stfld int32 Linq101Aggregates01/uniqueFactors@12::pc - IL_001d: ldarg.0 - IL_001e: ldarg.s current - IL_0020: stfld int32 Linq101Aggregates01/uniqueFactors@12::current - IL_0025: ldarg.0 - IL_0026: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() - IL_002b: ret + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_001b: ret } // end of method uniqueFactors@12::.ctor .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 191 (0xbf) + // Code size 154 (0x9a) .maxstack 6 + .locals init ([0] int32 V_0, + [1] int32 n) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 100001,100001 : 0,0 'C:\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\QueryExpressionStepping\\Linq101Aggregates01.fs' + .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\QueryExpressionStepping\\Linq101Aggregates01.fs' IL_0000: ldarg.0 IL_0001: ldfld int32 Linq101Aggregates01/uniqueFactors@12::pc IL_0006: ldc.i4.1 @@ -125,7 +114,7 @@ IL_001b, IL_001d, IL_001f) - IL_0019: br.s IL_002d + IL_0019: br.s IL_002a IL_001b: br.s IL_0021 @@ -135,203 +124,190 @@ .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br.s IL_0095 + IL_0022: br.s IL_0070 .line 100001,100001 : 0,0 '' IL_0024: nop - IL_0025: br.s IL_0084 + IL_0025: br.s IL_006d .line 100001,100001 : 0,0 '' IL_0027: nop - IL_0028: br IL_00b6 + IL_0028: br.s IL_0091 .line 100001,100001 : 0,0 '' - IL_002d: nop + IL_002a: nop .line 12,12 : 9,33 '' - IL_002e: ldarg.0 - IL_002f: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_factorsOf300() - IL_0034: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0039: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/uniqueFactors@12::'enum' - IL_003e: ldarg.0 - IL_003f: ldc.i4.1 - IL_0040: stfld int32 Linq101Aggregates01/uniqueFactors@12::pc + IL_002b: ldarg.0 + IL_002c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_factorsOf300() + IL_0031: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0036: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/uniqueFactors@12::'enum' + IL_003b: ldarg.0 + IL_003c: ldc.i4.1 + IL_003d: stfld int32 Linq101Aggregates01/uniqueFactors@12::pc .line 12,12 : 9,33 '' - IL_0045: ldarg.0 - IL_0046: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/uniqueFactors@12::'enum' - IL_004b: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0050: brfalse.s IL_0095 - - IL_0052: ldarg.0 - IL_0053: ldarg.0 - IL_0054: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/uniqueFactors@12::'enum' - IL_0059: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_005e: stfld int32 Linq101Aggregates01/uniqueFactors@12::_arg1 + IL_0042: ldarg.0 + IL_0043: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/uniqueFactors@12::'enum' + IL_0048: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_004d: brfalse.s IL_0070 + + IL_004f: ldarg.0 + IL_0050: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/uniqueFactors@12::'enum' + IL_0055: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_005a: stloc.0 .line 12,12 : 9,33 '' - IL_0063: ldarg.0 - IL_0064: ldarg.0 - IL_0065: ldfld int32 Linq101Aggregates01/uniqueFactors@12::_arg1 - IL_006a: stfld int32 Linq101Aggregates01/uniqueFactors@12::n - IL_006f: ldarg.0 - IL_0070: ldc.i4.2 - IL_0071: stfld int32 Linq101Aggregates01/uniqueFactors@12::pc + IL_005b: ldloc.0 + IL_005c: stloc.1 + IL_005d: ldarg.0 + IL_005e: ldc.i4.2 + IL_005f: stfld int32 Linq101Aggregates01/uniqueFactors@12::pc .line 13,13 : 9,17 '' - IL_0076: ldarg.0 - IL_0077: ldarg.0 - IL_0078: ldfld int32 Linq101Aggregates01/uniqueFactors@12::n - IL_007d: stfld int32 Linq101Aggregates01/uniqueFactors@12::current - IL_0082: ldc.i4.1 - IL_0083: ret + IL_0064: ldarg.0 + IL_0065: ldloc.1 + IL_0066: stfld int32 Linq101Aggregates01/uniqueFactors@12::current + IL_006b: ldc.i4.1 + IL_006c: ret - IL_0084: ldarg.0 - IL_0085: ldc.i4.0 - IL_0086: stfld int32 Linq101Aggregates01/uniqueFactors@12::n - .line 12,12 : 9,33 '' - IL_008b: ldarg.0 - IL_008c: ldc.i4.0 - IL_008d: stfld int32 Linq101Aggregates01/uniqueFactors@12::_arg1 .line 100001,100001 : 0,0 '' - IL_0092: nop - IL_0093: br.s IL_0045 + IL_006d: nop + IL_006e: br.s IL_0042 - IL_0095: ldarg.0 - IL_0096: ldc.i4.3 - IL_0097: stfld int32 Linq101Aggregates01/uniqueFactors@12::pc + IL_0070: ldarg.0 + IL_0071: ldc.i4.3 + IL_0072: stfld int32 Linq101Aggregates01/uniqueFactors@12::pc .line 12,12 : 9,33 '' - IL_009c: ldarg.0 - IL_009d: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/uniqueFactors@12::'enum' - IL_00a2: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_00a7: nop - IL_00a8: ldarg.0 - IL_00a9: ldnull - IL_00aa: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/uniqueFactors@12::'enum' - IL_00af: ldarg.0 - IL_00b0: ldc.i4.3 - IL_00b1: stfld int32 Linq101Aggregates01/uniqueFactors@12::pc - IL_00b6: ldarg.0 - IL_00b7: ldc.i4.0 - IL_00b8: stfld int32 Linq101Aggregates01/uniqueFactors@12::current - IL_00bd: ldc.i4.0 - IL_00be: ret + IL_0077: ldarg.0 + IL_0078: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/uniqueFactors@12::'enum' + IL_007d: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0082: nop + IL_0083: ldarg.0 + IL_0084: ldnull + IL_0085: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/uniqueFactors@12::'enum' + IL_008a: ldarg.0 + IL_008b: ldc.i4.3 + IL_008c: stfld int32 Linq101Aggregates01/uniqueFactors@12::pc + IL_0091: ldarg.0 + IL_0092: ldc.i4.0 + IL_0093: stfld int32 Linq101Aggregates01/uniqueFactors@12::current + IL_0098: ldc.i4.0 + IL_0099: ret } // end of method uniqueFactors@12::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 150 (0x96) + // Code size 148 (0x94) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [FSharp.Core]Microsoft.FSharp.Core.Unit V_1, [2] class [mscorlib]System.Exception e) .line 100001,100001 : 0,0 '' - IL_0000: ldnull - IL_0001: stloc.0 - IL_0002: ldarg.0 - IL_0003: ldfld int32 Linq101Aggregates01/uniqueFactors@12::pc - IL_0008: ldc.i4.3 - IL_0009: sub - IL_000a: switch ( - IL_0015) - IL_0013: br.s IL_001b + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Aggregates01/uniqueFactors@12::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0019 .line 100001,100001 : 0,0 '' - IL_0015: nop - IL_0016: br IL_0089 + IL_0013: nop + IL_0014: br IL_0087 .line 100001,100001 : 0,0 '' - IL_001b: nop + IL_0019: nop .try { - IL_001c: ldarg.0 - IL_001d: ldfld int32 Linq101Aggregates01/uniqueFactors@12::pc - IL_0022: switch ( + IL_001a: ldarg.0 + IL_001b: ldfld int32 Linq101Aggregates01/uniqueFactors@12::pc + IL_0020: switch ( + IL_0037, IL_0039, IL_003b, - IL_003d, - IL_003f) - IL_0037: br.s IL_004d + IL_003d) + IL_0035: br.s IL_004b - IL_0039: br.s IL_0041 + IL_0037: br.s IL_003f - IL_003b: br.s IL_0044 + IL_0039: br.s IL_0042 - IL_003d: br.s IL_0047 + IL_003b: br.s IL_0045 - IL_003f: br.s IL_004a + IL_003d: br.s IL_0048 .line 100001,100001 : 0,0 '' - IL_0041: nop - IL_0042: br.s IL_0063 + IL_003f: nop + IL_0040: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_0044: nop - IL_0045: br.s IL_004f + IL_0042: nop + IL_0043: br.s IL_004d .line 100001,100001 : 0,0 '' - IL_0047: nop - IL_0048: br.s IL_004e + IL_0045: nop + IL_0046: br.s IL_004c .line 100001,100001 : 0,0 '' - IL_004a: nop - IL_004b: br.s IL_0063 + IL_0048: nop + IL_0049: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_004d: nop + IL_004b: nop .line 100001,100001 : 0,0 '' - IL_004e: nop - IL_004f: ldarg.0 - IL_0050: ldc.i4.3 - IL_0051: stfld int32 Linq101Aggregates01/uniqueFactors@12::pc - IL_0056: ldarg.0 - IL_0057: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/uniqueFactors@12::'enum' - IL_005c: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_0061: nop + IL_004c: nop + IL_004d: ldarg.0 + IL_004e: ldc.i4.3 + IL_004f: stfld int32 Linq101Aggregates01/uniqueFactors@12::pc + IL_0054: ldarg.0 + IL_0055: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/uniqueFactors@12::'enum' + IL_005a: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_005f: nop .line 100001,100001 : 0,0 '' - IL_0062: nop - IL_0063: ldarg.0 - IL_0064: ldc.i4.3 - IL_0065: stfld int32 Linq101Aggregates01/uniqueFactors@12::pc - IL_006a: ldarg.0 - IL_006b: ldc.i4.0 - IL_006c: stfld int32 Linq101Aggregates01/uniqueFactors@12::current - IL_0071: ldnull - IL_0072: stloc.1 - IL_0073: leave.s IL_0081 + IL_0060: nop + IL_0061: ldarg.0 + IL_0062: ldc.i4.3 + IL_0063: stfld int32 Linq101Aggregates01/uniqueFactors@12::pc + IL_0068: ldarg.0 + IL_0069: ldc.i4.0 + IL_006a: stfld int32 Linq101Aggregates01/uniqueFactors@12::current + IL_006f: ldnull + IL_0070: stloc.1 + IL_0071: leave.s IL_007f } // end .try catch [mscorlib]System.Object { - IL_0075: castclass [mscorlib]System.Exception - IL_007a: stloc.2 + IL_0073: castclass [mscorlib]System.Exception + IL_0078: stloc.2 .line 12,12 : 9,33 '' - IL_007b: ldloc.2 - IL_007c: stloc.0 - IL_007d: ldnull - IL_007e: stloc.1 - IL_007f: leave.s IL_0081 + IL_0079: ldloc.2 + IL_007a: stloc.0 + IL_007b: ldnull + IL_007c: stloc.1 + IL_007d: leave.s IL_007f .line 100001,100001 : 0,0 '' } // end handler - IL_0081: ldloc.1 - IL_0082: pop + IL_007f: ldloc.1 + IL_0080: pop .line 100001,100001 : 0,0 '' - IL_0083: nop - IL_0084: br IL_0002 + IL_0081: nop + IL_0082: br IL_0000 - IL_0089: ldloc.0 - IL_008a: ldnull - IL_008b: cgt.un - IL_008d: brfalse.s IL_0091 + IL_0087: ldloc.0 + IL_0088: ldnull + IL_0089: cgt.un + IL_008b: brfalse.s IL_008f - IL_008f: br.s IL_0093 + IL_008d: br.s IL_0091 - IL_0091: br.s IL_0095 + IL_008f: br.s IL_0093 .line 100001,100001 : 0,0 '' - IL_0093: ldloc.0 - IL_0094: throw + IL_0091: ldloc.0 + IL_0092: throw .line 100001,100001 : 0,0 '' - IL_0095: ret + IL_0093: ret } // end of method uniqueFactors@12::Close .method public strict virtual instance bool @@ -402,19 +378,15 @@ { .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 ) - // Code size 11 (0xb) - .maxstack 9 - IL_0000: ldc.i4.0 + // Code size 9 (0x9) + .maxstack 8 + IL_0000: ldnull IL_0001: ldc.i4.0 - IL_0002: ldnull - IL_0003: ldc.i4.0 - IL_0004: ldc.i4.0 - IL_0005: newobj instance void Linq101Aggregates01/uniqueFactors@12::.ctor(int32, - int32, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0002: ldc.i4.0 + IL_0003: newobj instance void Linq101Aggregates01/uniqueFactors@12::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, int32) - IL_000a: ret + IL_0008: ret } // end of method uniqueFactors@12::GetFreshEnumerator } // end of class uniqueFactors@12 @@ -423,11 +395,6 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) - .field public int32 _arg1 - .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 ) - .field public int32 n .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' .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 ) @@ -441,39 +408,33 @@ .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 specialname rtspecialname - instance void .ctor(int32 _arg1, - int32 n, - class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', int32 pc, int32 current) cil managed { - // Code size 44 (0x2c) + // Code size 28 (0x1c) .maxstack 8 IL_0000: ldarg.0 IL_0001: ldarg.1 - IL_0002: stfld int32 Linq101Aggregates01/numSum@21::_arg1 + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/numSum@21::'enum' IL_0007: ldarg.0 IL_0008: ldarg.2 - IL_0009: stfld int32 Linq101Aggregates01/numSum@21::n + IL_0009: stfld int32 Linq101Aggregates01/numSum@21::pc IL_000e: ldarg.0 IL_000f: ldarg.3 - IL_0010: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/numSum@21::'enum' + IL_0010: stfld int32 Linq101Aggregates01/numSum@21::current IL_0015: ldarg.0 - IL_0016: ldarg.s pc - IL_0018: stfld int32 Linq101Aggregates01/numSum@21::pc - IL_001d: ldarg.0 - IL_001e: ldarg.s current - IL_0020: stfld int32 Linq101Aggregates01/numSum@21::current - IL_0025: ldarg.0 - IL_0026: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() - IL_002b: ret + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_001b: ret } // end of method numSum@21::.ctor .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 191 (0xbf) + // Code size 154 (0x9a) .maxstack 6 + .locals init ([0] int32 V_0, + [1] int32 n) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 IL_0001: ldfld int32 Linq101Aggregates01/numSum@21::pc @@ -483,7 +444,7 @@ IL_001b, IL_001d, IL_001f) - IL_0019: br.s IL_002d + IL_0019: br.s IL_002a IL_001b: br.s IL_0021 @@ -493,203 +454,190 @@ .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br.s IL_0095 + IL_0022: br.s IL_0070 .line 100001,100001 : 0,0 '' IL_0024: nop - IL_0025: br.s IL_0084 + IL_0025: br.s IL_006d .line 100001,100001 : 0,0 '' IL_0027: nop - IL_0028: br IL_00b6 + IL_0028: br.s IL_0091 .line 100001,100001 : 0,0 '' - IL_002d: nop + IL_002a: nop .line 21,21 : 9,28 '' - IL_002e: ldarg.0 - IL_002f: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_numbers() - IL_0034: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0039: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/numSum@21::'enum' - IL_003e: ldarg.0 - IL_003f: ldc.i4.1 - IL_0040: stfld int32 Linq101Aggregates01/numSum@21::pc + IL_002b: ldarg.0 + IL_002c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_numbers() + IL_0031: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0036: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/numSum@21::'enum' + IL_003b: ldarg.0 + IL_003c: ldc.i4.1 + IL_003d: stfld int32 Linq101Aggregates01/numSum@21::pc .line 21,21 : 9,28 '' - IL_0045: ldarg.0 - IL_0046: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/numSum@21::'enum' - IL_004b: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0050: brfalse.s IL_0095 - - IL_0052: ldarg.0 - IL_0053: ldarg.0 - IL_0054: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/numSum@21::'enum' - IL_0059: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_005e: stfld int32 Linq101Aggregates01/numSum@21::_arg1 + IL_0042: ldarg.0 + IL_0043: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/numSum@21::'enum' + IL_0048: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_004d: brfalse.s IL_0070 + + IL_004f: ldarg.0 + IL_0050: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/numSum@21::'enum' + IL_0055: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_005a: stloc.0 .line 21,21 : 9,28 '' - IL_0063: ldarg.0 - IL_0064: ldarg.0 - IL_0065: ldfld int32 Linq101Aggregates01/numSum@21::_arg1 - IL_006a: stfld int32 Linq101Aggregates01/numSum@21::n - IL_006f: ldarg.0 - IL_0070: ldc.i4.2 - IL_0071: stfld int32 Linq101Aggregates01/numSum@21::pc + IL_005b: ldloc.0 + IL_005c: stloc.1 + IL_005d: ldarg.0 + IL_005e: ldc.i4.2 + IL_005f: stfld int32 Linq101Aggregates01/numSum@21::pc .line 22,22 : 9,16 '' - IL_0076: ldarg.0 - IL_0077: ldarg.0 - IL_0078: ldfld int32 Linq101Aggregates01/numSum@21::n - IL_007d: stfld int32 Linq101Aggregates01/numSum@21::current - IL_0082: ldc.i4.1 - IL_0083: ret + IL_0064: ldarg.0 + IL_0065: ldloc.1 + IL_0066: stfld int32 Linq101Aggregates01/numSum@21::current + IL_006b: ldc.i4.1 + IL_006c: ret - IL_0084: ldarg.0 - IL_0085: ldc.i4.0 - IL_0086: stfld int32 Linq101Aggregates01/numSum@21::n - .line 21,21 : 9,28 '' - IL_008b: ldarg.0 - IL_008c: ldc.i4.0 - IL_008d: stfld int32 Linq101Aggregates01/numSum@21::_arg1 .line 100001,100001 : 0,0 '' - IL_0092: nop - IL_0093: br.s IL_0045 + IL_006d: nop + IL_006e: br.s IL_0042 - IL_0095: ldarg.0 - IL_0096: ldc.i4.3 - IL_0097: stfld int32 Linq101Aggregates01/numSum@21::pc + IL_0070: ldarg.0 + IL_0071: ldc.i4.3 + IL_0072: stfld int32 Linq101Aggregates01/numSum@21::pc .line 21,21 : 9,28 '' - IL_009c: ldarg.0 - IL_009d: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/numSum@21::'enum' - IL_00a2: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_00a7: nop - IL_00a8: ldarg.0 - IL_00a9: ldnull - IL_00aa: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/numSum@21::'enum' - IL_00af: ldarg.0 - IL_00b0: ldc.i4.3 - IL_00b1: stfld int32 Linq101Aggregates01/numSum@21::pc - IL_00b6: ldarg.0 - IL_00b7: ldc.i4.0 - IL_00b8: stfld int32 Linq101Aggregates01/numSum@21::current - IL_00bd: ldc.i4.0 - IL_00be: ret + IL_0077: ldarg.0 + IL_0078: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/numSum@21::'enum' + IL_007d: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0082: nop + IL_0083: ldarg.0 + IL_0084: ldnull + IL_0085: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/numSum@21::'enum' + IL_008a: ldarg.0 + IL_008b: ldc.i4.3 + IL_008c: stfld int32 Linq101Aggregates01/numSum@21::pc + IL_0091: ldarg.0 + IL_0092: ldc.i4.0 + IL_0093: stfld int32 Linq101Aggregates01/numSum@21::current + IL_0098: ldc.i4.0 + IL_0099: ret } // end of method numSum@21::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 150 (0x96) + // Code size 148 (0x94) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [FSharp.Core]Microsoft.FSharp.Core.Unit V_1, [2] class [mscorlib]System.Exception e) .line 100001,100001 : 0,0 '' - IL_0000: ldnull - IL_0001: stloc.0 - IL_0002: ldarg.0 - IL_0003: ldfld int32 Linq101Aggregates01/numSum@21::pc - IL_0008: ldc.i4.3 - IL_0009: sub - IL_000a: switch ( - IL_0015) - IL_0013: br.s IL_001b + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Aggregates01/numSum@21::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0019 .line 100001,100001 : 0,0 '' - IL_0015: nop - IL_0016: br IL_0089 + IL_0013: nop + IL_0014: br IL_0087 .line 100001,100001 : 0,0 '' - IL_001b: nop + IL_0019: nop .try { - IL_001c: ldarg.0 - IL_001d: ldfld int32 Linq101Aggregates01/numSum@21::pc - IL_0022: switch ( + IL_001a: ldarg.0 + IL_001b: ldfld int32 Linq101Aggregates01/numSum@21::pc + IL_0020: switch ( + IL_0037, IL_0039, IL_003b, - IL_003d, - IL_003f) - IL_0037: br.s IL_004d + IL_003d) + IL_0035: br.s IL_004b - IL_0039: br.s IL_0041 + IL_0037: br.s IL_003f - IL_003b: br.s IL_0044 + IL_0039: br.s IL_0042 - IL_003d: br.s IL_0047 + IL_003b: br.s IL_0045 - IL_003f: br.s IL_004a + IL_003d: br.s IL_0048 .line 100001,100001 : 0,0 '' - IL_0041: nop - IL_0042: br.s IL_0063 + IL_003f: nop + IL_0040: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_0044: nop - IL_0045: br.s IL_004f + IL_0042: nop + IL_0043: br.s IL_004d .line 100001,100001 : 0,0 '' - IL_0047: nop - IL_0048: br.s IL_004e + IL_0045: nop + IL_0046: br.s IL_004c .line 100001,100001 : 0,0 '' - IL_004a: nop - IL_004b: br.s IL_0063 + IL_0048: nop + IL_0049: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_004d: nop + IL_004b: nop .line 100001,100001 : 0,0 '' - IL_004e: nop - IL_004f: ldarg.0 - IL_0050: ldc.i4.3 - IL_0051: stfld int32 Linq101Aggregates01/numSum@21::pc - IL_0056: ldarg.0 - IL_0057: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/numSum@21::'enum' - IL_005c: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_0061: nop + IL_004c: nop + IL_004d: ldarg.0 + IL_004e: ldc.i4.3 + IL_004f: stfld int32 Linq101Aggregates01/numSum@21::pc + IL_0054: ldarg.0 + IL_0055: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/numSum@21::'enum' + IL_005a: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_005f: nop .line 100001,100001 : 0,0 '' - IL_0062: nop - IL_0063: ldarg.0 - IL_0064: ldc.i4.3 - IL_0065: stfld int32 Linq101Aggregates01/numSum@21::pc - IL_006a: ldarg.0 - IL_006b: ldc.i4.0 - IL_006c: stfld int32 Linq101Aggregates01/numSum@21::current - IL_0071: ldnull - IL_0072: stloc.1 - IL_0073: leave.s IL_0081 + IL_0060: nop + IL_0061: ldarg.0 + IL_0062: ldc.i4.3 + IL_0063: stfld int32 Linq101Aggregates01/numSum@21::pc + IL_0068: ldarg.0 + IL_0069: ldc.i4.0 + IL_006a: stfld int32 Linq101Aggregates01/numSum@21::current + IL_006f: ldnull + IL_0070: stloc.1 + IL_0071: leave.s IL_007f } // end .try catch [mscorlib]System.Object { - IL_0075: castclass [mscorlib]System.Exception - IL_007a: stloc.2 + IL_0073: castclass [mscorlib]System.Exception + IL_0078: stloc.2 .line 21,21 : 9,28 '' - IL_007b: ldloc.2 - IL_007c: stloc.0 - IL_007d: ldnull - IL_007e: stloc.1 - IL_007f: leave.s IL_0081 + IL_0079: ldloc.2 + IL_007a: stloc.0 + IL_007b: ldnull + IL_007c: stloc.1 + IL_007d: leave.s IL_007f .line 100001,100001 : 0,0 '' } // end handler - IL_0081: ldloc.1 - IL_0082: pop + IL_007f: ldloc.1 + IL_0080: pop .line 100001,100001 : 0,0 '' - IL_0083: nop - IL_0084: br IL_0002 + IL_0081: nop + IL_0082: br IL_0000 - IL_0089: ldloc.0 - IL_008a: ldnull - IL_008b: cgt.un - IL_008d: brfalse.s IL_0091 + IL_0087: ldloc.0 + IL_0088: ldnull + IL_0089: cgt.un + IL_008b: brfalse.s IL_008f - IL_008f: br.s IL_0093 + IL_008d: br.s IL_0091 - IL_0091: br.s IL_0095 + IL_008f: br.s IL_0093 .line 100001,100001 : 0,0 '' - IL_0093: ldloc.0 - IL_0094: throw + IL_0091: ldloc.0 + IL_0092: throw .line 100001,100001 : 0,0 '' - IL_0095: ret + IL_0093: ret } // end of method numSum@21::Close .method public strict virtual instance bool @@ -760,19 +708,15 @@ { .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 ) - // Code size 11 (0xb) - .maxstack 9 - IL_0000: ldc.i4.0 + // Code size 9 (0x9) + .maxstack 8 + IL_0000: ldnull IL_0001: ldc.i4.0 - IL_0002: ldnull - IL_0003: ldc.i4.0 - IL_0004: ldc.i4.0 - IL_0005: newobj instance void Linq101Aggregates01/numSum@21::.ctor(int32, - int32, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0002: ldc.i4.0 + IL_0003: newobj instance void Linq101Aggregates01/numSum@21::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, int32) - IL_000a: ret + IL_0008: ret } // end of method numSum@21::GetFreshEnumerator } // end of class numSum@21 @@ -808,11 +752,6 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) - .field public string _arg1 - .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 ) - .field public string w .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' .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 ) @@ -826,39 +765,33 @@ .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 specialname rtspecialname - instance void .ctor(string _arg1, - string w, - class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', int32 pc, string current) cil managed { - // Code size 44 (0x2c) + // Code size 28 (0x1c) .maxstack 8 IL_0000: ldarg.0 IL_0001: ldarg.1 - IL_0002: stfld string Linq101Aggregates01/totalChars@30::_arg1 + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/totalChars@30::'enum' IL_0007: ldarg.0 IL_0008: ldarg.2 - IL_0009: stfld string Linq101Aggregates01/totalChars@30::w + IL_0009: stfld int32 Linq101Aggregates01/totalChars@30::pc IL_000e: ldarg.0 IL_000f: ldarg.3 - IL_0010: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/totalChars@30::'enum' + IL_0010: stfld string Linq101Aggregates01/totalChars@30::current IL_0015: ldarg.0 - IL_0016: ldarg.s pc - IL_0018: stfld int32 Linq101Aggregates01/totalChars@30::pc - IL_001d: ldarg.0 - IL_001e: ldarg.s current - IL_0020: stfld string Linq101Aggregates01/totalChars@30::current - IL_0025: ldarg.0 - IL_0026: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() - IL_002b: ret + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_001b: ret } // end of method totalChars@30::.ctor .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 191 (0xbf) + // Code size 154 (0x9a) .maxstack 6 + .locals init ([0] string V_0, + [1] string w) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 IL_0001: ldfld int32 Linq101Aggregates01/totalChars@30::pc @@ -868,7 +801,7 @@ IL_001b, IL_001d, IL_001f) - IL_0019: br.s IL_002d + IL_0019: br.s IL_002a IL_001b: br.s IL_0021 @@ -878,203 +811,190 @@ .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br.s IL_0095 + IL_0022: br.s IL_0070 .line 100001,100001 : 0,0 '' IL_0024: nop - IL_0025: br.s IL_0084 + IL_0025: br.s IL_006d .line 100001,100001 : 0,0 '' IL_0027: nop - IL_0028: br IL_00b6 + IL_0028: br.s IL_0091 .line 100001,100001 : 0,0 '' - IL_002d: nop + IL_002a: nop .line 30,30 : 9,26 '' - IL_002e: ldarg.0 - IL_002f: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_words() - IL_0034: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0039: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/totalChars@30::'enum' - IL_003e: ldarg.0 - IL_003f: ldc.i4.1 - IL_0040: stfld int32 Linq101Aggregates01/totalChars@30::pc + IL_002b: ldarg.0 + IL_002c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_words() + IL_0031: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0036: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/totalChars@30::'enum' + IL_003b: ldarg.0 + IL_003c: ldc.i4.1 + IL_003d: stfld int32 Linq101Aggregates01/totalChars@30::pc .line 30,30 : 9,26 '' - IL_0045: ldarg.0 - IL_0046: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/totalChars@30::'enum' - IL_004b: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0050: brfalse.s IL_0095 - - IL_0052: ldarg.0 - IL_0053: ldarg.0 - IL_0054: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/totalChars@30::'enum' - IL_0059: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_005e: stfld string Linq101Aggregates01/totalChars@30::_arg1 + IL_0042: ldarg.0 + IL_0043: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/totalChars@30::'enum' + IL_0048: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_004d: brfalse.s IL_0070 + + IL_004f: ldarg.0 + IL_0050: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/totalChars@30::'enum' + IL_0055: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_005a: stloc.0 .line 30,30 : 9,26 '' - IL_0063: ldarg.0 - IL_0064: ldarg.0 - IL_0065: ldfld string Linq101Aggregates01/totalChars@30::_arg1 - IL_006a: stfld string Linq101Aggregates01/totalChars@30::w - IL_006f: ldarg.0 - IL_0070: ldc.i4.2 - IL_0071: stfld int32 Linq101Aggregates01/totalChars@30::pc + IL_005b: ldloc.0 + IL_005c: stloc.1 + IL_005d: ldarg.0 + IL_005e: ldc.i4.2 + IL_005f: stfld int32 Linq101Aggregates01/totalChars@30::pc .line 31,31 : 9,25 '' - IL_0076: ldarg.0 - IL_0077: ldarg.0 - IL_0078: ldfld string Linq101Aggregates01/totalChars@30::w - IL_007d: stfld string Linq101Aggregates01/totalChars@30::current - IL_0082: ldc.i4.1 - IL_0083: ret + IL_0064: ldarg.0 + IL_0065: ldloc.1 + IL_0066: stfld string Linq101Aggregates01/totalChars@30::current + IL_006b: ldc.i4.1 + IL_006c: ret - IL_0084: ldarg.0 - IL_0085: ldnull - IL_0086: stfld string Linq101Aggregates01/totalChars@30::w - .line 30,30 : 9,26 '' - IL_008b: ldarg.0 - IL_008c: ldnull - IL_008d: stfld string Linq101Aggregates01/totalChars@30::_arg1 .line 100001,100001 : 0,0 '' - IL_0092: nop - IL_0093: br.s IL_0045 + IL_006d: nop + IL_006e: br.s IL_0042 - IL_0095: ldarg.0 - IL_0096: ldc.i4.3 - IL_0097: stfld int32 Linq101Aggregates01/totalChars@30::pc + IL_0070: ldarg.0 + IL_0071: ldc.i4.3 + IL_0072: stfld int32 Linq101Aggregates01/totalChars@30::pc .line 30,30 : 9,26 '' - IL_009c: ldarg.0 - IL_009d: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/totalChars@30::'enum' - IL_00a2: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_00a7: nop - IL_00a8: ldarg.0 - IL_00a9: ldnull - IL_00aa: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/totalChars@30::'enum' - IL_00af: ldarg.0 - IL_00b0: ldc.i4.3 - IL_00b1: stfld int32 Linq101Aggregates01/totalChars@30::pc - IL_00b6: ldarg.0 - IL_00b7: ldnull - IL_00b8: stfld string Linq101Aggregates01/totalChars@30::current - IL_00bd: ldc.i4.0 - IL_00be: ret + IL_0077: ldarg.0 + IL_0078: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/totalChars@30::'enum' + IL_007d: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0082: nop + IL_0083: ldarg.0 + IL_0084: ldnull + IL_0085: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/totalChars@30::'enum' + IL_008a: ldarg.0 + IL_008b: ldc.i4.3 + IL_008c: stfld int32 Linq101Aggregates01/totalChars@30::pc + IL_0091: ldarg.0 + IL_0092: ldnull + IL_0093: stfld string Linq101Aggregates01/totalChars@30::current + IL_0098: ldc.i4.0 + IL_0099: ret } // end of method totalChars@30::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 150 (0x96) + // Code size 148 (0x94) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [FSharp.Core]Microsoft.FSharp.Core.Unit V_1, [2] class [mscorlib]System.Exception e) .line 100001,100001 : 0,0 '' - IL_0000: ldnull - IL_0001: stloc.0 - IL_0002: ldarg.0 - IL_0003: ldfld int32 Linq101Aggregates01/totalChars@30::pc - IL_0008: ldc.i4.3 - IL_0009: sub - IL_000a: switch ( - IL_0015) - IL_0013: br.s IL_001b + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Aggregates01/totalChars@30::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0019 .line 100001,100001 : 0,0 '' - IL_0015: nop - IL_0016: br IL_0089 + IL_0013: nop + IL_0014: br IL_0087 .line 100001,100001 : 0,0 '' - IL_001b: nop + IL_0019: nop .try { - IL_001c: ldarg.0 - IL_001d: ldfld int32 Linq101Aggregates01/totalChars@30::pc - IL_0022: switch ( + IL_001a: ldarg.0 + IL_001b: ldfld int32 Linq101Aggregates01/totalChars@30::pc + IL_0020: switch ( + IL_0037, IL_0039, IL_003b, - IL_003d, - IL_003f) - IL_0037: br.s IL_004d + IL_003d) + IL_0035: br.s IL_004b - IL_0039: br.s IL_0041 + IL_0037: br.s IL_003f - IL_003b: br.s IL_0044 + IL_0039: br.s IL_0042 - IL_003d: br.s IL_0047 + IL_003b: br.s IL_0045 - IL_003f: br.s IL_004a + IL_003d: br.s IL_0048 .line 100001,100001 : 0,0 '' - IL_0041: nop - IL_0042: br.s IL_0063 + IL_003f: nop + IL_0040: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_0044: nop - IL_0045: br.s IL_004f + IL_0042: nop + IL_0043: br.s IL_004d .line 100001,100001 : 0,0 '' - IL_0047: nop - IL_0048: br.s IL_004e + IL_0045: nop + IL_0046: br.s IL_004c .line 100001,100001 : 0,0 '' - IL_004a: nop - IL_004b: br.s IL_0063 + IL_0048: nop + IL_0049: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_004d: nop + IL_004b: nop .line 100001,100001 : 0,0 '' - IL_004e: nop - IL_004f: ldarg.0 - IL_0050: ldc.i4.3 - IL_0051: stfld int32 Linq101Aggregates01/totalChars@30::pc - IL_0056: ldarg.0 - IL_0057: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/totalChars@30::'enum' - IL_005c: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_0061: nop + IL_004c: nop + IL_004d: ldarg.0 + IL_004e: ldc.i4.3 + IL_004f: stfld int32 Linq101Aggregates01/totalChars@30::pc + IL_0054: ldarg.0 + IL_0055: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/totalChars@30::'enum' + IL_005a: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_005f: nop .line 100001,100001 : 0,0 '' - IL_0062: nop - IL_0063: ldarg.0 - IL_0064: ldc.i4.3 - IL_0065: stfld int32 Linq101Aggregates01/totalChars@30::pc - IL_006a: ldarg.0 - IL_006b: ldnull - IL_006c: stfld string Linq101Aggregates01/totalChars@30::current - IL_0071: ldnull - IL_0072: stloc.1 - IL_0073: leave.s IL_0081 + IL_0060: nop + IL_0061: ldarg.0 + IL_0062: ldc.i4.3 + IL_0063: stfld int32 Linq101Aggregates01/totalChars@30::pc + IL_0068: ldarg.0 + IL_0069: ldnull + IL_006a: stfld string Linq101Aggregates01/totalChars@30::current + IL_006f: ldnull + IL_0070: stloc.1 + IL_0071: leave.s IL_007f } // end .try catch [mscorlib]System.Object { - IL_0075: castclass [mscorlib]System.Exception - IL_007a: stloc.2 + IL_0073: castclass [mscorlib]System.Exception + IL_0078: stloc.2 .line 30,30 : 9,26 '' - IL_007b: ldloc.2 - IL_007c: stloc.0 - IL_007d: ldnull - IL_007e: stloc.1 - IL_007f: leave.s IL_0081 + IL_0079: ldloc.2 + IL_007a: stloc.0 + IL_007b: ldnull + IL_007c: stloc.1 + IL_007d: leave.s IL_007f .line 100001,100001 : 0,0 '' } // end handler - IL_0081: ldloc.1 - IL_0082: pop + IL_007f: ldloc.1 + IL_0080: pop .line 100001,100001 : 0,0 '' - IL_0083: nop - IL_0084: br IL_0002 + IL_0081: nop + IL_0082: br IL_0000 - IL_0089: ldloc.0 - IL_008a: ldnull - IL_008b: cgt.un - IL_008d: brfalse.s IL_0091 + IL_0087: ldloc.0 + IL_0088: ldnull + IL_0089: cgt.un + IL_008b: brfalse.s IL_008f - IL_008f: br.s IL_0093 + IL_008d: br.s IL_0091 - IL_0091: br.s IL_0095 + IL_008f: br.s IL_0093 .line 100001,100001 : 0,0 '' - IL_0093: ldloc.0 - IL_0094: throw + IL_0091: ldloc.0 + IL_0092: throw .line 100001,100001 : 0,0 '' - IL_0095: ret + IL_0093: ret } // end of method totalChars@30::Close .method public strict virtual instance bool @@ -1145,19 +1065,15 @@ { .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 ) - // Code size 11 (0xb) - .maxstack 9 + // Code size 9 (0x9) + .maxstack 8 IL_0000: ldnull - IL_0001: ldnull + IL_0001: ldc.i4.0 IL_0002: ldnull - IL_0003: ldc.i4.0 - IL_0004: ldnull - IL_0005: newobj instance void Linq101Aggregates01/totalChars@30::.ctor(string, - string, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0003: newobj instance void Linq101Aggregates01/totalChars@30::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, string) - IL_000a: ret + IL_0008: ret } // end of method totalChars@30::GetFreshEnumerator } // end of class totalChars@30 @@ -1293,11 +1209,6 @@ { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) .field public class [System.Core]System.Linq.IGrouping`2 g - .field public class [Utils]Utils/Product _arg3 - .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 ) - .field public class [Utils]Utils/Product x .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' .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 ) @@ -1312,42 +1223,36 @@ .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .method public specialname rtspecialname instance void .ctor(class [System.Core]System.Linq.IGrouping`2 g, - class [Utils]Utils/Product _arg3, - class [Utils]Utils/Product x, class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', int32 pc, class [Utils]Utils/Product current) cil managed { - // Code size 52 (0x34) + // Code size 36 (0x24) .maxstack 8 IL_0000: ldarg.0 IL_0001: ldarg.1 IL_0002: stfld class [System.Core]System.Linq.IGrouping`2 Linq101Aggregates01/sum@42::g IL_0007: ldarg.0 IL_0008: ldarg.2 - IL_0009: stfld class [Utils]Utils/Product Linq101Aggregates01/sum@42::_arg3 + IL_0009: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/sum@42::'enum' IL_000e: ldarg.0 IL_000f: ldarg.3 - IL_0010: stfld class [Utils]Utils/Product Linq101Aggregates01/sum@42::x + IL_0010: stfld int32 Linq101Aggregates01/sum@42::pc IL_0015: ldarg.0 - IL_0016: ldarg.s 'enum' - IL_0018: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/sum@42::'enum' + IL_0016: ldarg.s current + IL_0018: stfld class [Utils]Utils/Product Linq101Aggregates01/sum@42::current IL_001d: ldarg.0 - IL_001e: ldarg.s pc - IL_0020: stfld int32 Linq101Aggregates01/sum@42::pc - IL_0025: ldarg.0 - IL_0026: ldarg.s current - IL_0028: stfld class [Utils]Utils/Product Linq101Aggregates01/sum@42::current - IL_002d: ldarg.0 - IL_002e: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() - IL_0033: ret + IL_001e: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_0023: ret } // end of method sum@42::.ctor .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 192 (0xc0) + // Code size 155 (0x9b) .maxstack 6 + .locals init ([0] class [Utils]Utils/Product V_0, + [1] class [Utils]Utils/Product x) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 IL_0001: ldfld int32 Linq101Aggregates01/sum@42::pc @@ -1357,7 +1262,7 @@ IL_001b, IL_001d, IL_001f) - IL_0019: br.s IL_002d + IL_0019: br.s IL_002a IL_001b: br.s IL_0021 @@ -1367,204 +1272,191 @@ .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br.s IL_0096 + IL_0022: br.s IL_0071 .line 100001,100001 : 0,0 '' IL_0024: nop - IL_0025: br.s IL_0085 + IL_0025: br.s IL_006e .line 100001,100001 : 0,0 '' IL_0027: nop - IL_0028: br IL_00b7 + IL_0028: br.s IL_0092 .line 100001,100001 : 0,0 '' - IL_002d: nop + IL_002a: nop .line 42,42 : 13,26 '' - IL_002e: ldarg.0 - IL_002f: ldarg.0 - IL_0030: ldfld class [System.Core]System.Linq.IGrouping`2 Linq101Aggregates01/sum@42::g - IL_0035: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_003a: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/sum@42::'enum' - IL_003f: ldarg.0 - IL_0040: ldc.i4.1 - IL_0041: stfld int32 Linq101Aggregates01/sum@42::pc + IL_002b: ldarg.0 + IL_002c: ldarg.0 + IL_002d: ldfld class [System.Core]System.Linq.IGrouping`2 Linq101Aggregates01/sum@42::g + IL_0032: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0037: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/sum@42::'enum' + IL_003c: ldarg.0 + IL_003d: ldc.i4.1 + IL_003e: stfld int32 Linq101Aggregates01/sum@42::pc .line 42,42 : 13,26 '' - IL_0046: ldarg.0 - IL_0047: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/sum@42::'enum' - IL_004c: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0051: brfalse.s IL_0096 - - IL_0053: ldarg.0 - IL_0054: ldarg.0 - IL_0055: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/sum@42::'enum' - IL_005a: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_005f: stfld class [Utils]Utils/Product Linq101Aggregates01/sum@42::_arg3 + IL_0043: ldarg.0 + IL_0044: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/sum@42::'enum' + IL_0049: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_004e: brfalse.s IL_0071 + + IL_0050: ldarg.0 + IL_0051: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/sum@42::'enum' + IL_0056: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_005b: stloc.0 .line 42,42 : 13,26 '' - IL_0064: ldarg.0 - IL_0065: ldarg.0 - IL_0066: ldfld class [Utils]Utils/Product Linq101Aggregates01/sum@42::_arg3 - IL_006b: stfld class [Utils]Utils/Product Linq101Aggregates01/sum@42::x - IL_0070: ldarg.0 - IL_0071: ldc.i4.2 - IL_0072: stfld int32 Linq101Aggregates01/sum@42::pc + IL_005c: ldloc.0 + IL_005d: stloc.1 + IL_005e: ldarg.0 + IL_005f: ldc.i4.2 + IL_0060: stfld int32 Linq101Aggregates01/sum@42::pc .line 43,43 : 13,33 '' - IL_0077: ldarg.0 - IL_0078: ldarg.0 - IL_0079: ldfld class [Utils]Utils/Product Linq101Aggregates01/sum@42::x - IL_007e: stfld class [Utils]Utils/Product Linq101Aggregates01/sum@42::current - IL_0083: ldc.i4.1 - IL_0084: ret - - IL_0085: ldarg.0 - IL_0086: ldnull - IL_0087: stfld class [Utils]Utils/Product Linq101Aggregates01/sum@42::x - .line 42,42 : 13,26 '' - IL_008c: ldarg.0 - IL_008d: ldnull - IL_008e: stfld class [Utils]Utils/Product Linq101Aggregates01/sum@42::_arg3 + IL_0065: ldarg.0 + IL_0066: ldloc.1 + IL_0067: stfld class [Utils]Utils/Product Linq101Aggregates01/sum@42::current + IL_006c: ldc.i4.1 + IL_006d: ret + .line 100001,100001 : 0,0 '' - IL_0093: nop - IL_0094: br.s IL_0046 + IL_006e: nop + IL_006f: br.s IL_0043 - IL_0096: ldarg.0 - IL_0097: ldc.i4.3 - IL_0098: stfld int32 Linq101Aggregates01/sum@42::pc + IL_0071: ldarg.0 + IL_0072: ldc.i4.3 + IL_0073: stfld int32 Linq101Aggregates01/sum@42::pc .line 42,42 : 13,26 '' - IL_009d: ldarg.0 - IL_009e: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/sum@42::'enum' - IL_00a3: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_00a8: nop - IL_00a9: ldarg.0 - IL_00aa: ldnull - IL_00ab: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/sum@42::'enum' - IL_00b0: ldarg.0 - IL_00b1: ldc.i4.3 - IL_00b2: stfld int32 Linq101Aggregates01/sum@42::pc - IL_00b7: ldarg.0 - IL_00b8: ldnull - IL_00b9: stfld class [Utils]Utils/Product Linq101Aggregates01/sum@42::current - IL_00be: ldc.i4.0 - IL_00bf: ret + IL_0078: ldarg.0 + IL_0079: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/sum@42::'enum' + IL_007e: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0083: nop + IL_0084: ldarg.0 + IL_0085: ldnull + IL_0086: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/sum@42::'enum' + IL_008b: ldarg.0 + IL_008c: ldc.i4.3 + IL_008d: stfld int32 Linq101Aggregates01/sum@42::pc + IL_0092: ldarg.0 + IL_0093: ldnull + IL_0094: stfld class [Utils]Utils/Product Linq101Aggregates01/sum@42::current + IL_0099: ldc.i4.0 + IL_009a: ret } // end of method sum@42::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 150 (0x96) + // Code size 148 (0x94) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [FSharp.Core]Microsoft.FSharp.Core.Unit V_1, [2] class [mscorlib]System.Exception e) .line 100001,100001 : 0,0 '' - IL_0000: ldnull - IL_0001: stloc.0 - IL_0002: ldarg.0 - IL_0003: ldfld int32 Linq101Aggregates01/sum@42::pc - IL_0008: ldc.i4.3 - IL_0009: sub - IL_000a: switch ( - IL_0015) - IL_0013: br.s IL_001b + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Aggregates01/sum@42::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0019 .line 100001,100001 : 0,0 '' - IL_0015: nop - IL_0016: br IL_0089 + IL_0013: nop + IL_0014: br IL_0087 .line 100001,100001 : 0,0 '' - IL_001b: nop + IL_0019: nop .try { - IL_001c: ldarg.0 - IL_001d: ldfld int32 Linq101Aggregates01/sum@42::pc - IL_0022: switch ( + IL_001a: ldarg.0 + IL_001b: ldfld int32 Linq101Aggregates01/sum@42::pc + IL_0020: switch ( + IL_0037, IL_0039, IL_003b, - IL_003d, - IL_003f) - IL_0037: br.s IL_004d + IL_003d) + IL_0035: br.s IL_004b - IL_0039: br.s IL_0041 + IL_0037: br.s IL_003f - IL_003b: br.s IL_0044 + IL_0039: br.s IL_0042 - IL_003d: br.s IL_0047 + IL_003b: br.s IL_0045 - IL_003f: br.s IL_004a + IL_003d: br.s IL_0048 .line 100001,100001 : 0,0 '' - IL_0041: nop - IL_0042: br.s IL_0063 + IL_003f: nop + IL_0040: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_0044: nop - IL_0045: br.s IL_004f + IL_0042: nop + IL_0043: br.s IL_004d .line 100001,100001 : 0,0 '' - IL_0047: nop - IL_0048: br.s IL_004e + IL_0045: nop + IL_0046: br.s IL_004c .line 100001,100001 : 0,0 '' - IL_004a: nop - IL_004b: br.s IL_0063 + IL_0048: nop + IL_0049: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_004d: nop + IL_004b: nop .line 100001,100001 : 0,0 '' - IL_004e: nop - IL_004f: ldarg.0 - IL_0050: ldc.i4.3 - IL_0051: stfld int32 Linq101Aggregates01/sum@42::pc - IL_0056: ldarg.0 - IL_0057: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/sum@42::'enum' - IL_005c: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_0061: nop + IL_004c: nop + IL_004d: ldarg.0 + IL_004e: ldc.i4.3 + IL_004f: stfld int32 Linq101Aggregates01/sum@42::pc + IL_0054: ldarg.0 + IL_0055: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/sum@42::'enum' + IL_005a: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_005f: nop .line 100001,100001 : 0,0 '' - IL_0062: nop - IL_0063: ldarg.0 - IL_0064: ldc.i4.3 - IL_0065: stfld int32 Linq101Aggregates01/sum@42::pc - IL_006a: ldarg.0 - IL_006b: ldnull - IL_006c: stfld class [Utils]Utils/Product Linq101Aggregates01/sum@42::current - IL_0071: ldnull - IL_0072: stloc.1 - IL_0073: leave.s IL_0081 + IL_0060: nop + IL_0061: ldarg.0 + IL_0062: ldc.i4.3 + IL_0063: stfld int32 Linq101Aggregates01/sum@42::pc + IL_0068: ldarg.0 + IL_0069: ldnull + IL_006a: stfld class [Utils]Utils/Product Linq101Aggregates01/sum@42::current + IL_006f: ldnull + IL_0070: stloc.1 + IL_0071: leave.s IL_007f } // end .try catch [mscorlib]System.Object { - IL_0075: castclass [mscorlib]System.Exception - IL_007a: stloc.2 + IL_0073: castclass [mscorlib]System.Exception + IL_0078: stloc.2 .line 42,42 : 13,26 '' - IL_007b: ldloc.2 - IL_007c: stloc.0 - IL_007d: ldnull - IL_007e: stloc.1 - IL_007f: leave.s IL_0081 + IL_0079: ldloc.2 + IL_007a: stloc.0 + IL_007b: ldnull + IL_007c: stloc.1 + IL_007d: leave.s IL_007f .line 100001,100001 : 0,0 '' } // end handler - IL_0081: ldloc.1 - IL_0082: pop + IL_007f: ldloc.1 + IL_0080: pop .line 100001,100001 : 0,0 '' - IL_0083: nop - IL_0084: br IL_0002 + IL_0081: nop + IL_0082: br IL_0000 - IL_0089: ldloc.0 - IL_008a: ldnull - IL_008b: cgt.un - IL_008d: brfalse.s IL_0091 + IL_0087: ldloc.0 + IL_0088: ldnull + IL_0089: cgt.un + IL_008b: brfalse.s IL_008f - IL_008f: br.s IL_0093 + IL_008d: br.s IL_0091 - IL_0091: br.s IL_0095 + IL_008f: br.s IL_0093 .line 100001,100001 : 0,0 '' - IL_0093: ldloc.0 - IL_0094: throw + IL_0091: ldloc.0 + IL_0092: throw .line 100001,100001 : 0,0 '' - IL_0095: ret + IL_0093: ret } // end of method sum@42::Close .method public strict virtual instance bool @@ -1635,22 +1527,18 @@ { .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 ) - // Code size 17 (0x11) - .maxstack 10 + // Code size 15 (0xf) + .maxstack 8 IL_0000: ldarg.0 IL_0001: ldfld class [System.Core]System.Linq.IGrouping`2 Linq101Aggregates01/sum@42::g IL_0006: ldnull - IL_0007: ldnull + IL_0007: ldc.i4.0 IL_0008: ldnull - IL_0009: ldc.i4.0 - IL_000a: ldnull - IL_000b: newobj instance void Linq101Aggregates01/sum@42::.ctor(class [System.Core]System.Linq.IGrouping`2, - class [Utils]Utils/Product, - class [Utils]Utils/Product, + IL_0009: newobj instance void Linq101Aggregates01/sum@42::.ctor(class [System.Core]System.Linq.IGrouping`2, class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, class [Utils]Utils/Product) - IL_0010: ret + IL_000e: ret } // end of method sum@42::GetFreshEnumerator } // end of class sum@42 @@ -1709,8 +1597,8 @@ .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,int32>,object> Invoke(class [System.Core]System.Linq.IGrouping`2 _arg2) cil managed { - // Code size 147 (0x93) - .maxstack 10 + // Code size 145 (0x91) + .maxstack 8 .locals init ([0] class [System.Core]System.Linq.IGrouping`2 g, [1] int32 sum, [2] class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder V_2, @@ -1731,87 +1619,83 @@ IL_0009: stloc.3 IL_000a: ldloc.0 IL_000b: ldnull - IL_000c: ldnull + IL_000c: ldc.i4.0 IL_000d: ldnull - IL_000e: ldc.i4.0 - IL_000f: ldnull - IL_0010: newobj instance void Linq101Aggregates01/sum@42::.ctor(class [System.Core]System.Linq.IGrouping`2, - class [Utils]Utils/Product, - class [Utils]Utils/Product, + IL_000e: newobj instance void Linq101Aggregates01/sum@42::.ctor(class [System.Core]System.Linq.IGrouping`2, class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, class [Utils]Utils/Product) - IL_0015: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_001a: stloc.s V_4 - IL_001c: newobj instance void Linq101Aggregates01/'sum@43-1'::.ctor() - IL_0021: stloc.s V_5 - IL_0023: ldloc.s V_4 - IL_0025: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() - IL_002a: stloc.s V_6 - IL_002c: ldloc.s V_6 - IL_002e: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0033: stloc.s V_7 + IL_0013: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0018: stloc.s V_4 + IL_001a: newobj instance void Linq101Aggregates01/'sum@43-1'::.ctor() + IL_001f: stloc.s V_5 + IL_0021: ldloc.s V_4 + IL_0023: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() + IL_0028: stloc.s V_6 + IL_002a: ldloc.s V_6 + IL_002c: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0031: stloc.s V_7 .try { - IL_0035: ldc.i4.0 - IL_0036: stloc.s V_9 - IL_0038: ldloc.s V_7 - IL_003a: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_003f: brfalse.s IL_0057 + IL_0033: ldc.i4.0 + IL_0034: stloc.s V_9 + IL_0036: ldloc.s V_7 + IL_0038: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_003d: brfalse.s IL_0055 .line 43,43 : 13,33 '' - IL_0041: ldloc.s V_9 - IL_0043: ldloc.s V_5 - IL_0045: ldloc.s V_7 - IL_0047: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_004c: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0051: add.ovf - IL_0052: stloc.s V_9 + IL_003f: ldloc.s V_9 + IL_0041: ldloc.s V_5 + IL_0043: ldloc.s V_7 + IL_0045: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_004a: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_004f: add.ovf + IL_0050: stloc.s V_9 .line 100001,100001 : 0,0 '' - IL_0054: nop - IL_0055: br.s IL_0038 + IL_0052: nop + IL_0053: br.s IL_0036 - IL_0057: ldloc.s V_9 - IL_0059: stloc.s V_8 - IL_005b: leave.s IL_007b + IL_0055: ldloc.s V_9 + IL_0057: stloc.s V_8 + IL_0059: leave.s IL_0079 } // end .try finally { - IL_005d: ldloc.s V_7 - IL_005f: isinst [mscorlib]System.IDisposable - IL_0064: stloc.s V_10 - IL_0066: ldloc.s V_10 - IL_0068: brfalse.s IL_006c + IL_005b: ldloc.s V_7 + IL_005d: isinst [mscorlib]System.IDisposable + IL_0062: stloc.s V_10 + IL_0064: ldloc.s V_10 + IL_0066: brfalse.s IL_006a - IL_006a: br.s IL_006e + IL_0068: br.s IL_006c - IL_006c: br.s IL_0078 + IL_006a: br.s IL_0076 .line 100001,100001 : 0,0 '' - IL_006e: ldloc.s V_10 - IL_0070: callvirt instance void [mscorlib]System.IDisposable::Dispose() - IL_0075: ldnull - IL_0076: pop - IL_0077: endfinally + IL_006c: ldloc.s V_10 + IL_006e: callvirt instance void [mscorlib]System.IDisposable::Dispose() + IL_0073: ldnull + IL_0074: pop + IL_0075: endfinally .line 100001,100001 : 0,0 '' - IL_0078: ldnull - IL_0079: pop - IL_007a: endfinally + IL_0076: ldnull + IL_0077: pop + IL_0078: endfinally .line 100001,100001 : 0,0 '' } // end handler - IL_007b: ldloc.s V_8 - IL_007d: stloc.1 + IL_0079: ldloc.s V_8 + IL_007b: stloc.1 .line 45,45 : 9,28 '' - IL_007e: ldarg.0 - IL_007f: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Aggregates01/'categories@40-3'::builder@ - IL_0084: ldloc.0 - IL_0085: ldloc.1 - IL_0086: newobj instance void class [mscorlib]System.Tuple`2,int32>::.ctor(!0, + IL_007c: ldarg.0 + IL_007d: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Aggregates01/'categories@40-3'::builder@ + IL_0082: ldloc.0 + IL_0083: ldloc.1 + IL_0084: newobj instance void class [mscorlib]System.Tuple`2,int32>::.ctor(!0, !1) - IL_008b: tail. - IL_008d: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Yield,int32>,object>(!!0) - IL_0092: ret + IL_0089: tail. + IL_008b: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Yield,int32>,object>(!!0) + IL_0090: ret } // end of method 'categories@40-3'::Invoke } // end of class 'categories@40-3' @@ -1860,11 +1744,6 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) - .field public int32 _arg1 - .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 ) - .field public int32 n .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' .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 ) @@ -1878,39 +1757,33 @@ .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 specialname rtspecialname - instance void .ctor(int32 _arg1, - int32 n, - class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', int32 pc, int32 current) cil managed { - // Code size 44 (0x2c) + // Code size 28 (0x1c) .maxstack 8 IL_0000: ldarg.0 IL_0001: ldarg.1 - IL_0002: stfld int32 Linq101Aggregates01/minNum@49::_arg1 + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/minNum@49::'enum' IL_0007: ldarg.0 IL_0008: ldarg.2 - IL_0009: stfld int32 Linq101Aggregates01/minNum@49::n + IL_0009: stfld int32 Linq101Aggregates01/minNum@49::pc IL_000e: ldarg.0 IL_000f: ldarg.3 - IL_0010: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/minNum@49::'enum' + IL_0010: stfld int32 Linq101Aggregates01/minNum@49::current IL_0015: ldarg.0 - IL_0016: ldarg.s pc - IL_0018: stfld int32 Linq101Aggregates01/minNum@49::pc - IL_001d: ldarg.0 - IL_001e: ldarg.s current - IL_0020: stfld int32 Linq101Aggregates01/minNum@49::current - IL_0025: ldarg.0 - IL_0026: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() - IL_002b: ret + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_001b: ret } // end of method minNum@49::.ctor .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 191 (0xbf) + // Code size 154 (0x9a) .maxstack 6 + .locals init ([0] int32 V_0, + [1] int32 n) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 IL_0001: ldfld int32 Linq101Aggregates01/minNum@49::pc @@ -1920,7 +1793,7 @@ IL_001b, IL_001d, IL_001f) - IL_0019: br.s IL_002d + IL_0019: br.s IL_002a IL_001b: br.s IL_0021 @@ -1930,203 +1803,190 @@ .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br.s IL_0095 + IL_0022: br.s IL_0070 .line 100001,100001 : 0,0 '' IL_0024: nop - IL_0025: br.s IL_0084 + IL_0025: br.s IL_006d .line 100001,100001 : 0,0 '' IL_0027: nop - IL_0028: br IL_00b6 + IL_0028: br.s IL_0091 .line 100001,100001 : 0,0 '' - IL_002d: nop + IL_002a: nop .line 49,49 : 22,41 '' - IL_002e: ldarg.0 - IL_002f: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_numbers() - IL_0034: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0039: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/minNum@49::'enum' - IL_003e: ldarg.0 - IL_003f: ldc.i4.1 - IL_0040: stfld int32 Linq101Aggregates01/minNum@49::pc + IL_002b: ldarg.0 + IL_002c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_numbers() + IL_0031: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0036: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/minNum@49::'enum' + IL_003b: ldarg.0 + IL_003c: ldc.i4.1 + IL_003d: stfld int32 Linq101Aggregates01/minNum@49::pc .line 49,49 : 22,41 '' - IL_0045: ldarg.0 - IL_0046: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/minNum@49::'enum' - IL_004b: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0050: brfalse.s IL_0095 - - IL_0052: ldarg.0 - IL_0053: ldarg.0 - IL_0054: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/minNum@49::'enum' - IL_0059: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_005e: stfld int32 Linq101Aggregates01/minNum@49::_arg1 + IL_0042: ldarg.0 + IL_0043: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/minNum@49::'enum' + IL_0048: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_004d: brfalse.s IL_0070 + + IL_004f: ldarg.0 + IL_0050: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/minNum@49::'enum' + IL_0055: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_005a: stloc.0 .line 49,49 : 22,41 '' - IL_0063: ldarg.0 - IL_0064: ldarg.0 - IL_0065: ldfld int32 Linq101Aggregates01/minNum@49::_arg1 - IL_006a: stfld int32 Linq101Aggregates01/minNum@49::n - IL_006f: ldarg.0 - IL_0070: ldc.i4.2 - IL_0071: stfld int32 Linq101Aggregates01/minNum@49::pc + IL_005b: ldloc.0 + IL_005c: stloc.1 + IL_005d: ldarg.0 + IL_005e: ldc.i4.2 + IL_005f: stfld int32 Linq101Aggregates01/minNum@49::pc .line 49,49 : 42,49 '' - IL_0076: ldarg.0 - IL_0077: ldarg.0 - IL_0078: ldfld int32 Linq101Aggregates01/minNum@49::n - IL_007d: stfld int32 Linq101Aggregates01/minNum@49::current - IL_0082: ldc.i4.1 - IL_0083: ret + IL_0064: ldarg.0 + IL_0065: ldloc.1 + IL_0066: stfld int32 Linq101Aggregates01/minNum@49::current + IL_006b: ldc.i4.1 + IL_006c: ret - IL_0084: ldarg.0 - IL_0085: ldc.i4.0 - IL_0086: stfld int32 Linq101Aggregates01/minNum@49::n - .line 49,49 : 22,41 '' - IL_008b: ldarg.0 - IL_008c: ldc.i4.0 - IL_008d: stfld int32 Linq101Aggregates01/minNum@49::_arg1 .line 100001,100001 : 0,0 '' - IL_0092: nop - IL_0093: br.s IL_0045 + IL_006d: nop + IL_006e: br.s IL_0042 - IL_0095: ldarg.0 - IL_0096: ldc.i4.3 - IL_0097: stfld int32 Linq101Aggregates01/minNum@49::pc + IL_0070: ldarg.0 + IL_0071: ldc.i4.3 + IL_0072: stfld int32 Linq101Aggregates01/minNum@49::pc .line 49,49 : 22,41 '' - IL_009c: ldarg.0 - IL_009d: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/minNum@49::'enum' - IL_00a2: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_00a7: nop - IL_00a8: ldarg.0 - IL_00a9: ldnull - IL_00aa: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/minNum@49::'enum' - IL_00af: ldarg.0 - IL_00b0: ldc.i4.3 - IL_00b1: stfld int32 Linq101Aggregates01/minNum@49::pc - IL_00b6: ldarg.0 - IL_00b7: ldc.i4.0 - IL_00b8: stfld int32 Linq101Aggregates01/minNum@49::current - IL_00bd: ldc.i4.0 - IL_00be: ret + IL_0077: ldarg.0 + IL_0078: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/minNum@49::'enum' + IL_007d: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0082: nop + IL_0083: ldarg.0 + IL_0084: ldnull + IL_0085: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/minNum@49::'enum' + IL_008a: ldarg.0 + IL_008b: ldc.i4.3 + IL_008c: stfld int32 Linq101Aggregates01/minNum@49::pc + IL_0091: ldarg.0 + IL_0092: ldc.i4.0 + IL_0093: stfld int32 Linq101Aggregates01/minNum@49::current + IL_0098: ldc.i4.0 + IL_0099: ret } // end of method minNum@49::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 150 (0x96) + // Code size 148 (0x94) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [FSharp.Core]Microsoft.FSharp.Core.Unit V_1, [2] class [mscorlib]System.Exception e) .line 100001,100001 : 0,0 '' - IL_0000: ldnull - IL_0001: stloc.0 - IL_0002: ldarg.0 - IL_0003: ldfld int32 Linq101Aggregates01/minNum@49::pc - IL_0008: ldc.i4.3 - IL_0009: sub - IL_000a: switch ( - IL_0015) - IL_0013: br.s IL_001b + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Aggregates01/minNum@49::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0019 .line 100001,100001 : 0,0 '' - IL_0015: nop - IL_0016: br IL_0089 + IL_0013: nop + IL_0014: br IL_0087 .line 100001,100001 : 0,0 '' - IL_001b: nop + IL_0019: nop .try { - IL_001c: ldarg.0 - IL_001d: ldfld int32 Linq101Aggregates01/minNum@49::pc - IL_0022: switch ( + IL_001a: ldarg.0 + IL_001b: ldfld int32 Linq101Aggregates01/minNum@49::pc + IL_0020: switch ( + IL_0037, IL_0039, IL_003b, - IL_003d, - IL_003f) - IL_0037: br.s IL_004d + IL_003d) + IL_0035: br.s IL_004b - IL_0039: br.s IL_0041 + IL_0037: br.s IL_003f - IL_003b: br.s IL_0044 + IL_0039: br.s IL_0042 - IL_003d: br.s IL_0047 + IL_003b: br.s IL_0045 - IL_003f: br.s IL_004a + IL_003d: br.s IL_0048 .line 100001,100001 : 0,0 '' - IL_0041: nop - IL_0042: br.s IL_0063 + IL_003f: nop + IL_0040: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_0044: nop - IL_0045: br.s IL_004f + IL_0042: nop + IL_0043: br.s IL_004d .line 100001,100001 : 0,0 '' - IL_0047: nop - IL_0048: br.s IL_004e + IL_0045: nop + IL_0046: br.s IL_004c .line 100001,100001 : 0,0 '' - IL_004a: nop - IL_004b: br.s IL_0063 + IL_0048: nop + IL_0049: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_004d: nop + IL_004b: nop .line 100001,100001 : 0,0 '' - IL_004e: nop - IL_004f: ldarg.0 - IL_0050: ldc.i4.3 - IL_0051: stfld int32 Linq101Aggregates01/minNum@49::pc - IL_0056: ldarg.0 - IL_0057: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/minNum@49::'enum' - IL_005c: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_0061: nop + IL_004c: nop + IL_004d: ldarg.0 + IL_004e: ldc.i4.3 + IL_004f: stfld int32 Linq101Aggregates01/minNum@49::pc + IL_0054: ldarg.0 + IL_0055: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/minNum@49::'enum' + IL_005a: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_005f: nop .line 100001,100001 : 0,0 '' - IL_0062: nop - IL_0063: ldarg.0 - IL_0064: ldc.i4.3 - IL_0065: stfld int32 Linq101Aggregates01/minNum@49::pc - IL_006a: ldarg.0 - IL_006b: ldc.i4.0 - IL_006c: stfld int32 Linq101Aggregates01/minNum@49::current - IL_0071: ldnull - IL_0072: stloc.1 - IL_0073: leave.s IL_0081 + IL_0060: nop + IL_0061: ldarg.0 + IL_0062: ldc.i4.3 + IL_0063: stfld int32 Linq101Aggregates01/minNum@49::pc + IL_0068: ldarg.0 + IL_0069: ldc.i4.0 + IL_006a: stfld int32 Linq101Aggregates01/minNum@49::current + IL_006f: ldnull + IL_0070: stloc.1 + IL_0071: leave.s IL_007f } // end .try catch [mscorlib]System.Object { - IL_0075: castclass [mscorlib]System.Exception - IL_007a: stloc.2 + IL_0073: castclass [mscorlib]System.Exception + IL_0078: stloc.2 .line 49,49 : 22,41 '' - IL_007b: ldloc.2 - IL_007c: stloc.0 - IL_007d: ldnull - IL_007e: stloc.1 - IL_007f: leave.s IL_0081 + IL_0079: ldloc.2 + IL_007a: stloc.0 + IL_007b: ldnull + IL_007c: stloc.1 + IL_007d: leave.s IL_007f .line 100001,100001 : 0,0 '' } // end handler - IL_0081: ldloc.1 - IL_0082: pop + IL_007f: ldloc.1 + IL_0080: pop .line 100001,100001 : 0,0 '' - IL_0083: nop - IL_0084: br IL_0002 + IL_0081: nop + IL_0082: br IL_0000 - IL_0089: ldloc.0 - IL_008a: ldnull - IL_008b: cgt.un - IL_008d: brfalse.s IL_0091 + IL_0087: ldloc.0 + IL_0088: ldnull + IL_0089: cgt.un + IL_008b: brfalse.s IL_008f - IL_008f: br.s IL_0093 + IL_008d: br.s IL_0091 - IL_0091: br.s IL_0095 + IL_008f: br.s IL_0093 .line 100001,100001 : 0,0 '' - IL_0093: ldloc.0 - IL_0094: throw + IL_0091: ldloc.0 + IL_0092: throw .line 100001,100001 : 0,0 '' - IL_0095: ret + IL_0093: ret } // end of method minNum@49::Close .method public strict virtual instance bool @@ -2197,19 +2057,15 @@ { .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 ) - // Code size 11 (0xb) - .maxstack 9 - IL_0000: ldc.i4.0 + // Code size 9 (0x9) + .maxstack 8 + IL_0000: ldnull IL_0001: ldc.i4.0 - IL_0002: ldnull - IL_0003: ldc.i4.0 - IL_0004: ldc.i4.0 - IL_0005: newobj instance void Linq101Aggregates01/minNum@49::.ctor(int32, - int32, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0002: ldc.i4.0 + IL_0003: newobj instance void Linq101Aggregates01/minNum@49::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, int32) - IL_000a: ret + IL_0008: ret } // end of method minNum@49::GetFreshEnumerator } // end of class minNum@49 @@ -2245,11 +2101,6 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) - .field public string _arg1 - .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 ) - .field public string w .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' .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 ) @@ -2263,39 +2114,33 @@ .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 specialname rtspecialname - instance void .ctor(string _arg1, - string w, - class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', int32 pc, string current) cil managed { - // Code size 44 (0x2c) + // Code size 28 (0x1c) .maxstack 8 IL_0000: ldarg.0 IL_0001: ldarg.1 - IL_0002: stfld string Linq101Aggregates01/shortestWord@52::_arg1 + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/shortestWord@52::'enum' IL_0007: ldarg.0 IL_0008: ldarg.2 - IL_0009: stfld string Linq101Aggregates01/shortestWord@52::w + IL_0009: stfld int32 Linq101Aggregates01/shortestWord@52::pc IL_000e: ldarg.0 IL_000f: ldarg.3 - IL_0010: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/shortestWord@52::'enum' + IL_0010: stfld string Linq101Aggregates01/shortestWord@52::current IL_0015: ldarg.0 - IL_0016: ldarg.s pc - IL_0018: stfld int32 Linq101Aggregates01/shortestWord@52::pc - IL_001d: ldarg.0 - IL_001e: ldarg.s current - IL_0020: stfld string Linq101Aggregates01/shortestWord@52::current - IL_0025: ldarg.0 - IL_0026: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() - IL_002b: ret + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_001b: ret } // end of method shortestWord@52::.ctor .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 191 (0xbf) + // Code size 154 (0x9a) .maxstack 6 + .locals init ([0] string V_0, + [1] string w) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 IL_0001: ldfld int32 Linq101Aggregates01/shortestWord@52::pc @@ -2305,7 +2150,7 @@ IL_001b, IL_001d, IL_001f) - IL_0019: br.s IL_002d + IL_0019: br.s IL_002a IL_001b: br.s IL_0021 @@ -2315,203 +2160,190 @@ .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br.s IL_0095 + IL_0022: br.s IL_0070 .line 100001,100001 : 0,0 '' IL_0024: nop - IL_0025: br.s IL_0084 + IL_0025: br.s IL_006d .line 100001,100001 : 0,0 '' IL_0027: nop - IL_0028: br IL_00b6 + IL_0028: br.s IL_0091 .line 100001,100001 : 0,0 '' - IL_002d: nop + IL_002a: nop .line 52,52 : 28,45 '' - IL_002e: ldarg.0 - IL_002f: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_words() - IL_0034: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0039: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/shortestWord@52::'enum' - IL_003e: ldarg.0 - IL_003f: ldc.i4.1 - IL_0040: stfld int32 Linq101Aggregates01/shortestWord@52::pc + IL_002b: ldarg.0 + IL_002c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_words() + IL_0031: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0036: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/shortestWord@52::'enum' + IL_003b: ldarg.0 + IL_003c: ldc.i4.1 + IL_003d: stfld int32 Linq101Aggregates01/shortestWord@52::pc .line 52,52 : 28,45 '' - IL_0045: ldarg.0 - IL_0046: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/shortestWord@52::'enum' - IL_004b: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0050: brfalse.s IL_0095 - - IL_0052: ldarg.0 - IL_0053: ldarg.0 - IL_0054: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/shortestWord@52::'enum' - IL_0059: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_005e: stfld string Linq101Aggregates01/shortestWord@52::_arg1 + IL_0042: ldarg.0 + IL_0043: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/shortestWord@52::'enum' + IL_0048: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_004d: brfalse.s IL_0070 + + IL_004f: ldarg.0 + IL_0050: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/shortestWord@52::'enum' + IL_0055: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_005a: stloc.0 .line 52,52 : 28,45 '' - IL_0063: ldarg.0 - IL_0064: ldarg.0 - IL_0065: ldfld string Linq101Aggregates01/shortestWord@52::_arg1 - IL_006a: stfld string Linq101Aggregates01/shortestWord@52::w - IL_006f: ldarg.0 - IL_0070: ldc.i4.2 - IL_0071: stfld int32 Linq101Aggregates01/shortestWord@52::pc + IL_005b: ldloc.0 + IL_005c: stloc.1 + IL_005d: ldarg.0 + IL_005e: ldc.i4.2 + IL_005f: stfld int32 Linq101Aggregates01/shortestWord@52::pc .line 52,52 : 46,60 '' - IL_0076: ldarg.0 - IL_0077: ldarg.0 - IL_0078: ldfld string Linq101Aggregates01/shortestWord@52::w - IL_007d: stfld string Linq101Aggregates01/shortestWord@52::current - IL_0082: ldc.i4.1 - IL_0083: ret + IL_0064: ldarg.0 + IL_0065: ldloc.1 + IL_0066: stfld string Linq101Aggregates01/shortestWord@52::current + IL_006b: ldc.i4.1 + IL_006c: ret - IL_0084: ldarg.0 - IL_0085: ldnull - IL_0086: stfld string Linq101Aggregates01/shortestWord@52::w - .line 52,52 : 28,45 '' - IL_008b: ldarg.0 - IL_008c: ldnull - IL_008d: stfld string Linq101Aggregates01/shortestWord@52::_arg1 .line 100001,100001 : 0,0 '' - IL_0092: nop - IL_0093: br.s IL_0045 + IL_006d: nop + IL_006e: br.s IL_0042 - IL_0095: ldarg.0 - IL_0096: ldc.i4.3 - IL_0097: stfld int32 Linq101Aggregates01/shortestWord@52::pc + IL_0070: ldarg.0 + IL_0071: ldc.i4.3 + IL_0072: stfld int32 Linq101Aggregates01/shortestWord@52::pc .line 52,52 : 28,45 '' - IL_009c: ldarg.0 - IL_009d: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/shortestWord@52::'enum' - IL_00a2: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_00a7: nop - IL_00a8: ldarg.0 - IL_00a9: ldnull - IL_00aa: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/shortestWord@52::'enum' - IL_00af: ldarg.0 - IL_00b0: ldc.i4.3 - IL_00b1: stfld int32 Linq101Aggregates01/shortestWord@52::pc - IL_00b6: ldarg.0 - IL_00b7: ldnull - IL_00b8: stfld string Linq101Aggregates01/shortestWord@52::current - IL_00bd: ldc.i4.0 - IL_00be: ret + IL_0077: ldarg.0 + IL_0078: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/shortestWord@52::'enum' + IL_007d: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0082: nop + IL_0083: ldarg.0 + IL_0084: ldnull + IL_0085: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/shortestWord@52::'enum' + IL_008a: ldarg.0 + IL_008b: ldc.i4.3 + IL_008c: stfld int32 Linq101Aggregates01/shortestWord@52::pc + IL_0091: ldarg.0 + IL_0092: ldnull + IL_0093: stfld string Linq101Aggregates01/shortestWord@52::current + IL_0098: ldc.i4.0 + IL_0099: ret } // end of method shortestWord@52::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 150 (0x96) + // Code size 148 (0x94) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [FSharp.Core]Microsoft.FSharp.Core.Unit V_1, [2] class [mscorlib]System.Exception e) .line 100001,100001 : 0,0 '' - IL_0000: ldnull - IL_0001: stloc.0 - IL_0002: ldarg.0 - IL_0003: ldfld int32 Linq101Aggregates01/shortestWord@52::pc - IL_0008: ldc.i4.3 - IL_0009: sub - IL_000a: switch ( - IL_0015) - IL_0013: br.s IL_001b + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Aggregates01/shortestWord@52::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0019 .line 100001,100001 : 0,0 '' - IL_0015: nop - IL_0016: br IL_0089 + IL_0013: nop + IL_0014: br IL_0087 .line 100001,100001 : 0,0 '' - IL_001b: nop + IL_0019: nop .try { - IL_001c: ldarg.0 - IL_001d: ldfld int32 Linq101Aggregates01/shortestWord@52::pc - IL_0022: switch ( + IL_001a: ldarg.0 + IL_001b: ldfld int32 Linq101Aggregates01/shortestWord@52::pc + IL_0020: switch ( + IL_0037, IL_0039, IL_003b, - IL_003d, - IL_003f) - IL_0037: br.s IL_004d + IL_003d) + IL_0035: br.s IL_004b - IL_0039: br.s IL_0041 + IL_0037: br.s IL_003f - IL_003b: br.s IL_0044 + IL_0039: br.s IL_0042 - IL_003d: br.s IL_0047 + IL_003b: br.s IL_0045 - IL_003f: br.s IL_004a + IL_003d: br.s IL_0048 .line 100001,100001 : 0,0 '' - IL_0041: nop - IL_0042: br.s IL_0063 + IL_003f: nop + IL_0040: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_0044: nop - IL_0045: br.s IL_004f + IL_0042: nop + IL_0043: br.s IL_004d .line 100001,100001 : 0,0 '' - IL_0047: nop - IL_0048: br.s IL_004e + IL_0045: nop + IL_0046: br.s IL_004c .line 100001,100001 : 0,0 '' - IL_004a: nop - IL_004b: br.s IL_0063 + IL_0048: nop + IL_0049: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_004d: nop + IL_004b: nop .line 100001,100001 : 0,0 '' - IL_004e: nop - IL_004f: ldarg.0 - IL_0050: ldc.i4.3 - IL_0051: stfld int32 Linq101Aggregates01/shortestWord@52::pc - IL_0056: ldarg.0 - IL_0057: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/shortestWord@52::'enum' - IL_005c: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_0061: nop + IL_004c: nop + IL_004d: ldarg.0 + IL_004e: ldc.i4.3 + IL_004f: stfld int32 Linq101Aggregates01/shortestWord@52::pc + IL_0054: ldarg.0 + IL_0055: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/shortestWord@52::'enum' + IL_005a: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_005f: nop .line 100001,100001 : 0,0 '' - IL_0062: nop - IL_0063: ldarg.0 - IL_0064: ldc.i4.3 - IL_0065: stfld int32 Linq101Aggregates01/shortestWord@52::pc - IL_006a: ldarg.0 - IL_006b: ldnull - IL_006c: stfld string Linq101Aggregates01/shortestWord@52::current - IL_0071: ldnull - IL_0072: stloc.1 - IL_0073: leave.s IL_0081 + IL_0060: nop + IL_0061: ldarg.0 + IL_0062: ldc.i4.3 + IL_0063: stfld int32 Linq101Aggregates01/shortestWord@52::pc + IL_0068: ldarg.0 + IL_0069: ldnull + IL_006a: stfld string Linq101Aggregates01/shortestWord@52::current + IL_006f: ldnull + IL_0070: stloc.1 + IL_0071: leave.s IL_007f } // end .try catch [mscorlib]System.Object { - IL_0075: castclass [mscorlib]System.Exception - IL_007a: stloc.2 + IL_0073: castclass [mscorlib]System.Exception + IL_0078: stloc.2 .line 52,52 : 28,45 '' - IL_007b: ldloc.2 - IL_007c: stloc.0 - IL_007d: ldnull - IL_007e: stloc.1 - IL_007f: leave.s IL_0081 + IL_0079: ldloc.2 + IL_007a: stloc.0 + IL_007b: ldnull + IL_007c: stloc.1 + IL_007d: leave.s IL_007f .line 100001,100001 : 0,0 '' } // end handler - IL_0081: ldloc.1 - IL_0082: pop + IL_007f: ldloc.1 + IL_0080: pop .line 100001,100001 : 0,0 '' - IL_0083: nop - IL_0084: br IL_0002 + IL_0081: nop + IL_0082: br IL_0000 - IL_0089: ldloc.0 - IL_008a: ldnull - IL_008b: cgt.un - IL_008d: brfalse.s IL_0091 + IL_0087: ldloc.0 + IL_0088: ldnull + IL_0089: cgt.un + IL_008b: brfalse.s IL_008f - IL_008f: br.s IL_0093 + IL_008d: br.s IL_0091 - IL_0091: br.s IL_0095 + IL_008f: br.s IL_0093 .line 100001,100001 : 0,0 '' - IL_0093: ldloc.0 - IL_0094: throw + IL_0091: ldloc.0 + IL_0092: throw .line 100001,100001 : 0,0 '' - IL_0095: ret + IL_0093: ret } // end of method shortestWord@52::Close .method public strict virtual instance bool @@ -2582,19 +2414,15 @@ { .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 ) - // Code size 11 (0xb) - .maxstack 9 + // Code size 9 (0x9) + .maxstack 8 IL_0000: ldnull - IL_0001: ldnull + IL_0001: ldc.i4.0 IL_0002: ldnull - IL_0003: ldc.i4.0 - IL_0004: ldnull - IL_0005: newobj instance void Linq101Aggregates01/shortestWord@52::.ctor(string, - string, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0003: newobj instance void Linq101Aggregates01/shortestWord@52::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, string) - IL_000a: ret + IL_0008: ret } // end of method shortestWord@52::GetFreshEnumerator } // end of class shortestWord@52 @@ -2730,11 +2558,6 @@ { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) .field public class [System.Core]System.Linq.IGrouping`2 g - .field public class [Utils]Utils/Product _arg3 - .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 ) - .field public class [Utils]Utils/Product x .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' .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 ) @@ -2749,42 +2572,36 @@ .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .method public specialname rtspecialname instance void .ctor(class [System.Core]System.Linq.IGrouping`2 g, - class [Utils]Utils/Product _arg3, - class [Utils]Utils/Product x, class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', int32 pc, class [Utils]Utils/Product current) cil managed { - // Code size 52 (0x34) + // Code size 36 (0x24) .maxstack 8 IL_0000: ldarg.0 IL_0001: ldarg.1 IL_0002: stfld class [System.Core]System.Linq.IGrouping`2 Linq101Aggregates01/min@59::g IL_0007: ldarg.0 IL_0008: ldarg.2 - IL_0009: stfld class [Utils]Utils/Product Linq101Aggregates01/min@59::_arg3 + IL_0009: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/min@59::'enum' IL_000e: ldarg.0 IL_000f: ldarg.3 - IL_0010: stfld class [Utils]Utils/Product Linq101Aggregates01/min@59::x + IL_0010: stfld int32 Linq101Aggregates01/min@59::pc IL_0015: ldarg.0 - IL_0016: ldarg.s 'enum' - IL_0018: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/min@59::'enum' + IL_0016: ldarg.s current + IL_0018: stfld class [Utils]Utils/Product Linq101Aggregates01/min@59::current IL_001d: ldarg.0 - IL_001e: ldarg.s pc - IL_0020: stfld int32 Linq101Aggregates01/min@59::pc - IL_0025: ldarg.0 - IL_0026: ldarg.s current - IL_0028: stfld class [Utils]Utils/Product Linq101Aggregates01/min@59::current - IL_002d: ldarg.0 - IL_002e: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() - IL_0033: ret + IL_001e: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_0023: ret } // end of method min@59::.ctor .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 192 (0xc0) + // Code size 155 (0x9b) .maxstack 6 + .locals init ([0] class [Utils]Utils/Product V_0, + [1] class [Utils]Utils/Product x) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 IL_0001: ldfld int32 Linq101Aggregates01/min@59::pc @@ -2794,7 +2611,7 @@ IL_001b, IL_001d, IL_001f) - IL_0019: br.s IL_002d + IL_0019: br.s IL_002a IL_001b: br.s IL_0021 @@ -2804,204 +2621,191 @@ .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br.s IL_0096 + IL_0022: br.s IL_0071 .line 100001,100001 : 0,0 '' IL_0024: nop - IL_0025: br.s IL_0085 + IL_0025: br.s IL_006e .line 100001,100001 : 0,0 '' IL_0027: nop - IL_0028: br IL_00b7 + IL_0028: br.s IL_0092 .line 100001,100001 : 0,0 '' - IL_002d: nop + IL_002a: nop .line 59,59 : 27,40 '' - IL_002e: ldarg.0 - IL_002f: ldarg.0 - IL_0030: ldfld class [System.Core]System.Linq.IGrouping`2 Linq101Aggregates01/min@59::g - IL_0035: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_003a: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/min@59::'enum' - IL_003f: ldarg.0 - IL_0040: ldc.i4.1 - IL_0041: stfld int32 Linq101Aggregates01/min@59::pc + IL_002b: ldarg.0 + IL_002c: ldarg.0 + IL_002d: ldfld class [System.Core]System.Linq.IGrouping`2 Linq101Aggregates01/min@59::g + IL_0032: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0037: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/min@59::'enum' + IL_003c: ldarg.0 + IL_003d: ldc.i4.1 + IL_003e: stfld int32 Linq101Aggregates01/min@59::pc .line 59,59 : 27,40 '' - IL_0046: ldarg.0 - IL_0047: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/min@59::'enum' - IL_004c: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0051: brfalse.s IL_0096 - - IL_0053: ldarg.0 - IL_0054: ldarg.0 - IL_0055: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/min@59::'enum' - IL_005a: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_005f: stfld class [Utils]Utils/Product Linq101Aggregates01/min@59::_arg3 + IL_0043: ldarg.0 + IL_0044: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/min@59::'enum' + IL_0049: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_004e: brfalse.s IL_0071 + + IL_0050: ldarg.0 + IL_0051: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/min@59::'enum' + IL_0056: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_005b: stloc.0 .line 59,59 : 27,40 '' - IL_0064: ldarg.0 - IL_0065: ldarg.0 - IL_0066: ldfld class [Utils]Utils/Product Linq101Aggregates01/min@59::_arg3 - IL_006b: stfld class [Utils]Utils/Product Linq101Aggregates01/min@59::x - IL_0070: ldarg.0 - IL_0071: ldc.i4.2 - IL_0072: stfld int32 Linq101Aggregates01/min@59::pc + IL_005c: ldloc.0 + IL_005d: stloc.1 + IL_005e: ldarg.0 + IL_005f: ldc.i4.2 + IL_0060: stfld int32 Linq101Aggregates01/min@59::pc .line 59,59 : 41,58 '' - IL_0077: ldarg.0 - IL_0078: ldarg.0 - IL_0079: ldfld class [Utils]Utils/Product Linq101Aggregates01/min@59::x - IL_007e: stfld class [Utils]Utils/Product Linq101Aggregates01/min@59::current - IL_0083: ldc.i4.1 - IL_0084: ret - - IL_0085: ldarg.0 - IL_0086: ldnull - IL_0087: stfld class [Utils]Utils/Product Linq101Aggregates01/min@59::x - .line 59,59 : 27,40 '' - IL_008c: ldarg.0 - IL_008d: ldnull - IL_008e: stfld class [Utils]Utils/Product Linq101Aggregates01/min@59::_arg3 + IL_0065: ldarg.0 + IL_0066: ldloc.1 + IL_0067: stfld class [Utils]Utils/Product Linq101Aggregates01/min@59::current + IL_006c: ldc.i4.1 + IL_006d: ret + .line 100001,100001 : 0,0 '' - IL_0093: nop - IL_0094: br.s IL_0046 + IL_006e: nop + IL_006f: br.s IL_0043 - IL_0096: ldarg.0 - IL_0097: ldc.i4.3 - IL_0098: stfld int32 Linq101Aggregates01/min@59::pc + IL_0071: ldarg.0 + IL_0072: ldc.i4.3 + IL_0073: stfld int32 Linq101Aggregates01/min@59::pc .line 59,59 : 27,40 '' - IL_009d: ldarg.0 - IL_009e: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/min@59::'enum' - IL_00a3: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_00a8: nop - IL_00a9: ldarg.0 - IL_00aa: ldnull - IL_00ab: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/min@59::'enum' - IL_00b0: ldarg.0 - IL_00b1: ldc.i4.3 - IL_00b2: stfld int32 Linq101Aggregates01/min@59::pc - IL_00b7: ldarg.0 - IL_00b8: ldnull - IL_00b9: stfld class [Utils]Utils/Product Linq101Aggregates01/min@59::current - IL_00be: ldc.i4.0 - IL_00bf: ret + IL_0078: ldarg.0 + IL_0079: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/min@59::'enum' + IL_007e: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0083: nop + IL_0084: ldarg.0 + IL_0085: ldnull + IL_0086: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/min@59::'enum' + IL_008b: ldarg.0 + IL_008c: ldc.i4.3 + IL_008d: stfld int32 Linq101Aggregates01/min@59::pc + IL_0092: ldarg.0 + IL_0093: ldnull + IL_0094: stfld class [Utils]Utils/Product Linq101Aggregates01/min@59::current + IL_0099: ldc.i4.0 + IL_009a: ret } // end of method min@59::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 150 (0x96) + // Code size 148 (0x94) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [FSharp.Core]Microsoft.FSharp.Core.Unit V_1, [2] class [mscorlib]System.Exception e) .line 100001,100001 : 0,0 '' - IL_0000: ldnull - IL_0001: stloc.0 - IL_0002: ldarg.0 - IL_0003: ldfld int32 Linq101Aggregates01/min@59::pc - IL_0008: ldc.i4.3 - IL_0009: sub - IL_000a: switch ( - IL_0015) - IL_0013: br.s IL_001b + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Aggregates01/min@59::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0019 .line 100001,100001 : 0,0 '' - IL_0015: nop - IL_0016: br IL_0089 + IL_0013: nop + IL_0014: br IL_0087 .line 100001,100001 : 0,0 '' - IL_001b: nop + IL_0019: nop .try { - IL_001c: ldarg.0 - IL_001d: ldfld int32 Linq101Aggregates01/min@59::pc - IL_0022: switch ( + IL_001a: ldarg.0 + IL_001b: ldfld int32 Linq101Aggregates01/min@59::pc + IL_0020: switch ( + IL_0037, IL_0039, IL_003b, - IL_003d, - IL_003f) - IL_0037: br.s IL_004d + IL_003d) + IL_0035: br.s IL_004b - IL_0039: br.s IL_0041 + IL_0037: br.s IL_003f - IL_003b: br.s IL_0044 + IL_0039: br.s IL_0042 - IL_003d: br.s IL_0047 + IL_003b: br.s IL_0045 - IL_003f: br.s IL_004a + IL_003d: br.s IL_0048 .line 100001,100001 : 0,0 '' - IL_0041: nop - IL_0042: br.s IL_0063 + IL_003f: nop + IL_0040: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_0044: nop - IL_0045: br.s IL_004f + IL_0042: nop + IL_0043: br.s IL_004d .line 100001,100001 : 0,0 '' - IL_0047: nop - IL_0048: br.s IL_004e + IL_0045: nop + IL_0046: br.s IL_004c .line 100001,100001 : 0,0 '' - IL_004a: nop - IL_004b: br.s IL_0063 + IL_0048: nop + IL_0049: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_004d: nop + IL_004b: nop .line 100001,100001 : 0,0 '' - IL_004e: nop - IL_004f: ldarg.0 - IL_0050: ldc.i4.3 - IL_0051: stfld int32 Linq101Aggregates01/min@59::pc - IL_0056: ldarg.0 - IL_0057: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/min@59::'enum' - IL_005c: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_0061: nop + IL_004c: nop + IL_004d: ldarg.0 + IL_004e: ldc.i4.3 + IL_004f: stfld int32 Linq101Aggregates01/min@59::pc + IL_0054: ldarg.0 + IL_0055: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/min@59::'enum' + IL_005a: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_005f: nop .line 100001,100001 : 0,0 '' - IL_0062: nop - IL_0063: ldarg.0 - IL_0064: ldc.i4.3 - IL_0065: stfld int32 Linq101Aggregates01/min@59::pc - IL_006a: ldarg.0 - IL_006b: ldnull - IL_006c: stfld class [Utils]Utils/Product Linq101Aggregates01/min@59::current - IL_0071: ldnull - IL_0072: stloc.1 - IL_0073: leave.s IL_0081 + IL_0060: nop + IL_0061: ldarg.0 + IL_0062: ldc.i4.3 + IL_0063: stfld int32 Linq101Aggregates01/min@59::pc + IL_0068: ldarg.0 + IL_0069: ldnull + IL_006a: stfld class [Utils]Utils/Product Linq101Aggregates01/min@59::current + IL_006f: ldnull + IL_0070: stloc.1 + IL_0071: leave.s IL_007f } // end .try catch [mscorlib]System.Object { - IL_0075: castclass [mscorlib]System.Exception - IL_007a: stloc.2 + IL_0073: castclass [mscorlib]System.Exception + IL_0078: stloc.2 .line 59,59 : 27,40 '' - IL_007b: ldloc.2 - IL_007c: stloc.0 - IL_007d: ldnull - IL_007e: stloc.1 - IL_007f: leave.s IL_0081 + IL_0079: ldloc.2 + IL_007a: stloc.0 + IL_007b: ldnull + IL_007c: stloc.1 + IL_007d: leave.s IL_007f .line 100001,100001 : 0,0 '' } // end handler - IL_0081: ldloc.1 - IL_0082: pop + IL_007f: ldloc.1 + IL_0080: pop .line 100001,100001 : 0,0 '' - IL_0083: nop - IL_0084: br IL_0002 + IL_0081: nop + IL_0082: br IL_0000 - IL_0089: ldloc.0 - IL_008a: ldnull - IL_008b: cgt.un - IL_008d: brfalse.s IL_0091 + IL_0087: ldloc.0 + IL_0088: ldnull + IL_0089: cgt.un + IL_008b: brfalse.s IL_008f - IL_008f: br.s IL_0093 + IL_008d: br.s IL_0091 - IL_0091: br.s IL_0095 + IL_008f: br.s IL_0093 .line 100001,100001 : 0,0 '' - IL_0093: ldloc.0 - IL_0094: throw + IL_0091: ldloc.0 + IL_0092: throw .line 100001,100001 : 0,0 '' - IL_0095: ret + IL_0093: ret } // end of method min@59::Close .method public strict virtual instance bool @@ -3072,22 +2876,18 @@ { .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 ) - // Code size 17 (0x11) - .maxstack 10 + // Code size 15 (0xf) + .maxstack 8 IL_0000: ldarg.0 IL_0001: ldfld class [System.Core]System.Linq.IGrouping`2 Linq101Aggregates01/min@59::g IL_0006: ldnull - IL_0007: ldnull + IL_0007: ldc.i4.0 IL_0008: ldnull - IL_0009: ldc.i4.0 - IL_000a: ldnull - IL_000b: newobj instance void Linq101Aggregates01/min@59::.ctor(class [System.Core]System.Linq.IGrouping`2, - class [Utils]Utils/Product, - class [Utils]Utils/Product, + IL_0009: newobj instance void Linq101Aggregates01/min@59::.ctor(class [System.Core]System.Linq.IGrouping`2, class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, class [Utils]Utils/Product) - IL_0010: ret + IL_000e: ret } // end of method min@59::GetFreshEnumerator } // end of class min@59 @@ -3146,8 +2946,8 @@ .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,valuetype [mscorlib]System.Decimal>,object> Invoke(class [System.Core]System.Linq.IGrouping`2 _arg2) cil managed { - // Code size 55 (0x37) - .maxstack 11 + // Code size 53 (0x35) + .maxstack 9 .locals init ([0] class [System.Core]System.Linq.IGrouping`2 g, [1] valuetype [mscorlib]System.Decimal min) .line 58,58 : 38,39 '' @@ -3156,31 +2956,27 @@ IL_0002: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_0007: ldloc.0 IL_0008: ldnull - IL_0009: ldnull + IL_0009: ldc.i4.0 IL_000a: ldnull - IL_000b: ldc.i4.0 - IL_000c: ldnull - IL_000d: newobj instance void Linq101Aggregates01/min@59::.ctor(class [System.Core]System.Linq.IGrouping`2, - class [Utils]Utils/Product, - class [Utils]Utils/Product, + IL_000b: newobj instance void Linq101Aggregates01/min@59::.ctor(class [System.Core]System.Linq.IGrouping`2, class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, class [Utils]Utils/Product) - IL_0012: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0017: newobj instance void Linq101Aggregates01/'min@59-1'::.ctor() - IL_001c: callvirt instance !!2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::MinBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0010: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0015: newobj instance void Linq101Aggregates01/'min@59-1'::.ctor() + IL_001a: callvirt instance !!2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::MinBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0021: stloc.1 + IL_001f: stloc.1 .line 60,60 : 9,28 '' - IL_0022: ldarg.0 - IL_0023: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Aggregates01/'categories2@58-3'::builder@ - IL_0028: ldloc.0 - IL_0029: ldloc.1 - IL_002a: newobj instance void class [mscorlib]System.Tuple`2,valuetype [mscorlib]System.Decimal>::.ctor(!0, + IL_0020: ldarg.0 + IL_0021: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Aggregates01/'categories2@58-3'::builder@ + IL_0026: ldloc.0 + IL_0027: ldloc.1 + IL_0028: newobj instance void class [mscorlib]System.Tuple`2,valuetype [mscorlib]System.Decimal>::.ctor(!0, !1) - IL_002f: tail. - IL_0031: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Yield,valuetype [mscorlib]System.Decimal>,object>(!!0) - IL_0036: ret + IL_002d: tail. + IL_002f: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Yield,valuetype [mscorlib]System.Decimal>,object>(!!0) + IL_0034: ret } // end of method 'categories2@58-3'::Invoke } // end of class 'categories2@58-3' @@ -3356,11 +3152,6 @@ { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) .field public class [System.Core]System.Linq.IGrouping`2 g - .field public class [Utils]Utils/Product _arg3 - .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 ) - .field public class [Utils]Utils/Product x .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' .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 ) @@ -3375,42 +3166,36 @@ .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .method public specialname rtspecialname instance void .ctor(class [System.Core]System.Linq.IGrouping`2 g, - class [Utils]Utils/Product _arg3, - class [Utils]Utils/Product x, class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', int32 pc, class [Utils]Utils/Product current) cil managed { - // Code size 52 (0x34) + // Code size 36 (0x24) .maxstack 8 IL_0000: ldarg.0 IL_0001: ldarg.1 IL_0002: stfld class [System.Core]System.Linq.IGrouping`2 Linq101Aggregates01/cheapestProducts@69::g IL_0007: ldarg.0 IL_0008: ldarg.2 - IL_0009: stfld class [Utils]Utils/Product Linq101Aggregates01/cheapestProducts@69::_arg3 + IL_0009: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/cheapestProducts@69::'enum' IL_000e: ldarg.0 IL_000f: ldarg.3 - IL_0010: stfld class [Utils]Utils/Product Linq101Aggregates01/cheapestProducts@69::x + IL_0010: stfld int32 Linq101Aggregates01/cheapestProducts@69::pc IL_0015: ldarg.0 - IL_0016: ldarg.s 'enum' - IL_0018: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/cheapestProducts@69::'enum' + IL_0016: ldarg.s current + IL_0018: stfld class [Utils]Utils/Product Linq101Aggregates01/cheapestProducts@69::current IL_001d: ldarg.0 - IL_001e: ldarg.s pc - IL_0020: stfld int32 Linq101Aggregates01/cheapestProducts@69::pc - IL_0025: ldarg.0 - IL_0026: ldarg.s current - IL_0028: stfld class [Utils]Utils/Product Linq101Aggregates01/cheapestProducts@69::current - IL_002d: ldarg.0 - IL_002e: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() - IL_0033: ret + IL_001e: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_0023: ret } // end of method cheapestProducts@69::.ctor .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 192 (0xc0) + // Code size 155 (0x9b) .maxstack 6 + .locals init ([0] class [Utils]Utils/Product V_0, + [1] class [Utils]Utils/Product x) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 IL_0001: ldfld int32 Linq101Aggregates01/cheapestProducts@69::pc @@ -3420,7 +3205,7 @@ IL_001b, IL_001d, IL_001f) - IL_0019: br.s IL_002d + IL_0019: br.s IL_002a IL_001b: br.s IL_0021 @@ -3430,204 +3215,191 @@ .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br.s IL_0096 + IL_0022: br.s IL_0071 .line 100001,100001 : 0,0 '' IL_0024: nop - IL_0025: br.s IL_0085 + IL_0025: br.s IL_006e .line 100001,100001 : 0,0 '' IL_0027: nop - IL_0028: br IL_00b7 + IL_0028: br.s IL_0092 .line 100001,100001 : 0,0 '' - IL_002d: nop + IL_002a: nop .line 69,69 : 40,53 '' - IL_002e: ldarg.0 - IL_002f: ldarg.0 - IL_0030: ldfld class [System.Core]System.Linq.IGrouping`2 Linq101Aggregates01/cheapestProducts@69::g - IL_0035: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_003a: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/cheapestProducts@69::'enum' - IL_003f: ldarg.0 - IL_0040: ldc.i4.1 - IL_0041: stfld int32 Linq101Aggregates01/cheapestProducts@69::pc + IL_002b: ldarg.0 + IL_002c: ldarg.0 + IL_002d: ldfld class [System.Core]System.Linq.IGrouping`2 Linq101Aggregates01/cheapestProducts@69::g + IL_0032: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0037: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/cheapestProducts@69::'enum' + IL_003c: ldarg.0 + IL_003d: ldc.i4.1 + IL_003e: stfld int32 Linq101Aggregates01/cheapestProducts@69::pc .line 69,69 : 40,53 '' - IL_0046: ldarg.0 - IL_0047: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/cheapestProducts@69::'enum' - IL_004c: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0051: brfalse.s IL_0096 - - IL_0053: ldarg.0 - IL_0054: ldarg.0 - IL_0055: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/cheapestProducts@69::'enum' - IL_005a: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_005f: stfld class [Utils]Utils/Product Linq101Aggregates01/cheapestProducts@69::_arg3 + IL_0043: ldarg.0 + IL_0044: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/cheapestProducts@69::'enum' + IL_0049: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_004e: brfalse.s IL_0071 + + IL_0050: ldarg.0 + IL_0051: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/cheapestProducts@69::'enum' + IL_0056: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_005b: stloc.0 .line 69,69 : 40,53 '' - IL_0064: ldarg.0 - IL_0065: ldarg.0 - IL_0066: ldfld class [Utils]Utils/Product Linq101Aggregates01/cheapestProducts@69::_arg3 - IL_006b: stfld class [Utils]Utils/Product Linq101Aggregates01/cheapestProducts@69::x - IL_0070: ldarg.0 - IL_0071: ldc.i4.2 - IL_0072: stfld int32 Linq101Aggregates01/cheapestProducts@69::pc + IL_005c: ldloc.0 + IL_005d: stloc.1 + IL_005e: ldarg.0 + IL_005f: ldc.i4.2 + IL_0060: stfld int32 Linq101Aggregates01/cheapestProducts@69::pc .line 69,69 : 54,79 '' - IL_0077: ldarg.0 - IL_0078: ldarg.0 - IL_0079: ldfld class [Utils]Utils/Product Linq101Aggregates01/cheapestProducts@69::x - IL_007e: stfld class [Utils]Utils/Product Linq101Aggregates01/cheapestProducts@69::current - IL_0083: ldc.i4.1 - IL_0084: ret - - IL_0085: ldarg.0 - IL_0086: ldnull - IL_0087: stfld class [Utils]Utils/Product Linq101Aggregates01/cheapestProducts@69::x - .line 69,69 : 40,53 '' - IL_008c: ldarg.0 - IL_008d: ldnull - IL_008e: stfld class [Utils]Utils/Product Linq101Aggregates01/cheapestProducts@69::_arg3 + IL_0065: ldarg.0 + IL_0066: ldloc.1 + IL_0067: stfld class [Utils]Utils/Product Linq101Aggregates01/cheapestProducts@69::current + IL_006c: ldc.i4.1 + IL_006d: ret + .line 100001,100001 : 0,0 '' - IL_0093: nop - IL_0094: br.s IL_0046 + IL_006e: nop + IL_006f: br.s IL_0043 - IL_0096: ldarg.0 - IL_0097: ldc.i4.3 - IL_0098: stfld int32 Linq101Aggregates01/cheapestProducts@69::pc + IL_0071: ldarg.0 + IL_0072: ldc.i4.3 + IL_0073: stfld int32 Linq101Aggregates01/cheapestProducts@69::pc .line 69,69 : 40,53 '' - IL_009d: ldarg.0 - IL_009e: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/cheapestProducts@69::'enum' - IL_00a3: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_00a8: nop - IL_00a9: ldarg.0 - IL_00aa: ldnull - IL_00ab: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/cheapestProducts@69::'enum' - IL_00b0: ldarg.0 - IL_00b1: ldc.i4.3 - IL_00b2: stfld int32 Linq101Aggregates01/cheapestProducts@69::pc - IL_00b7: ldarg.0 - IL_00b8: ldnull - IL_00b9: stfld class [Utils]Utils/Product Linq101Aggregates01/cheapestProducts@69::current - IL_00be: ldc.i4.0 - IL_00bf: ret + IL_0078: ldarg.0 + IL_0079: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/cheapestProducts@69::'enum' + IL_007e: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0083: nop + IL_0084: ldarg.0 + IL_0085: ldnull + IL_0086: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/cheapestProducts@69::'enum' + IL_008b: ldarg.0 + IL_008c: ldc.i4.3 + IL_008d: stfld int32 Linq101Aggregates01/cheapestProducts@69::pc + IL_0092: ldarg.0 + IL_0093: ldnull + IL_0094: stfld class [Utils]Utils/Product Linq101Aggregates01/cheapestProducts@69::current + IL_0099: ldc.i4.0 + IL_009a: ret } // end of method cheapestProducts@69::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 150 (0x96) + // Code size 148 (0x94) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [FSharp.Core]Microsoft.FSharp.Core.Unit V_1, [2] class [mscorlib]System.Exception e) .line 100001,100001 : 0,0 '' - IL_0000: ldnull - IL_0001: stloc.0 - IL_0002: ldarg.0 - IL_0003: ldfld int32 Linq101Aggregates01/cheapestProducts@69::pc - IL_0008: ldc.i4.3 - IL_0009: sub - IL_000a: switch ( - IL_0015) - IL_0013: br.s IL_001b + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Aggregates01/cheapestProducts@69::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0019 .line 100001,100001 : 0,0 '' - IL_0015: nop - IL_0016: br IL_0089 + IL_0013: nop + IL_0014: br IL_0087 .line 100001,100001 : 0,0 '' - IL_001b: nop + IL_0019: nop .try { - IL_001c: ldarg.0 - IL_001d: ldfld int32 Linq101Aggregates01/cheapestProducts@69::pc - IL_0022: switch ( + IL_001a: ldarg.0 + IL_001b: ldfld int32 Linq101Aggregates01/cheapestProducts@69::pc + IL_0020: switch ( + IL_0037, IL_0039, IL_003b, - IL_003d, - IL_003f) - IL_0037: br.s IL_004d + IL_003d) + IL_0035: br.s IL_004b - IL_0039: br.s IL_0041 + IL_0037: br.s IL_003f - IL_003b: br.s IL_0044 + IL_0039: br.s IL_0042 - IL_003d: br.s IL_0047 + IL_003b: br.s IL_0045 - IL_003f: br.s IL_004a + IL_003d: br.s IL_0048 .line 100001,100001 : 0,0 '' - IL_0041: nop - IL_0042: br.s IL_0063 + IL_003f: nop + IL_0040: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_0044: nop - IL_0045: br.s IL_004f + IL_0042: nop + IL_0043: br.s IL_004d .line 100001,100001 : 0,0 '' - IL_0047: nop - IL_0048: br.s IL_004e + IL_0045: nop + IL_0046: br.s IL_004c .line 100001,100001 : 0,0 '' - IL_004a: nop - IL_004b: br.s IL_0063 + IL_0048: nop + IL_0049: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_004d: nop + IL_004b: nop .line 100001,100001 : 0,0 '' - IL_004e: nop - IL_004f: ldarg.0 - IL_0050: ldc.i4.3 - IL_0051: stfld int32 Linq101Aggregates01/cheapestProducts@69::pc - IL_0056: ldarg.0 - IL_0057: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/cheapestProducts@69::'enum' - IL_005c: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_0061: nop + IL_004c: nop + IL_004d: ldarg.0 + IL_004e: ldc.i4.3 + IL_004f: stfld int32 Linq101Aggregates01/cheapestProducts@69::pc + IL_0054: ldarg.0 + IL_0055: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/cheapestProducts@69::'enum' + IL_005a: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_005f: nop .line 100001,100001 : 0,0 '' - IL_0062: nop - IL_0063: ldarg.0 - IL_0064: ldc.i4.3 - IL_0065: stfld int32 Linq101Aggregates01/cheapestProducts@69::pc - IL_006a: ldarg.0 - IL_006b: ldnull - IL_006c: stfld class [Utils]Utils/Product Linq101Aggregates01/cheapestProducts@69::current - IL_0071: ldnull - IL_0072: stloc.1 - IL_0073: leave.s IL_0081 + IL_0060: nop + IL_0061: ldarg.0 + IL_0062: ldc.i4.3 + IL_0063: stfld int32 Linq101Aggregates01/cheapestProducts@69::pc + IL_0068: ldarg.0 + IL_0069: ldnull + IL_006a: stfld class [Utils]Utils/Product Linq101Aggregates01/cheapestProducts@69::current + IL_006f: ldnull + IL_0070: stloc.1 + IL_0071: leave.s IL_007f } // end .try catch [mscorlib]System.Object { - IL_0075: castclass [mscorlib]System.Exception - IL_007a: stloc.2 + IL_0073: castclass [mscorlib]System.Exception + IL_0078: stloc.2 .line 69,69 : 40,53 '' - IL_007b: ldloc.2 - IL_007c: stloc.0 - IL_007d: ldnull - IL_007e: stloc.1 - IL_007f: leave.s IL_0081 + IL_0079: ldloc.2 + IL_007a: stloc.0 + IL_007b: ldnull + IL_007c: stloc.1 + IL_007d: leave.s IL_007f .line 100001,100001 : 0,0 '' } // end handler - IL_0081: ldloc.1 - IL_0082: pop + IL_007f: ldloc.1 + IL_0080: pop .line 100001,100001 : 0,0 '' - IL_0083: nop - IL_0084: br IL_0002 + IL_0081: nop + IL_0082: br IL_0000 - IL_0089: ldloc.0 - IL_008a: ldnull - IL_008b: cgt.un - IL_008d: brfalse.s IL_0091 + IL_0087: ldloc.0 + IL_0088: ldnull + IL_0089: cgt.un + IL_008b: brfalse.s IL_008f - IL_008f: br.s IL_0093 + IL_008d: br.s IL_0091 - IL_0091: br.s IL_0095 + IL_008f: br.s IL_0093 .line 100001,100001 : 0,0 '' - IL_0093: ldloc.0 - IL_0094: throw + IL_0091: ldloc.0 + IL_0092: throw .line 100001,100001 : 0,0 '' - IL_0095: ret + IL_0093: ret } // end of method cheapestProducts@69::Close .method public strict virtual instance bool @@ -3698,22 +3470,18 @@ { .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 ) - // Code size 17 (0x11) - .maxstack 10 + // Code size 15 (0xf) + .maxstack 8 IL_0000: ldarg.0 IL_0001: ldfld class [System.Core]System.Linq.IGrouping`2 Linq101Aggregates01/cheapestProducts@69::g IL_0006: ldnull - IL_0007: ldnull + IL_0007: ldc.i4.0 IL_0008: ldnull - IL_0009: ldc.i4.0 - IL_000a: ldnull - IL_000b: newobj instance void Linq101Aggregates01/cheapestProducts@69::.ctor(class [System.Core]System.Linq.IGrouping`2, - class [Utils]Utils/Product, - class [Utils]Utils/Product, + IL_0009: newobj instance void Linq101Aggregates01/cheapestProducts@69::.ctor(class [System.Core]System.Linq.IGrouping`2, class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, class [Utils]Utils/Product) - IL_0010: ret + IL_000e: ret } // end of method cheapestProducts@69::GetFreshEnumerator } // end of class cheapestProducts@69 @@ -3779,8 +3547,8 @@ .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,valuetype [mscorlib]System.Decimal,class [mscorlib]System.Collections.Generic.IEnumerable`1>,object> Invoke(class [System.Core]System.Linq.IGrouping`2 _arg2) cil managed { - // Code size 87 (0x57) - .maxstack 11 + // Code size 85 (0x55) + .maxstack 9 .locals init ([0] class [System.Core]System.Linq.IGrouping`2 g, [1] valuetype [mscorlib]System.Decimal min, [2] class [mscorlib]System.Collections.Generic.IEnumerable`1 cheapestProducts, @@ -3803,35 +3571,31 @@ IL_001f: ldloc.3 IL_0020: ldloc.0 IL_0021: ldnull - IL_0022: ldnull + IL_0022: ldc.i4.0 IL_0023: ldnull - IL_0024: ldc.i4.0 - IL_0025: ldnull - IL_0026: newobj instance void Linq101Aggregates01/cheapestProducts@69::.ctor(class [System.Core]System.Linq.IGrouping`2, - class [Utils]Utils/Product, - class [Utils]Utils/Product, + IL_0024: newobj instance void Linq101Aggregates01/cheapestProducts@69::.ctor(class [System.Core]System.Linq.IGrouping`2, class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, class [Utils]Utils/Product) - IL_002b: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0030: ldloc.1 - IL_0031: newobj instance void Linq101Aggregates01/'cheapestProducts@69-1'::.ctor(valuetype [mscorlib]System.Decimal) - IL_0036: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Where(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0029: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_002e: ldloc.1 + IL_002f: newobj instance void Linq101Aggregates01/'cheapestProducts@69-1'::.ctor(valuetype [mscorlib]System.Decimal) + IL_0034: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Where(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_003b: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() - IL_0040: stloc.2 + IL_0039: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() + IL_003e: stloc.2 .line 70,70 : 9,41 '' - IL_0041: ldarg.0 - IL_0042: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Aggregates01/'categories3@67-3'::builder@ - IL_0047: ldloc.0 - IL_0048: ldloc.1 - IL_0049: ldloc.2 - IL_004a: newobj instance void class [mscorlib]System.Tuple`3,valuetype [mscorlib]System.Decimal,class [mscorlib]System.Collections.Generic.IEnumerable`1>::.ctor(!0, + IL_003f: ldarg.0 + IL_0040: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Aggregates01/'categories3@67-3'::builder@ + IL_0045: ldloc.0 + IL_0046: ldloc.1 + IL_0047: ldloc.2 + IL_0048: newobj instance void class [mscorlib]System.Tuple`3,valuetype [mscorlib]System.Decimal,class [mscorlib]System.Collections.Generic.IEnumerable`1>::.ctor(!0, !1, !2) - IL_004f: tail. - IL_0051: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Yield,valuetype [mscorlib]System.Decimal,class [mscorlib]System.Collections.Generic.IEnumerable`1>,object>(!!0) - IL_0056: ret + IL_004d: tail. + IL_004f: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Yield,valuetype [mscorlib]System.Decimal,class [mscorlib]System.Collections.Generic.IEnumerable`1>,object>(!!0) + IL_0054: ret } // end of method 'categories3@67-3'::Invoke } // end of class 'categories3@67-3' @@ -3884,11 +3648,6 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) - .field public int32 _arg1 - .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 ) - .field public int32 n .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' .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 ) @@ -3902,39 +3661,33 @@ .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 specialname rtspecialname - instance void .ctor(int32 _arg1, - int32 n, - class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', int32 pc, int32 current) cil managed { - // Code size 44 (0x2c) + // Code size 28 (0x1c) .maxstack 8 IL_0000: ldarg.0 IL_0001: ldarg.1 - IL_0002: stfld int32 Linq101Aggregates01/maxNum@74::_arg1 + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/maxNum@74::'enum' IL_0007: ldarg.0 IL_0008: ldarg.2 - IL_0009: stfld int32 Linq101Aggregates01/maxNum@74::n + IL_0009: stfld int32 Linq101Aggregates01/maxNum@74::pc IL_000e: ldarg.0 IL_000f: ldarg.3 - IL_0010: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/maxNum@74::'enum' + IL_0010: stfld int32 Linq101Aggregates01/maxNum@74::current IL_0015: ldarg.0 - IL_0016: ldarg.s pc - IL_0018: stfld int32 Linq101Aggregates01/maxNum@74::pc - IL_001d: ldarg.0 - IL_001e: ldarg.s current - IL_0020: stfld int32 Linq101Aggregates01/maxNum@74::current - IL_0025: ldarg.0 - IL_0026: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() - IL_002b: ret + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_001b: ret } // end of method maxNum@74::.ctor .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 191 (0xbf) + // Code size 154 (0x9a) .maxstack 6 + .locals init ([0] int32 V_0, + [1] int32 n) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 IL_0001: ldfld int32 Linq101Aggregates01/maxNum@74::pc @@ -3944,7 +3697,7 @@ IL_001b, IL_001d, IL_001f) - IL_0019: br.s IL_002d + IL_0019: br.s IL_002a IL_001b: br.s IL_0021 @@ -3954,203 +3707,190 @@ .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br.s IL_0095 + IL_0022: br.s IL_0070 .line 100001,100001 : 0,0 '' IL_0024: nop - IL_0025: br.s IL_0084 + IL_0025: br.s IL_006d .line 100001,100001 : 0,0 '' IL_0027: nop - IL_0028: br IL_00b6 + IL_0028: br.s IL_0091 .line 100001,100001 : 0,0 '' - IL_002d: nop + IL_002a: nop .line 74,74 : 22,41 '' - IL_002e: ldarg.0 - IL_002f: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_numbers() - IL_0034: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0039: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/maxNum@74::'enum' - IL_003e: ldarg.0 - IL_003f: ldc.i4.1 - IL_0040: stfld int32 Linq101Aggregates01/maxNum@74::pc + IL_002b: ldarg.0 + IL_002c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_numbers() + IL_0031: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0036: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/maxNum@74::'enum' + IL_003b: ldarg.0 + IL_003c: ldc.i4.1 + IL_003d: stfld int32 Linq101Aggregates01/maxNum@74::pc .line 74,74 : 22,41 '' - IL_0045: ldarg.0 - IL_0046: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/maxNum@74::'enum' - IL_004b: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0050: brfalse.s IL_0095 - - IL_0052: ldarg.0 - IL_0053: ldarg.0 - IL_0054: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/maxNum@74::'enum' - IL_0059: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_005e: stfld int32 Linq101Aggregates01/maxNum@74::_arg1 + IL_0042: ldarg.0 + IL_0043: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/maxNum@74::'enum' + IL_0048: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_004d: brfalse.s IL_0070 + + IL_004f: ldarg.0 + IL_0050: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/maxNum@74::'enum' + IL_0055: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_005a: stloc.0 .line 74,74 : 22,41 '' - IL_0063: ldarg.0 - IL_0064: ldarg.0 - IL_0065: ldfld int32 Linq101Aggregates01/maxNum@74::_arg1 - IL_006a: stfld int32 Linq101Aggregates01/maxNum@74::n - IL_006f: ldarg.0 - IL_0070: ldc.i4.2 - IL_0071: stfld int32 Linq101Aggregates01/maxNum@74::pc + IL_005b: ldloc.0 + IL_005c: stloc.1 + IL_005d: ldarg.0 + IL_005e: ldc.i4.2 + IL_005f: stfld int32 Linq101Aggregates01/maxNum@74::pc .line 74,74 : 42,49 '' - IL_0076: ldarg.0 - IL_0077: ldarg.0 - IL_0078: ldfld int32 Linq101Aggregates01/maxNum@74::n - IL_007d: stfld int32 Linq101Aggregates01/maxNum@74::current - IL_0082: ldc.i4.1 - IL_0083: ret + IL_0064: ldarg.0 + IL_0065: ldloc.1 + IL_0066: stfld int32 Linq101Aggregates01/maxNum@74::current + IL_006b: ldc.i4.1 + IL_006c: ret - IL_0084: ldarg.0 - IL_0085: ldc.i4.0 - IL_0086: stfld int32 Linq101Aggregates01/maxNum@74::n - .line 74,74 : 22,41 '' - IL_008b: ldarg.0 - IL_008c: ldc.i4.0 - IL_008d: stfld int32 Linq101Aggregates01/maxNum@74::_arg1 .line 100001,100001 : 0,0 '' - IL_0092: nop - IL_0093: br.s IL_0045 + IL_006d: nop + IL_006e: br.s IL_0042 - IL_0095: ldarg.0 - IL_0096: ldc.i4.3 - IL_0097: stfld int32 Linq101Aggregates01/maxNum@74::pc + IL_0070: ldarg.0 + IL_0071: ldc.i4.3 + IL_0072: stfld int32 Linq101Aggregates01/maxNum@74::pc .line 74,74 : 22,41 '' - IL_009c: ldarg.0 - IL_009d: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/maxNum@74::'enum' - IL_00a2: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_00a7: nop - IL_00a8: ldarg.0 - IL_00a9: ldnull - IL_00aa: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/maxNum@74::'enum' - IL_00af: ldarg.0 - IL_00b0: ldc.i4.3 - IL_00b1: stfld int32 Linq101Aggregates01/maxNum@74::pc - IL_00b6: ldarg.0 - IL_00b7: ldc.i4.0 - IL_00b8: stfld int32 Linq101Aggregates01/maxNum@74::current - IL_00bd: ldc.i4.0 - IL_00be: ret + IL_0077: ldarg.0 + IL_0078: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/maxNum@74::'enum' + IL_007d: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0082: nop + IL_0083: ldarg.0 + IL_0084: ldnull + IL_0085: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/maxNum@74::'enum' + IL_008a: ldarg.0 + IL_008b: ldc.i4.3 + IL_008c: stfld int32 Linq101Aggregates01/maxNum@74::pc + IL_0091: ldarg.0 + IL_0092: ldc.i4.0 + IL_0093: stfld int32 Linq101Aggregates01/maxNum@74::current + IL_0098: ldc.i4.0 + IL_0099: ret } // end of method maxNum@74::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 150 (0x96) + // Code size 148 (0x94) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [FSharp.Core]Microsoft.FSharp.Core.Unit V_1, [2] class [mscorlib]System.Exception e) .line 100001,100001 : 0,0 '' - IL_0000: ldnull - IL_0001: stloc.0 - IL_0002: ldarg.0 - IL_0003: ldfld int32 Linq101Aggregates01/maxNum@74::pc - IL_0008: ldc.i4.3 - IL_0009: sub - IL_000a: switch ( - IL_0015) - IL_0013: br.s IL_001b + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Aggregates01/maxNum@74::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0019 .line 100001,100001 : 0,0 '' - IL_0015: nop - IL_0016: br IL_0089 + IL_0013: nop + IL_0014: br IL_0087 .line 100001,100001 : 0,0 '' - IL_001b: nop + IL_0019: nop .try { - IL_001c: ldarg.0 - IL_001d: ldfld int32 Linq101Aggregates01/maxNum@74::pc - IL_0022: switch ( + IL_001a: ldarg.0 + IL_001b: ldfld int32 Linq101Aggregates01/maxNum@74::pc + IL_0020: switch ( + IL_0037, IL_0039, IL_003b, - IL_003d, - IL_003f) - IL_0037: br.s IL_004d + IL_003d) + IL_0035: br.s IL_004b - IL_0039: br.s IL_0041 + IL_0037: br.s IL_003f - IL_003b: br.s IL_0044 + IL_0039: br.s IL_0042 - IL_003d: br.s IL_0047 + IL_003b: br.s IL_0045 - IL_003f: br.s IL_004a + IL_003d: br.s IL_0048 .line 100001,100001 : 0,0 '' - IL_0041: nop - IL_0042: br.s IL_0063 + IL_003f: nop + IL_0040: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_0044: nop - IL_0045: br.s IL_004f + IL_0042: nop + IL_0043: br.s IL_004d .line 100001,100001 : 0,0 '' - IL_0047: nop - IL_0048: br.s IL_004e + IL_0045: nop + IL_0046: br.s IL_004c .line 100001,100001 : 0,0 '' - IL_004a: nop - IL_004b: br.s IL_0063 + IL_0048: nop + IL_0049: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_004d: nop + IL_004b: nop .line 100001,100001 : 0,0 '' - IL_004e: nop - IL_004f: ldarg.0 - IL_0050: ldc.i4.3 - IL_0051: stfld int32 Linq101Aggregates01/maxNum@74::pc - IL_0056: ldarg.0 - IL_0057: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/maxNum@74::'enum' - IL_005c: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_0061: nop + IL_004c: nop + IL_004d: ldarg.0 + IL_004e: ldc.i4.3 + IL_004f: stfld int32 Linq101Aggregates01/maxNum@74::pc + IL_0054: ldarg.0 + IL_0055: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/maxNum@74::'enum' + IL_005a: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_005f: nop .line 100001,100001 : 0,0 '' - IL_0062: nop - IL_0063: ldarg.0 - IL_0064: ldc.i4.3 - IL_0065: stfld int32 Linq101Aggregates01/maxNum@74::pc - IL_006a: ldarg.0 - IL_006b: ldc.i4.0 - IL_006c: stfld int32 Linq101Aggregates01/maxNum@74::current - IL_0071: ldnull - IL_0072: stloc.1 - IL_0073: leave.s IL_0081 + IL_0060: nop + IL_0061: ldarg.0 + IL_0062: ldc.i4.3 + IL_0063: stfld int32 Linq101Aggregates01/maxNum@74::pc + IL_0068: ldarg.0 + IL_0069: ldc.i4.0 + IL_006a: stfld int32 Linq101Aggregates01/maxNum@74::current + IL_006f: ldnull + IL_0070: stloc.1 + IL_0071: leave.s IL_007f } // end .try catch [mscorlib]System.Object { - IL_0075: castclass [mscorlib]System.Exception - IL_007a: stloc.2 + IL_0073: castclass [mscorlib]System.Exception + IL_0078: stloc.2 .line 74,74 : 22,41 '' - IL_007b: ldloc.2 - IL_007c: stloc.0 - IL_007d: ldnull - IL_007e: stloc.1 - IL_007f: leave.s IL_0081 + IL_0079: ldloc.2 + IL_007a: stloc.0 + IL_007b: ldnull + IL_007c: stloc.1 + IL_007d: leave.s IL_007f .line 100001,100001 : 0,0 '' } // end handler - IL_0081: ldloc.1 - IL_0082: pop + IL_007f: ldloc.1 + IL_0080: pop .line 100001,100001 : 0,0 '' - IL_0083: nop - IL_0084: br IL_0002 + IL_0081: nop + IL_0082: br IL_0000 - IL_0089: ldloc.0 - IL_008a: ldnull - IL_008b: cgt.un - IL_008d: brfalse.s IL_0091 + IL_0087: ldloc.0 + IL_0088: ldnull + IL_0089: cgt.un + IL_008b: brfalse.s IL_008f - IL_008f: br.s IL_0093 + IL_008d: br.s IL_0091 - IL_0091: br.s IL_0095 + IL_008f: br.s IL_0093 .line 100001,100001 : 0,0 '' - IL_0093: ldloc.0 - IL_0094: throw + IL_0091: ldloc.0 + IL_0092: throw .line 100001,100001 : 0,0 '' - IL_0095: ret + IL_0093: ret } // end of method maxNum@74::Close .method public strict virtual instance bool @@ -4221,19 +3961,15 @@ { .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 ) - // Code size 11 (0xb) - .maxstack 9 - IL_0000: ldc.i4.0 + // Code size 9 (0x9) + .maxstack 8 + IL_0000: ldnull IL_0001: ldc.i4.0 - IL_0002: ldnull - IL_0003: ldc.i4.0 - IL_0004: ldc.i4.0 - IL_0005: newobj instance void Linq101Aggregates01/maxNum@74::.ctor(int32, - int32, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0002: ldc.i4.0 + IL_0003: newobj instance void Linq101Aggregates01/maxNum@74::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, int32) - IL_000a: ret + IL_0008: ret } // end of method maxNum@74::GetFreshEnumerator } // end of class maxNum@74 @@ -4269,11 +4005,6 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) - .field public string _arg1 - .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 ) - .field public string w .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' .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 ) @@ -4287,39 +4018,33 @@ .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 specialname rtspecialname - instance void .ctor(string _arg1, - string w, - class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', int32 pc, string current) cil managed { - // Code size 44 (0x2c) + // Code size 28 (0x1c) .maxstack 8 IL_0000: ldarg.0 IL_0001: ldarg.1 - IL_0002: stfld string Linq101Aggregates01/longestLength@77::_arg1 + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/longestLength@77::'enum' IL_0007: ldarg.0 IL_0008: ldarg.2 - IL_0009: stfld string Linq101Aggregates01/longestLength@77::w + IL_0009: stfld int32 Linq101Aggregates01/longestLength@77::pc IL_000e: ldarg.0 IL_000f: ldarg.3 - IL_0010: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/longestLength@77::'enum' + IL_0010: stfld string Linq101Aggregates01/longestLength@77::current IL_0015: ldarg.0 - IL_0016: ldarg.s pc - IL_0018: stfld int32 Linq101Aggregates01/longestLength@77::pc - IL_001d: ldarg.0 - IL_001e: ldarg.s current - IL_0020: stfld string Linq101Aggregates01/longestLength@77::current - IL_0025: ldarg.0 - IL_0026: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() - IL_002b: ret + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_001b: ret } // end of method longestLength@77::.ctor .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 191 (0xbf) + // Code size 154 (0x9a) .maxstack 6 + .locals init ([0] string V_0, + [1] string w) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 IL_0001: ldfld int32 Linq101Aggregates01/longestLength@77::pc @@ -4329,7 +4054,7 @@ IL_001b, IL_001d, IL_001f) - IL_0019: br.s IL_002d + IL_0019: br.s IL_002a IL_001b: br.s IL_0021 @@ -4339,203 +4064,190 @@ .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br.s IL_0095 + IL_0022: br.s IL_0070 .line 100001,100001 : 0,0 '' IL_0024: nop - IL_0025: br.s IL_0084 + IL_0025: br.s IL_006d .line 100001,100001 : 0,0 '' IL_0027: nop - IL_0028: br IL_00b6 + IL_0028: br.s IL_0091 .line 100001,100001 : 0,0 '' - IL_002d: nop + IL_002a: nop .line 77,77 : 29,46 '' - IL_002e: ldarg.0 - IL_002f: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_words() - IL_0034: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0039: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/longestLength@77::'enum' - IL_003e: ldarg.0 - IL_003f: ldc.i4.1 - IL_0040: stfld int32 Linq101Aggregates01/longestLength@77::pc + IL_002b: ldarg.0 + IL_002c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_words() + IL_0031: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0036: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/longestLength@77::'enum' + IL_003b: ldarg.0 + IL_003c: ldc.i4.1 + IL_003d: stfld int32 Linq101Aggregates01/longestLength@77::pc .line 77,77 : 29,46 '' - IL_0045: ldarg.0 - IL_0046: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/longestLength@77::'enum' - IL_004b: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0050: brfalse.s IL_0095 - - IL_0052: ldarg.0 - IL_0053: ldarg.0 - IL_0054: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/longestLength@77::'enum' - IL_0059: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_005e: stfld string Linq101Aggregates01/longestLength@77::_arg1 + IL_0042: ldarg.0 + IL_0043: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/longestLength@77::'enum' + IL_0048: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_004d: brfalse.s IL_0070 + + IL_004f: ldarg.0 + IL_0050: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/longestLength@77::'enum' + IL_0055: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_005a: stloc.0 .line 77,77 : 29,46 '' - IL_0063: ldarg.0 - IL_0064: ldarg.0 - IL_0065: ldfld string Linq101Aggregates01/longestLength@77::_arg1 - IL_006a: stfld string Linq101Aggregates01/longestLength@77::w - IL_006f: ldarg.0 - IL_0070: ldc.i4.2 - IL_0071: stfld int32 Linq101Aggregates01/longestLength@77::pc + IL_005b: ldloc.0 + IL_005c: stloc.1 + IL_005d: ldarg.0 + IL_005e: ldc.i4.2 + IL_005f: stfld int32 Linq101Aggregates01/longestLength@77::pc .line 77,77 : 47,61 '' - IL_0076: ldarg.0 - IL_0077: ldarg.0 - IL_0078: ldfld string Linq101Aggregates01/longestLength@77::w - IL_007d: stfld string Linq101Aggregates01/longestLength@77::current - IL_0082: ldc.i4.1 - IL_0083: ret + IL_0064: ldarg.0 + IL_0065: ldloc.1 + IL_0066: stfld string Linq101Aggregates01/longestLength@77::current + IL_006b: ldc.i4.1 + IL_006c: ret - IL_0084: ldarg.0 - IL_0085: ldnull - IL_0086: stfld string Linq101Aggregates01/longestLength@77::w - .line 77,77 : 29,46 '' - IL_008b: ldarg.0 - IL_008c: ldnull - IL_008d: stfld string Linq101Aggregates01/longestLength@77::_arg1 .line 100001,100001 : 0,0 '' - IL_0092: nop - IL_0093: br.s IL_0045 + IL_006d: nop + IL_006e: br.s IL_0042 - IL_0095: ldarg.0 - IL_0096: ldc.i4.3 - IL_0097: stfld int32 Linq101Aggregates01/longestLength@77::pc + IL_0070: ldarg.0 + IL_0071: ldc.i4.3 + IL_0072: stfld int32 Linq101Aggregates01/longestLength@77::pc .line 77,77 : 29,46 '' - IL_009c: ldarg.0 - IL_009d: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/longestLength@77::'enum' - IL_00a2: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_00a7: nop - IL_00a8: ldarg.0 - IL_00a9: ldnull - IL_00aa: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/longestLength@77::'enum' - IL_00af: ldarg.0 - IL_00b0: ldc.i4.3 - IL_00b1: stfld int32 Linq101Aggregates01/longestLength@77::pc - IL_00b6: ldarg.0 - IL_00b7: ldnull - IL_00b8: stfld string Linq101Aggregates01/longestLength@77::current - IL_00bd: ldc.i4.0 - IL_00be: ret + IL_0077: ldarg.0 + IL_0078: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/longestLength@77::'enum' + IL_007d: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0082: nop + IL_0083: ldarg.0 + IL_0084: ldnull + IL_0085: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/longestLength@77::'enum' + IL_008a: ldarg.0 + IL_008b: ldc.i4.3 + IL_008c: stfld int32 Linq101Aggregates01/longestLength@77::pc + IL_0091: ldarg.0 + IL_0092: ldnull + IL_0093: stfld string Linq101Aggregates01/longestLength@77::current + IL_0098: ldc.i4.0 + IL_0099: ret } // end of method longestLength@77::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 150 (0x96) + // Code size 148 (0x94) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [FSharp.Core]Microsoft.FSharp.Core.Unit V_1, [2] class [mscorlib]System.Exception e) .line 100001,100001 : 0,0 '' - IL_0000: ldnull - IL_0001: stloc.0 - IL_0002: ldarg.0 - IL_0003: ldfld int32 Linq101Aggregates01/longestLength@77::pc - IL_0008: ldc.i4.3 - IL_0009: sub - IL_000a: switch ( - IL_0015) - IL_0013: br.s IL_001b + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Aggregates01/longestLength@77::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0019 .line 100001,100001 : 0,0 '' - IL_0015: nop - IL_0016: br IL_0089 + IL_0013: nop + IL_0014: br IL_0087 .line 100001,100001 : 0,0 '' - IL_001b: nop + IL_0019: nop .try { - IL_001c: ldarg.0 - IL_001d: ldfld int32 Linq101Aggregates01/longestLength@77::pc - IL_0022: switch ( + IL_001a: ldarg.0 + IL_001b: ldfld int32 Linq101Aggregates01/longestLength@77::pc + IL_0020: switch ( + IL_0037, IL_0039, IL_003b, - IL_003d, - IL_003f) - IL_0037: br.s IL_004d + IL_003d) + IL_0035: br.s IL_004b - IL_0039: br.s IL_0041 + IL_0037: br.s IL_003f - IL_003b: br.s IL_0044 + IL_0039: br.s IL_0042 - IL_003d: br.s IL_0047 + IL_003b: br.s IL_0045 - IL_003f: br.s IL_004a + IL_003d: br.s IL_0048 .line 100001,100001 : 0,0 '' - IL_0041: nop - IL_0042: br.s IL_0063 + IL_003f: nop + IL_0040: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_0044: nop - IL_0045: br.s IL_004f + IL_0042: nop + IL_0043: br.s IL_004d .line 100001,100001 : 0,0 '' - IL_0047: nop - IL_0048: br.s IL_004e + IL_0045: nop + IL_0046: br.s IL_004c .line 100001,100001 : 0,0 '' - IL_004a: nop - IL_004b: br.s IL_0063 + IL_0048: nop + IL_0049: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_004d: nop + IL_004b: nop .line 100001,100001 : 0,0 '' - IL_004e: nop - IL_004f: ldarg.0 - IL_0050: ldc.i4.3 - IL_0051: stfld int32 Linq101Aggregates01/longestLength@77::pc - IL_0056: ldarg.0 - IL_0057: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/longestLength@77::'enum' - IL_005c: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_0061: nop + IL_004c: nop + IL_004d: ldarg.0 + IL_004e: ldc.i4.3 + IL_004f: stfld int32 Linq101Aggregates01/longestLength@77::pc + IL_0054: ldarg.0 + IL_0055: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/longestLength@77::'enum' + IL_005a: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_005f: nop .line 100001,100001 : 0,0 '' - IL_0062: nop - IL_0063: ldarg.0 - IL_0064: ldc.i4.3 - IL_0065: stfld int32 Linq101Aggregates01/longestLength@77::pc - IL_006a: ldarg.0 - IL_006b: ldnull - IL_006c: stfld string Linq101Aggregates01/longestLength@77::current - IL_0071: ldnull - IL_0072: stloc.1 - IL_0073: leave.s IL_0081 + IL_0060: nop + IL_0061: ldarg.0 + IL_0062: ldc.i4.3 + IL_0063: stfld int32 Linq101Aggregates01/longestLength@77::pc + IL_0068: ldarg.0 + IL_0069: ldnull + IL_006a: stfld string Linq101Aggregates01/longestLength@77::current + IL_006f: ldnull + IL_0070: stloc.1 + IL_0071: leave.s IL_007f } // end .try catch [mscorlib]System.Object { - IL_0075: castclass [mscorlib]System.Exception - IL_007a: stloc.2 + IL_0073: castclass [mscorlib]System.Exception + IL_0078: stloc.2 .line 77,77 : 29,46 '' - IL_007b: ldloc.2 - IL_007c: stloc.0 - IL_007d: ldnull - IL_007e: stloc.1 - IL_007f: leave.s IL_0081 + IL_0079: ldloc.2 + IL_007a: stloc.0 + IL_007b: ldnull + IL_007c: stloc.1 + IL_007d: leave.s IL_007f .line 100001,100001 : 0,0 '' } // end handler - IL_0081: ldloc.1 - IL_0082: pop + IL_007f: ldloc.1 + IL_0080: pop .line 100001,100001 : 0,0 '' - IL_0083: nop - IL_0084: br IL_0002 + IL_0081: nop + IL_0082: br IL_0000 - IL_0089: ldloc.0 - IL_008a: ldnull - IL_008b: cgt.un - IL_008d: brfalse.s IL_0091 + IL_0087: ldloc.0 + IL_0088: ldnull + IL_0089: cgt.un + IL_008b: brfalse.s IL_008f - IL_008f: br.s IL_0093 + IL_008d: br.s IL_0091 - IL_0091: br.s IL_0095 + IL_008f: br.s IL_0093 .line 100001,100001 : 0,0 '' - IL_0093: ldloc.0 - IL_0094: throw + IL_0091: ldloc.0 + IL_0092: throw .line 100001,100001 : 0,0 '' - IL_0095: ret + IL_0093: ret } // end of method longestLength@77::Close .method public strict virtual instance bool @@ -4606,19 +4318,15 @@ { .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 ) - // Code size 11 (0xb) - .maxstack 9 + // Code size 9 (0x9) + .maxstack 8 IL_0000: ldnull - IL_0001: ldnull + IL_0001: ldc.i4.0 IL_0002: ldnull - IL_0003: ldc.i4.0 - IL_0004: ldnull - IL_0005: newobj instance void Linq101Aggregates01/longestLength@77::.ctor(string, - string, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0003: newobj instance void Linq101Aggregates01/longestLength@77::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, string) - IL_000a: ret + IL_0008: ret } // end of method longestLength@77::GetFreshEnumerator } // end of class longestLength@77 @@ -4754,11 +4462,6 @@ { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) .field public class [System.Core]System.Linq.IGrouping`2 g - .field public class [Utils]Utils/Product _arg3 - .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 ) - .field public class [Utils]Utils/Product x .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' .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 ) @@ -4773,42 +4476,36 @@ .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .method public specialname rtspecialname instance void .ctor(class [System.Core]System.Linq.IGrouping`2 g, - class [Utils]Utils/Product _arg3, - class [Utils]Utils/Product x, class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', int32 pc, class [Utils]Utils/Product current) cil managed { - // Code size 52 (0x34) + // Code size 36 (0x24) .maxstack 8 IL_0000: ldarg.0 IL_0001: ldarg.1 IL_0002: stfld class [System.Core]System.Linq.IGrouping`2 Linq101Aggregates01/mostExpensivePrice@84::g IL_0007: ldarg.0 IL_0008: ldarg.2 - IL_0009: stfld class [Utils]Utils/Product Linq101Aggregates01/mostExpensivePrice@84::_arg3 + IL_0009: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/mostExpensivePrice@84::'enum' IL_000e: ldarg.0 IL_000f: ldarg.3 - IL_0010: stfld class [Utils]Utils/Product Linq101Aggregates01/mostExpensivePrice@84::x + IL_0010: stfld int32 Linq101Aggregates01/mostExpensivePrice@84::pc IL_0015: ldarg.0 - IL_0016: ldarg.s 'enum' - IL_0018: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/mostExpensivePrice@84::'enum' + IL_0016: ldarg.s current + IL_0018: stfld class [Utils]Utils/Product Linq101Aggregates01/mostExpensivePrice@84::current IL_001d: ldarg.0 - IL_001e: ldarg.s pc - IL_0020: stfld int32 Linq101Aggregates01/mostExpensivePrice@84::pc - IL_0025: ldarg.0 - IL_0026: ldarg.s current - IL_0028: stfld class [Utils]Utils/Product Linq101Aggregates01/mostExpensivePrice@84::current - IL_002d: ldarg.0 - IL_002e: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() - IL_0033: ret + IL_001e: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_0023: ret } // end of method mostExpensivePrice@84::.ctor .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 192 (0xc0) + // Code size 155 (0x9b) .maxstack 6 + .locals init ([0] class [Utils]Utils/Product V_0, + [1] class [Utils]Utils/Product x) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 IL_0001: ldfld int32 Linq101Aggregates01/mostExpensivePrice@84::pc @@ -4818,7 +4515,7 @@ IL_001b, IL_001d, IL_001f) - IL_0019: br.s IL_002d + IL_0019: br.s IL_002a IL_001b: br.s IL_0021 @@ -4828,204 +4525,191 @@ .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br.s IL_0096 + IL_0022: br.s IL_0071 .line 100001,100001 : 0,0 '' IL_0024: nop - IL_0025: br.s IL_0085 + IL_0025: br.s IL_006e .line 100001,100001 : 0,0 '' IL_0027: nop - IL_0028: br IL_00b7 + IL_0028: br.s IL_0092 .line 100001,100001 : 0,0 '' - IL_002d: nop + IL_002a: nop .line 84,84 : 42,55 '' - IL_002e: ldarg.0 - IL_002f: ldarg.0 - IL_0030: ldfld class [System.Core]System.Linq.IGrouping`2 Linq101Aggregates01/mostExpensivePrice@84::g - IL_0035: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_003a: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/mostExpensivePrice@84::'enum' - IL_003f: ldarg.0 - IL_0040: ldc.i4.1 - IL_0041: stfld int32 Linq101Aggregates01/mostExpensivePrice@84::pc + IL_002b: ldarg.0 + IL_002c: ldarg.0 + IL_002d: ldfld class [System.Core]System.Linq.IGrouping`2 Linq101Aggregates01/mostExpensivePrice@84::g + IL_0032: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0037: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/mostExpensivePrice@84::'enum' + IL_003c: ldarg.0 + IL_003d: ldc.i4.1 + IL_003e: stfld int32 Linq101Aggregates01/mostExpensivePrice@84::pc .line 84,84 : 42,55 '' - IL_0046: ldarg.0 - IL_0047: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/mostExpensivePrice@84::'enum' - IL_004c: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0051: brfalse.s IL_0096 - - IL_0053: ldarg.0 - IL_0054: ldarg.0 - IL_0055: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/mostExpensivePrice@84::'enum' - IL_005a: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_005f: stfld class [Utils]Utils/Product Linq101Aggregates01/mostExpensivePrice@84::_arg3 + IL_0043: ldarg.0 + IL_0044: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/mostExpensivePrice@84::'enum' + IL_0049: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_004e: brfalse.s IL_0071 + + IL_0050: ldarg.0 + IL_0051: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/mostExpensivePrice@84::'enum' + IL_0056: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_005b: stloc.0 .line 84,84 : 42,55 '' - IL_0064: ldarg.0 - IL_0065: ldarg.0 - IL_0066: ldfld class [Utils]Utils/Product Linq101Aggregates01/mostExpensivePrice@84::_arg3 - IL_006b: stfld class [Utils]Utils/Product Linq101Aggregates01/mostExpensivePrice@84::x - IL_0070: ldarg.0 - IL_0071: ldc.i4.2 - IL_0072: stfld int32 Linq101Aggregates01/mostExpensivePrice@84::pc + IL_005c: ldloc.0 + IL_005d: stloc.1 + IL_005e: ldarg.0 + IL_005f: ldc.i4.2 + IL_0060: stfld int32 Linq101Aggregates01/mostExpensivePrice@84::pc .line 84,84 : 56,73 '' - IL_0077: ldarg.0 - IL_0078: ldarg.0 - IL_0079: ldfld class [Utils]Utils/Product Linq101Aggregates01/mostExpensivePrice@84::x - IL_007e: stfld class [Utils]Utils/Product Linq101Aggregates01/mostExpensivePrice@84::current - IL_0083: ldc.i4.1 - IL_0084: ret - - IL_0085: ldarg.0 - IL_0086: ldnull - IL_0087: stfld class [Utils]Utils/Product Linq101Aggregates01/mostExpensivePrice@84::x - .line 84,84 : 42,55 '' - IL_008c: ldarg.0 - IL_008d: ldnull - IL_008e: stfld class [Utils]Utils/Product Linq101Aggregates01/mostExpensivePrice@84::_arg3 + IL_0065: ldarg.0 + IL_0066: ldloc.1 + IL_0067: stfld class [Utils]Utils/Product Linq101Aggregates01/mostExpensivePrice@84::current + IL_006c: ldc.i4.1 + IL_006d: ret + .line 100001,100001 : 0,0 '' - IL_0093: nop - IL_0094: br.s IL_0046 + IL_006e: nop + IL_006f: br.s IL_0043 - IL_0096: ldarg.0 - IL_0097: ldc.i4.3 - IL_0098: stfld int32 Linq101Aggregates01/mostExpensivePrice@84::pc + IL_0071: ldarg.0 + IL_0072: ldc.i4.3 + IL_0073: stfld int32 Linq101Aggregates01/mostExpensivePrice@84::pc .line 84,84 : 42,55 '' - IL_009d: ldarg.0 - IL_009e: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/mostExpensivePrice@84::'enum' - IL_00a3: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_00a8: nop - IL_00a9: ldarg.0 - IL_00aa: ldnull - IL_00ab: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/mostExpensivePrice@84::'enum' - IL_00b0: ldarg.0 - IL_00b1: ldc.i4.3 - IL_00b2: stfld int32 Linq101Aggregates01/mostExpensivePrice@84::pc - IL_00b7: ldarg.0 - IL_00b8: ldnull - IL_00b9: stfld class [Utils]Utils/Product Linq101Aggregates01/mostExpensivePrice@84::current - IL_00be: ldc.i4.0 - IL_00bf: ret + IL_0078: ldarg.0 + IL_0079: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/mostExpensivePrice@84::'enum' + IL_007e: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0083: nop + IL_0084: ldarg.0 + IL_0085: ldnull + IL_0086: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/mostExpensivePrice@84::'enum' + IL_008b: ldarg.0 + IL_008c: ldc.i4.3 + IL_008d: stfld int32 Linq101Aggregates01/mostExpensivePrice@84::pc + IL_0092: ldarg.0 + IL_0093: ldnull + IL_0094: stfld class [Utils]Utils/Product Linq101Aggregates01/mostExpensivePrice@84::current + IL_0099: ldc.i4.0 + IL_009a: ret } // end of method mostExpensivePrice@84::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 150 (0x96) + // Code size 148 (0x94) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [FSharp.Core]Microsoft.FSharp.Core.Unit V_1, [2] class [mscorlib]System.Exception e) .line 100001,100001 : 0,0 '' - IL_0000: ldnull - IL_0001: stloc.0 - IL_0002: ldarg.0 - IL_0003: ldfld int32 Linq101Aggregates01/mostExpensivePrice@84::pc - IL_0008: ldc.i4.3 - IL_0009: sub - IL_000a: switch ( - IL_0015) - IL_0013: br.s IL_001b + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Aggregates01/mostExpensivePrice@84::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0019 .line 100001,100001 : 0,0 '' - IL_0015: nop - IL_0016: br IL_0089 + IL_0013: nop + IL_0014: br IL_0087 .line 100001,100001 : 0,0 '' - IL_001b: nop + IL_0019: nop .try { - IL_001c: ldarg.0 - IL_001d: ldfld int32 Linq101Aggregates01/mostExpensivePrice@84::pc - IL_0022: switch ( + IL_001a: ldarg.0 + IL_001b: ldfld int32 Linq101Aggregates01/mostExpensivePrice@84::pc + IL_0020: switch ( + IL_0037, IL_0039, IL_003b, - IL_003d, - IL_003f) - IL_0037: br.s IL_004d + IL_003d) + IL_0035: br.s IL_004b - IL_0039: br.s IL_0041 + IL_0037: br.s IL_003f - IL_003b: br.s IL_0044 + IL_0039: br.s IL_0042 - IL_003d: br.s IL_0047 + IL_003b: br.s IL_0045 - IL_003f: br.s IL_004a + IL_003d: br.s IL_0048 .line 100001,100001 : 0,0 '' - IL_0041: nop - IL_0042: br.s IL_0063 + IL_003f: nop + IL_0040: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_0044: nop - IL_0045: br.s IL_004f + IL_0042: nop + IL_0043: br.s IL_004d .line 100001,100001 : 0,0 '' - IL_0047: nop - IL_0048: br.s IL_004e + IL_0045: nop + IL_0046: br.s IL_004c .line 100001,100001 : 0,0 '' - IL_004a: nop - IL_004b: br.s IL_0063 + IL_0048: nop + IL_0049: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_004d: nop + IL_004b: nop .line 100001,100001 : 0,0 '' - IL_004e: nop - IL_004f: ldarg.0 - IL_0050: ldc.i4.3 - IL_0051: stfld int32 Linq101Aggregates01/mostExpensivePrice@84::pc - IL_0056: ldarg.0 - IL_0057: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/mostExpensivePrice@84::'enum' - IL_005c: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_0061: nop + IL_004c: nop + IL_004d: ldarg.0 + IL_004e: ldc.i4.3 + IL_004f: stfld int32 Linq101Aggregates01/mostExpensivePrice@84::pc + IL_0054: ldarg.0 + IL_0055: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/mostExpensivePrice@84::'enum' + IL_005a: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_005f: nop .line 100001,100001 : 0,0 '' - IL_0062: nop - IL_0063: ldarg.0 - IL_0064: ldc.i4.3 - IL_0065: stfld int32 Linq101Aggregates01/mostExpensivePrice@84::pc - IL_006a: ldarg.0 - IL_006b: ldnull - IL_006c: stfld class [Utils]Utils/Product Linq101Aggregates01/mostExpensivePrice@84::current - IL_0071: ldnull - IL_0072: stloc.1 - IL_0073: leave.s IL_0081 + IL_0060: nop + IL_0061: ldarg.0 + IL_0062: ldc.i4.3 + IL_0063: stfld int32 Linq101Aggregates01/mostExpensivePrice@84::pc + IL_0068: ldarg.0 + IL_0069: ldnull + IL_006a: stfld class [Utils]Utils/Product Linq101Aggregates01/mostExpensivePrice@84::current + IL_006f: ldnull + IL_0070: stloc.1 + IL_0071: leave.s IL_007f } // end .try catch [mscorlib]System.Object { - IL_0075: castclass [mscorlib]System.Exception - IL_007a: stloc.2 + IL_0073: castclass [mscorlib]System.Exception + IL_0078: stloc.2 .line 84,84 : 42,55 '' - IL_007b: ldloc.2 - IL_007c: stloc.0 - IL_007d: ldnull - IL_007e: stloc.1 - IL_007f: leave.s IL_0081 + IL_0079: ldloc.2 + IL_007a: stloc.0 + IL_007b: ldnull + IL_007c: stloc.1 + IL_007d: leave.s IL_007f .line 100001,100001 : 0,0 '' } // end handler - IL_0081: ldloc.1 - IL_0082: pop + IL_007f: ldloc.1 + IL_0080: pop .line 100001,100001 : 0,0 '' - IL_0083: nop - IL_0084: br IL_0002 + IL_0081: nop + IL_0082: br IL_0000 - IL_0089: ldloc.0 - IL_008a: ldnull - IL_008b: cgt.un - IL_008d: brfalse.s IL_0091 + IL_0087: ldloc.0 + IL_0088: ldnull + IL_0089: cgt.un + IL_008b: brfalse.s IL_008f - IL_008f: br.s IL_0093 + IL_008d: br.s IL_0091 - IL_0091: br.s IL_0095 + IL_008f: br.s IL_0093 .line 100001,100001 : 0,0 '' - IL_0093: ldloc.0 - IL_0094: throw + IL_0091: ldloc.0 + IL_0092: throw .line 100001,100001 : 0,0 '' - IL_0095: ret + IL_0093: ret } // end of method mostExpensivePrice@84::Close .method public strict virtual instance bool @@ -5096,22 +4780,18 @@ { .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 ) - // Code size 17 (0x11) - .maxstack 10 + // Code size 15 (0xf) + .maxstack 8 IL_0000: ldarg.0 IL_0001: ldfld class [System.Core]System.Linq.IGrouping`2 Linq101Aggregates01/mostExpensivePrice@84::g IL_0006: ldnull - IL_0007: ldnull + IL_0007: ldc.i4.0 IL_0008: ldnull - IL_0009: ldc.i4.0 - IL_000a: ldnull - IL_000b: newobj instance void Linq101Aggregates01/mostExpensivePrice@84::.ctor(class [System.Core]System.Linq.IGrouping`2, - class [Utils]Utils/Product, - class [Utils]Utils/Product, + IL_0009: newobj instance void Linq101Aggregates01/mostExpensivePrice@84::.ctor(class [System.Core]System.Linq.IGrouping`2, class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, class [Utils]Utils/Product) - IL_0010: ret + IL_000e: ret } // end of method mostExpensivePrice@84::GetFreshEnumerator } // end of class mostExpensivePrice@84 @@ -5170,8 +4850,8 @@ .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,valuetype [mscorlib]System.Decimal>,object> Invoke(class [System.Core]System.Linq.IGrouping`2 _arg2) cil managed { - // Code size 55 (0x37) - .maxstack 11 + // Code size 53 (0x35) + .maxstack 9 .locals init ([0] class [System.Core]System.Linq.IGrouping`2 g, [1] valuetype [mscorlib]System.Decimal mostExpensivePrice) .line 83,83 : 38,39 '' @@ -5180,31 +4860,27 @@ IL_0002: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_0007: ldloc.0 IL_0008: ldnull - IL_0009: ldnull + IL_0009: ldc.i4.0 IL_000a: ldnull - IL_000b: ldc.i4.0 - IL_000c: ldnull - IL_000d: newobj instance void Linq101Aggregates01/mostExpensivePrice@84::.ctor(class [System.Core]System.Linq.IGrouping`2, - class [Utils]Utils/Product, - class [Utils]Utils/Product, + IL_000b: newobj instance void Linq101Aggregates01/mostExpensivePrice@84::.ctor(class [System.Core]System.Linq.IGrouping`2, class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, class [Utils]Utils/Product) - IL_0012: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0017: newobj instance void Linq101Aggregates01/'mostExpensivePrice@84-1'::.ctor() - IL_001c: callvirt instance !!2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::MaxBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0010: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0015: newobj instance void Linq101Aggregates01/'mostExpensivePrice@84-1'::.ctor() + IL_001a: callvirt instance !!2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::MaxBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0021: stloc.1 + IL_001f: stloc.1 .line 85,85 : 9,43 '' - IL_0022: ldarg.0 - IL_0023: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Aggregates01/'categories4@83-3'::builder@ - IL_0028: ldloc.0 - IL_0029: ldloc.1 - IL_002a: newobj instance void class [mscorlib]System.Tuple`2,valuetype [mscorlib]System.Decimal>::.ctor(!0, + IL_0020: ldarg.0 + IL_0021: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Aggregates01/'categories4@83-3'::builder@ + IL_0026: ldloc.0 + IL_0027: ldloc.1 + IL_0028: newobj instance void class [mscorlib]System.Tuple`2,valuetype [mscorlib]System.Decimal>::.ctor(!0, !1) - IL_002f: tail. - IL_0031: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Yield,valuetype [mscorlib]System.Decimal>,object>(!!0) - IL_0036: ret + IL_002d: tail. + IL_002f: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Yield,valuetype [mscorlib]System.Decimal>,object>(!!0) + IL_0034: ret } // end of method 'categories4@83-3'::Invoke } // end of class 'categories4@83-3' @@ -5352,11 +5028,6 @@ { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) .field public class [System.Core]System.Linq.IGrouping`2 g - .field public class [Utils]Utils/Product _arg3 - .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 ) - .field public class [Utils]Utils/Product x .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' .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 ) @@ -5371,42 +5042,36 @@ .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .method public specialname rtspecialname instance void .ctor(class [System.Core]System.Linq.IGrouping`2 g, - class [Utils]Utils/Product _arg3, - class [Utils]Utils/Product x, class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', int32 pc, class [Utils]Utils/Product current) cil managed { - // Code size 52 (0x34) + // Code size 36 (0x24) .maxstack 8 IL_0000: ldarg.0 IL_0001: ldarg.1 IL_0002: stfld class [System.Core]System.Linq.IGrouping`2 Linq101Aggregates01/maxPrice@93::g IL_0007: ldarg.0 IL_0008: ldarg.2 - IL_0009: stfld class [Utils]Utils/Product Linq101Aggregates01/maxPrice@93::_arg3 + IL_0009: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/maxPrice@93::'enum' IL_000e: ldarg.0 IL_000f: ldarg.3 - IL_0010: stfld class [Utils]Utils/Product Linq101Aggregates01/maxPrice@93::x + IL_0010: stfld int32 Linq101Aggregates01/maxPrice@93::pc IL_0015: ldarg.0 - IL_0016: ldarg.s 'enum' - IL_0018: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/maxPrice@93::'enum' + IL_0016: ldarg.s current + IL_0018: stfld class [Utils]Utils/Product Linq101Aggregates01/maxPrice@93::current IL_001d: ldarg.0 - IL_001e: ldarg.s pc - IL_0020: stfld int32 Linq101Aggregates01/maxPrice@93::pc - IL_0025: ldarg.0 - IL_0026: ldarg.s current - IL_0028: stfld class [Utils]Utils/Product Linq101Aggregates01/maxPrice@93::current - IL_002d: ldarg.0 - IL_002e: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() - IL_0033: ret + IL_001e: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_0023: ret } // end of method maxPrice@93::.ctor .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 192 (0xc0) + // Code size 155 (0x9b) .maxstack 6 + .locals init ([0] class [Utils]Utils/Product V_0, + [1] class [Utils]Utils/Product x) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 IL_0001: ldfld int32 Linq101Aggregates01/maxPrice@93::pc @@ -5416,7 +5081,7 @@ IL_001b, IL_001d, IL_001f) - IL_0019: br.s IL_002d + IL_0019: br.s IL_002a IL_001b: br.s IL_0021 @@ -5426,204 +5091,191 @@ .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br.s IL_0096 + IL_0022: br.s IL_0071 .line 100001,100001 : 0,0 '' IL_0024: nop - IL_0025: br.s IL_0085 + IL_0025: br.s IL_006e .line 100001,100001 : 0,0 '' IL_0027: nop - IL_0028: br IL_00b7 + IL_0028: br.s IL_0092 .line 100001,100001 : 0,0 '' - IL_002d: nop + IL_002a: nop .line 93,93 : 32,45 '' - IL_002e: ldarg.0 - IL_002f: ldarg.0 - IL_0030: ldfld class [System.Core]System.Linq.IGrouping`2 Linq101Aggregates01/maxPrice@93::g - IL_0035: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_003a: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/maxPrice@93::'enum' - IL_003f: ldarg.0 - IL_0040: ldc.i4.1 - IL_0041: stfld int32 Linq101Aggregates01/maxPrice@93::pc + IL_002b: ldarg.0 + IL_002c: ldarg.0 + IL_002d: ldfld class [System.Core]System.Linq.IGrouping`2 Linq101Aggregates01/maxPrice@93::g + IL_0032: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0037: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/maxPrice@93::'enum' + IL_003c: ldarg.0 + IL_003d: ldc.i4.1 + IL_003e: stfld int32 Linq101Aggregates01/maxPrice@93::pc .line 93,93 : 32,45 '' - IL_0046: ldarg.0 - IL_0047: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/maxPrice@93::'enum' - IL_004c: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0051: brfalse.s IL_0096 - - IL_0053: ldarg.0 - IL_0054: ldarg.0 - IL_0055: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/maxPrice@93::'enum' - IL_005a: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_005f: stfld class [Utils]Utils/Product Linq101Aggregates01/maxPrice@93::_arg3 + IL_0043: ldarg.0 + IL_0044: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/maxPrice@93::'enum' + IL_0049: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_004e: brfalse.s IL_0071 + + IL_0050: ldarg.0 + IL_0051: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/maxPrice@93::'enum' + IL_0056: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_005b: stloc.0 .line 93,93 : 32,45 '' - IL_0064: ldarg.0 - IL_0065: ldarg.0 - IL_0066: ldfld class [Utils]Utils/Product Linq101Aggregates01/maxPrice@93::_arg3 - IL_006b: stfld class [Utils]Utils/Product Linq101Aggregates01/maxPrice@93::x - IL_0070: ldarg.0 - IL_0071: ldc.i4.2 - IL_0072: stfld int32 Linq101Aggregates01/maxPrice@93::pc + IL_005c: ldloc.0 + IL_005d: stloc.1 + IL_005e: ldarg.0 + IL_005f: ldc.i4.2 + IL_0060: stfld int32 Linq101Aggregates01/maxPrice@93::pc .line 93,93 : 46,63 '' - IL_0077: ldarg.0 - IL_0078: ldarg.0 - IL_0079: ldfld class [Utils]Utils/Product Linq101Aggregates01/maxPrice@93::x - IL_007e: stfld class [Utils]Utils/Product Linq101Aggregates01/maxPrice@93::current - IL_0083: ldc.i4.1 - IL_0084: ret - - IL_0085: ldarg.0 - IL_0086: ldnull - IL_0087: stfld class [Utils]Utils/Product Linq101Aggregates01/maxPrice@93::x - .line 93,93 : 32,45 '' - IL_008c: ldarg.0 - IL_008d: ldnull - IL_008e: stfld class [Utils]Utils/Product Linq101Aggregates01/maxPrice@93::_arg3 + IL_0065: ldarg.0 + IL_0066: ldloc.1 + IL_0067: stfld class [Utils]Utils/Product Linq101Aggregates01/maxPrice@93::current + IL_006c: ldc.i4.1 + IL_006d: ret + .line 100001,100001 : 0,0 '' - IL_0093: nop - IL_0094: br.s IL_0046 + IL_006e: nop + IL_006f: br.s IL_0043 - IL_0096: ldarg.0 - IL_0097: ldc.i4.3 - IL_0098: stfld int32 Linq101Aggregates01/maxPrice@93::pc + IL_0071: ldarg.0 + IL_0072: ldc.i4.3 + IL_0073: stfld int32 Linq101Aggregates01/maxPrice@93::pc .line 93,93 : 32,45 '' - IL_009d: ldarg.0 - IL_009e: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/maxPrice@93::'enum' - IL_00a3: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_00a8: nop - IL_00a9: ldarg.0 - IL_00aa: ldnull - IL_00ab: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/maxPrice@93::'enum' - IL_00b0: ldarg.0 - IL_00b1: ldc.i4.3 - IL_00b2: stfld int32 Linq101Aggregates01/maxPrice@93::pc - IL_00b7: ldarg.0 - IL_00b8: ldnull - IL_00b9: stfld class [Utils]Utils/Product Linq101Aggregates01/maxPrice@93::current - IL_00be: ldc.i4.0 - IL_00bf: ret + IL_0078: ldarg.0 + IL_0079: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/maxPrice@93::'enum' + IL_007e: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0083: nop + IL_0084: ldarg.0 + IL_0085: ldnull + IL_0086: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/maxPrice@93::'enum' + IL_008b: ldarg.0 + IL_008c: ldc.i4.3 + IL_008d: stfld int32 Linq101Aggregates01/maxPrice@93::pc + IL_0092: ldarg.0 + IL_0093: ldnull + IL_0094: stfld class [Utils]Utils/Product Linq101Aggregates01/maxPrice@93::current + IL_0099: ldc.i4.0 + IL_009a: ret } // end of method maxPrice@93::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 150 (0x96) + // Code size 148 (0x94) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [FSharp.Core]Microsoft.FSharp.Core.Unit V_1, [2] class [mscorlib]System.Exception e) .line 100001,100001 : 0,0 '' - IL_0000: ldnull - IL_0001: stloc.0 - IL_0002: ldarg.0 - IL_0003: ldfld int32 Linq101Aggregates01/maxPrice@93::pc - IL_0008: ldc.i4.3 - IL_0009: sub - IL_000a: switch ( - IL_0015) - IL_0013: br.s IL_001b + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Aggregates01/maxPrice@93::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0019 .line 100001,100001 : 0,0 '' - IL_0015: nop - IL_0016: br IL_0089 + IL_0013: nop + IL_0014: br IL_0087 .line 100001,100001 : 0,0 '' - IL_001b: nop + IL_0019: nop .try { - IL_001c: ldarg.0 - IL_001d: ldfld int32 Linq101Aggregates01/maxPrice@93::pc - IL_0022: switch ( + IL_001a: ldarg.0 + IL_001b: ldfld int32 Linq101Aggregates01/maxPrice@93::pc + IL_0020: switch ( + IL_0037, IL_0039, IL_003b, - IL_003d, - IL_003f) - IL_0037: br.s IL_004d + IL_003d) + IL_0035: br.s IL_004b - IL_0039: br.s IL_0041 + IL_0037: br.s IL_003f - IL_003b: br.s IL_0044 + IL_0039: br.s IL_0042 - IL_003d: br.s IL_0047 + IL_003b: br.s IL_0045 - IL_003f: br.s IL_004a + IL_003d: br.s IL_0048 .line 100001,100001 : 0,0 '' - IL_0041: nop - IL_0042: br.s IL_0063 + IL_003f: nop + IL_0040: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_0044: nop - IL_0045: br.s IL_004f + IL_0042: nop + IL_0043: br.s IL_004d .line 100001,100001 : 0,0 '' - IL_0047: nop - IL_0048: br.s IL_004e + IL_0045: nop + IL_0046: br.s IL_004c .line 100001,100001 : 0,0 '' - IL_004a: nop - IL_004b: br.s IL_0063 + IL_0048: nop + IL_0049: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_004d: nop + IL_004b: nop .line 100001,100001 : 0,0 '' - IL_004e: nop - IL_004f: ldarg.0 - IL_0050: ldc.i4.3 - IL_0051: stfld int32 Linq101Aggregates01/maxPrice@93::pc - IL_0056: ldarg.0 - IL_0057: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/maxPrice@93::'enum' - IL_005c: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_0061: nop + IL_004c: nop + IL_004d: ldarg.0 + IL_004e: ldc.i4.3 + IL_004f: stfld int32 Linq101Aggregates01/maxPrice@93::pc + IL_0054: ldarg.0 + IL_0055: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/maxPrice@93::'enum' + IL_005a: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_005f: nop .line 100001,100001 : 0,0 '' - IL_0062: nop - IL_0063: ldarg.0 - IL_0064: ldc.i4.3 - IL_0065: stfld int32 Linq101Aggregates01/maxPrice@93::pc - IL_006a: ldarg.0 - IL_006b: ldnull - IL_006c: stfld class [Utils]Utils/Product Linq101Aggregates01/maxPrice@93::current - IL_0071: ldnull - IL_0072: stloc.1 - IL_0073: leave.s IL_0081 + IL_0060: nop + IL_0061: ldarg.0 + IL_0062: ldc.i4.3 + IL_0063: stfld int32 Linq101Aggregates01/maxPrice@93::pc + IL_0068: ldarg.0 + IL_0069: ldnull + IL_006a: stfld class [Utils]Utils/Product Linq101Aggregates01/maxPrice@93::current + IL_006f: ldnull + IL_0070: stloc.1 + IL_0071: leave.s IL_007f } // end .try catch [mscorlib]System.Object { - IL_0075: castclass [mscorlib]System.Exception - IL_007a: stloc.2 + IL_0073: castclass [mscorlib]System.Exception + IL_0078: stloc.2 .line 93,93 : 32,45 '' - IL_007b: ldloc.2 - IL_007c: stloc.0 - IL_007d: ldnull - IL_007e: stloc.1 - IL_007f: leave.s IL_0081 + IL_0079: ldloc.2 + IL_007a: stloc.0 + IL_007b: ldnull + IL_007c: stloc.1 + IL_007d: leave.s IL_007f .line 100001,100001 : 0,0 '' } // end handler - IL_0081: ldloc.1 - IL_0082: pop + IL_007f: ldloc.1 + IL_0080: pop .line 100001,100001 : 0,0 '' - IL_0083: nop - IL_0084: br IL_0002 + IL_0081: nop + IL_0082: br IL_0000 - IL_0089: ldloc.0 - IL_008a: ldnull - IL_008b: cgt.un - IL_008d: brfalse.s IL_0091 + IL_0087: ldloc.0 + IL_0088: ldnull + IL_0089: cgt.un + IL_008b: brfalse.s IL_008f - IL_008f: br.s IL_0093 + IL_008d: br.s IL_0091 - IL_0091: br.s IL_0095 + IL_008f: br.s IL_0093 .line 100001,100001 : 0,0 '' - IL_0093: ldloc.0 - IL_0094: throw + IL_0091: ldloc.0 + IL_0092: throw .line 100001,100001 : 0,0 '' - IL_0095: ret + IL_0093: ret } // end of method maxPrice@93::Close .method public strict virtual instance bool @@ -5694,22 +5346,18 @@ { .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 ) - // Code size 17 (0x11) - .maxstack 10 + // Code size 15 (0xf) + .maxstack 8 IL_0000: ldarg.0 IL_0001: ldfld class [System.Core]System.Linq.IGrouping`2 Linq101Aggregates01/maxPrice@93::g IL_0006: ldnull - IL_0007: ldnull + IL_0007: ldc.i4.0 IL_0008: ldnull - IL_0009: ldc.i4.0 - IL_000a: ldnull - IL_000b: newobj instance void Linq101Aggregates01/maxPrice@93::.ctor(class [System.Core]System.Linq.IGrouping`2, - class [Utils]Utils/Product, - class [Utils]Utils/Product, + IL_0009: newobj instance void Linq101Aggregates01/maxPrice@93::.ctor(class [System.Core]System.Linq.IGrouping`2, class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, class [Utils]Utils/Product) - IL_0010: ret + IL_000e: ret } // end of method maxPrice@93::GetFreshEnumerator } // end of class maxPrice@93 @@ -5748,11 +5396,6 @@ { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) .field public class [System.Core]System.Linq.IGrouping`2 g - .field public class [Utils]Utils/Product _arg4 - .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 ) - .field public class [Utils]Utils/Product x .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' .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 ) @@ -5767,42 +5410,36 @@ .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .method public specialname rtspecialname instance void .ctor(class [System.Core]System.Linq.IGrouping`2 g, - class [Utils]Utils/Product _arg4, - class [Utils]Utils/Product x, class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', int32 pc, class [Utils]Utils/Product current) cil managed { - // Code size 52 (0x34) + // Code size 36 (0x24) .maxstack 8 IL_0000: ldarg.0 IL_0001: ldarg.1 IL_0002: stfld class [System.Core]System.Linq.IGrouping`2 Linq101Aggregates01/mostExpensiveProducts@94::g IL_0007: ldarg.0 IL_0008: ldarg.2 - IL_0009: stfld class [Utils]Utils/Product Linq101Aggregates01/mostExpensiveProducts@94::_arg4 + IL_0009: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/mostExpensiveProducts@94::'enum' IL_000e: ldarg.0 IL_000f: ldarg.3 - IL_0010: stfld class [Utils]Utils/Product Linq101Aggregates01/mostExpensiveProducts@94::x + IL_0010: stfld int32 Linq101Aggregates01/mostExpensiveProducts@94::pc IL_0015: ldarg.0 - IL_0016: ldarg.s 'enum' - IL_0018: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/mostExpensiveProducts@94::'enum' + IL_0016: ldarg.s current + IL_0018: stfld class [Utils]Utils/Product Linq101Aggregates01/mostExpensiveProducts@94::current IL_001d: ldarg.0 - IL_001e: ldarg.s pc - IL_0020: stfld int32 Linq101Aggregates01/mostExpensiveProducts@94::pc - IL_0025: ldarg.0 - IL_0026: ldarg.s current - IL_0028: stfld class [Utils]Utils/Product Linq101Aggregates01/mostExpensiveProducts@94::current - IL_002d: ldarg.0 - IL_002e: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() - IL_0033: ret + IL_001e: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_0023: ret } // end of method mostExpensiveProducts@94::.ctor .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 192 (0xc0) + // Code size 155 (0x9b) .maxstack 6 + .locals init ([0] class [Utils]Utils/Product V_0, + [1] class [Utils]Utils/Product x) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 IL_0001: ldfld int32 Linq101Aggregates01/mostExpensiveProducts@94::pc @@ -5812,7 +5449,7 @@ IL_001b, IL_001d, IL_001f) - IL_0019: br.s IL_002d + IL_0019: br.s IL_002a IL_001b: br.s IL_0021 @@ -5822,204 +5459,191 @@ .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br.s IL_0096 + IL_0022: br.s IL_0071 .line 100001,100001 : 0,0 '' IL_0024: nop - IL_0025: br.s IL_0085 + IL_0025: br.s IL_006e .line 100001,100001 : 0,0 '' IL_0027: nop - IL_0028: br IL_00b7 + IL_0028: br.s IL_0092 .line 100001,100001 : 0,0 '' - IL_002d: nop + IL_002a: nop .line 94,94 : 45,58 '' - IL_002e: ldarg.0 - IL_002f: ldarg.0 - IL_0030: ldfld class [System.Core]System.Linq.IGrouping`2 Linq101Aggregates01/mostExpensiveProducts@94::g - IL_0035: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_003a: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/mostExpensiveProducts@94::'enum' - IL_003f: ldarg.0 - IL_0040: ldc.i4.1 - IL_0041: stfld int32 Linq101Aggregates01/mostExpensiveProducts@94::pc + IL_002b: ldarg.0 + IL_002c: ldarg.0 + IL_002d: ldfld class [System.Core]System.Linq.IGrouping`2 Linq101Aggregates01/mostExpensiveProducts@94::g + IL_0032: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0037: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/mostExpensiveProducts@94::'enum' + IL_003c: ldarg.0 + IL_003d: ldc.i4.1 + IL_003e: stfld int32 Linq101Aggregates01/mostExpensiveProducts@94::pc .line 94,94 : 45,58 '' - IL_0046: ldarg.0 - IL_0047: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/mostExpensiveProducts@94::'enum' - IL_004c: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0051: brfalse.s IL_0096 - - IL_0053: ldarg.0 - IL_0054: ldarg.0 - IL_0055: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/mostExpensiveProducts@94::'enum' - IL_005a: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_005f: stfld class [Utils]Utils/Product Linq101Aggregates01/mostExpensiveProducts@94::_arg4 + IL_0043: ldarg.0 + IL_0044: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/mostExpensiveProducts@94::'enum' + IL_0049: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_004e: brfalse.s IL_0071 + + IL_0050: ldarg.0 + IL_0051: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/mostExpensiveProducts@94::'enum' + IL_0056: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_005b: stloc.0 .line 94,94 : 45,58 '' - IL_0064: ldarg.0 - IL_0065: ldarg.0 - IL_0066: ldfld class [Utils]Utils/Product Linq101Aggregates01/mostExpensiveProducts@94::_arg4 - IL_006b: stfld class [Utils]Utils/Product Linq101Aggregates01/mostExpensiveProducts@94::x - IL_0070: ldarg.0 - IL_0071: ldc.i4.2 - IL_0072: stfld int32 Linq101Aggregates01/mostExpensiveProducts@94::pc + IL_005c: ldloc.0 + IL_005d: stloc.1 + IL_005e: ldarg.0 + IL_005f: ldc.i4.2 + IL_0060: stfld int32 Linq101Aggregates01/mostExpensiveProducts@94::pc .line 94,94 : 59,89 '' - IL_0077: ldarg.0 - IL_0078: ldarg.0 - IL_0079: ldfld class [Utils]Utils/Product Linq101Aggregates01/mostExpensiveProducts@94::x - IL_007e: stfld class [Utils]Utils/Product Linq101Aggregates01/mostExpensiveProducts@94::current - IL_0083: ldc.i4.1 - IL_0084: ret - - IL_0085: ldarg.0 - IL_0086: ldnull - IL_0087: stfld class [Utils]Utils/Product Linq101Aggregates01/mostExpensiveProducts@94::x - .line 94,94 : 45,58 '' - IL_008c: ldarg.0 - IL_008d: ldnull - IL_008e: stfld class [Utils]Utils/Product Linq101Aggregates01/mostExpensiveProducts@94::_arg4 + IL_0065: ldarg.0 + IL_0066: ldloc.1 + IL_0067: stfld class [Utils]Utils/Product Linq101Aggregates01/mostExpensiveProducts@94::current + IL_006c: ldc.i4.1 + IL_006d: ret + .line 100001,100001 : 0,0 '' - IL_0093: nop - IL_0094: br.s IL_0046 + IL_006e: nop + IL_006f: br.s IL_0043 - IL_0096: ldarg.0 - IL_0097: ldc.i4.3 - IL_0098: stfld int32 Linq101Aggregates01/mostExpensiveProducts@94::pc + IL_0071: ldarg.0 + IL_0072: ldc.i4.3 + IL_0073: stfld int32 Linq101Aggregates01/mostExpensiveProducts@94::pc .line 94,94 : 45,58 '' - IL_009d: ldarg.0 - IL_009e: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/mostExpensiveProducts@94::'enum' - IL_00a3: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_00a8: nop - IL_00a9: ldarg.0 - IL_00aa: ldnull - IL_00ab: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/mostExpensiveProducts@94::'enum' - IL_00b0: ldarg.0 - IL_00b1: ldc.i4.3 - IL_00b2: stfld int32 Linq101Aggregates01/mostExpensiveProducts@94::pc - IL_00b7: ldarg.0 - IL_00b8: ldnull - IL_00b9: stfld class [Utils]Utils/Product Linq101Aggregates01/mostExpensiveProducts@94::current - IL_00be: ldc.i4.0 - IL_00bf: ret + IL_0078: ldarg.0 + IL_0079: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/mostExpensiveProducts@94::'enum' + IL_007e: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0083: nop + IL_0084: ldarg.0 + IL_0085: ldnull + IL_0086: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/mostExpensiveProducts@94::'enum' + IL_008b: ldarg.0 + IL_008c: ldc.i4.3 + IL_008d: stfld int32 Linq101Aggregates01/mostExpensiveProducts@94::pc + IL_0092: ldarg.0 + IL_0093: ldnull + IL_0094: stfld class [Utils]Utils/Product Linq101Aggregates01/mostExpensiveProducts@94::current + IL_0099: ldc.i4.0 + IL_009a: ret } // end of method mostExpensiveProducts@94::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 150 (0x96) + // Code size 148 (0x94) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [FSharp.Core]Microsoft.FSharp.Core.Unit V_1, [2] class [mscorlib]System.Exception e) .line 100001,100001 : 0,0 '' - IL_0000: ldnull - IL_0001: stloc.0 - IL_0002: ldarg.0 - IL_0003: ldfld int32 Linq101Aggregates01/mostExpensiveProducts@94::pc - IL_0008: ldc.i4.3 - IL_0009: sub - IL_000a: switch ( - IL_0015) - IL_0013: br.s IL_001b + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Aggregates01/mostExpensiveProducts@94::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0019 .line 100001,100001 : 0,0 '' - IL_0015: nop - IL_0016: br IL_0089 + IL_0013: nop + IL_0014: br IL_0087 .line 100001,100001 : 0,0 '' - IL_001b: nop + IL_0019: nop .try { - IL_001c: ldarg.0 - IL_001d: ldfld int32 Linq101Aggregates01/mostExpensiveProducts@94::pc - IL_0022: switch ( + IL_001a: ldarg.0 + IL_001b: ldfld int32 Linq101Aggregates01/mostExpensiveProducts@94::pc + IL_0020: switch ( + IL_0037, IL_0039, IL_003b, - IL_003d, - IL_003f) - IL_0037: br.s IL_004d + IL_003d) + IL_0035: br.s IL_004b - IL_0039: br.s IL_0041 + IL_0037: br.s IL_003f - IL_003b: br.s IL_0044 + IL_0039: br.s IL_0042 - IL_003d: br.s IL_0047 + IL_003b: br.s IL_0045 - IL_003f: br.s IL_004a + IL_003d: br.s IL_0048 .line 100001,100001 : 0,0 '' - IL_0041: nop - IL_0042: br.s IL_0063 + IL_003f: nop + IL_0040: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_0044: nop - IL_0045: br.s IL_004f + IL_0042: nop + IL_0043: br.s IL_004d .line 100001,100001 : 0,0 '' - IL_0047: nop - IL_0048: br.s IL_004e + IL_0045: nop + IL_0046: br.s IL_004c .line 100001,100001 : 0,0 '' - IL_004a: nop - IL_004b: br.s IL_0063 + IL_0048: nop + IL_0049: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_004d: nop + IL_004b: nop .line 100001,100001 : 0,0 '' - IL_004e: nop - IL_004f: ldarg.0 - IL_0050: ldc.i4.3 - IL_0051: stfld int32 Linq101Aggregates01/mostExpensiveProducts@94::pc - IL_0056: ldarg.0 - IL_0057: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/mostExpensiveProducts@94::'enum' - IL_005c: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_0061: nop + IL_004c: nop + IL_004d: ldarg.0 + IL_004e: ldc.i4.3 + IL_004f: stfld int32 Linq101Aggregates01/mostExpensiveProducts@94::pc + IL_0054: ldarg.0 + IL_0055: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/mostExpensiveProducts@94::'enum' + IL_005a: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_005f: nop .line 100001,100001 : 0,0 '' - IL_0062: nop - IL_0063: ldarg.0 - IL_0064: ldc.i4.3 - IL_0065: stfld int32 Linq101Aggregates01/mostExpensiveProducts@94::pc - IL_006a: ldarg.0 - IL_006b: ldnull - IL_006c: stfld class [Utils]Utils/Product Linq101Aggregates01/mostExpensiveProducts@94::current - IL_0071: ldnull - IL_0072: stloc.1 - IL_0073: leave.s IL_0081 + IL_0060: nop + IL_0061: ldarg.0 + IL_0062: ldc.i4.3 + IL_0063: stfld int32 Linq101Aggregates01/mostExpensiveProducts@94::pc + IL_0068: ldarg.0 + IL_0069: ldnull + IL_006a: stfld class [Utils]Utils/Product Linq101Aggregates01/mostExpensiveProducts@94::current + IL_006f: ldnull + IL_0070: stloc.1 + IL_0071: leave.s IL_007f } // end .try catch [mscorlib]System.Object { - IL_0075: castclass [mscorlib]System.Exception - IL_007a: stloc.2 + IL_0073: castclass [mscorlib]System.Exception + IL_0078: stloc.2 .line 94,94 : 45,58 '' - IL_007b: ldloc.2 - IL_007c: stloc.0 - IL_007d: ldnull - IL_007e: stloc.1 - IL_007f: leave.s IL_0081 + IL_0079: ldloc.2 + IL_007a: stloc.0 + IL_007b: ldnull + IL_007c: stloc.1 + IL_007d: leave.s IL_007f .line 100001,100001 : 0,0 '' } // end handler - IL_0081: ldloc.1 - IL_0082: pop + IL_007f: ldloc.1 + IL_0080: pop .line 100001,100001 : 0,0 '' - IL_0083: nop - IL_0084: br IL_0002 + IL_0081: nop + IL_0082: br IL_0000 - IL_0089: ldloc.0 - IL_008a: ldnull - IL_008b: cgt.un - IL_008d: brfalse.s IL_0091 + IL_0087: ldloc.0 + IL_0088: ldnull + IL_0089: cgt.un + IL_008b: brfalse.s IL_008f - IL_008f: br.s IL_0093 + IL_008d: br.s IL_0091 - IL_0091: br.s IL_0095 + IL_008f: br.s IL_0093 .line 100001,100001 : 0,0 '' - IL_0093: ldloc.0 - IL_0094: throw + IL_0091: ldloc.0 + IL_0092: throw .line 100001,100001 : 0,0 '' - IL_0095: ret + IL_0093: ret } // end of method mostExpensiveProducts@94::Close .method public strict virtual instance bool @@ -6090,22 +5714,18 @@ { .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 ) - // Code size 17 (0x11) - .maxstack 10 + // Code size 15 (0xf) + .maxstack 8 IL_0000: ldarg.0 IL_0001: ldfld class [System.Core]System.Linq.IGrouping`2 Linq101Aggregates01/mostExpensiveProducts@94::g IL_0006: ldnull - IL_0007: ldnull + IL_0007: ldc.i4.0 IL_0008: ldnull - IL_0009: ldc.i4.0 - IL_000a: ldnull - IL_000b: newobj instance void Linq101Aggregates01/mostExpensiveProducts@94::.ctor(class [System.Core]System.Linq.IGrouping`2, - class [Utils]Utils/Product, - class [Utils]Utils/Product, + IL_0009: newobj instance void Linq101Aggregates01/mostExpensiveProducts@94::.ctor(class [System.Core]System.Linq.IGrouping`2, class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, class [Utils]Utils/Product) - IL_0010: ret + IL_000e: ret } // end of method mostExpensiveProducts@94::GetFreshEnumerator } // end of class mostExpensiveProducts@94 @@ -6171,8 +5791,8 @@ .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,valuetype [mscorlib]System.Decimal,class [mscorlib]System.Collections.Generic.IEnumerable`1>,object> Invoke(class [System.Core]System.Linq.IGrouping`2 _arg2) cil managed { - // Code size 96 (0x60) - .maxstack 11 + // Code size 92 (0x5c) + .maxstack 9 .locals init ([0] class [System.Core]System.Linq.IGrouping`2 g, [1] valuetype [mscorlib]System.Decimal maxPrice, [2] class [mscorlib]System.Collections.Generic.IEnumerable`1 mostExpensiveProducts, @@ -6183,56 +5803,48 @@ IL_0002: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_0007: ldloc.0 IL_0008: ldnull - IL_0009: ldnull + IL_0009: ldc.i4.0 IL_000a: ldnull - IL_000b: ldc.i4.0 - IL_000c: ldnull - IL_000d: newobj instance void Linq101Aggregates01/maxPrice@93::.ctor(class [System.Core]System.Linq.IGrouping`2, - class [Utils]Utils/Product, - class [Utils]Utils/Product, + IL_000b: newobj instance void Linq101Aggregates01/maxPrice@93::.ctor(class [System.Core]System.Linq.IGrouping`2, class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, class [Utils]Utils/Product) - IL_0012: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0017: newobj instance void Linq101Aggregates01/'maxPrice@93-1'::.ctor() - IL_001c: callvirt instance !!2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::MaxBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0010: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0015: newobj instance void Linq101Aggregates01/'maxPrice@93-1'::.ctor() + IL_001a: callvirt instance !!2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::MaxBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0021: stloc.1 + IL_001f: stloc.1 .line 95,95 : 9,46 '' - IL_0022: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_0027: stloc.3 - IL_0028: ldloc.3 - IL_0029: ldloc.0 + IL_0020: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_0025: stloc.3 + IL_0026: ldloc.3 + IL_0027: ldloc.0 + IL_0028: ldnull + IL_0029: ldc.i4.0 IL_002a: ldnull - IL_002b: ldnull - IL_002c: ldnull - IL_002d: ldc.i4.0 - IL_002e: ldnull - IL_002f: newobj instance void Linq101Aggregates01/mostExpensiveProducts@94::.ctor(class [System.Core]System.Linq.IGrouping`2, - class [Utils]Utils/Product, - class [Utils]Utils/Product, + IL_002b: newobj instance void Linq101Aggregates01/mostExpensiveProducts@94::.ctor(class [System.Core]System.Linq.IGrouping`2, class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, class [Utils]Utils/Product) - IL_0034: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0039: ldloc.1 - IL_003a: newobj instance void Linq101Aggregates01/'mostExpensiveProducts@94-1'::.ctor(valuetype [mscorlib]System.Decimal) - IL_003f: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Where(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0030: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0035: ldloc.1 + IL_0036: newobj instance void Linq101Aggregates01/'mostExpensiveProducts@94-1'::.ctor(valuetype [mscorlib]System.Decimal) + IL_003b: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Where(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0044: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() - IL_0049: stloc.2 + IL_0040: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() + IL_0045: stloc.2 .line 95,95 : 9,46 '' - IL_004a: ldarg.0 - IL_004b: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Aggregates01/'categories5@92-3'::builder@ - IL_0050: ldloc.0 - IL_0051: ldloc.1 - IL_0052: ldloc.2 - IL_0053: newobj instance void class [mscorlib]System.Tuple`3,valuetype [mscorlib]System.Decimal,class [mscorlib]System.Collections.Generic.IEnumerable`1>::.ctor(!0, + IL_0046: ldarg.0 + IL_0047: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Aggregates01/'categories5@92-3'::builder@ + IL_004c: ldloc.0 + IL_004d: ldloc.1 + IL_004e: ldloc.2 + IL_004f: newobj instance void class [mscorlib]System.Tuple`3,valuetype [mscorlib]System.Decimal,class [mscorlib]System.Collections.Generic.IEnumerable`1>::.ctor(!0, !1, !2) - IL_0058: tail. - IL_005a: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Yield,valuetype [mscorlib]System.Decimal,class [mscorlib]System.Collections.Generic.IEnumerable`1>,object>(!!0) - IL_005f: ret + IL_0054: tail. + IL_0056: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Yield,valuetype [mscorlib]System.Decimal,class [mscorlib]System.Collections.Generic.IEnumerable`1>,object>(!!0) + IL_005b: ret } // end of method 'categories5@92-3'::Invoke } // end of class 'categories5@92-3' @@ -6285,11 +5897,6 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) - .field public float64 _arg1 - .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 ) - .field public float64 n .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' .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 ) @@ -6303,39 +5910,33 @@ .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 specialname rtspecialname - instance void .ctor(float64 _arg1, - float64 n, - class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', int32 pc, float64 current) cil managed { - // Code size 44 (0x2c) + // Code size 28 (0x1c) .maxstack 8 IL_0000: ldarg.0 IL_0001: ldarg.1 - IL_0002: stfld float64 Linq101Aggregates01/averageNum@100::_arg1 + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/averageNum@100::'enum' IL_0007: ldarg.0 IL_0008: ldarg.2 - IL_0009: stfld float64 Linq101Aggregates01/averageNum@100::n + IL_0009: stfld int32 Linq101Aggregates01/averageNum@100::pc IL_000e: ldarg.0 IL_000f: ldarg.3 - IL_0010: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/averageNum@100::'enum' + IL_0010: stfld float64 Linq101Aggregates01/averageNum@100::current IL_0015: ldarg.0 - IL_0016: ldarg.s pc - IL_0018: stfld int32 Linq101Aggregates01/averageNum@100::pc - IL_001d: ldarg.0 - IL_001e: ldarg.s current - IL_0020: stfld float64 Linq101Aggregates01/averageNum@100::current - IL_0025: ldarg.0 - IL_0026: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() - IL_002b: ret + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_001b: ret } // end of method averageNum@100::.ctor .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 218 (0xda) + // Code size 162 (0xa2) .maxstack 6 + .locals init ([0] float64 V_0, + [1] float64 n) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 IL_0001: ldfld int32 Linq101Aggregates01/averageNum@100::pc @@ -6345,213 +5946,200 @@ IL_001b, IL_001d, IL_001f) - IL_0019: br.s IL_0030 + IL_0019: br.s IL_002a IL_001b: br.s IL_0021 - IL_001d: br.s IL_0027 + IL_001d: br.s IL_0024 - IL_001f: br.s IL_002a + IL_001f: br.s IL_0027 .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br IL_00a8 + IL_0022: br.s IL_0070 .line 100001,100001 : 0,0 '' - IL_0027: nop - IL_0028: br.s IL_0087 + IL_0024: nop + IL_0025: br.s IL_006d .line 100001,100001 : 0,0 '' - IL_002a: nop - IL_002b: br IL_00c9 + IL_0027: nop + IL_0028: br.s IL_0091 .line 100001,100001 : 0,0 '' - IL_0030: nop + IL_002a: nop .line 100,100 : 26,46 '' - IL_0031: ldarg.0 - IL_0032: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_numbers2() - IL_0037: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_003c: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/averageNum@100::'enum' - IL_0041: ldarg.0 - IL_0042: ldc.i4.1 - IL_0043: stfld int32 Linq101Aggregates01/averageNum@100::pc + IL_002b: ldarg.0 + IL_002c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_numbers2() + IL_0031: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0036: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/averageNum@100::'enum' + IL_003b: ldarg.0 + IL_003c: ldc.i4.1 + IL_003d: stfld int32 Linq101Aggregates01/averageNum@100::pc .line 100,100 : 26,46 '' - IL_0048: ldarg.0 - IL_0049: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/averageNum@100::'enum' - IL_004e: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0053: brfalse.s IL_00a8 - - IL_0055: ldarg.0 - IL_0056: ldarg.0 - IL_0057: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/averageNum@100::'enum' - IL_005c: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0061: stfld float64 Linq101Aggregates01/averageNum@100::_arg1 + IL_0042: ldarg.0 + IL_0043: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/averageNum@100::'enum' + IL_0048: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_004d: brfalse.s IL_0070 + + IL_004f: ldarg.0 + IL_0050: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/averageNum@100::'enum' + IL_0055: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_005a: stloc.0 .line 100,100 : 26,46 '' - IL_0066: ldarg.0 - IL_0067: ldarg.0 - IL_0068: ldfld float64 Linq101Aggregates01/averageNum@100::_arg1 - IL_006d: stfld float64 Linq101Aggregates01/averageNum@100::n - IL_0072: ldarg.0 - IL_0073: ldc.i4.2 - IL_0074: stfld int32 Linq101Aggregates01/averageNum@100::pc + IL_005b: ldloc.0 + IL_005c: stloc.1 + IL_005d: ldarg.0 + IL_005e: ldc.i4.2 + IL_005f: stfld int32 Linq101Aggregates01/averageNum@100::pc .line 100,100 : 47,58 '' - IL_0079: ldarg.0 - IL_007a: ldarg.0 - IL_007b: ldfld float64 Linq101Aggregates01/averageNum@100::n - IL_0080: stfld float64 Linq101Aggregates01/averageNum@100::current - IL_0085: ldc.i4.1 - IL_0086: ret - - IL_0087: ldarg.0 - IL_0088: ldc.r8 0.0 - IL_0091: stfld float64 Linq101Aggregates01/averageNum@100::n - .line 100,100 : 26,46 '' - IL_0096: ldarg.0 - IL_0097: ldc.r8 0.0 - IL_00a0: stfld float64 Linq101Aggregates01/averageNum@100::_arg1 + IL_0064: ldarg.0 + IL_0065: ldloc.1 + IL_0066: stfld float64 Linq101Aggregates01/averageNum@100::current + IL_006b: ldc.i4.1 + IL_006c: ret + .line 100001,100001 : 0,0 '' - IL_00a5: nop - IL_00a6: br.s IL_0048 + IL_006d: nop + IL_006e: br.s IL_0042 - IL_00a8: ldarg.0 - IL_00a9: ldc.i4.3 - IL_00aa: stfld int32 Linq101Aggregates01/averageNum@100::pc + IL_0070: ldarg.0 + IL_0071: ldc.i4.3 + IL_0072: stfld int32 Linq101Aggregates01/averageNum@100::pc .line 100,100 : 26,46 '' - IL_00af: ldarg.0 - IL_00b0: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/averageNum@100::'enum' - IL_00b5: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_00ba: nop - IL_00bb: ldarg.0 - IL_00bc: ldnull - IL_00bd: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/averageNum@100::'enum' - IL_00c2: ldarg.0 - IL_00c3: ldc.i4.3 - IL_00c4: stfld int32 Linq101Aggregates01/averageNum@100::pc - IL_00c9: ldarg.0 - IL_00ca: ldc.r8 0.0 - IL_00d3: stfld float64 Linq101Aggregates01/averageNum@100::current - IL_00d8: ldc.i4.0 - IL_00d9: ret + IL_0077: ldarg.0 + IL_0078: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/averageNum@100::'enum' + IL_007d: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0082: nop + IL_0083: ldarg.0 + IL_0084: ldnull + IL_0085: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/averageNum@100::'enum' + IL_008a: ldarg.0 + IL_008b: ldc.i4.3 + IL_008c: stfld int32 Linq101Aggregates01/averageNum@100::pc + IL_0091: ldarg.0 + IL_0092: ldc.r8 0.0 + IL_009b: stfld float64 Linq101Aggregates01/averageNum@100::current + IL_00a0: ldc.i4.0 + IL_00a1: ret } // end of method averageNum@100::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 158 (0x9e) + // Code size 156 (0x9c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [FSharp.Core]Microsoft.FSharp.Core.Unit V_1, [2] class [mscorlib]System.Exception e) .line 100001,100001 : 0,0 '' - IL_0000: ldnull - IL_0001: stloc.0 - IL_0002: ldarg.0 - IL_0003: ldfld int32 Linq101Aggregates01/averageNum@100::pc - IL_0008: ldc.i4.3 - IL_0009: sub - IL_000a: switch ( - IL_0015) - IL_0013: br.s IL_001b + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Aggregates01/averageNum@100::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0019 .line 100001,100001 : 0,0 '' - IL_0015: nop - IL_0016: br IL_0091 + IL_0013: nop + IL_0014: br IL_008f .line 100001,100001 : 0,0 '' - IL_001b: nop + IL_0019: nop .try { - IL_001c: ldarg.0 - IL_001d: ldfld int32 Linq101Aggregates01/averageNum@100::pc - IL_0022: switch ( + IL_001a: ldarg.0 + IL_001b: ldfld int32 Linq101Aggregates01/averageNum@100::pc + IL_0020: switch ( + IL_0037, IL_0039, IL_003b, - IL_003d, - IL_003f) - IL_0037: br.s IL_004d + IL_003d) + IL_0035: br.s IL_004b - IL_0039: br.s IL_0041 + IL_0037: br.s IL_003f - IL_003b: br.s IL_0044 + IL_0039: br.s IL_0042 - IL_003d: br.s IL_0047 + IL_003b: br.s IL_0045 - IL_003f: br.s IL_004a + IL_003d: br.s IL_0048 .line 100001,100001 : 0,0 '' - IL_0041: nop - IL_0042: br.s IL_0063 + IL_003f: nop + IL_0040: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_0044: nop - IL_0045: br.s IL_004f + IL_0042: nop + IL_0043: br.s IL_004d .line 100001,100001 : 0,0 '' - IL_0047: nop - IL_0048: br.s IL_004e + IL_0045: nop + IL_0046: br.s IL_004c .line 100001,100001 : 0,0 '' - IL_004a: nop - IL_004b: br.s IL_0063 + IL_0048: nop + IL_0049: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_004d: nop + IL_004b: nop .line 100001,100001 : 0,0 '' - IL_004e: nop - IL_004f: ldarg.0 - IL_0050: ldc.i4.3 - IL_0051: stfld int32 Linq101Aggregates01/averageNum@100::pc - IL_0056: ldarg.0 - IL_0057: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/averageNum@100::'enum' - IL_005c: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_0061: nop + IL_004c: nop + IL_004d: ldarg.0 + IL_004e: ldc.i4.3 + IL_004f: stfld int32 Linq101Aggregates01/averageNum@100::pc + IL_0054: ldarg.0 + IL_0055: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/averageNum@100::'enum' + IL_005a: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_005f: nop .line 100001,100001 : 0,0 '' - IL_0062: nop - IL_0063: ldarg.0 - IL_0064: ldc.i4.3 - IL_0065: stfld int32 Linq101Aggregates01/averageNum@100::pc - IL_006a: ldarg.0 - IL_006b: ldc.r8 0.0 - IL_0074: stfld float64 Linq101Aggregates01/averageNum@100::current - IL_0079: ldnull - IL_007a: stloc.1 - IL_007b: leave.s IL_0089 + IL_0060: nop + IL_0061: ldarg.0 + IL_0062: ldc.i4.3 + IL_0063: stfld int32 Linq101Aggregates01/averageNum@100::pc + IL_0068: ldarg.0 + IL_0069: ldc.r8 0.0 + IL_0072: stfld float64 Linq101Aggregates01/averageNum@100::current + IL_0077: ldnull + IL_0078: stloc.1 + IL_0079: leave.s IL_0087 } // end .try catch [mscorlib]System.Object { - IL_007d: castclass [mscorlib]System.Exception - IL_0082: stloc.2 + IL_007b: castclass [mscorlib]System.Exception + IL_0080: stloc.2 .line 100,100 : 26,46 '' - IL_0083: ldloc.2 - IL_0084: stloc.0 - IL_0085: ldnull - IL_0086: stloc.1 - IL_0087: leave.s IL_0089 + IL_0081: ldloc.2 + IL_0082: stloc.0 + IL_0083: ldnull + IL_0084: stloc.1 + IL_0085: leave.s IL_0087 .line 100001,100001 : 0,0 '' } // end handler - IL_0089: ldloc.1 - IL_008a: pop + IL_0087: ldloc.1 + IL_0088: pop .line 100001,100001 : 0,0 '' - IL_008b: nop - IL_008c: br IL_0002 + IL_0089: nop + IL_008a: br IL_0000 - IL_0091: ldloc.0 - IL_0092: ldnull - IL_0093: cgt.un - IL_0095: brfalse.s IL_0099 + IL_008f: ldloc.0 + IL_0090: ldnull + IL_0091: cgt.un + IL_0093: brfalse.s IL_0097 - IL_0097: br.s IL_009b + IL_0095: br.s IL_0099 - IL_0099: br.s IL_009d + IL_0097: br.s IL_009b .line 100001,100001 : 0,0 '' - IL_009b: ldloc.0 - IL_009c: throw + IL_0099: ldloc.0 + IL_009a: throw .line 100001,100001 : 0,0 '' - IL_009d: ret + IL_009b: ret } // end of method averageNum@100::Close .method public strict virtual instance bool @@ -6622,19 +6210,15 @@ { .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 ) - // Code size 35 (0x23) - .maxstack 9 - IL_0000: ldc.r8 0.0 - IL_0009: ldc.r8 0.0 - IL_0012: ldnull - IL_0013: ldc.i4.0 - IL_0014: ldc.r8 0.0 - IL_001d: newobj instance void Linq101Aggregates01/averageNum@100::.ctor(float64, - float64, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + // Code size 17 (0x11) + .maxstack 8 + IL_0000: ldnull + IL_0001: ldc.i4.0 + IL_0002: ldc.r8 0.0 + IL_000b: newobj instance void Linq101Aggregates01/averageNum@100::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, float64) - IL_0022: ret + IL_0010: ret } // end of method averageNum@100::GetFreshEnumerator } // end of class averageNum@100 @@ -6856,11 +6440,6 @@ { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) .field public class [System.Core]System.Linq.IGrouping`2 g - .field public class [Utils]Utils/Product _arg3 - .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 ) - .field public class [Utils]Utils/Product x .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' .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 ) @@ -6875,42 +6454,36 @@ .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .method public specialname rtspecialname instance void .ctor(class [System.Core]System.Linq.IGrouping`2 g, - class [Utils]Utils/Product _arg3, - class [Utils]Utils/Product x, class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', int32 pc, class [Utils]Utils/Product current) cil managed { - // Code size 52 (0x34) + // Code size 36 (0x24) .maxstack 8 IL_0000: ldarg.0 IL_0001: ldarg.1 IL_0002: stfld class [System.Core]System.Linq.IGrouping`2 Linq101Aggregates01/averagePrice@115::g IL_0007: ldarg.0 IL_0008: ldarg.2 - IL_0009: stfld class [Utils]Utils/Product Linq101Aggregates01/averagePrice@115::_arg3 + IL_0009: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/averagePrice@115::'enum' IL_000e: ldarg.0 IL_000f: ldarg.3 - IL_0010: stfld class [Utils]Utils/Product Linq101Aggregates01/averagePrice@115::x + IL_0010: stfld int32 Linq101Aggregates01/averagePrice@115::pc IL_0015: ldarg.0 - IL_0016: ldarg.s 'enum' - IL_0018: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/averagePrice@115::'enum' + IL_0016: ldarg.s current + IL_0018: stfld class [Utils]Utils/Product Linq101Aggregates01/averagePrice@115::current IL_001d: ldarg.0 - IL_001e: ldarg.s pc - IL_0020: stfld int32 Linq101Aggregates01/averagePrice@115::pc - IL_0025: ldarg.0 - IL_0026: ldarg.s current - IL_0028: stfld class [Utils]Utils/Product Linq101Aggregates01/averagePrice@115::current - IL_002d: ldarg.0 - IL_002e: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() - IL_0033: ret + IL_001e: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_0023: ret } // end of method averagePrice@115::.ctor .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 192 (0xc0) + // Code size 155 (0x9b) .maxstack 6 + .locals init ([0] class [Utils]Utils/Product V_0, + [1] class [Utils]Utils/Product x) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 IL_0001: ldfld int32 Linq101Aggregates01/averagePrice@115::pc @@ -6920,7 +6493,7 @@ IL_001b, IL_001d, IL_001f) - IL_0019: br.s IL_002d + IL_0019: br.s IL_002a IL_001b: br.s IL_0021 @@ -6930,204 +6503,191 @@ .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br.s IL_0096 + IL_0022: br.s IL_0071 .line 100001,100001 : 0,0 '' IL_0024: nop - IL_0025: br.s IL_0085 + IL_0025: br.s IL_006e .line 100001,100001 : 0,0 '' IL_0027: nop - IL_0028: br IL_00b7 + IL_0028: br.s IL_0092 .line 100001,100001 : 0,0 '' - IL_002d: nop + IL_002a: nop .line 115,115 : 36,49 '' - IL_002e: ldarg.0 - IL_002f: ldarg.0 - IL_0030: ldfld class [System.Core]System.Linq.IGrouping`2 Linq101Aggregates01/averagePrice@115::g - IL_0035: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_003a: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/averagePrice@115::'enum' - IL_003f: ldarg.0 - IL_0040: ldc.i4.1 - IL_0041: stfld int32 Linq101Aggregates01/averagePrice@115::pc + IL_002b: ldarg.0 + IL_002c: ldarg.0 + IL_002d: ldfld class [System.Core]System.Linq.IGrouping`2 Linq101Aggregates01/averagePrice@115::g + IL_0032: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0037: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/averagePrice@115::'enum' + IL_003c: ldarg.0 + IL_003d: ldc.i4.1 + IL_003e: stfld int32 Linq101Aggregates01/averagePrice@115::pc .line 115,115 : 36,49 '' - IL_0046: ldarg.0 - IL_0047: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/averagePrice@115::'enum' - IL_004c: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0051: brfalse.s IL_0096 - - IL_0053: ldarg.0 - IL_0054: ldarg.0 - IL_0055: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/averagePrice@115::'enum' - IL_005a: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_005f: stfld class [Utils]Utils/Product Linq101Aggregates01/averagePrice@115::_arg3 + IL_0043: ldarg.0 + IL_0044: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/averagePrice@115::'enum' + IL_0049: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_004e: brfalse.s IL_0071 + + IL_0050: ldarg.0 + IL_0051: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/averagePrice@115::'enum' + IL_0056: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_005b: stloc.0 .line 115,115 : 36,49 '' - IL_0064: ldarg.0 - IL_0065: ldarg.0 - IL_0066: ldfld class [Utils]Utils/Product Linq101Aggregates01/averagePrice@115::_arg3 - IL_006b: stfld class [Utils]Utils/Product Linq101Aggregates01/averagePrice@115::x - IL_0070: ldarg.0 - IL_0071: ldc.i4.2 - IL_0072: stfld int32 Linq101Aggregates01/averagePrice@115::pc + IL_005c: ldloc.0 + IL_005d: stloc.1 + IL_005e: ldarg.0 + IL_005f: ldc.i4.2 + IL_0060: stfld int32 Linq101Aggregates01/averagePrice@115::pc .line 115,115 : 50,71 '' - IL_0077: ldarg.0 - IL_0078: ldarg.0 - IL_0079: ldfld class [Utils]Utils/Product Linq101Aggregates01/averagePrice@115::x - IL_007e: stfld class [Utils]Utils/Product Linq101Aggregates01/averagePrice@115::current - IL_0083: ldc.i4.1 - IL_0084: ret - - IL_0085: ldarg.0 - IL_0086: ldnull - IL_0087: stfld class [Utils]Utils/Product Linq101Aggregates01/averagePrice@115::x - .line 115,115 : 36,49 '' - IL_008c: ldarg.0 - IL_008d: ldnull - IL_008e: stfld class [Utils]Utils/Product Linq101Aggregates01/averagePrice@115::_arg3 + IL_0065: ldarg.0 + IL_0066: ldloc.1 + IL_0067: stfld class [Utils]Utils/Product Linq101Aggregates01/averagePrice@115::current + IL_006c: ldc.i4.1 + IL_006d: ret + .line 100001,100001 : 0,0 '' - IL_0093: nop - IL_0094: br.s IL_0046 + IL_006e: nop + IL_006f: br.s IL_0043 - IL_0096: ldarg.0 - IL_0097: ldc.i4.3 - IL_0098: stfld int32 Linq101Aggregates01/averagePrice@115::pc + IL_0071: ldarg.0 + IL_0072: ldc.i4.3 + IL_0073: stfld int32 Linq101Aggregates01/averagePrice@115::pc .line 115,115 : 36,49 '' - IL_009d: ldarg.0 - IL_009e: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/averagePrice@115::'enum' - IL_00a3: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_00a8: nop - IL_00a9: ldarg.0 - IL_00aa: ldnull - IL_00ab: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/averagePrice@115::'enum' - IL_00b0: ldarg.0 - IL_00b1: ldc.i4.3 - IL_00b2: stfld int32 Linq101Aggregates01/averagePrice@115::pc - IL_00b7: ldarg.0 - IL_00b8: ldnull - IL_00b9: stfld class [Utils]Utils/Product Linq101Aggregates01/averagePrice@115::current - IL_00be: ldc.i4.0 - IL_00bf: ret + IL_0078: ldarg.0 + IL_0079: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/averagePrice@115::'enum' + IL_007e: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0083: nop + IL_0084: ldarg.0 + IL_0085: ldnull + IL_0086: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/averagePrice@115::'enum' + IL_008b: ldarg.0 + IL_008c: ldc.i4.3 + IL_008d: stfld int32 Linq101Aggregates01/averagePrice@115::pc + IL_0092: ldarg.0 + IL_0093: ldnull + IL_0094: stfld class [Utils]Utils/Product Linq101Aggregates01/averagePrice@115::current + IL_0099: ldc.i4.0 + IL_009a: ret } // end of method averagePrice@115::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 150 (0x96) + // Code size 148 (0x94) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [FSharp.Core]Microsoft.FSharp.Core.Unit V_1, [2] class [mscorlib]System.Exception e) .line 100001,100001 : 0,0 '' - IL_0000: ldnull - IL_0001: stloc.0 - IL_0002: ldarg.0 - IL_0003: ldfld int32 Linq101Aggregates01/averagePrice@115::pc - IL_0008: ldc.i4.3 - IL_0009: sub - IL_000a: switch ( - IL_0015) - IL_0013: br.s IL_001b + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Aggregates01/averagePrice@115::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0019 .line 100001,100001 : 0,0 '' - IL_0015: nop - IL_0016: br IL_0089 + IL_0013: nop + IL_0014: br IL_0087 .line 100001,100001 : 0,0 '' - IL_001b: nop + IL_0019: nop .try { - IL_001c: ldarg.0 - IL_001d: ldfld int32 Linq101Aggregates01/averagePrice@115::pc - IL_0022: switch ( + IL_001a: ldarg.0 + IL_001b: ldfld int32 Linq101Aggregates01/averagePrice@115::pc + IL_0020: switch ( + IL_0037, IL_0039, IL_003b, - IL_003d, - IL_003f) - IL_0037: br.s IL_004d + IL_003d) + IL_0035: br.s IL_004b - IL_0039: br.s IL_0041 + IL_0037: br.s IL_003f - IL_003b: br.s IL_0044 + IL_0039: br.s IL_0042 - IL_003d: br.s IL_0047 + IL_003b: br.s IL_0045 - IL_003f: br.s IL_004a + IL_003d: br.s IL_0048 .line 100001,100001 : 0,0 '' - IL_0041: nop - IL_0042: br.s IL_0063 + IL_003f: nop + IL_0040: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_0044: nop - IL_0045: br.s IL_004f + IL_0042: nop + IL_0043: br.s IL_004d .line 100001,100001 : 0,0 '' - IL_0047: nop - IL_0048: br.s IL_004e + IL_0045: nop + IL_0046: br.s IL_004c .line 100001,100001 : 0,0 '' - IL_004a: nop - IL_004b: br.s IL_0063 + IL_0048: nop + IL_0049: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_004d: nop + IL_004b: nop .line 100001,100001 : 0,0 '' - IL_004e: nop - IL_004f: ldarg.0 - IL_0050: ldc.i4.3 - IL_0051: stfld int32 Linq101Aggregates01/averagePrice@115::pc - IL_0056: ldarg.0 - IL_0057: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/averagePrice@115::'enum' - IL_005c: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_0061: nop + IL_004c: nop + IL_004d: ldarg.0 + IL_004e: ldc.i4.3 + IL_004f: stfld int32 Linq101Aggregates01/averagePrice@115::pc + IL_0054: ldarg.0 + IL_0055: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/averagePrice@115::'enum' + IL_005a: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_005f: nop .line 100001,100001 : 0,0 '' - IL_0062: nop - IL_0063: ldarg.0 - IL_0064: ldc.i4.3 - IL_0065: stfld int32 Linq101Aggregates01/averagePrice@115::pc - IL_006a: ldarg.0 - IL_006b: ldnull - IL_006c: stfld class [Utils]Utils/Product Linq101Aggregates01/averagePrice@115::current - IL_0071: ldnull - IL_0072: stloc.1 - IL_0073: leave.s IL_0081 + IL_0060: nop + IL_0061: ldarg.0 + IL_0062: ldc.i4.3 + IL_0063: stfld int32 Linq101Aggregates01/averagePrice@115::pc + IL_0068: ldarg.0 + IL_0069: ldnull + IL_006a: stfld class [Utils]Utils/Product Linq101Aggregates01/averagePrice@115::current + IL_006f: ldnull + IL_0070: stloc.1 + IL_0071: leave.s IL_007f } // end .try catch [mscorlib]System.Object { - IL_0075: castclass [mscorlib]System.Exception - IL_007a: stloc.2 + IL_0073: castclass [mscorlib]System.Exception + IL_0078: stloc.2 .line 115,115 : 36,49 '' - IL_007b: ldloc.2 - IL_007c: stloc.0 - IL_007d: ldnull - IL_007e: stloc.1 - IL_007f: leave.s IL_0081 + IL_0079: ldloc.2 + IL_007a: stloc.0 + IL_007b: ldnull + IL_007c: stloc.1 + IL_007d: leave.s IL_007f .line 100001,100001 : 0,0 '' } // end handler - IL_0081: ldloc.1 - IL_0082: pop + IL_007f: ldloc.1 + IL_0080: pop .line 100001,100001 : 0,0 '' - IL_0083: nop - IL_0084: br IL_0002 + IL_0081: nop + IL_0082: br IL_0000 - IL_0089: ldloc.0 - IL_008a: ldnull - IL_008b: cgt.un - IL_008d: brfalse.s IL_0091 + IL_0087: ldloc.0 + IL_0088: ldnull + IL_0089: cgt.un + IL_008b: brfalse.s IL_008f - IL_008f: br.s IL_0093 + IL_008d: br.s IL_0091 - IL_0091: br.s IL_0095 + IL_008f: br.s IL_0093 .line 100001,100001 : 0,0 '' - IL_0093: ldloc.0 - IL_0094: throw + IL_0091: ldloc.0 + IL_0092: throw .line 100001,100001 : 0,0 '' - IL_0095: ret + IL_0093: ret } // end of method averagePrice@115::Close .method public strict virtual instance bool @@ -7198,22 +6758,18 @@ { .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 ) - // Code size 17 (0x11) - .maxstack 10 + // Code size 15 (0xf) + .maxstack 8 IL_0000: ldarg.0 IL_0001: ldfld class [System.Core]System.Linq.IGrouping`2 Linq101Aggregates01/averagePrice@115::g IL_0006: ldnull - IL_0007: ldnull + IL_0007: ldc.i4.0 IL_0008: ldnull - IL_0009: ldc.i4.0 - IL_000a: ldnull - IL_000b: newobj instance void Linq101Aggregates01/averagePrice@115::.ctor(class [System.Core]System.Linq.IGrouping`2, - class [Utils]Utils/Product, - class [Utils]Utils/Product, + IL_0009: newobj instance void Linq101Aggregates01/averagePrice@115::.ctor(class [System.Core]System.Linq.IGrouping`2, class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, class [Utils]Utils/Product) - IL_0010: ret + IL_000e: ret } // end of method averagePrice@115::GetFreshEnumerator } // end of class averagePrice@115 @@ -7272,8 +6828,8 @@ .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,valuetype [mscorlib]System.Decimal>,object> Invoke(class [System.Core]System.Linq.IGrouping`2 _arg2) cil managed { - // Code size 232 (0xe8) - .maxstack 10 + // Code size 230 (0xe6) + .maxstack 9 .locals init ([0] class [System.Core]System.Linq.IGrouping`2 g, [1] valuetype [mscorlib]System.Decimal averagePrice, [2] class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder V_2, @@ -7297,138 +6853,134 @@ IL_0009: stloc.3 IL_000a: ldloc.0 IL_000b: ldnull - IL_000c: ldnull + IL_000c: ldc.i4.0 IL_000d: ldnull - IL_000e: ldc.i4.0 - IL_000f: ldnull - IL_0010: newobj instance void Linq101Aggregates01/averagePrice@115::.ctor(class [System.Core]System.Linq.IGrouping`2, - class [Utils]Utils/Product, - class [Utils]Utils/Product, + IL_000e: newobj instance void Linq101Aggregates01/averagePrice@115::.ctor(class [System.Core]System.Linq.IGrouping`2, class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, class [Utils]Utils/Product) - IL_0015: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_001a: stloc.s V_4 - IL_001c: newobj instance void Linq101Aggregates01/'averagePrice@115-1'::.ctor() - IL_0021: stloc.s V_5 - IL_0023: ldloc.s V_4 - IL_0025: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() - IL_002a: stloc.s V_6 - IL_002c: ldloc.s V_6 - IL_002e: box class [mscorlib]System.Collections.Generic.IEnumerable`1 - IL_0033: brfalse.s IL_0037 + IL_0013: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0018: stloc.s V_4 + IL_001a: newobj instance void Linq101Aggregates01/'averagePrice@115-1'::.ctor() + IL_001f: stloc.s V_5 + IL_0021: ldloc.s V_4 + IL_0023: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() + IL_0028: stloc.s V_6 + IL_002a: ldloc.s V_6 + IL_002c: box class [mscorlib]System.Collections.Generic.IEnumerable`1 + IL_0031: brfalse.s IL_0035 - IL_0035: br.s IL_0042 + IL_0033: br.s IL_0040 .line 100001,100001 : 0,0 '' - IL_0037: ldstr "source" - IL_003c: newobj instance void [mscorlib]System.ArgumentNullException::.ctor(string) - IL_0041: throw + IL_0035: ldstr "source" + IL_003a: newobj instance void [mscorlib]System.ArgumentNullException::.ctor(string) + IL_003f: throw .line 100001,100001 : 0,0 '' - IL_0042: nop - IL_0043: ldloc.s V_6 - IL_0045: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_004a: stloc.s V_7 + IL_0040: nop + IL_0041: ldloc.s V_6 + IL_0043: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0048: stloc.s V_7 .try { + IL_004a: ldc.i4.0 + IL_004b: ldc.i4.0 IL_004c: ldc.i4.0 IL_004d: ldc.i4.0 IL_004e: ldc.i4.0 - IL_004f: ldc.i4.0 - IL_0050: ldc.i4.0 - IL_0051: newobj instance void [mscorlib]System.Decimal::.ctor(int32, + IL_004f: newobj instance void [mscorlib]System.Decimal::.ctor(int32, int32, int32, bool, uint8) - IL_0056: stloc.s V_9 - IL_0058: ldc.i4.0 - IL_0059: stloc.s V_10 - IL_005b: ldloc.s V_7 - IL_005d: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0062: brfalse.s IL_0084 - - IL_0064: ldloc.s V_9 - IL_0066: ldloc.s V_5 - IL_0068: ldloc.s V_7 - IL_006a: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_006f: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0074: call valuetype [mscorlib]System.Decimal [mscorlib]System.Decimal::op_Addition(valuetype [mscorlib]System.Decimal, + IL_0054: stloc.s V_9 + IL_0056: ldc.i4.0 + IL_0057: stloc.s V_10 + IL_0059: ldloc.s V_7 + IL_005b: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_0060: brfalse.s IL_0082 + + IL_0062: ldloc.s V_9 + IL_0064: ldloc.s V_5 + IL_0066: ldloc.s V_7 + IL_0068: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_006d: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0072: call valuetype [mscorlib]System.Decimal [mscorlib]System.Decimal::op_Addition(valuetype [mscorlib]System.Decimal, valuetype [mscorlib]System.Decimal) - IL_0079: stloc.s V_9 + IL_0077: stloc.s V_9 .line 115,115 : 50,71 '' - IL_007b: ldloc.s V_10 - IL_007d: ldc.i4.1 - IL_007e: add - IL_007f: stloc.s V_10 + IL_0079: ldloc.s V_10 + IL_007b: ldc.i4.1 + IL_007c: add + IL_007d: stloc.s V_10 .line 100001,100001 : 0,0 '' - IL_0081: nop - IL_0082: br.s IL_005b + IL_007f: nop + IL_0080: br.s IL_0059 - IL_0084: ldloc.s V_10 - IL_0086: brtrue.s IL_008a + IL_0082: ldloc.s V_10 + IL_0084: brtrue.s IL_0088 - IL_0088: br.s IL_008c + IL_0086: br.s IL_008a - IL_008a: br.s IL_0097 + IL_0088: br.s IL_0095 .line 100001,100001 : 0,0 '' - IL_008c: ldstr "source" - IL_0091: newobj instance void [mscorlib]System.InvalidOperationException::.ctor(string) - IL_0096: throw + IL_008a: ldstr "source" + IL_008f: newobj instance void [mscorlib]System.InvalidOperationException::.ctor(string) + IL_0094: throw .line 100001,100001 : 0,0 '' - IL_0097: nop - IL_0098: ldloc.s V_9 - IL_009a: stloc.s V_11 - IL_009c: ldloc.s V_10 - IL_009e: stloc.s V_12 - IL_00a0: ldloc.s V_11 - IL_00a2: ldloc.s V_12 - IL_00a4: call valuetype [mscorlib]System.Decimal [mscorlib]System.Convert::ToDecimal(int32) - IL_00a9: call valuetype [mscorlib]System.Decimal [mscorlib]System.Decimal::Divide(valuetype [mscorlib]System.Decimal, + IL_0095: nop + IL_0096: ldloc.s V_9 + IL_0098: stloc.s V_11 + IL_009a: ldloc.s V_10 + IL_009c: stloc.s V_12 + IL_009e: ldloc.s V_11 + IL_00a0: ldloc.s V_12 + IL_00a2: call valuetype [mscorlib]System.Decimal [mscorlib]System.Convert::ToDecimal(int32) + IL_00a7: call valuetype [mscorlib]System.Decimal [mscorlib]System.Decimal::Divide(valuetype [mscorlib]System.Decimal, valuetype [mscorlib]System.Decimal) - IL_00ae: stloc.s V_8 - IL_00b0: leave.s IL_00d0 + IL_00ac: stloc.s V_8 + IL_00ae: leave.s IL_00ce } // end .try finally { - IL_00b2: ldloc.s V_7 - IL_00b4: isinst [mscorlib]System.IDisposable - IL_00b9: stloc.s V_13 - IL_00bb: ldloc.s V_13 - IL_00bd: brfalse.s IL_00c1 + IL_00b0: ldloc.s V_7 + IL_00b2: isinst [mscorlib]System.IDisposable + IL_00b7: stloc.s V_13 + IL_00b9: ldloc.s V_13 + IL_00bb: brfalse.s IL_00bf - IL_00bf: br.s IL_00c3 + IL_00bd: br.s IL_00c1 - IL_00c1: br.s IL_00cd + IL_00bf: br.s IL_00cb .line 100001,100001 : 0,0 '' - IL_00c3: ldloc.s V_13 - IL_00c5: callvirt instance void [mscorlib]System.IDisposable::Dispose() - IL_00ca: ldnull - IL_00cb: pop - IL_00cc: endfinally + IL_00c1: ldloc.s V_13 + IL_00c3: callvirt instance void [mscorlib]System.IDisposable::Dispose() + IL_00c8: ldnull + IL_00c9: pop + IL_00ca: endfinally .line 100001,100001 : 0,0 '' - IL_00cd: ldnull - IL_00ce: pop - IL_00cf: endfinally + IL_00cb: ldnull + IL_00cc: pop + IL_00cd: endfinally .line 100001,100001 : 0,0 '' } // end handler - IL_00d0: ldloc.s V_8 - IL_00d2: stloc.1 + IL_00ce: ldloc.s V_8 + IL_00d0: stloc.1 .line 116,116 : 9,37 '' - IL_00d3: ldarg.0 - IL_00d4: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Aggregates01/'categories6@114-3'::builder@ - IL_00d9: ldloc.0 - IL_00da: ldloc.1 - IL_00db: newobj instance void class [mscorlib]System.Tuple`2,valuetype [mscorlib]System.Decimal>::.ctor(!0, + IL_00d1: ldarg.0 + IL_00d2: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Aggregates01/'categories6@114-3'::builder@ + IL_00d7: ldloc.0 + IL_00d8: ldloc.1 + IL_00d9: newobj instance void class [mscorlib]System.Tuple`2,valuetype [mscorlib]System.Decimal>::.ctor(!0, !1) - IL_00e0: tail. - IL_00e2: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Yield,valuetype [mscorlib]System.Decimal>,object>(!!0) - IL_00e7: ret + IL_00de: tail. + IL_00e0: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Yield,valuetype [mscorlib]System.Decimal>,object>(!!0) + IL_00e5: ret } // end of method 'categories6@114-3'::Invoke } // end of class 'categories6@114-3' @@ -7816,7 +7368,7 @@ .method public static void main@() cil managed { .entrypoint - // Code size 1797 (0x705) + // Code size 1765 (0x6e5) .maxstack 13 .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 factorsOf300, [1] int32 uniqueFactors, @@ -7911,756 +7463,724 @@ IL_002a: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_002f: stloc.s V_20 IL_0031: ldloc.s V_20 - IL_0033: ldc.i4.0 + IL_0033: ldnull IL_0034: ldc.i4.0 - IL_0035: ldnull - IL_0036: ldc.i4.0 - IL_0037: ldc.i4.0 - IL_0038: newobj instance void Linq101Aggregates01/uniqueFactors@12::.ctor(int32, - int32, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0035: ldc.i4.0 + IL_0036: newobj instance void Linq101Aggregates01/uniqueFactors@12::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, int32) - IL_003d: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0042: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Distinct(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2) - IL_0047: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() - IL_004c: call int32 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::Length(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0051: dup - IL_0052: stsfld int32 ''.$Linq101Aggregates01::uniqueFactors@10 - IL_0057: stloc.1 + IL_003b: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0040: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Distinct(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2) + IL_0045: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() + IL_004a: call int32 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::Length(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_004f: dup + IL_0050: stsfld int32 ''.$Linq101Aggregates01::uniqueFactors@10 + IL_0055: stloc.1 .line 17,17 : 1,47 '' - IL_0058: ldc.i4.5 - IL_0059: ldc.i4.4 - IL_005a: ldc.i4.1 - IL_005b: ldc.i4.3 - IL_005c: ldc.i4.s 9 - IL_005e: ldc.i4.8 - IL_005f: ldc.i4.6 - IL_0060: ldc.i4.7 - IL_0061: ldc.i4.2 - IL_0062: ldc.i4.0 - IL_0063: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() - IL_0068: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0056: ldc.i4.5 + IL_0057: ldc.i4.4 + IL_0058: ldc.i4.1 + IL_0059: ldc.i4.3 + IL_005a: ldc.i4.s 9 + IL_005c: ldc.i4.8 + IL_005d: ldc.i4.6 + IL_005e: ldc.i4.7 + IL_005f: ldc.i4.2 + IL_0060: ldc.i4.0 + IL_0061: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_0066: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_006d: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_006b: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_0072: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0070: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_0077: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0075: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_007c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_007a: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_0081: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_007f: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_0086: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0084: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_008b: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0089: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_0090: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_008e: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_0095: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0093: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_009a: dup - IL_009b: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Aggregates01::numbers@17 - IL_00a0: stloc.2 - IL_00a1: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_00a6: stloc.s V_21 - IL_00a8: ldloc.s V_21 - IL_00aa: stloc.s V_22 + IL_0098: dup + IL_0099: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Aggregates01::numbers@17 + IL_009e: stloc.2 + IL_009f: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_00a4: stloc.s V_21 + IL_00a6: ldloc.s V_21 + IL_00a8: stloc.s V_22 + IL_00aa: ldnull + IL_00ab: ldc.i4.0 IL_00ac: ldc.i4.0 - IL_00ad: ldc.i4.0 - IL_00ae: ldnull - IL_00af: ldc.i4.0 - IL_00b0: ldc.i4.0 - IL_00b1: newobj instance void Linq101Aggregates01/numSum@21::.ctor(int32, - int32, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_00ad: newobj instance void Linq101Aggregates01/numSum@21::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, int32) - IL_00b6: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_00bb: stloc.s V_23 - IL_00bd: newobj instance void Linq101Aggregates01/'numSum@22-1'::.ctor() - IL_00c2: stloc.s V_24 - IL_00c4: ldloc.s V_23 - IL_00c6: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() - IL_00cb: stloc.s V_25 - IL_00cd: ldloc.s V_25 - IL_00cf: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_00d4: stloc.s V_26 + IL_00b2: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_00b7: stloc.s V_23 + IL_00b9: newobj instance void Linq101Aggregates01/'numSum@22-1'::.ctor() + IL_00be: stloc.s V_24 + IL_00c0: ldloc.s V_23 + IL_00c2: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() + IL_00c7: stloc.s V_25 + IL_00c9: ldloc.s V_25 + IL_00cb: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_00d0: stloc.s V_26 .try { - IL_00d6: ldc.i4.0 - IL_00d7: stloc.s V_28 - IL_00d9: ldloc.s V_26 - IL_00db: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_00e0: brfalse.s IL_00f8 + IL_00d2: ldc.i4.0 + IL_00d3: stloc.s V_28 + IL_00d5: ldloc.s V_26 + IL_00d7: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_00dc: brfalse.s IL_00f4 .line 22,22 : 9,16 '' - IL_00e2: ldloc.s V_28 - IL_00e4: ldloc.s V_24 - IL_00e6: ldloc.s V_26 - IL_00e8: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_00ed: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_00f2: add.ovf - IL_00f3: stloc.s V_28 + IL_00de: ldloc.s V_28 + IL_00e0: ldloc.s V_24 + IL_00e2: ldloc.s V_26 + IL_00e4: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_00e9: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_00ee: add.ovf + IL_00ef: stloc.s V_28 .line 100001,100001 : 0,0 '' - IL_00f5: nop - IL_00f6: br.s IL_00d9 + IL_00f1: nop + IL_00f2: br.s IL_00d5 - IL_00f8: ldloc.s V_28 - IL_00fa: stloc.s V_27 - IL_00fc: leave.s IL_011c + IL_00f4: ldloc.s V_28 + IL_00f6: stloc.s V_27 + IL_00f8: leave.s IL_0118 } // end .try finally { - IL_00fe: ldloc.s V_26 - IL_0100: isinst [mscorlib]System.IDisposable - IL_0105: stloc.s V_29 - IL_0107: ldloc.s V_29 - IL_0109: brfalse.s IL_010d + IL_00fa: ldloc.s V_26 + IL_00fc: isinst [mscorlib]System.IDisposable + IL_0101: stloc.s V_29 + IL_0103: ldloc.s V_29 + IL_0105: brfalse.s IL_0109 - IL_010b: br.s IL_010f + IL_0107: br.s IL_010b - IL_010d: br.s IL_0119 + IL_0109: br.s IL_0115 .line 100001,100001 : 0,0 '' - IL_010f: ldloc.s V_29 - IL_0111: callvirt instance void [mscorlib]System.IDisposable::Dispose() - IL_0116: ldnull - IL_0117: pop - IL_0118: endfinally + IL_010b: ldloc.s V_29 + IL_010d: callvirt instance void [mscorlib]System.IDisposable::Dispose() + IL_0112: ldnull + IL_0113: pop + IL_0114: endfinally .line 100001,100001 : 0,0 '' - IL_0119: ldnull - IL_011a: pop - IL_011b: endfinally + IL_0115: ldnull + IL_0116: pop + IL_0117: endfinally .line 100001,100001 : 0,0 '' } // end handler - IL_011c: ldloc.s V_27 - IL_011e: dup - IL_011f: stsfld int32 ''.$Linq101Aggregates01::numSum@19 - IL_0124: stloc.3 + IL_0118: ldloc.s V_27 + IL_011a: dup + IL_011b: stsfld int32 ''.$Linq101Aggregates01::numSum@19 + IL_0120: stloc.3 .line 26,26 : 1,45 '' - IL_0125: ldstr "cherry" - IL_012a: ldstr "apple" - IL_012f: ldstr "blueberry" - IL_0134: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() - IL_0139: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0121: ldstr "cherry" + IL_0126: ldstr "apple" + IL_012b: ldstr "blueberry" + IL_0130: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_0135: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_013e: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_013a: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_0143: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_013f: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_0148: dup - IL_0149: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Aggregates01::words@26 - IL_014e: stloc.s words - IL_0150: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_0155: stloc.s V_30 - IL_0157: ldloc.s V_30 - IL_0159: stloc.s V_31 - IL_015b: ldnull - IL_015c: ldnull - IL_015d: ldnull - IL_015e: ldc.i4.0 - IL_015f: ldnull - IL_0160: newobj instance void Linq101Aggregates01/totalChars@30::.ctor(string, - string, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0144: dup + IL_0145: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Aggregates01::words@26 + IL_014a: stloc.s words + IL_014c: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_0151: stloc.s V_30 + IL_0153: ldloc.s V_30 + IL_0155: stloc.s V_31 + IL_0157: ldnull + IL_0158: ldc.i4.0 + IL_0159: ldnull + IL_015a: newobj instance void Linq101Aggregates01/totalChars@30::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, string) - IL_0165: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_016a: stloc.s V_32 - IL_016c: newobj instance void Linq101Aggregates01/'totalChars@31-1'::.ctor() - IL_0171: stloc.s V_33 - IL_0173: ldloc.s V_32 - IL_0175: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() - IL_017a: stloc.s V_34 - IL_017c: ldloc.s V_34 - IL_017e: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0183: stloc.s V_35 + IL_015f: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0164: stloc.s V_32 + IL_0166: newobj instance void Linq101Aggregates01/'totalChars@31-1'::.ctor() + IL_016b: stloc.s V_33 + IL_016d: ldloc.s V_32 + IL_016f: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() + IL_0174: stloc.s V_34 + IL_0176: ldloc.s V_34 + IL_0178: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_017d: stloc.s V_35 .try { - IL_0185: ldc.i4.0 - IL_0186: stloc.s V_37 - IL_0188: ldloc.s V_35 - IL_018a: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_018f: brfalse.s IL_01a7 + IL_017f: ldc.i4.0 + IL_0180: stloc.s V_37 + IL_0182: ldloc.s V_35 + IL_0184: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_0189: brfalse.s IL_01a1 .line 31,31 : 9,25 '' - IL_0191: ldloc.s V_37 - IL_0193: ldloc.s V_33 - IL_0195: ldloc.s V_35 - IL_0197: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_019c: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_01a1: add.ovf - IL_01a2: stloc.s V_37 + IL_018b: ldloc.s V_37 + IL_018d: ldloc.s V_33 + IL_018f: ldloc.s V_35 + IL_0191: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0196: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_019b: add.ovf + IL_019c: stloc.s V_37 .line 100001,100001 : 0,0 '' - IL_01a4: nop - IL_01a5: br.s IL_0188 + IL_019e: nop + IL_019f: br.s IL_0182 - IL_01a7: ldloc.s V_37 - IL_01a9: stloc.s V_36 - IL_01ab: leave.s IL_01cb + IL_01a1: ldloc.s V_37 + IL_01a3: stloc.s V_36 + IL_01a5: leave.s IL_01c5 } // end .try finally { - IL_01ad: ldloc.s V_35 - IL_01af: isinst [mscorlib]System.IDisposable - IL_01b4: stloc.s V_38 - IL_01b6: ldloc.s V_38 - IL_01b8: brfalse.s IL_01bc + IL_01a7: ldloc.s V_35 + IL_01a9: isinst [mscorlib]System.IDisposable + IL_01ae: stloc.s V_38 + IL_01b0: ldloc.s V_38 + IL_01b2: brfalse.s IL_01b6 - IL_01ba: br.s IL_01be + IL_01b4: br.s IL_01b8 - IL_01bc: br.s IL_01c8 + IL_01b6: br.s IL_01c2 .line 100001,100001 : 0,0 '' - IL_01be: ldloc.s V_38 - IL_01c0: callvirt instance void [mscorlib]System.IDisposable::Dispose() - IL_01c5: ldnull - IL_01c6: pop - IL_01c7: endfinally + IL_01b8: ldloc.s V_38 + IL_01ba: callvirt instance void [mscorlib]System.IDisposable::Dispose() + IL_01bf: ldnull + IL_01c0: pop + IL_01c1: endfinally .line 100001,100001 : 0,0 '' - IL_01c8: ldnull - IL_01c9: pop - IL_01ca: endfinally + IL_01c2: ldnull + IL_01c3: pop + IL_01c4: endfinally .line 100001,100001 : 0,0 '' } // end handler - IL_01cb: ldloc.s V_36 - IL_01cd: dup - IL_01ce: stsfld int32 ''.$Linq101Aggregates01::totalChars@28 - IL_01d3: stloc.s totalChars + IL_01c5: ldloc.s V_36 + IL_01c7: dup + IL_01c8: stsfld int32 ''.$Linq101Aggregates01::totalChars@28 + IL_01cd: stloc.s totalChars .line 35,35 : 1,32 '' - IL_01d5: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [Utils]Utils::getProductList() - IL_01da: dup - IL_01db: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Aggregates01::products@35 - IL_01e0: stloc.s products + IL_01cf: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [Utils]Utils::getProductList() + IL_01d4: dup + IL_01d5: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Aggregates01::products@35 + IL_01da: stloc.s products .line 37,46 : 1,21 '' - IL_01e2: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_01e7: stloc.s V_39 + IL_01dc: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_01e1: stloc.s V_39 + IL_01e3: ldloc.s V_39 + IL_01e5: ldloc.s V_39 + IL_01e7: ldloc.s V_39 IL_01e9: ldloc.s V_39 IL_01eb: ldloc.s V_39 - IL_01ed: ldloc.s V_39 - IL_01ef: ldloc.s V_39 - IL_01f1: ldloc.s V_39 - IL_01f3: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_products() - IL_01f8: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Source(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_01fd: ldloc.s V_39 - IL_01ff: newobj instance void Linq101Aggregates01/categories@39::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_0204: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_01ed: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_products() + IL_01f2: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Source(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_01f7: ldloc.s V_39 + IL_01f9: newobj instance void Linq101Aggregates01/categories@39::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_01fe: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0209: newobj instance void Linq101Aggregates01/'categories@40-1'::.ctor() - IL_020e: newobj instance void Linq101Aggregates01/'categories@40-2'::.ctor() - IL_0213: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,!!3> [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::GroupValBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0203: newobj instance void Linq101Aggregates01/'categories@40-1'::.ctor() + IL_0208: newobj instance void Linq101Aggregates01/'categories@40-2'::.ctor() + IL_020d: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,!!3> [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::GroupValBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0218: ldloc.s V_39 - IL_021a: newobj instance void Linq101Aggregates01/'categories@40-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_021f: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2,int32>,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0212: ldloc.s V_39 + IL_0214: newobj instance void Linq101Aggregates01/'categories@40-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_0219: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2,int32>,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0224: newobj instance void Linq101Aggregates01/'categories@45-4'::.ctor() - IL_0229: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,int32>,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_021e: newobj instance void Linq101Aggregates01/'categories@45-4'::.ctor() + IL_0223: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,int32>,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_022e: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,class [mscorlib]System.Collections.IEnumerable>::get_Source() - IL_0233: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0238: dup - IL_0239: stsfld class [mscorlib]System.Tuple`2[] ''.$Linq101Aggregates01::categories@37 - IL_023e: stloc.s categories - IL_0240: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_0245: ldc.i4.0 - IL_0246: ldc.i4.0 - IL_0247: ldnull - IL_0248: ldc.i4.0 - IL_0249: ldc.i4.0 - IL_024a: newobj instance void Linq101Aggregates01/minNum@49::.ctor(int32, - int32, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0228: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,class [mscorlib]System.Collections.IEnumerable>::get_Source() + IL_022d: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0232: dup + IL_0233: stsfld class [mscorlib]System.Tuple`2[] ''.$Linq101Aggregates01::categories@37 + IL_0238: stloc.s categories + IL_023a: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_023f: ldnull + IL_0240: ldc.i4.0 + IL_0241: ldc.i4.0 + IL_0242: newobj instance void Linq101Aggregates01/minNum@49::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, int32) - IL_024f: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0254: newobj instance void Linq101Aggregates01/'minNum@49-1'::.ctor() - IL_0259: callvirt instance !!2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::MinBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0247: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_024c: newobj instance void Linq101Aggregates01/'minNum@49-1'::.ctor() + IL_0251: callvirt instance !!2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::MinBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_025e: dup - IL_025f: stsfld int32 ''.$Linq101Aggregates01::minNum@49 - IL_0264: stloc.s minNum - IL_0266: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_026b: ldnull - IL_026c: ldnull - IL_026d: ldnull - IL_026e: ldc.i4.0 - IL_026f: ldnull - IL_0270: newobj instance void Linq101Aggregates01/shortestWord@52::.ctor(string, - string, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0256: dup + IL_0257: stsfld int32 ''.$Linq101Aggregates01::minNum@49 + IL_025c: stloc.s minNum + IL_025e: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_0263: ldnull + IL_0264: ldc.i4.0 + IL_0265: ldnull + IL_0266: newobj instance void Linq101Aggregates01/shortestWord@52::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, string) - IL_0275: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_027a: newobj instance void Linq101Aggregates01/'shortestWord@52-1'::.ctor() - IL_027f: callvirt instance !!2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::MinBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_026b: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0270: newobj instance void Linq101Aggregates01/'shortestWord@52-1'::.ctor() + IL_0275: callvirt instance !!2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::MinBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0284: dup - IL_0285: stsfld int32 ''.$Linq101Aggregates01::shortestWord@52 - IL_028a: stloc.s shortestWord + IL_027a: dup + IL_027b: stsfld int32 ''.$Linq101Aggregates01::shortestWord@52 + IL_0280: stloc.s shortestWord .line 55,61 : 1,21 '' - IL_028c: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_0291: stloc.s V_40 - IL_0293: ldloc.s V_40 - IL_0295: ldloc.s V_40 - IL_0297: ldloc.s V_40 - IL_0299: ldloc.s V_40 - IL_029b: ldloc.s V_40 - IL_029d: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_products() - IL_02a2: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Source(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_02a7: ldloc.s V_40 - IL_02a9: newobj instance void Linq101Aggregates01/categories2@57::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_02ae: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0282: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_0287: stloc.s V_40 + IL_0289: ldloc.s V_40 + IL_028b: ldloc.s V_40 + IL_028d: ldloc.s V_40 + IL_028f: ldloc.s V_40 + IL_0291: ldloc.s V_40 + IL_0293: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_products() + IL_0298: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Source(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_029d: ldloc.s V_40 + IL_029f: newobj instance void Linq101Aggregates01/categories2@57::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_02a4: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_02b3: newobj instance void Linq101Aggregates01/'categories2@58-1'::.ctor() - IL_02b8: newobj instance void Linq101Aggregates01/'categories2@58-2'::.ctor() - IL_02bd: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,!!3> [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::GroupValBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_02a9: newobj instance void Linq101Aggregates01/'categories2@58-1'::.ctor() + IL_02ae: newobj instance void Linq101Aggregates01/'categories2@58-2'::.ctor() + IL_02b3: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,!!3> [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::GroupValBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_02c2: ldloc.s V_40 - IL_02c4: newobj instance void Linq101Aggregates01/'categories2@58-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_02c9: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2,valuetype [mscorlib]System.Decimal>,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_02b8: ldloc.s V_40 + IL_02ba: newobj instance void Linq101Aggregates01/'categories2@58-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_02bf: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2,valuetype [mscorlib]System.Decimal>,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_02ce: newobj instance void Linq101Aggregates01/'categories2@60-4'::.ctor() - IL_02d3: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,valuetype [mscorlib]System.Decimal>,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_02c4: newobj instance void Linq101Aggregates01/'categories2@60-4'::.ctor() + IL_02c9: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,valuetype [mscorlib]System.Decimal>,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_02d8: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,class [mscorlib]System.Collections.IEnumerable>::get_Source() - IL_02dd: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_02e2: dup - IL_02e3: stsfld class [mscorlib]System.Tuple`2[] ''.$Linq101Aggregates01::categories2@55 - IL_02e8: stloc.s categories2 + IL_02ce: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,class [mscorlib]System.Collections.IEnumerable>::get_Source() + IL_02d3: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_02d8: dup + IL_02d9: stsfld class [mscorlib]System.Tuple`2[] ''.$Linq101Aggregates01::categories2@55 + IL_02de: stloc.s categories2 .line 64,71 : 1,21 '' - IL_02ea: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_02ef: stloc.s V_41 - IL_02f1: ldloc.s V_41 - IL_02f3: ldloc.s V_41 - IL_02f5: ldloc.s V_41 - IL_02f7: ldloc.s V_41 - IL_02f9: ldloc.s V_41 - IL_02fb: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_products() - IL_0300: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Source(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0305: ldloc.s V_41 - IL_0307: newobj instance void Linq101Aggregates01/categories3@66::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_030c: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_02e0: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_02e5: stloc.s V_41 + IL_02e7: ldloc.s V_41 + IL_02e9: ldloc.s V_41 + IL_02eb: ldloc.s V_41 + IL_02ed: ldloc.s V_41 + IL_02ef: ldloc.s V_41 + IL_02f1: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_products() + IL_02f6: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Source(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_02fb: ldloc.s V_41 + IL_02fd: newobj instance void Linq101Aggregates01/categories3@66::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_0302: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0311: newobj instance void Linq101Aggregates01/'categories3@67-1'::.ctor() - IL_0316: newobj instance void Linq101Aggregates01/'categories3@67-2'::.ctor() - IL_031b: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,!!3> [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::GroupValBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0307: newobj instance void Linq101Aggregates01/'categories3@67-1'::.ctor() + IL_030c: newobj instance void Linq101Aggregates01/'categories3@67-2'::.ctor() + IL_0311: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,!!3> [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::GroupValBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0320: ldloc.s V_41 - IL_0322: newobj instance void Linq101Aggregates01/'categories3@67-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_0327: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`3,valuetype [mscorlib]System.Decimal,class [mscorlib]System.Collections.Generic.IEnumerable`1>,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0316: ldloc.s V_41 + IL_0318: newobj instance void Linq101Aggregates01/'categories3@67-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_031d: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`3,valuetype [mscorlib]System.Decimal,class [mscorlib]System.Collections.Generic.IEnumerable`1>,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_032c: newobj instance void Linq101Aggregates01/'categories3@70-4'::.ctor() - IL_0331: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,valuetype [mscorlib]System.Decimal,class [mscorlib]System.Collections.Generic.IEnumerable`1>,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2>>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0322: newobj instance void Linq101Aggregates01/'categories3@70-4'::.ctor() + IL_0327: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,valuetype [mscorlib]System.Decimal,class [mscorlib]System.Collections.Generic.IEnumerable`1>,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2>>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0336: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2>,class [mscorlib]System.Collections.IEnumerable>::get_Source() - IL_033b: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>>(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0340: dup - IL_0341: stsfld class [mscorlib]System.Tuple`2>[] ''.$Linq101Aggregates01::categories3@64 - IL_0346: stloc.s categories3 - IL_0348: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_034d: ldc.i4.0 - IL_034e: ldc.i4.0 - IL_034f: ldnull - IL_0350: ldc.i4.0 - IL_0351: ldc.i4.0 - IL_0352: newobj instance void Linq101Aggregates01/maxNum@74::.ctor(int32, - int32, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_032c: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2>,class [mscorlib]System.Collections.IEnumerable>::get_Source() + IL_0331: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>>(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0336: dup + IL_0337: stsfld class [mscorlib]System.Tuple`2>[] ''.$Linq101Aggregates01::categories3@64 + IL_033c: stloc.s categories3 + IL_033e: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_0343: ldnull + IL_0344: ldc.i4.0 + IL_0345: ldc.i4.0 + IL_0346: newobj instance void Linq101Aggregates01/maxNum@74::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, int32) - IL_0357: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_035c: newobj instance void Linq101Aggregates01/'maxNum@74-1'::.ctor() - IL_0361: callvirt instance !!2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::MaxBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_034b: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0350: newobj instance void Linq101Aggregates01/'maxNum@74-1'::.ctor() + IL_0355: callvirt instance !!2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::MaxBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0366: dup - IL_0367: stsfld int32 ''.$Linq101Aggregates01::maxNum@74 - IL_036c: stloc.s maxNum - IL_036e: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_0373: ldnull - IL_0374: ldnull - IL_0375: ldnull - IL_0376: ldc.i4.0 - IL_0377: ldnull - IL_0378: newobj instance void Linq101Aggregates01/longestLength@77::.ctor(string, - string, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_035a: dup + IL_035b: stsfld int32 ''.$Linq101Aggregates01::maxNum@74 + IL_0360: stloc.s maxNum + IL_0362: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_0367: ldnull + IL_0368: ldc.i4.0 + IL_0369: ldnull + IL_036a: newobj instance void Linq101Aggregates01/longestLength@77::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, string) - IL_037d: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0382: newobj instance void Linq101Aggregates01/'longestLength@77-1'::.ctor() - IL_0387: callvirt instance !!2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::MaxBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_036f: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0374: newobj instance void Linq101Aggregates01/'longestLength@77-1'::.ctor() + IL_0379: callvirt instance !!2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::MaxBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_038c: dup - IL_038d: stsfld int32 ''.$Linq101Aggregates01::longestLength@77 - IL_0392: stloc.s longestLength + IL_037e: dup + IL_037f: stsfld int32 ''.$Linq101Aggregates01::longestLength@77 + IL_0384: stloc.s longestLength .line 80,86 : 1,21 '' - IL_0394: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_0399: stloc.s V_42 - IL_039b: ldloc.s V_42 - IL_039d: ldloc.s V_42 - IL_039f: ldloc.s V_42 + IL_0386: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_038b: stloc.s V_42 + IL_038d: ldloc.s V_42 + IL_038f: ldloc.s V_42 + IL_0391: ldloc.s V_42 + IL_0393: ldloc.s V_42 + IL_0395: ldloc.s V_42 + IL_0397: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_products() + IL_039c: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Source(class [mscorlib]System.Collections.Generic.IEnumerable`1) IL_03a1: ldloc.s V_42 - IL_03a3: ldloc.s V_42 - IL_03a5: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_products() - IL_03aa: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Source(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_03af: ldloc.s V_42 - IL_03b1: newobj instance void Linq101Aggregates01/categories4@82::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_03b6: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_03a3: newobj instance void Linq101Aggregates01/categories4@82::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_03a8: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_03bb: newobj instance void Linq101Aggregates01/'categories4@83-1'::.ctor() - IL_03c0: newobj instance void Linq101Aggregates01/'categories4@83-2'::.ctor() - IL_03c5: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,!!3> [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::GroupValBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_03ad: newobj instance void Linq101Aggregates01/'categories4@83-1'::.ctor() + IL_03b2: newobj instance void Linq101Aggregates01/'categories4@83-2'::.ctor() + IL_03b7: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,!!3> [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::GroupValBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_03ca: ldloc.s V_42 - IL_03cc: newobj instance void Linq101Aggregates01/'categories4@83-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_03d1: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2,valuetype [mscorlib]System.Decimal>,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_03bc: ldloc.s V_42 + IL_03be: newobj instance void Linq101Aggregates01/'categories4@83-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_03c3: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2,valuetype [mscorlib]System.Decimal>,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_03d6: newobj instance void Linq101Aggregates01/'categories4@85-4'::.ctor() - IL_03db: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,valuetype [mscorlib]System.Decimal>,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_03c8: newobj instance void Linq101Aggregates01/'categories4@85-4'::.ctor() + IL_03cd: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,valuetype [mscorlib]System.Decimal>,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_03e0: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,class [mscorlib]System.Collections.IEnumerable>::get_Source() - IL_03e5: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_03ea: dup - IL_03eb: stsfld class [mscorlib]System.Tuple`2[] ''.$Linq101Aggregates01::categories4@80 - IL_03f0: stloc.s categories4 + IL_03d2: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,class [mscorlib]System.Collections.IEnumerable>::get_Source() + IL_03d7: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_03dc: dup + IL_03dd: stsfld class [mscorlib]System.Tuple`2[] ''.$Linq101Aggregates01::categories4@80 + IL_03e2: stloc.s categories4 .line 89,96 : 1,21 '' - IL_03f2: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_03f7: stloc.s V_43 - IL_03f9: ldloc.s V_43 - IL_03fb: ldloc.s V_43 - IL_03fd: ldloc.s V_43 + IL_03e4: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_03e9: stloc.s V_43 + IL_03eb: ldloc.s V_43 + IL_03ed: ldloc.s V_43 + IL_03ef: ldloc.s V_43 + IL_03f1: ldloc.s V_43 + IL_03f3: ldloc.s V_43 + IL_03f5: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_products() + IL_03fa: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Source(class [mscorlib]System.Collections.Generic.IEnumerable`1) IL_03ff: ldloc.s V_43 - IL_0401: ldloc.s V_43 - IL_0403: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_products() - IL_0408: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Source(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_040d: ldloc.s V_43 - IL_040f: newobj instance void Linq101Aggregates01/categories5@91::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_0414: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0401: newobj instance void Linq101Aggregates01/categories5@91::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_0406: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0419: newobj instance void Linq101Aggregates01/'categories5@92-1'::.ctor() - IL_041e: newobj instance void Linq101Aggregates01/'categories5@92-2'::.ctor() - IL_0423: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,!!3> [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::GroupValBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_040b: newobj instance void Linq101Aggregates01/'categories5@92-1'::.ctor() + IL_0410: newobj instance void Linq101Aggregates01/'categories5@92-2'::.ctor() + IL_0415: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,!!3> [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::GroupValBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0428: ldloc.s V_43 - IL_042a: newobj instance void Linq101Aggregates01/'categories5@92-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_042f: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`3,valuetype [mscorlib]System.Decimal,class [mscorlib]System.Collections.Generic.IEnumerable`1>,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_041a: ldloc.s V_43 + IL_041c: newobj instance void Linq101Aggregates01/'categories5@92-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_0421: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`3,valuetype [mscorlib]System.Decimal,class [mscorlib]System.Collections.Generic.IEnumerable`1>,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0434: newobj instance void Linq101Aggregates01/'categories5@95-4'::.ctor() - IL_0439: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,valuetype [mscorlib]System.Decimal,class [mscorlib]System.Collections.Generic.IEnumerable`1>,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2>>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0426: newobj instance void Linq101Aggregates01/'categories5@95-4'::.ctor() + IL_042b: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,valuetype [mscorlib]System.Decimal,class [mscorlib]System.Collections.Generic.IEnumerable`1>,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2>>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_043e: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2>,class [mscorlib]System.Collections.IEnumerable>::get_Source() - IL_0443: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>>(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0448: dup - IL_0449: stsfld class [mscorlib]System.Tuple`2>[] ''.$Linq101Aggregates01::categories5@89 - IL_044e: stloc.s categories5 + IL_0430: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2>,class [mscorlib]System.Collections.IEnumerable>::get_Source() + IL_0435: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>>(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_043a: dup + IL_043b: stsfld class [mscorlib]System.Tuple`2>[] ''.$Linq101Aggregates01::categories5@89 + IL_0440: stloc.s categories5 .line 99,99 : 1,66 '' - IL_0450: ldc.r8 5. - IL_0459: ldc.r8 4. - IL_0462: ldc.r8 1. - IL_046b: ldc.r8 3. - IL_0474: ldc.r8 9. - IL_047d: ldc.r8 8. - IL_0486: ldc.r8 6. - IL_048f: ldc.r8 7. - IL_0498: ldc.r8 2. - IL_04a1: ldc.r8 0.0 - IL_04aa: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() - IL_04af: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0442: ldc.r8 5. + IL_044b: ldc.r8 4. + IL_0454: ldc.r8 1. + IL_045d: ldc.r8 3. + IL_0466: ldc.r8 9. + IL_046f: ldc.r8 8. + IL_0478: ldc.r8 6. + IL_0481: ldc.r8 7. + IL_048a: ldc.r8 2. + IL_0493: ldc.r8 0.0 + IL_049c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_04a1: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_04b4: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_04a6: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_04b9: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_04ab: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_04be: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_04b0: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_04c3: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_04b5: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_04c8: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_04ba: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_04cd: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_04bf: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_04d2: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_04c4: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_04d7: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_04c9: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_04dc: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_04ce: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_04e1: dup - IL_04e2: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Aggregates01::numbers2@99 - IL_04e7: stloc.s numbers2 - IL_04e9: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_04ee: stloc.s V_44 - IL_04f0: ldloc.s V_44 - IL_04f2: stloc.s V_45 - IL_04f4: ldc.r8 0.0 - IL_04fd: ldc.r8 0.0 - IL_0506: ldnull - IL_0507: ldc.i4.0 - IL_0508: ldc.r8 0.0 - IL_0511: newobj instance void Linq101Aggregates01/averageNum@100::.ctor(float64, - float64, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_04d3: dup + IL_04d4: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Aggregates01::numbers2@99 + IL_04d9: stloc.s numbers2 + IL_04db: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_04e0: stloc.s V_44 + IL_04e2: ldloc.s V_44 + IL_04e4: stloc.s V_45 + IL_04e6: ldnull + IL_04e7: ldc.i4.0 + IL_04e8: ldc.r8 0.0 + IL_04f1: newobj instance void Linq101Aggregates01/averageNum@100::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, float64) - IL_0516: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_051b: stloc.s V_46 - IL_051d: newobj instance void Linq101Aggregates01/'averageNum@100-1'::.ctor() - IL_0522: stloc.s V_47 - IL_0524: ldloc.s V_46 - IL_0526: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() - IL_052b: stloc.s V_48 - IL_052d: ldloc.s V_48 - IL_052f: box class [mscorlib]System.Collections.Generic.IEnumerable`1 - IL_0534: brfalse.s IL_0538 - - IL_0536: br.s IL_0543 + IL_04f6: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_04fb: stloc.s V_46 + IL_04fd: newobj instance void Linq101Aggregates01/'averageNum@100-1'::.ctor() + IL_0502: stloc.s V_47 + IL_0504: ldloc.s V_46 + IL_0506: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() + IL_050b: stloc.s V_48 + IL_050d: ldloc.s V_48 + IL_050f: box class [mscorlib]System.Collections.Generic.IEnumerable`1 + IL_0514: brfalse.s IL_0518 + + IL_0516: br.s IL_0523 .line 100001,100001 : 0,0 '' - IL_0538: ldstr "source" - IL_053d: newobj instance void [mscorlib]System.ArgumentNullException::.ctor(string) - IL_0542: throw + IL_0518: ldstr "source" + IL_051d: newobj instance void [mscorlib]System.ArgumentNullException::.ctor(string) + IL_0522: throw .line 100001,100001 : 0,0 '' - IL_0543: nop - IL_0544: ldloc.s V_48 - IL_0546: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_054b: stloc.s V_49 + IL_0523: nop + IL_0524: ldloc.s V_48 + IL_0526: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_052b: stloc.s V_49 .try { - IL_054d: ldc.r8 0.0 - IL_0556: stloc.s V_51 - IL_0558: ldc.i4.0 - IL_0559: stloc.s V_52 - IL_055b: ldloc.s V_49 - IL_055d: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0562: brfalse.s IL_0580 - - IL_0564: ldloc.s V_51 - IL_0566: ldloc.s V_47 - IL_0568: ldloc.s V_49 - IL_056a: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_056f: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0574: add - IL_0575: stloc.s V_51 + IL_052d: ldc.r8 0.0 + IL_0536: stloc.s V_51 + IL_0538: ldc.i4.0 + IL_0539: stloc.s V_52 + IL_053b: ldloc.s V_49 + IL_053d: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_0542: brfalse.s IL_0560 + + IL_0544: ldloc.s V_51 + IL_0546: ldloc.s V_47 + IL_0548: ldloc.s V_49 + IL_054a: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_054f: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0554: add + IL_0555: stloc.s V_51 .line 100,100 : 47,58 '' - IL_0577: ldloc.s V_52 - IL_0579: ldc.i4.1 - IL_057a: add - IL_057b: stloc.s V_52 + IL_0557: ldloc.s V_52 + IL_0559: ldc.i4.1 + IL_055a: add + IL_055b: stloc.s V_52 .line 100001,100001 : 0,0 '' - IL_057d: nop - IL_057e: br.s IL_055b + IL_055d: nop + IL_055e: br.s IL_053b - IL_0580: ldloc.s V_52 - IL_0582: brtrue.s IL_0586 + IL_0560: ldloc.s V_52 + IL_0562: brtrue.s IL_0566 - IL_0584: br.s IL_0588 + IL_0564: br.s IL_0568 - IL_0586: br.s IL_0593 + IL_0566: br.s IL_0573 .line 100001,100001 : 0,0 '' - IL_0588: ldstr "source" - IL_058d: newobj instance void [mscorlib]System.InvalidOperationException::.ctor(string) - IL_0592: throw + IL_0568: ldstr "source" + IL_056d: newobj instance void [mscorlib]System.InvalidOperationException::.ctor(string) + IL_0572: throw .line 100001,100001 : 0,0 '' - IL_0593: nop - IL_0594: ldloc.s V_51 - IL_0596: stloc.s V_53 - IL_0598: ldloc.s V_52 - IL_059a: stloc.s V_54 - IL_059c: ldloc.s V_53 - IL_059e: ldloc.s V_54 - IL_05a0: conv.r8 - IL_05a1: div - IL_05a2: stloc.s V_50 - IL_05a4: leave.s IL_05c4 + IL_0573: nop + IL_0574: ldloc.s V_51 + IL_0576: stloc.s V_53 + IL_0578: ldloc.s V_52 + IL_057a: stloc.s V_54 + IL_057c: ldloc.s V_53 + IL_057e: ldloc.s V_54 + IL_0580: conv.r8 + IL_0581: div + IL_0582: stloc.s V_50 + IL_0584: leave.s IL_05a4 } // end .try finally { - IL_05a6: ldloc.s V_49 - IL_05a8: isinst [mscorlib]System.IDisposable - IL_05ad: stloc.s V_55 - IL_05af: ldloc.s V_55 - IL_05b1: brfalse.s IL_05b5 + IL_0586: ldloc.s V_49 + IL_0588: isinst [mscorlib]System.IDisposable + IL_058d: stloc.s V_55 + IL_058f: ldloc.s V_55 + IL_0591: brfalse.s IL_0595 - IL_05b3: br.s IL_05b7 + IL_0593: br.s IL_0597 - IL_05b5: br.s IL_05c1 + IL_0595: br.s IL_05a1 .line 100001,100001 : 0,0 '' - IL_05b7: ldloc.s V_55 - IL_05b9: callvirt instance void [mscorlib]System.IDisposable::Dispose() - IL_05be: ldnull - IL_05bf: pop - IL_05c0: endfinally + IL_0597: ldloc.s V_55 + IL_0599: callvirt instance void [mscorlib]System.IDisposable::Dispose() + IL_059e: ldnull + IL_059f: pop + IL_05a0: endfinally .line 100001,100001 : 0,0 '' - IL_05c1: ldnull - IL_05c2: pop - IL_05c3: endfinally + IL_05a1: ldnull + IL_05a2: pop + IL_05a3: endfinally .line 100001,100001 : 0,0 '' } // end handler - IL_05c4: ldloc.s V_50 - IL_05c6: dup - IL_05c7: stsfld float64 ''.$Linq101Aggregates01::averageNum@100 - IL_05cc: stloc.s averageNum - IL_05ce: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_05d3: stloc.s V_56 - IL_05d5: ldloc.s V_56 - IL_05d7: stloc.s V_57 - IL_05d9: ldloc.s V_56 - IL_05db: ldloc.s V_56 - IL_05dd: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_words() - IL_05e2: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Source(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_05e7: ldloc.s V_56 - IL_05e9: newobj instance void Linq101Aggregates01/averageLength@105::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_05ee: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_05a4: ldloc.s V_50 + IL_05a6: dup + IL_05a7: stsfld float64 ''.$Linq101Aggregates01::averageNum@100 + IL_05ac: stloc.s averageNum + IL_05ae: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_05b3: stloc.s V_56 + IL_05b5: ldloc.s V_56 + IL_05b7: stloc.s V_57 + IL_05b9: ldloc.s V_56 + IL_05bb: ldloc.s V_56 + IL_05bd: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_words() + IL_05c2: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Source(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_05c7: ldloc.s V_56 + IL_05c9: newobj instance void Linq101Aggregates01/averageLength@105::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_05ce: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_05f3: stloc.s V_58 - IL_05f5: newobj instance void Linq101Aggregates01/'averageLength@107-1'::.ctor() - IL_05fa: stloc.s V_59 - IL_05fc: ldloc.s V_58 - IL_05fe: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,class [mscorlib]System.Collections.IEnumerable>::get_Source() - IL_0603: stloc.s V_60 - IL_0605: ldloc.s V_60 - IL_0607: box class [mscorlib]System.Collections.Generic.IEnumerable`1> - IL_060c: brfalse.s IL_0610 - - IL_060e: br.s IL_061b + IL_05d3: stloc.s V_58 + IL_05d5: newobj instance void Linq101Aggregates01/'averageLength@107-1'::.ctor() + IL_05da: stloc.s V_59 + IL_05dc: ldloc.s V_58 + IL_05de: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,class [mscorlib]System.Collections.IEnumerable>::get_Source() + IL_05e3: stloc.s V_60 + IL_05e5: ldloc.s V_60 + IL_05e7: box class [mscorlib]System.Collections.Generic.IEnumerable`1> + IL_05ec: brfalse.s IL_05f0 + + IL_05ee: br.s IL_05fb .line 100001,100001 : 0,0 '' - IL_0610: ldstr "source" - IL_0615: newobj instance void [mscorlib]System.ArgumentNullException::.ctor(string) - IL_061a: throw + IL_05f0: ldstr "source" + IL_05f5: newobj instance void [mscorlib]System.ArgumentNullException::.ctor(string) + IL_05fa: throw .line 100001,100001 : 0,0 '' - IL_061b: nop - IL_061c: ldloc.s V_60 - IL_061e: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1>::GetEnumerator() - IL_0623: stloc.s V_61 + IL_05fb: nop + IL_05fc: ldloc.s V_60 + IL_05fe: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1>::GetEnumerator() + IL_0603: stloc.s V_61 .try { - IL_0625: ldc.r8 0.0 - IL_062e: stloc.s V_63 - IL_0630: ldc.i4.0 - IL_0631: stloc.s V_64 - IL_0633: ldloc.s V_61 - IL_0635: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_063a: brfalse.s IL_0658 - - IL_063c: ldloc.s V_63 - IL_063e: ldloc.s V_59 - IL_0640: ldloc.s V_61 - IL_0642: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1>::get_Current() - IL_0647: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,float64>::Invoke(!0) - IL_064c: add - IL_064d: stloc.s V_63 + IL_0605: ldc.r8 0.0 + IL_060e: stloc.s V_63 + IL_0610: ldc.i4.0 + IL_0611: stloc.s V_64 + IL_0613: ldloc.s V_61 + IL_0615: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_061a: brfalse.s IL_0638 + + IL_061c: ldloc.s V_63 + IL_061e: ldloc.s V_59 + IL_0620: ldloc.s V_61 + IL_0622: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1>::get_Current() + IL_0627: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,float64>::Invoke(!0) + IL_062c: add + IL_062d: stloc.s V_63 .line 107,107 : 9,21 '' - IL_064f: ldloc.s V_64 - IL_0651: ldc.i4.1 - IL_0652: add - IL_0653: stloc.s V_64 + IL_062f: ldloc.s V_64 + IL_0631: ldc.i4.1 + IL_0632: add + IL_0633: stloc.s V_64 .line 100001,100001 : 0,0 '' - IL_0655: nop - IL_0656: br.s IL_0633 + IL_0635: nop + IL_0636: br.s IL_0613 - IL_0658: ldloc.s V_64 - IL_065a: brtrue.s IL_065e + IL_0638: ldloc.s V_64 + IL_063a: brtrue.s IL_063e - IL_065c: br.s IL_0660 + IL_063c: br.s IL_0640 - IL_065e: br.s IL_066b + IL_063e: br.s IL_064b .line 100001,100001 : 0,0 '' - IL_0660: ldstr "source" - IL_0665: newobj instance void [mscorlib]System.InvalidOperationException::.ctor(string) - IL_066a: throw + IL_0640: ldstr "source" + IL_0645: newobj instance void [mscorlib]System.InvalidOperationException::.ctor(string) + IL_064a: throw .line 100001,100001 : 0,0 '' - IL_066b: nop - IL_066c: ldloc.s V_63 - IL_066e: stloc.s V_65 - IL_0670: ldloc.s V_64 - IL_0672: stloc.s V_66 - IL_0674: ldloc.s V_65 - IL_0676: ldloc.s V_66 - IL_0678: conv.r8 - IL_0679: div - IL_067a: stloc.s V_62 - IL_067c: leave.s IL_069c + IL_064b: nop + IL_064c: ldloc.s V_63 + IL_064e: stloc.s V_65 + IL_0650: ldloc.s V_64 + IL_0652: stloc.s V_66 + IL_0654: ldloc.s V_65 + IL_0656: ldloc.s V_66 + IL_0658: conv.r8 + IL_0659: div + IL_065a: stloc.s V_62 + IL_065c: leave.s IL_067c } // end .try finally { - IL_067e: ldloc.s V_61 - IL_0680: isinst [mscorlib]System.IDisposable - IL_0685: stloc.s V_67 - IL_0687: ldloc.s V_67 - IL_0689: brfalse.s IL_068d + IL_065e: ldloc.s V_61 + IL_0660: isinst [mscorlib]System.IDisposable + IL_0665: stloc.s V_67 + IL_0667: ldloc.s V_67 + IL_0669: brfalse.s IL_066d - IL_068b: br.s IL_068f + IL_066b: br.s IL_066f - IL_068d: br.s IL_0699 + IL_066d: br.s IL_0679 .line 100001,100001 : 0,0 '' - IL_068f: ldloc.s V_67 - IL_0691: callvirt instance void [mscorlib]System.IDisposable::Dispose() - IL_0696: ldnull - IL_0697: pop - IL_0698: endfinally + IL_066f: ldloc.s V_67 + IL_0671: callvirt instance void [mscorlib]System.IDisposable::Dispose() + IL_0676: ldnull + IL_0677: pop + IL_0678: endfinally .line 100001,100001 : 0,0 '' - IL_0699: ldnull - IL_069a: pop - IL_069b: endfinally + IL_0679: ldnull + IL_067a: pop + IL_067b: endfinally .line 100001,100001 : 0,0 '' } // end handler - IL_069c: ldloc.s V_62 - IL_069e: dup - IL_069f: stsfld float64 ''.$Linq101Aggregates01::averageLength@103 - IL_06a4: stloc.s averageLength + IL_067c: ldloc.s V_62 + IL_067e: dup + IL_067f: stsfld float64 ''.$Linq101Aggregates01::averageLength@103 + IL_0684: stloc.s averageLength .line 111,117 : 1,21 '' - IL_06a6: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_06ab: stloc.s V_68 - IL_06ad: ldloc.s V_68 - IL_06af: ldloc.s V_68 - IL_06b1: ldloc.s V_68 - IL_06b3: ldloc.s V_68 - IL_06b5: ldloc.s V_68 - IL_06b7: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_products() - IL_06bc: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Source(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_06c1: ldloc.s V_68 - IL_06c3: newobj instance void Linq101Aggregates01/categories6@113::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_06c8: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0686: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_068b: stloc.s V_68 + IL_068d: ldloc.s V_68 + IL_068f: ldloc.s V_68 + IL_0691: ldloc.s V_68 + IL_0693: ldloc.s V_68 + IL_0695: ldloc.s V_68 + IL_0697: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_products() + IL_069c: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Source(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_06a1: ldloc.s V_68 + IL_06a3: newobj instance void Linq101Aggregates01/categories6@113::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_06a8: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_06cd: newobj instance void Linq101Aggregates01/'categories6@114-1'::.ctor() - IL_06d2: newobj instance void Linq101Aggregates01/'categories6@114-2'::.ctor() - IL_06d7: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,!!3> [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::GroupValBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_06ad: newobj instance void Linq101Aggregates01/'categories6@114-1'::.ctor() + IL_06b2: newobj instance void Linq101Aggregates01/'categories6@114-2'::.ctor() + IL_06b7: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,!!3> [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::GroupValBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_06dc: ldloc.s V_68 - IL_06de: newobj instance void Linq101Aggregates01/'categories6@114-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_06e3: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2,valuetype [mscorlib]System.Decimal>,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_06bc: ldloc.s V_68 + IL_06be: newobj instance void Linq101Aggregates01/'categories6@114-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_06c3: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2,valuetype [mscorlib]System.Decimal>,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_06e8: newobj instance void Linq101Aggregates01/'categories6@116-4'::.ctor() - IL_06ed: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,valuetype [mscorlib]System.Decimal>,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_06c8: newobj instance void Linq101Aggregates01/'categories6@116-4'::.ctor() + IL_06cd: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,valuetype [mscorlib]System.Decimal>,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_06f2: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,class [mscorlib]System.Collections.IEnumerable>::get_Source() - IL_06f7: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_06fc: dup - IL_06fd: stsfld class [mscorlib]System.Tuple`2[] ''.$Linq101Aggregates01::categories6@111 - IL_0702: stloc.s categories6 - IL_0704: ret + IL_06d2: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,class [mscorlib]System.Collections.IEnumerable>::get_Source() + IL_06d7: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_06dc: dup + IL_06dd: stsfld class [mscorlib]System.Tuple`2[] ''.$Linq101Aggregates01::categories6@111 + IL_06e2: stloc.s categories6 + IL_06e4: ret } // end of method $Linq101Aggregates01::main@ } // end of class ''.$Linq101Aggregates01 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101ElementOperators01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101ElementOperators01.il.bsl index f6b3a2887c1..b0aa6e961a6 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101ElementOperators01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101ElementOperators01.il.bsl @@ -13,7 +13,7 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 4:4:1:0 + .ver 4:5:0:0 } .assembly extern Utils { @@ -33,20 +33,20 @@ } .mresource public FSharpSignatureData.Linq101ElementOperators01 { - // Offset: 0x00000000 Length: 0x00000368 + // Offset: 0x00000000 Length: 0x0000038A } .mresource public FSharpOptimizationData.Linq101ElementOperators01 { - // Offset: 0x00000370 Length: 0x00000127 + // Offset: 0x00000390 Length: 0x00000127 } .module Linq101ElementOperators01.exe -// MVID: {5A1F62A6-19D7-C20D-A745-0383A6621F5A} +// MVID: {5B9A632A-19D7-C20D-A745-03832A639A5B} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x036D0000 +// Image base: 0x028F0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -59,11 +59,6 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) - .field public class [Utils]Utils/Product _arg1 - .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 ) - .field public class [Utils]Utils/Product p .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' .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 ) @@ -77,41 +72,35 @@ .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 specialname rtspecialname - instance void .ctor(class [Utils]Utils/Product _arg1, - class [Utils]Utils/Product p, - class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', int32 pc, class [Utils]Utils/Product current) cil managed { - // Code size 44 (0x2c) + // Code size 28 (0x1c) .maxstack 8 IL_0000: ldarg.0 IL_0001: ldarg.1 - IL_0002: stfld class [Utils]Utils/Product Linq101ElementOperators01/products12@12::_arg1 + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/products12@12::'enum' IL_0007: ldarg.0 IL_0008: ldarg.2 - IL_0009: stfld class [Utils]Utils/Product Linq101ElementOperators01/products12@12::p + IL_0009: stfld int32 Linq101ElementOperators01/products12@12::pc IL_000e: ldarg.0 IL_000f: ldarg.3 - IL_0010: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/products12@12::'enum' + IL_0010: stfld class [Utils]Utils/Product Linq101ElementOperators01/products12@12::current IL_0015: ldarg.0 - IL_0016: ldarg.s pc - IL_0018: stfld int32 Linq101ElementOperators01/products12@12::pc - IL_001d: ldarg.0 - IL_001e: ldarg.s current - IL_0020: stfld class [Utils]Utils/Product Linq101ElementOperators01/products12@12::current - IL_0025: ldarg.0 - IL_0026: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() - IL_002b: ret + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_001b: ret } // end of method products12@12::.ctor .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 191 (0xbf) + // Code size 154 (0x9a) .maxstack 6 + .locals init ([0] class [Utils]Utils/Product V_0, + [1] class [Utils]Utils/Product p) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 100001,100001 : 0,0 'C:\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\QueryExpressionStepping\\Linq101ElementOperators01.fs' + .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\QueryExpressionStepping\\Linq101ElementOperators01.fs' IL_0000: ldarg.0 IL_0001: ldfld int32 Linq101ElementOperators01/products12@12::pc IL_0006: ldc.i4.1 @@ -120,7 +109,7 @@ IL_001b, IL_001d, IL_001f) - IL_0019: br.s IL_002d + IL_0019: br.s IL_002a IL_001b: br.s IL_0021 @@ -130,203 +119,190 @@ .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br.s IL_0095 + IL_0022: br.s IL_0070 .line 100001,100001 : 0,0 '' IL_0024: nop - IL_0025: br.s IL_0084 + IL_0025: br.s IL_006d .line 100001,100001 : 0,0 '' IL_0027: nop - IL_0028: br IL_00b6 + IL_0028: br.s IL_0091 .line 100001,100001 : 0,0 '' - IL_002d: nop + IL_002a: nop .line 12,12 : 9,29 '' - IL_002e: ldarg.0 - IL_002f: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101ElementOperators01::get_products() - IL_0034: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0039: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/products12@12::'enum' - IL_003e: ldarg.0 - IL_003f: ldc.i4.1 - IL_0040: stfld int32 Linq101ElementOperators01/products12@12::pc + IL_002b: ldarg.0 + IL_002c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101ElementOperators01::get_products() + IL_0031: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0036: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/products12@12::'enum' + IL_003b: ldarg.0 + IL_003c: ldc.i4.1 + IL_003d: stfld int32 Linq101ElementOperators01/products12@12::pc .line 12,12 : 9,29 '' - IL_0045: ldarg.0 - IL_0046: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/products12@12::'enum' - IL_004b: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0050: brfalse.s IL_0095 - - IL_0052: ldarg.0 - IL_0053: ldarg.0 - IL_0054: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/products12@12::'enum' - IL_0059: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_005e: stfld class [Utils]Utils/Product Linq101ElementOperators01/products12@12::_arg1 + IL_0042: ldarg.0 + IL_0043: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/products12@12::'enum' + IL_0048: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_004d: brfalse.s IL_0070 + + IL_004f: ldarg.0 + IL_0050: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/products12@12::'enum' + IL_0055: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_005a: stloc.0 .line 12,12 : 9,29 '' - IL_0063: ldarg.0 - IL_0064: ldarg.0 - IL_0065: ldfld class [Utils]Utils/Product Linq101ElementOperators01/products12@12::_arg1 - IL_006a: stfld class [Utils]Utils/Product Linq101ElementOperators01/products12@12::p - IL_006f: ldarg.0 - IL_0070: ldc.i4.2 - IL_0071: stfld int32 Linq101ElementOperators01/products12@12::pc + IL_005b: ldloc.0 + IL_005c: stloc.1 + IL_005d: ldarg.0 + IL_005e: ldc.i4.2 + IL_005f: stfld int32 Linq101ElementOperators01/products12@12::pc .line 13,13 : 9,33 '' - IL_0076: ldarg.0 - IL_0077: ldarg.0 - IL_0078: ldfld class [Utils]Utils/Product Linq101ElementOperators01/products12@12::p - IL_007d: stfld class [Utils]Utils/Product Linq101ElementOperators01/products12@12::current - IL_0082: ldc.i4.1 - IL_0083: ret - - IL_0084: ldarg.0 - IL_0085: ldnull - IL_0086: stfld class [Utils]Utils/Product Linq101ElementOperators01/products12@12::p - .line 12,12 : 9,29 '' - IL_008b: ldarg.0 - IL_008c: ldnull - IL_008d: stfld class [Utils]Utils/Product Linq101ElementOperators01/products12@12::_arg1 + IL_0064: ldarg.0 + IL_0065: ldloc.1 + IL_0066: stfld class [Utils]Utils/Product Linq101ElementOperators01/products12@12::current + IL_006b: ldc.i4.1 + IL_006c: ret + .line 100001,100001 : 0,0 '' - IL_0092: nop - IL_0093: br.s IL_0045 + IL_006d: nop + IL_006e: br.s IL_0042 - IL_0095: ldarg.0 - IL_0096: ldc.i4.3 - IL_0097: stfld int32 Linq101ElementOperators01/products12@12::pc + IL_0070: ldarg.0 + IL_0071: ldc.i4.3 + IL_0072: stfld int32 Linq101ElementOperators01/products12@12::pc .line 12,12 : 9,29 '' - IL_009c: ldarg.0 - IL_009d: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/products12@12::'enum' - IL_00a2: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_00a7: nop - IL_00a8: ldarg.0 - IL_00a9: ldnull - IL_00aa: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/products12@12::'enum' - IL_00af: ldarg.0 - IL_00b0: ldc.i4.3 - IL_00b1: stfld int32 Linq101ElementOperators01/products12@12::pc - IL_00b6: ldarg.0 - IL_00b7: ldnull - IL_00b8: stfld class [Utils]Utils/Product Linq101ElementOperators01/products12@12::current - IL_00bd: ldc.i4.0 - IL_00be: ret + IL_0077: ldarg.0 + IL_0078: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/products12@12::'enum' + IL_007d: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0082: nop + IL_0083: ldarg.0 + IL_0084: ldnull + IL_0085: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/products12@12::'enum' + IL_008a: ldarg.0 + IL_008b: ldc.i4.3 + IL_008c: stfld int32 Linq101ElementOperators01/products12@12::pc + IL_0091: ldarg.0 + IL_0092: ldnull + IL_0093: stfld class [Utils]Utils/Product Linq101ElementOperators01/products12@12::current + IL_0098: ldc.i4.0 + IL_0099: ret } // end of method products12@12::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 150 (0x96) + // Code size 148 (0x94) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [FSharp.Core]Microsoft.FSharp.Core.Unit V_1, [2] class [mscorlib]System.Exception e) .line 100001,100001 : 0,0 '' - IL_0000: ldnull - IL_0001: stloc.0 - IL_0002: ldarg.0 - IL_0003: ldfld int32 Linq101ElementOperators01/products12@12::pc - IL_0008: ldc.i4.3 - IL_0009: sub - IL_000a: switch ( - IL_0015) - IL_0013: br.s IL_001b + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101ElementOperators01/products12@12::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0019 .line 100001,100001 : 0,0 '' - IL_0015: nop - IL_0016: br IL_0089 + IL_0013: nop + IL_0014: br IL_0087 .line 100001,100001 : 0,0 '' - IL_001b: nop + IL_0019: nop .try { - IL_001c: ldarg.0 - IL_001d: ldfld int32 Linq101ElementOperators01/products12@12::pc - IL_0022: switch ( + IL_001a: ldarg.0 + IL_001b: ldfld int32 Linq101ElementOperators01/products12@12::pc + IL_0020: switch ( + IL_0037, IL_0039, IL_003b, - IL_003d, - IL_003f) - IL_0037: br.s IL_004d + IL_003d) + IL_0035: br.s IL_004b - IL_0039: br.s IL_0041 + IL_0037: br.s IL_003f - IL_003b: br.s IL_0044 + IL_0039: br.s IL_0042 - IL_003d: br.s IL_0047 + IL_003b: br.s IL_0045 - IL_003f: br.s IL_004a + IL_003d: br.s IL_0048 .line 100001,100001 : 0,0 '' - IL_0041: nop - IL_0042: br.s IL_0063 + IL_003f: nop + IL_0040: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_0044: nop - IL_0045: br.s IL_004f + IL_0042: nop + IL_0043: br.s IL_004d .line 100001,100001 : 0,0 '' - IL_0047: nop - IL_0048: br.s IL_004e + IL_0045: nop + IL_0046: br.s IL_004c .line 100001,100001 : 0,0 '' - IL_004a: nop - IL_004b: br.s IL_0063 + IL_0048: nop + IL_0049: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_004d: nop + IL_004b: nop .line 100001,100001 : 0,0 '' - IL_004e: nop - IL_004f: ldarg.0 - IL_0050: ldc.i4.3 - IL_0051: stfld int32 Linq101ElementOperators01/products12@12::pc - IL_0056: ldarg.0 - IL_0057: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/products12@12::'enum' - IL_005c: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_0061: nop + IL_004c: nop + IL_004d: ldarg.0 + IL_004e: ldc.i4.3 + IL_004f: stfld int32 Linq101ElementOperators01/products12@12::pc + IL_0054: ldarg.0 + IL_0055: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/products12@12::'enum' + IL_005a: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_005f: nop .line 100001,100001 : 0,0 '' - IL_0062: nop - IL_0063: ldarg.0 - IL_0064: ldc.i4.3 - IL_0065: stfld int32 Linq101ElementOperators01/products12@12::pc - IL_006a: ldarg.0 - IL_006b: ldnull - IL_006c: stfld class [Utils]Utils/Product Linq101ElementOperators01/products12@12::current - IL_0071: ldnull - IL_0072: stloc.1 - IL_0073: leave.s IL_0081 + IL_0060: nop + IL_0061: ldarg.0 + IL_0062: ldc.i4.3 + IL_0063: stfld int32 Linq101ElementOperators01/products12@12::pc + IL_0068: ldarg.0 + IL_0069: ldnull + IL_006a: stfld class [Utils]Utils/Product Linq101ElementOperators01/products12@12::current + IL_006f: ldnull + IL_0070: stloc.1 + IL_0071: leave.s IL_007f } // end .try catch [mscorlib]System.Object { - IL_0075: castclass [mscorlib]System.Exception - IL_007a: stloc.2 + IL_0073: castclass [mscorlib]System.Exception + IL_0078: stloc.2 .line 12,12 : 9,29 '' - IL_007b: ldloc.2 - IL_007c: stloc.0 - IL_007d: ldnull - IL_007e: stloc.1 - IL_007f: leave.s IL_0081 + IL_0079: ldloc.2 + IL_007a: stloc.0 + IL_007b: ldnull + IL_007c: stloc.1 + IL_007d: leave.s IL_007f .line 100001,100001 : 0,0 '' } // end handler - IL_0081: ldloc.1 - IL_0082: pop + IL_007f: ldloc.1 + IL_0080: pop .line 100001,100001 : 0,0 '' - IL_0083: nop - IL_0084: br IL_0002 + IL_0081: nop + IL_0082: br IL_0000 - IL_0089: ldloc.0 - IL_008a: ldnull - IL_008b: cgt.un - IL_008d: brfalse.s IL_0091 + IL_0087: ldloc.0 + IL_0088: ldnull + IL_0089: cgt.un + IL_008b: brfalse.s IL_008f - IL_008f: br.s IL_0093 + IL_008d: br.s IL_0091 - IL_0091: br.s IL_0095 + IL_008f: br.s IL_0093 .line 100001,100001 : 0,0 '' - IL_0093: ldloc.0 - IL_0094: throw + IL_0091: ldloc.0 + IL_0092: throw .line 100001,100001 : 0,0 '' - IL_0095: ret + IL_0093: ret } // end of method products12@12::Close .method public strict virtual instance bool @@ -397,19 +373,15 @@ { .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 ) - // Code size 11 (0xb) - .maxstack 9 + // Code size 9 (0x9) + .maxstack 8 IL_0000: ldnull - IL_0001: ldnull + IL_0001: ldc.i4.0 IL_0002: ldnull - IL_0003: ldc.i4.0 - IL_0004: ldnull - IL_0005: newobj instance void Linq101ElementOperators01/products12@12::.ctor(class [Utils]Utils/Product, - class [Utils]Utils/Product, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0003: newobj instance void Linq101ElementOperators01/products12@12::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, class [Utils]Utils/Product) - IL_000a: ret + IL_0008: ret } // end of method products12@12::GetFreshEnumerator } // end of class products12@12 @@ -448,11 +420,6 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) - .field public string _arg1 - .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 ) - .field public string s .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' .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 ) @@ -466,39 +433,33 @@ .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 specialname rtspecialname - instance void .ctor(string _arg1, - string s, - class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', int32 pc, string current) cil managed { - // Code size 44 (0x2c) + // Code size 28 (0x1c) .maxstack 8 IL_0000: ldarg.0 IL_0001: ldarg.1 - IL_0002: stfld string Linq101ElementOperators01/startsWithO@22::_arg1 + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/startsWithO@22::'enum' IL_0007: ldarg.0 IL_0008: ldarg.2 - IL_0009: stfld string Linq101ElementOperators01/startsWithO@22::s + IL_0009: stfld int32 Linq101ElementOperators01/startsWithO@22::pc IL_000e: ldarg.0 IL_000f: ldarg.3 - IL_0010: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/startsWithO@22::'enum' + IL_0010: stfld string Linq101ElementOperators01/startsWithO@22::current IL_0015: ldarg.0 - IL_0016: ldarg.s pc - IL_0018: stfld int32 Linq101ElementOperators01/startsWithO@22::pc - IL_001d: ldarg.0 - IL_001e: ldarg.s current - IL_0020: stfld string Linq101ElementOperators01/startsWithO@22::current - IL_0025: ldarg.0 - IL_0026: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() - IL_002b: ret + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_001b: ret } // end of method startsWithO@22::.ctor .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 191 (0xbf) + // Code size 154 (0x9a) .maxstack 6 + .locals init ([0] string V_0, + [1] string s) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 IL_0001: ldfld int32 Linq101ElementOperators01/startsWithO@22::pc @@ -508,7 +469,7 @@ IL_001b, IL_001d, IL_001f) - IL_0019: br.s IL_002d + IL_0019: br.s IL_002a IL_001b: br.s IL_0021 @@ -518,203 +479,190 @@ .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br.s IL_0095 + IL_0022: br.s IL_0070 .line 100001,100001 : 0,0 '' IL_0024: nop - IL_0025: br.s IL_0084 + IL_0025: br.s IL_006d .line 100001,100001 : 0,0 '' IL_0027: nop - IL_0028: br IL_00b6 + IL_0028: br.s IL_0091 .line 100001,100001 : 0,0 '' - IL_002d: nop + IL_002a: nop .line 22,22 : 9,28 '' - IL_002e: ldarg.0 - IL_002f: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101ElementOperators01::get_strings() - IL_0034: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0039: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/startsWithO@22::'enum' - IL_003e: ldarg.0 - IL_003f: ldc.i4.1 - IL_0040: stfld int32 Linq101ElementOperators01/startsWithO@22::pc + IL_002b: ldarg.0 + IL_002c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101ElementOperators01::get_strings() + IL_0031: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0036: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/startsWithO@22::'enum' + IL_003b: ldarg.0 + IL_003c: ldc.i4.1 + IL_003d: stfld int32 Linq101ElementOperators01/startsWithO@22::pc .line 22,22 : 9,28 '' - IL_0045: ldarg.0 - IL_0046: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/startsWithO@22::'enum' - IL_004b: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0050: brfalse.s IL_0095 - - IL_0052: ldarg.0 - IL_0053: ldarg.0 - IL_0054: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/startsWithO@22::'enum' - IL_0059: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_005e: stfld string Linq101ElementOperators01/startsWithO@22::_arg1 + IL_0042: ldarg.0 + IL_0043: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/startsWithO@22::'enum' + IL_0048: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_004d: brfalse.s IL_0070 + + IL_004f: ldarg.0 + IL_0050: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/startsWithO@22::'enum' + IL_0055: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_005a: stloc.0 .line 22,22 : 9,28 '' - IL_0063: ldarg.0 - IL_0064: ldarg.0 - IL_0065: ldfld string Linq101ElementOperators01/startsWithO@22::_arg1 - IL_006a: stfld string Linq101ElementOperators01/startsWithO@22::s - IL_006f: ldarg.0 - IL_0070: ldc.i4.2 - IL_0071: stfld int32 Linq101ElementOperators01/startsWithO@22::pc + IL_005b: ldloc.0 + IL_005c: stloc.1 + IL_005d: ldarg.0 + IL_005e: ldc.i4.2 + IL_005f: stfld int32 Linq101ElementOperators01/startsWithO@22::pc .line 23,23 : 9,28 '' - IL_0076: ldarg.0 - IL_0077: ldarg.0 - IL_0078: ldfld string Linq101ElementOperators01/startsWithO@22::s - IL_007d: stfld string Linq101ElementOperators01/startsWithO@22::current - IL_0082: ldc.i4.1 - IL_0083: ret - - IL_0084: ldarg.0 - IL_0085: ldnull - IL_0086: stfld string Linq101ElementOperators01/startsWithO@22::s - .line 22,22 : 9,28 '' - IL_008b: ldarg.0 - IL_008c: ldnull - IL_008d: stfld string Linq101ElementOperators01/startsWithO@22::_arg1 + IL_0064: ldarg.0 + IL_0065: ldloc.1 + IL_0066: stfld string Linq101ElementOperators01/startsWithO@22::current + IL_006b: ldc.i4.1 + IL_006c: ret + .line 100001,100001 : 0,0 '' - IL_0092: nop - IL_0093: br.s IL_0045 + IL_006d: nop + IL_006e: br.s IL_0042 - IL_0095: ldarg.0 - IL_0096: ldc.i4.3 - IL_0097: stfld int32 Linq101ElementOperators01/startsWithO@22::pc + IL_0070: ldarg.0 + IL_0071: ldc.i4.3 + IL_0072: stfld int32 Linq101ElementOperators01/startsWithO@22::pc .line 22,22 : 9,28 '' - IL_009c: ldarg.0 - IL_009d: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/startsWithO@22::'enum' - IL_00a2: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_00a7: nop - IL_00a8: ldarg.0 - IL_00a9: ldnull - IL_00aa: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/startsWithO@22::'enum' - IL_00af: ldarg.0 - IL_00b0: ldc.i4.3 - IL_00b1: stfld int32 Linq101ElementOperators01/startsWithO@22::pc - IL_00b6: ldarg.0 - IL_00b7: ldnull - IL_00b8: stfld string Linq101ElementOperators01/startsWithO@22::current - IL_00bd: ldc.i4.0 - IL_00be: ret + IL_0077: ldarg.0 + IL_0078: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/startsWithO@22::'enum' + IL_007d: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0082: nop + IL_0083: ldarg.0 + IL_0084: ldnull + IL_0085: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/startsWithO@22::'enum' + IL_008a: ldarg.0 + IL_008b: ldc.i4.3 + IL_008c: stfld int32 Linq101ElementOperators01/startsWithO@22::pc + IL_0091: ldarg.0 + IL_0092: ldnull + IL_0093: stfld string Linq101ElementOperators01/startsWithO@22::current + IL_0098: ldc.i4.0 + IL_0099: ret } // end of method startsWithO@22::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 150 (0x96) + // Code size 148 (0x94) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [FSharp.Core]Microsoft.FSharp.Core.Unit V_1, [2] class [mscorlib]System.Exception e) .line 100001,100001 : 0,0 '' - IL_0000: ldnull - IL_0001: stloc.0 - IL_0002: ldarg.0 - IL_0003: ldfld int32 Linq101ElementOperators01/startsWithO@22::pc - IL_0008: ldc.i4.3 - IL_0009: sub - IL_000a: switch ( - IL_0015) - IL_0013: br.s IL_001b + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101ElementOperators01/startsWithO@22::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0019 .line 100001,100001 : 0,0 '' - IL_0015: nop - IL_0016: br IL_0089 + IL_0013: nop + IL_0014: br IL_0087 .line 100001,100001 : 0,0 '' - IL_001b: nop + IL_0019: nop .try { - IL_001c: ldarg.0 - IL_001d: ldfld int32 Linq101ElementOperators01/startsWithO@22::pc - IL_0022: switch ( + IL_001a: ldarg.0 + IL_001b: ldfld int32 Linq101ElementOperators01/startsWithO@22::pc + IL_0020: switch ( + IL_0037, IL_0039, IL_003b, - IL_003d, - IL_003f) - IL_0037: br.s IL_004d + IL_003d) + IL_0035: br.s IL_004b - IL_0039: br.s IL_0041 + IL_0037: br.s IL_003f - IL_003b: br.s IL_0044 + IL_0039: br.s IL_0042 - IL_003d: br.s IL_0047 + IL_003b: br.s IL_0045 - IL_003f: br.s IL_004a + IL_003d: br.s IL_0048 .line 100001,100001 : 0,0 '' - IL_0041: nop - IL_0042: br.s IL_0063 + IL_003f: nop + IL_0040: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_0044: nop - IL_0045: br.s IL_004f + IL_0042: nop + IL_0043: br.s IL_004d .line 100001,100001 : 0,0 '' - IL_0047: nop - IL_0048: br.s IL_004e + IL_0045: nop + IL_0046: br.s IL_004c .line 100001,100001 : 0,0 '' - IL_004a: nop - IL_004b: br.s IL_0063 + IL_0048: nop + IL_0049: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_004d: nop + IL_004b: nop .line 100001,100001 : 0,0 '' - IL_004e: nop - IL_004f: ldarg.0 - IL_0050: ldc.i4.3 - IL_0051: stfld int32 Linq101ElementOperators01/startsWithO@22::pc - IL_0056: ldarg.0 - IL_0057: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/startsWithO@22::'enum' - IL_005c: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_0061: nop + IL_004c: nop + IL_004d: ldarg.0 + IL_004e: ldc.i4.3 + IL_004f: stfld int32 Linq101ElementOperators01/startsWithO@22::pc + IL_0054: ldarg.0 + IL_0055: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/startsWithO@22::'enum' + IL_005a: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_005f: nop .line 100001,100001 : 0,0 '' - IL_0062: nop - IL_0063: ldarg.0 - IL_0064: ldc.i4.3 - IL_0065: stfld int32 Linq101ElementOperators01/startsWithO@22::pc - IL_006a: ldarg.0 - IL_006b: ldnull - IL_006c: stfld string Linq101ElementOperators01/startsWithO@22::current - IL_0071: ldnull - IL_0072: stloc.1 - IL_0073: leave.s IL_0081 + IL_0060: nop + IL_0061: ldarg.0 + IL_0062: ldc.i4.3 + IL_0063: stfld int32 Linq101ElementOperators01/startsWithO@22::pc + IL_0068: ldarg.0 + IL_0069: ldnull + IL_006a: stfld string Linq101ElementOperators01/startsWithO@22::current + IL_006f: ldnull + IL_0070: stloc.1 + IL_0071: leave.s IL_007f } // end .try catch [mscorlib]System.Object { - IL_0075: castclass [mscorlib]System.Exception - IL_007a: stloc.2 + IL_0073: castclass [mscorlib]System.Exception + IL_0078: stloc.2 .line 22,22 : 9,28 '' - IL_007b: ldloc.2 - IL_007c: stloc.0 - IL_007d: ldnull - IL_007e: stloc.1 - IL_007f: leave.s IL_0081 + IL_0079: ldloc.2 + IL_007a: stloc.0 + IL_007b: ldnull + IL_007c: stloc.1 + IL_007d: leave.s IL_007f .line 100001,100001 : 0,0 '' } // end handler - IL_0081: ldloc.1 - IL_0082: pop + IL_007f: ldloc.1 + IL_0080: pop .line 100001,100001 : 0,0 '' - IL_0083: nop - IL_0084: br IL_0002 + IL_0081: nop + IL_0082: br IL_0000 - IL_0089: ldloc.0 - IL_008a: ldnull - IL_008b: cgt.un - IL_008d: brfalse.s IL_0091 + IL_0087: ldloc.0 + IL_0088: ldnull + IL_0089: cgt.un + IL_008b: brfalse.s IL_008f - IL_008f: br.s IL_0093 + IL_008d: br.s IL_0091 - IL_0091: br.s IL_0095 + IL_008f: br.s IL_0093 .line 100001,100001 : 0,0 '' - IL_0093: ldloc.0 - IL_0094: throw + IL_0091: ldloc.0 + IL_0092: throw .line 100001,100001 : 0,0 '' - IL_0095: ret + IL_0093: ret } // end of method startsWithO@22::Close .method public strict virtual instance bool @@ -785,19 +733,15 @@ { .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 ) - // Code size 11 (0xb) - .maxstack 9 + // Code size 9 (0x9) + .maxstack 8 IL_0000: ldnull - IL_0001: ldnull + IL_0001: ldc.i4.0 IL_0002: ldnull - IL_0003: ldc.i4.0 - IL_0004: ldnull - IL_0005: newobj instance void Linq101ElementOperators01/startsWithO@22::.ctor(string, - string, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0003: newobj instance void Linq101ElementOperators01/startsWithO@22::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, string) - IL_000a: ret + IL_0008: ret } // end of method startsWithO@22::GetFreshEnumerator } // end of class startsWithO@22 @@ -837,11 +781,6 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) - .field public int32 _arg1 - .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 ) - .field public int32 n .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' .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 ) @@ -855,39 +794,33 @@ .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 specialname rtspecialname - instance void .ctor(int32 _arg1, - int32 n, - class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', int32 pc, int32 current) cil managed { - // Code size 44 (0x2c) + // Code size 28 (0x1c) .maxstack 8 IL_0000: ldarg.0 IL_0001: ldarg.1 - IL_0002: stfld int32 Linq101ElementOperators01/firstNumOrDefault@31::_arg1 + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/firstNumOrDefault@31::'enum' IL_0007: ldarg.0 IL_0008: ldarg.2 - IL_0009: stfld int32 Linq101ElementOperators01/firstNumOrDefault@31::n + IL_0009: stfld int32 Linq101ElementOperators01/firstNumOrDefault@31::pc IL_000e: ldarg.0 IL_000f: ldarg.3 - IL_0010: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/firstNumOrDefault@31::'enum' + IL_0010: stfld int32 Linq101ElementOperators01/firstNumOrDefault@31::current IL_0015: ldarg.0 - IL_0016: ldarg.s pc - IL_0018: stfld int32 Linq101ElementOperators01/firstNumOrDefault@31::pc - IL_001d: ldarg.0 - IL_001e: ldarg.s current - IL_0020: stfld int32 Linq101ElementOperators01/firstNumOrDefault@31::current - IL_0025: ldarg.0 - IL_0026: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() - IL_002b: ret + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_001b: ret } // end of method firstNumOrDefault@31::.ctor .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 191 (0xbf) + // Code size 154 (0x9a) .maxstack 6 + .locals init ([0] int32 V_0, + [1] int32 n) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 IL_0001: ldfld int32 Linq101ElementOperators01/firstNumOrDefault@31::pc @@ -897,7 +830,7 @@ IL_001b, IL_001d, IL_001f) - IL_0019: br.s IL_002d + IL_0019: br.s IL_002a IL_001b: br.s IL_0021 @@ -907,203 +840,190 @@ .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br.s IL_0095 + IL_0022: br.s IL_0070 .line 100001,100001 : 0,0 '' IL_0024: nop - IL_0025: br.s IL_0084 + IL_0025: br.s IL_006d .line 100001,100001 : 0,0 '' IL_0027: nop - IL_0028: br IL_00b6 + IL_0028: br.s IL_0091 .line 100001,100001 : 0,0 '' - IL_002d: nop + IL_002a: nop .line 31,31 : 9,28 '' - IL_002e: ldarg.0 - IL_002f: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101ElementOperators01::get_numbers() - IL_0034: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0039: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/firstNumOrDefault@31::'enum' - IL_003e: ldarg.0 - IL_003f: ldc.i4.1 - IL_0040: stfld int32 Linq101ElementOperators01/firstNumOrDefault@31::pc + IL_002b: ldarg.0 + IL_002c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101ElementOperators01::get_numbers() + IL_0031: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0036: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/firstNumOrDefault@31::'enum' + IL_003b: ldarg.0 + IL_003c: ldc.i4.1 + IL_003d: stfld int32 Linq101ElementOperators01/firstNumOrDefault@31::pc .line 31,31 : 9,28 '' - IL_0045: ldarg.0 - IL_0046: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/firstNumOrDefault@31::'enum' - IL_004b: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0050: brfalse.s IL_0095 - - IL_0052: ldarg.0 - IL_0053: ldarg.0 - IL_0054: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/firstNumOrDefault@31::'enum' - IL_0059: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_005e: stfld int32 Linq101ElementOperators01/firstNumOrDefault@31::_arg1 + IL_0042: ldarg.0 + IL_0043: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/firstNumOrDefault@31::'enum' + IL_0048: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_004d: brfalse.s IL_0070 + + IL_004f: ldarg.0 + IL_0050: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/firstNumOrDefault@31::'enum' + IL_0055: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_005a: stloc.0 .line 31,31 : 9,28 '' - IL_0063: ldarg.0 - IL_0064: ldarg.0 - IL_0065: ldfld int32 Linq101ElementOperators01/firstNumOrDefault@31::_arg1 - IL_006a: stfld int32 Linq101ElementOperators01/firstNumOrDefault@31::n - IL_006f: ldarg.0 - IL_0070: ldc.i4.2 - IL_0071: stfld int32 Linq101ElementOperators01/firstNumOrDefault@31::pc + IL_005b: ldloc.0 + IL_005c: stloc.1 + IL_005d: ldarg.0 + IL_005e: ldc.i4.2 + IL_005f: stfld int32 Linq101ElementOperators01/firstNumOrDefault@31::pc .line 32,32 : 9,22 '' - IL_0076: ldarg.0 - IL_0077: ldarg.0 - IL_0078: ldfld int32 Linq101ElementOperators01/firstNumOrDefault@31::n - IL_007d: stfld int32 Linq101ElementOperators01/firstNumOrDefault@31::current - IL_0082: ldc.i4.1 - IL_0083: ret - - IL_0084: ldarg.0 - IL_0085: ldc.i4.0 - IL_0086: stfld int32 Linq101ElementOperators01/firstNumOrDefault@31::n - .line 31,31 : 9,28 '' - IL_008b: ldarg.0 - IL_008c: ldc.i4.0 - IL_008d: stfld int32 Linq101ElementOperators01/firstNumOrDefault@31::_arg1 + IL_0064: ldarg.0 + IL_0065: ldloc.1 + IL_0066: stfld int32 Linq101ElementOperators01/firstNumOrDefault@31::current + IL_006b: ldc.i4.1 + IL_006c: ret + .line 100001,100001 : 0,0 '' - IL_0092: nop - IL_0093: br.s IL_0045 + IL_006d: nop + IL_006e: br.s IL_0042 - IL_0095: ldarg.0 - IL_0096: ldc.i4.3 - IL_0097: stfld int32 Linq101ElementOperators01/firstNumOrDefault@31::pc + IL_0070: ldarg.0 + IL_0071: ldc.i4.3 + IL_0072: stfld int32 Linq101ElementOperators01/firstNumOrDefault@31::pc .line 31,31 : 9,28 '' - IL_009c: ldarg.0 - IL_009d: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/firstNumOrDefault@31::'enum' - IL_00a2: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_00a7: nop - IL_00a8: ldarg.0 - IL_00a9: ldnull - IL_00aa: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/firstNumOrDefault@31::'enum' - IL_00af: ldarg.0 - IL_00b0: ldc.i4.3 - IL_00b1: stfld int32 Linq101ElementOperators01/firstNumOrDefault@31::pc - IL_00b6: ldarg.0 - IL_00b7: ldc.i4.0 - IL_00b8: stfld int32 Linq101ElementOperators01/firstNumOrDefault@31::current - IL_00bd: ldc.i4.0 - IL_00be: ret + IL_0077: ldarg.0 + IL_0078: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/firstNumOrDefault@31::'enum' + IL_007d: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0082: nop + IL_0083: ldarg.0 + IL_0084: ldnull + IL_0085: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/firstNumOrDefault@31::'enum' + IL_008a: ldarg.0 + IL_008b: ldc.i4.3 + IL_008c: stfld int32 Linq101ElementOperators01/firstNumOrDefault@31::pc + IL_0091: ldarg.0 + IL_0092: ldc.i4.0 + IL_0093: stfld int32 Linq101ElementOperators01/firstNumOrDefault@31::current + IL_0098: ldc.i4.0 + IL_0099: ret } // end of method firstNumOrDefault@31::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 150 (0x96) + // Code size 148 (0x94) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [FSharp.Core]Microsoft.FSharp.Core.Unit V_1, [2] class [mscorlib]System.Exception e) .line 100001,100001 : 0,0 '' - IL_0000: ldnull - IL_0001: stloc.0 - IL_0002: ldarg.0 - IL_0003: ldfld int32 Linq101ElementOperators01/firstNumOrDefault@31::pc - IL_0008: ldc.i4.3 - IL_0009: sub - IL_000a: switch ( - IL_0015) - IL_0013: br.s IL_001b + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101ElementOperators01/firstNumOrDefault@31::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0019 .line 100001,100001 : 0,0 '' - IL_0015: nop - IL_0016: br IL_0089 + IL_0013: nop + IL_0014: br IL_0087 .line 100001,100001 : 0,0 '' - IL_001b: nop + IL_0019: nop .try { - IL_001c: ldarg.0 - IL_001d: ldfld int32 Linq101ElementOperators01/firstNumOrDefault@31::pc - IL_0022: switch ( + IL_001a: ldarg.0 + IL_001b: ldfld int32 Linq101ElementOperators01/firstNumOrDefault@31::pc + IL_0020: switch ( + IL_0037, IL_0039, IL_003b, - IL_003d, - IL_003f) - IL_0037: br.s IL_004d + IL_003d) + IL_0035: br.s IL_004b - IL_0039: br.s IL_0041 + IL_0037: br.s IL_003f - IL_003b: br.s IL_0044 + IL_0039: br.s IL_0042 - IL_003d: br.s IL_0047 + IL_003b: br.s IL_0045 - IL_003f: br.s IL_004a + IL_003d: br.s IL_0048 .line 100001,100001 : 0,0 '' - IL_0041: nop - IL_0042: br.s IL_0063 + IL_003f: nop + IL_0040: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_0044: nop - IL_0045: br.s IL_004f + IL_0042: nop + IL_0043: br.s IL_004d .line 100001,100001 : 0,0 '' - IL_0047: nop - IL_0048: br.s IL_004e + IL_0045: nop + IL_0046: br.s IL_004c .line 100001,100001 : 0,0 '' - IL_004a: nop - IL_004b: br.s IL_0063 + IL_0048: nop + IL_0049: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_004d: nop + IL_004b: nop .line 100001,100001 : 0,0 '' - IL_004e: nop - IL_004f: ldarg.0 - IL_0050: ldc.i4.3 - IL_0051: stfld int32 Linq101ElementOperators01/firstNumOrDefault@31::pc - IL_0056: ldarg.0 - IL_0057: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/firstNumOrDefault@31::'enum' - IL_005c: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_0061: nop + IL_004c: nop + IL_004d: ldarg.0 + IL_004e: ldc.i4.3 + IL_004f: stfld int32 Linq101ElementOperators01/firstNumOrDefault@31::pc + IL_0054: ldarg.0 + IL_0055: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/firstNumOrDefault@31::'enum' + IL_005a: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_005f: nop .line 100001,100001 : 0,0 '' - IL_0062: nop - IL_0063: ldarg.0 - IL_0064: ldc.i4.3 - IL_0065: stfld int32 Linq101ElementOperators01/firstNumOrDefault@31::pc - IL_006a: ldarg.0 - IL_006b: ldc.i4.0 - IL_006c: stfld int32 Linq101ElementOperators01/firstNumOrDefault@31::current - IL_0071: ldnull - IL_0072: stloc.1 - IL_0073: leave.s IL_0081 + IL_0060: nop + IL_0061: ldarg.0 + IL_0062: ldc.i4.3 + IL_0063: stfld int32 Linq101ElementOperators01/firstNumOrDefault@31::pc + IL_0068: ldarg.0 + IL_0069: ldc.i4.0 + IL_006a: stfld int32 Linq101ElementOperators01/firstNumOrDefault@31::current + IL_006f: ldnull + IL_0070: stloc.1 + IL_0071: leave.s IL_007f } // end .try catch [mscorlib]System.Object { - IL_0075: castclass [mscorlib]System.Exception - IL_007a: stloc.2 + IL_0073: castclass [mscorlib]System.Exception + IL_0078: stloc.2 .line 31,31 : 9,28 '' - IL_007b: ldloc.2 - IL_007c: stloc.0 - IL_007d: ldnull - IL_007e: stloc.1 - IL_007f: leave.s IL_0081 + IL_0079: ldloc.2 + IL_007a: stloc.0 + IL_007b: ldnull + IL_007c: stloc.1 + IL_007d: leave.s IL_007f .line 100001,100001 : 0,0 '' } // end handler - IL_0081: ldloc.1 - IL_0082: pop + IL_007f: ldloc.1 + IL_0080: pop .line 100001,100001 : 0,0 '' - IL_0083: nop - IL_0084: br IL_0002 + IL_0081: nop + IL_0082: br IL_0000 - IL_0089: ldloc.0 - IL_008a: ldnull - IL_008b: cgt.un - IL_008d: brfalse.s IL_0091 + IL_0087: ldloc.0 + IL_0088: ldnull + IL_0089: cgt.un + IL_008b: brfalse.s IL_008f - IL_008f: br.s IL_0093 + IL_008d: br.s IL_0091 - IL_0091: br.s IL_0095 + IL_008f: br.s IL_0093 .line 100001,100001 : 0,0 '' - IL_0093: ldloc.0 - IL_0094: throw + IL_0091: ldloc.0 + IL_0092: throw .line 100001,100001 : 0,0 '' - IL_0095: ret + IL_0093: ret } // end of method firstNumOrDefault@31::Close .method public strict virtual instance bool @@ -1174,19 +1094,15 @@ { .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 ) - // Code size 11 (0xb) - .maxstack 9 - IL_0000: ldc.i4.0 + // Code size 9 (0x9) + .maxstack 8 + IL_0000: ldnull IL_0001: ldc.i4.0 - IL_0002: ldnull - IL_0003: ldc.i4.0 - IL_0004: ldc.i4.0 - IL_0005: newobj instance void Linq101ElementOperators01/firstNumOrDefault@31::.ctor(int32, - int32, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0002: ldc.i4.0 + IL_0003: newobj instance void Linq101ElementOperators01/firstNumOrDefault@31::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, int32) - IL_000a: ret + IL_0008: ret } // end of method firstNumOrDefault@31::GetFreshEnumerator } // end of class firstNumOrDefault@31 @@ -1195,11 +1111,6 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) - .field public int32 _arg1 - .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 ) - .field public int32 n .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' .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 ) @@ -1213,39 +1124,33 @@ .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 specialname rtspecialname - instance void .ctor(int32 _arg1, - int32 n, - class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', int32 pc, int32 current) cil managed { - // Code size 44 (0x2c) + // Code size 28 (0x1c) .maxstack 8 IL_0000: ldarg.0 IL_0001: ldarg.1 - IL_0002: stfld int32 Linq101ElementOperators01/fourthLowNum@52::_arg1 + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/fourthLowNum@52::'enum' IL_0007: ldarg.0 IL_0008: ldarg.2 - IL_0009: stfld int32 Linq101ElementOperators01/fourthLowNum@52::n + IL_0009: stfld int32 Linq101ElementOperators01/fourthLowNum@52::pc IL_000e: ldarg.0 IL_000f: ldarg.3 - IL_0010: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/fourthLowNum@52::'enum' + IL_0010: stfld int32 Linq101ElementOperators01/fourthLowNum@52::current IL_0015: ldarg.0 - IL_0016: ldarg.s pc - IL_0018: stfld int32 Linq101ElementOperators01/fourthLowNum@52::pc - IL_001d: ldarg.0 - IL_001e: ldarg.s current - IL_0020: stfld int32 Linq101ElementOperators01/fourthLowNum@52::current - IL_0025: ldarg.0 - IL_0026: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() - IL_002b: ret + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_001b: ret } // end of method fourthLowNum@52::.ctor .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 191 (0xbf) + // Code size 154 (0x9a) .maxstack 6 + .locals init ([0] int32 V_0, + [1] int32 n) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 IL_0001: ldfld int32 Linq101ElementOperators01/fourthLowNum@52::pc @@ -1255,7 +1160,7 @@ IL_001b, IL_001d, IL_001f) - IL_0019: br.s IL_002d + IL_0019: br.s IL_002a IL_001b: br.s IL_0021 @@ -1265,203 +1170,190 @@ .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br.s IL_0095 + IL_0022: br.s IL_0070 .line 100001,100001 : 0,0 '' IL_0024: nop - IL_0025: br.s IL_0084 + IL_0025: br.s IL_006d .line 100001,100001 : 0,0 '' IL_0027: nop - IL_0028: br IL_00b6 + IL_0028: br.s IL_0091 .line 100001,100001 : 0,0 '' - IL_002d: nop + IL_002a: nop .line 52,52 : 9,29 '' - IL_002e: ldarg.0 - IL_002f: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101ElementOperators01::get_numbers2() - IL_0034: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0039: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/fourthLowNum@52::'enum' - IL_003e: ldarg.0 - IL_003f: ldc.i4.1 - IL_0040: stfld int32 Linq101ElementOperators01/fourthLowNum@52::pc + IL_002b: ldarg.0 + IL_002c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101ElementOperators01::get_numbers2() + IL_0031: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0036: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/fourthLowNum@52::'enum' + IL_003b: ldarg.0 + IL_003c: ldc.i4.1 + IL_003d: stfld int32 Linq101ElementOperators01/fourthLowNum@52::pc .line 52,52 : 9,29 '' - IL_0045: ldarg.0 - IL_0046: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/fourthLowNum@52::'enum' - IL_004b: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0050: brfalse.s IL_0095 - - IL_0052: ldarg.0 - IL_0053: ldarg.0 - IL_0054: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/fourthLowNum@52::'enum' - IL_0059: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_005e: stfld int32 Linq101ElementOperators01/fourthLowNum@52::_arg1 + IL_0042: ldarg.0 + IL_0043: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/fourthLowNum@52::'enum' + IL_0048: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_004d: brfalse.s IL_0070 + + IL_004f: ldarg.0 + IL_0050: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/fourthLowNum@52::'enum' + IL_0055: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_005a: stloc.0 .line 52,52 : 9,29 '' - IL_0063: ldarg.0 - IL_0064: ldarg.0 - IL_0065: ldfld int32 Linq101ElementOperators01/fourthLowNum@52::_arg1 - IL_006a: stfld int32 Linq101ElementOperators01/fourthLowNum@52::n - IL_006f: ldarg.0 - IL_0070: ldc.i4.2 - IL_0071: stfld int32 Linq101ElementOperators01/fourthLowNum@52::pc + IL_005b: ldloc.0 + IL_005c: stloc.1 + IL_005d: ldarg.0 + IL_005e: ldc.i4.2 + IL_005f: stfld int32 Linq101ElementOperators01/fourthLowNum@52::pc .line 53,53 : 9,22 '' - IL_0076: ldarg.0 - IL_0077: ldarg.0 - IL_0078: ldfld int32 Linq101ElementOperators01/fourthLowNum@52::n - IL_007d: stfld int32 Linq101ElementOperators01/fourthLowNum@52::current - IL_0082: ldc.i4.1 - IL_0083: ret - - IL_0084: ldarg.0 - IL_0085: ldc.i4.0 - IL_0086: stfld int32 Linq101ElementOperators01/fourthLowNum@52::n - .line 52,52 : 9,29 '' - IL_008b: ldarg.0 - IL_008c: ldc.i4.0 - IL_008d: stfld int32 Linq101ElementOperators01/fourthLowNum@52::_arg1 + IL_0064: ldarg.0 + IL_0065: ldloc.1 + IL_0066: stfld int32 Linq101ElementOperators01/fourthLowNum@52::current + IL_006b: ldc.i4.1 + IL_006c: ret + .line 100001,100001 : 0,0 '' - IL_0092: nop - IL_0093: br.s IL_0045 + IL_006d: nop + IL_006e: br.s IL_0042 - IL_0095: ldarg.0 - IL_0096: ldc.i4.3 - IL_0097: stfld int32 Linq101ElementOperators01/fourthLowNum@52::pc + IL_0070: ldarg.0 + IL_0071: ldc.i4.3 + IL_0072: stfld int32 Linq101ElementOperators01/fourthLowNum@52::pc .line 52,52 : 9,29 '' - IL_009c: ldarg.0 - IL_009d: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/fourthLowNum@52::'enum' - IL_00a2: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_00a7: nop - IL_00a8: ldarg.0 - IL_00a9: ldnull - IL_00aa: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/fourthLowNum@52::'enum' - IL_00af: ldarg.0 - IL_00b0: ldc.i4.3 - IL_00b1: stfld int32 Linq101ElementOperators01/fourthLowNum@52::pc - IL_00b6: ldarg.0 - IL_00b7: ldc.i4.0 - IL_00b8: stfld int32 Linq101ElementOperators01/fourthLowNum@52::current - IL_00bd: ldc.i4.0 - IL_00be: ret + IL_0077: ldarg.0 + IL_0078: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/fourthLowNum@52::'enum' + IL_007d: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0082: nop + IL_0083: ldarg.0 + IL_0084: ldnull + IL_0085: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/fourthLowNum@52::'enum' + IL_008a: ldarg.0 + IL_008b: ldc.i4.3 + IL_008c: stfld int32 Linq101ElementOperators01/fourthLowNum@52::pc + IL_0091: ldarg.0 + IL_0092: ldc.i4.0 + IL_0093: stfld int32 Linq101ElementOperators01/fourthLowNum@52::current + IL_0098: ldc.i4.0 + IL_0099: ret } // end of method fourthLowNum@52::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 150 (0x96) + // Code size 148 (0x94) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [FSharp.Core]Microsoft.FSharp.Core.Unit V_1, [2] class [mscorlib]System.Exception e) .line 100001,100001 : 0,0 '' - IL_0000: ldnull - IL_0001: stloc.0 - IL_0002: ldarg.0 - IL_0003: ldfld int32 Linq101ElementOperators01/fourthLowNum@52::pc - IL_0008: ldc.i4.3 - IL_0009: sub - IL_000a: switch ( - IL_0015) - IL_0013: br.s IL_001b + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101ElementOperators01/fourthLowNum@52::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0019 .line 100001,100001 : 0,0 '' - IL_0015: nop - IL_0016: br IL_0089 + IL_0013: nop + IL_0014: br IL_0087 .line 100001,100001 : 0,0 '' - IL_001b: nop + IL_0019: nop .try { - IL_001c: ldarg.0 - IL_001d: ldfld int32 Linq101ElementOperators01/fourthLowNum@52::pc - IL_0022: switch ( + IL_001a: ldarg.0 + IL_001b: ldfld int32 Linq101ElementOperators01/fourthLowNum@52::pc + IL_0020: switch ( + IL_0037, IL_0039, IL_003b, - IL_003d, - IL_003f) - IL_0037: br.s IL_004d + IL_003d) + IL_0035: br.s IL_004b - IL_0039: br.s IL_0041 + IL_0037: br.s IL_003f - IL_003b: br.s IL_0044 + IL_0039: br.s IL_0042 - IL_003d: br.s IL_0047 + IL_003b: br.s IL_0045 - IL_003f: br.s IL_004a + IL_003d: br.s IL_0048 .line 100001,100001 : 0,0 '' - IL_0041: nop - IL_0042: br.s IL_0063 + IL_003f: nop + IL_0040: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_0044: nop - IL_0045: br.s IL_004f + IL_0042: nop + IL_0043: br.s IL_004d .line 100001,100001 : 0,0 '' - IL_0047: nop - IL_0048: br.s IL_004e + IL_0045: nop + IL_0046: br.s IL_004c .line 100001,100001 : 0,0 '' - IL_004a: nop - IL_004b: br.s IL_0063 + IL_0048: nop + IL_0049: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_004d: nop + IL_004b: nop .line 100001,100001 : 0,0 '' - IL_004e: nop - IL_004f: ldarg.0 - IL_0050: ldc.i4.3 - IL_0051: stfld int32 Linq101ElementOperators01/fourthLowNum@52::pc - IL_0056: ldarg.0 - IL_0057: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/fourthLowNum@52::'enum' - IL_005c: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_0061: nop + IL_004c: nop + IL_004d: ldarg.0 + IL_004e: ldc.i4.3 + IL_004f: stfld int32 Linq101ElementOperators01/fourthLowNum@52::pc + IL_0054: ldarg.0 + IL_0055: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/fourthLowNum@52::'enum' + IL_005a: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_005f: nop .line 100001,100001 : 0,0 '' - IL_0062: nop - IL_0063: ldarg.0 - IL_0064: ldc.i4.3 - IL_0065: stfld int32 Linq101ElementOperators01/fourthLowNum@52::pc - IL_006a: ldarg.0 - IL_006b: ldc.i4.0 - IL_006c: stfld int32 Linq101ElementOperators01/fourthLowNum@52::current - IL_0071: ldnull - IL_0072: stloc.1 - IL_0073: leave.s IL_0081 + IL_0060: nop + IL_0061: ldarg.0 + IL_0062: ldc.i4.3 + IL_0063: stfld int32 Linq101ElementOperators01/fourthLowNum@52::pc + IL_0068: ldarg.0 + IL_0069: ldc.i4.0 + IL_006a: stfld int32 Linq101ElementOperators01/fourthLowNum@52::current + IL_006f: ldnull + IL_0070: stloc.1 + IL_0071: leave.s IL_007f } // end .try catch [mscorlib]System.Object { - IL_0075: castclass [mscorlib]System.Exception - IL_007a: stloc.2 + IL_0073: castclass [mscorlib]System.Exception + IL_0078: stloc.2 .line 52,52 : 9,29 '' - IL_007b: ldloc.2 - IL_007c: stloc.0 - IL_007d: ldnull - IL_007e: stloc.1 - IL_007f: leave.s IL_0081 + IL_0079: ldloc.2 + IL_007a: stloc.0 + IL_007b: ldnull + IL_007c: stloc.1 + IL_007d: leave.s IL_007f .line 100001,100001 : 0,0 '' } // end handler - IL_0081: ldloc.1 - IL_0082: pop + IL_007f: ldloc.1 + IL_0080: pop .line 100001,100001 : 0,0 '' - IL_0083: nop - IL_0084: br IL_0002 + IL_0081: nop + IL_0082: br IL_0000 - IL_0089: ldloc.0 - IL_008a: ldnull - IL_008b: cgt.un - IL_008d: brfalse.s IL_0091 + IL_0087: ldloc.0 + IL_0088: ldnull + IL_0089: cgt.un + IL_008b: brfalse.s IL_008f - IL_008f: br.s IL_0093 + IL_008d: br.s IL_0091 - IL_0091: br.s IL_0095 + IL_008f: br.s IL_0093 .line 100001,100001 : 0,0 '' - IL_0093: ldloc.0 - IL_0094: throw + IL_0091: ldloc.0 + IL_0092: throw .line 100001,100001 : 0,0 '' - IL_0095: ret + IL_0093: ret } // end of method fourthLowNum@52::Close .method public strict virtual instance bool @@ -1532,19 +1424,15 @@ { .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 ) - // Code size 11 (0xb) - .maxstack 9 - IL_0000: ldc.i4.0 + // Code size 9 (0x9) + .maxstack 8 + IL_0000: ldnull IL_0001: ldc.i4.0 - IL_0002: ldnull - IL_0003: ldc.i4.0 - IL_0004: ldc.i4.0 - IL_0005: newobj instance void Linq101ElementOperators01/fourthLowNum@52::.ctor(int32, - int32, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0002: ldc.i4.0 + IL_0003: newobj instance void Linq101ElementOperators01/fourthLowNum@52::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, int32) - IL_000a: ret + IL_0008: ret } // end of method fourthLowNum@52::GetFreshEnumerator } // end of class fourthLowNum@52 @@ -1721,7 +1609,7 @@ .method public static void main@() cil managed { .entrypoint - // Code size 385 (0x181) + // Code size 377 (0x179) .maxstack 13 .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 products, [1] class [Utils]Utils/Product products12, @@ -1744,159 +1632,143 @@ IL_0013: ldloc.s V_8 IL_0015: ldloc.s V_8 IL_0017: ldnull - IL_0018: ldnull + IL_0018: ldc.i4.0 IL_0019: ldnull - IL_001a: ldc.i4.0 - IL_001b: ldnull - IL_001c: newobj instance void Linq101ElementOperators01/products12@12::.ctor(class [Utils]Utils/Product, - class [Utils]Utils/Product, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_001a: newobj instance void Linq101ElementOperators01/products12@12::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, class [Utils]Utils/Product) - IL_0021: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0026: newobj instance void Linq101ElementOperators01/'products12@13-1'::.ctor() - IL_002b: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Where(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_001f: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0024: newobj instance void Linq101ElementOperators01/'products12@13-1'::.ctor() + IL_0029: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Where(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0030: callvirt instance !!0 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Head(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2) - IL_0035: dup - IL_0036: stsfld class [Utils]Utils/Product ''.$Linq101ElementOperators01::products12@10 - IL_003b: stloc.1 + IL_002e: callvirt instance !!0 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Head(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2) + IL_0033: dup + IL_0034: stsfld class [Utils]Utils/Product ''.$Linq101ElementOperators01::products12@10 + IL_0039: stloc.1 .line 18,18 : 1,97 '' - IL_003c: ldstr "zero" - IL_0041: ldstr "one" - IL_0046: ldstr "two" - IL_004b: ldstr "three" - IL_0050: ldstr "four" - IL_0055: ldstr "five" - IL_005a: ldstr "six" - IL_005f: ldstr "seven" - IL_0064: ldstr "eight" - IL_0069: ldstr "nine" - IL_006e: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() - IL_0073: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_003a: ldstr "zero" + IL_003f: ldstr "one" + IL_0044: ldstr "two" + IL_0049: ldstr "three" + IL_004e: ldstr "four" + IL_0053: ldstr "five" + IL_0058: ldstr "six" + IL_005d: ldstr "seven" + IL_0062: ldstr "eight" + IL_0067: ldstr "nine" + IL_006c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_0071: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_0078: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0076: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_007d: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_007b: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_0082: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0080: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_0087: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0085: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_008c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_008a: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_0091: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_008f: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_0096: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0094: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_009b: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0099: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_00a0: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_009e: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_00a5: dup - IL_00a6: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101ElementOperators01::strings@18 - IL_00ab: stloc.2 - IL_00ac: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_00b1: stloc.s V_9 + IL_00a3: dup + IL_00a4: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101ElementOperators01::strings@18 + IL_00a9: stloc.2 + IL_00aa: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_00af: stloc.s V_9 + IL_00b1: ldloc.s V_9 IL_00b3: ldloc.s V_9 - IL_00b5: ldloc.s V_9 + IL_00b5: ldnull + IL_00b6: ldc.i4.0 IL_00b7: ldnull - IL_00b8: ldnull - IL_00b9: ldnull - IL_00ba: ldc.i4.0 - IL_00bb: ldnull - IL_00bc: newobj instance void Linq101ElementOperators01/startsWithO@22::.ctor(string, - string, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_00b8: newobj instance void Linq101ElementOperators01/startsWithO@22::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, string) - IL_00c1: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_00c6: newobj instance void Linq101ElementOperators01/'startsWithO@23-1'::.ctor() - IL_00cb: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Where(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_00bd: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_00c2: newobj instance void Linq101ElementOperators01/'startsWithO@23-1'::.ctor() + IL_00c7: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Where(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_00d0: callvirt instance !!0 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Head(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2) - IL_00d5: dup - IL_00d6: stsfld string ''.$Linq101ElementOperators01::startsWithO@20 - IL_00db: stloc.3 + IL_00cc: callvirt instance !!0 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Head(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2) + IL_00d1: dup + IL_00d2: stsfld string ''.$Linq101ElementOperators01::startsWithO@20 + IL_00d7: stloc.3 .line 28,28 : 1,28 '' - IL_00dc: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101ElementOperators01::get_numbers() - IL_00e1: stloc.s numbers - IL_00e3: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_00e8: ldc.i4.0 - IL_00e9: ldc.i4.0 - IL_00ea: ldnull - IL_00eb: ldc.i4.0 - IL_00ec: ldc.i4.0 - IL_00ed: newobj instance void Linq101ElementOperators01/firstNumOrDefault@31::.ctor(int32, - int32, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_00d8: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101ElementOperators01::get_numbers() + IL_00dd: stloc.s numbers + IL_00df: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_00e4: ldnull + IL_00e5: ldc.i4.0 + IL_00e6: ldc.i4.0 + IL_00e7: newobj instance void Linq101ElementOperators01/firstNumOrDefault@31::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, int32) - IL_00f2: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_00f7: callvirt instance !!0 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::HeadOrDefault(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2) - IL_00fc: dup - IL_00fd: stsfld int32 ''.$Linq101ElementOperators01::firstNumOrDefault@29 - IL_0102: stloc.s firstNumOrDefault + IL_00ec: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_00f1: callvirt instance !!0 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::HeadOrDefault(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2) + IL_00f6: dup + IL_00f7: stsfld int32 ''.$Linq101ElementOperators01::firstNumOrDefault@29 + IL_00fc: stloc.s firstNumOrDefault .line 48,48 : 1,48 '' - IL_0104: ldc.i4.5 - IL_0105: ldc.i4.4 - IL_0106: ldc.i4.1 - IL_0107: ldc.i4.3 - IL_0108: ldc.i4.s 9 - IL_010a: ldc.i4.8 - IL_010b: ldc.i4.6 - IL_010c: ldc.i4.7 - IL_010d: ldc.i4.2 - IL_010e: ldc.i4.0 - IL_010f: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() - IL_0114: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_00fe: ldc.i4.5 + IL_00ff: ldc.i4.4 + IL_0100: ldc.i4.1 + IL_0101: ldc.i4.3 + IL_0102: ldc.i4.s 9 + IL_0104: ldc.i4.8 + IL_0105: ldc.i4.6 + IL_0106: ldc.i4.7 + IL_0107: ldc.i4.2 + IL_0108: ldc.i4.0 + IL_0109: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_010e: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_0119: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0113: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_011e: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0118: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_0123: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_011d: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_0128: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0122: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_012d: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0127: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_0132: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_012c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_0137: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0131: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_013c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0136: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_0141: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_013b: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_0146: dup - IL_0147: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101ElementOperators01::'numbers2@48-2' - IL_014c: stloc.s numbers2 - IL_014e: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_0153: stloc.s V_10 - IL_0155: ldloc.s V_10 - IL_0157: ldloc.s V_10 - IL_0159: ldc.i4.0 - IL_015a: ldc.i4.0 - IL_015b: ldnull - IL_015c: ldc.i4.0 - IL_015d: ldc.i4.0 - IL_015e: newobj instance void Linq101ElementOperators01/fourthLowNum@52::.ctor(int32, - int32, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0140: dup + IL_0141: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101ElementOperators01::'numbers2@48-2' + IL_0146: stloc.s numbers2 + IL_0148: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_014d: stloc.s V_10 + IL_014f: ldloc.s V_10 + IL_0151: ldloc.s V_10 + IL_0153: ldnull + IL_0154: ldc.i4.0 + IL_0155: ldc.i4.0 + IL_0156: newobj instance void Linq101ElementOperators01/fourthLowNum@52::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, int32) - IL_0163: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0168: newobj instance void Linq101ElementOperators01/'fourthLowNum@53-1'::.ctor() - IL_016d: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Where(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_015b: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0160: newobj instance void Linq101ElementOperators01/'fourthLowNum@53-1'::.ctor() + IL_0165: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Where(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0172: ldc.i4.1 - IL_0173: callvirt instance !!0 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Nth(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_016a: ldc.i4.1 + IL_016b: callvirt instance !!0 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Nth(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, int32) - IL_0178: dup - IL_0179: stsfld int32 ''.$Linq101ElementOperators01::fourthLowNum@50 - IL_017e: stloc.s fourthLowNum - IL_0180: ret + IL_0170: dup + IL_0171: stsfld int32 ''.$Linq101ElementOperators01::fourthLowNum@50 + IL_0176: stloc.s fourthLowNum + IL_0178: ret } // end of method $Linq101ElementOperators01::main@ } // end of class ''.$Linq101ElementOperators01 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Grouping01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Grouping01.il.bsl index 23fdb97b519..050bdf1cc6d 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Grouping01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Grouping01.il.bsl @@ -13,7 +13,7 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 4:4:1:0 + .ver 4:5:0:0 } .assembly extern System.Core { @@ -38,20 +38,20 @@ } .mresource public FSharpSignatureData.Linq101Grouping01 { - // Offset: 0x00000000 Length: 0x000003ED + // Offset: 0x00000000 Length: 0x0000040F } .mresource public FSharpOptimizationData.Linq101Grouping01 { - // Offset: 0x000003F8 Length: 0x00000129 + // Offset: 0x00000418 Length: 0x00000129 } .module Linq101Grouping01.exe -// MVID: {5A1F62A6-FB79-E5BF-A745-0383A6621F5A} +// MVID: {5B9A68C1-FB79-E5BF-A745-0383C1689A5B} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x03810000 +// Image base: 0x025F0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -89,7 +89,7 @@ .maxstack 6 .locals init ([0] int32 n) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 14,14 : 9,28 'C:\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\QueryExpressionStepping\\Linq101Grouping01.fs' + .line 14,14 : 9,28 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\QueryExpressionStepping\\Linq101Grouping01.fs' IL_0000: ldarg.1 IL_0001: stloc.0 .line 15,15 : 9,29 '' diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Joins01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Joins01.il.bsl index 22342da9b92..f985ce06194 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Joins01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Joins01.il.bsl @@ -13,7 +13,7 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 4:4:1:0 + .ver 4:5:0:0 } .assembly extern Utils { @@ -38,20 +38,20 @@ } .mresource public FSharpSignatureData.Linq101Joins01 { - // Offset: 0x00000000 Length: 0x000002F4 + // Offset: 0x00000000 Length: 0x00000316 } .mresource public FSharpOptimizationData.Linq101Joins01 { - // Offset: 0x000002F8 Length: 0x000000C3 + // Offset: 0x00000320 Length: 0x000000C3 } .module Linq101Joins01.exe -// MVID: {5A1F62A6-151B-685E-A745-0383A6621F5A} +// MVID: {5B9A68C1-151B-685E-A745-0383C1689A5B} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x03830000 +// Image base: 0x026A0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -81,7 +81,7 @@ // Code size 2 (0x2) .maxstack 8 .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 14,14 : 32,33 'C:\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\QueryExpressionStepping\\Linq101Joins01.fs' + .line 14,14 : 32,33 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\QueryExpressionStepping\\Linq101Joins01.fs' IL_0000: ldarg.1 IL_0001: ret } // end of method q@14::Invoke diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Ordering01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Ordering01.il.bsl index 17019e93cdc..79848765473 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Ordering01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Ordering01.il.bsl @@ -13,7 +13,7 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 4:4:1:0 + .ver 4:5:0:0 } .assembly extern Utils { @@ -33,20 +33,20 @@ } .mresource public FSharpSignatureData.Linq101Ordering01 { - // Offset: 0x00000000 Length: 0x00000398 + // Offset: 0x00000000 Length: 0x000003BA } .mresource public FSharpOptimizationData.Linq101Ordering01 { - // Offset: 0x000003A0 Length: 0x00000134 + // Offset: 0x000003C0 Length: 0x00000134 } .module Linq101Ordering01.exe -// MVID: {5A1F62A6-649A-6956-A745-0383A6621F5A} +// MVID: {5B9A632A-649A-6956-A745-03832A639A5B} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x03640000 +// Image base: 0x00AD0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -59,11 +59,6 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) - .field public string _arg1 - .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 ) - .field public string w .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' .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 ) @@ -77,41 +72,35 @@ .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 specialname rtspecialname - instance void .ctor(string _arg1, - string w, - class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', int32 pc, string current) cil managed { - // Code size 44 (0x2c) + // Code size 28 (0x1c) .maxstack 8 IL_0000: ldarg.0 IL_0001: ldarg.1 - IL_0002: stfld string Linq101Ordering01/sortedWords@11::_arg1 + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/sortedWords@11::'enum' IL_0007: ldarg.0 IL_0008: ldarg.2 - IL_0009: stfld string Linq101Ordering01/sortedWords@11::w + IL_0009: stfld int32 Linq101Ordering01/sortedWords@11::pc IL_000e: ldarg.0 IL_000f: ldarg.3 - IL_0010: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/sortedWords@11::'enum' + IL_0010: stfld string Linq101Ordering01/sortedWords@11::current IL_0015: ldarg.0 - IL_0016: ldarg.s pc - IL_0018: stfld int32 Linq101Ordering01/sortedWords@11::pc - IL_001d: ldarg.0 - IL_001e: ldarg.s current - IL_0020: stfld string Linq101Ordering01/sortedWords@11::current - IL_0025: ldarg.0 - IL_0026: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() - IL_002b: ret + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_001b: ret } // end of method sortedWords@11::.ctor .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 191 (0xbf) + // Code size 154 (0x9a) .maxstack 6 + .locals init ([0] string V_0, + [1] string w) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 100001,100001 : 0,0 'C:\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\QueryExpressionStepping\\Linq101Ordering01.fs' + .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\QueryExpressionStepping\\Linq101Ordering01.fs' IL_0000: ldarg.0 IL_0001: ldfld int32 Linq101Ordering01/sortedWords@11::pc IL_0006: ldc.i4.1 @@ -120,7 +109,7 @@ IL_001b, IL_001d, IL_001f) - IL_0019: br.s IL_002d + IL_0019: br.s IL_002a IL_001b: br.s IL_0021 @@ -130,203 +119,190 @@ .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br.s IL_0095 + IL_0022: br.s IL_0070 .line 100001,100001 : 0,0 '' IL_0024: nop - IL_0025: br.s IL_0084 + IL_0025: br.s IL_006d .line 100001,100001 : 0,0 '' IL_0027: nop - IL_0028: br IL_00b6 + IL_0028: br.s IL_0091 .line 100001,100001 : 0,0 '' - IL_002d: nop + IL_002a: nop .line 11,11 : 9,26 '' - IL_002e: ldarg.0 - IL_002f: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Ordering01::get_words() - IL_0034: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0039: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/sortedWords@11::'enum' - IL_003e: ldarg.0 - IL_003f: ldc.i4.1 - IL_0040: stfld int32 Linq101Ordering01/sortedWords@11::pc + IL_002b: ldarg.0 + IL_002c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Ordering01::get_words() + IL_0031: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0036: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/sortedWords@11::'enum' + IL_003b: ldarg.0 + IL_003c: ldc.i4.1 + IL_003d: stfld int32 Linq101Ordering01/sortedWords@11::pc .line 11,11 : 9,26 '' - IL_0045: ldarg.0 - IL_0046: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/sortedWords@11::'enum' - IL_004b: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0050: brfalse.s IL_0095 - - IL_0052: ldarg.0 - IL_0053: ldarg.0 - IL_0054: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/sortedWords@11::'enum' - IL_0059: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_005e: stfld string Linq101Ordering01/sortedWords@11::_arg1 + IL_0042: ldarg.0 + IL_0043: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/sortedWords@11::'enum' + IL_0048: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_004d: brfalse.s IL_0070 + + IL_004f: ldarg.0 + IL_0050: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/sortedWords@11::'enum' + IL_0055: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_005a: stloc.0 .line 11,11 : 9,26 '' - IL_0063: ldarg.0 - IL_0064: ldarg.0 - IL_0065: ldfld string Linq101Ordering01/sortedWords@11::_arg1 - IL_006a: stfld string Linq101Ordering01/sortedWords@11::w - IL_006f: ldarg.0 - IL_0070: ldc.i4.2 - IL_0071: stfld int32 Linq101Ordering01/sortedWords@11::pc + IL_005b: ldloc.0 + IL_005c: stloc.1 + IL_005d: ldarg.0 + IL_005e: ldc.i4.2 + IL_005f: stfld int32 Linq101Ordering01/sortedWords@11::pc .line 12,12 : 9,17 '' - IL_0076: ldarg.0 - IL_0077: ldarg.0 - IL_0078: ldfld string Linq101Ordering01/sortedWords@11::w - IL_007d: stfld string Linq101Ordering01/sortedWords@11::current - IL_0082: ldc.i4.1 - IL_0083: ret - - IL_0084: ldarg.0 - IL_0085: ldnull - IL_0086: stfld string Linq101Ordering01/sortedWords@11::w - .line 11,11 : 9,26 '' - IL_008b: ldarg.0 - IL_008c: ldnull - IL_008d: stfld string Linq101Ordering01/sortedWords@11::_arg1 + IL_0064: ldarg.0 + IL_0065: ldloc.1 + IL_0066: stfld string Linq101Ordering01/sortedWords@11::current + IL_006b: ldc.i4.1 + IL_006c: ret + .line 100001,100001 : 0,0 '' - IL_0092: nop - IL_0093: br.s IL_0045 + IL_006d: nop + IL_006e: br.s IL_0042 - IL_0095: ldarg.0 - IL_0096: ldc.i4.3 - IL_0097: stfld int32 Linq101Ordering01/sortedWords@11::pc + IL_0070: ldarg.0 + IL_0071: ldc.i4.3 + IL_0072: stfld int32 Linq101Ordering01/sortedWords@11::pc .line 11,11 : 9,26 '' - IL_009c: ldarg.0 - IL_009d: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/sortedWords@11::'enum' - IL_00a2: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_00a7: nop - IL_00a8: ldarg.0 - IL_00a9: ldnull - IL_00aa: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/sortedWords@11::'enum' - IL_00af: ldarg.0 - IL_00b0: ldc.i4.3 - IL_00b1: stfld int32 Linq101Ordering01/sortedWords@11::pc - IL_00b6: ldarg.0 - IL_00b7: ldnull - IL_00b8: stfld string Linq101Ordering01/sortedWords@11::current - IL_00bd: ldc.i4.0 - IL_00be: ret + IL_0077: ldarg.0 + IL_0078: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/sortedWords@11::'enum' + IL_007d: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0082: nop + IL_0083: ldarg.0 + IL_0084: ldnull + IL_0085: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/sortedWords@11::'enum' + IL_008a: ldarg.0 + IL_008b: ldc.i4.3 + IL_008c: stfld int32 Linq101Ordering01/sortedWords@11::pc + IL_0091: ldarg.0 + IL_0092: ldnull + IL_0093: stfld string Linq101Ordering01/sortedWords@11::current + IL_0098: ldc.i4.0 + IL_0099: ret } // end of method sortedWords@11::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 150 (0x96) + // Code size 148 (0x94) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [FSharp.Core]Microsoft.FSharp.Core.Unit V_1, [2] class [mscorlib]System.Exception e) .line 100001,100001 : 0,0 '' - IL_0000: ldnull - IL_0001: stloc.0 - IL_0002: ldarg.0 - IL_0003: ldfld int32 Linq101Ordering01/sortedWords@11::pc - IL_0008: ldc.i4.3 - IL_0009: sub - IL_000a: switch ( - IL_0015) - IL_0013: br.s IL_001b + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Ordering01/sortedWords@11::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0019 .line 100001,100001 : 0,0 '' - IL_0015: nop - IL_0016: br IL_0089 + IL_0013: nop + IL_0014: br IL_0087 .line 100001,100001 : 0,0 '' - IL_001b: nop + IL_0019: nop .try { - IL_001c: ldarg.0 - IL_001d: ldfld int32 Linq101Ordering01/sortedWords@11::pc - IL_0022: switch ( + IL_001a: ldarg.0 + IL_001b: ldfld int32 Linq101Ordering01/sortedWords@11::pc + IL_0020: switch ( + IL_0037, IL_0039, IL_003b, - IL_003d, - IL_003f) - IL_0037: br.s IL_004d + IL_003d) + IL_0035: br.s IL_004b - IL_0039: br.s IL_0041 + IL_0037: br.s IL_003f - IL_003b: br.s IL_0044 + IL_0039: br.s IL_0042 - IL_003d: br.s IL_0047 + IL_003b: br.s IL_0045 - IL_003f: br.s IL_004a + IL_003d: br.s IL_0048 .line 100001,100001 : 0,0 '' - IL_0041: nop - IL_0042: br.s IL_0063 + IL_003f: nop + IL_0040: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_0044: nop - IL_0045: br.s IL_004f + IL_0042: nop + IL_0043: br.s IL_004d .line 100001,100001 : 0,0 '' - IL_0047: nop - IL_0048: br.s IL_004e + IL_0045: nop + IL_0046: br.s IL_004c .line 100001,100001 : 0,0 '' - IL_004a: nop - IL_004b: br.s IL_0063 + IL_0048: nop + IL_0049: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_004d: nop + IL_004b: nop .line 100001,100001 : 0,0 '' - IL_004e: nop - IL_004f: ldarg.0 - IL_0050: ldc.i4.3 - IL_0051: stfld int32 Linq101Ordering01/sortedWords@11::pc - IL_0056: ldarg.0 - IL_0057: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/sortedWords@11::'enum' - IL_005c: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_0061: nop + IL_004c: nop + IL_004d: ldarg.0 + IL_004e: ldc.i4.3 + IL_004f: stfld int32 Linq101Ordering01/sortedWords@11::pc + IL_0054: ldarg.0 + IL_0055: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/sortedWords@11::'enum' + IL_005a: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_005f: nop .line 100001,100001 : 0,0 '' - IL_0062: nop - IL_0063: ldarg.0 - IL_0064: ldc.i4.3 - IL_0065: stfld int32 Linq101Ordering01/sortedWords@11::pc - IL_006a: ldarg.0 - IL_006b: ldnull - IL_006c: stfld string Linq101Ordering01/sortedWords@11::current - IL_0071: ldnull - IL_0072: stloc.1 - IL_0073: leave.s IL_0081 + IL_0060: nop + IL_0061: ldarg.0 + IL_0062: ldc.i4.3 + IL_0063: stfld int32 Linq101Ordering01/sortedWords@11::pc + IL_0068: ldarg.0 + IL_0069: ldnull + IL_006a: stfld string Linq101Ordering01/sortedWords@11::current + IL_006f: ldnull + IL_0070: stloc.1 + IL_0071: leave.s IL_007f } // end .try catch [mscorlib]System.Object { - IL_0075: castclass [mscorlib]System.Exception - IL_007a: stloc.2 + IL_0073: castclass [mscorlib]System.Exception + IL_0078: stloc.2 .line 11,11 : 9,26 '' - IL_007b: ldloc.2 - IL_007c: stloc.0 - IL_007d: ldnull - IL_007e: stloc.1 - IL_007f: leave.s IL_0081 + IL_0079: ldloc.2 + IL_007a: stloc.0 + IL_007b: ldnull + IL_007c: stloc.1 + IL_007d: leave.s IL_007f .line 100001,100001 : 0,0 '' } // end handler - IL_0081: ldloc.1 - IL_0082: pop + IL_007f: ldloc.1 + IL_0080: pop .line 100001,100001 : 0,0 '' - IL_0083: nop - IL_0084: br IL_0002 + IL_0081: nop + IL_0082: br IL_0000 - IL_0089: ldloc.0 - IL_008a: ldnull - IL_008b: cgt.un - IL_008d: brfalse.s IL_0091 + IL_0087: ldloc.0 + IL_0088: ldnull + IL_0089: cgt.un + IL_008b: brfalse.s IL_008f - IL_008f: br.s IL_0093 + IL_008d: br.s IL_0091 - IL_0091: br.s IL_0095 + IL_008f: br.s IL_0093 .line 100001,100001 : 0,0 '' - IL_0093: ldloc.0 - IL_0094: throw + IL_0091: ldloc.0 + IL_0092: throw .line 100001,100001 : 0,0 '' - IL_0095: ret + IL_0093: ret } // end of method sortedWords@11::Close .method public strict virtual instance bool @@ -397,19 +373,15 @@ { .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 ) - // Code size 11 (0xb) - .maxstack 9 + // Code size 9 (0x9) + .maxstack 8 IL_0000: ldnull - IL_0001: ldnull + IL_0001: ldc.i4.0 IL_0002: ldnull - IL_0003: ldc.i4.0 - IL_0004: ldnull - IL_0005: newobj instance void Linq101Ordering01/sortedWords@11::.ctor(string, - string, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0003: newobj instance void Linq101Ordering01/sortedWords@11::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, string) - IL_000a: ret + IL_0008: ret } // end of method sortedWords@11::GetFreshEnumerator } // end of class sortedWords@11 @@ -445,11 +417,6 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) - .field public string _arg1 - .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 ) - .field public string w .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' .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 ) @@ -463,39 +430,33 @@ .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 specialname rtspecialname - instance void .ctor(string _arg1, - string w, - class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', int32 pc, string current) cil managed { - // Code size 44 (0x2c) + // Code size 28 (0x1c) .maxstack 8 IL_0000: ldarg.0 IL_0001: ldarg.1 - IL_0002: stfld string Linq101Ordering01/sortedWords2@18::_arg1 + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/sortedWords2@18::'enum' IL_0007: ldarg.0 IL_0008: ldarg.2 - IL_0009: stfld string Linq101Ordering01/sortedWords2@18::w + IL_0009: stfld int32 Linq101Ordering01/sortedWords2@18::pc IL_000e: ldarg.0 IL_000f: ldarg.3 - IL_0010: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/sortedWords2@18::'enum' + IL_0010: stfld string Linq101Ordering01/sortedWords2@18::current IL_0015: ldarg.0 - IL_0016: ldarg.s pc - IL_0018: stfld int32 Linq101Ordering01/sortedWords2@18::pc - IL_001d: ldarg.0 - IL_001e: ldarg.s current - IL_0020: stfld string Linq101Ordering01/sortedWords2@18::current - IL_0025: ldarg.0 - IL_0026: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() - IL_002b: ret + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_001b: ret } // end of method sortedWords2@18::.ctor .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 191 (0xbf) + // Code size 154 (0x9a) .maxstack 6 + .locals init ([0] string V_0, + [1] string w) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 IL_0001: ldfld int32 Linq101Ordering01/sortedWords2@18::pc @@ -505,7 +466,7 @@ IL_001b, IL_001d, IL_001f) - IL_0019: br.s IL_002d + IL_0019: br.s IL_002a IL_001b: br.s IL_0021 @@ -515,203 +476,190 @@ .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br.s IL_0095 + IL_0022: br.s IL_0070 .line 100001,100001 : 0,0 '' IL_0024: nop - IL_0025: br.s IL_0084 + IL_0025: br.s IL_006d .line 100001,100001 : 0,0 '' IL_0027: nop - IL_0028: br IL_00b6 + IL_0028: br.s IL_0091 .line 100001,100001 : 0,0 '' - IL_002d: nop + IL_002a: nop .line 18,18 : 9,26 '' - IL_002e: ldarg.0 - IL_002f: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Ordering01::get_words() - IL_0034: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0039: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/sortedWords2@18::'enum' - IL_003e: ldarg.0 - IL_003f: ldc.i4.1 - IL_0040: stfld int32 Linq101Ordering01/sortedWords2@18::pc + IL_002b: ldarg.0 + IL_002c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Ordering01::get_words() + IL_0031: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0036: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/sortedWords2@18::'enum' + IL_003b: ldarg.0 + IL_003c: ldc.i4.1 + IL_003d: stfld int32 Linq101Ordering01/sortedWords2@18::pc .line 18,18 : 9,26 '' - IL_0045: ldarg.0 - IL_0046: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/sortedWords2@18::'enum' - IL_004b: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0050: brfalse.s IL_0095 - - IL_0052: ldarg.0 - IL_0053: ldarg.0 - IL_0054: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/sortedWords2@18::'enum' - IL_0059: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_005e: stfld string Linq101Ordering01/sortedWords2@18::_arg1 + IL_0042: ldarg.0 + IL_0043: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/sortedWords2@18::'enum' + IL_0048: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_004d: brfalse.s IL_0070 + + IL_004f: ldarg.0 + IL_0050: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/sortedWords2@18::'enum' + IL_0055: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_005a: stloc.0 .line 18,18 : 9,26 '' - IL_0063: ldarg.0 - IL_0064: ldarg.0 - IL_0065: ldfld string Linq101Ordering01/sortedWords2@18::_arg1 - IL_006a: stfld string Linq101Ordering01/sortedWords2@18::w - IL_006f: ldarg.0 - IL_0070: ldc.i4.2 - IL_0071: stfld int32 Linq101Ordering01/sortedWords2@18::pc + IL_005b: ldloc.0 + IL_005c: stloc.1 + IL_005d: ldarg.0 + IL_005e: ldc.i4.2 + IL_005f: stfld int32 Linq101Ordering01/sortedWords2@18::pc .line 19,19 : 9,26 '' - IL_0076: ldarg.0 - IL_0077: ldarg.0 - IL_0078: ldfld string Linq101Ordering01/sortedWords2@18::w - IL_007d: stfld string Linq101Ordering01/sortedWords2@18::current - IL_0082: ldc.i4.1 - IL_0083: ret - - IL_0084: ldarg.0 - IL_0085: ldnull - IL_0086: stfld string Linq101Ordering01/sortedWords2@18::w - .line 18,18 : 9,26 '' - IL_008b: ldarg.0 - IL_008c: ldnull - IL_008d: stfld string Linq101Ordering01/sortedWords2@18::_arg1 + IL_0064: ldarg.0 + IL_0065: ldloc.1 + IL_0066: stfld string Linq101Ordering01/sortedWords2@18::current + IL_006b: ldc.i4.1 + IL_006c: ret + .line 100001,100001 : 0,0 '' - IL_0092: nop - IL_0093: br.s IL_0045 + IL_006d: nop + IL_006e: br.s IL_0042 - IL_0095: ldarg.0 - IL_0096: ldc.i4.3 - IL_0097: stfld int32 Linq101Ordering01/sortedWords2@18::pc + IL_0070: ldarg.0 + IL_0071: ldc.i4.3 + IL_0072: stfld int32 Linq101Ordering01/sortedWords2@18::pc .line 18,18 : 9,26 '' - IL_009c: ldarg.0 - IL_009d: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/sortedWords2@18::'enum' - IL_00a2: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_00a7: nop - IL_00a8: ldarg.0 - IL_00a9: ldnull - IL_00aa: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/sortedWords2@18::'enum' - IL_00af: ldarg.0 - IL_00b0: ldc.i4.3 - IL_00b1: stfld int32 Linq101Ordering01/sortedWords2@18::pc - IL_00b6: ldarg.0 - IL_00b7: ldnull - IL_00b8: stfld string Linq101Ordering01/sortedWords2@18::current - IL_00bd: ldc.i4.0 - IL_00be: ret + IL_0077: ldarg.0 + IL_0078: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/sortedWords2@18::'enum' + IL_007d: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0082: nop + IL_0083: ldarg.0 + IL_0084: ldnull + IL_0085: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/sortedWords2@18::'enum' + IL_008a: ldarg.0 + IL_008b: ldc.i4.3 + IL_008c: stfld int32 Linq101Ordering01/sortedWords2@18::pc + IL_0091: ldarg.0 + IL_0092: ldnull + IL_0093: stfld string Linq101Ordering01/sortedWords2@18::current + IL_0098: ldc.i4.0 + IL_0099: ret } // end of method sortedWords2@18::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 150 (0x96) + // Code size 148 (0x94) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [FSharp.Core]Microsoft.FSharp.Core.Unit V_1, [2] class [mscorlib]System.Exception e) .line 100001,100001 : 0,0 '' - IL_0000: ldnull - IL_0001: stloc.0 - IL_0002: ldarg.0 - IL_0003: ldfld int32 Linq101Ordering01/sortedWords2@18::pc - IL_0008: ldc.i4.3 - IL_0009: sub - IL_000a: switch ( - IL_0015) - IL_0013: br.s IL_001b + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Ordering01/sortedWords2@18::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0019 .line 100001,100001 : 0,0 '' - IL_0015: nop - IL_0016: br IL_0089 + IL_0013: nop + IL_0014: br IL_0087 .line 100001,100001 : 0,0 '' - IL_001b: nop + IL_0019: nop .try { - IL_001c: ldarg.0 - IL_001d: ldfld int32 Linq101Ordering01/sortedWords2@18::pc - IL_0022: switch ( + IL_001a: ldarg.0 + IL_001b: ldfld int32 Linq101Ordering01/sortedWords2@18::pc + IL_0020: switch ( + IL_0037, IL_0039, IL_003b, - IL_003d, - IL_003f) - IL_0037: br.s IL_004d + IL_003d) + IL_0035: br.s IL_004b - IL_0039: br.s IL_0041 + IL_0037: br.s IL_003f - IL_003b: br.s IL_0044 + IL_0039: br.s IL_0042 - IL_003d: br.s IL_0047 + IL_003b: br.s IL_0045 - IL_003f: br.s IL_004a + IL_003d: br.s IL_0048 .line 100001,100001 : 0,0 '' - IL_0041: nop - IL_0042: br.s IL_0063 + IL_003f: nop + IL_0040: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_0044: nop - IL_0045: br.s IL_004f + IL_0042: nop + IL_0043: br.s IL_004d .line 100001,100001 : 0,0 '' - IL_0047: nop - IL_0048: br.s IL_004e + IL_0045: nop + IL_0046: br.s IL_004c .line 100001,100001 : 0,0 '' - IL_004a: nop - IL_004b: br.s IL_0063 + IL_0048: nop + IL_0049: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_004d: nop + IL_004b: nop .line 100001,100001 : 0,0 '' - IL_004e: nop - IL_004f: ldarg.0 - IL_0050: ldc.i4.3 - IL_0051: stfld int32 Linq101Ordering01/sortedWords2@18::pc - IL_0056: ldarg.0 - IL_0057: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/sortedWords2@18::'enum' - IL_005c: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_0061: nop + IL_004c: nop + IL_004d: ldarg.0 + IL_004e: ldc.i4.3 + IL_004f: stfld int32 Linq101Ordering01/sortedWords2@18::pc + IL_0054: ldarg.0 + IL_0055: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/sortedWords2@18::'enum' + IL_005a: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_005f: nop .line 100001,100001 : 0,0 '' - IL_0062: nop - IL_0063: ldarg.0 - IL_0064: ldc.i4.3 - IL_0065: stfld int32 Linq101Ordering01/sortedWords2@18::pc - IL_006a: ldarg.0 - IL_006b: ldnull - IL_006c: stfld string Linq101Ordering01/sortedWords2@18::current - IL_0071: ldnull - IL_0072: stloc.1 - IL_0073: leave.s IL_0081 + IL_0060: nop + IL_0061: ldarg.0 + IL_0062: ldc.i4.3 + IL_0063: stfld int32 Linq101Ordering01/sortedWords2@18::pc + IL_0068: ldarg.0 + IL_0069: ldnull + IL_006a: stfld string Linq101Ordering01/sortedWords2@18::current + IL_006f: ldnull + IL_0070: stloc.1 + IL_0071: leave.s IL_007f } // end .try catch [mscorlib]System.Object { - IL_0075: castclass [mscorlib]System.Exception - IL_007a: stloc.2 + IL_0073: castclass [mscorlib]System.Exception + IL_0078: stloc.2 .line 18,18 : 9,26 '' - IL_007b: ldloc.2 - IL_007c: stloc.0 - IL_007d: ldnull - IL_007e: stloc.1 - IL_007f: leave.s IL_0081 + IL_0079: ldloc.2 + IL_007a: stloc.0 + IL_007b: ldnull + IL_007c: stloc.1 + IL_007d: leave.s IL_007f .line 100001,100001 : 0,0 '' } // end handler - IL_0081: ldloc.1 - IL_0082: pop + IL_007f: ldloc.1 + IL_0080: pop .line 100001,100001 : 0,0 '' - IL_0083: nop - IL_0084: br IL_0002 + IL_0081: nop + IL_0082: br IL_0000 - IL_0089: ldloc.0 - IL_008a: ldnull - IL_008b: cgt.un - IL_008d: brfalse.s IL_0091 + IL_0087: ldloc.0 + IL_0088: ldnull + IL_0089: cgt.un + IL_008b: brfalse.s IL_008f - IL_008f: br.s IL_0093 + IL_008d: br.s IL_0091 - IL_0091: br.s IL_0095 + IL_008f: br.s IL_0093 .line 100001,100001 : 0,0 '' - IL_0093: ldloc.0 - IL_0094: throw + IL_0091: ldloc.0 + IL_0092: throw .line 100001,100001 : 0,0 '' - IL_0095: ret + IL_0093: ret } // end of method sortedWords2@18::Close .method public strict virtual instance bool @@ -782,19 +730,15 @@ { .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 ) - // Code size 11 (0xb) - .maxstack 9 + // Code size 9 (0x9) + .maxstack 8 IL_0000: ldnull - IL_0001: ldnull + IL_0001: ldc.i4.0 IL_0002: ldnull - IL_0003: ldc.i4.0 - IL_0004: ldnull - IL_0005: newobj instance void Linq101Ordering01/sortedWords2@18::.ctor(string, - string, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0003: newobj instance void Linq101Ordering01/sortedWords2@18::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, string) - IL_000a: ret + IL_0008: ret } // end of method sortedWords2@18::GetFreshEnumerator } // end of class sortedWords2@18 @@ -929,11 +873,6 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) - .field public class [Utils]Utils/Product _arg1 - .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 ) - .field public class [Utils]Utils/Product p .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' .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 ) @@ -947,39 +886,33 @@ .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 specialname rtspecialname - instance void .ctor(class [Utils]Utils/Product _arg1, - class [Utils]Utils/Product p, - class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', int32 pc, class [Utils]Utils/Product current) cil managed { - // Code size 44 (0x2c) + // Code size 28 (0x1c) .maxstack 8 IL_0000: ldarg.0 IL_0001: ldarg.1 - IL_0002: stfld class [Utils]Utils/Product Linq101Ordering01/sortedProducts2@44::_arg1 + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/sortedProducts2@44::'enum' IL_0007: ldarg.0 IL_0008: ldarg.2 - IL_0009: stfld class [Utils]Utils/Product Linq101Ordering01/sortedProducts2@44::p + IL_0009: stfld int32 Linq101Ordering01/sortedProducts2@44::pc IL_000e: ldarg.0 IL_000f: ldarg.3 - IL_0010: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/sortedProducts2@44::'enum' + IL_0010: stfld class [Utils]Utils/Product Linq101Ordering01/sortedProducts2@44::current IL_0015: ldarg.0 - IL_0016: ldarg.s pc - IL_0018: stfld int32 Linq101Ordering01/sortedProducts2@44::pc - IL_001d: ldarg.0 - IL_001e: ldarg.s current - IL_0020: stfld class [Utils]Utils/Product Linq101Ordering01/sortedProducts2@44::current - IL_0025: ldarg.0 - IL_0026: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() - IL_002b: ret + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_001b: ret } // end of method sortedProducts2@44::.ctor .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 191 (0xbf) + // Code size 154 (0x9a) .maxstack 6 + .locals init ([0] class [Utils]Utils/Product V_0, + [1] class [Utils]Utils/Product p) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 IL_0001: ldfld int32 Linq101Ordering01/sortedProducts2@44::pc @@ -989,7 +922,7 @@ IL_001b, IL_001d, IL_001f) - IL_0019: br.s IL_002d + IL_0019: br.s IL_002a IL_001b: br.s IL_0021 @@ -999,203 +932,190 @@ .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br.s IL_0095 + IL_0022: br.s IL_0070 .line 100001,100001 : 0,0 '' IL_0024: nop - IL_0025: br.s IL_0084 + IL_0025: br.s IL_006d .line 100001,100001 : 0,0 '' IL_0027: nop - IL_0028: br IL_00b6 + IL_0028: br.s IL_0091 .line 100001,100001 : 0,0 '' - IL_002d: nop + IL_002a: nop .line 44,44 : 9,29 '' - IL_002e: ldarg.0 - IL_002f: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Ordering01::get_products() - IL_0034: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0039: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/sortedProducts2@44::'enum' - IL_003e: ldarg.0 - IL_003f: ldc.i4.1 - IL_0040: stfld int32 Linq101Ordering01/sortedProducts2@44::pc + IL_002b: ldarg.0 + IL_002c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Ordering01::get_products() + IL_0031: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0036: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/sortedProducts2@44::'enum' + IL_003b: ldarg.0 + IL_003c: ldc.i4.1 + IL_003d: stfld int32 Linq101Ordering01/sortedProducts2@44::pc .line 44,44 : 9,29 '' - IL_0045: ldarg.0 - IL_0046: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/sortedProducts2@44::'enum' - IL_004b: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0050: brfalse.s IL_0095 - - IL_0052: ldarg.0 - IL_0053: ldarg.0 - IL_0054: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/sortedProducts2@44::'enum' - IL_0059: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_005e: stfld class [Utils]Utils/Product Linq101Ordering01/sortedProducts2@44::_arg1 + IL_0042: ldarg.0 + IL_0043: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/sortedProducts2@44::'enum' + IL_0048: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_004d: brfalse.s IL_0070 + + IL_004f: ldarg.0 + IL_0050: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/sortedProducts2@44::'enum' + IL_0055: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_005a: stloc.0 .line 44,44 : 9,29 '' - IL_0063: ldarg.0 - IL_0064: ldarg.0 - IL_0065: ldfld class [Utils]Utils/Product Linq101Ordering01/sortedProducts2@44::_arg1 - IL_006a: stfld class [Utils]Utils/Product Linq101Ordering01/sortedProducts2@44::p - IL_006f: ldarg.0 - IL_0070: ldc.i4.2 - IL_0071: stfld int32 Linq101Ordering01/sortedProducts2@44::pc + IL_005b: ldloc.0 + IL_005c: stloc.1 + IL_005d: ldarg.0 + IL_005e: ldc.i4.2 + IL_005f: stfld int32 Linq101Ordering01/sortedProducts2@44::pc .line 45,45 : 9,40 '' - IL_0076: ldarg.0 - IL_0077: ldarg.0 - IL_0078: ldfld class [Utils]Utils/Product Linq101Ordering01/sortedProducts2@44::p - IL_007d: stfld class [Utils]Utils/Product Linq101Ordering01/sortedProducts2@44::current - IL_0082: ldc.i4.1 - IL_0083: ret - - IL_0084: ldarg.0 - IL_0085: ldnull - IL_0086: stfld class [Utils]Utils/Product Linq101Ordering01/sortedProducts2@44::p - .line 44,44 : 9,29 '' - IL_008b: ldarg.0 - IL_008c: ldnull - IL_008d: stfld class [Utils]Utils/Product Linq101Ordering01/sortedProducts2@44::_arg1 + IL_0064: ldarg.0 + IL_0065: ldloc.1 + IL_0066: stfld class [Utils]Utils/Product Linq101Ordering01/sortedProducts2@44::current + IL_006b: ldc.i4.1 + IL_006c: ret + .line 100001,100001 : 0,0 '' - IL_0092: nop - IL_0093: br.s IL_0045 + IL_006d: nop + IL_006e: br.s IL_0042 - IL_0095: ldarg.0 - IL_0096: ldc.i4.3 - IL_0097: stfld int32 Linq101Ordering01/sortedProducts2@44::pc + IL_0070: ldarg.0 + IL_0071: ldc.i4.3 + IL_0072: stfld int32 Linq101Ordering01/sortedProducts2@44::pc .line 44,44 : 9,29 '' - IL_009c: ldarg.0 - IL_009d: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/sortedProducts2@44::'enum' - IL_00a2: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_00a7: nop - IL_00a8: ldarg.0 - IL_00a9: ldnull - IL_00aa: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/sortedProducts2@44::'enum' - IL_00af: ldarg.0 - IL_00b0: ldc.i4.3 - IL_00b1: stfld int32 Linq101Ordering01/sortedProducts2@44::pc - IL_00b6: ldarg.0 - IL_00b7: ldnull - IL_00b8: stfld class [Utils]Utils/Product Linq101Ordering01/sortedProducts2@44::current - IL_00bd: ldc.i4.0 - IL_00be: ret + IL_0077: ldarg.0 + IL_0078: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/sortedProducts2@44::'enum' + IL_007d: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0082: nop + IL_0083: ldarg.0 + IL_0084: ldnull + IL_0085: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/sortedProducts2@44::'enum' + IL_008a: ldarg.0 + IL_008b: ldc.i4.3 + IL_008c: stfld int32 Linq101Ordering01/sortedProducts2@44::pc + IL_0091: ldarg.0 + IL_0092: ldnull + IL_0093: stfld class [Utils]Utils/Product Linq101Ordering01/sortedProducts2@44::current + IL_0098: ldc.i4.0 + IL_0099: ret } // end of method sortedProducts2@44::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 150 (0x96) + // Code size 148 (0x94) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [FSharp.Core]Microsoft.FSharp.Core.Unit V_1, [2] class [mscorlib]System.Exception e) .line 100001,100001 : 0,0 '' - IL_0000: ldnull - IL_0001: stloc.0 - IL_0002: ldarg.0 - IL_0003: ldfld int32 Linq101Ordering01/sortedProducts2@44::pc - IL_0008: ldc.i4.3 - IL_0009: sub - IL_000a: switch ( - IL_0015) - IL_0013: br.s IL_001b + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Ordering01/sortedProducts2@44::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0019 .line 100001,100001 : 0,0 '' - IL_0015: nop - IL_0016: br IL_0089 + IL_0013: nop + IL_0014: br IL_0087 .line 100001,100001 : 0,0 '' - IL_001b: nop + IL_0019: nop .try { - IL_001c: ldarg.0 - IL_001d: ldfld int32 Linq101Ordering01/sortedProducts2@44::pc - IL_0022: switch ( + IL_001a: ldarg.0 + IL_001b: ldfld int32 Linq101Ordering01/sortedProducts2@44::pc + IL_0020: switch ( + IL_0037, IL_0039, IL_003b, - IL_003d, - IL_003f) - IL_0037: br.s IL_004d + IL_003d) + IL_0035: br.s IL_004b - IL_0039: br.s IL_0041 + IL_0037: br.s IL_003f - IL_003b: br.s IL_0044 + IL_0039: br.s IL_0042 - IL_003d: br.s IL_0047 + IL_003b: br.s IL_0045 - IL_003f: br.s IL_004a + IL_003d: br.s IL_0048 .line 100001,100001 : 0,0 '' - IL_0041: nop - IL_0042: br.s IL_0063 + IL_003f: nop + IL_0040: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_0044: nop - IL_0045: br.s IL_004f + IL_0042: nop + IL_0043: br.s IL_004d .line 100001,100001 : 0,0 '' - IL_0047: nop - IL_0048: br.s IL_004e + IL_0045: nop + IL_0046: br.s IL_004c .line 100001,100001 : 0,0 '' - IL_004a: nop - IL_004b: br.s IL_0063 + IL_0048: nop + IL_0049: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_004d: nop + IL_004b: nop .line 100001,100001 : 0,0 '' - IL_004e: nop - IL_004f: ldarg.0 - IL_0050: ldc.i4.3 - IL_0051: stfld int32 Linq101Ordering01/sortedProducts2@44::pc - IL_0056: ldarg.0 - IL_0057: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/sortedProducts2@44::'enum' - IL_005c: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_0061: nop + IL_004c: nop + IL_004d: ldarg.0 + IL_004e: ldc.i4.3 + IL_004f: stfld int32 Linq101Ordering01/sortedProducts2@44::pc + IL_0054: ldarg.0 + IL_0055: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/sortedProducts2@44::'enum' + IL_005a: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_005f: nop .line 100001,100001 : 0,0 '' - IL_0062: nop - IL_0063: ldarg.0 - IL_0064: ldc.i4.3 - IL_0065: stfld int32 Linq101Ordering01/sortedProducts2@44::pc - IL_006a: ldarg.0 - IL_006b: ldnull - IL_006c: stfld class [Utils]Utils/Product Linq101Ordering01/sortedProducts2@44::current - IL_0071: ldnull - IL_0072: stloc.1 - IL_0073: leave.s IL_0081 + IL_0060: nop + IL_0061: ldarg.0 + IL_0062: ldc.i4.3 + IL_0063: stfld int32 Linq101Ordering01/sortedProducts2@44::pc + IL_0068: ldarg.0 + IL_0069: ldnull + IL_006a: stfld class [Utils]Utils/Product Linq101Ordering01/sortedProducts2@44::current + IL_006f: ldnull + IL_0070: stloc.1 + IL_0071: leave.s IL_007f } // end .try catch [mscorlib]System.Object { - IL_0075: castclass [mscorlib]System.Exception - IL_007a: stloc.2 + IL_0073: castclass [mscorlib]System.Exception + IL_0078: stloc.2 .line 44,44 : 9,29 '' - IL_007b: ldloc.2 - IL_007c: stloc.0 - IL_007d: ldnull - IL_007e: stloc.1 - IL_007f: leave.s IL_0081 + IL_0079: ldloc.2 + IL_007a: stloc.0 + IL_007b: ldnull + IL_007c: stloc.1 + IL_007d: leave.s IL_007f .line 100001,100001 : 0,0 '' } // end handler - IL_0081: ldloc.1 - IL_0082: pop + IL_007f: ldloc.1 + IL_0080: pop .line 100001,100001 : 0,0 '' - IL_0083: nop - IL_0084: br IL_0002 + IL_0081: nop + IL_0082: br IL_0000 - IL_0089: ldloc.0 - IL_008a: ldnull - IL_008b: cgt.un - IL_008d: brfalse.s IL_0091 + IL_0087: ldloc.0 + IL_0088: ldnull + IL_0089: cgt.un + IL_008b: brfalse.s IL_008f - IL_008f: br.s IL_0093 + IL_008d: br.s IL_0091 - IL_0091: br.s IL_0095 + IL_008f: br.s IL_0093 .line 100001,100001 : 0,0 '' - IL_0093: ldloc.0 - IL_0094: throw + IL_0091: ldloc.0 + IL_0092: throw .line 100001,100001 : 0,0 '' - IL_0095: ret + IL_0093: ret } // end of method sortedProducts2@44::Close .method public strict virtual instance bool @@ -1266,19 +1186,15 @@ { .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 ) - // Code size 11 (0xb) - .maxstack 9 + // Code size 9 (0x9) + .maxstack 8 IL_0000: ldnull - IL_0001: ldnull + IL_0001: ldc.i4.0 IL_0002: ldnull - IL_0003: ldc.i4.0 - IL_0004: ldnull - IL_0005: newobj instance void Linq101Ordering01/sortedProducts2@44::.ctor(class [Utils]Utils/Product, - class [Utils]Utils/Product, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0003: newobj instance void Linq101Ordering01/sortedProducts2@44::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, class [Utils]Utils/Product) - IL_000a: ret + IL_0008: ret } // end of method sortedProducts2@44::GetFreshEnumerator } // end of class sortedProducts2@44 @@ -1316,11 +1232,6 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) - .field public string _arg1 - .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 ) - .field public string d .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' .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 ) @@ -1334,39 +1245,33 @@ .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 specialname rtspecialname - instance void .ctor(string _arg1, - string d, - class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', int32 pc, string current) cil managed { - // Code size 44 (0x2c) + // Code size 28 (0x1c) .maxstack 8 IL_0000: ldarg.0 IL_0001: ldarg.1 - IL_0002: stfld string Linq101Ordering01/sortedDigits@52::_arg1 + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/sortedDigits@52::'enum' IL_0007: ldarg.0 IL_0008: ldarg.2 - IL_0009: stfld string Linq101Ordering01/sortedDigits@52::d + IL_0009: stfld int32 Linq101Ordering01/sortedDigits@52::pc IL_000e: ldarg.0 IL_000f: ldarg.3 - IL_0010: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/sortedDigits@52::'enum' + IL_0010: stfld string Linq101Ordering01/sortedDigits@52::current IL_0015: ldarg.0 - IL_0016: ldarg.s pc - IL_0018: stfld int32 Linq101Ordering01/sortedDigits@52::pc - IL_001d: ldarg.0 - IL_001e: ldarg.s current - IL_0020: stfld string Linq101Ordering01/sortedDigits@52::current - IL_0025: ldarg.0 - IL_0026: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() - IL_002b: ret + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_001b: ret } // end of method sortedDigits@52::.ctor .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 191 (0xbf) + // Code size 154 (0x9a) .maxstack 6 + .locals init ([0] string V_0, + [1] string d) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 IL_0001: ldfld int32 Linq101Ordering01/sortedDigits@52::pc @@ -1376,7 +1281,7 @@ IL_001b, IL_001d, IL_001f) - IL_0019: br.s IL_002d + IL_0019: br.s IL_002a IL_001b: br.s IL_0021 @@ -1386,203 +1291,190 @@ .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br.s IL_0095 + IL_0022: br.s IL_0070 .line 100001,100001 : 0,0 '' IL_0024: nop - IL_0025: br.s IL_0084 + IL_0025: br.s IL_006d .line 100001,100001 : 0,0 '' IL_0027: nop - IL_0028: br IL_00b6 + IL_0028: br.s IL_0091 .line 100001,100001 : 0,0 '' - IL_002d: nop + IL_002a: nop .line 52,52 : 9,27 '' - IL_002e: ldarg.0 - IL_002f: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Ordering01::get_digits() - IL_0034: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0039: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/sortedDigits@52::'enum' - IL_003e: ldarg.0 - IL_003f: ldc.i4.1 - IL_0040: stfld int32 Linq101Ordering01/sortedDigits@52::pc + IL_002b: ldarg.0 + IL_002c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Ordering01::get_digits() + IL_0031: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0036: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/sortedDigits@52::'enum' + IL_003b: ldarg.0 + IL_003c: ldc.i4.1 + IL_003d: stfld int32 Linq101Ordering01/sortedDigits@52::pc .line 52,52 : 9,27 '' - IL_0045: ldarg.0 - IL_0046: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/sortedDigits@52::'enum' - IL_004b: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0050: brfalse.s IL_0095 - - IL_0052: ldarg.0 - IL_0053: ldarg.0 - IL_0054: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/sortedDigits@52::'enum' - IL_0059: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_005e: stfld string Linq101Ordering01/sortedDigits@52::_arg1 + IL_0042: ldarg.0 + IL_0043: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/sortedDigits@52::'enum' + IL_0048: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_004d: brfalse.s IL_0070 + + IL_004f: ldarg.0 + IL_0050: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/sortedDigits@52::'enum' + IL_0055: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_005a: stloc.0 .line 52,52 : 9,27 '' - IL_0063: ldarg.0 - IL_0064: ldarg.0 - IL_0065: ldfld string Linq101Ordering01/sortedDigits@52::_arg1 - IL_006a: stfld string Linq101Ordering01/sortedDigits@52::d - IL_006f: ldarg.0 - IL_0070: ldc.i4.2 - IL_0071: stfld int32 Linq101Ordering01/sortedDigits@52::pc + IL_005b: ldloc.0 + IL_005c: stloc.1 + IL_005d: ldarg.0 + IL_005e: ldc.i4.2 + IL_005f: stfld int32 Linq101Ordering01/sortedDigits@52::pc .line 53,53 : 9,24 '' - IL_0076: ldarg.0 - IL_0077: ldarg.0 - IL_0078: ldfld string Linq101Ordering01/sortedDigits@52::d - IL_007d: stfld string Linq101Ordering01/sortedDigits@52::current - IL_0082: ldc.i4.1 - IL_0083: ret - - IL_0084: ldarg.0 - IL_0085: ldnull - IL_0086: stfld string Linq101Ordering01/sortedDigits@52::d - .line 52,52 : 9,27 '' - IL_008b: ldarg.0 - IL_008c: ldnull - IL_008d: stfld string Linq101Ordering01/sortedDigits@52::_arg1 + IL_0064: ldarg.0 + IL_0065: ldloc.1 + IL_0066: stfld string Linq101Ordering01/sortedDigits@52::current + IL_006b: ldc.i4.1 + IL_006c: ret + .line 100001,100001 : 0,0 '' - IL_0092: nop - IL_0093: br.s IL_0045 + IL_006d: nop + IL_006e: br.s IL_0042 - IL_0095: ldarg.0 - IL_0096: ldc.i4.3 - IL_0097: stfld int32 Linq101Ordering01/sortedDigits@52::pc + IL_0070: ldarg.0 + IL_0071: ldc.i4.3 + IL_0072: stfld int32 Linq101Ordering01/sortedDigits@52::pc .line 52,52 : 9,27 '' - IL_009c: ldarg.0 - IL_009d: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/sortedDigits@52::'enum' - IL_00a2: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_00a7: nop - IL_00a8: ldarg.0 - IL_00a9: ldnull - IL_00aa: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/sortedDigits@52::'enum' - IL_00af: ldarg.0 - IL_00b0: ldc.i4.3 - IL_00b1: stfld int32 Linq101Ordering01/sortedDigits@52::pc - IL_00b6: ldarg.0 - IL_00b7: ldnull - IL_00b8: stfld string Linq101Ordering01/sortedDigits@52::current - IL_00bd: ldc.i4.0 - IL_00be: ret + IL_0077: ldarg.0 + IL_0078: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/sortedDigits@52::'enum' + IL_007d: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0082: nop + IL_0083: ldarg.0 + IL_0084: ldnull + IL_0085: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/sortedDigits@52::'enum' + IL_008a: ldarg.0 + IL_008b: ldc.i4.3 + IL_008c: stfld int32 Linq101Ordering01/sortedDigits@52::pc + IL_0091: ldarg.0 + IL_0092: ldnull + IL_0093: stfld string Linq101Ordering01/sortedDigits@52::current + IL_0098: ldc.i4.0 + IL_0099: ret } // end of method sortedDigits@52::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 150 (0x96) + // Code size 148 (0x94) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [FSharp.Core]Microsoft.FSharp.Core.Unit V_1, [2] class [mscorlib]System.Exception e) .line 100001,100001 : 0,0 '' - IL_0000: ldnull - IL_0001: stloc.0 - IL_0002: ldarg.0 - IL_0003: ldfld int32 Linq101Ordering01/sortedDigits@52::pc - IL_0008: ldc.i4.3 - IL_0009: sub - IL_000a: switch ( - IL_0015) - IL_0013: br.s IL_001b + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Ordering01/sortedDigits@52::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0019 .line 100001,100001 : 0,0 '' - IL_0015: nop - IL_0016: br IL_0089 + IL_0013: nop + IL_0014: br IL_0087 .line 100001,100001 : 0,0 '' - IL_001b: nop + IL_0019: nop .try { - IL_001c: ldarg.0 - IL_001d: ldfld int32 Linq101Ordering01/sortedDigits@52::pc - IL_0022: switch ( + IL_001a: ldarg.0 + IL_001b: ldfld int32 Linq101Ordering01/sortedDigits@52::pc + IL_0020: switch ( + IL_0037, IL_0039, IL_003b, - IL_003d, - IL_003f) - IL_0037: br.s IL_004d + IL_003d) + IL_0035: br.s IL_004b - IL_0039: br.s IL_0041 + IL_0037: br.s IL_003f - IL_003b: br.s IL_0044 + IL_0039: br.s IL_0042 - IL_003d: br.s IL_0047 + IL_003b: br.s IL_0045 - IL_003f: br.s IL_004a + IL_003d: br.s IL_0048 .line 100001,100001 : 0,0 '' - IL_0041: nop - IL_0042: br.s IL_0063 + IL_003f: nop + IL_0040: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_0044: nop - IL_0045: br.s IL_004f + IL_0042: nop + IL_0043: br.s IL_004d .line 100001,100001 : 0,0 '' - IL_0047: nop - IL_0048: br.s IL_004e + IL_0045: nop + IL_0046: br.s IL_004c .line 100001,100001 : 0,0 '' - IL_004a: nop - IL_004b: br.s IL_0063 + IL_0048: nop + IL_0049: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_004d: nop + IL_004b: nop .line 100001,100001 : 0,0 '' - IL_004e: nop - IL_004f: ldarg.0 - IL_0050: ldc.i4.3 - IL_0051: stfld int32 Linq101Ordering01/sortedDigits@52::pc - IL_0056: ldarg.0 - IL_0057: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/sortedDigits@52::'enum' - IL_005c: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_0061: nop + IL_004c: nop + IL_004d: ldarg.0 + IL_004e: ldc.i4.3 + IL_004f: stfld int32 Linq101Ordering01/sortedDigits@52::pc + IL_0054: ldarg.0 + IL_0055: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/sortedDigits@52::'enum' + IL_005a: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_005f: nop .line 100001,100001 : 0,0 '' - IL_0062: nop - IL_0063: ldarg.0 - IL_0064: ldc.i4.3 - IL_0065: stfld int32 Linq101Ordering01/sortedDigits@52::pc - IL_006a: ldarg.0 - IL_006b: ldnull - IL_006c: stfld string Linq101Ordering01/sortedDigits@52::current - IL_0071: ldnull - IL_0072: stloc.1 - IL_0073: leave.s IL_0081 + IL_0060: nop + IL_0061: ldarg.0 + IL_0062: ldc.i4.3 + IL_0063: stfld int32 Linq101Ordering01/sortedDigits@52::pc + IL_0068: ldarg.0 + IL_0069: ldnull + IL_006a: stfld string Linq101Ordering01/sortedDigits@52::current + IL_006f: ldnull + IL_0070: stloc.1 + IL_0071: leave.s IL_007f } // end .try catch [mscorlib]System.Object { - IL_0075: castclass [mscorlib]System.Exception - IL_007a: stloc.2 + IL_0073: castclass [mscorlib]System.Exception + IL_0078: stloc.2 .line 52,52 : 9,27 '' - IL_007b: ldloc.2 - IL_007c: stloc.0 - IL_007d: ldnull - IL_007e: stloc.1 - IL_007f: leave.s IL_0081 + IL_0079: ldloc.2 + IL_007a: stloc.0 + IL_007b: ldnull + IL_007c: stloc.1 + IL_007d: leave.s IL_007f .line 100001,100001 : 0,0 '' } // end handler - IL_0081: ldloc.1 - IL_0082: pop + IL_007f: ldloc.1 + IL_0080: pop .line 100001,100001 : 0,0 '' - IL_0083: nop - IL_0084: br IL_0002 + IL_0081: nop + IL_0082: br IL_0000 - IL_0089: ldloc.0 - IL_008a: ldnull - IL_008b: cgt.un - IL_008d: brfalse.s IL_0091 + IL_0087: ldloc.0 + IL_0088: ldnull + IL_0089: cgt.un + IL_008b: brfalse.s IL_008f - IL_008f: br.s IL_0093 + IL_008d: br.s IL_0091 - IL_0091: br.s IL_0095 + IL_008f: br.s IL_0093 .line 100001,100001 : 0,0 '' - IL_0093: ldloc.0 - IL_0094: throw + IL_0091: ldloc.0 + IL_0092: throw .line 100001,100001 : 0,0 '' - IL_0095: ret + IL_0093: ret } // end of method sortedDigits@52::Close .method public strict virtual instance bool @@ -1653,19 +1545,15 @@ { .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 ) - // Code size 11 (0xb) - .maxstack 9 + // Code size 9 (0x9) + .maxstack 8 IL_0000: ldnull - IL_0001: ldnull + IL_0001: ldc.i4.0 IL_0002: ldnull - IL_0003: ldc.i4.0 - IL_0004: ldnull - IL_0005: newobj instance void Linq101Ordering01/sortedDigits@52::.ctor(string, - string, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0003: newobj instance void Linq101Ordering01/sortedDigits@52::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, string) - IL_000a: ret + IL_0008: ret } // end of method sortedDigits@52::GetFreshEnumerator } // end of class sortedDigits@52 @@ -2014,7 +1902,7 @@ .method public static void main@() cil managed { .entrypoint - // Code size 548 (0x224) + // Code size 540 (0x21c) .maxstack 13 .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 words, [1] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 sortedWords, @@ -2050,190 +1938,174 @@ IL_002f: stloc.s V_9 IL_0031: ldloc.s V_9 IL_0033: ldnull - IL_0034: ldnull + IL_0034: ldc.i4.0 IL_0035: ldnull - IL_0036: ldc.i4.0 - IL_0037: ldnull - IL_0038: newobj instance void Linq101Ordering01/sortedWords@11::.ctor(string, - string, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0036: newobj instance void Linq101Ordering01/sortedWords@11::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, string) - IL_003d: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0042: newobj instance void Linq101Ordering01/'sortedWords@12-1'::.ctor() - IL_0047: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::SortBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_003b: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0040: newobj instance void Linq101Ordering01/'sortedWords@12-1'::.ctor() + IL_0045: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::SortBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_004c: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() - IL_0051: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0056: dup - IL_0057: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Ordering01::sortedWords@9 - IL_005c: stloc.1 + IL_004a: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() + IL_004f: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0054: dup + IL_0055: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Ordering01::sortedWords@9 + IL_005a: stloc.1 .line 16,20 : 1,20 '' - IL_005d: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_0062: stloc.s V_10 - IL_0064: ldloc.s V_10 + IL_005b: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_0060: stloc.s V_10 + IL_0062: ldloc.s V_10 + IL_0064: ldnull + IL_0065: ldc.i4.0 IL_0066: ldnull - IL_0067: ldnull - IL_0068: ldnull - IL_0069: ldc.i4.0 - IL_006a: ldnull - IL_006b: newobj instance void Linq101Ordering01/sortedWords2@18::.ctor(string, - string, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0067: newobj instance void Linq101Ordering01/sortedWords2@18::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, string) - IL_0070: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0075: newobj instance void Linq101Ordering01/'sortedWords2@19-1'::.ctor() - IL_007a: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::SortBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_006c: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0071: newobj instance void Linq101Ordering01/'sortedWords2@19-1'::.ctor() + IL_0076: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::SortBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_007f: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() - IL_0084: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0089: dup - IL_008a: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Ordering01::sortedWords2@16 - IL_008f: stloc.2 + IL_007b: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() + IL_0080: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0085: dup + IL_0086: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Ordering01::sortedWords2@16 + IL_008b: stloc.2 .line 23,23 : 1,32 '' - IL_0090: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [Utils]Utils::getProductList() - IL_0095: dup - IL_0096: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Ordering01::'products@23-8' - IL_009b: stloc.3 + IL_008c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [Utils]Utils::getProductList() + IL_0091: dup + IL_0092: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Ordering01::'products@23-8' + IL_0097: stloc.3 .line 24,29 : 1,21 '' - IL_009c: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_00a1: stloc.s V_11 + IL_0098: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_009d: stloc.s V_11 + IL_009f: ldloc.s V_11 + IL_00a1: ldloc.s V_11 IL_00a3: ldloc.s V_11 IL_00a5: ldloc.s V_11 - IL_00a7: ldloc.s V_11 - IL_00a9: ldloc.s V_11 - IL_00ab: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Ordering01::get_products() - IL_00b0: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Source(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_00b5: ldloc.s V_11 - IL_00b7: newobj instance void Linq101Ordering01/sortedProducts@26::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_00bc: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_00a7: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Ordering01::get_products() + IL_00ac: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Source(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_00b1: ldloc.s V_11 + IL_00b3: newobj instance void Linq101Ordering01/sortedProducts@26::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_00b8: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_00c1: newobj instance void Linq101Ordering01/'sortedProducts@27-1'::.ctor() - IL_00c6: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::SortBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_00bd: newobj instance void Linq101Ordering01/'sortedProducts@27-1'::.ctor() + IL_00c2: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::SortBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_00cb: newobj instance void Linq101Ordering01/'sortedProducts@28-2'::.ctor() - IL_00d0: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_00c7: newobj instance void Linq101Ordering01/'sortedProducts@28-2'::.ctor() + IL_00cc: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_00d5: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() - IL_00da: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_00df: dup - IL_00e0: stsfld class [Utils]Utils/Product[] ''.$Linq101Ordering01::sortedProducts@24 - IL_00e5: stloc.s sortedProducts + IL_00d1: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() + IL_00d6: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_00db: dup + IL_00dc: stsfld class [Utils]Utils/Product[] ''.$Linq101Ordering01::sortedProducts@24 + IL_00e1: stloc.s sortedProducts .line 42,46 : 1,21 '' - IL_00e7: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_00ec: stloc.s V_12 - IL_00ee: ldloc.s V_12 - IL_00f0: ldnull - IL_00f1: ldnull - IL_00f2: ldnull - IL_00f3: ldc.i4.0 - IL_00f4: ldnull - IL_00f5: newobj instance void Linq101Ordering01/sortedProducts2@44::.ctor(class [Utils]Utils/Product, - class [Utils]Utils/Product, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_00e3: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_00e8: stloc.s V_12 + IL_00ea: ldloc.s V_12 + IL_00ec: ldnull + IL_00ed: ldc.i4.0 + IL_00ee: ldnull + IL_00ef: newobj instance void Linq101Ordering01/sortedProducts2@44::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, class [Utils]Utils/Product) - IL_00fa: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_00ff: newobj instance void Linq101Ordering01/'sortedProducts2@45-1'::.ctor() - IL_0104: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::SortByDescending(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_00f4: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_00f9: newobj instance void Linq101Ordering01/'sortedProducts2@45-1'::.ctor() + IL_00fe: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::SortByDescending(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0109: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() - IL_010e: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0113: dup - IL_0114: stsfld class [Utils]Utils/Product[] ''.$Linq101Ordering01::sortedProducts2@42 - IL_0119: stloc.s sortedProducts2 + IL_0103: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() + IL_0108: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_010d: dup + IL_010e: stsfld class [Utils]Utils/Product[] ''.$Linq101Ordering01::sortedProducts2@42 + IL_0113: stloc.s sortedProducts2 .line 49,49 : 1,96 '' - IL_011b: ldstr "zero" - IL_0120: ldstr "one" - IL_0125: ldstr "two" - IL_012a: ldstr "three" - IL_012f: ldstr "four" - IL_0134: ldstr "five" - IL_0139: ldstr "six" - IL_013e: ldstr "seven" - IL_0143: ldstr "eight" - IL_0148: ldstr "nine" - IL_014d: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() - IL_0152: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0115: ldstr "zero" + IL_011a: ldstr "one" + IL_011f: ldstr "two" + IL_0124: ldstr "three" + IL_0129: ldstr "four" + IL_012e: ldstr "five" + IL_0133: ldstr "six" + IL_0138: ldstr "seven" + IL_013d: ldstr "eight" + IL_0142: ldstr "nine" + IL_0147: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_014c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_0157: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0151: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_015c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0156: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_0161: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_015b: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_0166: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0160: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_016b: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0165: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_0170: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_016a: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_0175: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_016f: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_017a: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0174: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_017f: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0179: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_0184: dup - IL_0185: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Ordering01::'digits@49-2' - IL_018a: stloc.s digits + IL_017e: dup + IL_017f: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Ordering01::'digits@49-2' + IL_0184: stloc.s digits .line 50,55 : 1,20 '' - IL_018c: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_0191: stloc.s V_13 - IL_0193: ldloc.s V_13 - IL_0195: ldloc.s V_13 - IL_0197: ldnull - IL_0198: ldnull - IL_0199: ldnull - IL_019a: ldc.i4.0 - IL_019b: ldnull - IL_019c: newobj instance void Linq101Ordering01/sortedDigits@52::.ctor(string, - string, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0186: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_018b: stloc.s V_13 + IL_018d: ldloc.s V_13 + IL_018f: ldloc.s V_13 + IL_0191: ldnull + IL_0192: ldc.i4.0 + IL_0193: ldnull + IL_0194: newobj instance void Linq101Ordering01/sortedDigits@52::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, string) - IL_01a1: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_01a6: newobj instance void Linq101Ordering01/'sortedDigits@53-1'::.ctor() - IL_01ab: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::SortBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0199: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_019e: newobj instance void Linq101Ordering01/'sortedDigits@53-1'::.ctor() + IL_01a3: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::SortBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_01b0: newobj instance void Linq101Ordering01/'sortedDigits@54-2'::.ctor() - IL_01b5: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::ThenBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_01a8: newobj instance void Linq101Ordering01/'sortedDigits@54-2'::.ctor() + IL_01ad: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::ThenBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_01ba: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() - IL_01bf: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_01c4: dup - IL_01c5: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Ordering01::sortedDigits@50 - IL_01ca: stloc.s sortedDigits + IL_01b2: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() + IL_01b7: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_01bc: dup + IL_01bd: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Ordering01::sortedDigits@50 + IL_01c2: stloc.s sortedDigits .line 58,64 : 1,21 '' - IL_01cc: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_01d1: stloc.s V_14 + IL_01c4: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_01c9: stloc.s V_14 + IL_01cb: ldloc.s V_14 + IL_01cd: ldloc.s V_14 + IL_01cf: ldloc.s V_14 + IL_01d1: ldloc.s V_14 IL_01d3: ldloc.s V_14 - IL_01d5: ldloc.s V_14 - IL_01d7: ldloc.s V_14 - IL_01d9: ldloc.s V_14 - IL_01db: ldloc.s V_14 - IL_01dd: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Ordering01::get_products() - IL_01e2: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Source(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_01e7: ldloc.s V_14 - IL_01e9: newobj instance void Linq101Ordering01/sortedProducts3@60::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_01ee: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_01d5: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Ordering01::get_products() + IL_01da: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Source(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_01df: ldloc.s V_14 + IL_01e1: newobj instance void Linq101Ordering01/sortedProducts3@60::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_01e6: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_01f3: newobj instance void Linq101Ordering01/'sortedProducts3@61-1'::.ctor() - IL_01f8: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::SortBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_01eb: newobj instance void Linq101Ordering01/'sortedProducts3@61-1'::.ctor() + IL_01f0: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::SortBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_01fd: newobj instance void Linq101Ordering01/'sortedProducts3@62-2'::.ctor() - IL_0202: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::ThenByDescending(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_01f5: newobj instance void Linq101Ordering01/'sortedProducts3@62-2'::.ctor() + IL_01fa: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::ThenByDescending(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0207: newobj instance void Linq101Ordering01/'sortedProducts3@63-3'::.ctor() - IL_020c: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_01ff: newobj instance void Linq101Ordering01/'sortedProducts3@63-3'::.ctor() + IL_0204: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0211: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() - IL_0216: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_021b: dup - IL_021c: stsfld class [Utils]Utils/Product[] ''.$Linq101Ordering01::sortedProducts3@58 - IL_0221: stloc.s sortedProducts3 - IL_0223: ret + IL_0209: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() + IL_020e: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0213: dup + IL_0214: stsfld class [Utils]Utils/Product[] ''.$Linq101Ordering01::sortedProducts3@58 + IL_0219: stloc.s sortedProducts3 + IL_021b: ret } // end of method $Linq101Ordering01::main@ } // end of class ''.$Linq101Ordering01 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Partitioning01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Partitioning01.il.bsl index c94810a403e..b210d7f3c90 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Partitioning01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Partitioning01.il.bsl @@ -13,7 +13,7 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 4:4:1:0 + .ver 4:5:0:0 } .assembly extern Utils { @@ -33,20 +33,20 @@ } .mresource public FSharpSignatureData.Linq101Partitioning01 { - // Offset: 0x00000000 Length: 0x000003BC + // Offset: 0x00000000 Length: 0x000003DE } .mresource public FSharpOptimizationData.Linq101Partitioning01 { - // Offset: 0x000003C0 Length: 0x00000138 + // Offset: 0x000003E8 Length: 0x00000138 } .module Linq101Partitioning01.exe -// MVID: {5A1F62A6-B280-A6A2-A745-0383A6621F5A} +// MVID: {5B9A632A-B280-A6A2-A745-03832A639A5B} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x006A0000 +// Image base: 0x00AF0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -59,11 +59,6 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) - .field public int32 _arg1 - .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 ) - .field public int32 n .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' .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 ) @@ -77,41 +72,35 @@ .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 specialname rtspecialname - instance void .ctor(int32 _arg1, - int32 n, - class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', int32 pc, int32 current) cil managed { - // Code size 44 (0x2c) + // Code size 28 (0x1c) .maxstack 8 IL_0000: ldarg.0 IL_0001: ldarg.1 - IL_0002: stfld int32 Linq101Partitioning01/first3Numbers@12::_arg1 + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/first3Numbers@12::'enum' IL_0007: ldarg.0 IL_0008: ldarg.2 - IL_0009: stfld int32 Linq101Partitioning01/first3Numbers@12::n + IL_0009: stfld int32 Linq101Partitioning01/first3Numbers@12::pc IL_000e: ldarg.0 IL_000f: ldarg.3 - IL_0010: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/first3Numbers@12::'enum' + IL_0010: stfld int32 Linq101Partitioning01/first3Numbers@12::current IL_0015: ldarg.0 - IL_0016: ldarg.s pc - IL_0018: stfld int32 Linq101Partitioning01/first3Numbers@12::pc - IL_001d: ldarg.0 - IL_001e: ldarg.s current - IL_0020: stfld int32 Linq101Partitioning01/first3Numbers@12::current - IL_0025: ldarg.0 - IL_0026: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() - IL_002b: ret + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_001b: ret } // end of method first3Numbers@12::.ctor .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 191 (0xbf) + // Code size 154 (0x9a) .maxstack 6 + .locals init ([0] int32 V_0, + [1] int32 n) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 100001,100001 : 0,0 'C:\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\QueryExpressionStepping\\Linq101Partitioning01.fs' + .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\QueryExpressionStepping\\Linq101Partitioning01.fs' IL_0000: ldarg.0 IL_0001: ldfld int32 Linq101Partitioning01/first3Numbers@12::pc IL_0006: ldc.i4.1 @@ -120,7 +109,7 @@ IL_001b, IL_001d, IL_001f) - IL_0019: br.s IL_002d + IL_0019: br.s IL_002a IL_001b: br.s IL_0021 @@ -130,203 +119,190 @@ .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br.s IL_0095 + IL_0022: br.s IL_0070 .line 100001,100001 : 0,0 '' IL_0024: nop - IL_0025: br.s IL_0084 + IL_0025: br.s IL_006d .line 100001,100001 : 0,0 '' IL_0027: nop - IL_0028: br IL_00b6 + IL_0028: br.s IL_0091 .line 100001,100001 : 0,0 '' - IL_002d: nop + IL_002a: nop .line 12,12 : 9,28 '' - IL_002e: ldarg.0 - IL_002f: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Partitioning01::get_numbers() - IL_0034: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0039: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/first3Numbers@12::'enum' - IL_003e: ldarg.0 - IL_003f: ldc.i4.1 - IL_0040: stfld int32 Linq101Partitioning01/first3Numbers@12::pc + IL_002b: ldarg.0 + IL_002c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Partitioning01::get_numbers() + IL_0031: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0036: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/first3Numbers@12::'enum' + IL_003b: ldarg.0 + IL_003c: ldc.i4.1 + IL_003d: stfld int32 Linq101Partitioning01/first3Numbers@12::pc .line 12,12 : 9,28 '' - IL_0045: ldarg.0 - IL_0046: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/first3Numbers@12::'enum' - IL_004b: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0050: brfalse.s IL_0095 - - IL_0052: ldarg.0 - IL_0053: ldarg.0 - IL_0054: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/first3Numbers@12::'enum' - IL_0059: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_005e: stfld int32 Linq101Partitioning01/first3Numbers@12::_arg1 + IL_0042: ldarg.0 + IL_0043: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/first3Numbers@12::'enum' + IL_0048: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_004d: brfalse.s IL_0070 + + IL_004f: ldarg.0 + IL_0050: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/first3Numbers@12::'enum' + IL_0055: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_005a: stloc.0 .line 12,12 : 9,28 '' - IL_0063: ldarg.0 - IL_0064: ldarg.0 - IL_0065: ldfld int32 Linq101Partitioning01/first3Numbers@12::_arg1 - IL_006a: stfld int32 Linq101Partitioning01/first3Numbers@12::n - IL_006f: ldarg.0 - IL_0070: ldc.i4.2 - IL_0071: stfld int32 Linq101Partitioning01/first3Numbers@12::pc + IL_005b: ldloc.0 + IL_005c: stloc.1 + IL_005d: ldarg.0 + IL_005e: ldc.i4.2 + IL_005f: stfld int32 Linq101Partitioning01/first3Numbers@12::pc .line 13,13 : 9,15 '' - IL_0076: ldarg.0 - IL_0077: ldarg.0 - IL_0078: ldfld int32 Linq101Partitioning01/first3Numbers@12::n - IL_007d: stfld int32 Linq101Partitioning01/first3Numbers@12::current - IL_0082: ldc.i4.1 - IL_0083: ret - - IL_0084: ldarg.0 - IL_0085: ldc.i4.0 - IL_0086: stfld int32 Linq101Partitioning01/first3Numbers@12::n - .line 12,12 : 9,28 '' - IL_008b: ldarg.0 - IL_008c: ldc.i4.0 - IL_008d: stfld int32 Linq101Partitioning01/first3Numbers@12::_arg1 + IL_0064: ldarg.0 + IL_0065: ldloc.1 + IL_0066: stfld int32 Linq101Partitioning01/first3Numbers@12::current + IL_006b: ldc.i4.1 + IL_006c: ret + .line 100001,100001 : 0,0 '' - IL_0092: nop - IL_0093: br.s IL_0045 + IL_006d: nop + IL_006e: br.s IL_0042 - IL_0095: ldarg.0 - IL_0096: ldc.i4.3 - IL_0097: stfld int32 Linq101Partitioning01/first3Numbers@12::pc + IL_0070: ldarg.0 + IL_0071: ldc.i4.3 + IL_0072: stfld int32 Linq101Partitioning01/first3Numbers@12::pc .line 12,12 : 9,28 '' - IL_009c: ldarg.0 - IL_009d: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/first3Numbers@12::'enum' - IL_00a2: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_00a7: nop - IL_00a8: ldarg.0 - IL_00a9: ldnull - IL_00aa: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/first3Numbers@12::'enum' - IL_00af: ldarg.0 - IL_00b0: ldc.i4.3 - IL_00b1: stfld int32 Linq101Partitioning01/first3Numbers@12::pc - IL_00b6: ldarg.0 - IL_00b7: ldc.i4.0 - IL_00b8: stfld int32 Linq101Partitioning01/first3Numbers@12::current - IL_00bd: ldc.i4.0 - IL_00be: ret + IL_0077: ldarg.0 + IL_0078: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/first3Numbers@12::'enum' + IL_007d: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0082: nop + IL_0083: ldarg.0 + IL_0084: ldnull + IL_0085: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/first3Numbers@12::'enum' + IL_008a: ldarg.0 + IL_008b: ldc.i4.3 + IL_008c: stfld int32 Linq101Partitioning01/first3Numbers@12::pc + IL_0091: ldarg.0 + IL_0092: ldc.i4.0 + IL_0093: stfld int32 Linq101Partitioning01/first3Numbers@12::current + IL_0098: ldc.i4.0 + IL_0099: ret } // end of method first3Numbers@12::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 150 (0x96) + // Code size 148 (0x94) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [FSharp.Core]Microsoft.FSharp.Core.Unit V_1, [2] class [mscorlib]System.Exception e) .line 100001,100001 : 0,0 '' - IL_0000: ldnull - IL_0001: stloc.0 - IL_0002: ldarg.0 - IL_0003: ldfld int32 Linq101Partitioning01/first3Numbers@12::pc - IL_0008: ldc.i4.3 - IL_0009: sub - IL_000a: switch ( - IL_0015) - IL_0013: br.s IL_001b + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Partitioning01/first3Numbers@12::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0019 .line 100001,100001 : 0,0 '' - IL_0015: nop - IL_0016: br IL_0089 + IL_0013: nop + IL_0014: br IL_0087 .line 100001,100001 : 0,0 '' - IL_001b: nop + IL_0019: nop .try { - IL_001c: ldarg.0 - IL_001d: ldfld int32 Linq101Partitioning01/first3Numbers@12::pc - IL_0022: switch ( + IL_001a: ldarg.0 + IL_001b: ldfld int32 Linq101Partitioning01/first3Numbers@12::pc + IL_0020: switch ( + IL_0037, IL_0039, IL_003b, - IL_003d, - IL_003f) - IL_0037: br.s IL_004d + IL_003d) + IL_0035: br.s IL_004b - IL_0039: br.s IL_0041 + IL_0037: br.s IL_003f - IL_003b: br.s IL_0044 + IL_0039: br.s IL_0042 - IL_003d: br.s IL_0047 + IL_003b: br.s IL_0045 - IL_003f: br.s IL_004a + IL_003d: br.s IL_0048 .line 100001,100001 : 0,0 '' - IL_0041: nop - IL_0042: br.s IL_0063 + IL_003f: nop + IL_0040: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_0044: nop - IL_0045: br.s IL_004f + IL_0042: nop + IL_0043: br.s IL_004d .line 100001,100001 : 0,0 '' - IL_0047: nop - IL_0048: br.s IL_004e + IL_0045: nop + IL_0046: br.s IL_004c .line 100001,100001 : 0,0 '' - IL_004a: nop - IL_004b: br.s IL_0063 + IL_0048: nop + IL_0049: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_004d: nop + IL_004b: nop .line 100001,100001 : 0,0 '' - IL_004e: nop - IL_004f: ldarg.0 - IL_0050: ldc.i4.3 - IL_0051: stfld int32 Linq101Partitioning01/first3Numbers@12::pc - IL_0056: ldarg.0 - IL_0057: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/first3Numbers@12::'enum' - IL_005c: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_0061: nop + IL_004c: nop + IL_004d: ldarg.0 + IL_004e: ldc.i4.3 + IL_004f: stfld int32 Linq101Partitioning01/first3Numbers@12::pc + IL_0054: ldarg.0 + IL_0055: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/first3Numbers@12::'enum' + IL_005a: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_005f: nop .line 100001,100001 : 0,0 '' - IL_0062: nop - IL_0063: ldarg.0 - IL_0064: ldc.i4.3 - IL_0065: stfld int32 Linq101Partitioning01/first3Numbers@12::pc - IL_006a: ldarg.0 - IL_006b: ldc.i4.0 - IL_006c: stfld int32 Linq101Partitioning01/first3Numbers@12::current - IL_0071: ldnull - IL_0072: stloc.1 - IL_0073: leave.s IL_0081 + IL_0060: nop + IL_0061: ldarg.0 + IL_0062: ldc.i4.3 + IL_0063: stfld int32 Linq101Partitioning01/first3Numbers@12::pc + IL_0068: ldarg.0 + IL_0069: ldc.i4.0 + IL_006a: stfld int32 Linq101Partitioning01/first3Numbers@12::current + IL_006f: ldnull + IL_0070: stloc.1 + IL_0071: leave.s IL_007f } // end .try catch [mscorlib]System.Object { - IL_0075: castclass [mscorlib]System.Exception - IL_007a: stloc.2 + IL_0073: castclass [mscorlib]System.Exception + IL_0078: stloc.2 .line 12,12 : 9,28 '' - IL_007b: ldloc.2 - IL_007c: stloc.0 - IL_007d: ldnull - IL_007e: stloc.1 - IL_007f: leave.s IL_0081 + IL_0079: ldloc.2 + IL_007a: stloc.0 + IL_007b: ldnull + IL_007c: stloc.1 + IL_007d: leave.s IL_007f .line 100001,100001 : 0,0 '' } // end handler - IL_0081: ldloc.1 - IL_0082: pop + IL_007f: ldloc.1 + IL_0080: pop .line 100001,100001 : 0,0 '' - IL_0083: nop - IL_0084: br IL_0002 + IL_0081: nop + IL_0082: br IL_0000 - IL_0089: ldloc.0 - IL_008a: ldnull - IL_008b: cgt.un - IL_008d: brfalse.s IL_0091 + IL_0087: ldloc.0 + IL_0088: ldnull + IL_0089: cgt.un + IL_008b: brfalse.s IL_008f - IL_008f: br.s IL_0093 + IL_008d: br.s IL_0091 - IL_0091: br.s IL_0095 + IL_008f: br.s IL_0093 .line 100001,100001 : 0,0 '' - IL_0093: ldloc.0 - IL_0094: throw + IL_0091: ldloc.0 + IL_0092: throw .line 100001,100001 : 0,0 '' - IL_0095: ret + IL_0093: ret } // end of method first3Numbers@12::Close .method public strict virtual instance bool @@ -397,19 +373,15 @@ { .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 ) - // Code size 11 (0xb) - .maxstack 9 - IL_0000: ldc.i4.0 + // Code size 9 (0x9) + .maxstack 8 + IL_0000: ldnull IL_0001: ldc.i4.0 - IL_0002: ldnull - IL_0003: ldc.i4.0 - IL_0004: ldc.i4.0 - IL_0005: newobj instance void Linq101Partitioning01/first3Numbers@12::.ctor(int32, - int32, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0002: ldc.i4.0 + IL_0003: newobj instance void Linq101Partitioning01/first3Numbers@12::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, int32) - IL_000a: ret + IL_0008: ret } // end of method first3Numbers@12::GetFreshEnumerator } // end of class first3Numbers@12 @@ -605,11 +577,6 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) - .field public int32 _arg1 - .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 ) - .field public int32 n .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' .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 ) @@ -623,39 +590,33 @@ .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 specialname rtspecialname - instance void .ctor(int32 _arg1, - int32 n, - class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', int32 pc, int32 current) cil managed { - // Code size 44 (0x2c) + // Code size 28 (0x1c) .maxstack 8 IL_0000: ldarg.0 IL_0001: ldarg.1 - IL_0002: stfld int32 Linq101Partitioning01/allButFirst4Numbers@29::_arg1 + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/allButFirst4Numbers@29::'enum' IL_0007: ldarg.0 IL_0008: ldarg.2 - IL_0009: stfld int32 Linq101Partitioning01/allButFirst4Numbers@29::n + IL_0009: stfld int32 Linq101Partitioning01/allButFirst4Numbers@29::pc IL_000e: ldarg.0 IL_000f: ldarg.3 - IL_0010: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/allButFirst4Numbers@29::'enum' + IL_0010: stfld int32 Linq101Partitioning01/allButFirst4Numbers@29::current IL_0015: ldarg.0 - IL_0016: ldarg.s pc - IL_0018: stfld int32 Linq101Partitioning01/allButFirst4Numbers@29::pc - IL_001d: ldarg.0 - IL_001e: ldarg.s current - IL_0020: stfld int32 Linq101Partitioning01/allButFirst4Numbers@29::current - IL_0025: ldarg.0 - IL_0026: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() - IL_002b: ret + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_001b: ret } // end of method allButFirst4Numbers@29::.ctor .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 191 (0xbf) + // Code size 154 (0x9a) .maxstack 6 + .locals init ([0] int32 V_0, + [1] int32 n) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 IL_0001: ldfld int32 Linq101Partitioning01/allButFirst4Numbers@29::pc @@ -665,7 +626,7 @@ IL_001b, IL_001d, IL_001f) - IL_0019: br.s IL_002d + IL_0019: br.s IL_002a IL_001b: br.s IL_0021 @@ -675,203 +636,190 @@ .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br.s IL_0095 + IL_0022: br.s IL_0070 .line 100001,100001 : 0,0 '' IL_0024: nop - IL_0025: br.s IL_0084 + IL_0025: br.s IL_006d .line 100001,100001 : 0,0 '' IL_0027: nop - IL_0028: br IL_00b6 + IL_0028: br.s IL_0091 .line 100001,100001 : 0,0 '' - IL_002d: nop + IL_002a: nop .line 29,29 : 9,28 '' - IL_002e: ldarg.0 - IL_002f: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Partitioning01::get_numbers() - IL_0034: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0039: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/allButFirst4Numbers@29::'enum' - IL_003e: ldarg.0 - IL_003f: ldc.i4.1 - IL_0040: stfld int32 Linq101Partitioning01/allButFirst4Numbers@29::pc + IL_002b: ldarg.0 + IL_002c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Partitioning01::get_numbers() + IL_0031: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0036: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/allButFirst4Numbers@29::'enum' + IL_003b: ldarg.0 + IL_003c: ldc.i4.1 + IL_003d: stfld int32 Linq101Partitioning01/allButFirst4Numbers@29::pc .line 29,29 : 9,28 '' - IL_0045: ldarg.0 - IL_0046: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/allButFirst4Numbers@29::'enum' - IL_004b: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0050: brfalse.s IL_0095 - - IL_0052: ldarg.0 - IL_0053: ldarg.0 - IL_0054: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/allButFirst4Numbers@29::'enum' - IL_0059: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_005e: stfld int32 Linq101Partitioning01/allButFirst4Numbers@29::_arg1 + IL_0042: ldarg.0 + IL_0043: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/allButFirst4Numbers@29::'enum' + IL_0048: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_004d: brfalse.s IL_0070 + + IL_004f: ldarg.0 + IL_0050: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/allButFirst4Numbers@29::'enum' + IL_0055: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_005a: stloc.0 .line 29,29 : 9,28 '' - IL_0063: ldarg.0 - IL_0064: ldarg.0 - IL_0065: ldfld int32 Linq101Partitioning01/allButFirst4Numbers@29::_arg1 - IL_006a: stfld int32 Linq101Partitioning01/allButFirst4Numbers@29::n - IL_006f: ldarg.0 - IL_0070: ldc.i4.2 - IL_0071: stfld int32 Linq101Partitioning01/allButFirst4Numbers@29::pc + IL_005b: ldloc.0 + IL_005c: stloc.1 + IL_005d: ldarg.0 + IL_005e: ldc.i4.2 + IL_005f: stfld int32 Linq101Partitioning01/allButFirst4Numbers@29::pc .line 30,30 : 9,15 '' - IL_0076: ldarg.0 - IL_0077: ldarg.0 - IL_0078: ldfld int32 Linq101Partitioning01/allButFirst4Numbers@29::n - IL_007d: stfld int32 Linq101Partitioning01/allButFirst4Numbers@29::current - IL_0082: ldc.i4.1 - IL_0083: ret - - IL_0084: ldarg.0 - IL_0085: ldc.i4.0 - IL_0086: stfld int32 Linq101Partitioning01/allButFirst4Numbers@29::n - .line 29,29 : 9,28 '' - IL_008b: ldarg.0 - IL_008c: ldc.i4.0 - IL_008d: stfld int32 Linq101Partitioning01/allButFirst4Numbers@29::_arg1 + IL_0064: ldarg.0 + IL_0065: ldloc.1 + IL_0066: stfld int32 Linq101Partitioning01/allButFirst4Numbers@29::current + IL_006b: ldc.i4.1 + IL_006c: ret + .line 100001,100001 : 0,0 '' - IL_0092: nop - IL_0093: br.s IL_0045 + IL_006d: nop + IL_006e: br.s IL_0042 - IL_0095: ldarg.0 - IL_0096: ldc.i4.3 - IL_0097: stfld int32 Linq101Partitioning01/allButFirst4Numbers@29::pc + IL_0070: ldarg.0 + IL_0071: ldc.i4.3 + IL_0072: stfld int32 Linq101Partitioning01/allButFirst4Numbers@29::pc .line 29,29 : 9,28 '' - IL_009c: ldarg.0 - IL_009d: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/allButFirst4Numbers@29::'enum' - IL_00a2: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_00a7: nop - IL_00a8: ldarg.0 - IL_00a9: ldnull - IL_00aa: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/allButFirst4Numbers@29::'enum' - IL_00af: ldarg.0 - IL_00b0: ldc.i4.3 - IL_00b1: stfld int32 Linq101Partitioning01/allButFirst4Numbers@29::pc - IL_00b6: ldarg.0 - IL_00b7: ldc.i4.0 - IL_00b8: stfld int32 Linq101Partitioning01/allButFirst4Numbers@29::current - IL_00bd: ldc.i4.0 - IL_00be: ret + IL_0077: ldarg.0 + IL_0078: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/allButFirst4Numbers@29::'enum' + IL_007d: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0082: nop + IL_0083: ldarg.0 + IL_0084: ldnull + IL_0085: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/allButFirst4Numbers@29::'enum' + IL_008a: ldarg.0 + IL_008b: ldc.i4.3 + IL_008c: stfld int32 Linq101Partitioning01/allButFirst4Numbers@29::pc + IL_0091: ldarg.0 + IL_0092: ldc.i4.0 + IL_0093: stfld int32 Linq101Partitioning01/allButFirst4Numbers@29::current + IL_0098: ldc.i4.0 + IL_0099: ret } // end of method allButFirst4Numbers@29::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 150 (0x96) + // Code size 148 (0x94) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [FSharp.Core]Microsoft.FSharp.Core.Unit V_1, [2] class [mscorlib]System.Exception e) .line 100001,100001 : 0,0 '' - IL_0000: ldnull - IL_0001: stloc.0 - IL_0002: ldarg.0 - IL_0003: ldfld int32 Linq101Partitioning01/allButFirst4Numbers@29::pc - IL_0008: ldc.i4.3 - IL_0009: sub - IL_000a: switch ( - IL_0015) - IL_0013: br.s IL_001b + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Partitioning01/allButFirst4Numbers@29::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0019 .line 100001,100001 : 0,0 '' - IL_0015: nop - IL_0016: br IL_0089 + IL_0013: nop + IL_0014: br IL_0087 .line 100001,100001 : 0,0 '' - IL_001b: nop + IL_0019: nop .try { - IL_001c: ldarg.0 - IL_001d: ldfld int32 Linq101Partitioning01/allButFirst4Numbers@29::pc - IL_0022: switch ( + IL_001a: ldarg.0 + IL_001b: ldfld int32 Linq101Partitioning01/allButFirst4Numbers@29::pc + IL_0020: switch ( + IL_0037, IL_0039, IL_003b, - IL_003d, - IL_003f) - IL_0037: br.s IL_004d + IL_003d) + IL_0035: br.s IL_004b - IL_0039: br.s IL_0041 + IL_0037: br.s IL_003f - IL_003b: br.s IL_0044 + IL_0039: br.s IL_0042 - IL_003d: br.s IL_0047 + IL_003b: br.s IL_0045 - IL_003f: br.s IL_004a + IL_003d: br.s IL_0048 .line 100001,100001 : 0,0 '' - IL_0041: nop - IL_0042: br.s IL_0063 + IL_003f: nop + IL_0040: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_0044: nop - IL_0045: br.s IL_004f + IL_0042: nop + IL_0043: br.s IL_004d .line 100001,100001 : 0,0 '' - IL_0047: nop - IL_0048: br.s IL_004e + IL_0045: nop + IL_0046: br.s IL_004c .line 100001,100001 : 0,0 '' - IL_004a: nop - IL_004b: br.s IL_0063 + IL_0048: nop + IL_0049: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_004d: nop + IL_004b: nop .line 100001,100001 : 0,0 '' - IL_004e: nop - IL_004f: ldarg.0 - IL_0050: ldc.i4.3 - IL_0051: stfld int32 Linq101Partitioning01/allButFirst4Numbers@29::pc - IL_0056: ldarg.0 - IL_0057: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/allButFirst4Numbers@29::'enum' - IL_005c: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_0061: nop + IL_004c: nop + IL_004d: ldarg.0 + IL_004e: ldc.i4.3 + IL_004f: stfld int32 Linq101Partitioning01/allButFirst4Numbers@29::pc + IL_0054: ldarg.0 + IL_0055: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/allButFirst4Numbers@29::'enum' + IL_005a: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_005f: nop .line 100001,100001 : 0,0 '' - IL_0062: nop - IL_0063: ldarg.0 - IL_0064: ldc.i4.3 - IL_0065: stfld int32 Linq101Partitioning01/allButFirst4Numbers@29::pc - IL_006a: ldarg.0 - IL_006b: ldc.i4.0 - IL_006c: stfld int32 Linq101Partitioning01/allButFirst4Numbers@29::current - IL_0071: ldnull - IL_0072: stloc.1 - IL_0073: leave.s IL_0081 + IL_0060: nop + IL_0061: ldarg.0 + IL_0062: ldc.i4.3 + IL_0063: stfld int32 Linq101Partitioning01/allButFirst4Numbers@29::pc + IL_0068: ldarg.0 + IL_0069: ldc.i4.0 + IL_006a: stfld int32 Linq101Partitioning01/allButFirst4Numbers@29::current + IL_006f: ldnull + IL_0070: stloc.1 + IL_0071: leave.s IL_007f } // end .try catch [mscorlib]System.Object { - IL_0075: castclass [mscorlib]System.Exception - IL_007a: stloc.2 + IL_0073: castclass [mscorlib]System.Exception + IL_0078: stloc.2 .line 29,29 : 9,28 '' - IL_007b: ldloc.2 - IL_007c: stloc.0 - IL_007d: ldnull - IL_007e: stloc.1 - IL_007f: leave.s IL_0081 + IL_0079: ldloc.2 + IL_007a: stloc.0 + IL_007b: ldnull + IL_007c: stloc.1 + IL_007d: leave.s IL_007f .line 100001,100001 : 0,0 '' } // end handler - IL_0081: ldloc.1 - IL_0082: pop + IL_007f: ldloc.1 + IL_0080: pop .line 100001,100001 : 0,0 '' - IL_0083: nop - IL_0084: br IL_0002 + IL_0081: nop + IL_0082: br IL_0000 - IL_0089: ldloc.0 - IL_008a: ldnull - IL_008b: cgt.un - IL_008d: brfalse.s IL_0091 + IL_0087: ldloc.0 + IL_0088: ldnull + IL_0089: cgt.un + IL_008b: brfalse.s IL_008f - IL_008f: br.s IL_0093 + IL_008d: br.s IL_0091 - IL_0091: br.s IL_0095 + IL_008f: br.s IL_0093 .line 100001,100001 : 0,0 '' - IL_0093: ldloc.0 - IL_0094: throw + IL_0091: ldloc.0 + IL_0092: throw .line 100001,100001 : 0,0 '' - IL_0095: ret + IL_0093: ret } // end of method allButFirst4Numbers@29::Close .method public strict virtual instance bool @@ -942,19 +890,15 @@ { .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 ) - // Code size 11 (0xb) - .maxstack 9 - IL_0000: ldc.i4.0 + // Code size 9 (0x9) + .maxstack 8 + IL_0000: ldnull IL_0001: ldc.i4.0 - IL_0002: ldnull - IL_0003: ldc.i4.0 - IL_0004: ldc.i4.0 - IL_0005: newobj instance void Linq101Partitioning01/allButFirst4Numbers@29::.ctor(int32, - int32, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0002: ldc.i4.0 + IL_0003: newobj instance void Linq101Partitioning01/allButFirst4Numbers@29::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, int32) - IL_000a: ret + IL_0008: ret } // end of method allButFirst4Numbers@29::GetFreshEnumerator } // end of class allButFirst4Numbers@29 @@ -1150,11 +1094,6 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) - .field public int32 _arg1 - .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 ) - .field public int32 n .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' .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 ) @@ -1168,39 +1107,33 @@ .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 specialname rtspecialname - instance void .ctor(int32 _arg1, - int32 n, - class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', int32 pc, int32 current) cil managed { - // Code size 44 (0x2c) + // Code size 28 (0x1c) .maxstack 8 IL_0000: ldarg.0 IL_0001: ldarg.1 - IL_0002: stfld int32 Linq101Partitioning01/firstNumbersLessThan6@45::_arg1 + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/firstNumbersLessThan6@45::'enum' IL_0007: ldarg.0 IL_0008: ldarg.2 - IL_0009: stfld int32 Linq101Partitioning01/firstNumbersLessThan6@45::n + IL_0009: stfld int32 Linq101Partitioning01/firstNumbersLessThan6@45::pc IL_000e: ldarg.0 IL_000f: ldarg.3 - IL_0010: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/firstNumbersLessThan6@45::'enum' + IL_0010: stfld int32 Linq101Partitioning01/firstNumbersLessThan6@45::current IL_0015: ldarg.0 - IL_0016: ldarg.s pc - IL_0018: stfld int32 Linq101Partitioning01/firstNumbersLessThan6@45::pc - IL_001d: ldarg.0 - IL_001e: ldarg.s current - IL_0020: stfld int32 Linq101Partitioning01/firstNumbersLessThan6@45::current - IL_0025: ldarg.0 - IL_0026: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() - IL_002b: ret + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_001b: ret } // end of method firstNumbersLessThan6@45::.ctor .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 191 (0xbf) + // Code size 154 (0x9a) .maxstack 6 + .locals init ([0] int32 V_0, + [1] int32 n) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 IL_0001: ldfld int32 Linq101Partitioning01/firstNumbersLessThan6@45::pc @@ -1210,7 +1143,7 @@ IL_001b, IL_001d, IL_001f) - IL_0019: br.s IL_002d + IL_0019: br.s IL_002a IL_001b: br.s IL_0021 @@ -1220,203 +1153,190 @@ .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br.s IL_0095 + IL_0022: br.s IL_0070 .line 100001,100001 : 0,0 '' IL_0024: nop - IL_0025: br.s IL_0084 + IL_0025: br.s IL_006d .line 100001,100001 : 0,0 '' IL_0027: nop - IL_0028: br IL_00b6 + IL_0028: br.s IL_0091 .line 100001,100001 : 0,0 '' - IL_002d: nop + IL_002a: nop .line 45,45 : 9,28 '' - IL_002e: ldarg.0 - IL_002f: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Partitioning01::get_numbers() - IL_0034: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0039: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/firstNumbersLessThan6@45::'enum' - IL_003e: ldarg.0 - IL_003f: ldc.i4.1 - IL_0040: stfld int32 Linq101Partitioning01/firstNumbersLessThan6@45::pc + IL_002b: ldarg.0 + IL_002c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Partitioning01::get_numbers() + IL_0031: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0036: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/firstNumbersLessThan6@45::'enum' + IL_003b: ldarg.0 + IL_003c: ldc.i4.1 + IL_003d: stfld int32 Linq101Partitioning01/firstNumbersLessThan6@45::pc .line 45,45 : 9,28 '' - IL_0045: ldarg.0 - IL_0046: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/firstNumbersLessThan6@45::'enum' - IL_004b: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0050: brfalse.s IL_0095 - - IL_0052: ldarg.0 - IL_0053: ldarg.0 - IL_0054: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/firstNumbersLessThan6@45::'enum' - IL_0059: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_005e: stfld int32 Linq101Partitioning01/firstNumbersLessThan6@45::_arg1 + IL_0042: ldarg.0 + IL_0043: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/firstNumbersLessThan6@45::'enum' + IL_0048: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_004d: brfalse.s IL_0070 + + IL_004f: ldarg.0 + IL_0050: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/firstNumbersLessThan6@45::'enum' + IL_0055: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_005a: stloc.0 .line 45,45 : 9,28 '' - IL_0063: ldarg.0 - IL_0064: ldarg.0 - IL_0065: ldfld int32 Linq101Partitioning01/firstNumbersLessThan6@45::_arg1 - IL_006a: stfld int32 Linq101Partitioning01/firstNumbersLessThan6@45::n - IL_006f: ldarg.0 - IL_0070: ldc.i4.2 - IL_0071: stfld int32 Linq101Partitioning01/firstNumbersLessThan6@45::pc + IL_005b: ldloc.0 + IL_005c: stloc.1 + IL_005d: ldarg.0 + IL_005e: ldc.i4.2 + IL_005f: stfld int32 Linq101Partitioning01/firstNumbersLessThan6@45::pc .line 46,46 : 9,26 '' - IL_0076: ldarg.0 - IL_0077: ldarg.0 - IL_0078: ldfld int32 Linq101Partitioning01/firstNumbersLessThan6@45::n - IL_007d: stfld int32 Linq101Partitioning01/firstNumbersLessThan6@45::current - IL_0082: ldc.i4.1 - IL_0083: ret - - IL_0084: ldarg.0 - IL_0085: ldc.i4.0 - IL_0086: stfld int32 Linq101Partitioning01/firstNumbersLessThan6@45::n - .line 45,45 : 9,28 '' - IL_008b: ldarg.0 - IL_008c: ldc.i4.0 - IL_008d: stfld int32 Linq101Partitioning01/firstNumbersLessThan6@45::_arg1 + IL_0064: ldarg.0 + IL_0065: ldloc.1 + IL_0066: stfld int32 Linq101Partitioning01/firstNumbersLessThan6@45::current + IL_006b: ldc.i4.1 + IL_006c: ret + .line 100001,100001 : 0,0 '' - IL_0092: nop - IL_0093: br.s IL_0045 + IL_006d: nop + IL_006e: br.s IL_0042 - IL_0095: ldarg.0 - IL_0096: ldc.i4.3 - IL_0097: stfld int32 Linq101Partitioning01/firstNumbersLessThan6@45::pc + IL_0070: ldarg.0 + IL_0071: ldc.i4.3 + IL_0072: stfld int32 Linq101Partitioning01/firstNumbersLessThan6@45::pc .line 45,45 : 9,28 '' - IL_009c: ldarg.0 - IL_009d: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/firstNumbersLessThan6@45::'enum' - IL_00a2: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_00a7: nop - IL_00a8: ldarg.0 - IL_00a9: ldnull - IL_00aa: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/firstNumbersLessThan6@45::'enum' - IL_00af: ldarg.0 - IL_00b0: ldc.i4.3 - IL_00b1: stfld int32 Linq101Partitioning01/firstNumbersLessThan6@45::pc - IL_00b6: ldarg.0 - IL_00b7: ldc.i4.0 - IL_00b8: stfld int32 Linq101Partitioning01/firstNumbersLessThan6@45::current - IL_00bd: ldc.i4.0 - IL_00be: ret + IL_0077: ldarg.0 + IL_0078: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/firstNumbersLessThan6@45::'enum' + IL_007d: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0082: nop + IL_0083: ldarg.0 + IL_0084: ldnull + IL_0085: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/firstNumbersLessThan6@45::'enum' + IL_008a: ldarg.0 + IL_008b: ldc.i4.3 + IL_008c: stfld int32 Linq101Partitioning01/firstNumbersLessThan6@45::pc + IL_0091: ldarg.0 + IL_0092: ldc.i4.0 + IL_0093: stfld int32 Linq101Partitioning01/firstNumbersLessThan6@45::current + IL_0098: ldc.i4.0 + IL_0099: ret } // end of method firstNumbersLessThan6@45::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 150 (0x96) + // Code size 148 (0x94) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [FSharp.Core]Microsoft.FSharp.Core.Unit V_1, [2] class [mscorlib]System.Exception e) .line 100001,100001 : 0,0 '' - IL_0000: ldnull - IL_0001: stloc.0 - IL_0002: ldarg.0 - IL_0003: ldfld int32 Linq101Partitioning01/firstNumbersLessThan6@45::pc - IL_0008: ldc.i4.3 - IL_0009: sub - IL_000a: switch ( - IL_0015) - IL_0013: br.s IL_001b + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Partitioning01/firstNumbersLessThan6@45::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0019 .line 100001,100001 : 0,0 '' - IL_0015: nop - IL_0016: br IL_0089 + IL_0013: nop + IL_0014: br IL_0087 .line 100001,100001 : 0,0 '' - IL_001b: nop + IL_0019: nop .try { - IL_001c: ldarg.0 - IL_001d: ldfld int32 Linq101Partitioning01/firstNumbersLessThan6@45::pc - IL_0022: switch ( + IL_001a: ldarg.0 + IL_001b: ldfld int32 Linq101Partitioning01/firstNumbersLessThan6@45::pc + IL_0020: switch ( + IL_0037, IL_0039, IL_003b, - IL_003d, - IL_003f) - IL_0037: br.s IL_004d + IL_003d) + IL_0035: br.s IL_004b - IL_0039: br.s IL_0041 + IL_0037: br.s IL_003f - IL_003b: br.s IL_0044 + IL_0039: br.s IL_0042 - IL_003d: br.s IL_0047 + IL_003b: br.s IL_0045 - IL_003f: br.s IL_004a + IL_003d: br.s IL_0048 .line 100001,100001 : 0,0 '' - IL_0041: nop - IL_0042: br.s IL_0063 + IL_003f: nop + IL_0040: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_0044: nop - IL_0045: br.s IL_004f + IL_0042: nop + IL_0043: br.s IL_004d .line 100001,100001 : 0,0 '' - IL_0047: nop - IL_0048: br.s IL_004e + IL_0045: nop + IL_0046: br.s IL_004c .line 100001,100001 : 0,0 '' - IL_004a: nop - IL_004b: br.s IL_0063 + IL_0048: nop + IL_0049: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_004d: nop + IL_004b: nop .line 100001,100001 : 0,0 '' - IL_004e: nop - IL_004f: ldarg.0 - IL_0050: ldc.i4.3 - IL_0051: stfld int32 Linq101Partitioning01/firstNumbersLessThan6@45::pc - IL_0056: ldarg.0 - IL_0057: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/firstNumbersLessThan6@45::'enum' - IL_005c: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_0061: nop + IL_004c: nop + IL_004d: ldarg.0 + IL_004e: ldc.i4.3 + IL_004f: stfld int32 Linq101Partitioning01/firstNumbersLessThan6@45::pc + IL_0054: ldarg.0 + IL_0055: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/firstNumbersLessThan6@45::'enum' + IL_005a: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_005f: nop .line 100001,100001 : 0,0 '' - IL_0062: nop - IL_0063: ldarg.0 - IL_0064: ldc.i4.3 - IL_0065: stfld int32 Linq101Partitioning01/firstNumbersLessThan6@45::pc - IL_006a: ldarg.0 - IL_006b: ldc.i4.0 - IL_006c: stfld int32 Linq101Partitioning01/firstNumbersLessThan6@45::current - IL_0071: ldnull - IL_0072: stloc.1 - IL_0073: leave.s IL_0081 + IL_0060: nop + IL_0061: ldarg.0 + IL_0062: ldc.i4.3 + IL_0063: stfld int32 Linq101Partitioning01/firstNumbersLessThan6@45::pc + IL_0068: ldarg.0 + IL_0069: ldc.i4.0 + IL_006a: stfld int32 Linq101Partitioning01/firstNumbersLessThan6@45::current + IL_006f: ldnull + IL_0070: stloc.1 + IL_0071: leave.s IL_007f } // end .try catch [mscorlib]System.Object { - IL_0075: castclass [mscorlib]System.Exception - IL_007a: stloc.2 + IL_0073: castclass [mscorlib]System.Exception + IL_0078: stloc.2 .line 45,45 : 9,28 '' - IL_007b: ldloc.2 - IL_007c: stloc.0 - IL_007d: ldnull - IL_007e: stloc.1 - IL_007f: leave.s IL_0081 + IL_0079: ldloc.2 + IL_007a: stloc.0 + IL_007b: ldnull + IL_007c: stloc.1 + IL_007d: leave.s IL_007f .line 100001,100001 : 0,0 '' } // end handler - IL_0081: ldloc.1 - IL_0082: pop + IL_007f: ldloc.1 + IL_0080: pop .line 100001,100001 : 0,0 '' - IL_0083: nop - IL_0084: br IL_0002 + IL_0081: nop + IL_0082: br IL_0000 - IL_0089: ldloc.0 - IL_008a: ldnull - IL_008b: cgt.un - IL_008d: brfalse.s IL_0091 + IL_0087: ldloc.0 + IL_0088: ldnull + IL_0089: cgt.un + IL_008b: brfalse.s IL_008f - IL_008f: br.s IL_0093 + IL_008d: br.s IL_0091 - IL_0091: br.s IL_0095 + IL_008f: br.s IL_0093 .line 100001,100001 : 0,0 '' - IL_0093: ldloc.0 - IL_0094: throw + IL_0091: ldloc.0 + IL_0092: throw .line 100001,100001 : 0,0 '' - IL_0095: ret + IL_0093: ret } // end of method firstNumbersLessThan6@45::Close .method public strict virtual instance bool @@ -1487,19 +1407,15 @@ { .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 ) - // Code size 11 (0xb) - .maxstack 9 - IL_0000: ldc.i4.0 + // Code size 9 (0x9) + .maxstack 8 + IL_0000: ldnull IL_0001: ldc.i4.0 - IL_0002: ldnull - IL_0003: ldc.i4.0 - IL_0004: ldc.i4.0 - IL_0005: newobj instance void Linq101Partitioning01/firstNumbersLessThan6@45::.ctor(int32, - int32, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0002: ldc.i4.0 + IL_0003: newobj instance void Linq101Partitioning01/firstNumbersLessThan6@45::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, int32) - IL_000a: ret + IL_0008: ret } // end of method firstNumbersLessThan6@45::GetFreshEnumerator } // end of class firstNumbersLessThan6@45 @@ -1537,11 +1453,6 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) - .field public int32 _arg1 - .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 ) - .field public int32 n .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' .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 ) @@ -1555,39 +1466,33 @@ .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 specialname rtspecialname - instance void .ctor(int32 _arg1, - int32 n, - class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', int32 pc, int32 current) cil managed { - // Code size 44 (0x2c) + // Code size 28 (0x1c) .maxstack 8 IL_0000: ldarg.0 IL_0001: ldarg.1 - IL_0002: stfld int32 Linq101Partitioning01/allButFirst3Numbers@52::_arg1 + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/allButFirst3Numbers@52::'enum' IL_0007: ldarg.0 IL_0008: ldarg.2 - IL_0009: stfld int32 Linq101Partitioning01/allButFirst3Numbers@52::n + IL_0009: stfld int32 Linq101Partitioning01/allButFirst3Numbers@52::pc IL_000e: ldarg.0 IL_000f: ldarg.3 - IL_0010: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/allButFirst3Numbers@52::'enum' + IL_0010: stfld int32 Linq101Partitioning01/allButFirst3Numbers@52::current IL_0015: ldarg.0 - IL_0016: ldarg.s pc - IL_0018: stfld int32 Linq101Partitioning01/allButFirst3Numbers@52::pc - IL_001d: ldarg.0 - IL_001e: ldarg.s current - IL_0020: stfld int32 Linq101Partitioning01/allButFirst3Numbers@52::current - IL_0025: ldarg.0 - IL_0026: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() - IL_002b: ret + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_001b: ret } // end of method allButFirst3Numbers@52::.ctor .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 191 (0xbf) + // Code size 154 (0x9a) .maxstack 6 + .locals init ([0] int32 V_0, + [1] int32 n) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 IL_0001: ldfld int32 Linq101Partitioning01/allButFirst3Numbers@52::pc @@ -1597,7 +1502,7 @@ IL_001b, IL_001d, IL_001f) - IL_0019: br.s IL_002d + IL_0019: br.s IL_002a IL_001b: br.s IL_0021 @@ -1607,203 +1512,190 @@ .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br.s IL_0095 + IL_0022: br.s IL_0070 .line 100001,100001 : 0,0 '' IL_0024: nop - IL_0025: br.s IL_0084 + IL_0025: br.s IL_006d .line 100001,100001 : 0,0 '' IL_0027: nop - IL_0028: br IL_00b6 + IL_0028: br.s IL_0091 .line 100001,100001 : 0,0 '' - IL_002d: nop + IL_002a: nop .line 52,52 : 9,28 '' - IL_002e: ldarg.0 - IL_002f: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Partitioning01::get_numbers() - IL_0034: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0039: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/allButFirst3Numbers@52::'enum' - IL_003e: ldarg.0 - IL_003f: ldc.i4.1 - IL_0040: stfld int32 Linq101Partitioning01/allButFirst3Numbers@52::pc + IL_002b: ldarg.0 + IL_002c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Partitioning01::get_numbers() + IL_0031: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0036: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/allButFirst3Numbers@52::'enum' + IL_003b: ldarg.0 + IL_003c: ldc.i4.1 + IL_003d: stfld int32 Linq101Partitioning01/allButFirst3Numbers@52::pc .line 52,52 : 9,28 '' - IL_0045: ldarg.0 - IL_0046: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/allButFirst3Numbers@52::'enum' - IL_004b: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0050: brfalse.s IL_0095 - - IL_0052: ldarg.0 - IL_0053: ldarg.0 - IL_0054: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/allButFirst3Numbers@52::'enum' - IL_0059: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_005e: stfld int32 Linq101Partitioning01/allButFirst3Numbers@52::_arg1 + IL_0042: ldarg.0 + IL_0043: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/allButFirst3Numbers@52::'enum' + IL_0048: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_004d: brfalse.s IL_0070 + + IL_004f: ldarg.0 + IL_0050: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/allButFirst3Numbers@52::'enum' + IL_0055: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_005a: stloc.0 .line 52,52 : 9,28 '' - IL_0063: ldarg.0 - IL_0064: ldarg.0 - IL_0065: ldfld int32 Linq101Partitioning01/allButFirst3Numbers@52::_arg1 - IL_006a: stfld int32 Linq101Partitioning01/allButFirst3Numbers@52::n - IL_006f: ldarg.0 - IL_0070: ldc.i4.2 - IL_0071: stfld int32 Linq101Partitioning01/allButFirst3Numbers@52::pc + IL_005b: ldloc.0 + IL_005c: stloc.1 + IL_005d: ldarg.0 + IL_005e: ldc.i4.2 + IL_005f: stfld int32 Linq101Partitioning01/allButFirst3Numbers@52::pc .line 53,53 : 9,31 '' - IL_0076: ldarg.0 - IL_0077: ldarg.0 - IL_0078: ldfld int32 Linq101Partitioning01/allButFirst3Numbers@52::n - IL_007d: stfld int32 Linq101Partitioning01/allButFirst3Numbers@52::current - IL_0082: ldc.i4.1 - IL_0083: ret - - IL_0084: ldarg.0 - IL_0085: ldc.i4.0 - IL_0086: stfld int32 Linq101Partitioning01/allButFirst3Numbers@52::n - .line 52,52 : 9,28 '' - IL_008b: ldarg.0 - IL_008c: ldc.i4.0 - IL_008d: stfld int32 Linq101Partitioning01/allButFirst3Numbers@52::_arg1 + IL_0064: ldarg.0 + IL_0065: ldloc.1 + IL_0066: stfld int32 Linq101Partitioning01/allButFirst3Numbers@52::current + IL_006b: ldc.i4.1 + IL_006c: ret + .line 100001,100001 : 0,0 '' - IL_0092: nop - IL_0093: br.s IL_0045 + IL_006d: nop + IL_006e: br.s IL_0042 - IL_0095: ldarg.0 - IL_0096: ldc.i4.3 - IL_0097: stfld int32 Linq101Partitioning01/allButFirst3Numbers@52::pc + IL_0070: ldarg.0 + IL_0071: ldc.i4.3 + IL_0072: stfld int32 Linq101Partitioning01/allButFirst3Numbers@52::pc .line 52,52 : 9,28 '' - IL_009c: ldarg.0 - IL_009d: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/allButFirst3Numbers@52::'enum' - IL_00a2: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_00a7: nop - IL_00a8: ldarg.0 - IL_00a9: ldnull - IL_00aa: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/allButFirst3Numbers@52::'enum' - IL_00af: ldarg.0 - IL_00b0: ldc.i4.3 - IL_00b1: stfld int32 Linq101Partitioning01/allButFirst3Numbers@52::pc - IL_00b6: ldarg.0 - IL_00b7: ldc.i4.0 - IL_00b8: stfld int32 Linq101Partitioning01/allButFirst3Numbers@52::current - IL_00bd: ldc.i4.0 - IL_00be: ret + IL_0077: ldarg.0 + IL_0078: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/allButFirst3Numbers@52::'enum' + IL_007d: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0082: nop + IL_0083: ldarg.0 + IL_0084: ldnull + IL_0085: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/allButFirst3Numbers@52::'enum' + IL_008a: ldarg.0 + IL_008b: ldc.i4.3 + IL_008c: stfld int32 Linq101Partitioning01/allButFirst3Numbers@52::pc + IL_0091: ldarg.0 + IL_0092: ldc.i4.0 + IL_0093: stfld int32 Linq101Partitioning01/allButFirst3Numbers@52::current + IL_0098: ldc.i4.0 + IL_0099: ret } // end of method allButFirst3Numbers@52::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 150 (0x96) + // Code size 148 (0x94) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [FSharp.Core]Microsoft.FSharp.Core.Unit V_1, [2] class [mscorlib]System.Exception e) .line 100001,100001 : 0,0 '' - IL_0000: ldnull - IL_0001: stloc.0 - IL_0002: ldarg.0 - IL_0003: ldfld int32 Linq101Partitioning01/allButFirst3Numbers@52::pc - IL_0008: ldc.i4.3 - IL_0009: sub - IL_000a: switch ( - IL_0015) - IL_0013: br.s IL_001b + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Partitioning01/allButFirst3Numbers@52::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0019 .line 100001,100001 : 0,0 '' - IL_0015: nop - IL_0016: br IL_0089 + IL_0013: nop + IL_0014: br IL_0087 .line 100001,100001 : 0,0 '' - IL_001b: nop + IL_0019: nop .try { - IL_001c: ldarg.0 - IL_001d: ldfld int32 Linq101Partitioning01/allButFirst3Numbers@52::pc - IL_0022: switch ( + IL_001a: ldarg.0 + IL_001b: ldfld int32 Linq101Partitioning01/allButFirst3Numbers@52::pc + IL_0020: switch ( + IL_0037, IL_0039, IL_003b, - IL_003d, - IL_003f) - IL_0037: br.s IL_004d + IL_003d) + IL_0035: br.s IL_004b - IL_0039: br.s IL_0041 + IL_0037: br.s IL_003f - IL_003b: br.s IL_0044 + IL_0039: br.s IL_0042 - IL_003d: br.s IL_0047 + IL_003b: br.s IL_0045 - IL_003f: br.s IL_004a + IL_003d: br.s IL_0048 .line 100001,100001 : 0,0 '' - IL_0041: nop - IL_0042: br.s IL_0063 + IL_003f: nop + IL_0040: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_0044: nop - IL_0045: br.s IL_004f + IL_0042: nop + IL_0043: br.s IL_004d .line 100001,100001 : 0,0 '' - IL_0047: nop - IL_0048: br.s IL_004e + IL_0045: nop + IL_0046: br.s IL_004c .line 100001,100001 : 0,0 '' - IL_004a: nop - IL_004b: br.s IL_0063 + IL_0048: nop + IL_0049: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_004d: nop + IL_004b: nop .line 100001,100001 : 0,0 '' - IL_004e: nop - IL_004f: ldarg.0 - IL_0050: ldc.i4.3 - IL_0051: stfld int32 Linq101Partitioning01/allButFirst3Numbers@52::pc - IL_0056: ldarg.0 - IL_0057: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/allButFirst3Numbers@52::'enum' - IL_005c: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_0061: nop + IL_004c: nop + IL_004d: ldarg.0 + IL_004e: ldc.i4.3 + IL_004f: stfld int32 Linq101Partitioning01/allButFirst3Numbers@52::pc + IL_0054: ldarg.0 + IL_0055: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/allButFirst3Numbers@52::'enum' + IL_005a: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_005f: nop .line 100001,100001 : 0,0 '' - IL_0062: nop - IL_0063: ldarg.0 - IL_0064: ldc.i4.3 - IL_0065: stfld int32 Linq101Partitioning01/allButFirst3Numbers@52::pc - IL_006a: ldarg.0 - IL_006b: ldc.i4.0 - IL_006c: stfld int32 Linq101Partitioning01/allButFirst3Numbers@52::current - IL_0071: ldnull - IL_0072: stloc.1 - IL_0073: leave.s IL_0081 + IL_0060: nop + IL_0061: ldarg.0 + IL_0062: ldc.i4.3 + IL_0063: stfld int32 Linq101Partitioning01/allButFirst3Numbers@52::pc + IL_0068: ldarg.0 + IL_0069: ldc.i4.0 + IL_006a: stfld int32 Linq101Partitioning01/allButFirst3Numbers@52::current + IL_006f: ldnull + IL_0070: stloc.1 + IL_0071: leave.s IL_007f } // end .try catch [mscorlib]System.Object { - IL_0075: castclass [mscorlib]System.Exception - IL_007a: stloc.2 + IL_0073: castclass [mscorlib]System.Exception + IL_0078: stloc.2 .line 52,52 : 9,28 '' - IL_007b: ldloc.2 - IL_007c: stloc.0 - IL_007d: ldnull - IL_007e: stloc.1 - IL_007f: leave.s IL_0081 + IL_0079: ldloc.2 + IL_007a: stloc.0 + IL_007b: ldnull + IL_007c: stloc.1 + IL_007d: leave.s IL_007f .line 100001,100001 : 0,0 '' } // end handler - IL_0081: ldloc.1 - IL_0082: pop + IL_007f: ldloc.1 + IL_0080: pop .line 100001,100001 : 0,0 '' - IL_0083: nop - IL_0084: br IL_0002 + IL_0081: nop + IL_0082: br IL_0000 - IL_0089: ldloc.0 - IL_008a: ldnull - IL_008b: cgt.un - IL_008d: brfalse.s IL_0091 + IL_0087: ldloc.0 + IL_0088: ldnull + IL_0089: cgt.un + IL_008b: brfalse.s IL_008f - IL_008f: br.s IL_0093 + IL_008d: br.s IL_0091 - IL_0091: br.s IL_0095 + IL_008f: br.s IL_0093 .line 100001,100001 : 0,0 '' - IL_0093: ldloc.0 - IL_0094: throw + IL_0091: ldloc.0 + IL_0092: throw .line 100001,100001 : 0,0 '' - IL_0095: ret + IL_0093: ret } // end of method allButFirst3Numbers@52::Close .method public strict virtual instance bool @@ -1874,19 +1766,15 @@ { .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 ) - // Code size 11 (0xb) - .maxstack 9 - IL_0000: ldc.i4.0 + // Code size 9 (0x9) + .maxstack 8 + IL_0000: ldnull IL_0001: ldc.i4.0 - IL_0002: ldnull - IL_0003: ldc.i4.0 - IL_0004: ldc.i4.0 - IL_0005: newobj instance void Linq101Partitioning01/allButFirst3Numbers@52::.ctor(int32, - int32, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0002: ldc.i4.0 + IL_0003: newobj instance void Linq101Partitioning01/allButFirst3Numbers@52::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, int32) - IL_000a: ret + IL_0008: ret } // end of method allButFirst3Numbers@52::GetFreshEnumerator } // end of class allButFirst3Numbers@52 @@ -2072,7 +1960,7 @@ .method public static void main@() cil managed { .entrypoint - // Code size 440 (0x1b8) + // Code size 432 (0x1b0) .maxstack 13 .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 numbers, [1] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 first3Numbers, @@ -2127,151 +2015,135 @@ IL_0049: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_004e: stloc.s V_8 IL_0050: ldloc.s V_8 - IL_0052: ldc.i4.0 + IL_0052: ldnull IL_0053: ldc.i4.0 - IL_0054: ldnull - IL_0055: ldc.i4.0 - IL_0056: ldc.i4.0 - IL_0057: newobj instance void Linq101Partitioning01/first3Numbers@12::.ctor(int32, - int32, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0054: ldc.i4.0 + IL_0055: newobj instance void Linq101Partitioning01/first3Numbers@12::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, int32) - IL_005c: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0061: ldc.i4.3 - IL_0062: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Take(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_005a: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_005f: ldc.i4.3 + IL_0060: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Take(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, int32) - IL_0067: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() - IL_006c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0071: dup - IL_0072: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Partitioning01::first3Numbers@10 - IL_0077: stloc.1 + IL_0065: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() + IL_006a: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_006f: dup + IL_0070: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Partitioning01::first3Numbers@10 + IL_0075: stloc.1 .line 17,17 : 1,34 '' - IL_0078: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [Utils]Utils::getCustomerList() - IL_007d: dup - IL_007e: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Partitioning01::'customers@17-2' - IL_0083: stloc.2 + IL_0076: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [Utils]Utils::getCustomerList() + IL_007b: dup + IL_007c: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Partitioning01::'customers@17-2' + IL_0081: stloc.2 .line 18,24 : 1,21 '' - IL_0084: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_0089: stloc.s V_9 + IL_0082: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_0087: stloc.s V_9 + IL_0089: ldloc.s V_9 IL_008b: ldloc.s V_9 IL_008d: ldloc.s V_9 IL_008f: ldloc.s V_9 - IL_0091: ldloc.s V_9 - IL_0093: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Partitioning01::get_customers() - IL_0098: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Source(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_009d: ldloc.s V_9 - IL_009f: newobj instance void Linq101Partitioning01/WAOrders@20::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_00a4: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0091: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Partitioning01::get_customers() + IL_0096: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Source(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_009b: ldloc.s V_9 + IL_009d: newobj instance void Linq101Partitioning01/WAOrders@20::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_00a2: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_00a9: newobj instance void Linq101Partitioning01/'WAOrders@22-2'::.ctor() - IL_00ae: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Where,class [mscorlib]System.Collections.IEnumerable>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_00a7: newobj instance void Linq101Partitioning01/'WAOrders@22-2'::.ctor() + IL_00ac: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Where,class [mscorlib]System.Collections.IEnumerable>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_00b3: newobj instance void Linq101Partitioning01/'WAOrders@23-3'::.ctor() - IL_00b8: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`3>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_00b1: newobj instance void Linq101Partitioning01/'WAOrders@23-3'::.ctor() + IL_00b6: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`3>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_00bd: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,class [mscorlib]System.Collections.IEnumerable>::get_Source() - IL_00c2: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_00c7: dup - IL_00c8: stsfld class [mscorlib]System.Tuple`3[] ''.$Linq101Partitioning01::WAOrders@18 - IL_00cd: stloc.3 + IL_00bb: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,class [mscorlib]System.Collections.IEnumerable>::get_Source() + IL_00c0: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_00c5: dup + IL_00c6: stsfld class [mscorlib]System.Tuple`3[] ''.$Linq101Partitioning01::WAOrders@18 + IL_00cb: stloc.3 .line 27,31 : 1,20 '' - IL_00ce: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_00d3: stloc.s V_10 - IL_00d5: ldloc.s V_10 + IL_00cc: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_00d1: stloc.s V_10 + IL_00d3: ldloc.s V_10 + IL_00d5: ldnull + IL_00d6: ldc.i4.0 IL_00d7: ldc.i4.0 - IL_00d8: ldc.i4.0 - IL_00d9: ldnull - IL_00da: ldc.i4.0 - IL_00db: ldc.i4.0 - IL_00dc: newobj instance void Linq101Partitioning01/allButFirst4Numbers@29::.ctor(int32, - int32, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_00d8: newobj instance void Linq101Partitioning01/allButFirst4Numbers@29::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, int32) - IL_00e1: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_00e6: ldc.i4.4 - IL_00e7: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Skip(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_00dd: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_00e2: ldc.i4.4 + IL_00e3: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Skip(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, int32) - IL_00ec: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() - IL_00f1: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_00f6: dup - IL_00f7: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Partitioning01::allButFirst4Numbers@27 - IL_00fc: stloc.s allButFirst4Numbers + IL_00e8: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() + IL_00ed: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_00f2: dup + IL_00f3: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Partitioning01::allButFirst4Numbers@27 + IL_00f8: stloc.s allButFirst4Numbers .line 34,40 : 1,34 '' - IL_00fe: ldc.i4.2 - IL_00ff: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_0104: stloc.s V_11 + IL_00fa: ldc.i4.2 + IL_00fb: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_0100: stloc.s V_11 + IL_0102: ldloc.s V_11 + IL_0104: ldloc.s V_11 IL_0106: ldloc.s V_11 IL_0108: ldloc.s V_11 - IL_010a: ldloc.s V_11 - IL_010c: ldloc.s V_11 - IL_010e: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Partitioning01::get_customers() - IL_0113: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Source(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0118: ldloc.s V_11 - IL_011a: newobj instance void Linq101Partitioning01/WAOrders2@36::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_011f: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_010a: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Partitioning01::get_customers() + IL_010f: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Source(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0114: ldloc.s V_11 + IL_0116: newobj instance void Linq101Partitioning01/WAOrders2@36::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_011b: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0124: newobj instance void Linq101Partitioning01/'WAOrders2@38-2'::.ctor() - IL_0129: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Where,class [mscorlib]System.Collections.IEnumerable>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0120: newobj instance void Linq101Partitioning01/'WAOrders2@38-2'::.ctor() + IL_0125: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Where,class [mscorlib]System.Collections.IEnumerable>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_012e: newobj instance void Linq101Partitioning01/'WAOrders2@39-3'::.ctor() - IL_0133: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`3>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_012a: newobj instance void Linq101Partitioning01/'WAOrders2@39-3'::.ctor() + IL_012f: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`3>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0138: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,class [mscorlib]System.Collections.IEnumerable>::get_Source() - IL_013d: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::Skip>(int32, + IL_0134: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,class [mscorlib]System.Collections.IEnumerable>::get_Source() + IL_0139: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::Skip>(int32, class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0142: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList>(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0147: dup - IL_0148: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> ''.$Linq101Partitioning01::WAOrders2@34 - IL_014d: stloc.s WAOrders2 + IL_013e: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList>(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0143: dup + IL_0144: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> ''.$Linq101Partitioning01::WAOrders2@34 + IL_0149: stloc.s WAOrders2 .line 43,47 : 1,20 '' - IL_014f: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_0154: stloc.s V_12 - IL_0156: ldloc.s V_12 - IL_0158: ldc.i4.0 - IL_0159: ldc.i4.0 - IL_015a: ldnull - IL_015b: ldc.i4.0 - IL_015c: ldc.i4.0 - IL_015d: newobj instance void Linq101Partitioning01/firstNumbersLessThan6@45::.ctor(int32, - int32, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_014b: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_0150: stloc.s V_12 + IL_0152: ldloc.s V_12 + IL_0154: ldnull + IL_0155: ldc.i4.0 + IL_0156: ldc.i4.0 + IL_0157: newobj instance void Linq101Partitioning01/firstNumbersLessThan6@45::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, int32) - IL_0162: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0167: newobj instance void Linq101Partitioning01/'firstNumbersLessThan6@46-1'::.ctor() - IL_016c: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::TakeWhile(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_015c: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0161: newobj instance void Linq101Partitioning01/'firstNumbersLessThan6@46-1'::.ctor() + IL_0166: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::TakeWhile(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0171: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() - IL_0176: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_017b: dup - IL_017c: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Partitioning01::firstNumbersLessThan6@43 - IL_0181: stloc.s firstNumbersLessThan6 + IL_016b: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() + IL_0170: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0175: dup + IL_0176: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Partitioning01::firstNumbersLessThan6@43 + IL_017b: stloc.s firstNumbersLessThan6 .line 50,54 : 1,20 '' - IL_0183: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_0188: stloc.s V_13 - IL_018a: ldloc.s V_13 - IL_018c: ldc.i4.0 - IL_018d: ldc.i4.0 - IL_018e: ldnull - IL_018f: ldc.i4.0 - IL_0190: ldc.i4.0 - IL_0191: newobj instance void Linq101Partitioning01/allButFirst3Numbers@52::.ctor(int32, - int32, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_017d: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_0182: stloc.s V_13 + IL_0184: ldloc.s V_13 + IL_0186: ldnull + IL_0187: ldc.i4.0 + IL_0188: ldc.i4.0 + IL_0189: newobj instance void Linq101Partitioning01/allButFirst3Numbers@52::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, int32) - IL_0196: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_019b: newobj instance void Linq101Partitioning01/'allButFirst3Numbers@53-1'::.ctor() - IL_01a0: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::SkipWhile(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_018e: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0193: newobj instance void Linq101Partitioning01/'allButFirst3Numbers@53-1'::.ctor() + IL_0198: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::SkipWhile(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_01a5: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() - IL_01aa: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_01af: dup - IL_01b0: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Partitioning01::allButFirst3Numbers@50 - IL_01b5: stloc.s allButFirst3Numbers - IL_01b7: ret + IL_019d: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() + IL_01a2: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_01a7: dup + IL_01a8: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Partitioning01::allButFirst3Numbers@50 + IL_01ad: stloc.s allButFirst3Numbers + IL_01af: ret } // end of method $Linq101Partitioning01::main@ } // end of class ''.$Linq101Partitioning01 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Quantifiers01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Quantifiers01.il.bsl index 087bbda2538..d2b715c5820 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Quantifiers01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Quantifiers01.il.bsl @@ -13,7 +13,7 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 4:4:1:0 + .ver 4:5:0:0 } .assembly extern Utils { @@ -38,20 +38,20 @@ } .mresource public FSharpSignatureData.Linq101Quantifiers01 { - // Offset: 0x00000000 Length: 0x0000037D + // Offset: 0x00000000 Length: 0x0000039F } .mresource public FSharpOptimizationData.Linq101Quantifiers01 { - // Offset: 0x00000388 Length: 0x000000FF + // Offset: 0x000003A8 Length: 0x000000FF } .module Linq101Quantifiers01.exe -// MVID: {5A1F62A6-76DD-E373-A745-0383A6621F5A} +// MVID: {5B9A632A-76DD-E373-A745-03832A639A5B} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x01080000 +// Image base: 0x025D0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -64,11 +64,6 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) - .field public string _arg1 - .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 ) - .field public string w .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' .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 ) @@ -82,41 +77,35 @@ .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 specialname rtspecialname - instance void .ctor(string _arg1, - string w, - class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', int32 pc, string current) cil managed { - // Code size 44 (0x2c) + // Code size 28 (0x1c) .maxstack 8 IL_0000: ldarg.0 IL_0001: ldarg.1 - IL_0002: stfld string Linq101Quantifiers01/iAfterE@12::_arg1 + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Quantifiers01/iAfterE@12::'enum' IL_0007: ldarg.0 IL_0008: ldarg.2 - IL_0009: stfld string Linq101Quantifiers01/iAfterE@12::w + IL_0009: stfld int32 Linq101Quantifiers01/iAfterE@12::pc IL_000e: ldarg.0 IL_000f: ldarg.3 - IL_0010: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Quantifiers01/iAfterE@12::'enum' + IL_0010: stfld string Linq101Quantifiers01/iAfterE@12::current IL_0015: ldarg.0 - IL_0016: ldarg.s pc - IL_0018: stfld int32 Linq101Quantifiers01/iAfterE@12::pc - IL_001d: ldarg.0 - IL_001e: ldarg.s current - IL_0020: stfld string Linq101Quantifiers01/iAfterE@12::current - IL_0025: ldarg.0 - IL_0026: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() - IL_002b: ret + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_001b: ret } // end of method iAfterE@12::.ctor .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 191 (0xbf) + // Code size 154 (0x9a) .maxstack 6 + .locals init ([0] string V_0, + [1] string w) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 100001,100001 : 0,0 'C:\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\QueryExpressionStepping\\Linq101Quantifiers01.fs' + .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\QueryExpressionStepping\\Linq101Quantifiers01.fs' IL_0000: ldarg.0 IL_0001: ldfld int32 Linq101Quantifiers01/iAfterE@12::pc IL_0006: ldc.i4.1 @@ -125,7 +114,7 @@ IL_001b, IL_001d, IL_001f) - IL_0019: br.s IL_002d + IL_0019: br.s IL_002a IL_001b: br.s IL_0021 @@ -135,203 +124,190 @@ .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br.s IL_0095 + IL_0022: br.s IL_0070 .line 100001,100001 : 0,0 '' IL_0024: nop - IL_0025: br.s IL_0084 + IL_0025: br.s IL_006d .line 100001,100001 : 0,0 '' IL_0027: nop - IL_0028: br IL_00b6 + IL_0028: br.s IL_0091 .line 100001,100001 : 0,0 '' - IL_002d: nop + IL_002a: nop .line 12,12 : 9,26 '' - IL_002e: ldarg.0 - IL_002f: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Quantifiers01::get_words() - IL_0034: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0039: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Quantifiers01/iAfterE@12::'enum' - IL_003e: ldarg.0 - IL_003f: ldc.i4.1 - IL_0040: stfld int32 Linq101Quantifiers01/iAfterE@12::pc + IL_002b: ldarg.0 + IL_002c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Quantifiers01::get_words() + IL_0031: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0036: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Quantifiers01/iAfterE@12::'enum' + IL_003b: ldarg.0 + IL_003c: ldc.i4.1 + IL_003d: stfld int32 Linq101Quantifiers01/iAfterE@12::pc .line 12,12 : 9,26 '' - IL_0045: ldarg.0 - IL_0046: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Quantifiers01/iAfterE@12::'enum' - IL_004b: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0050: brfalse.s IL_0095 - - IL_0052: ldarg.0 - IL_0053: ldarg.0 - IL_0054: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Quantifiers01/iAfterE@12::'enum' - IL_0059: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_005e: stfld string Linq101Quantifiers01/iAfterE@12::_arg1 + IL_0042: ldarg.0 + IL_0043: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Quantifiers01/iAfterE@12::'enum' + IL_0048: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_004d: brfalse.s IL_0070 + + IL_004f: ldarg.0 + IL_0050: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Quantifiers01/iAfterE@12::'enum' + IL_0055: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_005a: stloc.0 .line 12,12 : 9,26 '' - IL_0063: ldarg.0 - IL_0064: ldarg.0 - IL_0065: ldfld string Linq101Quantifiers01/iAfterE@12::_arg1 - IL_006a: stfld string Linq101Quantifiers01/iAfterE@12::w - IL_006f: ldarg.0 - IL_0070: ldc.i4.2 - IL_0071: stfld int32 Linq101Quantifiers01/iAfterE@12::pc + IL_005b: ldloc.0 + IL_005c: stloc.1 + IL_005d: ldarg.0 + IL_005e: ldc.i4.2 + IL_005f: stfld int32 Linq101Quantifiers01/iAfterE@12::pc .line 13,13 : 9,34 '' - IL_0076: ldarg.0 - IL_0077: ldarg.0 - IL_0078: ldfld string Linq101Quantifiers01/iAfterE@12::w - IL_007d: stfld string Linq101Quantifiers01/iAfterE@12::current - IL_0082: ldc.i4.1 - IL_0083: ret - - IL_0084: ldarg.0 - IL_0085: ldnull - IL_0086: stfld string Linq101Quantifiers01/iAfterE@12::w - .line 12,12 : 9,26 '' - IL_008b: ldarg.0 - IL_008c: ldnull - IL_008d: stfld string Linq101Quantifiers01/iAfterE@12::_arg1 + IL_0064: ldarg.0 + IL_0065: ldloc.1 + IL_0066: stfld string Linq101Quantifiers01/iAfterE@12::current + IL_006b: ldc.i4.1 + IL_006c: ret + .line 100001,100001 : 0,0 '' - IL_0092: nop - IL_0093: br.s IL_0045 + IL_006d: nop + IL_006e: br.s IL_0042 - IL_0095: ldarg.0 - IL_0096: ldc.i4.3 - IL_0097: stfld int32 Linq101Quantifiers01/iAfterE@12::pc + IL_0070: ldarg.0 + IL_0071: ldc.i4.3 + IL_0072: stfld int32 Linq101Quantifiers01/iAfterE@12::pc .line 12,12 : 9,26 '' - IL_009c: ldarg.0 - IL_009d: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Quantifiers01/iAfterE@12::'enum' - IL_00a2: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_00a7: nop - IL_00a8: ldarg.0 - IL_00a9: ldnull - IL_00aa: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Quantifiers01/iAfterE@12::'enum' - IL_00af: ldarg.0 - IL_00b0: ldc.i4.3 - IL_00b1: stfld int32 Linq101Quantifiers01/iAfterE@12::pc - IL_00b6: ldarg.0 - IL_00b7: ldnull - IL_00b8: stfld string Linq101Quantifiers01/iAfterE@12::current - IL_00bd: ldc.i4.0 - IL_00be: ret + IL_0077: ldarg.0 + IL_0078: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Quantifiers01/iAfterE@12::'enum' + IL_007d: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0082: nop + IL_0083: ldarg.0 + IL_0084: ldnull + IL_0085: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Quantifiers01/iAfterE@12::'enum' + IL_008a: ldarg.0 + IL_008b: ldc.i4.3 + IL_008c: stfld int32 Linq101Quantifiers01/iAfterE@12::pc + IL_0091: ldarg.0 + IL_0092: ldnull + IL_0093: stfld string Linq101Quantifiers01/iAfterE@12::current + IL_0098: ldc.i4.0 + IL_0099: ret } // end of method iAfterE@12::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 150 (0x96) + // Code size 148 (0x94) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [FSharp.Core]Microsoft.FSharp.Core.Unit V_1, [2] class [mscorlib]System.Exception e) .line 100001,100001 : 0,0 '' - IL_0000: ldnull - IL_0001: stloc.0 - IL_0002: ldarg.0 - IL_0003: ldfld int32 Linq101Quantifiers01/iAfterE@12::pc - IL_0008: ldc.i4.3 - IL_0009: sub - IL_000a: switch ( - IL_0015) - IL_0013: br.s IL_001b + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Quantifiers01/iAfterE@12::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0019 .line 100001,100001 : 0,0 '' - IL_0015: nop - IL_0016: br IL_0089 + IL_0013: nop + IL_0014: br IL_0087 .line 100001,100001 : 0,0 '' - IL_001b: nop + IL_0019: nop .try { - IL_001c: ldarg.0 - IL_001d: ldfld int32 Linq101Quantifiers01/iAfterE@12::pc - IL_0022: switch ( + IL_001a: ldarg.0 + IL_001b: ldfld int32 Linq101Quantifiers01/iAfterE@12::pc + IL_0020: switch ( + IL_0037, IL_0039, IL_003b, - IL_003d, - IL_003f) - IL_0037: br.s IL_004d + IL_003d) + IL_0035: br.s IL_004b - IL_0039: br.s IL_0041 + IL_0037: br.s IL_003f - IL_003b: br.s IL_0044 + IL_0039: br.s IL_0042 - IL_003d: br.s IL_0047 + IL_003b: br.s IL_0045 - IL_003f: br.s IL_004a + IL_003d: br.s IL_0048 .line 100001,100001 : 0,0 '' - IL_0041: nop - IL_0042: br.s IL_0063 + IL_003f: nop + IL_0040: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_0044: nop - IL_0045: br.s IL_004f + IL_0042: nop + IL_0043: br.s IL_004d .line 100001,100001 : 0,0 '' - IL_0047: nop - IL_0048: br.s IL_004e + IL_0045: nop + IL_0046: br.s IL_004c .line 100001,100001 : 0,0 '' - IL_004a: nop - IL_004b: br.s IL_0063 + IL_0048: nop + IL_0049: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_004d: nop + IL_004b: nop .line 100001,100001 : 0,0 '' - IL_004e: nop - IL_004f: ldarg.0 - IL_0050: ldc.i4.3 - IL_0051: stfld int32 Linq101Quantifiers01/iAfterE@12::pc - IL_0056: ldarg.0 - IL_0057: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Quantifiers01/iAfterE@12::'enum' - IL_005c: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_0061: nop + IL_004c: nop + IL_004d: ldarg.0 + IL_004e: ldc.i4.3 + IL_004f: stfld int32 Linq101Quantifiers01/iAfterE@12::pc + IL_0054: ldarg.0 + IL_0055: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Quantifiers01/iAfterE@12::'enum' + IL_005a: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_005f: nop .line 100001,100001 : 0,0 '' - IL_0062: nop - IL_0063: ldarg.0 - IL_0064: ldc.i4.3 - IL_0065: stfld int32 Linq101Quantifiers01/iAfterE@12::pc - IL_006a: ldarg.0 - IL_006b: ldnull - IL_006c: stfld string Linq101Quantifiers01/iAfterE@12::current - IL_0071: ldnull - IL_0072: stloc.1 - IL_0073: leave.s IL_0081 + IL_0060: nop + IL_0061: ldarg.0 + IL_0062: ldc.i4.3 + IL_0063: stfld int32 Linq101Quantifiers01/iAfterE@12::pc + IL_0068: ldarg.0 + IL_0069: ldnull + IL_006a: stfld string Linq101Quantifiers01/iAfterE@12::current + IL_006f: ldnull + IL_0070: stloc.1 + IL_0071: leave.s IL_007f } // end .try catch [mscorlib]System.Object { - IL_0075: castclass [mscorlib]System.Exception - IL_007a: stloc.2 + IL_0073: castclass [mscorlib]System.Exception + IL_0078: stloc.2 .line 12,12 : 9,26 '' - IL_007b: ldloc.2 - IL_007c: stloc.0 - IL_007d: ldnull - IL_007e: stloc.1 - IL_007f: leave.s IL_0081 + IL_0079: ldloc.2 + IL_007a: stloc.0 + IL_007b: ldnull + IL_007c: stloc.1 + IL_007d: leave.s IL_007f .line 100001,100001 : 0,0 '' } // end handler - IL_0081: ldloc.1 - IL_0082: pop + IL_007f: ldloc.1 + IL_0080: pop .line 100001,100001 : 0,0 '' - IL_0083: nop - IL_0084: br IL_0002 + IL_0081: nop + IL_0082: br IL_0000 - IL_0089: ldloc.0 - IL_008a: ldnull - IL_008b: cgt.un - IL_008d: brfalse.s IL_0091 + IL_0087: ldloc.0 + IL_0088: ldnull + IL_0089: cgt.un + IL_008b: brfalse.s IL_008f - IL_008f: br.s IL_0093 + IL_008d: br.s IL_0091 - IL_0091: br.s IL_0095 + IL_008f: br.s IL_0093 .line 100001,100001 : 0,0 '' - IL_0093: ldloc.0 - IL_0094: throw + IL_0091: ldloc.0 + IL_0092: throw .line 100001,100001 : 0,0 '' - IL_0095: ret + IL_0093: ret } // end of method iAfterE@12::Close .method public strict virtual instance bool @@ -402,19 +378,15 @@ { .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 ) - // Code size 11 (0xb) - .maxstack 9 + // Code size 9 (0x9) + .maxstack 8 IL_0000: ldnull - IL_0001: ldnull + IL_0001: ldc.i4.0 IL_0002: ldnull - IL_0003: ldc.i4.0 - IL_0004: ldnull - IL_0005: newobj instance void Linq101Quantifiers01/iAfterE@12::.ctor(string, - string, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0003: newobj instance void Linq101Quantifiers01/iAfterE@12::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, string) - IL_000a: ret + IL_0008: ret } // end of method iAfterE@12::GetFreshEnumerator } // end of class iAfterE@12 @@ -684,11 +656,6 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) - .field public int32 _arg1 - .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 ) - .field public int32 n .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' .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 ) @@ -702,39 +669,33 @@ .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 specialname rtspecialname - instance void .ctor(int32 _arg1, - int32 n, - class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', int32 pc, int32 current) cil managed { - // Code size 44 (0x2c) + // Code size 28 (0x1c) .maxstack 8 IL_0000: ldarg.0 IL_0001: ldarg.1 - IL_0002: stfld int32 Linq101Quantifiers01/onlyOdd@32::_arg1 + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Quantifiers01/onlyOdd@32::'enum' IL_0007: ldarg.0 IL_0008: ldarg.2 - IL_0009: stfld int32 Linq101Quantifiers01/onlyOdd@32::n + IL_0009: stfld int32 Linq101Quantifiers01/onlyOdd@32::pc IL_000e: ldarg.0 IL_000f: ldarg.3 - IL_0010: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Quantifiers01/onlyOdd@32::'enum' + IL_0010: stfld int32 Linq101Quantifiers01/onlyOdd@32::current IL_0015: ldarg.0 - IL_0016: ldarg.s pc - IL_0018: stfld int32 Linq101Quantifiers01/onlyOdd@32::pc - IL_001d: ldarg.0 - IL_001e: ldarg.s current - IL_0020: stfld int32 Linq101Quantifiers01/onlyOdd@32::current - IL_0025: ldarg.0 - IL_0026: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() - IL_002b: ret + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_001b: ret } // end of method onlyOdd@32::.ctor .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 191 (0xbf) + // Code size 154 (0x9a) .maxstack 6 + .locals init ([0] int32 V_0, + [1] int32 n) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 IL_0001: ldfld int32 Linq101Quantifiers01/onlyOdd@32::pc @@ -744,7 +705,7 @@ IL_001b, IL_001d, IL_001f) - IL_0019: br.s IL_002d + IL_0019: br.s IL_002a IL_001b: br.s IL_0021 @@ -754,203 +715,190 @@ .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br.s IL_0095 + IL_0022: br.s IL_0070 .line 100001,100001 : 0,0 '' IL_0024: nop - IL_0025: br.s IL_0084 + IL_0025: br.s IL_006d .line 100001,100001 : 0,0 '' IL_0027: nop - IL_0028: br IL_00b6 + IL_0028: br.s IL_0091 .line 100001,100001 : 0,0 '' - IL_002d: nop + IL_002a: nop .line 32,32 : 9,28 '' - IL_002e: ldarg.0 - IL_002f: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Quantifiers01::get_numbers() - IL_0034: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0039: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Quantifiers01/onlyOdd@32::'enum' - IL_003e: ldarg.0 - IL_003f: ldc.i4.1 - IL_0040: stfld int32 Linq101Quantifiers01/onlyOdd@32::pc + IL_002b: ldarg.0 + IL_002c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Quantifiers01::get_numbers() + IL_0031: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0036: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Quantifiers01/onlyOdd@32::'enum' + IL_003b: ldarg.0 + IL_003c: ldc.i4.1 + IL_003d: stfld int32 Linq101Quantifiers01/onlyOdd@32::pc .line 32,32 : 9,28 '' - IL_0045: ldarg.0 - IL_0046: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Quantifiers01/onlyOdd@32::'enum' - IL_004b: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0050: brfalse.s IL_0095 - - IL_0052: ldarg.0 - IL_0053: ldarg.0 - IL_0054: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Quantifiers01/onlyOdd@32::'enum' - IL_0059: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_005e: stfld int32 Linq101Quantifiers01/onlyOdd@32::_arg1 + IL_0042: ldarg.0 + IL_0043: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Quantifiers01/onlyOdd@32::'enum' + IL_0048: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_004d: brfalse.s IL_0070 + + IL_004f: ldarg.0 + IL_0050: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Quantifiers01/onlyOdd@32::'enum' + IL_0055: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_005a: stloc.0 .line 32,32 : 9,28 '' - IL_0063: ldarg.0 - IL_0064: ldarg.0 - IL_0065: ldfld int32 Linq101Quantifiers01/onlyOdd@32::_arg1 - IL_006a: stfld int32 Linq101Quantifiers01/onlyOdd@32::n - IL_006f: ldarg.0 - IL_0070: ldc.i4.2 - IL_0071: stfld int32 Linq101Quantifiers01/onlyOdd@32::pc + IL_005b: ldloc.0 + IL_005c: stloc.1 + IL_005d: ldarg.0 + IL_005e: ldc.i4.2 + IL_005f: stfld int32 Linq101Quantifiers01/onlyOdd@32::pc .line 33,33 : 9,24 '' - IL_0076: ldarg.0 - IL_0077: ldarg.0 - IL_0078: ldfld int32 Linq101Quantifiers01/onlyOdd@32::n - IL_007d: stfld int32 Linq101Quantifiers01/onlyOdd@32::current - IL_0082: ldc.i4.1 - IL_0083: ret - - IL_0084: ldarg.0 - IL_0085: ldc.i4.0 - IL_0086: stfld int32 Linq101Quantifiers01/onlyOdd@32::n - .line 32,32 : 9,28 '' - IL_008b: ldarg.0 - IL_008c: ldc.i4.0 - IL_008d: stfld int32 Linq101Quantifiers01/onlyOdd@32::_arg1 + IL_0064: ldarg.0 + IL_0065: ldloc.1 + IL_0066: stfld int32 Linq101Quantifiers01/onlyOdd@32::current + IL_006b: ldc.i4.1 + IL_006c: ret + .line 100001,100001 : 0,0 '' - IL_0092: nop - IL_0093: br.s IL_0045 + IL_006d: nop + IL_006e: br.s IL_0042 - IL_0095: ldarg.0 - IL_0096: ldc.i4.3 - IL_0097: stfld int32 Linq101Quantifiers01/onlyOdd@32::pc + IL_0070: ldarg.0 + IL_0071: ldc.i4.3 + IL_0072: stfld int32 Linq101Quantifiers01/onlyOdd@32::pc .line 32,32 : 9,28 '' - IL_009c: ldarg.0 - IL_009d: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Quantifiers01/onlyOdd@32::'enum' - IL_00a2: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_00a7: nop - IL_00a8: ldarg.0 - IL_00a9: ldnull - IL_00aa: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Quantifiers01/onlyOdd@32::'enum' - IL_00af: ldarg.0 - IL_00b0: ldc.i4.3 - IL_00b1: stfld int32 Linq101Quantifiers01/onlyOdd@32::pc - IL_00b6: ldarg.0 - IL_00b7: ldc.i4.0 - IL_00b8: stfld int32 Linq101Quantifiers01/onlyOdd@32::current - IL_00bd: ldc.i4.0 - IL_00be: ret + IL_0077: ldarg.0 + IL_0078: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Quantifiers01/onlyOdd@32::'enum' + IL_007d: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0082: nop + IL_0083: ldarg.0 + IL_0084: ldnull + IL_0085: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Quantifiers01/onlyOdd@32::'enum' + IL_008a: ldarg.0 + IL_008b: ldc.i4.3 + IL_008c: stfld int32 Linq101Quantifiers01/onlyOdd@32::pc + IL_0091: ldarg.0 + IL_0092: ldc.i4.0 + IL_0093: stfld int32 Linq101Quantifiers01/onlyOdd@32::current + IL_0098: ldc.i4.0 + IL_0099: ret } // end of method onlyOdd@32::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 150 (0x96) + // Code size 148 (0x94) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [FSharp.Core]Microsoft.FSharp.Core.Unit V_1, [2] class [mscorlib]System.Exception e) .line 100001,100001 : 0,0 '' - IL_0000: ldnull - IL_0001: stloc.0 - IL_0002: ldarg.0 - IL_0003: ldfld int32 Linq101Quantifiers01/onlyOdd@32::pc - IL_0008: ldc.i4.3 - IL_0009: sub - IL_000a: switch ( - IL_0015) - IL_0013: br.s IL_001b + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Quantifiers01/onlyOdd@32::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0019 .line 100001,100001 : 0,0 '' - IL_0015: nop - IL_0016: br IL_0089 + IL_0013: nop + IL_0014: br IL_0087 .line 100001,100001 : 0,0 '' - IL_001b: nop + IL_0019: nop .try { - IL_001c: ldarg.0 - IL_001d: ldfld int32 Linq101Quantifiers01/onlyOdd@32::pc - IL_0022: switch ( + IL_001a: ldarg.0 + IL_001b: ldfld int32 Linq101Quantifiers01/onlyOdd@32::pc + IL_0020: switch ( + IL_0037, IL_0039, IL_003b, - IL_003d, - IL_003f) - IL_0037: br.s IL_004d + IL_003d) + IL_0035: br.s IL_004b - IL_0039: br.s IL_0041 + IL_0037: br.s IL_003f - IL_003b: br.s IL_0044 + IL_0039: br.s IL_0042 - IL_003d: br.s IL_0047 + IL_003b: br.s IL_0045 - IL_003f: br.s IL_004a + IL_003d: br.s IL_0048 .line 100001,100001 : 0,0 '' - IL_0041: nop - IL_0042: br.s IL_0063 + IL_003f: nop + IL_0040: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_0044: nop - IL_0045: br.s IL_004f + IL_0042: nop + IL_0043: br.s IL_004d .line 100001,100001 : 0,0 '' - IL_0047: nop - IL_0048: br.s IL_004e + IL_0045: nop + IL_0046: br.s IL_004c .line 100001,100001 : 0,0 '' - IL_004a: nop - IL_004b: br.s IL_0063 + IL_0048: nop + IL_0049: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_004d: nop + IL_004b: nop .line 100001,100001 : 0,0 '' - IL_004e: nop - IL_004f: ldarg.0 - IL_0050: ldc.i4.3 - IL_0051: stfld int32 Linq101Quantifiers01/onlyOdd@32::pc - IL_0056: ldarg.0 - IL_0057: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Quantifiers01/onlyOdd@32::'enum' - IL_005c: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_0061: nop + IL_004c: nop + IL_004d: ldarg.0 + IL_004e: ldc.i4.3 + IL_004f: stfld int32 Linq101Quantifiers01/onlyOdd@32::pc + IL_0054: ldarg.0 + IL_0055: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Quantifiers01/onlyOdd@32::'enum' + IL_005a: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_005f: nop .line 100001,100001 : 0,0 '' - IL_0062: nop - IL_0063: ldarg.0 - IL_0064: ldc.i4.3 - IL_0065: stfld int32 Linq101Quantifiers01/onlyOdd@32::pc - IL_006a: ldarg.0 - IL_006b: ldc.i4.0 - IL_006c: stfld int32 Linq101Quantifiers01/onlyOdd@32::current - IL_0071: ldnull - IL_0072: stloc.1 - IL_0073: leave.s IL_0081 + IL_0060: nop + IL_0061: ldarg.0 + IL_0062: ldc.i4.3 + IL_0063: stfld int32 Linq101Quantifiers01/onlyOdd@32::pc + IL_0068: ldarg.0 + IL_0069: ldc.i4.0 + IL_006a: stfld int32 Linq101Quantifiers01/onlyOdd@32::current + IL_006f: ldnull + IL_0070: stloc.1 + IL_0071: leave.s IL_007f } // end .try catch [mscorlib]System.Object { - IL_0075: castclass [mscorlib]System.Exception - IL_007a: stloc.2 + IL_0073: castclass [mscorlib]System.Exception + IL_0078: stloc.2 .line 32,32 : 9,28 '' - IL_007b: ldloc.2 - IL_007c: stloc.0 - IL_007d: ldnull - IL_007e: stloc.1 - IL_007f: leave.s IL_0081 + IL_0079: ldloc.2 + IL_007a: stloc.0 + IL_007b: ldnull + IL_007c: stloc.1 + IL_007d: leave.s IL_007f .line 100001,100001 : 0,0 '' } // end handler - IL_0081: ldloc.1 - IL_0082: pop + IL_007f: ldloc.1 + IL_0080: pop .line 100001,100001 : 0,0 '' - IL_0083: nop - IL_0084: br IL_0002 + IL_0081: nop + IL_0082: br IL_0000 - IL_0089: ldloc.0 - IL_008a: ldnull - IL_008b: cgt.un - IL_008d: brfalse.s IL_0091 + IL_0087: ldloc.0 + IL_0088: ldnull + IL_0089: cgt.un + IL_008b: brfalse.s IL_008f - IL_008f: br.s IL_0093 + IL_008d: br.s IL_0091 - IL_0091: br.s IL_0095 + IL_008f: br.s IL_0093 .line 100001,100001 : 0,0 '' - IL_0093: ldloc.0 - IL_0094: throw + IL_0091: ldloc.0 + IL_0092: throw .line 100001,100001 : 0,0 '' - IL_0095: ret + IL_0093: ret } // end of method onlyOdd@32::Close .method public strict virtual instance bool @@ -1021,19 +969,15 @@ { .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 ) - // Code size 11 (0xb) - .maxstack 9 - IL_0000: ldc.i4.0 + // Code size 9 (0x9) + .maxstack 8 + IL_0000: ldnull IL_0001: ldc.i4.0 - IL_0002: ldnull - IL_0003: ldc.i4.0 - IL_0004: ldc.i4.0 - IL_0005: newobj instance void Linq101Quantifiers01/onlyOdd@32::.ctor(int32, - int32, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0002: ldc.i4.0 + IL_0003: newobj instance void Linq101Quantifiers01/onlyOdd@32::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, int32) - IL_000a: ret + IL_0008: ret } // end of method onlyOdd@32::GetFreshEnumerator } // end of class onlyOdd@32 @@ -1430,7 +1374,7 @@ .method public static void main@() cil managed { .entrypoint - // Code size 411 (0x19b) + // Code size 407 (0x197) .maxstack 10 .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 words, [1] bool iAfterE, @@ -1460,142 +1404,134 @@ IL_0033: stloc.0 IL_0034: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_0039: ldnull - IL_003a: ldnull + IL_003a: ldc.i4.0 IL_003b: ldnull - IL_003c: ldc.i4.0 - IL_003d: ldnull - IL_003e: newobj instance void Linq101Quantifiers01/iAfterE@12::.ctor(string, - string, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_003c: newobj instance void Linq101Quantifiers01/iAfterE@12::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, string) - IL_0043: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0048: newobj instance void Linq101Quantifiers01/'iAfterE@13-1'::.ctor() - IL_004d: callvirt instance bool [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Exists(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0041: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0046: newobj instance void Linq101Quantifiers01/'iAfterE@13-1'::.ctor() + IL_004b: callvirt instance bool [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Exists(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0052: dup - IL_0053: stsfld bool ''.$Linq101Quantifiers01::iAfterE@10 - IL_0058: stloc.1 + IL_0050: dup + IL_0051: stsfld bool ''.$Linq101Quantifiers01::iAfterE@10 + IL_0056: stloc.1 .line 17,17 : 1,32 '' - IL_0059: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [Utils]Utils::getProductList() - IL_005e: dup - IL_005f: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Quantifiers01::'products@17-10' - IL_0064: stloc.2 + IL_0057: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [Utils]Utils::getProductList() + IL_005c: dup + IL_005d: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Quantifiers01::'products@17-10' + IL_0062: stloc.2 .line 19,25 : 1,21 '' - IL_0065: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_006a: stloc.s V_7 + IL_0063: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_0068: stloc.s V_7 + IL_006a: ldloc.s V_7 IL_006c: ldloc.s V_7 IL_006e: ldloc.s V_7 IL_0070: ldloc.s V_7 IL_0072: ldloc.s V_7 IL_0074: ldloc.s V_7 - IL_0076: ldloc.s V_7 - IL_0078: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Quantifiers01::get_products() - IL_007d: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Source(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0082: ldloc.s V_7 - IL_0084: newobj instance void Linq101Quantifiers01/productGroups@21::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_0089: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0076: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Quantifiers01::get_products() + IL_007b: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Source(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0080: ldloc.s V_7 + IL_0082: newobj instance void Linq101Quantifiers01/productGroups@21::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_0087: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_008e: newobj instance void Linq101Quantifiers01/'productGroups@22-1'::.ctor() - IL_0093: newobj instance void Linq101Quantifiers01/'productGroups@22-2'::.ctor() - IL_0098: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,!!3> [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::GroupValBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_008c: newobj instance void Linq101Quantifiers01/'productGroups@22-1'::.ctor() + IL_0091: newobj instance void Linq101Quantifiers01/'productGroups@22-2'::.ctor() + IL_0096: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,!!3> [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::GroupValBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_009d: ldloc.s V_7 - IL_009f: newobj instance void Linq101Quantifiers01/'productGroups@22-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_00a4: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable,class [System.Core]System.Linq.IGrouping`2,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_009b: ldloc.s V_7 + IL_009d: newobj instance void Linq101Quantifiers01/'productGroups@22-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_00a2: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable,class [System.Core]System.Linq.IGrouping`2,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_00a9: newobj instance void Linq101Quantifiers01/'productGroups@23-4'::.ctor() - IL_00ae: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Where,class [mscorlib]System.Collections.IEnumerable>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_00a7: newobj instance void Linq101Quantifiers01/'productGroups@23-4'::.ctor() + IL_00ac: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Where,class [mscorlib]System.Collections.IEnumerable>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_00b3: newobj instance void Linq101Quantifiers01/'productGroups@24-6'::.ctor() - IL_00b8: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2>>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_00b1: newobj instance void Linq101Quantifiers01/'productGroups@24-6'::.ctor() + IL_00b6: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2>>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_00bd: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2>,class [mscorlib]System.Collections.IEnumerable>::get_Source() - IL_00c2: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>>(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_00c7: dup - IL_00c8: stsfld class [mscorlib]System.Tuple`2>[] ''.$Linq101Quantifiers01::productGroups@19 - IL_00cd: stloc.3 + IL_00bb: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2>,class [mscorlib]System.Collections.IEnumerable>::get_Source() + IL_00c0: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>>(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_00c5: dup + IL_00c6: stsfld class [mscorlib]System.Tuple`2>[] ''.$Linq101Quantifiers01::productGroups@19 + IL_00cb: stloc.3 .line 28,28 : 1,35 '' - IL_00ce: ldc.i4.1 - IL_00cf: ldc.i4.s 11 - IL_00d1: ldc.i4.3 - IL_00d2: ldc.i4.s 19 - IL_00d4: ldc.i4.s 41 - IL_00d6: ldc.i4.s 65 - IL_00d8: ldc.i4.s 19 - IL_00da: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() - IL_00df: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_00cc: ldc.i4.1 + IL_00cd: ldc.i4.s 11 + IL_00cf: ldc.i4.3 + IL_00d0: ldc.i4.s 19 + IL_00d2: ldc.i4.s 41 + IL_00d4: ldc.i4.s 65 + IL_00d6: ldc.i4.s 19 + IL_00d8: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_00dd: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_00e4: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_00e2: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_00e9: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_00e7: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_00ee: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_00ec: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_00f3: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_00f1: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_00f8: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_00f6: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_00fd: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_00fb: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_0102: dup - IL_0103: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Quantifiers01::'numbers@28-7' - IL_0108: stloc.s numbers - IL_010a: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_0100: dup + IL_0101: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Quantifiers01::'numbers@28-7' + IL_0106: stloc.s numbers + IL_0108: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_010d: ldnull + IL_010e: ldc.i4.0 IL_010f: ldc.i4.0 - IL_0110: ldc.i4.0 - IL_0111: ldnull - IL_0112: ldc.i4.0 - IL_0113: ldc.i4.0 - IL_0114: newobj instance void Linq101Quantifiers01/onlyOdd@32::.ctor(int32, - int32, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0110: newobj instance void Linq101Quantifiers01/onlyOdd@32::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, int32) - IL_0119: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_011e: newobj instance void Linq101Quantifiers01/'onlyOdd@33-1'::.ctor() - IL_0123: callvirt instance bool [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::All(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0115: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_011a: newobj instance void Linq101Quantifiers01/'onlyOdd@33-1'::.ctor() + IL_011f: callvirt instance bool [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::All(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0128: dup - IL_0129: stsfld bool ''.$Linq101Quantifiers01::onlyOdd@30 - IL_012e: stloc.s onlyOdd + IL_0124: dup + IL_0125: stsfld bool ''.$Linq101Quantifiers01::onlyOdd@30 + IL_012a: stloc.s onlyOdd .line 37,43 : 1,21 '' - IL_0130: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_0135: stloc.s V_8 + IL_012c: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_0131: stloc.s V_8 + IL_0133: ldloc.s V_8 + IL_0135: ldloc.s V_8 IL_0137: ldloc.s V_8 IL_0139: ldloc.s V_8 IL_013b: ldloc.s V_8 IL_013d: ldloc.s V_8 - IL_013f: ldloc.s V_8 - IL_0141: ldloc.s V_8 - IL_0143: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Quantifiers01::get_products() - IL_0148: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Source(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_014d: ldloc.s V_8 - IL_014f: newobj instance void Linq101Quantifiers01/productGroups2@39::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_0154: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_013f: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Quantifiers01::get_products() + IL_0144: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Source(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0149: ldloc.s V_8 + IL_014b: newobj instance void Linq101Quantifiers01/productGroups2@39::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_0150: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0159: newobj instance void Linq101Quantifiers01/'productGroups2@40-1'::.ctor() - IL_015e: newobj instance void Linq101Quantifiers01/'productGroups2@40-2'::.ctor() - IL_0163: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,!!3> [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::GroupValBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0155: newobj instance void Linq101Quantifiers01/'productGroups2@40-1'::.ctor() + IL_015a: newobj instance void Linq101Quantifiers01/'productGroups2@40-2'::.ctor() + IL_015f: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,!!3> [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::GroupValBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0168: ldloc.s V_8 - IL_016a: newobj instance void Linq101Quantifiers01/'productGroups2@40-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_016f: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable,class [System.Core]System.Linq.IGrouping`2,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0164: ldloc.s V_8 + IL_0166: newobj instance void Linq101Quantifiers01/'productGroups2@40-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_016b: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable,class [System.Core]System.Linq.IGrouping`2,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0174: newobj instance void Linq101Quantifiers01/'productGroups2@41-4'::.ctor() - IL_0179: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Where,class [mscorlib]System.Collections.IEnumerable>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0170: newobj instance void Linq101Quantifiers01/'productGroups2@41-4'::.ctor() + IL_0175: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Where,class [mscorlib]System.Collections.IEnumerable>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_017e: newobj instance void Linq101Quantifiers01/'productGroups2@42-6'::.ctor() - IL_0183: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2>>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_017a: newobj instance void Linq101Quantifiers01/'productGroups2@42-6'::.ctor() + IL_017f: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2>>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0188: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2>,class [mscorlib]System.Collections.IEnumerable>::get_Source() - IL_018d: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>>(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0192: dup - IL_0193: stsfld class [mscorlib]System.Tuple`2>[] ''.$Linq101Quantifiers01::productGroups2@37 - IL_0198: stloc.s productGroups2 - IL_019a: ret + IL_0184: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2>,class [mscorlib]System.Collections.IEnumerable>::get_Source() + IL_0189: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>>(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_018e: dup + IL_018f: stsfld class [mscorlib]System.Tuple`2>[] ''.$Linq101Quantifiers01::productGroups2@37 + IL_0194: stloc.s productGroups2 + IL_0196: ret } // end of method $Linq101Quantifiers01::main@ } // end of class ''.$Linq101Quantifiers01 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Select01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Select01.il.bsl index 40268338b88..8afae23a726 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Select01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Select01.il.bsl @@ -13,7 +13,7 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 4:4:1:0 + .ver 4:5:0:0 } .assembly extern Utils { @@ -33,20 +33,20 @@ } .mresource public FSharpSignatureData.Linq101Select01 { - // Offset: 0x00000000 Length: 0x00000641 + // Offset: 0x00000000 Length: 0x00000663 } .mresource public FSharpOptimizationData.Linq101Select01 { - // Offset: 0x00000648 Length: 0x00000204 + // Offset: 0x00000668 Length: 0x00000204 } .module Linq101Select01.exe -// MVID: {5A1F62A6-6057-8F80-A745-0383A6621F5A} +// MVID: {5B9A632A-6057-8F80-A745-03832A639A5B} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x00F30000 +// Image base: 0x00FF0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -77,7 +77,7 @@ .maxstack 5 .locals init ([0] int32 n) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 12,12 : 9,28 'C:\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\QueryExpressionStepping\\Linq101Select01.fs' + .line 12,12 : 9,28 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\QueryExpressionStepping\\Linq101Select01.fs' IL_0000: ldarg.1 IL_0001: stloc.0 .line 13,13 : 9,23 '' @@ -93,7 +93,6 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) - .field public int32 n .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' .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 ) @@ -107,35 +106,32 @@ .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 specialname rtspecialname - instance void .ctor(int32 n, - class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', int32 pc, int32 current) cil managed { - // Code size 36 (0x24) + // Code size 28 (0x1c) .maxstack 8 IL_0000: ldarg.0 IL_0001: ldarg.1 - IL_0002: stfld int32 Linq101Select01/numsPlusOne@13::n + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/numsPlusOne@13::'enum' IL_0007: ldarg.0 IL_0008: ldarg.2 - IL_0009: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/numsPlusOne@13::'enum' + IL_0009: stfld int32 Linq101Select01/numsPlusOne@13::pc IL_000e: ldarg.0 IL_000f: ldarg.3 - IL_0010: stfld int32 Linq101Select01/numsPlusOne@13::pc + IL_0010: stfld int32 Linq101Select01/numsPlusOne@13::current IL_0015: ldarg.0 - IL_0016: ldarg.s current - IL_0018: stfld int32 Linq101Select01/numsPlusOne@13::current - IL_001d: ldarg.0 - IL_001e: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() - IL_0023: ret + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_001b: ret } // end of method numsPlusOne@13::.ctor .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 184 (0xb8) + // Code size 164 (0xa4) .maxstack 7 + .locals init ([0] int32 n) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 IL_0001: ldfld int32 Linq101Select01/numsPlusOne@13::pc @@ -145,7 +141,7 @@ IL_001b, IL_001d, IL_001f) - IL_0019: br.s IL_002d + IL_0019: br.s IL_002a IL_001b: br.s IL_0021 @@ -155,200 +151,192 @@ .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br.s IL_008e + IL_0022: br.s IL_007a .line 100001,100001 : 0,0 '' IL_0024: nop - IL_0025: br.s IL_0084 + IL_0025: br.s IL_0077 .line 100001,100001 : 0,0 '' IL_0027: nop - IL_0028: br IL_00af + IL_0028: br.s IL_009b .line 100001,100001 : 0,0 '' - IL_002d: nop + IL_002a: nop .line 13,13 : 9,23 '' - IL_002e: ldarg.0 - IL_002f: newobj instance void Linq101Select01/'numsPlusOne@12-1'::.ctor() - IL_0034: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_numbers() - IL_0039: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::Collect,int32>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + IL_002b: ldarg.0 + IL_002c: newobj instance void Linq101Select01/'numsPlusOne@12-1'::.ctor() + IL_0031: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_numbers() + IL_0036: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::Collect,int32>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_003e: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0043: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/numsPlusOne@13::'enum' - IL_0048: ldarg.0 - IL_0049: ldc.i4.1 - IL_004a: stfld int32 Linq101Select01/numsPlusOne@13::pc + IL_003b: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0040: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/numsPlusOne@13::'enum' + IL_0045: ldarg.0 + IL_0046: ldc.i4.1 + IL_0047: stfld int32 Linq101Select01/numsPlusOne@13::pc .line 13,13 : 9,23 '' - IL_004f: ldarg.0 - IL_0050: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/numsPlusOne@13::'enum' - IL_0055: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_005a: brfalse.s IL_008e - - IL_005c: ldarg.0 - IL_005d: ldarg.0 - IL_005e: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/numsPlusOne@13::'enum' - IL_0063: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0068: stfld int32 Linq101Select01/numsPlusOne@13::n - IL_006d: ldarg.0 - IL_006e: ldc.i4.2 - IL_006f: stfld int32 Linq101Select01/numsPlusOne@13::pc + IL_004c: ldarg.0 + IL_004d: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/numsPlusOne@13::'enum' + IL_0052: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_0057: brfalse.s IL_007a + + IL_0059: ldarg.0 + IL_005a: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/numsPlusOne@13::'enum' + IL_005f: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0064: stloc.0 + IL_0065: ldarg.0 + IL_0066: ldc.i4.2 + IL_0067: stfld int32 Linq101Select01/numsPlusOne@13::pc .line 13,13 : 17,22 '' - IL_0074: ldarg.0 - IL_0075: ldarg.0 - IL_0076: ldfld int32 Linq101Select01/numsPlusOne@13::n - IL_007b: ldc.i4.1 - IL_007c: add - IL_007d: stfld int32 Linq101Select01/numsPlusOne@13::current - IL_0082: ldc.i4.1 - IL_0083: ret + IL_006c: ldarg.0 + IL_006d: ldloc.0 + IL_006e: ldc.i4.1 + IL_006f: add + IL_0070: stfld int32 Linq101Select01/numsPlusOne@13::current + IL_0075: ldc.i4.1 + IL_0076: ret - .line 13,13 : 9,23 '' - IL_0084: ldarg.0 - IL_0085: ldc.i4.0 - IL_0086: stfld int32 Linq101Select01/numsPlusOne@13::n .line 100001,100001 : 0,0 '' - IL_008b: nop - IL_008c: br.s IL_004f + IL_0077: nop + IL_0078: br.s IL_004c - IL_008e: ldarg.0 - IL_008f: ldc.i4.3 - IL_0090: stfld int32 Linq101Select01/numsPlusOne@13::pc + IL_007a: ldarg.0 + IL_007b: ldc.i4.3 + IL_007c: stfld int32 Linq101Select01/numsPlusOne@13::pc .line 13,13 : 9,23 '' - IL_0095: ldarg.0 - IL_0096: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/numsPlusOne@13::'enum' - IL_009b: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_00a0: nop - IL_00a1: ldarg.0 - IL_00a2: ldnull - IL_00a3: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/numsPlusOne@13::'enum' - IL_00a8: ldarg.0 - IL_00a9: ldc.i4.3 - IL_00aa: stfld int32 Linq101Select01/numsPlusOne@13::pc - IL_00af: ldarg.0 - IL_00b0: ldc.i4.0 - IL_00b1: stfld int32 Linq101Select01/numsPlusOne@13::current - IL_00b6: ldc.i4.0 - IL_00b7: ret + IL_0081: ldarg.0 + IL_0082: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/numsPlusOne@13::'enum' + IL_0087: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_008c: nop + IL_008d: ldarg.0 + IL_008e: ldnull + IL_008f: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/numsPlusOne@13::'enum' + IL_0094: ldarg.0 + IL_0095: ldc.i4.3 + IL_0096: stfld int32 Linq101Select01/numsPlusOne@13::pc + IL_009b: ldarg.0 + IL_009c: ldc.i4.0 + IL_009d: stfld int32 Linq101Select01/numsPlusOne@13::current + IL_00a2: ldc.i4.0 + IL_00a3: ret } // end of method numsPlusOne@13::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 150 (0x96) + // Code size 148 (0x94) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [FSharp.Core]Microsoft.FSharp.Core.Unit V_1, [2] class [mscorlib]System.Exception e) .line 100001,100001 : 0,0 '' - IL_0000: ldnull - IL_0001: stloc.0 - IL_0002: ldarg.0 - IL_0003: ldfld int32 Linq101Select01/numsPlusOne@13::pc - IL_0008: ldc.i4.3 - IL_0009: sub - IL_000a: switch ( - IL_0015) - IL_0013: br.s IL_001b + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Select01/numsPlusOne@13::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0019 .line 100001,100001 : 0,0 '' - IL_0015: nop - IL_0016: br IL_0089 + IL_0013: nop + IL_0014: br IL_0087 .line 100001,100001 : 0,0 '' - IL_001b: nop + IL_0019: nop .try { - IL_001c: ldarg.0 - IL_001d: ldfld int32 Linq101Select01/numsPlusOne@13::pc - IL_0022: switch ( + IL_001a: ldarg.0 + IL_001b: ldfld int32 Linq101Select01/numsPlusOne@13::pc + IL_0020: switch ( + IL_0037, IL_0039, IL_003b, - IL_003d, - IL_003f) - IL_0037: br.s IL_004d + IL_003d) + IL_0035: br.s IL_004b - IL_0039: br.s IL_0041 + IL_0037: br.s IL_003f - IL_003b: br.s IL_0044 + IL_0039: br.s IL_0042 - IL_003d: br.s IL_0047 + IL_003b: br.s IL_0045 - IL_003f: br.s IL_004a + IL_003d: br.s IL_0048 .line 100001,100001 : 0,0 '' - IL_0041: nop - IL_0042: br.s IL_0063 + IL_003f: nop + IL_0040: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_0044: nop - IL_0045: br.s IL_004f + IL_0042: nop + IL_0043: br.s IL_004d .line 100001,100001 : 0,0 '' - IL_0047: nop - IL_0048: br.s IL_004e + IL_0045: nop + IL_0046: br.s IL_004c .line 100001,100001 : 0,0 '' - IL_004a: nop - IL_004b: br.s IL_0063 + IL_0048: nop + IL_0049: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_004d: nop + IL_004b: nop .line 100001,100001 : 0,0 '' - IL_004e: nop - IL_004f: ldarg.0 - IL_0050: ldc.i4.3 - IL_0051: stfld int32 Linq101Select01/numsPlusOne@13::pc - IL_0056: ldarg.0 - IL_0057: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/numsPlusOne@13::'enum' - IL_005c: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_0061: nop + IL_004c: nop + IL_004d: ldarg.0 + IL_004e: ldc.i4.3 + IL_004f: stfld int32 Linq101Select01/numsPlusOne@13::pc + IL_0054: ldarg.0 + IL_0055: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/numsPlusOne@13::'enum' + IL_005a: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_005f: nop .line 100001,100001 : 0,0 '' - IL_0062: nop - IL_0063: ldarg.0 - IL_0064: ldc.i4.3 - IL_0065: stfld int32 Linq101Select01/numsPlusOne@13::pc - IL_006a: ldarg.0 - IL_006b: ldc.i4.0 - IL_006c: stfld int32 Linq101Select01/numsPlusOne@13::current - IL_0071: ldnull - IL_0072: stloc.1 - IL_0073: leave.s IL_0081 + IL_0060: nop + IL_0061: ldarg.0 + IL_0062: ldc.i4.3 + IL_0063: stfld int32 Linq101Select01/numsPlusOne@13::pc + IL_0068: ldarg.0 + IL_0069: ldc.i4.0 + IL_006a: stfld int32 Linq101Select01/numsPlusOne@13::current + IL_006f: ldnull + IL_0070: stloc.1 + IL_0071: leave.s IL_007f } // end .try catch [mscorlib]System.Object { - IL_0075: castclass [mscorlib]System.Exception - IL_007a: stloc.2 + IL_0073: castclass [mscorlib]System.Exception + IL_0078: stloc.2 .line 13,13 : 9,23 '' - IL_007b: ldloc.2 - IL_007c: stloc.0 - IL_007d: ldnull - IL_007e: stloc.1 - IL_007f: leave.s IL_0081 + IL_0079: ldloc.2 + IL_007a: stloc.0 + IL_007b: ldnull + IL_007c: stloc.1 + IL_007d: leave.s IL_007f .line 100001,100001 : 0,0 '' } // end handler - IL_0081: ldloc.1 - IL_0082: pop + IL_007f: ldloc.1 + IL_0080: pop .line 100001,100001 : 0,0 '' - IL_0083: nop - IL_0084: br IL_0002 + IL_0081: nop + IL_0082: br IL_0000 - IL_0089: ldloc.0 - IL_008a: ldnull - IL_008b: cgt.un - IL_008d: brfalse.s IL_0091 + IL_0087: ldloc.0 + IL_0088: ldnull + IL_0089: cgt.un + IL_008b: brfalse.s IL_008f - IL_008f: br.s IL_0093 + IL_008d: br.s IL_0091 - IL_0091: br.s IL_0095 + IL_008f: br.s IL_0093 .line 100001,100001 : 0,0 '' - IL_0093: ldloc.0 - IL_0094: throw + IL_0091: ldloc.0 + IL_0092: throw .line 100001,100001 : 0,0 '' - IL_0095: ret + IL_0093: ret } // end of method numsPlusOne@13::Close .method public strict virtual instance bool @@ -419,17 +407,15 @@ { .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 ) - // Code size 10 (0xa) + // Code size 9 (0x9) .maxstack 8 - IL_0000: ldc.i4.0 - IL_0001: ldnull + IL_0000: ldnull + IL_0001: ldc.i4.0 IL_0002: ldc.i4.0 - IL_0003: ldc.i4.0 - IL_0004: newobj instance void Linq101Select01/numsPlusOne@13::.ctor(int32, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0003: newobj instance void Linq101Select01/numsPlusOne@13::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, int32) - IL_0009: ret + IL_0008: ret } // end of method numsPlusOne@13::GetFreshEnumerator } // end of class numsPlusOne@13 @@ -471,7 +457,6 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) - .field public class [Utils]Utils/Product p .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' .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 ) @@ -485,35 +470,32 @@ .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 specialname rtspecialname - instance void .ctor(class [Utils]Utils/Product p, - class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', int32 pc, string current) cil managed { - // Code size 36 (0x24) + // Code size 28 (0x1c) .maxstack 8 IL_0000: ldarg.0 IL_0001: ldarg.1 - IL_0002: stfld class [Utils]Utils/Product Linq101Select01/productNames@22::p + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/productNames@22::'enum' IL_0007: ldarg.0 IL_0008: ldarg.2 - IL_0009: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/productNames@22::'enum' + IL_0009: stfld int32 Linq101Select01/productNames@22::pc IL_000e: ldarg.0 IL_000f: ldarg.3 - IL_0010: stfld int32 Linq101Select01/productNames@22::pc + IL_0010: stfld string Linq101Select01/productNames@22::current IL_0015: ldarg.0 - IL_0016: ldarg.s current - IL_0018: stfld string Linq101Select01/productNames@22::current - IL_001d: ldarg.0 - IL_001e: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() - IL_0023: ret + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_001b: ret } // end of method productNames@22::.ctor .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 187 (0xbb) + // Code size 167 (0xa7) .maxstack 7 + .locals init ([0] class [Utils]Utils/Product p) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 IL_0001: ldfld int32 Linq101Select01/productNames@22::pc @@ -523,7 +505,7 @@ IL_001b, IL_001d, IL_001f) - IL_0019: br.s IL_002d + IL_0019: br.s IL_002a IL_001b: br.s IL_0021 @@ -533,199 +515,191 @@ .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br.s IL_0091 + IL_0022: br.s IL_007d .line 100001,100001 : 0,0 '' IL_0024: nop - IL_0025: br.s IL_0087 + IL_0025: br.s IL_007a .line 100001,100001 : 0,0 '' IL_0027: nop - IL_0028: br IL_00b2 + IL_0028: br.s IL_009e .line 100001,100001 : 0,0 '' - IL_002d: nop + IL_002a: nop .line 22,22 : 9,31 '' - IL_002e: ldarg.0 - IL_002f: newobj instance void Linq101Select01/'productNames@21-1'::.ctor() - IL_0034: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_products() - IL_0039: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::Collect,class [Utils]Utils/Product>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + IL_002b: ldarg.0 + IL_002c: newobj instance void Linq101Select01/'productNames@21-1'::.ctor() + IL_0031: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_products() + IL_0036: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::Collect,class [Utils]Utils/Product>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_003e: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0043: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/productNames@22::'enum' - IL_0048: ldarg.0 - IL_0049: ldc.i4.1 - IL_004a: stfld int32 Linq101Select01/productNames@22::pc + IL_003b: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0040: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/productNames@22::'enum' + IL_0045: ldarg.0 + IL_0046: ldc.i4.1 + IL_0047: stfld int32 Linq101Select01/productNames@22::pc .line 22,22 : 9,31 '' - IL_004f: ldarg.0 - IL_0050: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/productNames@22::'enum' - IL_0055: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_005a: brfalse.s IL_0091 - - IL_005c: ldarg.0 - IL_005d: ldarg.0 - IL_005e: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/productNames@22::'enum' - IL_0063: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0068: stfld class [Utils]Utils/Product Linq101Select01/productNames@22::p - IL_006d: ldarg.0 - IL_006e: ldc.i4.2 - IL_006f: stfld int32 Linq101Select01/productNames@22::pc + IL_004c: ldarg.0 + IL_004d: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/productNames@22::'enum' + IL_0052: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_0057: brfalse.s IL_007d + + IL_0059: ldarg.0 + IL_005a: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/productNames@22::'enum' + IL_005f: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0064: stloc.0 + IL_0065: ldarg.0 + IL_0066: ldc.i4.2 + IL_0067: stfld int32 Linq101Select01/productNames@22::pc .line 22,22 : 17,30 '' - IL_0074: ldarg.0 - IL_0075: ldarg.0 - IL_0076: ldfld class [Utils]Utils/Product Linq101Select01/productNames@22::p - IL_007b: callvirt instance string [Utils]Utils/Product::get_ProductName() - IL_0080: stfld string Linq101Select01/productNames@22::current - IL_0085: ldc.i4.1 - IL_0086: ret + IL_006c: ldarg.0 + IL_006d: ldloc.0 + IL_006e: callvirt instance string [Utils]Utils/Product::get_ProductName() + IL_0073: stfld string Linq101Select01/productNames@22::current + IL_0078: ldc.i4.1 + IL_0079: ret - .line 22,22 : 9,31 '' - IL_0087: ldarg.0 - IL_0088: ldnull - IL_0089: stfld class [Utils]Utils/Product Linq101Select01/productNames@22::p .line 100001,100001 : 0,0 '' - IL_008e: nop - IL_008f: br.s IL_004f + IL_007a: nop + IL_007b: br.s IL_004c - IL_0091: ldarg.0 - IL_0092: ldc.i4.3 - IL_0093: stfld int32 Linq101Select01/productNames@22::pc + IL_007d: ldarg.0 + IL_007e: ldc.i4.3 + IL_007f: stfld int32 Linq101Select01/productNames@22::pc .line 22,22 : 9,31 '' - IL_0098: ldarg.0 - IL_0099: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/productNames@22::'enum' - IL_009e: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_00a3: nop - IL_00a4: ldarg.0 - IL_00a5: ldnull - IL_00a6: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/productNames@22::'enum' - IL_00ab: ldarg.0 - IL_00ac: ldc.i4.3 - IL_00ad: stfld int32 Linq101Select01/productNames@22::pc - IL_00b2: ldarg.0 - IL_00b3: ldnull - IL_00b4: stfld string Linq101Select01/productNames@22::current - IL_00b9: ldc.i4.0 - IL_00ba: ret + IL_0084: ldarg.0 + IL_0085: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/productNames@22::'enum' + IL_008a: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_008f: nop + IL_0090: ldarg.0 + IL_0091: ldnull + IL_0092: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/productNames@22::'enum' + IL_0097: ldarg.0 + IL_0098: ldc.i4.3 + IL_0099: stfld int32 Linq101Select01/productNames@22::pc + IL_009e: ldarg.0 + IL_009f: ldnull + IL_00a0: stfld string Linq101Select01/productNames@22::current + IL_00a5: ldc.i4.0 + IL_00a6: ret } // end of method productNames@22::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 150 (0x96) + // Code size 148 (0x94) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [FSharp.Core]Microsoft.FSharp.Core.Unit V_1, [2] class [mscorlib]System.Exception e) .line 100001,100001 : 0,0 '' - IL_0000: ldnull - IL_0001: stloc.0 - IL_0002: ldarg.0 - IL_0003: ldfld int32 Linq101Select01/productNames@22::pc - IL_0008: ldc.i4.3 - IL_0009: sub - IL_000a: switch ( - IL_0015) - IL_0013: br.s IL_001b + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Select01/productNames@22::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0019 .line 100001,100001 : 0,0 '' - IL_0015: nop - IL_0016: br IL_0089 + IL_0013: nop + IL_0014: br IL_0087 .line 100001,100001 : 0,0 '' - IL_001b: nop + IL_0019: nop .try { - IL_001c: ldarg.0 - IL_001d: ldfld int32 Linq101Select01/productNames@22::pc - IL_0022: switch ( + IL_001a: ldarg.0 + IL_001b: ldfld int32 Linq101Select01/productNames@22::pc + IL_0020: switch ( + IL_0037, IL_0039, IL_003b, - IL_003d, - IL_003f) - IL_0037: br.s IL_004d + IL_003d) + IL_0035: br.s IL_004b - IL_0039: br.s IL_0041 + IL_0037: br.s IL_003f - IL_003b: br.s IL_0044 + IL_0039: br.s IL_0042 - IL_003d: br.s IL_0047 + IL_003b: br.s IL_0045 - IL_003f: br.s IL_004a + IL_003d: br.s IL_0048 .line 100001,100001 : 0,0 '' - IL_0041: nop - IL_0042: br.s IL_0063 + IL_003f: nop + IL_0040: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_0044: nop - IL_0045: br.s IL_004f + IL_0042: nop + IL_0043: br.s IL_004d .line 100001,100001 : 0,0 '' - IL_0047: nop - IL_0048: br.s IL_004e + IL_0045: nop + IL_0046: br.s IL_004c .line 100001,100001 : 0,0 '' - IL_004a: nop - IL_004b: br.s IL_0063 + IL_0048: nop + IL_0049: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_004d: nop + IL_004b: nop .line 100001,100001 : 0,0 '' - IL_004e: nop - IL_004f: ldarg.0 - IL_0050: ldc.i4.3 - IL_0051: stfld int32 Linq101Select01/productNames@22::pc - IL_0056: ldarg.0 - IL_0057: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/productNames@22::'enum' - IL_005c: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_0061: nop + IL_004c: nop + IL_004d: ldarg.0 + IL_004e: ldc.i4.3 + IL_004f: stfld int32 Linq101Select01/productNames@22::pc + IL_0054: ldarg.0 + IL_0055: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/productNames@22::'enum' + IL_005a: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_005f: nop .line 100001,100001 : 0,0 '' - IL_0062: nop - IL_0063: ldarg.0 - IL_0064: ldc.i4.3 - IL_0065: stfld int32 Linq101Select01/productNames@22::pc - IL_006a: ldarg.0 - IL_006b: ldnull - IL_006c: stfld string Linq101Select01/productNames@22::current - IL_0071: ldnull - IL_0072: stloc.1 - IL_0073: leave.s IL_0081 + IL_0060: nop + IL_0061: ldarg.0 + IL_0062: ldc.i4.3 + IL_0063: stfld int32 Linq101Select01/productNames@22::pc + IL_0068: ldarg.0 + IL_0069: ldnull + IL_006a: stfld string Linq101Select01/productNames@22::current + IL_006f: ldnull + IL_0070: stloc.1 + IL_0071: leave.s IL_007f } // end .try catch [mscorlib]System.Object { - IL_0075: castclass [mscorlib]System.Exception - IL_007a: stloc.2 + IL_0073: castclass [mscorlib]System.Exception + IL_0078: stloc.2 .line 22,22 : 9,31 '' - IL_007b: ldloc.2 - IL_007c: stloc.0 - IL_007d: ldnull - IL_007e: stloc.1 - IL_007f: leave.s IL_0081 + IL_0079: ldloc.2 + IL_007a: stloc.0 + IL_007b: ldnull + IL_007c: stloc.1 + IL_007d: leave.s IL_007f .line 100001,100001 : 0,0 '' } // end handler - IL_0081: ldloc.1 - IL_0082: pop + IL_007f: ldloc.1 + IL_0080: pop .line 100001,100001 : 0,0 '' - IL_0083: nop - IL_0084: br IL_0002 + IL_0081: nop + IL_0082: br IL_0000 - IL_0089: ldloc.0 - IL_008a: ldnull - IL_008b: cgt.un - IL_008d: brfalse.s IL_0091 + IL_0087: ldloc.0 + IL_0088: ldnull + IL_0089: cgt.un + IL_008b: brfalse.s IL_008f - IL_008f: br.s IL_0093 + IL_008d: br.s IL_0091 - IL_0091: br.s IL_0095 + IL_008f: br.s IL_0093 .line 100001,100001 : 0,0 '' - IL_0093: ldloc.0 - IL_0094: throw + IL_0091: ldloc.0 + IL_0092: throw .line 100001,100001 : 0,0 '' - IL_0095: ret + IL_0093: ret } // end of method productNames@22::Close .method public strict virtual instance bool @@ -796,17 +770,15 @@ { .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 ) - // Code size 10 (0xa) + // Code size 9 (0x9) .maxstack 8 IL_0000: ldnull - IL_0001: ldnull - IL_0002: ldc.i4.0 - IL_0003: ldnull - IL_0004: newobj instance void Linq101Select01/productNames@22::.ctor(class [Utils]Utils/Product, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0001: ldc.i4.0 + IL_0002: ldnull + IL_0003: newobj instance void Linq101Select01/productNames@22::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, string) - IL_0009: ret + IL_0008: ret } // end of method productNames@22::GetFreshEnumerator } // end of class productNames@22 @@ -848,7 +820,6 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) - .field public int32 n .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' .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 ) @@ -862,35 +833,32 @@ .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 specialname rtspecialname - instance void .ctor(int32 n, - class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', int32 pc, string current) cil managed { - // Code size 36 (0x24) + // Code size 28 (0x1c) .maxstack 8 IL_0000: ldarg.0 IL_0001: ldarg.1 - IL_0002: stfld int32 Linq101Select01/textNums@30::n + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/textNums@30::'enum' IL_0007: ldarg.0 IL_0008: ldarg.2 - IL_0009: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/textNums@30::'enum' + IL_0009: stfld int32 Linq101Select01/textNums@30::pc IL_000e: ldarg.0 IL_000f: ldarg.3 - IL_0010: stfld int32 Linq101Select01/textNums@30::pc + IL_0010: stfld string Linq101Select01/textNums@30::current IL_0015: ldarg.0 - IL_0016: ldarg.s current - IL_0018: stfld string Linq101Select01/textNums@30::current - IL_001d: ldarg.0 - IL_001e: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() - IL_0023: ret + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_001b: ret } // end of method textNums@30::.ctor .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 192 (0xc0) + // Code size 172 (0xac) .maxstack 7 + .locals init ([0] int32 n) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 IL_0001: ldfld int32 Linq101Select01/textNums@30::pc @@ -900,7 +868,7 @@ IL_001b, IL_001d, IL_001f) - IL_0019: br.s IL_002d + IL_0019: br.s IL_002a IL_001b: br.s IL_0021 @@ -910,200 +878,192 @@ .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br.s IL_0096 + IL_0022: br.s IL_0082 .line 100001,100001 : 0,0 '' IL_0024: nop - IL_0025: br.s IL_008c + IL_0025: br.s IL_007f .line 100001,100001 : 0,0 '' IL_0027: nop - IL_0028: br IL_00b7 + IL_0028: br.s IL_00a3 .line 100001,100001 : 0,0 '' - IL_002d: nop + IL_002a: nop .line 30,30 : 9,29 '' - IL_002e: ldarg.0 - IL_002f: newobj instance void Linq101Select01/'textNums@29-1'::.ctor() - IL_0034: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_numbers() - IL_0039: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::Collect,int32>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + IL_002b: ldarg.0 + IL_002c: newobj instance void Linq101Select01/'textNums@29-1'::.ctor() + IL_0031: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_numbers() + IL_0036: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::Collect,int32>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_003e: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0043: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/textNums@30::'enum' - IL_0048: ldarg.0 - IL_0049: ldc.i4.1 - IL_004a: stfld int32 Linq101Select01/textNums@30::pc + IL_003b: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0040: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/textNums@30::'enum' + IL_0045: ldarg.0 + IL_0046: ldc.i4.1 + IL_0047: stfld int32 Linq101Select01/textNums@30::pc .line 30,30 : 9,29 '' - IL_004f: ldarg.0 - IL_0050: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/textNums@30::'enum' - IL_0055: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_005a: brfalse.s IL_0096 - - IL_005c: ldarg.0 - IL_005d: ldarg.0 - IL_005e: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/textNums@30::'enum' - IL_0063: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0068: stfld int32 Linq101Select01/textNums@30::n - IL_006d: ldarg.0 - IL_006e: ldc.i4.2 - IL_006f: stfld int32 Linq101Select01/textNums@30::pc + IL_004c: ldarg.0 + IL_004d: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/textNums@30::'enum' + IL_0052: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_0057: brfalse.s IL_0082 + + IL_0059: ldarg.0 + IL_005a: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/textNums@30::'enum' + IL_005f: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0064: stloc.0 + IL_0065: ldarg.0 + IL_0066: ldc.i4.2 + IL_0067: stfld int32 Linq101Select01/textNums@30::pc .line 30,30 : 17,28 '' - IL_0074: ldarg.0 - IL_0075: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_strings() - IL_007a: ldarg.0 - IL_007b: ldfld int32 Linq101Select01/textNums@30::n - IL_0080: callvirt instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Item(int32) - IL_0085: stfld string Linq101Select01/textNums@30::current - IL_008a: ldc.i4.1 - IL_008b: ret + IL_006c: ldarg.0 + IL_006d: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_strings() + IL_0072: ldloc.0 + IL_0073: callvirt instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Item(int32) + IL_0078: stfld string Linq101Select01/textNums@30::current + IL_007d: ldc.i4.1 + IL_007e: ret - .line 30,30 : 9,29 '' - IL_008c: ldarg.0 - IL_008d: ldc.i4.0 - IL_008e: stfld int32 Linq101Select01/textNums@30::n .line 100001,100001 : 0,0 '' - IL_0093: nop - IL_0094: br.s IL_004f + IL_007f: nop + IL_0080: br.s IL_004c - IL_0096: ldarg.0 - IL_0097: ldc.i4.3 - IL_0098: stfld int32 Linq101Select01/textNums@30::pc + IL_0082: ldarg.0 + IL_0083: ldc.i4.3 + IL_0084: stfld int32 Linq101Select01/textNums@30::pc .line 30,30 : 9,29 '' - IL_009d: ldarg.0 - IL_009e: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/textNums@30::'enum' - IL_00a3: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_00a8: nop - IL_00a9: ldarg.0 - IL_00aa: ldnull - IL_00ab: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/textNums@30::'enum' - IL_00b0: ldarg.0 - IL_00b1: ldc.i4.3 - IL_00b2: stfld int32 Linq101Select01/textNums@30::pc - IL_00b7: ldarg.0 - IL_00b8: ldnull - IL_00b9: stfld string Linq101Select01/textNums@30::current - IL_00be: ldc.i4.0 - IL_00bf: ret + IL_0089: ldarg.0 + IL_008a: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/textNums@30::'enum' + IL_008f: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0094: nop + IL_0095: ldarg.0 + IL_0096: ldnull + IL_0097: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/textNums@30::'enum' + IL_009c: ldarg.0 + IL_009d: ldc.i4.3 + IL_009e: stfld int32 Linq101Select01/textNums@30::pc + IL_00a3: ldarg.0 + IL_00a4: ldnull + IL_00a5: stfld string Linq101Select01/textNums@30::current + IL_00aa: ldc.i4.0 + IL_00ab: ret } // end of method textNums@30::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 150 (0x96) + // Code size 148 (0x94) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [FSharp.Core]Microsoft.FSharp.Core.Unit V_1, [2] class [mscorlib]System.Exception e) .line 100001,100001 : 0,0 '' - IL_0000: ldnull - IL_0001: stloc.0 - IL_0002: ldarg.0 - IL_0003: ldfld int32 Linq101Select01/textNums@30::pc - IL_0008: ldc.i4.3 - IL_0009: sub - IL_000a: switch ( - IL_0015) - IL_0013: br.s IL_001b + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Select01/textNums@30::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0019 .line 100001,100001 : 0,0 '' - IL_0015: nop - IL_0016: br IL_0089 + IL_0013: nop + IL_0014: br IL_0087 .line 100001,100001 : 0,0 '' - IL_001b: nop + IL_0019: nop .try { - IL_001c: ldarg.0 - IL_001d: ldfld int32 Linq101Select01/textNums@30::pc - IL_0022: switch ( + IL_001a: ldarg.0 + IL_001b: ldfld int32 Linq101Select01/textNums@30::pc + IL_0020: switch ( + IL_0037, IL_0039, IL_003b, - IL_003d, - IL_003f) - IL_0037: br.s IL_004d + IL_003d) + IL_0035: br.s IL_004b - IL_0039: br.s IL_0041 + IL_0037: br.s IL_003f - IL_003b: br.s IL_0044 + IL_0039: br.s IL_0042 - IL_003d: br.s IL_0047 + IL_003b: br.s IL_0045 - IL_003f: br.s IL_004a + IL_003d: br.s IL_0048 .line 100001,100001 : 0,0 '' - IL_0041: nop - IL_0042: br.s IL_0063 + IL_003f: nop + IL_0040: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_0044: nop - IL_0045: br.s IL_004f + IL_0042: nop + IL_0043: br.s IL_004d .line 100001,100001 : 0,0 '' - IL_0047: nop - IL_0048: br.s IL_004e + IL_0045: nop + IL_0046: br.s IL_004c .line 100001,100001 : 0,0 '' - IL_004a: nop - IL_004b: br.s IL_0063 + IL_0048: nop + IL_0049: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_004d: nop + IL_004b: nop .line 100001,100001 : 0,0 '' - IL_004e: nop - IL_004f: ldarg.0 - IL_0050: ldc.i4.3 - IL_0051: stfld int32 Linq101Select01/textNums@30::pc - IL_0056: ldarg.0 - IL_0057: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/textNums@30::'enum' - IL_005c: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_0061: nop + IL_004c: nop + IL_004d: ldarg.0 + IL_004e: ldc.i4.3 + IL_004f: stfld int32 Linq101Select01/textNums@30::pc + IL_0054: ldarg.0 + IL_0055: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/textNums@30::'enum' + IL_005a: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_005f: nop .line 100001,100001 : 0,0 '' - IL_0062: nop - IL_0063: ldarg.0 - IL_0064: ldc.i4.3 - IL_0065: stfld int32 Linq101Select01/textNums@30::pc - IL_006a: ldarg.0 - IL_006b: ldnull - IL_006c: stfld string Linq101Select01/textNums@30::current - IL_0071: ldnull - IL_0072: stloc.1 - IL_0073: leave.s IL_0081 + IL_0060: nop + IL_0061: ldarg.0 + IL_0062: ldc.i4.3 + IL_0063: stfld int32 Linq101Select01/textNums@30::pc + IL_0068: ldarg.0 + IL_0069: ldnull + IL_006a: stfld string Linq101Select01/textNums@30::current + IL_006f: ldnull + IL_0070: stloc.1 + IL_0071: leave.s IL_007f } // end .try catch [mscorlib]System.Object { - IL_0075: castclass [mscorlib]System.Exception - IL_007a: stloc.2 + IL_0073: castclass [mscorlib]System.Exception + IL_0078: stloc.2 .line 30,30 : 9,29 '' - IL_007b: ldloc.2 - IL_007c: stloc.0 - IL_007d: ldnull - IL_007e: stloc.1 - IL_007f: leave.s IL_0081 + IL_0079: ldloc.2 + IL_007a: stloc.0 + IL_007b: ldnull + IL_007c: stloc.1 + IL_007d: leave.s IL_007f .line 100001,100001 : 0,0 '' } // end handler - IL_0081: ldloc.1 - IL_0082: pop + IL_007f: ldloc.1 + IL_0080: pop .line 100001,100001 : 0,0 '' - IL_0083: nop - IL_0084: br IL_0002 + IL_0081: nop + IL_0082: br IL_0000 - IL_0089: ldloc.0 - IL_008a: ldnull - IL_008b: cgt.un - IL_008d: brfalse.s IL_0091 + IL_0087: ldloc.0 + IL_0088: ldnull + IL_0089: cgt.un + IL_008b: brfalse.s IL_008f - IL_008f: br.s IL_0093 + IL_008d: br.s IL_0091 - IL_0091: br.s IL_0095 + IL_008f: br.s IL_0093 .line 100001,100001 : 0,0 '' - IL_0093: ldloc.0 - IL_0094: throw + IL_0091: ldloc.0 + IL_0092: throw .line 100001,100001 : 0,0 '' - IL_0095: ret + IL_0093: ret } // end of method textNums@30::Close .method public strict virtual instance bool @@ -1174,17 +1134,15 @@ { .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 ) - // Code size 10 (0xa) + // Code size 9 (0x9) .maxstack 8 - IL_0000: ldc.i4.0 - IL_0001: ldnull - IL_0002: ldc.i4.0 - IL_0003: ldnull - IL_0004: newobj instance void Linq101Select01/textNums@30::.ctor(int32, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0000: ldnull + IL_0001: ldc.i4.0 + IL_0002: ldnull + IL_0003: newobj instance void Linq101Select01/textNums@30::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, string) - IL_0009: ret + IL_0008: ret } // end of method textNums@30::GetFreshEnumerator } // end of class textNums@30 @@ -1226,7 +1184,6 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1> { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) - .field public string w .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' .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 ) @@ -1240,35 +1197,32 @@ .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 specialname rtspecialname - instance void .ctor(string w, - class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', int32 pc, class [mscorlib]System.Tuple`2 current) cil managed { - // Code size 36 (0x24) + // Code size 28 (0x1c) .maxstack 8 IL_0000: ldarg.0 IL_0001: ldarg.1 - IL_0002: stfld string Linq101Select01/upperLowerWords@39::w + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/upperLowerWords@39::'enum' IL_0007: ldarg.0 IL_0008: ldarg.2 - IL_0009: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/upperLowerWords@39::'enum' + IL_0009: stfld int32 Linq101Select01/upperLowerWords@39::pc IL_000e: ldarg.0 IL_000f: ldarg.3 - IL_0010: stfld int32 Linq101Select01/upperLowerWords@39::pc + IL_0010: stfld class [mscorlib]System.Tuple`2 Linq101Select01/upperLowerWords@39::current IL_0015: ldarg.0 - IL_0016: ldarg.s current - IL_0018: stfld class [mscorlib]System.Tuple`2 Linq101Select01/upperLowerWords@39::current - IL_001d: ldarg.0 - IL_001e: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1>::.ctor() - IL_0023: ret + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1>::.ctor() + IL_001b: ret } // end of method upperLowerWords@39::.ctor .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1>& next) cil managed { - // Code size 206 (0xce) + // Code size 181 (0xb5) .maxstack 7 + .locals init ([0] string w) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 IL_0001: ldfld int32 Linq101Select01/upperLowerWords@39::pc @@ -1278,214 +1232,205 @@ IL_001b, IL_001d, IL_001f) - IL_0019: br.s IL_0030 + IL_0019: br.s IL_002d IL_001b: br.s IL_0021 - IL_001d: br.s IL_0027 + IL_001d: br.s IL_0024 - IL_001f: br.s IL_002a + IL_001f: br.s IL_0027 .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br IL_00a4 + IL_0022: br.s IL_008b .line 100001,100001 : 0,0 '' - IL_0027: nop - IL_0028: br.s IL_009a + IL_0024: nop + IL_0025: br.s IL_0088 .line 100001,100001 : 0,0 '' - IL_002a: nop - IL_002b: br IL_00c5 + IL_0027: nop + IL_0028: br IL_00ac .line 100001,100001 : 0,0 '' - IL_0030: nop + IL_002d: nop .line 39,39 : 8,41 '' - IL_0031: ldarg.0 - IL_0032: newobj instance void Linq101Select01/'upperLowerWords@38-1'::.ctor() - IL_0037: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_words() - IL_003c: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::Collect,string>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + IL_002e: ldarg.0 + IL_002f: newobj instance void Linq101Select01/'upperLowerWords@38-1'::.ctor() + IL_0034: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_words() + IL_0039: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::Collect,string>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0041: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0046: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/upperLowerWords@39::'enum' - IL_004b: ldarg.0 - IL_004c: ldc.i4.1 - IL_004d: stfld int32 Linq101Select01/upperLowerWords@39::pc + IL_003e: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0043: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/upperLowerWords@39::'enum' + IL_0048: ldarg.0 + IL_0049: ldc.i4.1 + IL_004a: stfld int32 Linq101Select01/upperLowerWords@39::pc .line 39,39 : 8,41 '' - IL_0052: ldarg.0 - IL_0053: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/upperLowerWords@39::'enum' - IL_0058: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_005d: brfalse.s IL_00a4 - - IL_005f: ldarg.0 - IL_0060: ldarg.0 - IL_0061: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/upperLowerWords@39::'enum' - IL_0066: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_006b: stfld string Linq101Select01/upperLowerWords@39::w - IL_0070: ldarg.0 - IL_0071: ldc.i4.2 - IL_0072: stfld int32 Linq101Select01/upperLowerWords@39::pc + IL_004f: ldarg.0 + IL_0050: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/upperLowerWords@39::'enum' + IL_0055: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_005a: brfalse.s IL_008b + + IL_005c: ldarg.0 + IL_005d: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/upperLowerWords@39::'enum' + IL_0062: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0067: stloc.0 + IL_0068: ldarg.0 + IL_0069: ldc.i4.2 + IL_006a: stfld int32 Linq101Select01/upperLowerWords@39::pc .line 39,39 : 16,40 '' - IL_0077: ldarg.0 - IL_0078: ldarg.0 - IL_0079: ldfld string Linq101Select01/upperLowerWords@39::w - IL_007e: callvirt instance string [mscorlib]System.String::ToUpper() - IL_0083: ldarg.0 - IL_0084: ldfld string Linq101Select01/upperLowerWords@39::w - IL_0089: callvirt instance string [mscorlib]System.String::ToLower() - IL_008e: newobj instance void class [mscorlib]System.Tuple`2::.ctor(!0, + IL_006f: ldarg.0 + IL_0070: ldloc.0 + IL_0071: callvirt instance string [mscorlib]System.String::ToUpper() + IL_0076: ldloc.0 + IL_0077: callvirt instance string [mscorlib]System.String::ToLower() + IL_007c: newobj instance void class [mscorlib]System.Tuple`2::.ctor(!0, !1) - IL_0093: stfld class [mscorlib]System.Tuple`2 Linq101Select01/upperLowerWords@39::current - IL_0098: ldc.i4.1 - IL_0099: ret + IL_0081: stfld class [mscorlib]System.Tuple`2 Linq101Select01/upperLowerWords@39::current + IL_0086: ldc.i4.1 + IL_0087: ret - .line 39,39 : 8,41 '' - IL_009a: ldarg.0 - IL_009b: ldnull - IL_009c: stfld string Linq101Select01/upperLowerWords@39::w .line 100001,100001 : 0,0 '' - IL_00a1: nop - IL_00a2: br.s IL_0052 + IL_0088: nop + IL_0089: br.s IL_004f - IL_00a4: ldarg.0 - IL_00a5: ldc.i4.3 - IL_00a6: stfld int32 Linq101Select01/upperLowerWords@39::pc + IL_008b: ldarg.0 + IL_008c: ldc.i4.3 + IL_008d: stfld int32 Linq101Select01/upperLowerWords@39::pc .line 39,39 : 8,41 '' - IL_00ab: ldarg.0 - IL_00ac: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/upperLowerWords@39::'enum' - IL_00b1: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_00b6: nop - IL_00b7: ldarg.0 - IL_00b8: ldnull - IL_00b9: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/upperLowerWords@39::'enum' - IL_00be: ldarg.0 - IL_00bf: ldc.i4.3 - IL_00c0: stfld int32 Linq101Select01/upperLowerWords@39::pc - IL_00c5: ldarg.0 - IL_00c6: ldnull - IL_00c7: stfld class [mscorlib]System.Tuple`2 Linq101Select01/upperLowerWords@39::current - IL_00cc: ldc.i4.0 - IL_00cd: ret + IL_0092: ldarg.0 + IL_0093: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/upperLowerWords@39::'enum' + IL_0098: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_009d: nop + IL_009e: ldarg.0 + IL_009f: ldnull + IL_00a0: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/upperLowerWords@39::'enum' + IL_00a5: ldarg.0 + IL_00a6: ldc.i4.3 + IL_00a7: stfld int32 Linq101Select01/upperLowerWords@39::pc + IL_00ac: ldarg.0 + IL_00ad: ldnull + IL_00ae: stfld class [mscorlib]System.Tuple`2 Linq101Select01/upperLowerWords@39::current + IL_00b3: ldc.i4.0 + IL_00b4: ret } // end of method upperLowerWords@39::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 150 (0x96) + // Code size 148 (0x94) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [FSharp.Core]Microsoft.FSharp.Core.Unit V_1, [2] class [mscorlib]System.Exception e) .line 100001,100001 : 0,0 '' - IL_0000: ldnull - IL_0001: stloc.0 - IL_0002: ldarg.0 - IL_0003: ldfld int32 Linq101Select01/upperLowerWords@39::pc - IL_0008: ldc.i4.3 - IL_0009: sub - IL_000a: switch ( - IL_0015) - IL_0013: br.s IL_001b + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Select01/upperLowerWords@39::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0019 .line 100001,100001 : 0,0 '' - IL_0015: nop - IL_0016: br IL_0089 + IL_0013: nop + IL_0014: br IL_0087 .line 100001,100001 : 0,0 '' - IL_001b: nop + IL_0019: nop .try { - IL_001c: ldarg.0 - IL_001d: ldfld int32 Linq101Select01/upperLowerWords@39::pc - IL_0022: switch ( + IL_001a: ldarg.0 + IL_001b: ldfld int32 Linq101Select01/upperLowerWords@39::pc + IL_0020: switch ( + IL_0037, IL_0039, IL_003b, - IL_003d, - IL_003f) - IL_0037: br.s IL_004d + IL_003d) + IL_0035: br.s IL_004b - IL_0039: br.s IL_0041 + IL_0037: br.s IL_003f - IL_003b: br.s IL_0044 + IL_0039: br.s IL_0042 - IL_003d: br.s IL_0047 + IL_003b: br.s IL_0045 - IL_003f: br.s IL_004a + IL_003d: br.s IL_0048 .line 100001,100001 : 0,0 '' - IL_0041: nop - IL_0042: br.s IL_0063 + IL_003f: nop + IL_0040: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_0044: nop - IL_0045: br.s IL_004f + IL_0042: nop + IL_0043: br.s IL_004d .line 100001,100001 : 0,0 '' - IL_0047: nop - IL_0048: br.s IL_004e + IL_0045: nop + IL_0046: br.s IL_004c .line 100001,100001 : 0,0 '' - IL_004a: nop - IL_004b: br.s IL_0063 + IL_0048: nop + IL_0049: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_004d: nop + IL_004b: nop .line 100001,100001 : 0,0 '' - IL_004e: nop - IL_004f: ldarg.0 - IL_0050: ldc.i4.3 - IL_0051: stfld int32 Linq101Select01/upperLowerWords@39::pc - IL_0056: ldarg.0 - IL_0057: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/upperLowerWords@39::'enum' - IL_005c: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_0061: nop + IL_004c: nop + IL_004d: ldarg.0 + IL_004e: ldc.i4.3 + IL_004f: stfld int32 Linq101Select01/upperLowerWords@39::pc + IL_0054: ldarg.0 + IL_0055: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/upperLowerWords@39::'enum' + IL_005a: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_005f: nop .line 100001,100001 : 0,0 '' - IL_0062: nop - IL_0063: ldarg.0 - IL_0064: ldc.i4.3 - IL_0065: stfld int32 Linq101Select01/upperLowerWords@39::pc - IL_006a: ldarg.0 - IL_006b: ldnull - IL_006c: stfld class [mscorlib]System.Tuple`2 Linq101Select01/upperLowerWords@39::current - IL_0071: ldnull - IL_0072: stloc.1 - IL_0073: leave.s IL_0081 + IL_0060: nop + IL_0061: ldarg.0 + IL_0062: ldc.i4.3 + IL_0063: stfld int32 Linq101Select01/upperLowerWords@39::pc + IL_0068: ldarg.0 + IL_0069: ldnull + IL_006a: stfld class [mscorlib]System.Tuple`2 Linq101Select01/upperLowerWords@39::current + IL_006f: ldnull + IL_0070: stloc.1 + IL_0071: leave.s IL_007f } // end .try catch [mscorlib]System.Object { - IL_0075: castclass [mscorlib]System.Exception - IL_007a: stloc.2 + IL_0073: castclass [mscorlib]System.Exception + IL_0078: stloc.2 .line 39,39 : 8,41 '' - IL_007b: ldloc.2 - IL_007c: stloc.0 - IL_007d: ldnull - IL_007e: stloc.1 - IL_007f: leave.s IL_0081 + IL_0079: ldloc.2 + IL_007a: stloc.0 + IL_007b: ldnull + IL_007c: stloc.1 + IL_007d: leave.s IL_007f .line 100001,100001 : 0,0 '' } // end handler - IL_0081: ldloc.1 - IL_0082: pop + IL_007f: ldloc.1 + IL_0080: pop .line 100001,100001 : 0,0 '' - IL_0083: nop - IL_0084: br IL_0002 + IL_0081: nop + IL_0082: br IL_0000 - IL_0089: ldloc.0 - IL_008a: ldnull - IL_008b: cgt.un - IL_008d: brfalse.s IL_0091 + IL_0087: ldloc.0 + IL_0088: ldnull + IL_0089: cgt.un + IL_008b: brfalse.s IL_008f - IL_008f: br.s IL_0093 + IL_008d: br.s IL_0091 - IL_0091: br.s IL_0095 + IL_008f: br.s IL_0093 .line 100001,100001 : 0,0 '' - IL_0093: ldloc.0 - IL_0094: throw + IL_0091: ldloc.0 + IL_0092: throw .line 100001,100001 : 0,0 '' - IL_0095: ret + IL_0093: ret } // end of method upperLowerWords@39::Close .method public strict virtual instance bool @@ -1556,17 +1501,15 @@ { .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 ) - // Code size 10 (0xa) + // Code size 9 (0x9) .maxstack 8 IL_0000: ldnull - IL_0001: ldnull - IL_0002: ldc.i4.0 - IL_0003: ldnull - IL_0004: newobj instance void Linq101Select01/upperLowerWords@39::.ctor(string, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0001: ldc.i4.0 + IL_0002: ldnull + IL_0003: newobj instance void Linq101Select01/upperLowerWords@39::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, class [mscorlib]System.Tuple`2) - IL_0009: ret + IL_0008: ret } // end of method upperLowerWords@39::GetFreshEnumerator } // end of class upperLowerWords@39 @@ -1608,7 +1551,6 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1> { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) - .field public int32 n .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' .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 ) @@ -1622,35 +1564,32 @@ .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 specialname rtspecialname - instance void .ctor(int32 n, - class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', int32 pc, class [mscorlib]System.Tuple`2 current) cil managed { - // Code size 36 (0x24) + // Code size 28 (0x1c) .maxstack 8 IL_0000: ldarg.0 IL_0001: ldarg.1 - IL_0002: stfld int32 Linq101Select01/digitOddEvens@46::n + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/digitOddEvens@46::'enum' IL_0007: ldarg.0 IL_0008: ldarg.2 - IL_0009: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/digitOddEvens@46::'enum' + IL_0009: stfld int32 Linq101Select01/digitOddEvens@46::pc IL_000e: ldarg.0 IL_000f: ldarg.3 - IL_0010: stfld int32 Linq101Select01/digitOddEvens@46::pc + IL_0010: stfld class [mscorlib]System.Tuple`2 Linq101Select01/digitOddEvens@46::current IL_0015: ldarg.0 - IL_0016: ldarg.s current - IL_0018: stfld class [mscorlib]System.Tuple`2 Linq101Select01/digitOddEvens@46::current - IL_001d: ldarg.0 - IL_001e: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1>::.ctor() - IL_0023: ret + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1>::.ctor() + IL_001b: ret } // end of method digitOddEvens@46::.ctor .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1>& next) cil managed { - // Code size 211 (0xd3) + // Code size 186 (0xba) .maxstack 8 + .locals init ([0] int32 n) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 IL_0001: ldfld int32 Linq101Select01/digitOddEvens@46::pc @@ -1660,218 +1599,209 @@ IL_001b, IL_001d, IL_001f) - IL_0019: br.s IL_0030 + IL_0019: br.s IL_002d IL_001b: br.s IL_0021 - IL_001d: br.s IL_0027 + IL_001d: br.s IL_0024 - IL_001f: br.s IL_002a + IL_001f: br.s IL_0027 .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br IL_00a9 + IL_0022: br.s IL_0090 .line 100001,100001 : 0,0 '' - IL_0027: nop - IL_0028: br.s IL_009f + IL_0024: nop + IL_0025: br.s IL_008d .line 100001,100001 : 0,0 '' - IL_002a: nop - IL_002b: br IL_00ca + IL_0027: nop + IL_0028: br IL_00b1 .line 100001,100001 : 0,0 '' - IL_0030: nop + IL_002d: nop .line 46,46 : 9,42 '' - IL_0031: ldarg.0 - IL_0032: newobj instance void Linq101Select01/'digitOddEvens@45-1'::.ctor() - IL_0037: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_numbers() - IL_003c: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::Collect,int32>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + IL_002e: ldarg.0 + IL_002f: newobj instance void Linq101Select01/'digitOddEvens@45-1'::.ctor() + IL_0034: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_numbers() + IL_0039: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::Collect,int32>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0041: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0046: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/digitOddEvens@46::'enum' - IL_004b: ldarg.0 - IL_004c: ldc.i4.1 - IL_004d: stfld int32 Linq101Select01/digitOddEvens@46::pc + IL_003e: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0043: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/digitOddEvens@46::'enum' + IL_0048: ldarg.0 + IL_0049: ldc.i4.1 + IL_004a: stfld int32 Linq101Select01/digitOddEvens@46::pc .line 46,46 : 9,42 '' - IL_0052: ldarg.0 - IL_0053: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/digitOddEvens@46::'enum' - IL_0058: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_005d: brfalse.s IL_00a9 - - IL_005f: ldarg.0 - IL_0060: ldarg.0 - IL_0061: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/digitOddEvens@46::'enum' - IL_0066: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_006b: stfld int32 Linq101Select01/digitOddEvens@46::n - IL_0070: ldarg.0 - IL_0071: ldc.i4.2 - IL_0072: stfld int32 Linq101Select01/digitOddEvens@46::pc + IL_004f: ldarg.0 + IL_0050: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/digitOddEvens@46::'enum' + IL_0055: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_005a: brfalse.s IL_0090 + + IL_005c: ldarg.0 + IL_005d: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/digitOddEvens@46::'enum' + IL_0062: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0067: stloc.0 + IL_0068: ldarg.0 + IL_0069: ldc.i4.2 + IL_006a: stfld int32 Linq101Select01/digitOddEvens@46::pc .line 46,46 : 17,41 '' - IL_0077: ldarg.0 - IL_0078: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_strings() - IL_007d: ldarg.0 - IL_007e: ldfld int32 Linq101Select01/digitOddEvens@46::n - IL_0083: callvirt instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Item(int32) - IL_0088: ldarg.0 - IL_0089: ldfld int32 Linq101Select01/digitOddEvens@46::n - IL_008e: ldc.i4.2 - IL_008f: rem - IL_0090: ldc.i4.0 - IL_0091: ceq - IL_0093: newobj instance void class [mscorlib]System.Tuple`2::.ctor(!0, + IL_006f: ldarg.0 + IL_0070: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_strings() + IL_0075: ldloc.0 + IL_0076: callvirt instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Item(int32) + IL_007b: ldloc.0 + IL_007c: ldc.i4.2 + IL_007d: rem + IL_007e: ldc.i4.0 + IL_007f: ceq + IL_0081: newobj instance void class [mscorlib]System.Tuple`2::.ctor(!0, !1) - IL_0098: stfld class [mscorlib]System.Tuple`2 Linq101Select01/digitOddEvens@46::current - IL_009d: ldc.i4.1 - IL_009e: ret + IL_0086: stfld class [mscorlib]System.Tuple`2 Linq101Select01/digitOddEvens@46::current + IL_008b: ldc.i4.1 + IL_008c: ret - .line 46,46 : 9,42 '' - IL_009f: ldarg.0 - IL_00a0: ldc.i4.0 - IL_00a1: stfld int32 Linq101Select01/digitOddEvens@46::n .line 100001,100001 : 0,0 '' - IL_00a6: nop - IL_00a7: br.s IL_0052 + IL_008d: nop + IL_008e: br.s IL_004f - IL_00a9: ldarg.0 - IL_00aa: ldc.i4.3 - IL_00ab: stfld int32 Linq101Select01/digitOddEvens@46::pc + IL_0090: ldarg.0 + IL_0091: ldc.i4.3 + IL_0092: stfld int32 Linq101Select01/digitOddEvens@46::pc .line 46,46 : 9,42 '' - IL_00b0: ldarg.0 - IL_00b1: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/digitOddEvens@46::'enum' - IL_00b6: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_00bb: nop - IL_00bc: ldarg.0 - IL_00bd: ldnull - IL_00be: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/digitOddEvens@46::'enum' - IL_00c3: ldarg.0 - IL_00c4: ldc.i4.3 - IL_00c5: stfld int32 Linq101Select01/digitOddEvens@46::pc - IL_00ca: ldarg.0 - IL_00cb: ldnull - IL_00cc: stfld class [mscorlib]System.Tuple`2 Linq101Select01/digitOddEvens@46::current - IL_00d1: ldc.i4.0 - IL_00d2: ret + IL_0097: ldarg.0 + IL_0098: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/digitOddEvens@46::'enum' + IL_009d: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_00a2: nop + IL_00a3: ldarg.0 + IL_00a4: ldnull + IL_00a5: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/digitOddEvens@46::'enum' + IL_00aa: ldarg.0 + IL_00ab: ldc.i4.3 + IL_00ac: stfld int32 Linq101Select01/digitOddEvens@46::pc + IL_00b1: ldarg.0 + IL_00b2: ldnull + IL_00b3: stfld class [mscorlib]System.Tuple`2 Linq101Select01/digitOddEvens@46::current + IL_00b8: ldc.i4.0 + IL_00b9: ret } // end of method digitOddEvens@46::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 150 (0x96) + // Code size 148 (0x94) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [FSharp.Core]Microsoft.FSharp.Core.Unit V_1, [2] class [mscorlib]System.Exception e) .line 100001,100001 : 0,0 '' - IL_0000: ldnull - IL_0001: stloc.0 - IL_0002: ldarg.0 - IL_0003: ldfld int32 Linq101Select01/digitOddEvens@46::pc - IL_0008: ldc.i4.3 - IL_0009: sub - IL_000a: switch ( - IL_0015) - IL_0013: br.s IL_001b + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Select01/digitOddEvens@46::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0019 .line 100001,100001 : 0,0 '' - IL_0015: nop - IL_0016: br IL_0089 + IL_0013: nop + IL_0014: br IL_0087 .line 100001,100001 : 0,0 '' - IL_001b: nop + IL_0019: nop .try { - IL_001c: ldarg.0 - IL_001d: ldfld int32 Linq101Select01/digitOddEvens@46::pc - IL_0022: switch ( + IL_001a: ldarg.0 + IL_001b: ldfld int32 Linq101Select01/digitOddEvens@46::pc + IL_0020: switch ( + IL_0037, IL_0039, IL_003b, - IL_003d, - IL_003f) - IL_0037: br.s IL_004d + IL_003d) + IL_0035: br.s IL_004b - IL_0039: br.s IL_0041 + IL_0037: br.s IL_003f - IL_003b: br.s IL_0044 + IL_0039: br.s IL_0042 - IL_003d: br.s IL_0047 + IL_003b: br.s IL_0045 - IL_003f: br.s IL_004a + IL_003d: br.s IL_0048 .line 100001,100001 : 0,0 '' - IL_0041: nop - IL_0042: br.s IL_0063 + IL_003f: nop + IL_0040: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_0044: nop - IL_0045: br.s IL_004f + IL_0042: nop + IL_0043: br.s IL_004d .line 100001,100001 : 0,0 '' - IL_0047: nop - IL_0048: br.s IL_004e + IL_0045: nop + IL_0046: br.s IL_004c .line 100001,100001 : 0,0 '' - IL_004a: nop - IL_004b: br.s IL_0063 + IL_0048: nop + IL_0049: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_004d: nop + IL_004b: nop .line 100001,100001 : 0,0 '' - IL_004e: nop - IL_004f: ldarg.0 - IL_0050: ldc.i4.3 - IL_0051: stfld int32 Linq101Select01/digitOddEvens@46::pc - IL_0056: ldarg.0 - IL_0057: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/digitOddEvens@46::'enum' - IL_005c: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_0061: nop + IL_004c: nop + IL_004d: ldarg.0 + IL_004e: ldc.i4.3 + IL_004f: stfld int32 Linq101Select01/digitOddEvens@46::pc + IL_0054: ldarg.0 + IL_0055: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/digitOddEvens@46::'enum' + IL_005a: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_005f: nop .line 100001,100001 : 0,0 '' - IL_0062: nop - IL_0063: ldarg.0 - IL_0064: ldc.i4.3 - IL_0065: stfld int32 Linq101Select01/digitOddEvens@46::pc - IL_006a: ldarg.0 - IL_006b: ldnull - IL_006c: stfld class [mscorlib]System.Tuple`2 Linq101Select01/digitOddEvens@46::current - IL_0071: ldnull - IL_0072: stloc.1 - IL_0073: leave.s IL_0081 + IL_0060: nop + IL_0061: ldarg.0 + IL_0062: ldc.i4.3 + IL_0063: stfld int32 Linq101Select01/digitOddEvens@46::pc + IL_0068: ldarg.0 + IL_0069: ldnull + IL_006a: stfld class [mscorlib]System.Tuple`2 Linq101Select01/digitOddEvens@46::current + IL_006f: ldnull + IL_0070: stloc.1 + IL_0071: leave.s IL_007f } // end .try catch [mscorlib]System.Object { - IL_0075: castclass [mscorlib]System.Exception - IL_007a: stloc.2 + IL_0073: castclass [mscorlib]System.Exception + IL_0078: stloc.2 .line 46,46 : 9,42 '' - IL_007b: ldloc.2 - IL_007c: stloc.0 - IL_007d: ldnull - IL_007e: stloc.1 - IL_007f: leave.s IL_0081 + IL_0079: ldloc.2 + IL_007a: stloc.0 + IL_007b: ldnull + IL_007c: stloc.1 + IL_007d: leave.s IL_007f .line 100001,100001 : 0,0 '' } // end handler - IL_0081: ldloc.1 - IL_0082: pop + IL_007f: ldloc.1 + IL_0080: pop .line 100001,100001 : 0,0 '' - IL_0083: nop - IL_0084: br IL_0002 + IL_0081: nop + IL_0082: br IL_0000 - IL_0089: ldloc.0 - IL_008a: ldnull - IL_008b: cgt.un - IL_008d: brfalse.s IL_0091 + IL_0087: ldloc.0 + IL_0088: ldnull + IL_0089: cgt.un + IL_008b: brfalse.s IL_008f - IL_008f: br.s IL_0093 + IL_008d: br.s IL_0091 - IL_0091: br.s IL_0095 + IL_008f: br.s IL_0093 .line 100001,100001 : 0,0 '' - IL_0093: ldloc.0 - IL_0094: throw + IL_0091: ldloc.0 + IL_0092: throw .line 100001,100001 : 0,0 '' - IL_0095: ret + IL_0093: ret } // end of method digitOddEvens@46::Close .method public strict virtual instance bool @@ -1942,17 +1872,15 @@ { .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 ) - // Code size 10 (0xa) + // Code size 9 (0x9) .maxstack 8 - IL_0000: ldc.i4.0 - IL_0001: ldnull - IL_0002: ldc.i4.0 - IL_0003: ldnull - IL_0004: newobj instance void Linq101Select01/digitOddEvens@46::.ctor(int32, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0000: ldnull + IL_0001: ldc.i4.0 + IL_0002: ldnull + IL_0003: newobj instance void Linq101Select01/digitOddEvens@46::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, class [mscorlib]System.Tuple`2) - IL_0009: ret + IL_0008: ret } // end of method digitOddEvens@46::GetFreshEnumerator } // end of class digitOddEvens@46 @@ -1994,7 +1922,6 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1> { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) - .field public class [Utils]Utils/Product p .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' .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 ) @@ -2008,35 +1935,32 @@ .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 specialname rtspecialname - instance void .ctor(class [Utils]Utils/Product p, - class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', int32 pc, class [mscorlib]System.Tuple`3 current) cil managed { - // Code size 36 (0x24) + // Code size 28 (0x1c) .maxstack 8 IL_0000: ldarg.0 IL_0001: ldarg.1 - IL_0002: stfld class [Utils]Utils/Product Linq101Select01/productInfos@53::p + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/productInfos@53::'enum' IL_0007: ldarg.0 IL_0008: ldarg.2 - IL_0009: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/productInfos@53::'enum' + IL_0009: stfld int32 Linq101Select01/productInfos@53::pc IL_000e: ldarg.0 IL_000f: ldarg.3 - IL_0010: stfld int32 Linq101Select01/productInfos@53::pc + IL_0010: stfld class [mscorlib]System.Tuple`3 Linq101Select01/productInfos@53::current IL_0015: ldarg.0 - IL_0016: ldarg.s current - IL_0018: stfld class [mscorlib]System.Tuple`3 Linq101Select01/productInfos@53::current - IL_001d: ldarg.0 - IL_001e: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1>::.ctor() - IL_0023: ret + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1>::.ctor() + IL_001b: ret } // end of method productInfos@53::.ctor .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1>& next) cil managed { - // Code size 217 (0xd9) + // Code size 187 (0xbb) .maxstack 8 + .locals init ([0] class [Utils]Utils/Product p) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 IL_0001: ldfld int32 Linq101Select01/productInfos@53::pc @@ -2046,218 +1970,208 @@ IL_001b, IL_001d, IL_001f) - IL_0019: br.s IL_0030 + IL_0019: br.s IL_002d IL_001b: br.s IL_0021 - IL_001d: br.s IL_0027 + IL_001d: br.s IL_0024 - IL_001f: br.s IL_002a + IL_001f: br.s IL_0027 .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br IL_00af + IL_0022: br.s IL_0091 .line 100001,100001 : 0,0 '' - IL_0027: nop - IL_0028: br.s IL_00a5 + IL_0024: nop + IL_0025: br.s IL_008e .line 100001,100001 : 0,0 '' - IL_002a: nop - IL_002b: br IL_00d0 + IL_0027: nop + IL_0028: br IL_00b2 .line 100001,100001 : 0,0 '' - IL_0030: nop + IL_002d: nop .line 53,53 : 9,56 '' - IL_0031: ldarg.0 - IL_0032: newobj instance void Linq101Select01/'productInfos@52-1'::.ctor() - IL_0037: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_products() - IL_003c: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::Collect,class [Utils]Utils/Product>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + IL_002e: ldarg.0 + IL_002f: newobj instance void Linq101Select01/'productInfos@52-1'::.ctor() + IL_0034: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_products() + IL_0039: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::Collect,class [Utils]Utils/Product>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0041: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0046: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/productInfos@53::'enum' - IL_004b: ldarg.0 - IL_004c: ldc.i4.1 - IL_004d: stfld int32 Linq101Select01/productInfos@53::pc + IL_003e: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0043: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/productInfos@53::'enum' + IL_0048: ldarg.0 + IL_0049: ldc.i4.1 + IL_004a: stfld int32 Linq101Select01/productInfos@53::pc .line 53,53 : 9,56 '' - IL_0052: ldarg.0 - IL_0053: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/productInfos@53::'enum' - IL_0058: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_005d: brfalse.s IL_00af - - IL_005f: ldarg.0 - IL_0060: ldarg.0 - IL_0061: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/productInfos@53::'enum' - IL_0066: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_006b: stfld class [Utils]Utils/Product Linq101Select01/productInfos@53::p - IL_0070: ldarg.0 - IL_0071: ldc.i4.2 - IL_0072: stfld int32 Linq101Select01/productInfos@53::pc + IL_004f: ldarg.0 + IL_0050: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/productInfos@53::'enum' + IL_0055: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_005a: brfalse.s IL_0091 + + IL_005c: ldarg.0 + IL_005d: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/productInfos@53::'enum' + IL_0062: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0067: stloc.0 + IL_0068: ldarg.0 + IL_0069: ldc.i4.2 + IL_006a: stfld int32 Linq101Select01/productInfos@53::pc .line 53,53 : 17,55 '' - IL_0077: ldarg.0 - IL_0078: ldarg.0 - IL_0079: ldfld class [Utils]Utils/Product Linq101Select01/productInfos@53::p - IL_007e: callvirt instance string [Utils]Utils/Product::get_ProductName() - IL_0083: ldarg.0 - IL_0084: ldfld class [Utils]Utils/Product Linq101Select01/productInfos@53::p - IL_0089: callvirt instance string [Utils]Utils/Product::get_Category() - IL_008e: ldarg.0 - IL_008f: ldfld class [Utils]Utils/Product Linq101Select01/productInfos@53::p - IL_0094: callvirt instance valuetype [mscorlib]System.Decimal [Utils]Utils/Product::get_UnitPrice() - IL_0099: newobj instance void class [mscorlib]System.Tuple`3::.ctor(!0, + IL_006f: ldarg.0 + IL_0070: ldloc.0 + IL_0071: callvirt instance string [Utils]Utils/Product::get_ProductName() + IL_0076: ldloc.0 + IL_0077: callvirt instance string [Utils]Utils/Product::get_Category() + IL_007c: ldloc.0 + IL_007d: callvirt instance valuetype [mscorlib]System.Decimal [Utils]Utils/Product::get_UnitPrice() + IL_0082: newobj instance void class [mscorlib]System.Tuple`3::.ctor(!0, !1, !2) - IL_009e: stfld class [mscorlib]System.Tuple`3 Linq101Select01/productInfos@53::current - IL_00a3: ldc.i4.1 - IL_00a4: ret + IL_0087: stfld class [mscorlib]System.Tuple`3 Linq101Select01/productInfos@53::current + IL_008c: ldc.i4.1 + IL_008d: ret - .line 53,53 : 9,56 '' - IL_00a5: ldarg.0 - IL_00a6: ldnull - IL_00a7: stfld class [Utils]Utils/Product Linq101Select01/productInfos@53::p .line 100001,100001 : 0,0 '' - IL_00ac: nop - IL_00ad: br.s IL_0052 + IL_008e: nop + IL_008f: br.s IL_004f - IL_00af: ldarg.0 - IL_00b0: ldc.i4.3 - IL_00b1: stfld int32 Linq101Select01/productInfos@53::pc + IL_0091: ldarg.0 + IL_0092: ldc.i4.3 + IL_0093: stfld int32 Linq101Select01/productInfos@53::pc .line 53,53 : 9,56 '' - IL_00b6: ldarg.0 - IL_00b7: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/productInfos@53::'enum' - IL_00bc: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_00c1: nop - IL_00c2: ldarg.0 - IL_00c3: ldnull - IL_00c4: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/productInfos@53::'enum' - IL_00c9: ldarg.0 - IL_00ca: ldc.i4.3 - IL_00cb: stfld int32 Linq101Select01/productInfos@53::pc - IL_00d0: ldarg.0 - IL_00d1: ldnull - IL_00d2: stfld class [mscorlib]System.Tuple`3 Linq101Select01/productInfos@53::current - IL_00d7: ldc.i4.0 - IL_00d8: ret + IL_0098: ldarg.0 + IL_0099: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/productInfos@53::'enum' + IL_009e: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_00a3: nop + IL_00a4: ldarg.0 + IL_00a5: ldnull + IL_00a6: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/productInfos@53::'enum' + IL_00ab: ldarg.0 + IL_00ac: ldc.i4.3 + IL_00ad: stfld int32 Linq101Select01/productInfos@53::pc + IL_00b2: ldarg.0 + IL_00b3: ldnull + IL_00b4: stfld class [mscorlib]System.Tuple`3 Linq101Select01/productInfos@53::current + IL_00b9: ldc.i4.0 + IL_00ba: ret } // end of method productInfos@53::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 150 (0x96) + // Code size 148 (0x94) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [FSharp.Core]Microsoft.FSharp.Core.Unit V_1, [2] class [mscorlib]System.Exception e) .line 100001,100001 : 0,0 '' - IL_0000: ldnull - IL_0001: stloc.0 - IL_0002: ldarg.0 - IL_0003: ldfld int32 Linq101Select01/productInfos@53::pc - IL_0008: ldc.i4.3 - IL_0009: sub - IL_000a: switch ( - IL_0015) - IL_0013: br.s IL_001b + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Select01/productInfos@53::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0019 .line 100001,100001 : 0,0 '' - IL_0015: nop - IL_0016: br IL_0089 + IL_0013: nop + IL_0014: br IL_0087 .line 100001,100001 : 0,0 '' - IL_001b: nop + IL_0019: nop .try { - IL_001c: ldarg.0 - IL_001d: ldfld int32 Linq101Select01/productInfos@53::pc - IL_0022: switch ( + IL_001a: ldarg.0 + IL_001b: ldfld int32 Linq101Select01/productInfos@53::pc + IL_0020: switch ( + IL_0037, IL_0039, IL_003b, - IL_003d, - IL_003f) - IL_0037: br.s IL_004d + IL_003d) + IL_0035: br.s IL_004b - IL_0039: br.s IL_0041 + IL_0037: br.s IL_003f - IL_003b: br.s IL_0044 + IL_0039: br.s IL_0042 - IL_003d: br.s IL_0047 + IL_003b: br.s IL_0045 - IL_003f: br.s IL_004a + IL_003d: br.s IL_0048 .line 100001,100001 : 0,0 '' - IL_0041: nop - IL_0042: br.s IL_0063 + IL_003f: nop + IL_0040: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_0044: nop - IL_0045: br.s IL_004f + IL_0042: nop + IL_0043: br.s IL_004d .line 100001,100001 : 0,0 '' - IL_0047: nop - IL_0048: br.s IL_004e + IL_0045: nop + IL_0046: br.s IL_004c .line 100001,100001 : 0,0 '' - IL_004a: nop - IL_004b: br.s IL_0063 + IL_0048: nop + IL_0049: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_004d: nop + IL_004b: nop .line 100001,100001 : 0,0 '' - IL_004e: nop - IL_004f: ldarg.0 - IL_0050: ldc.i4.3 - IL_0051: stfld int32 Linq101Select01/productInfos@53::pc - IL_0056: ldarg.0 - IL_0057: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/productInfos@53::'enum' - IL_005c: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_0061: nop + IL_004c: nop + IL_004d: ldarg.0 + IL_004e: ldc.i4.3 + IL_004f: stfld int32 Linq101Select01/productInfos@53::pc + IL_0054: ldarg.0 + IL_0055: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/productInfos@53::'enum' + IL_005a: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_005f: nop .line 100001,100001 : 0,0 '' - IL_0062: nop - IL_0063: ldarg.0 - IL_0064: ldc.i4.3 - IL_0065: stfld int32 Linq101Select01/productInfos@53::pc - IL_006a: ldarg.0 - IL_006b: ldnull - IL_006c: stfld class [mscorlib]System.Tuple`3 Linq101Select01/productInfos@53::current - IL_0071: ldnull - IL_0072: stloc.1 - IL_0073: leave.s IL_0081 + IL_0060: nop + IL_0061: ldarg.0 + IL_0062: ldc.i4.3 + IL_0063: stfld int32 Linq101Select01/productInfos@53::pc + IL_0068: ldarg.0 + IL_0069: ldnull + IL_006a: stfld class [mscorlib]System.Tuple`3 Linq101Select01/productInfos@53::current + IL_006f: ldnull + IL_0070: stloc.1 + IL_0071: leave.s IL_007f } // end .try catch [mscorlib]System.Object { - IL_0075: castclass [mscorlib]System.Exception - IL_007a: stloc.2 + IL_0073: castclass [mscorlib]System.Exception + IL_0078: stloc.2 .line 53,53 : 9,56 '' - IL_007b: ldloc.2 - IL_007c: stloc.0 - IL_007d: ldnull - IL_007e: stloc.1 - IL_007f: leave.s IL_0081 + IL_0079: ldloc.2 + IL_007a: stloc.0 + IL_007b: ldnull + IL_007c: stloc.1 + IL_007d: leave.s IL_007f .line 100001,100001 : 0,0 '' } // end handler - IL_0081: ldloc.1 - IL_0082: pop + IL_007f: ldloc.1 + IL_0080: pop .line 100001,100001 : 0,0 '' - IL_0083: nop - IL_0084: br IL_0002 + IL_0081: nop + IL_0082: br IL_0000 - IL_0089: ldloc.0 - IL_008a: ldnull - IL_008b: cgt.un - IL_008d: brfalse.s IL_0091 + IL_0087: ldloc.0 + IL_0088: ldnull + IL_0089: cgt.un + IL_008b: brfalse.s IL_008f - IL_008f: br.s IL_0093 + IL_008d: br.s IL_0091 - IL_0091: br.s IL_0095 + IL_008f: br.s IL_0093 .line 100001,100001 : 0,0 '' - IL_0093: ldloc.0 - IL_0094: throw + IL_0091: ldloc.0 + IL_0092: throw .line 100001,100001 : 0,0 '' - IL_0095: ret + IL_0093: ret } // end of method productInfos@53::Close .method public strict virtual instance bool @@ -2328,17 +2242,15 @@ { .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 ) - // Code size 10 (0xa) + // Code size 9 (0x9) .maxstack 8 IL_0000: ldnull - IL_0001: ldnull - IL_0002: ldc.i4.0 - IL_0003: ldnull - IL_0004: newobj instance void Linq101Select01/productInfos@53::.ctor(class [Utils]Utils/Product, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0001: ldc.i4.0 + IL_0002: ldnull + IL_0003: newobj instance void Linq101Select01/productInfos@53::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, class [mscorlib]System.Tuple`3) - IL_0009: ret + IL_0008: ret } // end of method productInfos@53::GetFreshEnumerator } // end of class productInfos@53 @@ -3834,7 +3746,7 @@ .method public static void main@() cil managed { .entrypoint - // Code size 1134 (0x46e) + // Code size 1128 (0x468) .maxstack 13 .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 numbers, [1] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 numsPlusOne, @@ -3909,409 +3821,397 @@ .line 10,14 : 1,20 '' IL_0049: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_004e: stloc.s V_21 - IL_0050: ldc.i4.0 - IL_0051: ldnull + IL_0050: ldnull + IL_0051: ldc.i4.0 IL_0052: ldc.i4.0 - IL_0053: ldc.i4.0 - IL_0054: newobj instance void Linq101Select01/numsPlusOne@13::.ctor(int32, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0053: newobj instance void Linq101Select01/numsPlusOne@13::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, int32) - IL_0059: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_005e: dup - IL_005f: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Select01::numsPlusOne@10 - IL_0064: stloc.1 + IL_0058: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_005d: dup + IL_005e: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Select01::numsPlusOne@10 + IL_0063: stloc.1 .line 17,17 : 1,32 '' - IL_0065: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [Utils]Utils::getProductList() - IL_006a: dup - IL_006b: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Select01::'products@17-12' - IL_0070: stloc.2 - IL_0071: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_0076: stloc.s V_22 - IL_0078: ldnull + IL_0064: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [Utils]Utils::getProductList() + IL_0069: dup + IL_006a: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Select01::'products@17-12' + IL_006f: stloc.2 + IL_0070: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_0075: stloc.s V_22 + IL_0077: ldnull + IL_0078: ldc.i4.0 IL_0079: ldnull - IL_007a: ldc.i4.0 - IL_007b: ldnull - IL_007c: newobj instance void Linq101Select01/productNames@22::.ctor(class [Utils]Utils/Product, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_007a: newobj instance void Linq101Select01/productNames@22::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, string) - IL_0081: dup - IL_0082: stsfld class [mscorlib]System.Collections.Generic.IEnumerable`1 ''.$Linq101Select01::productNames@19 - IL_0087: stloc.3 + IL_007f: dup + IL_0080: stsfld class [mscorlib]System.Collections.Generic.IEnumerable`1 ''.$Linq101Select01::productNames@19 + IL_0085: stloc.3 .line 26,26 : 1,97 '' - IL_0088: ldstr "zero" - IL_008d: ldstr "one" - IL_0092: ldstr "two" - IL_0097: ldstr "three" - IL_009c: ldstr "four" - IL_00a1: ldstr "five" - IL_00a6: ldstr "six" - IL_00ab: ldstr "seven" - IL_00b0: ldstr "eight" - IL_00b5: ldstr "nine" - IL_00ba: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() - IL_00bf: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0086: ldstr "zero" + IL_008b: ldstr "one" + IL_0090: ldstr "two" + IL_0095: ldstr "three" + IL_009a: ldstr "four" + IL_009f: ldstr "five" + IL_00a4: ldstr "six" + IL_00a9: ldstr "seven" + IL_00ae: ldstr "eight" + IL_00b3: ldstr "nine" + IL_00b8: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_00bd: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_00c4: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_00c2: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_00c9: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_00c7: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_00ce: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_00cc: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_00d3: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_00d1: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_00d8: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_00d6: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_00dd: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_00db: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_00e2: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_00e0: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_00e7: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_00e5: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_00ec: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_00ea: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_00f1: dup - IL_00f2: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Select01::'strings@26-2' - IL_00f7: stloc.s strings + IL_00ef: dup + IL_00f0: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Select01::'strings@26-2' + IL_00f5: stloc.s strings .line 27,31 : 1,20 '' - IL_00f9: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_00fe: stloc.s V_23 - IL_0100: ldc.i4.0 - IL_0101: ldnull - IL_0102: ldc.i4.0 - IL_0103: ldnull - IL_0104: newobj instance void Linq101Select01/textNums@30::.ctor(int32, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_00f7: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_00fc: stloc.s V_23 + IL_00fe: ldnull + IL_00ff: ldc.i4.0 + IL_0100: ldnull + IL_0101: newobj instance void Linq101Select01/textNums@30::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, string) - IL_0109: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_010e: dup - IL_010f: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Select01::textNums@27 - IL_0114: stloc.s textNums + IL_0106: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_010b: dup + IL_010c: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Select01::textNums@27 + IL_0111: stloc.s textNums .line 34,34 : 1,46 '' - IL_0116: ldstr "aPPLE" - IL_011b: ldstr "BlUeBeRrY" - IL_0120: ldstr "cHeRry" - IL_0125: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() - IL_012a: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0113: ldstr "aPPLE" + IL_0118: ldstr "BlUeBeRrY" + IL_011d: ldstr "cHeRry" + IL_0122: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_0127: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_012f: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_012c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_0134: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0131: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_0139: dup - IL_013a: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Select01::'words@34-8' - IL_013f: stloc.s words + IL_0136: dup + IL_0137: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Select01::'words@34-8' + IL_013c: stloc.s words .line 36,40 : 1,20 '' - IL_0141: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_0146: stloc.s V_24 - IL_0148: ldnull - IL_0149: ldnull - IL_014a: ldc.i4.0 - IL_014b: ldnull - IL_014c: newobj instance void Linq101Select01/upperLowerWords@39::.ctor(string, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_013e: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_0143: stloc.s V_24 + IL_0145: ldnull + IL_0146: ldc.i4.0 + IL_0147: ldnull + IL_0148: newobj instance void Linq101Select01/upperLowerWords@39::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, class [mscorlib]System.Tuple`2) - IL_0151: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0156: dup - IL_0157: stsfld class [mscorlib]System.Tuple`2[] ''.$Linq101Select01::upperLowerWords@36 - IL_015c: stloc.s upperLowerWords + IL_014d: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0152: dup + IL_0153: stsfld class [mscorlib]System.Tuple`2[] ''.$Linq101Select01::upperLowerWords@36 + IL_0158: stloc.s upperLowerWords .line 43,47 : 1,20 '' - IL_015e: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_0163: stloc.s V_25 - IL_0165: ldc.i4.0 - IL_0166: ldnull - IL_0167: ldc.i4.0 - IL_0168: ldnull - IL_0169: newobj instance void Linq101Select01/digitOddEvens@46::.ctor(int32, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_015a: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_015f: stloc.s V_25 + IL_0161: ldnull + IL_0162: ldc.i4.0 + IL_0163: ldnull + IL_0164: newobj instance void Linq101Select01/digitOddEvens@46::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, class [mscorlib]System.Tuple`2) - IL_016e: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList>(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0173: dup - IL_0174: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> ''.$Linq101Select01::digitOddEvens@43 - IL_0179: stloc.s digitOddEvens + IL_0169: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList>(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_016e: dup + IL_016f: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> ''.$Linq101Select01::digitOddEvens@43 + IL_0174: stloc.s digitOddEvens .line 50,54 : 1,21 '' - IL_017b: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_0180: stloc.s V_26 - IL_0182: ldnull - IL_0183: ldnull - IL_0184: ldc.i4.0 - IL_0185: ldnull - IL_0186: newobj instance void Linq101Select01/productInfos@53::.ctor(class [Utils]Utils/Product, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0176: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_017b: stloc.s V_26 + IL_017d: ldnull + IL_017e: ldc.i4.0 + IL_017f: ldnull + IL_0180: newobj instance void Linq101Select01/productInfos@53::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, class [mscorlib]System.Tuple`3) - IL_018b: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0190: dup - IL_0191: stsfld class [mscorlib]System.Tuple`3[] ''.$Linq101Select01::productInfos@50 - IL_0196: stloc.s productInfos + IL_0185: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_018a: dup + IL_018b: stsfld class [mscorlib]System.Tuple`3[] ''.$Linq101Select01::productInfos@50 + IL_0190: stloc.s productInfos .line 57,57 : 1,21 '' - IL_0198: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_strings() - IL_019d: dup - IL_019e: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Select01::'digits@57-4' - IL_01a3: stloc.s digits + IL_0192: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_strings() + IL_0197: dup + IL_0198: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Select01::'digits@57-4' + IL_019d: stloc.s digits .line 58,63 : 1,20 '' - IL_01a5: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_01aa: stloc.s V_27 + IL_019f: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_01a4: stloc.s V_27 + IL_01a6: ldloc.s V_27 + IL_01a8: ldloc.s V_27 + IL_01aa: ldloc.s V_27 IL_01ac: ldloc.s V_27 - IL_01ae: ldloc.s V_27 - IL_01b0: ldloc.s V_27 - IL_01b2: ldloc.s V_27 - IL_01b4: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_numbers() - IL_01b9: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Source(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_01be: ldloc.s V_27 - IL_01c0: newobj instance void Linq101Select01/lowNums@60::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_01c5: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_01ae: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_numbers() + IL_01b3: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Source(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_01b8: ldloc.s V_27 + IL_01ba: newobj instance void Linq101Select01/lowNums@60::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_01bf: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_01ca: newobj instance void Linq101Select01/'lowNums@61-1'::.ctor() - IL_01cf: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Where(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_01c4: newobj instance void Linq101Select01/'lowNums@61-1'::.ctor() + IL_01c9: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Where(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_01d4: newobj instance void Linq101Select01/'lowNums@62-2'::.ctor() - IL_01d9: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_01ce: newobj instance void Linq101Select01/'lowNums@62-2'::.ctor() + IL_01d3: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_01de: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() - IL_01e3: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_01e8: dup - IL_01e9: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Select01::lowNums@58 - IL_01ee: stloc.s lowNums + IL_01d8: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() + IL_01dd: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_01e2: dup + IL_01e3: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Select01::lowNums@58 + IL_01e8: stloc.s lowNums .line 64,64 : 1,59 '' - IL_01f0: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_lowNums() - IL_01f5: stloc.s V_28 - IL_01f7: ldstr "four" - IL_01fc: ldstr "one" - IL_0201: ldstr "three" - IL_0206: ldstr "two" - IL_020b: ldstr "zero" - IL_0210: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() - IL_0215: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_01ea: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_lowNums() + IL_01ef: stloc.s V_28 + IL_01f1: ldstr "four" + IL_01f6: ldstr "one" + IL_01fb: ldstr "three" + IL_0200: ldstr "two" + IL_0205: ldstr "zero" + IL_020a: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_020f: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_021a: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0214: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_021f: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0219: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_0224: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_021e: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_0229: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0223: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_022e: stloc.s V_29 - IL_0230: ldloc.s V_28 - IL_0232: ldloc.s V_29 - IL_0234: call class [mscorlib]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() - IL_0239: callvirt instance bool class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Equals(object, + IL_0228: stloc.s V_29 + IL_022a: ldloc.s V_28 + IL_022c: ldloc.s V_29 + IL_022e: call class [mscorlib]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() + IL_0233: callvirt instance bool class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Equals(object, class [mscorlib]System.Collections.IEqualityComparer) - IL_023e: ldc.i4.0 - IL_023f: ceq - IL_0241: brfalse.s IL_0245 + IL_0238: ldc.i4.0 + IL_0239: ceq + IL_023b: brfalse.s IL_023f - IL_0243: br.s IL_0247 + IL_023d: br.s IL_0241 - IL_0245: br.s IL_0261 + IL_023f: br.s IL_025b .line 64,64 : 60,84 '' - IL_0247: ldstr "lowNums failed" - IL_024c: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_0251: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_0256: pop + IL_0241: ldstr "lowNums failed" + IL_0246: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_024b: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0250: pop .line 64,64 : 86,92 '' - IL_0257: ldc.i4.1 - IL_0258: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Exit(int32) - IL_025d: pop + IL_0251: ldc.i4.1 + IL_0252: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Exit(int32) + IL_0257: pop .line 100001,100001 : 0,0 '' - IL_025e: nop - IL_025f: br.s IL_0262 + IL_0258: nop + IL_0259: br.s IL_025c .line 100001,100001 : 0,0 '' - IL_0261: nop + IL_025b: nop .line 67,67 : 1,37 '' - IL_0262: ldc.i4.0 - IL_0263: ldc.i4.2 - IL_0264: ldc.i4.4 - IL_0265: ldc.i4.5 - IL_0266: ldc.i4.6 - IL_0267: ldc.i4.8 - IL_0268: ldc.i4.s 9 - IL_026a: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() - IL_026f: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_025c: ldc.i4.0 + IL_025d: ldc.i4.2 + IL_025e: ldc.i4.4 + IL_025f: ldc.i4.5 + IL_0260: ldc.i4.6 + IL_0261: ldc.i4.8 + IL_0262: ldc.i4.s 9 + IL_0264: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_0269: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_0274: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_026e: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_0279: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0273: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_027e: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0278: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_0283: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_027d: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_0288: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0282: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_028d: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0287: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_0292: dup - IL_0293: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Select01::numbersA@67 - IL_0298: stloc.s numbersA + IL_028c: dup + IL_028d: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Select01::numbersA@67 + IL_0292: stloc.s numbersA .line 68,68 : 1,31 '' - IL_029a: ldc.i4.1 - IL_029b: ldc.i4.3 - IL_029c: ldc.i4.5 - IL_029d: ldc.i4.7 - IL_029e: ldc.i4.8 - IL_029f: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() - IL_02a4: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0294: ldc.i4.1 + IL_0295: ldc.i4.3 + IL_0296: ldc.i4.5 + IL_0297: ldc.i4.7 + IL_0298: ldc.i4.8 + IL_0299: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_029e: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_02a9: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_02a3: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_02ae: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_02a8: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_02b3: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_02ad: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_02b8: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_02b2: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_02bd: dup - IL_02be: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Select01::numbersB@68 - IL_02c3: stloc.s numbersB + IL_02b7: dup + IL_02b8: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Select01::numbersB@68 + IL_02bd: stloc.s numbersB .line 70,76 : 1,21 '' - IL_02c5: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_02ca: stloc.s V_30 + IL_02bf: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_02c4: stloc.s V_30 + IL_02c6: ldloc.s V_30 + IL_02c8: ldloc.s V_30 + IL_02ca: ldloc.s V_30 IL_02cc: ldloc.s V_30 - IL_02ce: ldloc.s V_30 - IL_02d0: ldloc.s V_30 - IL_02d2: ldloc.s V_30 - IL_02d4: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_numbersA() - IL_02d9: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Source(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_02de: ldloc.s V_30 - IL_02e0: newobj instance void Linq101Select01/pairs@72::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_02e5: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_02ce: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_numbersA() + IL_02d3: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Source(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_02d8: ldloc.s V_30 + IL_02da: newobj instance void Linq101Select01/pairs@72::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_02df: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_02ea: newobj instance void Linq101Select01/'pairs@74-2'::.ctor() - IL_02ef: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Where,class [mscorlib]System.Collections.IEnumerable>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_02e4: newobj instance void Linq101Select01/'pairs@74-2'::.ctor() + IL_02e9: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Where,class [mscorlib]System.Collections.IEnumerable>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_02f4: newobj instance void Linq101Select01/'pairs@75-3'::.ctor() - IL_02f9: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_02ee: newobj instance void Linq101Select01/'pairs@75-3'::.ctor() + IL_02f3: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_02fe: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,class [mscorlib]System.Collections.IEnumerable>::get_Source() - IL_0303: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0308: dup - IL_0309: stsfld class [mscorlib]System.Tuple`2[] ''.$Linq101Select01::pairs@70 - IL_030e: stloc.s pairs + IL_02f8: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,class [mscorlib]System.Collections.IEnumerable>::get_Source() + IL_02fd: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0302: dup + IL_0303: stsfld class [mscorlib]System.Tuple`2[] ''.$Linq101Select01::pairs@70 + IL_0308: stloc.s pairs .line 79,79 : 1,34 '' - IL_0310: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [Utils]Utils::getCustomerList() - IL_0315: dup - IL_0316: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Select01::'customers@79-4' - IL_031b: stloc.s customers + IL_030a: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [Utils]Utils::getCustomerList() + IL_030f: dup + IL_0310: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Select01::'customers@79-4' + IL_0315: stloc.s customers .line 80,86 : 1,21 '' - IL_031d: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_0322: stloc.s V_31 + IL_0317: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_031c: stloc.s V_31 + IL_031e: ldloc.s V_31 + IL_0320: ldloc.s V_31 + IL_0322: ldloc.s V_31 IL_0324: ldloc.s V_31 - IL_0326: ldloc.s V_31 - IL_0328: ldloc.s V_31 - IL_032a: ldloc.s V_31 - IL_032c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_customers() - IL_0331: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Source(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0336: ldloc.s V_31 - IL_0338: newobj instance void Linq101Select01/'orders@82-2'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_033d: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0326: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_customers() + IL_032b: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Source(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0330: ldloc.s V_31 + IL_0332: newobj instance void Linq101Select01/'orders@82-2'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_0337: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0342: newobj instance void Linq101Select01/'orders@84-4'::.ctor() - IL_0347: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Where,class [mscorlib]System.Collections.IEnumerable>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_033c: newobj instance void Linq101Select01/'orders@84-4'::.ctor() + IL_0341: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Where,class [mscorlib]System.Collections.IEnumerable>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_034c: newobj instance void Linq101Select01/'orders@85-5'::.ctor() - IL_0351: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`3>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0346: newobj instance void Linq101Select01/'orders@85-5'::.ctor() + IL_034b: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`3>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0356: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,class [mscorlib]System.Collections.IEnumerable>::get_Source() - IL_035b: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0360: dup - IL_0361: stsfld class [mscorlib]System.Tuple`3[] ''.$Linq101Select01::orders@80 - IL_0366: stloc.s orders + IL_0350: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,class [mscorlib]System.Collections.IEnumerable>::get_Source() + IL_0355: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_035a: dup + IL_035b: stsfld class [mscorlib]System.Tuple`3[] ''.$Linq101Select01::orders@80 + IL_0360: stloc.s orders .line 89,95 : 1,21 '' - IL_0368: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_036d: stloc.s V_32 + IL_0362: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_0367: stloc.s V_32 + IL_0369: ldloc.s V_32 + IL_036b: ldloc.s V_32 + IL_036d: ldloc.s V_32 IL_036f: ldloc.s V_32 - IL_0371: ldloc.s V_32 - IL_0373: ldloc.s V_32 - IL_0375: ldloc.s V_32 - IL_0377: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_customers() - IL_037c: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Source(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0381: ldloc.s V_32 - IL_0383: newobj instance void Linq101Select01/orders2@91::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_0388: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0371: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_customers() + IL_0376: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Source(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_037b: ldloc.s V_32 + IL_037d: newobj instance void Linq101Select01/orders2@91::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_0382: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_038d: newobj instance void Linq101Select01/'orders2@93-2'::.ctor() - IL_0392: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Where,class [mscorlib]System.Collections.IEnumerable>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0387: newobj instance void Linq101Select01/'orders2@93-2'::.ctor() + IL_038c: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Where,class [mscorlib]System.Collections.IEnumerable>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0397: newobj instance void Linq101Select01/'orders2@94-3'::.ctor() - IL_039c: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`3>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0391: newobj instance void Linq101Select01/'orders2@94-3'::.ctor() + IL_0396: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`3>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_03a1: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,class [mscorlib]System.Collections.IEnumerable>::get_Source() - IL_03a6: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_03ab: dup - IL_03ac: stsfld class [mscorlib]System.Tuple`3[] ''.$Linq101Select01::orders2@89 - IL_03b1: stloc.s orders2 - IL_03b3: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_03b8: stloc.s V_33 + IL_039b: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,class [mscorlib]System.Collections.IEnumerable>::get_Source() + IL_03a0: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_03a5: dup + IL_03a6: stsfld class [mscorlib]System.Tuple`3[] ''.$Linq101Select01::orders2@89 + IL_03ab: stloc.s orders2 + IL_03ad: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_03b2: stloc.s V_33 + IL_03b4: ldloc.s V_33 + IL_03b6: ldloc.s V_33 + IL_03b8: ldloc.s V_33 IL_03ba: ldloc.s V_33 - IL_03bc: ldloc.s V_33 - IL_03be: ldloc.s V_33 - IL_03c0: ldloc.s V_33 - IL_03c2: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_customers() - IL_03c7: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Source(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_03cc: ldloc.s V_33 - IL_03ce: newobj instance void Linq101Select01/orders3@100::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_03d3: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_03bc: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_customers() + IL_03c1: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Source(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_03c6: ldloc.s V_33 + IL_03c8: newobj instance void Linq101Select01/orders3@100::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_03cd: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_03d8: newobj instance void Linq101Select01/'orders3@102-2'::.ctor() - IL_03dd: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Where,class [mscorlib]System.Collections.IEnumerable>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_03d2: newobj instance void Linq101Select01/'orders3@102-2'::.ctor() + IL_03d7: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Where,class [mscorlib]System.Collections.IEnumerable>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_03e2: newobj instance void Linq101Select01/'orders3@103-3'::.ctor() - IL_03e7: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`3>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_03dc: newobj instance void Linq101Select01/'orders3@103-3'::.ctor() + IL_03e1: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`3>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_03ec: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,class [mscorlib]System.Collections.IEnumerable>::get_Source() - IL_03f1: dup - IL_03f2: stsfld class [mscorlib]System.Collections.Generic.IEnumerable`1> ''.$Linq101Select01::orders3@98 - IL_03f7: stloc.s orders3 + IL_03e6: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,class [mscorlib]System.Collections.IEnumerable>::get_Source() + IL_03eb: dup + IL_03ec: stsfld class [mscorlib]System.Collections.Generic.IEnumerable`1> ''.$Linq101Select01::orders3@98 + IL_03f1: stloc.s orders3 .line 107,107 : 1,38 '' - IL_03f9: ldc.i4 0x7cd - IL_03fe: ldc.i4.1 - IL_03ff: ldc.i4.1 - IL_0400: newobj instance void [mscorlib]System.DateTime::.ctor(int32, + IL_03f3: ldc.i4 0x7cd + IL_03f8: ldc.i4.1 + IL_03f9: ldc.i4.1 + IL_03fa: newobj instance void [mscorlib]System.DateTime::.ctor(int32, int32, int32) - IL_0405: dup - IL_0406: stsfld valuetype [mscorlib]System.DateTime ''.$Linq101Select01::cutOffDate@107 - IL_040b: stloc.s cutOffDate - IL_040d: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_0412: stloc.s V_34 + IL_03ff: dup + IL_0400: stsfld valuetype [mscorlib]System.DateTime ''.$Linq101Select01::cutOffDate@107 + IL_0405: stloc.s cutOffDate + IL_0407: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_040c: stloc.s V_34 + IL_040e: ldloc.s V_34 + IL_0410: ldloc.s V_34 + IL_0412: ldloc.s V_34 IL_0414: ldloc.s V_34 IL_0416: ldloc.s V_34 IL_0418: ldloc.s V_34 - IL_041a: ldloc.s V_34 - IL_041c: ldloc.s V_34 - IL_041e: ldloc.s V_34 - IL_0420: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_customers() - IL_0425: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Source(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_042a: ldloc.s V_34 - IL_042c: newobj instance void Linq101Select01/orders4@111::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_0431: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_041a: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_customers() + IL_041f: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Source(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0424: ldloc.s V_34 + IL_0426: newobj instance void Linq101Select01/orders4@111::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_042b: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0436: newobj instance void Linq101Select01/'orders4@112-1'::.ctor() - IL_043b: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Where(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0430: newobj instance void Linq101Select01/'orders4@112-1'::.ctor() + IL_0435: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Where(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0440: ldloc.s V_34 - IL_0442: newobj instance void Linq101Select01/'orders4@111-2'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_0447: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_043a: ldloc.s V_34 + IL_043c: newobj instance void Linq101Select01/'orders4@111-2'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_0441: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_044c: newobj instance void Linq101Select01/'orders4@114-4'::.ctor() - IL_0451: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Where,class [mscorlib]System.Collections.IEnumerable>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0446: newobj instance void Linq101Select01/'orders4@114-4'::.ctor() + IL_044b: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Where,class [mscorlib]System.Collections.IEnumerable>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0456: newobj instance void Linq101Select01/'orders4@115-5'::.ctor() - IL_045b: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0450: newobj instance void Linq101Select01/'orders4@115-5'::.ctor() + IL_0455: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0460: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,class [mscorlib]System.Collections.IEnumerable>::get_Source() - IL_0465: dup - IL_0466: stsfld class [mscorlib]System.Collections.Generic.IEnumerable`1> ''.$Linq101Select01::orders4@109 - IL_046b: stloc.s orders4 - IL_046d: ret + IL_045a: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,class [mscorlib]System.Collections.IEnumerable>::get_Source() + IL_045f: dup + IL_0460: stsfld class [mscorlib]System.Collections.Generic.IEnumerable`1> ''.$Linq101Select01::orders4@109 + IL_0465: stloc.s orders4 + IL_0467: ret } // end of method $Linq101Select01::main@ } // end of class ''.$Linq101Select01 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101SetOperators01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101SetOperators01.il.bsl index 4f0446cfc6e..7b308ef661d 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101SetOperators01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101SetOperators01.il.bsl @@ -13,7 +13,7 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 4:4:1:0 + .ver 4:5:0:0 } .assembly extern Utils { @@ -33,20 +33,20 @@ } .mresource public FSharpSignatureData.Linq101SetOperators01 { - // Offset: 0x00000000 Length: 0x00000376 + // Offset: 0x00000000 Length: 0x00000398 } .mresource public FSharpOptimizationData.Linq101SetOperators01 { - // Offset: 0x00000380 Length: 0x0000011E + // Offset: 0x000003A0 Length: 0x0000011E } .module Linq101SetOperators01.exe -// MVID: {5A1F62A6-4EE5-349F-A745-0383A6621F5A} +// MVID: {5B9A632A-4EE5-349F-A745-03832A639A5B} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x00DB0000 +// Image base: 0x026A0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -59,11 +59,6 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) - .field public int32 _arg1 - .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 ) - .field public int32 n .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' .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 ) @@ -77,41 +72,35 @@ .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 specialname rtspecialname - instance void .ctor(int32 _arg1, - int32 n, - class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', int32 pc, int32 current) cil managed { - // Code size 44 (0x2c) + // Code size 28 (0x1c) .maxstack 8 IL_0000: ldarg.0 IL_0001: ldarg.1 - IL_0002: stfld int32 Linq101SetOperators01/'uniqueFactors@13-1'::_arg1 + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/'uniqueFactors@13-1'::'enum' IL_0007: ldarg.0 IL_0008: ldarg.2 - IL_0009: stfld int32 Linq101SetOperators01/'uniqueFactors@13-1'::n + IL_0009: stfld int32 Linq101SetOperators01/'uniqueFactors@13-1'::pc IL_000e: ldarg.0 IL_000f: ldarg.3 - IL_0010: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/'uniqueFactors@13-1'::'enum' + IL_0010: stfld int32 Linq101SetOperators01/'uniqueFactors@13-1'::current IL_0015: ldarg.0 - IL_0016: ldarg.s pc - IL_0018: stfld int32 Linq101SetOperators01/'uniqueFactors@13-1'::pc - IL_001d: ldarg.0 - IL_001e: ldarg.s current - IL_0020: stfld int32 Linq101SetOperators01/'uniqueFactors@13-1'::current - IL_0025: ldarg.0 - IL_0026: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() - IL_002b: ret + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_001b: ret } // end of method 'uniqueFactors@13-1'::.ctor .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 191 (0xbf) + // Code size 154 (0x9a) .maxstack 6 + .locals init ([0] int32 V_0, + [1] int32 n) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 100001,100001 : 0,0 'C:\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\QueryExpressionStepping\\Linq101SetOperators01.fs' + .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\QueryExpressionStepping\\Linq101SetOperators01.fs' IL_0000: ldarg.0 IL_0001: ldfld int32 Linq101SetOperators01/'uniqueFactors@13-1'::pc IL_0006: ldc.i4.1 @@ -120,7 +109,7 @@ IL_001b, IL_001d, IL_001f) - IL_0019: br.s IL_002d + IL_0019: br.s IL_002a IL_001b: br.s IL_0021 @@ -130,203 +119,190 @@ .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br.s IL_0095 + IL_0022: br.s IL_0070 .line 100001,100001 : 0,0 '' IL_0024: nop - IL_0025: br.s IL_0084 + IL_0025: br.s IL_006d .line 100001,100001 : 0,0 '' IL_0027: nop - IL_0028: br IL_00b6 + IL_0028: br.s IL_0091 .line 100001,100001 : 0,0 '' - IL_002d: nop + IL_002a: nop .line 13,13 : 9,33 '' - IL_002e: ldarg.0 - IL_002f: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101SetOperators01::get_factorsOf300() - IL_0034: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0039: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/'uniqueFactors@13-1'::'enum' - IL_003e: ldarg.0 - IL_003f: ldc.i4.1 - IL_0040: stfld int32 Linq101SetOperators01/'uniqueFactors@13-1'::pc + IL_002b: ldarg.0 + IL_002c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101SetOperators01::get_factorsOf300() + IL_0031: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0036: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/'uniqueFactors@13-1'::'enum' + IL_003b: ldarg.0 + IL_003c: ldc.i4.1 + IL_003d: stfld int32 Linq101SetOperators01/'uniqueFactors@13-1'::pc .line 13,13 : 9,33 '' - IL_0045: ldarg.0 - IL_0046: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/'uniqueFactors@13-1'::'enum' - IL_004b: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0050: brfalse.s IL_0095 - - IL_0052: ldarg.0 - IL_0053: ldarg.0 - IL_0054: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/'uniqueFactors@13-1'::'enum' - IL_0059: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_005e: stfld int32 Linq101SetOperators01/'uniqueFactors@13-1'::_arg1 + IL_0042: ldarg.0 + IL_0043: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/'uniqueFactors@13-1'::'enum' + IL_0048: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_004d: brfalse.s IL_0070 + + IL_004f: ldarg.0 + IL_0050: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/'uniqueFactors@13-1'::'enum' + IL_0055: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_005a: stloc.0 .line 13,13 : 9,33 '' - IL_0063: ldarg.0 - IL_0064: ldarg.0 - IL_0065: ldfld int32 Linq101SetOperators01/'uniqueFactors@13-1'::_arg1 - IL_006a: stfld int32 Linq101SetOperators01/'uniqueFactors@13-1'::n - IL_006f: ldarg.0 - IL_0070: ldc.i4.2 - IL_0071: stfld int32 Linq101SetOperators01/'uniqueFactors@13-1'::pc + IL_005b: ldloc.0 + IL_005c: stloc.1 + IL_005d: ldarg.0 + IL_005e: ldc.i4.2 + IL_005f: stfld int32 Linq101SetOperators01/'uniqueFactors@13-1'::pc .line 14,14 : 9,17 '' - IL_0076: ldarg.0 - IL_0077: ldarg.0 - IL_0078: ldfld int32 Linq101SetOperators01/'uniqueFactors@13-1'::n - IL_007d: stfld int32 Linq101SetOperators01/'uniqueFactors@13-1'::current - IL_0082: ldc.i4.1 - IL_0083: ret + IL_0064: ldarg.0 + IL_0065: ldloc.1 + IL_0066: stfld int32 Linq101SetOperators01/'uniqueFactors@13-1'::current + IL_006b: ldc.i4.1 + IL_006c: ret - IL_0084: ldarg.0 - IL_0085: ldc.i4.0 - IL_0086: stfld int32 Linq101SetOperators01/'uniqueFactors@13-1'::n - .line 13,13 : 9,33 '' - IL_008b: ldarg.0 - IL_008c: ldc.i4.0 - IL_008d: stfld int32 Linq101SetOperators01/'uniqueFactors@13-1'::_arg1 .line 100001,100001 : 0,0 '' - IL_0092: nop - IL_0093: br.s IL_0045 + IL_006d: nop + IL_006e: br.s IL_0042 - IL_0095: ldarg.0 - IL_0096: ldc.i4.3 - IL_0097: stfld int32 Linq101SetOperators01/'uniqueFactors@13-1'::pc + IL_0070: ldarg.0 + IL_0071: ldc.i4.3 + IL_0072: stfld int32 Linq101SetOperators01/'uniqueFactors@13-1'::pc .line 13,13 : 9,33 '' - IL_009c: ldarg.0 - IL_009d: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/'uniqueFactors@13-1'::'enum' - IL_00a2: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_00a7: nop - IL_00a8: ldarg.0 - IL_00a9: ldnull - IL_00aa: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/'uniqueFactors@13-1'::'enum' - IL_00af: ldarg.0 - IL_00b0: ldc.i4.3 - IL_00b1: stfld int32 Linq101SetOperators01/'uniqueFactors@13-1'::pc - IL_00b6: ldarg.0 - IL_00b7: ldc.i4.0 - IL_00b8: stfld int32 Linq101SetOperators01/'uniqueFactors@13-1'::current - IL_00bd: ldc.i4.0 - IL_00be: ret + IL_0077: ldarg.0 + IL_0078: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/'uniqueFactors@13-1'::'enum' + IL_007d: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0082: nop + IL_0083: ldarg.0 + IL_0084: ldnull + IL_0085: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/'uniqueFactors@13-1'::'enum' + IL_008a: ldarg.0 + IL_008b: ldc.i4.3 + IL_008c: stfld int32 Linq101SetOperators01/'uniqueFactors@13-1'::pc + IL_0091: ldarg.0 + IL_0092: ldc.i4.0 + IL_0093: stfld int32 Linq101SetOperators01/'uniqueFactors@13-1'::current + IL_0098: ldc.i4.0 + IL_0099: ret } // end of method 'uniqueFactors@13-1'::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 150 (0x96) + // Code size 148 (0x94) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [FSharp.Core]Microsoft.FSharp.Core.Unit V_1, [2] class [mscorlib]System.Exception e) .line 100001,100001 : 0,0 '' - IL_0000: ldnull - IL_0001: stloc.0 - IL_0002: ldarg.0 - IL_0003: ldfld int32 Linq101SetOperators01/'uniqueFactors@13-1'::pc - IL_0008: ldc.i4.3 - IL_0009: sub - IL_000a: switch ( - IL_0015) - IL_0013: br.s IL_001b + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101SetOperators01/'uniqueFactors@13-1'::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0019 .line 100001,100001 : 0,0 '' - IL_0015: nop - IL_0016: br IL_0089 + IL_0013: nop + IL_0014: br IL_0087 .line 100001,100001 : 0,0 '' - IL_001b: nop + IL_0019: nop .try { - IL_001c: ldarg.0 - IL_001d: ldfld int32 Linq101SetOperators01/'uniqueFactors@13-1'::pc - IL_0022: switch ( + IL_001a: ldarg.0 + IL_001b: ldfld int32 Linq101SetOperators01/'uniqueFactors@13-1'::pc + IL_0020: switch ( + IL_0037, IL_0039, IL_003b, - IL_003d, - IL_003f) - IL_0037: br.s IL_004d + IL_003d) + IL_0035: br.s IL_004b - IL_0039: br.s IL_0041 + IL_0037: br.s IL_003f - IL_003b: br.s IL_0044 + IL_0039: br.s IL_0042 - IL_003d: br.s IL_0047 + IL_003b: br.s IL_0045 - IL_003f: br.s IL_004a + IL_003d: br.s IL_0048 .line 100001,100001 : 0,0 '' - IL_0041: nop - IL_0042: br.s IL_0063 + IL_003f: nop + IL_0040: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_0044: nop - IL_0045: br.s IL_004f + IL_0042: nop + IL_0043: br.s IL_004d .line 100001,100001 : 0,0 '' - IL_0047: nop - IL_0048: br.s IL_004e + IL_0045: nop + IL_0046: br.s IL_004c .line 100001,100001 : 0,0 '' - IL_004a: nop - IL_004b: br.s IL_0063 + IL_0048: nop + IL_0049: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_004d: nop + IL_004b: nop .line 100001,100001 : 0,0 '' - IL_004e: nop - IL_004f: ldarg.0 - IL_0050: ldc.i4.3 - IL_0051: stfld int32 Linq101SetOperators01/'uniqueFactors@13-1'::pc - IL_0056: ldarg.0 - IL_0057: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/'uniqueFactors@13-1'::'enum' - IL_005c: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_0061: nop + IL_004c: nop + IL_004d: ldarg.0 + IL_004e: ldc.i4.3 + IL_004f: stfld int32 Linq101SetOperators01/'uniqueFactors@13-1'::pc + IL_0054: ldarg.0 + IL_0055: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/'uniqueFactors@13-1'::'enum' + IL_005a: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_005f: nop .line 100001,100001 : 0,0 '' - IL_0062: nop - IL_0063: ldarg.0 - IL_0064: ldc.i4.3 - IL_0065: stfld int32 Linq101SetOperators01/'uniqueFactors@13-1'::pc - IL_006a: ldarg.0 - IL_006b: ldc.i4.0 - IL_006c: stfld int32 Linq101SetOperators01/'uniqueFactors@13-1'::current - IL_0071: ldnull - IL_0072: stloc.1 - IL_0073: leave.s IL_0081 + IL_0060: nop + IL_0061: ldarg.0 + IL_0062: ldc.i4.3 + IL_0063: stfld int32 Linq101SetOperators01/'uniqueFactors@13-1'::pc + IL_0068: ldarg.0 + IL_0069: ldc.i4.0 + IL_006a: stfld int32 Linq101SetOperators01/'uniqueFactors@13-1'::current + IL_006f: ldnull + IL_0070: stloc.1 + IL_0071: leave.s IL_007f } // end .try catch [mscorlib]System.Object { - IL_0075: castclass [mscorlib]System.Exception - IL_007a: stloc.2 + IL_0073: castclass [mscorlib]System.Exception + IL_0078: stloc.2 .line 13,13 : 9,33 '' - IL_007b: ldloc.2 - IL_007c: stloc.0 - IL_007d: ldnull - IL_007e: stloc.1 - IL_007f: leave.s IL_0081 + IL_0079: ldloc.2 + IL_007a: stloc.0 + IL_007b: ldnull + IL_007c: stloc.1 + IL_007d: leave.s IL_007f .line 100001,100001 : 0,0 '' } // end handler - IL_0081: ldloc.1 - IL_0082: pop + IL_007f: ldloc.1 + IL_0080: pop .line 100001,100001 : 0,0 '' - IL_0083: nop - IL_0084: br IL_0002 + IL_0081: nop + IL_0082: br IL_0000 - IL_0089: ldloc.0 - IL_008a: ldnull - IL_008b: cgt.un - IL_008d: brfalse.s IL_0091 + IL_0087: ldloc.0 + IL_0088: ldnull + IL_0089: cgt.un + IL_008b: brfalse.s IL_008f - IL_008f: br.s IL_0093 + IL_008d: br.s IL_0091 - IL_0091: br.s IL_0095 + IL_008f: br.s IL_0093 .line 100001,100001 : 0,0 '' - IL_0093: ldloc.0 - IL_0094: throw + IL_0091: ldloc.0 + IL_0092: throw .line 100001,100001 : 0,0 '' - IL_0095: ret + IL_0093: ret } // end of method 'uniqueFactors@13-1'::Close .method public strict virtual instance bool @@ -397,19 +373,15 @@ { .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 ) - // Code size 11 (0xb) - .maxstack 9 - IL_0000: ldc.i4.0 + // Code size 9 (0x9) + .maxstack 8 + IL_0000: ldnull IL_0001: ldc.i4.0 - IL_0002: ldnull - IL_0003: ldc.i4.0 - IL_0004: ldc.i4.0 - IL_0005: newobj instance void Linq101SetOperators01/'uniqueFactors@13-1'::.ctor(int32, - int32, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0002: ldc.i4.0 + IL_0003: newobj instance void Linq101SetOperators01/'uniqueFactors@13-1'::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, int32) - IL_000a: ret + IL_0008: ret } // end of method 'uniqueFactors@13-1'::GetFreshEnumerator } // end of class 'uniqueFactors@13-1' @@ -451,7 +423,6 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) - .field public class [Utils]Utils/Product p .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' .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 ) @@ -465,35 +436,32 @@ .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 specialname rtspecialname - instance void .ctor(class [Utils]Utils/Product p, - class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', int32 pc, string current) cil managed { - // Code size 36 (0x24) + // Code size 28 (0x1c) .maxstack 8 IL_0000: ldarg.0 IL_0001: ldarg.1 - IL_0002: stfld class [Utils]Utils/Product Linq101SetOperators01/categoryNames@23::p + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/categoryNames@23::'enum' IL_0007: ldarg.0 IL_0008: ldarg.2 - IL_0009: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/categoryNames@23::'enum' + IL_0009: stfld int32 Linq101SetOperators01/categoryNames@23::pc IL_000e: ldarg.0 IL_000f: ldarg.3 - IL_0010: stfld int32 Linq101SetOperators01/categoryNames@23::pc + IL_0010: stfld string Linq101SetOperators01/categoryNames@23::current IL_0015: ldarg.0 - IL_0016: ldarg.s current - IL_0018: stfld string Linq101SetOperators01/categoryNames@23::current - IL_001d: ldarg.0 - IL_001e: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() - IL_0023: ret + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_001b: ret } // end of method categoryNames@23::.ctor .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 187 (0xbb) + // Code size 167 (0xa7) .maxstack 7 + .locals init ([0] class [Utils]Utils/Product p) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 IL_0001: ldfld int32 Linq101SetOperators01/categoryNames@23::pc @@ -503,7 +471,7 @@ IL_001b, IL_001d, IL_001f) - IL_0019: br.s IL_002d + IL_0019: br.s IL_002a IL_001b: br.s IL_0021 @@ -513,199 +481,191 @@ .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br.s IL_0091 + IL_0022: br.s IL_007d .line 100001,100001 : 0,0 '' IL_0024: nop - IL_0025: br.s IL_0087 + IL_0025: br.s IL_007a .line 100001,100001 : 0,0 '' IL_0027: nop - IL_0028: br IL_00b2 + IL_0028: br.s IL_009e .line 100001,100001 : 0,0 '' - IL_002d: nop + IL_002a: nop .line 23,23 : 9,26 '' - IL_002e: ldarg.0 - IL_002f: newobj instance void Linq101SetOperators01/'categoryNames@22-1'::.ctor() - IL_0034: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101SetOperators01::get_products() - IL_0039: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::Collect,class [Utils]Utils/Product>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + IL_002b: ldarg.0 + IL_002c: newobj instance void Linq101SetOperators01/'categoryNames@22-1'::.ctor() + IL_0031: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101SetOperators01::get_products() + IL_0036: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::Collect,class [Utils]Utils/Product>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_003e: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0043: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/categoryNames@23::'enum' - IL_0048: ldarg.0 - IL_0049: ldc.i4.1 - IL_004a: stfld int32 Linq101SetOperators01/categoryNames@23::pc + IL_003b: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0040: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/categoryNames@23::'enum' + IL_0045: ldarg.0 + IL_0046: ldc.i4.1 + IL_0047: stfld int32 Linq101SetOperators01/categoryNames@23::pc .line 23,23 : 9,26 '' - IL_004f: ldarg.0 - IL_0050: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/categoryNames@23::'enum' - IL_0055: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_005a: brfalse.s IL_0091 - - IL_005c: ldarg.0 - IL_005d: ldarg.0 - IL_005e: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/categoryNames@23::'enum' - IL_0063: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0068: stfld class [Utils]Utils/Product Linq101SetOperators01/categoryNames@23::p - IL_006d: ldarg.0 - IL_006e: ldc.i4.2 - IL_006f: stfld int32 Linq101SetOperators01/categoryNames@23::pc + IL_004c: ldarg.0 + IL_004d: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/categoryNames@23::'enum' + IL_0052: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_0057: brfalse.s IL_007d + + IL_0059: ldarg.0 + IL_005a: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/categoryNames@23::'enum' + IL_005f: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0064: stloc.0 + IL_0065: ldarg.0 + IL_0066: ldc.i4.2 + IL_0067: stfld int32 Linq101SetOperators01/categoryNames@23::pc .line 23,23 : 16,26 '' - IL_0074: ldarg.0 - IL_0075: ldarg.0 - IL_0076: ldfld class [Utils]Utils/Product Linq101SetOperators01/categoryNames@23::p - IL_007b: callvirt instance string [Utils]Utils/Product::get_Category() - IL_0080: stfld string Linq101SetOperators01/categoryNames@23::current - IL_0085: ldc.i4.1 - IL_0086: ret + IL_006c: ldarg.0 + IL_006d: ldloc.0 + IL_006e: callvirt instance string [Utils]Utils/Product::get_Category() + IL_0073: stfld string Linq101SetOperators01/categoryNames@23::current + IL_0078: ldc.i4.1 + IL_0079: ret - .line 23,23 : 9,26 '' - IL_0087: ldarg.0 - IL_0088: ldnull - IL_0089: stfld class [Utils]Utils/Product Linq101SetOperators01/categoryNames@23::p .line 100001,100001 : 0,0 '' - IL_008e: nop - IL_008f: br.s IL_004f + IL_007a: nop + IL_007b: br.s IL_004c - IL_0091: ldarg.0 - IL_0092: ldc.i4.3 - IL_0093: stfld int32 Linq101SetOperators01/categoryNames@23::pc + IL_007d: ldarg.0 + IL_007e: ldc.i4.3 + IL_007f: stfld int32 Linq101SetOperators01/categoryNames@23::pc .line 23,23 : 9,26 '' - IL_0098: ldarg.0 - IL_0099: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/categoryNames@23::'enum' - IL_009e: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_00a3: nop - IL_00a4: ldarg.0 - IL_00a5: ldnull - IL_00a6: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/categoryNames@23::'enum' - IL_00ab: ldarg.0 - IL_00ac: ldc.i4.3 - IL_00ad: stfld int32 Linq101SetOperators01/categoryNames@23::pc - IL_00b2: ldarg.0 - IL_00b3: ldnull - IL_00b4: stfld string Linq101SetOperators01/categoryNames@23::current - IL_00b9: ldc.i4.0 - IL_00ba: ret + IL_0084: ldarg.0 + IL_0085: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/categoryNames@23::'enum' + IL_008a: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_008f: nop + IL_0090: ldarg.0 + IL_0091: ldnull + IL_0092: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/categoryNames@23::'enum' + IL_0097: ldarg.0 + IL_0098: ldc.i4.3 + IL_0099: stfld int32 Linq101SetOperators01/categoryNames@23::pc + IL_009e: ldarg.0 + IL_009f: ldnull + IL_00a0: stfld string Linq101SetOperators01/categoryNames@23::current + IL_00a5: ldc.i4.0 + IL_00a6: ret } // end of method categoryNames@23::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 150 (0x96) + // Code size 148 (0x94) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [FSharp.Core]Microsoft.FSharp.Core.Unit V_1, [2] class [mscorlib]System.Exception e) .line 100001,100001 : 0,0 '' - IL_0000: ldnull - IL_0001: stloc.0 - IL_0002: ldarg.0 - IL_0003: ldfld int32 Linq101SetOperators01/categoryNames@23::pc - IL_0008: ldc.i4.3 - IL_0009: sub - IL_000a: switch ( - IL_0015) - IL_0013: br.s IL_001b + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101SetOperators01/categoryNames@23::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0019 .line 100001,100001 : 0,0 '' - IL_0015: nop - IL_0016: br IL_0089 + IL_0013: nop + IL_0014: br IL_0087 .line 100001,100001 : 0,0 '' - IL_001b: nop + IL_0019: nop .try { - IL_001c: ldarg.0 - IL_001d: ldfld int32 Linq101SetOperators01/categoryNames@23::pc - IL_0022: switch ( + IL_001a: ldarg.0 + IL_001b: ldfld int32 Linq101SetOperators01/categoryNames@23::pc + IL_0020: switch ( + IL_0037, IL_0039, IL_003b, - IL_003d, - IL_003f) - IL_0037: br.s IL_004d + IL_003d) + IL_0035: br.s IL_004b - IL_0039: br.s IL_0041 + IL_0037: br.s IL_003f - IL_003b: br.s IL_0044 + IL_0039: br.s IL_0042 - IL_003d: br.s IL_0047 + IL_003b: br.s IL_0045 - IL_003f: br.s IL_004a + IL_003d: br.s IL_0048 .line 100001,100001 : 0,0 '' - IL_0041: nop - IL_0042: br.s IL_0063 + IL_003f: nop + IL_0040: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_0044: nop - IL_0045: br.s IL_004f + IL_0042: nop + IL_0043: br.s IL_004d .line 100001,100001 : 0,0 '' - IL_0047: nop - IL_0048: br.s IL_004e + IL_0045: nop + IL_0046: br.s IL_004c .line 100001,100001 : 0,0 '' - IL_004a: nop - IL_004b: br.s IL_0063 + IL_0048: nop + IL_0049: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_004d: nop + IL_004b: nop .line 100001,100001 : 0,0 '' - IL_004e: nop - IL_004f: ldarg.0 - IL_0050: ldc.i4.3 - IL_0051: stfld int32 Linq101SetOperators01/categoryNames@23::pc - IL_0056: ldarg.0 - IL_0057: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/categoryNames@23::'enum' - IL_005c: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_0061: nop + IL_004c: nop + IL_004d: ldarg.0 + IL_004e: ldc.i4.3 + IL_004f: stfld int32 Linq101SetOperators01/categoryNames@23::pc + IL_0054: ldarg.0 + IL_0055: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/categoryNames@23::'enum' + IL_005a: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_005f: nop .line 100001,100001 : 0,0 '' - IL_0062: nop - IL_0063: ldarg.0 - IL_0064: ldc.i4.3 - IL_0065: stfld int32 Linq101SetOperators01/categoryNames@23::pc - IL_006a: ldarg.0 - IL_006b: ldnull - IL_006c: stfld string Linq101SetOperators01/categoryNames@23::current - IL_0071: ldnull - IL_0072: stloc.1 - IL_0073: leave.s IL_0081 + IL_0060: nop + IL_0061: ldarg.0 + IL_0062: ldc.i4.3 + IL_0063: stfld int32 Linq101SetOperators01/categoryNames@23::pc + IL_0068: ldarg.0 + IL_0069: ldnull + IL_006a: stfld string Linq101SetOperators01/categoryNames@23::current + IL_006f: ldnull + IL_0070: stloc.1 + IL_0071: leave.s IL_007f } // end .try catch [mscorlib]System.Object { - IL_0075: castclass [mscorlib]System.Exception - IL_007a: stloc.2 + IL_0073: castclass [mscorlib]System.Exception + IL_0078: stloc.2 .line 23,23 : 9,26 '' - IL_007b: ldloc.2 - IL_007c: stloc.0 - IL_007d: ldnull - IL_007e: stloc.1 - IL_007f: leave.s IL_0081 + IL_0079: ldloc.2 + IL_007a: stloc.0 + IL_007b: ldnull + IL_007c: stloc.1 + IL_007d: leave.s IL_007f .line 100001,100001 : 0,0 '' } // end handler - IL_0081: ldloc.1 - IL_0082: pop + IL_007f: ldloc.1 + IL_0080: pop .line 100001,100001 : 0,0 '' - IL_0083: nop - IL_0084: br IL_0002 + IL_0081: nop + IL_0082: br IL_0000 - IL_0089: ldloc.0 - IL_008a: ldnull - IL_008b: cgt.un - IL_008d: brfalse.s IL_0091 + IL_0087: ldloc.0 + IL_0088: ldnull + IL_0089: cgt.un + IL_008b: brfalse.s IL_008f - IL_008f: br.s IL_0093 + IL_008d: br.s IL_0091 - IL_0091: br.s IL_0095 + IL_008f: br.s IL_0093 .line 100001,100001 : 0,0 '' - IL_0093: ldloc.0 - IL_0094: throw + IL_0091: ldloc.0 + IL_0092: throw .line 100001,100001 : 0,0 '' - IL_0095: ret + IL_0093: ret } // end of method categoryNames@23::Close .method public strict virtual instance bool @@ -776,17 +736,15 @@ { .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 ) - // Code size 10 (0xa) + // Code size 9 (0x9) .maxstack 8 IL_0000: ldnull - IL_0001: ldnull - IL_0002: ldc.i4.0 - IL_0003: ldnull - IL_0004: newobj instance void Linq101SetOperators01/categoryNames@23::.ctor(class [Utils]Utils/Product, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0001: ldc.i4.0 + IL_0002: ldnull + IL_0003: newobj instance void Linq101SetOperators01/categoryNames@23::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, string) - IL_0009: ret + IL_0008: ret } // end of method categoryNames@23::GetFreshEnumerator } // end of class categoryNames@23 @@ -828,7 +786,6 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) - .field public class [Utils]Utils/Product p .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' .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 ) @@ -842,35 +799,32 @@ .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 specialname rtspecialname - instance void .ctor(class [Utils]Utils/Product p, - class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', int32 pc, char current) cil managed { - // Code size 36 (0x24) + // Code size 28 (0x1c) .maxstack 8 IL_0000: ldarg.0 IL_0001: ldarg.1 - IL_0002: stfld class [Utils]Utils/Product Linq101SetOperators01/productFirstChars@33::p + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/productFirstChars@33::'enum' IL_0007: ldarg.0 IL_0008: ldarg.2 - IL_0009: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/productFirstChars@33::'enum' + IL_0009: stfld int32 Linq101SetOperators01/productFirstChars@33::pc IL_000e: ldarg.0 IL_000f: ldarg.3 - IL_0010: stfld int32 Linq101SetOperators01/productFirstChars@33::pc + IL_0010: stfld char Linq101SetOperators01/productFirstChars@33::current IL_0015: ldarg.0 - IL_0016: ldarg.s current - IL_0018: stfld char Linq101SetOperators01/productFirstChars@33::current - IL_001d: ldarg.0 - IL_001e: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() - IL_0023: ret + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_001b: ret } // end of method productFirstChars@33::.ctor .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 193 (0xc1) + // Code size 176 (0xb0) .maxstack 7 + .locals init ([0] class [Utils]Utils/Product p) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 IL_0001: ldfld int32 Linq101SetOperators01/productFirstChars@33::pc @@ -890,15 +844,15 @@ .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br.s IL_0097 + IL_0022: br.s IL_0086 .line 100001,100001 : 0,0 '' IL_0024: nop - IL_0025: br.s IL_008d + IL_0025: br.s IL_0083 .line 100001,100001 : 0,0 '' IL_0027: nop - IL_0028: br IL_00b8 + IL_0028: br IL_00a7 .line 100001,100001 : 0,0 '' IL_002d: nop @@ -917,174 +871,166 @@ IL_004f: ldarg.0 IL_0050: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/productFirstChars@33::'enum' IL_0055: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_005a: brfalse.s IL_0097 + IL_005a: brfalse.s IL_0086 IL_005c: ldarg.0 - IL_005d: ldarg.0 - IL_005e: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/productFirstChars@33::'enum' - IL_0063: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0068: stfld class [Utils]Utils/Product Linq101SetOperators01/productFirstChars@33::p - IL_006d: ldarg.0 - IL_006e: ldc.i4.2 - IL_006f: stfld int32 Linq101SetOperators01/productFirstChars@33::pc + IL_005d: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/productFirstChars@33::'enum' + IL_0062: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0067: stloc.0 + IL_0068: ldarg.0 + IL_0069: ldc.i4.2 + IL_006a: stfld int32 Linq101SetOperators01/productFirstChars@33::pc .line 33,33 : 29,30 '' - IL_0074: ldarg.0 - IL_0075: ldarg.0 - IL_0076: ldfld class [Utils]Utils/Product Linq101SetOperators01/productFirstChars@33::p - IL_007b: callvirt instance string [Utils]Utils/Product::get_ProductName() - IL_0080: ldc.i4.0 - IL_0081: callvirt instance char [mscorlib]System.String::get_Chars(int32) - IL_0086: stfld char Linq101SetOperators01/productFirstChars@33::current - IL_008b: ldc.i4.1 - IL_008c: ret + IL_006f: ldarg.0 + IL_0070: ldloc.0 + IL_0071: callvirt instance string [Utils]Utils/Product::get_ProductName() + IL_0076: ldc.i4.0 + IL_0077: callvirt instance char [mscorlib]System.String::get_Chars(int32) + IL_007c: stfld char Linq101SetOperators01/productFirstChars@33::current + IL_0081: ldc.i4.1 + IL_0082: ret - .line 33,33 : 9,33 '' - IL_008d: ldarg.0 - IL_008e: ldnull - IL_008f: stfld class [Utils]Utils/Product Linq101SetOperators01/productFirstChars@33::p .line 100001,100001 : 0,0 '' - IL_0094: nop - IL_0095: br.s IL_004f + IL_0083: nop + IL_0084: br.s IL_004f - IL_0097: ldarg.0 - IL_0098: ldc.i4.3 - IL_0099: stfld int32 Linq101SetOperators01/productFirstChars@33::pc + IL_0086: ldarg.0 + IL_0087: ldc.i4.3 + IL_0088: stfld int32 Linq101SetOperators01/productFirstChars@33::pc .line 33,33 : 9,33 '' - IL_009e: ldarg.0 - IL_009f: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/productFirstChars@33::'enum' - IL_00a4: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_00a9: nop - IL_00aa: ldarg.0 - IL_00ab: ldnull - IL_00ac: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/productFirstChars@33::'enum' - IL_00b1: ldarg.0 - IL_00b2: ldc.i4.3 - IL_00b3: stfld int32 Linq101SetOperators01/productFirstChars@33::pc - IL_00b8: ldarg.0 - IL_00b9: ldc.i4.0 - IL_00ba: stfld char Linq101SetOperators01/productFirstChars@33::current - IL_00bf: ldc.i4.0 - IL_00c0: ret + IL_008d: ldarg.0 + IL_008e: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/productFirstChars@33::'enum' + IL_0093: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0098: nop + IL_0099: ldarg.0 + IL_009a: ldnull + IL_009b: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/productFirstChars@33::'enum' + IL_00a0: ldarg.0 + IL_00a1: ldc.i4.3 + IL_00a2: stfld int32 Linq101SetOperators01/productFirstChars@33::pc + IL_00a7: ldarg.0 + IL_00a8: ldc.i4.0 + IL_00a9: stfld char Linq101SetOperators01/productFirstChars@33::current + IL_00ae: ldc.i4.0 + IL_00af: ret } // end of method productFirstChars@33::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 150 (0x96) + // Code size 148 (0x94) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [FSharp.Core]Microsoft.FSharp.Core.Unit V_1, [2] class [mscorlib]System.Exception e) .line 100001,100001 : 0,0 '' - IL_0000: ldnull - IL_0001: stloc.0 - IL_0002: ldarg.0 - IL_0003: ldfld int32 Linq101SetOperators01/productFirstChars@33::pc - IL_0008: ldc.i4.3 - IL_0009: sub - IL_000a: switch ( - IL_0015) - IL_0013: br.s IL_001b + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101SetOperators01/productFirstChars@33::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0019 .line 100001,100001 : 0,0 '' - IL_0015: nop - IL_0016: br IL_0089 + IL_0013: nop + IL_0014: br IL_0087 .line 100001,100001 : 0,0 '' - IL_001b: nop + IL_0019: nop .try { - IL_001c: ldarg.0 - IL_001d: ldfld int32 Linq101SetOperators01/productFirstChars@33::pc - IL_0022: switch ( + IL_001a: ldarg.0 + IL_001b: ldfld int32 Linq101SetOperators01/productFirstChars@33::pc + IL_0020: switch ( + IL_0037, IL_0039, IL_003b, - IL_003d, - IL_003f) - IL_0037: br.s IL_004d + IL_003d) + IL_0035: br.s IL_004b - IL_0039: br.s IL_0041 + IL_0037: br.s IL_003f - IL_003b: br.s IL_0044 + IL_0039: br.s IL_0042 - IL_003d: br.s IL_0047 + IL_003b: br.s IL_0045 - IL_003f: br.s IL_004a + IL_003d: br.s IL_0048 .line 100001,100001 : 0,0 '' - IL_0041: nop - IL_0042: br.s IL_0063 + IL_003f: nop + IL_0040: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_0044: nop - IL_0045: br.s IL_004f + IL_0042: nop + IL_0043: br.s IL_004d .line 100001,100001 : 0,0 '' - IL_0047: nop - IL_0048: br.s IL_004e + IL_0045: nop + IL_0046: br.s IL_004c .line 100001,100001 : 0,0 '' - IL_004a: nop - IL_004b: br.s IL_0063 + IL_0048: nop + IL_0049: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_004d: nop + IL_004b: nop .line 100001,100001 : 0,0 '' - IL_004e: nop - IL_004f: ldarg.0 - IL_0050: ldc.i4.3 - IL_0051: stfld int32 Linq101SetOperators01/productFirstChars@33::pc - IL_0056: ldarg.0 - IL_0057: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/productFirstChars@33::'enum' - IL_005c: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_0061: nop + IL_004c: nop + IL_004d: ldarg.0 + IL_004e: ldc.i4.3 + IL_004f: stfld int32 Linq101SetOperators01/productFirstChars@33::pc + IL_0054: ldarg.0 + IL_0055: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/productFirstChars@33::'enum' + IL_005a: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_005f: nop .line 100001,100001 : 0,0 '' - IL_0062: nop - IL_0063: ldarg.0 - IL_0064: ldc.i4.3 - IL_0065: stfld int32 Linq101SetOperators01/productFirstChars@33::pc - IL_006a: ldarg.0 - IL_006b: ldc.i4.0 - IL_006c: stfld char Linq101SetOperators01/productFirstChars@33::current - IL_0071: ldnull - IL_0072: stloc.1 - IL_0073: leave.s IL_0081 + IL_0060: nop + IL_0061: ldarg.0 + IL_0062: ldc.i4.3 + IL_0063: stfld int32 Linq101SetOperators01/productFirstChars@33::pc + IL_0068: ldarg.0 + IL_0069: ldc.i4.0 + IL_006a: stfld char Linq101SetOperators01/productFirstChars@33::current + IL_006f: ldnull + IL_0070: stloc.1 + IL_0071: leave.s IL_007f } // end .try catch [mscorlib]System.Object { - IL_0075: castclass [mscorlib]System.Exception - IL_007a: stloc.2 + IL_0073: castclass [mscorlib]System.Exception + IL_0078: stloc.2 .line 33,33 : 9,33 '' - IL_007b: ldloc.2 - IL_007c: stloc.0 - IL_007d: ldnull - IL_007e: stloc.1 - IL_007f: leave.s IL_0081 + IL_0079: ldloc.2 + IL_007a: stloc.0 + IL_007b: ldnull + IL_007c: stloc.1 + IL_007d: leave.s IL_007f .line 100001,100001 : 0,0 '' } // end handler - IL_0081: ldloc.1 - IL_0082: pop + IL_007f: ldloc.1 + IL_0080: pop .line 100001,100001 : 0,0 '' - IL_0083: nop - IL_0084: br IL_0002 + IL_0081: nop + IL_0082: br IL_0000 - IL_0089: ldloc.0 - IL_008a: ldnull - IL_008b: cgt.un - IL_008d: brfalse.s IL_0091 + IL_0087: ldloc.0 + IL_0088: ldnull + IL_0089: cgt.un + IL_008b: brfalse.s IL_008f - IL_008f: br.s IL_0093 + IL_008d: br.s IL_0091 - IL_0091: br.s IL_0095 + IL_008f: br.s IL_0093 .line 100001,100001 : 0,0 '' - IL_0093: ldloc.0 - IL_0094: throw + IL_0091: ldloc.0 + IL_0092: throw .line 100001,100001 : 0,0 '' - IL_0095: ret + IL_0093: ret } // end of method productFirstChars@33::Close .method public strict virtual instance bool @@ -1155,17 +1101,15 @@ { .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 ) - // Code size 10 (0xa) + // Code size 9 (0x9) .maxstack 8 IL_0000: ldnull - IL_0001: ldnull + IL_0001: ldc.i4.0 IL_0002: ldc.i4.0 - IL_0003: ldc.i4.0 - IL_0004: newobj instance void Linq101SetOperators01/productFirstChars@33::.ctor(class [Utils]Utils/Product, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0003: newobj instance void Linq101SetOperators01/productFirstChars@33::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, char) - IL_0009: ret + IL_0008: ret } // end of method productFirstChars@33::GetFreshEnumerator } // end of class productFirstChars@33 @@ -1207,7 +1151,6 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) - .field public class [Utils]Utils/Customer c .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' .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 ) @@ -1221,35 +1164,32 @@ .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 specialname rtspecialname - instance void .ctor(class [Utils]Utils/Customer c, - class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', int32 pc, char current) cil managed { - // Code size 36 (0x24) + // Code size 28 (0x1c) .maxstack 8 IL_0000: ldarg.0 IL_0001: ldarg.1 - IL_0002: stfld class [Utils]Utils/Customer Linq101SetOperators01/customerFirstChars@39::c + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/customerFirstChars@39::'enum' IL_0007: ldarg.0 IL_0008: ldarg.2 - IL_0009: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/customerFirstChars@39::'enum' + IL_0009: stfld int32 Linq101SetOperators01/customerFirstChars@39::pc IL_000e: ldarg.0 IL_000f: ldarg.3 - IL_0010: stfld int32 Linq101SetOperators01/customerFirstChars@39::pc + IL_0010: stfld char Linq101SetOperators01/customerFirstChars@39::current IL_0015: ldarg.0 - IL_0016: ldarg.s current - IL_0018: stfld char Linq101SetOperators01/customerFirstChars@39::current - IL_001d: ldarg.0 - IL_001e: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() - IL_0023: ret + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_001b: ret } // end of method customerFirstChars@39::.ctor .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 193 (0xc1) + // Code size 176 (0xb0) .maxstack 7 + .locals init ([0] class [Utils]Utils/Customer c) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 IL_0001: ldfld int32 Linq101SetOperators01/customerFirstChars@39::pc @@ -1269,15 +1209,15 @@ .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br.s IL_0097 + IL_0022: br.s IL_0086 .line 100001,100001 : 0,0 '' IL_0024: nop - IL_0025: br.s IL_008d + IL_0025: br.s IL_0083 .line 100001,100001 : 0,0 '' IL_0027: nop - IL_0028: br IL_00b8 + IL_0028: br IL_00a7 .line 100001,100001 : 0,0 '' IL_002d: nop @@ -1296,174 +1236,166 @@ IL_004f: ldarg.0 IL_0050: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/customerFirstChars@39::'enum' IL_0055: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_005a: brfalse.s IL_0097 + IL_005a: brfalse.s IL_0086 IL_005c: ldarg.0 - IL_005d: ldarg.0 - IL_005e: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/customerFirstChars@39::'enum' - IL_0063: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0068: stfld class [Utils]Utils/Customer Linq101SetOperators01/customerFirstChars@39::c - IL_006d: ldarg.0 - IL_006e: ldc.i4.2 - IL_006f: stfld int32 Linq101SetOperators01/customerFirstChars@39::pc + IL_005d: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/customerFirstChars@39::'enum' + IL_0062: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0067: stloc.0 + IL_0068: ldarg.0 + IL_0069: ldc.i4.2 + IL_006a: stfld int32 Linq101SetOperators01/customerFirstChars@39::pc .line 39,39 : 29,30 '' - IL_0074: ldarg.0 - IL_0075: ldarg.0 - IL_0076: ldfld class [Utils]Utils/Customer Linq101SetOperators01/customerFirstChars@39::c - IL_007b: callvirt instance string [Utils]Utils/Customer::get_CompanyName() - IL_0080: ldc.i4.0 - IL_0081: callvirt instance char [mscorlib]System.String::get_Chars(int32) - IL_0086: stfld char Linq101SetOperators01/customerFirstChars@39::current - IL_008b: ldc.i4.1 - IL_008c: ret + IL_006f: ldarg.0 + IL_0070: ldloc.0 + IL_0071: callvirt instance string [Utils]Utils/Customer::get_CompanyName() + IL_0076: ldc.i4.0 + IL_0077: callvirt instance char [mscorlib]System.String::get_Chars(int32) + IL_007c: stfld char Linq101SetOperators01/customerFirstChars@39::current + IL_0081: ldc.i4.1 + IL_0082: ret - .line 39,39 : 9,33 '' - IL_008d: ldarg.0 - IL_008e: ldnull - IL_008f: stfld class [Utils]Utils/Customer Linq101SetOperators01/customerFirstChars@39::c .line 100001,100001 : 0,0 '' - IL_0094: nop - IL_0095: br.s IL_004f + IL_0083: nop + IL_0084: br.s IL_004f - IL_0097: ldarg.0 - IL_0098: ldc.i4.3 - IL_0099: stfld int32 Linq101SetOperators01/customerFirstChars@39::pc + IL_0086: ldarg.0 + IL_0087: ldc.i4.3 + IL_0088: stfld int32 Linq101SetOperators01/customerFirstChars@39::pc .line 39,39 : 9,33 '' - IL_009e: ldarg.0 - IL_009f: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/customerFirstChars@39::'enum' - IL_00a4: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_00a9: nop - IL_00aa: ldarg.0 - IL_00ab: ldnull - IL_00ac: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/customerFirstChars@39::'enum' - IL_00b1: ldarg.0 - IL_00b2: ldc.i4.3 - IL_00b3: stfld int32 Linq101SetOperators01/customerFirstChars@39::pc - IL_00b8: ldarg.0 - IL_00b9: ldc.i4.0 - IL_00ba: stfld char Linq101SetOperators01/customerFirstChars@39::current - IL_00bf: ldc.i4.0 - IL_00c0: ret + IL_008d: ldarg.0 + IL_008e: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/customerFirstChars@39::'enum' + IL_0093: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0098: nop + IL_0099: ldarg.0 + IL_009a: ldnull + IL_009b: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/customerFirstChars@39::'enum' + IL_00a0: ldarg.0 + IL_00a1: ldc.i4.3 + IL_00a2: stfld int32 Linq101SetOperators01/customerFirstChars@39::pc + IL_00a7: ldarg.0 + IL_00a8: ldc.i4.0 + IL_00a9: stfld char Linq101SetOperators01/customerFirstChars@39::current + IL_00ae: ldc.i4.0 + IL_00af: ret } // end of method customerFirstChars@39::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 150 (0x96) + // Code size 148 (0x94) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [FSharp.Core]Microsoft.FSharp.Core.Unit V_1, [2] class [mscorlib]System.Exception e) .line 100001,100001 : 0,0 '' - IL_0000: ldnull - IL_0001: stloc.0 - IL_0002: ldarg.0 - IL_0003: ldfld int32 Linq101SetOperators01/customerFirstChars@39::pc - IL_0008: ldc.i4.3 - IL_0009: sub - IL_000a: switch ( - IL_0015) - IL_0013: br.s IL_001b + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101SetOperators01/customerFirstChars@39::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0019 .line 100001,100001 : 0,0 '' - IL_0015: nop - IL_0016: br IL_0089 + IL_0013: nop + IL_0014: br IL_0087 .line 100001,100001 : 0,0 '' - IL_001b: nop + IL_0019: nop .try { - IL_001c: ldarg.0 - IL_001d: ldfld int32 Linq101SetOperators01/customerFirstChars@39::pc - IL_0022: switch ( + IL_001a: ldarg.0 + IL_001b: ldfld int32 Linq101SetOperators01/customerFirstChars@39::pc + IL_0020: switch ( + IL_0037, IL_0039, IL_003b, - IL_003d, - IL_003f) - IL_0037: br.s IL_004d + IL_003d) + IL_0035: br.s IL_004b - IL_0039: br.s IL_0041 + IL_0037: br.s IL_003f - IL_003b: br.s IL_0044 + IL_0039: br.s IL_0042 - IL_003d: br.s IL_0047 + IL_003b: br.s IL_0045 - IL_003f: br.s IL_004a + IL_003d: br.s IL_0048 .line 100001,100001 : 0,0 '' - IL_0041: nop - IL_0042: br.s IL_0063 + IL_003f: nop + IL_0040: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_0044: nop - IL_0045: br.s IL_004f + IL_0042: nop + IL_0043: br.s IL_004d .line 100001,100001 : 0,0 '' - IL_0047: nop - IL_0048: br.s IL_004e + IL_0045: nop + IL_0046: br.s IL_004c .line 100001,100001 : 0,0 '' - IL_004a: nop - IL_004b: br.s IL_0063 + IL_0048: nop + IL_0049: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_004d: nop + IL_004b: nop .line 100001,100001 : 0,0 '' - IL_004e: nop - IL_004f: ldarg.0 - IL_0050: ldc.i4.3 - IL_0051: stfld int32 Linq101SetOperators01/customerFirstChars@39::pc - IL_0056: ldarg.0 - IL_0057: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/customerFirstChars@39::'enum' - IL_005c: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_0061: nop + IL_004c: nop + IL_004d: ldarg.0 + IL_004e: ldc.i4.3 + IL_004f: stfld int32 Linq101SetOperators01/customerFirstChars@39::pc + IL_0054: ldarg.0 + IL_0055: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/customerFirstChars@39::'enum' + IL_005a: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_005f: nop .line 100001,100001 : 0,0 '' - IL_0062: nop - IL_0063: ldarg.0 - IL_0064: ldc.i4.3 - IL_0065: stfld int32 Linq101SetOperators01/customerFirstChars@39::pc - IL_006a: ldarg.0 - IL_006b: ldc.i4.0 - IL_006c: stfld char Linq101SetOperators01/customerFirstChars@39::current - IL_0071: ldnull - IL_0072: stloc.1 - IL_0073: leave.s IL_0081 + IL_0060: nop + IL_0061: ldarg.0 + IL_0062: ldc.i4.3 + IL_0063: stfld int32 Linq101SetOperators01/customerFirstChars@39::pc + IL_0068: ldarg.0 + IL_0069: ldc.i4.0 + IL_006a: stfld char Linq101SetOperators01/customerFirstChars@39::current + IL_006f: ldnull + IL_0070: stloc.1 + IL_0071: leave.s IL_007f } // end .try catch [mscorlib]System.Object { - IL_0075: castclass [mscorlib]System.Exception - IL_007a: stloc.2 + IL_0073: castclass [mscorlib]System.Exception + IL_0078: stloc.2 .line 39,39 : 9,33 '' - IL_007b: ldloc.2 - IL_007c: stloc.0 - IL_007d: ldnull - IL_007e: stloc.1 - IL_007f: leave.s IL_0081 + IL_0079: ldloc.2 + IL_007a: stloc.0 + IL_007b: ldnull + IL_007c: stloc.1 + IL_007d: leave.s IL_007f .line 100001,100001 : 0,0 '' } // end handler - IL_0081: ldloc.1 - IL_0082: pop + IL_007f: ldloc.1 + IL_0080: pop .line 100001,100001 : 0,0 '' - IL_0083: nop - IL_0084: br IL_0002 + IL_0081: nop + IL_0082: br IL_0000 - IL_0089: ldloc.0 - IL_008a: ldnull - IL_008b: cgt.un - IL_008d: brfalse.s IL_0091 + IL_0087: ldloc.0 + IL_0088: ldnull + IL_0089: cgt.un + IL_008b: brfalse.s IL_008f - IL_008f: br.s IL_0093 + IL_008d: br.s IL_0091 - IL_0091: br.s IL_0095 + IL_008f: br.s IL_0093 .line 100001,100001 : 0,0 '' - IL_0093: ldloc.0 - IL_0094: throw + IL_0091: ldloc.0 + IL_0092: throw .line 100001,100001 : 0,0 '' - IL_0095: ret + IL_0093: ret } // end of method customerFirstChars@39::Close .method public strict virtual instance bool @@ -1534,17 +1466,15 @@ { .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 ) - // Code size 10 (0xa) + // Code size 9 (0x9) .maxstack 8 IL_0000: ldnull - IL_0001: ldnull + IL_0001: ldc.i4.0 IL_0002: ldc.i4.0 - IL_0003: ldc.i4.0 - IL_0004: newobj instance void Linq101SetOperators01/customerFirstChars@39::.ctor(class [Utils]Utils/Customer, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0003: newobj instance void Linq101SetOperators01/customerFirstChars@39::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, char) - IL_0009: ret + IL_0008: ret } // end of method customerFirstChars@39::GetFreshEnumerator } // end of class customerFirstChars@39 @@ -1680,7 +1610,7 @@ .method public static void main@() cil managed { .entrypoint - // Code size 207 (0xcf) + // Code size 202 (0xca) .maxstack 8 .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 factorsOf300, [1] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 uniqueFactors, @@ -1717,79 +1647,69 @@ IL_002a: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_002f: stloc.s V_7 IL_0031: ldloc.s V_7 - IL_0033: ldc.i4.0 + IL_0033: ldnull IL_0034: ldc.i4.0 - IL_0035: ldnull - IL_0036: ldc.i4.0 - IL_0037: ldc.i4.0 - IL_0038: newobj instance void Linq101SetOperators01/'uniqueFactors@13-1'::.ctor(int32, - int32, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0035: ldc.i4.0 + IL_0036: newobj instance void Linq101SetOperators01/'uniqueFactors@13-1'::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, int32) - IL_003d: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0042: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Distinct(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2) - IL_0047: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() - IL_004c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0051: dup - IL_0052: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101SetOperators01::'uniqueFactors@11-2' - IL_0057: stloc.1 + IL_003b: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0040: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Distinct(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2) + IL_0045: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() + IL_004a: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_004f: dup + IL_0050: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101SetOperators01::'uniqueFactors@11-2' + IL_0055: stloc.1 .line 18,18 : 1,32 '' - IL_0058: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [Utils]Utils::getProductList() - IL_005d: dup - IL_005e: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101SetOperators01::'products@18-14' - IL_0063: stloc.2 + IL_0056: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [Utils]Utils::getProductList() + IL_005b: dup + IL_005c: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101SetOperators01::'products@18-14' + IL_0061: stloc.2 .line 20,25 : 1,20 '' - IL_0064: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_0069: stloc.s V_8 - IL_006b: ldloc.s V_8 + IL_0062: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_0067: stloc.s V_8 + IL_0069: ldloc.s V_8 + IL_006b: ldnull + IL_006c: ldc.i4.0 IL_006d: ldnull - IL_006e: ldnull - IL_006f: ldc.i4.0 - IL_0070: ldnull - IL_0071: newobj instance void Linq101SetOperators01/categoryNames@23::.ctor(class [Utils]Utils/Product, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_006e: newobj instance void Linq101SetOperators01/categoryNames@23::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, string) - IL_0076: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_007b: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Distinct(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2) - IL_0080: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() - IL_0085: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_008a: dup - IL_008b: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101SetOperators01::categoryNames@20 - IL_0090: stloc.3 + IL_0073: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0078: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Distinct(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2) + IL_007d: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() + IL_0082: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0087: dup + IL_0088: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101SetOperators01::categoryNames@20 + IL_008d: stloc.3 .line 28,28 : 1,34 '' - IL_0091: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [Utils]Utils::getCustomerList() - IL_0096: dup - IL_0097: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101SetOperators01::'customers@28-6' - IL_009c: stloc.s customers - IL_009e: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_00a3: stloc.s V_9 - IL_00a5: ldnull - IL_00a6: ldnull - IL_00a7: ldc.i4.0 - IL_00a8: ldc.i4.0 - IL_00a9: newobj instance void Linq101SetOperators01/productFirstChars@33::.ctor(class [Utils]Utils/Product, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_008e: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [Utils]Utils::getCustomerList() + IL_0093: dup + IL_0094: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101SetOperators01::'customers@28-6' + IL_0099: stloc.s customers + IL_009b: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_00a0: stloc.s V_9 + IL_00a2: ldnull + IL_00a3: ldc.i4.0 + IL_00a4: ldc.i4.0 + IL_00a5: newobj instance void Linq101SetOperators01/productFirstChars@33::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, char) - IL_00ae: dup - IL_00af: stsfld class [mscorlib]System.Collections.Generic.IEnumerable`1 ''.$Linq101SetOperators01::productFirstChars@30 - IL_00b4: stloc.s productFirstChars - IL_00b6: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_00bb: stloc.s V_10 - IL_00bd: ldnull - IL_00be: ldnull - IL_00bf: ldc.i4.0 - IL_00c0: ldc.i4.0 - IL_00c1: newobj instance void Linq101SetOperators01/customerFirstChars@39::.ctor(class [Utils]Utils/Customer, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_00aa: dup + IL_00ab: stsfld class [mscorlib]System.Collections.Generic.IEnumerable`1 ''.$Linq101SetOperators01::productFirstChars@30 + IL_00b0: stloc.s productFirstChars + IL_00b2: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_00b7: stloc.s V_10 + IL_00b9: ldnull + IL_00ba: ldc.i4.0 + IL_00bb: ldc.i4.0 + IL_00bc: newobj instance void Linq101SetOperators01/customerFirstChars@39::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, char) - IL_00c6: dup - IL_00c7: stsfld class [mscorlib]System.Collections.Generic.IEnumerable`1 ''.$Linq101SetOperators01::customerFirstChars@36 - IL_00cc: stloc.s customerFirstChars - IL_00ce: ret + IL_00c1: dup + IL_00c2: stsfld class [mscorlib]System.Collections.Generic.IEnumerable`1 ''.$Linq101SetOperators01::customerFirstChars@36 + IL_00c7: stloc.s customerFirstChars + IL_00c9: ret } // end of method $Linq101SetOperators01::main@ } // end of class ''.$Linq101SetOperators01 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Where01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Where01.il.bsl index b1bc5d04fba..b673d1193cc 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Where01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Where01.il.bsl @@ -13,7 +13,7 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 4:4:1:0 + .ver 4:5:0:0 } .assembly extern Utils { @@ -33,20 +33,20 @@ } .mresource public FSharpSignatureData.Linq101Where01 { - // Offset: 0x00000000 Length: 0x000003B4 + // Offset: 0x00000000 Length: 0x000003D6 } .mresource public FSharpOptimizationData.Linq101Where01 { - // Offset: 0x000003B8 Length: 0x0000012E + // Offset: 0x000003E0 Length: 0x0000012E } .module Linq101Where01.exe -// MVID: {5A1F62A6-FF23-CD21-A745-0383A6621F5A} +// MVID: {5B9A632A-FF23-CD21-A745-03832A639A5B} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x00B60000 +// Image base: 0x009E0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -84,7 +84,7 @@ .maxstack 6 .locals init ([0] int32 n) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 14,14 : 9,28 'C:\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\QueryExpressionStepping\\Linq101Where01.fs' + .line 14,14 : 9,28 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\QueryExpressionStepping\\Linq101Where01.fs' IL_0000: ldarg.1 IL_0001: stloc.0 .line 15,15 : 9,22 '' @@ -585,7 +585,6 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) - .field public string d .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' .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 ) @@ -599,35 +598,32 @@ .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 specialname rtspecialname - instance void .ctor(string d, - class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', int32 pc, string current) cil managed { - // Code size 36 (0x24) + // Code size 28 (0x1c) .maxstack 8 IL_0000: ldarg.0 IL_0001: ldarg.1 - IL_0002: stfld string Linq101Where01/'shortDigits@52-2'::d + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Where01/'shortDigits@52-2'::'enum' IL_0007: ldarg.0 IL_0008: ldarg.2 - IL_0009: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Where01/'shortDigits@52-2'::'enum' + IL_0009: stfld int32 Linq101Where01/'shortDigits@52-2'::pc IL_000e: ldarg.0 IL_000f: ldarg.3 - IL_0010: stfld int32 Linq101Where01/'shortDigits@52-2'::pc + IL_0010: stfld string Linq101Where01/'shortDigits@52-2'::current IL_0015: ldarg.0 - IL_0016: ldarg.s current - IL_0018: stfld string Linq101Where01/'shortDigits@52-2'::current - IL_001d: ldarg.0 - IL_001e: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() - IL_0023: ret + IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_001b: ret } // end of method 'shortDigits@52-2'::.ctor .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 182 (0xb6) + // Code size 162 (0xa2) .maxstack 7 + .locals init ([0] string d) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 IL_0001: ldfld int32 Linq101Where01/'shortDigits@52-2'::pc @@ -637,7 +633,7 @@ IL_001b, IL_001d, IL_001f) - IL_0019: br.s IL_002d + IL_0019: br.s IL_002a IL_001b: br.s IL_0021 @@ -647,198 +643,190 @@ .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br.s IL_008c + IL_0022: br.s IL_0078 .line 100001,100001 : 0,0 '' IL_0024: nop - IL_0025: br.s IL_0082 + IL_0025: br.s IL_0075 .line 100001,100001 : 0,0 '' IL_0027: nop - IL_0028: br IL_00ad + IL_0028: br.s IL_0099 .line 100001,100001 : 0,0 '' - IL_002d: nop + IL_002a: nop .line 52,52 : 9,17 '' - IL_002e: ldarg.0 - IL_002f: newobj instance void Linq101Where01/'shortDigits@51-3'::.ctor() - IL_0034: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Where01::get_digits() - IL_0039: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::Collect,string>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + IL_002b: ldarg.0 + IL_002c: newobj instance void Linq101Where01/'shortDigits@51-3'::.ctor() + IL_0031: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Where01::get_digits() + IL_0036: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::Collect,string>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_003e: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0043: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Where01/'shortDigits@52-2'::'enum' - IL_0048: ldarg.0 - IL_0049: ldc.i4.1 - IL_004a: stfld int32 Linq101Where01/'shortDigits@52-2'::pc + IL_003b: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0040: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Where01/'shortDigits@52-2'::'enum' + IL_0045: ldarg.0 + IL_0046: ldc.i4.1 + IL_0047: stfld int32 Linq101Where01/'shortDigits@52-2'::pc .line 52,52 : 9,17 '' - IL_004f: ldarg.0 - IL_0050: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Where01/'shortDigits@52-2'::'enum' - IL_0055: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_005a: brfalse.s IL_008c - - IL_005c: ldarg.0 - IL_005d: ldarg.0 - IL_005e: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Where01/'shortDigits@52-2'::'enum' - IL_0063: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0068: stfld string Linq101Where01/'shortDigits@52-2'::d - IL_006d: ldarg.0 - IL_006e: ldc.i4.2 - IL_006f: stfld int32 Linq101Where01/'shortDigits@52-2'::pc + IL_004c: ldarg.0 + IL_004d: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Where01/'shortDigits@52-2'::'enum' + IL_0052: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_0057: brfalse.s IL_0078 + + IL_0059: ldarg.0 + IL_005a: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Where01/'shortDigits@52-2'::'enum' + IL_005f: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0064: stloc.0 + IL_0065: ldarg.0 + IL_0066: ldc.i4.2 + IL_0067: stfld int32 Linq101Where01/'shortDigits@52-2'::pc .line 52,52 : 16,17 '' - IL_0074: ldarg.0 - IL_0075: ldarg.0 - IL_0076: ldfld string Linq101Where01/'shortDigits@52-2'::d - IL_007b: stfld string Linq101Where01/'shortDigits@52-2'::current - IL_0080: ldc.i4.1 - IL_0081: ret + IL_006c: ldarg.0 + IL_006d: ldloc.0 + IL_006e: stfld string Linq101Where01/'shortDigits@52-2'::current + IL_0073: ldc.i4.1 + IL_0074: ret - .line 52,52 : 9,17 '' - IL_0082: ldarg.0 - IL_0083: ldnull - IL_0084: stfld string Linq101Where01/'shortDigits@52-2'::d .line 100001,100001 : 0,0 '' - IL_0089: nop - IL_008a: br.s IL_004f + IL_0075: nop + IL_0076: br.s IL_004c - IL_008c: ldarg.0 - IL_008d: ldc.i4.3 - IL_008e: stfld int32 Linq101Where01/'shortDigits@52-2'::pc + IL_0078: ldarg.0 + IL_0079: ldc.i4.3 + IL_007a: stfld int32 Linq101Where01/'shortDigits@52-2'::pc .line 52,52 : 9,17 '' - IL_0093: ldarg.0 - IL_0094: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Where01/'shortDigits@52-2'::'enum' - IL_0099: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_009e: nop - IL_009f: ldarg.0 - IL_00a0: ldnull - IL_00a1: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Where01/'shortDigits@52-2'::'enum' - IL_00a6: ldarg.0 - IL_00a7: ldc.i4.3 - IL_00a8: stfld int32 Linq101Where01/'shortDigits@52-2'::pc - IL_00ad: ldarg.0 - IL_00ae: ldnull - IL_00af: stfld string Linq101Where01/'shortDigits@52-2'::current - IL_00b4: ldc.i4.0 - IL_00b5: ret + IL_007f: ldarg.0 + IL_0080: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Where01/'shortDigits@52-2'::'enum' + IL_0085: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_008a: nop + IL_008b: ldarg.0 + IL_008c: ldnull + IL_008d: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Where01/'shortDigits@52-2'::'enum' + IL_0092: ldarg.0 + IL_0093: ldc.i4.3 + IL_0094: stfld int32 Linq101Where01/'shortDigits@52-2'::pc + IL_0099: ldarg.0 + IL_009a: ldnull + IL_009b: stfld string Linq101Where01/'shortDigits@52-2'::current + IL_00a0: ldc.i4.0 + IL_00a1: ret } // end of method 'shortDigits@52-2'::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 150 (0x96) + // Code size 148 (0x94) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [FSharp.Core]Microsoft.FSharp.Core.Unit V_1, [2] class [mscorlib]System.Exception e) .line 100001,100001 : 0,0 '' - IL_0000: ldnull - IL_0001: stloc.0 - IL_0002: ldarg.0 - IL_0003: ldfld int32 Linq101Where01/'shortDigits@52-2'::pc - IL_0008: ldc.i4.3 - IL_0009: sub - IL_000a: switch ( - IL_0015) - IL_0013: br.s IL_001b + IL_0000: ldarg.0 + IL_0001: ldfld int32 Linq101Where01/'shortDigits@52-2'::pc + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0019 .line 100001,100001 : 0,0 '' - IL_0015: nop - IL_0016: br IL_0089 + IL_0013: nop + IL_0014: br IL_0087 .line 100001,100001 : 0,0 '' - IL_001b: nop + IL_0019: nop .try { - IL_001c: ldarg.0 - IL_001d: ldfld int32 Linq101Where01/'shortDigits@52-2'::pc - IL_0022: switch ( + IL_001a: ldarg.0 + IL_001b: ldfld int32 Linq101Where01/'shortDigits@52-2'::pc + IL_0020: switch ( + IL_0037, IL_0039, IL_003b, - IL_003d, - IL_003f) - IL_0037: br.s IL_004d + IL_003d) + IL_0035: br.s IL_004b - IL_0039: br.s IL_0041 + IL_0037: br.s IL_003f - IL_003b: br.s IL_0044 + IL_0039: br.s IL_0042 - IL_003d: br.s IL_0047 + IL_003b: br.s IL_0045 - IL_003f: br.s IL_004a + IL_003d: br.s IL_0048 .line 100001,100001 : 0,0 '' - IL_0041: nop - IL_0042: br.s IL_0063 + IL_003f: nop + IL_0040: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_0044: nop - IL_0045: br.s IL_004f + IL_0042: nop + IL_0043: br.s IL_004d .line 100001,100001 : 0,0 '' - IL_0047: nop - IL_0048: br.s IL_004e + IL_0045: nop + IL_0046: br.s IL_004c .line 100001,100001 : 0,0 '' - IL_004a: nop - IL_004b: br.s IL_0063 + IL_0048: nop + IL_0049: br.s IL_0061 .line 100001,100001 : 0,0 '' - IL_004d: nop + IL_004b: nop .line 100001,100001 : 0,0 '' - IL_004e: nop - IL_004f: ldarg.0 - IL_0050: ldc.i4.3 - IL_0051: stfld int32 Linq101Where01/'shortDigits@52-2'::pc - IL_0056: ldarg.0 - IL_0057: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Where01/'shortDigits@52-2'::'enum' - IL_005c: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_0061: nop + IL_004c: nop + IL_004d: ldarg.0 + IL_004e: ldc.i4.3 + IL_004f: stfld int32 Linq101Where01/'shortDigits@52-2'::pc + IL_0054: ldarg.0 + IL_0055: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Where01/'shortDigits@52-2'::'enum' + IL_005a: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_005f: nop .line 100001,100001 : 0,0 '' - IL_0062: nop - IL_0063: ldarg.0 - IL_0064: ldc.i4.3 - IL_0065: stfld int32 Linq101Where01/'shortDigits@52-2'::pc - IL_006a: ldarg.0 - IL_006b: ldnull - IL_006c: stfld string Linq101Where01/'shortDigits@52-2'::current - IL_0071: ldnull - IL_0072: stloc.1 - IL_0073: leave.s IL_0081 + IL_0060: nop + IL_0061: ldarg.0 + IL_0062: ldc.i4.3 + IL_0063: stfld int32 Linq101Where01/'shortDigits@52-2'::pc + IL_0068: ldarg.0 + IL_0069: ldnull + IL_006a: stfld string Linq101Where01/'shortDigits@52-2'::current + IL_006f: ldnull + IL_0070: stloc.1 + IL_0071: leave.s IL_007f } // end .try catch [mscorlib]System.Object { - IL_0075: castclass [mscorlib]System.Exception - IL_007a: stloc.2 + IL_0073: castclass [mscorlib]System.Exception + IL_0078: stloc.2 .line 52,52 : 9,17 '' - IL_007b: ldloc.2 - IL_007c: stloc.0 - IL_007d: ldnull - IL_007e: stloc.1 - IL_007f: leave.s IL_0081 + IL_0079: ldloc.2 + IL_007a: stloc.0 + IL_007b: ldnull + IL_007c: stloc.1 + IL_007d: leave.s IL_007f .line 100001,100001 : 0,0 '' } // end handler - IL_0081: ldloc.1 - IL_0082: pop + IL_007f: ldloc.1 + IL_0080: pop .line 100001,100001 : 0,0 '' - IL_0083: nop - IL_0084: br IL_0002 + IL_0081: nop + IL_0082: br IL_0000 - IL_0089: ldloc.0 - IL_008a: ldnull - IL_008b: cgt.un - IL_008d: brfalse.s IL_0091 + IL_0087: ldloc.0 + IL_0088: ldnull + IL_0089: cgt.un + IL_008b: brfalse.s IL_008f - IL_008f: br.s IL_0093 + IL_008d: br.s IL_0091 - IL_0091: br.s IL_0095 + IL_008f: br.s IL_0093 .line 100001,100001 : 0,0 '' - IL_0093: ldloc.0 - IL_0094: throw + IL_0091: ldloc.0 + IL_0092: throw .line 100001,100001 : 0,0 '' - IL_0095: ret + IL_0093: ret } // end of method 'shortDigits@52-2'::Close .method public strict virtual instance bool @@ -909,17 +897,15 @@ { .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 ) - // Code size 10 (0xa) + // Code size 9 (0x9) .maxstack 8 IL_0000: ldnull - IL_0001: ldnull - IL_0002: ldc.i4.0 - IL_0003: ldnull - IL_0004: newobj instance void Linq101Where01/'shortDigits@52-2'::.ctor(string, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0001: ldc.i4.0 + IL_0002: ldnull + IL_0003: newobj instance void Linq101Where01/'shortDigits@52-2'::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, string) - IL_0009: ret + IL_0008: ret } // end of method 'shortDigits@52-2'::GetFreshEnumerator } // end of class 'shortDigits@52-2' @@ -1089,7 +1075,7 @@ .method public static void main@() cil managed { .entrypoint - // Code size 544 (0x220) + // Code size 543 (0x21f) .maxstack 13 .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 numbers, [1] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 lowNums, @@ -1283,21 +1269,19 @@ IL_01fd: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_0202: stloc.s V_13 IL_0204: ldnull - IL_0205: ldnull - IL_0206: ldc.i4.0 - IL_0207: ldnull - IL_0208: newobj instance void Linq101Where01/'shortDigits@52-2'::.ctor(string, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0205: ldc.i4.0 + IL_0206: ldnull + IL_0207: newobj instance void Linq101Where01/'shortDigits@52-2'::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, string) - IL_020d: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::MapIndexed>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, + IL_020c: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::MapIndexed>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0212: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::Choose,string>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, + IL_0211: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::Choose,string>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0217: dup - IL_0218: stsfld class [mscorlib]System.Collections.Generic.IEnumerable`1 ''.$Linq101Where01::shortDigits@49 - IL_021d: stloc.s shortDigits - IL_021f: ret + IL_0216: dup + IL_0217: stsfld class [mscorlib]System.Collections.Generic.IEnumerable`1 ''.$Linq101Where01::shortDigits@49 + IL_021c: stloc.s shortDigits + IL_021e: ret } // end of method $Linq101Where01::main@ } // end of class ''.$Linq101Where01 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest4.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest4.il.bsl index 621b5ad48d8..ea764c62bb0 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest4.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest4.il.bsl @@ -13,7 +13,7 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 4:4:1:0 + .ver 4:5:0:0 } .assembly SeqExpressionSteppingTest4 { @@ -29,20 +29,20 @@ } .mresource public FSharpSignatureData.SeqExpressionSteppingTest4 { - // Offset: 0x00000000 Length: 0x00000267 + // Offset: 0x00000000 Length: 0x0000026F } .mresource public FSharpOptimizationData.SeqExpressionSteppingTest4 { - // Offset: 0x00000270 Length: 0x000000AD + // Offset: 0x00000278 Length: 0x000000AD } .module SeqExpressionSteppingTest4.exe -// MVID: {59B19240-2432-93E0-A745-03834092B159} +// MVID: {5B9A68C1-2432-93E0-A745-0383C1689A5B} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x02A40000 +// Image base: 0x00760000 // =============== CLASS MEMBERS DECLARATION =================== @@ -61,7 +61,6 @@ .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 x .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 y - .field public int32 z .field public int32 pc .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 ) @@ -73,11 +72,10 @@ .method public specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 x, class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 y, - int32 z, int32 pc, int32 current) cil managed { - // Code size 44 (0x2c) + // Code size 36 (0x24) .maxstack 8 IL_0000: ldarg.0 IL_0001: ldarg.1 @@ -87,23 +85,21 @@ IL_0009: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::y IL_000e: ldarg.0 IL_000f: ldarg.3 - IL_0010: stfld int32 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::z + IL_0010: stfld int32 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::pc IL_0015: ldarg.0 - IL_0016: ldarg.s pc - IL_0018: stfld int32 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::pc + IL_0016: ldarg.s current + IL_0018: stfld int32 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::current IL_001d: ldarg.0 - IL_001e: ldarg.s current - IL_0020: stfld int32 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::current - IL_0025: ldarg.0 - IL_0026: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() - IL_002b: ret + IL_001e: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_0023: ret } // end of method f3@5::.ctor .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 210 (0xd2) - .maxstack 7 + // Code size 190 (0xbe) + .maxstack 6 + .locals init ([0] int32 z) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\SeqExpressionStepping\\SeqExpressionSteppingTest4.fs' IL_0000: ldarg.0 @@ -114,100 +110,94 @@ IL_001b, IL_001d, IL_001f) - IL_0019: br.s IL_0030 + IL_0019: br.s IL_002d IL_001b: br.s IL_0021 IL_001d: br.s IL_0024 - IL_001f: br.s IL_002a + IL_001f: br.s IL_0027 .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br.s IL_007b + IL_0022: br.s IL_0078 .line 100001,100001 : 0,0 '' IL_0024: nop - IL_0025: br IL_00ad + IL_0025: br.s IL_00a0 .line 100001,100001 : 0,0 '' - IL_002a: nop - IL_002b: br IL_00c9 + IL_0027: nop + IL_0028: br IL_00b5 .line 100001,100001 : 0,0 '' - IL_0030: nop + IL_002d: nop .line 5,5 : 15,28 '' - IL_0031: ldarg.0 - IL_0032: ldc.i4.0 - IL_0033: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::Ref(!!0) - IL_0038: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::x + IL_002e: ldarg.0 + IL_002f: ldc.i4.0 + IL_0030: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::Ref(!!0) + IL_0035: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::x .line 6,6 : 15,21 '' - IL_003d: ldarg.0 - IL_003e: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::x - IL_0043: call void [FSharp.Core]Microsoft.FSharp.Core.Operators::Increment(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_0048: nop + IL_003a: ldarg.0 + IL_003b: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::x + IL_0040: call void [FSharp.Core]Microsoft.FSharp.Core.Operators::Increment(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_0045: nop .line 7,7 : 15,28 '' - IL_0049: ldarg.0 - IL_004a: ldc.i4.0 - IL_004b: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::Ref(!!0) - IL_0050: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::y + IL_0046: ldarg.0 + IL_0047: ldc.i4.0 + IL_0048: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::Ref(!!0) + IL_004d: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::y .line 8,8 : 15,21 '' - IL_0055: ldarg.0 - IL_0056: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::y - IL_005b: call void [FSharp.Core]Microsoft.FSharp.Core.Operators::Increment(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_0060: nop - IL_0061: ldarg.0 - IL_0062: ldc.i4.1 - IL_0063: stfld int32 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::pc + IL_0052: ldarg.0 + IL_0053: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::y + IL_0058: call void [FSharp.Core]Microsoft.FSharp.Core.Operators::Increment(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_005d: nop + IL_005e: ldarg.0 + IL_005f: ldc.i4.1 + IL_0060: stfld int32 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::pc .line 9,9 : 15,23 '' - IL_0068: ldarg.0 - IL_0069: ldarg.0 - IL_006a: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::x - IL_006f: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_0074: stfld int32 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::current - IL_0079: ldc.i4.1 - IL_007a: ret + IL_0065: ldarg.0 + IL_0066: ldarg.0 + IL_0067: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::x + IL_006c: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_0071: stfld int32 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::current + IL_0076: ldc.i4.1 + IL_0077: ret .line 10,10 : 15,30 '' - IL_007b: ldarg.0 - IL_007c: ldarg.0 - IL_007d: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::x - IL_0082: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_0087: ldarg.0 - IL_0088: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::y - IL_008d: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_0092: add - IL_0093: stfld int32 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::z - IL_0098: ldarg.0 - IL_0099: ldc.i4.2 - IL_009a: stfld int32 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::pc + IL_0078: ldarg.0 + IL_0079: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::x + IL_007e: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_0083: ldarg.0 + IL_0084: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::y + IL_0089: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_008e: add + IL_008f: stloc.0 + IL_0090: ldarg.0 + IL_0091: ldc.i4.2 + IL_0092: stfld int32 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::pc .line 11,11 : 15,22 '' - IL_009f: ldarg.0 - IL_00a0: ldarg.0 - IL_00a1: ldfld int32 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::z - IL_00a6: stfld int32 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::current - IL_00ab: ldc.i4.1 - IL_00ac: ret - - .line 10,10 : 19,20 '' - IL_00ad: ldarg.0 - IL_00ae: ldc.i4.0 - IL_00af: stfld int32 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::z + IL_0097: ldarg.0 + IL_0098: ldloc.0 + IL_0099: stfld int32 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::current + IL_009e: ldc.i4.1 + IL_009f: ret + .line 7,7 : 19,20 '' - IL_00b4: ldarg.0 - IL_00b5: ldnull - IL_00b6: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::y - IL_00bb: ldarg.0 - IL_00bc: ldnull - IL_00bd: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::x - IL_00c2: ldarg.0 - IL_00c3: ldc.i4.3 - IL_00c4: stfld int32 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::pc - IL_00c9: ldarg.0 - IL_00ca: ldc.i4.0 - IL_00cb: stfld int32 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::current - IL_00d0: ldc.i4.0 - IL_00d1: ret + IL_00a0: ldarg.0 + IL_00a1: ldnull + IL_00a2: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::y + IL_00a7: ldarg.0 + IL_00a8: ldnull + IL_00a9: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::x + IL_00ae: ldarg.0 + IL_00af: ldc.i4.3 + IL_00b0: stfld int32 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::pc + IL_00b5: ldarg.0 + IL_00b6: ldc.i4.0 + IL_00b7: stfld int32 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::current + IL_00bc: ldc.i4.0 + IL_00bd: ret } // end of method f3@5::GenerateNext .method public strict virtual instance void @@ -289,19 +279,17 @@ { .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 ) - // Code size 11 (0xb) - .maxstack 9 + // Code size 10 (0xa) + .maxstack 8 IL_0000: ldnull IL_0001: ldnull IL_0002: ldc.i4.0 IL_0003: ldc.i4.0 - IL_0004: ldc.i4.0 - IL_0005: newobj instance void SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1, + IL_0004: newobj instance void SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1, class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1, int32, - int32, int32) - IL_000a: ret + IL_0009: ret } // end of method f3@5::GetFreshEnumerator } // end of class f3@5 @@ -309,20 +297,18 @@ .method public static class [mscorlib]System.Collections.Generic.IEnumerable`1 f3() cil managed { - // Code size 11 (0xb) + // Code size 10 (0xa) .maxstack 8 .line 5,11 : 9,24 '' IL_0000: ldnull IL_0001: ldnull IL_0002: ldc.i4.0 IL_0003: ldc.i4.0 - IL_0004: ldc.i4.0 - IL_0005: newobj instance void SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1, + IL_0004: newobj instance void SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1, class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1, int32, - int32, int32) - IL_000a: ret + IL_0009: ret } // end of method SeqExpressionSteppingTest4::f3 } // end of class SeqExpressionSteppingTest4 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest5.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest5.il.bsl index 73c86005500..0af7608e807 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest5.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest5.il.bsl @@ -13,7 +13,7 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 4:4:1:0 + .ver 4:5:0:0 } .assembly SeqExpressionSteppingTest5 { @@ -29,20 +29,20 @@ } .mresource public FSharpSignatureData.SeqExpressionSteppingTest5 { - // Offset: 0x00000000 Length: 0x00000267 + // Offset: 0x00000000 Length: 0x0000026F } .mresource public FSharpOptimizationData.SeqExpressionSteppingTest5 { - // Offset: 0x00000270 Length: 0x000000AD + // Offset: 0x00000278 Length: 0x000000AD } .module SeqExpressionSteppingTest5.exe -// MVID: {59B19240-2432-9401-A745-03834092B159} +// MVID: {5B9A632A-2432-9401-A745-03832A639A5B} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x002E0000 +// Image base: 0x026A0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -61,7 +61,6 @@ .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 x .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 y - .field public int32 z .field public int32 pc .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 ) @@ -73,11 +72,10 @@ .method public specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 x, class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 y, - int32 z, int32 pc, int32 current) cil managed { - // Code size 44 (0x2c) + // Code size 36 (0x24) .maxstack 8 IL_0000: ldarg.0 IL_0001: ldarg.1 @@ -87,23 +85,21 @@ IL_0009: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::y IL_000e: ldarg.0 IL_000f: ldarg.3 - IL_0010: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::z + IL_0010: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::pc IL_0015: ldarg.0 - IL_0016: ldarg.s pc - IL_0018: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::pc + IL_0016: ldarg.s current + IL_0018: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::current IL_001d: ldarg.0 - IL_001e: ldarg.s current - IL_0020: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::current - IL_0025: ldarg.0 - IL_0026: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() - IL_002b: ret + IL_001e: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_0023: ret } // end of method f4@5::.ctor .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 249 (0xf9) - .maxstack 7 + // Code size 232 (0xe8) + .maxstack 6 + .locals init ([0] int32 z) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\SeqExpressionStepping\\SeqExpressionSteppingTest5.fs' IL_0000: ldarg.0 @@ -127,7 +123,7 @@ .line 100001,100001 : 0,0 '' IL_0027: nop - IL_0028: br IL_00bf + IL_0028: br IL_00ae .line 100001,100001 : 0,0 '' IL_002d: nop @@ -135,11 +131,11 @@ .line 100001,100001 : 0,0 '' IL_0030: nop - IL_0031: br.s IL_00b1 + IL_0031: br.s IL_00a7 .line 100001,100001 : 0,0 '' IL_0033: nop - IL_0034: br IL_00f0 + IL_0034: br IL_00df .line 100001,100001 : 0,0 '' IL_0039: nop @@ -175,193 +171,185 @@ .line 10,10 : 19,34 '' IL_007f: ldarg.0 - IL_0080: ldarg.0 - IL_0081: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::x - IL_0086: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_008b: ldarg.0 - IL_008c: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::y - IL_0091: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_0096: add - IL_0097: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::z - IL_009c: ldarg.0 - IL_009d: ldc.i4.3 - IL_009e: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::pc + IL_0080: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::x + IL_0085: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_008a: ldarg.0 + IL_008b: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::y + IL_0090: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_0095: add + IL_0096: stloc.0 + IL_0097: ldarg.0 + IL_0098: ldc.i4.3 + IL_0099: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::pc .line 11,11 : 19,26 '' - IL_00a3: ldarg.0 - IL_00a4: ldarg.0 - IL_00a5: ldfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::z - IL_00aa: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::current - IL_00af: ldc.i4.1 - IL_00b0: ret - - .line 10,10 : 23,24 '' - IL_00b1: ldarg.0 - IL_00b2: ldc.i4.0 - IL_00b3: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::z - IL_00b8: ldarg.0 - IL_00b9: ldnull - IL_00ba: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::y - IL_00bf: ldarg.0 - IL_00c0: ldc.i4.4 - IL_00c1: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::pc + IL_009e: ldarg.0 + IL_009f: ldloc.0 + IL_00a0: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::current + IL_00a5: ldc.i4.1 + IL_00a6: ret + + IL_00a7: ldarg.0 + IL_00a8: ldnull + IL_00a9: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::y + IL_00ae: ldarg.0 + IL_00af: ldc.i4.4 + IL_00b0: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::pc .line 13,13 : 18,24 '' - IL_00c6: ldarg.0 - IL_00c7: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::x - IL_00cc: call void [FSharp.Core]Microsoft.FSharp.Core.Operators::Increment(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_00d1: nop + IL_00b5: ldarg.0 + IL_00b6: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::x + IL_00bb: call void [FSharp.Core]Microsoft.FSharp.Core.Operators::Increment(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_00c0: nop .line 14,14 : 18,32 '' - IL_00d2: ldstr "done" - IL_00d7: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_00dc: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_00e1: pop - IL_00e2: ldarg.0 - IL_00e3: ldnull - IL_00e4: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::x - IL_00e9: ldarg.0 - IL_00ea: ldc.i4.4 - IL_00eb: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::pc - IL_00f0: ldarg.0 - IL_00f1: ldc.i4.0 - IL_00f2: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::current - IL_00f7: ldc.i4.0 - IL_00f8: ret + IL_00c1: ldstr "done" + IL_00c6: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_00cb: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_00d0: pop + IL_00d1: ldarg.0 + IL_00d2: ldnull + IL_00d3: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::x + IL_00d8: ldarg.0 + IL_00d9: ldc.i4.4 + IL_00da: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::pc + IL_00df: ldarg.0 + IL_00e0: ldc.i4.0 + IL_00e1: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::current + IL_00e6: ldc.i4.0 + IL_00e7: ret } // end of method f4@5::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 178 (0xb2) + // Code size 176 (0xb0) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [FSharp.Core]Microsoft.FSharp.Core.Unit V_1, [2] class [mscorlib]System.Exception e) .line 100001,100001 : 0,0 '' - IL_0000: ldnull - IL_0001: stloc.0 - IL_0002: ldarg.0 - IL_0003: ldfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::pc - IL_0008: ldc.i4.4 - IL_0009: sub - IL_000a: switch ( - IL_0015) - IL_0013: br.s IL_001b + IL_0000: ldarg.0 + IL_0001: ldfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::pc + IL_0006: ldc.i4.4 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0019 .line 100001,100001 : 0,0 '' - IL_0015: nop - IL_0016: br IL_00a5 + IL_0013: nop + IL_0014: br IL_00a3 .line 100001,100001 : 0,0 '' - IL_001b: nop + IL_0019: nop .try { - IL_001c: ldarg.0 - IL_001d: ldfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::pc - IL_0022: switch ( + IL_001a: ldarg.0 + IL_001b: ldfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::pc + IL_0020: switch ( + IL_003b, IL_003d, IL_003f, IL_0041, - IL_0043, - IL_0045) - IL_003b: br.s IL_0056 + IL_0043) + IL_0039: br.s IL_0054 - IL_003d: br.s IL_0047 + IL_003b: br.s IL_0045 - IL_003f: br.s IL_004a + IL_003d: br.s IL_0048 - IL_0041: br.s IL_004d + IL_003f: br.s IL_004b - IL_0043: br.s IL_0050 + IL_0041: br.s IL_004e - IL_0045: br.s IL_0053 + IL_0043: br.s IL_0051 .line 100001,100001 : 0,0 '' - IL_0047: nop - IL_0048: br.s IL_007f + IL_0045: nop + IL_0046: br.s IL_007d .line 100001,100001 : 0,0 '' - IL_004a: nop - IL_004b: br.s IL_005b + IL_0048: nop + IL_0049: br.s IL_0059 .line 100001,100001 : 0,0 '' - IL_004d: nop - IL_004e: br.s IL_005a + IL_004b: nop + IL_004c: br.s IL_0058 .line 100001,100001 : 0,0 '' - IL_0050: nop - IL_0051: br.s IL_0057 + IL_004e: nop + IL_004f: br.s IL_0055 .line 100001,100001 : 0,0 '' - IL_0053: nop - IL_0054: br.s IL_007f + IL_0051: nop + IL_0052: br.s IL_007d .line 100001,100001 : 0,0 '' - IL_0056: nop + IL_0054: nop .line 100001,100001 : 0,0 '' - IL_0057: nop - IL_0058: br.s IL_005b + IL_0055: nop + IL_0056: br.s IL_0059 .line 100001,100001 : 0,0 '' - IL_005a: nop - IL_005b: ldarg.0 - IL_005c: ldc.i4.4 - IL_005d: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::pc + IL_0058: nop + IL_0059: ldarg.0 + IL_005a: ldc.i4.4 + IL_005b: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::pc .line 13,13 : 18,24 '' - IL_0062: ldarg.0 - IL_0063: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::x - IL_0068: call void [FSharp.Core]Microsoft.FSharp.Core.Operators::Increment(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_006d: nop + IL_0060: ldarg.0 + IL_0061: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::x + IL_0066: call void [FSharp.Core]Microsoft.FSharp.Core.Operators::Increment(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_006b: nop .line 14,14 : 18,32 '' - IL_006e: ldstr "done" - IL_0073: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_0078: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_007d: pop + IL_006c: ldstr "done" + IL_0071: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0076: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_007b: pop .line 100001,100001 : 0,0 '' - IL_007e: nop - IL_007f: ldarg.0 - IL_0080: ldc.i4.4 - IL_0081: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::pc - IL_0086: ldarg.0 - IL_0087: ldc.i4.0 - IL_0088: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::current - IL_008d: ldnull - IL_008e: stloc.1 - IL_008f: leave.s IL_009d + IL_007c: nop + IL_007d: ldarg.0 + IL_007e: ldc.i4.4 + IL_007f: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::pc + IL_0084: ldarg.0 + IL_0085: ldc.i4.0 + IL_0086: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::current + IL_008b: ldnull + IL_008c: stloc.1 + IL_008d: leave.s IL_009b } // end .try catch [mscorlib]System.Object { - IL_0091: castclass [mscorlib]System.Exception - IL_0096: stloc.2 + IL_008f: castclass [mscorlib]System.Exception + IL_0094: stloc.2 .line 5,5 : 19,20 '' - IL_0097: ldloc.2 - IL_0098: stloc.0 - IL_0099: ldnull - IL_009a: stloc.1 - IL_009b: leave.s IL_009d + IL_0095: ldloc.2 + IL_0096: stloc.0 + IL_0097: ldnull + IL_0098: stloc.1 + IL_0099: leave.s IL_009b .line 100001,100001 : 0,0 '' } // end handler - IL_009d: ldloc.1 - IL_009e: pop + IL_009b: ldloc.1 + IL_009c: pop .line 100001,100001 : 0,0 '' - IL_009f: nop - IL_00a0: br IL_0002 + IL_009d: nop + IL_009e: br IL_0000 - IL_00a5: ldloc.0 - IL_00a6: ldnull - IL_00a7: cgt.un - IL_00a9: brfalse.s IL_00ad + IL_00a3: ldloc.0 + IL_00a4: ldnull + IL_00a5: cgt.un + IL_00a7: brfalse.s IL_00ab - IL_00ab: br.s IL_00af + IL_00a9: br.s IL_00ad - IL_00ad: br.s IL_00b1 + IL_00ab: br.s IL_00af .line 100001,100001 : 0,0 '' - IL_00af: ldloc.0 - IL_00b0: throw + IL_00ad: ldloc.0 + IL_00ae: throw .line 100001,100001 : 0,0 '' - IL_00b1: ret + IL_00af: ret } // end of method f4@5::Close .method public strict virtual instance bool @@ -442,19 +430,17 @@ { .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 ) - // Code size 11 (0xb) - .maxstack 9 + // Code size 10 (0xa) + .maxstack 8 IL_0000: ldnull IL_0001: ldnull IL_0002: ldc.i4.0 IL_0003: ldc.i4.0 - IL_0004: ldc.i4.0 - IL_0005: newobj instance void SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1, + IL_0004: newobj instance void SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1, class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1, int32, - int32, int32) - IL_000a: ret + IL_0009: ret } // end of method f4@5::GetFreshEnumerator } // end of class f4@5 @@ -462,20 +448,18 @@ .method public static class [mscorlib]System.Collections.Generic.IEnumerable`1 f4() cil managed { - // Code size 11 (0xb) + // Code size 10 (0xa) .maxstack 8 .line 5,14 : 9,34 '' IL_0000: ldnull IL_0001: ldnull IL_0002: ldc.i4.0 IL_0003: ldc.i4.0 - IL_0004: ldc.i4.0 - IL_0005: newobj instance void SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1, + IL_0004: newobj instance void SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1, class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1, int32, - int32, int32) - IL_000a: ret + IL_0009: ret } // end of method SeqExpressionSteppingTest5::f4 } // end of class SeqExpressionSteppingTest5 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest6.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest6.il.bsl index b69077db463..d06d692b20b 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest6.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest6.il.bsl @@ -13,7 +13,7 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 4:4:1:0 + .ver 4:5:0:0 } .assembly SeqExpressionSteppingTest6 { @@ -29,20 +29,20 @@ } .mresource public FSharpSignatureData.SeqExpressionSteppingTest6 { - // Offset: 0x00000000 Length: 0x0000029C + // Offset: 0x00000000 Length: 0x000002A4 } .mresource public FSharpOptimizationData.SeqExpressionSteppingTest6 { - // Offset: 0x000002A0 Length: 0x000000BA + // Offset: 0x000002A8 Length: 0x000000BA } .module SeqExpressionSteppingTest6.exe -// MVID: {59B19240-2432-94A2-A745-03834092B159} +// MVID: {5B9A632A-2432-94A2-A745-03832A639A5B} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x002E0000 +// Image base: 0x01330000 // =============== CLASS MEMBERS DECLARATION =================== @@ -59,8 +59,6 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) - .field public int32 x - .field public int32 x0 .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum' .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 ) @@ -78,43 +76,37 @@ .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 specialname rtspecialname - instance void .ctor(int32 x, - int32 x0, - class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 'enum', class [mscorlib]System.Collections.Generic.IEnumerator`1 enum0, int32 pc, int32 current) cil managed { - // Code size 52 (0x34) + // Code size 36 (0x24) .maxstack 8 IL_0000: ldarg.0 IL_0001: ldarg.1 - IL_0002: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::x + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::'enum' IL_0007: ldarg.0 IL_0008: ldarg.2 - IL_0009: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::x0 + IL_0009: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::enum0 IL_000e: ldarg.0 IL_000f: ldarg.3 - IL_0010: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::'enum' + IL_0010: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc IL_0015: ldarg.0 - IL_0016: ldarg.s enum0 - IL_0018: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::enum0 + IL_0016: ldarg.s current + IL_0018: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::current IL_001d: ldarg.0 - IL_001e: ldarg.s pc - IL_0020: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc - IL_0025: ldarg.0 - IL_0026: ldarg.s current - IL_0028: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::current - IL_002d: ldarg.0 - IL_002e: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() - IL_0033: ret + IL_001e: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_0023: ret } // end of method f7@6::.ctor .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 341 (0x155) + // Code size 304 (0x130) .maxstack 6 + .locals init ([0] int32 x, + [1] int32 V_1) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\SeqExpressionStepping\\SeqExpressionSteppingTest6.fs' IL_0000: ldarg.0 @@ -127,303 +119,289 @@ IL_0027, IL_0029, IL_002b) - IL_0021: br.s IL_0048 + IL_0021: br.s IL_0045 IL_0023: br.s IL_002d - IL_0025: br.s IL_0033 + IL_0025: br.s IL_0030 - IL_0027: br.s IL_0036 + IL_0027: br.s IL_0033 - IL_0029: br.s IL_003c + IL_0029: br.s IL_0039 - IL_002b: br.s IL_0042 + IL_002b: br.s IL_003f .line 100001,100001 : 0,0 '' IL_002d: nop - IL_002e: br IL_00ad + IL_002e: br.s IL_0099 .line 100001,100001 : 0,0 '' - IL_0033: nop - IL_0034: br.s IL_00a3 + IL_0030: nop + IL_0031: br.s IL_0096 .line 100001,100001 : 0,0 '' - IL_0036: nop - IL_0037: br IL_012b + IL_0033: nop + IL_0034: br IL_0106 .line 100001,100001 : 0,0 '' - IL_003c: nop - IL_003d: br IL_0121 + IL_0039: nop + IL_003a: br IL_0103 .line 100001,100001 : 0,0 '' - IL_0042: nop - IL_0043: br IL_014c + IL_003f: nop + IL_0040: br IL_0127 .line 100001,100001 : 0,0 '' - IL_0048: nop + IL_0045: nop .line 6,8 : 15,25 '' - IL_0049: ldarg.0 - IL_004a: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6::get_es() - IL_004f: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0054: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::'enum' - IL_0059: ldarg.0 - IL_005a: ldc.i4.1 - IL_005b: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc + IL_0046: ldarg.0 + IL_0047: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6::get_es() + IL_004c: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0051: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::'enum' + IL_0056: ldarg.0 + IL_0057: ldc.i4.1 + IL_0058: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc .line 6,8 : 15,25 '' - IL_0060: ldarg.0 - IL_0061: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::'enum' - IL_0066: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_006b: brfalse.s IL_00ad - - IL_006d: ldarg.0 - IL_006e: ldarg.0 - IL_006f: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::'enum' - IL_0074: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0079: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::x + IL_005d: ldarg.0 + IL_005e: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::'enum' + IL_0063: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_0068: brfalse.s IL_0099 + + IL_006a: ldarg.0 + IL_006b: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::'enum' + IL_0070: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0075: stloc.0 .line 7,7 : 18,33 '' - IL_007e: ldstr "hello" - IL_0083: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_0088: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_008d: pop - IL_008e: ldarg.0 - IL_008f: ldc.i4.2 - IL_0090: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc + IL_0076: ldstr "hello" + IL_007b: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0080: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0085: pop + IL_0086: ldarg.0 + IL_0087: ldc.i4.2 + IL_0088: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc .line 8,8 : 18,25 '' - IL_0095: ldarg.0 - IL_0096: ldarg.0 - IL_0097: ldfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::x - IL_009c: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::current - IL_00a1: ldc.i4.1 - IL_00a2: ret + IL_008d: ldarg.0 + IL_008e: ldloc.0 + IL_008f: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::current + IL_0094: ldc.i4.1 + IL_0095: ret - .line 6,8 : 15,25 '' - IL_00a3: ldarg.0 - IL_00a4: ldc.i4.0 - IL_00a5: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::x .line 100001,100001 : 0,0 '' - IL_00aa: nop - IL_00ab: br.s IL_0060 + IL_0096: nop + IL_0097: br.s IL_005d - IL_00ad: ldarg.0 - IL_00ae: ldc.i4.5 - IL_00af: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc + IL_0099: ldarg.0 + IL_009a: ldc.i4.5 + IL_009b: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc .line 6,8 : 15,25 '' - IL_00b4: ldarg.0 - IL_00b5: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::'enum' - IL_00ba: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_00bf: nop - IL_00c0: ldarg.0 - IL_00c1: ldnull - IL_00c2: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::'enum' + IL_00a0: ldarg.0 + IL_00a1: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::'enum' + IL_00a6: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_00ab: nop + IL_00ac: ldarg.0 + IL_00ad: ldnull + IL_00ae: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::'enum' .line 9,11 : 15,25 '' - IL_00c7: ldarg.0 - IL_00c8: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6::get_es() - IL_00cd: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_00d2: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::enum0 - IL_00d7: ldarg.0 - IL_00d8: ldc.i4.3 - IL_00d9: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc + IL_00b3: ldarg.0 + IL_00b4: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6::get_es() + IL_00b9: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_00be: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::enum0 + IL_00c3: ldarg.0 + IL_00c4: ldc.i4.3 + IL_00c5: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc .line 9,11 : 15,25 '' - IL_00de: ldarg.0 - IL_00df: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::enum0 - IL_00e4: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_00e9: brfalse.s IL_012b - - IL_00eb: ldarg.0 - IL_00ec: ldarg.0 - IL_00ed: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::enum0 - IL_00f2: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_00f7: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::x0 + IL_00ca: ldarg.0 + IL_00cb: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::enum0 + IL_00d0: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_00d5: brfalse.s IL_0106 + + IL_00d7: ldarg.0 + IL_00d8: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::enum0 + IL_00dd: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_00e2: stloc.1 .line 10,10 : 18,35 '' - IL_00fc: ldstr "goodbye" - IL_0101: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_0106: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_010b: pop - IL_010c: ldarg.0 - IL_010d: ldc.i4.4 - IL_010e: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc + IL_00e3: ldstr "goodbye" + IL_00e8: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_00ed: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_00f2: pop + IL_00f3: ldarg.0 + IL_00f4: ldc.i4.4 + IL_00f5: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc .line 11,11 : 18,25 '' - IL_0113: ldarg.0 - IL_0114: ldarg.0 - IL_0115: ldfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::x0 - IL_011a: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::current - IL_011f: ldc.i4.1 - IL_0120: ret + IL_00fa: ldarg.0 + IL_00fb: ldloc.1 + IL_00fc: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::current + IL_0101: ldc.i4.1 + IL_0102: ret - .line 9,11 : 15,25 '' - IL_0121: ldarg.0 - IL_0122: ldc.i4.0 - IL_0123: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::x0 .line 100001,100001 : 0,0 '' - IL_0128: nop - IL_0129: br.s IL_00de + IL_0103: nop + IL_0104: br.s IL_00ca - IL_012b: ldarg.0 - IL_012c: ldc.i4.5 - IL_012d: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc + IL_0106: ldarg.0 + IL_0107: ldc.i4.5 + IL_0108: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc .line 9,11 : 15,25 '' - IL_0132: ldarg.0 - IL_0133: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::enum0 - IL_0138: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_013d: nop - IL_013e: ldarg.0 - IL_013f: ldnull - IL_0140: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::enum0 - IL_0145: ldarg.0 - IL_0146: ldc.i4.5 - IL_0147: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc - IL_014c: ldarg.0 - IL_014d: ldc.i4.0 - IL_014e: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::current - IL_0153: ldc.i4.0 - IL_0154: ret + IL_010d: ldarg.0 + IL_010e: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::enum0 + IL_0113: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0118: nop + IL_0119: ldarg.0 + IL_011a: ldnull + IL_011b: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::enum0 + IL_0120: ldarg.0 + IL_0121: ldc.i4.5 + IL_0122: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc + IL_0127: ldarg.0 + IL_0128: ldc.i4.0 + IL_0129: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::current + IL_012e: ldc.i4.0 + IL_012f: ret } // end of method f7@6::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 191 (0xbf) + // Code size 189 (0xbd) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [FSharp.Core]Microsoft.FSharp.Core.Unit V_1, [2] class [mscorlib]System.Exception e) .line 100001,100001 : 0,0 '' - IL_0000: ldnull - IL_0001: stloc.0 - IL_0002: ldarg.0 - IL_0003: ldfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc - IL_0008: ldc.i4.5 - IL_0009: sub - IL_000a: switch ( - IL_0015) - IL_0013: br.s IL_001b + IL_0000: ldarg.0 + IL_0001: ldfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc + IL_0006: ldc.i4.5 + IL_0007: sub + IL_0008: switch ( + IL_0013) + IL_0011: br.s IL_0019 .line 100001,100001 : 0,0 '' - IL_0015: nop - IL_0016: br IL_00b2 + IL_0013: nop + IL_0014: br IL_00b0 .line 100001,100001 : 0,0 '' - IL_001b: nop + IL_0019: nop .try { - IL_001c: ldarg.0 - IL_001d: ldfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc - IL_0022: switch ( + IL_001a: ldarg.0 + IL_001b: ldfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc + IL_0020: switch ( + IL_003f, IL_0041, IL_0043, IL_0045, IL_0047, - IL_0049, - IL_004b) - IL_003f: br.s IL_005f + IL_0049) + IL_003d: br.s IL_005d - IL_0041: br.s IL_004d + IL_003f: br.s IL_004b - IL_0043: br.s IL_0050 + IL_0041: br.s IL_004e - IL_0045: br.s IL_0053 + IL_0043: br.s IL_0051 - IL_0047: br.s IL_0056 + IL_0045: br.s IL_0054 - IL_0049: br.s IL_0059 + IL_0047: br.s IL_0057 - IL_004b: br.s IL_005c + IL_0049: br.s IL_005a .line 100001,100001 : 0,0 '' - IL_004d: nop - IL_004e: br.s IL_008c + IL_004b: nop + IL_004c: br.s IL_008a .line 100001,100001 : 0,0 '' - IL_0050: nop - IL_0051: br.s IL_0078 + IL_004e: nop + IL_004f: br.s IL_0076 .line 100001,100001 : 0,0 '' - IL_0053: nop - IL_0054: br.s IL_0077 + IL_0051: nop + IL_0052: br.s IL_0075 .line 100001,100001 : 0,0 '' - IL_0056: nop - IL_0057: br.s IL_0061 + IL_0054: nop + IL_0055: br.s IL_005f .line 100001,100001 : 0,0 '' - IL_0059: nop - IL_005a: br.s IL_0060 + IL_0057: nop + IL_0058: br.s IL_005e .line 100001,100001 : 0,0 '' - IL_005c: nop - IL_005d: br.s IL_008c + IL_005a: nop + IL_005b: br.s IL_008a .line 100001,100001 : 0,0 '' - IL_005f: nop + IL_005d: nop .line 100001,100001 : 0,0 '' - IL_0060: nop - IL_0061: ldarg.0 - IL_0062: ldc.i4.5 - IL_0063: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc - IL_0068: ldarg.0 - IL_0069: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::enum0 - IL_006e: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_0073: nop + IL_005e: nop + IL_005f: ldarg.0 + IL_0060: ldc.i4.5 + IL_0061: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc + IL_0066: ldarg.0 + IL_0067: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::enum0 + IL_006c: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0071: nop .line 100001,100001 : 0,0 '' - IL_0074: nop - IL_0075: br.s IL_008c + IL_0072: nop + IL_0073: br.s IL_008a .line 100001,100001 : 0,0 '' - IL_0077: nop - IL_0078: ldarg.0 - IL_0079: ldc.i4.5 - IL_007a: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc - IL_007f: ldarg.0 - IL_0080: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::'enum' - IL_0085: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_008a: nop + IL_0075: nop + IL_0076: ldarg.0 + IL_0077: ldc.i4.5 + IL_0078: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc + IL_007d: ldarg.0 + IL_007e: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::'enum' + IL_0083: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_0088: nop .line 100001,100001 : 0,0 '' - IL_008b: nop - IL_008c: ldarg.0 - IL_008d: ldc.i4.5 - IL_008e: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc - IL_0093: ldarg.0 - IL_0094: ldc.i4.0 - IL_0095: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::current - IL_009a: ldnull - IL_009b: stloc.1 - IL_009c: leave.s IL_00aa + IL_0089: nop + IL_008a: ldarg.0 + IL_008b: ldc.i4.5 + IL_008c: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc + IL_0091: ldarg.0 + IL_0092: ldc.i4.0 + IL_0093: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::current + IL_0098: ldnull + IL_0099: stloc.1 + IL_009a: leave.s IL_00a8 } // end .try catch [mscorlib]System.Object { - IL_009e: castclass [mscorlib]System.Exception - IL_00a3: stloc.2 + IL_009c: castclass [mscorlib]System.Exception + IL_00a1: stloc.2 .line 6,8 : 15,25 '' - IL_00a4: ldloc.2 - IL_00a5: stloc.0 - IL_00a6: ldnull - IL_00a7: stloc.1 - IL_00a8: leave.s IL_00aa + IL_00a2: ldloc.2 + IL_00a3: stloc.0 + IL_00a4: ldnull + IL_00a5: stloc.1 + IL_00a6: leave.s IL_00a8 .line 100001,100001 : 0,0 '' } // end handler - IL_00aa: ldloc.1 - IL_00ab: pop + IL_00a8: ldloc.1 + IL_00a9: pop .line 100001,100001 : 0,0 '' - IL_00ac: nop - IL_00ad: br IL_0002 + IL_00aa: nop + IL_00ab: br IL_0000 - IL_00b2: ldloc.0 - IL_00b3: ldnull - IL_00b4: cgt.un - IL_00b6: brfalse.s IL_00ba + IL_00b0: ldloc.0 + IL_00b1: ldnull + IL_00b2: cgt.un + IL_00b4: brfalse.s IL_00b8 - IL_00b8: br.s IL_00bc + IL_00b6: br.s IL_00ba - IL_00ba: br.s IL_00be + IL_00b8: br.s IL_00bc .line 100001,100001 : 0,0 '' - IL_00bc: ldloc.0 - IL_00bd: throw + IL_00ba: ldloc.0 + IL_00bb: throw .line 100001,100001 : 0,0 '' - IL_00be: ret + IL_00bc: ret } // end of method f7@6::Close .method public strict virtual instance bool @@ -514,21 +492,17 @@ { .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 ) - // Code size 12 (0xc) - .maxstack 10 - IL_0000: ldc.i4.0 - IL_0001: ldc.i4.0 - IL_0002: ldnull - IL_0003: ldnull - IL_0004: ldc.i4.0 - IL_0005: ldc.i4.0 - IL_0006: newobj instance void SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::.ctor(int32, - int32, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + // Code size 10 (0xa) + .maxstack 8 + IL_0000: ldnull + IL_0001: ldnull + IL_0002: ldc.i4.0 + IL_0003: ldc.i4.0 + IL_0004: newobj instance void SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, int32) - IL_000b: ret + IL_0009: ret } // end of method f7@6::GetFreshEnumerator } // end of class f7@6 @@ -545,22 +519,18 @@ .method public static class [mscorlib]System.Collections.Generic.IEnumerable`1 f7() cil managed { - // Code size 12 (0xc) + // Code size 10 (0xa) .maxstack 8 .line 6,11 : 9,27 '' - IL_0000: ldc.i4.0 - IL_0001: ldc.i4.0 - IL_0002: ldnull - IL_0003: ldnull - IL_0004: ldc.i4.0 - IL_0005: ldc.i4.0 - IL_0006: newobj instance void SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::.ctor(int32, - int32, - class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0000: ldnull + IL_0001: ldnull + IL_0002: ldc.i4.0 + IL_0003: ldc.i4.0 + IL_0004: newobj instance void SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, int32) - IL_000b: ret + IL_0009: ret } // end of method SeqExpressionSteppingTest6::f7 .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest7.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest7.il.bsl index b64e938da52..ae9e2337813 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest7.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest7.il.bsl @@ -13,7 +13,7 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 4:4:1:0 + .ver 4:5:0:0 } .assembly SeqExpressionSteppingTest7 { @@ -36,13 +36,13 @@ // Offset: 0x00000278 Length: 0x00000098 } .module SeqExpressionSteppingTest7.exe -// MVID: {59B19240-2432-93C3-A745-03834092B159} +// MVID: {5B9A632A-2432-93C3-A745-03832A639A5B} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x027D0000 +// Image base: 0x02450000 // =============== CLASS MEMBERS DECLARATION =================== @@ -55,10 +55,6 @@ extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) - .field public string message - .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 ) .field public int32 pc .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 ) @@ -68,32 +64,29 @@ .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 specialname rtspecialname - instance void .ctor(string message, - int32 pc, + instance void .ctor(int32 pc, !a current) cil managed { - // Code size 28 (0x1c) + // Code size 21 (0x15) .maxstack 8 IL_0000: ldarg.0 IL_0001: ldarg.1 - IL_0002: stfld string class SeqExpressionSteppingTest7/f@5::message + IL_0002: stfld int32 class SeqExpressionSteppingTest7/f@5::pc IL_0007: ldarg.0 IL_0008: ldarg.2 - IL_0009: stfld int32 class SeqExpressionSteppingTest7/f@5::pc + IL_0009: stfld !0 class SeqExpressionSteppingTest7/f@5::current IL_000e: ldarg.0 - IL_000f: ldarg.3 - IL_0010: stfld !0 class SeqExpressionSteppingTest7/f@5::current - IL_0015: ldarg.0 - IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() - IL_001b: ret + IL_000f: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() + IL_0014: ret } // end of method f@5::.ctor .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 138 (0x8a) + // Code size 113 (0x71) .maxstack 7 - .locals init ([0] !a V_0) + .locals init ([0] string V_0, + [1] !a V_1) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\SeqExpressionStepping\\SeqExpressionSteppingTest7.fs' IL_0000: ldarg.0 @@ -111,11 +104,11 @@ .line 100001,100001 : 0,0 '' IL_001b: nop - IL_001c: br.s IL_0066 + IL_001c: br.s IL_005c .line 100001,100001 : 0,0 '' IL_001e: nop - IL_001f: br.s IL_0079 + IL_001f: br.s IL_0068 .line 100001,100001 : 0,0 '' IL_0021: nop @@ -131,54 +124,47 @@ IL_0031: br.s IL_0035 - IL_0033: br.s IL_0070 + IL_0033: br.s IL_005f - IL_0035: ldarg.0 - IL_0036: ldstr "" - IL_003b: stfld string class SeqExpressionSteppingTest7/f@5::message - IL_0040: ldarg.0 - IL_0041: ldc.i4.1 - IL_0042: stfld int32 class SeqExpressionSteppingTest7/f@5::pc .line 5,5 : 44,55 '' - IL_0047: ldarg.1 - IL_0048: ldc.i4.0 - IL_0049: brfalse.s IL_0053 + IL_0035: ldstr "" + IL_003a: stloc.0 + IL_003b: ldarg.0 + IL_003c: ldc.i4.1 + IL_003d: stfld int32 class SeqExpressionSteppingTest7/f@5::pc + .line 5,5 : 44,55 '' + IL_0042: ldarg.1 + IL_0043: ldc.i4.0 + IL_0044: brfalse.s IL_004e - IL_004b: ldnull - IL_004c: unbox.any class [mscorlib]System.Collections.Generic.IEnumerable`1 - IL_0051: br.s IL_005f + IL_0046: ldnull + IL_0047: unbox.any class [mscorlib]System.Collections.Generic.IEnumerable`1 + IL_004c: br.s IL_0055 - IL_0053: ldarg.0 - IL_0054: ldfld string class SeqExpressionSteppingTest7/f@5::message - IL_0059: call class [mscorlib]System.Exception [FSharp.Core]Microsoft.FSharp.Core.Operators::Failure(string) - IL_005e: throw + IL_004e: ldloc.0 + IL_004f: call class [mscorlib]System.Exception [FSharp.Core]Microsoft.FSharp.Core.Operators::Failure(string) + IL_0054: throw - IL_005f: stobj class [mscorlib]System.Collections.Generic.IEnumerable`1 - IL_0064: ldc.i4.2 - IL_0065: ret + IL_0055: stobj class [mscorlib]System.Collections.Generic.IEnumerable`1 + IL_005a: ldc.i4.2 + IL_005b: ret - .line 5,5 : 44,55 '' - IL_0066: ldarg.0 - IL_0067: ldnull - IL_0068: stfld string class SeqExpressionSteppingTest7/f@5::message .line 100001,100001 : 0,0 '' - IL_006d: nop - IL_006e: br.s IL_0072 + IL_005c: nop + IL_005d: br.s IL_0061 .line 5,5 : 14,36 '' - IL_0070: nop + IL_005f: nop .line 100001,100001 : 0,0 '' - IL_0071: nop - IL_0072: ldarg.0 - IL_0073: ldc.i4.2 - IL_0074: stfld int32 class SeqExpressionSteppingTest7/f@5::pc - IL_0079: ldarg.0 - IL_007a: ldloca.s V_0 - IL_007c: initobj !a - IL_0082: ldloc.0 - IL_0083: stfld !0 class SeqExpressionSteppingTest7/f@5::current - IL_0088: ldc.i4.0 - IL_0089: ret + IL_0060: nop + IL_0061: ldarg.0 + IL_0062: ldc.i4.2 + IL_0063: stfld int32 class SeqExpressionSteppingTest7/f@5::pc + IL_0068: ldarg.0 + IL_0069: ldloc.1 + IL_006a: stfld !0 class SeqExpressionSteppingTest7/f@5::current + IL_006f: ldc.i4.0 + IL_0070: ret } // end of method f@5::GenerateNext .method public strict virtual instance void @@ -252,18 +238,14 @@ { .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 ) - // Code size 17 (0x11) - .maxstack 7 + // Code size 8 (0x8) + .maxstack 6 .locals init (!a V_0) - IL_0000: ldnull - IL_0001: ldc.i4.0 - IL_0002: ldloca.s V_0 - IL_0004: initobj !a - IL_000a: ldloc.0 - IL_000b: newobj instance void class SeqExpressionSteppingTest7/f@5::.ctor(string, - int32, + IL_0000: ldc.i4.0 + IL_0001: ldloc.0 + IL_0002: newobj instance void class SeqExpressionSteppingTest7/f@5::.ctor(int32, !0) - IL_0010: ret + IL_0007: ret } // end of method f@5::GetFreshEnumerator } // end of class f@5 @@ -280,21 +262,17 @@ .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f() cil managed { - // Code size 24 (0x18) - .maxstack 5 + // Code size 15 (0xf) + .maxstack 4 .locals init ([0] !!a V_0) .line 5,5 : 12,57 '' - IL_0000: ldnull - IL_0001: ldc.i4.0 - IL_0002: ldloca.s V_0 - IL_0004: initobj !!a - IL_000a: ldloc.0 - IL_000b: newobj instance void class SeqExpressionSteppingTest7/f@5::.ctor(string, - int32, + IL_0000: ldc.i4.0 + IL_0001: ldloc.0 + IL_0002: newobj instance void class SeqExpressionSteppingTest7/f@5::.ctor(int32, !0) - IL_0010: tail. - IL_0012: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0017: ret + IL_0007: tail. + IL_0009: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_000e: ret } // end of method SeqExpressionSteppingTest7::f .property class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction9b4.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction9b4.il.bsl index e3d76611df4..a92010a91c4 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction9b4.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction9b4.il.bsl @@ -13,7 +13,7 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 4:4:1:0 + .ver 4:4:3:0 } .assembly TestFunction9b4 { @@ -36,13 +36,13 @@ // Offset: 0x00000250 Length: 0x00000085 } .module TestFunction9b4.exe -// MVID: {59B19208-A091-56C1-A745-03830892B159} +// MVID: {5B17FC67-A091-56C1-A745-038367FC175B} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x027E0000 +// Image base: 0x026C0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -54,15 +54,13 @@ .method public static !!a Null() cil managed { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.LiteralAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 10 (0xa) + // Code size 2 (0x2) .maxstack 3 .locals init ([0] !!a V_0) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 8,8 : 12,16 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\TestFunctions\\TestFunction9b4.fs' - IL_0000: ldloca.s V_0 - IL_0002: initobj !!a - IL_0008: ldloc.0 - IL_0009: ret + IL_0000: ldloc.0 + IL_0001: ret } // end of method TestFunction9b4::Null .method public specialname static int32 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction6.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction6.il.bsl index 3129596e680..dcb8a71396b 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction6.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction6.il.bsl @@ -13,7 +13,7 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 4:4:1:0 + .ver 4:4:3:0 } .assembly TestFunction6 { @@ -29,20 +29,20 @@ } .mresource public FSharpSignatureData.TestFunction6 { - // Offset: 0x00000000 Length: 0x000001FD + // Offset: 0x00000000 Length: 0x00000205 } .mresource public FSharpOptimizationData.TestFunction6 { - // Offset: 0x00000208 Length: 0x00000088 + // Offset: 0x00000210 Length: 0x00000088 } .module TestFunction6.exe -// MVID: {59B19208-6591-8929-A745-03830892B159} +// MVID: {5B17FC67-6591-8929-A745-038367FC175B} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x00690000 +// Image base: 0x03360000 // =============== CLASS MEMBERS DECLARATION =================== @@ -51,7 +51,7 @@ 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 sealed nested assembly beforefieldinit 'f@11-1' + .class auto ansi serializable sealed nested assembly beforefieldinit f@11 extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 { .method assembly specialname rtspecialname @@ -64,7 +64,7 @@ IL_0000: ldarg.0 IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() IL_0006: ret - } // end of method 'f@11-1'::.ctor + } // end of method f@11::.ctor .method public strict virtual instance int32 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar0) cil managed @@ -86,9 +86,9 @@ IL_0017: ldloc.0 IL_0018: add IL_0019: ret - } // end of method 'f@11-1'::Invoke + } // end of method f@11::Invoke - } // end of class 'f@11-1' + } // end of class f@11 .method public static int32 TestFunction1() cil managed { @@ -117,7 +117,7 @@ .maxstack 5 .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 f) .line 100001,100001 : 0,0 '' - IL_0000: newobj instance void TestFunction6/'f@11-1'::.ctor() + IL_0000: newobj instance void TestFunction6/f@11::.ctor() IL_0005: stloc.0 .line 14,14 : 5,14 '' IL_0006: ldloc.0 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/TupleElimination.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/TupleElimination.il.bsl index e294d11118a..8feaefd480e 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/TupleElimination.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/TupleElimination.il.bsl @@ -13,7 +13,7 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 4:4:1:0 + .ver 4:4:3:0 } .assembly TupleElimination { @@ -29,20 +29,20 @@ } .mresource public FSharpSignatureData.TupleElimination { - // Offset: 0x00000000 Length: 0x0000022E + // Offset: 0x00000000 Length: 0x00000236 } .mresource public FSharpOptimizationData.TupleElimination { - // Offset: 0x00000238 Length: 0x0000007B + // Offset: 0x00000240 Length: 0x0000007B } .module TupleElimination.exe -// MVID: {59B19208-DFDD-92DF-A745-03830892B159} +// MVID: {5B17FC67-DFDD-92DF-A745-038367FC175B} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x02EC0000 +// Image base: 0x02760000 // =============== CLASS MEMBERS DECLARATION =================== @@ -75,69 +75,59 @@ { .entrypoint .custom instance void [FSharp.Core]Microsoft.FSharp.Core.EntryPointAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 100 (0x64) + // Code size 79 (0x4f) .maxstack 5 .locals init ([0] class [mscorlib]System.Collections.Generic.Dictionary`2 dic, [1] int32 V_1, [2] bool V_2, - [3] int32 V_3, - [4] int64 V_4, - [5] bool V_5, - [6] int64 V_6, - [7] class [mscorlib]System.Tuple`2 t) + [3] int64 V_3, + [4] bool V_4, + [5] class [mscorlib]System.Tuple`2 t) .line 7,7 : 5,64 '' IL_0000: newobj instance void class [mscorlib]System.Collections.Generic.Dictionary`2::.ctor() IL_0005: stloc.0 .line 9,9 : 31,48 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.1 - IL_0008: ldloc.0 - IL_0009: ldc.i4.1 - IL_000a: ldloca.s V_1 - IL_000c: callvirt instance bool class [mscorlib]System.Collections.Generic.Dictionary`2::TryGetValue(!0, + IL_0006: ldloc.0 + IL_0007: ldc.i4.1 + IL_0008: ldloca.s V_1 + IL_000a: callvirt instance bool class [mscorlib]System.Collections.Generic.Dictionary`2::TryGetValue(!0, !1&) - IL_0011: stloc.2 - IL_0012: ldloc.1 - IL_0013: stloc.3 + IL_000f: stloc.2 .line 10,10 : 5,6 '' - IL_0014: ldloc.2 - IL_0015: call void TupleElimination::p@5(!!0) - IL_001a: nop + IL_0010: ldloc.2 + IL_0011: call void TupleElimination::p@5(!!0) + IL_0016: nop .line 11,11 : 5,6 '' - IL_001b: ldloc.3 - IL_001c: call void TupleElimination::p@5(!!0) - IL_0021: nop + IL_0017: ldloc.1 + IL_0018: call void TupleElimination::p@5(!!0) + IL_001d: nop .line 14,14 : 38,65 '' - IL_0022: ldc.i8 0x0 - IL_002b: stloc.s V_4 - IL_002d: ldstr "123" - IL_0032: ldloca.s V_4 - IL_0034: call bool [mscorlib]System.Int64::TryParse(string, + IL_001e: ldstr "123" + IL_0023: ldloca.s V_3 + IL_0025: call bool [mscorlib]System.Int64::TryParse(string, int64&) - IL_0039: stloc.s V_5 - IL_003b: ldloc.s V_4 - IL_003d: stloc.s V_6 + IL_002a: stloc.s V_4 .line 14,14 : 5,65 '' - IL_003f: ldloc.s V_5 - IL_0041: ldloc.s V_6 - IL_0043: newobj instance void class [mscorlib]System.Tuple`2::.ctor(!0, + IL_002c: ldloc.s V_4 + IL_002e: ldloc.3 + IL_002f: newobj instance void class [mscorlib]System.Tuple`2::.ctor(!0, !1) - IL_0048: stloc.s t + IL_0034: stloc.s t .line 15,15 : 5,6 '' - IL_004a: ldloc.s V_5 - IL_004c: call void TupleElimination::p@5(!!0) - IL_0051: nop + IL_0036: ldloc.s V_4 + IL_0038: call void TupleElimination::p@5(!!0) + IL_003d: nop .line 16,16 : 5,6 '' - IL_0052: ldloc.s V_6 - IL_0054: call void TupleElimination::p@5(!!0) - IL_0059: nop + IL_003e: ldloc.3 + IL_003f: call void TupleElimination::p@5(!!0) + IL_0044: nop .line 21,21 : 5,6 '' - IL_005a: ldloc.s t - IL_005c: call void TupleElimination::p@5>(!!0) - IL_0061: nop + IL_0045: ldloc.s t + IL_0047: call void TupleElimination::p@5>(!!0) + IL_004c: nop .line 23,23 : 5,6 '' - IL_0062: ldc.i4.0 - IL_0063: ret + IL_004d: ldc.i4.0 + IL_004e: ret } // end of method TupleElimination::main } // end of class TupleElimination diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/ValueTupleAliasConstructor.fs b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/ValueTupleAliasConstructor.fs new file mode 100644 index 00000000000..a35f1cfef59 --- /dev/null +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/ValueTupleAliasConstructor.fs @@ -0,0 +1,3 @@ +open System +type Node = (struct (int* int)) +let _ = new Node(2,2) diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/ValueTupleAliasConstructor.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/ValueTupleAliasConstructor.il.bsl new file mode 100644 index 00000000000..768deb722a1 --- /dev/null +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/ValueTupleAliasConstructor.il.bsl @@ -0,0 +1,88 @@ + +// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0 +// 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:5:0:0 +} +.assembly extern System.ValueTuple +{ + .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) // .{...-.Q + .ver 4:0:1:0 +} +.assembly ValueTupleAliasConstructor +{ + .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 00 00 00 00 00 ) + + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.mresource public FSharpSignatureData.ValueTupleAliasConstructor +{ + // Offset: 0x00000000 Length: 0x000001EA +} +.mresource public FSharpOptimizationData.ValueTupleAliasConstructor +{ + // Offset: 0x000001F0 Length: 0x00000061 +} +.module ValueTupleAliasConstructor.exe +// MVID: {5B9C53DD-A8CF-BB34-A745-0383DD539C5B} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY +// Image base: 0x01B00000 + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public abstract auto ansi sealed ValueTupleAliasConstructor + 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 ) +} // end of class ValueTupleAliasConstructor + +.class private abstract auto ansi sealed ''.$ValueTupleAliasConstructor + extends [mscorlib]System.Object +{ + .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 9 (0x9) + .maxstack 8 + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 3,3 : 9,22 'c:\\kevinransom\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\Tuples\\ValueTupleAliasConstructor.fs' + IL_0000: ldc.i4.2 + IL_0001: ldc.i4.2 + IL_0002: newobj instance void valuetype [System.ValueTuple]System.ValueTuple`2::.ctor(!0, + !1) + IL_0007: pop + IL_0008: ret + } // end of method $ValueTupleAliasConstructor::main@ + +} // end of class ''.$ValueTupleAliasConstructor + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/env.lst b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/env.lst index 82897d13532..4b444e3886b 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/env.lst +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/env.lst @@ -1,13 +1,14 @@ - SOURCE=Tuple01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Tuple01.exe" # Tuple01.fs + SOURCE=Tuple01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Tuple01.exe" # Tuple01.fs SOURCE=Tuple02.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Tuple02.exe" # Tuple02.fs - SOURCE=Tuple03.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Tuple03.exe" # Tuple03.fs - SOURCE=Tuple04.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Tuple04.exe" # Tuple04.fs - SOURCE=Tuple05.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Tuple05.exe" # Tuple05.fs - SOURCE=Tuple06.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Tuple06.exe" # Tuple06.fs - SOURCE=Tuple07.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Tuple07.exe" # Tuple07.fs - - SOURCE=Tuple08.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd Tuple08.exe" # Tuple08.fs - SOURCE=TupleMonster.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TupleMonster.exe" # TupleMonster.fs - SOURCE=TupleElimination.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd TupleElimination.exe" # TupleElimination.fs - + + SOURCE=ValueTupleAliasConstructor.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize+" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd ValueTupleAliasConstructor.exe" # ValueTupleAliasConstructor.fs - diff --git a/tests/fsharpqa/Source/Conformance/BasicTypeAndModuleDefinitions/ExceptionDefinitions/E_ExnConstructorBadFieldName.fs b/tests/fsharpqa/Source/Conformance/BasicTypeAndModuleDefinitions/ExceptionDefinitions/E_ExnConstructorBadFieldName.fs index 01e7c7fa611..640fc4a532b 100644 --- a/tests/fsharpqa/Source/Conformance/BasicTypeAndModuleDefinitions/ExceptionDefinitions/E_ExnConstructorBadFieldName.fs +++ b/tests/fsharpqa/Source/Conformance/BasicTypeAndModuleDefinitions/ExceptionDefinitions/E_ExnConstructorBadFieldName.fs @@ -1,7 +1,7 @@ // #Conformance #TypesAndModules #Exceptions // Make sure we properly detect bogus named field in constructors -//Union case/exception 'AAA' does not have field named 'V3'\. -//Union case/exception 'AAA' does not have field named 'V3'\. +//The exception 'AAA' does not have a field named 'V3'\. +//The exception 'AAA' does not have a field named 'V3'\. exception AAA of V1 : int * V2 : string diff --git a/tests/fsharpqa/Source/Conformance/BasicTypeAndModuleDefinitions/UnionTypes/E_UnionConstructorBadFieldName.fs b/tests/fsharpqa/Source/Conformance/BasicTypeAndModuleDefinitions/UnionTypes/E_UnionConstructorBadFieldName.fs index fbf8b6d278a..f9ebb74b26f 100644 --- a/tests/fsharpqa/Source/Conformance/BasicTypeAndModuleDefinitions/UnionTypes/E_UnionConstructorBadFieldName.fs +++ b/tests/fsharpqa/Source/Conformance/BasicTypeAndModuleDefinitions/UnionTypes/E_UnionConstructorBadFieldName.fs @@ -1,8 +1,8 @@ // #Conformance #TypesAndModules #Unions // Make sure we properly detect bogus named field in constructors -//Union case/exception 'Case1' does not have field named 'V3'\. -//Union case/exception 'Case1' does not have field named 'V3'\. -//Union case/exception 'Case1' does not have field named 'V4'\. +//The union case 'Case1' does not have a field named 'V3'\. +//The union case 'Case1' does not have a field named 'V3'\. +//The union case 'Case1' does not have a field named 'V4'\. type MyDU = | Case1 of V1 : int * V2 : string diff --git a/tests/fsharpqa/Source/Conformance/DeclarationElements/CustomAttributes/AttributeInheritance/InheritedAttribute_001.fs b/tests/fsharpqa/Source/Conformance/DeclarationElements/CustomAttributes/AttributeInheritance/InheritedAttribute_001.fs new file mode 100644 index 00000000000..37d1064c94b --- /dev/null +++ b/tests/fsharpqa/Source/Conformance/DeclarationElements/CustomAttributes/AttributeInheritance/InheritedAttribute_001.fs @@ -0,0 +1,13 @@ +// Ensures that we get an error when warnings as error specified + +//This type does not inherit Attribute, it will not work correctly with other .NET languages. + +namespace FSharp.Conformance.DeclaratioElements.CustomAttributes.InheritedAttribute + +open System + +[] +type Author(name: string) = class end + +[] +type FirstClass() = class end diff --git a/tests/fsharpqa/Source/Conformance/DeclarationElements/CustomAttributes/AttributeInheritance/InheritedAttribute_002.fs b/tests/fsharpqa/Source/Conformance/DeclarationElements/CustomAttributes/AttributeInheritance/InheritedAttribute_002.fs new file mode 100644 index 00000000000..c8c64df1e79 --- /dev/null +++ b/tests/fsharpqa/Source/Conformance/DeclarationElements/CustomAttributes/AttributeInheritance/InheritedAttribute_002.fs @@ -0,0 +1,13 @@ +// Ensures that we get an error when warnings as error specified + +//This type does not inherit Attribute, it will not work correctly with other .NET languages. + +namespace FSharp.Conformance.DeclaratioElements.CustomAttributes.InheritedAttribute + +open System + +[] +type Author(name: string) = class end + +[] +type FirstClass() = class end diff --git a/tests/fsharpqa/Source/Conformance/DeclarationElements/CustomAttributes/AttributeInheritance/env.lst b/tests/fsharpqa/Source/Conformance/DeclarationElements/CustomAttributes/AttributeInheritance/env.lst new file mode 100644 index 00000000000..cb90d953b08 --- /dev/null +++ b/tests/fsharpqa/Source/Conformance/DeclarationElements/CustomAttributes/AttributeInheritance/env.lst @@ -0,0 +1,2 @@ + SOURCE=InheritedAttribute_001.fs SCFLAGS="--target:library --warnaserror:3242" # InheritedAttribute_001.fs + SOURCE=InheritedAttribute_002.fs SCFLAGS="--target:library" # InheritedAttribute_002.fs diff --git a/tests/fsharpqa/Source/Conformance/DeclarationElements/CustomAttributes/AttributeUsage/W_AssemblyVersion01.fs b/tests/fsharpqa/Source/Conformance/DeclarationElements/CustomAttributes/AttributeUsage/W_AssemblyVersion01.fs index 1d87f8ad077..957a3ec7189 100644 --- a/tests/fsharpqa/Source/Conformance/DeclarationElements/CustomAttributes/AttributeUsage/W_AssemblyVersion01.fs +++ b/tests/fsharpqa/Source/Conformance/DeclarationElements/CustomAttributes/AttributeUsage/W_AssemblyVersion01.fs @@ -1,5 +1,5 @@ // #Regression #Conformance #DeclarationElements #Attributes -//An AssemblyVersionAttribute specified version '1\.2\.3\.4\.5\.6', but this value is invalid and has been ignored +//The attribute System.Reflection.AssemblyVersionAttribute specified version '1\.2\.3\.4\.5\.6', but this value is invalid and has been ignored [] do diff --git a/tests/fsharpqa/Source/Conformance/DeclarationElements/CustomAttributes/AttributeUsage/W_AssemblyVersion02.fs b/tests/fsharpqa/Source/Conformance/DeclarationElements/CustomAttributes/AttributeUsage/W_AssemblyVersion02.fs index 2c2f26cf3ae..e44827056a4 100644 --- a/tests/fsharpqa/Source/Conformance/DeclarationElements/CustomAttributes/AttributeUsage/W_AssemblyVersion02.fs +++ b/tests/fsharpqa/Source/Conformance/DeclarationElements/CustomAttributes/AttributeUsage/W_AssemblyVersion02.fs @@ -1,5 +1,5 @@ // #Regression #Conformance #DeclarationElements #Attributes -//An AssemblyVersionAttribute specified version '1\.2\.\*\.4', but this value is invalid and has been ignored +//The attribute System.Reflection.AssemblyVersionAttribute specified version '1\.2\.\*\.4', but this value is invalid and has been ignored [] do diff --git a/tests/fsharpqa/Source/Conformance/DeclarationElements/CustomAttributes/AttributeUsage/X_AssemblyVersion01.fs b/tests/fsharpqa/Source/Conformance/DeclarationElements/CustomAttributes/AttributeUsage/X_AssemblyVersion01.fs index 5c4246a9a3c..fffa537e1b4 100644 --- a/tests/fsharpqa/Source/Conformance/DeclarationElements/CustomAttributes/AttributeUsage/X_AssemblyVersion01.fs +++ b/tests/fsharpqa/Source/Conformance/DeclarationElements/CustomAttributes/AttributeUsage/X_AssemblyVersion01.fs @@ -1,9 +1,7 @@ // #Regression #Conformance #DeclarationElements #Attributes -//An System.Reflection.AssemblyInformationalVersionAttribute specified version '6\.5\.4\.3\.2', but this value is invalid and has been ignored -//An System.Reflection.AssemblyFileVersionAttribute specified version '9\.8\.7\.6\.5', but this value is invalid and has been ignored +//The attribute System.Reflection.AssemblyFileVersionAttribute specified version '9\.8\.7\.6\.5', but this value is invalid and has been ignored [] -[] [] do () diff --git a/tests/fsharpqa/Source/Conformance/DeclarationElements/CustomAttributes/AttributeUsage/X_AssemblyVersion02.fs b/tests/fsharpqa/Source/Conformance/DeclarationElements/CustomAttributes/AttributeUsage/X_AssemblyVersion02.fs index cd37f7bdedb..3be7ab70bef 100644 --- a/tests/fsharpqa/Source/Conformance/DeclarationElements/CustomAttributes/AttributeUsage/X_AssemblyVersion02.fs +++ b/tests/fsharpqa/Source/Conformance/DeclarationElements/CustomAttributes/AttributeUsage/X_AssemblyVersion02.fs @@ -1,9 +1,7 @@ // #Regression #Conformance #DeclarationElements #Attributes -//An System.Reflection.AssemblyInformationalVersionAttribute specified version '6\.5\.\*\.3', but this value is invalid and has been ignored -//An System.Reflection.AssemblyFileVersionAttribute specified version '9\.8\.\*\.6', but this value is invalid and has been ignored +//The attribute System.Reflection.AssemblyFileVersionAttribute specified version '9\.8\.\*\.6', but this value is invalid and has been ignored [] -[] [] do () diff --git a/tests/fsharpqa/Source/Conformance/DeclarationElements/LetBindings/Basic/W_DoBindingsNotUnit01.fs b/tests/fsharpqa/Source/Conformance/DeclarationElements/LetBindings/Basic/W_DoBindingsNotUnit01.fs index e703b6ac2a4..f450d0ec592 100644 --- a/tests/fsharpqa/Source/Conformance/DeclarationElements/LetBindings/Basic/W_DoBindingsNotUnit01.fs +++ b/tests/fsharpqa/Source/Conformance/DeclarationElements/LetBindings/Basic/W_DoBindingsNotUnit01.fs @@ -2,7 +2,7 @@ #light // Verify warning when 'do-bindings' do not return unit. -//The result of this expression is implicitly ignored +//The result of this expression has type 'int' and is implicitly ignored let square x = x * x diff --git a/tests/fsharpqa/Source/Conformance/DeclarationElements/MemberDefinitions/OverloadingMembers/E_OverloadMismatch.fs b/tests/fsharpqa/Source/Conformance/DeclarationElements/MemberDefinitions/OverloadingMembers/E_OverloadMismatch.fs new file mode 100644 index 00000000000..6a110a839cc --- /dev/null +++ b/tests/fsharpqa/Source/Conformance/DeclarationElements/MemberDefinitions/OverloadingMembers/E_OverloadMismatch.fs @@ -0,0 +1,14 @@ +//No implementation was given for + +open System +open System.IO +type IFoo = + abstract member Foo : t:Type * r:TextReader -> obj + abstract member Foo<'t> : TextReader -> 't + + +type Foo() = + interface IFoo with + member x.Foo(t, reader) = obj() + +exit 1 diff --git a/tests/fsharpqa/Source/Conformance/DeclarationElements/MemberDefinitions/OverloadingMembers/env.lst b/tests/fsharpqa/Source/Conformance/DeclarationElements/MemberDefinitions/OverloadingMembers/env.lst index 7a3e95f230e..a7384556634 100644 --- a/tests/fsharpqa/Source/Conformance/DeclarationElements/MemberDefinitions/OverloadingMembers/env.lst +++ b/tests/fsharpqa/Source/Conformance/DeclarationElements/MemberDefinitions/OverloadingMembers/env.lst @@ -29,6 +29,7 @@ NOMONO,NoMT SOURCE=ConsumeOverloadGenericMethods.fs SCFLAGS="-r:lib.dll" PRECMD= SOURCE=SlowOverloadResolution.fs # SlowOverloadResolution.fs SOURCE=E_OverloadCurriedFunc.fs # E_OverloadCurriedFunc.fs + SOURCE=E_OverloadMismatch.fs # E_OverloadMismatch.fs SOURCE=NoWarningWhenOverloadingInSubClass01.fs SCFLAGS="--warnaserror" # NoWarningWhenOverloadingInSubClass01.fs SOURCE=E_UnsolvableConstraints01.fs SCFLAGS="--test:ErrorRanges" # E_UnsolvableConstraints01.fs diff --git a/tests/fsharpqa/Source/Conformance/Expressions/BindingExpressions/Binding/in01.fs b/tests/fsharpqa/Source/Conformance/Expressions/BindingExpressions/Binding/in01.fs index 1d1442dc8e2..7ff3e6a7bb0 100644 --- a/tests/fsharpqa/Source/Conformance/Expressions/BindingExpressions/Binding/in01.fs +++ b/tests/fsharpqa/Source/Conformance/Expressions/BindingExpressions/Binding/in01.fs @@ -5,7 +5,7 @@ // Eventually, we will deprecated them - and the specs will be updated. // //The value or constructor 'a' is not defined -//The result of this expression is implicitly ignored\. Consider using 'ignore' to discard this value explicitly, e\.g\. 'expr \|> ignore', or 'let' to bind the result to a name, e\.g\. 'let result = expr'.$ +//The result of this expression has type 'bool' and is implicitly ignored\. Consider using 'ignore' to discard this value explicitly, e\.g\. 'expr \|> ignore', or 'let' to bind the result to a name, e\.g\. 'let result = expr'.$ module A = let a = 3 in a + 1 |> ignore;; a > 4;; diff --git a/tests/fsharpqa/Source/Conformance/Expressions/BindingExpressions/Binding/in02.fs b/tests/fsharpqa/Source/Conformance/Expressions/BindingExpressions/Binding/in02.fs index 323ff21db25..088eba8f3f4 100644 --- a/tests/fsharpqa/Source/Conformance/Expressions/BindingExpressions/Binding/in02.fs +++ b/tests/fsharpqa/Source/Conformance/Expressions/BindingExpressions/Binding/in02.fs @@ -4,7 +4,7 @@ // I'm adding these cases to make sure we do not accidentally change the behavior from version to version // Eventually, we will deprecated them - and the specs will be updated. // -//The result of this expression is implicitly ignored\. Consider using 'ignore' to discard this value explicitly, e\.g\. 'expr \|> ignore', or 'let' to bind the result to a name, e\.g\. 'let result = expr'.$ +//The result of this expression has type 'bool' and is implicitly ignored\. Consider using 'ignore' to discard this value explicitly, e\.g\. 'expr \|> ignore', or 'let' to bind the result to a name, e\.g\. 'let result = expr'.$ // module B = diff --git a/tests/fsharpqa/Source/Conformance/Expressions/BindingExpressions/Binding/in03.fs b/tests/fsharpqa/Source/Conformance/Expressions/BindingExpressions/Binding/in03.fs index e0af19fb87c..e1bc60f8100 100644 --- a/tests/fsharpqa/Source/Conformance/Expressions/BindingExpressions/Binding/in03.fs +++ b/tests/fsharpqa/Source/Conformance/Expressions/BindingExpressions/Binding/in03.fs @@ -4,7 +4,7 @@ // I'm adding these cases to make sure we do not accidentally change the behavior from version to version // Eventually, we will deprecated them - and the specs will be updated. // -//The result of this expression is implicitly ignored\. Consider using 'ignore' to discard this value explicitly, e\.g\. 'expr \|> ignore', or 'let' to bind the result to a name, e\.g\. 'let result = expr'.$ +//The result of this expression has type 'bool' and is implicitly ignored\. Consider using 'ignore' to discard this value explicitly, e\.g\. 'expr \|> ignore', or 'let' to bind the result to a name, e\.g\. 'let result = expr'.$ // module C = let a = 3 diff --git a/tests/fsharpqa/Source/Conformance/Expressions/BindingExpressions/Binding/in04.fs b/tests/fsharpqa/Source/Conformance/Expressions/BindingExpressions/Binding/in04.fs index 46ffb9b98b5..1f4ddad6348 100644 --- a/tests/fsharpqa/Source/Conformance/Expressions/BindingExpressions/Binding/in04.fs +++ b/tests/fsharpqa/Source/Conformance/Expressions/BindingExpressions/Binding/in04.fs @@ -4,7 +4,7 @@ // I'm adding these cases to make sure we do not accidentally change the behavior from version to version // Eventually, we will deprecated them - and the specs will be updated. // -//The result of this expression is implicitly ignored\. Consider using 'ignore' to discard this value explicitly, e\.g\. 'expr \|> ignore', or 'let' to bind the result to a name, e\.g\. 'let result = expr'.$ +//The result of this expression has type 'bool' and is implicitly ignored\. Consider using 'ignore' to discard this value explicitly, e\.g\. 'expr \|> ignore', or 'let' to bind the result to a name, e\.g\. 'let result = expr'.$ // module D = diff --git a/tests/fsharpqa/Source/Conformance/Expressions/BindingExpressions/Binding/in05.fs b/tests/fsharpqa/Source/Conformance/Expressions/BindingExpressions/Binding/in05.fs index 87d95d8fd35..eaefd989c14 100644 --- a/tests/fsharpqa/Source/Conformance/Expressions/BindingExpressions/Binding/in05.fs +++ b/tests/fsharpqa/Source/Conformance/Expressions/BindingExpressions/Binding/in05.fs @@ -5,7 +5,7 @@ // Eventually, we will deprecated them - and the specs will be updated. //The type 'int' does not match the type 'unit'$ //Type mismatch\. Expecting a. ''a -> 'b' .but given a. ''a -> unit' .The type 'int' does not match the type 'unit'$ -//The result of this expression is implicitly ignored\. Consider using 'ignore' to discard this value explicitly, e\.g\. 'expr \|> ignore', or 'let' to bind the result to a name, e\.g\. 'let result = expr'.$ +//The result of this expression has type 'bool' and is implicitly ignored\. Consider using 'ignore' to discard this value explicitly, e\.g\. 'expr \|> ignore', or 'let' to bind the result to a name, e\.g\. 'let result = expr'.$ module E = let a = 3 in a + 1 |> ignore diff --git a/tests/fsharpqa/Source/Conformance/Expressions/ControlFlowExpressions/TryFinally/W-TryFinallyNotUnit.fs b/tests/fsharpqa/Source/Conformance/Expressions/ControlFlowExpressions/TryFinally/W-TryFinallyNotUnit.fs index bdb54bf3d7b..e78a19b0fae 100644 --- a/tests/fsharpqa/Source/Conformance/Expressions/ControlFlowExpressions/TryFinally/W-TryFinallyNotUnit.fs +++ b/tests/fsharpqa/Source/Conformance/Expressions/ControlFlowExpressions/TryFinally/W-TryFinallyNotUnit.fs @@ -2,7 +2,7 @@ #light // Verify warning if a finally block does not return 'unit' -//The result of this expression is implicitly ignored +//The result of this expression has type 'bool' and is implicitly ignored let x : int = try diff --git a/tests/fsharpqa/Source/Conformance/InferenceProcedures/ByrefSafetyAnalysis/E_SetFieldToByref04.fs b/tests/fsharpqa/Source/Conformance/InferenceProcedures/ByrefSafetyAnalysis/E_SetFieldToByref04.fs index af9e70f512b..f192ad47c26 100644 --- a/tests/fsharpqa/Source/Conformance/InferenceProcedures/ByrefSafetyAnalysis/E_SetFieldToByref04.fs +++ b/tests/fsharpqa/Source/Conformance/InferenceProcedures/ByrefSafetyAnalysis/E_SetFieldToByref04.fs @@ -2,7 +2,7 @@ // Verify appropriate error if attempting to assign a ByRef value to an // object field. (Disallowed by the CLR.) - +//A type instantiation involves a byref type\. This is not permitted by the rules of Common IL\.$ //The address of the variable 'x' cannot be used at this point$ //A type instantiation involves a byref type\. This is not permitted by the rules of Common IL\.$ let mutable mutableObjectField : obj = null diff --git a/tests/fsharpqa/Source/Conformance/InferenceProcedures/TypeInference/E_LeftToRightOverloadResolution01.fs b/tests/fsharpqa/Source/Conformance/InferenceProcedures/TypeInference/E_LeftToRightOverloadResolution01.fs index 9a89174ac7f..49f17817d17 100644 --- a/tests/fsharpqa/Source/Conformance/InferenceProcedures/TypeInference/E_LeftToRightOverloadResolution01.fs +++ b/tests/fsharpqa/Source/Conformance/InferenceProcedures/TypeInference/E_LeftToRightOverloadResolution01.fs @@ -1,6 +1,6 @@ // #Regression #TypeInference // Regression for FSHARP1.0:5749 -// Better error message for overload resolution to help ease pain assocaited with mismatch of intellisense information +// Better error message for overload resolution to help ease pain associated with mismatch of intellisense information let array = [| "Ted"; "Katie"; |] diff --git a/tests/fsharpqa/Source/Conformance/ObjectOrientedTypeDefinitions/ClassTypes/StaticLetDoDeclarations/E_LexicalScoping01.fs b/tests/fsharpqa/Source/Conformance/ObjectOrientedTypeDefinitions/ClassTypes/StaticLetDoDeclarations/E_LexicalScoping01.fs index c6f4b62c999..8105efe3e09 100644 --- a/tests/fsharpqa/Source/Conformance/ObjectOrientedTypeDefinitions/ClassTypes/StaticLetDoDeclarations/E_LexicalScoping01.fs +++ b/tests/fsharpqa/Source/Conformance/ObjectOrientedTypeDefinitions/ClassTypes/StaticLetDoDeclarations/E_LexicalScoping01.fs @@ -1,9 +1,8 @@ // #Regression #Conformance #ObjectOrientedTypes #Classes #LetBindings // Scoping: // identifier introduced by let is local -//The value, namespace, type or module 'm' is not defined -//The value, namespace, type or module 'n' is not defined -//Could not resolve the ambiguity inherent in the use of the operator '\( \+ \)' at or near this program point\. Consider using type annotations to resolve the ambiguity\.$ +//The value, namespace, type or module 'm' is not defined +//The value, namespace, type or module 'n' is not defined type C() = class static let mutable m = [1;2;3] diff --git a/tests/fsharpqa/Source/Conformance/ObjectOrientedTypeDefinitions/TypeExtensions/basic/GenericExtensions.fs b/tests/fsharpqa/Source/Conformance/ObjectOrientedTypeDefinitions/TypeExtensions/basic/GenericExtensions.fs index b11f3d396af..f58407e2753 100644 --- a/tests/fsharpqa/Source/Conformance/ObjectOrientedTypeDefinitions/TypeExtensions/basic/GenericExtensions.fs +++ b/tests/fsharpqa/Source/Conformance/ObjectOrientedTypeDefinitions/TypeExtensions/basic/GenericExtensions.fs @@ -47,13 +47,13 @@ module UseCSharpExtensionsMethodsWithVariableThisTy = let x3 : DateTime = dateTime1.ExtendGenericUnconstrainedOneArg(dateTime1) let x4 : (int -> int) = func1.ExtendGenericUnconstrainedOneArg(func1) let x5 : (int * int) = tup2.ExtendGenericUnconstrainedOneArg(tup2) - let x6 : int = tup3.Item1() - let x7 : int = tup4.Item1() - let x8 : int = tup5.Item1() - let x9 : int = tup6.Item1() - let x10 : int = tup7.Item1() - let x11 : int = tup8.Item1() - let x12 : int = tup9.Item1() + let x6 : int = tup3.GItem1() + let x7 : int = tup4.GItem1() + let x8 : int = tup5.GItem1() + let x9 : int = tup6.GItem1() + let x10 : int = tup7.GItem1() + let x11 : int = tup8.GItem1() + let x12 : int = tup9.GItem1() let y2 : int list = intList1.ExtendGenericConstrainedNoArg() let y3 : int list = intList1.ExtendGenericConstrainedOneArg(intList2) @@ -84,14 +84,14 @@ module UseFSharpDefinedILExtensionsMethods = type CSharpStyleExtensionMethodsInFSharp () = [] static member ExtendGenericUnconstrainedNoArg(s1: 'T) = s1 [] static member ExtendGenericUnconstrainedOneArg(s1: 'T, s2: 'T) = s1 - [] static member Item1((a,b)) = a - [] static member Item1((a,b,c)) = a - [] static member Item1((a,b,c,d)) = a - [] static member Item1((a,b,c,d,e)) = a - [] static member Item1((a,b,c,d,e,f)) = a - [] static member Item1((a,b,c,d,e,f,g)) = a - [] static member Item1((a,b,c,d,e,f,g,h)) = a - [] static member Item1((a,b,c,d,e,f,g,h,i)) = a + [] static member GItem1((a,b)) = a + [] static member GItem1((a,b,c)) = a + [] static member GItem1((a,b,c,d)) = a + [] static member GItem1((a,b,c,d,e)) = a + [] static member GItem1((a,b,c,d,e,f)) = a + [] static member GItem1((a,b,c,d,e,f,g)) = a + [] static member GItem1((a,b,c,d,e,f,g,h)) = a + [] static member GItem1((a,b,c,d,e,f,g,h,i)) = a [] static member ExtendGenericConstrainedNoArg(s1: 'T when 'T :> System.IComparable) = s1 [] static member ExtendGenericConstrainedOneArg(s1 : 'T, s2 : 'T when 'T :> System.IComparable) = s1 [] static member ExtendGenericConstrainedTightNoArg(s1 : 'T when 'T :> System.IComparable) = s1 @@ -125,13 +125,13 @@ module UseFSharpDefinedILExtensionsMethods = let w2 = s1.ExtendGenericUnconstrainedNoArg() let w3 = ob.ExtendGenericUnconstrainedOneArg(ob) let w4 = s1.ExtendGenericUnconstrainedOneArg(s1) - let w5 = tup2.Item1() - let w6 = tup3.Item1() - let w7 = tup4.Item1() - let w8 = tup5.Item1() - let w9 = tup6.Item1() - let w10 = tup7.Item1() - let w11 = tup8.Item1() + let w5 = tup2.GItem1() + let w6 = tup3.GItem1() + let w7 = tup4.GItem1() + let w8 = tup5.GItem1() + let w9 = tup6.GItem1() + let w10 = tup7.GItem1() + let w11 = tup8.GItem1() let base0 = gclist1.ExtendCollListIgnore(3) let base0b = gclist1.ExtendCollListIgnore(3) @@ -153,13 +153,13 @@ module UseFSharpDefinedILExtensionsMethods = let x3 : DateTime = dateTime1.ExtendGenericUnconstrainedOneArg(dateTime1) let x4 : (int -> int) = func1.ExtendGenericUnconstrainedOneArg(func1) let x5 : (int * int) = tup2.ExtendGenericUnconstrainedOneArg(tup2) - let x6 : int = tup3.Item1() - let x7 : int = tup4.Item1() - let x8 : int = tup5.Item1() - let x9 : int = tup6.Item1() - let x10 : int = tup7.Item1() - let x11 : int = tup8.Item1() - let x12 : int = tup9.Item1() + let x6 : int = tup3.GItem1() + let x7 : int = tup4.GItem1() + let x8 : int = tup5.GItem1() + let x9 : int = tup6.GItem1() + let x10 : int = tup7.GItem1() + let x11 : int = tup8.GItem1() + let x12 : int = tup9.GItem1() let y2 : int list = intList1.ExtendGenericConstrainedNoArg() let y3 : int list = intList1.ExtendGenericConstrainedOneArg(intList2) diff --git a/tests/fsharpqa/Source/Conformance/ObjectOrientedTypeDefinitions/TypeExtensions/basic/GenericExtensionsCSLib.cs b/tests/fsharpqa/Source/Conformance/ObjectOrientedTypeDefinitions/TypeExtensions/basic/GenericExtensionsCSLib.cs index e1787c9ac6f..9d36041ba77 100644 --- a/tests/fsharpqa/Source/Conformance/ObjectOrientedTypeDefinitions/TypeExtensions/basic/GenericExtensionsCSLib.cs +++ b/tests/fsharpqa/Source/Conformance/ObjectOrientedTypeDefinitions/TypeExtensions/basic/GenericExtensionsCSLib.cs @@ -36,14 +36,14 @@ static public class C static public T1 ExtendTupleItem1(this Tuple s1) { return s1.Item1; } static public T2 ExtendTupleItem2(this Tuple s1) { return s1.Item2; } - static public T1 Item1(this Tuple s1) { return s1.Item1; } - static public T1 Item1(this Tuple s1) { return s1.Item1; } - static public T1 Item1(this Tuple s1) { return s1.Item1; } - static public T1 Item1(this Tuple s1) { return s1.Item1; } - static public T1 Item1(this Tuple s1) { return s1.Item1; } - static public T1 Item1(this Tuple s1) { return s1.Item1; } - static public T1 Item1(this Tuple> s1) { return s1.Item1; } - static public T1 Item1(this Tuple> s1) { return s1.Item1; } + static public T1 GItem1(this Tuple s1) { return s1.Item1; } + static public T1 GItem1(this Tuple s1) { return s1.Item1; } + static public T1 GItem1(this Tuple s1) { return s1.Item1; } + static public T1 GItem1(this Tuple s1) { return s1.Item1; } + static public T1 GItem1(this Tuple s1) { return s1.Item1; } + static public T1 GItem1(this Tuple s1) { return s1.Item1; } + static public T1 GItem1(this Tuple> s1) { return s1.Item1; } + static public T1 GItem1(this Tuple> s1) { return s1.Item1; } /* methods that add extra type parameters not captured by the 'this' argument */ static public U ExtendGenericIgnore(this T s1, U s2) { return s2; } diff --git a/tests/fsharpqa/Source/Conformance/PatternMatching/Expression/W_CounterExampleWithEnum02.fs b/tests/fsharpqa/Source/Conformance/PatternMatching/Expression/W_CounterExampleWithEnum02.fs index 0fcb3e090de..f93dab37adb 100644 --- a/tests/fsharpqa/Source/Conformance/PatternMatching/Expression/W_CounterExampleWithEnum02.fs +++ b/tests/fsharpqa/Source/Conformance/PatternMatching/Expression/W_CounterExampleWithEnum02.fs @@ -1,11 +1,11 @@ // #Regression #Conformance #PatternMatching // Regression test for DevDiv:198999 ("Warning messages for incomplete matches involving enum types are wrong") -//Incomplete pattern matches on this expression\. For example, the value 'enum \(2\)' may indicate a case not covered by the pattern\(s\)\.$ -//Incomplete pattern matches on this expression\. For example, the value 'enum \(1\)' may indicate a case not covered by the pattern\(s\)\.$ -//Incomplete pattern matches on this expression\. For example, the value 'enum \(1\)' may indicate a case not covered by the pattern\(s\)\.$ -//Incomplete pattern matches on this expression\. For example, the value 'enum \(1\)' may indicate a case not covered by the pattern\(s\)\.$ -//Incomplete pattern matches on this expression\. For example, the value 'enum \(1\)' may indicate a case not covered by the pattern\(s\)\.$ -//Incomplete pattern matches on this expression\. For example, the value 'enum \(1\)' may indicate a case not covered by the pattern\(s\)\.$ +//Enums may take values outside known cases\. For example, the value 'enum \(2\)' may indicate a case not covered by the pattern\(s\)\.$ +//Incomplete pattern matches on this expression\. For example, the value 'T.Y' may indicate a case not covered by the pattern\(s\)\.$ +//Incomplete pattern matches on this expression\. For example, the value 'T.Y' may indicate a case not covered by the pattern\(s\)\.$ +//Incomplete pattern matches on this expression\. For example, the value 'T.Y' may indicate a case not covered by the pattern\(s\)\.$ +//Incomplete pattern matches on this expression\. For example, the value 'T.Y' may indicate a case not covered by the pattern\(s\)\.$ +//Incomplete pattern matches on this expression\. For example, the value 'T.Y' may indicate a case not covered by the pattern\(s\)\.$ module M diff --git a/tests/fsharpqa/Source/Conformance/PatternMatching/Named/E_ActivePatternHasNoFields.fs b/tests/fsharpqa/Source/Conformance/PatternMatching/Named/E_ActivePatternHasNoFields.fs new file mode 100644 index 00000000000..09cf78bec16 --- /dev/null +++ b/tests/fsharpqa/Source/Conformance/PatternMatching/Named/E_ActivePatternHasNoFields.fs @@ -0,0 +1,13 @@ +// #Regression #Conformance #PatternMatching #ActivePatterns +// Regression test for https://github.com/Microsoft/visualfsharp/issues/5745 +//Active patterns do not have fields. This syntax is invalid\. +open System.Text.RegularExpressions + +let (|USZipPlus4Code|_|) s = + let m = Regex.Match(s, @"^(\d{5})\-(\d{4})$") + if m.Success then + USZipPlus4Code(x=m.Groups.[1].Value, + y=m.Groups.[2].Value) + |> Some + else + None diff --git a/tests/fsharpqa/Source/Conformance/PatternMatching/Named/E_ActivePatternUnconstrained01.fs b/tests/fsharpqa/Source/Conformance/PatternMatching/Named/E_ActivePatternUnconstrained01.fs index b930cbaba00..86e8689d061 100644 --- a/tests/fsharpqa/Source/Conformance/PatternMatching/Named/E_ActivePatternUnconstrained01.fs +++ b/tests/fsharpqa/Source/Conformance/PatternMatching/Named/E_ActivePatternUnconstrained01.fs @@ -2,7 +2,7 @@ // Regression test for FSHARP1.0:5590 // This code used to compile, but fail peverification // Now, it just does not compile anymore telling the user to annotated it a bit. -//The result of this expression is implicitly ignored\. Consider using 'ignore' to discard this value explicitly, e\.g\. 'expr \|> ignore', or 'let' to bind the result to a name, e\.g\. 'let result = expr'.$ +//The result of this expression has type 'int' and is implicitly ignored\. Consider using 'ignore' to discard this value explicitly, e\.g\. 'expr \|> ignore', or 'let' to bind the result to a name, e\.g\. 'let result = expr'.$ //Active pattern '\|A1\|A2\|A3\|' 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 = A x'$ let (|A1|A2|A3|) (inp:int) : Choice = printfn "hello" diff --git a/tests/fsharpqa/Source/Conformance/PatternMatching/Named/env.lst b/tests/fsharpqa/Source/Conformance/PatternMatching/Named/env.lst index f71447b925f..63f5a897cb7 100644 --- a/tests/fsharpqa/Source/Conformance/PatternMatching/Named/env.lst +++ b/tests/fsharpqa/Source/Conformance/PatternMatching/Named/env.lst @@ -26,6 +26,7 @@ SOURCE=E_ActivePatterns01.fs # E_ActivePatterns01.fs SOURCE=E_ActivePatterns02.fs # E_ActivePatterns02.fs + SOURCE=E_ActivePatternHasNoFields.fs # E_ActivePatternHasNoFields.fs SOURCE=E_ParameterRestrictions01.fs # E_ParameterRestrictions01.fs SOURCE=MultiActivePatterns01.fs # MultiActivePatterns01.fs diff --git a/tests/fsharpqa/Source/Conformance/PatternMatching/Simple/E_namedLiberal01.fs b/tests/fsharpqa/Source/Conformance/PatternMatching/Simple/E_namedLiberal01.fs index d306ece633b..2f3ba740856 100644 --- a/tests/fsharpqa/Source/Conformance/PatternMatching/Simple/E_namedLiberal01.fs +++ b/tests/fsharpqa/Source/Conformance/PatternMatching/Simple/E_namedLiberal01.fs @@ -1,8 +1,7 @@ // #Regression #Conformance #PatternMatching -// Match warning when using enum for incomplete match. -// (Even if you use every possible value. +// Match warning when covering all defined values of an enum -//Incomplete pattern matches on this expression +//Enums may take values outside known cases. open System diff --git a/tests/fsharpqa/Source/Conformance/StructFieldEqualityComparison/comparebsl.cmd b/tests/fsharpqa/Source/Conformance/StructFieldEqualityComparison/comparebsl.cmd new file mode 100644 index 00000000000..b2b96bdc187 --- /dev/null +++ b/tests/fsharpqa/Source/Conformance/StructFieldEqualityComparison/comparebsl.cmd @@ -0,0 +1,8 @@ +REM == %1 --> assembly + +%1 > %1.out + +echo ..\..\..\testenv\bin\ILComparer.exe "%1.bsl" "%1.out" +..\..\..\testenv\bin\ILComparer.exe "%1.bsl" "%1.out" +exit /b %ERRORLEVEL% + diff --git a/tests/fsharpqa/Source/Conformance/StructFieldEqualityComparison/env.lst b/tests/fsharpqa/Source/Conformance/StructFieldEqualityComparison/env.lst new file mode 100644 index 00000000000..3be25082cca --- /dev/null +++ b/tests/fsharpqa/Source/Conformance/StructFieldEqualityComparison/env.lst @@ -0,0 +1 @@ + SOURCE=floatsanddoubles.fs SCFLAGS="-g --out:floatsanddoubles.exe" COMPILE_ONLY=1 POSTCMD="comparebsl.cmd floatsanddoubles.exe" # floatsanddoubles.fs diff --git a/tests/fsharpqa/Source/Conformance/StructFieldEqualityComparison/floatsanddoubles.exe.bsl b/tests/fsharpqa/Source/Conformance/StructFieldEqualityComparison/floatsanddoubles.exe.bsl new file mode 100644 index 00000000000..d8a704c0362 --- /dev/null +++ b/tests/fsharpqa/Source/Conformance/StructFieldEqualityComparison/floatsanddoubles.exe.bsl @@ -0,0 +1,112 @@ +Doubles: Epsilon = Epsilon is: true Values 0.000000 = 0.000000 +Doubles: Epsilon = MinValue is: false Values 0.000000 = -179769313486232000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.000000 +Doubles: Epsilon = MaxValue is: false Values 0.000000 = 179769313486232000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.000000 +Doubles: Epsilon = NegativeInfinity is: false Values 0.000000 = -Infinity +Doubles: Epsilon = PositiveInfinity is: false Values 0.000000 = Infinity +Doubles: Epsilon = NaN is: false Values 0.000000 = NaN +Doubles: Epsilon = Number is: false Values 0.000000 = 7.000000 + +Doubles: MinValue = Epsilon is: false Values -179769313486232000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.000000 = 0.000000 +Doubles: MinValue = MinValue is: true Values -179769313486232000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.000000 = -179769313486232000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.000000 +Doubles: MinValue = MaxValue is: false Values -179769313486232000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.000000 = 179769313486232000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.000000 +Doubles: MinValue = NegativeInfinity is: false Values -179769313486232000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.000000 = -Infinity +Doubles: MinValue = PositiveInfinity is: false Values -179769313486232000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.000000 = Infinity +Doubles: MinValue = NaN is: false Values -179769313486232000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.000000 = NaN +Doubles: MinValue = Number is: false Values -179769313486232000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.000000 = 7.000000 + +Doubles: MaxValue = Epsilon is: false Values 179769313486232000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.000000 = 0.000000 +Doubles: MaxValue = MinValue is: false Values 179769313486232000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.000000 = -179769313486232000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.000000 +Doubles: MaxValue = MaxValue is: true Values 179769313486232000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.000000 = 179769313486232000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.000000 +Doubles: MaxValue = NegativeInfinity is: false Values 179769313486232000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.000000 = -Infinity +Doubles: MaxValue = PositiveInfinity is: false Values 179769313486232000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.000000 = Infinity +Doubles: MaxValue = NaN is: false Values 179769313486232000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.000000 = NaN +Doubles: MaxValue = Number is: false Values 179769313486232000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.000000 = 7.000000 + +Doubles: NegativeInfinity = Epsilon is: false Values -Infinity = 0.000000 +Doubles: NegativeInfinity = MinValue is: false Values -Infinity = -179769313486232000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.000000 +Doubles: NegativeInfinity = MaxValue is: false Values -Infinity = 179769313486232000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.000000 +Doubles: NegativeInfinity = NegativeInfinity is: true Values -Infinity = -Infinity +Doubles: NegativeInfinity = PositiveInfinity is: false Values -Infinity = Infinity +Doubles: NegativeInfinity = NaN is: false Values -Infinity = NaN +Doubles: NegativeInfinity = Number is: false Values -Infinity = 7.000000 + +Doubles: PositiveInfinity = Epsilon is: false Values Infinity = 0.000000 +Doubles: PositiveInfinity = MinValue is: false Values Infinity = -179769313486232000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.000000 +Doubles: PositiveInfinity = MaxValue is: false Values Infinity = 179769313486232000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.000000 +Doubles: PositiveInfinity = NegativeInfinity is: false Values Infinity = -Infinity +Doubles: PositiveInfinity = PositiveInfinity is: true Values Infinity = Infinity +Doubles: PositiveInfinity = NaN is: false Values Infinity = NaN +Doubles: PositiveInfinity = Number is: false Values Infinity = 7.000000 + +Doubles: NaN = Epsilon is: false Values NaN = 0.000000 +Doubles: NaN = MinValue is: false Values NaN = -179769313486232000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.000000 +Doubles: NaN = MaxValue is: false Values NaN = 179769313486232000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.000000 +Doubles: NaN = NegativeInfinity is: false Values NaN = -Infinity +Doubles: NaN = PositiveInfinity is: false Values NaN = Infinity +Doubles: NaN = NaN is: true Values NaN = NaN +Doubles: NaN = Number is: false Values NaN = 7.000000 + +Doubles: Number = Epsilon is: false Values 7.000000 = 0.000000 +Doubles: Number = MinValue is: false Values 7.000000 = -179769313486232000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.000000 +Doubles: Number = MaxValue is: false Values 7.000000 = 179769313486232000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.000000 +Doubles: Number = NegativeInfinity is: false Values 7.000000 = -Infinity +Doubles: Number = PositiveInfinity is: false Values 7.000000 = Infinity +Doubles: Number = NaN is: false Values 7.000000 = NaN +Doubles: Number = Number is: true Values 7.000000 = 7.000000 + +Floats: Epsilon = Epsilon is: true Values 0.000000 = 0.000000 +Floats: Epsilon = MinValue is: false Values 0.000000 = -179769313486232000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.000000 +Floats: Epsilon = MaxValue is: false Values 0.000000 = 179769313486232000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.000000 +Floats: Epsilon = NegativeInfinity is: false Values 0.000000 = -Infinity +Floats: Epsilon = PositiveInfinity is: false Values 0.000000 = Infinity +Floats: Epsilon = NaN is: false Values 0.000000 = NaN +Floats: Epsilon = Number is: false Values 0.000000 = 7.000000 + +Floats: MinValue = Epsilon is: false Values -179769313486232000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.000000 = 0.000000 +Floats: MinValue = MinValue is: true Values -179769313486232000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.000000 = -179769313486232000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.000000 +Floats: MinValue = MaxValue is: false Values -179769313486232000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.000000 = 179769313486232000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.000000 +Floats: MinValue = NegativeInfinity is: false Values -179769313486232000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.000000 = -Infinity +Floats: MinValue = PositiveInfinity is: false Values -179769313486232000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.000000 = Infinity +Floats: MinValue = NaN is: false Values -179769313486232000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.000000 = NaN +Floats: MinValue = Number is: false Values -179769313486232000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.000000 = 7.000000 + +Floats: MaxValue = Epsilon is: false Values 179769313486232000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.000000 = 0.000000 +Floats: MaxValue = MinValue is: false Values 179769313486232000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.000000 = -179769313486232000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.000000 +Floats: MaxValue = MaxValue is: true Values 179769313486232000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.000000 = 179769313486232000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.000000 +Floats: MaxValue = NegativeInfinity is: false Values 179769313486232000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.000000 = -Infinity +Floats: MaxValue = PositiveInfinity is: false Values 179769313486232000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.000000 = Infinity +Floats: MaxValue = NaN is: false Values 179769313486232000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.000000 = NaN +Floats: MaxValue = Number is: false Values 179769313486232000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.000000 = 7.000000 + +Floats: NegativeInfinity = Epsilon is: false Values -Infinity = 0.000000 +Floats: NegativeInfinity = MinValue is: false Values -Infinity = -179769313486232000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.000000 +Floats: NegativeInfinity = MaxValue is: false Values -Infinity = 179769313486232000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.000000 +Floats: NegativeInfinity = NegativeInfinity is: true Values -Infinity = -Infinity +Floats: NegativeInfinity = PositiveInfinity is: false Values -Infinity = Infinity +Floats: NegativeInfinity = NaN is: false Values -Infinity = NaN +Floats: NegativeInfinity = Number is: false Values -Infinity = 7.000000 + +Floats: PositiveInfinity = Epsilon is: false Values Infinity = 0.000000 +Floats: PositiveInfinity = MinValue is: false Values Infinity = -179769313486232000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.000000 +Floats: PositiveInfinity = MaxValue is: false Values Infinity = 179769313486232000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.000000 +Floats: PositiveInfinity = NegativeInfinity is: false Values Infinity = -Infinity +Floats: PositiveInfinity = PositiveInfinity is: true Values Infinity = Infinity +Floats: PositiveInfinity = NaN is: false Values Infinity = NaN +Floats: PositiveInfinity = Number is: false Values Infinity = 7.000000 + +Floats: NaN = Epsilon is: false Values NaN = 0.000000 +Floats: NaN = MinValue is: false Values NaN = -179769313486232000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.000000 +Floats: NaN = MaxValue is: false Values NaN = 179769313486232000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.000000 +Floats: NaN = NegativeInfinity is: false Values NaN = -Infinity +Floats: NaN = PositiveInfinity is: false Values NaN = Infinity +Floats: NaN = NaN is: true Values NaN = NaN +Floats: NaN = Number is: false Values NaN = 7.000000 + +Floats: Number = Epsilon is: false Values 7.000000 = 0.000000 +Floats: Number = MinValue is: false Values 7.000000 = -179769313486232000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.000000 +Floats: Number = MaxValue is: false Values 7.000000 = 179769313486232000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.000000 +Floats: Number = NegativeInfinity is: false Values 7.000000 = -Infinity +Floats: Number = PositiveInfinity is: false Values 7.000000 = Infinity +Floats: Number = NaN is: false Values 7.000000 = NaN +Floats: Number = Number is: true Values 7.000000 = 7.000000 + diff --git a/tests/fsharpqa/Source/Conformance/StructFieldEqualityComparison/floatsanddoubles.fs b/tests/fsharpqa/Source/Conformance/StructFieldEqualityComparison/floatsanddoubles.fs new file mode 100644 index 00000000000..b0679dbba6f --- /dev/null +++ b/tests/fsharpqa/Source/Conformance/StructFieldEqualityComparison/floatsanddoubles.fs @@ -0,0 +1,39 @@ +// =========================================================================================================================== +// Test case for GenericEqualityERFast with floats/doubles +// Ensures that matrix of values evaluate to the same values as the shipping compiler +// =========================================================================================================================== +module floatsanddoubles + +open System +open System + +type Float = + struct + val F : float + new (f:float) = { F = f } + end + +type Double = + struct + val D : double + new (d:double) = { D = d } + end + +let floats = [| Float(Double.Epsilon); Float(Double.MinValue); Float(Double.MaxValue);Float(Double.NegativeInfinity);Float(Double.PositiveInfinity);Float(Double.NaN); Float(7.0)|] +let doubles = [| Double(Double.Epsilon); Double(Double.MinValue); Double(Double.MaxValue);Double(Double.NegativeInfinity);Double(Double.PositiveInfinity);Double(Double.NaN); Double(7.0)|] +let names = [| "Epsilon"; "MinValue"; "MaxValue";"NegativeInfinity";"PositiveInfinity";"NaN";"Number" |] + +[] +let main argv = + + for i in 0 .. doubles.Length - 1 do + for j in 0 .. doubles.Length - 1 do + printfn "Doubles: %-17s = %-17s is: %-5b Values %f = %f" (names.[i]) (names.[j]) (doubles.[i].Equals(doubles.[j])) (doubles.[i].D) (doubles.[j].D) + printfn "" + + for i in 0 .. floats.Length - 1 do + for j in 0 .. floats.Length - 1 do + printfn "Floats: %-17s = %-17s is: %-5b Values %f = %f" (names.[i]) (names.[j]) (floats.[i].Equals(floats.[j])) (floats.[i].F) (floats.[j].F) + printfn "" + + 0 // return an integer exit code diff --git a/tests/fsharpqa/Source/Conformance/TypesAndTypeConstraints/CheckingSyntacticTypes/E_MemberConstraint01.fs b/tests/fsharpqa/Source/Conformance/TypesAndTypeConstraints/CheckingSyntacticTypes/E_MemberConstraint01.fs index 70e8ea65a97..113d7dbe1b7 100644 --- a/tests/fsharpqa/Source/Conformance/TypesAndTypeConstraints/CheckingSyntacticTypes/E_MemberConstraint01.fs +++ b/tests/fsharpqa/Source/Conformance/TypesAndTypeConstraints/CheckingSyntacticTypes/E_MemberConstraint01.fs @@ -1,6 +1,5 @@ // #Conformance #TypeConstraints -//Could not resolve the ambiguity inherent in the use of the operator 'someFunc' at or near this program point\. Consider using type annotations to resolve the ambiguity\.$ -//Type constraint mismatch when applying the default type 'obj' for a type inference variable\. The type 'obj' does not support the operator 'someFunc' Consider adding further type constraints$ +//Type constraint mismatch when applying the default type 'obj' for a type inference variable\. The type 'obj' does not support the operator 'someFunc' Consider adding further type constraints$ let testFunc (a : ^x) = (^x : (static member someFunc : unit -> ^x) ()) diff --git a/tests/fsharpqa/Source/Diagnostics/General/E_AreYouMissingAnArgumentToAFunction01.fs b/tests/fsharpqa/Source/Diagnostics/General/E_AreYouMissingAnArgumentToAFunction01.fs index 4a8ec32f1cf..408fc712932 100644 --- a/tests/fsharpqa/Source/Diagnostics/General/E_AreYouMissingAnArgumentToAFunction01.fs +++ b/tests/fsharpqa/Source/Diagnostics/General/E_AreYouMissingAnArgumentToAFunction01.fs @@ -1,7 +1,8 @@ // #Regression #Diagnostics // Regression test for FSHARP1.0:2804 // Make sure we don't emit ?. (notice that the error message changed a bit since the bug was opened) -//Expecting a type supporting the operator 'op_Explicit' but given a function type\. You may be missing an argument to a function\.$ +//This expression was expected to have type +//This expression was expected to have type let f (x : int list) = int32 (x>>32) diff --git a/tests/fsharpqa/Source/Diagnostics/General/W_Multiline02.fs b/tests/fsharpqa/Source/Diagnostics/General/W_Multiline02.fs index b68027a1693..9905cd93d87 100644 --- a/tests/fsharpqa/Source/Diagnostics/General/W_Multiline02.fs +++ b/tests/fsharpqa/Source/Diagnostics/General/W_Multiline02.fs @@ -1,7 +1,7 @@ // #Regression #Diagnostics // Regression test for FSHARP1.0:3596 // Make sure that error spans correctly across multiple lines -//The result of this expression is implicitly ignored +//The result of this expression has type 'int' and is implicitly ignored #nowarn "988" let f g x = g x diff --git a/tests/fsharpqa/Source/Diagnostics/NONTERM/quoteExpr01.fs b/tests/fsharpqa/Source/Diagnostics/NONTERM/quoteExpr01.fs index f6f6443df63..42e04f7fa44 100644 --- a/tests/fsharpqa/Source/Diagnostics/NONTERM/quoteExpr01.fs +++ b/tests/fsharpqa/Source/Diagnostics/NONTERM/quoteExpr01.fs @@ -1,5 +1,5 @@ // #Regression #Diagnostics // Regression test for FSHARP1.0:2391, FSHARP1.0:1479 -//The result of this expression is implicitly ignored +//The result of this expression has type 'seq' and is implicitly ignored #light "off" <@@ 1 @@>.GetFreeVars() diff --git a/tests/fsharpqa/Source/Diagnostics/async/MissingIgnore.fs b/tests/fsharpqa/Source/Diagnostics/async/MissingIgnore.fs index 3fe0919320d..85381cea43e 100644 --- a/tests/fsharpqa/Source/Diagnostics/async/MissingIgnore.fs +++ b/tests/fsharpqa/Source/Diagnostics/async/MissingIgnore.fs @@ -1,5 +1,5 @@ // #Regression #Diagnostics #Async // Regression tests for FSHARP1.0:4394 -//The result of this expression is implicitly ignored\. Consider using 'ignore' to discard this value explicitly, e\.g\. 'expr \|> ignore', or 'let' to bind the result to a name, e\.g\. 'let result = expr'.$ +//The result of this expression has type 'int' and is implicitly ignored\. Consider using 'ignore' to discard this value explicitly, e\.g\. 'expr \|> ignore', or 'let' to bind the result to a name, e\.g\. 'let result = expr'.$ async { 1; return 2 } |> ignore diff --git a/tests/fsharpqa/Source/Diagnostics/async/MissingReturnBangForLoop01.fs b/tests/fsharpqa/Source/Diagnostics/async/MissingReturnBangForLoop01.fs index 4dd57691e8d..22ebb43bd2a 100644 --- a/tests/fsharpqa/Source/Diagnostics/async/MissingReturnBangForLoop01.fs +++ b/tests/fsharpqa/Source/Diagnostics/async/MissingReturnBangForLoop01.fs @@ -1,5 +1,5 @@ // #Regression #Diagnostics #Async // Regression tests for FSHARP1.0:4394 // common mistake: forgetting the return! For a loop -//The result of this expression is implicitly ignored\. Consider using 'ignore' to discard this value explicitly, e\.g\. 'expr \|> ignore', or 'let' to bind the result to a name, e\.g\. 'let result = expr'.$ +//The result of this expression has type 'Async<'a>' and is implicitly ignored\. Consider using 'ignore' to discard this value explicitly, e\.g\. 'expr \|> ignore', or 'let' to bind the result to a name, e\.g\. 'let result = expr'.$ let rec loop() = async { let x = 1 in loop() } diff --git a/tests/fsharpqa/Source/Diagnostics/async/MissingReturnBangForLoop02.fs b/tests/fsharpqa/Source/Diagnostics/async/MissingReturnBangForLoop02.fs index a9bb89c9dac..a7c5b2b1468 100644 --- a/tests/fsharpqa/Source/Diagnostics/async/MissingReturnBangForLoop02.fs +++ b/tests/fsharpqa/Source/Diagnostics/async/MissingReturnBangForLoop02.fs @@ -1,5 +1,5 @@ // #Regression #Diagnostics #Async // Regression tests for FSHARP1.0:4394 // common mistake: forgetting the return! For a loop -//The result of this expression is implicitly ignored\. Consider using 'ignore' to discard this value explicitly, e\.g\. 'expr \|> ignore', or 'let' to bind the result to a name, e\.g\. 'let result = expr'.$ +//The result of this expression has type 'Async<'a>' and is implicitly ignored\. Consider using 'ignore' to discard this value explicitly, e\.g\. 'expr \|> ignore', or 'let' to bind the result to a name, e\.g\. 'let result = expr'.$ let rec loop() = async { loop() } diff --git a/tests/fsharpqa/Source/Diagnostics/async/MissingReturnBangForLoop03.fs b/tests/fsharpqa/Source/Diagnostics/async/MissingReturnBangForLoop03.fs index dfba108aac0..277028e9bbf 100644 --- a/tests/fsharpqa/Source/Diagnostics/async/MissingReturnBangForLoop03.fs +++ b/tests/fsharpqa/Source/Diagnostics/async/MissingReturnBangForLoop03.fs @@ -1,6 +1,6 @@ // #Regression #Diagnostics #Async // Regression tests for FSHARP1.0:4394 // common mistake: forgetting the return! For a loop -//The result of this expression is implicitly ignored\. Consider using 'ignore' to discard this value explicitly, e\.g\. 'expr \|> ignore', or 'let' to bind the result to a name, e\.g\. 'let result = expr'.$ +//The result of this expression has type 'Async<'a>' and is implicitly ignored\. Consider using 'ignore' to discard this value explicitly, e\.g\. 'expr \|> ignore', or 'let' to bind the result to a name, e\.g\. 'let result = expr'.$ //This expression was expected to have type. 'Async<'a>' .but here has type. 'unit' let rec loop2() = async.Delay(fun () -> loop2(); ()); diff --git a/tests/fsharpqa/Source/Diagnostics/async/MissingReturnBangForLoop04.fs b/tests/fsharpqa/Source/Diagnostics/async/MissingReturnBangForLoop04.fs index b86efb67132..761020c2ec1 100644 --- a/tests/fsharpqa/Source/Diagnostics/async/MissingReturnBangForLoop04.fs +++ b/tests/fsharpqa/Source/Diagnostics/async/MissingReturnBangForLoop04.fs @@ -1,7 +1,7 @@ // #Regression #Diagnostics #Async // Regression tests for FSHARP1.0:4394 // common mistake: forgetting the return! For a loop -//The result of this expression is implicitly ignored\. Consider using 'ignore' to discard this value explicitly, e\.g\. 'expr \|> ignore', or 'let' to bind the result to a name, e\.g\. 'let result = expr'.$ +//The result of this expression has type 'Async<'a>' and is implicitly ignored\. Consider using 'ignore' to discard this value explicitly, e\.g\. 'expr \|> ignore', or 'let' to bind the result to a name, e\.g\. 'let result = expr'.$ //This expression was expected to have type. 'Async<'a>' .but here has type. 'unit' // Note: interestingly, this looks much better if a method call is not used let delay x = async.Delay x diff --git a/tests/fsharpqa/Source/Diagnostics/async/ReturnBangNonAsync_IfThenElse.fs b/tests/fsharpqa/Source/Diagnostics/async/ReturnBangNonAsync_IfThenElse.fs index 51be95c9403..74f2176d4cf 100644 --- a/tests/fsharpqa/Source/Diagnostics/async/ReturnBangNonAsync_IfThenElse.fs +++ b/tests/fsharpqa/Source/Diagnostics/async/ReturnBangNonAsync_IfThenElse.fs @@ -1,6 +1,6 @@ // #Regression #Diagnostics #Async // Regression tests for FSHARP1.0:4394 -//This expression was expected to have type +//All branches of an 'if' expression must return values of the same type as the first branch async { if true then return () else diff --git a/tests/fsharpqa/Source/ErrorMessages/NameResolution/E_GlobalQualifierAfterDot.fs b/tests/fsharpqa/Source/ErrorMessages/NameResolution/E_GlobalQualifierAfterDot.fs new file mode 100644 index 00000000000..b369ffad37f --- /dev/null +++ b/tests/fsharpqa/Source/ErrorMessages/NameResolution/E_GlobalQualifierAfterDot.fs @@ -0,0 +1,6 @@ +// #ErrorMessages #NameResolution +//'global' may only be used as the first name in a qualified path + +let x = global.System.String.Empty.global.System.String.Empty + +exit 0 diff --git a/tests/fsharpqa/Source/ErrorMessages/NameResolution/env.lst b/tests/fsharpqa/Source/ErrorMessages/NameResolution/env.lst index 435fb96c42b..42209ddd28e 100644 --- a/tests/fsharpqa/Source/ErrorMessages/NameResolution/env.lst +++ b/tests/fsharpqa/Source/ErrorMessages/NameResolution/env.lst @@ -1,2 +1,3 @@ SOURCE=E_RecordFieldProposal.fs # E_RecordFieldProposal + SOURCE=E_GlobalQualifierAfterDot.fs # E_GlobalQualifierAfterDot SOURCE=E_FieldNotInRecord.fs # E_FieldNotInRecord \ No newline at end of file diff --git a/tests/fsharpqa/Source/Import/AccessibilityTests.cs b/tests/fsharpqa/Source/Import/AccessibilityTests.cs index e3df6a9fb70..1a8ac727bce 100644 --- a/tests/fsharpqa/Source/Import/AccessibilityTests.cs +++ b/tests/fsharpqa/Source/Import/AccessibilityTests.cs @@ -10,9 +10,7 @@ public class Accessibility private int Private { get; set; } protected int Protected { get; set; } internal int Internal { get; set; } - // Note: accessibility was modified using dnspy - public int FamOrAssembly { get; set; } - // Note: accessibility was modified using dnspy - public int FamAndAssembly { get; set; } + protected internal int FamOrAssembly { get; set; } + private protected int FamAndAssembly { get; set; } } diff --git a/tests/fsharpqa/Source/Import/AccessibilityTests.dll b/tests/fsharpqa/Source/Import/AccessibilityTests.dll deleted file mode 100644 index 0e01f245a7d..00000000000 Binary files a/tests/fsharpqa/Source/Import/AccessibilityTests.dll and /dev/null differ diff --git a/tests/fsharpqa/Source/Import/env.lst b/tests/fsharpqa/Source/Import/env.lst index 792c23a3ace..7e9100030a3 100644 --- a/tests/fsharpqa/Source/Import/env.lst +++ b/tests/fsharpqa/Source/Import/env.lst @@ -83,11 +83,11 @@ NOMONO SOURCE=reference2.fsx SCFLAGS="--nologo -r:reference1.dll" PRECMD="\$FSC_ ### ### F# can consume FamOrAssembly and FamAndAssembly in combination with IVT ### - SOURCE=FamAndAssembly.fs SCFLAGS="-a -r:AccessibilityTests.dll" # FamAndAssembly.fs + SOURCE=FamAndAssembly.fs SCFLAGS="-a -r:AccessibilityTests.dll" PRECMD="\$CSC_PIPE /debug /target:library /langversion:latest AccessibilityTests.cs" # FamAndAssembly.fs ### See issue https://github.com/Microsoft/visualfsharp/issues/2496 - ### SOURCE=FamOrAssembly.fs SCFLAGS="-a -r:AccessibilityTests.dll" # FamOrAssembly.fs - SOURCE=FamAndAssembly_NoIVT.fs SCFLAGS="-a -r:AccessibilityTests.dll" # FamAndAssembly_NoIVT.fs - ### SOURCE=FamOrAssembly_NoIVT.fs SCFLAGS="-a -r:AccessibilityTests.dll" # FamOrAssembly_NoIVT.fs + ### SOURCE=FamOrAssembly.fs SCFLAGS="-a -r:AccessibilityTests.dll" PRECMD="\$CSC_PIPE /debug /target:library /langversion:latest AccessibilityTests.cs" # FamOrAssembly.fs + SOURCE=FamAndAssembly_NoIVT.fs SCFLAGS="-a -r:AccessibilityTests.dll" PRECMD="\$CSC_PIPE /debug /target:library /langversion:latest AccessibilityTests.cs" # FamAndAssembly_NoIVT.fs + ### SOURCE=FamOrAssembly_NoIVT.fs SCFLAGS="-a -r:AccessibilityTests.dll" PRECMD="\$CSC_PIPE /debug /target:library /langversion:latest AccessibilityTests.cs" # FamOrAssembly_NoIVT.fs ### ### Iterate over BCL collections @@ -100,4 +100,4 @@ NOMONO SOURCE=reference2.fsx SCFLAGS="--nologo -r:reference1.dll" PRECMD="\$FSC_ SOURCE=ReferenceExe01.fsx PRECMD="\$FSC_PIPE ReferenceExe.fs" # ReferenceExe01.fsx - SOURCE=LineDirectiveFromCSharp.fs PRECMD="\$CSC_PIPE /t:library LineDirectiveLib.cs" SCFLAGS="-r:LineDirectiveLib.dll" # LineDirectiveFromCSharp.fs \ No newline at end of file + SOURCE=LineDirectiveFromCSharp.fs PRECMD="\$CSC_PIPE /t:library LineDirectiveLib.cs" SCFLAGS="-r:LineDirectiveLib.dll" # LineDirectiveFromCSharp.fs diff --git a/tests/fsharpqa/Source/KnownFail.txt b/tests/fsharpqa/Source/KnownFail.txt index 86c99b31d3e..f2a3f0dc6ec 100644 --- a/tests/fsharpqa/Source/KnownFail.txt +++ b/tests/fsharpqa/Source/KnownFail.txt @@ -86,7 +86,7 @@ CHK Stress (2766.fs) -- failed # compiler/runtime unit test known failures -!NETFX35 FSharp.Core.Unittests.FSharp_Core.Microsoft_FSharp_Collections.SeqModule2.SystemLinqSelectWithException -- failed -!NETFX35 FSharp.Core.Unittests.FSharp_Core.Microsoft_FSharp_Collections.SeqModule2.SystemLinqSelectWithSideEffects -- failed -!CURRENTUICULTURE1033 FSharp.Core.Unittests.FSharp_Core.Microsoft_FSharp_Control.AsyncModule.ContinuationsThreadingDetails.AsyncSansSyncContext -- failed -!CURRENTUICULTURE1033 FSharp.Core.Unittests.FSharp_Core.Microsoft_FSharp_Control.AsyncModule.ContinuationsThreadingDetails.AsyncWithSyncContext -- failed \ No newline at end of file +!NETFX35 FSharp.Core.UnitTests.FSharp_Core.Microsoft_FSharp_Collections.SeqModule2.SystemLinqSelectWithException -- failed +!NETFX35 FSharp.Core.UnitTests.FSharp_Core.Microsoft_FSharp_Collections.SeqModule2.SystemLinqSelectWithSideEffects -- failed +!CURRENTUICULTURE1033 FSharp.Core.UnitTests.FSharp_Core.Microsoft_FSharp_Control.AsyncModule.ContinuationsThreadingDetails.AsyncSansSyncContext -- failed +!CURRENTUICULTURE1033 FSharp.Core.UnitTests.FSharp_Core.Microsoft_FSharp_Control.AsyncModule.ContinuationsThreadingDetails.AsyncWithSyncContext -- failed \ No newline at end of file diff --git a/tests/fsharpqa/Source/Libraries/Core/NativeInterop/stackalloc/ofDateTime01.fs b/tests/fsharpqa/Source/Libraries/Core/NativeInterop/stackalloc/ofDateTime01.fs index a58902665f6..19c259bb0c7 100644 --- a/tests/fsharpqa/Source/Libraries/Core/NativeInterop/stackalloc/ofDateTime01.fs +++ b/tests/fsharpqa/Source/Libraries/Core/NativeInterop/stackalloc/ofDateTime01.fs @@ -15,4 +15,13 @@ module M3 = if not (NativeInterop.NativePtr.get data i = now) then noerr <- false + let later = now.AddDays 1. + for i = 0 to 99 do + let datai = NativeInterop.NativePtr.toByRef (NativeInterop.NativePtr.add data i) + datai <- later + for i = 0 to 99 do + let datai = NativeInterop.NativePtr.toByRef (NativeInterop.NativePtr.add data i) + if not (datai = later) then + noerr <- false + (if noerr then 0 else 1) |> exit diff --git a/tests/fsharpqa/Source/Libraries/Core/NativeInterop/stackalloc/ofenum01.fs b/tests/fsharpqa/Source/Libraries/Core/NativeInterop/stackalloc/ofenum01.fs index d10b2b70512..885f3b88ac3 100644 --- a/tests/fsharpqa/Source/Libraries/Core/NativeInterop/stackalloc/ofenum01.fs +++ b/tests/fsharpqa/Source/Libraries/Core/NativeInterop/stackalloc/ofenum01.fs @@ -19,4 +19,13 @@ module M6 = if not (NativeInterop.NativePtr.get data i = (if (i % 2)=0 then E.A else E.B)) then noerr <- false + for i = 0 to 9 do + let datai = NativeInterop.NativePtr.toByRef (NativeInterop.NativePtr.add data i) + datai <- (if (i % 2)=1 then E.A else E.B) + + for i = 0 to 9 do + let datai = NativeInterop.NativePtr.toByRef (NativeInterop.NativePtr.add data i) + if not (datai = (if (i % 2)=1 then E.A else E.B)) then + noerr <- false + (if noerr then 0 else 1) |> exit diff --git a/tests/fsharpqa/Source/Libraries/Core/NativeInterop/stackalloc/ofint01.fs b/tests/fsharpqa/Source/Libraries/Core/NativeInterop/stackalloc/ofint01.fs index a882d32448c..e81be3fa1b2 100644 --- a/tests/fsharpqa/Source/Libraries/Core/NativeInterop/stackalloc/ofint01.fs +++ b/tests/fsharpqa/Source/Libraries/Core/NativeInterop/stackalloc/ofint01.fs @@ -16,5 +16,14 @@ module M1 = if not (NativeInterop.NativePtr.get data i = (i*i)) then noerr <- false + for i = 0 to 99 do + let datai = NativeInterop.NativePtr.toByRef (NativeInterop.NativePtr.add data i) + datai <- 1-i + + for i = 0 to 99 do + let datai = NativeInterop.NativePtr.toByRef (NativeInterop.NativePtr.add data i) + if not (datai = 1-i) then + noerr <- false + (if noerr then 0 else 1) |> exit diff --git a/tests/fsharpqa/Source/Libraries/Core/NativeInterop/stackalloc/ofint6401.fs b/tests/fsharpqa/Source/Libraries/Core/NativeInterop/stackalloc/ofint6401.fs index 182b80f3e42..401855c5de5 100644 --- a/tests/fsharpqa/Source/Libraries/Core/NativeInterop/stackalloc/ofint6401.fs +++ b/tests/fsharpqa/Source/Libraries/Core/NativeInterop/stackalloc/ofint6401.fs @@ -14,5 +14,14 @@ module M2 = if not (NativeInterop.NativePtr.get data i = (int64 (i*i))) then noerr <- false + for i = 0 to 99 do + let datai = NativeInterop.NativePtr.toByRef (NativeInterop.NativePtr.add data i) + datai <- int64 (1-i) + + for i = 0 to 99 do + let datai = NativeInterop.NativePtr.toByRef (NativeInterop.NativePtr.add data i) + if not (datai = int64 (1-i)) then + noerr <- false + (if noerr then 0 else 1) |> exit diff --git a/tests/fsharpqa/Source/Misc/LongSourceFile01.fs b/tests/fsharpqa/Source/Misc/LongSourceFile01.fs index 970a5f77ff6..8d4c0cd35f5 100644 --- a/tests/fsharpqa/Source/Misc/LongSourceFile01.fs +++ b/tests/fsharpqa/Source/Misc/LongSourceFile01.fs @@ -3,7 +3,7 @@ // Regression for Dev10:841369 // Intra assembly tail calls weren't being taken which caused a stackoverflow exception in the compiler (also taking down the IDE) -namespace FSharp.Core.Unittests.SurfaceArea +namespace FSharp.Core.UnitTests.SurfaceArea //open NUnit.Framework @@ -2287,6 +2287,7 @@ Microsoft.FSharp.Core.Operators: T Ceiling[T](T) Microsoft.FSharp.Core.Operators: T Cos[T](T) Microsoft.FSharp.Core.Operators: T Cosh[T](T) Microsoft.FSharp.Core.Operators: T DefaultArg[T](Microsoft.FSharp.Core.FSharpOption`1[T], T) +Microsoft.FSharp.Core.Operators: T DefaultValueArg[T](Microsoft.FSharp.Core.FSharpValueOption`1[T], T) Microsoft.FSharp.Core.Operators: T Exit[T](Int32) Microsoft.FSharp.Core.Operators: T Exp[T](T) Microsoft.FSharp.Core.Operators: T FailWith[T](System.String) diff --git a/tests/fsharpqa/Source/Misc/Parsing02.fs b/tests/fsharpqa/Source/Misc/Parsing02.fs index 9a17369e870..55b5997b467 100644 --- a/tests/fsharpqa/Source/Misc/Parsing02.fs +++ b/tests/fsharpqa/Source/Misc/Parsing02.fs @@ -1,8 +1,8 @@ // #Regression #Misc // Verify warnings associated with top level expressions getting discarded -//The result of this expression is implicitly ignored -//The result of this expression is implicitly ignored +//The result of this expression has type +//The result of this expression has type // Note the comma between printf "%A", this results in a tuple expr which probably wasn't intended. let arr = [|"Foo"; "Bar"|] diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals02.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals02.il.bsl index c9d066af0ea..aa7bbc68da5 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals02.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals02.il.bsl @@ -13,7 +13,7 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 4:4:1:0 + .ver 4:4:3:0 } .assembly Equals02 { @@ -29,20 +29,20 @@ } .mresource public FSharpSignatureData.Equals02 { - // Offset: 0x00000000 Length: 0x00000234 + // Offset: 0x00000000 Length: 0x0000023C } .mresource public FSharpOptimizationData.Equals02 { - // Offset: 0x00000238 Length: 0x000000B6 + // Offset: 0x00000240 Length: 0x000000B6 } .module Equals02.dll -// MVID: {59B18AEE-0759-B6D8-A745-0383EE8AB159} +// MVID: {5B18753B-0759-B6D8-A745-03833B75185B} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x02880000 +// Image base: 0x00F20000 // =============== CLASS MEMBERS DECLARATION =================== @@ -68,51 +68,32 @@ .line 8,8 : 8,32 '' IL_0002: ldc.i4.0 IL_0003: stloc.1 - IL_0004: br.s IL_0022 - + IL_0004: br.s IL_001a .line 9,9 : 12,26 '' - IL_0006: ldc.i4.1 - IL_0007: brfalse.s IL_001b - - .line 16707566,16707566 : 0,0 '' - IL_0009: ldstr "five" - IL_000e: ldstr "5" - IL_0013: call bool [mscorlib]System.String::Equals(string, + IL_0006: ldstr "five" + IL_000b: ldstr "5" + IL_0010: call bool [mscorlib]System.String::Equals(string, string) - .line 16707566,16707566 : 0,0 '' - IL_0018: nop - IL_0019: br.s IL_001d - - .line 16707566,16707566 : 0,0 '' - IL_001b: ldc.i4.0 - .line 16707566,16707566 : 0,0 '' - IL_001c: nop - .line 16707566,16707566 : 0,0 '' - IL_001d: stloc.0 - IL_001e: ldloc.1 - IL_001f: ldc.i4.1 - IL_0020: add - IL_0021: stloc.1 + IL_0015: stloc.0 + IL_0016: ldloc.1 + IL_0017: ldc.i4.1 + IL_0018: add + IL_0019: stloc.1 .line 8,8 : 8,32 '' - IL_0022: ldloc.1 - IL_0023: ldc.i4 0x989681 - IL_0028: blt.s IL_0006 - + IL_001a: ldloc.1 + IL_001b: ldc.i4 0x989681 + IL_0020: blt.s IL_0006 .line 10,10 : 8,9 '' - IL_002a: ldloc.0 - IL_002b: ret + IL_0022: ldloc.0 + IL_0023: ret } // end of method EqualsMicroPerfAndCodeGenerationTests::f4_tuple4 - } // end of class EqualsMicroPerfAndCodeGenerationTests - } // end of class Equals02 - .class private abstract auto ansi sealed ''.$Equals02$fsx extends [mscorlib]System.Object { } // end of class ''.$Equals02$fsx - // ============================================================= // *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals03.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals03.il.bsl index de03157c58f..e222d314825 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals03.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals03.il.bsl @@ -13,7 +13,7 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 4:4:1:0 + .ver 4:4:3:0 } .assembly Equals03 { @@ -29,20 +29,20 @@ } .mresource public FSharpSignatureData.Equals03 { - // Offset: 0x00000000 Length: 0x00000234 + // Offset: 0x00000000 Length: 0x0000023C } .mresource public FSharpOptimizationData.Equals03 { - // Offset: 0x00000238 Length: 0x000000B6 + // Offset: 0x00000240 Length: 0x000000B6 } .module Equals03.dll -// MVID: {59B18AEE-0759-3313-A745-0383EE8AB159} +// MVID: {5B18753B-0759-3313-A745-03833B75185B} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x010B0000 +// Image base: 0x02630000 // =============== CLASS MEMBERS DECLARATION =================== @@ -57,7 +57,7 @@ .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 ) .method public static bool f4_tuple5() cil managed { - // Code size 71 (0x47) + // Code size 63 (0x3f) .maxstack 4 .locals init ([0] bool x, [1] int32 i) @@ -68,54 +68,41 @@ .line 8,8 : 8,32 '' IL_0002: ldc.i4.0 IL_0003: stloc.1 - IL_0004: br.s IL_003d + IL_0004: br.s IL_0035 .line 9,9 : 12,26 '' - IL_0006: ldc.i4.1 - IL_0007: brfalse.s IL_001b - - .line 16707566,16707566 : 0,0 '' - IL_0009: ldstr "5" - IL_000e: ldstr "5" - IL_0013: call bool [mscorlib]System.String::Equals(string, + IL_0006: ldstr "5" + IL_000b: ldstr "5" + IL_0010: call bool [mscorlib]System.String::Equals(string, string) - .line 16707566,16707566 : 0,0 '' - IL_0018: nop - IL_0019: br.s IL_001d - - .line 16707566,16707566 : 0,0 '' - IL_001b: ldc.i4.0 - .line 16707566,16707566 : 0,0 '' - IL_001c: nop - .line 16707566,16707566 : 0,0 '' - IL_001d: brfalse.s IL_0036 + IL_0015: brfalse.s IL_002e .line 16707566,16707566 : 0,0 '' - IL_001f: ldc.r8 6. - IL_0028: ldc.r8 7. - IL_0031: ceq + IL_0017: ldc.r8 6. + IL_0020: ldc.r8 7. + IL_0029: ceq .line 16707566,16707566 : 0,0 '' - IL_0033: nop - IL_0034: br.s IL_0038 + IL_002b: nop + IL_002c: br.s IL_0030 .line 16707566,16707566 : 0,0 '' - IL_0036: ldc.i4.0 + IL_002e: ldc.i4.0 .line 16707566,16707566 : 0,0 '' - IL_0037: nop + IL_002f: nop .line 16707566,16707566 : 0,0 '' - IL_0038: stloc.0 - IL_0039: ldloc.1 - IL_003a: ldc.i4.1 - IL_003b: add - IL_003c: stloc.1 + IL_0030: stloc.0 + IL_0031: ldloc.1 + IL_0032: ldc.i4.1 + IL_0033: add + IL_0034: stloc.1 .line 8,8 : 8,32 '' - IL_003d: ldloc.1 - IL_003e: ldc.i4 0x989681 - IL_0043: blt.s IL_0006 + IL_0035: ldloc.1 + IL_0036: ldc.i4 0x989681 + IL_003b: blt.s IL_0006 .line 10,10 : 8,9 '' - IL_0045: ldloc.0 - IL_0046: ret + IL_003d: ldloc.0 + IL_003e: ret } // end of method EqualsMicroPerfAndCodeGenerationTests::f4_tuple5 } // end of class EqualsMicroPerfAndCodeGenerationTests diff --git a/tests/fsharpqa/Source/Optimizations/Inlining/StructUnion01.il.bsl b/tests/fsharpqa/Source/Optimizations/Inlining/StructUnion01.il.bsl index 6df12b2c6a2..7e07ff48ffd 100644 --- a/tests/fsharpqa/Source/Optimizations/Inlining/StructUnion01.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/Inlining/StructUnion01.il.bsl @@ -13,7 +13,7 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 4:4:1:0 + .ver 4:4:3:0 } .assembly StructUnion01 { @@ -25,20 +25,20 @@ } .mresource public FSharpSignatureData.StructUnion01 { - // Offset: 0x00000000 Length: 0x0000088A + // Offset: 0x00000000 Length: 0x0000087E } .mresource public FSharpOptimizationData.StructUnion01 { - // Offset: 0x00000890 Length: 0x00000421 + // Offset: 0x00000888 Length: 0x00000421 } .module StructUnion01.dll -// MVID: {59B18AF8-D3E9-6B24-A745-0383F88AB159} +// MVID: {5B1ED843-D3E9-6B24-A745-038343D81E5B} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x01000000 +// Image base: 0x017F0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -173,69 +173,66 @@ instance int32 CompareTo(valuetype StructUnion01/U obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 86 (0x56) + // Code size 79 (0x4f) .maxstack 4 - .locals init (valuetype StructUnion01/U& V_0, - int32 V_1, - class [mscorlib]System.Collections.IComparer V_2, - int32 V_3, - int32 V_4) - IL_0000: ldarga.s obj - IL_0002: stloc.0 - IL_0003: ldarg.0 - IL_0004: pop - IL_0005: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_000a: stloc.2 - IL_000b: ldarg.0 - IL_000c: ldfld int32 StructUnion01/U::item1 - IL_0011: stloc.3 - IL_0012: ldloc.0 - IL_0013: ldfld int32 StructUnion01/U::item1 - IL_0018: stloc.s V_4 - IL_001a: ldloc.3 - IL_001b: ldloc.s V_4 - IL_001d: bge.s IL_0022 - - IL_001f: ldc.i4.m1 - IL_0020: br.s IL_0027 - - IL_0022: ldloc.3 - IL_0023: ldloc.s V_4 - IL_0025: cgt - IL_0027: stloc.1 - IL_0028: ldloc.1 - IL_0029: ldc.i4.0 - IL_002a: bge.s IL_002e - - IL_002c: ldloc.1 - IL_002d: ret + .locals init (int32 V_0, + class [mscorlib]System.Collections.IComparer V_1, + int32 V_2, + int32 V_3) + IL_0000: ldarg.0 + IL_0001: pop + IL_0002: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0007: stloc.1 + IL_0008: ldarg.0 + IL_0009: ldfld int32 StructUnion01/U::item1 + IL_000e: stloc.2 + IL_000f: ldarga.s obj + IL_0011: ldfld int32 StructUnion01/U::item1 + IL_0016: stloc.3 + IL_0017: ldloc.2 + IL_0018: ldloc.3 + IL_0019: bge.s IL_001e + + IL_001b: ldc.i4.m1 + IL_001c: br.s IL_0022 + + IL_001e: ldloc.2 + IL_001f: ldloc.3 + IL_0020: cgt + IL_0022: stloc.0 + IL_0023: ldloc.0 + IL_0024: ldc.i4.0 + IL_0025: bge.s IL_0029 + + IL_0027: ldloc.0 + IL_0028: ret - IL_002e: ldloc.1 - IL_002f: ldc.i4.0 - IL_0030: ble.s IL_0034 + IL_0029: ldloc.0 + IL_002a: ldc.i4.0 + IL_002b: ble.s IL_002f - IL_0032: ldloc.1 - IL_0033: ret + IL_002d: ldloc.0 + IL_002e: ret - IL_0034: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0039: stloc.2 - IL_003a: ldarg.0 - IL_003b: ldfld int32 StructUnion01/U::item2 - IL_0040: stloc.3 - IL_0041: ldloc.0 - IL_0042: ldfld int32 StructUnion01/U::item2 - IL_0047: stloc.s V_4 - IL_0049: ldloc.3 - IL_004a: ldloc.s V_4 - IL_004c: bge.s IL_0050 - - IL_004e: ldc.i4.m1 - IL_004f: ret - - IL_0050: ldloc.3 - IL_0051: ldloc.s V_4 - IL_0053: cgt - IL_0055: ret + IL_002f: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0034: stloc.1 + IL_0035: ldarg.0 + IL_0036: ldfld int32 StructUnion01/U::item2 + IL_003b: stloc.2 + IL_003c: ldarga.s obj + IL_003e: ldfld int32 StructUnion01/U::item2 + IL_0043: stloc.3 + IL_0044: ldloc.2 + IL_0045: ldloc.3 + IL_0046: bge.s IL_004a + + IL_0048: ldc.i4.m1 + IL_0049: ret + + IL_004a: ldloc.2 + IL_004b: ldloc.3 + IL_004c: cgt + IL_004e: ret } // end of method U::CompareTo .method public hidebysig virtual final @@ -256,68 +253,65 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 81 (0x51) + // Code size 74 (0x4a) .maxstack 4 .locals init (valuetype StructUnion01/U V_0, - valuetype StructUnion01/U& V_1, + int32 V_1, int32 V_2, - int32 V_3, - int32 V_4) + int32 V_3) IL_0000: ldarg.1 IL_0001: unbox.any StructUnion01/U IL_0006: stloc.0 - IL_0007: ldloca.s V_0 - IL_0009: stloc.1 - IL_000a: ldarg.0 - IL_000b: pop - IL_000c: ldarg.0 - IL_000d: ldfld int32 StructUnion01/U::item1 - IL_0012: stloc.3 - IL_0013: ldloc.1 - IL_0014: ldfld int32 StructUnion01/U::item1 - IL_0019: stloc.s V_4 - IL_001b: ldloc.3 - IL_001c: ldloc.s V_4 - IL_001e: bge.s IL_0023 - - IL_0020: ldc.i4.m1 - IL_0021: br.s IL_0028 - - IL_0023: ldloc.3 - IL_0024: ldloc.s V_4 - IL_0026: cgt - IL_0028: stloc.2 - IL_0029: ldloc.2 - IL_002a: ldc.i4.0 - IL_002b: bge.s IL_002f - - IL_002d: ldloc.2 - IL_002e: ret - - IL_002f: ldloc.2 - IL_0030: ldc.i4.0 - IL_0031: ble.s IL_0035 - - IL_0033: ldloc.2 - IL_0034: ret + IL_0007: ldarg.0 + IL_0008: pop + IL_0009: ldarg.0 + IL_000a: ldfld int32 StructUnion01/U::item1 + IL_000f: stloc.2 + IL_0010: ldloca.s V_0 + IL_0012: ldfld int32 StructUnion01/U::item1 + IL_0017: stloc.3 + IL_0018: ldloc.2 + IL_0019: ldloc.3 + IL_001a: bge.s IL_001f + + IL_001c: ldc.i4.m1 + IL_001d: br.s IL_0023 + + IL_001f: ldloc.2 + IL_0020: ldloc.3 + IL_0021: cgt + IL_0023: stloc.1 + IL_0024: ldloc.1 + IL_0025: ldc.i4.0 + IL_0026: bge.s IL_002a - IL_0035: ldarg.0 - IL_0036: ldfld int32 StructUnion01/U::item2 - IL_003b: stloc.3 - IL_003c: ldloc.1 - IL_003d: ldfld int32 StructUnion01/U::item2 - IL_0042: stloc.s V_4 - IL_0044: ldloc.3 - IL_0045: ldloc.s V_4 - IL_0047: bge.s IL_004b + IL_0028: ldloc.1 + IL_0029: ret - IL_0049: ldc.i4.m1 - IL_004a: ret + IL_002a: ldloc.1 + IL_002b: ldc.i4.0 + IL_002c: ble.s IL_0030 - IL_004b: ldloc.3 - IL_004c: ldloc.s V_4 - IL_004e: cgt - IL_0050: ret + IL_002e: ldloc.1 + IL_002f: ret + + IL_0030: ldarg.0 + IL_0031: ldfld int32 StructUnion01/U::item2 + IL_0036: stloc.2 + IL_0037: ldloca.s V_0 + IL_0039: ldfld int32 StructUnion01/U::item2 + IL_003e: stloc.3 + IL_003f: ldloc.2 + IL_0040: ldloc.3 + IL_0041: bge.s IL_0045 + + IL_0043: ldc.i4.m1 + IL_0044: ret + + IL_0045: ldloc.2 + IL_0046: ldloc.3 + IL_0047: cgt + IL_0049: ret } // end of method U::CompareTo .method public hidebysig virtual final @@ -380,10 +374,9 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 53 (0x35) + // Code size 52 (0x34) .maxstack 4 - .locals init (valuetype StructUnion01/U V_0, - valuetype StructUnion01/U& V_1) + .locals init (valuetype StructUnion01/U V_0) IL_0000: ldarg.1 IL_0001: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) IL_0006: brtrue.s IL_000a @@ -394,53 +387,48 @@ IL_000a: ldarg.1 IL_000b: unbox.any StructUnion01/U IL_0010: stloc.0 - IL_0011: ldloca.s V_0 - IL_0013: stloc.1 - IL_0014: ldarg.0 - IL_0015: pop - IL_0016: ldarg.0 - IL_0017: ldfld int32 StructUnion01/U::item1 - IL_001c: ldloc.1 - IL_001d: ldfld int32 StructUnion01/U::item1 - IL_0022: bne.un.s IL_0033 - - IL_0024: ldarg.0 - IL_0025: ldfld int32 StructUnion01/U::item2 - IL_002a: ldloc.1 - IL_002b: ldfld int32 StructUnion01/U::item2 - IL_0030: ceq - IL_0032: ret + IL_0011: ldarg.0 + IL_0012: pop + IL_0013: ldarg.0 + IL_0014: ldfld int32 StructUnion01/U::item1 + IL_0019: ldloca.s V_0 + IL_001b: ldfld int32 StructUnion01/U::item1 + IL_0020: bne.un.s IL_0032 + + IL_0022: ldarg.0 + IL_0023: ldfld int32 StructUnion01/U::item2 + IL_0028: ldloca.s V_0 + IL_002a: ldfld int32 StructUnion01/U::item2 + IL_002f: ceq + IL_0031: ret - IL_0033: ldc.i4.0 - IL_0034: ret + IL_0032: ldc.i4.0 + IL_0033: ret } // end of method U::Equals .method public hidebysig virtual final instance bool Equals(valuetype StructUnion01/U obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 36 (0x24) - .maxstack 4 - .locals init (valuetype StructUnion01/U& V_0) - IL_0000: ldarga.s obj - IL_0002: stloc.0 - IL_0003: ldarg.0 - IL_0004: pop - IL_0005: ldarg.0 - IL_0006: ldfld int32 StructUnion01/U::item1 - IL_000b: ldloc.0 - IL_000c: ldfld int32 StructUnion01/U::item1 - IL_0011: bne.un.s IL_0022 - - IL_0013: ldarg.0 - IL_0014: ldfld int32 StructUnion01/U::item2 - IL_0019: ldloc.0 - IL_001a: ldfld int32 StructUnion01/U::item2 - IL_001f: ceq - IL_0021: ret - - IL_0022: ldc.i4.0 - IL_0023: ret + // Code size 35 (0x23) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: pop + IL_0002: ldarg.0 + IL_0003: ldfld int32 StructUnion01/U::item1 + IL_0008: ldarga.s obj + IL_000a: ldfld int32 StructUnion01/U::item1 + IL_000f: bne.un.s IL_0021 + + IL_0011: ldarg.0 + IL_0012: ldfld int32 StructUnion01/U::item2 + IL_0017: ldarga.s obj + IL_0019: ldfld int32 StructUnion01/U::item2 + IL_001e: ceq + IL_0020: ret + + IL_0021: ldc.i4.0 + IL_0022: ret } // end of method U::Equals .method public hidebysig virtual final @@ -603,60 +591,48 @@ .method public static int32 f1(valuetype StructUnion01/U& x) cil managed { - // Code size 23 (0x17) - .maxstack 4 - .locals init (valuetype StructUnion01/U V_0) + // Code size 14 (0xe) + .maxstack 8 IL_0000: ldarg.0 - IL_0001: ldobj StructUnion01/U - IL_0006: stloc.0 - IL_0007: ldloca.s V_0 - IL_0009: ldfld int32 StructUnion01/U::item1 - IL_000e: ldloca.s V_0 - IL_0010: ldfld int32 StructUnion01/U::item2 - IL_0015: add - IL_0016: ret + IL_0001: ldfld int32 StructUnion01/U::item1 + IL_0006: ldarg.0 + IL_0007: ldfld int32 StructUnion01/U::item2 + IL_000c: add + IL_000d: ret } // end of method StructUnion01::f1 .method public static int32 f2(valuetype StructUnion01/U& x) cil managed { - // Code size 23 (0x17) - .maxstack 4 - .locals init (valuetype StructUnion01/U V_0) + // Code size 14 (0xe) + .maxstack 8 IL_0000: ldarg.0 - IL_0001: ldobj StructUnion01/U - IL_0006: stloc.0 - IL_0007: ldloca.s V_0 - IL_0009: ldfld int32 StructUnion01/U::item1 - IL_000e: ldloca.s V_0 - IL_0010: ldfld int32 StructUnion01/U::item2 - IL_0015: add - IL_0016: ret + IL_0001: ldfld int32 StructUnion01/U::item1 + IL_0006: ldarg.0 + IL_0007: ldfld int32 StructUnion01/U::item2 + IL_000c: add + IL_000d: ret } // end of method StructUnion01::f2 .method public static int32 f3(valuetype StructUnion01/U& x) cil managed { - // Code size 49 (0x31) - .maxstack 4 - .locals init (valuetype StructUnion01/U V_0) + // Code size 38 (0x26) + .maxstack 8 IL_0000: ldarg.0 - IL_0001: ldobj StructUnion01/U - IL_0006: stloc.0 - IL_0007: ldloca.s V_0 - IL_0009: ldfld int32 StructUnion01/U::item1 - IL_000e: ldc.i4.3 - IL_000f: sub - IL_0010: switch ( - IL_0029) - IL_0019: ldloca.s V_0 - IL_001b: ldfld int32 StructUnion01/U::item1 - IL_0020: ldloca.s V_0 - IL_0022: ldfld int32 StructUnion01/U::item2 - IL_0027: add - IL_0028: ret - - IL_0029: ldloca.s V_0 - IL_002b: ldfld int32 StructUnion01/U::item2 - IL_0030: ret + IL_0001: ldfld int32 StructUnion01/U::item1 + IL_0006: ldc.i4.3 + IL_0007: sub + IL_0008: switch ( + IL_001f) + IL_0011: ldarg.0 + IL_0012: ldfld int32 StructUnion01/U::item1 + IL_0017: ldarg.0 + IL_0018: ldfld int32 StructUnion01/U::item2 + IL_001d: add + IL_001e: ret + + IL_001f: ldarg.0 + IL_0020: ldfld int32 StructUnion01/U::item2 + IL_0025: ret } // end of method StructUnion01::f3 .method public static int32 f4(valuetype StructUnion01/U& x, diff --git a/tests/fsharpqa/Source/Printing/CustomExceptions01.fs b/tests/fsharpqa/Source/Printing/CustomExceptions01.fs index 76867e00117..6f33bff2e19 100644 --- a/tests/fsharpqa/Source/Printing/CustomExceptions01.fs +++ b/tests/fsharpqa/Source/Printing/CustomExceptions01.fs @@ -15,7 +15,7 @@ exception WeekendEx of WeekendDay if sprintf "%A" (Foo) <> "Foo" || sprintf "%A" (Bar 10) <> "Bar 10" - || sprintf "%A" (FooBaz System.DateTime.Today) <> ("FooBaz " ^ System.DateTime.Today.ToString()) + || sprintf "%A" (FooBaz System.DateTime.Today) <> ("FooBaz " + System.DateTime.Today.ToString()) || sprintf "%A" (MarkupEx {Body = ""}) <> "MarkupEx {Body = \"\";}" || sprintf "%A" (WeekendEx Saturday) <> "WeekendEx Saturday" then exit 1 diff --git a/tests/fsharpqa/Source/Warnings/DontWarnIfPropertyWithoutSetter.fs b/tests/fsharpqa/Source/Warnings/DontWarnIfPropertyWithoutSetter.fs index f36f8919942..4492e6338c6 100644 --- a/tests/fsharpqa/Source/Warnings/DontWarnIfPropertyWithoutSetter.fs +++ b/tests/fsharpqa/Source/Warnings/DontWarnIfPropertyWithoutSetter.fs @@ -1,5 +1,5 @@ // #Warnings -//The result of this equality expression is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. +//The result of this equality expression has type 'bool' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. type MyClass(property1 : int) = member val Property2 = "" with get diff --git a/tests/fsharpqa/Source/Warnings/ElseBranchHasWrongType.fs b/tests/fsharpqa/Source/Warnings/ElseBranchHasWrongType.fs index 876d29ab372..b14b495304e 100644 --- a/tests/fsharpqa/Source/Warnings/ElseBranchHasWrongType.fs +++ b/tests/fsharpqa/Source/Warnings/ElseBranchHasWrongType.fs @@ -1,5 +1,5 @@ // #Warnings -//All branches of an 'if' expression must have the same type. This expression was expected to have type 'string', but here has type 'int'. +//All branches of an 'if' expression must return values of the same type as the first branch, which here is 'string'. This branch returns a value of type 'int'. let test = 100 let y = diff --git a/tests/fsharpqa/Source/Warnings/ElseBranchHasWrongType2.fs b/tests/fsharpqa/Source/Warnings/ElseBranchHasWrongType2.fs index 55fec2f1620..06d83f76aa0 100644 --- a/tests/fsharpqa/Source/Warnings/ElseBranchHasWrongType2.fs +++ b/tests/fsharpqa/Source/Warnings/ElseBranchHasWrongType2.fs @@ -1,5 +1,5 @@ // #Warnings -//All branches of an 'if' expression must have the same type. This expression was expected to have type 'string', but here has type 'int'. +//All branches of an 'if' expression must return values of the same type as the first branch, which here is 'string'. This branch returns a value of type 'int'. let test = 100 let f x = test diff --git a/tests/fsharpqa/Source/Warnings/ElseBranchHasWrongType3.fs b/tests/fsharpqa/Source/Warnings/ElseBranchHasWrongType3.fs index eb8a190fde7..1306c794759 100644 --- a/tests/fsharpqa/Source/Warnings/ElseBranchHasWrongType3.fs +++ b/tests/fsharpqa/Source/Warnings/ElseBranchHasWrongType3.fs @@ -1,5 +1,5 @@ // #Warnings -//All branches of an 'if' expression must have the same type. This expression was expected to have type 'string', but here has type 'int'. +//All branches of an 'if' expression must return values of the same type as the first branch, which here is 'string'. This branch returns a value of type 'int'. let f x = x + 4 diff --git a/tests/fsharpqa/Source/Warnings/ElseBranchHasWrongType4.fs b/tests/fsharpqa/Source/Warnings/ElseBranchHasWrongType4.fs index 09db1e3083f..8339a930d30 100644 --- a/tests/fsharpqa/Source/Warnings/ElseBranchHasWrongType4.fs +++ b/tests/fsharpqa/Source/Warnings/ElseBranchHasWrongType4.fs @@ -1,5 +1,5 @@ // #Warnings -//All branches of an 'if' expression must have the same type. This expression was expected to have type 'string', but here has type 'int'. +//All branches of an 'if' expression must return values of the same type as the first branch, which here is 'string'. This branch returns a value of type 'int'. let f x = x + 4 diff --git a/tests/fsharpqa/Source/Warnings/NestedElseBranchHasWrongType.fs b/tests/fsharpqa/Source/Warnings/NestedElseBranchHasWrongType.fs index ab5a8da39f2..a8e63cee65a 100644 --- a/tests/fsharpqa/Source/Warnings/NestedElseBranchHasWrongType.fs +++ b/tests/fsharpqa/Source/Warnings/NestedElseBranchHasWrongType.fs @@ -1,5 +1,5 @@ // #Warnings -//All branches of an 'if' expression must have the same type. +//All branches of an 'if' expression must return values of the same type as the first branch, which here is 'bool'. This branch returns a value of type 'string'. let x = 1 if x = 1 then true diff --git a/tests/fsharpqa/Source/Warnings/WarnIfDiscardedInList.fs b/tests/fsharpqa/Source/Warnings/WarnIfDiscardedInList.fs new file mode 100644 index 00000000000..d47a4c13769 --- /dev/null +++ b/tests/fsharpqa/Source/Warnings/WarnIfDiscardedInList.fs @@ -0,0 +1,14 @@ +// #Warnings +// + +let div _ _ = 1 +let subView _ _ = [1; 2] + +// elmish view +let view model dispatch = + [ + yield! subView model dispatch + div [] [] + ] + +exit 0 \ No newline at end of file diff --git a/tests/fsharpqa/Source/Warnings/WarnIfDiscardedInList2.fs b/tests/fsharpqa/Source/Warnings/WarnIfDiscardedInList2.fs new file mode 100644 index 00000000000..d360da4d666 --- /dev/null +++ b/tests/fsharpqa/Source/Warnings/WarnIfDiscardedInList2.fs @@ -0,0 +1,19 @@ +// #Warnings +// + +// stupid things to make the sample compile +let div _ _ = 1 +let subView _ _ = [1; 2] +let y = 1 + +// elmish view +let view model dispatch = + [ + div [] [ + match y with + | 1 -> yield! subView model dispatch + | _ -> subView model dispatch + ] + ] + +exit 0 \ No newline at end of file diff --git a/tests/fsharpqa/Source/Warnings/WarnIfDiscardedInList3.fs b/tests/fsharpqa/Source/Warnings/WarnIfDiscardedInList3.fs new file mode 100644 index 00000000000..238d4388f9e --- /dev/null +++ b/tests/fsharpqa/Source/Warnings/WarnIfDiscardedInList3.fs @@ -0,0 +1,19 @@ +// #Warnings +// + +// stupid things to make the sample compile +let div _ _ = 1 +let subView _ _ = true +let y = 1 + +// elmish view +let view model dispatch = + [ + div [] [ + match y with + | 1 -> () + | _ -> subView model dispatch + ] + ] + +exit 0 \ No newline at end of file diff --git a/tests/fsharpqa/Source/Warnings/WarnIfExpressionResultUnused.fs b/tests/fsharpqa/Source/Warnings/WarnIfExpressionResultUnused.fs index e43c60b38d9..9480f35b6b6 100644 --- a/tests/fsharpqa/Source/Warnings/WarnIfExpressionResultUnused.fs +++ b/tests/fsharpqa/Source/Warnings/WarnIfExpressionResultUnused.fs @@ -1,5 +1,5 @@ // #Warnings -//The result of this expression is implicitly ignored\. Consider using 'ignore' to discard this value explicitly, e\.g\. 'expr \|> ignore', or 'let' to bind the result to a name, e\.g\. 'let result = expr'.$ +//The result of this expression has type 'int' and is implicitly ignored\. Consider using 'ignore' to discard this value explicitly, e\.g\. 'expr \|> ignore', or 'let' to bind the result to a name, e\.g\. 'let result = expr'.$ 1 + 2 printfn "%d" 3 diff --git a/tests/fsharpqa/Source/Warnings/WarnIfImplicitlyDiscarded.fs b/tests/fsharpqa/Source/Warnings/WarnIfImplicitlyDiscarded.fs index d0acf39cbe0..ad7f9deacdd 100644 --- a/tests/fsharpqa/Source/Warnings/WarnIfImplicitlyDiscarded.fs +++ b/tests/fsharpqa/Source/Warnings/WarnIfImplicitlyDiscarded.fs @@ -1,5 +1,5 @@ // #Warnings -//The result of this equality expression is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. +//The result of this equality expression has type 'bool' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. let x = 10 let y = 20 diff --git a/tests/fsharpqa/Source/Warnings/WarnIfMissingElseBranch.fs b/tests/fsharpqa/Source/Warnings/WarnIfMissingElseBranch.fs index fd832d947c7..9e6e9d7efe9 100644 --- a/tests/fsharpqa/Source/Warnings/WarnIfMissingElseBranch.fs +++ b/tests/fsharpqa/Source/Warnings/WarnIfMissingElseBranch.fs @@ -1,5 +1,5 @@ // #Warnings -//The 'if' expression is missing an 'else' branch. The 'then' branch has type 'string'. Because 'if' is an expression, and not a statement, add an 'else' branch which returns a value of the same type. +//This 'if' expression is missing an 'else' branch. Because 'if' is an expression, and not a statement, add an 'else' branch which also returns a value of type 'string'. let x = 10 let y = diff --git a/tests/fsharpqa/Source/Warnings/WarnIfMissingElseBranch3.fs b/tests/fsharpqa/Source/Warnings/WarnIfMissingElseBranch3.fs index 7e17b46f40e..cbf7d5acf16 100644 --- a/tests/fsharpqa/Source/Warnings/WarnIfMissingElseBranch3.fs +++ b/tests/fsharpqa/Source/Warnings/WarnIfMissingElseBranch3.fs @@ -1,5 +1,5 @@ // #Warnings -//The 'if' expression is missing an 'else' branch. The 'then' branch has type 'string'. Because 'if' is an expression, and not a statement, add an 'else' branch which returns a value of the same type. +//This 'if' expression is missing an 'else' branch. Because 'if' is an expression, and not a statement, add an 'else' branch which also returns a value of type 'string'. let x = 10 let y = diff --git a/tests/fsharpqa/Source/Warnings/WarnOnlyOnLastExpression.fs b/tests/fsharpqa/Source/Warnings/WarnOnlyOnLastExpression.fs index ac96be2f92b..6f2ef4d9c45 100644 --- a/tests/fsharpqa/Source/Warnings/WarnOnlyOnLastExpression.fs +++ b/tests/fsharpqa/Source/Warnings/WarnOnlyOnLastExpression.fs @@ -1,5 +1,5 @@ // #Warnings -// +// let mutable x = 0 while x < 1 do diff --git a/tests/fsharpqa/Source/Warnings/env.lst b/tests/fsharpqa/Source/Warnings/env.lst index 8a80eb74d15..383c291e906 100644 --- a/tests/fsharpqa/Source/Warnings/env.lst +++ b/tests/fsharpqa/Source/Warnings/env.lst @@ -77,6 +77,9 @@ SOURCE=WarnIfPossibleDotNetPropertySetter.fs SOURCE=DontWarnIfPropertyWithoutSetter.fs SOURCE=WarnIfImplicitlyDiscarded.fs + SOURCE=WarnIfDiscardedInList.fs + SOURCE=WarnIfDiscardedInList2.fs + SOURCE=WarnIfDiscardedInList3.fs SOURCE=WarnOnlyOnLastExpression.fs SOURCE=WarnIfPossiblePropertySetter.fs SOURCE=DoCannotHaveVisibilityDeclarations.fs diff --git a/tests/fsharpqa/Source/XmlDoc/Basic/xmlDoc001.fs b/tests/fsharpqa/Source/XmlDoc/Basic/xmlDoc001.fs index 7f1b8ea3bea..3e1ea349d44 100644 --- a/tests/fsharpqa/Source/XmlDoc/Basic/xmlDoc001.fs +++ b/tests/fsharpqa/Source/XmlDoc/Basic/xmlDoc001.fs @@ -17,7 +17,7 @@ let test = #if WITHXMLVERIFICATION let xml = new System.Xml.XmlDocument() xml.Load(xmlname); - if System.String.Compare(xml.GetElementsByTagName("summary").Item(0).FirstChild.Value, System.Environment.NewLine ^ " I'm an xml comment!" ^ System.Environment.NewLine) = 0 then 0 else 1 + if System.String.Compare(xml.GetElementsByTagName("summary").Item(0).FirstChild.Value, System.Environment.NewLine + " I'm an xml comment!" + System.Environment.NewLine) = 0 then 0 else 1 #else 0 #endif diff --git a/tests/fsharpqa/Source/XmlDoc/Basic/xmlDoc002.fs b/tests/fsharpqa/Source/XmlDoc/Basic/xmlDoc002.fs index 8a1adafce7f..16cad97bb17 100644 --- a/tests/fsharpqa/Source/XmlDoc/Basic/xmlDoc002.fs +++ b/tests/fsharpqa/Source/XmlDoc/Basic/xmlDoc002.fs @@ -18,7 +18,7 @@ let test = #if WITHXMLVERIFICATION let xml = new System.Xml.XmlDocument() xml.Load(xmlname); - if System.String.Compare(xml.GetElementsByTagName("summary").Item(0).FirstChild.Value, System.Environment.NewLine ^ " I'm an xml comment!" ^ System.Environment.NewLine) = 0 then 0 else 1 + if System.String.Compare(xml.GetElementsByTagName("summary").Item(0).FirstChild.Value, System.Environment.NewLine + " I'm an xml comment!" + System.Environment.NewLine) = 0 then 0 else 1 #else 0 #endif diff --git a/tests/fsharpqa/Source/test.lst b/tests/fsharpqa/Source/test.lst index d4301fedb94..67199ab1137 100644 --- a/tests/fsharpqa/Source/test.lst +++ b/tests/fsharpqa/Source/test.lst @@ -14,6 +14,7 @@ CodeGen01,NoMT,CodeGen CodeGen\EmittedIL\DoNotBoxStruct CodeGen01,NoMT,CodeGen CodeGen\EmittedIL\GeneratedIterators CodeGen01,NoMT,CodeGen CodeGen\EmittedIL\InequalityComparison CodeGen01,NoMT,CodeGen CodeGen\EmittedIL\ListExpressionStepping +CodeGen01,NoMT,CodeGen CodeGen\EmittedIL\LiteralValue CodeGen01,NoMT,CodeGen CodeGen\EmittedIL\MethodImplAttribute CodeGen01,NoMT,CodeGen CodeGen\EmittedIL\Misc CodeGen01,NoMT,CodeGen CodeGen\EmittedIL\Mutation @@ -68,7 +69,6 @@ CompilerOptions01,NoMT CompilerOptions\fsi\times CompilerOptions02,NoMT CompilerOptions\fsi\exename CompilerOptions01,NoMT,Determinism CompilerOptions\fsc\determinism - Conformance01 Conformance\BasicGrammarElements\Constants Conformance01 Conformance\BasicGrammarElements\OperatorNames Conformance01 Conformance\BasicGrammarElements\PrecedenceAndOperators @@ -89,6 +89,7 @@ Conformance01 Conformance\DeclarationElements\AccessibilityAnnotations\OnOverr Conformance01 Conformance\DeclarationElements\AccessibilityAnnotations\OnTypeMembers Conformance01 Conformance\DeclarationElements\AccessibilityAnnotations\PermittedLocations Conformance01 Conformance\DeclarationElements\CustomAttributes\ArgumentsOfAllTypes +Conformance01 Conformance\DeclarationElements\CustomAttributes\AttributeInheritance Conformance02 Conformance\DeclarationElements\CustomAttributes\AttributeUsage Conformance02 Conformance\DeclarationElements\CustomAttributes\Basic @@ -226,6 +227,7 @@ Conformance08 Conformance\Signatures\SignatureConformance Conformance08 Conformance\Signatures\SignatureTypes Conformance08 Conformance\SpecialAttributesAndTypes\Imported\System.ThreadStatic Conformance08 Conformance\SpecialAttributesAndTypes\Imported\CallerInfo +Conformance08 Conformance\StructFieldEqualityComparison Conformance08 Conformance\TypesAndTypeConstraints\CheckingSyntacticTypes Conformance08 Conformance\TypesAndTypeConstraints\LogicalPropertiesOfTypes Conformance08 Conformance\TypesAndTypeConstraints\TypeConstraints diff --git a/tests/fsharpqa/fsharpqafiles.csproj b/tests/fsharpqa/fsharpqafiles.csproj new file mode 100644 index 00000000000..d014c7a3096 --- /dev/null +++ b/tests/fsharpqa/fsharpqafiles.csproj @@ -0,0 +1,16 @@ + + + + {AAAAD274-696A-49EC-AAAA-F870BE91AAAA} + v4.6.2 + + + + + + + + + + + \ No newline at end of file diff --git a/tests/fsharpqa/readme.md b/tests/fsharpqa/readme.md new file mode 100644 index 00000000000..88bda09b363 --- /dev/null +++ b/tests/fsharpqa/readme.md @@ -0,0 +1,34 @@ +# F# QA Tests + +## Layout description + +### Source/test.lst + +This file is the entry point in the test discovery system of F# QA suite. + +About the format: +* lines starting with `#` are considered as comments, +* each entry is defined in a single line +* elements within entry are tab delimited +** first element is a comma separated list of tags classifying the tests of that entry +** last element is the folder containing the tests +* each of the entries' folder have a `env.lst` file listing individual tests + +### env.lst + +(TODO, describe the format) + +## Workflow when adding or fixing tests + +You can use [run.fsharpqa.test.fsx](run.fsharpqa.test.fsx) script, and edit the end of it to specify which classifying tag you are working with. Evaluating the script should run the relevant tests. + +A convenience "fsharpqafiles.csproj" project is located in the fsharp.sln solution, the only purpose is to facillitate navigation to test files that frequently need to be edited from within the IDE/text editor environment. + +* edit Source/test.lst, find the entry you like to work with and give it a unique tag (e.g. "RERUN") +* within the suite, if you are only interested about a specific test, you can comment lines in `env.lst` files by prepending those with `#` +* adjust [run.fsharpqa.test.fsx](run.fsharpqa.test.fsx) and evaluate it +* open `../TestResults/runpl.log` which should contain failures or be empty (in which cases, your tests are passing). +* adjust the tests and repeat from step 2 + +(TODO, provide some guidance about how to define env.lst files) + diff --git a/tests/fsharpqa/run.fsharpqa.test.fsx b/tests/fsharpqa/run.fsharpqa.test.fsx new file mode 100644 index 00000000000..101e41f7a2d --- /dev/null +++ b/tests/fsharpqa/run.fsharpqa.test.fsx @@ -0,0 +1,46 @@ +// Work In Progress +// this script helps run a subset of the fsharpqa tests without calling a full build.cmd + +open System.IO +open System.Diagnostics + +let releaseOrDebug = "Debug" +let setEnvVar name value = + System.Environment.SetEnvironmentVariable(name, value) + +let addToPath path = + let currentPath = System.Environment.GetEnvironmentVariable "PATH" + + let splits = currentPath.Split(Path.PathSeparator) + if not(Array.contains path splits) then + setEnvVar "PATH" (path + (string Path.PathSeparator) + currentPath) + +let rootFolder = Path.Combine(__SOURCE_DIRECTORY__, "..", "..") +let compilerBinFolder = Path.Combine(rootFolder, releaseOrDebug, "net40", "bin") +setEnvVar "CSC_PIPE" (Path.Combine(rootFolder, "packages", "Microsoft.Net.Compilers.2.7.0", "tools", "csc.exe")) +setEnvVar "FSC" (Path.Combine(compilerBinFolder, "fsc.exe")) +setEnvVar "FSCOREDLLPATH" (Path.Combine(compilerBinFolder, "FSharp.Core.dll")) +addToPath compilerBinFolder + +let runPerl arguments = + // a bit expeditive, but does the deed + Process.GetProcessesByName("perl") |> Array.iter (fun p -> p.Kill()) + use perlProcess = new Process() + perlProcess.StartInfo.set_FileName (Path.Combine(rootFolder, "packages", "StrawberryPerl64.5.22.2.1", "Tools", "perl", "bin", "perl.exe")) + perlProcess.StartInfo.set_Arguments (arguments |> Array.map(fun a -> @"""" + a + @"""") |> String.concat " ") + perlProcess.StartInfo.set_WorkingDirectory (Path.Combine(rootFolder, "tests", "fsharpqa", "source")) + perlProcess.StartInfo.set_RedirectStandardOutput true + perlProcess.StartInfo.set_RedirectStandardError true + perlProcess.StartInfo.set_UseShellExecute false + perlProcess.Start() |> ignore + while (not perlProcess.StandardOutput.EndOfStream) do + perlProcess.StandardOutput.ReadLine() |> printfn "%s" + while (not perlProcess.StandardError.EndOfStream) do + perlProcess.StandardError.ReadLine() |> printfn "%s" + perlProcess.WaitForExit() + if perlProcess.ExitCode <> 0 then + failwithf "exit code: %i" perlProcess.ExitCode + +let testResultDir = Path.Combine(rootFolder, "tests", "TestResults") +let perlScript = Path.Combine(rootFolder, "tests", "fsharpqa", "testenv", "bin", "runall.pl") +runPerl [|perlScript; "-resultsroot";testResultDir ;"-ttags:Conformance06"|] \ No newline at end of file diff --git a/tests/fsharpqa/testenv/src/AssemblyVersionCheck/AssemblyVersionCheck.fsx b/tests/fsharpqa/testenv/src/AssemblyVersionCheck/AssemblyVersionCheck.fsx new file mode 100644 index 00000000000..8554c7b46d2 --- /dev/null +++ b/tests/fsharpqa/testenv/src/AssemblyVersionCheck/AssemblyVersionCheck.fsx @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +// this was restored by packages.config in the root +#r @"..\..\..\..\..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll" + +open System +open System.Diagnostics +open System.IO +open System.Reflection +open System.Text.RegularExpressions +open Newtonsoft.Json.Linq + +module AssemblyVersionCheck = + + let private versionZero = Version(0, 0, 0, 0) + let private commitHashPattern = new Regex(@"Commit Hash: ()|([0-9a-fA-F]{40})", RegexOptions.Compiled) + + let verifyAssemblyVersions (signToolData:string) (binariesPath:string) = + let json = File.ReadAllText(signToolData) + let jobject = JObject.Parse(json) + + // could either contain things like 'net40\bin\FSharp.Core.dll' or patterns like 'net40\bin\*\FSharp.Core.resources.dll' + let assemblyPatterns = + (jobject.["sign"] :?> JArray) + |> Seq.map (fun a -> (a :?> JObject).["values"] :?> JArray) + |> Seq.map (fun a -> a :> seq) + |> Seq.collect (fun t -> t) + |> Seq.map (fun t -> t.ToString()) + |> Seq.filter (fun p -> p.EndsWith(".dll") || p.EndsWith(".exe")) // only check assemblies + + // map the assembly patterns to actual files on disk + let actualAssemblies = + assemblyPatterns + |> Seq.map (fun a -> + if not (a.Contains("*")) then + [a] // just a raw file name + else + let parts = a.Split([|'\\'|]) + let mutable candidatePaths = [binariesPath] + for p in parts do + match p with + | "*" -> + // expand all candidates into multiples + let expansions = + candidatePaths + |> List.filter Directory.Exists + |> List.map (Directory.EnumerateDirectories >> Seq.toList) + |> List.collect (fun x -> x) + candidatePaths <- expansions + | _ -> + // regular path part, just append it to all candidates + candidatePaths <- List.map (fun d -> Path.Combine(d, p)) candidatePaths + candidatePaths) + |> Seq.collect (fun a -> a) + |> Seq.map (fun a -> Path.Combine(binariesPath, a)) + |> Seq.filter (fun p -> File.Exists(p)) // not all test runs produce all files + |> Seq.toList + + // verify that all assemblies have a version number other than 0.0.0.0 + let failedVersionCheck = + actualAssemblies + |> List.filter (fun a -> + let assemblyVersion = AssemblyName.GetAssemblyName(a).Version + printfn "Checking version: %s (%A)" a assemblyVersion + assemblyVersion = versionZero) + if failedVersionCheck.Length > 0 then + printfn "The following assemblies had a version of %A" versionZero + printfn "%s\r\n" <| String.Join("\r\n", failedVersionCheck) + + // verify that all assemblies have a commit hash + let failedCommitHash = + actualAssemblies + |> List.filter (fun a -> + let fileProductVersion = FileVersionInfo.GetVersionInfo(a).ProductVersion + printfn "Checking commit hash: %s (%s)" a fileProductVersion + not <| commitHashPattern.IsMatch(fileProductVersion)) + if failedCommitHash.Length > 0 then + printfn "The following assemblies don't have a commit hash set" + printfn "%s\r\n" <| String.Join("\r\n", failedCommitHash) + + // return code is the number of failures + failedVersionCheck.Length + failedCommitHash.Length + +let main (argv:string array) = + if argv.Length <> 2 then + printfn "Usage: fsi.exe AssemblyVersionCheck.fsx -- SignToolData.json path/to/binaries" + 1 + else + AssemblyVersionCheck.verifyAssemblyVersions argv.[0] argv.[1] + +Environment.GetCommandLineArgs() +|> Seq.skipWhile ((<>) "--") +|> Seq.skip 1 +|> Array.ofSeq +|> main diff --git a/tests/fsharpqa/testenv/src/HostedCompilerServer/App.config b/tests/fsharpqa/testenv/src/HostedCompilerServer/App.config index 885af92830a..ab88e62ffc5 100644 --- a/tests/fsharpqa/testenv/src/HostedCompilerServer/App.config +++ b/tests/fsharpqa/testenv/src/HostedCompilerServer/App.config @@ -13,7 +13,7 @@ - + diff --git a/tests/fsharpqa/testenv/src/HostedCompilerServer/HostedCompilerServer.fsproj b/tests/fsharpqa/testenv/src/HostedCompilerServer/HostedCompilerServer.fsproj index c03e0df50f0..1a79ff36d5b 100644 --- a/tests/fsharpqa/testenv/src/HostedCompilerServer/HostedCompilerServer.fsproj +++ b/tests/fsharpqa/testenv/src/HostedCompilerServer/HostedCompilerServer.fsproj @@ -12,7 +12,7 @@ Exe HostedCompilerServer HostedCompilerServer - v4.5 + v4.6 true ..\..\bin true @@ -50,7 +50,7 @@ FSharp.Compiler.Private - $(FSharpSourcesRoot)\..\packages\System.ValueTuple.4.3.1\lib\netstandard1.0\System.ValueTuple.dll + $(FSharpSourcesRoot)\..\packages\System.ValueTuple.$(SystemValueTuplePackageVersion)\lib\netstandard1.0\System.ValueTuple.dll true diff --git a/tests/projects/Sample_NETCoreSDK_FSharp_Library_netstandard1.6/Sample_NETCoreSDK_FSharp_Library_netstandard1.6.fsproj b/tests/projects/Sample_NETCoreSDK_FSharp_Library_netstandard1.6/Sample_NETCoreSDK_FSharp_Library_netstandard1.6.fsproj index aba132e319d..abac283cf0c 100644 --- a/tests/projects/Sample_NETCoreSDK_FSharp_Library_netstandard1.6/Sample_NETCoreSDK_FSharp_Library_netstandard1.6.fsproj +++ b/tests/projects/Sample_NETCoreSDK_FSharp_Library_netstandard1.6/Sample_NETCoreSDK_FSharp_Library_netstandard1.6.fsproj @@ -1,13 +1,9 @@ - + netstandard1.6 - portable + - - - - \ No newline at end of file diff --git a/tests/projects/Sample_NETCoreSDK_FSharp_Library_netstandard2_0/Library1.fs b/tests/projects/Sample_NETCoreSDK_FSharp_Library_netstandard2_0/Library1.fs new file mode 100644 index 00000000000..0eba466d884 --- /dev/null +++ b/tests/projects/Sample_NETCoreSDK_FSharp_Library_netstandard2_0/Library1.fs @@ -0,0 +1,4 @@ +namespace Sample_NETCoreSDK_FSharp_Library_netstandard2_0 + +type Class1() = + member this.X = "F#" diff --git a/tests/projects/Sample_NETCoreSDK_FSharp_Library_netstandard2_0/Sample_NETCoreSDK_FSharp_Library_netstandard2_0.fsproj b/tests/projects/Sample_NETCoreSDK_FSharp_Library_netstandard2_0/Sample_NETCoreSDK_FSharp_Library_netstandard2_0.fsproj new file mode 100644 index 00000000000..926080b65b5 --- /dev/null +++ b/tests/projects/Sample_NETCoreSDK_FSharp_Library_netstandard2_0/Sample_NETCoreSDK_FSharp_Library_netstandard2_0.fsproj @@ -0,0 +1,8 @@ + + + netstandard2.0 + + + + + \ No newline at end of file diff --git a/tests/projects/Sample_VS2012_FSharp_ConsoleApp_net40/Sample_VS2012_FSharp_ConsoleApp_net40/Sample_VS2012_FSharp_ConsoleApp_net40.fsproj b/tests/projects/Sample_VS2012_FSharp_ConsoleApp_net40/Sample_VS2012_FSharp_ConsoleApp_net40/Sample_VS2012_FSharp_ConsoleApp_net40.fsproj index 4eddaeffb86..bc17dde6120 100644 --- a/tests/projects/Sample_VS2012_FSharp_ConsoleApp_net40/Sample_VS2012_FSharp_ConsoleApp_net40/Sample_VS2012_FSharp_ConsoleApp_net40.fsproj +++ b/tests/projects/Sample_VS2012_FSharp_ConsoleApp_net40/Sample_VS2012_FSharp_ConsoleApp_net40/Sample_VS2012_FSharp_ConsoleApp_net40.fsproj @@ -43,7 +43,7 @@ - ..\..\..\packages\Microsoft.Portable.FSharp.Core.4.1.20\lib\profiles\portable-net45+sl5+netcore45\FSharp.Core.dll + ..\..\..\packages\Microsoft.Portable.FSharp.Core.10.1.0\lib\profiles\portable-net45+sl5+netcore45\FSharp.Core.dll diff --git a/tests/projects/Sample_VS2012_FSharp_ConsoleApp_net40_upgraded_VS2013/Sample_VS2012_FSharp_ConsoleApp_net40_upgraded_VS2013/Sample_VS2012_FSharp_ConsoleApp_net40_upgraded_VS2013.fsproj b/tests/projects/Sample_VS2012_FSharp_ConsoleApp_net40_upgraded_VS2013/Sample_VS2012_FSharp_ConsoleApp_net40_upgraded_VS2013/Sample_VS2012_FSharp_ConsoleApp_net40_upgraded_VS2013.fsproj index 0c174af62d5..bc7a0ed88b5 100644 --- a/tests/projects/Sample_VS2012_FSharp_ConsoleApp_net40_upgraded_VS2013/Sample_VS2012_FSharp_ConsoleApp_net40_upgraded_VS2013/Sample_VS2012_FSharp_ConsoleApp_net40_upgraded_VS2013.fsproj +++ b/tests/projects/Sample_VS2012_FSharp_ConsoleApp_net40_upgraded_VS2013/Sample_VS2012_FSharp_ConsoleApp_net40_upgraded_VS2013/Sample_VS2012_FSharp_ConsoleApp_net40_upgraded_VS2013.fsproj @@ -43,7 +43,7 @@ - ..\..\..\packages\Microsoft.Portable.FSharp.Core.4.1.20\lib\profiles\portable-net45+sl5+netcore45\FSharp.Core.dll + ..\..\..\packages\Microsoft.Portable.FSharp.Core.10.1.0\lib\profiles\portable-net45+sl5+netcore45\FSharp.Core.dll diff --git a/tests/projects/Sample_VS2012_FSharp_Portable_Library/Sample_VS2012_FSharp_Portable_Library.fsproj b/tests/projects/Sample_VS2012_FSharp_Portable_Library/Sample_VS2012_FSharp_Portable_Library.fsproj index 921365806dd..9c27d79cb85 100644 --- a/tests/projects/Sample_VS2012_FSharp_Portable_Library/Sample_VS2012_FSharp_Portable_Library.fsproj +++ b/tests/projects/Sample_VS2012_FSharp_Portable_Library/Sample_VS2012_FSharp_Portable_Library.fsproj @@ -36,7 +36,7 @@ FSharp.Core FSharp.Core.dll - ..\..\..\packages\Microsoft.Portable.FSharp.Core.4.1.20\lib\profiles\portable-net45+sl5+netcore45\FSharp.Core.dll + ..\..\..\packages\Microsoft.Portable.FSharp.Core.10.1.0\lib\profiles\portable-net45+sl5+netcore45\FSharp.Core.dll diff --git a/tests/projects/Sample_VS2012_FSharp_Portable_Library_upgraded_2013/Sample_VS2012_FSharp_Portable_Library_upgraded_2013.fsproj b/tests/projects/Sample_VS2012_FSharp_Portable_Library_upgraded_2013/Sample_VS2012_FSharp_Portable_Library_upgraded_2013.fsproj index 75b8b871bdb..56d6c2b9cfe 100644 --- a/tests/projects/Sample_VS2012_FSharp_Portable_Library_upgraded_2013/Sample_VS2012_FSharp_Portable_Library_upgraded_2013.fsproj +++ b/tests/projects/Sample_VS2012_FSharp_Portable_Library_upgraded_2013/Sample_VS2012_FSharp_Portable_Library_upgraded_2013.fsproj @@ -35,7 +35,7 @@ - ..\..\..\packages\Microsoft.Portable.FSharp.Core.4.1.20\lib\profiles\portable-net45+sl5+netcore45\FSharp.Core.dll + ..\..\..\packages\Microsoft.Portable.FSharp.Core.10.1.0\lib\profiles\portable-net45+sl5+netcore45\FSharp.Core.dll True diff --git a/tests/projects/Sample_VS2013_FSharp_Portable_Library_Legacy_net40/Sample_VS2013_FSharp_Portable_Library_Legacy_net40.fsproj b/tests/projects/Sample_VS2013_FSharp_Portable_Library_Legacy_net40/Sample_VS2013_FSharp_Portable_Library_Legacy_net40.fsproj index 727a28f6d82..7774a0a2c1f 100644 --- a/tests/projects/Sample_VS2013_FSharp_Portable_Library_Legacy_net40/Sample_VS2013_FSharp_Portable_Library_Legacy_net40.fsproj +++ b/tests/projects/Sample_VS2013_FSharp_Portable_Library_Legacy_net40/Sample_VS2013_FSharp_Portable_Library_Legacy_net40.fsproj @@ -37,7 +37,7 @@ FSharp.Core FSharp.Core.dll - ..\..\..\packages\Microsoft.Portable.FSharp.Core.4.1.20\lib\profiles\portable-net45+sl5+netcore45\FSharp.Core.dll + ..\..\..\packages\Microsoft.Portable.FSharp.Core.10.1.0\lib\profiles\portable-net45+sl5+netcore45\FSharp.Core.dll diff --git a/tests/projects/Sample_VS2013_FSharp_Portable_Library_Legacy_net45/Sample_VS2013_FSharp_Portable_Library_Legacy_net45.fsproj b/tests/projects/Sample_VS2013_FSharp_Portable_Library_Legacy_net45/Sample_VS2013_FSharp_Portable_Library_Legacy_net45.fsproj index 77e65fa263b..906473f386f 100644 --- a/tests/projects/Sample_VS2013_FSharp_Portable_Library_Legacy_net45/Sample_VS2013_FSharp_Portable_Library_Legacy_net45.fsproj +++ b/tests/projects/Sample_VS2013_FSharp_Portable_Library_Legacy_net45/Sample_VS2013_FSharp_Portable_Library_Legacy_net45.fsproj @@ -37,7 +37,7 @@ FSharp.Core FSharp.Core.dll - ..\..\..\packages\Microsoft.Portable.FSharp.Core.4.1.20\lib\profiles\portable-net45+sl5+netcore45\FSharp.Core.dll + ..\..\..\packages\Microsoft.Portable.FSharp.Core.10.1.0\lib\profiles\portable-net45+sl5+netcore45\FSharp.Core.dll diff --git a/tests/projects/Sample_VS2013_FSharp_Portable_Library_Legacy_net451/Sample_VS2013_FSharp_Portable_Library_Legacy_net451.fsproj b/tests/projects/Sample_VS2013_FSharp_Portable_Library_Legacy_net451/Sample_VS2013_FSharp_Portable_Library_Legacy_net451.fsproj index 4fc3681cb3c..68d22cdc7ef 100644 --- a/tests/projects/Sample_VS2013_FSharp_Portable_Library_Legacy_net451/Sample_VS2013_FSharp_Portable_Library_Legacy_net451.fsproj +++ b/tests/projects/Sample_VS2013_FSharp_Portable_Library_Legacy_net451/Sample_VS2013_FSharp_Portable_Library_Legacy_net451.fsproj @@ -37,7 +37,7 @@ FSharp.Core FSharp.Core.dll - ..\..\..\packages\Microsoft.Portable.FSharp.Core.4.1.20\lib\profiles\portable-net45+sl5+netcore45\FSharp.Core.dll + ..\..\..\packages\Microsoft.Portable.FSharp.Core.10.1.0\lib\profiles\portable-net45+sl5+netcore45\FSharp.Core.dll diff --git a/tests/projects/Sample_VS2013_FSharp_Portable_Library_net45/Sample_VS2013_FSharp_Portable_Library_net45.fsproj b/tests/projects/Sample_VS2013_FSharp_Portable_Library_net45/Sample_VS2013_FSharp_Portable_Library_net45.fsproj index 5ee9437dc1d..c55b136d487 100644 --- a/tests/projects/Sample_VS2013_FSharp_Portable_Library_net45/Sample_VS2013_FSharp_Portable_Library_net45.fsproj +++ b/tests/projects/Sample_VS2013_FSharp_Portable_Library_net45/Sample_VS2013_FSharp_Portable_Library_net45.fsproj @@ -38,7 +38,7 @@ FSharp.Core FSharp.Core.dll - ..\..\..\packages\Microsoft.Portable.FSharp.Core.4.1.20\lib\profiles\portable-net45+netcore45\FSharp.Core.dll + ..\..\..\packages\Microsoft.Portable.FSharp.Core.10.1.0\lib\profiles\portable-net45+netcore45\FSharp.Core.dll diff --git a/tests/projects/Sample_VS2013_FSharp_Portable_Library_net451/Sample_VS2013_FSharp_Portable_Library_net451.fsproj b/tests/projects/Sample_VS2013_FSharp_Portable_Library_net451/Sample_VS2013_FSharp_Portable_Library_net451.fsproj index 2bd99050294..04ed727eea2 100644 --- a/tests/projects/Sample_VS2013_FSharp_Portable_Library_net451/Sample_VS2013_FSharp_Portable_Library_net451.fsproj +++ b/tests/projects/Sample_VS2013_FSharp_Portable_Library_net451/Sample_VS2013_FSharp_Portable_Library_net451.fsproj @@ -38,7 +38,7 @@ FSharp.Core FSharp.Core.dll - ..\..\..\packages\Microsoft.Portable.FSharp.Core.4.1.20\lib\profiles\portable-net45+netcore45\FSharp.Core.dll + ..\..\..\packages\Microsoft.Portable.FSharp.Core.10.1.0\lib\profiles\portable-net45+netcore45\FSharp.Core.dll diff --git a/tests/projects/Sample_VS2013_FSharp_Portable_Library_net451_adjusted_to_profile259/Sample_VS2013_FSharp_Portable_Library_net451.fsproj b/tests/projects/Sample_VS2013_FSharp_Portable_Library_net451_adjusted_to_profile259/Sample_VS2013_FSharp_Portable_Library_net451.fsproj index 84cd51e7175..c1db72928d7 100644 --- a/tests/projects/Sample_VS2013_FSharp_Portable_Library_net451_adjusted_to_profile259/Sample_VS2013_FSharp_Portable_Library_net451.fsproj +++ b/tests/projects/Sample_VS2013_FSharp_Portable_Library_net451_adjusted_to_profile259/Sample_VS2013_FSharp_Portable_Library_net451.fsproj @@ -38,7 +38,7 @@ FSharp.Core FSharp.Core.dll - ..\..\..\packages\Microsoft.Portable.FSharp.Core.4.1.20\lib\profiles\portable-net45+netcore45+wpa81+wp8\FSharp.Core.dll + ..\..\..\packages\Microsoft.Portable.FSharp.Core.10.1.0\lib\profiles\portable-net45+netcore45+wpa81+wp8\FSharp.Core.dll diff --git a/tests/projects/Sample_VS2013_FSharp_Portable_Library_net451_adjusted_to_profile78/Sample_VS2013_FSharp_Portable_Library_net451.fsproj b/tests/projects/Sample_VS2013_FSharp_Portable_Library_net451_adjusted_to_profile78/Sample_VS2013_FSharp_Portable_Library_net451.fsproj index 960a7f5a332..58174f27f47 100644 --- a/tests/projects/Sample_VS2013_FSharp_Portable_Library_net451_adjusted_to_profile78/Sample_VS2013_FSharp_Portable_Library_net451.fsproj +++ b/tests/projects/Sample_VS2013_FSharp_Portable_Library_net451_adjusted_to_profile78/Sample_VS2013_FSharp_Portable_Library_net451.fsproj @@ -38,7 +38,7 @@ FSharp.Core FSharp.Core.dll - ..\..\..\packages\Microsoft.Portable.FSharp.Core.4.1.20\lib\profiles\portable-net45+netcore45+wp8\FSharp.Core.dll + ..\..\..\packages\Microsoft.Portable.FSharp.Core.10.1.0\lib\profiles\portable-net45+netcore45+wp8\FSharp.Core.dll diff --git a/tests/projects/Sample_VS2015_FSharp_Portable259_Library/Sample_VS2015_FSharp_Portable259_Library.fsproj b/tests/projects/Sample_VS2015_FSharp_Portable259_Library/Sample_VS2015_FSharp_Portable259_Library.fsproj index 3860254ff7f..313b99560d0 100644 --- a/tests/projects/Sample_VS2015_FSharp_Portable259_Library/Sample_VS2015_FSharp_Portable259_Library.fsproj +++ b/tests/projects/Sample_VS2015_FSharp_Portable259_Library/Sample_VS2015_FSharp_Portable259_Library.fsproj @@ -39,7 +39,7 @@ FSharp.Core FSharp.Core.dll - ..\..\..\packages\Microsoft.Portable.FSharp.Core.4.1.20\lib\profiles\portable-net45+netcore45+wpa81+wp8\FSharp.Core.dll + ..\..\..\packages\Microsoft.Portable.FSharp.Core.10.1.0\lib\profiles\portable-net45+netcore45+wpa81+wp8\FSharp.Core.dll diff --git a/tests/projects/Sample_VS2015_FSharp_Portable47_Library/Sample_VS2015_FSharp_Portable47_Library.fsproj b/tests/projects/Sample_VS2015_FSharp_Portable47_Library/Sample_VS2015_FSharp_Portable47_Library.fsproj index 2497d03f00b..1c7684916c3 100644 --- a/tests/projects/Sample_VS2015_FSharp_Portable47_Library/Sample_VS2015_FSharp_Portable47_Library.fsproj +++ b/tests/projects/Sample_VS2015_FSharp_Portable47_Library/Sample_VS2015_FSharp_Portable47_Library.fsproj @@ -38,7 +38,7 @@ FSharp.Core FSharp.Core.dll - ..\..\..\packages\Microsoft.Portable.FSharp.Core.4.1.20\lib\profiles\portable-net45+sl5+netcore45\FSharp.Core.dll + ..\..\..\packages\Microsoft.Portable.FSharp.Core.10.1.0\lib\profiles\portable-net45+sl5+netcore45\FSharp.Core.dll diff --git a/tests/projects/Sample_VS2015_FSharp_Portable78_Library/Sample_VS2015_FSharp_Portable78_Library.fsproj b/tests/projects/Sample_VS2015_FSharp_Portable78_Library/Sample_VS2015_FSharp_Portable78_Library.fsproj index 7741d5f5b3b..5040c8b8b45 100644 --- a/tests/projects/Sample_VS2015_FSharp_Portable78_Library/Sample_VS2015_FSharp_Portable78_Library.fsproj +++ b/tests/projects/Sample_VS2015_FSharp_Portable78_Library/Sample_VS2015_FSharp_Portable78_Library.fsproj @@ -39,7 +39,7 @@ FSharp.Core FSharp.Core.dll - ..\..\..\packages\Microsoft.Portable.FSharp.Core.4.1.20\lib\profiles\portable-net45+netcore45+wp8\FSharp.Core.dll + ..\..\..\packages\Microsoft.Portable.FSharp.Core.10.1.0\lib\profiles\portable-net45+netcore45+wp8\FSharp.Core.dll diff --git a/tests/projects/Sample_VS2015_FSharp_Portable7_Library/Sample_VS2015_FSharp_Portable7_Library.fsproj b/tests/projects/Sample_VS2015_FSharp_Portable7_Library/Sample_VS2015_FSharp_Portable7_Library.fsproj index 8ebe0160da4..c3566afa245 100644 --- a/tests/projects/Sample_VS2015_FSharp_Portable7_Library/Sample_VS2015_FSharp_Portable7_Library.fsproj +++ b/tests/projects/Sample_VS2015_FSharp_Portable7_Library/Sample_VS2015_FSharp_Portable7_Library.fsproj @@ -39,7 +39,7 @@ FSharp.Core FSharp.Core.dll - ..\..\..\packages\Microsoft.Portable.FSharp.Core.4.1.20\lib\profiles\portable-net45+netcore45+wpa81+wp8\FSharp.Core.dll + ..\..\..\packages\Microsoft.Portable.FSharp.Core.10.1.0\lib\profiles\portable-net45+netcore45+wpa81+wp8\FSharp.Core.dll diff --git a/tests/projects/misc/ProjectWithBuildErrors/ProjectWithBuildErrors/ProjectWithBuildErrors.fsproj b/tests/projects/misc/ProjectWithBuildErrors/ProjectWithBuildErrors/ProjectWithBuildErrors.fsproj index 8a07b574594..43aa06b77c7 100644 --- a/tests/projects/misc/ProjectWithBuildErrors/ProjectWithBuildErrors/ProjectWithBuildErrors.fsproj +++ b/tests/projects/misc/ProjectWithBuildErrors/ProjectWithBuildErrors/ProjectWithBuildErrors.fsproj @@ -70,7 +70,7 @@ - ..\packages\System.ValueTuple.4.3.1\lib\netstandard1.0\System.ValueTuple.dll + ..\packages\System.ValueTuple.4.4.0\lib\netstandard1.0\System.ValueTuple.dll decls = %A" decls |> Seq.exists (fun d -> d.Head.Symbol.DisplayName = "abc") |> shouldEqual true @@ -374,7 +366,7 @@ type Test() = let file = "/home/user/Test.fsx" let parseResult, typeCheckResults = parseAndCheckScript(file, input) - let decls = typeCheckResults.GetDeclarationListSymbols(Some parseResult, 4, inputLines.[3], PartialLongName.Empty(21), fun _ -> false)|> Async.RunSynchronously + let decls = typeCheckResults.GetDeclarationListSymbols(Some parseResult, 4, inputLines.[3], PartialLongName.Empty(21), (fun () -> []), fun _ -> false)|> Async.RunSynchronously //decls |> List.map (fun d -> d.Head.Symbol.DisplayName) |> printfn "---> decls = %A" decls |> Seq.exists (fun d -> d.Head.Symbol.DisplayName = "abc") |> shouldEqual true @@ -391,7 +383,7 @@ type Test() = let file = "/home/user/Test.fsx" let parseResult, typeCheckResults = parseAndCheckScript(file, input) - let decls = typeCheckResults.GetDeclarationListSymbols(Some parseResult, 4, inputLines.[3], PartialLongName.Empty(14), fun _ -> false)|> Async.RunSynchronously + let decls = typeCheckResults.GetDeclarationListSymbols(Some parseResult, 4, inputLines.[3], PartialLongName.Empty(14), (fun () -> []), fun _ -> false)|> Async.RunSynchronously //decls |> List.map (fun d -> d.Head.Symbol.DisplayName) |> printfn "---> decls = %A" decls |> Seq.exists (fun d -> d.Head.Symbol.DisplayName = "abc") |> shouldEqual true @@ -547,26 +539,25 @@ let _ = arr.[..number2] let r = su.RangeAlternate su.Symbol.ToString(), (r.StartLine, r.StartColumn, r.EndLine, r.EndColumn)) |> shouldEqual - [|("val arr", (2, 4, 2, 7)); - ("val number2", (3, 13, 3, 20)); - ("val number1", (3, 4, 3, 11)); - ("val arr", (4, 8, 4, 11)); - ("OperatorIntrinsics", (4, 11, 4, 12)); - ("Operators", (4, 11, 4, 12)); - ("Core", (4, 11, 4, 12)); - ("FSharp", (4, 11, 4, 12)); - ("Microsoft", (4, 11, 4, 12)); - ("val number1", (4, 16, 4, 23)); - ("val arr", (5, 8, 5, 11)); - ("OperatorIntrinsics", (5, 11, 5, 12)); - ("Operators", (5, 11, 5, 12)); - ("Core", (5, 11, 5, 12)); - ("FSharp", (5, 11, 5, 12)); - ("Microsoft", (5, 11, 5, 12)); - ("val number2", (5, 15, 5, 22)); + [|("val arr", (2, 4, 2, 7)) + ("val number2", (3, 13, 3, 20)) + ("val number1", (3, 4, 3, 11)) + ("val arr", (4, 8, 4, 11)) + ("Microsoft", (4, 11, 4, 12)) + ("OperatorIntrinsics", (4, 11, 4, 12)) + ("Operators", (4, 11, 4, 12)) + ("Core", (4, 11, 4, 12)) + ("FSharp", (4, 11, 4, 12)) + ("val number1", (4, 16, 4, 23)) + ("val arr", (5, 8, 5, 11)) + ("Microsoft", (5, 11, 5, 12)) + ("OperatorIntrinsics", (5, 11, 5, 12)) + ("Operators", (5, 11, 5, 12)) + ("Core", (5, 11, 5, 12)) + ("FSharp", (5, 11, 5, 12)) + ("val number2", (5, 15, 5, 22)) ("Test", (1, 0, 1, 0))|] - [] let ``Enums should have fields`` () = let input = """ @@ -583,7 +574,8 @@ let test3 = System.Text.RegularExpressions.RegexOptions.Compiled |> Array.choose(fun s -> match s.Symbol with :? FSharpEntity as e when e.IsEnum -> Some e | _ -> None) |> Array.distinct |> Array.map(fun e -> (e.DisplayName, e.FSharpFields - |> Seq.map(fun f -> f.Name, f.LiteralValue ) + |> Seq.sortBy (fun f -> match f.LiteralValue with None -> -1 | Some x -> unbox x) + |> Seq.map (fun f -> f.Name, f.LiteralValue) |> Seq.toList)) enums |> shouldEqual @@ -746,6 +738,329 @@ let x: T() ("val x", (4, 4, 4, 5), false) ("Test", (1, 0, 1, 0), false)|] +[] +let ``ValidateBreakpointLocation tests A`` () = + let input = + """ +let f x = + let y = z + 1 + y + y + )""" + let file = "/home/user/Test.fsx" + let parseResult, typeCheckResults = parseAndCheckScript(file, input) + let lines = input.Replace("\r", "").Split( [| '\n' |]) + let positions = [ for (i,line) in Seq.indexed lines do for (j, c) in Seq.indexed line do yield Range.mkPos (Range.Line.fromZ i) j, line ] + let results = [ for pos, line in positions do + match parseResult.ValidateBreakpointLocation pos with + | Some r -> yield ((line, pos.Line, pos.Column), (r.StartLine, r.StartColumn, r.EndLine, r.EndColumn)) + | None -> ()] + results |> shouldEqual + [((" let y = z + 1", 3, 0), (3, 4, 3, 17)); + ((" let y = z + 1", 3, 1), (3, 4, 4, 9)); + ((" let y = z + 1", 3, 2), (3, 4, 4, 9)); + ((" let y = z + 1", 3, 3), (3, 4, 4, 9)); + ((" let y = z + 1", 3, 4), (3, 4, 3, 17)); + ((" let y = z + 1", 3, 5), (3, 4, 3, 17)); + ((" let y = z + 1", 3, 6), (3, 4, 3, 17)); + ((" let y = z + 1", 3, 7), (3, 4, 3, 17)); + ((" let y = z + 1", 3, 8), (3, 4, 3, 17)); + ((" let y = z + 1", 3, 9), (3, 4, 3, 17)); + ((" let y = z + 1", 3, 10), (3, 4, 3, 17)); + ((" let y = z + 1", 3, 11), (3, 4, 3, 17)); + ((" let y = z + 1", 3, 12), (3, 4, 3, 17)); + ((" let y = z + 1", 3, 13), (3, 4, 3, 17)); + ((" let y = z + 1", 3, 14), (3, 4, 3, 17)); + ((" let y = z + 1", 3, 15), (3, 4, 3, 17)); + ((" let y = z + 1", 3, 16), (3, 4, 3, 17)); + ((" y + y", 4, 0), (4, 4, 4, 9)); ((" y + y", 4, 1), (3, 4, 4, 9)); + ((" y + y", 4, 2), (3, 4, 4, 9)); ((" y + y", 4, 3), (3, 4, 4, 9)); + ((" y + y", 4, 4), (4, 4, 4, 9)); ((" y + y", 4, 5), (4, 4, 4, 9)); + ((" y + y", 4, 6), (4, 4, 4, 9)); ((" y + y", 4, 7), (4, 4, 4, 9)); + ((" y + y", 4, 8), (4, 4, 4, 9))] + + +[] +let ``ValidateBreakpointLocation tests for object expressions`` () = +// fsi.PrintLength <- 1000 + let input = + """ +type IFoo = + abstract member Foo: int -> int + +type FooBase(foo:IFoo) = + do () + +type FooImpl() = + inherit FooBase + ( + { + new IFoo with + member this.Foo x = + let y = x * x + z + } + )""" + let file = "/home/user/Test.fsx" + let parseResult, typeCheckResults = parseAndCheckScript(file, input) + let lines = input.Replace("\r", "").Split( [| '\n' |]) + let positions = [ for (i,line) in Seq.indexed lines do for (j, c) in Seq.indexed line do yield Range.mkPos (Range.Line.fromZ i) j, line ] + let results = [ for pos, line in positions do + match parseResult.ValidateBreakpointLocation pos with + | Some r -> yield ((line, pos.Line, pos.Column), (r.StartLine, r.StartColumn, r.EndLine, r.EndColumn)) + | None -> ()] + results |> shouldEqual + [(("type FooBase(foo:IFoo) =", 5, 5), (5, 5, 5, 12)); + (("type FooBase(foo:IFoo) =", 5, 6), (5, 5, 5, 12)); + (("type FooBase(foo:IFoo) =", 5, 7), (5, 5, 5, 12)); + (("type FooBase(foo:IFoo) =", 5, 8), (5, 5, 5, 12)); + (("type FooBase(foo:IFoo) =", 5, 9), (5, 5, 5, 12)); + (("type FooBase(foo:IFoo) =", 5, 10), (5, 5, 5, 12)); + (("type FooBase(foo:IFoo) =", 5, 11), (5, 5, 5, 12)); + (("type FooBase(foo:IFoo) =", 5, 12), (5, 5, 5, 12)); + ((" do ()", 6, 4), (6, 7, 6, 9)); ((" do ()", 6, 5), (6, 7, 6, 9)); + ((" do ()", 6, 6), (6, 7, 6, 9)); ((" do ()", 6, 7), (6, 7, 6, 9)); + ((" do ()", 6, 8), (6, 7, 6, 9)); + (("type FooImpl() =", 8, 5), (8, 5, 8, 12)); + (("type FooImpl() =", 8, 6), (8, 5, 8, 12)); + (("type FooImpl() =", 8, 7), (8, 5, 8, 12)); + (("type FooImpl() =", 8, 8), (8, 5, 8, 12)); + (("type FooImpl() =", 8, 9), (8, 5, 8, 12)); + (("type FooImpl() =", 8, 10), (8, 5, 8, 12)); + (("type FooImpl() =", 8, 11), (8, 5, 8, 12)); + (("type FooImpl() =", 8, 12), (8, 5, 8, 12)); + ((" inherit FooBase", 9, 4), (9, 4, 17, 9)); + ((" inherit FooBase", 9, 5), (9, 4, 17, 9)); + ((" inherit FooBase", 9, 6), (9, 4, 17, 9)); + ((" inherit FooBase", 9, 7), (9, 4, 17, 9)); + ((" inherit FooBase", 9, 8), (9, 4, 17, 9)); + ((" inherit FooBase", 9, 9), (9, 4, 17, 9)); + ((" inherit FooBase", 9, 10), (9, 4, 17, 9)); + ((" inherit FooBase", 9, 11), (9, 4, 17, 9)); + ((" inherit FooBase", 9, 12), (9, 4, 17, 9)); + ((" inherit FooBase", 9, 13), (9, 4, 17, 9)); + ((" inherit FooBase", 9, 14), (9, 4, 17, 9)); + ((" inherit FooBase", 9, 15), (9, 4, 17, 9)); + ((" inherit FooBase", 9, 16), (9, 4, 17, 9)); + ((" inherit FooBase", 9, 17), (9, 4, 17, 9)); + ((" inherit FooBase", 9, 18), (9, 4, 17, 9)); + ((" (", 10, 0), (9, 4, 17, 9)); + ((" (", 10, 1), (9, 4, 17, 9)); + ((" (", 10, 2), (9, 4, 17, 9)); + ((" (", 10, 3), (9, 4, 17, 9)); + ((" (", 10, 4), (9, 4, 17, 9)); + ((" (", 10, 5), (9, 4, 17, 9)); + ((" (", 10, 6), (9, 4, 17, 9)); + ((" (", 10, 7), (9, 4, 17, 9)); + ((" (", 10, 8), (10, 8, 17, 9)); + ((" {", 11, 0), (10, 8, 17, 9)); + ((" {", 11, 1), (10, 8, 17, 9)); + ((" {", 11, 2), (10, 8, 17, 9)); + ((" {", 11, 3), (10, 8, 17, 9)); + ((" {", 11, 4), (10, 8, 17, 9)); + ((" {", 11, 5), (10, 8, 17, 9)); + ((" {", 11, 6), (10, 8, 17, 9)); + ((" {", 11, 7), (10, 8, 17, 9)); + ((" {", 11, 8), (10, 8, 17, 9)); + ((" {", 11, 9), (10, 8, 17, 9)); + ((" {", 11, 10), (10, 8, 17, 9)); + ((" {", 11, 11), (10, 8, 17, 9)); + ((" {", 11, 12), (10, 8, 17, 9)); + ((" new IFoo with", 12, 0), (10, 8, 17, 9)); + ((" new IFoo with", 12, 1), (10, 8, 17, 9)); + ((" new IFoo with", 12, 2), (10, 8, 17, 9)); + ((" new IFoo with", 12, 3), (10, 8, 17, 9)); + ((" new IFoo with", 12, 4), (10, 8, 17, 9)); + ((" new IFoo with", 12, 5), (10, 8, 17, 9)); + ((" new IFoo with", 12, 6), (10, 8, 17, 9)); + ((" new IFoo with", 12, 7), (10, 8, 17, 9)); + ((" new IFoo with", 12, 8), (10, 8, 17, 9)); + ((" new IFoo with", 12, 9), (10, 8, 17, 9)); + ((" new IFoo with", 12, 10), (10, 8, 17, 9)); + ((" new IFoo with", 12, 11), (10, 8, 17, 9)); + ((" new IFoo with", 12, 12), (10, 8, 17, 9)); + ((" new IFoo with", 12, 13), (10, 8, 17, 9)); + ((" new IFoo with", 12, 14), (10, 8, 17, 9)); + ((" new IFoo with", 12, 15), (10, 8, 17, 9)); + ((" new IFoo with", 12, 16), (10, 8, 17, 9)); + ((" new IFoo with", 12, 17), (10, 8, 17, 9)); + ((" new IFoo with", 12, 18), (10, 8, 17, 9)); + ((" new IFoo with", 12, 19), (10, 8, 17, 9)); + ((" new IFoo with", 12, 20), (10, 8, 17, 9)); + ((" new IFoo with", 12, 21), (10, 8, 17, 9)); + ((" new IFoo with", 12, 22), (10, 8, 17, 9)); + ((" new IFoo with", 12, 23), (10, 8, 17, 9)); + ((" new IFoo with", 12, 24), (10, 8, 17, 9)); + ((" new IFoo with", 12, 25), (10, 8, 17, 9)); + ((" new IFoo with", 12, 26), (10, 8, 17, 9)); + ((" new IFoo with", 12, 27), (10, 8, 17, 9)); + ((" new IFoo with", 12, 28), (10, 8, 17, 9)); + ((" member this.Foo x =", 13, 0), (10, 8, 17, 9)); + ((" member this.Foo x =", 13, 1), (10, 8, 17, 9)); + ((" member this.Foo x =", 13, 2), (10, 8, 17, 9)); + ((" member this.Foo x =", 13, 3), (10, 8, 17, 9)); + ((" member this.Foo x =", 13, 4), (10, 8, 17, 9)); + ((" member this.Foo x =", 13, 5), (10, 8, 17, 9)); + ((" member this.Foo x =", 13, 6), (10, 8, 17, 9)); + ((" member this.Foo x =", 13, 7), (10, 8, 17, 9)); + ((" member this.Foo x =", 13, 8), (10, 8, 17, 9)); + ((" member this.Foo x =", 13, 9), (10, 8, 17, 9)); + ((" member this.Foo x =", 13, 10), (10, 8, 17, 9)); + ((" member this.Foo x =", 13, 11), (10, 8, 17, 9)); + ((" member this.Foo x =", 13, 12), (10, 8, 17, 9)); + ((" member this.Foo x =", 13, 13), (10, 8, 17, 9)); + ((" member this.Foo x =", 13, 14), (10, 8, 17, 9)); + ((" member this.Foo x =", 13, 15), (10, 8, 17, 9)); + ((" member this.Foo x =", 13, 16), (10, 8, 17, 9)); + ((" member this.Foo x =", 13, 17), (10, 8, 17, 9)); + ((" member this.Foo x =", 13, 18), (10, 8, 17, 9)); + ((" member this.Foo x =", 13, 19), (10, 8, 17, 9)); + ((" member this.Foo x =", 13, 20), (10, 8, 17, 9)); + ((" member this.Foo x =", 13, 21), (10, 8, 17, 9)); + ((" member this.Foo x =", 13, 22), (10, 8, 17, 9)); + ((" member this.Foo x =", 13, 23), (10, 8, 17, 9)); + ((" member this.Foo x =", 13, 24), (10, 8, 17, 9)); + ((" member this.Foo x =", 13, 25), (10, 8, 17, 9)); + ((" member this.Foo x =", 13, 26), (10, 8, 17, 9)); + ((" member this.Foo x =", 13, 27), (10, 8, 17, 9)); + ((" member this.Foo x =", 13, 28), (10, 8, 17, 9)); + ((" member this.Foo x =", 13, 29), (10, 8, 17, 9)); + ((" member this.Foo x =", 13, 30), (10, 8, 17, 9)); + ((" member this.Foo x =", 13, 31), (10, 8, 17, 9)); + ((" member this.Foo x =", 13, 32), (10, 8, 17, 9)); + ((" member this.Foo x =", 13, 33), (10, 8, 17, 9)); + ((" member this.Foo x =", 13, 34), (10, 8, 17, 9)); + ((" member this.Foo x =", 13, 35), (10, 8, 17, 9)); + ((" member this.Foo x =", 13, 36), (10, 8, 17, 9)); + ((" member this.Foo x =", 13, 37), (10, 8, 17, 9)); + ((" member this.Foo x =", 13, 38), (10, 8, 17, 9)); + ((" let y = x * x", 14, 0), (14, 24, 14, 37)); + ((" let y = x * x", 14, 1), (10, 8, 17, 9)); + ((" let y = x * x", 14, 2), (10, 8, 17, 9)); + ((" let y = x * x", 14, 3), (10, 8, 17, 9)); + ((" let y = x * x", 14, 4), (10, 8, 17, 9)); + ((" let y = x * x", 14, 5), (10, 8, 17, 9)); + ((" let y = x * x", 14, 6), (10, 8, 17, 9)); + ((" let y = x * x", 14, 7), (10, 8, 17, 9)); + ((" let y = x * x", 14, 8), (10, 8, 17, 9)); + ((" let y = x * x", 14, 9), (10, 8, 17, 9)); + ((" let y = x * x", 14, 10), (10, 8, 17, 9)); + ((" let y = x * x", 14, 11), (10, 8, 17, 9)); + ((" let y = x * x", 14, 12), (10, 8, 17, 9)); + ((" let y = x * x", 14, 13), (10, 8, 17, 9)); + ((" let y = x * x", 14, 14), (10, 8, 17, 9)); + ((" let y = x * x", 14, 15), (10, 8, 17, 9)); + ((" let y = x * x", 14, 16), (10, 8, 17, 9)); + ((" let y = x * x", 14, 17), (10, 8, 17, 9)); + ((" let y = x * x", 14, 18), (10, 8, 17, 9)); + ((" let y = x * x", 14, 19), (10, 8, 17, 9)); + ((" let y = x * x", 14, 20), (10, 8, 17, 9)); + ((" let y = x * x", 14, 21), (10, 8, 17, 9)); + ((" let y = x * x", 14, 22), (10, 8, 17, 9)); + ((" let y = x * x", 14, 23), (10, 8, 17, 9)); + ((" let y = x * x", 14, 24), (14, 24, 14, 37)); + ((" let y = x * x", 14, 25), (14, 24, 14, 37)); + ((" let y = x * x", 14, 26), (14, 24, 14, 37)); + ((" let y = x * x", 14, 27), (14, 24, 14, 37)); + ((" let y = x * x", 14, 28), (14, 24, 14, 37)); + ((" let y = x * x", 14, 29), (14, 24, 14, 37)); + ((" let y = x * x", 14, 30), (14, 24, 14, 37)); + ((" let y = x * x", 14, 31), (14, 24, 14, 37)); + ((" let y = x * x", 14, 32), (14, 24, 14, 37)); + ((" let y = x * x", 14, 33), (14, 24, 14, 37)); + ((" let y = x * x", 14, 34), (14, 24, 14, 37)); + ((" let y = x * x", 14, 35), (14, 24, 14, 37)); + ((" let y = x * x", 14, 36), (14, 24, 14, 37)); + ((" z", 15, 0), (15, 24, 15, 25)); + ((" z", 15, 1), (10, 8, 17, 9)); + ((" z", 15, 2), (10, 8, 17, 9)); + ((" z", 15, 3), (10, 8, 17, 9)); + ((" z", 15, 4), (10, 8, 17, 9)); + ((" z", 15, 5), (10, 8, 17, 9)); + ((" z", 15, 6), (10, 8, 17, 9)); + ((" z", 15, 7), (10, 8, 17, 9)); + ((" z", 15, 8), (10, 8, 17, 9)); + ((" z", 15, 9), (10, 8, 17, 9)); + ((" z", 15, 10), (10, 8, 17, 9)); + ((" z", 15, 11), (10, 8, 17, 9)); + ((" z", 15, 12), (10, 8, 17, 9)); + ((" z", 15, 13), (10, 8, 17, 9)); + ((" z", 15, 14), (10, 8, 17, 9)); + ((" z", 15, 15), (10, 8, 17, 9)); + ((" z", 15, 16), (10, 8, 17, 9)); + ((" z", 15, 17), (10, 8, 17, 9)); + ((" z", 15, 18), (10, 8, 17, 9)); + ((" z", 15, 19), (10, 8, 17, 9)); + ((" z", 15, 20), (10, 8, 17, 9)); + ((" z", 15, 21), (10, 8, 17, 9)); + ((" z", 15, 22), (10, 8, 17, 9)); + ((" z", 15, 23), (10, 8, 17, 9)); + ((" z", 15, 24), (15, 24, 15, 25)); + ((" }", 16, 0), (10, 8, 17, 9)); + ((" }", 16, 1), (10, 8, 17, 9)); + ((" }", 16, 2), (10, 8, 17, 9)); + ((" }", 16, 3), (10, 8, 17, 9)); + ((" }", 16, 4), (10, 8, 17, 9)); + ((" }", 16, 5), (10, 8, 17, 9)); + ((" }", 16, 6), (10, 8, 17, 9)); + ((" }", 16, 7), (10, 8, 17, 9)); + ((" }", 16, 8), (10, 8, 17, 9)); + ((" }", 16, 9), (10, 8, 17, 9)); + ((" }", 16, 10), (10, 8, 17, 9)); + ((" }", 16, 11), (10, 8, 17, 9)); + ((" }", 16, 12), (10, 8, 17, 9)); + ((" )", 17, 0), (10, 8, 17, 9)); + ((" )", 17, 1), (10, 8, 17, 9)); + ((" )", 17, 2), (10, 8, 17, 9)); + ((" )", 17, 3), (10, 8, 17, 9)); + ((" )", 17, 4), (10, 8, 17, 9)); + ((" )", 17, 5), (10, 8, 17, 9)); + ((" )", 17, 6), (10, 8, 17, 9)); + ((" )", 17, 7), (10, 8, 17, 9)); + ((" )", 17, 8), (10, 8, 17, 9))] + +[] +let ``Partially valid namespaces should be reported`` () = + let input = + """ +open System.Threading.Foo +open System + +let _: System.Threading.Tasks.Bar = null +let _ = Threading.Buzz = null +""" + + let file = "/home/user/Test.fsx" + let _, typeCheckResults = parseAndCheckScript(file, input) + typeCheckResults.GetAllUsesOfAllSymbolsInFile() + |> Async.RunSynchronously + |> Array.map (fun su -> + let r = su.RangeAlternate + su.Symbol.ToString(), (r.StartLine, r.StartColumn, r.EndLine, r.EndColumn)) + |> Array.distinct + |> shouldEqual + // note: these "System" sysbol uses are not duplications because each of them corresponts to different namespaces + [|("System", (2, 5, 2, 11)) + ("Threading", (2, 12, 2, 21)) + ("System", (3, 5, 3, 11)) + ("System", (5, 7, 5, 13)) + ("Threading", (5, 14, 5, 23)) + ("Tasks", (5, 24, 5, 29)) + ("val op_Equality", (6, 23, 6, 24)) + ("Threading", (6, 8, 6, 17)) + ("Test", (1, 0, 1, 0))|] + +[] +let ``GetDeclarationLocation should not require physical file`` () = + let input = "let abc = 1\nlet xyz = abc" + let file = "/home/user/Test.fsx" + let _, typeCheckResults = parseAndCheckScript(file, input) + let location = typeCheckResults.GetDeclarationLocation(2, 13, "let xyz = abc", ["abc"]) |> Async.RunSynchronously + match location with + | FSharpFindDeclResult.DeclFound r -> Some (r.StartLine, r.StartColumn, r.EndLine, r.EndColumn, "<=== Found here." ) + | _ -> Some (0 , 0 , 0 , 0 , "Not Found. Should not require physical file." ) + |> shouldEqual (Some (1 , 4 , 1 , 7 , "<=== Found here." )) + + //------------------------------------------------------------------------------- @@ -934,3 +1249,34 @@ let ``Test TPProject param info`` () = ``Basic cancellation test`` () ``Intro test`` () #endif + +[] +let ``FSharpField.IsNameGenerated`` () = + let checkFields source = + let file = "/home/user/Test.fsx" + let _, typeCheckResults = parseAndCheckScript(file, source) + let symbols = + typeCheckResults.GetAllUsesOfAllSymbolsInFile() + |> Async.RunSynchronously + symbols + |> Array.choose (fun su -> + match su.Symbol with + | :? FSharpEntity as entity -> Some entity.FSharpFields + | :? FSharpUnionCase as unionCase -> Some unionCase.UnionCaseFields + | _ -> None) + |> Seq.concat + |> Seq.map (fun (field: FSharpField) -> field.Name, field.IsNameGenerated) + |> List.ofSeq + + ["exception E of string", ["Data0", true] + "exception E of Data0: string", ["Data0", false] + "exception E of Name: string", ["Name", false] + "exception E of string * Data2: string * Data1: string * Name: string * Data4: string", + ["Data0", true; "Data2", false; "Data1", false; "Name", false; "Data4", false] + + "type U = Case of string", ["Item", true] + "type U = Case of Item: string", ["Item", false] + "type U = Case of Name: string", ["Name", false] + "type U = Case of string * Item2: string * string * Name: string", + ["Item1", true; "Item2", false; "Item3", true; "Name", false]] + |> List.iter (fun (source, expected) -> checkFields source |> shouldEqual expected) diff --git a/tests/service/ExprTests.fs b/tests/service/ExprTests.fs index bf955c5aa63..3e2df86ca5e 100644 --- a/tests/service/ExprTests.fs +++ b/tests/service/ExprTests.fs @@ -1,7 +1,7 @@  #if INTERACTIVE -#r "../../Debug/fcs/net45/FSharp.Compiler.Service.dll" // note, run 'build fcs debug' to generate this, this DLL has a public API so can be used from F# Interactive -#r "../../Debug/net40/bin/FSharp.Compiler.Service.ProjectCracker.dll" +#r "../../debug/fcs/net45/FSharp.Compiler.Service.dll" // note, run 'build fcs debug' to generate this, this DLL has a public API so can be used from F# Interactive +#r "../../debug/fcs/net45/FSharp.Compiler.Service.ProjectCracker.dll" #r "../../packages/NUnit.3.5.0/lib/net45/nunit.framework.dll" #load "FsUnit.fs" #load "Common.fs" @@ -32,7 +32,7 @@ module internal Utils = | BasicPatterns.Application(f,tyargs,args) -> quote low (printExpr 10 f + printTyargs tyargs + " " + printCurriedArgs args) | BasicPatterns.BaseValue(_) -> "base" | BasicPatterns.Call(Some obj,v,tyargs1,tyargs2,argsL) -> printObjOpt (Some obj) + v.CompiledName + printTyargs tyargs2 + printTupledArgs argsL - | BasicPatterns.Call(None,v,tyargs1,tyargs2,argsL) -> v.EnclosingEntity.Value.CompiledName + printTyargs tyargs1 + "." + v.CompiledName + printTyargs tyargs2 + " " + printTupledArgs argsL + | BasicPatterns.Call(None,v,tyargs1,tyargs2,argsL) -> v.DeclaringEntity.Value.CompiledName + printTyargs tyargs1 + "." + v.CompiledName + printTyargs tyargs2 + " " + printTupledArgs argsL | BasicPatterns.Coerce(ty1,e1) -> quote low (printExpr 10 e1 + " :> " + printTy ty1) | BasicPatterns.DefaultValue(ty1) -> "dflt" | BasicPatterns.FastIntegerForLoop _ -> "for-loop" @@ -45,7 +45,7 @@ module internal Utils = | BasicPatterns.LetRec(vse,b) -> "let rec ... in " + printExpr 0 b | BasicPatterns.NewArray(ty,es) -> "[|" + (es |> Seq.map (printExpr 0) |> String.concat "; ") + "|]" | BasicPatterns.NewDelegate(ty,es) -> "new-delegate" - | BasicPatterns.NewObject(v,tys,args) -> "new " + v.EnclosingEntity.Value.CompiledName + printTupledArgs args + | BasicPatterns.NewObject(v,tys,args) -> "new " + v.DeclaringEntity.Value.CompiledName + printTupledArgs args | BasicPatterns.NewRecord(v,args) -> let fields = v.TypeDefinition.FSharpFields "{" + ((fields, args) ||> Seq.map2 (fun f a -> f.Name + " = " + printExpr 0 a) |> String.concat "; ") + "}" @@ -96,6 +96,33 @@ module internal Utils = and printIimpls iis = String.concat ";" (List.map printImlementation iis) and printImlementation (i, ors) = "interface " + printTy i + " with " + printOverrides ors + let rec printFSharpDecls prefix decls = + seq { + let mutable i = 0 + for decl in decls do + i <- i + 1 + match decl with + | FSharpImplementationFileDeclaration.Entity (e, sub) -> + yield sprintf "%s%i) ENTITY: %s %A" prefix i e.CompiledName (attribsOfSymbol e) + if not (Seq.isEmpty e.Attributes) then + yield sprintf "%sattributes: %A" prefix (Seq.toList e.Attributes) + if not (Seq.isEmpty e.DeclaredInterfaces) then + yield sprintf "%sinterfaces: %A" prefix (Seq.toList e.DeclaredInterfaces) + yield "" + yield! printFSharpDecls (prefix + "\t") sub + | FSharpImplementationFileDeclaration.MemberOrFunctionOrValue (meth, args, body) -> + yield sprintf "%s%i) METHOD: %s %A" prefix i meth.CompiledName (attribsOfSymbol meth) + yield sprintf "%stype: %A" prefix meth.FullType + yield sprintf "%sargs: %A" prefix args + // if not meth.IsCompilerGenerated then + yield sprintf "%sbody: %A" prefix body + yield "" + | FSharpImplementationFileDeclaration.InitAction (expr) -> + yield sprintf "%s%i) ACTION" prefix i + yield sprintf "%s%A" prefix expr + yield "" + } + let rec printDeclaration (excludes:HashSet<_> option) (d: FSharpImplementationFileDeclaration) = seq { match d with @@ -156,7 +183,7 @@ module internal Utils = let printGenericParameter (p: FSharpGenericParameter) = let name = - if p.Name.StartsWith "?" then "_" + if p.Name.StartsWith("?", StringComparison.Ordinal) then "_" elif p.IsSolveAtCompileTime then "^" + p.Name else "'" + p.Name let constraints = @@ -283,7 +310,7 @@ let localGenericFunctionExample() = let funcEx1 (x:int) = x let genericFuncEx1 (x:'T) = x let (topPair1a, topPair1b) = (1,2) -let tyfuncEx1<'T> = typeof<'T> + let testILCall1 = new obj() let testILCall2 = System.Console.WriteLine("176") @@ -316,7 +343,7 @@ type ClassWithImplicitConstructor(compiledAsArg: int) = member __.M2() = compiledAsInstanceMethod() static member SM1() = compiledAsStaticField + compiledAsGenericStaticMethod compiledAsStaticField static member SM2() = compiledAsStaticMethod() - override __.ToString() = base.ToString() + string 999 + //override __.ToString() = base.ToString() + string 999 member this.TestCallinToString() = this.ToString() exception Error of int * int @@ -360,7 +387,7 @@ let v = c.InstanceProperty System.Console.WriteLine("777") // do a top-levl action let functionWithSubmsumption(x:obj) = x :?> string -let functionWithCoercion(x:string) = (x :> obj) :?> string |> functionWithSubmsumption |> functionWithSubmsumption +//let functionWithCoercion(x:string) = (x :> obj) :?> string |> functionWithSubmsumption |> functionWithSubmsumption type MultiArgMethods(c:int,d:int) = member x.Method(a:int, b : int) = 1 @@ -370,14 +397,14 @@ let testFunctionThatCallsMultiArgMethods() = let m = MultiArgMethods(3,4) (m.Method(7,8) + m.CurriedMethod (9,10) (11,12)) -let functionThatUsesObjectExpression() = - { new obj() with member x.ToString() = string 888 } - -let functionThatUsesObjectExpressionWithInterfaceImpl() = - { new obj() with - member x.ToString() = string 888 - interface System.IComparable with - member x.CompareTo(y:obj) = 0 } +//let functionThatUsesObjectExpression() = +// { new obj() with member x.ToString() = string 888 } +// +//let functionThatUsesObjectExpressionWithInterfaceImpl() = +// { new obj() with +// member x.ToString() = string 888 +// interface System.IComparable with +// member x.CompareTo(y:obj) = 0 } let testFunctionThatUsesUnitsOfMeasure (x : float<_>) (y: float<_>) = x + y @@ -517,20 +544,89 @@ module N type IntAbbrev = int - let bool2 = false +let testHashChar (x:char) = hash x +let testHashSByte (x:sbyte) = hash x +let testHashInt16 (x:int16) = hash x +let testHashInt64 (x:int64) = hash x +let testHashUInt64 (x:uint64) = hash x +let testHashIntPtr (x:nativeint) = hash x +let testHashUIntPtr (x:unativeint) = hash x + +let testHashString (x:string) = hash x +let testTypeOf (x:'T) = typeof<'T> + """ + File.WriteAllText(fileName2, fileSource2) let fileNames = [fileName1; fileName2] let args = mkProjectCommandLineArgs (dllName, fileNames) let options = checker.GetProjectOptionsFromCommandLineArgs (projFileName, args) + let operatorTests = """ +module OperatorTests{0} + +let test{0}EqualsOperator (e1:{1}) (e2:{1}) = (=) e1 e2 +let test{0}NotEqualsOperator (e1:{1}) (e2:{1}) = (<>) e1 e2 +let test{0}LessThanOperator (e1:{1}) (e2:{1}) = (<) e1 e2 +let test{0}LessThanOrEqualsOperator (e1:{1}) (e2:{1}) = (<=) e1 e2 +let test{0}GreaterThanOperator (e1:{1}) (e2:{1}) = (>) e1 e2 +let test{0}GreaterThanOrEqualsOperator (e1:{1}) (e2:{1}) = (>=) e1 e2 + +let test{0}AdditionOperator (e1:{1}) (e2:{1}) = (+) e1 e2 +let test{0}SubtractionOperator (e1:{1}) (e2:{1}) = (-) e1 e2 +let test{0}MultiplyOperator (e1:{1}) (e2:{1}) = (*) e1 e2 +let test{0}DivisionOperator (e1:{1}) (e2:{1}) = (/) e1 e2 +let test{0}ModulusOperator (e1:{1}) (e2:{1}) = (%) e1 e2 +let test{0}BitwiseAndOperator (e1:{1}) (e2:{1}) = (&&&) e1 e2 +let test{0}BitwiseOrOperator (e1:{1}) (e2:{1}) = (|||) e1 e2 +let test{0}BitwiseXorOperator (e1:{1}) (e2:{1}) = (^^^) e1 e2 +let test{0}ShiftLeftOperator (e1:{1}) (e2:int) = (<<<) e1 e2 +let test{0}ShiftRightOperator (e1:{1}) (e2:int) = (>>>) e1 e2 + +let test{0}UnaryNegOperator (e1:{1}) = (~-) e1 + +let test{0}AdditionChecked (e1:{1}) (e2:{1}) = Checked.(+) e1 e2 +let test{0}SubtractionChecked (e1:{1}) (e2:{1}) = Checked.(-) e1 e2 +let test{0}MultiplyChecked (e1:{1}) (e2:{1}) = Checked.(*) e1 e2 +let test{0}UnaryNegChecked (e1:{1}) = Checked.(~-) e1 + +let test{0}ToByteChecked (e1:{1}) = Checked.byte e1 +let test{0}ToSByteChecked (e1:{1}) = Checked.sbyte e1 +let test{0}ToInt16Checked (e1:{1}) = Checked.int16 e1 +let test{0}ToUInt16Checked (e1:{1}) = Checked.uint16 e1 +let test{0}ToIntChecked (e1:{1}) = Checked.int e1 +let test{0}ToInt32Checked (e1:{1}) = Checked.int32 e1 +let test{0}ToUInt32Checked (e1:{1}) = Checked.uint32 e1 +let test{0}ToInt64Checked (e1:{1}) = Checked.int64 e1 +let test{0}ToUInt64Checked (e1:{1}) = Checked.uint64 e1 +let test{0}ToIntPtrChecked (e1:{1}) = Checked.nativeint e1 +let test{0}ToUIntPtrChecked (e1:{1}) = Checked.unativeint e1 + +let test{0}ToByteOperator (e1:{1}) = byte e1 +let test{0}ToSByteOperator (e1:{1}) = sbyte e1 +let test{0}ToInt16Operator (e1:{1}) = int16 e1 +let test{0}ToUInt16Operator (e1:{1}) = uint16 e1 +let test{0}ToIntOperator (e1:{1}) = int e1 +let test{0}ToInt32Operator (e1:{1}) = int32 e1 +let test{0}ToUInt32Operator (e1:{1}) = uint32 e1 +let test{0}ToInt64Operator (e1:{1}) = int64 e1 +let test{0}ToUInt64Operator (e1:{1}) = uint64 e1 +let test{0}ToIntPtrOperator (e1:{1}) = nativeint e1 +let test{0}ToUIntPtrOperator (e1:{1}) = unativeint e1 +let test{0}ToSingleOperator (e1:{1}) = float32 e1 +let test{0}ToDoubleOperator (e1:{1}) = float e1 +let test{0}ToDecimalOperator (e1:{1}) = decimal e1 +let test{0}ToCharOperator (e1:{1}) = char e1 +let test{0}ToStringOperator (e1:{1}) = string e1 + +""" + //<@ let x = Some(3) in x.IsSome @> -#if !NO_EXTENSIONTYPING [] -let ``Test Declarations project1`` () = +let ``Test Unoptimized Declarations Project1`` () = let wholeProjectResults = exprChecker.ParseAndCheckProject(Project1.options) |> Async.RunSynchronously for e in wholeProjectResults.Errors do @@ -553,102 +649,1992 @@ let ``Test Declarations project1`` () = s.Replace("ILArrayShape [(Some 0, None)]", "ILArrayShapeFIX") .Replace("ILArrayShape [(Some 0, null)]", "ILArrayShapeFIX")) - let expected = - ["type M"; "type IntAbbrev"; "let boolEx1 = True @ (6,14--6,18)"; - "let intEx1 = 1 @ (7,13--7,14)"; "let int64Ex1 = 1 @ (8,15--8,17)"; - "let tupleEx1 = (1,1) @ (9,16--9,21)"; - "let tupleEx2 = (1,1,1) @ (10,16--10,25)"; - "let tupleEx3 = (1,1,1,1) @ (11,16--11,29)"; - "let localExample = let y: Microsoft.FSharp.Core.int = 1 in let z: Microsoft.FSharp.Core.int = 1 in (y,z) @ (14,7--14,8)"; - "let localGenericFunctionExample(unitVar0) = let y: Microsoft.FSharp.Core.int = 1 in let compiledAsLocalGenericFunction: 'a -> 'a = FUN ... -> fun x -> x in (compiledAsLocalGenericFunction y,compiledAsLocalGenericFunction 1) @ (19,7--19,8)"; - "let funcEx1(x) = x @ (23,23--23,24)"; - "let genericFuncEx1(x) = x @ (24,29--24,30)"; - "let topPair1b = M.patternInput@25 ().Item1 @ (25,4--25,26)"; - "let topPair1a = M.patternInput@25 ().Item0 @ (25,4--25,26)"; - "let tyfuncEx1 = Operators.TypeOf<'T> () @ (26,20--26,26)"; - "let testILCall1 = new Object() @ (27,18--27,27)"; - "let testILCall2 = Console.WriteLine (\"176\") @ (28,18--28,49)"; - "let recValNeverUsedAtRuntime = recValNeverUsedAtRuntime@31.Force(()) @ (31,8--31,32)"; - "let recFuncIgnoresFirstArg(g) (v) = v @ (32,33--32,34)"; - "let testFun4(unitVar0) = let rec ... in recValNeverUsedAtRuntime @ (36,4--39,28)"; - "type ClassWithImplicitConstructor"; - "member .ctor(compiledAsArg) = (new Object(); (this.compiledAsArg <- compiledAsArg; (this.compiledAsField <- 1; let compiledAsLocal: Microsoft.FSharp.Core.int = 1 in let compiledAsLocal2: Microsoft.FSharp.Core.int = Operators.op_Addition (compiledAsLocal,compiledAsLocal) in ()))) @ (41,5--41,33)"; - "member .cctor(unitVar) = (compiledAsStaticField <- 1; let compiledAsStaticLocal: Microsoft.FSharp.Core.int = 1 in let compiledAsStaticLocal2: Microsoft.FSharp.Core.int = Operators.op_Addition (compiledAsStaticLocal,compiledAsStaticLocal) in ()) @ (49,11--49,40)"; - "member M1(__) (unitVar1) = Operators.op_Addition (Operators.op_Addition (__.compiledAsField,let x: Microsoft.FSharp.Core.int = __.compiledAsField in __.compiledAsGenericInstanceMethod(x)),__.compiledAsArg) @ (55,21--55,102)"; - "member M2(__) (unitVar1) = __.compiledAsInstanceMethod(()) @ (56,21--56,47)"; - "member SM1(unitVar0) = Operators.op_Addition (compiledAsStaticField,let x: Microsoft.FSharp.Core.int = compiledAsStaticField in ClassWithImplicitConstructor.compiledAsGenericStaticMethod (x)) @ (57,26--57,101)"; - "member SM2(unitVar0) = ClassWithImplicitConstructor.compiledAsStaticMethod (()) @ (58,26--58,50)"; - "member ToString(__) (unitVar1) = Operators.op_Addition (base.ToString(),Operators.ToString (999)) @ (59,29--59,57)"; - "member TestCallinToString(this) (unitVar1) = this.ToString() @ (60,39--60,54)"; - "type Error"; "let err = {Data0 = 3; Data1 = 4} @ (64,10--64,20)"; - "let matchOnException(err) = match (if err :? M.Error then $0 else $1) targets ... @ (66,33--66,36)"; - "let upwardForLoop(unitVar0) = let mutable a: Microsoft.FSharp.Core.int = 1 in (for-loop; a) @ (69,16--69,17)"; - "let upwardForLoop2(unitVar0) = let mutable a: Microsoft.FSharp.Core.int = 1 in (for-loop; a) @ (74,16--74,17)"; - "let downwardForLoop(unitVar0) = let mutable a: Microsoft.FSharp.Core.int = 1 in (for-loop; a) @ (79,16--79,17)"; - "let quotationTest1(unitVar0) = quote(Operators.op_Addition (1,1)) @ (83,24--83,35)"; - "let quotationTest2(v) = quote(Operators.op_Addition (ExtraTopLevelOperators.SpliceExpression (v),1)) @ (84,24--84,36)"; - "type RecdType"; "type UnionType"; "type ClassWithEventsAndProperties"; - "member .ctor(unitVar0) = (new Object(); (this.ev <- new FSharpEvent`1(()); ())) @ (89,5--89,33)"; - "member .cctor(unitVar) = (sev <- new FSharpEvent`1(()); ()) @ (91,11--91,35)"; - "member get_InstanceProperty(x) (unitVar1) = (x.ev.Trigger(1); 1) @ (92,32--92,48)"; - "member get_StaticProperty(unitVar0) = (sev.Trigger(1); 1) @ (93,35--93,52)"; - "member get_InstanceEvent(x) (unitVar1) = x.ev.get_Publish(()) @ (94,29--94,39)"; - "member get_StaticEvent(x) (unitVar1) = sev.get_Publish(()) @ (95,27--95,38)"; - "let c = new ClassWithEventsAndProperties(()) @ (97,8--97,38)"; - "let v = M.c ().get_InstanceProperty(()) @ (98,8--98,26)"; - "do Console.WriteLine (\"777\")"; - "let functionWithSubmsumption(x) = IntrinsicFunctions.UnboxGeneric (x) @ (102,40--102,52)"; - "let functionWithCoercion(x) = Operators.op_PipeRight (Operators.op_PipeRight (IntrinsicFunctions.UnboxGeneric (x :> Microsoft.FSharp.Core.obj),fun x -> M.functionWithSubmsumption (x :> Microsoft.FSharp.Core.obj)),fun x -> M.functionWithSubmsumption (x :> Microsoft.FSharp.Core.obj)) @ (103,39--103,116)"; - "type MultiArgMethods"; - "member .ctor(c,d) = (new Object(); ()) @ (105,5--105,20)"; - "member Method(x) (a,b) = 1 @ (106,37--106,38)"; - "member CurriedMethod(x) (a1,b1) (a2,b2) = 1 @ (107,63--107,64)"; - "let testFunctionThatCallsMultiArgMethods(unitVar0) = let m: M.MultiArgMethods = new MultiArgMethods(3,4) in Operators.op_Addition (m.Method(7,8),fun tupledArg -> let arg00: Microsoft.FSharp.Core.int = tupledArg.Item0 in let arg01: Microsoft.FSharp.Core.int = tupledArg.Item1 in fun tupledArg -> let arg10: Microsoft.FSharp.Core.int = tupledArg.Item0 in let arg11: Microsoft.FSharp.Core.int = tupledArg.Item1 in m.CurriedMethod(arg00,arg01,arg10,arg11) (9,10) (11,12)) @ (110,8--110,9)"; - "let functionThatUsesObjectExpression(unitVar0) = { new Object() with member x.ToString(unitVar1) = Operators.ToString (888) } @ (114,3--114,55)"; - "let functionThatUsesObjectExpressionWithInterfaceImpl(unitVar0) = { new Object() with member x.ToString(unitVar1) = Operators.ToString (888) interface System.IComparable with member x.CompareTo(y) = 0 } :> System.IComparable @ (117,3--120,38)"; - "let testFunctionThatUsesUnitsOfMeasure(x) (y) = Operators.op_Addition,Microsoft.FSharp.Core.float<'u>,Microsoft.FSharp.Core.float<'u>> (x,y) @ (122,70--122,75)"; - "let testFunctionThatUsesAddressesAndByrefs(x) = let mutable w: Microsoft.FSharp.Core.int = 4 in let y1: Microsoft.FSharp.Core.byref = x in let y2: Microsoft.FSharp.Core.byref = &w in let arr: Microsoft.FSharp.Core.int Microsoft.FSharp.Core.[] = [|3; 4|] in let r: Microsoft.FSharp.Core.int Microsoft.FSharp.Core.ref = Operators.Ref (3) in let y3: Microsoft.FSharp.Core.byref = [I_ldelema (NormalAddress,false,ILArrayShape [(Some 0, None)],TypeVar 0us)](arr,0) in let y4: Microsoft.FSharp.Core.byref = &r.contents in let z: Microsoft.FSharp.Core.int = Operators.op_Addition (Operators.op_Addition (Operators.op_Addition (x,y1),y2),y3) in (w <- 3; (x <- 4; (y2 <- 4; (y3 <- 5; Operators.op_Addition (Operators.op_Addition (Operators.op_Addition (Operators.op_Addition (Operators.op_Addition (Operators.op_Addition (Operators.op_Addition (z,x),y1),y2),y3),y4),IntrinsicFunctions.GetArray (arr,0)),r.contents))))) @ (125,16--125,17)"; - "let testFunctionThatUsesStructs1(dt) = dt.AddDays(3) @ (139,57--139,72)"; - "let testFunctionThatUsesStructs2(unitVar0) = let dt1: System.DateTime = DateTime.get_Now () in let mutable dt2: System.DateTime = DateTime.get_Now () in let dt3: System.TimeSpan = Operators.op_Subtraction (dt1,dt2) in let dt4: System.DateTime = dt1.AddDays(3) in let dt5: Microsoft.FSharp.Core.int = dt1.get_Millisecond() in let dt6: Microsoft.FSharp.Core.byref = &dt2 in let dt7: System.TimeSpan = Operators.op_Subtraction (dt6,dt4) in dt7 @ (142,7--142,10)"; - "let testFunctionThatUsesWhileLoop(unitVar0) = let mutable x: Microsoft.FSharp.Core.int = 1 in (while Operators.op_LessThan (x,100) do x <- Operators.op_Addition (x,1) done; x) @ (152,15--152,16)"; - "let testFunctionThatUsesTryWith(unitVar0) = try M.testFunctionThatUsesWhileLoop (()) with matchValue -> match (if matchValue :? System.ArgumentException then $0 else $1) targets ... @ (158,3--160,60)"; - "let testFunctionThatUsesTryFinally(unitVar0) = try M.testFunctionThatUsesWhileLoop (()) finally Console.WriteLine (\"8888\") @ (164,3--167,37)"; - "member Console.WriteTwoLines.Static(unitVar0) = (Console.WriteLine (); Console.WriteLine ()) @ (170,36--170,90)"; - "member DateTime.get_TwoMinute(x) (unitVar1) = Operators.op_Addition (x.get_Minute(),x.get_Minute()) @ (173,25--173,44)"; - "let testFunctionThatUsesExtensionMembers(unitVar0) = (M.Console.WriteTwoLines.Static (()); let v: Microsoft.FSharp.Core.int = DateTime.get_Now ().DateTime.get_TwoMinute(()) in M.Console.WriteTwoLines.Static (())) @ (176,3--178,33)"; - "let testFunctionThatUsesOptionMembers(unitVar0) = let x: Microsoft.FSharp.Core.int Microsoft.FSharp.Core.option = Some(3) in (x.get_IsSome() (),x.get_IsNone() ()) @ (181,7--181,8)"; - "let testFunctionThatUsesOverAppliedFunction(unitVar0) = Operators.Identity Microsoft.FSharp.Core.int> (fun x -> Operators.Identity (x)) 3 @ (185,3--185,10)"; - "let testFunctionThatUsesPatternMatchingOnLists(x) = match (if x.Isop_ColonColon then (if x.Tail.Isop_ColonColon then (if x.Tail.Tail.Isop_Nil then $2 else $3) else $1) else $0) targets ... @ (188,10--188,11)"; - "let testFunctionThatUsesPatternMatchingOnOptions(x) = match (if x.IsSome then $1 else $0) targets ... @ (195,10--195,11)"; - "let testFunctionThatUsesPatternMatchingOnOptions2(x) = match (if x.IsSome then $1 else $0) targets ... @ (200,10--200,11)"; - "let testFunctionThatUsesConditionalOnOptions2(x) = (if x.get_IsSome() () then 1 else 2) @ (205,4--205,29)"; - "let f(x) (y) = Operators.op_Addition (x,y) @ (207,12--207,15)"; - "let g = let x: Microsoft.FSharp.Core.int = 1 in fun y -> M.f (x,y) @ (208,8--208,11)"; - "let h = Operators.op_Addition (M.g () 2,3) @ (209,8--209,17)"; - "type TestFuncProp"; - "member .ctor(unitVar0) = (new Object(); ()) @ (211,5--211,17)"; - "member get_Id(this) (unitVar1) = fun x -> x @ (212,21--212,31)"; - "let wrong = Operators.op_Equality (new TestFuncProp(()).get_Id(()) 0,0) @ (214,12--214,35)"; - "let start(name) = (name,name) @ (217,4--217,14)"; - "let last(name,values) = Operators.Identity ((name,values)) @ (220,4--220,21)"; - "let last2(name) = Operators.Identity (name) @ (223,4--223,11)"; - "let test7(s) = Operators.op_PipeRight (M.start (s),fun tupledArg -> let name: Microsoft.FSharp.Core.string = tupledArg.Item0 in let values: Microsoft.FSharp.Core.string = tupledArg.Item1 in M.last (name,values)) @ (226,4--226,19)"; - "let test8(unitVar0) = fun tupledArg -> let name: Microsoft.FSharp.Core.string = tupledArg.Item0 in let values: Microsoft.FSharp.Core.string = tupledArg.Item1 in M.last (name,values) @ (229,4--229,8)"; - "let test9(s) = Operators.op_PipeRight ((s,s),fun tupledArg -> let name: Microsoft.FSharp.Core.string = tupledArg.Item0 in let values: Microsoft.FSharp.Core.string = tupledArg.Item1 in M.last (name,values)) @ (232,4--232,17)"; - "let test10(unitVar0) = fun name -> M.last2 (name) @ (235,4--235,9)"; - "let test11(s) = Operators.op_PipeRight (s,fun name -> M.last2 (name)) @ (238,4--238,14)"; - "let badLoop = badLoop@240.Force Microsoft.FSharp.Core.int>(()) @ (240,8--240,15)"; - "type LetLambda"; - "let f = ((); fun a -> fun b -> Operators.op_Addition (a,b)) @ (246,8--247,24)"; - "let letLambdaRes = Operators.op_PipeRight<(Microsoft.FSharp.Core.int * Microsoft.FSharp.Core.int) Microsoft.FSharp.Collections.list,Microsoft.FSharp.Core.int Microsoft.FSharp.Collections.list> (Cons((1,2),Empty()),let mapping: Microsoft.FSharp.Core.int * Microsoft.FSharp.Core.int -> Microsoft.FSharp.Core.int = fun tupledArg -> let a: Microsoft.FSharp.Core.int = tupledArg.Item0 in let b: Microsoft.FSharp.Core.int = tupledArg.Item1 in (LetLambda.f () a) b in fun list -> ListModule.Map (mapping,list)) @ (249,19--249,71)"] + let expected = [ + "type M"; "type IntAbbrev"; "let boolEx1 = True @ (6,14--6,18)"; + "let intEx1 = 1 @ (7,13--7,14)"; "let int64Ex1 = 1 @ (8,15--8,17)"; + "let tupleEx1 = (1,1) @ (9,16--9,21)"; + "let tupleEx2 = (1,1,1) @ (10,16--10,25)"; + "let tupleEx3 = (1,1,1,1) @ (11,16--11,29)"; + "let localExample = let y: Microsoft.FSharp.Core.int = 1 in let z: Microsoft.FSharp.Core.int = 1 in (y,z) @ (14,7--14,8)"; + "let localGenericFunctionExample(unitVar0) = let y: Microsoft.FSharp.Core.int = 1 in let compiledAsLocalGenericFunction: 'a -> 'a = FUN ... -> fun x -> x in (compiledAsLocalGenericFunction y,compiledAsLocalGenericFunction 1) @ (19,7--19,8)"; + "let funcEx1(x) = x @ (23,23--23,24)"; + "let genericFuncEx1(x) = x @ (24,29--24,30)"; + "let topPair1b = M.patternInput@25 ().Item1 @ (25,4--25,26)"; + "let topPair1a = M.patternInput@25 ().Item0 @ (25,4--25,26)"; + "let testILCall1 = new Object() @ (27,18--27,27)"; + "let testILCall2 = Console.WriteLine (\"176\") @ (28,18--28,49)"; + "let recValNeverUsedAtRuntime = recValNeverUsedAtRuntime@31.Force(()) @ (31,8--31,32)"; + "let recFuncIgnoresFirstArg(g) (v) = v @ (32,33--32,34)"; + "let testFun4(unitVar0) = let rec ... in recValNeverUsedAtRuntime @ (36,4--39,28)"; + "type ClassWithImplicitConstructor"; + "member .ctor(compiledAsArg) = (new Object(); (this.compiledAsArg <- compiledAsArg; (this.compiledAsField <- 1; let compiledAsLocal: Microsoft.FSharp.Core.int = 1 in let compiledAsLocal2: Microsoft.FSharp.Core.int = Operators.op_Addition (compiledAsLocal,compiledAsLocal) in ()))) @ (41,5--41,33)"; + "member .cctor(unitVar) = (compiledAsStaticField <- 1; let compiledAsStaticLocal: Microsoft.FSharp.Core.int = 1 in let compiledAsStaticLocal2: Microsoft.FSharp.Core.int = Operators.op_Addition (compiledAsStaticLocal,compiledAsStaticLocal) in ()) @ (49,11--49,40)"; + "member M1(__) (unitVar1) = Operators.op_Addition (Operators.op_Addition (__.compiledAsField,let x: Microsoft.FSharp.Core.int = __.compiledAsField in __.compiledAsGenericInstanceMethod(x)),__.compiledAsArg) @ (55,21--55,102)"; + "member M2(__) (unitVar1) = __.compiledAsInstanceMethod(()) @ (56,21--56,47)"; + "member SM1(unitVar0) = Operators.op_Addition (compiledAsStaticField,let x: Microsoft.FSharp.Core.int = compiledAsStaticField in ClassWithImplicitConstructor.compiledAsGenericStaticMethod (x)) @ (57,26--57,101)"; + "member SM2(unitVar0) = ClassWithImplicitConstructor.compiledAsStaticMethod (()) @ (58,26--58,50)"; + "member TestCallinToString(this) (unitVar1) = this.ToString() @ (60,39--60,54)"; + "type Error"; "let err = {Data0 = 3; Data1 = 4} @ (64,10--64,20)"; + "let matchOnException(err) = match (if err :? M.Error then $0 else $1) targets ... @ (66,33--66,36)"; + "let upwardForLoop(unitVar0) = let mutable a: Microsoft.FSharp.Core.int = 1 in (for-loop; a) @ (69,16--69,17)"; + "let upwardForLoop2(unitVar0) = let mutable a: Microsoft.FSharp.Core.int = 1 in (for-loop; a) @ (74,16--74,17)"; + "let downwardForLoop(unitVar0) = let mutable a: Microsoft.FSharp.Core.int = 1 in (for-loop; a) @ (79,16--79,17)"; + "let quotationTest1(unitVar0) = quote(Operators.op_Addition (1,1)) @ (83,24--83,35)"; + "let quotationTest2(v) = quote(Operators.op_Addition (ExtraTopLevelOperators.SpliceExpression (v),1)) @ (84,24--84,36)"; + "type RecdType"; "type UnionType"; "type ClassWithEventsAndProperties"; + "member .ctor(unitVar0) = (new Object(); (this.ev <- new FSharpEvent`1(()); ())) @ (89,5--89,33)"; + "member .cctor(unitVar) = (sev <- new FSharpEvent`1(()); ()) @ (91,11--91,35)"; + "member get_InstanceProperty(x) (unitVar1) = (x.ev.Trigger(1); 1) @ (92,32--92,48)"; + "member get_StaticProperty(unitVar0) = (sev.Trigger(1); 1) @ (93,35--93,52)"; + "member get_InstanceEvent(x) (unitVar1) = x.ev.get_Publish(()) @ (94,29--94,39)"; + "member get_StaticEvent(x) (unitVar1) = sev.get_Publish(()) @ (95,27--95,38)"; + "let c = new ClassWithEventsAndProperties(()) @ (97,8--97,38)"; + "let v = M.c ().get_InstanceProperty(()) @ (98,8--98,26)"; + "do Console.WriteLine (\"777\")"; + "let functionWithSubmsumption(x) = IntrinsicFunctions.UnboxGeneric (x) @ (102,40--102,52)"; + "type MultiArgMethods"; + "member .ctor(c,d) = (new Object(); ()) @ (105,5--105,20)"; + "member Method(x) (a,b) = 1 @ (106,37--106,38)"; + "member CurriedMethod(x) (a1,b1) (a2,b2) = 1 @ (107,63--107,64)"; + "let testFunctionThatCallsMultiArgMethods(unitVar0) = let m: M.MultiArgMethods = new MultiArgMethods(3,4) in Operators.op_Addition (m.Method(7,8),fun tupledArg -> let arg00: Microsoft.FSharp.Core.int = tupledArg.Item0 in let arg01: Microsoft.FSharp.Core.int = tupledArg.Item1 in fun tupledArg -> let arg10: Microsoft.FSharp.Core.int = tupledArg.Item0 in let arg11: Microsoft.FSharp.Core.int = tupledArg.Item1 in m.CurriedMethod(arg00,arg01,arg10,arg11) (9,10) (11,12)) @ (110,8--110,9)"; + "let testFunctionThatUsesUnitsOfMeasure(x) (y) = Operators.op_Addition,Microsoft.FSharp.Core.float<'u>,Microsoft.FSharp.Core.float<'u>> (x,y) @ (122,70--122,75)"; + "let testFunctionThatUsesAddressesAndByrefs(x) = let mutable w: Microsoft.FSharp.Core.int = 4 in let y1: Microsoft.FSharp.Core.byref = x in let y2: Microsoft.FSharp.Core.byref = &w in let arr: Microsoft.FSharp.Core.int Microsoft.FSharp.Core.[] = [|3; 4|] in let r: Microsoft.FSharp.Core.int Microsoft.FSharp.Core.ref = Operators.Ref (3) in let y3: Microsoft.FSharp.Core.byref = [I_ldelema (NormalAddress,false,ILArrayShapeFIX,!0)](arr,0) in let y4: Microsoft.FSharp.Core.byref = &r.contents in let z: Microsoft.FSharp.Core.int = Operators.op_Addition (Operators.op_Addition (Operators.op_Addition (x,y1),y2),y3) in (w <- 3; (x <- 4; (y2 <- 4; (y3 <- 5; Operators.op_Addition (Operators.op_Addition (Operators.op_Addition (Operators.op_Addition (Operators.op_Addition (Operators.op_Addition (Operators.op_Addition (z,x),y1),y2),y3),y4),IntrinsicFunctions.GetArray (arr,0)),r.contents))))) @ (125,16--125,17)"; + "let testFunctionThatUsesStructs1(dt) = dt.AddDays(3) @ (139,57--139,72)"; + "let testFunctionThatUsesStructs2(unitVar0) = let dt1: System.DateTime = DateTime.get_Now () in let mutable dt2: System.DateTime = DateTime.get_Now () in let dt3: System.TimeSpan = Operators.op_Subtraction (dt1,dt2) in let dt4: System.DateTime = dt1.AddDays(3) in let dt5: Microsoft.FSharp.Core.int = dt1.get_Millisecond() in let dt6: Microsoft.FSharp.Core.byref = &dt2 in let dt7: System.TimeSpan = Operators.op_Subtraction (dt6,dt4) in dt7 @ (142,7--142,10)"; + "let testFunctionThatUsesWhileLoop(unitVar0) = let mutable x: Microsoft.FSharp.Core.int = 1 in (while Operators.op_LessThan (x,100) do x <- Operators.op_Addition (x,1) done; x) @ (152,15--152,16)"; + "let testFunctionThatUsesTryWith(unitVar0) = try M.testFunctionThatUsesWhileLoop (()) with matchValue -> match (if matchValue :? System.ArgumentException then $0 else $1) targets ... @ (158,3--160,60)"; + "let testFunctionThatUsesTryFinally(unitVar0) = try M.testFunctionThatUsesWhileLoop (()) finally Console.WriteLine (\"8888\") @ (164,3--167,37)"; + "member Console.WriteTwoLines.Static(unitVar0) = (Console.WriteLine (); Console.WriteLine ()) @ (170,36--170,90)"; + "member DateTime.get_TwoMinute(x) (unitVar1) = Operators.op_Addition (x.get_Minute(),x.get_Minute()) @ (173,25--173,44)"; + "let testFunctionThatUsesExtensionMembers(unitVar0) = (M.Console.WriteTwoLines.Static (()); let v: Microsoft.FSharp.Core.int = DateTime.get_Now ().DateTime.get_TwoMinute(()) in M.Console.WriteTwoLines.Static (())) @ (176,3--178,33)"; + "let testFunctionThatUsesOptionMembers(unitVar0) = let x: Microsoft.FSharp.Core.int Microsoft.FSharp.Core.option = Some(3) in (x.get_IsSome() (),x.get_IsNone() ()) @ (181,7--181,8)"; + "let testFunctionThatUsesOverAppliedFunction(unitVar0) = Operators.Identity Microsoft.FSharp.Core.int> (fun x -> Operators.Identity (x)) 3 @ (185,3--185,10)"; + "let testFunctionThatUsesPatternMatchingOnLists(x) = match (if x.Isop_ColonColon then (if x.Tail.Isop_ColonColon then (if x.Tail.Tail.Isop_Nil then $2 else $3) else $1) else $0) targets ... @ (188,10--188,11)"; + "let testFunctionThatUsesPatternMatchingOnOptions(x) = match (if x.IsSome then $1 else $0) targets ... @ (195,10--195,11)"; + "let testFunctionThatUsesPatternMatchingOnOptions2(x) = match (if x.IsSome then $1 else $0) targets ... @ (200,10--200,11)"; + "let testFunctionThatUsesConditionalOnOptions2(x) = (if x.get_IsSome() () then 1 else 2) @ (205,4--205,29)"; + "let f(x) (y) = Operators.op_Addition (x,y) @ (207,12--207,15)"; + "let g = let x: Microsoft.FSharp.Core.int = 1 in fun y -> M.f (x,y) @ (208,8--208,11)"; + "let h = Operators.op_Addition (M.g () 2,3) @ (209,8--209,17)"; + "type TestFuncProp"; + "member .ctor(unitVar0) = (new Object(); ()) @ (211,5--211,17)"; + "member get_Id(this) (unitVar1) = fun x -> x @ (212,21--212,31)"; + "let wrong = Operators.op_Equality (new TestFuncProp(()).get_Id(()) 0,0) @ (214,12--214,35)"; + "let start(name) = (name,name) @ (217,4--217,14)"; + "let last(name,values) = Operators.Identity ((name,values)) @ (220,4--220,21)"; + "let last2(name) = Operators.Identity (name) @ (223,4--223,11)"; + "let test7(s) = Operators.op_PipeRight (M.start (s),fun tupledArg -> let name: Microsoft.FSharp.Core.string = tupledArg.Item0 in let values: Microsoft.FSharp.Core.string = tupledArg.Item1 in M.last (name,values)) @ (226,4--226,19)"; + "let test8(unitVar0) = fun tupledArg -> let name: Microsoft.FSharp.Core.string = tupledArg.Item0 in let values: Microsoft.FSharp.Core.string = tupledArg.Item1 in M.last (name,values) @ (229,4--229,8)"; + "let test9(s) = Operators.op_PipeRight ((s,s),fun tupledArg -> let name: Microsoft.FSharp.Core.string = tupledArg.Item0 in let values: Microsoft.FSharp.Core.string = tupledArg.Item1 in M.last (name,values)) @ (232,4--232,17)"; + "let test10(unitVar0) = fun name -> M.last2 (name) @ (235,4--235,9)"; + "let test11(s) = Operators.op_PipeRight (s,fun name -> M.last2 (name)) @ (238,4--238,14)"; + "let badLoop = badLoop@240.Force Microsoft.FSharp.Core.int>(()) @ (240,8--240,15)"; + "type LetLambda"; + "let f = ((); fun a -> fun b -> Operators.op_Addition (a,b)) @ (246,8--247,24)"; + "let letLambdaRes = Operators.op_PipeRight<(Microsoft.FSharp.Core.int * Microsoft.FSharp.Core.int) Microsoft.FSharp.Collections.list,Microsoft.FSharp.Core.int Microsoft.FSharp.Collections.list> (Cons((1,2),Empty()),let mapping: Microsoft.FSharp.Core.int * Microsoft.FSharp.Core.int -> Microsoft.FSharp.Core.int = fun tupledArg -> let a: Microsoft.FSharp.Core.int = tupledArg.Item0 in let b: Microsoft.FSharp.Core.int = tupledArg.Item1 in (LetLambda.f () a) b in fun list -> ListModule.Map (mapping,list)) @ (249,19--249,71)"; + ] + + let expected2 = [ + "type N"; "type IntAbbrev"; "let bool2 = False @ (6,12--6,17)"; + "let testHashChar(x) = Operators.Hash (x) @ (8,28--8,34)"; + "let testHashSByte(x) = Operators.Hash (x) @ (9,30--9,36)"; + "let testHashInt16(x) = Operators.Hash (x) @ (10,30--10,36)"; + "let testHashInt64(x) = Operators.Hash (x) @ (11,30--11,36)"; + "let testHashUInt64(x) = Operators.Hash (x) @ (12,32--12,38)"; + "let testHashIntPtr(x) = Operators.Hash (x) @ (13,35--13,41)"; + "let testHashUIntPtr(x) = Operators.Hash (x) @ (14,37--14,43)"; + "let testHashString(x) = Operators.Hash (x) @ (16,32--16,38)"; + "let testTypeOf(x) = Operators.TypeOf<'T> () @ (17,24--17,30)"; + ] printDeclarations None (List.ofSeq file1.Declarations) |> Seq.toList |> filterHack |> shouldEqual (filterHack expected) + printDeclarations None (List.ofSeq file2.Declarations) + |> Seq.toList + |> filterHack + |> shouldEqual (filterHack expected2) + () -#endif + + +[] +//#if NETCOREAPP2_0 +//[] +//#endif +let ``Test Optimized Declarations Project1`` () = + let wholeProjectResults = exprChecker.ParseAndCheckProject(Project1.options) |> Async.RunSynchronously + + for e in wholeProjectResults.Errors do + printfn "Project1 error: <<<%s>>>" e.Message + + wholeProjectResults.Errors.Length |> shouldEqual 3 // recursive value warning + wholeProjectResults.Errors.[0].Severity |> shouldEqual FSharpErrorSeverity.Warning + wholeProjectResults.Errors.[1].Severity |> shouldEqual FSharpErrorSeverity.Warning + wholeProjectResults.Errors.[2].Severity |> shouldEqual FSharpErrorSeverity.Warning + + wholeProjectResults.GetOptimizedAssemblyContents().ImplementationFiles.Length |> shouldEqual 2 + let file1 = wholeProjectResults.GetOptimizedAssemblyContents().ImplementationFiles.[0] + let file2 = wholeProjectResults.GetOptimizedAssemblyContents().ImplementationFiles.[1] + + // This behaves slightly differently on Mono versions, 'null' is printed somethimes, 'None' other times + // Presumably this is very small differences in Mono reflection causing F# printing to change behavious + // For now just disabling this test. See https://github.com/fsharp/FSharp.Compiler.Service/pull/766 + let filterHack l = + l |> List.map (fun (s:string) -> + s.Replace("ILArrayShape [(Some 0, None)]", "ILArrayShapeFIX") + .Replace("ILArrayShape [(Some 0, null)]", "ILArrayShapeFIX")) + + let expected = [ + "type M"; "type IntAbbrev"; "let boolEx1 = True @ (6,14--6,18)"; + "let intEx1 = 1 @ (7,13--7,14)"; "let int64Ex1 = 1 @ (8,15--8,17)"; + "let tupleEx1 = (1,1) @ (9,16--9,21)"; + "let tupleEx2 = (1,1,1) @ (10,16--10,25)"; + "let tupleEx3 = (1,1,1,1) @ (11,16--11,29)"; + "let localExample = let y: Microsoft.FSharp.Core.int = 1 in let z: Microsoft.FSharp.Core.int = 1 in (y,z) @ (14,7--14,8)"; + "let localGenericFunctionExample(unitVar0) = let y: Microsoft.FSharp.Core.int = 1 in let compiledAsLocalGenericFunction: 'a -> 'a = FUN ... -> fun x -> x in (compiledAsLocalGenericFunction y,compiledAsLocalGenericFunction 1) @ (19,7--19,8)"; + "let funcEx1(x) = x @ (23,23--23,24)"; + "let genericFuncEx1(x) = x @ (24,29--24,30)"; + "let topPair1b = M.patternInput@25 ().Item1 @ (25,4--25,26)"; + "let topPair1a = M.patternInput@25 ().Item0 @ (25,4--25,26)"; + "let testILCall1 = new Object() @ (27,18--27,27)"; + "let testILCall2 = Console.WriteLine (\"176\") @ (28,18--28,49)"; + "let recValNeverUsedAtRuntime = recValNeverUsedAtRuntime@31.Force(()) @ (31,8--31,32)"; + "let recFuncIgnoresFirstArg(g) (v) = v @ (32,33--32,34)"; + "let testFun4(unitVar0) = let rec ... in recValNeverUsedAtRuntime @ (36,4--39,28)"; + "type ClassWithImplicitConstructor"; + "member .ctor(compiledAsArg) = (new Object(); (this.compiledAsArg <- compiledAsArg; (this.compiledAsField <- 1; let compiledAsLocal: Microsoft.FSharp.Core.int = 1 in let compiledAsLocal2: Microsoft.FSharp.Core.int = Operators.op_Addition (compiledAsLocal,compiledAsLocal) in ()))) @ (41,5--41,33)"; + "member .cctor(unitVar) = (compiledAsStaticField <- 1; let compiledAsStaticLocal: Microsoft.FSharp.Core.int = 1 in let compiledAsStaticLocal2: Microsoft.FSharp.Core.int = Operators.op_Addition (compiledAsStaticLocal,compiledAsStaticLocal) in ()) @ (49,11--49,40)"; + "member M1(__) (unitVar1) = Operators.op_Addition (Operators.op_Addition (__.compiledAsField,__.compiledAsGenericInstanceMethod(__.compiledAsField)),__.compiledAsArg) @ (55,21--55,102)"; + "member M2(__) (unitVar1) = __.compiledAsInstanceMethod(()) @ (56,21--56,47)"; + "member SM1(unitVar0) = Operators.op_Addition (compiledAsStaticField,ClassWithImplicitConstructor.compiledAsGenericStaticMethod (compiledAsStaticField)) @ (57,26--57,101)"; + "member SM2(unitVar0) = ClassWithImplicitConstructor.compiledAsStaticMethod (()) @ (58,26--58,50)"; + "member TestCallinToString(this) (unitVar1) = this.ToString() @ (60,39--60,54)"; + "type Error"; "let err = {Data0 = 3; Data1 = 4} @ (64,10--64,20)"; + "let matchOnException(err) = match (if err :? M.Error then $0 else $1) targets ... @ (66,33--66,36)"; + "let upwardForLoop(unitVar0) = let mutable a: Microsoft.FSharp.Core.int = 1 in (for-loop; a) @ (69,16--69,17)"; + "let upwardForLoop2(unitVar0) = let mutable a: Microsoft.FSharp.Core.int = 1 in (for-loop; a) @ (74,16--74,17)"; + "let downwardForLoop(unitVar0) = let mutable a: Microsoft.FSharp.Core.int = 1 in (for-loop; a) @ (79,16--79,17)"; + "let quotationTest1(unitVar0) = quote(Operators.op_Addition (1,1)) @ (83,24--83,35)"; + "let quotationTest2(v) = quote(Operators.op_Addition (ExtraTopLevelOperators.SpliceExpression (v),1)) @ (84,24--84,36)"; + "type RecdType"; "type UnionType"; "type ClassWithEventsAndProperties"; + "member .ctor(unitVar0) = (new Object(); (this.ev <- new FSharpEvent`1(()); ())) @ (89,5--89,33)"; + "member .cctor(unitVar) = (sev <- new FSharpEvent`1(()); ()) @ (91,11--91,35)"; + "member get_InstanceProperty(x) (unitVar1) = (x.ev.Trigger(1); 1) @ (92,32--92,48)"; + "member get_StaticProperty(unitVar0) = (sev.Trigger(1); 1) @ (93,35--93,52)"; + "member get_InstanceEvent(x) (unitVar1) = x.ev.get_Publish(()) @ (94,29--94,39)"; + "member get_StaticEvent(x) (unitVar1) = sev.get_Publish(()) @ (95,27--95,38)"; + "let c = new ClassWithEventsAndProperties(()) @ (97,8--97,38)"; + "let v = M.c ().get_InstanceProperty(()) @ (98,8--98,26)"; + "do Console.WriteLine (\"777\")"; + "let functionWithSubmsumption(x) = IntrinsicFunctions.UnboxGeneric (x) @ (102,40--102,52)"; + "type MultiArgMethods"; + "member .ctor(c,d) = (new Object(); ()) @ (105,5--105,20)"; + "member Method(x) (a,b) = 1 @ (106,37--106,38)"; + "member CurriedMethod(x) (a1,b1) (a2,b2) = 1 @ (107,63--107,64)"; + "let testFunctionThatCallsMultiArgMethods(unitVar0) = let m: M.MultiArgMethods = new MultiArgMethods(3,4) in Operators.op_Addition (m.Method(7,8),let arg00: Microsoft.FSharp.Core.int = 9 in let arg01: Microsoft.FSharp.Core.int = 10 in let arg10: Microsoft.FSharp.Core.int = 11 in let arg11: Microsoft.FSharp.Core.int = 12 in m.CurriedMethod(arg00,arg01,arg10,arg11)) @ (110,8--110,9)"; + "let testFunctionThatUsesUnitsOfMeasure(x) (y) = Operators.op_Addition,Microsoft.FSharp.Core.float<'u>,Microsoft.FSharp.Core.float<'u>> (x,y) @ (122,70--122,75)"; + "let testFunctionThatUsesAddressesAndByrefs(x) = let mutable w: Microsoft.FSharp.Core.int = 4 in let y1: Microsoft.FSharp.Core.byref = x in let y2: Microsoft.FSharp.Core.byref = &w in let arr: Microsoft.FSharp.Core.int Microsoft.FSharp.Core.[] = [|3; 4|] in let r: Microsoft.FSharp.Core.int Microsoft.FSharp.Core.ref = Operators.Ref (3) in let y3: Microsoft.FSharp.Core.byref = [I_ldelema (NormalAddress,false,ILArrayShapeFIX,!0)](arr,0) in let y4: Microsoft.FSharp.Core.byref = &r.contents in let z: Microsoft.FSharp.Core.int = Operators.op_Addition (Operators.op_Addition (Operators.op_Addition (x,y1),y2),y3) in (w <- 3; (x <- 4; (y2 <- 4; (y3 <- 5; Operators.op_Addition (Operators.op_Addition (Operators.op_Addition (Operators.op_Addition (Operators.op_Addition (Operators.op_Addition (Operators.op_Addition (z,x),y1),y2),y3),y4),IntrinsicFunctions.GetArray (arr,0)),r.contents))))) @ (125,16--125,17)"; + "let testFunctionThatUsesStructs1(dt) = dt.AddDays(3) @ (139,57--139,72)"; + "let testFunctionThatUsesStructs2(unitVar0) = let dt1: System.DateTime = DateTime.get_Now () in let mutable dt2: System.DateTime = DateTime.get_Now () in let dt3: System.TimeSpan = DateTime.op_Subtraction (dt1,dt2) in let dt4: System.DateTime = dt1.AddDays(3) in let dt5: Microsoft.FSharp.Core.int = dt1.get_Millisecond() in let dt6: Microsoft.FSharp.Core.byref = &dt2 in let dt7: System.TimeSpan = DateTime.op_Subtraction (dt6,dt4) in dt7 @ (142,7--142,10)"; + "let testFunctionThatUsesWhileLoop(unitVar0) = let mutable x: Microsoft.FSharp.Core.int = 1 in (while Operators.op_LessThan (x,100) do x <- Operators.op_Addition (x,1) done; x) @ (152,15--152,16)"; + "let testFunctionThatUsesTryWith(unitVar0) = try M.testFunctionThatUsesWhileLoop (()) with matchValue -> match (if matchValue :? System.ArgumentException then $0 else $1) targets ... @ (158,3--160,60)"; + "let testFunctionThatUsesTryFinally(unitVar0) = try M.testFunctionThatUsesWhileLoop (()) finally Console.WriteLine (\"8888\") @ (164,3--167,37)"; + "member Console.WriteTwoLines.Static(unitVar0) = (Console.WriteLine (); Console.WriteLine ()) @ (170,36--170,90)"; + "member DateTime.get_TwoMinute(x) (unitVar1) = Operators.op_Addition (x.get_Minute(),x.get_Minute()) @ (173,25--173,44)"; + "let testFunctionThatUsesExtensionMembers(unitVar0) = (M.Console.WriteTwoLines.Static (()); let v: Microsoft.FSharp.Core.int = DateTime.get_Now ().DateTime.get_TwoMinute(()) in M.Console.WriteTwoLines.Static (())) @ (176,3--178,33)"; + "let testFunctionThatUsesOptionMembers(unitVar0) = let x: Microsoft.FSharp.Core.int Microsoft.FSharp.Core.option = Some(3) in (x.get_IsSome() (),x.get_IsNone() ()) @ (181,7--181,8)"; + "let testFunctionThatUsesOverAppliedFunction(unitVar0) = Operators.Identity Microsoft.FSharp.Core.int> (fun x -> Operators.Identity (x)) 3 @ (185,3--185,10)"; + "let testFunctionThatUsesPatternMatchingOnLists(x) = match (if x.Isop_ColonColon then (if x.Tail.Isop_ColonColon then (if x.Tail.Tail.Isop_Nil then $2 else $3) else $1) else $0) targets ... @ (188,10--188,11)"; + "let testFunctionThatUsesPatternMatchingOnOptions(x) = match (if x.IsSome then $1 else $0) targets ... @ (195,10--195,11)"; + "let testFunctionThatUsesPatternMatchingOnOptions2(x) = match (if x.IsSome then $1 else $0) targets ... @ (200,10--200,11)"; + "let testFunctionThatUsesConditionalOnOptions2(x) = (if x.get_IsSome() () then 1 else 2) @ (205,4--205,29)"; + "let f(x) (y) = Operators.op_Addition (x,y) @ (207,12--207,15)"; + "let g = let x: Microsoft.FSharp.Core.int = 1 in fun y -> M.f (x,y) @ (208,8--208,11)"; + "let h = Operators.op_Addition (M.g () 2,3) @ (209,8--209,17)"; + "type TestFuncProp"; + "member .ctor(unitVar0) = (new Object(); ()) @ (211,5--211,17)"; + "member get_Id(this) (unitVar1) = fun x -> x @ (212,21--212,31)"; + "let wrong = Operators.op_Equality (new TestFuncProp(()).get_Id(()) 0,0) @ (214,12--214,35)"; + "let start(name) = (name,name) @ (217,4--217,14)"; + "let last(name,values) = Operators.Identity ((name,values)) @ (220,4--220,21)"; + "let last2(name) = Operators.Identity (name) @ (223,4--223,11)"; + "let test7(s) = let tupledArg: Microsoft.FSharp.Core.string * Microsoft.FSharp.Core.string = M.start (s) in let name: Microsoft.FSharp.Core.string = tupledArg.Item0 in let values: Microsoft.FSharp.Core.string = tupledArg.Item1 in M.last (name,values) @ (226,4--226,19)"; + "let test8(unitVar0) = fun tupledArg -> let name: Microsoft.FSharp.Core.string = tupledArg.Item0 in let values: Microsoft.FSharp.Core.string = tupledArg.Item1 in M.last (name,values) @ (229,4--229,8)"; + "let test9(s) = M.last (s,s) @ (232,4--232,17)"; + "let test10(unitVar0) = fun name -> M.last2 (name) @ (235,4--235,9)"; + "let test11(s) = M.last2 (s) @ (238,4--238,14)"; + "let badLoop = badLoop@240.Force Microsoft.FSharp.Core.int>(()) @ (240,8--240,15)"; + "type LetLambda"; + "let f = fun a -> fun b -> Operators.op_Addition (a,b) @ (247,8--247,24)"; + "let letLambdaRes = ListModule.Map (fun tupledArg -> let a: Microsoft.FSharp.Core.int = tupledArg.Item0 in let b: Microsoft.FSharp.Core.int = tupledArg.Item1 in (LetLambda.f () a) b,Cons((1,2),Empty())) @ (249,19--249,71)"; + ] + + let expected2 = [ + "type N"; "type IntAbbrev"; "let bool2 = False @ (6,12--6,17)"; + "let testHashChar(x) = Operators.op_BitwiseOr (Operators.op_LeftShift (x,16),x) @ (8,28--8,34)"; + "let testHashSByte(x) = Operators.op_ExclusiveOr (Operators.op_LeftShift (x,8),x) @ (9,30--9,36)"; + "let testHashInt16(x) = Operators.op_BitwiseOr (Operators.ToUInt16 (x),Operators.op_LeftShift (x,16)) @ (10,30--10,36)"; + "let testHashInt64(x) = Operators.op_ExclusiveOr (Operators.ToInt32 (x),Operators.ToInt32 (Operators.op_RightShift (x,32))) @ (11,30--11,36)"; + "let testHashUInt64(x) = Operators.op_ExclusiveOr (Operators.ToInt32 (x),Operators.ToInt32 (Operators.op_RightShift (x,32))) @ (12,32--12,38)"; + "let testHashIntPtr(x) = Operators.ToInt32 (Operators.ToUInt64 (x)) @ (13,35--13,41)"; + "let testHashUIntPtr(x) = Operators.op_BitwiseAnd (Operators.ToInt32 (Operators.ToUInt64 (x)),2147483647) @ (14,37--14,43)"; + "let testHashString(x) = (if Operators.op_Equality (x,dflt) then 0 else Operators.Hash (x)) @ (16,32--16,38)"; + "let testTypeOf(x) = Operators.TypeOf<'T> () @ (17,24--17,30)"; + ] + + // printFSharpDecls "" file2.Declarations |> Seq.iter (printfn "%s") + + printDeclarations None (List.ofSeq file1.Declarations) + |> Seq.toList + |> filterHack + |> shouldEqual (filterHack expected) + + printDeclarations None (List.ofSeq file2.Declarations) + |> Seq.toList + |> filterHack + |> shouldEqual (filterHack expected2) + + () + +let testOperators dnName fsName excludedTests expectedUnoptimized expectedOptimized = + let basePath = Path.GetTempFileName() + let fileName = Path.ChangeExtension(basePath, ".fs") + let dllName = Path.ChangeExtension(basePath, ".dll") + let projFileName = Path.ChangeExtension(basePath, ".fsproj") + let source = System.String.Format(Project1.operatorTests, dnName, fsName) + let replace (s:string) r = s.Replace("let " + r, "// let " + r) + let fileSource = excludedTests |> List.fold replace source + File.WriteAllText(fileName, fileSource) + + let args = mkProjectCommandLineArgsSilent (dllName, [fileName]) + let options = checker.GetProjectOptionsFromCommandLineArgs (projFileName, args) + let wholeProjectResults = exprChecker.ParseAndCheckProject(options) |> Async.RunSynchronously + + for e in wholeProjectResults.Errors do + printfn "%s Operator Tests error: <<<%s>>>" dnName e.Message + + wholeProjectResults.Errors.Length |> shouldEqual 0 + + let fileUnoptimized = wholeProjectResults.AssemblyContents.ImplementationFiles.[0] + let fileOptimized = wholeProjectResults.GetOptimizedAssemblyContents().ImplementationFiles.[0] + + printDeclarations None (List.ofSeq fileUnoptimized.Declarations) + |> Seq.toList |> shouldEqual expectedUnoptimized + + printDeclarations None (List.ofSeq fileOptimized.Declarations) + |> Seq.toList |> shouldEqual expectedOptimized + + () + +[] +let ``Test Operator Declarations for Byte`` () = + let excludedTests = [ + "testByteUnaryNegOperator"; + "testByteUnaryNegChecked"; + ] + + let expectedUnoptimized = [ + "type OperatorTestsByte"; + "let testByteEqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,64--4,72)"; + "let testByteNotEqualsOperator(e1) (e2) = Operators.op_Inequality (e1,e2) @ (5,64--5,73)"; + "let testByteLessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,64--6,72)"; + "let testByteLessThanOrEqualsOperator(e1) (e2) = Operators.op_LessThanOrEqual (e1,e2) @ (7,64--7,73)"; + "let testByteGreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,64--8,72)"; + "let testByteGreaterThanOrEqualsOperator(e1) (e2) = Operators.op_GreaterThanOrEqual (e1,e2) @ (9,64--9,73)"; + "let testByteAdditionOperator(e1) (e2) = Operators.op_Addition (e1,e2) @ (11,56--11,64)"; + "let testByteSubtractionOperator(e1) (e2) = Operators.op_Subtraction (e1,e2) @ (12,56--12,64)"; + "let testByteMultiplyOperator(e1) (e2) = Operators.op_Multiply (e1,e2) @ (13,55--13,64)"; + "let testByteDivisionOperator(e1) (e2) = Operators.op_Division (e1,e2) @ (14,56--14,64)"; + "let testByteModulusOperator(e1) (e2) = Operators.op_Modulus (e1,e2) @ (15,56--15,64)"; + "let testByteBitwiseAndOperator(e1) (e2) = Operators.op_BitwiseAnd (e1,e2) @ (16,56--16,66)"; + "let testByteBitwiseOrOperator(e1) (e2) = Operators.op_BitwiseOr (e1,e2) @ (17,56--17,66)"; + "let testByteBitwiseXorOperator(e1) (e2) = Operators.op_ExclusiveOr (e1,e2) @ (18,56--18,66)"; + "let testByteShiftLeftOperator(e1) (e2) = Operators.op_LeftShift (e1,e2) @ (19,55--19,65)"; + "let testByteShiftRightOperator(e1) (e2) = Operators.op_RightShift (e1,e2) @ (20,55--20,65)"; + "let testByteAdditionChecked(e1) (e2) = Checked.op_Addition (e1,e2) @ (24,53--24,70)"; + "let testByteSubtractionChecked(e1) (e2) = Checked.op_Subtraction (e1,e2) @ (25,53--25,70)"; + "let testByteMultiplyChecked(e1) (e2) = Checked.op_Multiply (e1,e2) @ (26,53--26,70)"; + "let testByteToByteChecked(e1) = Checked.ToByte (e1) @ (29,43--29,58)"; + "let testByteToSByteChecked(e1) = Checked.ToSByte (e1) @ (30,43--30,59)"; + "let testByteToInt16Checked(e1) = Checked.ToInt16 (e1) @ (31,43--31,59)"; + "let testByteToUInt16Checked(e1) = Checked.ToUInt16 (e1) @ (32,43--32,60)"; + "let testByteToIntChecked(e1) = Checked.ToInt (e1) @ (33,43--33,57)"; + "let testByteToInt32Checked(e1) = Checked.ToInt32 (e1) @ (34,43--34,59)"; + "let testByteToUInt32Checked(e1) = Checked.ToUInt32 (e1) @ (35,43--35,60)"; + "let testByteToInt64Checked(e1) = Checked.ToInt64 (e1) @ (36,43--36,59)"; + "let testByteToUInt64Checked(e1) = Checked.ToUInt64 (e1) @ (37,43--37,60)"; + "let testByteToIntPtrChecked(e1) = Checked.ToIntPtr (e1) @ (38,43--38,63)"; + "let testByteToUIntPtrChecked(e1) = Checked.ToUIntPtr (e1) @ (39,43--39,64)"; + "let testByteToByteOperator(e1) = Operators.ToByte (e1) @ (41,43--41,50)"; + "let testByteToSByteOperator(e1) = Operators.ToSByte (e1) @ (42,43--42,51)"; + "let testByteToInt16Operator(e1) = Operators.ToInt16 (e1) @ (43,43--43,51)"; + "let testByteToUInt16Operator(e1) = Operators.ToUInt16 (e1) @ (44,43--44,52)"; + "let testByteToIntOperator(e1) = Operators.ToInt (e1) @ (45,43--45,49)"; + "let testByteToInt32Operator(e1) = Operators.ToInt32 (e1) @ (46,43--46,51)"; + "let testByteToUInt32Operator(e1) = Operators.ToUInt32 (e1) @ (47,43--47,52)"; + "let testByteToInt64Operator(e1) = Operators.ToInt64 (e1) @ (48,43--48,51)"; + "let testByteToUInt64Operator(e1) = Operators.ToUInt64 (e1) @ (49,43--49,52)"; + "let testByteToIntPtrOperator(e1) = Operators.ToIntPtr (e1) @ (50,43--50,55)"; + "let testByteToUIntPtrOperator(e1) = Operators.ToUIntPtr (e1) @ (51,43--51,56)"; + "let testByteToSingleOperator(e1) = Operators.ToSingle (e1) @ (52,43--52,53)"; + "let testByteToDoubleOperator(e1) = Operators.ToDouble (e1) @ (53,43--53,51)"; + "let testByteToDecimalOperator(e1) = Operators.ToDecimal (e1) @ (54,43--54,53)"; + "let testByteToCharOperator(e1) = Operators.ToChar (e1) @ (55,43--55,50)"; + "let testByteToStringOperator(e1) = Operators.ToString (e1) @ (56,43--56,52)"; + ] + + let expectedOptimized = [ + "type OperatorTestsByte"; + "let testByteEqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,64--4,72)"; + "let testByteNotEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_Equality (e1,e2),False) @ (5,64--5,73)"; + "let testByteLessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,64--6,72)"; + "let testByteLessThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_GreaterThan (e1,e2),False) @ (7,64--7,73)"; + "let testByteGreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,64--8,72)"; + "let testByteGreaterThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_LessThan (e1,e2),False) @ (9,64--9,73)"; + "let testByteAdditionOperator(e1) (e2) = Operators.ToByte (Operators.op_Addition (e1,e2)) @ (11,56--11,64)"; + "let testByteSubtractionOperator(e1) (e2) = Operators.ToByte (Operators.op_Subtraction (e1,e2)) @ (12,56--12,64)"; + "let testByteMultiplyOperator(e1) (e2) = Operators.ToByte (Operators.op_Multiply (e1,e2)) @ (13,55--13,64)"; + "let testByteDivisionOperator(e1) (e2) = Operators.ToByte (Operators.op_Division (e1,e2)) @ (14,56--14,64)"; + "let testByteModulusOperator(e1) (e2) = Operators.ToByte (Operators.op_Modulus (e1,e2)) @ (15,56--15,64)"; + "let testByteBitwiseAndOperator(e1) (e2) = Operators.op_BitwiseAnd (e1,e2) @ (16,56--16,66)"; + "let testByteBitwiseOrOperator(e1) (e2) = Operators.op_BitwiseOr (e1,e2) @ (17,56--17,66)"; + "let testByteBitwiseXorOperator(e1) (e2) = Operators.op_ExclusiveOr (e1,e2) @ (18,56--18,66)"; + "let testByteShiftLeftOperator(e1) (e2) = Operators.ToByte (Operators.op_LeftShift (e1,Operators.op_BitwiseAnd (e2,7))) @ (19,55--19,65)"; + "let testByteShiftRightOperator(e1) (e2) = Operators.ToByte (Operators.op_RightShift (e1,Operators.op_BitwiseAnd (e2,7))) @ (20,55--20,65)"; + "let testByteAdditionChecked(e1) (e2) = Checked.ToByte (Checked.op_Addition (e1,e2)) @ (24,53--24,70)"; + "let testByteSubtractionChecked(e1) (e2) = Checked.ToByte (Checked.op_Subtraction (e1,e2)) @ (25,53--25,70)"; + "let testByteMultiplyChecked(e1) (e2) = Checked.ToByte (Checked.op_Multiply (e1,e2)) @ (26,53--26,70)"; + "let testByteToByteChecked(e1) = Checked.ToByte (e1) @ (29,43--29,58)"; + "let testByteToSByteChecked(e1) = Checked.ToSByte (e1) @ (30,43--30,59)"; + "let testByteToInt16Checked(e1) = Checked.ToInt16 (e1) @ (31,43--31,59)"; + "let testByteToUInt16Checked(e1) = Checked.ToUInt16 (e1) @ (32,43--32,60)"; + "let testByteToIntChecked(e1) = Checked.ToInt32 (e1) @ (33,43--33,57)"; + "let testByteToInt32Checked(e1) = Checked.ToInt32 (e1) @ (34,43--34,59)"; + "let testByteToUInt32Checked(e1) = Checked.ToUInt32 (e1) @ (35,43--35,60)"; + "let testByteToInt64Checked(e1) = Checked.ToInt64 (e1) @ (36,43--36,59)"; + "let testByteToUInt64Checked(e1) = Checked.ToUInt64 (e1) @ (37,43--37,60)"; + "let testByteToIntPtrChecked(e1) = Checked.ToIntPtr (e1) @ (38,43--38,63)"; + "let testByteToUIntPtrChecked(e1) = Checked.ToUIntPtr (e1) @ (39,43--39,64)"; + "let testByteToByteOperator(e1) = Operators.ToByte (e1) @ (41,43--41,50)"; + "let testByteToSByteOperator(e1) = Operators.ToSByte (e1) @ (42,43--42,51)"; + "let testByteToInt16Operator(e1) = Operators.ToInt16 (e1) @ (43,43--43,51)"; + "let testByteToUInt16Operator(e1) = Operators.ToUInt16 (e1) @ (44,43--44,52)"; + "let testByteToIntOperator(e1) = Operators.ToInt32 (e1) @ (45,43--45,49)"; + "let testByteToInt32Operator(e1) = Operators.ToInt32 (e1) @ (46,43--46,51)"; + "let testByteToUInt32Operator(e1) = Operators.ToUInt32 (e1) @ (47,43--47,52)"; + "let testByteToInt64Operator(e1) = Operators.ToUInt64 (e1) @ (48,43--48,51)"; + "let testByteToUInt64Operator(e1) = Operators.ToUInt64 (e1) @ (49,43--49,52)"; + "let testByteToIntPtrOperator(e1) = Operators.ToIntPtr (e1) @ (50,43--50,55)"; + "let testByteToUIntPtrOperator(e1) = Operators.ToUIntPtr (e1) @ (51,43--51,56)"; + "let testByteToSingleOperator(e1) = Operators.ToSingle (Operators.ToDouble (e1)) @ (52,43--52,53)"; + "let testByteToDoubleOperator(e1) = Operators.ToDouble (Operators.ToDouble (e1)) @ (53,43--53,51)"; + "let testByteToDecimalOperator(e1) = Convert.ToDecimal (e1) @ (54,43--54,53)"; + "let testByteToCharOperator(e1) = Operators.ToChar (e1) @ (55,43--55,50)"; + "let testByteToStringOperator(e1) = let matchValue: Microsoft.FSharp.Core.obj = Operators.Box (e1) in match (if Operators.op_Equality (matchValue,dflt) then $0 else (if matchValue :? System.IFormattable then $1 else $2)) targets ... @ (56,43--56,52)"; + ] + + testOperators "Byte" "byte" excludedTests expectedUnoptimized expectedOptimized + + +[] +let ``Test Operator Declarations for SByte`` () = + let excludedTests = [ ] + + let expectedUnoptimized = [ + "type OperatorTestsSByte"; + "let testSByteEqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,67--4,75)"; + "let testSByteNotEqualsOperator(e1) (e2) = Operators.op_Inequality (e1,e2) @ (5,67--5,76)"; + "let testSByteLessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,67--6,75)"; + "let testSByteLessThanOrEqualsOperator(e1) (e2) = Operators.op_LessThanOrEqual (e1,e2) @ (7,67--7,76)"; + "let testSByteGreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,67--8,75)"; + "let testSByteGreaterThanOrEqualsOperator(e1) (e2) = Operators.op_GreaterThanOrEqual (e1,e2) @ (9,67--9,76)"; + "let testSByteAdditionOperator(e1) (e2) = Operators.op_Addition (e1,e2) @ (11,59--11,67)"; "let testSByteSubtractionOperator(e1) (e2) = Operators.op_Subtraction (e1,e2) @ (12,59--12,67)"; + "let testSByteMultiplyOperator(e1) (e2) = Operators.op_Multiply (e1,e2) @ (13,58--13,67)"; + "let testSByteDivisionOperator(e1) (e2) = Operators.op_Division (e1,e2) @ (14,59--14,67)"; + "let testSByteModulusOperator(e1) (e2) = Operators.op_Modulus (e1,e2) @ (15,59--15,67)"; + "let testSByteBitwiseAndOperator(e1) (e2) = Operators.op_BitwiseAnd (e1,e2) @ (16,59--16,69)"; + "let testSByteBitwiseOrOperator(e1) (e2) = Operators.op_BitwiseOr (e1,e2) @ (17,59--17,69)"; + "let testSByteBitwiseXorOperator(e1) (e2) = Operators.op_ExclusiveOr (e1,e2) @ (18,59--18,69)"; + "let testSByteShiftLeftOperator(e1) (e2) = Operators.op_LeftShift (e1,e2) @ (19,57--19,67)"; + "let testSByteShiftRightOperator(e1) (e2) = Operators.op_RightShift (e1,e2) @ (20,57--20,67)"; + "let testSByteUnaryNegOperator(e1) = Operators.op_UnaryNegation (e1) @ (22,46--22,52)"; + "let testSByteAdditionChecked(e1) (e2) = Checked.op_Addition (e1,e2) @ (24,56--24,73)"; + "let testSByteSubtractionChecked(e1) (e2) = Checked.op_Subtraction (e1,e2) @ (25,56--25,73)"; + "let testSByteMultiplyChecked(e1) (e2) = Checked.op_Multiply (e1,e2) @ (26,56--26,73)"; + "let testSByteUnaryNegChecked(e1) = Checked.op_UnaryNegation (e1) @ (27,45--27,60)"; + "let testSByteToByteChecked(e1) = Checked.ToByte (e1) @ (29,45--29,60)"; + "let testSByteToSByteChecked(e1) = Checked.ToSByte (e1) @ (30,45--30,61)"; + "let testSByteToInt16Checked(e1) = Checked.ToInt16 (e1) @ (31,45--31,61)"; + "let testSByteToUInt16Checked(e1) = Checked.ToUInt16 (e1) @ (32,45--32,62)"; + "let testSByteToIntChecked(e1) = Checked.ToInt (e1) @ (33,45--33,59)"; + "let testSByteToInt32Checked(e1) = Checked.ToInt32 (e1) @ (34,45--34,61)"; + "let testSByteToUInt32Checked(e1) = Checked.ToUInt32 (e1) @ (35,45--35,62)"; + "let testSByteToInt64Checked(e1) = Checked.ToInt64 (e1) @ (36,45--36,61)"; + "let testSByteToUInt64Checked(e1) = Checked.ToUInt64 (e1) @ (37,45--37,62)"; + "let testSByteToIntPtrChecked(e1) = Checked.ToIntPtr (e1) @ (38,45--38,65)"; + "let testSByteToUIntPtrChecked(e1) = Checked.ToUIntPtr (e1) @ (39,45--39,66)"; + "let testSByteToByteOperator(e1) = Operators.ToByte (e1) @ (41,45--41,52)"; + "let testSByteToSByteOperator(e1) = Operators.ToSByte (e1) @ (42,45--42,53)"; + "let testSByteToInt16Operator(e1) = Operators.ToInt16 (e1) @ (43,45--43,53)"; + "let testSByteToUInt16Operator(e1) = Operators.ToUInt16 (e1) @ (44,45--44,54)"; + "let testSByteToIntOperator(e1) = Operators.ToInt (e1) @ (45,45--45,51)"; + "let testSByteToInt32Operator(e1) = Operators.ToInt32 (e1) @ (46,45--46,53)"; + "let testSByteToUInt32Operator(e1) = Operators.ToUInt32 (e1) @ (47,45--47,54)"; + "let testSByteToInt64Operator(e1) = Operators.ToInt64 (e1) @ (48,45--48,53)"; + "let testSByteToUInt64Operator(e1) = Operators.ToUInt64 (e1) @ (49,45--49,54)"; + "let testSByteToIntPtrOperator(e1) = Operators.ToIntPtr (e1) @ (50,45--50,57)"; + "let testSByteToUIntPtrOperator(e1) = Operators.ToUIntPtr (e1) @ (51,45--51,58)"; + "let testSByteToSingleOperator(e1) = Operators.ToSingle (e1) @ (52,45--52,55)"; + "let testSByteToDoubleOperator(e1) = Operators.ToDouble (e1) @ (53,45--53,53)"; + "let testSByteToDecimalOperator(e1) = Operators.ToDecimal (e1) @ (54,45--54,55)"; + "let testSByteToCharOperator(e1) = Operators.ToChar (e1) @ (55,45--55,52)"; + "let testSByteToStringOperator(e1) = Operators.ToString (e1) @ (56,45--56,54)"; + ] + + let expectedOptimized = [ + "type OperatorTestsSByte"; + "let testSByteEqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,67--4,75)"; + "let testSByteNotEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_Equality (e1,e2),False) @ (5,67--5,76)"; + "let testSByteLessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,67--6,75)"; + "let testSByteLessThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_GreaterThan (e1,e2),False) @ (7,67--7,76)"; + "let testSByteGreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,67--8,75)"; + "let testSByteGreaterThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_LessThan (e1,e2),False) @ (9,67--9,76)"; + "let testSByteAdditionOperator(e1) (e2) = Operators.ToSByte (Operators.op_Addition (e1,e2)) @ (11,59--11,67)"; + "let testSByteSubtractionOperator(e1) (e2) = Operators.ToSByte (Operators.op_Subtraction (e1,e2)) @ (12,59--12,67)"; + "let testSByteMultiplyOperator(e1) (e2) = Operators.ToSByte (Operators.op_Multiply (e1,e2)) @ (13,58--13,67)"; + "let testSByteDivisionOperator(e1) (e2) = Operators.ToSByte (Operators.op_Division (e1,e2)) @ (14,59--14,67)"; + "let testSByteModulusOperator(e1) (e2) = Operators.ToSByte (Operators.op_Modulus (e1,e2)) @ (15,59--15,67)"; + "let testSByteBitwiseAndOperator(e1) (e2) = Operators.op_BitwiseAnd (e1,e2) @ (16,59--16,69)"; + "let testSByteBitwiseOrOperator(e1) (e2) = Operators.op_BitwiseOr (e1,e2) @ (17,59--17,69)"; + "let testSByteBitwiseXorOperator(e1) (e2) = Operators.op_ExclusiveOr (e1,e2) @ (18,59--18,69)"; + "let testSByteShiftLeftOperator(e1) (e2) = Operators.ToSByte (Operators.op_LeftShift (e1,Operators.op_BitwiseAnd (e2,7))) @ (19,57--19,67)"; + "let testSByteShiftRightOperator(e1) (e2) = Operators.ToSByte (Operators.op_RightShift (e1,Operators.op_BitwiseAnd (e2,7))) @ (20,57--20,67)"; + "let testSByteUnaryNegOperator(e1) = Operators.op_UnaryNegation (e1) @ (22,46--22,52)"; + "let testSByteAdditionChecked(e1) (e2) = Checked.ToSByte (Checked.op_Addition (e1,e2)) @ (24,56--24,73)"; + "let testSByteSubtractionChecked(e1) (e2) = Checked.ToSByte (Checked.op_Subtraction (e1,e2)) @ (25,56--25,73)"; + "let testSByteMultiplyChecked(e1) (e2) = Checked.ToSByte (Checked.op_Multiply (e1,e2)) @ (26,56--26,73)"; + "let testSByteUnaryNegChecked(e1) = Checked.op_Subtraction (0,e1) @ (27,45--27,60)"; + "let testSByteToByteChecked(e1) = Checked.ToByte (e1) @ (29,45--29,60)"; + "let testSByteToSByteChecked(e1) = Checked.ToSByte (e1) @ (30,45--30,61)"; + "let testSByteToInt16Checked(e1) = Checked.ToInt16 (e1) @ (31,45--31,61)"; + "let testSByteToUInt16Checked(e1) = Checked.ToUInt16 (e1) @ (32,45--32,62)"; + "let testSByteToIntChecked(e1) = Checked.ToInt32 (e1) @ (33,45--33,59)"; + "let testSByteToInt32Checked(e1) = Checked.ToInt32 (e1) @ (34,45--34,61)"; + "let testSByteToUInt32Checked(e1) = Checked.ToUInt32 (e1) @ (35,45--35,62)"; + "let testSByteToInt64Checked(e1) = Checked.ToInt64 (e1) @ (36,45--36,61)"; + "let testSByteToUInt64Checked(e1) = Checked.ToUInt64 (e1) @ (37,45--37,62)"; + "let testSByteToIntPtrChecked(e1) = Checked.ToIntPtr (e1) @ (38,45--38,65)"; + "let testSByteToUIntPtrChecked(e1) = Checked.ToUIntPtr (e1) @ (39,45--39,66)"; + "let testSByteToByteOperator(e1) = Operators.ToByte (e1) @ (41,45--41,52)"; + "let testSByteToSByteOperator(e1) = Operators.ToSByte (e1) @ (42,45--42,53)"; + "let testSByteToInt16Operator(e1) = Operators.ToInt16 (e1) @ (43,45--43,53)"; + "let testSByteToUInt16Operator(e1) = Operators.ToUInt16 (e1) @ (44,45--44,54)"; + "let testSByteToIntOperator(e1) = Operators.ToInt32 (e1) @ (45,45--45,51)"; + "let testSByteToInt32Operator(e1) = Operators.ToInt32 (e1) @ (46,45--46,53)"; + "let testSByteToUInt32Operator(e1) = Operators.ToUInt32 (e1) @ (47,45--47,54)"; + "let testSByteToInt64Operator(e1) = Operators.ToInt64 (e1) @ (48,45--48,53)"; + "let testSByteToUInt64Operator(e1) = Operators.ToInt64 (e1) @ (49,45--49,54)"; + "let testSByteToIntPtrOperator(e1) = Operators.ToIntPtr (e1) @ (50,45--50,57)"; + "let testSByteToUIntPtrOperator(e1) = Operators.ToIntPtr (e1) @ (51,45--51,58)"; + "let testSByteToSingleOperator(e1) = Operators.ToSingle (e1) @ (52,45--52,55)"; + "let testSByteToDoubleOperator(e1) = Operators.ToDouble (e1) @ (53,45--53,53)"; + "let testSByteToDecimalOperator(e1) = Convert.ToDecimal (e1) @ (54,45--54,55)"; + "let testSByteToCharOperator(e1) = Operators.ToChar (e1) @ (55,45--55,52)"; + "let testSByteToStringOperator(e1) = let matchValue: Microsoft.FSharp.Core.obj = Operators.Box (e1) in match (if Operators.op_Equality (matchValue,dflt) then $0 else (if matchValue :? System.IFormattable then $1 else $2)) targets ... @ (56,45--56,54)"; + ] + + testOperators "SByte" "sbyte" excludedTests expectedUnoptimized expectedOptimized + +[] +let ``Test Operator Declarations for Int16`` () = + let excludedTests = [ ] + + let expectedUnoptimized = [ + "type OperatorTestsInt16"; + "let testInt16EqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,67--4,75)"; + "let testInt16NotEqualsOperator(e1) (e2) = Operators.op_Inequality (e1,e2) @ (5,67--5,76)"; + "let testInt16LessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,67--6,75)"; + "let testInt16LessThanOrEqualsOperator(e1) (e2) = Operators.op_LessThanOrEqual (e1,e2) @ (7,67--7,76)"; + "let testInt16GreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,67--8,75)"; + "let testInt16GreaterThanOrEqualsOperator(e1) (e2) = Operators.op_GreaterThanOrEqual (e1,e2) @ (9,67--9,76)"; + "let testInt16AdditionOperator(e1) (e2) = Operators.op_Addition (e1,e2) @ (11,59--11,67)"; + "let testInt16SubtractionOperator(e1) (e2) = Operators.op_Subtraction (e1,e2) @ (12,59--12,67)"; + "let testInt16MultiplyOperator(e1) (e2) = Operators.op_Multiply (e1,e2) @ (13,58--13,67)"; + "let testInt16DivisionOperator(e1) (e2) = Operators.op_Division (e1,e2) @ (14,59--14,67)"; + "let testInt16ModulusOperator(e1) (e2) = Operators.op_Modulus (e1,e2) @ (15,59--15,67)"; + "let testInt16BitwiseAndOperator(e1) (e2) = Operators.op_BitwiseAnd (e1,e2) @ (16,59--16,69)"; + "let testInt16BitwiseOrOperator(e1) (e2) = Operators.op_BitwiseOr (e1,e2) @ (17,59--17,69)"; + "let testInt16BitwiseXorOperator(e1) (e2) = Operators.op_ExclusiveOr (e1,e2) @ (18,59--18,69)"; + "let testInt16ShiftLeftOperator(e1) (e2) = Operators.op_LeftShift (e1,e2) @ (19,57--19,67)"; + "let testInt16ShiftRightOperator(e1) (e2) = Operators.op_RightShift (e1,e2) @ (20,57--20,67)"; + "let testInt16UnaryNegOperator(e1) = Operators.op_UnaryNegation (e1) @ (22,46--22,52)"; + "let testInt16AdditionChecked(e1) (e2) = Checked.op_Addition (e1,e2) @ (24,56--24,73)"; + "let testInt16SubtractionChecked(e1) (e2) = Checked.op_Subtraction (e1,e2) @ (25,56--25,73)"; + "let testInt16MultiplyChecked(e1) (e2) = Checked.op_Multiply (e1,e2) @ (26,56--26,73)"; + "let testInt16UnaryNegChecked(e1) = Checked.op_UnaryNegation (e1) @ (27,45--27,60)"; + "let testInt16ToByteChecked(e1) = Checked.ToByte (e1) @ (29,45--29,60)"; + "let testInt16ToSByteChecked(e1) = Checked.ToSByte (e1) @ (30,45--30,61)"; + "let testInt16ToInt16Checked(e1) = Checked.ToInt16 (e1) @ (31,45--31,61)"; + "let testInt16ToUInt16Checked(e1) = Checked.ToUInt16 (e1) @ (32,45--32,62)"; + "let testInt16ToIntChecked(e1) = Checked.ToInt (e1) @ (33,45--33,59)"; + "let testInt16ToInt32Checked(e1) = Checked.ToInt32 (e1) @ (34,45--34,61)"; + "let testInt16ToUInt32Checked(e1) = Checked.ToUInt32 (e1) @ (35,45--35,62)"; + "let testInt16ToInt64Checked(e1) = Checked.ToInt64 (e1) @ (36,45--36,61)"; + "let testInt16ToUInt64Checked(e1) = Checked.ToUInt64 (e1) @ (37,45--37,62)"; + "let testInt16ToIntPtrChecked(e1) = Checked.ToIntPtr (e1) @ (38,45--38,65)"; + "let testInt16ToUIntPtrChecked(e1) = Checked.ToUIntPtr (e1) @ (39,45--39,66)"; + "let testInt16ToByteOperator(e1) = Operators.ToByte (e1) @ (41,45--41,52)"; + "let testInt16ToSByteOperator(e1) = Operators.ToSByte (e1) @ (42,45--42,53)"; + "let testInt16ToInt16Operator(e1) = Operators.ToInt16 (e1) @ (43,45--43,53)"; + "let testInt16ToUInt16Operator(e1) = Operators.ToUInt16 (e1) @ (44,45--44,54)"; + "let testInt16ToIntOperator(e1) = Operators.ToInt (e1) @ (45,45--45,51)"; + "let testInt16ToInt32Operator(e1) = Operators.ToInt32 (e1) @ (46,45--46,53)"; + "let testInt16ToUInt32Operator(e1) = Operators.ToUInt32 (e1) @ (47,45--47,54)"; + "let testInt16ToInt64Operator(e1) = Operators.ToInt64 (e1) @ (48,45--48,53)"; + "let testInt16ToUInt64Operator(e1) = Operators.ToUInt64 (e1) @ (49,45--49,54)"; + "let testInt16ToIntPtrOperator(e1) = Operators.ToIntPtr (e1) @ (50,45--50,57)"; + "let testInt16ToUIntPtrOperator(e1) = Operators.ToUIntPtr (e1) @ (51,45--51,58)"; + "let testInt16ToSingleOperator(e1) = Operators.ToSingle (e1) @ (52,45--52,55)"; + "let testInt16ToDoubleOperator(e1) = Operators.ToDouble (e1) @ (53,45--53,53)"; + "let testInt16ToDecimalOperator(e1) = Operators.ToDecimal (e1) @ (54,45--54,55)"; + "let testInt16ToCharOperator(e1) = Operators.ToChar (e1) @ (55,45--55,52)"; + "let testInt16ToStringOperator(e1) = Operators.ToString (e1) @ (56,45--56,54)"; + ] + + let expectedOptimized = [ + "type OperatorTestsInt16"; + "let testInt16EqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,67--4,75)"; + "let testInt16NotEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_Equality (e1,e2),False) @ (5,67--5,76)"; + "let testInt16LessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,67--6,75)"; + "let testInt16LessThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_GreaterThan (e1,e2),False) @ (7,67--7,76)"; + "let testInt16GreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,67--8,75)"; + "let testInt16GreaterThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_LessThan (e1,e2),False) @ (9,67--9,76)"; + "let testInt16AdditionOperator(e1) (e2) = Operators.ToInt16 (Operators.op_Addition (e1,e2)) @ (11,59--11,67)"; + "let testInt16SubtractionOperator(e1) (e2) = Operators.ToInt16 (Operators.op_Subtraction (e1,e2)) @ (12,59--12,67)"; + "let testInt16MultiplyOperator(e1) (e2) = Operators.ToInt16 (Operators.op_Multiply (e1,e2)) @ (13,58--13,67)"; + "let testInt16DivisionOperator(e1) (e2) = Operators.ToInt16 (Operators.op_Division (e1,e2)) @ (14,59--14,67)"; + "let testInt16ModulusOperator(e1) (e2) = Operators.ToInt16 (Operators.op_Modulus (e1,e2)) @ (15,59--15,67)"; + "let testInt16BitwiseAndOperator(e1) (e2) = Operators.op_BitwiseAnd (e1,e2) @ (16,59--16,69)"; + "let testInt16BitwiseOrOperator(e1) (e2) = Operators.op_BitwiseOr (e1,e2) @ (17,59--17,69)"; + "let testInt16BitwiseXorOperator(e1) (e2) = Operators.op_ExclusiveOr (e1,e2) @ (18,59--18,69)"; + "let testInt16ShiftLeftOperator(e1) (e2) = Operators.ToInt16 (Operators.op_LeftShift (e1,Operators.op_BitwiseAnd (e2,15))) @ (19,57--19,67)"; + "let testInt16ShiftRightOperator(e1) (e2) = Operators.ToInt16 (Operators.op_RightShift (e1,Operators.op_BitwiseAnd (e2,15))) @ (20,57--20,67)"; + "let testInt16UnaryNegOperator(e1) = Operators.op_UnaryNegation (e1) @ (22,46--22,52)"; + "let testInt16AdditionChecked(e1) (e2) = Checked.ToInt16 (Checked.op_Addition (e1,e2)) @ (24,56--24,73)"; + "let testInt16SubtractionChecked(e1) (e2) = Checked.ToInt16 (Checked.op_Subtraction (e1,e2)) @ (25,56--25,73)"; + "let testInt16MultiplyChecked(e1) (e2) = Checked.ToInt16 (Checked.op_Multiply (e1,e2)) @ (26,56--26,73)"; + "let testInt16UnaryNegChecked(e1) = Checked.op_Subtraction (0,e1) @ (27,45--27,60)"; + "let testInt16ToByteChecked(e1) = Checked.ToByte (e1) @ (29,45--29,60)"; + "let testInt16ToSByteChecked(e1) = Checked.ToSByte (e1) @ (30,45--30,61)"; + "let testInt16ToInt16Checked(e1) = Checked.ToInt16 (e1) @ (31,45--31,61)"; + "let testInt16ToUInt16Checked(e1) = Checked.ToUInt16 (e1) @ (32,45--32,62)"; + "let testInt16ToIntChecked(e1) = Checked.ToInt32 (e1) @ (33,45--33,59)"; + "let testInt16ToInt32Checked(e1) = Checked.ToInt32 (e1) @ (34,45--34,61)"; + "let testInt16ToUInt32Checked(e1) = Checked.ToUInt32 (e1) @ (35,45--35,62)"; + "let testInt16ToInt64Checked(e1) = Checked.ToInt64 (e1) @ (36,45--36,61)"; + "let testInt16ToUInt64Checked(e1) = Checked.ToUInt64 (e1) @ (37,45--37,62)"; + "let testInt16ToIntPtrChecked(e1) = Checked.ToIntPtr (e1) @ (38,45--38,65)"; + "let testInt16ToUIntPtrChecked(e1) = Checked.ToUIntPtr (e1) @ (39,45--39,66)"; + "let testInt16ToByteOperator(e1) = Operators.ToByte (e1) @ (41,45--41,52)"; + "let testInt16ToSByteOperator(e1) = Operators.ToSByte (e1) @ (42,45--42,53)"; + "let testInt16ToInt16Operator(e1) = Operators.ToInt16 (e1) @ (43,45--43,53)"; + "let testInt16ToUInt16Operator(e1) = Operators.ToUInt16 (e1) @ (44,45--44,54)"; + "let testInt16ToIntOperator(e1) = Operators.ToInt32 (e1) @ (45,45--45,51)"; + "let testInt16ToInt32Operator(e1) = Operators.ToInt32 (e1) @ (46,45--46,53)"; + "let testInt16ToUInt32Operator(e1) = Operators.ToUInt32 (e1) @ (47,45--47,54)"; + "let testInt16ToInt64Operator(e1) = Operators.ToInt64 (e1) @ (48,45--48,53)"; + "let testInt16ToUInt64Operator(e1) = Operators.ToInt64 (e1) @ (49,45--49,54)"; + "let testInt16ToIntPtrOperator(e1) = Operators.ToIntPtr (e1) @ (50,45--50,57)"; + "let testInt16ToUIntPtrOperator(e1) = Operators.ToIntPtr (e1) @ (51,45--51,58)"; + "let testInt16ToSingleOperator(e1) = Operators.ToSingle (e1) @ (52,45--52,55)"; + "let testInt16ToDoubleOperator(e1) = Operators.ToDouble (e1) @ (53,45--53,53)"; + "let testInt16ToDecimalOperator(e1) = Convert.ToDecimal (e1) @ (54,45--54,55)"; + "let testInt16ToCharOperator(e1) = Operators.ToChar (e1) @ (55,45--55,52)"; + "let testInt16ToStringOperator(e1) = let matchValue: Microsoft.FSharp.Core.obj = Operators.Box (e1) in match (if Operators.op_Equality (matchValue,dflt) then $0 else (if matchValue :? System.IFormattable then $1 else $2)) targets ... @ (56,45--56,54)"; + ] + + testOperators "Int16" "int16" excludedTests expectedUnoptimized expectedOptimized + +[] +let ``Test Operator Declarations for UInt16`` () = + let excludedTests = [ + "testUInt16UnaryNegOperator"; + "testUInt16UnaryNegChecked"; + ] + + let expectedUnoptimized = [ + "type OperatorTestsUInt16"; + "let testUInt16EqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,70--4,78)"; + "let testUInt16NotEqualsOperator(e1) (e2) = Operators.op_Inequality (e1,e2) @ (5,70--5,79)"; + "let testUInt16LessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,70--6,78)"; + "let testUInt16LessThanOrEqualsOperator(e1) (e2) = Operators.op_LessThanOrEqual (e1,e2) @ (7,70--7,79)"; + "let testUInt16GreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,70--8,78)"; + "let testUInt16GreaterThanOrEqualsOperator(e1) (e2) = Operators.op_GreaterThanOrEqual (e1,e2) @ (9,70--9,79)"; + "let testUInt16AdditionOperator(e1) (e2) = Operators.op_Addition (e1,e2) @ (11,62--11,70)"; + "let testUInt16SubtractionOperator(e1) (e2) = Operators.op_Subtraction (e1,e2) @ (12,62--12,70)"; + "let testUInt16MultiplyOperator(e1) (e2) = Operators.op_Multiply (e1,e2) @ (13,61--13,70)"; + "let testUInt16DivisionOperator(e1) (e2) = Operators.op_Division (e1,e2) @ (14,62--14,70)"; + "let testUInt16ModulusOperator(e1) (e2) = Operators.op_Modulus (e1,e2) @ (15,62--15,70)"; + "let testUInt16BitwiseAndOperator(e1) (e2) = Operators.op_BitwiseAnd (e1,e2) @ (16,62--16,72)"; + "let testUInt16BitwiseOrOperator(e1) (e2) = Operators.op_BitwiseOr (e1,e2) @ (17,62--17,72)"; + "let testUInt16BitwiseXorOperator(e1) (e2) = Operators.op_ExclusiveOr (e1,e2) @ (18,62--18,72)"; + "let testUInt16ShiftLeftOperator(e1) (e2) = Operators.op_LeftShift (e1,e2) @ (19,59--19,69)"; + "let testUInt16ShiftRightOperator(e1) (e2) = Operators.op_RightShift (e1,e2) @ (20,59--20,69)"; + "let testUInt16AdditionChecked(e1) (e2) = Checked.op_Addition (e1,e2) @ (24,59--24,76)"; + "let testUInt16SubtractionChecked(e1) (e2) = Checked.op_Subtraction (e1,e2) @ (25,59--25,76)"; + "let testUInt16MultiplyChecked(e1) (e2) = Checked.op_Multiply (e1,e2) @ (26,59--26,76)"; + "let testUInt16ToByteChecked(e1) = Checked.ToByte (e1) @ (29,47--29,62)"; + "let testUInt16ToSByteChecked(e1) = Checked.ToSByte (e1) @ (30,47--30,63)"; + "let testUInt16ToInt16Checked(e1) = Checked.ToInt16 (e1) @ (31,47--31,63)"; + "let testUInt16ToUInt16Checked(e1) = Checked.ToUInt16 (e1) @ (32,47--32,64)"; + "let testUInt16ToIntChecked(e1) = Checked.ToInt (e1) @ (33,47--33,61)"; + "let testUInt16ToInt32Checked(e1) = Checked.ToInt32 (e1) @ (34,47--34,63)"; + "let testUInt16ToUInt32Checked(e1) = Checked.ToUInt32 (e1) @ (35,47--35,64)"; + "let testUInt16ToInt64Checked(e1) = Checked.ToInt64 (e1) @ (36,47--36,63)"; + "let testUInt16ToUInt64Checked(e1) = Checked.ToUInt64 (e1) @ (37,47--37,64)"; + "let testUInt16ToIntPtrChecked(e1) = Checked.ToIntPtr (e1) @ (38,47--38,67)"; + "let testUInt16ToUIntPtrChecked(e1) = Checked.ToUIntPtr (e1) @ (39,47--39,68)"; + "let testUInt16ToByteOperator(e1) = Operators.ToByte (e1) @ (41,47--41,54)"; + "let testUInt16ToSByteOperator(e1) = Operators.ToSByte (e1) @ (42,47--42,55)"; + "let testUInt16ToInt16Operator(e1) = Operators.ToInt16 (e1) @ (43,47--43,55)"; + "let testUInt16ToUInt16Operator(e1) = Operators.ToUInt16 (e1) @ (44,47--44,56)"; + "let testUInt16ToIntOperator(e1) = Operators.ToInt (e1) @ (45,47--45,53)"; + "let testUInt16ToInt32Operator(e1) = Operators.ToInt32 (e1) @ (46,47--46,55)"; + "let testUInt16ToUInt32Operator(e1) = Operators.ToUInt32 (e1) @ (47,47--47,56)"; + "let testUInt16ToInt64Operator(e1) = Operators.ToInt64 (e1) @ (48,47--48,55)"; + "let testUInt16ToUInt64Operator(e1) = Operators.ToUInt64 (e1) @ (49,47--49,56)"; + "let testUInt16ToIntPtrOperator(e1) = Operators.ToIntPtr (e1) @ (50,47--50,59)"; + "let testUInt16ToUIntPtrOperator(e1) = Operators.ToUIntPtr (e1) @ (51,47--51,60)"; + "let testUInt16ToSingleOperator(e1) = Operators.ToSingle (e1) @ (52,47--52,57)"; + "let testUInt16ToDoubleOperator(e1) = Operators.ToDouble (e1) @ (53,47--53,55)"; + "let testUInt16ToDecimalOperator(e1) = Operators.ToDecimal (e1) @ (54,47--54,57)"; + "let testUInt16ToCharOperator(e1) = Operators.ToChar (e1) @ (55,47--55,54)"; + "let testUInt16ToStringOperator(e1) = Operators.ToString (e1) @ (56,47--56,56)"; + ] + + let expectedOptimized = [ + "type OperatorTestsUInt16"; + "let testUInt16EqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,70--4,78)"; + "let testUInt16NotEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_Equality (e1,e2),False) @ (5,70--5,79)"; + "let testUInt16LessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,70--6,78)"; + "let testUInt16LessThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_GreaterThan (e1,e2),False) @ (7,70--7,79)"; + "let testUInt16GreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,70--8,78)"; + "let testUInt16GreaterThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_LessThan (e1,e2),False) @ (9,70--9,79)"; + "let testUInt16AdditionOperator(e1) (e2) = Operators.ToUInt16 (Operators.op_Addition (e1,e2)) @ (11,62--11,70)"; + "let testUInt16SubtractionOperator(e1) (e2) = Operators.ToUInt16 (Operators.op_Subtraction (e1,e2)) @ (12,62--12,70)"; + "let testUInt16MultiplyOperator(e1) (e2) = Operators.ToUInt16 (Operators.op_Multiply (e1,e2)) @ (13,61--13,70)"; + "let testUInt16DivisionOperator(e1) (e2) = Operators.ToUInt16 (Operators.op_Division (e1,e2)) @ (14,62--14,70)"; + "let testUInt16ModulusOperator(e1) (e2) = Operators.ToUInt16 (Operators.op_Modulus (e1,e2)) @ (15,62--15,70)"; + "let testUInt16BitwiseAndOperator(e1) (e2) = Operators.op_BitwiseAnd (e1,e2) @ (16,62--16,72)"; + "let testUInt16BitwiseOrOperator(e1) (e2) = Operators.op_BitwiseOr (e1,e2) @ (17,62--17,72)"; + "let testUInt16BitwiseXorOperator(e1) (e2) = Operators.op_ExclusiveOr (e1,e2) @ (18,62--18,72)"; + "let testUInt16ShiftLeftOperator(e1) (e2) = Operators.ToUInt16 (Operators.op_LeftShift (e1,Operators.op_BitwiseAnd (e2,15))) @ (19,59--19,69)"; + "let testUInt16ShiftRightOperator(e1) (e2) = Operators.ToUInt16 (Operators.op_RightShift (e1,Operators.op_BitwiseAnd (e2,15))) @ (20,59--20,69)"; + "let testUInt16AdditionChecked(e1) (e2) = Checked.ToUInt16 (Checked.op_Addition (e1,e2)) @ (24,59--24,76)"; + "let testUInt16SubtractionChecked(e1) (e2) = Checked.ToUInt16 (Checked.op_Subtraction (e1,e2)) @ (25,59--25,76)"; + "let testUInt16MultiplyChecked(e1) (e2) = Checked.ToUInt16 (Checked.op_Multiply (e1,e2)) @ (26,59--26,76)"; + "let testUInt16ToByteChecked(e1) = Checked.ToByte (e1) @ (29,47--29,62)"; + "let testUInt16ToSByteChecked(e1) = Checked.ToSByte (e1) @ (30,47--30,63)"; + "let testUInt16ToInt16Checked(e1) = Checked.ToInt16 (e1) @ (31,47--31,63)"; + "let testUInt16ToUInt16Checked(e1) = Checked.ToUInt16 (e1) @ (32,47--32,64)"; + "let testUInt16ToIntChecked(e1) = Checked.ToInt32 (e1) @ (33,47--33,61)"; + "let testUInt16ToInt32Checked(e1) = Checked.ToInt32 (e1) @ (34,47--34,63)"; + "let testUInt16ToUInt32Checked(e1) = Checked.ToUInt32 (e1) @ (35,47--35,64)"; + "let testUInt16ToInt64Checked(e1) = Checked.ToInt64 (e1) @ (36,47--36,63)"; + "let testUInt16ToUInt64Checked(e1) = Checked.ToUInt64 (e1) @ (37,47--37,64)"; + "let testUInt16ToIntPtrChecked(e1) = Checked.ToIntPtr (e1) @ (38,47--38,67)"; + "let testUInt16ToUIntPtrChecked(e1) = Checked.ToUIntPtr (e1) @ (39,47--39,68)"; + "let testUInt16ToByteOperator(e1) = Operators.ToByte (e1) @ (41,47--41,54)"; + "let testUInt16ToSByteOperator(e1) = Operators.ToSByte (e1) @ (42,47--42,55)"; + "let testUInt16ToInt16Operator(e1) = Operators.ToInt16 (e1) @ (43,47--43,55)"; + "let testUInt16ToUInt16Operator(e1) = Operators.ToUInt16 (e1) @ (44,47--44,56)"; + "let testUInt16ToIntOperator(e1) = Operators.ToInt32 (e1) @ (45,47--45,53)"; + "let testUInt16ToInt32Operator(e1) = Operators.ToInt32 (e1) @ (46,47--46,55)"; + "let testUInt16ToUInt32Operator(e1) = Operators.ToUInt32 (e1) @ (47,47--47,56)"; + "let testUInt16ToInt64Operator(e1) = Operators.ToUInt64 (e1) @ (48,47--48,55)"; + "let testUInt16ToUInt64Operator(e1) = Operators.ToUInt64 (e1) @ (49,47--49,56)"; + "let testUInt16ToIntPtrOperator(e1) = Operators.ToUIntPtr (e1) @ (50,47--50,59)"; + "let testUInt16ToUIntPtrOperator(e1) = Operators.ToUIntPtr (e1) @ (51,47--51,60)"; + "let testUInt16ToSingleOperator(e1) = Operators.ToSingle (Operators.ToDouble (e1)) @ (52,47--52,57)"; + "let testUInt16ToDoubleOperator(e1) = Operators.ToDouble (Operators.ToDouble (e1)) @ (53,47--53,55)"; + "let testUInt16ToDecimalOperator(e1) = Convert.ToDecimal (e1) @ (54,47--54,57)"; + "let testUInt16ToCharOperator(e1) = Operators.ToChar (e1) @ (55,47--55,54)"; + "let testUInt16ToStringOperator(e1) = let matchValue: Microsoft.FSharp.Core.obj = Operators.Box (e1) in match (if Operators.op_Equality (matchValue,dflt) then $0 else (if matchValue :? System.IFormattable then $1 else $2)) targets ... @ (56,47--56,56)"; + ] + + testOperators "UInt16" "uint16" excludedTests expectedUnoptimized expectedOptimized + +[] +let ``Test Operator Declarations for Int`` () = + let excludedTests = [ ] + + let expectedUnoptimized = [ + "type OperatorTestsInt"; + "let testIntEqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,61--4,69)"; + "let testIntNotEqualsOperator(e1) (e2) = Operators.op_Inequality (e1,e2) @ (5,61--5,70)"; + "let testIntLessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,61--6,69)"; + "let testIntLessThanOrEqualsOperator(e1) (e2) = Operators.op_LessThanOrEqual (e1,e2) @ (7,61--7,70)"; + "let testIntGreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,61--8,69)"; + "let testIntGreaterThanOrEqualsOperator(e1) (e2) = Operators.op_GreaterThanOrEqual (e1,e2) @ (9,61--9,70)"; + "let testIntAdditionOperator(e1) (e2) = Operators.op_Addition (e1,e2) @ (11,53--11,61)"; + "let testIntSubtractionOperator(e1) (e2) = Operators.op_Subtraction (e1,e2) @ (12,53--12,61)"; + "let testIntMultiplyOperator(e1) (e2) = Operators.op_Multiply (e1,e2) @ (13,52--13,61)"; + "let testIntDivisionOperator(e1) (e2) = Operators.op_Division (e1,e2) @ (14,53--14,61)"; + "let testIntModulusOperator(e1) (e2) = Operators.op_Modulus (e1,e2) @ (15,53--15,61)"; + "let testIntBitwiseAndOperator(e1) (e2) = Operators.op_BitwiseAnd (e1,e2) @ (16,53--16,63)"; + "let testIntBitwiseOrOperator(e1) (e2) = Operators.op_BitwiseOr (e1,e2) @ (17,53--17,63)"; + "let testIntBitwiseXorOperator(e1) (e2) = Operators.op_ExclusiveOr (e1,e2) @ (18,53--18,63)"; + "let testIntShiftLeftOperator(e1) (e2) = Operators.op_LeftShift (e1,e2) @ (19,53--19,63)"; + "let testIntShiftRightOperator(e1) (e2) = Operators.op_RightShift (e1,e2) @ (20,53--20,63)"; + "let testIntUnaryNegOperator(e1) = Operators.op_UnaryNegation (e1) @ (22,42--22,48)"; + "let testIntAdditionChecked(e1) (e2) = Checked.op_Addition (e1,e2) @ (24,50--24,67)"; + "let testIntSubtractionChecked(e1) (e2) = Checked.op_Subtraction (e1,e2) @ (25,50--25,67)"; + "let testIntMultiplyChecked(e1) (e2) = Checked.op_Multiply (e1,e2) @ (26,50--26,67)"; + "let testIntUnaryNegChecked(e1) = Checked.op_UnaryNegation (e1) @ (27,41--27,56)"; + "let testIntToByteChecked(e1) = Checked.ToByte (e1) @ (29,41--29,56)"; + "let testIntToSByteChecked(e1) = Checked.ToSByte (e1) @ (30,41--30,57)"; + "let testIntToInt16Checked(e1) = Checked.ToInt16 (e1) @ (31,41--31,57)"; + "let testIntToUInt16Checked(e1) = Checked.ToUInt16 (e1) @ (32,41--32,58)"; + "let testIntToIntChecked(e1) = Checked.ToInt (e1) @ (33,41--33,55)"; + "let testIntToInt32Checked(e1) = Checked.ToInt32 (e1) @ (34,41--34,57)"; + "let testIntToUInt32Checked(e1) = Checked.ToUInt32 (e1) @ (35,41--35,58)"; + "let testIntToInt64Checked(e1) = Checked.ToInt64 (e1) @ (36,41--36,57)"; + "let testIntToUInt64Checked(e1) = Checked.ToUInt64 (e1) @ (37,41--37,58)"; + "let testIntToIntPtrChecked(e1) = Checked.ToIntPtr (e1) @ (38,41--38,61)"; + "let testIntToUIntPtrChecked(e1) = Checked.ToUIntPtr (e1) @ (39,41--39,62)"; + "let testIntToByteOperator(e1) = Operators.ToByte (e1) @ (41,41--41,48)"; + "let testIntToSByteOperator(e1) = Operators.ToSByte (e1) @ (42,41--42,49)"; + "let testIntToInt16Operator(e1) = Operators.ToInt16 (e1) @ (43,41--43,49)"; + "let testIntToUInt16Operator(e1) = Operators.ToUInt16 (e1) @ (44,41--44,50)"; + "let testIntToIntOperator(e1) = Operators.ToInt (e1) @ (45,41--45,47)"; + "let testIntToInt32Operator(e1) = Operators.ToInt32 (e1) @ (46,41--46,49)"; + "let testIntToUInt32Operator(e1) = Operators.ToUInt32 (e1) @ (47,41--47,50)"; + "let testIntToInt64Operator(e1) = Operators.ToInt64 (e1) @ (48,41--48,49)"; + "let testIntToUInt64Operator(e1) = Operators.ToUInt64 (e1) @ (49,41--49,50)"; + "let testIntToIntPtrOperator(e1) = Operators.ToIntPtr (e1) @ (50,41--50,53)"; + "let testIntToUIntPtrOperator(e1) = Operators.ToUIntPtr (e1) @ (51,41--51,54)"; + "let testIntToSingleOperator(e1) = Operators.ToSingle (e1) @ (52,41--52,51)"; + "let testIntToDoubleOperator(e1) = Operators.ToDouble (e1) @ (53,41--53,49)"; + "let testIntToDecimalOperator(e1) = Operators.ToDecimal (e1) @ (54,41--54,51)"; + "let testIntToCharOperator(e1) = Operators.ToChar (e1) @ (55,41--55,48)"; + "let testIntToStringOperator(e1) = Operators.ToString (e1) @ (56,41--56,50)"; + ] + + let expectedOptimized = [ + "type OperatorTestsInt"; + "let testIntEqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,61--4,69)"; + "let testIntNotEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_Equality (e1,e2),False) @ (5,61--5,70)"; + "let testIntLessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,61--6,69)"; + "let testIntLessThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_GreaterThan (e1,e2),False) @ (7,61--7,70)"; + "let testIntGreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,61--8,69)"; + "let testIntGreaterThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_LessThan (e1,e2),False) @ (9,61--9,70)"; + "let testIntAdditionOperator(e1) (e2) = Operators.op_Addition (e1,e2) @ (11,53--11,61)"; + "let testIntSubtractionOperator(e1) (e2) = Operators.op_Subtraction (e1,e2) @ (12,53--12,61)"; + "let testIntMultiplyOperator(e1) (e2) = Operators.op_Multiply (e1,e2) @ (13,52--13,61)"; + "let testIntDivisionOperator(e1) (e2) = Operators.op_Division (e1,e2) @ (14,53--14,61)"; + "let testIntModulusOperator(e1) (e2) = Operators.op_Modulus (e1,e2) @ (15,53--15,61)"; + "let testIntBitwiseAndOperator(e1) (e2) = Operators.op_BitwiseAnd (e1,e2) @ (16,53--16,63)"; + "let testIntBitwiseOrOperator(e1) (e2) = Operators.op_BitwiseOr (e1,e2) @ (17,53--17,63)"; + "let testIntBitwiseXorOperator(e1) (e2) = Operators.op_ExclusiveOr (e1,e2) @ (18,53--18,63)"; + "let testIntShiftLeftOperator(e1) (e2) = Operators.op_LeftShift (e1,Operators.op_BitwiseAnd (e2,31)) @ (19,53--19,63)"; + "let testIntShiftRightOperator(e1) (e2) = Operators.op_RightShift (e1,Operators.op_BitwiseAnd (e2,31)) @ (20,53--20,63)"; + "let testIntUnaryNegOperator(e1) = Operators.op_UnaryNegation (e1) @ (22,42--22,48)"; + "let testIntAdditionChecked(e1) (e2) = Checked.op_Addition (e1,e2) @ (24,50--24,67)"; + "let testIntSubtractionChecked(e1) (e2) = Checked.op_Subtraction (e1,e2) @ (25,50--25,67)"; + "let testIntMultiplyChecked(e1) (e2) = Checked.op_Multiply (e1,e2) @ (26,50--26,67)"; + "let testIntUnaryNegChecked(e1) = Checked.op_Subtraction (0,e1) @ (27,41--27,56)"; + "let testIntToByteChecked(e1) = Checked.ToByte (e1) @ (29,41--29,56)"; + "let testIntToSByteChecked(e1) = Checked.ToSByte (e1) @ (30,41--30,57)"; + "let testIntToInt16Checked(e1) = Checked.ToInt16 (e1) @ (31,41--31,57)"; + "let testIntToUInt16Checked(e1) = Checked.ToUInt16 (e1) @ (32,41--32,58)"; + "let testIntToIntChecked(e1) = Checked.ToInt32 (e1) @ (33,41--33,55)"; + "let testIntToInt32Checked(e1) = Checked.ToInt32 (e1) @ (34,41--34,57)"; + "let testIntToUInt32Checked(e1) = Checked.ToUInt32 (e1) @ (35,41--35,58)"; + "let testIntToInt64Checked(e1) = Checked.ToInt64 (e1) @ (36,41--36,57)"; + "let testIntToUInt64Checked(e1) = Checked.ToUInt64 (e1) @ (37,41--37,58)"; + "let testIntToIntPtrChecked(e1) = Checked.ToIntPtr (e1) @ (38,41--38,61)"; + "let testIntToUIntPtrChecked(e1) = Checked.ToUIntPtr (e1) @ (39,41--39,62)"; + "let testIntToByteOperator(e1) = Operators.ToByte (e1) @ (41,41--41,48)"; + "let testIntToSByteOperator(e1) = Operators.ToSByte (e1) @ (42,41--42,49)"; + "let testIntToInt16Operator(e1) = Operators.ToInt16 (e1) @ (43,41--43,49)"; + "let testIntToUInt16Operator(e1) = Operators.ToUInt16 (e1) @ (44,41--44,50)"; + "let testIntToIntOperator(e1) = e1 @ (45,45--45,47)"; + "let testIntToInt32Operator(e1) = e1 @ (46,47--46,49)"; + "let testIntToUInt32Operator(e1) = Operators.ToUInt32 (e1) @ (47,41--47,50)"; + "let testIntToInt64Operator(e1) = Operators.ToInt64 (e1) @ (48,41--48,49)"; + "let testIntToUInt64Operator(e1) = Operators.ToInt64 (e1) @ (49,41--49,50)"; + "let testIntToIntPtrOperator(e1) = Operators.ToIntPtr (e1) @ (50,41--50,53)"; + "let testIntToUIntPtrOperator(e1) = Operators.ToIntPtr (e1) @ (51,41--51,54)"; + "let testIntToSingleOperator(e1) = Operators.ToSingle (e1) @ (52,41--52,51)"; + "let testIntToDoubleOperator(e1) = Operators.ToDouble (e1) @ (53,41--53,49)"; + "let testIntToDecimalOperator(e1) = Convert.ToDecimal (e1) @ (54,41--54,51)"; + "let testIntToCharOperator(e1) = Operators.ToChar (e1) @ (55,41--55,48)"; + "let testIntToStringOperator(e1) = let matchValue: Microsoft.FSharp.Core.obj = Operators.Box (e1) in match (if Operators.op_Equality (matchValue,dflt) then $0 else (if matchValue :? System.IFormattable then $1 else $2)) targets ... @ (56,41--56,50)"; + ] + + testOperators "Int" "int" excludedTests expectedUnoptimized expectedOptimized + +[] +let ``Test Operator Declarations for Int32`` () = + let excludedTests = [ ] + + let expectedUnoptimized = [ + "type OperatorTestsInt32"; + "let testInt32EqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,67--4,75)"; + "let testInt32NotEqualsOperator(e1) (e2) = Operators.op_Inequality (e1,e2) @ (5,67--5,76)"; + "let testInt32LessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,67--6,75)"; + "let testInt32LessThanOrEqualsOperator(e1) (e2) = Operators.op_LessThanOrEqual (e1,e2) @ (7,67--7,76)"; + "let testInt32GreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,67--8,75)"; + "let testInt32GreaterThanOrEqualsOperator(e1) (e2) = Operators.op_GreaterThanOrEqual (e1,e2) @ (9,67--9,76)"; + "let testInt32AdditionOperator(e1) (e2) = Operators.op_Addition (e1,e2) @ (11,59--11,67)"; + "let testInt32SubtractionOperator(e1) (e2) = Operators.op_Subtraction (e1,e2) @ (12,59--12,67)"; + "let testInt32MultiplyOperator(e1) (e2) = Operators.op_Multiply (e1,e2) @ (13,58--13,67)"; + "let testInt32DivisionOperator(e1) (e2) = Operators.op_Division (e1,e2) @ (14,59--14,67)"; + "let testInt32ModulusOperator(e1) (e2) = Operators.op_Modulus (e1,e2) @ (15,59--15,67)"; + "let testInt32BitwiseAndOperator(e1) (e2) = Operators.op_BitwiseAnd (e1,e2) @ (16,59--16,69)"; + "let testInt32BitwiseOrOperator(e1) (e2) = Operators.op_BitwiseOr (e1,e2) @ (17,59--17,69)"; + "let testInt32BitwiseXorOperator(e1) (e2) = Operators.op_ExclusiveOr (e1,e2) @ (18,59--18,69)"; + "let testInt32ShiftLeftOperator(e1) (e2) = Operators.op_LeftShift (e1,e2) @ (19,57--19,67)"; + "let testInt32ShiftRightOperator(e1) (e2) = Operators.op_RightShift (e1,e2) @ (20,57--20,67)"; + "let testInt32UnaryNegOperator(e1) = Operators.op_UnaryNegation (e1) @ (22,46--22,52)"; + "let testInt32AdditionChecked(e1) (e2) = Checked.op_Addition (e1,e2) @ (24,56--24,73)"; + "let testInt32SubtractionChecked(e1) (e2) = Checked.op_Subtraction (e1,e2) @ (25,56--25,73)"; + "let testInt32MultiplyChecked(e1) (e2) = Checked.op_Multiply (e1,e2) @ (26,56--26,73)"; + "let testInt32UnaryNegChecked(e1) = Checked.op_UnaryNegation (e1) @ (27,45--27,60)"; + "let testInt32ToByteChecked(e1) = Checked.ToByte (e1) @ (29,45--29,60)"; + "let testInt32ToSByteChecked(e1) = Checked.ToSByte (e1) @ (30,45--30,61)"; + "let testInt32ToInt16Checked(e1) = Checked.ToInt16 (e1) @ (31,45--31,61)"; + "let testInt32ToUInt16Checked(e1) = Checked.ToUInt16 (e1) @ (32,45--32,62)"; + "let testInt32ToIntChecked(e1) = Checked.ToInt (e1) @ (33,45--33,59)"; + "let testInt32ToInt32Checked(e1) = Checked.ToInt32 (e1) @ (34,45--34,61)"; + "let testInt32ToUInt32Checked(e1) = Checked.ToUInt32 (e1) @ (35,45--35,62)"; + "let testInt32ToInt64Checked(e1) = Checked.ToInt64 (e1) @ (36,45--36,61)"; + "let testInt32ToUInt64Checked(e1) = Checked.ToUInt64 (e1) @ (37,45--37,62)"; + "let testInt32ToIntPtrChecked(e1) = Checked.ToIntPtr (e1) @ (38,45--38,65)"; + "let testInt32ToUIntPtrChecked(e1) = Checked.ToUIntPtr (e1) @ (39,45--39,66)"; + "let testInt32ToByteOperator(e1) = Operators.ToByte (e1) @ (41,45--41,52)"; + "let testInt32ToSByteOperator(e1) = Operators.ToSByte (e1) @ (42,45--42,53)"; + "let testInt32ToInt16Operator(e1) = Operators.ToInt16 (e1) @ (43,45--43,53)"; + "let testInt32ToUInt16Operator(e1) = Operators.ToUInt16 (e1) @ (44,45--44,54)"; + "let testInt32ToIntOperator(e1) = Operators.ToInt (e1) @ (45,45--45,51)"; + "let testInt32ToInt32Operator(e1) = Operators.ToInt32 (e1) @ (46,45--46,53)"; + "let testInt32ToUInt32Operator(e1) = Operators.ToUInt32 (e1) @ (47,45--47,54)"; + "let testInt32ToInt64Operator(e1) = Operators.ToInt64 (e1) @ (48,45--48,53)"; + "let testInt32ToUInt64Operator(e1) = Operators.ToUInt64 (e1) @ (49,45--49,54)"; + "let testInt32ToIntPtrOperator(e1) = Operators.ToIntPtr (e1) @ (50,45--50,57)"; + "let testInt32ToUIntPtrOperator(e1) = Operators.ToUIntPtr (e1) @ (51,45--51,58)"; + "let testInt32ToSingleOperator(e1) = Operators.ToSingle (e1) @ (52,45--52,55)"; + "let testInt32ToDoubleOperator(e1) = Operators.ToDouble (e1) @ (53,45--53,53)"; + "let testInt32ToDecimalOperator(e1) = Operators.ToDecimal (e1) @ (54,45--54,55)"; + "let testInt32ToCharOperator(e1) = Operators.ToChar (e1) @ (55,45--55,52)"; + "let testInt32ToStringOperator(e1) = Operators.ToString (e1) @ (56,45--56,54)"; + ] + + let expectedOptimized = [ + "type OperatorTestsInt32"; + "let testInt32EqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,67--4,75)"; + "let testInt32NotEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_Equality (e1,e2),False) @ (5,67--5,76)"; + "let testInt32LessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,67--6,75)"; + "let testInt32LessThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_GreaterThan (e1,e2),False) @ (7,67--7,76)"; + "let testInt32GreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,67--8,75)"; + "let testInt32GreaterThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_LessThan (e1,e2),False) @ (9,67--9,76)"; + "let testInt32AdditionOperator(e1) (e2) = Operators.op_Addition (e1,e2) @ (11,59--11,67)"; + "let testInt32SubtractionOperator(e1) (e2) = Operators.op_Subtraction (e1,e2) @ (12,59--12,67)"; + "let testInt32MultiplyOperator(e1) (e2) = Operators.op_Multiply (e1,e2) @ (13,58--13,67)"; + "let testInt32DivisionOperator(e1) (e2) = Operators.op_Division (e1,e2) @ (14,59--14,67)"; + "let testInt32ModulusOperator(e1) (e2) = Operators.op_Modulus (e1,e2) @ (15,59--15,67)"; + "let testInt32BitwiseAndOperator(e1) (e2) = Operators.op_BitwiseAnd (e1,e2) @ (16,59--16,69)"; + "let testInt32BitwiseOrOperator(e1) (e2) = Operators.op_BitwiseOr (e1,e2) @ (17,59--17,69)"; + "let testInt32BitwiseXorOperator(e1) (e2) = Operators.op_ExclusiveOr (e1,e2) @ (18,59--18,69)"; + "let testInt32ShiftLeftOperator(e1) (e2) = Operators.op_LeftShift (e1,Operators.op_BitwiseAnd (e2,31)) @ (19,57--19,67)"; + "let testInt32ShiftRightOperator(e1) (e2) = Operators.op_RightShift (e1,Operators.op_BitwiseAnd (e2,31)) @ (20,57--20,67)"; + "let testInt32UnaryNegOperator(e1) = Operators.op_UnaryNegation (e1) @ (22,46--22,52)"; + "let testInt32AdditionChecked(e1) (e2) = Checked.op_Addition (e1,e2) @ (24,56--24,73)"; + "let testInt32SubtractionChecked(e1) (e2) = Checked.op_Subtraction (e1,e2) @ (25,56--25,73)"; + "let testInt32MultiplyChecked(e1) (e2) = Checked.op_Multiply (e1,e2) @ (26,56--26,73)"; + "let testInt32UnaryNegChecked(e1) = Checked.op_Subtraction (0,e1) @ (27,45--27,60)"; + "let testInt32ToByteChecked(e1) = Checked.ToByte (e1) @ (29,45--29,60)"; + "let testInt32ToSByteChecked(e1) = Checked.ToSByte (e1) @ (30,45--30,61)"; + "let testInt32ToInt16Checked(e1) = Checked.ToInt16 (e1) @ (31,45--31,61)"; + "let testInt32ToUInt16Checked(e1) = Checked.ToUInt16 (e1) @ (32,45--32,62)"; + "let testInt32ToIntChecked(e1) = Checked.ToInt32 (e1) @ (33,45--33,59)"; + "let testInt32ToInt32Checked(e1) = Checked.ToInt32 (e1) @ (34,45--34,61)"; + "let testInt32ToUInt32Checked(e1) = Checked.ToUInt32 (e1) @ (35,45--35,62)"; + "let testInt32ToInt64Checked(e1) = Checked.ToInt64 (e1) @ (36,45--36,61)"; + "let testInt32ToUInt64Checked(e1) = Checked.ToUInt64 (e1) @ (37,45--37,62)"; + "let testInt32ToIntPtrChecked(e1) = Checked.ToIntPtr (e1) @ (38,45--38,65)"; + "let testInt32ToUIntPtrChecked(e1) = Checked.ToUIntPtr (e1) @ (39,45--39,66)"; + "let testInt32ToByteOperator(e1) = Operators.ToByte (e1) @ (41,45--41,52)"; + "let testInt32ToSByteOperator(e1) = Operators.ToSByte (e1) @ (42,45--42,53)"; + "let testInt32ToInt16Operator(e1) = Operators.ToInt16 (e1) @ (43,45--43,53)"; + "let testInt32ToUInt16Operator(e1) = Operators.ToUInt16 (e1) @ (44,45--44,54)"; + "let testInt32ToIntOperator(e1) = e1 @ (45,49--45,51)"; + "let testInt32ToInt32Operator(e1) = e1 @ (46,51--46,53)"; + "let testInt32ToUInt32Operator(e1) = Operators.ToUInt32 (e1) @ (47,45--47,54)"; + "let testInt32ToInt64Operator(e1) = Operators.ToInt64 (e1) @ (48,45--48,53)"; + "let testInt32ToUInt64Operator(e1) = Operators.ToInt64 (e1) @ (49,45--49,54)"; + "let testInt32ToIntPtrOperator(e1) = Operators.ToIntPtr (e1) @ (50,45--50,57)"; + "let testInt32ToUIntPtrOperator(e1) = Operators.ToIntPtr (e1) @ (51,45--51,58)"; + "let testInt32ToSingleOperator(e1) = Operators.ToSingle (e1) @ (52,45--52,55)"; + "let testInt32ToDoubleOperator(e1) = Operators.ToDouble (e1) @ (53,45--53,53)"; + "let testInt32ToDecimalOperator(e1) = Convert.ToDecimal (e1) @ (54,45--54,55)"; + "let testInt32ToCharOperator(e1) = Operators.ToChar (e1) @ (55,45--55,52)"; + "let testInt32ToStringOperator(e1) = let matchValue: Microsoft.FSharp.Core.obj = Operators.Box (e1) in match (if Operators.op_Equality (matchValue,dflt) then $0 else (if matchValue :? System.IFormattable then $1 else $2)) targets ... @ (56,45--56,54)"; + ] + + testOperators "Int32" "int32" excludedTests expectedUnoptimized expectedOptimized + +[] +let ``Test Operator Declarations for UInt32`` () = + let excludedTests = [ + "testUInt32UnaryNegOperator"; + "testUInt32UnaryNegChecked"; + ] + + let expectedUnoptimized = [ + "type OperatorTestsUInt32"; + "let testUInt32EqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,70--4,78)"; + "let testUInt32NotEqualsOperator(e1) (e2) = Operators.op_Inequality (e1,e2) @ (5,70--5,79)"; + "let testUInt32LessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,70--6,78)"; + "let testUInt32LessThanOrEqualsOperator(e1) (e2) = Operators.op_LessThanOrEqual (e1,e2) @ (7,70--7,79)"; + "let testUInt32GreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,70--8,78)"; + "let testUInt32GreaterThanOrEqualsOperator(e1) (e2) = Operators.op_GreaterThanOrEqual (e1,e2) @ (9,70--9,79)"; + "let testUInt32AdditionOperator(e1) (e2) = Operators.op_Addition (e1,e2) @ (11,62--11,70)"; + "let testUInt32SubtractionOperator(e1) (e2) = Operators.op_Subtraction (e1,e2) @ (12,62--12,70)"; + "let testUInt32MultiplyOperator(e1) (e2) = Operators.op_Multiply (e1,e2) @ (13,61--13,70)"; + "let testUInt32DivisionOperator(e1) (e2) = Operators.op_Division (e1,e2) @ (14,62--14,70)"; + "let testUInt32ModulusOperator(e1) (e2) = Operators.op_Modulus (e1,e2) @ (15,62--15,70)"; + "let testUInt32BitwiseAndOperator(e1) (e2) = Operators.op_BitwiseAnd (e1,e2) @ (16,62--16,72)"; + "let testUInt32BitwiseOrOperator(e1) (e2) = Operators.op_BitwiseOr (e1,e2) @ (17,62--17,72)"; + "let testUInt32BitwiseXorOperator(e1) (e2) = Operators.op_ExclusiveOr (e1,e2) @ (18,62--18,72)"; + "let testUInt32ShiftLeftOperator(e1) (e2) = Operators.op_LeftShift (e1,e2) @ (19,59--19,69)"; + "let testUInt32ShiftRightOperator(e1) (e2) = Operators.op_RightShift (e1,e2) @ (20,59--20,69)"; + "let testUInt32AdditionChecked(e1) (e2) = Checked.op_Addition (e1,e2) @ (24,59--24,76)"; + "let testUInt32SubtractionChecked(e1) (e2) = Checked.op_Subtraction (e1,e2) @ (25,59--25,76)"; + "let testUInt32MultiplyChecked(e1) (e2) = Checked.op_Multiply (e1,e2) @ (26,59--26,76)"; + "let testUInt32ToByteChecked(e1) = Checked.ToByte (e1) @ (29,47--29,62)"; + "let testUInt32ToSByteChecked(e1) = Checked.ToSByte (e1) @ (30,47--30,63)"; + "let testUInt32ToInt16Checked(e1) = Checked.ToInt16 (e1) @ (31,47--31,63)"; + "let testUInt32ToUInt16Checked(e1) = Checked.ToUInt16 (e1) @ (32,47--32,64)"; + "let testUInt32ToIntChecked(e1) = Checked.ToInt (e1) @ (33,47--33,61)"; + "let testUInt32ToInt32Checked(e1) = Checked.ToInt32 (e1) @ (34,47--34,63)"; + "let testUInt32ToUInt32Checked(e1) = Checked.ToUInt32 (e1) @ (35,47--35,64)"; + "let testUInt32ToInt64Checked(e1) = Checked.ToInt64 (e1) @ (36,47--36,63)"; + "let testUInt32ToUInt64Checked(e1) = Checked.ToUInt64 (e1) @ (37,47--37,64)"; + "let testUInt32ToIntPtrChecked(e1) = Checked.ToIntPtr (e1) @ (38,47--38,67)"; + "let testUInt32ToUIntPtrChecked(e1) = Checked.ToUIntPtr (e1) @ (39,47--39,68)"; + "let testUInt32ToByteOperator(e1) = Operators.ToByte (e1) @ (41,47--41,54)"; + "let testUInt32ToSByteOperator(e1) = Operators.ToSByte (e1) @ (42,47--42,55)"; + "let testUInt32ToInt16Operator(e1) = Operators.ToInt16 (e1) @ (43,47--43,55)"; + "let testUInt32ToUInt16Operator(e1) = Operators.ToUInt16 (e1) @ (44,47--44,56)"; + "let testUInt32ToIntOperator(e1) = Operators.ToInt (e1) @ (45,47--45,53)"; + "let testUInt32ToInt32Operator(e1) = Operators.ToInt32 (e1) @ (46,47--46,55)"; + "let testUInt32ToUInt32Operator(e1) = Operators.ToUInt32 (e1) @ (47,47--47,56)"; + "let testUInt32ToInt64Operator(e1) = Operators.ToInt64 (e1) @ (48,47--48,55)"; + "let testUInt32ToUInt64Operator(e1) = Operators.ToUInt64 (e1) @ (49,47--49,56)"; + "let testUInt32ToIntPtrOperator(e1) = Operators.ToIntPtr (e1) @ (50,47--50,59)"; + "let testUInt32ToUIntPtrOperator(e1) = Operators.ToUIntPtr (e1) @ (51,47--51,60)"; + "let testUInt32ToSingleOperator(e1) = Operators.ToSingle (e1) @ (52,47--52,57)"; + "let testUInt32ToDoubleOperator(e1) = Operators.ToDouble (e1) @ (53,47--53,55)"; + "let testUInt32ToDecimalOperator(e1) = Operators.ToDecimal (e1) @ (54,47--54,57)"; + "let testUInt32ToCharOperator(e1) = Operators.ToChar (e1) @ (55,47--55,54)"; + "let testUInt32ToStringOperator(e1) = Operators.ToString (e1) @ (56,47--56,56)"; + ] + + let expectedOptimized = [ + "type OperatorTestsUInt32"; + "let testUInt32EqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,70--4,78)"; + "let testUInt32NotEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_Equality (e1,e2),False) @ (5,70--5,79)"; + "let testUInt32LessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,70--6,78)"; + "let testUInt32LessThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_GreaterThan (e1,e2),False) @ (7,70--7,79)"; + "let testUInt32GreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,70--8,78)"; + "let testUInt32GreaterThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_LessThan (e1,e2),False) @ (9,70--9,79)"; + "let testUInt32AdditionOperator(e1) (e2) = Operators.op_Addition (e1,e2) @ (11,62--11,70)"; + "let testUInt32SubtractionOperator(e1) (e2) = Operators.op_Subtraction (e1,e2) @ (12,62--12,70)"; + "let testUInt32MultiplyOperator(e1) (e2) = Operators.op_Multiply (e1,e2) @ (13,61--13,70)"; + "let testUInt32DivisionOperator(e1) (e2) = Operators.op_Division (e1,e2) @ (14,62--14,70)"; + "let testUInt32ModulusOperator(e1) (e2) = Operators.op_Modulus (e1,e2) @ (15,62--15,70)"; + "let testUInt32BitwiseAndOperator(e1) (e2) = Operators.op_BitwiseAnd (e1,e2) @ (16,62--16,72)"; + "let testUInt32BitwiseOrOperator(e1) (e2) = Operators.op_BitwiseOr (e1,e2) @ (17,62--17,72)"; + "let testUInt32BitwiseXorOperator(e1) (e2) = Operators.op_ExclusiveOr (e1,e2) @ (18,62--18,72)"; + "let testUInt32ShiftLeftOperator(e1) (e2) = Operators.op_LeftShift (e1,Operators.op_BitwiseAnd (e2,31)) @ (19,59--19,69)"; + "let testUInt32ShiftRightOperator(e1) (e2) = Operators.op_RightShift (e1,Operators.op_BitwiseAnd (e2,31)) @ (20,59--20,69)"; + "let testUInt32AdditionChecked(e1) (e2) = Checked.op_Addition (e1,e2) @ (24,59--24,76)"; + "let testUInt32SubtractionChecked(e1) (e2) = Checked.op_Subtraction (e1,e2) @ (25,59--25,76)"; + "let testUInt32MultiplyChecked(e1) (e2) = Checked.op_Multiply (e1,e2) @ (26,59--26,76)"; + "let testUInt32ToByteChecked(e1) = Checked.ToByte (e1) @ (29,47--29,62)"; + "let testUInt32ToSByteChecked(e1) = Checked.ToSByte (e1) @ (30,47--30,63)"; + "let testUInt32ToInt16Checked(e1) = Checked.ToInt16 (e1) @ (31,47--31,63)"; + "let testUInt32ToUInt16Checked(e1) = Checked.ToUInt16 (e1) @ (32,47--32,64)"; + "let testUInt32ToIntChecked(e1) = Checked.ToInt32 (e1) @ (33,47--33,61)"; + "let testUInt32ToInt32Checked(e1) = Checked.ToInt32 (e1) @ (34,47--34,63)"; + "let testUInt32ToUInt32Checked(e1) = Checked.ToUInt32 (e1) @ (35,47--35,64)"; + "let testUInt32ToInt64Checked(e1) = Checked.ToInt64 (e1) @ (36,47--36,63)"; + "let testUInt32ToUInt64Checked(e1) = Checked.ToUInt64 (e1) @ (37,47--37,64)"; + "let testUInt32ToIntPtrChecked(e1) = Checked.ToIntPtr (e1) @ (38,47--38,67)"; + "let testUInt32ToUIntPtrChecked(e1) = Checked.ToUIntPtr (e1) @ (39,47--39,68)"; + "let testUInt32ToByteOperator(e1) = Operators.ToByte (e1) @ (41,47--41,54)"; + "let testUInt32ToSByteOperator(e1) = Operators.ToSByte (e1) @ (42,47--42,55)"; + "let testUInt32ToInt16Operator(e1) = Operators.ToInt16 (e1) @ (43,47--43,55)"; + "let testUInt32ToUInt16Operator(e1) = Operators.ToUInt16 (e1) @ (44,47--44,56)"; + "let testUInt32ToIntOperator(e1) = Operators.ToInt32 (e1) @ (45,47--45,53)"; + "let testUInt32ToInt32Operator(e1) = Operators.ToInt32 (e1) @ (46,47--46,55)"; + "let testUInt32ToUInt32Operator(e1) = Operators.ToUInt32 (e1) @ (47,47--47,56)"; + "let testUInt32ToInt64Operator(e1) = Operators.ToUInt64 (e1) @ (48,47--48,55)"; + "let testUInt32ToUInt64Operator(e1) = Operators.ToUInt64 (e1) @ (49,47--49,56)"; + "let testUInt32ToIntPtrOperator(e1) = Operators.ToUIntPtr (e1) @ (50,47--50,59)"; + "let testUInt32ToUIntPtrOperator(e1) = Operators.ToUIntPtr (e1) @ (51,47--51,60)"; + "let testUInt32ToSingleOperator(e1) = Operators.ToSingle (Operators.ToDouble (e1)) @ (52,47--52,57)"; + "let testUInt32ToDoubleOperator(e1) = Operators.ToDouble (Operators.ToDouble (e1)) @ (53,47--53,55)"; + "let testUInt32ToDecimalOperator(e1) = Convert.ToDecimal (e1) @ (54,47--54,57)"; + "let testUInt32ToCharOperator(e1) = Operators.ToChar (e1) @ (55,47--55,54)"; + "let testUInt32ToStringOperator(e1) = let matchValue: Microsoft.FSharp.Core.obj = Operators.Box (e1) in match (if Operators.op_Equality (matchValue,dflt) then $0 else (if matchValue :? System.IFormattable then $1 else $2)) targets ... @ (56,47--56,56)"; + ] + + testOperators "UInt32" "uint32" excludedTests expectedUnoptimized expectedOptimized + +[] +let ``Test Operator Declarations for Int64`` () = + let excludedTests = [ ] + + let expectedUnoptimized = [ + "type OperatorTestsInt64"; + "let testInt64EqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,67--4,75)"; + "let testInt64NotEqualsOperator(e1) (e2) = Operators.op_Inequality (e1,e2) @ (5,67--5,76)"; + "let testInt64LessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,67--6,75)"; + "let testInt64LessThanOrEqualsOperator(e1) (e2) = Operators.op_LessThanOrEqual (e1,e2) @ (7,67--7,76)"; + "let testInt64GreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,67--8,75)"; + "let testInt64GreaterThanOrEqualsOperator(e1) (e2) = Operators.op_GreaterThanOrEqual (e1,e2) @ (9,67--9,76)"; + "let testInt64AdditionOperator(e1) (e2) = Operators.op_Addition (e1,e2) @ (11,59--11,67)"; + "let testInt64SubtractionOperator(e1) (e2) = Operators.op_Subtraction (e1,e2) @ (12,59--12,67)"; + "let testInt64MultiplyOperator(e1) (e2) = Operators.op_Multiply (e1,e2) @ (13,58--13,67)"; + "let testInt64DivisionOperator(e1) (e2) = Operators.op_Division (e1,e2) @ (14,59--14,67)"; + "let testInt64ModulusOperator(e1) (e2) = Operators.op_Modulus (e1,e2) @ (15,59--15,67)"; + "let testInt64BitwiseAndOperator(e1) (e2) = Operators.op_BitwiseAnd (e1,e2) @ (16,59--16,69)"; + "let testInt64BitwiseOrOperator(e1) (e2) = Operators.op_BitwiseOr (e1,e2) @ (17,59--17,69)"; + "let testInt64BitwiseXorOperator(e1) (e2) = Operators.op_ExclusiveOr (e1,e2) @ (18,59--18,69)"; + "let testInt64ShiftLeftOperator(e1) (e2) = Operators.op_LeftShift (e1,e2) @ (19,57--19,67)"; + "let testInt64ShiftRightOperator(e1) (e2) = Operators.op_RightShift (e1,e2) @ (20,57--20,67)"; + "let testInt64UnaryNegOperator(e1) = Operators.op_UnaryNegation (e1) @ (22,46--22,52)"; + "let testInt64AdditionChecked(e1) (e2) = Checked.op_Addition (e1,e2) @ (24,56--24,73)"; + "let testInt64SubtractionChecked(e1) (e2) = Checked.op_Subtraction (e1,e2) @ (25,56--25,73)"; + "let testInt64MultiplyChecked(e1) (e2) = Checked.op_Multiply (e1,e2) @ (26,56--26,73)"; + "let testInt64UnaryNegChecked(e1) = Checked.op_UnaryNegation (e1) @ (27,45--27,60)"; + "let testInt64ToByteChecked(e1) = Checked.ToByte (e1) @ (29,45--29,60)"; + "let testInt64ToSByteChecked(e1) = Checked.ToSByte (e1) @ (30,45--30,61)"; + "let testInt64ToInt16Checked(e1) = Checked.ToInt16 (e1) @ (31,45--31,61)"; + "let testInt64ToUInt16Checked(e1) = Checked.ToUInt16 (e1) @ (32,45--32,62)"; + "let testInt64ToIntChecked(e1) = Checked.ToInt (e1) @ (33,45--33,59)"; + "let testInt64ToInt32Checked(e1) = Checked.ToInt32 (e1) @ (34,45--34,61)"; + "let testInt64ToUInt32Checked(e1) = Checked.ToUInt32 (e1) @ (35,45--35,62)"; + "let testInt64ToInt64Checked(e1) = Checked.ToInt64 (e1) @ (36,45--36,61)"; + "let testInt64ToUInt64Checked(e1) = Checked.ToUInt64 (e1) @ (37,45--37,62)"; + "let testInt64ToIntPtrChecked(e1) = Checked.ToIntPtr (e1) @ (38,45--38,65)"; + "let testInt64ToUIntPtrChecked(e1) = Checked.ToUIntPtr (e1) @ (39,45--39,66)"; + "let testInt64ToByteOperator(e1) = Operators.ToByte (e1) @ (41,45--41,52)"; + "let testInt64ToSByteOperator(e1) = Operators.ToSByte (e1) @ (42,45--42,53)"; + "let testInt64ToInt16Operator(e1) = Operators.ToInt16 (e1) @ (43,45--43,53)"; + "let testInt64ToUInt16Operator(e1) = Operators.ToUInt16 (e1) @ (44,45--44,54)"; + "let testInt64ToIntOperator(e1) = Operators.ToInt (e1) @ (45,45--45,51)"; + "let testInt64ToInt32Operator(e1) = Operators.ToInt32 (e1) @ (46,45--46,53)"; + "let testInt64ToUInt32Operator(e1) = Operators.ToUInt32 (e1) @ (47,45--47,54)"; + "let testInt64ToInt64Operator(e1) = Operators.ToInt64 (e1) @ (48,45--48,53)"; + "let testInt64ToUInt64Operator(e1) = Operators.ToUInt64 (e1) @ (49,45--49,54)"; + "let testInt64ToIntPtrOperator(e1) = Operators.ToIntPtr (e1) @ (50,45--50,57)"; + "let testInt64ToUIntPtrOperator(e1) = Operators.ToUIntPtr (e1) @ (51,45--51,58)"; + "let testInt64ToSingleOperator(e1) = Operators.ToSingle (e1) @ (52,45--52,55)"; + "let testInt64ToDoubleOperator(e1) = Operators.ToDouble (e1) @ (53,45--53,53)"; + "let testInt64ToDecimalOperator(e1) = Operators.ToDecimal (e1) @ (54,45--54,55)"; + "let testInt64ToCharOperator(e1) = Operators.ToChar (e1) @ (55,45--55,52)"; + "let testInt64ToStringOperator(e1) = Operators.ToString (e1) @ (56,45--56,54)"; + ] + + let expectedOptimized = [ + "type OperatorTestsInt64"; + "let testInt64EqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,67--4,75)"; + "let testInt64NotEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_Equality (e1,e2),False) @ (5,67--5,76)"; + "let testInt64LessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,67--6,75)"; + "let testInt64LessThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_GreaterThan (e1,e2),False) @ (7,67--7,76)"; + "let testInt64GreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,67--8,75)"; + "let testInt64GreaterThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_LessThan (e1,e2),False) @ (9,67--9,76)"; + "let testInt64AdditionOperator(e1) (e2) = Operators.op_Addition (e1,e2) @ (11,59--11,67)"; + "let testInt64SubtractionOperator(e1) (e2) = Operators.op_Subtraction (e1,e2) @ (12,59--12,67)"; + "let testInt64MultiplyOperator(e1) (e2) = Operators.op_Multiply (e1,e2) @ (13,58--13,67)"; + "let testInt64DivisionOperator(e1) (e2) = Operators.op_Division (e1,e2) @ (14,59--14,67)"; + "let testInt64ModulusOperator(e1) (e2) = Operators.op_Modulus (e1,e2) @ (15,59--15,67)"; + "let testInt64BitwiseAndOperator(e1) (e2) = Operators.op_BitwiseAnd (e1,e2) @ (16,59--16,69)"; + "let testInt64BitwiseOrOperator(e1) (e2) = Operators.op_BitwiseOr (e1,e2) @ (17,59--17,69)"; + "let testInt64BitwiseXorOperator(e1) (e2) = Operators.op_ExclusiveOr (e1,e2) @ (18,59--18,69)"; + "let testInt64ShiftLeftOperator(e1) (e2) = Operators.op_LeftShift (e1,Operators.op_BitwiseAnd (e2,63)) @ (19,57--19,67)"; + "let testInt64ShiftRightOperator(e1) (e2) = Operators.op_RightShift (e1,Operators.op_BitwiseAnd (e2,63)) @ (20,57--20,67)"; + "let testInt64UnaryNegOperator(e1) = Operators.op_UnaryNegation (e1) @ (22,46--22,52)"; + "let testInt64AdditionChecked(e1) (e2) = Checked.op_Addition (e1,e2) @ (24,56--24,73)"; + "let testInt64SubtractionChecked(e1) (e2) = Checked.op_Subtraction (e1,e2) @ (25,56--25,73)"; + "let testInt64MultiplyChecked(e1) (e2) = Checked.op_Multiply (e1,e2) @ (26,56--26,73)"; + "let testInt64UnaryNegChecked(e1) = Checked.op_Subtraction (0,e1) @ (27,45--27,60)"; + "let testInt64ToByteChecked(e1) = Checked.ToByte (e1) @ (29,45--29,60)"; + "let testInt64ToSByteChecked(e1) = Checked.ToSByte (e1) @ (30,45--30,61)"; + "let testInt64ToInt16Checked(e1) = Checked.ToInt16 (e1) @ (31,45--31,61)"; + "let testInt64ToUInt16Checked(e1) = Checked.ToUInt16 (e1) @ (32,45--32,62)"; + "let testInt64ToIntChecked(e1) = Checked.ToInt32 (e1) @ (33,45--33,59)"; + "let testInt64ToInt32Checked(e1) = Checked.ToInt32 (e1) @ (34,45--34,61)"; + "let testInt64ToUInt32Checked(e1) = Checked.ToUInt32 (e1) @ (35,45--35,62)"; + "let testInt64ToInt64Checked(e1) = Checked.ToInt64 (e1) @ (36,45--36,61)"; + "let testInt64ToUInt64Checked(e1) = Checked.ToUInt64 (e1) @ (37,45--37,62)"; + "let testInt64ToIntPtrChecked(e1) = Checked.ToIntPtr (e1) @ (38,45--38,65)"; + "let testInt64ToUIntPtrChecked(e1) = Checked.ToUIntPtr (e1) @ (39,45--39,66)"; + "let testInt64ToByteOperator(e1) = Operators.ToByte (e1) @ (41,45--41,52)"; + "let testInt64ToSByteOperator(e1) = Operators.ToSByte (e1) @ (42,45--42,53)"; + "let testInt64ToInt16Operator(e1) = Operators.ToInt16 (e1) @ (43,45--43,53)"; + "let testInt64ToUInt16Operator(e1) = Operators.ToUInt16 (e1) @ (44,45--44,54)"; + "let testInt64ToIntOperator(e1) = Operators.ToInt32 (e1) @ (45,45--45,51)"; + "let testInt64ToInt32Operator(e1) = Operators.ToInt32 (e1) @ (46,45--46,53)"; + "let testInt64ToUInt32Operator(e1) = Operators.ToUInt32 (e1) @ (47,45--47,54)"; + "let testInt64ToInt64Operator(e1) = Operators.ToInt64 (e1) @ (48,45--48,53)"; + "let testInt64ToUInt64Operator(e1) = Operators.ToUInt64 (e1) @ (49,45--49,54)"; + "let testInt64ToIntPtrOperator(e1) = Operators.ToIntPtr (e1) @ (50,45--50,57)"; + "let testInt64ToUIntPtrOperator(e1) = Operators.ToIntPtr (e1) @ (51,45--51,58)"; + "let testInt64ToSingleOperator(e1) = Operators.ToSingle (e1) @ (52,45--52,55)"; + "let testInt64ToDoubleOperator(e1) = Operators.ToDouble (e1) @ (53,45--53,53)"; + "let testInt64ToDecimalOperator(e1) = Convert.ToDecimal (e1) @ (54,45--54,55)"; + "let testInt64ToCharOperator(e1) = Operators.ToChar (e1) @ (55,45--55,52)"; + "let testInt64ToStringOperator(e1) = let matchValue: Microsoft.FSharp.Core.obj = Operators.Box (e1) in match (if Operators.op_Equality (matchValue,dflt) then $0 else (if matchValue :? System.IFormattable then $1 else $2)) targets ... @ (56,45--56,54)"; + ] + + testOperators "Int64" "int64" excludedTests expectedUnoptimized expectedOptimized + +[] +let ``Test Operator Declarations for UInt64`` () = + let excludedTests = [ + "testUInt64UnaryNegOperator"; + "testUInt64UnaryNegChecked"; + ] + + let expectedUnoptimized = [ + "type OperatorTestsUInt64"; + "let testUInt64EqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,70--4,78)"; + "let testUInt64NotEqualsOperator(e1) (e2) = Operators.op_Inequality (e1,e2) @ (5,70--5,79)"; + "let testUInt64LessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,70--6,78)"; + "let testUInt64LessThanOrEqualsOperator(e1) (e2) = Operators.op_LessThanOrEqual (e1,e2) @ (7,70--7,79)"; + "let testUInt64GreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,70--8,78)"; + "let testUInt64GreaterThanOrEqualsOperator(e1) (e2) = Operators.op_GreaterThanOrEqual (e1,e2) @ (9,70--9,79)"; + "let testUInt64AdditionOperator(e1) (e2) = Operators.op_Addition (e1,e2) @ (11,62--11,70)"; + "let testUInt64SubtractionOperator(e1) (e2) = Operators.op_Subtraction (e1,e2) @ (12,62--12,70)"; + "let testUInt64MultiplyOperator(e1) (e2) = Operators.op_Multiply (e1,e2) @ (13,61--13,70)"; + "let testUInt64DivisionOperator(e1) (e2) = Operators.op_Division (e1,e2) @ (14,62--14,70)"; + "let testUInt64ModulusOperator(e1) (e2) = Operators.op_Modulus (e1,e2) @ (15,62--15,70)"; + "let testUInt64BitwiseAndOperator(e1) (e2) = Operators.op_BitwiseAnd (e1,e2) @ (16,62--16,72)"; + "let testUInt64BitwiseOrOperator(e1) (e2) = Operators.op_BitwiseOr (e1,e2) @ (17,62--17,72)"; + "let testUInt64BitwiseXorOperator(e1) (e2) = Operators.op_ExclusiveOr (e1,e2) @ (18,62--18,72)"; + "let testUInt64ShiftLeftOperator(e1) (e2) = Operators.op_LeftShift (e1,e2) @ (19,59--19,69)"; + "let testUInt64ShiftRightOperator(e1) (e2) = Operators.op_RightShift (e1,e2) @ (20,59--20,69)"; + "let testUInt64AdditionChecked(e1) (e2) = Checked.op_Addition (e1,e2) @ (24,59--24,76)"; + "let testUInt64SubtractionChecked(e1) (e2) = Checked.op_Subtraction (e1,e2) @ (25,59--25,76)"; + "let testUInt64MultiplyChecked(e1) (e2) = Checked.op_Multiply (e1,e2) @ (26,59--26,76)"; + "let testUInt64ToByteChecked(e1) = Checked.ToByte (e1) @ (29,47--29,62)"; + "let testUInt64ToSByteChecked(e1) = Checked.ToSByte (e1) @ (30,47--30,63)"; + "let testUInt64ToInt16Checked(e1) = Checked.ToInt16 (e1) @ (31,47--31,63)"; + "let testUInt64ToUInt16Checked(e1) = Checked.ToUInt16 (e1) @ (32,47--32,64)"; + "let testUInt64ToIntChecked(e1) = Checked.ToInt (e1) @ (33,47--33,61)"; + "let testUInt64ToInt32Checked(e1) = Checked.ToInt32 (e1) @ (34,47--34,63)"; + "let testUInt64ToUInt32Checked(e1) = Checked.ToUInt32 (e1) @ (35,47--35,64)"; + "let testUInt64ToInt64Checked(e1) = Checked.ToInt64 (e1) @ (36,47--36,63)"; + "let testUInt64ToUInt64Checked(e1) = Checked.ToUInt64 (e1) @ (37,47--37,64)"; + "let testUInt64ToIntPtrChecked(e1) = Checked.ToIntPtr (e1) @ (38,47--38,67)"; + "let testUInt64ToUIntPtrChecked(e1) = Checked.ToUIntPtr (e1) @ (39,47--39,68)"; + "let testUInt64ToByteOperator(e1) = Operators.ToByte (e1) @ (41,47--41,54)"; + "let testUInt64ToSByteOperator(e1) = Operators.ToSByte (e1) @ (42,47--42,55)"; + "let testUInt64ToInt16Operator(e1) = Operators.ToInt16 (e1) @ (43,47--43,55)"; + "let testUInt64ToUInt16Operator(e1) = Operators.ToUInt16 (e1) @ (44,47--44,56)"; + "let testUInt64ToIntOperator(e1) = Operators.ToInt (e1) @ (45,47--45,53)"; + "let testUInt64ToInt32Operator(e1) = Operators.ToInt32 (e1) @ (46,47--46,55)"; + "let testUInt64ToUInt32Operator(e1) = Operators.ToUInt32 (e1) @ (47,47--47,56)"; + "let testUInt64ToInt64Operator(e1) = Operators.ToInt64 (e1) @ (48,47--48,55)"; + "let testUInt64ToUInt64Operator(e1) = Operators.ToUInt64 (e1) @ (49,47--49,56)"; + "let testUInt64ToIntPtrOperator(e1) = Operators.ToIntPtr (e1) @ (50,47--50,59)"; + "let testUInt64ToUIntPtrOperator(e1) = Operators.ToUIntPtr (e1) @ (51,47--51,60)"; + "let testUInt64ToSingleOperator(e1) = Operators.ToSingle (e1) @ (52,47--52,57)"; + "let testUInt64ToDoubleOperator(e1) = Operators.ToDouble (e1) @ (53,47--53,55)"; + "let testUInt64ToDecimalOperator(e1) = Operators.ToDecimal (e1) @ (54,47--54,57)"; + "let testUInt64ToCharOperator(e1) = Operators.ToChar (e1) @ (55,47--55,54)"; + "let testUInt64ToStringOperator(e1) = Operators.ToString (e1) @ (56,47--56,56)"; + ] + + let expectedOptimized = [ + "type OperatorTestsUInt64"; + "let testUInt64EqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,70--4,78)"; + "let testUInt64NotEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_Equality (e1,e2),False) @ (5,70--5,79)"; + "let testUInt64LessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,70--6,78)"; + "let testUInt64LessThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_GreaterThan (e1,e2),False) @ (7,70--7,79)"; + "let testUInt64GreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,70--8,78)"; + "let testUInt64GreaterThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_LessThan (e1,e2),False) @ (9,70--9,79)"; + "let testUInt64AdditionOperator(e1) (e2) = Operators.op_Addition (e1,e2) @ (11,62--11,70)"; + "let testUInt64SubtractionOperator(e1) (e2) = Operators.op_Subtraction (e1,e2) @ (12,62--12,70)"; + "let testUInt64MultiplyOperator(e1) (e2) = Operators.op_Multiply (e1,e2) @ (13,61--13,70)"; + "let testUInt64DivisionOperator(e1) (e2) = Operators.op_Division (e1,e2) @ (14,62--14,70)"; + "let testUInt64ModulusOperator(e1) (e2) = Operators.op_Modulus (e1,e2) @ (15,62--15,70)"; + "let testUInt64BitwiseAndOperator(e1) (e2) = Operators.op_BitwiseAnd (e1,e2) @ (16,62--16,72)"; + "let testUInt64BitwiseOrOperator(e1) (e2) = Operators.op_BitwiseOr (e1,e2) @ (17,62--17,72)"; + "let testUInt64BitwiseXorOperator(e1) (e2) = Operators.op_ExclusiveOr (e1,e2) @ (18,62--18,72)"; + "let testUInt64ShiftLeftOperator(e1) (e2) = Operators.op_LeftShift (e1,Operators.op_BitwiseAnd (e2,63)) @ (19,59--19,69)"; + "let testUInt64ShiftRightOperator(e1) (e2) = Operators.op_RightShift (e1,Operators.op_BitwiseAnd (e2,63)) @ (20,59--20,69)"; + "let testUInt64AdditionChecked(e1) (e2) = Checked.op_Addition (e1,e2) @ (24,59--24,76)"; + "let testUInt64SubtractionChecked(e1) (e2) = Checked.op_Subtraction (e1,e2) @ (25,59--25,76)"; + "let testUInt64MultiplyChecked(e1) (e2) = Checked.op_Multiply (e1,e2) @ (26,59--26,76)"; + "let testUInt64ToByteChecked(e1) = Checked.ToByte (e1) @ (29,47--29,62)"; + "let testUInt64ToSByteChecked(e1) = Checked.ToSByte (e1) @ (30,47--30,63)"; + "let testUInt64ToInt16Checked(e1) = Checked.ToInt16 (e1) @ (31,47--31,63)"; + "let testUInt64ToUInt16Checked(e1) = Checked.ToUInt16 (e1) @ (32,47--32,64)"; + "let testUInt64ToIntChecked(e1) = Checked.ToInt32 (e1) @ (33,47--33,61)"; + "let testUInt64ToInt32Checked(e1) = Checked.ToInt32 (e1) @ (34,47--34,63)"; + "let testUInt64ToUInt32Checked(e1) = Checked.ToUInt32 (e1) @ (35,47--35,64)"; + "let testUInt64ToInt64Checked(e1) = Checked.ToInt64 (e1) @ (36,47--36,63)"; + "let testUInt64ToUInt64Checked(e1) = Checked.ToUInt64 (e1) @ (37,47--37,64)"; + "let testUInt64ToIntPtrChecked(e1) = Checked.ToIntPtr (e1) @ (38,47--38,67)"; + "let testUInt64ToUIntPtrChecked(e1) = Checked.ToUIntPtr (e1) @ (39,47--39,68)"; + "let testUInt64ToByteOperator(e1) = Operators.ToByte (e1) @ (41,47--41,54)"; + "let testUInt64ToSByteOperator(e1) = Operators.ToSByte (e1) @ (42,47--42,55)"; + "let testUInt64ToInt16Operator(e1) = Operators.ToInt16 (e1) @ (43,47--43,55)"; + "let testUInt64ToUInt16Operator(e1) = Operators.ToUInt16 (e1) @ (44,47--44,56)"; + "let testUInt64ToIntOperator(e1) = Operators.ToInt32 (e1) @ (45,47--45,53)"; + "let testUInt64ToInt32Operator(e1) = Operators.ToInt32 (e1) @ (46,47--46,55)"; + "let testUInt64ToUInt32Operator(e1) = Operators.ToUInt32 (e1) @ (47,47--47,56)"; + "let testUInt64ToInt64Operator(e1) = Operators.ToInt64 (e1) @ (48,47--48,55)"; + "let testUInt64ToUInt64Operator(e1) = e1 @ (49,54--49,56)"; + "let testUInt64ToIntPtrOperator(e1) = Operators.ToUIntPtr (e1) @ (50,47--50,59)"; + "let testUInt64ToUIntPtrOperator(e1) = Operators.ToUIntPtr (e1) @ (51,47--51,60)"; + "let testUInt64ToSingleOperator(e1) = Operators.ToSingle (Operators.ToDouble (e1)) @ (52,47--52,57)"; + "let testUInt64ToDoubleOperator(e1) = Operators.ToDouble (Operators.ToDouble (e1)) @ (53,47--53,55)"; + "let testUInt64ToDecimalOperator(e1) = Convert.ToDecimal (e1) @ (54,47--54,57)"; + "let testUInt64ToCharOperator(e1) = Operators.ToChar (e1) @ (55,47--55,54)"; + "let testUInt64ToStringOperator(e1) = let matchValue: Microsoft.FSharp.Core.obj = Operators.Box (e1) in match (if Operators.op_Equality (matchValue,dflt) then $0 else (if matchValue :? System.IFormattable then $1 else $2)) targets ... @ (56,47--56,56)"; + ] + + testOperators "UInt64" "uint64" excludedTests expectedUnoptimized expectedOptimized + +[] +let ``Test Operator Declarations for IntPtr`` () = + let excludedTests = [ ] + + let expectedUnoptimized = [ + "type OperatorTestsIntPtr"; + "let testIntPtrEqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,76--4,84)"; + "let testIntPtrNotEqualsOperator(e1) (e2) = Operators.op_Inequality (e1,e2) @ (5,76--5,85)"; + "let testIntPtrLessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,76--6,84)"; + "let testIntPtrLessThanOrEqualsOperator(e1) (e2) = Operators.op_LessThanOrEqual (e1,e2) @ (7,76--7,85)"; + "let testIntPtrGreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,76--8,84)"; + "let testIntPtrGreaterThanOrEqualsOperator(e1) (e2) = Operators.op_GreaterThanOrEqual (e1,e2) @ (9,76--9,85)"; + "let testIntPtrAdditionOperator(e1) (e2) = Operators.op_Addition (e1,e2) @ (11,68--11,76)"; + "let testIntPtrSubtractionOperator(e1) (e2) = Operators.op_Subtraction (e1,e2) @ (12,68--12,76)"; + "let testIntPtrMultiplyOperator(e1) (e2) = Operators.op_Multiply (e1,e2) @ (13,67--13,76)"; + "let testIntPtrDivisionOperator(e1) (e2) = Operators.op_Division (e1,e2) @ (14,68--14,76)"; + "let testIntPtrModulusOperator(e1) (e2) = Operators.op_Modulus (e1,e2) @ (15,68--15,76)"; + "let testIntPtrBitwiseAndOperator(e1) (e2) = Operators.op_BitwiseAnd (e1,e2) @ (16,68--16,78)"; + "let testIntPtrBitwiseOrOperator(e1) (e2) = Operators.op_BitwiseOr (e1,e2) @ (17,68--17,78)"; + "let testIntPtrBitwiseXorOperator(e1) (e2) = Operators.op_ExclusiveOr (e1,e2) @ (18,68--18,78)"; + "let testIntPtrShiftLeftOperator(e1) (e2) = Operators.op_LeftShift (e1,e2) @ (19,62--19,72)"; + "let testIntPtrShiftRightOperator(e1) (e2) = Operators.op_RightShift (e1,e2) @ (20,62--20,72)"; + "let testIntPtrUnaryNegOperator(e1) = Operators.op_UnaryNegation (e1) @ (22,51--22,57)"; + "let testIntPtrAdditionChecked(e1) (e2) = Checked.op_Addition (e1,e2) @ (24,65--24,82)"; + "let testIntPtrSubtractionChecked(e1) (e2) = Checked.op_Subtraction (e1,e2) @ (25,65--25,82)"; + "let testIntPtrMultiplyChecked(e1) (e2) = Checked.op_Multiply (e1,e2) @ (26,65--26,82)"; + "let testIntPtrUnaryNegChecked(e1) = Checked.op_UnaryNegation (e1) @ (27,50--27,65)"; + "let testIntPtrToByteChecked(e1) = Checked.ToByte (e1) @ (29,50--29,65)"; + "let testIntPtrToSByteChecked(e1) = Checked.ToSByte (e1) @ (30,50--30,66)"; + "let testIntPtrToInt16Checked(e1) = Checked.ToInt16 (e1) @ (31,50--31,66)"; + "let testIntPtrToUInt16Checked(e1) = Checked.ToUInt16 (e1) @ (32,50--32,67)"; + "let testIntPtrToIntChecked(e1) = Checked.ToInt (e1) @ (33,50--33,64)"; + "let testIntPtrToInt32Checked(e1) = Checked.ToInt32 (e1) @ (34,50--34,66)"; + "let testIntPtrToUInt32Checked(e1) = Checked.ToUInt32 (e1) @ (35,50--35,67)"; + "let testIntPtrToInt64Checked(e1) = Checked.ToInt64 (e1) @ (36,50--36,66)"; + "let testIntPtrToUInt64Checked(e1) = Checked.ToUInt64 (e1) @ (37,50--37,67)"; + "let testIntPtrToIntPtrChecked(e1) = Checked.ToIntPtr (e1) @ (38,50--38,70)"; + "let testIntPtrToUIntPtrChecked(e1) = Checked.ToUIntPtr (e1) @ (39,50--39,71)"; + "let testIntPtrToByteOperator(e1) = Operators.ToByte (e1) @ (41,50--41,57)"; + "let testIntPtrToSByteOperator(e1) = Operators.ToSByte (e1) @ (42,50--42,58)"; + "let testIntPtrToInt16Operator(e1) = Operators.ToInt16 (e1) @ (43,50--43,58)"; + "let testIntPtrToUInt16Operator(e1) = Operators.ToUInt16 (e1) @ (44,50--44,59)"; + "let testIntPtrToIntOperator(e1) = Operators.ToInt (e1) @ (45,50--45,56)"; + "let testIntPtrToInt32Operator(e1) = Operators.ToInt32 (e1) @ (46,50--46,58)"; + "let testIntPtrToUInt32Operator(e1) = Operators.ToUInt32 (e1) @ (47,50--47,59)"; + "let testIntPtrToInt64Operator(e1) = Operators.ToInt64 (e1) @ (48,50--48,58)"; + "let testIntPtrToUInt64Operator(e1) = Operators.ToUInt64 (e1) @ (49,50--49,59)"; + "let testIntPtrToIntPtrOperator(e1) = Operators.ToIntPtr (e1) @ (50,50--50,62)"; + "let testIntPtrToUIntPtrOperator(e1) = Operators.ToUIntPtr (e1) @ (51,50--51,63)"; + "let testIntPtrToSingleOperator(e1) = Operators.ToSingle (e1) @ (52,50--52,60)"; + "let testIntPtrToDoubleOperator(e1) = Operators.ToDouble (e1) @ (53,50--53,58)"; + "let testIntPtrToDecimalOperator(e1) = Operators.ToDecimal (e1) @ (54,50--54,60)"; + "let testIntPtrToCharOperator(e1) = Operators.ToChar (e1) @ (55,50--55,57)"; + "let testIntPtrToStringOperator(e1) = Operators.ToString (e1) @ (56,50--56,59)"; + ] + + let expectedOptimized = [ + "type OperatorTestsIntPtr"; + "let testIntPtrEqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,76--4,84)"; + "let testIntPtrNotEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_Equality (e1,e2),False) @ (5,76--5,85)"; + "let testIntPtrLessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,76--6,84)"; + "let testIntPtrLessThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_GreaterThan (e1,e2),False) @ (7,76--7,85)"; + "let testIntPtrGreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,76--8,84)"; + "let testIntPtrGreaterThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_LessThan (e1,e2),False) @ (9,76--9,85)"; + "let testIntPtrAdditionOperator(e1) (e2) = Operators.op_Addition (e1,e2) @ (11,68--11,76)"; + "let testIntPtrSubtractionOperator(e1) (e2) = Operators.op_Subtraction (e1,e2) @ (12,68--12,76)"; + "let testIntPtrMultiplyOperator(e1) (e2) = Operators.op_Multiply (e1,e2) @ (13,67--13,76)"; + "let testIntPtrDivisionOperator(e1) (e2) = Operators.op_Division (e1,e2) @ (14,68--14,76)"; + "let testIntPtrModulusOperator(e1) (e2) = Operators.op_Modulus (e1,e2) @ (15,68--15,76)"; + "let testIntPtrBitwiseAndOperator(e1) (e2) = Operators.op_BitwiseAnd (e1,e2) @ (16,68--16,78)"; + "let testIntPtrBitwiseOrOperator(e1) (e2) = Operators.op_BitwiseOr (e1,e2) @ (17,68--17,78)"; + "let testIntPtrBitwiseXorOperator(e1) (e2) = Operators.op_ExclusiveOr (e1,e2) @ (18,68--18,78)"; + "let testIntPtrShiftLeftOperator(e1) (e2) = Operators.op_LeftShift (e1,e2) @ (19,62--19,72)"; + "let testIntPtrShiftRightOperator(e1) (e2) = Operators.op_RightShift (e1,e2) @ (20,62--20,72)"; + "let testIntPtrUnaryNegOperator(e1) = Operators.op_UnaryNegation (e1) @ (22,51--22,57)"; + "let testIntPtrAdditionChecked(e1) (e2) = Checked.op_Addition (e1,e2) @ (24,65--24,82)"; + "let testIntPtrSubtractionChecked(e1) (e2) = Checked.op_Subtraction (e1,e2) @ (25,65--25,82)"; + "let testIntPtrMultiplyChecked(e1) (e2) = Checked.op_Multiply (e1,e2) @ (26,65--26,82)"; + "let testIntPtrUnaryNegChecked(e1) = Checked.op_Subtraction (0,e1) @ (27,50--27,65)"; + "let testIntPtrToByteChecked(e1) = Checked.ToByte (e1) @ (29,50--29,65)"; + "let testIntPtrToSByteChecked(e1) = Checked.ToSByte (e1) @ (30,50--30,66)"; + "let testIntPtrToInt16Checked(e1) = Checked.ToInt16 (e1) @ (31,50--31,66)"; + "let testIntPtrToUInt16Checked(e1) = Checked.ToUInt16 (e1) @ (32,50--32,67)"; + "let testIntPtrToIntChecked(e1) = Checked.ToInt32 (e1) @ (33,50--33,64)"; + "let testIntPtrToInt32Checked(e1) = Checked.ToInt32 (e1) @ (34,50--34,66)"; + "let testIntPtrToUInt32Checked(e1) = Checked.ToUInt32 (e1) @ (35,50--35,67)"; + "let testIntPtrToInt64Checked(e1) = Checked.ToInt64 (e1) @ (36,50--36,66)"; + "let testIntPtrToUInt64Checked(e1) = Checked.ToUInt64 (e1) @ (37,50--37,67)"; + "let testIntPtrToIntPtrChecked(e1) = Checked.ToIntPtr (e1) @ (38,50--38,70)"; + "let testIntPtrToUIntPtrChecked(e1) = Checked.ToUIntPtr (e1) @ (39,50--39,71)"; + "let testIntPtrToByteOperator(e1) = Operators.ToByte (e1) @ (41,50--41,57)"; + "let testIntPtrToSByteOperator(e1) = Operators.ToSByte (e1) @ (42,50--42,58)"; + "let testIntPtrToInt16Operator(e1) = Operators.ToInt16 (e1) @ (43,50--43,58)"; + "let testIntPtrToUInt16Operator(e1) = Operators.ToUInt16 (e1) @ (44,50--44,59)"; + "let testIntPtrToIntOperator(e1) = Operators.ToInt32 (e1) @ (45,50--45,56)"; + "let testIntPtrToInt32Operator(e1) = Operators.ToInt32 (e1) @ (46,50--46,58)"; + "let testIntPtrToUInt32Operator(e1) = Operators.ToUInt32 (e1) @ (47,50--47,59)"; + "let testIntPtrToInt64Operator(e1) = Operators.ToInt64 (e1) @ (48,50--48,58)"; + "let testIntPtrToUInt64Operator(e1) = Operators.ToInt64 (e1) @ (49,50--49,59)"; + "let testIntPtrToIntPtrOperator(e1) = Operators.ToIntPtr (e1) @ (50,50--50,62)"; + "let testIntPtrToUIntPtrOperator(e1) = Operators.ToUIntPtr (e1) @ (51,50--51,63)"; + "let testIntPtrToSingleOperator(e1) = Operators.ToSingle (e1) @ (52,50--52,60)"; + "let testIntPtrToDoubleOperator(e1) = Operators.ToDouble (e1) @ (53,50--53,58)"; + "let testIntPtrToDecimalOperator(e1) = Convert.ToDecimal (Operators.ToInt64 (e1)) @ (54,50--54,60)"; + "let testIntPtrToCharOperator(e1) = Operators.ToChar (e1) @ (55,50--55,57)"; + "let testIntPtrToStringOperator(e1) = let matchValue: Microsoft.FSharp.Core.obj = Operators.Box (e1) in match (if Operators.op_Equality (matchValue,dflt) then $0 else (if matchValue :? System.IFormattable then $1 else $2)) targets ... @ (56,50--56,59)"; + ] + + testOperators "IntPtr" "nativeint" excludedTests expectedUnoptimized expectedOptimized + +[] +let ``Test Operator Declarations for UIntPtr`` () = + let excludedTests = [ + "testUIntPtrUnaryNegOperator"; + "testUIntPtrUnaryNegChecked"; + ] + + let expectedUnoptimized = [ + "type OperatorTestsUIntPtr"; + "let testUIntPtrEqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,79--4,87)"; + "let testUIntPtrNotEqualsOperator(e1) (e2) = Operators.op_Inequality (e1,e2) @ (5,79--5,88)"; + "let testUIntPtrLessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,79--6,87)"; + "let testUIntPtrLessThanOrEqualsOperator(e1) (e2) = Operators.op_LessThanOrEqual (e1,e2) @ (7,79--7,88)"; + "let testUIntPtrGreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,79--8,87)"; + "let testUIntPtrGreaterThanOrEqualsOperator(e1) (e2) = Operators.op_GreaterThanOrEqual (e1,e2) @ (9,79--9,88)"; + "let testUIntPtrAdditionOperator(e1) (e2) = Operators.op_Addition (e1,e2) @ (11,71--11,79)"; + "let testUIntPtrSubtractionOperator(e1) (e2) = Operators.op_Subtraction (e1,e2) @ (12,71--12,79)"; + "let testUIntPtrMultiplyOperator(e1) (e2) = Operators.op_Multiply (e1,e2) @ (13,70--13,79)"; + "let testUIntPtrDivisionOperator(e1) (e2) = Operators.op_Division (e1,e2) @ (14,71--14,79)"; + "let testUIntPtrModulusOperator(e1) (e2) = Operators.op_Modulus (e1,e2) @ (15,71--15,79)"; + "let testUIntPtrBitwiseAndOperator(e1) (e2) = Operators.op_BitwiseAnd (e1,e2) @ (16,71--16,81)"; + "let testUIntPtrBitwiseOrOperator(e1) (e2) = Operators.op_BitwiseOr (e1,e2) @ (17,71--17,81)"; + "let testUIntPtrBitwiseXorOperator(e1) (e2) = Operators.op_ExclusiveOr (e1,e2) @ (18,71--18,81)"; + "let testUIntPtrShiftLeftOperator(e1) (e2) = Operators.op_LeftShift (e1,e2) @ (19,64--19,74)"; + "let testUIntPtrShiftRightOperator(e1) (e2) = Operators.op_RightShift (e1,e2) @ (20,64--20,74)"; + "let testUIntPtrAdditionChecked(e1) (e2) = Checked.op_Addition (e1,e2) @ (24,68--24,85)"; + "let testUIntPtrSubtractionChecked(e1) (e2) = Checked.op_Subtraction (e1,e2) @ (25,68--25,85)"; + "let testUIntPtrMultiplyChecked(e1) (e2) = Checked.op_Multiply (e1,e2) @ (26,68--26,85)"; + "let testUIntPtrToByteChecked(e1) = Checked.ToByte (e1) @ (29,52--29,67)"; + "let testUIntPtrToSByteChecked(e1) = Checked.ToSByte (e1) @ (30,52--30,68)"; + "let testUIntPtrToInt16Checked(e1) = Checked.ToInt16 (e1) @ (31,52--31,68)"; + "let testUIntPtrToUInt16Checked(e1) = Checked.ToUInt16 (e1) @ (32,52--32,69)"; + "let testUIntPtrToIntChecked(e1) = Checked.ToInt (e1) @ (33,52--33,66)"; + "let testUIntPtrToInt32Checked(e1) = Checked.ToInt32 (e1) @ (34,52--34,68)"; + "let testUIntPtrToUInt32Checked(e1) = Checked.ToUInt32 (e1) @ (35,52--35,69)"; + "let testUIntPtrToInt64Checked(e1) = Checked.ToInt64 (e1) @ (36,52--36,68)"; + "let testUIntPtrToUInt64Checked(e1) = Checked.ToUInt64 (e1) @ (37,52--37,69)"; + "let testUIntPtrToIntPtrChecked(e1) = Checked.ToIntPtr (e1) @ (38,52--38,72)"; + "let testUIntPtrToUIntPtrChecked(e1) = Checked.ToUIntPtr (e1) @ (39,52--39,73)"; + "let testUIntPtrToByteOperator(e1) = Operators.ToByte (e1) @ (41,52--41,59)"; + "let testUIntPtrToSByteOperator(e1) = Operators.ToSByte (e1) @ (42,52--42,60)"; + "let testUIntPtrToInt16Operator(e1) = Operators.ToInt16 (e1) @ (43,52--43,60)"; + "let testUIntPtrToUInt16Operator(e1) = Operators.ToUInt16 (e1) @ (44,52--44,61)"; + "let testUIntPtrToIntOperator(e1) = Operators.ToInt (e1) @ (45,52--45,58)"; + "let testUIntPtrToInt32Operator(e1) = Operators.ToInt32 (e1) @ (46,52--46,60)"; + "let testUIntPtrToUInt32Operator(e1) = Operators.ToUInt32 (e1) @ (47,52--47,61)"; + "let testUIntPtrToInt64Operator(e1) = Operators.ToInt64 (e1) @ (48,52--48,60)"; + "let testUIntPtrToUInt64Operator(e1) = Operators.ToUInt64 (e1) @ (49,52--49,61)"; + "let testUIntPtrToIntPtrOperator(e1) = Operators.ToIntPtr (e1) @ (50,52--50,64)"; + "let testUIntPtrToUIntPtrOperator(e1) = Operators.ToUIntPtr (e1) @ (51,52--51,65)"; + "let testUIntPtrToSingleOperator(e1) = Operators.ToSingle (e1) @ (52,52--52,62)"; + "let testUIntPtrToDoubleOperator(e1) = Operators.ToDouble (e1) @ (53,52--53,60)"; + "let testUIntPtrToDecimalOperator(e1) = Operators.ToDecimal (e1) @ (54,52--54,62)"; + "let testUIntPtrToCharOperator(e1) = Operators.ToChar (e1) @ (55,52--55,59)"; + "let testUIntPtrToStringOperator(e1) = Operators.ToString (e1) @ (56,52--56,61)"; + ] + + let expectedOptimized = [ + "type OperatorTestsUIntPtr"; + "let testUIntPtrEqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,79--4,87)"; + "let testUIntPtrNotEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_Equality (e1,e2),False) @ (5,79--5,88)"; + "let testUIntPtrLessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,79--6,87)"; + "let testUIntPtrLessThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_GreaterThan (e1,e2),False) @ (7,79--7,88)"; + "let testUIntPtrGreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,79--8,87)"; + "let testUIntPtrGreaterThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_LessThan (e1,e2),False) @ (9,79--9,88)"; + "let testUIntPtrAdditionOperator(e1) (e2) = Operators.op_Addition (e1,e2) @ (11,71--11,79)"; + "let testUIntPtrSubtractionOperator(e1) (e2) = Operators.op_Subtraction (e1,e2) @ (12,71--12,79)"; + "let testUIntPtrMultiplyOperator(e1) (e2) = Operators.op_Multiply (e1,e2) @ (13,70--13,79)"; + "let testUIntPtrDivisionOperator(e1) (e2) = Operators.op_Division (e1,e2) @ (14,71--14,79)"; + "let testUIntPtrModulusOperator(e1) (e2) = Operators.op_Modulus (e1,e2) @ (15,71--15,79)"; + "let testUIntPtrBitwiseAndOperator(e1) (e2) = Operators.op_BitwiseAnd (e1,e2) @ (16,71--16,81)"; + "let testUIntPtrBitwiseOrOperator(e1) (e2) = Operators.op_BitwiseOr (e1,e2) @ (17,71--17,81)"; + "let testUIntPtrBitwiseXorOperator(e1) (e2) = Operators.op_ExclusiveOr (e1,e2) @ (18,71--18,81)"; + "let testUIntPtrShiftLeftOperator(e1) (e2) = Operators.op_LeftShift (e1,e2) @ (19,64--19,74)"; + "let testUIntPtrShiftRightOperator(e1) (e2) = Operators.op_RightShift (e1,e2) @ (20,64--20,74)"; + "let testUIntPtrAdditionChecked(e1) (e2) = Checked.op_Addition (e1,e2) @ (24,68--24,85)"; + "let testUIntPtrSubtractionChecked(e1) (e2) = Checked.op_Subtraction (e1,e2) @ (25,68--25,85)"; + "let testUIntPtrMultiplyChecked(e1) (e2) = Checked.op_Multiply (e1,e2) @ (26,68--26,85)"; + "let testUIntPtrToByteChecked(e1) = Checked.ToByte (e1) @ (29,52--29,67)"; + "let testUIntPtrToSByteChecked(e1) = Checked.ToSByte (e1) @ (30,52--30,68)"; + "let testUIntPtrToInt16Checked(e1) = Checked.ToInt16 (e1) @ (31,52--31,68)"; + "let testUIntPtrToUInt16Checked(e1) = Checked.ToUInt16 (e1) @ (32,52--32,69)"; + "let testUIntPtrToIntChecked(e1) = Checked.ToInt32 (e1) @ (33,52--33,66)"; + "let testUIntPtrToInt32Checked(e1) = Checked.ToInt32 (e1) @ (34,52--34,68)"; + "let testUIntPtrToUInt32Checked(e1) = Checked.ToUInt32 (e1) @ (35,52--35,69)"; + "let testUIntPtrToInt64Checked(e1) = Checked.ToInt64 (e1) @ (36,52--36,68)"; + "let testUIntPtrToUInt64Checked(e1) = Checked.ToUInt64 (e1) @ (37,52--37,69)"; + "let testUIntPtrToIntPtrChecked(e1) = Checked.ToIntPtr (e1) @ (38,52--38,72)"; + "let testUIntPtrToUIntPtrChecked(e1) = Checked.ToUIntPtr (e1) @ (39,52--39,73)"; + "let testUIntPtrToByteOperator(e1) = Operators.ToByte (e1) @ (41,52--41,59)"; + "let testUIntPtrToSByteOperator(e1) = Operators.ToSByte (e1) @ (42,52--42,60)"; + "let testUIntPtrToInt16Operator(e1) = Operators.ToInt16 (e1) @ (43,52--43,60)"; + "let testUIntPtrToUInt16Operator(e1) = Operators.ToUInt16 (e1) @ (44,52--44,61)"; + "let testUIntPtrToIntOperator(e1) = Operators.ToInt32 (e1) @ (45,52--45,58)"; + "let testUIntPtrToInt32Operator(e1) = Operators.ToInt32 (e1) @ (46,52--46,60)"; + "let testUIntPtrToUInt32Operator(e1) = Operators.ToUInt32 (e1) @ (47,52--47,61)"; + "let testUIntPtrToInt64Operator(e1) = Operators.ToUInt64 (e1) @ (48,52--48,60)"; + "let testUIntPtrToUInt64Operator(e1) = Operators.ToUInt64 (e1) @ (49,52--49,61)"; + "let testUIntPtrToIntPtrOperator(e1) = Operators.ToIntPtr (e1) @ (50,52--50,64)"; + "let testUIntPtrToUIntPtrOperator(e1) = e1 @ (51,63--51,65)"; + "let testUIntPtrToSingleOperator(e1) = Operators.ToSingle (Operators.ToDouble (e1)) @ (52,52--52,62)"; + "let testUIntPtrToDoubleOperator(e1) = Operators.ToDouble (Operators.ToDouble (e1)) @ (53,52--53,60)"; + "let testUIntPtrToDecimalOperator(e1) = Convert.ToDecimal (Operators.ToUInt64 (e1)) @ (54,52--54,62)"; + "let testUIntPtrToCharOperator(e1) = Operators.ToChar (e1) @ (55,52--55,59)"; + "let testUIntPtrToStringOperator(e1) = let matchValue: Microsoft.FSharp.Core.obj = Operators.Box (e1) in match (if Operators.op_Equality (matchValue,dflt) then $0 else (if matchValue :? System.IFormattable then $1 else $2)) targets ... @ (56,52--56,61)"; + ] + + testOperators "UIntPtr" "unativeint" excludedTests expectedUnoptimized expectedOptimized + +[] +let ``Test Operator Declarations for Single`` () = + let excludedTests = [ + "testSingleBitwiseAndOperator"; + "testSingleBitwiseOrOperator"; + "testSingleBitwiseXorOperator"; + "testSingleShiftLeftOperator"; + "testSingleShiftRightOperator"; + ] + + let expectedUnoptimized = [ + "type OperatorTestsSingle"; + "let testSingleEqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,72--4,80)"; + "let testSingleNotEqualsOperator(e1) (e2) = Operators.op_Inequality (e1,e2) @ (5,72--5,81)"; + "let testSingleLessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,72--6,80)"; + "let testSingleLessThanOrEqualsOperator(e1) (e2) = Operators.op_LessThanOrEqual (e1,e2) @ (7,72--7,81)"; + "let testSingleGreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,72--8,80)"; + "let testSingleGreaterThanOrEqualsOperator(e1) (e2) = Operators.op_GreaterThanOrEqual (e1,e2) @ (9,72--9,81)"; + "let testSingleAdditionOperator(e1) (e2) = Operators.op_Addition (e1,e2) @ (11,64--11,72)"; + "let testSingleSubtractionOperator(e1) (e2) = Operators.op_Subtraction (e1,e2) @ (12,64--12,72)"; + "let testSingleMultiplyOperator(e1) (e2) = Operators.op_Multiply (e1,e2) @ (13,63--13,72)"; + "let testSingleDivisionOperator(e1) (e2) = Operators.op_Division (e1,e2) @ (14,64--14,72)"; + "let testSingleModulusOperator(e1) (e2) = Operators.op_Modulus (e1,e2) @ (15,64--15,72)"; + "let testSingleUnaryNegOperator(e1) = Operators.op_UnaryNegation (e1) @ (22,49--22,55)"; + "let testSingleAdditionChecked(e1) (e2) = Checked.op_Addition (e1,e2) @ (24,61--24,78)"; + "let testSingleSubtractionChecked(e1) (e2) = Checked.op_Subtraction (e1,e2) @ (25,61--25,78)"; + "let testSingleMultiplyChecked(e1) (e2) = Checked.op_Multiply (e1,e2) @ (26,61--26,78)"; + "let testSingleUnaryNegChecked(e1) = Checked.op_UnaryNegation (e1) @ (27,48--27,63)"; + "let testSingleToByteChecked(e1) = Checked.ToByte (e1) @ (29,48--29,63)"; + "let testSingleToSByteChecked(e1) = Checked.ToSByte (e1) @ (30,48--30,64)"; + "let testSingleToInt16Checked(e1) = Checked.ToInt16 (e1) @ (31,48--31,64)"; + "let testSingleToUInt16Checked(e1) = Checked.ToUInt16 (e1) @ (32,48--32,65)"; + "let testSingleToIntChecked(e1) = Checked.ToInt (e1) @ (33,48--33,62)"; + "let testSingleToInt32Checked(e1) = Checked.ToInt32 (e1) @ (34,48--34,64)"; + "let testSingleToUInt32Checked(e1) = Checked.ToUInt32 (e1) @ (35,48--35,65)"; + "let testSingleToInt64Checked(e1) = Checked.ToInt64 (e1) @ (36,48--36,64)"; + "let testSingleToUInt64Checked(e1) = Checked.ToUInt64 (e1) @ (37,48--37,65)"; + "let testSingleToIntPtrChecked(e1) = Checked.ToIntPtr (e1) @ (38,48--38,68)"; + "let testSingleToUIntPtrChecked(e1) = Checked.ToUIntPtr (e1) @ (39,48--39,69)"; + "let testSingleToByteOperator(e1) = Operators.ToByte (e1) @ (41,48--41,55)"; + "let testSingleToSByteOperator(e1) = Operators.ToSByte (e1) @ (42,48--42,56)"; + "let testSingleToInt16Operator(e1) = Operators.ToInt16 (e1) @ (43,48--43,56)"; + "let testSingleToUInt16Operator(e1) = Operators.ToUInt16 (e1) @ (44,48--44,57)"; + "let testSingleToIntOperator(e1) = Operators.ToInt (e1) @ (45,48--45,54)"; + "let testSingleToInt32Operator(e1) = Operators.ToInt32 (e1) @ (46,48--46,56)"; + "let testSingleToUInt32Operator(e1) = Operators.ToUInt32 (e1) @ (47,48--47,57)"; + "let testSingleToInt64Operator(e1) = Operators.ToInt64 (e1) @ (48,48--48,56)"; + "let testSingleToUInt64Operator(e1) = Operators.ToUInt64 (e1) @ (49,48--49,57)"; + "let testSingleToIntPtrOperator(e1) = Operators.ToIntPtr (e1) @ (50,48--50,60)"; + "let testSingleToUIntPtrOperator(e1) = Operators.ToUIntPtr (e1) @ (51,48--51,61)"; + "let testSingleToSingleOperator(e1) = Operators.ToSingle (e1) @ (52,48--52,58)"; + "let testSingleToDoubleOperator(e1) = Operators.ToDouble (e1) @ (53,48--53,56)"; + "let testSingleToDecimalOperator(e1) = Operators.ToDecimal (e1) @ (54,48--54,58)"; + "let testSingleToCharOperator(e1) = Operators.ToChar (e1) @ (55,48--55,55)"; + "let testSingleToStringOperator(e1) = Operators.ToString (e1) @ (56,48--56,57)"; + ] + + let expectedOptimized = [ + "type OperatorTestsSingle"; + "let testSingleEqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,72--4,80)"; + "let testSingleNotEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_Equality (e1,e2),False) @ (5,72--5,81)"; + "let testSingleLessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,72--6,80)"; + "let testSingleLessThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_GreaterThan (e1,e2),False) @ (7,72--7,81)"; + "let testSingleGreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,72--8,80)"; + "let testSingleGreaterThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_LessThan (e1,e2),False) @ (9,72--9,81)"; + "let testSingleAdditionOperator(e1) (e2) = Operators.op_Addition (e1,e2) @ (11,64--11,72)"; + "let testSingleSubtractionOperator(e1) (e2) = Operators.op_Subtraction (e1,e2) @ (12,64--12,72)"; + "let testSingleMultiplyOperator(e1) (e2) = Operators.op_Multiply (e1,e2) @ (13,63--13,72)"; + "let testSingleDivisionOperator(e1) (e2) = Operators.op_Division (e1,e2) @ (14,64--14,72)"; + "let testSingleModulusOperator(e1) (e2) = Operators.op_Modulus (e1,e2) @ (15,64--15,72)"; + "let testSingleUnaryNegOperator(e1) = Operators.op_UnaryNegation (e1) @ (22,49--22,55)"; + "let testSingleAdditionChecked(e1) (e2) = Operators.op_Addition (e1,e2) @ (24,61--24,78)"; + "let testSingleSubtractionChecked(e1) (e2) = Operators.op_Subtraction (e1,e2) @ (25,61--25,78)"; + "let testSingleMultiplyChecked(e1) (e2) = Operators.op_Multiply (e1,e2) @ (26,61--26,78)"; + "let testSingleUnaryNegChecked(e1) = Operators.op_UnaryNegation (e1) @ (27,48--27,63)"; + "let testSingleToByteChecked(e1) = Checked.ToByte (e1) @ (29,48--29,63)"; + "let testSingleToSByteChecked(e1) = Checked.ToSByte (e1) @ (30,48--30,64)"; + "let testSingleToInt16Checked(e1) = Checked.ToInt16 (e1) @ (31,48--31,64)"; + "let testSingleToUInt16Checked(e1) = Checked.ToUInt16 (e1) @ (32,48--32,65)"; + "let testSingleToIntChecked(e1) = Checked.ToInt32 (e1) @ (33,48--33,62)"; + "let testSingleToInt32Checked(e1) = Checked.ToInt32 (e1) @ (34,48--34,64)"; + "let testSingleToUInt32Checked(e1) = Checked.ToUInt32 (e1) @ (35,48--35,65)"; + "let testSingleToInt64Checked(e1) = Checked.ToInt64 (e1) @ (36,48--36,64)"; + "let testSingleToUInt64Checked(e1) = Checked.ToUInt64 (e1) @ (37,48--37,65)"; + "let testSingleToIntPtrChecked(e1) = Checked.ToIntPtr (e1) @ (38,48--38,68)"; + "let testSingleToUIntPtrChecked(e1) = Checked.ToUIntPtr (e1) @ (39,48--39,69)"; + "let testSingleToByteOperator(e1) = Operators.ToByte (e1) @ (41,48--41,55)"; + "let testSingleToSByteOperator(e1) = Operators.ToSByte (e1) @ (42,48--42,56)"; + "let testSingleToInt16Operator(e1) = Operators.ToInt16 (e1) @ (43,48--43,56)"; + "let testSingleToUInt16Operator(e1) = Operators.ToUInt16 (e1) @ (44,48--44,57)"; + "let testSingleToIntOperator(e1) = Operators.ToInt32 (e1) @ (45,48--45,54)"; + "let testSingleToInt32Operator(e1) = Operators.ToInt32 (e1) @ (46,48--46,56)"; + "let testSingleToUInt32Operator(e1) = Operators.ToUInt32 (e1) @ (47,48--47,57)"; + "let testSingleToInt64Operator(e1) = Operators.ToInt64 (e1) @ (48,48--48,56)"; + "let testSingleToUInt64Operator(e1) = Operators.ToUInt64 (e1) @ (49,48--49,57)"; + "let testSingleToIntPtrOperator(e1) = Operators.ToIntPtr (e1) @ (50,48--50,60)"; + "let testSingleToUIntPtrOperator(e1) = Operators.ToUIntPtr (e1) @ (51,48--51,61)"; + "let testSingleToSingleOperator(e1) = Operators.ToSingle (e1) @ (52,48--52,58)"; + "let testSingleToDoubleOperator(e1) = Operators.ToDouble (e1) @ (53,48--53,56)"; + "let testSingleToDecimalOperator(e1) = Convert.ToDecimal (e1) @ (54,48--54,58)"; + "let testSingleToCharOperator(e1) = Operators.ToChar (e1) @ (55,48--55,55)"; + "let testSingleToStringOperator(e1) = let matchValue: Microsoft.FSharp.Core.obj = Operators.Box (e1) in match (if Operators.op_Equality (matchValue,dflt) then $0 else (if matchValue :? System.IFormattable then $1 else $2)) targets ... @ (56,48--56,57)"; + ] + + testOperators "Single" "float32" excludedTests expectedUnoptimized expectedOptimized + +[] +let ``Test Operator Declarations for Double`` () = + let excludedTests = [ + "testDoubleBitwiseAndOperator"; + "testDoubleBitwiseOrOperator"; + "testDoubleBitwiseXorOperator"; + "testDoubleShiftLeftOperator"; + "testDoubleShiftRightOperator"; + ] + + let expectedUnoptimized = [ + "type OperatorTestsDouble"; + "let testDoubleEqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,68--4,76)"; + "let testDoubleNotEqualsOperator(e1) (e2) = Operators.op_Inequality (e1,e2) @ (5,68--5,77)"; + "let testDoubleLessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,68--6,76)"; + "let testDoubleLessThanOrEqualsOperator(e1) (e2) = Operators.op_LessThanOrEqual (e1,e2) @ (7,68--7,77)"; + "let testDoubleGreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,68--8,76)"; + "let testDoubleGreaterThanOrEqualsOperator(e1) (e2) = Operators.op_GreaterThanOrEqual (e1,e2) @ (9,68--9,77)"; + "let testDoubleAdditionOperator(e1) (e2) = Operators.op_Addition (e1,e2) @ (11,60--11,68)"; + "let testDoubleSubtractionOperator(e1) (e2) = Operators.op_Subtraction (e1,e2) @ (12,60--12,68)"; + "let testDoubleMultiplyOperator(e1) (e2) = Operators.op_Multiply (e1,e2) @ (13,59--13,68)"; + "let testDoubleDivisionOperator(e1) (e2) = Operators.op_Division (e1,e2) @ (14,60--14,68)"; + "let testDoubleModulusOperator(e1) (e2) = Operators.op_Modulus (e1,e2) @ (15,60--15,68)"; + "let testDoubleUnaryNegOperator(e1) = Operators.op_UnaryNegation (e1) @ (22,47--22,53)"; + "let testDoubleAdditionChecked(e1) (e2) = Checked.op_Addition (e1,e2) @ (24,57--24,74)"; + "let testDoubleSubtractionChecked(e1) (e2) = Checked.op_Subtraction (e1,e2) @ (25,57--25,74)"; + "let testDoubleMultiplyChecked(e1) (e2) = Checked.op_Multiply (e1,e2) @ (26,57--26,74)"; + "let testDoubleUnaryNegChecked(e1) = Checked.op_UnaryNegation (e1) @ (27,46--27,61)"; + "let testDoubleToByteChecked(e1) = Checked.ToByte (e1) @ (29,46--29,61)"; + "let testDoubleToSByteChecked(e1) = Checked.ToSByte (e1) @ (30,46--30,62)"; + "let testDoubleToInt16Checked(e1) = Checked.ToInt16 (e1) @ (31,46--31,62)"; + "let testDoubleToUInt16Checked(e1) = Checked.ToUInt16 (e1) @ (32,46--32,63)"; + "let testDoubleToIntChecked(e1) = Checked.ToInt (e1) @ (33,46--33,60)"; + "let testDoubleToInt32Checked(e1) = Checked.ToInt32 (e1) @ (34,46--34,62)"; + "let testDoubleToUInt32Checked(e1) = Checked.ToUInt32 (e1) @ (35,46--35,63)"; + "let testDoubleToInt64Checked(e1) = Checked.ToInt64 (e1) @ (36,46--36,62)"; + "let testDoubleToUInt64Checked(e1) = Checked.ToUInt64 (e1) @ (37,46--37,63)"; + "let testDoubleToIntPtrChecked(e1) = Checked.ToIntPtr (e1) @ (38,46--38,66)"; + "let testDoubleToUIntPtrChecked(e1) = Checked.ToUIntPtr (e1) @ (39,46--39,67)"; + "let testDoubleToByteOperator(e1) = Operators.ToByte (e1) @ (41,46--41,53)"; + "let testDoubleToSByteOperator(e1) = Operators.ToSByte (e1) @ (42,46--42,54)"; + "let testDoubleToInt16Operator(e1) = Operators.ToInt16 (e1) @ (43,46--43,54)"; + "let testDoubleToUInt16Operator(e1) = Operators.ToUInt16 (e1) @ (44,46--44,55)"; + "let testDoubleToIntOperator(e1) = Operators.ToInt (e1) @ (45,46--45,52)"; + "let testDoubleToInt32Operator(e1) = Operators.ToInt32 (e1) @ (46,46--46,54)"; + "let testDoubleToUInt32Operator(e1) = Operators.ToUInt32 (e1) @ (47,46--47,55)"; + "let testDoubleToInt64Operator(e1) = Operators.ToInt64 (e1) @ (48,46--48,54)"; + "let testDoubleToUInt64Operator(e1) = Operators.ToUInt64 (e1) @ (49,46--49,55)"; + "let testDoubleToIntPtrOperator(e1) = Operators.ToIntPtr (e1) @ (50,46--50,58)"; + "let testDoubleToUIntPtrOperator(e1) = Operators.ToUIntPtr (e1) @ (51,46--51,59)"; + "let testDoubleToSingleOperator(e1) = Operators.ToSingle (e1) @ (52,46--52,56)"; + "let testDoubleToDoubleOperator(e1) = Operators.ToDouble (e1) @ (53,46--53,54)"; + "let testDoubleToDecimalOperator(e1) = Operators.ToDecimal (e1) @ (54,46--54,56)"; + "let testDoubleToCharOperator(e1) = Operators.ToChar (e1) @ (55,46--55,53)"; + "let testDoubleToStringOperator(e1) = Operators.ToString (e1) @ (56,46--56,55)"; + ] + + let expectedOptimized = [ + "type OperatorTestsDouble"; + "let testDoubleEqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,68--4,76)"; + "let testDoubleNotEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_Equality (e1,e2),False) @ (5,68--5,77)"; + "let testDoubleLessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,68--6,76)"; + "let testDoubleLessThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_GreaterThan (e1,e2),False) @ (7,68--7,77)"; + "let testDoubleGreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,68--8,76)"; + "let testDoubleGreaterThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_LessThan (e1,e2),False) @ (9,68--9,77)"; + "let testDoubleAdditionOperator(e1) (e2) = Operators.op_Addition (e1,e2) @ (11,60--11,68)"; + "let testDoubleSubtractionOperator(e1) (e2) = Operators.op_Subtraction (e1,e2) @ (12,60--12,68)"; + "let testDoubleMultiplyOperator(e1) (e2) = Operators.op_Multiply (e1,e2) @ (13,59--13,68)"; + "let testDoubleDivisionOperator(e1) (e2) = Operators.op_Division (e1,e2) @ (14,60--14,68)"; + "let testDoubleModulusOperator(e1) (e2) = Operators.op_Modulus (e1,e2) @ (15,60--15,68)"; + "let testDoubleUnaryNegOperator(e1) = Operators.op_UnaryNegation (e1) @ (22,47--22,53)"; + "let testDoubleAdditionChecked(e1) (e2) = Operators.op_Addition (e1,e2) @ (24,57--24,74)"; + "let testDoubleSubtractionChecked(e1) (e2) = Operators.op_Subtraction (e1,e2) @ (25,57--25,74)"; + "let testDoubleMultiplyChecked(e1) (e2) = Operators.op_Multiply (e1,e2) @ (26,57--26,74)"; + "let testDoubleUnaryNegChecked(e1) = Operators.op_UnaryNegation (e1) @ (27,46--27,61)"; + "let testDoubleToByteChecked(e1) = Checked.ToByte (e1) @ (29,46--29,61)"; + "let testDoubleToSByteChecked(e1) = Checked.ToSByte (e1) @ (30,46--30,62)"; + "let testDoubleToInt16Checked(e1) = Checked.ToInt16 (e1) @ (31,46--31,62)"; + "let testDoubleToUInt16Checked(e1) = Checked.ToUInt16 (e1) @ (32,46--32,63)"; + "let testDoubleToIntChecked(e1) = Checked.ToInt32 (e1) @ (33,46--33,60)"; + "let testDoubleToInt32Checked(e1) = Checked.ToInt32 (e1) @ (34,46--34,62)"; + "let testDoubleToUInt32Checked(e1) = Checked.ToUInt32 (e1) @ (35,46--35,63)"; + "let testDoubleToInt64Checked(e1) = Checked.ToInt64 (e1) @ (36,46--36,62)"; + "let testDoubleToUInt64Checked(e1) = Checked.ToUInt64 (e1) @ (37,46--37,63)"; + "let testDoubleToIntPtrChecked(e1) = Checked.ToIntPtr (e1) @ (38,46--38,66)"; + "let testDoubleToUIntPtrChecked(e1) = Checked.ToUIntPtr (e1) @ (39,46--39,67)"; + "let testDoubleToByteOperator(e1) = Operators.ToByte (e1) @ (41,46--41,53)"; + "let testDoubleToSByteOperator(e1) = Operators.ToSByte (e1) @ (42,46--42,54)"; + "let testDoubleToInt16Operator(e1) = Operators.ToInt16 (e1) @ (43,46--43,54)"; + "let testDoubleToUInt16Operator(e1) = Operators.ToUInt16 (e1) @ (44,46--44,55)"; + "let testDoubleToIntOperator(e1) = Operators.ToInt32 (e1) @ (45,46--45,52)"; + "let testDoubleToInt32Operator(e1) = Operators.ToInt32 (e1) @ (46,46--46,54)"; + "let testDoubleToUInt32Operator(e1) = Operators.ToUInt32 (e1) @ (47,46--47,55)"; + "let testDoubleToInt64Operator(e1) = Operators.ToInt64 (e1) @ (48,46--48,54)"; + "let testDoubleToUInt64Operator(e1) = Operators.ToUInt64 (e1) @ (49,46--49,55)"; + "let testDoubleToIntPtrOperator(e1) = Operators.ToIntPtr (e1) @ (50,46--50,58)"; + "let testDoubleToUIntPtrOperator(e1) = Operators.ToUIntPtr (e1) @ (51,46--51,59)"; + "let testDoubleToSingleOperator(e1) = Operators.ToSingle (e1) @ (52,46--52,56)"; + "let testDoubleToDoubleOperator(e1) = Operators.ToDouble (e1) @ (53,46--53,54)"; + "let testDoubleToDecimalOperator(e1) = Convert.ToDecimal (e1) @ (54,46--54,56)"; + "let testDoubleToCharOperator(e1) = Operators.ToChar (e1) @ (55,46--55,53)"; + "let testDoubleToStringOperator(e1) = let matchValue: Microsoft.FSharp.Core.obj = Operators.Box (e1) in match (if Operators.op_Equality (matchValue,dflt) then $0 else (if matchValue :? System.IFormattable then $1 else $2)) targets ... @ (56,46--56,55)"; + ] + + testOperators "Double" "float" excludedTests expectedUnoptimized expectedOptimized + +[] +let ``Test Operator Declarations for Decimal`` () = + let excludedTests = [ + "testDecimalBitwiseAndOperator"; + "testDecimalBitwiseOrOperator"; + "testDecimalBitwiseXorOperator"; + "testDecimalShiftLeftOperator"; + "testDecimalShiftRightOperator"; + "testDecimalUnaryNegOperator"; + "testDecimalSubtractionChecked"; + "testDecimalMultiplyChecked"; + "testDecimalUnaryNegChecked"; + "testDecimalToIntPtrChecked"; + "testDecimalToUIntPtrChecked"; + "testDecimalToIntPtrOperator"; + "testDecimalToUIntPtrOperator"; + ] + + let expectedUnoptimized = [ + "type OperatorTestsDecimal"; + "let testDecimalEqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,73--4,81)"; + "let testDecimalNotEqualsOperator(e1) (e2) = Operators.op_Inequality (e1,e2) @ (5,73--5,82)"; + "let testDecimalLessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,73--6,81)"; + "let testDecimalLessThanOrEqualsOperator(e1) (e2) = Operators.op_LessThanOrEqual (e1,e2) @ (7,73--7,82)"; + "let testDecimalGreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,73--8,81)"; + "let testDecimalGreaterThanOrEqualsOperator(e1) (e2) = Operators.op_GreaterThanOrEqual (e1,e2) @ (9,73--9,82)"; + "let testDecimalAdditionOperator(e1) (e2) = Operators.op_Addition (e1,e2) @ (11,65--11,73)"; + "let testDecimalSubtractionOperator(e1) (e2) = Operators.op_Subtraction (e1,e2) @ (12,65--12,73)"; + "let testDecimalMultiplyOperator(e1) (e2) = Operators.op_Multiply (e1,e2) @ (13,64--13,73)"; + "let testDecimalDivisionOperator(e1) (e2) = Operators.op_Division (e1,e2) @ (14,65--14,73)"; + "let testDecimalModulusOperator(e1) (e2) = Operators.op_Modulus (e1,e2) @ (15,65--15,73)"; + "let testDecimalAdditionChecked(e1) (e2) = Checked.op_Addition (e1,e2) @ (24,62--24,79)"; + "let testDecimalToByteChecked(e1) = Checked.ToByte (e1) @ (29,49--29,64)"; + "let testDecimalToSByteChecked(e1) = Checked.ToSByte (e1) @ (30,49--30,65)"; + "let testDecimalToInt16Checked(e1) = Checked.ToInt16 (e1) @ (31,49--31,65)"; + "let testDecimalToUInt16Checked(e1) = Checked.ToUInt16 (e1) @ (32,49--32,66)"; + "let testDecimalToIntChecked(e1) = Checked.ToInt (e1) @ (33,49--33,63)"; + "let testDecimalToInt32Checked(e1) = Checked.ToInt32 (e1) @ (34,49--34,65)"; + "let testDecimalToUInt32Checked(e1) = Checked.ToUInt32 (e1) @ (35,49--35,66)"; + "let testDecimalToInt64Checked(e1) = Checked.ToInt64 (e1) @ (36,49--36,65)"; + "let testDecimalToUInt64Checked(e1) = Checked.ToUInt64 (e1) @ (37,49--37,66)"; + "let testDecimalToByteOperator(e1) = Operators.ToByte (e1) @ (41,49--41,56)"; + "let testDecimalToSByteOperator(e1) = Operators.ToSByte (e1) @ (42,49--42,57)"; + "let testDecimalToInt16Operator(e1) = Operators.ToInt16 (e1) @ (43,49--43,57)"; + "let testDecimalToUInt16Operator(e1) = Operators.ToUInt16 (e1) @ (44,49--44,58)"; + "let testDecimalToIntOperator(e1) = Operators.ToInt (e1) @ (45,49--45,55)"; + "let testDecimalToInt32Operator(e1) = Operators.ToInt32 (e1) @ (46,49--46,57)"; + "let testDecimalToUInt32Operator(e1) = Operators.ToUInt32 (e1) @ (47,49--47,58)"; + "let testDecimalToInt64Operator(e1) = Operators.ToInt64 (e1) @ (48,49--48,57)"; + "let testDecimalToUInt64Operator(e1) = Operators.ToUInt64 (e1) @ (49,49--49,58)"; + "let testDecimalToSingleOperator(e1) = Operators.ToSingle (e1) @ (52,49--52,59)"; + "let testDecimalToDoubleOperator(e1) = Operators.ToDouble (e1) @ (53,49--53,57)"; + "let testDecimalToDecimalOperator(e1) = Operators.ToDecimal (e1) @ (54,49--54,59)"; + "let testDecimalToCharOperator(e1) = Operators.ToChar (e1) @ (55,49--55,56)"; + "let testDecimalToStringOperator(e1) = Operators.ToString (e1) @ (56,49--56,58)"; + ] + + let expectedOptimized = [ + "type OperatorTestsDecimal"; + "let testDecimalEqualsOperator(e1) (e2) = Decimal.op_Equality (e1,e2) @ (4,73--4,81)"; + "let testDecimalNotEqualsOperator(e1) (e2) = Operators.op_Equality (Decimal.op_Equality (e1,e2),False) @ (5,73--5,82)"; + "let testDecimalLessThanOperator(e1) (e2) = Decimal.op_LessThan (e1,e2) @ (6,73--6,81)"; + "let testDecimalLessThanOrEqualsOperator(e1) (e2) = Decimal.op_LessThanOrEqual (e1,e2) @ (7,73--7,82)"; + "let testDecimalGreaterThanOperator(e1) (e2) = Decimal.op_GreaterThan (e1,e2) @ (8,73--8,81)"; + "let testDecimalGreaterThanOrEqualsOperator(e1) (e2) = Decimal.op_GreaterThanOrEqual (e1,e2) @ (9,73--9,82)"; + "let testDecimalAdditionOperator(e1) (e2) = Decimal.op_Addition (e1,e2) @ (11,65--11,73)"; + "let testDecimalSubtractionOperator(e1) (e2) = Decimal.op_Subtraction (e1,e2) @ (12,65--12,73)"; + "let testDecimalMultiplyOperator(e1) (e2) = Decimal.op_Multiply (e1,e2) @ (13,64--13,73)"; + "let testDecimalDivisionOperator(e1) (e2) = Decimal.op_Division (e1,e2) @ (14,65--14,73)"; + "let testDecimalModulusOperator(e1) (e2) = Decimal.op_Modulus (e1,e2) @ (15,65--15,73)"; + "let testDecimalAdditionChecked(e1) (e2) = Decimal.op_Addition (e1,e2) @ (24,62--24,79)"; + "let testDecimalToByteChecked(e1) = Decimal.op_Explicit (e1) @ (29,49--29,64)"; + "let testDecimalToSByteChecked(e1) = Decimal.op_Explicit (e1) @ (30,49--30,65)"; + "let testDecimalToInt16Checked(e1) = Decimal.op_Explicit (e1) @ (31,49--31,65)"; + "let testDecimalToUInt16Checked(e1) = Decimal.op_Explicit (e1) @ (32,49--32,66)"; + "let testDecimalToIntChecked(e1) = Decimal.op_Explicit (e1) @ (33,49--33,63)"; + "let testDecimalToInt32Checked(e1) = Decimal.op_Explicit (e1) @ (34,49--34,65)"; + "let testDecimalToUInt32Checked(e1) = Decimal.op_Explicit (e1) @ (35,49--35,66)"; + "let testDecimalToInt64Checked(e1) = Decimal.op_Explicit (e1) @ (36,49--36,65)"; + "let testDecimalToUInt64Checked(e1) = Decimal.op_Explicit (e1) @ (37,49--37,66)"; + "let testDecimalToByteOperator(e1) = Decimal.op_Explicit (e1) @ (41,49--41,56)"; + "let testDecimalToSByteOperator(e1) = Decimal.op_Explicit (e1) @ (42,49--42,57)"; + "let testDecimalToInt16Operator(e1) = Decimal.op_Explicit (e1) @ (43,49--43,57)"; + "let testDecimalToUInt16Operator(e1) = Decimal.op_Explicit (e1) @ (44,49--44,58)"; + "let testDecimalToIntOperator(e1) = Decimal.op_Explicit (e1) @ (45,49--45,55)"; + "let testDecimalToInt32Operator(e1) = Decimal.op_Explicit (e1) @ (46,49--46,57)"; + "let testDecimalToUInt32Operator(e1) = Decimal.op_Explicit (e1) @ (47,49--47,58)"; + "let testDecimalToInt64Operator(e1) = Decimal.op_Explicit (e1) @ (48,49--48,57)"; + "let testDecimalToUInt64Operator(e1) = Decimal.op_Explicit (e1) @ (49,49--49,58)"; + "let testDecimalToSingleOperator(e1) = Decimal.op_Explicit (e1) @ (52,49--52,59)"; + "let testDecimalToDoubleOperator(e1) = Convert.ToDouble (e1) @ (53,49--53,57)"; + "let testDecimalToDecimalOperator(e1) = e1 @ (54,57--54,59)"; + "let testDecimalToCharOperator(e1) = Decimal.op_Explicit (e1) @ (55,49--55,56)"; + "let testDecimalToStringOperator(e1) = let matchValue: Microsoft.FSharp.Core.obj = Operators.Box (e1) in match (if Operators.op_Equality (matchValue,dflt) then $0 else (if matchValue :? System.IFormattable then $1 else $2)) targets ... @ (56,49--56,58)"; + ] + + testOperators "Decimal" "decimal" excludedTests expectedUnoptimized expectedOptimized + +[] +let ``Test Operator Declarations for Char`` () = + let excludedTests = [ + "testCharSubtractionOperator"; + "testCharMultiplyOperator"; + "testCharDivisionOperator"; + "testCharModulusOperator"; + "testCharBitwiseAndOperator"; + "testCharBitwiseOrOperator"; + "testCharBitwiseXorOperator"; + "testCharShiftLeftOperator"; + "testCharShiftRightOperator"; + "testCharUnaryNegOperator"; + "testCharSubtractionChecked"; + "testCharMultiplyChecked"; + "testCharUnaryNegChecked"; + "testCharToDecimalOperator"; + ] + + let expectedUnoptimized = [ + "type OperatorTestsChar"; + "let testCharEqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,64--4,72)"; + "let testCharNotEqualsOperator(e1) (e2) = Operators.op_Inequality (e1,e2) @ (5,64--5,73)"; + "let testCharLessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,64--6,72)"; + "let testCharLessThanOrEqualsOperator(e1) (e2) = Operators.op_LessThanOrEqual (e1,e2) @ (7,64--7,73)"; + "let testCharGreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,64--8,72)"; + "let testCharGreaterThanOrEqualsOperator(e1) (e2) = Operators.op_GreaterThanOrEqual (e1,e2) @ (9,64--9,73)"; + "let testCharAdditionOperator(e1) (e2) = Operators.op_Addition (e1,e2) @ (11,56--11,64)"; + "let testCharAdditionChecked(e1) (e2) = Checked.op_Addition (e1,e2) @ (24,53--24,70)"; + "let testCharToByteChecked(e1) = Checked.ToByte (e1) @ (29,43--29,58)"; + "let testCharToSByteChecked(e1) = Checked.ToSByte (e1) @ (30,43--30,59)"; + "let testCharToInt16Checked(e1) = Checked.ToInt16 (e1) @ (31,43--31,59)"; + "let testCharToUInt16Checked(e1) = Checked.ToUInt16 (e1) @ (32,43--32,60)"; + "let testCharToIntChecked(e1) = Checked.ToInt (e1) @ (33,43--33,57)"; + "let testCharToInt32Checked(e1) = Checked.ToInt32 (e1) @ (34,43--34,59)"; + "let testCharToUInt32Checked(e1) = Checked.ToUInt32 (e1) @ (35,43--35,60)"; + "let testCharToInt64Checked(e1) = Checked.ToInt64 (e1) @ (36,43--36,59)"; + "let testCharToUInt64Checked(e1) = Checked.ToUInt64 (e1) @ (37,43--37,60)"; + "let testCharToIntPtrChecked(e1) = Checked.ToIntPtr (e1) @ (38,43--38,63)"; + "let testCharToUIntPtrChecked(e1) = Checked.ToUIntPtr (e1) @ (39,43--39,64)"; + "let testCharToByteOperator(e1) = Operators.ToByte (e1) @ (41,43--41,50)"; + "let testCharToSByteOperator(e1) = Operators.ToSByte (e1) @ (42,43--42,51)"; + "let testCharToInt16Operator(e1) = Operators.ToInt16 (e1) @ (43,43--43,51)"; + "let testCharToUInt16Operator(e1) = Operators.ToUInt16 (e1) @ (44,43--44,52)"; + "let testCharToIntOperator(e1) = Operators.ToInt (e1) @ (45,43--45,49)"; + "let testCharToInt32Operator(e1) = Operators.ToInt32 (e1) @ (46,43--46,51)"; + "let testCharToUInt32Operator(e1) = Operators.ToUInt32 (e1) @ (47,43--47,52)"; + "let testCharToInt64Operator(e1) = Operators.ToInt64 (e1) @ (48,43--48,51)"; + "let testCharToUInt64Operator(e1) = Operators.ToUInt64 (e1) @ (49,43--49,52)"; + "let testCharToIntPtrOperator(e1) = Operators.ToIntPtr (e1) @ (50,43--50,55)"; + "let testCharToUIntPtrOperator(e1) = Operators.ToUIntPtr (e1) @ (51,43--51,56)"; + "let testCharToSingleOperator(e1) = Operators.ToSingle (e1) @ (52,43--52,53)"; + "let testCharToDoubleOperator(e1) = Operators.ToDouble (e1) @ (53,43--53,51)"; + "let testCharToCharOperator(e1) = Operators.ToChar (e1) @ (55,43--55,50)"; + "let testCharToStringOperator(e1) = Operators.ToString (e1) @ (56,43--56,52)"; + ] + + let expectedOptimized = [ + "type OperatorTestsChar"; + "let testCharEqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,64--4,72)"; + "let testCharNotEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_Equality (e1,e2),False) @ (5,64--5,73)"; + "let testCharLessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,64--6,72)"; + "let testCharLessThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_GreaterThan (e1,e2),False) @ (7,64--7,73)"; + "let testCharGreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,64--8,72)"; + "let testCharGreaterThanOrEqualsOperator(e1) (e2) = Operators.op_Equality (Operators.op_LessThan (e1,e2),False) @ (9,64--9,73)"; + "let testCharAdditionOperator(e1) (e2) = Operators.ToChar (Operators.op_Addition (e1,e2)) @ (11,56--11,64)"; + "let testCharAdditionChecked(e1) (e2) = Operators.ToChar (Checked.op_Addition (e1,e2)) @ (24,53--24,70)"; + "let testCharToByteChecked(e1) = Checked.ToByte (e1) @ (29,43--29,58)"; + "let testCharToSByteChecked(e1) = Checked.ToSByte (e1) @ (30,43--30,59)"; + "let testCharToInt16Checked(e1) = Checked.ToInt16 (e1) @ (31,43--31,59)"; + "let testCharToUInt16Checked(e1) = Checked.ToUInt16 (e1) @ (32,43--32,60)"; + "let testCharToIntChecked(e1) = Checked.ToInt32 (e1) @ (33,43--33,57)"; + "let testCharToInt32Checked(e1) = Checked.ToInt32 (e1) @ (34,43--34,59)"; + "let testCharToUInt32Checked(e1) = Checked.ToUInt32 (e1) @ (35,43--35,60)"; + "let testCharToInt64Checked(e1) = Checked.ToInt64 (e1) @ (36,43--36,59)"; + "let testCharToUInt64Checked(e1) = Checked.ToUInt64 (e1) @ (37,43--37,60)"; + "let testCharToIntPtrChecked(e1) = Checked.ToIntPtr (e1) @ (38,43--38,63)"; + "let testCharToUIntPtrChecked(e1) = Checked.ToUIntPtr (e1) @ (39,43--39,64)"; + "let testCharToByteOperator(e1) = Operators.ToByte (e1) @ (41,43--41,50)"; + "let testCharToSByteOperator(e1) = Operators.ToSByte (e1) @ (42,43--42,51)"; + "let testCharToInt16Operator(e1) = Operators.ToInt16 (e1) @ (43,43--43,51)"; + "let testCharToUInt16Operator(e1) = Operators.ToUInt16 (e1) @ (44,43--44,52)"; + "let testCharToIntOperator(e1) = Operators.ToInt32 (e1) @ (45,43--45,49)"; + "let testCharToInt32Operator(e1) = Operators.ToInt32 (e1) @ (46,43--46,51)"; + "let testCharToUInt32Operator(e1) = Operators.ToUInt32 (e1) @ (47,43--47,52)"; + "let testCharToInt64Operator(e1) = Operators.ToUInt64 (e1) @ (48,43--48,51)"; + "let testCharToUInt64Operator(e1) = Operators.ToUInt64 (e1) @ (49,43--49,52)"; + "let testCharToIntPtrOperator(e1) = Operators.ToUIntPtr (e1) @ (50,43--50,55)"; + "let testCharToUIntPtrOperator(e1) = Operators.ToUIntPtr (e1) @ (51,43--51,56)"; + "let testCharToSingleOperator(e1) = Operators.ToSingle (Operators.ToDouble (e1)) @ (52,43--52,53)"; + "let testCharToDoubleOperator(e1) = Operators.ToDouble (Operators.ToDouble (e1)) @ (53,43--53,51)"; + "let testCharToCharOperator(e1) = Operators.ToChar (e1) @ (55,43--55,50)"; + "let testCharToStringOperator(e1) = let matchValue: Microsoft.FSharp.Core.obj = Operators.Box (e1) in match (if Operators.op_Equality (matchValue,dflt) then $0 else (if matchValue :? System.IFormattable then $1 else $2)) targets ... @ (56,43--56,52)"; + ] + + testOperators "Char" "char" excludedTests expectedUnoptimized expectedOptimized + +[] +let ``Test Operator Declarations for String`` () = + let excludedTests = [ + "testStringSubtractionOperator"; + "testStringMultiplyOperator"; + "testStringDivisionOperator"; + "testStringModulusOperator"; + "testStringBitwiseAndOperator"; + "testStringBitwiseOrOperator"; + "testStringBitwiseXorOperator"; + "testStringShiftLeftOperator"; + "testStringShiftRightOperator"; + "testStringUnaryNegOperator"; + "testStringSubtractionChecked"; + "testStringMultiplyChecked"; + "testStringUnaryNegChecked"; + "testStringToIntPtrChecked"; + "testStringToUIntPtrChecked"; + "testStringToIntPtrOperator"; + "testStringToUIntPtrOperator"; + ] + + let expectedUnoptimized = [ + "type OperatorTestsString"; + "let testStringEqualsOperator(e1) (e2) = Operators.op_Equality (e1,e2) @ (4,70--4,78)"; + "let testStringNotEqualsOperator(e1) (e2) = Operators.op_Inequality (e1,e2) @ (5,70--5,79)"; + "let testStringLessThanOperator(e1) (e2) = Operators.op_LessThan (e1,e2) @ (6,70--6,78)"; + "let testStringLessThanOrEqualsOperator(e1) (e2) = Operators.op_LessThanOrEqual (e1,e2) @ (7,70--7,79)"; + "let testStringGreaterThanOperator(e1) (e2) = Operators.op_GreaterThan (e1,e2) @ (8,70--8,78)"; + "let testStringGreaterThanOrEqualsOperator(e1) (e2) = Operators.op_GreaterThanOrEqual (e1,e2) @ (9,70--9,79)"; + "let testStringAdditionOperator(e1) (e2) = Operators.op_Addition (e1,e2) @ (11,62--11,70)"; + "let testStringAdditionChecked(e1) (e2) = Checked.op_Addition (e1,e2) @ (24,59--24,76)"; + "let testStringToByteChecked(e1) = Checked.ToByte (e1) @ (29,47--29,62)"; + "let testStringToSByteChecked(e1) = Checked.ToSByte (e1) @ (30,47--30,63)"; + "let testStringToInt16Checked(e1) = Checked.ToInt16 (e1) @ (31,47--31,63)"; + "let testStringToUInt16Checked(e1) = Checked.ToUInt16 (e1) @ (32,47--32,64)"; + "let testStringToIntChecked(e1) = Checked.ToInt (e1) @ (33,47--33,61)"; + "let testStringToInt32Checked(e1) = Checked.ToInt32 (e1) @ (34,47--34,63)"; + "let testStringToUInt32Checked(e1) = Checked.ToUInt32 (e1) @ (35,47--35,64)"; + "let testStringToInt64Checked(e1) = Checked.ToInt64 (e1) @ (36,47--36,63)"; + "let testStringToUInt64Checked(e1) = Checked.ToUInt64 (e1) @ (37,47--37,64)"; + "let testStringToByteOperator(e1) = Operators.ToByte (e1) @ (41,47--41,54)"; + "let testStringToSByteOperator(e1) = Operators.ToSByte (e1) @ (42,47--42,55)"; + "let testStringToInt16Operator(e1) = Operators.ToInt16 (e1) @ (43,47--43,55)"; + "let testStringToUInt16Operator(e1) = Operators.ToUInt16 (e1) @ (44,47--44,56)"; + "let testStringToIntOperator(e1) = Operators.ToInt (e1) @ (45,47--45,53)"; + "let testStringToInt32Operator(e1) = Operators.ToInt32 (e1) @ (46,47--46,55)"; + "let testStringToUInt32Operator(e1) = Operators.ToUInt32 (e1) @ (47,47--47,56)"; + "let testStringToInt64Operator(e1) = Operators.ToInt64 (e1) @ (48,47--48,55)"; + "let testStringToUInt64Operator(e1) = Operators.ToUInt64 (e1) @ (49,47--49,56)"; + "let testStringToSingleOperator(e1) = Operators.ToSingle (e1) @ (52,47--52,57)"; + "let testStringToDoubleOperator(e1) = Operators.ToDouble (e1) @ (53,47--53,55)"; + "let testStringToDecimalOperator(e1) = Operators.ToDecimal (e1) @ (54,47--54,57)"; + "let testStringToCharOperator(e1) = Operators.ToChar (e1) @ (55,47--55,54)"; + "let testStringToStringOperator(e1) = Operators.ToString (e1) @ (56,47--56,56)"; + ] + + let expectedOptimized = [ + "type OperatorTestsString"; + "let testStringEqualsOperator(e1) (e2) = String.Equals (e1,e2) @ (4,70--4,78)"; + "let testStringNotEqualsOperator(e1) (e2) = Operators.op_Equality (String.Equals (e1,e2),False) @ (5,70--5,79)"; + "let testStringLessThanOperator(e1) (e2) = HashCompare.GenericLessThanIntrinsic (e1,e2) @ (6,70--6,78)"; + "let testStringLessThanOrEqualsOperator(e1) (e2) = HashCompare.GenericLessOrEqualIntrinsic (e1,e2) @ (7,70--7,79)"; + "let testStringGreaterThanOperator(e1) (e2) = HashCompare.GenericGreaterThanIntrinsic (e1,e2) @ (8,70--8,78)"; + "let testStringGreaterThanOrEqualsOperator(e1) (e2) = HashCompare.GenericGreaterOrEqualIntrinsic (e1,e2) @ (9,70--9,79)"; + "let testStringAdditionOperator(e1) (e2) = String.Concat (e1,e2) @ (11,62--11,70)"; + "let testStringAdditionChecked(e1) (e2) = String.Concat (e1,e2) @ (24,59--24,76)"; + "let testStringToByteChecked(e1) = Checked.ToByte (LanguagePrimitives.ParseUInt32 (e1)) @ (29,47--29,62)"; + "let testStringToSByteChecked(e1) = Checked.ToSByte (LanguagePrimitives.ParseInt32 (e1)) @ (30,47--30,63)"; + "let testStringToInt16Checked(e1) = Checked.ToInt16 (LanguagePrimitives.ParseInt32 (e1)) @ (31,47--31,63)"; + "let testStringToUInt16Checked(e1) = Checked.ToUInt16 (LanguagePrimitives.ParseUInt32 (e1)) @ (32,47--32,64)"; + "let testStringToIntChecked(e1) = LanguagePrimitives.ParseInt32 (e1) @ (33,47--33,61)"; + "let testStringToInt32Checked(e1) = LanguagePrimitives.ParseInt32 (e1) @ (34,47--34,63)"; + "let testStringToUInt32Checked(e1) = LanguagePrimitives.ParseUInt32 (e1) @ (35,47--35,64)"; + "let testStringToInt64Checked(e1) = LanguagePrimitives.ParseInt64 (e1) @ (36,47--36,63)"; + "let testStringToUInt64Checked(e1) = LanguagePrimitives.ParseUInt64 (e1) @ (37,47--37,64)"; + "let testStringToByteOperator(e1) = Checked.ToByte (LanguagePrimitives.ParseUInt32 (e1)) @ (41,47--41,54)"; + "let testStringToSByteOperator(e1) = Checked.ToSByte (LanguagePrimitives.ParseInt32 (e1)) @ (42,47--42,55)"; + "let testStringToInt16Operator(e1) = Checked.ToInt16 (LanguagePrimitives.ParseInt32 (e1)) @ (43,47--43,55)"; + "let testStringToUInt16Operator(e1) = Checked.ToUInt16 (LanguagePrimitives.ParseUInt32 (e1)) @ (44,47--44,56)"; + "let testStringToIntOperator(e1) = LanguagePrimitives.ParseInt32 (e1) @ (45,47--45,53)"; + "let testStringToInt32Operator(e1) = LanguagePrimitives.ParseInt32 (e1) @ (46,47--46,55)"; + "let testStringToUInt32Operator(e1) = LanguagePrimitives.ParseUInt32 (e1) @ (47,47--47,56)"; + "let testStringToInt64Operator(e1) = LanguagePrimitives.ParseInt64 (e1) @ (48,47--48,55)"; + "let testStringToUInt64Operator(e1) = LanguagePrimitives.ParseUInt64 (e1) @ (49,47--49,56)"; + "let testStringToSingleOperator(e1) = Single.Parse ((if Operators.op_Equality (e1,dflt) then dflt else e1.Replace(\"_\",\"\")),167,CultureInfo.get_InvariantCulture () :> System.IFormatProvider) @ (52,47--52,57)"; + "let testStringToDoubleOperator(e1) = Double.Parse ((if Operators.op_Equality (e1,dflt) then dflt else e1.Replace(\"_\",\"\")),167,CultureInfo.get_InvariantCulture () :> System.IFormatProvider) @ (53,47--53,55)"; + "let testStringToDecimalOperator(e1) = Decimal.Parse (e1,167,CultureInfo.get_InvariantCulture () :> System.IFormatProvider) @ (54,47--54,57)"; + "let testStringToCharOperator(e1) = Char.Parse (e1) @ (55,47--55,54)"; + "let testStringToStringOperator(e1) = let matchValue: Microsoft.FSharp.Core.obj = Operators.Box (e1) in match (if Operators.op_Equality (matchValue,dflt) then $0 else (if matchValue :? System.IFormattable then $1 else $2)) targets ... @ (56,47--56,56)"; + ] + + testOperators "String" "string" excludedTests expectedUnoptimized expectedOptimized + //--------------------------------------------------------------------------------------------------------- // This big list expression was causing us trouble @@ -866,9 +2852,23 @@ let ``Test expressions of declarations stress big expressions`` () = // This should not stack overflow printDeclarations None (List.ofSeq file1.Declarations) |> Seq.toList |> ignore + +[] +let ``Test expressions of optimized declarations stress big expressions`` () = + let wholeProjectResults = exprChecker.ParseAndCheckProject(ProjectStressBigExpressions.options) |> Async.RunSynchronously + + wholeProjectResults.Errors.Length |> shouldEqual 0 + + wholeProjectResults.GetOptimizedAssemblyContents().ImplementationFiles.Length |> shouldEqual 1 + let file1 = wholeProjectResults.GetOptimizedAssemblyContents().ImplementationFiles.[0] + + // This should not stack overflow + printDeclarations None (List.ofSeq file1.Declarations) |> Seq.toList |> ignore + + #if NOT_YET_ENABLED -#if !NO_PROJECTCRACKER && !DOTNETCORE +#if !NO_PROJECTCRACKER && !NETCOREAPP2_0 [] let ``Check use of type provider that provides calls to F# code`` () = diff --git a/tests/service/FileSystemTests.fs b/tests/service/FileSystemTests.fs index 4e92e98b70c..b9cf6cf888f 100644 --- a/tests/service/FileSystemTests.fs +++ b/tests/service/FileSystemTests.fs @@ -1,5 +1,5 @@ #if INTERACTIVE -#r "../../Debug/fcs/net45/FSharp.Compiler.Service.dll" // note, run 'build fcs debug' to generate this, this DLL has a public API so can be used from F# Interactive +#r "../../debug/fcs/net45/FSharp.Compiler.Service.dll" // note, run 'build fcs debug' to generate this, this DLL has a public API so can be used from F# Interactive #r "../../packages/NUnit.3.5.0/lib/net45/nunit.framework.dll" #load "FsUnit.fs" #load "Common.fs" @@ -38,10 +38,13 @@ let B = File1.A + File1.A""" match files.TryGetValue(fileName) with | true, text -> new MemoryStream(Encoding.UTF8.GetBytes(text)) :> Stream | _ -> defaultFileSystem.FileStreamReadShim(fileName) - + member __.FileStreamCreateShim(fileName) = defaultFileSystem.FileStreamCreateShim(fileName) + member __.IsStableFileHeuristic(fileName) = + defaultFileSystem.IsStableFileHeuristic(fileName) + member __.FileStreamWriteExistingShim(fileName) = defaultFileSystem.FileStreamWriteExistingShim(fileName) @@ -71,9 +74,11 @@ let UseMyFileSystem() = Shim.FileSystem <- myFileSystem { new IDisposable with member x.Dispose() = Shim.FileSystem <- myFileSystem } -#if !FX_ATLEAST_PORTABLE [] +#if NETCOREAPP2_0 +[] +#endif let ``FileSystem compilation test``() = if System.Environment.OSVersion.Platform = System.PlatformID.Win32NT then // file references only valid on Windows use myFileSystem = UseMyFileSystem() @@ -95,6 +100,7 @@ let ``FileSystem compilation test``() = yield "-r:" + r |] { ProjectFileName = @"c:\mycode\compilation.fsproj" // Make a name that is unique in this directory. + ProjectId = None SourceFiles = [| fileName1; fileName2 |] OtherOptions = allFlags ReferencedProjects = [| |]; @@ -113,4 +119,3 @@ let ``FileSystem compilation test``() = results.AssemblySignature.Entities.[0].MembersFunctionsAndValues.Count |> shouldEqual 1 results.AssemblySignature.Entities.[0].MembersFunctionsAndValues.[0].DisplayName |> shouldEqual "B" -#endif diff --git a/tests/service/FscTests.fs b/tests/service/FscTests.fs index 61c3a29003f..82914dbdbae 100644 --- a/tests/service/FscTests.fs +++ b/tests/service/FscTests.fs @@ -1,6 +1,6 @@ #if INTERACTIVE -#r "../../Debug/fcs/net45/FSharp.Compiler.Service.dll" // note, run 'build fcs debug' to generate this, this DLL has a public API so can be used from F# Interactive +#r "../../debug/fcs/net45/FSharp.Compiler.Service.dll" // note, run 'build fcs debug' to generate this, this DLL has a public API so can be used from F# Interactive #r "../../packages/NUnit.3.5.0/lib/net45/nunit.framework.dll" #load "FsUnit.fs" #load "Common.fs" @@ -41,7 +41,7 @@ type PEVerifier () = static let runsOnMono = try System.Type.GetType("Mono.Runtime") <> null with _ -> false let verifierInfo = -#if FX_ATLEAST_PORTABLE +#if NETCOREAPP2_0 None #else if runsOnMono then @@ -96,7 +96,7 @@ let checker = FSharpChecker.Create() /// Ensures the default FSharp.Core referenced by the F# compiler service (if none is /// provided explicitly) is available in the output directory. let ensureDefaultFSharpCoreAvailable tmpDir = -#if FX_ATLEAST_PORTABLE +#if NETCOREAPP2_0 ignore tmpDir #else // FSharp.Compiler.Service references FSharp.Core 4.3.0.0 by default. That's wrong? But the output won't verify diff --git a/tests/service/FsiTests.fs b/tests/service/FsiTests.fs index bd80961002a..23bf52b33e3 100644 --- a/tests/service/FsiTests.fs +++ b/tests/service/FsiTests.fs @@ -1,6 +1,6 @@  #if INTERACTIVE -#r "../../Debug/fcs/net45/FSharp.Compiler.Service.dll" // note, run 'build fcs debug' to generate this, this DLL has a public API so can be used from F# Interactive +#r "../../debug/fcs/net45/FSharp.Compiler.Service.dll" // note, run 'build fcs debug' to generate this, this DLL has a public API so can be used from F# Interactive #r "../../packages/NUnit.3.5.0/lib/net45/nunit.framework.dll" #load "FsUnit.fs" #load "Common.fs" @@ -27,7 +27,7 @@ let errStream = new CompilerOutputStream() let argv = [| "C:\\fsi.exe" |] let allArgs = Array.append argv [|"--noninteractive"|] -#if DOTNETCORE +#if NETCOREAPP2_0 let fsiConfig = FsiEvaluationSession.GetDefaultConfiguration() #else let fsiConfig = FsiEvaluationSession.GetDefaultConfiguration(fsi) diff --git a/tests/service/InteractiveCheckerTests.fs b/tests/service/InteractiveCheckerTests.fs index ac17ec2e705..fba9adcb639 100644 --- a/tests/service/InteractiveCheckerTests.fs +++ b/tests/service/InteractiveCheckerTests.fs @@ -1,6 +1,6 @@  #if INTERACTIVE -#r "../../Debug/fcs/net45/FSharp.Compiler.Service.dll" // note, run 'build fcs debug' to generate this, this DLL has a public API so can be used from F# Interactive +#r "../../debug/fcs/net45/FSharp.Compiler.Service.dll" // note, run 'build fcs debug' to generate this, this DLL has a public API so can be used from F# Interactive #r "../../packages/NUnit.3.5.0/lib/net45/nunit.framework.dll" #load "FsUnit.fs" #load "Common.fs" diff --git a/tests/service/MultiProjectAnalysisTests.fs b/tests/service/MultiProjectAnalysisTests.fs index aa38fa58457..0e4d38a3321 100644 --- a/tests/service/MultiProjectAnalysisTests.fs +++ b/tests/service/MultiProjectAnalysisTests.fs @@ -1,6 +1,6 @@  #if INTERACTIVE -#r "../../Debug/fcs/net45/FSharp.Compiler.Service.dll" // note, run 'build fcs debug' to generate this, this DLL has a public API so can be used from F# Interactive +#r "../../debug/fcs/net45/FSharp.Compiler.Service.dll" // note, run 'build fcs debug' to generate this, this DLL has a public API so can be used from F# Interactive #r "../../packages/NUnit.3.5.0/lib/net45/nunit.framework.dll" #load "FsUnit.fs" #load "Common.fs" @@ -129,6 +129,9 @@ let u = Case1 3 [] +#if NETCOREAPP2_0 +[] +#endif let ``Test multi project 1 whole project errors`` () = let wholeProjectResults = checker.ParseAndCheckProject(MultiProject1.options) |> Async.RunSynchronously @@ -233,7 +236,7 @@ let ``Test multi project 1 xmldoc`` () = | _ -> failwith "odd symbol!" match ctorFromProjectMultiProject with - | :? FSharpMemberOrFunctionOrValue as c -> c.EnclosingEntity.Value.XmlDoc.Count |> shouldEqual 1 + | :? FSharpMemberOrFunctionOrValue as c -> c.DeclaringEntity.Value.XmlDoc.Count |> shouldEqual 1 | _ -> failwith "odd symbol!" match case1FromProjectMultiProject with @@ -311,6 +314,9 @@ let p = (""" FSharpChecker.Create(projectCacheSize=size) [] +#if NETCOREAPP2_0 +[] +#endif let ``Test ManyProjectsStressTest whole project errors`` () = let checker = ManyProjectsStressTest.makeCheckerForStressTest true @@ -808,7 +814,7 @@ let ``Test active patterns' XmlDocSig declared in referenced projects`` () = divisibleByGroup.IsTotal |> shouldEqual false divisibleByGroup.Names |> Seq.toList |> shouldEqual ["DivisibleBy"] divisibleByGroup.OverallType.Format(divisibleBySymbolUse.Value.DisplayContext) |> shouldEqual "int -> int -> unit option" - let divisibleByEntity = divisibleByGroup.EnclosingEntity.Value + let divisibleByEntity = divisibleByGroup.DeclaringEntity.Value divisibleByEntity.ToString() |> shouldEqual "Project3A" //------------------------------------------------------------------------------------ @@ -831,13 +837,16 @@ let ``Test max memory gets triggered`` () = //------------------------------------------------------------------------------------ -#if !DOTNETCORE [] +#if NETCOREAPP2_0 +[] +#endif let ``Type provider project references should not throw exceptions`` () = //let options = ProjectCracker.GetProjectOptionsFromProjectFile(projectFile, [("Configuration", "Debug")]) let options = {ProjectFileName = __SOURCE_DIRECTORY__ + @"/data/TypeProviderConsole/TypeProviderConsole.fsproj"; + ProjectId = None SourceFiles = [|__SOURCE_DIRECTORY__ + @"/data/TypeProviderConsole/Program.fs"|]; Stamp = None OtherOptions = @@ -863,6 +872,7 @@ let ``Type provider project references should not throw exceptions`` () = ReferencedProjects = [|(__SOURCE_DIRECTORY__ + @"/data/TypeProviderLibrary/TypeProviderLibrary.dll", {ProjectFileName = __SOURCE_DIRECTORY__ + @"/data/TypeProviderLibrary/TypeProviderLibrary.fsproj"; + ProjectId = None SourceFiles = [|__SOURCE_DIRECTORY__ + @"/data/TypeProviderLibrary/Library1.fs"|]; Stamp = None OtherOptions = @@ -919,11 +929,17 @@ let ``Type provider project references should not throw exceptions`` () = //------------------------------------------------------------------------------------ [] +#if NETCOREAPP2_0 +[] +#else +[] +#endif let ``Projects creating generated types should not utilize cross-project-references but should still analyze oK once project is built`` () = //let options = ProjectCracker.GetProjectOptionsFromProjectFile(projectFile, [("Configuration", "Debug")]) let options = {ProjectFileName = __SOURCE_DIRECTORY__ + @"/data/TypeProvidersBug/TestConsole/TestConsole.fsproj"; + ProjectId = None SourceFiles = [|__SOURCE_DIRECTORY__ + @"/data/TypeProvidersBug/TestConsole/AssemblyInfo.fs"; __SOURCE_DIRECTORY__ + @"/data/TypeProvidersBug/TestConsole/Program.fs"|]; @@ -952,6 +968,7 @@ let ``Projects creating generated types should not utilize cross-project-referen [|(__SOURCE_DIRECTORY__ + @"/data/TypeProvidersBug/TypeProvidersBug/bin/Debug/TypeProvidersBug.dll", {ProjectFileName = __SOURCE_DIRECTORY__ + @"/data/TypeProvidersBug/TypeProvidersBug/TypeProvidersBug.fsproj"; + ProjectId = None SourceFiles = [|__SOURCE_DIRECTORY__ + @"/data/TypeProvidersBug/TypeProvidersBug/AssemblyInfo.fs"; __SOURCE_DIRECTORY__ + @"/data/TypeProvidersBug/TypeProvidersBug/Library1.fs"|]; @@ -1003,8 +1020,4 @@ let ``Projects creating generated types should not utilize cross-project-referen printfn "Errors: %A" fileCheckResults.Errors fileCheckResults.Errors |> Array.exists (fun error -> error.Severity = FSharpErrorSeverity.Error) |> shouldEqual false - - -#endif - //------------------------------------------------------------------------------------ diff --git a/tests/service/PerfTests.fs b/tests/service/PerfTests.fs index 6a162ced54a..662e00c5645 100644 --- a/tests/service/PerfTests.fs +++ b/tests/service/PerfTests.fs @@ -1,5 +1,5 @@ #if INTERACTIVE -#r "../../Debug/fcs/net45/FSharp.Compiler.Service.dll" // note, run 'build fcs debug' to generate this, this DLL has a public API so can be used from F# Interactive +#r "../../debug/fcs/net45/FSharp.Compiler.Service.dll" // note, run 'build fcs debug' to generate this, this DLL has a public API so can be used from F# Interactive #r "../../packages/NUnit.3.5.0/lib/net45/nunit.framework.dll" #load "FsUnit.fs" #load "Common.fs" @@ -65,16 +65,15 @@ let ``Test request for parse and check doesn't check whole project`` () = let pE, tE = FSharpChecker.GlobalForegroundParseCountStatistic, FSharpChecker.GlobalForegroundTypeCheckCountStatistic (pE - pD) |> shouldEqual 0 (tE - tD) |> shouldEqual 1 - (backgroundParseCount.Value <= 8) |> shouldEqual true // but note, the project does not get reparsed - (backgroundCheckCount.Value <= 8) |> shouldEqual true // only two extra typechecks of files + (backgroundParseCount.Value <= 9) |> shouldEqual true // but note, the project does not get reparsed + (backgroundCheckCount.Value <= 9) |> shouldEqual true // only two extra typechecks of files // A subsequent ParseAndCheck of identical source code doesn't do any more anything let checkResults2 = checker.ParseAndCheckFileInProject(Project1.fileNames.[7], 0, Project1.fileSources2.[7], Project1.options) |> Async.RunSynchronously let pF, tF = FSharpChecker.GlobalForegroundParseCountStatistic, FSharpChecker.GlobalForegroundTypeCheckCountStatistic (pF - pE) |> shouldEqual 0 // note, no new parse of the file (tF - tE) |> shouldEqual 0 // note, no new typecheck of the file - (backgroundParseCount.Value <= 8) |> shouldEqual true // but note, the project does not get reparsed - (backgroundCheckCount.Value <= 8) |> shouldEqual true // only two extra typechecks of files - + (backgroundParseCount.Value <= 9) |> shouldEqual true // but note, the project does not get reparsed + (backgroundCheckCount.Value <= 9) |> shouldEqual true // only two extra typechecks of files () diff --git a/tests/service/Program.fs b/tests/service/Program.fs index 45d9a343374..c94e2a49931 100644 --- a/tests/service/Program.fs +++ b/tests/service/Program.fs @@ -1,14 +1,6 @@ open System -open System.IO -open System.Reflection -open NUnitLite -open NUnit.Common - -type private TypeInThisAssembly = class end [] let main argv = printfn "Dotnet Core NUnit Tests..." - let writer = new ExtendedTextWrapper(Console.Out) - let runner = new AutoRun(typeof.GetTypeInfo().Assembly) - runner.Execute(argv, writer, Console.In) + 0 \ No newline at end of file diff --git a/tests/service/ProjectAnalysisTests.fs b/tests/service/ProjectAnalysisTests.fs index d1000d6b844..0bb8d28b9a8 100644 --- a/tests/service/ProjectAnalysisTests.fs +++ b/tests/service/ProjectAnalysisTests.fs @@ -1,5 +1,5 @@ #if INTERACTIVE -#r "../../Debug/fcs/net45/FSharp.Compiler.Service.dll" // note, run 'build fcs debug' to generate this, this DLL has a public API so can be used from F# Interactive +#r "../../debug/fcs/net45/FSharp.Compiler.Service.dll" // note, run 'build fcs debug' to generate this, this DLL has a public API so can be used from F# Interactive #r "../../packages/NUnit.3.5.0/lib/net45/nunit.framework.dll" #load "FsUnit.fs" #load "Common.fs" @@ -123,15 +123,12 @@ let ``Test Project1 should have protected FullName and TryFullName return same r |> Seq.collect (Seq.collect getFullNameComparisons) |> Seq.iter (shouldEqual true) -[] +[] +[] let ``Test project1 should not throw exceptions on entities from referenced assemblies`` () = let wholeProjectResults = checker.ParseAndCheckProject(Project1.options) |> Async.RunSynchronously let rec getAllBaseTypes (entity: FSharpEntity) = - #if !NO_EXTENSIONTYPING seq { if not entity.IsProvided && entity.Accessibility.IsPublic then - #else - seq{ - #endif if not entity.IsUnresolved then yield entity.BaseType for e in entity.NestedEntities do yield! getAllBaseTypes e } @@ -335,61 +332,59 @@ let ``Test project1 all uses of all signature symbols`` () = [ for s in wholeProjectResults.GetUsesOfSymbol(s) |> Async.RunSynchronously -> (Project1.cleanFileName s.FileName, tupsZ s.RangeAlternate) ] ] let expected = - [("N", [("file2", ((1, 7), (1, 8)))]); - ("val y2", [("file2", ((12, 4), (12, 6)))]); - ("val pair2", [("file2", ((23, 10), (23, 15)))]); - ("val pair1", [("file2", ((23, 4), (23, 9)))]); - ("val enumValue", [("file2", ((30, 4), (30, 13)))]); - ("val op_PlusPlus", - [("file2", ((32, 5), (32, 7))); ("file2", ((34, 11), (34, 13))); - ("file2", ((36, 11), (36, 13)))]); - ("val c1", [("file2", ((34, 4), (34, 6)))]); - ("val c2", [("file2", ((36, 4), (36, 6)))]); - ("val mmmm1", [("file2", ((38, 4), (38, 9)))]); - ("val mmmm2", [("file2", ((39, 4), (39, 9)))]); - ("D1", [("file2", ((5, 5), (5, 7))); ("file2", ((9, 38), (9, 40)))]); - ("member .ctor", - [("file2", ((5, 5), (5, 7))); ("file2", ((9, 38), (9, 40)))]); - ("member get_SomeProperty", [("file2", ((6, 13), (6, 25)))]); - ("property SomeProperty", [("file2", ((6, 13), (6, 25)))]); - ("D2", [("file2", ((8, 5), (8, 7)))]); - ("member .ctor", [("file2", ((8, 5), (8, 7)))]); - ("member get_SomeProperty", [("file2", ((9, 13), (9, 25)))]); - ("property SomeProperty", [("file2", ((9, 13), (9, 25)))]); - ("D3", [("file2", ((15, 5), (15, 7)))]); - ("member .ctor", [("file2", ((15, 5), (15, 7)))]); - ("member get_SomeProperty", [("file2", ((21, 13), (21, 25)))]); - ("property SomeProperty", [("file2", ((21, 13), (21, 25)))]); - ("field a", []); ("field b", []); - ("field x", [("file2", ((19, 16), (19, 17)))]); - ("SaveOptions", - [("file2", ((26, 5), (26, 16))); ("file2", ((30, 16), (30, 27)))]); - ("field value__", []); ("field None", [("file2", ((27, 4), (27, 8)))]); - ("field DisableFormatting", - [("file2", ((28, 4), (28, 21))); ("file2", ((30, 16), (30, 45)))]); - ("M", - [("file1", ((1, 7), (1, 8))); ("file2", ((3, 5), (3, 6))); - ("file2", ((6, 28), (6, 29))); ("file2", ((9, 28), (9, 29))); - ("file2", ((12, 27), (12, 28))); ("file2", ((38, 12), (38, 13))); - ("file2", ((38, 22), (38, 23))); ("file2", ((39, 12), (39, 13))); - ("file2", ((39, 28), (39, 29)))]) - ("val xxx", - [("file1", ((6, 4), (6, 7))); ("file1", ((7, 13), (7, 16))); - ("file1", ((7, 19), (7, 22))); ("file2", ((6, 28), (6, 33))); - ("file2", ((12, 27), (12, 32)))]); - ("val fff", [("file1", ((7, 4), (7, 7))); ("file2", ((9, 28), (9, 33)))]); - ("C", - [("file1", ((3, 5), (3, 6))); ("file1", ((9, 15), (9, 16))); - ("file2", ((38, 12), (38, 15))); ("file2", ((38, 22), (38, 25)))]); - ("member .ctor", - [("file1", ((3, 5), (3, 6))); ("file1", ((9, 15), (9, 16))); - ("file2", ((38, 12), (38, 15))); ("file2", ((38, 22), (38, 25)))]); - ("member get_P", [("file1", ((4, 13), (4, 14)))]); - ("property P", [("file1", ((4, 13), (4, 14)))]); - ("CAbbrev", - [("file1", ((9, 5), (9, 12))); ("file2", ((39, 12), (39, 21))); - ("file2", ((39, 28), (39, 37)))]); - ("property P", [("file1", ((4, 13), (4, 14)))])] + [("N", [("file2", ((1, 7), (1, 8)))]); + ("val y2", [("file2", ((12, 4), (12, 6)))]); + ("val pair2", [("file2", ((23, 10), (23, 15)))]); + ("val pair1", [("file2", ((23, 4), (23, 9)))]); + ("val enumValue", [("file2", ((30, 4), (30, 13)))]); + ("val op_PlusPlus", + [("file2", ((32, 5), (32, 7))); ("file2", ((34, 11), (34, 13))); + ("file2", ((36, 11), (36, 13)))]); + ("val c1", [("file2", ((34, 4), (34, 6)))]); + ("val c2", [("file2", ((36, 4), (36, 6)))]); + ("val mmmm1", [("file2", ((38, 4), (38, 9)))]); + ("val mmmm2", [("file2", ((39, 4), (39, 9)))]); + ("D1", [("file2", ((5, 5), (5, 7))); ("file2", ((9, 38), (9, 40)))]); + ("member .ctor", [("file2", ((5, 5), (5, 7))); ("file2", ((9, 38), (9, 40)))]); + ("member get_SomeProperty", [("file2", ((6, 13), (6, 25)))]); + ("property SomeProperty", [("file2", ((6, 13), (6, 25)))]); + ("D2", [("file2", ((8, 5), (8, 7)))]); + ("member .ctor", [("file2", ((8, 5), (8, 7)))]); + ("member get_SomeProperty", [("file2", ((9, 13), (9, 25)))]); + ("property SomeProperty", [("file2", ((9, 13), (9, 25)))]); + ("D3", [("file2", ((15, 5), (15, 7)))]); + ("member .ctor", [("file2", ((15, 5), (15, 7)))]); + ("member get_SomeProperty", [("file2", ((21, 13), (21, 25)))]); + ("property SomeProperty", [("file2", ((21, 13), (21, 25)))]); ("field a", []); + ("field b", []); ("field x", [("file2", ((19, 16), (19, 17)))]); + ("SaveOptions", + [("file2", ((26, 5), (26, 16))); ("file2", ((30, 16), (30, 27)))]); + ("field value__", []); ("field None", [("file2", ((27, 4), (27, 8)))]); + ("field DisableFormatting", + [("file2", ((28, 4), (28, 21))); ("file2", ((30, 16), (30, 45)))]); + ("M", + [("file1", ((1, 7), (1, 8))); ("file2", ((3, 5), (3, 6))); + ("file2", ((6, 28), (6, 29))); ("file2", ((9, 28), (9, 29))); + ("file2", ((12, 27), (12, 28))); ("file2", ((38, 12), (38, 13))); + ("file2", ((38, 22), (38, 23))); ("file2", ((39, 12), (39, 13))); + ("file2", ((39, 28), (39, 29)))]); + ("val xxx", + [("file1", ((6, 4), (6, 7))); ("file1", ((7, 13), (7, 16))); + ("file1", ((7, 19), (7, 22))); ("file2", ((6, 28), (6, 33))); + ("file2", ((12, 27), (12, 32)))]); + ("val fff", [("file1", ((7, 4), (7, 7))); ("file2", ((9, 28), (9, 33)))]); + ("C", + [("file1", ((3, 5), (3, 6))); ("file1", ((9, 15), (9, 16))); + ("file2", ((38, 12), (38, 15))); ("file2", ((38, 22), (38, 25)))]); + ("member .ctor", + [("file1", ((3, 5), (3, 6))); ("file1", ((9, 15), (9, 16))); + ("file2", ((38, 12), (38, 15))); ("file2", ((38, 22), (38, 25)))]); + ("member get_P", [("file1", ((4, 13), (4, 14)))]); + ("property P", [("file1", ((4, 13), (4, 14)))]); + ("CAbbrev", + [("file1", ((9, 5), (9, 12))); ("file2", ((39, 12), (39, 21))); + ("file2", ((39, 28), (39, 37)))]); + ("property P", [("file1", ((4, 13), (4, 14)))])] set allUsesOfAllSymbols - set expected |> shouldEqual Set.empty set expected - set allUsesOfAllSymbols |> shouldEqual Set.empty (set expected = set allUsesOfAllSymbols) |> shouldEqual true @@ -1486,9 +1481,8 @@ let ``Test project 5 all symbols`` () = ("val input", "input", "file1", ((4, 28), (4, 33)), []); ("symbol ", "Even", "file1", ((4, 47), (4, 51)), ["defn"]); ("symbol ", "Odd", "file1", ((4, 57), (4, 60)), ["defn"]); - ("val |Even|Odd|", "ActivePatterns.( |Even|Odd| )", "file1", - ((4, 5), (4, 15)), ["defn"]); - ("val input", "input", "file1", ((7, 15), (7, 20)), ["defn"]); + ("val |Even|Odd|", "ActivePatterns.( |Even|Odd| )", "file1", ((4, 5), (4, 15)), + ["defn"]); ("val input", "input", "file1", ((7, 15), (7, 20)), ["defn"]); ("val input", "input", "file1", ((8, 9), (8, 14)), []); ("symbol Even", "ActivePatterns.( |Even|Odd| ).Even", "file1", ((9, 5), (9, 9)), ["pattern"]); @@ -1505,23 +1499,20 @@ let ``Test project 5 all symbols`` () = ("string", "Microsoft.FSharp.Core.string", "file1", ((13, 22), (13, 28)), ["type"]); ("val str", "str", "file1", ((13, 17), (13, 20)), ["defn"]); ("val floatvalue", "floatvalue", "file1", ((14, 15), (14, 25)), ["defn"]); - ("Double", "System.Double", "file1", ((15, 13), (15, 19)), []); ("System", "System", "file1", ((15, 6), (15, 12)), []); + ("Double", "System.Double", "file1", ((15, 13), (15, 19)), []); ("val str", "str", "file1", ((15, 29), (15, 32)), []); ("val op_AddressOf", - "Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators.( ~& )", - "file1", ((15, 34), (15, 35)), []); + "Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators.( ~& )", "file1", + ((15, 34), (15, 35)), []); ("val floatvalue", "floatvalue", "file1", ((15, 35), (15, 45)), []); - ("member TryParse", "System.Double.TryParse", "file1", ((15, 6), (15, 28)), + ("member TryParse", "System.Double.TryParse", "file1", ((15, 6), (15, 28)), []); + ("Some", "Microsoft.FSharp.Core.Option<_>.Some", "file1", ((15, 52), (15, 56)), + []); ("val floatvalue", "floatvalue", "file1", ((15, 57), (15, 67)), []); + ("None", "Microsoft.FSharp.Core.Option<_>.None", "file1", ((16, 8), (16, 12)), []); - ("Some", "Microsoft.FSharp.Core.Option<_>.Some", "file1", - ((15, 52), (15, 56)), []); - ("val floatvalue", "floatvalue", "file1", ((15, 57), (15, 67)), []); - ("None", "Microsoft.FSharp.Core.Option<_>.None", "file1", - ((16, 8), (16, 12)), []); - ("val |Float|_|", "ActivePatterns.( |Float|_| )", "file1", - ((13, 5), (13, 14)), ["defn"]); - ("val str", "str", "file1", ((19, 17), (19, 20)), ["defn"]); + ("val |Float|_|", "ActivePatterns.( |Float|_| )", "file1", ((13, 5), (13, 14)), + ["defn"]); ("val str", "str", "file1", ((19, 17), (19, 20)), ["defn"]); ("val str", "str", "file1", ((20, 9), (20, 12)), []); ("val f", "f", "file1", ((21, 11), (21, 12)), ["defn"]); ("symbol Float", "ActivePatterns.( |Float|_| ).Float", "file1", @@ -1556,7 +1547,7 @@ let ``Test complete active patterns' exact ranges from uses of symbols`` () = oddGroup.IsTotal |> shouldEqual true oddGroup.Names |> Seq.toList |> shouldEqual ["Even"; "Odd"] oddGroup.OverallType.Format(oddSymbolUse.Value.DisplayContext) |> shouldEqual "int -> Choice" - let oddEntity = oddGroup.EnclosingEntity.Value + let oddEntity = oddGroup.DeclaringEntity.Value oddEntity.ToString() |> shouldEqual "ActivePatterns" let evenSymbolUse = backgroundTypedParse1.GetSymbolUseAtLocation(10,9,"",["Even"]) |> Async.RunSynchronously @@ -1570,7 +1561,7 @@ let ``Test complete active patterns' exact ranges from uses of symbols`` () = evenGroup.IsTotal |> shouldEqual true evenGroup.Names |> Seq.toList |> shouldEqual ["Even"; "Odd"] evenGroup.OverallType.Format(evenSymbolUse.Value.DisplayContext) |> shouldEqual "int -> Choice" - let evenEntity = evenGroup.EnclosingEntity.Value + let evenEntity = evenGroup.DeclaringEntity.Value evenEntity.ToString() |> shouldEqual "ActivePatterns" let usesOfEvenSymbol = @@ -1614,7 +1605,7 @@ let ``Test partial active patterns' exact ranges from uses of symbols`` () = floatGroup.IsTotal |> shouldEqual false floatGroup.Names |> Seq.toList |> shouldEqual ["Float"] floatGroup.OverallType.Format(floatSymbolUse.Value.DisplayContext) |> shouldEqual "string -> float option" - let evenEntity = floatGroup.EnclosingEntity.Value + let evenEntity = floatGroup.DeclaringEntity.Value evenEntity.ToString() |> shouldEqual "ActivePatterns" let usesOfFloatSymbol = @@ -2040,11 +2031,9 @@ let ``Test Project11 all symbols`` () = |> Array.map (fun su -> su.Symbol.ToString(), su.Symbol.DisplayName, Project11.cleanFileName su.FileName, tups su.RangeAlternate, attribsOfSymbolUse su, attribsOfSymbol su.Symbol) allUsesOfAllSymbols |> shouldEqual - [|("Generic", "Generic", "file1", ((4, 34), (4, 41)), ["type"], - ["namespace"]); - ("Collections", "Collections", "file1", ((4, 22), (4, 33)), ["type"], - ["namespace"]); - ("System", "System", "file1", ((4, 15), (4, 21)), ["type"], ["namespace"]); + [|("System", "System", "file1", ((4, 15), (4, 21)), [], ["namespace"]); + ("Collections", "Collections", "file1", ((4, 22), (4, 33)), [], ["namespace"]); + ("Generic", "Generic", "file1", ((4, 34), (4, 41)), [], ["namespace"]); ("Dictionary`2", "Dictionary", "file1", ((4, 15), (4, 52)), ["type"], ["class"]); ("int", "int", "file1", ((4, 53), (4, 56)), [], ["abbrev"]); ("int", "int", "file1", ((4, 57), (4, 60)), [], ["abbrev"]); @@ -2052,14 +2041,11 @@ let ``Test Project11 all symbols`` () = ["valuetype"]); ("member .ctor", "Enumerator", "file1", ((4, 15), (4, 72)), [], ["member"]); ("val enum", "enum", "file1", ((4, 4), (4, 8)), ["defn"], ["val"]); - ("Generic", "Generic", "file1", ((5, 30), (5, 37)), ["type"], - ["namespace"]); - ("Collections", "Collections", "file1", ((5, 18), (5, 29)), ["type"], - ["namespace"]); - ("System", "System", "file1", ((5, 11), (5, 17)), ["type"], ["namespace"]); + ("System", "System", "file1", ((5, 11), (5, 17)), [], ["namespace"]); + ("Collections", "Collections", "file1", ((5, 18), (5, 29)), [], ["namespace"]); + ("Generic", "Generic", "file1", ((5, 30), (5, 37)), [], ["namespace"]); ("Dictionary`2", "Dictionary", "file1", ((5, 11), (5, 48)), ["type"], - ["class"]); - ("int", "int", "file1", ((5, 49), (5, 52)), ["type"], ["abbrev"]); + ["class"]); ("int", "int", "file1", ((5, 49), (5, 52)), ["type"], ["abbrev"]); ("int", "int", "file1", ((5, 53), (5, 56)), ["type"], ["abbrev"]); ("Enumerator", "Enumerator", "file1", ((5, 58), (5, 68)), ["type"], ["valuetype"]); ("val x", "x", "file1", ((5, 9), (5, 10)), ["defn"], []); @@ -2183,21 +2169,20 @@ let ``Test Project13 all symbols`` () = |> Array.map (fun su -> su.Symbol.ToString(), su.Symbol.DisplayName, Project13.cleanFileName su.FileName, tups su.RangeAlternate, attribsOfSymbolUse su, attribsOfSymbol su.Symbol) allUsesOfAllSymbols |> shouldEqual - [|("System", "System", "file1", ((4, 14), (4, 20)), ["type"], ["namespace"]); + [|("System", "System", "file1", ((4, 14), (4, 20)), [], ["namespace"]); ("Object", "Object", "file1", ((4, 14), (4, 27)), [], ["class"]); ("member .ctor", "Object", "file1", ((4, 14), (4, 27)), [], ["member"]); ("val x1", "x1", "file1", ((4, 4), (4, 6)), ["defn"], ["val"]); - ("System", "System", "file1", ((5, 14), (5, 20)), ["type"], ["namespace"]); + ("System", "System", "file1", ((5, 14), (5, 20)), [], ["namespace"]); ("DateTime", "DateTime", "file1", ((5, 14), (5, 29)), [], ["valuetype"]); ("member .ctor", "DateTime", "file1", ((5, 14), (5, 29)), [], ["member"]); ("val x2", "x2", "file1", ((5, 4), (5, 6)), ["defn"], ["val"]); - ("System", "System", "file1", ((6, 13), (6, 19)), ["type"], ["namespace"]); + ("System", "System", "file1", ((6, 13), (6, 19)), [], ["namespace"]); ("DateTime", "DateTime", "file1", ((6, 13), (6, 28)), [], ["valuetype"]); ("member .ctor", "DateTime", "file1", ((6, 13), (6, 28)), [], ["member"]); ("val x3", "x3", "file1", ((6, 4), (6, 6)), ["defn"], ["val"]); ("ExternalTypes", "ExternalTypes", "file1", ((2, 7), (2, 20)), ["defn"], ["module"])|] - let objSymbol = wholeProjectResults.GetAllUsesOfAllSymbols() |> Async.RunSynchronously |> Array.find (fun su -> su.Symbol.DisplayName = "Object") let objEntity = objSymbol.Symbol :?> FSharpEntity @@ -2215,9 +2200,7 @@ let ``Test Project13 all symbols`` () = ["type System.IComparable"; "type System.IFormattable"; "type System.IConvertible"; -#if !DOTNETCORE "type System.Runtime.Serialization.ISerializable"; -#endif "type System.IComparable"; "type System.IEquatable"]) @@ -2689,6 +2672,30 @@ let ``Test Project16 sym locations`` () = ("val x", ("file1", (11, 11), (11, 12)), ("file1", (11, 11), (11, 12)),("file1", (11, 11), (11, 12))); ("Impl", ("sig1", (2, 7), (2, 11)), ("file1", (2, 7), (2, 11)),("file1", (2, 7), (2, 11)))|] +[] +let ``Test project16 DeclaringEntity`` () = + let wholeProjectResults = + checker.ParseAndCheckProject(Project16.options) + |> Async.RunSynchronously + let allSymbolsUses = wholeProjectResults.GetAllUsesOfAllSymbols() |> Async.RunSynchronously + for sym in allSymbolsUses do + match sym.Symbol with + | :? FSharpEntity as e when not e.IsNamespace || e.AccessPath.Contains(".") -> + printfn "checking declaring type of entity '%s' --> '%s', assembly = '%s'" e.AccessPath e.CompiledName (e.Assembly.ToString()) + shouldEqual e.DeclaringEntity.IsSome (e.AccessPath <> "global") + match e.AccessPath with + | "C" | "D" | "E" | "F" | "G" -> + shouldEqual e.AccessPath "Impl" + shouldEqual e.DeclaringEntity.Value.IsFSharpModule true + shouldEqual e.DeclaringEntity.Value.IsNamespace false + | "int" -> + shouldEqual e.AccessPath "Microsoft.FSharp.Core" + shouldEqual e.DeclaringEntity.Value.AccessPath "Microsoft.FSharp" + | _ -> () + | :? FSharpMemberOrFunctionOrValue as e when e.IsModuleValueOrMember -> + printfn "checking declaring type of value '%s', assembly = '%s'" e.CompiledName (e.Assembly.ToString()) + shouldEqual e.DeclaringEntity.IsSome true + | _ -> () //----------------------------------------------------------------------------------------- @@ -2741,54 +2748,47 @@ let ``Test Project17 all symbols`` () = allUsesOfAllSymbols |> shouldEqual - [|("Collections", "Collections", "file1", ((4, 25), (4, 36)), [], - ["namespace"]); - ("FSharp", "FSharp", "file1", ((4, 18), (4, 24)), [], ["namespace"]); - ("Microsoft", "Microsoft", "file1", ((4, 8), (4, 17)), [], ["namespace"]); - ("FSharpList`1", "List", "file1", ((4, 8), (4, 41)), [], ["union"]); - ("int", "int", "file1", ((4, 42), (4, 45)), ["type"], ["abbrev"]); - ("FSharpList`1", "List", "file1", ((4, 8), (4, 46)), [], ["union"]); - ("property Empty", "Empty", "file1", ((4, 8), (4, 52)), [], - ["member"; "prop"]); - ("Generic", "Generic", "file1", ((6, 30), (6, 37)), ["type"], - ["namespace"]); - ("Collections", "Collections", "file1", ((6, 18), (6, 29)), ["type"], - ["namespace"]); - ("System", "System", "file1", ((6, 11), (6, 17)), ["type"], ["namespace"]); - ("IList`1", "IList", "file1", ((6, 11), (6, 43)), ["type"], ["interface"]); - ("generic parameter T", "T", "file1", ((6, 44), (6, 46)), ["type"], []); - ("val x", "x", "file1", ((6, 8), (6, 9)), ["defn"], []); - ("val x", "x", "file1", ((6, 51), (6, 52)), [], []); - ("property Item", "Item", "file1", ((6, 51), (6, 57)), [], - ["slot"; "member"; "prop"]); - ("val x", "x", "file1", ((6, 62), (6, 63)), [], []); - ("property Item", "Item", "file1", ((6, 62), (6, 67)), [], - ["slot"; "member"; "prop"]); - ("val x", "x", "file1", ((6, 69), (6, 70)), [], []); - ("property Count", "Count", "file1", ((6, 69), (6, 76)), [], - ["slot"; "member"; "prop"]); - ("val f1", "f1", "file1", ((6, 4), (6, 6)), ["defn"], ["val"]); - ("Generic", "Generic", "file1", ((8, 30), (8, 37)), ["type"], - ["namespace"]); - ("Collections", "Collections", "file1", ((8, 18), (8, 29)), ["type"], - ["namespace"]); - ("System", "System", "file1", ((8, 11), (8, 17)), ["type"], ["namespace"]); - ("IList`1", "IList", "file1", ((8, 11), (8, 43)), ["type"], ["interface"]); - ("int", "int", "file1", ((8, 44), (8, 47)), ["type"], ["abbrev"]); - ("val x", "x", "file1", ((8, 8), (8, 9)), ["defn"], []); - ("val x", "x", "file1", ((8, 52), (8, 53)), [], []); - ("property Item", "Item", "file1", ((8, 52), (8, 57)), [], - ["slot"; "member"; "prop"]); - ("val f2", "f2", "file1", ((8, 4), (8, 6)), ["defn"], ["val"]); - ("System", "System", "file1", ((10, 11), (10, 17)), ["type"], - ["namespace"]); - ("Exception", "Exception", "file1", ((10, 11), (10, 27)), ["type"], - ["class"]); ("val x", "x", "file1", ((10, 8), (10, 9)), ["defn"], []); - ("val x", "x", "file1", ((10, 31), (10, 32)), [], []); - ("property HelpLink", "HelpLink", "file1", ((10, 31), (10, 41)), [], - ["slot"; "member"; "prop"]); - ("val f3", "f3", "file1", ((10, 4), (10, 6)), ["defn"], ["val"]); - ("Impl", "Impl", "file1", ((2, 7), (2, 11)), ["defn"], ["module"])|] + [|("Microsoft", "Microsoft", "file1", ((4, 8), (4, 17)), [], ["namespace"]); + ("Collections", "Collections", "file1", ((4, 25), (4, 36)), [], ["namespace"]); + ("FSharp", "FSharp", "file1", ((4, 18), (4, 24)), [], ["namespace"]); + ("FSharpList`1", "List", "file1", ((4, 8), (4, 41)), [], ["union"]); + ("int", "int", "file1", ((4, 42), (4, 45)), ["type"], ["abbrev"]); + ("FSharpList`1", "List", "file1", ((4, 8), (4, 46)), [], ["union"]); + ("property Empty", "Empty", "file1", ((4, 8), (4, 52)), [], ["member"; "prop"]); + ("System", "System", "file1", ((6, 11), (6, 17)), [], ["namespace"]); + ("Collections", "Collections", "file1", ((6, 18), (6, 29)), [], ["namespace"]); + ("Generic", "Generic", "file1", ((6, 30), (6, 37)), [], ["namespace"]); + ("IList`1", "IList", "file1", ((6, 11), (6, 43)), ["type"], ["interface"]); + ("generic parameter T", "T", "file1", ((6, 44), (6, 46)), ["type"], []); + ("val x", "x", "file1", ((6, 8), (6, 9)), ["defn"], []); + ("val x", "x", "file1", ((6, 51), (6, 52)), [], []); + ("property Item", "Item", "file1", ((6, 51), (6, 57)), [], + ["slot"; "member"; "prop"]); + ("val x", "x", "file1", ((6, 62), (6, 63)), [], []); + ("property Item", "Item", "file1", ((6, 62), (6, 67)), [], + ["slot"; "member"; "prop"]); + ("val x", "x", "file1", ((6, 69), (6, 70)), [], []); + ("property Count", "Count", "file1", ((6, 69), (6, 76)), [], + ["slot"; "member"; "prop"]); + ("val f1", "f1", "file1", ((6, 4), (6, 6)), ["defn"], ["val"]); + ("System", "System", "file1", ((8, 11), (8, 17)), [], ["namespace"]); + ("Collections", "Collections", "file1", ((8, 18), (8, 29)), [], ["namespace"]); + ("Generic", "Generic", "file1", ((8, 30), (8, 37)), [], ["namespace"]); + ("IList`1", "IList", "file1", ((8, 11), (8, 43)), ["type"], ["interface"]); + ("int", "int", "file1", ((8, 44), (8, 47)), ["type"], ["abbrev"]); + ("val x", "x", "file1", ((8, 8), (8, 9)), ["defn"], []); + ("val x", "x", "file1", ((8, 52), (8, 53)), [], []); + ("property Item", "Item", "file1", ((8, 52), (8, 57)), [], + ["slot"; "member"; "prop"]); + ("val f2", "f2", "file1", ((8, 4), (8, 6)), ["defn"], ["val"]); + ("System", "System", "file1", ((10, 11), (10, 17)), [], ["namespace"]); + ("Exception", "Exception", "file1", ((10, 11), (10, 27)), ["type"], ["class"]); + ("val x", "x", "file1", ((10, 8), (10, 9)), ["defn"], []); + ("val x", "x", "file1", ((10, 31), (10, 32)), [], []); + ("property HelpLink", "HelpLink", "file1", ((10, 31), (10, 41)), [], + ["slot"; "member"; "prop"]); + ("val f3", "f3", "file1", ((10, 4), (10, 6)), ["defn"], ["val"]); + ("Impl", "Impl", "file1", ((2, 7), (2, 11)), ["defn"], ["module"])|] //----------------------------------------------------------------------------------------- @@ -2895,8 +2895,7 @@ let ``Test Project19 all symbols`` () = ["field"; "static"; "1"]); ("field EnumCase2", "EnumCase2", "file1", ((4, 30), (4, 39)), ["defn"], ["field"; "static"; "2"]); - ("Enum", "Enum", "file1", ((4, 5), (4, 9)), ["defn"], - ["enum"; "valuetype"]); + ("Enum", "Enum", "file1", ((4, 5), (4, 9)), ["defn"], ["enum"; "valuetype"]); ("Enum", "Enum", "file1", ((6, 8), (6, 12)), [], ["enum"; "valuetype"]); ("field EnumCase1", "EnumCase1", "file1", ((6, 8), (6, 22)), [], ["field"; "static"; "1"]); @@ -2912,10 +2911,11 @@ let ``Test Project19 all symbols`` () = ("field EnumCase2", "EnumCase2", "file1", ((8, 45), (8, 59)), ["pattern"], ["field"; "static"; "2"]); ("val f", "f", "file1", ((8, 4), (8, 5)), ["defn"], ["val"]); + ("System", "System", "file1", ((10, 8), (10, 14)), [], ["namespace"]); ("DayOfWeek", "DayOfWeek", "file1", ((10, 15), (10, 24)), [], ["enum"; "valuetype"]); - ("System", "System", "file1", ((10, 8), (10, 14)), [], ["namespace"]); - ("field Monday", "Monday", "file1", ((10, 8), (10, 31)), [], ["field"; "static"; "1"]); + ("field Monday", "Monday", "file1", ((10, 8), (10, 31)), [], + ["field"; "static"; "1"]); ("val s", "s", "file1", ((10, 4), (10, 5)), ["defn"], ["val"]); ("Impl", "Impl", "file1", ((2, 7), (2, 11)), ["defn"], ["module"])|] @@ -3189,7 +3189,7 @@ let ``Test Project22 IList properties`` () = attribsOfSymbol ilistTypeDefn |> shouldEqual ["interface"] -#if !TODO_REWORK_ASSEMBLY_LOAD +#if !NETCOREAPP2_0 // TODO: check if this can be enabled in .NET Core testing of FSharp.Compiler.Service ilistTypeDefn.Assembly.SimpleName |> shouldEqual coreLibAssemblyName #endif @@ -3270,16 +3270,16 @@ let ``Test Project23 property`` () = extensionProps |> Array.collect (fun f -> [| if f.HasGetterMethod then - yield (f.EnclosingEntity.Value.FullName, f.GetterMethod.CompiledName, f.GetterMethod.EnclosingEntity.Value.FullName, attribsOfSymbol f) + yield (f.DeclaringEntity.Value.FullName, f.ApparentEnclosingEntity.FullName, f.GetterMethod.CompiledName, f.GetterMethod.DeclaringEntity.Value.FullName, attribsOfSymbol f) if f.HasSetterMethod then - yield (f.EnclosingEntity.Value.FullName, f.SetterMethod.CompiledName, f.SetterMethod.EnclosingEntity.Value.FullName, attribsOfSymbol f) + yield (f.DeclaringEntity.Value.FullName, f.ApparentEnclosingEntity.FullName, f.SetterMethod.CompiledName, f.SetterMethod.DeclaringEntity.Value.FullName, attribsOfSymbol f) |]) |> Array.toList extensionPropsRelated |> shouldEqual - [("System.Int32", "Int32.get_Zero.Static", "Impl.Getter", + [("Impl.Getter", "System.Int32", "Int32.get_Zero.Static", "Impl.Getter", ["member"; "prop"; "extmem"]); - ("System.Int32", "Int32.get_Value", "Impl.Getter", + ("Impl.Getter", "System.Int32", "Int32.get_Value", "Impl.Getter", ["member"; "prop"; "extmem"])] allSymbolsUses @@ -3316,17 +3316,17 @@ let ``Test Project23 extension properties' getters/setters should refer to the c match x.Symbol with | :? FSharpMemberOrFunctionOrValue as f -> if f.HasGetterMethod then - yield (f.EnclosingEntity.Value.FullName, f.GetterMethod.EnclosingEntity.Value.FullName, attribsOfSymbol f) + yield (f.DeclaringEntity.Value.FullName, f.GetterMethod.DeclaringEntity.Value.FullName, f.ApparentEnclosingEntity.FullName, f.GetterMethod.ApparentEnclosingEntity.FullName, attribsOfSymbol f) if f.HasSetterMethod then - yield (f.EnclosingEntity.Value.FullName, f.SetterMethod.EnclosingEntity.Value.FullName, attribsOfSymbol f) + yield (f.DeclaringEntity.Value.FullName, f.SetterMethod.DeclaringEntity.Value.FullName, f.ApparentEnclosingEntity.FullName, f.SetterMethod.ApparentEnclosingEntity.FullName, attribsOfSymbol f) | _ -> () |]) |> Array.toList |> shouldEqual - [ ("System.Int32", "Impl.Setter", ["member"; "prop"; "extmem"]); - ("System.Int32", "Impl.Setter", ["member"; "prop"; "extmem"]); - ("System.Int32", "Impl.Getter", ["member"; "prop"; "extmem"]) - ("System.Int32", "Impl.Getter", ["member"; "prop"; "extmem"]) ] + [ ("Impl.Setter", "Impl.Setter", "System.Int32", "System.Int32", ["member"; "prop"; "extmem"]); + ("Impl.Setter", "Impl.Setter", "System.Int32", "System.Int32", ["member"; "prop"; "extmem"]); + ("Impl.Getter", "Impl.Getter", "System.Int32", "System.Int32", ["member"; "prop"; "extmem"]) + ("Impl.Getter", "Impl.Getter", "System.Int32", "System.Int32", ["member"; "prop"; "extmem"]) ] // Misc - property symbols module internal Project24 = @@ -3650,10 +3650,9 @@ let _ = XmlProvider<"13">.GetSample() yield @"-r:" + sysLib "System.Xml.Linq" |] let options = checker.GetProjectOptionsFromCommandLineArgs (projFileName, args) -#if DOTNETCORE -[] -#else [] +#if NETCOREAPP2_0 +[] #endif let ``Test Project25 whole project errors`` () = let wholeProjectResults = checker.ParseAndCheckProject(Project25.options) |> Async.RunSynchronously @@ -3661,10 +3660,9 @@ let ``Test Project25 whole project errors`` () = printfn "Project25 error: <<<%s>>>" e.Message wholeProjectResults.Errors.Length |> shouldEqual 0 -#if DOTNETCORE -[] -#else [] +#if NETCOREAPP2_0 +[] #endif let ``Test Project25 symbol uses of type-provided members`` () = let wholeProjectResults = checker.ParseAndCheckProject(Project25.options) |> Async.RunSynchronously @@ -3679,10 +3677,10 @@ let ``Test Project25 symbol uses of type-provided members`` () = allUses |> shouldEqual - [|("Microsoft.FSharp", "file1", ((3, 5), (3, 11)), ["namespace"]); - ("FSharp", "file1", ((3, 5), (3, 11)), ["namespace"]); - ("Microsoft.FSharp.Data", "file1", ((3, 12), (3, 16)), ["namespace"]); + [|("FSharp", "file1", ((3, 5), (3, 11)), ["namespace"]); ("FSharp.Data", "file1", ((3, 12), (3, 16)), ["namespace"; "provided"]); + ("Microsoft.FSharp", "file1", ((3, 5), (3, 11)), ["namespace"]); + ("Microsoft.FSharp.Data", "file1", ((3, 12), (3, 16)), ["namespace"]); ("FSharp.Data.XmlProvider", "file1", ((4, 15), (4, 26)), ["class"; "provided"; "erased"]); ("FSharp.Data.XmlProvider", "file1", ((4, 15), (4, 26)), @@ -3721,10 +3719,9 @@ let ``Test Project25 symbol uses of type-provided members`` () = usesOfGetSampleSymbol |> shouldEqual [|("file1", ((5, 8), (5, 25))); ("file1", ((10, 8), (10, 78)))|] -#if DOTNETCORE -[] -#else [] +#if NETCOREAPP2_0 +[] #endif let ``Test symbol uses of type-provided types`` () = let wholeProjectResults = checker.ParseAndCheckProject(Project25.options) |> Async.RunSynchronously @@ -3814,6 +3811,10 @@ let ``Test Project26 parameter symbols`` () = let objSymbol = wholeProjectResults.GetAllUsesOfAllSymbols() |> Async.RunSynchronously |> Array.find (fun su -> su.Symbol.DisplayName = "Class") let objEntity = objSymbol.Symbol :?> FSharpEntity + let rec isByRef (ty: FSharpType) = + if ty.IsAbbreviation then isByRef ty.AbbreviatedType + else ty.IsNamedType && ty.NamedEntity.IsByRef + // check we can get the CurriedParameterGroups let objMethodsCurriedParameterGroups = [ for x in objEntity.MembersFunctionsAndValues do @@ -3826,14 +3827,14 @@ let ``Test Project26 parameter symbols`` () = if p.IsOptionalArg then yield "optional" } |> String.concat "," - yield x.CompiledName, p.Name, p.Type.ToString(), attributeNames ] + yield x.CompiledName, p.Name, p.Type.ToString(), isByRef p.Type, attributeNames ] objMethodsCurriedParameterGroups |> shouldEqual - [("M1", Some "arg1", "type 'c", ""); - ("M1", Some "arg2", "type 'd Microsoft.FSharp.Core.option", "optional"); - ("M2", Some "arg1", "type 'a", "params"); - ("M2", Some "arg2", "type 'b", "optional"); - ("M3", Some "arg", "type Microsoft.FSharp.Core.byref", "out")] + [("M1", Some "arg1", "type 'c", false, ""); + ("M1", Some "arg2", "type 'd Microsoft.FSharp.Core.option", false, "optional"); + ("M2", Some "arg1", "type 'a", false, "params"); + ("M2", Some "arg2", "type 'b", false, "optional"); + ("M3", Some "arg", "type Microsoft.FSharp.Core.byref", true, "out")] // check we can get the ReturnParameter let objMethodsReturnParameter = @@ -3971,8 +3972,8 @@ let ``Test project28 all symbols in signature`` () = xmlDocSigs |> shouldEqual [|("FSharpEntity", "M", "T:M"); - ("FSharpMemberOrFunctionOrValue", "( |Even|Odd| )", "M:|Even|Odd|(System.Int32)"); - ("FSharpMemberOrFunctionOrValue", "TestNumber", "M:TestNumber(System.Int32)"); + ("FSharpMemberOrFunctionOrValue", "( |Even|Odd| )", "M:M.|Even|Odd|(System.Int32)"); + ("FSharpMemberOrFunctionOrValue", "TestNumber", "M:M.TestNumber(System.Int32)"); ("FSharpEntity", "DU", "T:M.DU"); ("FSharpUnionCase", "A", "T:M.DU.A"); ("FSharpField", "A", "T:M.DU.A"); @@ -4150,8 +4151,8 @@ let ``Test project31 whole project errors`` () = wholeProjectResults.Errors.Length |> shouldEqual 0 [] -#if DOTNETCORE -[] +#if NETCOREAPP2_0 +[] #endif let ``Test project31 C# type attributes`` () = if not runningOnMono then @@ -4193,14 +4194,14 @@ let ``Test project31 C# method attributes`` () = |> set |> shouldEqual (set [ -#if !DOTNETCORE +#if !NETCOREAPP2_0 "(SecuritySafeCriticalAttribute, [], [])"; #endif "(CLSCompliantAttribute, [(type Microsoft.FSharp.Core.bool, false)], [])"]) [] -#if DOTNETCORE -[] +#if NETCOREAPP2_0 +[] #endif let ``Test project31 Format C# type attributes`` () = if not runningOnMono then @@ -4234,7 +4235,7 @@ let ``Test project31 Format C# method attributes`` () = |> set |> shouldEqual (set ["[]"; -#if !DOTNETCORE +#if !NETCOREAPP2_0 "[]"; #endif ]) @@ -4389,6 +4390,9 @@ let ``Test Project34 whole project errors`` () = wholeProjectResults.Errors.Length |> shouldEqual 0 [] +#if NETCOREAPP2_0 +[] +#endif let ``Test project34 should report correct accessibility for System.Data.Listeners`` () = let wholeProjectResults = checker.ParseAndCheckProject(Project34.options) |> Async.RunSynchronously let rec getNestedEntities (entity: FSharpEntity) = @@ -4510,7 +4514,7 @@ module internal Project35b = let cleanFileName a = if a = fileName1 then "file1" else "??" let fileNames = [fileName1] -#if TODO_REWORK_ASSEMBLY_LOAD +#if NETCOREAPP2_0 let projPath = Path.ChangeExtension(fileName1, ".fsproj") let dllPath = Path.ChangeExtension(fileName1, ".dll") let args = mkProjectCommandLineArgs(dllPath, fileNames) @@ -4660,7 +4664,7 @@ module internal Project37 = let projFileName = Path.ChangeExtension(base2, ".fsproj") let fileSource1 = """ namespace AttrTests - +type X = int list [] type AttrTestAttribute() = inherit System.Attribute() @@ -4689,6 +4693,8 @@ module Test = let withTypeArray = 0 [] let withIntArray = 0 + module NestedModule = + type NestedRecordType = { B : int } [] do () @@ -4746,9 +4752,56 @@ let ``Test project37 typeof and arrays in attribute constructor arguments`` () = a |> shouldEqual [| 0; 1; 2 |] | _ -> () | _ -> () - wholeProjectResults.AssemblySignature.Attributes - |> Seq.map (fun a -> a.AttributeType.CompiledName) - |> Array.ofSeq |> shouldEqual [| "AttrTestAttribute"; "AttrTest2Attribute" |] + + let mscorlibAsm = + wholeProjectResults.ProjectContext.GetReferencedAssemblies() + |> Seq.find (fun a -> a.SimpleName = "mscorlib") + printfn "Attributes found in mscorlib: %A" mscorlibAsm.Contents.Attributes + shouldEqual (mscorlibAsm.Contents.Attributes.Count > 0) true + + let fsharpCoreAsm = + wholeProjectResults.ProjectContext.GetReferencedAssemblies() + |> Seq.find (fun a -> a.SimpleName = "FSharp.Core") + printfn "Attributes found in FSharp.Core: %A" fsharpCoreAsm.Contents.Attributes + shouldEqual (fsharpCoreAsm.Contents.Attributes.Count > 0) true + +[] +let ``Test project37 DeclaringEntity`` () = + let wholeProjectResults = + checker.ParseAndCheckProject(Project37.options) + |> Async.RunSynchronously + let allSymbolsUses = wholeProjectResults.GetAllUsesOfAllSymbols() |> Async.RunSynchronously + for sym in allSymbolsUses do + match sym.Symbol with + | :? FSharpEntity as e when not e.IsNamespace || e.AccessPath.Contains(".") -> + printfn "checking declaring type of entity '%s' --> '%s', assembly = '%s'" e.AccessPath e.CompiledName (e.Assembly.ToString()) + shouldEqual e.DeclaringEntity.IsSome true + match e.CompiledName with + | "AttrTestAttribute" -> + shouldEqual e.AccessPath "AttrTests" + | "int" -> + shouldEqual e.AccessPath "Microsoft.FSharp.Core" + shouldEqual e.DeclaringEntity.Value.AccessPath "Microsoft.FSharp" + | "list`1" -> + shouldEqual e.AccessPath "Microsoft.FSharp.Collections" + shouldEqual e.DeclaringEntity.Value.AccessPath "Microsoft.FSharp" + shouldEqual e.DeclaringEntity.Value.DeclaringEntity.IsSome true + shouldEqual e.DeclaringEntity.Value.DeclaringEntity.Value.IsNamespace true + shouldEqual e.DeclaringEntity.Value.DeclaringEntity.Value.AccessPath "Microsoft" + shouldEqual e.DeclaringEntity.Value.DeclaringEntity.Value.DeclaringEntity.Value.DeclaringEntity.IsSome false + | "Attribute" -> + shouldEqual e.AccessPath "System" + shouldEqual e.DeclaringEntity.Value.AccessPath "global" + | "NestedRecordType" -> + shouldEqual e.AccessPath "AttrTests.Test.NestedModule" + shouldEqual e.DeclaringEntity.Value.AccessPath "AttrTests.Test" + shouldEqual e.DeclaringEntity.Value.DeclaringEntity.Value.AccessPath "AttrTests" + shouldEqual e.DeclaringEntity.Value.DeclaringEntity.Value.DeclaringEntity.Value.AccessPath "global" + | _ -> () + | :? FSharpMemberOrFunctionOrValue as e when e.IsModuleValueOrMember -> + printfn "checking declaring type of value '%s', assembly = '%s'" e.CompiledName (e.Assembly.ToString()) + shouldEqual e.DeclaringEntity.IsSome true + | _ -> () //----------------------------------------------------------- @@ -5199,12 +5252,12 @@ type A(i:int) = | _ -> failwithf "Parsing aborted unexpectedly..." let declarations = - match fileCheckResults.ImplementationFiles with - | Some (implFile :: _) -> + match fileCheckResults.ImplementationFile with + | Some implFile -> match implFile.Declarations |> List.tryHead with | Some (FSharpImplementationFileDeclaration.Entity (_, subDecls)) -> subDecls | _ -> failwith "unexpected declaration" - | Some [] | None -> failwith "File check results does not contain any `ImplementationFile`s" + | None -> failwith "File check results does not contain any `ImplementationFile`s" match declarations |> List.tryHead with | Some (FSharpImplementationFileDeclaration.Entity(entity, [])) -> @@ -5214,3 +5267,231 @@ type A(i:int) = | Some decl -> failwithf "unexpected declaration %A" decl | None -> failwith "declaration list is empty" + + +[] +[] +[] +[] +[] +let ``#4030, Incremental builder creation warnings`` (args, errorSeverities) = + let source = "module M" + let fileName, options = mkTestFileAndOptions source args + + let _, checkResults = parseAndCheckFile fileName source options + checkResults.Errors |> Array.map (fun e -> e.Severity = FSharpErrorSeverity.Error) |> shouldEqual errorSeverities + + +//------------------------------------------------------ + +[] +let ``Unused opens in rec module smoke test 1``() = + + let fileName1 = Path.ChangeExtension(Path.GetTempFileName(), ".fs") + let base2 = Path.GetTempFileName() + let dllName = Path.ChangeExtension(base2, ".dll") + let projFileName = Path.ChangeExtension(base2, ".fsproj") + let fileSource1 = """ +module rec Module + +open System.Collections // unused +open System.Collections.Generic // used, should not appear +open FSharp.Control // unused +open FSharp.Data // unused +open System.Globalization // unused + +module SomeUnusedModule = + let f x = x + +module SomeUsedModuleContainingFunction = + let g x = x + +module SomeUsedModuleContainingActivePattern = + let (|ActivePattern|) x = x + +module SomeUsedModuleContainingExtensionMember = + type System.Int32 with member x.Q = 1 + +module SomeUsedModuleContainingUnion = + type Q = A | B + +open SomeUnusedModule +open SomeUsedModuleContainingFunction +open SomeUsedModuleContainingExtensionMember +open SomeUsedModuleContainingActivePattern +open SomeUsedModuleContainingUnion + +type UseTheThings(i:int) = + member x.Value = Dictionary() // use something from System.Collections.Generic, as a constructor + member x.UseSomeUsedModuleContainingFunction() = g 3 + member x.UseSomeUsedModuleContainingActivePattern(ActivePattern g) = g + member x.UseSomeUsedModuleContainingExtensionMember() = (3).Q + member x.UseSomeUsedModuleContainingUnion() = A +""" + File.WriteAllText(fileName1, fileSource1) + + let fileNames = [fileName1] + let args = mkProjectCommandLineArgs (dllName, fileNames) + let keepAssemblyContentsChecker = FSharpChecker.Create(keepAssemblyContents=true) + let options = keepAssemblyContentsChecker.GetProjectOptionsFromCommandLineArgs (projFileName, args) + + let fileCheckResults = + keepAssemblyContentsChecker.ParseAndCheckFileInProject(fileName1, 0, fileSource1, options) |> Async.RunSynchronously + |> function + | _, FSharpCheckFileAnswer.Succeeded(res) -> res + | _ -> failwithf "Parsing aborted unexpectedly..." + //let symbolUses = fileCheckResults.GetAllUsesOfAllSymbolsInFile() |> Async.RunSynchronously |> Array.indexed + // Fragments used to check hash codes: + //(snd symbolUses.[42]).Symbol.IsEffectivelySameAs((snd symbolUses.[37]).Symbol) + //(snd symbolUses.[42]).Symbol.GetEffectivelySameAsHash() + //(snd symbolUses.[37]).Symbol.GetEffectivelySameAsHash() + let lines = File.ReadAllLines(fileName1) + let unusedOpens = UnusedOpens.getUnusedOpens (fileCheckResults, (fun i -> lines.[i-1])) |> Async.RunSynchronously + let unusedOpensData = [ for uo in unusedOpens -> tups uo, lines.[uo.StartLine-1] ] + let expected = + [(((4, 5), (4, 23)), "open System.Collections // unused"); + (((6, 5), (6, 19)), "open FSharp.Control // unused"); + (((7, 5), (7, 16)), "open FSharp.Data // unused"); + (((8, 5), (8, 25)), "open System.Globalization // unused"); + (((25, 5), (25, 21)), "open SomeUnusedModule")] + unusedOpensData |> shouldEqual expected + +[] +let ``Unused opens in non rec module smoke test 1``() = + + let fileName1 = Path.ChangeExtension(Path.GetTempFileName(), ".fs") + let base2 = Path.GetTempFileName() + let dllName = Path.ChangeExtension(base2, ".dll") + let projFileName = Path.ChangeExtension(base2, ".fsproj") + let fileSource1 = """ +module Module + +open System.Collections // unused +open System.Collections.Generic // used, should not appear +open FSharp.Control // unused +open FSharp.Data // unused +open System.Globalization // unused + +module SomeUnusedModule = + let f x = x + +module SomeUsedModuleContainingFunction = + let g x = x + +module SomeUsedModuleContainingActivePattern = + let (|ActivePattern|) x = x + +module SomeUsedModuleContainingExtensionMember = + type System.Int32 with member x.Q = 1 + +module SomeUsedModuleContainingUnion = + type Q = A | B + +open SomeUnusedModule +open SomeUsedModuleContainingFunction +open SomeUsedModuleContainingExtensionMember +open SomeUsedModuleContainingActivePattern +open SomeUsedModuleContainingUnion + +type UseTheThings(i:int) = + member x.Value = Dictionary() // use something from System.Collections.Generic, as a constructor + member x.UseSomeUsedModuleContainingFunction() = g 3 + member x.UseSomeUsedModuleContainingActivePattern(ActivePattern g) = g + member x.UseSomeUsedModuleContainingExtensionMember() = (3).Q + member x.UseSomeUsedModuleContainingUnion() = A +""" + File.WriteAllText(fileName1, fileSource1) + + let fileNames = [fileName1] + let args = mkProjectCommandLineArgs (dllName, fileNames) + let keepAssemblyContentsChecker = FSharpChecker.Create(keepAssemblyContents=true) + let options = keepAssemblyContentsChecker.GetProjectOptionsFromCommandLineArgs (projFileName, args) + + let fileCheckResults = + keepAssemblyContentsChecker.ParseAndCheckFileInProject(fileName1, 0, fileSource1, options) |> Async.RunSynchronously + |> function + | _, FSharpCheckFileAnswer.Succeeded(res) -> res + | _ -> failwithf "Parsing aborted unexpectedly..." + //let symbolUses = fileCheckResults.GetAllUsesOfAllSymbolsInFile() |> Async.RunSynchronously |> Array.indexed + // Fragments used to check hash codes: + //(snd symbolUses.[42]).Symbol.IsEffectivelySameAs((snd symbolUses.[37]).Symbol) + //(snd symbolUses.[42]).Symbol.GetEffectivelySameAsHash() + //(snd symbolUses.[37]).Symbol.GetEffectivelySameAsHash() + let lines = File.ReadAllLines(fileName1) + let unusedOpens = UnusedOpens.getUnusedOpens (fileCheckResults, (fun i -> lines.[i-1])) |> Async.RunSynchronously + let unusedOpensData = [ for uo in unusedOpens -> tups uo, lines.[uo.StartLine-1] ] + let expected = + [(((4, 5), (4, 23)), "open System.Collections // unused"); + (((6, 5), (6, 19)), "open FSharp.Control // unused"); + (((7, 5), (7, 16)), "open FSharp.Data // unused"); + (((8, 5), (8, 25)), "open System.Globalization // unused"); + (((25, 5), (25, 21)), "open SomeUnusedModule")] + unusedOpensData |> shouldEqual expected + +[] +let ``Unused opens smoke test auto open``() = + + let fileName1 = Path.ChangeExtension(Path.GetTempFileName(), ".fs") + let base2 = Path.GetTempFileName() + let dllName = Path.ChangeExtension(base2, ".dll") + let projFileName = Path.ChangeExtension(base2, ".fsproj") + let fileSource1 = """ +open System.Collections // unused +open System.Collections.Generic // used, should not appear +open FSharp.Control // unused +open FSharp.Data // unused +open System.Globalization // unused + +[] +module Helpers = + module SomeUnusedModule = + let f x = x + + module SomeUsedModuleContainingFunction = + let g x = x + + module SomeUsedModuleContainingActivePattern = + let (|ActivePattern|) x = x + + module SomeUsedModuleContainingExtensionMember = + type System.Int32 with member x.Q = 1 + + module SomeUsedModuleContainingUnion = + type Q = A | B + +open SomeUnusedModule +open SomeUsedModuleContainingFunction +open SomeUsedModuleContainingExtensionMember +open SomeUsedModuleContainingActivePattern +open SomeUsedModuleContainingUnion + +type UseTheThings(i:int) = + member x.Value = Dictionary() // use something from System.Collections.Generic, as a constructor + member x.UseSomeUsedModuleContainingFunction() = g 3 + member x.UseSomeUsedModuleContainingActivePattern(ActivePattern g) = g + member x.UseSomeUsedModuleContainingExtensionMember() = (3).Q + member x.UseSomeUsedModuleContainingUnion() = A +""" + File.WriteAllText(fileName1, fileSource1) + + let fileNames = [fileName1] + let args = mkProjectCommandLineArgs (dllName, fileNames) + let keepAssemblyContentsChecker = FSharpChecker.Create(keepAssemblyContents=true) + let options = keepAssemblyContentsChecker.GetProjectOptionsFromCommandLineArgs (projFileName, args) + + let fileCheckResults = + keepAssemblyContentsChecker.ParseAndCheckFileInProject(fileName1, 0, fileSource1, options) |> Async.RunSynchronously + |> function + | _, FSharpCheckFileAnswer.Succeeded(res) -> res + | _ -> failwithf "Parsing aborted unexpectedly..." + let lines = File.ReadAllLines(fileName1) + let unusedOpens = UnusedOpens.getUnusedOpens (fileCheckResults, (fun i -> lines.[i-1])) |> Async.RunSynchronously + let unusedOpensData = [ for uo in unusedOpens -> tups uo, lines.[uo.StartLine-1] ] + let expected = + [(((2, 5), (2, 23)), "open System.Collections // unused"); + (((4, 5), (4, 19)), "open FSharp.Control // unused"); + (((5, 5), (5, 16)), "open FSharp.Data // unused"); + (((6, 5), (6, 25)), "open System.Globalization // unused"); + (((25, 5), (25, 21)), "open SomeUnusedModule")] + unusedOpensData |> shouldEqual expected + diff --git a/tests/service/ProjectOptionsTests.fs b/tests/service/ProjectOptionsTests.fs index 1e995681fdb..b390f53e62b 100644 --- a/tests/service/ProjectOptionsTests.fs +++ b/tests/service/ProjectOptionsTests.fs @@ -1,6 +1,6 @@ #if INTERACTIVE -#r "../../Debug/fcs/net45/FSharp.Compiler.Service.dll" // note, run 'build fcs debug' to generate this, this DLL has a public API so can be used from F# Interactive -#r "../../Debug/net40/bin/FSharp.Compiler.Service.ProjectCracker.dll" +#r "../../debug/fcs/net45/FSharp.Compiler.Service.dll" // note, run 'build fcs debug' to generate this, this DLL has a public API so can be used from F# Interactive +#r "../../debug/fcs/net45/FSharp.Compiler.Service.ProjectCracker.dll" #r "../../packages/NUnit.3.5.0/lib/net45/nunit.framework.dll" #load "FsUnit.fs" #load "Common.fs" @@ -14,11 +14,12 @@ open System open System.IO open NUnit.Framework open FsUnit +open Microsoft.FSharp.Compiler.Ast open Microsoft.FSharp.Compiler.SourceCodeServices open FSharp.Compiler.Service.Tests.Common -#if !NO_PROJECTCRACKER +#if !NO_PROJECTCRACKER && DISABLED // Disabled tests because of MSBuild API dependencies. The ProjectCracker is basically deprecated in any case let hasMSBuild14 = use engine = new Microsoft.Build.Evaluation.ProjectCollection() @@ -235,12 +236,12 @@ let ``Project file parsing -- Logging``() = let _, logMap = ProjectCracker.GetProjectOptionsFromProjectFileLogged(projectFileName, enableLogging=true) let log = logMap.[projectFileName] - Assert.That(log, Is.StringContaining("ResolveAssemblyReference")) + Assert.That(log, Does.Contain("ResolveAssemblyReference")) if runningOnMono then - Assert.That(log, Is.StringContaining("System.Core")) - Assert.That(log, Is.StringContaining("Microsoft.Build.Tasks.ResolveAssemblyReference")) + Assert.That(log, Does.Contain("System.Core")) + Assert.That(log, Does.Contain("Microsoft.Build.Tasks.ResolveAssemblyReference")) else - Assert.That(log, Is.StringContaining("Microsoft.Build.Tasks.Core")) + Assert.That(log, Does.Contain("Microsoft.Build.Tasks.Core")) [] let ``Project file parsing -- FSharpProjectOptions.SourceFiles contains both fs and fsi files``() = @@ -518,6 +519,61 @@ let ``Test SourceFiles order for GetProjectOptionsFromScript`` () = // See #594 test "Main4" [|"BaseLib2"; "Lib5"; "BaseLib1"; "Lib1"; "Lib2"; "Main4"|] test "MainBad" [|"MainBad"|] +[] +#if NETCOREAPP2_0 +[] +#endif +let ``Script load closure project`` () = + let fileName1 = Path.GetTempPath() + Path.DirectorySeparatorChar.ToString() + "Impl.fs" + let fileName2 = Path.ChangeExtension(Path.GetTempFileName(), ".fsx") + let fileSource1 = """ +module ImplFile - +#if INTERACTIVE +let x = 42 +#endif +""" + + let fileSource2 = """ +#load "Impl.fs" +ImplFile.x +""" + + File.WriteAllText(fileName1, fileSource1) + File.WriteAllText(fileName2, fileSource2) + + printfn "------Starting Script load closure project----" + printfn "Getting project options..." + let projectOptions, diagnostics = + checker.GetProjectOptionsFromScript(fileName2, fileSource2, useFsiAuxLib=false) |> Async.RunSynchronously + for d in diagnostics do + printfn "ERROR: %A" d + diagnostics.IsEmpty |> shouldEqual true + + printfn "Parse and check..." + let _, checkResults = + checker.ParseAndCheckFileInProject(fileName2, 0, fileSource2, projectOptions) |> Async.RunSynchronously + + match checkResults with + | FSharpCheckFileAnswer.Succeeded results -> + results.Errors |> shouldEqual [| |] + | _ -> failwith "type check was aborted" + + printfn "Getting parsing options..." + let parsingOptions, diagnostics = checker.GetParsingOptionsFromProjectOptions(projectOptions) + for d in diagnostics do + printfn "ERROR: %A" d + diagnostics.IsEmpty |> shouldEqual true + + printfn "Parsing file..." + let parseResults = checker.ParseFile(fileName1, fileSource1, parsingOptions) |> Async.RunSynchronously + printfn "Checking parsetree..." + parseResults.ParseTree.IsSome |> shouldEqual true + printfn "Checking decls..." + match parseResults.ParseTree.Value with + | ParsedInput.ImplFile (ParsedImplFileInput (_, _, _, _, _, modules, _)) -> + let (SynModuleOrNamespace (_, _, _, decls, _, _, _, _)) = modules.Head + decls.Length |> shouldEqual 1 + | _ -> failwith "got sig file" + printfn "------Finished Script load closure project----" diff --git a/tests/service/ServiceUntypedParseTests.fs b/tests/service/ServiceUntypedParseTests.fs new file mode 100644 index 00000000000..d47acf69de2 --- /dev/null +++ b/tests/service/ServiceUntypedParseTests.fs @@ -0,0 +1,102 @@ +#if INTERACTIVE +#r "../../debug/fcs/net45/FSharp.Compiler.Service.dll" // note, run 'build fcs debug' to generate this, this DLL has a public API so can be used from F# Interactive +#r "../../packages/NUnit.3.5.0/lib/net45/nunit.framework.dll" +#load "FsUnit.fs" +#load "Common.fs" +#else +module Tests.Service.ServiceUntypedParseTests +#endif + +open System +open System.IO +open System.Text +open NUnit.Framework +open Microsoft.FSharp.Compiler.Range +open Microsoft.FSharp.Compiler.SourceCodeServices +open FSharp.Compiler.Service.Tests.Common +open Tests.Service + +let [] private Marker = "(* marker *)" + +let private (=>) (source: string) (expected: CompletionContext option) = + + let lines = + use reader = new StringReader(source) + [| let line = ref (reader.ReadLine()) + while not (isNull !line) do + yield !line + line := reader.ReadLine() + if source.EndsWith "\n" then + yield "" |] + + let markerPos = + lines + |> Array.mapi (fun i x -> i, x) + |> Array.tryPick (fun (lineIdx, line) -> + match line.IndexOf Marker with + | -1 -> None + | idx -> Some (mkPos (Line.fromZ lineIdx) idx)) + + match markerPos with + | None -> failwithf "Marker '%s' was not found in the source code" Marker + | Some markerPos -> + match parseSourceCode("C:\\test.fs", source) with + | None -> failwith "No parse tree" + | Some parseTree -> + let actual = UntypedParseImpl.TryGetCompletionContext(markerPos, parseTree, lines.[Line.toZ markerPos.Line]) + try Assert.AreEqual(expected, actual) + with e -> + printfn "ParseTree: %A" parseTree + reraise() + +module AttributeCompletion = + [] + let ``at [<|, applied to nothing``() = + """ +[<(* marker *) +""" + => Some CompletionContext.AttributeApplication + + [] + [] + [] + [] + [] + [] + [] + [][<(* marker *)", true)>] + [][< (* marker *)", true)>] + [] + [] + [] + [][] + [] + let ``incomplete``(lineStr: string, expectAttributeApplicationContext: bool) = + (sprintf """ +%s +type T = + { F: int } +""" lineStr) => (if expectAttributeApplicationContext then Some CompletionContext.AttributeApplication else None) + + []", true)>] + []", true)>] + []", true)>] + []", true)>] + []", true)>] + [][<(* marker *)>]", true)>] + [][< (* marker *)>]", true)>] + []", true)>] + []", true)>] + [][]", true)>] + []", false)>] + []", false)>] + [][]", false)>] + []", false)>] + []", false)>] + [][]", false)>] + let ``complete``(lineStr: string, expectAttributeApplicationContext: bool) = + (sprintf """ +%s +type T = + { F: int } +""" lineStr) => (if expectAttributeApplicationContext then Some CompletionContext.AttributeApplication else None) \ No newline at end of file diff --git a/tests/service/StructureTests.fs b/tests/service/StructureTests.fs index cbfc937a384..d87c3c18e78 100644 --- a/tests/service/StructureTests.fs +++ b/tests/service/StructureTests.fs @@ -1,5 +1,5 @@ #if INTERACTIVE -#r "../../Debug/fcs/net45/FSharp.Compiler.Service.dll" // note, run 'build fcs debug' to generate this, this DLL has a public API so can be used from F# Interactive +#r "../../debug/fcs/net45/FSharp.Compiler.Service.dll" // note, run 'build fcs debug' to generate this, this DLL has a public API so can be used from F# Interactive #r "../../packages/NUnit.3.5.0/lib/net45/nunit.framework.dll" #load "FsUnit.fs" #load "Common.fs" @@ -53,7 +53,7 @@ let (=>) (source: string) (expectedRanges: (Range * Range) list) = |> List.ofSeq let expected = List.sort expectedRanges if actual <> expected then - failwithf "Expected %s, but was %s" (formatList expected) (formatList actual) + failwithf "Expected %s, but was %s" (formatList expected) (formatList actual) | None -> failwithf "Expected there to be a parse tree for source:\n%s" source with _ -> printfn "AST:\n%+A" ast @@ -301,6 +301,28 @@ match None with // 2 (6, 4, 10, 10), (5, 6, 10, 10) (6, 4, 10, 10), (6, 19, 10, 10) (9, 8, 10, 10), (8, 10, 10, 10) ] + +[] +let ``matchbang``() = + """ +async { // 2 + match! async { return None } with // 3 + | Some _ -> // 4 + () // 5 + | None -> // 6 + match None with // 7 + | Some _ -> () // 8 + | None -> // 9 + let x = () // 10 + () // 11 +} // 12 +""" + => [ (1, 0, 12, 1), (1, 0, 12, 1) + (2, 0, 12, 1), (2, 7, 12, 0) + (3, 4, 11, 14), (3, 37, 11, 14) + (7, 8, 11, 14), (6, 10, 11, 14) + (7, 8, 11, 14), (7, 23, 11, 14) + (10, 12, 11, 14), (9, 14, 11, 14) ] [] let ``computation expressions``() = diff --git a/tests/service/Symbols.fs b/tests/service/Symbols.fs new file mode 100644 index 00000000000..8b5749f0546 --- /dev/null +++ b/tests/service/Symbols.fs @@ -0,0 +1,103 @@ +#if INTERACTIVE +#r "../../debug/fcs/net45/FSharp.Compiler.Service.dll" // note, run 'build fcs debug' to generate this, this DLL has a public API so can be used from F# Interactive +#r "../../packages/NUnit.3.5.0/lib/net45/nunit.framework.dll" +#load "FsUnit.fs" +#load "Common.fs" +#else +module Tests.Service.Symbols +#endif + +open FSharp.Compiler.Service.Tests.Common +open FsUnit +open NUnit.Framework +open Microsoft.FSharp.Compiler.SourceCodeServices + +module ActivePatterns = + + let completePatternInput = """ +let (|True|False|) = function + | true -> True + | false -> False + +match true with +| True | False -> () +""" + + let partialPatternInput = """ +let (|String|_|) = function + | :? String -> Some () + | _ -> None + +match "foo" with +| String +| _ -> () +""" + + let getCaseUsages source line = + let fileName, options = mkTestFileAndOptions source [| |] + let _, checkResults = parseAndCheckFile fileName source options + + checkResults.GetAllUsesOfAllSymbolsInFile() + |> Async.RunSynchronously + |> Array.filter (fun su -> su.RangeAlternate.StartLine = line && su.Symbol :? FSharpActivePatternCase) + |> Array.map (fun su -> su.Symbol :?> FSharpActivePatternCase) + + [] + let ``Active pattern case indices`` () = + let getIndices = Array.map (fun (case: FSharpActivePatternCase) -> case.Index) + + getCaseUsages completePatternInput 7 |> getIndices |> shouldEqual [| 0; 1 |] + getCaseUsages partialPatternInput 7 |> getIndices |> shouldEqual [| 0 |] + + [] + let ``Active pattern group names`` () = + let getGroupName (case: FSharpActivePatternCase) = case.Group.Name.Value + + getCaseUsages completePatternInput 7 |> Array.head |> getGroupName |> shouldEqual "|True|False|" + getCaseUsages partialPatternInput 7 |> Array.head |> getGroupName |> shouldEqual "|String|_|" + + +module XmlDocSig = + + [] + let ``XmlDocSig of modules in namespace`` () = + let source = """ +namespace Ns1 +module Mod1 = + let val1 = 1 + module Mod2 = + let func2 () = () +""" + let fileName, options = mkTestFileAndOptions source [| |] + let _, checkResults = parseAndCheckFile fileName source options + + let mod1 = checkResults.PartialAssemblySignature.FindEntityByPath ["Ns1"; "Mod1"] |> Option.get + let mod2 = checkResults.PartialAssemblySignature.FindEntityByPath ["Ns1"; "Mod1"; "Mod2"] |> Option.get + let mod1val1 = mod1.MembersFunctionsAndValues |> Seq.find (fun m -> m.DisplayName = "val1") + let mod2func2 = mod2.MembersFunctionsAndValues |> Seq.find (fun m -> m.DisplayName = "func2") + mod1.XmlDocSig |> shouldEqual "T:Ns1.Mod1" + mod2.XmlDocSig |> shouldEqual "T:Ns1.Mod1.Mod2" + mod1val1.XmlDocSig |> shouldEqual "P:Ns1.Mod1.val1" + mod2func2.XmlDocSig |> shouldEqual "M:Ns1.Mod1.Mod2.func2" + + [] + let ``XmlDocSig of modules`` () = + let source = """ +module Mod1 +let val1 = 1 +module Mod2 = + let func2 () = () +""" + let fileName, options = mkTestFileAndOptions source [| |] + let _, checkResults = parseAndCheckFile fileName source options + + let mod1 = checkResults.PartialAssemblySignature.FindEntityByPath ["Mod1"] |> Option.get + let mod2 = checkResults.PartialAssemblySignature.FindEntityByPath ["Mod1"; "Mod2"] |> Option.get + let mod1val1 = mod1.MembersFunctionsAndValues |> Seq.find (fun m -> m.DisplayName = "val1") + let mod2func2 = mod2.MembersFunctionsAndValues |> Seq.find (fun m -> m.DisplayName = "func2") + mod1.XmlDocSig |> shouldEqual "T:Mod1" + mod2.XmlDocSig |> shouldEqual "T:Mod1.Mod2" + mod1val1.XmlDocSig |> shouldEqual "P:Mod1.val1" + mod2func2.XmlDocSig |> shouldEqual "M:Mod1.Mod2.func2" + + \ No newline at end of file diff --git a/tests/service/TokenizerTests.fs b/tests/service/TokenizerTests.fs index 1a9776c7a3f..4973d398f29 100644 --- a/tests/service/TokenizerTests.fs +++ b/tests/service/TokenizerTests.fs @@ -1,6 +1,6 @@  #if INTERACTIVE -#r "../../Debug/fcs/net45/FSharp.Compiler.Service.dll" // note, run 'build fcs debug' to generate this, this DLL has a public API so can be used from F# Interactive +#r "../../debug/fcs/net45/FSharp.Compiler.Service.dll" // note, run 'build fcs debug' to generate this, this DLL has a public API so can be used from F# Interactive #r "../../packages/NUnit.3.5.0/lib/net45/nunit.framework.dll" #load "FsUnit.fs" #load "Common.fs" @@ -20,19 +20,21 @@ open System.IO let sourceTok = FSharpSourceTokenizer([], Some "C:\\test.fsx") +let rec parseLine(line: string, state: int64 ref, tokenizer: FSharpLineTokenizer) = seq { + match tokenizer.ScanToken(!state) with + | Some(tok), nstate -> + let str = line.Substring(tok.LeftColumn, tok.RightColumn - tok.LeftColumn + 1) + yield str, tok + state := nstate + yield! parseLine(line, state, tokenizer) + | None, nstate -> + state := nstate } + let tokenizeLines (lines:string[]) = [ let state = ref 0L - for n, line in lines |> Seq.zip [ 0 .. lines.Length ] do + for n, line in lines |> Seq.zip [ 0 .. lines.Length-1 ] do let tokenizer = sourceTok.CreateLineTokenizer(line) - let rec parseLine() = seq { - match tokenizer.ScanToken(!state) with - | Some(tok), nstate -> - let str = line.Substring(tok.LeftColumn, tok.RightColumn - tok.LeftColumn + 1) - yield str, tok - state := nstate - yield! parseLine() - | None, nstate -> state := nstate } - yield n, parseLine() |> List.ofSeq ] + yield n, parseLine(line, state, tokenizer) |> List.ofSeq ] [] let ``Tokenizer test 1``() = diff --git a/tests/service/data/CSharp_Analysis/CSharpClass.cs b/tests/service/data/CSharp_Analysis/CSharpClass.cs index fbef78388ad..13a9e257642 100644 --- a/tests/service/data/CSharp_Analysis/CSharpClass.cs +++ b/tests/service/data/CSharp_Analysis/CSharpClass.cs @@ -126,4 +126,14 @@ public static int StaticMember() } } + public class String + { + } + + namespace Linq + { + public class DummyClass + { + } + } } diff --git a/tests/service/data/DifferingOutputDir/Dir1/Test1.fsproj b/tests/service/data/DifferingOutputDir/Dir1/Test1.fsproj index c63d10731da..668428f1ac0 100644 --- a/tests/service/data/DifferingOutputDir/Dir1/Test1.fsproj +++ b/tests/service/data/DifferingOutputDir/Dir1/Test1.fsproj @@ -37,7 +37,7 @@ - ..\..\..\..\..\packages\Microsoft.Portable.FSharp.Core.4.1.20\lib\profiles\net40\FSharp.Core.dll + ..\..\..\..\..\packages\Microsoft.Portable.FSharp.Core.10.1.0\lib\profiles\net40\FSharp.Core.dll false @@ -48,7 +48,7 @@ - + diff --git a/tests/service/data/DifferingOutputDir/Dir2/Test2.fsproj b/tests/service/data/DifferingOutputDir/Dir2/Test2.fsproj index 0ee82b31cbf..e90751876da 100644 --- a/tests/service/data/DifferingOutputDir/Dir2/Test2.fsproj +++ b/tests/service/data/DifferingOutputDir/Dir2/Test2.fsproj @@ -37,7 +37,7 @@ - ..\..\..\..\..\packages\Microsoft.Portable.FSharp.Core.4.1.20\lib\profiles\net40\FSharp.Core.dll + ..\..\..\..\..\packages\Microsoft.Portable.FSharp.Core.10.1.0\lib\profiles\net40\FSharp.Core.dll false @@ -54,7 +54,7 @@ Test1 - + diff --git a/tests/service/data/FSharp.Data.DesignTime.dll b/tests/service/data/FSharp.Data.DesignTime.dll index fca7289ce56..db2a3317bbc 100644 Binary files a/tests/service/data/FSharp.Data.DesignTime.dll and b/tests/service/data/FSharp.Data.DesignTime.dll differ diff --git a/tests/service/data/FSharp.Data.dll b/tests/service/data/FSharp.Data.dll index 39353541eed..95b4d8a914b 100644 Binary files a/tests/service/data/FSharp.Data.dll and b/tests/service/data/FSharp.Data.dll differ diff --git a/tests/service/data/FsAndFsiFiles.fsproj b/tests/service/data/FsAndFsiFiles.fsproj index 95b10fad1bb..a31365c73f1 100644 --- a/tests/service/data/FsAndFsiFiles.fsproj +++ b/tests/service/data/FsAndFsiFiles.fsproj @@ -35,7 +35,7 @@ - ..\..\..\packages\Microsoft.Portable.FSharp.Core.4.1.20\lib\profiles\net40\FSharp.Core.dll + ..\..\..\packages\Microsoft.Portable.FSharp.Core.10.1.0\lib\profiles\net40\FSharp.Core.dll @@ -45,10 +45,10 @@ - - + + - + diff --git a/tests/service/data/MultiLanguageProject/ConsoleApplication1.fsproj b/tests/service/data/MultiLanguageProject/ConsoleApplication1.fsproj index e12ade0ff46..4aef2e13364 100644 --- a/tests/service/data/MultiLanguageProject/ConsoleApplication1.fsproj +++ b/tests/service/data/MultiLanguageProject/ConsoleApplication1.fsproj @@ -39,7 +39,7 @@ - ..\..\..\..\packages\Microsoft.Portable.FSharp.Core.4.1.20\lib\profiles\net40\FSharp.Core.dll + ..\..\..\..\packages\Microsoft.Portable.FSharp.Core.10.1.0\lib\profiles\net40\FSharp.Core.dll false @@ -64,7 +64,7 @@ 11 - + diff --git a/tests/service/data/MultiLanguageProject/ConsoleApplication2.fsproj b/tests/service/data/MultiLanguageProject/ConsoleApplication2.fsproj index 38bb936cab8..f70cb6693ad 100644 --- a/tests/service/data/MultiLanguageProject/ConsoleApplication2.fsproj +++ b/tests/service/data/MultiLanguageProject/ConsoleApplication2.fsproj @@ -39,7 +39,7 @@ - ..\..\..\..\packages\Microsoft.Portable.FSharp.Core.4.1.20\lib\profiles\net40\FSharp.Core.dll + ..\..\..\..\packages\Microsoft.Portable.FSharp.Core.10.1.0\lib\profiles\net40\FSharp.Core.dll false @@ -56,7 +56,7 @@ True - + diff --git a/tests/service/data/Space in name.fsproj b/tests/service/data/Space in name.fsproj index ec67bc97427..36ff02de930 100644 --- a/tests/service/data/Space in name.fsproj +++ b/tests/service/data/Space in name.fsproj @@ -35,7 +35,7 @@ - ..\..\..\packages\Microsoft.Portable.FSharp.Core.4.1.20\lib\profiles\net40\FSharp.Core.dll + ..\..\..\packages\Microsoft.Portable.FSharp.Core.4.3.0\lib\profiles\net40\FSharp.Core.dll false @@ -52,7 +52,7 @@ Test1 - + diff --git a/tests/service/data/Test1.fsproj b/tests/service/data/Test1.fsproj index 6cb171ba604..11917790084 100644 --- a/tests/service/data/Test1.fsproj +++ b/tests/service/data/Test1.fsproj @@ -35,7 +35,7 @@ - ..\..\..\packages\Microsoft.Portable.FSharp.Core.4.1.20\lib\profiles\net40\FSharp.Core.dll + ..\..\..\packages\Microsoft.Portable.FSharp.Core.10.1.0\lib\profiles\net40\FSharp.Core.dll false @@ -46,7 +46,7 @@ - + diff --git a/tests/service/data/Test2.fsproj b/tests/service/data/Test2.fsproj index 96ff7ac180f..fff033794e4 100644 --- a/tests/service/data/Test2.fsproj +++ b/tests/service/data/Test2.fsproj @@ -36,7 +36,7 @@ - ..\..\..\packages\Microsoft.Portable.FSharp.Core.4.1.20\lib\profiles\net40\FSharp.Core.dll + ..\..\..\packages\Microsoft.Portable.FSharp.Core.10.1.0\lib\profiles\net40\FSharp.Core.dll false @@ -53,7 +53,7 @@ Test1 - + diff --git a/tests/service/data/Test3.fsproj b/tests/service/data/Test3.fsproj index 31c2d33c565..5ea53f2766c 100644 --- a/tests/service/data/Test3.fsproj +++ b/tests/service/data/Test3.fsproj @@ -36,7 +36,7 @@ - ..\..\..\packages\Microsoft.Portable.FSharp.Core.4.1.20\lib\profiles\net40\FSharp.Core.dll + ..\..\..\packages\Microsoft.Portable.FSharp.Core.10.1.0\lib\profiles\net40\FSharp.Core.dll false @@ -47,7 +47,7 @@ - + diff --git a/tests/service/data/TestProject/TestProject.fsproj b/tests/service/data/TestProject/TestProject.fsproj index dde260ce99f..b58304907f3 100644 --- a/tests/service/data/TestProject/TestProject.fsproj +++ b/tests/service/data/TestProject/TestProject.fsproj @@ -35,7 +35,7 @@ - ..\..\..\..\packages\Microsoft.Portable.FSharp.Core.4.1.20\lib\profiles\net40\FSharp.Core.dll + ..\..\..\..\packages\Microsoft.Portable.FSharp.Core.10.1.0\lib\profiles\net40\FSharp.Core.dll false @@ -56,7 +56,7 @@ True - + diff --git a/tests/service/data/TestTP/TestTP.fsproj b/tests/service/data/TestTP/TestTP.fsproj index 5f7d7c0543d..2e0ac9aa194 100644 --- a/tests/service/data/TestTP/TestTP.fsproj +++ b/tests/service/data/TestTP/TestTP.fsproj @@ -47,7 +47,7 @@ - ..\..\..\..\packages\Microsoft.Portable.FSharp.Core.4.1.20\lib\profiles\net40\FSharp.Core.dll + ..\..\..\..\packages\Microsoft.Portable.FSharp.Core.10.1.0\lib\profiles\net40\FSharp.Core.dll false diff --git a/tests/service/data/ToolsVersion12.fsproj b/tests/service/data/ToolsVersion12.fsproj index 92bad59c135..e56a9961808 100644 --- a/tests/service/data/ToolsVersion12.fsproj +++ b/tests/service/data/ToolsVersion12.fsproj @@ -43,7 +43,7 @@ 11 - + diff --git a/tests/service/data/TypeProviderConsole/TypeProviderConsole.fsproj b/tests/service/data/TypeProviderConsole/TypeProviderConsole.fsproj index 6b50e360a01..144efa90d7d 100644 --- a/tests/service/data/TypeProviderConsole/TypeProviderConsole.fsproj +++ b/tests/service/data/TypeProviderConsole/TypeProviderConsole.fsproj @@ -39,7 +39,7 @@ - ..\..\..\..\packages\Microsoft.Portable.FSharp.Core.4.1.20\lib\profiles\net40\FSharp.Core.dll + ..\..\..\..\packages\Microsoft.Portable.FSharp.Core.10.1.0\lib\profiles\net40\FSharp.Core.dll false @@ -56,7 +56,7 @@ True - + diff --git a/tests/service/data/TypeProviderLibrary/TypeProviderLibrary.fsproj b/tests/service/data/TypeProviderLibrary/TypeProviderLibrary.fsproj index baa89f49b39..f7125ac2d2b 100644 --- a/tests/service/data/TypeProviderLibrary/TypeProviderLibrary.fsproj +++ b/tests/service/data/TypeProviderLibrary/TypeProviderLibrary.fsproj @@ -37,12 +37,12 @@ - ..\..\..\..\packages\Microsoft.Portable.FSharp.Core.4.1.20\lib\profiles\net40\FSharp.Core.dll + ..\..\..\..\packages\Microsoft.Portable.FSharp.Core.10.1.0\lib\profiles\net40\FSharp.Core.dll false - + \ No newline at end of file diff --git a/tests/service/data/TypeProvidersBug/TestConsole/TestConsole.fsproj b/tests/service/data/TypeProvidersBug/TestConsole/TestConsole.fsproj index 54448fef5c3..572852c0243 100644 --- a/tests/service/data/TypeProvidersBug/TestConsole/TestConsole.fsproj +++ b/tests/service/data/TypeProvidersBug/TestConsole/TestConsole.fsproj @@ -47,7 +47,7 @@ - ..\..\..\..\..\packages\Microsoft.Portable.FSharp.Core.4.1.20\lib\profiles\net40\FSharp.Core.dll + ..\..\..\..\..\packages\Microsoft.Portable.FSharp.Core.10.1.0\lib\profiles\net40\FSharp.Core.dll false @@ -60,5 +60,5 @@ True - + \ No newline at end of file diff --git a/tests/service/data/TypeProvidersBug/TypeProvidersBug/TypeProvidersBug.fsproj b/tests/service/data/TypeProvidersBug/TypeProvidersBug/TypeProvidersBug.fsproj index 00ef54f6521..1ee42f8d19c 100644 --- a/tests/service/data/TypeProvidersBug/TypeProvidersBug/TypeProvidersBug.fsproj +++ b/tests/service/data/TypeProvidersBug/TypeProvidersBug/TypeProvidersBug.fsproj @@ -42,7 +42,7 @@ - ..\..\..\..\..\packages\Microsoft.Portable.FSharp.Core.4.1.20\lib\profiles\net40\FSharp.Core.dll + ..\..\..\..\..\packages\Microsoft.Portable.FSharp.Core.10.1.0\lib\profiles\net40\FSharp.Core.dll false @@ -50,5 +50,5 @@ True - + \ No newline at end of file diff --git a/tests/service/data/TypeProvidersBug/TypeProvidersBug/bin/Debug/TypeProvidersBug.dll b/tests/service/data/TypeProvidersBug/TypeProvidersBug/bin/Debug/TypeProvidersBug.dll index 8e73750a869..1ef8b4ae875 100644 Binary files a/tests/service/data/TypeProvidersBug/TypeProvidersBug/bin/Debug/TypeProvidersBug.dll and b/tests/service/data/TypeProvidersBug/TypeProvidersBug/bin/Debug/TypeProvidersBug.dll differ diff --git a/tests/service/data/samename/tempet.fsproj b/tests/service/data/samename/tempet.fsproj index 8e647890c81..682a3ec1a30 100644 --- a/tests/service/data/samename/tempet.fsproj +++ b/tests/service/data/samename/tempet.fsproj @@ -1,4 +1,4 @@ - + netstandard1.6 @@ -6,8 +6,4 @@ - - - - \ No newline at end of file diff --git a/tests/service/data/sqlite-net-spike/sqlite-net-spike.fsproj b/tests/service/data/sqlite-net-spike/sqlite-net-spike.fsproj index 93cc75f0024..1b843e45318 100644 --- a/tests/service/data/sqlite-net-spike/sqlite-net-spike.fsproj +++ b/tests/service/data/sqlite-net-spike/sqlite-net-spike.fsproj @@ -37,7 +37,7 @@ - ..\..\..\..\packages\Microsoft.Portable.FSharp.Core.4.1.20\lib\profiles\net40\FSharp.Core.dll + ..\..\..\..\packages\Microsoft.Portable.FSharp.Core.10.1.0\lib\profiles\net40\FSharp.Core.dll false @@ -47,7 +47,7 @@ - + diff --git a/verify-translations.cmd b/verify-translations.cmd new file mode 100644 index 00000000000..6717de0f778 --- /dev/null +++ b/verify-translations.cmd @@ -0,0 +1,3 @@ +@echo off + +%~dp0release\net40\bin\fsi.exe %~dp0src\scripts\VerifyAllTranslations.fsx -- %~dp0 diff --git a/vsintegration/Directory.Build.props b/vsintegration/Directory.Build.props new file mode 100644 index 00000000000..5a7b0782ce1 --- /dev/null +++ b/vsintegration/Directory.Build.props @@ -0,0 +1,11 @@ + + + + + + net46 + v4.6 + true + + + diff --git a/vsintegration/Directory.Build.targets b/vsintegration/Directory.Build.targets new file mode 100644 index 00000000000..8e55b927f97 --- /dev/null +++ b/vsintegration/Directory.Build.targets @@ -0,0 +1,40 @@ + + + + + + + net462 + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vsintegration/DisableVsixManifestTargets.targets b/vsintegration/DisableVsixManifestTargets.targets new file mode 100644 index 00000000000..86c5ada70cb --- /dev/null +++ b/vsintegration/DisableVsixManifestTargets.targets @@ -0,0 +1,4 @@ + + + + diff --git a/vsintegration/ItemTemplates/AppConfig/AppConfig.csproj b/vsintegration/ItemTemplates/AppConfig/AppConfig.csproj index 0a53562afc4..48500b15a86 100644 --- a/vsintegration/ItemTemplates/AppConfig/AppConfig.csproj +++ b/vsintegration/ItemTemplates/AppConfig/AppConfig.csproj @@ -1,48 +1,18 @@  - + + - $(MSBuildProjectDirectory)\..\..\..\src AppConfig - ItemTemplates - true - true - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - false - false - false - false - false - false - false - false - false - false - - Debug - net40 - $(FSharpSourcesRoot)\..\$(Configuration)\$(TargetDotnetProfile)\bin\$(TemplateCategory)\$(AssemblyName) - - - - - + - - - - - - - - - - \ No newline at end of file + + diff --git a/vsintegration/ItemTemplates/CodeFile/CodeFile.csproj b/vsintegration/ItemTemplates/CodeFile/CodeFile.csproj index 8f726c6d9a3..cf6a5e3e4f6 100644 --- a/vsintegration/ItemTemplates/CodeFile/CodeFile.csproj +++ b/vsintegration/ItemTemplates/CodeFile/CodeFile.csproj @@ -1,48 +1,18 @@  - + + - $(MSBuildProjectDirectory)\..\..\..\src CodeFile - ItemTemplates - true - true - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - false - false - false - false - false - false - false - false - false - false - - Debug - net40 - $(FSharpSourcesRoot)\..\$(Configuration)\$(TargetDotnetProfile)\bin\$(TemplateCategory)\$(AssemblyName) - - - - - + - - - - - - - - - - \ No newline at end of file + + diff --git a/vsintegration/ItemTemplates/Directory.Build.props b/vsintegration/ItemTemplates/Directory.Build.props new file mode 100644 index 00000000000..ef2e2875099 --- /dev/null +++ b/vsintegration/ItemTemplates/Directory.Build.props @@ -0,0 +1,9 @@ + + + + ItemTemplates + + + + + diff --git a/vsintegration/ItemTemplates/Directory.Build.targets b/vsintegration/ItemTemplates/Directory.Build.targets new file mode 100644 index 00000000000..6dd437b28fb --- /dev/null +++ b/vsintegration/ItemTemplates/Directory.Build.targets @@ -0,0 +1,3 @@ + + + diff --git a/vsintegration/ItemTemplates/ResourceFile/ResourceFile.csproj b/vsintegration/ItemTemplates/ResourceFile/ResourceFile.csproj index 61287d631d9..17760a303bf 100644 --- a/vsintegration/ItemTemplates/ResourceFile/ResourceFile.csproj +++ b/vsintegration/ItemTemplates/ResourceFile/ResourceFile.csproj @@ -1,49 +1,18 @@  - + + - $(MSBuildProjectDirectory)\..\..\..\src ResourceFile - ItemTemplates - true - true - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - false - false - false - false - false - false - false - false - false - false - {0385564F-07B4-4264-AB8A-17C393E9140C} - - Debug - net40 - $(FSharpSourcesRoot)\..\$(Configuration)\$(TargetDotnetProfile)\bin\$(TemplateCategory)\$(AssemblyName) - - - - - + - - - - - - - - - - \ No newline at end of file + + diff --git a/vsintegration/ItemTemplates/ScriptFile/ScriptFile.csproj b/vsintegration/ItemTemplates/ScriptFile/ScriptFile.csproj index 583e0c3e236..d8affe83605 100644 --- a/vsintegration/ItemTemplates/ScriptFile/ScriptFile.csproj +++ b/vsintegration/ItemTemplates/ScriptFile/ScriptFile.csproj @@ -1,47 +1,18 @@  - + + - $(MSBuildProjectDirectory)\..\..\..\src ScriptFile - ItemTemplates - true - true - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - false - false - false - false - false - false - false - false - false - false - - - Debug - net40 - $(FSharpSourcesRoot)\..\$(Configuration)\$(TargetDotnetProfile)\bin\$(TemplateCategory)\$(AssemblyName) - - - + - - - - - - - - - - \ No newline at end of file + + diff --git a/vsintegration/ItemTemplates/SignatureFile/SignatureFile.csproj b/vsintegration/ItemTemplates/SignatureFile/SignatureFile.csproj index 0bc28446b53..89a34c354b7 100644 --- a/vsintegration/ItemTemplates/SignatureFile/SignatureFile.csproj +++ b/vsintegration/ItemTemplates/SignatureFile/SignatureFile.csproj @@ -1,48 +1,18 @@  - + + - $(MSBuildProjectDirectory)\..\..\..\src SignatureFile - ItemTemplates - true - true - false - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - false - false - false - false - false - false - false - false - false - - Debug - net40 - $(FSharpSourcesRoot)\..\$(Configuration)\$(TargetDotnetProfile)\bin\$(TemplateCategory)\$(AssemblyName) - - - - - + - - - - - - - - - - \ No newline at end of file + + diff --git a/vsintegration/ItemTemplates/TextFile/TextFile.csproj b/vsintegration/ItemTemplates/TextFile/TextFile.csproj index d8d84130c75..880085abaaa 100644 --- a/vsintegration/ItemTemplates/TextFile/TextFile.csproj +++ b/vsintegration/ItemTemplates/TextFile/TextFile.csproj @@ -1,48 +1,18 @@  - - - $(MSBuildProjectDirectory)\..\..\..\src - TextFile - ItemTemplates - true - true - false - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - false - false - false - false - false - false - false - false - false - + - Debug - net40 - $(FSharpSourcesRoot)\..\$(Configuration)\$(TargetDotnetProfile)\bin\$(TemplateCategory)\$(AssemblyName) + TextFile - - - + - - - - - - - - - - \ No newline at end of file + + diff --git a/vsintegration/ItemTemplates/XMLFile/XMLFile.csproj b/vsintegration/ItemTemplates/XMLFile/XMLFile.csproj index 1f4178befcd..bef2612dc20 100644 --- a/vsintegration/ItemTemplates/XMLFile/XMLFile.csproj +++ b/vsintegration/ItemTemplates/XMLFile/XMLFile.csproj @@ -1,47 +1,18 @@  - + + - $(MSBuildProjectDirectory)\..\..\..\src XMLFile - ItemTemplates - true - true - false - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - false - false - false - false - false - false - false - false - false - - - Debug - net40 - $(FSharpSourcesRoot)\..\$(Configuration)\$(TargetDotnetProfile)\bin\$(TemplateCategory)\$(AssemblyName) - - - + - - - - - - - - - - \ No newline at end of file + + diff --git a/vsintegration/ProjectTemplates/ConsoleProject/ConsoleProject.csproj b/vsintegration/ProjectTemplates/ConsoleProject/ConsoleProject.csproj index d81f0afe1d6..82e55b95ec9 100644 --- a/vsintegration/ProjectTemplates/ConsoleProject/ConsoleProject.csproj +++ b/vsintegration/ProjectTemplates/ConsoleProject/ConsoleProject.csproj @@ -1,68 +1,18 @@  - - - $(MSBuildProjectDirectory)\..\..\..\src - ConsoleProject - ProjectTemplates - true - true - false - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - false - false - false - false - false - false - false - false - false - {604F0DAA-2D33-48DD-B162-EDF0B672803D} - + - Debug - net40 - $(FSharpSourcesRoot)\..\$(Configuration)\$(TargetDotnetProfile)\bin\$(TemplateCategory)\$(AssemblyName) + ConsoleProject - - - - - $(FSharpSourcesRoot)\..\loc\lcl\{Lang}\$(TemplateCategory)\$(AssemblyName)\AssemblyInfo.fs.lcl - $(FSharpSourcesRoot)\..\loc\lci\$(TemplateCategory)\$(AssemblyName)\AssemblyInfo.fs.lci - false - false - - - $(FSharpSourcesRoot)\..\loc\lcl\{Lang}\$(TemplateCategory)\$(AssemblyName)\Program.fs.lcl - $(FSharpSourcesRoot)\..\loc\lci\$(TemplateCategory)\$(AssemblyName)\Program.fs.lci - false - false - - - - + + + Template\AssemblyInfo.fs; + Template\Program.fs; + + - - - - - - - - - - - - - - - - - - \ No newline at end of file + diff --git a/vsintegration/ProjectTemplates/ConsoleProject/Template/AssemblyInfo.fs b/vsintegration/ProjectTemplates/ConsoleProject/Template/AssemblyInfo.fs index 88f285659f4..ae735840e65 100644 --- a/vsintegration/ProjectTemplates/ConsoleProject/Template/AssemblyInfo.fs +++ b/vsintegration/ProjectTemplates/ConsoleProject/Template/AssemblyInfo.fs @@ -4,9 +4,9 @@ open System.Reflection open System.Runtime.CompilerServices open System.Runtime.InteropServices -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. +// @@@GeneralInfo-Line1|General Information about an assembly is controlled through the following@@@ +// @@@GeneralInfo-Line2|set of attributes. Change these attribute values to modify the information@@@ +// @@@GeneralInfo-Line3|associated with an assembly.@@@ [] [] [] @@ -16,23 +16,23 @@ open System.Runtime.InteropServices [] [] -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. +// @@@ComVisible-Line1|Setting ComVisible to false makes the types in this assembly not visible@@@ +// @@@ComVisible-Line2|to COM components. If you need to access a type in this assembly from@@@ +// @@@ComVisible-Line3|COM, set the ComVisible attribute to true on that type.@@@ [] -// The following GUID is for the ID of the typelib if this project is exposed to COM +// @@@Guid-Line1|The following GUID is for the ID of the typelib if this project is exposed to COM@@@ [] -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: +// @@@VersionInfo-Line1|Version information for an assembly consists of the following four values:@@@ +// +// @@@MajorVersion|Major Version@@@ +// @@@MinorVersion|Minor Version@@@ +// @@@BuildNumber|Build Number@@@ +// @@@Revision|Revision@@@ +// +// @@@VersionInfo-Line2|You can specify all the values or you can default the Build and Revision Numbers@@@ +// @@@VersionInfo-Line3|by using the '*' as shown below:@@@ // [] [] [] diff --git a/vsintegration/ProjectTemplates/ConsoleProject/Template/ConsoleApplication.fsproj b/vsintegration/ProjectTemplates/ConsoleProject/Template/ConsoleApplication.fsproj index eaa135412c1..2a102babc81 100644 --- a/vsintegration/ProjectTemplates/ConsoleProject/Template/ConsoleApplication.fsproj +++ b/vsintegration/ProjectTemplates/ConsoleProject/Template/ConsoleApplication.fsproj @@ -12,11 +12,7 @@ v$targetframeworkversion$ true true - $if$ ($targetframeworkversion$ >= 4.0) - 4.4.1.0 - $else$ - 2.3.0.0 - $endif$ + 3239;$(WarningsAsErrors) true @@ -43,22 +39,17 @@ + + + - FSharp.Core - FSharp.Core.dll - $(MSBuildProgramFiles32)\Reference Assemblies\Microsoft\FSharp\.NETFramework\v4.0\$(TargetFSharpCoreVersion)\FSharp.Core.dll + ..\packages\FSharp.Core.4.5.2\lib\net45\FSharp.Core.dll + True - ..\packages\System.ValueTuple.4.3.1\lib\netstandard1.0\System.ValueTuple.dll + ..\packages\System.ValueTuple.4.4.0\lib\netstandard1.0\System.ValueTuple.dll True - - $if$ ($targetframeworkversion$ >= 3.5) - - $endif$ - $if$ ($targetframeworkversion$ > 3.5) - - $endif$ @@ -68,18 +59,9 @@ 11 - - - - $(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets - - - - - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets - - - + + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets + - - - $(MSBuildProjectDirectory)\..\..\..\src - LibraryProject - ProjectTemplates - true - true - false - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - false - false - false - false - false - false - false - false - false - {01678CDA-A11F-4DEE-9344-2EDF91CF1AE7} - + - Debug - net40 - $(FSharpSourcesRoot)\..\$(Configuration)\$(TargetDotnetProfile)\bin\$(TemplateCategory)\$(AssemblyName) + LibraryProject - - - - $(FSharpSourcesRoot)\..\loc\lcl\{Lang}\$(TemplateCategory)\$(AssemblyName)\AssemblyInfo.fs.lcl - $(FSharpSourcesRoot)\..\loc\lci\$(TemplateCategory)\$(AssemblyName)\AssemblyInfo.fs.lci - false - false - - - $(FSharpSourcesRoot)\..\loc\lcl\{Lang}\$(TemplateCategory)\$(AssemblyName)\Script.fsx.lcl - $(FSharpSourcesRoot)\..\loc\lci\$(TemplateCategory)\$(AssemblyName)\Script.fsx.lci - false - false - + + + Template\AssemblyInfo.fs; + Template\Script.fsx; + + - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + diff --git a/vsintegration/ProjectTemplates/LibraryProject/Template/AssemblyInfo.fs b/vsintegration/ProjectTemplates/LibraryProject/Template/AssemblyInfo.fs index 88f285659f4..ae735840e65 100644 --- a/vsintegration/ProjectTemplates/LibraryProject/Template/AssemblyInfo.fs +++ b/vsintegration/ProjectTemplates/LibraryProject/Template/AssemblyInfo.fs @@ -4,9 +4,9 @@ open System.Reflection open System.Runtime.CompilerServices open System.Runtime.InteropServices -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. +// @@@GeneralInfo-Line1|General Information about an assembly is controlled through the following@@@ +// @@@GeneralInfo-Line2|set of attributes. Change these attribute values to modify the information@@@ +// @@@GeneralInfo-Line3|associated with an assembly.@@@ [] [] [] @@ -16,23 +16,23 @@ open System.Runtime.InteropServices [] [] -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. +// @@@ComVisible-Line1|Setting ComVisible to false makes the types in this assembly not visible@@@ +// @@@ComVisible-Line2|to COM components. If you need to access a type in this assembly from@@@ +// @@@ComVisible-Line3|COM, set the ComVisible attribute to true on that type.@@@ [] -// The following GUID is for the ID of the typelib if this project is exposed to COM +// @@@Guid-Line1|The following GUID is for the ID of the typelib if this project is exposed to COM@@@ [] -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: +// @@@VersionInfo-Line1|Version information for an assembly consists of the following four values:@@@ +// +// @@@MajorVersion|Major Version@@@ +// @@@MinorVersion|Minor Version@@@ +// @@@BuildNumber|Build Number@@@ +// @@@Revision|Revision@@@ +// +// @@@VersionInfo-Line2|You can specify all the values or you can default the Build and Revision Numbers@@@ +// @@@VersionInfo-Line3|by using the '*' as shown below:@@@ // [] [] [] diff --git a/vsintegration/ProjectTemplates/LibraryProject/Template/Library.fsproj b/vsintegration/ProjectTemplates/LibraryProject/Template/Library.fsproj index 8e23b34437e..e8601a827d6 100644 --- a/vsintegration/ProjectTemplates/LibraryProject/Template/Library.fsproj +++ b/vsintegration/ProjectTemplates/LibraryProject/Template/Library.fsproj @@ -11,12 +11,8 @@ $safeprojectname$ true v$targetframeworkversion$ - $if$ ($targetframeworkversion$ >= 4.0) - 4.4.1.0 - $else$ - 2.3.0.0 - $endif$ true + 3239;$(WarningsAsErrors) true @@ -39,22 +35,17 @@ + + + - FSharp.Core - FSharp.Core.dll - $(MSBuildProgramFiles32)\Reference Assemblies\Microsoft\FSharp\.NETFramework\v4.0\$(TargetFSharpCoreVersion)\FSharp.Core.dll + ..\packages\FSharp.Core.4.5.2\lib\net45\FSharp.Core.dll + True - ..\packages\System.ValueTuple.4.3.1\lib\netstandard1.0\System.ValueTuple.dll + ..\packages\System.ValueTuple.4.4.0\lib\netstandard1.0\System.ValueTuple.dll True - - $if$ ($targetframeworkversion$ >= 3.5) - - $endif$ - $if$ ($targetframeworkversion$ > 3.5) - - $endif$ @@ -64,18 +55,9 @@ 11 - - - - $(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets - - - - - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets - - - + + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets + 'Extensions and Updates' --> `Online` and search +// @@@ToInstall-Line1|To install the Visual F# Power Tools, use@@@ +// @@@ToInstall-Line2|'Tools' --> 'Extensions and Updates' --> `Online` and search@@@ // -// For additional templates to use with F#, see the 'Online Templates' in Visual Studio, -// 'New Project' --> 'Online Templates' +// @@@AdditionalTemplates-Line1|For additional templates to use with F#, see the 'Online Templates' in Visual Studio,@@@ +// @@@AdditionalTemplates-Line2|'New Project' --> 'Online Templates'@@@ -// F# supports three kinds of comments: +// @@@SupportsComments|F# supports three kinds of comments:@@@ -// 1. Double-slash comments. These are used in most situations. -(* 2. ML-style Block comments. These aren't used that often. *) -/// 3. Triple-slash comments. These are used for documenting functions, types, and so on. -/// They will appear as text when you hover over something which is decorated with these comments. +// @@@DoubleSlash|1. Double-slash comments. These are used in most situations.@@@ +(* @@@MLStyle|2. ML-style Block comments. These aren't used that often.@@@ *) +/// @@@TripleSlash-Line1|3. Triple-slash comments. These are used for documenting functions, types, and so on.@@@ +/// @@@TripleSlash-Line2|They will appear as text when you hover over something which is decorated with these comments.@@@ /// -/// They also support .NET-style XML comments, which allow you to generate reference documentation, -/// and they also allow editors (such as Visual Studio) to extract information from them. -/// To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/xml-documentation +/// @@@XmlComments-Line1|They also support .NET-style XML comments, which allow you to generate reference documentation,@@@ +/// @@@XmlComments-Line2|and they also allow editors (such as Visual Studio) to extract information from them.@@@ +/// @@@XmlComments-Line3|To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/xml-documentation@@@ -// Open namespaces using the 'open' keyword. +// @@@OpenNamespaces|Open namespaces using the 'open' keyword.@@@ // -// To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/import-declarations-the-open-keyword +// @@@LearnMore|To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/import-declarations-the-open-keyword@@@ open System -/// A module is a grouping of F# code, such as values, types, and function values. -/// Grouping code in modules helps keep related code together and helps avoid name conflicts in your program. +/// @@@Module-Line1|A module is a grouping of F# code, such as values, types, and function values.@@@ +/// @@@Module-Line2|Grouping code in modules helps keep related code together and helps avoid name conflicts in your program.@@@ /// -/// To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/modules +/// @@@Module-Line3|To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/modules@@@ module IntegersAndNumbers = - /// This is a sample integer. + /// @@@SampleInt|This is a sample integer.@@@ let sampleInteger = 176 - /// This is a sample floating point number. + /// @@@SampleFloat|This is a sample floating point number.@@@ let sampleDouble = 4.1 - /// This computed a new number by some arithmetic. Numeric types are converted using - /// functions 'int', 'double' and so on. + /// @@@Computed-Line1|This computed a new number by some arithmetic. Numeric types are converted using@@@ + /// @@@Computed-Line2|functions 'int', 'double' and so on.@@@ let sampleInteger2 = (sampleInteger/4 + 5 - 7) * 4 + int sampleDouble - /// This is a list of the numbers from 0 to 99. + /// @@@ListNumbers|This is a list of the numbers from 0 to 99.@@@ let sampleNumbers = [ 0 .. 99 ] - /// This is a list of all tuples containing all the numbers from 0 to 99 and their squares. + /// @@@ListSquares|This is a list of all tuples containing all the numbers from 0 to 99 and their squares.@@@ let sampleTableOfSquares = [ for i in 0 .. 99 -> (i, i*i) ] - // The next line prints a list that includes tuples, using '%A' for generic printing. + // @@@PrintList1|The next line prints a list that includes tuples, using '%A' for generic printing.@@@ printfn "The table of squares from 0 to 99 is:\n%A" sampleTableOfSquares - // This is a sample integer with a type annotation + // @@@SampleIntType|This is a sample integer with a type annotation@@@ let sampleInteger3: int = 1 -/// Values in F# are immutable by default. They cannot be changed -/// in the course of a program's execution unless explicitly marked as mutable. +/// @@@ValuesImmutable-Line1|Values in F# are immutable by default. They cannot be changed@@@ +/// @@@ValuesImmutable-Line2|in the course of a program's execution unless explicitly marked as mutable.@@@ /// -/// To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/values/index#why-immutable +/// @@@ValuesImmutable-Line3|To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/values/index#why-immutable@@@ module Immutability = - /// Binding a value to a name via 'let' makes it immutable. + /// @@@LetKeyword-Line1|Binding a value to a name via 'let' makes it immutable.@@@ /// - /// The second line of code fails to compile because 'number' is immutable and bound. - /// Re-defining 'number' to be a different value is not allowed in F#. + /// @@@LetKeyword-Line2|The second line of code fails to compile because 'number' is immutable and bound.@@@ + /// @@@LetKeyword-Line3|Re-defining 'number' to be a different value is not allowed in F#.@@@ let number = 2 // let number = 3 - /// A mutable binding. This is required to be able to mutate the value of 'otherNumber'. + /// @@@MutableKeyword|A mutable binding. This is required to be able to mutate the value of 'otherNumber'.@@@ let mutable otherNumber = 2 printfn "'otherNumber' is %d" otherNumber - // When mutating a value, use '<-' to assign a new value. + // @@@MutableAssignment-Line1|When mutating a value, use '<-' to assign a new value.@@@ // - // You could not use '=' here for this purpose since it is used for equality - // or other contexts such as 'let' or 'module' + // @@@MutableAssignment-Line2|You could not use '=' here for this purpose since it is used for equality@@@ + // @@@MutableAssignment-Line3|or other contexts such as 'let' or 'module'@@@ otherNumber <- otherNumber + 1 printfn "'otherNumber' changed to be %d" otherNumber -/// Much of F# programming consists of defining functions that transform input data to produce -/// useful results. +/// @@@FunctionsModule-Line1|Much of F# programming consists of defining functions that transform input data to produce@@@ +/// @@@FunctionsModule-Line2|useful results.@@@ /// -/// To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/ +/// @@@FunctionsModule-Line3|To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/@@@ module BasicFunctions = - /// You use 'let' to define a function. This one accepts an integer argument and returns an integer. - /// Parentheses are optional for function arguments, except for when you use an explicit type annotation. + /// @@@LetFunction-Line1|You use 'let' to define a function. This one accepts an integer argument and returns an integer.@@@ + /// @@@LetFunction-Line2|Parentheses are optional for function arguments, except for when you use an explicit type annotation.@@@ let sampleFunction1 x = x*x + 3 - /// Apply the function, naming the function return result using 'let'. - /// The variable type is inferred from the function return type. + /// @@@ApplyFunction-Line1|Apply the function, naming the function return result using 'let'.@@@ + /// @@@ApplyFunction-Line2|The variable type is inferred from the function return type.@@@ let result1 = sampleFunction1 4573 - // This line uses '%d' to print the result as an integer. This is type-safe. - // If 'result1' were not of type 'int', then the line would fail to compile. + // @@@printf-Line1|This line uses '%d' to print the result as an integer. This is type-safe.@@@ + // @@@printf-Line2|If 'result1' were not of type 'int', then the line would fail to compile.@@@ printfn "The result of squaring the integer 4573 and adding 3 is %d" result1 - /// When needed, annotate the type of a parameter name using '(argument:type)'. Parentheses are required. + /// @@@TypeAnnotation|When needed, annotate the type of a parameter name using '(argument:type)'. Parentheses are required.@@@ let sampleFunction2 (x:int) = 2*x*x - x/5 + 3 let result2 = sampleFunction2 (7 + 4) printfn "The result of applying the 2nd sample function to (7 + 4) is %d" result2 - /// Conditionals use if/then/elid/elif/else. + /// @@@Conditionals-Line1|Conditionals use if/then/elid/elif/else.@@@ /// - /// Note that F# uses whitespace indentation-aware syntax, similar to languages like Python. + /// @@@Conditionals-Line2|Note that F# uses whitespace indentation-aware syntax, similar to languages like Python.@@@ let sampleFunction3 x = if x < 100.0 then 2.0*x*x - x/5.0 + 3.0 @@ -133,122 +133,122 @@ module BasicFunctions = let result3 = sampleFunction3 (6.5 + 4.5) - // This line uses '%f' to print the result as a float. As with '%d' above, this is type-safe. + // @@@printf-Line3|This line uses '%f' to print the result as a float. As with '%d' above, this is type-safe.@@@ printfn "The result of applying the 3rd sample function to (6.5 + 4.5) is %f" result3 -/// Booleans are fundamental data types in F#. Here are some examples of Booleans and conditional logic. +/// @@@Booleans-Line1|Booleans are fundamental data types in F#. Here are some examples of Booleans and conditional logic.@@@ /// -/// To learn more, see: +/// @@@Booleans-Line2|To learn more, see:@@@ /// https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/primitive-types -/// and +/// @@@Booleans-Line3|and@@@ /// https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/symbol-and-operator-reference/boolean-operators module Booleans = - /// Booleans values are 'true' and 'false'. + /// @@@BooleanValues|Booleans values are 'true' and 'false'.@@@ let boolean1 = true let boolean2 = false - /// Operators on booleans are 'not', '&&' and '||'. + /// @@@BooleanOperators|Operators on booleans are 'not', '&&' and '||'.@@@ let boolean3 = not boolean1 && (boolean2 || false) - // This line uses '%b'to print a boolean value. This is type-safe. + // @@@BooleanPrintf|This line uses '%b'to print a boolean value. This is type-safe.@@@ printfn "The expression 'not boolean1 && (boolean2 || false)' is %b" boolean3 -/// Strings are fundamental data types in F#. Here are some examples of Strings and basic String manipulation. +/// @@@Strings-Line1|Strings are fundamental data types in F#. Here are some examples of Strings and basic String manipulation.@@@ /// -/// To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/strings +/// @@@Strings-Line2|To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/strings@@@ module StringManipulation = - /// Strings use double quotes. + /// @@@StringQuotes|Strings use double quotes.@@@ let string1 = "Hello" let string2 = "world" - /// Strings can also use @ to create a verbatim string literal. - /// This will ignore escape characters such as '\', '\n', '\t', etc. + /// @@@StringLiterals-Line1|Strings can also use @ to create a verbatim string literal.@@@ + /// @@@StringLiterals-Line2|This will ignore escape characters such as '\', '\n', '\t', etc.@@@ let string3 = @"C:\Program Files\" - /// String literals can also use triple-quotes. + /// @@@StringTripleQuotes|String literals can also use triple-quotes.@@@ let string4 = """The computer said "hello world" when I told it to!""" - /// String concatenation is normally done with the '+' operator. + /// @@@StringConcatenation|String concatenation is normally done with the '+' operator.@@@ let helloWorld = string1 + " " + string2 - // This line uses '%s' to print a string value. This is type-safe. + // @@@StringPrinting|This line uses '%s' to print a string value. This is type-safe.@@@ printfn "%s" helloWorld - /// Substrings use the indexer notation. This line extracts the first 7 characters as a substring. - /// Note that like many languages, Strings are zero-indexed in F#. + /// @@@Substrings-Line1|Substrings use the indexer notation. This line extracts the first 7 characters as a substring.@@@ + /// @@@Substrings-Line2|Note that like many languages, Strings are zero-indexed in F#.@@@ let substring = helloWorld.[0..6] printfn "%s" substring -/// Tuples are simple combinations of data values into a combined value. +/// @@@Tuples-Line1|Tuples are simple combinations of data values into a combined value.@@@ /// -/// To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/tuples +/// @@@Tuples-Line2|To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/tuples@@@ module Tuples = - /// A simple tuple of integers. + /// @@@TupleInteger|A simple tuple of integers.@@@ let tuple1 = (1, 2, 3) - /// A function that swaps the order of two values in a tuple. + /// @@@TupleFunction-Line1|A function that swaps the order of two values in a tuple.@@@ /// - /// F# Type Inference will automatically generalize the function to have a generic type, - /// meaning that it will work with any type. + /// @@@TupleFunction-Line2|F# Type Inference will automatically generalize the function to have a generic type,@@@ + /// @@@TupleFunction-Line3|meaning that it will work with any type.@@@ let swapElems (a, b) = (b, a) printfn "The result of swapping (1, 2) is %A" (swapElems (1,2)) - /// A tuple consisting of an integer, a string, - /// and a double-precision floating point number. + /// @@@TupleMultiType-Line1|A tuple consisting of an integer, a string,@@@ + /// @@@TupleMultiType-Line2|and a double-precision floating point number.@@@ let tuple2 = (1, "fred", 3.1415) printfn "tuple1: %A\ttuple2: %A" tuple1 tuple2 - /// A simple tuple of integers with a type annotation. - /// Type annotations for tuples use the * symbol to separate elements + /// @@@TupleTypeAnnotation-Line1|A simple tuple of integers with a type annotation.@@@ + /// @@@TupleTypeAnnotation-Line2|Type annotations for tuples use the * symbol to separate elements@@@ let tuple3: int * int = (5, 9) - /// Tuples are normally objects, but they can also be represented as structs. + /// @@@StructTuple-Line1|Tuples are normally objects, but they can also be represented as structs.@@@ /// - /// These interoperate completely with structs in C# and Visual Basic.NET; however, - /// struct tuples are not implicitly convertable with object tuples (often called reference tuples). + /// @@@StructTuple-Line2|These interoperate completely with structs in C# and Visual Basic.NET; however,@@@ + /// @@@StructTuple-Line3|struct tuples are not implicitly convertable with object tuples (often called reference tuples).@@@ /// - /// The second line below will fail to compile because of this. Uncomment it to see what happens. + /// @@@StructTuple-Line4|The second line below will fail to compile because of this. Uncomment it to see what happens.@@@ let sampleStructTuple = struct (1, 2) //let thisWillNotCompile: (int*int) = struct (1, 2) - // Although you cannot implicitly convert between struct tuples and reference tuples, - // you can explicitly convert via pattern matching, as demonstrated below. + // @@@TupleConvert-Line1|Although you cannot implicitly convert between struct tuples and reference tuples,@@@ + // @@@TupleConvert-Line2|you can explicitly convert via pattern matching, as demonstrated below.@@@ let convertFromStructTuple (struct(a, b)) = (a, b) let convertToStructTuple (a, b) = struct(a, b) printfn "Struct Tuple: %A\nReference tuple made from the Struct Tuple: %A" sampleStructTuple (sampleStructTuple |> convertFromStructTuple) -/// The F# pipe operators ('|>', '<|', etc.) and F# composition operators ('>>', '<<') -/// are used extensively when processing data. These operators are themselves functions -/// which make use of Partial Application. +/// @@@Pipes-Line1|The F# pipe operators ('|>', '<|', etc.) and F# composition operators ('>>', '<<')@@@ +/// @@@Pipes-Line2|are used extensively when processing data. These operators are themselves functions@@@ +/// @@@Pipes-Line3|which make use of Partial Application.@@@ /// -/// To learn more about these operators, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/#function-composition-and-pipelining -/// To learn more about Partial Application, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/#partial-application-of-arguments +/// @@@Pipes-Line4|To learn more about these operators, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/#function-composition-and-pipelining@@@ +/// @@@Pipes-Line5|To learn more about Partial Application, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/#partial-application-of-arguments@@@ module PipelinesAndComposition = - /// Squares a value. + /// @@@Squares|Squares a value.@@@ let square x = x * x - /// Adds 1 to a value. + /// @@@AddOne|Adds 1 to a value.@@@ let addOne x = x + 1 - /// Tests if an integer value is odd via modulo. + /// @@@TestOdd|Tests if an integer value is odd via modulo.@@@ let isOdd x = x % 2 <> 0 - /// A list of 5 numbers. More on lists later. + /// @@@NumberList1|A list of 5 numbers. More on lists later.@@@ let numbers = [ 1; 2; 3; 4; 5 ] - /// Given a list of integers, it filters out the even numbers, - /// squares the resulting odds, and adds 1 to the squared odds. + /// @@@FilterWithoutPipes-Line1|Given a list of integers, it filters out the even numbers,@@@ + /// @@@FilterWithoutPipes-Line2|squares the resulting odds, and adds 1 to the squared odds.@@@ let squareOddValuesAndAddOne values = let odds = List.filter isOdd values let squares = List.map square odds @@ -257,19 +257,19 @@ module PipelinesAndComposition = printfn "processing %A through 'squareOddValuesAndAddOne' produces: %A" numbers (squareOddValuesAndAddOne numbers) - /// A shorter way to write 'squareOddValuesAndAddOne' is to nest each - /// sub-result into the function calls themselves. + /// @@@FilterShorter-Line1|A shorter way to write 'squareOddValuesAndAddOne' is to nest each@@@ + /// @@@FilterShorter-Line2|sub-result into the function calls themselves.@@@ /// - /// This makes the function much shorter, but it's difficult to see the - /// order in which the data is processed. + /// @@@FilterShorter-Line3|This makes the function much shorter, but it's difficult to see the@@@ + /// @@@FilterShorter-Line4|order in which the data is processed.@@@ let squareOddValuesAndAddOneNested values = List.map addOne (List.map square (List.filter isOdd values)) printfn "processing %A through 'squareOddValuesAndAddOneNested' produces: %A" numbers (squareOddValuesAndAddOneNested numbers) - /// A preferred way to write 'squareOddValuesAndAddOne' is to use F# pipe operators. - /// This allows you to avoid creating intermediate results, but is much more readable - /// than nesting function calls like 'squareOddValuesAndAddOneNested' + /// @@@FilterWithPipes-Line1|A preferred way to write 'squareOddValuesAndAddOne' is to use F# pipe operators.@@@ + /// @@@FilterWithPipes-Line2|This allows you to avoid creating intermediate results, but is much more readable@@@ + /// @@@FilterWithPipes-Line3|than nesting function calls like 'squareOddValuesAndAddOneNested'@@@ let squareOddValuesAndAddOnePipeline values = values |> List.filter isOdd @@ -278,11 +278,11 @@ module PipelinesAndComposition = printfn "processing %A through 'squareOddValuesAndAddOnePipeline' produces: %A" numbers (squareOddValuesAndAddOnePipeline numbers) - /// You can shorten 'squareOddValuesAndAddOnePipeline' by moving the second `List.map` call - /// into the first, using a Lambda Function. + /// @@@PipeInLambda-Line1|You can shorten 'squareOddValuesAndAddOnePipeline' by moving the second `List.map` call@@@ + /// @@@PipeInLambda-Line2|into the first, using a Lambda Function.@@@ /// - /// Note that pipelines are also being used inside the lambda function. F# pipe operators - /// can be used for single values as well. This makes them very powerful for processing data. + /// @@@PipeInLambda-Line3|Note that pipelines are also being used inside the lambda function. F# pipe operators@@@ + /// @@@PipeInLambda-Line4|can be used for single values as well. This makes them very powerful for processing data.@@@ let squareOddValuesAndAddOneShorterPipeline values = values |> List.filter isOdd @@ -290,76 +290,76 @@ module PipelinesAndComposition = printfn "processing %A through 'squareOddValuesAndAddOneShorterPipeline' produces: %A" numbers (squareOddValuesAndAddOneShorterPipeline numbers) - /// Lastly, you can eliminate the need to explicitly take 'values' in as a parameter by using '>>' - /// to compose the two core operations: filtering out even numbers, then squaring and adding one. - /// Likewise, the 'fun x -> ...' bit of the lambda expression is also not needed, because 'x' is simply - /// being defined in that scope so that it can be passed to a functional pipeline. Thus, '>>' can be used - /// there as well. + /// @@@PipesComposition-Line1|Lastly, you can eliminate the need to explicitly take 'values' in as a parameter by using '>>'@@@ + /// @@@PipesComposition-Line2|to compose the two core operations: filtering out even numbers, then squaring and adding one.@@@ + /// @@@PipesComposition-Line3|Likewise, the 'fun x -> ...' bit of the lambda expression is also not needed, because 'x' is simply@@@ + /// @@@PipesComposition-Line4|being defined in that scope so that it can be passed to a functional pipeline. Thus, '>>' can be used@@@ + /// @@@PipesComposition-Line5|there as well.@@@ /// - /// The result of 'squareOddValuesAndAddOneComposition' is itself another function which takes a - /// list of integers as its input. If you execute 'squareOddValuesAndAddOneComposition' with a list - /// of integers, you'll notice that it produces the same results as previous functions. + /// @@@PipesComposition-Line6|The result of 'squareOddValuesAndAddOneComposition' is itself another function which takes a@@@ + /// @@@PipesComposition-Line7|list of integers as its input. If you execute 'squareOddValuesAndAddOneComposition' with a list@@@ + /// @@@PipesComposition-Line8|of integers, you'll notice that it produces the same results as previous functions.@@@ /// - /// This is using what is known as function composition. This is possible because functions in F# - /// use Partial Application and the input and output types of each data processing operation match - /// the signatures of the functions we're using. + /// @@@PipesComposition-Line9|This is using what is known as function composition. This is possible because functions in F#@@@ + /// @@@PipesComposition-Line10|use Partial Application and the input and output types of each data processing operation match@@@ + /// @@@PipesComposition-Line11|the signatures of the functions we're using.@@@ let squareOddValuesAndAddOneComposition = List.filter isOdd >> List.map (square >> addOne) printfn "processing %A through 'squareOddValuesAndAddOneComposition' produces: %A" numbers (squareOddValuesAndAddOneComposition numbers) -/// Lists are ordered, immutable, singly-linked lists. They are eager in their evaluation. -/// -/// This module shows various ways to generate lists and process lists with some functions -/// in the 'List' module in the F# Core Library. +/// @@@Lists-Line1|Lists are ordered, immutable, singly-linked lists. They are eager in their evaluation.@@@ /// -/// To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/lists +/// @@@Lists-Line2|This module shows various ways to generate lists and process lists with some functions@@@ +/// @@@Lists-Line3|in the 'List' module in the F# Core Library.@@@ +/// +/// @@@Lists-Line4|To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/lists@@@ module Lists = - /// Lists are defined using [ ... ]. This is an empty list. - let list1 = [ ] + /// @@@ListEmptyDefinition|Lists are defined using [ ... ]. This is an empty list.@@@ + let list1 = [ ] - /// This is a list with 3 elements. ';' is used to separate elements on the same line. + /// @@@ListElementDefinition|This is a list with 3 elements. ';' is used to separate elements on the same line.@@@ let list2 = [ 1; 2; 3 ] - /// You can also separate elements by placing them on their own lines. + /// @@@ListNewlineElements|You can also separate elements by placing them on their own lines.@@@ let list3 = [ 1 2 3 ] - /// This is a list of integers from 1 to 1000 + /// @@@NumberList2|This is a list of integers from 1 to 1000@@@ let numberList = [ 1 .. 1000 ] - /// Lists can also be generated by computations. This is a list containing - /// all the days of the year. + /// @@@ListComputation-Line1|Lists can also be generated by computations. This is a list containing@@@ + /// @@@ListComputation-Line2|all the days of the year.@@@ let daysList = [ for month in 1 .. 12 do for day in 1 .. System.DateTime.DaysInMonth(2017, month) do yield System.DateTime(2017, month, day) ] - // Print the first 5 elements of 'daysList' using 'List.take'. + // @@@PrintList2|Print the first 5 elements of 'daysList' using 'List.take'.@@@ printfn "The first 5 days of 2017 are: %A" (daysList |> List.take 5) - /// Computations can include conditionals. This is a list containing the tuples - /// which are the coordinates of the black squares on a chess board. + /// @@@ListComputationConditional-Line1|Computations can include conditionals. This is a list containing the tuples@@@ + /// @@@ListComputationConditional-Line2|which are the coordinates of the black squares on a chess board.@@@ let blackSquares = [ for i in 0 .. 7 do for j in 0 .. 7 do if (i+j) % 2 = 1 then yield (i, j) ] - /// Lists can be transformed using 'List.map' and other functional programming combinators. - /// This definition produces a new list by squaring the numbers in numberList, using the pipeline - /// operator to pass an argument to List.map. + /// @@@ListMap-Line1|Lists can be transformed using 'List.map' and other functional programming combinators.@@@ + /// @@@ListMap-Line2|This definition produces a new list by squaring the numbers in numberList, using the pipeline@@@ + /// @@@ListMap-Line3|operator to pass an argument to List.map.@@@ let squares = numberList |> List.map (fun x -> x*x) - /// There are many other list combinations. The following computes the sum of the squares of the - /// numbers divisible by 3. + /// @@@ListFilter-Line1|There are many other list combinations. The following computes the sum of the squares of the@@@ + /// @@@ListFilter-Line2|numbers divisible by 3.@@@ let sumOfSquares = numberList |> List.filter (fun x -> x % 3 = 0) @@ -368,46 +368,46 @@ module Lists = printfn "The sum of the squares of numbers up to 1000 that are divisible by 3 is: %d" sumOfSquares -/// Arrays are fixed-size, mutable collections of elements of the same type. +/// @@@Arrays-Line1|Arrays are fixed-size, mutable collections of elements of the same type.@@@ /// -/// Although they are similar to Lists (they support enumeration and have similar combinators for data processing), -/// they are generally faster and support fast random access. This comes at the cost of being less safe by being mutable. +/// @@@Arrays-Line2|Although they are similar to Lists (they support enumeration and have similar combinators for data processing),@@@ +/// @@@Arrays-Line3|they are generally faster and support fast random access. This comes at the cost of being less safe by being mutable.@@@ /// -/// To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/arrays +/// @@@Arrays-Line4|To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/arrays@@@ module Arrays = - /// This is The empty array. Note that the syntax is similar to that of Lists, but uses `[| ... |]` instead. + /// @@@EmptyArray|This is The empty array. Note that the syntax is similar to that of Lists, but uses `[| ... |]` instead.@@@ let array1 = [| |] - /// Arrays are specified using the same range of constructs as lists. + /// @@@ArrayConstructionList|Arrays are specified using the same range of constructs as lists.@@@ let array2 = [| "hello"; "world"; "and"; "hello"; "world"; "again" |] - /// This is an array of numbers from 1 to 1000. + /// @@@ArrayConstructionRange|This is an array of numbers from 1 to 1000.@@@ let array3 = [| 1 .. 1000 |] - /// This is an array containing only the words "hello" and "world". + /// @@@ArrayComputationConstruction|This is an array containing only the words "hello" and "world".@@@ let array4 = [| for word in array2 do if word.Contains("l") then yield word |] - /// This is an array initialized by index and containing the even numbers from 0 to 2000. + /// @@@ArrayInit|This is an array initialized by index and containing the even numbers from 0 to 2000.@@@ let evenNumbers = Array.init 1001 (fun n -> n * 2) - /// Sub-arrays are extracted using slicing notation. + /// @@@ArraySlicing|Sub-arrays are extracted using slicing notation.@@@ let evenNumbersSlice = evenNumbers.[0..500] - /// You can loop over arrays and lists using 'for' loops. + /// @@@ArrayLooping|You can loop over arrays and lists using 'for' loops.@@@ for word in array4 do printfn "word: %s" word - // You can modify the contents of an an array element by using the left arrow assignment operator. + // @@@ArrayAssignment-Line1|You can modify the contents of an an array element by using the left arrow assignment operator.@@@ // - // To learn more about this operator, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/values/index#mutable-variables + // @@@ArrayAssignment-Line2|To learn more about this operator, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/values/index#mutable-variables@@@ array2.[1] <- "WORLD!" - /// You can transform arrays using 'Array.map' and other functional programming operations. - /// The following calculates the sum of the lengths of the words that start with 'h'. + /// @@@ArrayMap-Line1|You can transform arrays using 'Array.map' and other functional programming operations.@@@ + /// @@@ArrayMap-Line2|The following calculates the sum of the lengths of the words that start with 'h'.@@@ let sumOfLengthsOfWords = array2 |> Array.filter (fun x -> x.StartsWith "h") @@ -416,43 +416,43 @@ module Arrays = printfn "The sum of the lengths of the words in Array 2 is: %d" sumOfLengthsOfWords -/// Sequences are a logical series of elements, all of the same type. These are a more general type than Lists and Arrays. +/// @@@Sequences-Line1|Sequences are a logical series of elements, all of the same type. These are a more general type than Lists and Arrays.@@@ /// -/// Sequences are evaluated on-demand and are re-evaluated each time they are iterated. -/// An F# sequence is an alias for a .NET System.Collections.Generic.IEnumerable<'T>. +/// @@@Sequences-Line2|Sequences are evaluated on-demand and are re-evaluated each time they are iterated.@@@ +/// @@@Sequences-Line3|An F# sequence is an alias for a .NET System.Collections.Generic.IEnumerable<'T>.@@@ /// -/// Sequence processing functions can be applied to Lists and Arrays as well. +/// @@@Sequences-Line4|Sequence processing functions can be applied to Lists and Arrays as well.@@@ /// -/// To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/sequences +/// @@@Sequences-Line5|To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/sequences@@@ module Sequences = - /// This is the empty sequence. + /// @@@EmptySequence|This is the empty sequence.@@@ let seq1 = Seq.empty - /// This a sequence of values. + /// @@@SequenceOfValues|This a sequence of values.@@@ let seq2 = seq { yield "hello"; yield "world"; yield "and"; yield "hello"; yield "world"; yield "again" } - /// This is an on-demand sequence from 1 to 100. + /// @@@OnDemandSequence|This is an on-demand sequence from 1 to 1000.@@@ let numbersSeq = seq { 1 .. 1000 } - /// This is a sequence producing the words "hello" and "world" + /// @@@SequenceComposition|This is a sequence producing the words "hello" and "world"@@@ let seq3 = seq { for word in seq2 do if word.Contains("l") then yield word } - /// This sequence producing the even numbers up to 2000. + /// @@@SequenceInit|This sequence producing the even numbers up to 2000.@@@ let evenNumbers = Seq.init 1001 (fun n -> n * 2) let rnd = System.Random() - /// This is an infinite sequence which is a random walk. - /// This example uses yield! to return each element of a subsequence. + /// @@@InfiniteSequence-Line1|This is an infinite sequence which is a random walk.@@@ + /// @@@InfiniteSequence-Line2|This example uses yield! to return each element of a subsequence.@@@ let rec randomWalk x = seq { yield x yield! randomWalk (x + rnd.NextDouble() - 0.5) } - /// This example shows the first 100 elements of the random walk. + /// @@@Sequence100Elements|This example shows the first 100 elements of the random walk.@@@ let first100ValuesOfRandomWalk = randomWalk 5.0 |> Seq.truncate 100 @@ -461,26 +461,26 @@ module Sequences = printfn "First 100 elements of a random walk: %A" first100ValuesOfRandomWalk -/// Recursive functions can call themselves. In F#, functions are only recursive -/// when declared using 'let rec'. +/// @@@RecursiveFunctions-Line1|Recursive functions can call themselves. In F#, functions are only recursive@@@ +/// @@@RecursiveFunctions-Line2|when declared using 'let rec'.@@@ /// -/// Recursion is the preferred way to process sequences or collections in F#. +/// @@@RecursiveFunctions-Line3|Recursion is the preferred way to process sequences or collections in F#.@@@ /// -/// To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/index#recursive-functions +/// @@@RecursiveFunctions-Line4|To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/index#recursive-functions@@@ module RecursiveFunctions = - /// This example shows a recursive function that computes the factorial of an - /// integer. It uses 'let rec' to define a recursive function. + /// @@@RecFunDef-Line1|This example shows a recursive function that computes the factorial of an@@@ + /// @@@RecRunDef-Line2|integer. It uses 'let rec' to define a recursive function.@@@ let rec factorial n = if n = 0 then 1 else n * factorial (n-1) printfn "Factorial of 6 is: %d" (factorial 6) - /// Computes the greatest common factor of two integers. + /// @@@RecGcd-Line1|Computes the greatest common factor of two integers.@@@ /// - /// Since all of the recursive calls are tail calls, - /// the compiler will turn the function into a loop, - /// which improves performance and reduces memory consumption. + /// @@@RecGcd-Line2|Since all of the recursive calls are tail calls,@@@ + /// @@@RecGcd-Line3|the compiler will turn the function into a loop,@@@ + /// @@@RecGcd-Line4|which improves performance and reduces memory consumption.@@@ let rec greatestCommonFactor a b = if a = 0 then b elif a < b then greatestCommonFactor a (b - a) @@ -488,20 +488,20 @@ module RecursiveFunctions = printfn "The Greatest Common Factor of 300 and 620 is %d" (greatestCommonFactor 300 620) - /// This example computes the sum of a list of integers using recursion. + /// @@@RecSumList|This example computes the sum of a list of integers using recursion.@@@ let rec sumList xs = match xs with | [] -> 0 | y::ys -> y + sumList ys - /// This makes 'sumList' tail recursive, using a helper function with a result accumulator. + /// @@@RecSumListTail|This makes 'sumList' tail recursive, using a helper function with a result accumulator.@@@ let rec private sumListTailRecHelper accumulator xs = match xs with | [] -> accumulator | y::ys -> sumListTailRecHelper (accumulator+y) ys - /// This invokes the tail recursive helper function, providing '0' as a seed accumulator. - /// An approach like this is common in F#. + /// @@@RecSumListTailInvoke-Line1|This invokes the tail recursive helper function, providing '0' as a seed accumulator.@@@ + /// @@@RecSumListTailInvoke-Line2|An approach like this is common in F#.@@@ let sumListTailRecursive xs = sumListTailRecHelper 0 xs let oneThroughTen = [1; 2; 3; 4; 5; 6; 7; 8; 9; 10] @@ -509,52 +509,52 @@ module RecursiveFunctions = printfn "The sum 1-10 is %d" (sumListTailRecursive oneThroughTen) -/// Records are an aggregate of named values, with optional members (such as methods). -/// They are immutable and have structural equality semantics. +/// @@@Records-Line1|Records are an aggregate of named values, with optional members (such as methods).@@@ +/// @@@Records-Line2|They are immutable and have structural equality semantics.@@@ /// -/// To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/records +/// @@@Records-Line3|To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/records@@@ module RecordTypes = - /// This example shows how to define a new record type. + /// @@@RecordDefinition|This example shows how to define a new record type.@@@ type ContactCard = { Name : string Phone : string Verified : bool } - /// This example shows how to instantiate a record type. + /// @@@RecordInstantiation1|This example shows how to instantiate a record type.@@@ let contact1 = { Name = "Alf" Phone = "(206) 555-0157" Verified = false } - /// You can also do this on the same line with ';' separators. + /// @@@RecordInstantiation2|You can also do this on the same line with ';' separators.@@@ let contactOnSameLine = { Name = "Alf"; Phone = "(206) 555-0157"; Verified = false } - /// This example shows how to use "copy-and-update" on record values. It creates - /// a new record value that is a copy of contact1, but has different values for - /// the 'Phone' and 'Verified' fields. + /// @@@UpdateRecord-Line1|This example shows how to use "copy-and-update" on record values. It creates@@@ + /// @@@UpdateRecord-Line2|a new record value that is a copy of contact1, but has different values for@@@ + /// @@@UpdateRecord-Line3|the 'Phone' and 'Verified' fields.@@@ /// - /// To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/copy-and-update-record-expressions + /// @@@UpdateRecord-Line4|To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/copy-and-update-record-expressions@@@ let contact2 = { contact1 with Phone = "(206) 555-0112" Verified = true } - /// This example shows how to write a function that processes a record value. - /// It converts a 'ContactCard' object to a string. + /// @@@ProcessRecord-Line1|This example shows how to write a function that processes a record value.@@@ + /// @@@ProcessRecord-Line2|It converts a 'ContactCard' object to a string.@@@ let showContactCard (c: ContactCard) = c.Name + " Phone: " + c.Phone + (if not c.Verified then " (unverified)" else "") printfn "Alf's Contact Card: %s" (showContactCard contact1) - /// This is an example of a Record with a member. + /// @@@RecordWithMember-Line1|This is an example of a Record with a member.@@@ type ContactCardAlternate = { Name : string Phone : string Address : string Verified : bool } - /// Members can implement object-oriented members. + /// @@@RecordWithMember-Line2|Members can implement object-oriented members.@@@ member this.PrintedContactCard = this.Name + " Phone: " + this.Phone + (if not this.Verified then " (unverified)" else "") + this.Address @@ -564,12 +564,12 @@ module RecordTypes = Verified = false Address = "111 Alf Street" } - // Members are accessed via the '.' operator on an instantiated type. + // @@@RecordAccess|Members are accessed via the '.' operator on an instantiated type.@@@ printfn "Alf's alternate contact card is %s" contactAlternate.PrintedContactCard - /// Records can also be represented as structs via the 'Struct' attribute. - /// This is helpful in situations where the performance of structs outweighs - /// the flexibility of reference types. + /// @@@RecordStruct-Line1|Records can also be represented as structs via the 'Struct' attribute.@@@ + /// @@@RecordStruct-Line2|This is helpful in situations where the performance of structs outweighs@@@ + /// @@@RecordStruct-Line3|the flexibility of reference types.@@@ [] type ContactCardStruct = { Name : string @@ -577,29 +577,29 @@ module RecordTypes = Verified : bool } -/// Discriminated Unions (DU for short) are values which could be a number of named forms or cases. -/// Data stored in DUs can be one of several distinct values. +/// @@@DiscriminatedUnions-Line1|Discriminated Unions (DU for short) are values which could be a number of named forms or cases.@@@ +/// @@@DiscriminatedUnions-Line2|Data stored in DUs can be one of several distinct values.@@@ /// -/// To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/discriminated-unions +/// @@@DiscriminatedUnions-Line3|To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/discriminated-unions@@@ module DiscriminatedUnions = - /// The following represents the suit of a playing card. + /// @@@CardSuit|The following represents the suit of a playing card.@@@ type Suit = | Hearts | Clubs | Diamonds | Spades - /// A Disciminated Union can also be used to represent the rank of a playing card. + /// @@@CardRank|A Disciminated Union can also be used to represent the rank of a playing card.@@@ type Rank = - /// Represents the rank of cards 2 .. 10 + /// @@@CardRankValue|Represents the rank of cards 2 .. 10@@@ | Value of int | Ace | King | Queen | Jack - /// Discriminated Unions can also implement object-oriented members. + /// @@@CardMember|Discriminated Unions can also implement object-oriented members.@@@ static member GetAllRanks() = [ yield Ace for i in 2 .. 10 do yield Value i @@ -607,17 +607,17 @@ module DiscriminatedUnions = yield Queen yield King ] - /// This is a record type that combines a Suit and a Rank. - /// It's common to use both Records and Disciminated Unions when representing data. + /// @@@CardType-Line1|This is a record type that combines a Suit and a Rank.@@@ + /// @@@CardType-Line2|It's common to use both Records and Disciminated Unions when representing data.@@@ type Card = { Suit: Suit; Rank: Rank } - /// This computes a list representing all the cards in the deck. + /// @@@ComputeFullDeck|This computes a list representing all the cards in the deck.@@@ let fullDeck = [ for suit in [ Hearts; Diamonds; Clubs; Spades] do for rank in Rank.GetAllRanks() do yield { Suit=suit; Rank=rank } ] - /// This example converts a 'Card' object to a string. + /// @@@CardToString|This example converts a 'Card' object to a string.@@@ let showPlayingCard (c: Card) = let rankString = match c.Rank with @@ -634,70 +634,70 @@ module DiscriminatedUnions = | Hearts -> "hearts" rankString + " of " + suitString - /// This example prints all the cards in a playing deck. + /// @@@PrintAllCards|This example prints all the cards in a playing deck.@@@ let printAllCards() = for card in fullDeck do printfn "%s" (showPlayingCard card) - // Single-case DUs are often used for domain modeling. This can buy you extra type safety - // over primitive types such as strings and ints. + // @@@SingleCaseDu-Line1|Single-case DUs are often used for domain modeling. This can buy you extra type safety@@@ + // @@@SingleCaseDu-Line2|over primitive types such as strings and ints.@@@ // - // Single-case DUs cannot be implicitly converted to or from the type they wrap. - // For example, a function which takes in an Address cannot accept a string as that input, - // or vive/versa. + // @@@SingleCaseDu-Line3|Single-case DUs cannot be implicitly converted to or from the type they wrap.@@@ + // @@@SingleCaseDu-Line4|For example, a function which takes in an Address cannot accept a string as that input,@@@ + // @@@SingleCaseDu-Line5|or vive/versa.@@@ type Address = Address of string type Name = Name of string type SSN = SSN of int - // You can easily instantiate a single-case DU as follows. + // @@@InstantiateSingleCaseDu|You can easily instantiate a single-case DU as follows.@@@ let address = Address "111 Alf Way" let name = Name "Alf" let ssn = SSN 1234567890 - /// When you need the value, you can unwrap the underlying value with a simple function. + /// @@@UnwrapSingleCaseDu|When you need the value, you can unwrap the underlying value with a simple function.@@@ let unwrapAddress (Address a) = a let unwrapName (Name n) = n let unwrapSSN (SSN s) = s - // Printing single-case DUs is simple with unwrapping functions. + // @@@PrintSingleCaseDu|Printing single-case DUs is simple with unwrapping functions.@@@ printfn "Address: %s, Name: %s, and SSN: %d" (address |> unwrapAddress) (name |> unwrapName) (ssn |> unwrapSSN) - /// Disciminated Unions also support recursive definitions. + /// @@@DuRecursiveDef-Line1|Disciminated Unions also support recursive definitions.@@@ /// - /// This represents a Binary Search Tree, with one case being the Empty tree, - /// and the other being a Node with a value and two subtrees. + /// @@@DuRecursiveDef-Line2|This represents a Binary Search Tree, with one case being the Empty tree,@@@ + /// @@@DuRecursiveDef-Line3|and the other being a Node with a value and two subtrees.@@@ type BST<'T> = | Empty | Node of value:'T * left: BST<'T> * right: BST<'T> - /// Check if an item exists in the binary search tree. - /// Searches recursively using Pattern Matching. Returns true if it exists; otherwise, false. + /// @@@SearchBinaryTree-Line1|Check if an item exists in the binary search tree.@@@ + /// @@@SearchBinaryTree-Line2|Searches recursively using Pattern Matching. Returns true if it exists; otherwise, false.@@@ let rec exists item bst = match bst with | Empty -> false | Node (x, left, right) -> if item = x then true - elif item < x then (exists item left) // Check the left subtree. - else (exists item right) // Check the right subtree. + elif item < x then (exists item left) // @@@CheckLeftSubtree|Check the left subtree.@@@ + else (exists item right) // @@@CheckRightSubtree|Check the right subtree.@@@ - /// Inserts an item in the Binary Search Tree. - /// Finds the place to insert recursively using Pattern Matching, then inserts a new node. - /// If the item is already present, it does not insert anything. + /// @@@BinaryTreeInsert-Line1|Inserts an item in the Binary Search Tree.@@@ + /// @@@BinaryTreeInsert-Line2|Finds the place to insert recursively using Pattern Matching, then inserts a new node.@@@ + /// @@@BinaryTreeInsert-Line3|If the item is already present, it does not insert anything.@@@ let rec insert item bst = match bst with | Empty -> Node(item, Empty, Empty) | Node(x, left, right) as node -> - if item = x then node // No need to insert, it already exists; return the node. - elif item < x then Node(x, insert item left, right) // Call into left subtree. - else Node(x, left, insert item right) // Call into right subtree. + if item = x then node // @@@BinaryTreeInsert-Line4|No need to insert, it already exists; return the node.@@@ + elif item < x then Node(x, insert item left, right) // @@@BinaryTreeInsert-Line5|Call into left subtree.@@@ + else Node(x, left, insert item right) // @@@BinaryTreeInsert-Line6|Call into right subtree.@@@ - /// Discriminated Unions can also be represented as structs via the 'Struct' attribute. - /// This is helpful in situations where the performance of structs outweighs - /// the flexibility of reference types. + /// @@@DuStruct-Line1|Discriminated Unions can also be represented as structs via the 'Struct' attribute.@@@ + /// @@@DuStruct-Line2|This is helpful in situations where the performance of structs outweighs@@@ + /// @@@DuStruct-Line3|the flexibility of reference types.@@@ /// - /// However, there are two important things to know when doing this: - /// 1. A struct DU cannot be recursively-defined. - /// 2. A struct DU must have unique names for each of its cases. + /// @@@DuStruct-Line4|However, there are two important things to know when doing this:@@@ + /// @@@DuStruct-Line5|1. A struct DU cannot be recursively-defined.@@@ + /// @@@DuStruct-Line6|2. A struct DU must have unique names for each of its cases.@@@ [] type Shape = | Circle of radius: float @@ -705,28 +705,28 @@ module DiscriminatedUnions = | Triangle of height: float * width: float -/// Pattern Matching is a feature of F# that allows you to utilize Patterns, -/// which are a way to compare data with a logical structure or structures, -/// decompose data into constituent parts, or extract information from data in various ways. -/// You can then dispatch on the "shape" of a pattern via Pattern Matching. -/// -/// To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/pattern-matching +/// @@@PatternMatching-Line1|Pattern Matching is a feature of F# that allows you to utilize Patterns,@@@ +/// @@@PatternMatching-Line2|which are a way to compare data with a logical structure or structures,@@@ +/// @@@PatternMatching-Line3|decompose data into constituent parts, or extract information from data in various ways.@@@ +/// @@@PatternMatching-Line4|You can then dispatch on the "shape" of a pattern via Pattern Matching.@@@ +/// +/// @@@PatternMatching-Line5|To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/pattern-matching@@@ module PatternMatching = - /// A record for a person's first and last name + /// @@@PersonRecord|A record for a person's first and last name@@@ type Person = { First : string Last : string } - /// A Discriminated Union of 3 different kinds of employees + /// @@@EmployeeDu|A Discriminated Union of 3 different kinds of employees@@@ type Employee = | Engineer of engineer: Person | Manager of manager: Person * reports: List | Executive of executive: Person * reports: List * assistant: Employee - /// Count everyone underneath the employee in the management hierarchy, - /// including the employee. + /// @@@CountEmployees-Line1|Count everyone underneath the employee in the management hierarchy,@@@ + /// @@@CountEmployees-Line2|including the employee.@@@ let rec countReports(emp : Employee) = 1 + match emp with | Engineer(id) -> @@ -737,18 +737,18 @@ module PatternMatching = (reports |> List.sumBy countReports) + countReports assistant - /// Find all managers/executives named "Dave" who do not have any reports. - /// This uses the 'function' shorthand to as a lambda expression. + /// @@@FindDave-Line1|Find all managers/executives named "Dave" who do not have any reports.@@@ + /// @@@FindDave-Line2|This uses the 'function' shorthand to as a lambda expression.@@@ let rec findDaveWithOpenPosition(emps : List) = emps |> List.filter(function - | Manager({First = "Dave"}, []) -> true // [] matches an empty list. + | Manager({First = "Dave"}, []) -> true // @@@MatchEmptyList|[] matches an empty list.@@@ | Executive({First = "Dave"}, [], _) -> true - | _ -> false) // '_' is a wildcard pattern that matches anything. - // This handles the "or else" case. + | _ -> false) // @@@MatchWildcard-Line1|'_' is a wildcard pattern that matches anything.@@@ + // @@@MatchWildCard-Line2|This handles the "or else" case.@@@ - /// You can also use the shorthand function construct for pattern matching, - /// which is useful when you're writing functions which make use of Partial Application. + /// @@@MatchShorthand-Line1|You can also use the shorthand function construct for pattern matching,@@@ + /// @@@MatchShorthand-Line2|which is useful when you're writing functions which make use of Partial Application.@@@ let private parseHelper f = f >> function | (true, item) -> Some item | (false, _) -> None @@ -760,21 +760,21 @@ module PatternMatching = | Some dto -> printfn "It parsed!" | None -> printfn "It didn't parse!" - // Define some more functions which parse with the helper function. + // @@@ParseHelpers|Define some more functions which parse with the helper function.@@@ let parseInt = parseHelper Int32.TryParse let parseDouble = parseHelper Double.TryParse let parseTimeSpan = parseHelper TimeSpan.TryParse - // Active Patterns are another powerful construct to use with pattern matching. - // They allow you to partition input data into custom forms, decomposing them at the pattern match call site. + // @@@ActivePatterns-Line1|Active Patterns are another powerful construct to use with pattern matching.@@@ + // @@@ActivePatterns-Line2|They allow you to partition input data into custom forms, decomposing them at the pattern match call site.@@@ // - // To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/active-patterns + // @@@ActivePatterns-Line3|To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/active-patterns@@@ let (|Int|_|) = parseInt let (|Double|_|) = parseDouble let (|Date|_|) = parseDateTimeOffset let (|TimeSpan|_|) = parseTimeSpan - /// Pattern Matching via 'function' keyword and Active Patterns often looks like this. + /// @@@MatchActivePattern|Pattern Matching via 'function' keyword and Active Patterns often looks like this.@@@ let printParseResult = function | Int x -> printfn "%d" x | Double x -> printfn "%f" x @@ -782,7 +782,7 @@ module PatternMatching = | TimeSpan t -> printfn "%s" (t.ToString()) | _ -> printfn "Nothing was parse-able!" - // Call the printer with some different values to parse. + // @@@PrintParse|Call the printer with some different values to parse.@@@ printParseResult "12" printParseResult "12.045" printParseResult "12/28/2016" @@ -790,201 +790,201 @@ module PatternMatching = printParseResult "banana!" -/// Option values are any kind of value tagged with either 'Some' or 'None'. -/// They are used extensively in F# code to represent the cases where many other -/// languages would use null references. +/// @@@Option-Line1|Option values are any kind of value tagged with either 'Some' or 'None'.@@@ +/// @@@Option-Line2|They are used extensively in F# code to represent the cases where many other@@@ +/// @@@Option-Line3|languages would use null references.@@@ /// -/// To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/options +/// @@@Option-Line4|To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/options@@@ module OptionValues = - /// First, define a zipcode defined via Single-case Discriminated Union. + /// @@@ZipCode|First, define a zipcode defined via Single-case Discriminated Union.@@@ type ZipCode = ZipCode of string - /// Next, define a type where the ZipCode is optionsl. + /// @@@Customer|Next, define a type where the ZipCode is optional.@@@ type Customer = { ZipCode: ZipCode option } - /// Next, define an interface type the represents an object to compute the shipping zone for the customer's zip code, - /// given implementations for the 'getState' and 'getShippingZone' abstract methods. + /// @@@ShippingCalculator-Line1|Next, define an interface type that represents an object to compute the shipping zone for the customer's zip code,@@@ + /// @@@ShippingCalculator-Line2|given implementations for the 'getState' and 'getShippingZone' abstract methods.@@@ type ShippingCalculator = abstract GetState : ZipCode -> string option abstract GetShippingZone : string -> int - /// Next, calculate a shipping zone for a customer using a calculator instance. - /// This uses combinators in the Option module to allow a functional pipeline for - /// transforming data with Optionals. + /// @@@CalcShippingZone-Line1|Next, calculate a shipping zone for a customer using a calculator instance.@@@ + /// @@@CalcShippingZone-Line2|This uses combinators in the Option module to allow a functional pipeline for@@@ + /// @@@CalcShippingZone-Line3|transforming data with Optionals.@@@ let CustomerShippingZone (calculator: ShippingCalculator, customer: Customer) = customer.ZipCode |> Option.bind calculator.GetState |> Option.map calculator.GetShippingZone -/// Units of measure are a way to annotate primitive numeric types in a type-safe way. -/// You can then perform type-safe arithmetic on these values. +/// @@@UnitsOfMeasure-Line1|Units of measure are a way to annotate primitive numeric types in a type-safe way.@@@ +/// @@@UnitsOfMeasure-Line2|You can then perform type-safe arithmetic on these values.@@@ /// -/// To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/units-of-measure +/// @@@UnitsOfMeasure-Line3|To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/units-of-measure@@@ module UnitsOfMeasure = - /// First, open a collection of common unit names + /// @@@CommonUnits|First, open a collection of common unit names@@@ open Microsoft.FSharp.Data.UnitSystems.SI.UnitNames - /// Define a unitized constant - let sampleValue1 = 1600.0 + /// @@@DefineUnitConstant|Define a unitized constant@@@ + let sampleValue1 = 1600.0 - /// Next, define a new unit type + /// @@@MileUnit|Next, define a new unit type@@@ [] type mile = - /// Conversion factor mile to meter. + /// @@@MileToMeter|Conversion factor mile to meter.@@@ static member asMeter = 1609.34 - /// Define a unitized constant - let sampleValue2 = 500.0 + /// @@@DefineMileConstant|Define a unitized constant@@@ + let sampleValue2 = 500.0 - /// Compute metric-system constant - let sampleValue3 = sampleValue2 * mile.asMeter + /// @@@ComputeMileToMeter|Compute metric-system constant@@@ + let sampleValue3 = sampleValue2 * mile.asMeter - // Values using Units of Measure can be used just like the primitive numeric type for things like printing. + // @@@PrintUnitsOfMeasure|Values using Units of Measure can be used just like the primitive numeric type for things like printing.@@@ printfn "After a %f race I would walk %f miles which would be %f meters" sampleValue1 sampleValue2 sampleValue3 -/// Classes are a way of defining new object types in F#, and support standard Object-oriented constructs. -/// They can have a variety of members (methods, properties, events, etc.) +/// @@@Classes-Line1|Classes are a way of defining new object types in F#, and support standard Object-oriented constructs.@@@ +/// @@@Classes-Line2|They can have a variety of members (methods, properties, events, etc.)@@@ /// -/// To learn more about Classes, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/classes +/// @@@Classes-Line3|To learn more about Classes, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/classes@@@ /// -/// To learn more about Members, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/members +/// @@@Classes-Line4|To learn more about Members, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/members@@@ module DefiningClasses = - /// A simple two-dimensional Vector class. + /// @@@Vector-Line1|A simple two-dimensional Vector class.@@@ /// - /// The class's constructor is on the first line, - /// and takes two arguments: dx and dy, both of type 'double'. + /// @@@Vector-Line2|The class's constructor is on the first line,@@@ + /// @@@Vector-Line3|and takes two arguments: dx and dy, both of type 'double'.@@@ type Vector2D(dx : double, dy : double) = - /// This internal field stores the length of the vector, computed when the - /// object is constructed + /// @@@ClassInternalField-Line1|This internal field stores the length of the vector, computed when the@@@ + /// @@@ClassInternalField-Line2|object is constructed@@@ let length = sqrt (dx*dx + dy*dy) - // 'this' specifies a name for the object's self identifier. - // In instance methods, it must appear before the member name. + // @@@ThisKeyword-Line1|'this' specifies a name for the object's self identifier.@@@ + // @@@ThisKeyword-Line2|In instance methods, it must appear before the member name.@@@ member this.DX = dx member this.DY = dy member this.Length = length - /// This member is a method. The previous members were properties. + /// @@@MemberMethod|This member is a method. The previous members were properties.@@@ member this.Scale(k) = Vector2D(k * this.DX, k * this.DY) - /// This is how you instantiate the Vector2D class. + /// @@@InstantiateClass|This is how you instantiate the Vector2D class.@@@ let vector1 = Vector2D(3.0, 4.0) - /// Get a new scaled vector object, without modifying the original object. + /// @@@ScaledVector|Get a new scaled vector object, without modifying the original object.@@@ let vector2 = vector1.Scale(10.0) printfn "Length of vector1: %f\nLength of vector2: %f" vector1.Length vector2.Length -/// Generic classes allow types to be defined with respect to a set of type parameters. -/// In the following, 'T is the type parameter for the class. +/// @@@GenericClasses-Line1|Generic classes allow types to be defined with respect to a set of type parameters.@@@ +/// @@@GenericClasses-Line2|In the following, 'T is the type parameter for the class.@@@ /// -/// To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/generics/ +/// @@@GenericClasses-Line3|To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/generics/@@@ module DefiningGenericClasses = type StateTracker<'T>(initialElement: 'T) = - /// This internal field store the states in a list. + /// @@@InternalField|This internal field store the states in a list.@@@ let mutable states = [ initialElement ] - /// Add a new element to the list of states. + /// @@@AddElement|Add a new element to the list of states.@@@ member this.UpdateState newState = - states <- newState :: states // use the '<-' operator to mutate the value. + states <- newState :: states // @@@MutableAssignment|use the '<-' operator to mutate the value.@@@ - /// Get the entire list of historical states. + /// @@@History|Get the entire list of historical states.@@@ member this.History = states - /// Get the latest state. + /// @@@Current|Get the latest state.@@@ member this.Current = states.Head - /// An 'int' instance of the state tracker class. Note that the type parameter is inferred. + /// @@@InferredTypeParameter|An 'int' instance of the state tracker class. Note that the type parameter is inferred.@@@ let tracker = StateTracker 10 - // Add a state + // @@@AddState|Add a state@@@ tracker.UpdateState 17 -/// Interfaces are object types with only 'abstract' members. -/// Object types and object expressions can implement interfaces. +/// @@@Interfaces-Line1|Interfaces are object types with only 'abstract' members.@@@ +/// @@@Interfaces-Line2|Object types and object expressions can implement interfaces.@@@ /// -/// To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/interfaces +/// @@@Interfaces-Line3|To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/interfaces@@@ module ImplementingInterfaces = - /// This is a type that implements IDisposable. + /// @@@IDisposable|This is a type that implements IDisposable.@@@ type ReadFile() = let file = new System.IO.StreamReader("readme.txt") member this.ReadLine() = file.ReadLine() - // This is the implementation of IDisposable members. + // @@@IDisposableImplementation|This is the implementation of IDisposable members.@@@ interface System.IDisposable with member this.Dispose() = file.Close() - /// This is an object that implements IDisposable via an Object Expression - /// Unlike other languages such as C# or Java, a new type definition is not needed - /// to implement an interface. + /// @@@IDisposableObjectExpression-Line1|This is an object that implements IDisposable via an Object Expression@@@ + /// @@@IDisposableObjectExpression-Line2|Unlike other languages such as C# or Java, a new type definition is not needed@@@ + /// @@@IDisposableObjectExpression-Line3|to implement an interface.@@@ let interfaceImplementation = { new System.IDisposable with member this.Dispose() = printfn "disposed" } -/// The FSharp.Core library defines a range of parallel processing functions. Here -/// you use some functions for parallel processing over arrays. +/// @@@Parallel-Line1|The FSharp.Core library defines a range of parallel processing functions. Here@@@ +/// @@@Parallel-Line2|you use some functions for parallel processing over arrays.@@@ /// -/// To learn more, see: https://msdn.microsoft.com/en-us/visualfsharpdocs/conceptual/array.parallel-module-%5Bfsharp%5D +/// @@@Parallel-Line3|To learn more, see: https://msdn.microsoft.com/en-us/visualfsharpdocs/conceptual/array.parallel-module-%5Bfsharp%5D@@@ module ParallelArrayProgramming = - /// First, an array of inputs. + /// @@@InputArray|First, an array of inputs.@@@ let oneBigArray = [| 0 .. 100000 |] - // Next, define a functions that does some CPU intensive computation. + // @@@ExpensiveFunction|Next, define a functions that does some CPU intensive computation.@@@ let rec computeSomeFunction x = if x <= 2 then 1 else computeSomeFunction (x - 1) + computeSomeFunction (x - 2) - // Next, do a parallel map over a large input array. + // @@@ParallelMap|Next, do a parallel map over a large input array.@@@ let computeResults() = oneBigArray |> Array.Parallel.map (fun x -> computeSomeFunction (x % 20)) - // Next, print the results. + // @@@PrintParallel|Next, print the results.@@@ printfn "Parallel computation results: %A" (computeResults()) -/// Events are a common idiom for .NET programming, especially with WinForms or WPF applications. +/// @@@Events-Line1|Events are a common idiom for .NET programming, especially with WinForms or WPF applications.@@@ /// -/// To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/members/events +/// @@@Events-Line2|To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/members/events@@@ module Events = - /// First, create instance of Event object that consists of subscription point (event.Publish) and event trigger (event.Trigger). + /// @@@SimpleEvent|First, create instance of Event object that consists of subscription point (event.Publish) and event trigger (event.Trigger).@@@ let simpleEvent = new Event() - // Next, add handler to the event. + // @@@AddEventHandler1|Next, add handler to the event.@@@ simpleEvent.Publish.Add( fun x -> printfn "this handler was added with Publish.Add: %d" x) - // Next, trigger the event. + // @@@TriggerEvent|Next, trigger the event.@@@ simpleEvent.Trigger(5) - // Next, create an instance of Event that follows standard .NET convention: (sender, EventArgs). + // @@@EventWithArgs|Next, create an instance of Event that follows standard .NET convention: (sender, EventArgs).@@@ let eventForDelegateType = new Event() - // Next, add a handler for this new event. + // @@@AddEventHandler2|Next, add a handler for this new event.@@@ eventForDelegateType.Publish.AddHandler( EventHandler(fun _ _ -> printfn "this handler was added with Publish.AddHandler")) - // Next, trigger this event (note that sender argument should be set). + // @@@TriggerEventWithArgs|Next, trigger this event (note that sender argument should be set).@@@ eventForDelegateType.Trigger(null, EventArgs.Empty) diff --git a/vsintegration/ProjectTemplates/TutorialProject/Template/Tutorial.vstemplate b/vsintegration/ProjectTemplates/TutorialProject/Template/Tutorial.vstemplate index 1b7ea993d60..62ae09d17e2 100644 --- a/vsintegration/ProjectTemplates/TutorialProject/Template/Tutorial.vstemplate +++ b/vsintegration/ProjectTemplates/TutorialProject/Template/Tutorial.vstemplate @@ -6,7 +6,7 @@ Microsoft.FSharp.Tutorial FSharp - 2.0 + 4.5 1 true Tutorial @@ -23,8 +23,9 @@ NuGet.VisualStudio.TemplateWizard - - + + + diff --git a/vsintegration/ProjectTemplates/TutorialProject/Template/xlf/Tutorial.fsx.cs.xlf b/vsintegration/ProjectTemplates/TutorialProject/Template/xlf/Tutorial.fsx.cs.xlf new file mode 100644 index 00000000000..e7f408b7ac6 --- /dev/null +++ b/vsintegration/ProjectTemplates/TutorialProject/Template/xlf/Tutorial.fsx.cs.xlf @@ -0,0 +1,1637 @@ + + + + + + This sample will guide you through elements of the F# language. + Tato ukázka vás provede elementy jazyka F#. + + + + To execute the code in F# Interactive, highlight a section of code and press Alt-Enter or right-click + Pokud chcete kód provést v nástroji F# Interactive, zvýrazněte oddíl kódu a stiskněte Alt-Enter nebo klikněte pravým tlačítkem myši + + + + and select "Execute in Interactive". You can open the F# Interactive Window from the "View" menu. + a vyberte Provést v Interactive. Okno F# Interactive můžete otevřít z nabídky Zobrazit. + + + + For more about F#, see: + Další informace o F# najdete na: + + + + To see this tutorial in documentation form, see: + Na tomto webu najdete tento kurz v podobě dokumentace: + + + + To learn more about applied F# programming, use + K získání dalších informací o použitém programovém kódu F# použijte + + + + To install the Visual F# Power Tools, use + K instalaci Visual F# Power Tools použijte + + + + 'Tools' --> 'Extensions and Updates' --> `Online` and search + Nástroje --> Rozšíření a aktualizace --> Online a potom hledejte + + + + For additional templates to use with F#, see the 'Online Templates' in Visual Studio, + Další šablony, které můžete používat s F#, najdete tak, že ve Visual Studiu vyberete Online šablony, + + + + 'New Project' --> 'Online Templates' + Nový projekt --> Online šablony. + + + + F# supports three kinds of comments: + F# podporuje tři typy komentářů: + + + + 1. Double-slash comments. These are used in most situations. + 1. Komentáře se dvěma lomítky. Ty se používají ve většině situací. + + + + 2. ML-style Block comments. These aren't used that often. + 2. Blokové komentáře ve stylu ML. Ty se moc často nepoužívají. + + + + 3. Triple-slash comments. These are used for documenting functions, types, and so on. + 3. Komentáře se třemi lomítky. Ty se používají k dokumentaci funkcí, typů a podobně. + + + + They will appear as text when you hover over something which is decorated with these comments. + Když na elementy s těmito komentáři nastavíte ukazatel myši, zobrazí se komentáře jako text. + + + + They also support .NET-style XML comments, which allow you to generate reference documentation, + Podporují se také komentáře XML ve stylu .NET, které umožňují generovat referenční dokumentaci. + + + + and they also allow editors (such as Visual Studio) to extract information from them. + Umožňují také, aby z nich editory (jako například Visual Studio) extrahovaly informace. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/xml-documentation + Další informace: https://docs.microsoft.com/cs-cz/dotnet/articles/fsharp/language-reference/xml-documentation + + + + Open namespaces using the 'open' keyword. + Otevírejte obory názvů pomocí klíčového slova open. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/import-declarations-the-open-keyword + Další informace: https://docs.microsoft.com/cs-cz/dotnet/articles/fsharp/language-reference/import-declarations-the-open-keyword + + + + A module is a grouping of F# code, such as values, types, and function values. + Modul je seskupení kódu F#, například hodnot, typů a hodnot funkcí. + + + + Grouping code in modules helps keep related code together and helps avoid name conflicts in your program. + Seskupování kódu do modulů pomáhá zachovat související kód pohromadě a vyhnout se v programu konfliktům názvů. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/modules + Další informace: https://docs.microsoft.com/cs-cz/dotnet/articles/fsharp/language-reference/modules + + + + This is a sample integer. + Toto je ukázkové celé číslo. + + + + This is a sample floating point number. + Toto je ukázkové číslo s plovoucí desetinnou čárkou. + + + + This computed a new number by some arithmetic. Numeric types are converted using + Tady se pomocí aritmetiky vypočítalo nové číslo. Číselné typy se převádějí pomocí + + + + functions 'int', 'double' and so on. + funkcí int, double atd. + + + + This is a list of the numbers from 0 to 99. + Toto je seznam čísel od 0 do 99. + + + + This is a list of all tuples containing all the numbers from 0 to 99 and their squares. + Toto je seznam všech řazených kolekcí členů obsahujících všechna čísla od 0 do 99 a jejich druhé mocniny. + + + + The next line prints a list that includes tuples, using '%A' for generic printing. + Další řádek vytiskne seznam, který zahrnuje řazené kolekce členů, s použitím %A pro obecný tisk. + + + + This is a sample integer with a type annotation + Toto je ukázkové celé číslo s anotací typu. + + + + Values in F# are immutable by default. They cannot be changed + Hodnoty v F# jsou ve výchozím nastavení neměnné. Nedají se změnit + + + + in the course of a program's execution unless explicitly marked as mutable. + během provádění programu, pokud nejsou explicitně označené jako měnitelné. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/values/index#why-immutable + Další informace: https://docs.microsoft.com/cs-cz/dotnet/articles/fsharp/language-reference/values/index#why-immutable + + + + Binding a value to a name via 'let' makes it immutable. + Po navázání hodnoty na název pomocí klíčového slova „let“ se hodnota stane neměnnou. + + + + The second line of code fails to compile because 'number' is immutable and bound. + Druhý řádek kódu nejde zkompilovat, protože proměnná number je neměnná a vázaná. + + + + Re-defining 'number' to be a different value is not allowed in F#. + Předefinování položky number na jinou hodnotu se v jazyce F# nepovoluje. + + + + A mutable binding. This is required to be able to mutate the value of 'otherNumber'. + Změnitelná vazba. Je to nutné, aby bylo možné měnit hodnotu otherNumber. + + + + When mutating a value, use '<-' to assign a new value. + Při změnách hodnoty použijte <- pro přiřazení nové hodnoty. + + + + You could not use '=' here for this purpose since it is used for equality + Znak = tady pro tento účel nemůžete použít, protože se používá pro rovnost + + + + or other contexts such as 'let' or 'module' + nebo jiné kontexty jako let nebo module + + + + Much of F# programming consists of defining functions that transform input data to produce + Velká část programování v F# spočívá v definování funkcí, které transformují vstupní data na + + + + useful results. + užitečné výsledky. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/ + Další informace: https://docs.microsoft.com/cs-cz/dotnet/articles/fsharp/language-reference/functions/ + + + + You use 'let' to define a function. This one accepts an integer argument and returns an integer. + Pomocí klíčového slova „let“ můžete definovat funkci. Tato přebírá celočíselný argument a vrací celé číslo. + + + + Parentheses are optional for function arguments, except for when you use an explicit type annotation. + Závorky jsou pro argumenty funkce nepovinné – s výjimkou použití anotace explicitního typu. + + + + Apply the function, naming the function return result using 'let'. + Použití funkce a pojmenování výsledku vrácení funkce pomocí klíčového slova let + + + + The variable type is inferred from the function return type. + Typ proměnné je odvozený z návratového typu funkce. + + + + This line uses '%d' to print the result as an integer. This is type-safe. + Tento řádek používá %d k vytištění výsledku jako celého čísla. Je to typově bezpečné. + + + + If 'result1' were not of type 'int', then the line would fail to compile. + Pokud by result1 nebyl typu int, pak by se kompilace řádku nezdařila. + + + + When needed, annotate the type of a parameter name using '(argument:type)'. Parentheses are required. + V případě potřeby anotujte typ názvu parametru pomocí (argument:typ). Závorky jsou povinné. + + + + Conditionals use if/then/elid/elif/else. + Podmíněné výrazy používají příkazy if, then, elid, elif, else. + + + + Note that F# uses whitespace indentation-aware syntax, similar to languages like Python. + Všimněte si, že F# používá syntaxi rozpoznávající odsazení pomocí mezer – je to podobné jako u jazyků, jako je Python. + + + + This line uses '%f' to print the result as a float. As with '%d' above, this is type-safe. + Tento řádek používá %f k vytištění výsledku jako hodnoty s plovoucí desetinnou čárkou. Stejně jako u výše uvedeného parametru %d je to typově bezpečné. + + + + Booleans are fundamental data types in F#. Here are some examples of Booleans and conditional logic. + Logické hodnoty představují základní datové typy v jazyce F#. Tady je několik příkladů logických hodnot a podmíněné logiky. + + + + To learn more, see: + Další informace: + + + + and + a + + + + Booleans values are 'true' and 'false'. + Logické hodnoty jsou true a false. + + + + Operators on booleans are 'not', '&&' and '||'. + Operátory u logických hodnot jsou not, && a ||. + + + + This line uses '%b'to print a boolean value. This is type-safe. + Tento řádek používá %b k vytištění logické hodnoty. Je to typově bezpečné. + + + + Strings are fundamental data types in F#. Here are some examples of Strings and basic String manipulation. + Řetězce představují základní datové typy v jazyce F#. Tady je několik příkladů řetězců a základní manipulace s nimi. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/strings + Další informace: https://docs.microsoft.com/cs-cz/dotnet/articles/fsharp/language-reference/strings + + + + Strings use double quotes. + Pro řetězce se používají dvojité uvozovky. + + + + Strings can also use @ to create a verbatim string literal. + V řetězcích je také možné použít @ k vytvoření řetězcového literálu verbatim. + + + + This will ignore escape characters such as '\', '\n', '\t', etc. + Tím se budou ignorovat řídicí znaky jako \, \n, \t apod. + + + + String literals can also use triple-quotes. + Řetězcové literály můžou používat také trojité uvozovky. + + + + String concatenation is normally done with the '+' operator. + Zřetězení se obvykle provádí operátorem +. + + + + This line uses '%s' to print a string value. This is type-safe. + Tento řádek používá %s k vytištění řetězcové hodnoty. Je to typově bezpečné. + + + + Substrings use the indexer notation. This line extracts the first 7 characters as a substring. + Podřetězce používají notaci indexeru. Tento řádek extrahuje prvních 7 znaků jako podřetězec. + + + + Note that like many languages, Strings are zero-indexed in F#. + Všimněte si, že jako v mnoha jiných jazycích mají řetězce v jazyce F# nulový index. + + + + Tuples are simple combinations of data values into a combined value. + Řazená kolekce členů představuje jedinou hodnotu vytvořenou jednoduchým zkombinováním hodnot dat. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/tuples + Další informace: https://docs.microsoft.com/cs-cz/dotnet/articles/fsharp/language-reference/tuples + + + + A simple tuple of integers. + Jednoduchá řazená kolekce členů v podobě celých čísel. + + + + A function that swaps the order of two values in a tuple. + Funkce, která zamění pořadí dvou hodnot v řazené kolekci členů + + + + F# Type Inference will automatically generalize the function to have a generic type, + Odvození typu proměnné v jazyce F# automaticky generalizuje funkci tak, aby byla obecného typu, + + + + meaning that it will work with any type. + což znamená, že bude fungovat s jakýmkoli typem. + + + + A tuple consisting of an integer, a string, + Řazená kolekce členů skládající se z celého čísla, řetězce + + + + and a double-precision floating point number. + a čísla s plovoucí desetinnou čárkou a dvojitou přesností + + + + A simple tuple of integers with a type annotation. + Jednoduchá řazená kolekce členů celých čísel s anotací typu + + + + Type annotations for tuples use the * symbol to separate elements + Anotace typů pro řazené kolekce členů používají k oddělování elementů symbol *. + + + + Tuples are normally objects, but they can also be represented as structs. + Řazené kolekce členů jsou obvykle objekty, ale můžou být vyjádřeny i jako struktury. + + + + These interoperate completely with structs in C# and Visual Basic.NET; however, + Ty zcela spolupracují se strukturami v jazycích C# a Visual Basic .NET. Platí ale, že + + + + struct tuples are not implicitly convertable with object tuples (often called reference tuples). + řazené kolekce členů představující struktury nejsou implicitně převeditelné na řazené kolekce členů představující objekty (často označované jako řazené kolekce členů odkazů). + + + + The second line below will fail to compile because of this. Uncomment it to see what happens. + Kompilace druhého řádku uvedeného níže se z tohoto důvodu nezdaří. Odkomentujte ho a podívejte se, co se stane. + + + + Although you cannot implicitly convert between struct tuples and reference tuples, + Mezi řazenými kolekcemi členů představujícími struktury a řazenými kolekcemi členů odkazů nemůžete provést implicitní převod, + + + + you can explicitly convert via pattern matching, as demonstrated below. + ale můžete převod provést explicitně přes porovnávání vzorů, jak je znázorněno níže. + + + + The F# pipe operators ('|>', '<|', etc.) and F# composition operators ('>>', '<<') + Operátory kanálu (|>, <| atd.) a operátory složení (>>, <<) v jazyce F# + + + + are used extensively when processing data. These operators are themselves functions + se při zpracovávání dat používají ve velkém měřítku. Tyto operátory představují samy o sobě funkce, + + + + which make use of Partial Application. + které využívají částečné použití argumentů. + + + + To learn more about these operators, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/#function-composition-and-pipelining + Další informace o těchto operátorech: https://docs.microsoft.com/cs-cz/dotnet/articles/fsharp/language-reference/functions/#function-composition-and-pipelining + + + + To learn more about Partial Application, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/#partial-application-of-arguments + Další informace o částečném použití argumentů: https://docs.microsoft.com/cs-cz/dotnet/articles/fsharp/language-reference/functions/#partial-application-of-arguments + + + + Squares a value. + Umocní hodnotu na druhou. + + + + Adds 1 to a value. + Přičte 1 k hodnotě. + + + + Tests if an integer value is odd via modulo. + Otestuje, jestli je celočíselná hodnota lichá na základě zbytku po dělení. + + + + A list of 5 numbers. More on lists later. + Seznam 5 čísel. Více o seznamech později. + + + + Given a list of integers, it filters out the even numbers, + V daném seznamu celých čísel odfiltruje sudá čísla, + + + + squares the resulting odds, and adds 1 to the squared odds. + umocní výsledná lichá čísla na druhou a přičte 1 k lichým číslům umocněným na druhou. + + + + A shorter way to write 'squareOddValuesAndAddOne' is to nest each + Kratší způsob, jak napsat squareOddValuesAndAddOne, je vnořit jednotlivé + + + + sub-result into the function calls themselves. + dílčí výsledky přímo do volání funkcí. + + + + This makes the function much shorter, but it's difficult to see the + Díky tomu může být funkce mnohem kratší, ale je obtížné sledovat + + + + order in which the data is processed. + pořadí, v jakém se data zpracovávají. + + + + A preferred way to write 'squareOddValuesAndAddOne' is to use F# pipe operators. + Preferovaným způsobem, jak napsat squareOddValuesAndAddOne, je použití operátorů kanálu v jazyce F#. + + + + This allows you to avoid creating intermediate results, but is much more readable + To vám umožní vyhnout se vytváření mezivýsledků, ale je to mnohem čitelnější + + + + than nesting function calls like 'squareOddValuesAndAddOneNested' + než vnoření volání funkcí, jak je vidět v squareOddValuesAndAddOneNested. + + + + You can shorten 'squareOddValuesAndAddOnePipeline' by moving the second `List.map` call + Můžete zkrátit squareOddValuesAndAddOnePipeline přesunutím druhého volání List.map + + + + into the first, using a Lambda Function. + do prvního, pomocí funkce lambda. + + + + Note that pipelines are also being used inside the lambda function. F# pipe operators + Všimněte si, že kanály se používají i ve funkci lambda. Operátory kanálu v jazyce F# + + + + can be used for single values as well. This makes them very powerful for processing data. + se dají použít i pro jednotlivé hodnoty. Díky tomu jsou velmi efektivní při zpracovávání dat. + + + + Lastly, you can eliminate the need to explicitly take 'values' in as a parameter by using '>>' + A konečně, můžete eliminovat nutnost explicitně převzít values jako parametr pomocí >> + + + + to compose the two core operations: filtering out even numbers, then squaring and adding one. + s cílem sestavit dvě základní operace: odfiltrování sudých čísel a následné umocnění na druhou a přičtení jedné. + + + + Likewise, the 'fun x -> ...' bit of the lambda expression is also not needed, because 'x' is simply + Obdobně není nutná část výrazu lambda „fun x -> ...“, protože x se jednoduše + + + + being defined in that scope so that it can be passed to a functional pipeline. Thus, '>>' can be used + v tomto oboru definuje tak, aby ho bylo možné předat jako funkční kanál. Proto je tam >> možné použít + + + + there as well. + také. + + + + The result of 'squareOddValuesAndAddOneComposition' is itself another function which takes a + Výsledek squareOddValuesAndAddOneComposition je sám o sobě další funkcí, která přebírá + + + + list of integers as its input. If you execute 'squareOddValuesAndAddOneComposition' with a list + jako vstup seznam celých čísel. Pokud provedete squareOddValuesAndAddOneComposition se seznamem + + + + of integers, you'll notice that it produces the same results as previous functions. + celých čísel, všimnete si, že dává stejné výsledky jako předchozí funkce. + + + + This is using what is known as function composition. This is possible because functions in F# + Označuje se to jako složení funkcí. Je to možné, protože funkce v jazyce F# + + + + use Partial Application and the input and output types of each data processing operation match + používají částečné použití argumentů a vstupní a výstupní typy každé operace zpracování dat odpovídají + + + + the signatures of the functions we're using. + signaturám funkcí, které používáme. + + + + Lists are ordered, immutable, singly-linked lists. They are eager in their evaluation. + Seznamy jsou uspořádané, neměnné a jednorázově propojené. Velmi dynamicky se vyhodnocují. + + + + This module shows various ways to generate lists and process lists with some functions + Tento modul zobrazuje různé způsoby, jak generovat seznamy a jak je zpracovat pomocí některých funkcí + + + + in the 'List' module in the F# Core Library. + v modulu List v knihovně F# Core. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/lists + Další informace: https://docs.microsoft.com/cs-cz/dotnet/articles/fsharp/language-reference/lists + + + + Lists are defined using [ ... ]. This is an empty list. + Seznamy se definují pomocí syntaxe [ ... ]. Toto je prázdný seznam. + + + + This is a list with 3 elements. ';' is used to separate elements on the same line. + Toto je seznam se 3 elementy. K oddělení prvků na stejném řádku se používá středník (;). + + + + You can also separate elements by placing them on their own lines. + Elementy můžete oddělit i jejich umístěním na samostatné řádky. + + + + This is a list of integers from 1 to 1000 + Toto je seznam celých čísel od 1 do 1000 + + + + Lists can also be generated by computations. This is a list containing + Seznamy je možné generovat pomocí výpočtů. Toto je seznam obsahující + + + + all the days of the year. + všechny dny v roce. + + + + Print the first 5 elements of 'daysList' using 'List.take'. + Vytiskněte prvních 5 elementů daysList pomocí List.take. + + + + Computations can include conditionals. This is a list containing the tuples + Výpočty můžou obsahovat podmíněné výrazy. Toto je seznam obsahující řazené kolekce členů + + + + which are the coordinates of the black squares on a chess board. + což jsou souřadnice černých polí na šachovnici. + + + + Lists can be transformed using 'List.map' and other functional programming combinators. + Seznamy se dají transformovat pomocí souboru List.map a dalších funkčních programových kombinátorů. + + + + This definition produces a new list by squaring the numbers in numberList, using the pipeline + Tato definice vytvoří nový seznam vypočítáním druhých mocnin hodnot v seznamu numberList pomocí kanálu + + + + operator to pass an argument to List.map. + operátor pro předání argumentu do souboru List.map. + + + + There are many other list combinations. The following computes the sum of the squares of the + Existuje mnoho dalších kombinací seznamů. Následující kód vypočítá součet druhých mocnin + + + + numbers divisible by 3. + čísel dělitelných 3. + + + + Arrays are fixed-size, mutable collections of elements of the same type. + Pole jsou měnitelné kolekce s pevně stanovenou velikostí, které obsahují elementy stejného typu. + + + + Although they are similar to Lists (they support enumeration and have similar combinators for data processing), + I když se podobají seznamům (podporují výčet a mají podobné kombinátory pro zpracování dat), + + + + they are generally faster and support fast random access. This comes at the cost of being less safe by being mutable. + jsou obecně rychlejší a podporují rychlý náhodný přístup. Nevýhodou je nižší zabezpečení, protože je možné je měnit. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/arrays + Další informace: https://docs.microsoft.com/cs-cz/dotnet/articles/fsharp/language-reference/arrays + + + + This is The empty array. Note that the syntax is similar to that of Lists, but uses `[| ... |]` instead. + Toto je prázdné pole. Všimněte si, že syntaxe je podobná seznamům, ale používá se [| ... |]. + + + + Arrays are specified using the same range of constructs as lists. + Pole jsou definovaná pomocí stejného rozsahu konstruktorů jako seznamy. + + + + This is an array of numbers from 1 to 1000. + Toto je pole čísel od 1 do 1000. + + + + This is an array containing only the words "hello" and "world". + Toto je pole obsahující pouze slova hello a world. + + + + This is an array initialized by index and containing the even numbers from 0 to 2000. + Toto je pole inicializované indexem, které obsahuje sudá čísla od 0 do 2000. + + + + Sub-arrays are extracted using slicing notation. + Dílčí pole se extrahují pomocí slicingové notace. + + + + You can loop over arrays and lists using 'for' loops. + Přes pole a seznamy se můžete přesunovat pomocí smyček for. + + + + You can modify the contents of an an array element by using the left arrow assignment operator. + Můžete upravit obsah elementu pole pomocí operátoru přiřazení s šipkou doleva. + + + + To learn more about this operator, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/values/index#mutable-variables + Další informace o tomto operátoru: https://docs.microsoft.com/cs-cz/dotnet/articles/fsharp/language-reference/values/index#mutable-variables + + + + You can transform arrays using 'Array.map' and other functional programming operations. + Pole můžete transformovat pomocí Array.map a dalších funkčních programových operací. + + + + The following calculates the sum of the lengths of the words that start with 'h'. + Následující kód vypočítá součet délek slov, která začínají na „h“. + + + + Sequences are a logical series of elements, all of the same type. These are a more general type than Lists and Arrays. + Sekvence jsou logické řady elementů, které jsou všechny stejného typu. Jedná se o obecnější typ než seznamy a pole. + + + + Sequences are evaluated on-demand and are re-evaluated each time they are iterated. + Sekvence se vyhodnocují na vyžádání a při každé iteraci se vyhodnocují znovu. + + + + An F# sequence is an alias for a .NET System.Collections.Generic.IEnumerable<'T>. + Sekvence F# je alias pro .NET System.Collections.Generic.IEnumerable<'T>. + + + + Sequence processing functions can be applied to Lists and Arrays as well. + Funkce na zpracování sekvencí je možné použít také na seznamy a pole. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/sequences + Další informace: https://docs.microsoft.com/cs-cz/dotnet/articles/fsharp/language-reference/sequences + + + + This is the empty sequence. + Toto je prázdná sekvence. + + + + This a sequence of values. + Toto je sekvence hodnot. + + + + This is an on-demand sequence from 1 to 1000. + Toto je sekvence na vyžádání od 1 do 1000. + + + + This is a sequence producing the words "hello" and "world" + Toto je sekvence, která vrátí slova hello a world + + + + This sequence producing the even numbers up to 2000. + Tato sekvence vrátí sudá čísla až do 2000. + + + + This is an infinite sequence which is a random walk. + Toto je nekonečná sekvence, která je náhodnou funkcí walk. + + + + This example uses yield! to return each element of a subsequence. + Tento příklad vrací pomocí příkazu yield! jednotlivé elementy dílčí sekvence. + + + + This example shows the first 100 elements of the random walk. + Tento příklad ukazuje prvních 100 elementů náhodné funkce walk. + + + + Recursive functions can call themselves. In F#, functions are only recursive + Rekurzivní funkce můžou volat samy sebe. V F# jsou všechny funkce rekurzivní + + + + when declared using 'let rec'. + při deklarování pomocí let rec. + + + + Recursion is the preferred way to process sequences or collections in F#. + Rekurze je preferovaný způsob zpracování sekvencí nebo kolekcí v jazyce F#. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/index#recursive-functions + Další informace: https://docs.microsoft.com/cs-cz/dotnet/articles/fsharp/language-reference/functions/index#recursive-functions + + + + This example shows a recursive function that computes the factorial of an + Tento příklad ukazuje rekurzivní funkci, která vypočítá faktoriál + + + + integer. It uses 'let rec' to define a recursive function. + integer. Pomocí let rec se definuje rekurzivní funkce. + + + + Computes the greatest common factor of two integers. + Vypočítá největšího společného dělitele dvou celých čísel. + + + + Since all of the recursive calls are tail calls, + Vzhledem k tomu, že všechna rekurzivní volání jsou volání funkce Tail, + + + + the compiler will turn the function into a loop, + kompilátor změní funkci na smyčku, + + + + which improves performance and reduces memory consumption. + což zvyšuje výkon a snižuje spotřebu paměti. + + + + This example computes the sum of a list of integers using recursion. + Tento příklad zjistí součet seznamu celých čísel pomocí rekurze. + + + + This makes 'sumList' tail recursive, using a helper function with a result accumulator. + Tím se funkce Tail sumList stane rekurzivní, a to s použitím pomocné funkce s akumulátorem výsledků. + + + + This invokes the tail recursive helper function, providing '0' as a seed accumulator. + Tím se vyvolá rekurzivní pomocná funkce Tail, poskytující 0 jako zdrojový akumulátor. + + + + An approach like this is common in F#. + Takový postup je v jazyce F# běžný. + + + + Records are an aggregate of named values, with optional members (such as methods). + Záznamy jsou agregátem pojmenovaných hodnot s volitelnými členy (jako jsou metody). + + + + They are immutable and have structural equality semantics. + Jsou neměnné a mají sémantiku se strukturální rovností. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/records + Další informace: https://docs.microsoft.com/cs-cz/dotnet/articles/fsharp/language-reference/records + + + + This example shows how to define a new record type. + Tento příklad ukazuje, jak definovat nový typ záznamu. + + + + This example shows how to instantiate a record type. + Tento příklad ukazuje, jak vytvořit instanci typu záznamu. + + + + You can also do this on the same line with ';' separators. + Můžete to udělat i na stejném řádku se středníky (;) jako oddělovači. + + + + This example shows how to use "copy-and-update" on record values. It creates + Tento příklad ukazuje, jak použít copy-and-update pro hodnoty záznamu. Vytvoří + + + + a new record value that is a copy of contact1, but has different values for + hodnotu nového záznamu, která je kopií záznamu contact1, ale má jiné hodnoty pro + + + + the 'Phone' and 'Verified' fields. + pole Telefon a Ověřeno. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/copy-and-update-record-expressions + Další informace: https://docs.microsoft.com/cs-cz/dotnet/articles/fsharp/language-reference/copy-and-update-record-expressions + + + + This example shows how to write a function that processes a record value. + Tento příklad ukazuje, jak napsat funkci, která zpracuje hodnotu záznamu. + + + + It converts a 'ContactCard' object to a string. + Převádí objekt ContactCard na řetězec. + + + + This is an example of a Record with a member. + Toto je příklad záznamu se členem. + + + + Members can implement object-oriented members. + Členové můžou implementovat objektově orientované členy. + + + + Members are accessed via the '.' operator on an instantiated type. + Ke členům se přistupuje prostřednictvím operátoru „.“ u typu tvořícího instanci. + + + + Records can also be represented as structs via the 'Struct' attribute. + Záznamy můžou být vyjádřeny i jako struktury prostřednictvím atributu Struct. + + + + This is helpful in situations where the performance of structs outweighs + To je užitečné v situacích, kdy má výkon struktur větší váhu než + + + + the flexibility of reference types. + flexibilita odkazových typů. + + + + Discriminated Unions (DU for short) are values which could be a number of named forms or cases. + Rozlišovaná sjednocení (zkratka: DU) jsou hodnoty, které můžou představovat celou řadu pojmenovaných forem nebo případů. + + + + Data stored in DUs can be one of several distinct values. + Data uložená v DU můžou představovat jednu z několika různých hodnot. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/discriminated-unions + Další informace: https://docs.microsoft.com/cs-cz/dotnet/articles/fsharp/language-reference/discriminated-unions + + + + The following represents the suit of a playing card. + Následující příklad představuje barvu hrací karty. + + + + A Disciminated Union can also be used to represent the rank of a playing card. + Rozlišované sjednocení může také představovat hodnotu hrací karty. + + + + Represents the rank of cards 2 .. 10 + Představuje hodnotu karet 2 .. 10. + + + + Discriminated Unions can also implement object-oriented members. + Rozlišovaná sjednocení můžou také implementovat objektově orientované členy. + + + + This is a record type that combines a Suit and a Rank. + Toto je typ záznamu, který kombinuje barvu a hodnotu hrací karty. + + + + It's common to use both Records and Disciminated Unions when representing data. + Při vyjadřování dat se běžně používají záznamy i rozlišovaná sjednocení. + + + + This computes a list representing all the cards in the deck. + Tady se vypočítá seznam představující všechny karty z balíčku. + + + + This example converts a 'Card' object to a string. + Tento příklad převede objekt Card na řetězec. + + + + This example prints all the cards in a playing deck. + Tento příklad vytiskne všechny karty v hracím balíčku. + + + + Single-case DUs are often used for domain modeling. This can buy you extra type safety + Rozlišovaná sjednocení s jedním případem se často používají pro modelování domén. Tím můžete získat dodatečnou bezpečnost typů + + + + over primitive types such as strings and ints. + oproti primitivním typům, jako jsou řetězce a celá čísla. + + + + Single-case DUs cannot be implicitly converted to or from the type they wrap. + Rozlišovaná sjednocení s jedním případem nejde implicitně převést na typ nebo z typu, který obalují. + + + + For example, a function which takes in an Address cannot accept a string as that input, + Například funkce, která přebírá adresu, nemůže jako vstup převzít řetězec + + + + or vive/versa. + a naopak. + + + + You can easily instantiate a single-case DU as follows. + Instanci rozlišovaného sjednocení s jedním případem můžete snadno vytvořit následujícím způsobem. + + + + When you need the value, you can unwrap the underlying value with a simple function. + Pokud danou hodnotu potřebujete, můžete základní hodnotu rozbalit pomocí jednoduché funkce. + + + + Printing single-case DUs is simple with unwrapping functions. + Tisk rozlišovaných sjednocení s jedním případem je jednoduchý s použitím rozbalovacích funkcí. + + + + Disciminated Unions also support recursive definitions. + Rozlišovaná sjednocení podporují i rekurzivní definice. + + + + This represents a Binary Search Tree, with one case being the Empty tree, + Toto představuje binární vyhledávací strom, přičemž jeden případ je prázdný strom + + + + and the other being a Node with a value and two subtrees. + a druhý je uzel s hodnotou a dvěma podstromy. + + + + Check if an item exists in the binary search tree. + Zkontroluje, jestli položka existuje v binárním vyhledávacím stromu. + + + + Searches recursively using Pattern Matching. Returns true if it exists; otherwise, false. + Rekurzivně vyhledává porovnáváním vzorů. Vrátí hodnotu true, pokud existuje; v opačném případě false. + + + + Check the left subtree. + Zkontroluje levý podstrom. + + + + Check the right subtree. + Zkontroluje pravý podstrom. + + + + Inserts an item in the Binary Search Tree. + Vloží položku do binárního vyhledávacího stromu. + + + + Finds the place to insert recursively using Pattern Matching, then inserts a new node. + Najde místo pro rekurzivní vložení pomocí porovnávání vzorů a pak vloží nový uzel. + + + + If the item is already present, it does not insert anything. + Pokud je už položka přítomna, nevloží nic. + + + + No need to insert, it already exists; return the node. + Nemusí se vkládat, už existuje; vrátí se uzel. + + + + Call into left subtree. + Provede volání do levého podstromu. + + + + Call into right subtree. + Provede volání do pravého podstromu. + + + + Discriminated Unions can also be represented as structs via the 'Struct' attribute. + Rozlišovaná sjednocení můžou být vyjádřena i jako struktury prostřednictvím atributu Struct. + + + + This is helpful in situations where the performance of structs outweighs + To je užitečné v situacích, kdy má výkon struktur větší váhu než + + + + the flexibility of reference types. + flexibilita odkazových typů. + + + + However, there are two important things to know when doing this: + Při tomto postupu je ale třeba vědět dvě důležité věci: + + + + 1. A struct DU cannot be recursively-defined. + 1. Rozlišované sjednocení typu struktura nemůže být definované rekurzivně. + + + + 2. A struct DU must have unique names for each of its cases. + 2. Rozlišované sjednocení typu struktura musí mít jedinečné názvy pro každý ze svých případů. + + + + Pattern Matching is a feature of F# that allows you to utilize Patterns, + Porovnávání vzorů je funkce jazyka F#, která umožňuje používat vzory, + + + + which are a way to compare data with a logical structure or structures, + což představuje způsob, jak porovnávat data s logickou strukturou nebo strukturami, + + + + decompose data into constituent parts, or extract information from data in various ways. + jak rozložit data na základní části nebo extrahovat informace z dat různými způsoby. + + + + You can then dispatch on the "shape" of a pattern via Pattern Matching. + Odesílání pak můžete provádět na základě vzoru v rámci porovnávání vzorů. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/pattern-matching + Další informace: https://docs.microsoft.com/cs-cz/dotnet/articles/fsharp/language-reference/pattern-matching + + + + A record for a person's first and last name + Záznam pro jméno a příjmení daného člověka + + + + A Discriminated Union of 3 different kinds of employees + Rozlišované sjednocení se 3 různými typy zaměstnanců + + + + Count everyone underneath the employee in the management hierarchy, + Spočítají se všichni zaměstnanci pod daným zaměstnancem v hierarchii řízení, + + + + including the employee. + včetně tohoto zaměstnance. + + + + Find all managers/executives named "Dave" who do not have any reports. + Vyhledá všechny nadřízené/výkonné pracovníky se jménem Dave, kteří nemají žádné podřízené. + + + + This uses the 'function' shorthand to as a lambda expression. + Tady se používá zkrácený název function jako výraz lambda. + + + + [] matches an empty list. + [] odpovídá prázdnému seznamu. + + + + '_' is a wildcard pattern that matches anything. + „_“ je zástupný vzor, kterému odpovídá úplně všechno. + + + + This handles the "or else" case. + Toto řeší případ „or else“ + + + + You can also use the shorthand function construct for pattern matching, + Můžete také použít zkrácenou konstrukci function pro porovnávání vzorů, + + + + which is useful when you're writing functions which make use of Partial Application. + což je užitečné při psaní funkcí, které využívají částečné použití argumentů. + + + + Define some more functions which parse with the helper function. + Definujte pár dalších funkcí, které se analyzují s pomocnou funkcí. + + + + Active Patterns are another powerful construct to use with pattern matching. + Aktivní vzory představují další efektivní konstrukci pro použití s porovnáváním vzorů. + + + + They allow you to partition input data into custom forms, decomposing them at the pattern match call site. + Umožňují rozdělit vstupní data do vlastních forem, přičemž se rozkládají v místě volání porovnávání vzorů. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/active-patterns + Další informace: https://docs.microsoft.com/cs-cz/dotnet/articles/fsharp/language-reference/active-patterns + + + + Pattern Matching via 'function' keyword and Active Patterns often looks like this. + Porovnávání vzorů přes klíčové slovo function a aktivní vzory často vypadá takto. + + + + Call the printer with some different values to parse. + Volání tiskárny s nějakými jinými hodnotami k parsování + + + + Option values are any kind of value tagged with either 'Some' or 'None'. + Hodnotami parametru můžou být hodnoty jakéhokoliv typu s označením Some (Nějaké) nebo None (Žádné). + + + + They are used extensively in F# code to represent the cases where many other + Používají se často v kódu F#, kde reprezentují případy, ve kterých by se v řadě jiných + + + + languages would use null references. + jazyků používaly odkazy null. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/options + Další informace: https://docs.microsoft.com/cs-cz/dotnet/articles/fsharp/language-reference/options + + + + First, define a zipcode defined via Single-case Discriminated Union. + Nejprve definujte PSČ prostřednictvím rozlišovaného sjednocení s jedním případem. + + + + Next, define a type where the ZipCode is optional. + Dále definujte typ, kde je PSČ volitelné. + + + + Next, define an interface type that represents an object to compute the shipping zone for the customer's zip code, + Potom definujte typ rozhraní, který bude představovat objekt pro výpočet expediční oblasti pro PSČ zákazníka + + + + given implementations for the 'getState' and 'getShippingZone' abstract methods. + se zohledněním implementací pro abstraktní metody getState a getShippingZone. + + + + Next, calculate a shipping zone for a customer using a calculator instance. + Dále vypočítejte expediční oblast pro zákazníka pomocí instance kalkulačky. + + + + This uses combinators in the Option module to allow a functional pipeline for + Tady se používají kombinátory v modulu Option, pomocí kterých se povoluje funkční kanál pro + + + + transforming data with Optionals. + transformaci dat s volitelnými hodnotami. + + + + Units of measure are a way to annotate primitive numeric types in a type-safe way. + Měrné jednotky jsou způsob, jak anotovat primitivní číselné typy typově bezpečnou metodou. + + + + You can then perform type-safe arithmetic on these values. + Pak u těchto hodnot můžete provádět typově bezpečnou aritmetiku. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/units-of-measure + Další informace: https://docs.microsoft.com/cs-cz/dotnet/articles/fsharp/language-reference/units-of-measure + + + + First, open a collection of common unit names + Nejdříve otevřete kolekci běžných názvů jednotek. + + + + Define a unitized constant + Definovat unifikovanou konstantu + + + + Next, define a new unit type + Potom definujte nový typ jednotky + + + + Conversion factor mile to meter. + Přepočtový koeficient pro přepočet mílí na metry + + + + Define a unitized constant + Definovat unifikovanou konstantu + + + + Compute metric-system constant + Vypočítat konstantu v metrickém systému + + + + Values using Units of Measure can be used just like the primitive numeric type for things like printing. + Hodnoty s měrnými jednotkami je možné používat stejně jako primitivní číselný typ pro operace, jako je tisk. + + + + Classes are a way of defining new object types in F#, and support standard Object-oriented constructs. + Třídy představují způsob definice nových objektových typů v jazyce F# a podporují standardní objektově orientované konstrukce. + + + + They can have a variety of members (methods, properties, events, etc.) + Můžou mít celou řadu členů (metody, vlastnosti, události atd.). + + + + To learn more about Classes, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/classes + Další informace o třídách: https://docs.microsoft.com/cs-cz/dotnet/articles/fsharp/language-reference/classes + + + + To learn more about Members, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/members + Další informace o členech: https://docs.microsoft.com/cs-cz/dotnet/articles/fsharp/language-reference/members + + + + A simple two-dimensional Vector class. + Jednoduchá dvojrozměrná vektorová třída. + + + + The class's constructor is on the first line, + Konstruktor třídy je na prvním řádku + + + + and takes two arguments: dx and dy, both of type 'double'. + a přebírá dva argumenty: dx a dy, oba typu double. + + + + This internal field stores the length of the vector, computed when the + Toto interní pole ukládá délku vektoru vypočítanou při + + + + object is constructed + zkonstruování objektu + + + + 'this' specifies a name for the object's self identifier. + this určuje název identifikátoru samotného objektu. + + + + In instance methods, it must appear before the member name. + V metodách instancí se musí objevovat před názvem člena. + + + + This member is a method. The previous members were properties. + Tento člen je metoda. Předchozí členové představují vlastnosti. + + + + This is how you instantiate the Vector2D class. + Toto je způsob, jak vytvořit instanci třídy Vector2D. + + + + Get a new scaled vector object, without modifying the original object. + Získá nový škálovaný vektorový objekt, aniž by se změnil původní objekt. + + + + Generic classes allow types to be defined with respect to a set of type parameters. + Obecné třídy umožňují definování typů s ohledem na sadu parametrů typu. + + + + In the following, 'T is the type parameter for the class. + V následujícím příkladu „T“ představuje parametr typu pro třídu. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/generics/ + Další informace: https://docs.microsoft.com/cs-cz/dotnet/articles/fsharp/language-reference/generics/ + + + + This internal field store the states in a list. + Toto interní pole ukládá stavy v seznamu. + + + + Add a new element to the list of states. + Přidá nový element do seznamu stavů. + + + + use the '<-' operator to mutate the value. + Použije operátor <- ke změně (mutaci) hodnoty. + + + + Get the entire list of historical states. + Získá celý seznam historických stavů. + + + + Get the latest state. + Získá nejnovější stav. + + + + An 'int' instance of the state tracker class. Note that the type parameter is inferred. + Instance int třídy pro sledování stavů. Poznámka: Parametr typu je odvozený. + + + + Add a state + Přidat stav + + + + Interfaces are object types with only 'abstract' members. + Rozhraní jsou typy objektů pouze s členy abstract. + + + + Object types and object expressions can implement interfaces. + Objektové typy a výrazy můžou implementovat rozhraní. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/interfaces + Další informace: https://docs.microsoft.com/cs-cz/dotnet/articles/fsharp/language-reference/interfaces + + + + This is a type that implements IDisposable. + Toto je typ, který implementuje rozhraní IDisposable. + + + + This is the implementation of IDisposable members. + Toto je implementace členů IDisposable. + + + + This is an object that implements IDisposable via an Object Expression + Toto je objekt, který implementuje IDisposable pomocí výrazu objektu. + + + + Unlike other languages such as C# or Java, a new type definition is not needed + Na rozdíl od jiných jazyků, jako jsou C# nebo Java, není nutná nová definice typu + + + + to implement an interface. + pro implementaci rozhraní. + + + + The FSharp.Core library defines a range of parallel processing functions. Here + Knihovna FSharp.Core definuje rozsah funkcí paralelního zpracování. Tady + + + + you use some functions for parallel processing over arrays. + použijete některé funkce pro paralelní zpracování polí. + + + + To learn more, see: https://msdn.microsoft.com/en-us/visualfsharpdocs/conceptual/array.parallel-module-%5Bfsharp%5D + Další informace: https://msdn.microsoft.com/cs-cz/visualfsharpdocs/conceptual/array.parallel-module-%5Bfsharp%5D + + + + First, an array of inputs. + Nejdříve pole vstupů. + + + + Next, define a functions that does some CPU intensive computation. + Dále definujte funkci, která bude provádět výpočty náročné na procesor. + + + + Next, do a parallel map over a large input array. + Dále proveďte paralelní mapování přes velké vstupní pole. + + + + Next, print the results. + Potom vytiskněte výsledky. + + + + Events are a common idiom for .NET programming, especially with WinForms or WPF applications. + Události jsou běžné základní struktury programového kódu .NET, zejména s aplikacemi WinForms nebo WPF. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/members/events + Další informace: https://docs.microsoft.com/cs-cz/dotnet/articles/fsharp/language-reference/members/events + + + + First, create instance of Event object that consists of subscription point (event.Publish) and event trigger (event.Trigger). + Nejdříve vytvořte instanci objektu Event, který se bude skládat z bodu odběru (event.Publish) a aktivační události (event.Trigger). + + + + Next, add handler to the event. + Potom přidejte obslužnou rutinu pro událost. + + + + Next, trigger the event. + Potom spusťte událost. + + + + Next, create an instance of Event that follows standard .NET convention: (sender, EventArgs). + Potom vytvořte instanci objektu Event podle standardní konvence .NET: (sender, EventArgs). + + + + Next, add a handler for this new event. + Dále přidejte obslužnou rutinu pro tuto novou událost. + + + + Next, trigger this event (note that sender argument should be set). + Potom spusťte tuto událost (poznámka: musí být nastavený argument odesílatele). + + + + + \ No newline at end of file diff --git a/vsintegration/ProjectTemplates/TutorialProject/Template/xlf/Tutorial.fsx.de.xlf b/vsintegration/ProjectTemplates/TutorialProject/Template/xlf/Tutorial.fsx.de.xlf new file mode 100644 index 00000000000..34712e5a59d --- /dev/null +++ b/vsintegration/ProjectTemplates/TutorialProject/Template/xlf/Tutorial.fsx.de.xlf @@ -0,0 +1,1637 @@ + + + + + + This sample will guide you through elements of the F# language. + Dieses Beispiel zeigt Ihnen verschiedene Elemente der F#-Programmiersprache. + + + + To execute the code in F# Interactive, highlight a section of code and press Alt-Enter or right-click + Markieren Sie zum Ausführen des Codes in F# Interactive einen Codeabschnitt, und drücken Sie dann entweder ALT+EINGABETASTE oder klicken Sie mit der rechten Maustaste + + + + and select "Execute in Interactive". You can open the F# Interactive Window from the "View" menu. + und wählen Sie "In Interactive ausführen" aus. Sie können das F# Interactive-Fenster über das Menü "Ansicht" öffnen. + + + + For more about F#, see: + Weitere Informationen zu F# finden Sie unter: + + + + To see this tutorial in documentation form, see: + Dieses Tutorial ist auch als Dokumentation verfügbar. Siehe hierzu: + + + + To learn more about applied F# programming, use + Verwenden Sie Folgendes, um weitere Informationen zur praktischen F#-Programmierung zu erhalten: + + + + To install the Visual F# Power Tools, use + Verwenden Sie Folgendes, um die Visual F# Power Tools zu installieren: + + + + 'Tools' --> 'Extensions and Updates' --> `Online` and search + "Extras" > "Erweiterungen und Updates" > "Online", und suchen Sie nach + + + + For additional templates to use with F#, see the 'Online Templates' in Visual Studio, + Weitere Vorlagen zum Verwenden mit F# finden Sie in Visual Studio unter "Onlinevorlagen", + + + + 'New Project' --> 'Online Templates' + "Neue Projekte" > "Onlinevorlagen". + + + + F# supports three kinds of comments: + F# unterstützt drei Arten von Kommentaren: + + + + 1. Double-slash comments. These are used in most situations. + 1. Kommentare mit doppeltem Schrägstrich. Diese werden in den meisten Situationen verwendet. + + + + 2. ML-style Block comments. These aren't used that often. + 2. Blockkommentare im ML-Stil. Diese werden nicht sehr häufig verwendet. + + + + 3. Triple-slash comments. These are used for documenting functions, types, and so on. + 3. Kommentare mit drei Schrägstrichen. Diese werden zum Dokumentieren von Funktionen, Typen usw. verwendet. + + + + They will appear as text when you hover over something which is decorated with these comments. + Sie erscheinen als Text, wenn Sie den Mauszeiger über einem Element positionieren, das mit diesen Kommentaren versehen ist. + + + + They also support .NET-style XML comments, which allow you to generate reference documentation, + Sie bieten außerdem Unterstützung für XML-Kommentare im .NET-Stil zum Generieren von Referenzdokumentation, + + + + and they also allow editors (such as Visual Studio) to extract information from them. + und sie ermöglichen das Extrahieren von Informationen über Editoren (z. B. Visual Studio). + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/xml-documentation + Weitere Informationen finden Sie unter: https://docs.microsoft.com/de-de/dotnet/articles/fsharp/language-reference/xml-documentation. + + + + Open namespaces using the 'open' keyword. + Öffnen Sie Namespaces mit dem Schlüsselwort "open". + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/import-declarations-the-open-keyword + Weitere Informationen finden Sie hier: https://docs.microsoft.com/de-de/dotnet/articles/fsharp/language-reference/import-declarations-the-open-keyword. + + + + A module is a grouping of F# code, such as values, types, and function values. + Ein Modul ist eine Gruppierung von F#-Code, z. B. Werte, Typen und Funktionswerte. + + + + Grouping code in modules helps keep related code together and helps avoid name conflicts in your program. + Die Codegruppierung in Modulen ermöglicht das Zusammenfassen von zueinander in Beziehung stehendem Code sowie das Vermeiden von Namenskonflikten in Ihrem Programm. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/modules + Weitere Informationen finden Sie unter: https://docs.microsoft.com/de-de/dotnet/articles/fsharp/language-reference/modules. + + + + This is a sample integer. + Dies ist ein Beispiel für eine Ganzzahl. + + + + This is a sample floating point number. + Dies ist ein Beispiel für eine Gleitkommazahl. + + + + This computed a new number by some arithmetic. Numeric types are converted using + Hier wird mithilfe einer arithmetischen Operation eine neue Zahl berechnet. Numerische Typen werden unter Verwendung der + + + + functions 'int', 'double' and so on. + Funktionen "int", "double" usw. konvertiert. + + + + This is a list of the numbers from 0 to 99. + Dies ist eine Liste der Zahlen von 0 bis 99. + + + + This is a list of all tuples containing all the numbers from 0 to 99 and their squares. + Dies ist eine Liste aller Tupel, die alle Zahlen von 0 bis 99 sowie Ihre Quadratzahlen enthalten. + + + + The next line prints a list that includes tuples, using '%A' for generic printing. + Die nächste Zeile gibt eine Liste mit Tupeln aus, wobei "%A" für die generische Ausgabe verwendet wird. + + + + This is a sample integer with a type annotation + Dies ist ein Beispiel für eine ganze Zahl mit einer Typanmerkung. + + + + Values in F# are immutable by default. They cannot be changed + Werte in F# sind standardmäßig unveränderlich. Sie können im Verlauf + + + + in the course of a program's execution unless explicitly marked as mutable. + der Ausführung eines Programms nicht geändert werden – es sei denn, sie sind explizit als änderbar gekennzeichnet. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/values/index#why-immutable + Weitere Informationen finden Sie unter: https://docs.microsoft.com/de-de/dotnet/articles/fsharp/language-reference/values/index#why-immutable + + + + Binding a value to a name via 'let' makes it immutable. + Wenn ein Wert mithilfe von "let" an einen Namen gebunden wird, ist er unveränderlich. + + + + The second line of code fails to compile because 'number' is immutable and bound. + Die zweite Codezeile kann nicht kompiliert werden, da "number" unveränderlich und gebunden ist. + + + + Re-defining 'number' to be a different value is not allowed in F#. + "number" darf in F# nicht als ein anderer Wert neu definiert werden. + + + + A mutable binding. This is required to be able to mutate the value of 'otherNumber'. + Eine veränderliche Bindung. Dies ist erforderlich, damit der Wert von "otherNumber" verändert werden kann. + + + + When mutating a value, use '<-' to assign a new value. + Wenn Sie einen Wert verändern, weisen Sie mithilfe von "<-" einen neuen Wert zu. + + + + You could not use '=' here for this purpose since it is used for equality + Sie können '=' hier nicht verwenden, da es für Gleichheit verwendet wird. + + + + or other contexts such as 'let' or 'module' + oder andere Kontexte wie "let" oder "module" + + + + Much of F# programming consists of defining functions that transform input data to produce + Bei der F#-Programmierung werden größtenteils Funktionen definiert, die Eingabedaten in hilfreiche + + + + useful results. + Ergebnisse umwandelt. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/ + Weitere Informationen finden Sie unter: https://docs.microsoft.com/de-de/dotnet/articles/fsharp/language-reference/functions/ + + + + You use 'let' to define a function. This one accepts an integer argument and returns an integer. + Verwenden Sie "let", um eine Funktion zu definieren. Diese akzeptiert ein Integer-Argument und gibt einen Integer zurück. + + + + Parentheses are optional for function arguments, except for when you use an explicit type annotation. + Klammern sind für Funktionsargumente optional, außer wenn Sie eine explizite Typanmerkung verwenden. + + + + Apply the function, naming the function return result using 'let'. + Die Funktion anwenden, und das Rückgabeergebnis der Funktion mithilfe von 'let' benennen. + + + + The variable type is inferred from the function return type. + Der Variablentyp wird vom Rückgabetyp der Funktion abgeleitet. + + + + This line uses '%d' to print the result as an integer. This is type-safe. + Diese Zeile verwendet "%d", um das Ergebnis als Integer zu drucken. Dies ist typsicher. + + + + If 'result1' were not of type 'int', then the line would fail to compile. + Wenn "result1" nicht vom Typ "int" wäre, würde die Kompilierung der Zeile fehlschlagen. + + + + When needed, annotate the type of a parameter name using '(argument:type)'. Parentheses are required. + Blenden Sie bei Bedarf den Typ eines Parameternamens mithilfe von "(argument:type)" ein. Klammern sind erforderlich. + + + + Conditionals use if/then/elid/elif/else. + Für Bedingungen wird Folgendes verwendet: if/then/elid/elif/else. + + + + Note that F# uses whitespace indentation-aware syntax, similar to languages like Python. + Bei der Syntax von F# werden ebenso wie bei Sprachen wie Python leerzeichenbasierte Einzüge beachtet. + + + + This line uses '%f' to print the result as a float. As with '%d' above, this is type-safe. + Diese Zeile verwendet "%f", um das Ergebnis als float-Eigenschaft zu drucken. Wie auch zuvor bei "%d" ist dies typsicher. + + + + Booleans are fundamental data types in F#. Here are some examples of Booleans and conditional logic. + Boolesche Werte sind grundlegende Datentypen in F#. Hier finden Sie einige Beispiele für boolesche Werte und Bedingungen. + + + + To learn more, see: + Weitere Informationen finden Sie unter: + + + + and + und + + + + Booleans values are 'true' and 'false'. + Boolesche Werte sind "true" und "false". + + + + Operators on booleans are 'not', '&&' and '||'. + Operatoren für boolesche Werte sind "not", "&&" und "||". + + + + This line uses '%b'to print a boolean value. This is type-safe. + Diese Zeile verwendet "%b" zum Drucken eines booleschen Werts. Dies ist typsicher. + + + + Strings are fundamental data types in F#. Here are some examples of Strings and basic String manipulation. + Zeichenfolgen sind grundlegende Datentypen in F#. Hier finden Sie einige Beispiele für Zeichenfolgen und Zeichenfolgenmanipulationen. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/strings + Weitere Informationen finden Sie unter: https://docs.microsoft.com/de-de/dotnet/articles/fsharp/language-reference/strings + + + + Strings use double quotes. + Für Zeichenfolgen werden doppelte Anführungszeichen verwendet. + + + + Strings can also use @ to create a verbatim string literal. + Mit "@" lassen sich ausführliche Zeichenfolgenliterale erstellen. + + + + This will ignore escape characters such as '\', '\n', '\t', etc. + Dadurch werden Escapezeichen wie "\", "\n", "\t" usw. ignoriert. + + + + String literals can also use triple-quotes. + Für Zeichenfolgen können auch dreifache Anführungszeichen verwendet werden. + + + + String concatenation is normally done with the '+' operator. + Die Verkettung von Zeichenfolgen erfolgt in der Regel mit dem Operator "+". + + + + This line uses '%s' to print a string value. This is type-safe. + Diese Zeile verwendet "%s" zum Drucken eines Zeichenfolgewerts. Dies ist typsicher. + + + + Substrings use the indexer notation. This line extracts the first 7 characters as a substring. + Für Teilzeichenfolgen wird die Indexernotation verwendet. Diese Zeile extrahiert die ersten sieben Zeichen als Teilzeichenfolge. + + + + Note that like many languages, Strings are zero-indexed in F#. + Im Gegensatz zu den meisten anderen Sprachen sind Zeichenfolgen in F# nullindiziert. + + + + Tuples are simple combinations of data values into a combined value. + Tupel sind einfache Datenwertkombinationen. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/tuples + Weitere Informationen finden Sie unter: https://docs.microsoft.com/de-de/dotnet/articles/fsharp/language-reference/tuples + + + + A simple tuple of integers. + Ein einfaches Tupel aus Integerwerten. + + + + A function that swaps the order of two values in a tuple. + Eine Funktion, die die Reihenfolge von zwei Werten in einem Tupel austauscht. + + + + F# Type Inference will automatically generalize the function to have a generic type, + Der F#-Typrückschluss generalisiert die Funktion automatisch und erstellt einen generischen Typ, + + + + meaning that it will work with any type. + d. h. er funktioniert mit jedem Typ. + + + + A tuple consisting of an integer, a string, + Ein Tupel aus einem Integer, einer Zeichenfolge + + + + and a double-precision floating point number. + und einer Gleitkommazahl mit doppelter Genauigkeit. + + + + A simple tuple of integers with a type annotation. + Ein einfaches Tupel aus Integerwerten mit einer Typanmerkung. + + + + Type annotations for tuples use the * symbol to separate elements + Typanmerkungen für Tupel trennen Elemente durch das *-Symbol. + + + + Tuples are normally objects, but they can also be represented as structs. + Tupel sind normalerweise Objekte, sie können aber auch als Strukturen dargestellt werden. + + + + These interoperate completely with structs in C# and Visual Basic.NET; however, + Sie arbeiten mit Strukturen in C# und Visual Basic.Net vollständig zusammen. + + + + struct tuples are not implicitly convertable with object tuples (often called reference tuples). + Strukturtupel sind jedoch nicht implizit mit Objekttupeln (häufig als Referenztupel bezeichnet) konvertierbar. + + + + The second line below will fail to compile because of this. Uncomment it to see what happens. + Die unten angezeigte zweite Zeile kann aus diesem Grund nicht kompiliert werden. Heben Sie die Auskommentierung auf, und sehen Sie, was passiert. + + + + Although you cannot implicitly convert between struct tuples and reference tuples, + Sie können zwar nicht implizit zwischen Strukturtupeln und Verweistupeln konvertieren, + + + + you can explicitly convert via pattern matching, as demonstrated below. + Sie können aber wie unten gezeigt eine explizite Konvertierung über den Musterabgleich durchführen. + + + + The F# pipe operators ('|>', '<|', etc.) and F# composition operators ('>>', '<<') + Die F#-PipeOperatoren ("|>", "<|" usw.) und die F#-Zusammensetzungsoperatoren (">>", "<<") + + + + are used extensively when processing data. These operators are themselves functions + werden bei der Datenverarbeitung umfassend eingesetzt. Diese Operatoren sind Funktionen, + + + + which make use of Partial Application. + die die partielle Anwendung nutzen. + + + + To learn more about these operators, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/#function-composition-and-pipelining + Weitere Informationen zu diesen Operatoren finden Sie unter: https://docs.microsoft.com/de-de/dotnet/articles/fsharp/language-reference/functions/#function-composition-and-pipelining + + + + To learn more about Partial Application, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/#partial-application-of-arguments + Weitere Informationen zur partiellen Anwendung finden Sie unter: https://docs.microsoft.com/de-de/dotnet/articles/fsharp/language-reference/functions/#partial-application-of-arguments + + + + Squares a value. + Quadriert einen Wert. + + + + Adds 1 to a value. + Addiert 1 zu einem Wert hinzu. + + + + Tests if an integer value is odd via modulo. + Testet mit Modulo, ob ein Integerwert gerade ist. + + + + A list of 5 numbers. More on lists later. + Eine Liste mit fünf Nummern. Weitere Informationen zu Listen finden Sie später. + + + + Given a list of integers, it filters out the even numbers, + Aus einer Liste mit Integern werden die geraden Zahlen herausgefiltert, + + + + squares the resulting odds, and adds 1 to the squared odds. + die sich ergebenden ungeraden Zahlen werden quadratiert, und zu dem Ergebnis wird 1 hinzuaddiert. + + + + A shorter way to write 'squareOddValuesAndAddOne' is to nest each + Eine kürzere Möglichkeit zum Schreiben von "squareOddValuesAndAddOne" besteht im Verschachteln von jedem + + + + sub-result into the function calls themselves. + Teilergebnis im Funktionsaufruf selbst. + + + + This makes the function much shorter, but it's difficult to see the + Dadurch wird die Funktion viel kürzer, + + + + order in which the data is processed. + die Reihenfolge der Datenverarbeitung ist jedoch schlechter sichtbar. + + + + A preferred way to write 'squareOddValuesAndAddOne' is to use F# pipe operators. + Eine bevorzugte Möglichkeit zum Schreiben von "squareOddValuesAndAddOne" besteht in der Verwendung von F#-Pipe-Operatoren. + + + + This allows you to avoid creating intermediate results, but is much more readable + Dadurch können Sie verhindern, dass Zwischenergebnisse erstellt werden, dies ist jedoch besser lesbar + + + + than nesting function calls like 'squareOddValuesAndAddOneNested' + als verschachtelte Funktionsaufrufe wie "squareOddValuesAndAddOneNested". + + + + You can shorten 'squareOddValuesAndAddOnePipeline' by moving the second `List.map` call + Sie können "squareOddValuesAndAddOnePipeline" kürzen, indem Sie den zweiten "List.map"-Aufruf + + + + into the first, using a Lambda Function. + mithilfe einer Lambda-Funktion in den ersten verschieben. + + + + Note that pipelines are also being used inside the lambda function. F# pipe operators + Pipelines werden auch innerhalb der Lambda-Funktion verwendet. F#-Pipe-Operatoren + + + + can be used for single values as well. This makes them very powerful for processing data. + können auch für einzelne Werte verwendet werden. So ist eine leistungsstarke Datenverarbeitung möglich. + + + + Lastly, you can eliminate the need to explicitly take 'values' in as a parameter by using '>>' + Es ist nicht mehr erforderlich, "values" als Parameter aufzunehmen, indem Sie mithilfe von ">>" + + + + to compose the two core operations: filtering out even numbers, then squaring and adding one. + die beiden zentralen Vorgänge erstellen: Herausfiltern von geraden Zahlen, Quadratieren und Addieren von 1. + + + + Likewise, the 'fun x -> ...' bit of the lambda expression is also not needed, because 'x' is simply + Der Teil "fun x -> ..." des Lambdaausdrucks ist dementsprechend ebenfalls nicht erforderlich, da "x" lediglich + + + + being defined in that scope so that it can be passed to a functional pipeline. Thus, '>>' can be used + in dem Bereich definiert wird, damit es an eine Funktionspipeline übergeben werden kann. Daher kann ">>" + + + + there as well. + dort ebenfalls verwendet werden. + + + + The result of 'squareOddValuesAndAddOneComposition' is itself another function which takes a + Das Ergebnis von "squareOddValuesAndAddOneComposition" selbst ist eine andere Funktion, die eine + + + + list of integers as its input. If you execute 'squareOddValuesAndAddOneComposition' with a list + Liste von Integern als Eingabe verwendet. Wenn Sie "squareOddValuesAndAddOneComposition" mit einer Liste + + + + of integers, you'll notice that it produces the same results as previous functions. + von Integern ausführen, erhalten Sie das gleiche Ergebnis wie bei vorherigen Funktionen. + + + + This is using what is known as function composition. This is possible because functions in F# + Dabei wird die so genannte Funktionskomposition verwendet. Das ist möglich, da Funktionen in F# + + + + use Partial Application and the input and output types of each data processing operation match + die partielle Anwendung nutzen, und die Ein- und Ausgabetypen jedes Datenverarbeitungsvorgangs + + + + the signatures of the functions we're using. + mit den Signaturen der verwendeten Funktionen übereinstimmen. + + + + Lists are ordered, immutable, singly-linked lists. They are eager in their evaluation. + Listen sind geordnete, unveränderliche, einfach verknüpfte Listen. Ihre Auswertung ist streng. + + + + This module shows various ways to generate lists and process lists with some functions + Dieses Modul zeigt verschiedene Möglichkeiten zum Erstellen von Listen und Prozesslisten mit einigen Funktionen + + + + in the 'List' module in the F# Core Library. + im Modul "List" in der F#-Kernbibliothek. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/lists + Weitere Informationen finden Sie unter: https://docs.microsoft.com/de-de/dotnet/articles/fsharp/language-reference/lists + + + + Lists are defined using [ ... ]. This is an empty list. + Listen werden mithilfe von "[ ... ]" definiert. Dies ist eine leere Liste. + + + + This is a list with 3 elements. ';' is used to separate elements on the same line. + Dies ist eine Liste mit drei Elementen. ";" dient dazu, Elemente in der gleichen Zeile zu trennen. + + + + You can also separate elements by placing them on their own lines. + Sie können Elemente auch trennen, indem Sie sie in separaten Zeilen einfügen. + + + + This is a list of integers from 1 to 1000 + Dies ist eine Liste mit ganzen Zahlen von 1 bis 1000. + + + + Lists can also be generated by computations. This is a list containing + Listen können auch mithilfe von Berechnungen generiert werden. Dies ist eine Liste mit + + + + all the days of the year. + allen Tagen des Jahres. + + + + Print the first 5 elements of 'daysList' using 'List.take'. + Drucken Sie mithilfe von "List.take" die ersten fünf Elemente in "daysList". + + + + Computations can include conditionals. This is a list containing the tuples + Berechnungen können Bedingungen enthalten. Dies ist eine Liste mit den Tupeln, + + + + which are the coordinates of the black squares on a chess board. + bei denen es sich um die Koordinaten der schwarzen Felder auf einem Schachbrett handelt. + + + + Lists can be transformed using 'List.map' and other functional programming combinators. + Listen können mithilfe von "List.map" und anderen funktionalen Programmierkombinatoren umgewandelt werden. + + + + This definition produces a new list by squaring the numbers in numberList, using the pipeline + Diese Definition erzeugt eine neue Liste, indem die Zahlen in "numberList" quadriert werden. Dabei wird der Pipeline- + + + + operator to pass an argument to List.map. + Operator verwendet, um ein Argument an "List.map" zu übergeben. + + + + There are many other list combinations. The following computes the sum of the squares of the + Es stehen noch viele andere Listenkombinationen zur Verfügung. Mit dem Folgenden wird die Summe der Quadrate der + + + + numbers divisible by 3. + durch 3 teilbaren Zahlen berechnet. + + + + Arrays are fixed-size, mutable collections of elements of the same type. + Arrays sind veränderliche Sammlungen fester Größe, die Elemente des gleichen Typs enthalten. + + + + Although they are similar to Lists (they support enumeration and have similar combinators for data processing), + Sie ähneln Listen (sie unterstützen Enumeration und haben ähnliche Combinators für die Datenverarbeitung), + + + + they are generally faster and support fast random access. This comes at the cost of being less safe by being mutable. + sind im Allgemeinen jedoch schneller und unterstützen einen schnellen wahlfreien Zugriff. Dafür sind sie jedoch weniger sicher, da sie veränderlich sind. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/arrays + Weitere Informationen finden Sie unter: https://docs.microsoft.com/de-de/dotnet/articles/fsharp/language-reference/arrays + + + + This is The empty array. Note that the syntax is similar to that of Lists, but uses `[| ... |]` instead. + Dies ist das leere Array. Die Syntax ähnelt der von Listen, verwendet jedoch stattdessen "[| ... |]". + + + + Arrays are specified using the same range of constructs as lists. + Arrays werden mithilfe der gleichen Konstrukte angegeben wie Listen. + + + + This is an array of numbers from 1 to 1000. + Dies ist ein Array mit Zahlen von 1 bis 1000. + + + + This is an array containing only the words "hello" and "world". + Dieses Array enthält nur die Wörter "hello" und "world". + + + + This is an array initialized by index and containing the even numbers from 0 to 2000. + Dieses Array wurde per Index initialisiert und enthält gerade Zahlen von 0 bis 2000. + + + + Sub-arrays are extracted using slicing notation. + Teilarrays werden mithilfe der Segmentnotation extrahiert. + + + + You can loop over arrays and lists using 'for' loops. + Mit For-Schleifen können Sie bei Arrays und Listen Schleifen ausführen. + + + + You can modify the contents of an an array element by using the left arrow assignment operator. + Sie können die Inhalte eines Arrayelements mithilfe des Zuweisungsoperators "Pfeil nach links" ändern. + + + + To learn more about this operator, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/values/index#mutable-variables + Weitere Informationen zu diesem Operator finden Sie unter: https://docs.microsoft.com/de-de/dotnet/articles/fsharp/language-reference/values/index#mutable-variables + + + + You can transform arrays using 'Array.map' and other functional programming operations. + Sie können Arrays mithilfe von "Array.map" und anderen funktionalen Programmiervorgängen umwandeln. + + + + The following calculates the sum of the lengths of the words that start with 'h'. + Mit Folgendem wird die Summe der Längen von Wörtern berechnet, die mit "h" beginnen. + + + + Sequences are a logical series of elements, all of the same type. These are a more general type than Lists and Arrays. + Sequenzen sind logische Serien von Elementen, die alle vom gleichen Typ sind. Ihr Typ ist allgemeiner als Listen und Arrays. + + + + Sequences are evaluated on-demand and are re-evaluated each time they are iterated. + Sequenzen werden bei Bedarf ausgewertet und bei jeder Iteration erneut ausgewertet. + + + + An F# sequence is an alias for a .NET System.Collections.Generic.IEnumerable<'T>. + Eine F#-Sequenz ist ein Alias für .NET System.Collections.Generic.IEnumerable<'T>. + + + + Sequence processing functions can be applied to Lists and Arrays as well. + Funktionen mit Sequenzverarbeitung können auch auf Listen und Arrays angewendet werden. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/sequences + Weitere Informationen finden Sie unter: https://docs.microsoft.com/de-de/dotnet/articles/fsharp/language-reference/sequences + + + + This is the empty sequence. + Dies ist die leere Sequenz. + + + + This a sequence of values. + Dies ist eine Sequenz mit Werten. + + + + This is an on-demand sequence from 1 to 1000. + Dies ist eine bedarfsbasierte Sequenz von 1 bis 1000. + + + + This is a sequence producing the words "hello" and "world" + Diese Sequenz generiert die Wörter "hello" und "world". + + + + This sequence producing the even numbers up to 2000. + Diese Sequenz erzeugt gerade Zahlen bis 2000. + + + + This is an infinite sequence which is a random walk. + Dies ist eine unendliche Sequenz und ermöglicht Zufallsdurchläufe. + + + + This example uses yield! to return each element of a subsequence. + In diesem Beispiel werden mithilfe von "yield!" die einzelnen Elemente einer Untersequenz zurückgegeben. + + + + This example shows the first 100 elements of the random walk. + Dieses Beispiel zeigt die ersten 100 Elemente des Zufallsdurchlaufs. + + + + Recursive functions can call themselves. In F#, functions are only recursive + Rekursive Funktionen können sich selbst aufrufen. In F# sind Funktionen nur rekursiv, + + + + when declared using 'let rec'. + für die Deklaration mithilfe von "let rec". + + + + Recursion is the preferred way to process sequences or collections in F#. + Rekursion ist die bevorzugte Möglichkeit zum Verarbeiten von Sequenzen oder Sammlungen in F#. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/index#recursive-functions + Weitere Informationen finden Sie unter: https://docs.microsoft.com/de-de/dotnet/articles/fsharp/language-reference/functions/index#recursive-functions + + + + This example shows a recursive function that computes the factorial of an + Dieses Beispiel zeigt eine rekursive Funktion, die die Fakultät einer ganzen + + + + integer. It uses 'let rec' to define a recursive function. + Zahl berechnet. Zum Definieren einer rekursiven Funktion wird "let rec" verwendet. + + + + Computes the greatest common factor of two integers. + Berechnet den höchsten gemeinsamen Faktor von zwei Integern. + + + + Since all of the recursive calls are tail calls, + Da alle rekursiven Aufrufe Endeaufrufe sind, + + + + the compiler will turn the function into a loop, + wandelt der Compiler die Funktion in eine Schleife um, + + + + which improves performance and reduces memory consumption. + was die Leistung verbessert und die Arbeitsspeicherbedarf reduziert. + + + + This example computes the sum of a list of integers using recursion. + Dieses Beispiel berechnet mithilfe von Rekursion die Summe einer Liste von Integern. + + + + This makes 'sumList' tail recursive, using a helper function with a result accumulator. + Mithilfe einer Hilfsfunktion mit einem Ergebnisakkumulator wird "sumList" endrekursiv. + + + + This invokes the tail recursive helper function, providing '0' as a seed accumulator. + Dies ruft die endrekursive Hilfsfunktion auf und verwendet "0" als Startwertakkumulator. + + + + An approach like this is common in F#. + Dies ist eine häufige Vorgehensweise in F#. + + + + Records are an aggregate of named values, with optional members (such as methods). + Datensätze sind ein Aggregat aus benannten Werten mit optionalen Membern (wie etwa Methoden). + + + + They are immutable and have structural equality semantics. + Sie sind nicht veränderlich und verfügen über eine strukturelle Gleichheitssemantik. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/records + Weitere Informationen finden Sie unter: https://docs.microsoft.com/de-de/dotnet/articles/fsharp/language-reference/records + + + + This example shows how to define a new record type. + Dieses Beispiel zeigt, wie ein neuer Datensatztyp definiert wird. + + + + This example shows how to instantiate a record type. + In diesem Beispiel erfahren Sie, wie Sie einen Datensatztyp instanziieren. + + + + You can also do this on the same line with ';' separators. + Das ist in der gleichen Zeile auch mit dem Trennzeichen ";" möglich. + + + + This example shows how to use "copy-and-update" on record values. It creates + Dieses Beispiel zeigt die Verwendung von "Kopieren und aktualisieren" für Datensatzwerte. Es wird + + + + a new record value that is a copy of contact1, but has different values for + ein neuer Datensatz als Kopie von "contact1" erstellt, der jedoch über andere Werte + + + + the 'Phone' and 'Verified' fields. + für die Felder "Phone" und "Verified" verfügt. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/copy-and-update-record-expressions + Weitere Informationen finden Sie unter: https://docs.microsoft.com/de-de/dotnet/articles/fsharp/language-reference/copy-and-update-record-expressions + + + + This example shows how to write a function that processes a record value. + Dieses Beispiel veranschaulicht das Schreiben einer Funktion zum Verarbeiten eines Datensatzwerts. + + + + It converts a 'ContactCard' object to a string. + Es konvertiert ein Objekt vom Typ "ContactCard" in eine Zeichenfolge. + + + + This is an example of a Record with a member. + Dies ist ein Beispiel für einen Datensatz mit einem Member. + + + + Members can implement object-oriented members. + Member können objektorientierte Member implementieren. + + + + Members are accessed via the '.' operator on an instantiated type. + Auf Member wird über den Operator "." in einem instanziierten Typ zugegriffen. + + + + Records can also be represented as structs via the 'Struct' attribute. + Datensätze können mithilfe des Attributs "Struct" auch als Strukturen dargestellt werden. + + + + This is helpful in situations where the performance of structs outweighs + Dies ist in Situationen hilfreich, in denen die Leistung der Strukturen wichtiger ist als + + + + the flexibility of reference types. + die Flexibilität der Verweistypen. + + + + Discriminated Unions (DU for short) are values which could be a number of named forms or cases. + Diskriminierte Unions (DUs) sind Werte, die eine Anzahl benannter Formen oder Fälle sein können. + + + + Data stored in DUs can be one of several distinct values. + In DUs gespeicherte Daten können einer von verschiedenen eindeutigen Werten sein. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/discriminated-unions + Weitere Informationen finden Sie unter: https://docs.microsoft.com/de-de/dotnet/articles/fsharp/language-reference/discriminated-unions + + + + The following represents the suit of a playing card. + Folgendes stellt die Farbe einer Spielkarte dar. + + + + A Disciminated Union can also be used to represent the rank of a playing card. + Eine diskriminierte Union kann auch verwendet werden, um den Rang einer Spielkarte darzustellen. + + + + Represents the rank of cards 2 .. 10 + Stellt den Rang der Karten 2 bis 10 dar 10 + + + + Discriminated Unions can also implement object-oriented members. + Diskriminierte Unions können objektorientierte Member implementieren. + + + + This is a record type that combines a Suit and a Rank. + Dieser Datensatztyp kombiniert eine Farbe und einen Rang. + + + + It's common to use both Records and Disciminated Unions when representing data. + Beim Darstellen von Daten werden häufig sowohl Datensätze als auch diskriminierte Unions verwendet. + + + + This computes a list representing all the cards in the deck. + Dies berechnet eine Liste mit allen Karten im Stapel. + + + + This example converts a 'Card' object to a string. + Dieses Beispiel konvertiert ein Objekt vom Typ "Card" in eine Zeichenfolge. + + + + This example prints all the cards in a playing deck. + Dieses Beispiel gibt alle Karten in einem Kartenstapel aus. + + + + Single-case DUs are often used for domain modeling. This can buy you extra type safety + Einzelfall-DUs werden häufig für die Domänenmodellierung verwendet. Dadurch erhalten Sie zusätzliche Typsicherheit + + + + over primitive types such as strings and ints. + für primitive Typen wie Zeichenfolgen und Integer. + + + + Single-case DUs cannot be implicitly converted to or from the type they wrap. + Eine implizite Konvertierung von Einzelfall-DUs in den umschlossenen Typ oder aus diesem Typ ist nicht möglich. + + + + For example, a function which takes in an Address cannot accept a string as that input, + Beispielsweise eine Funktion, die eine Adresse akzeptiert, kann keine Zeichenfolge als Eingabe akzeptieren + + + + or vive/versa. + (oder umgekehrt). + + + + You can easily instantiate a single-case DU as follows. + Sie können Einzelfall-DUs folgendermaßen instanziieren. + + + + When you need the value, you can unwrap the underlying value with a simple function. + Wenn Sie den Wert benötigen, können Sie den zugrunde liegenden Wert mit einer einfachen Funktion entpacken. + + + + Printing single-case DUs is simple with unwrapping functions. + Mit entpackten Funktionen lassen sich Einzelfall-DUs einfach drucken. + + + + Disciminated Unions also support recursive definitions. + Diskriminierte Unions unterstützen auch rekursive Definitionen. + + + + This represents a Binary Search Tree, with one case being the Empty tree, + Dies stellt eine Struktur für die Binärsuche dar, wobei ein Fall eine leere Struktur ist + + + + and the other being a Node with a value and two subtrees. + und der andere Fall einen Knoten mit einem Wert und zwei Unterstrukturen darstellt. + + + + Check if an item exists in the binary search tree. + Prüfen Sie, ob die Struktur für die Binärsuche ein Element enthält. + + + + Searches recursively using Pattern Matching. Returns true if it exists; otherwise, false. + Sucht rekursiv mithilfe des Musterabgleichs. Gibt bei vorhandenem Element "true" aus, andernfalls "false". + + + + Check the left subtree. + Prüfen Sie die linke Unterstruktur. + + + + Check the right subtree. + Prüfen Sie die rechte Unterstruktur. + + + + Inserts an item in the Binary Search Tree. + Fügt in die Struktur für die Binärsuche ein Element ein. + + + + Finds the place to insert recursively using Pattern Matching, then inserts a new node. + Findet die Position für das rekursive Einfügen mithilfe des Musterabgleichs und fügt anschließend einen neuen Knoten ein. + + + + If the item is already present, it does not insert anything. + Wenn das Element bereits vorhanden ist, wird nichts eingefügt. + + + + No need to insert, it already exists; return the node. + Einfügen nicht erforderlich, da bereits vorhanden; Knoten zurückgeben. + + + + Call into left subtree. + Aufruf in linker Unterstruktur. + + + + Call into right subtree. + Aufruf in rechter Unterstruktur. + + + + Discriminated Unions can also be represented as structs via the 'Struct' attribute. + Diskriminierte Unions können mithilfe des Attributs "Struct" auch als Struktur dargestellt werden. + + + + This is helpful in situations where the performance of structs outweighs + Dies ist in Situationen hilfreich, in denen die Leistung der Strukturen wichtiger ist als + + + + the flexibility of reference types. + die Flexibilität der Verweistypen. + + + + However, there are two important things to know when doing this: + Dabei sind jedoch zwei Punkte zu beachten: + + + + 1. A struct DU cannot be recursively-defined. + 1. Eine Struktur-DU kann nicht rekursiv definiert werden. + + + + 2. A struct DU must have unique names for each of its cases. + 2. In einer Struktur-DU muss jeder Fall einen eindeutigen Namen haben. + + + + Pattern Matching is a feature of F# that allows you to utilize Patterns, + Der Musterabgleich ist eine Funktion von F#, die Ihnen die Verwendung von Mustern ermöglicht, + + + + which are a way to compare data with a logical structure or structures, + die eine Möglichkeit sind, um Daten mit logischen Strukturen oder Strukturen zu vergleichen, + + + + decompose data into constituent parts, or extract information from data in various ways. + Daten in ihre Einzelteile zu zerlegen oder auf verschiedene Weise Informationen aus Daten zu extrahieren. + + + + You can then dispatch on the "shape" of a pattern via Pattern Matching. + Das Verteilen ist anschließend mithilfe des Musterabgleichs anhand der Form eines Musters möglich. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/pattern-matching + Weitere Informationen finden Sie unter: https://docs.microsoft.com/de-de/dotnet/articles/fsharp/language-reference/pattern-matching + + + + A record for a person's first and last name + Ein Datensatz für den Vor- und Nachnamen einer Person + + + + A Discriminated Union of 3 different kinds of employees + Eine diskriminierte Union mit drei verschiedenen Arten von Mitarbeitern + + + + Count everyone underneath the employee in the management hierarchy, + Zählen Sie alle Personen unterhalb des Angestellten in der Verwaltungshierarchie, + + + + including the employee. + einschließlich des Angestellten. + + + + Find all managers/executives named "Dave" who do not have any reports. + Suchen Sie alle Manager/Führungskräfte mit dem Namen "Dave", die über keine Berichte verfügen. + + + + This uses the 'function' shorthand to as a lambda expression. + Dies verwendet die Kurzform "function" als Lambdaausdruck. + + + + [] matches an empty list. + [] entspricht einer leeren Liste. + + + + '_' is a wildcard pattern that matches anything. + "_" ist ein Platzhaltermuster, das mit allem übereinstimmt + + + + This handles the "or else" case. + Dies behandelt den "or else"-Fall. + + + + You can also use the shorthand function construct for pattern matching, + Sie können das Kurzform-Funktionskonstrukt auch für den Musterabgleich verwenden, + + + + which is useful when you're writing functions which make use of Partial Application. + was beim Schreiben von Funktionen, die die partielle Anwendung nutzen, hilfreich ist. + + + + Define some more functions which parse with the helper function. + Definieren Sie weitere Funktionen, die eine Analyse mithilfe der Hilfsfunktion durchführen. + + + + Active Patterns are another powerful construct to use with pattern matching. + Aktive Muster sind ein weiteres leistungsstarkes Konstrukt, das beim Musterabgleich verwendet werden kann. + + + + They allow you to partition input data into custom forms, decomposing them at the pattern match call site. + Sie ermöglichen eine Partitionierung der Eingabedaten in benutzerdefinierte Formen, wobei sie an der Musterabgleichs-Aufrufsite zerlegt werden. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/active-patterns + Weitere Informationen finden Sie unter: https://docs.microsoft.com/de-de/dotnet/articles/fsharp/language-reference/active-patterns + + + + Pattern Matching via 'function' keyword and Active Patterns often looks like this. + Der Musterabgleich mithilfe des Schlüsselworts "function" und das aktive Muster sehen häufig wie folgt aus. + + + + Call the printer with some different values to parse. + Rufen Sie den Drucker mit unterschiedlichen zu analysierenden Werten auf. + + + + Option values are any kind of value tagged with either 'Some' or 'None'. + Bei Optionswerten handelt es sich um eine beliebige Art von Werten, die entweder mit 'Some' oder mit 'None' markiert sind. + + + + They are used extensively in F# code to represent the cases where many other + Sie werden in F#-Code umfassend verwendet, um die Fälle darzustellen, in denen viele + + + + languages would use null references. + Sprachen NULL-Verweise verwenden würden. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/options + Weitere Informationen finden Sie unter: https://docs.microsoft.com/de-de/dotnet/articles/fsharp/language-reference/options + + + + First, define a zipcode defined via Single-case Discriminated Union. + Definieren Sie als Erstes eine Postleitzahl, die über eine diskriminierte Einzelfall-Union definiert ist. + + + + Next, define a type where the ZipCode is optional. + Definieren Sie als Nächstes einen Typ, bei dem "ZipCode" optional ist. + + + + Next, define an interface type that represents an object to compute the shipping zone for the customer's zip code, + Definieren Sie dann einen Schnittstellentyp, der ein Objekt zum Berechnen der Versandkosten für die Postleitzahl des Kunden repräsentiert, + + + + given implementations for the 'getState' and 'getShippingZone' abstract methods. + sofern Implementierungen für die abstrakten Methoden "getState" und "getShippingZone" vorhanden sind. + + + + Next, calculate a shipping zone for a customer using a calculator instance. + Berechnen Sie nun mithilfe einer Rechnerinstanz die Versandkosten für einen Kunden. + + + + This uses combinators in the Option module to allow a functional pipeline for + Dies verwendet Kombinatoren im Option-Modul für eine funktionale Pipeline zum + + + + transforming data with Optionals. + Transformieren von Daten mit Optionen. + + + + Units of measure are a way to annotate primitive numeric types in a type-safe way. + Maßeinheiten sind eine Möglichkeit, um für primitive numerische Typen typsicher den Änderungsverlauf einzublenden. + + + + You can then perform type-safe arithmetic on these values. + Anschließend können Sie für diese Werte die typsichere Arithmetik ausführen. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/units-of-measure + Weitere Informationen finden Sie unter: https://docs.microsoft.com/de-de/dotnet/articles/fsharp/language-reference/units-of-measure + + + + First, open a collection of common unit names + Öffnen Sie zunächst eine Auflistung mit allgemeinen Einheitennamen. + + + + Define a unitized constant + Definieren Sie eine einheitliche Konstante. + + + + Next, define a new unit type + Definieren Sie als Nächstes einen neuen Einheitentyp. + + + + Conversion factor mile to meter. + Faktor für die Umrechnung von Meilen in Meter. + + + + Define a unitized constant + Definieren Sie eine einheitliche Konstante. + + + + Compute metric-system constant + Berechnen Sie die Konstante für das metrische System. + + + + Values using Units of Measure can be used just like the primitive numeric type for things like printing. + Werte, die Maßeinheiten verwenden, können wie der primitive numerische Typ z. B. zum Drucken genutzt werden. + + + + Classes are a way of defining new object types in F#, and support standard Object-oriented constructs. + Klassen sind eine Möglichkeit zum Definieren neuer Objekttypen in F#. Sie unterstützen standardmäßige objektorientierte Konstrukte. + + + + They can have a variety of members (methods, properties, events, etc.) + Sie können über verschiedene Member verfügen (Methoden, Eigenschaften, Ereignisse usw.) + + + + To learn more about Classes, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/classes + Weitere Informationen zu Klassen finden Sie unter: https://docs.microsoft.com/de-de/dotnet/articles/fsharp/language-reference/classes + + + + To learn more about Members, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/members + Weitere Informationen zu Membern finden Sie unter: https://docs.microsoft.com/de-de/dotnet/articles/fsharp/language-reference/members + + + + A simple two-dimensional Vector class. + Eine einfache, zweidimensionale Vektorklasse. + + + + The class's constructor is on the first line, + Der Konstruktor der Klasse befindet sich in der ersten Zeile + + + + and takes two arguments: dx and dy, both of type 'double'. + und akzeptiert zwei Argumente: dx und dy, beide vom Typ "double". + + + + This internal field stores the length of the vector, computed when the + Dieses interne Feld speichert die Länge des Vektors, die berechnet wird, wenn + + + + object is constructed + das Objekt konstruiert wird. + + + + 'this' specifies a name for the object's self identifier. + 'this' gibt einen Namen für den Selbstbezeichner des Objekts an. + + + + In instance methods, it must appear before the member name. + In Instanzmethoden muss dies vor dem Membernamen angegeben werden. + + + + This member is a method. The previous members were properties. + Dieser Member ist eine Methode. Die vorherigen Member waren Eigenschaften. + + + + This is how you instantiate the Vector2D class. + So instanziieren Sie die Vector2D-Klasse. + + + + Get a new scaled vector object, without modifying the original object. + Rufen Sie ein neues skaliertes Vektorobjekt ab, ohne das ursprüngliche Objekt zu verändern. + + + + Generic classes allow types to be defined with respect to a set of type parameters. + Generische Klassen ermöglichen das Definieren von Typen in Bezug auf eine Gruppe von Typparametern. + + + + In the following, 'T is the type parameter for the class. + Im Folgenden ist 'T der Typparameter für die Klasse. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/generics/ + Weitere Informationen finden Sie unter: https://docs.microsoft.com/de-de/dotnet/articles/fsharp/language-reference/generics/ + + + + This internal field store the states in a list. + Dieses interne Feld speichert die Zustände in einer Liste. + + + + Add a new element to the list of states. + Der Liste der Zustände ein neues Element hinzufügen + + + + use the '<-' operator to mutate the value. + Den '<-'-Operator verwenden, um den Wert zu mutieren + + + + Get the entire list of historical states. + Die gesamte Liste der Verlaufszustände abrufen + + + + Get the latest state. + Den aktuellen Zustand abrufen + + + + An 'int' instance of the state tracker class. Note that the type parameter is inferred. + Eine 'int'-Instanz der 'state tracker'-Klasse. Beachten Sie, dass der Typ-Parameter abgeleitet wird. + + + + Add a state + Einen Zustand hinzufügen + + + + Interfaces are object types with only 'abstract' members. + Schnittstellen sind Objekttypen, die nur über abstrakte Member verfügen. + + + + Object types and object expressions can implement interfaces. + Objekttypen und Objektausdrücke können Schnittstellen implementieren. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/interfaces + Weitere Informationen finden Sie unter: https://docs.microsoft.com/de-de/dotnet/articles/fsharp/language-reference/interfaces + + + + This is a type that implements IDisposable. + Dieser Typ implementiert "IDisposable". + + + + This is the implementation of IDisposable members. + Dies ist die Implementierung von IDisposable-Membern. + + + + This is an object that implements IDisposable via an Object Expression + Dies ist ein Objekt, das IDisposable über einen Objektausdruck implementiert. + + + + Unlike other languages such as C# or Java, a new type definition is not needed + Im Gegensatz zu anderen Sprachen wie C# oder Java ist keine neue Typendefinition erforderlich, + + + + to implement an interface. + um eine Schnittstelle zu implementieren. + + + + The FSharp.Core library defines a range of parallel processing functions. Here + Die Bibliothek "FSharp.Core" definiert eine Reihe paralleler Verarbeitungsfunktionen. Hier + + + + you use some functions for parallel processing over arrays. + verwenden Sie einige Funktionen zur parallelen Verarbeitung über Arrays. + + + + To learn more, see: https://msdn.microsoft.com/en-us/visualfsharpdocs/conceptual/array.parallel-module-%5Bfsharp%5D + Weitere Informationen finden Sie unter: https://msdn.microsoft.com/de-de/visualfsharpdocs/conceptual/array.parallel-module-%5Bfsharp%5D + + + + First, an array of inputs. + Definieren Sie zunächst ein Array mit Eingaben. + + + + Next, define a functions that does some CPU intensive computation. + Definieren Sie dann eine Funktion mit CPU-intensiven Berechnungen. + + + + Next, do a parallel map over a large input array. + Führen Sie als Nächstes eine parallele Zuordnung für ein umfangreiches Eingabearray durch. + + + + Next, print the results. + Geben Sie die Ergebnisse aus. + + + + Events are a common idiom for .NET programming, especially with WinForms or WPF applications. + Ereignisse sind ein gängiger Begriff bei der .NET-Programmierung, v. a. bei WinForms oder WPF-Anwendungen. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/members/events + Weitere Informationen finden Sie unter: https://docs.microsoft.com/de-de/dotnet/articles/fsharp/language-reference/members/events + + + + First, create instance of Event object that consists of subscription point (event.Publish) and event trigger (event.Trigger). + Erstellen Sie zunächst eine Instanz des Event-Objekts mit Abonnementpunkt (event.Publish) und Ereignisauslöser (event.Trigger). + + + + Next, add handler to the event. + Fügen Sie dem Ereignis einen Handler hinzu. + + + + Next, trigger the event. + Lösen Sie das Ereignis aus. + + + + Next, create an instance of Event that follows standard .NET convention: (sender, EventArgs). + Erstellen Sie als Nächstes eine Event-Instanz gemäß der .NET-Standardkonvention: (sender, EventArgs) + + + + Next, add a handler for this new event. + Fügen Sie einen Handler für das neue Ereignis hinzu. + + + + Next, trigger this event (note that sender argument should be set). + Lösen Sie das Ereignis aus. (Hinweis: das sender-Argument muss festgelegt sein.) + + + + + \ No newline at end of file diff --git a/vsintegration/ProjectTemplates/TutorialProject/Template/xlf/Tutorial.fsx.en.xlf b/vsintegration/ProjectTemplates/TutorialProject/Template/xlf/Tutorial.fsx.en.xlf new file mode 100644 index 00000000000..b3f0d951c55 --- /dev/null +++ b/vsintegration/ProjectTemplates/TutorialProject/Template/xlf/Tutorial.fsx.en.xlf @@ -0,0 +1,1637 @@ + + + + + + This sample will guide you through elements of the F# language. + This sample will guide you through elements of the F# language. + + + + To execute the code in F# Interactive, highlight a section of code and press Alt-Enter or right-click + To execute the code in F# Interactive, highlight a section of code and press Alt-Enter or right-click + + + + and select "Execute in Interactive". You can open the F# Interactive Window from the "View" menu. + and select "Execute in Interactive". You can open the F# Interactive Window from the "View" menu. + + + + For more about F#, see: + For more about F#, see: + + + + To see this tutorial in documentation form, see: + To see this tutorial in documentation form, see: + + + + To learn more about applied F# programming, use + To learn more about applied F# programming, use + + + + To install the Visual F# Power Tools, use + To install the Visual F# Power Tools, use + + + + 'Tools' --> 'Extensions and Updates' --> `Online` and search + 'Tools' --> 'Extensions and Updates' --> `Online` and search + + + + For additional templates to use with F#, see the 'Online Templates' in Visual Studio, + For additional templates to use with F#, see the 'Online Templates' in Visual Studio, + + + + 'New Project' --> 'Online Templates' + 'New Project' --> 'Online Templates' + + + + F# supports three kinds of comments: + F# supports three kinds of comments: + + + + 1. Double-slash comments. These are used in most situations. + 1. Double-slash comments. These are used in most situations. + + + + 2. ML-style Block comments. These aren't used that often. + 2. ML-style Block comments. These aren't used that often. + + + + 3. Triple-slash comments. These are used for documenting functions, types, and so on. + 3. Triple-slash comments. These are used for documenting functions, types, and so on. + + + + They will appear as text when you hover over something which is decorated with these comments. + They will appear as text when you hover over something which is decorated with these comments. + + + + They also support .NET-style XML comments, which allow you to generate reference documentation, + They also support .NET-style XML comments, which allow you to generate reference documentation, + + + + and they also allow editors (such as Visual Studio) to extract information from them. + and they also allow editors (such as Visual Studio) to extract information from them. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/xml-documentation + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/xml-documentation + + + + Open namespaces using the 'open' keyword. + Open namespaces using the 'open' keyword. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/import-declarations-the-open-keyword + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/import-declarations-the-open-keyword + + + + A module is a grouping of F# code, such as values, types, and function values. + A module is a grouping of F# code, such as values, types, and function values. + + + + Grouping code in modules helps keep related code together and helps avoid name conflicts in your program. + Grouping code in modules helps keep related code together and helps avoid name conflicts in your program. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/modules + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/modules + + + + This is a sample integer. + This is a sample integer. + + + + This is a sample floating point number. + This is a sample floating point number. + + + + This computed a new number by some arithmetic. Numeric types are converted using + This computed a new number by some arithmetic. Numeric types are converted using + + + + functions 'int', 'double' and so on. + functions 'int', 'double' and so on. + + + + This is a list of the numbers from 0 to 99. + This is a list of the numbers from 0 to 99. + + + + This is a list of all tuples containing all the numbers from 0 to 99 and their squares. + This is a list of all tuples containing all the numbers from 0 to 99 and their squares. + + + + The next line prints a list that includes tuples, using '%A' for generic printing. + The next line prints a list that includes tuples, using '%A' for generic printing. + + + + This is a sample integer with a type annotation + This is a sample integer with a type annotation + + + + Values in F# are immutable by default. They cannot be changed + Values in F# are immutable by default. They cannot be changed + + + + in the course of a program's execution unless explicitly marked as mutable. + in the course of a program's execution unless explicitly marked as mutable. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/values/index#why-immutable + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/values/index#why-immutable + + + + Binding a value to a name via 'let' makes it immutable. + Binding a value to a name via 'let' makes it immutable. + + + + The second line of code fails to compile because 'number' is immutable and bound. + The second line of code fails to compile because 'number' is immutable and bound. + + + + Re-defining 'number' to be a different value is not allowed in F#. + Re-defining 'number' to be a different value is not allowed in F#. + + + + A mutable binding. This is required to be able to mutate the value of 'otherNumber'. + A mutable binding. This is required to be able to mutate the value of 'otherNumber'. + + + + When mutating a value, use '<-' to assign a new value. + When mutating a value, use '<-' to assign a new value. + + + + You could not use '=' here for this purpose since it is used for equality + You could not use '=' here for this purpose since it is used for equality + + + + or other contexts such as 'let' or 'module' + or other contexts such as 'let' or 'module' + + + + Much of F# programming consists of defining functions that transform input data to produce + Much of F# programming consists of defining functions that transform input data to produce + + + + useful results. + useful results. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/ + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/ + + + + You use 'let' to define a function. This one accepts an integer argument and returns an integer. + You use 'let' to define a function. This one accepts an integer argument and returns an integer. + + + + Parentheses are optional for function arguments, except for when you use an explicit type annotation. + Parentheses are optional for function arguments, except for when you use an explicit type annotation. + + + + Apply the function, naming the function return result using 'let'. + Apply the function, naming the function return result using 'let'. + + + + The variable type is inferred from the function return type. + The variable type is inferred from the function return type. + + + + This line uses '%d' to print the result as an integer. This is type-safe. + This line uses '%d' to print the result as an integer. This is type-safe. + + + + If 'result1' were not of type 'int', then the line would fail to compile. + If 'result1' were not of type 'int', then the line would fail to compile. + + + + When needed, annotate the type of a parameter name using '(argument:type)'. Parentheses are required. + When needed, annotate the type of a parameter name using '(argument:type)'. Parentheses are required. + + + + Conditionals use if/then/elid/elif/else. + Conditionals use if/then/elid/elif/else. + + + + Note that F# uses whitespace indentation-aware syntax, similar to languages like Python. + Note that F# uses whitespace indentation-aware syntax, similar to languages like Python. + + + + This line uses '%f' to print the result as a float. As with '%d' above, this is type-safe. + This line uses '%f' to print the result as a float. As with '%d' above, this is type-safe. + + + + Booleans are fundamental data types in F#. Here are some examples of Booleans and conditional logic. + Booleans are fundamental data types in F#. Here are some examples of Booleans and conditional logic. + + + + To learn more, see: + To learn more, see: + + + + and + and + + + + Booleans values are 'true' and 'false'. + Booleans values are 'true' and 'false'. + + + + Operators on booleans are 'not', '&&' and '||'. + Operators on booleans are 'not', '&&' and '||'. + + + + This line uses '%b'to print a boolean value. This is type-safe. + This line uses '%b'to print a boolean value. This is type-safe. + + + + Strings are fundamental data types in F#. Here are some examples of Strings and basic String manipulation. + Strings are fundamental data types in F#. Here are some examples of Strings and basic String manipulation. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/strings + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/strings + + + + Strings use double quotes. + Strings use double quotes. + + + + Strings can also use @ to create a verbatim string literal. + Strings can also use @ to create a verbatim string literal. + + + + This will ignore escape characters such as '\', '\n', '\t', etc. + This will ignore escape characters such as '\', '\n', '\t', etc. + + + + String literals can also use triple-quotes. + String literals can also use triple-quotes. + + + + String concatenation is normally done with the '+' operator. + String concatenation is normally done with the '+' operator. + + + + This line uses '%s' to print a string value. This is type-safe. + This line uses '%s' to print a string value. This is type-safe. + + + + Substrings use the indexer notation. This line extracts the first 7 characters as a substring. + Substrings use the indexer notation. This line extracts the first 7 characters as a substring. + + + + Note that like many languages, Strings are zero-indexed in F#. + Note that like many languages, Strings are zero-indexed in F#. + + + + Tuples are simple combinations of data values into a combined value. + Tuples are simple combinations of data values into a combined value. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/tuples + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/tuples + + + + A simple tuple of integers. + A simple tuple of integers. + + + + A function that swaps the order of two values in a tuple. + A function that swaps the order of two values in a tuple. + + + + F# Type Inference will automatically generalize the function to have a generic type, + F# Type Inference will automatically generalize the function to have a generic type, + + + + meaning that it will work with any type. + meaning that it will work with any type. + + + + A tuple consisting of an integer, a string, + A tuple consisting of an integer, a string, + + + + and a double-precision floating point number. + and a double-precision floating point number. + + + + A simple tuple of integers with a type annotation. + A simple tuple of integers with a type annotation. + + + + Type annotations for tuples use the * symbol to separate elements + Type annotations for tuples use the * symbol to separate elements + + + + Tuples are normally objects, but they can also be represented as structs. + Tuples are normally objects, but they can also be represented as structs. + + + + These interoperate completely with structs in C# and Visual Basic.NET; however, + These interoperate completely with structs in C# and Visual Basic.NET; however, + + + + struct tuples are not implicitly convertable with object tuples (often called reference tuples). + struct tuples are not implicitly convertable with object tuples (often called reference tuples). + + + + The second line below will fail to compile because of this. Uncomment it to see what happens. + The second line below will fail to compile because of this. Uncomment it to see what happens. + + + + Although you cannot implicitly convert between struct tuples and reference tuples, + Although you cannot implicitly convert between struct tuples and reference tuples, + + + + you can explicitly convert via pattern matching, as demonstrated below. + you can explicitly convert via pattern matching, as demonstrated below. + + + + The F# pipe operators ('|>', '<|', etc.) and F# composition operators ('>>', '<<') + The F# pipe operators ('|>', '<|', etc.) and F# composition operators ('>>', '<<') + + + + are used extensively when processing data. These operators are themselves functions + are used extensively when processing data. These operators are themselves functions + + + + which make use of Partial Application. + which make use of Partial Application. + + + + To learn more about these operators, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/#function-composition-and-pipelining + To learn more about these operators, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/#function-composition-and-pipelining + + + + To learn more about Partial Application, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/#partial-application-of-arguments + To learn more about Partial Application, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/#partial-application-of-arguments + + + + Squares a value. + Squares a value. + + + + Adds 1 to a value. + Adds 1 to a value. + + + + Tests if an integer value is odd via modulo. + Tests if an integer value is odd via modulo. + + + + A list of 5 numbers. More on lists later. + A list of 5 numbers. More on lists later. + + + + Given a list of integers, it filters out the even numbers, + Given a list of integers, it filters out the even numbers, + + + + squares the resulting odds, and adds 1 to the squared odds. + squares the resulting odds, and adds 1 to the squared odds. + + + + A shorter way to write 'squareOddValuesAndAddOne' is to nest each + A shorter way to write 'squareOddValuesAndAddOne' is to nest each + + + + sub-result into the function calls themselves. + sub-result into the function calls themselves. + + + + This makes the function much shorter, but it's difficult to see the + This makes the function much shorter, but it's difficult to see the + + + + order in which the data is processed. + order in which the data is processed. + + + + A preferred way to write 'squareOddValuesAndAddOne' is to use F# pipe operators. + A preferred way to write 'squareOddValuesAndAddOne' is to use F# pipe operators. + + + + This allows you to avoid creating intermediate results, but is much more readable + This allows you to avoid creating intermediate results, but is much more readable + + + + than nesting function calls like 'squareOddValuesAndAddOneNested' + than nesting function calls like 'squareOddValuesAndAddOneNested' + + + + You can shorten 'squareOddValuesAndAddOnePipeline' by moving the second `List.map` call + You can shorten 'squareOddValuesAndAddOnePipeline' by moving the second `List.map` call + + + + into the first, using a Lambda Function. + into the first, using a Lambda Function. + + + + Note that pipelines are also being used inside the lambda function. F# pipe operators + Note that pipelines are also being used inside the lambda function. F# pipe operators + + + + can be used for single values as well. This makes them very powerful for processing data. + can be used for single values as well. This makes them very powerful for processing data. + + + + Lastly, you can eliminate the need to explicitly take 'values' in as a parameter by using '>>' + Lastly, you can eliminate the need to explicitly take 'values' in as a parameter by using '>>' + + + + to compose the two core operations: filtering out even numbers, then squaring and adding one. + to compose the two core operations: filtering out even numbers, then squaring and adding one. + + + + Likewise, the 'fun x -> ...' bit of the lambda expression is also not needed, because 'x' is simply + Likewise, the 'fun x -> ...' bit of the lambda expression is also not needed, because 'x' is simply + + + + being defined in that scope so that it can be passed to a functional pipeline. Thus, '>>' can be used + being defined in that scope so that it can be passed to a functional pipeline. Thus, '>>' can be used + + + + there as well. + there as well. + + + + The result of 'squareOddValuesAndAddOneComposition' is itself another function which takes a + The result of 'squareOddValuesAndAddOneComposition' is itself another function which takes a + + + + list of integers as its input. If you execute 'squareOddValuesAndAddOneComposition' with a list + list of integers as its input. If you execute 'squareOddValuesAndAddOneComposition' with a list + + + + of integers, you'll notice that it produces the same results as previous functions. + of integers, you'll notice that it produces the same results as previous functions. + + + + This is using what is known as function composition. This is possible because functions in F# + This is using what is known as function composition. This is possible because functions in F# + + + + use Partial Application and the input and output types of each data processing operation match + use Partial Application and the input and output types of each data processing operation match + + + + the signatures of the functions we're using. + the signatures of the functions we're using. + + + + Lists are ordered, immutable, singly-linked lists. They are eager in their evaluation. + Lists are ordered, immutable, singly-linked lists. They are eager in their evaluation. + + + + This module shows various ways to generate lists and process lists with some functions + This module shows various ways to generate lists and process lists with some functions + + + + in the 'List' module in the F# Core Library. + in the 'List' module in the F# Core Library. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/lists + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/lists + + + + Lists are defined using [ ... ]. This is an empty list. + Lists are defined using [ ... ]. This is an empty list. + + + + This is a list with 3 elements. ';' is used to separate elements on the same line. + This is a list with 3 elements. ';' is used to separate elements on the same line. + + + + You can also separate elements by placing them on their own lines. + You can also separate elements by placing them on their own lines. + + + + This is a list of integers from 1 to 1000 + This is a list of integers from 1 to 1000 + + + + Lists can also be generated by computations. This is a list containing + Lists can also be generated by computations. This is a list containing + + + + all the days of the year. + all the days of the year. + + + + Print the first 5 elements of 'daysList' using 'List.take'. + Print the first 5 elements of 'daysList' using 'List.take'. + + + + Computations can include conditionals. This is a list containing the tuples + Computations can include conditionals. This is a list containing the tuples + + + + which are the coordinates of the black squares on a chess board. + which are the coordinates of the black squares on a chess board. + + + + Lists can be transformed using 'List.map' and other functional programming combinators. + Lists can be transformed using 'List.map' and other functional programming combinators. + + + + This definition produces a new list by squaring the numbers in numberList, using the pipeline + This definition produces a new list by squaring the numbers in numberList, using the pipeline + + + + operator to pass an argument to List.map. + operator to pass an argument to List.map. + + + + There are many other list combinations. The following computes the sum of the squares of the + There are many other list combinations. The following computes the sum of the squares of the + + + + numbers divisible by 3. + numbers divisible by 3. + + + + Arrays are fixed-size, mutable collections of elements of the same type. + Arrays are fixed-size, mutable collections of elements of the same type. + + + + Although they are similar to Lists (they support enumeration and have similar combinators for data processing), + Although they are similar to Lists (they support enumeration and have similar combinators for data processing), + + + + they are generally faster and support fast random access. This comes at the cost of being less safe by being mutable. + they are generally faster and support fast random access. This comes at the cost of being less safe by being mutable. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/arrays + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/arrays + + + + This is The empty array. Note that the syntax is similar to that of Lists, but uses `[| ... |]` instead. + This is The empty array. Note that the syntax is similar to that of Lists, but uses `[| ... |]` instead. + + + + Arrays are specified using the same range of constructs as lists. + Arrays are specified using the same range of constructs as lists. + + + + This is an array of numbers from 1 to 1000. + This is an array of numbers from 1 to 1000. + + + + This is an array containing only the words "hello" and "world". + This is an array containing only the words "hello" and "world". + + + + This is an array initialized by index and containing the even numbers from 0 to 2000. + This is an array initialized by index and containing the even numbers from 0 to 2000. + + + + Sub-arrays are extracted using slicing notation. + Sub-arrays are extracted using slicing notation. + + + + You can loop over arrays and lists using 'for' loops. + You can loop over arrays and lists using 'for' loops. + + + + You can modify the contents of an an array element by using the left arrow assignment operator. + You can modify the contents of an an array element by using the left arrow assignment operator. + + + + To learn more about this operator, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/values/index#mutable-variables + To learn more about this operator, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/values/index#mutable-variables + + + + You can transform arrays using 'Array.map' and other functional programming operations. + You can transform arrays using 'Array.map' and other functional programming operations. + + + + The following calculates the sum of the lengths of the words that start with 'h'. + The following calculates the sum of the lengths of the words that start with 'h'. + + + + Sequences are a logical series of elements, all of the same type. These are a more general type than Lists and Arrays. + Sequences are a logical series of elements, all of the same type. These are a more general type than Lists and Arrays. + + + + Sequences are evaluated on-demand and are re-evaluated each time they are iterated. + Sequences are evaluated on-demand and are re-evaluated each time they are iterated. + + + + An F# sequence is an alias for a .NET System.Collections.Generic.IEnumerable<'T>. + An F# sequence is an alias for a .NET System.Collections.Generic.IEnumerable<'T>. + + + + Sequence processing functions can be applied to Lists and Arrays as well. + Sequence processing functions can be applied to Lists and Arrays as well. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/sequences + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/sequences + + + + This is the empty sequence. + This is the empty sequence. + + + + This a sequence of values. + This a sequence of values. + + + + This is an on-demand sequence from 1 to 1000. + This is an on-demand sequence from 1 to 1000. + + + + This is a sequence producing the words "hello" and "world" + This is a sequence producing the words "hello" and "world" + + + + This sequence producing the even numbers up to 2000. + This sequence producing the even numbers up to 2000. + + + + This is an infinite sequence which is a random walk. + This is an infinite sequence which is a random walk. + + + + This example uses yield! to return each element of a subsequence. + This example uses yield! to return each element of a subsequence. + + + + This example shows the first 100 elements of the random walk. + This example shows the first 100 elements of the random walk. + + + + Recursive functions can call themselves. In F#, functions are only recursive + Recursive functions can call themselves. In F#, functions are only recursive + + + + when declared using 'let rec'. + when declared using 'let rec'. + + + + Recursion is the preferred way to process sequences or collections in F#. + Recursion is the preferred way to process sequences or collections in F#. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/index#recursive-functions + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/index#recursive-functions + + + + This example shows a recursive function that computes the factorial of an + This example shows a recursive function that computes the factorial of an + + + + integer. It uses 'let rec' to define a recursive function. + integer. It uses 'let rec' to define a recursive function. + + + + Computes the greatest common factor of two integers. + Computes the greatest common factor of two integers. + + + + Since all of the recursive calls are tail calls, + Since all of the recursive calls are tail calls, + + + + the compiler will turn the function into a loop, + the compiler will turn the function into a loop, + + + + which improves performance and reduces memory consumption. + which improves performance and reduces memory consumption. + + + + This example computes the sum of a list of integers using recursion. + This example computes the sum of a list of integers using recursion. + + + + This makes 'sumList' tail recursive, using a helper function with a result accumulator. + This makes 'sumList' tail recursive, using a helper function with a result accumulator. + + + + This invokes the tail recursive helper function, providing '0' as a seed accumulator. + This invokes the tail recursive helper function, providing '0' as a seed accumulator. + + + + An approach like this is common in F#. + An approach like this is common in F#. + + + + Records are an aggregate of named values, with optional members (such as methods). + Records are an aggregate of named values, with optional members (such as methods). + + + + They are immutable and have structural equality semantics. + They are immutable and have structural equality semantics. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/records + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/records + + + + This example shows how to define a new record type. + This example shows how to define a new record type. + + + + This example shows how to instantiate a record type. + This example shows how to instantiate a record type. + + + + You can also do this on the same line with ';' separators. + You can also do this on the same line with ';' separators. + + + + This example shows how to use "copy-and-update" on record values. It creates + This example shows how to use "copy-and-update" on record values. It creates + + + + a new record value that is a copy of contact1, but has different values for + a new record value that is a copy of contact1, but has different values for + + + + the 'Phone' and 'Verified' fields. + the 'Phone' and 'Verified' fields. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/copy-and-update-record-expressions + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/copy-and-update-record-expressions + + + + This example shows how to write a function that processes a record value. + This example shows how to write a function that processes a record value. + + + + It converts a 'ContactCard' object to a string. + It converts a 'ContactCard' object to a string. + + + + This is an example of a Record with a member. + This is an example of a Record with a member. + + + + Members can implement object-oriented members. + Members can implement object-oriented members. + + + + Members are accessed via the '.' operator on an instantiated type. + Members are accessed via the '.' operator on an instantiated type. + + + + Records can also be represented as structs via the 'Struct' attribute. + Records can also be represented as structs via the 'Struct' attribute. + + + + This is helpful in situations where the performance of structs outweighs + This is helpful in situations where the performance of structs outweighs + + + + the flexibility of reference types. + the flexibility of reference types. + + + + Discriminated Unions (DU for short) are values which could be a number of named forms or cases. + Discriminated Unions (DU for short) are values which could be a number of named forms or cases. + + + + Data stored in DUs can be one of several distinct values. + Data stored in DUs can be one of several distinct values. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/discriminated-unions + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/discriminated-unions + + + + The following represents the suit of a playing card. + The following represents the suit of a playing card. + + + + A Disciminated Union can also be used to represent the rank of a playing card. + A Disciminated Union can also be used to represent the rank of a playing card. + + + + Represents the rank of cards 2 .. 10 + Represents the rank of cards 2 .. 10 + + + + Discriminated Unions can also implement object-oriented members. + Discriminated Unions can also implement object-oriented members. + + + + This is a record type that combines a Suit and a Rank. + This is a record type that combines a Suit and a Rank. + + + + It's common to use both Records and Disciminated Unions when representing data. + It's common to use both Records and Disciminated Unions when representing data. + + + + This computes a list representing all the cards in the deck. + This computes a list representing all the cards in the deck. + + + + This example converts a 'Card' object to a string. + This example converts a 'Card' object to a string. + + + + This example prints all the cards in a playing deck. + This example prints all the cards in a playing deck. + + + + Single-case DUs are often used for domain modeling. This can buy you extra type safety + Single-case DUs are often used for domain modeling. This can buy you extra type safety + + + + over primitive types such as strings and ints. + over primitive types such as strings and ints. + + + + Single-case DUs cannot be implicitly converted to or from the type they wrap. + Single-case DUs cannot be implicitly converted to or from the type they wrap. + + + + For example, a function which takes in an Address cannot accept a string as that input, + For example, a function which takes in an Address cannot accept a string as that input, + + + + or vive/versa. + or vive/versa. + + + + You can easily instantiate a single-case DU as follows. + You can easily instantiate a single-case DU as follows. + + + + When you need the value, you can unwrap the underlying value with a simple function. + When you need the value, you can unwrap the underlying value with a simple function. + + + + Printing single-case DUs is simple with unwrapping functions. + Printing single-case DUs is simple with unwrapping functions. + + + + Disciminated Unions also support recursive definitions. + Disciminated Unions also support recursive definitions. + + + + This represents a Binary Search Tree, with one case being the Empty tree, + This represents a Binary Search Tree, with one case being the Empty tree, + + + + and the other being a Node with a value and two subtrees. + and the other being a Node with a value and two subtrees. + + + + Check if an item exists in the binary search tree. + Check if an item exists in the binary search tree. + + + + Searches recursively using Pattern Matching. Returns true if it exists; otherwise, false. + Searches recursively using Pattern Matching. Returns true if it exists; otherwise, false. + + + + Check the left subtree. + Check the left subtree. + + + + Check the right subtree. + Check the right subtree. + + + + Inserts an item in the Binary Search Tree. + Inserts an item in the Binary Search Tree. + + + + Finds the place to insert recursively using Pattern Matching, then inserts a new node. + Finds the place to insert recursively using Pattern Matching, then inserts a new node. + + + + If the item is already present, it does not insert anything. + If the item is already present, it does not insert anything. + + + + No need to insert, it already exists; return the node. + No need to insert, it already exists; return the node. + + + + Call into left subtree. + Call into left subtree. + + + + Call into right subtree. + Call into right subtree. + + + + Discriminated Unions can also be represented as structs via the 'Struct' attribute. + Discriminated Unions can also be represented as structs via the 'Struct' attribute. + + + + This is helpful in situations where the performance of structs outweighs + This is helpful in situations where the performance of structs outweighs + + + + the flexibility of reference types. + the flexibility of reference types. + + + + However, there are two important things to know when doing this: + However, there are two important things to know when doing this: + + + + 1. A struct DU cannot be recursively-defined. + 1. A struct DU cannot be recursively-defined. + + + + 2. A struct DU must have unique names for each of its cases. + 2. A struct DU must have unique names for each of its cases. + + + + Pattern Matching is a feature of F# that allows you to utilize Patterns, + Pattern Matching is a feature of F# that allows you to utilize Patterns, + + + + which are a way to compare data with a logical structure or structures, + which are a way to compare data with a logical structure or structures, + + + + decompose data into constituent parts, or extract information from data in various ways. + decompose data into constituent parts, or extract information from data in various ways. + + + + You can then dispatch on the "shape" of a pattern via Pattern Matching. + You can then dispatch on the "shape" of a pattern via Pattern Matching. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/pattern-matching + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/pattern-matching + + + + A record for a person's first and last name + A record for a person's first and last name + + + + A Discriminated Union of 3 different kinds of employees + A Discriminated Union of 3 different kinds of employees + + + + Count everyone underneath the employee in the management hierarchy, + Count everyone underneath the employee in the management hierarchy, + + + + including the employee. + including the employee. + + + + Find all managers/executives named "Dave" who do not have any reports. + Find all managers/executives named "Dave" who do not have any reports. + + + + This uses the 'function' shorthand to as a lambda expression. + This uses the 'function' shorthand to as a lambda expression. + + + + [] matches an empty list. + [] matches an empty list. + + + + '_' is a wildcard pattern that matches anything. + '_' is a wildcard pattern that matches anything. + + + + This handles the "or else" case. + This handles the "or else" case. + + + + You can also use the shorthand function construct for pattern matching, + You can also use the shorthand function construct for pattern matching, + + + + which is useful when you're writing functions which make use of Partial Application. + which is useful when you're writing functions which make use of Partial Application. + + + + Define some more functions which parse with the helper function. + Define some more functions which parse with the helper function. + + + + Active Patterns are another powerful construct to use with pattern matching. + Active Patterns are another powerful construct to use with pattern matching. + + + + They allow you to partition input data into custom forms, decomposing them at the pattern match call site. + They allow you to partition input data into custom forms, decomposing them at the pattern match call site. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/active-patterns + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/active-patterns + + + + Pattern Matching via 'function' keyword and Active Patterns often looks like this. + Pattern Matching via 'function' keyword and Active Patterns often looks like this. + + + + Call the printer with some different values to parse. + Call the printer with some different values to parse. + + + + Option values are any kind of value tagged with either 'Some' or 'None'. + Option values are any kind of value tagged with either 'Some' or 'None'. + + + + They are used extensively in F# code to represent the cases where many other + They are used extensively in F# code to represent the cases where many other + + + + languages would use null references. + languages would use null references. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/options + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/options + + + + First, define a zipcode defined via Single-case Discriminated Union. + First, define a zipcode defined via Single-case Discriminated Union. + + + + Next, define a type where the ZipCode is optional. + Next, define a type where the ZipCode is optional. + + + + Next, define an interface type that represents an object to compute the shipping zone for the customer's zip code, + Next, define an interface type that represents an object to compute the shipping zone for the customer's zip code, + + + + given implementations for the 'getState' and 'getShippingZone' abstract methods. + given implementations for the 'getState' and 'getShippingZone' abstract methods. + + + + Next, calculate a shipping zone for a customer using a calculator instance. + Next, calculate a shipping zone for a customer using a calculator instance. + + + + This uses combinators in the Option module to allow a functional pipeline for + This uses combinators in the Option module to allow a functional pipeline for + + + + transforming data with Optionals. + transforming data with Optionals. + + + + Units of measure are a way to annotate primitive numeric types in a type-safe way. + Units of measure are a way to annotate primitive numeric types in a type-safe way. + + + + You can then perform type-safe arithmetic on these values. + You can then perform type-safe arithmetic on these values. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/units-of-measure + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/units-of-measure + + + + First, open a collection of common unit names + First, open a collection of common unit names + + + + Define a unitized constant + Define a unitized constant + + + + Next, define a new unit type + Next, define a new unit type + + + + Conversion factor mile to meter. + Conversion factor mile to meter. + + + + Define a unitized constant + Define a unitized constant + + + + Compute metric-system constant + Compute metric-system constant + + + + Values using Units of Measure can be used just like the primitive numeric type for things like printing. + Values using Units of Measure can be used just like the primitive numeric type for things like printing. + + + + Classes are a way of defining new object types in F#, and support standard Object-oriented constructs. + Classes are a way of defining new object types in F#, and support standard Object-oriented constructs. + + + + They can have a variety of members (methods, properties, events, etc.) + They can have a variety of members (methods, properties, events, etc.) + + + + To learn more about Classes, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/classes + To learn more about Classes, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/classes + + + + To learn more about Members, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/members + To learn more about Members, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/members + + + + A simple two-dimensional Vector class. + A simple two-dimensional Vector class. + + + + The class's constructor is on the first line, + The class's constructor is on the first line, + + + + and takes two arguments: dx and dy, both of type 'double'. + and takes two arguments: dx and dy, both of type 'double'. + + + + This internal field stores the length of the vector, computed when the + This internal field stores the length of the vector, computed when the + + + + object is constructed + object is constructed + + + + 'this' specifies a name for the object's self identifier. + 'this' specifies a name for the object's self identifier. + + + + In instance methods, it must appear before the member name. + In instance methods, it must appear before the member name. + + + + This member is a method. The previous members were properties. + This member is a method. The previous members were properties. + + + + This is how you instantiate the Vector2D class. + This is how you instantiate the Vector2D class. + + + + Get a new scaled vector object, without modifying the original object. + Get a new scaled vector object, without modifying the original object. + + + + Generic classes allow types to be defined with respect to a set of type parameters. + Generic classes allow types to be defined with respect to a set of type parameters. + + + + In the following, 'T is the type parameter for the class. + In the following, 'T is the type parameter for the class. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/generics/ + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/generics/ + + + + This internal field store the states in a list. + This internal field store the states in a list. + + + + Add a new element to the list of states. + Add a new element to the list of states. + + + + use the '<-' operator to mutate the value. + use the '<-' operator to mutate the value. + + + + Get the entire list of historical states. + Get the entire list of historical states. + + + + Get the latest state. + Get the latest state. + + + + An 'int' instance of the state tracker class. Note that the type parameter is inferred. + An 'int' instance of the state tracker class. Note that the type parameter is inferred. + + + + Add a state + Add a state + + + + Interfaces are object types with only 'abstract' members. + Interfaces are object types with only 'abstract' members. + + + + Object types and object expressions can implement interfaces. + Object types and object expressions can implement interfaces. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/interfaces + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/interfaces + + + + This is a type that implements IDisposable. + This is a type that implements IDisposable. + + + + This is the implementation of IDisposable members. + This is the implementation of IDisposable members. + + + + This is an object that implements IDisposable via an Object Expression + This is an object that implements IDisposable via an Object Expression + + + + Unlike other languages such as C# or Java, a new type definition is not needed + Unlike other languages such as C# or Java, a new type definition is not needed + + + + to implement an interface. + to implement an interface. + + + + The FSharp.Core library defines a range of parallel processing functions. Here + The FSharp.Core library defines a range of parallel processing functions. Here + + + + you use some functions for parallel processing over arrays. + you use some functions for parallel processing over arrays. + + + + To learn more, see: https://msdn.microsoft.com/en-us/visualfsharpdocs/conceptual/array.parallel-module-%5Bfsharp%5D + To learn more, see: https://msdn.microsoft.com/en-us/visualfsharpdocs/conceptual/array.parallel-module-%5Bfsharp%5D + + + + First, an array of inputs. + First, an array of inputs. + + + + Next, define a functions that does some CPU intensive computation. + Next, define a functions that does some CPU intensive computation. + + + + Next, do a parallel map over a large input array. + Next, do a parallel map over a large input array. + + + + Next, print the results. + Next, print the results. + + + + Events are a common idiom for .NET programming, especially with WinForms or WPF applications. + Events are a common idiom for .NET programming, especially with WinForms or WPF applications. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/members/events + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/members/events + + + + First, create instance of Event object that consists of subscription point (event.Publish) and event trigger (event.Trigger). + First, create instance of Event object that consists of subscription point (event.Publish) and event trigger (event.Trigger). + + + + Next, add handler to the event. + Next, add handler to the event. + + + + Next, trigger the event. + Next, trigger the event. + + + + Next, create an instance of Event that follows standard .NET convention: (sender, EventArgs). + Next, create an instance of Event that follows standard .NET convention: (sender, EventArgs). + + + + Next, add a handler for this new event. + Next, add a handler for this new event. + + + + Next, trigger this event (note that sender argument should be set). + Next, trigger this event (note that sender argument should be set). + + + + + \ No newline at end of file diff --git a/vsintegration/ProjectTemplates/TutorialProject/Template/xlf/Tutorial.fsx.es.xlf b/vsintegration/ProjectTemplates/TutorialProject/Template/xlf/Tutorial.fsx.es.xlf new file mode 100644 index 00000000000..638544aa504 --- /dev/null +++ b/vsintegration/ProjectTemplates/TutorialProject/Template/xlf/Tutorial.fsx.es.xlf @@ -0,0 +1,1637 @@ + + + + + + This sample will guide you through elements of the F# language. + Este ejemplo le guiará por los elementos del lenguaje F#. + + + + To execute the code in F# Interactive, highlight a section of code and press Alt-Enter or right-click + Para ejecutar el código en F# interactivo, resalte una sección de código y presione Alt+Entrar, o bien haga clic con el botón secundario + + + + and select "Execute in Interactive". You can open the F# Interactive Window from the "View" menu. + y seleccione "Ejecutar en modo interactivo". Puede abrir la ventana de F# interactivo desde el menú "Ver". + + + + For more about F#, see: + Para obtener más información acerca de F#, vea: + + + + To see this tutorial in documentation form, see: + Para ver este tutorial en forma de documentación, vea: + + + + To learn more about applied F# programming, use + Para obtener más información sobre la programación de F# aplicada, use + + + + To install the Visual F# Power Tools, use + Para instalar Visual F# Power Tools, use + + + + 'Tools' --> 'Extensions and Updates' --> `Online` and search + "Herramientas" --> "Extensiones y actualizaciones" --> "En línea" y busque + + + + For additional templates to use with F#, see the 'Online Templates' in Visual Studio, + Para obtener plantillas adicionales para su uso con F#, consulte 'Plantillas en línea' en Visual Studio, + + + + 'New Project' --> 'Online Templates' + "Nuevo proyecto" --> "Plantillas en línea" + + + + F# supports three kinds of comments: + F# admite tres tipos de comentarios: + + + + 1. Double-slash comments. These are used in most situations. + 1. Comentarios con doble barra diagonal. Se usan en la mayoría de las situaciones. + + + + 2. ML-style Block comments. These aren't used that often. + 2. Comentarios de bloque de estilo ML. No se usan con tanta frecuencia. + + + + 3. Triple-slash comments. These are used for documenting functions, types, and so on. + 3. Comentarios de triple barra diagonal. Se utilizan para funciones de documentación, tipos, etc. + + + + They will appear as text when you hover over something which is decorated with these comments. + Aparecerán como texto al mantener el puntero por encima de algo decorado con estos comentarios. + + + + They also support .NET-style XML comments, which allow you to generate reference documentation, + También admiten comentarios XML de estilo .NET, que le permite generar documentación de referencia, + + + + and they also allow editors (such as Visual Studio) to extract information from them. + y también permite a los editores (como Visual Studio) extraer información de ellos. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/xml-documentation + Para obtener más información, vea: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/xml-documentation + + + + Open namespaces using the 'open' keyword. + Abra los espacios de nombres con la palabra clave "open". + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/import-declarations-the-open-keyword + Para obtener más información, vea: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/import-declarations-the-open-keyword + + + + A module is a grouping of F# code, such as values, types, and function values. + Un módulo es una agrupación de código de F#, como valores, tipos y valores de función. + + + + Grouping code in modules helps keep related code together and helps avoid name conflicts in your program. + El código de agrupación de los módulos ayuda a mantener el código relacionado en conjunto y ayuda a evitar los conflictos de nombres en su programa. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/modules + Para obtener más información, vea: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/modules + + + + This is a sample integer. + Este es un entero de ejemplo. + + + + This is a sample floating point number. + Este es un número de punto flotante de ejemplo. + + + + This computed a new number by some arithmetic. Numeric types are converted using + Se calcula un número nuevo aplicando cierta aritmética. Los tipos numéricos se convierten mediante + + + + functions 'int', 'double' and so on. + funciones "int", "double", etc. + + + + This is a list of the numbers from 0 to 99. + Esta es una lista de números del 0 al 99. + + + + This is a list of all tuples containing all the numbers from 0 to 99 and their squares. + Esta es una lista de todas las tuplas que contienen todos los números de 0 a 99 y sus cuadrados. + + + + The next line prints a list that includes tuples, using '%A' for generic printing. + La línea siguiente imprime una lista que incluye tuplas, utilizando "%A" para la impresión genérica. + + + + This is a sample integer with a type annotation + Este es un entero de ejemplo con una anotación de tipo + + + + Values in F# are immutable by default. They cannot be changed + Los valores de F# son inmutables de manera predeterminada. No se pueden cambiar + + + + in the course of a program's execution unless explicitly marked as mutable. + en el transcurso de la ejecución de un programa a menos que se marquen explícitamente como mutable. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/values/index#why-immutable + Para obtener más información, vea: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/values/index#why-immutable + + + + Binding a value to a name via 'let' makes it immutable. + Al enlazar un valor a un nombre con "let", se convierte en inmutable. + + + + The second line of code fails to compile because 'number' is immutable and bound. + La segunda línea de código no se compila porque "number" es inmutable y está enlazado. + + + + Re-defining 'number' to be a different value is not allowed in F#. + En F#, no se puede redefinir "number" para darle otro valor. + + + + A mutable binding. This is required to be able to mutate the value of 'otherNumber'. + Enlace mutable. Es necesario para poder mutar el valor de "otherNumber". + + + + When mutating a value, use '<-' to assign a new value. + Para la mutación de un valor, use "<-" para asignar un valor nuevo. + + + + You could not use '=' here for this purpose since it is used for equality + No pudo usar "=" con este propósito, porque se usa para la igualdad + + + + or other contexts such as 'let' or 'module' + u otros contextos, como "let" o "module" + + + + Much of F# programming consists of defining functions that transform input data to produce + Gran parte de la programación de F# consiste en definir funciones que transforman los datos de entrada para generar + + + + useful results. + resultados útiles. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/ + Para obtener más información, vea: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/ + + + + You use 'let' to define a function. This one accepts an integer argument and returns an integer. + "let" se utiliza para definir una función. En este caso, acepta un argumento de entero y devuelve un entero. + + + + Parentheses are optional for function arguments, except for when you use an explicit type annotation. + Los paréntesis son opcionales para argumentos de función, excepto cuando se utiliza una anotación de tipo explícito. + + + + Apply the function, naming the function return result using 'let'. + Aplicar la función, asignando un nombre al resultado devuelto por la función mediante 'let'. + + + + The variable type is inferred from the function return type. + El tipo de variable se infiere del tipo de valor devuelto por la función. + + + + This line uses '%d' to print the result as an integer. This is type-safe. + Esta línea utiliza "%d" para imprimir el resultado de un entero. Cuenta con seguridad de tipos. + + + + If 'result1' were not of type 'int', then the line would fail to compile. + Si "result1" no fuese de tipo "int", la línea no se compilaría. + + + + When needed, annotate the type of a parameter name using '(argument:type)'. Parentheses are required. + Si es necesario, anote el tipo de un nombre de parámetro usando "(argument:type)". Los paréntesis son obligatorios. + + + + Conditionals use if/then/elid/elif/else. + Los condicionales usan if/then/elid/elif/else. + + + + Note that F# uses whitespace indentation-aware syntax, similar to languages like Python. + Tenga en cuenta que F# utiliza una sintaxis que tiene en cuenta la sangría de espacios en blanco, de forma parecida a lenguajes como Python. + + + + This line uses '%f' to print the result as a float. As with '%d' above, this is type-safe. + Esta línea utiliza "%f" para imprimir el resultado como un valor float. Al igual que "%d", cuenta con seguridad de tipos. + + + + Booleans are fundamental data types in F#. Here are some examples of Booleans and conditional logic. + Los valores booleanos son tipos de datos fundamentales en F#. Estos son algunos ejemplos de valores booleanos y lógica condicional. + + + + To learn more, see: + Para obtener más información, vea: + + + + and + y + + + + Booleans values are 'true' and 'false'. + Los valores booleanos son "true" y "false". + + + + Operators on booleans are 'not', '&&' and '||'. + Los operadores de valores booleanos son "not", "&&" y "||". + + + + This line uses '%b'to print a boolean value. This is type-safe. + Esta línea utiliza "%b" para imprimir un valor booleano. Cuenta con seguridad de tipos. + + + + Strings are fundamental data types in F#. Here are some examples of Strings and basic String manipulation. + Las cadenas son tipos de datos fundamentales en F#. Estos son algunos ejemplos de cadenas y de manipulación básica de cadenas. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/strings + Para obtener más información, vea: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/strings + + + + Strings use double quotes. + Las cadenas usan comillas dobles. + + + + Strings can also use @ to create a verbatim string literal. + Las cadenas también pueden usar @ para crear un literal de cadena textual. + + + + This will ignore escape characters such as '\', '\n', '\t', etc. + No tiene en cuenta los caracteres de escape, como "\", "\n", "\t", etc. + + + + String literals can also use triple-quotes. + Los literales de cadena también pueden usar comillas triples. + + + + String concatenation is normally done with the '+' operator. + La concatenación de cadenas suele hacerse con el operador "+". + + + + This line uses '%s' to print a string value. This is type-safe. + Esta línea utiliza "%s" para imprimir un valor de cadena. Cuenta con seguridad de tipos. + + + + Substrings use the indexer notation. This line extracts the first 7 characters as a substring. + Las subcadenas utilizan la notación del indexador. Esta línea extrae los 7 primeros caracteres como una subcadena. + + + + Note that like many languages, Strings are zero-indexed in F#. + Tenga en cuenta que, al igual que en otros muchos lenguajes, las cadenas tienen índice 0 en F#. + + + + Tuples are simple combinations of data values into a combined value. + Las tuplas son combinaciones simples de valores de datos en un valor combinado. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/tuples + Para obtener más información, vea: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/tuples + + + + A simple tuple of integers. + Tupla de enteros sencilla. + + + + A function that swaps the order of two values in a tuple. + Una función que intercambia el orden de dos valores en una tupla. + + + + F# Type Inference will automatically generalize the function to have a generic type, + La inferencia de tipos de F# generalizará la función de forma automática para que tenga un tipo genérico, + + + + meaning that it will work with any type. + lo que significa que funcionará con cualquier tipo. + + + + A tuple consisting of an integer, a string, + Una tupla que consta de un entero, una cadena, + + + + and a double-precision floating point number. + y un número de punto flotante de doble precisión. + + + + A simple tuple of integers with a type annotation. + Una tupla de enteros sencilla con una anotación de tipo. + + + + Type annotations for tuples use the * symbol to separate elements + Las anotaciones de tipo para las tuplas usan el símbolo * para separar los elementos + + + + Tuples are normally objects, but they can also be represented as structs. + Las tuplas suelen ser objetos, pero también se pueden representar como estructuras. + + + + These interoperate completely with structs in C# and Visual Basic.NET; however, + Interoperan completamente con estructuras de C# y Visual Basic.NET; sin embargo, + + + + struct tuples are not implicitly convertable with object tuples (often called reference tuples). + las tuplas de estructuras no son implícitamente convertibles con tuplas de objeto (a menudo denominadas tuplas de referencia). + + + + The second line below will fail to compile because of this. Uncomment it to see what happens. + La segunda línea no se compilará por esto. Quite las marcas de comentario para ver qué ocurre. + + + + Although you cannot implicitly convert between struct tuples and reference tuples, + Aunque no puede convertir tuplas de struct en tuplas de referencia y viceversa de forma implícita, + + + + you can explicitly convert via pattern matching, as demonstrated below. + puede hacer la conversión de forma explícita mediante coincidencia de patrones, como se muestra a continuación. + + + + The F# pipe operators ('|>', '<|', etc.) and F# composition operators ('>>', '<<') + Los operadores de canalización ("|>", "<|", etc.) y de composición (">>", "<<") de F# + + + + are used extensively when processing data. These operators are themselves functions + se utilizan mucho en el procesamiento de datos. Estos operadores son en sí mismos funciones. + + + + which make use of Partial Application. + que usan aplicación parcial. + + + + To learn more about these operators, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/#function-composition-and-pipelining + Para obtener más información sobre estos operadores, vea: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/#function-composition-and-pipelining + + + + To learn more about Partial Application, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/#partial-application-of-arguments + Para obtener más información sobre la aplicación parcial, vea: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/#partial-application-of-arguments + + + + Squares a value. + Eleva un valor la cuadrado. + + + + Adds 1 to a value. + Suma 1 a un valor. + + + + Tests if an integer value is odd via modulo. + Comprueba si un valor entero es impar mediante un módulo. + + + + A list of 5 numbers. More on lists later. + Lista de 5 números. Más adelante, se proporciona más información sobre listas. + + + + Given a list of integers, it filters out the even numbers, + Dada una lista de enteros, aplica un filtro para excluir los números pares, + + + + squares the resulting odds, and adds 1 to the squared odds. + eleva al cuadrado los impares resultantes y les suma 1. + + + + A shorter way to write 'squareOddValuesAndAddOne' is to nest each + Una forma más corta de escribir "squareOddValuesAndAddOne" es anidar cada + + + + sub-result into the function calls themselves. + subresultado en las propias llamadas a la función. + + + + This makes the function much shorter, but it's difficult to see the + Esto hace la función mucho más corta, pero es difícil ver el + + + + order in which the data is processed. + orden en el que se procesan los datos. + + + + A preferred way to write 'squareOddValuesAndAddOne' is to use F# pipe operators. + Una forma recomendable de escribir "squareOddValuesAndAddOne" es usar operadores de canalización de F#. + + + + This allows you to avoid creating intermediate results, but is much more readable + Esto permite evitar que se creen resultados intermedios, pero es mucho más fácil de leer + + + + than nesting function calls like 'squareOddValuesAndAddOneNested' + que anidar las llamadas a la función como "squareOddValuesAndAddOneNested" + + + + You can shorten 'squareOddValuesAndAddOnePipeline' by moving the second `List.map` call + No puede acortar "squareOddValuesAndAddOnePipeline" moviendo la segunda llamada de "List.map" + + + + into the first, using a Lambda Function. + a la primera, usando una función lambda. + + + + Note that pipelines are also being used inside the lambda function. F# pipe operators + Tenga en cuenta que las canalizaciones se usan también en la función lambda. Los operadores de canalización de F# + + + + can be used for single values as well. This makes them very powerful for processing data. + se puede usar también para valores individuales. Esto les confiere una gran capacidad para el procesamiento de datos. + + + + Lastly, you can eliminate the need to explicitly take 'values' in as a parameter by using '>>' + Por último, puede eliminar la necesidad de tomar "valores" de forma explícita como parámetro usando ">>" + + + + to compose the two core operations: filtering out even numbers, then squaring and adding one. + para componer las dos operaciones principales: aplicar un filtro para excluir los números pares, elevar al cuadrado y sumar uno. + + + + Likewise, the 'fun x -> ...' bit of the lambda expression is also not needed, because 'x' is simply + De igual modo, no se necesita tampoco la parte "fun x -> ..." de la expresión lambda, porque "x" + + + + being defined in that scope so that it can be passed to a functional pipeline. Thus, '>>' can be used + se define en ese ámbito para poderlo pasar a una canalización funcional. Por tanto, ">>" se pude usar + + + + there as well. + aquí también. + + + + The result of 'squareOddValuesAndAddOneComposition' is itself another function which takes a + El resultado de "squareOddValuesAndAddOneComposition" es en sí mismo otra función que toma una + + + + list of integers as its input. If you execute 'squareOddValuesAndAddOneComposition' with a list + lista de enteros como entrada. Si ejecuta "squareOddValuesAndAddOneComposition" con una lista + + + + of integers, you'll notice that it produces the same results as previous functions. + de enteros, notará que produce los mismos resultados que las funciones anteriores. + + + + This is using what is known as function composition. This is possible because functions in F# + Aquí se utiliza lo que se conoce como composición de funciones. Es posible porque las funciones en F# + + + + use Partial Application and the input and output types of each data processing operation match + utilizan aplicación parcial y los tipos de entrada y salida de cada operación de procesamiento de datos buscan + + + + the signatures of the functions we're using. + las signaturas de las funciones que estamos usando. + + + + Lists are ordered, immutable, singly-linked lists. They are eager in their evaluation. + Las listas están ordenadas, son inmutables y están vinculadas individualmente. Son diligentes en su evaluación. + + + + This module shows various ways to generate lists and process lists with some functions + Este módulo muestra varias formas de generar listas y procesarlas con algunas funciones + + + + in the 'List' module in the F# Core Library. + en el módulo "List" de la biblioteca principal de F#. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/lists + Para obtener más información, vea: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/lists + + + + Lists are defined using [ ... ]. This is an empty list. + Las listas se definen mediante [ ... ]. Esta es una lista vacía. + + + + This is a list with 3 elements. ';' is used to separate elements on the same line. + Esta es una lista de 3 elementos. Se utiliza ";" para separar los elementos que están en la misma línea. + + + + You can also separate elements by placing them on their own lines. + También puede separar los elementos poniendo cada uno en su propia línea. + + + + This is a list of integers from 1 to 1000 + Esta es una lista de enteros del 1 al 1000 + + + + Lists can also be generated by computations. This is a list containing + Las listas también pueden generarse mediante cálculos. Esta es una lista que contiene + + + + all the days of the year. + todos los días del año. + + + + Print the first 5 elements of 'daysList' using 'List.take'. + Imprime los 5 primeros elementos de "daysList" usando "List.take". + + + + Computations can include conditionals. This is a list containing the tuples + Los cálculos pueden incluir condicionales. Esta es una lista que contiene las tuplas + + + + which are the coordinates of the black squares on a chess board. + que son las coordenadas de los cuadrados negros de un tablero de ajedrez. + + + + Lists can be transformed using 'List.map' and other functional programming combinators. + Las listas se pueden transformas mediante "List.map" y otros combinadores de programación funcionales. + + + + This definition produces a new list by squaring the numbers in numberList, using the pipeline + Esta definición genera una nueva lista al elevar al cuadrado los números incluidos en numberList y usa el operador + + + + operator to pass an argument to List.map. + de canalización para pasar un argumento a List.map. + + + + There are many other list combinations. The following computes the sum of the squares of the + Hay otras muchas combinaciones de listas. La siguiente, calcula la suma de los cuadrados de los + + + + numbers divisible by 3. + números divisibles por 3. + + + + Arrays are fixed-size, mutable collections of elements of the same type. + Las matrices son colecciones mutables de tamaño fijo de elementos del mismo tipo. + + + + Although they are similar to Lists (they support enumeration and have similar combinators for data processing), + Aunque son parecidas a las listas (admiten enumeración y tienen combinadores parecidos para el procesamiento de datos), + + + + they are generally faster and support fast random access. This comes at the cost of being less safe by being mutable. + suelen ser más rápidas y admitir acceso aleatorio rápido. A cambio, tiene el inconveniente de que es menos seguro porque es mutable. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/arrays + Para obtener más información, vea: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/arrays + + + + This is The empty array. Note that the syntax is similar to that of Lists, but uses `[| ... |]` instead. + Esta es una matriz vacía. Observe que la sintaxis es parecida a la de las listas, pero utiliza "[| ... |]" en su lugar. + + + + Arrays are specified using the same range of constructs as lists. + Las matrices se especifican con el mismo intervalo de construcciones que las listas. + + + + This is an array of numbers from 1 to 1000. + Esta es una matriz de números del 1 al 1000. + + + + This is an array containing only the words "hello" and "world". + Esta es una matriz que solo contiene las palabras "hola" y "todos". + + + + This is an array initialized by index and containing the even numbers from 0 to 2000. + Esta es una matriz inicializada con un índice que contiene los números pares del 0 al 2000. + + + + Sub-arrays are extracted using slicing notation. + Las submatrices se extraen mediante la notación divisoria. + + + + You can loop over arrays and lists using 'for' loops. + Puede ejecutar un bucle en matrices y listas usando bucles "for". + + + + You can modify the contents of an an array element by using the left arrow assignment operator. + Puede modificar el contenido de un elemento de matriz mediante el operador de asignación de flecha izquierda. + + + + To learn more about this operator, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/values/index#mutable-variables + Para obtener más información sobre este operador, vea: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/values/index#mutable-variables + + + + You can transform arrays using 'Array.map' and other functional programming operations. + Para transformar matrices, use "Array.map" y otras operaciones de programación funcionales. + + + + The following calculates the sum of the lengths of the words that start with 'h'. + La operación siguiente calcula la suma de las longitudes de las palabras que empiezan por "h". + + + + Sequences are a logical series of elements, all of the same type. These are a more general type than Lists and Arrays. + Las secuencias son una serie lógica de elementos del mismo tipo. Son de un tipo más general que las listas o las matrices. + + + + Sequences are evaluated on-demand and are re-evaluated each time they are iterated. + Las secuencias se evalúan previa petición y se vuelven a evaluar cada vez que se recorren en iteración. + + + + An F# sequence is an alias for a .NET System.Collections.Generic.IEnumerable<'T>. + Una secuencia de F# es un alias para un elemento System.Collections.Generic.IEnumerable<'T> de .NET. + + + + Sequence processing functions can be applied to Lists and Arrays as well. + Las funciones de procesamiento de secuencias también pueden aplicarse a las listas y a las matrices. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/sequences + Para obtener más información, vea: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/sequences + + + + This is the empty sequence. + Esta es una secuencia vacía. + + + + This a sequence of values. + Esta es una secuencia de valores. + + + + This is an on-demand sequence from 1 to 1000. + Esta es una secuencia a petición del 1 al 1000. + + + + This is a sequence producing the words "hello" and "world" + Esta es una secuencia que genera las palabras "hola" y "todos" + + + + This sequence producing the even numbers up to 2000. + Esta secuencia genera los números pares hasta el 2000. + + + + This is an infinite sequence which is a random walk. + Esta es una secuencia infinita que constituye un recorrido aleatorio. + + + + This example uses yield! to return each element of a subsequence. + Este ejemplo usa yield! para devolver cada uno de los elementos de una subsecuencia. + + + + This example shows the first 100 elements of the random walk. + Este ejemplo muestra los 100 primeros elementos del recorrido aleatorio. + + + + Recursive functions can call themselves. In F#, functions are only recursive + Las funciones recursivas pueden llamarse a sí mismas. En F#, las funciones solo son recursivas + + + + when declared using 'let rec'. + cuando se declara con "let rec". + + + + Recursion is the preferred way to process sequences or collections in F#. + La recursión es la forma recomendada de procesar secuencias o colecciones en F#. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/index#recursive-functions + Para obtener más información, vea: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/index#recursive-functions + + + + This example shows a recursive function that computes the factorial of an + Este ejemplo muestra una función recursiva que calcula el factorial de un + + + + integer. It uses 'let rec' to define a recursive function. + entero. Usa "let rec" para definir una función recursiva. + + + + Computes the greatest common factor of two integers. + Calcula el mayor factor común de dos enteros. + + + + Since all of the recursive calls are tail calls, + Puesto que todas las llamadas recursivas son llamadas de cola, + + + + the compiler will turn the function into a loop, + el compilador devolverá la función en un bucle, + + + + which improves performance and reduces memory consumption. + lo que mejora el rendimiento y reduce el consumo de memoria. + + + + This example computes the sum of a list of integers using recursion. + Este ejemplo calcula la suma de una lista de enteros con recursión. + + + + This makes 'sumList' tail recursive, using a helper function with a result accumulator. + Esto convierte la función "sumList" en recursiva de cola, usando una función auxiliar con un acumulador de resultados. + + + + This invokes the tail recursive helper function, providing '0' as a seed accumulator. + Este código invoca la función auxiliar recursiva de cola, proporcionando "0" como acumulador de valores de inicialización. + + + + An approach like this is common in F#. + Este método es habitual en F#. + + + + Records are an aggregate of named values, with optional members (such as methods). + Los registros son un agregado de valores con nombre, con miembros opcionales (como los métodos). + + + + They are immutable and have structural equality semantics. + Son inmutables y tienen semántica de igualdad estructural. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/records + Para obtener más información, vea: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/records + + + + This example shows how to define a new record type. + Este ejemplo muestra cómo definir un nuevo tipo de registro. + + + + This example shows how to instantiate a record type. + Este ejemplo muestra cómo crear una instancia de un tipo de registro. + + + + You can also do this on the same line with ';' separators. + También puede hacer esto en la misma línea usando ";" como separador. + + + + This example shows how to use "copy-and-update" on record values. It creates + Este ejemplo muestra cómo usar "copy-and-update" en los valores de registro. Crea + + + + a new record value that is a copy of contact1, but has different values for + un nuevo valor de registro que es una copia de contact1, pero con valores distintos para + + + + the 'Phone' and 'Verified' fields. + los campos "Phone" y "Verified". + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/copy-and-update-record-expressions + Para obtener más información, vea: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/copy-and-update-record-expressions + + + + This example shows how to write a function that processes a record value. + Este ejemplo muestra cómo escribir una función que procesa un valor del registro. + + + + It converts a 'ContactCard' object to a string. + Convierte un objeto "ContactCard" en una cadena. + + + + This is an example of a Record with a member. + Este es un ejemplo de un registro con un miembro. + + + + Members can implement object-oriented members. + Los miembros pueden implementar miembros orientados a objetos. + + + + Members are accessed via the '.' operator on an instantiated type. + A los miembros se accede con el operador "." en un tipo del que se ha creado una instancia. + + + + Records can also be represented as structs via the 'Struct' attribute. + Los registros se pueden representar también como estructuras con el atributo "Struct". + + + + This is helpful in situations where the performance of structs outweighs + Esto es útil en situaciones donde el rendimiento de las estructuras es superior a + + + + the flexibility of reference types. + la flexibilidad de los tipos de referencia. + + + + Discriminated Unions (DU for short) are values which could be a number of named forms or cases. + Las uniones discriminadas (DU) son valores que podrían ser un gran número de formas o casos con nombre. + + + + Data stored in DUs can be one of several distinct values. + Los datos almacenados en uniones discriminadas pueden ser uno de varios valores diferentes. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/discriminated-unions + Para obtener más información, vea: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/discriminated-unions + + + + The following represents the suit of a playing card. + El siguiente código representa el palo de una carta. + + + + A Disciminated Union can also be used to represent the rank of a playing card. + También se puede usar una unión discriminada para representar el rango de una carta. + + + + Represents the rank of cards 2 .. 10 + Representa el rango de cartas 2 .. 10 + + + + Discriminated Unions can also implement object-oriented members. + Las uniones discriminadas pueden implementar también miembros orientados a objetos. + + + + This is a record type that combines a Suit and a Rank. + Este es un tipo de registro que combina un palo y un rango. + + + + It's common to use both Records and Disciminated Unions when representing data. + Es habitual utilizar tanto registros como uniones discriminadas cuando se representan datos. + + + + This computes a list representing all the cards in the deck. + Este código calcula una lista que representa todas las cartas de la baraja. + + + + This example converts a 'Card' object to a string. + Este ejemplo convierte un objeto "Card" en una cadena. + + + + This example prints all the cards in a playing deck. + Este ejemplo imprime todas las cartas de una baraja. + + + + Single-case DUs are often used for domain modeling. This can buy you extra type safety + Las uniones discriminadas de un solo caso se usan con frecuencia en el modelado de dominios. Esto puede aportar mayor seguridad de tipos + + + + over primitive types such as strings and ints. + en tipos primitivos, como cadenas y enteros. + + + + Single-case DUs cannot be implicitly converted to or from the type they wrap. + Las uniones discriminadas de un solo caso no se pueden convertir de forma implícita en el tipo que encapsulan, ni viceversa. + + + + For example, a function which takes in an Address cannot accept a string as that input, + Por ejemplo, una función que toma una dirección no puede aceptar una cadena como esa entrada, + + + + or vive/versa. + o viceversa. + + + + You can easily instantiate a single-case DU as follows. + Puede crear fácilmente una instancia de una unión discriminada de un solo caso del siguiente modo. + + + + When you need the value, you can unwrap the underlying value with a simple function. + Cuando necesite el valor, puede desencapsular el valor subyacente con una función sencilla. + + + + Printing single-case DUs is simple with unwrapping functions. + Imprimir uniones discriminadas de un solo caso es muy sencillo con funciones de desencapsulamiento. + + + + Disciminated Unions also support recursive definitions. + Las uniones discriminadas admiten también definiciones recursivas. + + + + This represents a Binary Search Tree, with one case being the Empty tree, + Esto representa un árbol de búsqueda binaria, donde un caso es el árbol vacío + + + + and the other being a Node with a value and two subtrees. + y el otro es un nodo con un valor y dos subárboles. + + + + Check if an item exists in the binary search tree. + Comprueba si existe un elemento en el árbol de búsqueda binaria. + + + + Searches recursively using Pattern Matching. Returns true if it exists; otherwise, false. + Hace búsquedas de forma recursiva usando coincidencia de patrones. Devuelve true si existe; de lo contrario, false. + + + + Check the left subtree. + Comprueba el subárbol de la izquierda. + + + + Check the right subtree. + Comprueba el subárbol de la derecha. + + + + Inserts an item in the Binary Search Tree. + Inserta un elemento en el árbol de búsqueda binaria. + + + + Finds the place to insert recursively using Pattern Matching, then inserts a new node. + Busca dónde insertar de forma recursiva un nuevo nodo usando coincidencia de patrones y lo inserta. + + + + If the item is already present, it does not insert anything. + Si el elemento ya está presente, no inserta nada. + + + + No need to insert, it already exists; return the node. + No es necesario insertarlo, ya existe; vuelve al nodo. + + + + Call into left subtree. + Llama al subárbol de la izquierda. + + + + Call into right subtree. + Llama al subárbol de la derecha. + + + + Discriminated Unions can also be represented as structs via the 'Struct' attribute. + Las uniones discriminadas se pueden representar también como estructuras con el atributo "Struct". + + + + This is helpful in situations where the performance of structs outweighs + Esto es útil en situaciones donde el rendimiento de las estructuras es superior a + + + + the flexibility of reference types. + la flexibilidad de los tipos de referencia. + + + + However, there are two important things to know when doing this: + No obstante, hay dos cosas importantes que deben tenerse en cuenta cuando se hace esto: + + + + 1. A struct DU cannot be recursively-defined. + 1. Una unión discriminada de estructura no se puede definir de forma recursiva. + + + + 2. A struct DU must have unique names for each of its cases. + 2. Una unión discriminada de estructura debe tener un nombre único para cada uno de sus casos. + + + + Pattern Matching is a feature of F# that allows you to utilize Patterns, + La coincidencia de patrones es una característica de F# que permite utilizar patrones, + + + + which are a way to compare data with a logical structure or structures, + que son una forma de comparar datos con estructuras lógicas, + + + + decompose data into constituent parts, or extract information from data in various ways. + descomponer datos en partes constituyentes o extraer información de datos de varias formas. + + + + You can then dispatch on the "shape" of a pattern via Pattern Matching. + Después, puede hacer envíos en función de la "forma" de un patrón mediante coincidencia de patrones. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/pattern-matching + Para obtener más información, vea: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/pattern-matching + + + + A record for a person's first and last name + Un registro para el nombre y los apellidos de una persona + + + + A Discriminated Union of 3 different kinds of employees + Una unión discriminada de 3 tipos de empleados diferentes + + + + Count everyone underneath the employee in the management hierarchy, + Cuenta a todos por debajo del empleado en la jerarquía de administración, + + + + including the employee. + incluido el empleado. + + + + Find all managers/executives named "Dave" who do not have any reports. + Buscar a todos los directores o ejecutivos que se llamen "Dave" que no tengan jefes. + + + + This uses the 'function' shorthand to as a lambda expression. + Aquí se utiliza la forma abreviada "function" como una expresión lambda. + + + + [] matches an empty list. + [] coincide con una lista vacía. + + + + '_' is a wildcard pattern that matches anything. + "_" es un patrón comodín que busca cualquier cosa. + + + + This handles the "or else" case. + Este código controla el caso "or else". + + + + You can also use the shorthand function construct for pattern matching, + También puede usar la construcción abreviada de funciones para la coincidencia de patrones, + + + + which is useful when you're writing functions which make use of Partial Application. + que es muy útil cuando se escriben funciones que utilizan aplicación parcial. + + + + Define some more functions which parse with the helper function. + Define algunas funciones más que se analizan con la función auxiliar. + + + + Active Patterns are another powerful construct to use with pattern matching. + Los patrones activos son también una construcción muy eficaz para usarla con coincidencia de patrones. + + + + They allow you to partition input data into custom forms, decomposing them at the pattern match call site. + Permiten particionar los datos de entrada en formas personalizadas, descomponiéndolos en el sitio de llamada de coincidencia de patrones. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/active-patterns + Para obtener más información, vea: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/active-patterns + + + + Pattern Matching via 'function' keyword and Active Patterns often looks like this. + La coincidencia de patrones con la palabra clave "function" y patrones activos suele ser similar a este código. + + + + Call the printer with some different values to parse. + Llamar a la impresora con algunos valores diferentes para analizar. + + + + Option values are any kind of value tagged with either 'Some' or 'None'. + Los valores de opción son cualquier tipo de valor etiquetado como 'Some' o 'None'. + + + + They are used extensively in F# code to represent the cases where many other + Se usan de forma exhaustiva en el código de F# para representar los casos en los que muchos otros + + + + languages would use null references. + lenguajes usarían referencias NULL. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/options + Para obtener más información, vea: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/options + + + + First, define a zipcode defined via Single-case Discriminated Union. + En primer lugar, defina un código postal con una unión discriminada de un solo caso. + + + + Next, define a type where the ZipCode is optional. + Después, defina un tipo donde ZipCode sea opcional. + + + + Next, define an interface type that represents an object to compute the shipping zone for the customer's zip code, + Después, defina un tipo de interfaz que represente un objeto para calcular la zona de envío del código postal del cliente, + + + + given implementations for the 'getState' and 'getShippingZone' abstract methods. + especificando implementaciones para los métodos abstractos 'getState' y 'getShippingZone'. + + + + Next, calculate a shipping zone for a customer using a calculator instance. + Después, calcule una zona de envío para un cliente con una instancia de la calculadora. + + + + This uses combinators in the Option module to allow a functional pipeline for + Aquí se utilizan combinadores en el módulo Option para permitir que una canalización funcional + + + + transforming data with Optionals. + transforme datos con valores opcionales. + + + + Units of measure are a way to annotate primitive numeric types in a type-safe way. + Las unidades de medida son una forma de anotar tipos numéricos primitivos con seguridad de tipos. + + + + You can then perform type-safe arithmetic on these values. + Después, puede realizar operaciones aritméticas con seguridad de tipos en estos valores. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/units-of-measure + Para obtener más información, vea: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/units-of-measure + + + + First, open a collection of common unit names + Primero, abra una colección de nombres de unidad comunes + + + + Define a unitized constant + Defina una constante dividida en unidades + + + + Next, define a new unit type + Después, defina un nuevo tipo de unidad + + + + Conversion factor mile to meter. + Factor de conversión de millas a metros. + + + + Define a unitized constant + Defina una constante dividida en unidades + + + + Compute metric-system constant + Calcular constante del sistema métrico + + + + Values using Units of Measure can be used just like the primitive numeric type for things like printing. + Los valores que usan unidades de medida se pueden usar simplemente como tipo numérico primitivo para cosas como la impresión. + + + + Classes are a way of defining new object types in F#, and support standard Object-oriented constructs. + Las clases son una forma de definir tipos de objeto nuevos en F# y admiten construcciones orientadas a objetos estándar. + + + + They can have a variety of members (methods, properties, events, etc.) + Pueden tener una gran variedad de miembros (métodos, propiedades, eventos, etc.) + + + + To learn more about Classes, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/classes + Para obtener más información sobre las clases, vea: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/classes + + + + To learn more about Members, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/members + Para obtener más información sobre miembros, vea https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/members + + + + A simple two-dimensional Vector class. + Clase Vector bidimensional sencilla. + + + + The class's constructor is on the first line, + El constructor de la clase está en la primera línea + + + + and takes two arguments: dx and dy, both of type 'double'. + y toma dos argumentos: dx y dy, ambos de tipo "double". + + + + This internal field stores the length of the vector, computed when the + Este campo interno almacena la longitud del vector, que se calcula cuando + + + + object is constructed + se construye el objeto + + + + 'this' specifies a name for the object's self identifier. + 'this' especifica un nombre para el propio identificador del objeto. + + + + In instance methods, it must appear before the member name. + En los métodos de instancia, debe aparecer delante del nombre del miembro. + + + + This member is a method. The previous members were properties. + Este miembro es un método. Los miembros anteriores eran propiedades. + + + + This is how you instantiate the Vector2D class. + Así es cómo se crea una instancia de la clase Vector2D. + + + + Get a new scaled vector object, without modifying the original object. + Obtener un nuevo objeto de vector a escala sin modificar el objeto original. + + + + Generic classes allow types to be defined with respect to a set of type parameters. + Las clases genéricas permiten definir tipos con respecto a un conjunto de parámetros de tipo. + + + + In the following, 'T is the type parameter for the class. + En el siguiente código, 'T es el parámetro de tipo para la clase. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/generics/ + Para obtener más información, vea: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/generics/ + + + + This internal field store the states in a list. + Este campo interno almacena los estados en una lista. + + + + Add a new element to the list of states. + Agregar un nuevo elemento a la lista de estados. + + + + use the '<-' operator to mutate the value. + Use el operador "<-" para mutar el valor. + + + + Get the entire list of historical states. + Obtener la lista completa de estados históricos. + + + + Get the latest state. + Obtener el último estado. + + + + An 'int' instance of the state tracker class. Note that the type parameter is inferred. + Una instancia 'int' de la clase del rastreador de estados. Observe que se ha inferido el parámetro de tipo. + + + + Add a state + Agregar un estado + + + + Interfaces are object types with only 'abstract' members. + Las interfaces son tipos de objeto que solo tienen miembros "abstract". + + + + Object types and object expressions can implement interfaces. + Los tipos de objeto y las expresiones de objeto pueden implementar interfaces. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/interfaces + Para obtener más información, vea: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/interfaces + + + + This is a type that implements IDisposable. + Este es un tipo que implementa IDisposable. + + + + This is the implementation of IDisposable members. + Esta es la implementación de los miembros de IDisposable. + + + + This is an object that implements IDisposable via an Object Expression + Este es un objeto que implementa IDisposable mediante una expresión de objeto + + + + Unlike other languages such as C# or Java, a new type definition is not needed + A diferencia de otros lenguajes, como C# o Java, no es necesaria una nueva definición de tipo + + + + to implement an interface. + para implementar una interfaz. + + + + The FSharp.Core library defines a range of parallel processing functions. Here + La biblioteca FSharp.Core define un intervalo de funciones de procesamiento paralelo. Aquí + + + + you use some functions for parallel processing over arrays. + se usan algunas funciones de procesamiento paralelo en matrices. + + + + To learn more, see: https://msdn.microsoft.com/en-us/visualfsharpdocs/conceptual/array.parallel-module-%5Bfsharp%5D + Para obtener más información, vea: https://msdn.microsoft.com/en-us/visualfsharpdocs/conceptual/array.parallel-module-%5Bfsharp%5D + + + + First, an array of inputs. + Primero, una matriz de entradas. + + + + Next, define a functions that does some CPU intensive computation. + Después, defina una función que realice algunos cálculos con gran consumo de CPU. + + + + Next, do a parallel map over a large input array. + Después, realice una asignación en paralelo en una matriz de entrada grande. + + + + Next, print the results. + Después, imprima los resultados. + + + + Events are a common idiom for .NET programming, especially with WinForms or WPF applications. + Los eventos son algo habitual en la programación para .NET, especialmente con aplicaciones de WinForms o WPF. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/members/events + Para obtener más información, vea: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/members/events + + + + First, create instance of Event object that consists of subscription point (event.Publish) and event trigger (event.Trigger). + Primero, cree una instancia del objeto Event que conste de un punto de suscripción (event.Publish) y un desencadenador de eventos (event.Trigger). + + + + Next, add handler to the event. + Después, agregue un controlador al evento. + + + + Next, trigger the event. + Después, desencadene el evento. + + + + Next, create an instance of Event that follows standard .NET convention: (sender, EventArgs). + Después, cree una instancia de Event que siga la convención estándar de .NET: (sender, EventArgs). + + + + Next, add a handler for this new event. + Después, agregue un controlador para este nuevo evento. + + + + Next, trigger this event (note that sender argument should be set). + Después, desencadene este evento (tenga en cuenta que el argumento sender debe estar establecido). + + + + + \ No newline at end of file diff --git a/vsintegration/ProjectTemplates/TutorialProject/Template/xlf/Tutorial.fsx.fr.xlf b/vsintegration/ProjectTemplates/TutorialProject/Template/xlf/Tutorial.fsx.fr.xlf new file mode 100644 index 00000000000..51bdc34726a --- /dev/null +++ b/vsintegration/ProjectTemplates/TutorialProject/Template/xlf/Tutorial.fsx.fr.xlf @@ -0,0 +1,1637 @@ + + + + + + This sample will guide you through elements of the F# language. + Cet exemple est destiné à vous montrer les différents éléments du langage F#. + + + + To execute the code in F# Interactive, highlight a section of code and press Alt-Enter or right-click + Pour exécuter le code en F# Interactive, mettez en surbrillance une portion du code, puis appuyez sur Alt+Entrée ou cliquez avec le bouton droit, + + + + and select "Execute in Interactive". You can open the F# Interactive Window from the "View" menu. + puis sélectionnez Exécuter en mode interactif. Pour ouvrir la fenêtre F# Interactive, accédez au menu Affichage. + + + + For more about F#, see: + Pour en savoir plus sur F#, consultez : + + + + To see this tutorial in documentation form, see: + Pour afficher ce didacticiel au format documentation, consultez : + + + + To learn more about applied F# programming, use + Pour en savoir plus sur la programmation F# appliquée, utilisez + + + + To install the Visual F# Power Tools, use + Pour installer Visual F# Power Tools, utilisez + + + + 'Tools' --> 'Extensions and Updates' --> `Online` and search + 'Outils' --> 'Extensions et mises à jour' --> `En ligne` et rechercher + + + + For additional templates to use with F#, see the 'Online Templates' in Visual Studio, + Pour consulter d'autres modèles d'utilisation du langage F#, cliquez sur Modèles en ligne dans Visual Studio, + + + + 'New Project' --> 'Online Templates' + 'Nouveau projet' --> 'Modèles en ligne' + + + + F# supports three kinds of comments: + F# prend en charge trois genres de commentaires : + + + + 1. Double-slash comments. These are used in most situations. + 1. Commentaires avec double barre oblique (utilisés dans la plupart des cas). + + + + 2. ML-style Block comments. These aren't used that often. + 2. Commentaires de bloc de style ML (rarement utilisés). + + + + 3. Triple-slash comments. These are used for documenting functions, types, and so on. + 3. Commentaires avec triple barre oblique (utilisés pour documenter les fonctions, les types, etc.). + + + + They will appear as text when you hover over something which is decorated with these comments. + Ils apparaissent sous forme de texte quand vous pointez sur un élément décoré avec ces commentaires. + + + + They also support .NET-style XML comments, which allow you to generate reference documentation, + Ils prennent également en charge les commentaires XML de style .NET, ce qui vous permet de générer une documentation de référence. + + + + and they also allow editors (such as Visual Studio) to extract information from them. + Les éditeurs tels que Visual Studio peuvent également extraire des informations à partir de ces commentaires. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/xml-documentation + Pour en savoir plus, consultez : https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/xml-documentation + + + + Open namespaces using the 'open' keyword. + Ouvrir des espaces de noms à l'aide du mot clé 'open'. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/import-declarations-the-open-keyword + Pour en savoir plus, consultez : https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/import-declarations-the-open-keyword + + + + A module is a grouping of F# code, such as values, types, and function values. + Un module est un regroupement d’éléments de code F#, comme des valeurs, des types et des valeurs de fonction. + + + + Grouping code in modules helps keep related code together and helps avoid name conflicts in your program. + Le regroupement du code dans les modules permet de conserver le code associé ensemble et d'éviter les conflits de noms dans votre programme. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/modules + Pour en savoir plus, consultez : https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/modules + + + + This is a sample integer. + Exemple d'entier. + + + + This is a sample floating point number. + Exemple de nombre à virgule flottante. + + + + This computed a new number by some arithmetic. Numeric types are converted using + Nouveau nombre calculé par une opération arithmétique. Les types numériques sont convertis à l'aide des + + + + functions 'int', 'double' and so on. + fonctions 'int', 'double', etc. + + + + This is a list of the numbers from 0 to 99. + Liste des nombres de 0 à 99. + + + + This is a list of all tuples containing all the numbers from 0 to 99 and their squares. + Liste de tous les tuples contenant tous les nombres de 0 à 99 et leur carré. + + + + The next line prints a list that includes tuples, using '%A' for generic printing. + La ligne suivante imprime une liste comprenant des tuples, en utilisant '%A' pour l'impression générique. + + + + This is a sample integer with a type annotation + Exemple d'entier avec une annotation de type. + + + + Values in F# are immutable by default. They cannot be changed + Les valeurs en F# sont immuables par défaut. Elles ne peuvent pas être changées + + + + in the course of a program's execution unless explicitly marked as mutable. + durant l'exécution d'un programme, sauf si elles sont explicitement marquées comme mutables. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/values/index#why-immutable + Pour en savoir plus, consultez : https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/values/index#why-immutable + + + + Binding a value to a name via 'let' makes it immutable. + Le fait de lier une valeur à un nom au moyen de 'let' la rend non modifiable. + + + + The second line of code fails to compile because 'number' is immutable and bound. + La compilation de la deuxième ligne de code échoue, car 'number' est non modifiable et lié. + + + + Re-defining 'number' to be a different value is not allowed in F#. + La redéfinition de 'number' en une valeur différente n'est pas autorisée dans F#. + + + + A mutable binding. This is required to be able to mutate the value of 'otherNumber'. + Liaison mutable. Obligatoire pour muter la valeur de 'otherNumber'. + + + + When mutating a value, use '<-' to assign a new value. + En cas de mutation d'une valeur, utilisez '<-' pour assigner une nouvelle valeur. + + + + You could not use '=' here for this purpose since it is used for equality + Vous ne pouvez pas utiliser '=' ici à cet effet, car il est utilisé pour l'égalité + + + + or other contexts such as 'let' or 'module' + ou autres contextes tels que 'let' ou 'module' + + + + Much of F# programming consists of defining functions that transform input data to produce + La programmation en F# consiste en grande partie à définir des fonctions qui transforment des données d'entrée pour produire des + + + + useful results. + résultats utiles. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/ + Pour en savoir plus, consultez : https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/ + + + + You use 'let' to define a function. This one accepts an integer argument and returns an integer. + Utilisez 'let' pour définir une fonction. Celle-ci accepte un argument entier et retourne un entier. + + + + Parentheses are optional for function arguments, except for when you use an explicit type annotation. + Les parenthèses sont facultatives pour les arguments de fonction, sauf quand vous utilisez une annotation de type explicite. + + + + Apply the function, naming the function return result using 'let'. + Appliquez la fonction, en nommant le résultat de retour de la fonction à l'aide de 'let'. + + + + The variable type is inferred from the function return type. + Le type de variable est déduit du type de retour de la fonction. + + + + This line uses '%d' to print the result as an integer. This is type-safe. + Cette ligne utilise '%d' pour imprimer le résultat comme entier. Cette opération est de type sécurisé. + + + + If 'result1' were not of type 'int', then the line would fail to compile. + Si 'result1' n'est pas de type 'int', la compilation de la ligne échoue. + + + + When needed, annotate the type of a parameter name using '(argument:type)'. Parentheses are required. + Si nécessaire, annotez le type d'un nom de paramètre en utilisant '(argument:type)'. Les parenthèses sont obligatoires. + + + + Conditionals use if/then/elid/elif/else. + Les conditions utilisent if/then/elid/elif/else. + + + + Note that F# uses whitespace indentation-aware syntax, similar to languages like Python. + Notez que F# utilise une syntaxe prenant en charge la mise en retrait à l'aide d'espaces, comme Python. + + + + This line uses '%f' to print the result as a float. As with '%d' above, this is type-safe. + Cette ligne utilise '%f' pour imprimer le résultat comme float. Comme '%d' ci-dessus, cette opération est de type sécurisé. + + + + Booleans are fundamental data types in F#. Here are some examples of Booleans and conditional logic. + Les booléens sont des types de données fondamentaux en F#. Voici quelques exemples illustrant des booléens et la logique conditionnelle. + + + + To learn more, see: + Pour en savoir plus, consultez : + + + + and + et + + + + Booleans values are 'true' and 'false'. + Les valeurs booléennes sont 'true' et 'false'. + + + + Operators on booleans are 'not', '&&' and '||'. + Les opérateurs sur les booléens sont 'not', '&&' et '||'. + + + + This line uses '%b'to print a boolean value. This is type-safe. + Cette ligne utilise '%b' pour imprimer une valeur booléenne. Cette opération est de type sécurisé. + + + + Strings are fundamental data types in F#. Here are some examples of Strings and basic String manipulation. + Les chaînes sont des types de données fondamentaux en F#. Voici quelques exemples illustrant des chaînes et la manipulation de chaînes de base. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/strings + Pour en savoir plus, consultez : https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/strings + + + + Strings use double quotes. + Les chaînes utilisent des guillemets doubles. + + + + Strings can also use @ to create a verbatim string literal. + Les chaînes peuvent également utiliser @ pour créer un littéral de chaîne textuelle. + + + + This will ignore escape characters such as '\', '\n', '\t', etc. + Les caractères d'échappement tels que '\', '\n', '\t', etc. sont ainsi ignorés. + + + + String literals can also use triple-quotes. + Les littéraux de chaîne peuvent également utiliser des guillemets triples. + + + + String concatenation is normally done with the '+' operator. + L'opérateur '+' est généralement utilisé pour la concaténation de chaînes. + + + + This line uses '%s' to print a string value. This is type-safe. + Cette ligne utilise '%s' pour imprimer une valeur de chaîne. Cette opération est de type sécurisé. + + + + Substrings use the indexer notation. This line extracts the first 7 characters as a substring. + Les sous-chaînes utilisent la notation de l'indexeur. Cette ligne extrait les 7 premiers caractères comme sous-chaîne. + + + + Note that like many languages, Strings are zero-indexed in F#. + Comme dans bien d'autres langages, les chaînes ont un index de base zéro en F#. + + + + Tuples are simple combinations of data values into a combined value. + Les tuples sont des combinaisons simples de valeurs de données formant une valeur combinée. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/tuples + Pour en savoir plus, consultez : https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/tuples + + + + A simple tuple of integers. + Tuple simple d'entiers. + + + + A function that swaps the order of two values in a tuple. + Fonction qui inverse l'ordre de deux valeurs d'un tuple. + + + + F# Type Inference will automatically generalize the function to have a generic type, + L'inférence de type F# généralise automatiquement la fonction pour qu'elle soit de type générique, + + + + meaning that it will work with any type. + ce qui signifie qu'elle peut fonctionner avec n'importe quel type. + + + + A tuple consisting of an integer, a string, + Tuple constitué d'un entier, d'une chaîne + + + + and a double-precision floating point number. + et d'un nombre à virgule flottante à double précision. + + + + A simple tuple of integers with a type annotation. + Tuple simple d'entiers avec une annotation de type. + + + + Type annotations for tuples use the * symbol to separate elements + Annotations de type pour les tuples qui utilisent le symbole * afin de séparer les éléments + + + + Tuples are normally objects, but they can also be represented as structs. + Les tuples sont généralement des objets, mais peuvent aussi être représentés sous forme de structs. + + + + These interoperate completely with structs in C# and Visual Basic.NET; however, + Ils interagissent entièrement avec les structs en C# et Visual Basic .NET ; cependant, + + + + struct tuples are not implicitly convertable with object tuples (often called reference tuples). + les tuples de type struct ne sont pas implicitement convertibles avec des tuples d'objet (souvent appelés tuples de référence). + + + + The second line below will fail to compile because of this. Uncomment it to see what happens. + La compilation de la deuxième ligne ci-dessous échoue à cause de cela. Supprimez les marques de commentaire pour voir ce qui se passe. + + + + Although you cannot implicitly convert between struct tuples and reference tuples, + Bien que vous ne puissiez pas effectuer de conversion implicite entre les tuples de type struct et les tuples de type référence, + + + + you can explicitly convert via pattern matching, as demonstrated below. + vous pouvez effectuer une conversion explicite à l'aide de critères spéciaux, comme indiqué ci-dessous. + + + + The F# pipe operators ('|>', '<|', etc.) and F# composition operators ('>>', '<<') + Les opérateurs de canal F# ('|>', '<|', etc.) et les opérateurs de composition F# ('>>', '<<') + + + + are used extensively when processing data. These operators are themselves functions + sont très utilisés de façon pour le traitement des données. Ces opérateurs sont eux-mêmes des fonctions + + + + which make use of Partial Application. + qui utilisent l'application partielle. + + + + To learn more about these operators, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/#function-composition-and-pipelining + Pour en savoir plus sur ces opérateurs, consultez : https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/#function-composition-and-pipelining + + + + To learn more about Partial Application, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/#partial-application-of-arguments + Pour en savoir plus sur l'application partielle, consultez : https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/#partial-application-of-arguments + + + + Squares a value. + Met une valeur au carré. + + + + Adds 1 to a value. + Ajoute 1 à une valeur. + + + + Tests if an integer value is odd via modulo. + Teste si une valeur entière est impaire à l'aide d'une opération modulo. + + + + A list of 5 numbers. More on lists later. + Liste de 5 nombres. Nous reviendrons sur les listes plus tard. + + + + Given a list of integers, it filters out the even numbers, + Pour une liste d'entiers donnée, élimine les nombres pairs par filtrage, + + + + squares the resulting odds, and adds 1 to the squared odds. + met au carré les nombres impairs résultants, puis ajoute 1 au carré des nombres impairs. + + + + A shorter way to write 'squareOddValuesAndAddOne' is to nest each + Pour écrire plus rapidement 'squareOddValuesAndAddOne', imbriquez chaque + + + + sub-result into the function calls themselves. + sous-résultat dans les appels de fonction. + + + + This makes the function much shorter, but it's difficult to see the + La fonction est ainsi considérablement raccourcie, mais il est difficile de voir + + + + order in which the data is processed. + l'ordre dans lequel les données sont traitées. + + + + A preferred way to write 'squareOddValuesAndAddOne' is to use F# pipe operators. + Pour écrire 'squareOddValuesAndAddOne', utilisez de préférence des opérateurs de canal F#. + + + + This allows you to avoid creating intermediate results, but is much more readable + Aucun résultat intermédiaire n'est créé, mais la syntaxe est beaucoup plus lisible + + + + than nesting function calls like 'squareOddValuesAndAddOneNested' + que d'imbriquer des appels de fonction comme 'squareOddValuesAndAddOneNested' + + + + You can shorten 'squareOddValuesAndAddOnePipeline' by moving the second `List.map` call + Vous pouvez raccourcir 'squareOddValuesAndAddOnePipeline' en déplaçant le second appel 'List.map' + + + + into the first, using a Lambda Function. + dans le premier en utilisant une fonction lambda. + + + + Note that pipelines are also being used inside the lambda function. F# pipe operators + Notez que les pipelines sont également utilisés dans la fonction lambda. Les opérateurs de canal F# + + + + can be used for single values as well. This makes them very powerful for processing data. + peuvent également être utilisés pour des valeurs uniques. Ils sont donc très efficaces dans le traitement des données. + + + + Lastly, you can eliminate the need to explicitly take 'values' in as a parameter by using '>>' + Enfin, vous pouvez éliminer la nécessité d'accepter explicitement 'values' comme paramètre en utilisant '>>' + + + + to compose the two core operations: filtering out even numbers, then squaring and adding one. + pour composer les deux opérations principales : élimination des nombres pairs par filtrage, puis mise au carré et ajout d'une unité. + + + + Likewise, the 'fun x -> ...' bit of the lambda expression is also not needed, because 'x' is simply + De même, la partie 'fun x -> ...' de l'expression lambda n'est pas nécessaire, car 'x' est simplement + + + + being defined in that scope so that it can be passed to a functional pipeline. Thus, '>>' can be used + défini dans cette portée pour pouvoir être passé à un pipeline fonctionnel. Vous pouvez donc utiliser '>>' + + + + there as well. + ici aussi. + + + + The result of 'squareOddValuesAndAddOneComposition' is itself another function which takes a + Le résultat de 'squareOddValuesAndAddOneComposition' est une autre fonction qui accepte une + + + + list of integers as its input. If you execute 'squareOddValuesAndAddOneComposition' with a list + liste d'entiers comme entrée. Si vous exécutez 'squareOddValuesAndAddOneComposition' avec une liste + + + + of integers, you'll notice that it produces the same results as previous functions. + d'entiers, les résultats sont identiques à ceux des fonctions précédentes. + + + + This is using what is known as function composition. This is possible because functions in F# + C'est ce qui s'appelle la composition de fonctions. Cela vient du fait que les fonctions en F# + + + + use Partial Application and the input and output types of each data processing operation match + utilisent l'application partielle et que les types d'entrée et de sortie de chaque opération de traitement de données correspondent + + + + the signatures of the functions we're using. + aux signatures des fonctions que nous utilisons. + + + + Lists are ordered, immutable, singly-linked lists. They are eager in their evaluation. + Les listes sont ordonnées, non modifiables et liées individuellement. Elles font l'objet d'une évaluation stricte. + + + + This module shows various ways to generate lists and process lists with some functions + Ce module montre différentes façons de générer et de traiter des listes à l'aide de fonctions + + + + in the 'List' module in the F# Core Library. + du module 'List' de la bibliothèque principale F#. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/lists + Pour en savoir plus, consultez : https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/lists + + + + Lists are defined using [ ... ]. This is an empty list. + Les listes sont définies à l'aide de [ ... ]. Il s'agit d'une liste vide. + + + + This is a list with 3 elements. ';' is used to separate elements on the same line. + Il s'agit d'une liste avec 3 éléments. ';' permet de séparer des éléments sur la même ligne. + + + + You can also separate elements by placing them on their own lines. + Vous pouvez également séparer des éléments en les plaçant chacun sur une ligne. + + + + This is a list of integers from 1 to 1000 + Il s'agit de la liste des entiers de 1 à 1 000 + + + + Lists can also be generated by computations. This is a list containing + Les listes peuvent également être générées par calculs. Il s'agit d'une liste contenant + + + + all the days of the year. + tous les jours de l'année. + + + + Print the first 5 elements of 'daysList' using 'List.take'. + Imprimez les 5 premiers éléments de 'daysList' en utilisant 'List.take'. + + + + Computations can include conditionals. This is a list containing the tuples + Les calculs peuvent inclure des conditions. Il s'agit d'une liste contenant les tuples + + + + which are the coordinates of the black squares on a chess board. + qui sont les coordonnées des cases noires d'un échiquier. + + + + Lists can be transformed using 'List.map' and other functional programming combinators. + Les listes peuvent être transformées à l'aide de 'List.map' et d'autres combinateurs de programmation fonctionnelle. + + + + This definition produces a new list by squaring the numbers in numberList, using the pipeline + Cette définition produit une nouvelle liste en mettant au carré les nombres de numberList à l'aide de + + + + operator to pass an argument to List.map. + l'opérateur du pipeline pour passer un argument à List.map. + + + + There are many other list combinations. The following computes the sum of the squares of the + Il existe de nombreuses autres combinaisons de listes. La combinaison suivante calcule la somme des carrés des + + + + numbers divisible by 3. + nombres divisibles par 3. + + + + Arrays are fixed-size, mutable collections of elements of the same type. + Les tableaux sont des collections de taille fixe et mutables d'éléments du même type. + + + + Although they are similar to Lists (they support enumeration and have similar combinators for data processing), + Bien qu'ils soient semblables aux listes (prise en charge de l'énumération et combinateurs similaires pour le traitement des données), + + + + they are generally faster and support fast random access. This comes at the cost of being less safe by being mutable. + ils offrent généralement une vitesse accrue et prennent en charge l'accès aléatoire rapide. Ils sont toutefois moins sécurisés du fait de leur mutabilité. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/arrays + Pour en savoir plus, consultez : https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/arrays + + + + This is The empty array. Note that the syntax is similar to that of Lists, but uses `[| ... |]` instead. + Tableau vide. Notez que la syntaxe est semblable à celle des listes, mais '[| ... |]' est utilisé à la place. + + + + Arrays are specified using the same range of constructs as lists. + Les tableaux sont spécifiés à l'aide de la même plage de constructions que les listes. + + + + This is an array of numbers from 1 to 1000. + Il s'agit d'un tableau de nombres de 1 à 1 000. + + + + This is an array containing only the words "hello" and "world". + Il s'agit d'un tableau contenant uniquement les mots "hello" et "world". + + + + This is an array initialized by index and containing the even numbers from 0 to 2000. + Il s'agit d'un tableau lancé par index, qui contient les nombres pairs de 0 à 2 000. + + + + Sub-arrays are extracted using slicing notation. + Les sous-tableaux sont extraits à l'aide de la notation de découpage. + + + + You can loop over arrays and lists using 'for' loops. + Vous pouvez effectuer une boucle sur des tableaux et des listes à l'aide de boucles 'for'. + + + + You can modify the contents of an an array element by using the left arrow assignment operator. + Vous pouvez modifier le contenu d'un élément de tableau à l'aide de l'opérateur d'assignation flèche gauche. + + + + To learn more about this operator, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/values/index#mutable-variables + Pour en savoir plus sur cet opérateur, consultez : https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/values/index#mutable-variables + + + + You can transform arrays using 'Array.map' and other functional programming operations. + Vous pouvez transformer des tableaux à l'aide de 'Array.map' et d'autres opérations de programmation fonctionnelle. + + + + The following calculates the sum of the lengths of the words that start with 'h'. + L'opération suivante calcule la somme des longueurs des mots qui commencent par 'h'. + + + + Sequences are a logical series of elements, all of the same type. These are a more general type than Lists and Arrays. + Les séquences sont des séries logiques d'éléments du même type. Elles sont plus générales que les listes et les tableaux. + + + + Sequences are evaluated on-demand and are re-evaluated each time they are iterated. + Les séquences sont évaluées sur demande et sont réévaluées à chacune de leur itération. + + + + An F# sequence is an alias for a .NET System.Collections.Generic.IEnumerable<'T>. + Une séquence F# est un alias pour un System.Collections.Generic.IEnumerable .NET<'T>. + + + + Sequence processing functions can be applied to Lists and Arrays as well. + Les fonctions de traitement de séquence peuvent être appliquées aux listes et aux tableaux également. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/sequences + Pour en savoir plus, consultez : https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/sequences + + + + This is the empty sequence. + Il s'agit de la séquence vide. + + + + This a sequence of values. + Il s'agit d'une séquence de valeurs. + + + + This is an on-demand sequence from 1 to 1000. + Séquence à la demande de 1 à 1000. + + + + This is a sequence producing the words "hello" and "world" + Il s'agit d'une séquence produisant les mots "hello" et "world" + + + + This sequence producing the even numbers up to 2000. + Cette séquence produit les nombres pairs jusqu'à 2 000. + + + + This is an infinite sequence which is a random walk. + Il s'agit d'une séquence infinie correspondant à une marche aléatoire. + + + + This example uses yield! to return each element of a subsequence. + Cet exemple utilise yield! pour retourner chaque élément d'une sous-séquence. + + + + This example shows the first 100 elements of the random walk. + Cet exemple montre les 100 premiers éléments de la marche aléatoire. + + + + Recursive functions can call themselves. In F#, functions are only recursive + Les fonctions récursives peuvent s'appeler elles-mêmes. En F#, les fonctions sont uniquement récursives + + + + when declared using 'let rec'. + en cas de déclaration avec 'let rec'. + + + + Recursion is the preferred way to process sequences or collections in F#. + Il est recommandé d'utiliser la récursivité pour traiter des séquences ou des collections en F#. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/index#recursive-functions + Pour en savoir plus, consultez : https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/index#recursive-functions + + + + This example shows a recursive function that computes the factorial of an + Cet exemple montre une fonction récursive qui calcule la factorielle d'un + + + + integer. It uses 'let rec' to define a recursive function. + entier. Il utilise 'let rec' pour définir une fonction récursive. + + + + Computes the greatest common factor of two integers. + Calcule le plus grand commun diviseur de deux entiers. + + + + Since all of the recursive calls are tail calls, + Comme tous les appels récursifs sont des appels terminaux, + + + + the compiler will turn the function into a loop, + le compilateur transforme la fonction en boucle, + + + + which improves performance and reduces memory consumption. + ce qui améliore le niveau de performance et réduit la consommation de mémoire. + + + + This example computes the sum of a list of integers using recursion. + Cet exemple calcule la somme d'une liste d'entiers à l'aide de la récursivité. + + + + This makes 'sumList' tail recursive, using a helper function with a result accumulator. + 'sumList' est converti en fonction à récursivité terminale, en utilisant une fonction d'assistance avec accumulateur de résultats. + + + + This invokes the tail recursive helper function, providing '0' as a seed accumulator. + La fonction d'assistance de récursivité terminale est appelée et fournit '0' comme accumulateur de valeurs initiales. + + + + An approach like this is common in F#. + Une telle approche est courante en F#. + + + + Records are an aggregate of named values, with optional members (such as methods). + Les enregistrements sont des agrégats de valeurs nommées, avec des membres facultatifs (comme des méthodes). + + + + They are immutable and have structural equality semantics. + Ils ne sont pas modifiables et ont une sémantique d'égalité structurelle. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/records + Pour en savoir plus, consultez : https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/records + + + + This example shows how to define a new record type. + Cet exemple montre comment définir un nouveau type d'enregistrement. + + + + This example shows how to instantiate a record type. + Cet exemple montre comment instancier un type d'enregistrement. + + + + You can also do this on the same line with ';' separators. + Vous pouvez également effectuer cette opération sur la même ligne avec des séparateurs ';'. + + + + This example shows how to use "copy-and-update" on record values. It creates + Cet exemple montre comment utiliser "copy-and-update" sur des valeurs d'enregistrement. Il crée + + + + a new record value that is a copy of contact1, but has different values for + une nouvelle valeur d'enregistrement qui est une copie de contact1, mais qui a différentes valeurs pour + + + + the 'Phone' and 'Verified' fields. + les champs 'Phone' et 'Verified'. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/copy-and-update-record-expressions + Pour en savoir plus, consultez : https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/copy-and-update-record-expressions + + + + This example shows how to write a function that processes a record value. + Cet exemple montre comment écrire une fonction qui traite une valeur d'enregistrement. + + + + It converts a 'ContactCard' object to a string. + Il convertit un objet 'ContactCard' en chaîne. + + + + This is an example of a Record with a member. + Il s'agit d'un exemple d'enregistrement avec un membre. + + + + Members can implement object-oriented members. + Les membres peuvent implémenter des membres orientés objet. + + + + Members are accessed via the '.' operator on an instantiated type. + Les membres sont accessibles au moyen de l'opérateur '.' sur un type instancié. + + + + Records can also be represented as structs via the 'Struct' attribute. + Les enregistrements peuvent également être représentés sous forme de structs par le biais de l'attribut 'Struct'. + + + + This is helpful in situations where the performance of structs outweighs + Cela peut s'avérer utile dans les situations où le niveau de performance des structs l'emporte + + + + the flexibility of reference types. + sur la flexibilité des types de référence. + + + + Discriminated Unions (DU for short) are values which could be a number of named forms or cases. + Les unions discriminées sont des valeurs qui peuvent correspondre à un certain nombre de formulaires ou de cas nommés. + + + + Data stored in DUs can be one of several distinct values. + Les données stockées dans les unions discriminées peuvent prendre une valeur parmi plusieurs valeurs distinctes. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/discriminated-unions + Pour en savoir plus, consultez : https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/discriminated-unions + + + + The following represents the suit of a playing card. + Ce qui suit représente la couleur d'une carte à jouer. + + + + A Disciminated Union can also be used to represent the rank of a playing card. + Une union discriminée peut également servir à représenter le rang d'une carte à jouer. + + + + Represents the rank of cards 2 .. 10 + Représente le rang des cartes 2 .. 10 + + + + Discriminated Unions can also implement object-oriented members. + Les unions discriminées peuvent également implémenter des membres orientés objet. + + + + This is a record type that combines a Suit and a Rank. + Il s'agit d'un type d'enregistrement qui combine une couleur et un rang. + + + + It's common to use both Records and Disciminated Unions when representing data. + Il est fréquent d'utiliser à la fois des enregistrements et des unions discriminées pour représenter des données. + + + + This computes a list representing all the cards in the deck. + Ceci calcule une liste représentant toutes les cartes du paquet. + + + + This example converts a 'Card' object to a string. + Cet exemple convertit un objet 'Card' en chaîne. + + + + This example prints all the cards in a playing deck. + Cet exemple imprime toutes les cartes d'un jeu de cartes. + + + + Single-case DUs are often used for domain modeling. This can buy you extra type safety + Les unions discriminées à cas unique sont souvent utilisées pour la modélisation de domaines. Il peut en résulter une meilleure cohérence des types + + + + over primitive types such as strings and ints. + sur des types primitifs tels que les chaînes et les entiers. + + + + Single-case DUs cannot be implicitly converted to or from the type they wrap. + Les unions discriminées à cas unique ne peuvent pas être converties implicitement vers ou à partir du type qu'elles incluent dans un wrapper. + + + + For example, a function which takes in an Address cannot accept a string as that input, + Par exemple, une fonction qui accepte une adresse ne peut pas accepter une chaîne comme entrée + + + + or vive/versa. + ou vice versa. + + + + You can easily instantiate a single-case DU as follows. + Vous pouvez facilement instancier une union discriminée à cas unique comme suit. + + + + When you need the value, you can unwrap the underlying value with a simple function. + Quand vous avez besoin de la valeur, vous pouvez exclure la valeur sous-jacente du wrapper à l'aide d'une fonction simple. + + + + Printing single-case DUs is simple with unwrapping functions. + Les fonctions d'exclusion d'un wrapper facilitent l'impression d'unions discriminées à cas unique. + + + + Disciminated Unions also support recursive definitions. + Les unions discriminées prennent également en charge les définitions récursives. + + + + This represents a Binary Search Tree, with one case being the Empty tree, + Ceci représente un arbre de recherche binaire, l'un des cas étant l'arbre vide + + + + and the other being a Node with a value and two subtrees. + et l'autre étant un nœud avec une valeur et deux sous-arbres. + + + + Check if an item exists in the binary search tree. + Vérifiez si un élément existe dans l'arbre de recherche binaire. + + + + Searches recursively using Pattern Matching. Returns true if it exists; otherwise, false. + Effectue une recherche récursive à l'aide de critères spéciaux. Retourne true si l'élément existe ; sinon, false. + + + + Check the left subtree. + Vérifiez le sous-arbre gauche. + + + + Check the right subtree. + Vérifiez le sous-arbre droit. + + + + Inserts an item in the Binary Search Tree. + Insère un élément dans l'arbre de recherche binaire. + + + + Finds the place to insert recursively using Pattern Matching, then inserts a new node. + Recherche l'emplacement de l'insertion récursive à l'aide de critères spéciaux, puis insère un nouveau nœud. + + + + If the item is already present, it does not insert anything. + Si l'élément est déjà présent, rien n'est inséré. + + + + No need to insert, it already exists; return the node. + Insertion inutile, car l'élément existe déjà ; retournez le nœud. + + + + Call into left subtree. + Appelez le sous-arbre gauche. + + + + Call into right subtree. + Appelez le sous-arbre droit. + + + + Discriminated Unions can also be represented as structs via the 'Struct' attribute. + Les unions discriminées peuvent également être représentées sous forme de structs au moyen de l'attribut 'Struct'. + + + + This is helpful in situations where the performance of structs outweighs + Cela peut s'avérer utile dans les situations où le niveau de performance des structs l'emporte + + + + the flexibility of reference types. + sur la flexibilité des types de référence. + + + + However, there are two important things to know when doing this: + Cependant, retenez les deux points suivants si vous procédez de la sorte : + + + + 1. A struct DU cannot be recursively-defined. + 1. Une union discriminée struct ne peut pas être définie de manière récursive. + + + + 2. A struct DU must have unique names for each of its cases. + 2. Une union discriminée struct doit avoir des noms uniques pour chacun de ses cas. + + + + Pattern Matching is a feature of F# that allows you to utilize Patterns, + Les critères spéciaux sont une fonctionnalité de F# qui vous permet d'utiliser des modèles + + + + which are a way to compare data with a logical structure or structures, + pour comparer des données avec une ou plusieurs structures logiques, + + + + decompose data into constituent parts, or extract information from data in various ways. + décomposer des données en parties constitutives ou extraire des informations à partir de données de plusieurs façons. + + + + You can then dispatch on the "shape" of a pattern via Pattern Matching. + Vous pouvez ensuite effectuer une répartition selon la "forme" d'un modèle à l'aide de critères spéciaux. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/pattern-matching + Pour en savoir plus, consultez : https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/pattern-matching + + + + A record for a person's first and last name + Enregistrement contenant le nom et le prénom d'une personne + + + + A Discriminated Union of 3 different kinds of employees + Union discriminée de 3 genres d'employés différents + + + + Count everyone underneath the employee in the management hierarchy, + Comptez tout le monde sous l'employé dans la hiérarchie de gestion + + + + including the employee. + (employé inclus). + + + + Find all managers/executives named "Dave" who do not have any reports. + Recherchez tous les responsables ou cadres dont le prénom est "Dave" et qui ne disposent d'aucun rapport. + + + + This uses the 'function' shorthand to as a lambda expression. + Le raccourci 'function' est utilisé comme expression lambda. + + + + [] matches an empty list. + [] correspond à une liste vide. + + + + '_' is a wildcard pattern that matches anything. + '_' est un modèle générique qui correspond à n'importe quel élément. + + + + This handles the "or else" case. + Ceci permet de gérer le cas "or else". + + + + You can also use the shorthand function construct for pattern matching, + Vous pouvez également utiliser la construction de fonction raccourcie pour les critères spéciaux, + + + + which is useful when you're writing functions which make use of Partial Application. + ce qui peut s'avérer utile quand vous écrivez des fonctions qui utilisent l'application partielle. + + + + Define some more functions which parse with the helper function. + Définissez d'autres fonctions d'analyse avec la fonction d'assistance. + + + + Active Patterns are another powerful construct to use with pattern matching. + Les modèles actifs sont une autre construction efficace à utiliser avec les critères spéciaux. + + + + They allow you to partition input data into custom forms, decomposing them at the pattern match call site. + Ils permettent de partitionner des données d'entrée dans des formulaires personnalisés, en les décomposant au niveau du site d'appel de correspondance au modèle. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/active-patterns + Pour en savoir plus, consultez : https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/active-patterns + + + + Pattern Matching via 'function' keyword and Active Patterns often looks like this. + Les critères spéciaux avec le mot clé 'function' et les modèles actifs ressemblent souvent à ceci. + + + + Call the printer with some different values to parse. + Appelez l'imprimante avec des valeurs différentes à analyser. + + + + Option values are any kind of value tagged with either 'Some' or 'None'. + Les valeurs d'option sont tout type de valeur marquée avec 'Some' ou 'None'. + + + + They are used extensively in F# code to represent the cases where many other + Elles sont très utilisées dans le code F# pour représenter les cas où de nombreux autres + + + + languages would use null references. + langages utilisent des références null. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/options + Pour en savoir plus, consultez : https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/options + + + + First, define a zipcode defined via Single-case Discriminated Union. + Commencez par définir un code postal au moyen d'une union discriminée à cas unique. + + + + Next, define a type where the ZipCode is optional. + Définissez ensuite un type où ZipCode est facultatif. + + + + Next, define an interface type that represents an object to compute the shipping zone for the customer's zip code, + Ensuite, définissez un type d'interface qui représente un objet pour calculer la zone d'expédition correspondant au code postal du client, + + + + given implementations for the 'getState' and 'getShippingZone' abstract methods. + en fonction des implémentations des méthodes abstraites 'getState' et 'getShippingZone'. + + + + Next, calculate a shipping zone for a customer using a calculator instance. + Ensuite, calculez une zone d'expédition pour un client à l'aide d'une instance de calculatrice. + + + + This uses combinators in the Option module to allow a functional pipeline for + Des combinateurs du module Option sont utilisés pour permettre à un pipeline fonctionnel de + + + + transforming data with Optionals. + transformer les données avec Optionals. + + + + Units of measure are a way to annotate primitive numeric types in a type-safe way. + Les unités de mesure sont un moyen d'annoter les types numériques primitifs de manière sécurisée pour les types. + + + + You can then perform type-safe arithmetic on these values. + Vous pouvez ensuite effectuer des opérations arithmétiques de type sécurisé sur ces valeurs. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/units-of-measure + Pour en savoir plus, consultez : https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/units-of-measure + + + + First, open a collection of common unit names + Pour commencer, ouvrez une collection de noms d'unité courants + + + + Define a unitized constant + Définissez une constante unifiée + + + + Next, define a new unit type + Ensuite, définissez un nouveau type d'unité + + + + Conversion factor mile to meter. + Facteur de conversion mile en mètre. + + + + Define a unitized constant + Définissez une constante unifiée + + + + Compute metric-system constant + Calculez la constante de système métrique + + + + Values using Units of Measure can be used just like the primitive numeric type for things like printing. + Les valeurs avec des unités de mesure s'utilisent de la même façon que le type numérique primitif dans des opérations comme l'impression. + + + + Classes are a way of defining new object types in F#, and support standard Object-oriented constructs. + Les classes sont un moyen de définir de nouveaux types d'objet en F#. Elles prennent en charge les constructions orientées objet standard. + + + + They can have a variety of members (methods, properties, events, etc.) + Elles peuvent avoir différents membres (méthodes, propriétés, événements, etc.) + + + + To learn more about Classes, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/classes + Pour en savoir plus sur les classes, consultez : https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/classes + + + + To learn more about Members, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/members + Pour en savoir plus sur les membres, consultez : https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/members + + + + A simple two-dimensional Vector class. + Classe Vector à deux dimensions simple. + + + + The class's constructor is on the first line, + Le constructeur de la classe est sur la première ligne + + + + and takes two arguments: dx and dy, both of type 'double'. + et accepte deux arguments : dx et dy (tous deux de type 'double'). + + + + This internal field stores the length of the vector, computed when the + Ce champ interne stocke la longueur du vecteur, calculée quand + + + + object is constructed + l'objet est construit + + + + 'this' specifies a name for the object's self identifier. + 'this' spécifie un nom pour l'auto-identificateur de l'objet. + + + + In instance methods, it must appear before the member name. + Dans les méthodes d'instance, il doit apparaître avant le nom du membre. + + + + This member is a method. The previous members were properties. + Ce membre est une méthode. Les membres précédents étaient des propriétés. + + + + This is how you instantiate the Vector2D class. + Voici comment instancier la classe Vector2D. + + + + Get a new scaled vector object, without modifying the original object. + Obtenez un nouvel objet vector mis à l'échelle, sans modifier l'objet d'origine. + + + + Generic classes allow types to be defined with respect to a set of type parameters. + Les classes génériques autorisent la définition des types par rapport à un jeu de paramètres de type. + + + + In the following, 'T is the type parameter for the class. + Dans ce qui suit, 'T est le paramètre de type pour la classe. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/generics/ + Pour en savoir plus, consultez : https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/generics/ + + + + This internal field store the states in a list. + Ce champ interne stocke les états dans une liste. + + + + Add a new element to the list of states. + Ajoutez un nouvel élément à la liste d'états. + + + + use the '<-' operator to mutate the value. + utilisez l'opérateur '<-' pour muter la valeur. + + + + Get the entire list of historical states. + Obtenez la liste complète des états historiques. + + + + Get the latest state. + Obtenez le dernier état. + + + + An 'int' instance of the state tracker class. Note that the type parameter is inferred. + Instance 'int' de la classe de suivi des états. Notez que le paramètre de type est déduit. + + + + Add a state + Ajouter un état + + + + Interfaces are object types with only 'abstract' members. + Les interfaces sont des types d'objet avec des membres 'abstract' uniquement. + + + + Object types and object expressions can implement interfaces. + Les types et expressions d'objet peuvent implémenter des interfaces. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/interfaces + Pour en savoir plus, consultez : https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/interfaces + + + + This is a type that implements IDisposable. + Type qui implémente IDisposable. + + + + This is the implementation of IDisposable members. + Implémentation de membres IDisposable. + + + + This is an object that implements IDisposable via an Object Expression + Objet qui implémente IDisposable à l'aide d'une expression d'objet + + + + Unlike other languages such as C# or Java, a new type definition is not needed + Contrairement à d'autres langages tels que C# ou Java, une nouvelle définition de type n'est pas nécessaire + + + + to implement an interface. + pour implémenter une interface. + + + + The FSharp.Core library defines a range of parallel processing functions. Here + La bibliothèque FSharp.Core définit une plage de fonctions de traitement parallèle. Ici + + + + you use some functions for parallel processing over arrays. + vous utilisez des fonctions pour le traitement parallèle des tableaux. + + + + To learn more, see: https://msdn.microsoft.com/en-us/visualfsharpdocs/conceptual/array.parallel-module-%5Bfsharp%5D + Pour en savoir plus, consultez : https://msdn.microsoft.com/en-us/visualfsharpdocs/conceptual/array.parallel-module-%5Bfsharp%5D + + + + First, an array of inputs. + Tout d'abord, un tableau d'entrées. + + + + Next, define a functions that does some CPU intensive computation. + Ensuite, définissez une fonction qui effectue un calcul nécessitant une utilisation intensive du processeur. + + + + Next, do a parallel map over a large input array. + Ensuite, effectuez un mappage parallèle sur un grand tableau d'entrée. + + + + Next, print the results. + Ensuite, imprimez les résultats. + + + + Events are a common idiom for .NET programming, especially with WinForms or WPF applications. + Les événements sont un idiome courant de la programmation .NET, en particulier avec les applications WinForms ou WPF. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/members/events + Pour en savoir plus, consultez : https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/members/events + + + + First, create instance of Event object that consists of subscription point (event.Publish) and event trigger (event.Trigger). + Pour commencer, créez une instance d'objet Event qui se compose d'un point d'abonnement (event.Publish) et d'un déclencheur d'événements (event.Trigger). + + + + Next, add handler to the event. + Ensuite, ajoutez un gestionnaire à l'événement. + + + + Next, trigger the event. + Ensuite, déclenchez l'événement. + + + + Next, create an instance of Event that follows standard .NET convention: (sender, EventArgs). + Ensuite, créez une instance d'événement qui respecte la convention .NET standard : (sender, EventArgs). + + + + Next, add a handler for this new event. + Ensuite, ajoutez un gestionnaire à ce nouvel événement. + + + + Next, trigger this event (note that sender argument should be set). + Ensuite, déclenchez cet événement (notez que l'argument sender doit être défini). + + + + + \ No newline at end of file diff --git a/vsintegration/ProjectTemplates/TutorialProject/Template/xlf/Tutorial.fsx.it.xlf b/vsintegration/ProjectTemplates/TutorialProject/Template/xlf/Tutorial.fsx.it.xlf new file mode 100644 index 00000000000..72ec6792d6c --- /dev/null +++ b/vsintegration/ProjectTemplates/TutorialProject/Template/xlf/Tutorial.fsx.it.xlf @@ -0,0 +1,1637 @@ + + + + + + This sample will guide you through elements of the F# language. + Questo esempio consente all'utente di familiarizzare con gli elementi del linguaggio F#. + + + + To execute the code in F# Interactive, highlight a section of code and press Alt-Enter or right-click + Per eseguire il codice in F# Interactive, evidenziare una sezione di codice e premere ALT-INVIO oppure fare clic con il pulsante destro del mouse + + + + and select "Execute in Interactive". You can open the F# Interactive Window from the "View" menu. + e selezionare "Esegui in Interactive". È possibile aprire la finestra di F# Interactive dal menu "Visualizza". + + + + For more about F#, see: + Per altre informazioni su F#, vedere: + + + + To see this tutorial in documentation form, see: + Per visualizzare questa esercitazione sotto forma di documentazione, vedere: + + + + To learn more about applied F# programming, use + Per altre informazioni sulla programmazione F# applicata, usare + + + + To install the Visual F# Power Tools, use + Per installare Visual F# Power Tools, usare + + + + 'Tools' --> 'Extensions and Updates' --> `Online` and search + 'Strumenti' --> 'Estensioni e aggiornamenti' --> `Online` e cercare + + + + For additional templates to use with F#, see the 'Online Templates' in Visual Studio, + Per altri modelli da usare con F#, vedere 'Modelli online' in Visual Studio, + + + + 'New Project' --> 'Online Templates' + 'Nuovo progetto' --> 'Modelli online' + + + + F# supports three kinds of comments: + In F# sono supportati tre tipi di commenti: + + + + 1. Double-slash comments. These are used in most situations. + 1. Commenti introdotti da una doppia barra. Vengono usati nella maggior parte delle situazioni. + + + + 2. ML-style Block comments. These aren't used that often. + 2. Commenti per il blocco in stile ML. Non vengono usati molto spesso. + + + + 3. Triple-slash comments. These are used for documenting functions, types, and so on. + 3. Commenti introdotti da una tripla barra. Vengono usati per la documentazione di funzioni, tipi e così via. + + + + They will appear as text when you hover over something which is decorated with these comments. + Verranno visualizzati come testo quando si passa con il puntatore su un elemento decorato con questi commenti. + + + + They also support .NET-style XML comments, which allow you to generate reference documentation, + Supportano anche commenti XML in stile .NET, che consentono di generare documentazione di riferimento. + + + + and they also allow editors (such as Visual Studio) to extract information from them. + Consentono anche agli editor, come Visual Studio, di estrarre informazioni. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/xml-documentation + Per altre informazioni, vedere: https://docs.microsoft.com/it-it/dotnet/articles/fsharp/language-reference/xml-documentation + + + + Open namespaces using the 'open' keyword. + Aprire gli spazi dei nomi con la parola chiave 'open'. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/import-declarations-the-open-keyword + Per altre informazioni, vedere: https://docs.microsoft.com/it-it/dotnet/articles/fsharp/language-reference/import-declarations-the-open-keyword + + + + A module is a grouping of F# code, such as values, types, and function values. + Un modulo è un raggruppamento di codice F#, ad esempio valori, tipi e valori di funzione. + + + + Grouping code in modules helps keep related code together and helps avoid name conflicts in your program. + Il raggruppamento del codice nei moduli consente di riunire il codice correlato e contribuisce a evitare conflitti di nome nel programma. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/modules + Per altre informazioni, vedere: https://docs.microsoft.com/it-it/dotnet/articles/fsharp/language-reference/modules + + + + This is a sample integer. + Questo è un valore integer di esempio. + + + + This is a sample floating point number. + Questo è un numero a virgola mobile di esempio. + + + + This computed a new number by some arithmetic. Numeric types are converted using + Questo ha calcolato un nuovo numero in base a una certa aritmetica. I tipi numerici vengono convertiti con + + + + functions 'int', 'double' and so on. + funzioni 'int', 'double' e così via. + + + + This is a list of the numbers from 0 to 99. + Questo è un elenco di numeri compresi tra 0 e 99. + + + + This is a list of all tuples containing all the numbers from 0 to 99 and their squares. + Questo è un elenco di tutte le tuple che contengono tutti i numeri compresi tra 0 e 99 e i relativi quadrati. + + + + The next line prints a list that includes tuples, using '%A' for generic printing. + La riga successiva stampa un elenco che include le tuple, usando '%A' per la stampa generica. + + + + This is a sample integer with a type annotation + Questo è un intero di esempio con un'annotazione di tipo + + + + Values in F# are immutable by default. They cannot be changed + Per impostazione predefinita, i valori in F# non sono modificabili e non è possibile cambiarli + + + + in the course of a program's execution unless explicitly marked as mutable. + durante l'esecuzione di un programma a meno che non siano contrassegnati esplicitamente come modificabili. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/values/index#why-immutable + Per altre informazioni, vedere: https://docs.microsoft.com/it-it/dotnet/articles/fsharp/language-reference/values/index#why-immutable + + + + Binding a value to a name via 'let' makes it immutable. + Il binding di un valore in un nome tramite 'let' lo rende non modificabile. + + + + The second line of code fails to compile because 'number' is immutable and bound. + La seconda riga di codice non viene compilata perché 'number' non è modificabile e ne è stato eseguito il binding. + + + + Re-defining 'number' to be a different value is not allowed in F#. + La ridefinizione di 'number' in un valore diverso non è consentita in F#. + + + + A mutable binding. This is required to be able to mutate the value of 'otherNumber'. + Binding modificabile. È necessario per poter modificare il valore di 'otherNumber'. + + + + When mutating a value, use '<-' to assign a new value. + Durante la modifica di un valore, usare '<-' per assegnare un nuovo valore. + + + + You could not use '=' here for this purpose since it is used for equality + Non è possibile usare '=' in questo punto per questa finalità perché viene usato per l'uguaglianza + + + + or other contexts such as 'let' or 'module' + o altri contesti come 'let' o 'module' + + + + Much of F# programming consists of defining functions that transform input data to produce + Buona parte della programmazione F# consiste nella definizione di funzioni che trasformano i dati di input per produrre + + + + useful results. + risultati utili. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/ + Per altre informazioni, vedere: https://docs.microsoft.com/it-it/dotnet/articles/fsharp/language-reference/functions/ + + + + You use 'let' to define a function. This one accepts an integer argument and returns an integer. + Usare 'let' per definire una funzione. Questa accetta un argomento Integer e restituisce un intero. + + + + Parentheses are optional for function arguments, except for when you use an explicit type annotation. + Le parentesi sono facoltative per gli argomenti di funzione, ad eccezione dei casi in cui si usa un'annotazione di tipo esplicita. + + + + Apply the function, naming the function return result using 'let'. + Applicare la funzione, denominando il risultato restituito della funzione tramite 'let'. + + + + The variable type is inferred from the function return type. + Il tipo variabile viene dedotto dal tipo restituito della funzione. + + + + This line uses '%d' to print the result as an integer. This is type-safe. + Questa riga usa '%d' per stampare il risultato in formato Integer. È indipendente dai tipi. + + + + If 'result1' were not of type 'int', then the line would fail to compile. + Se il tipo di 'result1' non fosse 'int', la riga non verrebbe compilata. + + + + When needed, annotate the type of a parameter name using '(argument:type)'. Parentheses are required. + Quando necessario, annotare il tipo di un nome di parametro usando '(argument:type)'. Le parentesi sono obbligatorie. + + + + Conditionals use if/then/elid/elif/else. + Nelle istruzioni condizionali si usano if/then/elid/elif/else. + + + + Note that F# uses whitespace indentation-aware syntax, similar to languages like Python. + Si noti che F# usa la sintassi con riconoscimento degli spazi vuoti di rientro, in modo analogo a linguaggi come Python. + + + + This line uses '%f' to print the result as a float. As with '%d' above, this is type-safe. + Questa riga usa '%f' per stampare il risultato in formato float. Come con '%d' in precedenza, è indipendente dai tipi. + + + + Booleans are fundamental data types in F#. Here are some examples of Booleans and conditional logic. + I valori booleani sono tipi di dati fondamentali in F#. Ecco alcuni esempi di valori booleani e logica condizionale. + + + + To learn more, see: + Per altre informazioni, vedere: + + + + and + e + + + + Booleans values are 'true' and 'false'. + I valori booleani sono 'true' e 'false'. + + + + Operators on booleans are 'not', '&&' and '||'. + Gli operatori su valori booleani sono 'not', '&&' e '||'. + + + + This line uses '%b'to print a boolean value. This is type-safe. + Questa riga usa '%b' per stampare un valore booleano. È indipendente dai tipi. + + + + Strings are fundamental data types in F#. Here are some examples of Strings and basic String manipulation. + Le stringhe sono tipi di dati fondamentali in F#. Ecco alcuni esempi di stringhe e di manipolazione di base delle stringhe. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/strings + Per altre informazioni, vedere: https://docs.microsoft.com/it-it/dotnet/articles/fsharp/language-reference/strings + + + + Strings use double quotes. + Per le stringhe si usano le virgolette doppie. + + + + Strings can also use @ to create a verbatim string literal. + Nelle stringhe si può anche usare @ per creare un valore letterale di stringa verbatim. + + + + This will ignore escape characters such as '\', '\n', '\t', etc. + In questo modo i caratteri di escape, come '\', '\n', '\t' e così via, verranno ignorati. + + + + String literals can also use triple-quotes. + Nei valori letterali si possono usare anche virgolette triple. + + + + String concatenation is normally done with the '+' operator. + Per la concatenazione di stringhe viene in genere usato l'operatore '+'. + + + + This line uses '%s' to print a string value. This is type-safe. + Questa riga usa '%s' per stampare un valore stringa. È indipendente dai tipi. + + + + Substrings use the indexer notation. This line extracts the first 7 characters as a substring. + Nelle sottostringhe si usa la notazione dell'indicizzatore. Questa riga estrae i primi sette caratteri come sottostringa. + + + + Note that like many languages, Strings are zero-indexed in F#. + Si noti che, analogamente a molti linguaggi, le stringhe presentano indice zero in F#. + + + + Tuples are simple combinations of data values into a combined value. + Le tuple sono semplici combinazioni di valori dati in un valore combinato. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/tuples + Per altre informazioni, vedere: https://docs.microsoft.com/it-it/dotnet/articles/fsharp/language-reference/tuples + + + + A simple tuple of integers. + Tupla di interi semplice. + + + + A function that swaps the order of two values in a tuple. + Funzione che scambia l'ordine di due valori in una tupla. + + + + F# Type Inference will automatically generalize the function to have a generic type, + L'inferenza del tipo di F# consentirà di generalizzare automaticamente la funzione in modo che il relativo tipo sia generico, + + + + meaning that it will work with any type. + per indicare che funzionerà con qualsiasi tipo. + + + + A tuple consisting of an integer, a string, + Tupla costituita da un intero, una stringa + + + + and a double-precision floating point number. + e un numero a virgola mobile a precisione doppia. + + + + A simple tuple of integers with a type annotation. + Tupla di interi semplice con annotazione di tipo. + + + + Type annotations for tuples use the * symbol to separate elements + Nelle annotazioni di tipo per le tuple si usa il simbolo * per separare gli elementi + + + + Tuples are normally objects, but they can also be represented as structs. + Le tuple sono in genere oggetti, ma possono essere rappresentate anche come struct. + + + + These interoperate completely with structs in C# and Visual Basic.NET; however, + Questi interagiscono completamente con gli struct in C# e Visual Basic.NET; tuttavia, + + + + struct tuples are not implicitly convertable with object tuples (often called reference tuples). + le tuple di struct non sono convertibili in modo implicito con tuple di oggetto (spesso chiamate tuple di riferimento). + + + + The second line below will fail to compile because of this. Uncomment it to see what happens. + A causa di questo problema la seconda riga sotto non verrà compilata. Rimuovere il commento per vedere cosa succede. + + + + Although you cannot implicitly convert between struct tuples and reference tuples, + Anche se non è possibile eseguire la conversione in modo implicito tra tuple della struttura e tuple di riferimento, + + + + you can explicitly convert via pattern matching, as demonstrated below. + è possibile eseguire la conversione in modo esplicito tramite i criteri di ricerca, come illustrato di seguito. + + + + The F# pipe operators ('|>', '<|', etc.) and F# composition operators ('>>', '<<') + Gli operatori pipe di F# ('|>', '<|' e così via) e gli operatori di composizione di F# ('>>', '<<') + + + + are used extensively when processing data. These operators are themselves functions + sono particolarmente usati durante l'elaborazione dati. Questi operatori sono di per sé funzioni + + + + which make use of Partial Application. + che usano l'applicazione parziale. + + + + To learn more about these operators, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/#function-composition-and-pipelining + Per altre informazioni su questi operatori, vedere: https://docs.microsoft.com/it-it/dotnet/articles/fsharp/language-reference/functions/#function-composition-and-pipelining + + + + To learn more about Partial Application, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/#partial-application-of-arguments + Per altre informazioni sull'applicazione parziale, vedere: https://docs.microsoft.com/it-it/dotnet/articles/fsharp/language-reference/functions/#partial-application-of-arguments + + + + Squares a value. + Calcola il quadrato di un valore. + + + + Adds 1 to a value. + Aggiunge 1 a un valore. + + + + Tests if an integer value is odd via modulo. + Testa se un valore intero è dispari tramite modulo. + + + + A list of 5 numbers. More on lists later. + Elenco di cinque numeri. Per altre informazioni sugli elenchi, vedere più avanti. + + + + Given a list of integers, it filters out the even numbers, + Dato un elenco di interi, filtra i numeri pari, + + + + squares the resulting odds, and adds 1 to the squared odds. + calcola i quadrati dei numeri dispari risultati e aggiunge 1 ai numeri dispari quadrati. + + + + A shorter way to write 'squareOddValuesAndAddOne' is to nest each + Uno dei modi più brevi per scrivere 'squareOddValuesAndAddOne' consiste nell'annidare ogni + + + + sub-result into the function calls themselves. + risultato secondario nelle chiamate di funzione stesse. + + + + This makes the function much shorter, but it's difficult to see the + In questo modo la funzione è molto più breve, ma risulta più difficile visualizzare + + + + order in which the data is processed. + l'ordine in cui vengono elaborati i dati. + + + + A preferred way to write 'squareOddValuesAndAddOne' is to use F# pipe operators. + Uno dei modi preferiti per scrivere 'squareOddValuesAndAddOne' consiste nell'usare gli operatori pipe di F#. + + + + This allows you to avoid creating intermediate results, but is much more readable + In tal modo sarà possibile evitare risultati intermedi, ma si migliora la leggibilità + + + + than nesting function calls like 'squareOddValuesAndAddOneNested' + rispetto all'annidamento di chiamate di funzione come 'squareOddValuesAndAddOneNested' + + + + You can shorten 'squareOddValuesAndAddOnePipeline' by moving the second `List.map` call + È possibile abbreviare 'squareOddValuesAndAddOnePipeline' spostando la seconda chiamata a `List.map` + + + + into the first, using a Lambda Function. + nella prima usando una funzione lambda. + + + + Note that pipelines are also being used inside the lambda function. F# pipe operators + Si noti che le pipeline vengono usate anche all'interno della funzione lambda. Gli operatori pipe di F# + + + + can be used for single values as well. This makes them very powerful for processing data. + possono essere usati anche per singoli valori, di conseguenza sono particolarmente efficaci per l'elaborazione dei dati. + + + + Lastly, you can eliminate the need to explicitly take 'values' in as a parameter by using '>>' + È infine possibile evitare di accettare in modo esplicito 'values' come parametro usando '>>' + + + + to compose the two core operations: filtering out even numbers, then squaring and adding one. + per comporre le due operazioni di base, ovvero filtrare i numeri pari, calcolare il quadrato e aggiungere 1. + + + + Likewise, the 'fun x -> ...' bit of the lambda expression is also not needed, because 'x' is simply + Analogamente, anche la parte 'fun x -> ...' dell'espressione lambda non è necessaria perché 'x' viene semplicemente + + + + being defined in that scope so that it can be passed to a functional pipeline. Thus, '>>' can be used + definito in tale ambito in modo che sia possibile passarlo a una pipeline funzionale. In questo punto è quindi possibile + + + + there as well. + usare anche '>>'. + + + + The result of 'squareOddValuesAndAddOneComposition' is itself another function which takes a + Il risultato di 'squareOddValuesAndAddOneComposition' è di per sé un'altra funzione che accetta come input un + + + + list of integers as its input. If you execute 'squareOddValuesAndAddOneComposition' with a list + elenco di interi. Se si esegue 'squareOddValuesAndAddOneComposition' con un elenco + + + + of integers, you'll notice that it produces the same results as previous functions. + di interi, si noterà che consente di ottenere gli stessi risultati delle funzioni precedenti. + + + + This is using what is known as function composition. This is possible because functions in F# + Usa la cosiddetta composizione di funzione. Tale operazione è possibile perché in F# le funzioni + + + + use Partial Application and the input and output types of each data processing operation match + usano l'applicazione parziale e i tipi di input e output di ogni operazione di elaborazione dati corrispondono + + + + the signatures of the functions we're using. + alle firme delle funzioni usate. + + + + Lists are ordered, immutable, singly-linked lists. They are eager in their evaluation. + Gli elenchi sono elenchi a un solo collegamento ordinati e non modificabili la cui valutazione è di tipo eager. + + + + This module shows various ways to generate lists and process lists with some functions + Questo modulo mostra diversi modi per generare elenchi ed elenchi i processi con alcune funzioni + + + + in the 'List' module in the F# Core Library. + nel modulo 'List' della libreria di base di F#. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/lists + Per altre informazioni, vedere: https://docs.microsoft.com/it-it/dotnet/articles/fsharp/language-reference/lists + + + + Lists are defined using [ ... ]. This is an empty list. + Per definire gli elenchi si usa [ ... ]. Questo è un elenco vuoto. + + + + This is a list with 3 elements. ';' is used to separate elements on the same line. + Questo è un elenco con tre elementi. Per delimitare gli elementi sulla stessa riga, viene usato il punto e virgola (';'). + + + + You can also separate elements by placing them on their own lines. + È anche possibile delimitare gli elementi posizionandoli su righe distinte. + + + + This is a list of integers from 1 to 1000 + Questo è un elenco di numeri interi tra 1 e 1000 + + + + Lists can also be generated by computations. This is a list containing + Gli elenchi possono anche essere generati da calcoli. Questo è un elenco contenente + + + + all the days of the year. + tutti i giorni dell'anno. + + + + Print the first 5 elements of 'daysList' using 'List.take'. + Stampa i primi cinque elementi di 'daysList' usando 'List.take'. + + + + Computations can include conditionals. This is a list containing the tuples + I calcoli possono contenere istruzioni condizionali. Questo è un elenco contenente le tuple + + + + which are the coordinates of the black squares on a chess board. + che rappresentano le coordinate dei quadrati neri su una scacchiera. + + + + Lists can be transformed using 'List.map' and other functional programming combinators. + Per trasformare gli elenchi, è possibile usare 'List.map' e altri combinatori di programmazione funzionale. + + + + This definition produces a new list by squaring the numbers in numberList, using the pipeline + Questa definizione consente di produrre un nuovo elenco mediante la quadratura dei numeri in numberList, usando l'operatore pipeline + + + + operator to pass an argument to List.map. + per passare un argomento a List.map. + + + + There are many other list combinations. The following computes the sum of the squares of the + Esistono molte altre combinazioni di elenco. L'istruzione seguente calcola la somma dei quadrati dei + + + + numbers divisible by 3. + numeri divisibili per 3. + + + + Arrays are fixed-size, mutable collections of elements of the same type. + Le matrici sono raccolte modificabili di dimensioni fisse di elementi dello stesso tipo. + + + + Although they are similar to Lists (they support enumeration and have similar combinators for data processing), + Anche se sono simili agli elenchi (supportano l'enumerazione e contengono combinatori simili per l'elaborazione dati), + + + + they are generally faster and support fast random access. This comes at the cost of being less safe by being mutable. + sono in genere più veloci e supportano l'accesso casuale rapido. La maggiore velocità implica però una minore sicurezza perché questi elementi sono modificabili. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/arrays + Per altre informazioni, vedere: https://docs.microsoft.com/it-it/dotnet/articles/fsharp/language-reference/arrays + + + + This is The empty array. Note that the syntax is similar to that of Lists, but uses `[| ... |]` instead. + Questa è la matrice vuota. Si noti che la sintassi è simile a quella degli elenchi, ma viene usato `[| ... |]`. + + + + Arrays are specified using the same range of constructs as lists. + Per specificare le matrici viene usato lo stesso intervallo di costrutti degli elenchi. + + + + This is an array of numbers from 1 to 1000. + Questo è una matrice di numeri compresi tra 1 e 1000. + + + + This is an array containing only the words "hello" and "world". + Questa è una matrice contenente solo le parole "hello" e "world". + + + + This is an array initialized by index and containing the even numbers from 0 to 2000. + Questa è una matrice inizializzata dall'indice e contenente i numeri pari compresi tra 0 e 2000. + + + + Sub-arrays are extracted using slicing notation. + Le sottomatrici vengono estratte mediante una notazione di sezionamento. + + + + You can loop over arrays and lists using 'for' loops. + Per eseguire il ciclo su matrici ed elenchi, si possono usare i cicli 'for'. + + + + You can modify the contents of an an array element by using the left arrow assignment operator. + È possibile modificare il contenuto di un elemento di matrice usando l'operatore di assegnazione freccia sinistra. + + + + To learn more about this operator, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/values/index#mutable-variables + Per altre informazioni su questo operatore, vedere: https://docs.microsoft.com/it-it/dotnet/articles/fsharp/language-reference/values/index#mutable-variables + + + + You can transform arrays using 'Array.map' and other functional programming operations. + Per trasformare le matrici, è possibile usare 'Array.map' e altre operazioni di programmazione funzionale. + + + + The following calculates the sum of the lengths of the words that start with 'h'. + Il codice seguente consente di calcolare la somma delle lunghezze delle parole che iniziano con 'h'. + + + + Sequences are a logical series of elements, all of the same type. These are a more general type than Lists and Arrays. + Le sequenze sono costituite da una serie logica di elementi, tutti dello stesso tipo. Sono di un tipo più generale rispetto ad elenchi e matrici. + + + + Sequences are evaluated on-demand and are re-evaluated each time they are iterated. + Le sequenze vengono valutate su richiesta e rivalutate ogni volta che vengono iterate. + + + + An F# sequence is an alias for a .NET System.Collections.Generic.IEnumerable<'T>. + Una sequenza F# è un alias dell'elemento System.Collections.Generic.IEnumerable<'T> di .NET. + + + + Sequence processing functions can be applied to Lists and Arrays as well. + Le funzioni di elaborazione della sequenza possono essere applicate anche a elenchi e matrici. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/sequences + Per altre informazioni, vedere: https://docs.microsoft.com/it-it/dotnet/articles/fsharp/language-reference/sequences + + + + This is the empty sequence. + Questa è la sequenza vuota. + + + + This a sequence of values. + Questa è una sequenza di valori. + + + + This is an on-demand sequence from 1 to 1000. + Questa è una sequenza su richiesta compresa tra 1 e 1000. + + + + This is a sequence producing the words "hello" and "world" + Questa è una sequenza che produce le parole "hello" e "world" + + + + This sequence producing the even numbers up to 2000. + Questa è la sequenza che produce i numeri pari fino a 2000. + + + + This is an infinite sequence which is a random walk. + Questa è una sequenza infinita, ovvero un percorso casuale. + + + + This example uses yield! to return each element of a subsequence. + In questo esempio si usa yield! per restituire ogni elemento di una sottosequenza. + + + + This example shows the first 100 elements of the random walk. + Questo esempio mostra i primi 100 elementi del percorso casuale. + + + + Recursive functions can call themselves. In F#, functions are only recursive + Le funzioni ricorsive possono chiamarsi da sole. In F# le funzioni sono ricorsive solo + + + + when declared using 'let rec'. + quando per la dichiarazione si usa 'let rec'. + + + + Recursion is the preferred way to process sequences or collections in F#. + La ricorsione è il modo preferito per elaborare sequenze o raccolte in F#. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/index#recursive-functions + Per altre informazioni, vedere: https://docs.microsoft.com/it-it/dotnet/articles/fsharp/language-reference/functions/index#recursive-functions + + + + This example shows a recursive function that computes the factorial of an + Questo esempio mostra una funzione ricorsiva che calcola il fattoriale di un + + + + integer. It uses 'let rec' to define a recursive function. + numero intero. Usa 'let rec' per definire una funzione ricorsiva. + + + + Computes the greatest common factor of two integers. + Calcola il fattore comune maggiore di due interi. + + + + Since all of the recursive calls are tail calls, + Dal momento che tutte le chiamate ricorsive sono chiamate tail, + + + + the compiler will turn the function into a loop, + il compilatore convertirà la funzione in un ciclo, + + + + which improves performance and reduces memory consumption. + in modo da migliorare le prestazioni e ridurre il consumo di memoria. + + + + This example computes the sum of a list of integers using recursion. + Questo esempio consente di calcolare la somma di un elenco di interi usando la ricorsione. + + + + This makes 'sumList' tail recursive, using a helper function with a result accumulator. + In questo modo la funzione tail 'sumList' viene resa ricorsiva, usando una funzione helper con un accumulatore di risultati. + + + + This invokes the tail recursive helper function, providing '0' as a seed accumulator. + Viene chiamata la funzione helper tail ricorsiva, fornendo '0' come accumulatore di seeding. + + + + An approach like this is common in F#. + Un approccio di questo tipo è comune in F#. + + + + Records are an aggregate of named values, with optional members (such as methods). + I record sono un aggregato di valori denominati, con membri facoltativi, ad esempio metodi. + + + + They are immutable and have structural equality semantics. + Non sono modificabili e includono la semantica di uguaglianza strutturale. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/records + Per altre informazioni, vedere: https://docs.microsoft.com/it-it/dotnet/articles/fsharp/language-reference/records + + + + This example shows how to define a new record type. + Questo esempio mostra come definire un nuovo tipo di record. + + + + This example shows how to instantiate a record type. + Questo esempio mostra come creare un'istanza di un tipo di record. + + + + You can also do this on the same line with ';' separators. + È possibile eseguire questa operazione sulla stessa riga usando i separatori ';'. + + + + This example shows how to use "copy-and-update" on record values. It creates + Questo esempio mostra come usare il metodo di copia e aggiornamento su valori di record. Crea + + + + a new record value that is a copy of contact1, but has different values for + un nuovo valore di record che è una copia di contact1, ma contiene valori diversi per + + + + the 'Phone' and 'Verified' fields. + i campi 'Phone' e 'Verified'. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/copy-and-update-record-expressions + Per altre informazioni, vedere: https://docs.microsoft.com/it-it/dotnet/articles/fsharp/language-reference/copy-and-update-record-expressions + + + + This example shows how to write a function that processes a record value. + Questo esempio mostra come scrivere una funzione che elabora un valore di record. + + + + It converts a 'ContactCard' object to a string. + Converte un oggetto 'ContactCard' in una stringa. + + + + This is an example of a Record with a member. + Questo è un esempio di record con un membro. + + + + Members can implement object-oriented members. + I membri possono implementare membri orientati a oggetti. + + + + Members are accessed via the '.' operator on an instantiated type. + In un tipo di cui è stata creata un'istanza l'accesso ai membri avviene tramite l'operatore '.'. + + + + Records can also be represented as structs via the 'Struct' attribute. + I record possono essere rappresentati anche come struct tramite l'attributo 'Struct'. + + + + This is helpful in situations where the performance of structs outweighs + Questo comportamento è utile in situazioni in cui la prestazioni degli struct sono prioritarie rispetto alla + + + + the flexibility of reference types. + flessibilità dei tipi di riferimento. + + + + Discriminated Unions (DU for short) are values which could be a number of named forms or cases. + Le unioni discriminate sono valori che potrebbero corrispondere a un certo numero di case o form denominati. + + + + Data stored in DUs can be one of several distinct values. + I dati archiviati nelle unioni discriminate possono essere uno di diversi valori distinti. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/discriminated-unions + Per altre informazioni, vedere: https://docs.microsoft.com/it-it/dotnet/articles/fsharp/language-reference/discriminated-unions + + + + The following represents the suit of a playing card. + L'istruzione seguente rappresenta il seme di una carta da gioco. + + + + A Disciminated Union can also be used to represent the rank of a playing card. + È possibile usare un'unione discriminata anche per rappresentare il valore di una carta da gioco. + + + + Represents the rank of cards 2 .. 10 + Rappresenta il valore delle carte da 2 a 10 + + + + Discriminated Unions can also implement object-oriented members. + Le unioni discriminate possono inoltre implementare membri orientati a oggetti. + + + + This is a record type that combines a Suit and a Rank. + Questo è un tipo di record che combina un seme e un valore. + + + + It's common to use both Records and Disciminated Unions when representing data. + Per la rappresentazione dei dati si usano in genere record e unioni discriminate. + + + + This computes a list representing all the cards in the deck. + Calcola un elenco che rappresenta tutte le carte del mazzo. + + + + This example converts a 'Card' object to a string. + Questo esempio consente di convertire un oggetto 'Card' in una stringa. + + + + This example prints all the cards in a playing deck. + Questo esempio consente di stampare tutte le carte di un mazzo. + + + + Single-case DUs are often used for domain modeling. This can buy you extra type safety + Le unioni discriminate a case singolo vengono spesso usate per la modellazione dei domini. In questo modo è possibile garantire una maggiore sicurezza dei tipi + + + + over primitive types such as strings and ints. + rispetto a tipi primitivi come stringhe e valori int. + + + + Single-case DUs cannot be implicitly converted to or from the type they wrap. + Le unioni discriminate a case singolo non possono essere convertite in modo implicito nel o dal tipo di cui eseguono il wrapping. + + + + For example, a function which takes in an Address cannot accept a string as that input, + Ad esempio, una funzione che accetta un indirizzo non può accettare come input una stringa, + + + + or vive/versa. + o viceversa. + + + + You can easily instantiate a single-case DU as follows. + È possibile creare facilmente un'istanza di una unione discriminata a case singolo come descritto di seguito. + + + + When you need the value, you can unwrap the underlying value with a simple function. + Quando è necessario il valore, è possibile annullare il wrapping del valore sottostante con una funzione semplice. + + + + Printing single-case DUs is simple with unwrapping functions. + Le funzioni di unwrapping semplificano la stampa di unioni discriminate a case singolo. + + + + Disciminated Unions also support recursive definitions. + Le unioni discriminate supportano anche definizioni ricorsive. + + + + This represents a Binary Search Tree, with one case being the Empty tree, + Rappresenta un albero di ricerca binaria, in cui un caso è l'albero vuoto, + + + + and the other being a Node with a value and two subtrees. + e l'altro è un nodo con un valore e due sottoalberi. + + + + Check if an item exists in the binary search tree. + Verifica l'esistenza di un elemento nell'albero della ricerca binaria. + + + + Searches recursively using Pattern Matching. Returns true if it exists; otherwise, false. + Esegue la ricerca in modo ricorsivo usando i criteri di ricerca. Restituisce true se esiste; in caso contrario, false. + + + + Check the left subtree. + Verifica il sottoalbero di sinistra. + + + + Check the right subtree. + Verifica il sottoalbero di destra. + + + + Inserts an item in the Binary Search Tree. + Inserisce un elemento nell'albero della ricerca binaria. + + + + Finds the place to insert recursively using Pattern Matching, then inserts a new node. + Trova la posizione da inserire in modo ricorsivo con i criteri di ricerca, quindi inserisce un nuovo nodo. + + + + If the item is already present, it does not insert anything. + Se l'elemento è già presente, non inserisce nulla. + + + + No need to insert, it already exists; return the node. + Non è necessario inserirla perché esiste già; restituisce il nodo. + + + + Call into left subtree. + Chiamata nel sottoalbero di sinistra. + + + + Call into right subtree. + Chiamata nel sottoalbero di destra. + + + + Discriminated Unions can also be represented as structs via the 'Struct' attribute. + Le unioni discriminate possono essere rappresentate anche come struct tramite l'attributo 'Struct'. + + + + This is helpful in situations where the performance of structs outweighs + Questo comportamento è utile in situazioni in cui la prestazioni degli struct sono prioritarie rispetto alla + + + + the flexibility of reference types. + flessibilità dei tipi di riferimento. + + + + However, there are two important things to know when doing this: + Quando si esegue questa operazione, è però importante conoscere due aspetti: + + + + 1. A struct DU cannot be recursively-defined. + 1. Un'unione discriminata di struct non può essere definita in modo ricorsivo. + + + + 2. A struct DU must have unique names for each of its cases. + 2. A ogni case di un'unione discriminata di struct deve essere assegnato un nome univoco. + + + + Pattern Matching is a feature of F# that allows you to utilize Patterns, + I criteri di ricerca sono una funzionalità di F# che consente di utilizzare i criteri, + + + + which are a way to compare data with a logical structure or structures, + che consentono di confrontare i dati con una o più strutture logiche, + + + + decompose data into constituent parts, or extract information from data in various ways. + scomporre i dati nelle parti costituenti o estrarre le informazioni dai dati in diversi modi. + + + + You can then dispatch on the "shape" of a pattern via Pattern Matching. + È quindi possibile intervenire sulla "forma" di un criterio tramite i criteri di ricerca. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/pattern-matching + Per altre informazioni, vedere: https://docs.microsoft.com/it-it/dotnet/articles/fsharp/language-reference/pattern-matching + + + + A record for a person's first and last name + Record per il nome e il cognome di una persona + + + + A Discriminated Union of 3 different kinds of employees + Unione discriminata di tre diversi tipi di dipendenti + + + + Count everyone underneath the employee in the management hierarchy, + Conta chiunque sotto il dipendente nella gerarchia di gestione, + + + + including the employee. + includendo il dipendente. + + + + Find all managers/executives named "Dave" who do not have any reports. + Trova tutti i manager/dirigenti il cui nome è "Dave" e per i quali non sono disponibili report. + + + + This uses the 'function' shorthand to as a lambda expression. + Usa la sintassi abbreviata di 'function' come espressione lambda. + + + + [] matches an empty list. + [] corrisponde a un elenco vuoto. + + + + '_' is a wildcard pattern that matches anything. + '_' è un carattere jolly che corrisponde a qualsiasi stringa. + + + + This handles the "or else" case. + Gestisce il caso "or else". + + + + You can also use the shorthand function construct for pattern matching, + Per i criteri di ricerca è anche possibile usare il costrutto di funzione a sintassi abbreviata, + + + + which is useful when you're writing functions which make use of Partial Application. + che risulta utile quando si scrivono funzioni che usano l'applicazione parziale. + + + + Define some more functions which parse with the helper function. + Consente di definire alcune altre funzioni che vengono analizzate con la funzione helper. + + + + Active Patterns are another powerful construct to use with pattern matching. + I criteri attivi sono un altro costrutto efficace da usare con i criteri di ricerca. + + + + They allow you to partition input data into custom forms, decomposing them at the pattern match call site. + Consentono di partizionare i dati di input in form personalizzati, scomponendoli a livello del sito di chiamata dei criteri di ricerca. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/active-patterns + Per altre informazioni, vedere: https://docs.microsoft.com/it-it/dotnet/articles/fsharp/language-reference/active-patterns + + + + Pattern Matching via 'function' keyword and Active Patterns often looks like this. + I criteri di ricerca con parola chiave 'function' e criteri attivi sono spesso simili a questi. + + + + Call the printer with some different values to parse. + Chiama la stampante con alcuni valori diversi da analizzare. + + + + Option values are any kind of value tagged with either 'Some' or 'None'. + Il valore dell'opzione è qualsiasi valore con tag 'Some' o 'None'. + + + + They are used extensively in F# code to represent the cases where many other + Questi valori sono ampiamente usati nel codice F# per rappresentare i casi in cui molti altri + + + + languages would use null references. + linguaggi userebbero riferimenti Null. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/options + Per altre informazioni, vedere: https://docs.microsoft.com/it-it/dotnet/articles/fsharp/language-reference/options + + + + First, define a zipcode defined via Single-case Discriminated Union. + Consente innanzitutto di definire un codice postale definito tramite l'unione discriminata a case singolo. + + + + Next, define a type where the ZipCode is optional. + Definire quindi un tipo in cui l'elemento ZipCode è facoltativo. + + + + Next, define an interface type that represents an object to compute the shipping zone for the customer's zip code, + Definire quindi un tipo di interfaccia che rappresenta un oggetto per calcolare l'area di spedizione per il codice postale del cliente, + + + + given implementations for the 'getState' and 'getShippingZone' abstract methods. + date le implementazioni per i metodi astratti 'getState' e 'getShippingZone'. + + + + Next, calculate a shipping zone for a customer using a calculator instance. + Calcolare quindi un'area di spedizione per un cliente usando un'istanza della calcolatrice. + + + + This uses combinators in the Option module to allow a functional pipeline for + Usa i combinatori del modulo Option per consentire una pipeline funzionale per + + + + transforming data with Optionals. + la trasformazione di dati con Optionals. + + + + Units of measure are a way to annotate primitive numeric types in a type-safe way. + Le unità di misura consentono di annotare tipi numerici primitivi in modo indipendente dai tipi. + + + + You can then perform type-safe arithmetic on these values. + È quindi possibile eseguire operazioni aritmetiche indipendenti dai tipi su questi valori. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/units-of-measure + Per altre informazioni, vedere: https://docs.microsoft.com/it-it/dotnet/articles/fsharp/language-reference/units-of-measure + + + + First, open a collection of common unit names + Aprire innanzitutto una raccolta di nomi di unità comuni + + + + Define a unitized constant + Definire una costante unificata + + + + Next, define a new unit type + Definire quindi un nuovo tipo di unità + + + + Conversion factor mile to meter. + Fattore di conversione da miglia a metri. + + + + Define a unitized constant + Definire una costante unificata + + + + Compute metric-system constant + Calcola la costate del sistema metrico + + + + Values using Units of Measure can be used just like the primitive numeric type for things like printing. + I valori che usano unità di misura possono essere usati come il tipo numerico primitivo per elementi come la stampa. + + + + Classes are a way of defining new object types in F#, and support standard Object-oriented constructs. + Le classi sono un modo per definire nuovi tipi di oggetto in F# e supportano costrutti standard orientati a oggetti. + + + + They can have a variety of members (methods, properties, events, etc.) + Possono includere numerosi membri (metodi, proprietà, eventi e così via) + + + + To learn more about Classes, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/classes + Per altre informazioni sulle classi, vedere: https://docs.microsoft.com/it-it/dotnet/articles/fsharp/language-reference/classes + + + + To learn more about Members, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/members + Per altre informazioni sui membri, vedere: https://docs.microsoft.com/it-it/dotnet/articles/fsharp/language-reference/members + + + + A simple two-dimensional Vector class. + Semplice classe di vettore bidimensionale. + + + + The class's constructor is on the first line, + Il costruttore della classe si trova sulla prima riga + + + + and takes two arguments: dx and dy, both of type 'double'. + e accetta due argomenti, dx e dy, entrambi di tipo 'double'. + + + + This internal field stores the length of the vector, computed when the + In questo campo interno è archiviata la lunghezza del vettore, calcolata durante + + + + object is constructed + la costruzione dell'oggetto + + + + 'this' specifies a name for the object's self identifier. + 'this' specifica un nome per l'autoidentificatore dell'oggetto. + + + + In instance methods, it must appear before the member name. + Nei metodi di istanza, deve trovarsi prima del nome del membro. + + + + This member is a method. The previous members were properties. + Questo membro è un metodo. I membri precedenti erano proprietà. + + + + This is how you instantiate the Vector2D class. + In questo modo viene creata un'istanza della classe Vector2D. + + + + Get a new scaled vector object, without modifying the original object. + Consente di ottenere un nuovo oggetto vettore scalato senza modificare l'oggetto originale. + + + + Generic classes allow types to be defined with respect to a set of type parameters. + Le classi generiche consentono di definire tipi rispetto a un set di parametri di tipo. + + + + In the following, 'T is the type parameter for the class. + Nel codice seguente 'T è il parametro di tipo per la classe. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/generics/ + Per altre informazioni, vedere: https://docs.microsoft.com/it-it/dotnet/articles/fsharp/language-reference/generics/ + + + + This internal field store the states in a list. + Questo campo interno archivia gli stati in un elenco. + + + + Add a new element to the list of states. + Aggiunge un nuovo elemento all'elenco degli stati. + + + + use the '<-' operator to mutate the value. + usare l'operatore '<-' per modificare il valore. + + + + Get the entire list of historical states. + Consente di ottenere l'intero elenco degli stati cronologici. + + + + Get the latest state. + Consente di ottenere l'ultimo stato. + + + + An 'int' instance of the state tracker class. Note that the type parameter is inferred. + Istanza 'int' della classe di rilevamento stato. Si noti che il parametro di tipo è dedotto. + + + + Add a state + Viene aggiunto uno stato + + + + Interfaces are object types with only 'abstract' members. + Le interfacce sono tipi di oggetto contenenti solo membri 'abstract'. + + + + Object types and object expressions can implement interfaces. + I tipi di oggetto e le espressioni di oggetto possono implementare interfacce. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/interfaces + Per altre informazioni, vedere: https://docs.microsoft.com/it-it/dotnet/articles/fsharp/language-reference/interfaces + + + + This is a type that implements IDisposable. + Questo è un tipo che implementa IDisposable. + + + + This is the implementation of IDisposable members. + Questa è l'implementazione dei membri di IDisposable. + + + + This is an object that implements IDisposable via an Object Expression + Questo è un oggetto che implementa IDisposable tramite un'espressione di oggetto + + + + Unlike other languages such as C# or Java, a new type definition is not needed + Diversamente da altri linguaggi, come C# o Java, non è necessaria una nuova definizione di tipo + + + + to implement an interface. + per implementare un'interfaccia. + + + + The FSharp.Core library defines a range of parallel processing functions. Here + La libreria FSharp.Core definisce un intervallo di funzioni di elaborazione parallela. In questo caso + + + + you use some functions for parallel processing over arrays. + si usano alcune funzioni per l'elaborazione parallela sulle matrici. + + + + To learn more, see: https://msdn.microsoft.com/en-us/visualfsharpdocs/conceptual/array.parallel-module-%5Bfsharp%5D + Per altre informazioni, vedere: https://msdn.microsoft.com/it-it/visualfsharpdocs/conceptual/array.parallel-module-%5Bfsharp%5D + + + + First, an array of inputs. + Definire innanzitutto una matrice di input. + + + + Next, define a functions that does some CPU intensive computation. + Definire quindi una funzione che esegue alcuni calcoli intensivi della CPU. + + + + Next, do a parallel map over a large input array. + Eseguire quindi un mapping parallelo su una matrice di input di grandi dimensioni. + + + + Next, print the results. + Stampare quindi i risultati. + + + + Events are a common idiom for .NET programming, especially with WinForms or WPF applications. + Gli eventi sono un termine comune per la programmazione .NET, in particolare con le applicazioni Windows Form o WPF. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/members/events + Per altre informazioni, vedere: https://docs.microsoft.com/it-it/dotnet/articles/fsharp/language-reference/members/events + + + + First, create instance of Event object that consists of subscription point (event.Publish) and event trigger (event.Trigger). + Creare innanzitutto un'istanza dell'oggetto Event costituito dal punto di sottoscrizione (event.Publish) e dal trigger di evento (event.Trigger). + + + + Next, add handler to the event. + Aggiungere quindi il gestore all'evento. + + + + Next, trigger the event. + Attivare quindi l'evento. + + + + Next, create an instance of Event that follows standard .NET convention: (sender, EventArgs). + Creare quindi un'istanza dell'oggetto Event che segue la convenzione .NET standard: (sender, EventArgs). + + + + Next, add a handler for this new event. + Aggiungere quindi un gestore per questo nuovo evento. + + + + Next, trigger this event (note that sender argument should be set). + Attivare quindi questo evento (si noti che è necessario impostare l'argomento sender). + + + + + \ No newline at end of file diff --git a/vsintegration/ProjectTemplates/TutorialProject/Template/xlf/Tutorial.fsx.ja.xlf b/vsintegration/ProjectTemplates/TutorialProject/Template/xlf/Tutorial.fsx.ja.xlf new file mode 100644 index 00000000000..2528a68e893 --- /dev/null +++ b/vsintegration/ProjectTemplates/TutorialProject/Template/xlf/Tutorial.fsx.ja.xlf @@ -0,0 +1,1637 @@ + + + + + + This sample will guide you through elements of the F# language. + このサンプルは、F# 言語の要素を紹介します。 + + + + To execute the code in F# Interactive, highlight a section of code and press Alt-Enter or right-click + F# インタラクティブでコードを実行するには、コードの一部を強調表示して、Alt キーを押しながら Enter キーを押すか、右マウス ボタンをクリックし + + + + and select "Execute in Interactive". You can open the F# Interactive Window from the "View" menu. + [対話形式で実行]5D; を選択します。[表示]5D; メニューから F# インタラクティブ ウィンドウを開くことができます。 + + + + For more about F#, see: + F# の詳細については、次のページを参照してください: + + + + To see this tutorial in documentation form, see: + このチュートリアルをドキュメント形式で表示するには、次を参照してください: + + + + To learn more about applied F# programming, use + 適用された F# プログラミングの詳細については、次を使用します + + + + To install the Visual F# Power Tools, use + Visual F# Power Tools をインストールするには、次を使用します + + + + 'Tools' --> 'Extensions and Updates' --> `Online` and search + [ツール]5D; --> [拡張機能と更新プログラム]5D; --> [オンライン]5D; と検索 + + + + For additional templates to use with F#, see the 'Online Templates' in Visual Studio, + F# で使用するその他のテンプレートについては、Visual Studio の 'オンライン テンプレート' を参照してください。 + + + + 'New Project' --> 'Online Templates' + ([新しいプロジェクト]5D; --> [オンライン テンプレート]5D;) を参照してください。 + + + + F# supports three kinds of comments: + F# は、3 種類のコメントをサポートしています: + + + + 1. Double-slash comments. These are used in most situations. + 1. ダブルスラッシュ コメント。これはほとんどの場合に使用されます。 + + + + 2. ML-style Block comments. These aren't used that often. + 2. ML スタイル ブロック コメント。これはそれほど頻繁には使用されません。 + + + + 3. Triple-slash comments. These are used for documenting functions, types, and so on. + 3. トリプル スラッシュ コメント。これは、関数や型などの文書化に使用されます。 + + + + They will appear as text when you hover over something which is decorated with these comments. + このコメントで修飾されているものをポイントすると、これがテキストとして表示されます。 + + + + They also support .NET-style XML comments, which allow you to generate reference documentation, + これは .NET スタイルの XML コメントもサポートしています。このコメントを使用すると、リファレンス ドキュメントを生成できます。 + + + + and they also allow editors (such as Visual Studio) to extract information from them. + また、(Visual Studio などの) エディターでそこから情報を抽出することもできます。 + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/xml-documentation + 詳細については、次を参照してください: https://docs.microsoft.com/ja-jp/dotnet/articles/fsharp/language-reference/xml-documentation + + + + Open namespaces using the 'open' keyword. + 'open' キーワードを使用して名前空間を開きます。 + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/import-declarations-the-open-keyword + 詳細については、次を参照してください: https://docs.microsoft.com/ja-jp/dotnet/articles/fsharp/language-reference/import-declarations-the-open-keyword + + + + A module is a grouping of F# code, such as values, types, and function values. + モジュールは、値、型、関数値などの、F# コードのグループ化です。 + + + + Grouping code in modules helps keep related code together and helps avoid name conflicts in your program. + コードをモジュールにグループ化することで、関連コードを 1 つにまとめて、プログラムでの名前の競合を回避することができます。 + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/modules + 詳細については、次を参照してください: https://docs.microsoft.com/ja-jp/dotnet/articles/fsharp/language-reference/modules + + + + This is a sample integer. + これは、サンプルの整数値です。 + + + + This is a sample floating point number. + これは、サンプルの浮動小数点数です。 + + + + This computed a new number by some arithmetic. Numeric types are converted using + これは、演算によって新しい数値を計算したものです。数値型は、関数 'int'、'double' などを使用して変換されます。 + + + + functions 'int', 'double' and so on. + 関数の 'int'、'double' などです。 + + + + This is a list of the numbers from 0 to 99. + これは 0 ~ 99 の数値のリストです。 + + + + This is a list of all tuples containing all the numbers from 0 to 99 and their squares. + これは、0 ~ 99 のすべての数値とその二乗を含むすべてのタプルのリストです。 + + + + The next line prints a list that includes tuples, using '%A' for generic printing. + 次の行は、タプルを含むリストを出力します。一般的な出力に '%A' を使用しています。 + + + + This is a sample integer with a type annotation + これは、型の注釈付きのサンプルの整数です + + + + Values in F# are immutable by default. They cannot be changed + 既定では、F# の値は不変です。明示的に変更可能として指定しない限り、 + + + + in the course of a program's execution unless explicitly marked as mutable. + プログラムの実行の過程で変更することはできません。 + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/values/index#why-immutable + 詳細については、次を参照してください: https://docs.microsoft.com/ja-jp/dotnet/articles/fsharp/language-reference/values/index#why-immutable + + + + Binding a value to a name via 'let' makes it immutable. + 'let' を介して値を名前にバインドすると、変更できなくなります。 + + + + The second line of code fails to compile because 'number' is immutable and bound. + コードの 2 番目の行は、'number' が変更できず、バインドされているため、コンパイルに失敗します。 + + + + Re-defining 'number' to be a different value is not allowed in F#. + F# では、'number' を別の値に再定義することはできません。 + + + + A mutable binding. This is required to be able to mutate the value of 'otherNumber'. + 変更可能なバインド。これは 'otherNumber' の値を変更できるようにするために必要です。 + + + + When mutating a value, use '<-' to assign a new value. + 値を変換する場合は、'<-' を使用して新しい値を割り当てます。 + + + + You could not use '=' here for this purpose since it is used for equality + この場合、'=' は等価を示すために使用するため、ここで使用することはできません + + + + or other contexts such as 'let' or 'module' + または、'let' や 'module' などの他のコンテキスト + + + + Much of F# programming consists of defining functions that transform input data to produce + F# プログラミングの多くは、生成する入力データを変換する定義する関数で構成されています + + + + useful results. + 有用な結果。 + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/ + 詳細については、次を参照してください: https://docs.microsoft.com/ja-jp/dotnet/articles/fsharp/language-reference/functions/ + + + + You use 'let' to define a function. This one accepts an integer argument and returns an integer. + 関数を定義するには、'let' を使用します。これは整数の引数を受け取り、整数を返します。 + + + + Parentheses are optional for function arguments, except for when you use an explicit type annotation. + 明示的な型の注釈を使用する場合を除いて、かっこは関数引数では省略可能です。 + + + + Apply the function, naming the function return result using 'let'. + 関数を適用します。'let' を使用し、関数の戻り値の結果に名前を付けます。 + + + + The variable type is inferred from the function return type. + 変数の型は、関数の戻り値の型から推論されます。 + + + + This line uses '%d' to print the result as an integer. This is type-safe. + この行は '%d' を使用して結果を整数として出力します。これはタイプ セーフです。 + + + + If 'result1' were not of type 'int', then the line would fail to compile. + 'result1' が 'int' 型でなかった場合、行はコンパイルに失敗します。 + + + + When needed, annotate the type of a parameter name using '(argument:type)'. Parentheses are required. + 必要であれば、'(引数:型)' を使用してパラメーター名の型に注釈を付けます。かっこは必須です。 + + + + Conditionals use if/then/elid/elif/else. + 条件は、if/then/elid/elif/else を使用します。 + + + + Note that F# uses whitespace indentation-aware syntax, similar to languages like Python. + F# は Python などの言語のように、空白のインデント対応構文を使用することに注意してください。 + + + + This line uses '%f' to print the result as a float. As with '%d' above, this is type-safe. + この行は '%f' を使用して結果を浮動小数として出力します。上記の '%d' と同様に、これはタイプ セーフです。 + + + + Booleans are fundamental data types in F#. Here are some examples of Booleans and conditional logic. + ブール値は F# の基本のデータ型です。ブール値と条件ロジックの例をいくつか示します。 + + + + To learn more, see: + 詳細については、次を参照してください: + + + + and + 」および「 + + + + Booleans values are 'true' and 'false'. + ブール型の値は 'true' と 'false' です。 + + + + Operators on booleans are 'not', '&&' and '||'. + ブール値の演算子は 'not'、'&&'、および '||' です。 + + + + This line uses '%b'to print a boolean value. This is type-safe. + この行は '%b' を使用してブール値を出力します。これはタイプ セーフです。 + + + + Strings are fundamental data types in F#. Here are some examples of Strings and basic String manipulation. + 文字列は F# の基本のデータ型です。文字列と基本的な文字列操作の例をいくつか示します。 + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/strings + 詳細については、次を参照してください: https://docs.microsoft.com/ja-jp/dotnet/articles/fsharp/language-reference/strings + + + + Strings use double quotes. + 文字列は二重引用符を使用します。 + + + + Strings can also use @ to create a verbatim string literal. + 文字列は @ を使用して、verbatim 文字列リテラルを作成することもできます。 + + + + This will ignore escape characters such as '\', '\n', '\t', etc. + これは、'\'、'\n'、'\t' などのエスケープ文字を無視します。 + + + + String literals can also use triple-quotes. + 文字列リテラルは三重引用符を使用することもできます。 + + + + String concatenation is normally done with the '+' operator. + 通常、文字列の連結は '+' 演算子を使用して実行されます。 + + + + This line uses '%s' to print a string value. This is type-safe. + この行は、'%s' を使用して文字列値を出力します。これはタイプ セーフです。 + + + + Substrings use the indexer notation. This line extracts the first 7 characters as a substring. + サブ文字列はインデクサー表記を使用します。この行はサブ文字列として最初の 7 文字を抽出します。 + + + + Note that like many languages, Strings are zero-indexed in F#. + 多くの言語と同様に、F# では、文字列のインデックスは 0 から始まることに注意してください。 + + + + Tuples are simple combinations of data values into a combined value. + タプルは、データ値と合計値の単純な組み合わせです。 + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/tuples + 詳細については、次を参照してください: https://docs.microsoft.com/ja-jp/dotnet/articles/fsharp/language-reference/tuples + + + + A simple tuple of integers. + 整数のシンプルなタプルです。 + + + + A function that swaps the order of two values in a tuple. + タプルの 2 つの値の順序を入れ替える関数。 + + + + F# Type Inference will automatically generalize the function to have a generic type, + F# 型の推定は、ジェネリック型を持つように関数を自動的に一般化し、 + + + + meaning that it will work with any type. + 任意の型で動作することを意味します。 + + + + A tuple consisting of an integer, a string, + タプルを構成するのは、整数、文字列、 + + + + and a double-precision floating point number. + および倍精度浮動小数点数です。 + + + + A simple tuple of integers with a type annotation. + 型の注釈が指定された整数のシンプルなタプル。 + + + + Type annotations for tuples use the * symbol to separate elements + タプルの型の注釈では、要素を区切るために * の記号を使用します + + + + Tuples are normally objects, but they can also be represented as structs. + タプルは通常はオブジェクトですが、構造体として表すこともできます。 + + + + These interoperate completely with structs in C# and Visual Basic.NET; however, + C# と Visual Basic.NET では、これらは構造体と完全に相互運用されます。ただし、 + + + + struct tuples are not implicitly convertable with object tuples (often called reference tuples). + 構造体のタプルは、オブジェクト タプル (参照タプルと呼ばれることが多い) と暗黙的に変換できません。 + + + + The second line below will fail to compile because of this. Uncomment it to see what happens. + このため、以下の 2 番目の行はコンパイルに失敗します。発生する事象を確認するには、コメントを解除します。 + + + + Although you cannot implicitly convert between struct tuples and reference tuples, + 構造体タプルと参照タプル間で暗黙的に変換することはできませんが、 + + + + you can explicitly convert via pattern matching, as demonstrated below. + 以下に示すように、パターン マッチングを使用して明示的に変換できます。 + + + + The F# pipe operators ('|>', '<|', etc.) and F# composition operators ('>>', '<<') + F# パイプ演算子 ('|>'、'<|' など) と F# 合成演算子 ('>>'、'<<') + + + + are used extensively when processing data. These operators are themselves functions + は、データの処理時に幅広く使用されます。これらの演算子はそれ自体が関数であり、 + + + + which make use of Partial Application. + 部分適用を利用します。 + + + + To learn more about these operators, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/#function-composition-and-pipelining + これらの演算子の詳細については、次を参照してください: https://docs.microsoft.com/ja-jp/dotnet/articles/fsharp/language-reference/functions/#function-composition-and-pipelining + + + + To learn more about Partial Application, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/#partial-application-of-arguments + 部分適用の詳細については、次を参照してください: https://docs.microsoft.com/ja-jp/dotnet/articles/fsharp/language-reference/functions/#partial-application-of-arguments + + + + Squares a value. + 値を 2 乗します。 + + + + Adds 1 to a value. + 値に 1 を追加します。 + + + + Tests if an integer value is odd via modulo. + 剰余を使って整数値が奇数であるかどうかをテストします。 + + + + A list of 5 numbers. More on lists later. + 5 個の数値のリストです。リストの詳細については後述。 + + + + Given a list of integers, it filters out the even numbers, + 整数のリストを指定すると、偶数を除外し、 + + + + squares the resulting odds, and adds 1 to the squared odds. + 結果の奇数を 2 乗し、2 乗した奇数に 1 を加算します。 + + + + A shorter way to write 'squareOddValuesAndAddOne' is to nest each + 'squareOddValuesAndAddOne' を書き込むためのより簡単な方法は、 + + + + sub-result into the function calls themselves. + それぞれのサブ結果を関数呼び出し自体に入れ子にすることです。 + + + + This makes the function much shorter, but it's difficult to see the + これにより、関数は大幅に短くなりますが、データが処理される順序を + + + + order in which the data is processed. + 判別するのは難しくなります。 + + + + A preferred way to write 'squareOddValuesAndAddOne' is to use F# pipe operators. + 'squareOddValuesAndAddOne' を書き込むための推奨される方法は、F# パイプ演算子を使用する方法です。 + + + + This allows you to avoid creating intermediate results, but is much more readable + これにより、中間結果を作成しなくてもよくなります。また、 + + + + than nesting function calls like 'squareOddValuesAndAddOneNested' + 'squareOddValuesAndAddOneNested' のような関数呼び出しを入れ子にするよりもはるかに読みやすくすることができます + + + + You can shorten 'squareOddValuesAndAddOnePipeline' by moving the second `List.map` call + ラムダ関数を使用して、2 番目の `List.map` 呼び出しを先頭に移動することにより、 + + + + into the first, using a Lambda Function. + 'squareOddValuesAndAddOnePipeline' を短くすることができます。 + + + + Note that pipelines are also being used inside the lambda function. F# pipe operators + パイプラインはラムダ関数の内部でも使用されることに注意してください。F# パイプ演算子は、 + + + + can be used for single values as well. This makes them very powerful for processing data. + 単一の値にも使用できます。これにより、データ処理能力が向上します。 + + + + Lastly, you can eliminate the need to explicitly take 'values' in as a parameter by using '>>' + 最後に、'>>' を使用して次の 2 つのコア操作を作成すると、'values' をパラメーターとして + + + + to compose the two core operations: filtering out even numbers, then squaring and adding one. + 明示的に受け取る必要がなくなります: 偶数を除外してから、2 乗して 1 を加算する。 + + + + Likewise, the 'fun x -> ...' bit of the lambda expression is also not needed, because 'x' is simply + 同様に、ラムダ式の 'fun x -> ...' ビットも必要ありません。 'x' は単に、 + + + + being defined in that scope so that it can be passed to a functional pipeline. Thus, '>>' can be used + 関数型パイプラインに渡すことができるようにそのスコープ内で定義されているだけだからです。そのため、 + + + + there as well. + そこでも同様に '>>' を使用できます。 + + + + The result of 'squareOddValuesAndAddOneComposition' is itself another function which takes a + 'squareOddValuesAndAddOneComposition' の結果は、それ自体が別の関数です。その関数は、 + + + + list of integers as its input. If you execute 'squareOddValuesAndAddOneComposition' with a list + 整数のリストを入力として受け取ります。整数のリストを指定して 'squareOddValuesAndAddOneComposition' を + + + + of integers, you'll notice that it produces the same results as previous functions. + 実行すると、前の関数と同じ結果が生成されることがわかります。 + + + + This is using what is known as function composition. This is possible because functions in F# + これは、関数合成と呼ばれるものを使用しています。これが可能なのは、F# の関数が + + + + use Partial Application and the input and output types of each data processing operation match + 部分適用を使用しており、各データ処理操作の入力と出力の型が、使用している + + + + the signatures of the functions we're using. + 関数のシグネチャと一致するためです。 + + + + Lists are ordered, immutable, singly-linked lists. They are eager in their evaluation. + リストは、順序指定された、変更できない単方向リストです。 リストは集中評価されます。 + + + + This module shows various ways to generate lists and process lists with some functions + このモジュールは、リストを生成し、F# コア ライブラリ内の 'List' モジュールに含まれる + + + + in the 'List' module in the F# Core Library. + いくつかの関数を使用してリストを処理するためのさまざまな方法を示しています。 + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/lists + 詳細については、次を参照してください: https://docs.microsoft.com/ja-jp/dotnet/articles/fsharp/language-reference/lists + + + + Lists are defined using [ ... ]. This is an empty list. + リストは [ ... ] を使用して定義されます。これは空のリストです。 + + + + This is a list with 3 elements. ';' is used to separate elements on the same line. + これは 3 つの要素を含むリストです。';' は同じ行にある要素を区切るために使用されます。 + + + + You can also separate elements by placing them on their own lines. + 要素は、それぞれの行に配置することで分割することもできます。 + + + + This is a list of integers from 1 to 1000 + これは 1 ~ 1000 の整数のリストです + + + + Lists can also be generated by computations. This is a list containing + リストは計算によっても生成できます。これは、次を含むリストです: + + + + all the days of the year. + 1 年のすべての日。 + + + + Print the first 5 elements of 'daysList' using 'List.take'. + 'List.take' を使用して 'daysList' の最初の 5 つの要素を出力します。 + + + + Computations can include conditionals. This is a list containing the tuples + 計算には条件を含めることができます。これはタプルを含むリストです + + + + which are the coordinates of the black squares on a chess board. + チェス盤の黒いマス目の座標のタプルを含むリストです。 + + + + Lists can be transformed using 'List.map' and other functional programming combinators. + リストは 'List.map' と他の関数型プログラミング連結子を使用して変換することができます。 + + + + This definition produces a new list by squaring the numbers in numberList, using the pipeline + この定義は、パイプラインを使用して numberList 内の数値を 2 乗することによって新しいリストを生成します + + + + operator to pass an argument to List.map. + 引数を List.map に渡す演算子です。 + + + + There are many other list combinations. The following computes the sum of the squares of the + 他に多くのリストの組み合わせがあります。次の二乗和を計算します: + + + + numbers divisible by 3. + 3 で割り切れる数。 + + + + Arrays are fixed-size, mutable collections of elements of the same type. + 配列は、型が同じ要素の固定サイズの変更可能なコレクションです。 + + + + Although they are similar to Lists (they support enumeration and have similar combinators for data processing), + これらはリストと似ています (列挙型をサポートし、データ処理のための同様の連結子を備えています) が、 + + + + they are generally faster and support fast random access. This comes at the cost of being less safe by being mutable. + 一般的により高速であり、高速ランダム アクセスをサポートしています。その代わり、変更可能であるため安全性が低下します。 + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/arrays + 詳細については、次を参照してください: https://docs.microsoft.com/ja-jp/dotnet/articles/fsharp/language-reference/arrays + + + + This is The empty array. Note that the syntax is similar to that of Lists, but uses `[| ... |]` instead. + これは空の配列です。構文はリストの構文と似ていますが、代わりに `[| ... |]` を使用することにご注意ください。 + + + + Arrays are specified using the same range of constructs as lists. + 配列は、リストと同じコンストラクトの範囲を使用して指定されます。 + + + + This is an array of numbers from 1 to 1000. + これは 1 ~ 1000 の数値の配列です。 + + + + This is an array containing only the words "hello" and "world". + これは "hello" と "world" のみを含む配列です。 + + + + This is an array initialized by index and containing the even numbers from 0 to 2000. + これはインデックスによって初期化され、0 ~ 2000 の間の偶数を含む配列です。 + + + + Sub-arrays are extracted using slicing notation. + サブ配列はスライス表記法を使用して抽出されます。 + + + + You can loop over arrays and lists using 'for' loops. + 'for' ループを使用して、配列とリストに渡ってループできます。 + + + + You can modify the contents of an an array element by using the left arrow assignment operator. + 左矢印代入演算子を使用して、配列要素の内容を変更できます。 + + + + To learn more about this operator, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/values/index#mutable-variables + この演算子の詳細については、次を参照してください: https://docs.microsoft.com/ja-jp/dotnet/articles/fsharp/language-reference/values/index#mutable-variables + + + + You can transform arrays using 'Array.map' and other functional programming operations. + 'Array.map' と他の関数型プログラミング操作を使用して、配列を変換できます。 + + + + The following calculates the sum of the lengths of the words that start with 'h'. + 以下は、'h' で始まる単語の長さの合計を計算します。 + + + + Sequences are a logical series of elements, all of the same type. These are a more general type than Lists and Arrays. + シーケンスは論理的な一連の要素であり、すべてが同じ型です。これらはリストや配列よりも一般的な型です。 + + + + Sequences are evaluated on-demand and are re-evaluated each time they are iterated. + シーケンスはオンデマンドで評価され、繰り返されるたびに再評価されます。 + + + + An F# sequence is an alias for a .NET System.Collections.Generic.IEnumerable<'T>. + F# シーケンスは .NET System.Collections.Generic.IEnumerable<'T> のエイリアスです。 + + + + Sequence processing functions can be applied to Lists and Arrays as well. + シーケンス処理関数はリストと配列にも適用できます。 + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/sequences + 詳細については、次を参照してください: https://docs.microsoft.com/ja-jp/dotnet/articles/fsharp/language-reference/sequences + + + + This is the empty sequence. + これは空のシーケンスです。 + + + + This a sequence of values. + これは一連の値です。 + + + + This is an on-demand sequence from 1 to 1000. + これは 1 ~ 1000 のオンデマンドのシーケンスです。 + + + + This is a sequence producing the words "hello" and "world" + これは 単語 "hello" と "world" を生成するシーケンスです + + + + This sequence producing the even numbers up to 2000. + このシーケンスは、2000 までの偶数を生成します。 + + + + This is an infinite sequence which is a random walk. + これはランダム ウォークである無限シーケンスです。 + + + + This example uses yield! to return each element of a subsequence. + この例では、yield! を使用して、サブシーケンスの各要素を返します。 + + + + This example shows the first 100 elements of the random walk. + この例では、ランダム ウォークの最初の 100 要素を示します。 + + + + Recursive functions can call themselves. In F#, functions are only recursive + 再帰関数は自身を呼び出すことができます。F# では、関数は単に再帰的です + + + + when declared using 'let rec'. + 'let rec' を使用して宣言される場合。 + + + + Recursion is the preferred way to process sequences or collections in F#. + 再帰は、F# でシーケンスまたはコレクションを処理するための推奨される方法です。 + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/index#recursive-functions + 詳細については、次を参照してください: https://docs.microsoft.com/ja-jp/dotnet/articles/fsharp/language-reference/functions/index#recursive-functions + + + + This example shows a recursive function that computes the factorial of an + この例では、次の階乗を計算する再帰関数を示します + + + + integer. It uses 'let rec' to define a recursive function. + 整数。'let rec' を使用して、再帰関数を定義します。 + + + + Computes the greatest common factor of two integers. + 2 つの整数の最大公約数を計算します。 + + + + Since all of the recursive calls are tail calls, + すべての再帰呼び出しは末尾呼び出しであるため、 + + + + the compiler will turn the function into a loop, + コンパイラは関数をループにします + + + + which improves performance and reduces memory consumption. + これによりパフォーマンスが向上し、メモリの消費を抑えることができます。 + + + + This example computes the sum of a list of integers using recursion. + この例では、再帰を使用して整数のリストの合計を計算します。 + + + + This makes 'sumList' tail recursive, using a helper function with a result accumulator. + これは、ヘルパー関数を結果アキュムレータと共に使用して 'sumList' を末尾再帰にします。 + + + + This invokes the tail recursive helper function, providing '0' as a seed accumulator. + これは、シード アキュムレータとして '0' を指定して、末尾再帰的なヘルパー関数を呼び出します。 + + + + An approach like this is common in F#. + F# では、このようなアプローチは一般的です。 + + + + Records are an aggregate of named values, with optional members (such as methods). + レコードは、オプションのメンバー (メソッドなど) を含む名前付きの値の集合です。 + + + + They are immutable and have structural equality semantics. + これらは変更できず、構造上の等価セマンティクスを持ちます。 + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/records + 詳細については、次を参照してください: https://docs.microsoft.com/ja-jp/dotnet/articles/fsharp/language-reference/records + + + + This example shows how to define a new record type. + この例では、新しいレコード型を定義する方法を示します。 + + + + This example shows how to instantiate a record type. + この例では、レコードの種類をインスタンス化する方法を示します。 + + + + You can also do this on the same line with ';' separators. + ';' 区切りを使用して、同じ行でこれを行うこともできます。 + + + + This example shows how to use "copy-and-update" on record values. It creates + この例では、レコード値で "copy-and-update" を使用する方法を示します。次を作成します: + + + + a new record value that is a copy of contact1, but has different values for + contact1 のコピーであるレコード値。ただし、次の値は異なります: + + + + the 'Phone' and 'Verified' fields. + [電話番号]5D; および [検証済み]5D; フィールド。 + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/copy-and-update-record-expressions + 詳細については、次を参照してください: https://docs.microsoft.com/ja-jp/dotnet/articles/fsharp/language-reference/copy-and-update-record-expressions + + + + This example shows how to write a function that processes a record value. + この例では、レコード値を処理する関数を書き込む方法を示します。 + + + + It converts a 'ContactCard' object to a string. + 'ContactCard' オブジェクトを文字列に変換します。 + + + + This is an example of a Record with a member. + これは、メンバーを含むレコードの例です。 + + + + Members can implement object-oriented members. + メンバーはオブジェクト指向のメンバーを実装できます。 + + + + Members are accessed via the '.' operator on an instantiated type. + メンバーには、インスタンス化された型に対する '.' 演算子を介してアクセスできます。 + + + + Records can also be represented as structs via the 'Struct' attribute. + レコードは 'Struct' 属性を介して構造体として表すこともできます。 + + + + This is helpful in situations where the performance of structs outweighs + これは、構造体のパフォーマンスが参照型の柔軟性よりも + + + + the flexibility of reference types. + 重要である場合に役立ちます。 + + + + Discriminated Unions (DU for short) are values which could be a number of named forms or cases. + 判別共用体 (略して DU) は、多数の名前付きのフォームまたはケースである可能性のある値です。 + + + + Data stored in DUs can be one of several distinct values. + DU の格納データは、複数の個別の値のいずれかになります。 + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/discriminated-unions + 詳細については、次を参照してください: https://docs.microsoft.com/ja-jp/dotnet/articles/fsharp/language-reference/discriminated-unions + + + + The following represents the suit of a playing card. + たとえば、次は一揃いのトランプを表します。 + + + + A Disciminated Union can also be used to represent the rank of a playing card. + 判別共用体はトランプのランクを表すためにも使用できます。 + + + + Represents the rank of cards 2 .. 10 + 2 ~ 10 の札のランクを表します + + + + Discriminated Unions can also implement object-oriented members. + 判別共用体はオブジェクト指向のメンバーを実装することもできます。 + + + + This is a record type that combines a Suit and a Rank. + これは Suit と Rank を組み合わせたレコード型です。 + + + + It's common to use both Records and Disciminated Unions when representing data. + データを表すときには、レコードと判別共用体の両方を使用するのが一般的です。 + + + + This computes a list representing all the cards in the deck. + これは、一組のトランプのすべてのカードを表すリストを計算します。 + + + + This example converts a 'Card' object to a string. + この例では 'Card' オブジェクトを文字列に変換します。 + + + + This example prints all the cards in a playing deck. + この例では、一組のトランプのカードすべてを印刷します。 + + + + Single-case DUs are often used for domain modeling. This can buy you extra type safety + 単一ケースの DU は、ドメイン モデリングで多く使用されます。これにより、文字列や整数などの + + + + over primitive types such as strings and ints. + プリミティブ型に加えて、さらにタイプ セーフが追加されます。 + + + + Single-case DUs cannot be implicitly converted to or from the type they wrap. + 単一ケースの DU は、ラップする型との間で暗黙的に変換することはできません。 + + + + For example, a function which takes in an Address cannot accept a string as that input, + たとえば、アドレスを受け取る関数は文字列をその入力として受け入れることはできません + + + + or vive/versa. + (その逆もできません)。 + + + + You can easily instantiate a single-case DU as follows. + 次のように、単一ケースの DU のインスタンスを簡単に作成できます。 + + + + When you need the value, you can unwrap the underlying value with a simple function. + 値が必要な場合は、簡単な関数を使用して基になる値のラップを解除できます。 + + + + Printing single-case DUs is simple with unwrapping functions. + 単一ケースの DU は、関数のラップを解除するだけで出力できます。 + + + + Disciminated Unions also support recursive definitions. + 判別共用体は再帰的な定義もサポートしています。 + + + + This represents a Binary Search Tree, with one case being the Empty tree, + これはバイナリ検索ツリーを表します。片方のケースは空のツリーであり、 + + + + and the other being a Node with a value and two subtrees. + もう片方は値と 2 つのサブツリーを含む Node です。 + + + + Check if an item exists in the binary search tree. + バイナリ検索ツリーにアイテムが存在するかどうかを確認します。 + + + + Searches recursively using Pattern Matching. Returns true if it exists; otherwise, false. + パターン マッチングを使用して再帰的に検索します。存在する場合は true を返し、そうでない場合は false を返します。 + + + + Check the left subtree. + 左側のサブツリーを確認します。 + + + + Check the right subtree. + 右側のサブツリーを確認します。 + + + + Inserts an item in the Binary Search Tree. + バイナリ検索ツリーにアイテムを挿入します。 + + + + Finds the place to insert recursively using Pattern Matching, then inserts a new node. + パターン マッチングを使用して再帰的に挿入する場所を検索し、新しいノードを挿入します。 + + + + If the item is already present, it does not insert anything. + アイテムが既に存在する場合は、何も挿入しません。 + + + + No need to insert, it already exists; return the node. + 既に存在しているため、挿入する必要はありません。ノードを返します。 + + + + Call into left subtree. + 左側のサブツリーに呼び出します。 + + + + Call into right subtree. + 右側のサブツリーに呼び出します。 + + + + Discriminated Unions can also be represented as structs via the 'Struct' attribute. + 判別共用体は、'Struct' 属性を介して構造体として表すこともできます。 + + + + This is helpful in situations where the performance of structs outweighs + これは、構造体のパフォーマンスが参照型の柔軟性よりも + + + + the flexibility of reference types. + 重要である場合に役立ちます。 + + + + However, there are two important things to know when doing this: + ただし、これを行うときに理解しておく必要のある重要な点が 2 つあります: + + + + 1. A struct DU cannot be recursively-defined. + 1. 構造体 DU は再帰的に定義できません。 + + + + 2. A struct DU must have unique names for each of its cases. + 2. 構造体 DU の名前は各ケースに対して一意である必要があります。 + + + + Pattern Matching is a feature of F# that allows you to utilize Patterns, + パターン マッチングはパターンを使用できるようにする F# の機能です。 + + + + which are a way to compare data with a logical structure or structures, + これは、データと 1 つまたは複数の論理構造を比較したり、 + + + + decompose data into constituent parts, or extract information from data in various ways. + データを構成要素部分に分解したり、さまざまな方法でデータから情報を抽出したりするための方法です。 + + + + You can then dispatch on the "shape" of a pattern via Pattern Matching. + その後、パターン マッチングを介してパターンの "形" でディスパッチできます。 + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/pattern-matching + 詳細については、次を参照してください: https://docs.microsoft.com/ja-jp/dotnet/articles/fsharp/language-reference/pattern-matching + + + + A record for a person's first and last name + 個人の姓および名のレコード + + + + A Discriminated Union of 3 different kinds of employees + 3 種類の社員の判別共用体 + + + + Count everyone underneath the employee in the management hierarchy, + 管理階層構造の中で、ある社員の下にいる全員の数を数えます + + + + including the employee. + (その社員自身を含む)。 + + + + Find all managers/executives named "Dave" who do not have any reports. + 名前が "Dave" で、レポートのないすべてのマネージャー/役員を検索します。 + + + + This uses the 'function' shorthand to as a lambda expression. + これは、ラムダ式として 'function' の短縮形を使用します。 + + + + [] matches an empty list. + [] は空白のリストに一致します。 + + + + '_' is a wildcard pattern that matches anything. + '_' は、任意のものに一致するワイルドカード パターンです。 + + + + This handles the "or else" case. + これは "or else" ケースを処理します。 + + + + You can also use the shorthand function construct for pattern matching, + パターン マッチングのために、短縮形の関数コンストラクトを使用することもできます。 + + + + which is useful when you're writing functions which make use of Partial Application. + これは、部分適用を利用する関数を書き込む場合に役立ちます。 + + + + Define some more functions which parse with the helper function. + ヘルパー関数で解析する別の関数をいくつか定義します。 + + + + Active Patterns are another powerful construct to use with pattern matching. + アクティブなパターンは、パターン マッチングで使用するもう 1 つの強力なコンストラクトです。 + + + + They allow you to partition input data into custom forms, decomposing them at the pattern match call site. + パターン マッチの呼び出しサイトで分解して、入力データをカスタム フォームにパーティション分割できるようにします。 + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/active-patterns + 詳細については、次を参照してください: https://docs.microsoft.com/ja-jp/dotnet/articles/fsharp/language-reference/active-patterns + + + + Pattern Matching via 'function' keyword and Active Patterns often looks like this. + 'function' キーワードとアクティブ パターンによるパターン マッチングは、多くの場合、次のようになります。 + + + + Call the printer with some different values to parse. + 解析するいくつかの異なる値でプリンターを呼び出します。 + + + + Option values are any kind of value tagged with either 'Some' or 'None'. + オプション値とは、'Some' または 'None' が指定されたあらゆる種類の値です。 + + + + They are used extensively in F# code to represent the cases where many other + F# コードで広く使用され、他の多くの言語で null 参照が使用される + + + + languages would use null references. + ケースを表します。 + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/options + 詳細については、次を参照してください: https://docs.microsoft.com/ja-jp/dotnet/articles/fsharp/language-reference/options + + + + First, define a zipcode defined via Single-case Discriminated Union. + まず、単一ケースの判別共用体を介して定義した郵便番号を定義します。 + + + + Next, define a type where the ZipCode is optional. + 次に、郵便番号が省略可能である型を定義します。 + + + + Next, define an interface type that represents an object to compute the shipping zone for the customer's zip code, + 次に、オブジェクトを表すインターフェイスの型を定義して、顧客の郵便番号の出荷ゾーンを計算し、 + + + + given implementations for the 'getState' and 'getShippingZone' abstract methods. + 'getState' および 'getShippingZone' 抽象メソッドの実装が指定されています。 + + + + Next, calculate a shipping zone for a customer using a calculator instance. + 次に、電卓のインスタンスを使用して顧客の出荷ゾーンを計算します。 + + + + This uses combinators in the Option module to allow a functional pipeline for + これは、オプション モジュール内の連結子を使用することにより、オプションを使用したデータ変換のために + + + + transforming data with Optionals. + 関数型パイプラインを使用できるようにします。 + + + + Units of measure are a way to annotate primitive numeric types in a type-safe way. + 測定単位は、タイプ セーフな方法でプリミティブな数値型に注釈を付ける方法です。 + + + + You can then perform type-safe arithmetic on these values. + 次に、これらの値に対してタイプ セーフの算術を実行できます。 + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/units-of-measure + 詳細については、次を参照してください: https://docs.microsoft.com/ja-jp/dotnet/articles/fsharp/language-reference/units-of-measure + + + + First, open a collection of common unit names + まず、共通の単位名のコレクションを開きます + + + + Define a unitized constant + 単位化された定数を定義します + + + + Next, define a new unit type + 次に、新しい単位の種類を定義します + + + + Conversion factor mile to meter. + マイルからメートルへの変換係数。 + + + + Define a unitized constant + 単位化された定数を定義します + + + + Compute metric-system constant + メートル法の定数を計算します + + + + Values using Units of Measure can be used just like the primitive numeric type for things like printing. + 測定単位を使用する値は、印刷などに対するプリミティブな数値型と同じように使用できます。 + + + + Classes are a way of defining new object types in F#, and support standard Object-oriented constructs. + クラスは、F# で新しいオブジェクト型を定義する方法であり、標準のオブジェクト指向のコンストラクトをサポートします。 + + + + They can have a variety of members (methods, properties, events, etc.) + さまざまなメンバー (メンバー、プロパティ、イベントなど) を含めることができます + + + + To learn more about Classes, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/classes + クラスの詳細については、次を参照してください: https://docs.microsoft.com/ja-jp/dotnet/articles/fsharp/language-reference/classes + + + + To learn more about Members, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/members + メンバーの詳細については、次を参照してください: https://docs.microsoft.com/ja-jp/dotnet/articles/fsharp/language-reference/members + + + + A simple two-dimensional Vector class. + 単純な 2 次元のベクター クラス。 + + + + The class's constructor is on the first line, + クラスのコンストラクターは最初の行にあり、 + + + + and takes two arguments: dx and dy, both of type 'double'. + また、dx と dy の 2 つの引数を取ります。どちらも 'double' 型です。 + + + + This internal field stores the length of the vector, computed when the + この内部フィールドはベクトルの長さを格納します。これは、次の時点でに計算されます: + + + + object is constructed + オブジェクトが構築されます + + + + 'this' specifies a name for the object's self identifier. + 'this' は、オブジェクトの自己識別子の名前を指定します。 + + + + In instance methods, it must appear before the member name. + インスタンス メソッドでは、メンバー名の前に表示される必要があります。 + + + + This member is a method. The previous members were properties. + このメンバーはメソッドです。前のメンバーはプロパティでした。 + + + + This is how you instantiate the Vector2D class. + これは、Vector2D クラスのインスタンスを作成する方法です。 + + + + Get a new scaled vector object, without modifying the original object. + 元のオブジェクトを変更せずに、新しく調節されたベクター オブジェクトを取得します。 + + + + Generic classes allow types to be defined with respect to a set of type parameters. + ジェネリック クラスでは、型パラメーターのセットに対して型を定義することができます。 + + + + In the following, 'T is the type parameter for the class. + 以下では、'T はクラスの型パラメーターです。 + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/generics/ + 詳細については、次を参照してください: https://docs.microsoft.com/ja-jp/dotnet/articles/fsharp/language-reference/generics/ + + + + This internal field store the states in a list. + この内部フィールドは状態をリストに保存します。 + + + + Add a new element to the list of states. + 状態のリストに新しい要素を追加します。 + + + + use the '<-' operator to mutate the value. + '<-' 演算子を使用して、値を変換します。 + + + + Get the entire list of historical states. + 状態の履歴のリスト全体を取得します。 + + + + Get the latest state. + 最新の状態を取得します。 + + + + An 'int' instance of the state tracker class. Note that the type parameter is inferred. + 状態トラッカー クラスの 'int' インスタンス。型パラメーターは推論されていることに注意してください。 + + + + Add a state + 状態を追加します + + + + Interfaces are object types with only 'abstract' members. + インターフェイスは 'abstract' メンバーのみを持つオブジェクト型です。 + + + + Object types and object expressions can implement interfaces. + オブジェクト型とオブジェクト式はインターフェイスを実装できます。 + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/interfaces + 詳細については、次を参照してください: https://docs.microsoft.com/ja-jp/dotnet/articles/fsharp/language-reference/interfaces + + + + This is a type that implements IDisposable. + これは IDisposable を実装する型です。 + + + + This is the implementation of IDisposable members. + これは IDisposable メンバーの実装です。 + + + + This is an object that implements IDisposable via an Object Expression + これは、オブジェクト式を使用して IDisposable を実装するオブジェクトです + + + + Unlike other languages such as C# or Java, a new type definition is not needed + C# や Java などの他の言語とは異なり、インターフェイスを実装するために + + + + to implement an interface. + 新しい型定義は必要ありません。 + + + + The FSharp.Core library defines a range of parallel processing functions. Here + FSharp.Core ライブラリは並列処理関数の範囲を定義します。ここでは + + + + you use some functions for parallel processing over arrays. + アレイ全体で並列処理に対していくつかの関数を使用できます。 + + + + To learn more, see: https://msdn.microsoft.com/en-us/visualfsharpdocs/conceptual/array.parallel-module-%5Bfsharp%5D + 詳細については、次を参照してください: https://msdn.microsoft.com/ja-jp/visualfsharpdocs/conceptual/array.parallel-module-%5Bfsharp%5D + + + + First, an array of inputs. + まず、入力の配列です。 + + + + Next, define a functions that does some CPU intensive computation. + 次に、CPU 集約型の計算を実行する関数を定義します。 + + + + Next, do a parallel map over a large input array. + 次に、大きい入力配列に対して並列マップを実行します。 + + + + Next, print the results. + 次に、結果を印刷します。 + + + + Events are a common idiom for .NET programming, especially with WinForms or WPF applications. + イベントは、特に WinForms または WPF アプリケーションでの .NET プログラミングの一般的な用法です。 + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/members/events + 詳細については、次を参照してください: https://docs.microsoft.com/ja-jp/dotnet/articles/fsharp/language-reference/members/events + + + + First, create instance of Event object that consists of subscription point (event.Publish) and event trigger (event.Trigger). + まず、サブスクリプション ポイント (event.Publish) およびイベント トリガー (event.Trigger) で構成されるイベント オブジェクトのインスタンスを作成します。 + + + + Next, add handler to the event. + 次に、ハンドラーをイベントに追加します。 + + + + Next, trigger the event. + 次に、イベントをトリガーします。 + + + + Next, create an instance of Event that follows standard .NET convention: (sender, EventArgs). + 次に、標準的な .NET 表記規則に従うイベントのインスタンスを作成します: (sender, EventArgs)。 + + + + Next, add a handler for this new event. + 次に、この新しいイベントのハンドラーを追加します。 + + + + Next, trigger this event (note that sender argument should be set). + 次に、このイベントをトリガーします (sender 引数を設定する必要があります)。 + + + + + \ No newline at end of file diff --git a/vsintegration/ProjectTemplates/TutorialProject/Template/xlf/Tutorial.fsx.ko.xlf b/vsintegration/ProjectTemplates/TutorialProject/Template/xlf/Tutorial.fsx.ko.xlf new file mode 100644 index 00000000000..6e4f9c147a9 --- /dev/null +++ b/vsintegration/ProjectTemplates/TutorialProject/Template/xlf/Tutorial.fsx.ko.xlf @@ -0,0 +1,1637 @@ + + + + + + This sample will guide you through elements of the F# language. + 이 샘플에서는 F# 언어의 요소에 대해 안내합니다. + + + + To execute the code in F# Interactive, highlight a section of code and press Alt-Enter or right-click + F# 대화형에서 코드를 실행하려면 코드 섹션을 강조 표시하고 <Alt+Enter>를 누르거나 마우스 오른쪽 단추를 클릭한 다음 + + + + and select "Execute in Interactive". You can open the F# Interactive Window from the "View" menu. + "대화형으로 실행"을 선택하세요. "보기" 메뉴에서 F# 대화형 창을 열 수 있습니다. + + + + For more about F#, see: + F#에 대한 자세한 내용은 다음을 참조하세요. + + + + To see this tutorial in documentation form, see: + 이 자습서를 설명서 형식으로 보려면 다음을 참조하세요. + + + + To learn more about applied F# programming, use + 적용된 F# 프로그래밍에 대해 자세히 알아보려면 다음을 사용하세요. + + + + To install the Visual F# Power Tools, use + Visual F# Power 도구를 설치하려면 다음을 사용하세요. + + + + 'Tools' --> 'Extensions and Updates' --> `Online` and search + '도구' --> '확장 및 업데이트' --> `온라인`으로 이동하고 검색합니다. + + + + For additional templates to use with F#, see the 'Online Templates' in Visual Studio, + F#과 함께 사용할 수 있는 추가 템플릿은 Visual Studio의 다음 위치에서 '온라인 템플릿'을 참조하세요. + + + + 'New Project' --> 'Online Templates' + '새 프로젝트' --> '온라인 템플릿' + + + + F# supports three kinds of comments: + F#에서는 세 가지 종류의 주석을 지원합니다. + + + + 1. Double-slash comments. These are used in most situations. + 1. 이중 슬래시 주석은 대부분의 경우에 사용됩니다. + + + + 2. ML-style Block comments. These aren't used that often. + 2. ML 스타일 블록 주석은 자주 사용되지 않습니다. + + + + 3. Triple-slash comments. These are used for documenting functions, types, and so on. + 3. 삼중 슬래시 주석은 함수, 형식 등을 설명하는 경우에 사용됩니다. + + + + They will appear as text when you hover over something which is decorated with these comments. + 이러한 주석으로 데코레이트된 항목 위에 마우스를 올리면 텍스트로 표시됩니다. + + + + They also support .NET-style XML comments, which allow you to generate reference documentation, + 참조 문서를 생성할 수 있는 .NET 스타일 XML 주석도 지원하며, + + + + and they also allow editors (such as Visual Studio) to extract information from them. + 또한 편집기(예: Visual Studio)에서 정보를 추출할 수 있도록 합니다. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/xml-documentation + 자세히 알아보려면 다음을 참조하세요. https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/xml-documentation + + + + Open namespaces using the 'open' keyword. + 'open' 키워드를 사용하여 네임스페이스를 엽니다. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/import-declarations-the-open-keyword + 자세히 알아보려면 다음을 참조하세요. https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/import-declarations-the-open-keyword + + + + A module is a grouping of F# code, such as values, types, and function values. + 모듈은 값, 형식, 함수 값 같은 F# 코드의 그룹화입니다. + + + + Grouping code in modules helps keep related code together and helps avoid name conflicts in your program. + 모듈로 코드를 그룹화하면 관련 코드를 함께 유지하고 프로그램에서 이름 충돌을 방지하는 데 도움이 됩니다. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/modules + 자세히 알아보려면 다음을 참조하세요. https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/modules + + + + This is a sample integer. + 샘플 정수입니다. + + + + This is a sample floating point number. + 샘플 부동 소수점 숫자입니다. + + + + This computed a new number by some arithmetic. Numeric types are converted using + 산술을 사용하여 새 수를 계산했습니다. 숫자 형식은 + + + + functions 'int', 'double' and so on. + 'int', 'double' 등의 함수를 사용하여 변환됩니다. + + + + This is a list of the numbers from 0 to 99. + 0에서 99까지의 숫자 목록입니다. + + + + This is a list of all tuples containing all the numbers from 0 to 99 and their squares. + 0에서 99까지의 모든 숫자와 제곱을 포함하는 모든 튜플 목록입니다. + + + + The next line prints a list that includes tuples, using '%A' for generic printing. + 다음 줄은 제네릭 출력에 대해 '%A'을(를) 사용하여 튜플을 포함하는 목록을 출력합니다. + + + + This is a sample integer with a type annotation + 형식 주석이 있는 샘플 정수입니다. + + + + Values in F# are immutable by default. They cannot be changed + F#의 값은 기본적으로 변경할 수 없습니다. 변경 가능으로 + + + + in the course of a program's execution unless explicitly marked as mutable. + 명시적으로 표시되지 않는 한 프로그램 실행 중 변경할 수 없습니다. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/values/index#why-immutable + 자세히 알아보려면 다음을 참조하세요. https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/values/index#why-immutable + + + + Binding a value to a name via 'let' makes it immutable. + 'let'을 통해 값을 이름에 바인딩하면 값을 변경할 수 없게 됩니다. + + + + The second line of code fails to compile because 'number' is immutable and bound. + 'number'는 변경이 불가능하고 바인딩되어 있으므로 코드의 두 번째 줄이 컴파일되지 않습니다. + + + + Re-defining 'number' to be a different value is not allowed in F#. + F#에서는 'number'를 다른 값으로 다시 정의할 수 없습니다. + + + + A mutable binding. This is required to be able to mutate the value of 'otherNumber'. + 변경할 수 있는 바인딩은 'otherNumber' 값을 변경하기 위해 필요합니다. + + + + When mutating a value, use '<-' to assign a new value. + 값을 변경할 때는 '<-'를 사용하여 새 값을 할당하세요. + + + + You could not use '=' here for this purpose since it is used for equality + '='이 같음에 대해 사용되지 않으므로 여기에서 이 용도로 '='을 사용할 수 없습니다. + + + + or other contexts such as 'let' or 'module' + 또는 'let'이나 'module' 같은 기타 컨텍스트 + + + + Much of F# programming consists of defining functions that transform input data to produce + 대부분의 F# 프로그래밍은 유용한 결과를 생성하기 위해 입력 데이터를 변환하는 함수 정의로 + + + + useful results. + 구성됩니다. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/ + 자세히 알아보려면 다음을 참조하세요. https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/ + + + + You use 'let' to define a function. This one accepts an integer argument and returns an integer. + 'let'을 사용하여 정수 인수를 받고 정수를 반환하는 함수를 정의합니다. + + + + Parentheses are optional for function arguments, except for when you use an explicit type annotation. + 괄호는 명시적 형식 주석을 사용하는 경우 외에는 함수 인수에 선택적으로 사용할 수 있습니다. + + + + Apply the function, naming the function return result using 'let'. + 함수를 적용하고, 'let'을 사용하여 함수 반환 결과에 이름을 지정합니다. + + + + The variable type is inferred from the function return type. + 변수 형식은 함수 반환 형식에서 유추됩니다. + + + + This line uses '%d' to print the result as an integer. This is type-safe. + 이 줄은 '%d'을(를) 사용하여 결과를 integer로 인쇄합니다. 이 코드는 형식이 안전합니다. + + + + If 'result1' were not of type 'int', then the line would fail to compile. + 'result1'이 'int' 형식이 아닌 경우 줄이 컴파일되지 않습니다. + + + + When needed, annotate the type of a parameter name using '(argument:type)'. Parentheses are required. + 필요한 경우 '(argument:type)'을 사용하여 매개 변수 이름 형식에 대한 주석을 답니다. 괄호가 필요합니다. + + + + Conditionals use if/then/elid/elif/else. + 조건은 if/then/elid/elif/else를 사용합니다. + + + + Note that F# uses whitespace indentation-aware syntax, similar to languages like Python. + F#은 Python과 같은 언어처럼 공백 들여쓰기 인식 구문을 사용합니다. + + + + This line uses '%f' to print the result as a float. As with '%d' above, this is type-safe. + 이 줄은 '%f'을(를) 사용하여 결과를 float으로 인쇄합니다. 위의 '%d'처럼 이 코드는 형식이 안전합니다. + + + + Booleans are fundamental data types in F#. Here are some examples of Booleans and conditional logic. + 부울은 F#에서 기본적인 데이터 형식입니다. 다음은 부울 및 조건부 논리의 몇 가지 예입니다. + + + + To learn more, see: + 자세히 알아보려면 다음을 참조하세요. + + + + and + + + + + Booleans values are 'true' and 'false'. + 부울 값은 'true' 및 'false'입니다. + + + + Operators on booleans are 'not', '&&' and '||'. + 부울의 연산자는 'not', '&&' 및 '||'입니다. + + + + This line uses '%b'to print a boolean value. This is type-safe. + 이 줄은 '%b'을(를) 사용하여 부울 값을 인쇄합니다. 이 코드는 형식이 안전합니다. + + + + Strings are fundamental data types in F#. Here are some examples of Strings and basic String manipulation. + 문자열은 F#에서 기본적인 데이터 형식입니다. 다음은 문자열 및 기본 문자열 조작의 몇 가지 예입니다. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/strings + 자세히 알아보려면 다음을 참조하세요. https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/strings + + + + Strings use double quotes. + 문자열은 큰따옴표를 사용합니다. + + + + Strings can also use @ to create a verbatim string literal. + 또한 문자열은 @을 사용하여 축자 문자열 리터럴을 만듭니다. + + + + This will ignore escape characters such as '\', '\n', '\t', etc. + 이 경우 '\', '\n', '\t' 등과 같은 이스케이프 문자열을 무시합니다. + + + + String literals can also use triple-quotes. + 또한 문자열 리터럴은 세 따옴표를 사용합니다. + + + + String concatenation is normally done with the '+' operator. + 문자열 연결은 일반적으로 '+' 연산자로 합니다. + + + + This line uses '%s' to print a string value. This is type-safe. + 이 줄은 '%s'을(를) 사용하여 문자열 값을 인쇄합니다. 이 코드는 형식이 안전합니다. + + + + Substrings use the indexer notation. This line extracts the first 7 characters as a substring. + 부분 문자열은 인덱서 표기법을 사용합니다. 이 줄은 처음 7개 문자를 부분 문자열로 추출합니다. + + + + Note that like many languages, Strings are zero-indexed in F#. + 다른 여러 언어처럼 F#에서는 문자열이 0으로 인덱싱됩니다. + + + + Tuples are simple combinations of data values into a combined value. + 튜플은 데이터 값을 조합된 값으로 만드는 간단한 조합입니다. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/tuples + 자세히 알아보려면 다음을 참조하세요. https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/tuples + + + + A simple tuple of integers. + 단순한 정수 튜플입니다. + + + + A function that swaps the order of two values in a tuple. + 튜플에 있는 두 값의 순서를 바꾸는 함수입니다. + + + + F# Type Inference will automatically generalize the function to have a generic type, + F# 형식 유추에서는 자동으로 함수를 제너릭 형식으로 일반화하므로, + + + + meaning that it will work with any type. + 모든 형식에 사용할 수 있습니다. + + + + A tuple consisting of an integer, a string, + 정수, 문자열 및 배정밀도 부동 소수점 + + + + and a double-precision floating point number. + 숫자로 구성된 튜플입니다. + + + + A simple tuple of integers with a type annotation. + 형식 주석이 포함된 단순한 정수 튜플입니다. + + + + Type annotations for tuples use the * symbol to separate elements + 튜플에 대한 형식 주석은 * 기호를 사용하여 요소를 구분합니다. + + + + Tuples are normally objects, but they can also be represented as structs. + 튜플은 일반적으로 개체이지만 구조체로 나타낼 수도 있습니다. + + + + These interoperate completely with structs in C# and Visual Basic.NET; however, + 이러한 구조체는 C# 및 Visual Basic.NET의 구조체와 완벽히 상호 운용되지만, + + + + struct tuples are not implicitly convertable with object tuples (often called reference tuples). + 구조체 튜플은 개체 튜플(참조 튜플이라고도 함)로 암시적인 변환을 할 수 없습니다. + + + + The second line below will fail to compile because of this. Uncomment it to see what happens. + 이로써 아래 두 번째 줄은 컴파일되지 않으며 결과를 확인하려면 이 줄의 주석 처리를 제거하세요. + + + + Although you cannot implicitly convert between struct tuples and reference tuples, + 구조체 튜플과 참조 튜플 간을 암시적으로 변환할 수 없지만, + + + + you can explicitly convert via pattern matching, as demonstrated below. + 아래 설명된 것처럼 패턴 일치를 통해 명시적으로 변환할 수 있습니다. + + + + The F# pipe operators ('|>', '<|', etc.) and F# composition operators ('>>', '<<') + F# 파이프 연산자('|>', '<|' 등) 및 F# 합성 연산자('>>', '<<')는 + + + + are used extensively when processing data. These operators are themselves functions + 데이터를 처리할 때 광범위하게 사용됩니다. 이러한 연산자는 자체가 함수이며 + + + + which make use of Partial Application. + 부분 응용 프로그램을 사용합니다. + + + + To learn more about these operators, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/#function-composition-and-pipelining + 이러한 연산자에 대해 자세히 알아보려면 다음을 참조하세요. https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/#function-composition-and-pipelining + + + + To learn more about Partial Application, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/#partial-application-of-arguments + 부분 응용 프로그램에 대해 자세히 알아보려면 다음을 참조하세요. https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/#partial-application-of-arguments + + + + Squares a value. + 값을 제곱합니다. + + + + Adds 1 to a value. + 값에 1을 더합니다. + + + + Tests if an integer value is odd via modulo. + 모듈로를 통해 정수 값이 홀수인지 테스트합니다. + + + + A list of 5 numbers. More on lists later. + 5개 숫자 목록입니다. 추가 숫자는 나중에 표시됩니다. + + + + Given a list of integers, it filters out the even numbers, + 정수 목록인 경우 짝수를 필터링하고, + + + + squares the resulting odds, and adds 1 to the squared odds. + 결과 홀수를 제곱하고 제곱한 홀수에 1을 더합니다. + + + + A shorter way to write 'squareOddValuesAndAddOne' is to nest each + 'squareOddValuesAndAddOne'을 더 짧게 작성하려면 + + + + sub-result into the function calls themselves. + 각 하위 결과를 함수 호출 자체에 중첩합니다. + + + + This makes the function much shorter, but it's difficult to see the + 그러면 함수가 더 짧아지지만 데이터가 처리되는 순서를 + + + + order in which the data is processed. + 알아보기 어렵습니다. + + + + A preferred way to write 'squareOddValuesAndAddOne' is to use F# pipe operators. + 'squareOddValuesAndAddOne'을 작성하려면 기본적으로 F# 파이프 연산자를 사용합니다. + + + + This allows you to avoid creating intermediate results, but is much more readable + 그러면 중간 결과를 생성하지 않아도 되며 + + + + than nesting function calls like 'squareOddValuesAndAddOneNested' + 'squareOddValuesAndAddOneNested'와 같이 함수 호출을 중첩할 때보다 읽기도 쉽습니다. + + + + You can shorten 'squareOddValuesAndAddOnePipeline' by moving the second `List.map` call + 'squareOddValuesAndAddOnePipeline'을 줄이려면 두 번째 `List.map` 호출을 + + + + into the first, using a Lambda Function. + 람다 함수를 사용하여 첫 번째로 이동합니다. + + + + Note that pipelines are also being used inside the lambda function. F# pipe operators + 파이프라인은 람다 함수 내에도 사용됩니다. F# 파이프 연산자는 + + + + can be used for single values as well. This makes them very powerful for processing data. + 단일 값에도 사용할 수 있습니다. 따라서 데이터 처리에 매우 유용합니다. + + + + Lastly, you can eliminate the need to explicitly take 'values' in as a parameter by using '>>' + 마지막으로 명시적으로 'values'를 매개 변수로 사용할 필요가 없습니다. '>>'를 사용하여 + + + + to compose the two core operations: filtering out even numbers, then squaring and adding one. + 짝수를 필터링한 다음 제곱하고 1을 더하는 두 가지 핵심 작업을 작성하면 됩니다. + + + + Likewise, the 'fun x -> ...' bit of the lambda expression is also not needed, because 'x' is simply + 마찬가지로 'fun x -> ...' 람다 식도 필요하지 않습니다. 'x'를 해당 범위에서 간단히 + + + + being defined in that scope so that it can be passed to a functional pipeline. Thus, '>>' can be used + 정의하여 함수 파이프라인에 전달할 수 있기 때문입니다. 따라서 여기에서도 '>>'를 + + + + there as well. + 사용할 수 있습니다. + + + + The result of 'squareOddValuesAndAddOneComposition' is itself another function which takes a + 'squareOddValuesAndAddOneComposition'의 결과 자체도 정수 목록을 입력으로 사용하는 + + + + list of integers as its input. If you execute 'squareOddValuesAndAddOneComposition' with a list + 다른 함수입니다. 'squareOddValuesAndAddOneComposition'을 정수 목록을 사용하여 + + + + of integers, you'll notice that it produces the same results as previous functions. + 실행하는 경우 이전 함수와 동일한 결과를 생성합니다. + + + + This is using what is known as function composition. This is possible because functions in F# + 여기서는 이른바 함수 컴퍼지션을 사용합니다. 이것이 가능한 이유는 F#의 함수가 + + + + use Partial Application and the input and output types of each data processing operation match + 부분 응용 프로그램을 사용하고 각 데이터 처리 작업의 입력 및 출력 형식이 사용 중인 함수의 + + + + the signatures of the functions we're using. + 시그니처와 일치하기 때문입니다. + + + + Lists are ordered, immutable, singly-linked lists. They are eager in their evaluation. + 순서가 지정되고 변경 불가능한 단일 연결 목록으로 즉시 평가됩니다. + + + + This module shows various ways to generate lists and process lists with some functions + 이 모듈에서는 F# 주요 라이브러리의 'List' 모듈에 있는 일부 함수를 사용하여 목록을 생성하고 + + + + in the 'List' module in the F# Core Library. + 목록을 처리하는 다양한 방법을 보여 줍니다. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/lists + 자세히 알아보려면 다음을 참조하세요. https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/lists + + + + Lists are defined using [ ... ]. This is an empty list. + 목록은 [ ... ]을 사용하여 정의됩니다. 이것은 빈 목록입니다. + + + + This is a list with 3 elements. ';' is used to separate elements on the same line. + 3개 요소가 포함된 목록입니다. 동일한 줄에서 ';'을 사용하여 요소를 구분합니다. + + + + You can also separate elements by placing them on their own lines. + 요소를 다른 줄에 배치하여 요소를 구분할 수도 있습니다. + + + + This is a list of integers from 1 to 1000 + 이것은 1에서 1000까지의 정수 리스트입니다. + + + + Lists can also be generated by computations. This is a list containing + 리스트는 계산에 의해서도 생성될 수 있습니다. 다음은 + + + + all the days of the year. + 연중 모든 날짜를 포함하는 리스트입니다. + + + + Print the first 5 elements of 'daysList' using 'List.take'. + 'daysList'의 처음 5개 요소를 'List.take'를 사용하여 인쇄합니다. + + + + Computations can include conditionals. This is a list containing the tuples + 계산은 조건을 포함할 수 있습니다. 다음은 + + + + which are the coordinates of the black squares on a chess board. + 체스 보드에서 검은색 칸의 좌표를 가리키는 튜플이 포함된 리스트입니다. + + + + Lists can be transformed using 'List.map' and other functional programming combinators. + 리스트는 'List.map' 및 기타 함수 프로그래밍 조합기를 사용하여 변환될 수 있습니다. + + + + This definition produces a new list by squaring the numbers in numberList, using the pipeline + 이 정의는 인수를 List.map으로 전달하기 위해 파이프라인 연산자를 사용하여 numberList의 숫자를 + + + + operator to pass an argument to List.map. + 제곱하여 새 리스트를 생성합니다. + + + + There are many other list combinations. The following computes the sum of the squares of the + 다른 리스트 조합이 많이 있습니다. 다음은 + + + + numbers divisible by 3. + 3으로 나눠지는 수의 제곱의 합을 계산합니다. + + + + Arrays are fixed-size, mutable collections of elements of the same type. + 배열은 고정 크기이며 같은 형식의 요소로 구성된 변경 가능한 컬렉션입니다. + + + + Although they are similar to Lists (they support enumeration and have similar combinators for data processing), + 배열은 목록과 마찬가지로 열거형을 지원하고 데이터 처리를 위한 유사한 조합기를 사용하지만, + + + + they are generally faster and support fast random access. This comes at the cost of being less safe by being mutable. + 배열은 일반적으로 더 빠르고 빠른 임의 액세스를 지원합니다. 변경이 가능하므로 덜 안전하다는 단점은 있습니다. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/arrays + 자세히 알아보려면 다음을 참조하세요. https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/arrays + + + + This is The empty array. Note that the syntax is similar to that of Lists, but uses `[| ... |]` instead. + 빈 배열입니다. 목록의 구문과 유사하지만 `[| ... |]`을 대신 사용합니다. + + + + Arrays are specified using the same range of constructs as lists. + 배열은 리스트와 같은 범위의 구문을 사용하여 지정됩니다. + + + + This is an array of numbers from 1 to 1000. + 1에서 1000까지의 숫자 배열입니다. + + + + This is an array containing only the words "hello" and "world". + "hello"와 "world"라는 단어만 포함된 배열입니다. + + + + This is an array initialized by index and containing the even numbers from 0 to 2000. + 0에서 2000까지의 짝수가 포함되고 인덱스로 초기화된 배열입니다. + + + + Sub-arrays are extracted using slicing notation. + 하위 배열은 조각화 표기법을 사용하여 추출됩니다. + + + + You can loop over arrays and lists using 'for' loops. + 'for' 루프를 사용하여 배열 및 목록을 반복할 수 있습니다. + + + + You can modify the contents of an an array element by using the left arrow assignment operator. + 왼쪽 화살표 대입 연산자를 사용하여 배열 요소의 내용을 수정할 수 있습니다. + + + + To learn more about this operator, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/values/index#mutable-variables + 이 연산자에 대해 자세히 알아보려면 다음을 참조하세요. https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/values/index#mutable-variables + + + + You can transform arrays using 'Array.map' and other functional programming operations. + 'Array'map' 및 기타 함수 프로그래밍 연산을 사용하여 배열을 변환할 수 있습니다. + + + + The following calculates the sum of the lengths of the words that start with 'h'. + 다음은 'h'로 시작하는 단어 길이의 합을 계산합니다. + + + + Sequences are a logical series of elements, all of the same type. These are a more general type than Lists and Arrays. + 시퀀스는 모두 형식이 같은 요소가 논리적으로 연속되는 것입니다. 목록 및 배열보다 일반적인 형식입니다. + + + + Sequences are evaluated on-demand and are re-evaluated each time they are iterated. + 시퀀스는 요청 시 계산되며 반복될 때마다 다시 계산됩니다. + + + + An F# sequence is an alias for a .NET System.Collections.Generic.IEnumerable<'T>. + F# 시퀀스는 .NET System.Collections.Generic.IEnumerable<'T>의 별칭입니다. + + + + Sequence processing functions can be applied to Lists and Arrays as well. + 시퀀스 처리 함수는 리스트와 배열 모두에 적용할 수 있습니다. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/sequences + 자세히 알아보려면 다음을 참조하세요. https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/sequences + + + + This is the empty sequence. + 빈 시퀀스입니다. + + + + This a sequence of values. + 시퀀스 값입니다. + + + + This is an on-demand sequence from 1 to 1000. + 1에서 1000까지의 요청 시 시퀀스입니다. + + + + This is a sequence producing the words "hello" and "world" + "hello"와 "world"라는 단어를 생성하는 시퀀스입니다. + + + + This sequence producing the even numbers up to 2000. + 2000까지의 짝수를 생성하는 시퀀스입니다. + + + + This is an infinite sequence which is a random walk. + 임의 행로인 무한 시퀀스입니다. + + + + This example uses yield! to return each element of a subsequence. + 이 예에서는 yield!를 사용하여 하위 시퀀스의 각 요소를 반환합니다. + + + + This example shows the first 100 elements of the random walk. + 이 예에서는 임의 행로의 처음 100개 요소를 보여 줍니다. + + + + Recursive functions can call themselves. In F#, functions are only recursive + 재귀 함수는 자신을 호출할 수 있습니다. F#에서 함수는 + + + + when declared using 'let rec'. + 'let rec'을 사용하여 선언할 때에만 반복됩니다. + + + + Recursion is the preferred way to process sequences or collections in F#. + 재귀는 F#에서 시퀀스 또는 컬렉션을 처리하는 기본 방법입니다. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/index#recursive-functions + 자세히 알아보려면 https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/index#recursive-functions를 참조하세요. + + + + This example shows a recursive function that computes the factorial of an + 이 예에서는 정수의 계승을 계산하는 재귀 함수를 보여 줍니다. + + + + integer. It uses 'let rec' to define a recursive function. + 'let rec'를 사용하여 재귀 함수를 정의합니다. + + + + Computes the greatest common factor of two integers. + 두 정수의 최대 공약수를 계산합니다. + + + + Since all of the recursive calls are tail calls, + 모든 재귀 호출은 마무리 호출이므로, + + + + the compiler will turn the function into a loop, + 컴파일러에서는 함수를 루프로 전환합니다. + + + + which improves performance and reduces memory consumption. + 루프는 성능을 향상시키고 메모리 소비량을 줄여 줍니다. + + + + This example computes the sum of a list of integers using recursion. + 이 예제에서는 재귀를 사용하여 정수 목록의 합을 계산합니다. + + + + This makes 'sumList' tail recursive, using a helper function with a result accumulator. + 도우미 함수와 결과 누적기를 사용하여 'sumList'를 마무리 재귀 함수로 만듭니다. + + + + This invokes the tail recursive helper function, providing '0' as a seed accumulator. + '0'을 시드 누적기로 제공하여 마무리 재귀 도우미 함수를 호출합니다. + + + + An approach like this is common in F#. + F#에서 이와 같은 접근 방식이 일반적입니다. + + + + Records are an aggregate of named values, with optional members (such as methods). + 레코드는 명명된 값의 집계이며, 필요에 따라 메서드와 같은 선택적 멤버도 포함합니다. + + + + They are immutable and have structural equality semantics. + 레코드는 변경 불가능하며 구조적으로 같음 의미 체계가 있습니다. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/records + 자세히 알아보려면 다음을 참조하세요. https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/records + + + + This example shows how to define a new record type. + 이 예에서는 새 레코드 형식을 정의하는 방법을 보여 줍니다. + + + + This example shows how to instantiate a record type. + 이 예제에서는 레코드 형식을 인스턴스화하는 방법을 보여 줍니다. + + + + You can also do this on the same line with ';' separators. + 동일한 줄에서 ';' 구분 기호를 사용하여 이 작업을 수행할 수도 있습니다. + + + + This example shows how to use "copy-and-update" on record values. It creates + 이 예에서는 레코드 값에 "copy-and-update"를 사용하는 방법을 보여 줍니다. + + + + a new record value that is a copy of contact1, but has different values for + contact1의 복사본인 새 레코드 값을 만들지만 + + + + the 'Phone' and 'Verified' fields. + 'Phone'과 'Verified' 필드의 값이 다릅니다. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/copy-and-update-record-expressions + 자세히 알아보려면 다음을 참조하세요. https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/copy-and-update-record-expressions + + + + This example shows how to write a function that processes a record value. + 이 예에서는 레코드 값을 처리하는 함수를 작성하는 방법을 보여 줍니다. + + + + It converts a 'ContactCard' object to a string. + 'ContactCard' 개체를 문자열로 변환합니다. + + + + This is an example of a Record with a member. + 멤버가 하나인 레코드의 예제입니다. + + + + Members can implement object-oriented members. + 멤버는 개체 지향 멤버를 구현할 수 있습니다. + + + + Members are accessed via the '.' operator on an instantiated type. + 인스턴스화된 형식에서 '.' 연산자를 통해 멤버에 액세스합니다. + + + + Records can also be represented as structs via the 'Struct' attribute. + 'Struct' 특성을 통해 레코드를 구조체로 나타낼 수도 있습니다. + + + + This is helpful in situations where the performance of structs outweighs + 구조체 성능이 참조 형식의 유연성보다 중요한 경우에 + + + + the flexibility of reference types. + 유용합니다. + + + + Discriminated Unions (DU for short) are values which could be a number of named forms or cases. + 구분된 공용 구조체(줄여서 DU)는 여러 명명된 폼 또는 케이스일 수 있는 값입니다. + + + + Data stored in DUs can be one of several distinct values. + DU에 저장된 데이터는 여러 고유한 값 중 하나일 수 있습니다. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/discriminated-unions + 자세히 알아보려면 다음을 참조하세요. https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/discriminated-unions + + + + The following represents the suit of a playing card. + 다음은 플레인 카드의 짝패를 나타냅니다. + + + + A Disciminated Union can also be used to represent the rank of a playing card. + 구분된 공용 구조체를 사용하여 플레잉 카드의 순위를 나타낼 수도 있습니다. + + + + Represents the rank of cards 2 .. 10 + 카드 2부터 10까지의 순위를 나타냅니다. + + + + Discriminated Unions can also implement object-oriented members. + 구분된 공용 구조체는 개체 지향 멤버도 구현할 수 있습니다. + + + + This is a record type that combines a Suit and a Rank. + 짝패와 순위를 조합하는 레코드 형식입니다. + + + + It's common to use both Records and Disciminated Unions when representing data. + 일반적으로 레코드와 구분된 공용 구조체를 모두 사용하여 데이터를 나타냅니다. + + + + This computes a list representing all the cards in the deck. + 데크에 있는 모든 카드를 나타내는 목록을 계산합니다. + + + + This example converts a 'Card' object to a string. + 이 예에서는 'Card' 개체를 문자열로 변환합니다. + + + + This example prints all the cards in a playing deck. + 이 예에서는 플레잉 데크의 모든 카드를 인쇄합니다. + + + + Single-case DUs are often used for domain modeling. This can buy you extra type safety + 단일 케이스 DU를 도메인 모델링에 사용하는 경우가 많습니다. 그러면 문자열 및 정수와 같은 + + + + over primitive types such as strings and ints. + 기본 형식보다 형식 안전성을 추가로 얻을 수 있습니다. + + + + Single-case DUs cannot be implicitly converted to or from the type they wrap. + 단일 케이스 DU를 래핑하는 형식으로 암시적으로 변환하거나 반대로 변환할 수 없습니다. + + + + For example, a function which takes in an Address cannot accept a string as that input, + 예를 들어 주소에서 사용하는 함수는 문자열을 입력으로 사용할 수 없으며, + + + + or vive/versa. + 그 반대도 마찬가지입니다. + + + + You can easily instantiate a single-case DU as follows. + 다음과 같이 단일 케이스 DU를 쉽게 인스턴스화할 수 있습니다. + + + + When you need the value, you can unwrap the underlying value with a simple function. + 값이 필요하면 간단한 함수로 내부 값을 래핑 해제할 수 있습니다. + + + + Printing single-case DUs is simple with unwrapping functions. + 래핑 해제 함수로 단일 케이스 DU를 간단히 인쇄할 수 있습니다. + + + + Disciminated Unions also support recursive definitions. + 구분된 공용 구조체는 재귀 정의도 지원합니다. + + + + This represents a Binary Search Tree, with one case being the Empty tree, + 이진 검색 트리를 나타냅니다. 여기서 한 케이스는 빈 트리이고 + + + + and the other being a Node with a value and two subtrees. + 다른 케이스는 값과 두 개의 하위 트리를 포함하는 노드입니다. + + + + Check if an item exists in the binary search tree. + 이진 검색 트리에 항목이 있는지 확인합니다. + + + + Searches recursively using Pattern Matching. Returns true if it exists; otherwise, false. + 패턴 일치를 사용하여 재귀적으로 검색합니다. 있으면 true를 반환하고 그렇지 않은 경우 false를 반환합니다. + + + + Check the left subtree. + 왼쪽 하위 트리를 확인합니다. + + + + Check the right subtree. + 오른쪽 하위 트리를 확인합니다. + + + + Inserts an item in the Binary Search Tree. + 이진 검색 트리에 항목을 삽입합니다. + + + + Finds the place to insert recursively using Pattern Matching, then inserts a new node. + 패턴 일치를 사용하여 재귀적으로 삽입할 위치를 찾은 다음 새 노드를 삽입합니다. + + + + If the item is already present, it does not insert anything. + 항목이 이미 있으면 아무 항목도 삽입하지 않습니다. + + + + No need to insert, it already exists; return the node. + 이미 항목이 있으므로 삽입할 필요가 없습니다. 노드를 반환합니다. + + + + Call into left subtree. + 왼쪽 하위 트리를 호출합니다. + + + + Call into right subtree. + 오른쪽 하위 트리를 호출합니다. + + + + Discriminated Unions can also be represented as structs via the 'Struct' attribute. + 'Struct' 특성을 통해 구분된 공용 구조체를 구조체로 나타낼 수도 있습니다. + + + + This is helpful in situations where the performance of structs outweighs + 구조체 성능이 참조 형식의 유연성보다 중요한 경우에 + + + + the flexibility of reference types. + 유용합니다. + + + + However, there are two important things to know when doing this: + 하지만 이 작업을 수행할 때는 다음 두 가지 중요한 사항을 알고 있어야 합니다. + + + + 1. A struct DU cannot be recursively-defined. + 1. 구조체 DU는 재귀적으로 정의할 수 없습니다. + + + + 2. A struct DU must have unique names for each of its cases. + 2. 각 케이스마다 구조체 DU의 이름이 고유해야 합니다. + + + + Pattern Matching is a feature of F# that allows you to utilize Patterns, + 패턴 일치는 패턴을 활용할 수 있는 F#의 기능이며, + + + + which are a way to compare data with a logical structure or structures, + 패턴을 사용하면 데이터를 논리 구조와 비교하거나, + + + + decompose data into constituent parts, or extract information from data in various ways. + 데이터를 구성 부분으로 분해하거나, 다양한 방법으로 데이터에서 정보를 추출할 수 있습니다. + + + + You can then dispatch on the "shape" of a pattern via Pattern Matching. + 그런 다음 패턴 일치를 사용하여 패턴의 "모양"을 디스패치할 수 있습니다. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/pattern-matching + 자세히 알아보려면 다음을 참조하세요. https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/pattern-matching + + + + A record for a person's first and last name + 사람의 성과 이름에 대한 레코드입니다. + + + + A Discriminated Union of 3 different kinds of employees + 세 가지 다른 직원 유형이 있는 구분된 공용 구조체 + + + + Count everyone underneath the employee in the management hierarchy, + 관리 계층 구조에서 이 직원을 포함하여 이 아래에 있는 모든 직원의 수를 + + + + including the employee. + 셉니다. + + + + Find all managers/executives named "Dave" who do not have any reports. + 이름이 "Dave"이고 부하직원이 없는 모든 관리자/간부를 찾습니다. + + + + This uses the 'function' shorthand to as a lambda expression. + 여기서는 'function' 약어를 람다 식으로 사용합니다. + + + + [] matches an empty list. + []는 빈 목록과 일치합니다. + + + + '_' is a wildcard pattern that matches anything. + '_'는 모든 항목과 일치하는 와일드카드 패턴입니다. + + + + This handles the "or else" case. + 이 와일드카드 패턴은 "or else" 케이스를 처리합니다. + + + + You can also use the shorthand function construct for pattern matching, + 패턴 일치에 약어 형식 함수 구문을 사용할 수도 있습니다. + + + + which is useful when you're writing functions which make use of Partial Application. + 이 구문은 부분 응용 프로그램을 사용하는 함수를 작성할 때 유용합니다. + + + + Define some more functions which parse with the helper function. + 도우미 함수를 사용하여 구문 분석하는 함수를 더 정의합니다. + + + + Active Patterns are another powerful construct to use with pattern matching. + 활성 패턴은 패턴 일치와 함께 사용하면 유용한 다른 구문입니다. + + + + They allow you to partition input data into custom forms, decomposing them at the pattern match call site. + 활성 패턴을 사용하면 입력 데이터를 사용자 지정 폼으로 분할하고, 패턴 일치 호출 사이트에서 이 폼을 분해할 수 있습니다. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/active-patterns + 자세히 알아보려면 다음을 참조하세요. https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/active-patterns + + + + Pattern Matching via 'function' keyword and Active Patterns often looks like this. + 'function' 키워드 및 활성 패턴을 통한 패턴 일치는 이처럼 보이는 경우가 많습니다. + + + + Call the printer with some different values to parse. + 구문 분석할 다른 값을 사용하여 프린터를 호출합니다. + + + + Option values are any kind of value tagged with either 'Some' or 'None'. + 옵션 값에는 'Some' 또는 'None'으로 태그 처리된 모든 종류의 값을 사용할 수 있습니다. + + + + They are used extensively in F# code to represent the cases where many other + F# 코드에서 광범위하게 사용되어 다른 언어에서는 null 참조를 사용하는 케이스를 + + + + languages would use null references. + 나타냅니다. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/options + 자세히 알아보려면 다음을 참조하세요. https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/options + + + + First, define a zipcode defined via Single-case Discriminated Union. + 먼저 단일 케이스 구분된 공용 구조체를 통해 정의된 우편 번호를 정의합니다. + + + + Next, define a type where the ZipCode is optional. + 다음으로 ZipCode가 선택 사항인 형식을 정의합니다. + + + + Next, define an interface type that represents an object to compute the shipping zone for the customer's zip code, + 그리고 고객의 우편 번호에 대한 배송 영역을 계산하기 위해 개체를 나타내는 인터페이스 형식을 정의합니다. + + + + given implementations for the 'getState' and 'getShippingZone' abstract methods. + 고객의 우편 번호에 대한 쇼핑 지역을 계산하는 추상 클래스입니다. + + + + Next, calculate a shipping zone for a customer using a calculator instance. + 다음으로 계산기 인스턴스를 사용하여 고객의 배송 영역을 계산합니다. + + + + This uses combinators in the Option module to allow a functional pipeline for + 여기서는 Option 모듈 내의 조합기를 사용하여 함수 파이프라인에서 + + + + transforming data with Optionals. + Optionals를 통해 데이터를 변환할 수 있게 합니다. + + + + Units of measure are a way to annotate primitive numeric types in a type-safe way. + 측정 단위를 사용하면 형식이 안전한 방식으로 기본 숫자 형식에 주석을 달 수 있습니다. + + + + You can then perform type-safe arithmetic on these values. + 그런 다음 이러한 값에 대해 형식이 안전한 산술 연산을 수행할 수 있습니다. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/units-of-measure + 자세히 알아보려면 다음을 참조하세요. https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/units-of-measure + + + + First, open a collection of common unit names + 먼저 일반적인 단위 이름의 컬렉션을 엽니다. + + + + Define a unitized constant + 결합된 상수 정의 + + + + Next, define a new unit type + 다음으로 새 단위 형식을 정의합니다. + + + + Conversion factor mile to meter. + 마일 대 미터 변환 비율입니다. + + + + Define a unitized constant + 결합된 상수 정의 + + + + Compute metric-system constant + 미터 단위 상수를 계산합니다. + + + + Values using Units of Measure can be used just like the primitive numeric type for things like printing. + 측정 단위를 사용하는 값은 인쇄와 같은 작업에 기본 숫자 형식처럼 사용할 수 있습니다. + + + + Classes are a way of defining new object types in F#, and support standard Object-oriented constructs. + 클래스는 F#에서 새 개체 형식을 정의하는 방법이며 표준 개체 지향 구문을 지원합니다. + + + + They can have a variety of members (methods, properties, events, etc.) + 클래스는 다양한 멤버(메서드, 속성, 이벤트 등)를 포함할 수 있습니다. + + + + To learn more about Classes, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/classes + 클래스에 대해 자세히 알아보려면 다음을 참조하세요. https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/classes + + + + To learn more about Members, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/members + 멤버에 대해 자세히 알아보려면 다음을 참조하세요. https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/members + + + + A simple two-dimensional Vector class. + 단순한 2차원 벡터 클래스입니다. + + + + The class's constructor is on the first line, + 클래스의 생성자는 첫 줄에 있고, + + + + and takes two arguments: dx and dy, both of type 'double'. + 'double' 형식의 두 인수 dx 및 dy를 사용합니다. + + + + This internal field stores the length of the vector, computed when the + 이 내부 필드는 개체가 생성될 때 계산된 벡터 길이를 + + + + object is constructed + 저장합니다. + + + + 'this' specifies a name for the object's self identifier. + 'this'는 개체 자체의 식별자에 대한 이름을 지정합니다. + + + + In instance methods, it must appear before the member name. + 인스턴스 메서드에서는 멤버 이름 앞에 와야 합니다. + + + + This member is a method. The previous members were properties. + 이 멤버는 메서드입니다. 이전 멤버는 속성이었습니다. + + + + This is how you instantiate the Vector2D class. + Vector2D 클래스를 인스턴스화하는 방법은 다음과 같습니다. + + + + Get a new scaled vector object, without modifying the original object. + 원래 개체를 수정하지 않고 비율이 조정된 새 벡터 개체를 가져옵니다. + + + + Generic classes allow types to be defined with respect to a set of type parameters. + 제네릭 클래스를 통해 형식 매개변수 집합에 대해 형식을 정의할 수 있습니다. + + + + In the following, 'T is the type parameter for the class. + 다음에서 'T는 클래스의 형식 매개 변수입니다. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/generics/ + 자세히 알아보려면 다음을 참조하세요. https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/generics/ + + + + This internal field store the states in a list. + 이 내부 필드는 목록에 상태를 저장합니다. + + + + Add a new element to the list of states. + 상태 리스트에 새 요소를 추가합니다. + + + + use the '<-' operator to mutate the value. + '<-' 연산자를 사용하여 값을 변경합니다. + + + + Get the entire list of historical states. + 기록 상태의 전체 목록을 가져옵니다. + + + + Get the latest state. + 최신 상태를 가져옵니다. + + + + An 'int' instance of the state tracker class. Note that the type parameter is inferred. + 상태 추적기 클래스의 'int' 인스턴스입니다. 형식 매개 변수는 유추됩니다. + + + + Add a state + 상태를 추가합니다. + + + + Interfaces are object types with only 'abstract' members. + 인터페이스는 '추상' 멤버만 있는 개체 형식입니다. + + + + Object types and object expressions can implement interfaces. + 개체 형식 및 개체 식은 인터페이스를 구현할 수 있습니다. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/interfaces + 자세히 알아보려면 다음을 참조하세요. https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/interfaces + + + + This is a type that implements IDisposable. + IDisposable를 구현하는 형식입니다. + + + + This is the implementation of IDisposable members. + IDisposable 멤버의 구현입니다. + + + + This is an object that implements IDisposable via an Object Expression + 개체 식을 통해 IDisposable을 구현하는 개체입니다. + + + + Unlike other languages such as C# or Java, a new type definition is not needed + C# 또는 Java와 같은 다른 언어와 달리 인터페이스를 구현하기 위해 새 형식 정의가 + + + + to implement an interface. + 필요하지 않습니다. + + + + The FSharp.Core library defines a range of parallel processing functions. Here + FSharp.Core 라이브러리는 병렬 처리 함수 범위를 정의합니다. + + + + you use some functions for parallel processing over arrays. + 여기에서 배열에 대해 병렬 처리 함수를 사용합니다. + + + + To learn more, see: https://msdn.microsoft.com/en-us/visualfsharpdocs/conceptual/array.parallel-module-%5Bfsharp%5D + 자세히 알아보려면 다음을 참조하세요. https://msdn.microsoft.com/en-us/visualfsharpdocs/conceptual/array.parallel-module-%5Bfsharp%5D + + + + First, an array of inputs. + 먼저 입력 배열입니다. + + + + Next, define a functions that does some CPU intensive computation. + 다음으로 CPU를 많이 사용하는 계산을 수행하는 함수를 정의합니다. + + + + Next, do a parallel map over a large input array. + 다음으로 큰 입력 배열에 대해 병렬 맵을 수행합니다. + + + + Next, print the results. + 다음으로 결과를 인쇄합니다. + + + + Events are a common idiom for .NET programming, especially with WinForms or WPF applications. + 이벤트는 특히 WinForms 또는 WPF 응용 프로그램을 사용하는 .NET 프로그래밍에서 일반적으로 사용되는 말입니다. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/members/events + 자세히 알아보려면 다음을 참조하세요. https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/members/events + + + + First, create instance of Event object that consists of subscription point (event.Publish) and event trigger (event.Trigger). + 먼저 구독 지점(event.Publish)과 이벤트 트리거(event.Trigger)로 구성된 Event 개체의 인스턴스를 만듭니다. + + + + Next, add handler to the event. + 다음으로 이벤트에 처리기를 추가합니다. + + + + Next, trigger the event. + 다음으로 이벤트를 트리거합니다. + + + + Next, create an instance of Event that follows standard .NET convention: (sender, EventArgs). + 다음으로 표준 .NET 규칙(sender, EventArgs)을 따르는 Event의 인스턴스를 만듭니다. + + + + Next, add a handler for this new event. + 다음으로 이 새 이벤트에 대한 처리기를 추가합니다. + + + + Next, trigger this event (note that sender argument should be set). + 다음으로 이 이벤트를 트리거합니다(sender 인수를 설정해야 함). + + + + + \ No newline at end of file diff --git a/vsintegration/ProjectTemplates/TutorialProject/Template/xlf/Tutorial.fsx.pl.xlf b/vsintegration/ProjectTemplates/TutorialProject/Template/xlf/Tutorial.fsx.pl.xlf new file mode 100644 index 00000000000..510321d6dc7 --- /dev/null +++ b/vsintegration/ProjectTemplates/TutorialProject/Template/xlf/Tutorial.fsx.pl.xlf @@ -0,0 +1,1637 @@ + + + + + + This sample will guide you through elements of the F# language. + Ten przykład zawiera opis elementów języka F#. + + + + To execute the code in F# Interactive, highlight a section of code and press Alt-Enter or right-click + Aby wykonać kod w narzędziu F# Interactive, zaznacz sekcję kodu i naciśnij kombinację klawiszy Alt-Enter lub kliknij prawym przyciskiem myszy, + + + + and select "Execute in Interactive". You can open the F# Interactive Window from the "View" menu. + a następnie wybierz opcję „Wykonaj w trybie interaktywnym”. Okno narzędzia F# Interactive można otworzyć z menu „Widok”. + + + + For more about F#, see: + Aby uzyskać więcej informacji o języku F#, zobacz: + + + + To see this tutorial in documentation form, see: + Aby wyświetlić ten samouczek w formie dokumentacji, zobacz: + + + + To learn more about applied F# programming, use + Aby dowiedzieć się więcej o programowaniu w języku F# w praktyce, użyj + + + + To install the Visual F# Power Tools, use + Aby zainstalować narzędzia Visual F# Power Tools, użyj + + + + 'Tools' --> 'Extensions and Updates' --> `Online` and search + „Narzędzia” --> „Rozszerzenia i aktualizacje” --> „Online” i wyszukaj + + + + For additional templates to use with F#, see the 'Online Templates' in Visual Studio, + Aby uzyskać informacje o dodatkowych szablonach do użycia w języku F#, zobacz sekcję dotyczącą szablonów w trybie online w programie Visual Studio, + + + + 'New Project' --> 'Online Templates' + „Nowy projekt” --> „Szablony w trybie online” + + + + F# supports three kinds of comments: + Język F# obsługuje trzy rodzaje komentarzy: + + + + 1. Double-slash comments. These are used in most situations. + 1. Komentarze z podwójnym ukośnikiem. Są używane w większości sytuacji. + + + + 2. ML-style Block comments. These aren't used that often. + 2. Komentarze blokowe w stylu ML. Nie są używane zbyt często. + + + + 3. Triple-slash comments. These are used for documenting functions, types, and so on. + 3. Komentarze z potrójnymi ukośnikami. Są używane do dokumentowania funkcji, typów itd. + + + + They will appear as text when you hover over something which is decorated with these comments. + Będą wyświetlane jako tekst po zatrzymaniu wskaźnika myszy nad tym, do czego zostały dodane. + + + + They also support .NET-style XML comments, which allow you to generate reference documentation, + Obsługują także komentarze XML w stylu programu .NET, które pozwalają na generowanie dokumentacji referencyjnej, + + + + and they also allow editors (such as Visual Studio) to extract information from them. + a także umożliwiają edytorom (takim jak program Visual Studio) na wydobywanie z nich informacji. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/xml-documentation + Aby dowiedzieć się więcej, zobacz: https://docs.microsoft.com/pl-pl/dotnet/articles/fsharp/language-reference/xml-documentation + + + + Open namespaces using the 'open' keyword. + Otwieraj przestrzenie nazw, używając słowa kluczowego „open”. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/import-declarations-the-open-keyword + Aby dowiedzieć się więcej, zobacz: https://docs.microsoft.com/pl-pl/dotnet/articles/fsharp/language-reference/import-declarations-the-open-keyword + + + + A module is a grouping of F# code, such as values, types, and function values. + Moduł to zbiór kodu w języku F#, takiego jak wartości, typy i wartości funkcji. + + + + Grouping code in modules helps keep related code together and helps avoid name conflicts in your program. + Grupowanie kodu w modułach pomaga trzymać razem powiązany kod i unikać konfliktów nazw w programie. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/modules + Aby dowiedzieć się więcej, zobacz https://docs.microsoft.com/pl-pl/dotnet/articles/fsharp/language-reference/modules + + + + This is a sample integer. + To jest przykładowa liczba całkowita. + + + + This is a sample floating point number. + To jest przykładowa liczba zmiennoprzecinkowa. + + + + This computed a new number by some arithmetic. Numeric types are converted using + To obliczyło nową liczbę, wykonując pewne operacje arytmetyczne. Typy liczbowe są konwertowane za pomocą + + + + functions 'int', 'double' and so on. + funkcji „int”, „double” itd. + + + + This is a list of the numbers from 0 to 99. + To jest lista liczb od 0 do 99. + + + + This is a list of all tuples containing all the numbers from 0 to 99 and their squares. + To jest lista wszystkich krotek zawierających wszystkie liczby od 0 do 99 i ich kwadraty. + + + + The next line prints a list that includes tuples, using '%A' for generic printing. + Następny wiersz wyświetla listę z krotkami, używając symbolu „%A” do wyświetlania ogólnego. + + + + This is a sample integer with a type annotation + To jest przykładowa liczba całkowita z adnotacją typu + + + + Values in F# are immutable by default. They cannot be changed + Wartości w języku F# są domyślnie niezmienialne. Nie można ich modyfikować + + + + in the course of a program's execution unless explicitly marked as mutable. + w trakcie wykonywania programu, chyba że zostaną jawnie oznaczone jako zmienialne. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/values/index#why-immutable + Aby dowiedzieć się więcej, zobacz https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/values/index#why-immutable + + + + Binding a value to a name via 'let' makes it immutable. + Powiązanie wartości z nazwą za pomocą polecenia „let” sprawia, że będzie ona niezmienna. + + + + The second line of code fails to compile because 'number' is immutable and bound. + Nie można skompilować drugiego wiersza kodu, ponieważ element „number” jest niezmienny i powiązany. + + + + Re-defining 'number' to be a different value is not allowed in F#. + Ponowne definiowanie elementu „number” na inną wartość nie jest dozwolone w języku F#. + + + + A mutable binding. This is required to be able to mutate the value of 'otherNumber'. + Modyfikowalne powiązanie. Jest to wymagane w celu modyfikowania wartości elementu „otherNumber”. + + + + When mutating a value, use '<-' to assign a new value. + Podczas modyfikowania wartości użyj strzałki „<-”, aby przydzielić nową wartość. + + + + You could not use '=' here for this purpose since it is used for equality + Nie możesz w tym celu użyć tutaj znaku „=”, ponieważ jest on używany do oznaczania równości + + + + or other contexts such as 'let' or 'module' + lub innych kontekstów, np. „let” lub „module” + + + + Much of F# programming consists of defining functions that transform input data to produce + Duża część programowania w języku F# to definiowanie funkcji, które przekształcają dane wejściowe w celu utworzenia + + + + useful results. + przydatne wyniki. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/ + Aby dowiedzieć się więcej, zobacz https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/ + + + + You use 'let' to define a function. This one accepts an integer argument and returns an integer. + Polecenia „let” używa się do definiowania funkcji. To polecenie akceptuje argument w postaci liczby całkowitej i zwraca liczbę całkowitą. + + + + Parentheses are optional for function arguments, except for when you use an explicit type annotation. + Nawiasy są opcjonalne w przypadku argumentów funkcji, z wyjątkiem użycia jawnego typu adnotacji. + + + + Apply the function, naming the function return result using 'let'. + Zastosuj funkcję i nadaj jej wynikowi zwrotnemu nazwę, używając instrukcji „let”. + + + + The variable type is inferred from the function return type. + Typ zmiennej jest wywnioskowany na podstawie zwracanego typu funkcji. + + + + This line uses '%d' to print the result as an integer. This is type-safe. + Ten wiersz używa elementu „%d”, aby wydrukować wynik jako liczbę całkowitą. Jest to bezpieczne. + + + + If 'result1' were not of type 'int', then the line would fail to compile. + Jeśli element „result1” nie miałby typu „int”, kompilacja wiersza zakończyłaby się niepowodzeniem. + + + + When needed, annotate the type of a parameter name using '(argument:type)'. Parentheses are required. + W razie potrzeby adnotuj typ nazwy parametru przy użyciu polecenia „(argument:typ)”. Nawiasy są wymagane. + + + + Conditionals use if/then/elid/elif/else. + Wyrażenia warunkowe używają słów kluczowych if/then/elid/elif/else. + + + + Note that F# uses whitespace indentation-aware syntax, similar to languages like Python. + Należy zauważyć, że język F# używa składni uwzględniającej wcięcia w postaci odstępów, tak jak w przypadku języków podobnych do języka Python. + + + + This line uses '%f' to print the result as a float. As with '%d' above, this is type-safe. + Ten wiersz używa elementu „%f”, aby wydrukować wynik jako liczbę zmiennoprzecinkową. Podobnie jak w przypadku elementu „%d” powyżej jest to bezpieczne. + + + + Booleans are fundamental data types in F#. Here are some examples of Booleans and conditional logic. + Wartości logiczne są fundamentalnymi typami danych w języku F#. Oto kilka przykładów wartości logicznych i logiki warunkowej. + + + + To learn more, see: + Aby dowiedzieć się więcej, zobacz: + + + + and + oraz + + + + Booleans values are 'true' and 'false'. + Wartości logiczne przyjmują wartość „true” i „false”. + + + + Operators on booleans are 'not', '&&' and '||'. + Operatory wartości logicznych to „not”, „&&” i „||”. + + + + This line uses '%b'to print a boolean value. This is type-safe. + Ten wiersz używa elementu „%b”, aby wydrukować wartość logiczną. Jest to bezpieczne. + + + + Strings are fundamental data types in F#. Here are some examples of Strings and basic String manipulation. + Ciągi są fundamentalnymi typami danych w języku F#. Oto kilka przykładów ciągów i podstawowych manipulacji ciągami. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/strings + Aby dowiedzieć się więcej, zobacz https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/strings + + + + Strings use double quotes. + Ciągi używają cudzysłowów. + + + + Strings can also use @ to create a verbatim string literal. + W ciągach można także używać znaku @ do tworzenia dosłownych literałów ciągu. + + + + This will ignore escape characters such as '\', '\n', '\t', etc. + Spowoduje to ignorowanie znaków ucieczki, np. „\”, „\n”, „\t” itp. + + + + String literals can also use triple-quotes. + Literały ciągu mogą także używać potrójnych cudzysłowów. + + + + String concatenation is normally done with the '+' operator. + Łączenie ciągów wykonuje się zazwyczaj przy użyciu operatora „+”. + + + + This line uses '%s' to print a string value. This is type-safe. + Ten wiersz używa elementu „%s”, aby wydrukować wartość ciągu. Jest to bezpieczne. + + + + Substrings use the indexer notation. This line extracts the first 7 characters as a substring. + Podciągi używają notacji indeksatora. Ten wiersz wyodrębnia pierwsze 7 znaków w formie podciągu. + + + + Note that like many languages, Strings are zero-indexed in F#. + Należy zauważyć, że w języku F# ciągi znaków są indeksowane od zera, podobnie jak w wielu innych językach. + + + + Tuples are simple combinations of data values into a combined value. + Krotki to proste kombinacje wartości danych tworzące połączoną wartość. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/tuples + Aby dowiedzieć się więcej, zobacz https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/tuples + + + + A simple tuple of integers. + Prosta krotka liczb całkowitych. + + + + A function that swaps the order of two values in a tuple. + Funkcja zamieniająca kolejność dwóch wartości w krotce. + + + + F# Type Inference will automatically generalize the function to have a generic type, + Wnioskowanie o typie języka F# będzie automatycznie uogólniać funkcję do typu ogólnego, + + + + meaning that it will work with any type. + co oznacza, że będzie działać z dowolnym typem. + + + + A tuple consisting of an integer, a string, + Krotka składająca się z liczby całkowitej, ciągu + + + + and a double-precision floating point number. + i liczby zmiennoprzecinkowej podwójnej precyzji. + + + + A simple tuple of integers with a type annotation. + Prosta krotka składająca się z liczb całkowitych z adnotacją typu. + + + + Type annotations for tuples use the * symbol to separate elements + Adnotacje typu w krotkach korzystają z symbolu * do oddzielania elementów + + + + Tuples are normally objects, but they can also be represented as structs. + Krotki są zazwyczaj obiektami, niemniej mogą być również reprezentowane w formie struktur. + + + + These interoperate completely with structs in C# and Visual Basic.NET; however, + Całkowicie współpracują ze strukturami w języku C# i Visual Basic.NET; niemniej + + + + struct tuples are not implicitly convertable with object tuples (often called reference tuples). + krotki w formie struktur nie mogą być niejawnie konwertowane na krotki w formie obiektów (często zwane krotkami odwołań). + + + + The second line below will fail to compile because of this. Uncomment it to see what happens. + Z tego powodu nie będzie można skompilować drugiego wiersza poniżej. Usuń komentarz z tego wiersza, aby zobaczyć, co się stanie. + + + + Although you cannot implicitly convert between struct tuples and reference tuples, + Mimo że nie możesz przeprowadzać niejawnej konwersji między krotkami struktury i krotkami odwołania, + + + + you can explicitly convert via pattern matching, as demonstrated below. + możesz konwertować jawnie za pośrednictwem dopasowywania do wzorców, jak pokazano poniżej. + + + + The F# pipe operators ('|>', '<|', etc.) and F# composition operators ('>>', '<<') + Operatory potoków języka F# („|>”, „<|” itp.) oraz operatory kompozycji języka F# („>>”, „<<”) + + + + are used extensively when processing data. These operators are themselves functions + są często używane podczas przetwarzania danych. Operatory te są funkcjami + + + + which make use of Partial Application. + wykorzystującymi częściową aplikację. + + + + To learn more about these operators, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/#function-composition-and-pipelining + Aby dowiedzieć się więcej o tych operatorach, zobacz https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/#function-composition-and-pipelining + + + + To learn more about Partial Application, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/#partial-application-of-arguments + Aby dowiedzieć się więcej o częściowej aplikacji, zobacz: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/#partial-application-of-arguments + + + + Squares a value. + Podnosi wartość do potęgi drugiej. + + + + Adds 1 to a value. + Dodaje 1 do wartości. + + + + Tests if an integer value is odd via modulo. + Sprawdza, czy wartość liczby całkowitej jest nieparzysta za pomocą operacji modulo. + + + + A list of 5 numbers. More on lists later. + Lista 5 liczb. Więcej informacji na temat list znajduje się dalej. + + + + Given a list of integers, it filters out the even numbers, + W oparciu o podaną listę liczb całkowitych funkcja filtruje liczby parzyste, + + + + squares the resulting odds, and adds 1 to the squared odds. + podnosi nieparzyste wyniki do potęgi drugiej, a następnie dodaje 1 do podniesionych do potęgi drugiej liczb nieparzystych. + + + + A shorter way to write 'squareOddValuesAndAddOne' is to nest each + Krótszym sposobem zapisu „squareOddValuesAndAddOne” jest zagnieżdżenie każdego + + + + sub-result into the function calls themselves. + wyniku podrzędnego w samych wywołaniach funkcji. + + + + This makes the function much shorter, but it's difficult to see the + Dzięki temu funkcja będzie znacznie krótsza, ale trudno będzie zobaczyć + + + + order in which the data is processed. + kolejność przetwarzania danych. + + + + A preferred way to write 'squareOddValuesAndAddOne' is to use F# pipe operators. + Preferowanym sposobem zapisu funkcji „squareOddValuesAndAddOne” jest użycie operatorów potoków języka F#. + + + + This allows you to avoid creating intermediate results, but is much more readable + Dzięki temu unika się tworzenia wyników pośrednich, a całość jest znacznie bardziej czytelna + + + + than nesting function calls like 'squareOddValuesAndAddOneNested' + niż w przypadku zagnieżdżania wywołań funkcji, np. „squareOddValuesAndAddOneNested” + + + + You can shorten 'squareOddValuesAndAddOnePipeline' by moving the second `List.map` call + Możesz skrócić wywołanie „squareOddValuesAndAddOnePipeline” przez przeniesienie drugiego wywołania „List.map” + + + + into the first, using a Lambda Function. + do pierwszego, korzystając z funkcji lambda. + + + + Note that pipelines are also being used inside the lambda function. F# pipe operators + Należy zauważyć, że potoki są również używane w funkcji lambda. Operatorów potoków języka F# + + + + can be used for single values as well. This makes them very powerful for processing data. + można również użyć w przypadku pojedynczych wartości. Dzięki temu jest to bardzo zaawansowane narzędzie do przetwarzania danych. + + + + Lastly, you can eliminate the need to explicitly take 'values' in as a parameter by using '>>' + W końcu możesz wyeliminować potrzebę jawnego przyjmowania elementu „values” jako parametru, używając wyrażenia „>>”, + + + + to compose the two core operations: filtering out even numbers, then squaring and adding one. + aby zredagować dwie kluczowe operacje: odfiltrowywanie liczb parzystych, a następnie podnoszenie do potęgi drugiej i dodawanie jedynki. + + + + Likewise, the 'fun x -> ...' bit of the lambda expression is also not needed, because 'x' is simply + Podobnie fragment „fun x -> ...” wyrażenia lambda nie jest wymagany, ponieważ wartość „x” jest po prostu + + + + being defined in that scope so that it can be passed to a functional pipeline. Thus, '>>' can be used + definiowana w tym zakresie w celu przekazania do potoku funkcyjnego. Dlatego można również użyć wyrażenia „>>” + + + + there as well. + w tym miejscu. + + + + The result of 'squareOddValuesAndAddOneComposition' is itself another function which takes a + Wynikiem funkcji „squareOddValuesAndAddOneComposition” jest inna funkcja, która przyjmuje + + + + list of integers as its input. If you execute 'squareOddValuesAndAddOneComposition' with a list + listę liczb całkowitych w formie danych wejściowych. Jeśli wykonasz funkcję „squareOddValuesAndAddOneComposition” z listą + + + + of integers, you'll notice that it produces the same results as previous functions. + liczb całkowitych, funkcja będzie podawać takie same wyniki jak poprzednie funkcje. + + + + This is using what is known as function composition. This is possible because functions in F# + Używa się tu kompozycji funkcji. Jest to możliwe, ponieważ funkcje w języku F# + + + + use Partial Application and the input and output types of each data processing operation match + używają częściowej aplikacji, a typy danych wejściowych i wyjściowych dla każdej operacji przetwarzania danych są dopasowane do + + + + the signatures of the functions we're using. + podpisów funkcji, których używamy. + + + + Lists are ordered, immutable, singly-linked lists. They are eager in their evaluation. + Listy są uporządkowane, niezmienne i jednokierunkowe. Są wartościowane przed przetworzeniem. + + + + This module shows various ways to generate lists and process lists with some functions + Ten moduł pokazuje różne sposoby generowania list i ich przetwarzania przy użyciu niektórych funkcji + + + + in the 'List' module in the F# Core Library. + w module „Lista” w bibliotece podstawowej języka F#. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/lists + Aby dowiedzieć się więcej, zobacz: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/lists + + + + Lists are defined using [ ... ]. This is an empty list. + Listy definiuje się za pomocą zapisu [ ... ]. To jest pusta lista. + + + + This is a list with 3 elements. ';' is used to separate elements on the same line. + Jest to lista z trzema elementami. Znak „;” oddziela elementy w tym samym wierszu. + + + + You can also separate elements by placing them on their own lines. + Możesz również oddzielić elementy przez umieszczenie ich w osobnych wierszach. + + + + This is a list of integers from 1 to 1000 + To jest lista liczb całkowitych z zakresu od 1 do 1000 + + + + Lists can also be generated by computations. This is a list containing + Listy można także generować za pomocą obliczeń. To jest lista zawierająca + + + + all the days of the year. + wszystkie dni roku. + + + + Print the first 5 elements of 'daysList' using 'List.take'. + Wydrukuj pięć pierwszych elementów listy „daysList” przy użyciu wyrażenia „List.take”. + + + + Computations can include conditionals. This is a list containing the tuples + Obliczenia mogą obejmować wyrażenia warunkowe. To jest lista zawierająca krotki + + + + which are the coordinates of the black squares on a chess board. + które są współrzędnymi czarnych kwadratów na szachownicy. + + + + Lists can be transformed using 'List.map' and other functional programming combinators. + Listy można przekształcać za pomocą elementu „List.map” i innych kombinatorów programowania funkcjonalnego. + + + + This definition produces a new list by squaring the numbers in numberList, using the pipeline + Ta definicja umożliwia utworzenie nowej listy przez podniesienie do kwadratu elementów na liście numberList za pomocą potoku + + + + operator to pass an argument to List.map. + operatora, aby przekazać argument do elementu List.map. + + + + There are many other list combinations. The following computes the sum of the squares of the + Istnieje wiele innych kombinacji listy. Następujący kod oblicza sumę kwadratów + + + + numbers divisible by 3. + liczby podzielne przez 3. + + + + Arrays are fixed-size, mutable collections of elements of the same type. + Tablice to zmienialne kolekcje o stałym rozmiarze, w których zawierają się elementy tego samego typu. + + + + Although they are similar to Lists (they support enumeration and have similar combinators for data processing), + Chociaż są podobne do list (obsługują wyliczenia i mają podobne kombinatory przetwarzania danych), + + + + they are generally faster and support fast random access. This comes at the cost of being less safe by being mutable. + ogólnie są szybsze i obsługują szybki dostęp losowy. Niemniej oznacza to mniejsze bezpieczeństwo związane z możliwością ich modyfikacji. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/arrays + Aby dowiedzieć się więcej, zobacz https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/arrays + + + + This is The empty array. Note that the syntax is similar to that of Lists, but uses `[| ... |]` instead. + To jest pusta tablica. Należy zauważyć, że składnia jest podobna do składni list, ale tutaj używa się zapisu „[| ... |]”. + + + + Arrays are specified using the same range of constructs as lists. + Tablice określa się za pomocą tego samego zestawu konstrukcji co listy. + + + + This is an array of numbers from 1 to 1000. + To jest tablica liczb z zakresu od 1 do 1000. + + + + This is an array containing only the words "hello" and "world". + To jest tablica zawierająca tylko słowa „hello” i „world”. + + + + This is an array initialized by index and containing the even numbers from 0 to 2000. + To jest tablica zainicjowana za pomocą indeksu i zawierająca liczby parzyste z zakresu od 0 do 2000. + + + + Sub-arrays are extracted using slicing notation. + Tablice podrzędne wyodrębnia się za pomocą notacji wycinania. + + + + You can loop over arrays and lists using 'for' loops. + Możesz zapętlić tablice i listy przy użyciu pętli „for”. + + + + You can modify the contents of an an array element by using the left arrow assignment operator. + Możesz zmodyfikować zawartość elementu tablicy za pomocą operatora przypisania „strzałka w lewo”. + + + + To learn more about this operator, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/values/index#mutable-variables + Aby dowiedzieć się więcej o tym operatorze, zobacz https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/values/index#mutable-variables + + + + You can transform arrays using 'Array.map' and other functional programming operations. + Możesz przekształcić tablice za pomocą operacji „Array.map” i innych operacji programowania funkcjonalnego. + + + + The following calculates the sum of the lengths of the words that start with 'h'. + Następujący kod oblicza sumę długości słów zaczynających się od litery „h”. + + + + Sequences are a logical series of elements, all of the same type. These are a more general type than Lists and Arrays. + Sekwencje są logicznymi seriami elementów tego samego typu. Jest to typ bardziej ogólny niż listy i tablice. + + + + Sequences are evaluated on-demand and are re-evaluated each time they are iterated. + Sekwencje są sprawdzane na żądanie, a ich ponowne sprawdzenie następuje za każdym razem, gdy są one iterowane. + + + + An F# sequence is an alias for a .NET System.Collections.Generic.IEnumerable<'T>. + Sekwencja języka F# jest aliasem dla elementu .NET System.Collections.Generic.IEnumerable<'T>. + + + + Sequence processing functions can be applied to Lists and Arrays as well. + Funkcje przetwarzania sekwencji można także zastosować dla list i tablic. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/sequences + Aby dowiedzieć się więcej, zobacz https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/sequences + + + + This is the empty sequence. + To jest pusta sekwencja. + + + + This a sequence of values. + To jest sekwencja wartości. + + + + This is an on-demand sequence from 1 to 1000. + To jest sekwencja na żądanie zawierająca liczby od 1 do 1000. + + + + This is a sequence producing the words "hello" and "world" + To jest sekwencja generująca słowa „hello” i „world” + + + + This sequence producing the even numbers up to 2000. + Ta sekwencja generuje numery parzyste nie większe niż 2000. + + + + This is an infinite sequence which is a random walk. + To jest nieskończona sekwencja stanowiąca losowe przechodzenie. + + + + This example uses yield! to return each element of a subsequence. + W tym przykładzie użyto instrukcji yield! do zwrócenia każdego elementu sekwencji podrzędnej. + + + + This example shows the first 100 elements of the random walk. + Ten przykład przedstawia pierwszych 100 elementów losowego przechodzenia. + + + + Recursive functions can call themselves. In F#, functions are only recursive + Funkcje rekursywne mogą wywoływać same siebie. W języku F# funkcje to jedyne rekursywne + + + + when declared using 'let rec'. + w przypadku deklarowania przy użyciu wyrażenia „let rec”. + + + + Recursion is the preferred way to process sequences or collections in F#. + Rekursja jest preferowanym sposobem przetwarzania sekwencji lub kolekcji w języku F#. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/index#recursive-functions + Aby dowiedzieć się więcej, zobacz https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/index#recursive-functions + + + + This example shows a recursive function that computes the factorial of an + Ten przykład przedstawia funkcję rekursywną, która oblicza silnię + + + + integer. It uses 'let rec' to define a recursive function. + liczba całkowita. Używa deklaratora „let rec” do zdefiniowania funkcji rekursywnej. + + + + Computes the greatest common factor of two integers. + Oblicza największy wspólny dzielnik dwóch liczb całkowitych. + + + + Since all of the recursive calls are tail calls, + Jako że wszystkie wywołania rekurencyjne są wywołaniami ogonowymi, + + + + the compiler will turn the function into a loop, + kompilator zamieni funkcję w pętlę, + + + + which improves performance and reduces memory consumption. + która umożliwi zwiększenie wydajności i zmniejszenie zużycia pamięci. + + + + This example computes the sum of a list of integers using recursion. + Ten przykład oblicza sumę listy liczb całkowitych przy użyciu rekursji. + + + + This makes 'sumList' tail recursive, using a helper function with a result accumulator. + Operacja zamieni listę „sumList” w listę z rekursją ogonową przy użyciu funkcji pomocniczej z akumulatorem wyników. + + + + This invokes the tail recursive helper function, providing '0' as a seed accumulator. + Spowoduje to wywołanie funkcji pomocniczej z rekursją ogonową, z wartością „0” jako akumulatorem początkowym. + + + + An approach like this is common in F#. + Takie podejście jest typowe dla języka F#. + + + + Records are an aggregate of named values, with optional members (such as methods). + Rekordy są agregacjami nazwanych wartości z opcjonalnymi elementami członkowskimi (np. metodami). + + + + They are immutable and have structural equality semantics. + Są niezmienne i mają semantykę równości strukturalnej. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/records + Aby dowiedzieć się więcej, zobacz https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/records + + + + This example shows how to define a new record type. + Ten przykład przedstawia sposób definiowania nowego typu rekordu. + + + + This example shows how to instantiate a record type. + W tym przykładzie pokazano sposób tworzenia wystąpienia typu rekordu. + + + + You can also do this on the same line with ';' separators. + Możesz to również zrobić w tym samym wierszu, korzystając z separatorów „;”. + + + + This example shows how to use "copy-and-update" on record values. It creates + Ten przykład przedstawia sposób użycia operacji „kopiuj i aktualizuj” na wartościach rekordu. Tworzy + + + + a new record value that is a copy of contact1, but has different values for + nową wartość rekordu, która jest kopią elementu contact1, lecz ma inne wartości dla + + + + the 'Phone' and 'Verified' fields. + pola „Phone” i „Verified”. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/copy-and-update-record-expressions + Aby dowiedzieć się więcej, zobacz https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/copy-and-update-record-expressions + + + + This example shows how to write a function that processes a record value. + Ten przykład przedstawia, jak napisać funkcję przetwarzającą wartość rekordu. + + + + It converts a 'ContactCard' object to a string. + Konwertuje obiekt „ContactCard” na ciąg. + + + + This is an example of a Record with a member. + Jest to przykład rekordu z elementem członkowskim. + + + + Members can implement object-oriented members. + Elementy członkowskie mogą implementować elementy członkowskie zorientowane obiektowo. + + + + Members are accessed via the '.' operator on an instantiated type. + Do elementów członkowskich uzyskuje się dostęp za pośrednictwem operatora „.” w typie skonkretyzowanym. + + + + Records can also be represented as structs via the 'Struct' attribute. + Rekordy można również reprezentować jako struktury za pośrednictwem atrybutu „Struct”. + + + + This is helpful in situations where the performance of structs outweighs + Jest to przydatne w sytuacjach, w których wydajność struktur przewyższa + + + + the flexibility of reference types. + elastyczność typów odwołań. + + + + Discriminated Unions (DU for short) are values which could be a number of named forms or cases. + Unie rozłączne (DU, Discriminated Union) są wartościami, które mogą być liczbą nazwanych formularzy lub przypadków. + + + + Data stored in DUs can be one of several distinct values. + Dane przechowywane w uniach rozłącznych mogą mieć jedną z kilku różnych wartości. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/discriminated-unions + Aby dowiedzieć się więcej, zobacz https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/discriminated-unions + + + + The following represents the suit of a playing card. + Następująca wartość reprezentuje kolor karty do gry. + + + + A Disciminated Union can also be used to represent the rank of a playing card. + Unii rozłącznej można również użyć do reprezentowania wartości karty do gry. + + + + Represents the rank of cards 2 .. 10 + Reprezentuje wartości kart 2 .. 10 + + + + Discriminated Unions can also implement object-oriented members. + Unie rozłączne mogą również implementować elementy członkowskie zorientowane obiektowo. + + + + This is a record type that combines a Suit and a Rank. + To jest typ rekordu łączący kolor i wysokość. + + + + It's common to use both Records and Disciminated Unions when representing data. + Często używa się rekordów i unii rozłącznych w przypadku reprezentowania danych. + + + + This computes a list representing all the cards in the deck. + Operacja oblicza listę reprezentującą wszystkie karty w talii. + + + + This example converts a 'Card' object to a string. + Ten przykład umożliwia przekonwertowanie elementu „Card” na ciąg. + + + + This example prints all the cards in a playing deck. + Ten przykład umożliwia wyświetlenie wszystkich kart w talii. + + + + Single-case DUs are often used for domain modeling. This can buy you extra type safety + Unie rozłączne o pojedynczych przypadkach są często używane podczas modelowania domeny. Może to zapewnić większe bezpieczeństwo typów + + + + over primitive types such as strings and ints. + niż typy pierwotne, np. ciągi i liczby całkowite. + + + + Single-case DUs cannot be implicitly converted to or from the type they wrap. + Unie rozłączne o pojedynczych przypadkach nie mogą być niejawnie konwertowane do lub z typu przez nich opakowywanego. + + + + For example, a function which takes in an Address cannot accept a string as that input, + Przykładowo funkcja przyjmująca adres nie może zaakceptować ciągu jako danych wejściowych + + + + or vive/versa. + i na odwrót. + + + + You can easily instantiate a single-case DU as follows. + Możesz z łatwością utworzyć wystąpienie dla unii rozłącznej o pojedynczym przypadku w następujący sposób. + + + + When you need the value, you can unwrap the underlying value with a simple function. + Jeśli potrzebujesz wartości, możesz cofnąć opakowywanie wartości bazowej za pomocą prostej funkcji. + + + + Printing single-case DUs is simple with unwrapping functions. + Drukowanie unii rozłącznych o pojedynczych przypadkach jest proste z funkcjami cofającymi opakowywanie. + + + + Disciminated Unions also support recursive definitions. + Unie rozłączne obsługują również definicje rekursywne. + + + + This represents a Binary Search Tree, with one case being the Empty tree, + Reprezentuje to binarne drzewo wyszukiwania, gdzie jeden przypadek jest pustym drzewem, + + + + and the other being a Node with a value and two subtrees. + a drugi węzłem z wartością i dwoma poddrzewami. + + + + Check if an item exists in the binary search tree. + Sprawdź, czy element istnieje w binarnym drzewie wyszukiwania. + + + + Searches recursively using Pattern Matching. Returns true if it exists; otherwise, false. + Wyszukuje rekursywnie przy użyciu dopasowywania wzorca. Zwraca wartość true, jeśli element istnieje; w przeciwnym wypadku zwraca wartość false. + + + + Check the left subtree. + Sprawdź lewe poddrzewo. + + + + Check the right subtree. + Sprawdź prawe poddrzewo. + + + + Inserts an item in the Binary Search Tree. + Wstawia element do binarnego drzewa wyszukiwania. + + + + Finds the place to insert recursively using Pattern Matching, then inserts a new node. + Znajduje miejsce do wstawienia rekursywnego przy użyciu dopasowania wzorca, a następnie wstawia nowy węzeł. + + + + If the item is already present, it does not insert anything. + Jeśli element jest już obecny, nie wstawia niczego. + + + + No need to insert, it already exists; return the node. + Wstawianie nie jest konieczne, element już istnieje; zwróć węzeł. + + + + Call into left subtree. + Wywołanie do lewego poddrzewa. + + + + Call into right subtree. + Wywołanie do prawego poddrzewa. + + + + Discriminated Unions can also be represented as structs via the 'Struct' attribute. + Unie rozłączne mogą być również reprezentowane w formie struktur za pośrednictwem atrybutu „Struct”. + + + + This is helpful in situations where the performance of structs outweighs + Jest to przydatne w sytuacjach, w których wydajność struktur przewyższa + + + + the flexibility of reference types. + elastyczność typów odwołań. + + + + However, there are two important things to know when doing this: + Niemniej w przypadku tej operacji należy pamiętać o dwóch ważnych rzeczach: + + + + 1. A struct DU cannot be recursively-defined. + 1. Unii rozłącznej w formie struktury nie można zdefiniować rekursywnie. + + + + 2. A struct DU must have unique names for each of its cases. + 2. Unia rozłączna w formie struktury musi mieć unikatowe nazwy dla każdego ze swoich przypadków. + + + + Pattern Matching is a feature of F# that allows you to utilize Patterns, + Dopasowywanie wzorca jest funkcją języka F# umożliwiającą wykorzystywanie wzorców, + + + + which are a way to compare data with a logical structure or structures, + które są sposobem na porównywanie danych ze strukturami logicznymi lub strukturami, + + + + decompose data into constituent parts, or extract information from data in various ways. + rozkładanie danych na części składowe lub wyodrębnianie informacji z danych na różne sposoby. + + + + You can then dispatch on the "shape" of a pattern via Pattern Matching. + Następnie możesz wysłać „kształt” wzorca za pośrednictwem funkcji dopasowywania wzorca. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/pattern-matching + Aby dowiedzieć się więcej, zobacz https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/pattern-matching + + + + A record for a person's first and last name + Rekord zawierający imię i nazwisko osoby + + + + A Discriminated Union of 3 different kinds of employees + Unia rozłączna trzech różnych rodzajów pracowników + + + + Count everyone underneath the employee in the management hierarchy, + Licz wszystkich podlegających pracownikowi w hierarchii zarządzania, + + + + including the employee. + z uwzględnieniem pracownika. + + + + Find all managers/executives named "Dave" who do not have any reports. + Znajdź wszystkich kierowników/dyrektorów o imieniu „Dave”, którzy nie mają żadnych podwładnych. + + + + This uses the 'function' shorthand to as a lambda expression. + Operacja używa skrótu słowa „function” jako wyrażenia lambda. + + + + [] matches an empty list. + [] dopasuje pustą listę. + + + + '_' is a wildcard pattern that matches anything. + „_” to wzorzec wieloznaczny, który pasuje do wszystkiego. + + + + This handles the "or else" case. + Obsługuje przypadek „w przeciwnym razie”. + + + + You can also use the shorthand function construct for pattern matching, + Możesz również użyć konstrukcji funkcji skrótu w przypadku dopasowywania wzorców, + + + + which is useful when you're writing functions which make use of Partial Application. + co jest przydatne podczas pisania funkcji wykorzystujących częściową aplikację. + + + + Define some more functions which parse with the helper function. + Zdefiniuj więcej funkcji, które będą analizować przy użyciu funkcji pomocniczej. + + + + Active Patterns are another powerful construct to use with pattern matching. + Wzorce aktywne to kolejna zaawansowana konstrukcja do zastosowania podczas dopasowywania wzorców. + + + + They allow you to partition input data into custom forms, decomposing them at the pattern match call site. + Umożliwiają one partycjonowanie danych wejściowych do formularzy niestandardowych przez ich rozkładanie w lokacji wywołania dopasowania wzorca. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/active-patterns + Aby dowiedzieć się więcej, zobacz https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/active-patterns + + + + Pattern Matching via 'function' keyword and Active Patterns often looks like this. + Dopasowywanie wzorców za pośrednictwem słowa kluczowego „function” i wzorców aktywnych często wygląda w następujący sposób. + + + + Call the printer with some different values to parse. + Wywołaj drukarkę za pomocą innych wartości do przeanalizowania. + + + + Option values are any kind of value tagged with either 'Some' or 'None'. + Wartości opcji to dowolne wartości oznaczone jako „Some” lub „None”. + + + + They are used extensively in F# code to represent the cases where many other + Są one bardzo często używane w kodzie języka F# do reprezentowania przypadków, w których w wielu innych + + + + languages would use null references. + językach użyte zostałyby odwołania o wartości null. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/options + Aby dowiedzieć się więcej, zobacz https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/options + + + + First, define a zipcode defined via Single-case Discriminated Union. + Najpierw zdefiniuj kod pocztowy zdefiniowany za pośrednictwem unii rozłącznej o pojedynczym przypadku. + + + + Next, define a type where the ZipCode is optional. + Następnie zdefiniuj typ, w którym element ZipCode jest opcjonalny. + + + + Next, define an interface type that represents an object to compute the shipping zone for the customer's zip code, + Następnie zdefiniuj typ interfejsu reprezentujący obiekt, aby obliczyć strefę wysyłki dla kodu pocztowego klienta + + + + given implementations for the 'getState' and 'getShippingZone' abstract methods. + przy użyciu danych implementacji metod abstrakcyjnych „getState” i „getShippingZone”. + + + + Next, calculate a shipping zone for a customer using a calculator instance. + Następnie oblicz strefę wysyłki dla klienta za pomocą wystąpienia kalkulatora. + + + + This uses combinators in the Option module to allow a functional pipeline for + Operacja używa kombinatorów w module opcji, aby umożliwiać potokowi funkcjonalnemu + + + + transforming data with Optionals. + przekształcanie danych z wykorzystaniem elementów opcjonalnych. + + + + Units of measure are a way to annotate primitive numeric types in a type-safe way. + Jednostki miary są bezpiecznym sposobem dodawania adnotacji do pierwotnych typów numerycznych. + + + + You can then perform type-safe arithmetic on these values. + Następnie możesz przeprowadzić bezpieczne operacje arytmetyczne dla tych wartości. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/units-of-measure + Aby dowiedzieć się więcej, zobacz https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/units-of-measure + + + + First, open a collection of common unit names + Najpierw otwórz kolekcję typowych nazw jednostek + + + + Define a unitized constant + Definiuj stałą w jednostkach + + + + Next, define a new unit type + Następnie zdefiniuj nowy typ jednostki + + + + Conversion factor mile to meter. + Współczynnik konwersji mil na metry. + + + + Define a unitized constant + Definiuj stałą w jednostkach + + + + Compute metric-system constant + Oblicz stałą systemu metryk + + + + Values using Units of Measure can be used just like the primitive numeric type for things like printing. + Wartości używające jednostek miary można dostosować tak jak pierwotny typ numeryczny, np. w przypadku drukowania. + + + + Classes are a way of defining new object types in F#, and support standard Object-oriented constructs. + Klasy są sposobem definiowania nowych typów obiektów w języku F# i obsługują standardowe konstrukcje zorientowane obiektowo. + + + + They can have a variety of members (methods, properties, events, etc.) + Mogą mieć różne elementy członkowskie (metody, właściwości, zdarzenia itp.) + + + + To learn more about Classes, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/classes + Aby dowiedzieć się więcej o klasach, zobacz https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/classes + + + + To learn more about Members, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/members + Aby dowiedzieć się więcej o elementach członkowskich, zobacz https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/members + + + + A simple two-dimensional Vector class. + Prosta, dwuwymiarowa klasa Vector. + + + + The class's constructor is on the first line, + Konstruktor klasy znajduje się w pierwszym wierszu + + + + and takes two arguments: dx and dy, both of type 'double'. + i przyjmuje dwa argumenty: dx i dy, oba typu „double”. + + + + This internal field stores the length of the vector, computed when the + To pole wewnętrzne przechowuje długość wektora obliczoną podczas + + + + object is constructed + obiekt jest skonstruowany + + + + 'this' specifies a name for the object's self identifier. + Wyraz „this” określa nazwę własnego identyfikatora obiektu. + + + + In instance methods, it must appear before the member name. + W metodach wystąpień musi on znajdować się przed nazwą elementu członkowskiego. + + + + This member is a method. The previous members were properties. + Ten element członkowski jest metodą. Poprzednie elementy członkowskie były właściwościami. + + + + This is how you instantiate the Vector2D class. + Jest to sposób tworzenia wystąpienia dla klasy Vector2D. + + + + Get a new scaled vector object, without modifying the original object. + Pobierz nowy skalowany obiekt wektora bez modyfikowania obiektu oryginalnego. + + + + Generic classes allow types to be defined with respect to a set of type parameters. + Klasy ogólne umożliwiają definiowanie typów z uwzględnieniem zestawu parametrów typu. + + + + In the following, 'T is the type parameter for the class. + W następującym przykładzie 'T jest parametrem typu dla klasy. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/generics/ + Aby dowiedzieć się więcej, zobacz https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/generics/ + + + + This internal field store the states in a list. + To wewnętrzne pole przechowuje stany na liście. + + + + Add a new element to the list of states. + Dodaj nowy element do listy stanów. + + + + use the '<-' operator to mutate the value. + użyj operatora „<-”, aby zmodyfikować wartość. + + + + Get the entire list of historical states. + Pobierz całą listę stanów historycznych. + + + + Get the latest state. + Pobierz najnowszy stan. + + + + An 'int' instance of the state tracker class. Note that the type parameter is inferred. + Wystąpienie typu „int” klasy procedury śledzenia stanu. Należy zwrócić uwagę, że parametr typu jest wywnioskowany. + + + + Add a state + Dodaj stan + + + + Interfaces are object types with only 'abstract' members. + Interfejsy to typy obiektu, których wszystkie elementy członkowskie są abstrakcyjne. + + + + Object types and object expressions can implement interfaces. + Typy obiektu i wyrażenia obiektu mogą implementować interfejsy. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/interfaces + Aby dowiedzieć się więcej, zobacz https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/interfaces + + + + This is a type that implements IDisposable. + To jest typ implementujący interfejs IDisposable. + + + + This is the implementation of IDisposable members. + To jest implementacja elementów członkowskich interfejsu IDisposable. + + + + This is an object that implements IDisposable via an Object Expression + To jest obiekt implementujący interfejs IDisposable za pośrednictwem wyrażenia obiektu + + + + Unlike other languages such as C# or Java, a new type definition is not needed + W przeciwieństwie do innych języków, np. C# lub Java, nowy typ definicji nie jest wymagany + + + + to implement an interface. + do zaimplementowania interfejsu. + + + + The FSharp.Core library defines a range of parallel processing functions. Here + Biblioteka FSharp.Core definiuje zestaw funkcji przetwarzania równoległego. Tutaj + + + + you use some functions for parallel processing over arrays. + niektóre funkcje są używane do równoległego przetwarzania tablic. + + + + To learn more, see: https://msdn.microsoft.com/en-us/visualfsharpdocs/conceptual/array.parallel-module-%5Bfsharp%5D + Aby dowiedzieć się więcej, zobacz https://msdn.microsoft.com/en-us/visualfsharpdocs/conceptual/array.parallel-module-%5Bfsharp%5D + + + + First, an array of inputs. + Najpierw tablica wartości wejściowych. + + + + Next, define a functions that does some CPU intensive computation. + Następnie zdefiniuj funkcje, które wykonują obliczenia intensywnie korzystające z procesora. + + + + Next, do a parallel map over a large input array. + Następnie wykonaj równoległe mapowanie dla dużej tablicy wejściowej. + + + + Next, print the results. + Następnie wyświetl wyniki. + + + + Events are a common idiom for .NET programming, especially with WinForms or WPF applications. + Zdarzenia są wspólnym idiomem dla programowania na platformie .NET, zwłaszcza przy użyciu aplikacji WinForms lub WPF. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/members/events + Aby dowiedzieć się więcej, zobacz https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/members/events + + + + First, create instance of Event object that consists of subscription point (event.Publish) and event trigger (event.Trigger). + Najpierw utwórz wystąpienie obiektu Event, które składa się z punktu subskrypcji (event.Publish) i wyzwalacza zdarzenia (event.Trigger). + + + + Next, add handler to the event. + Następnie dodaj procedurę obsługi do zdarzenia. + + + + Next, trigger the event. + Następnie wyzwól zdarzenie. + + + + Next, create an instance of Event that follows standard .NET convention: (sender, EventArgs). + Następnie utwórz wystąpienie zdarzenia zgodne ze standardową konwencją platformy .NET: (sender, EventArgs). + + + + Next, add a handler for this new event. + Następnie dodaj procedurę obsługi dla tego nowego zdarzenia. + + + + Next, trigger this event (note that sender argument should be set). + Następnie wyzwól to zdarzenie (zwróć uwagę, że argument elementu wysyłającego powinien być ustawiony). + + + + + \ No newline at end of file diff --git a/vsintegration/ProjectTemplates/TutorialProject/Template/xlf/Tutorial.fsx.pt-BR.xlf b/vsintegration/ProjectTemplates/TutorialProject/Template/xlf/Tutorial.fsx.pt-BR.xlf new file mode 100644 index 00000000000..a917ce2ce47 --- /dev/null +++ b/vsintegration/ProjectTemplates/TutorialProject/Template/xlf/Tutorial.fsx.pt-BR.xlf @@ -0,0 +1,1637 @@ + + + + + + This sample will guide you through elements of the F# language. + Esta amostra guiará você pelos elementos da linguagem F#. + + + + To execute the code in F# Interactive, highlight a section of code and press Alt-Enter or right-click + Para executar o código no F# Interativo, realce uma seção de código e pressione Alt-Enter ou clique com botão direito do mouse + + + + and select "Execute in Interactive". You can open the F# Interactive Window from the "View" menu. + e selecione "Executar em Interativo". Você pode abrir a janela F# Interativo no menu "Exibir". + + + + For more about F#, see: + Para obter mais informações sobre F#, consulte: + + + + To see this tutorial in documentation form, see: + Para ver este tutorial em forma de documentação, consulte: + + + + To learn more about applied F# programming, use + Para saber mais sobre a programação F# aplicada, use + + + + To install the Visual F# Power Tools, use + Para instalar o Visual F# Power Tools, use + + + + 'Tools' --> 'Extensions and Updates' --> `Online` and search + 'Ferramentas' --> 'Extensões e Atualizações' --> `Online` e pesquise + + + + For additional templates to use with F#, see the 'Online Templates' in Visual Studio, + Para obter modelos adicionais a serem usados com F#, consulte 'Modelos online' no Visual Studio, + + + + 'New Project' --> 'Online Templates' + 'Novo projeto --> 'Modelos online' + + + + F# supports three kinds of comments: + F# dá suporte a três tipos de comentários: + + + + 1. Double-slash comments. These are used in most situations. + 1. Comentários de barra dupla. São usados na maioria das situações. + + + + 2. ML-style Block comments. These aren't used that often. + 2. Comentários de bloco em estilo de ML. Eles não são usados com muita frequência. + + + + 3. Triple-slash comments. These are used for documenting functions, types, and so on. + 3. Comentários de barra tripla. São usados para funções de documentação, tipos, etc. + + + + They will appear as text when you hover over something which is decorated with these comments. + Eles aparecerão como texto quando você passar o mouse sobre algo decorado com esses comentários. + + + + They also support .NET-style XML comments, which allow you to generate reference documentation, + Eles também dão suporte a comentários XML em estilo .NET, que permitem que você gere documentação de referência, + + + + and they also allow editors (such as Visual Studio) to extract information from them. + além de permitirem que editores (como o Visual Studio) extraiam informações deles. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/xml-documentation + Para saber mais, acesse: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/xml-documentation + + + + Open namespaces using the 'open' keyword. + Abra os namespaces usando a palavra-chave 'open'. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/import-declarations-the-open-keyword + Para saber mais, acesse: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/import-declarations-the-open-keyword + + + + A module is a grouping of F# code, such as values, types, and function values. + Um módulo é um agrupamento de código F#, assim como valores, valores de função e tipos. + + + + Grouping code in modules helps keep related code together and helps avoid name conflicts in your program. + Agrupar código em módulos ajuda a manter o código relacionado junto e ajuda a evitar conflitos de nome em seu programa. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/modules + Para saber mais, acesse: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/modules + + + + This is a sample integer. + Este é um inteiro de exemplo. + + + + This is a sample floating point number. + Esta é uma amostra de número de ponto flutuante. + + + + This computed a new number by some arithmetic. Numeric types are converted using + Isso computou um novo número por meio de alguma aritmética. Tipos numéricos são convertidos usando + + + + functions 'int', 'double' and so on. + funções 'int', 'double' e assim por diante. + + + + This is a list of the numbers from 0 to 99. + Esta é uma lista de números de 0 a 99. + + + + This is a list of all tuples containing all the numbers from 0 to 99 and their squares. + Isso é uma lista de todas as tuplas contendo todos os números de 0 a 99 e seus quadrados. + + + + The next line prints a list that includes tuples, using '%A' for generic printing. + A próxima linha imprime uma lista que inclui tuplas, usando '%A' para impressão genérica. + + + + This is a sample integer with a type annotation + Este é um inteiro de exemplo com uma anotação de tipo + + + + Values in F# are immutable by default. They cannot be changed + Os valores em F# são imutáveis por padrão. Eles não podem ser alterados + + + + in the course of a program's execution unless explicitly marked as mutable. + no decorrer da execução de um programa a menos que explicitamente marcados como mutáveis. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/values/index#why-immutable + Para saber mais, acesse: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/values/index#why-immutable + + + + Binding a value to a name via 'let' makes it immutable. + Associar um valor a um nome via 'let' o torna imutável. + + + + The second line of code fails to compile because 'number' is immutable and bound. + A compilação da segunda linha de código falha porque 'number' é imutável e limitado. + + + + Re-defining 'number' to be a different value is not allowed in F#. + Não é permitido redefinir 'number' para um valor diferente em F#. + + + + A mutable binding. This is required to be able to mutate the value of 'otherNumber'. + Uma associação mutável. Isso é necessário para que se possa modificar o valor de 'otherNumber'. + + + + When mutating a value, use '<-' to assign a new value. + Ao converter um valor, use '<-' para atribuir um novo valor. + + + + You could not use '=' here for this purpose since it is used for equality + Você não pode usar '=' aqui para essa finalidade, já que ele é usado para igualdade + + + + or other contexts such as 'let' or 'module' + ou outros contextos como 'let' ou 'module' + + + + Much of F# programming consists of defining functions that transform input data to produce + Grande parte da programação F# consiste em definir funções que transformam os dados de entrada para produzir + + + + useful results. + resultados úteis. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/ + Para saber mais, acesse: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/ + + + + You use 'let' to define a function. This one accepts an integer argument and returns an integer. + Use 'let' para definir uma função. Ele aceita um argumento inteiro e retorna um inteiro. + + + + Parentheses are optional for function arguments, except for when you use an explicit type annotation. + Parênteses são opcionais para os argumentos da função, exceto quando você usa uma anotação de tipo explícito. + + + + Apply the function, naming the function return result using 'let'. + Aplique a função, nomeando o resultado de retorno de função usando 'let'. + + + + The variable type is inferred from the function return type. + O tipo de variável é deduzido do tipo de retorno de função. + + + + This line uses '%d' to print the result as an integer. This is type-safe. + Esta linha usa '%d' para imprimir o resultado como um inteiro. Isso é fortemente tipado. + + + + If 'result1' were not of type 'int', then the line would fail to compile. + Se 'result1' não fosse do tipo 'int', a linha falharia na compilação. + + + + When needed, annotate the type of a parameter name using '(argument:type)'. Parentheses are required. + Quando necessário, anote o tipo de um nome de parâmetro usando '(argument:type)'. É necessário usar parênteses. + + + + Conditionals use if/then/elid/elif/else. + Condicionais usam if/then/elid/elif/else. + + + + Note that F# uses whitespace indentation-aware syntax, similar to languages like Python. + Observe que F# usa sintaxe com reconhecimento de recuo de espaço em branco, semelhante a linguagens como Python. + + + + This line uses '%f' to print the result as a float. As with '%d' above, this is type-safe. + Esta linha usa '%f' para imprimir o resultado como um float. Como em '%d' acima, isso é fortemente tipado. + + + + Booleans are fundamental data types in F#. Here are some examples of Booleans and conditional logic. + Boolianos são tipos de dados fundamentais em F#. Aqui estão alguns exemplos de Boolianos e lógica condicional. + + + + To learn more, see: + Para saber mais, acesse: + + + + and + e + + + + Booleans values are 'true' and 'false'. + Valores booliano são 'true' e 'false'. + + + + Operators on booleans are 'not', '&&' and '||'. + Operadores em boolianos são 'not', '&&' e '||'. + + + + This line uses '%b'to print a boolean value. This is type-safe. + Esta linha usa '%b' para imprimir um valor booliano. Isso é fortemente tipado. + + + + Strings are fundamental data types in F#. Here are some examples of Strings and basic String manipulation. + Cadeias de caracteres são tipos de dados fundamentais em F#. Aqui estão alguns exemplos de Cadeias de caracteres e a manipulação básicas de Cadeia de caracteres. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/strings + Para saber mais, acesse: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/strings + + + + Strings use double quotes. + Cadeias de caracteres usam aspas duplas. + + + + Strings can also use @ to create a verbatim string literal. + Cadeias de caracteres também podem usar @ para criar um literal de cadeia de caracteres textual. + + + + This will ignore escape characters such as '\', '\n', '\t', etc. + Isso vai ignorar caracteres de escapada como '\', '\n', '\t', etc. + + + + String literals can also use triple-quotes. + Literais de cadeia de caracteres também podem usar aspas triplas. + + + + String concatenation is normally done with the '+' operator. + A concatenação de cadeia de caracteres normalmente é feita com o operador '+'. + + + + This line uses '%s' to print a string value. This is type-safe. + Esta linha usa '%s' para imprimir um valor de cadeia de caracteres. Isso é fortemente tipado. + + + + Substrings use the indexer notation. This line extracts the first 7 characters as a substring. + Subcadeias de caracteres usam a notação de indexador. Essa linha extrai os sete primeiros caracteres como uma subcadeia de caracteres. + + + + Note that like many languages, Strings are zero-indexed in F#. + Observe que, como muitas linguagens, Cadeias de Caracteres são indexadas com zero em F#. + + + + Tuples are simple combinations of data values into a combined value. + Tuplas são combinações simples de valores de dados em um valor combinado. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/tuples + Para saber mais, acesse: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/tuples + + + + A simple tuple of integers. + Uma tupla simples de inteiros. + + + + A function that swaps the order of two values in a tuple. + Uma função que troca a ordem de dois valores em uma tupla. + + + + F# Type Inference will automatically generalize the function to have a generic type, + Inferência de Tipos F# generalizará automaticamente a função para ter um tipo genérico, + + + + meaning that it will work with any type. + significando que ele funcionará com qualquer tipo. + + + + A tuple consisting of an integer, a string, + Uma tupla consistindo em um inteiro, uma cadeia de caracteres, + + + + and a double-precision floating point number. + e um número de ponto flutuante de precisão dupla. + + + + A simple tuple of integers with a type annotation. + Uma tupla simples de números inteiros com uma anotação de tipo. + + + + Type annotations for tuples use the * symbol to separate elements + As anotações de tipo para tuplas usam o símbolo * para separar elementos + + + + Tuples are normally objects, but they can also be represented as structs. + Tuplas normalmente são objetos, mas também podem ser representados como structs. + + + + These interoperate completely with structs in C# and Visual Basic.NET; however, + Esses interoperam completamente com structs em C# e Visual Basic.NET; entretanto, + + + + struct tuples are not implicitly convertable with object tuples (often called reference tuples). + tuplas de struct não são implicitamente conversíveis com tuplas de objeto (geralmente chamadas de tuplas de referência). + + + + The second line below will fail to compile because of this. Uncomment it to see what happens. + A compilação da segunda linha abaixo falhará por causa disso. Remova a marca de comentário para ver o que acontece. + + + + Although you cannot implicitly convert between struct tuples and reference tuples, + Embora não seja possível converter implicitamente entre tuplas de struct e tuplas de referência, + + + + you can explicitly convert via pattern matching, as demonstrated below. + você pode converter explicitamente via correspondência de padrões, conforme demonstrado abaixo. + + + + The F# pipe operators ('|>', '<|', etc.) and F# composition operators ('>>', '<<') + Os operadores de pipe F# ('|>', '<|', etc.) e os operadores de composição F# ('>>', '<<') + + + + are used extensively when processing data. These operators are themselves functions + são usadas extensivamente durante o processamento de dados. Esses operadores são funções + + + + which make use of Partial Application. + que fazem uso do Aplicativo Parcial. + + + + To learn more about these operators, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/#function-composition-and-pipelining + Para saber mais sobre esses operadores, acesse: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/#function-composition-and-pipelining + + + + To learn more about Partial Application, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/#partial-application-of-arguments + Para saber mais sobre Aplicativo Parcial, acesse: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/#partial-application-of-arguments + + + + Squares a value. + Eleva um valor ao quadrado. + + + + Adds 1 to a value. + Adiciona 1 a um valor. + + + + Tests if an integer value is odd via modulo. + Testa se um valor inteiro for ímpar por meio do módulo. + + + + A list of 5 numbers. More on lists later. + Uma lista de cinco números. Mais sobre listas posteriormente. + + + + Given a list of integers, it filters out the even numbers, + Dada uma lista de inteiros, ele filtra os números pares, + + + + squares the resulting odds, and adds 1 to the squared odds. + eleva os ímpares resultantes ao quadrado e adiciona 1 aos ímpares elevados ao quadrado. + + + + A shorter way to write 'squareOddValuesAndAddOne' is to nest each + Uma maneira mais curta para gravar 'squareOddValuesAndAddOne' é aninhar cada + + + + sub-result into the function calls themselves. + sub-resultado em função invoca a si mesmo. + + + + This makes the function much shorter, but it's difficult to see the + Isso faz com que a função fique muito menor, mas é difícil ver a + + + + order in which the data is processed. + ordem em que os dados são processados. + + + + A preferred way to write 'squareOddValuesAndAddOne' is to use F# pipe operators. + Uma maneira preferencial para gravar 'squareOddValuesAndAddOne' é usar operadores de pipe F#. + + + + This allows you to avoid creating intermediate results, but is much more readable + Isso permite que você evite criar resultados intermediários, mas é muito mais legível + + + + than nesting function calls like 'squareOddValuesAndAddOneNested' + que a função de aninhamento invoca como 'squareOddValuesAndAddOneNested' + + + + You can shorten 'squareOddValuesAndAddOnePipeline' by moving the second `List.map` call + Você pode reduzir 'squareOddValuesAndAddOnePipeline' movendo a segunda chamada `List.map` + + + + into the first, using a Lambda Function. + no primeiro, usando uma Função Lambda. + + + + Note that pipelines are also being used inside the lambda function. F# pipe operators + Observe que pipelines também estão sendo usados dentro da função lambda. Operadores de pipe F# + + + + can be used for single values as well. This makes them very powerful for processing data. + podem ser usados para valores únicos também. Isso os torna muito eficientes para o processamento de dados. + + + + Lastly, you can eliminate the need to explicitly take 'values' in as a parameter by using '>>' + Por fim, você pode eliminar a necessidade de incluir explicitamente 'valores' como um parâmetro usando '>>' + + + + to compose the two core operations: filtering out even numbers, then squaring and adding one. + para compor as duas principais operações: filtrar números pares e, em seguida, elevar ao quadrado e adicionar um. + + + + Likewise, the 'fun x -> ...' bit of the lambda expression is also not needed, because 'x' is simply + Da mesma forma, o bit 'fun x -> ...' da expressão lambda também não é necessário porque 'x' é simplesmente + + + + being defined in that scope so that it can be passed to a functional pipeline. Thus, '>>' can be used + sendo definido nesse escopo para que possa ser passada a um pipeline funcional. Portanto, '>>' pode ser usado + + + + there as well. + lá também. + + + + The result of 'squareOddValuesAndAddOneComposition' is itself another function which takes a + O resultado de 'squareOddValuesAndAddOneComposition' é em si outra função que leva um + + + + list of integers as its input. If you execute 'squareOddValuesAndAddOneComposition' with a list + lista de inteiros como sua entrada. Se você executar 'squareOddValuesAndAddOneComposition' com uma lista + + + + of integers, you'll notice that it produces the same results as previous functions. + de inteiros, você observará que ela produz os mesmos resultados que as funções anteriores. + + + + This is using what is known as function composition. This is possible because functions in F# + Isso está usando o que é conhecido como composição de função. Isso é possível porque funções em F# + + + + use Partial Application and the input and output types of each data processing operation match + use Aplicativo Parcial e os tipos de entrada e saída de cada correspondência de operação de processamento de dados + + + + the signatures of the functions we're using. + as assinaturas das funções que estamos usando. + + + + Lists are ordered, immutable, singly-linked lists. They are eager in their evaluation. + As listas são listas ordenadas, imutáveis, vinculadas de modo único. Elas são adiantadas em sua avaliação. + + + + This module shows various ways to generate lists and process lists with some functions + Este módulo mostra várias formas de gerar listas e listas de processo com algumas funções + + + + in the 'List' module in the F# Core Library. + no módulo 'Lista' na Biblioteca Principal de F#. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/lists + Para saber mais, acesse: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/lists + + + + Lists are defined using [ ... ]. This is an empty list. + As listas são definidas usando [ ... ]. Esta é uma lista vazia. + + + + This is a list with 3 elements. ';' is used to separate elements on the same line. + Esta é uma lista com 3 elementos. ';' é usado para separar elementos na mesma linha. + + + + You can also separate elements by placing them on their own lines. + Você também pode separar elementos colocando-os em suas próprias linhas. + + + + This is a list of integers from 1 to 1000 + Esta é uma lista de inteiros de 1 a 1.000 + + + + Lists can also be generated by computations. This is a list containing + Listas também podem ser geradas pelos cálculos. Esta é uma lista contendo + + + + all the days of the year. + todos os dias do ano. + + + + Print the first 5 elements of 'daysList' using 'List.take'. + Imprima os primeiros cinco elementos de 'daysList' usando 'List.take'. + + + + Computations can include conditionals. This is a list containing the tuples + Cálculos podem incluir condicionais. Esta é uma lista contendo as tuplas + + + + which are the coordinates of the black squares on a chess board. + que são as coordenadas dos quadrados pretos em um tabuleiro de xadrez. + + + + Lists can be transformed using 'List.map' and other functional programming combinators. + Listas podem ser transformadas usando 'List. map' e outros combinadores de programação funcional. + + + + This definition produces a new list by squaring the numbers in numberList, using the pipeline + Essa definição produz uma nova lista ao elevar ao quadrado os números em numberList, usando o pipeline + + + + operator to pass an argument to List.map. + operador para passar um argumento para List.map. + + + + There are many other list combinations. The following computes the sum of the squares of the + Há muitas outras combinações de lista. O exemplo a seguir computa a soma dos quadrados dos + + + + numbers divisible by 3. + números divisíveis por 3. + + + + Arrays are fixed-size, mutable collections of elements of the same type. + Matrizes são coleções de tamanho fixo, mutáveis de elementos do mesmo tipo. + + + + Although they are similar to Lists (they support enumeration and have similar combinators for data processing), + Embora elas sejam semelhantes às Listas (eles dão suporte à enumeração e têm combinadores semelhantes para processamento de dados), + + + + they are generally faster and support fast random access. This comes at the cost of being less safe by being mutable. + elas geralmente são mais rápidas e dão suporte ao acesso aleatório rápido. Isso vem com o custo de ser menos seguro por ser mutável. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/arrays + Para saber mais, acesse: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/arrays + + + + This is The empty array. Note that the syntax is similar to that of Lists, but uses `[| ... |]` instead. + Esta é a matriz vazia. Observe que a sintaxe é semelhante à de Listas, mas usa '[| ... |]' em vez disso. + + + + Arrays are specified using the same range of constructs as lists. + Matrizes são especificadas usando o mesmo intervalo de construções usado em listas. + + + + This is an array of numbers from 1 to 1000. + Esta é uma matriz de números de 1 a 1.000. + + + + This is an array containing only the words "hello" and "world". + Esta é uma matriz que contém apenas as palavras "olá" e "mundo". + + + + This is an array initialized by index and containing the even numbers from 0 to 2000. + Esta é uma matriz inicializada pelo índice e que contém os números pares de 0 a 2.000. + + + + Sub-arrays are extracted using slicing notation. + Submatrizes são extraídas usando a notação de divisão. + + + + You can loop over arrays and lists using 'for' loops. + Você pode executar um loop através de matrizes e listas usando loops 'for'. + + + + You can modify the contents of an an array element by using the left arrow assignment operator. + Você pode modificar o conteúdo de um elemento de matriz usando o operador de atribuição de seta para a esquerda. + + + + To learn more about this operator, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/values/index#mutable-variables + Para saber mais sobre esse operador, acesse: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/values/index#mutable-variables + + + + You can transform arrays using 'Array.map' and other functional programming operations. + Você pode transformar as matrizes usando 'Array.map' e outras operações de programação funcional. + + + + The following calculates the sum of the lengths of the words that start with 'h'. + O exemplo a seguir calcula a soma dos tamanhos de palavras que começam com 'h'. + + + + Sequences are a logical series of elements, all of the same type. These are a more general type than Lists and Arrays. + Sequências são uma série lógica de elementos, todos do mesmo tipo. Eles são um tipo mais geral que Listas e Matrizes. + + + + Sequences are evaluated on-demand and are re-evaluated each time they are iterated. + As sequências são avaliada sob demanda e reavaliadas sempre que são repetidas. + + + + An F# sequence is an alias for a .NET System.Collections.Generic.IEnumerable<'T>. + Uma sequência de F# é um alias para um System.Collections.Generic.IEnumerable .NET<' t>. + + + + Sequence processing functions can be applied to Lists and Arrays as well. + Funções de processamento de sequência também podem ser aplicadas a matrizes e listas. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/sequences + Para saber mais, acesse: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/sequences + + + + This is the empty sequence. + Esta é a sequência vazia. + + + + This a sequence of values. + Esta é uma sequência de valores. + + + + This is an on-demand sequence from 1 to 1000. + Esta é uma sequência sob demanda de 1 a 1000. + + + + This is a sequence producing the words "hello" and "world" + Esta é uma sequência produzindo as palavras "olá" e "mundo" + + + + This sequence producing the even numbers up to 2000. + Esta sequência produzindo os números pares até 2.000. + + + + This is an infinite sequence which is a random walk. + Esta é uma sequência infinita, que é um exame aleatório. + + + + This example uses yield! to return each element of a subsequence. + Este exemplo usa yield! para retornar cada elemento de uma subsequência. + + + + This example shows the first 100 elements of the random walk. + Este exemplo mostra os primeiros 100 elementos do exame aleatório. + + + + Recursive functions can call themselves. In F#, functions are only recursive + Funções recursivas podem chamar a si mesmas. Em F#, funções são recursivas somente + + + + when declared using 'let rec'. + quando declarada usando 'let rec'. + + + + Recursion is the preferred way to process sequences or collections in F#. + Recursão é a maneira preferencial de processar sequências ou coleções em F#. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/index#recursive-functions + Para saber mais, acesse: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/index#recursive-functions + + + + This example shows a recursive function that computes the factorial of an + Este exemplo mostra uma função recursiva que computa o fatorial de um + + + + integer. It uses 'let rec' to define a recursive function. + inteiro. Ele usa 'let gra' para definir uma função recursiva. + + + + Computes the greatest common factor of two integers. + Calcula o máximo divisor comum de dois inteiros. + + + + Since all of the recursive calls are tail calls, + Como todas as chamadas recursivas são chamadas tail, + + + + the compiler will turn the function into a loop, + o compilador transformará a função em um loop, + + + + which improves performance and reduces memory consumption. + que melhora o desempenho e reduz o consumo de memória. + + + + This example computes the sum of a list of integers using recursion. + Este exemplo calcula a soma de uma lista de inteiros usando recursão. + + + + This makes 'sumList' tail recursive, using a helper function with a result accumulator. + Isso torna a cauda de 'sumList' recursiva usando uma função auxiliar com um acumulador de resultado. + + + + This invokes the tail recursive helper function, providing '0' as a seed accumulator. + Isso invoca a cauda da função auxiliar recursiva, fornecendo '0' como um acumulador de semente. + + + + An approach like this is common in F#. + Uma abordagem como essa é comum em F#. + + + + Records are an aggregate of named values, with optional members (such as methods). + Registros são uma agregação de valores nomeados com membros opcionais (como métodos). + + + + They are immutable and have structural equality semantics. + Eles são imutáveis e têm semântica de igualdade estrutural. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/records + Para saber mais, acesse: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/records + + + + This example shows how to define a new record type. + Este exemplo mostra como definir um novo tipo de registro. + + + + This example shows how to instantiate a record type. + Este exemplo mostra como criar uma instância de um tipo de registro. + + + + You can also do this on the same line with ';' separators. + Você também pode fazer isso na mesma linha com separadores ';'. + + + + This example shows how to use "copy-and-update" on record values. It creates + Este exemplo mostra como usar o "copiar e atualizar" em valores do Registro. Ele cria + + + + a new record value that is a copy of contact1, but has different values for + um novo valor de registro é uma cópia de contact1, mas tem valores diferentes para + + + + the 'Phone' and 'Verified' fields. + os campos 'Telefone' e 'Verificado'. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/copy-and-update-record-expressions + Para saber mais, acesse: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/copy-and-update-record-expressions + + + + This example shows how to write a function that processes a record value. + Este exemplo mostra como escrever uma função que processa um valor de Registro. + + + + It converts a 'ContactCard' object to a string. + Converte um objeto 'ContactCard' em uma cadeia de caracteres. + + + + This is an example of a Record with a member. + Este é um exemplo de um Registro com um membro. + + + + Members can implement object-oriented members. + Os membros podem implementar membros orientados a objeto. + + + + Members are accessed via the '.' operator on an instantiated type. + Os membros são acessados por meio do operador '.' em um tipo instanciado. + + + + Records can also be represented as structs via the 'Struct' attribute. + Registros também podem ser representados como structs por meio do atributo 'Struct'. + + + + This is helpful in situations where the performance of structs outweighs + Isso é útil em situações em que o desempenho de structs é superior + + + + the flexibility of reference types. + a flexibilidade de tipos de referência. + + + + Discriminated Unions (DU for short) are values which could be a number of named forms or cases. + Uniões Discriminadas (UD) são valores que podem ser vários formulários nomeados ou casos. + + + + Data stored in DUs can be one of several distinct values. + Dados armazenados em DUs podem ser um dos vários valores distintos. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/discriminated-unions + Para saber mais, acesse: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/discriminated-unions + + + + The following represents the suit of a playing card. + O exemplo a seguir representa o naipe de uma carta de baralho. + + + + A Disciminated Union can also be used to represent the rank of a playing card. + Uma União Discriminada também pode ser usada para representar a classificação de uma carta de baralho. + + + + Represents the rank of cards 2 .. 10 + Representa posição das cartas 2 .. 10 + + + + Discriminated Unions can also implement object-oriented members. + Uniões Discriminadas também podem implementar membros orientados a objeto. + + + + This is a record type that combines a Suit and a Rank. + Este é um tipo de registro que combina um Naipe e uma Classificação. + + + + It's common to use both Records and Disciminated Unions when representing data. + É comum usar Registros e Uniões Discriminadas ao representar dados. + + + + This computes a list representing all the cards in the deck. + Isto calcula uma lista que representa todas as cartas do baralho. + + + + This example converts a 'Card' object to a string. + Este exemplo converte um objeto 'Carta' em uma cadeia de caracteres. + + + + This example prints all the cards in a playing deck. + Este exemplo imprime todas as cartas de um baralho de jogo. + + + + Single-case DUs are often used for domain modeling. This can buy you extra type safety + UDs de caso único são frequentemente usadas para modelagem de domínio. Isso pode significar um tipo extra de segurança para você + + + + over primitive types such as strings and ints. + sobre tipos primitivos como cadeias de caracteres e inteiros. + + + + Single-case DUs cannot be implicitly converted to or from the type they wrap. + UDs de caso único não podem ser convertidas implicitamente de ou para o tipo que elas encapsulam. + + + + For example, a function which takes in an Address cannot accept a string as that input, + Por exemplo, uma função que compreende um Endereço não pode aceitar uma sequência de caracteres como essa entrada, + + + + or vive/versa. + ou vice-versa. + + + + You can easily instantiate a single-case DU as follows. + Você pode facilmente criar uma instância em uma UD de único caso conforme mostrado a seguir. + + + + When you need the value, you can unwrap the underlying value with a simple function. + Quando precisar do valor, você pode decodificar o valor subjacente com uma função simples. + + + + Printing single-case DUs is simple with unwrapping functions. + Imprimir UDs de caso único é simples com funções não encapsuladas. + + + + Disciminated Unions also support recursive definitions. + Uniões Discriminadas também dão suporte a definições recursivas. + + + + This represents a Binary Search Tree, with one case being the Empty tree, + Isso representa uma Árvore de Pesquisa Binária, com um caso sendo a árvore Vazia, + + + + and the other being a Node with a value and two subtrees. + e o outro sendo um Nó com um valor e duas subárvores. + + + + Check if an item exists in the binary search tree. + Verifique se um item existe na árvore de pesquisa binária. + + + + Searches recursively using Pattern Matching. Returns true if it exists; otherwise, false. + Pesquisa recursivamente usando Correspondência de Padrões. Retorna verdadeiro se existir; caso contrário, falso. + + + + Check the left subtree. + Verifique a subárvore à esquerda. + + + + Check the right subtree. + Verifique a subárvore à direita. + + + + Inserts an item in the Binary Search Tree. + Insere um item na Árvore de Pesquisa Binária. + + + + Finds the place to insert recursively using Pattern Matching, then inserts a new node. + Encontra o local para inserir recursivamente usando Correspondência de Padrões e, em seguida, insere um novo nó. + + + + If the item is already present, it does not insert anything. + Se o item já estiver presente, ele não insere nada. + + + + No need to insert, it already exists; return the node. + Não é preciso inseri-lo, ele já existe; retorne o nó. + + + + Call into left subtree. + Chamar subárvore à esquerda. + + + + Call into right subtree. + Chamar subárvore à direita. + + + + Discriminated Unions can also be represented as structs via the 'Struct' attribute. + Uniões Discriminadas também podem ser representadas como structs por meio do atributo 'Struct'. + + + + This is helpful in situations where the performance of structs outweighs + Isso é útil em situações em que o desempenho de structs é superior + + + + the flexibility of reference types. + a flexibilidade de tipos de referência. + + + + However, there are two important things to know when doing this: + No entanto, existem duas coisas importantes a saber ao fazer isso: + + + + 1. A struct DU cannot be recursively-defined. + 1. Uma UD struct não pode ser definida recursivamente. + + + + 2. A struct DU must have unique names for each of its cases. + 2. Uma UD struct deve ter nomes exclusivos para cada um dos seus casos. + + + + Pattern Matching is a feature of F# that allows you to utilize Patterns, + Correspondência de padrões é um recurso do F# que permite que você utilize Padrões, + + + + which are a way to compare data with a logical structure or structures, + que são uma forma de comparar dados com uma estrutura lógica ou com estruturas, + + + + decompose data into constituent parts, or extract information from data in various ways. + decompor os dados em partes constituintes ou extrair informações de dados de diversas maneiras. + + + + You can then dispatch on the "shape" of a pattern via Pattern Matching. + Em seguida, você pode expedir na "forma" de um padrão por meio da Correspondência de Padrões. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/pattern-matching + Para saber mais, acesse: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/pattern-matching + + + + A record for a person's first and last name + Um registro de nome e sobrenome de uma pessoa + + + + A Discriminated Union of 3 different kinds of employees + Uma União Discriminada de 3 tipos diferentes de funcionários + + + + Count everyone underneath the employee in the management hierarchy, + Conta todos abaixo do funcionário na hierarquia de gerenciamento, + + + + including the employee. + incluindo o funcionário. + + + + Find all managers/executives named "Dave" who do not have any reports. + Localize todos os gerentes/executivos chamados "Dave" que não têm nenhum relatório. + + + + This uses the 'function' shorthand to as a lambda expression. + Isso usa a forma abreviada de 'function' como uma expressão lambda. + + + + [] matches an empty list. + [] corresponde a uma lista vazia. + + + + '_' is a wildcard pattern that matches anything. + '_' é um padrão de caractere curinga que coincide com qualquer coisa. + + + + This handles the "or else" case. + Isso identifica o caso "ou também". + + + + You can also use the shorthand function construct for pattern matching, + Você também pode usar o constructo da função abreviada para correspondência de padrões, + + + + which is useful when you're writing functions which make use of Partial Application. + que é útil quando você está gravando funções que fazem uso do Aplicativo Parcial. + + + + Define some more functions which parse with the helper function. + Defina mais algumas funções que são analisadas com a função auxiliar. + + + + Active Patterns are another powerful construct to use with pattern matching. + Padrões Ativos são outro constructo avançado para usar com correspondência de padrões. + + + + They allow you to partition input data into custom forms, decomposing them at the pattern match call site. + Eles permitem particionar os dados de entrada em formulários personalizados, decompondo-os no local da chamada de correspondência de padrão. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/active-patterns + Para saber mais, acesse: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/active-patterns + + + + Pattern Matching via 'function' keyword and Active Patterns often looks like this. + Correspondência de Padrões por meio de palavra-chave 'function' e Padrões Ativos geralmente têm essa aparência. + + + + Call the printer with some different values to parse. + Chamar a impressora com alguns valores diferentes para analisar. + + + + Option values are any kind of value tagged with either 'Some' or 'None'. + Os valores de opção são qualquer tipo de valor marcado com 'Algum' ou 'Nenhum'. + + + + They are used extensively in F# code to represent the cases where many other + Eles são usados extensivamente no código F# para representar os casos em que muitos outros + + + + languages would use null references. + idiomas usariam referências nulas. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/options + Para saber mais, acesse: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/options + + + + First, define a zipcode defined via Single-case Discriminated Union. + Primeiro, determine um CEP definido por meio de União Discriminada de Único Caso. + + + + Next, define a type where the ZipCode is optional. + Em seguida, defina um tipo em que o CEP é opcional. + + + + Next, define an interface type that represents an object to compute the shipping zone for the customer's zip code, + Em seguida, defina um tipo de interface que representa um objeto para computar a zona de remessa para o CEP do cliente, + + + + given implementations for the 'getState' and 'getShippingZone' abstract methods. + determinadas implementações para os métodos abstratos 'getState' e 'getShippingZone'. + + + + Next, calculate a shipping zone for a customer using a calculator instance. + Em seguida, calcule uma zona de remessa para um cliente usando uma instância da calculadora. + + + + This uses combinators in the Option module to allow a functional pipeline for + Isso usa combinadores no módulo Option para permitir um pipeline funcional para + + + + transforming data with Optionals. + transformando dados com Opcionais. + + + + Units of measure are a way to annotate primitive numeric types in a type-safe way. + Unidades de medida são uma forma de anotar tipos numéricos primitivos de um modo fortemente tipado. + + + + You can then perform type-safe arithmetic on these values. + Então, você pode executar a aritmética fortemente tipada nesses valores. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/units-of-measure + Para saber mais, acesse: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/units-of-measure + + + + First, open a collection of common unit names + Primeiro, abra uma coleção de nomes comuns de unidade + + + + Define a unitized constant + Definir uma constante unitizada + + + + Next, define a new unit type + Em seguida, defina um novo tipo de unidade + + + + Conversion factor mile to meter. + Fator de conversão de milha para metro. + + + + Define a unitized constant + Definir uma constante unitizada + + + + Compute metric-system constant + Computar a constante de sistema métrico + + + + Values using Units of Measure can be used just like the primitive numeric type for things like printing. + Valores que usam Unidades de Medida podem ser usados exatamente como o tipo numérico primitivo para coisas como impressão. + + + + Classes are a way of defining new object types in F#, and support standard Object-oriented constructs. + Classes são uma maneira de definir novos tipos de objetos em F# e dão suporte a constructos padrão Orientados a objeto. + + + + They can have a variety of members (methods, properties, events, etc.) + Elas podem ter uma variedade de membros (métodos, propriedades, eventos, etc.) + + + + To learn more about Classes, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/classes + Para saber mais sobre Classes, acesse: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/classes + + + + To learn more about Members, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/members + Para saber mais sobre Membros, acesse: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/members + + + + A simple two-dimensional Vector class. + Uma classe de vetor bidimensional simples. + + + + The class's constructor is on the first line, + O construtor da classe está na primeira linha, + + + + and takes two arguments: dx and dy, both of type 'double'. + e leva dois argumentos: dx e dy, ambos do tipo 'duplo'. + + + + This internal field stores the length of the vector, computed when the + Este campo interno armazena o comprimento do vetor, computado quando o + + + + object is constructed + objeto é construído + + + + 'this' specifies a name for the object's self identifier. + 'this' especifica um nome para o identificador automático do objeto. + + + + In instance methods, it must appear before the member name. + Em métodos de instância, ele deve aparecer antes do nome do membro. + + + + This member is a method. The previous members were properties. + Esse membro é um método. Os membros anteriores eram propriedades. + + + + This is how you instantiate the Vector2D class. + É assim que você cria uma instância de classe Vector2D. + + + + Get a new scaled vector object, without modifying the original object. + Obter um novo objeto de vetor em escala, sem modificar o objeto original. + + + + Generic classes allow types to be defined with respect to a set of type parameters. + Classes genéricas permitem que os tipos sejam definidos em relação a um conjunto de parâmetros de tipo. + + + + In the following, 'T is the type parameter for the class. + No exemplo a seguir, 'T é o parâmetro de tipo para a classe. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/generics/ + Para saber mais, acesse: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/generics/ + + + + This internal field store the states in a list. + Este campo interno armazena os estados em uma lista. + + + + Add a new element to the list of states. + Adicione um novo elemento à lista de estados. + + + + use the '<-' operator to mutate the value. + use o operador '<-' para modificar o valor. + + + + Get the entire list of historical states. + Obter a lista completa de estados históricos. + + + + Get the latest state. + Obter o estado mais recente. + + + + An 'int' instance of the state tracker class. Note that the type parameter is inferred. + Uma instância ' int' da classe de controlador do estado. Observe que o parâmetro de tipo é deduzido. + + + + Add a state + Adicionar um estado + + + + Interfaces are object types with only 'abstract' members. + As interfaces são tipos de objeto com apenas membros 'abstract'. + + + + Object types and object expressions can implement interfaces. + Tipos de objeto e expressões de objeto podem implementar interfaces. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/interfaces + Para saber mais, acesse: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/interfaces + + + + This is a type that implements IDisposable. + Este é um tipo que implementa IDisposable. + + + + This is the implementation of IDisposable members. + Essa é a implementação de membros IDisposable. + + + + This is an object that implements IDisposable via an Object Expression + Este é um objeto que implementa IDisposable por meio de uma Expressão de Objeto + + + + Unlike other languages such as C# or Java, a new type definition is not needed + Diferentemente de outras linguagens, como C# ou Java, uma nova definição de tipo não é necessária + + + + to implement an interface. + para implementar uma interface. + + + + The FSharp.Core library defines a range of parallel processing functions. Here + A biblioteca FSharp.Core define várias funções de processamento paralelo. Aqui + + + + you use some functions for parallel processing over arrays. + você usa algumas funções para processamento paralelo por matrizes. + + + + To learn more, see: https://msdn.microsoft.com/en-us/visualfsharpdocs/conceptual/array.parallel-module-%5Bfsharp%5D + Para saber mais, acesse: https://msdn.microsoft.com/en-us/visualfsharpdocs/conceptual/array.parallel-module-%5Bfsharp%5D + + + + First, an array of inputs. + Primeiro, uma matriz de entradas. + + + + Next, define a functions that does some CPU intensive computation. + Em seguida, defina uma função que realiza computação com uso intensivo de CPU. + + + + Next, do a parallel map over a large input array. + Em seguida, faça um mapa paralelo por uma grande matriz de entrada. + + + + Next, print the results. + Em seguida, imprima os resultados. + + + + Events are a common idiom for .NET programming, especially with WinForms or WPF applications. + Eventos são uma linguagem comum para programação em .NET, especialmente com aplicativos WinForms ou WPF. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/members/events + Para saber mais, acesse: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/members/events + + + + First, create instance of Event object that consists of subscription point (event.Publish) and event trigger (event.Trigger). + Primeiro, crie a instância do objeto Evento que consiste em ponto de assinatura (event.Publish) e gatilho de eventos (event.Trigger). + + + + Next, add handler to the event. + Em seguida, adicione o manipulador ao evento. + + + + Next, trigger the event. + Em seguida, dispare o evento. + + + + Next, create an instance of Event that follows standard .NET convention: (sender, EventArgs). + Em seguida, crie uma instância do evento que segue a convenção padrão do .NET: (sender, EventArgs). + + + + Next, add a handler for this new event. + Em seguida, adicione um manipulador para este novo evento. + + + + Next, trigger this event (note that sender argument should be set). + Em seguida, dispare esse evento (observe que o argumento do remetente deve ser definido). + + + + + \ No newline at end of file diff --git a/vsintegration/ProjectTemplates/TutorialProject/Template/xlf/Tutorial.fsx.ru.xlf b/vsintegration/ProjectTemplates/TutorialProject/Template/xlf/Tutorial.fsx.ru.xlf new file mode 100644 index 00000000000..338efcef1f5 --- /dev/null +++ b/vsintegration/ProjectTemplates/TutorialProject/Template/xlf/Tutorial.fsx.ru.xlf @@ -0,0 +1,1637 @@ + + + + + + This sample will guide you through elements of the F# language. + Этот пример поможет узнать о различных элементах языка F#. + + + + To execute the code in F# Interactive, highlight a section of code and press Alt-Enter or right-click + Чтобы выполнить код в F# Interactive, выделите фрагмент кода и нажмите ALT+ВВОД или щелкните правой кнопкой мыши + + + + and select "Execute in Interactive". You can open the F# Interactive Window from the "View" menu. + и выберите команду "Выполнение в Interactive". Окно F# Interactive можно также открыть из меню "Вид". + + + + For more about F#, see: + Дополнительные сведения о F# см. по адресу: + + + + To see this tutorial in documentation form, see: + Чтобы просмотреть это руководство в виде документа, см.: + + + + To learn more about applied F# programming, use + Чтобы получить дополнительные сведения о прикладном программировании на языке F#, воспользуйтесь + + + + To install the Visual F# Power Tools, use + Чтобы установить Visual F# Power Tools, используйте + + + + 'Tools' --> 'Extensions and Updates' --> `Online` and search + "Сервис" --> "Расширения и обновления" --> "В сети" и выполните поиск + + + + For additional templates to use with F#, see the 'Online Templates' in Visual Studio, + Дополнительные шаблоны, которые можно использовать с F#, см. в разделе "Шаблоны в Интернете" в Visual Studio. + + + + 'New Project' --> 'Online Templates' + "Создать проект --> Шаблоны в Интернете" + + + + F# supports three kinds of comments: + F# поддерживает три типа комментариев: + + + + 1. Double-slash comments. These are used in most situations. + 1. Комментарии с двойной косой чертой. Они используются в большинстве ситуаций. + + + + 2. ML-style Block comments. These aren't used that often. + 2. Комментарии блоков в стиле ML. Они используются довольно редко. + + + + 3. Triple-slash comments. These are used for documenting functions, types, and so on. + 3. Комментарии с тройной косой чертой. Они используются для документирования функций, типов и т. д. + + + + They will appear as text when you hover over something which is decorated with these comments. + При наведении указателя мыши на код, задекорированный этими комментариями, они отображаются в виде текста. + + + + They also support .NET-style XML comments, which allow you to generate reference documentation, + Кроме того, они поддерживают XML-комментарии в стиле .NET, делая возможным формирование справочной документации, + + + + and they also allow editors (such as Visual Studio) to extract information from them. + а также позволяют редакторам (таким как Visual Studio) извлекать из них информацию. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/xml-documentation + Подробности: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/xml-documentation + + + + Open namespaces using the 'open' keyword. + Открывайте пространства имен с помощью ключевого слова "open". + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/import-declarations-the-open-keyword + Подробности: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/import-declarations-the-open-keyword + + + + A module is a grouping of F# code, such as values, types, and function values. + Модуль представляет собой группирование кода F#, например значений, типов и значений функций. + + + + Grouping code in modules helps keep related code together and helps avoid name conflicts in your program. + Группирование кода в модулях помогает держать связанный код в одном месте и предотвратить конфликты имен в программе. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/modules + Подробности: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/modules + + + + This is a sample integer. + Это пример целого числа. + + + + This is a sample floating point number. + Это пример числа с плавающей запятой. + + + + This computed a new number by some arithmetic. Numeric types are converted using + Это новое число, вычисленное с помощью некоторых арифметических операций. Числовые типы преобразуются с помощью + + + + functions 'int', 'double' and so on. + функций "int", "double" и т. п. + + + + This is a list of the numbers from 0 to 99. + Это список чисел от 0 до 99. + + + + This is a list of all tuples containing all the numbers from 0 to 99 and their squares. + Это список всех кортежей, содержащих все числа от 0 до 99 и их квадраты. + + + + The next line prints a list that includes tuples, using '%A' for generic printing. + Следующая строка выводит список, включающий в себя кортежи, используя "%A" для универсальной печати. + + + + This is a sample integer with a type annotation + Это пример целого числа с аннотацией типа + + + + Values in F# are immutable by default. They cannot be changed + В F# значения по умолчанию неизменяемы. Их невозможно изменить + + + + in the course of a program's execution unless explicitly marked as mutable. + во время выполнения программы, если только они явно не помечены как изменяемые. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/values/index#why-immutable + Подробности: https://docs.microsoft.com/ru-ru/dotnet/articles/fsharp/language-reference/values/index#why-immutable + + + + Binding a value to a name via 'let' makes it immutable. + Привязка значения к имени через let делает его неизменяемым. + + + + The second line of code fails to compile because 'number' is immutable and bound. + Сбой компиляции второй строки кода происходит, так как number неизменяем и привязан. + + + + Re-defining 'number' to be a different value is not allowed in F#. + Переопределение number в другое значение запрещено в F#. + + + + A mutable binding. This is required to be able to mutate the value of 'otherNumber'. + Изменяемая привязка. Она необходима, чтобы иметь возможность изменять значение otherNumber. + + + + When mutating a value, use '<-' to assign a new value. + При изменении значения используйте "<-", чтобы присвоить новое значение. + + + + You could not use '=' here for this purpose since it is used for equality + Не удалось использовать "=" здесь и для этой цели, так как знак используется как оператор равенства. + + + + or other contexts such as 'let' or 'module' + или другие контексты, такие как "let" или "module" + + + + Much of F# programming consists of defining functions that transform input data to produce + Программирование на языке F# в основном заключается в определении функций, которые преобразуют входные данные и выдают + + + + useful results. + полезные результаты. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/ + Подробности: https://docs.microsoft.com/ru-ru/dotnet/articles/fsharp/language-reference/functions/ + + + + You use 'let' to define a function. This one accepts an integer argument and returns an integer. + let используется для определения функции. Эта функция принимает целочисленный аргумент и возвращает целое число. + + + + Parentheses are optional for function arguments, except for when you use an explicit type annotation. + Круглые скобки необязательны для аргументов функции, если только не используется явная аннотация типа. + + + + Apply the function, naming the function return result using 'let'. + Применяйте функции, именуя возвращаемый функцией результат с помощью let. + + + + The variable type is inferred from the function return type. + Тип переменной определяется типом возвращаемого значения функции. + + + + This line uses '%d' to print the result as an integer. This is type-safe. + В этой строке используется "%d" для вывода результата как целого числа. Это типобезопасно. + + + + If 'result1' were not of type 'int', then the line would fail to compile. + Если бы result1 не принадлежал к типу int, при компиляции строки произошел бы сбой. + + + + When needed, annotate the type of a parameter name using '(argument:type)'. Parentheses are required. + При необходимости аннотируйте тип имени параметра при помощи "(argument:type)". Скобки обязательны. + + + + Conditionals use if/then/elid/elif/else. + В условных выражениях используются операторы if, then, elid, elif и else. + + + + Note that F# uses whitespace indentation-aware syntax, similar to languages like Python. + Обратите внимание, что в F# используется синтаксис с отступами в виде пробелов, аналогично таким языкам, как Python. + + + + This line uses '%f' to print the result as a float. As with '%d' above, this is type-safe. + Эта строка использует "%f" для вывода результата в виде числа с плавающей запятой. Как и в случае с "%d" выше, это типобезопасно. + + + + Booleans are fundamental data types in F#. Here are some examples of Booleans and conditional logic. + Логические значения являются основными типами данных в F#. Ниже приведен ряд примеров логических типов данных и условной логики. + + + + To learn more, see: + Подробности: + + + + and + и + + + + Booleans values are 'true' and 'false'. + Логические значения — это true и false. + + + + Operators on booleans are 'not', '&&' and '||'. + Операторы для логических значений — not, && и ||. + + + + This line uses '%b'to print a boolean value. This is type-safe. + В этой строке "%b" используется для вывода логического значения. Это типобезопасно. + + + + Strings are fundamental data types in F#. Here are some examples of Strings and basic String manipulation. + Строки являются основными типами данных в F#. Ниже приведено несколько примеров строк и основных действий с ними. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/strings + Подробности: https://docs.microsoft.com/ru-ru/dotnet/articles/fsharp/language-reference/strings + + + + Strings use double quotes. + В строках используются двойные кавычки. + + + + Strings can also use @ to create a verbatim string literal. + В строках также может использоваться @ для создания буквальных (verbatim) строковых литералов. + + + + This will ignore escape characters such as '\', '\n', '\t', etc. + Будут пропускаться escape-символы, такие как "\", "\n", "\t" и т. д. + + + + String literals can also use triple-quotes. + В строковых литералах также используются тройные кавычки. + + + + String concatenation is normally done with the '+' operator. + Сцепление строк обычно выполняется при помощи оператора "+". + + + + This line uses '%s' to print a string value. This is type-safe. + В этой строке "%s" используется для вывода строкового значения. Это типобезопасно. + + + + Substrings use the indexer notation. This line extracts the first 7 characters as a substring. + Подстроки используют нотацию индексатора. Эта строка кода извлекает первые семь символов в виде подстроки. + + + + Note that like many languages, Strings are zero-indexed in F#. + Учтите, что, как и во многих других языках, в F# строки индексируются от нуля. + + + + Tuples are simple combinations of data values into a combined value. + Кортеж — это простое сочетание значений данных в виде объединенного значения. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/tuples + Подробности: https://docs.microsoft.com/ru-ru/dotnet/articles/fsharp/language-reference/tuples + + + + A simple tuple of integers. + Простой кортеж целых чисел. + + + + A function that swaps the order of two values in a tuple. + Функция, меняющая местами два значения в кортеже. + + + + F# Type Inference will automatically generalize the function to have a generic type, + Определение типа F# будет автоматически назначать функции универсальный тип, + + + + meaning that it will work with any type. + что означает, что он будет работать с любым типом. + + + + A tuple consisting of an integer, a string, + Кортеж, состоящий из целого числа, строки + + + + and a double-precision floating point number. + и числа двойной точности с плавающей запятой. + + + + A simple tuple of integers with a type annotation. + Простой кортеж целых чисел с аннотацией типа. + + + + Type annotations for tuples use the * symbol to separate elements + Аннотации типов для кортежей используют символ * для разделения элементов. + + + + Tuples are normally objects, but they can also be represented as structs. + Кортежи обычно являются объектами, но они также могут быть представлены как структуры. + + + + These interoperate completely with structs in C# and Visual Basic.NET; however, + Они полноценно взаимодействуют со структурами в C# и Visual Basic.NET; тем не менее + + + + struct tuples are not implicitly convertable with object tuples (often called reference tuples). + кортежи структур нельзя явно преобразовать в кортежи объектов (часто называемые эталонными кортежами). + + + + The second line below will fail to compile because of this. Uncomment it to see what happens. + Из-за этого произойдет сбой компиляции второй строки ниже. Раскомментируйте ее, чтобы увидеть, что произойдет. + + + + Although you cannot implicitly convert between struct tuples and reference tuples, + Хотя кортежи-структуры и ссылочные кортежи невозможно преобразовывать неявно, + + + + you can explicitly convert via pattern matching, as demonstrated below. + вы можете явно преобразовывать их с помощью сопоставления шаблонов, как показано ниже. + + + + The F# pipe operators ('|>', '<|', etc.) and F# composition operators ('>>', '<<') + Операторы конвейера F# ("|>", "<|" и т. д.) и операторы объединения F# (">>", "<<") + + + + are used extensively when processing data. These operators are themselves functions + широко используются при обработке данных. Эти операторы сами по себе являются функциями, + + + + which make use of Partial Application. + использующими частичное применение. + + + + To learn more about these operators, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/#function-composition-and-pipelining + Подробности об этих операторах: https://docs.microsoft.com/ru-ru/dotnet/articles/fsharp/language-reference/functions/#function-composition-and-pipelining. + + + + To learn more about Partial Application, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/#partial-application-of-arguments + Подробности о частичном применении: https://docs.microsoft.com/ru-ru/dotnet/articles/fsharp/language-reference/functions/#partial-application-of-arguments. + + + + Squares a value. + Возводит значение в квадрат. + + + + Adds 1 to a value. + Добавляет 1 к значению. + + + + Tests if an integer value is odd via modulo. + Проверяет, является ли целое число нечетным по модулю. + + + + A list of 5 numbers. More on lists later. + Список из 5 чисел. Дополнительно о списках позднее. + + + + Given a list of integers, it filters out the even numbers, + При наличии списка целых чисел выполняет фильтрацию по номерам событий, + + + + squares the resulting odds, and adds 1 to the squared odds. + возводит полученные нечетные в квадрат, а затем добавляет 1 к нечетным, возведенным в квадрат. + + + + A shorter way to write 'squareOddValuesAndAddOne' is to nest each + Более короткий способ записи squareOddValuesAndAddOne — вложить каждый + + + + sub-result into the function calls themselves. + вложенный результат в сами вызовы функции. + + + + This makes the function much shorter, but it's difficult to see the + Это позволяет значительно сократить функцию, но будет сложно увидеть + + + + order in which the data is processed. + порядок, в котором обрабатываются данные. + + + + A preferred way to write 'squareOddValuesAndAddOne' is to use F# pipe operators. + Предпочтительный способ записи squareOddValuesAndAddOne — использовать операторы конвейера F#. + + + + This allows you to avoid creating intermediate results, but is much more readable + Это позволяет избежать создания промежуточных результатов, и при этом более удобно для чтения, + + + + than nesting function calls like 'squareOddValuesAndAddOneNested' + чем вложение вызовов функций, таких как squareOddValuesAndAddOneNested. + + + + You can shorten 'squareOddValuesAndAddOnePipeline' by moving the second `List.map` call + squareOddValuesAndAddOnePipeline можно сократить, переместив второй вызов List.map + + + + into the first, using a Lambda Function. + в первый, используя лямбда-функцию. + + + + Note that pipelines are also being used inside the lambda function. F# pipe operators + Учтите, что конвейеры также используются внутри лямбда-функции. Операторы конвейера F# + + + + can be used for single values as well. This makes them very powerful for processing data. + можно также использовать для отдельных значений. Это делает их очень эффективными при обработке данных. + + + + Lastly, you can eliminate the need to explicitly take 'values' in as a parameter by using '>>' + И наконец, можно исключить необходимость явного принятия значений в качестве параметра при помощи ">>" + + + + to compose the two core operations: filtering out even numbers, then squaring and adding one. + для объединения двух основных операций: фильтрации четных чисел, а затем возведения в квадрат и добавления единицы. + + + + Likewise, the 'fun x -> ...' bit of the lambda expression is also not needed, because 'x' is simply + Аналогично, часть "fun x -> ..." лямбда-выражения также не требуется, так как x просто + + + + being defined in that scope so that it can be passed to a functional pipeline. Thus, '>>' can be used + определяется в этой области действия, чтобы его можно было передать в функциональный конвейер. Таким образом, здесь также можно + + + + there as well. + использовать ">>". + + + + The result of 'squareOddValuesAndAddOneComposition' is itself another function which takes a + Результат squareOddValuesAndAddOneComposition сам по себе является другой функцией, которая принимает + + + + list of integers as its input. If you execute 'squareOddValuesAndAddOneComposition' with a list + список целых чисел в качестве входных данных. Если squareOddValuesAndAddOneComposition выполняется со списком + + + + of integers, you'll notice that it produces the same results as previous functions. + целых чисел, вы заметите, что результаты соответствуют результатам предыдущих функций. + + + + This is using what is known as function composition. This is possible because functions in F# + Используется так называемая композиция функций. Это возможно, так как функции в F# + + + + use Partial Application and the input and output types of each data processing operation match + используют частичное применение, а входные и выходные типы каждой операции обработки данных соответствуют + + + + the signatures of the functions we're using. + сигнатурам функций, которые мы используем. + + + + Lists are ordered, immutable, singly-linked lists. They are eager in their evaluation. + Списки — это упорядоченные, неизменяемые однонаправленные списки. При вычислении они являются безотложными. + + + + This module shows various ways to generate lists and process lists with some functions + Этот модуль демонстрирует различные способы создания и обработки списков при помощи некоторых функций + + + + in the 'List' module in the F# Core Library. + в модуле List основной библиотеки F#. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/lists + Подробности: https://docs.microsoft.com/ru-ru/dotnet/articles/fsharp/language-reference/lists. + + + + Lists are defined using [ ... ]. This is an empty list. + Списки определяются с помощью [ ... ]. Это пустой список. + + + + This is a list with 3 elements. ';' is used to separate elements on the same line. + Это — список с тремя элементами. Символ ";" используется для разделения элементов в одной строке. + + + + You can also separate elements by placing them on their own lines. + Элементы можно также разделить, поместив их в отдельные строки. + + + + This is a list of integers from 1 to 1000 + Это список целых чисел от 1 до 1000. + + + + Lists can also be generated by computations. This is a list containing + Списки также могут создаваться в результате вычислений. Это список, содержащий + + + + all the days of the year. + все дни года. + + + + Print the first 5 elements of 'daysList' using 'List.take'. + Вывод первых пяти элементов daysList при помощи List.take. + + + + Computations can include conditionals. This is a list containing the tuples + Вычисления могут включать условные выражения. Это список, содержащий кортежи + + + + which are the coordinates of the black squares on a chess board. + являющиеся координатами черных квадратов на шахматной доске. + + + + Lists can be transformed using 'List.map' and other functional programming combinators. + Списки можно преобразовывать с помощью List.map и других методов объединения, применяемых в функциональном программировании. + + + + This definition produces a new list by squaring the numbers in numberList, using the pipeline + Это определение создает новый список путем возведения в квадрат чисел из numberList с помощью конвейера. + + + + operator to pass an argument to List.map. + оператор для передачи аргумента в List.map. + + + + There are many other list combinations. The following computes the sum of the squares of the + Существует множество других сочетаний списков. Приведенный ниже код вычисляет сумму квадратов. + + + + numbers divisible by 3. + числа, кратные 3. + + + + Arrays are fixed-size, mutable collections of elements of the same type. + Массивы — это изменяемые коллекции фиксированного размера, содержащие элементы одного типа. + + + + Although they are similar to Lists (they support enumeration and have similar combinators for data processing), + Хотя они и похожи на списки (поддерживают перечисление и включают схожие методы объединения для обработки данных), + + + + they are generally faster and support fast random access. This comes at the cost of being less safe by being mutable. + они, как правило, быстрее и поддерживают быстрый случайный доступ. С другой стороны, они менее безопасны, так как изменяемы. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/arrays + Подробности: https://docs.microsoft.com/ru-ru/dotnet/articles/fsharp/language-reference/arrays. + + + + This is The empty array. Note that the syntax is similar to that of Lists, but uses `[| ... |]` instead. + Это — пустой массив. Обратите внимание, что синтаксис похож на синтаксис списков, но используются квадратные скобки "[| ... |]". + + + + Arrays are specified using the same range of constructs as lists. + Массивы задаются с помощью того же диапазона конструкций в виде списков. + + + + This is an array of numbers from 1 to 1000. + Это массив чисел от 1 до 1000. + + + + This is an array containing only the words "hello" and "world". + Это — массив, содержащий только слова "hello" и "world". + + + + This is an array initialized by index and containing the even numbers from 0 to 2000. + Это — массив, инициализируемый по индексу и содержащий четные числа от 0 до 2000. + + + + Sub-arrays are extracted using slicing notation. + Подмассивы извлекаются с помощью нотации выделения фрагмента. + + + + You can loop over arrays and lists using 'for' loops. + Можно выполнять перебор массивов и списков при помощи циклов for. + + + + You can modify the contents of an an array element by using the left arrow assignment operator. + Изменить содержимое элемента массива можно с помощью оператора присваивания в виде стрелки влево. + + + + To learn more about this operator, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/values/index#mutable-variables + Подробности об этом операторе: https://docs.microsoft.com/ru-ru/dotnet/articles/fsharp/language-reference/values/index#mutable-variables. + + + + You can transform arrays using 'Array.map' and other functional programming operations. + Вы можете преобразовывать массивы при помощи Array.map и других операций функционального программирования. + + + + The following calculates the sum of the lengths of the words that start with 'h'. + Следующий фрагмент вычисляет сумму длин слов, которые начинаются с буквы "h". + + + + Sequences are a logical series of elements, all of the same type. These are a more general type than Lists and Arrays. + Последовательности — это логические серии элементов одного типа. Это — более общий тип, чем списки и массивы. + + + + Sequences are evaluated on-demand and are re-evaluated each time they are iterated. + Последовательности вычисляются по требованию и заново вычисляются при каждом их переборе. + + + + An F# sequence is an alias for a .NET System.Collections.Generic.IEnumerable<'T>. + Последовательность F# является псевдонимом для .NET System.Collections.Generic.IEnumerable<'T>. + + + + Sequence processing functions can be applied to Lists and Arrays as well. + Функции обработки последовательностей можно также применять к спискам и массивам. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/sequences + Подробности: https://docs.microsoft.com/ru-ru/dotnet/articles/fsharp/language-reference/sequences + + + + This is the empty sequence. + Это пустая последовательность. + + + + This a sequence of values. + Это последовательность значений. + + + + This is an on-demand sequence from 1 to 1000. + Это последовательность по требованию от 1 до 1000. + + + + This is a sequence producing the words "hello" and "world" + Это последовательность, создающая слова hello и world. + + + + This sequence producing the even numbers up to 2000. + Эта последовательность выдает целые числа до 2000. + + + + This is an infinite sequence which is a random walk. + Это бесконечная последовательность, представляющая случайное блуждание. + + + + This example uses yield! to return each element of a subsequence. + В этом примере используется оператор yield! для получения каждого элемента подпоследовательности. + + + + This example shows the first 100 elements of the random walk. + В этом примере показаны первые 100 элементов случайного блуждания. + + + + Recursive functions can call themselves. In F#, functions are only recursive + Рекурсивные функции могут вызывать сами себя. В F# функции являются рекурсивными только + + + + when declared using 'let rec'. + при объявлении с помощью let rec. + + + + Recursion is the preferred way to process sequences or collections in F#. + Рекурсия — это предпочтительный способ обработки последовательностей или коллекций в F#. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/index#recursive-functions + Подробности: https://docs.microsoft.com/ru-ru/dotnet/articles/fsharp/language-reference/functions/index#recursive-functions. + + + + This example shows a recursive function that computes the factorial of an + В этом примере показана рекурсивная функция, вычисляющая факториал + + + + integer. It uses 'let rec' to define a recursive function. + целое число. В нем используется "let rec" для определения рекурсивной функции. + + + + Computes the greatest common factor of two integers. + Вычисляет наибольший общий делитель двух целых чисел. + + + + Since all of the recursive calls are tail calls, + Так как все рекурсивные вызовы являются хвостовыми вызовами, + + + + the compiler will turn the function into a loop, + компилятор сделает из функции цикл, + + + + which improves performance and reduces memory consumption. + что повысит производительность и снизит потребление памяти. + + + + This example computes the sum of a list of integers using recursion. + Этот пример вычисляет сумму списка целых чисел при помощи рекурсии. + + + + This makes 'sumList' tail recursive, using a helper function with a result accumulator. + При этом sumList становится функцией с хвостовой рекурсией, использующей вспомогательную функцию с аккумулятором результатов. + + + + This invokes the tail recursive helper function, providing '0' as a seed accumulator. + Вызывается вспомогательная функция хвостовой рекурсии, предоставляющая "0" в качестве аккумулятора начальных значений. + + + + An approach like this is common in F#. + Подобный подход широко распространен в F#. + + + + Records are an aggregate of named values, with optional members (such as methods). + Записи являются агрегатами именованных значений с необязательными элементами (такими как методы). + + + + They are immutable and have structural equality semantics. + Они являются неизменяемыми и обладают семантикой структурного равенства. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/records + Подробности: https://docs.microsoft.com/ru-ru/dotnet/articles/fsharp/language-reference/records. + + + + This example shows how to define a new record type. + В этом примере показано, как определить новый тип записи. + + + + This example shows how to instantiate a record type. + В этом примере показано создание экземпляра типа записи. + + + + You can also do this on the same line with ';' separators. + Это также можно сделать в одной строке при помощи разделителя ";", + + + + This example shows how to use "copy-and-update" on record values. It creates + В этом примере показано, как использовать функцию "копировать и обновить" применительно к значениям записей. В нем создается + + + + a new record value that is a copy of contact1, but has different values for + новое значение записи, которое является копией contact1, но имеет другие значения для + + + + the 'Phone' and 'Verified' fields. + поля Phone и Verified. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/copy-and-update-record-expressions + Подробности: https://docs.microsoft.com/ru-ru/dotnet/articles/fsharp/language-reference/copy-and-update-record-expressions. + + + + This example shows how to write a function that processes a record value. + В этом примере показано, как создать функцию, обрабатывающую значение записи. + + + + It converts a 'ContactCard' object to a string. + Он преобразует объект ContactCard в строку. + + + + This is an example of a Record with a member. + Это — пример записи с элементом. + + + + Members can implement object-oriented members. + Элементы могут реализовать объектно-ориентированные элементы. + + + + Members are accessed via the '.' operator on an instantiated type. + Доступ к элементам осуществляется через оператор "." для экземпляра типа. + + + + Records can also be represented as structs via the 'Struct' attribute. + Записи также могут быть представлены как структуры при помощи атрибута Struct. + + + + This is helpful in situations where the performance of structs outweighs + Это удобно в ситуациях, когда производительность структур важнее + + + + the flexibility of reference types. + гибкости ссылочных типов. + + + + Discriminated Unions (DU for short) are values which could be a number of named forms or cases. + Размеченные объединения (DU) — это значения, которые могут состоять из нескольких именованных форм или ветвей. + + + + Data stored in DUs can be one of several distinct values. + Данные, хранимые в размеченных объединениях, могут являться одними из нескольких различных значений. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/discriminated-unions + Подробности: https://docs.microsoft.com/ru-ru/dotnet/articles/fsharp/language-reference/discriminated-unions. + + + + The following represents the suit of a playing card. + Следующий код представляет масть игральной карты. + + + + A Disciminated Union can also be used to represent the rank of a playing card. + Размеченное объединение также может использоваться для представления ранга игральной карты. + + + + Represents the rank of cards 2 .. 10 + Представляет достоинство карт 2 .. 10 + + + + Discriminated Unions can also implement object-oriented members. + Кроме того, размеченные объединения могут реализовать объектно-ориентированные элементы. + + + + This is a record type that combines a Suit and a Rank. + Это тип записи, объединяющий масть и достоинство. + + + + It's common to use both Records and Disciminated Unions when representing data. + Как правило, при представлении данных используются как записи, так и размеченные объединения. + + + + This computes a list representing all the cards in the deck. + Вычисляется список, представляющий все карты в колоде. + + + + This example converts a 'Card' object to a string. + В этом примере объект Card преобразуется в строку. + + + + This example prints all the cards in a playing deck. + В этом примере печатаются все карты колоды. + + + + Single-case DUs are often used for domain modeling. This can buy you extra type safety + Размеченные объединения с одной ветвью часто используются для моделирования доменов. Это более типобезопасно, чем использование + + + + over primitive types such as strings and ints. + примитивных типов, таких как строки и целые числа. + + + + Single-case DUs cannot be implicitly converted to or from the type they wrap. + Размеченные объединения с одной ветвью нельзя неявно преобразовать в тип или из типа, оболочкой которого они служат. + + + + For example, a function which takes in an Address cannot accept a string as that input, + Например, функция, которая принимает адрес, не может принять в качестве входных данных строку + + + + or vive/versa. + или наоборот. + + + + You can easily instantiate a single-case DU as follows. + Можно легко создать экземпляр размеченного объединения с одной ветвью следующим образом. + + + + When you need the value, you can unwrap the underlying value with a simple function. + Если вам требуется значение, вы можете распаковать базовое значение при помощи простой функции. + + + + Printing single-case DUs is simple with unwrapping functions. + Вывод размеченных объединений с одной ветвью не представляет сложности при использовании функций распаковки. + + + + Disciminated Unions also support recursive definitions. + Размеченные объединения также поддерживают рекурсивные определения. + + + + This represents a Binary Search Tree, with one case being the Empty tree, + Это представляет двоичное дерево поиска, в котором одна ветвь является пустым деревом, + + + + and the other being a Node with a value and two subtrees. + а другая — узлом со значением и двумя поддеревьями. + + + + Check if an item exists in the binary search tree. + Проверка наличия элемента в двоичном дереве поиска. + + + + Searches recursively using Pattern Matching. Returns true if it exists; otherwise, false. + Рекурсивный поиск при помощи сопоставления шаблонов. Возвращает значение True, если существует; в противном случае — значение False. + + + + Check the left subtree. + Проверка левого поддерева. + + + + Check the right subtree. + Проверка правого поддерева. + + + + Inserts an item in the Binary Search Tree. + Вставляет элемент в двоичное дерево поиска. + + + + Finds the place to insert recursively using Pattern Matching, then inserts a new node. + Находит место для рекурсивной вставки при помощи сопоставления шаблонов, а затем вставляет новый узел. + + + + If the item is already present, it does not insert anything. + Если элемент уже существует, ничего не вставляется. + + + + No need to insert, it already exists; return the node. + Нет необходимости вставки, так как она уже существует; возврат узла. + + + + Call into left subtree. + Вызов левого поддерева. + + + + Call into right subtree. + Вызов правого поддерева. + + + + Discriminated Unions can also be represented as structs via the 'Struct' attribute. + Размеченные объединения также могут быть представлены как структуры при помощи атрибута Struct. + + + + This is helpful in situations where the performance of structs outweighs + Это удобно в ситуациях, когда производительность структур важнее + + + + the flexibility of reference types. + гибкости ссылочных типов. + + + + However, there are two important things to know when doing this: + Но при этом следует помнить о следующих двух важных вещах: + + + + 1. A struct DU cannot be recursively-defined. + 1. Размеченное объединение структуры не может определяться рекурсивно. + + + + 2. A struct DU must have unique names for each of its cases. + 2. Каждой из ветвей размеченного объединения структуры должны быть присвоены уникальные названия. + + + + Pattern Matching is a feature of F# that allows you to utilize Patterns, + Сопоставление шаблонов — это возможность F#, которая позволяет использовать шаблоны, + + + + which are a way to compare data with a logical structure or structures, + что представляет способ сравнения данных с логической структурой или структурами, + + + + decompose data into constituent parts, or extract information from data in various ways. + разложение данных на составные части или извлечение информации из данных различными способами. + + + + You can then dispatch on the "shape" of a pattern via Pattern Matching. + Затем можно передать "форму" шаблона при помощи сопоставления шаблонов. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/pattern-matching + Подробности: https://docs.microsoft.com/ru-ru/dotnet/articles/fsharp/language-reference/pattern-matching. + + + + A record for a person's first and last name + Запись с именем и фамилией человека + + + + A Discriminated Union of 3 different kinds of employees + Размеченное соединение трех разных типов сотрудников + + + + Count everyone underneath the employee in the management hierarchy, + Подсчет всех сотрудников на уровнях иерархии управления, следующих за этим сотрудником, + + + + including the employee. + включая этого сотрудника. + + + + Find all managers/executives named "Dave" who do not have any reports. + Поиск всех менеджеров и руководителей с именем Dave, не имеющих отчетов. + + + + This uses the 'function' shorthand to as a lambda expression. + При этом используется сокращение функции до лямбда-выражения. + + + + [] matches an empty list. + [] соответствует пустому списку. + + + + '_' is a wildcard pattern that matches anything. + "_" — подстановочный знак, обозначающий любой набор символов. + + + + This handles the "or else" case. + Обрабатывается ветвь "or else". + + + + You can also use the shorthand function construct for pattern matching, + Для сопоставления шаблонов можно также использовать краткую форму конструкции функции, + + + + which is useful when you're writing functions which make use of Partial Application. + что удобно при написании функций, использующих частичное применение. + + + + Define some more functions which parse with the helper function. + Определение некоторых других функций, которые выполняют анализ при помощи вспомогательной функции. + + + + Active Patterns are another powerful construct to use with pattern matching. + Активные шаблоны — это еще одна эффективная конструкция, используемая при сопоставлении шаблонов. + + + + They allow you to partition input data into custom forms, decomposing them at the pattern match call site. + Они позволяют сегментировать входные данные в настраиваемые формы с декомпозицией в месте вызова сопоставления шаблонов. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/active-patterns + Подробности: https://docs.microsoft.com/ru-ru/dotnet/articles/fsharp/language-reference/active-patterns. + + + + Pattern Matching via 'function' keyword and Active Patterns often looks like this. + Сопоставление шаблонов по ключевому слову function и активным шаблонам часто выглядит следующим образом. + + + + Call the printer with some different values to parse. + Вызов принтера с несколькими разными значениями для анализа. + + + + Option values are any kind of value tagged with either 'Some' or 'None'. + Опциональные значения - это любой тип значений, отмеченных ключевым словом Some или None. + + + + They are used extensively in F# code to represent the cases where many other + Они широко используются в коде F# для представления случаев, когда во многих + + + + languages would use null references. + других языках используются пустые ссылки. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/options + Подробности: https://docs.microsoft.com/ru-ru/dotnet/articles/fsharp/language-reference/options. + + + + First, define a zipcode defined via Single-case Discriminated Union. + Во-первых, определите индекс при помощи размеченного объединения с одной ветвью. + + + + Next, define a type where the ZipCode is optional. + Далее определите тип, в котором ZipCode является необязательным. + + + + Next, define an interface type that represents an object to compute the shipping zone for the customer's zip code, + Далее определите тип интерфейса, представляющий объект для вычисления зоны доставки по почтовому индексу заказчика, + + + + given implementations for the 'getState' and 'getShippingZone' abstract methods. + при заданных реализациях абстрактных методов getState и getShippingZone. + + + + Next, calculate a shipping zone for a customer using a calculator instance. + Затем определите зону доставки для заказчика при помощи экземпляра калькулятора. + + + + This uses combinators in the Option module to allow a functional pipeline for + При этом используются методы объединения в модуле Option, чтобы обеспечить работу функционального конвейера для + + + + transforming data with Optionals. + преобразования данных с помощью Optionals. + + + + Units of measure are a way to annotate primitive numeric types in a type-safe way. + Единицы измерения — это способ аннотации примитивных числовых типов типобезопасным способом. + + + + You can then perform type-safe arithmetic on these values. + Затем с этими значениями можно выполнять типобезопасные арифметические действия. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/units-of-measure + Подробности: https://docs.microsoft.com/ru-ru/dotnet/articles/fsharp/language-reference/units-of-measure. + + + + First, open a collection of common unit names + Сначала откройте коллекцию стандартных названий единиц измерения. + + + + Define a unitized constant + Определите константу с единицей измерения. + + + + Next, define a new unit type + Далее определите новый тип единицы. + + + + Conversion factor mile to meter. + Коэффициент пересчета миль в метры. + + + + Define a unitized constant + Определите константу с единицей измерения. + + + + Compute metric-system constant + Вычислите константу в метрической системе. + + + + Values using Units of Measure can be used just like the primitive numeric type for things like printing. + Значения, использующие единицы измерения, можно применять как примитивные числовые типы для таких действий, как печать. + + + + Classes are a way of defining new object types in F#, and support standard Object-oriented constructs. + Классы — это способ определения новых типов объектов в F#. Они поддерживают стандартные объектно-ориентированные конструкции. + + + + They can have a variety of members (methods, properties, events, etc.) + Они могут содержать различные элементы (методы, свойства, события и т. д.) + + + + To learn more about Classes, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/classes + Подробности о классах: https://docs.microsoft.com/ru-ru/dotnet/articles/fsharp/language-reference/classes. + + + + To learn more about Members, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/members + Подробности об элементах: https://docs.microsoft.com/ru-ru/dotnet/articles/fsharp/language-reference/members. + + + + A simple two-dimensional Vector class. + Простой двухмерный класс Vector. + + + + The class's constructor is on the first line, + Конструктор класса находится в первой строке + + + + and takes two arguments: dx and dy, both of type 'double'. + и принимает два аргумента: dx и dy, оба имеют тип double. + + + + This internal field stores the length of the vector, computed when the + В этом внутреннем поле хранится длина вектора, вычисляемая, когда + + + + object is constructed + объект создается + + + + 'this' specifies a name for the object's self identifier. + Ключевое слово this задает имя идентификатора самого объекта. + + + + In instance methods, it must appear before the member name. + В методах экземпляров оно должно находиться перед именем элемента. + + + + This member is a method. The previous members were properties. + Этот элемент является методом. Предыдущие элементы были свойствами. + + + + This is how you instantiate the Vector2D class. + Вот как выполняется создание экземпляра класса Vector2D. + + + + Get a new scaled vector object, without modifying the original object. + Получение нового объекта масштабируемого вектора без изменения исходного объекта. + + + + Generic classes allow types to be defined with respect to a set of type parameters. + Универсальные классы позволяют определять типы с набором параметров типа. + + + + In the following, 'T is the type parameter for the class. + В следующем примере 'T — это параметр типа для класса. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/generics/ + Подробности: https://docs.microsoft.com/ru-ru/dotnet/articles/fsharp/language-reference/generics/. + + + + This internal field store the states in a list. + В этом внутреннем поле хранятся состояния в списке. + + + + Add a new element to the list of states. + Добавление нового элемента в список состояний. + + + + use the '<-' operator to mutate the value. + Оператор "<-" служит для изменения значения. + + + + Get the entire list of historical states. + Получение полного списка исторических состояний. + + + + Get the latest state. + Получение последнего состояния. + + + + An 'int' instance of the state tracker class. Note that the type parameter is inferred. + Экземпляр int класса отслеживания состояний. Обратите внимание, что параметр типа подразумевается. + + + + Add a state + Добавление состояния + + + + Interfaces are object types with only 'abstract' members. + Интерфейсы — это типы объектов, которые имеют только абстрактные члены. + + + + Object types and object expressions can implement interfaces. + Типы объектов и выражения объектов могут реализовывать интерфейсы. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/interfaces + Подробности: https://docs.microsoft.com/ru-ru/dotnet/articles/fsharp/language-reference/interfaces. + + + + This is a type that implements IDisposable. + Это — тип, который реализует интерфейс IDisposable. + + + + This is the implementation of IDisposable members. + Это — реализация элементов интерфейса IDisposable. + + + + This is an object that implements IDisposable via an Object Expression + Это — объект, реализующий интерфейс IDisposable через выражение объекта. + + + + Unlike other languages such as C# or Java, a new type definition is not needed + В отличие от других языков, таких как C# или Java, новое определение типа не требуется + + + + to implement an interface. + для реализации интерфейса. + + + + The FSharp.Core library defines a range of parallel processing functions. Here + В библиотеке FSharp.Core определен ряд функций параллельной обработки. Здесь + + + + you use some functions for parallel processing over arrays. + вы используете определенные функции для параллельной обработки массивов. + + + + To learn more, see: https://msdn.microsoft.com/en-us/visualfsharpdocs/conceptual/array.parallel-module-%5Bfsharp%5D + Подробности: https://msdn.microsoft.com/ru-ru/visualfsharpdocs/conceptual/array.parallel-module-%5Bfsharp%5D. + + + + First, an array of inputs. + Сначала — массив входных данных. + + + + Next, define a functions that does some CPU intensive computation. + Далее определите функции, выполняющие ряд вычислений с интенсивным использованием ЦП. + + + + Next, do a parallel map over a large input array. + Затем выполните параллельное сопоставление по большому входному массиву. + + + + Next, print the results. + Далее напечатайте результаты. + + + + Events are a common idiom for .NET programming, especially with WinForms or WPF applications. + События представляют собой стандартные идиомы программирования .NET, особенно для приложений WinForms или WPF. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/members/events + Подробности: https://docs.microsoft.com/ru-ru/dotnet/articles/fsharp/language-reference/members/events. + + + + First, create instance of Event object that consists of subscription point (event.Publish) and event trigger (event.Trigger). + Сначала создайте экземпляр объекта Event, состоящий из точки подписки (event.Publish) и триггера события (event.Trigger). + + + + Next, add handler to the event. + Затем добавьте обработчик для события. + + + + Next, trigger the event. + Затем активируйте событие. + + + + Next, create an instance of Event that follows standard .NET convention: (sender, EventArgs). + Затем создайте экземпляр события в соответствии со стандартным соглашением .NET: (sender, EventArgs). + + + + Next, add a handler for this new event. + Затем добавьте обработчик для этого нового события. + + + + Next, trigger this event (note that sender argument should be set). + Затем вызовите событие (обратите внимание на то, что аргумент sender должен быть задан). + + + + + \ No newline at end of file diff --git a/vsintegration/ProjectTemplates/TutorialProject/Template/xlf/Tutorial.fsx.tr.xlf b/vsintegration/ProjectTemplates/TutorialProject/Template/xlf/Tutorial.fsx.tr.xlf new file mode 100644 index 00000000000..cc131aae88d --- /dev/null +++ b/vsintegration/ProjectTemplates/TutorialProject/Template/xlf/Tutorial.fsx.tr.xlf @@ -0,0 +1,1637 @@ + + + + + + This sample will guide you through elements of the F# language. + Bu örnek, size F# dilinin öğelerini gösterir. + + + + To execute the code in F# Interactive, highlight a section of code and press Alt-Enter or right-click + Kodu F# Etkileşimli'de yürütmek için kodun bir bölümünü vurgulayın ve Alt-Enter'a basın veya sağ tıklatın + + + + and select "Execute in Interactive". You can open the F# Interactive Window from the "View" menu. + ve "Etkileşimlide Yürüt" seçeneğini belirleyin. F# Etkileşimli Penceresini "Görünüm" menüsünden açabilirsiniz. + + + + For more about F#, see: + F# hakkında daha fazla bilgi için bkz: + + + + To see this tutorial in documentation form, see: + Bu öğreticiyi belge biçiminde görmek için, bkz: + + + + To learn more about applied F# programming, use + Uygulamalı #F programlama hakkında daha fazla bilgi edinmek için şunu kullanın: + + + + To install the Visual F# Power Tools, use + Visual F# Power Tools'u yüklemek için + + + + 'Tools' --> 'Extensions and Updates' --> `Online` and search + 'Araçlar' --> 'Uzantılar ve Güncelleştirmeler' --> `Çevrimiçi` seçeneğini kullanın ve arama yapın + + + + For additional templates to use with F#, see the 'Online Templates' in Visual Studio, + F# ile kullanabileceğiniz ek şablonlar için Visual Studio'daki 'Çevrimiçi Şablonlar'a bakın, + + + + 'New Project' --> 'Online Templates' + 'Yeni Proje' --> 'Çevrimiçi Şablonlar' + + + + F# supports three kinds of comments: + F# üç açıklama türünü destekler: + + + + 1. Double-slash comments. These are used in most situations. + 1. Çift eğik çizgili açıklamalar. Çoğu durumda bunlar kullanılır. + + + + 2. ML-style Block comments. These aren't used that often. + 2. ML stili Blok açıklamaları. Bunlar sık kullanılmaz. + + + + 3. Triple-slash comments. These are used for documenting functions, types, and so on. + 3. Üç eğik çizgili açıklamalar. Bunlar işlevleri, türleri vb. belgelemek için kullanılır. + + + + They will appear as text when you hover over something which is decorated with these comments. + Bu açıklamalarla belirlenmiş bir öğenin üzerine geldiğinizde, açıklamalar metin olarak görüntülenir. + + + + They also support .NET-style XML comments, which allow you to generate reference documentation, + Ayrıca başvuru belgeleri oluşturmanıza olanak sağlayan .NET stili XML açıklamalarını destekler, + + + + and they also allow editors (such as Visual Studio) to extract information from them. + bilgi ayıklamak için düzenleyicilerin (örneğin Visual Studio) kullanılmasına da olanak sağlar. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/xml-documentation + Daha fazla bilgi için bkz. https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/xml-documentation + + + + Open namespaces using the 'open' keyword. + 'Open' anahtar sözcüğünü kullanarak ad alanlarını açın. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/import-declarations-the-open-keyword + Daha fazla bilgi için bkz. https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/import-declarations-the-open-keyword + + + + A module is a grouping of F# code, such as values, types, and function values. + Modül; değer, tür ve işlev değeri gibi bir F# kodu gruplandırmasıdır. + + + + Grouping code in modules helps keep related code together and helps avoid name conflicts in your program. + Kodu modüller içinde gruplandırmak ilgili kodların bir arada bulunmasını sağlar ve programınızda ad çakışmalarını önlemeye yardımcı olur. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/modules + Daha fazla bilgi için bkz. https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/modules + + + + This is a sample integer. + Bu, örnek bir tamsayıdır. + + + + This is a sample floating point number. + Bu, örnek bir kayan noktalı sayıdır. + + + + This computed a new number by some arithmetic. Numeric types are converted using + Bu, aritmetik kullanarak yeni bir sayı hesaplar. Sayısal türler + + + + functions 'int', 'double' and so on. + 'int', 'double' vb. işlevler kullanılarak dönüştürülür. + + + + This is a list of the numbers from 0 to 99. + Bu, 0'dan 99'a kadar olan sayıların listesidir. + + + + This is a list of all tuples containing all the numbers from 0 to 99 and their squares. + Bu, 0'dan 99'a kadar olan sayıları ve bunların karelerini içeren bir listedir. + + + + The next line prints a list that includes tuples, using '%A' for generic printing. + Sonraki satır genel yazdırma için '%A' kullanarak demetleri içeren bir liste yazdırır. + + + + This is a sample integer with a type annotation + Bu tür açıklaması olan örnek bir tamsayıdır + + + + Values in F# are immutable by default. They cannot be changed + F# değerleri varsayılan olarak sabittir. Bu değerler + + + + in the course of a program's execution unless explicitly marked as mutable. + değiştirilebilir olarak açıkça işaretlenmediği sürece bir programın yürütülmesi sırasında değiştirilemez. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/values/index#why-immutable + Daha fazla bilgi için bkz. https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/values/index#why-immutable + + + + Binding a value to a name via 'let' makes it immutable. + Bir değeri 'let' ile bir ada bağlamak, değeri sabit yapar. + + + + The second line of code fails to compile because 'number' is immutable and bound. + 'Number' değişmez ve bağlı olduğu için ikinci kod satırı derlenemiyor. + + + + Re-defining 'number' to be a different value is not allowed in F#. + F# içinde 'number' değerini farklı bir değer olarak yeniden tanımlamaya izin verilmez. + + + + A mutable binding. This is required to be able to mutate the value of 'otherNumber'. + Değiştirilebilir bir bağlama. Bu, 'otherNumber' değerini değiştirmek için gereklidir. + + + + When mutating a value, use '<-' to assign a new value. + Bir değeri değiştirirken, yeni bir değer atamak için '<-' kullanın. + + + + You could not use '=' here for this purpose since it is used for equality + Eşitlik amacıyla kullanıldığından, burada '=' kullanamazsınız + + + + or other contexts such as 'let' or 'module' + veya 'let' ya da 'module' gibi diğer bağlamlar + + + + Much of F# programming consists of defining functions that transform input data to produce + F# programlama çoğunlukla, giriş verilerini kullanışlı sonuçlara dönüştüren işlevleri + + + + useful results. + tanımlamaktan oluşur. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/ + Daha fazla bilgi için bkz. https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/ + + + + You use 'let' to define a function. This one accepts an integer argument and returns an integer. + Bir işlevi tanımlamak için 'let' kullanın. Bu, bir tamsayı bağımsız değişkenini kabul ederek bir tamsayı döndürür. + + + + Parentheses are optional for function arguments, except for when you use an explicit type annotation. + İşlev bağımsız değişkenlerinde ayraçlar, açık tür ek açıklaması kullanılan durumlar dışında isteğe bağlıdır. + + + + Apply the function, naming the function return result using 'let'. + İşlev döndürme sonucunu 'let' ile adlandırarak işlevi uygulayın. + + + + The variable type is inferred from the function return type. + Değişken türü, işlev dönüş türü olarak algılanır. + + + + This line uses '%d' to print the result as an integer. This is type-safe. + Bu satır, sonucu bir tamsayı olarak yazdırmak için '%d' kullanır. Tür kullanımıyla uyumludur. + + + + If 'result1' were not of type 'int', then the line would fail to compile. + 'Result1' 'int' türünde değilse, satır derleme işlemi başarısız olur. + + + + When needed, annotate the type of a parameter name using '(argument:type)'. Parentheses are required. + Gerekli olduğunda, '(argument:type)' kullanarak parametre adı türü için ek açıklama girin. Ayraçlar gereklidir. + + + + Conditionals use if/then/elid/elif/else. + Koşullu deyimlerde if/then/elid/elif/else kullanılır. + + + + Note that F# uses whitespace indentation-aware syntax, similar to languages like Python. + F#'ın, Python gibi diller ile benzer şekilde, boşluk girintisini tanıyan söz dizimi kullandığını unutmayın. + + + + This line uses '%f' to print the result as a float. As with '%d' above, this is type-safe. + Bu satır, sonucu kayan noktalı sayı olarak yazdırmak için '%f' kullanır. Yukarıdaki '%d' gibi bu da tür kullanımıyla uyumludur. + + + + Booleans are fundamental data types in F#. Here are some examples of Booleans and conditional logic. + Boole değerleri, F# içindeki temel veri türleridir. Aşağıda bazı Boole ve koşullu mantık örnekleri verilmiştir. + + + + To learn more, see: + Daha fazla bilgi için bkz. + + + + and + ve + + + + Booleans values are 'true' and 'false'. + Boole değerleri şunlardır: 'true' ve 'false'. + + + + Operators on booleans are 'not', '&&' and '||'. + Boole değerleri üzerindeki işleçler: 'not', '&&' ve '||'. + + + + This line uses '%b'to print a boolean value. This is type-safe. + Bu satır, bir boole değeri yazdırmak için '%b' kullanır. Tür kullanımıyla uyumludur. + + + + Strings are fundamental data types in F#. Here are some examples of Strings and basic String manipulation. + Dizeler, F# içindeki temel veri türleridir. Aşağıda bazı Dizeler ve temel dize işleme örnekleri verilmiştir. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/strings + Daha fazla bilgi için bkz. https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/strings + + + + Strings use double quotes. + Dizeler çift tırnak kullanır. + + + + Strings can also use @ to create a verbatim string literal. + Dizeler ayrıca, tam harf dizisi oluşturmak için @ kullanabilir. + + + + This will ignore escape characters such as '\', '\n', '\t', etc. + Bu; '\', '\n', '\t' vb. kaçış karakterlerini yoksayar. + + + + String literals can also use triple-quotes. + Harf dizileri ayrıca üçlü tırnak da kullanabilir. + + + + String concatenation is normally done with the '+' operator. + Dizi bitiştirme normalde '+' işleci ile yapılır. + + + + This line uses '%s' to print a string value. This is type-safe. + Bu satır, bir dize değeri yazdırmak için '%s' kullanır. Tür kullanımıyla uyumludur. + + + + Substrings use the indexer notation. This line extracts the first 7 characters as a substring. + Alt dizeler dizin oluşturucu gösterimini kullanır. Bu satır, ilk 7 karakteri alt dize olarak ayıklar. + + + + Note that like many languages, Strings are zero-indexed in F#. + Birçok dilde olduğu gibi F#'ta da Dizeler sıfır dizinlidir. + + + + Tuples are simple combinations of data values into a combined value. + Demetler, veri değerlerinin birleşik bir değer halindeki basit bileşimleridir. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/tuples + Daha fazla bilgi için bkz. https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/tuples + + + + A simple tuple of integers. + Basit bir tamsayı demeti. + + + + A function that swaps the order of two values in a tuple. + Bir demetteki iki değerin sırasını değiştiren bir işlev. + + + + F# Type Inference will automatically generalize the function to have a generic type, + F# Tür Çıkarımı, işlevi genel türe sahip olacak şekilde otomatik olarak genelleştirir, + + + + meaning that it will work with any type. + yani, herhangi bir tür ile çalışabilir. + + + + A tuple consisting of an integer, a string, + Bir tamsayı, bir dize ve bir çift duyarlıklı kayan nokta sayısından + + + + and a double-precision floating point number. + oluşan bir demet. + + + + A simple tuple of integers with a type annotation. + Tür ek açıklaması içeren basit bir tamsayı tanımlama grubu. + + + + Type annotations for tuples use the * symbol to separate elements + Tanımlama grupları için tür ek açıklamaları öğeleri ayırmak için * sembolünü kullanır + + + + Tuples are normally objects, but they can also be represented as structs. + Demetler, normalde nesnedir ancak yapı olarak da gösterilebilir. + + + + These interoperate completely with structs in C# and Visual Basic.NET; however, + Bunlar C# ve Visual Basic.NET ile tamamen uyumlu olarak birlikte çalışır ancak + + + + struct tuples are not implicitly convertable with object tuples (often called reference tuples). + yapı demetleri, nesne demetleri ile (genellikle başvuru demetleri olarak adlandırılır) örtük olarak dönüştürülebilir değildir. + + + + The second line below will fail to compile because of this. Uncomment it to see what happens. + Bu nedenle aşağıdaki ikinci satırı derleme işlemi başarısız olacak. Ne olacağını görmek için açıklamayı kaldırın. + + + + Although you cannot implicitly convert between struct tuples and reference tuples, + Yapı demetleri ile başvuru demetleri arasında örtük dönüştürme gerçekleştiremezsiniz, ancak + + + + you can explicitly convert via pattern matching, as demonstrated below. + aşağıda gösterildiği gibi, desen eşleştirme aracılığıyla açık dönüştürme gerçekleştirebilirsiniz. + + + + The F# pipe operators ('|>', '<|', etc.) and F# composition operators ('>>', '<<') + F# kanal işleçleri ('|>', '<|', vb.) ve F# birleştirme işleçleri ('>>', '<<') + + + + are used extensively when processing data. These operators are themselves functions + veriler işlenirken yaygın olarak kullanılır. Bu işleçler, başı başına birer işlevdir ve + + + + which make use of Partial Application. + Kısmi Uygulamadan yararlanır. + + + + To learn more about these operators, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/#function-composition-and-pipelining + Bu işleçler hakkında daha fazla bilgi için bkz. https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/#function-composition-and-pipelining + + + + To learn more about Partial Application, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/#partial-application-of-arguments + Kısmi Uygulama hakkında daha fazla bilgi için bkz. https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/#partial-application-of-arguments + + + + Squares a value. + Bir değerin karesini alır. + + + + Adds 1 to a value. + Bir değere 1 ekler. + + + + Tests if an integer value is odd via modulo. + Mod aracılığıyla bir tamsayı değerinin tek sayı olup olmadığını test eder. + + + + A list of 5 numbers. More on lists later. + 5 numaradan oluşan bir liste. Listeler hakkında daha fazla bilgiyi ilerleyen bölümlerde bulabilirsiniz. + + + + Given a list of integers, it filters out the even numbers, + Bir tamsayı listesinde, çift sayıları filtreler, + + + + squares the resulting odds, and adds 1 to the squared odds. + kalan tek sayıların karesini alır ve karesi alınan tek sayılara 1 ekler. + + + + A shorter way to write 'squareOddValuesAndAddOne' is to nest each + 'squareOddValuesAndAddOne' yazmanın daha kısa bir yolu, her bir + + + + sub-result into the function calls themselves. + alt sonucu işlev hücrelerinin kendisinde iç içe yerleştirmektir. + + + + This makes the function much shorter, but it's difficult to see the + Bu, işlevi çok daha kısa hale getirir ancak + + + + order in which the data is processed. + verilerin işlenme sırasını görmek zordur. + + + + A preferred way to write 'squareOddValuesAndAddOne' is to use F# pipe operators. + 'squareOddValuesAndAddOne' yazmanın tercih edilen bir yolu, F# kanal işleçlerini kullanmaktır. + + + + This allows you to avoid creating intermediate results, but is much more readable + Bu, ara sonuçlar oluşturmaktan kaçınmanızı sağlar ancak + + + + than nesting function calls like 'squareOddValuesAndAddOneNested' + 'squareOddValuesAndAddOneNested' gibi iç içe geçmiş işlev çağrılarından daha okunaklıdır + + + + You can shorten 'squareOddValuesAndAddOnePipeline' by moving the second `List.map` call + 'squareOddValuesAndAddOnePipeline' öğesini kısaltmak için ikinci `List.map` çağrısını + + + + into the first, using a Lambda Function. + bir Lambda İşlevi kullanarak birinciye taşıyabilirsiniz. + + + + Note that pipelines are also being used inside the lambda function. F# pipe operators + Komut zincirleri, lambda işlevi içinde de kullanılıyor. F# kanal işleçleri + + + + can be used for single values as well. This makes them very powerful for processing data. + tek değerler için de kullanılabilir. Bu, işleçlerin veri işleme işlevlerini geliştirir. + + + + Lastly, you can eliminate the need to explicitly take 'values' in as a parameter by using '>>' + Son olarak, şu iki temel işlemi oluşturmak için '>>' kullanarak 'values' öğesini parametre olarak + + + + to compose the two core operations: filtering out even numbers, then squaring and adding one. + açıkça alma ihtiyacını ortadan kaldırabilirsiniz: çift sayıları filtreleme ve ardından karelerini alıp bir ekleme. + + + + Likewise, the 'fun x -> ...' bit of the lambda expression is also not needed, because 'x' is simply + Benzer şekilde, 'x' bir işlevsel komut zincirine geçirilmek için bu kapsamda tanımlandığından + + + + being defined in that scope so that it can be passed to a functional pipeline. Thus, '>>' can be used + lambda ifadesindeki 'fun x -> ...' bölümü de gerekli değildir. Bu nedenle, '>>' + + + + there as well. + burada da kullanılabilir. + + + + The result of 'squareOddValuesAndAddOneComposition' is itself another function which takes a + 'squareOddValuesAndAddOneComposition' sonucunun kendisi, giriş olarak bir tamsayı listesi alan + + + + list of integers as its input. If you execute 'squareOddValuesAndAddOneComposition' with a list + diğer bir işlevdir. 'squareOddValuesAndAddOneComposition' öğesini bir tamsayı listesi ile + + + + of integers, you'll notice that it produces the same results as previous functions. + yürütürseniz, önceki işlevler ile aynı sonuçları ürettiğini fark görürsünüz. + + + + This is using what is known as function composition. This is possible because functions in F# + Bu, işlev kompozisyonu olarak bilinen işlemi kullanır. Bu, F# içindeki işlevler Kısmi Uygulama kullandığı + + + + use Partial Application and the input and output types of each data processing operation match + ve her bir veri işleme işleminin giriş ve çıkış türleri kullandığımız işlevlerin imzaları ile eşleştiği için + + + + the signatures of the functions we're using. + mümkün olmaktadır. + + + + Lists are ordered, immutable, singly-linked lists. They are eager in their evaluation. + Listeler sıralı, sabit ve tek bağlantılıdır. Bu listelerde erken değerlendirme yapılır. + + + + This module shows various ways to generate lists and process lists with some functions + Bu modül, liste oluşturmanın çeşitli yollarını gösterir ve listeleri F# Core Kitaplığı'ndaki + + + + in the 'List' module in the F# Core Library. + 'List' modülünde yer alan işlevlerle işler. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/lists + Daha fazla bilgi için bkz. https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/lists + + + + Lists are defined using [ ... ]. This is an empty list. + Listeler [ ... ] kullanılarak tanımlanır. Bu boş bir listedir. + + + + This is a list with 3 elements. ';' is used to separate elements on the same line. + Bu, 3 öğeden oluşan bir listedir. ';' aynı satırdaki öğeleri ayırmak için kullanılır. + + + + You can also separate elements by placing them on their own lines. + Öğeleri, ayrı satırlara yerleştirerek de ayırabilirsiniz. + + + + This is a list of integers from 1 to 1000 + Bu, 1'den 1000'e kadar olan tamsayıların listesidir + + + + Lists can also be generated by computations. This is a list containing + Listeler ayrıca hesaplamalar aracılığıyla da üretilebilir. Bu, yılın tüm + + + + all the days of the year. + günlerini içeren bir listedir. + + + + Print the first 5 elements of 'daysList' using 'List.take'. + 'List.take' kullanarak 'daysList'in ilk 5 öğesini yazdırın. + + + + Computations can include conditionals. This is a list containing the tuples + Hesaplamalar, koşullu deyimler içerebilir. Bu, bir satranç tahtasındaki siyah karelerin + + + + which are the coordinates of the black squares on a chess board. + koordinatları olan demetleri içeren bir listedir. + + + + Lists can be transformed using 'List.map' and other functional programming combinators. + Listeler, 'List.map' ve diğer işlevsel programlama birleştiricileri kullanılarak dönüştürülebilir. + + + + This definition produces a new list by squaring the numbers in numberList, using the pipeline + Bu tanım, numberList içindeki sayıların karelerini alıp, List.map'e bir bağımsız değişken geçirmek üzere + + + + operator to pass an argument to List.map. + komut zinciri işlecini kullanarak yeni bir liste oluşturur. + + + + There are many other list combinations. The following computes the sum of the squares of the + Başka birçok liste bileşimi daha vardır. Aşağıda, 3'e bölünebilen sayıların karelerinin + + + + numbers divisible by 3. + toplamı hesaplanır. + + + + Arrays are fixed-size, mutable collections of elements of the same type. + Diziler, aynı türdeki sabit boyutlu, değiştirilebilir öğe koleksiyonlarıdır. + + + + Although they are similar to Lists (they support enumeration and have similar combinators for data processing), + Lists'e benzer olsalar da (numaralandırmayı desteklerler ve veri işleme için benzer birleştiricilere sahiptirler) + + + + they are generally faster and support fast random access. This comes at the cost of being less safe by being mutable. + genellikle daha hızlıdırlar ve hızlı rastgele erişimi desteklerler. Buna karşılık, değişken oldukları için daha az güvenlidirler. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/arrays + Daha fazla bilgi için bkz. https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/arrays + + + + This is The empty array. Note that the syntax is similar to that of Lists, but uses `[| ... |]` instead. + Bu, boş dizidir. Söz diziminin Lists'e benzediğine ancak `[| ... |]` kullandığına dikkat edin. + + + + Arrays are specified using the same range of constructs as lists. + Diziler, listeler ile aynı yapı aralıkları kullanılarak belirtilir. + + + + This is an array of numbers from 1 to 1000. + Bu, 1'den 1000'e kadar olan sayıların dizisidir. + + + + This is an array containing only the words "hello" and "world". + Bu, yalnızca "hello" ve "world" sözcüklerini içeren bir dizidir. + + + + This is an array initialized by index and containing the even numbers from 0 to 2000. + Bu, dizin tarafından başlatılan ve 0'dan 2000'e kadar olan çift sayıları içeren bir dizidir. + + + + Sub-arrays are extracted using slicing notation. + Alt diziler dilimleme gösterimi aracılığıyla ayıklanır. + + + + You can loop over arrays and lists using 'for' loops. + Diziler ve listeler üzerinden döngü oluşturmak için 'for' döngülerini kullanabilirsiniz. + + + + You can modify the contents of an an array element by using the left arrow assignment operator. + Bir dizi öğesinin içeriğini sol ok atama işlecini kullanarak değiştirebilirsiniz. + + + + To learn more about this operator, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/values/index#mutable-variables + Bu işleç hakkında daha fazla bilgi için bkz. https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/values/index#mutable-variables + + + + You can transform arrays using 'Array.map' and other functional programming operations. + 'Array.map' ve diğer işlevsel programlama işlemlerini kullanarak dizileri dönüştürebilirsiniz. + + + + The following calculates the sum of the lengths of the words that start with 'h'. + Aşağıdaki, 'h' ile başlayan sözcüklerin uzunluklarının toplamını hesaplar. + + + + Sequences are a logical series of elements, all of the same type. These are a more general type than Lists and Arrays. + Sıralar, aynı türdeki öğelerden oluşan mantıksal öğe serileridir. Bunlar, Lists ve Arrays'e kıyasla daha genel türlerdir. + + + + Sequences are evaluated on-demand and are re-evaluated each time they are iterated. + Sıralar isteğe bağlı olarak değerlendirilir ve her yinelendiklerinde yeniden değerlendirilir. + + + + An F# sequence is an alias for a .NET System.Collections.Generic.IEnumerable<'T>. + F# sırası, .NET System.Collections.Generic.IEnumerable<'T> için diğer addır. + + + + Sequence processing functions can be applied to Lists and Arrays as well. + Seri işleme işlevleri, Listeler ve Dizilere de uygulanabilir. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/sequences + Daha fazla bilgi için bkz. https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/sequences + + + + This is the empty sequence. + Bu, boş bir seridir. + + + + This a sequence of values. + Bu bir değerler serisidir. + + + + This is an on-demand sequence from 1 to 1000. + Bu, 1'den 1000'e kadar olan isteğe bağlı bir seridir. + + + + This is a sequence producing the words "hello" and "world" + Bu, "hello" ve "world" sözcüklerini üreten bir seridir + + + + This sequence producing the even numbers up to 2000. + Bu, 2000'e kadar olan çift sayıları üreten bir seridir. + + + + This is an infinite sequence which is a random walk. + Bu, rastgele olan sonsuz bir seridir. + + + + This example uses yield! to return each element of a subsequence. + Bu örnek, alt serinin her öğesini döndürmek için yield! kullanır. + + + + This example shows the first 100 elements of the random walk. + Bu örnek rastgele serinin ilk 100 öğesini gösterir. + + + + Recursive functions can call themselves. In F#, functions are only recursive + Özyinelemeli işlevler kendilerini çağırabilir. F# içinde, işlevler yalnızca + + + + when declared using 'let rec'. + 'let rec' kullanılarak bildirildiğinde özyinelemeli olur. + + + + Recursion is the preferred way to process sequences or collections in F#. + Özyineleme, F# içinde sıraları veya koleksiyonları işlemek için tercih edilen yöntemdir. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/index#recursive-functions + Daha fazla bilgi için bkz. https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/index#recursive-functions + + + + This example shows a recursive function that computes the factorial of an + Bu örnek, bir tamsayının faktöriyelini hesaplayan özyinelemeli bir işlevi + + + + integer. It uses 'let rec' to define a recursive function. + gösterir. Özyinelemeli işlevi tanımlamak için 'let rec' kullanır. + + + + Computes the greatest common factor of two integers. + İki tamsayının en büyük ortak çarpanını hesaplar. + + + + Since all of the recursive calls are tail calls, + Özyinelemeli tüm çağrılar tail çağrısı olduğundan, + + + + the compiler will turn the function into a loop, + derleyici, işlevi bir döngüye dönüştürür, + + + + which improves performance and reduces memory consumption. + bu da performansı artırır ve bellek tüketimini azaltır. + + + + This example computes the sum of a list of integers using recursion. + Bu örnek, özyineleme kullanarak bir tamsayılar listesinin toplamını hesaplar. + + + + This makes 'sumList' tail recursive, using a helper function with a result accumulator. + Bu, bir sonuç biriktirici ile bir yardımcı işlev kullanarak 'sumList' tail öğesini özyinelemeli yapar. + + + + This invokes the tail recursive helper function, providing '0' as a seed accumulator. + Bu, çekirdek biriktirici olarak '0' sağlayarak özyinelemeli tail yardımcı işlevini çağırır. + + + + An approach like this is common in F#. + Benzer yaklaşımlar F# içinde yaygındır. + + + + Records are an aggregate of named values, with optional members (such as methods). + Kayıtlar, isteğe bağlı üyeleri (örneğin, metotlar) içeren adlandırılmış değerlerin toplamıdır. + + + + They are immutable and have structural equality semantics. + Bunlar sabittir ve yapısal eşitlik semantiğine sahiptir. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/records + Daha fazla bilgi için bkz. https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/records + + + + This example shows how to define a new record type. + Bu örnek yeni bir kayıt türü tanımlamayı gösterir. + + + + This example shows how to instantiate a record type. + Bu örnekte, bir kayıt türünün örneğinin nasıl oluşturulacağı gösterilmektedir. + + + + You can also do this on the same line with ';' separators. + Bunu ';' ayırıcıları ile aynı satırda da yapabilirsiniz. + + + + This example shows how to use "copy-and-update" on record values. It creates + Bu örnek kayıt değerlerinde "kopyalama ve güncelleştirme" kullanımını gösterir. contact1'in + + + + a new record value that is a copy of contact1, but has different values for + kopyası olan, ama 'Telefon' ve 'Doğrulanmış' alanları için farklı değerleri olan + + + + the 'Phone' and 'Verified' fields. + yeni bir kayıt değeri oluşturur. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/copy-and-update-record-expressions + Daha fazla bilgi için bkz. https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/copy-and-update-record-expressions + + + + This example shows how to write a function that processes a record value. + Bu örnek kayıt değerini işleyen bir işlev yazmayı gösterir. + + + + It converts a 'ContactCard' object to a string. + 'ContactCard' nesnesini dizeye dönüştürür. + + + + This is an example of a Record with a member. + Bu, üye içeren bir Kayıt örneğidir. + + + + Members can implement object-oriented members. + Üyeler, nesne yönelimli üyeleri uygulayabilir. + + + + Members are accessed via the '.' operator on an instantiated type. + Örnekli bir tür üzerinde, üyelere '.' işleci ile erişilir. + + + + Records can also be represented as structs via the 'Struct' attribute. + Kayıtlar 'Struct' özniteliği ile yapı olarak da gösterilebilir. + + + + This is helpful in situations where the performance of structs outweighs + Bu, yapıların performansının, başvuru türlerinin esnekliğinden daha önemli + + + + the flexibility of reference types. + olduğu durumlarda kullanışlıdır. + + + + Discriminated Unions (DU for short) are values which could be a number of named forms or cases. + Ayırt Edici Birleşimler (kısaca DU), bir dizi adlandırılmış form veya durum olabilen değerleri ifade eder. + + + + Data stored in DUs can be one of several distinct values. + DU'larda depolanan veriler birkaç farklı değerden biri olabilir. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/discriminated-unions + Daha fazla bilgi için bkz. https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/discriminated-unions + + + + The following represents the suit of a playing card. + Aşağıdaki, bir iskambil kartının cinsini gösterir. + + + + A Disciminated Union can also be used to represent the rank of a playing card. + Bir iskambil kartının sırasını göstermek için bir Ayırt Edici Birleşim de kullanılabilir. + + + + Represents the rank of cards 2 .. 10 + 2 .. 10 arasındaki kartları temsil eder + + + + Discriminated Unions can also implement object-oriented members. + Ayırt Edici Birleşimler ayrıca nesne yönelimli üyeleri uygulayabilir. + + + + This is a record type that combines a Suit and a Rank. + Bu, Cins ve Sırayı birleştiren bir kayıt türüdür. + + + + It's common to use both Records and Disciminated Unions when representing data. + Verileri temsil ederken Kayıtları ve Ayırt Edici Birleşimleri birlikte kullanmak yaygındır. + + + + This computes a list representing all the cards in the deck. + Bu, destedeki tüm kartları gösteren bir liste hesaplar. + + + + This example converts a 'Card' object to a string. + Bu örnek, bir 'Card' nesnesini dizeye dönüştürür. + + + + This example prints all the cards in a playing deck. + Bu örnek bir iskambil destesindeki tüm kartları yazdırır. + + + + Single-case DUs are often used for domain modeling. This can buy you extra type safety + Tek Olaylı DU'lar genellikle etki alanı modelleme için kullanılır. Bu, dizeler ve tamsayılar gibi temel türlere göre + + + + over primitive types such as strings and ints. + ek tür güvenliği sağlamanıza yardımcı olabilir. + + + + Single-case DUs cannot be implicitly converted to or from the type they wrap. + Tek durumlu DU'lar, sarmaladıkları türe veya bu türden örtük olarak dönüştürülemez. + + + + For example, a function which takes in an Address cannot accept a string as that input, + Örneğin, Adres alan bir işlev bu giriş için dize kabul edemez + + + + or vive/versa. + veya bu durumun tersi olamaz. + + + + You can easily instantiate a single-case DU as follows. + Tek Olaylı DU'ları aşağıdaki gibi kolayca örnekleyebilirsiniz. + + + + When you need the value, you can unwrap the underlying value with a simple function. + Değere ihtiyacınız olduğunda, basit bir işlev ile temel değerin sarmalamasını açabilirsiniz. + + + + Printing single-case DUs is simple with unwrapping functions. + Sarmalama açma işlevleri ile tek olayı DU'ları yazdırmak kolaydır. + + + + Disciminated Unions also support recursive definitions. + Ayırt Edici Birleşimler ayrıca özyinelemeli tanımları da destekler. + + + + This represents a Binary Search Tree, with one case being the Empty tree, + Bu, bir olayı Boş ağacı ve diğeri bir değer ile iki alt ağaç içeren bir Düğüme sahip + + + + and the other being a Node with a value and two subtrees. + İkili Arama Ağacı'nı gösterir. + + + + Check if an item exists in the binary search tree. + İkili arama ağacında bir öğe olup olmadığını denetleyin. + + + + Searches recursively using Pattern Matching. Returns true if it exists; otherwise, false. + Desen Eşleştirme kullanarak özyinelemeli olarak arar. Varsa true, aksi takdirde false döndürür. + + + + Check the left subtree. + Sol alt ağacı denetleyin. + + + + Check the right subtree. + Sağ alt ağacı denetleyin. + + + + Inserts an item in the Binary Search Tree. + İkili Arama Ağacı'na bir öğe ekler. + + + + Finds the place to insert recursively using Pattern Matching, then inserts a new node. + Desen Eşleştirme kullanarak özyinelemeli olarak eklenecek yeri bulur ve ardından yeni bir düğüm ekler. + + + + If the item is already present, it does not insert anything. + Öğe zaten varsa yeni bir öğe eklenmez. + + + + No need to insert, it already exists; return the node. + Eklemeye gerek yok, öğe zaten var; düğümü döndürün. + + + + Call into left subtree. + Sol alt ağaca çağırın. + + + + Call into right subtree. + Sağ alt ağaca çağırın. + + + + Discriminated Unions can also be represented as structs via the 'Struct' attribute. + Ayırt Edici Birleşimler, 'Struct' özniteliği aracılığıyla yapı olarak da gösterilebilir. + + + + This is helpful in situations where the performance of structs outweighs + Bu, yapıların performansının, başvuru türlerinin esnekliğinden daha önemli + + + + the flexibility of reference types. + olduğu durumlarda kullanışlıdır. + + + + However, there are two important things to know when doing this: + Ancak, bunu yaparken bilmeniz gereken iki önemli nokta vardır: + + + + 1. A struct DU cannot be recursively-defined. + 1. Bir yapı DU'su, özyinelemeli olarak tanımlanamaz. + + + + 2. A struct DU must have unique names for each of its cases. + 2. Bir yapı DU'su, her bir durumu için benzersiz adlara sahip olmalıdır. + + + + Pattern Matching is a feature of F# that allows you to utilize Patterns, + Desen Eşleştirme, Desenleri kullanmanızı sağlayan bir F# özelliğidir. + + + + which are a way to compare data with a logical structure or structures, + Desenler, verileri mantıksal yapı veya yapılar ile karşılaştırmak, + + + + decompose data into constituent parts, or extract information from data in various ways. + verileri bileşenlerine ayırmak veya verilerden bilgileri çeşitli şekillerde ayıklamak için harika bir yol sunar. + + + + You can then dispatch on the "shape" of a pattern via Pattern Matching. + Daha sonra Desen Eşleştirme ile bir desenin "şeklini" gönderebilirsiniz. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/pattern-matching + Daha fazla bilgi için bkz. https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/pattern-matching + + + + A record for a person's first and last name + Bir kişinin ad ve soyadı kaydı + + + + A Discriminated Union of 3 different kinds of employees + 3 farklı çalışan türünden oluşan bir Ayırt Edici Birleşim + + + + Count everyone underneath the employee in the management hierarchy, + Çalışan da dahil olmak üzere, yönetim hiyerarşisinde çalışanın altındaki + + + + including the employee. + herkesi sayın. + + + + Find all managers/executives named "Dave" who do not have any reports. + Herhangi bir raporu olmayan, "Dave" adlı tüm yöneticileri bulun. + + + + This uses the 'function' shorthand to as a lambda expression. + Bu, 'function' kısaltmasını bir lambda ifadesi olarak kullanır. + + + + [] matches an empty list. + [] boş bir liste ile eşleşir. + + + + '_' is a wildcard pattern that matches anything. + '_' herhangi bir öğeyle eşleşen bir joker karakter desenidir. + + + + This handles the "or else" case. + Bu, "or else" durumunu ele alır. + + + + You can also use the shorthand function construct for pattern matching, + Kısaltma özellik yapısını desen eşleştirme için de kullanabilirsiniz, + + + + which is useful when you're writing functions which make use of Partial Application. + bu Kısmi Uygulamayı kullanan işlevler yazarken kullanışlıdır. + + + + Define some more functions which parse with the helper function. + Yardımcı işlev ile ayrıştırılan birkaç işlev daha tanımlayın. + + + + Active Patterns are another powerful construct to use with pattern matching. + Etkin Desenler, desen eşleştirme ile kullanabileceğiniz diğer bir güçlü yapıdır. + + + + They allow you to partition input data into custom forms, decomposing them at the pattern match call site. + Giriş verilerini desen eşleştirme çağrı sitesinde bölerek özel formlara ayırmanıza olanak sağlar. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/active-patterns + Daha fazla bilgi için bkz. https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/active-patterns + + + + Pattern Matching via 'function' keyword and Active Patterns often looks like this. + 'Function' anahtar sözcüğü ve Etkin Desenler aracılığıyla Desen Eşleştirme, genellikle böyle görünür. + + + + Call the printer with some different values to parse. + Ayrıştırılacak farklı değerlerle yazıcıyı çağırın. + + + + Option values are any kind of value tagged with either 'Some' or 'None'. + Seçenek değerleri 'Some' veya 'None' ile etiketlenmiş herhangi bir değer türü olabilir. + + + + They are used extensively in F# code to represent the cases where many other + Bunlar yaygın olarak diğer birçok dilin null başvurular kullandığı durumları temsil + + + + languages would use null references. + etmek üzere F# kodunda kullanılır. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/options + Daha fazla bilgi için bkz. https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/options + + + + First, define a zipcode defined via Single-case Discriminated Union. + İlk olarak, Tek Durumlu Ayırt Edici Birleşim ile tanımlanan bir posta kodu tanımlayın. + + + + Next, define a type where the ZipCode is optional. + Sonra, ZipCode’un isteğe bağlı olduğu bir tür tanımlayın. + + + + Next, define an interface type that represents an object to compute the shipping zone for the customer's zip code, + Sonra, müşterinin posta kodu için sevkiyat alanını hesaplayan bir nesneyi temsil eden arabirim türünü tanımlayın, + + + + given implementations for the 'getState' and 'getShippingZone' abstract methods. + 'getState' ve 'getShippingZone' soyut metotları uygulamalarından faydalanır. + + + + Next, calculate a shipping zone for a customer using a calculator instance. + Sonra, hesaplayıcı örneğini kullanarak müşteri için sevkiyat bölgesi hesaplayın. + + + + This uses combinators in the Option module to allow a functional pipeline for + Bu, Optionals ile veri dönüştürülmesini sağlamak için + + + + transforming data with Optionals. + Option modülünde birleştiricilerin kullanılmasını sağlar. + + + + Units of measure are a way to annotate primitive numeric types in a type-safe way. + Ölçü birimleri, basit sayısal türler için tür açısından güvenli bir şekilde ek açıklama girmenin bir yoludur. + + + + You can then perform type-safe arithmetic on these values. + Böylece bu değerler üzerinde tür açısından güvenli aritmetik gerçekleştirebilirsiniz. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/units-of-measure + Daha fazla bilgi için bkz. https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/units-of-measure + + + + First, open a collection of common unit names + İlk olarak, ortak birim adlarından oluşan bir koleksiyon açın + + + + Define a unitized constant + Birimlere ayrılmış bir sabit tanımlayın + + + + Next, define a new unit type + Sonra, yeni bir birim türü tanımlayın + + + + Conversion factor mile to meter. + Milden metreye dönüştürme faktörü. + + + + Define a unitized constant + Birimlere ayrılmış bir sabit tanımlayın + + + + Compute metric-system constant + Metrik sistem sabitini hesaplayın + + + + Values using Units of Measure can be used just like the primitive numeric type for things like printing. + Ölçü Birimleri kullanan değerler, yazdırma gibi işler için temel sayısal tür ile aynı şekilde kullanılabilir. + + + + Classes are a way of defining new object types in F#, and support standard Object-oriented constructs. + Sınıflar, F# içinde yeni nesneleri tanımlamanın bir yoludur ve standart Nesne yönelimli yapıları destekler. + + + + They can have a variety of members (methods, properties, events, etc.) + Çeşitli üyelere sahip olabilirler (metotlar, özellikler, olaylar vb.) + + + + To learn more about Classes, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/classes + Sınıflar hakkında daha fazla bilgi için bkz. https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/classes + + + + To learn more about Members, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/members + Üyeler hakkında daha fazla bilgi için bkz. https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/members + + + + A simple two-dimensional Vector class. + Basit bir iki boyutlu Vektör sınıfı. + + + + The class's constructor is on the first line, + Sınıfın oluşturucusu ilk satırdadır + + + + and takes two arguments: dx and dy, both of type 'double'. + ve ikisi de 'double' türünde olan iki bağımsız değişken alır: dx ve dy. + + + + This internal field stores the length of the vector, computed when the + Bu dahili alan, nesne oluşturulduğunda hesaplanan vektör + + + + object is constructed + uzunluğunu depolar + + + + 'this' specifies a name for the object's self identifier. + 'this', nesnenin kendi tanımlayıcısı için bir ad belirtir. + + + + In instance methods, it must appear before the member name. + Örnek metotlarında üye adından önce gelmelidir. + + + + This member is a method. The previous members were properties. + Bu üye, bir metot. Önceki üyeler özellikti. + + + + This is how you instantiate the Vector2D class. + Vector2D sınıfının örneğini bu şekilde oluşturabilirsiniz. + + + + Get a new scaled vector object, without modifying the original object. + Özgün nesneyi değiştirmeden, yeni bir ölçekli vektör nesnesi alın. + + + + Generic classes allow types to be defined with respect to a set of type parameters. + Genel sınıflar, türlerin bir tür parametreleri kümesine göre tanımlanmasına izin verir. + + + + In the following, 'T is the type parameter for the class. + Aşağıda, 'T', sınıf için tür parametresidir. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/generics/ + Daha fazla bilgi için bkz. https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/generics/ + + + + This internal field store the states in a list. + Bu dahili alan, bir listedeki durumları depolar. + + + + Add a new element to the list of states. + Durumlar listesine yeni bir öğe ekleyin. + + + + use the '<-' operator to mutate the value. + değeri değiştirmek için '<-' işlecini kullanın. + + + + Get the entire list of historical states. + Geçmiş durumların tam listesini alın. + + + + Get the latest state. + Son durumu alın. + + + + An 'int' instance of the state tracker class. Note that the type parameter is inferred. + Durum izleyicisi sınıfının bir 'int' örneği. Tür parametresinin algılandığını unutmayın. + + + + Add a state + Durum ekle + + + + Interfaces are object types with only 'abstract' members. + Arabirimler, yalnızca 'abstract' üyelere sahip olan nesne türleridir. + + + + Object types and object expressions can implement interfaces. + Nesne türleri ve nesne ifadeleri arabirim uygulayabilir. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/interfaces + Daha fazla bilgi için bkz. https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/interfaces + + + + This is a type that implements IDisposable. + Bu, IDisposable uygulayan bir türdür. + + + + This is the implementation of IDisposable members. + Bu, IDisposable üyelerinin uygulamasıdır. + + + + This is an object that implements IDisposable via an Object Expression + Bu, bir Object İfadesi ile IDisposable uygulayan bir nesnedir + + + + Unlike other languages such as C# or Java, a new type definition is not needed + C# veya Java gibi diğer dillerin aksine, bir arabirim uygulamak için yeni bir tür tanımı + + + + to implement an interface. + gerekli değildir. + + + + The FSharp.Core library defines a range of parallel processing functions. Here + FSharp.Core kitaplığı bir paralel işleme işlevleri aralığı tanımlar. Burada + + + + you use some functions for parallel processing over arrays. + diziler üzerinde çeşitli paralel işleme işlevleri kullanırsınız. + + + + To learn more, see: https://msdn.microsoft.com/en-us/visualfsharpdocs/conceptual/array.parallel-module-%5Bfsharp%5D + Daha fazla bilgi için bkz. https://msdn.microsoft.com/en-us/visualfsharpdocs/conceptual/array.parallel-module-%5Bfsharp%5D + + + + First, an array of inputs. + İlk olarak, bir giriş dizisi. + + + + Next, define a functions that does some CPU intensive computation. + Sonra, yoğun CPU kullanarak hesaplama yapan bir işlev tanımlayın. + + + + Next, do a parallel map over a large input array. + Sonra, büyük bir giriş dizisi üzerinde paralel bir eşleme oluşturun. + + + + Next, print the results. + Sonra, sonuçları yazdırın. + + + + Events are a common idiom for .NET programming, especially with WinForms or WPF applications. + Events, .NET programlamasında özellikle WinForms veya WPF uygulamaları ile yaygın olarak kullanılan bir deyimdir. + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/members/events + Daha fazla bilgi için bkz. https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/members/events + + + + First, create instance of Event object that consists of subscription point (event.Publish) and event trigger (event.Trigger). + İlk olarak, abonelik noktası (event.Publish) ve olay tetikleyicisinden (event.Trigger) oluşan Olay nesnesi örneğini oluşturun. + + + + Next, add handler to the event. + Sonra, olaya işleyici ekleyin. + + + + Next, trigger the event. + Sonra, olayı tetikleyin. + + + + Next, create an instance of Event that follows standard .NET convention: (sender, EventArgs). + Sonra, olayın standart .NET kuralını takip eden bir örneğini oluşturun: (sender, EventArgs). + + + + Next, add a handler for this new event. + Sonra, bu yeni olay için bir işleyici ekleyin. + + + + Next, trigger this event (note that sender argument should be set). + Sonra, bu olayı tetikleyin (sender bağımsız değişkeninin ayarlanmış olması gerektiğine dikkat edin). + + + + + \ No newline at end of file diff --git a/vsintegration/ProjectTemplates/TutorialProject/Template/xlf/Tutorial.fsx.zh-Hans.xlf b/vsintegration/ProjectTemplates/TutorialProject/Template/xlf/Tutorial.fsx.zh-Hans.xlf new file mode 100644 index 00000000000..80f00248fcd --- /dev/null +++ b/vsintegration/ProjectTemplates/TutorialProject/Template/xlf/Tutorial.fsx.zh-Hans.xlf @@ -0,0 +1,1637 @@ + + + + + + This sample will guide you through elements of the F# language. + 此示例将引导你了解 F# 语言的各个元素。 + + + + To execute the code in F# Interactive, highlight a section of code and press Alt-Enter or right-click + 若要在 F# 交互窗口中执行代码,请突出显示一个代码节并按 Alt-Enter 或右击 + + + + and select "Execute in Interactive". You can open the F# Interactive Window from the "View" menu. + 并选择“在交互窗口中执行”。 可从“视图”菜单中打开 F# 交互窗口。 + + + + For more about F#, see: + 有关 F# 的详细信息,请参见: + + + + To see this tutorial in documentation form, see: + 若要以文档的形式查看此教程,请参阅: + + + + To learn more about applied F# programming, use + 若要了解有关已应用的 F# 编程的详细信息,请使用 + + + + To install the Visual F# Power Tools, use + 若要安装 Visual F# Power Tools,请使用 + + + + 'Tools' --> 'Extensions and Updates' --> `Online` and search + “工具”-->“扩展和更新”-->“联机”和搜索 + + + + For additional templates to use with F#, see the 'Online Templates' in Visual Studio, + 有关要用于 F# 的其他模板,请参见 Visual Studio 中的“联机模板”。 + + + + 'New Project' --> 'Online Templates' + “新建项目”-->“联机模板” + + + + F# supports three kinds of comments: + F# 支持三种注释: + + + + 1. Double-slash comments. These are used in most situations. + 1. 双斜线注释。 此类注释用于大多数情况。 + + + + 2. ML-style Block comments. These aren't used that often. + 2. ML 样式块注释。此类注释不经常使用。 + + + + 3. Triple-slash comments. These are used for documenting functions, types, and so on. + 3. 三斜线注释。此类注释用于记录功能和类型等。 + + + + They will appear as text when you hover over something which is decorated with these comments. + 光标悬停在附带有注释的位置时,这些注释会以文本形式显示。 + + + + They also support .NET-style XML comments, which allow you to generate reference documentation, + 它们还支持 .NET 样式的 XML 注释,这些注释可生成参考文档, + + + + and they also allow editors (such as Visual Studio) to extract information from them. + 还可允许编辑器(例如 Visual Studio)从其中提取信息。 + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/xml-documentation + 有关详细信息,请参阅: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/xml-documentation + + + + Open namespaces using the 'open' keyword. + 使用 "open" 关键字打开命名空间。 + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/import-declarations-the-open-keyword + 有关详细信息,请参阅: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/import-declarations-the-open-keyword + + + + A module is a grouping of F# code, such as values, types, and function values. + 模块是值、类型和函数值等 F# 代码的分组。 + + + + Grouping code in modules helps keep related code together and helps avoid name conflicts in your program. + 用模块分组代码有助于汇集相关代码和避免程序中出现名称冲突。 + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/modules + 有关详细信息,请参阅: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/modules + + + + This is a sample integer. + 此为示例整数。 + + + + This is a sample floating point number. + 此为示例浮点数。 + + + + This computed a new number by some arithmetic. Numeric types are converted using + 这按照某种运算方法计算新的数字。数字类型通过 + + + + functions 'int', 'double' and so on. + "int"、"double" 等函数进行转换。 + + + + This is a list of the numbers from 0 to 99. + 这是从 0 到 99 的数字列表 + + + + This is a list of all tuples containing all the numbers from 0 to 99 and their squares. + 这是包含从 0 到 99 的所有数字及其平方的所有元组的列表. + + + + The next line prints a list that includes tuples, using '%A' for generic printing. + 下一行打印包含元组的列表,使用 "%A" 来进行一般打印。 + + + + This is a sample integer with a type annotation + 这是一个具有类型注释的示例整数 + + + + Values in F# are immutable by default. They cannot be changed + F# 中的值默认为不可变。程序执行过程中 + + + + in the course of a program's execution unless explicitly marked as mutable. + 这些值无法更改,除非被显式标记为可变。 + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/values/index#why-immutable + 有关详细信息,请参阅: https://docs.microsoft.com/zh-cn/dotnet/articles/fsharp/language-reference/values/index#why-immutable + + + + Binding a value to a name via 'let' makes it immutable. + 通过 "let" 将值绑定到名称可使其不可变。 + + + + The second line of code fails to compile because 'number' is immutable and bound. + 未能编译第二行代码,因为 "number" 不可变且已绑定。 + + + + Re-defining 'number' to be a different value is not allowed in F#. + F# 中不允许将 "number" 重定义为其他值。 + + + + A mutable binding. This is required to be able to mutate the value of 'otherNumber'. + 一个可变绑定。必须提供这种绑定才能改变 "otherNumber" 的值。 + + + + When mutating a value, use '<-' to assign a new value. + 若要改变值,请使用 "<-" 分配新值。 + + + + You could not use '=' here for this purpose since it is used for equality + 在这里不能将 "=" 用作此目的,因为该符号用于表示等式 + + + + or other contexts such as 'let' or 'module' + 或者 "let" 或 "module" 等其他上下文 + + + + Much of F# programming consists of defining functions that transform input data to produce + 大部分 F# 编程包括定义函数,该函数转换输入数据以生成 + + + + useful results. + 有用的结果。 + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/ + 有关详细信息,请参阅: https://docs.microsoft.com/zh-cn/dotnet/articles/fsharp/language-reference/functions/ + + + + You use 'let' to define a function. This one accepts an integer argument and returns an integer. + 可使用 "let" 定义函数。它将接受整数参数,然后返回整数。 + + + + Parentheses are optional for function arguments, except for when you use an explicit type annotation. + 括号对函数参数是可选的,但使用显示类型注释时除外。 + + + + Apply the function, naming the function return result using 'let'. + 应用函数,并使用“let”命名函数返回结果。 + + + + The variable type is inferred from the function return type. + 变量类型是从函数返回类型推导出来的。 + + + + This line uses '%d' to print the result as an integer. This is type-safe. + 该行用 "%d" 将结果作为整数进行打印。这属于类型安全。 + + + + If 'result1' were not of type 'int', then the line would fail to compile. + 如果 "result1" 不是类型 "int",则将无法编译该行。 + + + + When needed, annotate the type of a parameter name using '(argument:type)'. Parentheses are required. + 如有需要,可使用 "(argument:type)" 批注参数名称类型。括号是必需的。 + + + + Conditionals use if/then/elid/elif/else. + 条件语句使用 if/then/elid/elif/else。 + + + + Note that F# uses whitespace indentation-aware syntax, similar to languages like Python. + 注意,F# 使用可识别空格缩进的语法,与 Python 等语言类似。 + + + + This line uses '%f' to print the result as a float. As with '%d' above, this is type-safe. + 此行使用 "%f" 将结果作为浮点打印。与上述 "%d" 情况一样,属于类型安全。 + + + + Booleans are fundamental data types in F#. Here are some examples of Booleans and conditional logic. + 布尔是 F# 中的基本数据类型。下面是一些布尔值和条件逻辑示例。 + + + + To learn more, see: + 有关详细信息,请参阅: + + + + and + + + + + Booleans values are 'true' and 'false'. + 布尔值为 "true" 和 "false"。 + + + + Operators on booleans are 'not', '&&' and '||'. + 布尔运算符为 "not"、"&&" 和 "||"。 + + + + This line uses '%b'to print a boolean value. This is type-safe. + 本行用 "%b" 打印布尔值。这属于类型安全。 + + + + Strings are fundamental data types in F#. Here are some examples of Strings and basic String manipulation. + 字符串是 F# 中的基本数据类型。下面是一些字符串和基本的字符串操作示例。 + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/strings + 有关详细信息,请参阅: https://docs.microsoft.com/zh-cn/dotnet/articles/fsharp/language-reference/strings + + + + Strings use double quotes. + 字符串使用双引号。 + + + + Strings can also use @ to create a verbatim string literal. + 字符串也可使用 @ 创建逐字的字符串。 + + + + This will ignore escape characters such as '\', '\n', '\t', etc. + 这将忽略转义字符,如 "\", "\n", "\t" 等。 + + + + String literals can also use triple-quotes. + 字符串文本也可使用三重引号。 + + + + String concatenation is normally done with the '+' operator. + 字符串串联通常是用 "+" 运算符完成的。 + + + + This line uses '%s' to print a string value. This is type-safe. + 本行用 "%s" 打印字符串值。这属于类型安全。 + + + + Substrings use the indexer notation. This line extracts the first 7 characters as a substring. + 子字符串使用索引表示法。此行提取前 7 个字符作为子字符串。 + + + + Note that like many languages, Strings are zero-indexed in F#. + 注意,与许多语言相同,字符串在 F# 中从零开始编制索引。 + + + + Tuples are simple combinations of data values into a combined value. + 元组是组合成组合值的简单数据值组合。 + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/tuples + 有关详细信息,请参阅: https://docs.microsoft.com/zh-cn/dotnet/articles/fsharp/language-reference/tuples + + + + A simple tuple of integers. + 一个包含整数的简单元组。 + + + + A function that swaps the order of two values in a tuple. + 一个用于交换两个值在元组中的顺序的函数。 + + + + F# Type Inference will automatically generalize the function to have a generic type, + F# 类型推理可自动泛化函数,使其具有泛型类型, + + + + meaning that it will work with any type. + 意味着它可与任何类型兼容。 + + + + A tuple consisting of an integer, a string, + 一个整数,一个字符串以及 + + + + and a double-precision floating point number. + 一个双精度浮点数字组成的元组。 + + + + A simple tuple of integers with a type annotation. + 一个具有类型批注的简单的整数元组。 + + + + Type annotations for tuples use the * symbol to separate elements + 元组的类型批注使用 * 号来分隔元素 + + + + Tuples are normally objects, but they can also be represented as structs. + 元组通常为对象,但也可表示为结构。 + + + + These interoperate completely with structs in C# and Visual Basic.NET; however, + 这些可在 C# 和 Visual Basic.NET 中与结构完全进行交互操作;然而, + + + + struct tuples are not implicitly convertable with object tuples (often called reference tuples). + 结构元组不隐式转换为对象元组(通常称为引用元组)。 + + + + The second line below will fail to compile because of this. Uncomment it to see what happens. + 下面的第二行将因此无法编译。取消注释观察将发生什么。 + + + + Although you cannot implicitly convert between struct tuples and reference tuples, + 尽管不能在结构元组和引用元组之间进行隐式转换, + + + + you can explicitly convert via pattern matching, as demonstrated below. + 可通过模式匹配进行显式转换,如下所示。 + + + + The F# pipe operators ('|>', '<|', etc.) and F# composition operators ('>>', '<<') + F# 管道运算符("|>"、"<|" 等 )和 F# 组合运算符(">>"、"<<") + + + + are used extensively when processing data. These operators are themselves functions + 广泛用于数据处理。这些运算符本身就是函数, + + + + which make use of Partial Application. + 它使用偏函数应用。 + + + + To learn more about these operators, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/#function-composition-and-pipelining + 若要深入了解这些运算符,请参阅: https://docs.microsoft.com/zh-cn/dotnet/articles/fsharp/language-reference/functions/#function-composition-and-pipelining + + + + To learn more about Partial Application, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/#partial-application-of-arguments + 若要深入了解偏函数应用,请参阅: https://docs.microsoft.com/zh-cn/dotnet/articles/fsharp/language-reference/functions/#partial-application-of-arguments + + + + Squares a value. + 计算值的平方。 + + + + Adds 1 to a value. + 将值加 1。 + + + + Tests if an integer value is odd via modulo. + 通过取模测试整数是否为奇数。 + + + + A list of 5 numbers. More on lists later. + 包含 5 个数字的列表。稍后列表上会有更多数字。 + + + + Given a list of integers, it filters out the even numbers, + 如果是整数列表,它会筛选出偶数。 + + + + squares the resulting odds, and adds 1 to the squared odds. + 将产生的奇数平方,然后将奇数平方值加 1。 + + + + A shorter way to write 'squareOddValuesAndAddOne' is to nest each + 编写 "squareOddValuesAndAddOne" 的简便方法是将每个 + + + + sub-result into the function calls themselves. + 子结果嵌入函数调用本身。 + + + + This makes the function much shorter, but it's difficult to see the + 这将使函数短得多,但难以查看 + + + + order in which the data is processed. + 处理数据的顺序。 + + + + A preferred way to write 'squareOddValuesAndAddOne' is to use F# pipe operators. + 编写 "squareOddValuesAndAddOne" 的首选方法是使用 F# 管道运算符。 + + + + This allows you to avoid creating intermediate results, but is much more readable + 这可使你避免产生中间结果,而且可读性更好 + + + + than nesting function calls like 'squareOddValuesAndAddOneNested' + 嵌入式函数调用(如 "squareOddValuesAndAddOneNested")更具可读性 + + + + You can shorten 'squareOddValuesAndAddOnePipeline' by moving the second `List.map` call + 使用 Lambda 函数,通过将第二个 "List.map" 调用移动到第一个, + + + + into the first, using a Lambda Function. + 可以缩短 "squareOddValuesAndAddOnePipeline"。 + + + + Note that pipelines are also being used inside the lambda function. F# pipe operators + 注意,管道也在 lambda 函数内使用。F# 管道运算符 + + + + can be used for single values as well. This makes them very powerful for processing data. + 还可用于单个值。这使它们处理数据的功能很强大。 + + + + Lastly, you can eliminate the need to explicitly take 'values' in as a parameter by using '>>' + 最后,无需再将 "value" 显式作为参数,你可使用 ">>" + + + + to compose the two core operations: filtering out even numbers, then squaring and adding one. + 以合成两个核心运算: 筛选出偶数,然后平方并加 1。 + + + + Likewise, the 'fun x -> ...' bit of the lambda expression is also not needed, because 'x' is simply + 同样,lambda 表达式的 "fun x -> ..." 也不需要了,因为 "x" 只是 + + + + being defined in that scope so that it can be passed to a functional pipeline. Thus, '>>' can be used + 在该范围内定义,以便可传递到功能管道。因此,也可将 ">>" + + + + there as well. + 用在该处。 + + + + The result of 'squareOddValuesAndAddOneComposition' is itself another function which takes a + "squareOddValuesAndAddOneComposition" 的结果本身就是另一个函数,它 + + + + list of integers as its input. If you execute 'squareOddValuesAndAddOneComposition' with a list + 将整数列表作为其输入值。如果使用整数列表执行 "squareOddValuesAndAddOneComposition", + + + + of integers, you'll notice that it produces the same results as previous functions. + 你将发现它与上述函数产生的结果相同。 + + + + This is using what is known as function composition. This is possible because functions in F# + 这使用的就是所谓的函数组合。这是可能的,因为 F# 中的函数 + + + + use Partial Application and the input and output types of each data processing operation match + 使用偏函数应用,并且每个数据处理操作的输入和输出类型与 + + + + the signatures of the functions we're using. + 我们使用的函数签名。 + + + + Lists are ordered, immutable, singly-linked lists. They are eager in their evaluation. + 列表属于有序、不可变、单向链接的列表。它们都采用主动求值方式。 + + + + This module shows various ways to generate lists and process lists with some functions + 本模块介绍使用某些函数生成列表和处理列表的各种方法 + + + + in the 'List' module in the F# Core Library. + 在 F# 核心库的 "List" 模块中。 + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/lists + 有关详细信息,请参阅: https://docs.microsoft.com/zh-cn/dotnet/articles/fsharp/language-reference/lists + + + + Lists are defined using [ ... ]. This is an empty list. + 使用 [ ... ] 定义列表。这是空列表。 + + + + This is a list with 3 elements. ';' is used to separate elements on the same line. + 这是一个包含 3 个元素的列表。";" 用于分隔同一行的元素。 + + + + You can also separate elements by placing them on their own lines. + 也可通过将各元素放在其自身行来分隔。 + + + + This is a list of integers from 1 to 1000 + 这是从 1 到 1000 的整数列表 + + + + Lists can also be generated by computations. This is a list containing + 也可通过计算来生成列表。此列表包含 + + + + all the days of the year. + 一年的所有天。 + + + + Print the first 5 elements of 'daysList' using 'List.take'. + 使用 "List.take" 打印 "daysList" 的前 5 个元素。 + + + + Computations can include conditionals. This is a list containing the tuples + 计算可以包括条件。这是包含元组的列表 + + + + which are the coordinates of the black squares on a chess board. + 这是棋盘上黑色方格的坐标。 + + + + Lists can be transformed using 'List.map' and other functional programming combinators. + 列表可使用 "List.map" 和其他函数编程连结符进行转换。 + + + + This definition produces a new list by squaring the numbers in numberList, using the pipeline + 此定义通过使用管道将 numberList 中的数字进行平方运算来生成新列表 + + + + operator to pass an argument to List.map. + 将参数传递给 List.map 的运算符。 + + + + There are many other list combinations. The following computes the sum of the squares of the + 还有许多其他列表组合。下面计算以下内容的平方和: + + + + numbers divisible by 3. + 数字可被 3 整除。 + + + + Arrays are fixed-size, mutable collections of elements of the same type. + 数组是固定大小,同类型元素的可变集合。 + + + + Although they are similar to Lists (they support enumeration and have similar combinators for data processing), + 尽管它们与列表相同(支持枚举,且具有用于数据处理的类似连接符), + + + + they are generally faster and support fast random access. This comes at the cost of being less safe by being mutable. + 它们通常速度更快,且支持快速随机访问。代价是因为可变而不太安全。 + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/arrays + 有关详细信息,请参阅: https://docs.microsoft.com/zh-cn/dotnet/articles/fsharp/language-reference/arrays + + + + This is The empty array. Note that the syntax is similar to that of Lists, but uses `[| ... |]` instead. + 这是空数组。注意,语法与列表类似,但改用 `[| ... |]`。 + + + + Arrays are specified using the same range of constructs as lists. + 使用与列表相同的构造范围来指定数组。 + + + + This is an array of numbers from 1 to 1000. + 这是从 1 到 1000 的数字数组。 + + + + This is an array containing only the words "hello" and "world". + 这是只包含单词 "hello" 和 "world" 的数组。 + + + + This is an array initialized by index and containing the even numbers from 0 to 2000. + 这是由索引初始化的数组,包含从 0 到 2000 之间的偶数。 + + + + Sub-arrays are extracted using slicing notation. + 使用切片表示法提取子数组。 + + + + You can loop over arrays and lists using 'for' loops. + 可使用 "for" 循环循环数组和列表。 + + + + You can modify the contents of an an array element by using the left arrow assignment operator. + 可使用左箭头赋值运算符来修改数组元素的内容。 + + + + To learn more about this operator, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/values/index#mutable-variables + 若要深入了解此运算符,请参阅: https://docs.microsoft.com/zh-cn/dotnet/articles/fsharp/language-reference/values/index#mutable-variables + + + + You can transform arrays using 'Array.map' and other functional programming operations. + 可使用 "Array.map" 和其他功能性编程运算来转换数组。 + + + + The following calculates the sum of the lengths of the words that start with 'h'. + 下面的函数计算以 "h" 开头的单词的总长度。 + + + + Sequences are a logical series of elements, all of the same type. These are a more general type than Lists and Arrays. + 序列是类型相同的所有元素的逻辑系列。序列是比列表和数组更常规的类型。 + + + + Sequences are evaluated on-demand and are re-evaluated each time they are iterated. + 将根据需要计算序列,并在每次循环访问它们时重新进行计算。 + + + + An F# sequence is an alias for a .NET System.Collections.Generic.IEnumerable<'T>. + F# 序列是 .NET System.Collections.Generic.IEnumerable<'T> 的别名。 + + + + Sequence processing functions can be applied to Lists and Arrays as well. + 序列处理函数也可以应用于列表和数组。 + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/sequences + 有关详细信息,请参阅: https://docs.microsoft.com/zh-cn/dotnet/articles/fsharp/language-reference/sequences + + + + This is the empty sequence. + 这是空序列。 + + + + This a sequence of values. + 这是一个值的序列。 + + + + This is an on-demand sequence from 1 to 1000. + 这是从 1 到 1000 的按需序列。 + + + + This is a sequence producing the words "hello" and "world" + 这是生成单词 "hello" 和 "world" 的序列 + + + + This sequence producing the even numbers up to 2000. + 此序列生成最大为 2000 的偶数。 + + + + This is an infinite sequence which is a random walk. + 这是可随机访问的无限序列。 + + + + This example uses yield! to return each element of a subsequence. + 此示例使用 yield! 返回子序列的每个元素。 + + + + This example shows the first 100 elements of the random walk. + 此示例演示随机访问的前 100 个元素。 + + + + Recursive functions can call themselves. In F#, functions are only recursive + 递归函数可调用其自身。在 F# 中,函数只递归 + + + + when declared using 'let rec'. + 使用 "let rec" 声明时。 + + + + Recursion is the preferred way to process sequences or collections in F#. + 递归是 F# 中处理序列或集合的首选方式。 + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/index#recursive-functions + 有关详细信息,请参阅: https://docs.microsoft.com/zh-cn/dotnet/articles/fsharp/language-reference/functions/index#recursive-functions + + + + This example shows a recursive function that computes the factorial of an + 此示例演示递归函数,计算以下内容的阶乘: + + + + integer. It uses 'let rec' to define a recursive function. + 整数。它使用 "let rec" 来定义递归函数。 + + + + Computes the greatest common factor of two integers. + 计算两个整数的最大公因数。 + + + + Since all of the recursive calls are tail calls, + 由于所有递归调用都是尾调用, + + + + the compiler will turn the function into a loop, + 因此编译器会将该函数转变成一个循环, + + + + which improves performance and reduces memory consumption. + 这可提高性能并减少内存消耗。 + + + + This example computes the sum of a list of integers using recursion. + 本示例使用递归计算整数列表的总和。 + + + + This makes 'sumList' tail recursive, using a helper function with a result accumulator. + 通过将 Helper 函数与结果累加器一起使用,使 "sumList" 成为尾递归函数。 + + + + This invokes the tail recursive helper function, providing '0' as a seed accumulator. + 假如 "0" 作为种子累加器,这将调用尾递归 helper 函数。 + + + + An approach like this is common in F#. + 此类方法在 F# 中很常见。 + + + + Records are an aggregate of named values, with optional members (such as methods). + 记录是已命名值的聚合,同时具有可选成员(例如,方法)。 + + + + They are immutable and have structural equality semantics. + 它们不可变且具有结构相等性语义。 + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/records + 有关详细信息,请参阅: https://docs.microsoft.com/zh-cn/dotnet/articles/fsharp/language-reference/records + + + + This example shows how to define a new record type. + 此示例演示如何定义新记录类型。 + + + + This example shows how to instantiate a record type. + 本示例演示如何实例化记录类型。 + + + + You can also do this on the same line with ';' separators. + 也可使用 ";" 分隔符在同一行上执行此操作。 + + + + This example shows how to use "copy-and-update" on record values. It creates + 此示例演示如何对记录值使用 "copy-and-update"。它创建了 + + + + a new record value that is a copy of contact1, but has different values for + 新的记录值,该值是 contact1 的副本,但对以下内容具有不同的值: + + + + the 'Phone' and 'Verified' fields. + “电话”和“已验证”字段。 + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/copy-and-update-record-expressions + 有关详细信息,请参阅: https://docs.microsoft.com/zh-cn/dotnet/articles/fsharp/language-reference/copy-and-update-record-expressions + + + + This example shows how to write a function that processes a record value. + 此示例演示如何编写处理记录值的函数。 + + + + It converts a 'ContactCard' object to a string. + 它将 "ContactCard" 对象转换为字符串。 + + + + This is an example of a Record with a member. + 这是一个具有成员的记录示例。 + + + + Members can implement object-oriented members. + 成员可实现面向对象的成员。 + + + + Members are accessed via the '.' operator on an instantiated type. + 可通过实例化类型上的 "." 运算符访问成员。 + + + + Records can also be represented as structs via the 'Struct' attribute. + 记录也可通过 "Struct" 属性表示为结构。 + + + + This is helpful in situations where the performance of structs outweighs + 这在结构性能更重要的情况下很有用 + + + + the flexibility of reference types. + 引用类型的灵活性。 + + + + Discriminated Unions (DU for short) are values which could be a number of named forms or cases. + 可区分联合(简称 DU)的值可以是一系列已命名窗体或用例。 + + + + Data stored in DUs can be one of several distinct values. + DU 中存储的数据可以为多个不同值之一。 + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/discriminated-unions + 有关详细信息,请参阅: https://docs.microsoft.com/zh-cn/dotnet/articles/fsharp/language-reference/discriminated-unions + + + + The following represents the suit of a playing card. + 下面代表一套扑克牌。 + + + + A Disciminated Union can also be used to represent the rank of a playing card. + 可区分联合还可用来表示纸牌的设置级别。 + + + + Represents the rank of cards 2 .. 10 + 表示扑克牌点数 2 .. 10 + + + + Discriminated Unions can also implement object-oriented members. + 可区分联合还可实现面向对象的成员。 + + + + This is a record type that combines a Suit and a Rank. + 这是结合花色和牌面大小的记录类型。 + + + + It's common to use both Records and Disciminated Unions when representing data. + 表示数据时同时使用记录和可区分联合是很常见的。 + + + + This computes a list representing all the cards in the deck. + 它将计算代表牌组中所有扑克牌的列表。 + + + + This example converts a 'Card' object to a string. + 此示例将“纸牌”对象转换为字符串。 + + + + This example prints all the cards in a playing deck. + 此示例打印扑克牌中的所有牌。 + + + + Single-case DUs are often used for domain modeling. This can buy you extra type safety + 单用例 DU 常用于域建模。这可确保额外类型的安全 + + + + over primitive types such as strings and ints. + 字符串和整数等基元类型。 + + + + Single-case DUs cannot be implicitly converted to or from the type they wrap. + 单用例 DU 无法隐式转换为其包装的类型或从其包装的类型进行转换。 + + + + For example, a function which takes in an Address cannot accept a string as that input, + 例如,地址中采用的函数无法接受字符串作为输入, + + + + or vive/versa. + 反之亦然。 + + + + You can easily instantiate a single-case DU as follows. + 可轻松实例化单用例 DU,如下所示。 + + + + When you need the value, you can unwrap the underlying value with a simple function. + 需要值时,可使用单个函数解包基础值。 + + + + Printing single-case DUs is simple with unwrapping functions. + 打印单用例 DU 与解包函数一样简单。 + + + + Disciminated Unions also support recursive definitions. + 可区分联合还支持递归定义。 + + + + This represents a Binary Search Tree, with one case being the Empty tree, + 这代表一个二进制文件搜索树,且有一个用例为空树, + + + + and the other being a Node with a value and two subtrees. + 而另一个用例为具有一个值和两个子树的节点。 + + + + Check if an item exists in the binary search tree. + 检查项是否存在于二进制文件搜索树中。 + + + + Searches recursively using Pattern Matching. Returns true if it exists; otherwise, false. + 使用模式匹配进行递归搜索。如果存在,则返回 true,否则返回 false。 + + + + Check the left subtree. + 检查左子树。 + + + + Check the right subtree. + 检查右子树。 + + + + Inserts an item in the Binary Search Tree. + 在二进制文件搜索树中插入项。 + + + + Finds the place to insert recursively using Pattern Matching, then inserts a new node. + 查找使用模式匹配递归插入的位置,然后插入新节点。 + + + + If the item is already present, it does not insert anything. + 如果项已存在,则不会插入任何内容。 + + + + No need to insert, it already exists; return the node. + 无需插入,该项已存在;返回节点。 + + + + Call into left subtree. + 调入左子树。 + + + + Call into right subtree. + 调入右子树。 + + + + Discriminated Unions can also be represented as structs via the 'Struct' attribute. + 可区分联合也可通过 "Struct" 属性表示为结构。 + + + + This is helpful in situations where the performance of structs outweighs + 这在结构性能更重要的情况下很有用 + + + + the flexibility of reference types. + 引用类型的灵活性。 + + + + However, there are two important things to know when doing this: + 然而,执行此操作时需了解两个重要事项: + + + + 1. A struct DU cannot be recursively-defined. + 1. 无法以递归方式定义结构 DU。 + + + + 2. A struct DU must have unique names for each of its cases. + 2. 结构 DU 必须对其每个用例均有唯一名称。 + + + + Pattern Matching is a feature of F# that allows you to utilize Patterns, + 模式匹配是 F# 的一个功能,使你能够利用模式, + + + + which are a way to compare data with a logical structure or structures, + 它们是将数据与逻辑结构或结构进行比较的方法, + + + + decompose data into constituent parts, or extract information from data in various ways. + 将数据分解为各个构成部分,或通过各种方式从数据中提取信息。 + + + + You can then dispatch on the "shape" of a pattern via Pattern Matching. + 然后,你便可以在模式的“形状”上通过模式匹配进行派遣。 + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/pattern-matching + 有关详细信息,请参阅: https://docs.microsoft.com/zh-cn/dotnet/articles/fsharp/language-reference/pattern-matching + + + + A record for a person's first and last name + 人员的姓氏和名字的记录 + + + + A Discriminated Union of 3 different kinds of employees + 具有 3 种不同员工的可区分联合 + + + + Count everyone underneath the employee in the management hierarchy, + 在管理层次结构下对员工进行计数, + + + + including the employee. + 其中包括员工。 + + + + Find all managers/executives named "Dave" who do not have any reports. + 查找所有名为 "Dave" 且没有任何下属的经理/主管。 + + + + This uses the 'function' shorthand to as a lambda expression. + 这使用 "function" 简写为 lambda 表达式。 + + + + [] matches an empty list. + [] 匹配空列表。 + + + + '_' is a wildcard pattern that matches anything. + "_" 是与任何对象均匹配的通配符模式。 + + + + This handles the "or else" case. + 它处理 "or else" 情况。 + + + + You can also use the shorthand function construct for pattern matching, + 你也可将简写函数构造用于模式匹配, + + + + which is useful when you're writing functions which make use of Partial Application. + 这在编写使用偏函数应用的函数时很有用。 + + + + Define some more functions which parse with the helper function. + 定义更多使用 helper 函数分析的函数。 + + + + Active Patterns are another powerful construct to use with pattern matching. + 活动模式是另一个与模式匹配配合使用的强大构造。 + + + + They allow you to partition input data into custom forms, decomposing them at the pattern match call site. + 它们使你能够将输入数据分区到自定义窗体,然后在模式匹配调用站点分解它们。 + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/active-patterns + 有关详细信息,请参阅: https://docs.microsoft.com/zh-cn/dotnet/articles/fsharp/language-reference/active-patterns + + + + Pattern Matching via 'function' keyword and Active Patterns often looks like this. + 通过 "function" 关键字的匹配模式和活动模式通常如下所示。 + + + + Call the printer with some different values to parse. + 使用一些其他值调用打印机进行分析。 + + + + Option values are any kind of value tagged with either 'Some' or 'None'. + 选项值是用“Some”或“None”标记的任何类型的值。 + + + + They are used extensively in F# code to represent the cases where many other + 它们在 F# 代码中广泛用于表示许多其他 + + + + languages would use null references. + 语言使用 null 引用的用例。 + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/options + 有关详细信息,请参阅: https://docs.microsoft.com/zh-cn/dotnet/articles/fsharp/language-reference/options + + + + First, define a zipcode defined via Single-case Discriminated Union. + 首先,定义通过单用例可区分联合定义的邮政编码。 + + + + Next, define a type where the ZipCode is optional. + 接下来,定义一个类型,其中 ZipCode 是可选项。 + + + + Next, define an interface type that represents an object to compute the shipping zone for the customer's zip code, + 接下来,定义表示对象的接口类型,用于计算客户邮政编码的送货区域, + + + + given implementations for the 'getState' and 'getShippingZone' abstract methods. + 假定提供了“getState”和“getShippingZone”抽象方法的实现。 + + + + Next, calculate a shipping zone for a customer using a calculator instance. + 接下来,使用计算器实例计算客户的发货区域。 + + + + This uses combinators in the Option module to allow a functional pipeline for + 它在选项模块中使用连接符以允许功能管道 + + + + transforming data with Optionals. + 用于使用可选项转换数据。 + + + + Units of measure are a way to annotate primitive numeric types in a type-safe way. + 度量单位是一种以类型安全方式批注基元数值类型的方式。 + + + + You can then perform type-safe arithmetic on these values. + 然后,你便可以对这些值执行类型安全算术。 + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/units-of-measure + 有关详细信息,请参阅: https://docs.microsoft.com/zh-cn/dotnet/articles/fsharp/language-reference/units-of-measure + + + + First, open a collection of common unit names + 首先,打开常用单位名称集合 + + + + Define a unitized constant + 定义单元化常量 + + + + Next, define a new unit type + 接下来,定义新的单位类型 + + + + Conversion factor mile to meter. + 英里到米的换算系数。 + + + + Define a unitized constant + 定义单元化常量 + + + + Compute metric-system constant + 计算公制常量 + + + + Values using Units of Measure can be used just like the primitive numeric type for things like printing. + 使用度量单位的值可像基元数值类型用于打印等操作一样直接使用。 + + + + Classes are a way of defining new object types in F#, and support standard Object-oriented constructs. + 类是 F# 中定义新对象类型的一种方式,且支持标准的面向对象的构造。 + + + + They can have a variety of members (methods, properties, events, etc.) + 它们可以有各种成员(如,方法、属性、事件等) + + + + To learn more about Classes, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/classes + 若要了解关于类的详细信息,请参阅: https://docs.microsoft.com/zh-cn/dotnet/articles/fsharp/language-reference/classes + + + + To learn more about Members, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/members + 若要深入了解成员,请参阅: https://docs.microsoft.com/zh-cn/dotnet/articles/fsharp/language-reference/members + + + + A simple two-dimensional Vector class. + 简单的二维矢量类。 + + + + The class's constructor is on the first line, + 该类的构造函数位于第一行, + + + + and takes two arguments: dx and dy, both of type 'double'. + 并且采用两个参数: dx 和 dy,二者均属于类型 "double"。 + + + + This internal field stores the length of the vector, computed when the + 此内部字段存储矢量的长度,当发生以下情况时进行计算: + + + + object is constructed + 对象已构造 + + + + 'this' specifies a name for the object's self identifier. + “this”用于指定对象的自我标识符的名称。 + + + + In instance methods, it must appear before the member name. + 在实例方法中,它必须出现在成员名称之前。 + + + + This member is a method. The previous members were properties. + 该成员属于方法。以前的成员属于属性。 + + + + This is how you instantiate the Vector2D class. + 这就是你实例化 Vector2D 类的方式。 + + + + Get a new scaled vector object, without modifying the original object. + 获取新的缩放矢量对象而不修改原始对象。 + + + + Generic classes allow types to be defined with respect to a set of type parameters. + 通用类允许考虑使用一组类型参数来定义类型。 + + + + In the following, 'T is the type parameter for the class. + 以下示例中,"T" 表示类的类型参数。 + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/generics/ + 有关详细信息,请参阅: https://docs.microsoft.com/zh-cn/dotnet/articles/fsharp/language-reference/generics/ + + + + This internal field store the states in a list. + 此内部字段将状态存储在列表中。 + + + + Add a new element to the list of states. + 将新元素添加到状态列表中。 + + + + use the '<-' operator to mutate the value. + 使用 "<-" 运算符改变值。 + + + + Get the entire list of historical states. + 获取历史状态的完整列表。 + + + + Get the latest state. + 获取最新状态。 + + + + An 'int' instance of the state tracker class. Note that the type parameter is inferred. + 状态跟踪程序类的一个“int”实例。请注意,已推断类型参数。 + + + + Add a state + 添加状态 + + + + Interfaces are object types with only 'abstract' members. + 接口是只有“抽象”成员的对象类型。 + + + + Object types and object expressions can implement interfaces. + 对象类型和对象表达式可以实现接口。 + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/interfaces + 有关详细信息,请参阅: https://docs.microsoft.com/zh-cn/dotnet/articles/fsharp/language-reference/interfaces + + + + This is a type that implements IDisposable. + 它是实现 IDisposable 的类型。 + + + + This is the implementation of IDisposable members. + 它是 IDisposable 成员的实现。 + + + + This is an object that implements IDisposable via an Object Expression + 该对象可通过对象表达式实现 IDisposable + + + + Unlike other languages such as C# or Java, a new type definition is not needed + 与 C# 或 Java 等其他语言不同,无需新的类型定义 + + + + to implement an interface. + 以实现接口。 + + + + The FSharp.Core library defines a range of parallel processing functions. Here + FSharp.Core 库定义了一系列并行处理函数。此处 + + + + you use some functions for parallel processing over arrays. + 可使用某些函数对数组进行并行处理。 + + + + To learn more, see: https://msdn.microsoft.com/en-us/visualfsharpdocs/conceptual/array.parallel-module-%5Bfsharp%5D + 有关详细信息,请参阅: https://msdn.microsoft.com/zh-cn/visualfsharpdocs/conceptual/array.parallel-module-%5Bfsharp%5D + + + + First, an array of inputs. + 首先,输入一个数组。 + + + + Next, define a functions that does some CPU intensive computation. + 接下来,定义执行某些 CPU 密集型计算的函数。 + + + + Next, do a parallel map over a large input array. + 接下来,对大型输入数组执行并行映射。 + + + + Next, print the results. + 接下来,打印结果。 + + + + Events are a common idiom for .NET programming, especially with WinForms or WPF applications. + 事件是 .NET 编程的常见习惯用语,尤其是使用 WinForms 或 WPF 应用程序编程时。 + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/members/events + 有关详细信息,请参阅: https://docs.microsoft.com/zh-cn/dotnet/articles/fsharp/language-reference/members/events + + + + First, create instance of Event object that consists of subscription point (event.Publish) and event trigger (event.Trigger). + 首先,创建包含订阅点(event.Publish)和事件触发器(event.Trigger)的事件对象实例。 + + + + Next, add handler to the event. + 接下来,将处理程序添加到事件。 + + + + Next, trigger the event. + 接下来,触发该事件。 + + + + Next, create an instance of Event that follows standard .NET convention: (sender, EventArgs). + 接下来,创建遵循标准 .NET 约定的事件的实例: (sender, EventArgs)。 + + + + Next, add a handler for this new event. + 接下来,为此新事件添加处理程序。 + + + + Next, trigger this event (note that sender argument should be set). + 接下来,触发此事件(请注意,应设置 sender 参数)。 + + + + + \ No newline at end of file diff --git a/vsintegration/ProjectTemplates/TutorialProject/Template/xlf/Tutorial.fsx.zh-Hant.xlf b/vsintegration/ProjectTemplates/TutorialProject/Template/xlf/Tutorial.fsx.zh-Hant.xlf new file mode 100644 index 00000000000..128330e9ee3 --- /dev/null +++ b/vsintegration/ProjectTemplates/TutorialProject/Template/xlf/Tutorial.fsx.zh-Hant.xlf @@ -0,0 +1,1637 @@ + + + + + + This sample will guide you through elements of the F# language. + 此範例將引導您了解 F# 語言的項目。 + + + + To execute the code in F# Interactive, highlight a section of code and press Alt-Enter or right-click + 若要執行 F# 互動中的程式碼,請反白顯示某個程式碼區段並按下 Alt-Enter,或者以滑鼠右鍵按一下 + + + + and select "Execute in Interactive". You can open the F# Interactive Window from the "View" menu. + 並選取 [以互動方式執行]5D;。您可以從 [檢視]5D; 功能表開啟 F# 互動視窗。 + + + + For more about F#, see: + 如需有關 F# 的詳細資訊,請參閱: + + + + To see this tutorial in documentation form, see: + 若要參閱文件表單中的此教學課程,請參閱: + + + + To learn more about applied F# programming, use + 如需深入了解套用的 F# 程式設計,請使用 + + + + To install the Visual F# Power Tools, use + 若要安裝 Visual F# Power Tools,請使用 + + + + 'Tools' --> 'Extensions and Updates' --> `Online` and search + [工具]5D; --> [延伸模組和更新]5D; --> [連線]5D; 並搜尋 + + + + For additional templates to use with F#, see the 'Online Templates' in Visual Studio, + 如需有關搭配 F# 一起使用的其他範本,請參閱 Visual Studio 中的 [線上範本]5D;, + + + + 'New Project' --> 'Online Templates' + [新增專案]5D; --> [線上範本]5D; + + + + F# supports three kinds of comments: + F# 支援三種註解: + + + + 1. Double-slash comments. These are used in most situations. + 1. 將註解加上雙斜線。適用於大部分的情況。 + + + + 2. ML-style Block comments. These aren't used that often. + 2. 將註解加上 ML 樣式區塊。較不常使用。 + + + + 3. Triple-slash comments. These are used for documenting functions, types, and so on. + 3. 將註解加上三斜線。適用於記錄函式、類型等。 + + + + They will appear as text when you hover over something which is decorated with these comments. + 當您暫留在以這些註解為裝飾的項目上時,這些註解會顯示為文字。 + + + + They also support .NET-style XML comments, which allow you to generate reference documentation, + 這些註解也支援 .NET 樣式的 XML 註解,讓您可以產生參考文件, + + + + and they also allow editors (such as Visual Studio) to extract information from them. + 也讓編輯者 (像是 Visual Studio) 可以從註解中擷取資訊。 + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/xml-documentation + 若要深入了解,請參閱: https://docs.microsoft.com/zh-tw/dotnet/articles/fsharp/language-reference/xml-documentation + + + + Open namespaces using the 'open' keyword. + 使用 'open' 關鍵字開啟命名空間。 + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/import-declarations-the-open-keyword + 若要深入了解,請參閱: https://docs.microsoft.com/zh-tw/dotnet/articles/fsharp/language-reference/import-declarations-the-open-keyword + + + + A module is a grouping of F# code, such as values, types, and function values. + 模組是 F# 程式碼的分組,例如值、類型及函式值。 + + + + Grouping code in modules helps keep related code together and helps avoid name conflicts in your program. + 將程式碼分組為模組有助於將相關的程式碼整合在一塊,且能避免程式發生名稱衝突。 + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/modules + 若要深入了解,請參閱: https://docs.microsoft.com/zh-tw/dotnet/articles/fsharp/language-reference/modules + + + + This is a sample integer. + 此為範例整數。 + + + + This is a sample floating point number. + 此為範例浮點數。 + + + + This computed a new number by some arithmetic. Numeric types are converted using + 這使用了一些算數來計算新數字。使用函式 'int'、'double' 等 + + + + functions 'int', 'double' and so on. + 來轉換數字類型。 + + + + This is a list of the numbers from 0 to 99. + 此為從 0 到 99 的數字清單。 + + + + This is a list of all tuples containing all the numbers from 0 to 99 and their squares. + 此為所有 Tuple 的清單,內含從 0 到 99 的所有數字及其平方。 + + + + The next line prints a list that includes tuples, using '%A' for generic printing. + 下一行會使用 '%A' 執行一般列印,來列印包含 Tuple 的清單。 + + + + This is a sample integer with a type annotation + 此為具有型別註解的範例整數 + + + + Values in F# are immutable by default. They cannot be changed + 根據預設,F# 中的值是不可變的。於程式執行過程中,除非明確標示為可變的 + + + + in the course of a program's execution unless explicitly marked as mutable. + 否則無法對其進行變更。 + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/values/index#why-immutable + 若要深入了解,請參閱: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/values/index#why-immutable + + + + Binding a value to a name via 'let' makes it immutable. + 透過 'let' 將值繫結到名稱,即可將它設為不可變動。 + + + + The second line of code fails to compile because 'number' is immutable and bound. + 因為 'number' 無法變動並已繫結,所以無法編譯第二行程式碼。 + + + + Re-defining 'number' to be a different value is not allowed in F#. + 在 F# 中,不得將 'number' 重新定義為不同的值。 + + + + A mutable binding. This is required to be able to mutate the value of 'otherNumber'. + 可變動的繫結。需要此項目才可變更 'otherNumber' 的值。 + + + + When mutating a value, use '<-' to assign a new value. + 變動值時,請使用 '<-' 指派新的值。 + + + + You could not use '=' here for this purpose since it is used for equality + '=' 在此表示等於,所以無法用於此用途 + + + + or other contexts such as 'let' or 'module' + 或其他內容,例如 'let' 或 'module' + + + + Much of F# programming consists of defining functions that transform input data to produce + F# 程式設計時常需要定義函式來轉換輸入資料,從而產生 + + + + useful results. + 實用的結果。 + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/ + 若要深入了解,請參閱: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/ + + + + You use 'let' to define a function. This one accepts an integer argument and returns an integer. + 您可以使用 'let' 來定義函式。此接受整數引數,並會傳回整數。 + + + + Parentheses are optional for function arguments, except for when you use an explicit type annotation. + 對函式引數來說不一定要使用括號,但使用明確的型別註解時例外。 + + + + Apply the function, naming the function return result using 'let'. + 套用函式,使用 'let' 命名函數會傳回結果。 + + + + The variable type is inferred from the function return type. + 變數型別是從函式傳回型別推斷出來。 + + + + This line uses '%d' to print the result as an integer. This is type-safe. + 此行使用 '%d' 以整數形式列印結果。這是型別安全。 + + + + If 'result1' were not of type 'int', then the line would fail to compile. + 如果 'result1' 的類型不是 'int',則無法編譯該行。 + + + + When needed, annotate the type of a parameter name using '(argument:type)'. Parentheses are required. + 需要時,請使用 '(argument:type)' 為參數名稱的類型加上標註。需要使用括號。 + + + + Conditionals use if/then/elid/elif/else. + 條件使用 if/then/elid/elif/else。 + + + + Note that F# uses whitespace indentation-aware syntax, similar to languages like Python. + 請注意,F# 使用空白縮排感知語法,其與 Python 這類語言類似。 + + + + This line uses '%f' to print the result as a float. As with '%d' above, this is type-safe. + 此行使用 '%f' 以浮點形式列印結果。與上述 '%d' 相同,這是型別安全。 + + + + Booleans are fundamental data types in F#. Here are some examples of Booleans and conditional logic. + 布林值是 F# 中的基本資料類型。以下是一些布林值與條件式邏輯的範例。 + + + + To learn more, see: + 若要深入了解,請參閱: + + + + and + + + + + Booleans values are 'true' and 'false'. + 布林值為 'true' 和 'false'。 + + + + Operators on booleans are 'not', '&&' and '||'. + 布林值上的運算子為 'not'、'&&' 和 '||'。 + + + + This line uses '%b'to print a boolean value. This is type-safe. + 此行使用 '%b' 列印布林值。這是型別安全。 + + + + Strings are fundamental data types in F#. Here are some examples of Strings and basic String manipulation. + 字串在 F# 中是基本的資料類型。以下是一些字串與基本字串操作的範例。 + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/strings + 若要深入了解,請參閱: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/strings + + + + Strings use double quotes. + 字串使用雙引號。 + + + + Strings can also use @ to create a verbatim string literal. + 字串也可使用 @ 來建立逐字字串常值。 + + + + This will ignore escape characters such as '\', '\n', '\t', etc. + 這將會忽略逸出字元,例如 '\'、'\n'、'\t' 等等。 + + + + String literals can also use triple-quotes. + 字串常值也可使用三引號。 + + + + String concatenation is normally done with the '+' operator. + 串連字串通常使用 '+' 運算子進行。 + + + + This line uses '%s' to print a string value. This is type-safe. + 此行使用 '%s' 列印字串值。這是型別安全。 + + + + Substrings use the indexer notation. This line extracts the first 7 characters as a substring. + 子字串使用索引子標記法。此行會擷取前 7 個字元作為子字串。 + + + + Note that like many languages, Strings are zero-indexed in F#. + 請注意,就像許多語言一樣,字串在 F# 中會以零為基底編製索引。 + + + + Tuples are simple combinations of data values into a combined value. + 元組是簡單的資料值合併為合併值。 + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/tuples + 若要深入了解,請參閱: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/tuples + + + + A simple tuple of integers. + 簡式整數元組。 + + + + A function that swaps the order of two values in a tuple. + 將元組中兩個值的順序互換的函式。 + + + + F# Type Inference will automatically generalize the function to have a generic type, + F# 型別推斷會自動將函式一般化成泛型類型, + + + + meaning that it will work with any type. + 表示其可與任何類型搭配運作。 + + + + A tuple consisting of an integer, a string, + 元組,包含整數、字串、 + + + + and a double-precision floating point number. + 和雙精確度浮點數。 + + + + A simple tuple of integers with a type annotation. + 具有類型註釋之整數的簡單元組。 + + + + Type annotations for tuples use the * symbol to separate elements + 元組的類型註釋會使用 * 符號分隔項目 + + + + Tuples are normally objects, but they can also be represented as structs. + 元組一般是物件,但也可以用結構形式呈現。 + + + + These interoperate completely with structs in C# and Visual Basic.NET; however, + 這些會與 C# 和 Visual Basic .NET 中的結構完全相互操作; 不過, + + + + struct tuples are not implicitly convertable with object tuples (often called reference tuples). + 結構元組無法利用物件元組 (通常稱為參考元組) 進行隱含轉換。 + + + + The second line below will fail to compile because of this. Uncomment it to see what happens. + 因此,將無法編譯以下的第二行。請取消它的註解,看看會如何。 + + + + Although you cannot implicitly convert between struct tuples and reference tuples, + 雖然您不能隱含地在結構元組及參考元組間進行轉換, + + + + you can explicitly convert via pattern matching, as demonstrated below. + 但您可透過模式比對明確地轉換,如下所示。 + + + + The F# pipe operators ('|>', '<|', etc.) and F# composition operators ('>>', '<<') + F# 管道運算子 ('|>'、'<|' 等) 與 F# 組合運算子 ('>>'、'<<') + + + + are used extensively when processing data. These operators are themselves functions + 廣泛用於處理資料時。這些運算子本身就是函式 + + + + which make use of Partial Application. + 其會利用局部應用程式。 + + + + To learn more about these operators, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/#function-composition-and-pipelining + 若要深入了解這些運算子,請參閱: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/#function-composition-and-pipelining + + + + To learn more about Partial Application, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/#partial-application-of-arguments + 若要深入了解局部應用程式,請參閱: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/#partial-application-of-arguments + + + + Squares a value. + 產生值的平方。 + + + + Adds 1 to a value. + 將值加 1。 + + + + Tests if an integer value is odd via modulo. + 測試整數值是否為經過模數的奇數。 + + + + A list of 5 numbers. More on lists later. + 5 個數字的清單。清單上稍後會有更多項目。 + + + + Given a list of integers, it filters out the even numbers, + 提供整數清單,它會篩選出偶數, + + + + squares the resulting odds, and adds 1 to the squared odds. + 取結果奇數的平方值,並對平方後的奇數加 1。 + + + + A shorter way to write 'squareOddValuesAndAddOne' is to nest each + 撰寫 'squareOddValuesAndAddOne' 較簡短的方式是巢狀每個項目 + + + + sub-result into the function calls themselves. + 子結果進入函式呼叫本身。 + + + + This makes the function much shorter, but it's difficult to see the + 這會將函式設成更短,但較難查看 + + + + order in which the data is processed. + 資料的處理順序。 + + + + A preferred way to write 'squareOddValuesAndAddOne' is to use F# pipe operators. + 撰寫 'squareOddValuesAndAddOne' 的慣用方式是使用 F# 管道運算子。 + + + + This allows you to avoid creating intermediate results, but is much more readable + 這可讓您避免建立中繼結果,但比較容易閱讀 + + + + than nesting function calls like 'squareOddValuesAndAddOneNested' + ,相較於 'squareOddValuesAndAddOneNested' 這類的巢狀函式呼叫 + + + + You can shorten 'squareOddValuesAndAddOnePipeline' by moving the second `List.map` call + 您可以移動第二個 'List.map' 呼叫來縮短 'squareOddValuesAndAddOnePipeline' + + + + into the first, using a Lambda Function. + 到第一個項目,使用 Lambda 函式。 + + + + Note that pipelines are also being used inside the lambda function. F# pipe operators + 請注意,管線也會用於 lambda 函式內。F# 管道運算子 + + + + can be used for single values as well. This makes them very powerful for processing data. + 也可以用於單一值。如此可讓它們在處理資料時功能極為強大。 + + + + Lastly, you can eliminate the need to explicitly take 'values' in as a parameter by using '>>' + 最後,您不需要使用 '>>' 來明確接受 'values' 作為參數 + + + + to compose the two core operations: filtering out even numbers, then squaring and adding one. + 以撰寫兩個核心作業: 篩選出偶數,然後取其平方值再加一。 + + + + Likewise, the 'fun x -> ...' bit of the lambda expression is also not needed, because 'x' is simply + 同樣地,也不需要 lambda 運算式的 'fun x -> ...' 位元,因為 'x' 只是 + + + + being defined in that scope so that it can be passed to a functional pipeline. Thus, '>>' can be used + 定義於該範圍內,以將它傳遞至功能管線。因此,可以使用 '>>' + + + + there as well. + 也會在該處。 + + + + The result of 'squareOddValuesAndAddOneComposition' is itself another function which takes a + 'squareOddValuesAndAddOneComposition' 的結果本身是另一個函式,且該函式接受 + + + + list of integers as its input. If you execute 'squareOddValuesAndAddOneComposition' with a list + 作為輸入的整數清單。如果您執行 'squareOddValuesAndAddOneComposition' 時搭配清單 + + + + of integers, you'll notice that it produces the same results as previous functions. + (整數),您將注意到它會產生與先前函式相同的結果。 + + + + This is using what is known as function composition. This is possible because functions in F# + 這將使用所謂的函式組合。原因可能是 F# 中的函式 + + + + use Partial Application and the input and output types of each data processing operation match + 使用局部應用程式,以及每個資料處理作業相符的輸入與輸出類型 + + + + the signatures of the functions we're using. + 所使用之函式的簽章。 + + + + Lists are ordered, immutable, singly-linked lists. They are eager in their evaluation. + 清單是已排序且不可變動的單向連結清單。它們於評估時會即刻進行運算。 + + + + This module shows various ways to generate lists and process lists with some functions + 此模組示範產生清單及利用某些函式處理清單的各種方法 + + + + in the 'List' module in the F# Core Library. + 在 F# 核心程式庫的 'List' 模組中。 + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/lists + 若要深入了解,請參閱: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/lists + + + + Lists are defined using [ ... ]. This is an empty list. + 清單使用 [ ... ] 定義。這是空白清單。 + + + + This is a list with 3 elements. ';' is used to separate elements on the same line. + 這是內含 3 個項目的清單。使用 ';' 分隔同一行的項目。 + + + + You can also separate elements by placing them on their own lines. + 您也可以將項目放在各自的行上加以分隔。 + + + + This is a list of integers from 1 to 1000 + 此為從 1 到 1000 的整數清單 + + + + Lists can also be generated by computations. This is a list containing + 計算也可產生清單。此清單內含 + + + + all the days of the year. + 當年每一天。 + + + + Print the first 5 elements of 'daysList' using 'List.take'. + 使用 'List.take' 列印 'daysList' 的前 5 個項目。 + + + + Computations can include conditionals. This is a list containing the tuples + 計算可包含條件。此為內含元組的清單 + + + + which are the coordinates of the black squares on a chess board. + 其為棋盤上黑方格的座標。 + + + + Lists can be transformed using 'List.map' and other functional programming combinators. + 可以使用 'List.map' 及其他函式程式設計結合器轉換清單。 + + + + This definition produces a new list by squaring the numbers in numberList, using the pipeline + 此定義會產生新的清單,方法是使用管線使 numberList 中的數字成平方 + + + + operator to pass an argument to List.map. + 運算子以將引數傳遞到 List.map。 + + + + There are many other list combinations. The following computes the sum of the squares of the + 還有許多其他清單組合。以下會計算下項的平方總和: + + + + numbers divisible by 3. + 可由 3 整除的數字。 + + + + Arrays are fixed-size, mutable collections of elements of the same type. + 陣列是固定大小且類型相同的可變動項目集合。 + + + + Although they are similar to Lists (they support enumeration and have similar combinators for data processing), + 陣列雖與清單 (支援列舉,並具有類似的結合器可用於資料處理) 相似,但 + + + + they are generally faster and support fast random access. This comes at the cost of being less safe by being mutable. + 陣列通常比較快,而且支援快速隨機存取。但可變動的代價是安全性變低。 + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/arrays + 若要深入了解,請參閱: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/arrays + + + + This is The empty array. Note that the syntax is similar to that of Lists, but uses `[| ... |]` instead. + 此為空白的陣列。請注意與清單前置詞相似的前置詞,請改用 `[| ... |]`。 + + + + Arrays are specified using the same range of constructs as lists. + 使用與所列相同的建構範圍指定陣列。 + + + + This is an array of numbers from 1 to 1000. + 這是從 1 到 1000 的數字陣列。 + + + + This is an array containing only the words "hello" and "world". + 這是僅包含 "hello" 與 "world" 字詞的陣列。 + + + + This is an array initialized by index and containing the even numbers from 0 to 2000. + 這是由索引初始化的陣列,內含從 0 到 2000 之間的偶數。 + + + + Sub-arrays are extracted using slicing notation. + 使用了切割標記法來擷取子陣列。 + + + + You can loop over arrays and lists using 'for' loops. + 您可以使用 'for' 迴圈逐一反覆執行陣列與清單。 + + + + You can modify the contents of an an array element by using the left arrow assignment operator. + 您可以使用向左鍵指派運算子來修改陣列元素的內容。 + + + + To learn more about this operator, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/values/index#mutable-variables + 若要深入了解此運算子,請參閱: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/values/index#mutable-variables + + + + You can transform arrays using 'Array.map' and other functional programming operations. + 您可以使用 'Array.map' 及其他功能程式設計作業來轉換陣列。 + + + + The following calculates the sum of the lengths of the words that start with 'h'. + 以下會計算 'h' 開頭的字組之長度總和。 + + + + Sequences are a logical series of elements, all of the same type. These are a more general type than Lists and Arrays. + 序列是一系列的邏輯項目,全部皆為相同的類型。它是比清單及陣列更常見的類型。 + + + + Sequences are evaluated on-demand and are re-evaluated each time they are iterated. + 序列是視需要評估,並在每次反覆執行時重新評估。 + + + + An F# sequence is an alias for a .NET System.Collections.Generic.IEnumerable<'T>. + F# 序列是 .NET System.Collections.Generic.IEnumerable<'T> 的別名。 + + + + Sequence processing functions can be applied to Lists and Arrays as well. + 序列處理函式也可以套用到清單和陣列。 + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/sequences + 若要深入了解,請參閱: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/sequences + + + + This is the empty sequence. + 此為空白序列。 + + + + This a sequence of values. + 這是值的序列。 + + + + This is an on-demand sequence from 1 to 1000. + 此為從 1 到 1000 的隨選序列。 + + + + This is a sequence producing the words "hello" and "world" + 此為產生 "hello" 及 "world" 的序列 + + + + This sequence producing the even numbers up to 2000. + 此序列產生 2000 以下的偶數。 + + + + This is an infinite sequence which is a random walk. + 這是屬於隨機漫步的無限序列。 + + + + This example uses yield! to return each element of a subsequence. + 此範例使用 yield! 傳回序列的每個元素。 + + + + This example shows the first 100 elements of the random walk. + 此範例顯示了隨機漫步的前 100 個項目。 + + + + Recursive functions can call themselves. In F#, functions are only recursive + 遞迴函式可以呼叫其本身。在 F# 中,函式均為遞迴 + + + + when declared using 'let rec'. + (於使用 'let rec' 宣告時)。 + + + + Recursion is the preferred way to process sequences or collections in F#. + 遞迴是處理 F# 中序列或集合的慣用方法。 + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/index#recursive-functions + 若要深入了解,請參閱: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/functions/index#recursive-functions + + + + This example shows a recursive function that computes the factorial of an + 此範例顯示遞迴函式,其可計算下項的階乘: + + + + integer. It uses 'let rec' to define a recursive function. + 整數。其使用 'let rec' 來定義遞迴函式。 + + + + Computes the greatest common factor of two integers. + 計算兩個整數的最大公因數。 + + + + Since all of the recursive calls are tail calls, + 因為所有遞迴呼叫都是先計算細項的呼叫 (tail call),所以 + + + + the compiler will turn the function into a loop, + 編譯器會將函式轉換為迴圈, + + + + which improves performance and reduces memory consumption. + 以改善效能並降低記憶體耗用。 + + + + This example computes the sum of a list of integers using recursion. + 此範例會計算使用遞迴之整數清單的總和。 + + + + This makes 'sumList' tail recursive, using a helper function with a result accumulator. + 這會將 'sumList' 設成尾遞迴,使用內含結果累加器的 Helper 函式。 + + + + This invokes the tail recursive helper function, providing '0' as a seed accumulator. + 這會叫用尾遞迴 helper 函式,提供 '0' 作為種子累加器。 + + + + An approach like this is common in F#. + 在 F# 中,這類方式十分常見。 + + + + Records are an aggregate of named values, with optional members (such as methods). + 記錄是具有選擇性成員 (例如方法) 之具名值的彙總。 + + + + They are immutable and have structural equality semantics. + 它們不可變動,且具有結構相等的語意。 + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/records + 若要深入了解,請參閱: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/records + + + + This example shows how to define a new record type. + 此範例示範如何定義新記錄類型。 + + + + This example shows how to instantiate a record type. + 此範例示範如何具現化記錄類型。 + + + + You can also do this on the same line with ';' separators. + 您也可以使用 ';' 分隔符號,在同一行執行此作業。 + + + + This example shows how to use "copy-and-update" on record values. It creates + 此範例顯示如何在記錄值上使用 "copy-and-update"。其會建立 + + + + a new record value that is a copy of contact1, but has different values for + 新記錄值,其為 contact1 的複本,但對於下項有不同的值: + + + + the 'Phone' and 'Verified' fields. + [Phone]5D; 與 [Verified]5D; 欄位。 + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/copy-and-update-record-expressions + 若要深入了解,請參閱: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/copy-and-update-record-expressions + + + + This example shows how to write a function that processes a record value. + 此範例示範如何寫入會處理記錄值的函式。 + + + + It converts a 'ContactCard' object to a string. + 其會將 'ContactCard' 物件轉換為字串。 + + + + This is an example of a Record with a member. + 這是內含成員之記錄的範例。 + + + + Members can implement object-oriented members. + 成員可以實作物件導向成員。 + + + + Members are accessed via the '.' operator on an instantiated type. + 成員透過在具現化類型上的 '.' 運算子加以存取。 + + + + Records can also be represented as structs via the 'Struct' attribute. + 記錄也可透過 'Struct' 屬性以結構形式呈現。 + + + + This is helpful in situations where the performance of structs outweighs + 它在結構效能較優的情況下很有用 + + + + the flexibility of reference types. + 參考類型的彈性。 + + + + Discriminated Unions (DU for short) are values which could be a number of named forms or cases. + 差異聯集 (簡寫為 DU) 是可能為數個具名表單或案例的值。 + + + + Data stored in DUs can be one of several distinct values. + DU 中所儲存的資料可以是數個相異值中的一個。 + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/discriminated-unions + 若要深入了解,請參閱: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/discriminated-unions + + + + The following represents the suit of a playing card. + 以下代表一副撲克牌。 + + + + A Disciminated Union can also be used to represent the rank of a playing card. + 差異聯集也可用以代表一張撲克牌的順位。 + + + + Represents the rank of cards 2 .. 10 + 代表 2 .. 10 這幾張牌的順位 + + + + Discriminated Unions can also implement object-oriented members. + 差異聯集也可以實作物件導向成員。 + + + + This is a record type that combines a Suit and a Rank. + 這是合併了 Suit 和 Rank 的記錄類型。 + + + + It's common to use both Records and Disciminated Unions when representing data. + 代表資料時,通常會使用記錄與差異聯集。 + + + + This computes a list representing all the cards in the deck. + 這會計算代表一疊牌中所有牌的清單。 + + + + This example converts a 'Card' object to a string. + 此範例將 'Card' 物件轉換為字串。 + + + + This example prints all the cards in a playing deck. + 此範例會列印牌局的所有紙牌。 + + + + Single-case DUs are often used for domain modeling. This can buy you extra type safety + 單一案例 DU 通常用於網域模型。這讓使用類型變得更加安全 + + + + over primitive types such as strings and ints. + 針對基本類型,例如 strings 和 ints。 + + + + Single-case DUs cannot be implicitly converted to or from the type they wrap. + 單一案例 DU 無法隱含地轉換成它們所包裝的類型,反之亦然。 + + + + For example, a function which takes in an Address cannot accept a string as that input, + 例如,接受位址的函式無法接受字串作為輸入, + + + + or vive/versa. + 反之亦然。 + + + + You can easily instantiate a single-case DU as follows. + 您可以輕鬆地具現化單一案例 DU,如下所示。 + + + + When you need the value, you can unwrap the underlying value with a simple function. + 當您需要值時,可以使用簡單的函式來展開基礎值。 + + + + Printing single-case DUs is simple with unwrapping functions. + 使用展開 (unwrap) 函式來列印單一案例的 DU 十分簡單。 + + + + Disciminated Unions also support recursive definitions. + 差異聯集也支援遞迴定義。 + + + + This represents a Binary Search Tree, with one case being the Empty tree, + 這代表二進位搜尋樹狀結構,其中有一個案例是空的樹狀結構, + + + + and the other being a Node with a value and two subtrees. + 而另一個是具有一個值和兩個子樹狀結構的節點。 + + + + Check if an item exists in the binary search tree. + 請確認二進位搜尋樹狀結構中是否已有項目存在。 + + + + Searches recursively using Pattern Matching. Returns true if it exists; otherwise, false. + 使用模式比對進行遞迴搜尋。若存在即傳回 true; 否則傳回 false。 + + + + Check the left subtree. + 請檢查左樹狀子結構。 + + + + Check the right subtree. + 請檢查右樹狀子結構。 + + + + Inserts an item in the Binary Search Tree. + 在二進位搜尋樹狀結構中插入項目。 + + + + Finds the place to insert recursively using Pattern Matching, then inserts a new node. + 尋找要使用模式比對遞迴插入的位置,然後插入新節點。 + + + + If the item is already present, it does not insert anything. + 如果該項目已經存在,就不會插入任何內容。 + + + + No need to insert, it already exists; return the node. + 其已存在,所以無須插入; 傳回該節點。 + + + + Call into left subtree. + 呼叫左樹狀子結構。 + + + + Call into right subtree. + 呼叫右樹狀子結構。 + + + + Discriminated Unions can also be represented as structs via the 'Struct' attribute. + 差異聯集也可透過 'Struct' 屬性以結構形式呈現。 + + + + This is helpful in situations where the performance of structs outweighs + 它在結構效能較優的情況下很有用 + + + + the flexibility of reference types. + 參考類型的彈性。 + + + + However, there are two important things to know when doing this: + 但執行這項作業時,需要知道兩件重要的事情: + + + + 1. A struct DU cannot be recursively-defined. + 1. 不可遞迴定義結構 DU。 + + + + 2. A struct DU must have unique names for each of its cases. + 2. 結構 DU 的每個案例都必須要有唯一的名稱。 + + + + Pattern Matching is a feature of F# that allows you to utilize Patterns, + 模式比對是讓您能利用模式的一項 F# 功能, + + + + which are a way to compare data with a logical structure or structures, + 這是使用一或多個邏輯結構來比對資料的方式, + + + + decompose data into constituent parts, or extract information from data in various ways. + 將資料分解為構成組件,或透過各種方式來擷取資料中的資訊。 + + + + You can then dispatch on the "shape" of a pattern via Pattern Matching. + 接著可根據透過比對模式之模式的「形狀」加以分派。 + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/pattern-matching + 若要深入了解,請參閱: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/pattern-matching + + + + A record for a person's first and last name + 人員姓名的記錄 + + + + A Discriminated Union of 3 different kinds of employees + 3 種不同種類員工的差異聯集 + + + + Count everyone underneath the employee in the management hierarchy, + 計算管理階層中該員工下的每位人員, + + + + including the employee. + 包括員工。 + + + + Find all managers/executives named "Dave" who do not have any reports. + 尋找沒有任何報表且名為 "Dave" 的所有經理/主管。 + + + + This uses the 'function' shorthand to as a lambda expression. + 這會使用 'function' 速記作為 lambda 運算式。 + + + + [] matches an empty list. + [] 代表空的清單。 + + + + '_' is a wildcard pattern that matches anything. + '_' 是符合所有項目的萬用字元模式。 + + + + This handles the "or else" case. + 這會處理 "or else" 案例。 + + + + You can also use the shorthand function construct for pattern matching, + 您也可以使用速記函式建構來進行模式比對, + + + + which is useful when you're writing functions which make use of Partial Application. + 適用於撰寫可利用局部應用程式的函式時。 + + + + Define some more functions which parse with the helper function. + 再額外定義一些使用 Helper 函式進行剖析的函式。 + + + + Active Patterns are another powerful construct to use with pattern matching. + 現用模式是另一項功能強大之建構,可與模式比對搭配使用。 + + + + They allow you to partition input data into custom forms, decomposing them at the pattern match call site. + 它們可讓您將輸入資料分割到多個自訂表單,於模式比對呼叫網站進行分解。 + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/active-patterns + 若要深入了解,請參閱: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/active-patterns + + + + Pattern Matching via 'function' keyword and Active Patterns often looks like this. + 透過 'function' 關鍵字與現用模式進行模式比對,通常看來如下。 + + + + Call the printer with some different values to parse. + 透過解析一些不同的值來呼叫印表機。 + + + + Option values are any kind of value tagged with either 'Some' or 'None'. + 選項值是以 'Some' 或 'None' 標記的任何一種值。 + + + + They are used extensively in F# code to represent the cases where many other + 它們廣泛用於 F# 程式碼中,來代表許多其他語言會 + + + + languages would use null references. + 使用 null 參考的狀況。 + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/options + 若要深入了解,請參閱: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/options + + + + First, define a zipcode defined via Single-case Discriminated Union. + 首先,定義透過單一案例差異聯集所定義的郵遞區號。 + + + + Next, define a type where the ZipCode is optional. + 接著,定義不一定需要 ZipCode 的類型。 + + + + Next, define an interface type that represents an object to compute the shipping zone for the customer's zip code, + 然後,定義代表物件的介面類型,以計算客戶郵遞區號的郵寄區域, + + + + given implementations for the 'getState' and 'getShippingZone' abstract methods. + 'getState' 和 'getShippingZone' 抽象方法的指定實作。 + + + + Next, calculate a shipping zone for a customer using a calculator instance. + 接下來,為使用計算機執行個體的客戶計算出貨區。 + + + + This uses combinators in the Option module to allow a functional pipeline for + 這會在 Option 模組中使用結合器,以允許在執行下列功能時使用功能管線: + + + + transforming data with Optionals. + 使用選用項目來轉換資料。 + + + + Units of measure are a way to annotate primitive numeric types in a type-safe way. + 測量單位是以型別安全方式為基本數值類型加上註釋的方法。 + + + + You can then perform type-safe arithmetic on these values. + 接著可以在這些值上執行型別安全算術。 + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/units-of-measure + 若要深入了解,請參閱: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/units-of-measure + + + + First, open a collection of common unit names + 首先,開啟常用單位名稱的集合 + + + + Define a unitized constant + 定義 unitized 常數 + + + + Next, define a new unit type + 接著,定義新單位類型 + + + + Conversion factor mile to meter. + 英哩到公尺的轉換因數。 + + + + Define a unitized constant + 定義 unitized 常數 + + + + Compute metric-system constant + 計算計量系統常數 + + + + Values using Units of Measure can be used just like the primitive numeric type for things like printing. + 使用測量單位之值的用法,就像是列印這類作業的基本數字類型一樣。 + + + + Classes are a way of defining new object types in F#, and support standard Object-oriented constructs. + 類別是在 F# 中定義新物件類型的一種方式,且支援標準物件導向建構。 + + + + They can have a variety of members (methods, properties, events, etc.) + 它們可以有各式不同的成員 (方法、屬性、事件等等) + + + + To learn more about Classes, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/classes + 若要深入了解類別,請參閱: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/classes + + + + To learn more about Members, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/members + 若要深入了解成員,請參閱: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/members + + + + A simple two-dimensional Vector class. + 簡式二維向量類別。 + + + + The class's constructor is on the first line, + 類別的建構函式位於第一行, + + + + and takes two arguments: dx and dy, both of type 'double'. + 並接受兩種引數: dx 與 dy,兩者的類型都是 'double'。 + + + + This internal field stores the length of the vector, computed when the + 這個內部欄位會儲存向量長度,計算時機為 + + + + object is constructed + 物件已建構 + + + + 'this' specifies a name for the object's self identifier. + 'this' 會為物件的自我識別碼指定名稱。 + + + + In instance methods, it must appear before the member name. + 在執行個體方法中,它必須出現在成員名稱前面。 + + + + This member is a method. The previous members were properties. + 此成員是方法。先前的成員是屬性。 + + + + This is how you instantiate the Vector2D class. + 這是 Vector2D 類別的具現化方式。 + + + + Get a new scaled vector object, without modifying the original object. + 取得全新且可調整大小的向量物件,但不修改原始物件。 + + + + Generic classes allow types to be defined with respect to a set of type parameters. + 泛型類別可定義關乎一組類型參數的類型。 + + + + In the following, 'T is the type parameter for the class. + 在下列範例中,'T 是類別的型別參數。 + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/generics/ + 若要深入了解,請參閱: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/generics/ + + + + This internal field store the states in a list. + 此內部欄位會以清單形式儲存狀態。 + + + + Add a new element to the list of states. + 新增項目至狀態清單。 + + + + use the '<-' operator to mutate the value. + 使用 '<-' 運算子可變動值。 + + + + Get the entire list of historical states. + 取得完整的歷程狀態清單。 + + + + Get the latest state. + 取得最新狀態。 + + + + An 'int' instance of the state tracker class. Note that the type parameter is inferred. + 狀態追蹤器類別的 'int' 執行個體。請注意,型別參數是推斷出來的。 + + + + Add a state + 加入狀態 + + + + Interfaces are object types with only 'abstract' members. + 介面為只有 'abstract' 成員的物件類型。 + + + + Object types and object expressions can implement interfaces. + 物件類型與物件運算式可以實作介面。 + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/interfaces + 若要深入了解,請參閱: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/interfaces + + + + This is a type that implements IDisposable. + 這是實作 IDisposable 的類型。 + + + + This is the implementation of IDisposable members. + 這是 IDisposable 成員的實作。 + + + + This is an object that implements IDisposable via an Object Expression + 這是透過物件運算式實作 IDisposable 的物件 + + + + Unlike other languages such as C# or Java, a new type definition is not needed + 與 C# 或 Java 等其他這類語言不同,不需要新的類型定義 + + + + to implement an interface. + 以實作介面。 + + + + The FSharp.Core library defines a range of parallel processing functions. Here + FSharp.Core 程式庫定義一個範圍內的平行處理函式。這裡 + + + + you use some functions for parallel processing over arrays. + 您可以使用一些函式對陣列進行平行處理。 + + + + To learn more, see: https://msdn.microsoft.com/en-us/visualfsharpdocs/conceptual/array.parallel-module-%5Bfsharp%5D + 若要深入了解,請參閱: https://msdn.microsoft.com/en-us/visualfsharpdocs/conceptual/array.parallel-module-%5Bfsharp%5D + + + + First, an array of inputs. + 首先,輸入的陣列。 + + + + Next, define a functions that does some CPU intensive computation. + 接下來,定義執行某些 CPU 密集型計算的函式。 + + + + Next, do a parallel map over a large input array. + 接下來,對大型輸入陣列執行平行對應。 + + + + Next, print the results. + 接下來,列印結果。 + + + + Events are a common idiom for .NET programming, especially with WinForms or WPF applications. + 事件是 .NET 程式設計的常見慣用語,特別是使用 WinForms 或 WPF 應用程式時。 + + + + To learn more, see: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/members/events + 若要深入了解,請參閱: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/members/events + + + + First, create instance of Event object that consists of subscription point (event.Publish) and event trigger (event.Trigger). + 首先,建立由訂閱點 (event.Publish) 與事件觸發程序 (event.Trigger) 所組成之事件物件的執行個體。 + + + + Next, add handler to the event. + 接下來,將處理常式新增到事件。 + + + + Next, trigger the event. + 接下來,觸發該事件。 + + + + Next, create an instance of Event that follows standard .NET convention: (sender, EventArgs). + 接下來,為遵循標準 .NET 慣例的事件建立執行個體: (sender, EventArgs)。 + + + + Next, add a handler for this new event. + 接下來,為此新事件新增處理常式。 + + + + Next, trigger this event (note that sender argument should be set). + 接下來,觸發此事件 (請注意,應該設定 sender 引數)。 + + + + + \ No newline at end of file diff --git a/vsintegration/ProjectTemplates/TutorialProject/TutorialProject.csproj b/vsintegration/ProjectTemplates/TutorialProject/TutorialProject.csproj index 8e60663561c..72afa7b760d 100644 --- a/vsintegration/ProjectTemplates/TutorialProject/TutorialProject.csproj +++ b/vsintegration/ProjectTemplates/TutorialProject/TutorialProject.csproj @@ -1,59 +1,17 @@  - + + - $(MSBuildProjectDirectory)\..\..\..\src TutorialProject - ProjectTemplates - true - true - false - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - false - false - false - false - false - false - false - false - false - {2FACEE44-48BD-40B5-A2EE-B54A0C9BB7C4} - - - Debug - net40 - $(FSharpSourcesRoot)\..\$(Configuration)\$(TargetDotnetProfile)\bin\$(TemplateCategory)\$(AssemblyName) - - - - - $(FSharpSourcesRoot)\..\loc\lcl\{Lang}\$(TemplateCategory)\$(AssemblyName)\Tutorial.fsx.lcl - $(FSharpSourcesRoot)\..\loc\lci\$(TemplateCategory)\$(AssemblyName)\Tutorial.fsx.lci - false - false - - - - + + + Template\Tutorial.fsx + + - - - - - - - - - - - - - - - - \ No newline at end of file + diff --git a/vsintegration/Templates.Directory.Build.props b/vsintegration/Templates.Directory.Build.props new file mode 100644 index 00000000000..9be1daa15b8 --- /dev/null +++ b/vsintegration/Templates.Directory.Build.props @@ -0,0 +1,22 @@ + + + + + + net46 + v4.6 + true + true + false + false + false + false + false + false + false + false + false + false + + + diff --git a/vsintegration/Templates.Directory.Build.targets b/vsintegration/Templates.Directory.Build.targets new file mode 100644 index 00000000000..84513c489fc --- /dev/null +++ b/vsintegration/Templates.Directory.Build.targets @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/vsintegration/Utils/LanguageServiceProfiling/LanguageServiceProfiling.fsproj b/vsintegration/Utils/LanguageServiceProfiling/LanguageServiceProfiling.fsproj index 3c4dd3e74fc..a61ba873ce9 100644 --- a/vsintegration/Utils/LanguageServiceProfiling/LanguageServiceProfiling.fsproj +++ b/vsintegration/Utils/LanguageServiceProfiling/LanguageServiceProfiling.fsproj @@ -1,80 +1,25 @@  - - + + - $(MSBuildProjectDirectory)\..\..\..\src - FSharp - - - - Debug - AnyCPU - 2.0 - e7fa3a71-51af-4fca-9c2f-7c853e515903 Exe - LanguageServiceProfiling - LanguageServiceProfiling - v4.6 - true - 4.4.1.0 - LanguageServiceProfiling - - - true - false - false - bin\$(Configuration)\ - DEBUG;TRACE - 3 - x86 - - - true - - - true - true - bin\$(Configuration)\ - TRACE - 3 - x86 - - - true + true + true + $(SystemValueTuplePackageVersion) + true + - + - - - - - - $(FSharpSourcesRoot)\..\packages\System.ValueTuple.4.3.1\lib\netstandard1.0\System.ValueTuple.dll - - + + - - - FSharp.Core - {ded3bbd7-53f4-428a-8c9f-27968e768605} - True - - - {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3} - FSharp.Compiler.Private - True - - - $(FSharpSourcesRoot)\..\packages\System.ValueTuple.4.3.1\lib\netstandard1.0\System.ValueTuple.dll - true - - - - \ No newline at end of file + + diff --git a/vsintegration/Utils/LanguageServiceProfiling/Options.fs b/vsintegration/Utils/LanguageServiceProfiling/Options.fs index d597be60d60..cf900181442 100644 --- a/vsintegration/Utils/LanguageServiceProfiling/Options.fs +++ b/vsintegration/Utils/LanguageServiceProfiling/Options.fs @@ -165,45 +165,45 @@ let FCS (repositoryDir: string) : Options = @"src\fsharp\CompileOptions.fs" @"src\fsharp\fsc.fsi" @"src\fsharp\fsc.fs" - @"src\fsharp\vs\IncrementalBuild.fsi" - @"src\fsharp\vs\IncrementalBuild.fs" - @"src\fsharp\vs\Reactor.fsi" - @"src\fsharp\vs\Reactor.fs" - @"src\fsharp\vs\ServiceConstants.fs" + @"src\fsharp\service\IncrementalBuild.fsi" + @"src\fsharp\service\IncrementalBuild.fs" + @"src\fsharp\service\Reactor.fsi" + @"src\fsharp\service\Reactor.fs" + @"src\fsharp\service\ServiceConstants.fs" @"src\fsharp\symbols\SymbolHelpers.fsi" @"src\fsharp\symbols\SymbolHelpers.fs" @"src\fsharp\symbols\Symbols.fsi" @"src\fsharp\symbols\Symbols.fs" @"src\fsharp\symbols\Exprs.fsi" @"src\fsharp\symbols\Exprs.fs" - @"src\fsharp\vs\ServiceLexing.fsi" - @"src\fsharp\vs\ServiceLexing.fs" - @"src\fsharp\vs\ServiceParseTreeWalk.fs" - @"src\fsharp\vs\ServiceNavigation.fsi" - @"src\fsharp\vs\ServiceNavigation.fs" - @"src\fsharp\vs\ServiceParamInfoLocations.fsi" - @"src\fsharp\vs\ServiceParamInfoLocations.fs" - @"src\fsharp\vs\ServiceUntypedParse.fsi" - @"src\fsharp\vs\ServiceUntypedParse.fs" + @"src\fsharp\service\ServiceLexing.fsi" + @"src\fsharp\service\ServiceLexing.fs" + @"src\fsharp\service\ServiceParseTreeWalk.fs" + @"src\fsharp\service\ServiceNavigation.fsi" + @"src\fsharp\service\ServiceNavigation.fs" + @"src\fsharp\service\ServiceParamInfoLocations.fsi" + @"src\fsharp\service\ServiceParamInfoLocations.fs" + @"src\fsharp\service\ServiceUntypedParse.fsi" + @"src\fsharp\service\ServiceUntypedParse.fs" @"src\utils\reshapedmsbuild.fs" @"src\fsharp\SimulatedMSBuildReferenceResolver.fs" - @"src\fsharp\vs\service.fsi" - @"src\fsharp\vs\service.fs" - @"src\fsharp\vs\SimpleServices.fsi" - @"src\fsharp\vs\SimpleServices.fs" + @"src\fsharp\service\service.fsi" + @"src\fsharp\service\service.fs" + @"src\fsharp\service\SimpleServices.fsi" + @"src\fsharp\service\SimpleServices.fs" @"src\fsharp\fsi\fsi.fsi" @"src\fsharp\fsi\fsi.fs" |] { Options = {ProjectFileName = repositoryDir @"src\fsharp\FSharp.Compiler.Private\FSharp.Compiler.Private.fsproj" + ProjectId = None SourceFiles = files |> Array.map (fun x -> repositoryDir x) OtherOptions = [|@"-o:obj\Release\FSharp.Compiler.Private.dll"; "-g"; "--noframework"; @"--baseaddress:0x06800000"; "--define:DEBUG"; - @"--define:CROSS_PLATFORM_COMPILER"; "--define:FX_ATLEAST_45"; + @"--define:CROSS_PLATFORM_COMPILER"; @"--define:FX_ATLEAST_40"; "--define:BE_SECURITY_TRANSPARENT"; - @"--define:TYPE_PROVIDER_SECURITY"; "--define:EXTENSIBLE_DUMPER"; - @"--define:INCLUDE_METADATA_WRITER"; "--define:COMPILER"; + @"--define:COMPILER"; @"--define:ENABLE_MONO_SUPPORT"; "--define:FX_MSBUILDRESOLVER_RUNTIMELIKE"; @"--define:FX_LCIDFROMCODEPAGE"; "--define:FX_RESX_RESOURCE_READER"; @"--define:FX_RESIDENT_COMPILER"; "--define:SHADOW_COPY_REFERENCES"; @@ -212,8 +212,6 @@ let FCS (repositoryDir: string) : Options = @"--define:COMPILER_SERVICE_DLL"; "--define:NO_STRONG_NAMES"; "--define:TRACE"; @"--doc:..\..\..\bin\v4.5\FSharp.Compiler.Service.xml"; "--optimize-"; @"--platform:anycpu"; - @"-r:" + (repositoryDir @"packages\Microsoft.DiaSymReader\lib\net20\Microsoft.DiaSymReader.dll"); - @"-r:" + (repositoryDir @"packages\Microsoft.DiaSymReader.PortablePdb\lib\net45\Microsoft.DiaSymReader.PortablePdb.dll"); @"-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\mscorlib.dll"; @"-r:" + (repositoryDir @"packages\System.Collections.Immutable\lib\netstandard1.0\System.Collections.Immutable.dll"); @"-r:" + (repositoryDir @"packages\FSharp.Core\lib\net40\FSharp.Core.dll"); @@ -304,6 +302,7 @@ let FCS (repositoryDir: string) : Options = let VFPT (repositoryDir: string) : Options = { Options = {ProjectFileName = repositoryDir @"src\FSharp.Editing\FSharp.Editing.fsproj" + ProjectId = None SourceFiles = [|@"src\FSharp.Editing\AssemblyInfo.fs"; @"src\FSharp.Editing\Common\Utils.fs"; diff --git a/vsintegration/Utils/LanguageServiceProfiling/packages.config b/vsintegration/Utils/LanguageServiceProfiling/packages.config deleted file mode 100644 index 222429db2bd..00000000000 --- a/vsintegration/Utils/LanguageServiceProfiling/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/vsintegration/Vsix/Directory.Build.props b/vsintegration/Vsix/Directory.Build.props new file mode 100644 index 00000000000..9f5ffe146fe --- /dev/null +++ b/vsintegration/Vsix/Directory.Build.props @@ -0,0 +1,38 @@ + + + + + + RoslynDev + false + false + true + $(VSRootSuffix) + true + publish\ + true + Disk + false + Foreground + 7 + Days + true + false + true + false + false + false + false + false + false + false + false + true + true + CommonExtensions + None + true + true + + + diff --git a/vsintegration/Vsix/Directory.Build.targets b/vsintegration/Vsix/Directory.Build.targets new file mode 100644 index 00000000000..fa37bc2cd13 --- /dev/null +++ b/vsintegration/Vsix/Directory.Build.targets @@ -0,0 +1,23 @@ + + + + + + + False + Microsoft .NET Framework 4.6 %28x86 and x64%29 + true + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + false + + + + diff --git a/vsintegration/Vsix/RegisterFsharpPackage.pkgdef b/vsintegration/Vsix/RegisterFsharpPackage.pkgdef index ec8375a91b5..e7daeb0df08 100644 --- a/vsintegration/Vsix/RegisterFsharpPackage.pkgdef +++ b/vsintegration/Vsix/RegisterFsharpPackage.pkgdef @@ -16,7 +16,6 @@ "Package"="{91a04a73-4f2c-4e7c-ad38-c1a68e7da05c}" "ProductDetails"="#9002" "LogoID"="#400" -"UseVSProductID"="1" @="#9001" [$RootKey$\AD7Metrics\ExpressionEvaluator\{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}\{994B45C4-E6E9-11D2-903F-00C04FA302A1}] @@ -53,7 +52,7 @@ "1"="{92EF0900-2251-11D2-B72E-0000F87572EF}" [$RootKey$\Packages\{91a04a73-4f2c-4e7c-ad38-c1a68e7da05c}] -"ProductVersion"="4.1" +"ProductVersion"="10.2" "ProductName"="Visual F#" "CompanyName"="Microsoft Corp." @@ -63,42 +62,42 @@ [$RootKey$\CLSID\{e1194663-db3c-49eb-8b45-276fcdc440ea}] "InprocServer32"="$WinDir$\SYSTEM32\MSCOREE.DLL" "Class"="Microsoft.VisualStudio.FSharp.ProjectSystem.FSharpBuildPropertyPage" -"Assembly"="FSharp.ProjectSystem.FSharp, Version=15.4.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" +"Assembly"="FSharp.ProjectSystem.FSharp, Version=15.7.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" "ThreadingModel"="Both" @="Microsoft.VisualStudio.FSharp.ProjectSystem.FSharpBuildPropertyPage" [$RootKey$\CLSID\{6d2d9b56-2691-4624-a1bf-d07a14594748}] "InprocServer32"="$WinDir$\SYSTEM32\MSCOREE.DLL" "Class"="Microsoft.VisualStudio.Editors.PropertyPages.FSharpApplicationPropPageComClass" -"Assembly"="FSharp.ProjectSystem.PropertyPages, Version=15.4.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" +"Assembly"="FSharp.ProjectSystem.PropertyPages, Version=15.7.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" "ThreadingModel"="Both" @="Microsoft.VisualStudio.Editors.PropertyPages.FSharpApplicationPropPageComClass" [$RootKey$\CLSID\{dd84aa8f-71bb-462a-8ef8-c9992cb325b7}] "InprocServer32"="$System$mscoree.dll" "Class"="Microsoft.VisualStudio.Editors.PropertyPages.FSharpBuildEventsPropPageComClass" -"Assembly"="FSharp.ProjectSystem.PropertyPages, Version=15.4.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" +"Assembly"="FSharp.ProjectSystem.PropertyPages, Version=15.7.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" "ThreadingModel"="Both" @="Microsoft.VisualStudio.Editors.PropertyPages.FSharpBuildEventsPropPageComClass" [$RootKey$\CLSID\{fac0a17e-2e70-4211-916a-0d34fb708bff}] "InprocServer32"="$System$mscoree.dll" "Class"="Microsoft.VisualStudio.Editors.PropertyPages.FSharpBuildPropPageComClass" -"Assembly"="FSharp.ProjectSystem.PropertyPages, Version=15.4.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" +"Assembly"="FSharp.ProjectSystem.PropertyPages, Version=15.7.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" "ThreadingModel"="Both" @="Microsoft.VisualStudio.Editors.PropertyPages.FSharpBuildPropPageComClass" [$RootKey$\CLSID\{9cfbeb2a-6824-43e2-bd3b-b112febc3772}] "InprocServer32"="$WinDir$\SYSTEM32\MSCOREE.DLL" "Class"="Microsoft.VisualStudio.Editors.PropertyPages.FSharpDebugPropPageComClass" -"Assembly"="FSharp.ProjectSystem.PropertyPages, Version=15.4.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" +"Assembly"="FSharp.ProjectSystem.PropertyPages, Version=15.7.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" "ThreadingModel"="Both" @="Microsoft.VisualStudio.Editors.PropertyPages.FSharpDebugPropPageComClass" [$RootKey$\CLSID\{df16b1a2-0e91-4499-ae60-c7144e614bf1}] "InprocServer32"="$WinDir$\SYSTEM32\MSCOREE.DLL" "Class"="Microsoft.VisualStudio.Editors.PropertyPages.FSharpReferencePathsPropPageComClass" -"Assembly"="FSharp.ProjectSystem.PropertyPages, Version=15.4.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" +"Assembly"="FSharp.ProjectSystem.PropertyPages, Version=15.7.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" "ThreadingModel"="Both" @="Microsoft.VisualStudio.Editors.PropertyPages.FSharpReferencePathsPropPageComClass" @@ -122,6 +121,9 @@ "TemplatesDir"="\.\NullPath" @="#6007" +[$RootKey$\Projects\{349C5851-65DF-11DA-9384-00065B846F21}\LanguageTemplates] +"{F2A71F9B-5D33-465A-A702-920D77279786}"="{76B279E8-36ED-494E-B145-5344F8DEFCB6}" + [$RootKey$\Projects\{4ead5bc6-47f1-4fcb-823d-0cd64302d5b9}\WebApplicationProperties] "CodeBehindCodeGenerator"="{00000000-0000-0000-0000-000000000000}" diff --git a/vsintegration/Vsix/VisualFSharpFull/Properties/launchSettings.json b/vsintegration/Vsix/VisualFSharpFull/Properties/launchSettings.json new file mode 100644 index 00000000000..18d884aa2e7 --- /dev/null +++ b/vsintegration/Vsix/VisualFSharpFull/Properties/launchSettings.json @@ -0,0 +1,9 @@ +{ + "profiles": { + "VisualFSharpFull": { + "commandName": "Executable", + "executablePath": "$(DevEnvDir)devenv.exe", + "commandLineArgs": "/rootsuffix $(VSSDKTargetPlatformRegRootSuffix) /log" + } + } +} \ No newline at end of file diff --git a/vsintegration/Vsix/VisualFSharpFull/Source.extension.vsixmanifest b/vsintegration/Vsix/VisualFSharpFull/Source.extension.vsixmanifest index bbc80709606..26436755087 100644 --- a/vsintegration/Vsix/VisualFSharpFull/Source.extension.vsixmanifest +++ b/vsintegration/Vsix/VisualFSharpFull/Source.extension.vsixmanifest @@ -44,7 +44,7 @@ - + diff --git a/vsintegration/Vsix/VisualFSharpFull/VisualFSharpFull.csproj b/vsintegration/Vsix/VisualFSharpFull/VisualFSharpFull.csproj index dadbcf19c81..2b640de5112 100644 --- a/vsintegration/Vsix/VisualFSharpFull/VisualFSharpFull.csproj +++ b/vsintegration/Vsix/VisualFSharpFull/VisualFSharpFull.csproj @@ -1,78 +1,13 @@  - + + - $(MSBuildProjectDirectory)\..\..\..\src - net40 - 15.0 - 11.0 - $(FSharpSourcesRoot)\..\packages\Microsoft.VSSDK.BuildTools.$(RoslynVSPackagesVersion)\tools - - - 15.0 - 2.0 - {82b43b9b-a64c-4715-b499-d71e9ca2bd60};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - - publish\ - true - Disk - false - Foreground - 7 - Days - true - false - true - 0 - v4.6 - false - false - false - false - false - false - false - false - true - true - CommonExtensions - Microsoft\FSharp - None - Debug - AnyCPU Library - Properties - RoslynDev - true - False - True - {59ADCE46-9740-4079-834D-9A03A3494EBC} - true - VisualFSharpFull - $(FSharpSourcesRoot)\..\$(Configuration)\$(TargetDotnetProfile)\bin - VisualFSharpFull - $(RootBinPath) - 15.4.1.0 - cs - false - - - - - Program - $(DevEnvDir)devenv.exe - /rootsuffix $(VSRootSuffix) /log - $(VSRootSuffix) - true - - - Program - $(DevEnvDir)devenv.exe - true - /rootsuffix $(VSRootSuffix) /log - $(VSRootSuffix) + Microsoft\FSharp + netcoreapp1.0 + Designer @@ -87,128 +22,175 @@ License.txt true - + PreserveNewest - packages\System.ValueTuple.4.3.1.nupkg + FSharp.Data.TypeProviders.dll true + - - False - Microsoft .NET Framework 4.6 %28x86 and x64%29 - true - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - false - - - + + {702A7979-BCF9-4C41-853E-3ADFC9897890} + FSharp.Build + BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3b + DebugSymbolsProjectOutputGroup%3b + true + All + 2 + True + {649FA588-F02E-457C-9FCF-87E46407481E} FSharp.Compiler.Interactive.Settings - BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3bSatelliteDllsProjectOutputGroup%3b + BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3b DebugSymbolsProjectOutputGroup%3b + true + All + 2 True {D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06} FSharp.Compiler.Server.Shared - BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3bSatelliteDllsProjectOutputGroup%3b + BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3b DebugSymbolsProjectOutputGroup%3b + true + All + 2 True {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3} FSharp.Compiler.Private - BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3bSatelliteDllsProjectOutputGroup%3b + BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3b DebugSymbolsProjectOutputGroup%3b + true + All + 2 True {DED3BBD7-53F4-428A-8C9F-27968E768605} FSharp.Core - BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3bSatelliteDllsProjectOutputGroup%3b + BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3b DebugSymbolsProjectOutputGroup%3b + true + All + 2 True {8B3E283D-B5FE-4055-9D80-7E3A32F3967B} FsiAnyCPU - BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3bSatelliteDllsProjectOutputGroup%3b + BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3b DebugSymbolsProjectOutputGroup%3b + true + [installDir]\Common7\IDE\CommonExtensions\Microsoft\FSharp\fsiAnyCpu.exe + X64 + 2 True {D0E98C0D-490B-4C61-9329-0862F6E87645} Fsi - BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3bSatelliteDllsProjectOutputGroup%3b + BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3b + DebugSymbolsProjectOutputGroup%3b + true + [installDir]\Common7\IDE\CommonExtensions\Microsoft\FSharp\fsi.exe + X86 + 2 + True + + + {C94C257C-3C0A-4858-B5D8-D746498D1F08} + fsc + BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3b DebugSymbolsProjectOutputGroup%3b + true + [installDir]\Common7\IDE\CommonExtensions\Microsoft\FSharp\fsc.exe + All + 2 True {65e0e82a-eace-4787-8994-888674c2fe87} FSharp.Editor - BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3bSatelliteDllsProjectOutputGroup%3bPkgDefProjectOutputGroup%3b + BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3bPkgDefProjectOutputGroup%3b DebugSymbolsProjectOutputGroup%3b + true + All + 2 True {c4586a06-1402-48bc-8e35-a1b8642f895b} FSharp.UIResources - BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3bSatelliteDllsProjectOutputGroup%3b + BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3b DebugSymbolsProjectOutputGroup%3b True {1C5C163C-37EA-4A3C-8CCC-0D34B74BF8EF} FSharp.LanguageService.Base - BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3bSatelliteDllsProjectOutputGroup%3bPkgDefProjectOutputGroup%3b + BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3bPkgDefProjectOutputGroup%3b DebugSymbolsProjectOutputGroup%3b + true + All + 2 True {EE85AAB7-CDA0-4C4E-BDA0-A64CCC413E3F} FSharp.LanguageService - BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3bSatelliteDllsProjectOutputGroup%3bPkgDefProjectOutputGroup%3b + BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3bPkgDefProjectOutputGroup%3b DebugSymbolsProjectOutputGroup%3b + true + All + 2 True {B700E38B-F8C0-4E49-B5EC-DB7B7AC0C4E7} ProjectSystem.Base - BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3bSatelliteDllsProjectOutputGroup%3bPkgDefProjectOutputGroup%3b + BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3bPkgDefProjectOutputGroup%3b DebugSymbolsProjectOutputGroup%3b + true + All + 2 True {6196B0F8-CAEA-4CF1-AF82-1B520F77FE44} ProjectSystem - BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3bSatelliteDllsProjectOutputGroup%3bPkgDefProjectOutputGroup%3b + BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3bPkgDefProjectOutputGroup%3b DebugSymbolsProjectOutputGroup%3b + true + All + 2 True {FCFB214C-462E-42B3-91CA-FC557EFEE74F} FSharp.PropertiesPages - BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3bSatelliteDllsProjectOutputGroup%3bPkgDefProjectOutputGroup%3b + BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3bPkgDefProjectOutputGroup%3b DebugSymbolsProjectOutputGroup%3b + true + All + 2 True {991DCF75-C2EB-42B6-9A0D-AA1D2409D519} FSharp.VS.FSI - BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3bSatelliteDllsProjectOutputGroup%3bPkgDefProjectOutputGroup%3b + BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3bPkgDefProjectOutputGroup%3b DebugSymbolsProjectOutputGroup%3b + true + All + 2 True + {6ba13aa4-c25f-480f-856b-8e8000299a72} AppConfig @@ -266,20 +248,10 @@ True + - - False - $(FSharpSourcesRoot)\..\packages\Newtonsoft.Json.10.0.2\lib\net45\Newtonsoft.Json.dll - + + - - - - - - - VsixSHA2 - - - + diff --git a/vsintegration/Vsix/VisualFSharpOpenSource/Source.extension.vsixmanifest b/vsintegration/Vsix/VisualFSharpOpenSource/Source.extension.vsixmanifest deleted file mode 100644 index 86a241cedbd..00000000000 --- a/vsintegration/Vsix/VisualFSharpOpenSource/Source.extension.vsixmanifest +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - Visual F# Tools - Deploy Visual F# Tools Binaries and Templates to Visual Studio - Microsoft.FSharp.VSIX.OpenSource.Core - https://docs.microsoft.com/en-us/dotnet/articles/fsharp/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vsintegration/Vsix/VisualFSharpOpenSource/VisualFSharpOpenSource.csproj b/vsintegration/Vsix/VisualFSharpOpenSource/VisualFSharpOpenSource.csproj deleted file mode 100644 index 49e78adaef9..00000000000 --- a/vsintegration/Vsix/VisualFSharpOpenSource/VisualFSharpOpenSource.csproj +++ /dev/null @@ -1,311 +0,0 @@ - - - - - $(MSBuildProjectDirectory)\..\..\..\src - net40 - 15.0 - 11.0 - $(FSharpSourcesRoot)\..\packages\Microsoft.VSSDK.BuildTools.$(RoslynVSPackagesVersion)\tools - - - 15.0 - 2.0 - {82b43b9b-a64c-4715-b499-d71e9ca2bd60};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - - publish\ - true - Disk - false - Foreground - 7 - Days - true - false - true - 0 - v4.6 - false - false - false - false - false - false - false - false - true - false - CommonExtensions - Microsoft\FSharp - None - Debug - AnyCPU - Library - Properties - RoslynDev - true - True - False - {E6A45CDF-B408-420F-B475-74611BEFC52B} - true - VisualFSharpOpenSource - $(FSharpSourcesRoot)\..\$(Configuration)\$(TargetDotnetProfile)\bin - VisualFSharpOpenSource - $(RootBinPath) - 15.4.1.0 - cs - - - - - Program - $(DevEnvDir)devenv.exe - /rootsuffix $(VSRootSuffix) /log - $(VSRootSuffix) - true - - - Program - $(DevEnvDir)devenv.exe - true - /rootsuffix $(VSRootSuffix) /log - $(VSRootSuffix) - - - - Designer - - - Always - true - RegisterFsharpPackage.pkgdef - - - PreserveNewest - License.txt - true - - - PreserveNewest - packages\System.ValueTuple.4.3.1.nupkg - true - - - - - False - Microsoft .NET Framework 4.6 %28x86 and x64%29 - true - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - false - - - - - {649FA588-F02E-457C-9FCF-87E46407481E} - FSharp.Compiler.Interactive.Settings - BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3bSatelliteDllsProjectOutputGroup%3b - DebugSymbolsProjectOutputGroup%3b - True - - - {D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06} - FSharp.Compiler.Server.Shared - BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3bSatelliteDllsProjectOutputGroup%3b - DebugSymbolsProjectOutputGroup%3b - True - - - {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3} - FSharp.Compiler.Private - BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3bSatelliteDllsProjectOutputGroup%3b - DebugSymbolsProjectOutputGroup%3b - True - - - {DED3BBD7-53F4-428A-8C9F-27968E768605} - FSharp.Core - BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3bSatelliteDllsProjectOutputGroup%3b - DebugSymbolsProjectOutputGroup%3b - True - - - {8B3E283D-B5FE-4055-9D80-7E3A32F3967B} - FsiAnyCPU - BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3bSatelliteDllsProjectOutputGroup%3b - DebugSymbolsProjectOutputGroup%3b - True - - - {D0E98C0D-490B-4C61-9329-0862F6E87645} - Fsi - BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3bSatelliteDllsProjectOutputGroup%3b - DebugSymbolsProjectOutputGroup%3b - True - - - {65e0e82a-eace-4787-8994-888674c2fe87} - FSharp.Editor - BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3bSatelliteDllsProjectOutputGroup%3bPkgDefProjectOutputGroup%3b - DebugSymbolsProjectOutputGroup%3b - True - - - {c4586a06-1402-48bc-8e35-a1b8642f895b} - FSharp.UIResources - BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3bSatelliteDllsProjectOutputGroup%3b - DebugSymbolsProjectOutputGroup%3b - True - - - {1C5C163C-37EA-4A3C-8CCC-0D34B74BF8EF} - FSharp.LanguageService.Base - BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3bSatelliteDllsProjectOutputGroup%3bPkgDefProjectOutputGroup%3b - DebugSymbolsProjectOutputGroup%3b - True - - - {EE85AAB7-CDA0-4C4E-BDA0-A64CCC413E3F} - FSharp.LanguageService - BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3bSatelliteDllsProjectOutputGroup%3bPkgDefProjectOutputGroup%3b - DebugSymbolsProjectOutputGroup%3b - True - - - {B700E38B-F8C0-4E49-B5EC-DB7B7AC0C4E7} - ProjectSystem.Base - BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3bSatelliteDllsProjectOutputGroup%3bPkgDefProjectOutputGroup%3b - DebugSymbolsProjectOutputGroup%3b - True - - - {6196B0F8-CAEA-4CF1-AF82-1B520F77FE44} - ProjectSystem - BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3bSatelliteDllsProjectOutputGroup%3bPkgDefProjectOutputGroup%3b - DebugSymbolsProjectOutputGroup%3b - True - - - {FCFB214C-462E-42B3-91CA-FC557EFEE74F} - FSharp.PropertiesPages - BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3bSatelliteDllsProjectOutputGroup%3bPkgDefProjectOutputGroup%3b - DebugSymbolsProjectOutputGroup%3b - True - - - {991DCF75-C2EB-42B6-9A0D-AA1D2409D519} - FSharp.VS.FSI - BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3bSatelliteDllsProjectOutputGroup%3bPkgDefProjectOutputGroup%3b - DebugSymbolsProjectOutputGroup%3b - True - - - {6ba13aa4-c25f-480f-856b-8e8000299a72} - AppConfig - ItemTemplates - TemplateProjectOutputGroup%3b - false - True - - - {12ac2813-e895-4aaa-ae6c-94e21da09f64} - CodeFile - ItemTemplates - TemplateProjectOutputGroup%3b - false - True - - - {0385564F-07B4-4264-AB8A-17C393E9140C} - ResourceFile - ItemTemplates - TemplateProjectOutputGroup%3b - false - True - - - {a333b85a-dc23-49b6-9797-b89a7951e92d} - ScriptFile - ItemTemplates - TemplateProjectOutputGroup%3b - false - True - - - {e3fdd4ac-46b6-4b9f-b672-317d1202cc50} - SignatureFile - ItemTemplates - TemplateProjectOutputGroup%3b - false - True - - - {d11fc318-8f5d-4c8c-9287-ab40a016d13c} - TextFile - ItemTemplates - TemplateProjectOutputGroup%3b - false - True - - - {1fb1dd07-06aa-45b4-b5ac-20ff5bee98b6} - XMLFile - ItemTemplates - TemplateProjectOutputGroup%3b - false - True - - - {604f0daa-2d33-48dd-b162-edf0b672803d} - ConsoleProject - ProjectTemplates - TemplateProjectOutputGroup%3b - false - True - - - {01678cda-a11f-4dee-9344-2edf91cf1ae7} - LibraryProject - ProjectTemplates - TemplateProjectOutputGroup%3b - false - True - - - {2facee44-48bd-40b5-a2ee-b54a0c9bb7c4} - TutorialProject - ProjectTemplates - TemplateProjectOutputGroup%3b - false - True - - - - - False - $(FSharpSourcesRoot)\..\packages\Newtonsoft.Json.10.0.2\lib\net45\Newtonsoft.Json.dll - - - $(FSharpSourcesRoot)\..\packages\System.Collections.Immutable.$(SystemCollectionsImmutableVersion)\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll - - - - - - - - - VsixSHA2 - - - - diff --git a/vsintegration/Vsix/VisualFSharpTemplates/VisualFSharpTemplates.csproj b/vsintegration/Vsix/VisualFSharpTemplates/VisualFSharpTemplates.csproj index f9835d36fb1..53ff7dae39c 100644 --- a/vsintegration/Vsix/VisualFSharpTemplates/VisualFSharpTemplates.csproj +++ b/vsintegration/Vsix/VisualFSharpTemplates/VisualFSharpTemplates.csproj @@ -1,98 +1,32 @@  - + + - $(MSBuildProjectDirectory)\..\..\..\src - net40 - 15.0 - 11.0 - $(FSharpSourcesRoot)\..\packages\Microsoft.VSSDK.BuildTools.$(RoslynVSPackagesVersion)\tools - - 15.0 - 2.0 - {82b43b9b-a64c-4715-b499-d71e9ca2bd60};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - publish\ - true - Disk - false - Foreground - 7 - Days - true - false - true - 0 - v4.6 - false - false - false - false - false - false - false - false - true - true - CommonExtensions - Microsoft\FSharpTemplates - None - Debug - AnyCPU - Library - Properties - RoslynDev - true - False - True - {385035C1-9171-408A-8EAA-67DDC14E2CF3} - true - VisualFSharpTemplate - $(FSharpSourcesRoot)\..\$(Configuration)\$(TargetDotnetProfile)\bin VisualFSharpTemplate - $(RootBinPath) - 15.4.1.0 - cs + Library + Microsoft\FSharpTemplates false - - Program - $(DevEnvDir)devenv.exe - /rootsuffix $(VSRootSuffix) /log - $(VSRootSuffix) - true - - - Program - $(DevEnvDir)devenv.exe - true - /rootsuffix $(VSRootSuffix) /log - $(VSRootSuffix) - + + + PreserveNewest + packages\FSharp.Core.4.5.2.nupkg + true + + + PreserveNewest + packages\System.ValueTuple.4.4.0.nupkg + true + Designer + - - False - Microsoft .NET Framework 4.6 %28x86 and x64%29 - true - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - false - - - - + {604f0daa-2d33-48dd-b162-edf0b672803d} ConsoleProject ProjectTemplates @@ -100,7 +34,7 @@ false True - + {01678cda-a11f-4dee-9344-2edf91cf1ae7} LibraryProject ProjectTemplates @@ -108,7 +42,7 @@ false True - + {2facee44-48bd-40b5-a2ee-b54a0c9bb7c4} TutorialProject ProjectTemplates @@ -117,14 +51,5 @@ True - - - - - - - VsixSHA2 - - - + diff --git a/vsintegration/fsharp-vsintegration-item-templates-build.proj b/vsintegration/fsharp-vsintegration-item-templates-build.proj index 0442857df1a..7a463780dca 100644 --- a/vsintegration/fsharp-vsintegration-item-templates-build.proj +++ b/vsintegration/fsharp-vsintegration-item-templates-build.proj @@ -15,5 +15,9 @@ - + + + + + diff --git a/vsintegration/fsharp-vsintegration-project-templates-build.proj b/vsintegration/fsharp-vsintegration-project-templates-build.proj index d810cea4de3..59683fa3f98 100644 --- a/vsintegration/fsharp-vsintegration-project-templates-build.proj +++ b/vsintegration/fsharp-vsintegration-project-templates-build.proj @@ -11,5 +11,10 @@ + + + + + diff --git a/vsintegration/fsharp-vsintegration-src-build.proj b/vsintegration/fsharp-vsintegration-src-build.proj index 8a0d8a35828..0b32bade2c2 100644 --- a/vsintegration/fsharp-vsintegration-src-build.proj +++ b/vsintegration/fsharp-vsintegration-src-build.proj @@ -1,20 +1,26 @@ + net40 + + - - - - + + + - + + + + + diff --git a/vsintegration/fsharp-vsintegration-unittests-build.proj b/vsintegration/fsharp-vsintegration-unittests-build.proj index 24c312fa964..3ec0e0c1366 100644 --- a/vsintegration/fsharp-vsintegration-unittests-build.proj +++ b/vsintegration/fsharp-vsintegration-unittests-build.proj @@ -5,24 +5,36 @@ - - + + + - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vsintegration/fsharp-vsintegration-vsix-build.proj b/vsintegration/fsharp-vsintegration-vsix-build.proj index 518b3639ebc..d7f6d10b430 100644 --- a/vsintegration/fsharp-vsintegration-vsix-build.proj +++ b/vsintegration/fsharp-vsintegration-vsix-build.proj @@ -5,12 +5,14 @@ - - - + + - - + + + + + diff --git a/vsintegration/packages.config b/vsintegration/packages.config deleted file mode 100644 index 0fdfec0de5d..00000000000 --- a/vsintegration/packages.config +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vsintegration/src/FSharp.Editor/AutomaticCompletion/BraceCompletionSessionProvider.fs b/vsintegration/src/FSharp.Editor/AutomaticCompletion/BraceCompletionSessionProvider.fs new file mode 100644 index 00000000000..dd3be821094 --- /dev/null +++ b/vsintegration/src/FSharp.Editor/AutomaticCompletion/BraceCompletionSessionProvider.fs @@ -0,0 +1,544 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace Microsoft.VisualStudio.FSharp.Editor + +// This implementation does not rely on Roslyn internals. + +open System +open System.Diagnostics +open System.Threading +open System.ComponentModel.Composition +open Microsoft.VisualStudio.Text.BraceCompletion +open Microsoft.VisualStudio.Text.Operations +open Microsoft.VisualStudio.Text +open Microsoft.VisualStudio.Text.Editor +open Microsoft.VisualStudio.Utilities +open Microsoft.CodeAnalysis +open Microsoft.CodeAnalysis.Text +open Microsoft.CodeAnalysis.Host +open Microsoft.CodeAnalysis.Host.Mef +open Microsoft.CodeAnalysis.Classification + +[] +module BraceCompletionSessionProviderHelpers = + + let tryGetCaretPoint (buffer: ITextBuffer) (session: IBraceCompletionSession) = + let point = session.TextView.Caret.Position.Point.GetPoint(buffer, PositionAffinity.Predecessor) + if point.HasValue then Some point.Value + else None + + let tryGetCaretPosition session = + session |> tryGetCaretPoint session.SubjectBuffer + + let tryInsertAdditionalBracePair (session: IBraceCompletionSession) openingChar closingChar = + let sourceCode = session.TextView.TextSnapshot + let position = session.TextView.Caret.Position.BufferPosition.Position + let start = position - 2 + let end' = position + + start >= 0 && end' < sourceCode.Length && + sourceCode.GetText(start, 1).[0] = openingChar && sourceCode.GetText(end', 1).[0] = closingChar + + [] + let BraceCompletion = "Brace_Completion" + +[] +type IEditorBraceCompletionSession = + inherit ILanguageService + + abstract CheckOpeningPoint : IBraceCompletionSession * CancellationToken -> bool + + abstract AfterStart : IBraceCompletionSession * CancellationToken -> unit + + abstract AllowOverType : IBraceCompletionSession * CancellationToken -> bool + + abstract AfterReturn : IBraceCompletionSession * CancellationToken -> unit + +[] +type IEditorBraceCompletionSessionFactory = + inherit ILanguageService + + abstract TryCreateSession : Document * openingPosition: int * openingBrace: char * CancellationToken -> IEditorBraceCompletionSession + +type BraceCompletionSession + ( + textView: ITextView, + subjectBuffer: ITextBuffer, + openingPoint: SnapshotPoint, + openingBrace: char, + closingBrace: char, + undoHistory: ITextUndoHistory, + editorOperationsFactoryService: IEditorOperationsFactoryService, + session: IEditorBraceCompletionSession + ) = + + let mutable closingPoint = subjectBuffer.CurrentSnapshot.CreateTrackingPoint(openingPoint.Position, PointTrackingMode.Positive) + let mutable openingPoint : ITrackingPoint = null + let editorOperations = editorOperationsFactoryService.GetEditorOperations(textView) + + member __.EndSession() = + closingPoint <- null + openingPoint <- null + + member __.CreateUndoTransaction() = + undoHistory.CreateTransaction(BraceCompletion) + + member this.Start (cancellationToken: CancellationToken) = + // Sanity check. + if closingPoint = null then this.EndSession() + else + + // this is where the caret should go after the change + let pos = textView.Caret.Position.BufferPosition + let beforeTrackingPoint = pos.Snapshot.CreateTrackingPoint(pos.Position, PointTrackingMode.Negative) + + let mutable snapshot = subjectBuffer.CurrentSnapshot + let closingSnapshotPoint = closingPoint.GetPoint(snapshot) + + if closingSnapshotPoint.Position < 1 then + Debug.Fail("The closing point was not found at the expected position.") + this.EndSession() + else + let openingSnapshotPoint = closingSnapshotPoint.Subtract(1) + + if openingSnapshotPoint.GetChar() <> openingBrace then + // there is a bug in editor brace completion engine on projection buffer that already fixed in vs_pro. until that is FIed to use + // I will make this not to assert + // Debug.Fail("The opening brace was not found at the expected position."); + this.EndSession() + else + openingPoint <- snapshot.CreateTrackingPoint(openingSnapshotPoint.Position, PointTrackingMode.Positive) + let _document = snapshot.GetOpenDocumentInCurrentContextWithChanges() + + if not (session.CheckOpeningPoint(this, cancellationToken)) then + this.EndSession() + else + use undo = this.CreateUndoTransaction() + let nextSnapshot = + use edit = subjectBuffer.CreateEdit() + + edit.Insert(closingSnapshotPoint.Position, closingBrace.ToString()) |> ignore + + if edit.HasFailedChanges then + Debug.Fail("Unable to insert closing brace") + + // exit without setting the closing point which will take us off the stack + edit.Cancel() + undo.Cancel() + None + else + Some(edit.Apply()) // FIXME: perhaps, it should be ApplyAndLogExceptions() + + match nextSnapshot with + | None -> () + | Some(nextSnapshot) -> + + let beforePoint = beforeTrackingPoint.GetPoint(textView.TextSnapshot) + + // switch from positive to negative tracking so it stays against the closing brace + closingPoint <- subjectBuffer.CurrentSnapshot.CreateTrackingPoint(closingPoint.GetPoint(nextSnapshot).Position, PointTrackingMode.Negative) + + Debug.Assert(closingPoint.GetPoint(nextSnapshot).Position > 0 && (SnapshotSpan(closingPoint.GetPoint(nextSnapshot).Subtract(1), 1)).GetText().Equals(closingBrace.ToString()), + "The closing point does not match the closing brace character") + + // move the caret back between the braces + textView.Caret.MoveTo(beforePoint) |> ignore + + session.AfterStart(this, cancellationToken) + + undo.Complete() + + member __.HasNoForwardTyping(caretPoint: SnapshotPoint, endPoint: SnapshotPoint) = + Debug.Assert(caretPoint.Snapshot = endPoint.Snapshot, "snapshots do not match") + + if caretPoint.Snapshot = endPoint.Snapshot then + if caretPoint = endPoint then + true + else + if caretPoint.Position < endPoint.Position then + let span = SnapshotSpan(caretPoint, endPoint) + String.IsNullOrWhiteSpace(span.GetText()) + else + false + else + false + + member this.HasForwardTyping = + let closingSnapshotPoint = closingPoint.GetPoint(subjectBuffer.CurrentSnapshot) + + if closingSnapshotPoint.Position > 0 then + match tryGetCaretPosition this with + | Some caretPos when not (this.HasNoForwardTyping(caretPos, closingSnapshotPoint.Subtract(1))) -> true + | _ -> false + else + false + + member __.MoveCaretToClosingPoint() = + let closingSnapshotPoint = closingPoint.GetPoint(subjectBuffer.CurrentSnapshot) + + // find the position just after the closing brace in the view's text buffer + let afterBrace = + textView.BufferGraph.MapUpToBuffer(closingSnapshotPoint, PointTrackingMode.Negative, PositionAffinity.Predecessor, textView.TextBuffer) + + Debug.Assert(afterBrace.HasValue, "Unable to move caret to closing point") + + if afterBrace.HasValue then + textView.Caret.MoveTo(afterBrace.Value) |> ignore + + interface IBraceCompletionSession with + + member this.Start() = + // Brace completion is not cancellable. + this.Start(CancellationToken.None) + + member this.PreBackspace handledCommand = + handledCommand <- false + + let caretPos = tryGetCaretPosition this + let snapshot = subjectBuffer.CurrentSnapshot + + if caretPos.IsSome && caretPos.Value.Position > 0 && (caretPos.Value.Position - 1) = openingPoint.GetPoint(snapshot).Position && not this.HasForwardTyping then + use undo = this.CreateUndoTransaction() + use edit = subjectBuffer.CreateEdit() + + let span = SnapshotSpan(openingPoint.GetPoint(snapshot), closingPoint.GetPoint(snapshot)) + + edit.Delete(span.Span) |> ignore + + if edit.HasFailedChanges then + edit.Cancel() + undo.Cancel() + Debug.Fail("Unable to clear braces") + else + // handle the command so the backspace does + // not go through since we've already cleared the braces + handledCommand <- true + edit.Apply() |> ignore // FIXME: ApplyAndLogExceptions() + undo.Complete() + this.EndSession() + + member __.PostBackspace() = () + + member this.PreOverType handledCommand = + handledCommand <- false + + if closingPoint <> null then + // Brace completion is not cancellable. + let cancellationToken = CancellationToken.None + let snapshot = subjectBuffer.CurrentSnapshot + let _document = snapshot.GetOpenDocumentInCurrentContextWithChanges() + + let closingSnapshotPoint = closingPoint.GetPoint(snapshot) + if not this.HasForwardTyping && session.AllowOverType(this, cancellationToken) then + let caretPos = tryGetCaretPosition this + + Debug.Assert(caretPos.IsSome && caretPos.Value.Position < closingSnapshotPoint.Position) + + match caretPos with + // ensure that we are within the session before clearing + | Some caretPos when caretPos.Position < closingSnapshotPoint.Position && closingSnapshotPoint.Position > 0 -> + use undo = this.CreateUndoTransaction() + + editorOperations.AddBeforeTextBufferChangePrimitive() + + let span = SnapshotSpan(caretPos, closingSnapshotPoint.Subtract(1)) + + use edit = subjectBuffer.CreateEdit() + + edit.Delete(span.Span) |> ignore + + if edit.HasFailedChanges then + Debug.Fail("Unable to clear closing brace") + edit.Cancel() + undo.Cancel() + else + handledCommand <- true + edit.Apply() |> ignore // FIXME: ApplyAndLogExceptions() + this.MoveCaretToClosingPoint() + editorOperations.AddAfterTextBufferChangePrimitive() + undo.Complete() + | _ -> () + + member __.PostOverType() = () + + member this.PreTab handledCommand = + handledCommand <- false + + if not this.HasForwardTyping then + handledCommand <- true + + use undo = this.CreateUndoTransaction() + + editorOperations.AddBeforeTextBufferChangePrimitive() + this.MoveCaretToClosingPoint() + editorOperations.AddAfterTextBufferChangePrimitive() + undo.Complete() + + member __.PreReturn handledCommand = + handledCommand <- false + + member this.PostReturn() = + match tryGetCaretPosition this with + | Some caretPos -> + let closingSnapshotPoint = closingPoint.GetPoint(subjectBuffer.CurrentSnapshot) + + if closingSnapshotPoint.Position > 0 && this.HasNoForwardTyping(caretPos, closingSnapshotPoint.Subtract(1)) then + session.AfterReturn(this, CancellationToken.None) + | _ -> () + + member __.Finish() = () + + member __.PostTab() = () + + member __.PreDelete handledCommand = + handledCommand <- false + + member __.PostDelete() = () + + member __.OpeningBrace = openingBrace + + member __.ClosingBrace = closingBrace + + member __.OpeningPoint = openingPoint + + member __.ClosingPoint = closingPoint + + member __.SubjectBuffer = subjectBuffer + + member __.TextView = textView + +module Parenthesis = + + [] + let OpenCharacter = '(' + + [] + let CloseCharacter = ')' + +module CurlyBrackets = + + [] + let OpenCharacter = '{' + + [] + let CloseCharacter = '}' + +module SquareBrackets = + + [] + let OpenCharacter = '[' + + [] + let CloseCharacter = ']' + +module DoubleQuote = + + [] + let OpenCharacter = '"' + + [] + let CloseCharacter = '"' + +(* This is for [| |] and {| |} , since the implementation deals with chars only. + We have to test if there is a { or [ before the cursor position and insert the closing '|'. *) +module VerticalBar = + + [] + let OpenCharacter = '|' + + [] + let CloseCharacter = '|' + +(* This is for attributes [< >] , since the implementation deals with chars only. + We have to test if there is a [ before the cursor position and insert the closing '>'. *) +module AngleBrackets = + + [] + let OpenCharacter = '<' + + [] + let CloseCharacter = '>' + +(* For multiline comments like this, since the implementation deals with chars only *) +module Asterisk = + + [] + let OpenCharacter = '*' + + [] + let CloseCharacter = '*' + +type ParenthesisCompletionSession() = + + interface IEditorBraceCompletionSession with + + member __.AfterReturn(_session, _cancellationToken) = + () + + member __.AfterStart(_session, _cancellationToken) = + () + + member __.AllowOverType(_session, _cancellationToken) = + true + + member __.CheckOpeningPoint(_session, _cancellationToken) = + true + +type DoubleQuoteCompletionSession() = + + interface IEditorBraceCompletionSession with + + member __.AfterReturn(_session, _cancellationToken) = + () + + member __.AfterStart(_session, _cancellationToken) = + () + + member __.AllowOverType(_session, _cancellationToken) = + true + + member __.CheckOpeningPoint(_session, _cancellationToken) = + true + +type VerticalBarCompletionSession() = + + interface IEditorBraceCompletionSession with + + member __.AfterReturn(_session, _cancellationToken) = + () + + member __.AfterStart(_session, _cancellationToken) = + () + + member __.AllowOverType(_session, _cancellationToken) = + true + + (* This is for [| |] and {| |} , since the implementation deals with chars only. + We have to test if there is a { or [ before the cursor position and insert the closing '|'. *) + member __.CheckOpeningPoint(session, _cancellationToken) = + tryInsertAdditionalBracePair session CurlyBrackets.OpenCharacter CurlyBrackets.CloseCharacter || + tryInsertAdditionalBracePair session SquareBrackets.OpenCharacter SquareBrackets.CloseCharacter + +type AngleBracketCompletionSession() = + + interface IEditorBraceCompletionSession with + + member __.AfterReturn(_session, _cancellationToken) = + () + + member __.AfterStart(_session, _cancellationToken) = + () + + member __.AllowOverType(_session, _cancellationToken) = + true + + (* This is for attributes [< >] , since the implementation deals with chars only. + We have to test if there is a [ before the cursor position and insert the closing '>'. *) + member __.CheckOpeningPoint(session, _cancellationToken) = + tryInsertAdditionalBracePair session SquareBrackets.OpenCharacter SquareBrackets.CloseCharacter + +(* For multi-line comments, test if it is between "()" *) +type AsteriskCompletionSession() = + + interface IEditorBraceCompletionSession with + + member __.AfterReturn(_session, _cancellationToken) = + () + + member __.AfterStart(_session, _cancellationToken) = + () + + member __.AllowOverType(_session, _cancellationToken) = + true + + (* This is for attributes [< >] , since the implementation deals with chars only. + We have to test if there is a [ before the cursor position and insert the closing '>'. *) + member __.CheckOpeningPoint(session, _cancellationToken) = + tryInsertAdditionalBracePair session Parenthesis.OpenCharacter Parenthesis.CloseCharacter + +[, FSharpConstants.FSharpLanguageName)>] +type EditorBraceCompletionSessionFactory() = + + member __.IsSupportedOpeningBrace openingBrace = + match openingBrace with + | Parenthesis.OpenCharacter | CurlyBrackets.OpenCharacter | SquareBrackets.OpenCharacter + | DoubleQuote.OpenCharacter | VerticalBar.OpenCharacter | AngleBrackets.OpenCharacter + | Asterisk.OpenCharacter -> true + | _ -> false + + member __.CheckCodeContext(document: Document, position: int, _openingBrace, cancellationToken) = + // We need to know if we are inside a F# comment. If we are, then don't do automatic completion. + let sourceCodeTask = document.GetTextAsync(cancellationToken) + sourceCodeTask.Wait(cancellationToken) + let sourceCode = sourceCodeTask.Result + + position = 0 + || let colorizationData = Tokenizer.getClassifiedSpans(document.Id, sourceCode, TextSpan(position - 1, 1), Some (document.FilePath), [ ], cancellationToken) + in colorizationData.Count = 0 + || colorizationData.Exists(fun classifiedSpan -> + classifiedSpan.TextSpan.IntersectsWith position && + ( + match classifiedSpan.ClassificationType with + | ClassificationTypeNames.Comment + | ClassificationTypeNames.StringLiteral -> false + | _ -> true // anything else is a valid classification type + )) + + member __.CreateEditorSession(_document, _openingPosition, openingBrace, _cancellationToken) = + match openingBrace with + | Parenthesis.OpenCharacter -> ParenthesisCompletionSession() :> IEditorBraceCompletionSession + | CurlyBrackets.OpenCharacter -> ParenthesisCompletionSession() :> IEditorBraceCompletionSession + | SquareBrackets.OpenCharacter -> ParenthesisCompletionSession() :> IEditorBraceCompletionSession + | VerticalBar.OpenCharacter -> VerticalBarCompletionSession() :> IEditorBraceCompletionSession + | AngleBrackets.OpenCharacter -> AngleBracketCompletionSession() :> IEditorBraceCompletionSession + | DoubleQuote.OpenCharacter -> DoubleQuoteCompletionSession() :> IEditorBraceCompletionSession + | Asterisk.OpenCharacter -> AsteriskCompletionSession() :> IEditorBraceCompletionSession + | _ -> null + + interface IEditorBraceCompletionSessionFactory with + + member this.TryCreateSession(document, openingPosition, openingBrace, cancellationToken) = + if this.IsSupportedOpeningBrace(openingBrace) && this.CheckCodeContext(document, openingPosition, openingBrace, cancellationToken) then + this.CreateEditorSession(document, openingPosition, openingBrace, cancellationToken) + else + null + +[)>] +[] +[] +[] +[] +[] +[] +[] +[] +type BraceCompletionSessionProvider + [] + ( + undoManager: ITextBufferUndoManagerProvider, + editorOperationsFactoryService: IEditorOperationsFactoryService + ) = + + interface IBraceCompletionSessionProvider with + + member __.TryCreateSession(textView, openingPoint, openingBrace, closingBrace, session) = + session <- + maybe { + let! document = openingPoint.Snapshot.GetOpenDocumentInCurrentContextWithChanges() |> Option.ofObj + let! sessionFactory = document.TryGetLanguageService() + let! session = sessionFactory.TryCreateSession(document, openingPoint.Position, openingBrace, CancellationToken.None) |> Option.ofObj + + let undoHistory = undoManager.GetTextBufferUndoManager(textView.TextBuffer).TextBufferUndoHistory + return BraceCompletionSession( + textView, + openingPoint.Snapshot.TextBuffer, + openingPoint, + openingBrace, + closingBrace, + undoHistory, + editorOperationsFactoryService, + session) :> IBraceCompletionSession + } + |> Option.toObj + + session <> null \ No newline at end of file diff --git a/vsintegration/src/FSharp.Editor/AutomaticCompletion/BraceCompletionSessionProvider.fsi b/vsintegration/src/FSharp.Editor/AutomaticCompletion/BraceCompletionSessionProvider.fsi new file mode 100644 index 00000000000..45340d09465 --- /dev/null +++ b/vsintegration/src/FSharp.Editor/AutomaticCompletion/BraceCompletionSessionProvider.fsi @@ -0,0 +1,3 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace Microsoft.VisualStudio.FSharp.Editor diff --git a/vsintegration/src/FSharp.Editor/BlockComment/CommentSelectionService.fs b/vsintegration/src/FSharp.Editor/BlockComment/CommentSelectionService.fs new file mode 100644 index 00000000000..4c54a45a519 --- /dev/null +++ b/vsintegration/src/FSharp.Editor/BlockComment/CommentSelectionService.fs @@ -0,0 +1,19 @@ +namespace Microsoft.VisualStudio.FSharp.Editor + +open Microsoft.CodeAnalysis.CommentSelection +open Microsoft.CodeAnalysis.Host.Mef +open System.Composition +open System.Threading.Tasks + +[] +[, FSharpConstants.FSharpLanguageName)>] +type CommentSelectionService() = + interface ICommentSelectionService with + member this.GetInfoAsync(_document, _textSpan, _cancellationToken) = + Task.FromResult(CommentSelectionInfo(supportsSingleLineComment=true, + supportsBlockComment=true, + singleLineCommentString="//", + blockCommentStartString="(*", + blockCommentEndString="*)")) + + member this.FormatAsync(document, _changes, _cancellationToken) = Task.FromResult(document) diff --git a/vsintegration/src/FSharp.Editor/BlockComment/CommentUncommentService.fs b/vsintegration/src/FSharp.Editor/BlockComment/CommentUncommentService.fs deleted file mode 100644 index c686b7ac818..00000000000 --- a/vsintegration/src/FSharp.Editor/BlockComment/CommentUncommentService.fs +++ /dev/null @@ -1,15 +0,0 @@ -namespace Microsoft.VisualStudio.FSharp.Editor - -open Microsoft.CodeAnalysis.Editor.Implementation.CommentSelection -open Microsoft.CodeAnalysis.Host.Mef -open System.Composition - -[] -[, FSharpConstants.FSharpLanguageName)>] -type CommentUncommentService() = - interface ICommentUncommentService with - member this.SingleLineCommentString = "//" - member this.SupportsBlockComment = true - member this.BlockCommentStartString = "(*" - member this.BlockCommentEndString = "*)" - member this.Format(document, _changes, _cancellationToken) = document \ No newline at end of file diff --git a/vsintegration/src/FSharp.Editor/Build/SetGlobalPropertiesForSdkProjects.fs b/vsintegration/src/FSharp.Editor/Build/SetGlobalPropertiesForSdkProjects.fs new file mode 100644 index 00000000000..dde8fbc04bc --- /dev/null +++ b/vsintegration/src/FSharp.Editor/Build/SetGlobalPropertiesForSdkProjects.fs @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace Microsoft.VisualStudio.FSharp.Editor + +open System.Collections.Immutable +open System.ComponentModel.Composition +open System.IO +open System.Reflection +open System.Threading +open System.Threading.Tasks +open Microsoft.VisualStudio.ProjectSystem +open Microsoft.VisualStudio.ProjectSystem.Build + +// We can't use well-known constants here because `string + string` isn't a valid constant expression in F#. +[] +[] +[] +type internal SetGlobalPropertiesForSdkProjects + [] + ( + projectService: IProjectService + ) = + inherit StaticGlobalPropertiesProviderBase(projectService.Services) + + override __.GetGlobalPropertiesAsync(_cancellationToken: CancellationToken): Task> = + let properties = Empty.PropertiesMap.Add("FSharpCompilerPath", Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)) + Task.FromResult>(properties) diff --git a/vsintegration/src/FSharp.Editor/Classification/ClassificationService.fs b/vsintegration/src/FSharp.Editor/Classification/ClassificationService.fs new file mode 100644 index 00000000000..9f9840d9b47 --- /dev/null +++ b/vsintegration/src/FSharp.Editor/Classification/ClassificationService.fs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace Microsoft.VisualStudio.FSharp.Editor + +open System +open System.Composition +open System.Collections.Generic +open System.Diagnostics +open System.Threading + +open Microsoft.CodeAnalysis +open Microsoft.CodeAnalysis.Classification +open Microsoft.CodeAnalysis.Editor +open Microsoft.CodeAnalysis.Host.Mef +open Microsoft.CodeAnalysis.Text + +// IEditorClassificationService is marked as Obsolete, but is still supported. The replacement (IClassificationService) +// is internal to Microsoft.CodeAnalysis.Workspaces which we don't have internals visible to. Rather than add yet another +// IVT, we'll maintain the status quo. +#nowarn "44" + +open Microsoft.FSharp.Compiler.SourceCodeServices + +[, FSharpConstants.FSharpLanguageName)>] +type internal FSharpClassificationService + [] + ( + checkerProvider: FSharpCheckerProvider, + projectInfoManager: FSharpProjectOptionsManager + ) = + static let userOpName = "SemanticColorization" + + interface IEditorClassificationService with + // Do not perform classification if we don't have project options (#defines matter) + member __.AddLexicalClassifications(_: SourceText, _: TextSpan, _: List, _: CancellationToken) = () + + member __.AddSyntacticClassificationsAsync(document: Document, textSpan: TextSpan, result: List, cancellationToken: CancellationToken) = + async { + use _logBlock = Logger.LogBlock(LogEditorFunctionId.Classification_Syntactic) + + let defines = projectInfoManager.GetCompilationDefinesForEditingDocument(document) + let! sourceText = document.GetTextAsync(cancellationToken) |> Async.AwaitTask + result.AddRange(Tokenizer.getClassifiedSpans(document.Id, sourceText, textSpan, Some(document.FilePath), defines, cancellationToken)) + } |> RoslynHelpers.StartAsyncUnitAsTask cancellationToken + + member __.AddSemanticClassificationsAsync(document: Document, textSpan: TextSpan, result: List, cancellationToken: CancellationToken) = + asyncMaybe { + use _logBlock = Logger.LogBlock(LogEditorFunctionId.Classification_Semantic) + + let! _, _, projectOptions = projectInfoManager.TryGetOptionsForDocumentOrProject(document) + let! sourceText = document.GetTextAsync(cancellationToken) + let! _, _, checkResults = checkerProvider.Checker.ParseAndCheckDocument(document, projectOptions, sourceText = sourceText, allowStaleResults = false, userOpName=userOpName) + // it's crucial to not return duplicated or overlapping `ClassifiedSpan`s because Find Usages service crashes. + let targetRange = RoslynHelpers.TextSpanToFSharpRange(document.FilePath, textSpan, sourceText) + let classificationData = checkResults.GetSemanticClassification (Some targetRange) |> Array.distinctBy fst + + for (range, classificationType) in classificationData do + match RoslynHelpers.TryFSharpRangeToTextSpan(sourceText, range) with + | None -> () + | Some span -> + let span = + match classificationType with + | SemanticClassificationType.Printf -> span + | _ -> Tokenizer.fixupSpan(sourceText, span) + result.Add(ClassifiedSpan(span, FSharpClassificationTypes.getClassificationTypeName(classificationType))) + } + |> Async.Ignore |> RoslynHelpers.StartAsyncUnitAsTask cancellationToken + + // Do not perform classification if we don't have project options (#defines matter) + member __.AdjustStaleClassification(_: SourceText, classifiedSpan: ClassifiedSpan) : ClassifiedSpan = classifiedSpan + + diff --git a/vsintegration/src/FSharp.Editor/Classification/ColorizationService.fs b/vsintegration/src/FSharp.Editor/Classification/ColorizationService.fs deleted file mode 100644 index c3b199d4be3..00000000000 --- a/vsintegration/src/FSharp.Editor/Classification/ColorizationService.fs +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. - -namespace Microsoft.VisualStudio.FSharp.Editor - -open System -open System.Composition -open System.Collections.Generic -open System.Diagnostics -open System.Threading - -open Microsoft.CodeAnalysis -open Microsoft.CodeAnalysis.Classification -open Microsoft.CodeAnalysis.Editor -open Microsoft.CodeAnalysis.Host.Mef -open Microsoft.CodeAnalysis.Text - -open Microsoft.FSharp.Compiler.SourceCodeServices - -[, FSharpConstants.FSharpLanguageName)>] -type internal FSharpColorizationService - [] - ( - checkerProvider: FSharpCheckerProvider, - projectInfoManager: FSharpProjectOptionsManager - ) = - static let userOpName = "SemanticColorization" - - interface IEditorClassificationService with - // Do not perform classification if we don't have project options (#defines matter) - member this.AddLexicalClassifications(_: SourceText, _: TextSpan, _: List, _: CancellationToken) = () - - member this.AddSyntacticClassificationsAsync(document: Document, textSpan: TextSpan, result: List, cancellationToken: CancellationToken) = - async { - let defines = projectInfoManager.GetCompilationDefinesForEditingDocument(document) - let! sourceText = document.GetTextAsync(cancellationToken) |> Async.AwaitTask - result.AddRange(Tokenizer.getColorizationData(document.Id, sourceText, textSpan, Some(document.FilePath), defines, cancellationToken)) - } |> RoslynHelpers.StartAsyncUnitAsTask cancellationToken - - member this.AddSemanticClassificationsAsync(document: Document, textSpan: TextSpan, result: List, cancellationToken: CancellationToken) = - asyncMaybe { - do Trace.TraceInformation("{0:n3} (start) SemanticColorization", DateTime.Now.TimeOfDay.TotalSeconds) - do! Async.Sleep DefaultTuning.SemanticColorizationInitialDelay |> liftAsync // be less intrusive, give other work priority most of the time - let! _, _, projectOptions = projectInfoManager.TryGetOptionsForDocumentOrProject(document) - let! sourceText = document.GetTextAsync(cancellationToken) - let! _, _, checkResults = checkerProvider.Checker.ParseAndCheckDocument(document, projectOptions, sourceText = sourceText, allowStaleResults = false, userOpName=userOpName) - // it's crucial to not return duplicated or overlapping `ClassifiedSpan`s because Find Usages service crashes. - let targetRange = RoslynHelpers.TextSpanToFSharpRange(document.FilePath, textSpan, sourceText) - let colorizationData = checkResults.GetSemanticClassification (Some targetRange) |> Array.distinctBy fst - - for (range, classificationType) in colorizationData do - match RoslynHelpers.TryFSharpRangeToTextSpan(sourceText, range) with - | None -> () - | Some span -> - let span = Tokenizer.fixupSpan(sourceText, span) - result.Add(ClassifiedSpan(span, FSharpClassificationTypes.getClassificationTypeName(classificationType))) - } - |> Async.Ignore |> RoslynHelpers.StartAsyncUnitAsTask cancellationToken - - // Do not perform classification if we don't have project options (#defines matter) - member this.AdjustStaleClassification(_: SourceText, classifiedSpan: ClassifiedSpan) : ClassifiedSpan = classifiedSpan - - - diff --git a/vsintegration/src/FSharp.Editor/CodeFix/AddOpenCodeFixProvider.fs b/vsintegration/src/FSharp.Editor/CodeFix/AddOpenCodeFixProvider.fs index 76f88464e7a..bd77ba7f1ea 100644 --- a/vsintegration/src/FSharp.Editor/CodeFix/AddOpenCodeFixProvider.fs +++ b/vsintegration/src/FSharp.Editor/CodeFix/AddOpenCodeFixProvider.fs @@ -98,10 +98,10 @@ type internal FSharpAddOpenCodeFixProvider let document = context.Document let! parsingOptions, projectOptions = projectInfoManager.TryGetOptionsForEditingDocumentOrProject document let! sourceText = context.Document.GetTextAsync(context.CancellationToken) - let! _, parsedInput, checkResults = checker.ParseAndCheckDocument(document, projectOptions, allowStaleResults = true, sourceText = sourceText, userOpName = userOpName) + let! _, parsedInput, checkResults = checker.ParseAndCheckDocument(document, projectOptions, sourceText = sourceText, userOpName = userOpName) let line = sourceText.Lines.GetLineFromPosition(context.Span.End) let linePos = sourceText.Lines.GetLinePosition(context.Span.End) - let defines = CompilerEnvironment.GetCompilationDefinesForEditing(document.Name, parsingOptions) + let defines = CompilerEnvironment.GetCompilationDefinesForEditing parsingOptions let! symbol = asyncMaybe { @@ -146,7 +146,7 @@ type internal FSharpAddOpenCodeFixProvider |> List.toArray) let insertionPoint = - if Settings.CodeFixes.AlwaysPlaceOpensAtTopLevel then OpenStatementInsertionPoint.TopLevel + if document.FSharpOptions.CodeFixes.AlwaysPlaceOpensAtTopLevel then OpenStatementInsertionPoint.TopLevel else OpenStatementInsertionPoint.Nearest let createEntity = ParsedInput.tryFindInsertionContext unresolvedIdentRange.StartLine parsedInput maybeUnresolvedIdents insertionPoint diff --git a/vsintegration/src/FSharp.Editor/CodeFix/FixIndexerAccess.fs b/vsintegration/src/FSharp.Editor/CodeFix/FixIndexerAccess.fs index b1b9b5e6879..7c9442c2d81 100644 --- a/vsintegration/src/FSharp.Editor/CodeFix/FixIndexerAccess.fs +++ b/vsintegration/src/FSharp.Editor/CodeFix/FixIndexerAccess.fs @@ -33,17 +33,18 @@ type internal FSharpFixIndexerAccessCodeFixProvider() = let diagnostics = ImmutableArray.Create diagnostic let span,replacement = try - let span = ref context.Span - + let mutable span = context.Span + + let notStartOfBracket (span: TextSpan) = + let t = TextSpan(span.Start, span.Length + 1) + let s = sourceText.GetSubText(t).ToString() + s.[s.Length-1] <> '[' + // skip all braces and blanks until we find [ - while - (!span).End < sourceText.Length && - let t = TextSpan((!span).Start,(!span).Length + 1) - let s = sourceText.GetSubText(t).ToString() - s.[s.Length-1] <> '[' do - span := TextSpan((!span).Start,(!span).Length + 1) - - !span,sourceText.GetSubText(!span).ToString() + while span.End < sourceText.Length && notStartOfBracket span do + span <- TextSpan(span.Start, span.Length + 1) + + span,sourceText.GetSubText(span).ToString() with | _ -> context.Span,sourceText.GetSubText(context.Span).ToString() diff --git a/vsintegration/src/FSharp.Editor/CodeFix/ImplementInterfaceCodeFixProvider.fs b/vsintegration/src/FSharp.Editor/CodeFix/ImplementInterfaceCodeFixProvider.fs index 5cf5fcba215..df6bd0b36a6 100644 --- a/vsintegration/src/FSharp.Editor/CodeFix/ImplementInterfaceCodeFixProvider.fs +++ b/vsintegration/src/FSharp.Editor/CodeFix/ImplementInterfaceCodeFixProvider.fs @@ -22,7 +22,7 @@ type internal InterfaceState = { InterfaceData: InterfaceData EndPosOfWith: pos option AppendBracketAt: int option - Tokens: FSharpTokenInfo list } + Tokens: Tokenizer.SavedTokenInfo[] } [] type internal FSharpImplementInterfaceCodeFixProvider @@ -36,15 +36,14 @@ type internal FSharpImplementInterfaceCodeFixProvider let checker = checkerProvider.Checker static let userOpName = "ImplementInterfaceCodeFixProvider" - let queryInterfaceState appendBracketAt (pos: pos) tokens (ast: Ast.ParsedInput) = + let queryInterfaceState appendBracketAt (pos: pos) (tokens: Tokenizer.SavedTokenInfo[]) (ast: Ast.ParsedInput) = asyncMaybe { let line = pos.Line - 1 - let column = pos.Column let! iface = InterfaceStubGenerator.tryFindInterfaceDeclaration pos ast let endPosOfWidth = tokens - |> List.tryPick (fun (t: FSharpTokenInfo) -> - if t.CharClass = FSharpTokenCharKind.Keyword && t.LeftColumn >= column && t.TokenName = "WITH" then + |> Array.tryPick (fun (t: Tokenizer.SavedTokenInfo) -> + if t.Tag = FSharpTokenTag.WITH || t.Tag = FSharpTokenTag.OWITH then Some (Pos.fromZ line (t.RightColumn + 1)) else None) let appendBracketAt = @@ -70,8 +69,8 @@ type internal FSharpImplementInterfaceCodeFixProvider getLineIdent lineStr + indentSize | InterfaceData.ObjExpr _ as iface -> state.Tokens - |> List.tryPick (fun (t: FSharpTokenInfo) -> - if t.CharClass = FSharpTokenCharKind.Keyword && t.TokenName = "NEW" then + |> Array.tryPick (fun (t: Tokenizer.SavedTokenInfo) -> + if t.Tag = FSharpTokenTag.NEW then Some (t.LeftColumn + indentSize) else None) // There is no reference point, we indent the content at the start column of the interface @@ -142,25 +141,25 @@ type internal FSharpImplementInterfaceCodeFixProvider let! parsingOptions, projectOptions = projectInfoManager.TryGetOptionsForEditingDocumentOrProject context.Document let cancellationToken = context.CancellationToken let! sourceText = context.Document.GetTextAsync(cancellationToken) - let! _, parsedInput, checkFileResults = checker.ParseAndCheckDocument(context.Document, projectOptions, sourceText = sourceText, allowStaleResults = true, userOpName = userOpName) + let! _, parsedInput, checkFileResults = checker.ParseAndCheckDocument(context.Document, projectOptions, sourceText = sourceText, userOpName = userOpName) let textLine = sourceText.Lines.GetLineFromPosition context.Span.Start - let defines = CompilerEnvironment.GetCompilationDefinesForEditing(context.Document.FilePath, parsingOptions) + let defines = CompilerEnvironment.GetCompilationDefinesForEditing parsingOptions // Notice that context.Span doesn't return reliable ranges to find tokens at exact positions. // That's why we tokenize the line and try to find the last successive identifier token let tokens = Tokenizer.tokenizeLine(context.Document.Id, sourceText, context.Span.Start, context.Document.FilePath, defines) let startLeftColumn = context.Span.Start - textLine.Start - let rec tryFindIdentifierToken acc tokens = - match tokens with - | t :: remainingTokens when t.LeftColumn < startLeftColumn -> + let rec tryFindIdentifierToken acc i = + if i >= tokens.Length then acc else + match tokens.[i] with + | t when t.LeftColumn < startLeftColumn -> // Skip all the tokens starting before the context - tryFindIdentifierToken acc remainingTokens - | t :: remainingTokens when t.Tag = FSharpTokenTag.Identifier -> - tryFindIdentifierToken (Some t) remainingTokens - | t :: remainingTokens when t.Tag = FSharpTokenTag.DOT || Option.isNone acc -> - tryFindIdentifierToken acc remainingTokens - | _ :: _ - | [] -> acc - let! token = tryFindIdentifierToken None tokens + tryFindIdentifierToken acc (i+1) + | t when t.Tag = FSharpTokenTag.Identifier -> + tryFindIdentifierToken (Some t) (i+1) + | t when t.Tag = FSharpTokenTag.DOT || Option.isNone acc -> + tryFindIdentifierToken acc (i+1) + | _ -> acc + let! token = tryFindIdentifierToken None 0 let fixupPosition = textLine.Start + token.RightColumn let interfacePos = Pos.fromZ textLine.LineNumber token.RightColumn // We rely on the observation that the lastChar of the context should be '}' if that character is present diff --git a/vsintegration/src/FSharp.Editor/CodeFix/RenameUnusedValue.fs b/vsintegration/src/FSharp.Editor/CodeFix/RenameUnusedValue.fs index 710bd2244c8..34e84cf1a95 100644 --- a/vsintegration/src/FSharp.Editor/CodeFix/RenameUnusedValue.fs +++ b/vsintegration/src/FSharp.Editor/CodeFix/RenameUnusedValue.fs @@ -47,6 +47,9 @@ type internal FSharpRenameUnusedValueCodeFixProvider override __.RegisterCodeFixesAsync context : Task = asyncMaybe { + // Don't show code fixes for unused values, even if they are compiler-generated. + do! Option.guard context.Document.FSharpOptions.CodeFixes.UnusedDeclarations + let document = context.Document let! sourceText = document.GetTextAsync() let ident = sourceText.ToString(context.Span) @@ -55,9 +58,9 @@ type internal FSharpRenameUnusedValueCodeFixProvider // where backtickes are replaced with parens. if not (PrettyNaming.IsOperatorOrBacktickedName ident) && not (ident.StartsWith "``") then let! parsingOptions, projectOptions = projectInfoManager.TryGetOptionsForEditingDocumentOrProject document - let! _, _, checkResults = checker.ParseAndCheckDocument(document, projectOptions, allowStaleResults = true, sourceText = sourceText, userOpName=userOpName) + let! _, _, checkResults = checker.ParseAndCheckDocument(document, projectOptions, sourceText = sourceText, userOpName=userOpName) let m = RoslynHelpers.TextSpanToFSharpRange(document.FilePath, context.Span, sourceText) - let defines = CompilerEnvironment.GetCompilationDefinesForEditing (document.FilePath, parsingOptions) + let defines = CompilerEnvironment.GetCompilationDefinesForEditing parsingOptions let! lexerSymbol = Tokenizer.getSymbolAtPosition (document.Id, sourceText, context.Span.Start, document.FilePath, defines, SymbolLookupKind.Greedy, false) let lineText = (sourceText.Lines.GetLineFromPosition context.Span.Start).ToString() let! symbolUse = checkResults.GetSymbolUseAtLocation(m.StartLine, m.EndColumn, lineText, lexerSymbol.FullIsland, userOpName=userOpName) @@ -69,7 +72,7 @@ type internal FSharpRenameUnusedValueCodeFixProvider if func.IsMemberThisValue then createCodeFix(context, symbolName, SR.RenameValueToDoubleUnderscore(), TextChange(context.Span, "__")) - elif not func.IsMember then + elif func.IsValue then createCodeFix(context, symbolName, SR.RenameValueToUnderscore(), TextChange(context.Span, "_")) | _ -> () } diff --git a/vsintegration/src/FSharp.Editor/CodeLens/AbstractCodeLensDisplayService.fs b/vsintegration/src/FSharp.Editor/CodeLens/AbstractCodeLensDisplayService.fs new file mode 100644 index 00000000000..e6d60baf093 --- /dev/null +++ b/vsintegration/src/FSharp.Editor/CodeLens/AbstractCodeLensDisplayService.fs @@ -0,0 +1,274 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace rec Microsoft.VisualStudio.FSharp.Editor + +open System +open System.Windows.Controls +open Microsoft.VisualStudio.Text +open Microsoft.VisualStudio.Text.Editor +open Microsoft.VisualStudio.Text.Formatting +open System.Threading +open System.Windows +open System.Collections.Generic + +open Microsoft.VisualStudio.FSharp.Editor.Logging + +[] +type CodeLensDisplayService (view : IWpfTextView, buffer : ITextBuffer, layerName) as self = + + // Add buffer changed event handler + do ( + buffer.Changed.Add self.HandleBufferChanged + view.LayoutChanged.Add self.HandleLayoutChanged + ) + + /// + /// Enqueing an unit signals to the tagger that all visible line lens must be layouted again, + /// to respect single line changes. + /// + member val RelayoutRequested : Queue<_> = Queue() with get + + member val WpfView = view + + member val TextBuffer = buffer + + /// Saves the ui context to switch context for ui related work. + member val UiContext = SynchronizationContext.Current + + // Tracks the created ui elements per TrackingSpan + member val UiElements = Dictionary<_,Grid>() + + member val TrackingSpanUiParent = HashSet() + + member val UiElementNeighbour = Dictionary() + + /// Caches the current used TrackingSpans per line. One line can contain multiple trackingSpans + member val TrackingSpans = Dictionary>() + + /// Text view for accessing the adornment layer. + member val View: IWpfTextView = view + + member val CodeLensLayer = view.GetAdornmentLayer layerName + + /// Tracks the recent first + last visible line numbers for adornment layout logic. + member val RecentFirstVsblLineNmbr = 0 with get, set + + member val RecentLastVsblLineNmbr = 0 with get, set + + /// Tracks the adornments on the layer. + member val AddedAdornments = HashSet() + + /// Cancellation token source for the layout changed event. Needed to abort previous async-work. + member val LayoutChangedCts = new CancellationTokenSource() with get, set + + /// Tracks the last used buffer snapshot, should be preferred used in combination with mutex. + member val CurrentBufferSnapshot = null with get, set + + /// Helper method which returns the start line number of a tracking span + member __.GetTrackingSpanStartLine (snapshot:ITextSnapshot) (trackingSpan:ITrackingSpan) = + snapshot.GetLineNumberFromPosition(trackingSpan.GetStartPoint(snapshot).Position) + + /// Helper method which returns the start line number of a tracking span + member __.TryGetTSpanStartLine (snapshot:ITextSnapshot) (trackingSpan:ITrackingSpan) = + let pos = trackingSpan.GetStartPoint(snapshot).Position + if snapshot.Length - 1 < pos then None + else pos |> snapshot.GetLineNumberFromPosition |> Some + + member self.UpdateTrackingSpansFast (snapshot:ITextSnapshot) lineNumber = + if lineNumber |> self.TrackingSpans.ContainsKey then + let currentTrackingSpans = self.TrackingSpans.[lineNumber] |> ResizeArray // We need a copy because we modify the list. + for trackingSpan in currentTrackingSpans do + let newLineOption = self.TryGetTSpanStartLine snapshot trackingSpan + match newLineOption with + | None -> () + | Some newLine -> + if newLine <> lineNumber then + // We're on a new line and need to check whether we're currently in another grid + // (because somehow there were multiple trackingSpans per line). + if self.TrackingSpanUiParent.Contains trackingSpan then + self.TrackingSpanUiParent.Remove trackingSpan |> ignore + self.UiElementNeighbour.Remove self.UiElements.[trackingSpan] |> ignore + // remove our entry in the line cache dictionary + self.TrackingSpans.[lineNumber].Remove(trackingSpan) |> ignore + // if the cache entry for the old line is now empty remove it completely + if self.TrackingSpans.[lineNumber].Count = 0 then + self.TrackingSpans.Remove lineNumber |> ignore + // now re-register our tracking span in the cache dict. + // Check whether the new line has no existing entry to add a fresh one. + // If there is already one we put our grid into the grid of the first entry of the line. + if newLine |> self.TrackingSpans.ContainsKey |> not then + self.TrackingSpans.[newLine] <- ResizeArray() + else + let neighbour = + self.UiElements.[self.TrackingSpans.[newLine] |> Seq.last] // This fails if a tracking span has no ui element! + self.UiElementNeighbour.[self.UiElements.[trackingSpan]] <- neighbour + self.TrackingSpanUiParent.Add trackingSpan |> ignore + // And finally add us to the cache again. + self.TrackingSpans.[newLine].Add(trackingSpan) + // Be sure that the uiElement of the trackingSpan is viRecentLastVsblLineNmbr the visible line space. + if newLine < self.RecentFirstVsblLineNmbr || newLine > self.RecentLastVsblLineNmbr then + if self.UiElements.ContainsKey trackingSpan then + let mutable element = self.UiElements.[trackingSpan] + element.Visibility <- Visibility.Hidden + + member __.CreateDefaultStackPanel () = + let grid = Grid(Visibility = Visibility.Hidden) + Canvas.SetLeft(grid, 0.) + Canvas.SetTop(grid, 0.) + grid + + /// Helper methods which invokes every action which is needed for new trackingSpans + member self.AddTrackingSpan (trackingSpan:ITrackingSpan)= + let snapshot = buffer.CurrentSnapshot + let startLineNumber = snapshot.GetLineNumberFromPosition(trackingSpan.GetStartPoint(snapshot).Position) + let uiElement = + if self.UiElements.ContainsKey trackingSpan then + logErrorf "Added a tracking span twice, this is not allowed and will result in invalid values! %A" (trackingSpan.GetText snapshot) + self.UiElements.[trackingSpan] + else + let defaultStackPanel = self.CreateDefaultStackPanel() + self.UiElements.[trackingSpan] <- defaultStackPanel + defaultStackPanel + if self.TrackingSpans.ContainsKey startLineNumber then + self.TrackingSpans.[startLineNumber].Add trackingSpan + let neighbour = + self.UiElements.[self.TrackingSpans.[startLineNumber] |> Seq.last] // This fails if a tracking span has no ui element! + self.UiElementNeighbour.[uiElement] <- neighbour + self.TrackingSpanUiParent.Add trackingSpan |> ignore + else + self.TrackingSpans.[startLineNumber] <- ResizeArray() + self.TrackingSpans.[startLineNumber].Add trackingSpan + uiElement + + + member self.HandleBufferChanged(e:TextContentChangedEventArgs) = + try + let oldSnapshot = e.Before + let snapshot = e.After + self.CurrentBufferSnapshot <- snapshot + for line in oldSnapshot.Lines do + let lineNumber = line.LineNumber + self.UpdateTrackingSpansFast snapshot lineNumber + let firstLine = view.TextViewLines.FirstVisibleLine + view.DisplayTextLineContainingBufferPosition (firstLine.Start, 0., ViewRelativePosition.Top) + self.RelayoutRequested.Enqueue(()) + with e -> logErrorf "Error in line lens provider: %A" e + + /// Public non-thread-safe method to add line lens for a given tracking span. + /// Returns an UIElement which can be used to add Ui elements and to remove the line lens later. + + member self.AddCodeLens (trackingSpan:ITrackingSpan) = + if trackingSpan.TextBuffer <> buffer then failwith "TrackingSpan text buffer does not equal with CodeLens text buffer" + let Grid = self.AddTrackingSpan trackingSpan + self.RelayoutRequested.Enqueue(()) + Grid :> UIElement + + /// Public non-thread-safe method to remove line lens for a given tracking span. + member self.RemoveCodeLens (trackingSpan:ITrackingSpan) = + if self.UiElements.ContainsKey trackingSpan then + let Grid = self.UiElements.[trackingSpan] + Grid.Children.Clear() + self.UiElements.Remove trackingSpan |> ignore + try + self.CodeLensLayer.RemoveAdornment(Grid) + with e -> + logExceptionWithContext(e, "Removing line lens") + else + logWarningf "No ui element is attached to this tracking span!" + let lineNumber = + (trackingSpan.GetStartPoint self.CurrentBufferSnapshot).Position + |> self.CurrentBufferSnapshot.GetLineNumberFromPosition + if self.TrackingSpans.ContainsKey lineNumber then + if self.TrackingSpans.[lineNumber].Remove trackingSpan |> not then + logWarningf "No tracking span is accociated with this line number %d!" lineNumber + if self.TrackingSpans.[lineNumber].Count = 0 then + self.TrackingSpans.Remove lineNumber |> ignore + else + logWarningf "No tracking span is accociated with this line number %d!" lineNumber + + abstract member AddUiElementToCodeLens : ITrackingSpan * UIElement -> unit + default self.AddUiElementToCodeLens (trackingSpan:ITrackingSpan, uiElement:UIElement) = + let Grid = self.UiElements.[trackingSpan] + Grid.Children.Add uiElement |> ignore + + abstract member AddUiElementToCodeLensOnce : ITrackingSpan * UIElement -> unit + default self.AddUiElementToCodeLensOnce (trackingSpan:ITrackingSpan, uiElement:UIElement)= + let Grid = self.UiElements.[trackingSpan] + if uiElement |> Grid.Children.Contains |> not then + self.AddUiElementToCodeLens (trackingSpan, uiElement) + + abstract member RemoveUiElementFromCodeLens : ITrackingSpan * UIElement -> unit + default self.RemoveUiElementFromCodeLens (trackingSpan:ITrackingSpan, uiElement:UIElement) = + let Grid = self.UiElements.[trackingSpan] + Grid.Children.Remove(uiElement) |> ignore + + member self.HandleLayoutChanged (e:TextViewLayoutChangedEventArgs) = + try + let buffer = e.NewSnapshot + let recentVisibleLineNumbers = Set [self.RecentLastVsblLineNmbr .. self.RecentLastVsblLineNmbr] + let firstVisibleLineNumber, lastVisibleLineNumber = + let first, last = + view.TextViewLines.FirstVisibleLine, + view.TextViewLines.LastVisibleLine + buffer.GetLineNumberFromPosition(first.Start.Position), + buffer.GetLineNumberFromPosition(last.Start.Position) + let visibleLineNumbers = Set [firstVisibleLineNumber .. lastVisibleLineNumber] + let nonVisibleLineNumbers = Set.difference recentVisibleLineNumbers visibleLineNumbers + let newVisibleLineNumbers = Set.difference visibleLineNumbers recentVisibleLineNumbers + + let applyFuncOnLineStackPanels (line:IWpfTextViewLine) (func:Grid -> unit) = + let lineNumber = line.Snapshot.GetLineNumberFromPosition(line.Start.Position) + if (self.TrackingSpans.ContainsKey lineNumber) && (self.TrackingSpans.[lineNumber]) |> (Seq.isEmpty >> not) then + for trackingSpan in self.TrackingSpans.[lineNumber] do + let success, ui = self.UiElements.TryGetValue trackingSpan + if success then + func ui + + if nonVisibleLineNumbers.Count > 0 || newVisibleLineNumbers.Count > 0 then + for lineNumber in nonVisibleLineNumbers do + if lineNumber > 0 && lineNumber < buffer.LineCount then + try + let line = + (buffer.GetLineFromLineNumber lineNumber).Start + |> view.GetTextViewLineContainingBufferPosition + applyFuncOnLineStackPanels line (fun ui -> + ui.Visibility <- Visibility.Hidden + ) + with e -> logErrorf "Error in non visible lines iteration %A" e + for lineNumber in newVisibleLineNumbers do + try + let line = + (buffer.GetLineFromLineNumber lineNumber).Start + |> view.GetTextViewLineContainingBufferPosition + applyFuncOnLineStackPanels line (fun ui -> + ui.Visibility <- Visibility.Visible + self.LayoutUIElementOnLine view line ui + ) + with e -> logErrorf "Error in new visible lines iteration %A" e + if not e.VerticalTranslation && e.NewViewState.ViewportHeight <> e.OldViewState.ViewportHeight then + self.RelayoutRequested.Enqueue() // Unfortunately zooming requires a relayout too, to ensure that no weird layout happens due to unkown reasons. + if self.RelayoutRequested.Count > 0 then + self.RelayoutRequested.Dequeue() |> ignore + for lineNumber in visibleLineNumbers do + let line = + (buffer.GetLineFromLineNumber lineNumber).Start + |> view.GetTextViewLineContainingBufferPosition + applyFuncOnLineStackPanels line (fun ui -> + ui.Visibility <- Visibility.Visible + self.LayoutUIElementOnLine view line ui + ) + // Save the new first and last visible lines for tracking + self.RecentFirstVsblLineNmbr <- firstVisibleLineNumber + self.RecentLastVsblLineNmbr <- lastVisibleLineNumber + // We can cancel existing stuff because the algorithm supports abortion without any data loss + self.LayoutChangedCts.Cancel() + self.LayoutChangedCts.Dispose() + self.LayoutChangedCts <- new CancellationTokenSource() + + self.AsyncCustomLayoutOperation visibleLineNumbers buffer + |> RoslynHelpers.StartAsyncSafe self.LayoutChangedCts.Token "HandleLayoutChanged" + with e -> logExceptionWithContext (e, "Layout changed") + + abstract LayoutUIElementOnLine : IWpfTextView -> ITextViewLine -> Grid -> unit + + abstract AsyncCustomLayoutOperation : int Set -> ITextSnapshot -> unit Async diff --git a/vsintegration/src/FSharp.Editor/CodeLens/CodeLensGeneralTagger.fs b/vsintegration/src/FSharp.Editor/CodeLens/CodeLensGeneralTagger.fs new file mode 100644 index 00000000000..9ed05edf0ac --- /dev/null +++ b/vsintegration/src/FSharp.Editor/CodeLens/CodeLensGeneralTagger.fs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace rec Microsoft.VisualStudio.FSharp.Editor + +open System +open System.Windows.Controls +open Microsoft.VisualStudio.Text +open Microsoft.VisualStudio.Text.Editor +open Microsoft.VisualStudio.Text.Formatting +open System.Windows +open System.Collections.Generic +open Microsoft.VisualStudio.Text.Tagging + +open Microsoft.VisualStudio.FSharp.Editor.Logging + +type CodeLensGeneralTag(width, topSpace, baseline, textHeight, bottomSpace, affinity, tag:obj, providerTag:obj) = + inherit SpaceNegotiatingAdornmentTag(width, topSpace, baseline, textHeight, bottomSpace, affinity, tag, providerTag) + +/// Class which provides support for general code lens +/// Use the methods AddCodeLens and RemoveCodeLens +type CodeLensGeneralTagger (view, buffer) as self = + inherit CodeLensDisplayService(view, buffer, "CodeLens") + + /// The tags changed event to notify if the data for the tags has changed. + let tagsChangedEvent = new Event,SnapshotSpanEventArgs>() + + /// Layouts all stack panels on the line + override self.LayoutUIElementOnLine (view:IWpfTextView) (line:ITextViewLine) (ui:Grid) = + let left, top = + match self.UiElementNeighbour.TryGetValue ui with + | true, parent -> + let left = Canvas.GetLeft parent + let top = Canvas.GetTop parent + let width = parent.ActualWidth + logInfof "Width of parent: %.4f" width + left + width, top + | _ -> + try + // Get the real offset so that the code lens are placed respectively to their content + let offset = + [0..line.Length - 1] |> Seq.tryFind (fun i -> not (Char.IsWhiteSpace (line.Start.Add(i).GetChar()))) + |> Option.defaultValue 0 + + let realStart = line.Start.Add(offset) + let g = view.TextViewLines.GetCharacterBounds(realStart) + // WORKAROUND VS BUG, left cannot be zero if the offset is creater than zero! + // Calling the method twice fixes this bug and ensures that all values are correct. + // Okay not really :( Must be replaced later with an own calculation depending on editor font settings! + if 7 * offset > int g.Left then + logErrorf "Incorrect return from geometry measure" + Canvas.GetLeft ui, g.Top + else + g.Left, g.Top + with e -> + logExceptionWithContext (e, "Error in layout ui element on line") + Canvas.GetLeft ui, Canvas.GetTop ui + Canvas.SetLeft(ui, left) + Canvas.SetTop(ui, top) + + override self.AsyncCustomLayoutOperation _ _ = + asyncMaybe { + // Suspend 16 ms, instantly applying the layout to the adornment elements isn't needed + // and would consume too much performance + do! Async.Sleep(16) |> liftAsync // Skip at least one frames + do! Async.SwitchToContext self.UiContext |> liftAsync + let layer = self.CodeLensLayer + + do! Async.Sleep(495) |> liftAsync + + // WORKAROUND FOR VS BUG + // The layout changed event may not provide us all real changed lines so + // we take care of this on our own. + let visibleSpan = + let first, last = + view.TextViewLines.FirstVisibleLine, + view.TextViewLines.LastVisibleLine + SnapshotSpan(first.Start, last.End) + let customVisibleLines = view.TextViewLines.GetTextViewLinesIntersectingSpan visibleSpan + let isLineVisible (line:ITextViewLine) = line.IsValid + let linesToProcess = customVisibleLines |> Seq.filter isLineVisible + + for line in linesToProcess do + try + match line.GetAdornmentTags self |> Seq.tryHead with + | Some (:? seq as stackPanels) -> + for stackPanel in stackPanels do + if stackPanel |> self.AddedAdornments.Contains |> not then + layer.AddAdornment(AdornmentPositioningBehavior.OwnerControlled, Nullable(), + self, stackPanel, AdornmentRemovedCallback(fun _ _ -> ())) |> ignore + self.AddedAdornments.Add stackPanel |> ignore + | _ -> () + with e -> logExceptionWithContext (e, "LayoutChanged, processing new visible lines") + } |> Async.Ignore + + override self.AddUiElementToCodeLens (trackingSpan:ITrackingSpan, uiElement:UIElement)= + base.AddUiElementToCodeLens (trackingSpan, uiElement) // We do the same as the base call execpt that we need to notify that the tag needs to be refreshed. + tagsChangedEvent.Trigger(self, SnapshotSpanEventArgs(trackingSpan.GetSpan(buffer.CurrentSnapshot))) + + override self.RemoveUiElementFromCodeLens (trackingSpan:ITrackingSpan, uiElement:UIElement) = + base.RemoveUiElementFromCodeLens (trackingSpan, uiElement) + tagsChangedEvent.Trigger(self, SnapshotSpanEventArgs(trackingSpan.GetSpan(buffer.CurrentSnapshot))) // Need to refresh the tag. + + interface ITagger with + [] + override __.TagsChanged = tagsChangedEvent.Publish + + /// Returns the tags which reserve the correct space for adornments + /// Notice, it's asumed that the data in the collection is valid. + override __.GetTags spans = + try + seq { + for span in spans do + let snapshot = span.Snapshot + let lineNumber = + try + snapshot.GetLineNumberFromPosition(span.Start.Position) + with e -> logExceptionWithContext (e, "line number tagging"); 0 + if self.TrackingSpans.ContainsKey(lineNumber) && self.TrackingSpans.[lineNumber] |> Seq.isEmpty |> not then + + let tagSpan = snapshot.GetLineFromLineNumber(lineNumber).Extent + let stackPanels = + self.TrackingSpans.[lineNumber] + |> Seq.map (fun trackingSpan -> + let success, res = self.UiElements.TryGetValue trackingSpan + if success then res else null + ) + |> Seq.filter (isNull >> not) + let span = + try + tagSpan.TranslateTo(span.Snapshot, SpanTrackingMode.EdgeExclusive) + with e -> logExceptionWithContext (e, "tag span translation"); tagSpan + let sizes = + try + stackPanels |> Seq.map (fun ui -> + ui.Measure(Size(10000., 10000.)) + ui.DesiredSize ) + with e -> logExceptionWithContext (e, "internal tagging"); Seq.empty + let height = + try + sizes + |> Seq.map (fun size -> size.Height) + |> Seq.sortDescending + |> Seq.tryHead + |> Option.defaultValue 0. + with e -> logExceptionWithContext (e, "height tagging"); 0. + + yield TagSpan(span, CodeLensGeneralTag(0., height, 0., 0., 0., PositionAffinity.Predecessor, stackPanels, self)) :> ITagSpan + } + with e -> + logErrorf "Error in code lens get tags %A" e + Seq.empty + + diff --git a/vsintegration/src/FSharp.Editor/CodeLens/CodeLensProvider.fs b/vsintegration/src/FSharp.Editor/CodeLens/CodeLensProvider.fs new file mode 100644 index 00000000000..415f9e5fa6d --- /dev/null +++ b/vsintegration/src/FSharp.Editor/CodeLens/CodeLensProvider.fs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace rec Microsoft.VisualStudio.FSharp.Editor + + +open System +open Microsoft.VisualStudio.Text +open Microsoft.VisualStudio.Text.Editor +open System.ComponentModel.Composition +open Microsoft.VisualStudio.Utilities +open Microsoft.CodeAnalysis +open Microsoft.VisualStudio.Shell +open Microsoft.VisualStudio +open Microsoft.VisualStudio.LanguageServices +open System.Collections.Generic +open Microsoft.CodeAnalysis.Editor.Shared.Utilities +open Microsoft.VisualStudio.Text.Tagging +open Microsoft.VisualStudio.Text.Classification +open Microsoft.VisualStudio.ComponentModelHost +open System.Threading +open Microsoft.VisualStudio.FSharp.Editor.Logging + +[)>] +[)>] +[)>] +[] +[] +type internal CodeLensProvider + [] + ( + [)>] serviceProvider: IServiceProvider, + textDocumentFactory: ITextDocumentFactoryService, + checkerProvider: FSharpCheckerProvider, + projectInfoManager: FSharpProjectOptionsManager, + typeMap : ClassificationTypeMap Lazy, + settings: EditorOptions + ) = + + let lineLensProvider = ResizeArray() + let taggers = ResizeArray() + let componentModel = Package.GetGlobalService(typeof) :?> ComponentModelHost.IComponentModel + let workspace = componentModel.GetService() + + /// Returns an provider for the textView if already one has been created. Else create one. + let addCodeLensProviderOnce wpfView buffer = + let res = taggers |> Seq.tryFind(fun (view, _) -> view = wpfView) + match res with + | Some (_, (tagger, _)) -> tagger + | None -> + let documentId = + lazy ( + match textDocumentFactory.TryGetTextDocument(buffer) with + | true, textDocument -> + Seq.tryHead (workspace.CurrentSolution.GetDocumentIdsWithFilePath(textDocument.FilePath)) + | _ -> None + |> Option.get + ) + + let tagger = CodeLensGeneralTagger(wpfView, buffer) + let service = FSharpCodeLensService(serviceProvider, workspace, documentId, buffer, checkerProvider.Checker, projectInfoManager, componentModel.GetService(), typeMap, tagger, settings) + let provider = (wpfView, (tagger, service)) + wpfView.Closed.Add (fun _ -> taggers.Remove provider |> ignore) + taggers.Add((wpfView, (tagger, service))) + tagger + + /// Returns an provider for the textView if already one has been created. Else create one. + let addLineLensProviderOnce wpfView buffer = + let res = lineLensProvider |> Seq.tryFind(fun (view, _) -> view = wpfView) + match res with + | None -> + let documentId = + lazy ( + match textDocumentFactory.TryGetTextDocument(buffer) with + | true, textDocument -> + Seq.tryHead (workspace.CurrentSolution.GetDocumentIdsWithFilePath(textDocument.FilePath)) + | _ -> None + |> Option.get + ) + let service = FSharpCodeLensService(serviceProvider, workspace, documentId, buffer, checkerProvider.Checker, projectInfoManager, componentModel.GetService(), typeMap, LineLensDisplayService(wpfView, buffer), settings) + let provider = (wpfView, service) + wpfView.Closed.Add (fun _ -> lineLensProvider.Remove provider |> ignore) + lineLensProvider.Add(provider) + | _ -> () + + [); Name("CodeLens"); + Order(Before = PredefinedAdornmentLayers.Text); + TextViewRole(PredefinedTextViewRoles.Document)>] + member val CodeLensAdornmentLayerDefinition : AdornmentLayerDefinition = null with get, set + + [); Name("LineLens"); + Order(Before = PredefinedAdornmentLayers.Text); + TextViewRole(PredefinedTextViewRoles.Document)>] + member val LineLensAdornmentLayerDefinition : AdornmentLayerDefinition = null with get, set + + interface IViewTaggerProvider with + override __.CreateTagger(view, buffer) = + if settings.CodeLens.Enabled && not settings.CodeLens.ReplaceWithLineLens then + let wpfView = + match view with + | :? IWpfTextView as view -> view + | _ -> failwith "error" + + box(addCodeLensProviderOnce wpfView buffer) :?> _ + else + null + + interface IWpfTextViewCreationListener with + override __.TextViewCreated view = + if settings.CodeLens.Enabled && settings.CodeLens.ReplaceWithLineLens then + addLineLensProviderOnce view (view.TextBuffer) |> ignore diff --git a/vsintegration/src/FSharp.Editor/CodeLens/FSharpCodeLensService.fs b/vsintegration/src/FSharp.Editor/CodeLens/FSharpCodeLensService.fs new file mode 100644 index 00000000000..902de15332a --- /dev/null +++ b/vsintegration/src/FSharp.Editor/CodeLens/FSharpCodeLensService.fs @@ -0,0 +1,382 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace rec Microsoft.VisualStudio.FSharp.Editor + + +open System +open System.Collections.Generic +open System.Threading +open System.Windows +open System.Windows.Controls +open System.Windows.Media +open System.Windows.Media.Animation + +open Microsoft.CodeAnalysis +open Microsoft.CodeAnalysis.Editor.Shared.Extensions +open Microsoft.CodeAnalysis.Editor.Shared.Utilities +open Microsoft.CodeAnalysis.Classification + +open Microsoft.FSharp.Compiler +open Microsoft.FSharp.Compiler.Ast +open Microsoft.FSharp.Compiler.SourceCodeServices +open Microsoft.FSharp.Compiler.Range + +open Microsoft.VisualStudio.FSharp.Editor.Logging + +open Microsoft.VisualStudio.Shell.Interop + +open Microsoft.VisualStudio.Text +open Microsoft.VisualStudio.Text.Classification +open Microsoft.VisualStudio.Text.Formatting + +open Internal.Utilities.StructuredFormat + +type internal CodeLens(taggedText, computed, fullTypeSignature, uiElement) = + member val TaggedText: Async<(ResizeArray * QuickInfoNavigation) option> = taggedText + member val Computed: bool = computed with get, set + member val FullTypeSignature: string = fullTypeSignature + member val UiElement: UIElement = uiElement with get, set + +type internal FSharpCodeLensService + ( + serviceProvider: IServiceProvider, + workspace: Workspace, + documentId: Lazy, + buffer: ITextBuffer, + checker: FSharpChecker, + projectInfoManager: FSharpProjectOptionsManager, + classificationFormatMapService: IClassificationFormatMapService, + typeMap: Lazy, + codeLens : CodeLensDisplayService, + settings: EditorOptions + ) as self = + + let lineLens = codeLens + + let visit pos parseTree = + AstTraversal.Traverse(pos, parseTree, { new AstTraversal.AstVisitorBase<_>() with + member __.VisitExpr(_path, traverseSynExpr, defaultTraverse, expr) = + defaultTraverse(expr) + + override __.VisitInheritSynMemberDefn (_, _, _, _, range) = Some range + + override __.VisitTypeAbbrev( _, range) = Some range + + override __.VisitLetOrUse(_, _, _, range) = Some range + + override __.VisitBinding (fn, binding) = + Some binding.RangeOfBindingAndRhs + }) + + let formatMap = lazy classificationFormatMapService.GetClassificationFormatMap "tooltip" + + let mutable lastResults = Dictionary() + let mutable firstTimeChecked = false + let mutable bufferChangedCts = new CancellationTokenSource() + let uiContext = SynchronizationContext.Current + + let layoutTagToFormatting (layoutTag: LayoutTag) = + layoutTag + |> RoslynHelpers.roslynTag + |> ClassificationTags.GetClassificationTypeName + |> typeMap.Value.GetClassificationType + |> formatMap.Value.GetTextProperties + + let createTextBox (lens:CodeLens) = + async { + do! Async.SwitchToContext uiContext + let! res = lens.TaggedText + match res with + | Some (taggedText, navigation) -> + logInfof "Tagged text %A" taggedText + let textBlock = new TextBlock(Background = Brushes.AliceBlue, Opacity = 0.0, TextTrimming = TextTrimming.None) + DependencyObjectExtensions.SetDefaultTextProperties(textBlock, formatMap.Value) + + let prefix = Documents.Run settings.CodeLens.Prefix + prefix.Foreground <- SolidColorBrush(Color.FromRgb(153uy, 153uy, 153uy)) + textBlock.Inlines.Add prefix + + for text in taggedText do + + let coloredProperties = layoutTagToFormatting text.Tag + let actualProperties = + if settings.CodeLens.UseColors + then + // If color is gray (R=G=B), change to correct gray color. + // Otherwise, use the provided color. + match coloredProperties.ForegroundBrush with + | :? SolidColorBrush as b -> + let c = b.Color + if c.R = c.G && c.R = c.B + then coloredProperties.SetForeground(Color.FromRgb(153uy, 153uy, 153uy)) + else coloredProperties + | _ -> coloredProperties + else + coloredProperties.SetForeground(Color.FromRgb(153uy, 153uy, 153uy)) + + let run = Documents.Run text.Text + DependencyObjectExtensions.SetTextProperties (run, actualProperties) + + let inl = + match text with + | :? Layout.NavigableTaggedText as nav when navigation.IsTargetValid nav.Range -> + let h = Documents.Hyperlink(run, ToolTip = nav.Range.FileName) + h.Click.Add (fun _ -> + navigation.NavigateTo nav.Range) + h :> Documents.Inline + | _ -> run :> _ + DependencyObjectExtensions.SetTextProperties (inl, actualProperties) + textBlock.Inlines.Add inl + + + textBlock.Measure(Size(Double.PositiveInfinity, Double.PositiveInfinity)) + lens.Computed <- true + lens.UiElement <- textBlock + return true + | _ -> + return false + } + + let executeCodeLenseAsync () = + asyncMaybe { + do! Async.Sleep 800 |> liftAsync + logInfof "Rechecking code due to buffer edit!" + let! document = workspace.CurrentSolution.GetDocument(documentId.Value) |> Option.ofObj + let! _, options = projectInfoManager.TryGetOptionsForEditingDocumentOrProject(document) + let! _, parsedInput, checkFileResults = checker.ParseAndCheckDocument(document, options, "LineLens", allowStaleResults=true) + logInfof "Getting uses of all symbols!" + let! symbolUses = checkFileResults.GetAllUsesOfAllSymbolsInFile() |> liftAsync + let textSnapshot = buffer.CurrentSnapshot + logInfof "Updating due to buffer edit!" + + // Clear existing data and cache flags + // The results which are left. + let oldResults = Dictionary(lastResults) + + let newResults = Dictionary() + // Symbols which cache wasn't found yet + let unattachedSymbols = ResizeArray() + // Tags which are new or need to be updated due to changes. + let tagsToUpdate = Dictionary() + let codeLensToAdd = ResizeArray() + + let useResults (displayContext: FSharpDisplayContext, func: FSharpMemberOrFunctionOrValue, realPosition: range) = + async { + try + let textSnapshot = buffer.CurrentSnapshot + let lineNumber = Line.toZ func.DeclarationLocation.StartLine + if (lineNumber >= 0 || lineNumber < textSnapshot.LineCount) then + match func.FullTypeSafe with + | Some _ -> + let! displayEnv = checkFileResults.GetDisplayEnvForPos func.DeclarationLocation.Start + + let displayContext = + match displayEnv with + | Some denv -> FSharpDisplayContext(fun _ -> denv) + | None -> displayContext + + let typeLayout = func.FormatLayout displayContext + let taggedText = ResizeArray() + + Layout.renderL (Layout.taggedTextListR taggedText.Add) typeLayout |> ignore + let statusBar = StatusBar(serviceProvider.GetService()) + let navigation = QuickInfoNavigation(statusBar, checker, projectInfoManager, document, realPosition) + // Because the data is available notify that this line should be updated, displaying the results + return Some (taggedText, navigation) + | None -> + logWarningf "Couldn't acquire CodeLens data for function %A" func + return None + else return None + with e -> + logErrorf "Error in lazy line lens computation. %A" e + return None + } + + let inline setNewResultsAndWarnIfOverriden fullDeclarationText value = + if newResults.ContainsKey fullDeclarationText then + logWarningf "New results already contains: %A" fullDeclarationText + newResults.[fullDeclarationText] <- value + + for symbolUse in symbolUses do + if symbolUse.IsFromDefinition then + match symbolUse.Symbol with + | :? FSharpMemberOrFunctionOrValue as func when func.IsModuleValueOrMember || func.IsProperty -> + let funcID = func.FullName + let fullDeclarationText = funcID + let fullTypeSignature = func.FullType.ToString() + // Try to re-use the last results + if lastResults.ContainsKey fullDeclarationText then + // Make sure that the results are usable + let inline setNewResultsAndWarnIfOverridenLocal value = setNewResultsAndWarnIfOverriden fullDeclarationText value + let lastTrackingSpan, codeLens as lastResult = lastResults.[fullDeclarationText] + if codeLens.FullTypeSignature = fullTypeSignature then + setNewResultsAndWarnIfOverridenLocal lastResult + oldResults.Remove fullDeclarationText |> ignore + else + let declarationLine, range = + match visit func.DeclarationLocation.Start parsedInput with + | Some range -> range.StartLine - 1, range + | _ -> func.DeclarationLocation.StartLine - 1, func.DeclarationLocation + // Track the old element for removal + let declarationSpan = + let line = textSnapshot.GetLineFromLineNumber declarationLine + let offset = line.GetText() |> Seq.findIndex (Char.IsWhiteSpace >> not) + SnapshotSpan(line.Start.Add offset, line.End).Span + let newTrackingSpan = + textSnapshot.CreateTrackingSpan(declarationSpan, SpanTrackingMode.EdgeExclusive) + // Push back the new results + let res = + CodeLens( Async.cache (useResults (symbolUse.DisplayContext, func, range)), + false, + fullTypeSignature, + null) + // The old results aren't computed at all, because the line might have changed create new results + tagsToUpdate.[lastTrackingSpan] <- (newTrackingSpan, fullDeclarationText, res) + setNewResultsAndWarnIfOverridenLocal (newTrackingSpan, res) + + oldResults.Remove fullDeclarationText |> ignore + else + // The symbol might be completely new or has slightly changed. + // We need to track this and iterate over the left entries to ensure that there isn't anything + unattachedSymbols.Add((symbolUse, func, fullDeclarationText, fullTypeSignature)) + | _ -> () + + // In best case this works quite `covfefe` fine because often enough we change only a small part of the file and not the complete. + for unattachedSymbol in unattachedSymbols do + let symbolUse, func, fullDeclarationText, fullTypeSignature = unattachedSymbol + let declarationLine, range = + match visit func.DeclarationLocation.Start parsedInput with + | Some range -> range.StartLine - 1, range + | _ -> func.DeclarationLocation.StartLine - 1, func.DeclarationLocation + + let test (v:KeyValuePair<_, _>) = + let _, (codeLens:CodeLens) = v.Value + codeLens.FullTypeSignature = fullTypeSignature + match oldResults |> Seq.tryFind test with + | Some res -> + let (trackingSpan : ITrackingSpan), (codeLens : CodeLens) = res.Value + let declarationSpan = + let line = textSnapshot.GetLineFromLineNumber declarationLine + let offset = line.GetText() |> Seq.findIndex (Char.IsWhiteSpace >> not) + SnapshotSpan(line.Start.Add offset, line.End).Span + let newTrackingSpan = + textSnapshot.CreateTrackingSpan(declarationSpan, SpanTrackingMode.EdgeExclusive) + if codeLens.Computed && (isNull codeLens.UiElement |> not) then + newResults.[fullDeclarationText] <- (newTrackingSpan, codeLens) + tagsToUpdate.[trackingSpan] <- (newTrackingSpan, fullDeclarationText, codeLens) + else + let res = + CodeLens( + Async.cache (useResults (symbolUse.DisplayContext, func, range)), + false, + fullTypeSignature, + null) + // The tag might be still valid but it hasn't been computed yet so create fresh results + tagsToUpdate.[trackingSpan] <- (newTrackingSpan, fullDeclarationText, res) + newResults.[fullDeclarationText] <- (newTrackingSpan, res) + let key = res.Key + oldResults.Remove key |> ignore // no need to check this entry again + | None -> + // This function hasn't got any cache and so it's completely new. + // So create completely new results + // And finally add a tag for this. + let res = + CodeLens( + Async.cache (useResults (symbolUse.DisplayContext, func, range)), + false, + fullTypeSignature, + null) + try + let declarationSpan = + let line = textSnapshot.GetLineFromLineNumber declarationLine + let offset = line.GetText() |> Seq.findIndex (Char.IsWhiteSpace >> not) + SnapshotSpan(line.Start.Add offset, line.End).Span + let trackingSpan = + textSnapshot.CreateTrackingSpan(declarationSpan, SpanTrackingMode.EdgeExclusive) + codeLensToAdd.Add (trackingSpan, res) + newResults.[fullDeclarationText] <- (trackingSpan, res) + with e -> logExceptionWithContext (e, "Line Lens tracking tag span creation") + () + lastResults <- newResults + do! Async.SwitchToContext uiContext |> liftAsync + let createCodeLensUIElement (codeLens:CodeLens) trackingSpan _ = + if codeLens.Computed |> not then + async { + let! res = createTextBox codeLens + if res then + do! Async.SwitchToContext uiContext + logInfof "Adding ui element for %A" (codeLens.TaggedText) + let uiElement = codeLens.UiElement + let animation = + DoubleAnimation( + To = Nullable 0.8, + Duration = (TimeSpan.FromMilliseconds 800. |> Duration.op_Implicit), + EasingFunction = QuadraticEase() + ) + let sb = Storyboard() + Storyboard.SetTarget(sb, uiElement) + Storyboard.SetTargetProperty(sb, PropertyPath Control.OpacityProperty) + sb.Children.Add animation + lineLens.AddUiElementToCodeLensOnce (trackingSpan, uiElement) + lineLens.RelayoutRequested.Enqueue () + sb.Begin() + else + logWarningf "Couldn't retrieve code lens information for %A" codeLens.FullTypeSignature + // logInfo "Adding text box!" + } |> (RoslynHelpers.StartAsyncSafe CancellationToken.None) "UIElement creation" + + for value in tagsToUpdate do + let trackingSpan, (newTrackingSpan, _, codeLens) = value.Key, value.Value + // logInfof "Adding ui element for %A" (codeLens.TaggedText) + lineLens.RemoveCodeLens trackingSpan |> ignore + let Grid = lineLens.AddCodeLens newTrackingSpan + // logInfof "Trackingspan %A is being added." trackingSpan + if codeLens.Computed && (isNull codeLens.UiElement |> not) then + let uiElement = codeLens.UiElement + lineLens.AddUiElementToCodeLensOnce (newTrackingSpan, uiElement) + else + Grid.IsVisibleChanged + |> Event.filter (fun eventArgs -> eventArgs.NewValue :?> bool) + |> Event.add (createCodeLensUIElement codeLens newTrackingSpan) + + for value in codeLensToAdd do + let trackingSpan, codeLens = value + let Grid = lineLens.AddCodeLens trackingSpan + logInfof "Trackingspan %A is being added." trackingSpan + + Grid.IsVisibleChanged + |> Event.filter (fun eventArgs -> eventArgs.NewValue :?> bool) + |> Event.add (createCodeLensUIElement codeLens trackingSpan) + + for oldResult in oldResults do + let trackingSpan, _ = oldResult.Value + // logInfof "removing trackingSpan %A" trackingSpan + lineLens.RemoveCodeLens trackingSpan |> ignore + + logInfof "Finished updating line lens." + + if not firstTimeChecked then + firstTimeChecked <- true + } |> Async.Ignore + + do + begin + buffer.Changed.AddHandler(fun _ e -> (self.BufferChanged e)) + async { + let mutable numberOfFails = 0 + while not firstTimeChecked && numberOfFails < 10 do + try + do! executeCodeLenseAsync() + do! Async.Sleep(1000) + with + | e -> logErrorf "Line Lens startup failed with: %A" e + numberOfFails <- numberOfFails + 1 + } |> Async.Start + end + + member __.BufferChanged ___ = + bufferChangedCts.Cancel() // Stop all ongoing async workflow. + bufferChangedCts.Dispose() + bufferChangedCts <- new CancellationTokenSource() + executeCodeLenseAsync () |> Async.Ignore |> RoslynHelpers.StartAsyncSafe bufferChangedCts.Token "Buffer Changed" + diff --git a/vsintegration/src/FSharp.Editor/CodeLens/LineLensDisplayService.fs b/vsintegration/src/FSharp.Editor/CodeLens/LineLensDisplayService.fs new file mode 100644 index 00000000000..138c5ac785f --- /dev/null +++ b/vsintegration/src/FSharp.Editor/CodeLens/LineLensDisplayService.fs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace rec Microsoft.VisualStudio.FSharp.Editor + + +open System +open System.Windows.Controls +open Microsoft.VisualStudio.Text +open Microsoft.VisualStudio.Text.Editor +open Microsoft.VisualStudio.Text.Formatting +open System.Windows +open System.Collections.Generic + +open Microsoft.VisualStudio.FSharp.Editor.Logging + +type internal LineLensDisplayService (view, buffer) = + inherit CodeLensDisplayService(view, buffer, "LineLens") + + /// Layouts all stack panels on the line + override self.LayoutUIElementOnLine _ (line:ITextViewLine) (ui:Grid) = + let left, top = + match self.UiElementNeighbour.TryGetValue ui with + | true, parent -> + let left = Canvas.GetLeft parent + let top = Canvas.GetTop parent + let width = parent.ActualWidth + left + width, top + | _ -> + try + let bounds = line.GetCharacterBounds(line.Start) + line.TextRight + 5.0, bounds.Top - 1. + with e -> + logExceptionWithContext (e, "Error in layout ui element on line") + Canvas.GetLeft ui, Canvas.GetTop ui + Canvas.SetLeft(ui, left) + Canvas.SetTop(ui, top) + + override self.AsyncCustomLayoutOperation visibleLineNumbers buffer = + asyncMaybe { + // Suspend 5 ms, instantly applying the layout to the adornment elements isn't needed + // and would consume too much performance + do! Async.Sleep(5) |> liftAsync // Skip at least one frames + do! Async.SwitchToContext self.UiContext |> liftAsync + let layer = self.CodeLensLayer + do! Async.Sleep(495) |> liftAsync + try + for visibleLineNumber in visibleLineNumbers do + if self.TrackingSpans.ContainsKey visibleLineNumber then + self.TrackingSpans.[visibleLineNumber] + |> Seq.map (fun trackingSpan -> + let success, res = self.UiElements.TryGetValue trackingSpan + if success then + res + else null + ) + |> Seq.filter (fun ui -> not(isNull ui) && not(self.AddedAdornments.Contains ui)) + |> Seq.iter(fun grid -> + layer.AddAdornment(AdornmentPositioningBehavior.OwnerControlled, Nullable(), + self, grid, AdornmentRemovedCallback(fun _ _ -> self.AddedAdornments.Remove grid |> ignore)) |> ignore + self.AddedAdornments.Add grid |> ignore + let line = + let l = buffer.GetLineFromLineNumber visibleLineNumber + view.GetTextViewLineContainingBufferPosition l.Start + self.LayoutUIElementOnLine view line grid + ) + with e -> logExceptionWithContext (e, "LayoutChanged, processing new visible lines") + } |> Async.Ignore \ No newline at end of file diff --git a/vsintegration/src/FSharp.Editor/Commands/FsiCommandService.fs b/vsintegration/src/FSharp.Editor/Commands/FsiCommandService.fs index 86c6284d590..389d50b3cba 100644 --- a/vsintegration/src/FSharp.Editor/Commands/FsiCommandService.fs +++ b/vsintegration/src/FSharp.Editor/Commands/FsiCommandService.fs @@ -17,15 +17,17 @@ open Microsoft.VisualStudio.FSharp.Interactive type internal FsiCommandFilter(serviceProvider: System.IServiceProvider) = - let projectSystemPackage = + let loadPackage (guidString: string) = lazy( let shell = serviceProvider.GetService(typeof) :?> IVsShell - let packageToBeLoadedGuid = ref (Guid "{91a04a73-4f2c-4e7c-ad38-c1a68e7da05c}") // FSharp ProjectSystem guid + let packageToBeLoadedGuid = ref (Guid(guidString)) match shell.LoadPackage packageToBeLoadedGuid with | VSConstants.S_OK, pkg -> pkg :?> Package | _ -> null) + let fsiPackage = loadPackage FSharpConstants.fsiPackageGuidString + let mutable nextTarget = null member x.AttachToViewAdapter (viewAdapter: IVsTextView) = @@ -38,13 +40,13 @@ type internal FsiCommandFilter(serviceProvider: System.IServiceProvider) = interface IOleCommandTarget with member x.Exec (pguidCmdGroup, nCmdId, nCmdexecopt, pvaIn, pvaOut) = if pguidCmdGroup = VSConstants.VsStd11 && nCmdId = uint32 VSConstants.VSStd11CmdID.ExecuteSelectionInInteractive then - Hooks.OnMLSend projectSystemPackage.Value FsiEditorSendAction.ExecuteSelection null null + Hooks.OnMLSend fsiPackage.Value FsiEditorSendAction.ExecuteSelection null null VSConstants.S_OK elif pguidCmdGroup = VSConstants.VsStd11 && nCmdId = uint32 VSConstants.VSStd11CmdID.ExecuteLineInInteractive then - Hooks.OnMLSend projectSystemPackage.Value FsiEditorSendAction.ExecuteLine null null + Hooks.OnMLSend fsiPackage.Value FsiEditorSendAction.ExecuteLine null null VSConstants.S_OK elif pguidCmdGroup = Guids.guidInteractive && nCmdId = uint32 Guids.cmdIDDebugSelection then - Hooks.OnMLSend projectSystemPackage.Value FsiEditorSendAction.DebugSelection null null + Hooks.OnMLSend fsiPackage.Value FsiEditorSendAction.DebugSelection null null VSConstants.S_OK elif not (isNull nextTarget) then nextTarget.Exec(&pguidCmdGroup, nCmdId, nCmdexecopt, pvaIn, pvaOut) @@ -62,7 +64,7 @@ type internal FsiCommandFilter(serviceProvider: System.IServiceProvider) = elif pguidCmdGroup = Guids.guidInteractive then for i = 0 to int cCmds-1 do if prgCmds.[i].cmdID = uint32 Guids.cmdIDDebugSelection then - let dbgState = Hooks.GetDebuggerState projectSystemPackage.Value + let dbgState = Hooks.GetDebuggerState fsiPackage.Value if dbgState = FsiDebuggerState.AttachedNotToFSI then prgCmds.[i].cmdf <- uint32 OLECMDF.OLECMDF_INVISIBLE else diff --git a/vsintegration/src/FSharp.Editor/Commands/HelpContextService.fs b/vsintegration/src/FSharp.Editor/Commands/HelpContextService.fs index b8f8ac4c4c9..d2cf393cd77 100644 --- a/vsintegration/src/FSharp.Editor/Commands/HelpContextService.fs +++ b/vsintegration/src/FSharp.Editor/Commands/HelpContextService.fs @@ -7,7 +7,6 @@ open System.Collections.Generic open System.Composition open Microsoft.CodeAnalysis.Text open Microsoft.CodeAnalysis.Classification -open Microsoft.VisualStudio.FSharp.LanguageService open Microsoft.VisualStudio.LanguageServices.Implementation.F1Help open Microsoft.CodeAnalysis.Host.Mef open Microsoft.FSharp.Compiler @@ -24,9 +23,9 @@ type internal FSharpHelpContextService ) = static let userOpName = "ImplementInterfaceCodeFix" - static member GetHelpTerm(checker: FSharpChecker, sourceText : SourceText, fileName, options, span: TextSpan, tokens: List, textVersion) : Async = + static member GetHelpTerm(checker: FSharpChecker, sourceText : SourceText, fileName, options, span: TextSpan, tokens: List, textVersion, perfOptions) : Async = asyncMaybe { - let! _, _, check = checker.ParseAndCheckDocument(fileName, textVersion, sourceText.ToString(), options, allowStaleResults = true, userOpName = userOpName) + let! _, _, check = checker.ParseAndCheckDocument(fileName, textVersion, sourceText.ToString(), options, perfOptions, userOpName = userOpName) let textLines = sourceText.Lines let lineInfo = textLines.GetLineFromPosition(span.Start) let line = lineInfo.LineNumber @@ -105,8 +104,9 @@ type internal FSharpHelpContextService let! textVersion = document.GetTextVersionAsync(cancellationToken) let defines = projectInfoManager.GetCompilationDefinesForEditingDocument(document) let textLine = sourceText.Lines.GetLineFromPosition(textSpan.Start) - let tokens = Tokenizer.getColorizationData(document.Id, sourceText, textLine.Span, Some document.Name, defines, cancellationToken) - return! FSharpHelpContextService.GetHelpTerm(checkerProvider.Checker, sourceText, document.FilePath, projectOptions, textSpan, tokens, textVersion.GetHashCode()) + let classifiedSpans = Tokenizer.getClassifiedSpans(document.Id, sourceText, textLine.Span, Some document.Name, defines, cancellationToken) + let perfOptions = document.FSharpOptions.LanguageServicePerformance + return! FSharpHelpContextService.GetHelpTerm(checkerProvider.Checker, sourceText, document.FilePath, projectOptions, textSpan, classifiedSpans, textVersion.GetHashCode(), perfOptions) } |> Async.map (Option.defaultValue "") |> RoslynHelpers.StartAsyncAsTask cancellationToken diff --git a/vsintegration/src/FSharp.Editor/Commands/XmlDocCommandService.fs b/vsintegration/src/FSharp.Editor/Commands/XmlDocCommandService.fs index 9d5c2990aec..db9bf16ae2f 100644 --- a/vsintegration/src/FSharp.Editor/Commands/XmlDocCommandService.fs +++ b/vsintegration/src/FSharp.Editor/Commands/XmlDocCommandService.fs @@ -15,7 +15,6 @@ open Microsoft.VisualStudio.TextManager.Interop open Microsoft.VisualStudio.Utilities open Microsoft.VisualStudio.LanguageServices.Implementation.ProjectSystem open Microsoft.FSharp.Compiler.SourceCodeServices -open Microsoft.VisualStudio.FSharp.LanguageService type internal XmlDocCommandFilter ( diff --git a/vsintegration/src/FSharp.Editor/Common/AssemblyInfo.fs b/vsintegration/src/FSharp.Editor/Common/AssemblyInfo.fs index b876bf86820..89c8b09c241 100644 --- a/vsintegration/src/FSharp.Editor/Common/AssemblyInfo.fs +++ b/vsintegration/src/FSharp.Editor/Common/AssemblyInfo.fs @@ -6,7 +6,6 @@ open Microsoft.VisualStudio.Shell [] [] -[] do() diff --git a/vsintegration/src/FSharp.Editor/Common/Constants.fs b/vsintegration/src/FSharp.Editor/Common/Constants.fs index be4f0b37ec8..f304a6484b1 100644 --- a/vsintegration/src/FSharp.Editor/Common/Constants.fs +++ b/vsintegration/src/FSharp.Editor/Common/Constants.fs @@ -3,9 +3,6 @@ namespace Microsoft.VisualStudio.FSharp.Editor open System -open System.Configuration -open System.Diagnostics -open Microsoft.CodeAnalysis.Classification [] module internal FSharpConstants = @@ -13,11 +10,19 @@ module internal FSharpConstants = [] /// "871D2A70-12A2-4e42-9440-425DD92A4116" let packageGuidString = "871D2A70-12A2-4e42-9440-425DD92A4116" + + [] + /// "871D2A70-12A2-4e42-9440-425DD92A4116" - FSharp Package + let fsiPackageGuidString = "871D2A70-12A2-4e42-9440-425DD92A4116" [] /// "BC6DD5A5-D4D6-4dab-A00D-A51242DBAF1B" let languageServiceGuidString = "BC6DD5A5-D4D6-4dab-A00D-A51242DBAF1B" - + + [] + /// "91a04a73-4f2c-4e7c-ad38-c1a68e7da05c" + let projectPackageGuidString = "91a04a73-4f2c-4e7c-ad38-c1a68e7da05c" + [] /// "F#" let FSharpLanguageName = "F#" @@ -45,7 +50,6 @@ module internal FSharpProviderConstants = /// "Session Capturing Quick Info Source Provider" let SessionCapturingProvider = "Session Capturing Quick Info Source Provider" - [] module internal Guids = @@ -64,9 +68,16 @@ module internal Guids = [] /// "9A66EB6A-DE52-4169-BC26-36FBD4312FD7" let codeFixesOptionPageIdString = "9A66EB6A-DE52-4169-BC26-36FBD4312FD7" + + [] + /// "00BE7FD9-8145-4A2E-A1BF-3BAF0F4F47DD" + let codeLensOptionPageIdString = "00BE7FD9-8145-4A2E-A1BF-3BAF0F4F47DD" [] /// "8FDA964A-263D-4B4E-9560-29897535217C" let languageServicePerformanceOptionPageIdString = "8FDA964A-263D-4B4E-9560-29897535217C" + [] + let advancedSettingsPageIdSring = "9007718C-357A-4327-A193-AB3EC38D7EE8" + let blueHighContrastThemeId = Guid "{ce94d289-8481-498b-8ca9-9b6191a315b9}" diff --git a/vsintegration/src/FSharp.Editor/Common/Error.fs b/vsintegration/src/FSharp.Editor/Common/Error.fs index 101baa10909..d6b6678f0de 100644 --- a/vsintegration/src/FSharp.Editor/Common/Error.fs +++ b/vsintegration/src/FSharp.Editor/Common/Error.fs @@ -8,7 +8,3 @@ type internal Assert() = /// Display a good exception for this error message and then rethrow. static member Exception(e:Exception) = System.Diagnostics.Debug.Assert(false, "Unexpected exception seen in language service", e.ToString()) - - - - diff --git a/vsintegration/src/FSharp.Editor/Common/Extensions.fs b/vsintegration/src/FSharp.Editor/Common/Extensions.fs index b01d0b0ffaf..d1de7e83508 100644 --- a/vsintegration/src/FSharp.Editor/Common/Extensions.fs +++ b/vsintegration/src/FSharp.Editor/Common/Extensions.fs @@ -6,6 +6,7 @@ module internal Microsoft.VisualStudio.FSharp.Editor.Extensions open System open System.IO open Microsoft.CodeAnalysis +open Microsoft.CodeAnalysis.Host open Microsoft.FSharp.Compiler.Ast open Microsoft.FSharp.Compiler.SourceCodeServices @@ -24,6 +25,20 @@ type System.IServiceProvider with member x.GetService<'T>() = x.GetService(typeof<'T>) :?> 'T member x.GetService<'S, 'T>() = x.GetService(typeof<'S>) :?> 'T +type ProjectId with + member this.ToFSharpProjectIdString() = + this.Id.ToString("D").ToLowerInvariant() + +type Document with + member this.TryGetLanguageService<'T when 'T :> ILanguageService>() = + match this.Project with + | null -> None + | project -> + match project.LanguageServices with + | null -> None + | languageServices -> + languageServices.GetService<'T>() + |> Some type FSharpNavigationDeclarationItem with member x.RoslynGlyph : Glyph = @@ -147,10 +162,15 @@ module Option = else None +[] +module Seq = + open System.Collections.Immutable + + let toImmutableArray (xs: seq<'a>) : ImmutableArray<'a> = xs.ToImmutableArray() [] -module List = - let foldi (folder : 'State -> int -> 'T -> 'State) (state : 'State) (xs : 'T list) = +module Array = + let foldi (folder : 'State -> int -> 'T -> 'State) (state : 'State) (xs : 'T[]) = let mutable state = state let mutable i = 0 for x in xs do @@ -158,16 +178,6 @@ module List = i <- i + 1 state - -[] -module Seq = - open System.Collections.Immutable - - let toImmutableArray (xs: seq<'a>) : ImmutableArray<'a> = xs.ToImmutableArray() - - -[] -module Array = /// Optimized arrays equality. ~100x faster than `array1 = array2` on strings. /// ~2x faster for floats /// ~0.8x slower for ints @@ -178,12 +188,12 @@ module Array = | null, _ | _, null -> false | _ when xs.Length <> ys.Length -> false | _ -> - let mutable break' = false + let mutable stop = false let mutable i = 0 let mutable result = true - while i < xs.Length && not break' do + while i < xs.Length && not stop do if xs.[i] <> ys.[i] then - break' <- true + stop <- true result <- false i <- i + 1 result diff --git a/vsintegration/src/FSharp.Editor/Common/Logger.fs b/vsintegration/src/FSharp.Editor/Common/Logger.fs new file mode 100644 index 00000000000..03a507bf74a --- /dev/null +++ b/vsintegration/src/FSharp.Editor/Common/Logger.fs @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace Microsoft.VisualStudio.FSharp.Editor + +open System +open System.Diagnostics.Tracing + +type LogEditorFunctionId = + | Classification_Semantic = 1 + | Classification_Syntactic = 2 + | LanguageService_HandleCommandLineArgs = 3 + | LanguageService_UpdateProjectInfo = 4 + | Completion_ShouldTrigger = 5 + | Completion_ProvideCompletionsAsync = 6 + | Completion_GetDescriptionAsync = 7 + | Completion_GetChangeAsync = 9 + +/// This is for ETW tracing across FSharp.Editor. +[] +type FSharpEditorEventSource() = + inherit EventSource() + + static let instance = new FSharpEditorEventSource() + static member Instance = instance + + [] + member this.Log(functionId: LogEditorFunctionId) = + if this.IsEnabled() then + this.WriteEvent(1, int functionId) + + [] + member this.LogMessage(message: string, functionId: LogEditorFunctionId) = + if this.IsEnabled() then + this.WriteEvent(2, message, int functionId) + + [] + member this.BlockStart(functionId: LogEditorFunctionId) = + if this.IsEnabled() then + this.WriteEvent(3, int functionId) + + [] + member this.BlockStop(functionId: LogEditorFunctionId) = + if this.IsEnabled() then + this.WriteEvent(4, int functionId) + + [] + member this.BlockMessageStart(message: string, functionId: LogEditorFunctionId) = + if this.IsEnabled() then + this.WriteEvent(5, message, int functionId) + + [] + member this.BlockMessageStop(message: string, functionId: LogEditorFunctionId) = + if this.IsEnabled() then + this.WriteEvent(6, message, int functionId) + +[] +module Logger = + + let Log(functionId) = + FSharpEditorEventSource.Instance.Log(functionId) + + let LogMessage message functionId = + FSharpEditorEventSource.Instance.LogMessage(message, functionId) + + let LogBlockStart(functionId) = + FSharpEditorEventSource.Instance.BlockStart(functionId) + + let LogBlockStop(functionId) = + FSharpEditorEventSource.Instance.BlockStop(functionId) + + let LogBlockMessageStart message functionId = + FSharpEditorEventSource.Instance.BlockMessageStart(message, functionId) + + let LogBlockMessageStop message functionId = + FSharpEditorEventSource.Instance.BlockMessageStop(message, functionId) + + let LogBlock(functionId) = + FSharpEditorEventSource.Instance.BlockStart(functionId) + { new IDisposable with + member __.Dispose() = + FSharpEditorEventSource.Instance.BlockStop(functionId) } + + let LogBlockMessage message functionId = + FSharpEditorEventSource.Instance.BlockMessageStart(message, functionId) + { new IDisposable with + member __.Dispose() = + FSharpEditorEventSource.Instance.BlockMessageStop(message, functionId) } + \ No newline at end of file diff --git a/vsintegration/src/FSharp.Editor/Common/Logger.fsi b/vsintegration/src/FSharp.Editor/Common/Logger.fsi new file mode 100644 index 00000000000..b86ea148252 --- /dev/null +++ b/vsintegration/src/FSharp.Editor/Common/Logger.fsi @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace Microsoft.VisualStudio.FSharp.Editor + +open System + +// FIXME: We cannot make this internal yet until F# gets a compiler switch to make cases public when the type itself is internal. +// https://github.com/Microsoft/visualfsharp/issues/4821 +type (* internal *) LogEditorFunctionId = + | Classification_Semantic = 1 + | Classification_Syntactic = 2 + | LanguageService_HandleCommandLineArgs = 3 + | LanguageService_UpdateProjectInfo = 4 + | Completion_ShouldTrigger = 5 + | Completion_ProvideCompletionsAsync = 6 + | Completion_GetDescriptionAsync = 7 + | Completion_GetChangeAsync = 9 + +[] +module internal Logger = + + val Log : LogEditorFunctionId -> unit + + val LogMessage : message: string -> LogEditorFunctionId -> unit + + val LogBlockStart : LogEditorFunctionId -> unit + + val LogBlockStop : LogEditorFunctionId -> unit + + val LogBlockMessageStart : message: string -> LogEditorFunctionId -> unit + + val LogBlockMessageStop : message: string -> LogEditorFunctionId -> unit + + val LogBlock : LogEditorFunctionId -> IDisposable + + val LogBlockMessage : message: string -> LogEditorFunctionId -> IDisposable diff --git a/vsintegration/src/FSharp.Editor/Common/Pervasive.fs b/vsintegration/src/FSharp.Editor/Common/Pervasive.fs index 046e9231cd0..976dbf67f8d 100644 --- a/vsintegration/src/FSharp.Editor/Common/Pervasive.fs +++ b/vsintegration/src/FSharp.Editor/Common/Pervasive.fs @@ -6,6 +6,7 @@ open System.IO open System.Threading.Tasks open System.Diagnostics +type IOleServiceProvider = Microsoft.VisualStudio.OLE.Interop.IServiceProvider /// Checks if the filePath ends with ".fsi" let isSignatureFile (filePath:string) = @@ -143,9 +144,11 @@ type AsyncMaybeBuilder () = } [] - member __.Using (resource : ('T :> IDisposable), body : _ -> Async<_ option>) : Async<_ option> = - try body resource - finally if not (isNull resource) then resource.Dispose () + member __.Using (resource : ('T :> IDisposable), body : 'T -> Async<'U option>) : Async<'U option> = + async { + use resource = resource + return! body resource + } [] member x.While (guard, body : Async<_ option>) : Async<_ option> = @@ -155,7 +158,7 @@ type AsyncMaybeBuilder () = x.Zero () [] - member x.For (sequence : seq<_>, body : 'T -> Async) : Async<_ option> = + member x.For (sequence : seq<_>, body : 'T -> Async) : Async = x.Using (sequence.GetEnumerator (), fun enum -> x.While (enum.MoveNext, x.Delay (fun () -> body enum.Current))) diff --git a/vsintegration/src/FSharp.Editor/Common/RoslynHelpers.fs b/vsintegration/src/FSharp.Editor/Common/RoslynHelpers.fs index feb1e89e57a..a3d499da0c8 100644 --- a/vsintegration/src/FSharp.Editor/Common/RoslynHelpers.fs +++ b/vsintegration/src/FSharp.Editor/Common/RoslynHelpers.fs @@ -14,7 +14,7 @@ open Microsoft.FSharp.Compiler open Microsoft.FSharp.Compiler.Layout open Microsoft.FSharp.Compiler.SourceCodeServices open Microsoft.FSharp.Compiler.Range -open Microsoft.VisualStudio.FSharp.LanguageService +open Microsoft.VisualStudio.FSharp.Editor.Logging [] module internal RoslynHelpers = @@ -160,6 +160,16 @@ module internal RoslynHelpers = let textSpan = sourceText.Lines.GetTextSpan linePositionSpan Location.Create(filePath, textSpan, linePositionSpan) + let StartAsyncSafe cancellationToken context computation = + let computation = + async { + try + return! computation + with e -> + logExceptionWithContext(e, context) + return Unchecked.defaultof<_> + } + Async.Start (computation, cancellationToken) module internal OpenDeclarationHelper = /// @@ -172,9 +182,15 @@ module internal OpenDeclarationHelper = let mutable minPos = None let insert line lineStr (sourceText: SourceText) : SourceText = - let pos = sourceText.Lines.[line].Start + let ln = sourceText.Lines.[line] + let pos = ln.Start minPos <- match minPos with None -> Some pos | Some oldPos -> Some (min oldPos pos) - sourceText.WithChanges(TextChange(TextSpan(pos, 0), lineStr + Environment.NewLine)) + + // find the line break characters on the previous line to use, Environment.NewLine should not be used + // as it makes assumptions on the line endings in the source. + let lineBreak = ln.Text.ToString(TextSpan(ln.End, ln.EndIncludingLineBreak - ln.End)) + + sourceText.WithChanges(TextChange(TextSpan(pos, 0), lineStr + lineBreak)) let getLineStr line = sourceText.Lines.[line].ToString().Trim() let pos = ParsedInput.adjustInsertionPoint getLineStr ctx diff --git a/vsintegration/src/FSharp.Editor/Common/Vs.fs b/vsintegration/src/FSharp.Editor/Common/Vs.fs index 33fd16e6930..ee17ab8b381 100644 --- a/vsintegration/src/FSharp.Editor/Common/Vs.fs +++ b/vsintegration/src/FSharp.Editor/Common/Vs.fs @@ -3,16 +3,84 @@ namespace Microsoft.VisualStudio.FSharp.Editor open System +open System.Runtime.InteropServices open Microsoft.VisualStudio +open Microsoft.VisualStudio.Editor open Microsoft.VisualStudio.Shell.Interop open Microsoft.VisualStudio.TextManager.Interop /// Helper methods for interoperating with COM -module internal Com = +module internal Com = + let ThrowOnFailure0(hr) = + ErrorHandler.ThrowOnFailure(hr) |> ignore + + let ThrowOnFailure1(hr,res) = + ErrorHandler.ThrowOnFailure(hr) |> ignore; + res + + let ThrowOnFailure2(hr,res1,res2) = + ErrorHandler.ThrowOnFailure(hr) |> ignore; + res1,res2 + + let ThrowOnFailure3(hr,res1,res2,res3) = + ErrorHandler.ThrowOnFailure(hr) |> ignore; + res1,res2,res3 + + let ThrowOnFailure4(hr,res1,res2,res3,res4) = + ErrorHandler.ThrowOnFailure(hr) |> ignore; + res1,res2,res3,res4 + let Succeeded hr = // REVIEW: Not the correct check for succeeded hr = VSConstants.S_OK +module internal VsUserData = + + let vsBufferMoniker = Guid("978A8E17-4DF8-432A-9623-D530A26452BC") + + // This is the file name of the buffer. + let GetBufferMonker(ud:IVsUserData) : string = + downcast Com.ThrowOnFailure1(ud.GetData(ref vsBufferMoniker)) + +module internal VsTextLines = + /// Get the length of the given line. + let LengthOfLine (buffer:IVsTextBuffer) (line:int) : int = + Com.ThrowOnFailure1(buffer.GetLengthOfLine(line)) + + /// Get the text for a particular line. + let LineText (buffer:IVsTextLines) line = + Com.ThrowOnFailure1(buffer.GetLineText(line, 0, line, LengthOfLine buffer line)) + + /// Get the color state + let TextColorState (buffer:IVsTextLines) : IVsTextColorState= unbox(box(buffer)) + + /// Get the filename of the given buffer (via IVsUserData). Not all buffers have a file. This will be an exception. + let GetFilename(buffer : IVsTextLines) = + let ud = (box buffer) :?> IVsUserData + VsUserData.GetBufferMonker(ud) + + /// Get the string contents of a given buffer (the current snapshot). + let GetFileContents(buffer: IVsTextBuffer, editorAdaptersFactoryService: IVsEditorAdaptersFactoryService) = + let dataBuffer = editorAdaptersFactoryService.GetDataBuffer(buffer) + dataBuffer.CurrentSnapshot.GetText() + +module internal VsRunningDocumentTable = + let FindDocumentWithoutLocking(rdt:IVsRunningDocumentTable, url:string) : (IVsHierarchy * IVsTextLines) option = + let (hr:int, hier:IVsHierarchy, _itemid:uint32, unkData:IntPtr, _cookie:uint32) = rdt.FindAndLockDocument(uint32 _VSRDTFLAGS.RDT_NoLock, url) + try + if Com.Succeeded(hr) then + let bufferObject = + if unkData=IntPtr.Zero then null + else Marshal.GetObjectForIUnknown(unkData) + let buffer = + match bufferObject with + | :? IVsTextLines as tl -> tl + | _ -> null + Some(hier, buffer) + else None + finally + if IntPtr.Zero <> unkData then Marshal.Release(unkData)|>ignore + [] module internal ServiceProviderExtensions = type internal System.IServiceProvider with @@ -20,5 +88,4 @@ module internal ServiceProviderExtensions = member sp.TextManager = sp.GetService() member sp.RunningDocumentTable = sp.GetService() - member sp.XmlService = sp.GetService() - member sp.DTE = sp.GetService() + member sp.XMLMemberIndexService = sp.GetService() diff --git a/vsintegration/src/FSharp.Editor/Completion/CompletionProvider.fs b/vsintegration/src/FSharp.Editor/Completion/CompletionProvider.fs index 7825ccc1bda..fec42d030f7 100644 --- a/vsintegration/src/FSharp.Editor/Completion/CompletionProvider.fs +++ b/vsintegration/src/FSharp.Editor/Completion/CompletionProvider.fs @@ -14,13 +14,16 @@ open Microsoft.CodeAnalysis.Completion open Microsoft.CodeAnalysis.Options open Microsoft.CodeAnalysis.Text -open Microsoft.VisualStudio.FSharp.LanguageService open Microsoft.VisualStudio.Shell open Microsoft.VisualStudio.Shell.Interop open Microsoft.FSharp.Compiler open Microsoft.FSharp.Compiler.Range open Microsoft.FSharp.Compiler.SourceCodeServices +open System.Runtime.Caching +open System.Collections.Concurrent + +module Logger = Microsoft.VisualStudio.FSharp.Editor.Logger type internal FSharpCompletionProvider ( @@ -34,12 +37,15 @@ type internal FSharpCompletionProvider inherit CompletionProvider() static let userOpName = "CompletionProvider" - static let declarationItemsCache = ConditionalWeakTable() + // Save the backing data in a cache, we need to save for at least the length of the completion session + // See https://github.com/Microsoft/visualfsharp/issues/4714 + static let mutable declarationItems: FSharpDeclarationListItem[] = [||] static let [] NameInCodePropName = "NameInCode" static let [] FullNamePropName = "FullName" static let [] IsExtensionMemberPropName = "IsExtensionMember" static let [] NamespaceToOpenPropName = "NamespaceToOpen" static let [] IsKeywordPropName = "IsKeyword" + static let [] IndexPropName = "Index" static let keywordCompletionItems = Lexhelp.Keywords.keywordsWithDescription @@ -51,9 +57,10 @@ type internal FSharpCompletionProvider .AddProperty(IsKeywordPropName, "")) let checker = checkerProvider.Checker + + let settings: EditorOptions = workspace.Services.GetService() - let xmlMemberIndexService = serviceProvider.GetService(typeof) :?> IVsXMLMemberIndexService - let documentationBuilder = XmlDocumentation.CreateDocumentationBuilder(xmlMemberIndexService, serviceProvider.DTE) + let documentationBuilder = XmlDocumentation.CreateDocumentationBuilder(serviceProvider.XMLMemberIndexService) static let noCommitOnSpaceRules = // These are important. They make sure we don't _commit_ autocompletion when people don't expect them to. Some examples: @@ -72,11 +79,11 @@ type internal FSharpCompletionProvider CompletionItemRules.Default.WithCommitCharacterRule(CharacterSetModificationRule.Create(CharacterSetModificationKind.Remove, noCommitChars)) - static let getRules() = if Settings.IntelliSense.ShowAfterCharIsTyped then noCommitOnSpaceRules else CompletionItemRules.Default + static let getRules showAfterCharIsTyped = if showAfterCharIsTyped then noCommitOnSpaceRules else CompletionItemRules.Default static let mruItems = Dictionary<(* Item.FullName *) string, (* hints *) int>() - static member ShouldTriggerCompletionAux(sourceText: SourceText, caretPosition: int, trigger: CompletionTriggerKind, getInfo: (unit -> DocumentId * string * string list)) = + static member ShouldTriggerCompletionAux(sourceText: SourceText, caretPosition: int, trigger: CompletionTriggerKind, getInfo: (unit -> DocumentId * string * string list), intelliSenseOptions: IntelliSenseOptions) = // Skip if we are at the start of a document if caretPosition = 0 then false // Skip if it was triggered by an operation other than insertion @@ -84,26 +91,21 @@ type internal FSharpCompletionProvider // Skip if we are not on a completion trigger else let triggerPosition = caretPosition - 1 - let c = sourceText.[triggerPosition] - + let triggerChar = sourceText.[triggerPosition] + // do not trigger completion if it's not single dot, i.e. range expression - if not Settings.IntelliSense.ShowAfterCharIsTyped && sourceText.[triggerPosition - 1] = '.' then + if not intelliSenseOptions.ShowAfterCharIsTyped && triggerPosition > 0 && sourceText.[triggerPosition - 1] = '.' then false - - // Trigger completion if we are on a valid classification type else let documentId, filePath, defines = getInfo() CompletionUtils.shouldProvideCompletion(documentId, filePath, defines, sourceText, triggerPosition) && - (c = '.' || (Settings.IntelliSense.ShowAfterCharIsTyped && CompletionUtils.isStartingNewWord(sourceText, triggerPosition))) + (triggerChar = '.' || (intelliSenseOptions.ShowAfterCharIsTyped && CompletionUtils.isStartingNewWord(sourceText, triggerPosition))) + static member ProvideCompletionsAsyncAux(checker: FSharpChecker, sourceText: SourceText, caretPosition: int, options: FSharpProjectOptions, filePath: string, - textVersionHash: int, getAllSymbols: unit -> AssemblySymbol list) = + textVersionHash: int, getAllSymbols: FSharpCheckFileResults -> AssemblySymbol list, languageServicePerformanceOptions: LanguageServicePerformanceOptions, intellisenseOptions: IntelliSenseOptions) = asyncMaybe { - let! parseResults, _, checkFileResults = checker.ParseAndCheckDocument(filePath, textVersionHash, sourceText.ToString(), options, allowStaleResults = true, userOpName = userOpName) - - //#if DEBUG - //Logging.Logging.logInfof "AST:\n%+A" parsedInput - //#endif + let! parseResults, _, checkFileResults = checker.ParseAndCheckDocument(filePath, textVersionHash, sourceText.ToString(), options, languageServicePerformanceOptions, userOpName = userOpName) let textLines = sourceText.Lines let caretLinePos = textLines.GetLinePosition(caretPosition) @@ -112,47 +114,39 @@ type internal FSharpCompletionProvider let caretLineColumn = caretLinePos.Character let partialName = QuickParse.GetPartialLongNameEx(caretLine.ToString(), caretLineColumn - 1) - let getAllSymbols() = - getAllSymbols() - |> List.filter (fun entity -> entity.FullName.Contains "." && not (PrettyNaming.IsOperatorName entity.Symbol.DisplayName)) + let getAllSymbols() = + getAllSymbols checkFileResults + |> List.filter (fun assemblySymbol -> + assemblySymbol.FullName.Contains "." && not (PrettyNaming.IsOperatorName assemblySymbol.Symbol.DisplayName)) let! declarations = checkFileResults.GetDeclarationListInfo(Some(parseResults), fcsCaretLineNumber, caretLine.ToString(), partialName, getAllSymbols, userOpName=userOpName) |> liftAsync let results = List() - let getKindPriority = function - | CompletionItemKind.Property -> 0 - | CompletionItemKind.Field -> 1 - | CompletionItemKind.Method (isExtension = false) -> 2 - | CompletionItemKind.Event -> 3 - | CompletionItemKind.Argument -> 4 - | CompletionItemKind.Other -> 5 - | CompletionItemKind.Method (isExtension = true) -> 6 - - let sortedDeclItems = + declarationItems <- declarations.Items |> Array.sortWith (fun x y -> let mutable n = (not x.IsResolved).CompareTo(not y.IsResolved) if n <> 0 then n else - n <- (getKindPriority x.Kind).CompareTo(getKindPriority y.Kind) + n <- (CompletionUtils.getKindPriority x.Kind).CompareTo(CompletionUtils.getKindPriority y.Kind) if n <> 0 then n else n <- (not x.IsOwnMember).CompareTo(not y.IsOwnMember) if n <> 0 then n else - n <- StringComparer.OrdinalIgnoreCase.Compare(x.Name, y.Name) + n <- String.Compare(x.Name, y.Name, StringComparison.OrdinalIgnoreCase) if n <> 0 then n else x.MinorPriority.CompareTo(y.MinorPriority)) let maxHints = if mruItems.Values.Count = 0 then 0 else Seq.max mruItems.Values - sortedDeclItems |> Array.iteri (fun number declItem -> - let glyph = Tokenizer.FSharpGlyphToRoslynGlyph (declItem.Glyph, declItem.Accessibility) + declarationItems |> Array.iteri (fun number declarationItem -> + let glyph = Tokenizer.FSharpGlyphToRoslynGlyph (declarationItem.Glyph, declarationItem.Accessibility) let name = - match declItem.NamespaceToOpen with - | Some namespaceToOpen -> sprintf "%s (open %s)" declItem.Name namespaceToOpen - | _ -> declItem.Name + match declarationItem.NamespaceToOpen with + | Some namespaceToOpen -> sprintf "%s (open %s)" declarationItem.Name namespaceToOpen + | _ -> declarationItem.Name let filterText = - match declItem.NamespaceToOpen, declItem.Name.Split '.' with + match declarationItem.NamespaceToOpen, declarationItem.Name.Split '.' with // There is no namespace to open and the item name does not contain dots, so we don't need to pass special FilterText to Roslyn. | None, [|_|] -> null // Either we have a namespace to open ("DateTime (open System)") or item name contains dots ("Array.map"), or both. @@ -160,45 +154,45 @@ type internal FSharpCompletionProvider | _, idents -> Array.last idents let completionItem = - CommonCompletionItem.Create(name, glyph = Nullable glyph, rules = getRules(), filterText = filterText) - .AddProperty(FullNamePropName, declItem.FullName) + CommonCompletionItem.Create(name, glyph = Nullable glyph, rules = getRules intellisenseOptions.ShowAfterCharIsTyped, filterText = filterText) + .AddProperty(FullNamePropName, declarationItem.FullName) let completionItem = - match declItem.Kind with + match declarationItem.Kind with | CompletionItemKind.Method (isExtension = true) -> - completionItem.AddProperty(IsExtensionMemberPropName, "") + completionItem.AddProperty(IsExtensionMemberPropName, "") | _ -> completionItem let completionItem = - if name <> declItem.NameInCode then - completionItem.AddProperty(NameInCodePropName, declItem.NameInCode) + if name <> declarationItem.NameInCode then + completionItem.AddProperty(NameInCodePropName, declarationItem.NameInCode) else completionItem let completionItem = - match declItem.NamespaceToOpen with + match declarationItem.NamespaceToOpen with | Some ns -> completionItem.AddProperty(NamespaceToOpenPropName, ns) | None -> completionItem + let completionItem = completionItem.AddProperty(IndexPropName, string number) + let priority = - match mruItems.TryGetValue declItem.FullName with + match mruItems.TryGetValue declarationItem.FullName with | true, hints -> maxHints - hints | _ -> number + maxHints + 1 - let sortText = sprintf "%06d" priority - - //#if DEBUG - //Logging.Logging.logInfof "***** %s => %s" name sortText - //#endif - + let sortText = priority.ToString("D6") let completionItem = completionItem.WithSortText(sortText) - - declarationItemsCache.Remove(completionItem.DisplayText) |> ignore // clear out stale entries if they exist - declarationItemsCache.Add(completionItem.DisplayText, declItem) results.Add(completionItem)) if results.Count > 0 && not declarations.IsForType && not declarations.IsError && List.isEmpty partialName.QualifyingIdents then let lineStr = textLines.[caretLinePos.Line].ToString() - match UntypedParseImpl.TryGetCompletionContext(Pos.fromZ caretLinePos.Line caretLinePos.Character, Some parseResults, lineStr) with + + let completionContext = + parseResults.ParseTree + |> Option.bind (fun parseTree -> + UntypedParseImpl.TryGetCompletionContext(Pos.fromZ caretLinePos.Line caretLinePos.Character, parseTree, lineStr)) + + match completionContext with | None -> results.AddRange(keywordCompletionItems) | _ -> () @@ -206,49 +200,61 @@ type internal FSharpCompletionProvider } override this.ShouldTriggerCompletion(sourceText: SourceText, caretPosition: int, trigger: CompletionTrigger, _: OptionSet) = + use _logBlock = Logger.LogBlockMessage this.Name LogEditorFunctionId.Completion_ShouldTrigger + let getInfo() = let documentId = workspace.GetDocumentIdInCurrentContext(sourceText.Container) let document = workspace.CurrentSolution.GetDocument(documentId) let defines = projectInfoManager.GetCompilationDefinesForEditingDocument(document) (documentId, document.FilePath, defines) - FSharpCompletionProvider.ShouldTriggerCompletionAux(sourceText, caretPosition, trigger.Kind, getInfo) - + FSharpCompletionProvider.ShouldTriggerCompletionAux(sourceText, caretPosition, trigger.Kind, getInfo, settings.IntelliSense) + override this.ProvideCompletionsAsync(context: Completion.CompletionContext) = asyncMaybe { + use _logBlock = Logger.LogBlockMessage context.Document.Name LogEditorFunctionId.Completion_ProvideCompletionsAsync + let document = context.Document let! sourceText = context.Document.GetTextAsync(context.CancellationToken) let defines = projectInfoManager.GetCompilationDefinesForEditingDocument(document) do! Option.guard (CompletionUtils.shouldProvideCompletion(document.Id, document.FilePath, defines, sourceText, context.Position)) let! _parsingOptions, projectOptions = projectInfoManager.TryGetOptionsForEditingDocumentOrProject(document) let! textVersion = context.Document.GetTextVersionAsync(context.CancellationToken) - let! _, _, fileCheckResults = checker.ParseAndCheckDocument(document, projectOptions, true, userOpName=userOpName) - let getAllSymbols() = - if Settings.IntelliSense.ShowAllSymbols + let getAllSymbols(fileCheckResults: FSharpCheckFileResults) = + if settings.IntelliSense.IncludeSymbolsFromUnopenedNamespacesOrModules then assemblyContentProvider.GetAllEntitiesInProjectAndReferencedAssemblies(fileCheckResults) else [] let! results = - FSharpCompletionProvider.ProvideCompletionsAsyncAux(checker, sourceText, context.Position, projectOptions, - document.FilePath, textVersion.GetHashCode(), getAllSymbols) + FSharpCompletionProvider.ProvideCompletionsAsyncAux(checker, sourceText, context.Position, projectOptions, document.FilePath, + textVersion.GetHashCode(), getAllSymbols, settings.LanguageServicePerformance, settings.IntelliSense) + context.AddItems(results) } |> Async.Ignore |> RoslynHelpers.StartAsyncUnitAsTask context.CancellationToken - override this.GetDescriptionAsync(_: Document, completionItem: Completion.CompletionItem, cancellationToken: CancellationToken): Task = + override this.GetDescriptionAsync(document: Document, completionItem: Completion.CompletionItem, cancellationToken: CancellationToken): Task = async { - let exists, declarationItem = declarationItemsCache.TryGetValue(completionItem.DisplayText) - if exists then - let! description = declarationItem.StructuredDescriptionTextAsync - let documentation = List() - let collector = RoslynHelpers.CollectTaggedText documentation - // mix main description and xmldoc by using one collector - XmlDocumentation.BuildDataTipText(documentationBuilder, collector, collector, collector, collector, collector, description) - return CompletionDescription.Create(documentation.ToImmutableArray()) - else + use _logBlock = Logger.LogBlockMessage document.Name LogEditorFunctionId.Completion_GetDescriptionAsync + match completionItem.Properties.TryGetValue IndexPropName with + | true, completionItemIndexStr -> + let completionItemIndex = int completionItemIndexStr + if completionItemIndex < declarationItems.Length then + let declarationItem = declarationItems.[completionItemIndex] + let! description = declarationItem.StructuredDescriptionTextAsync + let documentation = List() + let collector = RoslynHelpers.CollectTaggedText documentation + // mix main description and xmldoc by using one collector + XmlDocumentation.BuildDataTipText(documentationBuilder, collector, collector, collector, collector, collector, description) + return CompletionDescription.Create(documentation.ToImmutableArray()) + else + return CompletionDescription.Empty + | _ -> return CompletionDescription.Empty } |> RoslynHelpers.StartAsyncAsTask cancellationToken override this.GetChangeAsync(document, item, _, cancellationToken) : Task = async { + use _logBlock = Logger.LogBlockMessage document.Name LogEditorFunctionId.Completion_GetChangeAsync + let fullName = match item.Properties.TryGetValue FullNamePropName with | true, x -> Some x @@ -283,10 +289,10 @@ type internal FSharpCompletionProvider let fullNameIdents = fullName |> Option.map (fun x -> x.Split '.') |> Option.defaultValue [||] let insertionPoint = - if Settings.CodeFixes.AlwaysPlaceOpensAtTopLevel then OpenStatementInsertionPoint.TopLevel + if settings.CodeFixes.AlwaysPlaceOpensAtTopLevel then OpenStatementInsertionPoint.TopLevel else OpenStatementInsertionPoint.Nearest - let! ctx = ParsedInput.tryFindNearestPointToInsertOpenDeclaration line.LineNumber parsedInput fullNameIdents insertionPoint + let ctx = ParsedInput.findNearestPointToInsertOpenDeclaration line.LineNumber parsedInput fullNameIdents insertionPoint let finalSourceText, changedSpanStartPos = OpenDeclarationHelper.insertOpenDeclaration textWithItemCommitted ctx ns let fullChangingSpan = TextSpan.FromBounds(changedSpanStartPos, item.Span.End) let changedSpan = TextSpan.FromBounds(changedSpanStartPos, item.Span.End + (finalSourceText.Length - sourceText.Length)) @@ -295,4 +301,4 @@ type internal FSharpCompletionProvider } |> Async.map (Option.defaultValue (CompletionChange.Create(TextChange(item.Span, nameInCode)))) - } |> RoslynHelpers.StartAsyncAsTask cancellationToken + } |> RoslynHelpers.StartAsyncAsTask cancellationToken \ No newline at end of file diff --git a/vsintegration/src/FSharp.Editor/Completion/CompletionService.fs b/vsintegration/src/FSharp.Editor/Completion/CompletionService.fs index ab9585c5184..ef138b72c7d 100644 --- a/vsintegration/src/FSharp.Editor/Completion/CompletionService.fs +++ b/vsintegration/src/FSharp.Editor/Completion/CompletionService.fs @@ -18,7 +18,8 @@ type internal FSharpCompletionService serviceProvider: SVsServiceProvider, checkerProvider: FSharpCheckerProvider, projectInfoManager: FSharpProjectOptionsManager, - assemblyContentProvider: AssemblyContentProvider + assemblyContentProvider: AssemblyContentProvider, + settings: EditorOptions ) = inherit CompletionServiceWithProviders(workspace) @@ -30,15 +31,19 @@ type internal FSharpCompletionService Completion.Create("""\s*#r\s+(@?"*(?"[^"]*"?))""", [".dll"; ".exe"], useIncludeDirectives = true) Completion.Create("""\s*#I\s+(@?"*(?"[^"]*"?))""", ["\x00"], useIncludeDirectives = false) ])) - let completionRules = + override this.Language = FSharpConstants.FSharpLanguageName + override this.GetBuiltInProviders() = builtInProviders + override this.GetRules() = + let enterKeyRule = + match settings.IntelliSense.EnterKeySetting with + | NeverNewline -> EnterKeyRule.Never + | NewlineOnCompleteWord -> EnterKeyRule.AfterFullyTypedWord + | AlwaysNewline -> EnterKeyRule.Always + CompletionRules.Default .WithDismissIfEmpty(true) .WithDismissIfLastCharacterDeleted(true) - .WithDefaultEnterKeyRule(EnterKeyRule.Never) - - override this.Language = FSharpConstants.FSharpLanguageName - override this.GetBuiltInProviders() = builtInProviders - override this.GetRules() = completionRules + .WithDefaultEnterKeyRule(enterKeyRule) [] [, FSharpConstants.FSharpLanguageName)>] @@ -48,10 +53,11 @@ type internal FSharpCompletionServiceFactory serviceProvider: SVsServiceProvider, checkerProvider: FSharpCheckerProvider, projectInfoManager: FSharpProjectOptionsManager, - assemblyContentProvider: AssemblyContentProvider + assemblyContentProvider: AssemblyContentProvider, + settings: EditorOptions ) = interface ILanguageServiceFactory with member this.CreateLanguageService(hostLanguageServices: HostLanguageServices) : ILanguageService = - upcast new FSharpCompletionService(hostLanguageServices.WorkspaceServices.Workspace, serviceProvider, checkerProvider, projectInfoManager, assemblyContentProvider) + upcast new FSharpCompletionService(hostLanguageServices.WorkspaceServices.Workspace, serviceProvider, checkerProvider, projectInfoManager, assemblyContentProvider, settings) diff --git a/vsintegration/src/FSharp.Editor/Completion/CompletionUtils.fs b/vsintegration/src/FSharp.Editor/Completion/CompletionUtils.fs index a8fe56dbdb3..705128a3e19 100644 --- a/vsintegration/src/FSharp.Editor/Completion/CompletionUtils.fs +++ b/vsintegration/src/FSharp.Editor/Completion/CompletionUtils.fs @@ -9,6 +9,7 @@ open Microsoft.CodeAnalysis.Classification open Microsoft.CodeAnalysis.Text open Microsoft.CodeAnalysis.Completion open System.Globalization +open Microsoft.FSharp.Compiler.SourceCodeServices module internal CompletionUtils = @@ -82,18 +83,30 @@ module internal CompletionUtils = let isStartingNewWord (sourceText, position) = CommonCompletionUtilities.IsStartingNewWord(sourceText, position, (fun ch -> isIdentifierStartCharacter ch), (fun ch -> isIdentifierPartCharacter ch)) - let shouldProvideCompletion (documentId: DocumentId, filePath: string, defines: string list, text: SourceText, position: int) : bool = - let textLines = text.Lines - let triggerLine = textLines.GetLineFromPosition position - let colorizationData = Tokenizer.getColorizationData(documentId, text, triggerLine.Span, Some filePath, defines, CancellationToken.None) - colorizationData.Count = 0 || // we should provide completion at the start of empty line, where there are no tokens at all - colorizationData.Exists (fun classifiedSpan -> - classifiedSpan.TextSpan.IntersectsWith position && + let shouldProvideCompletion (documentId: DocumentId, filePath: string, defines: string list, sourceText: SourceText, triggerPosition: int) : bool = + let textLines = sourceText.Lines + let triggerLine = textLines.GetLineFromPosition triggerPosition + let classifiedSpans = Tokenizer.getClassifiedSpans(documentId, sourceText, triggerLine.Span, Some filePath, defines, CancellationToken.None) + classifiedSpans.Count = 0 || // we should provide completion at the start of empty line, where there are no tokens at all + classifiedSpans.Exists (fun classifiedSpan -> + classifiedSpan.TextSpan.IntersectsWith triggerPosition && ( match classifiedSpan.ClassificationType with | ClassificationTypeNames.Comment | ClassificationTypeNames.StringLiteral | ClassificationTypeNames.ExcludedCode + | ClassificationTypeNames.Operator | ClassificationTypeNames.NumericLiteral -> false | _ -> true // anything else is a valid classification type - )) \ No newline at end of file + )) + + let inline getKindPriority kind = + match kind with + | CompletionItemKind.CustomOperation -> 0 + | CompletionItemKind.Property -> 1 + | CompletionItemKind.Field -> 2 + | CompletionItemKind.Method (isExtension = false) -> 3 + | CompletionItemKind.Event -> 4 + | CompletionItemKind.Argument -> 5 + | CompletionItemKind.Other -> 6 + | CompletionItemKind.Method (isExtension = true) -> 7 \ No newline at end of file diff --git a/vsintegration/src/FSharp.Editor/Completion/FileSystemCompletion.fs b/vsintegration/src/FSharp.Editor/Completion/FileSystemCompletion.fs index f8a66615f20..c3dba0e5c8f 100644 --- a/vsintegration/src/FSharp.Editor/Completion/FileSystemCompletion.fs +++ b/vsintegration/src/FSharp.Editor/Completion/FileSystemCompletion.fs @@ -45,16 +45,16 @@ type internal HashDirectiveCompletionProvider(workspace: Workspace, projectInfoM let includeDirectiveCleanRegex = Regex("""#I\s+(@?"*(?[^"]*)"?)""", RegexOptions.Compiled ||| RegexOptions.ExplicitCapture) - let getColorizationData(text: SourceText, position: int) : ResizeArray = + let getClassifiedSpans(text: SourceText, position: int) : ResizeArray = let documentId = workspace.GetDocumentIdInCurrentContext(text.Container) let document = workspace.CurrentSolution.GetDocument(documentId) let defines = projectInfoManager.GetCompilationDefinesForEditingDocument(document) let textLines = text.Lines let triggerLine = textLines.GetLineFromPosition(position) - Tokenizer.getColorizationData(documentId, text, triggerLine.Span, Some document.FilePath, defines, CancellationToken.None) + Tokenizer.getClassifiedSpans(documentId, text, triggerLine.Span, Some document.FilePath, defines, CancellationToken.None) let isInStringLiteral(text: SourceText, position: int) : bool = - getColorizationData(text, position) + getClassifiedSpans(text, position) |> Seq.exists(fun classifiedSpan -> classifiedSpan.TextSpan.IntersectsWith position && classifiedSpan.ClassificationType = ClassificationTypeNames.StringLiteral) @@ -71,7 +71,7 @@ type internal HashDirectiveCompletionProvider(workspace: Workspace, projectInfoM else match includeDirectiveCleanRegex.Match lineStr with | m when m.Success -> - getColorizationData(text, line.Start) + getClassifiedSpans(text, line.Start) |> Seq.tryPick (fun span -> if span.TextSpan.IntersectsWith line.Start && (span.ClassificationType <> ClassificationTypeNames.Comment && diff --git a/vsintegration/src/FSharp.Editor/Completion/SignatureHelp.fs b/vsintegration/src/FSharp.Editor/Completion/SignatureHelp.fs index 852fa7bfd56..e60da6de129 100644 --- a/vsintegration/src/FSharp.Editor/Completion/SignatureHelp.fs +++ b/vsintegration/src/FSharp.Editor/Completion/SignatureHelp.fs @@ -29,8 +29,7 @@ type internal FSharpSignatureHelpProvider ) = static let userOpName = "SignatureHelpProvider" - let xmlMemberIndexService = serviceProvider.GetService(typeof) :?> IVsXMLMemberIndexService - let documentationBuilder = XmlDocumentation.CreateDocumentationBuilder(xmlMemberIndexService, serviceProvider.DTE) + let documentationBuilder = XmlDocumentation.CreateDocumentationBuilder(serviceProvider.XMLMemberIndexService) static let oneColAfter (lp: LinePosition) = LinePosition(lp.Line,lp.Character+1) static let oneColBefore (lp: LinePosition) = LinePosition(lp.Line,max 0 (lp.Character-1)) diff --git a/vsintegration/src/FSharp.Editor/Debugging/LanguageDebugInfoService.fs b/vsintegration/src/FSharp.Editor/Debugging/LanguageDebugInfoService.fs index 432b0431052..a6347732631 100644 --- a/vsintegration/src/FSharp.Editor/Debugging/LanguageDebugInfoService.fs +++ b/vsintegration/src/FSharp.Editor/Debugging/LanguageDebugInfoService.fs @@ -56,9 +56,9 @@ type internal FSharpLanguageDebugInfoService [](projectInf let! cancellationToken = Async.CancellationToken let! sourceText = document.GetTextAsync(cancellationToken) |> Async.AwaitTask let textSpan = TextSpan.FromBounds(0, sourceText.Length) - let tokens = Tokenizer.getColorizationData(document.Id, sourceText, textSpan, Some(document.Name), defines, cancellationToken) + let classifiedSpans = Tokenizer.getClassifiedSpans(document.Id, sourceText, textSpan, Some(document.Name), defines, cancellationToken) let result = - match FSharpLanguageDebugInfoService.GetDataTipInformation(sourceText, position, tokens) with + match FSharpLanguageDebugInfoService.GetDataTipInformation(sourceText, position, classifiedSpans) with | None -> DebugDataTipInfo() | Some textSpan -> DebugDataTipInfo(textSpan, sourceText.GetSubText(textSpan).ToString()) return result diff --git a/vsintegration/src/FSharp.Editor/Diagnostics/DocumentDiagnosticAnalyzer.fs b/vsintegration/src/FSharp.Editor/Diagnostics/DocumentDiagnosticAnalyzer.fs index 5b8b1744aeb..a9448760200 100644 --- a/vsintegration/src/FSharp.Editor/Diagnostics/DocumentDiagnosticAnalyzer.fs +++ b/vsintegration/src/FSharp.Editor/Diagnostics/DocumentDiagnosticAnalyzer.fs @@ -104,6 +104,8 @@ type internal FSharpDocumentDiagnosticAnalyzer() = return results } + override __.Priority = 10 // Default = 50 + override this.SupportedDiagnostics = RoslynHelpers.SupportedDiagnostics() override this.AnalyzeSyntaxAsync(document: Document, cancellationToken: CancellationToken): Task> = diff --git a/vsintegration/src/FSharp.Editor/Diagnostics/ProjectDiagnosticAnalyzer.fs b/vsintegration/src/FSharp.Editor/Diagnostics/ProjectDiagnosticAnalyzer.fs index cbf2f34fb8a..7861df8e562 100644 --- a/vsintegration/src/FSharp.Editor/Diagnostics/ProjectDiagnosticAnalyzer.fs +++ b/vsintegration/src/FSharp.Editor/Diagnostics/ProjectDiagnosticAnalyzer.fs @@ -19,8 +19,6 @@ open Microsoft.FSharp.Compiler open Microsoft.FSharp.Compiler.SourceCodeServices open Microsoft.FSharp.Compiler.Range -open Microsoft.VisualStudio.FSharp.LanguageService - #if PROJECT_ANALYSIS // Project-wide error analysis. We don't enable this because ParseAndCheckProject checks projects against the versions of the files // saves to the file system. This is different to the versions of the files active in the editor. This results in out-of-sync error diff --git a/vsintegration/src/FSharp.Editor/Diagnostics/SimplifyNameDiagnosticAnalyzer.fs b/vsintegration/src/FSharp.Editor/Diagnostics/SimplifyNameDiagnosticAnalyzer.fs index ace07bf57f2..7e3f8e39ce0 100644 --- a/vsintegration/src/FSharp.Editor/Diagnostics/SimplifyNameDiagnosticAnalyzer.fs +++ b/vsintegration/src/FSharp.Editor/Diagnostics/SimplifyNameDiagnosticAnalyzer.fs @@ -14,10 +14,10 @@ open Microsoft.CodeAnalysis.Diagnostics open Microsoft.FSharp.Compiler open Microsoft.FSharp.Compiler.Range open Microsoft.FSharp.Compiler.SourceCodeServices - -open Microsoft.VisualStudio.FSharp.LanguageService +open System.Runtime.Caching type private TextVersionHash = int +type private PerDocumentSavedData = { Hash: int; Diagnostics: ImmutableArray } [] type internal SimplifyNameDiagnosticAnalyzer() = @@ -27,7 +27,7 @@ type internal SimplifyNameDiagnosticAnalyzer() = let getProjectInfoManager (document: Document) = document.Project.Solution.Workspace.Services.GetService().FSharpProjectOptionsManager let getChecker (document: Document) = document.Project.Solution.Workspace.Services.GetService().Checker let getPlidLength (plid: string list) = (plid |> List.sumBy String.length) + plid.Length - static let cache = ConditionalWeakTable>() + static let cache = new MemoryCache("FSharp.Editor." + userOpName) // Make sure only one document is being analyzed at a time, to be nice static let guard = new SemaphoreSlim(1) @@ -42,13 +42,13 @@ type internal SimplifyNameDiagnosticAnalyzer() = customTags = DiagnosticCustomTags.Unnecessary) static member LongIdentPropertyKey = "FullName" - + override __.Priority = 100 // Default = 50 override __.SupportedDiagnostics = ImmutableArray.Create Descriptor override this.AnalyzeSyntaxAsync(_, _) = Task.FromResult ImmutableArray.Empty override this.AnalyzeSemanticsAsync(document: Document, cancellationToken: CancellationToken) = asyncMaybe { - do! Option.guard Settings.CodeFixes.SimplifyName + do! Option.guard document.FSharpOptions.CodeFixes.SimplifyName do Trace.TraceInformation("{0:n3} (start) SimplifyName", DateTime.Now.TimeOfDay.TotalSeconds) do! Async.Sleep DefaultTuning.SimplifyNameInitialDelay |> liftAsync let! _parsingOptions, projectOptions = getProjectInfoManager(document).TryGetOptionsForEditingDocumentOrProject(document) @@ -56,16 +56,18 @@ type internal SimplifyNameDiagnosticAnalyzer() = let textVersionHash = textVersion.GetHashCode() let! _ = guard.WaitAsync(cancellationToken) |> Async.AwaitTask |> liftAsync try - match cache.TryGetValue document.Id with - | true, (oldTextVersionHash, diagnostics) when oldTextVersionHash = textVersionHash -> return diagnostics + let key = document.Id.ToString() + match cache.Get(key) with + | :? PerDocumentSavedData as data when data.Hash = textVersionHash -> return data.Diagnostics | _ -> let! sourceText = document.GetTextAsync() let checker = getChecker document - let! _, _, checkResults = checker.ParseAndCheckDocument(document, projectOptions, sourceText = sourceText, allowStaleResults = true, userOpName=userOpName) + let! _, _, checkResults = checker.ParseAndCheckDocument(document, projectOptions, sourceText = sourceText, userOpName=userOpName) let! symbolUses = checkResults.GetAllUsesOfAllSymbolsInFile() |> liftAsync let mutable result = ResizeArray() let symbolUses = symbolUses + |> Array.filter (fun symbolUse -> not symbolUse.IsFromOpenStatement) |> Array.Parallel.map (fun symbolUse -> let lineStr = sourceText.Lines.[Line.toZ symbolUse.RangeAlternate.StartLine].ToString() // for `System.DateTime.Now` it returns ([|"System"; "DateTime"|], "Now") @@ -117,8 +119,11 @@ type internal SimplifyNameDiagnosticAnalyzer() = properties = (dict [SimplifyNameDiagnosticAnalyzer.LongIdentPropertyKey, relativeName]).ToImmutableDictionary())) let diagnostics = result.ToImmutableArray() - cache.Remove(document.Id) |> ignore - cache.Add(document.Id, (textVersionHash, diagnostics)) + cache.Remove(key) |> ignore + let data = { Hash = textVersionHash; Diagnostics=diagnostics } + let cacheItem = CacheItem(key, data) + let policy = CacheItemPolicy(SlidingExpiration=DefaultTuning.PerDocumentSavedDataSlidingWindow) + cache.Set(cacheItem, policy) return diagnostics finally guard.Release() |> ignore } diff --git a/vsintegration/src/FSharp.Editor/Diagnostics/UnusedDeclarationsAnalyzer.fs b/vsintegration/src/FSharp.Editor/Diagnostics/UnusedDeclarationsAnalyzer.fs index 071f0aadbe1..355cb0606e6 100644 --- a/vsintegration/src/FSharp.Editor/Diagnostics/UnusedDeclarationsAnalyzer.fs +++ b/vsintegration/src/FSharp.Editor/Diagnostics/UnusedDeclarationsAnalyzer.fs @@ -94,19 +94,23 @@ type internal UnusedDeclarationsAnalyzer() = //#endif unusedRanges + override __.Priority = 80 // Default = 50 + override __.SupportedDiagnostics = ImmutableArray.Create Descriptor override __.AnalyzeSyntaxAsync(_, _) = Task.FromResult ImmutableArray.Empty override __.AnalyzeSemanticsAsync(document, cancellationToken) = asyncMaybe { + do! Option.guard document.FSharpOptions.CodeFixes.UnusedDeclarations + do Trace.TraceInformation("{0:n3} (start) UnusedDeclarationsAnalyzer", DateTime.Now.TimeOfDay.TotalSeconds) do! Async.Sleep DefaultTuning.UnusedDeclarationsAnalyzerInitialDelay |> liftAsync // be less intrusive, give other work priority most of the time match getProjectInfoManager(document).TryGetOptionsForEditingDocumentOrProject(document) with | Some (_parsingOptions, projectOptions) -> let! sourceText = document.GetTextAsync() let checker = getChecker document - let! _, _, checkResults = checker.ParseAndCheckDocument(document, projectOptions, sourceText = sourceText, allowStaleResults = true, userOpName = userOpName) + let! _, _, checkResults = checker.ParseAndCheckDocument(document, projectOptions, sourceText = sourceText, userOpName = userOpName) let! allSymbolUsesInFile = checkResults.GetAllUsesOfAllSymbolsInFile() |> liftAsync let unusedRanges = getUnusedDeclarationRanges allSymbolUsesInFile (isScriptFile document.FilePath) return diff --git a/vsintegration/src/FSharp.Editor/Diagnostics/UnusedOpensDiagnosticAnalyzer.fs b/vsintegration/src/FSharp.Editor/Diagnostics/UnusedOpensDiagnosticAnalyzer.fs index 88568b4a2a2..f39b6bb3662 100644 --- a/vsintegration/src/FSharp.Editor/Diagnostics/UnusedOpensDiagnosticAnalyzer.fs +++ b/vsintegration/src/FSharp.Editor/Diagnostics/UnusedOpensDiagnosticAnalyzer.fs @@ -35,14 +35,15 @@ type internal UnusedOpensDiagnosticAnalyzer() = isEnabledByDefault = true, customTags = DiagnosticCustomTags.Unnecessary) + override __.Priority = 90 // Default = 50 override __.SupportedDiagnostics = ImmutableArray.Create Descriptor override this.AnalyzeSyntaxAsync(_, _) = Task.FromResult ImmutableArray.Empty static member GetUnusedOpenRanges(document: Document, options, checker: FSharpChecker) : Async> = asyncMaybe { - do! Option.guard Settings.CodeFixes.UnusedOpens + do! Option.guard document.FSharpOptions.CodeFixes.UnusedOpens let! sourceText = document.GetTextAsync() - let! _, _, checkResults = checker.ParseAndCheckDocument(document, options, sourceText = sourceText, allowStaleResults = true, userOpName = userOpName) + let! _, _, checkResults = checker.ParseAndCheckDocument(document, options, sourceText = sourceText, userOpName = userOpName) #if DEBUG let sw = Stopwatch.StartNew() #endif diff --git a/vsintegration/src/FSharp.Editor/DocComments/XMLDocumentation.fs b/vsintegration/src/FSharp.Editor/DocComments/XMLDocumentation.fs index db616ba5103..e3ccc17f674 100644 --- a/vsintegration/src/FSharp.Editor/DocComments/XMLDocumentation.fs +++ b/vsintegration/src/FSharp.Editor/DocComments/XMLDocumentation.fs @@ -3,10 +3,11 @@ namespace Microsoft.VisualStudio.FSharp.Editor open System +open System.Runtime.CompilerServices +open System.Runtime.Caching open System.Text.RegularExpressions open Internal.Utilities.Collections -open EnvDTE -open EnvDTE80 +open Microsoft.VisualStudio.Shell open Microsoft.VisualStudio.Shell.Interop open Microsoft.FSharp.Compiler.SourceCodeServices open Microsoft.FSharp.Compiler.Layout @@ -212,13 +213,11 @@ module internal XmlDocumentation = let vsToken = VsThreadToken() /// Provide Xml Documentation - type Provider(xmlIndexService:IVsXMLMemberIndexService, dte: DTE) = + type Provider(xmlIndexService:IVsXMLMemberIndexService) = /// Index of assembly name to xml member index. let mutable xmlCache = new AgedLookup(10,areSimilar=(fun (x,y) -> x = y)) - let events = dte.Events :?> Events2 - let solutionEvents = events.SolutionEvents - do solutionEvents.add_AfterClosing(fun () -> + do Events.SolutionEvents.OnAfterCloseSolution.Add (fun _ -> xmlCache.Clear(vsToken)) #if DEBUG // Keep under DEBUG so that it can keep building. @@ -237,7 +236,7 @@ module internal XmlDocumentation = collector.Add(tagText text) let _AppendRemarks (collector: ITaggedTextCollector) (memberData:IVsXMLMemberData3) = - let ok,remarksText = memberData.GetRemarksText() + let ok, remarksText = memberData.GetRemarksText() if Com.Succeeded(ok) then AppendOnNewLine collector remarksText #endif @@ -413,6 +412,6 @@ module internal XmlDocumentation = let BuildMethodParamText(documentationProvider, xmlCollector, xml, paramName) = AppendXmlComment(documentationProvider, TextSanitizingCollector(xmlCollector), TextSanitizingCollector(xmlCollector), xml, false, true, Some paramName) - let documentationBuilderCache = System.Runtime.CompilerServices.ConditionalWeakTable() - let CreateDocumentationBuilder(xmlIndexService: IVsXMLMemberIndexService, dte: DTE) = - documentationBuilderCache.GetValue(xmlIndexService,(fun _ -> Provider(xmlIndexService, dte) :> IDocumentationBuilder)) \ No newline at end of file + let documentationBuilderCache = ConditionalWeakTable() + let CreateDocumentationBuilder(xmlIndexService: IVsXMLMemberIndexService) = + documentationBuilderCache.GetValue(xmlIndexService,(fun _ -> Provider(xmlIndexService) :> IDocumentationBuilder)) \ No newline at end of file diff --git a/vsintegration/src/FSharp.Editor/DocumentHighlights/DocumentHighlightsService.fs b/vsintegration/src/FSharp.Editor/DocumentHighlights/DocumentHighlightsService.fs index 354c41759dd..1e53c218d9c 100644 --- a/vsintegration/src/FSharp.Editor/DocumentHighlights/DocumentHighlightsService.fs +++ b/vsintegration/src/FSharp.Editor/DocumentHighlights/DocumentHighlightsService.fs @@ -9,7 +9,6 @@ open System.Threading.Tasks open Microsoft.CodeAnalysis open Microsoft.CodeAnalysis.DocumentHighlighting -open Microsoft.CodeAnalysis.Editor open Microsoft.CodeAnalysis.Host.Mef open Microsoft.CodeAnalysis.Text @@ -54,13 +53,13 @@ type internal FSharpDocumentHighlightsService [] (checkerP |> Seq.toArray static member GetDocumentHighlights(checker: FSharpChecker, documentKey: DocumentId, sourceText: SourceText, filePath: string, position: int, - defines: string list, options: FSharpProjectOptions, textVersionHash: int) : Async = + defines: string list, options: FSharpProjectOptions, textVersionHash: int, languageServicePerformanceOptions: LanguageServicePerformanceOptions) : Async = asyncMaybe { let textLine = sourceText.Lines.GetLineFromPosition(position) let textLinePos = sourceText.Lines.GetLinePosition(position) let fcsTextLineNumber = Line.fromZ textLinePos.Line let! symbol = Tokenizer.getSymbolAtPosition(documentKey, sourceText, position, filePath, defines, SymbolLookupKind.Greedy, false) - let! _, _, checkFileResults = checker.ParseAndCheckDocument(filePath, textVersionHash, sourceText.ToString(), options, allowStaleResults = true, userOpName = userOpName) + let! _, _, checkFileResults = checker.ParseAndCheckDocument(filePath, textVersionHash, sourceText.ToString(), options, languageServicePerformanceOptions, userOpName = userOpName) let! symbolUse = checkFileResults.GetSymbolUseAtLocation(fcsTextLineNumber, symbol.Ident.idRange.EndColumn, textLine.ToString(), symbol.FullIsland, userOpName=userOpName) let! symbolUses = checkFileResults.GetUsesOfSymbolInFile(symbolUse.Symbol) |> liftAsync return @@ -79,9 +78,10 @@ type internal FSharpDocumentHighlightsService [] (checkerP let! parsingOptions, projectOptions = projectInfoManager.TryGetOptionsForEditingDocumentOrProject(document) let! sourceText = document.GetTextAsync(cancellationToken) let! textVersion = document.GetTextVersionAsync(cancellationToken) - let defines = CompilerEnvironment.GetCompilationDefinesForEditing(document.Name, parsingOptions) + let defines = CompilerEnvironment.GetCompilationDefinesForEditing parsingOptions + let perfOptions = document.FSharpOptions.LanguageServicePerformance let! spans = FSharpDocumentHighlightsService.GetDocumentHighlights(checkerProvider.Checker, document.Id, sourceText, document.FilePath, - position, defines, projectOptions, textVersion.GetHashCode()) + position, defines, projectOptions, textVersion.GetHashCode(), perfOptions) let highlightSpans = spans |> Array.map (fun span -> diff --git a/vsintegration/src/FSharp.Editor/FSharp.Editor.fsproj b/vsintegration/src/FSharp.Editor/FSharp.Editor.fsproj index 33d13b3eb2e..3e011cb5d08 100644 --- a/vsintegration/src/FSharp.Editor/FSharp.Editor.fsproj +++ b/vsintegration/src/FSharp.Editor/FSharp.Editor.fsproj @@ -1,64 +1,63 @@  - + + - $(MSBuildProjectDirectory)\..\..\..\src - FSharp - true - - - - Debug - AnyCPU - 2.0 - {65E0E82A-EACE-4787-8994-888674C2FE87} Library - FSharp.Editor - true - LIBRARY - v4.6 - $(NoWarn);75 - false - $(OtherFlags) --warnon:1182 --subsystemversion:6.00 - true - true + true false - false - true - true - true + $(NoWarn);75 + true + true + $(SystemValueTuplePackageVersion) + $(OtherFlags) --warnon:1182 --subsystemversion:6.00 + true + false + - + + true Microsoft.VisualStudio.FSharp.Editor.SR + + + - + + + + + + + + + - + @@ -78,14 +77,18 @@ + + + + - + @@ -101,195 +104,62 @@ + + + + + + + + + - - {DED3BBD7-53F4-428A-8C9F-27968E768605} - FSharp.Core - - - FSharp.LanguageService - {ee85aab7-cda0-4c4e-bda0-a64ccc413e3f} - True - - - FSharp.LanguageService.Base - {1c5c163c-37ea-4a3c-8ccc-0d34b74bf8ef} - True - - - {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3} - FSharp.Compiler.Private - True - - - FSharp.UIResources - {c4586a06-1402-48bc-8e35-a1b8642f895b} - True - - - FSharp.VS.FSI - {991dcf75-c2eb-42b6-9a0d-aa1d2409d519} - True - + + + + + + - + + - - - - - - - + - - $(FSharpSourcesRoot)\..\packages\EnvDTE.8.0.1\lib\net10\EnvDTE.dll - True - - - $(FSharpSourcesRoot)\..\packages\EnvDTE80.8.0.1\lib\net10\EnvDTE80.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Threading.$(MicrosoftVisualStudioThreadingVersion)\lib\net45\Microsoft.VisualStudio.Threading.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Editor.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Editor.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Text.UI.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Text.UI.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Text.UI.Wpf.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Text.UI.Wpf.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Language.Intellisense.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Language.Intellisense.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Text.Data.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Text.Data.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Text.Logic.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Text.Logic.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.CoreUtility.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.CoreUtility.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Utilities.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Utilities.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Design.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Shell.Design.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.$(RoslynVSBinariesVersion).$(RoslynVSPackagesVersion)\lib\Microsoft.VisualStudio.Shell.$(RoslynVSBinariesVersion).dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Framework.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Shell.Framework.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Package.LanguageService.$(RoslynVSBinariesVersion).$(RoslynVSPackagesVersion)\lib\Microsoft.VisualStudio.Package.LanguageService.$(RoslynVSBinariesVersion).dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Language.StandardClassification.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Language.StandardClassification.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.ComponentModelHost.15.0.26201-alpha\lib\net46\Microsoft.VisualStudio.ComponentModelHost.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.OLE.Interop.7.10.6070\lib\Microsoft.VisualStudio.OLE.Interop.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Immutable.10.0.10.0.30319\lib\net40\Microsoft.VisualStudio.Shell.Immutable.10.0.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Immutable.11.0.11.0.50727\lib\net45\Microsoft.VisualStudio.Shell.Immutable.11.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.ProjectAggregator.8.0.50727\lib\net45\Microsoft.VisualStudio.ProjectAggregator.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.7.10.6071\lib\Microsoft.VisualStudio.Shell.Interop.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.8.0.8.0.50727\lib\Microsoft.VisualStudio.Shell.Interop.8.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.9.0.9.0.30729\lib\Microsoft.VisualStudio.Shell.Interop.9.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.10.0.10.0.30319\lib\Microsoft.VisualStudio.Shell.Interop.10.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.11.0.11.0.61030\lib\Microsoft.VisualStudio.Shell.Interop.11.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.TextManager.Interop.7.10.6070\lib\Microsoft.VisualStudio.TextManager.Interop.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.TextManager.Interop.8.0.8.0.50727\lib\Microsoft.VisualStudio.TextManager.Interop.8.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.CodeAnalysis.Common.$(RoslynVersion)\lib\netstandard1.3\Microsoft.CodeAnalysis.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.CodeAnalysis.EditorFeatures.$(RoslynVersion)\lib\net46\Microsoft.CodeAnalysis.EditorFeatures.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.CodeAnalysis.EditorFeatures.Text.$(RoslynVersion)\lib\net46\Microsoft.CodeAnalysis.EditorFeatures.Text.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.CodeAnalysis.Features.$(RoslynVersion)\lib\netstandard1.3\Microsoft.CodeAnalysis.Features.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.CodeAnalysis.Workspaces.Common.$(RoslynVersion)\lib\netstandard1.3\Microsoft.CodeAnalysis.Workspaces.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.LanguageServices.$(RoslynVersion)\lib\net46\Microsoft.VisualStudio.LanguageServices.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.Composition.1.0.30\lib\portable-net45+win8+wp8+wpa81\System.Composition.AttributedModel.dll - True - - - $(FSharpSourcesRoot)\..\packages\System.Collections.Immutable.$(SystemCollectionsImmutableVersion)\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll - True - - - $(FSharpSourcesRoot)\..\packages\Newtonsoft.Json.10.0.2\lib\net45\Newtonsoft.Json.dll - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - Microsoft - StrongName - - - - \ No newline at end of file + + diff --git a/vsintegration/src/FSharp.Editor/FSharp.Editor.resx b/vsintegration/src/FSharp.Editor/FSharp.Editor.resx index 1414d45144d..572a794eedf 100644 --- a/vsintegration/src/FSharp.Editor/FSharp.Editor.resx +++ b/vsintegration/src/FSharp.Editor/FSharp.Editor.resx @@ -204,4 +204,10 @@ Rename '{0}' to '__' + + Advanced + + + CodeLens + \ No newline at end of file diff --git a/vsintegration/src/FSharp.Editor/Formatting/BraceMatchingService.fs b/vsintegration/src/FSharp.Editor/Formatting/BraceMatchingService.fs index 7b795f0cc82..511988985a0 100644 --- a/vsintegration/src/FSharp.Editor/Formatting/BraceMatchingService.fs +++ b/vsintegration/src/FSharp.Editor/Formatting/BraceMatchingService.fs @@ -2,10 +2,10 @@ namespace Microsoft.VisualStudio.FSharp.Editor -open System open System.ComponentModel.Composition open Microsoft.CodeAnalysis.Editor open Microsoft.FSharp.Compiler.SourceCodeServices +open System.Runtime.InteropServices [] type internal FSharpBraceMatchingService @@ -14,19 +14,21 @@ type internal FSharpBraceMatchingService checkerProvider: FSharpCheckerProvider, projectInfoManager: FSharpProjectOptionsManager ) = - static let defaultUserOpName = "BraceMatching" - static member GetBraceMatchingResult(checker: FSharpChecker, sourceText, fileName, parsingOptions: FSharpParsingOptions, position: int, userOpName: string) = + static member GetBraceMatchingResult(checker: FSharpChecker, sourceText, fileName, parsingOptions: FSharpParsingOptions, position: int, userOpName: string, [] forFormatting: bool) = async { let! matchedBraces = checker.MatchBraces(fileName, sourceText.ToString(), parsingOptions, userOpName) let isPositionInRange range = match RoslynHelpers.TryFSharpRangeToTextSpan(sourceText, range) with | None -> false - | Some range -> - let length = position - range.Start - length >= 0 && length <= range.Length + | Some span -> + if forFormatting then + let length = position - span.Start + length >= 0 && length <= span.Length + else + span.Contains position return matchedBraces |> Array.tryFind(fun (left, right) -> isPositionInRange left || isPositionInRange right) } diff --git a/vsintegration/src/FSharp.Editor/Formatting/EditorFormattingService.fs b/vsintegration/src/FSharp.Editor/Formatting/EditorFormattingService.fs index d4b1b24ebf6..03061fa350f 100644 --- a/vsintegration/src/FSharp.Editor/Formatting/EditorFormattingService.fs +++ b/vsintegration/src/FSharp.Editor/Formatting/EditorFormattingService.fs @@ -38,19 +38,19 @@ type internal FSharpEditorFormattingService let line = sourceText.Lines.[sourceText.Lines.IndexOf position] - let defines = CompilerEnvironment.GetCompilationDefinesForEditing(filePath, parsingOptions) + let defines = CompilerEnvironment.GetCompilationDefinesForEditing parsingOptions let tokens = Tokenizer.tokenizeLine(documentId, sourceText, line.Start, filePath, defines) let! firstMeaningfulToken = tokens - |> List.tryFind (fun x -> + |> Array.tryFind (fun x -> x.Tag <> FSharpTokenTag.WHITESPACE && x.Tag <> FSharpTokenTag.COMMENT && x.Tag <> FSharpTokenTag.LINE_COMMENT) let! (left, right) = - FSharpBraceMatchingService.GetBraceMatchingResult(checker, sourceText, filePath, parsingOptions, position, "FormattingService") + FSharpBraceMatchingService.GetBraceMatchingResult(checker, sourceText, filePath, parsingOptions, position, "FormattingService", forFormatting=true) if right.StartColumn = firstMeaningfulToken.LeftColumn then // Replace the indentation on this line with the indentation of the left bracket diff --git a/vsintegration/src/FSharp.Editor/Formatting/IndentationService.fs b/vsintegration/src/FSharp.Editor/Formatting/IndentationService.fs index 23afe5131ce..c4c293624bd 100644 --- a/vsintegration/src/FSharp.Editor/Formatting/IndentationService.fs +++ b/vsintegration/src/FSharp.Editor/Formatting/IndentationService.fs @@ -37,13 +37,13 @@ type internal FSharpIndentationService let rec tryFindLastNonWhitespaceOrCommentToken (line: TextLine) = maybe { let! parsingOptions, _projectOptions = options - let defines = CompilerEnvironment.GetCompilationDefinesForEditing(filePath, parsingOptions) + let defines = CompilerEnvironment.GetCompilationDefinesForEditing parsingOptions let tokens = Tokenizer.tokenizeLine(documentId, sourceText, line.Start, filePath, defines) return! tokens - |> List.rev - |> List.tryFind (fun x -> + |> Array.rev + |> Array.tryFind (fun x -> x.Tag <> FSharpTokenTag.WHITESPACE && x.Tag <> FSharpTokenTag.COMMENT && x.Tag <> FSharpTokenTag.LINE_COMMENT) @@ -53,7 +53,7 @@ type internal FSharpIndentationService if x = y then Some() else None - let (|NeedIndent|_|) (token: FSharpTokenInfo) = + let (|NeedIndent|_|) (token: Tokenizer.SavedTokenInfo) = match token.Tag with | Eq FSharpTokenTag.EQUALS // = | Eq FSharpTokenTag.LARROW // <- diff --git a/vsintegration/src/FSharp.Editor/InlineRename/InlineRenameService.fs b/vsintegration/src/FSharp.Editor/InlineRename/InlineRenameService.fs index 89e9d6a8f2d..17e06aa144f 100644 --- a/vsintegration/src/FSharp.Editor/InlineRename/InlineRenameService.fs +++ b/vsintegration/src/FSharp.Editor/InlineRename/InlineRenameService.fs @@ -4,7 +4,6 @@ namespace Microsoft.VisualStudio.FSharp.Editor open System open System.Composition -open System.Collections.Generic open System.Linq open System.Threading open System.Threading.Tasks @@ -29,44 +28,37 @@ type internal FailureInlineRenameInfo private () = member __.DisplayName = "" member __.FullDisplayName = "" member __.Glyph = Glyph.MethodPublic - member __.GetFinalSymbolName _replacementText = "" - member __.GetReferenceEditSpan(_location, _cancellationToken) = Unchecked.defaultof<_> - member __.GetConflictEditSpan(_location, _replacementText, _cancellationToken) = Nullable() - member __.FindRenameLocationsAsync(_optionSet, _cancellationToken) = Task.FromResult null - member __.TryOnBeforeGlobalSymbolRenamed(_workspace, _changedDocumentIDs, _replacementText) = false - member __.TryOnAfterGlobalSymbolRenamed(_workspace, _changedDocumentIDs, _replacementText) = false + member __.GetFinalSymbolName _ = "" + member __.GetReferenceEditSpan(_, _) = Unchecked.defaultof<_> + member __.GetConflictEditSpan(_, _, _) = Nullable() + member __.FindRenameLocationsAsync(_, _) = Task.FromResult null + member __.TryOnBeforeGlobalSymbolRenamed(_, _, _) = false + member __.TryOnAfterGlobalSymbolRenamed(_, _, _) = false static member Instance = FailureInlineRenameInfo() :> IInlineRenameInfo -type internal DocumentLocations = - { Document: Document - Locations: InlineRenameLocation [] } - -type internal InlineRenameLocationSet(locationsByDocument: DocumentLocations [], originalSolution: Solution, symbolKind: LexerSymbolKind, symbol: FSharpSymbol) = +type internal InlineRenameLocationSet(locations: InlineRenameLocation [], originalSolution: Solution, symbolKind: LexerSymbolKind, symbol: FSharpSymbol) = interface IInlineRenameLocationSet with - member __.Locations : IList = - upcast [| for doc in locationsByDocument do yield! doc.Locations |].ToList() + member __.Locations = upcast locations.ToList() - member this.GetReplacementsAsync(replacementText, _optionSet, cancellationToken) : Task = - let rec applyChanges i (solution: Solution) = + member __.GetReplacementsAsync(replacementText, _optionSet, cancellationToken) : Task = + let rec applyChanges (solution: Solution) (locationsByDocument: (Document * InlineRenameLocation list) list) = async { - if i = locationsByDocument.Length then - return solution - else - let doc = locationsByDocument.[i] - let! oldSourceText = doc.Document.GetTextAsync(cancellationToken) |> Async.AwaitTask - let changes = doc.Locations |> Seq.map (fun loc -> TextChange(loc.TextSpan, replacementText)) - let newSource = oldSourceText.WithChanges(changes) - return! applyChanges (i + 1) (solution.WithDocumentText(doc.Document.Id, newSource)) + match locationsByDocument with + | [] -> return solution + | (document, locations) :: rest -> + let! oldSource = document.GetTextAsync(cancellationToken) |> Async.AwaitTask + let newSource = oldSource.WithChanges(locations |> List.map (fun l -> TextChange(l.TextSpan, replacementText))) + return! applyChanges (solution.WithDocumentText(document.Id, newSource)) rest } async { - let! newSolution = applyChanges 0 originalSolution + let! newSolution = applyChanges originalSolution (locations |> Array.toList |> List.groupBy (fun x -> x.Document)) return { new IInlineRenameReplacementInfo with member __.NewSolution = newSolution member __.ReplacementTextValid = Tokenizer.isValidNameForSymbol(symbolKind, symbol, replacementText) - member __.DocumentIds = locationsByDocument |> Seq.map (fun doc -> doc.Document.Id) - member __.GetReplacements(documentId) = Seq.empty } + member __.DocumentIds = locations |> Seq.map (fun doc -> doc.Document.Id) |> Seq.distinct + member __.GetReplacements _ = Seq.empty } } |> RoslynHelpers.StartAsyncAsTask(cancellationToken) @@ -98,7 +90,7 @@ type internal InlineRenameInfo member __.LocalizedErrorMessage = null member __.TriggerSpan = triggerSpan member __.HasOverloads = false - member __.ForceRenameOverloads = true + member __.ForceRenameOverloads = false member __.DisplayName = symbolUse.Symbol.DisplayName member __.FullDisplayName = try symbolUse.Symbol.FullName with _ -> symbolUse.Symbol.DisplayName member __.Glyph = Glyph.MethodPublic @@ -108,30 +100,34 @@ type internal InlineRenameInfo let text = getDocumentText location.Document cancellationToken Tokenizer.fixupSpan(text, location.TextSpan) - member __.GetConflictEditSpan(location, _replacementText, _cancellationToken) = Nullable(location.TextSpan) + member __.GetConflictEditSpan(location, replacementText, cancellationToken) = + let text = getDocumentText location.Document cancellationToken + let spanText = text.ToString(location.TextSpan) + let position = spanText.LastIndexOf(replacementText, StringComparison.Ordinal) + if position < 0 then Nullable() + else Nullable(TextSpan(location.TextSpan.Start + position, replacementText.Length)) member __.FindRenameLocationsAsync(_optionSet, cancellationToken) = async { let! symbolUsesByDocumentId = symbolUses - let! locationsByDocument = + let! locations = symbolUsesByDocumentId |> Seq.map (fun (KeyValue(documentId, symbolUses)) -> async { let document = document.Project.Solution.GetDocument(documentId) - let! cancellationToken = Async.CancellationToken let! sourceText = document.GetTextAsync(cancellationToken) |> Async.AwaitTask - let locations = - symbolUses - |> Array.choose (fun symbolUse -> - RoslynHelpers.TryFSharpRangeToTextSpan(sourceText, symbolUse.RangeAlternate) - |> Option.map (fun span -> - let textSpan = Tokenizer.fixupSpan(sourceText, span) - InlineRenameLocation(document, textSpan))) - - return { Document = document; Locations = locations } + return + [| for symbolUse in symbolUses do + match RoslynHelpers.TryFSharpRangeToTextSpan(sourceText, symbolUse.RangeAlternate) with + | Some span -> + let textSpan = Tokenizer.fixupSpan(sourceText, span) + yield InlineRenameLocation(document, textSpan) + | None -> () |] }) |> Async.Parallel - return InlineRenameLocationSet(locationsByDocument, document.Project.Solution, lexerSymbol.Kind, symbolUse.Symbol) :> IInlineRenameLocationSet + |> Async.map Array.concat + + return InlineRenameLocationSet(locations, document.Project.Solution, lexerSymbol.Kind, symbolUse.Symbol) :> IInlineRenameLocationSet } |> RoslynHelpers.StartAsyncAsTask(cancellationToken) member __.TryOnBeforeGlobalSymbolRenamed(_workspace, _changedDocumentIDs, _replacementText) = true @@ -142,8 +138,7 @@ type internal InlineRenameService [] ( projectInfoManager: FSharpProjectOptionsManager, - checkerProvider: FSharpCheckerProvider, - [] _refactorNotifyServices: seq + checkerProvider: FSharpCheckerProvider ) = static let userOpName = "InlineRename" @@ -154,7 +149,7 @@ type internal InlineRenameService let textLinePos = sourceText.Lines.GetLinePosition(position) let fcsTextLineNumber = Line.fromZ textLinePos.Line let! symbol = Tokenizer.getSymbolAtPosition(document.Id, sourceText, position, document.FilePath, defines, SymbolLookupKind.Greedy, false) - let! _, _, checkFileResults = checker.ParseAndCheckDocument(document, options, allowStaleResults = true, userOpName = userOpName) + let! _, _, checkFileResults = checker.ParseAndCheckDocument(document, options, userOpName = userOpName) let! symbolUse = checkFileResults.GetSymbolUseAtLocation(fcsTextLineNumber, symbol.Ident.idRange.EndColumn, textLine.Text.ToString(), symbol.FullIsland, userOpName=userOpName) let! declLoc = symbolUse.GetDeclarationLocation(document) @@ -169,7 +164,7 @@ type internal InlineRenameService asyncMaybe { let! parsingOptions, projectOptions = projectInfoManager.TryGetOptionsForEditingDocumentOrProject(document) let! sourceText = document.GetTextAsync(cancellationToken) - let defines = CompilerEnvironment.GetCompilationDefinesForEditing(document.Name, parsingOptions) + let defines = CompilerEnvironment.GetCompilationDefinesForEditing parsingOptions return! InlineRenameService.GetInlineRenameInfo(checkerProvider.Checker, projectInfoManager, document, sourceText, position, defines, projectOptions) } |> Async.map (Option.defaultValue FailureInlineRenameInfo.Instance) diff --git a/vsintegration/src/FSharp.Editor/LanguageService/FSharpCheckerExtensions.fs b/vsintegration/src/FSharp.Editor/LanguageService/FSharpCheckerExtensions.fs index 14719b17d23..c191dee6fb9 100644 --- a/vsintegration/src/FSharp.Editor/LanguageService/FSharpCheckerExtensions.fs +++ b/vsintegration/src/FSharp.Editor/LanguageService/FSharpCheckerExtensions.fs @@ -9,10 +9,6 @@ open Microsoft.FSharp.Compiler open Microsoft.FSharp.Compiler.Ast open Microsoft.FSharp.Compiler.SourceCodeServices -type CheckResults = - | Ready of (FSharpParseFileResults * FSharpCheckFileResults) option - | StillRunning of Async<(FSharpParseFileResults * FSharpCheckFileResults) option> - type FSharpChecker with member checker.ParseDocument(document: Document, parsingOptions: FSharpParsingOptions, sourceText: string, userOpName: string) = asyncMaybe { @@ -23,57 +19,58 @@ type FSharpChecker with member checker.ParseDocument(document: Document, parsingOptions: FSharpParsingOptions, sourceText: SourceText, userOpName: string) = checker.ParseDocument(document, parsingOptions, sourceText=sourceText.ToString(), userOpName=userOpName) - member checker.ParseAndCheckDocument(filePath: string, textVersionHash: int, sourceText: string, options: FSharpProjectOptions, allowStaleResults: bool, userOpName: string) = - let parseAndCheckFile = - async { - let! parseResults, checkFileAnswer = checker.ParseAndCheckFileInProject(filePath, textVersionHash, sourceText, options, userOpName=userOpName) - return - match checkFileAnswer with - | FSharpCheckFileAnswer.Aborted -> - None - | FSharpCheckFileAnswer.Succeeded(checkFileResults) -> - Some (parseResults, checkFileResults) - } + member checker.ParseAndCheckDocument(filePath: string, textVersionHash: int, sourceText: string, options: FSharpProjectOptions, languageServicePerformanceOptions: LanguageServicePerformanceOptions, userOpName: string) = + async { + let parseAndCheckFile = + async { + let! parseResults, checkFileAnswer = checker.ParseAndCheckFileInProject(filePath, textVersionHash, sourceText, options, userOpName=userOpName) + return + match checkFileAnswer with + | FSharpCheckFileAnswer.Aborted -> + None + | FSharpCheckFileAnswer.Succeeded(checkFileResults) -> + Some (parseResults, checkFileResults) + } - let tryGetFreshResultsWithTimeout() : Async = - async { - try - let! worker = Async.StartChild(parseAndCheckFile, 2000) - let! result = worker - return Ready result - with :? TimeoutException -> - return StillRunning parseAndCheckFile - } + let tryGetFreshResultsWithTimeout() = + async { + let! worker = Async.StartChild(parseAndCheckFile, millisecondsTimeout=languageServicePerformanceOptions.TimeUntilStaleCompletion) + try + return! worker + with :? TimeoutException -> + return None // worker is cancelled at this point, we cannot return it and wait its completion anymore + } - let bindParsedInput(results: (FSharpParseFileResults * FSharpCheckFileResults) option) = - match results with - | Some(parseResults, checkResults) -> - match parseResults.ParseTree with - | Some parsedInput -> Some (parseResults, parsedInput, checkResults) + let bindParsedInput(results: (FSharpParseFileResults * FSharpCheckFileResults) option) = + match results with + | Some(parseResults, checkResults) -> + match parseResults.ParseTree with + | Some parsedInput -> Some (parseResults, parsedInput, checkResults) + | None -> None | None -> None - | None -> None - if allowStaleResults then - async { + if languageServicePerformanceOptions.AllowStaleCompletionResults then let! freshResults = tryGetFreshResultsWithTimeout() let! results = match freshResults with - | Ready x -> async.Return x - | StillRunning worker -> + | Some x -> async.Return (Some x) + | None -> async { - match allowStaleResults, checker.TryGetRecentCheckResultsForFile(filePath, options) with - | true, Some (parseResults, checkFileResults, _) -> + match checker.TryGetRecentCheckResultsForFile(filePath, options) with + | Some (parseResults, checkFileResults, _) -> return Some (parseResults, checkFileResults) - | _ -> - return! worker + | None -> + return! parseAndCheckFile } return bindParsedInput results - } - else parseAndCheckFile |> Async.map bindParsedInput + else + let! results = parseAndCheckFile + return bindParsedInput results + } - member checker.ParseAndCheckDocument(document: Document, options: FSharpProjectOptions, allowStaleResults: bool, userOpName: string, ?sourceText: SourceText) = + member checker.ParseAndCheckDocument(document: Document, options: FSharpProjectOptions, userOpName: string, ?allowStaleResults: bool, ?sourceText: SourceText) = async { let! cancellationToken = Async.CancellationToken let! sourceText = @@ -81,7 +78,11 @@ type FSharpChecker with | Some x -> async.Return x | None -> document.GetTextAsync(cancellationToken) |> Async.AwaitTask let! textVersion = document.GetTextVersionAsync(cancellationToken) |> Async.AwaitTask - return! checker.ParseAndCheckDocument(document.FilePath, textVersion.GetHashCode(), sourceText.ToString(), options, allowStaleResults, userOpName=userOpName) + let perfOpts = + match allowStaleResults with + | Some b -> { document.FSharpOptions.LanguageServicePerformance with AllowStaleCompletionResults = b } + | _ -> document.FSharpOptions.LanguageServicePerformance + return! checker.ParseAndCheckDocument(document.FilePath, textVersion.GetHashCode(), sourceText.ToString(), options, perfOpts, userOpName=userOpName) } @@ -111,11 +112,11 @@ type FSharpChecker with if func.IsProperty then let fullNames = [| if func.HasGetterMethod then - match func.GetterMethod.EnclosingEntity with + match func.GetterMethod.DeclaringEntity with | Some e -> yield e.TryGetFullName() | None -> () if func.HasSetterMethod then - match func.SetterMethod.EnclosingEntity with + match func.SetterMethod.DeclaringEntity with | Some e -> yield e.TryGetFullName() | None -> () |] @@ -124,7 +125,7 @@ type FSharpChecker with | [||] -> None | _ -> Some fullNames else - match func.EnclosingEntity with + match func.DeclaringEntity with // C# extension method | Some (Symbol.FSharpEntity Symbol.Class) -> let fullName = symbolUse.Symbol.FullName.Split '.' diff --git a/vsintegration/src/FSharp.Editor/LanguageService/FSharpCheckerProvider.fs b/vsintegration/src/FSharp.Editor/LanguageService/FSharpCheckerProvider.fs new file mode 100644 index 00000000000..f8ffa8dae32 --- /dev/null +++ b/vsintegration/src/FSharp.Editor/LanguageService/FSharpCheckerProvider.fs @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace Microsoft.VisualStudio.FSharp.Editor + +open System +open System.ComponentModel.Composition +open System.Diagnostics +open Microsoft.CodeAnalysis +open Microsoft.CodeAnalysis.Diagnostics +open Microsoft.FSharp.Compiler.SourceCodeServices +open Microsoft.VisualStudio +open Microsoft.VisualStudio.FSharp.Editor +open Microsoft.VisualStudio.LanguageServices +open Microsoft.VisualStudio.LanguageServices.Implementation.ProjectSystem +open FSharp.NativeInterop + +#nowarn "9" // NativePtr.toNativeInt + +// Exposes FSharpChecker as MEF export +[); Composition.Shared>] +type internal FSharpCheckerProvider + [] + ( + analyzerService: IDiagnosticAnalyzerService, + [)>] workspace: VisualStudioWorkspaceImpl, + settings: EditorOptions + ) = + + let tryGetMetadataSnapshot (path, timeStamp) = + try + let metadataReferenceProvider = workspace.Services.GetService() + let md = metadataReferenceProvider.GetMetadata(path, timeStamp) + let amd = (md :?> AssemblyMetadata) + let mmd = amd.GetModules().[0] + let mmr = mmd.GetMetadataReader() + + // "lifetime is timed to Metadata you got from the GetMetadata(...). As long as you hold it strongly, raw + // memory we got from metadata reader will be alive. Once you are done, just let everything go and + // let finalizer handle resource rather than calling Dispose from Metadata directly. It is shared metadata. + // You shouldn't dispose it directly." + + let objToHold = box md + + // We don't expect any ilread WeakByteFile to be created when working in Visual Studio + Debug.Assert((Microsoft.FSharp.Compiler.AbstractIL.ILBinaryReader.GetStatistics().weakByteFileCount = 0), "Expected weakByteFileCount to be zero when using F# in Visual Studio. Was there a problem reading a .NET binary?") + + Some (objToHold, NativePtr.toNativeInt mmr.MetadataPointer, mmr.MetadataLength) + with ex -> + // We catch all and let the backup routines in the F# compiler find the error + Assert.Exception(ex) + None + + + let checker = + lazy + let checker = + FSharpChecker.Create( + projectCacheSize = settings.LanguageServicePerformance.ProjectCheckCacheSize, + keepAllBackgroundResolutions = false, + // Enabling this would mean that if devenv.exe goes above 2.3GB we do a one-off downsize of the F# Compiler Service caches + (* , MaxMemory = 2300 *) + legacyReferenceResolver=Microsoft.FSharp.Compiler.MSBuildReferenceResolver.Resolver, + tryGetMetadataSnapshot = tryGetMetadataSnapshot) + + // This is one half of the bridge between the F# background builder and the Roslyn analysis engine. + // When the F# background builder refreshes the background semantic build context for a file, + // we request Roslyn to reanalyze that individual file. + checker.BeforeBackgroundFileCheck.Add(fun (fileName, _extraProjectInfo) -> + async { + try + let solution = workspace.CurrentSolution + let documentIds = solution.GetDocumentIdsWithFilePath(fileName) + if not documentIds.IsEmpty then + let documentIdsFiltered = documentIds |> Seq.filter workspace.IsDocumentOpen |> Seq.toArray + for documentId in documentIdsFiltered do + Trace.TraceInformation("{0:n3} Requesting Roslyn reanalysis of {1}", DateTime.Now.TimeOfDay.TotalSeconds, documentId) + if documentIdsFiltered.Length > 0 then + analyzerService.Reanalyze(workspace,documentIds=documentIdsFiltered) + with ex -> + Assert.Exception(ex) + } |> Async.StartImmediate + ) + checker + + member this.Checker = checker.Value + diff --git a/vsintegration/src/FSharp.Editor/LanguageService/FSharpEditorFactory.fs b/vsintegration/src/FSharp.Editor/LanguageService/FSharpEditorFactory.fs new file mode 100644 index 00000000000..cadf0d33e06 --- /dev/null +++ b/vsintegration/src/FSharp.Editor/LanguageService/FSharpEditorFactory.fs @@ -0,0 +1,118 @@ +namespace Microsoft.VisualStudio.FSharp.Editor + +open System +open System.Runtime.InteropServices +open Microsoft.VisualStudio +open Microsoft.VisualStudio.Editor +open Microsoft.VisualStudio.Shell +open Microsoft.VisualStudio.Shell.Interop +open Microsoft.VisualStudio.TextManager.Interop +open Microsoft.VisualStudio.Utilities +open Microsoft.VisualStudio.ComponentModelHost + +type ShellPackage = Microsoft.VisualStudio.Shell.Package + +[] +module Constants = + + [] + let FSharpEditorFactoryIdString = "8a5aa6cf-46e3-4520-a70a-7393d15233e9" + + [] + let FSharpContentType = "F#" + + // _VSPHYSICALVIEWATTRIBUTES.PVA_SupportsPreview = 2 + // F# doesn't allow to express a cast of an enum as a literal; we have to put the number here directly. + [] + let FSharpEditorFactoryPhysicalViewAttributes = 2 + +[] +type FSharpEditorFactory(parentPackage: ShellPackage) = + + let serviceProvider = + if parentPackage = null then + nullArg "parentPackage" + parentPackage :> IServiceProvider + let componentModel = serviceProvider.GetService(typeof) :?> IComponentModel + let editorAdaptersFactoryService = componentModel.GetService() + let contentTypeRegistryService = componentModel.GetService() + + let setWindowBuffer oleServiceProvider (textBuffer: IVsTextBuffer) (ppunkDocView: byref) (ppunkDocData: byref) (pbstrEditorCaption: byref) = + // If the text buffer is marked as read-only, ensure that the padlock icon is displayed + // next the new window's title and that [Read Only] is appended to title. + let readOnlyFlags = + (BUFFERSTATEFLAGS.BSF_FILESYS_READONLY ||| BUFFERSTATEFLAGS.BSF_USER_READONLY) + |> LanguagePrimitives.EnumToValue + |> uint32 + + let mutable textBufferFlags = 0u + let readOnlyStatus = + if (ErrorHandler.Succeeded(textBuffer.GetStateFlags(&textBufferFlags)) && 0u <> (textBufferFlags &&& readOnlyFlags)) then + READONLYSTATUS.ROSTATUS_ReadOnly + else + READONLYSTATUS.ROSTATUS_NotReadOnly + + let codeWindow = editorAdaptersFactoryService.CreateVsCodeWindowAdapter(oleServiceProvider); + codeWindow.SetBuffer(textBuffer :?> IVsTextLines) + |> ignore + codeWindow.GetEditorCaption(readOnlyStatus, &pbstrEditorCaption) + |> ignore + + ppunkDocView <- Marshal.GetIUnknownForObject(codeWindow); + ppunkDocData <- Marshal.GetIUnknownForObject(textBuffer); + + VSConstants.S_OK; + + let mutable oleServiceProviderOpt = None + + interface IVsEditorFactory with + + member __.Close() = VSConstants.S_OK + + member __.CreateEditorInstance(_grfCreateDoc, _pszMkDocument, _pszPhysicalView, _pvHier, _itemid, punkDocDataExisting, ppunkDocView, ppunkDocData, pbstrEditorCaption, pguidCmdUI, pgrfCDW) = + ppunkDocView <- IntPtr.Zero + ppunkDocData <- IntPtr.Zero + pbstrEditorCaption <- String.Empty + + //pguidCmdUI is the highest priority Guid that Visual Studio Shell looks at when translating key strokes into editor commands. + //Here we intentionally set it to Guid.Empty so it will not play a part in translating keystrokes at all. The next highest priority + //will be commands tied to this FSharpEditorFactory (such as Alt-Enter). + //However, because we are setting pguidCmdUI, we are not going to get typical text editor commands bound to this editor unless we inherit + //those keybindings on the IVsWindowFrame in which our editor lives. + pguidCmdUI <- Guid.Empty + pgrfCDW <- 0 + + match oleServiceProviderOpt with + | None -> VSConstants.E_FAIL + | Some oleServiceProvider -> + // Is this document already open? If so, let's see if it's a IVsTextBuffer we should re-use. This allows us + // to properly handle multiple windows open for the same document. + if punkDocDataExisting <> IntPtr.Zero then + match Marshal.GetObjectForIUnknown(punkDocDataExisting) with + | :? IVsTextBuffer as textBuffer -> + setWindowBuffer oleServiceProvider textBuffer &ppunkDocView &ppunkDocData &pbstrEditorCaption + | _ -> + VSConstants.VS_E_INCOMPATIBLEDOCDATA + else + // We need to create a text buffer now. + let contentType = contentTypeRegistryService.GetContentType(Constants.FSharpContentType) + let textBuffer = editorAdaptersFactoryService.CreateVsTextBufferAdapter(oleServiceProvider, contentType) + setWindowBuffer oleServiceProvider textBuffer &ppunkDocView &ppunkDocData &pbstrEditorCaption + + member __.MapLogicalView(rguidLogicalView, pbstrPhysicalView) = + pbstrPhysicalView <- null + + match rguidLogicalView with + | x when + x = VSConstants.LOGVIEWID.Primary_guid || + x = VSConstants.LOGVIEWID.Debugging_guid || + x = VSConstants.LOGVIEWID.Code_guid || + x = VSConstants.LOGVIEWID.TextView_guid -> + VSConstants.S_OK + | _ -> + VSConstants.E_NOTIMPL + + member __.SetSite(packageServiceProvider) = + oleServiceProviderOpt <- Some packageServiceProvider + VSConstants.S_OK + \ No newline at end of file diff --git a/vsintegration/src/FSharp.Editor/LanguageService/FSharpProjectOptionsManager.fs b/vsintegration/src/FSharp.Editor/LanguageService/FSharpProjectOptionsManager.fs new file mode 100644 index 00000000000..007ca3fbe18 --- /dev/null +++ b/vsintegration/src/FSharp.Editor/LanguageService/FSharpProjectOptionsManager.fs @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace Microsoft.VisualStudio.FSharp.Editor + +open System +open System.Collections.Concurrent +open System.Collections.Immutable +open System.ComponentModel.Composition +open System.IO +open System.Linq +open Microsoft.CodeAnalysis +open Microsoft.FSharp.Compiler.CompileOps +open Microsoft.FSharp.Compiler.SourceCodeServices +open Microsoft.VisualStudio +open Microsoft.VisualStudio.FSharp.Editor +open Microsoft.VisualStudio.FSharp.Editor.SiteProvider +open Microsoft.VisualStudio.LanguageServices +open Microsoft.VisualStudio.LanguageServices.Implementation.ProjectSystem +open Microsoft.VisualStudio.Shell + +/// Exposes FCS FSharpProjectOptions information management as MEF component. +// +// This service allows analyzers to get an appropriate FSharpProjectOptions value for a project or single file. +// It also allows a 'cheaper' route to get the project options relevant to parsing (e.g. the #define values). +// The main entrypoints are TryGetOptionsForDocumentOrProject and TryGetOptionsForEditingDocumentOrProject. +[); Composition.Shared>] +type internal FSharpProjectOptionsManager + [] + ( + checkerProvider: FSharpCheckerProvider, + [)>] workspace: VisualStudioWorkspaceImpl, + [)>] serviceProvider: System.IServiceProvider, + settings: EditorOptions + ) = + + // A table of information about projects, excluding single-file projects. + let projectOptionsTable = FSharpProjectOptionsTable() + + // A table of information about single-file projects. Currently we only need the load time of each such file, plus + // the original options for editing + let singleFileProjectTable = ConcurrentDictionary() + + let tryGetOrCreateProjectId (projectFileName:string) = + let projectDisplayName = projectDisplayNameOf projectFileName + Some (workspace.ProjectTracker.GetOrCreateProjectIdForPath(projectFileName, projectDisplayName)) + + /// Retrieve the projectOptionsTable + member __.FSharpOptions = projectOptionsTable + + /// Clear a project from the project table + member this.ClearInfoForProject(projectId:ProjectId) = projectOptionsTable.ClearInfoForProject(projectId) + + /// Clear a project from the single file project table + member this.ClearInfoForSingleFileProject(projectId) = + singleFileProjectTable.TryRemove(projectId) |> ignore + + /// Update a project in the single file project table + member this.AddOrUpdateSingleFileProject(projectId, data) = singleFileProjectTable.[projectId] <- data + + /// Get the exact options for a single-file script + member this.ComputeSingleFileOptions (tryGetOrCreateProjectId, fileName, loadTime, fileContents) = + async { + let extraProjectInfo = Some(box workspace) + if SourceFile.MustBeSingleFileProject(fileName) then + // NOTE: we don't use a unique stamp for single files, instead comparing options structurally. + // This is because we repeatedly recompute the options. + let optionsStamp = None + let! options, _diagnostics = checkerProvider.Checker.GetProjectOptionsFromScript(fileName, fileContents, loadTime, [| |], ?extraProjectInfo=extraProjectInfo, ?optionsStamp=optionsStamp) + // NOTE: we don't use FCS cross-project references from scripts to projects. THe projects must have been + // compiled and #r will refer to files on disk + let referencedProjectFileNames = [| |] + let site = ProjectSitesAndFiles.CreateProjectSiteForScript(fileName, referencedProjectFileNames, options) + let deps, projectOptions = ProjectSitesAndFiles.GetProjectOptionsForProjectSite(settings.LanguageServicePerformance.EnableInMemoryCrossProjectReferences, site, serviceProvider, (tryGetOrCreateProjectId fileName), fileName, options.ExtraProjectInfo, Some projectOptionsTable) + let parsingOptions, _ = checkerProvider.Checker.GetParsingOptionsFromProjectOptions(projectOptions) + return (deps, parsingOptions, projectOptions) + else + let site = ProjectSitesAndFiles.ProjectSiteOfSingleFile(fileName) + let deps, projectOptions = ProjectSitesAndFiles.GetProjectOptionsForProjectSite(settings.LanguageServicePerformance.EnableInMemoryCrossProjectReferences, site, serviceProvider, (tryGetOrCreateProjectId fileName), fileName, extraProjectInfo, Some projectOptionsTable) + let parsingOptions, _ = checkerProvider.Checker.GetParsingOptionsFromProjectOptions(projectOptions) + return (deps, parsingOptions, projectOptions) + } + + /// Update the info for a project in the project table + member this.UpdateProjectInfo(tryGetOrCreateProjectId, projectId, site, userOpName, invalidateConfig) = + Logger.Log LogEditorFunctionId.LanguageService_UpdateProjectInfo + projectOptionsTable.AddOrUpdateProject(projectId, (fun isRefresh -> + let extraProjectInfo = Some(box workspace) + let referencedProjects, projectOptions = ProjectSitesAndFiles.GetProjectOptionsForProjectSite(settings.LanguageServicePerformance.EnableInMemoryCrossProjectReferences, site, serviceProvider, Some(projectId), site.ProjectFileName, extraProjectInfo, Some projectOptionsTable) + if invalidateConfig then checkerProvider.Checker.InvalidateConfiguration(projectOptions, startBackgroundCompileIfAlreadySeen = not isRefresh, userOpName = userOpName + ".UpdateProjectInfo") + let referencedProjectIds = referencedProjects |> Array.choose tryGetOrCreateProjectId + let parsingOptions, _ = checkerProvider.Checker.GetParsingOptionsFromProjectOptions(projectOptions) + referencedProjectIds, parsingOptions, Some site, projectOptions)) + + /// Get compilation defines relevant for syntax processing. + /// Quicker then TryGetOptionsForDocumentOrProject as it doesn't need to recompute the exact project + /// options for a script. + member this.GetCompilationDefinesForEditingDocument(document:Document) = + let projectOptionsOpt = this.TryGetOptionsForProject(document.Project.Id) + let parsingOptions = + match projectOptionsOpt with + | Some (parsingOptions, _site, _projectOptions) -> parsingOptions + | _ -> { FSharpParsingOptions.Default with IsInteractive = IsScript document.Name } + CompilerEnvironment.GetCompilationDefinesForEditing parsingOptions + + /// Try and get the Options for a project + member this.TryGetOptionsForProject(projectId:ProjectId) = projectOptionsTable.TryGetOptionsForProject(projectId) + + /// Get the exact options for a document or project + member this.TryGetOptionsForDocumentOrProject(document: Document) = + async { + let projectId = document.Project.Id + + // The options for a single-file script project are re-requested each time the file is analyzed. This is because the + // single-file project may contain #load and #r references which are changing as the user edits, and we may need to re-analyze + // to determine the latest settings. FCS keeps a cache to help ensure these are up-to-date. + match singleFileProjectTable.TryGetValue(projectId) with + | true, (loadTime, _, _) -> + try + let fileName = document.FilePath + let! cancellationToken = Async.CancellationToken + let! sourceText = document.GetTextAsync(cancellationToken) |> Async.AwaitTask + // NOTE: we don't use FCS cross-project references from scripts to projects. The projects must have been + // compiled and #r will refer to files on disk. + let tryGetOrCreateProjectId _ = None + let! _referencedProjectFileNames, parsingOptions, projectOptions = this.ComputeSingleFileOptions (tryGetOrCreateProjectId, fileName, loadTime, sourceText.ToString()) + this.AddOrUpdateSingleFileProject(projectId, (loadTime, parsingOptions, projectOptions)) + return Some (parsingOptions, None, projectOptions) + with ex -> + Assert.Exception(ex) + return None + | _ -> return this.TryGetOptionsForProject(projectId) + } + + /// Get the options for a document or project relevant for syntax processing. + /// Quicker then TryGetOptionsForDocumentOrProject as it doesn't need to recompute the exact project options for a script. + member this.TryGetOptionsForEditingDocumentOrProject(document:Document) = + let projectId = document.Project.Id + match singleFileProjectTable.TryGetValue(projectId) with + | true, (_loadTime, parsingOptions, originalOptions) -> Some (parsingOptions, originalOptions) + | _ -> this.TryGetOptionsForProject(projectId) |> Option.map(fun (parsingOptions, _, projectOptions) -> parsingOptions, projectOptions) + + /// get a siteprovider + member this.ProvideProjectSiteProvider(project:Project) = provideProjectSiteProvider(workspace, project, serviceProvider, Some projectOptionsTable) + + /// Tell the checker to update the project info for the specified project id + member this.UpdateProjectInfoWithProjectId(projectId:ProjectId, userOpName, invalidateConfig) = + let hier = workspace.GetHierarchy(projectId) + match hier with + | null -> () + | h when (h.IsCapabilityMatch("CPS")) -> + let project = workspace.CurrentSolution.GetProject(projectId) + if not (isNull project) then + let siteProvider = this.ProvideProjectSiteProvider(project) + let projectSite = siteProvider.GetProjectSite() + if projectSite.CompilationSourceFiles.Length <> 0 then + this.UpdateProjectInfo(tryGetOrCreateProjectId, projectId, projectSite, userOpName, invalidateConfig) + | _ -> () + + /// Tell the checker to update the project info for the specified project id + member this.UpdateDocumentInfoWithProjectId(projectId:ProjectId, documentId:DocumentId, userOpName, invalidateConfig) = + if workspace.IsDocumentOpen(documentId) then + this.UpdateProjectInfoWithProjectId(projectId, userOpName, invalidateConfig) + + [] + /// This handles commandline change notifications from the Dotnet Project-system + /// Prior to VS 15.7 path contained path to project file, post 15.7 contains target binpath + /// binpath is more accurate because a project file can have multiple in memory projects based on configuration + member this.HandleCommandLineChanges(path:string, sources:ImmutableArray, references:ImmutableArray, options:ImmutableArray) = + use _logBlock = Logger.LogBlock(LogEditorFunctionId.LanguageService_HandleCommandLineArgs) + + let projectId = + match workspace.ProjectTracker.TryGetProjectByBinPath(path) with + | true, project -> project.Id + | false, _ -> workspace.ProjectTracker.GetOrCreateProjectIdForPath(path, projectDisplayNameOf path) + let project = workspace.ProjectTracker.GetProject(projectId) + let path = project.ProjectFilePath + let fullPath p = + if Path.IsPathRooted(p) || path = null then p + else Path.Combine(Path.GetDirectoryName(path), p) + let sourcePaths = sources |> Seq.map(fun s -> fullPath s.Path) |> Seq.toArray + let referencePaths = references |> Seq.map(fun r -> fullPath r.Reference) |> Seq.toArray + + projectOptionsTable.SetOptionsWithProjectId(projectId, sourcePaths, referencePaths, options.ToArray()) + this.UpdateProjectInfoWithProjectId(projectId, "HandleCommandLineChanges", invalidateConfig=true) + + member __.Checker = checkerProvider.Checker diff --git a/vsintegration/src/FSharp.Editor/LanguageService/IProjectSite.fs b/vsintegration/src/FSharp.Editor/LanguageService/IProjectSite.fs new file mode 100644 index 00000000000..0b3f65d3627 --- /dev/null +++ b/vsintegration/src/FSharp.Editor/LanguageService/IProjectSite.fs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace Microsoft.VisualStudio.FSharp.Editor + +open System.Runtime.InteropServices + +/// Narrow abstraction over the project system. +type internal AdviseProjectSiteChanges = delegate of unit -> unit + +[] +type internal IProvideProjectSite = + abstract GetProjectSite : unit -> IProjectSite + +/// Represents known F#-specific information about a project. +and internal IProjectSite = + + /// List of files in the project. In the correct order. + abstract CompilationSourceFiles : string[] + + /// Flags that the compiler would need to understand how to compile. Includes '-r' + /// options but not source files + abstract CompilationOptions : string[] + + /// The normalized '-r:' assembly references, without the '-r:' + abstract CompilationReferences : string[] + + /// The '-o:' output bin path, without the '-o:' + abstract CompilationBinOutputPath : string option + + /// The name of the project file. + abstract ProjectFileName : string + + /// Register for notifications for when the above change + abstract AdviseProjectSiteChanges : callbackOwnerKey: string * AdviseProjectSiteChanges -> unit + + /// Register for notifications when project is cleaned/rebuilt (and thus any live TypeProviders should be refreshed) + abstract AdviseProjectSiteCleaned : callbackOwnerKey: string * AdviseProjectSiteChanges -> unit + + // Register for notifications when project is closed. + abstract AdviseProjectSiteClosed : callbackOwnerKey: string * AdviseProjectSiteChanges -> unit + + /// A user-friendly description of the project. Used only for developer/DEBUG tooltips and such. + abstract Description : string + + /// The error list task reporter + abstract BuildErrorReporter : Microsoft.VisualStudio.Shell.Interop.IVsLanguageServiceBuildErrorReporter2 option with get, set + + /// False type resolution errors are invalid. This occurs with orphaned source files. The prior + /// type checking state is unknown. In this case we don't want to squiggle the type checking files. + abstract IsIncompleteTypeCheckEnvironment : bool + + /// target framework moniker + abstract TargetFrameworkMoniker : string + + /// Project Guid + abstract ProjectGuid : string + + /// timestamp the site was last loaded + abstract LoadTime : System.DateTime + + abstract ProjectProvider : IProvideProjectSite option \ No newline at end of file diff --git a/vsintegration/src/FSharp.Editor/LanguageService/LanguageService.fs b/vsintegration/src/FSharp.Editor/LanguageService/LanguageService.fs index a3f8bc4deef..a91cd2634b5 100644 --- a/vsintegration/src/FSharp.Editor/LanguageService/LanguageService.fs +++ b/vsintegration/src/FSharp.Editor/LanguageService/LanguageService.fs @@ -9,6 +9,7 @@ open System.Collections.Concurrent open System.Collections.Generic open System.Collections.Immutable open System.ComponentModel.Composition +open System.ComponentModel.Design open System.Diagnostics open System.IO open System.Linq @@ -23,8 +24,8 @@ open Microsoft.FSharp.Compiler.CompileOps open Microsoft.FSharp.Compiler.SourceCodeServices open Microsoft.VisualStudio open Microsoft.VisualStudio.Editor -open Microsoft.VisualStudio.FSharp.LanguageService -open Microsoft.VisualStudio.FSharp.LanguageService.SiteProvider +open Microsoft.VisualStudio.FSharp.Editor +open Microsoft.VisualStudio.FSharp.Editor.SiteProvider open Microsoft.VisualStudio.TextManager.Interop open Microsoft.VisualStudio.LanguageServices open Microsoft.VisualStudio.LanguageServices.Implementation.LanguageService @@ -32,211 +33,13 @@ open Microsoft.VisualStudio.LanguageServices.Implementation.ProjectSystem open Microsoft.VisualStudio.LanguageServices.Implementation.TaskList open Microsoft.VisualStudio.LanguageServices.ProjectSystem open Microsoft.VisualStudio.Shell +open Microsoft.VisualStudio.Shell.Events open Microsoft.VisualStudio.Shell.Interop open Microsoft.VisualStudio.ComponentModelHost +open Microsoft.VisualStudio.Text.Outlining +open FSharp.NativeInterop -// Exposes FSharpChecker as MEF export -[); Composition.Shared>] -type internal FSharpCheckerProvider - [] - ( - analyzerService: IDiagnosticAnalyzerService - ) = - - // Enabling this would mean that if devenv.exe goes above 2.3GB we do a one-off downsize of the F# Compiler Service caches - //let maxMemory = 2300 - - let checker = - lazy - let checker = - FSharpChecker.Create( - projectCacheSize = Settings.LanguageServicePerformance.ProjectCheckCacheSize, - keepAllBackgroundResolutions = false, - (* , MaxMemory = 2300 *) - legacyReferenceResolver=Microsoft.FSharp.Compiler.MSBuildReferenceResolver.Resolver) - - // This is one half of the bridge between the F# background builder and the Roslyn analysis engine. - // When the F# background builder refreshes the background semantic build context for a file, - // we request Roslyn to reanalyze that individual file. - checker.BeforeBackgroundFileCheck.Add(fun (fileName, extraProjectInfo) -> - async { - try - match extraProjectInfo with - | Some (:? Workspace as workspace) -> - let solution = workspace.CurrentSolution - let documentIds = solution.GetDocumentIdsWithFilePath(fileName) - if not documentIds.IsEmpty then - let documentIdsFiltered = documentIds |> Seq.filter workspace.IsDocumentOpen |> Seq.toArray - for documentId in documentIdsFiltered do - Trace.TraceInformation("{0:n3} Requesting Roslyn reanalysis of {1}", DateTime.Now.TimeOfDay.TotalSeconds, documentId) - if documentIdsFiltered.Length > 0 then - analyzerService.Reanalyze(workspace,documentIds=documentIdsFiltered) - | _ -> () - with ex -> - Assert.Exception(ex) - } |> Async.StartImmediate - ) - checker - - member this.Checker = checker.Value - - -/// Exposes FCS FSharpProjectOptions information management as MEF component. -// -// This service allows analyzers to get an appropriate FSharpProjectOptions value for a project or single file. -// It also allows a 'cheaper' route to get the project options relevant to parsing (e.g. the #define values). -// The main entrypoints are TryGetOptionsForDocumentOrProject and TryGetOptionsForEditingDocumentOrProject. -[); Composition.Shared>] -type internal FSharpProjectOptionsManager - [] - ( - checkerProvider: FSharpCheckerProvider, - [)>] workspace: VisualStudioWorkspaceImpl, - [)>] serviceProvider: System.IServiceProvider - ) = - - // A table of information about projects, excluding single-file projects. - let projectOptionsTable = FSharpProjectOptionsTable() - - // A table of information about single-file projects. Currently we only need the load time of each such file, plus - // the original options for editing - let singleFileProjectTable = ConcurrentDictionary() - - let tryGetOrCreateProjectId (projectFileName:string) = - let projectDisplayName = projectDisplayNameOf projectFileName - Some (workspace.ProjectTracker.GetOrCreateProjectIdForPath(projectFileName, projectDisplayName)) - - /// Retrieve the projectOptionsTable - member __.FSharpOptions = projectOptionsTable - - /// Clear a project from the project table - member this.ClearInfoForProject(projectId:ProjectId) = projectOptionsTable.ClearInfoForProject(projectId) - - /// Clear a project from the single file project table - member this.ClearInfoForSingleFileProject(projectId) = - singleFileProjectTable.TryRemove(projectId) |> ignore - - /// Update a project in the single file project table - member this.AddOrUpdateSingleFileProject(projectId, data) = singleFileProjectTable.[projectId] <- data - - /// Get the exact options for a single-file script - member this.ComputeSingleFileOptions (tryGetOrCreateProjectId, fileName, loadTime, fileContents) = - async { - let extraProjectInfo = Some(box workspace) - let tryGetOptionsForReferencedProject f = f |> tryGetOrCreateProjectId |> Option.bind this.TryGetOptionsForProject |> Option.map(fun (_, _, projectOptions) -> projectOptions) - if SourceFile.MustBeSingleFileProject(fileName) then - // NOTE: we don't use a unique stamp for single files, instead comparing options structurally. - // This is because we repeatedly recompute the options. - let optionsStamp = None - let! options, _diagnostics = checkerProvider.Checker.GetProjectOptionsFromScript(fileName, fileContents, loadTime, [| |], ?extraProjectInfo=extraProjectInfo, ?optionsStamp=optionsStamp) - // NOTE: we don't use FCS cross-project references from scripts to projects. THe projects must have been - // compiled and #r will refer to files on disk - let referencedProjectFileNames = [| |] - let site = ProjectSitesAndFiles.CreateProjectSiteForScript(fileName, referencedProjectFileNames, options) - let deps, projectOptions = ProjectSitesAndFiles.GetProjectOptionsForProjectSite(Settings.LanguageServicePerformance.EnableInMemoryCrossProjectReferences, tryGetOptionsForReferencedProject, site, serviceProvider, (tryGetOrCreateProjectId fileName), fileName, options.ExtraProjectInfo, Some projectOptionsTable, true) - let parsingOptions, _ = checkerProvider.Checker.GetParsingOptionsFromProjectOptions(projectOptions) - return (deps, parsingOptions, projectOptions) - else - let site = ProjectSitesAndFiles.ProjectSiteOfSingleFile(fileName) - let deps, projectOptions = ProjectSitesAndFiles.GetProjectOptionsForProjectSite(Settings.LanguageServicePerformance.EnableInMemoryCrossProjectReferences, tryGetOptionsForReferencedProject, site, serviceProvider, (tryGetOrCreateProjectId fileName), fileName, extraProjectInfo, Some projectOptionsTable, true) - let parsingOptions, _ = checkerProvider.Checker.GetParsingOptionsFromProjectOptions(projectOptions) - return (deps, parsingOptions, projectOptions) - } - - /// Update the info for a project in the project table - member this.UpdateProjectInfo(tryGetOrCreateProjectId, projectId, site, userOpName) = - projectOptionsTable.AddOrUpdateProject(projectId, (fun isRefresh -> - let extraProjectInfo = Some(box workspace) - let tryGetOptionsForReferencedProject f = f |> tryGetOrCreateProjectId |> Option.bind this.TryGetOptionsForProject |> Option.map(fun (_, _, projectOptions) -> projectOptions) - let referencedProjects, projectOptions = ProjectSitesAndFiles.GetProjectOptionsForProjectSite(Settings.LanguageServicePerformance.EnableInMemoryCrossProjectReferences, tryGetOptionsForReferencedProject, site, serviceProvider, (tryGetOrCreateProjectId (site.ProjectFileName)), site.ProjectFileName, extraProjectInfo, Some projectOptionsTable, true) - checkerProvider.Checker.InvalidateConfiguration(projectOptions, startBackgroundCompileIfAlreadySeen = not isRefresh, userOpName = userOpName + ".UpdateProjectInfo") - let referencedProjectIds = referencedProjects |> Array.choose tryGetOrCreateProjectId - let parsingOptions, _ = checkerProvider.Checker.GetParsingOptionsFromProjectOptions(projectOptions) - referencedProjectIds, parsingOptions, Some site, projectOptions)) - - /// Get compilation defines relevant for syntax processing. - /// Quicker then TryGetOptionsForDocumentOrProject as it doesn't need to recompute the exact project - /// options for a script. - member this.GetCompilationDefinesForEditingDocument(document:Document) = - let projectOptionsOpt = this.TryGetOptionsForProject(document.Project.Id) - let parsingOptions = - match projectOptionsOpt with - | Some (parsingOptions, _site, _projectOptions) -> parsingOptions - | _ -> FSharpParsingOptions.Default - CompilerEnvironment.GetCompilationDefinesForEditing(document.Name, parsingOptions) - - /// Try and get the Options for a project - member this.TryGetOptionsForProject(projectId:ProjectId) = projectOptionsTable.TryGetOptionsForProject(projectId) - - /// Get the exact options for a document or project - member this.TryGetOptionsForDocumentOrProject(document: Document) = - async { - let projectId = document.Project.Id - - // The options for a single-file script project are re-requested each time the file is analyzed. This is because the - // single-file project may contain #load and #r references which are changing as the user edits, and we may need to re-analyze - // to determine the latest settings. FCS keeps a cache to help ensure these are up-to-date. - match singleFileProjectTable.TryGetValue(projectId) with - | true, (loadTime, _, _) -> - try - let fileName = document.FilePath - let! cancellationToken = Async.CancellationToken - let! sourceText = document.GetTextAsync(cancellationToken) |> Async.AwaitTask - // NOTE: we don't use FCS cross-project references from scripts to projects. The projects must have been - // compiled and #r will refer to files on disk. - let tryGetOrCreateProjectId _ = None - let! _referencedProjectFileNames, parsingOptions, projectOptions = this.ComputeSingleFileOptions (tryGetOrCreateProjectId, fileName, loadTime, sourceText.ToString()) - this.AddOrUpdateSingleFileProject(projectId, (loadTime, parsingOptions, projectOptions)) - return Some (parsingOptions, None, projectOptions) - with ex -> - Assert.Exception(ex) - return None - | _ -> return this.TryGetOptionsForProject(projectId) - } - - /// Get the options for a document or project relevant for syntax processing. - /// Quicker then TryGetOptionsForDocumentOrProject as it doesn't need to recompute the exact project options for a script. - member this.TryGetOptionsForEditingDocumentOrProject(document:Document) = - let projectId = document.Project.Id - match singleFileProjectTable.TryGetValue(projectId) with - | true, (_loadTime, parsingOptions, originalOptions) -> Some (parsingOptions, originalOptions) - | _ -> this.TryGetOptionsForProject(projectId) |> Option.map(fun (parsingOptions, _, projectOptions) -> parsingOptions, projectOptions) - - /// get a siteprovider - member this.ProvideProjectSiteProvider(project:Project) = provideProjectSiteProvider(workspace, project, serviceProvider, Some projectOptionsTable) - - /// Tell the checker to update the project info for the specified project id - member this.UpdateProjectInfoWithProjectId(projectId:ProjectId, userOpName) = - let hier = workspace.GetHierarchy(projectId) - match hier with - | null -> () - | h when (h.IsCapabilityMatch("CPS")) -> - let project = workspace.CurrentSolution.GetProject(projectId) - if not (isNull project) then - let siteProvider = this.ProvideProjectSiteProvider(project) - let projectSite = siteProvider.GetProjectSite() - if projectSite.CompilationSourceFiles.Length <> 0 then - this.UpdateProjectInfo(tryGetOrCreateProjectId, projectId, projectSite, userOpName) - | _ -> () - - /// Tell the checker to update the project info for the specified project id - member this.UpdateDocumenttInfoWithProjectId(projectId:ProjectId, documentId:DocumentId, userOpName) = - if workspace.IsDocumentOpen(documentId) then - this.UpdateProjectInfoWithProjectId(projectId, userOpName) - - [] - /// This handles commandline change notifications from the Dotnet Project-system - member this.HandleCommandLineChanges(path:string, sources:ImmutableArray, references:ImmutableArray, options:ImmutableArray) = - let fullPath p = - if Path.IsPathRooted(p) then p - else Path.Combine(Path.GetDirectoryName(path), p) - let sourcePaths = sources |> Seq.map(fun s -> fullPath s.Path) |> Seq.toArray - let referencePaths = references |> Seq.map(fun r -> fullPath r.Reference) |> Seq.toArray - let projectId = workspace.ProjectTracker.GetOrCreateProjectIdForPath(path, projectDisplayNameOf path) - projectOptionsTable.SetOptionsWithProjectId(projectId, sourcePaths, referencePaths, options.ToArray()) - this.UpdateProjectInfoWithProjectId(projectId, "HandleCommandLineChanges") - - member __.Checker = checkerProvider.Checker +#nowarn "9" // NativePtr.toNativeInt // Used to expose FSharpChecker/ProjectInfo manager to diagnostic providers // Diagnostic providers can be executed in environment that does not use MEF so they can rely only @@ -271,51 +74,103 @@ type internal FSharpCheckerWorkspaceServiceFactory member this.Checker = checkerProvider.Checker member this.FSharpProjectOptionsManager = projectInfoManager } -type - [] - [, "F#", null, "IntelliSense", "6008")>] - [, "F#", null, "QuickInfo", "6009")>] - [, "F#", null, "Code Fixes", "6010")>] - [, "F#", null, "Performance", "6011")>] - [, - strLanguageName = FSharpConstants.FSharpLanguageName, - languageResourceID = 100, - MatchBraces = true, - MatchBracesAtCaret = true, - ShowCompletion = true, - ShowMatchingBrace = true, - ShowSmartIndent = true, - EnableAsyncCompletion = true, - QuickInfo = true, - DefaultToInsertSpaces = true, - CodeSense = true, - DefaultToNonHotURLs = true, - RequestStockColors = true, - EnableCommenting = true, - CodeSenseDelay = 100, - ShowDropDownOptions = true)>] - internal FSharpPackage() = +[, Microsoft.CodeAnalysis.Host.Mef.ServiceLayer.Default)>] +type internal FSharpSettingsFactory + [] (settings: EditorOptions) = + interface Microsoft.CodeAnalysis.Host.Mef.IWorkspaceServiceFactory with + member this.CreateService(_) = upcast settings + +[] +[, + "F# Tools", "F# Interactive", // category/sub-category on Tools>Options... + 6000s, 6001s, // resource id for localisation of the above + true)>] // true = supports automation +[] // <-- resource ID for localised name +[, + // The following should place the ToolWindow with the OutputWindow by default. + Orientation=ToolWindowOrientation.Bottom, + Style=VsDockStyle.Tabbed, + PositionX = 0, + PositionY = 0, + Width = 360, + Height = 120, + Window="34E76E81-EE4A-11D0-AE2E-00A0C90FFFC3")>] +[, "F#", null, "IntelliSense", "6008")>] +[, "F#", null, "QuickInfo", "6009")>] +[, "F#", null, "Code Fixes", "6010")>] +[, "F#", null, "Performance", "6011")>] +[, "F#", null, "Advanced", "6012")>] +[, "F#", null, "CodeLens", "6013")>] +[] +// 64 represents a hex number. It needs to be greater than 37 so the TextMate editor will not be chosen as higher priority. +[, ".fs", 64)>] +[, ".fsi", 64)>] +[, ".fsscript", 64)>] +[, ".fsx", 64)>] +[, ".ml", 64)>] +[, ".mli", 64)>] +[, 101s, CommonPhysicalViewAttributes = Constants.FSharpEditorFactoryPhysicalViewAttributes)>] +[, ".fs")>] +[, ".fsi")>] +[, ".fsx")>] +[, ".fsscript")>] +[, ".ml")>] +[, ".mli")>] +[] +[, + strLanguageName = FSharpConstants.FSharpLanguageName, + languageResourceID = 100, + MatchBraces = true, + MatchBracesAtCaret = true, + ShowCompletion = true, + ShowMatchingBrace = true, + ShowSmartIndent = true, + EnableAsyncCompletion = true, + QuickInfo = true, + DefaultToInsertSpaces = true, + CodeSense = true, + DefaultToNonHotURLs = true, + RequestStockColors = true, + EnableCommenting = true, + CodeSenseDelay = 100, + ShowDropDownOptions = true)>] +type internal FSharpPackage() as this = inherit AbstractPackage() + let mutable vfsiToolWindow = Unchecked.defaultof + let GetToolWindowAsITestVFSI() = + if vfsiToolWindow = Unchecked.defaultof<_> then + vfsiToolWindow <- this.FindToolWindow(typeof, 0, true) :?> Microsoft.VisualStudio.FSharp.Interactive.FsiToolWindow + vfsiToolWindow :> Microsoft.VisualStudio.FSharp.Interactive.ITestVFSI + + // FSI-LINKAGE-POINT: unsited init + do Microsoft.VisualStudio.FSharp.Interactive.Hooks.fsiConsoleWindowPackageCtorUnsited (this :> Package) + override this.Initialize() = base.Initialize() - this.ComponentModel.GetService() |> ignore + + // FSI-LINKAGE-POINT: sited init + let commandService = this.GetService(typeof) :?> OleMenuCommandService // FSI-LINKAGE-POINT + Microsoft.VisualStudio.FSharp.Interactive.Hooks.fsiConsoleWindowPackageInitalizeSited (this :> Package) commandService + // FSI-LINKAGE-POINT: private method GetDialogPage forces fsi options to be loaded + let _fsiPropertyPage = this.GetDialogPage(typeof) + + () override this.RoslynLanguageName = FSharpConstants.FSharpLanguageName override this.CreateWorkspace() = this.ComponentModel.GetService() - override this.CreateLanguageService() = FSharpLanguageService(this) - override this.CreateEditorFactories() = Seq.empty + override this.CreateLanguageService() = FSharpLanguageService(this, this.GetService(typeof) :?> IVsSolution) + override this.CreateEditorFactories() = seq { yield FSharpEditorFactory(this) :> IVsEditorFactory } override this.RegisterMiscellaneousFilesWorkspaceInformation(_) = () -type - [] - [, ".fs")>] - [, ".fsi")>] - [, ".fsx")>] - [, ".fsscript")>] - [, ".ml")>] - [, ".mli")>] - internal FSharpLanguageService(package : FSharpPackage) = + interface Microsoft.VisualStudio.FSharp.Interactive.ITestVFSI with + member this.SendTextInteraction(s:string) = + GetToolWindowAsITestVFSI().SendTextInteraction(s) + member this.GetMostRecentLines(n:int) : string[] = + GetToolWindowAsITestVFSI().GetMostRecentLines(n) + +[] +type internal FSharpLanguageService(package : FSharpPackage, solution: IVsSolution) = inherit AbstractLanguageService(package) let projectInfoManager = package.ComponentModel.DefaultExportProvider.GetExport().Value @@ -324,231 +179,55 @@ type if String.IsNullOrWhiteSpace projectFileName then projectFileName else Path.GetFileNameWithoutExtension projectFileName - let singleFileProjects = ConcurrentDictionary<_, AbstractProject>() + let singleFileProjects = ConcurrentDictionary<_, IWorkspaceProjectContext>() let tryRemoveSingleFileProject projectId = match singleFileProjects.TryRemove(projectId) with | true, project -> projectInfoManager.ClearInfoForSingleFileProject(projectId) - project.Disconnect() + project.Dispose() | _ -> () - let invalidPathChars = set (Path.GetInvalidPathChars()) - let isPathWellFormed (path: string) = not (String.IsNullOrWhiteSpace path) && path |> Seq.forall (fun c -> not (Set.contains c invalidPathChars)) - let tryGetOrCreateProjectId (workspace: VisualStudioWorkspaceImpl) (projectFileName: string) = let projectDisplayName = projectDisplayNameOf projectFileName Some (workspace.ProjectTracker.GetOrCreateProjectIdForPath(projectFileName, projectDisplayName)) - let optionsAssociation = ConditionalWeakTable() - - member private this.OnProjectAdded(projectId:ProjectId) = projectInfoManager.UpdateProjectInfoWithProjectId(projectId, "OnProjectAdded") - member private this.OnProjectReloaded(projectId:ProjectId) = projectInfoManager.UpdateProjectInfoWithProjectId(projectId, "OnProjectReloaded") - member private this.OnDocumentAdded(projectId:ProjectId, documentId:DocumentId) = projectInfoManager.UpdateDocumenttInfoWithProjectId(projectId, documentId, "OnDocumentAdded") - member private this.OnDocumentChanged(projectId:ProjectId, documentId:DocumentId) = projectInfoManager.UpdateDocumenttInfoWithProjectId(projectId, documentId, "OnDocumentChanged") - member private this.OnDocumentReloaded(projectId:ProjectId, documentId:DocumentId) = projectInfoManager.UpdateDocumenttInfoWithProjectId(projectId, documentId, "OnDocumentReloaded") + let mutable legacyProjectWorkspaceMap = Unchecked.defaultof override this.Initialize() = base.Initialize() - let workspaceChanged (args:WorkspaceChangeEventArgs) = - match args.Kind with - | WorkspaceChangeKind.ProjectAdded -> this.OnProjectAdded(args.ProjectId) - | WorkspaceChangeKind.ProjectReloaded -> this.OnProjectReloaded(args.ProjectId) - | WorkspaceChangeKind.DocumentAdded -> this.OnDocumentAdded(args.ProjectId, args.DocumentId) - | WorkspaceChangeKind.DocumentChanged -> this.OnDocumentChanged(args.ProjectId, args.DocumentId) - | WorkspaceChangeKind.DocumentReloaded -> this.OnDocumentReloaded(args.ProjectId, args.DocumentId) - | WorkspaceChangeKind.DocumentRemoved - | WorkspaceChangeKind.ProjectRemoved - | WorkspaceChangeKind.AdditionalDocumentAdded - | WorkspaceChangeKind.AdditionalDocumentReloaded - | WorkspaceChangeKind.AdditionalDocumentRemoved - | WorkspaceChangeKind.AdditionalDocumentChanged - | WorkspaceChangeKind.DocumentInfoChanged - | WorkspaceChangeKind.DocumentChanged - | WorkspaceChangeKind.SolutionAdded - | WorkspaceChangeKind.SolutionChanged - | WorkspaceChangeKind.SolutionReloaded - | WorkspaceChangeKind.SolutionCleared - | _ -> () - this.Workspace.Options <- this.Workspace.Options.WithChangedOption(Completion.CompletionOptions.BlockForCompletionItems, FSharpConstants.FSharpLanguageName, false) this.Workspace.Options <- this.Workspace.Options.WithChangedOption(Shared.Options.ServiceFeatureOnOffOptions.ClosedFileDiagnostic, FSharpConstants.FSharpLanguageName, Nullable false) - this.Workspace.WorkspaceChanged.Add(workspaceChanged) - this.Workspace.DocumentClosed.Add <| fun args -> tryRemoveSingleFileProject args.Document.Project.Id - Events.SolutionEvents.OnAfterCloseSolution.Add <| fun _ -> - //checkerProvider.Checker.StopBackgroundCompile() - - // FUTURE: consider enbling some or all of these to flush all caches and stop all background builds. However the operations - // are asynchronous and we need to decide if we stop everything synchronously. - - //checker.ClearLanguageServiceRootCachesAndCollectAndFinalizeAllTransients() - //checkerProvider.Checker.InvalidateAll() - - singleFileProjects.Keys |> Seq.iter tryRemoveSingleFileProject - - let ctx = System.Threading.SynchronizationContext.Current - - let rec setupProjectsAfterSolutionOpen() = - async { - use openedProjects = MailboxProcessor.Start <| fun inbox -> - async { - // waits for AfterOpenSolution and then starts projects setup - do! Async.AwaitEvent Events.SolutionEvents.OnAfterOpenSolution |> Async.Ignore - while true do - let! siteProvider = inbox.Receive() - do! Async.SwitchToContext ctx - this.SetupProjectFile(siteProvider, this.Workspace, "SetupProjectsAfterSolutionOpen") - do! Async.SwitchToThreadPool() - } - - use _ = Events.SolutionEvents.OnAfterOpenProject |> Observable.subscribe ( fun args -> - match args.Hierarchy with - | :? IProvideProjectSite as siteProvider -> openedProjects.Post(siteProvider) - | _ -> () ) + this.Workspace.DocumentClosed.Add <| fun args -> tryRemoveSingleFileProject args.Document.Project.Id - do! Async.AwaitEvent Events.SolutionEvents.OnAfterCloseSolution |> Async.Ignore - do! setupProjectsAfterSolutionOpen() - } - setupProjectsAfterSolutionOpen() |> Async.StartImmediate + legacyProjectWorkspaceMap <- LegacyProjectWorkspaceMap(this.Workspace, solution, projectInfoManager, package.ComponentModel.GetService(), this.SystemServiceProvider) + legacyProjectWorkspaceMap.Initialize() let theme = package.ComponentModel.DefaultExportProvider.GetExport().Value theme.SetColors() - - /// Sync the Roslyn information for the project held in 'projectContext' to match the information given by 'site'. - /// Also sync the info in ProjectInfoManager if necessary. - member this.SyncProject(project: AbstractProject, projectContext: IWorkspaceProjectContext, site: IProjectSite, workspace, forceUpdate, userOpName) = - let wellFormedFilePathSetIgnoreCase (paths: seq) = - HashSet(paths |> Seq.filter isPathWellFormed |> Seq.map (fun s -> try Path.GetFullPath(s) with _ -> s), StringComparer.OrdinalIgnoreCase) - - let mutable updated = forceUpdate - - // Sync the source files in projectContext. Note that these source files are __not__ maintained in order in projectContext - // as edits are made. It seems this is ok because the source file list is only used to drive roslyn per-file checking. - let updatedFiles = site.CompilationSourceFiles |> wellFormedFilePathSetIgnoreCase - let originalFiles = project.GetCurrentDocuments() |> Seq.map (fun file -> file.FilePath) |> wellFormedFilePathSetIgnoreCase - - for file in updatedFiles do - if not(originalFiles.Contains(file)) then - projectContext.AddSourceFile(file) - updated <- true - - for file in originalFiles do - if not(updatedFiles.Contains(file)) then - projectContext.RemoveSourceFile(file) - updated <- true - - let updatedRefs = site.CompilationReferences |> wellFormedFilePathSetIgnoreCase - let originalRefs = project.GetCurrentMetadataReferences() |> Seq.map (fun ref -> ref.FilePath) |> wellFormedFilePathSetIgnoreCase - - for ref in updatedRefs do - if not(originalRefs.Contains(ref)) then - projectContext.AddMetadataReference(ref, MetadataReferenceProperties.Assembly) - updated <- true - - for ref in originalRefs do - if not(updatedRefs.Contains(ref)) then - projectContext.RemoveMetadataReference(ref) - updated <- true - - // Update the project options association - let ok,originalOptions = optionsAssociation.TryGetValue(projectContext) - let updatedOptions = site.CompilationOptions - if not ok || originalOptions <> updatedOptions then - - // OK, project options have changed, try to fake out Roslyn to convince it to reparse things. - // Calling SetOptions fails because the CPS project system being used by the F# project system - // imlpementation at the moment has no command line parser installed, so we remove/add all the files - // instead. A change of flags doesn't happen very often and the remove/add is fast in any case. - //projectContext.SetOptions(String.concat " " updatedOptions) - for file in updatedFiles do - projectContext.RemoveSourceFile(file) - projectContext.AddSourceFile(file) - - // Record the last seen options as an associated value - if ok then optionsAssociation.Remove(projectContext) |> ignore - optionsAssociation.Add(projectContext, updatedOptions) - - updated <- true - - // update the cached options - if updated then - projectInfoManager.UpdateProjectInfo(tryGetOrCreateProjectId workspace, project.Id, site, userOpName + ".SyncProject") - - member this.SetupProjectFile(siteProvider: IProvideProjectSite, workspace: VisualStudioWorkspaceImpl, userOpName) = - let userOpName = userOpName + ".SetupProjectFile" - let rec setup (site: IProjectSite) = - let projectGuid = Guid(site.ProjectGuid) - let projectFileName = site.ProjectFileName - let projectDisplayName = projectDisplayNameOf projectFileName - - let projectId = workspace.ProjectTracker.GetOrCreateProjectIdForPath(projectFileName, projectDisplayName) - - if isNull (workspace.ProjectTracker.GetProject projectId) then - let projectContextFactory = package.ComponentModel.GetService(); - let errorReporter = ProjectExternalErrorReporter(projectId, "FS", this.SystemServiceProvider) - - let hierarchy = - site.ProjectProvider - |> Option.map (fun p -> p :?> IVsHierarchy) - |> Option.toObj - - // Roslyn is expecting site to be an IVsHierarchy. - // It just so happens that the object that implements IProvideProjectSite is also - // an IVsHierarchy. This assertion is to ensure that the assumption holds true. - Debug.Assert(not (isNull hierarchy), "About to CreateProjectContext with a non-hierarchy site") - - let projectContext = - projectContextFactory.CreateProjectContext( - FSharpConstants.FSharpLanguageName, - projectDisplayName, - projectFileName, - projectGuid, - hierarchy, - Option.toObj site.CompilationBinOutputPath, - errorReporter) - - let project = projectContext :?> AbstractProject - - // Sync IProjectSite --> projectContext, and IProjectSite --> ProjectInfoManage - this.SyncProject(project, projectContext, site, workspace, forceUpdate=true, userOpName=userOpName) - - site.BuildErrorReporter <- Some (errorReporter :> Microsoft.VisualStudio.Shell.Interop.IVsLanguageServiceBuildErrorReporter2) - - // TODO: consider forceUpdate = false here. forceUpdate=true may be causing repeated computation? - site.AdviseProjectSiteChanges(FSharpConstants.FSharpLanguageServiceCallbackName, - AdviseProjectSiteChanges(fun () -> this.SyncProject(project, projectContext, site, workspace, forceUpdate=true, userOpName="AdviseProjectSiteChanges."+userOpName))) - - site.AdviseProjectSiteClosed(FSharpConstants.FSharpLanguageServiceCallbackName, - AdviseProjectSiteChanges(fun () -> - projectInfoManager.ClearInfoForProject(project.Id) - optionsAssociation.Remove(projectContext) |> ignore - project.Disconnect())) - - for referencedSite in ProjectSitesAndFiles.GetReferencedProjectSites(site, this.SystemServiceProvider, Some (this.Workspace :>obj), Some projectInfoManager.FSharpOptions ) do - setup referencedSite - - setup (siteProvider.GetProjectSite()) member this.SetupStandAloneFile(fileName: string, fileContents: string, workspace: VisualStudioWorkspaceImpl, hier: IVsHierarchy) = let loadTime = DateTime.Now let projectFileName = fileName let projectDisplayName = projectDisplayNameOf projectFileName - let projectId = workspace.ProjectTracker.GetOrCreateProjectIdForPath(projectFileName, projectDisplayName) - let _referencedProjectFileNames, parsingOptions, projectOptions = projectInfoManager.ComputeSingleFileOptions (tryGetOrCreateProjectId workspace, fileName, loadTime, fileContents) |> Async.RunSynchronously - projectInfoManager.AddOrUpdateSingleFileProject(projectId, (loadTime, parsingOptions, projectOptions)) + let mutable projectId = workspace.ProjectTracker.GetOrCreateProjectIdForPath(projectFileName, projectDisplayName) if isNull (workspace.ProjectTracker.GetProject projectId) then let projectContextFactory = package.ComponentModel.GetService(); - let errorReporter = ProjectExternalErrorReporter(projectId, "FS", this.SystemServiceProvider) - let projectContext = projectContextFactory.CreateProjectContext(FSharpConstants.FSharpLanguageName, projectDisplayName, projectFileName, projectId.Id, hier, null, errorReporter) + let projectContext = projectContextFactory.CreateProjectContext(FSharpConstants.FSharpLanguageName, projectDisplayName, projectFileName, projectId.Id, hier, null) + + projectId <- workspace.ProjectTracker.GetOrCreateProjectIdForPath(projectFileName, projectDisplayName) + projectContext.AddSourceFile(fileName) - let project = projectContext :?> AbstractProject - singleFileProjects.[projectId] <- project + singleFileProjects.[projectId] <- projectContext + + let _referencedProjectFileNames, parsingOptions, projectOptions = projectInfoManager.ComputeSingleFileOptions (tryGetOrCreateProjectId workspace, fileName, loadTime, fileContents) |> Async.RunSynchronously + projectInfoManager.AddOrUpdateSingleFileProject(projectId, (loadTime, parsingOptions, projectOptions)) override this.ContentTypeName = FSharpConstants.FSharpContentTypeName override this.LanguageName = FSharpConstants.FSharpLanguageName @@ -564,29 +243,50 @@ type let textViewAdapter = package.ComponentModel.GetService() + // Toggles outlining (or code folding) based on settings + let outliningManagerService = this.Package.ComponentModel.GetService() + let wpfTextView = this.EditorAdaptersFactoryService.GetWpfTextView(textView) + let outliningManager = outliningManagerService.GetOutliningManager(wpfTextView) + if not (isNull outliningManager) then + let settings = this.Workspace.Services.GetService() + outliningManager.Enabled <- settings.Advanced.IsOutliningEnabled + match textView.GetBuffer() with | (VSConstants.S_OK, textLines) -> let filename = VsTextLines.GetFilename textLines - // CPS projects don't implement IProvideProjectSite and IVSProjectHierarchy - // Simple explanation: - // Legacy projects have IVSHierarchy and IPRojectSite - // CPS Projects and loose script files don't match VsRunningDocumentTable.FindDocumentWithoutLocking(package.RunningDocumentTable,filename) with | Some (hier, _) -> + + + // Check if the file is in a CPS project or not. + // CPS projects don't implement IProvideProjectSite and IVSProjectHierarchy + // Simple explanation: + // Legacy projects have IVSHierarchy and IProjectSite + // CPS Projects, out-of-project file and script files don't + match hier with - | :? IProvideProjectSite as siteProvider when not (IsScript(filename)) -> - this.SetupProjectFile(siteProvider, this.Workspace, "SetupNewTextView") - | _ when not (IsScript(filename)) -> + | :? IProvideProjectSite as _siteProvider when not (IsScript(filename)) -> + + // This is the path for .fs/.fsi files in legacy projects + () + | h when not (isNull h) && not (IsScript(filename)) -> let docId = this.Workspace.CurrentSolution.GetDocumentIdsWithFilePath(filename).FirstOrDefault() match docId with | null -> - let fileContents = VsTextLines.GetFileContents(textLines, textViewAdapter) - this.SetupStandAloneFile(filename, fileContents, this.Workspace, hier) - | id -> - projectInfoManager.UpdateProjectInfoWithProjectId(id.ProjectId, "SetupNewTextView") + if not (h.IsCapabilityMatch("CPS")) then + + // This is the path when opening out-of-project .fs/.fsi files in CPS projects + + let fileContents = VsTextLines.GetFileContents(textLines, textViewAdapter) + this.SetupStandAloneFile(filename, fileContents, this.Workspace, hier) + | _ -> () | _ -> + + // This is the path for both in-project and out-of-project .fsx files + let fileContents = VsTextLines.GetFileContents(textLines, textViewAdapter) this.SetupStandAloneFile(filename, fileContents, this.Workspace, hier) + | _ -> () | _ -> () diff --git a/vsintegration/src/FSharp.Editor/LanguageService/LegacyProjectWorkspaceMap.fs b/vsintegration/src/FSharp.Editor/LanguageService/LegacyProjectWorkspaceMap.fs new file mode 100644 index 00000000000..dfca72cba99 --- /dev/null +++ b/vsintegration/src/FSharp.Editor/LanguageService/LegacyProjectWorkspaceMap.fs @@ -0,0 +1,201 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace Microsoft.VisualStudio.FSharp.Editor + +#nowarn "40" + +open System +open System.Collections.Concurrent +open System.Collections.Generic +open System.Diagnostics +open System.IO +open System.Linq +open System.Runtime.CompilerServices +open Microsoft.CodeAnalysis +open Microsoft.VisualStudio +open Microsoft.VisualStudio.FSharp.Editor +open Microsoft.VisualStudio.FSharp.Editor.SiteProvider +open Microsoft.VisualStudio.LanguageServices.Implementation.ProjectSystem +open Microsoft.VisualStudio.LanguageServices.ProjectSystem +open Microsoft.VisualStudio.Shell.Interop + +[] +type internal LegacyProjectWorkspaceMap(workspace: VisualStudioWorkspaceImpl, + solution: IVsSolution, + projectInfoManager: FSharpProjectOptionsManager, + projectContextFactory: IWorkspaceProjectContextFactory, + serviceProvider: IServiceProvider) as this = + + let invalidPathChars = set (Path.GetInvalidPathChars()) + let optionsAssociation = ConditionalWeakTable() + let isPathWellFormed (path: string) = not (String.IsNullOrWhiteSpace path) && path |> Seq.forall (fun c -> not (Set.contains c invalidPathChars)) + + let legacyProjectLookup = ConcurrentDictionary() + + let tryGetOrCreateProjectId (workspace: VisualStudioWorkspaceImpl) (projectFileName: string) = + let projectDisplayName = projectDisplayNameOf projectFileName + Some (workspace.ProjectTracker.GetOrCreateProjectIdForPath(projectFileName, projectDisplayName)) + + member this.Initialize() = + solution.AdviseSolutionEvents(this) |> ignore + + /// Sync the Roslyn information for the project held in 'projectContext' to match the information given by 'site'. + /// Also sync the info in ProjectInfoManager if necessary. + member this.SyncLegacyProject(projectId: ProjectId, projectContext: IWorkspaceProjectContext, site: IProjectSite, workspace: VisualStudioWorkspaceImpl, forceUpdate, userOpName) = + let wellFormedFilePathSetIgnoreCase (paths: seq) = + HashSet(paths |> Seq.filter isPathWellFormed |> Seq.map (fun s -> try Path.GetFullPath(s) with _ -> s), StringComparer.OrdinalIgnoreCase) + + let mutable updated = forceUpdate + + // Sync the source files in projectContext. Note that these source files are __not__ maintained in order in projectContext + // as edits are made. It seems this is ok because the source file list is only used to drive roslyn per-file checking. + let updatedFiles = site.CompilationSourceFiles |> wellFormedFilePathSetIgnoreCase + let originalFiles = + match legacyProjectLookup.TryGetValue(projectId) with + | true, (originalFiles, _) -> originalFiles + | _ -> HashSet() + + for file in updatedFiles do + if not(originalFiles.Contains(file)) then + projectContext.AddSourceFile(file) + updated <- true + + for file in originalFiles do + if not(updatedFiles.Contains(file)) then + projectContext.RemoveSourceFile(file) + updated <- true + + let updatedRefs = site.CompilationReferences |> wellFormedFilePathSetIgnoreCase + let originalRefs = + match legacyProjectLookup.TryGetValue(projectId) with + | true, (_, originalRefs) -> originalRefs + | _ -> HashSet() + + for ref in updatedRefs do + if not(originalRefs.Contains(ref)) then + projectContext.AddMetadataReference(ref, MetadataReferenceProperties.Assembly) + updated <- true + + for ref in originalRefs do + if not(updatedRefs.Contains(ref)) then + projectContext.RemoveMetadataReference(ref) + updated <- true + + // Update the project options association + let ok,originalOptions = optionsAssociation.TryGetValue(projectContext) + let updatedOptions = site.CompilationOptions + if not ok || originalOptions <> updatedOptions then + + // OK, project options have changed, try to fake out Roslyn to convince it to reparse things. + // Calling SetOptions fails because the CPS project system being used by the F# project system + // imlpementation at the moment has no command line parser installed, so we remove/add all the files + // instead. A change of flags doesn't happen very often and the remove/add is fast in any case. + //projectContext.SetOptions(String.concat " " updatedOptions) + for file in updatedFiles do + projectContext.RemoveSourceFile(file) + projectContext.AddSourceFile(file) + + // Record the last seen options as an associated value + if ok then optionsAssociation.Remove(projectContext) |> ignore + optionsAssociation.Add(projectContext, updatedOptions) + + updated <- true + + // update the cached options + if updated then + projectInfoManager.UpdateProjectInfo(tryGetOrCreateProjectId workspace, projectId, site, userOpName + ".SyncLegacyProject", invalidateConfig=true) + + let info = (updatedFiles, updatedRefs) + legacyProjectLookup.AddOrUpdate(projectId, info, fun _ _ -> info) |> ignore + + member this.SetupLegacyProjectFile(siteProvider: IProvideProjectSite, workspace: VisualStudioWorkspaceImpl, userOpName) = + let userOpName = userOpName + ".SetupProjectFile" + let rec setup (site: IProjectSite) = + let projectGuid = Guid(site.ProjectGuid) + let projectFileName = site.ProjectFileName + let projectDisplayName = projectDisplayNameOf projectFileName + + // This projectId is not guaranteed to be the same ProjectId that will actually be created once we call CreateProjectContext + // in Roslyn versions once https://github.com/dotnet/roslyn/pull/26931 is merged. Roslyn will still guarantee that once + // there is a project in the workspace with the same path, it'll return the ID of that. So this is sufficient to use + // in that case as long as we only use it to call GetProject. + let fakeProjectId = workspace.ProjectTracker.GetOrCreateProjectIdForPath(projectFileName, projectDisplayName) + + if isNull (workspace.ProjectTracker.GetProject fakeProjectId) then + let hierarchy = + site.ProjectProvider + |> Option.map (fun p -> p :?> IVsHierarchy) + |> Option.toObj + + // Roslyn is expecting site to be an IVsHierarchy. + // It just so happens that the object that implements IProvideProjectSite is also + // an IVsHierarchy. This assertion is to ensure that the assumption holds true. + Debug.Assert(not (isNull hierarchy), "About to CreateProjectContext with a non-hierarchy site") + + let projectContext = + projectContextFactory.CreateProjectContext( + FSharpConstants.FSharpLanguageName, + projectDisplayName, + projectFileName, + projectGuid, + hierarchy, + Option.toObj site.CompilationBinOutputPath) + + // The real project ID that was actually added. See comments for fakeProjectId why this one is actually good. + let realProjectId = workspace.ProjectTracker.GetOrCreateProjectIdForPath(projectFileName, projectDisplayName) + + // Sync IProjectSite --> projectContext, and IProjectSite --> ProjectInfoManage + this.SyncLegacyProject(realProjectId, projectContext, site, workspace, forceUpdate=true, userOpName=userOpName) + + site.BuildErrorReporter <- Some (projectContext :?> Microsoft.VisualStudio.Shell.Interop.IVsLanguageServiceBuildErrorReporter2) + + // TODO: consider forceUpdate = false here. forceUpdate=true may be causing repeated computation? + site.AdviseProjectSiteChanges(FSharpConstants.FSharpLanguageServiceCallbackName, + AdviseProjectSiteChanges(fun () -> this.SyncLegacyProject(realProjectId, projectContext, site, workspace, forceUpdate=true, userOpName="AdviseProjectSiteChanges."+userOpName))) + + site.AdviseProjectSiteClosed(FSharpConstants.FSharpLanguageServiceCallbackName, + AdviseProjectSiteChanges(fun () -> + projectInfoManager.ClearInfoForProject(realProjectId) + optionsAssociation.Remove(projectContext) |> ignore + projectContext.Dispose())) + + for referencedSite in ProjectSitesAndFiles.GetReferencedProjectSites(Some realProjectId, site, serviceProvider, Some (workspace :>obj), Some projectInfoManager.FSharpOptions ) do + setup referencedSite + + setup (siteProvider.GetProjectSite()) + + interface IVsSolutionEvents with + + member __.OnAfterCloseSolution(_) = VSConstants.S_OK + + member __.OnAfterLoadProject(_, _) = VSConstants.S_OK + + member __.OnAfterOpenProject(hier, _) = + match hier with + | :? IProvideProjectSite as siteProvider -> + this.SetupLegacyProjectFile(siteProvider, workspace, "LegacyProjectWorkspaceMap.Initialize") + | _ -> () + VSConstants.S_OK + + member __.OnAfterOpenSolution(_, _) = VSConstants.S_OK + + member __.OnBeforeCloseProject(hier, _) = + match hier with + | :? IProvideProjectSite as siteProvider -> + let site = siteProvider.GetProjectSite() + let projectFileName = site.ProjectFileName + let projectDisplayName = projectDisplayNameOf projectFileName + let projectId = workspace.ProjectTracker.GetOrCreateProjectIdForPath(projectFileName, projectDisplayName) + legacyProjectLookup.TryRemove(projectId) |> ignore + | _ -> () + VSConstants.S_OK + + member __.OnBeforeCloseSolution(_) = VSConstants.S_OK + + member __.OnBeforeUnloadProject(_, _) = VSConstants.S_OK + + member __.OnQueryCloseProject(_, _, _) = VSConstants.S_OK + + member __.OnQueryCloseSolution(_, _) = VSConstants.S_OK + + member __.OnQueryUnloadProject(_, _) = VSConstants.S_OK \ No newline at end of file diff --git a/vsintegration/src/FSharp.Editor/LanguageService/ProjectSitesAndFiles.fs b/vsintegration/src/FSharp.Editor/LanguageService/ProjectSitesAndFiles.fs new file mode 100644 index 00000000000..1bea848dae2 --- /dev/null +++ b/vsintegration/src/FSharp.Editor/LanguageService/ProjectSitesAndFiles.fs @@ -0,0 +1,333 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +module internal rec Microsoft.VisualStudio.FSharp.Editor.SiteProvider + +open System +open System.IO +open System.Collections.Concurrent +open System.Diagnostics + +open Microsoft.FSharp.Compiler.SourceCodeServices +open Microsoft.CodeAnalysis +open Microsoft.VisualStudio +open Microsoft.VisualStudio.LanguageServices +open Microsoft.VisualStudio.LanguageServices.Implementation.ProjectSystem +open Microsoft.VisualStudio.LanguageServices.Implementation.TaskList +open Microsoft.VisualStudio.Shell.Interop +open Microsoft.VisualStudio.TextManager.Interop + +open VSLangProj + +/// An additional interface that an IProjectSite object can implement to indicate it has an FSharpProjectOptions +/// already available, so we don't have to recreate it +type private IHaveCheckOptions = + abstract OriginalCheckOptions : unit -> string[] * FSharpProjectOptions + +let projectDisplayNameOf projectFileName = + if String.IsNullOrWhiteSpace projectFileName then projectFileName + else Path.GetFileNameWithoutExtension projectFileName + +/// A value and a function to recompute/refresh the value. The function is passed a flag indicating if a refresh is happening. +type Refreshable<'T> = 'T * (bool -> 'T) + +/// Convert from FSharpProjectOptions into IProjectSite. +type private ProjectSiteOfScriptFile(filename:string, referencedProjectFileNames, checkOptions: FSharpProjectOptions) = + interface IProjectSite with + override __.Description = sprintf "Script Closure at Root %s" filename + override __.CompilationSourceFiles = checkOptions.SourceFiles + override __.CompilationOptions = checkOptions.OtherOptions + override __.CompilationReferences = + checkOptions.OtherOptions + |> Array.choose (fun flag -> if flag.StartsWith("-r:") then Some flag.[3..] else None) + override __.CompilationBinOutputPath = None + override __.ProjectFileName = checkOptions.ProjectFileName + override __.BuildErrorReporter with get() = None and set _ = () + override __.AdviseProjectSiteChanges(_,_) = () + override __.AdviseProjectSiteCleaned(_,_) = () + override __.AdviseProjectSiteClosed(_,_) = () + override __.IsIncompleteTypeCheckEnvironment = checkOptions.IsIncompleteTypeCheckEnvironment + override __.TargetFrameworkMoniker = "" + override __.ProjectGuid = "" + override __.LoadTime = checkOptions.LoadTime + override __.ProjectProvider = None + + interface IHaveCheckOptions with + override __.OriginalCheckOptions() = (referencedProjectFileNames, checkOptions) + + override __.ToString() = sprintf "ProjectSiteOfScriptFile(%s)" filename + +/// An orphan file project is a .fs, .ml, .fsi, .mli that is not associated with a .fsproj. +/// By design, these are never going to typecheck because there is no affiliated references. +/// We show many squiggles in this case because they're not particularly informational. +type private ProjectSiteOfSingleFile(sourceFile) = + // CompilerFlags() gets called a lot, so pre-compute what we can + static let compilerFlags = + let flags = ["--noframework";"--warn:3"] + let assumeDotNetFramework = true + let defaultReferences = + [ for r in CompilerEnvironment.DefaultReferencesForOrphanSources(assumeDotNetFramework) do + yield sprintf "-r:%s%s" r (if r.EndsWith(".dll",StringComparison.OrdinalIgnoreCase) then "" else ".dll") ] + (flags @ defaultReferences) + |> List.toArray + |> Array.choose (fun flag -> if flag.StartsWith("-r:") then Some flag.[3..] elif flag.StartsWith("--reference:") then Some flag.[12..] else None) + + let projectFileName = sourceFile + ".orphan.fsproj" + + interface IProjectSite with + override __.Description = projectFileName + override __.CompilationSourceFiles = [|sourceFile|] + override __.CompilationOptions = compilerFlags + override __.CompilationReferences = compilerFlags + override __.CompilationBinOutputPath = None + override __.ProjectFileName = projectFileName + override __.BuildErrorReporter with get() = None and set _v = () + override __.AdviseProjectSiteChanges(_,_) = () + override __.AdviseProjectSiteCleaned(_,_) = () + override __.AdviseProjectSiteClosed(_,_) = () + override __.IsIncompleteTypeCheckEnvironment = true + override __.TargetFrameworkMoniker = "" + override __.ProjectGuid = "" + override __.LoadTime = new DateTime(2000,1,1) // any constant time is fine, orphan files do not interact with reloading based on update time + override __.ProjectProvider = None + + override __.ToString() = sprintf "ProjectSiteOfSingleFile(%s)" sourceFile + +/// Manage Storage of FSharpProjectOptions the options for a project +type internal FSharpProjectOptionsTable () = + + // A table of information about projects, excluding single-file projects. + let projectTable = ConcurrentDictionary>() + let commandLineOptions = new ConcurrentDictionary() + + /// Re-fetch all of the options for everything that references projectId + let refreshInfoForProjectsThatReferenceThisProject (projectId:ProjectId) = + for KeyValue(otherProjectId, ((referencedProjectIds, _parsingOptions, _site, _options), refresh)) in projectTable.ToArray() do + for referencedProjectId in referencedProjectIds do + if referencedProjectId = projectId then + projectTable.[otherProjectId] <- (refresh true, refresh) + + /// Add or update a project in the project table + member __.AddOrUpdateProject(projectId:ProjectId, refresh) = + projectTable.[projectId] <- (refresh false, refresh) + refreshInfoForProjectsThatReferenceThisProject(projectId) + + /// Clear a project from the project table + member __.ClearInfoForProject(projectId:ProjectId) = + projectTable.TryRemove(projectId) |> ignore + refreshInfoForProjectsThatReferenceThisProject projectId + + /// Get the options for a project + member __.TryGetOptionsForProject(projectId:ProjectId) = + match projectTable.TryGetValue(projectId) with + | true, ((_referencedProjects, parsingOptions, site, projectOptions), _) -> Some (parsingOptions, site, projectOptions) + | _ -> None + + /// Given a projectId return the most recent set of command line options for it + member __.GetCommandLineOptionsWithProjectId(projectId:ProjectId) = + match commandLineOptions.TryGetValue projectId with + | true, (sources, references, options) -> sources, references, options + | _ -> [||], [||], [||] + + /// Store the command line options for a projectId + member __.SetOptionsWithProjectId(projectId:ProjectId, sourcePaths:string[], referencePaths:string[], options:string[]) = + commandLineOptions.[projectId] <- (sourcePaths, referencePaths, options) + + +let internal provideProjectSiteProvider(workspace:VisualStudioWorkspaceImpl, project:Project, serviceProvider:System.IServiceProvider, projectOptionsTable:FSharpProjectOptionsTable option) = + let hier = workspace.GetHierarchy(project.Id) + let getCommandLineOptionsWithProjectId (projectId) = + match projectOptionsTable with + | Some (options) -> options.GetCommandLineOptionsWithProjectId(projectId) + | None -> [||], [||], [||] + { + new IProvideProjectSite with + member x.GetProjectSite() = + let fst (a, _, _) = a + let snd (_, b, _) = b + let mutable errorReporter = + let reporter = ProjectExternalErrorReporter(project.Id, "FS", serviceProvider) + Some(reporter:> IVsLanguageServiceBuildErrorReporter2) + + { + new IProjectSite with + member __.Description = project.Name + member __.CompilationSourceFiles = getCommandLineOptionsWithProjectId(project.Id) |> fst + member __.CompilationOptions = + let _,references,options = getCommandLineOptionsWithProjectId(project.Id) + Array.concat [options; references |> Array.map(fun r -> "-r:" + r)] + member __.CompilationReferences = getCommandLineOptionsWithProjectId(project.Id) |> snd + member site.CompilationBinOutputPath = site.CompilationOptions |> Array.tryPick (fun s -> if s.StartsWith("-o:") then Some s.[3..] else None) + member __.ProjectFileName = project.FilePath + member __.AdviseProjectSiteChanges(_,_) = () + member __.AdviseProjectSiteCleaned(_,_) = () + member __.AdviseProjectSiteClosed(_,_) = () + member __.IsIncompleteTypeCheckEnvironment = false + member __.TargetFrameworkMoniker = "" + member __.ProjectGuid = project.Id.Id.ToString() + member __.LoadTime = System.DateTime.Now + member __.ProjectProvider = Some (x) + member __.BuildErrorReporter with get () = errorReporter and set (v) = errorReporter <- v + } + interface IVsHierarchy with + member __.SetSite(psp) = hier.SetSite(psp) + member __.GetSite(psp) = hier.GetSite(ref psp) + member __.QueryClose(pfCanClose)= hier.QueryClose(ref pfCanClose) + member __.Close() = hier.Close() + member __.GetGuidProperty(itemid, propid, pguid) = hier.GetGuidProperty(itemid, propid, ref pguid) + member __.SetGuidProperty(itemid, propid, rguid) = hier.SetGuidProperty(itemid, propid, ref rguid) + member __.GetProperty(itemid, propid, pvar) = hier.GetProperty(itemid, propid, ref pvar) + member __.SetProperty(itemid, propid, var) = hier.SetProperty(itemid, propid, var) + member __.GetNestedHierarchy(itemid, iidHierarchyNested, ppHierarchyNested, pitemidNested) = + hier.GetNestedHierarchy(itemid, ref iidHierarchyNested, ref ppHierarchyNested, ref pitemidNested) + member __.GetCanonicalName(itemid, pbstrName) = hier.GetCanonicalName(itemid, ref pbstrName) + member __.ParseCanonicalName(pszName, pitemid) = hier.ParseCanonicalName(pszName, ref pitemid) + member __.Unused0() = hier.Unused0() + member __.AdviseHierarchyEvents(pEventSink, pdwCookie) = hier.AdviseHierarchyEvents(pEventSink, ref pdwCookie) + member __.UnadviseHierarchyEvents(dwCookie) = hier.UnadviseHierarchyEvents(dwCookie) + member __.Unused1() = hier.Unused1() + member __.Unused2() = hier.Unused2() + member __.Unused3() = hier.Unused3() + member __.Unused4() = hier.Unused4() + } + +/// Information about projects, open files and other active artifacts in visual studio. +/// Keeps track of the relationship between IVsTextLines buffers, IFSharpSource_DEPRECATED objects, IProjectSite objects and FSharpProjectOptions +[] +type internal ProjectSitesAndFiles() = + static let mutable stamp = 0L + + static let fullOutputAssemblyPath (p:EnvDTE.Project) = + let getProperty tag = + try Some (p.Properties.[tag].Value.ToString()) with _ -> None + getProperty "FullPath" + |> Option.bind (fun fullPath -> + (try Some (p.ConfigurationManager.ActiveConfiguration.Properties.["OutputPath"].Value.ToString()) with _ -> None) + |> Option.bind (fun outputPath -> + getProperty "OutputFileName" + |> Option.map (fun outputFileName -> Path.Combine(fullPath, outputPath, outputFileName)))) + |> Option.bind (fun path -> try Some (Path.GetFullPath path) with _ -> None) + + static let referencedProjects (projectSite:IProjectSite) = + match projectSite.ProjectProvider with + | None -> None + | Some (:? IVsHierarchy as hier) -> + match hier.GetProperty(VSConstants.VSITEMID_ROOT, int __VSHPROPID.VSHPROPID_ExtObject) with + | VSConstants.S_OK, (:? EnvDTE.Project as p) when not (isNull p) -> + Some ((p.Object :?> VSLangProj.VSProject).References + |> Seq.cast + |> Seq.choose (fun r -> + Option.ofObj r + |> Option.bind (fun r -> try Option.ofObj r.SourceProject with _ -> None)) ) + | _ -> None + | Some _ -> None + + static let rec referencedProvideProjectSites(projectIdOpt: ProjectId option, projectSite:IProjectSite, serviceProvider:System.IServiceProvider, extraProjectInfo:obj option, projectOptionsTable:FSharpProjectOptionsTable option) = + let getReferencesForSolutionService (solutionService:IVsSolution) = + [| + match referencedProjects projectSite, extraProjectInfo with + | None, Some (:? VisualStudioWorkspaceImpl as workspace) when not (isNull workspace.CurrentSolution)-> + let path = projectSite.ProjectFileName + if not (String.IsNullOrWhiteSpace(path)) then + match projectIdOpt with + | Some(projectId) -> + let project = workspace.CurrentSolution.GetProject(projectId) + if not (isNull project) then + for reference in project.ProjectReferences do + let project = workspace.CurrentSolution.GetProject(reference.ProjectId) + if not (isNull project) && project.Language = FSharpConstants.FSharpLanguageName then + let siteProvider = provideProjectSiteProvider (workspace, project, serviceProvider, projectOptionsTable) + let referenceProject = workspace.ProjectTracker.GetProject(reference.ProjectId) + let outputPath = referenceProject.BinOutputPath + yield Some project.Id, project.FilePath, outputPath, siteProvider + | _ -> () + + | (Some references), _ -> + for p in references do + match solutionService.GetProjectOfUniqueName(p.UniqueName) with + | VSConstants.S_OK, (:? IProvideProjectSite as ps) -> + yield None, p.FileName, (fullOutputAssemblyPath p) |> Option.defaultValue "", ps + | _ -> () + | None, _ -> () + |] + let solutionService = try Some (serviceProvider.GetService(typeof) :?> IVsSolution) with _ -> None + seq { match solutionService with + | Some solutionService -> + for reference in getReferencesForSolutionService solutionService do + yield reference + | None -> () + } + + static let rec referencedProjectsOf(projectIdOpt, projectSite, serviceProvider, extraProjectInfo, projectOptionsTable) = + [| for (projectIdOpt, projectFileName, outputPath, _projectSiteProvider) in referencedProvideProjectSites (projectIdOpt, projectSite, serviceProvider, extraProjectInfo, projectOptionsTable) do + let referencedProjectOptionsOpt = + projectOptionsTable + |> Option.bind (fun x -> + match projectIdOpt with + | Some(projectId) -> x.TryGetOptionsForProject(projectId) + | _ -> None + ) + |> Option.map (fun (_, _, options) -> options) + + match referencedProjectOptionsOpt with + | Some(referencedProjectOptions) -> + yield projectFileName, (outputPath, referencedProjectOptions) + | _ -> () + |] + + and getProjectOptionsForProjectSite(enableInMemoryCrossProjectReferences, projectSite, serviceProvider, projectIdOpt, fileName, extraProjectInfo, projectOptionsTable) = + let referencedProjectFileNames, referencedProjectOptions = + if enableInMemoryCrossProjectReferences then + referencedProjectsOf(projectIdOpt, projectSite, serviceProvider, extraProjectInfo, projectOptionsTable) + |> Array.unzip + else [| |], [| |] + let option = + let newOption () = { + ProjectFileName = projectSite.ProjectFileName + ProjectId = projectIdOpt |> Option.map (fun x -> x.ToFSharpProjectIdString()) + SourceFiles = projectSite.CompilationSourceFiles + OtherOptions = projectSite.CompilationOptions + ReferencedProjects = referencedProjectOptions + IsIncompleteTypeCheckEnvironment = projectSite.IsIncompleteTypeCheckEnvironment + UseScriptResolutionRules = SourceFile.MustBeSingleFileProject fileName + LoadTime = projectSite.LoadTime + UnresolvedReferences = None + OriginalLoadReferences = [] + ExtraProjectInfo=extraProjectInfo + Stamp = (stamp <- stamp + 1L; Some stamp) + } + match projectIdOpt, projectOptionsTable with + | Some id, Some optionsTable -> + // Get options from cache + match optionsTable.TryGetOptionsForProject(id) with + | Some (_parsingOptions, _site, projectOptions) -> + if projectSite.CompilationSourceFiles <> projectOptions.SourceFiles || + projectSite.CompilationOptions <> projectOptions.OtherOptions || + referencedProjectOptions <> projectOptions.ReferencedProjects then + newOption() + else + projectOptions + | _ -> newOption() + | _ -> newOption() + referencedProjectFileNames, option + + /// Construct a project site for a single file. May be a single file project (for scripts) or an orphan project site (for everything else). + static member ProjectSiteOfSingleFile(filename:string) : IProjectSite = + if SourceFile.MustBeSingleFileProject(filename) then + Debug.Assert(false, ".fsx or .fsscript should have been treated as implicit project") + failwith ".fsx or .fsscript should have been treated as implicit project" + new ProjectSiteOfSingleFile(filename) :> IProjectSite + + static member GetReferencedProjectSites(projectIdOpt, projectSite:IProjectSite, serviceProvider:System.IServiceProvider, extraProjectInfo, projectOptions) = + referencedProvideProjectSites (projectIdOpt, projectSite, serviceProvider, extraProjectInfo, projectOptions) + |> Seq.map (fun (_, _, _, ps) -> ps.GetProjectSite()) + |> Seq.toArray + + /// Create project options for this project site. + static member GetProjectOptionsForProjectSite(enableInMemoryCrossProjectReferences, projectSite:IProjectSite, serviceProvider, projectId, filename, extraProjectInfo, projectOptionsTable) = + match projectSite with + | :? IHaveCheckOptions as hco -> hco.OriginalCheckOptions() + | _ -> getProjectOptionsForProjectSite(enableInMemoryCrossProjectReferences, projectSite, serviceProvider, projectId, filename, extraProjectInfo, projectOptionsTable) + + /// Create project site for these project options + static member CreateProjectSiteForScript (filename, referencedProjectFileNames, checkOptions) = + ProjectSiteOfScriptFile (filename, referencedProjectFileNames, checkOptions) :> IProjectSite \ No newline at end of file diff --git a/vsintegration/src/FSharp.Editor/LanguageService/ProvideBraceCompletionAttribute.fs b/vsintegration/src/FSharp.Editor/LanguageService/ProvideBraceCompletionAttribute.fs new file mode 100644 index 00000000000..916a7380da1 --- /dev/null +++ b/vsintegration/src/FSharp.Editor/LanguageService/ProvideBraceCompletionAttribute.fs @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace Microsoft.VisualStudio.FSharp.Editor + +open System +open Microsoft.VisualStudio.Shell + +[] +[] +type internal ProvideBraceCompletionAttribute(languageName: string) = + inherit RegistrationAttribute() + + override __.Register(context) = + use key = context.CreateKey(@"Languages\Language Services\" + languageName) + key.SetValue("ShowBraceCompletion", 1) + + override __.Unregister(_) = () \ No newline at end of file diff --git a/vsintegration/src/FSharp.Editor/LanguageService/ProvideFSharpVersionRegistrationAttribute.fs b/vsintegration/src/FSharp.Editor/LanguageService/ProvideFSharpVersionRegistrationAttribute.fs new file mode 100644 index 00000000000..4b6fa6ff05d --- /dev/null +++ b/vsintegration/src/FSharp.Editor/LanguageService/ProvideFSharpVersionRegistrationAttribute.fs @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace Microsoft.VisualStudio.FSharp.Editor + +open System +open System.Diagnostics +open Microsoft.VisualStudio.Shell + +type internal ProvideFSharpVersionRegistrationAttribute(packageGuidString:string, productName:string) = + inherit RegistrationAttribute() + + let keyName = "InstalledProducts\\" + productName + + override this.Register(context:RegistrationAttribute.RegistrationContext) = + // Get the version of this build. This code is executed by CreatePkgDef.exe at build time and NOT at runtime. + let version = FileVersionInfo.GetVersionInfo(typeof.Assembly.Location) + use key = context.CreateKey(keyName) + key.SetValue("Package", Guid.Parse(packageGuidString).ToString("B")) + key.SetValue("PID", version.ProductVersion) + key.SetValue("UseInterface", false) + key.SetValue("UseVSProductID", false) + + override this.Unregister(context:RegistrationAttribute.RegistrationContext) = + context.RemoveKey(keyName) diff --git a/vsintegration/src/FSharp.Editor/LanguageService/SymbolHelpers.fs b/vsintegration/src/FSharp.Editor/LanguageService/SymbolHelpers.fs index 34e42ff637a..5bddff6417f 100644 --- a/vsintegration/src/FSharp.Editor/LanguageService/SymbolHelpers.fs +++ b/vsintegration/src/FSharp.Editor/LanguageService/SymbolHelpers.fs @@ -31,14 +31,33 @@ module internal SymbolHelpers = let textLinePos = sourceText.Lines.GetLinePosition(position) let fcsTextLineNumber = Line.fromZ textLinePos.Line let! parsingOptions, projectOptions = projectInfoManager.TryGetOptionsForEditingDocumentOrProject(document) - let defines = CompilerEnvironment.GetCompilationDefinesForEditing(document.Name, parsingOptions) + let defines = CompilerEnvironment.GetCompilationDefinesForEditing parsingOptions let! symbol = Tokenizer.getSymbolAtPosition(document.Id, sourceText, position, document.FilePath, defines, SymbolLookupKind.Greedy, false) - let! _, _, checkFileResults = checker.ParseAndCheckDocument(document.FilePath, textVersionHash, sourceText.ToString(), projectOptions, allowStaleResults = true, userOpName = userOpName) + let settings = document.FSharpOptions + let! _, _, checkFileResults = checker.ParseAndCheckDocument(document.FilePath, textVersionHash, sourceText.ToString(), projectOptions, settings.LanguageServicePerformance, userOpName = userOpName) let! symbolUse = checkFileResults.GetSymbolUseAtLocation(fcsTextLineNumber, symbol.Ident.idRange.EndColumn, textLine.ToString(), symbol.FullIsland, userOpName=userOpName) let! symbolUses = checkFileResults.GetUsesOfSymbolInFile(symbolUse.Symbol) |> liftAsync return symbolUses } + let getSymbolUsesInProjects (symbol: FSharpSymbol, projectInfoManager: FSharpProjectOptionsManager, checker: FSharpChecker, projects: Project list, userOpName) = + projects + |> Seq.map (fun project -> + async { + match projectInfoManager.TryGetOptionsForProject(project.Id) with + | Some (_parsingOptions, _site, projectOptions) -> + let! projectCheckResults = checker.ParseAndCheckProject(projectOptions, userOpName = userOpName) + let! uses = projectCheckResults.GetUsesOfSymbol(symbol) + let distinctUses = uses |> Array.distinctBy (fun symbolUse -> symbolUse.RangeAlternate) + return distinctUses + | None -> return [||] + }) + |> Async.Parallel + |> Async.map Array.concat + // FCS may return several `FSharpSymbolUse`s for same range, which have different `ItemOccurrence`s (Use, UseInAttribute, UseInType, etc.) + // We don't care about the occurrence type here, so we distinct by range. + |> Async.map (Array.distinctBy (fun x -> x.RangeAlternate)) + let getSymbolUsesInSolution (symbol: FSharpSymbol, declLoc: SymbolDeclarationLocation, checkFileResults: FSharpCheckFileResults, projectInfoManager: FSharpProjectOptionsManager, checker: FSharpChecker, solution: Solution, userOpName) = async { @@ -55,17 +74,7 @@ module internal SymbolHelpers = yield! project.GetDependentProjects() ] |> List.distinctBy (fun x -> x.Id) - projects - |> Seq.map (fun project -> - async { - match projectInfoManager.TryGetOptionsForProject(project.Id) with - | Some (_parsingOptions, _site, projectOptions) -> - let! projectCheckResults = checker.ParseAndCheckProject(projectOptions, userOpName = userOpName) - return! projectCheckResults.GetUsesOfSymbol(symbol) - | None -> return [||] - }) - |> Async.Parallel - |> Async.map Array.concat + getSymbolUsesInProjects (symbol, projectInfoManager, checker, projects, userOpName) return (symbolUses @@ -96,9 +105,9 @@ module internal SymbolHelpers = let originalText = sourceText.ToString(symbolSpan) do! Option.guard (originalText.Length > 0) let! parsingOptions, projectOptions = projectInfoManager.TryGetOptionsForEditingDocumentOrProject document - let defines = CompilerEnvironment.GetCompilationDefinesForEditing(document.Name, parsingOptions) + let defines = CompilerEnvironment.GetCompilationDefinesForEditing parsingOptions let! symbol = Tokenizer.getSymbolAtPosition(document.Id, sourceText, symbolSpan.Start, document.FilePath, defines, SymbolLookupKind.Greedy, false) - let! _, _, checkFileResults = checker.ParseAndCheckDocument(document, projectOptions, allowStaleResults = true, userOpName = userOpName) + let! _, _, checkFileResults = checker.ParseAndCheckDocument(document, projectOptions, userOpName = userOpName) let textLine = sourceText.Lines.GetLineFromPosition(symbolSpan.Start) let textLinePos = sourceText.Lines.GetLinePosition(symbolSpan.Start) let fcsTextLineNumber = Line.fromZ textLinePos.Line diff --git a/vsintegration/src/FSharp.Editor/LanguageService/Symbols.fs b/vsintegration/src/FSharp.Editor/LanguageService/Symbols.fs index 13de16c081c..7ece4c858c3 100644 --- a/vsintegration/src/FSharp.Editor/LanguageService/Symbols.fs +++ b/vsintegration/src/FSharp.Editor/LanguageService/Symbols.fs @@ -11,7 +11,6 @@ open Microsoft.CodeAnalysis open Microsoft.CodeAnalysis.Classification open Microsoft.CodeAnalysis.Text -open Microsoft.VisualStudio.FSharp.LanguageService open Microsoft.FSharp.Compiler open Microsoft.FSharp.Compiler.Ast open Microsoft.FSharp.Compiler.SourceCodeServices diff --git a/vsintegration/src/FSharp.Editor/LanguageService/TextViewCreationListener.fs b/vsintegration/src/FSharp.Editor/LanguageService/TextViewCreationListener.fs new file mode 100644 index 00000000000..8dae5999bbc --- /dev/null +++ b/vsintegration/src/FSharp.Editor/LanguageService/TextViewCreationListener.fs @@ -0,0 +1,63 @@ +namespace Microsoft.VisualStudio.FSharp.Editor + +open System +open System.Runtime.InteropServices +open System.ComponentModel.Composition; +open Microsoft.VisualStudio +open Microsoft.VisualStudio.Editor +open Microsoft.VisualStudio.Shell +open Microsoft.VisualStudio.Shell.Interop +open Microsoft.VisualStudio.TextManager.Interop +open Microsoft.VisualStudio.Utilities +open Microsoft.VisualStudio.ComponentModelHost +open Microsoft.VisualStudio.Text.Editor +open Microsoft.VisualStudio.OLE.Interop + +[)>] +[] +[] +type TextViewCreationListener [] (adaptersFactory: IVsEditorAdaptersFactoryService) = + + /// + /// The initializes the pguidCmdUI to an empty Guid. This means that our buffer does not receive the normal text editor command bindings. + /// In order to handle this, we tell the IVsWindowFrame in which our editor lives to inherit the keybindinds from the text editor factory. + /// This allows us to specify the TextEditor keybindings at a lower priority than our F# Editor Factory keybindings and allows us to handle Alt+Enter + /// + let initKeyBindings (vsTextView: IVsTextView) = + match vsTextView with + | :? IObjectWithSite as os -> + let mutable unkSite = IntPtr.Zero + let mutable unkFrame = IntPtr.Zero + + try + os.GetSite(ref typeof.GUID, &unkSite) + let sp = Marshal.GetObjectForIUnknown(unkSite) :?> IServiceProvider + + sp.QueryService(ref typeof.GUID, ref typeof.GUID, &unkFrame) + |> ignore + + //When calling Peek Definition, the editor creates an IVsTextView within another view. + //Therefore this new view won't exist as the direct child of an IVsWindowFrame and we will return. + //We don't need to worry about inheriting key bindings in this situation, because the + //parent IVsTextView will have already set this value during its creation. + if unkFrame <> IntPtr.Zero then + let frame = Marshal.GetObjectForIUnknown(unkFrame) :?> IVsWindowFrame + frame.SetGuidProperty(LanguagePrimitives.EnumToValue __VSFPROPID.VSFPROPID_InheritKeyBindings, ref VSConstants.GUID_TextEditorFactory) + |> ignore + + finally + if unkSite <> IntPtr.Zero then + Marshal.Release(unkSite) + |> ignore + + if unkFrame <> IntPtr.Zero then + Marshal.Release(unkFrame) + |> ignore + + | _ -> () + + interface IVsTextViewCreationListener with + + member __.VsTextViewCreated(textViewAdapter) = + let _textView = adaptersFactory.GetWpfTextView(textViewAdapter) + initKeyBindings textViewAdapter \ No newline at end of file diff --git a/vsintegration/src/FSharp.Editor/LanguageService/Tokenizer.fs b/vsintegration/src/FSharp.Editor/LanguageService/Tokenizer.fs index 840138c00b3..66bb9018f3c 100644 --- a/vsintegration/src/FSharp.Editor/LanguageService/Tokenizer.fs +++ b/vsintegration/src/FSharp.Editor/LanguageService/Tokenizer.fs @@ -3,29 +3,32 @@ open System open System.Collections.Generic open System.Collections.Concurrent +open System.Diagnostics open System.Threading open System.Threading.Tasks open System.Runtime.CompilerServices +open System.Runtime.Caching open Microsoft.CodeAnalysis open Microsoft.CodeAnalysis.Classification open Microsoft.CodeAnalysis.Text -open Microsoft.VisualStudio.FSharp.LanguageService open Microsoft.FSharp.Compiler open Microsoft.FSharp.Compiler.Ast open Microsoft.FSharp.Compiler.SourceCodeServices +open Microsoft.VisualStudio.Core.Imaging +open Microsoft.VisualStudio.Imaging [] -type internal LexerSymbolKind = - | Ident - | Operator - | Punctuation - | GenericTypeParameter - | StaticallyResolvedTypeParameter - | ActivePattern - | Other +type internal LexerSymbolKind = + | Ident = 0 + | Operator = 1 + | Punctuation = 2 + | GenericTypeParameter = 3 + | StaticallyResolvedTypeParameter = 4 + | ActivePattern = 5 + | Other = 6 type internal LexerSymbol = { Kind: LexerSymbolKind @@ -45,6 +48,7 @@ type internal SymbolLookupKind = [] module internal Tokenizer = + let (|Public|Internal|Protected|Private|) (a: FSharpAccessibility option) = match a with | None -> Public @@ -138,6 +142,101 @@ module internal Tokenizer = | FSharpGlyph.Variable -> Glyph.Local | FSharpGlyph.Error -> Glyph.Error + let GetImageIdForSymbol(symbol:FSharpSymbol, kind:LexerSymbolKind) = + let imageId = + match kind with + | LexerSymbolKind.Operator -> KnownImageIds.Operator + | _ -> + match symbol with + | :? FSharpUnionCase as x -> + match Some x.Accessibility with + | Public -> KnownImageIds.EnumerationPublic + | Internal -> KnownImageIds.EnumerationInternal + | Protected -> KnownImageIds.EnumerationProtected + | Private -> KnownImageIds.EnumerationPrivate + | :? FSharpActivePatternCase -> KnownImageIds.EnumerationPublic + | :? FSharpField as x -> + if x.IsLiteral then + match Some x.Accessibility with + | Public -> KnownImageIds.ConstantPublic + | Internal -> KnownImageIds.ConstantInternal + | Protected -> KnownImageIds.ConstantProtected + | Private -> KnownImageIds.ConstantPrivate + else + match Some x.Accessibility with + | Public -> KnownImageIds.FieldPublic + | Internal -> KnownImageIds.FieldInternal + | Protected -> KnownImageIds.FieldProtected + | Private -> KnownImageIds.FieldPrivate + | :? FSharpParameter -> KnownImageIds.Parameter + | :? FSharpMemberOrFunctionOrValue as x -> + if x.LiteralValue.IsSome then + match Some x.Accessibility with + | Public -> KnownImageIds.ConstantPublic + | Internal -> KnownImageIds.ConstantInternal + | Protected -> KnownImageIds.ConstantProtected + | Private -> KnownImageIds.ConstantPrivate + elif x.IsExtensionMember then KnownImageIds.ExtensionMethod + elif x.IsProperty || x.IsPropertyGetterMethod || x.IsPropertySetterMethod then + match Some x.Accessibility with + | Public -> KnownImageIds.PropertyPublic + | Internal -> KnownImageIds.PropertyInternal + | Protected -> KnownImageIds.PropertyProtected + | Private -> KnownImageIds.PropertyPrivate + elif x.IsEvent then + match Some x.Accessibility with + | Public -> KnownImageIds.EventPublic + | Internal -> KnownImageIds.EventInternal + | Protected -> KnownImageIds.EventProtected + | Private -> KnownImageIds.EventPrivate + else + match Some x.Accessibility with + | Public -> KnownImageIds.MethodPublic + | Internal -> KnownImageIds.MethodInternal + | Protected -> KnownImageIds.MethodProtected + | Private -> KnownImageIds.MethodPrivate + | :? FSharpEntity as x -> + if x.IsValueType then + match Some x.Accessibility with + | Public -> KnownImageIds.StructurePublic + | Internal -> KnownImageIds.StructureInternal + | Protected -> KnownImageIds.StructureProtected + | Private -> KnownImageIds.StructurePrivate + elif x.IsFSharpModule then + match Some x.Accessibility with + | Public -> KnownImageIds.ModulePublic + | Internal -> KnownImageIds.ModuleInternal + | Protected -> KnownImageIds.ModuleProtected + | Private -> KnownImageIds.ModulePrivate + elif x.IsEnum || x.IsFSharpUnion then + match Some x.Accessibility with + | Public -> KnownImageIds.EnumerationPublic + | Internal -> KnownImageIds.EnumerationInternal + | Protected -> KnownImageIds.EnumerationProtected + | Private -> KnownImageIds.EnumerationPrivate + elif x.IsInterface then + match Some x.Accessibility with + | Public -> KnownImageIds.InterfacePublic + | Internal -> KnownImageIds.InterfaceInternal + | Protected -> KnownImageIds.InterfaceProtected + | Private -> KnownImageIds.InterfacePrivate + elif x.IsDelegate then + match Some x.Accessibility with + | Public -> KnownImageIds.DelegatePublic + | Internal -> KnownImageIds.DelegateInternal + | Protected -> KnownImageIds.DelegateProtected + | Private -> KnownImageIds.DelegatePrivate + elif x.IsNamespace then + KnownImageIds.Namespace + else + match Some x.Accessibility with + | Public -> KnownImageIds.ClassPublic + | Internal -> KnownImageIds.ClassInternal + | Protected -> KnownImageIds.ClassProtected + | Private -> KnownImageIds.ClassPrivate + | _ -> KnownImageIds.None + ImageId(KnownImageIds.ImageCatalogGuid, imageId) + let GetGlyphForSymbol (symbol: FSharpSymbol, kind: LexerSymbolKind) = match kind with | LexerSymbolKind.Operator -> Glyph.Operator @@ -237,14 +336,73 @@ module internal Tokenizer = | _ -> Glyph.None + type FSharpTokenInfo with + member token.IsIdentifier = (token.CharClass = FSharpTokenCharKind.Identifier) + member token.IsOperator = (token.ColorClass = FSharpTokenColorKind.Operator) + member token.IsPunctuation = (token.ColorClass = FSharpTokenColorKind.Punctuation) + + /// This is the information we save for each token in a line for each active document. + /// It is a memory-critical data structure - do not make larger. This used to be ~100 bytes class, is now 8-byte struct + let [] TagMask = 0xFFFF000000000000UL // note, there are some spare bits here + let [] KindMask = 0x0000FF0000000000UL + let [] LeftColumnMask = 0x000000FFFFF00000UL + let [] MatchedLengthMask = 0x00000000000FFFFFUL + + [] + type SavedTokenInfo = + { Bits: uint64 } + //TagSaved: uint16 + //KindSaved: byte + //LeftColumnSaved: uint20 (up to 1048576) + //MatchedLengthSaved: uint20 (up to 1048576) + + member token.Tag = int ((token.Bits &&& TagMask) >>> 48) + member token.Kind = enum(int ((token.Bits &&& KindMask) >>> 40)) + member token.LeftColumn = int ((token.Bits &&& LeftColumnMask) >>> 20) + member token.MatchedLength = int ((token.Bits &&& MatchedLengthMask)) + + member token.IsIdentifier = (token.Kind = LexerSymbolKind.Ident) + member token.IsOperator = (token.Kind = LexerSymbolKind.Operator) + member token.IsPunctuation = (token.Kind = LexerSymbolKind.Punctuation) + + static member inline Create (token: FSharpTokenInfo) = + let kind = + if token.IsOperator then LexerSymbolKind.Operator + elif token.IsIdentifier then LexerSymbolKind.Ident + elif token.IsPunctuation then LexerSymbolKind.Punctuation + else LexerSymbolKind.Other + Debug.Assert(uint32 token.Tag < 0xFFFFu) + Debug.Assert(uint32 kind < 0xFFu) + Debug.Assert(uint32 token.LeftColumn < 0xFFFFFu) + Debug.Assert(uint32 token.FullMatchedLength < 0xFFFFFu) + { Bits = + ((uint64 token.Tag <<< 48) &&& TagMask) ||| + ((uint64 kind <<< 40) &&& KindMask) ||| + ((uint64 token.LeftColumn <<< 20) &&& LeftColumnMask) ||| + (uint64 token.FullMatchedLength &&& MatchedLengthMask) } + + member token.RightColumn = token.LeftColumn + token.MatchedLength - 1 + + /// An intermediate extraction of information from the token + type private DraftTokenInfo = + { Kind: LexerSymbolKind + LeftColumn: int + MatchedLength: int } + + static member Create kind (token: SavedTokenInfo) = { Kind = kind; LeftColumn = int token.LeftColumn; MatchedLength = int token.MatchedLength } + + member token.RightColumn = token.LeftColumn + token.MatchedLength - 1 + + /// This is the data saved about each line. It is held strongly while a file is open and + /// is important for memory performance type private SourceLineData(lineStart: int, lexStateAtStartOfLine: FSharpTokenizerLexState, lexStateAtEndOfLine: FSharpTokenizerLexState, - hashCode: int, classifiedSpans: IReadOnlyList, tokens: FSharpTokenInfo list) = + hashCode: int, classifiedSpans: ClassifiedSpan[], savedTokens: SavedTokenInfo[]) = member val LineStart = lineStart member val LexStateAtStartOfLine = lexStateAtStartOfLine member val LexStateAtEndOfLine = lexStateAtEndOfLine member val HashCode = hashCode member val ClassifiedSpans = classifiedSpans - member val Tokens = tokens + member val SavedTokens = savedTokens member data.IsValid(textLine: TextLine) = data.LineStart = textLine.Start && @@ -268,7 +426,12 @@ module internal Tokenizer = data.[i] <- None i <- i + 1 - let private dataCache = ConditionalWeakTable>() + /// This saves the tokenization data for a file for as long as the DocumentId object is alive. + /// This seems risky - if one single thing leaks a DocumentId (e.g. stores it in some global table of documents + /// that have been closed), then we leak **all** this associated data, forever. + + type private PerDocumentSavedData = ConcurrentDictionary + let private dataCache = new MemoryCache("FSharp.Editor.Tokenization") let compilerTokenToRoslynToken(colorKind: FSharpTokenColorKind) : string = match colorKind with @@ -288,7 +451,7 @@ module internal Tokenizer = let private scanSourceLine(sourceTokenizer: FSharpSourceTokenizer, textLine: TextLine, lineContents: string, lexState: FSharpTokenizerLexState) : SourceLineData = let colorMap = Array.create textLine.Span.Length ClassificationTypeNames.Text let lineTokenizer = sourceTokenizer.CreateLineTokenizer(lineContents) - let tokens = ResizeArray() + let tokens = ResizeArray() let mutable tokenInfoOption = None let previousLexState = ref lexState @@ -296,12 +459,18 @@ module internal Tokenizer = let classificationType = compilerTokenToRoslynToken(tokenInfoOption.Value.ColorClass) for i = tokenInfoOption.Value.LeftColumn to tokenInfoOption.Value.RightColumn do Array.set colorMap i classificationType - tokens.Add tokenInfoOption.Value + + let token = tokenInfoOption.Value + let savedToken = SavedTokenInfo.Create token + + tokens.Add savedToken let scanAndColorNextToken() = let info, nextLexState = lineTokenizer.ScanToken(!previousLexState) tokenInfoOption <- info previousLexState := nextLexState + + // Apply some hacks to clean up the token stream (we apply more later) match info with | Some info when info.Tag = FSharpTokenTag.INT32_DOT_DOT -> tokenInfoOption <- @@ -345,20 +514,32 @@ module internal Tokenizer = classifiedSpans.Add(new ClassifiedSpan(classificationType, textSpan)) startPosition <- endPosition - SourceLineData(textLine.Start, lexState, previousLexState.Value, lineContents.GetHashCode(), classifiedSpans, List.ofSeq tokens) + SourceLineData(textLine.Start, lexState, previousLexState.Value, lineContents.GetHashCode(), classifiedSpans.ToArray(), tokens.ToArray()) // We keep incremental data per-document. When text changes we correlate text line-by-line (by hash codes of lines) // We index the data by the active defines in the document. let private getSourceTextData(documentKey: DocumentId, defines: string list, linesCount) = - let dict = dataCache.GetValue(documentKey, fun key -> new ConcurrentDictionary<_,_>(1,1,HashIdentity.Structural)) - if dict.ContainsKey(defines) then dict.[defines] + let key = documentKey.ToString() + let dict = + match dataCache.Get(key) with + | :? PerDocumentSavedData as dict -> dict + | _ -> + let dict = new PerDocumentSavedData(1,1,HashIdentity.Structural) + let cacheItem = CacheItem(key, dict) + // evict per-document data after a sliding window + let policy = CacheItemPolicy(SlidingExpiration=DefaultTuning.PerDocumentSavedDataSlidingWindow) + dataCache.Set(cacheItem, policy) + dict + if dict.ContainsKey(defines) then + dict.[defines] else let data = SourceTextData(linesCount) dict.TryAdd(defines, data) |> ignore data - let getColorizationData(documentKey: DocumentId, sourceText: SourceText, textSpan: TextSpan, fileName: string option, defines: string list, + /// Generates a list of Classified Spans for tokens which undergo syntactic classification (i.e., are not typechecked). + let getClassifiedSpans(documentKey: DocumentId, sourceText: SourceText, textSpan: TextSpan, fileName: string option, defines: string list, cancellationToken: CancellationToken) : List = try let sourceTokenizer = FSharpSourceTokenizer(defines, fileName) @@ -399,7 +580,7 @@ module internal Tokenizer = lexState <- lineData.LexStateAtEndOfLine if startLine <= i then - result.AddRange(lineData.ClassifiedSpans |> Seq.filter(fun token -> + result.AddRange(lineData.ClassifiedSpans |> Array.filter(fun token -> textSpan.Contains(token.TextSpan.Start) || textSpan.Contains(token.TextSpan.End - 1) || (token.TextSpan.Start <= textSpan.Start && textSpan.End <= token.TextSpan.End))) @@ -418,19 +599,11 @@ module internal Tokenizer = Assert.Exception(ex) List() - type private DraftToken = { - Kind: LexerSymbolKind - Token: FSharpTokenInfo - RightColumn: int - } with - static member inline Create kind token = - { Kind = kind; Token = token; RightColumn = token.LeftColumn + token.FullMatchedLength - 1 } - /// Returns symbol at a given position. - let private getSymbolFromTokens + let private getSymbolFromSavedTokens ( fileName: string, - tokens: FSharpTokenInfo list, + savedTokens: SavedTokenInfo[], linePos: LinePosition, lineStr: string, lookupKind: SymbolLookupKind, @@ -438,26 +611,22 @@ module internal Tokenizer = ) : LexerSymbol option = - let isIdentifier t = t.CharClass = FSharpTokenCharKind.Identifier - let isOperator t = t.ColorClass = FSharpTokenColorKind.Operator - let isPunctuation t = t.ColorClass = FSharpTokenColorKind.Punctuation - - let (|GenericTypeParameterPrefix|StaticallyResolvedTypeParameterPrefix|ActivePattern|Other|) (token: FSharpTokenInfo) = + let (|GenericTypeParameterPrefix|StaticallyResolvedTypeParameterPrefix|ActivePattern|Other|) (token: SavedTokenInfo) = if token.Tag = FSharpTokenTag.QUOTE then GenericTypeParameterPrefix elif token.Tag = FSharpTokenTag.INFIX_AT_HAT_OP then // The lexer return INFIX_AT_HAT_OP token for both "^" and "@" symbols. // We have to check the char itself to distinguish one from another. - if token.FullMatchedLength = 1 && token.LeftColumn < lineStr.Length && lineStr.[token.LeftColumn] = '^' then + if token.MatchedLength = 1 && token.LeftColumn < lineStr.Length && lineStr.[token.LeftColumn] = '^' then StaticallyResolvedTypeParameterPrefix else Other elif token.Tag = FSharpTokenTag.LPAREN then - if token.FullMatchedLength = 1 && token.LeftColumn+1 < lineStr.Length && lineStr.[token.LeftColumn+1] = '|' then + if token.MatchedLength = 1 && token.LeftColumn+1 < lineStr.Length && lineStr.[token.LeftColumn+1] = '|' then ActivePattern else Other else Other // Operators: Filter out overlapped operators (>>= operator is tokenized as three distinct tokens: GREATER, GREATER, EQUALS. - // Each of them has FullMatchedLength = 3. So, we take the first GREATER and skip the other two). + // Each of them has MatchedLength = 3. So, we take the first GREATER and skip the other two). // // Generic type parameters: we convert QUOTE + IDENT tokens into single IDENT token, altering its LeftColumn // and FullMathedLength (for "'type" which is tokenized as (QUOTE, left=2) + (IDENT, left=3, length=4) @@ -466,10 +635,9 @@ module internal Tokenizer = // Statically resolved type parameters: we convert INFIX_AT_HAT_OP + IDENT tokens into single IDENT token, altering its LeftColumn // and FullMathedLength (for "^type" which is tokenized as (INFIX_AT_HAT_OP, left=2) + (IDENT, left=3, length=4) // we'll get (IDENT, left=2, length=5). - let tokens = - let tokensCount = tokens.Length - tokens - |> List.foldi (fun (acc, lastToken) index (token: FSharpTokenInfo) -> + let draftTokens = + let tokensCount = savedTokens.Length + (([], None), savedTokens) ||> Array.foldi (fun (acc, lastToken: DraftTokenInfo option) index token -> match lastToken with | Some t when token.LeftColumn <= t.RightColumn -> acc, lastToken | Some ({ Kind = LexerSymbolKind.ActivePattern } as lastToken) when @@ -477,39 +645,39 @@ module internal Tokenizer = (token.Tag = FSharpTokenTag.BAR || token.Tag = FSharpTokenTag.IDENT || token.Tag = FSharpTokenTag.UNDERSCORE) -> let mergedToken = - {lastToken.Token with Tag = FSharpTokenTag.IDENT - RightColumn = token.RightColumn - FullMatchedLength = lastToken.Token.FullMatchedLength + token.FullMatchedLength } + { lastToken with + Kind = LexerSymbolKind.Ident + MatchedLength = lastToken.MatchedLength + token.MatchedLength } - acc, Some { lastToken with Token = mergedToken; RightColumn = lastToken.RightColumn + token.FullMatchedLength } + acc, Some mergedToken | _ -> let isLastToken = index = tokensCount - 1 match token with - | GenericTypeParameterPrefix when not isLastToken -> acc, Some (DraftToken.Create LexerSymbolKind.GenericTypeParameter token) - | StaticallyResolvedTypeParameterPrefix when not isLastToken -> acc, Some (DraftToken.Create LexerSymbolKind.StaticallyResolvedTypeParameter token) - | ActivePattern when wholeActivePatterns -> acc, Some (DraftToken.Create LexerSymbolKind.ActivePattern token) + | GenericTypeParameterPrefix when not isLastToken -> acc, Some (DraftTokenInfo.Create LexerSymbolKind.GenericTypeParameter token) + | StaticallyResolvedTypeParameterPrefix when not isLastToken -> acc, Some (DraftTokenInfo.Create LexerSymbolKind.StaticallyResolvedTypeParameter token) + | ActivePattern when wholeActivePatterns -> acc, Some (DraftTokenInfo.Create LexerSymbolKind.ActivePattern token) | _ -> let draftToken = match lastToken with - | Some { Kind = LexerSymbolKind.GenericTypeParameter | LexerSymbolKind.StaticallyResolvedTypeParameter as kind } when isIdentifier token -> - DraftToken.Create kind { token with LeftColumn = token.LeftColumn - 1 - FullMatchedLength = token.FullMatchedLength + 1 } + | Some { Kind = LexerSymbolKind.GenericTypeParameter | LexerSymbolKind.StaticallyResolvedTypeParameter as kind } when token.IsIdentifier -> + { Kind = kind + LeftColumn = token.LeftColumn - 1 + MatchedLength = token.MatchedLength + 1 } // ^ operator | Some { Kind = LexerSymbolKind.StaticallyResolvedTypeParameter } -> - DraftToken.Create LexerSymbolKind.Operator { token with LeftColumn = token.LeftColumn - 1 - FullMatchedLength = 1 } + { Kind = LexerSymbolKind.Operator + LeftColumn = token.LeftColumn - 1 + MatchedLength = 1 } | Some ( { Kind = LexerSymbolKind.ActivePattern } as ap) when wholeActivePatterns && token.Tag = FSharpTokenTag.RPAREN -> - DraftToken.Create LexerSymbolKind.Ident ap.Token + { Kind = LexerSymbolKind.Ident + LeftColumn = ap.LeftColumn + MatchedLength = ap.MatchedLength } | _ -> - let kind = - if isOperator token then LexerSymbolKind.Operator - elif isIdentifier token then LexerSymbolKind.Ident - elif isPunctuation token then LexerSymbolKind.Punctuation - else LexerSymbolKind.Other - - DraftToken.Create kind token + { Kind = token.Kind + LeftColumn = token.LeftColumn + MatchedLength = token.MatchedLength } draftToken :: acc, Some draftToken - ) ([], None) + ) |> fst // One or two tokens that in touch with the cursor (for "let x|(g) = ()" the tokens will be "x" and "(") @@ -519,27 +687,27 @@ module internal Tokenizer = | SymbolLookupKind.Precise -> 0 | SymbolLookupKind.Greedy -> 1 - tokens |> List.filter (fun x -> x.Token.LeftColumn <= linePos.Character && (x.RightColumn + rightColumnCorrection) >= linePos.Character) + draftTokens |> List.filter (fun x -> x.LeftColumn <= linePos.Character && (x.RightColumn + rightColumnCorrection) >= linePos.Character) // Select IDENT token. If failed, select OPERATOR token. tokensUnderCursor - |> List.tryFind (fun { DraftToken.Kind = k } -> - match k with + |> List.tryFind (fun token -> + match token.Kind with | LexerSymbolKind.Ident | LexerSymbolKind.ActivePattern | LexerSymbolKind.GenericTypeParameter | LexerSymbolKind.StaticallyResolvedTypeParameter -> true | _ -> false) - |> Option.orElseWith (fun _ -> tokensUnderCursor |> List.tryFind (fun { DraftToken.Kind = k } -> k = LexerSymbolKind.Operator)) + |> Option.orElseWith (fun _ -> tokensUnderCursor |> List.tryFind (fun token -> token.Kind = LexerSymbolKind.Operator)) |> Option.map (fun token -> let partialName = QuickParse.GetPartialLongNameEx(lineStr, token.RightColumn) - let identStr = lineStr.Substring(token.Token.LeftColumn, token.Token.FullMatchedLength) + let identStr = lineStr.Substring(token.LeftColumn, token.MatchedLength) { Kind = token.Kind Ident = Ident(identStr, Range.mkRange fileName - (Range.mkPos (linePos.Line + 1) token.Token.LeftColumn) + (Range.mkPos (linePos.Line + 1) token.LeftColumn) (Range.mkPos (linePos.Line + 1) (token.RightColumn + 1))) FullIsland = partialName.QualifyingIdents @ [identStr] }) @@ -580,11 +748,11 @@ module internal Tokenizer = let tokenizeLine (documentKey, sourceText, position, fileName, defines) = try let lineData, _, _ = getCachedSourceLineData(documentKey, sourceText, position, fileName, defines) - lineData.Tokens + lineData.SavedTokens with | ex -> Assert.Exception(ex) - [] + [| |] let getSymbolAtPosition ( @@ -600,7 +768,7 @@ module internal Tokenizer = try let lineData, textLinePos, lineContents = getCachedSourceLineData(documentKey, sourceText, position, fileName, defines) - getSymbolFromTokens(fileName, lineData.Tokens, textLinePos, lineContents, lookupKind, wholeActivePatterns) + getSymbolFromSavedTokens(fileName, lineData.SavedTokens, textLinePos, lineContents, lookupKind, wholeActivePatterns) with | :? System.OperationCanceledException -> reraise() | ex -> @@ -643,10 +811,10 @@ module internal Tokenizer = let isFixableIdentifier (s: string) = not (String.IsNullOrEmpty s) && Lexhelp.Keywords.NormalizeIdentifierBackticks s |> isIdentifier - let forbiddenChars = [| '.'; '+'; '$'; '&'; '['; ']'; '/'; '\\'; '*'; '\'' |] + let forbiddenChars = [| '.'; '+'; '$'; '&'; '['; ']'; '/'; '\\'; '*'; '\"' |] let isTypeNameIdent (s: string) = - not (String.IsNullOrEmpty s) && s.IndexOfAny forbiddenChars = -1 && isFixableIdentifier s + not (String.IsNullOrEmpty s) && s.IndexOfAny forbiddenChars = -1 && isFixableIdentifier s let isUnionCaseIdent (s: string) = isTypeNameIdent s && Char.IsUpper(s.Replace(doubleBackTickDelimiter, "").[0]) @@ -666,7 +834,7 @@ module internal Tokenizer = | LexerSymbolKind.Punctuation, _ -> PrettyNaming.IsPunctuation name | LexerSymbolKind.GenericTypeParameter, _ -> isGenericTypeParameter name | LexerSymbolKind.StaticallyResolvedTypeParameter, _ -> isStaticallyResolvedTypeParameter name - | (LexerSymbolKind.Ident | LexerSymbolKind.ActivePattern | LexerSymbolKind.Other), _ -> + | _ -> match symbol with | :? FSharpEntity as e when e.IsClass || e.IsFSharpRecord || e.IsFSharpUnion || e.IsValueType || e.IsFSharpModule || e.IsInterface -> isTypeNameIdent name | _ -> isFixableIdentifier name diff --git a/vsintegration/src/FSharp.Editor/Navigation/FindUsagesService.fs b/vsintegration/src/FSharp.Editor/Navigation/FindUsagesService.fs index 0f7fde12e79..df0bff060c5 100644 --- a/vsintegration/src/FSharp.Editor/Navigation/FindUsagesService.fs +++ b/vsintegration/src/FSharp.Editor/Navigation/FindUsagesService.fs @@ -52,10 +52,10 @@ type internal FSharpFindUsagesService let! sourceText = document.GetTextAsync(context.CancellationToken) |> Async.AwaitTask |> liftAsync let checker = checkerProvider.Checker let! parsingOptions, _, projectOptions = projectInfoManager.TryGetOptionsForDocumentOrProject(document) - let! _, _, checkFileResults = checker.ParseAndCheckDocument(document, projectOptions, sourceText = sourceText, allowStaleResults = true, userOpName = userOpName) + let! _, _, checkFileResults = checker.ParseAndCheckDocument(document, projectOptions, sourceText = sourceText, userOpName = userOpName) let textLine = sourceText.Lines.GetLineFromPosition(position).ToString() let lineNumber = sourceText.Lines.GetLinePosition(position).Line + 1 - let defines = CompilerEnvironment.GetCompilationDefinesForEditing(document.FilePath, parsingOptions) + let defines = CompilerEnvironment.GetCompilationDefinesForEditing parsingOptions let! symbol = Tokenizer.getSymbolAtPosition(document.Id, sourceText, position, document.FilePath, defines, SymbolLookupKind.Greedy, false) let! symbolUse = checkFileResults.GetSymbolUseAtLocation(lineNumber, symbol.Ident.idRange.EndColumn, textLine, symbol.FullIsland, userOpName=userOpName) @@ -107,22 +107,7 @@ type internal FSharpFindUsagesService // In order to find all its usages we have to check all F# projects. | _ -> Seq.toList document.Project.Solution.Projects - asyncMaybe { - let! symbolUses = - projectsToCheck - |> Seq.map (fun project -> - asyncMaybe { - let! _parsingOptions, _site, projectOptions = projectInfoManager.TryGetOptionsForProject(project.Id) - let! projectCheckResults = checker.ParseAndCheckProject(projectOptions, userOpName = userOpName) |> liftAsync - return! projectCheckResults.GetUsesOfSymbol(symbolUse.Symbol) |> liftAsync - } |> Async.map (Option.defaultValue [||])) - |> Async.Parallel - |> liftAsync - - // FCS may return several `FSharpSymbolUse`s for same range, which have different `ItemOccurrence`s (Use, UseInAttribute, UseInType, etc.) - // We don't care about the occurrence type here, so we distinct by range. - return symbolUses |> Array.concat |> Array.distinctBy (fun x -> x.RangeAlternate) - } + SymbolHelpers.getSymbolUsesInProjects (symbolUse.Symbol, projectInfoManager, checker, projectsToCheck, userOpName) |> liftAsync for symbolUse in symbolUses do match declarationRange with diff --git a/vsintegration/src/FSharp.Editor/Navigation/GoToDefinition.fs b/vsintegration/src/FSharp.Editor/Navigation/GoToDefinition.fs new file mode 100644 index 00000000000..daaa1e6fa57 --- /dev/null +++ b/vsintegration/src/FSharp.Editor/Navigation/GoToDefinition.fs @@ -0,0 +1,388 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace Microsoft.VisualStudio.FSharp.Editor + +open System +open System.Threading +open System.Collections.Immutable +open System.Diagnostics +open System.IO +open System.Linq +open System.Runtime.InteropServices + +open Microsoft.CodeAnalysis +open Microsoft.CodeAnalysis.FindSymbols +open Microsoft.CodeAnalysis.Text +open Microsoft.CodeAnalysis.Navigation + +open Microsoft.VisualStudio.Shell.Interop + +open Microsoft.FSharp.Compiler.Range +open Microsoft.FSharp.Compiler.SourceCodeServices + +module private Symbol = + let fullName (root: ISymbol) : string = + let rec inner parts (sym: ISymbol) = + match sym with + | null -> + parts + // TODO: do we have any other terminating cases? + | sym when sym.Kind = SymbolKind.NetModule || sym.Kind = SymbolKind.Assembly -> + parts + | sym when sym.MetadataName <> "" -> + inner (sym.MetadataName :: parts) sym.ContainingSymbol + | sym -> + inner parts sym.ContainingSymbol + + inner [] root |> String.concat "." + +module private ExternalType = + let rec tryOfRoslynType (typesym: ITypeSymbol): ExternalType option = + match typesym with + | :? IPointerTypeSymbol as ptrparam -> + tryOfRoslynType ptrparam.PointedAtType |> Option.map ExternalType.Pointer + | :? IArrayTypeSymbol as arrparam -> + tryOfRoslynType arrparam.ElementType |> Option.map ExternalType.Array + | :? ITypeParameterSymbol as typaram -> + Some (ExternalType.TypeVar typaram.Name) + | :? INamedTypeSymbol as namedTypeSym -> + namedTypeSym.TypeArguments + |> Seq.map tryOfRoslynType + |> List.ofSeq + |> Option.ofOptionList + |> Option.map (fun genericArgs -> + ExternalType.Type (Symbol.fullName typesym, genericArgs)) + | _ -> + Debug.Assert(false, sprintf "GoToDefinitionService: Unexpected Roslyn type symbol subclass: %O" (typesym.GetType())) + None + +module private ParamTypeSymbol = + + let tryOfRoslynParameter (param: IParameterSymbol): ParamTypeSymbol option = + ExternalType.tryOfRoslynType param.Type + |> Option.map ( + if param.RefKind = RefKind.None then ParamTypeSymbol.Param + else ParamTypeSymbol.Byref) + + let tryOfRoslynParameters (paramSyms: ImmutableArray): ParamTypeSymbol list option = + paramSyms + |> Seq.map tryOfRoslynParameter + |> Seq.toList + |> Option.ofOptionList + +module private ExternalSymbol = + let rec ofRoslynSymbol (symbol: ISymbol) : (ISymbol * ExternalSymbol) list = + let container = Symbol.fullName symbol.ContainingSymbol + + match symbol with + | :? INamedTypeSymbol as typesym -> + let fullTypeName = Symbol.fullName typesym + + let constructors = + typesym.InstanceConstructors + |> Seq.choose<_,ISymbol * ExternalSymbol> (fun methsym -> + ParamTypeSymbol.tryOfRoslynParameters methsym.Parameters + |> Option.map (fun args -> upcast methsym, ExternalSymbol.Constructor(fullTypeName, args)) + ) + |> List.ofSeq + + (symbol, ExternalSymbol.Type fullTypeName) :: constructors + + | :? IMethodSymbol as methsym -> + ParamTypeSymbol.tryOfRoslynParameters methsym.Parameters + |> Option.map (fun args -> + symbol, ExternalSymbol.Method(container, methsym.MetadataName, args, methsym.TypeParameters.Length)) + |> Option.toList + + | :? IPropertySymbol as propsym -> + [upcast propsym, ExternalSymbol.Property(container, propsym.MetadataName)] + + | :? IFieldSymbol as fieldsym -> + [upcast fieldsym, ExternalSymbol.Field(container, fieldsym.MetadataName)] + + | :? IEventSymbol as eventsym -> + [upcast eventsym, ExternalSymbol.Event(container, eventsym.MetadataName)] + + | _ -> [] + +type internal FSharpNavigableItem(document: Document, textSpan: TextSpan) = + interface INavigableItem with + member __.Glyph = Glyph.BasicFile + member __.DisplayFileLocation = true + member __.IsImplicitlyDeclared = false + member __.Document = document + member __.SourceSpan = textSpan + member __.DisplayTaggedParts = ImmutableArray.Empty + member __.ChildItems = ImmutableArray.Empty + +type internal StatusBar(statusBar: IVsStatusbar) = + let mutable searchIcon = int16 Microsoft.VisualStudio.Shell.Interop.Constants.SBAI_Find :> obj + + let clear() = + // unfreeze the statusbar + statusBar.FreezeOutput 0 |> ignore + statusBar.Clear() |> ignore + + member __.Message(msg: string) = + let _, frozen = statusBar.IsFrozen() + // unfreeze the status bar + if frozen <> 0 then statusBar.FreezeOutput 0 |> ignore + statusBar.SetText msg |> ignore + // freeze the status bar + statusBar.FreezeOutput 1 |> ignore + + member this.TempMessage(msg: string) = + this.Message msg + async { + do! Async.Sleep 4000 + match statusBar.GetText() with + | 0, currentText when currentText <> msg -> () + | _ -> clear() + }|> Async.Start + + member __.Clear() = clear() + + /// Animated magnifying glass that displays on the status bar while a symbol search is in progress. + member __.Animate() : IDisposable = + statusBar.Animation (1, &searchIcon) |> ignore + { new IDisposable with + member __.Dispose() = statusBar.Animation(0, &searchIcon) |> ignore } + +type internal GoToDefinition(checker: FSharpChecker, projectInfoManager: FSharpProjectOptionsManager) = + let userOpName = "GoToDefinition" + + /// Use an origin document to provide the solution & workspace used to + /// find the corresponding textSpan and INavigableItem for the range + let rangeToNavigableItem (range: range, document: Document) = + async { + let fileName = try System.IO.Path.GetFullPath range.FileName with _ -> range.FileName + let refDocumentIds = document.Project.Solution.GetDocumentIdsWithFilePath fileName + if not refDocumentIds.IsEmpty then + let refDocumentId = refDocumentIds.First() + let refDocument = document.Project.Solution.GetDocument refDocumentId + let! cancellationToken = Async.CancellationToken + let! refSourceText = refDocument.GetTextAsync(cancellationToken) |> Async.AwaitTask + match RoslynHelpers.TryFSharpRangeToTextSpan (refSourceText, range) with + | None -> return None + | Some refTextSpan -> return Some (FSharpNavigableItem (refDocument, refTextSpan)) + else return None + } + + /// Helper function that is used to determine the navigation strategy to apply, can be tuned towards signatures or implementation files. + member private __.FindSymbolHelper (originDocument: Document, originRange: range, sourceText: SourceText, preferSignature: bool) = + asyncMaybe { + let! parsingOptions, projectOptions = projectInfoManager.TryGetOptionsForEditingDocumentOrProject originDocument + let defines = CompilerEnvironment.GetCompilationDefinesForEditing parsingOptions + let! originTextSpan = RoslynHelpers.TryFSharpRangeToTextSpan (sourceText, originRange) + let position = originTextSpan.Start + let! lexerSymbol = Tokenizer.getSymbolAtPosition (originDocument.Id, sourceText, position, originDocument.FilePath, defines, SymbolLookupKind.Greedy, false) + + let textLinePos = sourceText.Lines.GetLinePosition position + let fcsTextLineNumber = Line.fromZ textLinePos.Line + let lineText = (sourceText.Lines.GetLineFromPosition position).ToString() + + let! _, _, checkFileResults = checker.ParseAndCheckDocument (originDocument, projectOptions, sourceText=sourceText, userOpName=userOpName) + let idRange = lexerSymbol.Ident.idRange + let! fsSymbolUse = checkFileResults.GetSymbolUseAtLocation (fcsTextLineNumber, idRange.EndColumn, lineText, lexerSymbol.FullIsland, userOpName=userOpName) + let symbol = fsSymbolUse.Symbol + // if the tooltip was spawned in an implementation file and we have a range targeting + // a signature file, try to find the corresponding implementation file and target the + // desired symbol + if isSignatureFile fsSymbolUse.FileName && preferSignature = false then + let fsfilePath = Path.ChangeExtension (originRange.FileName,"fs") + if not (File.Exists fsfilePath) then return! None else + let! implDoc = originDocument.Project.Solution.TryGetDocumentFromPath fsfilePath + let! implSourceText = implDoc.GetTextAsync () + let! _parsingOptions, projectOptions = projectInfoManager.TryGetOptionsForEditingDocumentOrProject implDoc + let! _, _, checkFileResults = checker.ParseAndCheckDocument (implDoc, projectOptions, sourceText=implSourceText, userOpName=userOpName) + let! symbolUses = checkFileResults.GetUsesOfSymbolInFile symbol |> liftAsync + let! implSymbol = symbolUses |> Array.tryHead + let! implTextSpan = RoslynHelpers.TryFSharpRangeToTextSpan (implSourceText, implSymbol.RangeAlternate) + return FSharpNavigableItem (implDoc, implTextSpan) + else + let! targetDocument = originDocument.Project.Solution.TryGetDocumentFromFSharpRange fsSymbolUse.RangeAlternate + return! rangeToNavigableItem (fsSymbolUse.RangeAlternate, targetDocument) + } + + /// if the symbol is defined in the given file, return its declaration location, otherwise use the targetSymbol to find the first + /// instance of its presence in the provided source file. The first case is needed to return proper declaration location for + /// recursive type definitions, where the first its usage may not be the declaration. + member __.FindSymbolDeclarationInFile(targetSymbolUse: FSharpSymbolUse, filePath: string, source: string, options: FSharpProjectOptions, fileVersion:int) = + asyncMaybe { + match targetSymbolUse.Symbol.DeclarationLocation with + | Some decl when decl.FileName = filePath -> return decl + | _ -> + let! _, checkFileAnswer = checker.ParseAndCheckFileInProject (filePath, fileVersion, source, options, userOpName = userOpName) |> liftAsync + match checkFileAnswer with + | FSharpCheckFileAnswer.Aborted -> return! None + | FSharpCheckFileAnswer.Succeeded checkFileResults -> + let! symbolUses = checkFileResults.GetUsesOfSymbolInFile targetSymbolUse.Symbol |> liftAsync + let! implSymbol = symbolUses |> Array.tryHead + return implSymbol.RangeAlternate + } + + member private this.FindDefinitionAtPosition(originDocument: Document, position: int) = + asyncMaybe { + let! parsingOptions, projectOptions = projectInfoManager.TryGetOptionsForEditingDocumentOrProject originDocument + let! sourceText = originDocument.GetTextAsync () |> liftTaskAsync + let defines = CompilerEnvironment.GetCompilationDefinesForEditing parsingOptions + let textLine = sourceText.Lines.GetLineFromPosition position + let textLinePos = sourceText.Lines.GetLinePosition position + let fcsTextLineNumber = Line.fromZ textLinePos.Line + let lineText = (sourceText.Lines.GetLineFromPosition position).ToString() + + let preferSignature = isSignatureFile originDocument.FilePath + + let! _, _, checkFileResults = checker.ParseAndCheckDocument (originDocument, projectOptions, sourceText=sourceText, userOpName=userOpName) + + let! lexerSymbol = Tokenizer.getSymbolAtPosition (originDocument.Id, sourceText, position,originDocument.FilePath, defines, SymbolLookupKind.Greedy, false) + let idRange = lexerSymbol.Ident.idRange + + let! declarations = checkFileResults.GetDeclarationLocation (fcsTextLineNumber, lexerSymbol.Ident.idRange.EndColumn, textLine.ToString(), lexerSymbol.FullIsland, preferSignature, userOpName=userOpName) |> liftAsync + let! targetSymbolUse = checkFileResults.GetSymbolUseAtLocation (fcsTextLineNumber, idRange.EndColumn, lineText, lexerSymbol.FullIsland, userOpName=userOpName) + + match declarations with + | FSharpFindDeclResult.ExternalDecl (assy, targetExternalSym) -> + let! project = originDocument.Project.Solution.Projects |> Seq.tryFind (fun p -> p.AssemblyName.Equals(assy, StringComparison.OrdinalIgnoreCase)) + let! symbols = SymbolFinder.FindSourceDeclarationsAsync(project, fun _ -> true) + + let roslynSymbols = + symbols + |> Seq.collect ExternalSymbol.ofRoslynSymbol + |> Array.ofSeq + + let! symbol = + roslynSymbols + |> Seq.tryPick (fun (sym, externalSym) -> + if externalSym = targetExternalSym then Some sym + else None + ) + + let! location = symbol.Locations |> Seq.tryHead + return (FSharpNavigableItem(project.GetDocument(location.SourceTree), location.SourceSpan), idRange) + + | FSharpFindDeclResult.DeclFound targetRange -> + // if goto definition is called at we are alread at the declaration location of a symbol in + // either a signature or an implementation file then we jump to it's respective postion in thethe + if lexerSymbol.Range = targetRange then + // jump from signature to the corresponding implementation + if isSignatureFile originDocument.FilePath then + let implFilePath = Path.ChangeExtension (originDocument.FilePath,"fs") + if not (File.Exists implFilePath) then return! None else + let! implDocument = originDocument.Project.Solution.TryGetDocumentFromPath implFilePath + let! implSourceText = implDocument.GetTextAsync () |> liftTaskAsync + let! implVersion = implDocument.GetTextVersionAsync () |> liftTaskAsync + + let! targetRange = this.FindSymbolDeclarationInFile(targetSymbolUse, implFilePath, implSourceText.ToString(), projectOptions, implVersion.GetHashCode()) + + let! implTextSpan = RoslynHelpers.TryFSharpRangeToTextSpan (implSourceText, targetRange) + let navItem = FSharpNavigableItem (implDocument, implTextSpan) + return (navItem, idRange) + else // jump from implementation to the corresponding signature + let! declarations = checkFileResults.GetDeclarationLocation (fcsTextLineNumber, lexerSymbol.Ident.idRange.EndColumn, textLine.ToString(), lexerSymbol.FullIsland, true, userOpName=userOpName) |> liftAsync + match declarations with + | FSharpFindDeclResult.DeclFound targetRange -> + let! sigDocument = originDocument.Project.Solution.TryGetDocumentFromPath targetRange.FileName + let! sigSourceText = sigDocument.GetTextAsync () |> liftTaskAsync + let! sigTextSpan = RoslynHelpers.TryFSharpRangeToTextSpan (sigSourceText, targetRange) + let navItem = FSharpNavigableItem (sigDocument, sigTextSpan) + return (navItem, idRange) + | _ -> + return! None + // when the target range is different follow the navigation convention of + // - gotoDefn origin = signature , gotoDefn destination = signature + // - gotoDefn origin = implementation, gotoDefn destination = implementation + else + let! sigDocument = originDocument.Project.Solution.TryGetDocumentFromPath targetRange.FileName + let! sigSourceText = sigDocument.GetTextAsync () |> liftTaskAsync + let! sigTextSpan = RoslynHelpers.TryFSharpRangeToTextSpan (sigSourceText, targetRange) + // if the gotodef call originated from a signature and the returned target is a signature, navigate there + if isSignatureFile targetRange.FileName && preferSignature then + let navItem = FSharpNavigableItem (sigDocument, sigTextSpan) + return (navItem, idRange) + else // we need to get an FSharpSymbol from the targetRange found in the signature + // that symbol will be used to find the destination in the corresponding implementation file + let implFilePath = + // Bugfix: apparently sigDocument not always is a signature file + if isSignatureFile sigDocument.FilePath then Path.ChangeExtension (sigDocument.FilePath, "fs") + else sigDocument.FilePath + + let! implDocument = originDocument.Project.Solution.TryGetDocumentFromPath implFilePath + let! implVersion = implDocument.GetTextVersionAsync () |> liftTaskAsync + let! implSourceText = implDocument.GetTextAsync () |> liftTaskAsync + let! _parsingOptions, projectOptions = projectInfoManager.TryGetOptionsForEditingDocumentOrProject implDocument + + let! targetRange = this.FindSymbolDeclarationInFile(targetSymbolUse, implFilePath, implSourceText.ToString(), projectOptions, implVersion.GetHashCode()) + + let! implTextSpan = RoslynHelpers.TryFSharpRangeToTextSpan (implSourceText, targetRange) + let navItem = FSharpNavigableItem (implDocument, implTextSpan) + return (navItem, idRange) + | _ -> + return! None + } + + /// find the declaration location (signature file/.fsi) of the target symbol if possible, fall back to definition + member this.FindDeclarationOfSymbolAtRange(targetDocument: Document, symbolRange: range, targetSource: SourceText) = + this.FindSymbolHelper(targetDocument, symbolRange, targetSource, preferSignature=true) + + /// find the definition location (implementation file/.fs) of the target symbol + member this.FindDefinitionOfSymbolAtRange(targetDocument: Document, symbolRange: range, targetSourceText: SourceText) = + this.FindSymbolHelper(targetDocument, symbolRange, targetSourceText, preferSignature=false) + + member this.FindDefinitionsForPeekTask(originDocument: Document, position: int, cancellationToken: CancellationToken) = + this.FindDefinitionAtPosition(originDocument, position) + |> Async.map ( + Option.map (fun (navItem, _) -> (navItem :> INavigableItem)) + >> Option.toArray + >> Array.toSeq) + |> RoslynHelpers.StartAsyncAsTask cancellationToken + + /// Construct a task that will return a navigation target for the implementation definition of the symbol + /// at the provided position in the document. + member this.FindDefinitionTask(originDocument: Document, position: int, cancellationToken: CancellationToken) = + this.FindDefinitionAtPosition(originDocument, position) + |> Async.map (Option.map (fun (navItem, range) -> (navItem :> INavigableItem, range))) + |> RoslynHelpers.StartAsyncAsTask cancellationToken + + /// Navigate to the positon of the textSpan in the provided document + /// used by quickinfo link navigation when the tooltip contains the correct destination range. + member __.TryNavigateToTextSpan(document: Document, textSpan: TextSpan, statusBar: StatusBar) = + let navigableItem = FSharpNavigableItem(document, textSpan) :> INavigableItem + let workspace = document.Project.Solution.Workspace + let navigationService = workspace.Services.GetService() + let options = workspace.Options.WithChangedOption(NavigationOptions.PreferProvisionalTab, true) + let navigationSucceeded = navigationService.TryNavigateToSpan(workspace, navigableItem.Document.Id, navigableItem.SourceSpan, options) + + if not navigationSucceeded then + statusBar.TempMessage (SR.CannotNavigateUnknown()) + + member __.NavigateToItem(navigableItem: #INavigableItem, statusBar: StatusBar) = + use __ = statusBar.Animate() + + statusBar.Message (SR.NavigatingTo()) + + let workspace = navigableItem.Document.Project.Solution.Workspace + let navigationService = workspace.Services.GetService() + + // Prefer open documents in the preview tab. + let options = workspace.Options.WithChangedOption(NavigationOptions.PreferProvisionalTab, true) + let result = navigationService.TryNavigateToSpan(workspace, navigableItem.Document.Id, navigableItem.SourceSpan, options) + + if result then + statusBar.Clear() + else + statusBar.TempMessage (SR.CannotNavigateUnknown()) + + /// Find the declaration location (signature file/.fsi) of the target symbol if possible, fall back to definition + member this.NavigateToSymbolDeclarationAsync(targetDocument: Document, targetSourceText: SourceText, symbolRange: range, statusBar: StatusBar) = + asyncMaybe { + let! item = this.FindDeclarationOfSymbolAtRange(targetDocument, symbolRange, targetSourceText) + return this.NavigateToItem(item, statusBar) + } + + /// Find the definition location (implementation file/.fs) of the target symbol + member this.NavigateToSymbolDefinitionAsync(targetDocument: Document, targetSourceText: SourceText, symbolRange: range, statusBar: StatusBar) = + asyncMaybe { + let! item = this.FindDefinitionOfSymbolAtRange(targetDocument, symbolRange, targetSourceText) + return this.NavigateToItem(item, statusBar) + } diff --git a/vsintegration/src/FSharp.Editor/Navigation/GoToDefinitionService.fs b/vsintegration/src/FSharp.Editor/Navigation/GoToDefinitionService.fs index 7707b8a2554..dd201ab7750 100644 --- a/vsintegration/src/FSharp.Editor/Navigation/GoToDefinitionService.fs +++ b/vsintegration/src/FSharp.Editor/Navigation/GoToDefinitionService.fs @@ -3,235 +3,16 @@ namespace Microsoft.VisualStudio.FSharp.Editor open System.Composition -open System.IO -open System.Collections.Immutable -open System.Linq open System.Threading open System.Threading.Tasks open Microsoft.CodeAnalysis open Microsoft.CodeAnalysis.Editor -open Microsoft.CodeAnalysis.Navigation open Microsoft.CodeAnalysis.Host.Mef -open Microsoft.CodeAnalysis.Text -open Microsoft.CodeAnalysis.FindSymbols -open Microsoft.FSharp.Compiler.Range -open Microsoft.FSharp.Compiler.SourceCodeServices open Microsoft.VisualStudio.Shell open Microsoft.VisualStudio.Shell.Interop open System -open System.Diagnostics - -type internal FSharpNavigableItem(document: Document, textSpan: TextSpan) = - interface INavigableItem with - member this.Glyph = Glyph.BasicFile - member this.DisplayFileLocation = true - member this.IsImplicitlyDeclared = false - member this.Document = document - member this.SourceSpan = textSpan - member this.DisplayTaggedParts = ImmutableArray.Empty - member this.ChildItems = ImmutableArray.Empty - -type internal GoToDefinition(checker: FSharpChecker, projectInfoManager: FSharpProjectOptionsManager) = - - static let userOpName = "GoToDefinition" - - /// Use an origin document to provide the solution & workspace used to - /// find the corresponding textSpan and INavigableItem for the range - let rangeToNavigableItem (range: range, document: Document) = - async { - let fileName = try System.IO.Path.GetFullPath range.FileName with _ -> range.FileName - let refDocumentIds = document.Project.Solution.GetDocumentIdsWithFilePath fileName - if not refDocumentIds.IsEmpty then - let refDocumentId = refDocumentIds.First() - let refDocument = document.Project.Solution.GetDocument refDocumentId - let! cancellationToken = Async.CancellationToken - let! refSourceText = refDocument.GetTextAsync(cancellationToken) |> Async.AwaitTask - match RoslynHelpers.TryFSharpRangeToTextSpan (refSourceText, range) with - | None -> return None - | Some refTextSpan -> return Some (FSharpNavigableItem (refDocument, refTextSpan)) - else return None - } - - /// Helper function that is used to determine the navigation strategy to apply, can be tuned towards signatures or implementation files. - let findSymbolHelper (originDocument: Document, originRange: range, sourceText: SourceText, preferSignature: bool) : Async = - asyncMaybe { - let! parsingOptions, projectOptions = projectInfoManager.TryGetOptionsForEditingDocumentOrProject originDocument - let defines = CompilerEnvironment.GetCompilationDefinesForEditing (originDocument.FilePath, parsingOptions) - let! originTextSpan = RoslynHelpers.TryFSharpRangeToTextSpan (sourceText, originRange) - let position = originTextSpan.Start - let! lexerSymbol = Tokenizer.getSymbolAtPosition (originDocument.Id, sourceText, position, originDocument.FilePath, defines, SymbolLookupKind.Greedy, false) - - let textLinePos = sourceText.Lines.GetLinePosition position - let fcsTextLineNumber = Line.fromZ textLinePos.Line - let lineText = (sourceText.Lines.GetLineFromPosition position).ToString() - - let! _, _, checkFileResults = checker.ParseAndCheckDocument (originDocument, projectOptions, allowStaleResults=true,sourceText=sourceText, userOpName = userOpName) - let idRange = lexerSymbol.Ident.idRange - let! fsSymbolUse = checkFileResults.GetSymbolUseAtLocation (fcsTextLineNumber, idRange.EndColumn, lineText, lexerSymbol.FullIsland, userOpName=userOpName) - let symbol = fsSymbolUse.Symbol - // if the tooltip was spawned in an implementation file and we have a range targeting - // a signature file, try to find the corresponding implementation file and target the - // desired symbol - if isSignatureFile fsSymbolUse.FileName && preferSignature = false then - let fsfilePath = Path.ChangeExtension (originRange.FileName,"fs") - if not (File.Exists fsfilePath) then return! None else - let! implDoc = originDocument.Project.Solution.TryGetDocumentFromPath fsfilePath - let! implSourceText = implDoc.GetTextAsync () - let! _parsingOptions, projectOptions = projectInfoManager.TryGetOptionsForEditingDocumentOrProject implDoc - let! _, _, checkFileResults = checker.ParseAndCheckDocument (implDoc, projectOptions, allowStaleResults=true, sourceText=implSourceText, userOpName = userOpName) - let! symbolUses = checkFileResults.GetUsesOfSymbolInFile symbol |> liftAsync - let! implSymbol = symbolUses |> Array.tryHead - let! implTextSpan = RoslynHelpers.TryFSharpRangeToTextSpan (implSourceText, implSymbol.RangeAlternate) - return FSharpNavigableItem (implDoc, implTextSpan) - else - let! targetDocument = originDocument.Project.Solution.TryGetDocumentFromFSharpRange fsSymbolUse.RangeAlternate - return! rangeToNavigableItem (fsSymbolUse.RangeAlternate, targetDocument) - } - - /// find the declaration location (signature file/.fsi) of the target symbol if possible, fall back to definition - member __.FindDeclarationOfSymbolAtRange(targetDocument: Document, symbolRange: range, targetSource: SourceText) = - findSymbolHelper (targetDocument, symbolRange, targetSource, true) - - /// find the definition location (implementation file/.fs) of the target symbol - member __.FindDefinitionOfSymbolAtRange(targetDocument: Document, symbolRange: range, targetSourceText: SourceText) = - findSymbolHelper (targetDocument, symbolRange, targetSourceText, false) - - /// use the targetSymbol to find the first instance of its presence in the provided source file - member __.FindSymbolDeclarationInFile(targetSymbolUse: FSharpSymbolUse, filePath: string, source: string, options: FSharpProjectOptions, fileVersion:int) = - asyncMaybe { - let! _, checkFileAnswer = checker.ParseAndCheckFileInProject (filePath, fileVersion, source, options, userOpName = userOpName) |> liftAsync - match checkFileAnswer with - | FSharpCheckFileAnswer.Aborted -> return! None - | FSharpCheckFileAnswer.Succeeded checkFileResults -> - let! symbolUses = checkFileResults.GetUsesOfSymbolInFile targetSymbolUse.Symbol |> liftAsync - let! implSymbol = symbolUses |> Array.tryHead - return implSymbol.RangeAlternate - } - -type private StatusBar(statusBar: IVsStatusbar) = - - let mutable searchIcon = int16 Microsoft.VisualStudio.Shell.Interop.Constants.SBAI_Find :> obj - - let clear() = - // unfreeze the statusbar - statusBar.FreezeOutput 0 |> ignore - statusBar.Clear() |> ignore - - member __.Message(msg: string) = - let _, frozen = statusBar.IsFrozen() - // unfreeze the status bar - if frozen <> 0 then statusBar.FreezeOutput 0 |> ignore - statusBar.SetText msg |> ignore - // freeze the status bar - statusBar.FreezeOutput 1 |> ignore - - member this.TempMessage(msg: string) = - this.Message msg - async { - do! Async.Sleep 4000 - match statusBar.GetText() with - | 0, currentText when currentText <> msg -> () - | _ -> clear() - }|> Async.Start - - member __.Clear() = clear() - - /// Animated magnifying glass that displays on the status bar while a symbol search is in progress. - member __.Animate() : IDisposable = - statusBar.Animation (1, &searchIcon) |> ignore - { new IDisposable with - member __.Dispose() = statusBar.Animation(0, &searchIcon) |> ignore } - -module internal Symbol = - - let fullName (root: ISymbol) : string = - - let rec inner parts (sym: ISymbol) = - match sym with - | null -> - parts - // TODO: do we have any other terminating cases? - | sym when sym.Kind = SymbolKind.NetModule || sym.Kind = SymbolKind.Assembly -> - parts - | sym when sym.MetadataName <> "" -> - inner (sym.MetadataName :: parts) sym.ContainingSymbol - | sym -> - inner parts sym.ContainingSymbol - - inner [] root |> String.concat "." - -module internal ExternalType = - - let rec tryOfRoslynType (typesym: ITypeSymbol): ExternalType option = - match typesym with - | :? IPointerTypeSymbol as ptrparam -> - tryOfRoslynType ptrparam.PointedAtType |> Option.map ExternalType.Pointer - | :? IArrayTypeSymbol as arrparam -> - tryOfRoslynType arrparam.ElementType |> Option.map ExternalType.Array - | :? ITypeParameterSymbol as typaram -> - Some (ExternalType.TypeVar typaram.Name) - | :? INamedTypeSymbol as namedTypeSym -> - namedTypeSym.TypeArguments - |> Seq.map tryOfRoslynType - |> List.ofSeq - |> Option.ofOptionList - |> Option.map (fun genericArgs -> - ExternalType.Type (Symbol.fullName typesym, genericArgs) - ) - | _ -> - Debug.Assert(false, sprintf "GoToDefinitionService: Unexpected Roslyn type symbol subclass: %O" (typesym.GetType())) - None - -module internal ParamTypeSymbol = - - let tryOfRoslynParameter (param: IParameterSymbol): ParamTypeSymbol option = - ExternalType.tryOfRoslynType param.Type - |> Option.map ( - if param.RefKind = RefKind.None then ParamTypeSymbol.Param - else ParamTypeSymbol.Byref - ) - - let tryOfRoslynParameters (paramSyms: ImmutableArray): ParamTypeSymbol list option = - paramSyms |> Seq.map tryOfRoslynParameter |> Seq.toList |> Option.ofOptionList - -module internal ExternalSymbol = - - let rec ofRoslynSymbol (symbol: ISymbol) : (ISymbol * ExternalSymbol) list = - let container = Symbol.fullName symbol.ContainingSymbol - - match symbol with - | :? INamedTypeSymbol as typesym -> - let fullTypeName = Symbol.fullName typesym - - let constructors = - typesym.InstanceConstructors - |> Seq.choose<_,ISymbol * ExternalSymbol> (fun methsym -> - ParamTypeSymbol.tryOfRoslynParameters methsym.Parameters - |> Option.map (fun args -> upcast methsym, ExternalSymbol.Constructor(fullTypeName, args)) - ) - |> List.ofSeq - - (symbol, ExternalSymbol.Type fullTypeName) :: constructors - - | :? IMethodSymbol as methsym -> - ParamTypeSymbol.tryOfRoslynParameters methsym.Parameters - |> Option.map (fun args -> - symbol, ExternalSymbol.Method(container, methsym.MetadataName, args, methsym.TypeParameters.Length)) - |> Option.toList - - | :? IPropertySymbol as propsym -> - [upcast propsym, ExternalSymbol.Property(container, propsym.MetadataName)] - - | :? IFieldSymbol as fieldsym -> - [upcast fieldsym, ExternalSymbol.Field(container, fieldsym.MetadataName)] - - | :? IEventSymbol as eventsym -> - [upcast eventsym, ExternalSymbol.Event(container, eventsym.MetadataName)] - - | _ -> [] - [, FSharpConstants.FSharpLanguageName)>] [)>] @@ -242,202 +23,46 @@ type internal FSharpGoToDefinitionService projectInfoManager: FSharpProjectOptionsManager ) = - static let userOpName = "GoToDefinition" - let gotoDefinition = GoToDefinition(checkerProvider.Checker, projectInfoManager) - let serviceProvider = ServiceProvider.GlobalProvider - let statusBar = StatusBar(serviceProvider.GetService()) - - let tryNavigateToItem (navigableItem: #INavigableItem option) = - use __ = statusBar.Animate() - - match navigableItem with - | Some navigableItem -> - statusBar.Message (SR.NavigatingTo()) - - let workspace = navigableItem.Document.Project.Solution.Workspace - let navigationService = workspace.Services.GetService() - // prefer open documents in the preview tab - let options = workspace.Options.WithChangedOption (NavigationOptions.PreferProvisionalTab, true) - let result = navigationService.TryNavigateToSpan (workspace, navigableItem.Document.Id, navigableItem.SourceSpan, options) - - if result then - statusBar.Clear() - else - statusBar.TempMessage (SR.CannotNavigateUnknown()) - - result - | None -> - statusBar.TempMessage (SR.CannotDetermineSymbol()) - true - - /// Navigate to the positon of the textSpan in the provided document - /// used by quickinfo link navigation when the tooltip contains the correct destination range. - member this.TryNavigateToTextSpan (document: Document, textSpan: TextSpan) = - let navigableItem = FSharpNavigableItem (document, textSpan) :> INavigableItem - let workspace = document.Project.Solution.Workspace - let navigationService = workspace.Services.GetService() - let options = workspace.Options.WithChangedOption (NavigationOptions.PreferProvisionalTab, true) - if navigationService.TryNavigateToSpan (workspace, navigableItem.Document.Id, navigableItem.SourceSpan, options) then - true - else - statusBar.TempMessage (SR.CannotNavigateUnknown()) - false - - /// find the declaration location (signature file/.fsi) of the target symbol if possible, fall back to definition - member __.NavigateToSymbolDeclarationAsync (targetDocument: Document, targetSourceText: SourceText, symbolRange: range) = - gotoDefinition.FindDeclarationOfSymbolAtRange(targetDocument, symbolRange, targetSourceText) |> Async.map tryNavigateToItem - - /// find the definition location (implementation file/.fs) of the target symbol - member this.NavigateToSymbolDefinitionAsync (targetDocument: Document, targetSourceText: SourceText, symbolRange: range) = - gotoDefinition.FindDefinitionOfSymbolAtRange(targetDocument, symbolRange, targetSourceText) |> Async.map tryNavigateToItem - - /// Construct a task that will return a navigation target for the implementation definition of the symbol - /// at the provided position in the document. - member __.FindDefinitionsTask(originDocument: Document, position: int, cancellationToken: CancellationToken) = - asyncMaybe { - let! parsingOptions, projectOptions = projectInfoManager.TryGetOptionsForEditingDocumentOrProject originDocument - let! sourceText = originDocument.GetTextAsync () |> liftTaskAsync - let defines = CompilerEnvironment.GetCompilationDefinesForEditing (originDocument.FilePath, parsingOptions) - let textLine = sourceText.Lines.GetLineFromPosition position - let textLinePos = sourceText.Lines.GetLinePosition position - let fcsTextLineNumber = Line.fromZ textLinePos.Line - let lineText = (sourceText.Lines.GetLineFromPosition position).ToString() - - let preferSignature = isSignatureFile originDocument.FilePath - - let! _, _, checkFileResults = checkerProvider.Checker.ParseAndCheckDocument (originDocument, projectOptions, allowStaleResults=true, sourceText=sourceText, userOpName=userOpName) - - let! lexerSymbol = Tokenizer.getSymbolAtPosition (originDocument.Id, sourceText, position,originDocument.FilePath, defines, SymbolLookupKind.Greedy, false) - let idRange = lexerSymbol.Ident.idRange - - let! declarations = checkFileResults.GetDeclarationLocation (fcsTextLineNumber, lexerSymbol.Ident.idRange.EndColumn, textLine.ToString(), lexerSymbol.FullIsland, preferSignature, userOpName=userOpName) |> liftAsync - let! targetSymbolUse = checkFileResults.GetSymbolUseAtLocation (fcsTextLineNumber, idRange.EndColumn, lineText, lexerSymbol.FullIsland, userOpName=userOpName) - - match declarations with - | FSharpFindDeclResult.ExternalDecl (assy, targetExternalSym) -> - let! project = originDocument.Project.Solution.Projects |> Seq.tryFind (fun p -> p.AssemblyName.Equals(assy, StringComparison.OrdinalIgnoreCase)) - let! symbols = SymbolFinder.FindSourceDeclarationsAsync(project, fun _ -> true) - - let roslynSymbols = - symbols - |> Seq.collect ExternalSymbol.ofRoslynSymbol - |> Array.ofSeq - - let! symbol = - roslynSymbols - |> Seq.tryPick (fun (sym, externalSym) -> - if externalSym = targetExternalSym then Some sym - else None - ) - - let! location = symbol.Locations |> Seq.tryHead - return FSharpNavigableItem(project.GetDocument(location.SourceTree), location.SourceSpan) - - | FSharpFindDeclResult.DeclFound targetRange -> - // if goto definition is called at we are alread at the declaration location of a symbol in - // either a signature or an implementation file then we jump to it's respective postion in thethe - if lexerSymbol.Range = targetRange then - // jump from signature to the corresponding implementation - if isSignatureFile originDocument.FilePath then - let implFilePath = Path.ChangeExtension (originDocument.FilePath,"fs") - if not (File.Exists implFilePath) then return! None else - let! implDocument = originDocument.Project.Solution.TryGetDocumentFromPath implFilePath - let! implSourceText = implDocument.GetTextAsync () |> liftTaskAsync - let! implVersion = implDocument.GetTextVersionAsync () |> liftTaskAsync - - let! targetRange = - gotoDefinition.FindSymbolDeclarationInFile(targetSymbolUse, implFilePath, implSourceText.ToString(), projectOptions, implVersion.GetHashCode()) - - let! implTextSpan = RoslynHelpers.TryFSharpRangeToTextSpan (implSourceText, targetRange) - let navItem = FSharpNavigableItem (implDocument, implTextSpan) - return navItem - else // jump from implementation to the corresponding signature - let! declarations = checkFileResults.GetDeclarationLocation (fcsTextLineNumber, lexerSymbol.Ident.idRange.EndColumn, textLine.ToString(), lexerSymbol.FullIsland, true, userOpName=userOpName) |> liftAsync - match declarations with - | FSharpFindDeclResult.DeclFound targetRange -> - let! sigDocument = originDocument.Project.Solution.TryGetDocumentFromPath targetRange.FileName - let! sigSourceText = sigDocument.GetTextAsync () |> liftTaskAsync - let! sigTextSpan = RoslynHelpers.TryFSharpRangeToTextSpan (sigSourceText, targetRange) - let navItem = FSharpNavigableItem (sigDocument, sigTextSpan) - return navItem - | _ -> return! None - // when the target range is different follow the navigation convention of - // - gotoDefn origin = signature , gotoDefn destination = signature - // - gotoDefn origin = implementation, gotoDefn destination = implementation - else - let! sigDocument = originDocument.Project.Solution.TryGetDocumentFromPath targetRange.FileName - let! sigSourceText = sigDocument.GetTextAsync () |> liftTaskAsync - let! sigTextSpan = RoslynHelpers.TryFSharpRangeToTextSpan (sigSourceText, targetRange) - // if the gotodef call originated from a signature and the returned target is a signature, navigate there - if isSignatureFile targetRange.FileName && preferSignature then - let navItem = FSharpNavigableItem (sigDocument, sigTextSpan) - return navItem - else // we need to get an FSharpSymbol from the targetRange found in the signature - // that symbol will be used to find the destination in the corresponding implementation file - let implFilePath = - // Bugfix: apparently sigDocument not always is a signature file - if isSignatureFile sigDocument.FilePath then Path.ChangeExtension (sigDocument.FilePath, "fs") - else sigDocument.FilePath - - let! implDocument = originDocument.Project.Solution.TryGetDocumentFromPath implFilePath - let! implVersion = implDocument.GetTextVersionAsync () |> liftTaskAsync - let! implSourceText = implDocument.GetTextAsync () |> liftTaskAsync - let! _parsingOptions, projectOptions = projectInfoManager.TryGetOptionsForEditingDocumentOrProject implDocument - - let! targetRange = - gotoDefinition.FindSymbolDeclarationInFile(targetSymbolUse, implFilePath, implSourceText.ToString(), projectOptions, implVersion.GetHashCode()) - - let! implTextSpan = RoslynHelpers.TryFSharpRangeToTextSpan (implSourceText, targetRange) - let navItem = FSharpNavigableItem (implDocument, implTextSpan) - return navItem - | _ -> return! None - } - |> Async.map (Option.map (fun x -> x :> INavigableItem) >> Option.toArray >> Array.toSeq) - |> RoslynHelpers.StartAsyncAsTask cancellationToken + let gtd = GoToDefinition(checkerProvider.Checker, projectInfoManager) + let statusBar = StatusBar(ServiceProvider.GlobalProvider.GetService()) interface IGoToDefinitionService with - // used for 'definition peek' - member this.FindDefinitionsAsync (document: Document, position: int, cancellationToken: CancellationToken) = - this.FindDefinitionsTask (document, position, cancellationToken) + /// Invoked with Peek Definition. + member __.FindDefinitionsAsync (document: Document, position: int, cancellationToken: CancellationToken) = + gtd.FindDefinitionsForPeekTask(document, position, cancellationToken) - // used for 'goto definition' proper + /// Invoked with Go to Definition. /// Try to navigate to the definiton of the symbol at the symbolRange in the originDocument - member this.TryGoToDefinition(document: Document, position: int, cancellationToken: CancellationToken) = - let definitionTask = this.FindDefinitionsTask (document, position, cancellationToken) - - statusBar.Message (SR.LocatingSymbol()) + member __.TryGoToDefinition(document: Document, position: int, cancellationToken: CancellationToken) = + statusBar.Message(SR.LocatingSymbol()) use __ = statusBar.Animate() + let gtdTask = gtd.FindDefinitionTask(document, position, cancellationToken) + // Wrap this in a try/with as if the user clicks "Cancel" on the thread dialog, we'll be cancelled // Task.Wait throws an exception if the task is cancelled, so be sure to catch it. - let completionError = + let gtdCompletionOrError = try - // REVIEW: document this use of a blocking wait on the cancellation token, explaining why it is ok - definitionTask.Wait() - None - with exc -> Some <| Exception.flattenMessage exc + // This call to Wait() is fine because we want to be able to provide the error message in the status bar. + gtdTask.Wait() + Ok gtdTask + with exc -> + Error(Exception.flattenMessage exc) - match completionError with - | Some message -> - statusBar.TempMessage <| String.Format(SR.NavigateToFailed(), message) + match gtdCompletionOrError with + | Ok task -> + if task.Status = TaskStatus.RanToCompletion && task.Result.IsSome then + let item, _ = task.Result.Value + gtd.NavigateToItem(item, statusBar) + + // 'true' means do it, like Sheev Palpatine would want us to. + true + else + statusBar.TempMessage (SR.CannotDetermineSymbol()) + false + | Error message -> + statusBar.TempMessage(String.Format(SR.NavigateToFailed(), message)) // Don't show the dialog box as it's most likely that the user cancelled. // Don't make them click twice. - true - | None -> - if definitionTask.Status = TaskStatus.RanToCompletion && definitionTask.Result <> null && definitionTask.Result.Any() then - let navigableItem = definitionTask.Result.First() // F# API provides only one INavigableItem - tryNavigateToItem (Some navigableItem) - - // FSROSLYNTODO: potentially display multiple results here - // If GotoDef returns one result then it should try to jump to a discovered location. If it returns multiple results then it should use - // presenters to render items so user can choose whatever he needs. Given that per comment F# API always returns only one item then we - // should always navigate to definition and get rid of presenters. - // - //let refDisplayString = refSourceText.GetSubText(refTextSpan).ToString() - //for presenter in presenters do - // presenter.DisplayResult(navigableItem.DisplayString, definitionTask.Result) - //true - else - statusBar.TempMessage (SR.CannotDetermineSymbol()) - false \ No newline at end of file + true \ No newline at end of file diff --git a/vsintegration/src/FSharp.Editor/Navigation/NavigableSymbolsService.fs b/vsintegration/src/FSharp.Editor/Navigation/NavigableSymbolsService.fs new file mode 100644 index 00000000000..4ec1ef238fb --- /dev/null +++ b/vsintegration/src/FSharp.Editor/Navigation/NavigableSymbolsService.fs @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace Microsoft.VisualStudio.FSharp.Editor + +open System +open System.Threading +open System.Threading.Tasks +open System.ComponentModel.Composition + +open Microsoft.CodeAnalysis.Text +open Microsoft.CodeAnalysis.Navigation + +open Microsoft.VisualStudio.Language.Intellisense +open Microsoft.VisualStudio.Text +open Microsoft.VisualStudio.Text.Editor +open Microsoft.VisualStudio.Shell.Interop +open Microsoft.VisualStudio.Utilities +open Microsoft.VisualStudio.Shell + +[] +type internal FSharpNavigableSymbol(item: INavigableItem, span: SnapshotSpan, gtd: GoToDefinition, statusBar: StatusBar) = + interface INavigableSymbol with + member __.Navigate(_: INavigableRelationship) = + gtd.NavigateToItem(item, statusBar) + + member __.Relationships = seq { yield PredefinedNavigableRelationships.Definition } + + member __.SymbolSpan = span + +type internal FSharpNavigableSymbolSource(checkerProvider: FSharpCheckerProvider, projectInfoManager: FSharpProjectOptionsManager, serviceProvider: IServiceProvider) = + + let mutable disposed = false + let gtd = GoToDefinition(checkerProvider.Checker, projectInfoManager) + let statusBar = StatusBar(serviceProvider.GetService()) + + interface INavigableSymbolSource with + member __.GetNavigableSymbolAsync(triggerSpan: SnapshotSpan, cancellationToken: CancellationToken) = + // Yes, this is a code smell. But this is how the editor API accepts what we would treat as None. + if disposed then null + else + asyncMaybe { + let snapshot = triggerSpan.Snapshot + let position = triggerSpan.Start.Position + let document = snapshot.GetOpenDocumentInCurrentContextWithChanges() + let! sourceText = document.GetTextAsync () |> liftTaskAsync + + statusBar.Message(SR.LocatingSymbol()) + use _ = statusBar.Animate() + + let gtdTask = gtd.FindDefinitionTask(document, position, cancellationToken) + + // Wrap this in a try/with as if the user clicks "Cancel" on the thread dialog, we'll be cancelled + // Task.Wait throws an exception if the task is cancelled, so be sure to catch it. + let gtdCompletedOrError = + try + // This call to Wait() is fine because we want to be able to provide the error message in the status bar. + gtdTask.Wait() + Ok gtdTask + with exc -> + Error(Exception.flattenMessage exc) + + match gtdCompletedOrError with + | Ok task -> + if task.Status = TaskStatus.RanToCompletion && task.Result.IsSome then + let (navigableItem, range) = task.Result.Value + + let declarationTextSpan = RoslynHelpers.FSharpRangeToTextSpan(sourceText, range) + let declarationSpan = Span(declarationTextSpan.Start, declarationTextSpan.Length) + let symbolSpan = SnapshotSpan(snapshot, declarationSpan) + + return FSharpNavigableSymbol(navigableItem, symbolSpan, gtd, statusBar) :> INavigableSymbol + else + statusBar.TempMessage (SR.CannotDetermineSymbol()) + + // The NavigableSymbols API accepts 'null' when there's nothing to navigate to. + return null + | Error message -> + statusBar.TempMessage (String.Format(SR.NavigateToFailed(), message)) + + // The NavigableSymbols API accepts 'null' when there's nothing to navigate to. + return null + } + |> Async.map Option.toObj + |> RoslynHelpers.StartAsyncAsTask cancellationToken + + member __.Dispose() = + disposed <- true + +[)>] +[] +[] +[] +type internal FSharpNavigableSymbolService + [] + ( + [)>] serviceProvider: IServiceProvider, + checkerProvider: FSharpCheckerProvider, + projectInfoManager: FSharpProjectOptionsManager + ) = + + interface INavigableSymbolSourceProvider with + member __.TryCreateNavigableSymbolSource(_: ITextView, _: ITextBuffer) = + new FSharpNavigableSymbolSource(checkerProvider, projectInfoManager, serviceProvider) :> INavigableSymbolSource \ No newline at end of file diff --git a/vsintegration/src/FSharp.Editor/Navigation/NavigateToSearchService.fs b/vsintegration/src/FSharp.Editor/Navigation/NavigateToSearchService.fs index 38c2abc9687..ad3f894b730 100644 --- a/vsintegration/src/FSharp.Editor/Navigation/NavigateToSearchService.fs +++ b/vsintegration/src/FSharp.Editor/Navigation/NavigateToSearchService.fs @@ -10,6 +10,7 @@ open System.Collections.Immutable open System.Threading open System.Threading.Tasks open System.Runtime.CompilerServices +open System.Runtime.Caching open System.Globalization open Microsoft.CodeAnalysis @@ -135,7 +136,9 @@ module private Index = Seq.toArray result member __.AllItems = items } +[] module private Utils = + let navigateToItemKindToRoslynKind = function | NavigateTo.NavigableItemKind.Module -> NavigateToItemKind.Module | NavigateTo.NavigableItemKind.ModuleAbbreviation -> NavigateToItemKind.Module @@ -177,7 +180,9 @@ module private Utils = | _ -> container.Name typeAsString + name -[, FSharpConstants.FSharpLanguageName); Shared>] + type PerDocumentSavedData = { Hash: int; Items: Index.IIndexedNavigableItems } + +[, FSharpConstants.FSharpLanguageName); Shared>] type internal FSharpNavigateToSearchService [] ( @@ -185,42 +190,51 @@ type internal FSharpNavigateToSearchService projectInfoManager: FSharpProjectOptionsManager ) = - let itemsByDocumentId = ConditionalWeakTable() + let kindsProvided = ImmutableHashSet.Create(NavigateToItemKind.Module, NavigateToItemKind.Class, NavigateToItemKind.Field, NavigateToItemKind.Property, NavigateToItemKind.Method, NavigateToItemKind.Enum, NavigateToItemKind.EnumItem) :> IImmutableSet + + // Save the backing navigation data in a memory cache held in a sliding window + let itemsByDocumentId = new MemoryCache("FSharp.Editor.FSharpNavigateToSearchService") - let getNavigableItems(document: Document, parsingOptions: FSharpParsingOptions) = + let getNavigableItems(document: Document, parsingOptions: FSharpParsingOptions, kinds: IImmutableSet) = async { let! cancellationToken = Async.CancellationToken let! sourceText = document.GetTextAsync(cancellationToken) |> Async.AwaitTask let! parseResults = checkerProvider.Checker.ParseFile(document.FilePath, sourceText.ToString(), parsingOptions) + + let navItems parsedInput = + NavigateTo.getNavigableItems parsedInput + |> Array.filter (fun i -> kinds.Contains(navigateToItemKindToRoslynKind i.Kind)) + return - match parseResults.ParseTree |> Option.map NavigateTo.getNavigableItems with + match parseResults.ParseTree |> Option.map navItems with | Some items -> [| for item in items do match RoslynHelpers.TryFSharpRangeToTextSpan(sourceText, item.Range) with | None -> () | Some sourceSpan -> - let glyph = Utils.navigateToItemKindToGlyph item.Kind - let kind = Utils.navigateToItemKindToRoslynKind item.Kind - let additionalInfo = Utils.containerToString item.Container document.Project + let glyph = navigateToItemKindToGlyph item.Kind + let kind = navigateToItemKindToRoslynKind item.Kind + let additionalInfo = containerToString item.Container document.Project yield NavigableItem(document, sourceSpan, glyph, item.Name, kind, additionalInfo) |] | None -> [||] } - let getCachedIndexedNavigableItems(document: Document, parsingOptions: FSharpParsingOptions) = + let getCachedIndexedNavigableItems(document: Document, parsingOptions: FSharpParsingOptions, kinds: IImmutableSet) = async { let! cancellationToken = Async.CancellationToken let! textVersion = document.GetTextVersionAsync(cancellationToken) |> Async.AwaitTask let textVersionHash = hash textVersion - match itemsByDocumentId.TryGetValue document.Id with - | true, (oldTextVersionHash, items) when oldTextVersionHash = textVersionHash -> - return items - | _ -> - let! items = getNavigableItems(document, parsingOptions) + let key = document.Id.ToString() + match itemsByDocumentId.Get(key) with + | :? PerDocumentSavedData as data when data.Hash = textVersionHash -> return data.Items + | _ -> + let! items = getNavigableItems(document, parsingOptions, kinds) let indexedItems = Index.build items - itemsByDocumentId.Remove(document.Id) |> ignore - itemsByDocumentId.Add(document.Id, (textVersionHash, indexedItems)) - return indexedItems - } + let data = { Hash= textVersionHash; Items = indexedItems } + let cacheItem = CacheItem(key, data) + let policy = CacheItemPolicy(SlidingExpiration=DefaultTuning.PerDocumentSavedDataSlidingWindow) + itemsByDocumentId.Set(cacheItem, policy) + return indexedItems } let patternMatchKindToNavigateToMatchKind = function | PatternMatchKind.Exact -> NavigateToMatchKind.Exact @@ -230,20 +244,20 @@ type internal FSharpNavigateToSearchService | PatternMatchKind.Fuzzy -> NavigateToMatchKind.Regular | _ -> NavigateToMatchKind.Regular - interface INavigateToSearchService with - member __.SearchProjectAsync(project, searchPattern, cancellationToken) : Task> = + interface INavigateToSearchService_RemoveInterfaceAboveAndRenameThisAfterInternalsVisibleToUsersUpdate with + member __.SearchProjectAsync(project, searchPattern, kinds, cancellationToken) : Task> = asyncMaybe { let! parsingOptions, _site, _options = projectInfoManager.TryGetOptionsForProject(project.Id) let! items = project.Documents - |> Seq.map (fun document -> getCachedIndexedNavigableItems(document, parsingOptions)) + |> Seq.map (fun document -> getCachedIndexedNavigableItems(document, parsingOptions, kinds)) |> Async.Parallel |> liftAsync let items = if searchPattern.Length = 1 then items - |> Array.map (fun items -> items.Find(searchPattern)) + |> Array.map (fun items -> items.Find(searchPattern)) |> Array.concat |> Array.filter (fun x -> x.Name.Length = 1 && String.Equals(x.Name, searchPattern, StringComparison.InvariantCultureIgnoreCase)) else @@ -263,12 +277,16 @@ type internal FSharpNavigateToSearchService |> Async.map Seq.toImmutableArray |> RoslynHelpers.StartAsyncAsTask(cancellationToken) - member __.SearchDocumentAsync(document, searchPattern, cancellationToken) : Task> = + member __.SearchDocumentAsync(document, searchPattern, kinds, cancellationToken) : Task> = asyncMaybe { let! parsingOptions, _, _ = projectInfoManager.TryGetOptionsForDocumentOrProject(document) - let! items = getCachedIndexedNavigableItems(document, parsingOptions) |> liftAsync + let! items = getCachedIndexedNavigableItems(document, parsingOptions, kinds) |> liftAsync return items.Find(searchPattern) } |> Async.map (Option.defaultValue [||]) |> Async.map Seq.toImmutableArray - |> RoslynHelpers.StartAsyncAsTask(cancellationToken) \ No newline at end of file + |> RoslynHelpers.StartAsyncAsTask(cancellationToken) + + member __.KindsProvided = kindsProvided + + member __.CanFilter = true \ No newline at end of file diff --git a/vsintegration/src/FSharp.Editor/Options/EditorOptions.fs b/vsintegration/src/FSharp.Editor/Options/EditorOptions.fs index 0f4409a99d1..47dcad5a029 100644 --- a/vsintegration/src/FSharp.Editor/Options/EditorOptions.fs +++ b/vsintegration/src/FSharp.Editor/Options/EditorOptions.fs @@ -1,26 +1,41 @@ namespace Microsoft.VisualStudio.FSharp.Editor +open System open System.ComponentModel.Composition open System.Runtime.InteropServices +open Microsoft.VisualStudio.Shell open Microsoft.VisualStudio.FSharp.UIResources -open SettingsPersistence open OptionsUIHelpers - module DefaultTuning = - let SemanticColorizationInitialDelay = 0 (* milliseconds *) let UnusedDeclarationsAnalyzerInitialDelay = 0 (* 1000 *) (* milliseconds *) let UnusedOpensAnalyzerInitialDelay = 0 (* 2000 *) (* milliseconds *) let SimplifyNameInitialDelay = 2000 (* milliseconds *) let SimplifyNameEachItemDelay = 0 (* milliseconds *) + /// How long is the per-document data saved before it is eligible for eviction from the cache? 10 seconds. + /// Re-tokenizing is fast so we don't need to save this data long. + let PerDocumentSavedDataSlidingWindow = TimeSpan(0,0,10)(* seconds *) + +type EnterKeySetting = + | NeverNewline + | NewlineOnCompleteWord + | AlwaysNewline + // CLIMutable to make the record work also as a view model [] type IntelliSenseOptions = { ShowAfterCharIsTyped: bool ShowAfterCharIsDeleted: bool - ShowAllSymbols : bool } + IncludeSymbolsFromUnopenedNamespacesOrModules : bool + EnterKeySetting : EnterKeySetting } + static member Default = + { ShowAfterCharIsTyped = true + ShowAfterCharIsDeleted = true + IncludeSymbolsFromUnopenedNamespacesOrModules = false + EnterKeySetting = EnterKeySetting.NeverNewline} + [] type QuickInfoUnderlineStyle = Dot | Dash | Solid @@ -29,48 +44,93 @@ type QuickInfoUnderlineStyle = Dot | Dash | Solid type QuickInfoOptions = { DisplayLinks: bool UnderlineStyle: QuickInfoUnderlineStyle } + static member Default = + { DisplayLinks = true + UnderlineStyle = QuickInfoUnderlineStyle.Solid } [] type CodeFixesOptions = { SimplifyName: bool AlwaysPlaceOpensAtTopLevel: bool - UnusedOpens: bool } + UnusedOpens: bool + UnusedDeclarations: bool } + static member Default = + { // We have this off by default, disable until we work out how to make this low priority + // See https://github.com/Microsoft/visualfsharp/pull/3238#issue-237699595 + SimplifyName = false + AlwaysPlaceOpensAtTopLevel = true + UnusedOpens = true + UnusedDeclarations = true } [] type LanguageServicePerformanceOptions = { EnableInMemoryCrossProjectReferences: bool + AllowStaleCompletionResults: bool + TimeUntilStaleCompletion: int ProjectCheckCacheSize: int } + static member Default = + { EnableInMemoryCrossProjectReferences = true + AllowStaleCompletionResults = true + TimeUntilStaleCompletion = 2000 // In ms, so this is 2 seconds + ProjectCheckCacheSize = 200 } -[)>] -type internal Settings [](store: SettingsStore) = - do // Initialize default settings - - store.RegisterDefault - { ShowAfterCharIsTyped = true - ShowAfterCharIsDeleted = true - ShowAllSymbols = true } - - store.RegisterDefault - { DisplayLinks = true - UnderlineStyle = QuickInfoUnderlineStyle.Solid } - - store.RegisterDefault - { // We have this off by default, disable until we work out how to make this low priority - // See https://github.com/Microsoft/visualfsharp/pull/3238#issue-237699595 - SimplifyName = false - AlwaysPlaceOpensAtTopLevel = false - UnusedOpens = true } - - store.RegisterDefault - { EnableInMemoryCrossProjectReferences = true - ProjectCheckCacheSize = 200 } - - interface ISettings +[] +type CodeLensOptions = + { Enabled : bool + ReplaceWithLineLens: bool + UseColors: bool + Prefix : string } + static member Default = + { Enabled = false + UseColors = false + ReplaceWithLineLens = true + Prefix = "// " } - static member IntelliSense : IntelliSenseOptions = getSettings() - static member QuickInfo : QuickInfoOptions = getSettings() - static member CodeFixes : CodeFixesOptions = getSettings() - static member LanguageServicePerformance : LanguageServicePerformanceOptions = getSettings() +[] +type AdvancedOptions = + { IsBlockStructureEnabled: bool + IsOutliningEnabled: bool } + static member Default = + { IsBlockStructureEnabled = true + IsOutliningEnabled = true } + +[] +[)>] +type EditorOptions + [] + ( + [)>] serviceProvider: IServiceProvider + ) = + + let store = SettingsStore(serviceProvider) + + do + store.Register QuickInfoOptions.Default + store.Register CodeFixesOptions.Default + store.Register LanguageServicePerformanceOptions.Default + store.Register AdvancedOptions.Default + store.Register IntelliSenseOptions.Default + store.Register CodeLensOptions.Default + + member __.IntelliSense : IntelliSenseOptions = store.Read() + member __.QuickInfo : QuickInfoOptions = store.Read() + member __.CodeFixes : CodeFixesOptions = store.Read() + member __.LanguageServicePerformance : LanguageServicePerformanceOptions = store.Read() + member __.Advanced: AdvancedOptions = store.Read() + member __.CodeLens: CodeLensOptions = store.Read() + + interface Microsoft.CodeAnalysis.Host.IWorkspaceService + + interface IPersistSettings with + member __.Read() = store.Read() + member __.Write(settings) = store.Write(settings) + + +[] +module internal WorkspaceSettingFromDocumentExtension = + type Microsoft.CodeAnalysis.Document with + member this.FSharpOptions = + this.Project.Solution.Workspace.Services.GetService() : EditorOptions module internal OptionsUI = @@ -80,6 +140,12 @@ module internal OptionsUI = override this.CreateView() = let view = IntelliSenseOptionControl() view.charTyped.Unchecked.Add <| fun _ -> view.charDeleted.IsChecked <- System.Nullable false + + let path = "EnterKeySetting" + bindRadioButton view.nevernewline path EnterKeySetting.NeverNewline + bindRadioButton view.newlinecompleteline path EnterKeySetting.NewlineOnCompleteWord + bindRadioButton view.alwaysnewline path EnterKeySetting.AlwaysNewline + upcast view [] @@ -104,4 +170,16 @@ module internal OptionsUI = type internal LanguageServicePerformanceOptionPage() = inherit AbstractOptionPage() override this.CreateView() = - upcast LanguageServicePerformanceOptionControl() \ No newline at end of file + upcast LanguageServicePerformanceOptionControl() + + [] + type internal CodeLensOptionPage() = + inherit AbstractOptionPage() + override this.CreateView() = + upcast CodeLensOptionControl() + + [] + type internal AdvancedSettingsOptionPage() = + inherit AbstractOptionPage() + override __.CreateView() = + upcast AdvancedOptionsControl() diff --git a/vsintegration/src/FSharp.Editor/Options/SettingsPersistence.fs b/vsintegration/src/FSharp.Editor/Options/SettingsPersistence.fs index d3b5db291ea..cec979e1656 100644 --- a/vsintegration/src/FSharp.Editor/Options/SettingsPersistence.fs +++ b/vsintegration/src/FSharp.Editor/Options/SettingsPersistence.fs @@ -2,73 +2,58 @@ open System open System.Collections.Concurrent -open System.ComponentModel.Composition -open System.Reflection open System.Runtime.InteropServices open Microsoft.VisualStudio.Settings -open Microsoft.VisualStudio.Shell open Newtonsoft.Json -module internal SettingsPersistence = +type IPersistSettings = + abstract member Read : unit -> 't + abstract member Write : 't -> unit + +[] +type SVsSettingsPersistenceManager = class end + +type SettingsStore(serviceProvider: IServiceProvider) = + + let settingsManager = serviceProvider.GetService(typeof) :?> ISettingsManager + // settings quallified type names are used as keys, this should be enough to avoid collisions + let storageKey (typ: Type) = typ.Namespace + "." + typ.Name // Each group of settings is a value of some named type, for example 'IntelliSenseOptions', 'QuickInfoOptions' // We cache exactly one instance of each, treating them as immutable. // This cache is updated by the SettingsStore when the user changes an option. - let private cache = ConcurrentDictionary() + let cache = System.Collections.Concurrent.ConcurrentDictionary() - let getSettings() : 't = + let read() = match cache.TryGetValue(typeof<'t>) with | true, value -> value :?> 't - | _ -> failwithf "Settings %s are not registered." typeof<'t>.Name - - let setSettings( settings: 't) = - cache.[typeof<'t>] <- settings - - [] - type SVsSettingsPersistenceManager = class end - - // marker interface for default settings export - type ISettings = interface end - - [] - type SettingsStore - [] - ( - [)>] - serviceProvider: IServiceProvider - ) = - let settingsManager = serviceProvider.GetService(typeof) :?> ISettingsManager - - // settings quallified type names are used as keys, this should be enough to avoid collisions - let storageKey (typ: Type) = typ.Namespace + "." + typ.Name - - let save (settings: 't) = - // we replace default serialization with Newtonsoft.Json for easy schema evolution - settingsManager.SetValueAsync(storageKey typeof<'t>, JsonConvert.SerializeObject settings, false) - |> Async.AwaitTask - - let tryPopulate (settings: 't) = - let result, json = settingsManager.TryGetValue(storageKey typeof<'t>) - if result = GetValueResult.Success then - // if it fails we just return what we got - try JsonConvert.PopulateObject(json, settings) with _ -> () - settings - - let ensureTrackingChanges (settings: 't) = - settings |> tryPopulate |> setSettings - let subset = settingsManager.GetSubset(storageKey typeof<'t>) - subset.add_SettingChangedAsync - <| PropertyChangedAsyncEventHandler (fun _ _ -> - (getSettings() : 't) |> tryPopulate |> setSettings - System.Threading.Tasks.Task.CompletedTask ) - - member this.LoadSettings() : 't = - getSettings() |> tryPopulate - - member this.SaveSettings(settings: 't) = - save settings - - member __.RegisterDefault(defaultValue: 't) = - ensureTrackingChanges defaultValue \ No newline at end of file + | _ -> failwithf "Settings %s are not registered." typeof<'t>.Name + + let write settings = cache.[settings.GetType()] <- settings + + let updateFromStore settings = + let result, json = settings.GetType() |> storageKey |> settingsManager.TryGetValue + if result = GetValueResult.Success then + // if it fails we just return what we got + try JsonConvert.PopulateObject(json, settings) with _ -> () + settings + + member __.Read() = read() + + member __.Write settings = + write settings + // we replace default serialization with Newtonsoft.Json for easy schema evolution + settingsManager.SetValueAsync(settings.GetType() |> storageKey, JsonConvert.SerializeObject settings, false) + |> Async.AwaitTask |> Async.StartImmediate + + member __.Register defaultSettings = + defaultSettings |> updateFromStore |> write + let subset = defaultSettings.GetType() |> storageKey |> settingsManager.GetSubset + + PropertyChangedAsyncEventHandler ( fun _ _ -> + read() |> updateFromStore |> write + System.Threading.Tasks.Task.CompletedTask ) + |> subset.add_SettingChangedAsync + \ No newline at end of file diff --git a/vsintegration/src/FSharp.Editor/Options/UIHelpers.fs b/vsintegration/src/FSharp.Editor/Options/UIHelpers.fs index 2fb2fe303fd..8ed209c80e1 100644 --- a/vsintegration/src/FSharp.Editor/Options/UIHelpers.fs +++ b/vsintegration/src/FSharp.Editor/Options/UIHelpers.fs @@ -1,16 +1,12 @@ namespace Microsoft.VisualStudio.FSharp.Editor -open System open System.Windows open System.Windows.Data -open System.Windows.Markup open System.Windows.Controls open Microsoft.VisualStudio.Shell open Microsoft.VisualStudio.ComponentModelHost -open SettingsPersistence - module internal OptionsUIHelpers = [] @@ -19,36 +15,31 @@ module internal OptionsUIHelpers = let view = lazy this.CreateView() - let store = + let optionService = + // lazy, so GetService is called from UI thread lazy let scm = this.Site.GetService(typeof) :?> IComponentModel - // make sure settings are initialized to default values - scm.GetService() |> ignore - scm.GetService() + scm.GetService() abstract CreateView : unit -> FrameworkElement - member this.View = view.Value - - member this.Store = store.Value - - override this.Child = upcast this.View + override this.Child = upcast view.Value override this.SaveSettingsToStorage() = - this.GetResult() |> this.Store.SaveSettings |> Async.StartImmediate + this.GetResult() |> optionService.Value.Write override this.LoadSettingsFromStorage() = - this.Store.LoadSettings() |> this.SetViewModel + optionService.Value.Read() |> this.SetViewModel //Override this method when using immutable settings type - member this.SetViewModel(settings: 't) = - // this is needed in case when settings are a CLIMutable record - this.View.DataContext <- null - this.View.DataContext <- settings + member __.SetViewModel(settings: 't) = + // in case settings are a CLIMutable record + view.Value.DataContext <- null + view.Value.DataContext <- settings //Override this method when using immutable settings type - member this.GetResult() : 't = - downcast this.View.DataContext + member __.GetResult() : 't = + downcast view.Value.DataContext //data binding helpers let radioButtonCoverter = @@ -64,35 +55,3 @@ module internal OptionsUIHelpers = let bindCheckBox (checkBox: CheckBox) (path: string) = checkBox.SetBinding(CheckBox.IsCheckedProperty, path) |> ignore - - // some helpers to create option views in code instead of XAML - let ( *** ) (control : #IAddChild) (children: UIElement list) = - children |> List.iter control.AddChild - control - - let ( +++ ) (control : #IAddChild) content = - control.AddChild content - control - - let withDefaultStyles (element: FrameworkElement) = - let groupBoxStyle = System.Windows.Style(typeof) - groupBoxStyle.Setters.Add(Setter(GroupBox.PaddingProperty, Thickness(Left = 7.0, Right = 7.0, Top = 7.0 ))) - groupBoxStyle.Setters.Add(Setter(GroupBox.MarginProperty, Thickness(Bottom = 3.0))) - groupBoxStyle.Setters.Add(Setter(GroupBox.ForegroundProperty, DynamicResourceExtension(SystemColors.WindowTextBrushKey))) - element.Resources.Add(typeof, groupBoxStyle) - - let checkBoxStyle = new System.Windows.Style(typeof) - checkBoxStyle.Setters.Add(new Setter(CheckBox.MarginProperty, new Thickness(Bottom = 7.0 ))) - checkBoxStyle.Setters.Add(new Setter(CheckBox.ForegroundProperty, new DynamicResourceExtension(SystemColors.WindowTextBrushKey))) - element.Resources.Add(typeof, checkBoxStyle) - - let textBoxStyle = new System.Windows.Style(typeof) - textBoxStyle.Setters.Add(new Setter(TextBox.MarginProperty, new Thickness(Left = 7.0, Right = 7.0 ))) - textBoxStyle.Setters.Add(new Setter(TextBox.ForegroundProperty, new DynamicResourceExtension(SystemColors.WindowTextBrushKey))) - element.Resources.Add(typeof, textBoxStyle); - - let radioButtonStyle = new System.Windows.Style(typeof) - radioButtonStyle.Setters.Add(new Setter(RadioButton.MarginProperty, new Thickness(Bottom = 7.0 ))) - radioButtonStyle.Setters.Add(new Setter(RadioButton.ForegroundProperty, new DynamicResourceExtension(SystemColors.WindowTextBrushKey))) - element.Resources.Add(typeof, radioButtonStyle) - element diff --git a/vsintegration/src/FSharp.Editor/QuickInfo/NavigableTextRun.fs b/vsintegration/src/FSharp.Editor/QuickInfo/NavigableTextRun.fs new file mode 100644 index 00000000000..1ebb945903f --- /dev/null +++ b/vsintegration/src/FSharp.Editor/QuickInfo/NavigableTextRun.fs @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace Microsoft.VisualStudio.FSharp.Editor + +[] +type NavigableTextRun(classificationTypeName:string, text:string, navigateAction:unit -> unit) = + member __.ClassificationTypeName = classificationTypeName + member __.Text = text + member __.NavigateAction = navigateAction diff --git a/vsintegration/src/FSharp.Editor/QuickInfo/Navigation.fs b/vsintegration/src/FSharp.Editor/QuickInfo/Navigation.fs index 4fb0aa0a206..09e5d305501 100644 --- a/vsintegration/src/FSharp.Editor/QuickInfo/Navigation.fs +++ b/vsintegration/src/FSharp.Editor/QuickInfo/Navigation.fs @@ -1,18 +1,25 @@ -namespace Microsoft.VisualStudio.FSharp.Editor +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace Microsoft.VisualStudio.FSharp.Editor open System open Microsoft.CodeAnalysis +open Microsoft.FSharp.Compiler.SourceCodeServices + open Microsoft.FSharp.Compiler.Range -open Microsoft.FSharp.Compiler +open Microsoft.VisualStudio.Shell.Interop type internal QuickInfoNavigation ( - gotoDefinitionService: FSharpGoToDefinitionService, + statusBar: StatusBar, + checker: FSharpChecker, + projectInfoManager: FSharpProjectOptionsManager, initialDoc: Document, thisSymbolUseRange: range ) = + let workspace = initialDoc.Project.Solution.Workspace let solution = workspace.CurrentSolution @@ -22,35 +29,39 @@ type internal QuickInfoNavigation solution.TryGetDocumentIdFromFSharpRange (range, initialDoc.Project.Id) |> Option.isSome member __.RelativePath (range: range) = - let relativePathEscaped = - match solution.FilePath with + let relativePathEscaped = + match solution.FilePath with | null -> range.FileName - | sfp -> + | sfp -> let targetUri = Uri(range.FileName) Uri(sfp).MakeRelativeUri(targetUri).ToString() relativePathEscaped |> Uri.UnescapeDataString - member __.NavigateTo (range: range) = - asyncMaybe { - let targetPath = range.FileName + member __.NavigateTo (range: range) = + asyncMaybe { + let targetPath = range.FileName let! targetDoc = solution.TryGetDocumentFromFSharpRange (range, initialDoc.Project.Id) - let! targetSource = targetDoc.GetTextAsync() + let! targetSource = targetDoc.GetTextAsync() let! targetTextSpan = RoslynHelpers.TryFSharpRangeToTextSpan (targetSource, range) - // to ensure proper navigation decsions we need to check the type of document the navigation call - // is originating from and the target we're provided by default + let gtd = GoToDefinition(checker, projectInfoManager) + + // To ensure proper navigation decsions, we need to check the type of document the navigation call + // is originating from and the target we're provided by default: // - signature files (.fsi) should navigate to other signature files // - implementation files (.fs) should navigate to other implementation files let (|Signature|Implementation|) filepath = if isSignatureFile filepath then Signature else Implementation - match initialDoc.FilePath, targetPath with - | Signature, Signature + match initialDoc.FilePath, targetPath with + | Signature, Signature | Implementation, Implementation -> - return gotoDefinitionService.TryNavigateToTextSpan (targetDoc, targetTextSpan) - // adjust the target from signature to implementation + return gtd.TryNavigateToTextSpan(targetDoc, targetTextSpan, statusBar) + + // Adjust the target from signature to implementation. | Implementation, Signature -> - return! gotoDefinitionService.NavigateToSymbolDefinitionAsync (targetDoc, targetSource, range) |> liftAsync - // adjust the target from implmentation to signature - | Signature, Implementation -> - return! gotoDefinitionService.NavigateToSymbolDeclarationAsync (targetDoc, targetSource, range) |> liftAsync + return! gtd.NavigateToSymbolDefinitionAsync(targetDoc, targetSource, range, statusBar) + + // Adjust the target from implmentation to signature. + | Signature, Implementation -> + return! gtd.NavigateToSymbolDeclarationAsync(targetDoc, targetSource, range, statusBar) } |> Async.Ignore |> Async.StartImmediate diff --git a/vsintegration/src/FSharp.Editor/QuickInfo/QuickInfoProvider.fs b/vsintegration/src/FSharp.Editor/QuickInfo/QuickInfoProvider.fs index 802d8948ca5..d612ecc7432 100644 --- a/vsintegration/src/FSharp.Editor/QuickInfo/QuickInfoProvider.fs +++ b/vsintegration/src/FSharp.Editor/QuickInfo/QuickInfoProvider.fs @@ -9,12 +9,13 @@ open System.ComponentModel.Composition open System.Text open Microsoft.CodeAnalysis -open Microsoft.CodeAnalysis.Editor open Microsoft.CodeAnalysis.Text -open Microsoft.CodeAnalysis.FindSymbols +open Microsoft.VisualStudio.Language.Intellisense open Microsoft.VisualStudio.Shell open Microsoft.VisualStudio.Shell.Interop +open Microsoft.VisualStudio.Text +open Microsoft.VisualStudio.Utilities open Microsoft.FSharp.Compiler.SourceCodeServices open Microsoft.FSharp.Compiler.Range @@ -22,8 +23,8 @@ open Microsoft.FSharp.Compiler open Internal.Utilities.StructuredFormat -type private TooltipInfo = - { StructuredText: FSharpStructuredToolTipText +type private QuickInfo = + { StructuredText: FSharpStructuredToolTipText Span: TextSpan Symbol: FSharpSymbol SymbolKind: LexerSymbolKind } @@ -34,17 +35,17 @@ module private FSharpQuickInfo = // when a construct has been declared in a signature file the documentation comments that are // written in that file are the ones that go into the generated xml when the project is compiled - // therefore we should include these doccoms in our design time tooltips - let getTooltipFromRange + // therefore we should include these doccoms in our design time quick info + let getQuickInfoFromRange ( - checker: FSharpChecker, - projectInfoManager: FSharpProjectOptionsManager, - document: Document, - declRange: range, + checker: FSharpChecker, + projectInfoManager: FSharpProjectOptionsManager, + document: Document, + declRange: range, cancellationToken: CancellationToken - ) - : Async = - + ) + : Async = + asyncMaybe { let solution = document.Project.Solution // ascertain the location of the target declaration in the signature file @@ -53,204 +54,220 @@ module private FSharpQuickInfo = let! extSourceText = extDocument.GetTextAsync cancellationToken let! extSpan = RoslynHelpers.TryFSharpRangeToTextSpan (extSourceText, declRange) let extLineText = (extSourceText.Lines.GetLineFromPosition extSpan.Start).ToString() - - // project options need to be retrieved because the signature file could be in another project + + // project options need to be retrieved because the signature file could be in another project let! extParsingOptions, _extSite, extProjectOptions = projectInfoManager.TryGetOptionsForProject extDocId.ProjectId - let extDefines = CompilerEnvironment.GetCompilationDefinesForEditing (extDocument.FilePath, extParsingOptions) + let extDefines = CompilerEnvironment.GetCompilationDefinesForEditing extParsingOptions let! extLexerSymbol = Tokenizer.getSymbolAtPosition(extDocId, extSourceText, extSpan.Start, declRange.FileName, extDefines, SymbolLookupKind.Greedy, true) let! _, _, extCheckFileResults = checker.ParseAndCheckDocument(extDocument, extProjectOptions, allowStaleResults=true, sourceText=extSourceText, userOpName = userOpName) - - let! extTooltipText = + + let! extQuickInfoText = extCheckFileResults.GetStructuredToolTipText (declRange.StartLine, extLexerSymbol.Ident.idRange.EndColumn, extLineText, extLexerSymbol.FullIsland, FSharpTokenTag.IDENT, userOpName=userOpName) |> liftAsync - - match extTooltipText with - | FSharpToolTipText [] + + match extQuickInfoText with + | FSharpToolTipText [] | FSharpToolTipText [FSharpStructuredToolTipElement.None] -> return! None - | extTooltipText -> + | extQuickInfoText -> let! extSymbolUse = extCheckFileResults.GetSymbolUseAtLocation(declRange.StartLine, extLexerSymbol.Ident.idRange.EndColumn, extLineText, extLexerSymbol.FullIsland, userOpName=userOpName) let! span = RoslynHelpers.TryFSharpRangeToTextSpan (extSourceText, extLexerSymbol.Range) - - return { StructuredText = extTooltipText + + return { StructuredText = extQuickInfoText Span = span Symbol = extSymbolUse.Symbol SymbolKind = extLexerSymbol.Kind } } - /// Get tooltip combined from doccom of Signature and definition - let getTooltipInfo + /// Get QuickInfo combined from doccom of Signature and definition + let getQuickInfo ( - checker: FSharpChecker, - projectInfoManager: FSharpProjectOptionsManager, - document: Document, - position: int, + checker: FSharpChecker, + projectInfoManager: FSharpProjectOptionsManager, + document: Document, + position: int, cancellationToken: CancellationToken - ) - : Async<(FSharpSymbolUse * TooltipInfo option * TooltipInfo option) option> = + ) + : Async<(FSharpSymbolUse * QuickInfo option * QuickInfo option) option> = asyncMaybe { let! sourceText = document.GetTextAsync cancellationToken let! parsingOptions, projectOptions = projectInfoManager.TryGetOptionsForEditingDocumentOrProject document - let defines = CompilerEnvironment.GetCompilationDefinesForEditing(document.FilePath, parsingOptions) + let defines = CompilerEnvironment.GetCompilationDefinesForEditing parsingOptions let! lexerSymbol = Tokenizer.getSymbolAtPosition(document.Id, sourceText, position, document.FilePath, defines, SymbolLookupKind.Greedy, true) let idRange = lexerSymbol.Ident.idRange let! _, _, checkFileResults = checker.ParseAndCheckDocument(document, projectOptions, allowStaleResults = true, sourceText=sourceText, userOpName = userOpName) let textLinePos = sourceText.Lines.GetLinePosition position let fcsTextLineNumber = Line.fromZ textLinePos.Line - let lineText = (sourceText.Lines.GetLineFromPosition position).ToString() + let lineText = (sourceText.Lines.GetLineFromPosition position).ToString() let! symbolUse = checkFileResults.GetSymbolUseAtLocation (fcsTextLineNumber, idRange.EndColumn, lineText, lexerSymbol.FullIsland, userOpName=userOpName) - - /// Gets the tooltip information for the orignal target - let getTargetSymbolTooltip () = + + /// Gets the QuickInfo information for the orignal target + let getTargetSymbolQuickInfo () = asyncMaybe { - let! targetTooltip = + let! targetQuickInfo = checkFileResults.GetStructuredToolTipText (fcsTextLineNumber, idRange.EndColumn, lineText, lexerSymbol.FullIsland, FSharpTokenTag.IDENT, userOpName=userOpName) |> liftAsync - - match targetTooltip with - | FSharpToolTipText [] + + match targetQuickInfo with + | FSharpToolTipText [] | FSharpToolTipText [FSharpStructuredToolTipElement.None] -> return! None - | _ -> + | _ -> let! targetTextSpan = RoslynHelpers.TryFSharpRangeToTextSpan (sourceText, lexerSymbol.Range) - return { StructuredText = targetTooltip + return { StructuredText = targetQuickInfo Span = targetTextSpan Symbol = symbolUse.Symbol SymbolKind = lexerSymbol.Kind } - } + } - // if the target is in a signature file, adjusting the tooltip info is unnecessary + // if the target is in a signature file, adjusting the quick info is unnecessary if isSignatureFile document.FilePath then - let! targetTooltipInfo = getTargetSymbolTooltip() - return symbolUse, None, Some targetTooltipInfo + let! targetQuickInfo = getTargetSymbolQuickInfo() + return symbolUse, None, Some targetQuickInfo else // find the declaration location of the target symbol, with a preference for signature files let! findSigDeclarationResult = checkFileResults.GetDeclarationLocation (idRange.StartLine, idRange.EndColumn, lineText, lexerSymbol.FullIsland, preferFlag=true, userOpName=userOpName) |> liftAsync - - // it is necessary to retrieve the backup tooltip info because this acquires - // the textSpan designating where we want the tooltip to appear. - let! targetTooltipInfo = getTargetSymbolTooltip() - + + // it is necessary to retrieve the backup quick info because this acquires + // the textSpan designating where we want the quick info to appear. + let! targetQuickInfo = getTargetSymbolQuickInfo() + let! result = match findSigDeclarationResult with | FSharpFindDeclResult.DeclFound declRange when isSignatureFile declRange.FileName -> asyncMaybe { - let! sigTooltipInfo = getTooltipFromRange(checker, projectInfoManager, document, declRange, cancellationToken) - + let! sigQuickInfo = getQuickInfoFromRange(checker, projectInfoManager, document, declRange, cancellationToken) + // if the target was declared in a signature file, and the current file // is not the corresponding module implementation file for that signature, - // the doccoms from the signature will overwrite any doccoms that might be + // the doccoms from the signature will overwrite any doccoms that might be // present on the definition/implementation - let! findImplDefinitionResult = checkFileResults.GetDeclarationLocation (idRange.StartLine, idRange.EndColumn, lineText, lexerSymbol.FullIsland, preferFlag=false, userOpName=userOpName) |> liftAsync - - match findImplDefinitionResult with - | FSharpFindDeclResult.DeclNotFound _ - | FSharpFindDeclResult.ExternalDecl _ -> return symbolUse, Some sigTooltipInfo, None - | FSharpFindDeclResult.DeclFound declRange -> - let! implTooltipInfo = getTooltipFromRange(checker, projectInfoManager, document, declRange, cancellationToken) - return symbolUse, Some sigTooltipInfo, Some { implTooltipInfo with Span = targetTooltipInfo.Span } + let! findImplDefinitionResult = checkFileResults.GetDeclarationLocation (idRange.StartLine, idRange.EndColumn, lineText, lexerSymbol.FullIsland, preferFlag=false, userOpName=userOpName) |> liftAsync + + match findImplDefinitionResult with + | FSharpFindDeclResult.DeclNotFound _ + | FSharpFindDeclResult.ExternalDecl _ -> return symbolUse, Some sigQuickInfo, None + | FSharpFindDeclResult.DeclFound declRange -> + let! implQuickInfo = getQuickInfoFromRange(checker, projectInfoManager, document, declRange, cancellationToken) + return symbolUse, Some sigQuickInfo, Some { implQuickInfo with Span = targetQuickInfo.Span } } | _ -> async.Return None |> liftAsync - - return result |> Option.defaultValue (symbolUse, None, Some targetTooltipInfo) + + return result |> Option.defaultValue (symbolUse, None, Some targetQuickInfo) } -[] -type internal FSharpQuickInfoProvider - [] +type internal FSharpAsyncQuickInfoSource ( - [)>] serviceProvider: IServiceProvider, - checkerProvider: FSharpCheckerProvider, - projectInfoManager: FSharpProjectOptionsManager, - gotoDefinitionService: FSharpGoToDefinitionService, - viewProvider: QuickInfoViewProvider + statusBar: StatusBar, + xmlMemberIndexService: IVsXMLMemberIndexService, + checkerProvider:FSharpCheckerProvider, + projectInfoManager:FSharpProjectOptionsManager, + textBuffer:ITextBuffer ) = - let xmlMemberIndexService = serviceProvider.GetService(typeof) :?> IVsXMLMemberIndexService - let documentationBuilder = XmlDocumentation.CreateDocumentationBuilder(xmlMemberIndexService, serviceProvider.DTE) - - static member ProvideQuickInfo(checker: FSharpChecker, documentId: DocumentId, sourceText: SourceText, filePath: string, position: int, parsingOptions: FSharpParsingOptions, options: FSharpProjectOptions, textVersionHash: int) = + // test helper + static member ProvideQuickInfo(checker:FSharpChecker, documentId:DocumentId, sourceText:SourceText, filePath:string, position:int, parsingOptions:FSharpParsingOptions, options:FSharpProjectOptions, textVersionHash:int, languageServicePerformanceOptions: LanguageServicePerformanceOptions) = asyncMaybe { - let! _, _, checkFileResults = checker.ParseAndCheckDocument (filePath, textVersionHash, sourceText.ToString(), options, allowStaleResults = true, userOpName = FSharpQuickInfo.userOpName) + let! _, _, checkFileResults = checker.ParseAndCheckDocument(filePath, textVersionHash, sourceText.ToString(), options, languageServicePerformanceOptions, userOpName=FSharpQuickInfo.userOpName) let textLine = sourceText.Lines.GetLineFromPosition position let textLineNumber = textLine.LineNumber + 1 // Roslyn line numbers are zero-based - let defines = CompilerEnvironment.GetCompilationDefinesForEditing (filePath, parsingOptions) + let defines = CompilerEnvironment.GetCompilationDefinesForEditing parsingOptions let! symbol = Tokenizer.getSymbolAtPosition (documentId, sourceText, position, filePath, defines, SymbolLookupKind.Precise, true) let! res = checkFileResults.GetStructuredToolTipText (textLineNumber, symbol.Ident.idRange.EndColumn, textLine.ToString(), symbol.FullIsland, FSharpTokenTag.IDENT, userOpName=FSharpQuickInfo.userOpName) |> liftAsync match res with - | FSharpToolTipText [] + | FSharpToolTipText [] | FSharpToolTipText [FSharpStructuredToolTipElement.None] -> return! None - | _ -> + | _ -> let! symbolUse = checkFileResults.GetSymbolUseAtLocation (textLineNumber, symbol.Ident.idRange.EndColumn, textLine.ToString(), symbol.FullIsland, userOpName=FSharpQuickInfo.userOpName) let! symbolSpan = RoslynHelpers.TryFSharpRangeToTextSpan (sourceText, symbol.Range) return res, symbolSpan, symbolUse.Symbol, symbol.Kind } - - interface IQuickInfoProvider with - override this.GetItemAsync(document: Document, position: int, cancellationToken: CancellationToken): Task = - asyncMaybe { - let! symbolUse, sigTooltipInfo, targetTooltipInfo = - FSharpQuickInfo.getTooltipInfo(checkerProvider.Checker, projectInfoManager, document, position, cancellationToken) - - match sigTooltipInfo, targetTooltipInfo with - | None, None -> return null - | Some tooltip, None - | None, Some tooltip -> - let mainDescription, documentation, typeParameterMap, usage, exceptions = ResizeArray(), ResizeArray(), ResizeArray(), ResizeArray(), ResizeArray() - XmlDocumentation.BuildDataTipText(documentationBuilder, mainDescription.Add, documentation.Add, typeParameterMap.Add, usage.Add, exceptions.Add, tooltip.StructuredText) - let glyph = Tokenizer.GetGlyphForSymbol(tooltip.Symbol, tooltip.SymbolKind) - let navigation = QuickInfoNavigation(gotoDefinitionService, document, symbolUse.RangeAlternate) - let content = viewProvider.ProvideContent(glyph, mainDescription, documentation=documentation, typeParameterMap=typeParameterMap, usage=usage, exceptions=exceptions, navigation=navigation) - return QuickInfoItem (tooltip.Span, content) - - | Some sigTooltip, Some targetTooltip -> - let mainDescription, targetDocumentation, sigDocumentation, typeParameterMap, exceptions, usage = ResizeArray(), ResizeArray(), ResizeArray(), ResizeArray(), ResizeArray(), ResizeArray() - XmlDocumentation.BuildDataTipText(documentationBuilder, ignore, sigDocumentation.Add, ignore, ignore, ignore, sigTooltip.StructuredText) - XmlDocumentation.BuildDataTipText(documentationBuilder, mainDescription.Add, targetDocumentation.Add, typeParameterMap.Add, exceptions.Add, usage.Add, targetTooltip.StructuredText) - - let width = - mainDescription - |> Seq.append targetDocumentation - |> Seq.append exceptions - |> Seq.append usage - |> Seq.append sigDocumentation - |> Seq.append typeParameterMap - |> Seq.map (fun x -> x.Text.Length) - |> Seq.max - - // eyeballed formula returning separator width in chars such as to prevent it from wrapping - // will not be needed once we replace the ascii-art divider with a XAML element - let width = if width / 2 > 85 then 85 else width / 2 - - let seperator = TaggedTextOps.tag Text (String.replicate width "⎯") - let lineBreak = TaggedTextOps.tag LineBreak "\n" - - // get whitespace nomalized documentation text - let getText (tts: seq) = - let text = - (StringBuilder(), tts) - ||> Seq.fold (fun sb tt -> - if String.IsNullOrWhiteSpace tt.Text then sb else sb.Append tt.Text) - |> string - if String.IsNullOrWhiteSpace text then None else Some text - - let documentation = - [ match getText targetDocumentation, getText sigDocumentation with - | None, None -> () - | None, Some _ -> yield! sigDocumentation - | Some _, None -> yield! targetDocumentation - | Some implText, Some sigText when implText.Equals (sigText, StringComparison.OrdinalIgnoreCase) -> - yield! sigDocumentation - | Some _, Some _ -> - yield! sigDocumentation - yield lineBreak - yield seperator - yield lineBreak - yield! targetDocumentation ] - let glyph = Tokenizer.GetGlyphForSymbol(targetTooltip.Symbol, targetTooltip.SymbolKind) - let navigation = QuickInfoNavigation(gotoDefinitionService, document, symbolUse.RangeAlternate) - let content = viewProvider.ProvideContent(glyph, mainDescription, documentation=documentation, typeParameterMap=typeParameterMap, usage=usage, exceptions=exceptions, navigation=navigation) - return QuickInfoItem (targetTooltip.Span, content) - } |> Async.map Option.toObj - |> RoslynHelpers.StartAsyncAsTask cancellationToken + + interface IAsyncQuickInfoSource with + override __.Dispose() = () // no cleanup necessary + + // This method can be called from the background thread. + // Do not call IServiceProvider.GetService here. + override __.GetQuickInfoItemAsync(session:IAsyncQuickInfoSession, cancellationToken:CancellationToken) : Task = + let triggerPoint = session.GetTriggerPoint(textBuffer.CurrentSnapshot) + match triggerPoint.HasValue with + | false -> Task.FromResult(null) + | true -> + let triggerPoint = triggerPoint.GetValueOrDefault() + let documentationBuilder = XmlDocumentation.CreateDocumentationBuilder(xmlMemberIndexService) + asyncMaybe { + let document = textBuffer.CurrentSnapshot.GetOpenDocumentInCurrentContextWithChanges() + let! symbolUse, sigQuickInfo, targetQuickInfo = FSharpQuickInfo.getQuickInfo(checkerProvider.Checker, projectInfoManager, document, triggerPoint.Position, cancellationToken) + let getTrackingSpan (span:TextSpan) = + textBuffer.CurrentSnapshot.CreateTrackingSpan(span.Start, span.Length, SpanTrackingMode.EdgeInclusive) + let lineBreak = TaggedTextOps.Literals.lineBreak + let joinWithLineBreaks segments = + match segments |> List.filter (Seq.isEmpty >> not) with + | [] -> Seq.empty + | xs -> xs |> List.reduce (fun acc elem -> seq { yield! acc; yield lineBreak; yield! elem }) + + match sigQuickInfo, targetQuickInfo with + | None, None -> return null + | Some quickInfo, None + | None, Some quickInfo-> + let mainDescription, documentation, typeParameterMap, usage, exceptions = ResizeArray(), ResizeArray(), ResizeArray(), ResizeArray(), ResizeArray() + XmlDocumentation.BuildDataTipText(documentationBuilder, mainDescription.Add, documentation.Add, typeParameterMap.Add, usage.Add, exceptions.Add, quickInfo.StructuredText) + let imageId = Tokenizer.GetImageIdForSymbol(quickInfo.Symbol, quickInfo.SymbolKind) + let navigation = QuickInfoNavigation(statusBar, checkerProvider.Checker, projectInfoManager, document, symbolUse.RangeAlternate) + let docs = joinWithLineBreaks [documentation; typeParameterMap; usage; exceptions] + let content = QuickInfoViewProvider.provideContent(imageId, mainDescription, docs, navigation) + let span = getTrackingSpan quickInfo.Span + return QuickInfoItem(span, content) + + | Some sigQuickInfo, Some targetQuickInfo -> + let mainDescription, targetDocumentation, sigDocumentation, typeParameterMap, exceptions, usage = ResizeArray(), ResizeArray(), ResizeArray(), ResizeArray(), ResizeArray(), ResizeArray() + XmlDocumentation.BuildDataTipText(documentationBuilder, ignore, sigDocumentation.Add, ignore, ignore, ignore, sigQuickInfo.StructuredText) + XmlDocumentation.BuildDataTipText(documentationBuilder, mainDescription.Add, targetDocumentation.Add, typeParameterMap.Add, exceptions.Add, usage.Add, targetQuickInfo.StructuredText) + // get whitespace nomalized documentation text + let getText (tts: seq) = + let text = + (StringBuilder(), tts) + ||> Seq.fold (fun sb tt -> + if String.IsNullOrWhiteSpace tt.Text then sb else sb.Append tt.Text) + |> string + if String.IsNullOrWhiteSpace text then None else Some text + + let documentation = + [ match getText targetDocumentation, getText sigDocumentation with + | None, None -> () + | None, Some _ -> yield! sigDocumentation + | Some _, None -> yield! targetDocumentation + | Some implText, Some sigText when implText.Equals (sigText, StringComparison.OrdinalIgnoreCase) -> + yield! sigDocumentation + | Some _ , Some _ -> + yield! joinWithLineBreaks [ sigDocumentation; [ TaggedTextOps.tagText "-------------" ]; targetDocumentation ] + ] |> ResizeArray + let docs = joinWithLineBreaks [documentation; typeParameterMap; usage; exceptions] + let imageId = Tokenizer.GetImageIdForSymbol(targetQuickInfo.Symbol, targetQuickInfo.SymbolKind) + let navigation = QuickInfoNavigation(statusBar, checkerProvider.Checker, projectInfoManager, document, symbolUse.RangeAlternate) + let content = QuickInfoViewProvider.provideContent(imageId, mainDescription, docs, navigation) + let span = getTrackingSpan targetQuickInfo.Span + return QuickInfoItem(span, content) + } |> Async.map Option.toObj + |> RoslynHelpers.StartAsyncAsTask cancellationToken + +[)>] +[] +[] +[] +type internal FSharpAsyncQuickInfoSourceProvider + [] + ( + [)>] serviceProvider: IServiceProvider, + checkerProvider:FSharpCheckerProvider, + projectInfoManager:FSharpProjectOptionsManager + ) = + + interface IAsyncQuickInfoSourceProvider with + override __.TryCreateQuickInfoSource(textBuffer:ITextBuffer) : IAsyncQuickInfoSource = + // GetService calls must be made on the UI thread + // It is safe to do it here (see #4713) + let statusBar = StatusBar(serviceProvider.GetService()) + let xmlMemberIndexService = serviceProvider.XMLMemberIndexService + new FSharpAsyncQuickInfoSource(statusBar, xmlMemberIndexService, checkerProvider, projectInfoManager, textBuffer) :> IAsyncQuickInfoSource diff --git a/vsintegration/src/FSharp.Editor/QuickInfo/Views.fs b/vsintegration/src/FSharp.Editor/QuickInfo/Views.fs index 4402b6c9b1c..b611ddb88c4 100644 --- a/vsintegration/src/FSharp.Editor/QuickInfo/Views.fs +++ b/vsintegration/src/FSharp.Editor/QuickInfo/Views.fs @@ -1,123 +1,99 @@ -namespace Microsoft.VisualStudio.FSharp.Editor +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -open System.ComponentModel.Composition -open System -open System.Windows -open System.Windows.Controls +namespace Microsoft.VisualStudio.FSharp.Editor -open Microsoft.CodeAnalysis +open System.Collections.Generic +open Internal.Utilities.StructuredFormat open Microsoft.CodeAnalysis.Classification -open Microsoft.CodeAnalysis.Editor -open Microsoft.CodeAnalysis.Editor.Shared.Utilities -open Microsoft.CodeAnalysis.Editor.Shared.Extensions -open Microsoft.CodeAnalysis.Editor.Implementation.IntelliSense.QuickInfo - -open Microsoft.VisualStudio.Language.Intellisense -open Microsoft.VisualStudio.Utilities -open Microsoft.VisualStudio.PlatformUI - open Microsoft.FSharp.Compiler - -open Internal.Utilities.StructuredFormat - -module private SessionHandling = - let mutable currentSession = None - - [)>] - [] - [] - [] - type SourceProviderForCapturingSession () = - interface IQuickInfoSourceProvider with - member x.TryCreateQuickInfoSource _ = - { new IQuickInfoSource with - member __.AugmentQuickInfoSession(session,_,_) = currentSession <- Some session - member __.Dispose() = () } - - -[] -type internal QuickInfoViewProvider - [] - ( - // lazy to try to mitigate #2756 (wrong tooltip font) - typeMap: Lazy, - glyphService: IGlyphService - ) = - - let styles = ResourceDictionary(Source = Uri(@"/FSharp.UIResources;component/HyperlinkStyles.xaml", UriKind.Relative)) - - let getStyle() : Style = - let key = - if Settings.QuickInfo.DisplayLinks then - match Settings.QuickInfo.UnderlineStyle with - | QuickInfoUnderlineStyle.Solid -> "solid_underline" - | QuickInfoUnderlineStyle.Dot -> "dot_underline" - | QuickInfoUnderlineStyle.Dash -> "dash_underline" - else "no_underline" - downcast styles.[key] - - let formatMap = lazy typeMap.Value.ClassificationFormatMapService.GetClassificationFormatMap "tooltip" - - let layoutTagToFormatting (layoutTag: LayoutTag) = - layoutTag - |> RoslynHelpers.roslynTag - |> ClassificationTags.GetClassificationTypeName - |> typeMap.Value.GetClassificationType - |> formatMap.Value.GetTextProperties - - let formatText (navigation: QuickInfoNavigation) (content: #seq) = - - let navigateAndDismiss range _ = - navigation.NavigateTo range - SessionHandling.currentSession |> Option.iter ( fun session -> session.Dismiss() ) - - let secondaryToolTip range = - let t = ToolTip(Content = navigation.RelativePath range) - DependencyObjectExtensions.SetDefaultTextProperties(t, formatMap.Value) - let color = VSColorTheme.GetThemedColor(EnvironmentColors.ToolTipBrushKey) - t.Background <- Media.SolidColorBrush(Media.Color.FromRgb(color.R, color.G, color.B)) - t - - let toInline (taggedText: Layout.TaggedText) = - let run = Documents.Run taggedText.Text - let inl = - match taggedText with - | :? Layout.NavigableTaggedText as nav when navigation.IsTargetValid nav.Range -> - let h = Documents.Hyperlink(run, ToolTip = secondaryToolTip nav.Range) - h.Click.Add <| navigateAndDismiss nav.Range - h :> Documents.Inline - | _ -> run :> _ - DependencyObjectExtensions.SetTextProperties (inl, layoutTagToFormatting taggedText.Tag) - inl - - let tb = TextBlock(TextWrapping = TextWrapping.Wrap, TextTrimming = TextTrimming.None) - DependencyObjectExtensions.SetDefaultTextProperties(tb, formatMap.Value) - tb.Inlines.AddRange(content |> Seq.map toInline) - if tb.Inlines.Count = 0 then tb.Visibility <- Visibility.Collapsed - tb.Resources.[typeof] <- getStyle() - tb - - let wrap (tb: TextBlock) = - // Formula to make max width of the TextBlock proportional to the tooltip font size. - // We need it, because the ascii-art divider inserted into xml documentation is of variable length and could wrap otherwise - let maxWidth = formatMap.Value.DefaultTextProperties.FontRenderingEmSize * 60.0 - tb.MaxWidth <- maxWidth - tb.HorizontalAlignment <- HorizontalAlignment.Left - tb - - let defer toTextBlock layout = - { new IDeferredQuickInfoContent with member __.Create() = upcast toTextBlock layout } - - member __.ProvideContent(glyph: Glyph, description, documentation, typeParameterMap, usage, exceptions, navigation: QuickInfoNavigation) = - let navigable = defer (formatText navigation) - let wrapped = defer (formatText navigation >> wrap) - let empty = defer (fun () -> TextBlock(Visibility = Visibility.Collapsed)) () - let glyphContent = SymbolGlyphDeferredContent(glyph, glyphService) - QuickInfoDisplayDeferredContent - (glyphContent, null, - mainDescription = navigable description, - documentation = wrapped documentation, - typeParameterMap = navigable typeParameterMap, - anonymousTypes = empty, - usageText = navigable usage, - exceptionText = navigable exceptions) +open Microsoft.VisualStudio.Core.Imaging +open Microsoft.VisualStudio.Language.StandardClassification +open Microsoft.VisualStudio.Text.Adornments + +module internal QuickInfoViewProvider = + + let layoutTagToClassificationTag (layoutTag:LayoutTag) = + match layoutTag with + | ActivePatternCase + | ActivePatternResult + | UnionCase + | Enum -> ClassificationTypeNames.EnumName // Roslyn-style classification name + | Alias + | Class + | Module + | Record + | Struct + | TypeParameter + | Union + | UnknownType -> PredefinedClassificationTypeNames.Type + | Interface -> ClassificationTypeNames.InterfaceName // Roslyn-style classification name + | Keyword -> PredefinedClassificationTypeNames.Keyword + | Delegate + | Event + | Field + | Local + | Member + | Method + | ModuleBinding + | Namespace + | Parameter + | Property + | RecordField -> PredefinedClassificationTypeNames.Identifier + | LineBreak + | Space -> PredefinedClassificationTypeNames.WhiteSpace + | NumericLiteral -> PredefinedClassificationTypeNames.Number + | Operator -> PredefinedClassificationTypeNames.Operator + | StringLiteral -> PredefinedClassificationTypeNames.String + | Punctuation + | Text + | UnknownEntity -> PredefinedClassificationTypeNames.Other + + let provideContent + ( + imageId:ImageId, + description:#seq, + documentation:#seq, + navigation:QuickInfoNavigation + ) = + + let buildContainerElement (itemGroup:#seq) = + let finalCollection = List() + let currentContainerItems = List() + let runsCollection = List() + let flushRuns() = + if runsCollection.Count > 0 then + let element = ClassifiedTextElement(runsCollection) + currentContainerItems.Add(element :> obj) + runsCollection.Clear() + let flushContainer() = + if currentContainerItems.Count > 0 then + let element = ContainerElement(ContainerElementStyle.Wrapped, currentContainerItems) + finalCollection.Add(element) + currentContainerItems.Clear() + for item in itemGroup do + let classificationTag = layoutTagToClassificationTag item.Tag + match item with + | :? Layout.NavigableTaggedText as nav when navigation.IsTargetValid nav.Range -> + flushRuns() + let navigableTextRun = NavigableTextRun(classificationTag, item.Text, fun () -> navigation.NavigateTo nav.Range) + currentContainerItems.Add(navigableTextRun :> obj) + | _ when item.Tag = LineBreak -> + flushRuns() + // preserve succesive linebreaks + if currentContainerItems.Count = 0 then + runsCollection.Add(ClassifiedTextRun(PredefinedClassificationTypeNames.Other, System.String.Empty)) + flushRuns() + flushContainer() + | _ -> + let newRun = ClassifiedTextRun(classificationTag, item.Text) + runsCollection.Add(newRun) + flushRuns() + flushContainer() + ContainerElement(ContainerElementStyle.Stacked, finalCollection |> Seq.map box) + + ContainerElement(ContainerElementStyle.Stacked, + ContainerElement(ContainerElementStyle.Wrapped, + ImageElement(imageId), + buildContainerElement description), + buildContainerElement documentation + ) diff --git a/vsintegration/src/FSharp.Editor/QuickInfo/WpfNagivableTextRunViewElementFactory.fs b/vsintegration/src/FSharp.Editor/QuickInfo/WpfNagivableTextRunViewElementFactory.fs new file mode 100644 index 00000000000..f560382b34a --- /dev/null +++ b/vsintegration/src/FSharp.Editor/QuickInfo/WpfNagivableTextRunViewElementFactory.fs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace Microsoft.VisualStudio.FSharp.Editor + +open System +open System.ComponentModel.Composition +open System.Windows +open System.Windows.Controls + +open Microsoft.VisualStudio.Text.Adornments +open Microsoft.VisualStudio.Text.Editor +open Microsoft.VisualStudio.Utilities + +[)>] +[] +[, typeof)>] +[] +type WpfNavigableTextRunViewElementFactory + [] + ( + viewElementFactoryService:IViewElementFactoryService, + settings: EditorOptions + ) = + let styles = Microsoft.VisualStudio.FSharp.UIResources.NavStyles() + interface IViewElementFactory with + override __.CreateViewElement<'TView when 'TView: not struct>(textView:ITextView, model:obj) : 'TView = + if not (model :? NavigableTextRun) || typeof<'TView> <> typeof then + failwith <| sprintf "Invalid type conversion. Supported conversion is `%s` to `%s`." typeof.Name typeof.Name + + // use the default converters to get a UIElement + let navigableTextRun = model :?> NavigableTextRun + let classifiedTextRun = ClassifiedTextRun(navigableTextRun.ClassificationTypeName, navigableTextRun.Text) + let classifiedTextElement = ClassifiedTextElement([classifiedTextRun]) + let convertedElement = viewElementFactoryService.CreateViewElement(textView, classifiedTextElement) + + // apply HTML-like styles + match convertedElement with + | :? TextBlock as tb -> + let underlineStyle = + let key = + if settings.QuickInfo.DisplayLinks then + match settings.QuickInfo.UnderlineStyle with + | QuickInfoUnderlineStyle.Solid -> "solid_underline" + | QuickInfoUnderlineStyle.Dash -> "dash_underline" + | QuickInfoUnderlineStyle.Dot -> "dot_underline" + else + "no_underline" + styles.Resources.[key] :?> Style + + // we need to enclose the generated Inline, which is actually a Run element, + // because fancy styling does not seem to work properly with Runs + let inl = tb.Inlines.FirstInline + let color = inl.Foreground + // clear the color here to make it inherit + inl.ClearValue(Documents.TextElement.ForegroundProperty) |> ignore + // this constructor inserts into TextBlock + Documents.Underline(tb.Inlines.FirstInline, tb.ContentStart, Foreground = color) |> ignore + tb.Resources.[typeof] <- underlineStyle + | _ -> () + + // add navigation + convertedElement.MouseDown.Add(fun _ -> navigableTextRun.NavigateAction()) + convertedElement :> obj :?> 'TView diff --git a/vsintegration/src/FSharp.Editor/Structure/BlockStructureService.fs b/vsintegration/src/FSharp.Editor/Structure/BlockStructureService.fs index 865165665a3..af3341351a6 100644 --- a/vsintegration/src/FSharp.Editor/Structure/BlockStructureService.fs +++ b/vsintegration/src/FSharp.Editor/Structure/BlockStructureService.fs @@ -34,6 +34,7 @@ module internal BlockStructure = | Scope.Member -> BlockTypes.Member | Scope.LetOrUse | Scope.Match + | Scope.MatchBang | Scope.MatchClause | Scope.EnumCase | Scope.UnionCase @@ -92,6 +93,7 @@ module internal BlockStructure = | Scope.Match | Scope.MatchClause | Scope.MatchLambda + | Scope.MatchBang | Scope.ThenInIfThenElse | Scope.ElseInIfThenElse | Scope.TryWith @@ -115,7 +117,7 @@ module internal BlockStructure = | Scope.While | Scope.For -> false - let createBlockSpans (sourceText:SourceText) (parsedInput:Ast.ParsedInput) = + let createBlockSpans isBlockStructureEnabled (sourceText:SourceText) (parsedInput:Ast.ParsedInput) = let linetext = sourceText.Lines |> Seq.map (fun x -> x.ToString()) |> Seq.toArray Structure.getOutliningRanges linetext parsedInput @@ -127,13 +129,13 @@ module internal BlockStructure = let hintSpan = RoslynHelpers.TryFSharpRangeToTextSpan(sourceText, scopeRange.Range) match textSpan,hintSpan with | Some textSpan, Some hintSpan -> - let line = sourceText.Lines.GetLineFromPosition textSpan.Start + let line = sourceText.Lines.GetLineFromPosition textSpan.Start let bannerText = match Option.ofNullable (line.Span.Intersection textSpan) with | Some span -> sourceText.GetSubText(span).ToString()+"..." | None -> "..." - - Some (BlockSpan(scopeToBlockType scopeRange.Scope, true, textSpan, hintSpan, bannerText, autoCollapse = isAutoCollapsible scopeRange.Scope)) + let blockType = if isBlockStructureEnabled then scopeToBlockType scopeRange.Scope else BlockTypes.Nonstructural + Some (BlockSpan(blockType, true, textSpan, hintSpan, bannerText, autoCollapse = isAutoCollapsible scopeRange.Scope)) | _, _ -> None ) @@ -151,7 +153,7 @@ type internal FSharpBlockStructureService(checker: FSharpChecker, projectInfoMan let! parsingOptions, _options = projectInfoManager.TryGetOptionsForEditingDocumentOrProject(document) let! sourceText = document.GetTextAsync(cancellationToken) let! parsedInput = checker.ParseDocument(document, parsingOptions, sourceText, userOpName) - return createBlockSpans sourceText parsedInput |> Seq.toImmutableArray + return createBlockSpans document.FSharpOptions.Advanced.IsBlockStructureEnabled sourceText parsedInput |> Seq.toImmutableArray } |> Async.map (Option.defaultValue ImmutableArray<_>.Empty) |> Async.map BlockStructure diff --git a/vsintegration/src/FSharp.Editor/xlf/FSharp.Editor.cs.xlf b/vsintegration/src/FSharp.Editor/xlf/FSharp.Editor.cs.xlf new file mode 100644 index 00000000000..73d205eca82 --- /dev/null +++ b/vsintegration/src/FSharp.Editor/xlf/FSharp.Editor.cs.xlf @@ -0,0 +1,162 @@ + + + + + + Add 'new' keyword + Přidejte klíčové slovo new. + + + + Implement interface + Implementujte rozhraní. + + + + Implement interface without type annotation + Implementujte rozhraní bez anotace typu. + + + + Prefix '{0}' with underscore + Před {0} vložte podtržítko. + + + + Rename '{0}' to '_' + Přejmenujte {0} na _. + + + + Simplify name + Zjednodušte název. + + + + Name can be simplified. + Název nelze zjednodušit. + + + + F# Functions / Methods + Funkce / metody jazyka F# + + + + F# Mutable Variables / Reference Cells + Měnitelné proměnné / referenční buňky jazyka F# + + + + F# Printf Format + Formát Printf jazyka F# + + + + F# Properties + Vlastnosti jazyka F# + + + + F# Disposable Types + Jednoúčelové typy jazyka F# + + + + Remove unused open declarations + Odeberte nepoužité otevřené deklarace. + + + + Open declaration can be removed. + Otevřenou deklaraci nelze odebrat. + + + + IntelliSense + IntelliSense + + + + QuickInfo + Stručné informace + + + + Add an assembly reference to '{0}' + Přidejte do {0} odkaz na sestavení. + + + + Add a project reference to '{0}' + Přidejte do {0} odkaz na projekt. + + + + Code Fixes + Opravy kódu + + + + Performance + Výkon + + + + The value is unused + Tato hodnota se nepoužívá. + + + + Cannot determine the symbol under the caret + Nelze určit symbol pod stříškou. + + + + Cannot navigate to the requested location + Nelze přejít na požadované umístění. + + + + Locating the symbol under the caret... + Vyhledává se symbol pod stříškou... + + + + Navigating to symbol... + Přechází se na symbol... + + + + Navigate to symbol failed: {0} + Na symbol se nepodařilo přejít: {0}. + + + + Exceptions: + Výjimky: + + + + Generic parameters: + Obecné parametry: + + + + Rename '{0}' to '__' + Přejmenujte {0} na __. + + + + Advanced + Upřesnit + + + + CodeLens + CodeLens + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.Editor/xlf/FSharp.Editor.de.xlf b/vsintegration/src/FSharp.Editor/xlf/FSharp.Editor.de.xlf new file mode 100644 index 00000000000..b728e57410b --- /dev/null +++ b/vsintegration/src/FSharp.Editor/xlf/FSharp.Editor.de.xlf @@ -0,0 +1,162 @@ + + + + + + Add 'new' keyword + Schlüsselwort "new" hinzufügen + + + + Implement interface + Schnittstelle implementieren + + + + Implement interface without type annotation + Schnittstelle ohne Typanmerkung implementieren + + + + Prefix '{0}' with underscore + "{0}" einen Unterstrich voranstellen + + + + Rename '{0}' to '_' + "{0}" in "_" umbenennen + + + + Simplify name + Namen vereinfachen + + + + Name can be simplified. + Der Name kann vereinfacht werden. + + + + F# Functions / Methods + F#-Funktionen/-Methoden + + + + F# Mutable Variables / Reference Cells + Änderbare F#-Variablen/Verweiszellen + + + + F# Printf Format + F#-Printf-Format + + + + F# Properties + F#-Eigenschaften + + + + F# Disposable Types + Verwerfbare F#-Typen + + + + Remove unused open declarations + Nicht verwendete open-Deklarationen entfernen + + + + Open declaration can be removed. + Open-Deklaration kann nicht entfernt werden. + + + + IntelliSense + IntelliSense + + + + QuickInfo + QuickInfo + + + + Add an assembly reference to '{0}' + Assemblyverweis auf "{0}" hinzufügen + + + + Add a project reference to '{0}' + Projektverweis auf "{0}" hinzufügen + + + + Code Fixes + Codefehlerbehebungen + + + + Performance + Leistung + + + + The value is unused + Der Wert wird nicht verwendet. + + + + Cannot determine the symbol under the caret + Das Symbol unter dem Caretzeichen kann nicht ermittelt werden. + + + + Cannot navigate to the requested location + Die Navigation zum angeforderten Standort ist nicht möglich. + + + + Locating the symbol under the caret... + Das Symbol unter dem Caretzeichen wird gesucht... + + + + Navigating to symbol... + Die Navigation zum Symbol wird durchgeführt... + + + + Navigate to symbol failed: {0} + Fehler beim Navigieren zum Symbol: {0} + + + + Exceptions: + Ausnahmen: + + + + Generic parameters: + Generische Parameter: + + + + Rename '{0}' to '__' + "{0}" in "__" umbenennen + + + + Advanced + Erweitert + + + + CodeLens + CodeLens + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.Editor/xlf/FSharp.Editor.en.xlf b/vsintegration/src/FSharp.Editor/xlf/FSharp.Editor.en.xlf new file mode 100644 index 00000000000..666f3a369b5 --- /dev/null +++ b/vsintegration/src/FSharp.Editor/xlf/FSharp.Editor.en.xlf @@ -0,0 +1,162 @@ + + + + + + Add 'new' keyword + Add 'new' keyword + + + + Implement interface + Implement interface + + + + Implement interface without type annotation + Implement interface without type annotation + + + + Prefix '{0}' with underscore + Prefix '{0}' with underscore + + + + Rename '{0}' to '_' + Rename '{0}' to '_' + + + + Simplify name + Simplify name + + + + Name can be simplified. + Name can be simplified. + + + + F# Functions / Methods + F# Functions / Methods + + + + F# Mutable Variables / Reference Cells + F# Mutable Variables / Reference Cells + + + + F# Printf Format + F# Printf Format + + + + F# Properties + F# Properties + + + + F# Disposable Types + F# Disposable Types + + + + Remove unused open declarations + Remove unused open declarations + + + + Open declaration can be removed. + Open declaration can be removed. + + + + IntelliSense + IntelliSense + + + + QuickInfo + QuickInfo + + + + Add an assembly reference to '{0}' + Add an assembly reference to '{0}' + + + + Add a project reference to '{0}' + Add a project reference to '{0}' + + + + Code Fixes + Code Fixes + + + + Performance + Performance + + + + The value is unused + The value is unused + + + + Cannot determine the symbol under the caret + Cannot determine the symbol under the caret + + + + Cannot navigate to the requested location + Cannot navigate to the requested location + + + + Locating the symbol under the caret... + Locating the symbol under the caret... + + + + Navigating to symbol... + Navigating to symbol... + + + + Navigate to symbol failed: {0} + Navigate to symbol failed: {0} + + + + Exceptions: + Exceptions: + + + + Generic parameters: + Generic parameters: + + + + Rename '{0}' to '__' + Rename '{0}' to '__' + + + + Advanced + Advanced + + + + CodeLens + CodeLens + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.Editor/xlf/FSharp.Editor.es.xlf b/vsintegration/src/FSharp.Editor/xlf/FSharp.Editor.es.xlf new file mode 100644 index 00000000000..26758d30cf8 --- /dev/null +++ b/vsintegration/src/FSharp.Editor/xlf/FSharp.Editor.es.xlf @@ -0,0 +1,162 @@ + + + + + + Add 'new' keyword + Agregar "nueva" palabra clave + + + + Implement interface + Implementar interfaz + + + + Implement interface without type annotation + Implementar interfaz sin anotación de tipos + + + + Prefix '{0}' with underscore + Colocar un carácter de subrayado delante de "{0}" + + + + Rename '{0}' to '_' + Cambiar nombre de "{0}" por "_" + + + + Simplify name + Simplificar nombre + + + + Name can be simplified. + El nombre se puede simplificar. + + + + F# Functions / Methods + Funciones y métodos de F# + + + + F# Mutable Variables / Reference Cells + Variables mutables y celdas de referencia de F# + + + + F# Printf Format + Formato Printf de F# + + + + F# Properties + Propiedades de F# + + + + F# Disposable Types + Tipos descartables de F# + + + + Remove unused open declarations + Quitar declaraciones abiertas no usadas + + + + Open declaration can be removed. + Las declaraciones abiertas se pueden quitar. + + + + IntelliSense + IntelliSense + + + + QuickInfo + QuickInfo + + + + Add an assembly reference to '{0}' + Agregar una referencia de ensamblado a "{0}" + + + + Add a project reference to '{0}' + Agregar una referencia de proyecto a "{0}" + + + + Code Fixes + Correcciones de código + + + + Performance + Rendimiento + + + + The value is unused + El valor no se usa + + + + Cannot determine the symbol under the caret + No se puede determinar el símbolo bajo el símbolo de intercalación + + + + Cannot navigate to the requested location + No se puede navegar a la ubicación solicitada + + + + Locating the symbol under the caret... + Buscando el símbolo bajo el símbolo de intercalación... + + + + Navigating to symbol... + Navegando al símbolo... + + + + Navigate to symbol failed: {0} + No se pudo navegar al símbolo: {0} + + + + Exceptions: + Excepciones: + + + + Generic parameters: + Parámetros genéricos: + + + + Rename '{0}' to '__' + Cambiar nombre de "{0}" por "__" + + + + Advanced + Avanzadas + + + + CodeLens + CodeLens + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.Editor/xlf/FSharp.Editor.fr.xlf b/vsintegration/src/FSharp.Editor/xlf/FSharp.Editor.fr.xlf new file mode 100644 index 00000000000..eadd06f5dbd --- /dev/null +++ b/vsintegration/src/FSharp.Editor/xlf/FSharp.Editor.fr.xlf @@ -0,0 +1,162 @@ + + + + + + Add 'new' keyword + Ajouter le mot clé 'new' + + + + Implement interface + Implémenter l'interface + + + + Implement interface without type annotation + Implémenter l'interface sans annotation de type + + + + Prefix '{0}' with underscore + Faire précéder '{0}' d'un trait de soulignement + + + + Rename '{0}' to '_' + Renommer '{0}' en '_' + + + + Simplify name + Simplifier le nom + + + + Name can be simplified. + Le nom peut être simplifié. + + + + F# Functions / Methods + Fonctions / méthodes F# + + + + F# Mutable Variables / Reference Cells + Variables mutables / Cellules de référence F# + + + + F# Printf Format + Format Printf F# + + + + F# Properties + Propriétés F# + + + + F# Disposable Types + Types F# pouvant être supprimés + + + + Remove unused open declarations + Supprimer les déclarations open inutilisées + + + + Open declaration can be removed. + La déclaration open peut être supprimée. + + + + IntelliSense + IntelliSense + + + + QuickInfo + QuickInfo + + + + Add an assembly reference to '{0}' + Ajouter une référence d'assembly à '{0}' + + + + Add a project reference to '{0}' + Ajouter une référence de projet à '{0}' + + + + Code Fixes + Correctifs du code + + + + Performance + Performances + + + + The value is unused + La valeur est inutilisée + + + + Cannot determine the symbol under the caret + Impossible de déterminer le symbole sous le point d'insertion + + + + Cannot navigate to the requested location + Impossible de naviguer à l'emplacement demandé + + + + Locating the symbol under the caret... + Localisation du symbole sous le point d'insertion... + + + + Navigating to symbol... + Navigation vers le symbole... + + + + Navigate to symbol failed: {0} + Échec de la navigation vers le symbole : {0} + + + + Exceptions: + Exceptions : + + + + Generic parameters: + Paramètres génériques : + + + + Rename '{0}' to '__' + Renommer '{0}' en '__' + + + + Advanced + Avancé + + + + CodeLens + CodeLens + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.Editor/xlf/FSharp.Editor.it.xlf b/vsintegration/src/FSharp.Editor/xlf/FSharp.Editor.it.xlf new file mode 100644 index 00000000000..d288d6839fc --- /dev/null +++ b/vsintegration/src/FSharp.Editor/xlf/FSharp.Editor.it.xlf @@ -0,0 +1,162 @@ + + + + + + Add 'new' keyword + Aggiungi la parola chiave 'new' + + + + Implement interface + Implementa l'interfaccia + + + + Implement interface without type annotation + Implementa l'interfaccia senza annotazione di tipo + + + + Prefix '{0}' with underscore + Anteponi a '{0}' un carattere di sottolineatura + + + + Rename '{0}' to '_' + Rinomina '{0}' in '_' + + + + Simplify name + Semplifica nome + + + + Name can be simplified. + Il nome può essere semplificato. + + + + F# Functions / Methods + Funzioni/Metodi F# + + + + F# Mutable Variables / Reference Cells + Variabili modificabili/Celle di riferimento F# + + + + F# Printf Format + Formato printf F# + + + + F# Properties + Proprietà F# + + + + F# Disposable Types + Tipi eliminabili F# + + + + Remove unused open declarations + Rimuovi dichiarazioni OPEN inutilizzate + + + + Open declaration can be removed. + La dichiarazione OPEN può essere rimossa. + + + + IntelliSense + IntelliSense + + + + QuickInfo + Informazioni rapide + + + + Add an assembly reference to '{0}' + Aggiungi un riferimento all'assembly a '{0}' + + + + Add a project reference to '{0}' + Aggiungi un riferimento al progetto a '{0}' + + + + Code Fixes + Correzioni del codice + + + + Performance + Prestazioni + + + + The value is unused + Il valore è inutilizzato + + + + Cannot determine the symbol under the caret + Non è possibile determinare il simbolo sotto il cursore + + + + Cannot navigate to the requested location + Non è possibile passare alla posizione richiesta + + + + Locating the symbol under the caret... + Individuazione del simbolo sotto il cursore... + + + + Navigating to symbol... + Passaggio al simbolo... + + + + Navigate to symbol failed: {0} + Il passaggio al simbolo non è riuscito: {0} + + + + Exceptions: + Eccezioni: + + + + Generic parameters: + Parametri generici: + + + + Rename '{0}' to '__' + Rinomina '{0}' in '__' + + + + Advanced + Avanzate + + + + CodeLens + CodeLens + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.Editor/xlf/FSharp.Editor.ja.xlf b/vsintegration/src/FSharp.Editor/xlf/FSharp.Editor.ja.xlf new file mode 100644 index 00000000000..8b05b335d8f --- /dev/null +++ b/vsintegration/src/FSharp.Editor/xlf/FSharp.Editor.ja.xlf @@ -0,0 +1,162 @@ + + + + + + Add 'new' keyword + 'new' キーワードを追加する + + + + Implement interface + インターフェイスを実装する + + + + Implement interface without type annotation + 型の注釈を指定しないでインターフェイスを実装する + + + + Prefix '{0}' with underscore + アンダースコアが含まれているプレフィックス '{0}' + + + + Rename '{0}' to '_' + '{0}' から '_' に名前を変更する + + + + Simplify name + 名前を単純化する + + + + Name can be simplified. + 名前を単純化できます。 + + + + F# Functions / Methods + F# 関数 / メソッド + + + + F# Mutable Variables / Reference Cells + F# 変更可能な変数 / 参照セル + + + + F# Printf Format + F# Printf 形式 + + + + F# Properties + F# プロパティ + + + + F# Disposable Types + F# 破棄可能な型 + + + + Remove unused open declarations + 未使用の Open 宣言を削除する + + + + Open declaration can be removed. + Open 宣言は削除できます。 + + + + IntelliSense + IntelliSense + + + + QuickInfo + QuickInfo + + + + Add an assembly reference to '{0}' + アセンブリ参照を '{0}' に追加する + + + + Add a project reference to '{0}' + プロジェクト参照を '{0}' に追加する + + + + Code Fixes + コード修正 + + + + Performance + パフォーマンス + + + + The value is unused + 値は使用されていません + + + + Cannot determine the symbol under the caret + キャレットの下のシンボルを特定できません + + + + Cannot navigate to the requested location + 要求された場所に移動できません + + + + Locating the symbol under the caret... + キャレットの下のシンボルを検索しています... + + + + Navigating to symbol... + シンボルに移動しています... + + + + Navigate to symbol failed: {0} + シンボルへの移動に失敗しました: {0} + + + + Exceptions: + 例外: + + + + Generic parameters: + ジェネリック パラメーター + + + + Rename '{0}' to '__' + '{0}' から '__' に名前を変更する + + + + Advanced + 詳細 + + + + CodeLens + CodeLens + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.Editor/xlf/FSharp.Editor.ko.xlf b/vsintegration/src/FSharp.Editor/xlf/FSharp.Editor.ko.xlf new file mode 100644 index 00000000000..b017a3562e1 --- /dev/null +++ b/vsintegration/src/FSharp.Editor/xlf/FSharp.Editor.ko.xlf @@ -0,0 +1,162 @@ + + + + + + Add 'new' keyword + 'new' 키워드 추가 + + + + Implement interface + 인터페이스 구현 + + + + Implement interface without type annotation + 형식 주석 없이 인터페이스 구현 + + + + Prefix '{0}' with underscore + 밑줄이 있는 '{0}' 접두사 + + + + Rename '{0}' to '_' + '{0}'의 이름을 '_'로 바꾸기 + + + + Simplify name + 이름 단순화 + + + + Name can be simplified. + 이름을 간단하게 줄일 수 있습니다. + + + + F# Functions / Methods + F# 함수/메서드 + + + + F# Mutable Variables / Reference Cells + F# 변경할 수 있는 변수/참조 셀 + + + + F# Printf Format + F# Printf 형식 + + + + F# Properties + F# 속성 + + + + F# Disposable Types + F# 삭제 가능한 형식 + + + + Remove unused open declarations + 사용하지 않는 열려 있는 선언 제거 + + + + Open declaration can be removed. + 열려 있는 선언을 제거할 수 있습니다. + + + + IntelliSense + IntelliSense + + + + QuickInfo + QuickInfo + + + + Add an assembly reference to '{0}' + '{0}'에 어셈블리 참조 추가 + + + + Add a project reference to '{0}' + '{0}'에 프로젝트 참조 추가 + + + + Code Fixes + 코드 수정 사항 + + + + Performance + 성능 + + + + The value is unused + 값이 사용되지 않습니다. + + + + Cannot determine the symbol under the caret + 캐럿에서 기호를 확인할 수 없습니다. + + + + Cannot navigate to the requested location + 요청된 위치로 이동할 수 없습니다. + + + + Locating the symbol under the caret... + 캐럿에서 기호를 찾는 중... + + + + Navigating to symbol... + 기호로 이동 중... + + + + Navigate to symbol failed: {0} + 기호로 이동 실패: {0} + + + + Exceptions: + 예외: + + + + Generic parameters: + 제네릭 매개 변수: + + + + Rename '{0}' to '__' + '{0}'의 이름을 '__'로 바꾸기 + + + + Advanced + 고급 + + + + CodeLens + CodeLens + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.Editor/xlf/FSharp.Editor.pl.xlf b/vsintegration/src/FSharp.Editor/xlf/FSharp.Editor.pl.xlf new file mode 100644 index 00000000000..e0898181ecb --- /dev/null +++ b/vsintegration/src/FSharp.Editor/xlf/FSharp.Editor.pl.xlf @@ -0,0 +1,162 @@ + + + + + + Add 'new' keyword + Dodaj słowo kluczowe „new” + + + + Implement interface + Zaimplementuj interfejs + + + + Implement interface without type annotation + Zaimplementuj interfejs bez adnotacji typu + + + + Prefix '{0}' with underscore + Prefiks „{0}” ze znakiem podkreślenia + + + + Rename '{0}' to '_' + Zmień nazwę z „{0}” na „_” + + + + Simplify name + Uprość nazwę + + + + Name can be simplified. + Nazwę można uprościć. + + + + F# Functions / Methods + Funkcje/metody w języku F# + + + + F# Mutable Variables / Reference Cells + Zmienne modyfikowalne/komórki odwołania w języku F# + + + + F# Printf Format + Format Printf w języku F# + + + + F# Properties + Właściwości w języku F# + + + + F# Disposable Types + Typu możliwe do likwidacji w języku F# + + + + Remove unused open declarations + Usuń nieużywane otwarte deklaracje + + + + Open declaration can be removed. + Otwarte deklaracje można usuwać. + + + + IntelliSense + IntelliSense + + + + QuickInfo + QuickInfo + + + + Add an assembly reference to '{0}' + Dodaj odwołanie do zestawu do „{0}” + + + + Add a project reference to '{0}' + Dodaj odwołanie do projektu do „{0}” + + + + Code Fixes + Poprawki kodu + + + + Performance + Wydajność + + + + The value is unused + Wartość nie jest używana + + + + Cannot determine the symbol under the caret + Nie można określić symbolu pod karetką + + + + Cannot navigate to the requested location + Nie można przejść do żądanej lokalizacji + + + + Locating the symbol under the caret... + Trwa lokalizowanie symbolu pod karetką... + + + + Navigating to symbol... + Trwa przechodzenie do symbolu... + + + + Navigate to symbol failed: {0} + Przejście do symbolu nie powiodło się: {0} + + + + Exceptions: + Wyjątki: + + + + Generic parameters: + Parametry ogólne: + + + + Rename '{0}' to '__' + Zmień nazwę z „{0}” na „__” + + + + Advanced + Zaawansowane + + + + CodeLens + CodeLens + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.Editor/xlf/FSharp.Editor.pt-BR.xlf b/vsintegration/src/FSharp.Editor/xlf/FSharp.Editor.pt-BR.xlf new file mode 100644 index 00000000000..03c3c7bf667 --- /dev/null +++ b/vsintegration/src/FSharp.Editor/xlf/FSharp.Editor.pt-BR.xlf @@ -0,0 +1,162 @@ + + + + + + Add 'new' keyword + Adicionar a palavra-chave 'new' + + + + Implement interface + Implementar a interface + + + + Implement interface without type annotation + Implementar a interface sem a anotação de tipo + + + + Prefix '{0}' with underscore + Prefixo '{0}' sem sublinhado + + + + Rename '{0}' to '_' + Renomear '{0}' para '_' + + + + Simplify name + Simplificar o nome + + + + Name can be simplified. + O nome pode ser simplificado. + + + + F# Functions / Methods + Funções/Métodos do F# + + + + F# Mutable Variables / Reference Cells + Variações Mutáveis/Células de Referência do F# + + + + F# Printf Format + Formato de Impressão do F# + + + + F# Properties + Propriedades do F# + + + + F# Disposable Types + Tipos Descartáveis do F# + + + + Remove unused open declarations + Remover declarações abertas não usadas + + + + Open declaration can be removed. + A declaração aberta pode ser removida. + + + + IntelliSense + IntelliSense + + + + QuickInfo + QuickInfo + + + + Add an assembly reference to '{0}' + Adicionar uma referência de assembly para '{0}' + + + + Add a project reference to '{0}' + Adicionar uma referência de projeto para '{0}' + + + + Code Fixes + Correções de Código + + + + Performance + Desempenho + + + + The value is unused + O valor é não usado + + + + Cannot determine the symbol under the caret + Não é possível determinar o símbolo sob o acento circunflexo + + + + Cannot navigate to the requested location + Não é possível navegar para a localização solicitada + + + + Locating the symbol under the caret... + Localizando o símbolo sob o acento circunflexo... + + + + Navigating to symbol... + Navegando para o símbolo... + + + + Navigate to symbol failed: {0} + Navegação para o símbolo com falha: {0} + + + + Exceptions: + Exceções: + + + + Generic parameters: + Parâmetros genéricos: + + + + Rename '{0}' to '__' + Renomear '{0}' para '__' + + + + Advanced + Avançado + + + + CodeLens + CodeLens + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.Editor/xlf/FSharp.Editor.ru.xlf b/vsintegration/src/FSharp.Editor/xlf/FSharp.Editor.ru.xlf new file mode 100644 index 00000000000..16a1bba37ae --- /dev/null +++ b/vsintegration/src/FSharp.Editor/xlf/FSharp.Editor.ru.xlf @@ -0,0 +1,162 @@ + + + + + + Add 'new' keyword + Добавить ключевое слово "new" + + + + Implement interface + Реализовать интерфейс + + + + Implement interface without type annotation + Реализовать интерфейс без заметки с типом + + + + Prefix '{0}' with underscore + Добавить символ подчеркивания как префикс "{0}" + + + + Rename '{0}' to '_' + Переименовать "{0}" в "_" + + + + Simplify name + Упростить имя + + + + Name can be simplified. + Имя можно упростить. + + + + F# Functions / Methods + Функции и методы F# + + + + F# Mutable Variables / Reference Cells + Изменяемые переменные и ссылочные ячейки F# + + + + F# Printf Format + Формат Printf в F# + + + + F# Properties + Свойства F# + + + + F# Disposable Types + Высвобождаемые типы F# + + + + Remove unused open declarations + Удалить неиспользуемые открытые объявления + + + + Open declaration can be removed. + Открытое объявление можно удалить. + + + + IntelliSense + IntelliSense + + + + QuickInfo + QuickInfo + + + + Add an assembly reference to '{0}' + Добавить ссылку на сборку в "{0}" + + + + Add a project reference to '{0}' + Добавить ссылку на проект в "{0}" + + + + Code Fixes + Исправления кода + + + + Performance + Производительность + + + + The value is unused + Значение не используется + + + + Cannot determine the symbol under the caret + Не удается определить символ под курсором + + + + Cannot navigate to the requested location + Не удается перейти в запрошенное расположение + + + + Locating the symbol under the caret... + Определяется символ под курсором… + + + + Navigating to symbol... + Переход к символу… + + + + Navigate to symbol failed: {0} + Не удалось перейти к символу: {0} + + + + Exceptions: + Исключения: + + + + Generic parameters: + Универсальные параметры: + + + + Rename '{0}' to '__' + Переименовать "{0}" в "__" + + + + Advanced + Дополнительно + + + + CodeLens + CodeLens + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.Editor/xlf/FSharp.Editor.tr.xlf b/vsintegration/src/FSharp.Editor/xlf/FSharp.Editor.tr.xlf new file mode 100644 index 00000000000..dd4dd7d6c03 --- /dev/null +++ b/vsintegration/src/FSharp.Editor/xlf/FSharp.Editor.tr.xlf @@ -0,0 +1,162 @@ + + + + + + Add 'new' keyword + 'new' anahtar sözcüğünü ekleme + + + + Implement interface + Arabirim uygulama + + + + Implement interface without type annotation + Tür ek açıklaması olmadan arabirim uygulama + + + + Prefix '{0}' with underscore + '{0}' öğesinin önüne alt çizgi ekleme + + + + Rename '{0}' to '_' + '{0}' öğesini '_' olarak yeniden adlandırma + + + + Simplify name + Adı basitleştirme + + + + Name can be simplified. + Ad basitleştirilebilir. + + + + F# Functions / Methods + F# İşlevleri / Metotları + + + + F# Mutable Variables / Reference Cells + F# Değiştirilebilir Değişkenleri / Başvuru Hücreleri + + + + F# Printf Format + F# Printf Biçimi + + + + F# Properties + F# Özellikleri + + + + F# Disposable Types + F# Atılabilir Türleri + + + + Remove unused open declarations + Kullanılmayan açık bildirimleri kaldır + + + + Open declaration can be removed. + Açık bildirim kaldırılabilir. + + + + IntelliSense + IntelliSense + + + + QuickInfo + QuickInfo + + + + Add an assembly reference to '{0}' + '{0}' öğesine bir bütünleştirilmiş kod başvurusu ekleme + + + + Add a project reference to '{0}' + '{0}' öğesine bir proje başvurusu ekleme + + + + Code Fixes + Kod Düzeltmeleri + + + + Performance + Performans + + + + The value is unused + Değer kullanılmıyor + + + + Cannot determine the symbol under the caret + İmlecin altındaki simge belirlenemiyor + + + + Cannot navigate to the requested location + İstenen konuma gidilemiyor + + + + Locating the symbol under the caret... + İmlecin altındaki simge bulunuyor... + + + + Navigating to symbol... + Simgeye gidiliyor... + + + + Navigate to symbol failed: {0} + Simgeye gidilemedi: {0} + + + + Exceptions: + Özel Durumlar: + + + + Generic parameters: + Genel parametreler: + + + + Rename '{0}' to '__' + '{0}' öğesini '__' olarak yeniden adlandırma + + + + Advanced + Gelişmiş + + + + CodeLens + CodeLens + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.Editor/xlf/FSharp.Editor.zh-Hans.xlf b/vsintegration/src/FSharp.Editor/xlf/FSharp.Editor.zh-Hans.xlf new file mode 100644 index 00000000000..1c301f002c1 --- /dev/null +++ b/vsintegration/src/FSharp.Editor/xlf/FSharp.Editor.zh-Hans.xlf @@ -0,0 +1,162 @@ + + + + + + Add 'new' keyword + 添加“新”关键字 + + + + Implement interface + 实现接口 + + + + Implement interface without type annotation + 无类型批注的实现接口 + + + + Prefix '{0}' with underscore + 带下划线的前缀“{0}” + + + + Rename '{0}' to '_' + 将“{0}”重命名为“_” + + + + Simplify name + 简化名称 + + + + Name can be simplified. + 可简化名称。 + + + + F# Functions / Methods + F# 函数/方法 + + + + F# Mutable Variables / Reference Cells + F# 可变变量/引用单元格 + + + + F# Printf Format + F# Printf 格式 + + + + F# Properties + F# 属性 + + + + F# Disposable Types + F# 可释放类型 + + + + Remove unused open declarations + 删除未使用的 open 声明 + + + + Open declaration can be removed. + 可删除 open 声明。 + + + + IntelliSense + Intellisense + + + + QuickInfo + QuickInfo + + + + Add an assembly reference to '{0}' + 添加对“{0}”的程序集引用 + + + + Add a project reference to '{0}' + 添加对“{0}”的项目引用 + + + + Code Fixes + 代码修补程序 + + + + Performance + 性能 + + + + The value is unused + 未使用该值 + + + + Cannot determine the symbol under the caret + 无法确定插入点下的符号 + + + + Cannot navigate to the requested location + 无法转到到所需位置 + + + + Locating the symbol under the caret... + 正在确定插入点下的符号… + + + + Navigating to symbol... + 正在转到符号... + + + + Navigate to symbol failed: {0} + 未能转到符号: {0} + + + + Exceptions: + 异常: + + + + Generic parameters: + 泛型参数: + + + + Rename '{0}' to '__' + 将“{0}”重命名为“__” + + + + Advanced + 高级 + + + + CodeLens + CodeLens + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.Editor/xlf/FSharp.Editor.zh-Hant.xlf b/vsintegration/src/FSharp.Editor/xlf/FSharp.Editor.zh-Hant.xlf new file mode 100644 index 00000000000..bcbd222af0d --- /dev/null +++ b/vsintegration/src/FSharp.Editor/xlf/FSharp.Editor.zh-Hant.xlf @@ -0,0 +1,162 @@ + + + + + + Add 'new' keyword + 新增 'new' 關鍵字 + + + + Implement interface + 實作介面 + + + + Implement interface without type annotation + 實作沒有類型註釋的介面 + + + + Prefix '{0}' with underscore + 有底線的前置詞 '{0}' + + + + Rename '{0}' to '_' + 將 '{0}' 重新命名為 '_' + + + + Simplify name + 簡化名稱 + + + + Name can be simplified. + 可以簡化名稱。 + + + + F# Functions / Methods + F# 函式 / 方法 + + + + F# Mutable Variables / Reference Cells + F# 可變動變數 / 參考儲存格 + + + + F# Printf Format + F# Printf 格式 + + + + F# Properties + F# 屬性 + + + + F# Disposable Types + F# 可處置的類型 + + + + Remove unused open declarations + 移除未使用的公開宣告 + + + + Open declaration can be removed. + 可以移除公開宣告。 + + + + IntelliSense + IntelliSense + + + + QuickInfo + QuickInfo + + + + Add an assembly reference to '{0}' + 新增組件參考至 '{0}' + + + + Add a project reference to '{0}' + 新增專案參考至 '{0}' + + + + Code Fixes + 程式碼修正 + + + + Performance + 效能 + + + + The value is unused + 未使用該值 + + + + Cannot determine the symbol under the caret + 無法決定插入點下的符號 + + + + Cannot navigate to the requested location + 無法瀏覽至要求的位置 + + + + Locating the symbol under the caret... + 正在尋找插入點下的符號... + + + + Navigating to symbol... + 正在瀏覽至符號... + + + + Navigate to symbol failed: {0} + 瀏覽至符號失敗: {0} + + + + Exceptions: + 例外狀況: + + + + Generic parameters: + 泛型參數: + + + + Rename '{0}' to '__' + 將 '{0}' 重新命名為 '__' + + + + Advanced + 進階 + + + + CodeLens + CodeLens + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.LanguageService.Base/DocumentTask.cs b/vsintegration/src/FSharp.LanguageService.Base/DocumentTask.cs index 058562cf0f0..d6664bb6a5f 100644 --- a/vsintegration/src/FSharp.LanguageService.Base/DocumentTask.cs +++ b/vsintegration/src/FSharp.LanguageService.Base/DocumentTask.cs @@ -21,7 +21,8 @@ using VsShell = Microsoft.VisualStudio.Shell.VsShellUtilities; using System.Diagnostics.CodeAnalysis; -namespace Microsoft.VisualStudio.FSharp.LanguageService { +namespace Microsoft.VisualStudio.FSharp.LanguageService +{ internal static class UIThread { static SynchronizationContext ctxt; static bool isUnitTestingMode = false; diff --git a/vsintegration/src/FSharp.LanguageService.Base/FSharp.LanguageService.Base.csproj b/vsintegration/src/FSharp.LanguageService.Base/FSharp.LanguageService.Base.csproj index 9ac64755ac8..4cdef16b685 100644 --- a/vsintegration/src/FSharp.LanguageService.Base/FSharp.LanguageService.Base.csproj +++ b/vsintegration/src/FSharp.LanguageService.Base/FSharp.LanguageService.Base.csproj @@ -1,244 +1,27 @@  - + + - $(MSBuildProjectDirectory)\..\..\..\src - CSharp - 15.4.1.0 - cs - - - Debug - net40 - $(FSharpSourcesRoot)\..\$(Configuration)\$(TargetDotnetProfile)\bin - AnyCPU - {1C5C163C-37EA-4A3C-8CCC-0D34B74BF8EF} Library - Properties - FSharp.LanguageService.Base - FSharp.LanguageService.Base - LIBRARY - true - $(NoWarn);3001,3002,3003 - $(DefineConstants);UITHREAD_FOR_LANGUAGESERVICE - v4.6 - - - true - true + false + true false - false - true - true - true + $(NoWarn);1570;1574;1587;1591;3001,3002,3003 + true + true + false + - - $(FSharpSourcesRoot)\..\loc\lcl\{Lang}\$(AssemblyName).dll.lcl - $(FSharpSourcesRoot)\..\loc\lci\$(AssemblyName).dll.lci - false - false - - - - - - {991dcf75-c2eb-42b6-9a0d-aa1d2409d519} - FSharp.VS.FSI - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualFSharp.Msbuild.15.0.1.0.1\lib\net45\Microsoft.Build.Framework.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.MSXML.8.0.0-alpha\lib\net46\microsoft.msxml.dll - - - - - - - - - - - $(FSharpSourcesRoot)\..\packages\EnvDTE.8.0.1\lib\net10\EnvDTE.dll - True - - - $(FSharpSourcesRoot)\..\packages\EnvDTE80.8.0.1\lib\net10\EnvDTE80.dll - True - - - $(FSharpSourcesRoot)\..\packages\VSSDK.VSLangProj.7.0.4\lib\net20\VSLangProj.dll - True - - - $(FSharpSourcesRoot)\..\packages\VSSDK.VSLangProj.8.8.0.4\lib\net20\VSLangProj80.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.OLE.Interop.7.10.6070\lib\Microsoft.VisualStudio.OLE.Interop.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Immutable.10.0.10.0.30319\lib\net40\Microsoft.VisualStudio.Shell.Immutable.10.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Immutable.11.0.11.0.50727\lib\net45\Microsoft.VisualStudio.Shell.Immutable.11.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.7.10.6071\lib\Microsoft.VisualStudio.Shell.Interop.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.8.0.8.0.50727\lib\Microsoft.VisualStudio.Shell.Interop.8.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.9.0.9.0.30729\lib\Microsoft.VisualStudio.Shell.Interop.9.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.10.0.10.0.30319\lib\Microsoft.VisualStudio.Shell.Interop.10.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.11.0.11.0.61030\lib\Microsoft.VisualStudio.Shell.Interop.11.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.ProjectAggregator.8.0.50727\lib\net45\Microsoft.VisualStudio.ProjectAggregator.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.TextManager.Interop.7.10.6070\lib\Microsoft.VisualStudio.TextManager.Interop.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.TextManager.Interop.8.0.8.0.50727\lib\Microsoft.VisualStudio.TextManager.Interop.8.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Designer.Interfaces.1.1.4322\lib\microsoft.visualstudio.designer.interfaces.dll - - - $(FSharpSourcesRoot)\..\packages\VSSDK.VSHelp.7.0.4\lib\net20\Microsoft.VisualStudio.VSHelp.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Threading.$(MicrosoftVisualStudioThreadingVersion)\lib\net45\Microsoft.VisualStudio.Threading.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.$(RoslynVSBinariesVersion).$(RoslynVSPackagesVersion)\lib\Microsoft.VisualStudio.Shell.$(RoslynVSBinariesVersion).dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Framework.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Shell.Framework.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Editor.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Editor.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Text.UI.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Text.UI.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Text.UI.Wpf.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Text.UI.Wpf.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Text.Data.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Text.Data.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Text.Logic.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Text.Logic.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.CoreUtility.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.CoreUtility.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Utilities.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Utilities.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Design.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Shell.Design.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.$(RoslynVSBinariesVersion).$(RoslynVSPackagesVersion)\lib\Microsoft.VisualStudio.Shell.$(RoslynVSBinariesVersion).dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Package.LanguageService.$(RoslynVSBinariesVersion).$(RoslynVSPackagesVersion)\lib\Microsoft.VisualStudio.Package.LanguageService.$(RoslynVSBinariesVersion).dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Language.StandardClassification.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Language.StandardClassification.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.ComponentModelHost.15.0.26201-alpha\lib\net46\Microsoft.VisualStudio.ComponentModelHost.dll - - - $(FSharpSourcesRoot)\..\packages\System.Collections.Immutable.$(SystemCollectionsImmutableVersion)\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll - True - - - {DED3BBD7-53F4-428A-8C9F-27968E768605} - FSharp.Core - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - True - True - Microsoft.VisualStudio.Package.LanguageService.resx - Code - - - - - - - - - + + + + + + + ResXCodeGenerator @@ -250,17 +33,35 @@ Resources.completionset.bmp - - - - - - - - - Microsoft - StrongName - - - - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vsintegration/src/FSharp.LanguageService.Base/InternalsVisibleTo.cs b/vsintegration/src/FSharp.LanguageService.Base/InternalsVisibleTo.cs deleted file mode 100644 index 3ad48dae990..00000000000 --- a/vsintegration/src/FSharp.LanguageService.Base/InternalsVisibleTo.cs +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; - -[assembly: InternalsVisibleTo("VisualFSharp.Salsa, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")] -[assembly: InternalsVisibleTo("VisualFSharp.Unittests, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")] -[assembly: InternalsVisibleTo("FSharp.LanguageService, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")] -[assembly: InternalsVisibleTo("FSharp.ProjectSystem.Base, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")] -[assembly: InternalsVisibleTo("FSharp.ProjectSystem.FSharp, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")] -[assembly: InternalsVisibleTo("FSharp.Editor, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")] - diff --git a/vsintegration/src/FSharp.LanguageService.Base/LanguageService.cs b/vsintegration/src/FSharp.LanguageService.Base/LanguageService.cs index 18a00ea5f32..257f638cb45 100644 --- a/vsintegration/src/FSharp.LanguageService.Base/LanguageService.cs +++ b/vsintegration/src/FSharp.LanguageService.Base/LanguageService.cs @@ -685,8 +685,8 @@ internal BackgroundRequest_DEPRECATED CreateBackgroundRequest(FSharpSourceBase_D // Implemented in FSharpLanguageService.fs internal abstract BackgroundRequest_DEPRECATED CreateBackgroundRequest(int line, int col, TokenInfo info, string sourceText, ITextSnapshot snapshot, MethodTipMiscellany_DEPRECATED methodTipMiscellany, string fname, BackgroundRequestReason reason, IVsTextView view,AuthoringSink sink, ISource source, int timestamp, bool synchronous); - // Implemented in FSharpLanguageService.fs - internal abstract void OnParseFileOrCheckFileComplete(BackgroundRequest_DEPRECATED req); + // Implemented in FSharpLanguageService.fs + internal abstract void OnParseFileOrCheckFileComplete(BackgroundRequest_DEPRECATED req); internal void EnsureBackgroundThreadStarted() { diff --git a/vsintegration/src/FSharp.LanguageService.Base/PatternMatcher/IObjectWritable.cs b/vsintegration/src/FSharp.LanguageService.Base/PatternMatcher/IObjectWritable.cs deleted file mode 100644 index 60d726562a4..00000000000 --- a/vsintegration/src/FSharp.LanguageService.Base/PatternMatcher/IObjectWritable.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace Microsoft.CodeAnalysis -{ - /// - /// Objects that implement this interface know how to write their contents to an , - /// so they can be reconstructed later by an . - /// - internal interface IObjectWritable - { - void WriteTo(ObjectWriter writer); - } -} diff --git a/vsintegration/src/FSharp.LanguageService.Base/Properties/AssemblyInfo.cs b/vsintegration/src/FSharp.LanguageService.Base/Properties/AssemblyInfo.cs index c6088175c97..4cfaf6553c3 100644 --- a/vsintegration/src/FSharp.LanguageService.Base/Properties/AssemblyInfo.cs +++ b/vsintegration/src/FSharp.LanguageService.Base/Properties/AssemblyInfo.cs @@ -6,18 +6,6 @@ using System.Runtime.InteropServices; using Microsoft.VisualStudio.Shell; -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("FSharp.LanguageService.Base")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft.VisualFSharpTools")] -[assembly: AssemblyProduct("FSharp.LanguageService.Base")] -[assembly: AssemblyCopyright("Copyright (c) Microsoft Corporation.")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. diff --git a/vsintegration/src/FSharp.LanguageService.Base/Source.cs b/vsintegration/src/FSharp.LanguageService.Base/Source.cs index 79f558a3e73..0d230262392 100644 --- a/vsintegration/src/FSharp.LanguageService.Base/Source.cs +++ b/vsintegration/src/FSharp.LanguageService.Base/Source.cs @@ -307,7 +307,7 @@ public virtual void Dispose() // We can't throw or exit here because we need to call Dispose on the // other members that need to be disposed. this.hiddenTextSession.UnadviseClient(); - // This is causing a debug assert in vs\env\msenv\textmgr\vrlist.cpp + // This is causing a debug assert in service\env\msenv\textmgr\vrlist.cpp // at line 1997 in CVisibleRegionList::Terminate //this.hiddenTextSession.Terminate(); this.hiddenTextSession = null; diff --git a/vsintegration/src/FSharp.LanguageService.Base/xlf/Microsoft.VisualStudio.Package.LanguageService.cs.xlf b/vsintegration/src/FSharp.LanguageService.Base/xlf/Microsoft.VisualStudio.Package.LanguageService.cs.xlf new file mode 100644 index 00000000000..5fa17a956f2 --- /dev/null +++ b/vsintegration/src/FSharp.LanguageService.Base/xlf/Microsoft.VisualStudio.Package.LanguageService.cs.xlf @@ -0,0 +1,82 @@ + + + + + + Matches: {0} + Počet shod: {0} + This is shown in status bar when ctrl-] brace matching is done. + + + The buffer has changed since the EditArray was created, so edits cannot be applied. + Vyrovnávací paměť se od vytvoření objektu EditArray změnila, takže nejde aplikovat změny. + InvalidOperationException + + + Members + Členové + Tooltip for the drop down combo at top of document window showing list of known members. + + + Types + Typy + Tooltip for the drop down combo at top of document window showing list of known types. + + + Comment Selection + Výběr komentáře + IVsCompoundAction::OpenCompoundAction description + + + Existing edit number {0} intersects 'editSpan' argument. + Existující číslo úpravy {0} protíná argument editSpan. + ArgumentException. + + + Format Span + Formátování rozsahu + IVsCompoundAction::OpenCompoundAction description. + + + The maximum number of errors or warnings has been reached. + Dosáhlo se maximálního počtu chyb nebo upozornění. + Shown in Error List window + + + There is no active expansion session. + Neexistuje žádná aktivní relace rozšíření. + InvalidOperationException + + + {0}... + {0}... + Adds an ellipsis for text that is truncated before displaying to the user. + + + Uncomment Selection + Odkomentovat výběr + IVsCompoundAction::OpenCompoundAction description + + + The file cannot be opened with the selected editor. Please choose another editor. + Soubor se nedá otevřít v tomto editoru. Zvolte jiný editor. + Message returned when Open With... is used, and editor does not support the specified file type. + + + PrepareTemplate has not been called. + Metoda PrepareTemplate se nevolala. + InvalidOperationException + + + IVsTextLines buffer does not match the expected buffer + Vyrovnávací paměť IVsTextLines se neshoduje s očekávanou vyrovnávací pamětí. + ArgumentException + + + Unrecognized filter format: {0} + Nedá se rozpoznat formát filtru: {0}. + ArgumentException + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.LanguageService.Base/xlf/Microsoft.VisualStudio.Package.LanguageService.de.xlf b/vsintegration/src/FSharp.LanguageService.Base/xlf/Microsoft.VisualStudio.Package.LanguageService.de.xlf new file mode 100644 index 00000000000..6c5d961e316 --- /dev/null +++ b/vsintegration/src/FSharp.LanguageService.Base/xlf/Microsoft.VisualStudio.Package.LanguageService.de.xlf @@ -0,0 +1,82 @@ + + + + + + Matches: {0} + Übereinstimmungen: {0} + This is shown in status bar when ctrl-] brace matching is done. + + + The buffer has changed since the EditArray was created, so edits cannot be applied. + Der Puffer wurde seit dem Erstellen von EditArray geändert, daher können Bearbeitungen nicht übernommen werden. + InvalidOperationException + + + Members + Member + Tooltip for the drop down combo at top of document window showing list of known members. + + + Types + Typen + Tooltip for the drop down combo at top of document window showing list of known types. + + + Comment Selection + Kommentar für Auswahl + IVsCompoundAction::OpenCompoundAction description + + + Existing edit number {0} intersects 'editSpan' argument. + Die vorhandene Bearbeitungsnummer {0} überschneidet sich mit dem editSpan-Argument. + ArgumentException. + + + Format Span + Abschnitt formatieren + IVsCompoundAction::OpenCompoundAction description. + + + The maximum number of errors or warnings has been reached. + Die maximale Anzahl von Fehlern oder Warnungen wurde erreicht. + Shown in Error List window + + + There is no active expansion session. + Es ist keine aktive Erweiterungssitzung vorhanden. + InvalidOperationException + + + {0}... + {0}... + Adds an ellipsis for text that is truncated before displaying to the user. + + + Uncomment Selection + Kommentar aus Auswahl entfernen + IVsCompoundAction::OpenCompoundAction description + + + The file cannot be opened with the selected editor. Please choose another editor. + Die Datei kann im ausgewählten Editor nicht geöffnet werden. Wählen Sie einen anderen Editor aus. + Message returned when Open With... is used, and editor does not support the specified file type. + + + PrepareTemplate has not been called. + PrepareTemplate wurde nicht aufgerufen. + InvalidOperationException + + + IVsTextLines buffer does not match the expected buffer + Der Puffer für IVsTextLines entspricht nicht dem erwarteten Puffer. + ArgumentException + + + Unrecognized filter format: {0} + Nicht erkanntes Filterformat: {0} + ArgumentException + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.LanguageService.Base/xlf/Microsoft.VisualStudio.Package.LanguageService.en.xlf b/vsintegration/src/FSharp.LanguageService.Base/xlf/Microsoft.VisualStudio.Package.LanguageService.en.xlf new file mode 100644 index 00000000000..d535b12bff1 --- /dev/null +++ b/vsintegration/src/FSharp.LanguageService.Base/xlf/Microsoft.VisualStudio.Package.LanguageService.en.xlf @@ -0,0 +1,82 @@ + + + + + + Matches: {0} + Matches: {0} + This is shown in status bar when ctrl-] brace matching is done. + + + The buffer has changed since the EditArray was created, so edits cannot be applied. + The buffer has changed since the EditArray was created, so edits cannot be applied. + InvalidOperationException + + + Members + Members + Tooltip for the drop down combo at top of document window showing list of known members. + + + Types + Types + Tooltip for the drop down combo at top of document window showing list of known types. + + + Comment Selection + Comment Selection + IVsCompoundAction::OpenCompoundAction description + + + Existing edit number {0} intersects 'editSpan' argument. + Existing edit number {0} intersects 'editSpan' argument. + ArgumentException. + + + Format Span + Format Span + IVsCompoundAction::OpenCompoundAction description. + + + The maximum number of errors or warnings has been reached. + The maximum number of errors or warnings has been reached. + Shown in Error List window + + + There is no active expansion session. + There is no active expansion session. + InvalidOperationException + + + {0}... + {0}... + Adds an ellipsis for text that is truncated before displaying to the user. + + + Uncomment Selection + Uncomment Selection + IVsCompoundAction::OpenCompoundAction description + + + The file cannot be opened with the selected editor. Please choose another editor. + The file cannot be opened with the selected editor. Please choose another editor. + Message returned when Open With... is used, and editor does not support the specified file type. + + + PrepareTemplate has not been called. + PrepareTemplate has not been called. + InvalidOperationException + + + IVsTextLines buffer does not match the expected buffer + IVsTextLines buffer does not match the expected buffer + ArgumentException + + + Unrecognized filter format: {0} + Unrecognized filter format: {0} + ArgumentException + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.LanguageService.Base/xlf/Microsoft.VisualStudio.Package.LanguageService.es.xlf b/vsintegration/src/FSharp.LanguageService.Base/xlf/Microsoft.VisualStudio.Package.LanguageService.es.xlf new file mode 100644 index 00000000000..4f51649f109 --- /dev/null +++ b/vsintegration/src/FSharp.LanguageService.Base/xlf/Microsoft.VisualStudio.Package.LanguageService.es.xlf @@ -0,0 +1,82 @@ + + + + + + Matches: {0} + Coincidencias: {0} + This is shown in status bar when ctrl-] brace matching is done. + + + The buffer has changed since the EditArray was created, so edits cannot be applied. + El búfer ha cambiado desde que se creó EditArray; no se pueden aplicar las ediciones. + InvalidOperationException + + + Members + Miembros + Tooltip for the drop down combo at top of document window showing list of known members. + + + Types + Tipos + Tooltip for the drop down combo at top of document window showing list of known types. + + + Comment Selection + Selección con comentarios + IVsCompoundAction::OpenCompoundAction description + + + Existing edit number {0} intersects 'editSpan' argument. + El número de ediciones existente ({0}) interfiere con el argumento 'editSpan'. + ArgumentException. + + + Format Span + Intervalo de formato + IVsCompoundAction::OpenCompoundAction description. + + + The maximum number of errors or warnings has been reached. + Se alcanzó el número máximo de errores o advertencias. + Shown in Error List window + + + There is no active expansion session. + No hay sesión de expansión activa. + InvalidOperationException + + + {0}... + {0}... + Adds an ellipsis for text that is truncated before displaying to the user. + + + Uncomment Selection + Selección sin comentarios + IVsCompoundAction::OpenCompoundAction description + + + The file cannot be opened with the selected editor. Please choose another editor. + No se puede abrir el archivo con el editor seleccionado. Elija otro editor. + Message returned when Open With... is used, and editor does not support the specified file type. + + + PrepareTemplate has not been called. + No se ha llamado a PrepareTemplate. + InvalidOperationException + + + IVsTextLines buffer does not match the expected buffer + El búfer de IVsTextLines no coincide con el búfer esperado. + ArgumentException + + + Unrecognized filter format: {0} + Formato de filtro no reconocido: {0} + ArgumentException + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.LanguageService.Base/xlf/Microsoft.VisualStudio.Package.LanguageService.fr.xlf b/vsintegration/src/FSharp.LanguageService.Base/xlf/Microsoft.VisualStudio.Package.LanguageService.fr.xlf new file mode 100644 index 00000000000..542a43a5b08 --- /dev/null +++ b/vsintegration/src/FSharp.LanguageService.Base/xlf/Microsoft.VisualStudio.Package.LanguageService.fr.xlf @@ -0,0 +1,82 @@ + + + + + + Matches: {0} + Correspondances : {0} + This is shown in status bar when ctrl-] brace matching is done. + + + The buffer has changed since the EditArray was created, so edits cannot be applied. + La mémoire tampon a été modifiée depuis la création de EditArray ; par conséquent, les modifications ne peuvent pas être appliquées. + InvalidOperationException + + + Members + Membres + Tooltip for the drop down combo at top of document window showing list of known members. + + + Types + Types + Tooltip for the drop down combo at top of document window showing list of known types. + + + Comment Selection + Commenter la sélection + IVsCompoundAction::OpenCompoundAction description + + + Existing edit number {0} intersects 'editSpan' argument. + Le numéro de modification existant {0} entre en intersection avec l'argument 'editSpan'. + ArgumentException. + + + Format Span + Mettre en forme l'espacement + IVsCompoundAction::OpenCompoundAction description. + + + The maximum number of errors or warnings has been reached. + Le nombre maximal d'erreurs ou d'avertissements est atteint. + Shown in Error List window + + + There is no active expansion session. + Il n'y a pas de session d'expansion active. + InvalidOperationException + + + {0}... + {0}... + Adds an ellipsis for text that is truncated before displaying to the user. + + + Uncomment Selection + Annuler le commentaire de la sélection + IVsCompoundAction::OpenCompoundAction description + + + The file cannot be opened with the selected editor. Please choose another editor. + Impossible d'ouvrir le fichier à l'aide de l'éditeur sélectionné. Choisissez un autre éditeur. + Message returned when Open With... is used, and editor does not support the specified file type. + + + PrepareTemplate has not been called. + PrepareTemplate n'a pas été appelé. + InvalidOperationException + + + IVsTextLines buffer does not match the expected buffer + La mémoire tampon de IVsTextLines ne correspond pas à la mémoire tampon attendue + ArgumentException + + + Unrecognized filter format: {0} + Format de filtre non reconnu : {0} + ArgumentException + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.LanguageService.Base/xlf/Microsoft.VisualStudio.Package.LanguageService.it.xlf b/vsintegration/src/FSharp.LanguageService.Base/xlf/Microsoft.VisualStudio.Package.LanguageService.it.xlf new file mode 100644 index 00000000000..832c7cbb24d --- /dev/null +++ b/vsintegration/src/FSharp.LanguageService.Base/xlf/Microsoft.VisualStudio.Package.LanguageService.it.xlf @@ -0,0 +1,82 @@ + + + + + + Matches: {0} + Corrispondenze: {0} + This is shown in status bar when ctrl-] brace matching is done. + + + The buffer has changed since the EditArray was created, so edits cannot be applied. + Il buffer è stato modificato in seguito alla creazione di EditArray, di conseguenza non è possibile applicare le modifiche. + InvalidOperationException + + + Members + Membri + Tooltip for the drop down combo at top of document window showing list of known members. + + + Types + Tipi + Tooltip for the drop down combo at top of document window showing list of known types. + + + Comment Selection + Commenta selezione + IVsCompoundAction::OpenCompoundAction description + + + Existing edit number {0} intersects 'editSpan' argument. + Il numero di modifiche esistente {0} interseca l'argomento 'editSpan'. + ArgumentException. + + + Format Span + Formatta span + IVsCompoundAction::OpenCompoundAction description. + + + The maximum number of errors or warnings has been reached. + È stato raggiunto il numero massimo di errori o avvisi. + Shown in Error List window + + + There is no active expansion session. + Nessuna sessione di espansione attiva. + InvalidOperationException + + + {0}... + {0}... + Adds an ellipsis for text that is truncated before displaying to the user. + + + Uncomment Selection + Rimuovi commento selezione + IVsCompoundAction::OpenCompoundAction description + + + The file cannot be opened with the selected editor. Please choose another editor. + Non è possibile aprire il file con l'editor selezionato. Scegliere un altro editor. + Message returned when Open With... is used, and editor does not support the specified file type. + + + PrepareTemplate has not been called. + PrepareTemplate non è stato chiamato. + InvalidOperationException + + + IVsTextLines buffer does not match the expected buffer + Il buffer IVsTextLines non corrisponde al buffer previsto + ArgumentException + + + Unrecognized filter format: {0} + Formato filtro non riconosciuto: {0} + ArgumentException + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.LanguageService.Base/xlf/Microsoft.VisualStudio.Package.LanguageService.ja.xlf b/vsintegration/src/FSharp.LanguageService.Base/xlf/Microsoft.VisualStudio.Package.LanguageService.ja.xlf new file mode 100644 index 00000000000..c2165bf9f9d --- /dev/null +++ b/vsintegration/src/FSharp.LanguageService.Base/xlf/Microsoft.VisualStudio.Package.LanguageService.ja.xlf @@ -0,0 +1,82 @@ + + + + + + Matches: {0} + 一致項目: {0} + This is shown in status bar when ctrl-] brace matching is done. + + + The buffer has changed since the EditArray was created, so edits cannot be applied. + EditArray が作成されて以来バッファーが変更されています。編集を適用できません。 + InvalidOperationException + + + Members + メンバー + Tooltip for the drop down combo at top of document window showing list of known members. + + + Types + + Tooltip for the drop down combo at top of document window showing list of known types. + + + Comment Selection + 選択範囲のコメント + IVsCompoundAction::OpenCompoundAction description + + + Existing edit number {0} intersects 'editSpan' argument. + 既存の編集番号 {0} は 'editSpan' 引数と共通部分があります。 + ArgumentException. + + + Format Span + スパンのフォーマット + IVsCompoundAction::OpenCompoundAction description. + + + The maximum number of errors or warnings has been reached. + エラーまたは警告の数が最大数を超えました。 + Shown in Error List window + + + There is no active expansion session. + 実行中の展開セッションはありません。 + InvalidOperationException + + + {0}... + {0}... + Adds an ellipsis for text that is truncated before displaying to the user. + + + Uncomment Selection + 選択範囲のコメントを解除 + IVsCompoundAction::OpenCompoundAction description + + + The file cannot be opened with the selected editor. Please choose another editor. + 選択されたエディターを使用してファイルを開けません。別のエディターを選択してください。 + Message returned when Open With... is used, and editor does not support the specified file type. + + + PrepareTemplate has not been called. + PrepareTemplate が呼び出されていません。 + InvalidOperationException + + + IVsTextLines buffer does not match the expected buffer + IVsTextLines バッファーが予期されたバッファーと一致しません。 + ArgumentException + + + Unrecognized filter format: {0} + 認識されないエンコード形式です: {0} + ArgumentException + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.LanguageService.Base/xlf/Microsoft.VisualStudio.Package.LanguageService.ko.xlf b/vsintegration/src/FSharp.LanguageService.Base/xlf/Microsoft.VisualStudio.Package.LanguageService.ko.xlf new file mode 100644 index 00000000000..31b6b01633e --- /dev/null +++ b/vsintegration/src/FSharp.LanguageService.Base/xlf/Microsoft.VisualStudio.Package.LanguageService.ko.xlf @@ -0,0 +1,82 @@ + + + + + + Matches: {0} + 일치 항목: {0} + This is shown in status bar when ctrl-] brace matching is done. + + + The buffer has changed since the EditArray was created, so edits cannot be applied. + EditArray를 만든 이후 버퍼가 변경되었으므로 편집 내용을 적용할 수 없습니다. + InvalidOperationException + + + Members + 멤버 + Tooltip for the drop down combo at top of document window showing list of known members. + + + Types + 형식 + Tooltip for the drop down combo at top of document window showing list of known types. + + + Comment Selection + 선택 영역을 주석으로 처리 + IVsCompoundAction::OpenCompoundAction description + + + Existing edit number {0} intersects 'editSpan' argument. + 기존 편집 번호 {0}이(가) 'editSpan' 인수와 교차합니다. + ArgumentException. + + + Format Span + 형식 범위 + IVsCompoundAction::OpenCompoundAction description. + + + The maximum number of errors or warnings has been reached. + 오류 또는 경고의 최대 개수에 도달했습니다. + Shown in Error List window + + + There is no active expansion session. + 활성 확장 세션이 없습니다. + InvalidOperationException + + + {0}... + {0}... + Adds an ellipsis for text that is truncated before displaying to the user. + + + Uncomment Selection + 선택 영역의 주석 처리 제거 + IVsCompoundAction::OpenCompoundAction description + + + The file cannot be opened with the selected editor. Please choose another editor. + 파일을 선택한 편집기로 열 수 없습니다. 다른 편집기를 선택하세요. + Message returned when Open With... is used, and editor does not support the specified file type. + + + PrepareTemplate has not been called. + PrepareTemplate이 호출되지 않았습니다. + InvalidOperationException + + + IVsTextLines buffer does not match the expected buffer + IVsTextLines 버퍼가 예상 버퍼와 일치하지 않습니다. + ArgumentException + + + Unrecognized filter format: {0} + 인식할 수 없는 필터 형식: {0} + ArgumentException + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.LanguageService.Base/xlf/Microsoft.VisualStudio.Package.LanguageService.pl.xlf b/vsintegration/src/FSharp.LanguageService.Base/xlf/Microsoft.VisualStudio.Package.LanguageService.pl.xlf new file mode 100644 index 00000000000..53bfacf4caf --- /dev/null +++ b/vsintegration/src/FSharp.LanguageService.Base/xlf/Microsoft.VisualStudio.Package.LanguageService.pl.xlf @@ -0,0 +1,82 @@ + + + + + + Matches: {0} + Dopasowania: {0} + This is shown in status bar when ctrl-] brace matching is done. + + + The buffer has changed since the EditArray was created, so edits cannot be applied. + Bufor zmienił się od czasu utworzenia elementu EditArray, więc nie można zastosować zmian. + InvalidOperationException + + + Members + Elementy członkowskie + Tooltip for the drop down combo at top of document window showing list of known members. + + + Types + Typy + Tooltip for the drop down combo at top of document window showing list of known types. + + + Comment Selection + Zakomentuj zaznaczenie + IVsCompoundAction::OpenCompoundAction description + + + Existing edit number {0} intersects 'editSpan' argument. + Istniejący numer edycji {0} przecina się z argumentem „editSpan”. + ArgumentException. + + + Format Span + Formatuj zakres + IVsCompoundAction::OpenCompoundAction description. + + + The maximum number of errors or warnings has been reached. + Osiągnięto maksymalną liczbę błędów lub ostrzeżeń. + Shown in Error List window + + + There is no active expansion session. + Nie ma aktywnej sesji rozszerzenia. + InvalidOperationException + + + {0}... + {0}... + Adds an ellipsis for text that is truncated before displaying to the user. + + + Uncomment Selection + Odkomentuj zaznaczenie + IVsCompoundAction::OpenCompoundAction description + + + The file cannot be opened with the selected editor. Please choose another editor. + Nie można otworzyć pliku za pomocą wybranego edytora. Wybierz inny edytor. + Message returned when Open With... is used, and editor does not support the specified file type. + + + PrepareTemplate has not been called. + Nie wywołano elementu PrepareTemplate. + InvalidOperationException + + + IVsTextLines buffer does not match the expected buffer + Bufor IVsTextLines nie jest zgodny z oczekiwanym buforem + ArgumentException + + + Unrecognized filter format: {0} + Nierozpoznany format filtru: {0} + ArgumentException + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.LanguageService.Base/xlf/Microsoft.VisualStudio.Package.LanguageService.pt-BR.xlf b/vsintegration/src/FSharp.LanguageService.Base/xlf/Microsoft.VisualStudio.Package.LanguageService.pt-BR.xlf new file mode 100644 index 00000000000..8916fcb57e1 --- /dev/null +++ b/vsintegration/src/FSharp.LanguageService.Base/xlf/Microsoft.VisualStudio.Package.LanguageService.pt-BR.xlf @@ -0,0 +1,82 @@ + + + + + + Matches: {0} + Correspondências: {0} + This is shown in status bar when ctrl-] brace matching is done. + + + The buffer has changed since the EditArray was created, so edits cannot be applied. + O buffer foi alterado desde a criação de EditArray, portanto, as edições não podem ser aplicadas. + InvalidOperationException + + + Members + Membros + Tooltip for the drop down combo at top of document window showing list of known members. + + + Types + Tipos + Tooltip for the drop down combo at top of document window showing list of known types. + + + Comment Selection + Comentar Seleção + IVsCompoundAction::OpenCompoundAction description + + + Existing edit number {0} intersects 'editSpan' argument. + O número de edição existente {0} intersecciona com o argumento "editSpan". + ArgumentException. + + + Format Span + Formatar Alcance + IVsCompoundAction::OpenCompoundAction description. + + + The maximum number of errors or warnings has been reached. + O número máximo de erros ou avisos foi atingido. + Shown in Error List window + + + There is no active expansion session. + Não há sessão de expansão ativa. + InvalidOperationException + + + {0}... + {0}... + Adds an ellipsis for text that is truncated before displaying to the user. + + + Uncomment Selection + Remover Comentários da Seleção + IVsCompoundAction::OpenCompoundAction description + + + The file cannot be opened with the selected editor. Please choose another editor. + O arquivo não pode ser aberto com o editor selecionado. Escolha outro editor. + Message returned when Open With... is used, and editor does not support the specified file type. + + + PrepareTemplate has not been called. + PrepareTemplate não foi chamado. + InvalidOperationException + + + IVsTextLines buffer does not match the expected buffer + O buffer IVsTextLines não corresponde ao buffer esperado + ArgumentException + + + Unrecognized filter format: {0} + Formato de filtro não reconhecido: {0} + ArgumentException + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.LanguageService.Base/xlf/Microsoft.VisualStudio.Package.LanguageService.ru.xlf b/vsintegration/src/FSharp.LanguageService.Base/xlf/Microsoft.VisualStudio.Package.LanguageService.ru.xlf new file mode 100644 index 00000000000..235eaa60242 --- /dev/null +++ b/vsintegration/src/FSharp.LanguageService.Base/xlf/Microsoft.VisualStudio.Package.LanguageService.ru.xlf @@ -0,0 +1,82 @@ + + + + + + Matches: {0} + Соответствий: {0} + This is shown in status bar when ctrl-] brace matching is done. + + + The buffer has changed since the EditArray was created, so edits cannot be applied. + Буфер изменился после создания массива EditArray, поэтому применение изменений невозможно. + InvalidOperationException + + + Members + Члены + Tooltip for the drop down combo at top of document window showing list of known members. + + + Types + Типы + Tooltip for the drop down combo at top of document window showing list of known types. + + + Comment Selection + Закомментировать выделенный фрагмент + IVsCompoundAction::OpenCompoundAction description + + + Existing edit number {0} intersects 'editSpan' argument. + Существующий номер изменения {0} перекрывает аргумент editSpan. + ArgumentException. + + + Format Span + Форматировать интервал + IVsCompoundAction::OpenCompoundAction description. + + + The maximum number of errors or warnings has been reached. + Достигнуто максимальное число ошибок и предупреждений. + Shown in Error List window + + + There is no active expansion session. + Нет активного сеанса расширения. + InvalidOperationException + + + {0}... + {0}... + Adds an ellipsis for text that is truncated before displaying to the user. + + + Uncomment Selection + Раскомментировать выделенный фрагмент + IVsCompoundAction::OpenCompoundAction description + + + The file cannot be opened with the selected editor. Please choose another editor. + Невозможно открыть файл с помощью выбранного редактора. Выберите другой редактор. + Message returned when Open With... is used, and editor does not support the specified file type. + + + PrepareTemplate has not been called. + Метод PrepareTemplate не был вызван. + InvalidOperationException + + + IVsTextLines buffer does not match the expected buffer + Буфер IVsTextLines не соответствует требуемому буферу + ArgumentException + + + Unrecognized filter format: {0} + Неопознанный формат фильтра: {0} + ArgumentException + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.LanguageService.Base/xlf/Microsoft.VisualStudio.Package.LanguageService.tr.xlf b/vsintegration/src/FSharp.LanguageService.Base/xlf/Microsoft.VisualStudio.Package.LanguageService.tr.xlf new file mode 100644 index 00000000000..4b600678ae4 --- /dev/null +++ b/vsintegration/src/FSharp.LanguageService.Base/xlf/Microsoft.VisualStudio.Package.LanguageService.tr.xlf @@ -0,0 +1,82 @@ + + + + + + Matches: {0} + Eşleşmeler: {0} + This is shown in status bar when ctrl-] brace matching is done. + + + The buffer has changed since the EditArray was created, so edits cannot be applied. + Arabellek, EditArray'in oluşturulmasından sonra değişti, bu yüzden düzenlemeler uygulanamıyor. + InvalidOperationException + + + Members + Üyeler + Tooltip for the drop down combo at top of document window showing list of known members. + + + Types + Türler + Tooltip for the drop down combo at top of document window showing list of known types. + + + Comment Selection + Seçimi Açıklama Satırı Yap + IVsCompoundAction::OpenCompoundAction description + + + Existing edit number {0} intersects 'editSpan' argument. + Varolan düzenleme numarası {0}, 'editSpan' bağımsız değişkeni ile kesişiyor. + ArgumentException. + + + Format Span + Yayılımı Biçimlendir + IVsCompoundAction::OpenCompoundAction description. + + + The maximum number of errors or warnings has been reached. + En yüksek hata veya uyarı sayısına ulaşıldı. + Shown in Error List window + + + There is no active expansion session. + Etkin genişletme oturumu yok. + InvalidOperationException + + + {0}... + {0}... + Adds an ellipsis for text that is truncated before displaying to the user. + + + Uncomment Selection + Seçimi İşletilir Koda Çevir + IVsCompoundAction::OpenCompoundAction description + + + The file cannot be opened with the selected editor. Please choose another editor. + Dosya seçilen düzenleyici ile açılamadı. Lütfen başka bir düzenleyici seçin. + Message returned when Open With... is used, and editor does not support the specified file type. + + + PrepareTemplate has not been called. + PrepareTemplate çağrılmadı. + InvalidOperationException + + + IVsTextLines buffer does not match the expected buffer + IVsTextLines arabelleği beklenen arabellekle eşleşmiyor + ArgumentException + + + Unrecognized filter format: {0} + Tanınmayan filtre biçimi: {0} + ArgumentException + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.LanguageService.Base/xlf/Microsoft.VisualStudio.Package.LanguageService.zh-Hans.xlf b/vsintegration/src/FSharp.LanguageService.Base/xlf/Microsoft.VisualStudio.Package.LanguageService.zh-Hans.xlf new file mode 100644 index 00000000000..c3422f9abf8 --- /dev/null +++ b/vsintegration/src/FSharp.LanguageService.Base/xlf/Microsoft.VisualStudio.Package.LanguageService.zh-Hans.xlf @@ -0,0 +1,82 @@ + + + + + + Matches: {0} + 匹配: {0} + This is shown in status bar when ctrl-] brace matching is done. + + + The buffer has changed since the EditArray was created, so edits cannot be applied. + 自创建 EditArray 后缓冲区已发生更改,因此无法应用所做的编辑。 + InvalidOperationException + + + Members + 成员 + Tooltip for the drop down combo at top of document window showing list of known members. + + + Types + 类型 + Tooltip for the drop down combo at top of document window showing list of known types. + + + Comment Selection + 注释选定内容 + IVsCompoundAction::OpenCompoundAction description + + + Existing edit number {0} intersects 'editSpan' argument. + 现有的编辑编号 {0} 与“editSpan”参数交叉。 + ArgumentException. + + + Format Span + 格式范围 + IVsCompoundAction::OpenCompoundAction description. + + + The maximum number of errors or warnings has been reached. + 已达到最大错误数或警告数。 + Shown in Error List window + + + There is no active expansion session. + 没有活动的扩展会话。 + InvalidOperationException + + + {0}... + {0}... + Adds an ellipsis for text that is truncated before displaying to the user. + + + Uncomment Selection + 取消注释选定内容 + IVsCompoundAction::OpenCompoundAction description + + + The file cannot be opened with the selected editor. Please choose another editor. + 无法使用所选编辑器打开该文件。请选择其他编辑器。 + Message returned when Open With... is used, and editor does not support the specified file type. + + + PrepareTemplate has not been called. + 尚未调用 PrepareTemplate。 + InvalidOperationException + + + IVsTextLines buffer does not match the expected buffer + IVsTextLines 缓冲区与所需缓冲区不匹配 + ArgumentException + + + Unrecognized filter format: {0} + 无法识别的筛选器格式: {0} + ArgumentException + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.LanguageService.Base/xlf/Microsoft.VisualStudio.Package.LanguageService.zh-Hant.xlf b/vsintegration/src/FSharp.LanguageService.Base/xlf/Microsoft.VisualStudio.Package.LanguageService.zh-Hant.xlf new file mode 100644 index 00000000000..ac809d8d5fd --- /dev/null +++ b/vsintegration/src/FSharp.LanguageService.Base/xlf/Microsoft.VisualStudio.Package.LanguageService.zh-Hant.xlf @@ -0,0 +1,82 @@ + + + + + + Matches: {0} + 相符項目: {0} + This is shown in status bar when ctrl-] brace matching is done. + + + The buffer has changed since the EditArray was created, so edits cannot be applied. + 緩衝區在建立 EditArray 之後已經變更,因此無法套用編輯。 + InvalidOperationException + + + Members + 成員 + Tooltip for the drop down combo at top of document window showing list of known members. + + + Types + 類型 + Tooltip for the drop down combo at top of document window showing list of known types. + + + Comment Selection + 註解選取範圍 + IVsCompoundAction::OpenCompoundAction description + + + Existing edit number {0} intersects 'editSpan' argument. + 現有的編輯號碼 {0} 與 'editSpan' 引數相交。 + ArgumentException. + + + Format Span + 格式延伸 + IVsCompoundAction::OpenCompoundAction description. + + + The maximum number of errors or warnings has been reached. + 已達錯誤或警告最大數目。 + Shown in Error List window + + + There is no active expansion session. + 沒有使用中的擴充工作階段。 + InvalidOperationException + + + {0}... + {0}... + Adds an ellipsis for text that is truncated before displaying to the user. + + + Uncomment Selection + 取消註解選取範圍 + IVsCompoundAction::OpenCompoundAction description + + + The file cannot be opened with the selected editor. Please choose another editor. + 無法用選取的編輯器開啟檔案。請選擇另一個編輯器。 + Message returned when Open With... is used, and editor does not support the specified file type. + + + PrepareTemplate has not been called. + 尚未呼叫 PrepareTemplate。 + InvalidOperationException + + + IVsTextLines buffer does not match the expected buffer + IVsTextLines 緩衝區與預期的緩衝區不相符 + ArgumentException + + + Unrecognized filter format: {0} + 無法辨認的篩選格式: {0} + ArgumentException + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.LanguageService/FSharp.LanguageService.fsproj b/vsintegration/src/FSharp.LanguageService/FSharp.LanguageService.fsproj index c7915acdb3f..a93173f1693 100644 --- a/vsintegration/src/FSharp.LanguageService/FSharp.LanguageService.fsproj +++ b/vsintegration/src/FSharp.LanguageService/FSharp.LanguageService.fsproj @@ -1,47 +1,21 @@  - + + - $(MSBuildProjectDirectory)\..\..\..\src - true - FSharp - v4.6 - true - true - false - false - true - true - true - true - - - Debug - AnyCPU - 2.0 - {EE85AAB7-CDA0-4C4E-BDA0-A64CCC413E3F} + net46 Library - FSharp.LanguageService - true + true + false $(NoWarn);75 - LIBRARY - false + true + true + $(SystemValueTuplePackageVersion) $(OtherFlags) --warnon:1182 --subsystemversion:6.00 + true + false - - - - - - - - - - Microsoft - StrongName - - - + @@ -51,17 +25,12 @@ - + + - - $(FSharpSourcesRoot)\..\loc\lcl\{Lang}\$(AssemblyName).dll.lcl - $(FSharpSourcesRoot)\..\loc\lci\$(AssemblyName).dll.lci - false - false - - + true Microsoft.VisualStudio.FSharp.LanguageService.Strings @@ -79,179 +48,40 @@ + + + + + + + + - - - - - - - + - - - - - + - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualFSharp.Msbuild.15.0.1.0.1\lib\net45\Microsoft.Build.Framework.dll - - - $(FSharpSourcesRoot)\..\packages\EnvDTE.8.0.1\lib\net10\EnvDTE.dll - True - - - $(FSharpSourcesRoot)\..\packages\EnvDTE80.8.0.1\lib\net10\EnvDTE80.dll - True - - - $(FSharpSourcesRoot)\..\packages\VSSDK.VSLangProj.7.0.4\lib\net20\VSLangProj.dll - True - - - $(FSharpSourcesRoot)\..\packages\VSSDK.VSLangProj.8.8.0.4\lib\net20\VSLangProj80.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.OLE.Interop.7.10.6070\lib\Microsoft.VisualStudio.OLE.Interop.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.7.10.6071\lib\Microsoft.VisualStudio.Shell.Interop.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.8.0.8.0.50727\lib\Microsoft.VisualStudio.Shell.Interop.8.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.9.0.9.0.30729\lib\Microsoft.VisualStudio.Shell.Interop.9.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.10.0.10.0.30319\lib\Microsoft.VisualStudio.Shell.Interop.10.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.11.0.11.0.61030\lib\Microsoft.VisualStudio.Shell.Interop.11.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Immutable.10.0.10.0.30319\lib\net40\Microsoft.VisualStudio.Shell.Immutable.10.0.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Immutable.11.0.11.0.50727\lib\net45\Microsoft.VisualStudio.Shell.Immutable.11.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.ProjectAggregator.8.0.50727\lib\net45\Microsoft.VisualStudio.ProjectAggregator.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.TextManager.Interop.7.10.6070\lib\Microsoft.VisualStudio.TextManager.Interop.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.TextManager.Interop.8.0.8.0.50727\lib\Microsoft.VisualStudio.TextManager.Interop.8.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Designer.Interfaces.1.1.4322\lib\microsoft.visualstudio.designer.interfaces.dll - - - $(FSharpSourcesRoot)\..\packages\VSSDK.VSHelp.7.0.4\lib\net20\Microsoft.VisualStudio.VSHelp.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Framework.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Shell.Framework.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Threading.$(MicrosoftVisualStudioThreadingVersion)\lib\net45\Microsoft.VisualStudio.Threading.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Editor.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Editor.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Text.UI.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Text.UI.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Text.UI.Wpf.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Text.UI.Wpf.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Text.Data.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Text.Data.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Text.Logic.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Text.Logic.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.CoreUtility.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.CoreUtility.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Utilities.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Utilities.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Design.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Shell.Design.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.$(RoslynVSBinariesVersion).$(RoslynVSPackagesVersion)\lib\Microsoft.VisualStudio.Shell.$(RoslynVSBinariesVersion).dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.ComponentModelHost.15.0.26201-alpha\lib\net46\Microsoft.VisualStudio.ComponentModelHost.dll - - - {DED3BBD7-53F4-428A-8C9F-27968E768605} - FSharp.Core - True - - - FSharp.VS.FSI - {991dcf75-c2eb-42b6-9a0d-aa1d2409d519} - True - - - FSharp.LanguageService.Base - {1c5c163c-37ea-4a3c-8ccc-0d34b74bf8ef} - True - - - {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3} - FSharp.Compiler.Private - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.CodeAnalysis.Common.$(RoslynVersion)\lib\netstandard1.3\Microsoft.CodeAnalysis.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.CodeAnalysis.EditorFeatures.$(RoslynVersion)\lib\net46\Microsoft.CodeAnalysis.EditorFeatures.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.CodeAnalysis.EditorFeatures.Text.$(RoslynVersion)\lib\net46\Microsoft.CodeAnalysis.EditorFeatures.Text.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.CodeAnalysis.Features.$(RoslynVersion)\lib\netstandard1.3\Microsoft.CodeAnalysis.Features.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.CodeAnalysis.Workspaces.Common.$(RoslynVersion)\lib\netstandard1.3\Microsoft.CodeAnalysis.Workspaces.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.LanguageServices.$(RoslynVersion)\lib\net46\Microsoft.VisualStudio.LanguageServices.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.Composition.1.0.30\lib\portable-net45+win8+wp8+wpa81\System.Composition.AttributedModel.dll - True - - - $(FSharpSourcesRoot)\..\packages\System.Collections.Immutable.$(SystemCollectionsImmutableVersion)\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll - True - + + + + + + + + + + + + + + + + + + + - \ No newline at end of file + + diff --git a/vsintegration/src/FSharp.LanguageService/FSharpSource.fs b/vsintegration/src/FSharp.LanguageService/FSharpSource.fs index 079f2d93934..3146f5d0ba1 100644 --- a/vsintegration/src/FSharp.LanguageService/FSharpSource.fs +++ b/vsintegration/src/FSharp.LanguageService/FSharpSource.fs @@ -358,6 +358,7 @@ type internal FSharpSource_DEPRECATED(service:LanguageService_DEPRECATED, textLi // get a sync parse of the file let co, _ = { ProjectFileName = fileName + ".dummy.fsproj" + ProjectId = None SourceFiles = [| fileName |] OtherOptions = flags ReferencedProjects = [| |] diff --git a/vsintegration/src/FSharp.LanguageService/GotoDefinition.fs b/vsintegration/src/FSharp.LanguageService/GotoDefinition.fs index b027528e689..c92721ea1c4 100644 --- a/vsintegration/src/FSharp.LanguageService/GotoDefinition.fs +++ b/vsintegration/src/FSharp.LanguageService/GotoDefinition.fs @@ -40,7 +40,7 @@ module internal GotoDefinition = let ls = textView.GetBuffer() |> Com.ThrowOnFailure1 let len = ls.GetLengthOfLine line |> Com.ThrowOnFailure1 let lineStr = ls.GetLineText(line, 0, line, len) |> Com.ThrowOnFailure1 - + // in many cases we assume gotodef should work even if we don't stand on the identifier directly // treatTokenAsIdentifier governs if we want to have raw value of token (possibly operator) or if should always be considered as identifier let rec gotoDefinition alwaysTreatTokenAsIdentifier = @@ -74,9 +74,6 @@ module internal GotoDefinition = |> GotoDefinitionResult_DEPRECATED.MakeError else match typedResults.GetDeclarationLocation (line+1, colIdent, lineStr, qualId, false) |> Async.RunSynchronously with - | FSharpFindDeclResult.DeclFound m -> - let span = TextSpan (iStartLine = m.StartLine-1, iEndLine = m.StartLine-1, iStartIndex = m.StartColumn, iEndIndex = m.StartColumn) - GotoDefinitionResult_DEPRECATED.MakeSuccess(m.FileName, span) | FSharpFindDeclResult.DeclNotFound(reason) -> if makeAnotherAttempt then gotoDefinition true else @@ -88,8 +85,13 @@ module internal GotoDefinition = | FSharpFindDeclFailureReason.ProvidedType(typeName) -> String.Format(Strings.GotoDefinitionFailed_ProvidedType(), typeName) | FSharpFindDeclFailureReason.ProvidedMember(name) -> String.Format(Strings.GotoDefinitionFailed_ProvidedMember(), name) GotoDefinitionResult_DEPRECATED.MakeError text + | FSharpFindDeclResult.DeclFound m when System.IO.File.Exists m.FileName -> + let span = TextSpan (iStartLine = m.StartLine-1, iEndLine = m.StartLine-1, iStartIndex = m.StartColumn, iEndIndex = m.StartColumn) + GotoDefinitionResult_DEPRECATED.MakeSuccess(m.FileName, span) + | FSharpFindDeclResult.DeclFound _ (* File does not exist *) -> + GotoDefinitionResult_DEPRECATED.MakeError(Strings.GotoDefinitionFailed_NotSourceCode()) | FSharpFindDeclResult.ExternalDecl _ -> - GotoDefinitionResult_DEPRECATED.MakeError(Strings.GotoDefinitionFailed_NotSourceCode()) + GotoDefinitionResult_DEPRECATED.MakeError(Strings.GotoDefinitionFailed_NotSourceCode()) else Trace.Write("LanguageService", "Goto definition: No 'TypeCheckInfo' available") Strings.GotoDefinitionFailed_NoTypecheckInfo() diff --git a/vsintegration/src/FSharp.LanguageService/LanguageServiceConstants.fs b/vsintegration/src/FSharp.LanguageService/LanguageServiceConstants.fs index b64d0405948..46bd6dd2f04 100644 --- a/vsintegration/src/FSharp.LanguageService/LanguageServiceConstants.fs +++ b/vsintegration/src/FSharp.LanguageService/LanguageServiceConstants.fs @@ -8,3 +8,7 @@ module internal LanguageServiceConstants = /// "F#" [] let FSharpLanguageName = "F#" + + [] + /// "F# Language Service" + let FSharpLanguageServiceCallbackName = "F# Language Service" \ No newline at end of file diff --git a/vsintegration/src/FSharp.LanguageService/ProjectSitesAndFiles.fs b/vsintegration/src/FSharp.LanguageService/ProjectSitesAndFiles.fs index cc6e220d661..bf82290b2ec 100644 --- a/vsintegration/src/FSharp.LanguageService/ProjectSitesAndFiles.fs +++ b/vsintegration/src/FSharp.LanguageService/ProjectSitesAndFiles.fs @@ -315,6 +315,7 @@ type internal ProjectSitesAndFiles() = let option = let newOption () = { ProjectFileName = projectSite.ProjectFileName + ProjectId = None SourceFiles = projectSite.CompilationSourceFiles OtherOptions = projectSite.CompilationOptions ReferencedProjects = referencedProjectOptions @@ -385,8 +386,9 @@ type internal ProjectSitesAndFiles() = member art.GetDefinesForFile_DEPRECATED(rdt:IVsRunningDocumentTable, filename : string, checker:FSharpChecker) = // The only caller of this function calls it each time it needs to colorize a line, so this call must execute very fast. - if SourceFile.MustBeSingleFileProject(filename) then - CompilerEnvironment.GetCompilationDefinesForEditing(filename,FSharpParsingOptions.Default) + if SourceFile.MustBeSingleFileProject(filename) then + let parsingOptions = { FSharpParsingOptions.Default with IsInteractive = true} + CompilerEnvironment.GetCompilationDefinesForEditing parsingOptions else let siteOpt = match VsRunningDocumentTable.FindDocumentWithoutLocking(rdt,filename) with @@ -399,7 +401,7 @@ type internal ProjectSitesAndFiles() = | None -> ProjectSitesAndFiles.ProjectSiteOfSingleFile(filename) let parsingOptions,_ = checker.GetParsingOptionsFromCommandLineArgs(site.CompilationOptions |> Array.toList) - CompilerEnvironment.GetCompilationDefinesForEditing(filename,parsingOptions) + CompilerEnvironment.GetCompilationDefinesForEditing parsingOptions member art.TryFindOwningProject_DEPRECATED(rdt:IVsRunningDocumentTable, filename) = if SourceFile.MustBeSingleFileProject(filename) then None diff --git a/vsintegration/src/FSharp.LanguageService/xlf/FSLangSvcStrings.cs.xlf b/vsintegration/src/FSharp.LanguageService/xlf/FSLangSvcStrings.cs.xlf new file mode 100644 index 00000000000..c1fcfdca7b1 --- /dev/null +++ b/vsintegration/src/FSharp.LanguageService/xlf/FSLangSvcStrings.cs.xlf @@ -0,0 +1,52 @@ + + + + + + (The documentation cache is still being constructed. Please try again in a few seconds.) + (Mezipaměť dokumentace se ještě vytváří. Zkuste to znovu za pár sekund.) + + + + Exceptions: + Výjimky: + + + + Loading... + Načítání... + displayed when waiting for IntelliSense to load + + + Cannot navigate to definition. + Nedá se přejít na definici. + + + + Cannot navigate to definition. Cursor is not on identifier. + Nedá se navigovat na definici. Kurzor není na identifikátoru. + + + + Cannot navigate to the provided member '{0}'. + Nedá se navigovat na poskytnutého člena {0}. + + + + Cannot navigate to the provided type '{0}'. + Nedá se navigovat na poskytnutý typ {0}. + + + + Cannot navigate to definition. Type check information is not available, please try later. + Nedá se navigovat na definici. Informace o kontrole typů není dostupná. Zkuste to znovu později. + + + + Cannot navigate to definition. Source code is not available. + Nedá se navigovat na definici. Zdrojový kód není dostupný. + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.LanguageService/xlf/FSLangSvcStrings.de.xlf b/vsintegration/src/FSharp.LanguageService/xlf/FSLangSvcStrings.de.xlf new file mode 100644 index 00000000000..c97b2e2cab0 --- /dev/null +++ b/vsintegration/src/FSharp.LanguageService/xlf/FSLangSvcStrings.de.xlf @@ -0,0 +1,52 @@ + + + + + + (The documentation cache is still being constructed. Please try again in a few seconds.) + (Der Dokumentationscache wird noch erstellt. Wiederholen Sie den Vorgang in einigen Sekunden.) + + + + Exceptions: + Ausnahmen: + + + + Loading... + Wird geladen... + displayed when waiting for IntelliSense to load + + + Cannot navigate to definition. + Wechseln zur Definition ist nicht möglich. + + + + Cannot navigate to definition. Cursor is not on identifier. + Wechseln zur Definition ist nicht möglich. Der Cursor befindet sich nicht auf dem Bezeichner. + + + + Cannot navigate to the provided member '{0}'. + Wechseln zum angegebenen Member '{0}' ist nicht möglich. + + + + Cannot navigate to the provided type '{0}'. + Wechseln zum angegebenen Typ '{0}' ist nicht möglich. + + + + Cannot navigate to definition. Type check information is not available, please try later. + Wechseln zur Definition ist nicht möglich. Die Informationen zum Überprüfen des Typen sind nicht verfügbar. Versuchen Sie es später erneut. + + + + Cannot navigate to definition. Source code is not available. + Wechseln zur Definition ist nicht möglich. Der Quellcode ist nicht verfügbar. + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.LanguageService/xlf/FSLangSvcStrings.en.xlf b/vsintegration/src/FSharp.LanguageService/xlf/FSLangSvcStrings.en.xlf new file mode 100644 index 00000000000..a1637f05fa5 --- /dev/null +++ b/vsintegration/src/FSharp.LanguageService/xlf/FSLangSvcStrings.en.xlf @@ -0,0 +1,52 @@ + + + + + + (The documentation cache is still being constructed. Please try again in a few seconds.) + (The documentation cache is still being constructed. Please try again in a few seconds.) + + + + Exceptions: + Exceptions: + + + + Loading... + Loading... + displayed when waiting for IntelliSense to load + + + Cannot navigate to definition. + Cannot navigate to definition. + + + + Cannot navigate to definition. Cursor is not on identifier. + Cannot navigate to definition. Cursor is not on identifier. + + + + Cannot navigate to the provided member '{0}'. + Cannot navigate to the provided member '{0}'. + + + + Cannot navigate to the provided type '{0}'. + Cannot navigate to the provided type '{0}'. + + + + Cannot navigate to definition. Type check information is not available, please try later. + Cannot navigate to definition. Type check information is not available, please try later. + + + + Cannot navigate to definition. Source code is not available. + Cannot navigate to definition. Source code is not available. + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.LanguageService/xlf/FSLangSvcStrings.es.xlf b/vsintegration/src/FSharp.LanguageService/xlf/FSLangSvcStrings.es.xlf new file mode 100644 index 00000000000..d3d7a07a053 --- /dev/null +++ b/vsintegration/src/FSharp.LanguageService/xlf/FSLangSvcStrings.es.xlf @@ -0,0 +1,52 @@ + + + + + + (The documentation cache is still being constructed. Please try again in a few seconds.) + (La caché de documentación todavía se está construyendo. Vuelva a intentarlo en unos segundos). + + + + Exceptions: + Excepciones: + + + + Loading... + Cargando... + displayed when waiting for IntelliSense to load + + + Cannot navigate to definition. + No se puede navegar a la definición. + + + + Cannot navigate to definition. Cursor is not on identifier. + No se puede navegar a la definición. El cursor no está en el identificador. + + + + Cannot navigate to the provided member '{0}'. + No se puede navegar al miembro '{0}' proporcionado. + + + + Cannot navigate to the provided type '{0}'. + No se puede navegar al tipo '{0}' proporcionado. + + + + Cannot navigate to definition. Type check information is not available, please try later. + No se puede navegar a la definición. La información de comprobación de tipos no está disponible, inténtelo más tarde. + + + + Cannot navigate to definition. Source code is not available. + No se puede navegar a la definición. El código fuente no está disponible. + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.LanguageService/xlf/FSLangSvcStrings.fr.xlf b/vsintegration/src/FSharp.LanguageService/xlf/FSLangSvcStrings.fr.xlf new file mode 100644 index 00000000000..e3a42fd1d9b --- /dev/null +++ b/vsintegration/src/FSharp.LanguageService/xlf/FSLangSvcStrings.fr.xlf @@ -0,0 +1,52 @@ + + + + + + (The documentation cache is still being constructed. Please try again in a few seconds.) + (Le cache de la documentation est toujours en cours de construction. Recommencez dans quelques secondes.) + + + + Exceptions: + Exceptions : + + + + Loading... + Chargement en cours... + displayed when waiting for IntelliSense to load + + + Cannot navigate to definition. + Impossible d’accéder à la définition. + + + + Cannot navigate to definition. Cursor is not on identifier. + Impossible de naviguer jusqu'à la définition. Le curseur ne se trouve pas sur un identificateur. + + + + Cannot navigate to the provided member '{0}'. + Impossible de naviguer jusqu'au membre fourni '{0}'. + + + + Cannot navigate to the provided type '{0}'. + Impossible de naviguer jusqu'au type fourni '{0}'. + + + + Cannot navigate to definition. Type check information is not available, please try later. + Impossible de naviguer jusqu'à la définition. Les informations de vérification des types ne sont pas disponibles, essayez ultérieurement. + + + + Cannot navigate to definition. Source code is not available. + Impossible de naviguer jusqu'à la définition. Le code source n'est pas disponible. + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.LanguageService/xlf/FSLangSvcStrings.it.xlf b/vsintegration/src/FSharp.LanguageService/xlf/FSLangSvcStrings.it.xlf new file mode 100644 index 00000000000..abb983ddd86 --- /dev/null +++ b/vsintegration/src/FSharp.LanguageService/xlf/FSLangSvcStrings.it.xlf @@ -0,0 +1,52 @@ + + + + + + (The documentation cache is still being constructed. Please try again in a few seconds.) + (La cache della documentazione è ancora in fase di costruzione. Riprovare fra alcuni secondi.) + + + + Exceptions: + Eccezioni: + + + + Loading... + Caricamento... + displayed when waiting for IntelliSense to load + + + Cannot navigate to definition. + Non è possibile passare alla definizione. + + + + Cannot navigate to definition. Cursor is not on identifier. + Non è possibile passare alla definizione. Il cursore non è sull'identificatore. + + + + Cannot navigate to the provided member '{0}'. + Non è possibile passare al membro fornito '{0}'. + + + + Cannot navigate to the provided type '{0}'. + Non è possibile passare al tipo fornito '{0}'. + + + + Cannot navigate to definition. Type check information is not available, please try later. + Non è possibile passare alla definizione. Le informazioni di controllo tipo non sono disponibili. Riprovare più tardi. + + + + Cannot navigate to definition. Source code is not available. + Non è possibile passare alla definizione. Il codice sorgente non è disponibile. + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.LanguageService/xlf/FSLangSvcStrings.ja.xlf b/vsintegration/src/FSharp.LanguageService/xlf/FSLangSvcStrings.ja.xlf new file mode 100644 index 00000000000..3b541159f28 --- /dev/null +++ b/vsintegration/src/FSharp.LanguageService/xlf/FSLangSvcStrings.ja.xlf @@ -0,0 +1,52 @@ + + + + + + (The documentation cache is still being constructed. Please try again in a few seconds.) + (ドキュメント キャッシュの作成中です。何秒か待ってからもう 一度操作を行ってください。 + + + + Exceptions: + 例外: + + + + Loading... + 読み込んでいます... + displayed when waiting for IntelliSense to load + + + Cannot navigate to definition. + 定義に移動できません。 + + + + Cannot navigate to definition. Cursor is not on identifier. + 定義に移動できません。カーソルが識別子の上にありません。 + + + + Cannot navigate to the provided member '{0}'. + 指定されたメンバー '{0}' に移動できません。 + + + + Cannot navigate to the provided type '{0}'. + 指定された型 '{0}' に移動できません。 + + + + Cannot navigate to definition. Type check information is not available, please try later. + 定義に移動できません。型チェックの情報を使用できません。後でやり直してください。 + + + + Cannot navigate to definition. Source code is not available. + 定義に移動できません。ソース コードは利用できません。 + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.LanguageService/xlf/FSLangSvcStrings.ko.xlf b/vsintegration/src/FSharp.LanguageService/xlf/FSLangSvcStrings.ko.xlf new file mode 100644 index 00000000000..d9ebb322541 --- /dev/null +++ b/vsintegration/src/FSharp.LanguageService/xlf/FSLangSvcStrings.ko.xlf @@ -0,0 +1,52 @@ + + + + + + (The documentation cache is still being constructed. Please try again in a few seconds.) + (문서 캐시를 생성하고 있습니다. 몇 초 후에 다시 시도하세요.) + + + + Exceptions: + 예외: + + + + Loading... + 로드 중... + displayed when waiting for IntelliSense to load + + + Cannot navigate to definition. + 정의를 탐색할 수 없습니다. + + + + Cannot navigate to definition. Cursor is not on identifier. + 정의로 이동할 수 없습니다. 커서가 식별자에 없습니다. + + + + Cannot navigate to the provided member '{0}'. + 제공된 멤버 '{0}'(으)로 이동할 수 없습니다. + + + + Cannot navigate to the provided type '{0}'. + 제공된 형식 '{0}'(으)로 이동할 수 없습니다. + + + + Cannot navigate to definition. Type check information is not available, please try later. + 정의로 이동할 수 없습니다. 형식 검사 정보를 사용할 수 없습니다. 나중에 다시 시도하세요. + + + + Cannot navigate to definition. Source code is not available. + 정의로 이동할 수 없습니다. 소스 코드를 사용할 수 없습니다. + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.LanguageService/xlf/FSLangSvcStrings.pl.xlf b/vsintegration/src/FSharp.LanguageService/xlf/FSLangSvcStrings.pl.xlf new file mode 100644 index 00000000000..9f9ef85b76c --- /dev/null +++ b/vsintegration/src/FSharp.LanguageService/xlf/FSLangSvcStrings.pl.xlf @@ -0,0 +1,52 @@ + + + + + + (The documentation cache is still being constructed. Please try again in a few seconds.) + (Pamięć podręczna dokumentacji jest wciąż tworzona. Spróbuj ponownie za kilka sekund). + + + + Exceptions: + Wyjątki: + + + + Loading... + Trwa ładowanie... + displayed when waiting for IntelliSense to load + + + Cannot navigate to definition. + Nie można przejść do definicji. + + + + Cannot navigate to definition. Cursor is not on identifier. + Nie można przejść do definicji. Kursor znajduje się poza identyfikatorem. + + + + Cannot navigate to the provided member '{0}'. + Nie można przejść do podanego elementu członkowskiego „{0}”. + + + + Cannot navigate to the provided type '{0}'. + Nie można przejść do udostępnionego typu „{0}”. + + + + Cannot navigate to definition. Type check information is not available, please try later. + Nie można przejść do definicji. Informacje dotyczące sprawdzenia typu są niedostępne. Spróbuj później. + + + + Cannot navigate to definition. Source code is not available. + Nie można przejść do definicji. Kod źródłowy jest niedostępny. + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.LanguageService/xlf/FSLangSvcStrings.pt-BR.xlf b/vsintegration/src/FSharp.LanguageService/xlf/FSLangSvcStrings.pt-BR.xlf new file mode 100644 index 00000000000..7fb96cdc6a1 --- /dev/null +++ b/vsintegration/src/FSharp.LanguageService/xlf/FSLangSvcStrings.pt-BR.xlf @@ -0,0 +1,52 @@ + + + + + + (The documentation cache is still being constructed. Please try again in a few seconds.) + (O cache da documentação ainda está sendo construído. Tente novamente em alguns segundos.) + + + + Exceptions: + Exceções: + + + + Loading... + Carregando... + displayed when waiting for IntelliSense to load + + + Cannot navigate to definition. + Não é possível navegar para definição. + + + + Cannot navigate to definition. Cursor is not on identifier. + Não é possível navegar para definição. O cursor não está no identificador. + + + + Cannot navigate to the provided member '{0}'. + Não é possível navegar para o membro fornecido '{0}'. + + + + Cannot navigate to the provided type '{0}'. + Não é possível navegar para o tipo fornecido '{0}'. + + + + Cannot navigate to definition. Type check information is not available, please try later. + Não é possível navegar para definição. Informações de verificação de tipo não estão disponíveis. Tente novamente mais tarde. + + + + Cannot navigate to definition. Source code is not available. + Não é possível navegar para definição. O código-fonte não está disponível. + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.LanguageService/xlf/FSLangSvcStrings.ru.xlf b/vsintegration/src/FSharp.LanguageService/xlf/FSLangSvcStrings.ru.xlf new file mode 100644 index 00000000000..5d09ca8300f --- /dev/null +++ b/vsintegration/src/FSharp.LanguageService/xlf/FSLangSvcStrings.ru.xlf @@ -0,0 +1,52 @@ + + + + + + (The documentation cache is still being constructed. Please try again in a few seconds.) + (Кэш документации конструируется. Повторите попытку через несколько секунд.) + + + + Exceptions: + Исключения: + + + + Loading... + Идет загрузка... + displayed when waiting for IntelliSense to load + + + Cannot navigate to definition. + Не удается перейти к определению. + + + + Cannot navigate to definition. Cursor is not on identifier. + Не удается перейти к определению. Курсор не находится на идентификаторе. + + + + Cannot navigate to the provided member '{0}'. + Не удается перейти к предоставленному элементу "{0}". + + + + Cannot navigate to the provided type '{0}'. + Не удается перейти к предоставленному типу "{0}". + + + + Cannot navigate to definition. Type check information is not available, please try later. + Не удается перейти к определению. Сведения о проверке типов недоступны, повторите попытку позже. + + + + Cannot navigate to definition. Source code is not available. + Не удается перейти к определению. Исходный код недоступен. + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.LanguageService/xlf/FSLangSvcStrings.tr.xlf b/vsintegration/src/FSharp.LanguageService/xlf/FSLangSvcStrings.tr.xlf new file mode 100644 index 00000000000..73ab05a5533 --- /dev/null +++ b/vsintegration/src/FSharp.LanguageService/xlf/FSLangSvcStrings.tr.xlf @@ -0,0 +1,52 @@ + + + + + + (The documentation cache is still being constructed. Please try again in a few seconds.) + (Belgeler önbelleği hala oluşturuluyor. Lütfen birkaç saniye içinde yeniden deneyin.) + + + + Exceptions: + Özel Durumlar: + + + + Loading... + Yükleniyor... + displayed when waiting for IntelliSense to load + + + Cannot navigate to definition. + Tanıma gidilemiyor. + + + + Cannot navigate to definition. Cursor is not on identifier. + Tanıma geçilemiyor. İmleç tanımlayıcı üzerinde değil. + + + + Cannot navigate to the provided member '{0}'. + '{0}' sağlanan üyesine geçilemiyor. + + + + Cannot navigate to the provided type '{0}'. + '{0}' sağlanan türüne geçilemiyor. + + + + Cannot navigate to definition. Type check information is not available, please try later. + Tanıma geçilemiyor. Tür denetimi bilgileri kullanılamıyor, lütfen daha sonra deneyin. + + + + Cannot navigate to definition. Source code is not available. + Tanıma geçilemiyor. Kaynak kodu kullanılamıyor. + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.LanguageService/xlf/FSLangSvcStrings.zh-Hans.xlf b/vsintegration/src/FSharp.LanguageService/xlf/FSLangSvcStrings.zh-Hans.xlf new file mode 100644 index 00000000000..e33ea35ca76 --- /dev/null +++ b/vsintegration/src/FSharp.LanguageService/xlf/FSLangSvcStrings.zh-Hans.xlf @@ -0,0 +1,52 @@ + + + + + + (The documentation cache is still being constructed. Please try again in a few seconds.) + (文档缓存尚在构建中。请稍后再试。) + + + + Exceptions: + 异常: + + + + Loading... + 正在加载... + displayed when waiting for IntelliSense to load + + + Cannot navigate to definition. + 无法导航到定义。 + + + + Cannot navigate to definition. Cursor is not on identifier. + 无法导航到定义。光标不在标识符上。 + + + + Cannot navigate to the provided member '{0}'. + 无法导航到提供的成员“{0}”。 + + + + Cannot navigate to the provided type '{0}'. + 无法导航到提供的类型“{0}”。 + + + + Cannot navigate to definition. Type check information is not available, please try later. + 无法导航到定义。类型检查信息不可用,请稍后尝试。 + + + + Cannot navigate to definition. Source code is not available. + 无法导航到定义。源代码不可用。 + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.LanguageService/xlf/FSLangSvcStrings.zh-Hant.xlf b/vsintegration/src/FSharp.LanguageService/xlf/FSLangSvcStrings.zh-Hant.xlf new file mode 100644 index 00000000000..534256ae15c --- /dev/null +++ b/vsintegration/src/FSharp.LanguageService/xlf/FSLangSvcStrings.zh-Hant.xlf @@ -0,0 +1,52 @@ + + + + + + (The documentation cache is still being constructed. Please try again in a few seconds.) + (還在建構文件快取區中。請等待數秒後重試)。 + + + + Exceptions: + 例外狀況: + + + + Loading... + 正在載入... + displayed when waiting for IntelliSense to load + + + Cannot navigate to definition. + 無法巡覽至定義。 + + + + Cannot navigate to definition. Cursor is not on identifier. + 無法巡覽至定義。游標不在識別碼上。 + + + + Cannot navigate to the provided member '{0}'. + 無法巡覽至提供的成員 '{0}'。 + + + + Cannot navigate to the provided type '{0}'. + 無法巡覽至提供的類型 '{0}'。 + + + + Cannot navigate to definition. Type check information is not available, please try later. + 無法巡覽至定義。無法取得類型檢查資訊,請稍後再試。 + + + + Cannot navigate to definition. Source code is not available. + 無法巡覽至定義。無法取得原始程式碼。 + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.LanguageService/xlf/VSPackage.cs.xlf b/vsintegration/src/FSharp.LanguageService/xlf/VSPackage.cs.xlf new file mode 100644 index 00000000000..acacfc13502 --- /dev/null +++ b/vsintegration/src/FSharp.LanguageService/xlf/VSPackage.cs.xlf @@ -0,0 +1,72 @@ + + + + + + F# + F# + lock + + + Excluded Code + Vyřazený kód + + + + Preprocessor Keyword + Klíčové slovo preprocesoru + + + + Operator + Operátor + + + + F# File (*.fs) + Soubor F# (*.fs) + + + + F# Interface File (*.fsi) + Soubor rozhraní F# (*.fsi) + + + + F# Script File (*.fsx) + Soubor skriptu F# (*.fsx) + + + + F# Script File (*.fsscript) + Soubor skriptu F# (*.fsscript) + + + + Comment + Komentář + + + + Identifier + Identifikátor + + + + Keyword + Klíčové slovo + + + + Number + Počet + + + + String + Řetězec + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.LanguageService/xlf/VSPackage.de.xlf b/vsintegration/src/FSharp.LanguageService/xlf/VSPackage.de.xlf new file mode 100644 index 00000000000..ffc095348b1 --- /dev/null +++ b/vsintegration/src/FSharp.LanguageService/xlf/VSPackage.de.xlf @@ -0,0 +1,72 @@ + + + + + + F# + F# + lock + + + Excluded Code + Ausgeschlossener Code + + + + Preprocessor Keyword + Präprozessor-Schlüsselwort + + + + Operator + Operator + + + + F# File (*.fs) + F#-Datei (*.fs) + + + + F# Interface File (*.fsi) + F# Schnittstellendatei (*.fsi) + + + + F# Script File (*.fsx) + F# Skriptdatei (*.fsx) + + + + F# Script File (*.fsscript) + F#-Skriptdatei (*.fsscript) + + + + Comment + Kommentar + + + + Identifier + Bezeichner + + + + Keyword + Schlüsselwort + + + + Number + Anzahl + + + + String + Zeichenfolge + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.LanguageService/xlf/VSPackage.en.xlf b/vsintegration/src/FSharp.LanguageService/xlf/VSPackage.en.xlf new file mode 100644 index 00000000000..04cca560cc6 --- /dev/null +++ b/vsintegration/src/FSharp.LanguageService/xlf/VSPackage.en.xlf @@ -0,0 +1,72 @@ + + + + + + F# + F# + lock + + + Excluded Code + Excluded Code + + + + Preprocessor Keyword + Preprocessor Keyword + + + + Operator + Operator + + + + F# File (*.fs) + F# File (*.fs) + + + + F# Interface File (*.fsi) + F# Interface File (*.fsi) + + + + F# Script File (*.fsx) + F# Script File (*.fsx) + + + + F# Script File (*.fsscript) + F# Script File (*.fsscript) + + + + Comment + Comment + + + + Identifier + Identifier + + + + Keyword + Keyword + + + + Number + Number + + + + String + String + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.LanguageService/xlf/VSPackage.es.xlf b/vsintegration/src/FSharp.LanguageService/xlf/VSPackage.es.xlf new file mode 100644 index 00000000000..76cd632ccd8 --- /dev/null +++ b/vsintegration/src/FSharp.LanguageService/xlf/VSPackage.es.xlf @@ -0,0 +1,72 @@ + + + + + + F# + F# + lock + + + Excluded Code + Código excluido + + + + Preprocessor Keyword + Palabra clave del preprocesador + + + + Operator + Operador + + + + F# File (*.fs) + Archivo de F# (*.fs) + + + + F# Interface File (*.fsi) + Archivo de interfaz de F# (*.fsi) + + + + F# Script File (*.fsx) + Archivo de script de F# (*.fsx) + + + + F# Script File (*.fsscript) + Archivo de script de F# (*.fsscript) + + + + Comment + Comentario + + + + Identifier + Identificador + + + + Keyword + Palabra clave + + + + Number + Número + + + + String + Cadena + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.LanguageService/xlf/VSPackage.fr.xlf b/vsintegration/src/FSharp.LanguageService/xlf/VSPackage.fr.xlf new file mode 100644 index 00000000000..f27ce75afcc --- /dev/null +++ b/vsintegration/src/FSharp.LanguageService/xlf/VSPackage.fr.xlf @@ -0,0 +1,72 @@ + + + + + + F# + F# + lock + + + Excluded Code + Code exclu + + + + Preprocessor Keyword + Mot clé de préprocesseur + + + + Operator + Opérateur + + + + F# File (*.fs) + Fichier F# (*.fs) + + + + F# Interface File (*.fsi) + Fichier interface F# (*.fsi) + + + + F# Script File (*.fsx) + Fichier script F# (*.fsx) + + + + F# Script File (*.fsscript) + Fichier script F# (*.fsscript) + + + + Comment + Commentaire + + + + Identifier + Identificateur + + + + Keyword + Mot clé + + + + Number + Nombre + + + + String + Chaîne + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.LanguageService/xlf/VSPackage.it.xlf b/vsintegration/src/FSharp.LanguageService/xlf/VSPackage.it.xlf new file mode 100644 index 00000000000..a79fee23068 --- /dev/null +++ b/vsintegration/src/FSharp.LanguageService/xlf/VSPackage.it.xlf @@ -0,0 +1,72 @@ + + + + + + F# + F# + lock + + + Excluded Code + Codice escluso + + + + Preprocessor Keyword + Parola chiave preprocessore + + + + Operator + Operatore + + + + F# File (*.fs) + File F# (*.fs) + + + + F# Interface File (*.fsi) + File di interfaccia F# (*.fsi) + + + + F# Script File (*.fsx) + File di script F# (*.fsx) + + + + F# Script File (*.fsscript) + File di script F# (*.fsscript) + + + + Comment + Commento + + + + Identifier + Identificatore + + + + Keyword + Parola chiave + + + + Number + Numero + + + + String + Stringa + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.LanguageService/xlf/VSPackage.ja.xlf b/vsintegration/src/FSharp.LanguageService/xlf/VSPackage.ja.xlf new file mode 100644 index 00000000000..1aac0ef5160 --- /dev/null +++ b/vsintegration/src/FSharp.LanguageService/xlf/VSPackage.ja.xlf @@ -0,0 +1,72 @@ + + + + + + F# + F# + lock + + + Excluded Code + 除外されたコード + + + + Preprocessor Keyword + プリプロセッサ キーワード + + + + Operator + 演算子 + + + + F# File (*.fs) + F# ファイル (*.fs) + + + + F# Interface File (*.fsi) + F# インターフェイス ファイル (*.fsi) + + + + F# Script File (*.fsx) + F# スクリプト ファイル (*.fsx) + + + + F# Script File (*.fsscript) + F# スクリプト ファイル (*.fsscript) + + + + Comment + コメント + + + + Identifier + 識別子 + + + + Keyword + キーワード + + + + Number + 数値 + + + + String + 文字列 + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.LanguageService/xlf/VSPackage.ko.xlf b/vsintegration/src/FSharp.LanguageService/xlf/VSPackage.ko.xlf new file mode 100644 index 00000000000..df123fca81b --- /dev/null +++ b/vsintegration/src/FSharp.LanguageService/xlf/VSPackage.ko.xlf @@ -0,0 +1,72 @@ + + + + + + F# + F# + lock + + + Excluded Code + 제외 코드 + + + + Preprocessor Keyword + 전처리기 키워드 + + + + Operator + 연산자 + + + + F# File (*.fs) + F# 파일(*.fs) + + + + F# Interface File (*.fsi) + F# 인터페이스 파일(*.fsi) + + + + F# Script File (*.fsx) + F# 스크립트 파일(*.fsx) + + + + F# Script File (*.fsscript) + F# 스크립트 파일(*.fsscript) + + + + Comment + 설명 + + + + Identifier + 식별자 + + + + Keyword + 키워드 + + + + Number + 숫자 + + + + String + 문자열 + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.LanguageService/xlf/VSPackage.pl.xlf b/vsintegration/src/FSharp.LanguageService/xlf/VSPackage.pl.xlf new file mode 100644 index 00000000000..bfc6fb43a8e --- /dev/null +++ b/vsintegration/src/FSharp.LanguageService/xlf/VSPackage.pl.xlf @@ -0,0 +1,72 @@ + + + + + + F# + F# + lock + + + Excluded Code + Wykluczony kod + + + + Preprocessor Keyword + Słowo kluczowe preprocesora + + + + Operator + Operator + + + + F# File (*.fs) + Plik języka F# (*.fs) + + + + F# Interface File (*.fsi) + Plik interfejsu języka F# (*.fsi) + + + + F# Script File (*.fsx) + Plik skryptu języka F# (*.fsx) + + + + F# Script File (*.fsscript) + Plik skryptu języka F# (*.fsscript) + + + + Comment + Komentarz + + + + Identifier + Identyfikator + + + + Keyword + Słowo kluczowe + + + + Number + Liczba + + + + String + Ciąg + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.LanguageService/xlf/VSPackage.pt-BR.xlf b/vsintegration/src/FSharp.LanguageService/xlf/VSPackage.pt-BR.xlf new file mode 100644 index 00000000000..502d5956dac --- /dev/null +++ b/vsintegration/src/FSharp.LanguageService/xlf/VSPackage.pt-BR.xlf @@ -0,0 +1,72 @@ + + + + + + F# + F# + lock + + + Excluded Code + Código Excluído + + + + Preprocessor Keyword + Palavra chave do Pré-processador + + + + Operator + Operador + + + + F# File (*.fs) + Arquivo F# (*.fs) + + + + F# Interface File (*.fsi) + Arquivo de interface F# (*.fsi) + + + + F# Script File (*.fsx) + Arquivo de script F# (*.fsx) + + + + F# Script File (*.fsscript) + Arquivo de script F# (*.fsscript) + + + + Comment + Comentário + + + + Identifier + Identificador + + + + Keyword + Palavra-chave + + + + Number + Número + + + + String + Cadeia de Caracteres + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.LanguageService/xlf/VSPackage.ru.xlf b/vsintegration/src/FSharp.LanguageService/xlf/VSPackage.ru.xlf new file mode 100644 index 00000000000..9078f979baa --- /dev/null +++ b/vsintegration/src/FSharp.LanguageService/xlf/VSPackage.ru.xlf @@ -0,0 +1,72 @@ + + + + + + F# + F# + lock + + + Excluded Code + Исключенный код + + + + Preprocessor Keyword + Ключевое слово препроцессора + + + + Operator + Оператор + + + + F# File (*.fs) + Файл F# (*.fs) + + + + F# Interface File (*.fsi) + Файл интерфейса F# (*.fsi) + + + + F# Script File (*.fsx) + Файл скрипта F# (*.fsx) + + + + F# Script File (*.fsscript) + Файл скрипта F# (*.fsscript) + + + + Comment + Комментарий + + + + Identifier + Идентификатор + + + + Keyword + Ключевое слово + + + + Number + Число + + + + String + Строка + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.LanguageService/xlf/VSPackage.tr.xlf b/vsintegration/src/FSharp.LanguageService/xlf/VSPackage.tr.xlf new file mode 100644 index 00000000000..f5f7b1334b4 --- /dev/null +++ b/vsintegration/src/FSharp.LanguageService/xlf/VSPackage.tr.xlf @@ -0,0 +1,72 @@ + + + + + + F# + F# + lock + + + Excluded Code + Dışarıda Tutulmuş Kod + + + + Preprocessor Keyword + Ön İşlemci Anahtar Sözcüğü + + + + Operator + İşleç + + + + F# File (*.fs) + F# Dosyası (*.fs) + + + + F# Interface File (*.fsi) + F# Arabirim Dosyası (*.fsi) + + + + F# Script File (*.fsx) + F# Betik Dosyası (*.fsx) + + + + F# Script File (*.fsscript) + F# Betik Dosyası (*.fsscript) + + + + Comment + Açıklama + + + + Identifier + Tanımlayıcı + + + + Keyword + Anahtar Sözcük + + + + Number + Sayı + + + + String + Dize + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.LanguageService/xlf/VSPackage.zh-Hans.xlf b/vsintegration/src/FSharp.LanguageService/xlf/VSPackage.zh-Hans.xlf new file mode 100644 index 00000000000..ffccb77de00 --- /dev/null +++ b/vsintegration/src/FSharp.LanguageService/xlf/VSPackage.zh-Hans.xlf @@ -0,0 +1,72 @@ + + + + + + F# + F# + lock + + + Excluded Code + 排除的代码 + + + + Preprocessor Keyword + 预处理器关键字 + + + + Operator + 运算符 + + + + F# File (*.fs) + F# 文件(*.fs) + + + + F# Interface File (*.fsi) + F# 接口文件(*.fsi) + + + + F# Script File (*.fsx) + F# 脚本文件(*.fsx) + + + + F# Script File (*.fsscript) + F# 脚本文件(*.fsscript) + + + + Comment + 注释 + + + + Identifier + 标识符 + + + + Keyword + 关键字 + + + + Number + 编号 + + + + String + 字符串 + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.LanguageService/xlf/VSPackage.zh-Hant.xlf b/vsintegration/src/FSharp.LanguageService/xlf/VSPackage.zh-Hant.xlf new file mode 100644 index 00000000000..99888a55edb --- /dev/null +++ b/vsintegration/src/FSharp.LanguageService/xlf/VSPackage.zh-Hant.xlf @@ -0,0 +1,72 @@ + + + + + + F# + F# + lock + + + Excluded Code + 排除程式碼 + + + + Preprocessor Keyword + 前置處理器關鍵字 + + + + Operator + 運算子 + + + + F# File (*.fs) + F# 檔案 (*.fs) + + + + F# Interface File (*.fsi) + F# 介面檔案 (*.fsi) + + + + F# Script File (*.fsx) + F# 指令碼檔案 (*.fsx) + + + + F# Script File (*.fsscript) + F# 指令碼檔案 (*.fsscript) + + + + Comment + 註解 + + + + Identifier + 識別碼 + + + + Keyword + 關鍵字 + + + + Number + 數字 + + + + String + 字串 + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.LanguageService.Base/PatternMatcher/ArrayBuilder.Enumerator.cs b/vsintegration/src/FSharp.PatternMatcher/ArrayBuilder.Enumerator.cs similarity index 100% rename from vsintegration/src/FSharp.LanguageService.Base/PatternMatcher/ArrayBuilder.Enumerator.cs rename to vsintegration/src/FSharp.PatternMatcher/ArrayBuilder.Enumerator.cs diff --git a/vsintegration/src/FSharp.LanguageService.Base/PatternMatcher/ArrayBuilder.cs b/vsintegration/src/FSharp.PatternMatcher/ArrayBuilder.cs similarity index 100% rename from vsintegration/src/FSharp.LanguageService.Base/PatternMatcher/ArrayBuilder.cs rename to vsintegration/src/FSharp.PatternMatcher/ArrayBuilder.cs diff --git a/vsintegration/src/FSharp.LanguageService.Base/PatternMatcher/ArraySlice.cs b/vsintegration/src/FSharp.PatternMatcher/ArraySlice.cs similarity index 100% rename from vsintegration/src/FSharp.LanguageService.Base/PatternMatcher/ArraySlice.cs rename to vsintegration/src/FSharp.PatternMatcher/ArraySlice.cs diff --git a/vsintegration/src/FSharp.LanguageService.Base/PatternMatcher/BKTree.Builder.cs b/vsintegration/src/FSharp.PatternMatcher/BKTree.Builder.cs similarity index 100% rename from vsintegration/src/FSharp.LanguageService.Base/PatternMatcher/BKTree.Builder.cs rename to vsintegration/src/FSharp.PatternMatcher/BKTree.Builder.cs diff --git a/vsintegration/src/FSharp.LanguageService.Base/PatternMatcher/BKTree.Edge.cs b/vsintegration/src/FSharp.PatternMatcher/BKTree.Edge.cs similarity index 100% rename from vsintegration/src/FSharp.LanguageService.Base/PatternMatcher/BKTree.Edge.cs rename to vsintegration/src/FSharp.PatternMatcher/BKTree.Edge.cs diff --git a/vsintegration/src/FSharp.LanguageService.Base/PatternMatcher/BKTree.Node.cs b/vsintegration/src/FSharp.PatternMatcher/BKTree.Node.cs similarity index 100% rename from vsintegration/src/FSharp.LanguageService.Base/PatternMatcher/BKTree.Node.cs rename to vsintegration/src/FSharp.PatternMatcher/BKTree.Node.cs diff --git a/vsintegration/src/FSharp.LanguageService.Base/PatternMatcher/BKTree.cs b/vsintegration/src/FSharp.PatternMatcher/BKTree.cs similarity index 100% rename from vsintegration/src/FSharp.LanguageService.Base/PatternMatcher/BKTree.cs rename to vsintegration/src/FSharp.PatternMatcher/BKTree.cs diff --git a/vsintegration/src/FSharp.LanguageService.Base/PatternMatcher/CaseSensitiveComparison.cs b/vsintegration/src/FSharp.PatternMatcher/CaseSensitiveComparison.cs similarity index 100% rename from vsintegration/src/FSharp.LanguageService.Base/PatternMatcher/CaseSensitiveComparison.cs rename to vsintegration/src/FSharp.PatternMatcher/CaseSensitiveComparison.cs diff --git a/vsintegration/src/FSharp.LanguageService.Base/PatternMatcher/EditDistance.cs b/vsintegration/src/FSharp.PatternMatcher/EditDistance.cs similarity index 100% rename from vsintegration/src/FSharp.LanguageService.Base/PatternMatcher/EditDistance.cs rename to vsintegration/src/FSharp.PatternMatcher/EditDistance.cs diff --git a/vsintegration/src/FSharp.PatternMatcher/FSharp.PatternMatcher.csproj b/vsintegration/src/FSharp.PatternMatcher/FSharp.PatternMatcher.csproj new file mode 100644 index 00000000000..da6305fb62c --- /dev/null +++ b/vsintegration/src/FSharp.PatternMatcher/FSharp.PatternMatcher.csproj @@ -0,0 +1,20 @@ + + + + + + Library + false + true + + + + + + + + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.LanguageService.Base/PatternMatcher/Hash.cs b/vsintegration/src/FSharp.PatternMatcher/Hash.cs similarity index 100% rename from vsintegration/src/FSharp.LanguageService.Base/PatternMatcher/Hash.cs rename to vsintegration/src/FSharp.PatternMatcher/Hash.cs diff --git a/vsintegration/src/FSharp.LanguageService.Base/PatternMatcher/IDictionaryExtensions.cs b/vsintegration/src/FSharp.PatternMatcher/IDictionaryExtensions.cs similarity index 100% rename from vsintegration/src/FSharp.LanguageService.Base/PatternMatcher/IDictionaryExtensions.cs rename to vsintegration/src/FSharp.PatternMatcher/IDictionaryExtensions.cs diff --git a/vsintegration/src/FSharp.PatternMatcher/IObjectWritable.cs b/vsintegration/src/FSharp.PatternMatcher/IObjectWritable.cs new file mode 100644 index 00000000000..15f286884f2 --- /dev/null +++ b/vsintegration/src/FSharp.PatternMatcher/IObjectWritable.cs @@ -0,0 +1,10 @@ +namespace Microsoft.CodeAnalysis +{ + /// + /// Objects that implement this interface know how to write their contents to an + /// + internal interface IObjectWritable + { + void WriteTo(ObjectWriter writer); + } +} diff --git a/vsintegration/src/FSharp.LanguageService.Base/PatternMatcher/ImmutableArrayExtensions.cs b/vsintegration/src/FSharp.PatternMatcher/ImmutableArrayExtensions.cs similarity index 100% rename from vsintegration/src/FSharp.LanguageService.Base/PatternMatcher/ImmutableArrayExtensions.cs rename to vsintegration/src/FSharp.PatternMatcher/ImmutableArrayExtensions.cs diff --git a/vsintegration/src/FSharp.LanguageService.Base/PatternMatcher/NormalizedTextSpanCollection.cs b/vsintegration/src/FSharp.PatternMatcher/NormalizedTextSpanCollection.cs similarity index 100% rename from vsintegration/src/FSharp.LanguageService.Base/PatternMatcher/NormalizedTextSpanCollection.cs rename to vsintegration/src/FSharp.PatternMatcher/NormalizedTextSpanCollection.cs diff --git a/vsintegration/src/FSharp.LanguageService.Base/PatternMatcher/ObjectPool.cs b/vsintegration/src/FSharp.PatternMatcher/ObjectPool.cs similarity index 100% rename from vsintegration/src/FSharp.LanguageService.Base/PatternMatcher/ObjectPool.cs rename to vsintegration/src/FSharp.PatternMatcher/ObjectPool.cs diff --git a/vsintegration/src/FSharp.LanguageService.Base/PatternMatcher/ObjectReader.cs b/vsintegration/src/FSharp.PatternMatcher/ObjectReader.cs similarity index 100% rename from vsintegration/src/FSharp.LanguageService.Base/PatternMatcher/ObjectReader.cs rename to vsintegration/src/FSharp.PatternMatcher/ObjectReader.cs diff --git a/vsintegration/src/FSharp.LanguageService.Base/PatternMatcher/ObjectWriter.cs b/vsintegration/src/FSharp.PatternMatcher/ObjectWriter.cs similarity index 100% rename from vsintegration/src/FSharp.LanguageService.Base/PatternMatcher/ObjectWriter.cs rename to vsintegration/src/FSharp.PatternMatcher/ObjectWriter.cs diff --git a/vsintegration/src/FSharp.LanguageService.Base/PatternMatcher/PatternMatch.cs b/vsintegration/src/FSharp.PatternMatcher/PatternMatch.cs similarity index 100% rename from vsintegration/src/FSharp.LanguageService.Base/PatternMatcher/PatternMatch.cs rename to vsintegration/src/FSharp.PatternMatcher/PatternMatch.cs diff --git a/vsintegration/src/FSharp.LanguageService.Base/PatternMatcher/PatternMatchKind.cs b/vsintegration/src/FSharp.PatternMatcher/PatternMatchKind.cs similarity index 89% rename from vsintegration/src/FSharp.LanguageService.Base/PatternMatcher/PatternMatchKind.cs rename to vsintegration/src/FSharp.PatternMatcher/PatternMatchKind.cs index f6c8057a611..41d0596576b 100644 --- a/vsintegration/src/FSharp.LanguageService.Base/PatternMatcher/PatternMatchKind.cs +++ b/vsintegration/src/FSharp.PatternMatcher/PatternMatchKind.cs @@ -29,8 +29,7 @@ internal enum PatternMatchKind /// /// The pattern matches the candidate in a fuzzy manner. Fuzzy matching allows for - /// a certain amount of misspellings, missing words, etc. See for - /// more details. + /// misspellings, missing words, etc. /// Fuzzy } diff --git a/vsintegration/src/FSharp.LanguageService.Base/PatternMatcher/PatternMatcher.Segment.cs b/vsintegration/src/FSharp.PatternMatcher/PatternMatcher.Segment.cs similarity index 100% rename from vsintegration/src/FSharp.LanguageService.Base/PatternMatcher/PatternMatcher.Segment.cs rename to vsintegration/src/FSharp.PatternMatcher/PatternMatcher.Segment.cs diff --git a/vsintegration/src/FSharp.LanguageService.Base/PatternMatcher/PatternMatcher.TextChunk.cs b/vsintegration/src/FSharp.PatternMatcher/PatternMatcher.TextChunk.cs similarity index 100% rename from vsintegration/src/FSharp.LanguageService.Base/PatternMatcher/PatternMatcher.TextChunk.cs rename to vsintegration/src/FSharp.PatternMatcher/PatternMatcher.TextChunk.cs diff --git a/vsintegration/src/FSharp.LanguageService.Base/PatternMatcher/PatternMatcher.cs b/vsintegration/src/FSharp.PatternMatcher/PatternMatcher.cs similarity index 100% rename from vsintegration/src/FSharp.LanguageService.Base/PatternMatcher/PatternMatcher.cs rename to vsintegration/src/FSharp.PatternMatcher/PatternMatcher.cs diff --git a/vsintegration/src/FSharp.LanguageService.Base/PatternMatcher/PatternMatches.cs b/vsintegration/src/FSharp.PatternMatcher/PatternMatches.cs similarity index 100% rename from vsintegration/src/FSharp.LanguageService.Base/PatternMatcher/PatternMatches.cs rename to vsintegration/src/FSharp.PatternMatcher/PatternMatches.cs diff --git a/vsintegration/src/FSharp.LanguageService.Base/PatternMatcher/PooledHashSet.cs b/vsintegration/src/FSharp.PatternMatcher/PooledHashSet.cs similarity index 100% rename from vsintegration/src/FSharp.LanguageService.Base/PatternMatcher/PooledHashSet.cs rename to vsintegration/src/FSharp.PatternMatcher/PooledHashSet.cs diff --git a/vsintegration/src/FSharp.LanguageService.Base/PatternMatcher/PooledStringBuilder.cs b/vsintegration/src/FSharp.PatternMatcher/PooledStringBuilder.cs similarity index 100% rename from vsintegration/src/FSharp.LanguageService.Base/PatternMatcher/PooledStringBuilder.cs rename to vsintegration/src/FSharp.PatternMatcher/PooledStringBuilder.cs diff --git a/vsintegration/src/FSharp.PatternMatcher/Properties/AssemblyInfo.cs b/vsintegration/src/FSharp.PatternMatcher/Properties/AssemblyInfo.cs new file mode 100644 index 00000000000..c16abf8279f --- /dev/null +++ b/vsintegration/src/FSharp.PatternMatcher/Properties/AssemblyInfo.cs @@ -0,0 +1,9 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + diff --git a/vsintegration/src/FSharp.LanguageService.Base/PatternMatcher/SpellChecker.cs b/vsintegration/src/FSharp.PatternMatcher/SpellChecker.cs similarity index 100% rename from vsintegration/src/FSharp.LanguageService.Base/PatternMatcher/SpellChecker.cs rename to vsintegration/src/FSharp.PatternMatcher/SpellChecker.cs diff --git a/vsintegration/src/FSharp.LanguageService.Base/PatternMatcher/StringBreaker.cs b/vsintegration/src/FSharp.PatternMatcher/StringBreaker.cs similarity index 100% rename from vsintegration/src/FSharp.LanguageService.Base/PatternMatcher/StringBreaker.cs rename to vsintegration/src/FSharp.PatternMatcher/StringBreaker.cs diff --git a/vsintegration/src/FSharp.LanguageService.Base/PatternMatcher/StringSlice.cs b/vsintegration/src/FSharp.PatternMatcher/StringSlice.cs similarity index 100% rename from vsintegration/src/FSharp.LanguageService.Base/PatternMatcher/StringSlice.cs rename to vsintegration/src/FSharp.PatternMatcher/StringSlice.cs diff --git a/vsintegration/src/FSharp.LanguageService.Base/PatternMatcher/TextSpan.cs b/vsintegration/src/FSharp.PatternMatcher/TextSpan.cs similarity index 100% rename from vsintegration/src/FSharp.LanguageService.Base/PatternMatcher/TextSpan.cs rename to vsintegration/src/FSharp.PatternMatcher/TextSpan.cs diff --git a/vsintegration/src/FSharp.LanguageService.Base/PatternMatcher/VersionStamp.cs b/vsintegration/src/FSharp.PatternMatcher/VersionStamp.cs similarity index 100% rename from vsintegration/src/FSharp.LanguageService.Base/PatternMatcher/VersionStamp.cs rename to vsintegration/src/FSharp.PatternMatcher/VersionStamp.cs diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/AssemblyInfo.cs b/vsintegration/src/FSharp.ProjectSystem.Base/Project/AssemblyInfo.cs index f2e28b31a0c..0e5934a6de8 100644 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/AssemblyInfo.cs +++ b/vsintegration/src/FSharp.ProjectSystem.Base/Project/AssemblyInfo.cs @@ -5,20 +5,5 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -/* F# additions: begin. */ -[assembly:AssemblyDescription("FSharp.ProjectSystem.Base.dll")] -[assembly:AssemblyCompany("Microsoft Corporation")] -[assembly:AssemblyTitle("FSharp.ProjectSystem.Base.dll")] -[assembly:AssemblyCopyright("\x00a9 Microsoft Corporation. All rights reserved.")] -[assembly:AssemblyProduct("Microsoft\x00ae F#")] -[assembly:AssemblyConfiguration("")] -[assembly:AssemblyCulture("")] [assembly:ComVisible(false)] - -/* Make internals visible to other project system DLLs */ -[assembly:System.Runtime.CompilerServices.InternalsVisibleTo("FSharp.ProjectSystem.FSharp, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")] -[assembly:System.Runtime.CompilerServices.InternalsVisibleTo("FSharp.ProjectSystem.PropertyPages, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")] -[assembly:System.Runtime.CompilerServices.InternalsVisibleTo("VisualFSharp.Salsa, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")] -[assembly:System.Runtime.CompilerServices.InternalsVisibleTo("VisualFSharp.Unittests, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")] - [assembly: Microsoft.VisualStudio.Shell.ProvideCodeBase(CodeBase = @"$PackageFolder$\FSharp.ProjectSystem.Base.dll")] diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/AssemblyReferenceNode.cs b/vsintegration/src/FSharp.ProjectSystem.Base/Project/AssemblyReferenceNode.cs index 148525d664c..2d346e86c2b 100644 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/AssemblyReferenceNode.cs +++ b/vsintegration/src/FSharp.ProjectSystem.Base/Project/AssemblyReferenceNode.cs @@ -666,7 +666,7 @@ public override object GetProperty(int propId) { var objectBrowserGuid = VSProjectConstants.guidObjectBrowser; var logicalViewGuid = VSConstants.LOGVIEWID.Primary_guid; - IVsUIShellOpenDocument3 shellOpenDocument3 = Package.GetGlobalService(typeof(SVsUIShellOpenDocument)) as IVsUIShellOpenDocument3; + IVsUIShellOpenDocument3 shellOpenDocument3 = Microsoft.VisualStudio.Shell.Package.GetGlobalService(typeof(SVsUIShellOpenDocument)) as IVsUIShellOpenDocument3; return shellOpenDocument3.GetProvisionalViewingStatusForEditor(ref objectBrowserGuid, ref logicalViewGuid); } diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/Automation/OAFileItem.cs b/vsintegration/src/FSharp.ProjectSystem.Base/Project/Automation/OAFileItem.cs index 1d78317e975..02480c09721 100644 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/Automation/OAFileItem.cs +++ b/vsintegration/src/FSharp.ProjectSystem.Base/Project/Automation/OAFileItem.cs @@ -15,7 +15,6 @@ using System.Diagnostics.CodeAnalysis; using System.Globalization; using Microsoft.VisualStudio.FSharp.ProjectSystem; -using Microsoft.VisualStudio.FSharp.LanguageService; namespace Microsoft.VisualStudio.FSharp.ProjectSystem.Automation { diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/Automation/OAFolderItem.cs b/vsintegration/src/FSharp.ProjectSystem.Base/Project/Automation/OAFolderItem.cs index d3c6b2edc2f..af1fadcee67 100644 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/Automation/OAFolderItem.cs +++ b/vsintegration/src/FSharp.ProjectSystem.Base/Project/Automation/OAFolderItem.cs @@ -13,7 +13,6 @@ using EnvDTE; using System.Diagnostics.CodeAnalysis; using Microsoft.VisualStudio.FSharp.ProjectSystem; -using Microsoft.VisualStudio.FSharp.LanguageService; namespace Microsoft.VisualStudio.FSharp.ProjectSystem.Automation { diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/Automation/OANavigableProjectItems.cs b/vsintegration/src/FSharp.ProjectSystem.Base/Project/Automation/OANavigableProjectItems.cs index 00856b2e545..6c2ae1e5919 100644 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/Automation/OANavigableProjectItems.cs +++ b/vsintegration/src/FSharp.ProjectSystem.Base/Project/Automation/OANavigableProjectItems.cs @@ -13,7 +13,6 @@ using Microsoft.VisualStudio.OLE.Interop; using System.Diagnostics.CodeAnalysis; using Microsoft.VisualStudio.FSharp.ProjectSystem; -using Microsoft.VisualStudio.FSharp.LanguageService; namespace Microsoft.VisualStudio.FSharp.ProjectSystem.Automation { diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/Automation/OAProject.cs b/vsintegration/src/FSharp.ProjectSystem.Base/Project/Automation/OAProject.cs index 985f6418880..412c70e0c94 100644 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/Automation/OAProject.cs +++ b/vsintegration/src/FSharp.ProjectSystem.Base/Project/Automation/OAProject.cs @@ -15,7 +15,6 @@ using EnvDTE; using System.Globalization; using Microsoft.VisualStudio.FSharp.ProjectSystem; -using Microsoft.VisualStudio.FSharp.LanguageService; namespace Microsoft.VisualStudio.FSharp.ProjectSystem.Automation { diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/Automation/OAProjectItem.cs b/vsintegration/src/FSharp.ProjectSystem.Base/Project/Automation/OAProjectItem.cs index 30f5ba319f1..90dc6bfec7e 100644 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/Automation/OAProjectItem.cs +++ b/vsintegration/src/FSharp.ProjectSystem.Base/Project/Automation/OAProjectItem.cs @@ -12,7 +12,6 @@ using Microsoft.VisualStudio.OLE.Interop; using EnvDTE; using Microsoft.VisualStudio.FSharp.ProjectSystem; -using Microsoft.VisualStudio.FSharp.LanguageService; namespace Microsoft.VisualStudio.FSharp.ProjectSystem.Automation diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/Automation/OAProjectItems.cs b/vsintegration/src/FSharp.ProjectSystem.Base/Project/Automation/OAProjectItems.cs index 7b034447426..a9e5c8aff4c 100644 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/Automation/OAProjectItems.cs +++ b/vsintegration/src/FSharp.ProjectSystem.Base/Project/Automation/OAProjectItems.cs @@ -16,8 +16,6 @@ using System.Diagnostics.CodeAnalysis; using System.Globalization; using Microsoft.VisualStudio.FSharp.ProjectSystem; -using Microsoft.VisualStudio.FSharp.LanguageService; - namespace Microsoft.VisualStudio.FSharp.ProjectSystem.Automation { diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/Automation/OAProperties.cs b/vsintegration/src/FSharp.ProjectSystem.Base/Project/Automation/OAProperties.cs index 86b2369a6c8..f8079efb6b6 100644 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/Automation/OAProperties.cs +++ b/vsintegration/src/FSharp.ProjectSystem.Base/Project/Automation/OAProperties.cs @@ -14,7 +14,6 @@ using System.Diagnostics.CodeAnalysis; using System.Globalization; using Microsoft.VisualStudio.FSharp.ProjectSystem; -using Microsoft.VisualStudio.FSharp.LanguageService; namespace Microsoft.VisualStudio.FSharp.ProjectSystem.Automation { diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/Automation/VSProject/OAReferenceBase.cs b/vsintegration/src/FSharp.ProjectSystem.Base/Project/Automation/VSProject/OAReferenceBase.cs index 6b819efea63..47190a2b7f7 100644 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/Automation/VSProject/OAReferenceBase.cs +++ b/vsintegration/src/FSharp.ProjectSystem.Base/Project/Automation/VSProject/OAReferenceBase.cs @@ -6,7 +6,6 @@ using Microsoft.VisualStudio.FSharp.ProjectSystem; using VSLangProj; using System.Diagnostics.CodeAnalysis; -using Microsoft.VisualStudio.FSharp.LanguageService; namespace Microsoft.VisualStudio.FSharp.ProjectSystem.Automation { diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/Automation/VSProject/OAReferences.cs b/vsintegration/src/FSharp.ProjectSystem.Base/Project/Automation/VSProject/OAReferences.cs index 474acd48c3d..bd6be170d23 100644 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/Automation/VSProject/OAReferences.cs +++ b/vsintegration/src/FSharp.ProjectSystem.Base/Project/Automation/VSProject/OAReferences.cs @@ -11,7 +11,6 @@ using VSLangProj; using System.Collections; using System.Diagnostics.CodeAnalysis; -using Microsoft.VisualStudio.FSharp.LanguageService; namespace Microsoft.VisualStudio.FSharp.ProjectSystem.Automation { diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/ConfigurationProperties.cs b/vsintegration/src/FSharp.ProjectSystem.Base/Project/ConfigurationProperties.cs index b553ef663d6..ce799dbfe2c 100644 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/ConfigurationProperties.cs +++ b/vsintegration/src/FSharp.ProjectSystem.Base/Project/ConfigurationProperties.cs @@ -11,7 +11,6 @@ using System.IO; using System.Linq; using System.Collections.Generic; -using Microsoft.VisualStudio.FSharp.LanguageService; namespace Microsoft.VisualStudio.FSharp.ProjectSystem { diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/Constants.cs b/vsintegration/src/FSharp.ProjectSystem.Base/Project/Constants.cs deleted file mode 100644 index 211d0aa1657..00000000000 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/Constants.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Microsoft.VisualStudio.FSharp.ProjectSystem -{ - internal static class Constants - { - public const string FSharpEditorFactoryIdString = "8a5aa6cf-46e3-4520-a70a-7393d15233e9"; - public const string FSharpContentType = "F#"; - } -} diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/Diagrams/AutomationClasses.cd b/vsintegration/src/FSharp.ProjectSystem.Base/Project/Diagrams/AutomationClasses.cd deleted file mode 100644 index fb3c8138d2b..00000000000 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/Diagrams/AutomationClasses.cd +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - Automation\OAFileItem.cs - AAAAAIAAAAAAMAAAAAAAAAAAAAAAAAACgBABAAAAAAA= - - - - - - Automation\OANavigableProjectItems.cs - AEQAAAAAEABACBAAAAgASAQkCAgAIAAAAgAAAAAAACA= - - - - - - Automation\OAProject.cs - AAQAAJQAAABEUIIhQAAcCAQAAAkAAAAAIBgFCABCAAQ= - - - - - - - Automation\OAProjectItem.cs - AQQAQJAAAABEYAAgQACMDCQBCAkAAAACgBAFAAECAAA= - - - - - - - - - Automation\OAProjectItems.cs - AEAAAAAAEAAAAAAAAAAgAAAggAAAAAAAAAAAAAAAAAA= - - - - - - Automation\OAProperties.cs - AAYAAAACABAAABAAIAAAQCQEAAAAAAAAAAAAAAACAAA= - - - - - - Automation\OAProperty.cs - AQSAAAAAABAAQAJgAAAQQAQAgAAAAAAAAAAgAAAAAAA= - - - - - - Automation\OANestedProjectItem.cs - AAAAABAAAAAAAAAAAAAAACAAAAAACAAAAAAAAAAAAAA= - - - - - - Automation\OARreferenceItem.cs - AAAAAAAAAAAAYAAAAAAAAAQAAAEAAAAAAAAAAAAAAAA= - - - - - - Automation\OAReferenceFolderItem.cs - AAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQ= - - - - - - Automation\OASolutionFolder.cs - AUQAAAAAAAAAAAAAAAAAQAAgAAIAAAAAAAQAAAAEAAA= - - - diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/Diagrams/ConfigurationClasses.cd b/vsintegration/src/FSharp.ProjectSystem.Base/Project/Diagrams/ConfigurationClasses.cd deleted file mode 100644 index 3586226cd9a..00000000000 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/Diagrams/ConfigurationClasses.cd +++ /dev/null @@ -1,154 +0,0 @@ - - - - - - - D:\Program Files\Visual Studio 2005 SDK\2005.12\VisualStudioIntegration\Common\Source\CSharp\Project\ConfigProvider.cs - AAQAgEQBAAJIAhACAAgAABAEAQ4MAAAAACAEEAAAEQQ= - - - - - - - - - - - - - - - - - - - - D:\Program Files\Visual Studio 2005 SDK\2005.12\VisualStudioIntegration\Common\Source\CSharp\Project\ProjectNode.cs - PcL08fbsGjX+k5CfjpK+d69X9h87o1+nbxPdSeHRekI= - - - - - - - D:\Program Files\Visual Studio 2005 SDK\2005.12\VisualStudioIntegration\Common\Source\CSharp\Project\OutputGroup.cs - AAAAIgABgwRAAAAAAAAAiAAAAIgEQAAgAAAAEASAABA= - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - D:\Program Files\Visual Studio 2005 SDK\2005.12\VisualStudioIntegration\Common\Source\CSharp\Project\Output.cs - AAAAAQQAAAAAAAAAAAAAgAAACAgAQBAAAAAAAACAABA= - - - - - - - - - - - - - - - - - - - - D:\Program Files\Visual Studio 2005 SDK\2005.12\VisualStudioIntegration\Common\Source\CSharp\Project\ProjectConfig.cs - AAgCAEJABBAAkQCFCCCgAAEAAEgAYEECAAAAGQDJUEA= - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - D:\Program Files\Visual Studio 2005 SDK\2005.12\VisualStudioIntegration\Common\Source\CSharp\Project\ProjectElement.cs - AgAEAEAAAAAAAAQAhAQAAgAUABAAA4AAQAIAAAAAgiA= - - - - - - - - - - D:\Program Files\Visual Studio 2005 SDK\2005.12\VisualStudioIntegration\Common\Source\CSharp\Project\ProjectConfig.cs - AABCAAAACgAACAAAAAAABAEIAAQAgAAAIABAEABQAAA= - - - - - - - - - - - - - D:\Program Files\Visual Studio 2005 SDK\2005.12\VisualStudioIntegration\Common\Source\CSharp\Project\StructuresEnums.cs - IAACAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAA= - - - diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/Diagrams/DocumentManagerClasses.cd b/vsintegration/src/FSharp.ProjectSystem.Base/Project/Diagrams/DocumentManagerClasses.cd deleted file mode 100644 index ee63d3a71f2..00000000000 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/Diagrams/DocumentManagerClasses.cd +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - FileDocumentManager.cs - AACAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - - - - - - DocumentManager.cs - AQCAQIQAAAAAIAEAAAAAAAAAIAAAAAAAAAAAACGAAAE= - - - - - - - - - - - - ProjectDesignerDocumentManager.cs - AACAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - - - - - - HierarchyNode.cs - NKl4a26oCodRuoDQodAKZKQQxKtwgtmAOJLYAHLHccE= - - - - diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/Diagrams/HierarchyClasses.cd b/vsintegration/src/FSharp.ProjectSystem.Base/Project/Diagrams/HierarchyClasses.cd deleted file mode 100644 index 25f3d4c9fd5..00000000000 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/Diagrams/HierarchyClasses.cd +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - D:\Program Files\Visual Studio 2005 SDK\2005.12\VisualStudioIntegration\Common\Source\CSharp\Project\HierarchyNode.cs - NKl4a26oCodRuoDQodAKZKQQxKtwgtmAOJLYAHLHccE= - - - - - - - D:\Program Files\Visual Studio 2005 SDK\2005.12\VisualStudioIntegration\Common\Source\CSharp\Project\FolderNode.cs - AAAAEAKAAAEAAAAAgIAAJAAAAAIAAAAACAAQAAAAAQA= - - - - - - D:\Program Files\Visual Studio 2005 SDK\2005.12\VisualStudioIntegration\Common\Source\CSharp\Project\FileNode.cs - AAhACECAAAFAAAEAABACZAAAAAAAAAAQSAAQAABEAAA= - - - - - - D:\Program Files\Visual Studio 2005 SDK\2005.12\VisualStudioIntegration\Common\Source\CSharp\Project\ProjectNode.cs - PcL08fbsGjX+k5CfjpK+N69X9h87o1+nbxPdSaHRekI= - - - - - - - D:\Program Files\Visual Studio 2005 SDK\2005.12\VisualStudioIntegration\Common\Source\CSharp\Project\ProjectContainerNode.cs - AABFABAAAAQAAAAAQAAAAAAEQIABAAAARASAAAAAAAE= - - - - - - - D:\Program Files\Visual Studio 2005 SDK\2005.12\VisualStudioIntegration\Common\Source\CSharp\Project\ComReferenceNode.cs - AACACCIAAAIAACAAQAAEAAQAgACAAAABCAAQAQACAAA= - - - - - - - - - - - - - D:\Program Files\Visual Studio 2005 SDK\2005.12\VisualStudioIntegration\Common\Source\CSharp\Project\ReferenceContainerNode.cs - AABACACgAAEAAAAAgAACIAAAAAIQAAAACAAQAABAARA= - - - - - - - D:\Program Files\Visual Studio 2005 SDK\2005.12\VisualStudioIntegration\Common\Source\CSharp\Project\ReferenceNode.cs - AABAAGaAAAFAAAAAgAAiIAAAAAAQAAEAGAAQAABAAAA= - - - - - - D:\Program Files\Visual Studio 2005 SDK\2005.12\VisualStudioIntegration\Common\Source\CSharp\Project\ProjectReferenceNode.cs - CAACCFYCAgAAgAEAAIACBAQAAAAAAAAACAAAAACACAA= - - - - - - D:\Program Files\Visual Studio 2005 SDK\2005.12\VisualStudioIntegration\Common\Source\CSharp\Project\AssemblyReferenceNode.cs - AAAACCIAAAAAAAAAAAIAAAACAABAAAAAGAAAEAAAABg= - - - - - - - - - - diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/Diagrams/PropertiesClasses.cd b/vsintegration/src/FSharp.ProjectSystem.Base/Project/Diagrams/PropertiesClasses.cd deleted file mode 100644 index 2fbb404bebd..00000000000 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/Diagrams/PropertiesClasses.cd +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - NodeProperties.cs - EQACAAAAAAAAAQAAAAAAAAQAAAEAAggAAABACAEAAAA= - - - - - - - - - - - - - LocalizableProperties.cs - AAAACAAACAAAAAAgAAAAgAAAABAEIAAAAERAAAAACAA= - - - - - - HierarchyNode.cs - NKl4a26oCodRuoDQodAKZKQQxKtwgtmAOJLYAHLHccE= - - - - - - - NodeProperties.cs - CAAAAAAgAAAAAAAAAAAAAAAAAAAAIAAAAAAAAABAAAA= - - - - - - NodeProperties.cs - AAAAAAAABAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAA= - - - - - - NodeProperties.cs - CAAAAAAAAAAAAAAAAAAAAAQAAAAAIAAAAAAAAAAAAAA= - - - diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/Diagrams/ReferenceClasses.cd b/vsintegration/src/FSharp.ProjectSystem.Base/Project/Diagrams/ReferenceClasses.cd deleted file mode 100644 index 55a2b56dc4e..00000000000 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/Diagrams/ReferenceClasses.cd +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - ReferenceNode.cs - AABAAGaAAAFAAAAAgAAiIAAAAAAQAAEAGAAQAABAAAA= - - - - - ReferenceNode.cs - - - - - - - - ProjectReferenceNode.cs - CAACCFYCAgAAgAEAAIACBAQAAAAAAAAACAAAAACACAA= - - - - - - - - - - - - - - - - - - BuildDependency.cs - AAAQAAYAAAQAgAAQAEAAAAAAAAAAAAAAEQAAAACAAAA= - - - - - - - - - AssemblyReferenceNode.cs - AAAACCIAAAAAAAAAAAIAAAACAABAAAAAGAAAEAAAABg= - - - - - - ComReferenceNode.cs - AACACCIAAAIAACAAQAAEAAQAgACAAAABCAAQAQACAAA= - - - - - - - - - - - - SolutionListenerForProjectReferenceUpdate.cs - AAAAAAAAAAAAAAAAAQAAIAAAAgAAAAAIAAAAgABAAAA= - - - - - - SolutionListener.cs - AAIACRBQoCAQCCAAEAIAJAAACgQBAAAYAQAiiAIAAAA= - - - - diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/FSharpEditorFactory.cs b/vsintegration/src/FSharp.ProjectSystem.Base/Project/FSharpEditorFactory.cs deleted file mode 100644 index 3d938fa1898..00000000000 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/FSharpEditorFactory.cs +++ /dev/null @@ -1,141 +0,0 @@ -using Microsoft.VisualStudio; -using Microsoft.VisualStudio.ComponentModelHost; -using Microsoft.VisualStudio.Designer.Interfaces; -using Microsoft.VisualStudio.Editor; -using Microsoft.VisualStudio.Shell; -using Microsoft.VisualStudio.Shell.Interop; -using Microsoft.VisualStudio.TextManager.Interop; -using Microsoft.VisualStudio.Utilities; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Runtime.InteropServices; -using System.Text; -using System.Threading.Tasks; -using IOleServiceProvider = Microsoft.VisualStudio.OLE.Interop.IServiceProvider; - -namespace Microsoft.VisualStudio.FSharp.ProjectSystem -{ - // 64 represents a hex number. It needs to be greater than 37 so the TextMate editor will not be chosen as higher priority. - [Guid(Constants.FSharpEditorFactoryIdString)] - [ProvideEditorFactory(typeof(FSharpEditorFactory), 101, CommonPhysicalViewAttributes = (int)__VSPHYSICALVIEWATTRIBUTES.PVA_SupportsPreview)] - [ProvideEditorExtension(typeof(FSharpEditorFactory), ".fs", 64)] - [ProvideEditorExtension(typeof(FSharpEditorFactory), ".fsi", 64)] - [ProvideEditorExtension(typeof(FSharpEditorFactory), ".fsscript", 64)] - [ProvideEditorExtension(typeof(FSharpEditorFactory), ".fsx", 64)] - [ProvideEditorExtension(typeof(FSharpEditorFactory), ".ml", 64)] - [ProvideEditorExtension(typeof(FSharpEditorFactory), ".mli", 64)] - public class FSharpEditorFactory : IVsEditorFactory - { - private Package _parentPackage; - private IOleServiceProvider _oleServiceProvider; - private IVsEditorAdaptersFactoryService _editorAdaptersFactoryService; - private IContentTypeRegistryService _contentTypeRegistryService; - private IComponentModel _componentModel; - - private IServiceProvider ServiceProvider - { - get - { - return _parentPackage; - } - } - - public FSharpEditorFactory(Package parentPackage) - { - if (parentPackage == null) - { - throw new ArgumentNullException(nameof(parentPackage)); - } - - _parentPackage = parentPackage; - _componentModel = (IComponentModel)ServiceProvider.GetService(typeof(SComponentModel)); - _editorAdaptersFactoryService = _componentModel.GetService(); - _contentTypeRegistryService = _componentModel.GetService(); - } - - public int Close() - { - return VSConstants.S_OK; - } - - public int CreateEditorInstance(uint grfCreateDoc, string pszMkDocument, string pszPhysicalView, IVsHierarchy pvHier, uint itemid, IntPtr punkDocDataExisting, out IntPtr ppunkDocView, out IntPtr ppunkDocData, out string pbstrEditorCaption, out Guid pguidCmdUI, out int pgrfCDW) - { - ppunkDocView = IntPtr.Zero; - ppunkDocData = IntPtr.Zero; - pbstrEditorCaption = String.Empty; - - //pguidCmdUI is the highest priority Guid that Visual Studio Shell looks at when translating key strokes into editor commands. - //Here we intentionally set it to Guid.Empty so it will not play a part in translating keystrokes at all. The next highest priority - //will be commands tied to this FSharpEditorFactory (such as Alt-Enter). - //However, because we are setting pguidCmdUI, we are not going to get typical text editor commands bound to this editor unless we inherit - //those keybindings on the IVsWindowFrame in which our editor lives. - pguidCmdUI = Guid.Empty; - pgrfCDW = 0; - - IVsTextBuffer textBuffer = null; - - // Is this document already open? If so, let's see if it's a IVsTextBuffer we should re-use. This allows us - // to properly handle multiple windows open for the same document. - if (punkDocDataExisting != IntPtr.Zero) - { - object docDataExisting = Marshal.GetObjectForIUnknown(punkDocDataExisting); - - textBuffer = docDataExisting as IVsTextBuffer; - - if (textBuffer == null) - { - // We are incompatible with the existing doc data - return VSConstants.VS_E_INCOMPATIBLEDOCDATA; - } - } - - // Do we need to create a text buffer? - if (textBuffer == null) - { - var contentType = _contentTypeRegistryService.GetContentType(Constants.FSharpContentType); - textBuffer = _editorAdaptersFactoryService.CreateVsTextBufferAdapter(_oleServiceProvider, contentType); - } - - // If the text buffer is marked as read-only, ensure that the padlock icon is displayed - // next the new window's title and that [Read Only] is appended to title. - READONLYSTATUS readOnlyStatus = READONLYSTATUS.ROSTATUS_NotReadOnly; - uint textBufferFlags; - if (ErrorHandler.Succeeded(textBuffer.GetStateFlags(out textBufferFlags)) && - 0 != (textBufferFlags & ((uint)BUFFERSTATEFLAGS.BSF_FILESYS_READONLY | (uint)BUFFERSTATEFLAGS.BSF_USER_READONLY))) - { - readOnlyStatus = READONLYSTATUS.ROSTATUS_ReadOnly; - } - - var codeWindow = _editorAdaptersFactoryService.CreateVsCodeWindowAdapter(_oleServiceProvider); - codeWindow.SetBuffer((IVsTextLines)textBuffer); - codeWindow.GetEditorCaption(readOnlyStatus, out pbstrEditorCaption); - - ppunkDocView = Marshal.GetIUnknownForObject(codeWindow); - ppunkDocData = Marshal.GetIUnknownForObject(textBuffer); - - return VSConstants.S_OK; - } - - public int MapLogicalView(ref Guid rguidLogicalView, out string pbstrPhysicalView) - { - pbstrPhysicalView = null; - - if(rguidLogicalView == VSConstants.LOGVIEWID.Primary_guid || - rguidLogicalView == VSConstants.LOGVIEWID.Debugging_guid || - rguidLogicalView == VSConstants.LOGVIEWID.Code_guid || - rguidLogicalView == VSConstants.LOGVIEWID.TextView_guid) - { - return VSConstants.S_OK; - } - - return VSConstants.E_NOTIMPL; - } - - public int SetSite(Microsoft.VisualStudio.OLE.Interop.IServiceProvider packageServiceProvider) - { - _oleServiceProvider = packageServiceProvider; - return VSConstants.S_OK; - } - } -} diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/HierarchyNode.cs b/vsintegration/src/FSharp.ProjectSystem.Base/Project/HierarchyNode.cs index 7d8bcaa1bed..f26be0429f0 100644 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/HierarchyNode.cs +++ b/vsintegration/src/FSharp.ProjectSystem.Base/Project/HierarchyNode.cs @@ -3172,7 +3172,7 @@ string newTargetFrameworkMoniker // replace existing fscore with one that has matching version with current target framework var existingFsCore = - Microsoft.VisualStudio.FSharp.LanguageService.UIThread.DoOnUIThread( + UIThread.DoOnUIThread( () => references .OfType() .FirstOrDefault(r => r.Name == fsCoreName.Name && r.PublicKeyToken == Utilities.FsCorePublicKeyToken && r.Culture == fsCoreName.CultureName) @@ -3180,7 +3180,7 @@ string newTargetFrameworkMoniker if (existingFsCore != null) { - Microsoft.VisualStudio.FSharp.LanguageService.UIThread.DoOnUIThread(() => + UIThread.DoOnUIThread(() => { // save copyLocal value - after calling existingFsCore.Remove() becomes invalid and can raise exceptions var copyLocal = existingFsCore.CopyLocal; diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/IDEBuildLogger.cs b/vsintegration/src/FSharp.ProjectSystem.Base/Project/IDEBuildLogger.cs index a8e766877e7..edb1883ff8e 100644 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/IDEBuildLogger.cs +++ b/vsintegration/src/FSharp.ProjectSystem.Base/Project/IDEBuildLogger.cs @@ -14,21 +14,12 @@ using Microsoft.VisualStudio.TextManager.Interop; using Microsoft.Win32; using IOleServiceProvider = Microsoft.VisualStudio.OLE.Interop.IServiceProvider; -using Microsoft.VisualStudio.FSharp.LanguageService; namespace Microsoft.VisualStudio.FSharp.ProjectSystem { public static class LoggingConstants { -#if VS_VERSION_DEV12 - public const string DefaultVSRegistryRoot = @"Software\Microsoft\VisualStudio\12.0"; -#endif -#if VS_VERSION_DEV14 - public const string DefaultVSRegistryRoot = @"Software\Microsoft\VisualStudio\14.0"; -#endif -#if VS_VERSION_DEV15 public const string DefaultVSRegistryRoot = @"Software\Microsoft\VisualStudio\15.0"; -#endif public const string BuildVerbosityRegistrySubKey = @"General"; public const string BuildVerbosityRegistryValue = "MSBuildLoggerVerbosity"; public const string UpToDateVerbosityRegistryValue = "U2DCheckVerbosity"; @@ -259,22 +250,22 @@ private void AddToErrorList( span.iEndLine = endLine < startLine ? span.iStartLine : endLine; span.iEndIndex = (endColumn < startColumn) && (span.iStartLine == span.iEndLine) ? span.iStartIndex : endColumn; - if (OutputWindowPane != null - && (this.Verbosity != LoggerVerbosity.Quiet || errorEvent is BuildErrorEventArgs)) - { - // Format error and output it to the output window - string message = this.FormatMessage(errorEvent.Message); + if (OutputWindowPane != null + && (this.Verbosity != LoggerVerbosity.Quiet || errorEvent is BuildErrorEventArgs)) + { + // Format error and output it to the output window + string message = this.FormatMessage(errorEvent.Message); DefaultCompilerError e = new DefaultCompilerError(file, span.iStartLine, span.iStartIndex, span.iEndLine, span.iEndIndex, errorCode, - message); - e.IsWarning = isWarning; + message); + e.IsWarning = isWarning; - Output(GetFormattedErrorMessage(e)); - } + Output(GetFormattedErrorMessage(e)); + } UIThread.Run(delegate() { diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/InternalsVisibleTo.cs b/vsintegration/src/FSharp.ProjectSystem.Base/Project/InternalsVisibleTo.cs deleted file mode 100644 index 9ec7355330a..00000000000 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/InternalsVisibleTo.cs +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; -[assembly:InternalsVisibleTo("FSharp.ProjectSystem.FSharp, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")] -[assembly: InternalsVisibleTo("VisualFSharp.Salsa, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")] -[assembly: InternalsVisibleTo("VisualFSharp.Unittests, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")] -[assembly: InternalsVisibleTo("FSharp.ProjectSystem.PropertyPages, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")] diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/MPFProjectAll.files b/vsintegration/src/FSharp.ProjectSystem.Base/Project/MPFProjectAll.files deleted file mode 100644 index 624da1ad750..00000000000 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/MPFProjectAll.files +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - . - - - - - - \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/NodeProperties.cs b/vsintegration/src/FSharp.ProjectSystem.Base/Project/NodeProperties.cs index 13ca5d368d5..bf72d2f4734 100644 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/NodeProperties.cs +++ b/vsintegration/src/FSharp.ProjectSystem.Base/Project/NodeProperties.cs @@ -20,7 +20,6 @@ using IOleServiceProvider = Microsoft.VisualStudio.OLE.Interop.IServiceProvider; using IServiceProvider = System.IServiceProvider; using System.Diagnostics.CodeAnalysis; -using Microsoft.VisualStudio.FSharp.LanguageService; using System.Runtime.Versioning; namespace Microsoft.VisualStudio.FSharp.ProjectSystem diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/ProjectBase.files b/vsintegration/src/FSharp.ProjectSystem.Base/Project/ProjectBase.files index 5096b9d418b..09bea264a03 100644 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/ProjectBase.files +++ b/vsintegration/src/FSharp.ProjectSystem.Base/Project/ProjectBase.files @@ -15,23 +15,23 @@ False global - - Microsoft.Build.Engine.dll - Microsoft.Build.Engine - Yes - global + + $(FSharpSourcesRoot)\..\packages\Microsoft.Build.Framework.$(MicrosoftBuildFrameworkPackageVersion)\lib\net46\Microsoft.Build.Framework.dll - - Microsoft.Build.Framework.dll - Microsoft.Build.Framework - Yes - global - - - Microsoft.Build.Utilities.v3.5.dll - Microsoft.Build.Utilities.v3.5 - Yes - global + + $(FSharpSourcesRoot)\..\packages\Microsoft.Build.$(MicrosoftBuildPackageVersion)\lib\net46\Microsoft.Build.dll + + + $(FSharpSourcesRoot)\..\packages\Microsoft.Build.Utilities.Core.$(MicrosoftBuildUtilitiesCorePackageVersion)\lib\net46\Microsoft.Build.Utilities.Core.dll + + + $(FSharpSourcesRoot)\..\packages\Microsoft.Build.Tasks.Core.$(MicrosoftBuildTasksCorePackageVersion)\lib\net46\Microsoft.Build.Tasks.Core.dll + + + $(FSharpSourcesRoot)\..\packages\Microsoft.Build.Tasks.Core.$(MicrosoftBuildTasksCorePackageVersion)\lib\net46\Microsoft.Build.Tasks.Core.dll + + + $(FSharpSourcesRoot)\..\packages\System.IO.Compression.$(SystemIoCompressionPackageVersion)\lib\net46\System.IO.Compression.dll diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/ProjectConfig.cs b/vsintegration/src/FSharp.ProjectSystem.Base/Project/ProjectConfig.cs index 6a68371137f..41832e24b27 100644 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/ProjectConfig.cs +++ b/vsintegration/src/FSharp.ProjectSystem.Base/Project/ProjectConfig.cs @@ -12,7 +12,6 @@ using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Linq; -using Microsoft.VisualStudio.FSharp.LanguageService; using Microsoft.Win32; namespace Microsoft.VisualStudio.FSharp.ProjectSystem @@ -554,6 +553,18 @@ public string TreatSpecificWarningsAsErrors } } + public string TreatSpecificWarningsAsWarnings + { + get + { + return GetConfigurationProperty(ProjectFileConstants.WarningsNotAsErrors, false); + } + set + { + SetConfigurationProperty(ProjectFileConstants.WarningsNotAsErrors, value); + } + } + public string DocumentationFile { get diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/ProjectFactory.cs b/vsintegration/src/FSharp.ProjectSystem.Base/Project/ProjectFactory.cs index c251312af8b..ae2e290cb75 100644 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/ProjectFactory.cs +++ b/vsintegration/src/FSharp.ProjectSystem.Base/Project/ProjectFactory.cs @@ -20,11 +20,9 @@ namespace Microsoft.VisualStudio.FSharp.ProjectSystem /// Creates projects within the solution /// internal abstract class ProjectFactory : Microsoft.VisualStudio.Shell.Flavor.FlavoredProjectFactoryBase - , IVsProjectUpgradeViaFactory, IVsProjectUpgradeViaFactory4 - - { - private Microsoft.VisualStudio.Shell.Package package; - private System.IServiceProvider site; + { + private Microsoft.VisualStudio.Shell.Package package; + private System.IServiceProvider site; private Microsoft.Build.Evaluation.ProjectCollection buildEngine; private Microsoft.Build.Evaluation.Project buildProject; @@ -112,6 +110,46 @@ protected override void CreateProject(string fileName, string location, string n } } + // Solution properties + IVsSolution solution = this.Site.GetService(typeof(SVsSolution)) as IVsSolution; + Debug.Assert(solution != null, "Could not retrieve the solution service from the global service provider"); + + // We do not want to throw. If we cannot set the solution related constants we set them to empty string. + string solutionDirectory, solutionPath, userOptionsFile; + solution.GetSolutionInfo(out solutionDirectory, out solutionPath, out userOptionsFile); + if (solutionDirectory == null) + { + solutionDirectory = String.Empty; + } + if (solutionPath == null) + { + solutionPath = String.Empty; + } + string solutionFileName = (solutionPath.Length == 0) ? String.Empty : Path.GetFileName(solutionPath); + string solutionName = (solutionPath.Length == 0) ? String.Empty : Path.GetFileNameWithoutExtension(solutionPath); + var solutionExtension = Path.GetExtension(solutionPath); + + // DevEnvDir property + IVsShell shell = this.Site.GetService(typeof(SVsShell)) as IVsShell; + Debug.Assert(shell != null, "Could not retrieve the IVsShell service from the global service provider"); + object installDirAsObject; + + // We do not want to throw. If we cannot set the solution related constants we set them to empty string. + shell.GetProperty((int)__VSSPROPID.VSSPROPID_InstallDirectory, out installDirAsObject); + string installDir = ((string)installDirAsObject); + if (String.IsNullOrEmpty(installDir)) + { + installDir = String.Empty; + } + else + { + // Ensure that we have trailing backslash as this is done for the langproj macros too. + if (installDir[installDir.Length - 1] != Path.DirectorySeparatorChar) + { + installDir += Path.DirectorySeparatorChar; + } + } + // Get the list of GUIDs from the project/template string guidsList = this.ProjectTypeGuids(fileName); @@ -119,7 +157,9 @@ protected override void CreateProject(string fileName, string location, string n IVsCreateAggregateProject aggregateProjectFactory = (IVsCreateAggregateProject)this.Site.GetService(typeof(SVsCreateAggregateProject)); int hr = aggregateProjectFactory.CreateAggregateProject(guidsList, fileName, location, name, flags, ref projectGuid, out project); if (hr == VSConstants.E_ABORT) + { canceled = 1; + } ErrorHandler.ThrowOnFailure(hr); this.buildProject = null; @@ -146,6 +186,67 @@ protected override object PreCreateForOuter(IntPtr outerProjectIUnknown) return node; } + internal Microsoft.Build.Evaluation.Project ReinitializeMsBuildProject(string filename) + { + // Solution properties + IVsSolution solution = this.Site.GetService(typeof(SVsSolution)) as IVsSolution; + Debug.Assert(solution != null, "Could not retrieve the solution service from the global service provider"); + + // We do not want to throw.If we cannot set the solution related constants we set them to empty string. + string solutionDirectory, solutionPath, userOptionsFile; + solution.GetSolutionInfo(out solutionDirectory, out solutionPath, out userOptionsFile); + if (solutionDirectory == null) + { + solutionDirectory = String.Empty; + } + if (solutionPath == null) + { + solutionPath = String.Empty; + } + string solutionFileName = (solutionPath.Length == 0) ? String.Empty : Path.GetFileName(solutionPath); + string solutionName = (solutionPath.Length == 0) ? String.Empty : Path.GetFileNameWithoutExtension(solutionPath); + string solutionExtension = String.Empty; + if (solutionPath.Length > 0 && Path.HasExtension(solutionPath)) + { + solutionExtension = Path.GetExtension(solutionPath); + } + + //DevEnvDir property + IVsShell shell = this.Site.GetService(typeof(SVsShell)) as IVsShell; + Debug.Assert(shell != null, "Could not retrieve the IVsShell service from the global service provider"); + object installDirAsObject; + + //We do not want to throw.If we cannot set the solution related constants we set them to empty string. + shell.GetProperty((int)__VSSPROPID.VSSPROPID_InstallDirectory, out installDirAsObject); + string installDir = ((string)installDirAsObject); + if (String.IsNullOrEmpty(installDir)) + { + installDir = String.Empty; + } + else + { + //Ensure that we have trailing backslash as this is done for the langproj macros too. + if (installDir[installDir.Length - 1] != Path.DirectorySeparatorChar) + { + installDir += Path.DirectorySeparatorChar; + } + } + + var projectGlobalPropertiesThatAllProjectSystemsMustSet = new Dictionary() + { + { GlobalProperty.SolutionDir.ToString(), solutionDirectory }, + { GlobalProperty.SolutionPath.ToString(), solutionPath }, + { GlobalProperty.SolutionFileName.ToString(), solutionFileName }, + { GlobalProperty.SolutionName.ToString(), solutionName }, + { GlobalProperty.SolutionExt.ToString(), solutionExtension }, + { GlobalProperty.BuildingInsideVisualStudio.ToString(), "true" }, + { GlobalProperty.Configuration.ToString(), "" }, + { GlobalProperty.Platform.ToString(), "" }, + { GlobalProperty.DevEnvDir.ToString(), installDir } + }; + return Utilities.ReinitializeMsBuildProject(this.buildEngine, filename, projectGlobalPropertiesThatAllProjectSystemsMustSet, this.buildProject); + } + /// /// Retrives the list of project guids from the project file. /// If you don't want your project to be flavorable, override @@ -158,7 +259,7 @@ protected override string ProjectTypeGuids(string file) { // Load the project so we can extract the list of GUIDs - this.buildProject = Utilities.ReinitializeMsBuildProject(this.buildEngine, file, this.buildProject); + this.buildProject = this.ReinitializeMsBuildProject(file); // Retrieve the list of GUIDs, if it is not specify, make it our GUID string guids = buildProject.GetPropertyValue(ProjectFileConstants.ProjectTypeGuids); @@ -168,7 +269,6 @@ protected override string ProjectTypeGuids(string file) return guids; } - private class ProjectInspector { private Microsoft.Build.Construction.ProjectRootElement xmlProj; @@ -274,531 +374,5 @@ private IProjectEvents GetProjectEventsProvider() return null; } - private string m_lastUpgradedProjectFile; - private const string SCC_PROJECT_NAME = "SccProjectName"; - private string m_sccProjectName; - private const string SCC_AUX_PATH = "SccAuxPath"; - private string m_sccAuxPath; - private const string SCC_LOCAL_PATH = "SccLocalPath"; - private string m_sccLocalPath; - private const string SCC_PROVIDER = "SccProvider"; - private string m_sccProvider; - public virtual int GetSccInfo(string projectFileName, out string sccProjectName, out string sccAuxPath, out string sccLocalPath, out string provider) - { - // we should only be asked for SCC info on a project that we have just upgraded. - if (!String.Equals(this.m_lastUpgradedProjectFile, projectFileName, StringComparison.OrdinalIgnoreCase)) - { - sccProjectName = ""; - sccAuxPath = ""; - sccLocalPath = ""; - provider = ""; - return VSConstants.E_FAIL; - } - sccProjectName = this.m_sccProjectName; - sccAuxPath = this.m_sccAuxPath; - sccLocalPath = this.m_sccLocalPath; - provider = this.m_sccProvider; - return VSConstants.S_OK; - } - - int IVsProjectUpgradeViaFactory.UpgradeProject_CheckOnly(string projectFileName, IVsUpgradeLogger upgradeLogger, out int upgradeRequired, out Guid newProjectFactory, out uint upgradeCapabilityFlags) - { - __VSPPROJECTUPGRADEVIAFACTORYREPAIRFLAGS upgradeRequiredFlag; - var hr = DoUpgradeProject_CheckOnly(projectFileName, upgradeLogger, out upgradeRequiredFlag, out newProjectFactory, out upgradeCapabilityFlags); - upgradeRequired = upgradeRequiredFlag != __VSPPROJECTUPGRADEVIAFACTORYREPAIRFLAGS.VSPUVF_PROJECT_NOREPAIR ? 1 : 0; - return hr; - } - - void IVsProjectUpgradeViaFactory4.UpgradeProject_CheckOnly(string projectFileName, IVsUpgradeLogger upgradeLogger, out uint upgradeRequired, out Guid newProjectFactory, out uint upgradeCapabilityFlags) - { - __VSPPROJECTUPGRADEVIAFACTORYREPAIRFLAGS upgradeRequiredFlag; - DoUpgradeProject_CheckOnly(projectFileName, upgradeLogger, out upgradeRequiredFlag, out newProjectFactory, out upgradeCapabilityFlags); - upgradeRequired = (uint)upgradeRequiredFlag; - } - - public virtual int DoUpgradeProject_CheckOnly(string projectFileName, IVsUpgradeLogger upgradeLogger, out __VSPPROJECTUPGRADEVIAFACTORYREPAIRFLAGS upgradeRequired, out Guid newProjectFactory, out uint upgradeCapabilityFlags) - { - newProjectFactory = GetType().GUID; - var project = ProjectRootElement.Open(projectFileName); - // enable Side-by-Side and CopyBackup support - upgradeCapabilityFlags = (uint)(__VSPPROJECTUPGRADEVIAFACTORYFLAGS.PUVFF_BACKUPSUPPORTED | __VSPPROJECTUPGRADEVIAFACTORYFLAGS.PUVFF_COPYBACKUP | __VSPPROJECTUPGRADEVIAFACTORYFLAGS.PUVFF_SXSBACKUP); - - if (this.buildEngine.GetLoadedProjects(projectFileName).Count > 0) - { - // project has already been loaded - upgradeRequired = __VSPPROJECTUPGRADEVIAFACTORYREPAIRFLAGS.VSPUVF_PROJECT_NOREPAIR; - return VSConstants.S_OK; - } - var projectInspector = new ProjectInspector(projectFileName); - if (projectInspector.IsPoisoned(Site)) - { - // poisoned project cannot be opened (does not require upgrade) - upgradeRequired = __VSPPROJECTUPGRADEVIAFACTORYREPAIRFLAGS.VSPUVF_PROJECT_NOREPAIR; - return VSConstants.S_OK; - } - - // only upgrade known tool versions. - if (string.Equals("4.0", project.ToolsVersion, StringComparison.Ordinal)) - { - // For 4.0, we need to take a deeper look. The logic is in - // vsproject\xmake\XMakeConversion\ProjectFileConverter.cs - var projectConverter = new Microsoft.Build.Conversion.ProjectFileConverter(); - projectConverter.OldProjectFile = projectFileName; - projectConverter.NewProjectFile = projectFileName; - if (projectConverter.FSharpSpecificConversions(false)) - { - upgradeRequired = - projectInspector.IsLikeDev10MinusProject() - ? __VSPPROJECTUPGRADEVIAFACTORYREPAIRFLAGS.VSPUVF_PROJECT_ONEWAYUPGRADE - : __VSPPROJECTUPGRADEVIAFACTORYREPAIRFLAGS.VSPUVF_PROJECT_SAFEREPAIR; - return VSConstants.S_OK; - } - else - { - upgradeRequired = __VSPPROJECTUPGRADEVIAFACTORYREPAIRFLAGS.VSPUVF_PROJECT_NOREPAIR; - return VSConstants.S_OK; - } - } - else - if (string.Equals("3.5", project.ToolsVersion, StringComparison.Ordinal) - || string.Equals("2.0", project.ToolsVersion, StringComparison.Ordinal)) - - { - // For 3.5 or 2.0, we always need to upgrade. - upgradeRequired = __VSPPROJECTUPGRADEVIAFACTORYREPAIRFLAGS.VSPUVF_PROJECT_ONEWAYUPGRADE; - return VSConstants.S_OK; - } - upgradeRequired = __VSPPROJECTUPGRADEVIAFACTORYREPAIRFLAGS.VSPUVF_PROJECT_NOREPAIR; - return VSConstants.S_OK; - } - - private int NormalizeUpgradeFlag(uint upgradeFlag, out __VSPPROJECTUPGRADEVIAFACTORYFLAGS flag, ref string copyLocation) - { - flag = (__VSPPROJECTUPGRADEVIAFACTORYFLAGS)upgradeFlag; - // normalize flags - switch (flag) - { - case __VSPPROJECTUPGRADEVIAFACTORYFLAGS.PUVFF_COPYBACKUP: - case __VSPPROJECTUPGRADEVIAFACTORYFLAGS.PUVFF_SXSBACKUP: - break; - default: - // ignore unknown flags - flag &= (__VSPPROJECTUPGRADEVIAFACTORYFLAGS.PUVFF_COPYBACKUP | __VSPPROJECTUPGRADEVIAFACTORYFLAGS.PUVFF_SXSBACKUP); - break; - } - - //if copy upgrade, then we need a copy location that ends in a backslash. - if (HasCopyBackupFlag(flag)) - { - if (string.IsNullOrEmpty(copyLocation) || copyLocation[copyLocation.Length - 1] != '\\') - { - if (HasSxSBackupFlag(flag)) - { - //if both SxS AND CopyBack were specified, then fall back to SxS - flag &= ~__VSPPROJECTUPGRADEVIAFACTORYFLAGS.PUVFF_COPYBACKUP; - } - else - { - //Only CopyBackup was specified and an invalid backup location was given, so bail - return VSConstants.E_INVALIDARG; - } - } - else - { - //Favor copy backup to SxS backup - flag &= ~__VSPPROJECTUPGRADEVIAFACTORYFLAGS.PUVFF_SXSBACKUP; - } - } - return VSConstants.S_OK; - } - - public virtual int UpgradeProject( - string projectFilePath, - uint upgradeFlag, - string initialCopyLocation, - out string upgradeFullyQualifiedFileName, - IVsUpgradeLogger upgradeLogger, - out int upgradeRequired, - out Guid newProjectFactory - ) - { - // initialize out params in case of failure - upgradeFullyQualifiedFileName = null; - upgradeRequired = 0; - newProjectFactory = Guid.Empty; - - __VSPPROJECTUPGRADEVIAFACTORYFLAGS flag; - string copyLocation = initialCopyLocation; - var r = NormalizeUpgradeFlag(upgradeFlag, out flag, ref copyLocation); - if (r != VSConstants.S_OK) - { - return r; - } - - string projectName = Path.GetFileNameWithoutExtension(projectFilePath); - var logger = new ProjectUpgradeLogger(upgradeLogger, projectName, projectFilePath); - - uint ignore; - ((IVsProjectUpgradeViaFactory)this).UpgradeProject_CheckOnly(projectFilePath, upgradeLogger, out upgradeRequired, out newProjectFactory, out ignore); - - // no upgrade required and not 'copy-backup' - if (upgradeRequired == 0 && !HasCopyBackupFlag(flag)) - { - //Write an informational message "No upgrade required for project foo"? - logger.LogInfo(SR.GetString(SR.ProjectConversionNotRequired)); - logger.LogInfo(SR.GetString(SR.ConversionNotRequired)); - - upgradeFullyQualifiedFileName = projectFilePath; - return VSConstants.S_OK; - } - - // upgrade is not required but backup may still be needed - - var projectFileName = Path.GetFileName(projectFilePath); - upgradeFullyQualifiedFileName = projectFilePath; - - if (HasSxSBackupFlag(flag)) - { - // for SxS call use location near the original file - copyLocation = Path.GetDirectoryName(projectFilePath); - } - - // workflow is taken from vsprjfactory.cpp (vsproject\vsproject) - // 1. convert the project (in-memory) - // 2. save SCC related info - // 3. use data stored on step 2 in GetSccInfo calls (during QueryEditFiles) - // 4. if succeeded - save project on disk - // F# doesn't use .user file so all related code is skipped - try - { - // load MSBuild project in memory: this will be needed in all cases not depending whether upgrade is required or not - // we use this project to determine the set of files to copy - ProjectRootElement convertedProject = ConvertProject(projectFilePath, logger); - if (convertedProject == null) - { - throw new ProjectUpgradeFailedException(); - } - - // OK, we need upgrade, save SCC info and ask if project file can be edited - if (upgradeRequired != 0) - { - // 2. save SCC related info - this.m_lastUpgradedProjectFile = projectFilePath; - foreach (var property in convertedProject.Properties) - { - switch (property.Name) - { - case SCC_LOCAL_PATH: - this.m_sccLocalPath = property.Value; - break; - case SCC_AUX_PATH: - this.m_sccAuxPath = property.Value; - break; - case SCC_PROVIDER: - this.m_sccProvider = property.Value; - break; - case SCC_PROJECT_NAME: - this.m_sccProjectName = property.Value; - break; - default: - break; - } - } - - // 3. Query for edit (this call may query information stored on previous step) - IVsQueryEditQuerySave2 queryEdit = site.GetService(typeof(SVsQueryEditQuerySave)) as IVsQueryEditQuerySave2; - if (queryEdit != null) - { - uint editVerdict; - uint queryEditMoreInfo; - const tagVSQueryEditFlags tagVSQueryEditFlags_QEF_AllowUnopenedProjects = (tagVSQueryEditFlags)0x80; - - int hr = queryEdit.QueryEditFiles( - (uint)(tagVSQueryEditFlags.QEF_ForceEdit_NoPrompting | tagVSQueryEditFlags.QEF_DisallowInMemoryEdits | tagVSQueryEditFlags_QEF_AllowUnopenedProjects), - 1, new[] { projectFilePath }, null, null, out editVerdict, out queryEditMoreInfo); - - if (ErrorHandler.Failed(hr)) - { - throw new ProjectUpgradeFailedException(); - } - - if (editVerdict != (uint)tagVSQueryEditResult.QER_EditOK) - { - throw new ProjectUpgradeFailedException(SR.GetString(SR.UpgradeCannotOpenProjectFileForEdit)); - } - - // If file was modified during the checkout, maybe upgrade is not needed - if ((queryEditMoreInfo & (uint)tagVSQueryEditResultFlags.QER_MaybeChanged) != 0) - { - ((IVsProjectUpgradeViaFactory)this).UpgradeProject_CheckOnly(projectFilePath, upgradeLogger, out upgradeRequired, out newProjectFactory, out ignore); - if (upgradeRequired == 0) - { - if (logger != null) - { - logger.LogInfo(SR.GetString(SR.UpgradeNoNeedToUpgradeAfterCheckout)); - } - - return VSConstants.S_OK; - } - } - } - } - - // 3.1 copy backup - BackupProjectFilesIfNeeded(projectFilePath, logger, flag, copyLocation, convertedProject); - - // 4. if we have performed upgrade - save project to disk - if (upgradeRequired != 0) - { - try - { - convertedProject.Save(projectFilePath); - } - catch (Exception ex) - { - throw new ProjectUpgradeFailedException(ex.Message, ex); - } - } - // 821083: "Converted" should NOT be localized - it is referenced in the XSLT used to display the UpgradeReport - logger.LogStatus("Converted"); - - } - catch (ProjectUpgradeFailedException ex) - { - var exception = ex.InnerException ?? ex; - - if (exception != null && !string.IsNullOrEmpty(exception.Message)) - logger.LogError(exception.Message); - - upgradeFullyQualifiedFileName = ""; - m_lastUpgradedProjectFile = null; - return VSConstants.E_FAIL; - } - return VSConstants.S_OK; - } - - private void BackupProjectFilesIfNeeded( - string projectFilePath, - ProjectUpgradeLogger logger, - __VSPPROJECTUPGRADEVIAFACTORYFLAGS flag, - string copyLocation, - ProjectRootElement convertedProject - ) - { - var projectName = Path.GetFileNameWithoutExtension(projectFilePath); - var projectFileName = Path.GetFileName(projectFilePath); - - if (HasCopyBackupFlag(flag) || HasSxSBackupFlag(flag)) - { - if (HasSxSBackupFlag(flag) && !Directory.Exists(copyLocation)) - { - Debug.Assert(false, "Env should create the directory for us"); - throw new ProjectUpgradeFailedException(); - } - - // copy project file - { - var targetFilePath = Path.Combine(copyLocation, projectFileName); - if (HasSxSBackupFlag(flag)) - { - bool ignored; - targetFilePath = GetUniqueFileName(targetFilePath + ".old", out ignored); - } - - try - { - File.Copy(projectFilePath, targetFilePath); - logger.LogInfo(SR.GetString(SR.ProjectBackupSuccessful, targetFilePath)); - } - catch (Exception ex) - { - var message = SR.GetString(SR.ErrorMakingProjectBackup, targetFilePath); - throw new ProjectUpgradeFailedException(string.Format("{0} : {1}", message, ex.Message)); - } - } - - if (HasCopyBackupFlag(flag)) - { - //Now iterate through the project items and copy them to the new location - //All projects under the solution retain its folder hierarchy - var types = new[] { "Compile", "None", "Content", "EmbeddedResource", "Resource", "BaseApplicationManifest", "ApplicationDefinition", "Page" }; - - var metadataLookup = - convertedProject - .Items - .GroupBy(i => i.ItemType) - .ToDictionary(x => x.Key); - - var sourceProjectDir = Path.GetDirectoryName(projectFilePath); - foreach (var ty in types) - { - if (metadataLookup.ContainsKey(ty)) - { - foreach (var item in metadataLookup[ty]) - { - var linkMetadataElement = item.Metadata.FirstOrDefault(me => me.Name == "Link"); - string linked = linkMetadataElement != null && !string.IsNullOrEmpty(linkMetadataElement.Value) ? linkMetadataElement.Value : null; - - var include = item.Include; - - Debug.Assert(!string.IsNullOrEmpty(include)); - - string sourceFilePath; - - var targetFileName = Path.Combine(copyLocation, linked ?? include); - - if (Path.IsPathRooted(include)) - { - //if the path is fully qualified already, then just use it - sourceFilePath = include; - } - else - { - //otherwise tack the filename on to the path - sourceFilePath = Path.Combine(sourceProjectDir, include); - } - if (linked != null && include[0] == '.') - { - //if linked file up a level (or more), then turn it into a path without the ..\ in the middle - sourceFilePath = Path.GetFullPath(sourceFilePath); - } - - bool initiallyUnique; - targetFileName = GetUniqueFileName(targetFileName, out initiallyUnique); - if (!initiallyUnique) - { - logger.LogInfo(SR.GetString(SR.BackupNameConflict, targetFileName)); - } - - //Warn user in upgrade log if linked files are used "project may not build" - if (linked != null && HasCopyBackupFlag(flag)) - { - logger.LogWarning(SR.GetString(SR.ProjectContainsLinkedFile, targetFileName)); - } - - // ensure target folder exists - Directory.CreateDirectory(Path.GetDirectoryName(targetFileName)); - - try - { - File.Copy(sourceFilePath, targetFileName); - logger.LogInfo(SR.GetString(SR.BackupSuccessful, targetFileName)); - } - catch (Exception ex) - { - var message = SR.GetString(SR.ErrorMakingBackup, targetFileName); - logger.LogError(string.Format("{0} : {1}", message, ex.Message)); - } - } - } - } - } - } - } - - /// - /// Allows to avoid repeatable checks if logger exists + provides more convinient interface - /// - private class ProjectUpgradeLogger - { - private Action<__VSUL_ERRORLEVEL, string> write; - public ProjectUpgradeLogger(IVsUpgradeLogger logger, string projectName, string projectFileName) - { - if (logger != null) - { - write = (errLevel, message) => logger.LogMessage((uint)errLevel, projectName, projectFileName, message) ; - } - else - { - write = delegate { }; - } - } - - public void LogInfo(string message) - { - write(__VSUL_ERRORLEVEL.VSUL_INFORMATIONAL, message); - } - public void LogWarning(string message) - { - write(__VSUL_ERRORLEVEL.VSUL_WARNING, message); - } - public void LogError(string message) - { - write(__VSUL_ERRORLEVEL.VSUL_ERROR, message); - } - public void LogStatus(string message) - { - write(__VSUL_ERRORLEVEL.VSUL_STATUSMSG, message); - } - } - - private class ProjectUpgradeFailedException : Exception - { - public ProjectUpgradeFailedException() : base() { } - public ProjectUpgradeFailedException(string message) : base(message) { } - public ProjectUpgradeFailedException(string message, Exception inner) : base(message, inner) { } - } - - /// - /// Performs in-memory conversion of the project with a given path - /// - /// Root element of the converted project or null if conversion failed. - private ProjectRootElement ConvertProject(string projectFileName, ProjectUpgradeLogger logger) - { - var projectConverter = new Microsoft.Build.Conversion.ProjectFileConverter(); - projectConverter.OldProjectFile = projectFileName; - projectConverter.NewProjectFile = projectFileName; - ProjectRootElement convertedProject = null; - try - { - convertedProject = projectConverter.ConvertInMemory(); - } - catch (Exception ex) - { - logger.LogInfo(ex.Message); - } - return convertedProject; - } - - /// - /// Helper for checking if flag has PUVFF_SXSBACKUP value - /// - private static bool HasSxSBackupFlag(__VSPPROJECTUPGRADEVIAFACTORYFLAGS flag) - { - return flag.HasFlag(__VSPPROJECTUPGRADEVIAFACTORYFLAGS.PUVFF_SXSBACKUP); - } - - /// - /// Helper for checking if flag has PUVFF_COPYBACKUP value - /// - private static bool HasCopyBackupFlag(__VSPPROJECTUPGRADEVIAFACTORYFLAGS flag) - { - return flag.HasFlag(__VSPPROJECTUPGRADEVIAFACTORYFLAGS.PUVFF_COPYBACKUP); - } - - /// - /// Generates unique name for the given path by appending 0..n to the file name - /// - /// Initial location - /// true if original file name was already unique, otherwise - false - /// Unique file path - private string GetUniqueFileName(string initialPath, out bool initiallyUnique) - { - initiallyUnique = true; - if (!File.Exists(initialPath)) - return initialPath; - - initiallyUnique = false; - var originalExtension = Path.GetExtension(initialPath); - var pathSansExtension = Path.Combine(Path.GetDirectoryName(initialPath), Path.GetFileNameWithoutExtension(initialPath)); - var i = 1; - while(true) - { - var f = string.Format("{0}{1}{2}", pathSansExtension, i, originalExtension); - if (!File.Exists(f)) - return f; - i++; - } - } } } diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/ProjectFileConstants.cs b/vsintegration/src/FSharp.ProjectSystem.Base/Project/ProjectFileConstants.cs index c5fdecf7e65..70eca955e74 100644 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/ProjectFileConstants.cs +++ b/vsintegration/src/FSharp.ProjectSystem.Base/Project/ProjectFileConstants.cs @@ -130,6 +130,7 @@ internal static class ProjectFileConstants public const string NoWarn = "NoWarn"; public const string TreatWarningsAsErrors = "TreatWarningsAsErrors"; public const string WarningsAsErrors = "WarningsAsErrors"; + public const string WarningsNotAsErrors = "WarningsNotAsErrors"; public const string DocumentationFile = "DocumentationFile"; public const string OtherFlags = "OtherFlags"; public const string PlatformTarget = "PlatformTarget"; diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/ProjectNode.CopyPaste.cs b/vsintegration/src/FSharp.ProjectSystem.Base/Project/ProjectNode.CopyPaste.cs index f713ce4590b..902497162bd 100644 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/ProjectNode.CopyPaste.cs +++ b/vsintegration/src/FSharp.ProjectSystem.Base/Project/ProjectNode.CopyPaste.cs @@ -39,11 +39,6 @@ public override int DragEnter(IOleDataObject pDataObject, uint grfKeyState, uint { pdwEffect = (uint)DropEffect.None; - if (this.SourceDraggedOrCutOrCopied) - { - return VSConstants.S_OK; - } - this.dropDataType = QueryDropDataType(pDataObject); if (this.dropDataType != DropDataType.None) { diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/ProjectNode.cs b/vsintegration/src/FSharp.ProjectSystem.Base/Project/ProjectNode.cs index cb21cf8f9c7..bd4bca01be8 100644 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/ProjectNode.cs +++ b/vsintegration/src/FSharp.ProjectSystem.Base/Project/ProjectNode.cs @@ -35,8 +35,6 @@ using System.Diagnostics.CodeAnalysis; using System.Linq; using Microsoft.Build.Execution; - -using Microsoft.VisualStudio.FSharp.LanguageService; using Microsoft.VisualStudio.TextManager.Interop; namespace Microsoft.VisualStudio.FSharp.ProjectSystem @@ -590,10 +588,10 @@ public enum EventTriggering /// private Dictionary catidMapping = new Dictionary(); - /// - /// The public package implementation. - /// - private ProjectPackage package; + /// + /// The public package implementation. + /// + private ProjectPackage package; private bool isDisposed; @@ -1946,17 +1944,17 @@ public virtual void Load(string fileName, string location, string name, uint fla this.ProjectMgr = this; this.isNewProject = false; - if ((flags & (uint)__VSCREATEPROJFLAGS.CPF_CLONEFILE) == (uint)__VSCREATEPROJFLAGS.CPF_CLONEFILE) - { - // we need to generate a new guid for the project - this.projectIdGuid = Guid.NewGuid(); - } - else - { - this.SetProjectGuidFromProjectFile(false); - } + if ((flags & (uint)__VSCREATEPROJFLAGS.CPF_CLONEFILE) == (uint)__VSCREATEPROJFLAGS.CPF_CLONEFILE) + { + // we need to generate a new guid for the project + this.projectIdGuid = Guid.NewGuid(); + } + else + { + this.SetProjectGuidFromProjectFile(false); + } - this.buildEngine = Utilities.InitializeMsBuildEngine(this.buildEngine); + this.buildEngine = Utilities.InitializeMsBuildEngine(this.buildEngine); // based on the passed in flags, this either reloads/loads a project, or tries to create a new one // now we create a new project... we do that by loading the template and then saving under a new name @@ -1968,7 +1966,7 @@ public virtual void Load(string fileName, string location, string name, uint fla this.isNewProject = true; // This should be a very fast operation if the build project is already initialized by the Factory. - SetBuildProject(Utilities.ReinitializeMsBuildProject(this.buildEngine, fileName, this.buildProject)); + SetBuildProject(Utilities.ReinitializeMsBuildProject(this.buildEngine, fileName, this.ProjectGlobalPropertiesThatAllProjectSystemsMustSet, this.buildProject)); // Compute the file name @@ -2182,7 +2180,7 @@ internal virtual void BuildAsync(uint vsopts, ConfigCanonicalName configCanonica /// Do the build by invoking msbuild /// [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "vsopts")] - internal virtual BuildResult Build(ConfigCanonicalName configCanonicalName, IVsOutputWindowPane output, string target) + internal virtual BuildResult Build(ConfigCanonicalName configCanonicalName, IVsOutputWindowPane output, string target, IEnumerable> extraProperties) { bool engineLogOnlyCritical = BuildPrelude(output); BuildResult result = BuildResult.FAILED; @@ -2190,7 +2188,7 @@ internal virtual BuildResult Build(ConfigCanonicalName configCanonicalName, IVsO try { this.SetBuildConfigurationProperties(configCanonicalName); - result = this.InvokeMsBuild(target); + result = this.InvokeMsBuild(target, extraProperties); } finally { @@ -2877,7 +2875,7 @@ public virtual void Reload() this.isClosed = false; this.eventTriggeringFlag = ProjectNode.EventTriggering.DoNotTriggerHierarchyEvents | ProjectNode.EventTriggering.DoNotTriggerTrackerEvents; - SetBuildProject(Utilities.ReinitializeMsBuildProject(this.buildEngine, this.filename, this.buildProject)); + SetBuildProject(Utilities.ReinitializeMsBuildProject(this.buildEngine, this.filename, this.ProjectGlobalPropertiesThatAllProjectSystemsMustSet, this.buildProject)); // Load the guid this.SetProjectGuidFromProjectFile(true); @@ -3100,20 +3098,22 @@ internal virtual BuildResult InvokeMsBuild(string target, IEnumerable ProjectGlobalPropertiesThatAllProjectSystemsMustSet { get; set; } + void SetupProjectGlobalPropertiesThatAllProjectSystemsMustSet() { // Much of the code for this method is stolen from GlobalPropertyHandler.cs. That file is dev-9 only; // whereas this code is for dev10 and specific to the actual contract for project systems in dev10. UIThread.MustBeCalledFromUIThread(); - + // Solution properties IVsSolution solution = this.Site.GetService(typeof(SVsSolution)) as IVsSolution; Debug.Assert(solution != null, "Could not retrieve the solution service from the global service provider"); - string solutionDirectory, solutionFile, userOptionsFile; + string solutionDirectory, solutionPath, userOptionsFile; // We do not want to throw. If we cannot set the solution related constants we set them to empty string. - solution.GetSolutionInfo(out solutionDirectory, out solutionFile, out userOptionsFile); + solution.GetSolutionInfo(out solutionDirectory, out solutionPath, out userOptionsFile); if (solutionDirectory == null) { @@ -3121,24 +3121,24 @@ void SetupProjectGlobalPropertiesThatAllProjectSystemsMustSet() } - if (solutionFile == null) + if (solutionPath == null) { - solutionFile = String.Empty; + solutionPath = String.Empty; } - string solutionFileName = (solutionFile.Length == 0) ? String.Empty : Path.GetFileName(solutionFile); + string solutionFileName = (solutionPath.Length == 0) ? String.Empty : Path.GetFileName(solutionPath); - string solutionName = (solutionFile.Length == 0) ? String.Empty : Path.GetFileNameWithoutExtension(solutionFile); + string solutionName = (solutionPath.Length == 0) ? String.Empty : Path.GetFileNameWithoutExtension(solutionPath); string solutionExtension = String.Empty; - if (solutionFile.Length > 0 && Path.HasExtension(solutionFile)) + if (solutionPath.Length > 0 && Path.HasExtension(solutionPath)) { - solutionExtension = Path.GetExtension(solutionFile); + solutionExtension = Path.GetExtension(solutionPath); } this.buildProject.SetGlobalProperty(GlobalProperty.SolutionDir.ToString(), solutionDirectory); - this.buildProject.SetGlobalProperty(GlobalProperty.SolutionPath.ToString(), solutionFile); + this.buildProject.SetGlobalProperty(GlobalProperty.SolutionPath.ToString(), solutionPath); this.buildProject.SetGlobalProperty(GlobalProperty.SolutionFileName.ToString(), solutionFileName); this.buildProject.SetGlobalProperty(GlobalProperty.SolutionName.ToString(), solutionName); this.buildProject.SetGlobalProperty(GlobalProperty.SolutionExt.ToString(), solutionExtension); @@ -3173,6 +3173,19 @@ void SetupProjectGlobalPropertiesThatAllProjectSystemsMustSet() } this.buildProject.SetGlobalProperty(GlobalProperty.DevEnvDir.ToString(), installDir); + + this.ProjectGlobalPropertiesThatAllProjectSystemsMustSet = new Dictionary() + { + { GlobalProperty.SolutionDir.ToString(), solutionDirectory }, + { GlobalProperty.SolutionPath.ToString(), solutionPath }, + { GlobalProperty.SolutionFileName.ToString(), solutionFileName }, + { GlobalProperty.SolutionName.ToString(), solutionName }, + { GlobalProperty.SolutionExt.ToString(), solutionExtension }, + { GlobalProperty.BuildingInsideVisualStudio.ToString(), "true" }, + { GlobalProperty.Configuration.ToString(), "" }, + { GlobalProperty.Platform.ToString(), "" }, + { GlobalProperty.DevEnvDir.ToString(), installDir } + }; } private class BuildAccessorAccess @@ -3237,12 +3250,9 @@ internal virtual BuildSubmission DoMSBuildSubmission(BuildKind buildKind, string this.SetHostObject("CoreCompile", "Fsc", this); // Do the actual Build - var loggerList = new System.Collections.Generic.List(this.buildEngine.Loggers); - if (buildLogger != null) - loggerList.Add(buildLogger); - if (myDebugLogger != null) - loggerList.Add(myDebugLogger); - + var loggerList = new System.Collections.Generic.List(); + if (buildLogger != null) loggerList.Add(buildLogger); + if (myDebugLogger != null) loggerList.Add(myDebugLogger); loggers = loggerList.ToArray(); var ba = new BuildAccessorAccess(buildKind, accessor); @@ -3277,16 +3287,9 @@ internal virtual BuildSubmission DoMSBuildSubmission(BuildKind buildKind, string projectInstance.SetProperty("UTFOutput", "true"); -#if FX_PREFERRED_UI_LANG // The CoreCLR build of FSC will use the CultureName since lcid doesn't apply very well // so that the errors reported by fsc.exe are in the right locale projectInstance.SetProperty("PREFERREDUILANG", System.Threading.Thread.CurrentThread.CurrentUICulture.Name); -#else - // When building, we need to set the flags for the fsc.exe that we spawned - // so that the errors reported by fsc.exe are in the right locale - projectInstance.SetProperty("LCID", System.Threading.Thread.CurrentThread.CurrentUICulture.LCID.ToString()); -#endif - this.BuildProject.ProjectCollection.HostServices.SetNodeAffinity(projectInstance.FullPath, NodeAffinity.InProc); BuildRequestData requestData = new BuildRequestData(projectInstance, targetsToBuild, this.BuildProject.ProjectCollection.HostServices, BuildRequestDataFlags.ReplaceExistingProjectInstance); submission = BuildManager.DefaultBuildManager.PendBuildRequest(requestData); @@ -4122,15 +4125,23 @@ internal string GetCurrentOutputAssembly() /// internal BuildResult Build(string target) { - return this.Build(new ConfigCanonicalName(), null, target); + return this.Build(new ConfigCanonicalName(), null, target, null); + } + + /// + /// Overloaded method. Invokes MSBuild using the default configuration and does without logging on the output window pane. + /// + internal BuildResult BuildWithExtraProperties(string target, IEnumerable> extraProperties) + { + return this.Build(new ConfigCanonicalName(), null, target, extraProperties); } /// /// Overloaded method. Invokes MSBuild using the default configuration. /// - internal BuildResult BuildToOutput(string target, IVsOutputWindowPane output) + internal BuildResult BuildToOutput(string target, IVsOutputWindowPane output, IEnumerable> extraProperties) { - return this.Build(new ConfigCanonicalName(), output, target); + return this.Build(new ConfigCanonicalName(), output, target, extraProperties); } /// @@ -4922,8 +4933,12 @@ internal int AddItemWithSpecific(uint itemIdLoc, VSADDITEMOPERATION op, string i if (context == AddItemContext.Paste && FindChild(file) != null) { - // if we are doing 'Paste' and source file belongs to current project - generate fresh unique name - newFileName = GenerateCopyOfFileName(baseDir, fileName); + newFileName = Path.Combine(baseDir, fileName); + if (FindChild(newFileName) != null) + { + // if we are doing 'Paste' and source file belongs to current project - generate fresh unique name + newFileName = GenerateCopyOfFileName(baseDir, fileName); + } } else if (!IsContainedWithinProjectDirectory(file)) { @@ -6515,9 +6530,15 @@ Tuple ResolveAssemblyPathInTargetFxImpl(string[] prgAssemblySpecs, ui { return new Tuple(0, VSConstants.E_FAIL); } + var projectInstance = this.buildProject.CreateProjectInstance(); - projectInstance.SetProperty("DesignTimeReference", String.Join(";", prgAssemblySpecs)); - BuildSubmission submission = DoMSBuildSubmission(BuildKind.SYNC, target, ref projectInstance, null); + var extraProperties = new KeyValuePair[] + { + new KeyValuePair("DesignTimeBuild", "true"), + new KeyValuePair("DesignTimeReference", String.Join(";", prgAssemblySpecs)) + }.AsEnumerable(); + + BuildSubmission submission = DoMSBuildSubmission(BuildKind.SYNC, target, ref projectInstance, null, extraProperties); if (submission.BuildResult.OverallResult != BuildResultCode.Success) { // can fail, e.g. if call happens during project unload/close, in which case failure is ok diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/ProjectReferenceNode.cs b/vsintegration/src/FSharp.ProjectSystem.Base/Project/ProjectReferenceNode.cs index 5223caa3f2e..e843985a16b 100644 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/ProjectReferenceNode.cs +++ b/vsintegration/src/FSharp.ProjectSystem.Base/Project/ProjectReferenceNode.cs @@ -244,7 +244,7 @@ public void DropReferencedProjectCache() /// public void CleanProjectReferenceErrorState() { - Microsoft.VisualStudio.FSharp.LanguageService.UIThread.DoOnUIThread(() => + UIThread.DoOnUIThread(() => { if (projectRefError != null) { @@ -262,7 +262,7 @@ public void CleanProjectReferenceErrorState() /// private void SetError(string text) { - Microsoft.VisualStudio.FSharp.LanguageService.UIThread.DoOnUIThread(() => + UIThread.DoOnUIThread(() => { // delete existing error if exists CleanProjectReferenceErrorState(); @@ -295,7 +295,7 @@ private void SetProjectReferencesHigherVersionWarningMessage() /// public void RefreshProjectReferenceErrorState() { - Microsoft.VisualStudio.FSharp.LanguageService.UIThread.DoOnUIThread(() => + UIThread.DoOnUIThread(() => { CleanProjectReferenceErrorState(); @@ -805,6 +805,12 @@ private static FrameworkCompatibility CheckFrameworksCompatibility(ProjectNode t return FrameworkCompatibility.Ok; } + if (String.Compare(otherFrameworkName.Identifier, ".NETStandard", StringComparison.OrdinalIgnoreCase) == 0) + { + // we always allow references to projects that are targeted to the ".NETStandard" family + return FrameworkCompatibility.Ok; + } + var myFrameworkName = GetProjectTargetFrameworkName(thisProject); if (String.Compare(otherFrameworkName.Identifier, myFrameworkName.Identifier, StringComparison.OrdinalIgnoreCase) == 0) { diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/ProjectSystem.Base.csproj b/vsintegration/src/FSharp.ProjectSystem.Base/Project/ProjectSystem.Base.csproj index 6a57d667913..5698b15ab62 100644 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/ProjectSystem.Base.csproj +++ b/vsintegration/src/FSharp.ProjectSystem.Base/Project/ProjectSystem.Base.csproj @@ -1,314 +1,76 @@  - - - $(MSBuildProjectDirectory)\..\..\..\..\src - CSharp - 11 - 3001,3002,3003,3005,3008,3009,3021,3024 - 15.4.1.0 - cs - $(VsSDKTools) - + + Library FSharp.ProjectSystem.Base - true - Debug - net40 - $(FSharpSourcesRoot)\..\$(Configuration)\$(TargetDotnetProfile)\bin - AnyCPU - {B700E38B-F8C0-4E49-B5EC-DB7B7AC0C4E7} - $(DefineConstants);CODE_ANALYSIS - true - v4.6 - $(DefineConstants);FX_PREFERRED_UI_LANG - - - true - true + false + true false - false - true - true - true - - + $(NoWarn),1570,1572,1573,1574,1591,3001,3002,3003,3005,3008,3009,3021,3024 + $(DefineConstants);CODE_ANALYSIS Microsoft.VisualStudio.FSharp.ProjectSystem + true + true + false + - - $(FSharpSourcesRoot)\..\loc\lcl\{Lang}\$(AssemblyName).dll.lcl - $(FSharpSourcesRoot)\..\loc\lci\$(AssemblyName).dll.lci - false - false - - - - - - - - - - - - - - - - - - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualFSharp.Msbuild.15.0.1.0.1\lib\net45\Microsoft.Build.Framework.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualFSharp.Msbuild.15.0.1.0.1\lib\net45\Microsoft.Build.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualFSharp.Msbuild.15.0.1.0.1\lib\net45\Microsoft.Build.Utilities.Core.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualFSharp.Msbuild.15.0.1.0.1\lib\net45\Microsoft.Build.Tasks.Core.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualFSharp.Msbuild.15.0.1.0.1\lib\net45\Microsoft.Build.Conversion.Core.dll - - - $(FSharpSourcesRoot)\..\packages\EnvDTE.8.0.1\lib\net10\EnvDTE.dll - True - - - $(FSharpSourcesRoot)\..\packages\EnvDTE80.8.0.1\lib\net10\EnvDTE80.dll - True - - - $(FSharpSourcesRoot)\..\packages\VSSDK.VSLangProj.7.0.4\lib\net20\VSLangProj.dll - True - - - $(FSharpSourcesRoot)\..\packages\VSSDK.VSLangProj.8.8.0.4\lib\net20\VSLangProj80.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Editor.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Editor.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.CoreUtility.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.CoreUtility.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Text.UI.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Text.UI.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Text.UI.Wpf.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Text.UI.Wpf.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.ComponentModelHost.15.0.26201-alpha\lib\net46\Microsoft.VisualStudio.ComponentModelHost.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.OLE.Interop.7.10.6070\lib\Microsoft.VisualStudio.OLE.Interop.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Immutable.10.0.10.0.30319\lib\net40\Microsoft.VisualStudio.Shell.Immutable.10.0.dll - ImmutableShell - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Immutable.11.0.11.0.50727\lib\net45\Microsoft.VisualStudio.Shell.Immutable.11.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.7.10.6071\lib\Microsoft.VisualStudio.Shell.Interop.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.8.0.8.0.50727\lib\Microsoft.VisualStudio.Shell.Interop.8.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.9.0.9.0.30729\lib\Microsoft.VisualStudio.Shell.Interop.9.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.10.0.10.0.30319\lib\Microsoft.VisualStudio.Shell.Interop.10.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.11.0.11.0.61030\lib\Microsoft.VisualStudio.Shell.Interop.11.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.12.0.12.0.30110\lib\Microsoft.VisualStudio.Shell.Interop.12.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.ProjectAggregator.8.0.50727\lib\net45\Microsoft.VisualStudio.ProjectAggregator.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.TextManager.Interop.7.10.6070\lib\Microsoft.VisualStudio.TextManager.Interop.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.TextManager.Interop.8.0.8.0.50727\lib\Microsoft.VisualStudio.TextManager.Interop.8.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Designer.Interfaces.1.1.4322\lib\microsoft.visualstudio.designer.interfaces.dll - - - $(FSharpSourcesRoot)\..\packages\VSSDK.VSHelp.7.0.4\lib\net20\Microsoft.VisualStudio.VSHelp.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Design.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Shell.Design.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.15.0.15.0.26201\lib\Microsoft.VisualStudio.Shell.15.0.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.14.0.14.3.25407\lib\Microsoft.VisualStudio.Shell.14.0.dll - Shell14 - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualFSharp.Microsoft.VisualStudio.Shell.UI.Internal.14.0.25420\lib\net45\Microsoft.VisualStudio.Shell.UI.Internal.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Framework.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Shell.Framework.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + Microsoft.VisualStudio.Package.Project.resources Designer - - Resources.imagelis.bmp + + + + + + + + + + + + + - - {1C5C163C-37EA-4A3C-8CCC-0D34B74BF8EF} - FSharp.LanguageService.Base - - - {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3} - FSharp.Compiler.Private - True - - - {DED3BBD7-53F4-428A-8C9F-27968E768605} - FSharp.Core - + + + + + + + + + + + + + + + - - - - + + - - - - Microsoft - StrongName - + + - \ No newline at end of file + + diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/ReferenceContainerNode.cs b/vsintegration/src/FSharp.ProjectSystem.Base/Project/ReferenceContainerNode.cs index 4beee7b4d0e..3850d0c4e0b 100644 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/ReferenceContainerNode.cs +++ b/vsintegration/src/FSharp.ProjectSystem.Base/Project/ReferenceContainerNode.cs @@ -371,7 +371,11 @@ public void LoadReferencesFromBuildProject(Microsoft.Build.Evaluation.Project bu } } - BuildResult buildResult = this.ProjectMgr.Build(MsBuildTarget.ResolveAssemblyReferences); + var extraProperties = new KeyValuePair[] + { + new KeyValuePair("DesignTimeBuild", "true"), + }.AsEnumerable(); + BuildResult buildResult = this.ProjectMgr.BuildWithExtraProperties(MsBuildTarget.ResolveAssemblyReferences, extraProperties); foreach (string referenceType in SupportedReferenceTypes) { bool isAssemblyReference = referenceType == ProjectFileConstants.Reference; diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/SecurityWarningDialog.Designer.cs b/vsintegration/src/FSharp.ProjectSystem.Base/Project/SecurityWarningDialog.Designer.cs deleted file mode 100644 index b2f7c6a8bc6..00000000000 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/SecurityWarningDialog.Designer.cs +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. - -namespace Microsoft.VisualStudio.FSharp.ProjectSystem -{ - partial class SecurityWarningDialog - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SecurityWarningDialog)); - this.warningText = new System.Windows.Forms.Label(); - this.detailsButton = new System.Windows.Forms.Button(); - this.optionBox = new System.Windows.Forms.GroupBox(); - this.loadButton = new System.Windows.Forms.RadioButton(); - this.browseButton = new System.Windows.Forms.RadioButton(); - this.loadText = new System.Windows.Forms.Label(); - this.browseText = new System.Windows.Forms.Label(); - this.askAgainCheckBox = new System.Windows.Forms.CheckBox(); - this.okButton = new System.Windows.Forms.Button(); - this.cancelButton = new System.Windows.Forms.Button(); - this.optionBox.SuspendLayout(); - this.SuspendLayout(); - // - // warningText - // - resources.ApplyResources(this.warningText, "warningText"); - this.warningText.Name = "warningText"; - // - // detailsButton - // - resources.ApplyResources(this.detailsButton, "detailsButton"); - this.detailsButton.Name = "detailsButton"; - this.detailsButton.UseVisualStyleBackColor = true; - this.detailsButton.Click += new System.EventHandler(this.detailsButton_Click); - // - // optionBox - // - this.optionBox.Controls.Add(this.loadButton); - this.optionBox.Controls.Add(this.browseButton); - this.optionBox.Controls.Add(this.loadText); - this.optionBox.Controls.Add(this.browseText); - resources.ApplyResources(this.optionBox, "optionBox"); - this.optionBox.Name = "optionBox"; - this.optionBox.TabStop = false; - // - // loadButton - // - resources.ApplyResources(this.loadButton, "loadButton"); - this.loadButton.Name = "loadButton"; - this.loadButton.TabStop = true; - this.loadButton.UseVisualStyleBackColor = true; - // - // browseButton - // - resources.ApplyResources(this.browseButton, "browseButton"); - this.browseButton.Name = "browseButton"; - this.browseButton.TabStop = true; - this.browseButton.UseVisualStyleBackColor = true; - // - // loadText - // - resources.ApplyResources(this.loadText, "loadText"); - this.loadText.Name = "loadText"; - // - // browseText - // - resources.ApplyResources(this.browseText, "browseText"); - this.browseText.Name = "browseText"; - // - // askAgainCheckBox - // - resources.ApplyResources(this.askAgainCheckBox, "askAgainCheckBox"); - this.askAgainCheckBox.Name = "askAgainCheckBox"; - this.askAgainCheckBox.UseVisualStyleBackColor = true; - // - // okButton - // - this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK; - resources.ApplyResources(this.okButton, "okButton"); - this.okButton.Name = "okButton"; - this.okButton.UseVisualStyleBackColor = true; - this.okButton.Click += new System.EventHandler(this.okButton_Click); - // - // cancelButton - // - this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; - resources.ApplyResources(this.cancelButton, "cancelButton"); - this.cancelButton.Name = "cancelButton"; - this.cancelButton.UseVisualStyleBackColor = true; - this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click); - // - // SecurityWarningDialog - // - this.AcceptButton = this.okButton; - resources.ApplyResources(this, "$this"); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.CancelButton = this.cancelButton; - this.Controls.Add(this.cancelButton); - this.Controls.Add(this.okButton); - this.Controls.Add(this.askAgainCheckBox); - this.Controls.Add(this.optionBox); - this.Controls.Add(this.detailsButton); - this.Controls.Add(this.warningText); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; - this.MaximizeBox = false; - this.MinimizeBox = false; - this.Name = "SecurityWarningDialog"; - this.ShowInTaskbar = false; - this.optionBox.ResumeLayout(false); - this.optionBox.PerformLayout(); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.Label warningText; - private System.Windows.Forms.Button detailsButton; - private System.Windows.Forms.GroupBox optionBox; - private System.Windows.Forms.Label browseText; - private System.Windows.Forms.Label loadText; - private System.Windows.Forms.RadioButton browseButton; - private System.Windows.Forms.RadioButton loadButton; - private System.Windows.Forms.CheckBox askAgainCheckBox; - private System.Windows.Forms.Button okButton; - private System.Windows.Forms.Button cancelButton; - } -} diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/SecurityWarningDialog.cs b/vsintegration/src/FSharp.ProjectSystem.Base/Project/SecurityWarningDialog.cs deleted file mode 100644 index a7e38957564..00000000000 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/SecurityWarningDialog.cs +++ /dev/null @@ -1,214 +0,0 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. - -namespace Microsoft.VisualStudio.FSharp.ProjectSystem -{ - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.Data; - using System.Drawing; - using System.Text; - using System.Windows.Forms; - using System.IO; - using Microsoft.VisualStudio.Shell.Interop; - using System.Globalization; - using Microsoft.VisualStudio.Shell; - using System.Windows.Forms.Design; - - internal partial class SecurityWarningDialog: Form - { - #region fields - /// - /// The associated service provider - /// - private IServiceProvider serviceProvider; - - /// - /// The dialog message to be presented when the 'More' button is pressed. - /// - private string dialogMessage; - - /// - /// Teh full path to teh project. - /// - private string projectFullPath; - - /// - /// The value of the ask again check box. - /// - private bool askAgainCheckBoxValue; - - /// - /// The project load option the userwill choose on this form. - /// - private ProjectLoadOption projectLoadOption = ProjectLoadOption.DonNotLoad; - #endregion - - #region properties - /// - /// The value of the ask again check box. - /// - /*internal, but public for FSharp.Project.dll*/ public bool AskAgainCheckBoxValue - { - get - { - return this.askAgainCheckBoxValue; - } - } - - /// - /// The project load option the user has chosen to perform. - /// - internal ProjectLoadOption ProjectLoadOption - { - get - { - return this.projectLoadOption; - } - } - #endregion - - #region ctors - /// - /// Overloaded ctor. - /// - /// The associated service provider. - /// The message that will be shown when the 'More' button is pressed. - /// The full path of the project. - public SecurityWarningDialog(IServiceProvider serviceProvider, string dialogMessage, string projectFullpath) - { - if (serviceProvider == null) - { - throw new ArgumentNullException("serviceProvider"); - } - - if (String.IsNullOrEmpty(projectFullpath)) - { - throw new ArgumentException(SR.GetString(SR.ParameterCannotBeNullOrEmpty, CultureInfo.CurrentUICulture), "projectFullpath"); - } - - this.serviceProvider = serviceProvider; - - this.projectFullPath = projectFullpath; - - this.dialogMessage = dialogMessage; - - this.InitializeComponent(); - - this.SetupComponents(); - } - #endregion - - #region helpers - /// - /// Shows the dialog if possible hosted by the IUIService. - /// - /// A DialogResult - /*internal, but public for FSharp.Project.dll*/ public new DialogResult ShowDialog() - { - IUIService uiService = this.serviceProvider.GetService(typeof(IUIService)) as IUIService; - if (uiService == null) - { - return this.ShowDialog(); - } - - return uiService.ShowDialog(this); - } - - /// - /// Sets up the different UI elements. - /// - private void SetupComponents() - { - // Get the project name. - string projectFileName = Path.GetFileName(this.projectFullPath); - string projectName = Path.GetFileNameWithoutExtension(this.projectFullPath); - - IVsUIShell shell = this.serviceProvider.GetService(typeof(SVsUIShell)) as IVsUIShell; - - if (shell == null) - { - throw new InvalidOperationException(); - } - - String applicationName; - - // Get the name of the SKU. - shell.GetAppName(out applicationName); - - // Set the dialog box caption (title). - this.Text = String.Format(CultureInfo.CurrentCulture, this.Text, projectName); - - // Set the text at the top of the dialog that gives a brief description of the security - // implications of loading this project. - this.warningText.Text = String.Format(CultureInfo.CurrentCulture, this.warningText.Text, projectName, applicationName); - - // Set the text that describes the "Browse" option. - this.browseText.Text = String.Format(CultureInfo.CurrentCulture, this.browseText.Text, applicationName); - - // Set the text that describes the "Load" option. - this.loadText.Text = String.Format(CultureInfo.CurrentCulture, this.loadText.Text, applicationName); - - // The default selection is "Browse" so select that radio button. - this.browseButton.Checked = true; - - // Turn on the "Ask me always" checkbox by default. - this.askAgainCheckBox.Checked = true; - - // Set the focus to the Browse button, so hitting Enter will press the OK button - this.browseButton.Focus(); - - this.CenterToScreen(); - } - - /// - /// The Cancel button was clicked. - /// - /// The sender of the event - /// An event arg Associated to the event. - private void cancelButton_Click(object sender, EventArgs e) - { - // In case the user presses the Cancel button, we assume he never wants to see this dialog again - // and pretend the "Ask me every time" checkbox is unchecked even if it is really checked. - this.askAgainCheckBoxValue = false; - this.projectLoadOption = ProjectLoadOption.DonNotLoad; - } - - /// - /// The OK button was clicked. - /// - /// The sender of the event - /// An event arg Associated to the event. - private void okButton_Click(object sender, EventArgs e) - { - if (this.browseButton.Checked && !this.loadButton.Checked) - { - this.projectLoadOption = ProjectLoadOption.LoadOnlyForBrowsing; - } - else - { - this.projectLoadOption = ProjectLoadOption.LoadNormally; - } - - this.askAgainCheckBoxValue = this.askAgainCheckBox.Checked; - - this.Close(); - } - - /// - /// Loads a messagebox explaining in detail the security problem - /// - /// The sender of the event - /// An event arg Associated to the event. - private void detailsButton_Click(object sender, EventArgs e) - { - string title = null; - OLEMSGICON icon = OLEMSGICON.OLEMSGICON_INFO; - OLEMSGBUTTON buttons = OLEMSGBUTTON.OLEMSGBUTTON_OK; - OLEMSGDEFBUTTON defaultButton = OLEMSGDEFBUTTON.OLEMSGDEFBUTTON_FIRST; - VsShellUtilities.ShowMessageBox(this.serviceProvider, title, this.dialogMessage, icon, buttons, defaultButton); - } - - #endregion - } -} diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/SecurityWarningDialog.resx b/vsintegration/src/FSharp.ProjectSystem.Base/Project/SecurityWarningDialog.resx deleted file mode 100644 index be768102725..00000000000 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/SecurityWarningDialog.resx +++ /dev/null @@ -1,450 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - - Microsoft Sans Serif, 8.25pt - - - 7, 7 - - - 488, 39 - - - - 0 - - - The {0} project file has been customized and could present a security risk by executing custom build steps when opened in {1}. If this project came from an untrustworthy source, it could cause damage to your computer or compromise your private information. - - - warningText - - - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 5 - - - Microsoft Sans Serif, 8.25pt - - - 12, 65 - - - 74, 23 - - - 1 - - - &More Details - - - detailsButton - - - System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 4 - - - loadButton - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - optionBox - - - 0 - - - browseButton - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - optionBox - - - 1 - - - loadText - - - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - optionBox - - - 2 - - - browseText - - - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - optionBox - - - 3 - - - Microsoft Sans Serif, 8.25pt - - - 10, 103 - - - 488, 176 - - - 2 - - - Project load options - - - optionBox - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 3 - - - True - - - 6, 100 - - - 125, 17 - - - 3 - - - &Load project normally - - - loadButton - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - optionBox - - - 0 - - - True - - - 6, 20 - - - 144, 17 - - - 2 - - - Load project for &browsing - - - browseButton - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - optionBox - - - 1 - - - 20, 120 - - - 462, 53 - - - 1 - - - Opens the project normally in {0}. Use this option if you trust the source and understand the potential risks involved. {0} does not restrict any project functionality and will not prompt you again for this project. - - - loadText - - - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - optionBox - - - 2 - - - 20, 40 - - - 454, 47 - - - 0 - - - Opens the project in {0} with increased security. This option allows you to browse the contents of the project, but some functionality, such as IntelliSense, is restricted. When a project is loaded for browsing, actions such as building, cleaning, publishing, or opening designers could still remain unsafe. - - - browseText - - - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - optionBox - - - 3 - - - True - - - 10, 295 - - - 209, 17 - - - 3 - - - &Ask me for every project in this solution - - - askAgainCheckBox - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 2 - - - 327, 328 - - - 75, 23 - - - 4 - - - OK - - - okButton - - - System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 1 - - - 420, 328 - - - 75, 23 - - - 5 - - - Cancel - - - cancelButton - - - System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 0 - - - True - - - 6, 13 - - - 507, 363 - - - Microsoft Sans Serif, 8.25pt - - - Security Warning for {0} - - - SecurityWarningDialog - - - System.Windows.Forms.Form, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/TextViewCreationListener.cs b/vsintegration/src/FSharp.ProjectSystem.Base/Project/TextViewCreationListener.cs deleted file mode 100644 index c0b443475bd..00000000000 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/TextViewCreationListener.cs +++ /dev/null @@ -1,84 +0,0 @@ -using Microsoft.VisualStudio.Editor; -using Microsoft.VisualStudio.Utilities; -using System; -using System.Collections.Generic; -using System.ComponentModel.Composition; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Microsoft.VisualStudio.TextManager.Interop; -using System.Runtime.InteropServices; -using Microsoft.VisualStudio.Shell.Interop; -using Microsoft.VisualStudio.OLE.Interop; -using Microsoft.VisualStudio.Text.Editor; - -namespace Microsoft.VisualStudio.FSharp.ProjectSystem -{ - [Export(typeof(IVsTextViewCreationListener))] - [ContentType(Constants.FSharpContentType)] - [TextViewRole(PredefinedTextViewRoles.Editable)] - public class TextViewCreationListener : IVsTextViewCreationListener - { - internal readonly IVsEditorAdaptersFactoryService _adaptersFactory; - - [ImportingConstructor] - public TextViewCreationListener(IVsEditorAdaptersFactoryService adaptersFactory) - { - _adaptersFactory = adaptersFactory; - } - - public void VsTextViewCreated(IVsTextView textViewAdapter) - { - var textView = _adaptersFactory.GetWpfTextView(textViewAdapter); - InitKeyBindings(textViewAdapter); - } - - /// - /// The initializes the pguidCmdUI to an empty Guid. This means that our buffer does not receive the normal text editor command bindings. - /// In order to handle this, we tell the IVsWindowFrame in which our editor lives to inherit the keybindinds from the text editor factory. - /// This allows us to specify the TextEditor keybindings at a lower priority than our F# Editor Factory keybindings and allows us to handle Alt+Enter - /// - public void InitKeyBindings(IVsTextView vsTextView) - { - var os = vsTextView as IObjectWithSite; - if (os == null) - { - return; - } - - IntPtr unkSite = IntPtr.Zero; - IntPtr unkFrame = IntPtr.Zero; - - try - { - os.GetSite(typeof(VisualStudio.OLE.Interop.IServiceProvider).GUID, out unkSite); - var sp = Marshal.GetObjectForIUnknown(unkSite) as VisualStudio.OLE.Interop.IServiceProvider; - - sp.QueryService(typeof(SVsWindowFrame).GUID, typeof(IVsWindowFrame).GUID, out unkFrame); - - //When calling Peek Definition, the editor creates an IVsTextView within another view. - //Therefore this new view won't exist as the direct child of an IVsWindowFrame and we will return. - //We don't need to worry about inheriting key bindings in this situation, because the - //parent IVsTextView will have already set this value during its creation. - if(unkFrame == IntPtr.Zero) - { - return; - } - - var frame = Marshal.GetObjectForIUnknown(unkFrame) as IVsWindowFrame; - frame.SetGuidProperty((int)__VSFPROPID.VSFPROPID_InheritKeyBindings, VSConstants.GUID_TextEditorFactory); - } - finally - { - if (unkSite != IntPtr.Zero) - { - Marshal.Release(unkSite); - } - if (unkFrame != IntPtr.Zero) - { - Marshal.Release(unkFrame); - } - } - } - } -} diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/UIThread.cs b/vsintegration/src/FSharp.ProjectSystem.Base/Project/UIThread.cs new file mode 100644 index 00000000000..e35eccd1318 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.Base/Project/UIThread.cs @@ -0,0 +1,232 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +using System; +using System.Runtime.InteropServices; +using System.Xml; +using System.Collections; +using System.Collections.Generic; +using System.Threading; +using System.IO; +using System.Text; +using System.Drawing; +using System.Windows.Forms; +using System.Diagnostics; +using Microsoft.VisualStudio.Shell.Interop; +using Microsoft.VisualStudio.OLE.Interop; +using Microsoft.VisualStudio.TextManager.Interop; +using Microsoft.VisualStudio.Threading; +using Microsoft.VisualStudio.Shell; +using IOleServiceProvider = Microsoft.VisualStudio.OLE.Interop.IServiceProvider; +using IServiceProvider = System.IServiceProvider; +using VsShell = Microsoft.VisualStudio.Shell.VsShellUtilities; +using System.Diagnostics.CodeAnalysis; + +namespace Microsoft.VisualStudio.FSharp.ProjectSystem +{ + internal static class UIThread + { + static SynchronizationContext ctxt; + static bool isUnitTestingMode = false; +#if DEBUG + static StackTrace captureStackTrace; // stack trace when ctxt was captured + static Thread uithread; +#endif + public static SynchronizationContext TheSynchronizationContext + { + get + { + Debug.Assert(ctxt != null, "Tried to get TheSynchronizationContext before it was captured"); + return ctxt; + } + } + + public static void InitUnitTestingMode() + { + Debug.Assert(ctxt == null, "Context has already been captured; too late to InitUnitTestingMode"); + isUnitTestingMode = true; + } + + [Conditional("DEBUG")] + public static void MustBeCalledFromUIThread() + { +#if DEBUG + Debug.Assert(uithread == System.Threading.Thread.CurrentThread || isUnitTestingMode, "This must be called from the GUI thread"); +#endif + } + public static void CaptureSynchronizationContext() + { + if (isUnitTestingMode) return; +#if DEBUG + uithread = System.Threading.Thread.CurrentThread; +#endif + + if (ctxt == null) + { +#if DEBUG + // This is a handy place to do this, since the product and all interesting unit tests + // must go through this code path. + AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(delegate (object sender, UnhandledExceptionEventArgs args) + { + if (args.IsTerminating) + { + string s = String.Format("An unhandled exception is about to terminate the process. Exception info:\n{0}", args.ExceptionObject.ToString()); + Debug.Assert(false, s); + } + }); + captureStackTrace = new StackTrace(true); +#endif + ctxt = new WindowsFormsSynchronizationContext(); + } + else + { +#if DEBUG + // Make sure we are always capturing the same thread. + Debug.Assert(uithread == Thread.CurrentThread); +#endif + } + } + private static readonly Queue ourUIQueue = new Queue(); + private static bool ourIsReentrancy; + + // Runs the action on UI thread. Prevents from reentracy. + public static void Run(Action action) + { + if (isUnitTestingMode) + { + action(); + return; + } + Debug.Assert(ctxt != null, "The SynchronizationContext must be captured before calling this method"); +#if DEBUG + StackTrace stackTrace = new StackTrace(true); +#endif + ctxt.Post(delegate (object ignore) + { + UIThread.MustBeCalledFromUIThread(); + ourUIQueue.Enqueue(action); + if (ourIsReentrancy) return; + ourIsReentrancy = true; + try + { + while (ourUIQueue.Count > 0) + { + try + { + var a = ourUIQueue.Dequeue(); + a(); + } +#if DEBUG + catch (Exception e) + { + // swallow, random exceptions should not kill process + Debug.Assert(false, string.Format("UIThread.Run caught and swallowed exception: {0}\n\noriginally invoked from stack:\n{1}", e.ToString(), stackTrace.ToString())); + } +#else + catch (Exception) { + // swallow, random exceptions should not kill process + } +#endif + + } + } + finally + { + ourIsReentrancy = false; + } + }, null); + + } + + /// + /// RunSync puts orignal exception stacktrace to Exception.Data by this key if action throws on UI thread + /// + /// WrappedStacktraceKey is a string to keep exception serializable. + public static readonly string WrappedStacktraceKey = "$$Microsoft.VisualStudio.Package.UIThread.WrappedStacktraceKey$$"; + + public static void RunSync(Action a) + { + if (isUnitTestingMode) + { + a(); + return; + } + Exception exn = null; + Debug.Assert(ctxt != null, "The SynchronizationContext must be captured before calling this method"); + // Send on UI thread will execute immediately. + ctxt.Send(ignore => + { + try + { + UIThread.MustBeCalledFromUIThread(); + a(); + } + catch (Exception e) + { + exn = e; + } + }, null + ); + if (exn != null) + { + // throw exception on calling thread, preserve stacktrace + if (!exn.Data.Contains(WrappedStacktraceKey)) exn.Data[WrappedStacktraceKey] = exn.StackTrace; + throw exn; + } + } + + /// + /// Local JoinableTaskContext + /// ensuring non-reentrancy. + /// + private static JoinableTaskContext jtc = null; + private static JoinableTaskFactory JTF + { + get + { + if (jtc == null) + { + JoinableTaskContext j = null; + if (VsTaskLibraryHelper.ServiceInstance == null) + { + j = new JoinableTaskContext(); + } + else + { + j = ThreadHelper.JoinableTaskContext; + } + Interlocked.CompareExchange(ref jtc, j, null); + } + + return jtc.Factory; + } + } + + /// + /// Performs a callback on the UI thread and blocks until it is done, using the VS mechanism for + /// ensuring non-reentrancy. + /// + [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")] + internal static T DoOnUIThread(Func callback) + { + return JTF.Run(async delegate + { + await JTF.SwitchToMainThreadAsync(); + return callback(); + }); + } + + /// + /// Performs a callback on the UI thread and blocks until it is done, using the VS mechanism for + /// ensuring non-reentrancy. + /// + [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")] + internal static void DoOnUIThread(Action callback) + { + JTF.Run(async delegate + { + await JTF.SwitchToMainThreadAsync(); + callback(); + }); + } + } +} \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/Utilities.cs b/vsintegration/src/FSharp.ProjectSystem.Base/Project/Utilities.cs index 7ad501608ad..b638c4c69fb 100644 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/Utilities.cs +++ b/vsintegration/src/FSharp.ProjectSystem.Base/Project/Utilities.cs @@ -719,7 +719,7 @@ public static string SetStringValueFromConvertedEnum(T enumValue, CultureInfo /// The build engine to use to create a build project. /// The full path of the project. /// A loaded msbuild project. - public static Microsoft.Build.Evaluation.Project InitializeMsBuildProject(Microsoft.Build.Evaluation.ProjectCollection buildEngine, string fullProjectPath) + public static Microsoft.Build.Evaluation.Project InitializeMsBuildProject(Microsoft.Build.Evaluation.ProjectCollection buildEngine, string fullProjectPath, IDictionary globalProperties) { if (buildEngine == null) { @@ -738,7 +738,11 @@ public static Microsoft.Build.Evaluation.Project InitializeMsBuildProject(Micros if (buildProject == null) { - buildProject = buildEngine.LoadProject(fullProjectPath); + var lclGlobalProperties = (null == globalProperties) ? new Dictionary() : new Dictionary(globalProperties) + { + { "FSharpCompilerPath", Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) } + }; + buildProject = buildEngine.LoadProject(fullProjectPath, lclGlobalProperties, null); buildProject.IsBuildEnabled = true; } @@ -752,7 +756,7 @@ public static Microsoft.Build.Evaluation.Project InitializeMsBuildProject(Micros /// The full path of the project. /// An Existing build project that will be reloaded. /// A loaded msbuild project. - public static Microsoft.Build.Evaluation.Project ReinitializeMsBuildProject(Microsoft.Build.Evaluation.ProjectCollection buildEngine, string fullProjectPath, Microsoft.Build.Evaluation.Project exitingBuildProject) + public static Microsoft.Build.Evaluation.Project ReinitializeMsBuildProject(Microsoft.Build.Evaluation.ProjectCollection buildEngine, string fullProjectPath, IDictionary globalProperties, Microsoft.Build.Evaluation.Project exitingBuildProject) { // If we have a build project that has been loaded with another file unload it. try @@ -768,7 +772,7 @@ public static Microsoft.Build.Evaluation.Project ReinitializeMsBuildProject(Micr { } - return Utilities.InitializeMsBuildProject(buildEngine, fullProjectPath); + return Utilities.InitializeMsBuildProject(buildEngine, fullProjectPath, globalProperties); } public static Microsoft.Build.Evaluation.ProjectCollection InitializeMsBuildEngine(Microsoft.Build.Evaluation.ProjectCollection existingEngine) @@ -849,7 +853,7 @@ private static bool IsFilePartInValid(string filePart) { extension = Path.GetExtension(filePart); } - // We catch the ArgumentException because we want this method to return true if the filename is not valid. FilePart could be for example #&%"&"% and that would throw ArgumentException on GetExtension + // We catch the ArgumentException because we want this method to return true if the filename is not valid. FilePart could be for example #�&%"�&"% and that would throw ArgumentException on GetExtension catch (ArgumentException) { return true; diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/Web/CodeBehindCodeGenerator.cs b/vsintegration/src/FSharp.ProjectSystem.Base/Project/Web/CodeBehindCodeGenerator.cs deleted file mode 100644 index c35120aadd9..00000000000 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/Web/CodeBehindCodeGenerator.cs +++ /dev/null @@ -1,861 +0,0 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. - -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.Design; -using System.CodeDom; -using System.CodeDom.Compiler; -using System.Diagnostics; -using System.IO; -using System.Text; -using System.Globalization; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; -using EnvDTE; -using EnvDTE80; -using Microsoft.VisualStudio.Designer.Interfaces; -using Microsoft.VisualStudio.Shell; -using Microsoft.VisualStudio.Shell.Interop; -using Microsoft.VisualStudio.Shell.Design; -using Microsoft.VisualStudio.Shell.Design.Serialization; - -using IServiceProvider = System.IServiceProvider; -using IOleServiceProvider = Microsoft.VisualStudio.OLE.Interop.IServiceProvider; -using IVsCodeBehindCodeGenerator = Microsoft.VisualStudio.Web.Application.IVsCodeBehindCodeGenerator; - -namespace Microsoft.VisualStudio.FSharp.ProjectSystem.Web -{ - [ComVisible(true)] - internal class CodeBehindCodeGenerator : IVsCodeBehindCodeGenerator - { - private ServiceProvider _serviceProvider; - private IVsHierarchy _hierarchy; - private CodeGeneratorOptions _codeGeneratorOptions; - - // Generate state - private VsHierarchyItem _itemCode; - private VsHierarchyItem _itemDesigner; - private CodeDomProvider _codeDomProvider; - private CodeCompileUnit _ccu; - private CodeTypeDeclaration _ctd; - private bool _create; - private bool _isPartialClassDisabled; - private FieldDataDictionary _codeFields; - private FieldDataDictionary _designerFields; - private string _className_Full; - private string _className_Namespace; - private string _className_Name; - - ///------------------------------------------------------------------------------------------------------------- - /// - /// Constructor - /// - ///------------------------------------------------------------------------------------------------------------- - public CodeBehindCodeGenerator() - { - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// Finalizer - /// - ///------------------------------------------------------------------------------------------------------------- - ~CodeBehindCodeGenerator() - { - Debug.Fail("CodeBehindCodeGenerator was not disposed."); - Dispose(); - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// Initializes the generator state. - /// - ///------------------------------------------------------------------------------------------------------------- - void IVsCodeBehindCodeGenerator.Initialize(IVsHierarchy hierarchy) - { - IOleServiceProvider serviceProvider = null; - _hierarchy = hierarchy; - _hierarchy.GetSite(out serviceProvider); - _serviceProvider = new ServiceProvider(serviceProvider); - _codeGeneratorOptions = new CodeGeneratorOptions(); - _codeGeneratorOptions.BlankLinesBetweenMembers = false; - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// Cleans up state. - /// - ///------------------------------------------------------------------------------------------------------------- - void IVsCodeBehindCodeGenerator.Close() - { - Dispose(); - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// Cleans up member state. - /// - ///------------------------------------------------------------------------------------------------------------- - public virtual void Dispose() - { - if (_serviceProvider != null) - { - _serviceProvider.Dispose(); - _serviceProvider = null; - } - - _hierarchy = null; - _codeGeneratorOptions = null; - - DisposeGenerateState(); - - GC.SuppressFinalize(this); - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// Cleans up Generate member state. - /// - ///------------------------------------------------------------------------------------------------------------- - public /*protected, but public for FSharp.Project.dll*/ virtual void DisposeGenerateState() - { - try - { - _itemCode = null; - _itemDesigner = null; - _ccu = null; - _ctd = null; - _create = false; - _codeFields = null; - _designerFields = null; - _className_Full = null; - _className_Namespace = null; - _className_Name = null; - - if (_codeDomProvider != null) - { - _codeDomProvider.Dispose(); - _codeDomProvider = null; - } - } - catch - { - } - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// The full class name currently generating for - /// - ///------------------------------------------------------------------------------------------------------------- - public /*protected, but public for FSharp.Project.dll*/ string ClassName_Full - { - get - { - return _className_Full; - } - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// The class namespace currently generating for - /// - ///------------------------------------------------------------------------------------------------------------- - public /*protected, but public for FSharp.Project.dll*/ string ClassName_Namespace - { - get - { - return _className_Namespace; - } - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// The class name currently generating for - /// - ///------------------------------------------------------------------------------------------------------------- - public /*protected, but public for FSharp.Project.dll*/ string ClassName_Name - { - get - { - return _className_Name; - } - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// The code behind item - /// - ///------------------------------------------------------------------------------------------------------------- - public /*protected, but public for FSharp.Project.dll*/ VsHierarchyItem ItemCode - { - get - { - return _itemCode; - } - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// Languages that do NOT support partial class in a .designer file should disable partial classes - /// using this property. - /// - ///------------------------------------------------------------------------------------------------------------- - public /*protected, but public for FSharp.Project.dll*/ bool IsPartialClassDisabled - { - get - { - return _isPartialClassDisabled; - } - set - { - _isPartialClassDisabled = value; - } - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// Create CodeDomProvider for the language of the file - /// - ///------------------------------------------------------------------------------------------------------------- - public /*protected, but public for FSharp.Project.dll*/ virtual CodeDomProvider CreateCodeDomProvider(uint itemid) - { - Microsoft.VisualStudio.OLE.Interop.IServiceProvider oleServiceProvider; - ErrorHandler.ThrowOnFailure(((IVsProject)this._hierarchy).GetItemContext(itemid, out oleServiceProvider)); - ServiceProvider serviceProvider = new ServiceProvider(oleServiceProvider); - IVSMDCodeDomProvider provider = serviceProvider.GetService(typeof(SVSMDCodeDomProvider)) as IVSMDCodeDomProvider; - CodeDomProvider codeDomProvider = null; - if (provider != null) - { - codeDomProvider = provider.CodeDomProvider as CodeDomProvider; - } - - Debug.Assert(codeDomProvider!=null, "Failed to create CodeDomProvider"); - return codeDomProvider; - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// Returns public field names in dictionary - /// - ///------------------------------------------------------------------------------------------------------------- - public /*protected, but public for FSharp.Project.dll*/ FieldDataDictionary GetFieldNames(string[] publicFields, bool caseSensitive) - { - FieldDataDictionary fields = null; - - if (publicFields != null) - { - foreach (string name in publicFields) - { - if (!string.IsNullOrEmpty(name)) - { - FieldData field = new FieldData(name); - - if (field != null) - { - if (fields == null) - { - fields = new FieldDataDictionary(caseSensitive); - } - - try - { - if (!fields.ContainsKey(field.Name)) - { - fields.Add(field.Name, field); - } - } - catch - { - } - } - } - } - } - - return fields; - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// Returns field names in the specified class using code model. - /// If publicOnly is true only public fields are returned. - /// - ///------------------------------------------------------------------------------------------------------------- - public /*protected, but public for FSharp.Project.dll*/ FieldDataDictionary GetFieldNames(VsHierarchyItem itemCode, string className, bool caseSensitive, bool onlyBaseClasses, int maxDepth) - { - FieldDataDictionary fields = null; - - if (itemCode != null) - { - CodeClass codeClass = FindClass(itemCode, className); - if (codeClass != null) - { - GetFieldNames(codeClass, caseSensitive, onlyBaseClasses, 0, maxDepth, ref fields); - } - } - - return fields; - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// Returns field names in the specified class using code model. - /// If publicOnly is true only public fields are returned. - /// - ///------------------------------------------------------------------------------------------------------------- - public /*protected, but public for FSharp.Project.dll*/ void GetFieldNames(CodeClass codeClass, bool caseSensitive, bool onlyBaseClasses, int depth, int maxDepth, ref FieldDataDictionary fields) - { - if (codeClass != null && depth <= maxDepth) - { - if (!(onlyBaseClasses && depth == 0)) - { - foreach (CodeElement codeElement in codeClass.Members) - { - //vsCMElement kind = codeElement.Kind; //vsCMElementVariable - CodeVariable codeVariable = codeElement as CodeVariable; - if (codeVariable != null) - { - FieldData field = new FieldData(codeClass, codeVariable, depth); - - if (field != null && !string.IsNullOrEmpty(field.Name)) - { - if (fields == null) - { - fields = new FieldDataDictionary(caseSensitive); - } - - try - { - if (!fields.ContainsKey(field.Name)) - { - fields.Add(field.Name, field); - } - } - catch - { - } - } - } - } - } - - foreach (CodeElement baseCodeElement in codeClass.Bases) - { - CodeClass baseCodeClass = baseCodeElement as CodeClass; - if (baseCodeClass != null) - { - CodeElements partCodeElements = null; - CodeClass2 baseCodeClass2 = baseCodeClass as CodeClass2; - if (baseCodeClass2 != null) - { - vsCMClassKind classKind = baseCodeClass2.ClassKind; - if ((classKind | vsCMClassKind.vsCMClassKindPartialClass) == vsCMClassKind.vsCMClassKindPartialClass) - { - try - { - partCodeElements = baseCodeClass2.Parts; - } - catch - { - } - } - } - - if (partCodeElements != null && partCodeElements.Count > 1) - { - foreach (CodeElement partCodeElement in partCodeElements) - { - CodeClass partCodeClass = partCodeElement as CodeClass; - if (partCodeClass != null) - { - GetFieldNames(partCodeClass, caseSensitive, onlyBaseClasses, depth + 1, maxDepth, ref fields); - } - } - } - else - { - GetFieldNames(baseCodeClass, caseSensitive, onlyBaseClasses, depth + 1, maxDepth, ref fields); - } - } - } - } - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// Locates the code model CodeClass - /// - ///------------------------------------------------------------------------------------------------------------- - public /*protected, but public for FSharp.Project.dll*/ virtual CodeClass FindClass(VsHierarchyItem item, string className) - { - if (item != null) - { - try - { - ProjectItem projectItem = item.ProjectItem(); - if (projectItem != null) - { - FileCodeModel fileCodeModel = projectItem.FileCodeModel; - if (fileCodeModel != null) - { - return FindClass(fileCodeModel.CodeElements, className); - } - } - } - catch - { - } - } - return null; - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// Recursively searches the CodeElements for the specified class - /// - ///------------------------------------------------------------------------------------------------------------- - public /*protected, but public for FSharp.Project.dll*/ virtual CodeClass FindClass(CodeElements codeElements, string className) - { - if (codeElements != null && !string.IsNullOrEmpty(className)) - { - foreach (CodeElement codeElement in codeElements) - { - vsCMElement kind = codeElement.Kind; - if (kind == vsCMElement.vsCMElementClass) - { - CodeClass codeClass = codeElement as CodeClass; - if (codeClass != null && string.Compare(codeClass.FullName, className, StringComparison.Ordinal) == 0) - { - return codeClass; - } - } - else if (kind == vsCMElement.vsCMElementNamespace) - { - EnvDTE.CodeNamespace codeNamespace = codeElement as EnvDTE.CodeNamespace; - if (codeNamespace != null) - { - CodeClass codeClass = FindClass(codeNamespace.Children, className); - if (codeClass != null) - { - return codeClass; - } - } - } - } - } - return null; - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// Gets a VshierarchyItem for the designer file if possible. - /// Will create new file if specified and not existing. - /// - ///------------------------------------------------------------------------------------------------------------- - public /*protected, but public for FSharp.Project.dll*/ virtual VsHierarchyItem GetDesignerItem(VsHierarchyItem itemCode, bool create) - { - VsHierarchyItem itemDesigner = null; - - if (itemCode != null) - { - // Calculate codebehind and designer file paths - string codeBehindFile = itemCode.FullPath(); - string designerFile = null; - if (_isPartialClassDisabled) - { - designerFile = codeBehindFile; - } - else if (!string.IsNullOrEmpty(codeBehindFile)) - { - designerFile = codeBehindFile.Insert(codeBehindFile.LastIndexOf("."), ".designer"); - } - - // Try to locate existing designer file - if (!string.IsNullOrEmpty(designerFile)) - { - itemDesigner = VsHierarchyItem.CreateFromMoniker(designerFile, _hierarchy); - if (itemDesigner != null) - { - return itemDesigner; - } - } - - // Create empty designer file if requested - if (create && !string.IsNullOrEmpty(designerFile)) - { - ProjectItem projectItemCode = itemCode.ProjectItem(); - if (projectItemCode != null) - { - ProjectItems projectItems = projectItemCode.Collection; - if (projectItems != null) - { - try - { - using (StreamWriter sw = File.CreateText(designerFile)) - { - sw.WriteLine(" "); - } - - projectItems.AddFromFileCopy(designerFile); - } - catch - { - } - - itemDesigner = VsHierarchyItem.CreateFromMoniker(designerFile, _hierarchy); - if (itemDesigner != null) - { - return itemDesigner; - } - } - } - } - } - - return itemDesigner; - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// Checks CodeDomProvider for case sensitivity - /// - ///------------------------------------------------------------------------------------------------------------- - public /*protected, but public for FSharp.Project.dll*/ bool IsCaseSensitive(CodeDomProvider codeDomProvider) - { - return !((codeDomProvider.LanguageOptions & LanguageOptions.CaseInsensitive) == LanguageOptions.CaseInsensitive); - } - - - ///------------------------------------------------------------------------------------------------------------- - /// - /// - /// - ///------------------------------------------------------------------------------------------------------------- - bool IVsCodeBehindCodeGenerator.IsGenerateAllowed(string document, string codeBehindFile, bool create) - { - VsHierarchyItem itemCode = VsHierarchyItem.CreateFromMoniker(codeBehindFile, _hierarchy); - VsHierarchyItem itemDesigner = GetDesignerItem(itemCode, false); - - if ((itemDesigner != null && itemDesigner.IsBuildActionCompile()) - || (itemDesigner == null && create)) - { - return true; - } - - return false; - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// - /// - ///------------------------------------------------------------------------------------------------------------- - void IVsCodeBehindCodeGenerator.BeginGenerate(string document, string codeBehindFile, string className_Full, bool create) - { - DisposeGenerateState(); - - _itemCode = VsHierarchyItem.CreateFromMoniker(codeBehindFile, _hierarchy); - _itemDesigner = GetDesignerItem(_itemCode, false); - _create = create; - _className_Full = className_Full; - - if (_itemCode != null) - { - // Get the CodeDomProvider for the language (MergedCodeDomProvider C#/VB) - _codeDomProvider = CreateCodeDomProvider(_itemCode.VsItemID); - - if (_codeDomProvider != null) - { - // Get the field names so we can preserve location and access - bool caseSensitive = IsCaseSensitive(_codeDomProvider); - - _codeFields = GetFieldNames(_itemCode, _className_Full, caseSensitive, false, 30); - _designerFields = GetFieldNames(_itemDesigner, _className_Full, caseSensitive, false, 0); - - // Generate the class - string designerContents = _itemDesigner.GetDocumentText(); - TextReader reader = new StringReader(designerContents); - _ccu = _codeDomProvider.Parse(reader); - GenerateClass(); - } - } - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// - /// - ///------------------------------------------------------------------------------------------------------------- - private void GenerateClass() - { - // Break full name into namespace and name - if (!string.IsNullOrEmpty(_className_Full)) - { - int lastdot = _className_Full.LastIndexOf('.'); - if (lastdot >= 0) - { - _className_Name = _className_Full.Substring(lastdot + 1); - _className_Namespace = _className_Full.Substring(0, lastdot); - } - else - { - _className_Name = _className_Full; - _className_Namespace = null; - } - } - - - // Create namespace and add to compile unit - System.CodeDom.CodeNamespace codeNS = null; - string ns = GetClassNamespace(); - if (!string.IsNullOrEmpty(ns)) - { - codeNS = new System.CodeDom.CodeNamespace(ns); - } - else - { - codeNS = new System.CodeDom.CodeNamespace(); - } - if (_ccu.Namespaces != null && _ccu.Namespaces.Count>0 && String.CompareOrdinal(_ccu.Namespaces[0].Name, ns) == 0) - codeNS = _ccu.Namespaces[0]; - else - _ccu.Namespaces.Add(codeNS); - - // Create class definition and add to namespace - _ctd = new CodeTypeDeclaration(_className_Name); - _ctd.IsPartial = !IsPartialClassDisabled; - if (codeNS.Types != null && codeNS.Types.Count > 0 && String.CompareOrdinal(codeNS.Types[0].Name, _className_Name) == 0) - _ctd = codeNS.Types[0]; - else - codeNS.Types.Add(_ctd); - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// - /// - ///------------------------------------------------------------------------------------------------------------- - void IVsCodeBehindCodeGenerator.EnsureStronglyTypedProperty(string propertyName, string propertyTypeName) - { - CodeMemberProperty prop = new CodeMemberProperty(); - prop.Attributes &= ~MemberAttributes.AccessMask; - prop.Attributes &= ~MemberAttributes.ScopeMask; - prop.Attributes |= MemberAttributes.Final | MemberAttributes.New | MemberAttributes.Public; - prop.Name = propertyName; - prop.Type = new CodeTypeReference(propertyTypeName); - - CodePropertyReferenceExpression propRef = new CodePropertyReferenceExpression( - new CodeBaseReferenceExpression(), propertyName); - - prop.GetStatements.Add(new CodeMethodReturnStatement(new CodeCastExpression(propertyTypeName, propRef))); - _ctd.Members.Add(prop); - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// - /// - ///------------------------------------------------------------------------------------------------------------- - void IVsCodeBehindCodeGenerator.EnsureControlDeclaration(string name, string typeName) - { - if (ShouldDeclareField(name, typeName)) - { - typeName = GetDeclarationTypeName(name, typeName); - - CodeMemberField field = new CodeMemberField(typeName, name); - - // Check if someone made the declaration public in the designer file - bool isPublic = false; - if (_designerFields != null && _designerFields.ContainsKey(name)) - { - FieldData fieldData = _designerFields[name]; - if (fieldData != null) - { - isPublic = fieldData.IsPublic; - } - } - - // Set access to public or protected - field.Attributes &= ~MemberAttributes.AccessMask; - if (isPublic) - { - field.Attributes |= MemberAttributes.Public; - } - else - { - field.Attributes |= MemberAttributes.Family; - } - - SetAdditionalFieldData(field); - - _ctd.Members.Add(field); - } - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// - /// - ///------------------------------------------------------------------------------------------------------------- - void IVsCodeBehindCodeGenerator.Generate() - { - DocData ddDesigner = null; - DocDataTextWriter designerWriter = null; - - try - { - if (_itemCode != null && _codeDomProvider != null) - { - - // Generate the code - StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture); - _codeDomProvider.GenerateCodeFromCompileUnit(_ccu, stringWriter, _codeGeneratorOptions); - string generatedCode = stringWriter.ToString(); - - // Create designer file if requested - if (_itemDesigner == null && _create) - { - _itemDesigner = GetDesignerItem(_itemCode, true); - } - - // See if generated code changed - string designerContents = _itemDesigner.GetDocumentText(); - if (!BufferEquals(designerContents, generatedCode)) // Would be nice to just compare lengths but the buffer gets formatted after insertion - { - ddDesigner = new LockedDocData(_serviceProvider, _itemDesigner.FullPath()); - - // Try to check out designer file (this throws) - ddDesigner.CheckoutFile(_serviceProvider); - - // Write out the new code - designerWriter = new DocDataTextWriter(ddDesigner); - designerWriter.Write(generatedCode); - designerWriter.Flush(); - designerWriter.Close(); - } - } - } - finally - { - if (designerWriter != null) - { - designerWriter.Dispose(); - } - if (ddDesigner != null) - { - ddDesigner.Dispose(); - } - } - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// Virtual method to allow language specific determination - /// - ///------------------------------------------------------------------------------------------------------------- - public /*protected, but public for FSharp.Project.dll*/ virtual bool ShouldDeclareField(string name, string typeName) - { - // Don't add field if already defined in codebehind or exposed from base class - bool declareField = true; - if (_codeFields != null && _codeFields.ContainsKey(name)) - { - FieldData fieldData = _codeFields[name]; - if (fieldData != null) - { - if (fieldData.Depth == 0) - { - // For immediate class we don't re-declare regardless - // of access modifiers. If the field is not visible to the run-time - // it will not be set and code against it will fail. - declareField = false; - } - else if (fieldData.IsProtected || fieldData.IsPublic) - { - // For bases we do not re-declare if already accessible - // (internal, private are not accesible to page assembly) - declareField = false; - } - } - } - - return declareField; - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// Virtual method to allow language specific adjustments - /// - ///------------------------------------------------------------------------------------------------------------- - public /*protected, but public for FSharp.Project.dll*/ virtual string GetDeclarationTypeName(string name, string typeName) - { - return typeName; - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// Virtual method to allow language specific adjustment of root classname namespace - /// - ///------------------------------------------------------------------------------------------------------------- - public /*protected, but public for FSharp.Project.dll*/ virtual string GetClassNamespace() - { - return _className_Namespace; - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// Virtual method to allow language specific adjustment of field - /// - ///------------------------------------------------------------------------------------------------------------- - public /*protected, but public for FSharp.Project.dll*/ virtual void SetAdditionalFieldData(CodeMemberField field) - { - return; - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// Compare buffers ignoring whitespace - /// - ///------------------------------------------------------------------------------------------------------------- - public /*protected, but public for FSharp.Project.dll*/ bool BufferEquals(string str1, string str2) - { - int i1 = 0; - int i2 = 0; - int len1 = str1.Length; - int len2 = str2.Length; - - for (; ; ) - { - while (i1 < len1 && char.IsWhiteSpace(str1[i1])) - i1++; - - while (i2 < len2 && char.IsWhiteSpace(str2[i2])) - i2++; - - if (i1 >= len1) - { - if (i2 >= len2) - { - return true; // ended with whitespace - } - return false; // str1 ended before str2 - } - else if (i2 >= len2) - { - return false; // str2 ended before str1 - } - else if (str1[i1] != str2[i2]) - { - return false; // different chars - } - - i1++; i2++; // advance - } - } - } -} - diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/Web/FieldData.cs b/vsintegration/src/FSharp.ProjectSystem.Base/Project/Web/FieldData.cs deleted file mode 100644 index a68af5d6574..00000000000 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/Web/FieldData.cs +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. - -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.Design; -using System.CodeDom; -using System.CodeDom.Compiler; -using System.Diagnostics; -using System.IO; -using System.Text; -using System.Globalization; -using System.Reflection; -using EnvDTE; -using EnvDTE80; -using Microsoft.VisualStudio.Designer.Interfaces; -using Microsoft.VisualStudio.Shell; -using Microsoft.VisualStudio.Shell.Interop; -using Microsoft.VisualStudio.Shell.Design; -using Microsoft.VisualStudio.Shell.Design.Serialization; - -using IServiceProvider = System.IServiceProvider; -using IOleServiceProvider = Microsoft.VisualStudio.OLE.Interop.IServiceProvider; - -namespace Microsoft.VisualStudio.FSharp.ProjectSystem.Web -{ - internal class FieldData - { - private string _name; - private string _class; - private int _depth; - private bool _isPrivate; - private bool _isProtected; - private bool _isPublic; - - public FieldData(CodeClass codeClass, CodeVariable codeVariable, int depth) - { - _name = codeVariable.Name; - _class = codeClass.FullName; - _depth = depth; - vsCMAccess access = codeVariable.Access; - _isPrivate = ((access & vsCMAccess.vsCMAccessPrivate) == vsCMAccess.vsCMAccessPrivate); - _isProtected = ((access & vsCMAccess.vsCMAccessProtected) == vsCMAccess.vsCMAccessProtected); - - // Special casing vsCMAccessAssemblyOrFamily - if ((access & vsCMAccess.vsCMAccessAssemblyOrFamily) == vsCMAccess.vsCMAccessAssemblyOrFamily) - _isProtected = true; - - _isPublic = ((access & vsCMAccess.vsCMAccessPublic) == vsCMAccess.vsCMAccessPublic); - } - - public FieldData(string name) - { - _name = name; - _class = null; - _depth = 0; - _isPrivate = false; - _isProtected = false; - _isPublic = true; - } - - public bool IsPrivate - { - get - { - return _isPrivate; - } - } - - public bool IsProtected - { - get - { - return _isProtected; - } - } - - public bool IsPublic - { - get - { - return _isPublic; - } - } - - public string Name - { - get - { - return _name; - } - } - - public int Depth - { - get - { - return _depth; - } - } - - public string Class - { - get - { - return _class; - } - } - } - - internal class FieldDataDictionary : Dictionary - { - public FieldDataDictionary(bool caseSensitive) : base(caseSensitive ? StringComparer.Ordinal : StringComparer.OrdinalIgnoreCase) - { - } - } -} diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/Web/LockedDocData.cs b/vsintegration/src/FSharp.ProjectSystem.Base/Project/Web/LockedDocData.cs deleted file mode 100644 index d44f1779827..00000000000 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/Web/LockedDocData.cs +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. - -using System; -using Microsoft.VisualStudio.Shell; -using Microsoft.VisualStudio.Shell.Interop; -using Microsoft.VisualStudio.Shell.Design.Serialization; - -namespace Microsoft.VisualStudio.FSharp.ProjectSystem.Web -{ - internal class LockedDocData : DocData - { - private IServiceProvider _serviceProvider; - private RunningDocumentTable _rdt; - private uint _cookie; - - ///------------------------------------------------------------------------------------------------------------- - /// - /// Constructor. Aquires edit lock on document. - /// - ///------------------------------------------------------------------------------------------------------------- - public LockedDocData(IServiceProvider serviceProvider, string fileName) : base(serviceProvider, fileName) - { - _serviceProvider = serviceProvider; - _rdt = new RunningDocumentTable(serviceProvider); - - // Locate and lock the document - _rdt.FindDocument(fileName, out _cookie); - _rdt.LockDocument(_VSRDTFLAGS.RDT_EditLock , _cookie); - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// Override of Dispose so we can free our lock after DocData. - /// - ///------------------------------------------------------------------------------------------------------------- - protected override void Dispose(bool disposing) - { - base.Dispose(disposing); - if (disposing) - { - if (_cookie != 0 && _rdt != null) - { - // prevent recursion - uint cookie = _cookie; - _cookie = 0; - - try - { - // Unlock the document, specifying to save if this is the last lock and the buffer is dirty - _rdt.UnlockDocument(_VSRDTFLAGS.RDT_EditLock | _VSRDTFLAGS.RDT_Unlock_SaveIfDirty, cookie); - } - finally - { - _cookie = 0; - _rdt = null; - } - } - _serviceProvider = null; - } - } - } -} - diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/Web/VsHierarchyItem.cs b/vsintegration/src/FSharp.ProjectSystem.Base/Project/Web/VsHierarchyItem.cs deleted file mode 100644 index 00b73a4f23b..00000000000 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/Web/VsHierarchyItem.cs +++ /dev/null @@ -1,697 +0,0 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. - -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.Design; -using System.Diagnostics; -using System.Drawing; -using System.IO; -using System.Runtime.InteropServices; -using EnvDTE; -using EnvDTE80; -using Microsoft.VisualStudio; -using Microsoft.VisualStudio.OLE.Interop; -using Microsoft.VisualStudio.Shell; -using Microsoft.VisualStudio.Shell.Interop; -using Microsoft.VisualStudio.TextManager.Interop; -using VSLangProj; - -using IServiceProvider = System.IServiceProvider; -using IOleServiceProvider = Microsoft.VisualStudio.OLE.Interop.IServiceProvider; -using ErrorHandler = Microsoft.VisualStudio.ErrorHandler; - -namespace Microsoft.VisualStudio.FSharp.ProjectSystem.Web -{ - internal class VsHierarchyItem - { - private uint _vsitemid; - private IVsHierarchy _hier; - private ServiceProvider _serviceProvider; - - //-------------------------------------------------------------------------------------------- - /// - /// Constructor - /// - /// Hiearchy item id - /// Hiearchy interface (typically the project) - //-------------------------------------------------------------------------------------------- - internal VsHierarchyItem(uint id, IVsHierarchy hier) - { - Debug.Assert(hier != null, "hier cannot be null"); - _vsitemid = id; - _hier = hier; - } - - internal VsHierarchyItem(IVsHierarchy hier) - { - Debug.Assert(hier != null, "hier cannot be null"); - _vsitemid = VSConstants.VSITEMID_ROOT; - _hier = hier; - } - - public override string ToString() - { - return Name(); - } - - //-------------------------------------------------------------------------------------------- - /// - /// Locates the item in the provided hierarchy using the provided moniker - /// and return a VsHierarchyItem for it - /// - //-------------------------------------------------------------------------------------------- - internal static VsHierarchyItem CreateFromMoniker(string moniker, IVsHierarchy hier) - { - VsHierarchyItem item = null; - - if (!string.IsNullOrEmpty(moniker) && hier != null) - { - IVsProject proj = hier as IVsProject; - if (proj != null) - { - int hr; - int isFound = 0; - uint itemid = VSConstants.VSITEMID_NIL; - VSDOCUMENTPRIORITY[] priority = new VSDOCUMENTPRIORITY[1]; - hr = proj.IsDocumentInProject(moniker, out isFound, priority, out itemid); - if (ErrorHandler.Succeeded(hr) && isFound != 0 && itemid != VSConstants.VSITEMID_NIL) - { - item = new VsHierarchyItem(itemid, hier); - } - - } - } - - return item; - } - - //-------------------------------------------------------------------------------------------- - /// - /// Item's id which is unique for the hieararchy - /// - //-------------------------------------------------------------------------------------------- - internal uint VsItemID - { - get - { - return _vsitemid; - } - set - { - _vsitemid = value; - } - } - - //-------------------------------------------------------------------------------------------- - /// - /// Read only access to the hierarchy interface - /// - //-------------------------------------------------------------------------------------------- - internal IVsHierarchy Hierarchy - { - get - { - return _hier; - } - } - - //-------------------------------------------------------------------------------------------- - /// - /// Read only access to the uihierarchy interface - /// - //-------------------------------------------------------------------------------------------- - public IVsUIHierarchy UIHierarchy() - { - return _hier as IVsUIHierarchy; - } - - //-------------------------------------------------------------------------------------------- - /// - /// Get the root as a VsHierarchyItem - /// - //-------------------------------------------------------------------------------------------- - internal VsHierarchyItem Root() - { - return new VsHierarchyItem(VSConstants.VSITEMID_ROOT, _hier); - } - - //-------------------------------------------------------------------------------------------- - /// - /// Gets the save name for the item. The save name is the string - /// shown in the save and save changes dialog boxes. - /// - /// - //-------------------------------------------------------------------------------------------- - internal string SaveName() - { - object o = GetPropHelper(__VSHPROPID.VSHPROPID_SaveName); - - return (o is string) ? (string)o : string.Empty; - } - - //-------------------------------------------------------------------------------------------- - /// - /// Gets the string displayed in the project window for a particular item - /// - /// Display name for item - //-------------------------------------------------------------------------------------------- - internal string Caption() - { - object o = GetPropHelper(__VSHPROPID.VSHPROPID_Caption); - - return (o is string) ? (string)o : string.Empty; - } - - //-------------------------------------------------------------------------------------------- - /// - /// Get the name of the item which is basically the file name - /// plus extension minus the directory - /// - /// Name of item - //-------------------------------------------------------------------------------------------- - internal string Name() - { - object o = GetPropHelper(__VSHPROPID.VSHPROPID_Name); - - return (o is string) ? (string)o : string.Empty; - } - - //-------------------------------------------------------------------------------------------- - /// - /// Returns the extensibility object - /// - /// Name of item - //-------------------------------------------------------------------------------------------- - internal object ExtObject() - { - return GetPropHelper(__VSHPROPID.VSHPROPID_ExtObject); - } - - //-------------------------------------------------------------------------------------------- - /// - /// Returns the ProjectItem extensibility object - /// - /// Name of item - //-------------------------------------------------------------------------------------------- - internal ProjectItem ProjectItem() - { - return ExtObject() as ProjectItem; - } - - //-------------------------------------------------------------------------------------------- - /// - /// Returns the ProjectItems extensibility object - /// - /// Name of item - //-------------------------------------------------------------------------------------------- - internal ProjectItems ProjectItems() - { - if (IsRootNode()) - { - Project project = ExtObject() as Project; - if (project != null) - { - return project.ProjectItems; - } - } - else - { - ProjectItem projectItem = ProjectItem(); - if (projectItem != null) - { - return projectItem.ProjectItems; - } - } - return null; - } - - //-------------------------------------------------------------------------------------------- - /// - /// Returns the the full path of the item using extensibility. - /// - /// Name of item - //-------------------------------------------------------------------------------------------- - internal string FullPath() - { - string fullPath = ""; - try - { - object obj = ExtObject(); - - if(obj is EnvDTE.Project) - { - EnvDTE.Project project = obj as EnvDTE.Project; - if(project != null) - fullPath = project.Properties.Item("FullPath").Value as string; - } - else if(obj is EnvDTE.ProjectItem) - { - EnvDTE.ProjectItem projItem = obj as EnvDTE.ProjectItem; - if(projItem != null) - fullPath = projItem.Properties.Item("FullPath").Value as string; - } - } - catch - { - } - return fullPath; - } - - ///-------------------------------------------------------------------------------------------- - /// - /// Returns the relative path of the project item - /// - /// folder\file.ext - /// - ///-------------------------------------------------------------------------------------------- - internal string ProjRelativePath() - { - string projRelativePath = null; - - string rootProjectDir = Root().ProjectDir(); - rootProjectDir = WAUtilities.EnsureTrailingBackSlash(rootProjectDir); - string fullPath = FullPath(); - - if (!string.IsNullOrEmpty(rootProjectDir) && !string.IsNullOrEmpty(fullPath)) - { - projRelativePath = WAUtilities.MakeRelativePath(fullPath, rootProjectDir); - } - - return projRelativePath; - } - - ///-------------------------------------------------------------------------------------------- - /// - /// Returns the relative path of the project item - /// - /// folder/file.ext - /// - ///-------------------------------------------------------------------------------------------- - internal string ProjRelativeUrl() - { - string projRelativeUrl = null; - - string projRelativePath = ProjRelativePath(); - if (!string.IsNullOrEmpty(projRelativePath)) - { - projRelativeUrl = projRelativePath.Replace(Path.DirectorySeparatorChar, '/'); - } - - return projRelativeUrl; - } - - //-------------------------------------------------------------------------------------------- - /// - /// Gets full path to project directory for this item - /// - /// - //-------------------------------------------------------------------------------------------- - internal string ProjectDir() - { - object o = GetPropHelper(__VSHPROPID.VSHPROPID_ProjectDir); - - return (o is string) ? (string)o : string.Empty; - } - - //-------------------------------------------------------------------------------------------- - /// - /// Get type name for this item. This is the display name used in the - /// title bar to identify the type of the node or hierarchy. - /// - /// - //-------------------------------------------------------------------------------------------- - internal bool IsRootNode() - { - return _vsitemid == VSConstants.VSITEMID_ROOT; - } - - //-------------------------------------------------------------------------------------------- - /// - /// Gets the type guid for this item and compares against GUID_ItemType_PhysicalFile - /// - /// - //-------------------------------------------------------------------------------------------- - internal bool IsFile() - { - Guid guid = GetGuidPropHelper(__VSHPROPID.VSHPROPID_TypeGuid); - return guid.CompareTo(VSConstants.GUID_ItemType_PhysicalFile) == 0; - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// Returns the current contents of a document - /// - ///------------------------------------------------------------------------------------------------------------- - public string GetDocumentText() - { - string text = null; - IVsPersistDocData docData = null; - - try - { - // Get or create the buffer - IVsTextLines buffer = GetRunningDocumentTextBuffer(); - if (buffer == null) - { - docData = CreateDocumentData(); - buffer = docData as IVsTextLines; - } - - // get the text from the buffer - if (buffer != null) - { - IVsTextStream textStream = buffer as IVsTextStream; - if (textStream != null) - { - int length; - int hr = textStream.GetSize(out length); - if (ErrorHandler.Succeeded(hr)) - { - if (length > 0) - { - IntPtr pText = Marshal.AllocCoTaskMem((length + 1) * 2); - try - { - hr = textStream.GetStream(0, length, pText); - if (ErrorHandler.Succeeded(hr)) - { - text = Marshal.PtrToStringUni(pText); - } - } - finally - { - Marshal.FreeCoTaskMem(pText); - } - } - else - { - text = string.Empty; - } - } - } - } - } - finally - { - if (docData != null) - { - docData.Close(); - } - } - - return text; - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// Creates and loads the document data - /// (You must Close() it when done) - /// - ///------------------------------------------------------------------------------------------------------------- - public IVsPersistDocData CreateDocumentData() - { - if (IsFile()) - { - string fullPath = FullPath(); - if (!string.IsNullOrEmpty(fullPath)) - { - IOleServiceProvider serviceProvider = (IOleServiceProvider)Microsoft.VisualStudio.Shell.Package.GetGlobalService(typeof(IOleServiceProvider)); - IVsPersistDocData docData = WAUtilities.CreateSitedInstance(serviceProvider, typeof(VsTextBufferClass).GUID); - if (docData != null) - { - int hr = docData.LoadDocData(fullPath); - if (ErrorHandler.Succeeded(hr)) - { - return docData; - } - } - } - } - return null; - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// If the document is open, it returns the IVsTextLines. - /// - ///------------------------------------------------------------------------------------------------------------- - public IVsTextLines GetRunningDocumentTextBuffer() - { - IVsTextLines buffer = null; - - IVsPersistDocData docData = GetRunningDocumentData(); - if (docData != null) - { - buffer = docData as IVsTextLines; - if (buffer == null) - { - IVsTextBufferProvider provider = docData as IVsTextBufferProvider; - if (provider != null) - { - provider.GetTextBuffer(out buffer); - } - } - } - - return buffer; - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// If the document is open, it returns the IVsPersistDocData for it. - /// - ///------------------------------------------------------------------------------------------------------------- - public IVsPersistDocData GetRunningDocumentData() - { - IVsPersistDocData persistDocData = null; - - IntPtr docData = IntPtr.Zero; - try - { - docData = GetRunningDocData(); - if (docData != IntPtr.Zero) - { - persistDocData = Marshal.GetObjectForIUnknown(docData) as IVsPersistDocData; - } - } - finally - { - if (docData != IntPtr.Zero) - { - Marshal.Release(docData); - } - } - - return persistDocData; - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// If the document is open, it returns the IntPtr to the doc data. - /// (This is ref-counted and must be released with Marshal.Release()) - /// - ///------------------------------------------------------------------------------------------------------------- - public IntPtr GetRunningDocData() - { - IntPtr docData = IntPtr.Zero; - - if (IsFile()) - { - string fullPath = FullPath(); - if (!string.IsNullOrEmpty(fullPath)) - { - IVsRunningDocumentTable rdt = GetService(); - if (rdt != null) - { - _VSRDTFLAGS flags = _VSRDTFLAGS.RDT_NoLock; - uint itemid; - IVsHierarchy hierarchy; - uint docCookie; - rdt.FindAndLockDocument - ( - (uint)flags, - fullPath, - out hierarchy, - out itemid, - out docData, - out docCookie - ); - } - } - } - - return docData; - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// Gets the project item Properties collection. - /// - ///------------------------------------------------------------------------------------------------------------- - public Properties Properties() - { - object obj = ExtObject(); - if(obj is EnvDTE.Project) - return ((EnvDTE.Project)obj).Properties; - else if(obj is EnvDTE.ProjectItem) - return ((EnvDTE.ProjectItem)obj).Properties; - return null; - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// Gets the build action of the item. - /// If not found returns build action none. - /// - ///------------------------------------------------------------------------------------------------------------- - public prjBuildAction BuildAction() - { - Properties props = Properties(); - if (props != null) - { - Property propBuildAction = props.Item("BuildAction"); - if (propBuildAction != null) - { - object objValue = propBuildAction.Value; - if (objValue != null) - { - prjBuildAction buildAction = (prjBuildAction)objValue; - return buildAction; - } - } - } - return prjBuildAction.prjBuildActionNone; - } - - ///------------------------------------------------------------------------------------------------------------- - /// - /// Returns true if the build action of the item is compile. - /// - ///------------------------------------------------------------------------------------------------------------- - public bool IsBuildActionCompile() - { - prjBuildAction buildAction = BuildAction(); - if (buildAction == prjBuildAction.prjBuildActionCompile) - { - return true; - } - return false; - } - - - //-------------------------------------------------------------------------------------------- - /// - /// Get the specified property from the __VSHPROPID enumeration for this item - /// - //-------------------------------------------------------------------------------------------- - private object GetPropHelper(__VSHPROPID propid) - { - return GetPropHelper(_vsitemid, (int)propid); - } - - //-------------------------------------------------------------------------------------------- - /// - /// Get the specified property from the __VSHPROPID2 enumeration for this item - /// - //-------------------------------------------------------------------------------------------- - private object GetPropHelper(__VSHPROPID2 propid) - { - return GetPropHelper(_vsitemid, (int)propid); - } - - //-------------------------------------------------------------------------------------------- - /// - /// Get the specified property for the specified item - /// - //-------------------------------------------------------------------------------------------- - private object GetPropHelper(uint itemid, int propid) - { - try - { - object o = null; - - if (_hier != null) - { - int hr = _hier.GetProperty(itemid, propid, out o); - } - - return o; - } - catch(Exception) - { - return null; - } - } - - //-------------------------------------------------------------------------------------------- - /// - /// Calls IVsHIerachy::GetGuidProperty - /// - //-------------------------------------------------------------------------------------------- - internal Guid GetGuidPropHelper(Microsoft.VisualStudio.Shell.Interop.__VSHPROPID propid) - { - Guid guid; - try - { - _hier.GetGuidProperty(_vsitemid, (int)propid, out guid); - } - catch(Exception) - { - guid = Guid.Empty; - } - return guid; - } - - ///-------------------------------------------------------------------------------------------- - /// - /// Get hierarchy site - /// - ///-------------------------------------------------------------------------------------------- - public IOleServiceProvider Site() - { - IOleServiceProvider serviceProvider = null; - if (_hier != null) - { - _hier.GetSite(out serviceProvider); - } - return serviceProvider; - } - - ///-------------------------------------------------------------------------------------------- - /// - /// Helper to get a shell service interface - /// - ///-------------------------------------------------------------------------------------------- - public InterfaceType GetService() where InterfaceType : class - { - InterfaceType service = null; - - try - { - if (_serviceProvider == null) - { - IOleServiceProvider serviceProvider = Site(); - if (serviceProvider != null) - { - _serviceProvider = new ServiceProvider(serviceProvider); - } - } - - if (_serviceProvider != null) - { - service = _serviceProvider.GetService(typeof(InterfaceType)) as InterfaceType; - } - } - catch - { - } - - return service; - } - - } - -} - diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/Web/WAUtilities.cs b/vsintegration/src/FSharp.ProjectSystem.Base/Project/Web/WAUtilities.cs deleted file mode 100644 index 53d6baf6f3c..00000000000 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/Web/WAUtilities.cs +++ /dev/null @@ -1,186 +0,0 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. - -using System; -using System.Collections; -using System.Diagnostics; -using System.Globalization; -using System.Text; -using System.Runtime.InteropServices; -using System.IO; -using System.Reflection; -using System.Threading; -using System.Windows.Forms; -using Microsoft.VisualStudio.Shell.Interop; -using Microsoft.VisualStudio.OLE.Interop; -using Microsoft.VisualStudio.Shell; -using Microsoft.Win32; -using IServiceProvider = System.IServiceProvider; -using IOleServiceProvider = Microsoft.VisualStudio.OLE.Interop.IServiceProvider; - -namespace Microsoft.VisualStudio.FSharp.ProjectSystem.Web -{ - internal class WAUtilities - { - - ///-------------------------------------------------------------------------------------------- - /// - /// Helper to create an instance from the local registry given a CLSID Guid - /// - ///-------------------------------------------------------------------------------------------- - public static InterfaceType CreateInstance(IServiceProvider serviceProvider, Guid clsid) where InterfaceType : class - { - InterfaceType instance = null; - - if (clsid != Guid.Empty) - { - ILocalRegistry localRegistry = GetService(serviceProvider); - if (localRegistry != null) - { - IntPtr pInstance = IntPtr.Zero; - Guid iidUnknown = NativeMethods.IID_IUnknown; - - try - { - localRegistry.CreateInstance(clsid, null, ref iidUnknown, NativeMethods.CLSCTX_INPROC_SERVER, out pInstance); - } - catch { } - - if (pInstance != IntPtr.Zero) - { - try - { - instance = Marshal.GetObjectForIUnknown(pInstance) as InterfaceType; - } - catch { } - - try - { - Marshal.Release(pInstance); - } - catch { } - } - } - } - - return instance; - } - - ///-------------------------------------------------------------------------------------------- - /// - /// Helper to create an instance from the local registry given a CLSID Guid - /// - ///-------------------------------------------------------------------------------------------- - public static InterfaceType CreateSitedInstance(IServiceProvider serviceProvider, Guid clsid) where InterfaceType : class - { - InterfaceType instance = CreateInstance(serviceProvider, clsid); - - if (instance != null) - { - IObjectWithSite sitedObject = instance as IObjectWithSite; - IOleServiceProvider site = GetService(serviceProvider); - if (sitedObject != null && site != null) - { - sitedObject.SetSite(site); - } - else - { - instance = null; // failed to site - } - } - - return instance; - } - public static InterfaceType CreateSitedInstance(IOleServiceProvider serviceProvider, Guid clsid) where InterfaceType : class - { - return CreateSitedInstance(new ServiceProvider(serviceProvider), clsid); - } - - ///-------------------------------------------------------------------------------------------- - /// - /// Helper to get a shell service interface - /// - ///-------------------------------------------------------------------------------------------- - public static InterfaceType GetService(IServiceProvider serviceProvider) where InterfaceType : class - { - InterfaceType service = null; - - try - { - service = serviceProvider.GetService(typeof(InterfaceType)) as InterfaceType; - } - catch - { - } - - return service; - } - - ///-------------------------------------------------------------------------------------------- - /// - /// Helpers to ensure (or remove) trailing slashes (or back slashes) - /// - ///-------------------------------------------------------------------------------------------- - public static string EnsureTrailingSlash(string str) - { - if (str != null && !str.EndsWith("/")) - { - str += "/"; - } - return str; - } - public static string EnsureTrailingBackSlash(string str) - { - if (str != null && !str.EndsWith("\\")) - { - str += "\\"; - } - return str; - } - - ///-------------------------------------------------------------------------------------------- - /// - /// Helpers to make relative paths/urls from physical paths - /// - ///-------------------------------------------------------------------------------------------- - public static string MakeRelativePath(string fullPath, string basePath) - { - string separator = Path.DirectorySeparatorChar.ToString(); - string tempBasePath = basePath; - string tempFullPath = fullPath; - string relativePath = null; - - if (!tempBasePath.EndsWith(separator)) - tempBasePath += separator; - tempFullPath = tempFullPath.ToLowerInvariant(); - tempBasePath = tempBasePath.ToLowerInvariant(); - - while (!string.IsNullOrEmpty(tempBasePath)) - { - if (tempFullPath.StartsWith(tempBasePath)) - { - relativePath += fullPath.Remove(0, tempBasePath.Length); - if (relativePath == separator) - relativePath = ""; - return relativePath; - } - else - { - tempBasePath = tempBasePath.Remove(tempBasePath.Length - 1); - int nLastIndex = tempBasePath.LastIndexOf(separator); - if (-1 != nLastIndex) - { - tempBasePath = tempBasePath.Remove(nLastIndex + 1); - relativePath += ".."; - relativePath += separator; - } - else - return fullPath; - } - } - - return fullPath; - } - } - - -} diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/WebProjectBase.Files b/vsintegration/src/FSharp.ProjectSystem.Base/Project/WebProjectBase.Files deleted file mode 100644 index d9e684eb298..00000000000 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/WebProjectBase.Files +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - ProjectBase\Web\CodeBehindCodeGenerator.cs - true - - - ProjectBase\Web\FieldData.cs - true - - - ProjectBase\Web\LockedDocData.cs - true - - - ProjectBase\Web\VsHierarchyItem.cs - true - - - ProjectBase\Web\WAUtilities.cs - true - - - - \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/xlf/Microsoft.VisualStudio.Package.Project.cs.xlf b/vsintegration/src/FSharp.ProjectSystem.Base/Project/xlf/Microsoft.VisualStudio.Package.Project.cs.xlf new file mode 100644 index 00000000000..8fb69a16f23 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.Base/Project/xlf/Microsoft.VisualStudio.Package.Project.cs.xlf @@ -0,0 +1,820 @@ + + + + + + Failed to add file '{0}' to project as project is null. + Přidání souboru {0} do projektu se nepovedlo, protože projekt neexistuje. + + + + Advanced + Upřesnit + Project Property Page Caption + + + A reference to '{0}' could not be added. + Odkaz na {0} se nedal přidat. + ReferenceCouldNotBeAdded error message + + + A reference to '{0}' could not be added. A reference to the component '{1}' already exists in the project. + Odkaz na {0} se nedal přidat. Odkaz na komponentu {1} už v projektu existuje. + ReferenceAlreadyExists error message + + + A reference to '{0}' (with assembly name '{1}') could not be added. A reference to the component '{2}' with the same assembly name already exists in the project. + Odkaz na {0} (s názvem sestavení {1}) se nedal přidat. Odkaz na komponentu {2} se stejným názvem sestavení už v projektu existuje. + ReferenceAlreadyExists error message + + + Could not load attribute '{0}' from project file '{1}'. + Nejde nahrát atribut {0} ze souboru projektu {1}. + + + + Build Action + Akce sestavení + Project Build Property Name + + + How the file relates to the build and deployment process + Jaký je vztah souboru k procesu sestavení a nasazení + Project Build Property Description + + + Verbosity + Podrobnosti + + + + Specify how much information is included in the build output + Určete, kolik informací je zahrnuto ve výstupu sestavení + + + + ECMA-335 CLI compatible framework (location must be provided) + Rozhraní kompatibilní se standardem ECMA-335 pro rozhraní CLI (musí být zadané umístění) + Target platform drop down option + + + Compile + Kompilovat + Build Action - drop down option + + + If you change a file name extension, the file may become unusable. Are you sure you want to change it? + Pokud změníte příponu souboru, může se stát, že bude soubor nepoužitelný. Opravdu ji chcete změnit? + + + + A file with name '{0}' already exists and is open in an editor. Please give a unique name to the item you are adding, or delete the existing item first. + Soubor s názvem {0} už existuje a je otevřený v editoru. Položce, kterou přidáváte, dejte jedinečný název, nebo nejdřív odstraňte stávající položku. + + + + Cannot save '{0}' as it is not open in the editor. + Soubor {0} se nedá uložit, protože není otevřený v editoru. + + + + Content + Obsah + Build Action - drop down option + + + Copy Local + Kopírovat místně + File property + + + Indicates whether the reference will be copied to the output directory. + Určuje, jestli se odkaz zkopíruje do výstupního adresáře. + + + + Detailed + Podrobný + + + + Diagnostic + Diagnostický + + + + Directory already exists + Adresář už existuje. + + + + Error opening specified view '{0}' using editor '{1}' + Chyba při otevírání zadaného zobrazení {0} pomocí editoru {1} + + + + Embedded Resource + Vložený prostředek + Build Action - drop down option + + + error + chyba + + + + Files and folders cannot be: +- Empty strings +- System reserved names, including 'CON', 'AUX', PRN', 'COM1' or 'LPT2' +- contain only '.' +- have any of the following characters: / ? : & \ * " < > | # % + Soubory a složky nemůžou: +– Být prázdnými řetězci +– Být systémem rezervovanými názvy včetně CON, AUX, PRN, COM1 nebo LPT2 +– Obsahovat jenom tečku (.) +– Obsahovat jakýkoli z následujících znaků: / ? : & \ * " < > | # % + + + + The name you provided is not a valid project name. + Poskytnutý název je neplatným názvem projektu. + + + + MSBuild path not found in registry. Please reinstall to fix the problem. + Cesta k MSBuild se v registru nenašla. Tento problém odstraníte přeinstalací. + + + + Error Saving File + Chyba při ukládání souboru + + + + Console Application + Konzolová aplikace + + + + Expecting object of type {0}. + Očekává se objekt typu {0}. + + + + Failed to retrieve msbuild property {0} from the project file. + Chyba při získání vlastnosti msbuild {0} ze souboru projektu + The exception message thrown when getting a property from msbuild fails. + + + A file with the same name '{0}' already exists. Do you want to overwrite it? + Soubor se stejným názvem {0} už existuje. Chcete ho přepsat? + + + + A file with the same name '{0}' already exists. + Soubor se stejným názvem {0} už existuje. + + + + Destination File Exists + Cílový soubor existuje. + + + + A file of this name is already part of the project. Do you want to overwrite it? + Soubor s tímto názvem už je součástí projektu. Chcete ho přepsat? + + + + Destination File Exists + Cílový soubor existuje. + + + + A file or folder with the name '{0}' already exists on disk at this location. Please choose another name. + Soubor nebo složka s názvem {0} už na disku v tomto umístění existuje. Zvolte prosím jiný název. + + + + Error Copying File + Chyba při kopírování souboru + + + + File Name + Název souboru + + + + File and folder names cannot contain a leading period. + Názvy souborů a složek nemůžou obsahovat na první pozici tečku. + + + + The name of the file or folder + Jméno souboru nebo složky + + + + Folder Name + Název složky + + + + Name of this folder + Název této složky + + + + Full Path + Úplná cesta + + + + Location of the file + Umístění souboru + + + + The item '{0}' does not exist in the project directory. It may have been moved, renamed or deleted. + Položka {0} v adresáři projektu neexistuje. Pravděpodobně je přesunutá, přejmenovaná nebo smazaná. + + + + Cannot save '{0}' outside the project directory. Linked items are not supported. + Soubor {0} nejde uložit mimo adresář projektu. Propojené položky nejsou podporované. + + + + Class Library + Knihovna tříd + + + + Minimal + Minimální + + + + Misc + Různé + + + + None + Žádné + + + + Normal + Normální + + + + Item is not available or corrupted and thus cannot be pasted. + Položka není dostupná nebo je porušená, a proto se nedá vložit. + + + + Program + Program + + + + Project + Projekt + + + + A reference to library '{0}' cannot be added. Adding this project as a reference would cause a circular dependency. + Odkaz na knihovnu {0} se nedá přidat. Přidání tohoto projektu jako odkazu způsobí kruhovou závislost. + + + + Project File + Soubor projektu + + + + The name of the file containing build, configuration, and other information about the project. + Název souboru, který obsahuje sestavení, konfiguraci a informace o projektu + + + + Project Folder + Složka projektu + + + + The absolute location of the project. + Absolutní umístění projektu + + + + Quiet + Žádný + + + + (Name) + (Název) + + + + References + Odkazy + + + + Display name of the reference + Zobrazit název odkazu + + + + Rename directory failed. {0} + Chyba přejmenování adresáře. {0} + + + + RTL_False + RTL_False + + + + Save? + Uložit? + + + + Do you want to save modified documents? + Chcete uložit změněné dokumenty? + + + + The project file can only be saved into the project location '{0}'. + Soubor projektu se dá uložit jenom do umístění projektu {0}. + + + + Error opening specified view '{0}' using standard editor. + Chyba při otevírání zadaného zobrazení {0} pomocí standardního editoru + + + + URL + Adresa URL + + + + You are trying to use an item that has already been deleted or that does not exist. + Pokoušíte se použít položku, která už je smazaná nebo neexistuje. + + + + Microsoft .Net Framework v1.0 + Microsoft .Net Framework v1.0 + + + + Microsoft .Net Framework v1.1 + Microsoft .Net Framework v1.1 + + + + Microsoft .Net Framework v2.0 + Microsoft .Net Framework v2.0 + + + + warning + upozornění + + + + Windows Application + Aplikace systému Windows + + + + Automation object invalid. + Automatizační objekt je neplatný. + + + + The command you are attempting cannot be completed because the file '{0}' that must be modified cannot be changed. If the file is under source control, you may want to check it out; if the file is read-only on disk, you may want to change its attributes. + Příkaz se nedá dokončit, protože soubor {0}, který je potřeba upravit, nejde změnit. Pokud je soubor součástí správy zdrojových kódů, rezervujte ho; pokud má soubor na disku označení jen pro čtení, můžete změnit jeho atributy. + MsgBox + + + Parameter must be a valid guid. + Parametr musí být platný identifikátor GUID. + Error message in the ArgumentException for a parameter that is not a valid guid. + + + Invalid logger type\nExpected: {0}\nReceived: {1} + Neplatný typ protokolovacího nástroje\nOčekávaný: {0}\nPřijatý: {1} + Error message thrown for when an invalid logger type is set. + + + InvalidParameter + InvalidParameter + Generic error message for invalid parameters. + + + ParameterCannotBeNullOEmpty + ParameterCannotBeNullOEmpty + Error message for string parameters that cannot be null or empty. + + + Parameter must be a valid item identifier. + Parametr musí být platný identifikátor položky. + Error message thrown when an invalid item id is retrieved. + + + File Properties + Vlastnosti souboru + + + + Folder Properties + Vlastnosti složky + + + + Project Properties + Vlastnosti projektu + + + + Reference Properties + Vlastnosti odkazu + + + + A file or folder with the name '{0}' already exists on disk at this location. Please choose another name. + Soubor nebo složka s názvem {0} už na disku v tomto umístění existuje. Zvolte prosím jiný název. + + + + This folder cannot be renamed to '{0}' as it already exists on disk.\n\nOnly empty folders can be renamed to existing folders. This folder contains files within it on disk. + Tuto složku nejde přejmenovat na {0}, protože už existuje na disku.\n\nJen prázdné složky jde přejmenovat na existující složky. Tato složka obsahuje soubory na disku. + + + + Build + Sestavení + + + + Output Path + Výstupní cesta + + + + The path to the primary output + Cesta k primárnímu výstupu + + + + The complete path to '{0}' exceeds the maximum number of characters permitted by the file system. + Úplná cesta k souboru {0} přesahuje maximální počet znaků povolených systémem souborů. + + + + Custom Tool + Vlastní nástroj + + + + Specifies the tool that transforms a file at design time and places the output of that transformation into another file. For example, a dataset (.xsd) file comes with a default custom tool. + Určuje nástroj, který transformuje soubor v okamžiku návrhu a vloží výstup této transformace do jiného souboru. Například k souboru DataSet (.xsd) se dodává výchozí vlastní nástroj. + + + + Custom Tool Namespace + Obor názvů vlastního nástroje + + + + The namespace into which the output of the custom tool is placed. + Obor názvů, do kterého se umístí výstup vlastního nástroje + + + + Primary Output + Primární výstup + + + + Content Files + Soubory obsahu + + + + Documentation Files + Soubory dokumentace + + + + Localized Resources + Lokalizované prostředky + + + + Source Files + Zdrojové soubory + + + + Debug Symbols + Symboly ladění + + + + XML Serialization Assemblies + XML serializace sestavení + + + + Contains the DLL or EXE built by the project. + Obsahuje knihovnu DLL nebo soubor EXE sestavený podle projektu. + + + + Contains all content files in the project. + Obsahuje všechny soubory obsahů projektu. + + + + Contains the XML Documentation files for the project. + Obsahuje soubory dokumentace XML pro projekt. + + + + Contains the satellite assemblies for each culture's resources. + Obsahuje satelitní sestavení pro prostředky jednotlivých jazykových verzí. + + + + Contains all source files in the project. + Obsahuje všechny zdrojové soubory projektu. + + + + Contains the debugging files for the project. + Obsahuje soubory ladění pro projekt. + + + + Contains the XML serialization assemblies for the project. + Obsahuje XML serializaci sestavení pro projekt. + + + + The project file '{0}' has been modified outside of Visual Studio. Do you want to reload the project? + Soubor projektu {0} se změnil mimo Visual Studio. Chcete projekt znovu načíst? + + + + The nested project has failed to reload. + Při pokusu znovu načíst vnořený projekt došlo k chybě. + + + + The item '{0}' cannot be found on disk, either because it has been renamed, deleted, or moved to a new location. + Položka {0} se na disku nedá najít. Je buď přejmenovaná, smazaná, nebo přesunutá do nového umístění. + + + + A reference to {0} could not be added. Please make sure that the file is accessible, and that it is a valid assembly or COM component. + Odkaz na soubor {0} se nepovedlo přidat. Zkontrolujte, jestli je soubor dostupný a jedná se o platné sestavení nebo komponentu COM. + + + + An 'Import' of the file '{1}' was found in the project file '{0}'. This file is not registered as a safe file to import, and could contain targets and tasks that are harmful. If this imported file is indeed considered safe, then it can be registered by writing to the registry key {2}. + V souboru projektu {0} se našel Import souboru {1}. Tento soubor není registrovaný jako soubor bezpečný pro import a může obsahovat škodlivé cíle a úkoly. Pokud se tento importovaný soubor skutečně považuje za bezpečný, dá se zaregistrovat zápisem do klíče registru {2}. + + + + An 'Import' of the file '{1}' was found in the user project file '{0}'. All imports in user project files are considered unsafe. + V uživatelském souboru projektu {0} je položka Import souboru {1}. Veškeré importy v uživatelských souborech projektu se považují za nebezpečné. + + + + One or more items named '{1}' were found in the project file '{0}'. These items normally should not be specified in the project file. They can change the way targets and tasks are executed during project load, and this could have harmful effects. + V souboru projektu {0} se našla jedna nebo víc položek s názvem {1}. Tyto položky by se do souboru projektu obvykle neměly zadávat. Můžou změnit způsob, jakým se provádějí cíle a úkoly během načítání projektu, a to může mít škodlivé účinky. + + + + A property named '{1}' was found in the project file '{0}'. This property normally should not be specified in the project file. Its value can change the way targets and tasks are executed during project load, and this could have harmful effects. + V souboru projektu {0} se našla vlastnost s názvem {1}. Tato vlastnost by se do souboru projektu obvykle neměla zadávat. Její hodnota může změnit způsob, jakým se provádějí cíle a úkoly během načítání projektu, a to může mít škodlivé účinky. + + + + A 'UsingTask' tag which registers the '{1}' task was found in the project file '{0}'. 'UsingTask' tags in the project file take precedence over those in the imported .TARGETS files, and therefore could be used to execute arbitrary code during an otherwise unmodified build process. + V souboru projektu {0} se našla značka UsingTask, která registruje úlohu {1}. Značky UsingTask v souboru projektu mají přednost před těmi, které jsou v importovaných souborech .TARGETS, takže se dají použít k provádění libovolného kódu v jinak nezměněném procesu sestavení. + + + + A 'Target' named '{1}' was found in the project file '{0}'. The tasks within this target could contain arbitrary code and may get executed as soon as the project is loaded in the IDE. + V souboru projektu {0} se našel Target s názvem {1}. Úkoly v rámci tohoto cíle můžou obsahovat libovolný kód a můžou se provést hned po načtení projektu v prostředí IDE. + + + + An item referring to the file '{1}' was found in the project file '{0}'. Since this file is located within a system directory, root directory, or network share, it could be harmful to write to this file. + V souboru projektu {0} je položka odkazující na soubor {1}. Protože je tento soubor umístěný v systémovém adresáři, kořenovém adresáři nebo sdílené síťové složce, může být zápis do tohoto souboru nebezpečný. + + + + The project location is not trusted:{0}{0}{1}{0}{0}Running the application may result in security exceptions when it attempts to perform actions which require full trust.{0}{0}Click OK to ignore and continue. + Umístění projektu není důvěryhodné:{0}{0}{1}{0}{0}Spuštění aplikace může v případě pokusu o provedení akce, která vyžaduje úplný vztah důvěryhodnosti, způsobit bezpečnostní výjimky.{0}{0}Pokud chcete ignorovat toto upozornění a pokračovat, stiskněte OK. + + + + Exception was thrown during BuildBegin event\n{0} + Během události BuildBegin se vyvolala výjimka\n{0} + + + + Copy always + Kopírovat vždycky + CopyToOutputDirectory - drop down option + + + Copy to Output Directory + Kopírovat do výstupního adresáře + + + + Specifies the source file will be copied to the output directory + Určuje zdrojový soubor, který se zkopíruje do výstupního adresáře. + + + + Copy if newer + Kopírovat, pokud je novější + CopyToOutputDirectory - drop down option + + + Do not copy + Nekopírovat + CopyToOutputDirectory - drop down option + + + Specific Version + Specifická verze + + + + Indicates whether this reference is to a specific version of an assembly. + Určuje, jestli je tento odkaz na určitou konkrétní verzi sestavení. + + + + Microsoft Visual F# does not support zero-impact projects. To create an F# project from this project template, either go to the Visual Studio menu 'Tools, Options..., Projects and Solutions, General' and check the box marked 'Save new projects when created', or specify <PromptForSaveOnCreation>true</PromptForSaveOnCreation> in the <TemplateData> section of this project template's .vstemplate file, and then retry this operation. + Microsoft Visual F# nepodporuje projekty s nulovým dopadem. Pokud chcete z této šablony projektu vytvořit projekt F#, přejděte buď do nabídky Visual Studia Nástroje, Možnosti..., Projekty a řešení, Obecné a zaškrtněte políčko Uložit nové projekty při vytvoření, nebo v části <TemplateData> souboru .vstemplate této šablony projektu zadejte <PromptForSaveOnCreation>true</PromptForSaveOnCreation> a potom to zkuste znovu. + + + + "Cannot open F# project '{0}'. \nThis project uses wildcards in item specification: \n'{2}' for item type '{1}'\n\nWildcards in F# projects are not currently supported. + Projekt {0} jazyka F# nelze otevřít. \nTento projekt používá ve specifikaci položky zástupné znaky: \n{2} pro položku typu {1}.\n\nZástupné znaky nejsou v projektech jazyka F# momentálně podporované. + + + + "Cannot add file {3} to F# project '{0}'. \nThis project uses wildcards in item specification: \n'{2}' for item type '{1}'\n\nWildcards in F# projects are not currently supported. + Do projektu {0} jazyka F# nelze přidat soubor {3}. \nTento projekt používá ve specifikaci položky zástupné znaky: \n{2} pro položku typu {1}.\n\nZástupné znaky nejsou v projektech jazyka F# momentálně podporované. + + + + Cannot open project file for edit. + Soubor projektu se nedá otevřít pro úpravy. + + + + Project file was checked out and is already upgraded. + Soubor projektu se zaregistroval a už je upgradovaný. + + + + A project with an Output Type of Class Library cannot be started directly.\n\nIn order to debug this project, add an executable project to this solution which references the library project. Set the executable project as the startup project. + Projekt s výstupním typem Knihovna tříd se nedá spustit přímo.\n\nAbyste tento projekt mohli ladit, přidejte do tohoto řešení spustitelný projekt, který bude odkazovat na projekt knihovny. Nastavte spustitelný projekt jako projekt, který se spouští. + + + + The entered path is not a valid output path + Zadaná cesta není platnou výstupní cestou. + + + + The project {0} cannot be referenced. An assembly must have a 'dll' or 'exe' extension in order to be referenced. + Na projekt {0} se nedá odkazovat. Aby to šlo, musí mít sestavení příponu dll nebo exe. + + + + Cannot start a build, because another build is already in progress. + Sestavení se spustit nedá, protože už probíhá jiné sestavení. + + + + The working directory does not exist:\n'{0}'. + Pracovní adresář neexistuje:\n{0}. + + + + A reference to library '{0}' cannot be added. This project targets a different framework ({2}) from the current project ({1}). + Odkaz na knihovnu {0} se nedá přidat. Tento projekt je cílený na jiné rozhraní ({2}) než aktuální projekt ({1}). + + + + The project '{0}' is targeting '{1}'; however, the target framework is not installed on the machine. + Projekt {0} je zaměřený na {1}. Cílová verze rozhraní .NET Framework ale na tomto počítači není nainstalovaná. + + + + F# + F# + + + + The referenced project '{0}' is targeting a higher framework version ({1}) than this project’s current target framework version ({2}). This may lead to build failures if types from assemblies outside this project’s target framework are used by any project in the dependency chain. + Odkazovaný projekt {0} je cílený na vyšší verzi rozhraní .NET Framework ({1}), než je aktuální cílová verze rozhraní .NET Framework tohoto projektu ({2}). Pokud se budou typy ze sestavení mimo cílovou verzi rozhraní .NET Framework tohoto projektu používat kdekoliv ve struktuře závislostí projektů, může to vést k chybám sestavení. + + + + The project file does not require conversion. + Soubor projektu nevyžaduje převod. + + + + No Conversion Required + Nejsou potřebné žádné konverze. + + + + Error creating backup of project file: {0} + Chyba při vytváření zálohy souboru projektu: {0} + + + + Project file successfully backed up as {0} + Soubor projektu se úspěšně zálohoval jako {0}. + + + + Backup file name conflict. Renaming file to: {0} + Konflikt názvu záložního souboru. Přejmenujte soubor na: {0} + + + + Backed up project may not build. Project contains linked file: {0} + Zálohovaný projekt se možná nesestaví. Projekt obsahuje propojený soubor: {0} + + + + Failed to backup file as {0} + Soubor se nepovedlo zálohovat jako {0}. + + + + File successfully backed up as {0} + Soubor se úspěšně zálohoval jako {0}. + + + + Identity + Identita + + + + Security identity of the referenced assembly. + Identita zabezpečení odkazovaného sestavení + + + + Path + Cesta + + + + Location of file being referenced. + Umístění odkazovaného souboru + + + + Version + Verze + + + + Copy of {0} + Kopie {0} + + + + Copy ({0}) of {1} + Kopie ({0}) z {1} + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/xlf/Microsoft.VisualStudio.Package.Project.de.xlf b/vsintegration/src/FSharp.ProjectSystem.Base/Project/xlf/Microsoft.VisualStudio.Package.Project.de.xlf new file mode 100644 index 00000000000..2f107ee3f27 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.Base/Project/xlf/Microsoft.VisualStudio.Package.Project.de.xlf @@ -0,0 +1,820 @@ + + + + + + Failed to add file '{0}' to project as project is null. + Fehler beim Hinzufügen von Datei "{0}" zum Projekt, da das Projekt NULL ist. + + + + Advanced + Erweitert + Project Property Page Caption + + + A reference to '{0}' could not be added. + Ein Verweis auf "{0}" konnte nicht hinzugefügt werden. + ReferenceCouldNotBeAdded error message + + + A reference to '{0}' could not be added. A reference to the component '{1}' already exists in the project. + Es konnte kein Verweis auf "{0}" hinzugefügt werden. Ein Verweis auf die Komponente "{1}" ist bereits im Projekt vorhanden. + ReferenceAlreadyExists error message + + + A reference to '{0}' (with assembly name '{1}') could not be added. A reference to the component '{2}' with the same assembly name already exists in the project. + Ein Verweis auf "{0}" (mit dem Assemblynamen "{1}") konnte nicht hinzugefügt werden. Im Projekt ist bereits ein Verweis auf die Komponente "{2}" mit dem gleichen Assemblynamen vorhanden. + ReferenceAlreadyExists error message + + + Could not load attribute '{0}' from project file '{1}'. + Attribut "{0}" konnte nicht aus Projektdatei "{1}" geladen werden. + + + + Build Action + Buildvorgang + Project Build Property Name + + + How the file relates to the build and deployment process + Gibt an, inwiefern sich die Datei auf den Build- und Bereitstellungsprozess bezieht. + Project Build Property Description + + + Verbosity + Ausführlichkeit + + + + Specify how much information is included in the build output + Geben Sie an, wie viele Informationen in der Buildausgabe enthalten sein sollen. + + + + ECMA-335 CLI compatible framework (location must be provided) + ECMA-335 CLI-kompatibles Framework (Speicherort muss angegeben werden) + Target platform drop down option + + + Compile + Kompilieren + Build Action - drop down option + + + If you change a file name extension, the file may become unusable. Are you sure you want to change it? + Wenn Sie eine Dateinamenerweiterung ändern, wird die Datei möglicherweise unbrauchbar. Möchten Sie sie wirklich ändern? + + + + A file with name '{0}' already exists and is open in an editor. Please give a unique name to the item you are adding, or delete the existing item first. + Eine Datei mit dem Namen "{0}" ist bereits vorhanden und in einem Editor geöffnet. Geben Sie dem Element, das hinzugefügt wird, einen eindeutigen Namen, oder löschen Sie zuerst das vorhandene Element. + + + + Cannot save '{0}' as it is not open in the editor. + {0} kann nicht gespeichert werden, da sie nicht im Editor geöffnet ist. + + + + Content + Inhalt + Build Action - drop down option + + + Copy Local + Lokale Kopie + File property + + + Indicates whether the reference will be copied to the output directory. + Gibt an, ob der Verweis in das Ausgabeverzeichnis kopiert wird. + + + + Detailed + Detailliert + + + + Diagnostic + Diagnose + + + + Directory already exists + Das Verzeichnis ist bereits vorhanden. + + + + Error opening specified view '{0}' using editor '{1}' + Fehler beim Öffnen der angegebenen Ansicht "{0}" unter Verwendung des Editors "{1}". + + + + Embedded Resource + Eingebettete Ressource + Build Action - drop down option + + + error + Fehler + + + + Files and folders cannot be: +- Empty strings +- System reserved names, including 'CON', 'AUX', PRN', 'COM1' or 'LPT2' +- contain only '.' +- have any of the following characters: / ? : & \ * " < > | # % + Für Dateien und Ordner gilt Folgendes: +- Sie dürfen keine leeren Zeichenfolgen sein. +- Sie dürfen keine für das System reservierten Namen aufweisen, einschließlich "CON", "AUX", PRN", "COM1" oder "LPT2". +- Sie dürfen nicht nur "." enthalten. +- Sie dürfen folgende Zeichen nicht aufweisen: / ? : & \ * " < > | # % + + + + The name you provided is not a valid project name. + Der angegebene Name ist kein gültiger Projektname. + + + + MSBuild path not found in registry. Please reinstall to fix the problem. + Der MSBuild-Pfad wurde nicht in der Registrierung gefunden. Führen Sie die Installation erneut durch, um das Problem zu beheben. + + + + Error Saving File + Fehler beim Speichern der Datei. + + + + Console Application + Konsolenanwendung + + + + Expecting object of type {0}. + Erwarteter Objekttyp: {0}. + + + + Failed to retrieve msbuild property {0} from the project file. + Fehler beim Abrufen der msbuild-Eigenschaft "{0}" aus der Projektdatei. + The exception message thrown when getting a property from msbuild fails. + + + A file with the same name '{0}' already exists. Do you want to overwrite it? + Eine Datei mit demselben Namen "{0}" ist bereits vorhanden. Möchten Sie sie überschreiben? + + + + A file with the same name '{0}' already exists. + Eine Datei mit demselben Namen "{0}" ist bereits vorhanden. + + + + Destination File Exists + Die Zieldatei ist bereits vorhanden. + + + + A file of this name is already part of the project. Do you want to overwrite it? + Eine Datei mit diesem Namen ist bereits Teil des Projekts. Möchten Sie sie überschreiben? + + + + Destination File Exists + Die Zieldatei ist bereits vorhanden. + + + + A file or folder with the name '{0}' already exists on disk at this location. Please choose another name. + Auf dem Datenträger ist an diesem Speicherort bereits eine Datei oder ein Ordner mit dem Namen "{0}" vorhanden. Wählen Sie einen anderen Namen aus. + + + + Error Copying File + Fehler beim Kopieren der Datei. + + + + File Name + Dateiname + + + + File and folder names cannot contain a leading period. + Datei- und Ordnernamen dürfen nicht mit einem Punkt beginnen. + + + + The name of the file or folder + Der Name der Datei oder des Ordners + + + + Folder Name + Ordnername + + + + Name of this folder + Name dieses Ordners + + + + Full Path + Vollständiger Pfad + + + + Location of the file + Speicherort der Datei + + + + The item '{0}' does not exist in the project directory. It may have been moved, renamed or deleted. + Das Element "{0}" ist im Projektverzeichnis nicht vorhanden. Möglicherweise wurde es verschoben, umbenannt oder gelöscht. + + + + Cannot save '{0}' outside the project directory. Linked items are not supported. + {0} kann nicht außerhalb des Projektverzeichnisses gespeichert werden. Verknüpfte Elemente werden nicht unterstützt. + + + + Class Library + Klassenbibliothek + + + + Minimal + Minimal + + + + Misc + Sonstiges + + + + None + Keine + + + + Normal + Normal + + + + Item is not available or corrupted and thus cannot be pasted. + Das Element ist nicht verfügbar oder beschädigt und kann deshalb nicht eingefügt werden. + + + + Program + Programm + + + + Project + Projekt + + + + A reference to library '{0}' cannot be added. Adding this project as a reference would cause a circular dependency. + Ein Verweis auf die Bibliothek '{0}' kann nicht hinzugefügt werden. Das Hinzufügen dieses Projekts als Verweis würde eine Ringabhängigkeit verursachen. + + + + Project File + Projektdatei + + + + The name of the file containing build, configuration, and other information about the project. + Der Name der Datei mit den Build-, Konfigurations- und anderen Informationen zum Projekt. + + + + Project Folder + Projektordner + + + + The absolute location of the project. + Der absolute Speicherort des Projekts. + + + + Quiet + Still + + + + (Name) + (Name) + + + + References + Verweise + + + + Display name of the reference + Anzeigename des Verweises + + + + Rename directory failed. {0} + Fehler beim Umbenennen des Verzeichnisses. {0} + + + + RTL_False + RTL_False + + + + Save? + Speichern? + + + + Do you want to save modified documents? + Möchten Sie geänderte Dokumente speichern? + + + + The project file can only be saved into the project location '{0}'. + Die Projektdatei kann nur am Projektspeicherort "{0}" gespeichert werden. + + + + Error opening specified view '{0}' using standard editor. + Fehler beim Öffnen der angegebenen Ansicht "{0}" unter Verwendung des Standard-Editors. + + + + URL + URL + + + + You are trying to use an item that has already been deleted or that does not exist. + Sie versuchen, ein Element zu verwenden, das bereits gelöscht wurde oder nicht vorhanden ist. + + + + Microsoft .Net Framework v1.0 + Microsoft .NET Framework v1.0 + + + + Microsoft .Net Framework v1.1 + Microsoft .NET Framework v1.1 + + + + Microsoft .Net Framework v2.0 + Microsoft .NET Framework v2.0 + + + + warning + Warnung + + + + Windows Application + Windows-Anwendung + + + + Automation object invalid. + Das Automatisierungsobjekt ist ungültig. + + + + The command you are attempting cannot be completed because the file '{0}' that must be modified cannot be changed. If the file is under source control, you may want to check it out; if the file is read-only on disk, you may want to change its attributes. + Der von Ihnen eingegebene Befehl kann nicht ausgeführt werden, da die Datei "{0}", die geändert werden muss, nicht geändert werden kann. Wenn die Datei der Quellcodeverwaltung unterliegt, checken Sie sie aus, und wiederholen Sie den Vorgang. Wenn die Datei auf dem Datenträger schreibgeschützt ist, ändern Sie ihre Attribute. + MsgBox + + + Parameter must be a valid guid. + Der Parameter muss eine gültige GUID sein. + Error message in the ArgumentException for a parameter that is not a valid guid. + + + Invalid logger type\nExpected: {0}\nReceived: {1} + Typ des Protokollierungsmoduls ungültig\nErwartet: {0}\nEmpfangen: {1} + Error message thrown for when an invalid logger type is set. + + + InvalidParameter + InvalidParameter + Generic error message for invalid parameters. + + + ParameterCannotBeNullOEmpty + ParameterCannotBeNullOEmpty + Error message for string parameters that cannot be null or empty. + + + Parameter must be a valid item identifier. + Der Parameter muss eine gültige Element-ID sein. + Error message thrown when an invalid item id is retrieved. + + + File Properties + Dateieigenschaften + + + + Folder Properties + Ordnereigenschaften + + + + Project Properties + Projekteigenschaften + + + + Reference Properties + Verweiseigenschaften + + + + A file or folder with the name '{0}' already exists on disk at this location. Please choose another name. + Auf dem Datenträger ist an diesem Speicherort bereits eine Datei oder ein Ordner mit dem Namen "{0}" vorhanden. Wählen Sie einen anderen Namen aus. + + + + This folder cannot be renamed to '{0}' as it already exists on disk.\n\nOnly empty folders can be renamed to existing folders. This folder contains files within it on disk. + Dieser Ordner kann nicht in "{0}" umbenannt werden, da ein Ordner dieses Namens bereits auf dem Datenträger vorhanden ist.\n\nNur leere Ordner können in vorhandene Ordner umbenannt werden. Dieser Ordner enthält Dateien auf dem Datenträger. + + + + Build + Build + + + + Output Path + Ausgabepfad + + + + The path to the primary output + Der Pfad zur primären Ausgabe + + + + The complete path to '{0}' exceeds the maximum number of characters permitted by the file system. + Der vollständige Pfad zu "{0}" übersteigt die maximale Anzahl von Zeichen, die vom Dateisystem zugelassen sind. + + + + Custom Tool + Benutzerdefiniertes Tool + + + + Specifies the tool that transforms a file at design time and places the output of that transformation into another file. For example, a dataset (.xsd) file comes with a default custom tool. + Gibt das Tool an, das eine Datei zur Entwurfszeit transformiert und die Ausgabe in einer anderen Datei speichert. Datasetdateien (".xsd") verfügen beispielsweise über ein benutzerdefiniertes Standardtool. + + + + Custom Tool Namespace + Namespace des benutzerdefinierten Tools + + + + The namespace into which the output of the custom tool is placed. + Der Namespace, in den die Ausgabe des benutzerdefinierten Tools kopiert wird. + + + + Primary Output + Primäre Ausgabe + + + + Content Files + Inhaltsdateien + + + + Documentation Files + Dokumentationsdateien + + + + Localized Resources + Lokalisierte Ressourcen + + + + Source Files + Quelldateien + + + + Debug Symbols + Debugsymbole + + + + XML Serialization Assemblies + XML-Serialisierungsassemblys + + + + Contains the DLL or EXE built by the project. + Enthält die DLL oder EXE, die durch das Projekt erstellt wurden. + + + + Contains all content files in the project. + Enthält alle Inhaltsdateien des Projekts. + + + + Contains the XML Documentation files for the project. + Enthält die XML-Dokumentationsdateien des Projekts. + + + + Contains the satellite assemblies for each culture's resources. + Enthält die Satellitenassemblys für die Ressourcen aller Kulturen. + + + + Contains all source files in the project. + Enthält alle Quelldateien des Projekts. + + + + Contains the debugging files for the project. + Enthält die Debugdateien des Projekts. + + + + Contains the XML serialization assemblies for the project. + Enthält die XML-Serialisierungsassemblys für das Projekt. + + + + The project file '{0}' has been modified outside of Visual Studio. Do you want to reload the project? + Die Projektdatei "{0}" wurde außerhalb von Visual Studio geändert. Möchten Sie das Projekt erneut laden? + + + + The nested project has failed to reload. + Fehler beim erneuten Laden des geschachtelten Projekts. + + + + The item '{0}' cannot be found on disk, either because it has been renamed, deleted, or moved to a new location. + Das Element "{0}" wurde nicht auf dem Datenträger gefunden, weil es umbenannt, gelöscht oder an einen neuen Speicherort verschoben wurde. + + + + A reference to {0} could not be added. Please make sure that the file is accessible, and that it is a valid assembly or COM component. + Ein Verweis auf "{0}" konnte nicht hinzugefügt werden. Stellen Sie sicher, dass auf die Datei zugegriffen werden kann und dass sie eine gültige Assembly oder COM-Komponente ist. + + + + An 'Import' of the file '{1}' was found in the project file '{0}'. This file is not registered as a safe file to import, and could contain targets and tasks that are harmful. If this imported file is indeed considered safe, then it can be registered by writing to the registry key {2}. + Ein "Import" der Datei "{1}" wurde in der Projektdatei "{0}" gefunden. Diese Datei ist nicht als sichere Datei für den Import registriert und könnte schädliche Ziele und Aufgaben enthalten. Wenn diese importierte Datei als sicher betrachtet wird, kann sie durch Schreiben in den Registrierungsschlüssel {2} registriert werden. + + + + An 'Import' of the file '{1}' was found in the user project file '{0}'. All imports in user project files are considered unsafe. + Ein "Import" der Datei "{1}" wurde in der Benutzerprojektdatei "{0}" gefunden. Alle Importe in Benutzerprojektdateien werden als nicht sicher angesehen. + + + + One or more items named '{1}' were found in the project file '{0}'. These items normally should not be specified in the project file. They can change the way targets and tasks are executed during project load, and this could have harmful effects. + In der Projektdatei "{0}" wurde mindestens ein Element mit dem Namen "{1}" gefunden. Diese Elemente sollten normalerweise nicht in der Projektdatei angegeben werden. Sie können die Art und Weise ändern, wie Ziele und Aufgaben beim Laden des Projekts ausgeführt werden, was schädigende Auswirkungen haben kann. + + + + A property named '{1}' was found in the project file '{0}'. This property normally should not be specified in the project file. Its value can change the way targets and tasks are executed during project load, and this could have harmful effects. + In der Projektdatei "{0}" wurde eine Eigenschaft mit dem Namen "{1}" gefunden. Diese Eigenschaft sollte normalerweise nicht in der Projektdatei angegeben werden. Ihr Wert kann die Art und Weise ändern, wie Ziele und Aufgaben beim Laden des Projekts ausgeführt werden, was schädigende Auswirkungen haben kann. + + + + A 'UsingTask' tag which registers the '{1}' task was found in the project file '{0}'. 'UsingTask' tags in the project file take precedence over those in the imported .TARGETS files, and therefore could be used to execute arbitrary code during an otherwise unmodified build process. + In der Projektdatei "{0}" wurde ein <UsingTask>-Tag gefunden, das die Aufgabe "{1}" registriert. <UsingTask>-Tags in der Projektdatei haben Vorrang gegenüber denen in importierten TARGETS-Dateien. Daher könnten sie dazu verwendet werden, willkürlichen Code während eines sonst unveränderten Buildprozesses auszuführen. + + + + A 'Target' named '{1}' was found in the project file '{0}'. The tasks within this target could contain arbitrary code and may get executed as soon as the project is loaded in the IDE. + Ein "Ziel" mit dem Namen "{1}" wurde in der Projektdatei "{0}" gefunden. Die Aufgaben in diesem Ziel können willkürlichen Code enthalten und werden möglicherweise ausgeführt, sobald das Projekt in die IDE geladen wird. + + + + An item referring to the file '{1}' was found in the project file '{0}'. Since this file is located within a system directory, root directory, or network share, it could be harmful to write to this file. + Ein Element, das auf die Datei "{1}" verweist, wurde in der Projektdatei "{0}" gefunden. Da sich diese Datei innerhalb eines Systemverzeichnisses, eines Stammverzeichnisses oder auf einer Netzwerkfreigabe befindet, könnte ein Schreiben in diese Datei schädlich sein. + + + + The project location is not trusted:{0}{0}{1}{0}{0}Running the application may result in security exceptions when it attempts to perform actions which require full trust.{0}{0}Click OK to ignore and continue. + Der Projektspeicherort ist nicht vertrauenswürdig:{0}{0}{1}{0}{0}Durch Ausführen der Anwendung könnten Sicherheitsausnahmen auftreten, wenn versucht wird, Aktionen auszuführen, für die volle Vertrauenswürdigkeit erforderlich ist.{0}{0}Klicken Sie auf "OK", um dies zu ignorieren und fortzufahren. + + + + Exception was thrown during BuildBegin event\n{0} + Während des BuildBegin-Ereignisses wurde eine Ausnahme ausgelöst.\n{0} + + + + Copy always + Immer kopieren + CopyToOutputDirectory - drop down option + + + Copy to Output Directory + In Ausgabeverzeichnis kopieren + + + + Specifies the source file will be copied to the output directory + Gibt an, dass die Quelldatei in das Ausgabeverzeichnis kopiert wird. + + + + Copy if newer + Kopieren, wenn neuer + CopyToOutputDirectory - drop down option + + + Do not copy + Nicht kopieren + CopyToOutputDirectory - drop down option + + + Specific Version + Spezifische Version + + + + Indicates whether this reference is to a specific version of an assembly. + Gibt an, ob sich dieser Verweis auf eine spezifische Version einer Assembly bezieht. + + + + Microsoft Visual F# does not support zero-impact projects. To create an F# project from this project template, either go to the Visual Studio menu 'Tools, Options..., Projects and Solutions, General' and check the box marked 'Save new projects when created', or specify <PromptForSaveOnCreation>true</PromptForSaveOnCreation> in the <TemplateData> section of this project template's .vstemplate file, and then retry this operation. + Microsoft Visual F# unterstützt keine Projekte ohne Auswirkungen. Um von dieser Projektvorlage ein F#-Projekt zu erstellen, wählen Sie in Visual Studio "Tools" -> "Optionen" -> "Projekte und Projektmappen" -> "Allgemein" aus, und aktivieren Sie das Kontrollkästchen "Neue Projekte beim Erstellen speichern". Oder legen Sie in der VSTEMPLATE-Datei der Vorlage dieses Projekts im Abschnitt <TemplateData> <PromptForSaveOnCreation>true</PromptForSaveOnCreation> fest, und wiederholen Sie dann den Vorgang. + + + + "Cannot open F# project '{0}'. \nThis project uses wildcards in item specification: \n'{2}' for item type '{1}'\n\nWildcards in F# projects are not currently supported. + "Das F#-Projekt "{0}" kann nicht geöffnet werden. \nDieses Projekt verwendet Platzhalter in der Elementspezifikation: \n"{2}" für den Elementtyp "{1}"\n\nPlatzhalter in F#-Projekten werden derzeit nicht unterstützt. + + + + "Cannot add file {3} to F# project '{0}'. \nThis project uses wildcards in item specification: \n'{2}' for item type '{1}'\n\nWildcards in F# projects are not currently supported. + "Die Datei {3} kann dem F#-Projekt "{0}" nicht hinzugefügt werden. \nDieses Projekt verwendet Platzhalter in der Elementspezifikation: \n"{2}" für den Elementtyp "{1}"\n\nPlatzhalter in F#-Projekten werden derzeit nicht unterstützt. + + + + Cannot open project file for edit. + Die Projektdatei kann nicht zur Bearbeitung geöffnet werden. + + + + Project file was checked out and is already upgraded. + Die Projektdatei wurde ausgecheckt und ein Upgrade bereits durchgeführt. + + + + A project with an Output Type of Class Library cannot be started directly.\n\nIn order to debug this project, add an executable project to this solution which references the library project. Set the executable project as the startup project. + Ein Projekt mit einem Klassenbibliothek-Ausgabetyp kann nicht direkt gestartet werden.\n\nUm dieses Projekt zu debuggen, fügen Sie dieser Projektmappe ein ausführbares Projekt hinzu, das auf das Bibliothekprojekt verweist. Legen Sie das ausführbare Projekt als Startprojekt fest. + + + + The entered path is not a valid output path + Der eingegebene Pfad ist kein gültiger Ausgabepfad. + + + + The project {0} cannot be referenced. An assembly must have a 'dll' or 'exe' extension in order to be referenced. + Auf das Projekt "{0}" kann nicht verwiesen werden. Damit auf eine Assembly verwiesen werden kann, muss sie die Erweiterung DLL oder EXE aufweisen. + + + + Cannot start a build, because another build is already in progress. + Ein Buildvorgang kann nicht gestartet werden, da bereits ein Buildvorgang ausgeführt wird. + + + + The working directory does not exist:\n'{0}'. + Das Arbeitsverzeichnis existiert nicht:\n'{0}'. + + + + A reference to library '{0}' cannot be added. This project targets a different framework ({2}) from the current project ({1}). + Ein Verweis auf Bibliothek '{0}' kann nicht hinzugefügt werden. Dieses Projekt verwendet ein anderes Zielframework ({2}) als das aktuelle Projekt ({1}). + + + + The project '{0}' is targeting '{1}'; however, the target framework is not installed on the machine. + Das Projekt "{0}" hat das Ziel "{1}". Das Zielframework ist jedoch nicht auf dem Computer installiert. + + + + F# + F# + + + + The referenced project '{0}' is targeting a higher framework version ({1}) than this project’s current target framework version ({2}). This may lead to build failures if types from assemblies outside this project’s target framework are used by any project in the dependency chain. + Das Projekt '{0}', auf das verwiesen wird, verwendet eine höhere Zielframeworkversion ({1}) als die aktuelle Zielframeworkversion ({2}) dieses Projekts. Dies kann zu Buildfehlern führen, wenn Typen von Assemblys außerhalb des Zielframeworks dieses Projekts von einem beliebigen Projekt in der Abhängigkeitskette verwendet werden. + + + + The project file does not require conversion. + Die Projektdatei erfordert keine Konvertierung. + + + + No Conversion Required + Keine Konvertierung erforderlich + + + + Error creating backup of project file: {0} + Fehler beim Erstellen einer Sicherungskopie der Projektdatei: {0} + + + + Project file successfully backed up as {0} + Projektdatei erfolgreich gesichert als {0} + + + + Backup file name conflict. Renaming file to: {0} + Namenskonflikt bei Sicherungsdateien. Datei wird umbenannt in: {0} + + + + Backed up project may not build. Project contains linked file: {0} + Das gesicherte Projekt wird möglicherweise nicht erstellt. Das Projekt enthält die verknüpfte Datei: {0} + + + + Failed to backup file as {0} + Fehler beim Sichern der Datei als {0} + + + + File successfully backed up as {0} + Datei erfolgreich gesichert als {0} + + + + Identity + Identität + + + + Security identity of the referenced assembly. + Sicherheits-ID der referenzierten Assembly + + + + Path + Pfad + + + + Location of file being referenced. + Speicherort der Datei, auf die verwiesen wird. + + + + Version + Version + + + + Copy of {0} + Kopie von {0} + + + + Copy ({0}) of {1} + Kopie ({0}) von {1} + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/xlf/Microsoft.VisualStudio.Package.Project.en.xlf b/vsintegration/src/FSharp.ProjectSystem.Base/Project/xlf/Microsoft.VisualStudio.Package.Project.en.xlf new file mode 100644 index 00000000000..beada53988c --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.Base/Project/xlf/Microsoft.VisualStudio.Package.Project.en.xlf @@ -0,0 +1,820 @@ + + + + + + Failed to add file '{0}' to project as project is null. + Failed to add file '{0}' to project as project is null. + + + + Advanced + Advanced + Project Property Page Caption + + + A reference to '{0}' could not be added. + A reference to '{0}' could not be added. + ReferenceCouldNotBeAdded error message + + + A reference to '{0}' could not be added. A reference to the component '{1}' already exists in the project. + A reference to '{0}' could not be added. A reference to the component '{1}' already exists in the project. + ReferenceAlreadyExists error message + + + A reference to '{0}' (with assembly name '{1}') could not be added. A reference to the component '{2}' with the same assembly name already exists in the project. + A reference to '{0}' (with assembly name '{1}') could not be added. A reference to the component '{2}' with the same assembly name already exists in the project. + ReferenceAlreadyExists error message + + + Could not load attribute '{0}' from project file '{1}'. + Could not load attribute '{0}' from project file '{1}'. + + + + Build Action + Build Action + Project Build Property Name + + + How the file relates to the build and deployment process + How the file relates to the build and deployment process + Project Build Property Description + + + Verbosity + Verbosity + + + + Specify how much information is included in the build output + Specify how much information is included in the build output + + + + ECMA-335 CLI compatible framework (location must be provided) + ECMA-335 CLI compatible framework (location must be provided) + Target platform drop down option + + + Compile + Compile + Build Action - drop down option + + + If you change a file name extension, the file may become unusable. Are you sure you want to change it? + If you change a file name extension, the file may become unusable. Are you sure you want to change it? + + + + A file with name '{0}' already exists and is open in an editor. Please give a unique name to the item you are adding, or delete the existing item first. + A file with name '{0}' already exists and is open in an editor. Please give a unique name to the item you are adding, or delete the existing item first. + + + + Cannot save '{0}' as it is not open in the editor. + Cannot save '{0}' as it is not open in the editor. + + + + Content + Content + Build Action - drop down option + + + Copy Local + Copy Local + File property + + + Indicates whether the reference will be copied to the output directory. + Indicates whether the reference will be copied to the output directory. + + + + Detailed + Detailed + + + + Diagnostic + Diagnostic + + + + Directory already exists + Directory already exists + + + + Error opening specified view '{0}' using editor '{1}' + Error opening specified view '{0}' using editor '{1}' + + + + Embedded Resource + Embedded Resource + Build Action - drop down option + + + error + error + + + + Files and folders cannot be: +- Empty strings +- System reserved names, including 'CON', 'AUX', PRN', 'COM1' or 'LPT2' +- contain only '.' +- have any of the following characters: / ? : & \ * " < > | # % + Files and folders cannot be: +- Empty strings +- System reserved names, including 'CON', 'AUX', PRN', 'COM1' or 'LPT2' +- contain only '.' +- have any of the following characters: / ? : & \ * " < > | # % + + + + The name you provided is not a valid project name. + The name you provided is not a valid project name. + + + + MSBuild path not found in registry. Please reinstall to fix the problem. + MSBuild path not found in registry. Please reinstall to fix the problem. + + + + Error Saving File + Error Saving File + + + + Console Application + Console Application + + + + Expecting object of type {0}. + Expecting object of type {0}. + + + + Failed to retrieve msbuild property {0} from the project file. + Failed to retrieve msbuild property {0} from the project file. + The exception message thrown when getting a property from msbuild fails. + + + A file with the same name '{0}' already exists. Do you want to overwrite it? + A file with the same name '{0}' already exists. Do you want to overwrite it? + + + + A file with the same name '{0}' already exists. + A file with the same name '{0}' already exists. + + + + Destination File Exists + Destination File Exists + + + + A file of this name is already part of the project. Do you want to overwrite it? + A file of this name is already part of the project. Do you want to overwrite it? + + + + Destination File Exists + Destination File Exists + + + + A file or folder with the name '{0}' already exists on disk at this location. Please choose another name. + A file or folder with the name '{0}' already exists on disk at this location. Please choose another name. + + + + Error Copying File + Error Copying File + + + + File Name + File Name + + + + File and folder names cannot contain a leading period. + File and folder names cannot contain a leading period. + + + + The name of the file or folder + The name of the file or folder + + + + Folder Name + Folder Name + + + + Name of this folder + Name of this folder + + + + Full Path + Full Path + + + + Location of the file + Location of the file + + + + The item '{0}' does not exist in the project directory. It may have been moved, renamed or deleted. + The item '{0}' does not exist in the project directory. It may have been moved, renamed or deleted. + + + + Cannot save '{0}' outside the project directory. Linked items are not supported. + Cannot save '{0}' outside the project directory. Linked items are not supported. + + + + Class Library + Class Library + + + + Minimal + Minimal + + + + Misc + Misc + + + + None + None + + + + Normal + Normal + + + + Item is not available or corrupted and thus cannot be pasted. + Item is not available or corrupted and thus cannot be pasted. + + + + Program + Program + + + + Project + Project + + + + A reference to library '{0}' cannot be added. Adding this project as a reference would cause a circular dependency. + A reference to library '{0}' cannot be added. Adding this project as a reference would cause a circular dependency. + + + + Project File + Project File + + + + The name of the file containing build, configuration, and other information about the project. + The name of the file containing build, configuration, and other information about the project. + + + + Project Folder + Project Folder + + + + The absolute location of the project. + The absolute location of the project. + + + + Quiet + Quiet + + + + (Name) + (Name) + + + + References + References + + + + Display name of the reference + Display name of the reference + + + + Rename directory failed. {0} + Rename directory failed. {0} + + + + RTL_False + RTL_False + + + + Save? + Save? + + + + Do you want to save modified documents? + Do you want to save modified documents? + + + + The project file can only be saved into the project location '{0}'. + The project file can only be saved into the project location '{0}'. + + + + Error opening specified view '{0}' using standard editor. + Error opening specified view '{0}' using standard editor. + + + + URL + URL + + + + You are trying to use an item that has already been deleted or that does not exist. + You are trying to use an item that has already been deleted or that does not exist. + + + + Microsoft .Net Framework v1.0 + Microsoft .Net Framework v1.0 + + + + Microsoft .Net Framework v1.1 + Microsoft .Net Framework v1.1 + + + + Microsoft .Net Framework v2.0 + Microsoft .Net Framework v2.0 + + + + warning + warning + + + + Windows Application + Windows Application + + + + Automation object invalid. + Automation object invalid. + + + + The command you are attempting cannot be completed because the file '{0}' that must be modified cannot be changed. If the file is under source control, you may want to check it out; if the file is read-only on disk, you may want to change its attributes. + The command you are attempting cannot be completed because the file '{0}' that must be modified cannot be changed. If the file is under source control, you may want to check it out; if the file is read-only on disk, you may want to change its attributes. + MsgBox + + + Parameter must be a valid guid. + Parameter must be a valid guid. + Error message in the ArgumentException for a parameter that is not a valid guid. + + + Invalid logger type\nExpected: {0}\nReceived: {1} + Invalid logger type\nExpected: {0}\nReceived: {1} + Error message thrown for when an invalid logger type is set. + + + InvalidParameter + InvalidParameter + Generic error message for invalid parameters. + + + ParameterCannotBeNullOEmpty + ParameterCannotBeNullOEmpty + Error message for string parameters that cannot be null or empty. + + + Parameter must be a valid item identifier. + Parameter must be a valid item identifier. + Error message thrown when an invalid item id is retrieved. + + + File Properties + File Properties + + + + Folder Properties + Folder Properties + + + + Project Properties + Project Properties + + + + Reference Properties + Reference Properties + + + + A file or folder with the name '{0}' already exists on disk at this location. Please choose another name. + A file or folder with the name '{0}' already exists on disk at this location. Please choose another name. + + + + This folder cannot be renamed to '{0}' as it already exists on disk.\n\nOnly empty folders can be renamed to existing folders. This folder contains files within it on disk. + This folder cannot be renamed to '{0}' as it already exists on disk.\n\nOnly empty folders can be renamed to existing folders. This folder contains files within it on disk. + + + + Build + Build + + + + Output Path + Output Path + + + + The path to the primary output + The path to the primary output + + + + The complete path to '{0}' exceeds the maximum number of characters permitted by the file system. + The complete path to '{0}' exceeds the maximum number of characters permitted by the file system. + + + + Custom Tool + Custom Tool + + + + Specifies the tool that transforms a file at design time and places the output of that transformation into another file. For example, a dataset (.xsd) file comes with a default custom tool. + Specifies the tool that transforms a file at design time and places the output of that transformation into another file. For example, a dataset (.xsd) file comes with a default custom tool. + + + + Custom Tool Namespace + Custom Tool Namespace + + + + The namespace into which the output of the custom tool is placed. + The namespace into which the output of the custom tool is placed. + + + + Primary Output + Primary Output + + + + Content Files + Content Files + + + + Documentation Files + Documentation Files + + + + Localized Resources + Localized Resources + + + + Source Files + Source Files + + + + Debug Symbols + Debug Symbols + + + + XML Serialization Assemblies + XML Serialization Assemblies + + + + Contains the DLL or EXE built by the project. + Contains the DLL or EXE built by the project. + + + + Contains all content files in the project. + Contains all content files in the project. + + + + Contains the XML Documentation files for the project. + Contains the XML Documentation files for the project. + + + + Contains the satellite assemblies for each culture's resources. + Contains the satellite assemblies for each culture's resources. + + + + Contains all source files in the project. + Contains all source files in the project. + + + + Contains the debugging files for the project. + Contains the debugging files for the project. + + + + Contains the XML serialization assemblies for the project. + Contains the XML serialization assemblies for the project. + + + + The project file '{0}' has been modified outside of Visual Studio. Do you want to reload the project? + The project file '{0}' has been modified outside of Visual Studio. Do you want to reload the project? + + + + The nested project has failed to reload. + The nested project has failed to reload. + + + + The item '{0}' cannot be found on disk, either because it has been renamed, deleted, or moved to a new location. + The item '{0}' cannot be found on disk, either because it has been renamed, deleted, or moved to a new location. + + + + A reference to {0} could not be added. Please make sure that the file is accessible, and that it is a valid assembly or COM component. + A reference to {0} could not be added. Please make sure that the file is accessible, and that it is a valid assembly or COM component. + + + + An 'Import' of the file '{1}' was found in the project file '{0}'. This file is not registered as a safe file to import, and could contain targets and tasks that are harmful. If this imported file is indeed considered safe, then it can be registered by writing to the registry key {2}. + An 'Import' of the file '{1}' was found in the project file '{0}'. This file is not registered as a safe file to import, and could contain targets and tasks that are harmful. If this imported file is indeed considered safe, then it can be registered by writing to the registry key {2}. + + + + An 'Import' of the file '{1}' was found in the user project file '{0}'. All imports in user project files are considered unsafe. + An 'Import' of the file '{1}' was found in the user project file '{0}'. All imports in user project files are considered unsafe. + + + + One or more items named '{1}' were found in the project file '{0}'. These items normally should not be specified in the project file. They can change the way targets and tasks are executed during project load, and this could have harmful effects. + One or more items named '{1}' were found in the project file '{0}'. These items normally should not be specified in the project file. They can change the way targets and tasks are executed during project load, and this could have harmful effects. + + + + A property named '{1}' was found in the project file '{0}'. This property normally should not be specified in the project file. Its value can change the way targets and tasks are executed during project load, and this could have harmful effects. + A property named '{1}' was found in the project file '{0}'. This property normally should not be specified in the project file. Its value can change the way targets and tasks are executed during project load, and this could have harmful effects. + + + + A 'UsingTask' tag which registers the '{1}' task was found in the project file '{0}'. 'UsingTask' tags in the project file take precedence over those in the imported .TARGETS files, and therefore could be used to execute arbitrary code during an otherwise unmodified build process. + A 'UsingTask' tag which registers the '{1}' task was found in the project file '{0}'. 'UsingTask' tags in the project file take precedence over those in the imported .TARGETS files, and therefore could be used to execute arbitrary code during an otherwise unmodified build process. + + + + A 'Target' named '{1}' was found in the project file '{0}'. The tasks within this target could contain arbitrary code and may get executed as soon as the project is loaded in the IDE. + A 'Target' named '{1}' was found in the project file '{0}'. The tasks within this target could contain arbitrary code and may get executed as soon as the project is loaded in the IDE. + + + + An item referring to the file '{1}' was found in the project file '{0}'. Since this file is located within a system directory, root directory, or network share, it could be harmful to write to this file. + An item referring to the file '{1}' was found in the project file '{0}'. Since this file is located within a system directory, root directory, or network share, it could be harmful to write to this file. + + + + The project location is not trusted:{0}{0}{1}{0}{0}Running the application may result in security exceptions when it attempts to perform actions which require full trust.{0}{0}Click OK to ignore and continue. + The project location is not trusted:{0}{0}{1}{0}{0}Running the application may result in security exceptions when it attempts to perform actions which require full trust.{0}{0}Click OK to ignore and continue. + + + + Exception was thrown during BuildBegin event\n{0} + Exception was thrown during BuildBegin event\n{0} + + + + Copy always + Copy always + CopyToOutputDirectory - drop down option + + + Copy to Output Directory + Copy to Output Directory + + + + Specifies the source file will be copied to the output directory + Specifies the source file will be copied to the output directory + + + + Copy if newer + Copy if newer + CopyToOutputDirectory - drop down option + + + Do not copy + Do not copy + CopyToOutputDirectory - drop down option + + + Specific Version + Specific Version + + + + Indicates whether this reference is to a specific version of an assembly. + Indicates whether this reference is to a specific version of an assembly. + + + + Microsoft Visual F# does not support zero-impact projects. To create an F# project from this project template, either go to the Visual Studio menu 'Tools, Options..., Projects and Solutions, General' and check the box marked 'Save new projects when created', or specify <PromptForSaveOnCreation>true</PromptForSaveOnCreation> in the <TemplateData> section of this project template's .vstemplate file, and then retry this operation. + Microsoft Visual F# does not support zero-impact projects. To create an F# project from this project template, either go to the Visual Studio menu 'Tools, Options..., Projects and Solutions, General' and check the box marked 'Save new projects when created', or specify <PromptForSaveOnCreation>true</PromptForSaveOnCreation> in the <TemplateData> section of this project template's .vstemplate file, and then retry this operation. + + + + "Cannot open F# project '{0}'. \nThis project uses wildcards in item specification: \n'{2}' for item type '{1}'\n\nWildcards in F# projects are not currently supported. + "Cannot open F# project '{0}'. \nThis project uses wildcards in item specification: \n'{2}' for item type '{1}'\n\nWildcards in F# projects are not currently supported. + + + + "Cannot add file {3} to F# project '{0}'. \nThis project uses wildcards in item specification: \n'{2}' for item type '{1}'\n\nWildcards in F# projects are not currently supported. + "Cannot add file {3} to F# project '{0}'. \nThis project uses wildcards in item specification: \n'{2}' for item type '{1}'\n\nWildcards in F# projects are not currently supported. + + + + Cannot open project file for edit. + Cannot open project file for edit. + + + + Project file was checked out and is already upgraded. + Project file was checked out and is already upgraded. + + + + A project with an Output Type of Class Library cannot be started directly.\n\nIn order to debug this project, add an executable project to this solution which references the library project. Set the executable project as the startup project. + A project with an Output Type of Class Library cannot be started directly.\n\nIn order to debug this project, add an executable project to this solution which references the library project. Set the executable project as the startup project. + + + + The entered path is not a valid output path + The entered path is not a valid output path + + + + The project {0} cannot be referenced. An assembly must have a 'dll' or 'exe' extension in order to be referenced. + The project {0} cannot be referenced. An assembly must have a 'dll' or 'exe' extension in order to be referenced. + + + + Cannot start a build, because another build is already in progress. + Cannot start a build, because another build is already in progress. + + + + The working directory does not exist:\n'{0}'. + The working directory does not exist:\n'{0}'. + + + + A reference to library '{0}' cannot be added. This project targets a different framework ({2}) from the current project ({1}). + A reference to library '{0}' cannot be added. This project targets a different framework ({2}) from the current project ({1}). + + + + The project '{0}' is targeting '{1}'; however, the target framework is not installed on the machine. + The project '{0}' is targeting '{1}'; however, the target framework is not installed on the machine. + + + + F# + F# + + + + The referenced project '{0}' is targeting a higher framework version ({1}) than this project’s current target framework version ({2}). This may lead to build failures if types from assemblies outside this project’s target framework are used by any project in the dependency chain. + The referenced project '{0}' is targeting a higher framework version ({1}) than this project’s current target framework version ({2}). This may lead to build failures if types from assemblies outside this project’s target framework are used by any project in the dependency chain. + + + + The project file does not require conversion. + The project file does not require conversion. + + + + No Conversion Required + No Conversion Required + + + + Error creating backup of project file: {0} + Error creating backup of project file: {0} + + + + Project file successfully backed up as {0} + Project file successfully backed up as {0} + + + + Backup file name conflict. Renaming file to: {0} + Backup file name conflict. Renaming file to: {0} + + + + Backed up project may not build. Project contains linked file: {0} + Backed up project may not build. Project contains linked file: {0} + + + + Failed to backup file as {0} + Failed to backup file as {0} + + + + File successfully backed up as {0} + File successfully backed up as {0} + + + + Identity + Identity + + + + Security identity of the referenced assembly. + Security identity of the referenced assembly. + + + + Path + Path + + + + Location of file being referenced. + Location of file being referenced. + + + + Version + Version + + + + Copy of {0} + Copy of {0} + + + + Copy ({0}) of {1} + Copy ({0}) of {1} + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/xlf/Microsoft.VisualStudio.Package.Project.es.xlf b/vsintegration/src/FSharp.ProjectSystem.Base/Project/xlf/Microsoft.VisualStudio.Package.Project.es.xlf new file mode 100644 index 00000000000..a1b9309cd08 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.Base/Project/xlf/Microsoft.VisualStudio.Package.Project.es.xlf @@ -0,0 +1,820 @@ + + + + + + Failed to add file '{0}' to project as project is null. + No se pudo agregar el archivo '{0}' al proyecto porque el proyecto es nulo. + + + + Advanced + Avanzadas + Project Property Page Caption + + + A reference to '{0}' could not be added. + No se pudo agregar una referencia a '{0}'. + ReferenceCouldNotBeAdded error message + + + A reference to '{0}' could not be added. A reference to the component '{1}' already exists in the project. + No se puedo agregar una referencia a '{0}'. Ya existe una referencia al componente '{1}' en el proyecto. + ReferenceAlreadyExists error message + + + A reference to '{0}' (with assembly name '{1}') could not be added. A reference to the component '{2}' with the same assembly name already exists in the project. + No se pudo agregar una referencia a '{0}' (con el nombre de ensamblado '{1}'). Ya existe una referencia al componente '{2}' con el mismo nombre de ensamblado en el proyecto. + ReferenceAlreadyExists error message + + + Could not load attribute '{0}' from project file '{1}'. + No se pudo cargar el atributo '{0}' del archivo de proyecto '{1}'. + + + + Build Action + Acción de compilación + Project Build Property Name + + + How the file relates to the build and deployment process + Relación del archivo con el proceso de compilación e implementación. + Project Build Property Description + + + Verbosity + Nivel de detalle + + + + Specify how much information is included in the build output + Especifique la información que se incluirá en el resultado de la compilación. + + + + ECMA-335 CLI compatible framework (location must be provided) + Marco de trabajo compatible con ECMA-335 CLI (se debe proporcionar la ubicación) + Target platform drop down option + + + Compile + Compilar + Build Action - drop down option + + + If you change a file name extension, the file may become unusable. Are you sure you want to change it? + Si cambia la extensión de nombre de archivo, el archivo puede quedar inutilizable. ¿Está seguro de que desea cambiarla? + + + + A file with name '{0}' already exists and is open in an editor. Please give a unique name to the item you are adding, or delete the existing item first. + Ya existe un archivo con el nombre '{0}' y está abierto en el editor. Dé un nombre único al elemento que va a agregar o elimine primero el elemento existente. + + + + Cannot save '{0}' as it is not open in the editor. + No se puede guardar '{0}' mientras no esté abierto en el editor. + + + + Content + Contenido + Build Action - drop down option + + + Copy Local + Copia local + File property + + + Indicates whether the reference will be copied to the output directory. + Indica si la referencia se copiará en el directorio de salida. + + + + Detailed + Detallado + + + + Diagnostic + Diagnóstico + + + + Directory already exists + El directorio ya existe. + + + + Error opening specified view '{0}' using editor '{1}' + Error al abrir la vista '{0}' especificada con el editor '{1}'. + + + + Embedded Resource + Recurso incrustado + Build Action - drop down option + + + error + error + + + + Files and folders cannot be: +- Empty strings +- System reserved names, including 'CON', 'AUX', PRN', 'COM1' or 'LPT2' +- contain only '.' +- have any of the following characters: / ? : & \ * " < > | # % + Los archivos y las carpetas no pueden: +- Ser cadenas vacías +- Ser nombres reservados del sistema, como "CON", "AUX", "PRN", "COM1" o "LPT2" +- Contener "." +- Tener cualquiera de los siguientes caracteres: / ? : & \ * " < > | # % + + + + The name you provided is not a valid project name. + El nombre proporcionado no es un nombre de proyecto válido. + + + + MSBuild path not found in registry. Please reinstall to fix the problem. + Ruta de acceso de MSBuild no encontrada en el Registro. Reinstálelo para corregir el problema. + + + + Error Saving File + Error al guardar el archivo. + + + + Console Application + Aplicación de consola + + + + Expecting object of type {0}. + Se espera un objeto de tipo {0}. + + + + Failed to retrieve msbuild property {0} from the project file. + No se pudo recuperar la propiedad {0} de msbuild del archivo de proyecto. + The exception message thrown when getting a property from msbuild fails. + + + A file with the same name '{0}' already exists. Do you want to overwrite it? + Ya existe un archivo con el nombre '{0}'. ¿Desea sobrescribirlo? + + + + A file with the same name '{0}' already exists. + Ya existe un archivo con el nombre '{0}'. + + + + Destination File Exists + El archivo de destino ya existe + + + + A file of this name is already part of the project. Do you want to overwrite it? + Ya hay un archivo con este nombre en el proyecto. ¿Desea sobrescribirlo? + + + + Destination File Exists + El archivo de destino ya existe + + + + A file or folder with the name '{0}' already exists on disk at this location. Please choose another name. + Ya existe un archivo o carpeta con el nombre '{0}' en el disco en esta ubicación. Elija otro nombre. + + + + Error Copying File + Error al copiar el archivo. + + + + File Name + Nombre de archivo + + + + File and folder names cannot contain a leading period. + Los nombres de archivo y de carpeta no pueden contener un punto inicial. + + + + The name of the file or folder + Nombre del archivo o carpeta + + + + Folder Name + Nombre de la carpeta + + + + Name of this folder + Nombre de esta carpeta + + + + Full Path + Ruta de acceso completa + + + + Location of the file + Ubicación del archivo + + + + The item '{0}' does not exist in the project directory. It may have been moved, renamed or deleted. + El elemento '{0}' no existe en el directorio del proyecto. Puede que se haya movido, cambiado de nombre o eliminado. + + + + Cannot save '{0}' outside the project directory. Linked items are not supported. + No se puede guardar '{0}' fuera del directorio del proyecto. No se admiten elementos vinculados. + + + + Class Library + Biblioteca de clases + + + + Minimal + Mínimo + + + + Misc + Varios + + + + None + Ninguno + + + + Normal + Normal + + + + Item is not available or corrupted and thus cannot be pasted. + El elemento no está disponible o está dañado y, por tanto, no se puede pegar. + + + + Program + Programa + + + + Project + Proyecto + + + + A reference to library '{0}' cannot be added. Adding this project as a reference would cause a circular dependency. + No se puede agregar una referencia a la biblioteca '{0}'. Si se agrega este proyecto como una referencia, daría lugar a una dependencia circular. + + + + Project File + Archivo de proyecto + + + + The name of the file containing build, configuration, and other information about the project. + Nombre del archivo que contiene la información de compilación, configuración y otros datos sobre el proyecto. + + + + Project Folder + Carpeta de proyecto + + + + The absolute location of the project. + Ubicación absoluta del proyecto. + + + + Quiet + No interactivo + + + + (Name) + (Nombre) + + + + References + Referencias + + + + Display name of the reference + Nombre para mostrar de la referencia + + + + Rename directory failed. {0} + No se pudo cambiar el nombre del directorio. {0} + + + + RTL_False + RTL_False + + + + Save? + ¿Guardar? + + + + Do you want to save modified documents? + ¿Desea guardar los documentos modificados? + + + + The project file can only be saved into the project location '{0}'. + El archivo de proyecto sólo se puede guardar en la ubicación del proyecto '{0}'. + + + + Error opening specified view '{0}' using standard editor. + Error al abrir la vista '{0}' especificada con el editor estándar. + + + + URL + URL + + + + You are trying to use an item that has already been deleted or that does not exist. + Está intentando usar un elemento que se eliminó o no existe. + + + + Microsoft .Net Framework v1.0 + Microsoft .Net Framework v1.0 + + + + Microsoft .Net Framework v1.1 + Microsoft .Net Framework v1.1 + + + + Microsoft .Net Framework v2.0 + Microsoft .Net Framework v2.0 + + + + warning + advertencia + + + + Windows Application + Aplicación Windows + + + + Automation object invalid. + Objeto de Automation no válido. + + + + The command you are attempting cannot be completed because the file '{0}' that must be modified cannot be changed. If the file is under source control, you may want to check it out; if the file is read-only on disk, you may want to change its attributes. + El comando que intenta ejecutar no se puede completar porque el archivo '{0}' que se debe modificar no se puede cambiar. Si el archivo está bajo control de código fuente, es conveniente desprotegerlo; si es de solo lectura y está en el disco, es aconsejable cambiar los atributos. + MsgBox + + + Parameter must be a valid guid. + El parámetro debe ser un GUID válido. + Error message in the ArgumentException for a parameter that is not a valid guid. + + + Invalid logger type\nExpected: {0}\nReceived: {1} + Tipo de registrador no válido\nSe esperaba: {0}\nSe recibió: {1} + Error message thrown for when an invalid logger type is set. + + + InvalidParameter + InvalidParameter + Generic error message for invalid parameters. + + + ParameterCannotBeNullOEmpty + ParameterCannotBeNullOEmpty + Error message for string parameters that cannot be null or empty. + + + Parameter must be a valid item identifier. + El parámetro debe ser un identificador de elemento válido. + Error message thrown when an invalid item id is retrieved. + + + File Properties + Propiedades del archivo + + + + Folder Properties + Propiedades de la carpeta + + + + Project Properties + Propiedades del proyecto + + + + Reference Properties + Propiedades de la referencia + + + + A file or folder with the name '{0}' already exists on disk at this location. Please choose another name. + Ya existe un archivo o carpeta con el nombre '{0}' en el disco en esta ubicación. Elija otro nombre. + + + + This folder cannot be renamed to '{0}' as it already exists on disk.\n\nOnly empty folders can be renamed to existing folders. This folder contains files within it on disk. + No se puede cambiar el nombre de la carpeta a "{0}" porque ya existe en el disco.\n\nSolo los nombres de las carpetas vacías pueden cambiarse a los de carpetas existentes. Esta carpeta contiene archivos en el disco. + + + + Build + Compilación + + + + Output Path + Ruta de acceso de salida + + + + The path to the primary output + Ruta de acceso al resultado principal + + + + The complete path to '{0}' exceeds the maximum number of characters permitted by the file system. + La ruta de acceso completa a '{0}' supera el número máximo de caracteres permitido por el sistema de archivos. + + + + Custom Tool + Herramienta personalizada + + + + Specifies the tool that transforms a file at design time and places the output of that transformation into another file. For example, a dataset (.xsd) file comes with a default custom tool. + Especifica la herramienta que transforma un archivo en tiempo de diseño y pone la salida de esa transformación en otro archivo. Por ejemplo, un archivo de conjunto de datos (.xsd) viene con una herramienta personalizada predeterminada. + + + + Custom Tool Namespace + Espacio de nombres de la herramienta personalizada + + + + The namespace into which the output of the custom tool is placed. + Espacio de nombres donde se sitúa la salida de la herramienta personalizada. + + + + Primary Output + Resultado principal + + + + Content Files + Archivos de contenido + + + + Documentation Files + Archivos de documentación + + + + Localized Resources + Recursos localizados + + + + Source Files + Archivos de origen + + + + Debug Symbols + Símbolos de depuración + + + + XML Serialization Assemblies + Ensamblados de serialización XML + + + + Contains the DLL or EXE built by the project. + Contiene los archivos DLL o EXE compilados por el proyecto. + + + + Contains all content files in the project. + Contiene todos los archivos de contenido del proyecto. + + + + Contains the XML Documentation files for the project. + Contiene los archivos de documentación XML del proyecto. + + + + Contains the satellite assemblies for each culture's resources. + Contiene los ensamblados satélite para los recursos de cada referencia cultural. + + + + Contains all source files in the project. + Contiene todos los archivos de origen del proyecto. + + + + Contains the debugging files for the project. + Contiene los archivos de depuración del proyecto. + + + + Contains the XML serialization assemblies for the project. + Contiene los ensamblados de serialización XML para el proyecto. + + + + The project file '{0}' has been modified outside of Visual Studio. Do you want to reload the project? + El archivo de proyecto '{0}' se ha modificado fuera de Visual Studio. ¿Desea recargar el proyecto? + + + + The nested project has failed to reload. + No se pudo recargar el proyecto anidado. + + + + The item '{0}' cannot be found on disk, either because it has been renamed, deleted, or moved to a new location. + No se encuentra el elemento '{0}' en el disco. Puede que se le haya cambiado el nombre, se haya eliminado o se haya movido a otra ubicación. + + + + A reference to {0} could not be added. Please make sure that the file is accessible, and that it is a valid assembly or COM component. + No se pudo agregar una referencia a {0}. Asegúrese de que el archivo está accesible y de que es un ensamblado o un componente COM válido. + + + + An 'Import' of the file '{1}' was found in the project file '{0}'. This file is not registered as a safe file to import, and could contain targets and tasks that are harmful. If this imported file is indeed considered safe, then it can be registered by writing to the registry key {2}. + Se encontró una acción 'Import' del archivo '{1}' en el archivo de proyecto '{0}'. Este archivo no está registrado como un archivo seguro para importarlo y podría contener destinos y tareas perjudiciales. Si, en efecto, este archivo importado se considera seguro puede registrarse escribiendo la clave del Registro {2}. + + + + An 'Import' of the file '{1}' was found in the user project file '{0}'. All imports in user project files are considered unsafe. + Se encontró una acción 'Import' del archivo '{1}' en el archivo de proyecto de usuario '{0}'. Todas las importaciones en archivos de proyecto de usuario se consideran no seguras. + + + + One or more items named '{1}' were found in the project file '{0}'. These items normally should not be specified in the project file. They can change the way targets and tasks are executed during project load, and this could have harmful effects. + Se encontraron en el archivo de proyecto '{0}' uno o varios elementos denominados '{1}'. Estos elementos normalmente no deberían especificarse en el archivo de proyecto, ya que pueden cambiar la forma de ejecución de destinos y tareas durante la carga del proyecto, lo cual podría tener efectos perjudiciales. + + + + A property named '{1}' was found in the project file '{0}'. This property normally should not be specified in the project file. Its value can change the way targets and tasks are executed during project load, and this could have harmful effects. + Se encontró una propiedad denominada '{1}' en el archivo de proyecto '{0}'. Normalmente, esta propiedad no se debe especificar en dicho archivo, ya que su valor puede cambiar el modo de ejecutar los destinos y tareas durante la carga del proyecto, lo que podría tener efectos perjudiciales. + + + + A 'UsingTask' tag which registers the '{1}' task was found in the project file '{0}'. 'UsingTask' tags in the project file take precedence over those in the imported .TARGETS files, and therefore could be used to execute arbitrary code during an otherwise unmodified build process. + Se encontró una etiqueta 'UsingTask', que registra la tarea '{1}', en el archivo de proyecto '{0}'. Las etiquetas 'UsingTask del archivo de proyecto tienen preferencia sobre las que figuran en los archivos .TARGETS importados, por lo que se podrían utilizar para ejecutar código arbitrario durante un proceso de compilación no modificado de otro modo. + + + + A 'Target' named '{1}' was found in the project file '{0}'. The tasks within this target could contain arbitrary code and may get executed as soon as the project is loaded in the IDE. + Se encontró una etiqueta 'Target' denominada '{1}' en el archivo de proyecto '{0}'. Las tareas que se encuentren dentro de este destino podrían contener código arbitrario que se podría ejecutar tan pronto como el proyecto se cargue en el IDE. + + + + An item referring to the file '{1}' was found in the project file '{0}'. Since this file is located within a system directory, root directory, or network share, it could be harmful to write to this file. + Se encontró en el archivo de proyecto '{0}' un elemento que hace referencia al archivo '{1}'. Dado que este archivo está ubicado en un directorio del sistema, un directorio raíz o un recurso compartido de red, podría ser perjudicial escribir en el mismo. + + + + The project location is not trusted:{0}{0}{1}{0}{0}Running the application may result in security exceptions when it attempts to perform actions which require full trust.{0}{0}Click OK to ignore and continue. + La ubicación del proyecto no es de confianza:{0}{0}{1}{0}{0}Si ejecuta la aplicación, puede dar lugar a excepciones de seguridad cuando intente realizar acciones que requieran plena confianza.{0}{0}Haga clic en Aceptar para pasarlo por alto y continuar. + + + + Exception was thrown during BuildBegin event\n{0} + Se produjo una excepción durante el evento BuildBegin.\n{0} + + + + Copy always + Copiar siempre + CopyToOutputDirectory - drop down option + + + Copy to Output Directory + Copiar en el directorio de salida + + + + Specifies the source file will be copied to the output directory + Especifica que el archivo de origen se copiará en el directorio de salida. + + + + Copy if newer + Copiar si es posterior + CopyToOutputDirectory - drop down option + + + Do not copy + No copiar + CopyToOutputDirectory - drop down option + + + Specific Version + Versión específica + + + + Indicates whether this reference is to a specific version of an assembly. + Indica si esta referencia es de una versión específica de un ensamblado. + + + + Microsoft Visual F# does not support zero-impact projects. To create an F# project from this project template, either go to the Visual Studio menu 'Tools, Options..., Projects and Solutions, General' and check the box marked 'Save new projects when created', or specify <PromptForSaveOnCreation>true</PromptForSaveOnCreation> in the <TemplateData> section of this project template's .vstemplate file, and then retry this operation. + Microsoft Visual F# no admite proyectos con impacto cero. Para crear un proyecto de F# a partir de esta plantilla de proyecto, en Visual Studio vaya a 'Herramientas, Opciones, Proyectos y soluciones, General' y active la casilla 'Guardar nuevos proyectos al crearlos', o bien especifique <PromptForSaveOnCreation>true</PromptForSaveOnCreation> en la sección <TemplateData> del archivo .vstemplate de esta plantilla de proyecto e intente de nuevo esta operación. + + + + "Cannot open F# project '{0}'. \nThis project uses wildcards in item specification: \n'{2}' for item type '{1}'\n\nWildcards in F# projects are not currently supported. + "No se puede abrir el proyecto de F# "{0}". \nEste proyecto usa comodines en la especificación de elemento: \n"{2}" para el tipo de elemento "{1}"\n\nActualmente no se admiten comodines en los proyectos de F#. + + + + "Cannot add file {3} to F# project '{0}'. \nThis project uses wildcards in item specification: \n'{2}' for item type '{1}'\n\nWildcards in F# projects are not currently supported. + "No se puede agregar el archivo {3} al proyecto de F# "{0}". \nEste proyecto usa comodines en la especificación de elemento: \n"{2}" para el tipo de elemento "{1}"\n\nActualmente no se admiten comodines en los proyectos de F#. + + + + Cannot open project file for edit. + No se puede abrir el archivo de proyecto para editarlo. + + + + Project file was checked out and is already upgraded. + El archivo de proyecto se desprotegió y está ya actualizado. + + + + A project with an Output Type of Class Library cannot be started directly.\n\nIn order to debug this project, add an executable project to this solution which references the library project. Set the executable project as the startup project. + No se puede iniciar directamente un proyecto con un tipo de resultado de biblioteca de clases.\n\nPara depurar este proyecto, agregue a esta solución un proyecto ejecutable que haga referencia al proyecto de biblioteca. Establezca el proyecto ejecutable como proyecto de inicio. + + + + The entered path is not a valid output path + La ruta de acceso especificada no es una ruta de acceso de resultados válida. + + + + The project {0} cannot be referenced. An assembly must have a 'dll' or 'exe' extension in order to be referenced. + No se puede hacer referencia al proyecto {0}. Para poder hacer referencia a un ensamblado, éste debe tener una extensión 'dll' o 'exe'. + + + + Cannot start a build, because another build is already in progress. + No se puede iniciar una compilación porque ya hay otra compilación en curso. + + + + The working directory does not exist:\n'{0}'. + El directorio de trabajo no existe:\n'{0}'. + + + + A reference to library '{0}' cannot be added. This project targets a different framework ({2}) from the current project ({1}). + No se puede agregar una referencia a la biblioteca '{0}'. Este proyecto está destinado a una versión de .NET Framework ({2}) distinta a la del proyecto ({1}) actual. + + + + The project '{0}' is targeting '{1}'; however, the target framework is not installed on the machine. + El proyecto '{0}' tiene como destino '{1}'. Sin embargo, la versión de .NET Framework de destino no está instalada en la máquina. + + + + F# + F# + + + + The referenced project '{0}' is targeting a higher framework version ({1}) than this project’s current target framework version ({2}). This may lead to build failures if types from assemblies outside this project’s target framework are used by any project in the dependency chain. + El proyecto '{0}' al que se hace referencia tiene como destino una versión de .NET Framework ({1}) posterior a la actual de este proyecto ({2}). Esto puede producir errores de compilación si cualquier proyecto de la cadena de dependencia usa tipos de ensamblados fuera de la versión de .NET Framework de destino de este proyecto. + + + + The project file does not require conversion. + El archivo de proyecto no requiere conversión. + + + + No Conversion Required + No requiere conversión + + + + Error creating backup of project file: {0} + Error al crear la copia de seguridad del archivo de proyecto: {0} + + + + Project file successfully backed up as {0} + Se realizó correctamente la copia de seguridad del archivo de proyecto {0} + + + + Backup file name conflict. Renaming file to: {0} + Conflicto del nombre del archivo de Backup. Cambiando el nombre del archivo a: {0} + + + + Backed up project may not build. Project contains linked file: {0} + Puede que la copia de seguridad del proyecto no se pueda compilar. El proyecto contiene un archivo vinculado: {0} + + + + Failed to backup file as {0} + Error al hacer copia de seguridad del archivo como {0} + + + + File successfully backed up as {0} + Se realizó correctamente la copia de seguridad del archivo {0} + + + + Identity + Identidad + + + + Security identity of the referenced assembly. + Identidad de seguridad del ensamblado al que se hace referencia. + + + + Path + Ruta de acceso + + + + Location of file being referenced. + Ubicación del archivo al que se hace referencia. + + + + Version + Versión + + + + Copy of {0} + Copia de {0} + + + + Copy ({0}) of {1} + Copia ({0}) de {1} + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/xlf/Microsoft.VisualStudio.Package.Project.fr.xlf b/vsintegration/src/FSharp.ProjectSystem.Base/Project/xlf/Microsoft.VisualStudio.Package.Project.fr.xlf new file mode 100644 index 00000000000..3377431434e --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.Base/Project/xlf/Microsoft.VisualStudio.Package.Project.fr.xlf @@ -0,0 +1,820 @@ + + + + + + Failed to add file '{0}' to project as project is null. + Impossible d'ajouter le fichier '{0}' au projet car le projet est Null. + + + + Advanced + Avancé + Project Property Page Caption + + + A reference to '{0}' could not be added. + Une référence à '{0}' n'a pas pu être ajoutée. + ReferenceCouldNotBeAdded error message + + + A reference to '{0}' could not be added. A reference to the component '{1}' already exists in the project. + Impossible d'ajouter une référence à '{0}'. Une référence au composant '{1}' existe déjà dans le projet. + ReferenceAlreadyExists error message + + + A reference to '{0}' (with assembly name '{1}') could not be added. A reference to the component '{2}' with the same assembly name already exists in the project. + Impossible d'ajouter une référence à '{0}' (avec le nom d'assembly '{1}'). Une référence au composant '{2}' avec le même nom d'assembly existe déjà dans le projet. + ReferenceAlreadyExists error message + + + Could not load attribute '{0}' from project file '{1}'. + Impossible de charger l'attribut '{0}' à partir du fichier projet '{1}'. + + + + Build Action + Action de génération + Project Build Property Name + + + How the file relates to the build and deployment process + Description de la relation entre le fichier, la build et le processus de déploiement + Project Build Property Description + + + Verbosity + Commentaires + + + + Specify how much information is included in the build output + Indique les informations incluses dans la sortie de génération + + + + ECMA-335 CLI compatible framework (location must be provided) + Framework compatible ECMA-335 CLI (emplacement doit être fourni) + Target platform drop down option + + + Compile + Compiler + Build Action - drop down option + + + If you change a file name extension, the file may become unusable. Are you sure you want to change it? + Si vous changez l'extension d'un nom de fichier, le fichier risque de devenir inutilisable. Voulez-vous vraiment la modifier ? + + + + A file with name '{0}' already exists and is open in an editor. Please give a unique name to the item you are adding, or delete the existing item first. + Un fichier portant le nom '{0}' existe déjà et est ouvert dans un éditeur. Attribuez un nom unique à l'élément que vous ajoutez ou supprimez au préalable l'élément existant. + + + + Cannot save '{0}' as it is not open in the editor. + Impossible d'enregistrer '{0}', car il n'est pas ouvert dans l'éditeur. + + + + Content + Contenu + Build Action - drop down option + + + Copy Local + Copie locale + File property + + + Indicates whether the reference will be copied to the output directory. + Indique si la référence sera copiée dans le répertoire de sortie. + + + + Detailed + Détaillé + + + + Diagnostic + Diagnostic + + + + Directory already exists + Le répertoire existe déjà + + + + Error opening specified view '{0}' using editor '{1}' + Erreur lors de l'ouverture de la vue '{0}' spécifiée à l'aide de l'éditeur '{1}' + + + + Embedded Resource + Ressource incorporée + Build Action - drop down option + + + error + erreur + + + + Files and folders cannot be: +- Empty strings +- System reserved names, including 'CON', 'AUX', PRN', 'COM1' or 'LPT2' +- contain only '.' +- have any of the following characters: / ? : & \ * " < > | # % + Les noms de fichiers et de dossiers ne peuvent pas : +- être des chaînes vides ; +- être des noms réservés au système, notamment 'CON', 'AUX', PRN', 'COM1' ou 'LPT2' ; +- contenir uniquement '.' ; +- comporter les caractères suivants : / ? : & \ * " < > | # % + + + + The name you provided is not a valid project name. + Le nom que vous avez fourni n'est pas un nom de projet valide. + + + + MSBuild path not found in registry. Please reinstall to fix the problem. + Chemin MSBuild introuvable dans le Registre. Réinstallez pour corriger le problème. + + + + Error Saving File + Erreur lors de l'enregistrement du fichier + + + + Console Application + Application console + + + + Expecting object of type {0}. + Objet attendu de type {0}. + + + + Failed to retrieve msbuild property {0} from the project file. + Impossible de récupérer la propriété msbuild {0} du fichier projet. + The exception message thrown when getting a property from msbuild fails. + + + A file with the same name '{0}' already exists. Do you want to overwrite it? + Un fichier portant le nom '{0}' existe déjà. Voulez-vous le remplacer ? + + + + A file with the same name '{0}' already exists. + Un fichier portant le nom '{0}' existe déjà. + + + + Destination File Exists + Le fichier de destination existe + + + + A file of this name is already part of the project. Do you want to overwrite it? + Un fichier de ce nom fait déjà partie du projet. Voulez-vous le remplacer ? + + + + Destination File Exists + Le fichier de destination existe + + + + A file or folder with the name '{0}' already exists on disk at this location. Please choose another name. + Il existe déjà un fichier ou un dossier nommé '{0}' à cet emplacement sur le disque. Choisissez un autre nom. + + + + Error Copying File + Erreur lors de la copie du fichier + + + + File Name + Nom de fichier + + + + File and folder names cannot contain a leading period. + Les noms de fichiers et de dossiers ne peuvent pas commencer par un point. + + + + The name of the file or folder + Nom du fichier ou dossier + + + + Folder Name + Nom du dossier + + + + Name of this folder + Nom de ce dossier + + + + Full Path + Chemin d'accès complet + + + + Location of the file + Emplacement du fichier + + + + The item '{0}' does not exist in the project directory. It may have been moved, renamed or deleted. + L'élément '{0}' n'existe pas dans le répertoire du projet. Il a peut-être été renommé, supprimé ou déplacé. + + + + Cannot save '{0}' outside the project directory. Linked items are not supported. + Impossible d'enregistrer '{0}' en dehors du répertoire du projet. Les éléments liés ne sont pas pris en charge. + + + + Class Library + Bibliothèque de classes + + + + Minimal + Minimal + + + + Misc + Divers + + + + None + Aucun + + + + Normal + Normal + + + + Item is not available or corrupted and thus cannot be pasted. + L'élément n'est pas disponible ou est endommagé et ne peut pas être collé. + + + + Program + Programme + + + + Project + Projet + + + + A reference to library '{0}' cannot be added. Adding this project as a reference would cause a circular dependency. + Impossible d'ajouter une référence à la bibliothèque '{0}'. L'ajout de ce projet en tant que référence créerait une dépendance circulaire. + + + + Project File + Fichier projet + + + + The name of the file containing build, configuration, and other information about the project. + Nom du fichier contenant la build, la configuration et d'autres informations sur le projet. + + + + Project Folder + Dossier du projet + + + + The absolute location of the project. + Emplacement absolu du projet. + + + + Quiet + Silencieux + + + + (Name) + (Nom) + + + + References + Références + + + + Display name of the reference + Nom complet de la référence + + + + Rename directory failed. {0} + Impossible de renommer le répertoire. {0} + + + + RTL_False + RTL_False + + + + Save? + Enregistrer ? + + + + Do you want to save modified documents? + Voulez-vous enregistrer les documents modifiés ? + + + + The project file can only be saved into the project location '{0}'. + Le fichier projet ne peut être enregistré que dans l'emplacement du projet '{0}'. + + + + Error opening specified view '{0}' using standard editor. + Erreur lors de l'ouverture de la vue '{0}' spécifiée à l'aide de l'éditeur standard. + + + + URL + URL + + + + You are trying to use an item that has already been deleted or that does not exist. + Vous essayez d'utiliser un élément qui a déjà été supprimé ou qui n'existe pas. + + + + Microsoft .Net Framework v1.0 + Microsoft .Net Framework v1.0 + + + + Microsoft .Net Framework v1.1 + Microsoft .Net Framework v1.1 + + + + Microsoft .Net Framework v2.0 + Microsoft .Net Framework v2.0 + + + + warning + avertissement + + + + Windows Application + Application Windows + + + + Automation object invalid. + Objet Automation non valide. + + + + The command you are attempting cannot be completed because the file '{0}' that must be modified cannot be changed. If the file is under source control, you may want to check it out; if the file is read-only on disk, you may want to change its attributes. + La commande que vous essayez d'utiliser ne peut pas être exécutée, car le fichier '{0}' qui doit être modifié ne peut pas l'être. Si ce fichier est sous contrôle de code source, vous pouvez l'extraire ; si le fichier est en lecture seule sur le disque, vous pouvez changer ses attributs. + MsgBox + + + Parameter must be a valid guid. + Le paramètre doit être un guid valide. + Error message in the ArgumentException for a parameter that is not a valid guid. + + + Invalid logger type\nExpected: {0}\nReceived: {1} + Type de journal non valide\nAttendu : {0}\nReçu : {1} + Error message thrown for when an invalid logger type is set. + + + InvalidParameter + InvalidParameter + Generic error message for invalid parameters. + + + ParameterCannotBeNullOEmpty + ParameterCannotBeNullOEmpty + Error message for string parameters that cannot be null or empty. + + + Parameter must be a valid item identifier. + Le paramètre doit être un identificateur d'élément valide. + Error message thrown when an invalid item id is retrieved. + + + File Properties + Propriétés du fichier + + + + Folder Properties + Propriétés du dossier + + + + Project Properties + Propriétés du projet + + + + Reference Properties + Propriétés de la référence + + + + A file or folder with the name '{0}' already exists on disk at this location. Please choose another name. + Il existe déjà un fichier ou un dossier nommé '{0}' à cet emplacement sur le disque. Choisissez un autre nom. + + + + This folder cannot be renamed to '{0}' as it already exists on disk.\n\nOnly empty folders can be renamed to existing folders. This folder contains files within it on disk. + Impossible de renommer ce dossier en '{0}', car il existe déjà sur le disque.\n\nSeuls les dossiers vides peuvent être renommés comme des dossiers existants. Ce dossier contient des fichiers sur le disque. + + + + Build + Build + + + + Output Path + Chemin de sortie + + + + The path to the primary output + Chemin de la sortie principale + + + + The complete path to '{0}' exceeds the maximum number of characters permitted by the file system. + Le chemin d'accès complet à '{0}' dépasse le nombre de caractères maximal permis par le système de fichiers. + + + + Custom Tool + Outil personnalisé + + + + Specifies the tool that transforms a file at design time and places the output of that transformation into another file. For example, a dataset (.xsd) file comes with a default custom tool. + Spécifie l'outil qui transforme un fichier au moment du design et qui place les résultats de cette transformation dans un autre fichier. Par exemple, un fichier dataset (.xsd) est fourni avec un outil personnalisé par défaut. + + + + Custom Tool Namespace + Espace de noms de l'outil personnalisé + + + + The namespace into which the output of the custom tool is placed. + Espace de noms dans lequel est placé le résultat de l'outil personnalisé. + + + + Primary Output + Sortie principale + + + + Content Files + Fichiers de contenu + + + + Documentation Files + Fichiers de documentation + + + + Localized Resources + Ressources localisées + + + + Source Files + Fichiers sources + + + + Debug Symbols + Symboles de débogage + + + + XML Serialization Assemblies + Assemblys de sérialisation XML + + + + Contains the DLL or EXE built by the project. + Contient le fichier DLL ou EXE généré par le projet. + + + + Contains all content files in the project. + Comprend tous les fichiers de contenu du projet. + + + + Contains the XML Documentation files for the project. + Contient les fichiers de documentation XML du projet. + + + + Contains the satellite assemblies for each culture's resources. + Contient les assemblys satellites de chacune des ressources de la culture. + + + + Contains all source files in the project. + Contient tous les fichiers sources du projet. + + + + Contains the debugging files for the project. + Contient les fichiers de débogage pour le projet. + + + + Contains the XML serialization assemblies for the project. + Contient les assemblys de sérialisation XML pour le projet. + + + + The project file '{0}' has been modified outside of Visual Studio. Do you want to reload the project? + Le fichier projet '{0}' a été modifié en dehors de Visual Studio. Voulez-vous recharger le projet ? + + + + The nested project has failed to reload. + Échec du rechargement du projet imbriqué. + + + + The item '{0}' cannot be found on disk, either because it has been renamed, deleted, or moved to a new location. + L'élément '{0}' est introuvable sur le disque. Il a peut-être été renommé, supprimé ou déplacé. + + + + A reference to {0} could not be added. Please make sure that the file is accessible, and that it is a valid assembly or COM component. + Impossible d'ajouter une référence à {0}. Vérifiez que ce fichier est accessible et qu'il s'agit d'un assembly ou d'un composant COM valide. + + + + An 'Import' of the file '{1}' was found in the project file '{0}'. This file is not registered as a safe file to import, and could contain targets and tasks that are harmful. If this imported file is indeed considered safe, then it can be registered by writing to the registry key {2}. + Un élément 'Import' du fichier '{1}' a été trouvé dans le fichier projet '{0}'. Ce fichier n'est pas enregistré comme un fichier sûr à importer et peut contenir des cibles et des tâches risquées. Si ce fichier importé est bien considéré comme sûr, il peut être enregistré en écrivant dans la clé de Registre {2}. + + + + An 'Import' of the file '{1}' was found in the user project file '{0}'. All imports in user project files are considered unsafe. + Un élément 'Import' du fichier '{1}' a été trouvé dans le fichier projet utilisateur '{0}'. Toutes les importations dans les fichiers projet utilisateur sont considérées comme unsafe. + + + + One or more items named '{1}' were found in the project file '{0}'. These items normally should not be specified in the project file. They can change the way targets and tasks are executed during project load, and this could have harmful effects. + Au moins un élément nommé '{1}' a été trouvé dans le fichier projet '{0}'. En principe, ces éléments ne doivent pas être spécifiés dans le fichier projet. Ils peuvent modifier la méthode d'exécution des cibles et des tâches lors du chargement du projet, ce qui présente des risques. + + + + A property named '{1}' was found in the project file '{0}'. This property normally should not be specified in the project file. Its value can change the way targets and tasks are executed during project load, and this could have harmful effects. + Une propriété nommée '{1}' a été trouvée dans le fichier projet '{0}'. En principe, cette propriété ne devrait pas être spécifiée dans le fichier projet. Sa valeur peut modifier la méthode d'exécution des cibles et des tâches lors du chargement du projet, ce qui présente des risques. + + + + A 'UsingTask' tag which registers the '{1}' task was found in the project file '{0}'. 'UsingTask' tags in the project file take precedence over those in the imported .TARGETS files, and therefore could be used to execute arbitrary code during an otherwise unmodified build process. + Une balise 'UsingTask' qui inscrit la tâche '{1}' a été trouvée dans le fichier projet '{0}'. Les balises 'UsingTask' dans le fichier projet sont prioritaires par rapport à celles des fichiers .TARGETS importés et pourraient donc être utilisées pour exécuter du code arbitraire lors d'un processus de génération inchangé autrement. + + + + A 'Target' named '{1}' was found in the project file '{0}'. The tasks within this target could contain arbitrary code and may get executed as soon as the project is loaded in the IDE. + Un élément 'Target' nommé '{1}' a été trouvé dans le fichier projet '{0}'. Les tâches de cette cible peuvent contenir du code arbitraire et être exécutées dès le chargement du projet dans l'environnement IDE. + + + + An item referring to the file '{1}' was found in the project file '{0}'. Since this file is located within a system directory, root directory, or network share, it could be harmful to write to this file. + Un élément qui fait référence au fichier '{1}' a été trouvé dans le fichier projet '{0}'. Dans la mesure où ce fichier se situe dans un répertoire système, un répertoire racine ou un partage réseau, il est risqué d'écrire dans ce fichier. + + + + The project location is not trusted:{0}{0}{1}{0}{0}Running the application may result in security exceptions when it attempts to perform actions which require full trust.{0}{0}Click OK to ignore and continue. + L'emplacement du projet n'est pas approuvé :{0}{0}{1}{0}{0}L'exécution de l'application risque de générer des exceptions de sécurité lors de la tentative d'exécution d'actions qui exigent une confiance totale.{0}{0}Cliquez sur OK pour ignorer et continuer. + + + + Exception was thrown during BuildBegin event\n{0} + Une exception a été levée lors de l'événement BuildBegin\n{0} + + + + Copy always + Toujours copier + CopyToOutputDirectory - drop down option + + + Copy to Output Directory + Copier dans le répertoire de sortie + + + + Specifies the source file will be copied to the output directory + Spécifie le fichier source qui sera copié dans le répertoire de sortie + + + + Copy if newer + Copier si plus récent + CopyToOutputDirectory - drop down option + + + Do not copy + Ne pas copier + CopyToOutputDirectory - drop down option + + + Specific Version + Version spécifique + + + + Indicates whether this reference is to a specific version of an assembly. + Indique s'il s'agit d'une référence à une version spécifique d'un assembly. + + + + Microsoft Visual F# does not support zero-impact projects. To create an F# project from this project template, either go to the Visual Studio menu 'Tools, Options..., Projects and Solutions, General' and check the box marked 'Save new projects when created', or specify <PromptForSaveOnCreation>true</PromptForSaveOnCreation> in the <TemplateData> section of this project template's .vstemplate file, and then retry this operation. + Microsoft Visual F# ne prend pas en charge les projets d'impact nul. Pour créer un projet F# à partir de ce modèle de projet, accédez au menu Visual Studio 'Outils, Options..., Projets et solutions, Général' et activez la case à cocher 'Enregistrer les nouveaux projets lors de leur création', ou spécifiez <PromptForSaveOnCreation>true</PromptForSaveOnCreation> dans la section <TemplateData> du fichier .vstemplate de ce modèle de projet, puis réessayez l'opération. + + + + "Cannot open F# project '{0}'. \nThis project uses wildcards in item specification: \n'{2}' for item type '{1}'\n\nWildcards in F# projects are not currently supported. + "Impossible d'ouvrir le projet F# '{0}'. \nCe projet utilise des caractères génériques dans la spécification des éléments : \n'{2}' pour le type d'élément '{1}'\n\nLes caractères génériques des projets F# ne sont pas pris en charge. + + + + "Cannot add file {3} to F# project '{0}'. \nThis project uses wildcards in item specification: \n'{2}' for item type '{1}'\n\nWildcards in F# projects are not currently supported. + "Impossible d'ajouter le fichier {3} au projet F# '{0}'. \nCe projet utilise des caractères génériques dans la spécification des éléments : \n'{2}' pour le type d'élément '{1}'\n\nLes caractères génériques des projets F# ne sont pas pris en charge. + + + + Cannot open project file for edit. + Impossible d'ouvrir le fichier projet pour le modifier. + + + + Project file was checked out and is already upgraded. + Le fichier projet a été extrait et est déjà mis à niveau. + + + + A project with an Output Type of Class Library cannot be started directly.\n\nIn order to debug this project, add an executable project to this solution which references the library project. Set the executable project as the startup project. + Un projet avec un type de sortie de bibliothèque de classes ne peut pas être démarré directement.\n\nPour déboguer ce projet, ajoutez à cette solution un projet exécutable qui fait référence au projet de bibliothèque. Définissez le projet exécutable comme projet de démarrage. + + + + The entered path is not a valid output path + Le chemin d'accès entré n'est pas un chemin de sortie valide + + + + The project {0} cannot be referenced. An assembly must have a 'dll' or 'exe' extension in order to be referenced. + Impossible de référencer le projet {0}. Un assembly doit avoir une extension 'dll' ou 'exe' pour pouvoir être référencé. + + + + Cannot start a build, because another build is already in progress. + Impossible de démarrer une build, car une autre build est déjà en cours. + + + + The working directory does not exist:\n'{0}'. + Le répertoire de travail n'existe pas :\n'{0}'. + + + + A reference to library '{0}' cannot be added. This project targets a different framework ({2}) from the current project ({1}). + Impossible d'ajouter une référence à la bibliothèque '{0}'. Ce projet cible un Framework ({2}) différent du projet actuel ({1}). + + + + The project '{0}' is targeting '{1}'; however, the target framework is not installed on the machine. + Le projet '{0}' cible '{1}', or le framework cible n'est pas installé sur cet ordinateur. + + + + F# + F# + + + + The referenced project '{0}' is targeting a higher framework version ({1}) than this project’s current target framework version ({2}). This may lead to build failures if types from assemblies outside this project’s target framework are used by any project in the dependency chain. + Le projet référencé '{0}' cible une version de framework supérieure ({1}) à la version actuelle du framework cible du projet ({2}). Cela peut provoquer l'échec de la génération si des types d'assemblys en dehors du framework cible de ce projet sont utilisés par un projet dans la chaîne de dépendance. + + + + The project file does not require conversion. + Le fichier projet ne doit pas être converti. + + + + No Conversion Required + Aucune conversion requise + + + + Error creating backup of project file: {0} + Erreur lors de la création d'une sauvegarde du fichier projet : {0} + + + + Project file successfully backed up as {0} + Fichier projet correctement sauvegardé en tant que {0} + + + + Backup file name conflict. Renaming file to: {0} + Conflit de nom du fichier de sauvegarde. Renommer le fichier en : {0} + + + + Backed up project may not build. Project contains linked file: {0} + Impossible de générer le projet sauvegardé. Le projet contient le fichier lié : {0} + + + + Failed to backup file as {0} + Échec de la sauvegarde du fichier avec le nom {0} + + + + File successfully backed up as {0} + Fichier correctement sauvegardé en tant que {0} + + + + Identity + Identité + + + + Security identity of the referenced assembly. + Identité de sécurité de l'assembly référencé. + + + + Path + Chemin + + + + Location of file being referenced. + Emplacement du fichier référencé. + + + + Version + Version + + + + Copy of {0} + Copie de {0} + + + + Copy ({0}) of {1} + Copie ({0}) de {1} + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/xlf/Microsoft.VisualStudio.Package.Project.it.xlf b/vsintegration/src/FSharp.ProjectSystem.Base/Project/xlf/Microsoft.VisualStudio.Package.Project.it.xlf new file mode 100644 index 00000000000..7bcff058d42 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.Base/Project/xlf/Microsoft.VisualStudio.Package.Project.it.xlf @@ -0,0 +1,820 @@ + + + + + + Failed to add file '{0}' to project as project is null. + Non è stato possibile aggiungere il file '{0}' al progetto perché il progetto è Null. + + + + Advanced + Avanzate + Project Property Page Caption + + + A reference to '{0}' could not be added. + Non è stato possibile aggiungere un riferimento a '{0}'. + ReferenceCouldNotBeAdded error message + + + A reference to '{0}' could not be added. A reference to the component '{1}' already exists in the project. + Non è stato possibile aggiungere un riferimento a '{0}'. Il progetto contiene già un riferimento al componente '{1}'. + ReferenceAlreadyExists error message + + + A reference to '{0}' (with assembly name '{1}') could not be added. A reference to the component '{2}' with the same assembly name already exists in the project. + Non è stato possibile aggiungere un riferimento a '{0}' (con nome assembly '{1}'). Nel progetto esiste già un riferimento al componente '{2}' con lo stesso nome assembly. + ReferenceAlreadyExists error message + + + Could not load attribute '{0}' from project file '{1}'. + Non è stato possibile caricare l'attributo '{0}' dal file di progetto '{1}'. + + + + Build Action + Azione di compilazione + Project Build Property Name + + + How the file relates to the build and deployment process + Descrizione della relazione tra il file e i processi di compilazione e distribuzione + Project Build Property Description + + + Verbosity + Livello di dettaglio + + + + Specify how much information is included in the build output + Specificare la quantità di informazioni incluse nell'output di compilazione + + + + ECMA-335 CLI compatible framework (location must be provided) + Framework compatibile con lo standard ECMA-335 CLI (è necessario fornire il percorso) + Target platform drop down option + + + Compile + Compilazione + Build Action - drop down option + + + If you change a file name extension, the file may become unusable. Are you sure you want to change it? + Se si modifica un'estensione di file, il file potrebbe diventare inutilizzabile. Modificarla? + + + + A file with name '{0}' already exists and is open in an editor. Please give a unique name to the item you are adding, or delete the existing item first. + Un file con il nome '{0}' esiste già ed è aperto in un editor. Assegnare un nome univoco all'elemento che si sta aggiungendo o eliminare l'elemento esistente. + + + + Cannot save '{0}' as it is not open in the editor. + Non è possibile salvare '{0}' perché non è aperto nell'editor. + + + + Content + Contenuto + Build Action - drop down option + + + Copy Local + Copia localmente + File property + + + Indicates whether the reference will be copied to the output directory. + Indica se il riferimento verrà copiato nella directory di output. + + + + Detailed + Con dettagli + + + + Diagnostic + Diagnostica + + + + Directory already exists + La directory esiste già + + + + Error opening specified view '{0}' using editor '{1}' + Errore durante l'apertura della visualizzazione specificata '{0}' utilizzando l'editor '{1}' + + + + Embedded Resource + Risorsa incorporata + Build Action - drop down option + + + error + errore + + + + Files and folders cannot be: +- Empty strings +- System reserved names, including 'CON', 'AUX', PRN', 'COM1' or 'LPT2' +- contain only '.' +- have any of the following characters: / ? : & \ * " < > | # % + Un nome di file o cartella non può: +- Essere una stringa vuota +- Essere un nome riservato del sistema, ad esempio 'CON', 'AUX', PRN', 'COM1' o 'LPT2' +- Contenere solo '.' +- Contenere uno dei seguenti caratteri: / ? : & \ * " < > | # % + + + + The name you provided is not a valid project name. + Il nome specificato non è un nome di progetto valido. + + + + MSBuild path not found in registry. Please reinstall to fix the problem. + Percorso MSBuild non trovato nel Registro di sistema. Reinstallare per risolvere il problema. + + + + Error Saving File + Errore durante il salvataggio del file + + + + Console Application + Applicazione console + + + + Expecting object of type {0}. + Previsto oggetto di tipo {0}. + + + + Failed to retrieve msbuild property {0} from the project file. + Non è stato possibile recuperare la proprietà {0} di MSBuild dal file di progetto. + The exception message thrown when getting a property from msbuild fails. + + + A file with the same name '{0}' already exists. Do you want to overwrite it? + Un file con lo stesso nome '{0}' esiste già. Sovrascriverlo? + + + + A file with the same name '{0}' already exists. + Un file con lo stesso nome '{0}' esiste già. + + + + Destination File Exists + File di destinazione esistente + + + + A file of this name is already part of the project. Do you want to overwrite it? + Un file con questo nome fa già parte del progetto. Sovrascriverlo? + + + + Destination File Exists + File di destinazione esistente + + + + A file or folder with the name '{0}' already exists on disk at this location. Please choose another name. + In questo percorso sul disco esiste già un file o una cartella con il nome '{0}'. Selezionare un altro nome. + + + + Error Copying File + Errore durante la copia del file + + + + File Name + Nome file + + + + File and folder names cannot contain a leading period. + I nomi di file e di cartella non possono iniziare con un punto. + + + + The name of the file or folder + Nome del file o della cartella + + + + Folder Name + Nome cartella + + + + Name of this folder + Nome di questa cartella + + + + Full Path + Percorso completo + + + + Location of the file + Percorso del file + + + + The item '{0}' does not exist in the project directory. It may have been moved, renamed or deleted. + L'elemento '{0}' non è presente nella directory del progetto. È possibile che sia stato spostato, rinominato o eliminato. + + + + Cannot save '{0}' outside the project directory. Linked items are not supported. + Non è possibile salvare '{0}' all'esterno della directory del progetto. Gli elementi collegati non sono supportati. + + + + Class Library + Libreria di classi + + + + Minimal + Minimo + + + + Misc + Varie + + + + None + Nessuno + + + + Normal + Normale + + + + Item is not available or corrupted and thus cannot be pasted. + L'elemento non è disponibile o è danneggiato, pertanto non può essere incollato. + + + + Program + Programma + + + + Project + Progetto + + + + A reference to library '{0}' cannot be added. Adding this project as a reference would cause a circular dependency. + Non è possibile aggiungere un riferimento alla libreria '{0}'. L'aggiunta di questo progetto come riferimento genera una dipendenza circolare. + + + + Project File + File di progetto + + + + The name of the file containing build, configuration, and other information about the project. + Nome del file contenente le informazioni sul progetto relative alla compilazione, alla configurazione e altro. + + + + Project Folder + Cartella di progetto + + + + The absolute location of the project. + Percorso assoluto del progetto. + + + + Quiet + Non interattiva + + + + (Name) + (Nome) + + + + References + Riferimenti + + + + Display name of the reference + Nome visualizzato del riferimento + + + + Rename directory failed. {0} + Non è stato possibile rinominare la directory. {0} + + + + RTL_False + RTL_False + + + + Save? + Salvare? + + + + Do you want to save modified documents? + Salvare i documenti modificati? + + + + The project file can only be saved into the project location '{0}'. + Il file di progetto può essere salvato solo nel percorso del progetto '{0}'. + + + + Error opening specified view '{0}' using standard editor. + Errore durante l'apertura della visualizzazione specificata '{0}' utilizzando l'editor standard. + + + + URL + URL + + + + You are trying to use an item that has already been deleted or that does not exist. + Si sta tentando di usare un elemento che è già stato eliminato o che non esiste. + + + + Microsoft .Net Framework v1.0 + Microsoft .Net Framework versione 1.0 + + + + Microsoft .Net Framework v1.1 + Microsoft .Net Framework versione 1.1 + + + + Microsoft .Net Framework v2.0 + Microsoft .Net Framework versione 2.0 + + + + warning + avviso + + + + Windows Application + Applicazione Windows + + + + Automation object invalid. + Oggetto di automazione non valido. + + + + The command you are attempting cannot be completed because the file '{0}' that must be modified cannot be changed. If the file is under source control, you may want to check it out; if the file is read-only on disk, you may want to change its attributes. + Non è possibile completare il comando che si sta provando a eseguire perché il file '{0}' da modificare non può essere modificato. Se il file è sottoposto al controllo del codice sorgente, è possibile estrarlo. Se il file è di sola lettura su disco, è invece possibile modificarne gli attributi. + MsgBox + + + Parameter must be a valid guid. + Il parametro deve essere un GUID valido. + Error message in the ArgumentException for a parameter that is not a valid guid. + + + Invalid logger type\nExpected: {0}\nReceived: {1} + Tipo di logger non valido\nPrevisto: {0}\nRicevuto: {1} + Error message thrown for when an invalid logger type is set. + + + InvalidParameter + InvalidParameter + Generic error message for invalid parameters. + + + ParameterCannotBeNullOEmpty + ParameterCannotBeNullOEmpty + Error message for string parameters that cannot be null or empty. + + + Parameter must be a valid item identifier. + Il parametro deve essere un identificatore di elemento valido. + Error message thrown when an invalid item id is retrieved. + + + File Properties + Proprietà file + + + + Folder Properties + Proprietà cartelle + + + + Project Properties + Proprietà del progetto + + + + Reference Properties + Proprietà del riferimento + + + + A file or folder with the name '{0}' already exists on disk at this location. Please choose another name. + In questo percorso sul disco esiste già un file o una cartella con il nome '{0}'. Selezionare un altro nome. + + + + This folder cannot be renamed to '{0}' as it already exists on disk.\n\nOnly empty folders can be renamed to existing folders. This folder contains files within it on disk. + Non è possibile rinominare questa cartella in '{0}' perché esiste già nel disco.\n\nÈ possibile rinominare cartelle esistenti solo se vuote. Questa cartella contiene file nel disco. + + + + Build + Compilazione + + + + Output Path + Percorso di output + + + + The path to the primary output + Percorso dell'output primario + + + + The complete path to '{0}' exceeds the maximum number of characters permitted by the file system. + Il percorso completo di '{0}' supera il numero massimo di caratteri consentiti dal file system. + + + + Custom Tool + Strumento personalizzato + + + + Specifies the tool that transforms a file at design time and places the output of that transformation into another file. For example, a dataset (.xsd) file comes with a default custom tool. + Consente di specificare lo strumento che trasforma un file in fase di progettazione e inserisce l'output di tale trasformazione in un altro file. Ad esempio, con un file dataset (con estensione xsd) viene fornito uno strumento personalizzato predefinito. + + + + Custom Tool Namespace + Spazio dei nomi strumento personalizzato + + + + The namespace into which the output of the custom tool is placed. + Spazio dei nomi in cui viene inserito l'output dello strumento personalizzato. + + + + Primary Output + Output primario + + + + Content Files + File di dati + + + + Documentation Files + File di documentazione + + + + Localized Resources + Risorse localizzate + + + + Source Files + File di origine + + + + Debug Symbols + Simboli di debug + + + + XML Serialization Assemblies + Assembly di serializzazione XML + + + + Contains the DLL or EXE built by the project. + Contiene il file DLL o EXE compilato dal progetto. + + + + Contains all content files in the project. + Contiene tutti i file di dati del progetto. + + + + Contains the XML Documentation files for the project. + Contiene i file della documentazione XML per il progetto. + + + + Contains the satellite assemblies for each culture's resources. + Contiene gli assembly satellite per le risorse di ciascuna delle impostazioni cultura. + + + + Contains all source files in the project. + Contiene tutti i file di origine del progetto. + + + + Contains the debugging files for the project. + Contiene i file di debug del progetto. + + + + Contains the XML serialization assemblies for the project. + Contiene gli assembly di serializzazione XML per il progetto. + + + + The project file '{0}' has been modified outside of Visual Studio. Do you want to reload the project? + Il file di progetto '{0}' è stato modificato all'esterno di Visual Studio. Ricaricare il progetto? + + + + The nested project has failed to reload. + Non è stato possibile ricaricare il progetto annidato. + + + + The item '{0}' cannot be found on disk, either because it has been renamed, deleted, or moved to a new location. + L'elemento '{0}' non è stato trovato nel disco perché è stato rinominato, eliminato o spostato in un nuovo percorso. + + + + A reference to {0} could not be added. Please make sure that the file is accessible, and that it is a valid assembly or COM component. + Non è stato possibile aggiungere un riferimento a {0}. Assicurarsi che il file sia accessibile e che sia un componente COM o un assembly valido. + + + + An 'Import' of the file '{1}' was found in the project file '{0}'. This file is not registered as a safe file to import, and could contain targets and tasks that are harmful. If this imported file is indeed considered safe, then it can be registered by writing to the registry key {2}. + Tag 'Import' del file '{1}' trovato nel file di progetto '{0}'. Questo file non è registrato come sicuro ai fini dell'importazione e potrebbe contenere destinazioni e attività dannose. Se tale file importato viene considerato sicuro, è possibile registrarlo nella chiave del Registro di sistema {2}. + + + + An 'Import' of the file '{1}' was found in the user project file '{0}'. All imports in user project files are considered unsafe. + Tag 'Import' del file '{1}' trovato nel file di progetto '{0}' dell'utente. Tutte le importazioni nei file di progetto utente vengono considerate non sicure. + + + + One or more items named '{1}' were found in the project file '{0}'. These items normally should not be specified in the project file. They can change the way targets and tasks are executed during project load, and this could have harmful effects. + Uno o più elementi denominati '{1}' trovati nel file di progetto '{0}'. Normalmente questi elementi non dovrebbero essere specificati nel file di progetto. Essi possono modificare la modalità di esecuzione di destinazioni e attività durante il caricamento del progetto, con conseguenti effetti dannosi. + + + + A property named '{1}' was found in the project file '{0}'. This property normally should not be specified in the project file. Its value can change the way targets and tasks are executed during project load, and this could have harmful effects. + Proprietà denominata '{1}' trovata nel file di progetto '{0}'. Normalmente questa proprietà non dovrebbe essere specificata nel file di progetto. Il suo valore può modificare la modalità di esecuzione di destinazioni e attività durante il caricamento del progetto, con conseguenti effetti dannosi. + + + + A 'UsingTask' tag which registers the '{1}' task was found in the project file '{0}'. 'UsingTask' tags in the project file take precedence over those in the imported .TARGETS files, and therefore could be used to execute arbitrary code during an otherwise unmodified build process. + Tag 'UsingTask' che registra l'attività '{1}' trovato nel file di progetto '{0}'. I tag 'UsingTask' presenti nel file di progetto hanno la precedenza rispetto a quelli nei file .TARGETS importati e potrebbero pertanto essere utilizzati per eseguire codice arbitrario durante un processo di compilazione altrimenti non modificato. + + + + A 'Target' named '{1}' was found in the project file '{0}'. The tasks within this target could contain arbitrary code and may get executed as soon as the project is loaded in the IDE. + Un elemento 'Target' denominato '{1}' è stato trovato nel file di progetto '{0}'. Le attività della destinazione potrebbero contenere codice arbitrario e potrebbero venire eseguite al caricamento del progetto nell'IDE. + + + + An item referring to the file '{1}' was found in the project file '{0}'. Since this file is located within a system directory, root directory, or network share, it could be harmful to write to this file. + Elemento che fa riferimento al file '{1}' trovato nel file di progetto '{0}'. Poiché il file si trova all'interno di una directory di sistema, una directory radice o una condivisione di rete, la scrittura nel file potrebbe essere dannosa. + + + + The project location is not trusted:{0}{0}{1}{0}{0}Running the application may result in security exceptions when it attempts to perform actions which require full trust.{0}{0}Click OK to ignore and continue. + Il percorso del progetto non è attendibile:{0}{0}{1}{0}{0}È possibile che l'applicazione generi eccezioni di sicurezza dovute all'esecuzione di azioni che richiedono l'attendibilità totale.{0}{0}Scegliere OK per ignorare e continuare. + + + + Exception was thrown during BuildBegin event\n{0} + Eccezione generata durante l'evento BuildBegin\n{0} + + + + Copy always + Copia sempre + CopyToOutputDirectory - drop down option + + + Copy to Output Directory + Copia nella directory di output + + + + Specifies the source file will be copied to the output directory + Specifica se il file del codice sorgente verrà copiato nella directory di output + + + + Copy if newer + Copia se più recente + CopyToOutputDirectory - drop down option + + + Do not copy + Non copiare + CopyToOutputDirectory - drop down option + + + Specific Version + Versione specifica + + + + Indicates whether this reference is to a specific version of an assembly. + Indica se il riferimento è per una versione specifica di un assembly. + + + + Microsoft Visual F# does not support zero-impact projects. To create an F# project from this project template, either go to the Visual Studio menu 'Tools, Options..., Projects and Solutions, General' and check the box marked 'Save new projects when created', or specify <PromptForSaveOnCreation>true</PromptForSaveOnCreation> in the <TemplateData> section of this project template's .vstemplate file, and then retry this operation. + Microsoft Visual F# non supporta progetti a impatto zero. Per creare un progetto F# da questo modello di progetto, accedere alla scheda Generale di Progetti e soluzioni scegliendo Opzioni dal menu Strumenti di Visual Studio e selezionare la casella 'Salva nuovi progetti alla creazione' oppure specificare <PromptForSaveOnCreation>true</PromptForSaveOnCreation> nella sezione <TemplateData> del file con estensione vstemplate del progetto, quindi provare a eseguire di nuovo l'operazione. + + + + "Cannot open F# project '{0}'. \nThis project uses wildcards in item specification: \n'{2}' for item type '{1}'\n\nWildcards in F# projects are not currently supported. + "Non è possibile aprire il progetto F# '{0}'. \nIl progetto usa caratteri jolly nella specifica di elemento: \n'{2}' per il tipo di elemento '{1}'\n\nI caratteri jolly non sono attualmente supportati nei progetti F#. + + + + "Cannot add file {3} to F# project '{0}'. \nThis project uses wildcards in item specification: \n'{2}' for item type '{1}'\n\nWildcards in F# projects are not currently supported. + "Non è possibile aggiungere il file {3} al progetto F# '{0}'. \nIl progetto usa caratteri jolly nella specifica di elemento: \n'{2}' per il tipo di elemento '{1}'\n\nI caratteri jolly non sono attualmente supportati nei progetti F#. + + + + Cannot open project file for edit. + Non è possibile aprire il file di progetto per la modifica. + + + + Project file was checked out and is already upgraded. + Il file di progetto è stato estratto ed è già aggiornato. + + + + A project with an Output Type of Class Library cannot be started directly.\n\nIn order to debug this project, add an executable project to this solution which references the library project. Set the executable project as the startup project. + Non è possibile avviare direttamente un progetto con tipo di output della libreria di classi.\n\nPer eseguire il debug del progetto, aggiungere un progetto eseguibile alla soluzione che fa riferimento al progetto di libreria. Impostare il progetto eseguibile come progetto di avvio. + + + + The entered path is not a valid output path + Il percorso immesso non è un percorso di output valido + + + + The project {0} cannot be referenced. An assembly must have a 'dll' or 'exe' extension in order to be referenced. + Non è possibile fare riferimento al progetto {0}. Per fare riferimento a un assembly, è necessario che abbia estensione 'dll' o 'exe'. + + + + Cannot start a build, because another build is already in progress. + Non è possibile avviare una compilazione perché ne è già in corso un'altra. + + + + The working directory does not exist:\n'{0}'. + La directory di lavoro non esiste:\n'{0}'. + + + + A reference to library '{0}' cannot be added. This project targets a different framework ({2}) from the current project ({1}). + Non è possibile aggiungere un riferimento alla libreria '{0}'. Questo progetto è indirizzato a un framework diverso ({2}) dal progetto corrente ({1}). + + + + The project '{0}' is targeting '{1}'; however, the target framework is not installed on the machine. + Il progetto '{0}' è destinato a '{1}'; tuttavia, il framework di destinazione non è installato nel computer. + + + + F# + F# + + + + The referenced project '{0}' is targeting a higher framework version ({1}) than this project’s current target framework version ({2}). This may lead to build failures if types from assemblies outside this project’s target framework are used by any project in the dependency chain. + Il progetto a cui si fa riferimento '{0}' è indirizzato a una versione di framework più alta ({1}) della versione del framework di destinazione corrente del progetto ({2}). È possibile che si verifichino errori se i tipi degli assembly esterni al framework di destinazione di questo progetto vengono utilizzati da un progetto nella catena delle dipendenze. + + + + The project file does not require conversion. + Il file di progetto non richiede conversione. + + + + No Conversion Required + Conversione non necessaria + + + + Error creating backup of project file: {0} + Errore durante il backup del file di progetto: {0} + + + + Project file successfully backed up as {0} + Backup del file di progetto completato con nome {0} + + + + Backup file name conflict. Renaming file to: {0} + Conflitto nel nome del file di backup. Il file verrà rinominato in {0} + + + + Backed up project may not build. Project contains linked file: {0} + Il progetto di cui si è effettuato il backup potrebbe non essere compilato. Il progetto contiene il seguente file collegato: {0} + + + + Failed to backup file as {0} + Non è stato possibile eseguire il backup del file con nome {0} + + + + File successfully backed up as {0} + Backup del file completato con nome {0} + + + + Identity + Identità + + + + Security identity of the referenced assembly. + Identità di sicurezza dell'assembly a cui viene fatto riferimento. + + + + Path + Percorso + + + + Location of file being referenced. + Percorso del file a cui viene fatto riferimento. + + + + Version + Versione + + + + Copy of {0} + Copia di {0} + + + + Copy ({0}) of {1} + Copia ({0}) di {1} + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/xlf/Microsoft.VisualStudio.Package.Project.ja.xlf b/vsintegration/src/FSharp.ProjectSystem.Base/Project/xlf/Microsoft.VisualStudio.Package.Project.ja.xlf new file mode 100644 index 00000000000..e1bd019f916 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.Base/Project/xlf/Microsoft.VisualStudio.Package.Project.ja.xlf @@ -0,0 +1,820 @@ + + + + + + Failed to add file '{0}' to project as project is null. + プロジェクトが null のため、ファイル '{0}' をプロジェクトに追加できませんでした。 + + + + Advanced + 詳細 + Project Property Page Caption + + + A reference to '{0}' could not be added. + '{0}' への参照を追加できませんでした。 + ReferenceCouldNotBeAdded error message + + + A reference to '{0}' could not be added. A reference to the component '{1}' already exists in the project. + {0}' への参照を追加できませんでした。コンポーネント '{1}' への参照は、プロジェクトに既に存在します。 + ReferenceAlreadyExists error message + + + A reference to '{0}' (with assembly name '{1}') could not be added. A reference to the component '{2}' with the same assembly name already exists in the project. + {0}' への参照 (アセンブリ名 '{1}') を追加できませんでした。同じアセンブリ名を持つコンポーネント '{2}' が、プロジェクトに既に存在します。 + ReferenceAlreadyExists error message + + + Could not load attribute '{0}' from project file '{1}'. + プロジェクト ファイル '{1}' から属性 '{0}' を読み込めませんでした。 + + + + Build Action + ビルド アクション + Project Build Property Name + + + How the file relates to the build and deployment process + ビルドおよび配置のプロセスにファイルがどのように関連しているかを示します + Project Build Property Description + + + Verbosity + 詳細 + + + + Specify how much information is included in the build output + ビルド出力に含まれる情報の量を指定します + + + + ECMA-335 CLI compatible framework (location must be provided) + ECMA-335 CLI 互換フレームワーク (場所の指定が必要) + Target platform drop down option + + + Compile + コンパイル + Build Action - drop down option + + + If you change a file name extension, the file may become unusable. Are you sure you want to change it? + ファイル名の拡張子を変更すると、ファイルが使用できなくなる可能性があります。変更しますか? + + + + A file with name '{0}' already exists and is open in an editor. Please give a unique name to the item you are adding, or delete the existing item first. + '{0}' という名前のファイルは既に存在し、エディターで開かれています。追加しようとしている項目に一意の名前を指定するか、最初に既存の項目を削除してください。 + + + + Cannot save '{0}' as it is not open in the editor. + '{0}' はエディターで開かれていないため、保存できません。 + + + + Content + コンテンツ + Build Action - drop down option + + + Copy Local + ローカルにコピー + File property + + + Indicates whether the reference will be copied to the output directory. + 参照が出力ディレクトリにコピーされるかどうかを示します。 + + + + Detailed + 詳細 + + + + Diagnostic + 診断 + + + + Directory already exists + ディレクトリは既に存在します + + + + Error opening specified view '{0}' using editor '{1}' + 指定されたビュー '{0}' をエディター '{1}' で開くときにエラーが発生しました + + + + Embedded Resource + 埋め込みリソース + Build Action - drop down option + + + error + エラー + + + + Files and folders cannot be: +- Empty strings +- System reserved names, including 'CON', 'AUX', PRN', 'COM1' or 'LPT2' +- contain only '.' +- have any of the following characters: / ? : & \ * " < > | # % + ファイル名およびフォルダー名を次の形式にすることはできません: +- 空の文字列 +- システム予約名 ('CON'、'AUX'、'PRN'、'COM1'、'LPT2' など) +- '.' のみ +- 次の文字を含む: / ? : & \ * " < > | # % + + + + The name you provided is not a valid project name. + 指定された名前は有効なプロジェクト名ではありません。 + + + + MSBuild path not found in registry. Please reinstall to fix the problem. + MSBuild パスがレジストリに見つかりませんでした。再インストールして問題を解決してください。 + + + + Error Saving File + ファイルの保存エラー + + + + Console Application + コンソール アプリケーション + + + + Expecting object of type {0}. + 型 {0} のオブジェクトが必要です。 + + + + Failed to retrieve msbuild property {0} from the project file. + msbuild プロパティ {0} をプロジェクト ファイルから取得できませんでした。 + The exception message thrown when getting a property from msbuild fails. + + + A file with the same name '{0}' already exists. Do you want to overwrite it? + 同じ名前 '{0}' のファイルが既に存在します。上書きしますか? + + + + A file with the same name '{0}' already exists. + 同じ名前 '{0}' のファイルが既に存在します。 + + + + Destination File Exists + 対象ファイルが存在します + + + + A file of this name is already part of the project. Do you want to overwrite it? + この名前のファイルは既にプロジェクトの一部です。上書きしますか? + + + + Destination File Exists + 対象ファイルが存在します + + + + A file or folder with the name '{0}' already exists on disk at this location. Please choose another name. + {0}' という名前のファイルまたはフォルダーが、ディスク上のこの場所に既に存在します。別の名前を選択してください。 + + + + Error Copying File + ファイルのコピー エラー + + + + File Name + ファイル名 + + + + File and folder names cannot contain a leading period. + ファイル名とフォルダー名の先頭にピリオドを使用することはできません。 + + + + The name of the file or folder + ファイルまたはフォルダーの名前 + + + + Folder Name + フォルダー名 + + + + Name of this folder + このフォルダーの名前 + + + + Full Path + 完全パス + + + + Location of the file + ファイルの場所 + + + + The item '{0}' does not exist in the project directory. It may have been moved, renamed or deleted. + 項目 '{0}' はプロジェクト ディレクトリに存在しません。移動されたか、名前が変更されたか、または削除された可能性があります。 + + + + Cannot save '{0}' outside the project directory. Linked items are not supported. + '{0}' をプロジェクト ディレクトリの外部に保存できません。リンクされた項目はサポートされていません。 + + + + Class Library + クラス ライブラリ + + + + Minimal + 最小 + + + + Misc + その他 + + + + None + なし + + + + Normal + 標準 + + + + Item is not available or corrupted and thus cannot be pasted. + 項目は使用できないか破損しているため、貼り付けることができません。 + + + + Program + プログラム + + + + Project + プロジェクト + + + + A reference to library '{0}' cannot be added. Adding this project as a reference would cause a circular dependency. + ライブラリ '{0}' への参照を追加できません。このプロジェクトを参照として追加すると、循環する依存関係が発生します。 + + + + Project File + プロジェクト ファイル + + + + The name of the file containing build, configuration, and other information about the project. + プロジェクトのビルド、構成、およびその他の情報を含むファイルの名前です。 + + + + Project Folder + プロジェクト フォルダー + + + + The absolute location of the project. + プロジェクトの保存場所です。絶対パスで指定されます。 + + + + Quiet + 非表示 + + + + (Name) + (名前) + + + + References + 参照設定 + + + + Display name of the reference + 参照の表示名です + + + + Rename directory failed. {0} + ディレクトリ名を変更できませんでした。{0} + + + + RTL_False + RTL_False + + + + Save? + 保存しますか? + + + + Do you want to save modified documents? + 変更されたドキュメントを保存しますか? + + + + The project file can only be saved into the project location '{0}'. + プロジェクト ファイルはプロジェクトの場所 '{0}' にのみ保存できます。 + + + + Error opening specified view '{0}' using standard editor. + 指定されたビュー '{0}' を標準のエディターで開くときにエラーが発生しました。 + + + + URL + URL + + + + You are trying to use an item that has already been deleted or that does not exist. + 使用しようとしている項目は既に削除されているか存在しません。 + + + + Microsoft .Net Framework v1.0 + Microsoft .Net Framework v1.0 + + + + Microsoft .Net Framework v1.1 + Microsoft .Net Framework v1.1 + + + + Microsoft .Net Framework v2.0 + Microsoft .Net Framework v2.0 + + + + warning + 警告 + + + + Windows Application + Windows アプリケーション + + + + Automation object invalid. + オートメーション オブジェクトが無効です。 + + + + The command you are attempting cannot be completed because the file '{0}' that must be modified cannot be changed. If the file is under source control, you may want to check it out; if the file is read-only on disk, you may want to change its attributes. + 変更しなければならないファイル '{0}' を変更できないため、実行しようとしているコマンドを完了できません。このファイルがソース管理下にある場合は、チェックアウトしてください。ファイルがディスク上で読み取り専用の場合は、ファイルの属性を変更してください。 + MsgBox + + + Parameter must be a valid guid. + パラメーターは有効な GUID でなければなりません。 + Error message in the ArgumentException for a parameter that is not a valid guid. + + + Invalid logger type\nExpected: {0}\nReceived: {1} + ロガーの種類が無効です\n必要な種類: {0}\n受け取った種類: {1} + Error message thrown for when an invalid logger type is set. + + + InvalidParameter + InvalidParameter + Generic error message for invalid parameters. + + + ParameterCannotBeNullOEmpty + ParameterCannotBeNullOEmpty + Error message for string parameters that cannot be null or empty. + + + Parameter must be a valid item identifier. + パラメーターは有効な項目の識別子でなければなりません。 + Error message thrown when an invalid item id is retrieved. + + + File Properties + ファイルのプロパティ + + + + Folder Properties + フォルダーのプロパティ + + + + Project Properties + プロジェクトのプロパティ + + + + Reference Properties + 参照プロパティ + + + + A file or folder with the name '{0}' already exists on disk at this location. Please choose another name. + {0}' という名前のファイルまたはフォルダーが、ディスク上のこの場所に既に存在します。別の名前を選択してください。 + + + + This folder cannot be renamed to '{0}' as it already exists on disk.\n\nOnly empty folders can be renamed to existing folders. This folder contains files within it on disk. + このフォルダーは既にディスク上に存在するため、名前を '{0}' に変更できません。\n\n既存のフォルダー名に名前を変更できるのは空のフォルダーのみです。このフォルダーにはディスク上のファイルが含まれています。 + + + + Build + ビルド + + + + Output Path + 出力パス + + + + The path to the primary output + プライマリ出力へのパス + + + + The complete path to '{0}' exceeds the maximum number of characters permitted by the file system. + '{0}' への絶対パスが、ファイル システムで許可されている最大文字数を超えています。 + + + + Custom Tool + カスタム ツール + + + + Specifies the tool that transforms a file at design time and places the output of that transformation into another file. For example, a dataset (.xsd) file comes with a default custom tool. + 設計時にファイルを変換し、その変換結果を別のファイルに出力するツールを指定します。たとえば、データセット (.xsd) ファイルには既定のカスタム ツールが用意されています。 + + + + Custom Tool Namespace + カスタム ツールの名前空間 + + + + The namespace into which the output of the custom tool is placed. + カスタム ツールの出力を配置する名前空間です。 + + + + Primary Output + プライマリ出力 + + + + Content Files + コンテンツ ファイル + + + + Documentation Files + ドキュメント ファイル + + + + Localized Resources + ローカライズされたリソース + + + + Source Files + ソース ファイル + + + + Debug Symbols + デバッグ シンボル + + + + XML Serialization Assemblies + XML シリアル化アセンブリ + + + + Contains the DLL or EXE built by the project. + プロジェクトでビルドされた DLL または EXE が含まれます。 + + + + Contains all content files in the project. + プロジェクトのすべてのコンテンツ ファイルが含まれます。 + + + + Contains the XML Documentation files for the project. + プロジェクトの XML ドキュメント ファイルが含まれます。 + + + + Contains the satellite assemblies for each culture's resources. + 各カルチャのリソース用サテライト アセンブリが含まれます。 + + + + Contains all source files in the project. + プロジェクトのすべてのソース ファイルが含まれます。 + + + + Contains the debugging files for the project. + プロジェクトのデバッグ ファイルが含まれます。 + + + + Contains the XML serialization assemblies for the project. + プロジェクトの XML シリアル化アセンブリが含まれます。 + + + + The project file '{0}' has been modified outside of Visual Studio. Do you want to reload the project? + プロジェクト ファイル '{0}' は Visual Studio の外部で変更されています。プロジェクトを再度読み込みますか? + + + + The nested project has failed to reload. + 入れ子にされたプロジェクトの再読み込みに失敗しました。 + + + + The item '{0}' cannot be found on disk, either because it has been renamed, deleted, or moved to a new location. + 項目 '{0}' がディスクに見つかりません。名前が変更されたか、削除されたか、または新しい場所に移動した可能性があります。 + + + + A reference to {0} could not be added. Please make sure that the file is accessible, and that it is a valid assembly or COM component. + {0} への参照を追加できませんでした。ファイルがアクセス可能で、有効なアセンブリまたは COM コンポーネントであることを確認してください。 + + + + An 'Import' of the file '{1}' was found in the project file '{0}'. This file is not registered as a safe file to import, and could contain targets and tasks that are harmful. If this imported file is indeed considered safe, then it can be registered by writing to the registry key {2}. + プロジェクト ファイル '{0}' にファイル '{1}' の 'Import' が見つかりました。このファイルはインポートできる安全なファイルとして登録されていません。危害を及ぼすターゲットおよびタスクが含まれているおそれがあります。このインポートされるファイルが確実に安全と見なされる場合は、レジストリ キー {2} に書き込むことでファイルを登録できます。 + + + + An 'Import' of the file '{1}' was found in the user project file '{0}'. All imports in user project files are considered unsafe. + ユーザー プロジェクト ファイル '{0}' にファイル '{1}' の 'Import' が見つかりました。ユーザー プロジェクト ファイル内のインポートはすべて安全でないと見なされます。 + + + + One or more items named '{1}' were found in the project file '{0}'. These items normally should not be specified in the project file. They can change the way targets and tasks are executed during project load, and this could have harmful effects. + プロジェクト ファイル '{0}' に '{1}' という項目が 1 つ以上見つかりました。通常、これらの項目はプロジェクト ファイル内で指定しないでください。プロジェクトの読み込み中、これらの項目によってターゲットやタスクの実行方法が変更される可能性があり、危害が及ぶおそれがあります。 + + + + A property named '{1}' was found in the project file '{0}'. This property normally should not be specified in the project file. Its value can change the way targets and tasks are executed during project load, and this could have harmful effects. + プロジェクト ファイル '{0}' に '{1}' というプロパティが見つかりました。通常、このプロパティはプロジェクト ファイル内で指定しないでください。プロジェクトの読み込み中、この値によってターゲットやタスクの実行方法が変更される可能性があり、危害が及ぶおそれがあります。 + + + + A 'UsingTask' tag which registers the '{1}' task was found in the project file '{0}'. 'UsingTask' tags in the project file take precedence over those in the imported .TARGETS files, and therefore could be used to execute arbitrary code during an otherwise unmodified build process. + プロジェクト ファイル '{0}' に、'{1}' タスクを登録する 'UsingTask' タグが見つかりました。プロジェクト ファイル内の 'UsingTask' タグは、インポートされた .TARGETS ファイル内のタグよりも優先されます。このため、その指定なしでは変更されないビルド処理中に、任意のコードを実行する目的で使用される可能性があります。 + + + + A 'Target' named '{1}' was found in the project file '{0}'. The tasks within this target could contain arbitrary code and may get executed as soon as the project is loaded in the IDE. + プロジェクト ファイル '{0}' に '{1}' という 'Target' が見つかりました。このターゲット内のタスクには任意のコードが含まれ、IDE でプロジェクトが読み込まれるとすぐに実行される可能性があります。 + + + + An item referring to the file '{1}' was found in the project file '{0}'. Since this file is located within a system directory, root directory, or network share, it could be harmful to write to this file. + プロジェクト ファイル '{0}' にファイル '{1}' を参照する項目が見つかりました。このファイルはシステム ディレクトリ、ルート ディレクトリ、またはネットワーク共有内に配置されているため、このファイルへの書き込みは危害を及ぼすおそれがあります。 + + + + The project location is not trusted:{0}{0}{1}{0}{0}Running the application may result in security exceptions when it attempts to perform actions which require full trust.{0}{0}Click OK to ignore and continue. + プロジェクトの場所が信頼されていません: {0}{0}{1}{0}{0}このアプリケーションを実行すると、完全な信頼が必要なアクションが試行されたときに、セキュリティ例外が発生する可能性があります。{0}{0}無視して続行するには、[OK]5D; をクリックしてください。 + + + + Exception was thrown during BuildBegin event\n{0} + BuildBegin イベントで例外がスローされました\n{0} + + + + Copy always + 常にコピーする + CopyToOutputDirectory - drop down option + + + Copy to Output Directory + 出力ディレクトリにコピー + + + + Specifies the source file will be copied to the output directory + ソース ファイルを出力ディレクトリにコピーするよう指定します + + + + Copy if newer + 新しい場合はコピーする + CopyToOutputDirectory - drop down option + + + Do not copy + コピーしない + CopyToOutputDirectory - drop down option + + + Specific Version + 特定バージョン + + + + Indicates whether this reference is to a specific version of an assembly. + 特定バージョンのアセンブリへの参照かどうかを示します。 + + + + Microsoft Visual F# does not support zero-impact projects. To create an F# project from this project template, either go to the Visual Studio menu 'Tools, Options..., Projects and Solutions, General' and check the box marked 'Save new projects when created', or specify <PromptForSaveOnCreation>true</PromptForSaveOnCreation> in the <TemplateData> section of this project template's .vstemplate file, and then retry this operation. + Microsoft Visual F# では、影響のないプロジェクトをサポートしていません。F# プロジェクトをこのプロジェクト テンプレートから作成するには、Visual Studio メニューの [ツール]5D; の [オプション]5D; をクリックし、[プロジェクトおよびソリューション]5D; の [全般]5D; の [作成時に新しいプロジェクトを保存]5D; チェック ボックスをオンにするか、またはプロジェクト テンプレートの .vstemplate ファイルの <TemplateData> セクションで <PromptForSaveOnCreation>true</PromptForSaveOnCreation> を指定し、この操作を再試行してください。 + + + + "Cannot open F# project '{0}'. \nThis project uses wildcards in item specification: \n'{2}' for item type '{1}'\n\nWildcards in F# projects are not currently supported. + "F# プロジェクト '{0}' を開けません。 \nこのプロジェクトでは、項目の指定にワイルドカードを使用します: \n'{2}' (対象の項目の種類 '{1}')\n\nF# プロジェクトでのワイルドカードの使用は現在サポートされていません。 + + + + "Cannot add file {3} to F# project '{0}'. \nThis project uses wildcards in item specification: \n'{2}' for item type '{1}'\n\nWildcards in F# projects are not currently supported. + "ファイル {3} を F# プロジェクト '{0}' に追加できません。 \nこのプロジェクトでは、項目の指定にワイルドカードを使用します: \n'{2}' (対象の項目の種類 '{1}')\n\nF# プロジェクトでのワイルドカードの使用は現在サポートされていません。 + + + + Cannot open project file for edit. + プロジェクト ファイルを編集のために開くことができません。 + + + + Project file was checked out and is already upgraded. + プロジェクト ファイルはチェックアウトされており、既にアップグレードされています。 + + + + A project with an Output Type of Class Library cannot be started directly.\n\nIn order to debug this project, add an executable project to this solution which references the library project. Set the executable project as the startup project. + 出力の種類がクラス ライブラリのプロジェクトを直接起動することはできません。\n\nこのプロジェクトをデバッグするには、ライブラリ プロジェクトを参照するこのソリューションに実行可能なプロジェクトを追加し、それをスタートアップ プロジェクトとして設定します。 + + + + The entered path is not a valid output path + 入力されたパスは有効な出力パスではありません + + + + The project {0} cannot be referenced. An assembly must have a 'dll' or 'exe' extension in order to be referenced. + プロジェクト '{0}' を参照できません。アセンブリを参照するには 'dll' または 'exe' の拡張子を指定する必要があります。 + + + + Cannot start a build, because another build is already in progress. + 別のビルドが既に進行中であるため、ビルドを開始できません。 + + + + The working directory does not exist:\n'{0}'. + 作業ディレクトリが存在しません:\n'{0}'。 + + + + A reference to library '{0}' cannot be added. This project targets a different framework ({2}) from the current project ({1}). + ライブラリ '{0}' への参照を追加できません。このプロジェクトのターゲット フレームワーク ({2}) は現在のプロジェクトのターゲット フレームワーク ({1}) と異なります。 + + + + The project '{0}' is targeting '{1}'; however, the target framework is not installed on the machine. + プロジェクト '{0}' のターゲットは '{1}' ですが、ターゲット フレームワークがコンピューターにインストールされていません。 + + + + F# + F# + + + + The referenced project '{0}' is targeting a higher framework version ({1}) than this project’s current target framework version ({2}). This may lead to build failures if types from assemblies outside this project’s target framework are used by any project in the dependency chain. + 参照されているプロジェクト '{0}' は、より新しいバージョン ({1}) のフレームワークをターゲットとしています。このプロジェクトの現在のターゲット フレームワークのバージョンは {2} です。このプロジェクトのターゲット フレームワークの範囲外のアセンブリの種類が依存関係チェーンのいずれかのプロジェクトで使用されている場合、バージョンの違いが原因でビルドに失敗する可能性があります。 + + + + The project file does not require conversion. + プロジェクト ファイルを変換する必要はありません。 + + + + No Conversion Required + 変換の必要なし + + + + Error creating backup of project file: {0} + プロジェクト ファイルのバックアップ作成中にエラーが発生しました: {0} + + + + Project file successfully backed up as {0} + プロジェクト ファイルは正常に {0} としてバックアップされました + + + + Backup file name conflict. Renaming file to: {0} + バックアップ ファイル名が競合しています。ファイル名を {0} に変更します。 + + + + Backed up project may not build. Project contains linked file: {0} + バックアップされたプロジェクトはビルドしない可能性があります。プロジェクトはリンク ファイル {0} を含んでいます。 + + + + Failed to backup file as {0} + ファイルを {0} としてバックアップするのに失敗しました + + + + File successfully backed up as {0} + ファイルは正常に {0} としてバックアップされました + + + + Identity + ID + + + + Security identity of the referenced assembly. + 参照アセンブリのセキュリティ ID です。 + + + + Path + パス + + + + Location of file being referenced. + 参照されているファイルの場所です。 + + + + Version + バージョン + + + + Copy of {0} + コピー ~ {0} + + + + Copy ({0}) of {1} + コピー ({0}) /{1} + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/xlf/Microsoft.VisualStudio.Package.Project.ko.xlf b/vsintegration/src/FSharp.ProjectSystem.Base/Project/xlf/Microsoft.VisualStudio.Package.Project.ko.xlf new file mode 100644 index 00000000000..e276c7856ce --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.Base/Project/xlf/Microsoft.VisualStudio.Package.Project.ko.xlf @@ -0,0 +1,820 @@ + + + + + + Failed to add file '{0}' to project as project is null. + 프로젝트가 null이므로 '{0}' 파일을 프로젝트에 추가하지 못했습니다. + + + + Advanced + 고급 + Project Property Page Caption + + + A reference to '{0}' could not be added. + '{0}'에 대한 참조를 추가하지 못했습니다. + ReferenceCouldNotBeAdded error message + + + A reference to '{0}' could not be added. A reference to the component '{1}' already exists in the project. + {0}'에 대한 참조를 추가할 수 없습니다. '{1}' 구성 요소에 대한 참조가 프로젝트에 이미 있습니다. + ReferenceAlreadyExists error message + + + A reference to '{0}' (with assembly name '{1}') could not be added. A reference to the component '{2}' with the same assembly name already exists in the project. + {0}'(어셈블리 이름 '{1}')에 대한 참조를 추가하지 못했습니다. 프로젝트에 같은 어셈블리 이름을 갖는 구성 요소 '{2}'에 대한 참조가 이미 있습니다. + ReferenceAlreadyExists error message + + + Could not load attribute '{0}' from project file '{1}'. + 프로젝트 파일 '{1}'에서 '{0}' 특성을 로드할 수 없습니다. + + + + Build Action + 빌드 작업 + Project Build Property Name + + + How the file relates to the build and deployment process + 파일이 빌드 및 배포 프로세스와 연결되는 방법입니다. + Project Build Property Description + + + Verbosity + 자세한 정도 + + + + Specify how much information is included in the build output + 빌드 출력에 포함할 정보의 양을 지정합니다. + + + + ECMA-335 CLI compatible framework (location must be provided) + ECMA-335 CLI 호환 프레임워크(위치를 지정해야 함) + Target platform drop down option + + + Compile + 컴파일 + Build Action - drop down option + + + If you change a file name extension, the file may become unusable. Are you sure you want to change it? + 파일 확장명을 바꾸면 파일을 사용할 수 없게 될 수도 있습니다. 확장명을 바꾸시겠습니까? + + + + A file with name '{0}' already exists and is open in an editor. Please give a unique name to the item you are adding, or delete the existing item first. + 이름이 '{0}'인 파일이 이미 있으며 편집기에 열려 있습니다. 추가할 항목에 고유한 이름을 지정하거나 먼저 기존 항목을 삭제하세요. + + + + Cannot save '{0}' as it is not open in the editor. + '{0}'은(는) 편집기에 열려 있지 않으므로 저장할 수 없습니다. + + + + Content + 내용 + Build Action - drop down option + + + Copy Local + 로컬 복사 + File property + + + Indicates whether the reference will be copied to the output directory. + 참조를 출력 디렉터리로 복사할지 여부를 나타냅니다. + + + + Detailed + 자세히 + + + + Diagnostic + 진단 + + + + Directory already exists + 디렉터리가 이미 있습니다. + + + + Error opening specified view '{0}' using editor '{1}' + 편집기 '{1}'을(를) 사용하여 지정한 뷰 '{0}'을(를) 여는 동안 오류가 발생했습니다. + + + + Embedded Resource + 포함 리소스 + Build Action - drop down option + + + error + 오류 + + + + Files and folders cannot be: +- Empty strings +- System reserved names, including 'CON', 'AUX', PRN', 'COM1' or 'LPT2' +- contain only '.' +- have any of the following characters: / ? : & \ * " < > | # % + 파일 및 폴더에는 다음 문자를 사용할 수 없습니다. +- 빈 문자열 +- 'CON', 'AUX', PRN', 'COM1', 'LPT2' 등의 시스템 예약 이름 +- '.'만 포함 +- / ? : & \ * " < > | # % 문자 포함 + + + + The name you provided is not a valid project name. + 지정한 이름이 올바른 프로젝트 이름이 아닙니다. + + + + MSBuild path not found in registry. Please reinstall to fix the problem. + 레지스트리에 MSBuild 경로가 없습니다. 문제를 해결하려면 다시 설치하세요. + + + + Error Saving File + 파일 저장 오류 + + + + Console Application + 콘솔 응용 프로그램 + + + + Expecting object of type {0}. + 형식이 {0}인 개체가 필요합니다. + + + + Failed to retrieve msbuild property {0} from the project file. + 프로젝트 파일에서 msbuild 속성 {0}을(를) 검색하지 못했습니다. + The exception message thrown when getting a property from msbuild fails. + + + A file with the same name '{0}' already exists. Do you want to overwrite it? + 같은 이름 '{0}'을(를) 사용하는 파일이 이미 있습니다. 덮어쓰시겠습니까? + + + + A file with the same name '{0}' already exists. + 같은 이름 '{0}'을(를) 사용하는 파일이 이미 있습니다. + + + + Destination File Exists + 대상 파일 있음 + + + + A file of this name is already part of the project. Do you want to overwrite it? + 이름이 같은 파일이 이미 프로젝트에 포함되어 있습니다. 덮어쓰시겠습니까? + + + + Destination File Exists + 대상 파일 있음 + + + + A file or folder with the name '{0}' already exists on disk at this location. Please choose another name. + 이름이 '{0}'인 파일 또는 폴더가 이 위치의 디스크에 이미 있습니다. 다른 이름을 선택하세요. + + + + Error Copying File + 파일 복사 오류 + + + + File Name + 파일 이름 + + + + File and folder names cannot contain a leading period. + 파일 및 폴더 이름의 맨 앞에는 마침표를 사용할 수 없습니다. + + + + The name of the file or folder + 파일 또는 폴더의 이름 + + + + Folder Name + 폴더 이름 + + + + Name of this folder + 이 폴더의 이름 + + + + Full Path + 전체 경로 + + + + Location of the file + 파일 위치 + + + + The item '{0}' does not exist in the project directory. It may have been moved, renamed or deleted. + 프로젝트 디렉터리에 '{0}' 항목이 없습니다. 파일이 이동되었거나 이름이 바뀌었거나 삭제되었습니다. + + + + Cannot save '{0}' outside the project directory. Linked items are not supported. + 프로젝트 디렉터리 외부에 '{0}'을(를) 저장할 수 없습니다. 연결된 항목이 지원되지 않습니다. + + + + Class Library + 클래스 라이브러리 + + + + Minimal + 최소 + + + + Misc + 기타 + + + + None + 없음 + + + + Normal + 보통 + + + + Item is not available or corrupted and thus cannot be pasted. + 항목을 사용할 수 없거나 항목이 손상되어 붙여 넣을 수 없습니다. + + + + Program + 프로그램 + + + + Project + 프로젝트 + + + + A reference to library '{0}' cannot be added. Adding this project as a reference would cause a circular dependency. + '{0}' 라이브러리에 대한 참조를 추가할 수 없습니다. 이 프로젝트를 참조로 추가하면 순환 종속성이 발생할 수 있습니다. + + + + Project File + 프로젝트 파일 + + + + The name of the file containing build, configuration, and other information about the project. + 빌드, 구성 및 기타 프로젝트 정보가 들어 있는 파일의 이름입니다. + + + + Project Folder + 프로젝트 폴더 + + + + The absolute location of the project. + 프로젝트의 절대 위치입니다. + + + + Quiet + 최소 + + + + (Name) + (이름) + + + + References + 참조 + + + + Display name of the reference + 참조의 표시 이름입니다. + + + + Rename directory failed. {0} + 디렉터리 이름을 바꾸지 못했습니다. {0} + + + + RTL_False + RTL_False + + + + Save? + 저장하시겠습니까? + + + + Do you want to save modified documents? + 수정된 문서를 저장하시겠습니까? + + + + The project file can only be saved into the project location '{0}'. + 프로젝트 파일은 프로젝트 위치 '{0}'에만 저장할 수 있습니다. + + + + Error opening specified view '{0}' using standard editor. + 표준 편집기를 사용하여 지정한 뷰 '{0}'을(를) 여는 동안 오류가 발생했습니다. + + + + URL + URL + + + + You are trying to use an item that has already been deleted or that does not exist. + 이미 삭제되었거나 존재하지 않는 항목을 사용하려고 했습니다. + + + + Microsoft .Net Framework v1.0 + Microsoft .Net Framework v1.0 + + + + Microsoft .Net Framework v1.1 + Microsoft .Net Framework v1.1 + + + + Microsoft .Net Framework v2.0 + Microsoft .Net Framework v2.0 + + + + warning + 경고 + + + + Windows Application + Windows 응용 프로그램 + + + + Automation object invalid. + 자동화 개체가 잘못되었습니다. + + + + The command you are attempting cannot be completed because the file '{0}' that must be modified cannot be changed. If the file is under source control, you may want to check it out; if the file is read-only on disk, you may want to change its attributes. + 수정해야 하는 '{0}' 파일을 변경할 수 없으므로 사용하려는 명령을 완료할 수 없습니다. 해당 파일을 소스 제어에서 사용 중인 경우 체크 아웃해야 할 수 있습니다. 파일이 디스크에서 읽기 전용인 경우 파일의 특성을 변경해야 할 수 있습니다. + MsgBox + + + Parameter must be a valid guid. + 매개 변수는 올바른 GUID여야 합니다. + Error message in the ArgumentException for a parameter that is not a valid guid. + + + Invalid logger type\nExpected: {0}\nReceived: {1} + 로거 형식이 잘못되었습니다.\n필요한 형식: {0}\n받은 형식: {1} + Error message thrown for when an invalid logger type is set. + + + InvalidParameter + InvalidParameter + Generic error message for invalid parameters. + + + ParameterCannotBeNullOEmpty + ParameterCannotBeNullOEmpty + Error message for string parameters that cannot be null or empty. + + + Parameter must be a valid item identifier. + 매개 변수는 올바른 항목 식별자여야 합니다. + Error message thrown when an invalid item id is retrieved. + + + File Properties + 파일 속성 + + + + Folder Properties + 폴더 속성 + + + + Project Properties + 프로젝트 속성 + + + + Reference Properties + 참조 속성 + + + + A file or folder with the name '{0}' already exists on disk at this location. Please choose another name. + 이름이 '{0}'인 파일 또는 폴더가 이 위치의 디스크에 이미 있습니다. 다른 이름을 선택하세요. + + + + This folder cannot be renamed to '{0}' as it already exists on disk.\n\nOnly empty folders can be renamed to existing folders. This folder contains files within it on disk. + 이미 디스크에 동일한 이름이 존재하므로 이 폴더의 이름을 '{0}'(으)로 바꿀 수 없습니다.\n\n빈 폴더의 이름만 기존 폴더로 변경할 수 있습니다. 이 폴더는 디스크에서 내부에 파일을 포함합니다. + + + + Build + 빌드 + + + + Output Path + 출력 경로 + + + + The path to the primary output + 기본 출력 경로 + + + + The complete path to '{0}' exceeds the maximum number of characters permitted by the file system. + '{0}'의 전체 경로가 파일 시스템에서 허용하는 최대 문자 수를 초과합니다. + + + + Custom Tool + 사용자 지정 도구 + + + + Specifies the tool that transforms a file at design time and places the output of that transformation into another file. For example, a dataset (.xsd) file comes with a default custom tool. + 디자인 타임에 파일을 변환하고 변환 결과를 다른 파일에 저장하는 도구를 지정합니다. 예를 들어 데이터 집합 파일(.xsd)의 경우 기본 사용자 지정 도구가 제공됩니다. + + + + Custom Tool Namespace + 사용자 지정 도구 네임스페이스 + + + + The namespace into which the output of the custom tool is placed. + 사용자 지정 도구의 출력이 들어갈 네임스페이스입니다. + + + + Primary Output + 기본 출력 + + + + Content Files + 콘텐츠 파일 + + + + Documentation Files + 문서 파일 + + + + Localized Resources + 지역화된 리소스 + + + + Source Files + 소스 파일 + + + + Debug Symbols + 디버그 기호 + + + + XML Serialization Assemblies + XML Serialization 어셈블리 + + + + Contains the DLL or EXE built by the project. + 프로젝트에서 빌드한 DLL 또는 EXE를 포함합니다. + + + + Contains all content files in the project. + 프로젝트의 모든 콘텐츠 파일을 포함합니다. + + + + Contains the XML Documentation files for the project. + 프로젝트의 XML 문서 파일을 포함합니다. + + + + Contains the satellite assemblies for each culture's resources. + 각 문화권 리소스의 위성 어셈블리를 포함합니다. + + + + Contains all source files in the project. + 프로젝트의 모든 소스 파일을 포함합니다. + + + + Contains the debugging files for the project. + 프로젝트의 디버깅 파일을 포함합니다. + + + + Contains the XML serialization assemblies for the project. + 프로젝트의 XML Serialization 어셈블리를 포함합니다. + + + + The project file '{0}' has been modified outside of Visual Studio. Do you want to reload the project? + 프로젝트 파일 '{0}'이(가) Visual Studio 외부에서 수정되었습니다. 프로젝트를 다시 로드하시겠습니까? + + + + The nested project has failed to reload. + 중첩된 프로젝트를 다시 로드하지 못했습니다. + + + + The item '{0}' cannot be found on disk, either because it has been renamed, deleted, or moved to a new location. + '{0}' 항목은 이름이 바뀌었거나 삭제되었거나 또는 새 위치로 이동되었기 때문에 디스크에서 찾을 수 없습니다. + + + + A reference to {0} could not be added. Please make sure that the file is accessible, and that it is a valid assembly or COM component. + {0}에 대한 참조를 추가할 수 없습니다. 파일에 액세스할 수 있는지, 올바른 어셈블리 또는 COM 구성 요소인지 확인하세요. + + + + An 'Import' of the file '{1}' was found in the project file '{0}'. This file is not registered as a safe file to import, and could contain targets and tasks that are harmful. If this imported file is indeed considered safe, then it can be registered by writing to the registry key {2}. + {1}' 파일의 'Import'가 프로젝트 파일 '{0}'에 있습니다. 이 파일은 가져올 수 있는 안전한 파일로 등록되지 않았으며 유해한 대상 및 작업을 포함할 수 있습니다. 가져온 이 파일이 실제로 안전한 경우에는 레지스트리 키 {2}에 작성하여 등록할 수 있습니다. + + + + An 'Import' of the file '{1}' was found in the user project file '{0}'. All imports in user project files are considered unsafe. + ’{1}' 파일의 'Import'가 사용자 프로젝트 파일 '{0}'에 있습니다. 사용자 프로젝트 파일에 있는 가져온 항목은 모두 안전하지 않은 것으로 간주됩니다. + + + + One or more items named '{1}' were found in the project file '{0}'. These items normally should not be specified in the project file. They can change the way targets and tasks are executed during project load, and this could have harmful effects. + 이름이 '{1}'인 항목이 프로젝트 파일 '{0}'에 하나 이상 있습니다. 이러한 항목은 일반적으로 프로젝트 파일에 지정하면 안 됩니다. 이 항목으로 인해 프로젝트가 로드되는 동안 대상 및 작업이 실행되는 방법이 변경될 수 있으며, 그 결과로 나쁜 영향이 미칠 수 있습니다. + + + + A property named '{1}' was found in the project file '{0}'. This property normally should not be specified in the project file. Its value can change the way targets and tasks are executed during project load, and this could have harmful effects. + 이름이 '{1}'인 속성이 프로젝트 파일 '{0}'에 있습니다. 이 속성은 일반적으로 프로젝트 파일에 지정하면 안 됩니다. 해당 값으로 인해 프로젝트가 로드되는 동안 대상 및 작업이 실행되는 방법이 변경될 수 있으며, 그 결과로 나쁜 영향을 줄 수 있습니다. + + + + A 'UsingTask' tag which registers the '{1}' task was found in the project file '{0}'. 'UsingTask' tags in the project file take precedence over those in the imported .TARGETS files, and therefore could be used to execute arbitrary code during an otherwise unmodified build process. + {1}' 작업을 등록하는 'UsingTask' 태그가 프로젝트 파일 '{0}'에 있습니다. 프로젝트 파일의 'UsingTask' 태그는 가져온 .TARGETS 파일의 태그보다 우선 순위가 높으므로 수정되지 않은 빌드 프로세스 동안 임의의 코드를 실행하는 데 사용될 수 있습니다. + + + + A 'Target' named '{1}' was found in the project file '{0}'. The tasks within this target could contain arbitrary code and may get executed as soon as the project is loaded in the IDE. + 이름이 '{1}'인 'Target'이 프로젝트 파일 '{0}'에 있습니다. 이 대상 내의 작업은 임의의 코드를 포함할 수 있으며 프로젝트가 IDE에 로드되는 즉시 실행될 수 있습니다. + + + + An item referring to the file '{1}' was found in the project file '{0}'. Since this file is located within a system directory, root directory, or network share, it could be harmful to write to this file. + {1}' 파일을 참조하는 항목이 프로젝트 파일 '{0}'에 있습니다. 이 파일은 시스템 디렉터리, 루트 디렉터리 또는 네트워크 공유에 위치하므로 이 파일에 작성하는 것은 위험할 수 있습니다. + + + + The project location is not trusted:{0}{0}{1}{0}{0}Running the application may result in security exceptions when it attempts to perform actions which require full trust.{0}{0}Click OK to ignore and continue. + 프로젝트 위치를 신뢰할 수 없습니다.{0}{0}{1}{0}{0}응용 프로그램을 실행하면 완전 신뢰가 필요한 작업을 수행할 때 보안 예외가 발생할 수 있습니다.{0}{0}무시하고 계속하려면 [확인]5D;을 클릭하세요. + + + + Exception was thrown during BuildBegin event\n{0} + BuildBegin 이벤트를 수행하는 동안 예외가 throw되었습니다.\n{0} + + + + Copy always + 항상 복사 + CopyToOutputDirectory - drop down option + + + Copy to Output Directory + 출력 디렉터리에 복사 + + + + Specifies the source file will be copied to the output directory + 소스 파일을 출력 디렉터리로 복사할 것인지 여부를 지정합니다. + + + + Copy if newer + 새 버전이면 복사 + CopyToOutputDirectory - drop down option + + + Do not copy + 복사 안 함 + CopyToOutputDirectory - drop down option + + + Specific Version + 특정 버전 + + + + Indicates whether this reference is to a specific version of an assembly. + 이 참조가 특정 어셈블리 버전에 대한 것인지 여부를 나타냅니다. + + + + Microsoft Visual F# does not support zero-impact projects. To create an F# project from this project template, either go to the Visual Studio menu 'Tools, Options..., Projects and Solutions, General' and check the box marked 'Save new projects when created', or specify <PromptForSaveOnCreation>true</PromptForSaveOnCreation> in the <TemplateData> section of this project template's .vstemplate file, and then retry this operation. + Microsoft Visual F#은 영향 값이 0인 프로젝트를 지원하지 않습니다. 이 프로젝트 템플릿에서 F# 프로젝트를 만들려면 Visual Studio 메뉴 '도구, 옵션..., 프로젝트 및 솔루션, 일반'으로 이동하여 '만들어질 때 새 프로젝트 저장' 확인란을 선택하거나, 이 프로젝트 템플릿의 .vstemplate 파일에서 <TemplateData> 섹션에 <PromptForSaveOnCreation>true</PromptForSaveOnCreation>를 지정한 다음 이 작업을 다시 시도하세요. + + + + "Cannot open F# project '{0}'. \nThis project uses wildcards in item specification: \n'{2}' for item type '{1}'\n\nWildcards in F# projects are not currently supported. + "F# 프로젝트 '{0}'을(를) 열 수 없습니다. \n이 프로젝트에서는 항목 지정에 와일드카드를 사용합니다. \n항목 종류 '{1}'에 대한 '{2}'\n\nF# 프로젝트에서는 현재 와일드카드를 지원하지 않습니다. + + + + "Cannot add file {3} to F# project '{0}'. \nThis project uses wildcards in item specification: \n'{2}' for item type '{1}'\n\nWildcards in F# projects are not currently supported. + "F# 프로젝트 '{0}'에 {3} 파일을 추가할 수 없습니다. \n이 프로젝트에서는 항목 지정에 와일드카드를 사용합니다. \n항목 종류 '{1}'에 대한 '{2}'\n\nF# 프로젝트에서는 현재 와일드카드를 지원하지 않습니다. + + + + Cannot open project file for edit. + 프로젝트 파일을 편집용으로 열 수 없습니다. + + + + Project file was checked out and is already upgraded. + 프로젝트 파일을 체크 아웃했으며 이미 업그레이드되었습니다. + + + + A project with an Output Type of Class Library cannot be started directly.\n\nIn order to debug this project, add an executable project to this solution which references the library project. Set the executable project as the startup project. + 출력 형식이 클래스 라이브러리인 프로젝트는 직접 시작할 수 없습니다.\n\n이 프로젝트를 디버깅하려면 라이브러리 프로젝트를 참조하는 실행 가능 프로젝트를 이 솔루션에 추가하고 해당 실행 가능 프로젝트를 시작 프로젝트로 설정하세요. + + + + The entered path is not a valid output path + 입력한 경로는 올바른 출력 경로가 아닙니다. + + + + The project {0} cannot be referenced. An assembly must have a 'dll' or 'exe' extension in order to be referenced. + {0} 프로젝트를 참조할 수 없습니다. 어셈블리를 참조하려면 확장명이 'dll' 또는 'exe'여야 합니다. + + + + Cannot start a build, because another build is already in progress. + 다른 빌드가 이미 진행 중이므로 빌드를 시작할 수 없습니다. + + + + The working directory does not exist:\n'{0}'. + 작업 디렉터리가 없습니다.\n'{0}'. + + + + A reference to library '{0}' cannot be added. This project targets a different framework ({2}) from the current project ({1}). + {0}' 라이브러리에 대한 참조를 추가할 수 없습니다. 이 프로젝트는 현재 프로젝트({1})의 다른 프레임워크({2})를 대상으로 합니다. + + + + The project '{0}' is targeting '{1}'; however, the target framework is not installed on the machine. + {0}' 프로젝트가 '{1}'을(를) 대상으로 하지만 컴퓨터에 대상 프레임워크가 설치되어 있지 않습니다. + + + + F# + F# + + + + The referenced project '{0}' is targeting a higher framework version ({1}) than this project’s current target framework version ({2}). This may lead to build failures if types from assemblies outside this project’s target framework are used by any project in the dependency chain. + 참조된 '{0}' 프로젝트가 현재 대상 프레임워크 버전({2})보다 더 높은 프레임워크 버전({1})을 대상으로 합니다. 이로 인해 종속성 체인의 프로젝트에서 이 프로젝트의 대상 프레임워크 외부에 있는 어셈블리의 형식을 사용하는 경우 빌드 오류가 발생할 수 있습니다. + + + + The project file does not require conversion. + 변환이 필요 없는 프로젝트 파일입니다. + + + + No Conversion Required + 변환 필요 없음 + + + + Error creating backup of project file: {0} + 프로젝트 파일의 백업을 만드는 동안 오류가 발생했습니다. {0} + + + + Project file successfully backed up as {0} + 프로젝트 파일을 {0}(으)로 백업했습니다. + + + + Backup file name conflict. Renaming file to: {0} + 백업 파일 이름이 충돌합니다. 파일의 이름을 {0}(으)로 바꿉니다. + + + + Backed up project may not build. Project contains linked file: {0} + 백업된 프로젝트를 빌드할 수 없습니다. 프로젝트에 링크된 파일이 있습니다. {0} + + + + Failed to backup file as {0} + 파일을 {0}(으)로 백업하지 못했습니다. + + + + File successfully backed up as {0} + 파일을 {0}(으)로 백업했습니다. + + + + Identity + ID + + + + Security identity of the referenced assembly. + 참조된 어셈블리의 보안 ID입니다. + + + + Path + 경로 + + + + Location of file being referenced. + 참조되는 파일의 위치입니다. + + + + Version + 버전 + + + + Copy of {0} + 사본 - {0} + + + + Copy ({0}) of {1} + 사본({0}) - {1} + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/xlf/Microsoft.VisualStudio.Package.Project.pl.xlf b/vsintegration/src/FSharp.ProjectSystem.Base/Project/xlf/Microsoft.VisualStudio.Package.Project.pl.xlf new file mode 100644 index 00000000000..334907964f5 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.Base/Project/xlf/Microsoft.VisualStudio.Package.Project.pl.xlf @@ -0,0 +1,820 @@ + + + + + + Failed to add file '{0}' to project as project is null. + Nie można dodać pliku „{0}” do projektu, ponieważ projekt ma wartość null. + + + + Advanced + Zaawansowane + Project Property Page Caption + + + A reference to '{0}' could not be added. + Nie można dodać odwołania do elementu „{0}”. + ReferenceCouldNotBeAdded error message + + + A reference to '{0}' could not be added. A reference to the component '{1}' already exists in the project. + Nie można dodać odwołania do „{0}”. Odwołanie do składnika „{1}” istnieje już w projekcie. + ReferenceAlreadyExists error message + + + A reference to '{0}' (with assembly name '{1}') could not be added. A reference to the component '{2}' with the same assembly name already exists in the project. + Nie można dodać odwołania do „{0}” (z nazwą zestawu „{1}”). Odwołanie do składnika „{2}” o tej samej nazwie zestawu już istnieje w projekcie. + ReferenceAlreadyExists error message + + + Could not load attribute '{0}' from project file '{1}'. + Nie można załadować atrybutu „{0}” z pliku projektu „{1}”. + + + + Build Action + Akcja kompilacji + Project Build Property Name + + + How the file relates to the build and deployment process + Sposób, w jaki plik jest związany z procesem kompilacji i wdrażania + Project Build Property Description + + + Verbosity + Poziom szczegółowości + + + + Specify how much information is included in the build output + Określ, ile informacji ma być uwzględnionych w danych wyjściowych kompilacji + + + + ECMA-335 CLI compatible framework (location must be provided) + Platforma zgodna z ECMA-335 CLI (należy podać lokalizację) + Target platform drop down option + + + Compile + Kompiluj + Build Action - drop down option + + + If you change a file name extension, the file may become unusable. Are you sure you want to change it? + Zmiana rozszerzenia nazwy pliku może spowodować, że plik stanie się bezużyteczny. Czy na pewno chcesz je zmienić? + + + + A file with name '{0}' already exists and is open in an editor. Please give a unique name to the item you are adding, or delete the existing item first. + Plik o nazwie „{0}” już istnieje i jest otwarty w edytorze. Nadaj unikatową nazwę dodawanemu elementowi lub usuń najpierw istniejący element. + + + + Cannot save '{0}' as it is not open in the editor. + Nie można zapisać pliku „{0}”, ponieważ nie jest on otwarty w edytorze. + + + + Content + Zawartość + Build Action - drop down option + + + Copy Local + Kopia lokalna + File property + + + Indicates whether the reference will be copied to the output directory. + Wskazuje, czy odwołanie będzie kopiowane do katalogu wyjściowego. + + + + Detailed + Szczegółowy + + + + Diagnostic + Diagnostyka + + + + Directory already exists + Katalog już istnieje + + + + Error opening specified view '{0}' using editor '{1}' + Wystąpił błąd podczas otwierania określonego widoku „{0}” przy użyciu edytora „{1}” + + + + Embedded Resource + Zasób osadzony + Build Action - drop down option + + + error + błąd + + + + Files and folders cannot be: +- Empty strings +- System reserved names, including 'CON', 'AUX', PRN', 'COM1' or 'LPT2' +- contain only '.' +- have any of the following characters: / ? : & \ * " < > | # % + Pliki i foldery nie mogą: +- być pustymi ciągami +- być nazwami zarezerwowanymi przez system, w tym „CON”, „AUX”, „PRN”, „COM1” lub „LPT2” +- zawierać samego znaku „.” +- zawierać następujących znaków: / ? : & \ * " < > | # % + + + + The name you provided is not a valid project name. + Podana nazwa nie jest prawidłową nazwą projektu. + + + + MSBuild path not found in registry. Please reinstall to fix the problem. + Nie odnaleziono ścieżki programu MSBuild w rejestrze. Zainstaluj go ponownie, aby rozwiązać ten problem. + + + + Error Saving File + Błąd podczas zapisywania pliku + + + + Console Application + Aplikacja konsolowa + + + + Expecting object of type {0}. + Oczekiwano obiektu typu {0}. + + + + Failed to retrieve msbuild property {0} from the project file. + Nie można pobrać właściwości msbuild {0} z pliku projektu. + The exception message thrown when getting a property from msbuild fails. + + + A file with the same name '{0}' already exists. Do you want to overwrite it? + Plik o nazwie „{0}” już istnieje. Czy chcesz go zastąpić? + + + + A file with the same name '{0}' already exists. + Plik o nazwie „{0}” już istnieje. + + + + Destination File Exists + Plik docelowy istnieje + + + + A file of this name is already part of the project. Do you want to overwrite it? + Plik o tej nazwie jest już częścią projektu. Czy chcesz go zastąpić? + + + + Destination File Exists + Plik docelowy istnieje + + + + A file or folder with the name '{0}' already exists on disk at this location. Please choose another name. + Plik lub folder o nazwie „{0}” już istnieje na dysku w tej lokalizacji. Wybierz inną nazwę. + + + + Error Copying File + Błąd podczas kopiowania pliku + + + + File Name + Nazwa pliku + + + + File and folder names cannot contain a leading period. + Nazwy plików i folderów nie mogą zawierać kropki na początku. + + + + The name of the file or folder + Nazwa pliku lub folderu + + + + Folder Name + Nazwa folderu + + + + Name of this folder + Nazwa tego folderu + + + + Full Path + Pełna ścieżka + + + + Location of the file + Lokalizacja pliku + + + + The item '{0}' does not exist in the project directory. It may have been moved, renamed or deleted. + Element „{0}” nie istnieje w katalogu projektu. Mógł zostać przeniesiony, usunięty lub zmieniono jego nazwę. + + + + Cannot save '{0}' outside the project directory. Linked items are not supported. + Nie można zapisać elementu „{0}” poza katalogiem projektu. Elementy połączone nie są obsługiwane. + + + + Class Library + Biblioteka klas + + + + Minimal + Minimalny + + + + Misc + Różne + + + + None + Brak + + + + Normal + Normalny + + + + Item is not available or corrupted and thus cannot be pasted. + Element jest niedostępny lub uszkodzony i nie można go wkleić. + + + + Program + Program + + + + Project + Projekt + + + + A reference to library '{0}' cannot be added. Adding this project as a reference would cause a circular dependency. + Nie można dodać odwołania do biblioteki „{0}”. Dodanie tego projektu jako odwołania spowoduje utworzenie zależności cyklicznej. + + + + Project File + Plik projektu + + + + The name of the file containing build, configuration, and other information about the project. + Nazwa pliku zawierającego kompilację, konfigurację i informacje o projekcie. + + + + Project Folder + Folder projektu + + + + The absolute location of the project. + Lokalizacja bezwzględna projektu. + + + + Quiet + Cichy + + + + (Name) + (Nazwa) + + + + References + Odwołania + + + + Display name of the reference + Nazwa wyświetlana odwołania + + + + Rename directory failed. {0} + Nie udało się zmienić nazwy katalogu. {0} + + + + RTL_False + RTL_False + + + + Save? + Czy zapisać? + + + + Do you want to save modified documents? + Czy chcesz zapisać zmodyfikowane dokumenty? + + + + The project file can only be saved into the project location '{0}'. + Plik projektu może zostać zapisany tylko w lokalizacji projektu „{0}”. + + + + Error opening specified view '{0}' using standard editor. + Wystąpił błąd podczas otwierania określonego widoku „{0}” przy użyciu standardowego edytora. + + + + URL + Adres URL + + + + You are trying to use an item that has already been deleted or that does not exist. + Próbujesz użyć elementu, który został już usunięty lub nie istnieje. + + + + Microsoft .Net Framework v1.0 + Microsoft .Net Framework 1.0 + + + + Microsoft .Net Framework v1.1 + Microsoft .Net Framework 1.1 + + + + Microsoft .Net Framework v2.0 + Microsoft .Net Framework 2.0 + + + + warning + ostrzeżenie + + + + Windows Application + Aplikacja systemu Windows + + + + Automation object invalid. + Nieprawidłowy obiekt automatyzacji. + + + + The command you are attempting cannot be completed because the file '{0}' that must be modified cannot be changed. If the file is under source control, you may want to check it out; if the file is read-only on disk, you may want to change its attributes. + Nie można ukończyć wykonywania polecenia, ponieważ nie jest możliwe wprowadzenie zmian w pliku „{0}” wymagającym modyfikacji. Jeśli plik podlega kontroli źródła, wyewidencjonuj go. Jeśli plik znajduje się na dysku i jest tylko do odczytu, zmień jego atrybuty. + MsgBox + + + Parameter must be a valid guid. + Parametr musi być prawidłowym identyfikatorem GUID. + Error message in the ArgumentException for a parameter that is not a valid guid. + + + Invalid logger type\nExpected: {0}\nReceived: {1} + Nieprawidłowy typ rejestratora\nOczekiwano: {0}\nOtrzymano: {1} + Error message thrown for when an invalid logger type is set. + + + InvalidParameter + Nieprawidłowy parametr + Generic error message for invalid parameters. + + + ParameterCannotBeNullOEmpty + ParameterCannotBeNullOEmpty + Error message for string parameters that cannot be null or empty. + + + Parameter must be a valid item identifier. + Parametr musi być prawidłowym identyfikatorem elementu. + Error message thrown when an invalid item id is retrieved. + + + File Properties + Właściwości pliku + + + + Folder Properties + Właściwości folderu + + + + Project Properties + Właściwości projektu + + + + Reference Properties + Właściwości odwołania + + + + A file or folder with the name '{0}' already exists on disk at this location. Please choose another name. + Plik lub folder o nazwie „{0}” już istnieje na dysku w tej lokalizacji. Wybierz inną nazwę. + + + + This folder cannot be renamed to '{0}' as it already exists on disk.\n\nOnly empty folders can be renamed to existing folders. This folder contains files within it on disk. + Nazwy tego folderu nie można zmienić na „{0}”, ponieważ już istnieje on na dysku.\n\nTylko nazwy pustych folderów można zmieniać na istniejące foldery. Ten folder zawiera pliki na dysku. + + + + Build + Kompiluj + + + + Output Path + Ścieżka wyjściowa + + + + The path to the primary output + Ścieżka do podstawowych danych wyjściowych + + + + The complete path to '{0}' exceeds the maximum number of characters permitted by the file system. + Pełna ścieżka do „{0}” przekracza maksymalną liczbę znaków dozwoloną przez system plików. + + + + Custom Tool + Narzędzie niestandardowe + + + + Specifies the tool that transforms a file at design time and places the output of that transformation into another file. For example, a dataset (.xsd) file comes with a default custom tool. + Określa narzędzie, które przekształca plik w czasie projektowania i umieszcza wynik przekształcenia w innym pliku. Na przykład plik zestawu danych (xsd) zawiera domyślne narzędzie niestandardowe. + + + + Custom Tool Namespace + Przestrzeń nazw narzędzia niestandardowego + + + + The namespace into which the output of the custom tool is placed. + Przestrzeń nazw, w której zostaną umieszczone dane wyjściowe narzędzia niestandardowego. + + + + Primary Output + Podstawowe dane wyjściowe + + + + Content Files + Pliki zawartości + + + + Documentation Files + Pliki dokumentacji + + + + Localized Resources + Zlokalizowane zasoby + + + + Source Files + Pliki źródłowe + + + + Debug Symbols + Symbole debugowania + + + + XML Serialization Assemblies + Zestawy serializacji XML + + + + Contains the DLL or EXE built by the project. + Zawiera pliki DLL lub EXE skompilowane na podstawie projektu. + + + + Contains all content files in the project. + Zawiera wszystkie pliki zawartości projektu. + + + + Contains the XML Documentation files for the project. + Zawiera pliki dokumentacji XML dla projektu. + + + + Contains the satellite assemblies for each culture's resources. + Zawiera zestawy satelickie dla każdego zasobu kultury. + + + + Contains all source files in the project. + Zawiera wszystkie pliki źródłowe projektu. + + + + Contains the debugging files for the project. + Zawiera pliki debugowania dla projektu. + + + + Contains the XML serialization assemblies for the project. + Zawiera zestawy serializacji XML dla projektu. + + + + The project file '{0}' has been modified outside of Visual Studio. Do you want to reload the project? + Plik projektu „{0}” został zmodyfikowany poza programem Visual Studio. Czy chcesz ponownie załadować projekt? + + + + The nested project has failed to reload. + Nie można załadować ponownie projektu zagnieżdżonego. + + + + The item '{0}' cannot be found on disk, either because it has been renamed, deleted, or moved to a new location. + Nie można odnaleźć elementu „{0}” na dysku, ponieważ została zmieniona jego nazwa albo został on usunięty lub przeniesiony do nowej lokalizacji. + + + + A reference to {0} could not be added. Please make sure that the file is accessible, and that it is a valid assembly or COM component. + Nie można dodać odwołania do {0}. Upewnij się, że plik jest dostępny i jest prawidłowym zestawem lub składnikiem COM. + + + + An 'Import' of the file '{1}' was found in the project file '{0}'. This file is not registered as a safe file to import, and could contain targets and tasks that are harmful. If this imported file is indeed considered safe, then it can be registered by writing to the registry key {2}. + W pliku projektu „{0}” znaleziono import pliku „{1}”, który nie jest zarejestrowany jako plik bezpieczny do zaimportowania i może zawierać szkodliwe cele i zadania. Jeśli importowany plik można uznać za bezpieczny, możesz go zarejestrować, zapisując w kluczu rejestru {2}. + + + + An 'Import' of the file '{1}' was found in the user project file '{0}'. All imports in user project files are considered unsafe. + W pliku projektu użytkownika „{0}” znaleziono import pliku „{1}”. Wszystkie importy w plikach projektu użytkownika są uważane za niebezpieczne. + + + + One or more items named '{1}' were found in the project file '{0}'. These items normally should not be specified in the project file. They can change the way targets and tasks are executed during project load, and this could have harmful effects. + W pliku projektu „{0}” znaleziono co najmniej jeden element o nazwie „{1}”. Takie elementy nie powinny być określane w pliku projektu, ponieważ mogą zmienić sposób wykonywania celów i zadań podczas ładowania projektu, co może mieć szkodliwe skutki. + + + + A property named '{1}' was found in the project file '{0}'. This property normally should not be specified in the project file. Its value can change the way targets and tasks are executed during project load, and this could have harmful effects. + W pliku projektu „{0}” znaleziono właściwość o nazwie „{1}”, która nie powinna być określana w pliku projektu. Jej wartość może zmienić sposób wykonywania celów i zadań podczas ładowania projektu, co może mieć szkodliwe skutki. + + + + A 'UsingTask' tag which registers the '{1}' task was found in the project file '{0}'. 'UsingTask' tags in the project file take precedence over those in the imported .TARGETS files, and therefore could be used to execute arbitrary code during an otherwise unmodified build process. + W pliku projektu „{0}” znaleziono tag „UsingTask”, który rejestruje zadanie „{1}”. Tagi „UsingTask” w pliku projektu mają pierwszeństwo przed tagami w importowanych plikach TARGETS, dlatego można ich używać do wykonania dowolnego kodu podczas niemodyfikowanego w inny sposób procesu kompilacji. + + + + A 'Target' named '{1}' was found in the project file '{0}'. The tasks within this target could contain arbitrary code and may get executed as soon as the project is loaded in the IDE. + W pliku projektu „{0}” znaleziono cel o nazwie „{1}”. Zadania w obrębie tego celu mogą zawierać dowolny kod, który może zostać wykonany od razu po załadowaniu projektu w środowisku IDE. + + + + An item referring to the file '{1}' was found in the project file '{0}'. Since this file is located within a system directory, root directory, or network share, it could be harmful to write to this file. + W pliku projektu „{0}” znaleziono element odwołujący się do pliku „{1}”. Ponieważ ten plik znajduje się w katalogu systemowym, katalogu głównym lub udziale sieciowym, zapisanie w nim może mieć szkodliwe skutki. + + + + The project location is not trusted:{0}{0}{1}{0}{0}Running the application may result in security exceptions when it attempts to perform actions which require full trust.{0}{0}Click OK to ignore and continue. + Lokalizacja projektu nie jest zaufana:{0}{0}{1}{0}{0}Uruchomienie aplikacji może spowodować wystąpienie wyjątków zabezpieczeń, gdy aplikacja spróbuje wykonać akcje wymagające pełnego zaufania.{0}{0}Kliknij przycisk OK, aby zignorować to ostrzeżenie i kontynuować. + + + + Exception was thrown during BuildBegin event\n{0} + Podczas zdarzenia BuildBegin został zgłoszony wyjątek\n{0} + + + + Copy always + Zawsze kopiuj + CopyToOutputDirectory - drop down option + + + Copy to Output Directory + Kopiuj do katalogu wyjściowego + + + + Specifies the source file will be copied to the output directory + Określa plik źródłowy, który zostanie skopiowany do katalogu wyjściowego + + + + Copy if newer + Kopiuj, jeśli nowszy + CopyToOutputDirectory - drop down option + + + Do not copy + Nie kopiuj + CopyToOutputDirectory - drop down option + + + Specific Version + Określona wersja + + + + Indicates whether this reference is to a specific version of an assembly. + Wskazuje, czy jest to odwołanie do określonej wersji zestawu. + + + + Microsoft Visual F# does not support zero-impact projects. To create an F# project from this project template, either go to the Visual Studio menu 'Tools, Options..., Projects and Solutions, General' and check the box marked 'Save new projects when created', or specify <PromptForSaveOnCreation>true</PromptForSaveOnCreation> in the <TemplateData> section of this project template's .vstemplate file, and then retry this operation. + Język Microsoft Visual F# nie obsługuje projektów, których kompilowanie nie ma żadnych skutków. Aby utworzyć projekt języka F# na podstawie szablonu, otwórz menu programu Visual Studio, wybierz kolejno opcje „Narzędzia, Opcje..., Projekty i rozwiązania, Ogólne” i zaznacz pole wyboru „Zapisuj nowe projekty, gdy zostaną utworzone” lub w pliku .vstemplate szablonu umieść element <PromptForSaveOnCreation>true</PromptForSaveOnCreation> w sekcji <TemplateData>, a następnie ponów operację. + + + + "Cannot open F# project '{0}'. \nThis project uses wildcards in item specification: \n'{2}' for item type '{1}'\n\nWildcards in F# projects are not currently supported. + „Nie można otworzyć projektu w języku F# „{0}”. \nTen projekt używa symboli wieloznacznych w specyfikacji elementu: \n„{2}” dla typu elementu „{1}”\n\nSymbole wieloznaczne nie są obecnie obsługiwane w projektach w języku F#. + + + + "Cannot add file {3} to F# project '{0}'. \nThis project uses wildcards in item specification: \n'{2}' for item type '{1}'\n\nWildcards in F# projects are not currently supported. + „Nie można dodać pliku {3} do projektu w języku F# „{0}”. \nTen projekt używa symboli wieloznacznych w specyfikacji elementu: \n„{2}” dla typu elementu „{1}”\n\nSymbole wieloznaczne nie są obecnie obsługiwane w projektach w języku F#. + + + + Cannot open project file for edit. + Nie można otworzyć pliku projektu do edycji. + + + + Project file was checked out and is already upgraded. + Plik projektu został wyewidencjonowany i jest już uaktualniony. + + + + A project with an Output Type of Class Library cannot be started directly.\n\nIn order to debug this project, add an executable project to this solution which references the library project. Set the executable project as the startup project. + Projekt z typem wyjściowym biblioteki klasy nie może zostać bezpośrednio uruchomiony.\n\nAby przeprowadzić jego debugowanie, dodaj projekt wykonywalny do rozwiązania, które odwołuje się do projektu biblioteki. Ustaw projekt wykonywalny jako projekt startowy. + + + + The entered path is not a valid output path + Wprowadzona ścieżka nie jest prawidłową ścieżką wyjściową + + + + The project {0} cannot be referenced. An assembly must have a 'dll' or 'exe' extension in order to be referenced. + Nie można przywołać projektu {0}. Aby mógł zostać przywołany, zestaw musi mieć rozszerzenie „dll” lub „exe”. + + + + Cannot start a build, because another build is already in progress. + Nie można uruchomić kompilacji, ponieważ trwa już inna kompilacja. + + + + The working directory does not exist:\n'{0}'. + Katalog roboczy nie istnieje:\n„{0}”. + + + + A reference to library '{0}' cannot be added. This project targets a different framework ({2}) from the current project ({1}). + Nie można dodać odwołania do biblioteki „{0}”. Celem tego projektu jest inna platforma ({2}) niż cel bieżącego projektu ({1}). + + + + The project '{0}' is targeting '{1}'; however, the target framework is not installed on the machine. + Celem projektu „{0}” jest „{1}”. Jednak platforma docelowa nie jest zainstalowana na komputerze. + + + + F# + F# + + + + The referenced project '{0}' is targeting a higher framework version ({1}) than this project’s current target framework version ({2}). This may lead to build failures if types from assemblies outside this project’s target framework are used by any project in the dependency chain. + Celem przywoływanego projektu „{0}” jest platforma o wyższej wersji ({1}) niż bieżąca wersja platformy docelowej tego projektu ({2}). Może to spowodować błędy kompilacji, jeśli typy z zestawów spoza platformy docelowej tego projektu są używane przez dowolny projekt w łańcuchu zależności. + + + + The project file does not require conversion. + Plik projektu nie wymaga konwersji. + + + + No Conversion Required + Żadna konwersja nie jest wymagana + + + + Error creating backup of project file: {0} + Wystąpił błąd podczas tworzenia kopii zapasowej pliku projektu: {0} + + + + Project file successfully backed up as {0} + Pomyślnie utworzono kopię zapasową pliku projektu jako {0} + + + + Backup file name conflict. Renaming file to: {0} + Wystąpił konflikt nazw plików kopii zapasowej. Zmienianie nazwy pliku na: {0} + + + + Backed up project may not build. Project contains linked file: {0} + Projekt, którego kopię zapasową utworzono, może nie zostać skompilowany. Projekt zawiera połączony plik: {0} + + + + Failed to backup file as {0} + Nie można utworzyć kopii zapasowej pliku jako {0} + + + + File successfully backed up as {0} + Pomyślnie utworzono kopię zapasową pliku jako {0} + + + + Identity + Tożsamość + + + + Security identity of the referenced assembly. + Tożsamość zabezpieczeń przywoływanego zestawu. + + + + Path + Ścieżka + + + + Location of file being referenced. + Lokalizacja przywoływanego pliku. + + + + Version + Wersja + + + + Copy of {0} + Kopia {0} + + + + Copy ({0}) of {1} + Kopia ({0}) z {1} + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/xlf/Microsoft.VisualStudio.Package.Project.pt-BR.xlf b/vsintegration/src/FSharp.ProjectSystem.Base/Project/xlf/Microsoft.VisualStudio.Package.Project.pt-BR.xlf new file mode 100644 index 00000000000..d0e04d11879 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.Base/Project/xlf/Microsoft.VisualStudio.Package.Project.pt-BR.xlf @@ -0,0 +1,820 @@ + + + + + + Failed to add file '{0}' to project as project is null. + Falha ao adicionar o arquivo '{0}' ao projeto porque o projeto é nulo. + + + + Advanced + Avançado + Project Property Page Caption + + + A reference to '{0}' could not be added. + Não foi possível adicionar uma referência para'{0}'. + ReferenceCouldNotBeAdded error message + + + A reference to '{0}' could not be added. A reference to the component '{1}' already exists in the project. + A referência para '{0}' não foi adicionada. A referência para o componente '{1}' já existe no projeto. + ReferenceAlreadyExists error message + + + A reference to '{0}' (with assembly name '{1}') could not be added. A reference to the component '{2}' with the same assembly name already exists in the project. + Uma referência para '{0}' (com nome de assembly '{1}') não pôde ser adicionado. Uma referência para o componente '{2}' com o mesmo nome assembly já existe no projeto. + ReferenceAlreadyExists error message + + + Could not load attribute '{0}' from project file '{1}'. + Não foi possível carregar o atributo '{0}' do arquivo de projeto '{1}'. + + + + Build Action + Ação de Compilação + Project Build Property Name + + + How the file relates to the build and deployment process + Como o arquivo se relaciona à compilação e ao processo de implantação + Project Build Property Description + + + Verbosity + Detalhamento + + + + Specify how much information is included in the build output + Especificar quantas informações são incluídas na saída da compilação + + + + ECMA-335 CLI compatible framework (location must be provided) + Estrutura compatível com a CLI da ECMA-335 (a localização deve ser fornecida) + Target platform drop down option + + + Compile + Compilar + Build Action - drop down option + + + If you change a file name extension, the file may become unusable. Are you sure you want to change it? + Se você alterar a extensão de nome de um arquivo, ele poderá se tornar inutilizável. Tem certeza de que deseja alterá-la? + + + + A file with name '{0}' already exists and is open in an editor. Please give a unique name to the item you are adding, or delete the existing item first. + Um arquivo com o nome '{0}' já existe e está aberto em um editor. Dê um nome exclusivo ao item que você está adicionando ou exclua o item existente primeiro. + + + + Cannot save '{0}' as it is not open in the editor. + Não é possível salvar '{0}' porque não está aberto no editor. + + + + Content + Conteúdo + Build Action - drop down option + + + Copy Local + Copiar Local + File property + + + Indicates whether the reference will be copied to the output directory. + Indica se a referência será copiada no diretório de saída. + + + + Detailed + Detalhado + + + + Diagnostic + Diagnóstico + + + + Directory already exists + O diretório já existe + + + + Error opening specified view '{0}' using editor '{1}' + Erro ao abrir a exibição especificada '{0}' usando o editor '{1}' + + + + Embedded Resource + Recurso Inserido + Build Action - drop down option + + + error + erro + + + + Files and folders cannot be: +- Empty strings +- System reserved names, including 'CON', 'AUX', PRN', 'COM1' or 'LPT2' +- contain only '.' +- have any of the following characters: / ? : & \ * " < > | # % + Os arquivos e as pastas não podem ser: +– Cadeias de caracteres vazias +– Nomes reservados do sistema, incluindo 'CON', 'AUX', PRN', 'COM1' ou 'LPT2' +– conter somente '.' +– ter um destes caracteres: / ? : & \ * " < > | # % + + + + The name you provided is not a valid project name. + O nome fornecido não é um nome de projeto válido. + + + + MSBuild path not found in registry. Please reinstall to fix the problem. + O caminho MSBuild não foi encontrado no registro. Reinstale para resolver o problema. + + + + Error Saving File + Erro ao Salvar Arquivo + + + + Console Application + Aplicativo do Console + + + + Expecting object of type {0}. + Esperando objeto do tipo {0}. + + + + Failed to retrieve msbuild property {0} from the project file. + Falha ao recuperar a propriedade {0} de msbuild do arquivo do projeto. + The exception message thrown when getting a property from msbuild fails. + + + A file with the same name '{0}' already exists. Do you want to overwrite it? + Já existe um arquivo com o nome '{0}'. Deseja substituí-lo? + + + + A file with the same name '{0}' already exists. + Já existe um arquivo com o nome '{0}'. + + + + Destination File Exists + Arquivo de Destino Existente + + + + A file of this name is already part of the project. Do you want to overwrite it? + Um arquivo com este nome já faz parte do projeto. Deseja substituí-lo? + + + + Destination File Exists + Arquivo de Destino Existente + + + + A file or folder with the name '{0}' already exists on disk at this location. Please choose another name. + Já existe um arquivo ou uma pasta com o nome '{0}' no disco neste local. Escolha outro nome. + + + + Error Copying File + Erro ao Copiar Arquivo + + + + File Name + Nome do Arquivo + + + + File and folder names cannot contain a leading period. + Os nomes de arquivo e pasta não podem conter um ponto à esquerda. + + + + The name of the file or folder + O nome do arquivo ou da pasta + + + + Folder Name + Nome da Pasta + + + + Name of this folder + Nome desta pasta + + + + Full Path + Caminho Completo + + + + Location of the file + Local do arquivo + + + + The item '{0}' does not exist in the project directory. It may have been moved, renamed or deleted. + O item '{0}' não existe no diretório do projeto. Ele pode ter sido movido, renomeado ou excluído. + + + + Cannot save '{0}' outside the project directory. Linked items are not supported. + Não é possível salvar '{0}' fora do diretório do projeto. Os itens vinculados não são compatíveis. + + + + Class Library + Biblioteca de Classes + + + + Minimal + Mínimo + + + + Misc + Diversos + + + + None + Nenhum + + + + Normal + Normal + + + + Item is not available or corrupted and thus cannot be pasted. + O item não está disponível ou está corrompido e, portanto, não pode ser colado. + + + + Program + Programa + + + + Project + Projeto + + + + A reference to library '{0}' cannot be added. Adding this project as a reference would cause a circular dependency. + Não é possível adicionar uma referência à biblioteca '{0}'. A adição deste projeto como uma referência causaria uma dependência circular. + + + + Project File + Arquivo de Projeto + + + + The name of the file containing build, configuration, and other information about the project. + O nome do arquivo que contém a compilação, a configuração e outras informações sobre o projeto. + + + + Project Folder + Pasta do Projeto + + + + The absolute location of the project. + Localização absoluta do projeto. + + + + Quiet + Silencioso + + + + (Name) + (Nome) + + + + References + Referências + + + + Display name of the reference + Nome de exibição da referência + + + + Rename directory failed. {0} + Falha ao renomear o diretório. {0} + + + + RTL_False + RTL_False + + + + Save? + Salvar? + + + + Do you want to save modified documents? + Deseja salvar os documentos modificados? + + + + The project file can only be saved into the project location '{0}'. + O arquivo de projeto só pode ser salvo no local do projeto '{0}'. + + + + Error opening specified view '{0}' using standard editor. + Erro ao abrir a exibição especificada '{0}' usando o editor padrão. + + + + URL + URL + + + + You are trying to use an item that has already been deleted or that does not exist. + Você está tentando usar um item que já foi excluído ou que não existe. + + + + Microsoft .Net Framework v1.0 + Microsoft .Net Framework v1.0 + + + + Microsoft .Net Framework v1.1 + Microsoft .Net Framework v1.1 + + + + Microsoft .Net Framework v2.0 + Microsoft .Net Framework v2.0 + + + + warning + aviso + + + + Windows Application + Aplicativo do Windows + + + + Automation object invalid. + Objeto de automação inválido. + + + + The command you are attempting cannot be completed because the file '{0}' that must be modified cannot be changed. If the file is under source control, you may want to check it out; if the file is read-only on disk, you may want to change its attributes. + O comando que você está tentando não pode ser concluído porque o arquivo '{0}' que deve ser modificado não pode ser alterado. Se o arquivo está sob controle do código-fonte você pode desejar verificá-lo; se o arquivo é somente leitura no disco você pode desejar alterar seus atributos. + MsgBox + + + Parameter must be a valid guid. + O parâmetro deve ser um GUID válido. + Error message in the ArgumentException for a parameter that is not a valid guid. + + + Invalid logger type\nExpected: {0}\nReceived: {1} + Tipo de agente inválido\nEsperado: {0}\nRecebido: {1} + Error message thrown for when an invalid logger type is set. + + + InvalidParameter + InvalidParameter + Generic error message for invalid parameters. + + + ParameterCannotBeNullOEmpty + ParameterCannotBeNullOEmpty + Error message for string parameters that cannot be null or empty. + + + Parameter must be a valid item identifier. + O parâmetro deve ser um identificador de item válido. + Error message thrown when an invalid item id is retrieved. + + + File Properties + Propriedades do Arquivo + + + + Folder Properties + Propriedades da Pasta + + + + Project Properties + Propriedades do Projeto + + + + Reference Properties + Propriedades de Referência + + + + A file or folder with the name '{0}' already exists on disk at this location. Please choose another name. + Já existe um arquivo ou uma pasta com o nome '{0}' no disco neste local. Escolha outro nome. + + + + This folder cannot be renamed to '{0}' as it already exists on disk.\n\nOnly empty folders can be renamed to existing folders. This folder contains files within it on disk. + Esta pasta não pode ser renomeada para '{0}', pois já existe no disco.\n\nSomente pastas vazias podem ser renomeadas para pastas existentes. Esta pasta tem arquivos dentro dela no disco. + + + + Build + Compilar + + + + Output Path + Caminho de Saída + + + + The path to the primary output + O caminho para a saída principal + + + + The complete path to '{0}' exceeds the maximum number of characters permitted by the file system. + O caminho completo para '{0}' excede o número máximo de caracteres permitido pelo sistema de arquivos. + + + + Custom Tool + Ferramenta Personalizada + + + + Specifies the tool that transforms a file at design time and places the output of that transformation into another file. For example, a dataset (.xsd) file comes with a default custom tool. + Especifica a ferramenta que transforma um arquivo em tempo de design e coloca o resultado dessa transformação em outro arquivo. Por exemplo, um arquivo de conjunto de dados (.xsd) vem com uma ferramenta personalizada padrão. + + + + Custom Tool Namespace + Namespace da Ferramenta Personalizada + + + + The namespace into which the output of the custom tool is placed. + O namespace em que o resultado da ferramenta personalizada é colocado. + + + + Primary Output + Saída Primária + + + + Content Files + Arquivos de Conteúdo + + + + Documentation Files + Arquivos de Documentação + + + + Localized Resources + Recursos Localizados + + + + Source Files + Arquivos de Origem + + + + Debug Symbols + Símbolos de Depuração + + + + XML Serialization Assemblies + Assemblies de Serialização XML + + + + Contains the DLL or EXE built by the project. + Contém a DLL ou o EXE compilado pelo projeto. + + + + Contains all content files in the project. + Contém todos arquivos de conteúdo no projeto. + + + + Contains the XML Documentation files for the project. + Contém os arquivos de Documentação XML do projeto. + + + + Contains the satellite assemblies for each culture's resources. + Contém os assemblies satélite para cada recurso de cultura. + + + + Contains all source files in the project. + Contém todos os arquivos de origem no projeto. + + + + Contains the debugging files for the project. + Contém os arquivos de depuração para o projeto. + + + + Contains the XML serialization assemblies for the project. + Contém os assemblies de serialização XML para o projeto. + + + + The project file '{0}' has been modified outside of Visual Studio. Do you want to reload the project? + O arquivo do projeto '{0}' foi modificado fora do Visual Studio. Deseja recarregar o projeto? + + + + The nested project has failed to reload. + Falha ao recarregar o projeto aninhado. + + + + The item '{0}' cannot be found on disk, either because it has been renamed, deleted, or moved to a new location. + O item '{0}' não foi encontrado no disco, ele foi renomeado, excluído ou movido para um novo local. + + + + A reference to {0} could not be added. Please make sure that the file is accessible, and that it is a valid assembly or COM component. + Não foi possível adicionar uma referência ao {0}. Certifique-se de que o arquivo está acessível e se ele é um assembly ou um componente COM válido. + + + + An 'Import' of the file '{1}' was found in the project file '{0}'. This file is not registered as a safe file to import, and could contain targets and tasks that are harmful. If this imported file is indeed considered safe, then it can be registered by writing to the registry key {2}. + Uma 'Importação' do arquivo '{1}' foi encontrada no arquivo do projeto '{0}'. Esse arquivo não está registrado como um arquivo seguro para importação e pode conter destinos e tarefas prejudiciais. Se este arquivo de importação for realmente considerado seguro, então ele poderá ser registrado escrevendo o mesmo na chave de registro {2}. + + + + An 'Import' of the file '{1}' was found in the user project file '{0}'. All imports in user project files are considered unsafe. + Uma 'Importação' do arquivo '{1}' foi encontrada no arquivo do projeto do usuário '{0}'. Todas as importações em arquivos do projeto são consideradas inseguras. + + + + One or more items named '{1}' were found in the project file '{0}'. These items normally should not be specified in the project file. They can change the way targets and tasks are executed during project load, and this could have harmful effects. + Um ou mais itens chamados '{1}' foram encontrados no arquivo do projeto '{0}'. Esses itens normalmente não devem ser especificados no arquivo do projeto. Eles podem alterar a forma com que os destinos e as tarefas são executados ao carregar o projeto e isso pode ser prejudicial. + + + + A property named '{1}' was found in the project file '{0}'. This property normally should not be specified in the project file. Its value can change the way targets and tasks are executed during project load, and this could have harmful effects. + Uma propriedade chamada '{1}' foi encontrada no arquivo do projeto '{0}'. Essa propriedade normalmente não deve ser especificada no arquivo do projeto. O seu valor pode alterar a forma com que os destinos e as tarefas são executados ao carregar o projeto e isso pode ser prejudicial. + + + + A 'UsingTask' tag which registers the '{1}' task was found in the project file '{0}'. 'UsingTask' tags in the project file take precedence over those in the imported .TARGETS files, and therefore could be used to execute arbitrary code during an otherwise unmodified build process. + Uma marca 'UsingTask' que registra a tarefa '{1}' foi encontrada no arquivo do projeto '{0}'. As marcas 'UsingTask' do arquivo do projeto têm prioridade sobre os arquivos .DIRETORIO importados. Portanto, elas poderiam ser usadas para executar o código arbitrário durante um processo de compilação que, de outra forma, não seria modificado. + + + + A 'Target' named '{1}' was found in the project file '{0}'. The tasks within this target could contain arbitrary code and may get executed as soon as the project is loaded in the IDE. + Um 'Destino' chamado '{1}' foi encontrado no arquivo do projeto '{0}'. As tarefas desse destino podem conter um código arbitrário e podem ser executadas no momento em que o projeto é carregado no IDE. + + + + An item referring to the file '{1}' was found in the project file '{0}'. Since this file is located within a system directory, root directory, or network share, it could be harmful to write to this file. + Um item referente ao arquivo '{1}' foi encontrado no arquivo do projeto '{0}'. Como esse arquivo está localizado em um diretório do sistema, diretório raiz ou compartilhamento de rede, talvez seja prejudicial gravar nele. + + + + The project location is not trusted:{0}{0}{1}{0}{0}Running the application may result in security exceptions when it attempts to perform actions which require full trust.{0}{0}Click OK to ignore and continue. + A localização do projeto não é confiável:{0}{0}{1}{0}{0}A execução da aplicação pode resultar em exceções de segurança durante a tentativa de executar ações que exigem confiança total.{0}{0}Clique em OK para ignorar e continuar. + + + + Exception was thrown during BuildBegin event\n{0} + Uma exceção foi lançada durante o evento BuildBegin\n{0} + + + + Copy always + Copiar sempre + CopyToOutputDirectory - drop down option + + + Copy to Output Directory + Copiar para Diretório de Saída + + + + Specifies the source file will be copied to the output directory + Especifica o arquivo de origem que será copiado para o diretório de saída + + + + Copy if newer + Copiar se for mais novo + CopyToOutputDirectory - drop down option + + + Do not copy + Não copiar + CopyToOutputDirectory - drop down option + + + Specific Version + Versão Específica + + + + Indicates whether this reference is to a specific version of an assembly. + Indica se esta referência é a uma versão específica de um assembly. + + + + Microsoft Visual F# does not support zero-impact projects. To create an F# project from this project template, either go to the Visual Studio menu 'Tools, Options..., Projects and Solutions, General' and check the box marked 'Save new projects when created', or specify <PromptForSaveOnCreation>true</PromptForSaveOnCreation> in the <TemplateData> section of this project template's .vstemplate file, and then retry this operation. + Microsoft Visual F# não dá suporte a projetos de impacto zero. Para criar um projeto F# a partir deste modelo de projeto, vá até o menu 'Ferramentas, Opções..., Projetos e Soluções, Geral' do Visual Studio e marque a caixa 'Salvar novo projeto quando criado', ou especifique <PromptForSaveOnCreation>true</PromptForSaveOnCreation> na seção <TemplateData> deste modelo de projeto de arquivo .vstemplate e repita esta operação. + + + + "Cannot open F# project '{0}'. \nThis project uses wildcards in item specification: \n'{2}' for item type '{1}'\n\nWildcards in F# projects are not currently supported. + "Não é possível abrir o projeto F# '{0}'. \nEste projeto usa curingas na especificação do item: \n'{2}', para o tipo de item '{1}'\n\nOs curingas nos projetos F# não recebem suporte. + + + + "Cannot add file {3} to F# project '{0}'. \nThis project uses wildcards in item specification: \n'{2}' for item type '{1}'\n\nWildcards in F# projects are not currently supported. + "Não é possível adicionar o arquivo {3} ao projeto F# '{0}'. \nEste projeto usa curingas na especificação do item: \n'{2}', para o tipo de item '{1}'\n\nOs curingas nos projetos F# não recebem suporte. + + + + Cannot open project file for edit. + Não é possível abrir o arquivo do projeto para editar. + + + + Project file was checked out and is already upgraded. + Arquivo do projeto foi verificado e já está atualizado. + + + + A project with an Output Type of Class Library cannot be started directly.\n\nIn order to debug this project, add an executable project to this solution which references the library project. Set the executable project as the startup project. + Um projeto com um Tipo de Saída de Biblioteca de Classe não pode ser iniciado diretamente.\n\nPara depurar este projeto adicione um projeto executável a esta solução que referencia o projeto de biblioteca. Defina o projeto executável como o projeto de inicialização. + + + + The entered path is not a valid output path + O caminho introduzido não é um caminho de saída válido + + + + The project {0} cannot be referenced. An assembly must have a 'dll' or 'exe' extension in order to be referenced. + O projeto {0} não pode ser referenciado. Um assembly precisa ter uma extensão 'dll' ou 'exe' para ser referenciado. + + + + Cannot start a build, because another build is already in progress. + Não é possível iniciar uma compilação porque outra já está em andamento. + + + + The working directory does not exist:\n'{0}'. + O diretório de trabalho não existe\n'{0}'. + + + + A reference to library '{0}' cannot be added. This project targets a different framework ({2}) from the current project ({1}). + Não é possível adicionar uma referência à biblioteca '{0}'. Este projeto define como destino um framework diferente {2} do projeto atual ({1}). + + + + The project '{0}' is targeting '{1}'; however, the target framework is not installed on the machine. + O projeto '{0}' está direcionando para '{1}'; no entanto, o framework de destino não está instalado no computador. + + + + F# + F# + + + + The referenced project '{0}' is targeting a higher framework version ({1}) than this project’s current target framework version ({2}). This may lead to build failures if types from assemblies outside this project’s target framework are used by any project in the dependency chain. + O projeto referenciado '{0}' está definindo como destino um framework de versão mais recente ({1}) do que a do framework atual ({2}). Isso pode levar a falhas na compilação caso os assemblies de projetos externos sejam usados por alguma cadeia de dependência. + + + + The project file does not require conversion. + O arquivo de projeto não requer conversão. + + + + No Conversion Required + Nenhuma Conversão Necessária + + + + Error creating backup of project file: {0} + Erro ao criar backup do arquivo de projeto: {0} + + + + Project file successfully backed up as {0} + O backup do arquivo de projeto foi concluído com êxito como {0} + + + + Backup file name conflict. Renaming file to: {0} + Conflito de nome de arquivo de backup. Renomeando arquivo para: {0} + + + + Backed up project may not build. Project contains linked file: {0} + O projeto em backup não pode compilar. O projeto contém um arquivo vinculado: {0} + + + + Failed to backup file as {0} + Falha ao fazer backup do arquivo como {0} + + + + File successfully backed up as {0} + O backup do arquivo foi concluído com êxito como {0} + + + + Identity + Identidade + + + + Security identity of the referenced assembly. + Identidade de segurança do assembly referenciado. + + + + Path + Caminho + + + + Location of file being referenced. + Local do arquivo que está sendo referenciado. + + + + Version + Versão + + + + Copy of {0} + Cópia de {0} + + + + Copy ({0}) of {1} + Copiar ({0}) de {1} + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/xlf/Microsoft.VisualStudio.Package.Project.ru.xlf b/vsintegration/src/FSharp.ProjectSystem.Base/Project/xlf/Microsoft.VisualStudio.Package.Project.ru.xlf new file mode 100644 index 00000000000..00f7ac219dc --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.Base/Project/xlf/Microsoft.VisualStudio.Package.Project.ru.xlf @@ -0,0 +1,820 @@ + + + + + + Failed to add file '{0}' to project as project is null. + Невозможно добавить в проект файл "{0}", так как проект указан как null. + + + + Advanced + Дополнительный + Project Property Page Caption + + + A reference to '{0}' could not be added. + Не удалось добавить ссылку на "{0}". + ReferenceCouldNotBeAdded error message + + + A reference to '{0}' could not be added. A reference to the component '{1}' already exists in the project. + Не удается добавить ссылку на "{0}". Ссылка на компонент "{1}" уже присутствует в данном проекте. + ReferenceAlreadyExists error message + + + A reference to '{0}' (with assembly name '{1}') could not be added. A reference to the component '{2}' with the same assembly name already exists in the project. + Не удалось добавить ссылку на "{0}" (с именем сборки "{1}"). Ссылка на компонент "{2}" с таким именем сборки уже существует в данном проекте. + ReferenceAlreadyExists error message + + + Could not load attribute '{0}' from project file '{1}'. + Не удалось загрузить атрибут "{0}" из файла проекта "{1}". + + + + Build Action + Действие при сборке + Project Build Property Name + + + How the file relates to the build and deployment process + Роль этого файла в процессе сборки и развертывания + Project Build Property Description + + + Verbosity + Уровень детализации + + + + Specify how much information is included in the build output + Объем сведений, включаемых в выходные данные сборки + + + + ECMA-335 CLI compatible framework (location must be provided) + ECMA-335 CLI-совместимая инфраструктура (следует указать расположение) + Target platform drop down option + + + Compile + Компилировать + Build Action - drop down option + + + If you change a file name extension, the file may become unusable. Are you sure you want to change it? + Смена расширения имени файла может помешать дальнейшей работе с ним. Изменить расширение? + + + + A file with name '{0}' already exists and is open in an editor. Please give a unique name to the item you are adding, or delete the existing item first. + Файл с именем "{0}" уже существует и открыт в редакторе. Присвойте добавляемому элементу уникальное имя или сначала удалите существующий элемент. + + + + Cannot save '{0}' as it is not open in the editor. + Не удается сохранить "{0}": файл не открыт в редакторе. + + + + Content + Объект + Build Action - drop down option + + + Copy Local + Копировать локально + File property + + + Indicates whether the reference will be copied to the output directory. + Указывает, что ссылка будет скопирована в папку вывода. + + + + Detailed + Подробные + + + + Diagnostic + Диагностический + + + + Directory already exists + Каталог с таким именем уже существует + + + + Error opening specified view '{0}' using editor '{1}' + Обнаружена ошибка при открытии указанного представления "{0}" в редакторе "{1}" + + + + Embedded Resource + Внедренный ресурс + Build Action - drop down option + + + error + ошибка + + + + Files and folders cannot be: +- Empty strings +- System reserved names, including 'CON', 'AUX', PRN', 'COM1' or 'LPT2' +- contain only '.' +- have any of the following characters: / ? : & \ * " < > | # % + Файлы и папки не могут: +– быть пустыми строками; +– совпадать с именами, зарезервированными системой, например CON, AUX, PRN, COM1 или LPT2; +– содержать только "."; +– содержать символы / ? : & \ * " < > | # %. + + + + The name you provided is not a valid project name. + Указанное имя не является допустимым именем проекта. + + + + MSBuild path not found in registry. Please reinstall to fix the problem. + Путь к MSBuild не найден в реестре. Чтобы устранить эту неполадку, повторите установку. + + + + Error Saving File + Ошибка при сохранении файла + + + + Console Application + Консольное приложение + + + + Expecting object of type {0}. + Требуется объект типа {0}. + + + + Failed to retrieve msbuild property {0} from the project file. + Не удается загрузить свойство msbuild {0} из файла проекта. + The exception message thrown when getting a property from msbuild fails. + + + A file with the same name '{0}' already exists. Do you want to overwrite it? + Файл с именем "{0}" уже существует в проекте. Заменить этот файл? + + + + A file with the same name '{0}' already exists. + Файл с именем "{0}" уже существует в проекте. + + + + Destination File Exists + Конечный файл существует + + + + A file of this name is already part of the project. Do you want to overwrite it? + Файл с таким именем уже существует в проекте. Заменить этот файл? + + + + Destination File Exists + Конечный файл существует + + + + A file or folder with the name '{0}' already exists on disk at this location. Please choose another name. + Файл или папка с именем "{0}" уже существует в данном расположении. Выберите другое имя. + + + + Error Copying File + Ошибка при копировании файла + + + + File Name + Имя файла + + + + File and folder names cannot contain a leading period. + Имена файлов и папок не могут начинаться с точки. + + + + The name of the file or folder + Имя файла или папки + + + + Folder Name + Имя папки + + + + Name of this folder + Имя этой папки + + + + Full Path + Полный путь + + + + Location of the file + Расположение файла + + + + The item '{0}' does not exist in the project directory. It may have been moved, renamed or deleted. + Элемент "{0}" не существует в каталоге проекта. Возможно, он был перемещен, переименован или удален. + + + + Cannot save '{0}' outside the project directory. Linked items are not supported. + Невозможно сохранить "{0}" вне каталога проекта. Связанные элементы не поддерживаются. + + + + Class Library + Библиотека классов + + + + Minimal + Минимальные + + + + Misc + Прочее + + + + None + Отсутствует + + + + Normal + Средний + + + + Item is not available or corrupted and thus cannot be pasted. + Элемент не может быть вставлен, так как недоступен или поврежден. + + + + Program + Программа + + + + Project + Проект + + + + A reference to library '{0}' cannot be added. Adding this project as a reference would cause a circular dependency. + Невозможно добавить ссылку на библиотеку "{0}". Добавление этого проекта в виде ссылки может образовать циклическую зависимость. + + + + Project File + Файл проекта + + + + The name of the file containing build, configuration, and other information about the project. + Имя файла, содержащего сведения о сборке и конфигурации, а также другую информацию о проекте. + + + + Project Folder + Папка проекта + + + + The absolute location of the project. + Абсолютный путь к расположению проекта. + + + + Quiet + Тихий режим + + + + (Name) + (Имя) + + + + References + Ссылки + + + + Display name of the reference + Отобразить имя ссылки + + + + Rename directory failed. {0} + Не удалось переименовать каталог. {0} + + + + RTL_False + RTL_False + + + + Save? + Сохранить? + + + + Do you want to save modified documents? + Сохранить измененные документы? + + + + The project file can only be saved into the project location '{0}'. + Файл проекта можно сохранить только в его папку "{0}". + + + + Error opening specified view '{0}' using standard editor. + Обнаружена ошибка при открытии указанного представления "{0}" в стандартном редакторе. + + + + URL + URL + + + + You are trying to use an item that has already been deleted or that does not exist. + Этот элемент удален или не существует и поэтому недоступен. + + + + Microsoft .Net Framework v1.0 + Microsoft .Net Framework, версия 1.0 + + + + Microsoft .Net Framework v1.1 + Microsoft .Net Framework, версия 1.1 + + + + Microsoft .Net Framework v2.0 + Microsoft .Net Framework, версия 2.0 + + + + warning + предупреждение + + + + Windows Application + Приложение Windows + + + + Automation object invalid. + Недопустимый объект автоматизации. + + + + The command you are attempting cannot be completed because the file '{0}' that must be modified cannot be changed. If the file is under source control, you may want to check it out; if the file is read-only on disk, you may want to change its attributes. + Выполнение данной команды невозможно, поскольку изменение файла "{0}", который необходимо изменить, невозможно. Если этот файл находится в системе управления версиями, его можно извлечь; если файл доступен на диске только для чтения, может потребоваться изменение его атрибутов. + MsgBox + + + Parameter must be a valid guid. + Значение параметра должно быть допустимым идентификатором GUID. + Error message in the ArgumentException for a parameter that is not a valid guid. + + + Invalid logger type\nExpected: {0}\nReceived: {1} + Недопустимый тип средства ведения журнала\nОжидается: {0}\nПолучено: {1} + Error message thrown for when an invalid logger type is set. + + + InvalidParameter + InvalidParameter + Generic error message for invalid parameters. + + + ParameterCannotBeNullOEmpty + ParameterCannotBeNullOrEmpty + Error message for string parameters that cannot be null or empty. + + + Parameter must be a valid item identifier. + Значение параметра должно быть допустимым идентификатором элемента. + Error message thrown when an invalid item id is retrieved. + + + File Properties + Свойства файла + + + + Folder Properties + Свойства папки + + + + Project Properties + Свойства проекта + + + + Reference Properties + Свойства ссылки + + + + A file or folder with the name '{0}' already exists on disk at this location. Please choose another name. + Файл или папка с именем "{0}" уже существует в данном расположении. Выберите другое имя. + + + + This folder cannot be renamed to '{0}' as it already exists on disk.\n\nOnly empty folders can be renamed to existing folders. This folder contains files within it on disk. + Эту папку невозможно переименовать в "{0}", так как она уже существует на диске.\n\nВ существующие папки можно переименовать только пустые папки. Эта папка содержит файлы на диске. + + + + Build + Сборка + + + + Output Path + Путь для создаваемых файлов + + + + The path to the primary output + Путь к основному выходному файлу + + + + The complete path to '{0}' exceeds the maximum number of characters permitted by the file system. + Длина полного пути к файлу "{0}" превышает максимальное количество символов, разрешенное в файловой системе. + + + + Custom Tool + Пользовательский инструмент + + + + Specifies the tool that transforms a file at design time and places the output of that transformation into another file. For example, a dataset (.xsd) file comes with a default custom tool. + Указывает инструмент, который преобразует файл во время разработки и помещает выходные данные этого преобразования в другой файл. Например, файл набора данных (XSD) поставляется с пользовательским инструментом по умолчанию. + + + + Custom Tool Namespace + Пространство имен пользовательского инструмента + + + + The namespace into which the output of the custom tool is placed. + Пространство имен, в которое помещаются выходные данные пользовательского инструмента. + + + + Primary Output + Основные выходные файлы + + + + Content Files + Файлы с содержимым + + + + Documentation Files + Файлы документации + + + + Localized Resources + Локализованные ресурсы + + + + Source Files + Исходные файлы + + + + Debug Symbols + Отладочные символы + + + + XML Serialization Assemblies + Сборки XML-сериализации + + + + Contains the DLL or EXE built by the project. + DLL- или EXE-файлы, результат сборки проекта. + + + + Contains all content files in the project. + Все файлы проекта, содержащие информацию. + + + + Contains the XML Documentation files for the project. + Содержит файлы XML-документации для проекта. + + + + Contains the satellite assemblies for each culture's resources. + Вспомогательные сборки для ресурсов каждого языка и региональных параметров. + + + + Contains all source files in the project. + Содержит все исходные файлы проекта. + + + + Contains the debugging files for the project. + Файлы для отладки проекта. + + + + Contains the XML serialization assemblies for the project. + Содержит сборки XML-сериализации для проекта. + + + + The project file '{0}' has been modified outside of Visual Studio. Do you want to reload the project? + Файл проекта "{0}" изменен вне среды разработки Visual Studio. Перезагрузить проект? + + + + The nested project has failed to reload. + Не удалось перезагрузить вложенный проект. + + + + The item '{0}' cannot be found on disk, either because it has been renamed, deleted, or moved to a new location. + Элемент "{0}" не удается найти на диске, поскольку элемент был переименован, удален или перемещен в новое место. + + + + A reference to {0} could not be added. Please make sure that the file is accessible, and that it is a valid assembly or COM component. + Не удается добавить ссылку на "{0}". Убедитесь, что файл доступен и действительно представляет собой сборку или компонент COM. + + + + An 'Import' of the file '{1}' was found in the project file '{0}'. This file is not registered as a safe file to import, and could contain targets and tasks that are harmful. If this imported file is indeed considered safe, then it can be registered by writing to the registry key {2}. + В файле проекта "{0}" найден <Import> файла "{1}". Этот файл не зарегистрирован как безопасный для импорта, и может содержать опасные цели и задания. Если файл является безопасным, он может быть зарегистрирован при помощи записи в раздел реестра {2}. + + + + An 'Import' of the file '{1}' was found in the user project file '{0}'. All imports in user project files are considered unsafe. + В файле проекта пользователя "{0}" найден <Import> файла "{1}". Весь импорт в пользовательских файлах проекта считается небезопасным. + + + + One or more items named '{1}' were found in the project file '{0}'. These items normally should not be specified in the project file. They can change the way targets and tasks are executed during project load, and this could have harmful effects. + В файле проекта "{0}" найден один или более элементов "{1}". Обычно эти элементы не определяются в файле проекта. Они позволяют изменять способ выполнения целей и задач во время загрузки проекта, что может иметь не желательные эффекты. + + + + A property named '{1}' was found in the project file '{0}'. This property normally should not be specified in the project file. Its value can change the way targets and tasks are executed during project load, and this could have harmful effects. + В файле проекта "{0}" было обнаружено свойство с именем "{1}". Обычно это свойство не определяется в файле проекта. Его значение позволяет изменять способ выполнения целей и задач во время загрузки проекта, что может иметь не желательные эффекты. + + + + A 'UsingTask' tag which registers the '{1}' task was found in the project file '{0}'. 'UsingTask' tags in the project file take precedence over those in the imported .TARGETS files, and therefore could be used to execute arbitrary code during an otherwise unmodified build process. + В файле проекта "{0}" обнаружен тег "UsingTask", регистрирующий задачу "{1}". Метки <UsingTask> в файле проекта имеют превосходство перед импортированными .TARGETS-файлами, и поэтому могут быть использованы для выполнения произвольного кода во время не изменяемого другими средствами процесса сборки. + + + + A 'Target' named '{1}' was found in the project file '{0}'. The tasks within this target could contain arbitrary code and may get executed as soon as the project is loaded in the IDE. + В файле проекта "{0}" был обнаружен объект "цель" с именем "{1}". Задачи в этом элементе могут содержать произвольный код, который может быть выполнен как только проект загрузится в среду разработки. + + + + An item referring to the file '{1}' was found in the project file '{0}'. Since this file is located within a system directory, root directory, or network share, it could be harmful to write to this file. + В файле проекта "{0}" найден элемент, ссылающийся на файл "{1}". Так как это файл находится в системном каталоге, корневом каталоге или в общем сетевом каталоге, запись в данный файл может быть опасной. + + + + The project location is not trusted:{0}{0}{1}{0}{0}Running the application may result in security exceptions when it attempts to perform actions which require full trust.{0}{0}Click OK to ignore and continue. + Расположение проекта не является доверенным:{0}{0}{1}{0}{0}Выполнение приложения может привести к исключениям безопасности при попытке выполнить действия, требующие полного доверия.{0}{0}Нажмите кнопку "ОК", чтобы игнорировать ошибку и продолжить. + + + + Exception was thrown during BuildBegin event\n{0} + Возникло исключение во время события BuildBegin\n{0} + + + + Copy always + Всегда копировать + CopyToOutputDirectory - drop down option + + + Copy to Output Directory + Копировать в выходной каталог + + + + Specifies the source file will be copied to the output directory + Указывает, что исходный файл будет скопирован в указанный каталог + + + + Copy if newer + Копировать более позднюю версию + CopyToOutputDirectory - drop down option + + + Do not copy + Не копировать + CopyToOutputDirectory - drop down option + + + Specific Version + Конкретная версия + + + + Indicates whether this reference is to a specific version of an assembly. + Показывает, является ли эта ссылка ссылкой на конкретную версию сборки. + + + + Microsoft Visual F# does not support zero-impact projects. To create an F# project from this project template, either go to the Visual Studio menu 'Tools, Options..., Projects and Solutions, General' and check the box marked 'Save new projects when created', or specify <PromptForSaveOnCreation>true</PromptForSaveOnCreation> in the <TemplateData> section of this project template's .vstemplate file, and then retry this operation. + Microsoft Visual F# не поддерживает проекты с нулевым влиянием. Чтобы создать проект F# из этого шаблона проекта, последовательно выберите в меню Visual Studio "Сервис" команды "Параметры", "Проекты и решения", "Общие", а затем установите флажок "Сохранять новые проекты в момент создания" либо укажите <PromptForSaveOnCreation>true</PromptForSaveOnCreation> в разделе <TemplateData> файла .vstemplate этого шаблона, а затем повторите операцию. + + + + "Cannot open F# project '{0}'. \nThis project uses wildcards in item specification: \n'{2}' for item type '{1}'\n\nWildcards in F# projects are not currently supported. + "Не удается открыть проект F# "{0}". \nЭтот проект использует подстановочные знаки в спецификации элемента: \n"{2}" для элемента типа "{1}"\n\nВ проектах F# подстановочные знаки сейчас не поддерживаются. + + + + "Cannot add file {3} to F# project '{0}'. \nThis project uses wildcards in item specification: \n'{2}' for item type '{1}'\n\nWildcards in F# projects are not currently supported. + "Не удается добавить файл {3} в проект F# "{0}". \nЭтот проект использует подстановочные знаки в спецификации элемента: \n"{2}" для элемента типа "{1}"\n\nВ проектах F# подстановочные знаки сейчас не поддерживаются. + + + + Cannot open project file for edit. + Не удается открыть файл проекта для редактирования. + + + + Project file was checked out and is already upgraded. + Файл проекта был извлечен и уже обновлен. + + + + A project with an Output Type of Class Library cannot be started directly.\n\nIn order to debug this project, add an executable project to this solution which references the library project. Set the executable project as the startup project. + Проект, создающий библиотеку классов, не может быть непосредственно запущен.\n\nДля отладки данного проекта добавьте к решению проект, создающий приложение и ссылающийся на эту библиотеку, и сделайте его запускаемым. + + + + The entered path is not a valid output path + Введенный путь не является допустимым путем вывода + + + + The project {0} cannot be referenced. An assembly must have a 'dll' or 'exe' extension in order to be referenced. + Невозможно задать ссылку на проект {0}. Сборка должна иметь расширение DLL или EXE для того, чтобы на нее можно было ссылаться. + + + + Cannot start a build, because another build is already in progress. + Не удается начать сборку, поскольку уже выполняется другая сборка. + + + + The working directory does not exist:\n'{0}'. + Рабочий каталог не существует:\n'{0}'. + + + + A reference to library '{0}' cannot be added. This project targets a different framework ({2}) from the current project ({1}). + Не удается добавить ссылку на библиотеку "{0}". Этот проект предназначен для платформы ({2}), отличной от платформы текущего проекта ({1}). + + + + The project '{0}' is targeting '{1}'; however, the target framework is not installed on the machine. + Проект "{0}" предназначен для "{1}"; однако на этом компьютере не установлена целевая версия платформы. + + + + F# + F# + + + + The referenced project '{0}' is targeting a higher framework version ({1}) than this project’s current target framework version ({2}). This may lead to build failures if types from assemblies outside this project’s target framework are used by any project in the dependency chain. + Ссылочный проект "{0}" предназначен для более высокой версии платформы ({1}), чем текущая требуемая версия платформы ({2}) этого проекта. Это может привести к ошибкам сборки, если в каких-либо проектах из цепочки зависимостей будут использоваться типы из сборок, не принадлежащих требуемой версии платформы данного проекта. + + + + The project file does not require conversion. + Файл проекта не нуждается в преобразовании. + + + + No Conversion Required + Преобразование не требуется + + + + Error creating backup of project file: {0} + Ошибка при создании резервной копии файла проекта: {0} + + + + Project file successfully backed up as {0} + Резервная копия файла проекта успешно сохранена под именем {0} + + + + Backup file name conflict. Renaming file to: {0} + Конфликт имени файла резервной копии. Файл будет переименован в: {0} + + + + Backed up project may not build. Project contains linked file: {0} + Возможны ошибки при сборке восстановленного проекта. Проект содержит скомпонованный файл: {0} + + + + Failed to backup file as {0} + Не удалось создать резервную копию файла под именем {0} + + + + File successfully backed up as {0} + Резервная копия файла успешно сохранена под именем {0} + + + + Identity + Удостоверение + + + + Security identity of the referenced assembly. + Идентификатор безопасности сборки, на которую указывает ссылка. + + + + Path + Путь + + + + Location of file being referenced. + Расположение адресуемого файла. + + + + Version + Версия + + + + Copy of {0} + Копия {0} + + + + Copy ({0}) of {1} + Копия ({0}) {1} + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/xlf/Microsoft.VisualStudio.Package.Project.tr.xlf b/vsintegration/src/FSharp.ProjectSystem.Base/Project/xlf/Microsoft.VisualStudio.Package.Project.tr.xlf new file mode 100644 index 00000000000..be3616f9b35 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.Base/Project/xlf/Microsoft.VisualStudio.Package.Project.tr.xlf @@ -0,0 +1,820 @@ + + + + + + Failed to add file '{0}' to project as project is null. + Proje null olduğundan '{0}' dosyası projeye eklenemedi. + + + + Advanced + Gelişmiş + Project Property Page Caption + + + A reference to '{0}' could not be added. + '{0}' için bir başvuru eklenemedi. + ReferenceCouldNotBeAdded error message + + + A reference to '{0}' could not be added. A reference to the component '{1}' already exists in the project. + {0}' başvurusu eklenemedi. Projede '{1}' bileşenine başvuru zaten var. + ReferenceAlreadyExists error message + + + A reference to '{0}' (with assembly name '{1}') could not be added. A reference to the component '{2}' with the same assembly name already exists in the project. + {0}' başvurusu ('{1}' bütünleştirilmiş kod adlı) eklenemedi. Aynı bütünleştirilmiş kod adıyla '{2}' bileşenine başvuru projede zaten var. + ReferenceAlreadyExists error message + + + Could not load attribute '{0}' from project file '{1}'. + {0}' özniteliği '{1}' proje dosyasından yüklenemedi. + + + + Build Action + Derleme Eylemi + Project Build Property Name + + + How the file relates to the build and deployment process + Dosya derleme ve dağıtım işlemlerine nasıl ilişkilendiriliyor + Project Build Property Description + + + Verbosity + Ayrıntı + + + + Specify how much information is included in the build output + Derleme çıktısında ne kadar bilgi bulunduğunu belirtin + + + + ECMA-335 CLI compatible framework (location must be provided) + ECMA-335 CLI uyumlu Framework (konum sağlanmalıdır) + Target platform drop down option + + + Compile + Derle + Build Action - drop down option + + + If you change a file name extension, the file may become unusable. Are you sure you want to change it? + Dosya adı uzantısını değiştirirseniz dosya kullanılamayabilir. Değiştirmek istediğinizden emin misiniz? + + + + A file with name '{0}' already exists and is open in an editor. Please give a unique name to the item you are adding, or delete the existing item first. + '{0}' adlı bir dosya zaten var ve bir düzenleyicide açık. Lütfen eklemekte olduğunuz öğeye benzersiz bir ad verin veya önce var olan öğeyi silin. + + + + Cannot save '{0}' as it is not open in the editor. + '{0}' düzenleyicide açık olmadığından kaydedilemedi. + + + + Content + İçerik + Build Action - drop down option + + + Copy Local + Yereli Kopyala + File property + + + Indicates whether the reference will be copied to the output directory. + Başvurunun çıkış dizinine kopyalanıp kopyalanmayacağını gösterir. + + + + Detailed + Ayrıntılı + + + + Diagnostic + Tanılama + + + + Directory already exists + Dizin zaten var. + + + + Error opening specified view '{0}' using editor '{1}' + Belirtilen '{0}' görünümü '{1}' düzenleyicisiyle açılırken hata oluştu + + + + Embedded Resource + Eklenmiş Kaynak + Build Action - drop down option + + + error + hata + + + + Files and folders cannot be: +- Empty strings +- System reserved names, including 'CON', 'AUX', PRN', 'COM1' or 'LPT2' +- contain only '.' +- have any of the following characters: / ? : & \ * " < > | # % + Dosya ve klasörler aşağıdaki özelliklere sahip olamaz: +- Boş dize +- 'CON', 'AUX', PRN', 'COM1' veya 'LPT2' gibi sistem tarafından ayrılmış adlar +- yalnızca '.' içeren +- şu karakterlerden herhangi birini içeren: / ? : & \ * " < > | # % + + + + The name you provided is not a valid project name. + Sağladığınız ad geçerli bir proje adı değil. + + + + MSBuild path not found in registry. Please reinstall to fix the problem. + MSBuild yolu kayıt defterinde bulunamadı. Sorunu çözmek için lütfen tekrar yükleyin. + + + + Error Saving File + Dosya Kaydedilirken Hata Oluştu + + + + Console Application + Konsol Uygulaması + + + + Expecting object of type {0}. + {0} türünde nesne bekleniyor. + + + + Failed to retrieve msbuild property {0} from the project file. + {0} msbuild özelliği proje dosyasından alınamadı. + The exception message thrown when getting a property from msbuild fails. + + + A file with the same name '{0}' already exists. Do you want to overwrite it? + '{0}' ile aynı adlı bir dosya zaten var. Üstüne yazmak ister misiniz? + + + + A file with the same name '{0}' already exists. + '{0}' ile aynı adlı bir dosya zaten var. + + + + Destination File Exists + Hedef Dosya Var + + + + A file of this name is already part of the project. Do you want to overwrite it? + Bu ada sahip bir dosya zaten projenin parçası. Bu dosyanın üzerine yazmak istiyor musunuz? + + + + Destination File Exists + Hedef Dosya Var + + + + A file or folder with the name '{0}' already exists on disk at this location. Please choose another name. + Diskte bu konumda '{0}' adlı bir dosya veya klasör zaten var. Lütfen başka bir ad seçin. + + + + Error Copying File + Dosya Kopyalanırken Hata Oluştu + + + + File Name + Dosya Adı + + + + File and folder names cannot contain a leading period. + Dosya ve klasör adları nokta ile başlayamaz. + + + + The name of the file or folder + Dosya veya klasörün adı + + + + Folder Name + Klasör Adı + + + + Name of this folder + Bu klasörün adı + + + + Full Path + Tam Yol + + + + Location of the file + Dosyanın konumu + + + + The item '{0}' does not exist in the project directory. It may have been moved, renamed or deleted. + '{0}' öğesi proje dizininde yok. Taşınmış, yeniden adlandırılmış veya silinmiş olabilir. + + + + Cannot save '{0}' outside the project directory. Linked items are not supported. + '{0}', proje dizininin dışına kaydedilemez. Bağlı öğeler desteklenmiyor. + + + + Class Library + Sınıf Kitaplığı + + + + Minimal + En az + + + + Misc + Çeşitli + + + + None + Yok + + + + Normal + Normal + + + + Item is not available or corrupted and thus cannot be pasted. + Öğe kullanılamıyor veya bozuk ve bu nedenle yapıştırılamaz. + + + + Program + Program + + + + Project + Proje + + + + A reference to library '{0}' cannot be added. Adding this project as a reference would cause a circular dependency. + '{0}' kitaplığına başvuru eklenemiyor. Bu projeyi başvuru olarak eklemek döngüsel bağımlılığa neden olur. + + + + Project File + Proje Dosyası + + + + The name of the file containing build, configuration, and other information about the project. + Derleme, yapılandırma ve proje ile ilgili diğer bilgileri içeren dosyanın adı. + + + + Project Folder + Proje Klasörü + + + + The absolute location of the project. + Projenin mutlak konumu. + + + + Quiet + Sessiz + + + + (Name) + (Ad) + + + + References + Başvurular + + + + Display name of the reference + Başvurunun görünen adı + + + + Rename directory failed. {0} + Dizini yeniden adlandırmada hata. {0} + + + + RTL_False + RTL_False + + + + Save? + Kaydedilsin mi? + + + + Do you want to save modified documents? + Değiştirilmiş belgeleri kaydetmek istiyor musunuz? + + + + The project file can only be saved into the project location '{0}'. + Bu proje dosyası sadece '{0}' proje konumuna kaydedilebilir. + + + + Error opening specified view '{0}' using standard editor. + Belirtilen '{0}' görünümünün standart düzenleyiciyi kullanarak açılmasında hata oluştu. + + + + URL + URL + + + + You are trying to use an item that has already been deleted or that does not exist. + Önceden silinmiş olan veya var olmayan bir öğeyi kullanmaya çalışıyorsunuz. + + + + Microsoft .Net Framework v1.0 + Microsoft .Net Framework v1.0 + + + + Microsoft .Net Framework v1.1 + Microsoft .Net Framework v1.1 + + + + Microsoft .Net Framework v2.0 + Microsoft .Net Framework v2.0 + + + + warning + uyarı + + + + Windows Application + Windows Uygulaması + + + + Automation object invalid. + Otomasyon nesnesi geçersiz. + + + + The command you are attempting cannot be completed because the file '{0}' that must be modified cannot be changed. If the file is under source control, you may want to check it out; if the file is read-only on disk, you may want to change its attributes. + Değiştirilmesi gereken '{0}' dosyası değiştirilemediği için gönderdiğiniz komut tamamlanamadı. Dosya kaynak denetimi altındaysa, kullanıma alabilirsiniz; dosya salt okunur bir diskteyse, özniteliklerini değiştirebilirsiniz. + MsgBox + + + Parameter must be a valid guid. + Parametre geçerli bir guid olmalıdır. + Error message in the ArgumentException for a parameter that is not a valid guid. + + + Invalid logger type\nExpected: {0}\nReceived: {1} + Geçersiz günlükçü türü\nBeklenen: {0}\nAlınan: {1} + Error message thrown for when an invalid logger type is set. + + + InvalidParameter + InvalidParameter + Generic error message for invalid parameters. + + + ParameterCannotBeNullOEmpty + ParameterCannotBeNullOEmpty + Error message for string parameters that cannot be null or empty. + + + Parameter must be a valid item identifier. + Parametre geçerli bir madde tanımlayıcısı olmalıdır. + Error message thrown when an invalid item id is retrieved. + + + File Properties + Dosya Özellikleri + + + + Folder Properties + Klasör Özellikleri + + + + Project Properties + Proje Özellikleri + + + + Reference Properties + Başvuru Özellikleri + + + + A file or folder with the name '{0}' already exists on disk at this location. Please choose another name. + Diskte bu konumda '{0}' adlı bir dosya veya klasör zaten var. Lütfen başka bir ad seçin. + + + + This folder cannot be renamed to '{0}' as it already exists on disk.\n\nOnly empty folders can be renamed to existing folders. This folder contains files within it on disk. + Bu klasör, disk üzerinde zaten mevcut olduğundan '{0}' olarak yeniden adlandırılamaz.\n\nYalnızca boş klasörler mevcut klasörlerle yeniden adlandırılabilir. Bu klasör, disk üzerinde dosya içeriyor. + + + + Build + Oluştur + + + + Output Path + Çıkış Yolu + + + + The path to the primary output + Birincil çıkışın yolu + + + + The complete path to '{0}' exceeds the maximum number of characters permitted by the file system. + '{0}' öğesinin tam yolu, dosya sistemi tarafından izin verilen en yüksek karakter sayısını aşıyor. + + + + Custom Tool + Özel Araç + + + + Specifies the tool that transforms a file at design time and places the output of that transformation into another file. For example, a dataset (.xsd) file comes with a default custom tool. + Bir dosyayı tasarım zamanında dönüştüren ve dönüştürme çıkışını başka bir dosyaya yerleştiren aracı belirtir. Örneğin, bir veri kümesi (.xsd) dosyası, varsayılan bir özel araçla gelir. + + + + Custom Tool Namespace + Özel Araç İsim Uzayı + + + + The namespace into which the output of the custom tool is placed. + Özel aracın çıktısının yerleştirileceği ad alanı. + + + + Primary Output + Birincil Çıkış + + + + Content Files + İçerik Dosyaları + + + + Documentation Files + Belge Dosyaları + + + + Localized Resources + Yerelleştirilmiş Kaynaklar + + + + Source Files + Kaynak Dosyalar + + + + Debug Symbols + Hata Ayıklama Sembolleri + + + + XML Serialization Assemblies + XML Serileştirme Bütünleştirilmiş Kodları + + + + Contains the DLL or EXE built by the project. + Proje tarafından oluşturulan DLL veya EXE dosyasını içerir. + + + + Contains all content files in the project. + Projedeki tüm içerik dosyalarını içerir. + + + + Contains the XML Documentation files for the project. + Projenin XML Belge dosyalarını içerir. + + + + Contains the satellite assemblies for each culture's resources. + Her kültüre ait kaynakların uydu derlemelerini içerir. + + + + Contains all source files in the project. + Projedeki tüm kaynak dosyaları içerir. + + + + Contains the debugging files for the project. + Projenin hata ayıklama dosyalarını içerir. + + + + Contains the XML serialization assemblies for the project. + Projenin XML serileştirme derlemelerini içerir. + + + + The project file '{0}' has been modified outside of Visual Studio. Do you want to reload the project? + '{0}' proje dosyası Visual Studio'nun dışında değiştirilmiş. Projeyi yeniden yüklemek istiyor musunuz? + + + + The nested project has failed to reload. + İç içe projeler yeniden yüklenemedi. + + + + The item '{0}' cannot be found on disk, either because it has been renamed, deleted, or moved to a new location. + Adı değiştiğinden, silindiğinden veya yeni konuma taşındığından '{0}' öğesi diskte bulunamıyor. + + + + A reference to {0} could not be added. Please make sure that the file is accessible, and that it is a valid assembly or COM component. + {0} öğesine başvuru eklenemedi. Lütfen dosyanın erişilebilir olduğundan ve geçerli bir derleme ya da COM bileşeni olduğundan emin olun. + + + + An 'Import' of the file '{1}' was found in the project file '{0}'. This file is not registered as a safe file to import, and could contain targets and tasks that are harmful. If this imported file is indeed considered safe, then it can be registered by writing to the registry key {2}. + {0}' proje dosyasında '{1}' dosyasının 'Import' eylemi bulundu. Bu dosya içeri aktarılması güvenli bir dosya olarak kaydedilmedi ve zararlı hedefler ve görevler içerebilir. İçeri aktarılan bu dosya güvenli olarak kabul ediliyorsa, {2} kayıt defteri anahtarına yazılarak kaydedilebilir. + + + + An 'Import' of the file '{1}' was found in the user project file '{0}'. All imports in user project files are considered unsafe. + {0}' kullanıcı proje dosyasında '{1}' dosyasının 'Import' eylemi bulundu. Kullanıcı proje dosyalarındaki tüm içeri aktarma işlemleri güvensiz kabul edilir. + + + + One or more items named '{1}' were found in the project file '{0}'. These items normally should not be specified in the project file. They can change the way targets and tasks are executed during project load, and this could have harmful effects. + {0}' proje dosyasında '{1}' adlı bir veya daha çok öğe bulundu. Bu öğelerin normalde proje dosyasında belirtilmemesi gerekir. Bu öğeler, proje yükleme sırasında hedeflerin ve görevlerin yürütülme biçimini değiştirebilir ve bunun zararlı etkileri olabilir. + + + + A property named '{1}' was found in the project file '{0}'. This property normally should not be specified in the project file. Its value can change the way targets and tasks are executed during project load, and this could have harmful effects. + {0}' proje dosyasında '{1}' adlı bir özellik bulundu. Bu özellik normalde proje dosyasında belirtilmemelidir. Özelliğin değeri proje yükleme sırasında hedeflerin ve görevlerin yürütülme biçimini değiştirebilir ve bunun zararlı etkileri olabilir. + + + + A 'UsingTask' tag which registers the '{1}' task was found in the project file '{0}'. 'UsingTask' tags in the project file take precedence over those in the imported .TARGETS files, and therefore could be used to execute arbitrary code during an otherwise unmodified build process. + {0}' proje dosyasında '{1}' görevini kaydeden 'UsingTask' etiketi bulundu. Proje dosyasındaki 'UsingTask' etiketleri, içeri aktarılan .TARGETS dosyalarından önceliklidir ve bu nedenle, tersine bir değişiklik yapılmamış oluşturma işlemi sırasında rastgele kodu yürütmek için kullanılabilir. + + + + A 'Target' named '{1}' was found in the project file '{0}'. The tasks within this target could contain arbitrary code and may get executed as soon as the project is loaded in the IDE. + {0}' proje dosyasında '{1}' adlı bir 'Target' bulundu. Bu hedefteki görevler rastgele kod içerebilir ve proje IDE'ye yüklenir yüklenmez çalıştırılabilir. + + + + An item referring to the file '{1}' was found in the project file '{0}'. Since this file is located within a system directory, root directory, or network share, it could be harmful to write to this file. + {0}' proje dosyasında '{1}' dosyasına başvuru yapan bir öğe bulundu. Bu dosya sistem dizininde, kök dizinde veya ağ paylaşımında bulunduğundan, bu dosyaya yazmak zararlı olabilir. + + + + The project location is not trusted:{0}{0}{1}{0}{0}Running the application may result in security exceptions when it attempts to perform actions which require full trust.{0}{0}Click OK to ignore and continue. + Proje konumu güvenilir değil:{0}{0}{1}{0}{0}Uygulamayı çalıştırmak, tam güven gerektiren eylemleri gerçekleştirmeye çalıştığında güvenlik özel durumlarına neden olabilir.{0}{0}Yoksayıp devam etmek için Tamam'a tıklayın. + + + + Exception was thrown during BuildBegin event\n{0} + BuildBegin olayı sırasında bir özel durum oluştu\n{0} + + + + Copy always + Her zaman kopyala + CopyToOutputDirectory - drop down option + + + Copy to Output Directory + Çıkış Dizinine Kopyala + + + + Specifies the source file will be copied to the output directory + Çıkış dizinine kopyalanacak kaynak dosyasını belirtir + + + + Copy if newer + Daha yeniyse kopyala + CopyToOutputDirectory - drop down option + + + Do not copy + Kopyalama + CopyToOutputDirectory - drop down option + + + Specific Version + Belirli Bir Sürüm + + + + Indicates whether this reference is to a specific version of an assembly. + Bu başvurunun bütünleştirilmiş kodun belirli bir sürümüne yapılıp yapılmadığını belirtir. + + + + Microsoft Visual F# does not support zero-impact projects. To create an F# project from this project template, either go to the Visual Studio menu 'Tools, Options..., Projects and Solutions, General' and check the box marked 'Save new projects when created', or specify <PromptForSaveOnCreation>true</PromptForSaveOnCreation> in the <TemplateData> section of this project template's .vstemplate file, and then retry this operation. + Microsoft Visual F# sıfır etkili projeleri desteklemez. Bu proje şablonundan bir F# projesi oluşturmak için Visual Studio menüsü 'Araçlar, Seçenekler..., Projeler ve Çözümler, Genel' seçeneğine gidip 'Oluşturulduklarında yeni projeleri kaydet' yazan kutuyu işaretleyin veya bu proje şablonunun .vstemplate dosyasındaki <TemplateData> bölümünde <PromptForSaveOnCreation>true</PromptForSaveOnCreation> belirttikten sonra bu işlemi yeniden deneyin. + + + + "Cannot open F# project '{0}'. \nThis project uses wildcards in item specification: \n'{2}' for item type '{1}'\n\nWildcards in F# projects are not currently supported. + "'{0}' adlı F# projesi açılamıyor. \nBu proje, öğe belirtiminde joker karakterler kullanıyor: \n'{1}' öğe türü için '{2}'\n\nŞu anda F# projelerinde joker karakterler desteklenmiyor. + + + + "Cannot add file {3} to F# project '{0}'. \nThis project uses wildcards in item specification: \n'{2}' for item type '{1}'\n\nWildcards in F# projects are not currently supported. + "{3} dosyası '{0}' adlı F# projesine eklenemiyor. \nBu proje, öğe belirtiminde joker karakterler kullanıyor: \n'{1}' öğe türü için '{2}'\n\nŞu anda F# projelerinde joker karakterler desteklenmiyor. + + + + Cannot open project file for edit. + Proje dosyası düzenleme için açılamıyor. + + + + Project file was checked out and is already upgraded. + Proje dosyası kullanıma alınmış ve zaten yükseltilmiş. + + + + A project with an Output Type of Class Library cannot be started directly.\n\nIn order to debug this project, add an executable project to this solution which references the library project. Set the executable project as the startup project. + Çıkış Türü Sınıf Kitaplığı olan bir proje doğrudan başlatılamaz.\n\nBu projede hata ayıklamak için kitaplık projesine başvuran çalıştırılabilir bir projeyi bu çözüme ekleyin. Çalıştırılabilir projeyi başlangıç projesi olarak ayarlayın. + + + + The entered path is not a valid output path + Girilen yol geçerli bir çıkış yolu değil + + + + The project {0} cannot be referenced. An assembly must have a 'dll' or 'exe' extension in order to be referenced. + {0} projesine başvurulamıyor. Bir bütünleştirilmiş koda başvurulabilmesi için 'dll' veya 'exe' uzantısı olması gerekir. + + + + Cannot start a build, because another build is already in progress. + Zaten devam eden başka bir yapı olduğu için yapı başlatılamaz. + + + + The working directory does not exist:\n'{0}'. + Çalışma dizini yok:\n'{0}'. + + + + A reference to library '{0}' cannot be added. This project targets a different framework ({2}) from the current project ({1}). + {0}' kitaplığına başvuru eklenemiyor. Bu proje geçerli projeden ({1}) farklı bir çerçeveyi ({2}) hedefliyor. + + + + The project '{0}' is targeting '{1}'; however, the target framework is not installed on the machine. + {0}' projesi '{1}' hedefliyor; ancak, hedef Framework makinede yüklü değil. + + + + F# + F# + + + + The referenced project '{0}' is targeting a higher framework version ({1}) than this project’s current target framework version ({2}). This may lead to build failures if types from assemblies outside this project’s target framework are used by any project in the dependency chain. + Başvurulan '{0}' projesi, bu projenin geçerli hedef çerçeve sürümünden ({2}) daha yüksek bir çerçeve sürümünü ({1}) hedefliyor. Bu projenin hedef çerçevesinin dışındaki bütünleştirilmiş kodlara ait türler bağımlılık zincirindeki herhangi bir proje tarafından kullanılırsa bu durum oluşturma hatalarına neden olabilir. + + + + The project file does not require conversion. + Proje dosyası dönüştürme gerektirmiyor. + + + + No Conversion Required + Dönüştürme Gerekli Değil + + + + Error creating backup of project file: {0} + Proje dosyasının yedeği oluşturulurken hata: {0} + + + + Project file successfully backed up as {0} + Proje dosyası başarıyla {0} olarak yedeklendi + + + + Backup file name conflict. Renaming file to: {0} + Yedekleme dosya adı çakışması. Dosya şuna yeniden adlandırılıyor: {0} + + + + Backed up project may not build. Project contains linked file: {0} + Yedeklenmiş proje oluşturulmayabilir. Proje bağlantılı dosya içeriyor: {0} + + + + Failed to backup file as {0} + Dosya {0} olarak yedeklenemedi + + + + File successfully backed up as {0} + Dosya başarıyla {0} olarak yedeklendi + + + + Identity + Kimlik + + + + Security identity of the referenced assembly. + Başvurulan bütünleştirilmiş kodun güvenlik kimliği. + + + + Path + Yol + + + + Location of file being referenced. + Başvurulmakta olan dosyanın konumu. + + + + Version + Sürüm + + + + Copy of {0} + {0} kopyası + + + + Copy ({0}) of {1} + {1} öğesinin ({0}) kopyası + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/xlf/Microsoft.VisualStudio.Package.Project.zh-Hans.xlf b/vsintegration/src/FSharp.ProjectSystem.Base/Project/xlf/Microsoft.VisualStudio.Package.Project.zh-Hans.xlf new file mode 100644 index 00000000000..c10c54a12dc --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.Base/Project/xlf/Microsoft.VisualStudio.Package.Project.zh-Hans.xlf @@ -0,0 +1,820 @@ + + + + + + Failed to add file '{0}' to project as project is null. + 向项目添加文件“{0}”失败,因为项目为 null。 + + + + Advanced + 高级 + Project Property Page Caption + + + A reference to '{0}' could not be added. + 无法添加对“{0}”的引用。 + ReferenceCouldNotBeAdded error message + + + A reference to '{0}' could not be added. A reference to the component '{1}' already exists in the project. + 未能添加对“{0}”的引用。项目中已存在对组件“{1}”的引用。 + ReferenceAlreadyExists error message + + + A reference to '{0}' (with assembly name '{1}') could not be added. A reference to the component '{2}' with the same assembly name already exists in the project. + 未能添加对“{0}”的引用(使用程序集名称“{1}”)。该项目中已存在一个对具有相同程序集名称的组件“{2}”的引用。 + ReferenceAlreadyExists error message + + + Could not load attribute '{0}' from project file '{1}'. + 无法从项目文件“{1}”中加载属性“{0}”。 + + + + Build Action + 生成操作 + Project Build Property Name + + + How the file relates to the build and deployment process + 文件与生成和部署过程的关联方式 + Project Build Property Description + + + Verbosity + 详细信息 + + + + Specify how much information is included in the build output + 指定生成输出中包含多少信息 + + + + ECMA-335 CLI compatible framework (location must be provided) + ECMA-335 CLI 兼容框架(必须提供位置) + Target platform drop down option + + + Compile + 编译 + Build Action - drop down option + + + If you change a file name extension, the file may become unusable. Are you sure you want to change it? + 如果更改文件扩展名,则该文件可能无法使用。是否确实要更改它? + + + + A file with name '{0}' already exists and is open in an editor. Please give a unique name to the item you are adding, or delete the existing item first. + 名为“{0}”的文件已经存在,而且已在编辑器中打开。请为要添加的项指定唯一名称,或者先删除现有项。 + + + + Cannot save '{0}' as it is not open in the editor. + 无法保存“{0}”,因为它未在编辑器中打开。 + + + + Content + 内容 + Build Action - drop down option + + + Copy Local + 复制本地 + File property + + + Indicates whether the reference will be copied to the output directory. + 指示是否将引用复制到输出目录。 + + + + Detailed + 详细 + + + + Diagnostic + 诊断 + + + + Directory already exists + 目录已存在 + + + + Error opening specified view '{0}' using editor '{1}' + 使用编辑器“{1}”打开指定视图“{0}”时出错 + + + + Embedded Resource + 嵌入的资源 + Build Action - drop down option + + + error + 错误 + + + + Files and folders cannot be: +- Empty strings +- System reserved names, including 'CON', 'AUX', PRN', 'COM1' or 'LPT2' +- contain only '.' +- have any of the following characters: / ? : & \ * " < > | # % + 文件和文件夹不能: +- 为空字符串 +- 为系统保留的名称,包括“CON”、“AUX”、“PRN”、“COM1”或“LPT2” +- 仅包含“.” +- 具有以下任一字符: / ? : & \ * " < > | # % + + + + The name you provided is not a valid project name. + 您提供的名称不是有效的项目名称。 + + + + MSBuild path not found in registry. Please reinstall to fix the problem. + 在注册表中未找到 MSBuild 路径。请重新安装以修复此问题。 + + + + Error Saving File + 保存文件时出错 + + + + Console Application + 控制台应用程序 + + + + Expecting object of type {0}. + 对象类型应为 {0}。 + + + + Failed to retrieve msbuild property {0} from the project file. + 从项目文件检索 msbuild 属性 {0} 失败。 + The exception message thrown when getting a property from msbuild fails. + + + A file with the same name '{0}' already exists. Do you want to overwrite it? + 名为“{0}”的文件已存在。是否覆盖它? + + + + A file with the same name '{0}' already exists. + 名为“{0}”的文件已存在。 + + + + Destination File Exists + 目标文件已存在 + + + + A file of this name is already part of the project. Do you want to overwrite it? + 项目中已有同名的文件。是否覆盖? + + + + Destination File Exists + 目标文件已存在 + + + + A file or folder with the name '{0}' already exists on disk at this location. Please choose another name. + 磁盘上的此位置已经存在名为“{0}”的文件或文件夹。请选择其他名称。 + + + + Error Copying File + 复制文件时出错 + + + + File Name + 文件名 + + + + File and folder names cannot contain a leading period. + 文件和文件夹名称不能包含前导句点。 + + + + The name of the file or folder + 文件或文件夹的名称 + + + + Folder Name + 文件夹名称 + + + + Name of this folder + 此文件夹的名称 + + + + Full Path + 完整路径 + + + + Location of the file + 文件的位置 + + + + The item '{0}' does not exist in the project directory. It may have been moved, renamed or deleted. + 该项目目录中不存在项“{0}”。它可能已经被移动、重命名或者删除。 + + + + Cannot save '{0}' outside the project directory. Linked items are not supported. + 无法在项目目录外保存“{0}”。不支持链接的项。 + + + + Class Library + 类库 + + + + Minimal + 最小 + + + + Misc + 杂项 + + + + None + + + + + Normal + 常规 + + + + Item is not available or corrupted and thus cannot be pasted. + 项不可用或者已损坏,因此无法粘贴。 + + + + Program + 程序 + + + + Project + 项目 + + + + A reference to library '{0}' cannot be added. Adding this project as a reference would cause a circular dependency. + 无法添加对库“{0}”的引用。将此项目添加为引用将导致循环依赖。 + + + + Project File + 项目文件 + + + + The name of the file containing build, configuration, and other information about the project. + 包含有关项目的生成、配置和其他信息的文件的名称。 + + + + Project Folder + 项目文件夹 + + + + The absolute location of the project. + 项目的绝对位置。 + + + + Quiet + 安静 + + + + (Name) + (名称) + + + + References + 引用 + + + + Display name of the reference + 引用的显示名称 + + + + Rename directory failed. {0} + 重命名目录失败。{0} + + + + RTL_False + RTL_False + + + + Save? + 是否保存? + + + + Do you want to save modified documents? + 是否保存修改的文档? + + + + The project file can only be saved into the project location '{0}'. + 此项目文件只能保存在项目位置“{0}”。 + + + + Error opening specified view '{0}' using standard editor. + 使用标准编辑器打开指定的视图“{0}”时出错。 + + + + URL + URL + + + + You are trying to use an item that has already been deleted or that does not exist. + 您尝试使用已删除或者不存在的项。 + + + + Microsoft .Net Framework v1.0 + Microsoft .Net Framework v1.0 + + + + Microsoft .Net Framework v1.1 + Microsoft .Net Framework v1.1 + + + + Microsoft .Net Framework v2.0 + Microsoft .Net Framework v2.0 + + + + warning + 警告 + + + + Windows Application + Windows 应用程序 + + + + Automation object invalid. + 自动化对象无效。 + + + + The command you are attempting cannot be completed because the file '{0}' that must be modified cannot be changed. If the file is under source control, you may want to check it out; if the file is read-only on disk, you may want to change its attributes. + 您尝试执行的命令无法完成,因为无法更改必须修改的文件“{0}”。如果该文件受源代码管理,则可能需要将其签出;如果该文件是磁盘上的只读文件,则可能需要更改其特性。 + MsgBox + + + Parameter must be a valid guid. + 参数必须是有效的 GUID。 + Error message in the ArgumentException for a parameter that is not a valid guid. + + + Invalid logger type\nExpected: {0}\nReceived: {1} + 记录器类型无效\n应为: {0}\n接收到: {1} + Error message thrown for when an invalid logger type is set. + + + InvalidParameter + InvalidParameter + Generic error message for invalid parameters. + + + ParameterCannotBeNullOEmpty + ParameterCannotBeNullOEmpty + Error message for string parameters that cannot be null or empty. + + + Parameter must be a valid item identifier. + 参数必须是有效的项标识符。 + Error message thrown when an invalid item id is retrieved. + + + File Properties + 文件属性 + + + + Folder Properties + 文件夹属性 + + + + Project Properties + 项目属性 + + + + Reference Properties + 引用属性 + + + + A file or folder with the name '{0}' already exists on disk at this location. Please choose another name. + 磁盘上的此位置已经存在名为“{0}”的文件或文件夹。请选择其他名称。 + + + + This folder cannot be renamed to '{0}' as it already exists on disk.\n\nOnly empty folders can be renamed to existing folders. This folder contains files within it on disk. + 无法将此文件夹重命名为“{0}”,因为它已存在于磁盘上。\n\n只有空文件夹才能重命名为现有文件夹。此文件夹包含磁盘上文件夹中的文件。 + + + + Build + 生成 + + + + Output Path + 输出路径 + + + + The path to the primary output + 主输出的路径 + + + + The complete path to '{0}' exceeds the maximum number of characters permitted by the file system. + “{0}”的完整路径超过了文件系统允许的最大字符数。 + + + + Custom Tool + 自定义工具 + + + + Specifies the tool that transforms a file at design time and places the output of that transformation into another file. For example, a dataset (.xsd) file comes with a default custom tool. + 指定一个工具,该工具在设计时转换文件,并将该转换的输出放在另一个文件中。例如,数据集(.xsd)文件附带默认自定义工具。 + + + + Custom Tool Namespace + 自定义工具命名空间 + + + + The namespace into which the output of the custom tool is placed. + 用于放置自定义工具的输出的命名空间。 + + + + Primary Output + 主输出 + + + + Content Files + 内容文件 + + + + Documentation Files + 文档文件 + + + + Localized Resources + 本地化资源 + + + + Source Files + 源文件 + + + + Debug Symbols + 调试符号 + + + + XML Serialization Assemblies + XML 序列化程序集 + + + + Contains the DLL or EXE built by the project. + 包含由项目生成的 DLL 或 EXE。 + + + + Contains all content files in the project. + 包含项目中的所有内容文件。 + + + + Contains the XML Documentation files for the project. + 包含项目的 XML 文档文件。 + + + + Contains the satellite assemblies for each culture's resources. + 包含每种区域性资源的附属程序集。 + + + + Contains all source files in the project. + 包含项目中的所有源文件。 + + + + Contains the debugging files for the project. + 包含项目的调试文件。 + + + + Contains the XML serialization assemblies for the project. + 包含项目的 XML 序列化程序集。 + + + + The project file '{0}' has been modified outside of Visual Studio. Do you want to reload the project? + 已在 Visual Studio 之外修改了项目文件“{0}”。 是否重新加载该项目? + + + + The nested project has failed to reload. + 未能重新加载此嵌套项目。 + + + + The item '{0}' cannot be found on disk, either because it has been renamed, deleted, or moved to a new location. + 在磁盘上找不到项“{0}”,可能是因为它已重命名、删除或移动到新位置。 + + + + A reference to {0} could not be added. Please make sure that the file is accessible, and that it is a valid assembly or COM component. + 未能添加对 {0} 的引用。请确保此文件可访问并且是一个有效的程序集或 COM 组件。 + + + + An 'Import' of the file '{1}' was found in the project file '{0}'. This file is not registered as a safe file to import, and could contain targets and tasks that are harmful. If this imported file is indeed considered safe, then it can be registered by writing to the registry key {2}. + 在项目文件“{0}”中找到文件“{1}”的“Import”。此文件未注册为要导入的安全文件,并可能包含有害的目标和任务。 如果确实认为此导入的文件是安全的,则可以通过将其写入注册表项 {2} 进行注册。 + + + + An 'Import' of the file '{1}' was found in the user project file '{0}'. All imports in user project files are considered unsafe. + 在用户项目文件“{0}”中找到文件“{1}”的“Import”。 用户项目文件中的所有导入都被认为是不安全的。 + + + + One or more items named '{1}' were found in the project file '{0}'. These items normally should not be specified in the project file. They can change the way targets and tasks are executed during project load, and this could have harmful effects. + 在项目文件“{0}”中找到一个或多个名为“{1}”的项。通常不应在项目文件中指定这些项。它们可以更改项目加载过程中执行目标和任务的方式,这可能会产生有害影响。 + + + + A property named '{1}' was found in the project file '{0}'. This property normally should not be specified in the project file. Its value can change the way targets and tasks are executed during project load, and this could have harmful effects. + 在项目文件“{0}”中找到一个名为“{1}”的属性。 通常不应在项目文件中指定此属性。 它的值可以更改项目加载过程中执行目标和任务的方式,这可能会产生有害影响。 + + + + A 'UsingTask' tag which registers the '{1}' task was found in the project file '{0}'. 'UsingTask' tags in the project file take precedence over those in the imported .TARGETS files, and therefore could be used to execute arbitrary code during an otherwise unmodified build process. + 在项目文件“{0}”中找到注册“{1}”任务的“UsingTask”标记。 项目文件中的“UsingTask”标记优先于已导入的 .TARGETS 文件中的那些标记,因而可用于在一个未经另外修改的生成过程中执行任意代码。 + + + + A 'Target' named '{1}' was found in the project file '{0}'. The tasks within this target could contain arbitrary code and may get executed as soon as the project is loaded in the IDE. + 在项目文件“{0}”中找到一个名为“{1}”的“Target”。 此目标内的任务可以包含任意代码,在 IDE 中加载此项目后,可能会立即执行这些任务。 + + + + An item referring to the file '{1}' was found in the project file '{0}'. Since this file is located within a system directory, root directory, or network share, it could be harmful to write to this file. + 在项目文件“{0}”中找到引用文件“{1}”的项。 由于此文件位于系统目录、根目录或网络共享中,因此,写入此文件可能会产生有害影响。 + + + + The project location is not trusted:{0}{0}{1}{0}{0}Running the application may result in security exceptions when it attempts to perform actions which require full trust.{0}{0}Click OK to ignore and continue. + 项目位置不受信任:{0}{0}{1}{0}{0}运行该应用程序可能会导致在尝试执行需要完全信任的操作时出现安全异常。{0}{0}单击“确定”忽略此异常并继续操作。 + + + + Exception was thrown during BuildBegin event\n{0} + BuildBegin 事件期间引发异常\n{0} + + + + Copy always + 始终复制 + CopyToOutputDirectory - drop down option + + + Copy to Output Directory + 复制到输出目录 + + + + Specifies the source file will be copied to the output directory + 指定将源文件复制到输出目录 + + + + Copy if newer + 如果较新则复制 + CopyToOutputDirectory - drop down option + + + Do not copy + 不复制 + CopyToOutputDirectory - drop down option + + + Specific Version + 特定版本 + + + + Indicates whether this reference is to a specific version of an assembly. + 指示此引用是否指向某个特定的程序集版本。 + + + + Microsoft Visual F# does not support zero-impact projects. To create an F# project from this project template, either go to the Visual Studio menu 'Tools, Options..., Projects and Solutions, General' and check the box marked 'Save new projects when created', or specify <PromptForSaveOnCreation>true</PromptForSaveOnCreation> in the <TemplateData> section of this project template's .vstemplate file, and then retry this operation. + Microsoft Visual F# 不支持零影响项目。若要从此项目模板创建 F# 项目,可以依次转到 Visual Studio 菜单“工具”、“选项...”、“项目和解决方案”和“常规”,并选中标记为“创建时保存新项目”的框,或者在此项目模板的 .vstemplate 文件的 <TemplateData> 部分中指定 <PromptForSaveOnCreation>true</PromptForSaveOnCreation>,然后重试此操作。 + + + + "Cannot open F# project '{0}'. \nThis project uses wildcards in item specification: \n'{2}' for item type '{1}'\n\nWildcards in F# projects are not currently supported. + “无法打开 F# 项目“{0}”。\n此项目在项类型“{1}”的项目规范“{2}”中\n使用了通配符\n\n当前不支持在 F# 项目中使用通配符。 + + + + "Cannot add file {3} to F# project '{0}'. \nThis project uses wildcards in item specification: \n'{2}' for item type '{1}'\n\nWildcards in F# projects are not currently supported. + “无法向 F# 项目“{0}”添加文件 {3}。\n此项目在项类型“{1}”的项目规范“{2}”中\n使用了通配符\n\n当前不支持在 F# 项目中使用通配符。 + + + + Cannot open project file for edit. + 无法打开项目文件以进行编辑。 + + + + Project file was checked out and is already upgraded. + 项目文件已签出并进行了升级。 + + + + A project with an Output Type of Class Library cannot be started directly.\n\nIn order to debug this project, add an executable project to this solution which references the library project. Set the executable project as the startup project. + 无法直接启动输出类型为类库的项目。\n\n若要调试此项目,请将可执行项目添加到引用库项目的此解决方案。将这个可执行项目设置为启动项目。 + + + + The entered path is not a valid output path + 输入的路径不是有效的输出路径 + + + + The project {0} cannot be referenced. An assembly must have a 'dll' or 'exe' extension in order to be referenced. + 无法引用项目 {0}。程序集必须具有“dll”或“exe”扩展名才能被引用。 + + + + Cannot start a build, because another build is already in progress. + 无法启动生成,因为另一个生成已经在进行中。 + + + + The working directory does not exist:\n'{0}'. + 工作目录不存在:\n“{0}”。 + + + + A reference to library '{0}' cannot be added. This project targets a different framework ({2}) from the current project ({1}). + 无法添加对库“{0}”的引用。此项目以框架({2})为目标,这不同于当前项目({1})。 + + + + The project '{0}' is targeting '{1}'; however, the target framework is not installed on the machine. + 项目“{0}”的目标为“{1}”;但计算机上未安装该目标框架。 + + + + F# + F# + + + + The referenced project '{0}' is targeting a higher framework version ({1}) than this project’s current target framework version ({2}). This may lead to build failures if types from assemblies outside this project’s target framework are used by any project in the dependency chain. + 被引用项目“{0}”的目标为高于此项目的当前目标框架版本({2})的框架版本({1})。如果此项目的目标框架之外的程序集中的类型被依赖链中的任何项目使用,则上述情况可能会导致生成失败。 + + + + The project file does not require conversion. + 项目文件不需要转换。 + + + + No Conversion Required + 无需转换 + + + + Error creating backup of project file: {0} + 创建项目文件的备份期间出错: {0} + + + + Project file successfully backed up as {0} + 已成功将项目文件备份为 {0} + + + + Backup file name conflict. Renaming file to: {0} + 备份文件名冲突。请将文件重命名为: {0} + + + + Backed up project may not build. Project contains linked file: {0} + 备份项目无法生成。项目包含链接的文件: {0} + + + + Failed to backup file as {0} + 未能将文件备份为 {0} + + + + File successfully backed up as {0} + 文件已成功备份为 {0} + + + + Identity + 标识 + + + + Security identity of the referenced assembly. + 引用的程序集的安全标识。 + + + + Path + 路径 + + + + Location of file being referenced. + 所引用的文件的位置。 + + + + Version + 版本 + + + + Copy of {0} + {0} 的副本 + + + + Copy ({0}) of {1} + {1} 的副本({0}) + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/xlf/Microsoft.VisualStudio.Package.Project.zh-Hant.xlf b/vsintegration/src/FSharp.ProjectSystem.Base/Project/xlf/Microsoft.VisualStudio.Package.Project.zh-Hant.xlf new file mode 100644 index 00000000000..fe5edae2aba --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.Base/Project/xlf/Microsoft.VisualStudio.Package.Project.zh-Hant.xlf @@ -0,0 +1,820 @@ + + + + + + Failed to add file '{0}' to project as project is null. + 無法將檔案 '{0}' 加入專案,因為專案是 null。 + + + + Advanced + 進階 + Project Property Page Caption + + + A reference to '{0}' could not be added. + 無法加入對 '{0}' 的參考。 + ReferenceCouldNotBeAdded error message + + + A reference to '{0}' could not be added. A reference to the component '{1}' already exists in the project. + 無法加入 '{0}' 的參考。至 '{1}' 元件的參考已經存在於專案中 + ReferenceAlreadyExists error message + + + A reference to '{0}' (with assembly name '{1}') could not be added. A reference to the component '{2}' with the same assembly name already exists in the project. + 無法加入 '{0}' (組入名稱為 '{1}') 的參考。此專案中已經有相同組件名稱之元件 '{2}' 的參考。 + ReferenceAlreadyExists error message + + + Could not load attribute '{0}' from project file '{1}'. + 無法從專案檔 '{1}' 載入屬性 '{0}'。 + + + + Build Action + 建置動作 + Project Build Property Name + + + How the file relates to the build and deployment process + 檔案與組建和部署處理關聯的方式 + Project Build Property Description + + + Verbosity + 詳細資訊 + + + + Specify how much information is included in the build output + 指定組建輸出中要包含多少資訊 + + + + ECMA-335 CLI compatible framework (location must be provided) + ECMA-335 CLI 相容架構 (必須提供位置) + Target platform drop down option + + + Compile + 編譯 + Build Action - drop down option + + + If you change a file name extension, the file may become unusable. Are you sure you want to change it? + 如果變更副檔名,檔案可能變成無法使用。確定要變更嗎? + + + + A file with name '{0}' already exists and is open in an editor. Please give a unique name to the item you are adding, or delete the existing item first. + 已經有名稱為 '{0}' 的檔案,而且已經在編輯器中開啟。請為所要加入的項目指定唯一的名稱,或者先刪除現有的同名項目。 + + + + Cannot save '{0}' as it is not open in the editor. + 因為 '{0}' 不是在編輯器中開啟的,所以無法儲存。 + + + + Content + 內容 + Build Action - drop down option + + + Copy Local + 複製到本機 + File property + + + Indicates whether the reference will be copied to the output directory. + 表示是否將參考複製到輸出目錄。 + + + + Detailed + 詳細 + + + + Diagnostic + 診斷 + + + + Directory already exists + 目錄已經存在 + + + + Error opening specified view '{0}' using editor '{1}' + 使用編輯器 '{1}' 開啟指定的檢視 '{0}' 時發生錯誤 + + + + Embedded Resource + 內嵌資源 + Build Action - drop down option + + + error + 錯誤 + + + + Files and folders cannot be: +- Empty strings +- System reserved names, including 'CON', 'AUX', PRN', 'COM1' or 'LPT2' +- contain only '.' +- have any of the following characters: / ? : & \ * " < > | # % + 檔案與資料夾不可為: +- 空字串 +- 系統保留名稱,包括 'CON'、'AUX'、'PRN'、'COM1' 或 'LPT2' +- 只有 '.' +- 有下列任一字元: / ? : & \ * " < > | # % + + + + The name you provided is not a valid project name. + 您提供的名稱不是有效的專案名稱。 + + + + MSBuild path not found in registry. Please reinstall to fix the problem. + 在登錄中找不到 MSBuild 路徑。請重新安裝以解決問題。 + + + + Error Saving File + 儲存檔案時發生錯誤 + + + + Console Application + 主控台應用程式 + + + + Expecting object of type {0}. + 必須是類型 {0} 的物件。 + + + + Failed to retrieve msbuild property {0} from the project file. + 無法從專案檔擷取 msbuild 屬性 {0}。 + The exception message thrown when getting a property from msbuild fails. + + + A file with the same name '{0}' already exists. Do you want to overwrite it? + 已經存在相同名稱 '{0}' 的檔案。您要覆寫它嗎? + + + + A file with the same name '{0}' already exists. + 已經存在相同名稱 '{0}' 的檔案。 + + + + Destination File Exists + 目的檔案已經存在 + + + + A file of this name is already part of the project. Do you want to overwrite it? + 此名稱的檔案已經是專案的一部分。要覆寫嗎? + + + + Destination File Exists + 目的檔案已經存在 + + + + A file or folder with the name '{0}' already exists on disk at this location. Please choose another name. + 磁碟的這個位置已經有名稱為 '{0}' 的檔案或資料夾存在。請選擇其他名稱。 + + + + Error Copying File + 複製檔案時發生錯誤 + + + + File Name + 檔案名稱 + + + + File and folder names cannot contain a leading period. + 檔案和資料夾名稱不可以包含前置句號。 + + + + The name of the file or folder + 檔案或資料夾的名稱 + + + + Folder Name + 資料夾名稱 + + + + Name of this folder + 此資料夾的名稱 + + + + Full Path + 完整路徑 + + + + Location of the file + 檔案的位置 + + + + The item '{0}' does not exist in the project directory. It may have been moved, renamed or deleted. + 項目 '{0}' 不存在專案目錄中。可能已經移動、重新命名或刪除。 + + + + Cannot save '{0}' outside the project directory. Linked items are not supported. + 無法將 '{0}' 儲存在專案目錄外。不支援連結項目。 + + + + Class Library + 類別庫 + + + + Minimal + 最小 + + + + Misc + 其他 + + + + None + + + + + Normal + 標準 + + + + Item is not available or corrupted and thus cannot be pasted. + 項目無法使用或已經損毀,所以無法貼上。 + + + + Program + 程式 + + + + Project + 專案 + + + + A reference to library '{0}' cannot be added. Adding this project as a reference would cause a circular dependency. + 無法加入程式庫 '{0}' 的參考。以參考方式加入此專案將導致循環相依性。 + + + + Project File + 專案檔 + + + + The name of the file containing build, configuration, and other information about the project. + 包含組建、組態以及其他專案相關資訊之檔案的名稱。 + + + + Project Folder + 專案資料夾 + + + + The absolute location of the project. + 專案的絕對位置。 + + + + Quiet + 無訊息 + + + + (Name) + (名稱) + + + + References + 參考 + + + + Display name of the reference + 參考的顯示名稱 + + + + Rename directory failed. {0} + 重新命名目錄失敗。{0} + + + + RTL_False + RTL_False + + + + Save? + 儲存嗎? + + + + Do you want to save modified documents? + 您要儲存修改過的文件嗎? + + + + The project file can only be saved into the project location '{0}'. + 專案檔只能儲存至專案位置 '{0}'。 + + + + Error opening specified view '{0}' using standard editor. + 使用標準編輯器開啟指定的檢視 '{0}' 時發生錯誤。 + + + + URL + URL + + + + You are trying to use an item that has already been deleted or that does not exist. + 您嘗試使用的項目已遭到刪除或不存在。 + + + + Microsoft .Net Framework v1.0 + Microsoft .Net Framework v1.0 + + + + Microsoft .Net Framework v1.1 + Microsoft .Net Framework v1.1 + + + + Microsoft .Net Framework v2.0 + Microsoft .Net Framework v2.0 + + + + warning + 警告 + + + + Windows Application + Windows 應用程式 + + + + Automation object invalid. + Automation 物件無效。 + + + + The command you are attempting cannot be completed because the file '{0}' that must be modified cannot be changed. If the file is under source control, you may want to check it out; if the file is read-only on disk, you may want to change its attributes. + 您嘗試執行的命令無法完成,因為無法變更必須要被修改的檔案 '{0}'。如果此檔案是在原始檔控制之下,您需要將它簽出; 如果它在磁碟上是唯讀檔案,您需要變更它的屬性。 + MsgBox + + + Parameter must be a valid guid. + 參數必須是有效的 GUID。 + Error message in the ArgumentException for a parameter that is not a valid guid. + + + Invalid logger type\nExpected: {0}\nReceived: {1} + 無效的記錄器類型\n必須是: {0}\n已收到: {1} + Error message thrown for when an invalid logger type is set. + + + InvalidParameter + InvalidParameter + Generic error message for invalid parameters. + + + ParameterCannotBeNullOEmpty + ParameterCannotBeNullOEmpty + Error message for string parameters that cannot be null or empty. + + + Parameter must be a valid item identifier. + 參數必須是有效的項目識別項。 + Error message thrown when an invalid item id is retrieved. + + + File Properties + 檔案屬性 + + + + Folder Properties + 資料夾屬性 + + + + Project Properties + 專案屬性 + + + + Reference Properties + 參考屬性 + + + + A file or folder with the name '{0}' already exists on disk at this location. Please choose another name. + 磁碟的這個位置已經有名稱為 '{0}' 的檔案或資料夾存在。請選擇其他名稱。 + + + + This folder cannot be renamed to '{0}' as it already exists on disk.\n\nOnly empty folders can be renamed to existing folders. This folder contains files within it on disk. + 因為此資料夾已存在於磁碟,所以無法將其重新命名為 '{0}'。\n\n只有空的資料夾可重新命名為現有的資料夾。此資料夾包含位於磁碟的檔案。 + + + + Build + 建置 + + + + Output Path + 輸出路徑 + + + + The path to the primary output + 主要輸出的路徑 + + + + The complete path to '{0}' exceeds the maximum number of characters permitted by the file system. + '{0}' 的完整路徑超過檔案系統允許的最大字元數。 + + + + Custom Tool + 自訂工具 + + + + Specifies the tool that transforms a file at design time and places the output of that transformation into another file. For example, a dataset (.xsd) file comes with a default custom tool. + 指定於設計階段轉換檔案並將轉換的輸出放置到其他檔案的工具。例如,資料集 (.xsd) 檔案隨附預設自訂工具。 + + + + Custom Tool Namespace + 自訂工具命名空間 + + + + The namespace into which the output of the custom tool is placed. + 自訂工具產生的輸出所放置的命名空間。 + + + + Primary Output + 主要輸出 + + + + Content Files + 內容檔 + + + + Documentation Files + 文件檔 + + + + Localized Resources + 當地語系化資源 + + + + Source Files + 原始程式檔 + + + + Debug Symbols + 偵錯符號 + + + + XML Serialization Assemblies + XML 序列化組件 + + + + Contains the DLL or EXE built by the project. + 包含專案所建置的 DLL 或 EXE。 + + + + Contains all content files in the project. + 包含專案中所有內容檔。 + + + + Contains the XML Documentation files for the project. + 包含專案的 XML 文件檔案。 + + + + Contains the satellite assemblies for each culture's resources. + 包含每個文化特性資源的附屬組件。 + + + + Contains all source files in the project. + 包含專案中所有原始程式檔。 + + + + Contains the debugging files for the project. + 包含專案的偵錯檔案。 + + + + Contains the XML serialization assemblies for the project. + 包含專案的 XML 序列化組件。 + + + + The project file '{0}' has been modified outside of Visual Studio. Do you want to reload the project? + 專案檔 '{0}' 已在 Visual Studio 之外修改過。您要重新載入專案嗎? + + + + The nested project has failed to reload. + 巢狀專案無法重新載入。 + + + + The item '{0}' cannot be found on disk, either because it has been renamed, deleted, or moved to a new location. + 在磁碟上找不到項目 '{0}',因為該項目已經重新命名、遭到刪除或移動至新位置。 + + + + A reference to {0} could not be added. Please make sure that the file is accessible, and that it is a valid assembly or COM component. + 無法加入 {0} 的參考。請確定這是個可存取的檔案,且是有效組件或 COM 元件。 + + + + An 'Import' of the file '{1}' was found in the project file '{0}'. This file is not registered as a safe file to import, and could contain targets and tasks that are harmful. If this imported file is indeed considered safe, then it can be registered by writing to the registry key {2}. + 在專案檔 '{0}' 中找到檔案 '{1}' 的 'Import'。這個檔案並未註冊為安全的匯入檔案,可能包含具有傷害性的目標和工作。如果這個匯入檔案確實是安全無虞的,則可以寫入登錄機碼 {2} 以進行註冊。 + + + + An 'Import' of the file '{1}' was found in the user project file '{0}'. All imports in user project files are considered unsafe. + 在使用者專案檔 '{0}' 中找到檔案 '{1}' 的 'Import'。系統會將使用者專案檔中的所有匯入視為不安全。 + + + + One or more items named '{1}' were found in the project file '{0}'. These items normally should not be specified in the project file. They can change the way targets and tasks are executed during project load, and this could have harmful effects. + 在專案檔 '{0}' 中找到一個或多個名為 '{1}' 的項目。這些項目通常不應在專案檔中指定。它們可以在專案載入期間變更目標和工作的執行方式,而這可能會造成有害的效果。 + + + + A property named '{1}' was found in the project file '{0}'. This property normally should not be specified in the project file. Its value can change the way targets and tasks are executed during project load, and this could have harmful effects. + 在專案檔 '{0}' 中找到名為 '{1}' 的屬性。這個屬性通常不應在專案檔中指定。它的值可以在專案載入期間變更目標和工作的執行方式,而這可能會造成有害的效果。 + + + + A 'UsingTask' tag which registers the '{1}' task was found in the project file '{0}'. 'UsingTask' tags in the project file take precedence over those in the imported .TARGETS files, and therefore could be used to execute arbitrary code during an otherwise unmodified build process. + 在專案檔 '{0}' 中找到註冊 '{1}' 工作的 'UsingTask' 標記。專案檔中的 'UsingTask' 標記會比匯入的 .TARGETS 檔案內容優先考慮,因此可以用來在其他未經修改的建置程序期間執行任意程式碼。 + + + + A 'Target' named '{1}' was found in the project file '{0}'. The tasks within this target could contain arbitrary code and may get executed as soon as the project is loaded in the IDE. + 在專案檔 '{0}' 中找到名為 '{1}' 的 'Target'。這個目標內的工作可能包含任意程式碼,並可能在專案載入於 IDE 時立刻執行。 + + + + An item referring to the file '{1}' was found in the project file '{0}'. Since this file is located within a system directory, root directory, or network share, it could be harmful to write to this file. + 在專案檔 '{0}' 中找到參考檔案 '{1}' 的項目。由於這個檔案是位在系統目錄、根目錄或網路共用中,所以寫入這個檔案可能會造成損害。 + + + + The project location is not trusted:{0}{0}{1}{0}{0}Running the application may result in security exceptions when it attempts to perform actions which require full trust.{0}{0}Click OK to ignore and continue. + 專案位置不受信任:{0}{0}{1}{0}{0}執行應用程式時若嘗試執行需要完全信任的動作,可能會產生安全性例外狀況。{0}{0}按一下 [確定]5D; 以忽略並繼續。 + + + + Exception was thrown during BuildBegin event\n{0} + BuildBegin 事件期間發生例外狀況\n{0} + + + + Copy always + 永遠複製 + CopyToOutputDirectory - drop down option + + + Copy to Output Directory + 複製到輸出目錄 + + + + Specifies the source file will be copied to the output directory + 指定是否要將原始程式檔複製到輸出目錄 + + + + Copy if newer + 有更新時才複製 + CopyToOutputDirectory - drop down option + + + Do not copy + 不要複製 + CopyToOutputDirectory - drop down option + + + Specific Version + 特定版本 + + + + Indicates whether this reference is to a specific version of an assembly. + 指出這個參考是否為某一組件的特定版本。 + + + + Microsoft Visual F# does not support zero-impact projects. To create an F# project from this project template, either go to the Visual Studio menu 'Tools, Options..., Projects and Solutions, General' and check the box marked 'Save new projects when created', or specify <PromptForSaveOnCreation>true</PromptForSaveOnCreation> in the <TemplateData> section of this project template's .vstemplate file, and then retry this operation. + Microsoft Visual F# 不支援零影響專案。若要從這個專案範本建立 F# 專案,您可以前往 Visual Studio 功能表 [工具]5D;、[選項...]5D;、[專案和方案]5D;、[一般]5D;,然後選取標記為 [建立時儲存新專案]5D;,或在這個專案範本的 .vstemplate 檔案的 <TemplateData> 區段中指定 <PromptForSaveOnCreation>true</PromptForSaveOnCreation>,然後重試這項作業。 + + + + "Cannot open F# project '{0}'. \nThis project uses wildcards in item specification: \n'{2}' for item type '{1}'\n\nWildcards in F# projects are not currently supported. + "無法開啟 F# 專案 '{0}'。\n此專案在項目規格中使用萬用字元: \n'{2}' (項目類型 '{1}')\n\nF# 專案中目前不支援萬用字元。 + + + + "Cannot add file {3} to F# project '{0}'. \nThis project uses wildcards in item specification: \n'{2}' for item type '{1}'\n\nWildcards in F# projects are not currently supported. + "無法新增檔案 {3} 至 F# 專案 '{0}'。\n此專案在項目規格中使用萬用字元: \n'{2}' (項目類型 '{1}')\n\nF# 專案中目前不支援萬用字元。 + + + + Cannot open project file for edit. + 無法開啟專案檔進行編輯。 + + + + Project file was checked out and is already upgraded. + 專案檔已簽出,而且已經升級。 + + + + A project with an Output Type of Class Library cannot be started directly.\n\nIn order to debug this project, add an executable project to this solution which references the library project. Set the executable project as the startup project. + 無法直接啟動輸出類型為類別庫的專案。\n\n為了偵錯此專案,請將可執行檔專案加入這個參考程式庫專案的方案,然後再將這個可執行檔專案設定為啟始專案。 + + + + The entered path is not a valid output path + 輸入的路徑不是有效的輸出路徑 + + + + The project {0} cannot be referenced. An assembly must have a 'dll' or 'exe' extension in order to be referenced. + 無法參考專案 {0}。組件必須有 'dll' 或 'exe' 的副檔名才能參考。 + + + + Cannot start a build, because another build is already in progress. + 無法啟動建置,因為另一個建置已經在進行中。 + + + + The working directory does not exist:\n'{0}'. + 工作目錄不存在:\n'{0}'。 + + + + A reference to library '{0}' cannot be added. This project targets a different framework ({2}) from the current project ({1}). + 無法加入程式庫 '{0}' 的參考。這個專案目標設定的 Framework ({2}) 與目前專案的目標設定 ({1}) 不同。 + + + + The project '{0}' is targeting '{1}'; however, the target framework is not installed on the machine. + 專案 '{0}' 目標設定為 '{1}'; 但是,電腦上未安裝目標 Framework。 + + + + F# + F# + + + + The referenced project '{0}' is targeting a higher framework version ({1}) than this project’s current target framework version ({2}). This may lead to build failures if types from assemblies outside this project’s target framework are used by any project in the dependency chain. + 參考的專案 '{0}' 目標設定的 Framework 版本 ({1}) 比這個專案的目前目標 Framework 版本 ({2}) 高。如果相依性鏈結中的任何專案使用這個專案的目標 Framework 以外的組件中的類型,可能導致組建失敗。 + + + + The project file does not require conversion. + 專案檔不需要轉換。 + + + + No Conversion Required + 不需要轉換 + + + + Error creating backup of project file: {0} + 建立專案檔備份時發生錯誤: {0} + + + + Project file successfully backed up as {0} + 專案檔已成功備份為 {0} + + + + Backup file name conflict. Renaming file to: {0} + 備份檔名衝突。將檔案重新命名為: {0} + + + + Backed up project may not build. Project contains linked file: {0} + 無法建置備份專案。專案包含連結的檔案: {0} + + + + Failed to backup file as {0} + 無法將檔案備份為 {0} + + + + File successfully backed up as {0} + 檔案已成功備份為 {0} + + + + Identity + 識別 + + + + Security identity of the referenced assembly. + 被參考之組件的安全性識別。 + + + + Path + 路徑 + + + + Location of file being referenced. + 所參考檔案的位置。 + + + + Version + 版本 + + + + Copy of {0} + {0} 的複本 + + + + Copy ({0}) of {1} + {1} 的複本 ({0}) + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.FSharp/AppConfigHelper.fs b/vsintegration/src/FSharp.ProjectSystem.FSharp/AppConfigHelper.fs index cc641682bd1..376eaa39fac 100644 --- a/vsintegration/src/FSharp.ProjectSystem.FSharp/AppConfigHelper.fs +++ b/vsintegration/src/FSharp.ProjectSystem.FSharp/AppConfigHelper.fs @@ -359,10 +359,10 @@ namespace Microsoft.VisualStudio.FSharp.ProjectSystem "3.78.41.0", "3.78.41.0", ["3.78.41.0"] "3.259.4.0", "3.259.41.0", ["3.259.3.1"; "3.259.4.0"] "3.259.41.0", "3.259.41.0", ["3.259.41.0"] - "4.3.0.0", "4.4.1.0", ["2.0.0.0"; "2.3.0.0"; "2.3.5.0"; "4.0.0.0"; "4.3.0.0"] - "4.3.1.0", "4.4.1.0", ["3.3.1.0"; "2.3.5.1"; "3.78.3.1"; "3.259.3.1"; "4.3.1.0"] - "4.4.0.0", "4.4.1.0", ["3.47.4.0"; "3.78.4.0"; "3.259.4.0"; "4.4.0.0"] - "4.4.1.0", "4.4.1.0", ["3.47.41.0"; "3.78.41.0"; "3.259.41.0"; "4.4.0.0"; "4.4.1.0"] + "4.3.0.0", "4.4.3.0", ["2.0.0.0"; "2.3.0.0"; "2.3.5.0"; "4.0.0.0"; "4.3.0.0"] + "4.3.1.0", "4.4.3.0", ["3.3.1.0"; "2.3.5.1"; "3.78.3.1"; "3.259.3.1"; "4.3.1.0"] + "4.4.0.0", "4.4.3.0", ["3.47.4.0"; "3.78.4.0"; "3.259.4.0"; "4.4.0.0"] + "4.4.1.0", "4.4.3.0", ["3.47.41.0"; "3.78.41.0"; "3.259.41.0"; "4.4.1.0"; "4.4.3.0"] ] |> Seq.where(fun (min, max, _) -> targetFSharpCoreVersion >= min && targetFSharpCoreVersion <= max) // some helpers to simplify work with XLinq @@ -392,7 +392,7 @@ namespace Microsoft.VisualStudio.FSharp.ProjectSystem el let createRedirect p (oldVersion, newVersion) = - create p (xnameAsmV1 BindingRedirect) [xname OldVersion, oldVersion; xname NewVersion, newVersion] |> ignore + if oldVersion < newVersion then create p (xnameAsmV1 BindingRedirect) [xname OldVersion, oldVersion; xname NewVersion, newVersion] |> ignore let getOrCreate(p : System.Xml.Linq.XElement) name = match p.Element(name) with diff --git a/vsintegration/src/FSharp.ProjectSystem.FSharp/FSharp.ProjectSystem.FSharp.dll.config b/vsintegration/src/FSharp.ProjectSystem.FSharp/FSharp.ProjectSystem.FSharp.dll.config deleted file mode 100644 index 64c1aeab9db..00000000000 --- a/vsintegration/src/FSharp.ProjectSystem.FSharp/FSharp.ProjectSystem.FSharp.dll.config +++ /dev/null @@ -1,19 +0,0 @@ - - - -
- - - - - - - - - - - - - - - \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.FSharp/MenusAndCommands.vsct b/vsintegration/src/FSharp.ProjectSystem.FSharp/MenusAndCommands.vsct index 1af15ec2f7c..4a95e4cfcfc 100644 --- a/vsintegration/src/FSharp.ProjectSystem.FSharp/MenusAndCommands.vsct +++ b/vsintegration/src/FSharp.ProjectSystem.FSharp/MenusAndCommands.vsct @@ -3,16 +3,50 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -35,7 +69,78 @@ - + + + + + + + + + + + + + + + + + + + + + FSI Console Context + FSI Console Context + + + + + + + + + + + + + + + + + + @@ -45,7 +150,7 @@ - + @@ -204,15 +309,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vsintegration/src/FSharp.ProjectSystem.FSharp/Project.fs b/vsintegration/src/FSharp.ProjectSystem.FSharp/Project.fs index 9e91f0c052c..d33ea17447b 100644 --- a/vsintegration/src/FSharp.ProjectSystem.FSharp/Project.fs +++ b/vsintegration/src/FSharp.ProjectSystem.FSharp/Project.fs @@ -45,7 +45,6 @@ namespace rec Microsoft.VisualStudio.FSharp.ProjectSystem [] [] [] - [] do () module internal VSHiveUtilities = @@ -84,10 +83,8 @@ namespace rec Microsoft.VisualStudio.FSharp.ProjectSystem let getConfigExtendedPropertyPages() = match lazyPropertyPages.Force() with (_,config,_) -> config let getPriorityExtendedPropertyPages() = match lazyPropertyPages.Force() with (_,_,priority) -> priority -////////////////////// - // An IProjectSite object with hot-swappable inner implementation - type internal DynamicProjectSite(origInnerImpl : Microsoft.VisualStudio.FSharp.LanguageService.IProjectSite) = + type internal DynamicProjectSite(origInnerImpl : Microsoft.VisualStudio.FSharp.Editor.IProjectSite) = let mutable inner = origInnerImpl @@ -95,7 +92,7 @@ namespace rec Microsoft.VisualStudio.FSharp.ProjectSystem inner <- newInner // This interface is thread-safe, assuming "inner" is thread-safe - interface Microsoft.VisualStudio.FSharp.LanguageService.IProjectSite with + interface Microsoft.VisualStudio.FSharp.Editor.IProjectSite with member __.Description = inner.Description member __.CompilationSourceFiles = inner.CompilationSourceFiles member __.CompilationOptions = inner.CompilationOptions @@ -128,7 +125,7 @@ namespace rec Microsoft.VisualStudio.FSharp.ProjectSystem // This member is thread-safe member x.GetProjectSite() = Debug.Assert(state <> ProjectSiteOptionLifetimeState.Opening, "ProjectSite is not available") - projectSite.Value :> Microsoft.VisualStudio.FSharp.LanguageService.IProjectSite + projectSite.Value :> Microsoft.VisualStudio.FSharp.Editor.IProjectSite // This member is thread-safe member x.TryGetProjectSite() = @@ -136,7 +133,7 @@ namespace rec Microsoft.VisualStudio.FSharp.ProjectSystem | ProjectSiteOptionLifetimeState.Opening, _ | ProjectSiteOptionLifetimeState.Closed, _ -> None | _, None -> None - | _, Some x -> Some(x :> Microsoft.VisualStudio.FSharp.LanguageService.IProjectSite) + | _, Some x -> Some(x :> Microsoft.VisualStudio.FSharp.Editor.IProjectSite) member x.Open(site) = Debug.Assert((state = ProjectSiteOptionLifetimeState.Opening), "Called Open, but not in Opening state") @@ -159,7 +156,7 @@ namespace rec Microsoft.VisualStudio.FSharp.ProjectSystem static member ExploreFolderInWindows = 1635u type internal Notifier() = - let notificationsDict = new System.Collections.Generic.Dictionary() + let notificationsDict = new System.Collections.Generic.Dictionary() member this.Notify() = for kvp in notificationsDict do kvp.Value.Invoke() @@ -185,40 +182,10 @@ namespace rec Microsoft.VisualStudio.FSharp.ProjectSystem exception internal ExitedOk exception internal ExitedWithError - //-------------------------------------------------------------------------------------- - // The big mutually recursive set of types. - // FSharpProjectPackage - // EditorFactory - // FSharpProjectFactory - // .... - - [, - "F# Tools", "F# Interactive", // category/sub-category on Tools>Options... - 6000s, 6001s, // resource id for localisation of the above - true)>] // true = supports automation - [] // <-- resource ID for localised name - [, - // The following should place the ToolWindow with the OutputWindow by default. - Orientation=ToolWindowOrientation.Bottom, - Style=VsDockStyle.Tabbed, - PositionX = 0, - PositionY = 0, - Width = 360, - Height = 120, - Window="34E76E81-EE4A-11D0-AE2E-00A0C90FFFC3")>] // where 34E76E81-EE4A-11D0-AE2E-00A0C90FFFC3 = outputToolWindow [] - type internal FSharpProjectPackage() as this = + type internal FSharpProjectPackage() = inherit ProjectPackage() - let mutable vfsiToolWindow = Unchecked.defaultof - let GetToolWindowAsITestVFSI() = - if vfsiToolWindow = Unchecked.defaultof<_> then - vfsiToolWindow <- this.FindToolWindow(typeof, 0, true) :?> Microsoft.VisualStudio.FSharp.Interactive.FsiToolWindow - vfsiToolWindow :> Microsoft.VisualStudio.FSharp.Interactive.ITestVFSI - - // FSI-LINKAGE-POINT: unsited init - do Microsoft.VisualStudio.FSharp.Interactive.Hooks.fsiConsoleWindowPackageCtorUnsited (this :> Package) - /// This method loads a localized string based on the specified resource. /// Resource to load @@ -233,13 +200,11 @@ namespace rec Microsoft.VisualStudio.FSharp.ProjectSystem resourceValue override this.Initialize() = - UIThread.CaptureSynchronizationContext() + Microsoft.VisualStudio.FSharp.LanguageService.UIThread.CaptureSynchronizationContext() + Microsoft.VisualStudio.FSharp.ProjectSystem.UIThread.CaptureSynchronizationContext() base.Initialize() - let fSharpEditorFactory = new Microsoft.VisualStudio.FSharp.ProjectSystem.FSharpEditorFactory(this); - this.RegisterEditorFactory(fSharpEditorFactory); - // read list of available FSharp.Core versions do let nullService = @@ -247,64 +212,63 @@ namespace rec Microsoft.VisualStudio.FSharp.ProjectSystem member this.ListAvailableFSharpCoreVersions(_) = Array.empty } let service = - match Internal.Utilities.FSharpEnvironment.BinFolderOfDefaultFSharpCompiler(None) with - | None -> nullService - | Some path -> - try - let supportedRuntimesXml = System.Xml.Linq.XDocument.Load(Path.Combine(path, "SupportedRuntimes.xml")) - let tryGetAttr (el : System.Xml.Linq.XElement) attr = - match el.Attribute(System.Xml.Linq.XName.Get attr) with - | null -> None - | x -> Some x.Value - let flatList = - supportedRuntimesXml.Root.Elements(System.Xml.Linq.XName.Get "TargetFramework") - |> Seq.choose (fun tf -> - match tryGetAttr tf "Identifier", tryGetAttr tf "Version", tryGetAttr tf "Profile" with - | Some key1, Some key2, _ - | Some key1, _, Some key2 -> - Some( - key1, // identifier - key2, // version or profile - [| - for asm in tf.Elements(System.Xml.Linq.XName.Get "Assembly") do - let version = asm.Attribute(System.Xml.Linq.XName.Get "Version") - let description = asm.Attribute(System.Xml.Linq.XName.Get "Description") - match version, description with - | null, _ | _, null -> () - | version, description -> - yield Microsoft.VisualStudio.FSharp.ProjectSystem.FSharpCoreVersion(version.Value, description.Value) - |] - ) - | _ -> None - ) - - |> Seq.toList - let (_, _, v2) = flatList |> List.find(fun (k1, k2, _) -> k1 = FSharpSDKHelper.NETFramework && k2 = FSharpSDKHelper.v20) - let (_, _, v4) = flatList |> List.find(fun (k1, k2, _) -> k1 = FSharpSDKHelper.NETFramework && k2 = FSharpSDKHelper.v40) - let (_, _, v45) = flatList |> List.find(fun (k1, k2, _) -> k1 = FSharpSDKHelper.NETFramework && k2 = FSharpSDKHelper.v45) - { - new Microsoft.VisualStudio.FSharp.ProjectSystem.IFSharpCoreVersionLookupService with - member this.ListAvailableFSharpCoreVersions(targetFramework) = - if targetFramework.Identifier = FSharpSDKHelper.NETFramework - then - // for .NETFramework we distinguish between 2.0, 4.0 and 4.5 - if targetFramework.Version.Major < 4 then v2 - elif targetFramework.Version.Major = 4 && targetFramework.Version.Minor < 5 then v4 - else v45 - else - // for other target frameworks we assume that they are distinguished by the profile - let result = - flatList - |> List.tryPick(fun (k1, k2, list) -> - if k1 = targetFramework.Identifier && k2 = targetFramework.Profile then Some list else None - ) - match result with - | Some list -> list - | None -> - Debug.Assert(false, sprintf "Unexpected target framework identifier '%O'" targetFramework) - [||] - } - with _ -> nullService + try + // SupportedRuntimes is deployed alongside the ProjectSystem dll + let path = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + let supportedRuntimesXml = System.Xml.Linq.XDocument.Load(Path.Combine(path, "SupportedRuntimes.xml")) + let tryGetAttr (el : System.Xml.Linq.XElement) attr = + match el.Attribute(System.Xml.Linq.XName.Get attr) with + | null -> None + | x -> Some x.Value + let flatList = + supportedRuntimesXml.Root.Elements(System.Xml.Linq.XName.Get "TargetFramework") + |> Seq.choose (fun tf -> + match tryGetAttr tf "Identifier", tryGetAttr tf "Version", tryGetAttr tf "Profile" with + | Some key1, Some key2, _ + | Some key1, _, Some key2 -> + Some( + key1, // identifier + key2, // version or profile + [| + for asm in tf.Elements(System.Xml.Linq.XName.Get "Assembly") do + let version = asm.Attribute(System.Xml.Linq.XName.Get "Version") + let description = asm.Attribute(System.Xml.Linq.XName.Get "Description") + match version, description with + | null, _ | _, null -> () + | version, description -> + yield Microsoft.VisualStudio.FSharp.ProjectSystem.FSharpCoreVersion(version.Value, description.Value) + |] + ) + | _ -> None + ) + + |> Seq.toList + let (_, _, v2) = flatList |> List.find(fun (k1, k2, _) -> k1 = FSharpSDKHelper.NETFramework && k2 = FSharpSDKHelper.v20) + let (_, _, v4) = flatList |> List.find(fun (k1, k2, _) -> k1 = FSharpSDKHelper.NETFramework && k2 = FSharpSDKHelper.v40) + let (_, _, v45) = flatList |> List.find(fun (k1, k2, _) -> k1 = FSharpSDKHelper.NETFramework && k2 = FSharpSDKHelper.v45) + { + new Microsoft.VisualStudio.FSharp.ProjectSystem.IFSharpCoreVersionLookupService with + member this.ListAvailableFSharpCoreVersions(targetFramework) = + if targetFramework.Identifier = FSharpSDKHelper.NETFramework + then + // for .NETFramework we distinguish between 2.0, 4.0 and 4.5 + if targetFramework.Version.Major < 4 then v2 + elif targetFramework.Version.Major = 4 && targetFramework.Version.Minor < 5 then v4 + else v45 + else + // for other target frameworks we assume that they are distinguished by the profile + let result = + flatList + |> List.tryPick(fun (k1, k2, list) -> + if k1 = targetFramework.Identifier && k2 = targetFramework.Profile then Some list else None + ) + match result with + | Some list -> list + | None -> + Debug.Assert(false, sprintf "Unexpected target framework identifier '%O'" targetFramework) + [||] + } + with _ -> nullService (this :> IServiceContainer).AddService(typeof, service, promote = true) @@ -316,13 +280,6 @@ namespace rec Microsoft.VisualStudio.FSharp.ProjectSystem //TODO the TypeProviderSecurityGlobals does not exists anymore, remove the initialization? this.GetService(typeof) |> ignore - // FSI-LINKAGE-POINT: sited init - let commandService = this.GetService(typeof) :?> OleMenuCommandService // FSI-LINKAGE-POINT - Microsoft.VisualStudio.FSharp.Interactive.Hooks.fsiConsoleWindowPackageInitalizeSited (this :> Package) commandService - // FSI-LINKAGE-POINT: private method GetDialogPage forces fsi options to be loaded - let _fsiPropertyPage = this.GetDialogPage(typeof) - () - /// This method is called during Devenv /Setup to get the bitmap to /// display on the splash screen for this package. /// This method may be deprecated - IdIcoLogoForAboutbox should now be called instead @@ -367,13 +324,6 @@ namespace rec Microsoft.VisualStudio.FSharp.ProjectSystem pIdIco <- 400u VSConstants.S_OK - interface Microsoft.VisualStudio.FSharp.Interactive.ITestVFSI with - member this.SendTextInteraction(s:string) = - GetToolWindowAsITestVFSI().SendTextInteraction(s) - member this.GetMostRecentLines(n:int) : string[] = - GetToolWindowAsITestVFSI().GetMostRecentLines(n) - - /// Factory for creating our editor, creates FSharp Projects [] type internal FSharpProjectFactory(package:FSharpProjectPackage ) = @@ -509,7 +459,7 @@ namespace rec Microsoft.VisualStudio.FSharp.ProjectSystem "3.259.3.1"; "3.259.4.0"] // portable 259 |> List.map (fun s -> System.Version(s)) let latestOnlyVersions = - ["4.4.1.0" // .NET 4 desktop + ["4.4.3.0" // .NET 4 desktop "3.47.41.0" // portable 47 "3.7.41.0" // portable 7 "3.78.41.0" // portable 78 @@ -545,7 +495,17 @@ namespace rec Microsoft.VisualStudio.FSharp.ProjectSystem this.ComputeSourcesAndFlags() override this.SendReferencesToFSI(references) = - Microsoft.VisualStudio.FSharp.Interactive.Hooks.AddReferencesToFSI this.Package references + let shell = this.Site.GetService(typeof) :?> IVsShell + let packageToBeLoadedGuid = ref (Guid(FSharpConstants.fsiPackageGuidString)) + let pkg = + match shell.LoadPackage packageToBeLoadedGuid with + | VSConstants.S_OK, pkg -> pkg :?> Package + | _ -> null + + if pkg = null then + nullArg "Can't find FSI Package." + + Microsoft.VisualStudio.FSharp.Interactive.Hooks.AddReferencesToFSI pkg references override x.SetSite(site:IOleServiceProvider) = base.SetSite(site) |> ignore @@ -1370,8 +1330,7 @@ namespace rec Microsoft.VisualStudio.FSharp.ProjectSystem // If property is not set - msbuild will resolve only primary dependencies, // and compiler will be very unhappy when during processing of referenced assembly it will discover that all fundamental types should be // taken from System.Runtime that is not supplied - - let _ = x.InvokeMsBuild("Compile", extraProperties = [KeyValuePair("_ResolveReferenceDependencies", "true")]) + let _ = x.InvokeMsBuild("Compile", extraProperties = [KeyValuePair("_ResolveReferenceDependencies", "true"); KeyValuePair("DesignTimeBuild", "true")]) sourcesAndFlagsNotifier.Notify() finally actuallyBuild <- true @@ -1446,7 +1405,7 @@ namespace rec Microsoft.VisualStudio.FSharp.ProjectSystem // Returns an IProjectSite that references "this" to get its information member private x.CreateRunningProjectSite() = let creationTime = System.DateTime.UtcNow - { new Microsoft.VisualStudio.FSharp.LanguageService.IProjectSite with + { new Microsoft.VisualStudio.FSharp.Editor.IProjectSite with member __.CompilationSourceFiles = x.CompilationSourceFiles member __.CompilationOptions = x.CompilationOptions @@ -1471,8 +1430,7 @@ namespace rec Microsoft.VisualStudio.FSharp.ProjectSystem member __.TargetFrameworkMoniker = x.GetTargetFrameworkMoniker() member __.ProjectGuid = x.GetProjectGuid() member __.LoadTime = creationTime - member __.ProjectProvider = Some (x :> IProvideProjectSite) - + member __.ProjectProvider = Some (x :> Microsoft.VisualStudio.FSharp.Editor.IProvideProjectSite) } // Snapshot-capture relevent values from "this", and returns an IProjectSite @@ -1490,7 +1448,7 @@ namespace rec Microsoft.VisualStudio.FSharp.ProjectSystem let creationTime = DateTime.UtcNow // This object is thread-safe - { new Microsoft.VisualStudio.FSharp.LanguageService.IProjectSite with + { new Microsoft.VisualStudio.FSharp.Editor.IProjectSite with member __.Description = description member __.CompilationSourceFiles = sourceFiles member __.CompilationOptions = options @@ -1507,11 +1465,11 @@ namespace rec Microsoft.VisualStudio.FSharp.ProjectSystem member __.TargetFrameworkMoniker = targetFrameworkMoniker member __.ProjectGuid = x.GetProjectGuid() member __.LoadTime = creationTime - member __.ProjectProvider = Some (x :> IProvideProjectSite) + member __.ProjectProvider = Some (x :> Microsoft.VisualStudio.FSharp.Editor.IProvideProjectSite) } // let the language service ask us questions - interface Microsoft.VisualStudio.FSharp.LanguageService.IProvideProjectSite with + interface Microsoft.VisualStudio.FSharp.Editor.IProvideProjectSite with member x.GetProjectSite() = match projectSite.State with | ProjectSiteOptionLifetimeState.Opening -> diff --git a/vsintegration/src/FSharp.ProjectSystem.FSharp/ProjectSystem.fsproj b/vsintegration/src/FSharp.ProjectSystem.FSharp/ProjectSystem.fsproj index fdecf065e6f..44cc567704d 100644 --- a/vsintegration/src/FSharp.ProjectSystem.FSharp/ProjectSystem.fsproj +++ b/vsintegration/src/FSharp.ProjectSystem.FSharp/ProjectSystem.fsproj @@ -1,82 +1,32 @@  - - - $(MSBuildProjectDirectory)\..\..\..\src - true - FSharp - - - + - $(VsSDKTools) - Debug - AnyCPU - 2.0 - {6196B0F8-CAEA-4CF1-AF82-1B520F77FE44} Library FSharp.ProjectSystem.FSharp - LIBRARY - $(NoWarn);52;75;62 - true - v4.6 - $(OtherFlags) --warnon:1182 --subsystemversion:6.00 - false - true + true false - false - true - true - true - - - - - - true - VSCTCompile;CopyCtoFile;CopyLocalizationResources;$(BuildDependsOn) + $(NoWarn);52;62;75 + true + true + $(SystemValueTuplePackageVersion) + $(OtherFlags) --warnon:1182 --subsystemversion:6.00 + true + false - - - - - - - - - Microsoft - StrongName - - - - - - - - - + - + + - - $(FSharpSourcesRoot)\..\loc\lcl\{Lang}\$(AssemblyName).dll.lcl - $(FSharpSourcesRoot)\..\loc\lci\$(AssemblyName).dll.lci - false - false - - - $(FSharpSourcesRoot)\..\loc\lcl\{Lang}\MenusAndCommands.vsct.lcl - $(FSharpSourcesRoot)\..\loc\lci\MenusAndCommands.vsct.lci - false - false - FSharp.ProjectSystem.FSharp.dll - 210 - - + + false + Menus.ctmenu + true Microsoft.VisualStudio.FSharp.ProjectSystem.FSharpSR @@ -88,171 +38,73 @@ + + + + + FSharp.Core + 2.0.0.0 + $(FSCoreVersion) + $(FSCoreVersion) + $PackageFolder$\FSharp.Core.dll + + + FSharp.ProjectSystem.FSharp + 15.0.0.0 + $(VSAssemblyVersion) + $(VSAssemblyVersion) + + + FSharp.ProjectSystem.PropertyPages + 15.0.0.0 + $(VSAssemblyVersion) + $(VSAssemblyVersion) + + + - - - - - - - - + + - - - - + + + + + + + + + + + - - $(FSharpSourcesRoot)\..\packages\VSSDK.DebuggerVisualizers.12.0.4\lib\net20\Microsoft.VisualStudio.DebuggerVisualizers.dll - True - - - $(FSharpSourcesRoot)\..\packages\EnvDTE.8.0.1\lib\net10\EnvDTE.dll - True - - - $(FSharpSourcesRoot)\..\packages\EnvDTE80.8.0.1\lib\net10\EnvDTE80.dll - True - - - $(FSharpSourcesRoot)\..\packages\VSSDK.VSLangProj.7.0.4\lib\net20\VSLangProj.dll - True - - - $(FSharpSourcesRoot)\..\packages\VSSDK.VSLangProj.8.8.0.4\lib\net20\VSLangProj80.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.OLE.Interop.7.10.6070\lib\Microsoft.VisualStudio.OLE.Interop.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Immutable.10.0.10.0.30319\lib\net40\Microsoft.VisualStudio.Shell.Immutable.10.0.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Immutable.11.0.11.0.50727\lib\net45\Microsoft.VisualStudio.Shell.Immutable.11.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.7.10.6071\lib\Microsoft.VisualStudio.Shell.Interop.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.8.0.8.0.50727\lib\Microsoft.VisualStudio.Shell.Interop.8.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.9.0.9.0.30729\lib\Microsoft.VisualStudio.Shell.Interop.9.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.10.0.10.0.30319\lib\Microsoft.VisualStudio.Shell.Interop.10.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.11.0.11.0.61030\lib\Microsoft.VisualStudio.Shell.Interop.11.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.ProjectAggregator.8.0.50727\lib\net45\Microsoft.VisualStudio.ProjectAggregator.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Text.Data.15.0.26201\lib\net45\Microsoft.VisualStudio.Text.Data.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.TextManager.Interop.7.10.6070\lib\Microsoft.VisualStudio.TextManager.Interop.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.TextManager.Interop.8.0.8.0.50727\lib\Microsoft.VisualStudio.TextManager.Interop.8.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Designer.Interfaces.1.1.4322\lib\microsoft.visualstudio.designer.interfaces.dll - - - $(FSharpSourcesRoot)\..\packages\VSSDK.VSHelp.7.0.4\lib\net20\Microsoft.VisualStudio.VSHelp.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Threading.$(MicrosoftVisualStudioThreadingVersion)\lib\net45\Microsoft.VisualStudio.Threading.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualFSharp.Msbuild.15.0.1.0.1\lib\net45\Microsoft.Build.Framework.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualFSharp.Msbuild.15.0.1.0.1\lib\net45\Microsoft.Build.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualFSharp.Msbuild.15.0.1.0.1\lib\net45\Microsoft.Build.Utilities.Core.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualFSharp.Msbuild.15.0.1.0.1\lib\net45\Microsoft.Build.Tasks.Core.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Framework.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Shell.Design.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Immutable.15.0.15.0.25123-Dev15Preview\lib\net45\Microsoft.VisualStudio.Shell.Immutable.15.0.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Utilities.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Utilities.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Design.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Shell.Design.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.$(RoslynVSBinariesVersion).$(RoslynVSPackagesVersion)\lib\Microsoft.VisualStudio.Shell.$(RoslynVSBinariesVersion).dll - - - $(FSharpSourcesRoot)\..\packages\System.Collections.Immutable.$(SystemCollectionsImmutableVersion)\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll - - - {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3} - FSharp.Compiler.Private - True - - - FSharp.LanguageService - {ee85aab7-cda0-4c4e-bda0-a64ccc413e3f} - True - - - FSHarp.VS.FSI - {991dcf75-c2eb-42b6-9a0d-aa1d2409d519} - True - - - ProjectSystem.Base - {b700e38b-f8c0-4e49-b5ec-db7b7ac0c4e7} - True - - - FSharp.PropertiesPages - {fcfb214c-462e-42b3-91ca-fc557efee74f} - True - - - FSharp.LanguageService.Base - {1c5c163c-37ea-4a3c-8ccc-0d34b74bf8ef} - True - - - FSharp.Editor - {65e0e82a-eace-4787-8994-888674c2fe87} - True - - - {DED3BBD7-53F4-428A-8C9F-27968E768605} - FSharp.Core - + + + + + + + + + + + + + - - - \ No newline at end of file + + + + + + + + + + + + + diff --git a/vsintegration/src/FSharp.VS.FSI/Resources/CancelEvaluation.bmp b/vsintegration/src/FSharp.ProjectSystem.FSharp/Resources/CancelEvaluation.bmp similarity index 100% rename from vsintegration/src/FSharp.VS.FSI/Resources/CancelEvaluation.bmp rename to vsintegration/src/FSharp.ProjectSystem.FSharp/Resources/CancelEvaluation.bmp diff --git a/vsintegration/src/FSharp.VS.FSI/Resources/Images_32bit.bmp b/vsintegration/src/FSharp.ProjectSystem.FSharp/Resources/Images_32bit.bmp similarity index 100% rename from vsintegration/src/FSharp.VS.FSI/Resources/Images_32bit.bmp rename to vsintegration/src/FSharp.ProjectSystem.FSharp/Resources/Images_32bit.bmp diff --git a/vsintegration/src/FSharp.VS.FSI/Resources/ResetSession.bmp b/vsintegration/src/FSharp.ProjectSystem.FSharp/Resources/ResetSession.bmp similarity index 100% rename from vsintegration/src/FSharp.VS.FSI/Resources/ResetSession.bmp rename to vsintegration/src/FSharp.ProjectSystem.FSharp/Resources/ResetSession.bmp diff --git a/vsintegration/src/FSharp.VS.FSI/Resources/TabIcon.png b/vsintegration/src/FSharp.ProjectSystem.FSharp/Resources/TabIcon.png similarity index 100% rename from vsintegration/src/FSharp.VS.FSI/Resources/TabIcon.png rename to vsintegration/src/FSharp.ProjectSystem.FSharp/Resources/TabIcon.png diff --git a/vsintegration/src/FSharp.ProjectSystem.FSharp/VSPackage.resx b/vsintegration/src/FSharp.ProjectSystem.FSharp/VSPackage.resx index 70b9cdf465b..b6fbe1fdc26 100644 --- a/vsintegration/src/FSharp.ProjectSystem.FSharp/VSPackage.resx +++ b/vsintegration/src/FSharp.ProjectSystem.FSharp/VSPackage.resx @@ -1,5 +1,4 @@  - - - $(MSBuildProjectDirectory)\..\..\..\src - VisualBasic - 15.4.1.0 - vb - + Debug net40 @@ -29,28 +24,23 @@ false 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036 40026;42105;42107;42353 - - true v4.6 - true + true false false true true true + true + true + false - - - $(FSharpSourcesRoot)\..\loc\lcl\{Lang}\$(AssemblyName).dll.lcl - $(FSharpSourcesRoot)\..\loc\lci\$(AssemblyName).dll.lci - false - false - - - - + + + + @@ -71,106 +61,23 @@ - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.WCFReference.Interop.9.0.30729\lib\Microsoft.VisualStudio.WCFReference.Interop.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.ManagedInterfaces.8.0.50727\lib\Microsoft.VisualStudio.ManagedInterfaces.dll - True - - - $(FSharpSourcesRoot)\..\packages\VSSDK.VSLangProj.7.0.4\lib\net20\VSLangProj.dll - True - - - $(FSharpSourcesRoot)\..\packages\VSSDK.VSLangProj.8.8.0.4\lib\net20\VSLangProj80.dll - True - - - $(FSharpSourcesRoot)\..\packages\VSSDK.VSLangProj.9.9.0.4\lib\net20\VSLangProj90.dll - True - - - $(FSharpSourcesRoot)\..\packages\VSSDK.VSLangProj.10.10.0.4\lib\net20\VSLangProj100.dll - True - - - $(FSharpSourcesRoot)\..\packages\VSSDK.VSLangProj.11.11.0.4\lib\net20\VSLangProj110.dll - True - - - $(FSharpSourcesRoot)\..\packages\EnvDTE.8.0.1\lib\net10\EnvDTE.dll - True - - - $(FSharpSourcesRoot)\..\packages\EnvDTE80.8.0.1\lib\net10\EnvDTE80.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.OLE.Interop.7.10.6070\lib\Microsoft.VisualStudio.OLE.Interop.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Immutable.10.0.10.0.30319\lib\net40\Microsoft.VisualStudio.Shell.Immutable.10.0.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Immutable.11.0.11.0.50727\lib\net45\Microsoft.VisualStudio.Shell.Immutable.11.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.ProjectAggregator.8.0.50727\lib\net45\Microsoft.VisualStudio.ProjectAggregator.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Design.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Shell.Design.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.$(RoslynVSBinariesVersion).$(RoslynVSPackagesVersion)\lib\Microsoft.VisualStudio.Shell.$(RoslynVSBinariesVersion).dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Framework.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Shell.Framework.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Threading.$(MicrosoftVisualStudioThreadingVersion)\lib\net45\Microsoft.VisualStudio.Threading.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Utilities.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Utilities.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.7.10.6071\lib\Microsoft.VisualStudio.Shell.Interop.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.8.0.8.0.50727\lib\Microsoft.VisualStudio.Shell.Interop.8.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.9.0.9.0.30729\lib\Microsoft.VisualStudio.Shell.Interop.9.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.10.0.10.0.30319\lib\Microsoft.VisualStudio.Shell.Interop.10.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.11.0.11.0.61030\lib\Microsoft.VisualStudio.Shell.Interop.11.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.TextManager.Interop.7.10.6070\lib\Microsoft.VisualStudio.TextManager.Interop.dll - True - - - $(FSharpSourcesRoot)\..\packages\VSSDK.VSHelp.7.0.4\lib\net20\Microsoft.VisualStudio.VSHelp.dll - True - - - ProjectSystem.Base - {b700e38b-f8c0-4e49-b5ec-db7b7ac0c4e7} - True - + + + + + + + + + + + + + + + + + @@ -367,23 +274,11 @@ - - + $(SuiteBinPath)\FSharp - - - - - - - - - - Microsoft - StrongName - - - - \ No newline at end of file + + + + diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/My Project/AssemblyInfo.vb b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/My Project/AssemblyInfo.vb index 7987ce77289..301c34e96aa 100644 --- a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/My Project/AssemblyInfo.vb +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/My Project/AssemblyInfo.vb @@ -10,13 +10,6 @@ Imports System.Runtime.InteropServices ' Review the values of the assembly attributes - - - - - - - 'The following GUID is for the ID of the typelib if this project is exposed to COM diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/ApplicationPropPage.resx b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/ApplicationPropPage.resx index bfd51e76d94..9e1be19307d 100644 --- a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/ApplicationPropPage.resx +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/ApplicationPropPage.resx @@ -661,6 +661,6 @@ ApplicationPropPage - Microsoft.VisualStudio.Editors.PropertyPages.ApplicationPropPageBase, FSharp.ProjectSystem.PropertyPages, Version=15.4.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + Microsoft.VisualStudio.Editors.PropertyPages.ApplicationPropPageBase, FSharp.ProjectSystem.PropertyPages, Version=15.7.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/ApplicationPropPage.vb b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/ApplicationPropPage.vb index b76c242469b..692619c912b 100644 --- a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/ApplicationPropPage.vb +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/ApplicationPropPage.vb @@ -49,8 +49,6 @@ Namespace Microsoft.VisualStudio.Editors.PropertyPages Protected Const INDEX_WINDOWSCLASSLIB As Integer = 2 Protected Const INDEX_LAST As Integer = INDEX_WINDOWSCLASSLIB Public Const Const_TargetFrameworkMoniker As String = "TargetFrameworkMoniker" - Private m_v20FSharpRedistInstalled As Boolean = False - Private m_v40FSharpRedistInstalled As Boolean = False Friend WithEvents TargetFramework As System.Windows.Forms.ComboBox Friend WithEvents TargetFrameworkLabel As System.Windows.Forms.Label @@ -75,18 +73,6 @@ Namespace Microsoft.VisualStudio.Editors.PropertyPages m_OutputTypeStringKeys(INDEX_COMMANDLINEAPP) = SR.GetString(SR.PPG_CommandLineApp) m_OutputTypeStringKeys(INDEX_WINDOWSCLASSLIB) = SR.GetString(SR.PPG_WindowsClassLib) -#If VS_VERSION_DEV14 Then - Dim v20FSharpRedistKey As String = "HKEY_LOCAL_MACHINE\Software\Microsoft\FSharp\4.0\Runtime\v2.0" - Dim v40FSharpRedistKey As String = "HKEY_LOCAL_MACHINE\Software\Microsoft\FSharp\4.0\Runtime\v4.0" -#End If -#If VS_VERSION_DEV15 Then - Dim v20FSharpRedistKey As String = "HKEY_LOCAL_MACHINE\Software\Microsoft\FSharp\4.1\Runtime\v2.0" - Dim v40FSharpRedistKey As String = "HKEY_LOCAL_MACHINE\Software\Microsoft\FSharp\4.1\Runtime\v4.0" -#End If - - m_v20FSharpRedistInstalled = Not (IsNothing(Microsoft.Win32.Registry.GetValue(v20FSharpRedistKey, Nothing, Nothing))) - m_v40FSharpRedistInstalled = Not (IsNothing(Microsoft.Win32.Registry.GetValue(v40FSharpRedistKey, Nothing, Nothing))) - 'Add any initialization after the InitializeComponent() call AddChangeHandlers() @@ -593,18 +579,9 @@ Namespace Microsoft.VisualStudio.Editors.PropertyPages If moniker.StartsWith(".NETCoreApp") OrElse moniker.StartsWith(".NETStandard") Then Return True End If - If moniker.Contains("v2") Then - Return Me.m_v20FSharpRedistInstalled - End If - If moniker.Contains("v3.0") Then - Return Me.m_v20FSharpRedistInstalled - End If - If moniker.Contains("v3.5") Then - Return Me.m_v20FSharpRedistInstalled - End If - '' Is this cheating? - If moniker.Contains("v4") Then - Return Me.m_v40FSharpRedistInstalled + ' With the latest tooling, if we have editors the redist is installed by definition + If moniker.Contains("v2") Or moniker.Contains("v3.0") Or moniker.Contains("v3.5") Or moniker.Contains("v4") Then + Return True End If Return False End Function diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/BuildPropPage.resx b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/BuildPropPage.resx index 0c2a860a549..32bc19edbec 100644 --- a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/BuildPropPage.resx +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/BuildPropPage.resx @@ -1351,6 +1351,6 @@ BuildPropPage - Microsoft.VisualStudio.Editors.PropertyPages.PropPageUserControlBase, FSharp.ProjectSystem.PropertyPages, Version=15.4.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + Microsoft.VisualStudio.Editors.PropertyPages.PropPageUserControlBase, FSharp.ProjectSystem.PropertyPages, Version=15.7.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/DebugPropPage.resx b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/DebugPropPage.resx index 14b23d5e901..9e6fc8ccfb5 100644 --- a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/DebugPropPage.resx +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/DebugPropPage.resx @@ -523,7 +523,7 @@ StartArguments - Microsoft.VisualStudio.Editors.PropertyPages.DebugPropPage+MultilineTextBoxRejectsEnter, FSharp.ProjectSystem.PropertyPages, Version=15.4.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + Microsoft.VisualStudio.Editors.PropertyPages.DebugPropPage+MultilineTextBoxRejectsEnter, FSharp.ProjectSystem.PropertyPages, Version=15.7.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a overarchingTableLayoutPanel @@ -982,6 +982,6 @@ DebugPropPage - Microsoft.VisualStudio.Editors.PropertyPages.PropPageUserControlBase, FSharp.ProjectSystem.PropertyPages, Version=15.4.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + Microsoft.VisualStudio.Editors.PropertyPages.PropPageUserControlBase, FSharp.ProjectSystem.PropertyPages, Version=15.7.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPage.cs.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPage.cs.xlf new file mode 100644 index 00000000000..ec8edc0c8d7 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPage.cs.xlf @@ -0,0 +1,52 @@ + + + + + + Assembly &name: + Název s&estavení: + + + + ... + ... + + + + Specify how application resources will be managed: + Zadejte prosím, jak se budou spravovat prostředky aplikace: + + + + &Resource File: + Soubor p&rostředků: + + + + U&se standard resource names + &Použít názvy standardních prostředků + + + + Resources + Prostředky + + + + O&utput type: + Typ &výstupu: + + + + Tar&get Framework: + &Cílová verze rozhraní .NET Framework: + + + + Target F# runtime: + Cílová verze F# runtime: + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPage.de.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPage.de.xlf new file mode 100644 index 00000000000..476df538616 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPage.de.xlf @@ -0,0 +1,52 @@ + + + + + + Assembly &name: + Assembly&name: + + + + ... + ... + + + + Specify how application resources will be managed: + Verwaltung von Anwendungsressourcen: + + + + &Resource File: + &Ressourcendatei: + + + + U&se standard resource names + Standardre&ssourcennamen verwenden + + + + Resources + Ressourcen + + + + O&utput type: + A&usgabetyp: + + + + Tar&get Framework: + Zie&lframework: + + + + Target F# runtime: + F#-Ziellaufzeit: + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPage.en.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPage.en.xlf new file mode 100644 index 00000000000..1bdd57c3a46 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPage.en.xlf @@ -0,0 +1,52 @@ + + + + + + Assembly &name: + Assembly &name: + + + + ... + ... + + + + Specify how application resources will be managed: + Specify how application resources will be managed: + + + + &Resource File: + &Resource File: + + + + U&se standard resource names + U&se standard resource names + + + + Resources + Resources + + + + O&utput type: + O&utput type: + + + + Tar&get Framework: + Tar&get Framework: + + + + Target F# runtime: + Target F# runtime: + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPage.es.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPage.es.xlf new file mode 100644 index 00000000000..67b3ae1eb31 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPage.es.xlf @@ -0,0 +1,52 @@ + + + + + + Assembly &name: + &Nombre del ensamblado: + + + + ... + ... + + + + Specify how application resources will be managed: + Especifique cómo se administrarán los recursos de la aplicación: + + + + &Resource File: + &Archivo de recursos: + + + + U&se standard resource names + U&sar nombres de recurso estándar + + + + Resources + Recursos + + + + O&utput type: + &Tipo de salida: + + + + Tar&get Framework: + &Versión de .NET Framework de destino: + + + + Target F# runtime: + F# Runtime de destino: + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPage.fr.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPage.fr.xlf new file mode 100644 index 00000000000..aef6cabab2f --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPage.fr.xlf @@ -0,0 +1,52 @@ + + + + + + Assembly &name: + &Nom de l'assembly : + + + + ... + ... + + + + Specify how application resources will be managed: + Spécifiez comment les ressources de l'application sont gérées : + + + + &Resource File: + &Fichier de ressources : + + + + U&se standard resource names + &Utiliser des noms de ressources standard + + + + Resources + Ressources + + + + O&utput type: + T&ype de sortie : + + + + Tar&get Framework: + Framework ci&ble : + + + + Target F# runtime: + Runtime F# cible : + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPage.it.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPage.it.xlf new file mode 100644 index 00000000000..8e8b37c8f64 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPage.it.xlf @@ -0,0 +1,52 @@ + + + + + + Assembly &name: + &Nome dell'assembly: + + + + ... + ... + + + + Specify how application resources will be managed: + Specificare in che modo verranno gestite le risorse dell'applicazione: + + + + &Resource File: + File di &risorse: + + + + U&se standard resource names + U&sa nomi di risorsa standard + + + + Resources + Risorse + + + + O&utput type: + Tipo di o&utput: + + + + Tar&get Framework: + Frame&work di destinazione: + + + + Target F# runtime: + F# runtime di destinazione: + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPage.ja.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPage.ja.xlf new file mode 100644 index 00000000000..4e403065188 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPage.ja.xlf @@ -0,0 +1,52 @@ + + + + + + Assembly &name: + アセンブリ名(&N): + + + + ... + ... + + + + Specify how application resources will be managed: + アプリケーション リソースの管理方法の指定: + + + + &Resource File: + リソース ファイル(&R): + + + + U&se standard resource names + 標準のリソース名の使用(&S) + + + + Resources + リソース + + + + O&utput type: + 出力の種類(&U): + + + + Tar&get Framework: + 対象のフレームワーク(&G): + + + + Target F# runtime: + ターゲット F# ランタイム: + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPage.ko.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPage.ko.xlf new file mode 100644 index 00000000000..e1ef23f8dc1 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPage.ko.xlf @@ -0,0 +1,52 @@ + + + + + + Assembly &name: + 어셈블리 이름(&N): + + + + ... + ... + + + + Specify how application resources will be managed: + 응용 프로그램 리소스 관리 방법을 지정하세요. + + + + &Resource File: + 리소스 파일(&R): + + + + U&se standard resource names + 표준 리소스 이름 사용(&S) + + + + Resources + 리소스 + + + + O&utput type: + 출력 형식(&U): + + + + Tar&get Framework: + 대상 프레임워크(&G): + + + + Target F# runtime: + 대상 F# 런타임: + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPage.pl.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPage.pl.xlf new file mode 100644 index 00000000000..4648179e594 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPage.pl.xlf @@ -0,0 +1,52 @@ + + + + + + Assembly &name: + &Nazwa zestawu: + + + + ... + ... + + + + Specify how application resources will be managed: + Określa, jak będą zarządzane zasoby aplikacji: + + + + &Resource File: + &Plik zasobów: + + + + U&se standard resource names + Użyj &standardowych nazw zasobów + + + + Resources + Zasoby + + + + O&utput type: + Typ wy&jściowy: + + + + Tar&get Framework: + &Docelowa struktura: + + + + Target F# runtime: + Docelowa struktura języka F#: + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPage.pt-BR.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPage.pt-BR.xlf new file mode 100644 index 00000000000..aaa6ab47b3c --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPage.pt-BR.xlf @@ -0,0 +1,52 @@ + + + + + + Assembly &name: + &Nome do Assembly: + + + + ... + ... + + + + Specify how application resources will be managed: + Especifique como os recursos do aplicativo serão gerenciados: + + + + &Resource File: + Arquivo Fo&nte: + + + + U&se standard resource names + U&sar os nomes de recurso padrão + + + + Resources + Recursos + + + + O&utput type: + Tipo de &saída: + + + + Tar&get Framework: + Estrutura de &Destino: + + + + Target F# runtime: + Runtime F# alvo: + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPage.ru.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPage.ru.xlf new file mode 100644 index 00000000000..6d0281b6692 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPage.ru.xlf @@ -0,0 +1,52 @@ + + + + + + Assembly &name: + &Имя сборки: + + + + ... + ... + + + + Specify how application resources will be managed: + Укажите, каким образом будут управляться ресурсы приложения: + + + + &Resource File: + &Файл ресурсов: + + + + U&se standard resource names + И&спользовать стандартные имена ресурсов + + + + Resources + Ресурсы + + + + O&utput type: + &Тип выходных данных: + + + + Tar&get Framework: + &Целевая рабочая среда + + + + Target F# runtime: + Целевая среда выполнения F#: + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPage.tr.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPage.tr.xlf new file mode 100644 index 00000000000..92519e88aea --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPage.tr.xlf @@ -0,0 +1,52 @@ + + + + + + Assembly &name: + Bütünleştirilmiş kod &adı: + + + + ... + ... + + + + Specify how application resources will be managed: + Uygulama kaynaklarının nasıl yönetileceğini belirtin: + + + + &Resource File: + &Kaynak Dosya: + + + + U&se standard resource names + Standart kaynak adlarını ku&llan + + + + Resources + Kaynaklar + + + + O&utput type: + &Çıkış türü: + + + + Tar&get Framework: + Hedef &Framework: + + + + Target F# runtime: + Hedef F# çalışma zamanı: + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPage.zh-Hans.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPage.zh-Hans.xlf new file mode 100644 index 00000000000..6ac472f9381 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPage.zh-Hans.xlf @@ -0,0 +1,52 @@ + + + + + + Assembly &name: + 程序集名称(&N): + + + + ... + ... + + + + Specify how application resources will be managed: + 指定应用程序资源的管理方式: + + + + &Resource File: + 资源文件(&R): + + + + U&se standard resource names + 使用标准资源名称(&S) + + + + Resources + 资源 + + + + O&utput type: + 输出类型(&U): + + + + Tar&get Framework: + 目标框架(&G): + + + + Target F# runtime: + 目标 F# 运行时: + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPage.zh-Hant.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPage.zh-Hant.xlf new file mode 100644 index 00000000000..990599ec5d9 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPage.zh-Hant.xlf @@ -0,0 +1,52 @@ + + + + + + Assembly &name: + 組件名稱(&N): + + + + ... + ... + + + + Specify how application resources will be managed: + 指定要如何管理應用程式資源: + + + + &Resource File: + 資源檔(&R): + + + + U&se standard resource names + 使用標準資源名稱(&S) + + + + Resources + 資源 + + + + O&utput type: + 輸出類型(&U): + + + + Tar&get Framework: + 目標 Framework(&G): + + + + Target F# runtime: + 目標 F# 執行階段: + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPageBase.cs.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPageBase.cs.xlf new file mode 100644 index 00000000000..53294257506 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPageBase.cs.xlf @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPageBase.de.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPageBase.de.xlf new file mode 100644 index 00000000000..ca4d8e272bf --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPageBase.de.xlf @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPageBase.en.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPageBase.en.xlf new file mode 100644 index 00000000000..29119615113 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPageBase.en.xlf @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPageBase.es.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPageBase.es.xlf new file mode 100644 index 00000000000..b3cf3490790 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPageBase.es.xlf @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPageBase.fr.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPageBase.fr.xlf new file mode 100644 index 00000000000..ed0a1388eba --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPageBase.fr.xlf @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPageBase.it.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPageBase.it.xlf new file mode 100644 index 00000000000..92d6f62d3a2 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPageBase.it.xlf @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPageBase.ja.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPageBase.ja.xlf new file mode 100644 index 00000000000..6b5128ea9d6 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPageBase.ja.xlf @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPageBase.ko.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPageBase.ko.xlf new file mode 100644 index 00000000000..a1062c505c9 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPageBase.ko.xlf @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPageBase.pl.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPageBase.pl.xlf new file mode 100644 index 00000000000..2b99a1b357b --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPageBase.pl.xlf @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPageBase.pt-BR.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPageBase.pt-BR.xlf new file mode 100644 index 00000000000..ff9c7d04c1f --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPageBase.pt-BR.xlf @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPageBase.ru.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPageBase.ru.xlf new file mode 100644 index 00000000000..d957cf5e4f2 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPageBase.ru.xlf @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPageBase.tr.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPageBase.tr.xlf new file mode 100644 index 00000000000..11d6baf65e3 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPageBase.tr.xlf @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPageBase.zh-Hans.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPageBase.zh-Hans.xlf new file mode 100644 index 00000000000..bbfb0390751 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPageBase.zh-Hans.xlf @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPageBase.zh-Hant.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPageBase.zh-Hant.xlf new file mode 100644 index 00000000000..c03d812f9a9 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ApplicationPropPageBase.zh-Hant.xlf @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventCommandLineDialog.cs.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventCommandLineDialog.cs.xlf new file mode 100644 index 00000000000..d322a95b1b4 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventCommandLineDialog.cs.xlf @@ -0,0 +1,52 @@ + + + + + + I&nsert + V&ložit + + + + OK + OK + + + + Cancel + Zrušit + + + + Build Command Line + Příkazový řádek sestavení + + + + &Macros >> + &Makra >> + + + + << &Macros + << &Makra + + + + Macro List + Seznam maker + + + + Macro + Makro + + + + Value + Hodnota + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventCommandLineDialog.de.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventCommandLineDialog.de.xlf new file mode 100644 index 00000000000..fec602bdf50 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventCommandLineDialog.de.xlf @@ -0,0 +1,52 @@ + + + + + + I&nsert + Ei&nfügen + + + + OK + OK + + + + Cancel + Abbrechen + + + + Build Command Line + Buildbefehlszeile + + + + &Macros >> + &Makros >> + + + + << &Macros + << &Makros + + + + Macro List + Makroliste + + + + Macro + Makro + + + + Value + Wert + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventCommandLineDialog.en.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventCommandLineDialog.en.xlf new file mode 100644 index 00000000000..fd5c67b581b --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventCommandLineDialog.en.xlf @@ -0,0 +1,52 @@ + + + + + + I&nsert + I&nsert + + + + OK + OK + + + + Cancel + Cancel + + + + Build Command Line + Build Command Line + + + + &Macros >> + &Macros >> + + + + << &Macros + << &Macros + + + + Macro List + Macro List + + + + Macro + Macro + + + + Value + Value + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventCommandLineDialog.es.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventCommandLineDialog.es.xlf new file mode 100644 index 00000000000..4e3fbdd1b03 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventCommandLineDialog.es.xlf @@ -0,0 +1,52 @@ + + + + + + I&nsert + I&nsertar + + + + OK + Aceptar + + + + Cancel + Cancelar + + + + Build Command Line + Línea de comandos de compilación + + + + &Macros >> + &Macros >> + + + + << &Macros + << &Macros + + + + Macro List + Lista de macros + + + + Macro + Macro + + + + Value + Valor + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventCommandLineDialog.fr.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventCommandLineDialog.fr.xlf new file mode 100644 index 00000000000..43a94c2473a --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventCommandLineDialog.fr.xlf @@ -0,0 +1,52 @@ + + + + + + I&nsert + I&nsérer + + + + OK + OK + + + + Cancel + Annuler + + + + Build Command Line + Ligne de commande Build + + + + &Macros >> + &Macros >> + + + + << &Macros + << &Macros + + + + Macro List + Liste de macros + + + + Macro + Macro + + + + Value + Valeur + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventCommandLineDialog.it.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventCommandLineDialog.it.xlf new file mode 100644 index 00000000000..c6603dae24d --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventCommandLineDialog.it.xlf @@ -0,0 +1,52 @@ + + + + + + I&nsert + I&nserisci + + + + OK + OK + + + + Cancel + Annulla + + + + Build Command Line + Riga di comando di compilazione + + + + &Macros >> + &Macro >> + + + + << &Macros + << &Macro + + + + Macro List + Elenco macro + + + + Macro + Macro + + + + Value + Valore + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventCommandLineDialog.ja.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventCommandLineDialog.ja.xlf new file mode 100644 index 00000000000..cd6455ea64c --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventCommandLineDialog.ja.xlf @@ -0,0 +1,52 @@ + + + + + + I&nsert + 挿入(&N) + + + + OK + OK + + + + Cancel + キャンセル + + + + Build Command Line + ビルド コマンド ライン + + + + &Macros >> + マクロ(&M) >> + + + + << &Macros + << マクロ(&M) + + + + Macro List + マクロ一覧 + + + + Macro + マクロ + + + + Value + + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventCommandLineDialog.ko.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventCommandLineDialog.ko.xlf new file mode 100644 index 00000000000..2f92bb4c707 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventCommandLineDialog.ko.xlf @@ -0,0 +1,52 @@ + + + + + + I&nsert + 삽입(&N) + + + + OK + 확인 + + + + Cancel + 취소 + + + + Build Command Line + 빌드 명령줄 + + + + &Macros >> + 매크로(&M) >> + + + + << &Macros + << 매크로(&M) + + + + Macro List + 매크로 목록 + + + + Macro + 매크로 + + + + Value + + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventCommandLineDialog.pl.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventCommandLineDialog.pl.xlf new file mode 100644 index 00000000000..de9e2972dfb --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventCommandLineDialog.pl.xlf @@ -0,0 +1,52 @@ + + + + + + I&nsert + W&staw + + + + OK + OK + + + + Cancel + Anuluj + + + + Build Command Line + Wiersz polecenia kompilowania + + + + &Macros >> + &Makra >> + + + + << &Macros + << &Makra + + + + Macro List + Lista makr + + + + Macro + Makro + + + + Value + Wartość + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventCommandLineDialog.pt-BR.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventCommandLineDialog.pt-BR.xlf new file mode 100644 index 00000000000..4478e6ad561 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventCommandLineDialog.pt-BR.xlf @@ -0,0 +1,52 @@ + + + + + + I&nsert + I&nserir + + + + OK + OK + + + + Cancel + Cancelar + + + + Build Command Line + Linha de Comando de Build + + + + &Macros >> + &Macros >> + + + + << &Macros + << &Macros + + + + Macro List + Lista de Macros + + + + Macro + Macro + + + + Value + Valor + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventCommandLineDialog.ru.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventCommandLineDialog.ru.xlf new file mode 100644 index 00000000000..c9efae6f911 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventCommandLineDialog.ru.xlf @@ -0,0 +1,52 @@ + + + + + + I&nsert + Вс&тавка + + + + OK + ОК + + + + Cancel + Отмена + + + + Build Command Line + Командная строка сборки + + + + &Macros >> + &Макросы >> + + + + << &Macros + << &Макросы + + + + Macro List + Список макросов + + + + Macro + Макрос + + + + Value + Значение + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventCommandLineDialog.tr.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventCommandLineDialog.tr.xlf new file mode 100644 index 00000000000..9f9ac6466e7 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventCommandLineDialog.tr.xlf @@ -0,0 +1,52 @@ + + + + + + I&nsert + E&kle + + + + OK + Tamam + + + + Cancel + İptal + + + + Build Command Line + Derleme Komut Satırı + + + + &Macros >> + &Makrolar >> + + + + << &Macros + << &Makrolar + + + + Macro List + Makro Listesi + + + + Macro + Makro + + + + Value + Değer + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventCommandLineDialog.zh-Hans.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventCommandLineDialog.zh-Hans.xlf new file mode 100644 index 00000000000..5caf470b726 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventCommandLineDialog.zh-Hans.xlf @@ -0,0 +1,52 @@ + + + + + + I&nsert + 插入(&N) + + + + OK + 确定 + + + + Cancel + 取消 + + + + Build Command Line + 生成命令行 + + + + &Macros >> + 宏(&M) >> + + + + << &Macros + << 宏(&M) + + + + Macro List + 宏列表 + + + + Macro + + + + + Value + + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventCommandLineDialog.zh-Hant.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventCommandLineDialog.zh-Hant.xlf new file mode 100644 index 00000000000..669a3a874c9 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventCommandLineDialog.zh-Hant.xlf @@ -0,0 +1,52 @@ + + + + + + I&nsert + 插入(&N) + + + + OK + 確定 + + + + Cancel + 取消 + + + + Build Command Line + 建置命令列 + + + + &Macros >> + 巨集(&M) >> + + + + << &Macros + << 巨集(&M) + + + + Macro List + 巨集清單 + + + + Macro + 巨集 + + + + Value + + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventsPropPage.cs.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventsPropPage.cs.xlf new file mode 100644 index 00000000000..6cc631bbbc7 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventsPropPage.cs.xlf @@ -0,0 +1,67 @@ + + + + + + P&re-build event command line: + Příkazový řádek události &před sestavením: + + + + Pre-build event command line + Příkazový řádek události před sestavením + + + + Edit Pre-build ... + Editovat před sestavením ... + + + + Ed&it Pre-build ... + Ed&itovat před sestavením ... + + + + P&ost-build event command line: + Příkazový řádek události p&o sestavení: + + + + Post-build event command line + Příkazový řádek události po sestavení + + + + Edit Post-build ... + Editovat po sestavení ... + + + + Edit Post-b&uild ... + Editovat p&o sestavení ... + + + + Ru&n the post-build event: + Spustit událost po sestave&ní: + + + + Always + Vždy + + + + On successful build + Při úspěšném sestavení + + + + When the build updates the project output + Když sestavení aktualizuje výstup projektu + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventsPropPage.de.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventsPropPage.de.xlf new file mode 100644 index 00000000000..4edb425a91d --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventsPropPage.de.xlf @@ -0,0 +1,67 @@ + + + + + + P&re-build event command line: + Befehlszeile für P&räbuildereignis + + + + Pre-build event command line + Befehlszeile für Präbuildereignis + + + + Edit Pre-build ... + Präbuildbearbeitung... + + + + Ed&it Pre-build ... + Präbu&ildbearbeitung... + + + + P&ost-build event command line: + Befehlszeile für P&ostbuildereignis: + + + + Post-build event command line + Befehlszeile für Postbuildereignis + + + + Edit Post-build ... + Postbuildbearbeitung... + + + + Edit Post-b&uild ... + Postb&uildbearbeitung... + + + + Ru&n the post-build event: + Postbuildereignis a&usführen: + + + + Always + Immer + + + + On successful build + Bei erfolgreicher Erstellung + + + + When the build updates the project output + Bei der Aktualisierung der Projektausgabe während der Erstellung + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventsPropPage.en.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventsPropPage.en.xlf new file mode 100644 index 00000000000..4758373726e --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventsPropPage.en.xlf @@ -0,0 +1,67 @@ + + + + + + P&re-build event command line: + P&re-build event command line: + + + + Pre-build event command line + Pre-build event command line + + + + Edit Pre-build ... + Edit Pre-build ... + + + + Ed&it Pre-build ... + Ed&it Pre-build ... + + + + P&ost-build event command line: + P&ost-build event command line: + + + + Post-build event command line + Post-build event command line + + + + Edit Post-build ... + Edit Post-build ... + + + + Edit Post-b&uild ... + Edit Post-b&uild ... + + + + Ru&n the post-build event: + Ru&n the post-build event: + + + + Always + Always + + + + On successful build + On successful build + + + + When the build updates the project output + When the build updates the project output + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventsPropPage.es.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventsPropPage.es.xlf new file mode 100644 index 00000000000..8a687161774 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventsPropPage.es.xlf @@ -0,0 +1,67 @@ + + + + + + P&re-build event command line: + Lí&nea de comandos del evento anterior a la compilación: + + + + Pre-build event command line + Línea de comandos del evento anterior a la compilación + + + + Edit Pre-build ... + Edición anterior a la compilación... + + + + Ed&it Pre-build ... + &Edición anterior a la compilación... + + + + P&ost-build event command line: + &Línea de comandos del evento posterior a la compilación: + + + + Post-build event command line + Línea de comandos del evento posterior a la compilación + + + + Edit Post-build ... + Edición posterior a la compilación... + + + + Edit Post-b&uild ... + E&dición posterior a la compilación... + + + + Ru&n the post-build event: + Eje&cutar el evento posterior a la compilación: + + + + Always + Siempre + + + + On successful build + Si la compilación es correcta + + + + When the build updates the project output + Cuando la compilación actualiza los resultados del proyecto + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventsPropPage.fr.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventsPropPage.fr.xlf new file mode 100644 index 00000000000..0f9892f65c0 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventsPropPage.fr.xlf @@ -0,0 +1,67 @@ + + + + + + P&re-build event command line: + &Ligne de commande de l'événement pré-build : + + + + Pre-build event command line + Ligne de commande de l'événement pré-build + + + + Edit Pre-build ... + Modifier pré-build ... + + + + Ed&it Pre-build ... + M&odifier pré-build ... + + + + P&ost-build event command line: + &Ligne de commande de l'événement post-build : + + + + Post-build event command line + Ligne de commande de l'événement post-build + + + + Edit Post-build ... + Modifier post-build... + + + + Edit Post-b&uild ... + Mo&difier post-build... + + + + Ru&n the post-build event: + Exécuter l'évé&nement post-build : + + + + Always + Toujours + + + + On successful build + En cas de build réussie + + + + When the build updates the project output + Lorsque la build met à jour la sortie du projet + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventsPropPage.it.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventsPropPage.it.xlf new file mode 100644 index 00000000000..ff6480bf0a3 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventsPropPage.it.xlf @@ -0,0 +1,67 @@ + + + + + + P&re-build event command line: + &Riga di comando eventi di pre-compilazione: + + + + Pre-build event command line + Riga di comando eventi di pre-compilazione + + + + Edit Pre-build ... + Modifica pre-compilazione... + + + + Ed&it Pre-build ... + Modi&fica pre-compilazione... + + + + P&ost-build event command line: + Riga di c&omando eventi di post-compilazione: + + + + Post-build event command line + Riga di comando eventi di post-compilazione + + + + Edit Post-build ... + Modifica post-compilazione... + + + + Edit Post-b&uild ... + Modifica &post-compilazione... + + + + Ru&n the post-build event: + Esegui eve&nto di post-compilazione: + + + + Always + Sempre + + + + On successful build + Dopo una compilazione riuscita + + + + When the build updates the project output + Quando la compilazione aggiorna l'output del progetto + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventsPropPage.ja.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventsPropPage.ja.xlf new file mode 100644 index 00000000000..1224d4e6cb3 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventsPropPage.ja.xlf @@ -0,0 +1,67 @@ + + + + + + P&re-build event command line: + ビルド前イベントのコマンド ライン(&R): + + + + Pre-build event command line + ビルド前に実行するコマンド ライン + + + + Edit Pre-build ... + ビルド前の編集... + + + + Ed&it Pre-build ... + ビルド前の編集(&I)... + + + + P&ost-build event command line: + ビルド後イベントのコマンド ライン(&O): + + + + Post-build event command line + ビルド後に実行するコマンド ライン + + + + Edit Post-build ... + ビルド後の編集... + + + + Edit Post-b&uild ... + ビルド後の編集(&U)... + + + + Ru&n the post-build event: + ビルド後イベントの実行(&N): + + + + Always + 常時 + + + + On successful build + ビルドが成功したとき + + + + When the build updates the project output + ビルドがプロジェクト出力を更新したとき + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventsPropPage.ko.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventsPropPage.ko.xlf new file mode 100644 index 00000000000..2be535f212a --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventsPropPage.ko.xlf @@ -0,0 +1,67 @@ + + + + + + P&re-build event command line: + 빌드 전 이벤트 명령줄(&R): + + + + Pre-build event command line + 빌드 전 이벤트 명령줄 + + + + Edit Pre-build ... + 빌드 전 편집... + + + + Ed&it Pre-build ... + 빌드 전 편집(&I)... + + + + P&ost-build event command line: + 빌드 후 이벤트 명령줄(&O): + + + + Post-build event command line + 빌드 후 이벤트 명령줄 + + + + Edit Post-build ... + 빌드 후 편집... + + + + Edit Post-b&uild ... + 빌드 후 편집(&U)... + + + + Ru&n the post-build event: + 빌드 후 이벤트 실행(&N): + + + + Always + 항상 + + + + On successful build + 빌드가 성공한 경우 + + + + When the build updates the project output + 빌드에서 프로젝트 출력을 업데이트한 경우 + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventsPropPage.pl.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventsPropPage.pl.xlf new file mode 100644 index 00000000000..e2dbc5bce5a --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventsPropPage.pl.xlf @@ -0,0 +1,67 @@ + + + + + + P&re-build event command line: + Wie&rsz polecenia zdarzenia sprzed kompilacji: + + + + Pre-build event command line + Wiersz polecenia zdarzenia przed kompilowaniem + + + + Edit Pre-build ... + Edytuj zdarzenie przed kompilacją... + + + + Ed&it Pre-build ... + Ed&ytuj zdarzenie przed kompilacją... + + + + P&ost-build event command line: + Wiersz p&olecenia zdarzenia po kompilacji: + + + + Post-build event command line + Wiersz polecenia zdarzenia po kompilacji + + + + Edit Post-build ... + Edytuj zdarzenie po kompilacji... + + + + Edit Post-b&uild ... + Edytuj zdarzenie &po kompilacji... + + + + Ru&n the post-build event: + Ur&uchom zdarzenie po kompilacji: + + + + Always + Zawsze + + + + On successful build + Podczas pomyślnej kompilacji + + + + When the build updates the project output + Gdy kompilacja aktualizuje wyjście projektu + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventsPropPage.pt-BR.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventsPropPage.pt-BR.xlf new file mode 100644 index 00000000000..aec6e5568fa --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventsPropPage.pt-BR.xlf @@ -0,0 +1,67 @@ + + + + + + P&re-build event command line: + &Linha de comando do evento de pré-compilação: + + + + Pre-build event command line + Linha de comando do evento de pré-compilação + + + + Edit Pre-build ... + Editar antes da compilação ... + + + + Ed&it Pre-build ... + Ed&itar antes da compilação ... + + + + P&ost-build event command line: + &Linha de comando do evento de pós-compilação: + + + + Post-build event command line + Linha de comando do evento de pós-compilação + + + + Edit Post-build ... + Editar pós-compilação ... + + + + Edit Post-b&uild ... + Editar &pós-compilação ... + + + + Ru&n the post-build event: + Executar o eve&nto pós-build: + + + + Always + Sempre + + + + On successful build + Em caso de build bem-sucedido + + + + When the build updates the project output + Quando a compilação atualizar a saída do projeto + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventsPropPage.ru.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventsPropPage.ru.xlf new file mode 100644 index 00000000000..aa1a35894d7 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventsPropPage.ru.xlf @@ -0,0 +1,67 @@ + + + + + + P&re-build event command line: + Командная строка события п&еред сборкой: + + + + Pre-build event command line + Командная строка события перед сборкой + + + + Edit Pre-build ... + Изменить событие "Перед сборкой" ... + + + + Ed&it Pre-build ... + &Изменить событие "Перед сборкой"... + + + + P&ost-build event command line: + Командная строка события п&осле сборки: + + + + Post-build event command line + Командная строка события после сборки + + + + Edit Post-build ... + Изменить событие "После сборки" ... + + + + Edit Post-b&uild ... + &Изменить событие "После сборки" ... + + + + Ru&n the post-build event: + &Выполнять событие после сборки: + + + + Always + Всегда + + + + On successful build + При успешной сборке + + + + When the build updates the project output + При обновлении выходных файлов проекта во время сборки + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventsPropPage.tr.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventsPropPage.tr.xlf new file mode 100644 index 00000000000..b5f5bac5114 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventsPropPage.tr.xlf @@ -0,0 +1,67 @@ + + + + + + P&re-build event command line: + &Derleme öncesi olay komut satırı: + + + + Pre-build event command line + Oluşturma öncesi olay komut satırı + + + + Edit Pre-build ... + Oluşturma Öncesi Düzenle ... + + + + Ed&it Pre-build ... + Oluşturma Öncesi Dü&zenle ... + + + + P&ost-build event command line: + &Oluşturma sonrası olay komut satırı: + + + + Post-build event command line + Oluşturma sonrası olay komut satırı + + + + Edit Post-build ... + Oluşturma Sonrası Düzenle ... + + + + Edit Post-b&uild ... + Oluşturma Sonrası D&üzenle ... + + + + Ru&n the post-build event: + Derleme sonrası olayını çalıştır: + + + + Always + Her Zaman + + + + On successful build + Derleme başarılı olduğunda + + + + When the build updates the project output + Oluşturma proje çıkışını güncelleştirdiğinde + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventsPropPage.zh-Hans.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventsPropPage.zh-Hans.xlf new file mode 100644 index 00000000000..41abaed4108 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventsPropPage.zh-Hans.xlf @@ -0,0 +1,67 @@ + + + + + + P&re-build event command line: + 生成前事件命令行(&R): + + + + Pre-build event command line + 生成前事件命令行 + + + + Edit Pre-build ... + 编辑预先生成事件... + + + + Ed&it Pre-build ... + 编辑预先生成事件(&I)... + + + + P&ost-build event command line: + 生成后事件命令行(&O): + + + + Post-build event command line + 生成后事件命令行 + + + + Edit Post-build ... + 编辑后期生成事件... + + + + Edit Post-b&uild ... + 编辑后期生成事件(&U)... + + + + Ru&n the post-build event: + 运行生成后事件(&N): + + + + Always + 始终 + + + + On successful build + 成功生成时 + + + + When the build updates the project output + 生成更新项目输出时 + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventsPropPage.zh-Hant.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventsPropPage.zh-Hant.xlf new file mode 100644 index 00000000000..cdf36470563 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildEventsPropPage.zh-Hant.xlf @@ -0,0 +1,67 @@ + + + + + + P&re-build event command line: + 建置前事件命令列(&R): + + + + Pre-build event command line + 建置前事件命令列 + + + + Edit Pre-build ... + 建置前進行編輯... + + + + Ed&it Pre-build ... + 建置前進行編輯(&I)... + + + + P&ost-build event command line: + 建置後事件命令列(&O): + + + + Post-build event command line + 建置後事件命令列 + + + + Edit Post-build ... + 建置後進行編輯... + + + + Edit Post-b&uild ... + 建置後進行編輯(&U)... + + + + Ru&n the post-build event: + 執行建置後事件(&N): + + + + Always + 永遠 + + + + On successful build + 建置成功時 + + + + When the build updates the project output + 當組建更新專案輸出時 + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildPropPage.cs.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildPropPage.cs.xlf new file mode 100644 index 00000000000..db4345b9870 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildPropPage.cs.xlf @@ -0,0 +1,137 @@ + + + + + + Conditional compilation s&ymbols: + Symboly podmíněné &kompilace: + + + + &Prefer 32-bit + &Preferovat 32bitovou verzi + + + + Output + Výstup + + + + General + Obecné + + + + Treat warnings as errors + Zpracovávat upozornění jako chyby + + + + Errors and warnings + Chyby a upozornění + + + + &XML documentation file: + Soubor dokumentace &XML: + + + + B&rowse... + P&rocházet... + + + + &Output path: + &Cesta výstupu: + + + + A&ll + &Vše + + + + Specif&ic warnings: + Specifická &upozornění: + + + + &None + Žád&ná + + + + &Suppress warnings: + Potlačit upozo&rnění: + + + + 0 + 0 + + + + 1 + 1 + + + + 2 + 2 + + + + 3 + 3 + + + + 4 + 4 + + + + 5 + 5 + + + + &Warning level: + Úroveň pro &upozornění: + + + + Optimi&ze code + Optimali&zovat kód + + + + G&enerate tail calls + G&enerovat volání funkce Tail + + + + Define TR&ACE constant + Definovat konstantu TR&ACE + + + + Platform tar&get: + Cílová &platforma: + + + + Other &flags: + Jiné &příznaky: + + + + Define DEB&UG constant + Definovat konstantu DEB&UG + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildPropPage.de.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildPropPage.de.xlf new file mode 100644 index 00000000000..320147d129d --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildPropPage.de.xlf @@ -0,0 +1,137 @@ + + + + + + Conditional compilation s&ymbols: + Bedingte Kompilierungss&ymbole: + + + + &Prefer 32-bit + 32-Bit &bevorzugen + + + + Output + Ausgabe + + + + General + Allgemein + + + + Treat warnings as errors + Warnungen als Fehler behandeln + + + + Errors and warnings + Fehler und Warnungen + + + + &XML documentation file: + &XML-Dokumentationsdatei: + + + + B&rowse... + Du&rchsuchen... + + + + &Output path: + &Ausgabepfad: + + + + A&ll + A&lles + + + + Specif&ic warnings: + Best&immte Warnungen: + + + + &None + &Keine + + + + &Suppress warnings: + Warnungen &unterdrücken: + + + + 0 + 0 + + + + 1 + 1 + + + + 2 + 2 + + + + 3 + 3 + + + + 4 + 4 + + + + 5 + 5 + + + + &Warning level: + &Warnstufe: + + + + Optimi&ze code + Code optimi&eren + + + + G&enerate tail calls + Endeaufrufe g&enerieren + + + + Define TR&ACE constant + TR&ACE-Konstante definieren + + + + Platform tar&get: + Plattformzie&l: + + + + Other &flags: + Andere &Flags: + + + + Define DEB&UG constant + DEB&UG-Konstante definieren + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildPropPage.en.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildPropPage.en.xlf new file mode 100644 index 00000000000..8323c6ee177 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildPropPage.en.xlf @@ -0,0 +1,137 @@ + + + + + + Conditional compilation s&ymbols: + Conditional compilation s&ymbols: + + + + &Prefer 32-bit + &Prefer 32-bit + + + + Output + Output + + + + General + General + + + + Treat warnings as errors + Treat warnings as errors + + + + Errors and warnings + Errors and warnings + + + + &XML documentation file: + &XML documentation file: + + + + B&rowse... + B&rowse... + + + + &Output path: + &Output path: + + + + A&ll + A&ll + + + + Specif&ic warnings: + Specif&ic warnings: + + + + &None + &None + + + + &Suppress warnings: + &Suppress warnings: + + + + 0 + 0 + + + + 1 + 1 + + + + 2 + 2 + + + + 3 + 3 + + + + 4 + 4 + + + + 5 + 5 + + + + &Warning level: + &Warning level: + + + + Optimi&ze code + Optimi&ze code + + + + G&enerate tail calls + G&enerate tail calls + + + + Define TR&ACE constant + Define TR&ACE constant + + + + Platform tar&get: + Platform tar&get: + + + + Other &flags: + Other &flags: + + + + Define DEB&UG constant + Define DEB&UG constant + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildPropPage.es.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildPropPage.es.xlf new file mode 100644 index 00000000000..d6fe8b01cb0 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildPropPage.es.xlf @@ -0,0 +1,137 @@ + + + + + + Conditional compilation s&ymbols: + &Símbolos de compilación condicional: + + + + &Prefer 32-bit + &Preferencia de 32 bits + + + + Output + Salida + + + + General + General + + + + Treat warnings as errors + Tratar advertencias como errores + + + + Errors and warnings + Errores y advertencias + + + + &XML documentation file: + Archivo de documentación &XML: + + + + B&rowse... + E&xaminar... + + + + &Output path: + &Ruta de acceso de salida: + + + + A&ll + &Todo + + + + Specif&ic warnings: + Advertenc&ias específicas: + + + + &None + Ning&uno + + + + &Suppress warnings: + &Suprimir advertencias: + + + + 0 + 0 + + + + 1 + 1 + + + + 2 + 2 + + + + 3 + 3 + + + + 4 + 4 + + + + 5 + 5 + + + + &Warning level: + &Nivel de advertencia: + + + + Optimi&ze code + Optimi&zar código + + + + G&enerate tail calls + &Generar llamadas de cola + + + + Define TR&ACE constant + &Definir constante TRACE + + + + Platform tar&get: + &Destino de la plataforma: + + + + Other &flags: + &Otras marcas: + + + + Define DEB&UG constant + &Definir constante DEBUG + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildPropPage.fr.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildPropPage.fr.xlf new file mode 100644 index 00000000000..e0721064309 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildPropPage.fr.xlf @@ -0,0 +1,137 @@ + + + + + + Conditional compilation s&ymbols: + S&ymboles de compilation conditionnelle : + + + + &Prefer 32-bit + Préférer &32 bits + + + + Output + Sortie + + + + General + Général + + + + Treat warnings as errors + Considérer les avertissements comme des erreurs + + + + Errors and warnings + Erreurs et avertissements + + + + &XML documentation file: + &Fichier de documentation XML : + + + + B&rowse... + Pa&rcourir... + + + + &Output path: + C&hemin de sortie : + + + + A&ll + T&out + + + + Specif&ic warnings: + Avertissements spéci&fiques : + + + + &None + Aucu&n + + + + &Suppress warnings: + &Supprimer les avertissements : + + + + 0 + 0 + + + + 1 + 1 + + + + 2 + 2 + + + + 3 + 3 + + + + 4 + 4 + + + + 5 + 5 + + + + &Warning level: + Niveau d'&avertissement : + + + + Optimi&ze code + Op&timiser le code + + + + G&enerate tail calls + G&énérer des appels tail + + + + Define TR&ACE constant + &Définir la constante TRACE + + + + Platform tar&get: + Plateforme ci&ble : + + + + Other &flags: + Autres &indicateurs : + + + + Define DEB&UG constant + Définir la constante DEB&UG + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildPropPage.it.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildPropPage.it.xlf new file mode 100644 index 00000000000..0890694a536 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildPropPage.it.xlf @@ -0,0 +1,137 @@ + + + + + + Conditional compilation s&ymbols: + Sim&boli di compilazione condizionale: + + + + &Prefer 32-bit + &Preferisci 32 bit + + + + Output + Output + + + + General + Generale + + + + Treat warnings as errors + Considera gli avvisi come errori + + + + Errors and warnings + Errori e avvisi + + + + &XML documentation file: + File di documentazione &XML: + + + + B&rowse... + S&foglia... + + + + &Output path: + Perc&orso di output: + + + + A&ll + T&utti + + + + Specif&ic warnings: + Avv&isi specifici: + + + + &None + &Nessuno + + + + &Suppress warnings: + Non visualizzare avvi&si: + + + + 0 + 0 + + + + 1 + 1 + + + + 2 + 2 + + + + 3 + 3 + + + + 4 + 4 + + + + 5 + 5 + + + + &Warning level: + &Livello di avviso: + + + + Optimi&ze code + Ottimi&zza codice + + + + G&enerate tail calls + &Genera chiamate tail + + + + Define TR&ACE constant + Definisci costante TR&ACE + + + + Platform tar&get: + &Piattaforma di destinazione: + + + + Other &flags: + Altri fla&g: + + + + Define DEB&UG constant + Definisci costante DEB&UG + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildPropPage.ja.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildPropPage.ja.xlf new file mode 100644 index 00000000000..d83b51700bf --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildPropPage.ja.xlf @@ -0,0 +1,137 @@ + + + + + + Conditional compilation s&ymbols: + 条件付きコンパイル シンボル(&Y): + + + + &Prefer 32-bit + 32 ビットを優先(&P) + + + + Output + 出力 + + + + General + 全般 + + + + Treat warnings as errors + 警告をエラーとして扱う + + + + Errors and warnings + エラーと警告 + + + + &XML documentation file: + XML ドキュメント ファイル(&X): + + + + B&rowse... + 参照(&R)... + + + + &Output path: + 出力パス(&O): + + + + A&ll + すべて(&L) + + + + Specif&ic warnings: + 特定の警告(&I): + + + + &None + なし(&N) + + + + &Suppress warnings: + 警告の表示なし(&S): + + + + 0 + 0 + + + + 1 + 1 + + + + 2 + 2 + + + + 3 + 3 + + + + 4 + 4 + + + + 5 + 5 + + + + &Warning level: + 警告レベル(&W): + + + + Optimi&ze code + コードの最適化(&Z) + + + + G&enerate tail calls + 末尾呼び出しの生成(&E) + + + + Define TR&ACE constant + 定数 TRACE の定義(&A) + + + + Platform tar&get: + プラットフォーム ターゲット(&G): + + + + Other &flags: + その他のフラグ(&F): + + + + Define DEB&UG constant + DEBUG 定数の定義(&U) + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildPropPage.ko.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildPropPage.ko.xlf new file mode 100644 index 00000000000..537f14a12ca --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildPropPage.ko.xlf @@ -0,0 +1,137 @@ + + + + + + Conditional compilation s&ymbols: + 조건부 컴파일 기호(&Y): + + + + &Prefer 32-bit + 32비트 기본 사용(&P) + + + + Output + 출력 + + + + General + 일반 + + + + Treat warnings as errors + 경고를 오류로 처리 + + + + Errors and warnings + 오류 및 경고 + + + + &XML documentation file: + XML 문서 파일(&X): + + + + B&rowse... + 찾아보기(&R)... + + + + &Output path: + 출력 경로(&O): + + + + A&ll + 모두(&L) + + + + Specif&ic warnings: + 특정 경고(&I): + + + + &None + 없음(&N) + + + + &Suppress warnings: + 경고 표시 안 함(&S): + + + + 0 + 0 + + + + 1 + 1 + + + + 2 + 2 + + + + 3 + 3 + + + + 4 + 4 + + + + 5 + 5 + + + + &Warning level: + 경고 수준(&W): + + + + Optimi&ze code + 코드 최적화(&Z) + + + + G&enerate tail calls + 마무리 호출 생성(&E) + + + + Define TR&ACE constant + TRACE 상수 정의(&A) + + + + Platform tar&get: + 플랫폼 대상(&G): + + + + Other &flags: + 다른 플래그(&F): + + + + Define DEB&UG constant + DEBUG 상수 정의(&U) + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildPropPage.pl.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildPropPage.pl.xlf new file mode 100644 index 00000000000..1b4413c9b1d --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildPropPage.pl.xlf @@ -0,0 +1,137 @@ + + + + + + Conditional compilation s&ymbols: + S&ymbole kompilacji warunkowej: + + + + &Prefer 32-bit + &Preferuj wersję 32-bitową + + + + Output + Wyjściowe + + + + General + Ogólne + + + + Treat warnings as errors + Traktuj ostrzeżenia jako błędy + + + + Errors and warnings + Błędy i ostrzeżenia + + + + &XML documentation file: + Plik dokumentacji &XML: + + + + B&rowse... + P&rzeglądaj... + + + + &Output path: + Ścieżka &wyjściowa: + + + + A&ll + W&szystkie + + + + Specif&ic warnings: + Specy&ficzne ostrzeżenia: + + + + &None + &Brak + + + + &Suppress warnings: + &Pomiń ostrzeżenia: + + + + 0 + 0 + + + + 1 + 1 + + + + 2 + 2 + + + + 3 + 3 + + + + 4 + 4 + + + + 5 + 5 + + + + &Warning level: + &Poziom ostrzeżeń: + + + + Optimi&ze code + Optymali&zuj kod + + + + G&enerate tail calls + G&eneruj wywołania tail + + + + Define TR&ACE constant + Zdefiniuj stałą TR&ACE + + + + Platform tar&get: + Platforma doce&lowa: + + + + Other &flags: + Inne &flagi: + + + + Define DEB&UG constant + Zdefiniuj stałą DEB&UG + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildPropPage.pt-BR.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildPropPage.pt-BR.xlf new file mode 100644 index 00000000000..a2ffb7e6c84 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildPropPage.pt-BR.xlf @@ -0,0 +1,137 @@ + + + + + + Conditional compilation s&ymbols: + Sí&mbolos de compilação condicional: + + + + &Prefer 32-bit + &Preferir 32 bits + + + + Output + Saída + + + + General + Geral + + + + Treat warnings as errors + Tratar avisos como erros + + + + Errors and warnings + Erros e avisos + + + + &XML documentation file: + Arquivo de documentação &XML: + + + + B&rowse... + P&rocurar... + + + + &Output path: + Caminho de &saída: + + + + A&ll + Tud&o + + + + Specif&ic warnings: + Avisos específ&icos: + + + + &None + &Nenhuma + + + + &Suppress warnings: + &Suprimir avisos: + + + + 0 + 0 + + + + 1 + 1 + + + + 2 + 2 + + + + 3 + 3 + + + + 4 + 4 + + + + 5 + 5 + + + + &Warning level: + &Nível de aviso: + + + + Optimi&ze code + Otimi&zar código + + + + G&enerate tail calls + &Gerar chamadas tail + + + + Define TR&ACE constant + Defina constante TR&ACE + + + + Platform tar&get: + Des&tino da plataforma: + + + + Other &flags: + &Outros sinalizadores: + + + + Define DEB&UG constant + Definir constante DEB&UG + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildPropPage.ru.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildPropPage.ru.xlf new file mode 100644 index 00000000000..7d4a6afc0f1 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildPropPage.ru.xlf @@ -0,0 +1,137 @@ + + + + + + Conditional compilation s&ymbols: + &Символы условной компиляции: + + + + &Prefer 32-bit + &Предпочитать 32-разрядн. + + + + Output + Вывод + + + + General + Общие + + + + Treat warnings as errors + Обрабатывать предупреждения как ошибки + + + + Errors and warnings + Ошибки и предупреждения + + + + &XML documentation file: + &Файл документации XML: + + + + B&rowse... + &Обзор... + + + + &Output path: + &Путь вывода: + + + + A&ll + &Все + + + + Specif&ic warnings: + &Конкретные предупреждения: + + + + &None + &Нет + + + + &Suppress warnings: + &Отключить предупреждения: + + + + 0 + 0 + + + + 1 + 1 + + + + 2 + 2 + + + + 3 + 3 + + + + 4 + 4 + + + + 5 + 5 + + + + &Warning level: + &Уровень предупреждений: + + + + Optimi&ze code + &Оптимизировать код + + + + G&enerate tail calls + &Формировать концевые вызовы + + + + Define TR&ACE constant + Определить константу &TRACE + + + + Platform tar&get: + &Конечная платформа: + + + + Other &flags: + Друг&ие флаги: + + + + Define DEB&UG constant + Определить константу &DEBUG + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildPropPage.tr.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildPropPage.tr.xlf new file mode 100644 index 00000000000..7a55cc949b6 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildPropPage.tr.xlf @@ -0,0 +1,137 @@ + + + + + + Conditional compilation s&ymbols: + &Koşullu derleme simgeleri: + + + + &Prefer 32-bit + 32 Biti &Tercih Et + + + + Output + Çıkış + + + + General + Genel + + + + Treat warnings as errors + Uyarıları hata olarak değerlendir + + + + Errors and warnings + Hatalar ve uyarılar + + + + &XML documentation file: + &XML belgesi dosyası: + + + + B&rowse... + Gö&zat... + + + + &Output path: + &Çıkış yolu: + + + + A&ll + &Tümü + + + + Specif&ic warnings: + Özel &uyarılar: + + + + &None + &Hiçbiri + + + + &Suppress warnings: + &Uyarıları kapat: + + + + 0 + 0 + + + + 1 + 1 + + + + 2 + 2 + + + + 3 + 3 + + + + 4 + 4 + + + + 5 + 5 + + + + &Warning level: + &Uyarı düzeyi: + + + + Optimi&ze code + &Kodu iyileştir + + + + G&enerate tail calls + Tail çağrıları &oluştur + + + + Define TR&ACE constant + TR&ACE sabitini tanımla + + + + Platform tar&get: + Platform &hedefi: + + + + Other &flags: + Diğer &bayraklar: + + + + Define DEB&UG constant + HATA &AYIKLAMA sabiti tanımla + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildPropPage.zh-Hans.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildPropPage.zh-Hans.xlf new file mode 100644 index 00000000000..7189b489018 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildPropPage.zh-Hans.xlf @@ -0,0 +1,137 @@ + + + + + + Conditional compilation s&ymbols: + 条件编译符号(&Y): + + + + &Prefer 32-bit + 首选 32 位(&P) + + + + Output + 输出 + + + + General + 常规 + + + + Treat warnings as errors + 将警告视为错误 + + + + Errors and warnings + 错误和警告 + + + + &XML documentation file: + XML 文档文件(&X): + + + + B&rowse... + 浏览(&R)... + + + + &Output path: + 输出路径(&O): + + + + A&ll + 全部(&L) + + + + Specif&ic warnings: + 特定警告(&I): + + + + &None + 无(&N) + + + + &Suppress warnings: + 禁止显示警告(&S): + + + + 0 + 0 + + + + 1 + 1 + + + + 2 + 2 + + + + 3 + 3 + + + + 4 + 4 + + + + 5 + 5 + + + + &Warning level: + 警告等级(&W): + + + + Optimi&ze code + 优化代码(&Z) + + + + G&enerate tail calls + 生成尾调用(&E) + + + + Define TR&ACE constant + 定义 TRACE 常数(&A) + + + + Platform tar&get: + 目标平台(&G): + + + + Other &flags: + 其他标志(&F): + + + + Define DEB&UG constant + 定义 DEBUG 常量(&U) + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildPropPage.zh-Hant.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildPropPage.zh-Hant.xlf new file mode 100644 index 00000000000..b5d76de120c --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/BuildPropPage.zh-Hant.xlf @@ -0,0 +1,137 @@ + + + + + + Conditional compilation s&ymbols: + 條件式編譯的符號(&Y): + + + + &Prefer 32-bit + 建議使用 32 位元(&P) + + + + Output + 輸出 + + + + General + 一般 + + + + Treat warnings as errors + 將警告視為錯誤 + + + + Errors and warnings + 錯誤和警告 + + + + &XML documentation file: + XML 文件檔案(&X): + + + + B&rowse... + 瀏覽(&R)... + + + + &Output path: + 輸出路徑(&O): + + + + A&ll + 全部(&L) + + + + Specif&ic warnings: + 特定警告(&I): + + + + &None + 無(&N) + + + + &Suppress warnings: + 隱藏警告(&S): + + + + 0 + 0 + + + + 1 + 1 + + + + 2 + 2 + + + + 3 + 3 + + + + 4 + 4 + + + + 5 + 5 + + + + &Warning level: + 警告層級(&W): + + + + Optimi&ze code + 最佳化程式碼(&Z) + + + + G&enerate tail calls + 產生 Tail 呼叫(&E) + + + + Define TR&ACE constant + 定義 TRACE 常數(&A) + + + + Platform tar&get: + 平台目標(&G): + + + + Other &flags: + 其他旗標(&F): + + + + Define DEB&UG constant + 定義 DEBUG 常數(&U) + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/DebugPropPage.cs.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/DebugPropPage.cs.xlf new file mode 100644 index 00000000000..4fbcdb22b63 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/DebugPropPage.cs.xlf @@ -0,0 +1,92 @@ + + + + + + Start Action + Spustit akci + + + + &Start project + &Spustit projekt + + + + Start e&xternal program: + Spustit e&xterní program: + + + + Program to start + Program na spuštění + + + + Browse for external program + Vybrat externí program + + + + ... + ... + + + + Start Options + Možnosti spuštění + + + + Comma&nd line arguments: + &Argumenty příkazového řádku: + + + + Wor&king directory: + Pracov&ní adresář: + + + + Use remote m&achine + Použít vzdál&ený počítač + + + + Remote Machine Name: + Název vzdáleného počítače: + + + + Browse for working directory + Vybrat pracovní adresář + + + + ... + ... + + + + Enable Debuggers + Povolit ladicí programy + + + + Enable SQ&L Server debugging + Povolit ladění SQ&L Serveru + + + + Enable the Visual Studio h&osting process + Povolit &hostitelský proces sady Visual Studio + + + + Enable &unmanaged code debugging + Povolit ladění &nespravovaného kódu + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/DebugPropPage.de.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/DebugPropPage.de.xlf new file mode 100644 index 00000000000..2e570490493 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/DebugPropPage.de.xlf @@ -0,0 +1,92 @@ + + + + + + Start Action + Startaktion + + + + &Start project + Projekt &starten + + + + Start e&xternal program: + E&xternes Programm starten: + + + + Program to start + Zu startendes Programm + + + + Browse for external program + Externes Programm suchen + + + + ... + ... + + + + Start Options + Startoptionen + + + + Comma&nd line arguments: + Befehlszeilenargume&nte: + + + + Wor&king directory: + Arbeits&verzeichnis: + + + + Use remote m&achine + Rem&otecomputer verwenden + + + + Remote Machine Name: + Name des Remotecomputers: + + + + Browse for working directory + Arbeitsverzeichnis suchen + + + + ... + ... + + + + Enable Debuggers + Debugger aktivieren + + + + Enable SQ&L Server debugging + SQ&L Server-Debuggen aktivieren + + + + Enable the Visual Studio h&osting process + Visual Studio-H&ostingprozess aktivieren + + + + Enable &unmanaged code debugging + Deb&uggen von nicht verwaltetem Code aktivieren + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/DebugPropPage.en.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/DebugPropPage.en.xlf new file mode 100644 index 00000000000..cfce05c9552 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/DebugPropPage.en.xlf @@ -0,0 +1,92 @@ + + + + + + Start Action + Start Action + + + + &Start project + &Start project + + + + Start e&xternal program: + Start e&xternal program: + + + + Program to start + Program to start + + + + Browse for external program + Browse for external program + + + + ... + ... + + + + Start Options + Start Options + + + + Comma&nd line arguments: + Comma&nd line arguments: + + + + Wor&king directory: + Wor&king directory: + + + + Use remote m&achine + Use remote m&achine + + + + Remote Machine Name: + Remote Machine Name: + + + + Browse for working directory + Browse for working directory + + + + ... + ... + + + + Enable Debuggers + Enable Debuggers + + + + Enable SQ&L Server debugging + Enable SQ&L Server debugging + + + + Enable the Visual Studio h&osting process + Enable the Visual Studio h&osting process + + + + Enable &unmanaged code debugging + Enable &unmanaged code debugging + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/DebugPropPage.es.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/DebugPropPage.es.xlf new file mode 100644 index 00000000000..6c4f55c9e71 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/DebugPropPage.es.xlf @@ -0,0 +1,92 @@ + + + + + + Start Action + Acción de inicio + + + + &Start project + &Proyecto de inicio + + + + Start e&xternal program: + Programa e&xterno de inicio: + + + + Program to start + Programa para iniciar + + + + Browse for external program + Buscar programa externo + + + + ... + ... + + + + Start Options + Opciones de inicio + + + + Comma&nd line arguments: + &Argumentos de la línea de comandos: + + + + Wor&king directory: + Directorio de tra&bajo: + + + + Use remote m&achine + Usar &máquina remota + + + + Remote Machine Name: + Nombre de la máquina remota: + + + + Browse for working directory + Buscar directorio de trabajo + + + + ... + ... + + + + Enable Debuggers + Habilitar depuradores + + + + Enable SQ&L Server debugging + &Habilitar depuración de SQL Server + + + + Enable the Visual Studio h&osting process + &Habilitar el proceso de hospedaje de Visual Studio + + + + Enable &unmanaged code debugging + Habilitar depuración de código &no administrado + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/DebugPropPage.fr.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/DebugPropPage.fr.xlf new file mode 100644 index 00000000000..be876b43811 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/DebugPropPage.fr.xlf @@ -0,0 +1,92 @@ + + + + + + Start Action + Action de démarrage + + + + &Start project + Démarrer le proje&t + + + + Start e&xternal program: + Démarrer le programme e&xterne : + + + + Program to start + Programme à démarrer + + + + Browse for external program + Rechercher le programme externe + + + + ... + ... + + + + Start Options + Options de démarrage + + + + Comma&nd line arguments: + &Arguments de la ligne de commande : + + + + Wor&king directory: + Répertoire de tra&vail : + + + + Use remote m&achine + Utiliser l'ordin&ateur distant + + + + Remote Machine Name: + Nom de l'ordinateur distant : + + + + Browse for working directory + Rechercher le répertoire de travail + + + + ... + ... + + + + Enable Debuggers + Activer les débogueurs + + + + Enable SQ&L Server debugging + Activer le dé&bogage SQL Server + + + + Enable the Visual Studio h&osting process + Activer le processus d'&hébergement Visual Studio + + + + Enable &unmanaged code debugging + Activ&er le débogage de code non managé + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/DebugPropPage.it.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/DebugPropPage.it.xlf new file mode 100644 index 00000000000..cc4d9cd5c87 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/DebugPropPage.it.xlf @@ -0,0 +1,92 @@ + + + + + + Start Action + Azione di avvio + + + + &Start project + A&vvia progetto + + + + Start e&xternal program: + Avvia &programma esterno: + + + + Program to start + Programma da avviare + + + + Browse for external program + Cerca programma esterno + + + + ... + ... + + + + Start Options + Opzioni di avvio + + + + Comma&nd line arguments: + Argomenti della riga di coman&do: + + + + Wor&king directory: + Dire&ctory di lavoro: + + + + Use remote m&achine + &Usa computer remoto + + + + Remote Machine Name: + Nome del computer remoto: + + + + Browse for working directory + Cerca directory di lavoro + + + + ... + ... + + + + Enable Debuggers + Abilita debugger + + + + Enable SQ&L Server debugging + Abilita debug SQ&L Server + + + + Enable the Visual Studio h&osting process + Abilita processo di h&osting di Visual Studio + + + + Enable &unmanaged code debugging + Abilita debug codice non &gestito + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/DebugPropPage.ja.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/DebugPropPage.ja.xlf new file mode 100644 index 00000000000..0c2e2c27023 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/DebugPropPage.ja.xlf @@ -0,0 +1,92 @@ + + + + + + Start Action + 開始動作 + + + + &Start project + スタート プロジェクト(&S) + + + + Start e&xternal program: + 外部プログラムの開始(&X): + + + + Program to start + 開始するプログラム + + + + Browse for external program + 外部プログラムの参照 + + + + ... + ... + + + + Start Options + 開始オプション + + + + Comma&nd line arguments: + コマンド ライン引数(&N): + + + + Wor&king directory: + 作業ディレクトリ(&K): + + + + Use remote m&achine + リモート コンピューターを使用する(&A) + + + + Remote Machine Name: + リモート コンピューター名: + + + + Browse for working directory + 作業ディレクトリの参照 + + + + ... + ... + + + + Enable Debuggers + デバッガーを有効にする + + + + Enable SQ&L Server debugging + SQL Server デバッグを有効にする(&L) + + + + Enable the Visual Studio h&osting process + Visual Studio ホスティング プロセスを有効にする(&O) + + + + Enable &unmanaged code debugging + アンマネージ コード デバッグを有効にする(&U) + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/DebugPropPage.ko.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/DebugPropPage.ko.xlf new file mode 100644 index 00000000000..58af1520f50 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/DebugPropPage.ko.xlf @@ -0,0 +1,92 @@ + + + + + + Start Action + 시작 작업 + + + + &Start project + 시작 프로젝트(&S) + + + + Start e&xternal program: + 시작 외부 프로그램(&X): + + + + Program to start + 시작할 프로그램 + + + + Browse for external program + 외부 프로그램 찾아보기 + + + + ... + ... + + + + Start Options + 시작 옵션 + + + + Comma&nd line arguments: + 명령줄 인수(&N): + + + + Wor&king directory: + 작업 디렉터리(&K): + + + + Use remote m&achine + 원격 컴퓨터 사용(&A) + + + + Remote Machine Name: + 원격 컴퓨터 이름: + + + + Browse for working directory + 작업 디렉터리 찾아보기 + + + + ... + ... + + + + Enable Debuggers + 디버거 사용 + + + + Enable SQ&L Server debugging + SQL Server 디버깅 사용(&L) + + + + Enable the Visual Studio h&osting process + Visual Studio 호스팅 프로세스 사용(&O) + + + + Enable &unmanaged code debugging + 비관리 코드 디버깅 사용(&U) + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/DebugPropPage.pl.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/DebugPropPage.pl.xlf new file mode 100644 index 00000000000..bb6d9cc7666 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/DebugPropPage.pl.xlf @@ -0,0 +1,92 @@ + + + + + + Start Action + Akcja uruchamiania + + + + &Start project + &Uruchom projekt + + + + Start e&xternal program: + Uruchom program z&ewnętrzny: + + + + Program to start + Program do uruchomienia + + + + Browse for external program + Przeglądaj w poszukiwaniu programu zewnętrznego + + + + ... + ... + + + + Start Options + Opcje uruchamiania + + + + Comma&nd line arguments: + Argumenty wiersza pole&cenia: + + + + Wor&king directory: + Katalog ro&boczy: + + + + Use remote m&achine + Użyj m&aszyny zdalnej + + + + Remote Machine Name: + Nazwa maszyny zdalnej: + + + + Browse for working directory + Przeglądaj w poszukiwaniu katalogu roboczego + + + + ... + ... + + + + Enable Debuggers + Włącz debugery + + + + Enable SQ&L Server debugging + Włącz debugowanie programu SQ&L Server + + + + Enable the Visual Studio h&osting process + Włącz proces h&osta programu Visual Studio + + + + Enable &unmanaged code debugging + Włącz deb&ugowanie kodu niezarządzanego + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/DebugPropPage.pt-BR.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/DebugPropPage.pt-BR.xlf new file mode 100644 index 00000000000..e9c3aa64ff7 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/DebugPropPage.pt-BR.xlf @@ -0,0 +1,92 @@ + + + + + + Start Action + Iniciar Ação + + + + &Start project + &Iniciar projeto + + + + Start e&xternal program: + Iniciar programa e&xterno: + + + + Program to start + Programa para iniciar + + + + Browse for external program + Procurar programa externo + + + + ... + ... + + + + Start Options + Opções de Inicialização + + + + Comma&nd line arguments: + Argumentos de linha de coma&ndo: + + + + Wor&king directory: + Diretório de &trabalho: + + + + Use remote m&achine + Us&ar computador remoto + + + + Remote Machine Name: + Nome do Computador Remoto: + + + + Browse for working directory + Procurar diretório de trabalho + + + + ... + ... + + + + Enable Debuggers + Habilitar Depuradores + + + + Enable SQ&L Server debugging + Habilitar depuração do SQ&L Server + + + + Enable the Visual Studio h&osting process + Habilitar o processo de h&ospedagem do Visual Studio + + + + Enable &unmanaged code debugging + Habilitar depuração de código &não gerenciado + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/DebugPropPage.ru.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/DebugPropPage.ru.xlf new file mode 100644 index 00000000000..e6efd612b58 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/DebugPropPage.ru.xlf @@ -0,0 +1,92 @@ + + + + + + Start Action + Действие при запуске + + + + &Start project + &Запустить проект + + + + Start e&xternal program: + &Запуск внешней программы: + + + + Program to start + Программа для запуска + + + + Browse for external program + Выбор внешней программы + + + + ... + ... + + + + Start Options + Параметры запуска + + + + Comma&nd line arguments: + &Аргументы командной строки: + + + + Wor&king directory: + Ра&бочий каталог: + + + + Use remote m&achine + Использовать удаленный &компьютер + + + + Remote Machine Name: + Имя удаленного компьютера: + + + + Browse for working directory + Выбор рабочего каталога + + + + ... + ... + + + + Enable Debuggers + Включение отладчиков + + + + Enable SQ&L Server debugging + &Включить отладку SQL Server + + + + Enable the Visual Studio h&osting process + Включить ведущий &процесс Visual Studio + + + + Enable &unmanaged code debugging + Включить отладку &неуправляемого кода + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/DebugPropPage.tr.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/DebugPropPage.tr.xlf new file mode 100644 index 00000000000..ba949c79550 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/DebugPropPage.tr.xlf @@ -0,0 +1,92 @@ + + + + + + Start Action + Eylemi Başlat + + + + &Start project + &Projeyi başlat + + + + Start e&xternal program: + &Dış programı başlat: + + + + Program to start + Başlatılacak Program + + + + Browse for external program + Dış programa gözat + + + + ... + ... + + + + Start Options + Başlatma Seçenekleri + + + + Comma&nd line arguments: + &Komut satırı bağımsız değişkenleri: + + + + Wor&king directory: + Çalış&ma dizini: + + + + Use remote m&achine + Uzak m&akine kullan + + + + Remote Machine Name: + Uzak Makine Adı: + + + + Browse for working directory + Çalışma dizinine gözat + + + + ... + ... + + + + Enable Debuggers + Hata Ayıklayıcıları Etkinleştir + + + + Enable SQ&L Server debugging + SQ&L Server üzerinde hata ayıklamayı etkinleştir + + + + Enable the Visual Studio h&osting process + Visual Studi&o barındırma işlemini etkinleştir + + + + Enable &unmanaged code debugging + &Yönetilmeyen kodda hata ayıklamayı etkinleştir + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/DebugPropPage.zh-Hans.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/DebugPropPage.zh-Hans.xlf new file mode 100644 index 00000000000..62204f8c922 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/DebugPropPage.zh-Hans.xlf @@ -0,0 +1,92 @@ + + + + + + Start Action + 启动操作 + + + + &Start project + 启动项目(&S) + + + + Start e&xternal program: + 启动外部程序(&X): + + + + Program to start + 要启动的程序 + + + + Browse for external program + 浏览外部程序 + + + + ... + ... + + + + Start Options + 启动选项 + + + + Comma&nd line arguments: + 命令行参数(&N): + + + + Wor&king directory: + 工作目录(&K): + + + + Use remote m&achine + 使用远程计算机(&A) + + + + Remote Machine Name: + 远程计算机名称: + + + + Browse for working directory + 浏览工作目录 + + + + ... + ... + + + + Enable Debuggers + 启用调试程序 + + + + Enable SQ&L Server debugging + 启用 SQL Server 调试(&L) + + + + Enable the Visual Studio h&osting process + 启用 Visual Studio 承载进程(&O) + + + + Enable &unmanaged code debugging + 启用非托管代码调试(&U) + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/DebugPropPage.zh-Hant.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/DebugPropPage.zh-Hant.xlf new file mode 100644 index 00000000000..8363b99591c --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/DebugPropPage.zh-Hant.xlf @@ -0,0 +1,92 @@ + + + + + + Start Action + 起始動作 + + + + &Start project + 起始專案(&S) + + + + Start e&xternal program: + 起始外部程式(&X): + + + + Program to start + 要啟動的程式 + + + + Browse for external program + 瀏覽外部程式 + + + + ... + ... + + + + Start Options + 起始選項 + + + + Comma&nd line arguments: + 命令列的引數(&N): + + + + Wor&king directory: + 工作目錄(&K): + + + + Use remote m&achine + 使用遠端電腦(&A) + + + + Remote Machine Name: + 遠端電腦名稱: + + + + Browse for working directory + 瀏覽工作目錄 + + + + ... + ... + + + + Enable Debuggers + 啟用偵錯工具 + + + + Enable SQ&L Server debugging + 啟用 SQL Server 偵錯(&L) + + + + Enable the Visual Studio h&osting process + 啟用 Visual Studio 裝載處理序(&O) + + + + Enable &unmanaged code debugging + 啟用非受控程式碼偵錯(&U) + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/FSharpApplicationPropPage.cs.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/FSharpApplicationPropPage.cs.xlf new file mode 100644 index 00000000000..da8356eaccf --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/FSharpApplicationPropPage.cs.xlf @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/FSharpApplicationPropPage.de.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/FSharpApplicationPropPage.de.xlf new file mode 100644 index 00000000000..5e5a3f8171e --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/FSharpApplicationPropPage.de.xlf @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/FSharpApplicationPropPage.en.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/FSharpApplicationPropPage.en.xlf new file mode 100644 index 00000000000..c5f95fd86ec --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/FSharpApplicationPropPage.en.xlf @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/FSharpApplicationPropPage.es.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/FSharpApplicationPropPage.es.xlf new file mode 100644 index 00000000000..91cf9fa3eaf --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/FSharpApplicationPropPage.es.xlf @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/FSharpApplicationPropPage.fr.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/FSharpApplicationPropPage.fr.xlf new file mode 100644 index 00000000000..a8b6295cb90 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/FSharpApplicationPropPage.fr.xlf @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/FSharpApplicationPropPage.it.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/FSharpApplicationPropPage.it.xlf new file mode 100644 index 00000000000..cfdce486ce6 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/FSharpApplicationPropPage.it.xlf @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/FSharpApplicationPropPage.ja.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/FSharpApplicationPropPage.ja.xlf new file mode 100644 index 00000000000..57dbb9984f3 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/FSharpApplicationPropPage.ja.xlf @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/FSharpApplicationPropPage.ko.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/FSharpApplicationPropPage.ko.xlf new file mode 100644 index 00000000000..0b94ecf667d --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/FSharpApplicationPropPage.ko.xlf @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/FSharpApplicationPropPage.pl.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/FSharpApplicationPropPage.pl.xlf new file mode 100644 index 00000000000..88dbe2ea933 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/FSharpApplicationPropPage.pl.xlf @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/FSharpApplicationPropPage.pt-BR.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/FSharpApplicationPropPage.pt-BR.xlf new file mode 100644 index 00000000000..3f1021a1a78 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/FSharpApplicationPropPage.pt-BR.xlf @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/FSharpApplicationPropPage.ru.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/FSharpApplicationPropPage.ru.xlf new file mode 100644 index 00000000000..a6d8a4ff998 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/FSharpApplicationPropPage.ru.xlf @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/FSharpApplicationPropPage.tr.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/FSharpApplicationPropPage.tr.xlf new file mode 100644 index 00000000000..4c77759a6c2 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/FSharpApplicationPropPage.tr.xlf @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/FSharpApplicationPropPage.zh-Hans.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/FSharpApplicationPropPage.zh-Hans.xlf new file mode 100644 index 00000000000..d129b4c9825 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/FSharpApplicationPropPage.zh-Hans.xlf @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/FSharpApplicationPropPage.zh-Hant.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/FSharpApplicationPropPage.zh-Hant.xlf new file mode 100644 index 00000000000..2c99d669030 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/FSharpApplicationPropPage.zh-Hant.xlf @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageHostDialog.cs.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageHostDialog.cs.xlf new file mode 100644 index 00000000000..9fcb5feb91a --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageHostDialog.cs.xlf @@ -0,0 +1,22 @@ + + + + + + OK + OK + + + + Cancel + Zrušit + + + + PropPageHostDialog + PropPageHostDialog + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageHostDialog.de.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageHostDialog.de.xlf new file mode 100644 index 00000000000..e35db629104 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageHostDialog.de.xlf @@ -0,0 +1,22 @@ + + + + + + OK + OK + + + + Cancel + Abbrechen + + + + PropPageHostDialog + PropPageHostDialog + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageHostDialog.en.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageHostDialog.en.xlf new file mode 100644 index 00000000000..dc4b04c9e09 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageHostDialog.en.xlf @@ -0,0 +1,22 @@ + + + + + + OK + OK + + + + Cancel + Cancel + + + + PropPageHostDialog + PropPageHostDialog + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageHostDialog.es.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageHostDialog.es.xlf new file mode 100644 index 00000000000..878c944cd3b --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageHostDialog.es.xlf @@ -0,0 +1,22 @@ + + + + + + OK + Aceptar + + + + Cancel + Cancelar + + + + PropPageHostDialog + PropPageHostDialog + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageHostDialog.fr.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageHostDialog.fr.xlf new file mode 100644 index 00000000000..a50f390374c --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageHostDialog.fr.xlf @@ -0,0 +1,22 @@ + + + + + + OK + OK + + + + Cancel + Annuler + + + + PropPageHostDialog + PropPageHostDialog + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageHostDialog.it.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageHostDialog.it.xlf new file mode 100644 index 00000000000..f7f2c8a3adc --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageHostDialog.it.xlf @@ -0,0 +1,22 @@ + + + + + + OK + OK + + + + Cancel + Annulla + + + + PropPageHostDialog + PropPageHostDialog + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageHostDialog.ja.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageHostDialog.ja.xlf new file mode 100644 index 00000000000..d4d314ddee0 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageHostDialog.ja.xlf @@ -0,0 +1,22 @@ + + + + + + OK + OK + + + + Cancel + キャンセル + + + + PropPageHostDialog + PropPageHostDialog + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageHostDialog.ko.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageHostDialog.ko.xlf new file mode 100644 index 00000000000..d17247b81e3 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageHostDialog.ko.xlf @@ -0,0 +1,22 @@ + + + + + + OK + 확인 + + + + Cancel + 취소 + + + + PropPageHostDialog + PropPageHostDialog + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageHostDialog.pl.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageHostDialog.pl.xlf new file mode 100644 index 00000000000..170199c9055 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageHostDialog.pl.xlf @@ -0,0 +1,22 @@ + + + + + + OK + OK + + + + Cancel + Anuluj + + + + PropPageHostDialog + PropPageHostDialog + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageHostDialog.pt-BR.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageHostDialog.pt-BR.xlf new file mode 100644 index 00000000000..b8d2524a06e --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageHostDialog.pt-BR.xlf @@ -0,0 +1,22 @@ + + + + + + OK + OK + + + + Cancel + Cancelar + + + + PropPageHostDialog + PropPageHostDialog + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageHostDialog.ru.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageHostDialog.ru.xlf new file mode 100644 index 00000000000..0be5d4aaa0b --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageHostDialog.ru.xlf @@ -0,0 +1,22 @@ + + + + + + OK + ОК + + + + Cancel + Отмена + + + + PropPageHostDialog + PropPageHostDialog + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageHostDialog.tr.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageHostDialog.tr.xlf new file mode 100644 index 00000000000..6ef96b01cd7 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageHostDialog.tr.xlf @@ -0,0 +1,22 @@ + + + + + + OK + Tamam + + + + Cancel + İptal + + + + PropPageHostDialog + PropPageHostDialog + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageHostDialog.zh-Hans.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageHostDialog.zh-Hans.xlf new file mode 100644 index 00000000000..938d6024a47 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageHostDialog.zh-Hans.xlf @@ -0,0 +1,22 @@ + + + + + + OK + 确定 + + + + Cancel + 取消 + + + + PropPageHostDialog + PropPageHostDialog + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageHostDialog.zh-Hant.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageHostDialog.zh-Hant.xlf new file mode 100644 index 00000000000..a0ae25961e9 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageHostDialog.zh-Hant.xlf @@ -0,0 +1,22 @@ + + + + + + OK + 確定 + + + + Cancel + 取消 + + + + PropPageHostDialog + PropPageHostDialog + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageUserControlBase.cs.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageUserControlBase.cs.xlf new file mode 100644 index 00000000000..c8e5b7cd36a --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageUserControlBase.cs.xlf @@ -0,0 +1,12 @@ + + + + + + PropPageUserControlBase + PropPageUserControlBase + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageUserControlBase.de.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageUserControlBase.de.xlf new file mode 100644 index 00000000000..094d10306c8 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageUserControlBase.de.xlf @@ -0,0 +1,12 @@ + + + + + + PropPageUserControlBase + PropPageUserControlBase + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageUserControlBase.en.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageUserControlBase.en.xlf new file mode 100644 index 00000000000..62d55cf3f27 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageUserControlBase.en.xlf @@ -0,0 +1,12 @@ + + + + + + PropPageUserControlBase + PropPageUserControlBase + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageUserControlBase.es.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageUserControlBase.es.xlf new file mode 100644 index 00000000000..e7acc7bb0d7 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageUserControlBase.es.xlf @@ -0,0 +1,12 @@ + + + + + + PropPageUserControlBase + PropPageUserControlBase + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageUserControlBase.fr.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageUserControlBase.fr.xlf new file mode 100644 index 00000000000..679f951b73e --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageUserControlBase.fr.xlf @@ -0,0 +1,12 @@ + + + + + + PropPageUserControlBase + PropPageUserControlBase + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageUserControlBase.it.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageUserControlBase.it.xlf new file mode 100644 index 00000000000..916621220c2 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageUserControlBase.it.xlf @@ -0,0 +1,12 @@ + + + + + + PropPageUserControlBase + PropPageUserControlBase + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageUserControlBase.ja.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageUserControlBase.ja.xlf new file mode 100644 index 00000000000..c960d267e5d --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageUserControlBase.ja.xlf @@ -0,0 +1,12 @@ + + + + + + PropPageUserControlBase + PropPageUserControlBase + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageUserControlBase.ko.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageUserControlBase.ko.xlf new file mode 100644 index 00000000000..70df964d9ce --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageUserControlBase.ko.xlf @@ -0,0 +1,12 @@ + + + + + + PropPageUserControlBase + PropPageUserControlBase + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageUserControlBase.pl.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageUserControlBase.pl.xlf new file mode 100644 index 00000000000..209f6014fd6 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageUserControlBase.pl.xlf @@ -0,0 +1,12 @@ + + + + + + PropPageUserControlBase + PropPageUserControlBase + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageUserControlBase.pt-BR.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageUserControlBase.pt-BR.xlf new file mode 100644 index 00000000000..c5a93a9e71b --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageUserControlBase.pt-BR.xlf @@ -0,0 +1,12 @@ + + + + + + PropPageUserControlBase + PropPageUserControlBase + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageUserControlBase.ru.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageUserControlBase.ru.xlf new file mode 100644 index 00000000000..43cf83e3fcb --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageUserControlBase.ru.xlf @@ -0,0 +1,12 @@ + + + + + + PropPageUserControlBase + PropPageUserControlBase + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageUserControlBase.tr.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageUserControlBase.tr.xlf new file mode 100644 index 00000000000..d6e2d953f71 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageUserControlBase.tr.xlf @@ -0,0 +1,12 @@ + + + + + + PropPageUserControlBase + PropPageUserControlBase + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageUserControlBase.zh-Hans.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageUserControlBase.zh-Hans.xlf new file mode 100644 index 00000000000..b6177ce4c46 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageUserControlBase.zh-Hans.xlf @@ -0,0 +1,12 @@ + + + + + + PropPageUserControlBase + PropPageUserControlBase + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageUserControlBase.zh-Hant.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageUserControlBase.zh-Hant.xlf new file mode 100644 index 00000000000..2984ef0687a --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/PropPageUserControlBase.zh-Hant.xlf @@ -0,0 +1,12 @@ + + + + + + PropPageUserControlBase + PropPageUserControlBase + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ReferencePathsPropPage.cs.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ReferencePathsPropPage.cs.xlf new file mode 100644 index 00000000000..c3e2c3f0a18 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ReferencePathsPropPage.cs.xlf @@ -0,0 +1,52 @@ + + + + + + &Add Folder + Přid&at složku + + + + &Update + &Aktualizovat + + + + Reference &paths: + Cesty &odkazů: + + + + Browse + Procházet + + + + ... + ... + + + + Move up + Přesunout nahoru + + + + Move down + Přesunout dolů + + + + Delete + Odstranit + + + + &Folder: + Slož&ka: + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ReferencePathsPropPage.de.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ReferencePathsPropPage.de.xlf new file mode 100644 index 00000000000..494cdfc5c08 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ReferencePathsPropPage.de.xlf @@ -0,0 +1,52 @@ + + + + + + &Add Folder + &Ordner hinzufügen + + + + &Update + Akt&ualisieren + + + + Reference &paths: + Verweis&pfade: + + + + Browse + Durchsuchen + + + + ... + ... + + + + Move up + Nach oben + + + + Move down + Nach unten + + + + Delete + Löschen + + + + &Folder: + &Ordner: + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ReferencePathsPropPage.en.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ReferencePathsPropPage.en.xlf new file mode 100644 index 00000000000..434bd5f5883 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ReferencePathsPropPage.en.xlf @@ -0,0 +1,52 @@ + + + + + + &Add Folder + &Add Folder + + + + &Update + &Update + + + + Reference &paths: + Reference &paths: + + + + Browse + Browse + + + + ... + ... + + + + Move up + Move up + + + + Move down + Move down + + + + Delete + Delete + + + + &Folder: + &Folder: + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ReferencePathsPropPage.es.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ReferencePathsPropPage.es.xlf new file mode 100644 index 00000000000..f93118c9d9e --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ReferencePathsPropPage.es.xlf @@ -0,0 +1,52 @@ + + + + + + &Add Folder + &Agregar carpeta + + + + &Update + &Actualizar + + + + Reference &paths: + &Rutas de acceso de referencia: + + + + Browse + Examinar + + + + ... + ... + + + + Move up + Subir + + + + Move down + Bajar + + + + Delete + Eliminar + + + + &Folder: + &Carpeta: + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ReferencePathsPropPage.fr.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ReferencePathsPropPage.fr.xlf new file mode 100644 index 00000000000..96d2c49eb32 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ReferencePathsPropPage.fr.xlf @@ -0,0 +1,52 @@ + + + + + + &Add Folder + &Ajouter un dossier + + + + &Update + &Mettre à jour + + + + Reference &paths: + C&hemins d'accès des références : + + + + Browse + Parcourir + + + + ... + ... + + + + Move up + Monter + + + + Move down + Descendre + + + + Delete + Supprimer + + + + &Folder: + &Dossier : + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ReferencePathsPropPage.it.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ReferencePathsPropPage.it.xlf new file mode 100644 index 00000000000..9ee4b7f053a --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ReferencePathsPropPage.it.xlf @@ -0,0 +1,52 @@ + + + + + + &Add Folder + &Aggiungi cartella + + + + &Update + Aggi&orna + + + + Reference &paths: + &Percorsi del riferimento: + + + + Browse + Sfoglia + + + + ... + ... + + + + Move up + Sposta su + + + + Move down + Sposta giù + + + + Delete + Elimina + + + + &Folder: + Carte&lla: + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ReferencePathsPropPage.ja.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ReferencePathsPropPage.ja.xlf new file mode 100644 index 00000000000..2ee13151176 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ReferencePathsPropPage.ja.xlf @@ -0,0 +1,52 @@ + + + + + + &Add Folder + フォルダーの追加(&A) + + + + &Update + 更新(&U) + + + + Reference &paths: + 参照パス(&P): + + + + Browse + ブラウザー + + + + ... + ... + + + + Move up + 上へ移動 + + + + Move down + 下へ移動 + + + + Delete + 削除 + + + + &Folder: + フォルダー(&F): + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ReferencePathsPropPage.ko.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ReferencePathsPropPage.ko.xlf new file mode 100644 index 00000000000..02369eb5f01 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ReferencePathsPropPage.ko.xlf @@ -0,0 +1,52 @@ + + + + + + &Add Folder + 폴더 추가(&A) + + + + &Update + 업데이트(&U) + + + + Reference &paths: + 참조 경로(&P): + + + + Browse + 찾아보기 + + + + ... + ... + + + + Move up + 위로 이동 + + + + Move down + 아래로 이동 + + + + Delete + 삭제 + + + + &Folder: + 폴더(&F): + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ReferencePathsPropPage.pl.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ReferencePathsPropPage.pl.xlf new file mode 100644 index 00000000000..708a2d14223 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ReferencePathsPropPage.pl.xlf @@ -0,0 +1,52 @@ + + + + + + &Add Folder + &Dodaj folder + + + + &Update + &Aktualizuj + + + + Reference &paths: + Ścieżki &odwołania: + + + + Browse + Przeglądaj + + + + ... + ... + + + + Move up + Przesuń w górę + + + + Move down + Przesuń w dół + + + + Delete + Usuń + + + + &Folder: + &Folder: + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ReferencePathsPropPage.pt-BR.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ReferencePathsPropPage.pt-BR.xlf new file mode 100644 index 00000000000..2fe1e1a6063 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ReferencePathsPropPage.pt-BR.xlf @@ -0,0 +1,52 @@ + + + + + + &Add Folder + &Adicionar Pasta + + + + &Update + &Atualizar + + + + Reference &paths: + Caminho&s de referência: + + + + Browse + Procurar + + + + ... + ... + + + + Move up + Mover para cima + + + + Move down + Mover para baixo + + + + Delete + Excluir + + + + &Folder: + &Pasta: + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ReferencePathsPropPage.ru.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ReferencePathsPropPage.ru.xlf new file mode 100644 index 00000000000..40d3ac6c348 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ReferencePathsPropPage.ru.xlf @@ -0,0 +1,52 @@ + + + + + + &Add Folder + Добавить &папку + + + + &Update + &Обновить + + + + Reference &paths: + &Пути для ссылок: + + + + Browse + Обзор + + + + ... + ... + + + + Move up + Вверх + + + + Move down + Вниз + + + + Delete + Удаление. + + + + &Folder: + &Папка: + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ReferencePathsPropPage.tr.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ReferencePathsPropPage.tr.xlf new file mode 100644 index 00000000000..05e5266da15 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ReferencePathsPropPage.tr.xlf @@ -0,0 +1,52 @@ + + + + + + &Add Folder + &Klasör Ekle + + + + &Update + &Güncelleştir + + + + Reference &paths: + Başvuru &yolları: + + + + Browse + Gözat + + + + ... + ... + + + + Move up + Yukarı taşı + + + + Move down + Aşağı taşı + + + + Delete + Sil + + + + &Folder: + &Klasör: + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ReferencePathsPropPage.zh-Hans.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ReferencePathsPropPage.zh-Hans.xlf new file mode 100644 index 00000000000..c5195f9a2a7 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ReferencePathsPropPage.zh-Hans.xlf @@ -0,0 +1,52 @@ + + + + + + &Add Folder + 添加文件夹(&A) + + + + &Update + 更新(&U) + + + + Reference &paths: + 引用路径(&P): + + + + Browse + 浏览 + + + + ... + ... + + + + Move up + 上移 + + + + Move down + 下移 + + + + Delete + 删除 + + + + &Folder: + 文件夹(&F): + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ReferencePathsPropPage.zh-Hant.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ReferencePathsPropPage.zh-Hant.xlf new file mode 100644 index 00000000000..910e618c7d0 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/PropertyPages/xlf/ReferencePathsPropPage.zh-Hant.xlf @@ -0,0 +1,52 @@ + + + + + + &Add Folder + 新增資料夾(&A) + + + + &Update + 更新(&U) + + + + Reference &paths: + 參考路徑(&P): + + + + Browse + 瀏覽 + + + + ... + ... + + + + Move up + 上移 + + + + Move down + 下移 + + + + Delete + 刪除 + + + + &Folder: + 資料夾(&F): + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/Microsoft.VisualStudio.Editors.Designer.resx b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/Microsoft.VisualStudio.Editors.Designer.resx index c902b71c062..b6c6a8091ed 100644 --- a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/Microsoft.VisualStudio.Editors.Designer.resx +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/Microsoft.VisualStudio.Editors.Designer.resx @@ -2025,12 +2025,6 @@ Do you want to update the value in the .settings file? Specify a connection string to a SQL Server database, or use the special connection string "Data Source = |SQL/CE|", which causes SQL Server Compact to generate local database files for offline storage. - - Application (Web) - - - User (Web) - The following type names were not understood: '{0}'. Make sure you have references to these types. diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.cs.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.cs.xlf new file mode 100644 index 00000000000..0011f9be1cb --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.cs.xlf @@ -0,0 +1,2948 @@ + + + + + + All Files + Všechny soubory + + + + Property Page + Stránka vlastností + + + + References + Odkazy + + + + Version + Verze + + + + Signing + Podepsání + + + + Application + Aplikace + + + + Compile + Kompilovat + + + + Debug + Ladit + + + + Deploy + Nasadit + + + + Database + Databáze + + + + Security + Zabezpečení + + + + Build + Sestavení + + + + Build Events + Události sestavení + + + + Reference Paths + Cesty odkazů + + + + Pre-build Event Command Line + Příkazový řádek události před sestavením + + + + Post-build Event Command Line + Příkazový řádek události po sestavení + + + + The output path is not trusted. +The application may throw security exceptions when it attempts to perform actions which require full trust. +Click OK to ignore and continue. Click CANCEL to choose a different output path. + Cesta výstupu není důvěryhodná. +Při pokusech o provedení akcí vyžadujících úplný vztah důvěryhodnosti může v aplikaci docházet k bezpečnostním výjimkám. +Pokud chcete tento stav ignorovat a pokračovat v operaci , klikněte na OK. Pokud chcete vybrat jinou cestu výstupu, klikněte na Zrušit. + + + + <Browse...> + <procházet...> + + + + (None) + (žádné) + + + + <New...> + <nové...> + + + + <Browse...> + <procházet...> + + + + (None) + (žádné) + + + + Active ({0}) + Aktivní ({0}) + + + + All Configurations + Všechny konfigurace + + + + All Platforms + Všechny platformy + + + + N/A + Není k dispozici + This is used in the platform and configuration comboboxes when showing pages that don't care about the current platform/configuration + + + Could not find the configuration '{0}' for platform '{1}'. + Konfigurace {0} pro platformu {1} se nenašla. + + + + (None) + (žádné) + + + + Select File + Vybrat soubor + + + + Add existing file to project + Přidat existující soubor do projektu + + + + Icon Files + Soubory ikon + + + + Executable Files + Spustitelné soubory + + + + Select Working Directory + Vybrat pracovní adresář + + + + Select Output Path + Vybrat cestu výstupu + + + + Select Reference Path + Vybrat cestu k odkazu + + + + Win32 Resource Files + Soubory prostředků Win32 + + + + Add Win32 resource file to project + Přidat soubor prostředků Win32 do projektu + + + + Folder path does not exist. +Please select a valid folder path. + Cesta ke složce neexistuje. +Vyberte prosím platnou cestu ke složce. + + + + Advanced Compiler Settings + Pokročilé nastavení kompilátoru + + + + Advanced Build Settings + Pokročilé nastavení sestavení + + + + Compiler Warnings + Upozornění kompilátoru + + + + Reference Paths + Cesty odkazů + + + + Compatible Settings + Kompatibilní nastavení + + + + Assembly Information + Informace o sestavení + + + + Invalid version format, expected "[Major]", "[Major].[Minor]", "[Major].[Minor].[Build]" or "[Major].[Minor].[Build].[Revision]" + Neplatný formát verze, očekává se [Major], [Major].[Minor], [Major].[Minor].[Build] nebo [Major].[Minor].[Build].[Revision]. + + + + A wildcard ("*") is not allowed in this field. + Zástupný znak (*) není v tomto poli povolený. + + + + Each part of the version number for '{0}' must be an integer between 0 and {1}. + Každá část čísla verze {0} musí být celočíselná hodnota z intervalu 0 až {1}. + + + + (Default Icon) + (Výchozí ikona) + + + + Startup object must be a form when 'Enable application framework' is checked. + Pokud jste zaškrtli Povolit rozhraní Framework aplikace, spouštěcí objekt musí být formulář. + + + + (Not set) + (nenastaveno) + + + + Icon could not be added to the project. + Ikona se do projektu nedá přidat. + + + + Invalid icon file. + Neplatný soubor ikony. + + + + {0} is not a valid icon file. + {0} není platným souborem ikony. + + + + The GUID should match the format dddddddd-dddd-dddd-dddd-dddddddddddd. + Identifikátor GUID by měl odpovídat formátu dddddddd-dddd-dddd-dddd-dddddddddddd. + + + + NOTE: This file is auto-generated; do not modify it directly. To make changes, + POZNÁMKA: Neměňte přímo tento soubor, protože se generuje automaticky. Pokud chcete provést změny, + These comments are placed in the ApplicationEvents.vb file if it is generated by the project designer. The same comments appear in the templates, under vsproject\Templates\Windows\VisualBasic\ProjectTemplates\WindowsApplication\MyEvents.vb (MyEvents.vb is renamed to ApplicationEvents.vb after project creation), and these comments should be kept in sync + + + or if you encounter build errors in this file, go to the Project Designer + nebo pokud dojde v tomto souboru k chybám sestavení, jděte do návrháře projektu + + + + (go to Project Properties or double-click the My Project node in + (přejděte na vlastnosti projektu, nebo dvakrát klikněte na uzel Můj projekt v + + + + Solution Explorer), and make changes on the Application tab. + průzkumníku řešení), a proveďte změny v kartě Aplikace. + + + + '{0}' is not a valid identifier. Please select a different Startup form. + {0} není platný identifikátor. Vyberte prosím jiný úvodní formulář. + + + + '{0}' is not a valid identifier. Please select a different Splash screen form. + {0} není platný identifikátor. Vyberte prosím jiný formulář úvodní obrazovky. + + + + The splash screen form cannot be the start-up form. + Z úvodní obrazovky neleze vytvořit úvodní formulář. + + + + Startup f&orm: + Úv&odní formulář: + + + + The following events are available for MyApplication: + Pro MyApplication jsou dostupné následující události: + + + + Startup: Raised when the application starts, before the startup form is created. + Úvodní: Volá se při spouštění aplikace, před vytvořením úvodního formuláře. + + + + Shutdown: Raised after all application forms are closed. This event is not raised if the application terminates abnormally. + Závěrečný: Volá se po zavření všech formulářů aplikací. V případě nestandardního ukončení aplikace se tato událost nevolá. + + + + UnhandledException: Raised if the application encounters an unhandled exception. + UnhandledException: Volá se, když v aplikaci dojde k neošetřené výjimce. + + + + StartupNextInstance: Raised when launching a single-instance application and the application is already active. + StartupNextInstance: Volá se při spuštění aplikace s jednou instancí, pokud už je aplikace aktivní. + + + + NetworkAvailabilityChanged: Raised when the network connection is connected or disconnected. + NetworkAvailabilityChanged: Volá se při připojení k síti nebo odpojení od sítě. + + + + Base address must be a hexadecimal number with less than or equal to 8 digits, for example, 0x11000000. + Základní adresa musí být šestnáctkové číslo maximálně s osmi číslicemi, např. 0x11000000. + + + + None + Žádné + + + + Warning + Upozornění + + + + Error + Chyba + + + + (custom) + (vlastní) + + + + Implicit conversion + Implicitní převod + + + + Late binding; call could fail at run time + Pozdní vazba. Volání může při běhu selhat. + + + + Implicit type; object assumed + Implicitní typ; předpokládaný objekt + + + + Use of variable prior to assignment + Použití proměnné před přiřazením + + + + Function/Operator without return value + Funkce nebo operátor bez návratové hodnoty + + + + Unused local variable + Nepoužitá lokální proměnná + + + + Instance variable accesses shared member + Proměnná instance přistupuje ke sdílenému členu. + + + + Recursive operator or property access + Rekurzivní operátor nebo přístup k vlastnosti + + + + Duplicate or overlapping catch blocks + Duplicitní nebo překrývající se bloky catch + + + + The warning settings for one or more configurations conflict. +Changing this setting will reset the settings in all configurations. + Nastavení upozornění pro jednu nebo více konfigurací koliduje. +Změnou tohoto nastavení dojde k resetování nastavení ve všech konfiguracích. + + + + When startup form closes + Když se zavře úvodní formulář + + + + When last form closes + Když se zavře poslední formulář + + + + Windows + Windows + Authentication modes + + + Application-defined + Definované aplikací + Authentication modes + + + Cancel + Zrušit + + + + &Calculate Permissions + &Vypočítat oprávnění + + + + Stopped... + Zastaveno... + + + + Starting... + Spouštění... + + + + Building... + Sestavování... + + + + Analyzing... + Analyzování... + + + + Analyze Failed + Analýza nebyla úspěšná + + + + Aborting... + Přerušování... + + + + Canceling... + Zrušení... + + + + Internet + Internet + + + + Local Intranet + Místní intranet + + + + (Custom) + (vlastní) + Don't use + + + (Zone Default) + (výchozí zóna) + + + + Include + Zahrnout + + + + Exclude + Vyloučit + + + + The application will require elevated permissions to run in the selected zone. Click the help link above for more info. + Ke spuštění aplikace ve vybrané zóně je potřeba vyšší oprávnění. Další informace získáte, když kliknete na odkaz na nápovědu. + + + + This permission could not be loaded. Press the delete key to remove it from your project. + Oprávnění se nepodařilo načíst. Stisknutím klávesy Odstranit ho odeberete z projektu. + Don't use + + + Included + Zahrnuto + + + + Permission + Oprávnění + + + + Setting + Nastavení + + + + Specify the code access security permissions that your ClickOnce application requires in order to run. Learn more about code access security... + Zadejte oprávnění zabezpečující přístup ke kódu, které aplikace ClickOnce vyžaduje ke spuštění. Další informace o zabezpečení přístupu ke kódu... + + + + Learn more about code access security... + Další informace o zabezpečení přístupu ke kódu... + + + + Invalid value + Neplatná hodnota + + + + The SecurityPermission must be included in your application with the Execute flag set or your application will not run. Mark this permission as "Zone Default" or "Include." + Aplikace musí zahrnovat oprávnění SecurityPermission s nastaveným příznakem Execute, jinak nepoběží. Označte toto oprávnění jako „Výchozí zóna“ nebo „Zahrnout“. + + + + The SecurityPermission must be included in your application with the Execute flag set or your application will not run. The Execute flag has been added to the SecurityPermission in your manifest. + Aplikace musí zahrnovat oprávnění SecurityPermission s nastaveným příznakem Execute, jinak nepoběží. K oprávnění SecurityPermission byl v manifestu přidán příznak Execute. + + + + This application requires full trust to run correctly. Would you like to set this as a full trust application? + Aplikace vyžaduje pro správný běh plnou důvěru. Chcete ji nastavit jako důvěryhodnou aplikaci? + + + + Full Trust Required + Vyžaduje plnou důvěru + + + + An error occurred and the app.manifest file could not be saved. +Error: + Došlo k chybě a soubor app.manifest se nepodařilo uložit. +Chyba: + + + + An error occurred and the app.manifest file could not be loaded. Please remove any changes you have made to the file and reload the Security property page again. + Došlo k chybě a soubor app.manifest se nepodařilo načíst. Odeberte prosím změny, které jste provedli v souboru, a znovu načtěte stránku s vlastnostmi zabezpečení. + + + + Included + Zahrnuto + + + + Not Included + Nezahrnuto + + + + Included with warning + Zahrnuto s upozorněním + + + + Calculating permissions failed. + Výpočet oprávnění se nezdařil. + + + + Error + Chyba + + + + Advanced Security Settings + Upřesnit nastavení zabezpečení + + + + Build Failed. Click CANCEL and correct the build failure before analyzing again. + Sestavení se nezdařilo. Klikněte na ZRUŠIT a před další analýzou opravte chybu sestavení. + + + + Build completed... + Sestavení je hotové... + + + + Unable to start the build. + Sestavení nelze spustit. + + + + Serious error. The build must begin in order to analyze permissions. It has not started. + Závažná chyba. Před analýzou oprávnění se musí provést sestavení, které ještě nezačalo. + Don't use + + + (Custom) + (vlastní) + Don't use + + + (None) + (žádné) + + + + Selecting existing key file + Výběr stávajícího souboru klíče + + + + Key Files + Soubory klíčů + + + + Create key file + Vytvořit soubor klíče + + + + The old password is invalid. + Původní heslo je neplatné. + + + + Enter the old password. + Zadejte staré heslo. + + + + Enter a new password. + Zadejte nové heslo. + + + + The new passwords do not match. Enter the password again. + Nová hesla se neshodují. Zadejte heslo znovu. + + + + The new password must be at least 6 characters in length. Enter the password again. + Nové heslo musí mít aspoň 6 znaků. Zadejte heslo znovu. + + + + Select a Certificate + Vyberte certifikát + + + + Select a certificate to sign your ClickOnce manifests + Vyberte prosím certifikát, kterým budou podepsány manifesty ClickOnce + + + + Certificate Files + Soubory certifikátů + + + + Issued To + Vystaven pro + + + + Issued By + Vydal + + + + Intended Purpose + Účel použití + + + + Expiration Date + Datum platnosti + + + + The password is invalid. + Heslo je neplatné. + + + + Invalid password + Neplatné heslo + + + + The selected file does not contain a private key. You must choose a certificate that contains a private key. + Vybraný soubor neobsahuje privátní klíč. Musíte vybrat certifikát, který obsahuje privátní klíč. + + + + Invalid key + Neplatný klíč + + + + Certificate Creation Error + Chyba při vytvoření certifikátu + + + + <All> + <Vše> + + + + The passwords do not match. + Hesla se neshodují. + + + + Enter a password. + Zadejte heslo. + + + + Confirm the password. + Potvrďte heslo. + + + + (none) + (žádné) + + + + Enter password to open file + Zadat heslo pro otevření souboru + + + + Enter &password to open file {0} + Zadejte heslo &pro otevření souboru {0} + + + + Enter &password for new file {0} + Zadejte heslo &pro nový soubor {0} + + + + The project already contains a file with that name. Choose another certificate file or rename the file in your project. + Soubor s tímto názvem už projekt obsahuje. Vyberte jiný soubor certifikátu nebo soubor v projektu přejmenujte. + + + + The file '{0}' could not be imported: {1} + Soubor {0} nejde naimportovat: {1} + + + + _TemporaryKey.pfx + _TemporaryKey.pfx + + + + The selected certificate is not valid for code signing. Choose another certificate file. + Vybraný certifikát nejde použít k podepisování kódu, protože je neplatný. Vyberte jiný soubor certifikátu. + + + + Change property: {0} + Změnit vlastnost: {0} + + + + Windows Application + Aplikace pro systém Windows + + + + Windows Service + Služba Windows + + + + Class Library + Knihovna tříd + + + + Console Application + Konzolová aplikace + + + + Web Control Library + Knihovna webových prvků + + + + Cannot remove '{0}'. {1} + + {0} nejde odebrat. {1} + + + + + Adding or removing '{0}' as a project import failed because of an unexpected error from the project system. The error returned was: '{1}'. + Přidání nebo odebrání {0} při importu projektu selhalo kvůli nečekané chybě systému projektu. Vrácená chyba: {1} + + + + Adding web reference failed. {0} + + Webový odkaz se nepodařilo přidat. {0} + + + + + Updating web reference '{0}' failed. +{1} + Webový odkaz {0} nejde aktualizovat. +{1} + + + + Web Reference Properties + Vlastnosti webového odkazu + + + + Static + Statický + + + + Dynamic + Dynamický + + + + Name of the web reference + Název webového odkazu + + + + URL Behavior + Chování URL + + + + Web reference URL behavior + Chování URL webového odkazu + + + + Web Reference URL + URL webového odkazu + + + + Web Reference URL + URL webového odkazu + + + + Reference Properties + Vlastnosti odkazu + + + + The remote machine name cannot be blank. Please specify the name of the machine to debug remotely. + Název vzdáleného počítače nesmí být prázdný. Zadejte prosím název vzdáleně laděného počítače. + + + + The external program cannot be found. Please enter a valid executable file. + Externí program se nedá najít. Zadejte prosím platný spustitelný soubor. + + + + The external program property cannot be empty. Please enter a valid executable file. + Vlastnost s externím programem nesmí být prázdná. Zadejte prosím platný spustitelný soubor. + + + + We can only debug an EXE file. Please enter a valid executable file. + Ladit jde jenom soubor EXE. Zadejte prosím platný spustitelný soubor. + + + + The URL property cannot be empty. Please enter a valid URL. + Vlastnost URL nesmí být prázdná. Zadejte platnou adresu URL. + + + + The URL is invalid. Please enter a valid URL like "http://www.microsoft.com/" + Adresa URL není platná. Zadejte prosím platnou adresu URL, třeba http://www.microsoft.com/. + + + + The working directory you entered does not exist. Please enter a valid working directory. + Zadaný pracovní adresář neexistuje. Zadejte prosím platný pracovní adresář. + + + + <The system cannot find the reference specified> + <Systému se nepovedlo najít zadané odkazy.> + + + + Unused References + Nepoužité odkazy + + + + &Remove + Odeb&rat + + + + No unused references + Žádné nepoužité odkazy + + + + Project compilation failed. Cannot determine unused references. + Kompilace projektu se nezdařila. Nepoužité odkazy se nedají určit. + + + + Gathering list of unused references... + Shromažďuje se seznam nepoužitých odkazů... + + + + Error getting unused references. + Při zjišťování nepoužitých odkazů došlo k chybě. + + + + Base address must be a hexadecimal number with less than or equal to 8 digits, for example, &H11000000. + Základní adresa musí být hexadecimální číslo s osmi nebo méně číslicemi, např. &H11000000. + + + + "Resource files must have a .res file extension. Please enter a valid resource file name." + „Soubory prostředků musí mít příponu .res. Zadejte prosím platný název souboru prostředků.“ + + + + "The resource file entered does not exist." + "Zadaný soubor prostředků neexistuje." + + + + Project Designer + Návrhář projektu + + + + Settings + Nastavení + + + + Resources + Prostředky + + + + An error occurred trying to load the project properties window. Close the window and try again. +{0} + Při pokusu o načtení okna vlastností projektu došlo k chybě. Zavřete okno a zkuste to znovu. +{0} + + + + An error occurred trying to load the page. + Při pokusu o načtení stránky došlo k chybě. + + + + The designer cannot be shown because the document for it was never loaded. + Návrhář se nedá zobrazit, protože se pro něj ještě nenačetl dokument. + + + + This project does not contain a default resources file. Click here to create one. + Projekt neobsahuje soubor výchozích prostředků. Kliknutím ho vytvořte. + + + + This project does not contain a default settings file. Click here to create one. + Projekt neobsahuje soubor výchozího nastavení. Kliknutím ho vytvořte. + + + + Could not find the file '{0}'. + Soubor {0} se nepovedlo najít. + + + + The file '{0}' is already open in an editor. Please close the file and try again. + Soubor {0} už je v editoru otevřený. Zavřete ho prosím a zkuste to znovu. + + + + All Project Designer Pages + Všechny stránky návrháře projektu + + + + More Settings + Další nastavení + + + + The requested file type is not supported in projects of this type. + Požadovaný typ souboru se v projektech tohoto typu nepodporuje. + + + + Assembly Name + Název sestavení + + + + Root Namespace + Kořenový obor názvů + + + + Startup Object + Spouštěcí objekt + + + + Application Icon + Ikona aplikace + Property Friendly Names (for transaction names) - NOTE: All of these are optional + + + Assembly Version + Verze sestavení + + + + Assembly File Version + Verze souboru sestavení + + + + Assembly GUID + GUID sestavení + + + + Enable application framework + Povolit aplikační framework + + + + External Program Path + Cesta k externímu programu + + + + Start Browser With URL + Spustit prohlížeč s URL + + + + Working Directory + Pracovní adresář + + + + Remote Machine Name + Název vzdáleného počítače + + + + Project Designer Page Container + Kontejner stránky návrháře projektu + + + + Switch Project Designer Page + Přepnout stránku návrháře projektu + + + + Allow switching between active pages of the project designer (use Ctrl+PageUp and Ctrl+PageDown) + Umožňuje přepínání mezi aktivními stránkami návrháře projektu (pomocí Ctrl+PageUp a Ctrl+PageDown). + + + + {0} page: + Strana {0}: + {0} = sub page name + + + {0} [Read Only] + {0} [jen pro čtení] + Attach a readonly to the designer caption {0}=Designer caption + + + The editor could not get the IVsTextStream for file {0}. + Editoru se nepodařilo pro soubor {0} získat IVsTextStream. + #exception {0}=filename + + + The editor could not get the IVsTextStream. + Editoru se nepovedlo získat IVsTextStream. + #exception (no file name) + + + No DesignerService for file '{0}'. + Pro soubor {0} není dostupná žádná služba DesignerService. + #{0}=file name + + + Invalid physical view name. + Neplatný název fyzického zobrazení. + + + + Unable to create text buffer. + Nelze vytvořit textový zásobník. + # com exception + + + No LocalRegistry service. + Není dostupná žádná služba LocalRegistry. + #exception + + + Replacing text stream failed:{0} + Nahrazení textového streamu nebylo úspěšné: {0} + #exception {0}=err msg + + + Buffer is read only. + Vyrovnávací paměť je jen pro čtení. + + + + File is already opened in an incompatible editor. + Soubor je už otevřený v nekompatibilním editoru. + + + + Unsupported format. + Formát není podporovaný. + + + + Unknown Error. + Neznámá chyba. + + + + Unable to create the designer. {0} + Nelze vytvořit návrháře. {0} + # {0}=inner exception + + + Unable to check out the current file. The file may be read-only or locked, or you may need to check the file out manually. + Aktuální soubor nejde zarezervovat. Soubor může být zamčený, určený jen pro čtení nebo ho budete muset zarezervovat ručně. + # General checkout exception message + + + Microsoft Visual Studio + Microsoft Visual Studio + Error reporting + + + Please enter an integer between 1 and 60. + Zadejte prosím celočíselnou hodnotu mezi 1 a 60. + + + + Please enter an integer between 1 and 60. + Zadejte prosím celočíselnou hodnotu mezi 1 a 60. + + + + Show empty environment + Zobrazit prázdné prostředí + These are items in a combobox (and so they don't need periods) + + + Load last loaded solution + Načíst poslední načtené řešení + These are items in a combobox (and so they don't need periods) + + + Show New Project dialog box + Zobrazit dialogové okno Nový projekt + These are items in a combobox (and so they don't need periods) + + + Show Open Project dialog box + Zobrazit dialogové okno Otevřít projekt + These are items in a combobox (and so they don't need periods) + + + Changes in Help Options will not take effect until the environment is restarted. + Změny v možnostech nápovědy se projeví až po restartování prostředí. + + + + The location specified is on an invalid or read-only disk, or contains a device name reserved for the system. + Zadané umístění je buď neplatné, nachází se na disku určeném jen pro čtení, nebo obsahuje název zařízení rezervovaný systémem. + + + + COM + Model COM + + + + Component Design + Návrh komponent + + + + Serialization + Serializace + + + + Web + Web + + + + COMClass + COMClass + + + + Expose {0} to COM. + Vystavit {0} modelu COM + + + + COM Class + Třída COM + + + + COMVisible + COMVisible + + + + Make {0} visible through COM. + Zviditelnit {0} prostřednictvím modelu COM + + + + COM Visible + Viditelný pro model COM + + + + DispId + DispId + + + + Set explicit DispId to this {0}. + Nastavit pro {0} explicitní hodnotu DispId + + + + DispId + DispId + + + + Value + Hodnota + + + + Explicit DispId value for this {0}. + Explicitní hodnota DispId pro {0} + + + + Value + Hodnota + + + + DispId value should be an integer greater than or equal to 1. + Hodnota DispId by měla být celé číslo větší než nebo rovno jedné. + + + + Category + Kategorie + + + + Category group for the property. + Skupina kategorií pro vlastnost + + + + Category + Kategorie + + + + Default Event + Výchozí událost + + + + Default event for the class. + Výchozí událost třídy + + + + Default Event + Výchozí událost + + + + Default Value + Výchozí hodnota + + + + Default value for the property. + Výchozí událost vlastnosti + + + + Default Value + Výchozí hodnota + + + + NonSerialized + NonSerialized + + + + Field should not be serialized. + Pole by nemělo být serializované. + + + + Non Serialized + Neserializované + + + + Serializable + Serializovatelné + + + + Enable serialization for this {0} and its members. + Povolit serializaci pro {0} včetně členů + + + + Serializable + Serializovatelné + + + + WebMethod + WebMethod + + + + Expose method via web services. + Vystavit metodu prostřednictvím webových služeb + + + + Web Method + Metoda webové služby + + + + Description + Popis + + + + Description for the Web Method. + Popis metody webové služby + + + + Description + Popis + + + + EnableSession + EnableSession + + + + Maintain session state. + Zachovat stav relace + + + + Enable Session + Povolit relaci + + + + TransactionOptions + TransactionOptions + + + + Set transaction options. + Nastavit možnosti transakce + + + + Transaction Options + Možnosti transakce + + + + WebService + WebService + + + + Configure the Web Service settings. + Konfigurovat nastavení webové služby + + + + Web Service + Webová služba + + + + Name + Název + + + + Name for the web service. + Název webové služby + + + + Name + Název + + + + Description + Popis + + + + Description for the web service. + Popis webové služby + + + + Description + Popis + + + + Namespace + Obor názvů + + + + Namespace for the web service. + Obor názvů webové služby + + + + Namespace + Obor názvů + + + + Default + Výchozí + + + + Action + Akce + + + + Appearance + Vzhled + + + + Behavior + Chování + + + + Data + Data + + + + DragDrop + DragDrop + + + + Focus + Fokus + + + + Format + Formát + + + + Key + Klíč + + + + Layout + Rozložení + + + + Mouse + Myš + + + + WindowStyle + WindowStyle + + + + (None) + (Žádný) + Default Event + + + Requires: + Vyžaduje: + + + + Name + Název + Column names for the string table + + + Type + Typ + Column names for the string table + + + Value + Hodnota + Column names for the string table + + + Comment + Komentář + Column names for the string table + + + Failed to generate file: {0} + Generování souboru selhalo: {0} + + + + Editing embedded resources directly is not supported. Do you wish to convert this item to a linked resource in order to edit it? + Přímá úprava vložených prostředků není podporovaná. Chcete tuto položku převést na propojený prostředek, abyste ho mohli upravit? + + + + The current object is auto-generated and only supports renaming through the Managed Resources Editor. + Aktuální objekt se vygeneroval automaticky a podporuje přejmenovávání jenom pomocí editoru spravovaných prostředků. + + + + Cannot find the file '{0}'. It may have been moved or deleted. + Soubor {0} se nedá najít. Možná byl přesunut nebo odstraněn. + {0} = file name and path + + + Unable to load resource from file '{0}'. + Ze souboru '{0}' se nepodařilo načíst prostředek. + {0} = file name and path + + + The resource name cannot be empty. + Název prostředku nemůže být prázdný. + + + + There is already another resource with the name '{0}'. + Už existuje jiný prostředek s názvem {0}. + {0} = Resource name + + + The resource was not of the expected type. + Prostředek není očekávaného typu. + This error can happen if, for example, you try to add foo.bmp to the resource editor, but foo.bmp is really a metafile. + + + Unable to create new resource file '{0}'. {1} + Nepodařilo se vytvořit nový soubor prostředku {0}. {1} + {0} = file name and path, {1} = additional error information + + + Unable to play the audio resource. {0} + Nelze přehrát zdroj zvuku. {0} + {0} = Additional error information. + + + Resource '{0}' cannot be saved to a file. + Prostředek {0} se do souboru nedá uložit. + {0} = Resource name + + + The operation has been canceled by the user. + Operace se přerušila na žádost uživatele. + + + + The resource value contains invalid data or has an incorrect format. + Hodnota prostředku obsahuje neplatná data, nebo má chybný formát. + + + + The name of the resource '{0}' cannot be used as a valid identifier, because it contains one or more invalid characters: '{1}'. Please remove or replace those characters and try again. + Název prostředku {0} nejde použít jako platný identifikátor, protože obsahuje jeden nebo více neplatných znaků: {1}. Odeberte prosím tyto znaky nebo je nahraďte a zkuste to znovu. + {0} = Resource name + + + Too many files specified. Please select fewer files and try again. + Vybrali jste příliš mnoho souborů. Vyberte prosím méně souborů a zkuste to znovu. + + + + Unexpected error. + Nečekaná chyba. + Theoretically possible but we really don't expect to happen. Unexpected, internal error. + + + Unable to load internal localized resource '{0}'. + Nepodařilo se načíst vnitřně umístěný prostředek '{0}'. + Theoretically possible but we really don't expect to happen. Unexpected, internal error. + + + The value could not be converted into a resource of type {0}. + +{1} + Hodnota nebyla převedena na prostředek typu {0}. + +{1} + {0} = the type that was expected by the resource editor (e.g. System.Drawing.Point) +{1} = more specific additional error message from the system + + + The value cannot be empty in a resource of type {0}. + Hodnota v prostředku typu {0} nemůže být prázdná. + {0} = the type that was expected by the resource editor (e.g. System.Drawing.Point) + + + One or more of the selected resource values could not be cleared. + Jednu nebo více hodnot prostředků nelze smazat. + + + + The resource file cannot be modified at this time. + Soubor prostředků se momentálně nedá změnit. + + + + You are trying to edit a resource file that is a part of another project item (such as a form or a control). Editing this item could corrupt the project item, and you will have to recover it by hand. In addition, changes made to this resource file may be lost if further changes are made to the project item. + +Do you really want to edit this file? + Pokoušíte se upravovat soubor prostředku, který patří k jiné položce projektu (třeba k formuláři nebo ovládacímu prvku). Úprava této položky může vést k poškození položky projektu, kterou pak budete muset obnovit ručně. Pokud budete tuto položku projektu dál měnit, můžete přijít i o změny tohoto zdrojového souboru. + +Opravdu chcete tento soubor upravit? + + + + The resource '{0}' cannot be added. + Prostředek {0} se nedá přidat. + {0} - name of the resource + + + The device does not support '{0}' files. + Zařízení nepodporuje soubory {0}. + {0} - the extension of the file name like 'tiff' + + + The resource item uses the type '{0}', which is not supported in this project. + Položka prostředku používá typ {0}, který se v tomto projektu nepodporuje. + {0} - name of the type + + + The resource item(s) {0} cannot be saved correctly. The item(s) will be discarded. + Jedna nebo více položek prostředků {0} nejdou správně uložit. Tyto položky budou zahozeny. + {0} - name list of the resource + + + '{0}' + {0} + {0} - name + + + {0}, '{1}' + {0}, {1} + # {0} - name list +# {1} - another name + + + (Nothing/null) + (nic/null) + Displayed in a string table for values of Nothing/null +CONSIDER: get this from CodeDom + + + (Unknown type) + (neznámý typ) + This actually shouldn't be needed, but if we get an exception trying to get the type name of an entry in the resx file (not supposed to happen), then we'll display this as its type. + + + (Value cannot be displayed) + (hodnota se nedá zobrazit) + Displayed in a string table for values which cannot be edited by the user + + + Name + Název + Columns for the "Details" view of the resource editor + + + Filename + Název souboru + Columns for the "Details" view of the resource editor + + + Type + Typ + Columns for the "Details" view of the resource editor + + + Size + Velikost + Columns for the "Details" view of the resource editor + + + Comment + Komentář + Columns for the "Details" view of the resource editor + + + Text Encoding + Kódování textu + Columns for the "Details" view of the resource editor + + + {0} x {1} + {0} x {1} + Format string for showing a graphic's size + +# {0} = width (as an integer) +# {1} = height (as an integer) +#Example, for a bitmap of width=123, height = 456, the English version of this string would be "123x456" + + + {0} KB + {0} kB + #Format string for showing a file's size +# {0} = length in kilobytes + + + {0} byte(s) + {0} bajtů + Format string for showing a file's size. +{0} = length in bytes + + + Strings + Řetězce + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + Images + Obrázky + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + Icons + Ikony + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + Audio + Zvuk + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + Files + Soubory + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + Other + Jiné + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + &Add + Přid&at + Add, Delete and Views button text in the main ToolStrip + + + &Remove + Odeb&rat + Add, Delete and Views button text in the main ToolStrip + + + &Views + &Zobrazení + Add, Delete and Views button text in the main ToolStrip + + + &Existing File... + Stávají&cí soubor... + Menu items under the "Add" button + + + New &String + Nový ře&tězec + Menu items under the "Add" button + + + New &Image + Nový obráze&k + Menu items under the "Add" button + + + &PNG Image... + Obrázek &PNG... + Menu items under the "Add" button + + + &BMP Image... + Obrázek &BMP... + Menu items under the "Add" button + + + &GIF Image... + Obrázek &GIF... + Menu items under the "Add" button + + + &JPEG Image... + Obrázek &JPEG... + Menu items under the "Add" button + + + &TIFF Image... + Obrázek &TIFF... + Menu items under the "Add" button + + + New I&con... + Nová i&kona... + Menu items under the "Add" button + + + New &Text File... + Nový &textový soubor... + Menu items under the "Add" button + + + Windows Bitmap + Bitová mapa Windows + Friendly Image types + + + EXIF Image + Obrázek EXIF + Friendly Image types + + + Graphics Interchange Format + Formát GIF + Friendly Image types + + + JPEG File Interchange Format + Formát JPEG + Friendly Image types + + + Windows Bitmap + Bitová mapa Windows + Friendly Image types + + + Portable Network Graphics + Formát PNG + Friendly Image types + + + Tag Image File Format + Formát TIFF + Friendly Image types + + + Icon + Ikona + Friendly Image types + + + Text File + Textový soubor + Friendly Image types + + + Binary File + Binární soubor + + + + Wave Sound + Zvuk ve formátu Wave + Friendly Image types + + + Linked at compile time + Spojený až při kompilaci + File Persistence Mode + + + Embedded in .resx + Vložený do souboru .resx + File Persistence Mode + + + Bitmaps + Bitové mapy + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Icons + Ikony + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Audio + Zvuk + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Text Files + Textové soubory + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + All Files + Všechny soubory + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Windows Bitmap + Bitová mapa Windows + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Portable Network Graphics + Formát PNG + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Graphics Interchange Format + Formát GIF + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + JPEG File Interchange Format + Formát JPEG + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Tag Image File Format + Formát TIFF + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Icon + Ikona + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + &List + Sezna&m + Resource editor listview view styles (like changing the view style of a folder in Windows XP) + + + &Details + Po&drobnosti + Resource editor listview view styles (like changing the view style of a folder in Windows XP) + + + &Thumbnail + Minia&tura + Resource editor listview view styles (like changing the view style of a folder in Windows XP) + + + Managed Resources Editor + Editor spravovaných prostředků + + + + Add existing file to resources + Přidat existující soubor k prostředkům + + + + Import file into resource '{0}' + Importovat soubor do prostředku {0} + {0} = Name of resource being imported into + + + Export resource '{0}' to file + Exportovat prostředek {0} do souboru + {0} = Name of resource being exported from + + + Please specify where to save the new file + Zadejte prosím, kde má být nový soubor uložen + + + + The file '{0}' already exists. Do you want to replace it? + Soubor {0} už existuje. Chcete ho nahradit? + {0} = full file path and name + + + The following files already exist. Do you want to replace them? + Následující soubory už existují. Chcete je nahradit? + + + + Select a folder in which to export the resources. + Vyberte složku, do které budou exportovány prostředky. + + + + Do you want to continue anyway? + Chcete i přesto pokračovat? + + + + Do you want to enable strongly-typed resource generation for this file? + Chcete pro tento soubor povolit generování prostředků se silnými typy? + + + + Resource '{0}' could not be loaded because the file to which it is linked could not be found: {1}. + Prostředek {0} se nedá načíst, protože se nenašel soubor, se kterým je svázaný: {1}. + {0} = resource name that had the error, {1} = file path/name that could not be found + + + Resource '{0}' could not be instantiated. {1} + Nelze vytvořit instanci prostředku {0}. {1} + {0} = resource name that had the error, {1} = extended error information + + + Resource '{0}' has a name that is not recommended and that may cause compilation errors in your code. Please choose another name. + Prostředek {0} má název, který se nedoporučuje, protože může v kódu způsobit chyby při kompilaci. Vyberte prosím jiný název. + {0} = resource name that had the error + + + Unable to set the Custom Tool or Custom Tool Namespace properties of this file in order to change strongly-typed resource generation options. If the project file is checked in, try checking it out. + U tohoto souboru se nepodařilo nastavit vlastnosti Vlastní nástroje a Obor názvů vlastního nástroje, aby bylo možné změnit tučně napsané možnosti generování prostředků. Pokud je soubor projektu zaškrtnutý, zkuste ho odškrtnout. + One possible source for this error is that source code control checkout failed or was canceled. + + + Double-click here to enable strongly-typed resources for this file. + Pokud chcete pro tento soubor povolit prostředky se silnými typy, poklikejte sem. + + + + The resource name '{0}' is not a valid identifier. + Název prostředku {0} není platný identifikátor. + + + + {0} - Codepage {1} + {0} – znaková sada {1} + {0} = encoding name (e.g., "Western European (Windows)"), {1} = code page # (e.g., 85001) + + + (Default) + (výchozí) + + + + Change resource name + Změnit název prostředku + + + + Add {0} new resource(s) + Přidat nové prostředky {0} + {0} = number of resources added + + + Remove {0} resource(s) + Odebrat prostředky {0} + {0} = number of resources removed + + + Delete values in {0} cell(s) + Odstranit hodnoty buněk {0} + {0} = number of cells cleared + + + &Categories: + &Kategorie: + The label in the menu strip for the combobox that holds the categories of resources to display + + + Name used to identify the resource in code. + Název používaný k identifikaci prostředku v kódu + + + + Additional information about the resource. This property is only meaningful at design time. + Další informace o prostředku. Tato vlastnost je užitečná jen v okamžiku návrhu. + + + + Character encoding of the file. + Kódování znaků souboru + + + + The path to the linked resource. + Cesta k propojenému prostředku + + + + Specifies whether the file resource is text or binary. + Určuje, jestli je soubor prostředku textový nebo binární. + + + + Specifies whether the resource is embedded or linked. Embedded resources are saved in the resource file. Linked resources reside in an external location on disk. + Určuje, jestli je prostředek vložený nebo připojený. Vložené prostředky se ukládají do souboru prostředků. Propojené prostředky jsou externě umístěné na disku. + + + + The resource will be generated as this type in the strongly-typed resource class. For example, the resource might be generated as a String or Bitmap object. + Prostředek se vygeneruje do tučně napsané třídy prostředků jako tento typ. Prostředek může být vygenerovaný třeba jako objekt řetězce nebo bitové mapy. + + + + The value of the resource. + Hodnota prostředku + + + + Unable to add a '{0}' folder to this project. + +{1} + Do projektu se nepodařilo přidat složku {0}. + +{1} + {0} = name of folder trying to add (by default, this will be "Resources"), {1} = additional error information + + + Unable to add '{0}' to the project. + +{1} + Do projektu se nepodařilo přidat '{0}'. + +{1} + {0} = file name and path, {1} = additional error information. + + + Unable to add '{0}' to the project. + Do projektu se nepodařilo přidat '{0}'. + {0} = file name and path + + + A file with the name '{0}' already exists. Do you want to replace it? + Soubor s názvem {0} už existuje. Chcete ho nahradit? + {0} = file name and path + + + {0} - Destination File Exists + {0} – cílový soubor existuje + {0} = Name of the editor, e.g. "Managed Resources Editor" or "Resource Picker" + + + There is already a linked file with the name "{0}" in the project folder "{1}". Do you want to remove it? + Složka projektu {1} už propojený soubor s názvem {0} obsahuje. Chcete ho odebrat? + {0} = file name (no path), {1} = Path of resource folder + + + {0} - Destination File Exists + {0} – cílový soubor existuje + {0} = Name of the editor, e.g. "Managed Resources Editor" or "Resource Picker" + + + Cannot find the file '{0}'. It may have been moved or deleted. + Soubor {0} se nedá najít. Možná byl přesunut nebo odstraněn. + {0} = file name and path + + + Connection string + Připojovací řetězec + Added as the last item in the list of available types to let the user browse for a new type + + + Web Service URL + URL webové služby + Added as the last item in the list of available types to let the user browse for a new type + + + Browse... + Procházet... + Added as the last item in the list of available types to let the user browse for a new type + + + Application + Aplikace + + + + Application (Web) + Aplikace (web) + + + + User + Uživatel + + + + User (Web) + Uživatel (web) + + + + Name + Název + + + + Type + Typ + + + + Scope + Rozsah + + + + Value + Hodnota + + + + Type '{0}' is not defined. + Typ {0} není definovaný. + + + + Name changed + Název se změnil. + + + + Type changed + Typ se změnil. + + + + Scope changed + Rozsah se změnil. + + + + Roaming changed + Roaming se změnil. + + + + Description changed + Popis se změnil. + + + + Provider changed + Poskytovatel se změnil. + + + + Value changed + Hodnota se změnila. + + + + Generate default value in code changed + Generovat výchozí hodnotu ve změněném kódu + + + + Remove {0} setting(s) + Odebrat nastavení {0} + + + + Unable to load settings file. It might be corrupted or contain invalid XML or contain duplicate identifiers. + Soubor nastavení se nepodařilo načíst. Může být poškozený nebo může obsahovat neplatný kód XML nebo duplicitní identifikátory. + + + + New values from the app.config file were automatically added + Automaticky se přidaly nové hodnoty ze souboru app.config. + + + + Value of setting '{0}' was changed in the app.config file. + Hodnota nastavení '{0}' byla v souboru app.config změněna. + + + + The current value in the .settings file is '{0}' +The new value in the app.config file is '{1}' + +Do you want to update the value in the .settings file? + Aktuální hodnota v souboru .settings je {0}. +Nová hodnota v souboru app.config je {1}. + +Chcete aktualizovat hodnotu v souboru .settings? + + + + An error occurred while reading the app.config file. The file might be corrupted or contain invalid XML. + Při čtení souboru app.config došlo k chybě. Soubor může být poškozený nebo může obsahovat neplatný kód XML. + + + + An error occurred while saving values to the app.config file. The file might be corrupted or contain invalid XML. + Při ukládání hodnot do souboru app.config došlo k chybě. Soubor může být poškozený nebo může obsahovat neplatný kód XML. + + + + There is already another setting with the name '{0}'. + Nastavení s názvem {0} už existuje. + + + + '{0}' is not a valid identifier. + {0} není platný identifikátor. + + + + '{0}' is not a valid type name. + {0} není platný název typu. + + + + The setting name cannot be empty. + Název nastavení nemůže být prázdný. + + + + '{0}' cannot be converted to an instance of type '{1}'. + {0} se nedá převést na instanci typu {1}. + + + + Generic types are not supported. + Obecné typy se nepodporují. + + + + Abstract types are not supported. + Abstraktní typy nejsou podporované. + + + + The current object is auto-generated and only supports renaming through the Settings Designer. + Aktuální objekt se vygeneroval automaticky a dá se přejmenovat jenom pomocí návrháře nastavení. + + + + The current object is auto-generated and does not support modifying parameters. + Stávající objekt se vytváří automaticky a nepodporuje změnu parametrů. + + + + The settings file cannot be modified at this time. + Soubor nastavení se teď nedá změnit. + + + + &Add Setting + Přid&at nastavení + + + + R&emove Setting + Od&ebrat nastavení + + + + Application settings allow you to store and retrieve property settings and other information for your application dynamically. For example, the application can save a user's color preferences, then retrieve them the next time it runs. + Nastavení aplikace umožňují dynamicky uchovávat a načítat nastavení vlastností a jiné informace o aplikaci. Aplikace může třeba uložit předvolby barev uživatele a načíst je při dalším spuštění. + + + + Learn more about application settings... + Další informace o nastavení aplikace... + + + + This connection string appears to contain sensitive data (for example, a password), which is required to connect to the database. However, storing sensitive data in the connection string can be a security risk. Do you want to include sensitive data in the connection string? + Připojovací řetězec pravděpodobně obsahuje citlivá data (například heslo), která jsou potřeba pro připojení k databázi. Uchovávání citlivých dat v připojovacím řetězci ale může představovat bezpečnostní riziko. Chcete do připojovacího řetězce zahrnout citlivá data? + + + + Select a Type + Vyberte typ + + + + This class allows you to handle specific events on the settings class: + Tato třída umožňuje zpracovávat specifické události v třídě nastavení: + Comments for user part of extending generated settings class + + + The SettingChanging event is raised before a setting's value is changed. + Událost SettingChanging se vyvolá před změnou hodnoty nastavení. + + + + The PropertyChanged event is raised after a setting's value is changed. + Událost PropertyChanged se vyvolá po změně hodnoty nastavení. + + + + The SettingsLoaded event is raised after the setting values are loaded. + Událost SettingsLoaded se vyvolá po načtení hodnot nastavení. + + + + The SettingsSaving event is raised before the setting values are saved. + Událost SettingsSaving se vyvolá před uložením hodnot nastavení. + + + + To add event handlers for saving and changing settings, uncomment the lines below: + Pro přidávání obslužných rutin událostí určených pro ukládání a změnu nastavení odkomentujte prosím níže uvedené řádky: + + + + Add code to handle the SettingChangingEvent event here. + Kód pro zpracování události SettingChangingEvent přidejte sem. + + + + Add code to handle the SettingsSaving event here. + Kód pro zpracování události SettingsSaving přidejte sem. + + + + Failed to create or open file. + Otevření nebo vytvoření souboru selhalo. + + + + Description of the setting. + Popis nastavení. + + + + Specifies whether or not the default setting value should be generated in the strongly-typed settings class. + Určuje, jestli se má výchozí hodnota nastavení generovat ve třídě nastavení se silnými typy. + + + + Specifies the group to which this Settings file belongs. + Určuje skupinu, do které tento soubor nastavení patří. + + + + Description of the group to which this Settings file belongs. + Popis skupiny, do které soubor nastavení patří + + + + Indicates whether the setting should roam when Windows roaming profiles are enabled. + Určuje, jestli může nastavení používat roaming, pokud jsou povolené cestovní profily systému Windows. + + + + Name used to identify the setting. + Název používaný k identifikaci nastavení + + + + The provider (System.Configuration.Provider.ProviderBase) used to manage the setting. + Poskytovatel (System.Configuration.Provider.ProviderBase) používaný pro správu nastavení. + + + + Specifies whether the setting is per-application (read-only) or per-user (read-write). + Určuje, jestli je nastavení vázané na aplikaci (jen pro čtení) nebo na uživatele (čtení i zápis). + + + + The setting will be generated as this type in the strongly-typed settings class. For example, the setting might be generated as a String or Integer object. + Nastavení se vygeneruje do tučně napsané třídy nastavení jako tento typ. Nastavení může být vygenerované třeba jako objekt řetězce nebo celočíselné hodnoty. + + + + The current value for the setting. + Aktuální hodnota pro nastavení + + + + The following files will be deleted: + +{0} + Následující soubory budou odstraněny: + +{0} + Synchronize with user.config file + + + No user.config files were found in any of the following locations: + +{0} + Soubory user.config se nenašly v žádném z následujících umístění: + +{0} + + + + One or more user.config files was not removed. + Jeden nebo víc souborů user.config se neodstranil. + + + + My.Settings Auto-Save Functionality + Funkce automatického ukládání objektu My.Settings + in-code comment used to generate a region that hides My.Settings AutoSave functionality + + + Unable to find service '{0}'. Ensure that the application is installed correctly. + Službu {0} se nepodařilo najít. Ověřte, jestli je aplikace správně nainstalovaná. + Settings Global-Object-Provider Strings + + + Default pac&kage: + Výchozí balíče&k: + J# Specific String for Root Namespace + + + (Custom) + (vlastní) + Entry in the "Accessibility dropdown" + + + No code generation + Bez generování kódu + Entry in the "Accessibility dropdown" + + + WPF Application + Aplikace WPF + + + + (Invalid value: "{0}") + (neplatná hodnota: {0}) + Goes into the ShutdownMode combobox + + + On explicit shutdown + Při jednoznačném vypnutí + + + + On last window close + Při zavření posledního okna + + + + On main window close + Při zavření hlavního okna + + + + Could not find the expected root element "{0}" in the application definition file. + V souboru definice aplikace se nepovedlo nají očekávaný kořenový element {0}. + + + + The .xaml file was in an unexpected format, near line {0} column {1}. + Soubor .xaml má blízko řádku {0} a sloupce {1} nečekaný formát. + + + + Startup &object: + Spouštěcí &objekt: + + + + Startup &URI: + Spouštěcí identifikátor &URI: + + + + The application definition file is already opened in an incompatible editor. Please close the other editor and reload the project properties page. + Definiční soubor aplikace už je otevřený v nekompatibilním editoru. Zavřete prosím druhý editor a znovu načtěte stránku vlastností projektu. + + + + There was an error trying to open or create the application definition file for this project. {0} + Při pokusu o otevření nebo vytvoření souboru definice aplikace tohoto projektu došlo k chybě. {0} + + + + An error occurred trying to load the application definition file for this project. The file '{0}' could not be parsed. Please edit the file in the XAML editor to fix the error. + Při pokusu o načtení definičního souboru aplikace pro tento projekt došlo k chybě. Soubor {0} se nedá parsovat. Opravte prosím chybu úpravou souboru v editoru XAML. + + + + (Error) + (chyba) + Used inside UI elements when there is an error (e.g. combobox text) + + + An unspecified error has occurred. + Došlo k nespecifikované chybě. + + + + This project does not contain an application definition file. + Tento projekt neobsahuje soubor definice aplikace. + + + + An error occurred trying to create the application events file. {0} + Při pokusu o vytvoření souboru událostí aplikace došlo k chybě. {0} + + + + Invalid argument '{0}' + Neplatný argument {0} + {0} = name of invalid argument + + + WPF Console Application + Konzolová aplikace WPF + + + + WPF Class Library + Knihovna tříd WPF + + + + Embed manifest with default settings + Vložit manifest s výchozím nastavením + + + + Create application without a manifest + Vytvořit aplikaci bez manifestu + + + + Invalid manifest file. + Soubor manifestu není platný. + + + + Services + Služby + + + + Client application services enable your Windows-based applications to use the ASP.NET login (authentication), roles, and profile (settings) services. + Klientské aplikační služby umožňují vašim aplikacím pro Windows použít služby technologie ASP.NET pro přihlášení (ověřování), role a nastavení profilu. + + + + Learn more about client application services... + Další informace o klientských aplikačních službách... + + + + Advanced Settings for Services + Upřesnit nastavení služeb + + + + Disabling application services will clear the default services for Authentication, Roles, and Settings. Click OK to disable application services. + Zakázáním služeb aplikace se vymažou výchozí služby ověřování, rolí a nastavení. Pokud chcete služby aplikace zakázat, klikněte na OK. + + + + Disable Application Services + Zakázat služby aplikace + + + + seconds + sekundy + + + + minutes + minuty + + + + hours + hodiny + + + + days + dny + + + + To enable client application services, you must set the Target Framework for your application to .NET Framework 3.5 or later. In C#, you can do this on the Application property page. In Visual Basic, you can do this one the Compile property page by clicking Advanced Compile Options. + Abyste mohli povolit klientské aplikační služby, musíte pro cílové rozhraní .NET Framework vaší aplikace vybrat .NET Framework 3.5 nebo novější. V jazyce C# to můžete udělat na stránce Vlastnosti aplikace. Ve Visual Basicu zase kliknutím na Další možnosti kompilace na stránce Vlastnosti kompilace. + + + + An error occurred while reading the Application configuration file. The file might be corrupted or contain invalid XML. + Při čtení konfiguračního souboru aplikace došlo k chybě. Soubor může být poškozený, nebo obsahuje neplatný kód XML. + + + + The URL is invalid. Please enter a valid URL like http://microsoft.com/services + Adresa URL není platná. Zadejte prosím platnou adresu URL, třeba http://microsoft.com/services. + + + + A service URL in the application configuration file is not in the expected format. + Adresa URL služby v konfiguračním souboru aplikace není v očekávaném formátu. + + + + Authentication, Roles and Web Settings providers have been configured via the Application configuration file such that they do not share a common connection string. + Konfigurace poskytovatelů služeb pro ověřování, role a nastavení webu se provedla prostřednictvím konfiguračního souboru aplikace, který jim neumožňuje sdílet obecný připojovací řetězec. + + + + Specify a connection string to a SQL Server database, or use the special connection string "Data Source = |SQL/CE|", which causes SQL Server Compact to generate local database files for offline storage. + Zadejte prosím připojovací řetězec pro databázi serveru SQL Server nebo zadejte speciální připojovací řetězec "Data Source = |SQL/CE|", který způsobí, že SQL Server Compact vygeneruje místní soubory databáze pro úložiště offline. + + + + The following type names were not understood: '{0}'. Make sure you have references to these types. + Následující názvy typů nejsou srozumitelné: {0}. Ověřte, že máte odkazy na tyto typy. + + + + There are already settings with the following names: {0}. + Nastavení s následujícími názvy už existují: {0}. + + + + The username/password combination cannot be authenticated. + Kombinace uživatelské jméno/heslo se nedá ověřit. + + + + Windows Forms Application + Formulářová aplikace Windows + The "Windows Forms" distinguishes it from a WPF application + + + Namespace of the service reference. + Obor názvů odkazu na službu + + + + Service Reference Properties + Vlastnosti odkazu na službu + + + + Metadata Location Url + URL umístění metadat + + + + Metadata Location + Umístění metadat + + + + A service reference with multiple source urls is not supported. + Odkaz na službu s více zdrojovými adresami není podporován. + + + + Cannot change reference Url to empty. The reference url must be a valid URL. + Adresa URL odkazu se nedá změnit na prázdnou. Adresa URL odkazu musí být platnou adresou URL. + + + + One or more files were reloaded during the checkout. Please retry your operation. + Při rezervaci se znovu načetl jeden nebo více souborů. Zopakujte prosím operaci. + + + + The project was reloaded, and some changes on this page may have been lost. + Projekt se znovu načetl a některé změny na této stránce se mohly ztratit. + + + + The application will fail to run in the selected zone because of this requested elevated permission. Click the help link above for more info. + Aplikace kvůli vyžadovaným oprávněním vyšší úrovně ve vybrané zóně selže. Další informace se dozvíte kliknutím na odkaz nápovědy nahoře. + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.de.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.de.xlf new file mode 100644 index 00000000000..0e771c59575 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.de.xlf @@ -0,0 +1,2948 @@ + + + + + + All Files + Alle Dateien + + + + Property Page + Eigenschaftenseite + + + + References + Verweise + + + + Version + Version + + + + Signing + Signierung + + + + Application + Anwendung + + + + Compile + Kompilieren + + + + Debug + Debuggen + + + + Deploy + Bereitstellen + + + + Database + Datenbank + + + + Security + Sicherheit + + + + Build + Build + + + + Build Events + Buildereignisse + + + + Reference Paths + Verweispfade + + + + Pre-build Event Command Line + Befehlszeile für Präbuildereignis + + + + Post-build Event Command Line + Befehlszeile für Postbuildereignis + + + + The output path is not trusted. +The application may throw security exceptions when it attempts to perform actions which require full trust. +Click OK to ignore and continue. Click CANCEL to choose a different output path. + Der Ausgabepfad ist nicht vertrauenswürdig. +Bei Aktionen, die volle Vertrauenswürdigkeit erfordern, treten für die Anwendung unter Umständen Sicherheitsausnahmen auf. +Klicken Sie auf "OK", um diese Meldung zu ignorieren und den Vorgang fortzusetzen. Klicken Sie auf "ABBRECHEN", um einen anderen Ausgabepfad zu wählen. + + + + <Browse...> + <Durchsuchen...> + + + + (None) + (Keine) + + + + <New...> + <Neu...> + + + + <Browse...> + <Durchsuchen...> + + + + (None) + (Keine) + + + + Active ({0}) + Aktiv ({0}) + + + + All Configurations + Alle Konfigurationen + + + + All Platforms + Alle Plattformen + + + + N/A + Nicht zutreffend + This is used in the platform and configuration comboboxes when showing pages that don't care about the current platform/configuration + + + Could not find the configuration '{0}' for platform '{1}'. + Die Konfiguration "{0}" für die Plattform "{1}" wurde nicht gefunden. + + + + (None) + (Keine) + + + + Select File + Datei auswählen + + + + Add existing file to project + Vorhandene Datei zum Projekt hinzufügen + + + + Icon Files + Symboldateien + + + + Executable Files + Ausführbare Dateien + + + + Select Working Directory + Arbeitsverzeichnis auswählen + + + + Select Output Path + Ausgabepfad auswählen + + + + Select Reference Path + Verweispfad auswählen + + + + Win32 Resource Files + Win32-Ressourcendateien + + + + Add Win32 resource file to project + Win32-Ressourcendatei zum Projekt hinzufügen + + + + Folder path does not exist. +Please select a valid folder path. + Der Ordnerpfad ist nicht vorhanden. +Wählen Sie einen gültigen Ordnerpfad aus. + + + + Advanced Compiler Settings + Erweiterte Compilereinstellungen + + + + Advanced Build Settings + Erweiterte Buildeinstellungen + + + + Compiler Warnings + Compilerwarnungen + + + + Reference Paths + Verweispfade + + + + Compatible Settings + Kompatible Einstellungen + + + + Assembly Information + Assemblyinformationen + + + + Invalid version format, expected "[Major]", "[Major].[Minor]", "[Major].[Minor].[Build]" or "[Major].[Minor].[Build].[Revision]" + Ungültiges Versionsformat, "[Hauptversion]", "[Hauptversion].[Nebenversion]", "[Hauptversion].[Nebenversion].[Build]" oder "[Hauptversion].[Nebenversion].[Build].[Revision]" wurde erwartet. + + + + A wildcard ("*") is not allowed in this field. + In diesem Feld sind Platzhalter ("*") nicht zulässig. + + + + Each part of the version number for '{0}' must be an integer between 0 and {1}. + Jeder Teil der Versionsnummer für "{0}" muss eine ganze Zahl zwischen 0 und {1} sein. + + + + (Default Icon) + (Standardsymbol) + + + + Startup object must be a form when 'Enable application framework' is checked. + Das Startobjekt muss ein Formular sein, wenn "Anwendungsframework aktivieren" aktiviert ist. + + + + (Not set) + (Nicht festgelegt) + + + + Icon could not be added to the project. + Das Symbol konnte dem Projekt nicht hinzugefügt werden. + + + + Invalid icon file. + Ungültige Symboldatei. + + + + {0} is not a valid icon file. + "{0}" ist keine gültige Symboldatei. + + + + The GUID should match the format dddddddd-dddd-dddd-dddd-dddddddddddd. + Die GUID muss das folgende Format aufweisen: dddddddd-dddd-dddd-dddd-dddddddddddd. + + + + NOTE: This file is auto-generated; do not modify it directly. To make changes, + HINWEIS: Diese Datei wird automatisch generiert und darf nicht direkt bearbeitet werden. Wenn Sie Änderungen vornehmen möchten + These comments are placed in the ApplicationEvents.vb file if it is generated by the project designer. The same comments appear in the templates, under vsproject\Templates\Windows\VisualBasic\ProjectTemplates\WindowsApplication\MyEvents.vb (MyEvents.vb is renamed to ApplicationEvents.vb after project creation), and these comments should be kept in sync + + + or if you encounter build errors in this file, go to the Project Designer + oder in dieser Datei Buildfehler auftreten, wechseln Sie zum Projekt-Designer. + + + + (go to Project Properties or double-click the My Project node in + (Wechseln Sie dazu zu den Projekteigenschaften, oder doppelklicken Sie auf den Knoten "Mein Projekt" im + + + + Solution Explorer), and make changes on the Application tab. + Projektmappen-Explorer). Nehmen Sie auf der Registerkarte "Anwendung" entsprechende Änderungen vor. + + + + '{0}' is not a valid identifier. Please select a different Startup form. + "{0}" ist kein gültiger Bezeichner. Wählen Sie ein anderes Startformular aus. + + + + '{0}' is not a valid identifier. Please select a different Splash screen form. + "{0}" ist kein gültiger Bezeichner. Wählen Sie ein anderes Begrüßungsbildschirmformular aus. + + + + The splash screen form cannot be the start-up form. + Das Formular für den Begrüßungsbildschirm muss sich vom Startformular unterscheiden. + + + + Startup f&orm: + Startf&ormular: + + + + The following events are available for MyApplication: + Für MyApplication sind folgende Ereignisse verfügbar: + + + + Startup: Raised when the application starts, before the startup form is created. + Startup: Wird beim Starten der Anwendung noch vor dem Erstellen des Startformulars ausgelöst. + + + + Shutdown: Raised after all application forms are closed. This event is not raised if the application terminates abnormally. + Shutdown: Wird nach dem Schließen aller Anwendungsformulare ausgelöst. Dieses Ereignis wird nicht ausgelöst, wenn die Anwendung mit einem Fehler beendet wird. + + + + UnhandledException: Raised if the application encounters an unhandled exception. + UnhandledException: Wird bei einem Ausnahmefehler ausgelöst. + + + + StartupNextInstance: Raised when launching a single-instance application and the application is already active. + StartupNextInstance: Wird beim Starten einer Einzelinstanzanwendung ausgelöst, wenn die Anwendung bereits aktiv ist. + + + + NetworkAvailabilityChanged: Raised when the network connection is connected or disconnected. + NetworkAvailabilityChanged: Wird beim Herstellen oder Trennen der Netzwerkverbindung ausgelöst. + + + + Base address must be a hexadecimal number with less than or equal to 8 digits, for example, 0x11000000. + Die Basisadresse muss eine Hexadezimalzahl mit höchstens 8 Ziffern sein, z.B. 0x11000000. + + + + None + Keine + + + + Warning + Warnung + + + + Error + Fehler + + + + (custom) + (benutzerdefiniert) + + + + Implicit conversion + Implizite Konvertierung + + + + Late binding; call could fail at run time + Späte Bindung. Aufruf kann zur Laufzeit Fehler verursachen. + + + + Implicit type; object assumed + Impliziter Typ; Objekt wird angenommen. + + + + Use of variable prior to assignment + Verwendung einer Variablen vor der Zuweisung. + + + + Function/Operator without return value + Funktion/Operator ohne Rückgabewert. + + + + Unused local variable + Nicht verwendete lokale Variable + + + + Instance variable accesses shared member + Instanzvariable greift auf freigegebenen Member zu. + + + + Recursive operator or property access + Rekursiver Operator- oder Eigenschaftenzugriff + + + + Duplicate or overlapping catch blocks + Doppelte oder überlappende Catch-Blöcke + + + + The warning settings for one or more configurations conflict. +Changing this setting will reset the settings in all configurations. + Es liegt ein Konflikt bei den Warnungseinstellungen für mindestens eine Konfiguration vor. +Wenn diese Einstellung geändert wird, werden die Einstellungen in allen Konfigurationen zurückgesetzt. + + + + When startup form closes + Beim Schließen des Startformulars + + + + When last form closes + Beim Schließen des letzten Formulars + + + + Windows + Windows + Authentication modes + + + Application-defined + Anwendungsdefiniert + Authentication modes + + + Cancel + Abbrechen + + + + &Calculate Permissions + Bere&chtigungen berechnen + + + + Stopped... + Beendet... + + + + Starting... + Wird gestartet... + + + + Building... + Buildvorgang wird ausgeführt... + + + + Analyzing... + Wird analysiert... + + + + Analyze Failed + Fehler beim Analysieren. + + + + Aborting... + Vorgang wird abgebrochen... + + + + Canceling... + Wird abgebrochen... + + + + Internet + Internet + + + + Local Intranet + Lokales Intranet + + + + (Custom) + (Benutzerdefiniert) + Don't use + + + (Zone Default) + (Zonenstandard) + + + + Include + Einschließen + + + + Exclude + Ausschließen + + + + The application will require elevated permissions to run in the selected zone. Click the help link above for more info. + Für die Ausführung in der ausgewählten Zone benötigt die Anwendung erweiterte Berechtigungen. Klicken Sie auf den Hilfelink weiter oben, um weitere Informationen zu erhalten. + + + + This permission could not be loaded. Press the delete key to remove it from your project. + Diese Berechtigung konnte nicht geladen werden. Drücken Sie ENTF, um sie aus Ihrem Projekt zu entfernen. + Don't use + + + Included + Eingeschlossen + + + + Permission + Berechtigung + + + + Setting + Einstellung + + + + Specify the code access security permissions that your ClickOnce application requires in order to run. Learn more about code access security... + Geben Sie die Berechtigungen für die Codezugriffssicherheit an, die zum Ausführen der ClickOnce-Anwendung erforderlich sind. Weitere Informationen zur Codezugriffssicherheit... + + + + Learn more about code access security... + Weitere Informationen zur Codezugriffssicherheit... + + + + Invalid value + Ungültiger Wert + + + + The SecurityPermission must be included in your application with the Execute flag set or your application will not run. Mark this permission as "Zone Default" or "Include." + Die SecurityPermission-Berechtigung muss mit festgelegtem Execute-Flag in die Anwendung eingeschlossen werden, damit die Anwendung ausgeführt werden kann. Markieren Sie diese Berechtigung mit "Zonenstandard" oder "Einschließen". + + + + The SecurityPermission must be included in your application with the Execute flag set or your application will not run. The Execute flag has been added to the SecurityPermission in your manifest. + Die SecurityPermission-Berechtigung muss mit festgelegtem Execute-Flag in die Anwendung eingeschlossen werden, damit die Anwendung ausgeführt werden kann. Das Execute-Flag wurde der SecurityPermission-Berechtigung im Manifest hinzugefügt. + + + + This application requires full trust to run correctly. Would you like to set this as a full trust application? + Für die ordnungsgemäße Ausführung dieser Anwendung ist volle Vertrauenswürdigkeit erforderlich. Möchten Sie sie als Anwendung mit voller Vertrauenswürdigkeit festlegen? + + + + Full Trust Required + Volle Vertrauenswürdigkeit erforderlich + + + + An error occurred and the app.manifest file could not be saved. +Error: + Die Datei "app.manifest" konnte aufgrund eines Fehlers nicht gespeichert werden. +Fehler: + + + + An error occurred and the app.manifest file could not be loaded. Please remove any changes you have made to the file and reload the Security property page again. + Die Datei "app.manifest" konnte aufgrund eines Fehlers nicht geladen werden. Machen Sie alle Änderungen an der Datei rückgängig, und laden Sie die Seite mit den Sicherheitseigenschaften neu. + + + + Included + Eingeschlossen + + + + Not Included + Nicht eingeschlossen + + + + Included with warning + Eingeschlossen mit Warnung + + + + Calculating permissions failed. + Fehler beim Berechnen der Berechtigungen. + + + + Error + Fehler + + + + Advanced Security Settings + Erweiterte Sicherheitseinstellungen + + + + Build Failed. Click CANCEL and correct the build failure before analyzing again. + Fehler beim Buildvorgang. Klicken Sie auf "ABBRECHEN", und beheben Sie vor einer erneuten Analyse den Buildfehler. + + + + Build completed... + Buildvorgang abgeschlossen... + + + + Unable to start the build. + Buildvorgang kann nicht gestartet werden. + + + + Serious error. The build must begin in order to analyze permissions. It has not started. + Schwerwiegender Fehler. Der Build muss zum Analysieren von Berechtigungen gestartet werden. Dies ist jedoch nicht erfolgt. + Don't use + + + (Custom) + (Benutzerdefiniert) + Don't use + + + (None) + (Keine) + + + + Selecting existing key file + Auswählen einer vorhandenen Schlüsseldatei + + + + Key Files + Schlüsseldateien + + + + Create key file + Schlüsseldatei erstellen + + + + The old password is invalid. + Das alte Kennwort ist ungültig. + + + + Enter the old password. + Geben Sie das alte Kennwort ein. + + + + Enter a new password. + Geben Sie ein neues Kennwort ein. + + + + The new passwords do not match. Enter the password again. + Die neuen Kennwörter stimmen nicht überein. Wiederholen Sie die Kennworteingabe. + + + + The new password must be at least 6 characters in length. Enter the password again. + Das neue Kennwort muss mindestens sechs Zeichen umfassen. Wiederholen Sie die Kennworteingabe. + + + + Select a Certificate + Zertifikat auswählen + + + + Select a certificate to sign your ClickOnce manifests + Zertifikat zum Signieren der ClickOnce-Manifeste auswählen + + + + Certificate Files + Zertifikatsdateien + + + + Issued To + Ausgestellt für + + + + Issued By + Ausgestellt von + + + + Intended Purpose + Beabsichtigter Zweck + + + + Expiration Date + Ablaufdatum + + + + The password is invalid. + Das Kennwort ist ungültig. + + + + Invalid password + Ungültiges Kennwort + + + + The selected file does not contain a private key. You must choose a certificate that contains a private key. + Die ausgewählte Datei enthält keinen privaten Schlüssel. Wählen Sie ein Zertifikat mit einem privaten Schlüssel aus. + + + + Invalid key + Ungültiger Schlüssel + + + + Certificate Creation Error + Zertifikaterstellungsfehler + + + + <All> + <Alle> + + + + The passwords do not match. + Die Kennwörter stimmen nicht überein. + + + + Enter a password. + Geben Sie ein Kennwort ein. + + + + Confirm the password. + Bestätigen Sie das Kennwort. + + + + (none) + (keine) + + + + Enter password to open file + Kennwort zum Öffnen der Datei eingeben + + + + Enter &password to open file {0} + &Kennwort zum Öffnen der Datei "{0}" eingeben + + + + Enter &password for new file {0} + &Kennwort für die neue Datei "{0}" eingeben + + + + The project already contains a file with that name. Choose another certificate file or rename the file in your project. + Das Projekt enthält bereits eine Datei mit diesem Namen. Wählen Sie eine andere Zertifikatsdatei aus, oder benennen Sie die Datei in Ihrem Projekt um. + + + + The file '{0}' could not be imported: {1} + Die Datei "{0}" konnte nicht importiert werden: {1} + + + + _TemporaryKey.pfx + _TemporaryKey.pfx + + + + The selected certificate is not valid for code signing. Choose another certificate file. + Das ausgewählte Zertifikat ist für das Codesignieren nicht gültig. Wählen Sie eine andere Zertifikatsdatei aus. + + + + Change property: {0} + Eigenschaft ändern: {0} + + + + Windows Application + Windows-Anwendung + + + + Windows Service + Windows-Dienst + + + + Class Library + Klassenbibliothek + + + + Console Application + Konsolenanwendung + + + + Web Control Library + Websteuerelementbibliothek + + + + Cannot remove '{0}'. {1} + + "{0}" kann nicht entfernt werden. {1} + + + + + Adding or removing '{0}' as a project import failed because of an unexpected error from the project system. The error returned was: '{1}'. + Unerwarteter Fehler des Projektsystems beim Hinzufügen oder Löschen von "{0}" als Projektimport. Zurückgegebener Fehler: {1}. + + + + Adding web reference failed. {0} + + Fehler beim Hinzufügen des Webverweises. {0} + + + + + Updating web reference '{0}' failed. +{1} + Fehler beim Aktualisieren des Webverweises "{0}". +{1} + + + + Web Reference Properties + Webverweiseigenschaften + + + + Static + Statisch + + + + Dynamic + Dynamisch + + + + Name of the web reference + Name des Webverweises + + + + URL Behavior + URL-Verhalten + + + + Web reference URL behavior + Webverweis-URL-Verhalten + + + + Web Reference URL + Webverweis-URL + + + + Web Reference URL + Webverweis-URL + + + + Reference Properties + Verweiseigenschaften + + + + The remote machine name cannot be blank. Please specify the name of the machine to debug remotely. + Der Name des Remotecomputers darf nicht leer sein. Geben Sie den Namen des Computers für das Remotedebuggen ein. + + + + The external program cannot be found. Please enter a valid executable file. + Das externe Programm wurde nicht gefunden. Geben Sie eine gültige ausführbare Datei ein. + + + + The external program property cannot be empty. Please enter a valid executable file. + Die Eigenschaft für das externe Programm darf nicht leer sein. Geben Sie eine gültige ausführbare Datei ein. + + + + We can only debug an EXE file. Please enter a valid executable file. + Das Debuggen ist nur bei EXE-Dateien möglich. Geben Sie eine gültige ausführbare Datei ein. + + + + The URL property cannot be empty. Please enter a valid URL. + Die URL-Eigenschaft darf nicht leer sein. Geben Sie eine gültige URL ein. + + + + The URL is invalid. Please enter a valid URL like "http://www.microsoft.com/" + Die URL ist ungültig. Geben Sie eine gültige URL (beispielsweise "http://www.microsoft.com/de/de/default.aspx") ein. + + + + The working directory you entered does not exist. Please enter a valid working directory. + Das eingegebene Arbeitsverzeichnis ist nicht vorhanden. Geben Sie ein gültiges Arbeitsverzeichnis ein. + + + + <The system cannot find the reference specified> + <Angegebener Verweis wurde nicht gefunden> + + + + Unused References + Nicht verwendete Verweise + + + + &Remove + &Entfernen + + + + No unused references + Keine nicht verwendeten Verweise vorhanden + + + + Project compilation failed. Cannot determine unused references. + Fehler beim Kompilieren des Projekts. Nicht verwendete Verweise konnten nicht ermittelt werden. + + + + Gathering list of unused references... + Liste der nicht verwendeten Verweise wird gesammelt... + + + + Error getting unused references. + Nicht verwendete Verweise konnten nicht abgerufen werden. + + + + Base address must be a hexadecimal number with less than or equal to 8 digits, for example, &H11000000. + Die Basisadresse muss eine Hexadezimalzahl mit höchstens 8 Ziffern sein, z.B. &H11000000. + + + + "Resource files must have a .res file extension. Please enter a valid resource file name." + "Ressourcendateien müssen die Dateierweiterung ".res" besitzen. Geben Sie einen gültigen Ressourcendateinamen ein." + + + + "The resource file entered does not exist." + "Die eingegebene Ressourcendatei ist nicht vorhanden." + + + + Project Designer + Projekt-Designer + + + + Settings + Einstellungen + + + + Resources + Ressourcen + + + + An error occurred trying to load the project properties window. Close the window and try again. +{0} + Fehler beim Laden des Projekteigenschaftenfensters. Schließen Sie das Fenster, und wiederholen Sie den Vorgang. +{0} + + + + An error occurred trying to load the page. + Fehler beim Laden der Seite. + + + + The designer cannot be shown because the document for it was never loaded. + Der Designer kann nicht angezeigt werden, weil das entsprechende Dokument nie geladen wurde. + + + + This project does not contain a default resources file. Click here to create one. + Dieses Projekt enthält keine Standardressourcendatei. Klicken Sie hier, um eine solche Datei zu erstellen. + + + + This project does not contain a default settings file. Click here to create one. + Dieses Projekt enthält keine Standardeinstellungsdatei. Klicken Sie hier, um eine solche Datei zu erstellen. + + + + Could not find the file '{0}'. + Die Datei "{0}" wurde nicht gefunden. + + + + The file '{0}' is already open in an editor. Please close the file and try again. + Die Datei "{0}" ist bereits in einem Editor geöffnet. Schließen Sie die Datei, und wiederholen Sie den Vorgang. + + + + All Project Designer Pages + Alle Projekt-Designer-Seiten + + + + More Settings + Weitere Einstellungen + + + + The requested file type is not supported in projects of this type. + Der angeforderte Dateityp wird in Projekten dieses Typs nicht unterstützt. + + + + Assembly Name + Assemblyname + + + + Root Namespace + Stammnamespace + + + + Startup Object + Startobjekt + + + + Application Icon + Anwendungssymbol + Property Friendly Names (for transaction names) - NOTE: All of these are optional + + + Assembly Version + Assemblyversion + + + + Assembly File Version + Assemblydateiversion + + + + Assembly GUID + Assembly-GUID + + + + Enable application framework + Anwendungsframework aktivieren + + + + External Program Path + Externer Programmpfad + + + + Start Browser With URL + Browser mit URL starten + + + + Working Directory + Arbeitsverzeichnis + + + + Remote Machine Name + Name des Remotecomputers + + + + Project Designer Page Container + Container für Projekt-Designer-Seite + + + + Switch Project Designer Page + Projekt-Designer-Seite wechseln + + + + Allow switching between active pages of the project designer (use Ctrl+PageUp and Ctrl+PageDown) + Wechseln zwischen aktiven Seiten des Projekt-Designers zulassen (mit STRG+PageUp und STRG+PageDown) + + + + {0} page: + {0}-Seite: + {0} = sub page name + + + {0} [Read Only] + {0} [schreibgeschützt] + Attach a readonly to the designer caption {0}=Designer caption + + + The editor could not get the IVsTextStream for file {0}. + Der Editor konnte den IVsTextStream für die Datei "{0}" nicht abrufen. + #exception {0}=filename + + + The editor could not get the IVsTextStream. + Der Editor konnte den IVsTextStream nicht abrufen. + #exception (no file name) + + + No DesignerService for file '{0}'. + Kein DesignerService für die Datei "{0}". + #{0}=file name + + + Invalid physical view name. + Ungültiger Name für physische Ansicht. + + + + Unable to create text buffer. + Textpuffer kann nicht erstellt werden. + # com exception + + + No LocalRegistry service. + Kein LocalRegistry-Dienst. + #exception + + + Replacing text stream failed:{0} + Fehler beim Ersetzen des Textstreams: {0} + #exception {0}=err msg + + + Buffer is read only. + Der Puffer ist schreibgeschützt. + + + + File is already opened in an incompatible editor. + Die Datei ist bereits in einem inkompatiblen Editor geöffnet. + + + + Unsupported format. + Nicht unterstütztes Format. + + + + Unknown Error. + Unbekannter Fehler. + + + + Unable to create the designer. {0} + Designer kann nicht erstellt werden. {0} + # {0}=inner exception + + + Unable to check out the current file. The file may be read-only or locked, or you may need to check the file out manually. + Die aktuelle Datei konnte nicht ausgecheckt werden. Die Datei ist unter Umständen schreibgeschützt oder gesperrt oder muss manuell ausgecheckt werden. + # General checkout exception message + + + Microsoft Visual Studio + Microsoft Visual Studio + Error reporting + + + Please enter an integer between 1 and 60. + Geben Sie eine ganze Zahl zwischen 1 und 60 ein. + + + + Please enter an integer between 1 and 60. + Geben Sie eine ganze Zahl zwischen 1 und 60 ein. + + + + Show empty environment + Leere Umgebung anzeigen + These are items in a combobox (and so they don't need periods) + + + Load last loaded solution + Letzte Projektmappe laden + These are items in a combobox (and so they don't need periods) + + + Show New Project dialog box + Dialogfeld "Neues Projekt" anzeigen + These are items in a combobox (and so they don't need periods) + + + Show Open Project dialog box + Dialogfeld "Projekt öffnen" anzeigen + These are items in a combobox (and so they don't need periods) + + + Changes in Help Options will not take effect until the environment is restarted. + Änderungen bei den Hilfeoptionen werden erst nach einem Neustart der Umgebung wirksam. + + + + The location specified is on an invalid or read-only disk, or contains a device name reserved for the system. + Der angegebene Pfad führt zu einem ungültigen oder schreibgeschützten Datenträger oder enthält einen Gerätenamen, der für das System reserviert ist. + + + + COM + COM + + + + Component Design + Komponentendesign + + + + Serialization + Serialisierung + + + + Web + Web + + + + COMClass + COMClass + + + + Expose {0} to COM. + Legt {0} für COM offen. + + + + COM Class + COM-Klasse + + + + COMVisible + COMVisible + + + + Make {0} visible through COM. + {0} durch COM sichtbar machen. + + + + COM Visible + Für COM sichtbar + + + + DispId + DispId + + + + Set explicit DispId to this {0}. + Explizite DispId für diese(n/s) {0} festlegen. + + + + DispId + DispId + + + + Value + Wert + + + + Explicit DispId value for this {0}. + Expliziter DispId-Wert für diese(s/n) {0}. + + + + Value + Wert + + + + DispId value should be an integer greater than or equal to 1. + DispId-Wert sollte ein Integer größer als bzw. gleich 1 sein. + + + + Category + Kategorie + + + + Category group for the property. + Kategoriegruppe für die Eigenschaft. + + + + Category + Kategorie + + + + Default Event + Standardereignis + + + + Default event for the class. + Standardereignis für die Klasse. + + + + Default Event + Standardereignis + + + + Default Value + Standardwert + + + + Default value for the property. + Standardwert für die Eigenschaft. + + + + Default Value + Standardwert + + + + NonSerialized + NonSerialized + + + + Field should not be serialized. + Das Feld sollte nicht serialisiert werden. + + + + Non Serialized + Nicht serialisiert + + + + Serializable + Serialisierbar + + + + Enable serialization for this {0} and its members. + Aktiviert die Serialisierung für diese(n/s) {0} und die entsprechenden Member. + + + + Serializable + Serialisierbar + + + + WebMethod + WebMethod + + + + Expose method via web services. + Legt die Methode über Webdienste offen. + + + + Web Method + Webmethode + + + + Description + Beschreibung + + + + Description for the Web Method. + Beschreibung der Webmethode. + + + + Description + Beschreibung + + + + EnableSession + EnableSession + + + + Maintain session state. + Behält den Sitzungszustand bei. + + + + Enable Session + Sitzung aktivieren + + + + TransactionOptions + TransactionOptions + + + + Set transaction options. + Legt Transaktionsoptionen fest. + + + + Transaction Options + Transaktionsoptionen + + + + WebService + WebService + + + + Configure the Web Service settings. + Konfiguriert die Webdiensteinstellungen. + + + + Web Service + Webdienst + + + + Name + Name + + + + Name for the web service. + Name des Webdiensts. + + + + Name + Name + + + + Description + Beschreibung + + + + Description for the web service. + Beschreibung des Webdiensts. + + + + Description + Beschreibung + + + + Namespace + Namespace + + + + Namespace for the web service. + Namespace für den Webdienst. + + + + Namespace + Namespace + + + + Default + Standard + + + + Action + Aktion + + + + Appearance + Darstellung + + + + Behavior + Verhalten + + + + Data + Daten + + + + DragDrop + DragDrop + + + + Focus + Fokus + + + + Format + Format + + + + Key + Taste + + + + Layout + Layout + + + + Mouse + Maus + + + + WindowStyle + Fensterstil + + + + (None) + (Keine) + Default Event + + + Requires: + Erforderlich: + + + + Name + Name + Column names for the string table + + + Type + Typ + Column names for the string table + + + Value + Wert + Column names for the string table + + + Comment + Kommentieren + Column names for the string table + + + Failed to generate file: {0} + Fehler beim Generieren der Datei: {0} + + + + Editing embedded resources directly is not supported. Do you wish to convert this item to a linked resource in order to edit it? + Die direkte Bearbeitung eingebetteter Ressourcen wird nicht unterstützt. Möchten Sie das Element in eine verknüpfte Ressource konvertieren, um sie zu bearbeiten? + + + + The current object is auto-generated and only supports renaming through the Managed Resources Editor. + Das aktuelle Objekt wurde automatisch generiert und kann nur mithilfe des Editors für verwaltete Ressourcen umbenannt werden. + + + + Cannot find the file '{0}'. It may have been moved or deleted. + Die Datei "{0}" wurde nicht gefunden. Möglicherweise wurde sie verschoben oder gelöscht. + {0} = file name and path + + + Unable to load resource from file '{0}'. + Die Ressource aus Datei "{0}" kann nicht geladen werden. + {0} = file name and path + + + The resource name cannot be empty. + Der Ressourcenname darf nicht leer sein. + + + + There is already another resource with the name '{0}'. + Es ist bereits eine andere Ressource mit dem Namen "{0}" vorhanden. + {0} = Resource name + + + The resource was not of the expected type. + Die Ressource hatte nicht den erwarteten Typ. + This error can happen if, for example, you try to add foo.bmp to the resource editor, but foo.bmp is really a metafile. + + + Unable to create new resource file '{0}'. {1} + Die neue Ressourcendatei "{0}" konnte nicht erstellt werden. {1} + {0} = file name and path, {1} = additional error information + + + Unable to play the audio resource. {0} + Die Audioressource kann nicht wiedergegeben werden. {0} + {0} = Additional error information. + + + Resource '{0}' cannot be saved to a file. + Die Ressource "{0}" kann nicht in einer Datei gespeichert werden. + {0} = Resource name + + + The operation has been canceled by the user. + Der Vorgang wurde benutzerseitig abgebrochen. + + + + The resource value contains invalid data or has an incorrect format. + Der Ressourcenwert enthält ungültige Daten oder hat ein falsches Format. + + + + The name of the resource '{0}' cannot be used as a valid identifier, because it contains one or more invalid characters: '{1}'. Please remove or replace those characters and try again. + Der Name der Ressource "{0}" kann nicht als gültiger Bezeichner verwendet werden, da er mindestens ein ungültiges Zeichen enthält: {1}. Entfernen oder ersetzen Sie die Zeichen, und versuchen Sie es noch einmal. + {0} = Resource name + + + Too many files specified. Please select fewer files and try again. + Es wurden zu viele Dateien angegeben. Wählen Sie weniger Dateien aus, und versuchen Sie es noch einmal. + + + + Unexpected error. + Unerwarteter Fehler. + Theoretically possible but we really don't expect to happen. Unexpected, internal error. + + + Unable to load internal localized resource '{0}'. + Die interne lokalisierte Ressource "{0}" kann nicht geladen werden. + Theoretically possible but we really don't expect to happen. Unexpected, internal error. + + + The value could not be converted into a resource of type {0}. + +{1} + Der Wert konnte nicht in eine Ressource vom Typ "{0}" konvertiert werden. + +{1} + {0} = the type that was expected by the resource editor (e.g. System.Drawing.Point) +{1} = more specific additional error message from the system + + + The value cannot be empty in a resource of type {0}. + Der Wert kann in einer Ressource vom Typ "{0}" nicht leer sein. + {0} = the type that was expected by the resource editor (e.g. System.Drawing.Point) + + + One or more of the selected resource values could not be cleared. + Mindestens einer der ausgewählten Ressourcenwerte konnte nicht gelöscht werden. + + + + The resource file cannot be modified at this time. + Die Ressourcendatei kann derzeit nicht geändert werden. + + + + You are trying to edit a resource file that is a part of another project item (such as a form or a control). Editing this item could corrupt the project item, and you will have to recover it by hand. In addition, changes made to this resource file may be lost if further changes are made to the project item. + +Do you really want to edit this file? + Sie sind im Begriff, eine Ressourcendatei zu bearbeiten, die Teil eines anderen Projektelements ist (beispielsweise eines Formulars oder Steuerelements). Die Bearbeitung dieses Elements kann zu einer Beschädigung des Projektelements führen und eine manuelle Wiederherstellung erforderlich machen. Darüber hinaus gehen die Änderungen an dieser Ressourcendatei unter Umständen verloren, wenn später weitere Änderungen am Projektelement vorgenommen werden. + +Möchten Sie die Datei wirklich bearbeiten? + + + + The resource '{0}' cannot be added. + Die Ressource "{0}" kann nicht hinzugefügt werden. + {0} - name of the resource + + + The device does not support '{0}' files. + Das Gerät unterstützt keine {0}-Dateien. + {0} - the extension of the file name like 'tiff' + + + The resource item uses the type '{0}', which is not supported in this project. + Das Ressourcenelement verwendet den Typ "{0}", der in diesem Projekt nicht unterstützt wird. + {0} - name of the type + + + The resource item(s) {0} cannot be saved correctly. The item(s) will be discarded. + Die Ressourcenelemente "{0}" konnten nicht ordnungsgemäß gespeichert werden. Die Elemente werden verworfen. + {0} - name list of the resource + + + '{0}' + "{0}" + {0} - name + + + {0}, '{1}' + {0}, "{1}" + # {0} - name list +# {1} - another name + + + (Nothing/null) + (Nichts/NULL) + Displayed in a string table for values of Nothing/null +CONSIDER: get this from CodeDom + + + (Unknown type) + (Unbekannter Typ) + This actually shouldn't be needed, but if we get an exception trying to get the type name of an entry in the resx file (not supposed to happen), then we'll display this as its type. + + + (Value cannot be displayed) + (Der Wert kann nicht angezeigt werden.) + Displayed in a string table for values which cannot be edited by the user + + + Name + Name + Columns for the "Details" view of the resource editor + + + Filename + Dateiname + Columns for the "Details" view of the resource editor + + + Type + Typ + Columns for the "Details" view of the resource editor + + + Size + Größe + Columns for the "Details" view of the resource editor + + + Comment + Kommentieren + Columns for the "Details" view of the resource editor + + + Text Encoding + Textcodierung + Columns for the "Details" view of the resource editor + + + {0} x {1} + {0} x {1} + Format string for showing a graphic's size + +# {0} = width (as an integer) +# {1} = height (as an integer) +#Example, for a bitmap of width=123, height = 456, the English version of this string would be "123x456" + + + {0} KB + {0} KB + #Format string for showing a file's size +# {0} = length in kilobytes + + + {0} byte(s) + {0} Byte(s) + Format string for showing a file's size. +{0} = length in bytes + + + Strings + Zeichenfolgen + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + Images + Bilder + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + Icons + Symbole + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + Audio + Audio + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + Files + Dateien + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + Other + Sonstiges + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + &Add + &Hinzufügen + Add, Delete and Views button text in the main ToolStrip + + + &Remove + &Entfernen + Add, Delete and Views button text in the main ToolStrip + + + &Views + &Ansichten + Add, Delete and Views button text in the main ToolStrip + + + &Existing File... + &Vorhandene Datei... + Menu items under the "Add" button + + + New &String + Neue &Zeichenfolge + Menu items under the "Add" button + + + New &Image + Neues &Bild + Menu items under the "Add" button + + + &PNG Image... + &PNG-Bild... + Menu items under the "Add" button + + + &BMP Image... + &BMP-Bild... + Menu items under the "Add" button + + + &GIF Image... + &GIF-Bild... + Menu items under the "Add" button + + + &JPEG Image... + &JPEG-Bild... + Menu items under the "Add" button + + + &TIFF Image... + &TIFF-Bild... + Menu items under the "Add" button + + + New I&con... + Neues S&ymbol... + Menu items under the "Add" button + + + New &Text File... + Neue &Textdatei... + Menu items under the "Add" button + + + Windows Bitmap + Windows-Bitmap + Friendly Image types + + + EXIF Image + EXIF-Bild + Friendly Image types + + + Graphics Interchange Format + Graphics Interchange Format + Friendly Image types + + + JPEG File Interchange Format + JPEG File Interchange Format + Friendly Image types + + + Windows Bitmap + Windows-Bitmap + Friendly Image types + + + Portable Network Graphics + Portable Network Graphics + Friendly Image types + + + Tag Image File Format + Tag Image File Format + Friendly Image types + + + Icon + Symbol + Friendly Image types + + + Text File + Textdatei + Friendly Image types + + + Binary File + Binärdatei + + + + Wave Sound + Wavesound + Friendly Image types + + + Linked at compile time + Zur Kompilierzeit verknüpft + File Persistence Mode + + + Embedded in .resx + In .resx eingebettet + File Persistence Mode + + + Bitmaps + Bitmaps + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Icons + Symbole + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Audio + Audio + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Text Files + Textdateien + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + All Files + Alle Dateien + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Windows Bitmap + Windows-Bitmap + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Portable Network Graphics + Portable Network Graphics + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Graphics Interchange Format + Graphics Interchange Format + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + JPEG File Interchange Format + JPEG File Interchange Format + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Tag Image File Format + Tag Image File Format + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Icon + Symbol + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + &List + &Auflisten + Resource editor listview view styles (like changing the view style of a folder in Windows XP) + + + &Details + &Details + Resource editor listview view styles (like changing the view style of a folder in Windows XP) + + + &Thumbnail + &Miniaturansicht + Resource editor listview view styles (like changing the view style of a folder in Windows XP) + + + Managed Resources Editor + Editor für verwaltete Ressourcen + + + + Add existing file to resources + Vorhandene Datei zu Ressourcen hinzufügen + + + + Import file into resource '{0}' + Datei in Ressource "{0}" importieren + {0} = Name of resource being imported into + + + Export resource '{0}' to file + Ressource "{0}" in Datei exportieren + {0} = Name of resource being exported from + + + Please specify where to save the new file + Speicherort der neuen Datei angeben + + + + The file '{0}' already exists. Do you want to replace it? + Die Datei "{0}" ist bereits vorhanden. Möchten Sie sie ersetzen? + {0} = full file path and name + + + The following files already exist. Do you want to replace them? + Die folgenden Dateien sind bereits vorhanden. Möchten Sie sie ersetzen? + + + + Select a folder in which to export the resources. + Wählen Sie einen Ordner zum Exportieren der Ressourcen aus. + + + + Do you want to continue anyway? + Möchten Sie den Vorgang dennoch fortsetzen? + + + + Do you want to enable strongly-typed resource generation for this file? + Möchten Sie die Generierung von stark typisierten Ressourcen für diese Datei aktivieren? + + + + Resource '{0}' could not be loaded because the file to which it is linked could not be found: {1}. + Die Ressource "{0}" konnte nicht geladen werden, da die Datei, mit der sie verknüpft ist, nicht gefunden wurde: {1}. + {0} = resource name that had the error, {1} = file path/name that could not be found + + + Resource '{0}' could not be instantiated. {1} + Die Ressource "{0}" konnte nicht instanziiert werden. {1} + {0} = resource name that had the error, {1} = extended error information + + + Resource '{0}' has a name that is not recommended and that may cause compilation errors in your code. Please choose another name. + Der Name der Ressource "{0}" ist nicht empfehlenswert und kann Kompilierungsfehler im Code verursachen. Wählen Sie einen anderen Namen aus. + {0} = resource name that had the error + + + Unable to set the Custom Tool or Custom Tool Namespace properties of this file in order to change strongly-typed resource generation options. If the project file is checked in, try checking it out. + Die Eigenschaften für das benutzerdefinierte Tool oder für den Namespace des benutzerdefinierten Tools dieser Datei können nicht festgelegt werden, um Optionen für die stark typisierte Ressourcengenerierung zu ändern. Falls die Projektdatei eingecheckt ist, checken Sie sie aus. + One possible source for this error is that source code control checkout failed or was canceled. + + + Double-click here to enable strongly-typed resources for this file. + Doppelklicken Sie hier, um für diese Datei stark typisierte Ressourcen zuzulassen. + + + + The resource name '{0}' is not a valid identifier. + Der Ressourcenname "{0}" ist kein gültiger Bezeichner. + + + + {0} - Codepage {1} + {0} – Codepage {1} + {0} = encoding name (e.g., "Western European (Windows)"), {1} = code page # (e.g., 85001) + + + (Default) + (Standard) + + + + Change resource name + Ressourcenname ändern + + + + Add {0} new resource(s) + {0} neue Ressource(n) hinzufügen + {0} = number of resources added + + + Remove {0} resource(s) + {0} Ressource(n) entfernen + {0} = number of resources removed + + + Delete values in {0} cell(s) + Werte in {0} Zelle(n) löschen + {0} = number of cells cleared + + + &Categories: + &Kategorien: + The label in the menu strip for the combobox that holds the categories of resources to display + + + Name used to identify the resource in code. + Name zur Identifizierung der Ressource im Code. + + + + Additional information about the resource. This property is only meaningful at design time. + Weitere Informationen zur Ressource. Diese Eigenschaft ist nur zur Entwurfszeit von Bedeutung. + + + + Character encoding of the file. + Zeichencodierung der Datei. + + + + The path to the linked resource. + Pfad zur verknüpften Ressource. + + + + Specifies whether the file resource is text or binary. + Gibt an, ob es sich bei der Dateiressource um eine Text- oder Binärdatei handelt. + + + + Specifies whether the resource is embedded or linked. Embedded resources are saved in the resource file. Linked resources reside in an external location on disk. + Gibt an, ob es sich um eine eingebettete oder um eine verknüpfte Ressource handelt. Eingebettete Ressourcen werden in der Ressourcendatei gespeichert. Verknüpfte Ressourcen befinden sich auf einem Datenträger an einem externen Ort. + + + + The resource will be generated as this type in the strongly-typed resource class. For example, the resource might be generated as a String or Bitmap object. + Die Ressource wird in der stark typisierten Ressourcenklasse als dieser Typ generiert. So kann die Ressource etwa als Zeichenfolgen- oder Bitmapobjekt generiert werden. + + + + The value of the resource. + Der Wert der Ressource. + + + + Unable to add a '{0}' folder to this project. + +{1} + Diesem Projekt kann kein Ordner vom Typ "{0}" hinzugefügt werden. + +{1} + {0} = name of folder trying to add (by default, this will be "Resources"), {1} = additional error information + + + Unable to add '{0}' to the project. + +{1} + "{0}" kann dem Projekt nicht hinzugefügt werden. + +{1} + {0} = file name and path, {1} = additional error information. + + + Unable to add '{0}' to the project. + "{0}" kann dem Projekt nicht hinzugefügt werden. + {0} = file name and path + + + A file with the name '{0}' already exists. Do you want to replace it? + Eine Datei mit dem Namen "{0}" ist bereits vorhanden. Möchten Sie sie ersetzen? + {0} = file name and path + + + {0} - Destination File Exists + {0} – Zieldatei vorhanden + {0} = Name of the editor, e.g. "Managed Resources Editor" or "Resource Picker" + + + There is already a linked file with the name "{0}" in the project folder "{1}". Do you want to remove it? + Im Projektordner "{1}" ist bereits eine verknüpfte Datei mit dem Namen "{0}" vorhanden. Soll sie entfernt werden? + {0} = file name (no path), {1} = Path of resource folder + + + {0} - Destination File Exists + {0} – Zieldatei vorhanden + {0} = Name of the editor, e.g. "Managed Resources Editor" or "Resource Picker" + + + Cannot find the file '{0}'. It may have been moved or deleted. + Die Datei "{0}" wurde nicht gefunden. Möglicherweise wurde sie verschoben oder gelöscht. + {0} = file name and path + + + Connection string + Verbindungszeichenfolge + Added as the last item in the list of available types to let the user browse for a new type + + + Web Service URL + Webdienst-URL + Added as the last item in the list of available types to let the user browse for a new type + + + Browse... + Durchsuchen... + Added as the last item in the list of available types to let the user browse for a new type + + + Application + Anwendung + + + + Application (Web) + Anwendung (Web) + + + + User + Benutzer + + + + User (Web) + Benutzer (Web) + + + + Name + Name + + + + Type + Typ + + + + Scope + Bereich + + + + Value + Wert + + + + Type '{0}' is not defined. + Der Typ "{0}" ist nicht definiert. + + + + Name changed + Name geändert + + + + Type changed + Typ geändert + + + + Scope changed + Bereich geändert + + + + Roaming changed + Roaming geändert + + + + Description changed + Beschreibung geändert + + + + Provider changed + Anbieter geändert + + + + Value changed + Wert geändert + + + + Generate default value in code changed + Standardwert in geändertem Code generieren + + + + Remove {0} setting(s) + {0} Einstellung(en) entfernen + + + + Unable to load settings file. It might be corrupted or contain invalid XML or contain duplicate identifiers. + Die Einstellungsdatei konnte nicht geladen werden. Sie ist möglicherweise beschädigt oder enthält ungültigen XML-Code oder doppelte Bezeichner. + + + + New values from the app.config file were automatically added + Neue Werte aus der Datei "app.config" wurden automatisch hinzugefügt. + + + + Value of setting '{0}' was changed in the app.config file. + Der Wert der Einstellung "{0}" wurde in der Datei "app.config" geändert. + + + + The current value in the .settings file is '{0}' +The new value in the app.config file is '{1}' + +Do you want to update the value in the .settings file? + Aktueller Wert in der SETTINGS-Datei: {0} +Neuer Wert in der Datei "app.config": {1} + +Möchten Sie den Wert in der SETTINGS-Datei aktualisieren? + + + + An error occurred while reading the app.config file. The file might be corrupted or contain invalid XML. + Fehler beim Lesen der Datei "app.config". Die Datei ist möglicherweise beschädigt oder enthält ungültigen XML-Code. + + + + An error occurred while saving values to the app.config file. The file might be corrupted or contain invalid XML. + Fehler beim Speichern von Werten in der Datei "app.config". Die Datei ist möglicherweise beschädigt oder enthält ungültigen XML-Code. + + + + There is already another setting with the name '{0}'. + Es ist bereits eine andere Einstellung mit dem Namen "{0}" vorhanden. + + + + '{0}' is not a valid identifier. + "{0}" ist kein gültiger Bezeichner. + + + + '{0}' is not a valid type name. + "{0}" ist kein gültiger Typname. + + + + The setting name cannot be empty. + Der Einstellungsname darf nicht leer sein. + + + + '{0}' cannot be converted to an instance of type '{1}'. + "{0}" kann nicht in eine Instanz vom Typ "{1}" konvertiert werden. + + + + Generic types are not supported. + Generische Typen werden nicht unterstützt. + + + + Abstract types are not supported. + Abstrakte Typen werden nicht unterstützt. + + + + The current object is auto-generated and only supports renaming through the Settings Designer. + Das aktuelle Objekt wurde automatisch generiert und kann nur mithilfe des Einstellungs-Designers umbenannt werden. + + + + The current object is auto-generated and does not support modifying parameters. + Das aktuelle Objekt wird automatisch generiert und unterstützt das Ändern von Parametern nicht. + + + + The settings file cannot be modified at this time. + Die Einstellungsdatei kann momentan nicht geändert werden. + + + + &Add Setting + &Einstellung hinzufügen + + + + R&emove Setting + E&instellung entfernen + + + + Application settings allow you to store and retrieve property settings and other information for your application dynamically. For example, the application can save a user's color preferences, then retrieve them the next time it runs. + Mithilfe von Anwendungseinstellungen können Eigenschafteneinstellungen und andere Informationen für die Anwendung dynamisch gespeichert und abgerufen werden. So können beispielsweise die Farbeinstellungen eines Benutzers gespeichert und bei der nächsten Ausführung der Anwendung abgerufen werden. + + + + Learn more about application settings... + Weitere Informationen zu Anwendungseinstellungen... + + + + This connection string appears to contain sensitive data (for example, a password), which is required to connect to the database. However, storing sensitive data in the connection string can be a security risk. Do you want to include sensitive data in the connection string? + Diese Verbindungszeichenfolge enthält offenbar vertrauliche Daten, die zum Herstellen der Verbindung mit der Datenbank erforderlich sind (beispielsweise ein Kennwort). Das Speichern vertraulicher Daten in der Verbindungszeichenfolge kann ein Sicherheitsrisiko darstellen. Sollen vertrauliche Daten in die Verbindungszeichenfolge einbezogen werden? + + + + Select a Type + Typ auswählen + + + + This class allows you to handle specific events on the settings class: + Diese Klasse ermöglicht die Behandlung bestimmter Ereignisse der Einstellungsklasse: + Comments for user part of extending generated settings class + + + The SettingChanging event is raised before a setting's value is changed. + Das SettingChanging-Ereignis wird ausgelöst, bevor der Wert einer Einstellung geändert wird. + + + + The PropertyChanged event is raised after a setting's value is changed. + Das PropertyChanged-Ereignis wird ausgelöst, nachdem der Wert einer Einstellung geändert wurde. + + + + The SettingsLoaded event is raised after the setting values are loaded. + Das SettingsLoaded-Ereignis wird ausgelöst, nachdem die Einstellungswerte geladen wurden. + + + + The SettingsSaving event is raised before the setting values are saved. + Das SettingsSaving-Ereignis wird ausgelöst, bevor die Einstellungswerte gespeichert werden. + + + + To add event handlers for saving and changing settings, uncomment the lines below: + Heben Sie die Auskommentierung der unten angezeigten Zeilen auf, um Ereignishandler zum Speichern und Ändern von Einstellungen hinzuzufügen: + + + + Add code to handle the SettingChangingEvent event here. + Fügen Sie hier Code zum Behandeln des SettingChangingEvent-Ereignisses hinzu. + + + + Add code to handle the SettingsSaving event here. + Fügen Sie hier Code zum Behandeln des SettingsSaving-Ereignisses hinzu. + + + + Failed to create or open file. + Fehler beim Erstellen oder Öffnen einer Datei. + + + + Description of the setting. + Die Beschreibung der Einstellung. + + + + Specifies whether or not the default setting value should be generated in the strongly-typed settings class. + Gibt an, ob der Standardeinstellungswert in der stark typisierten Einstellungsklasse generiert werden soll. + + + + Specifies the group to which this Settings file belongs. + Gibt die Gruppe an, zu der diese Einstellungsdatei gehört. + + + + Description of the group to which this Settings file belongs. + Beschreibung der Gruppe, zu der diese Einstellungsdatei gehört. + + + + Indicates whether the setting should roam when Windows roaming profiles are enabled. + Gibt an, ob die Einstellung auf dem Server gespeichert werden soll, wenn servergespeicherte Profile in Windows aktiviert sind. + + + + Name used to identify the setting. + Name zur Identifizierung der Einstellung. + + + + The provider (System.Configuration.Provider.ProviderBase) used to manage the setting. + Der Anbieter (System.Configuration.Provider.ProviderBase) zum Verwalten der Einstellung. + + + + Specifies whether the setting is per-application (read-only) or per-user (read-write). + Gibt an, ob die Einstellung pro Anwendung (schreibgeschützt) oder pro Benutzer (Lesen/Schreiben) gilt. + + + + The setting will be generated as this type in the strongly-typed settings class. For example, the setting might be generated as a String or Integer object. + Die Einstellung wird in der stark typisierten Einstellungsklasse als dieser Typ generiert. So kann die Einstellung etwa als Zeichenfolgen- oder Ganzzahlobjekt generiert werden. + + + + The current value for the setting. + Der aktuelle Wert der Einstellung. + + + + The following files will be deleted: + +{0} + Folgende Dateien werden gelöscht: + +{0} + Synchronize with user.config file + + + No user.config files were found in any of the following locations: + +{0} + An keinem der folgenden Speicherorte wurden Dateien vom Typ "user.config" gefunden: + +{0} + + + + One or more user.config files was not removed. + Mindestens eine user.config-Datei wurde entfernt. + + + + My.Settings Auto-Save Functionality + Automatische My.Settings-Speicherfunktion + in-code comment used to generate a region that hides My.Settings AutoSave functionality + + + Unable to find service '{0}'. Ensure that the application is installed correctly. + Der Dienst "{0}" wurde nicht gefunden. Vergewissern Sie sich, dass die Anwendung korrekt installiert ist. + Settings Global-Object-Provider Strings + + + Default pac&kage: + Standardpa&ket: + J# Specific String for Root Namespace + + + (Custom) + (Benutzerdefiniert) + Entry in the "Accessibility dropdown" + + + No code generation + Keine Codegenerierung + Entry in the "Accessibility dropdown" + + + WPF Application + WPF-Anwendung + + + + (Invalid value: "{0}") + (Ungültiger Wert: {0}) + Goes into the ShutdownMode combobox + + + On explicit shutdown + Beim expliziten Herunterfahren + + + + On last window close + Beim Schließen des letzten Fensters + + + + On main window close + Beim Schließen des Hauptfensters + + + + Could not find the expected root element "{0}" in the application definition file. + Das erwartete Stammelement "{0}" konnte in der Anwendungsdefinitionsdatei nicht gefunden werden. + + + + The .xaml file was in an unexpected format, near line {0} column {1}. + Die XAML-Datei enthält ein unerwartetes Format in der Nähe von Zeile {0}, Spalte {1}. + + + + Startup &object: + Start&objekt: + + + + Startup &URI: + Start-&URI: + + + + The application definition file is already opened in an incompatible editor. Please close the other editor and reload the project properties page. + Die Anwendungsdefinitionsdatei ist bereits in einem inkompatiblen Editor geöffnet. Schließen Sie den anderen Editor, und laden Sie die Projekteigenschaftenseite neu. + + + + There was an error trying to open or create the application definition file for this project. {0} + Fehler beim Öffnen oder Erstellen der Anwendungsdefinitionsdatei für dieses Projekt. {0} + + + + An error occurred trying to load the application definition file for this project. The file '{0}' could not be parsed. Please edit the file in the XAML editor to fix the error. + Fehler beim Laden der Anwendungsdefinitionsdatei für dieses Projekt. Die Datei "{0}" konnte nicht analysiert werden. Bearbeiten Sie die Datei im XAML-Editor, um den Fehler zu beheben. + + + + (Error) + (Fehler) + Used inside UI elements when there is an error (e.g. combobox text) + + + An unspecified error has occurred. + Unbekannter Fehler. + + + + This project does not contain an application definition file. + Dieses Projekt enthält keine Anwendungsdefinitionsdatei. + + + + An error occurred trying to create the application events file. {0} + Fehler beim Erstellen der Anwendungsereignisdatei. {0} + + + + Invalid argument '{0}' + Ungültiges Argument: {0} + {0} = name of invalid argument + + + WPF Console Application + WPF-Konsolenanwendung + + + + WPF Class Library + WPF-Klassenbibliothek + + + + Embed manifest with default settings + Manifest mit Standardeinstellungen einbetten + + + + Create application without a manifest + Anwendung ohne Manifest erstellen + + + + Invalid manifest file. + Ungültige Manifestdatei. + + + + Services + Dienste + + + + Client application services enable your Windows-based applications to use the ASP.NET login (authentication), roles, and profile (settings) services. + Dank Clientanwendungsdiensten können Ihre Windows-basierten Anwendungen die ASP.NET-Dienste für Anmeldung (Authentifizierung), Rollen und Profile (Einstellungen) nutzen. + + + + Learn more about client application services... + Weitere Informationen zu Clientanwendungsdiensten... + + + + Advanced Settings for Services + Erweiterte Einstellungen für Dienste + + + + Disabling application services will clear the default services for Authentication, Roles, and Settings. Click OK to disable application services. + Durch Deaktivieren von Anwendungsdiensten werden die Standarddienste für Authentifizierung, Rollen und Einstellungen gelöscht. Klicken Sie auf "OK", um Anwendungsdienste zu deaktivieren. + + + + Disable Application Services + Anwendungsdienste deaktivieren + + + + seconds + Sekunden + + + + minutes + Minuten + + + + hours + Stunden + + + + days + Tage + + + + To enable client application services, you must set the Target Framework for your application to .NET Framework 3.5 or later. In C#, you can do this on the Application property page. In Visual Basic, you can do this one the Compile property page by clicking Advanced Compile Options. + Um Clientanwendungsdienste zu aktivieren, müssen Sie als Zielframework für Ihre Anwendung .NET Framework 3.5 oder höher festlegen. Verwenden Sie dazu in C# die Anwendungseigenschaftenseite. In Visual Basic klicken Sie auf "Erweiterte Kompilierungsoptionen" und verwenden dann die Kompilierungseigenschaftenseite. + + + + An error occurred while reading the Application configuration file. The file might be corrupted or contain invalid XML. + Fehler beim Lesen der Anwendungskonfigurationsdatei. Möglicherweise ist die Datei beschädigt oder enthält ungültige XML. + + + + The URL is invalid. Please enter a valid URL like http://microsoft.com/services + Die URL ist ungültig. Geben Sie eine gültige URL (beispielsweise "http://microsoft.com/services") ein. + + + + A service URL in the application configuration file is not in the expected format. + Eine Dienst-URL in der Anwendungskonfigurationsdatei liegt nicht im erwarteten Format vor. + + + + Authentication, Roles and Web Settings providers have been configured via the Application configuration file such that they do not share a common connection string. + Authentifizierungs-, Rollen- und Webeinstellungsanbieter wurden über die Anwendungskonfigurationsdatei so konfiguriert, dass sie keine gemeinsame Verbindungszeichenfolge aufweisen. + + + + Specify a connection string to a SQL Server database, or use the special connection string "Data Source = |SQL/CE|", which causes SQL Server Compact to generate local database files for offline storage. + Geben Sie eine Verbindungszeichenfolge für eine SQL Server-Datenbank an, oder verwenden Sie die spezielle Verbindungszeichenfolge "Data Source = |SQL/CE|", mit der von SQL Server Compact lokale Datenbankdateien für die Offlinespeicherung generiert werden. + + + + The following type names were not understood: '{0}'. Make sure you have references to these types. + Die folgenden Typnamen konnten nicht interpretiert werden: {0}. Vergewissern Sie sich, dass Verweise auf diese Typen vorhanden sind. + + + + There are already settings with the following names: {0}. + Für die folgenden Namen sind bereits Einstellungen vorhanden: {0}. + + + + The username/password combination cannot be authenticated. + Diese Kombination aus Benutzername und Kennwort kann nicht authentifiziert werden. + + + + Windows Forms Application + Windows Forms-Anwendung + The "Windows Forms" distinguishes it from a WPF application + + + Namespace of the service reference. + Namespace des Dienstverweises. + + + + Service Reference Properties + Dienstverweiseigenschaften + + + + Metadata Location Url + URL des Metadatenspeicherorts + + + + Metadata Location + Metadatenspeicherort + + + + A service reference with multiple source urls is not supported. + Ein Dienstverweis mit mehreren Quell-URLs wird nicht unterstützt. + + + + Cannot change reference Url to empty. The reference url must be a valid URL. + Leere Verweis-URLs sind nicht zulässig. Die Verweis-URL muss eine gültige URL sein. + + + + One or more files were reloaded during the checkout. Please retry your operation. + Mindestens eine Datei wurde beim Auschecken neu geladen. Wiederholen Sie den Vorgang. + + + + The project was reloaded, and some changes on this page may have been lost. + Das Projekt wurde neu geladen, und einige Änderungen auf dieser Seite sind möglicherweise verloren gegangen. + + + + The application will fail to run in the selected zone because of this requested elevated permission. Click the help link above for more info. + Die Anwendung kann aufgrund dieser angeforderten erweiterten Berechtigung in der ausgewählten Zone nicht ausgeführt werden. Klicken Sie auf den Hilfelink oben, um weitere Informationen zu erhalten. + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.en.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.en.xlf new file mode 100644 index 00000000000..2b820cacf7e --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.en.xlf @@ -0,0 +1,2948 @@ + + + + + + All Files + All Files + + + + Property Page + Property Page + + + + References + References + + + + Version + Version + + + + Signing + Signing + + + + Application + Application + + + + Compile + Compile + + + + Debug + Debug + + + + Deploy + Deploy + + + + Database + Database + + + + Security + Security + + + + Build + Build + + + + Build Events + Build Events + + + + Reference Paths + Reference Paths + + + + Pre-build Event Command Line + Pre-build Event Command Line + + + + Post-build Event Command Line + Post-build Event Command Line + + + + The output path is not trusted. +The application may throw security exceptions when it attempts to perform actions which require full trust. +Click OK to ignore and continue. Click CANCEL to choose a different output path. + The output path is not trusted. +The application may throw security exceptions when it attempts to perform actions which require full trust. +Click OK to ignore and continue. Click CANCEL to choose a different output path. + + + + <Browse...> + <Browse...> + + + + (None) + (None) + + + + <New...> + <New...> + + + + <Browse...> + <Browse...> + + + + (None) + (None) + + + + Active ({0}) + Active ({0}) + + + + All Configurations + All Configurations + + + + All Platforms + All Platforms + + + + N/A + N/A + This is used in the platform and configuration comboboxes when showing pages that don't care about the current platform/configuration + + + Could not find the configuration '{0}' for platform '{1}'. + Could not find the configuration '{0}' for platform '{1}'. + + + + (None) + (None) + + + + Select File + Select File + + + + Add existing file to project + Add existing file to project + + + + Icon Files + Icon Files + + + + Executable Files + Executable Files + + + + Select Working Directory + Select Working Directory + + + + Select Output Path + Select Output Path + + + + Select Reference Path + Select Reference Path + + + + Win32 Resource Files + Win32 Resource Files + + + + Add Win32 resource file to project + Add Win32 resource file to project + + + + Folder path does not exist. +Please select a valid folder path. + Folder path does not exist. +Please select a valid folder path. + + + + Advanced Compiler Settings + Advanced Compiler Settings + + + + Advanced Build Settings + Advanced Build Settings + + + + Compiler Warnings + Compiler Warnings + + + + Reference Paths + Reference Paths + + + + Compatible Settings + Compatible Settings + + + + Assembly Information + Assembly Information + + + + Invalid version format, expected "[Major]", "[Major].[Minor]", "[Major].[Minor].[Build]" or "[Major].[Minor].[Build].[Revision]" + Invalid version format, expected "[Major]", "[Major].[Minor]", "[Major].[Minor].[Build]" or "[Major].[Minor].[Build].[Revision]" + + + + A wildcard ("*") is not allowed in this field. + A wildcard ("*") is not allowed in this field. + + + + Each part of the version number for '{0}' must be an integer between 0 and {1}. + Each part of the version number for '{0}' must be an integer between 0 and {1}. + + + + (Default Icon) + (Default Icon) + + + + Startup object must be a form when 'Enable application framework' is checked. + Startup object must be a form when 'Enable application framework' is checked. + + + + (Not set) + (Not set) + + + + Icon could not be added to the project. + Icon could not be added to the project. + + + + Invalid icon file. + Invalid icon file. + + + + {0} is not a valid icon file. + {0} is not a valid icon file. + + + + The GUID should match the format dddddddd-dddd-dddd-dddd-dddddddddddd. + The GUID should match the format dddddddd-dddd-dddd-dddd-dddddddddddd. + + + + NOTE: This file is auto-generated; do not modify it directly. To make changes, + NOTE: This file is auto-generated; do not modify it directly. To make changes, + These comments are placed in the ApplicationEvents.vb file if it is generated by the project designer. The same comments appear in the templates, under vsproject\Templates\Windows\VisualBasic\ProjectTemplates\WindowsApplication\MyEvents.vb (MyEvents.vb is renamed to ApplicationEvents.vb after project creation), and these comments should be kept in sync + + + or if you encounter build errors in this file, go to the Project Designer + or if you encounter build errors in this file, go to the Project Designer + + + + (go to Project Properties or double-click the My Project node in + (go to Project Properties or double-click the My Project node in + + + + Solution Explorer), and make changes on the Application tab. + Solution Explorer), and make changes on the Application tab. + + + + '{0}' is not a valid identifier. Please select a different Startup form. + '{0}' is not a valid identifier. Please select a different Startup form. + + + + '{0}' is not a valid identifier. Please select a different Splash screen form. + '{0}' is not a valid identifier. Please select a different Splash screen form. + + + + The splash screen form cannot be the start-up form. + The splash screen form cannot be the start-up form. + + + + Startup f&orm: + Startup f&orm: + + + + The following events are available for MyApplication: + The following events are available for MyApplication: + + + + Startup: Raised when the application starts, before the startup form is created. + Startup: Raised when the application starts, before the startup form is created. + + + + Shutdown: Raised after all application forms are closed. This event is not raised if the application terminates abnormally. + Shutdown: Raised after all application forms are closed. This event is not raised if the application terminates abnormally. + + + + UnhandledException: Raised if the application encounters an unhandled exception. + UnhandledException: Raised if the application encounters an unhandled exception. + + + + StartupNextInstance: Raised when launching a single-instance application and the application is already active. + StartupNextInstance: Raised when launching a single-instance application and the application is already active. + + + + NetworkAvailabilityChanged: Raised when the network connection is connected or disconnected. + NetworkAvailabilityChanged: Raised when the network connection is connected or disconnected. + + + + Base address must be a hexadecimal number with less than or equal to 8 digits, for example, 0x11000000. + Base address must be a hexadecimal number with less than or equal to 8 digits, for example, 0x11000000. + + + + None + None + + + + Warning + Warning + + + + Error + Error + + + + (custom) + (custom) + + + + Implicit conversion + Implicit conversion + + + + Late binding; call could fail at run time + Late binding; call could fail at run time + + + + Implicit type; object assumed + Implicit type; object assumed + + + + Use of variable prior to assignment + Use of variable prior to assignment + + + + Function/Operator without return value + Function/Operator without return value + + + + Unused local variable + Unused local variable + + + + Instance variable accesses shared member + Instance variable accesses shared member + + + + Recursive operator or property access + Recursive operator or property access + + + + Duplicate or overlapping catch blocks + Duplicate or overlapping catch blocks + + + + The warning settings for one or more configurations conflict. +Changing this setting will reset the settings in all configurations. + The warning settings for one or more configurations conflict. +Changing this setting will reset the settings in all configurations. + + + + When startup form closes + When startup form closes + + + + When last form closes + When last form closes + + + + Windows + Windows + Authentication modes + + + Application-defined + Application-defined + Authentication modes + + + Cancel + Cancel + + + + &Calculate Permissions + &Calculate Permissions + + + + Stopped... + Stopped... + + + + Starting... + Starting... + + + + Building... + Building... + + + + Analyzing... + Analyzing... + + + + Analyze Failed + Analyze Failed + + + + Aborting... + Aborting... + + + + Canceling... + Canceling... + + + + Internet + Internet + + + + Local Intranet + Local Intranet + + + + (Custom) + (Custom) + Don't use + + + (Zone Default) + (Zone Default) + + + + Include + Include + + + + Exclude + Exclude + + + + The application will require elevated permissions to run in the selected zone. Click the help link above for more info. + The application will require elevated permissions to run in the selected zone. Click the help link above for more info. + + + + This permission could not be loaded. Press the delete key to remove it from your project. + This permission could not be loaded. Press the delete key to remove it from your project. + Don't use + + + Included + Included + + + + Permission + Permission + + + + Setting + Setting + + + + Specify the code access security permissions that your ClickOnce application requires in order to run. Learn more about code access security... + Specify the code access security permissions that your ClickOnce application requires in order to run. Learn more about code access security... + + + + Learn more about code access security... + Learn more about code access security... + + + + Invalid value + Invalid value + + + + The SecurityPermission must be included in your application with the Execute flag set or your application will not run. Mark this permission as "Zone Default" or "Include." + The SecurityPermission must be included in your application with the Execute flag set or your application will not run. Mark this permission as "Zone Default" or "Include." + + + + The SecurityPermission must be included in your application with the Execute flag set or your application will not run. The Execute flag has been added to the SecurityPermission in your manifest. + The SecurityPermission must be included in your application with the Execute flag set or your application will not run. The Execute flag has been added to the SecurityPermission in your manifest. + + + + This application requires full trust to run correctly. Would you like to set this as a full trust application? + This application requires full trust to run correctly. Would you like to set this as a full trust application? + + + + Full Trust Required + Full Trust Required + + + + An error occurred and the app.manifest file could not be saved. +Error: + An error occurred and the app.manifest file could not be saved. +Error: + + + + An error occurred and the app.manifest file could not be loaded. Please remove any changes you have made to the file and reload the Security property page again. + An error occurred and the app.manifest file could not be loaded. Please remove any changes you have made to the file and reload the Security property page again. + + + + Included + Included + + + + Not Included + Not Included + + + + Included with warning + Included with warning + + + + Calculating permissions failed. + Calculating permissions failed. + + + + Error + Error + + + + Advanced Security Settings + Advanced Security Settings + + + + Build Failed. Click CANCEL and correct the build failure before analyzing again. + Build Failed. Click CANCEL and correct the build failure before analyzing again. + + + + Build completed... + Build completed... + + + + Unable to start the build. + Unable to start the build. + + + + Serious error. The build must begin in order to analyze permissions. It has not started. + Serious error. The build must begin in order to analyze permissions. It has not started. + Don't use + + + (Custom) + (Custom) + Don't use + + + (None) + (None) + + + + Selecting existing key file + Selecting existing key file + + + + Key Files + Key Files + + + + Create key file + Create key file + + + + The old password is invalid. + The old password is invalid. + + + + Enter the old password. + Enter the old password. + + + + Enter a new password. + Enter a new password. + + + + The new passwords do not match. Enter the password again. + The new passwords do not match. Enter the password again. + + + + The new password must be at least 6 characters in length. Enter the password again. + The new password must be at least 6 characters in length. Enter the password again. + + + + Select a Certificate + Select a Certificate + + + + Select a certificate to sign your ClickOnce manifests + Select a certificate to sign your ClickOnce manifests + + + + Certificate Files + Certificate Files + + + + Issued To + Issued To + + + + Issued By + Issued By + + + + Intended Purpose + Intended Purpose + + + + Expiration Date + Expiration Date + + + + The password is invalid. + The password is invalid. + + + + Invalid password + Invalid password + + + + The selected file does not contain a private key. You must choose a certificate that contains a private key. + The selected file does not contain a private key. You must choose a certificate that contains a private key. + + + + Invalid key + Invalid key + + + + Certificate Creation Error + Certificate Creation Error + + + + <All> + <All> + + + + The passwords do not match. + The passwords do not match. + + + + Enter a password. + Enter a password. + + + + Confirm the password. + Confirm the password. + + + + (none) + (none) + + + + Enter password to open file + Enter password to open file + + + + Enter &password to open file {0} + Enter &password to open file {0} + + + + Enter &password for new file {0} + Enter &password for new file {0} + + + + The project already contains a file with that name. Choose another certificate file or rename the file in your project. + The project already contains a file with that name. Choose another certificate file or rename the file in your project. + + + + The file '{0}' could not be imported: {1} + The file '{0}' could not be imported: {1} + + + + _TemporaryKey.pfx + _TemporaryKey.pfx + + + + The selected certificate is not valid for code signing. Choose another certificate file. + The selected certificate is not valid for code signing. Choose another certificate file. + + + + Change property: {0} + Change property: {0} + + + + Windows Application + Windows Application + + + + Windows Service + Windows Service + + + + Class Library + Class Library + + + + Console Application + Console Application + + + + Web Control Library + Web Control Library + + + + Cannot remove '{0}'. {1} + + Cannot remove '{0}'. {1} + + + + + Adding or removing '{0}' as a project import failed because of an unexpected error from the project system. The error returned was: '{1}'. + Adding or removing '{0}' as a project import failed because of an unexpected error from the project system. The error returned was: '{1}'. + + + + Adding web reference failed. {0} + + Adding web reference failed. {0} + + + + + Updating web reference '{0}' failed. +{1} + Updating web reference '{0}' failed. +{1} + + + + Web Reference Properties + Web Reference Properties + + + + Static + Static + + + + Dynamic + Dynamic + + + + Name of the web reference + Name of the web reference + + + + URL Behavior + URL Behavior + + + + Web reference URL behavior + Web reference URL behavior + + + + Web Reference URL + Web Reference URL + + + + Web Reference URL + Web Reference URL + + + + Reference Properties + Reference Properties + + + + The remote machine name cannot be blank. Please specify the name of the machine to debug remotely. + The remote machine name cannot be blank. Please specify the name of the machine to debug remotely. + + + + The external program cannot be found. Please enter a valid executable file. + The external program cannot be found. Please enter a valid executable file. + + + + The external program property cannot be empty. Please enter a valid executable file. + The external program property cannot be empty. Please enter a valid executable file. + + + + We can only debug an EXE file. Please enter a valid executable file. + We can only debug an EXE file. Please enter a valid executable file. + + + + The URL property cannot be empty. Please enter a valid URL. + The URL property cannot be empty. Please enter a valid URL. + + + + The URL is invalid. Please enter a valid URL like "http://www.microsoft.com/" + The URL is invalid. Please enter a valid URL like "http://www.microsoft.com/" + + + + The working directory you entered does not exist. Please enter a valid working directory. + The working directory you entered does not exist. Please enter a valid working directory. + + + + <The system cannot find the reference specified> + <The system cannot find the reference specified> + + + + Unused References + Unused References + + + + &Remove + &Remove + + + + No unused references + No unused references + + + + Project compilation failed. Cannot determine unused references. + Project compilation failed. Cannot determine unused references. + + + + Gathering list of unused references... + Gathering list of unused references... + + + + Error getting unused references. + Error getting unused references. + + + + Base address must be a hexadecimal number with less than or equal to 8 digits, for example, &H11000000. + Base address must be a hexadecimal number with less than or equal to 8 digits, for example, &H11000000. + + + + "Resource files must have a .res file extension. Please enter a valid resource file name." + "Resource files must have a .res file extension. Please enter a valid resource file name." + + + + "The resource file entered does not exist." + "The resource file entered does not exist." + + + + Project Designer + Project Designer + + + + Settings + Settings + + + + Resources + Resources + + + + An error occurred trying to load the project properties window. Close the window and try again. +{0} + An error occurred trying to load the project properties window. Close the window and try again. +{0} + + + + An error occurred trying to load the page. + An error occurred trying to load the page. + + + + The designer cannot be shown because the document for it was never loaded. + The designer cannot be shown because the document for it was never loaded. + + + + This project does not contain a default resources file. Click here to create one. + This project does not contain a default resources file. Click here to create one. + + + + This project does not contain a default settings file. Click here to create one. + This project does not contain a default settings file. Click here to create one. + + + + Could not find the file '{0}'. + Could not find the file '{0}'. + + + + The file '{0}' is already open in an editor. Please close the file and try again. + The file '{0}' is already open in an editor. Please close the file and try again. + + + + All Project Designer Pages + All Project Designer Pages + + + + More Settings + More Settings + + + + The requested file type is not supported in projects of this type. + The requested file type is not supported in projects of this type. + + + + Assembly Name + Assembly Name + + + + Root Namespace + Root Namespace + + + + Startup Object + Startup Object + + + + Application Icon + Application Icon + Property Friendly Names (for transaction names) - NOTE: All of these are optional + + + Assembly Version + Assembly Version + + + + Assembly File Version + Assembly File Version + + + + Assembly GUID + Assembly GUID + + + + Enable application framework + Enable application framework + + + + External Program Path + External Program Path + + + + Start Browser With URL + Start Browser With URL + + + + Working Directory + Working Directory + + + + Remote Machine Name + Remote Machine Name + + + + Project Designer Page Container + Project Designer Page Container + + + + Switch Project Designer Page + Switch Project Designer Page + + + + Allow switching between active pages of the project designer (use Ctrl+PageUp and Ctrl+PageDown) + Allow switching between active pages of the project designer (use Ctrl+PageUp and Ctrl+PageDown) + + + + {0} page: + {0} page: + {0} = sub page name + + + {0} [Read Only] + {0} [Read Only] + Attach a readonly to the designer caption {0}=Designer caption + + + The editor could not get the IVsTextStream for file {0}. + The editor could not get the IVsTextStream for file {0}. + #exception {0}=filename + + + The editor could not get the IVsTextStream. + The editor could not get the IVsTextStream. + #exception (no file name) + + + No DesignerService for file '{0}'. + No DesignerService for file '{0}'. + #{0}=file name + + + Invalid physical view name. + Invalid physical view name. + + + + Unable to create text buffer. + Unable to create text buffer. + # com exception + + + No LocalRegistry service. + No LocalRegistry service. + #exception + + + Replacing text stream failed:{0} + Replacing text stream failed:{0} + #exception {0}=err msg + + + Buffer is read only. + Buffer is read only. + + + + File is already opened in an incompatible editor. + File is already opened in an incompatible editor. + + + + Unsupported format. + Unsupported format. + + + + Unknown Error. + Unknown Error. + + + + Unable to create the designer. {0} + Unable to create the designer. {0} + # {0}=inner exception + + + Unable to check out the current file. The file may be read-only or locked, or you may need to check the file out manually. + Unable to check out the current file. The file may be read-only or locked, or you may need to check the file out manually. + # General checkout exception message + + + Microsoft Visual Studio + Microsoft Visual Studio + Error reporting + + + Please enter an integer between 1 and 60. + Please enter an integer between 1 and 60. + + + + Please enter an integer between 1 and 60. + Please enter an integer between 1 and 60. + + + + Show empty environment + Show empty environment + These are items in a combobox (and so they don't need periods) + + + Load last loaded solution + Load last loaded solution + These are items in a combobox (and so they don't need periods) + + + Show New Project dialog box + Show New Project dialog box + These are items in a combobox (and so they don't need periods) + + + Show Open Project dialog box + Show Open Project dialog box + These are items in a combobox (and so they don't need periods) + + + Changes in Help Options will not take effect until the environment is restarted. + Changes in Help Options will not take effect until the environment is restarted. + + + + The location specified is on an invalid or read-only disk, or contains a device name reserved for the system. + The location specified is on an invalid or read-only disk, or contains a device name reserved for the system. + + + + COM + COM + + + + Component Design + Component Design + + + + Serialization + Serialization + + + + Web + Web + + + + COMClass + COMClass + + + + Expose {0} to COM. + Expose {0} to COM. + + + + COM Class + COM Class + + + + COMVisible + COMVisible + + + + Make {0} visible through COM. + Make {0} visible through COM. + + + + COM Visible + COM Visible + + + + DispId + DispId + + + + Set explicit DispId to this {0}. + Set explicit DispId to this {0}. + + + + DispId + DispId + + + + Value + Value + + + + Explicit DispId value for this {0}. + Explicit DispId value for this {0}. + + + + Value + Value + + + + DispId value should be an integer greater than or equal to 1. + DispId value should be an integer greater than or equal to 1. + + + + Category + Category + + + + Category group for the property. + Category group for the property. + + + + Category + Category + + + + Default Event + Default Event + + + + Default event for the class. + Default event for the class. + + + + Default Event + Default Event + + + + Default Value + Default Value + + + + Default value for the property. + Default value for the property. + + + + Default Value + Default Value + + + + NonSerialized + NonSerialized + + + + Field should not be serialized. + Field should not be serialized. + + + + Non Serialized + Non Serialized + + + + Serializable + Serializable + + + + Enable serialization for this {0} and its members. + Enable serialization for this {0} and its members. + + + + Serializable + Serializable + + + + WebMethod + WebMethod + + + + Expose method via web services. + Expose method via web services. + + + + Web Method + Web Method + + + + Description + Description + + + + Description for the Web Method. + Description for the Web Method. + + + + Description + Description + + + + EnableSession + EnableSession + + + + Maintain session state. + Maintain session state. + + + + Enable Session + Enable Session + + + + TransactionOptions + TransactionOptions + + + + Set transaction options. + Set transaction options. + + + + Transaction Options + Transaction Options + + + + WebService + WebService + + + + Configure the Web Service settings. + Configure the Web Service settings. + + + + Web Service + Web Service + + + + Name + Name + + + + Name for the web service. + Name for the web service. + + + + Name + Name + + + + Description + Description + + + + Description for the web service. + Description for the web service. + + + + Description + Description + + + + Namespace + Namespace + + + + Namespace for the web service. + Namespace for the web service. + + + + Namespace + Namespace + + + + Default + Default + + + + Action + Action + + + + Appearance + Appearance + + + + Behavior + Behavior + + + + Data + Data + + + + DragDrop + DragDrop + + + + Focus + Focus + + + + Format + Format + + + + Key + Key + + + + Layout + Layout + + + + Mouse + Mouse + + + + WindowStyle + WindowStyle + + + + (None) + (None) + Default Event + + + Requires: + Requires: + + + + Name + Name + Column names for the string table + + + Type + Type + Column names for the string table + + + Value + Value + Column names for the string table + + + Comment + Comment + Column names for the string table + + + Failed to generate file: {0} + Failed to generate file: {0} + + + + Editing embedded resources directly is not supported. Do you wish to convert this item to a linked resource in order to edit it? + Editing embedded resources directly is not supported. Do you wish to convert this item to a linked resource in order to edit it? + + + + The current object is auto-generated and only supports renaming through the Managed Resources Editor. + The current object is auto-generated and only supports renaming through the Managed Resources Editor. + + + + Cannot find the file '{0}'. It may have been moved or deleted. + Cannot find the file '{0}'. It may have been moved or deleted. + {0} = file name and path + + + Unable to load resource from file '{0}'. + Unable to load resource from file '{0}'. + {0} = file name and path + + + The resource name cannot be empty. + The resource name cannot be empty. + + + + There is already another resource with the name '{0}'. + There is already another resource with the name '{0}'. + {0} = Resource name + + + The resource was not of the expected type. + The resource was not of the expected type. + This error can happen if, for example, you try to add foo.bmp to the resource editor, but foo.bmp is really a metafile. + + + Unable to create new resource file '{0}'. {1} + Unable to create new resource file '{0}'. {1} + {0} = file name and path, {1} = additional error information + + + Unable to play the audio resource. {0} + Unable to play the audio resource. {0} + {0} = Additional error information. + + + Resource '{0}' cannot be saved to a file. + Resource '{0}' cannot be saved to a file. + {0} = Resource name + + + The operation has been canceled by the user. + The operation has been canceled by the user. + + + + The resource value contains invalid data or has an incorrect format. + The resource value contains invalid data or has an incorrect format. + + + + The name of the resource '{0}' cannot be used as a valid identifier, because it contains one or more invalid characters: '{1}'. Please remove or replace those characters and try again. + The name of the resource '{0}' cannot be used as a valid identifier, because it contains one or more invalid characters: '{1}'. Please remove or replace those characters and try again. + {0} = Resource name + + + Too many files specified. Please select fewer files and try again. + Too many files specified. Please select fewer files and try again. + + + + Unexpected error. + Unexpected error. + Theoretically possible but we really don't expect to happen. Unexpected, internal error. + + + Unable to load internal localized resource '{0}'. + Unable to load internal localized resource '{0}'. + Theoretically possible but we really don't expect to happen. Unexpected, internal error. + + + The value could not be converted into a resource of type {0}. + +{1} + The value could not be converted into a resource of type {0}. + +{1} + {0} = the type that was expected by the resource editor (e.g. System.Drawing.Point) +{1} = more specific additional error message from the system + + + The value cannot be empty in a resource of type {0}. + The value cannot be empty in a resource of type {0}. + {0} = the type that was expected by the resource editor (e.g. System.Drawing.Point) + + + One or more of the selected resource values could not be cleared. + One or more of the selected resource values could not be cleared. + + + + The resource file cannot be modified at this time. + The resource file cannot be modified at this time. + + + + You are trying to edit a resource file that is a part of another project item (such as a form or a control). Editing this item could corrupt the project item, and you will have to recover it by hand. In addition, changes made to this resource file may be lost if further changes are made to the project item. + +Do you really want to edit this file? + You are trying to edit a resource file that is a part of another project item (such as a form or a control). Editing this item could corrupt the project item, and you will have to recover it by hand. In addition, changes made to this resource file may be lost if further changes are made to the project item. + +Do you really want to edit this file? + + + + The resource '{0}' cannot be added. + The resource '{0}' cannot be added. + {0} - name of the resource + + + The device does not support '{0}' files. + The device does not support '{0}' files. + {0} - the extension of the file name like 'tiff' + + + The resource item uses the type '{0}', which is not supported in this project. + The resource item uses the type '{0}', which is not supported in this project. + {0} - name of the type + + + The resource item(s) {0} cannot be saved correctly. The item(s) will be discarded. + The resource item(s) {0} cannot be saved correctly. The item(s) will be discarded. + {0} - name list of the resource + + + '{0}' + '{0}' + {0} - name + + + {0}, '{1}' + {0}, '{1}' + # {0} - name list +# {1} - another name + + + (Nothing/null) + (Nothing/null) + Displayed in a string table for values of Nothing/null +CONSIDER: get this from CodeDom + + + (Unknown type) + (Unknown type) + This actually shouldn't be needed, but if we get an exception trying to get the type name of an entry in the resx file (not supposed to happen), then we'll display this as its type. + + + (Value cannot be displayed) + (Value cannot be displayed) + Displayed in a string table for values which cannot be edited by the user + + + Name + Name + Columns for the "Details" view of the resource editor + + + Filename + Filename + Columns for the "Details" view of the resource editor + + + Type + Type + Columns for the "Details" view of the resource editor + + + Size + Size + Columns for the "Details" view of the resource editor + + + Comment + Comment + Columns for the "Details" view of the resource editor + + + Text Encoding + Text Encoding + Columns for the "Details" view of the resource editor + + + {0} x {1} + {0} x {1} + Format string for showing a graphic's size + +# {0} = width (as an integer) +# {1} = height (as an integer) +#Example, for a bitmap of width=123, height = 456, the English version of this string would be "123x456" + + + {0} KB + {0} KB + #Format string for showing a file's size +# {0} = length in kilobytes + + + {0} byte(s) + {0} byte(s) + Format string for showing a file's size. +{0} = length in bytes + + + Strings + Strings + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + Images + Images + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + Icons + Icons + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + Audio + Audio + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + Files + Files + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + Other + Other + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + &Add + &Add + Add, Delete and Views button text in the main ToolStrip + + + &Remove + &Remove + Add, Delete and Views button text in the main ToolStrip + + + &Views + &Views + Add, Delete and Views button text in the main ToolStrip + + + &Existing File... + &Existing File... + Menu items under the "Add" button + + + New &String + New &String + Menu items under the "Add" button + + + New &Image + New &Image + Menu items under the "Add" button + + + &PNG Image... + &PNG Image... + Menu items under the "Add" button + + + &BMP Image... + &BMP Image... + Menu items under the "Add" button + + + &GIF Image... + &GIF Image... + Menu items under the "Add" button + + + &JPEG Image... + &JPEG Image... + Menu items under the "Add" button + + + &TIFF Image... + &TIFF Image... + Menu items under the "Add" button + + + New I&con... + New I&con... + Menu items under the "Add" button + + + New &Text File... + New &Text File... + Menu items under the "Add" button + + + Windows Bitmap + Windows Bitmap + Friendly Image types + + + EXIF Image + EXIF Image + Friendly Image types + + + Graphics Interchange Format + Graphics Interchange Format + Friendly Image types + + + JPEG File Interchange Format + JPEG File Interchange Format + Friendly Image types + + + Windows Bitmap + Windows Bitmap + Friendly Image types + + + Portable Network Graphics + Portable Network Graphics + Friendly Image types + + + Tag Image File Format + Tag Image File Format + Friendly Image types + + + Icon + Icon + Friendly Image types + + + Text File + Text File + Friendly Image types + + + Binary File + Binary File + + + + Wave Sound + Wave Sound + Friendly Image types + + + Linked at compile time + Linked at compile time + File Persistence Mode + + + Embedded in .resx + Embedded in .resx + File Persistence Mode + + + Bitmaps + Bitmaps + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Icons + Icons + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Audio + Audio + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Text Files + Text Files + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + All Files + All Files + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Windows Bitmap + Windows Bitmap + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Portable Network Graphics + Portable Network Graphics + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Graphics Interchange Format + Graphics Interchange Format + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + JPEG File Interchange Format + JPEG File Interchange Format + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Tag Image File Format + Tag Image File Format + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Icon + Icon + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + &List + &List + Resource editor listview view styles (like changing the view style of a folder in Windows XP) + + + &Details + &Details + Resource editor listview view styles (like changing the view style of a folder in Windows XP) + + + &Thumbnail + &Thumbnail + Resource editor listview view styles (like changing the view style of a folder in Windows XP) + + + Managed Resources Editor + Managed Resources Editor + + + + Add existing file to resources + Add existing file to resources + + + + Import file into resource '{0}' + Import file into resource '{0}' + {0} = Name of resource being imported into + + + Export resource '{0}' to file + Export resource '{0}' to file + {0} = Name of resource being exported from + + + Please specify where to save the new file + Please specify where to save the new file + + + + The file '{0}' already exists. Do you want to replace it? + The file '{0}' already exists. Do you want to replace it? + {0} = full file path and name + + + The following files already exist. Do you want to replace them? + The following files already exist. Do you want to replace them? + + + + Select a folder in which to export the resources. + Select a folder in which to export the resources. + + + + Do you want to continue anyway? + Do you want to continue anyway? + + + + Do you want to enable strongly-typed resource generation for this file? + Do you want to enable strongly-typed resource generation for this file? + + + + Resource '{0}' could not be loaded because the file to which it is linked could not be found: {1}. + Resource '{0}' could not be loaded because the file to which it is linked could not be found: {1}. + {0} = resource name that had the error, {1} = file path/name that could not be found + + + Resource '{0}' could not be instantiated. {1} + Resource '{0}' could not be instantiated. {1} + {0} = resource name that had the error, {1} = extended error information + + + Resource '{0}' has a name that is not recommended and that may cause compilation errors in your code. Please choose another name. + Resource '{0}' has a name that is not recommended and that may cause compilation errors in your code. Please choose another name. + {0} = resource name that had the error + + + Unable to set the Custom Tool or Custom Tool Namespace properties of this file in order to change strongly-typed resource generation options. If the project file is checked in, try checking it out. + Unable to set the Custom Tool or Custom Tool Namespace properties of this file in order to change strongly-typed resource generation options. If the project file is checked in, try checking it out. + One possible source for this error is that source code control checkout failed or was canceled. + + + Double-click here to enable strongly-typed resources for this file. + Double-click here to enable strongly-typed resources for this file. + + + + The resource name '{0}' is not a valid identifier. + The resource name '{0}' is not a valid identifier. + + + + {0} - Codepage {1} + {0} - Codepage {1} + {0} = encoding name (e.g., "Western European (Windows)"), {1} = code page # (e.g., 85001) + + + (Default) + (Default) + + + + Change resource name + Change resource name + + + + Add {0} new resource(s) + Add {0} new resource(s) + {0} = number of resources added + + + Remove {0} resource(s) + Remove {0} resource(s) + {0} = number of resources removed + + + Delete values in {0} cell(s) + Delete values in {0} cell(s) + {0} = number of cells cleared + + + &Categories: + &Categories: + The label in the menu strip for the combobox that holds the categories of resources to display + + + Name used to identify the resource in code. + Name used to identify the resource in code. + + + + Additional information about the resource. This property is only meaningful at design time. + Additional information about the resource. This property is only meaningful at design time. + + + + Character encoding of the file. + Character encoding of the file. + + + + The path to the linked resource. + The path to the linked resource. + + + + Specifies whether the file resource is text or binary. + Specifies whether the file resource is text or binary. + + + + Specifies whether the resource is embedded or linked. Embedded resources are saved in the resource file. Linked resources reside in an external location on disk. + Specifies whether the resource is embedded or linked. Embedded resources are saved in the resource file. Linked resources reside in an external location on disk. + + + + The resource will be generated as this type in the strongly-typed resource class. For example, the resource might be generated as a String or Bitmap object. + The resource will be generated as this type in the strongly-typed resource class. For example, the resource might be generated as a String or Bitmap object. + + + + The value of the resource. + The value of the resource. + + + + Unable to add a '{0}' folder to this project. + +{1} + Unable to add a '{0}' folder to this project. + +{1} + {0} = name of folder trying to add (by default, this will be "Resources"), {1} = additional error information + + + Unable to add '{0}' to the project. + +{1} + Unable to add '{0}' to the project. + +{1} + {0} = file name and path, {1} = additional error information. + + + Unable to add '{0}' to the project. + Unable to add '{0}' to the project. + {0} = file name and path + + + A file with the name '{0}' already exists. Do you want to replace it? + A file with the name '{0}' already exists. Do you want to replace it? + {0} = file name and path + + + {0} - Destination File Exists + {0} - Destination File Exists + {0} = Name of the editor, e.g. "Managed Resources Editor" or "Resource Picker" + + + There is already a linked file with the name "{0}" in the project folder "{1}". Do you want to remove it? + There is already a linked file with the name "{0}" in the project folder "{1}". Do you want to remove it? + {0} = file name (no path), {1} = Path of resource folder + + + {0} - Destination File Exists + {0} - Destination File Exists + {0} = Name of the editor, e.g. "Managed Resources Editor" or "Resource Picker" + + + Cannot find the file '{0}'. It may have been moved or deleted. + Cannot find the file '{0}'. It may have been moved or deleted. + {0} = file name and path + + + Connection string + Connection string + Added as the last item in the list of available types to let the user browse for a new type + + + Web Service URL + Web Service URL + Added as the last item in the list of available types to let the user browse for a new type + + + Browse... + Browse... + Added as the last item in the list of available types to let the user browse for a new type + + + Application + Application + + + + Application (Web) + Application (Web) + + + + User + User + + + + User (Web) + User (Web) + + + + Name + Name + + + + Type + Type + + + + Scope + Scope + + + + Value + Value + + + + Type '{0}' is not defined. + Type '{0}' is not defined. + + + + Name changed + Name changed + + + + Type changed + Type changed + + + + Scope changed + Scope changed + + + + Roaming changed + Roaming changed + + + + Description changed + Description changed + + + + Provider changed + Provider changed + + + + Value changed + Value changed + + + + Generate default value in code changed + Generate default value in code changed + + + + Remove {0} setting(s) + Remove {0} setting(s) + + + + Unable to load settings file. It might be corrupted or contain invalid XML or contain duplicate identifiers. + Unable to load settings file. It might be corrupted or contain invalid XML or contain duplicate identifiers. + + + + New values from the app.config file were automatically added + New values from the app.config file were automatically added + + + + Value of setting '{0}' was changed in the app.config file. + Value of setting '{0}' was changed in the app.config file. + + + + The current value in the .settings file is '{0}' +The new value in the app.config file is '{1}' + +Do you want to update the value in the .settings file? + The current value in the .settings file is '{0}' +The new value in the app.config file is '{1}' + +Do you want to update the value in the .settings file? + + + + An error occurred while reading the app.config file. The file might be corrupted or contain invalid XML. + An error occurred while reading the app.config file. The file might be corrupted or contain invalid XML. + + + + An error occurred while saving values to the app.config file. The file might be corrupted or contain invalid XML. + An error occurred while saving values to the app.config file. The file might be corrupted or contain invalid XML. + + + + There is already another setting with the name '{0}'. + There is already another setting with the name '{0}'. + + + + '{0}' is not a valid identifier. + '{0}' is not a valid identifier. + + + + '{0}' is not a valid type name. + '{0}' is not a valid type name. + + + + The setting name cannot be empty. + The setting name cannot be empty. + + + + '{0}' cannot be converted to an instance of type '{1}'. + '{0}' cannot be converted to an instance of type '{1}'. + + + + Generic types are not supported. + Generic types are not supported. + + + + Abstract types are not supported. + Abstract types are not supported. + + + + The current object is auto-generated and only supports renaming through the Settings Designer. + The current object is auto-generated and only supports renaming through the Settings Designer. + + + + The current object is auto-generated and does not support modifying parameters. + The current object is auto-generated and does not support modifying parameters. + + + + The settings file cannot be modified at this time. + The settings file cannot be modified at this time. + + + + &Add Setting + &Add Setting + + + + R&emove Setting + R&emove Setting + + + + Application settings allow you to store and retrieve property settings and other information for your application dynamically. For example, the application can save a user's color preferences, then retrieve them the next time it runs. + Application settings allow you to store and retrieve property settings and other information for your application dynamically. For example, the application can save a user's color preferences, then retrieve them the next time it runs. + + + + Learn more about application settings... + Learn more about application settings... + + + + This connection string appears to contain sensitive data (for example, a password), which is required to connect to the database. However, storing sensitive data in the connection string can be a security risk. Do you want to include sensitive data in the connection string? + This connection string appears to contain sensitive data (for example, a password), which is required to connect to the database. However, storing sensitive data in the connection string can be a security risk. Do you want to include sensitive data in the connection string? + + + + Select a Type + Select a Type + + + + This class allows you to handle specific events on the settings class: + This class allows you to handle specific events on the settings class: + Comments for user part of extending generated settings class + + + The SettingChanging event is raised before a setting's value is changed. + The SettingChanging event is raised before a setting's value is changed. + + + + The PropertyChanged event is raised after a setting's value is changed. + The PropertyChanged event is raised after a setting's value is changed. + + + + The SettingsLoaded event is raised after the setting values are loaded. + The SettingsLoaded event is raised after the setting values are loaded. + + + + The SettingsSaving event is raised before the setting values are saved. + The SettingsSaving event is raised before the setting values are saved. + + + + To add event handlers for saving and changing settings, uncomment the lines below: + To add event handlers for saving and changing settings, uncomment the lines below: + + + + Add code to handle the SettingChangingEvent event here. + Add code to handle the SettingChangingEvent event here. + + + + Add code to handle the SettingsSaving event here. + Add code to handle the SettingsSaving event here. + + + + Failed to create or open file. + Failed to create or open file. + + + + Description of the setting. + Description of the setting. + + + + Specifies whether or not the default setting value should be generated in the strongly-typed settings class. + Specifies whether or not the default setting value should be generated in the strongly-typed settings class. + + + + Specifies the group to which this Settings file belongs. + Specifies the group to which this Settings file belongs. + + + + Description of the group to which this Settings file belongs. + Description of the group to which this Settings file belongs. + + + + Indicates whether the setting should roam when Windows roaming profiles are enabled. + Indicates whether the setting should roam when Windows roaming profiles are enabled. + + + + Name used to identify the setting. + Name used to identify the setting. + + + + The provider (System.Configuration.Provider.ProviderBase) used to manage the setting. + The provider (System.Configuration.Provider.ProviderBase) used to manage the setting. + + + + Specifies whether the setting is per-application (read-only) or per-user (read-write). + Specifies whether the setting is per-application (read-only) or per-user (read-write). + + + + The setting will be generated as this type in the strongly-typed settings class. For example, the setting might be generated as a String or Integer object. + The setting will be generated as this type in the strongly-typed settings class. For example, the setting might be generated as a String or Integer object. + + + + The current value for the setting. + The current value for the setting. + + + + The following files will be deleted: + +{0} + The following files will be deleted: + +{0} + Synchronize with user.config file + + + No user.config files were found in any of the following locations: + +{0} + No user.config files were found in any of the following locations: + +{0} + + + + One or more user.config files was not removed. + One or more user.config files was not removed. + + + + My.Settings Auto-Save Functionality + My.Settings Auto-Save Functionality + in-code comment used to generate a region that hides My.Settings AutoSave functionality + + + Unable to find service '{0}'. Ensure that the application is installed correctly. + Unable to find service '{0}'. Ensure that the application is installed correctly. + Settings Global-Object-Provider Strings + + + Default pac&kage: + Default pac&kage: + J# Specific String for Root Namespace + + + (Custom) + (Custom) + Entry in the "Accessibility dropdown" + + + No code generation + No code generation + Entry in the "Accessibility dropdown" + + + WPF Application + WPF Application + + + + (Invalid value: "{0}") + (Invalid value: "{0}") + Goes into the ShutdownMode combobox + + + On explicit shutdown + On explicit shutdown + + + + On last window close + On last window close + + + + On main window close + On main window close + + + + Could not find the expected root element "{0}" in the application definition file. + Could not find the expected root element "{0}" in the application definition file. + + + + The .xaml file was in an unexpected format, near line {0} column {1}. + The .xaml file was in an unexpected format, near line {0} column {1}. + + + + Startup &object: + Startup &object: + + + + Startup &URI: + Startup &URI: + + + + The application definition file is already opened in an incompatible editor. Please close the other editor and reload the project properties page. + The application definition file is already opened in an incompatible editor. Please close the other editor and reload the project properties page. + + + + There was an error trying to open or create the application definition file for this project. {0} + There was an error trying to open or create the application definition file for this project. {0} + + + + An error occurred trying to load the application definition file for this project. The file '{0}' could not be parsed. Please edit the file in the XAML editor to fix the error. + An error occurred trying to load the application definition file for this project. The file '{0}' could not be parsed. Please edit the file in the XAML editor to fix the error. + + + + (Error) + (Error) + Used inside UI elements when there is an error (e.g. combobox text) + + + An unspecified error has occurred. + An unspecified error has occurred. + + + + This project does not contain an application definition file. + This project does not contain an application definition file. + + + + An error occurred trying to create the application events file. {0} + An error occurred trying to create the application events file. {0} + + + + Invalid argument '{0}' + Invalid argument '{0}' + {0} = name of invalid argument + + + WPF Console Application + WPF Console Application + + + + WPF Class Library + WPF Class Library + + + + Embed manifest with default settings + Embed manifest with default settings + + + + Create application without a manifest + Create application without a manifest + + + + Invalid manifest file. + Invalid manifest file. + + + + Services + Services + + + + Client application services enable your Windows-based applications to use the ASP.NET login (authentication), roles, and profile (settings) services. + Client application services enable your Windows-based applications to use the ASP.NET login (authentication), roles, and profile (settings) services. + + + + Learn more about client application services... + Learn more about client application services... + + + + Advanced Settings for Services + Advanced Settings for Services + + + + Disabling application services will clear the default services for Authentication, Roles, and Settings. Click OK to disable application services. + Disabling application services will clear the default services for Authentication, Roles, and Settings. Click OK to disable application services. + + + + Disable Application Services + Disable Application Services + + + + seconds + seconds + + + + minutes + minutes + + + + hours + hours + + + + days + days + + + + To enable client application services, you must set the Target Framework for your application to .NET Framework 3.5 or later. In C#, you can do this on the Application property page. In Visual Basic, you can do this one the Compile property page by clicking Advanced Compile Options. + To enable client application services, you must set the Target Framework for your application to .NET Framework 3.5 or later. In C#, you can do this on the Application property page. In Visual Basic, you can do this one the Compile property page by clicking Advanced Compile Options. + + + + An error occurred while reading the Application configuration file. The file might be corrupted or contain invalid XML. + An error occurred while reading the Application configuration file. The file might be corrupted or contain invalid XML. + + + + The URL is invalid. Please enter a valid URL like http://microsoft.com/services + The URL is invalid. Please enter a valid URL like http://microsoft.com/services + + + + A service URL in the application configuration file is not in the expected format. + A service URL in the application configuration file is not in the expected format. + + + + Authentication, Roles and Web Settings providers have been configured via the Application configuration file such that they do not share a common connection string. + Authentication, Roles and Web Settings providers have been configured via the Application configuration file such that they do not share a common connection string. + + + + Specify a connection string to a SQL Server database, or use the special connection string "Data Source = |SQL/CE|", which causes SQL Server Compact to generate local database files for offline storage. + Specify a connection string to a SQL Server database, or use the special connection string "Data Source = |SQL/CE|", which causes SQL Server Compact to generate local database files for offline storage. + + + + The following type names were not understood: '{0}'. Make sure you have references to these types. + The following type names were not understood: '{0}'. Make sure you have references to these types. + + + + There are already settings with the following names: {0}. + There are already settings with the following names: {0}. + + + + The username/password combination cannot be authenticated. + The username/password combination cannot be authenticated. + + + + Windows Forms Application + Windows Forms Application + The "Windows Forms" distinguishes it from a WPF application + + + Namespace of the service reference. + Namespace of the service reference. + + + + Service Reference Properties + Service Reference Properties + + + + Metadata Location Url + Metadata Location Url + + + + Metadata Location + Metadata Location + + + + A service reference with multiple source urls is not supported. + A service reference with multiple source urls is not supported. + + + + Cannot change reference Url to empty. The reference url must be a valid URL. + Cannot change reference Url to empty. The reference url must be a valid URL. + + + + One or more files were reloaded during the checkout. Please retry your operation. + One or more files were reloaded during the checkout. Please retry your operation. + + + + The project was reloaded, and some changes on this page may have been lost. + The project was reloaded, and some changes on this page may have been lost. + + + + The application will fail to run in the selected zone because of this requested elevated permission. Click the help link above for more info. + The application will fail to run in the selected zone because of this requested elevated permission. Click the help link above for more info. + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.es.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.es.xlf new file mode 100644 index 00000000000..89398dabf58 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.es.xlf @@ -0,0 +1,2948 @@ + + + + + + All Files + Todos los archivos + + + + Property Page + Página de propiedades + + + + References + Referencias + + + + Version + Versión + + + + Signing + Firma + + + + Application + Aplicación + + + + Compile + Compilar + + + + Debug + Depurar + + + + Deploy + Implementar + + + + Database + Base de datos + + + + Security + Seguridad + + + + Build + Compilación + + + + Build Events + Eventos de compilación + + + + Reference Paths + Rutas de acceso de referencias + + + + Pre-build Event Command Line + Línea de comandos del evento anterior a la compilación + + + + Post-build Event Command Line + Línea de comandos del evento posterior a la compilación + + + + The output path is not trusted. +The application may throw security exceptions when it attempts to perform actions which require full trust. +Click OK to ignore and continue. Click CANCEL to choose a different output path. + La ruta de acceso de salida no es de confianza. +La aplicación puede producir excepciones de seguridad al intentar realizar acciones que requieran plena confianza. +Haga clic en ACEPTAR para pasar esto por alto y continuar. Haga clic en CANCELAR para elegir otra ruta de acceso de salida. + + + + <Browse...> + <Examinar...> + + + + (None) + (Ninguno) + + + + <New...> + <Nuevo...> + + + + <Browse...> + <Examinar...> + + + + (None) + (Ninguno) + + + + Active ({0}) + Activa ({0}) + + + + All Configurations + Todas las configuraciones + + + + All Platforms + Todas las plataformas + + + + N/A + N/A + This is used in the platform and configuration comboboxes when showing pages that don't care about the current platform/configuration + + + Could not find the configuration '{0}' for platform '{1}'. + No se encuentra la configuración '{0}' para la plataforma '{1}'. + + + + (None) + (Ninguno) + + + + Select File + Seleccionar archivo + + + + Add existing file to project + Agregar archivo existente al proyecto + + + + Icon Files + Archivos de icono + + + + Executable Files + Archivos ejecutables + + + + Select Working Directory + Seleccionar directorio de trabajo + + + + Select Output Path + Seleccionar ruta de acceso de salida + + + + Select Reference Path + Seleccionar ruta de acceso de referencia + + + + Win32 Resource Files + Archivos de recursos de Win32 + + + + Add Win32 resource file to project + Agregar archivo de recursos de Win32 al proyecto + + + + Folder path does not exist. +Please select a valid folder path. + La ruta de acceso de la carpeta no existe. +Seleccione una ruta de acceso de carpeta válida. + + + + Advanced Compiler Settings + Configuración avanzada del compilador + + + + Advanced Build Settings + Configuración avanzada de compilación + + + + Compiler Warnings + Advertencias del compilador + + + + Reference Paths + Rutas de acceso de referencias + + + + Compatible Settings + Configuración compatible + + + + Assembly Information + Información de ensamblado + + + + Invalid version format, expected "[Major]", "[Major].[Minor]", "[Major].[Minor].[Build]" or "[Major].[Minor].[Build].[Revision]" + Formato de versión no válido, se esperaba "[Principal]", "[Principal].[Secundaria]", "[Principal].[Secundaria].[Compilación]" o "[Principal].[Secundaria].[Compilación].[Revisión]" + + + + A wildcard ("*") is not allowed in this field. + No se permite el carácter comodín ("*") en este campo. + + + + Each part of the version number for '{0}' must be an integer between 0 and {1}. + Cada parte del número de versión de '{0}' debe ser un número entero entre 0 y {1}. + + + + (Default Icon) + (Icono predeterminado) + + + + Startup object must be a form when 'Enable application framework' is checked. + El objeto de inicio debe ser un formulario cuando la opción 'Habilitar marco de trabajo de la aplicación' está activada. + + + + (Not set) + (No establecido) + + + + Icon could not be added to the project. + No se pudo agregar el icono al proyecto. + + + + Invalid icon file. + Archivo de icono no válido. + + + + {0} is not a valid icon file. + {0} no es un archivo de icono válido. + + + + The GUID should match the format dddddddd-dddd-dddd-dddd-dddddddddddd. + El GUID debe tener el siguiente formato dddddddd-dddd-dddd-dddd-dddddddddddd. + + + + NOTE: This file is auto-generated; do not modify it directly. To make changes, + NOTA: Este archivo se genera automáticamente; no lo modifique directamente. Para hacer cambios, + These comments are placed in the ApplicationEvents.vb file if it is generated by the project designer. The same comments appear in the templates, under vsproject\Templates\Windows\VisualBasic\ProjectTemplates\WindowsApplication\MyEvents.vb (MyEvents.vb is renamed to ApplicationEvents.vb after project creation), and these comments should be kept in sync + + + or if you encounter build errors in this file, go to the Project Designer + o si detecta errores de compilación en este archivo, vaya al Diseñador de proyectos + + + + (go to Project Properties or double-click the My Project node in + (vaya a Propiedades del proyecto o haga doble clic en el nodo My Project en el + + + + Solution Explorer), and make changes on the Application tab. + Explorador de soluciones) y realice cambios en la pestaña Aplicación. + + + + '{0}' is not a valid identifier. Please select a different Startup form. + '{0}' no es un identificador válido. Seleccione otro formulario de inicio. + + + + '{0}' is not a valid identifier. Please select a different Splash screen form. + '{0}' no es un identificador válido. Seleccione otro formulario de pantalla de presentación. + + + + The splash screen form cannot be the start-up form. + La pantalla de presentación no puede ser el formulario de inicio. + + + + Startup f&orm: + F&ormulario de inicio: + + + + The following events are available for MyApplication: + Los siguientes eventos están disponibles para MyApplication: + + + + Startup: Raised when the application starts, before the startup form is created. + Inicio: Se genera cuando se inicia la aplicación, antes de que se cree el formulario de inicio. + + + + Shutdown: Raised after all application forms are closed. This event is not raised if the application terminates abnormally. + Apagado: Se genera después de haberse cerrado todos los formularios de aplicación. Este evento no se genera si la aplicación termina de forma anómala. + + + + UnhandledException: Raised if the application encounters an unhandled exception. + UnhandledException: Se genera si la aplicación encuentra una excepción no controlada. + + + + StartupNextInstance: Raised when launching a single-instance application and the application is already active. + StartupNextInstance: Se genera cuando se inicia una aplicación de instancia única y dicha aplicación está ya activa. + + + + NetworkAvailabilityChanged: Raised when the network connection is connected or disconnected. + NetworkAvailabilityChanged: Se genera cuando se conecta o desconecta la conexión de red. + + + + Base address must be a hexadecimal number with less than or equal to 8 digits, for example, 0x11000000. + La dirección base debe ser un número hexadecimal menor o igual a 8 dígitos, por ejemplo, 0x11000000. + + + + None + Ninguno + + + + Warning + Advertencia + + + + Error + Error + + + + (custom) + (personalizado) + + + + Implicit conversion + Conversión implícita + + + + Late binding; call could fail at run time + Enlace en tiempo de ejecución; la llamada podría fallar en tiempo de ejecución + + + + Implicit type; object assumed + Tipo implícito; se supone el objeto + + + + Use of variable prior to assignment + Uso de variable anterior a la asignación. + + + + Function/Operator without return value + Función u operador sin valor devuelto. + + + + Unused local variable + Variable local no usada. + + + + Instance variable accesses shared member + La variable de instancia obtiene acceso al miembro compartido + + + + Recursive operator or property access + Acceso a la propiedad u operador de forma recursiva + + + + Duplicate or overlapping catch blocks + Bloques catch duplicados o superpuestos + + + + The warning settings for one or more configurations conflict. +Changing this setting will reset the settings in all configurations. + Los valores de advertencia de una o varias configuraciones están en conflicto. +Si cambia este valor, se restablecerán los valores de todas las configuraciones. + + + + When startup form closes + Al cerrar el formulario de inicio + + + + When last form closes + Al cerrar el último formulario + + + + Windows + Windows + Authentication modes + + + Application-defined + Definido por la aplicación + Authentication modes + + + Cancel + Cancelar + + + + &Calculate Permissions + &Calcular permisos + + + + Stopped... + Detenido... + + + + Starting... + Iniciando... + + + + Building... + Compilando... + + + + Analyzing... + Analizando... + + + + Analyze Failed + No se pudo analizar + + + + Aborting... + Anulando... + + + + Canceling... + Cancelando... + + + + Internet + Internet + + + + Local Intranet + Intranet local + + + + (Custom) + (Personalizada) + Don't use + + + (Zone Default) + (Zona predeterminada) + + + + Include + Incluir + + + + Exclude + Excluir + + + + The application will require elevated permissions to run in the selected zone. Click the help link above for more info. + La aplicación necesitará permisos elevados para ejecutarse en la zona seleccionada. Haga clic en el vínculo de ayuda para obtener más información. + + + + This permission could not be loaded. Press the delete key to remove it from your project. + Este permiso no se puede cargar. Presione la tecla Supr para quitarlo del proyecto. + Don't use + + + Included + Se incluye + + + + Permission + Permiso + + + + Setting + Valor + + + + Specify the code access security permissions that your ClickOnce application requires in order to run. Learn more about code access security... + Especifique los permisos de seguridad de acceso del código que requiere la aplicación ClickOnce para ejecutarse. Obtener más información sobre la seguridad de acceso del código... + + + + Learn more about code access security... + Obtener más información sobre la seguridad de acceso del código... + + + + Invalid value + Valor no válido + + + + The SecurityPermission must be included in your application with the Execute flag set or your application will not run. Mark this permission as "Zone Default" or "Include." + Debe incluir SecurityPermission en la aplicación con la marca Ejecutar establecida; de lo contrario, no se ejecutará la aplicación. Marque este permiso como "Zona predeterminada" o "Incluir". + + + + The SecurityPermission must be included in your application with the Execute flag set or your application will not run. The Execute flag has been added to the SecurityPermission in your manifest. + Debe incluir SecurityPermission en la aplicación con la marca Ejecutar establecida; de lo contrario, no se ejecutará la aplicación. Se ha agregado la marca Ejecutar a SecurityPermission en el manifiesto. + + + + This application requires full trust to run correctly. Would you like to set this as a full trust application? + Esta aplicación requiere plena confianza para ejecutarse correctamente. ¿Quiere establecer esta aplicación como de plena confianza? + + + + Full Trust Required + Se requiere plena confianza + + + + An error occurred and the app.manifest file could not be saved. +Error: + No se pudo guardar el archivo app.manifest debido a un error. +Error: + + + + An error occurred and the app.manifest file could not be loaded. Please remove any changes you have made to the file and reload the Security property page again. + No se pudo cargar el archivo app.manifest debido a un error. Quite los cambios que han hecho en el archivo y recargue la página de propiedades de seguridad. + + + + Included + Se incluye + + + + Not Included + No se incluye + + + + Included with warning + Se incluye con advertencia + + + + Calculating permissions failed. + No se pudieron calcular los permisos. + + + + Error + Error + + + + Advanced Security Settings + Configuración avanzada de seguridad + + + + Build Failed. Click CANCEL and correct the build failure before analyzing again. + No se pudo llevar a cabo la compilación. Haga clic en CANCELAR y corrija el error de compilación antes de volver a ejecutar el análisis. + + + + Build completed... + Compilación completada... + + + + Unable to start the build. + No se puede iniciar la compilación. + + + + Serious error. The build must begin in order to analyze permissions. It has not started. + Error grave. La compilación debe comenzar para analizar los permisos. No se ha iniciado. + Don't use + + + (Custom) + (Personalizado) + Don't use + + + (None) + (Ninguno) + + + + Selecting existing key file + Selección de archivo de clave existente + + + + Key Files + Archivos de clave + + + + Create key file + Crear archivo de clave + + + + The old password is invalid. + La contraseña anterior no es válida. + + + + Enter the old password. + Escriba la contraseña antigua. + + + + Enter a new password. + Escriba la contraseña nueva. + + + + The new passwords do not match. Enter the password again. + Las contraseñas no coinciden. Vuelva a escribir la contraseña. + + + + The new password must be at least 6 characters in length. Enter the password again. + La contraseña nueva debe tener al menos 6 caracteres. Vuelva a escribir la contraseña. + + + + Select a Certificate + Selección de certificado + + + + Select a certificate to sign your ClickOnce manifests + Seleccionar un certificado para firmar los manifiestos de ClickOnce + + + + Certificate Files + Archivos de certificado + + + + Issued To + Emitido para + + + + Issued By + Emitido por + + + + Intended Purpose + Propósito + + + + Expiration Date + Fecha de expiración + + + + The password is invalid. + La contraseña no es válida. + + + + Invalid password + Contraseña no válida + + + + The selected file does not contain a private key. You must choose a certificate that contains a private key. + El archivo seleccionado no contiene una clave privada. Debe elegir un certificado que contenga una clave privada. + + + + Invalid key + Clave no válida + + + + Certificate Creation Error + Error de creación del certificado + + + + <All> + <Todo> + + + + The passwords do not match. + Las contraseñas no coinciden. + + + + Enter a password. + Escriba una contraseña. + + + + Confirm the password. + Confirme la contraseña. + + + + (none) + (ninguno) + + + + Enter password to open file + Escriba la contraseña para abrir el archivo + + + + Enter &password to open file {0} + Escriba la &contraseña para abrir el archivo {0} + + + + Enter &password for new file {0} + Escriba la &contraseña para el nuevo archivo {0} + + + + The project already contains a file with that name. Choose another certificate file or rename the file in your project. + El proyecto ya contiene un archivo con ese nombre. Elija otro archivo de certificado o cámbiele el nombre al archivo del proyecto. + + + + The file '{0}' could not be imported: {1} + No se puede importar el archivo '{0}': {1} + + + + _TemporaryKey.pfx + _TemporaryKey.pfx + + + + The selected certificate is not valid for code signing. Choose another certificate file. + El certificado seleccionado no es válido para la firma de código. Elija otro archivo de certificado. + + + + Change property: {0} + Cambiar la propiedad: {0} + + + + Windows Application + Aplicación Windows + + + + Windows Service + Servicio de Windows + + + + Class Library + Biblioteca de clases + + + + Console Application + Aplicación de consola + + + + Web Control Library + Biblioteca de controles web + + + + Cannot remove '{0}'. {1} + + No se puede quitar '{0}'. {1} + + + + + Adding or removing '{0}' as a project import failed because of an unexpected error from the project system. The error returned was: '{1}'. + No se pudo agregar o quitar '{0}' como importación de proyecto debido a un error inesperado del sistema del proyecto. El error devuelto es: '{1}'. + + + + Adding web reference failed. {0} + + No se pudo agregar la referencia web. {0} + + + + + Updating web reference '{0}' failed. +{1} + No se pudo actualizar la referencia web '{0}'. +{1} + + + + Web Reference Properties + Propiedades de la referencia web + + + + Static + Estático + + + + Dynamic + Dinámico + + + + Name of the web reference + Nombre de la referencia web + + + + URL Behavior + Comportamiento de la URL + + + + Web reference URL behavior + Comportamiento de la dirección URL de la referencia web + + + + Web Reference URL + URL de referencia web + + + + Web Reference URL + URL de referencia web + + + + Reference Properties + Propiedades de la referencia + + + + The remote machine name cannot be blank. Please specify the name of the machine to debug remotely. + El nombre de la máquina remota no puede estar en blanco. Especifique el nombre de la máquina para la depuración remota. + + + + The external program cannot be found. Please enter a valid executable file. + No se encuentra el programa externo. Especifique un archivo ejecutable válido. + + + + The external program property cannot be empty. Please enter a valid executable file. + La propiedad de programa externo no puede estar vacía. Especifique un archivo ejecutable válido. + + + + We can only debug an EXE file. Please enter a valid executable file. + Solo podemos depurar un archivo EXE. Especifique un archivo ejecutable válido. + + + + The URL property cannot be empty. Please enter a valid URL. + La propiedad URL no puede estar vacía. Especifique una dirección URL válida. + + + + The URL is invalid. Please enter a valid URL like "http://www.microsoft.com/" + La dirección URL no es válida. Escriba una dirección URL válida, como "http://www.microsoft.com/" + + + + The working directory you entered does not exist. Please enter a valid working directory. + El directorio de trabajo especificado no existe. Escriba un directorio de trabajo válido. + + + + <The system cannot find the reference specified> + <El sistema no encuentra la referencia especificada> + + + + Unused References + Referencias sin usar + + + + &Remove + &Quitar + + + + No unused references + No hay referencias sin usar + + + + Project compilation failed. Cannot determine unused references. + No se pudo compilar el proyecto. No se pueden determinar las referencias no usadas. + + + + Gathering list of unused references... + Recopilando la lista de referencias sin utilizar... + + + + Error getting unused references. + Error al obtener las referencias no usadas. + + + + Base address must be a hexadecimal number with less than or equal to 8 digits, for example, &H11000000. + La dirección base debe ser un número hexadecimal con 8 dígitos o menos, por ejemplo, &H11000000. + + + + "Resource files must have a .res file extension. Please enter a valid resource file name." + "Los archivos de recursos deben tener una extensión de archivo .res. Escriba un nombre de archivo de recursos válido". + + + + "The resource file entered does not exist." + "El archivo de recursos introducido no existe." + + + + Project Designer + Diseñador de proyectos + + + + Settings + Configuración + + + + Resources + Recursos + + + + An error occurred trying to load the project properties window. Close the window and try again. +{0} + Error al intentar cargar la ventana de propiedades del proyecto. Cierre la ventana y vuelva a intentarlo. +{0} + + + + An error occurred trying to load the page. + Error al intentar cargar la página. + + + + The designer cannot be shown because the document for it was never loaded. + No se puede mostrar el diseñador porque no se cargó el documento correspondiente. + + + + This project does not contain a default resources file. Click here to create one. + Este proyecto no contiene un archivo de recursos predeterminado. Haga clic aquí para crear uno. + + + + This project does not contain a default settings file. Click here to create one. + Este proyecto no contiene un archivo de configuración predeterminado. Haga clic aquí para crear uno. + + + + Could not find the file '{0}'. + No se encuentra el archivo '{0}'. + + + + The file '{0}' is already open in an editor. Please close the file and try again. + El archivo '{0}' ya está abierto en un editor. Ciérrelo y vuelva a intentarlo. + + + + All Project Designer Pages + Todas las páginas del Diseñador de proyectos + + + + More Settings + Más configuración + + + + The requested file type is not supported in projects of this type. + El tipo de archivo solicitado no es compatible en proyectos de este tipo. + + + + Assembly Name + Nombre del ensamblado + + + + Root Namespace + Espacio de nombres raíz + + + + Startup Object + Objeto de inicio + + + + Application Icon + Icono de aplicación + Property Friendly Names (for transaction names) - NOTE: All of these are optional + + + Assembly Version + Versión del ensamblado + + + + Assembly File Version + Versión del archivo de ensamblado + + + + Assembly GUID + GUID del ensamblado + + + + Enable application framework + Habilitar marco de trabajo de la aplicación + + + + External Program Path + Ruta de acceso del programa externo + + + + Start Browser With URL + Iniciar explorador con la dirección URL + + + + Working Directory + Directorio de trabajo + + + + Remote Machine Name + Nombre de la máquina remota + + + + Project Designer Page Container + Contenedor de página del Diseñador de proyectos + + + + Switch Project Designer Page + Cambiar página del Diseñador de proyectos + + + + Allow switching between active pages of the project designer (use Ctrl+PageUp and Ctrl+PageDown) + Permitir cambiar entre páginas activas del Diseñador de proyectos (utilizar Ctrl+PageUp y Ctrl+PageDown) + + + + {0} page: + Página {0}: + {0} = sub page name + + + {0} [Read Only] + {0} [solo lectura] + Attach a readonly to the designer caption {0}=Designer caption + + + The editor could not get the IVsTextStream for file {0}. + El editor no pudo obtener IVsTextStream para el archivo {0}. + #exception {0}=filename + + + The editor could not get the IVsTextStream. + El editor no pudo obtener IVsTextStream. + #exception (no file name) + + + No DesignerService for file '{0}'. + No hay ningún DesignerService para el archivo '{0}'. + #{0}=file name + + + Invalid physical view name. + Nombre de vista física no válido. + + + + Unable to create text buffer. + No se puede crear el búfer del texto. + # com exception + + + No LocalRegistry service. + No hay ningún servicio LocalRegistry. + #exception + + + Replacing text stream failed:{0} + No se pudo reemplazar la secuencia de texto: {0} + #exception {0}=err msg + + + Buffer is read only. + El búfer es de solo lectura + + + + File is already opened in an incompatible editor. + El archivo ya está abierto en un editor no compatible. + + + + Unsupported format. + Formato no admitido. + + + + Unknown Error. + Error desconocido. + + + + Unable to create the designer. {0} + No se puede crear el diseñador. {0} + # {0}=inner exception + + + Unable to check out the current file. The file may be read-only or locked, or you may need to check the file out manually. + El archivo actual no se puede extraer del repositorio. Puede que el archivo sea de solo lectura o que esté bloqueado, o quizá sea necesario extraer el archivo del repositorio manualmente. + # General checkout exception message + + + Microsoft Visual Studio + Microsoft Visual Studio + Error reporting + + + Please enter an integer between 1 and 60. + Especifique un entero entre 1 y 60. + + + + Please enter an integer between 1 and 60. + Especifique un entero entre 1 y 60. + + + + Show empty environment + Mostrar el entorno vacío + These are items in a combobox (and so they don't need periods) + + + Load last loaded solution + Cargar la última solución cargada + These are items in a combobox (and so they don't need periods) + + + Show New Project dialog box + Mostrar Nuevo proyecto + These are items in a combobox (and so they don't need periods) + + + Show Open Project dialog box + Mostrar Abrir proyecto + These are items in a combobox (and so they don't need periods) + + + Changes in Help Options will not take effect until the environment is restarted. + Los cambios en las opciones de la Ayuda no tendrán efecto hasta que se reinicie el entorno. + + + + The location specified is on an invalid or read-only disk, or contains a device name reserved for the system. + La ubicación especificada corresponde a un disco no válido o de solo lectura o contiene el nombre de un dispositivo reservado para el sistema. + + + + COM + COM + + + + Component Design + Diseño de componentes + + + + Serialization + Serialización + + + + Web + Web + + + + COMClass + COMClass + + + + Expose {0} to COM. + Exponer {0} a COM. + + + + COM Class + Clase COM + + + + COMVisible + COMVisible + + + + Make {0} visible through COM. + Hacer {0} visible a través de COM. + + + + COM Visible + Visible a través de COM + + + + DispId + DispId + + + + Set explicit DispId to this {0}. + Establecer el valor DispId explícito a {0}. + + + + DispId + DispId + + + + Value + Valor + + + + Explicit DispId value for this {0}. + Valor DispId explícito para {0}. + + + + Value + Valor + + + + DispId value should be an integer greater than or equal to 1. + El valor DispId debe ser un número entero mayor o igual a 1. + + + + Category + Categoría + + + + Category group for the property. + Grupo de categorías de la propiedad. + + + + Category + Categoría + + + + Default Event + Evento predeterminado + + + + Default event for the class. + Evento predeterminado para la clase. + + + + Default Event + Evento predeterminado + + + + Default Value + Valor predeterminado + + + + Default value for the property. + Valor predeterminado de la propiedad. + + + + Default Value + Valor predeterminado + + + + NonSerialized + NonSerialized + + + + Field should not be serialized. + No se debe serializar el campo. + + + + Non Serialized + No serializado + + + + Serializable + Serializable + + + + Enable serialization for this {0} and its members. + Habilitar serialización para estos {0} y sus miembros. + + + + Serializable + Serializable + + + + WebMethod + WebMethod + + + + Expose method via web services. + Exponer método a través de servicios Web. + + + + Web Method + Método web + + + + Description + Descripción + + + + Description for the Web Method. + Descripción del método web. + + + + Description + Descripción + + + + EnableSession + EnableSession + + + + Maintain session state. + Mantener estado de sesión. + + + + Enable Session + Habilitar sesión + + + + TransactionOptions + TransactionOptions + + + + Set transaction options. + Establecer opciones de transacción. + + + + Transaction Options + Opciones de transacción + + + + WebService + WebService + + + + Configure the Web Service settings. + Configurar los parámetros del servicio Web. + + + + Web Service + Servicio Web + + + + Name + Nombre + + + + Name for the web service. + Nombre del servicio Web. + + + + Name + Nombre + + + + Description + Descripción + + + + Description for the web service. + Descripción del servicio Web. + + + + Description + Descripción + + + + Namespace + Espacio de nombres + + + + Namespace for the web service. + Espacio de nombres del servicio Web. + + + + Namespace + Espacio de nombres + + + + Default + Predeterminado + + + + Action + Acción + + + + Appearance + Apariencia + + + + Behavior + Comportamiento + + + + Data + Datos + + + + DragDrop + Arrastrar y colocar + + + + Focus + Foco + + + + Format + Formato + + + + Key + Clave + + + + Layout + Diseño + + + + Mouse + Mouse + + + + WindowStyle + Estilo de ventana + + + + (None) + (Ninguno) + Default Event + + + Requires: + Requiere: + + + + Name + Nombre + Column names for the string table + + + Type + Tipo + Column names for the string table + + + Value + Valor + Column names for the string table + + + Comment + Comentario + Column names for the string table + + + Failed to generate file: {0} + No se pudo generar el archivo: {0} + + + + Editing embedded resources directly is not supported. Do you wish to convert this item to a linked resource in order to edit it? + No se admite la edición directa de recursos insertados ¿Quiere convertir este elemento en un recurso vinculado para poder editarlo? + + + + The current object is auto-generated and only supports renaming through the Managed Resources Editor. + El objeto actual se genera automáticamente y sólo admite el cambio de nombre a través del Editor de recursos administrados. + + + + Cannot find the file '{0}'. It may have been moved or deleted. + No se encuentra el archivo '{0}'. Puede que se haya movido o eliminado. + {0} = file name and path + + + Unable to load resource from file '{0}'. + No se puede cargar el recurso del archivo '{0}'. + {0} = file name and path + + + The resource name cannot be empty. + El nombre del recurso no puede estar vacío. + + + + There is already another resource with the name '{0}'. + Ya existe un recurso con el nombre '{0}'. + {0} = Resource name + + + The resource was not of the expected type. + El recurso no era del tipo esperado. + This error can happen if, for example, you try to add foo.bmp to the resource editor, but foo.bmp is really a metafile. + + + Unable to create new resource file '{0}'. {1} + No se puede crear el nuevo archivo de recursos '{0}'. {1} + {0} = file name and path, {1} = additional error information + + + Unable to play the audio resource. {0} + No se puede reproducir el recurso de sonido. {0} + {0} = Additional error information. + + + Resource '{0}' cannot be saved to a file. + No se puede guardar en un archivo el recurso '{0}'. + {0} = Resource name + + + The operation has been canceled by the user. + El usuario canceló la operación. + + + + The resource value contains invalid data or has an incorrect format. + El valor del recurso contiene datos no válidos o no tiene el formato correcto. + + + + The name of the resource '{0}' cannot be used as a valid identifier, because it contains one or more invalid characters: '{1}'. Please remove or replace those characters and try again. + El nombre del recurso '{0}' no se puede usar como un identificador válido, porque contiene uno o varios caracteres no válidos: '{1}'. Quite o reemplace esos caracteres y vuelva a intentarlo. + {0} = Resource name + + + Too many files specified. Please select fewer files and try again. + Se han especificado demasiados archivos. Seleccione menos archivos y vuelva a intentarlo. + + + + Unexpected error. + Error inesperado. + Theoretically possible but we really don't expect to happen. Unexpected, internal error. + + + Unable to load internal localized resource '{0}'. + No se pudo cargar el recurso adaptado interno '{0}'. + Theoretically possible but we really don't expect to happen. Unexpected, internal error. + + + The value could not be converted into a resource of type {0}. + +{1} + El valor no se puede convertir en un recurso de tipo {0}. + +{1} + {0} = the type that was expected by the resource editor (e.g. System.Drawing.Point) +{1} = more specific additional error message from the system + + + The value cannot be empty in a resource of type {0}. + El valor no puede estar vacío en un recurso de tipo {0}. + {0} = the type that was expected by the resource editor (e.g. System.Drawing.Point) + + + One or more of the selected resource values could not be cleared. + Uno o más de los valores seleccionados de los recursos no se pudieron borrar. + + + + The resource file cannot be modified at this time. + No se puede modificar en este momento el archivo de recursos. + + + + You are trying to edit a resource file that is a part of another project item (such as a form or a control). Editing this item could corrupt the project item, and you will have to recover it by hand. In addition, changes made to this resource file may be lost if further changes are made to the project item. + +Do you really want to edit this file? + Está intentando editar un archivo de recursos que forma parte de otro elemento de proyecto (como un formulario o un control). Si edita este elemento, puede dañar el elemento de proyecto y tendrá que recuperarlo manualmente. Además, los cambios realizados en este archivo de recursos pueden perderse si se hacen más cambios en el elemento de proyecto. + +¿Realmente quiere editar este archivo? + + + + The resource '{0}' cannot be added. + No se puede agregar el recurso '{0}'. + {0} - name of the resource + + + The device does not support '{0}' files. + El dispositivo no admite archivos '{0}'. + {0} - the extension of the file name like 'tiff' + + + The resource item uses the type '{0}', which is not supported in this project. + El elemento de recurso utiliza el tipo '{0}'; que no se admite en este proyecto. + {0} - name of the type + + + The resource item(s) {0} cannot be saved correctly. The item(s) will be discarded. + Los elementos de recurso {0} no se pueden guardar correctamente. Estos elementos se descartarán. + {0} - name list of the resource + + + '{0}' + '{0}' + {0} - name + + + {0}, '{1}' + {0}, '{1}' + # {0} - name list +# {1} - another name + + + (Nothing/null) + (Nada/nulo) + Displayed in a string table for values of Nothing/null +CONSIDER: get this from CodeDom + + + (Unknown type) + (Tipo desconocido) + This actually shouldn't be needed, but if we get an exception trying to get the type name of an entry in the resx file (not supposed to happen), then we'll display this as its type. + + + (Value cannot be displayed) + (El valor no se puede mostrar) + Displayed in a string table for values which cannot be edited by the user + + + Name + Nombre + Columns for the "Details" view of the resource editor + + + Filename + Nombre de archivo + Columns for the "Details" view of the resource editor + + + Type + Tipo + Columns for the "Details" view of the resource editor + + + Size + Tamaño + Columns for the "Details" view of the resource editor + + + Comment + Comentario + Columns for the "Details" view of the resource editor + + + Text Encoding + Codificación de texto + Columns for the "Details" view of the resource editor + + + {0} x {1} + {0} x {1} + Format string for showing a graphic's size + +# {0} = width (as an integer) +# {1} = height (as an integer) +#Example, for a bitmap of width=123, height = 456, the English version of this string would be "123x456" + + + {0} KB + {0} KB + #Format string for showing a file's size +# {0} = length in kilobytes + + + {0} byte(s) + {0} bytes + Format string for showing a file's size. +{0} = length in bytes + + + Strings + Cadenas + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + Images + Imágenes + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + Icons + Iconos + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + Audio + Audio + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + Files + Archivos + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + Other + Otro + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + &Add + &Agregar + Add, Delete and Views button text in the main ToolStrip + + + &Remove + &Quitar + Add, Delete and Views button text in the main ToolStrip + + + &Views + &Vistas + Add, Delete and Views button text in the main ToolStrip + + + &Existing File... + Archivo &existente... + Menu items under the "Add" button + + + New &String + Nueva &cadena + Menu items under the "Add" button + + + New &Image + Nueva i&magen + Menu items under the "Add" button + + + &PNG Image... + Imagen &PNG... + Menu items under the "Add" button + + + &BMP Image... + Imagen &BMP... + Menu items under the "Add" button + + + &GIF Image... + Imagen &GIF... + Menu items under the "Add" button + + + &JPEG Image... + Imagen &JPEG... + Menu items under the "Add" button + + + &TIFF Image... + Imagen &TIFF... + Menu items under the "Add" button + + + New I&con... + Nuevo i&cono... + Menu items under the "Add" button + + + New &Text File... + Nuevo archivo de te&xto... + Menu items under the "Add" button + + + Windows Bitmap + Mapa de bits de Windows + Friendly Image types + + + EXIF Image + Imagen EXIF + Friendly Image types + + + Graphics Interchange Format + Formato de intercambio de gráficos + Friendly Image types + + + JPEG File Interchange Format + Formato de intercambio de archivos JPEG + Friendly Image types + + + Windows Bitmap + Mapa de bits de Windows + Friendly Image types + + + Portable Network Graphics + Formato PNG (Portable Network Graphics) + Friendly Image types + + + Tag Image File Format + Formato TIFF (Tag Image File Format) + Friendly Image types + + + Icon + Icono + Friendly Image types + + + Text File + Archivo de texto + Friendly Image types + + + Binary File + Archivo binario + + + + Wave Sound + Archivo de sonido + Friendly Image types + + + Linked at compile time + Vinculado en tiempo de compilación + File Persistence Mode + + + Embedded in .resx + Insertado en .resx + File Persistence Mode + + + Bitmaps + Mapas de bits + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Icons + Iconos + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Audio + Audio + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Text Files + Archivos de texto + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + All Files + Todos los archivos + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Windows Bitmap + Mapa de bits de Windows + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Portable Network Graphics + Formato PNG (Portable Network Graphics) + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Graphics Interchange Format + Formato de intercambio de gráficos + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + JPEG File Interchange Format + Formato de intercambio de archivos JPEG + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Tag Image File Format + Formato TIFF (Tag Image File Format) + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Icon + Icono + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + &List + &Lista + Resource editor listview view styles (like changing the view style of a folder in Windows XP) + + + &Details + &Detalles + Resource editor listview view styles (like changing the view style of a folder in Windows XP) + + + &Thumbnail + &Miniatura + Resource editor listview view styles (like changing the view style of a folder in Windows XP) + + + Managed Resources Editor + Editor de recursos administrados + + + + Add existing file to resources + Agregar archivo existente a los recursos + + + + Import file into resource '{0}' + Importar archivo en el recurso '{0}' + {0} = Name of resource being imported into + + + Export resource '{0}' to file + Exportar el recurso '{0}' a un archivo + {0} = Name of resource being exported from + + + Please specify where to save the new file + Especifique dónde desea guardar el nuevo archivo + + + + The file '{0}' already exists. Do you want to replace it? + El archivo '{0}' ya existe. ¿Quiere reemplazarlo? + {0} = full file path and name + + + The following files already exist. Do you want to replace them? + Los siguientes archivos ya existen. ¿Quiere reemplazarlos? + + + + Select a folder in which to export the resources. + Seleccione una carpeta para exportar los recursos. + + + + Do you want to continue anyway? + ¿Desea continuar de todas formas? + + + + Do you want to enable strongly-typed resource generation for this file? + ¿Desea habilitar la generación de recursos fuertemente tipados para este archivo? + + + + Resource '{0}' could not be loaded because the file to which it is linked could not be found: {1}. + No se puede cargar el recurso '{0}' porque no se encuentra el archivo al que está vinculado: {1}. + {0} = resource name that had the error, {1} = file path/name that could not be found + + + Resource '{0}' could not be instantiated. {1} + No se puede crear una instancia del recurso '{0}'. {1} + {0} = resource name that had the error, {1} = extended error information + + + Resource '{0}' has a name that is not recommended and that may cause compilation errors in your code. Please choose another name. + El recurso '{0}' tiene un nombre no recomendado que puede producir errores de compilación en el código. Elija otro nombre. + {0} = resource name that had the error + + + Unable to set the Custom Tool or Custom Tool Namespace properties of this file in order to change strongly-typed resource generation options. If the project file is checked in, try checking it out. + No se pueden establecer las propiedades “Herramienta personalizada” o “Espacio de nombres de la herramienta personalizada” de este archivo para cambiar opciones de generación de recursos fuertemente tipados. Si el archivo del proyecto está insertado en el repositorio, pruebe extrayéndolo del repositorio. + One possible source for this error is that source code control checkout failed or was canceled. + + + Double-click here to enable strongly-typed resources for this file. + Haga doble clic aquí para habilitar los recursos fuertemente tipados para este archivo. + + + + The resource name '{0}' is not a valid identifier. + El nombre del recurso '{0}' no es un identificador válido. + + + + {0} - Codepage {1} + {0}: Página de códigos {1} + {0} = encoding name (e.g., "Western European (Windows)"), {1} = code page # (e.g., 85001) + + + (Default) + (Predeterminada) + + + + Change resource name + Cambiar nombre de recurso + + + + Add {0} new resource(s) + Agregar {0} recursos nuevos + {0} = number of resources added + + + Remove {0} resource(s) + Quitar {0} recursos + {0} = number of resources removed + + + Delete values in {0} cell(s) + Eliminar valores en {0} celdas + {0} = number of cells cleared + + + &Categories: + &Categorías: + The label in the menu strip for the combobox that holds the categories of resources to display + + + Name used to identify the resource in code. + Nombre utilizado para identificar el recurso en el código. + + + + Additional information about the resource. This property is only meaningful at design time. + Información adicional sobre el recurso. Esta propiedad solo es significativa en tiempo de diseño. + + + + Character encoding of the file. + Codificación de caracteres del archivo. + + + + The path to the linked resource. + Ruta de acceso del recurso vinculado. + + + + Specifies whether the file resource is text or binary. + Especifica si el recurso de archivo es de texto o binario. + + + + Specifies whether the resource is embedded or linked. Embedded resources are saved in the resource file. Linked resources reside in an external location on disk. + Especifica si el recurso se inserta o se vincula. Los recursos insertados se guardan en el archivo de recursos. Los recursos vinculados residen en una ubicación externa del disco. + + + + The resource will be generated as this type in the strongly-typed resource class. For example, the resource might be generated as a String or Bitmap object. + El recurso se generará con este tipo en la clase de recurso fuertemente tipada. Por ejemplo, puede que el recurso se genere como un objeto String o Bitmap. + + + + The value of the resource. + Valor del recurso. + + + + Unable to add a '{0}' folder to this project. + +{1} + No se puede agregar una carpeta '{0}' a este proyecto. + +{1} + {0} = name of folder trying to add (by default, this will be "Resources"), {1} = additional error information + + + Unable to add '{0}' to the project. + +{1} + No se puede agregar '{0}' al proyecto. + +{1} + {0} = file name and path, {1} = additional error information. + + + Unable to add '{0}' to the project. + No se puede agregar '{0}' al proyecto. + {0} = file name and path + + + A file with the name '{0}' already exists. Do you want to replace it? + Ya existe un archivo con el nombre '{0}'. ¿Quiere reemplazarlo? + {0} = file name and path + + + {0} - Destination File Exists + {0}: El archivo de destino ya existe + {0} = Name of the editor, e.g. "Managed Resources Editor" or "Resource Picker" + + + There is already a linked file with the name "{0}" in the project folder "{1}". Do you want to remove it? + Ya hay un archivo vinculado con el nombre "{0}" en la carpeta de proyecto "{1}". ¿Quiere quitarlo? + {0} = file name (no path), {1} = Path of resource folder + + + {0} - Destination File Exists + {0}: El archivo de destino ya existe + {0} = Name of the editor, e.g. "Managed Resources Editor" or "Resource Picker" + + + Cannot find the file '{0}'. It may have been moved or deleted. + No se encuentra el archivo '{0}'. Puede que se haya movido o eliminado. + {0} = file name and path + + + Connection string + Cadena de conexión + Added as the last item in the list of available types to let the user browse for a new type + + + Web Service URL + URL del servicio web + Added as the last item in the list of available types to let the user browse for a new type + + + Browse... + Examinar... + Added as the last item in the list of available types to let the user browse for a new type + + + Application + Aplicación + + + + Application (Web) + Aplicación (web) + + + + User + Usuario + + + + User (Web) + Usuario (web) + + + + Name + Nombre + + + + Type + Tipo + + + + Scope + Ámbito + + + + Value + Valor + + + + Type '{0}' is not defined. + El tipo '{0}' no está definido. + + + + Name changed + Cambio de nombre + + + + Type changed + Cambio de tipo + + + + Scope changed + Cambio de ámbito + + + + Roaming changed + Cambio de itinerancia + + + + Description changed + Cambio de descripción + + + + Provider changed + Cambio de proveedor + + + + Value changed + Cambio de valor + + + + Generate default value in code changed + Generar valor predeterminado en el código cambiado + + + + Remove {0} setting(s) + Quitar configuración {0} + + + + Unable to load settings file. It might be corrupted or contain invalid XML or contain duplicate identifiers. + No se puede cargar el archivo de configuración. Puede que esté dañado, que contenga código XML no válido o identificadores de duplicados. + + + + New values from the app.config file were automatically added + Se agregaron automáticamente nuevos valores del archivo app.config + + + + Value of setting '{0}' was changed in the app.config file. + El valor de la configuración '{0}' se cambió en el archivo app.config. + + + + The current value in the .settings file is '{0}' +The new value in the app.config file is '{1}' + +Do you want to update the value in the .settings file? + El valor actual en el archivo .settings es '{0}' +El nuevo valor del archivo app.config es '{1}' + +¿Quiere actualizar el valor del archivo .settings? + + + + An error occurred while reading the app.config file. The file might be corrupted or contain invalid XML. + Error al leer el archivo app.config. Puede que esté dañado o que contenga código XML no válido. + + + + An error occurred while saving values to the app.config file. The file might be corrupted or contain invalid XML. + Error al guardar valores en el archivo app.config. Puede que esté dañado o que contenga código XML no válido. + + + + There is already another setting with the name '{0}'. + Ya existe otra configuración con el nombre '{0}'. + + + + '{0}' is not a valid identifier. + '{0}' no es un identificador válido. + + + + '{0}' is not a valid type name. + '{0}' no es un nombre de tipo válido. + + + + The setting name cannot be empty. + El nombre del valor de configuración no puede estar vacío. + + + + '{0}' cannot be converted to an instance of type '{1}'. + '{0}' no se puede convertir en una instancia de tipo '{1}'. + + + + Generic types are not supported. + Los tipos genéricos no son compatibles. + + + + Abstract types are not supported. + Los tipos abstractos no son compatibles. + + + + The current object is auto-generated and only supports renaming through the Settings Designer. + El objeto actual se generó automáticamente y sólo admite el cambio de nombre a través del Diseñador de configuración. + + + + The current object is auto-generated and does not support modifying parameters. + El objeto actual se generó automáticamente y no admite parámetros de modificación. + + + + The settings file cannot be modified at this time. + El archivo de configuración no se puede modificar en este momento. + + + + &Add Setting + &Agregar valor de configuración + + + + R&emove Setting + &Quitar valor de configuración + + + + Application settings allow you to store and retrieve property settings and other information for your application dynamically. For example, the application can save a user's color preferences, then retrieve them the next time it runs. + La configuración de la aplicación permite almacenar y recuperar de forma dinámica la configuración de propiedades y otra información de la aplicación. Por ejemplo, la aplicación puede guardar las preferencias de color de un usuario y recuperarlas la próxima vez que se ejecute. + + + + Learn more about application settings... + Aprender más acerca de la configuración de la aplicación... + + + + This connection string appears to contain sensitive data (for example, a password), which is required to connect to the database. However, storing sensitive data in the connection string can be a security risk. Do you want to include sensitive data in the connection string? + Esta cadena de conexión parece contener datos confidenciales (por ejemplo una contraseña), que son necesarios para conectarse a la base de datos. Sin embargo, almacenar información confidencial en la cadena de conexión puede suponer un riesgo para la seguridad. ¿Quiere incluir datos confidenciales en la cadena de conexión? + + + + Select a Type + Seleccionar un tipo + + + + This class allows you to handle specific events on the settings class: + Esta clase le permite controlar eventos específicos en la clase de configuración: + Comments for user part of extending generated settings class + + + The SettingChanging event is raised before a setting's value is changed. + El evento SettingChanging se desencadena antes de cambiar un valor de configuración. + + + + The PropertyChanged event is raised after a setting's value is changed. + El evento PropertyChanged se desencadena después de cambiar el valor de configuración. + + + + The SettingsLoaded event is raised after the setting values are loaded. + El evento SettingsLoaded se desencadena después de cargar los valores de configuración. + + + + The SettingsSaving event is raised before the setting values are saved. + El evento SettingsSaving se desencadena antes de guardar los valores de configuración. + + + + To add event handlers for saving and changing settings, uncomment the lines below: + Para agregar los controladores de eventos para guardar y cambiar la configuración, quite la marca de comentario de las líneas: + + + + Add code to handle the SettingChangingEvent event here. + Agregar código para administrar aquí el evento SettingChangingEvent. + + + + Add code to handle the SettingsSaving event here. + Agregar código para administrar aquí el evento SettingsSaving. + + + + Failed to create or open file. + Error al crear o abrir el archivo. + + + + Description of the setting. + Descripción del valor de configuración. + + + + Specifies whether or not the default setting value should be generated in the strongly-typed settings class. + Especifica si el valor de configuración predeterminado debe generarse o no en la clase de configuración fuertemente tipada. + + + + Specifies the group to which this Settings file belongs. + Especifica el grupo al que pertenece este archivo de configuración. + + + + Description of the group to which this Settings file belongs. + Descripción del grupo al que pertenece este archivo de configuración. + + + + Indicates whether the setting should roam when Windows roaming profiles are enabled. + Indica si la configuración debe ser itinerante cuando están habilitados los perfiles itinerantes de Windows. + + + + Name used to identify the setting. + Nombre utilizado para identificar la configuración. + + + + The provider (System.Configuration.Provider.ProviderBase) used to manage the setting. + El proveedor System.Configuration.Provider.ProviderBase utilizado para administrar la configuración. + + + + Specifies whether the setting is per-application (read-only) or per-user (read-write). + Especifica si la configuración es por aplicación (solo lectura) o por usuario (lectura-escritura). + + + + The setting will be generated as this type in the strongly-typed settings class. For example, the setting might be generated as a String or Integer object. + El valor de configuración se generará con este tipo en la clase de configuración fuertemente tipada. Por ejemplo, el valor de configuración podría generarse como un objeto String o Integer. + + + + The current value for the setting. + El valor actual de la configuración. + + + + The following files will be deleted: + +{0} + Los archivos siguientes se eliminarán: + +{0} + Synchronize with user.config file + + + No user.config files were found in any of the following locations: + +{0} + No se han encontrado archivos user.config en ninguna de las siguientes ubicaciones: + +{0} + + + + One or more user.config files was not removed. + No se pudieron quitar uno o varios archivos user.config. + + + + My.Settings Auto-Save Functionality + Funcionalidad para autoguardar My.Settings + in-code comment used to generate a region that hides My.Settings AutoSave functionality + + + Unable to find service '{0}'. Ensure that the application is installed correctly. + No se encuentra el servicio '{0}'. Asegúrese de que la aplicación se ha instalado correctamente. + Settings Global-Object-Provider Strings + + + Default pac&kage: + Paq&uete predeterminado: + J# Specific String for Root Namespace + + + (Custom) + (Personalizado) + Entry in the "Accessibility dropdown" + + + No code generation + Sin generación de código + Entry in the "Accessibility dropdown" + + + WPF Application + Aplicación WPF + + + + (Invalid value: "{0}") + (Valor no válido: "{0}") + Goes into the ShutdownMode combobox + + + On explicit shutdown + Al apagar explícitamente + + + + On last window close + Al cerrar la última ventana + + + + On main window close + Al cerrar la ventana principal + + + + Could not find the expected root element "{0}" in the application definition file. + No se pudo encontrar el elemento raíz esperado "{0}" en el archivo de definición de aplicación. + + + + The .xaml file was in an unexpected format, near line {0} column {1}. + El archivo .xaml tenía un formato no esperado cerca de la línea {0}, columna {1}. + + + + Startup &object: + &Objeto de inicio: + + + + Startup &URI: + &URI de inicio: + + + + The application definition file is already opened in an incompatible editor. Please close the other editor and reload the project properties page. + El archivo de definición de aplicación ya está abierto en un editor incompatible. Cierre el otro editor y recargue la página de propiedades del proyecto. + + + + There was an error trying to open or create the application definition file for this project. {0} + Error al intentar abrir o crear el archivo de definición de aplicación para este proyecto. {0} + + + + An error occurred trying to load the application definition file for this project. The file '{0}' could not be parsed. Please edit the file in the XAML editor to fix the error. + Error al intentar cargar el archivo de definición de aplicación para este proyecto. El archivo '{0}' no se puede analizar. Edite el archivo en el editor XAML para corregir el error. + + + + (Error) + (Error) + Used inside UI elements when there is an error (e.g. combobox text) + + + An unspecified error has occurred. + Error no especificado. + + + + This project does not contain an application definition file. + Este proyecto no contiene un archivo de definición de aplicación. + + + + An error occurred trying to create the application events file. {0} + Error al intentar crear el archivo de eventos de la aplicación. {0} + + + + Invalid argument '{0}' + Argumento '{0}' no válido + {0} = name of invalid argument + + + WPF Console Application + Aplicación de consola WPF + + + + WPF Class Library + Biblioteca de clases WPF + + + + Embed manifest with default settings + Incrustar manifiesto con configuración predeterminada + + + + Create application without a manifest + Crear la aplicación sin manifiesto + + + + Invalid manifest file. + Archivo de manifiesto no válido. + + + + Services + Servicios + + + + Client application services enable your Windows-based applications to use the ASP.NET login (authentication), roles, and profile (settings) services. + Los servicios de aplicación cliente permiten que las aplicaciones de Windows utilicen los servicios de inicio de sesión (autenticación), roles y perfil (configuración) de ASP.NET. + + + + Learn more about client application services... + Más información sobre los servicios de aplicación cliente... + + + + Advanced Settings for Services + Configuración avanzada de servicios + + + + Disabling application services will clear the default services for Authentication, Roles, and Settings. Click OK to disable application services. + Si deshabilita los servicios de aplicación, se borrarán los servicios predeterminados de Autenticación, Roles y Configuración. Haga clic en Aceptar para deshabilitar los servicios de aplicación. + + + + Disable Application Services + Deshabilitar servicios de aplicación + + + + seconds + segundos + + + + minutes + minutos + + + + hours + horas + + + + days + días + + + + To enable client application services, you must set the Target Framework for your application to .NET Framework 3.5 or later. In C#, you can do this on the Application property page. In Visual Basic, you can do this one the Compile property page by clicking Advanced Compile Options. + Para habilitar los servicios de aplicación cliente, debe establecer la versión de .NET Framework de destino de la aplicación en .NET Framework 3.5 o posterior. En C#, puede hacerlo en la página de propiedades de la aplicación. En Visual Basic, puede hacerlo en la página de propiedades de compilación haciendo clic en Opciones de compilación avanzadas. + + + + An error occurred while reading the Application configuration file. The file might be corrupted or contain invalid XML. + Error al leer el archivo de configuración de la aplicación. Puede que el archivo esté dañado o que contenga código XML no válido. + + + + The URL is invalid. Please enter a valid URL like http://microsoft.com/services + La dirección URL no es válida. Escriba una dirección URL válida, como http://microsoft.com/services. + + + + A service URL in the application configuration file is not in the expected format. + Una dirección URL de servicio en el archivo de configuración de la aplicación no tiene el formato esperado. + + + + Authentication, Roles and Web Settings providers have been configured via the Application configuration file such that they do not share a common connection string. + Los proveedores de Autenticación, Roles y Configuración web se han configurado a través del archivo de configuración de la aplicación de modo que no comparten una cadena de conexión común. + + + + Specify a connection string to a SQL Server database, or use the special connection string "Data Source = |SQL/CE|", which causes SQL Server Compact to generate local database files for offline storage. + Especifique una cadena de conexión a una base de datos SQL Server o utilice la cadena de conexión especial "Data Source = |SQL/CE|", para que SQL Server Compact genere archivos de base de datos locales para el almacenamiento sin conexión. + + + + The following type names were not understood: '{0}'. Make sure you have references to these types. + No se pudieron interpretar los siguientes nombres de tipo: '{0}'. Asegúrese de que existen referencias a estos tipos. + + + + There are already settings with the following names: {0}. + Ya hay valores con los nombres siguientes: {0}. + + + + The username/password combination cannot be authenticated. + La combinación de nombre de usuario y contraseña no se puede autenticar. + + + + Windows Forms Application + Aplicación de Windows Forms + The "Windows Forms" distinguishes it from a WPF application + + + Namespace of the service reference. + Espacio de nombres de la referencia de servicio. + + + + Service Reference Properties + Propiedades de referencia de servicio + + + + Metadata Location Url + URL de ubicación de los metadatos + + + + Metadata Location + Ubicación de los metadatos + + + + A service reference with multiple source urls is not supported. + No se admiten referencias de servicio con varias direcciones URL de origen. + + + + Cannot change reference Url to empty. The reference url must be a valid URL. + No se puede cambiar la dirección URL de referencia para dejarla vacía. La URL de referencia debe ser una dirección URL válida. + + + + One or more files were reloaded during the checkout. Please retry your operation. + Se recargaron uno o varios archivos durante la extracción del repositorio. Vuelva a intentar la operación. + + + + The project was reloaded, and some changes on this page may have been lost. + El proyecto se ha recargado y puede que se hayan perdido algunos de los cambios realizados en esta página. + + + + The application will fail to run in the selected zone because of this requested elevated permission. Click the help link above for more info. + Error de la aplicación al ejecutarse en la zona seleccionada debido al permiso elevado solicitado. Haga clic en el vínculo de ayuda para obtener más información. + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.fr.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.fr.xlf new file mode 100644 index 00000000000..f5e2991076c --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.fr.xlf @@ -0,0 +1,2948 @@ + + + + + + All Files + Tous les fichiers + + + + Property Page + Page de propriétés + + + + References + Références + + + + Version + Version + + + + Signing + Signature + + + + Application + Application + + + + Compile + Compiler + + + + Debug + Déboguer + + + + Deploy + Déployer + + + + Database + Base de données + + + + Security + Sécurité + + + + Build + Build + + + + Build Events + Événements de build + + + + Reference Paths + Chemins des références + + + + Pre-build Event Command Line + Ligne de commande de l'événement pré-build + + + + Post-build Event Command Line + Ligne de commande de l'événement post-build + + + + The output path is not trusted. +The application may throw security exceptions when it attempts to perform actions which require full trust. +Click OK to ignore and continue. Click CANCEL to choose a different output path. + Le chemin de sortie n'est pas approuvé. +L'application risque de générer des exceptions de sécurité pendant l'exécution d'actions qui exigent une confiance totale. +Cliquez sur OK pour ignorer et continuer. Cliquez sur ANNULER pour choisir un autre chemin de sortie. + + + + <Browse...> + <Parcourir...> + + + + (None) + (Aucun) + + + + <New...> + <Nouveau...> + + + + <Browse...> + <Parcourir...> + + + + (None) + (Aucun) + + + + Active ({0}) + ({0}) active + + + + All Configurations + Toutes les configurations + + + + All Platforms + Toutes les plateformes + + + + N/A + N/A + This is used in the platform and configuration comboboxes when showing pages that don't care about the current platform/configuration + + + Could not find the configuration '{0}' for platform '{1}'. + Configuration '{0}' introuvable pour la plateforme '{1}'. + + + + (None) + (Aucun) + + + + Select File + Sélectionner le fichier + + + + Add existing file to project + Ajouter un fichier existant au projet + + + + Icon Files + Fichiers icône + + + + Executable Files + Fichiers exécutables + + + + Select Working Directory + Sélectionner le répertoire de travail + + + + Select Output Path + Sélectionner le chemin de sortie + + + + Select Reference Path + Sélectionner le chemin de référence + + + + Win32 Resource Files + Fichiers de ressources Win32 + + + + Add Win32 resource file to project + Ajouter un fichier de ressources Win32 au projet + + + + Folder path does not exist. +Please select a valid folder path. + Le chemin de dossier n'existe pas. +Sélectionnez un chemin de dossier valide. + + + + Advanced Compiler Settings + Paramètres avancés du compilateur + + + + Advanced Build Settings + Paramètres de génération avancés + + + + Compiler Warnings + Avertissements du compilateur + + + + Reference Paths + Chemins des références + + + + Compatible Settings + Paramètres compatibles + + + + Assembly Information + Informations de l'assembly + + + + Invalid version format, expected "[Major]", "[Major].[Minor]", "[Major].[Minor].[Build]" or "[Major].[Minor].[Build].[Revision]" + Format de version non valide, "[Major]", "[Major].[Minor]", "[Major].[Minor].[Build]" ou "[Major].[Minor].[Build].[Revision]" attendu + + + + A wildcard ("*") is not allowed in this field. + Les caractères génériques ("*") ne sont pas autorisés dans ce champ. + + + + Each part of the version number for '{0}' must be an integer between 0 and {1}. + Chaque partie du numéro de version de '{0}' doit être un entier compris entre 0 et {1}. + + + + (Default Icon) + (Icône par défaut) + + + + Startup object must be a form when 'Enable application framework' is checked. + Lorsque 'Activer le framework d'application' est coché, l'objet de démarrage doit être un formulaire. + + + + (Not set) + (Non défini) + + + + Icon could not be added to the project. + Impossible d'ajouter une icône au projet. + + + + Invalid icon file. + Fichier icône non valide. + + + + {0} is not a valid icon file. + {0} n'est pas un fichier icône valide. + + + + The GUID should match the format dddddddd-dddd-dddd-dddd-dddddddddddd. + Le GUID doit correspondre au format dddddddd-dddd-dddd-dddd-dddddddddddd. + + + + NOTE: This file is auto-generated; do not modify it directly. To make changes, + REMARQUE : Ce fichier étant généré automatiquement, ne le modifiez pas directement. Pour apporter des modifications, + These comments are placed in the ApplicationEvents.vb file if it is generated by the project designer. The same comments appear in the templates, under vsproject\Templates\Windows\VisualBasic\ProjectTemplates\WindowsApplication\MyEvents.vb (MyEvents.vb is renamed to ApplicationEvents.vb after project creation), and these comments should be kept in sync + + + or if you encounter build errors in this file, go to the Project Designer + ou si vous rencontrez des erreurs de build dans ce fichier, accédez au Concepteur de projets + + + + (go to Project Properties or double-click the My Project node in + (allez dans les propriétés du projet ou double-cliquez sur le nœud My Project dans + + + + Solution Explorer), and make changes on the Application tab. + l'Explorateur de solutions), puis apportez vos modifications sous l'onglet Application. + + + + '{0}' is not a valid identifier. Please select a different Startup form. + '{0}' n'est pas un identificateur valide. Sélectionnez un autre formulaire de démarrage. + + + + '{0}' is not a valid identifier. Please select a different Splash screen form. + '{0}' n'est pas un identificateur valide. Sélectionnez un autre formulaire d'écran de démarrage. + + + + The splash screen form cannot be the start-up form. + Le formulaire de l'écran de démarrage doit être différent du formulaire de démarrage. + + + + Startup f&orm: + F&ormulaire de démarrage : + + + + The following events are available for MyApplication: + Les événements suivants sont disponibles pour MyApplication : + + + + Startup: Raised when the application starts, before the startup form is created. + Startup : Déclenché au démarrage de l'application avant la création du formulaire de démarrage. + + + + Shutdown: Raised after all application forms are closed. This event is not raised if the application terminates abnormally. + Shutdown : Déclenché après la fermeture de tous les formulaires de l'application. Cet événement n'est pas déclenché si l'application se termine de façon anormale. + + + + UnhandledException: Raised if the application encounters an unhandled exception. + UnhandledException : Déclenché si l'application rencontre une exception non gérée. + + + + StartupNextInstance: Raised when launching a single-instance application and the application is already active. + StartupNextInstance : Déclenché lors du lancement d'une application à instance unique et si cette application est déjà active. + + + + NetworkAvailabilityChanged: Raised when the network connection is connected or disconnected. + NetworkAvailabilityChanged : Déclenché quand la connexion réseau est connectée ou déconnectée. + + + + Base address must be a hexadecimal number with less than or equal to 8 digits, for example, 0x11000000. + L'adresse de base doit être un nombre hexadécimal contenant au maximum 8 chiffres, par exemple, 0x11000000. + + + + None + Aucun + + + + Warning + Avertissement + + + + Error + Erreur + + + + (custom) + (personnalisé) + + + + Implicit conversion + Conversion implicite + + + + Late binding; call could fail at run time + Liaison tardive ; l'appel peut échouer au moment de l'exécution + + + + Implicit type; object assumed + Type implicite ; objet pris par défaut + + + + Use of variable prior to assignment + Utiliser une variable avant l'assignation + + + + Function/Operator without return value + Fonction/opérateur sans valeur de retour + + + + Unused local variable + Variable locale non utilisée + + + + Instance variable accesses shared member + La variable d'instance accède au membre partagé + + + + Recursive operator or property access + Accès récursif à un opérateur ou une propriété + + + + Duplicate or overlapping catch blocks + Blocs catch dupliqués ou superposés + + + + The warning settings for one or more configurations conflict. +Changing this setting will reset the settings in all configurations. + Les paramètres d'avertissement pour une ou plusieurs configuration sont en conflit. +La modification de ce paramètre réinitialise les paramètres dans toutes les configurations. + + + + When startup form closes + À la fermeture du formulaire de démarrage + + + + When last form closes + À la fermeture du dernier formulaire + + + + Windows + Windows + Authentication modes + + + Application-defined + Défini au niveau de l'application + Authentication modes + + + Cancel + Annuler + + + + &Calculate Permissions + &Calculer les autorisations + + + + Stopped... + Arrêt... + + + + Starting... + Démarrage... + + + + Building... + Génération... + + + + Analyzing... + Analyse... + + + + Analyze Failed + Échec de l'analyse + + + + Aborting... + Abandon... + + + + Canceling... + Annulation... + + + + Internet + Internet + + + + Local Intranet + Intranet local + + + + (Custom) + (Personnalisé) + Don't use + + + (Zone Default) + (Paramètres par défaut de la zone) + + + + Include + Inclure + + + + Exclude + Exclure + + + + The application will require elevated permissions to run in the selected zone. Click the help link above for more info. + L'application nécessite des autorisations élevées pour s'exécuter dans la zone sélectionnée. Cliquez sur le lien d'aide ci-dessus pour plus d'informations. + + + + This permission could not be loaded. Press the delete key to remove it from your project. + Impossible de charger cette autorisation. Appuyez sur la touche Suppr pour la retirer de votre projet. + Don't use + + + Included + Inclus + + + + Permission + Autorisation + + + + Setting + Paramètre + + + + Specify the code access security permissions that your ClickOnce application requires in order to run. Learn more about code access security... + Spécifiez les autorisations de sécurité d'accès du code indispensables au fonctionnement de votre application ClickOnce. Obtenez des informations sur la sécurité d'accès du code... + + + + Learn more about code access security... + Obtenez des informations sur la sécurité d'accès du code... + + + + Invalid value + Valeur non valide + + + + The SecurityPermission must be included in your application with the Execute flag set or your application will not run. Mark this permission as "Zone Default" or "Include." + SecurityPermission doit être inclus dans votre application avec l'indicateur Execute défini ou votre application ne s'exécutera pas. Marquez cette autorisation "Zone Default" ou "Include". + + + + The SecurityPermission must be included in your application with the Execute flag set or your application will not run. The Execute flag has been added to the SecurityPermission in your manifest. + SecurityPermission doit être inclus dans votre application avec l'indicateur Execute défini ou votre application ne s'exécutera pas. L'indicateur Execute a été ajouté à SecurityPermission dans votre manifeste. + + + + This application requires full trust to run correctly. Would you like to set this as a full trust application? + Cette application nécessite une confiance totale pour s'exécuter correctement. Voulez-vous la définir avec une confiance totale ? + + + + Full Trust Required + Confiance totale exigée + + + + An error occurred and the app.manifest file could not be saved. +Error: + Une erreur s'est produite et le fichier app.manifest n'a pas pu être enregistré. +Erreur : + + + + An error occurred and the app.manifest file could not be loaded. Please remove any changes you have made to the file and reload the Security property page again. + Une erreur s'est produite et le fichier app.manifest n'a pas pu être chargé. Supprimez toutes les modifications effectuées dans le fichier puis rechargez la page de propriétés de sécurité. + + + + Included + Inclus + + + + Not Included + Non inclus + + + + Included with warning + Inclus avec un avertissement + + + + Calculating permissions failed. + Échec du calcul des autorisations. + + + + Error + Erreur + + + + Advanced Security Settings + Paramètres de sécurité avancés + + + + Build Failed. Click CANCEL and correct the build failure before analyzing again. + Échec de la génération. Cliquez sur ANNULER et corrigez le problème avant de relancer l'analyse. + + + + Build completed... + Génération terminée... + + + + Unable to start the build. + Impossible de démarrer la génération. + + + + Serious error. The build must begin in order to analyze permissions. It has not started. + Erreur grave. La génération doit commencer pour pouvoir analyser les autorisations. Elle n'a pas encore démarré. + Don't use + + + (Custom) + (Personnalisé) + Don't use + + + (None) + (Aucun) + + + + Selecting existing key file + Sélection d'un fichier de clé existant + + + + Key Files + Fichiers de clés + + + + Create key file + Créer un fichier de clé + + + + The old password is invalid. + L'ancien mot de passe n'est pas valide. + + + + Enter the old password. + Entrez l'ancien mot de passe. + + + + Enter a new password. + Entrez un nouveau mot de passe. + + + + The new passwords do not match. Enter the password again. + Les nouveaux mots de passe ne correspondent pas. Retapez le mot de passe. + + + + The new password must be at least 6 characters in length. Enter the password again. + Le nouveau mot de passe doit comporter au moins 6 caractères. Retapez le mot de passe. + + + + Select a Certificate + Sélectionner un certificat + + + + Select a certificate to sign your ClickOnce manifests + Sélectionnez un certificat pour signer vos manifestes ClickOnce + + + + Certificate Files + Fichiers de certificat + + + + Issued To + Délivré à + + + + Issued By + Délivré par + + + + Intended Purpose + Rôle prévu + + + + Expiration Date + Date d'expiration + + + + The password is invalid. + Le mot de passe n'est pas valide. + + + + Invalid password + Mot de passe non valide + + + + The selected file does not contain a private key. You must choose a certificate that contains a private key. + Le fichier sélectionné ne contient pas de clé privée. Vous devez choisir un certificat qui contient une clé privée. + + + + Invalid key + Clé non valide + + + + Certificate Creation Error + Erreur de création du certificat + + + + <All> + <Tout> + + + + The passwords do not match. + Les mots de passe ne correspondent pas. + + + + Enter a password. + Entrez un mot de passe. + + + + Confirm the password. + Confirmez le mot de passe. + + + + (none) + (aucun) + + + + Enter password to open file + Entrez le mot de passe pour ouvrir le fichier + + + + Enter &password to open file {0} + Entrez le &mot de passe pour ouvrir le fichier {0} + + + + Enter &password for new file {0} + Entrez le &mot de passe du nouveau fichier {0} + + + + The project already contains a file with that name. Choose another certificate file or rename the file in your project. + Le projet contient déjà un fichier portant le même nom. Choisissez un autre fichier de certificat ou renommez celui du projet. + + + + The file '{0}' could not be imported: {1} + Impossible d'importer le fichier '{0}' : {1} + + + + _TemporaryKey.pfx + _TemporaryKey.pfx + + + + The selected certificate is not valid for code signing. Choose another certificate file. + Le certificat sélectionné n'est pas valide pour la signature de code. Choisissez un autre fichier de certificat. + + + + Change property: {0} + Modifier la propriété : {0} + + + + Windows Application + Application Windows + + + + Windows Service + Service Windows + + + + Class Library + Bibliothèque de classes + + + + Console Application + Application console + + + + Web Control Library + Bibliothèque de contrôles web + + + + Cannot remove '{0}'. {1} + + Impossible de supprimer '{0}'. {1} + + + + + Adding or removing '{0}' as a project import failed because of an unexpected error from the project system. The error returned was: '{1}'. + Échec de l'ajout ou de la suppression de '{0}' en tant qu'importation du projet en raison d'une erreur inattendue du système du projet. L'erreur retournée était : '{1}'. + + + + Adding web reference failed. {0} + + Échec de l'ajout d'une référence web. {0} + + + + + Updating web reference '{0}' failed. +{1} + Échec de la mise à jour de la référence web '{0}'. +{1} + + + + Web Reference Properties + Propriétés de la référence web + + + + Static + Statique + + + + Dynamic + Dynamique + + + + Name of the web reference + Nom de la référence web + + + + URL Behavior + Comportement de l'URL + + + + Web reference URL behavior + Comportement de l'URL de la référence web + + + + Web Reference URL + URL de la référence web + + + + Web Reference URL + URL de la référence web + + + + Reference Properties + Propriétés de la référence + + + + The remote machine name cannot be blank. Please specify the name of the machine to debug remotely. + Le nom de l'ordinateur distant ne peut pas être vide. Spécifiez le nom de l'ordinateur à déboguer à distance. + + + + The external program cannot be found. Please enter a valid executable file. + Le programme externe est introuvable. Entrez un fichier exécutable valide. + + + + The external program property cannot be empty. Please enter a valid executable file. + La propriété du programme externe ne peut pas être vide. Entrez un fichier exécutable valide. + + + + We can only debug an EXE file. Please enter a valid executable file. + Vous pouvez déboguer uniquement un fichier EXE. Entrez un fichier exécutable valide. + + + + The URL property cannot be empty. Please enter a valid URL. + La propriété de l'URL ne peut pas être vide. Entrez une URL valide. + + + + The URL is invalid. Please enter a valid URL like "http://www.microsoft.com/" + L'URL n'est pas valide. Entrez une URL valide telle que "http://www.microsoft.com/" + + + + The working directory you entered does not exist. Please enter a valid working directory. + Le répertoire de travail que vous avez entré n'existe pas. Entrez un répertoire de travail valide. + + + + <The system cannot find the reference specified> + <Le système ne trouve pas la référence spécifiée> + + + + Unused References + Références inutilisées + + + + &Remove + Supp&rimer + + + + No unused references + Aucune référence inutilisée + + + + Project compilation failed. Cannot determine unused references. + Échec de la compilation du projet. Impossible de déterminer les références inutilisées. + + + + Gathering list of unused references... + Collecte de la liste des références inutilisées... + + + + Error getting unused references. + Erreur d'obtention des références inutilisées. + + + + Base address must be a hexadecimal number with less than or equal to 8 digits, for example, &H11000000. + L'adresse de base doit être un nombre hexadécimal contenant au maximum 8 chiffres, par exemple, &H11000000. + + + + "Resource files must have a .res file extension. Please enter a valid resource file name." + "Les fichiers de ressources doivent avoir une extension de fichier .res. Entrez un nom de fichier de ressources valide." + + + + "The resource file entered does not exist." + "Le fichier de ressources entré n'existe pas." + + + + Project Designer + Concepteur de projets + + + + Settings + Paramètres + + + + Resources + Ressources + + + + An error occurred trying to load the project properties window. Close the window and try again. +{0} + Une erreur s'est produite durant une tentative de chargement de la fenêtre des propriétés du projet. Fermez la fenêtre et réessayez. +{0} + + + + An error occurred trying to load the page. + Une erreur s'est produite lors de la tentative de chargement de la page. + + + + The designer cannot be shown because the document for it was never loaded. + Impossible d'afficher le concepteur, car le document n'a pas pu être chargé. + + + + This project does not contain a default resources file. Click here to create one. + Ce projet ne contient pas de fichier de ressources par défaut. Cliquez ici pour en créer un. + + + + This project does not contain a default settings file. Click here to create one. + Ce projet ne contient pas de fichier de paramètres par défaut. Cliquez ici pour en créer un. + + + + Could not find the file '{0}'. + Impossible de trouver le fichier '{0}'. + + + + The file '{0}' is already open in an editor. Please close the file and try again. + Le fichier '{0}' est déjà ouvert dans un éditeur. Fermez le fichier et réessayez. + + + + All Project Designer Pages + Toutes les pages du Concepteur de projets + + + + More Settings + Paramètres supplémentaires + + + + The requested file type is not supported in projects of this type. + Le type de fichier demandé n'est pas pris en charge dans les projets de ce type. + + + + Assembly Name + Nom de l'assembly + + + + Root Namespace + Espace de noms racine + + + + Startup Object + Objet de démarrage + + + + Application Icon + Icône d'application + Property Friendly Names (for transaction names) - NOTE: All of these are optional + + + Assembly Version + Version de l'assembly + + + + Assembly File Version + Version du fichier d'assembly + + + + Assembly GUID + GUID de l'assembly + + + + Enable application framework + Activer le framework d'application + + + + External Program Path + Chemin du programme externe + + + + Start Browser With URL + Démarrer le navigateur avec l'URL + + + + Working Directory + Répertoire de travail + + + + Remote Machine Name + Nom de l'ordinateur distant + + + + Project Designer Page Container + Conteneur de page du Concepteur de projets + + + + Switch Project Designer Page + Basculer sur la page du Concepteur de projets + + + + Allow switching between active pages of the project designer (use Ctrl+PageUp and Ctrl+PageDown) + Permet de basculer entre les pages actives du Concepteur de projets (utilisez Ctrl+Pg. préc et Ctrl+Pg. suiv) + + + + {0} page: + Page {0} : + {0} = sub page name + + + {0} [Read Only] + {0} [Lecture seule] + Attach a readonly to the designer caption {0}=Designer caption + + + The editor could not get the IVsTextStream for file {0}. + L'éditeur n'a pas pu obtenir IVsTextStream pour le fichier {0}. + #exception {0}=filename + + + The editor could not get the IVsTextStream. + L'éditeur n'a pas pu obtenir IVsTextStream. + #exception (no file name) + + + No DesignerService for file '{0}'. + Aucun DesignerService pour le fichier '{0}'. + #{0}=file name + + + Invalid physical view name. + Nom d'affichage physique non valide. + + + + Unable to create text buffer. + Impossible de créer une mémoire tampon de texte. + # com exception + + + No LocalRegistry service. + Aucun service LocalRegistry. + #exception + + + Replacing text stream failed:{0} + Échec du remplacement du flux de texte : {0} + #exception {0}=err msg + + + Buffer is read only. + La mémoire tampon est en lecture seule. + + + + File is already opened in an incompatible editor. + Le fichier est déjà ouvert dans un éditeur non compatible. + + + + Unsupported format. + Format non pris en charge. + + + + Unknown Error. + Erreur inconnue. + + + + Unable to create the designer. {0} + Impossible de créer le concepteur. {0} + # {0}=inner exception + + + Unable to check out the current file. The file may be read-only or locked, or you may need to check the file out manually. + Impossible d'extraire le fichier actif. Ce fichier peut être en lecture seule ou verrouillé ou vous devrez peut-être l'extraire manuellement. + # General checkout exception message + + + Microsoft Visual Studio + Microsoft Visual Studio + Error reporting + + + Please enter an integer between 1 and 60. + Entrez un entier compris entre 1 et 60. + + + + Please enter an integer between 1 and 60. + Entrez un entier compris entre 1 et 60. + + + + Show empty environment + Afficher l'environnement vide + These are items in a combobox (and so they don't need periods) + + + Load last loaded solution + Charger la dernière solution + These are items in a combobox (and so they don't need periods) + + + Show New Project dialog box + Afficher la boîte de dialogue Nouveau projet + These are items in a combobox (and so they don't need periods) + + + Show Open Project dialog box + Afficher la boîte de dialogue Ouvrir un projet + These are items in a combobox (and so they don't need periods) + + + Changes in Help Options will not take effect until the environment is restarted. + Les modifications des options de l'aide ne sont effectives qu'après le redémarrage de l'environnement. + + + + The location specified is on an invalid or read-only disk, or contains a device name reserved for the system. + L'emplacement spécifié est sur un disque non valide ou en lecture seule, ou contient un nom de périphérique réservé au système. + + + + COM + COM + + + + Component Design + Conception de composants + + + + Serialization + Sérialisation + + + + Web + web + + + + COMClass + COMClass + + + + Expose {0} to COM. + Exposez {0} pour COM. + + + + COM Class + Classe COM + + + + COMVisible + COMVisible + + + + Make {0} visible through COM. + Rendez {0} visible via COM. + + + + COM Visible + Visible par COM + + + + DispId + DispId + + + + Set explicit DispId to this {0}. + Définissez DispId explicite pour cette valeur {0}. + + + + DispId + DispId + + + + Value + Valeur + + + + Explicit DispId value for this {0}. + Valeur DispId explicite pour {0}. + + + + Value + Valeur + + + + DispId value should be an integer greater than or equal to 1. + La valeur DispID doit être un entier supérieur ou égal à 1. + + + + Category + Catégorie + + + + Category group for the property. + Groupe de catégories pour la propriété. + + + + Category + Catégorie + + + + Default Event + Événement par défaut + + + + Default event for the class. + Événement par défaut de la classe. + + + + Default Event + Événement par défaut + + + + Default Value + Valeur par défaut + + + + Default value for the property. + Valeur par défaut de la propriété. + + + + Default Value + Valeur par défaut + + + + NonSerialized + NonSerialized + + + + Field should not be serialized. + Le champ ne doit pas être sérialisé. + + + + Non Serialized + Non sérialisé + + + + Serializable + Sérialisable + + + + Enable serialization for this {0} and its members. + Activez la sérialisation pour ce {0} et ses membres. + + + + Serializable + Sérialisable + + + + WebMethod + WebMethod + + + + Expose method via web services. + Exposez la méthode via les services web. + + + + Web Method + Méthode web + + + + Description + Description + + + + Description for the Web Method. + Description de la méthode web. + + + + Description + Description + + + + EnableSession + EnableSession + + + + Maintain session state. + Conservez l'état de session. + + + + Enable Session + Activer l'état de session + + + + TransactionOptions + TransactionOptions + + + + Set transaction options. + Définissez les options de transaction. + + + + Transaction Options + Options de transaction + + + + WebService + WebService + + + + Configure the Web Service settings. + Configurez les paramètres du service web. + + + + Web Service + Service web + + + + Name + Nom + + + + Name for the web service. + Nom du service web. + + + + Name + Nom + + + + Description + Description + + + + Description for the web service. + Description du service web. + + + + Description + Description + + + + Namespace + Espace de noms + + + + Namespace for the web service. + Espace de noms du service web. + + + + Namespace + Espace de noms + + + + Default + Par défaut + + + + Action + Action + + + + Appearance + Apparence + + + + Behavior + Comportement + + + + Data + Données + + + + DragDrop + Glisser-déplacer + + + + Focus + Focus + + + + Format + Format + + + + Key + Clé + + + + Layout + Disposition + + + + Mouse + Souris + + + + WindowStyle + WindowStyle + + + + (None) + (Aucun) + Default Event + + + Requires: + Requiert : + + + + Name + Nom + Column names for the string table + + + Type + Type + Column names for the string table + + + Value + Valeur + Column names for the string table + + + Comment + Commentaire + Column names for the string table + + + Failed to generate file: {0} + Échec de génération du fichier : {0} + + + + Editing embedded resources directly is not supported. Do you wish to convert this item to a linked resource in order to edit it? + Impossible de modifier directement les ressources incorporées. Voulez-vous convertir cet élément en ressource liée afin de la modifier ? + + + + The current object is auto-generated and only supports renaming through the Managed Resources Editor. + L'objet actif est généré automatiquement et prend en charge l'attribution d'un nouveau nom par le biais de l'Éditeur de ressources managées uniquement. + + + + Cannot find the file '{0}'. It may have been moved or deleted. + Le fichier '{0}' est introuvable. Il a peut-être été déplacé ou supprimé. + {0} = file name and path + + + Unable to load resource from file '{0}'. + Impossible de charger la ressource à partir du fichier '{0}'. + {0} = file name and path + + + The resource name cannot be empty. + Le nom de la ressource ne peut pas être vide. + + + + There is already another resource with the name '{0}'. + Il existe déjà une autre ressource nommée '{0}'. + {0} = Resource name + + + The resource was not of the expected type. + La ressource n'était pas du type attendu. + This error can happen if, for example, you try to add foo.bmp to the resource editor, but foo.bmp is really a metafile. + + + Unable to create new resource file '{0}'. {1} + Impossible de créer le fichier de ressources '{0}'. {1} + {0} = file name and path, {1} = additional error information + + + Unable to play the audio resource. {0} + Impossible de lire la ressource audio. {0} + {0} = Additional error information. + + + Resource '{0}' cannot be saved to a file. + Impossible d'enregistrer la ressource '{0}' dans un fichier. + {0} = Resource name + + + The operation has been canceled by the user. + L'opération a été annulée par l'utilisateur. + + + + The resource value contains invalid data or has an incorrect format. + La valeur de la ressource contient des données non valides ou est dotée d'un format incorrect. + + + + The name of the resource '{0}' cannot be used as a valid identifier, because it contains one or more invalid characters: '{1}'. Please remove or replace those characters and try again. + Impossible d'utiliser le nom de la ressource '{0}' comme identificateur valide, car il contient un ou plusieurs caractères non valides : '{1}'. Supprimez ou remplacez ces caractères et réessayez. + {0} = Resource name + + + Too many files specified. Please select fewer files and try again. + Trop de fichiers spécifiés. Sélectionnez moins de fichiers et recommencez. + + + + Unexpected error. + Erreur inattendue. + Theoretically possible but we really don't expect to happen. Unexpected, internal error. + + + Unable to load internal localized resource '{0}'. + Impossible de charger la ressource localisée interne '{0}'. + Theoretically possible but we really don't expect to happen. Unexpected, internal error. + + + The value could not be converted into a resource of type {0}. + +{1} + Impossible de convertir la valeur en ressource de type {0}. + +{1} + {0} = the type that was expected by the resource editor (e.g. System.Drawing.Point) +{1} = more specific additional error message from the system + + + The value cannot be empty in a resource of type {0}. + La valeur ne peut pas être vide dans une ressource de type {0}. + {0} = the type that was expected by the resource editor (e.g. System.Drawing.Point) + + + One or more of the selected resource values could not be cleared. + Impossible d'effacer une ou plusieurs des valeurs de ressources sélectionnées. + + + + The resource file cannot be modified at this time. + Impossible de modifier le fichier de ressources pour l'instant. + + + + You are trying to edit a resource file that is a part of another project item (such as a form or a control). Editing this item could corrupt the project item, and you will have to recover it by hand. In addition, changes made to this resource file may be lost if further changes are made to the project item. + +Do you really want to edit this file? + Vous essayez de modifier un fichier de ressources qui fait partie d'un autre élément de projet (par exemple un formulaire ou un contrôle). La modification de cet élément peut endommager l'élément de projet et vous devrez le récupérer manuellement. De plus, les modifications apportées à ce fichier de ressources peuvent être perdues si d'autres modifications ont été apportées à l'élément de projet. + +Voulez-vous vraiment modifier ce fichier ? + + + + The resource '{0}' cannot be added. + Impossible d'ajouter la ressource '{0}'. + {0} - name of the resource + + + The device does not support '{0}' files. + Le périphérique ne prend pas en charge les fichiers '{0}'. + {0} - the extension of the file name like 'tiff' + + + The resource item uses the type '{0}', which is not supported in this project. + L'élément de la ressource utilise le type '{0}' alors que ce type n'est pas pris en charge dans ce projet. + {0} - name of the type + + + The resource item(s) {0} cannot be saved correctly. The item(s) will be discarded. + Impossible d'enregistrer correctement les éléments de la ressource {0}. Ils vont être ignorés. + {0} - name list of the resource + + + '{0}' + '{0}' + {0} - name + + + {0}, '{1}' + {0}, '{1}' + # {0} - name list +# {1} - another name + + + (Nothing/null) + (Rien/null) + Displayed in a string table for values of Nothing/null +CONSIDER: get this from CodeDom + + + (Unknown type) + (Type inconnu) + This actually shouldn't be needed, but if we get an exception trying to get the type name of an entry in the resx file (not supposed to happen), then we'll display this as its type. + + + (Value cannot be displayed) + (Impossible d'afficher la valeur) + Displayed in a string table for values which cannot be edited by the user + + + Name + Nom + Columns for the "Details" view of the resource editor + + + Filename + Nom de fichier + Columns for the "Details" view of the resource editor + + + Type + Type + Columns for the "Details" view of the resource editor + + + Size + Taille + Columns for the "Details" view of the resource editor + + + Comment + Commentaire + Columns for the "Details" view of the resource editor + + + Text Encoding + Encodage de texte + Columns for the "Details" view of the resource editor + + + {0} x {1} + {0} x {1} + Format string for showing a graphic's size + +# {0} = width (as an integer) +# {1} = height (as an integer) +#Example, for a bitmap of width=123, height = 456, the English version of this string would be "123x456" + + + {0} KB + {0} Ko + #Format string for showing a file's size +# {0} = length in kilobytes + + + {0} byte(s) + {0} octet(s) + Format string for showing a file's size. +{0} = length in bytes + + + Strings + Chaînes + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + Images + Images + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + Icons + Icônes + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + Audio + Audio + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + Files + Fichiers + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + Other + Autre + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + &Add + &Ajouter + Add, Delete and Views button text in the main ToolStrip + + + &Remove + Supp&rimer + Add, Delete and Views button text in the main ToolStrip + + + &Views + A&ffichages + Add, Delete and Views button text in the main ToolStrip + + + &Existing File... + Fichi&er existant... + Menu items under the "Add" button + + + New &String + Nou&velle chaîne + Menu items under the "Add" button + + + New &Image + Nouvelle &image + Menu items under the "Add" button + + + &PNG Image... + Image &PNG... + Menu items under the "Add" button + + + &BMP Image... + Image &BMP... + Menu items under the "Add" button + + + &GIF Image... + Image &GIF... + Menu items under the "Add" button + + + &JPEG Image... + Image &JPEG... + Menu items under the "Add" button + + + &TIFF Image... + Image &TIFF... + Menu items under the "Add" button + + + New I&con... + Nouvelle i&cône... + Menu items under the "Add" button + + + New &Text File... + Nouveau fichier &texte... + Menu items under the "Add" button + + + Windows Bitmap + Bitmap Windows + Friendly Image types + + + EXIF Image + Image EXIF + Friendly Image types + + + Graphics Interchange Format + Graphics Interchange Format + Friendly Image types + + + JPEG File Interchange Format + Format d'échange de fichiers JPEG + Friendly Image types + + + Windows Bitmap + Bitmap Windows + Friendly Image types + + + Portable Network Graphics + Portable Network Graphics + Friendly Image types + + + Tag Image File Format + Tag Image File Format + Friendly Image types + + + Icon + Icône + Friendly Image types + + + Text File + Fichier texte + Friendly Image types + + + Binary File + Fichier binaire + + + + Wave Sound + Son Wave + Friendly Image types + + + Linked at compile time + Lié au moment de la compilation + File Persistence Mode + + + Embedded in .resx + Incorporé dans .resx + File Persistence Mode + + + Bitmaps + Bitmaps + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Icons + Icônes + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Audio + Audio + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Text Files + Fichiers texte + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + All Files + Tous les fichiers + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Windows Bitmap + Bitmap Windows + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Portable Network Graphics + Portable Network Graphics + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Graphics Interchange Format + Graphics Interchange Format + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + JPEG File Interchange Format + Format d'échange de fichiers JPEG + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Tag Image File Format + Tag Image File Format + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Icon + Icône + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + &List + &Répertorier + Resource editor listview view styles (like changing the view style of a folder in Windows XP) + + + &Details + &Détails + Resource editor listview view styles (like changing the view style of a folder in Windows XP) + + + &Thumbnail + &Miniature + Resource editor listview view styles (like changing the view style of a folder in Windows XP) + + + Managed Resources Editor + Éditeur de ressources managées + + + + Add existing file to resources + Ajouter le fichier existant aux ressources + + + + Import file into resource '{0}' + Importer le fichier dans la ressource '{0}' + {0} = Name of resource being imported into + + + Export resource '{0}' to file + Exporter la ressource '{0}' dans le fichier + {0} = Name of resource being exported from + + + Please specify where to save the new file + Sélectionner l'emplacement où enregistrer le nouveau fichier + + + + The file '{0}' already exists. Do you want to replace it? + Le fichier '{0}' existe déjà. Voulez-vous le remplacer ? + {0} = full file path and name + + + The following files already exist. Do you want to replace them? + Les fichiers suivants existent déjà. Voulez-vous les remplacer ? + + + + Select a folder in which to export the resources. + Sélectionnez un dossier dans lequel vous exporterez les ressources. + + + + Do you want to continue anyway? + Voulez-vous quand même continuer ? + + + + Do you want to enable strongly-typed resource generation for this file? + Voulez-vous activer la génération de ressources fortement typées pour ce fichier ? + + + + Resource '{0}' could not be loaded because the file to which it is linked could not be found: {1}. + Impossible de charger la ressource '{0}', car le fichier auquel elle est liée est introuvable : {1}. + {0} = resource name that had the error, {1} = file path/name that could not be found + + + Resource '{0}' could not be instantiated. {1} + Impossible d'instancier la ressource '{0}'. {1} + {0} = resource name that had the error, {1} = extended error information + + + Resource '{0}' has a name that is not recommended and that may cause compilation errors in your code. Please choose another name. + La ressource '{0}' porte un nom qui n'est pas recommandé, ce qui peut provoquer des erreurs de compilation dans votre code. Choisissez un autre nom. + {0} = resource name that had the error + + + Unable to set the Custom Tool or Custom Tool Namespace properties of this file in order to change strongly-typed resource generation options. If the project file is checked in, try checking it out. + Impossible de définir les propriétés ou l'espace de noms de l'outil personnalisé de ce fichier pour modifier les options de la génération de ressources fortement typées. Si le fichier du projet est archivé, essayez de l'extraire. + One possible source for this error is that source code control checkout failed or was canceled. + + + Double-click here to enable strongly-typed resources for this file. + Double-cliquez ici pour activer les ressources fortement typées pour ce fichier. + + + + The resource name '{0}' is not a valid identifier. + Le nom de ressource '{0}' n'est pas un identificateur valide. + + + + {0} - Codepage {1} + {0} - Page de codes {1} + {0} = encoding name (e.g., "Western European (Windows)"), {1} = code page # (e.g., 85001) + + + (Default) + (Par défaut) + + + + Change resource name + Changer le nom de la ressource + + + + Add {0} new resource(s) + Ajouter {0} nouvelle(s) ressource(s) + {0} = number of resources added + + + Remove {0} resource(s) + Supprimer {0} ressource(s) + {0} = number of resources removed + + + Delete values in {0} cell(s) + Supprimer les valeurs dans {0} cellule(s) + {0} = number of cells cleared + + + &Categories: + &Catégories : + The label in the menu strip for the combobox that holds the categories of resources to display + + + Name used to identify the resource in code. + Nom permettant d'identifier la ressource dans le code. + + + + Additional information about the resource. This property is only meaningful at design time. + Informations supplémentaires sur la ressource. Cette propriété n'est significative qu'au moment du design. + + + + Character encoding of the file. + Encodage de caractères du fichier. + + + + The path to the linked resource. + Chemin de la ressource liée. + + + + Specifies whether the file resource is text or binary. + Spécifie si la ressource de fichier est de format texte ou binaire. + + + + Specifies whether the resource is embedded or linked. Embedded resources are saved in the resource file. Linked resources reside in an external location on disk. + Spécifie si la ressource est incorporée ou liée. Les ressources incorporées sont enregistrées dans le fichier de ressources, tandis que les ressources liées résident à un emplacement externe sur le disque. + + + + The resource will be generated as this type in the strongly-typed resource class. For example, the resource might be generated as a String or Bitmap object. + La ressource sera générée sous la forme de ce type dans la classe de ressources fortement typées. Par exemple, la ressource sera générée en tant qu'objet String ou Bitmap. + + + + The value of the resource. + Valeur de la ressource. + + + + Unable to add a '{0}' folder to this project. + +{1} + Impossible d'ajouter un dossier '{0}' à ce projet. + +{1} + {0} = name of folder trying to add (by default, this will be "Resources"), {1} = additional error information + + + Unable to add '{0}' to the project. + +{1} + Impossible d'ajouter '{0}' au projet. + +{1} + {0} = file name and path, {1} = additional error information. + + + Unable to add '{0}' to the project. + Impossible d'ajouter '{0}' au projet. + {0} = file name and path + + + A file with the name '{0}' already exists. Do you want to replace it? + Un fichier portant le nom '{0}' existe déjà. Voulez-vous le remplacer ? + {0} = file name and path + + + {0} - Destination File Exists + {0} - Le fichier de destination existe + {0} = Name of the editor, e.g. "Managed Resources Editor" or "Resource Picker" + + + There is already a linked file with the name "{0}" in the project folder "{1}". Do you want to remove it? + Il existe déjà un fichier lié nommé "{0}" dans le dossier du projet "{1}". Voulez-vous le supprimer ? + {0} = file name (no path), {1} = Path of resource folder + + + {0} - Destination File Exists + {0} - Le fichier de destination existe + {0} = Name of the editor, e.g. "Managed Resources Editor" or "Resource Picker" + + + Cannot find the file '{0}'. It may have been moved or deleted. + Le fichier '{0}' est introuvable. Il a peut-être été déplacé ou supprimé. + {0} = file name and path + + + Connection string + Chaîne de connexion + Added as the last item in the list of available types to let the user browse for a new type + + + Web Service URL + URL du service web + Added as the last item in the list of available types to let the user browse for a new type + + + Browse... + Parcourir... + Added as the last item in the list of available types to let the user browse for a new type + + + Application + Application + + + + Application (Web) + Application (web) + + + + User + Utilisateur + + + + User (Web) + Utilisateur (web) + + + + Name + Nom + + + + Type + Type + + + + Scope + Portée + + + + Value + Valeur + + + + Type '{0}' is not defined. + Le type '{0}' n'est pas défini. + + + + Name changed + Nom modifié + + + + Type changed + Type modifié + + + + Scope changed + Portée modifiée + + + + Roaming changed + Itinérance modifiée + + + + Description changed + Description modifiée + + + + Provider changed + Fournisseur modifié + + + + Value changed + Valeur modifiée + + + + Generate default value in code changed + Modification de la valeur par défaut générée dans le code + + + + Remove {0} setting(s) + Supprimer {0} paramètre(s) + + + + Unable to load settings file. It might be corrupted or contain invalid XML or contain duplicate identifiers. + Impossible de charger le fichier de paramètres. Il est peut-être endommagé, ou il peut contenir des valeurs XML non valides ou des identificateurs dupliqués. + + + + New values from the app.config file were automatically added + De nouvelles valeurs du fichier app.config ont été ajoutées automatiquement + + + + Value of setting '{0}' was changed in the app.config file. + La valeur du paramètre '{0}' a été modifiée dans le fichier app.config. + + + + The current value in the .settings file is '{0}' +The new value in the app.config file is '{1}' + +Do you want to update the value in the .settings file? + La valeur actuelle dans le fichier .settings est '{0}' +La nouvelle valeur dans le fichier app.config est '{1}' + +Voulez-vous mettre à jour la valeur dans le fichier .settings ? + + + + An error occurred while reading the app.config file. The file might be corrupted or contain invalid XML. + Une erreur s'est produite pendant la lecture du fichier app.config. Ce fichier est peut-être endommagé ou contient du code XML non valide. + + + + An error occurred while saving values to the app.config file. The file might be corrupted or contain invalid XML. + Une erreur s'est produite pendant l'enregistrement des valeurs dans le fichier app.config. Ce fichier est peut-être endommagé ou contient du code XML non valide. + + + + There is already another setting with the name '{0}'. + Il existe déjà un autre paramètre nommé '{0}'. + + + + '{0}' is not a valid identifier. + '{0}' n'est pas un identificateur valide. + + + + '{0}' is not a valid type name. + '{0}' n'est pas un nom de type valide. + + + + The setting name cannot be empty. + Le nom du paramètre ne peut pas être vide. + + + + '{0}' cannot be converted to an instance of type '{1}'. + Impossible de convertir '{0}' en instance de type '{1}'. + + + + Generic types are not supported. + Les types génériques ne sont pas pris en charge. + + + + Abstract types are not supported. + Les types abstract ne sont pas pris en charge. + + + + The current object is auto-generated and only supports renaming through the Settings Designer. + L'objet actif est généré automatiquement et prend en charge l'attribution d'un nouveau nom par le biais du Concepteur de paramètres uniquement. + + + + The current object is auto-generated and does not support modifying parameters. + L'objet actif est généré automatiquement et ne prend pas en charge la modification de paramètres. + + + + The settings file cannot be modified at this time. + Impossible de modifier le fichier de paramètres à ce stade. + + + + &Add Setting + &Ajouter un paramètre + + + + R&emove Setting + Supprim&er un paramètre + + + + Application settings allow you to store and retrieve property settings and other information for your application dynamically. For example, the application can save a user's color preferences, then retrieve them the next time it runs. + Les paramètres de l'application vous permettent de stocker et de récupérer dynamiquement les paramètres de propriété et d'autres informations pour votre application. Par exemple, les préférences de couleurs d'un utilisateur peuvent être enregistrées puis récupérées à la prochaine exécution de l'application. + + + + Learn more about application settings... + En savoir plus sur les paramètres de l'application... + + + + This connection string appears to contain sensitive data (for example, a password), which is required to connect to the database. However, storing sensitive data in the connection string can be a security risk. Do you want to include sensitive data in the connection string? + Cette chaîne de connexion semble contenir des données sensibles (par exemple, un mot de passe), lesquelles sont indispensables pour établir une connexion à la base de données. Cependant, le stockage des données sensibles dans la chaîne de connexion peut entraîner un risque de sécurité. Voulez-vous inclure les données sensibles dans la chaîne de connexion ? + + + + Select a Type + Sélectionner un type + + + + This class allows you to handle specific events on the settings class: + Cette classe vous permet de gérer des événements spécifiques dans la classe de paramètres : + Comments for user part of extending generated settings class + + + The SettingChanging event is raised before a setting's value is changed. + L'événement SettingChanging est déclenché avant la modification d'une valeur de paramètre. + + + + The PropertyChanged event is raised after a setting's value is changed. + L'événement PropertyChanged est déclenché après la modification d'une valeur de paramètre. + + + + The SettingsLoaded event is raised after the setting values are loaded. + L'événement SettingsLoaded est déclenché après le chargement des valeurs de paramètre. + + + + The SettingsSaving event is raised before the setting values are saved. + L'événement SettingsSaving est déclenché avant l'enregistrement des valeurs de paramètre. + + + + To add event handlers for saving and changing settings, uncomment the lines below: + Pour ajouter des gestionnaires d'événements afin d'enregistrer et de modifier les paramètres, supprimez les marques de commentaire des lignes ci-dessous : + + + + Add code to handle the SettingChangingEvent event here. + Ajouter du code pour gérer l'événement SettingChangingEvent ici. + + + + Add code to handle the SettingsSaving event here. + Ajouter du code pour gérer l'événement SettingsSaving ici. + + + + Failed to create or open file. + Impossible de créer ou d'ouvrir le fichier. + + + + Description of the setting. + Description du paramètre. + + + + Specifies whether or not the default setting value should be generated in the strongly-typed settings class. + Spécifie si la valeur du paramètre par défaut doit être générée dans la classe de paramètres fortement typée. + + + + Specifies the group to which this Settings file belongs. + Spécifie le groupe auquel ce fichier de paramètres appartient. + + + + Description of the group to which this Settings file belongs. + Description du groupe auquel ce fichier de paramètres appartient. + + + + Indicates whether the setting should roam when Windows roaming profiles are enabled. + Indique si le paramètre doit être itinérant lorsque les profils itinérants Windows sont activés. + + + + Name used to identify the setting. + Nom utilisé pour identifier le paramètre. + + + + The provider (System.Configuration.Provider.ProviderBase) used to manage the setting. + Fournisseur (System.Configuration.Provider.ProviderBase) utilisé pour gérer le paramètre. + + + + Specifies whether the setting is per-application (read-only) or per-user (read-write). + Spécifie si le paramètre est configuré par application (lecture seule) ou par utilisateur (lecture/écriture). + + + + The setting will be generated as this type in the strongly-typed settings class. For example, the setting might be generated as a String or Integer object. + Le paramètre sera généré sous la forme de ce type dans la classe de paramètres fortement typés. Par exemple, ce paramètre sera généré en tant qu'objet String ou Integer. + + + + The current value for the setting. + Valeur actuelle de ce paramètre. + + + + The following files will be deleted: + +{0} + Les fichiers suivants vont être supprimés : + +{0} + Synchronize with user.config file + + + No user.config files were found in any of the following locations: + +{0} + Aucun fichier user.config n'a été trouvé aux emplacements suivants : + +{0} + + + + One or more user.config files was not removed. + Un ou plusieurs fichiers user.config n'ont pas été supprimés. + + + + My.Settings Auto-Save Functionality + Fonctionnalité Enregistrement automatique My.Settings + in-code comment used to generate a region that hides My.Settings AutoSave functionality + + + Unable to find service '{0}'. Ensure that the application is installed correctly. + Service '{0}' introuvable. Vérifiez que l'application est installée correctement. + Settings Global-Object-Provider Strings + + + Default pac&kage: + Pac&kage par défaut : + J# Specific String for Root Namespace + + + (Custom) + (Personnalisé) + Entry in the "Accessibility dropdown" + + + No code generation + Pas de génération de code + Entry in the "Accessibility dropdown" + + + WPF Application + Application WPF + + + + (Invalid value: "{0}") + (Valeur non valide : "{0}") + Goes into the ShutdownMode combobox + + + On explicit shutdown + Lors de l'arrêt explicite + + + + On last window close + Lors de la fermeture de la dernière fenêtre + + + + On main window close + Lors de la fermeture de la fenêtre principale + + + + Could not find the expected root element "{0}" in the application definition file. + Impossible de trouver l'élément racine attendu "{0}" dans le fichier de définition d'application. + + + + The .xaml file was in an unexpected format, near line {0} column {1}. + Le fichier .xaml était dans un format inattendu, vers la ligne {0} colonne {1}. + + + + Startup &object: + &Objet de démarrage : + + + + Startup &URI: + &URI de démarrage : + + + + The application definition file is already opened in an incompatible editor. Please close the other editor and reload the project properties page. + Le fichier de définition d'application est déjà ouvert dans un éditeur incompatible. Fermez l'autre éditeur et rechargez la page des propriétés du projet. + + + + There was an error trying to open or create the application definition file for this project. {0} + Erreur lors de l'ouverture ou de la création du fichier de définition d'application pour ce projet. {0} + + + + An error occurred trying to load the application definition file for this project. The file '{0}' could not be parsed. Please edit the file in the XAML editor to fix the error. + Une erreur s'est produite durant la tentative de chargement du fichier de définition d'application pour ce projet. Impossible d'analyser le fichier '{0}'. Modifiez le fichier dans l'éditeur XAML pour corriger l'erreur. + + + + (Error) + (Erreur) + Used inside UI elements when there is an error (e.g. combobox text) + + + An unspecified error has occurred. + Une erreur non spécifiée s'est produite. + + + + This project does not contain an application definition file. + Ce projet ne contient pas de fichier de définition d'application. + + + + An error occurred trying to create the application events file. {0} + Une erreur s'est produite lors de la tentative de création du fichier des événements d'application. {0} + + + + Invalid argument '{0}' + Argument '{0}' non valide. + {0} = name of invalid argument + + + WPF Console Application + Application console WPF + + + + WPF Class Library + Bibliothèque de classes WPF + + + + Embed manifest with default settings + Incorporer les paramètres par défaut dans le fichier manifeste + + + + Create application without a manifest + Créer une application sans fichier manifeste + + + + Invalid manifest file. + Fichier manifeste non valide. + + + + Services + Services + + + + Client application services enable your Windows-based applications to use the ASP.NET login (authentication), roles, and profile (settings) services. + Les services d'applications clientes permettent à vos applications Windows d'utiliser les services de connexion ASP.NET (authentification), de rôle et de profil (paramètres). + + + + Learn more about client application services... + En savoir plus sur les services d'application cliente... + + + + Advanced Settings for Services + Paramètres avancés pour les services + + + + Disabling application services will clear the default services for Authentication, Roles, and Settings. Click OK to disable application services. + La désactivation des services d'application annule les services par défaut pour l'authentification, les rôles et les paramètres. Cliquez sur OK pour désactiver les services d'application. + + + + Disable Application Services + Désactiver les services d'application + + + + seconds + secondes + + + + minutes + minutes + + + + hours + heures + + + + days + jours + + + + To enable client application services, you must set the Target Framework for your application to .NET Framework 3.5 or later. In C#, you can do this on the Application property page. In Visual Basic, you can do this one the Compile property page by clicking Advanced Compile Options. + Pour activer les services d'application cliente, vous devez définir le Framework cible pour votre application à .NET Framework 3.5 ou version ultérieure. En C#, vous le faites sur la page de propriétés Application. En Visual Basic, vous le faites sur le page de propriétés Compiler en cliquant sur Options avancées de compilation. + + + + An error occurred while reading the Application configuration file. The file might be corrupted or contain invalid XML. + Une erreur s'est produite durant la lecture du fichier config de l'application. Ce fichier est peut-être endommagé ou contient du code XML non valide. + + + + The URL is invalid. Please enter a valid URL like http://microsoft.com/services + L'URL n'est pas valide. Entrez une URL valide telle que http://microsoft.com/services + + + + A service URL in the application configuration file is not in the expected format. + Une URL de service dans le fichier de configuration de l'application n'est pas au format attendu. + + + + Authentication, Roles and Web Settings providers have been configured via the Application configuration file such that they do not share a common connection string. + Les fournisseurs de paramètres web, de rôles et d'authentification ont été configurés via le fichier de configuration de l'application pour qu'ils ne partagent pas une chaîne de connexion commune. + + + + Specify a connection string to a SQL Server database, or use the special connection string "Data Source = |SQL/CE|", which causes SQL Server Compact to generate local database files for offline storage. + Spécifiez une chaîne de connexion à une base de données SQL Server ou utilisez la chaîne de connexion spéciale "Data Source = |SQL/CE|" qui permet à SQL Server Compact de générer les fichiers de la base de données locale pour le stockage hors connexion. + + + + The following type names were not understood: '{0}'. Make sure you have references to these types. + Les noms de types suivants ne sont pas reconnus : '{0}'. Vérifiez que vous avez des références à ces types. + + + + There are already settings with the following names: {0}. + Des paramètres avec les mêmes noms existent déjà : {0}. + + + + The username/password combination cannot be authenticated. + Impossible d'authentifier la combinaison nom d'utilisateur/mot de passe. + + + + Windows Forms Application + Application Windows Forms + The "Windows Forms" distinguishes it from a WPF application + + + Namespace of the service reference. + Espace de noms de la référence de service. + + + + Service Reference Properties + Propriétés de la référence de service + + + + Metadata Location Url + URL d'emplacement des métadonnées + + + + Metadata Location + Emplacement des métadonnées + + + + A service reference with multiple source urls is not supported. + Une référence de service avec plusieurs URL sources n'est pas prise en charge. + + + + Cannot change reference Url to empty. The reference url must be a valid URL. + Impossible de définir une URL de référence vide. L'URL de référence doit être une URL valide. + + + + One or more files were reloaded during the checkout. Please retry your operation. + Un ou plusieurs fichiers ont été rechargés pendant l'extraction. Réessayez votre opération. + + + + The project was reloaded, and some changes on this page may have been lost. + Le projet a été rechargé et certaines modifications contenues dans cette page ont peut-être été perdues. + + + + The application will fail to run in the selected zone because of this requested elevated permission. Click the help link above for more info. + L'application ne pourra pas s'exécuter dans la zone sélectionnée en raison de cette demande d'autorisation élevée. Cliquez sur le lien d'aide ci-dessus pour plus d'informations. + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.it.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.it.xlf new file mode 100644 index 00000000000..ae70606d7ca --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.it.xlf @@ -0,0 +1,2948 @@ + + + + + + All Files + Tutti i file + + + + Property Page + Pagina delle proprietà + + + + References + Riferimenti + + + + Version + Versione + + + + Signing + Firma + + + + Application + Applicazione + + + + Compile + Compilazione + + + + Debug + Debug + + + + Deploy + Distribuzione + + + + Database + Database + + + + Security + Sicurezza + + + + Build + Compilazione + + + + Build Events + Eventi di compilazione + + + + Reference Paths + Percorsi del riferimento + + + + Pre-build Event Command Line + Riga di comando eventi di pre-compilazione + + + + Post-build Event Command Line + Riga di comando eventi di post-compilazione + + + + The output path is not trusted. +The application may throw security exceptions when it attempts to perform actions which require full trust. +Click OK to ignore and continue. Click CANCEL to choose a different output path. + Il percorso di output non è attendibile. +L'applicazione potrebbe generare eccezioni di sicurezza mentre prova a eseguire azioni che richiedono l'attendibilità totale. +Fare clic su OK per ignorare e continuare. Fare clic su ANNULLA per selezionare un percorso di output diverso. + + + + <Browse...> + <Sfoglia...> + + + + (None) + (Nessuno) + + + + <New...> + <Nuovo...> + + + + <Browse...> + <Sfoglia...> + + + + (None) + (Nessuno) + + + + Active ({0}) + Attiva ({0}) + + + + All Configurations + Tutte le configurazioni + + + + All Platforms + Tutte le piattaforme + + + + N/A + N/A + This is used in the platform and configuration comboboxes when showing pages that don't care about the current platform/configuration + + + Could not find the configuration '{0}' for platform '{1}'. + La configurazione '{0}' per la piattaforma '{1}' non è stata trovata. + + + + (None) + (Nessuno) + + + + Select File + Seleziona file + + + + Add existing file to project + Aggiungi file esistente al progetto + + + + Icon Files + File icona + + + + Executable Files + File eseguibili + + + + Select Working Directory + Seleziona directory di lavoro + + + + Select Output Path + Seleziona percorso di output + + + + Select Reference Path + Seleziona percorso del riferimento + + + + Win32 Resource Files + File di risorse Win32 + + + + Add Win32 resource file to project + Aggiungi file di risorse Win32 al progetto + + + + Folder path does not exist. +Please select a valid folder path. + Il percorso della cartella non esiste. +Selezionare un percorso della cartella valido. + + + + Advanced Compiler Settings + Impostazioni avanzate del compilatore + + + + Advanced Build Settings + Impostazioni di compilazione avanzate + + + + Compiler Warnings + Avvisi del compilatore + + + + Reference Paths + Percorsi del riferimento + + + + Compatible Settings + Impostazioni compatibili + + + + Assembly Information + Informazioni sull'assembly + + + + Invalid version format, expected "[Major]", "[Major].[Minor]", "[Major].[Minor].[Build]" or "[Major].[Minor].[Build].[Revision]" + Formato di versione non valido: previsto [Principale]", "[Principale].[Secondaria]", "[Principale].[Secondaria].[Build]" o "[Principale].[Secondaria].[Build].[Revisione] + + + + A wildcard ("*") is not allowed in this field. + Il carattere jolly ("*") non è consentito in questo campo. + + + + Each part of the version number for '{0}' must be an integer between 0 and {1}. + Ogni parte del numero di versione per '{0}' deve essere un numero intero compreso tra 0 e {1}. + + + + (Default Icon) + (Icona predefinita) + + + + Startup object must be a form when 'Enable application framework' is checked. + L'oggetto di avvio deve essere un form con l'opzione 'Abilita framework applicazione' selezionata. + + + + (Not set) + (Non impostato) + + + + Icon could not be added to the project. + Non è stato possibile aggiungere l'icona al progetto. + + + + Invalid icon file. + Il file icona non è valido. + + + + {0} is not a valid icon file. + {0} non è un file icona valido. + + + + The GUID should match the format dddddddd-dddd-dddd-dddd-dddddddddddd. + Il formato del GUID deve essere dddddddd-dddd-dddd-dddd-dddddddddddd. + + + + NOTE: This file is auto-generated; do not modify it directly. To make changes, + NOTA: questo file è generato automaticamente e non può essere modificato direttamente. Per apportare modifiche + These comments are placed in the ApplicationEvents.vb file if it is generated by the project designer. The same comments appear in the templates, under vsproject\Templates\Windows\VisualBasic\ProjectTemplates\WindowsApplication\MyEvents.vb (MyEvents.vb is renamed to ApplicationEvents.vb after project creation), and these comments should be kept in sync + + + or if you encounter build errors in this file, go to the Project Designer + o se vengono rilevati errori di compilazione nel file, passare a Creazione progetti + + + + (go to Project Properties or double-click the My Project node in + (aprire le proprietà del progetto o fare doppio clic sul nodo Progetti personali in + + + + Solution Explorer), and make changes on the Application tab. + Esplora soluzioni) e apportare le modifiche nella scheda Applicazione. + + + + '{0}' is not a valid identifier. Please select a different Startup form. + '{0}' non è un identificatore valido. Selezionare un altro form di avvio. + + + + '{0}' is not a valid identifier. Please select a different Splash screen form. + '{0}' non è un identificatore valido. Selezionare un altro form della schermata iniziale. + + + + The splash screen form cannot be the start-up form. + Il form della schermata iniziale non può essere il form di avvio. + + + + Startup f&orm: + &Form di avvio: + + + + The following events are available for MyApplication: + Per MyApplication sono disponibili gli eventi seguenti: + + + + Startup: Raised when the application starts, before the startup form is created. + Startup: generato all'avvio dell'applicazione, prima della creazione del form di avvio. + + + + Shutdown: Raised after all application forms are closed. This event is not raised if the application terminates abnormally. + Shutdown: generato dopo la chiusura di tutti i form dell'applicazione. Questo evento non viene generato se l'applicazione termina in modo anomalo. + + + + UnhandledException: Raised if the application encounters an unhandled exception. + UnhandledException: generato se nell'applicazione si verifica un'eccezione non gestita. + + + + StartupNextInstance: Raised when launching a single-instance application and the application is already active. + StartupNextInstance: generato all'avvio di un'applicazione a istanza singola se l'applicazione è già attiva. + + + + NetworkAvailabilityChanged: Raised when the network connection is connected or disconnected. + NetworkAvailabilityChanged: generato quando la connessione di rete viene connessa o disconnessa. + + + + Base address must be a hexadecimal number with less than or equal to 8 digits, for example, 0x11000000. + L'indirizzo di base deve essere un numero esadecimale con un numero di cifre inferiore o uguale a 8, ad esempio 0x11000000. + + + + None + Nessuno + + + + Warning + Avviso + + + + Error + Errore + + + + (custom) + (personalizzata) + + + + Implicit conversion + Conversione implicita + + + + Late binding; call could fail at run time + Binding tardivo. La chiamata potrebbe non riuscire in fase di esecuzione + + + + Implicit type; object assumed + Tipo implicito. Verrà usato object + + + + Use of variable prior to assignment + Uso della variabile prima dell'assegnazione + + + + Function/Operator without return value + Funzione/operatore senza valore restituito + + + + Unused local variable + Variabile locale inutilizzata + + + + Instance variable accesses shared member + Variabile di istanza con accesso a membro condiviso + + + + Recursive operator or property access + Operatore ricorsivo o accesso a proprietà + + + + Duplicate or overlapping catch blocks + Blocchi catch duplicati o sovrapposti + + + + The warning settings for one or more configurations conflict. +Changing this setting will reset the settings in all configurations. + Le impostazioni di avviso per una o più configurazioni sono in conflitto. +Se si modifica questa impostazione, verranno ripristinate le impostazioni in tutte le configurazioni. + + + + When startup form closes + Alla chiusura del form di avvio + + + + When last form closes + Alla chiusura dell'ultimo form + + + + Windows + Windows + Authentication modes + + + Application-defined + Definita dall'applicazione + Authentication modes + + + Cancel + Annulla + + + + &Calculate Permissions + &Elabora autorizzazioni + + + + Stopped... + Operazione interrotta... + + + + Starting... + Avvio... + + + + Building... + Compilazione... + + + + Analyzing... + Analisi... + + + + Analyze Failed + Analisi non riuscita + + + + Aborting... + Interruzione... + + + + Canceling... + Annullamento... + + + + Internet + Internet + + + + Local Intranet + Intranet locale + + + + (Custom) + (Personalizzata) + Don't use + + + (Zone Default) + (Predefinita dell'area) + + + + Include + Includi + + + + Exclude + Escludi + + + + The application will require elevated permissions to run in the selected zone. Click the help link above for more info. + Per eseguire l'applicazione nell'area selezionata, sono necessarie autorizzazioni elevate. Per altre informazioni, fare clic sul precedente collegamento della Guida. + + + + This permission could not be loaded. Press the delete key to remove it from your project. + Non è stato possibile caricare l'autorizzazione. Premere CANC per rimuoverla dal progetto. + Don't use + + + Included + Inclusa + + + + Permission + Autorizzazione + + + + Setting + Impostazione + + + + Specify the code access security permissions that your ClickOnce application requires in order to run. Learn more about code access security... + Specificare le autorizzazioni di sicurezza per l'accesso di codice richieste dall'applicazione ClickOnce per l'esecuzione. Altre informazioni sulla sicurezza per l'accesso di codice... + + + + Learn more about code access security... + Altre informazioni sulla sicurezza per l'accesso di codice... + + + + Invalid value + Valore non valido + + + + The SecurityPermission must be included in your application with the Execute flag set or your application will not run. Mark this permission as "Zone Default" or "Include." + Per eseguire l'applicazione, SecurityPermission deve essere incluso nell'applicazione con il flag impostato su Execute. Contrassegnare l'autorizzazione come "Predefinita dell'area" o "Includi". + + + + The SecurityPermission must be included in your application with the Execute flag set or your application will not run. The Execute flag has been added to the SecurityPermission in your manifest. + Per eseguire l'applicazione, SecurityPermission deve essere incluso nell'applicazione con il flag impostato su Execute. Il flag Execute è stato aggiunto a SecurityPermission nel manifesto. + + + + This application requires full trust to run correctly. Would you like to set this as a full trust application? + Per eseguire correttamente l'applicazione, è richiesta l'attendibilità totale. Impostare l'attendibilità totale per l'applicazione? + + + + Full Trust Required + Attendibilità totale richiesta + + + + An error occurred and the app.manifest file could not be saved. +Error: + Non è stato possibile salvare il file app.manifest a causa di un errore. +Errore: + + + + An error occurred and the app.manifest file could not be loaded. Please remove any changes you have made to the file and reload the Security property page again. + Non è stato possibile caricare il file app.manifest a causa di un errore. Rimuovere le modifiche apportate al file e ricaricare la pagina delle proprietà di sicurezza. + + + + Included + Inclusa + + + + Not Included + Non inclusa + + + + Included with warning + Inclusa con avviso + + + + Calculating permissions failed. + L'elaborazione delle autorizzazioni non è riuscita. + + + + Error + Errore + + + + Advanced Security Settings + Impostazioni di sicurezza avanzate + + + + Build Failed. Click CANCEL and correct the build failure before analyzing again. + Compilazione non riuscita. Fare clic su ANNULLA e correggere l'errore di compilazione prima di eseguire di nuovo l'analisi. + + + + Build completed... + Compilazione completata... + + + + Unable to start the build. + Non è possibile avviare la compilazione. + + + + Serious error. The build must begin in order to analyze permissions. It has not started. + Errore grave. Per analizzare le autorizzazioni, è necessario avviare la compilazione, che non è stata avviata. + Don't use + + + (Custom) + (Personalizzata) + Don't use + + + (None) + (Nessuno) + + + + Selecting existing key file + Selezione di un file di chiave esistente + + + + Key Files + File di chiave + + + + Create key file + Crea file di chiave + + + + The old password is invalid. + La vecchia password non è valida. + + + + Enter the old password. + Immettere la vecchia password. + + + + Enter a new password. + Immettere una nuova password. + + + + The new passwords do not match. Enter the password again. + Le nuove password non corrispondono. Immettere di nuovo la password. + + + + The new password must be at least 6 characters in length. Enter the password again. + La nuova password deve contenere almeno 6 caratteri. Immettere di nuovo la password. + + + + Select a Certificate + Seleziona un certificato + + + + Select a certificate to sign your ClickOnce manifests + Selezionare un certificato per firmare i manifesti ClickOnce + + + + Certificate Files + File di certificato + + + + Issued To + Rilasciato a + + + + Issued By + Rilasciato da + + + + Intended Purpose + Scopo previsto + + + + Expiration Date + Data di scadenza + + + + The password is invalid. + La password non è valida. + + + + Invalid password + Password non valida + + + + The selected file does not contain a private key. You must choose a certificate that contains a private key. + Il file selezionato non contiene una chiave privata. È necessario scegliere un certificato che contenga una chiave privata. + + + + Invalid key + Chiave non valida + + + + Certificate Creation Error + Errore di creazione del certificato + + + + <All> + <Tutti> + + + + The passwords do not match. + Le password non corrispondono. + + + + Enter a password. + Immettere una password. + + + + Confirm the password. + Confermare la password. + + + + (none) + (nessuno) + + + + Enter password to open file + Immettere la password per aprire il file + + + + Enter &password to open file {0} + Immettere la &password per aprire il file {0} + + + + Enter &password for new file {0} + Immettere la &password per il nuovo file {0} + + + + The project already contains a file with that name. Choose another certificate file or rename the file in your project. + Il progetto contiene già un file con tale nome. Scegliere un altro file di certificato o rinominare quello nel progetto. + + + + The file '{0}' could not be imported: {1} + Non è stato possibile importare il file '{0}': {1} + + + + _TemporaryKey.pfx + _TemporaryKey.pfx + + + + The selected certificate is not valid for code signing. Choose another certificate file. + Il certificato selezionato non è valido per la firma del codice. Scegliere un altro file di certificato. + + + + Change property: {0} + Modifica proprietà: {0} + + + + Windows Application + Applicazione Windows + + + + Windows Service + Servizio di Windows + + + + Class Library + Libreria di classi + + + + Console Application + Applicazione console + + + + Web Control Library + Libreria di controlli Web + + + + Cannot remove '{0}'. {1} + + Non è possibile rimuovere '{0}'. {1} + + + + + Adding or removing '{0}' as a project import failed because of an unexpected error from the project system. The error returned was: '{1}'. + Non è stato possibile aggiungere o rimuovere '{0}' come importazione del progetto a causa di un errore imprevisto del sistema di progetto. Errore restituito: '{1}'. + + + + Adding web reference failed. {0} + + Non è stato possibile aggiungere il riferimento Web. {0} + + + + + Updating web reference '{0}' failed. +{1} + Non è stato possibile aggiornare il riferimento Web '{0}'. +{1} + + + + Web Reference Properties + Proprietà del riferimento Web + + + + Static + Statico + + + + Dynamic + Dinamico + + + + Name of the web reference + Nome del riferimento Web + + + + URL Behavior + Comportamento URL + + + + Web reference URL behavior + Comportamento dell'URL del riferimento Web + + + + Web Reference URL + URL del riferimento Web + + + + Web Reference URL + URL del riferimento Web + + + + Reference Properties + Proprietà del riferimento + + + + The remote machine name cannot be blank. Please specify the name of the machine to debug remotely. + Il nome del computer remoto non può essere vuoto. Specificare il nome del computer di cui eseguire il debug remoto. + + + + The external program cannot be found. Please enter a valid executable file. + Il programma esterno non è stato trovato. Immettere un file eseguibile valido. + + + + The external program property cannot be empty. Please enter a valid executable file. + La proprietà del programma esterno non può essere vuota. Immettere un file eseguibile valido. + + + + We can only debug an EXE file. Please enter a valid executable file. + È possibile eseguire il debug solo di un file EXE. Immettere un file eseguibile valido. + + + + The URL property cannot be empty. Please enter a valid URL. + La proprietà dell'URL non può essere vuota. Immettere un URL valido. + + + + The URL is invalid. Please enter a valid URL like "http://www.microsoft.com/" + L'URL non è valido. Immettere un URL valido, ad esempio "http://www.microsoft.com/" + + + + The working directory you entered does not exist. Please enter a valid working directory. + La directory di lavoro immessa non esiste. Immettere una directory di lavoro valida. + + + + <The system cannot find the reference specified> + <Il sistema non riesce a trovare il riferimento specificato> + + + + Unused References + Riferimenti inutilizzati + + + + &Remove + &Rimuovi + + + + No unused references + Riferimenti inutilizzati non disponibili + + + + Project compilation failed. Cannot determine unused references. + La compilazione del progetto non è riuscita. Non è possibile determinare i riferimenti inutilizzati. + + + + Gathering list of unused references... + Raccolta dell'elenco dei riferimenti inutilizzati... + + + + Error getting unused references. + Si è verificato un errore durante la lettura dei riferimenti inutilizzati. + + + + Base address must be a hexadecimal number with less than or equal to 8 digits, for example, &H11000000. + L'indirizzo di base deve essere un numero esadecimale con un numero di cifre inferiore o uguale a 8, ad esempio &H11000000. + + + + "Resource files must have a .res file extension. Please enter a valid resource file name." + "Il file di risorse deve avere l'estensione RES. Immettere un nome di file di risorse valido." + + + + "The resource file entered does not exist." + "Il file di risorse immesso non esiste." + + + + Project Designer + Creazione progetti + + + + Settings + Impostazioni + + + + Resources + Risorse + + + + An error occurred trying to load the project properties window. Close the window and try again. +{0} + Si è verificato un errore durante il tentativo di caricare la finestra delle proprietà del progetto. Chiudere la finestra e riprovare. +{0} + + + + An error occurred trying to load the page. + Si è verificato un errore durante il caricamento della pagina. + + + + The designer cannot be shown because the document for it was never loaded. + Non è possibile visualizzare la finestra di progettazione perché il documento non è mai stato caricato. + + + + This project does not contain a default resources file. Click here to create one. + Questo progetto non contiene un file di risorse predefinito. Fare clic qui per crearne uno. + + + + This project does not contain a default settings file. Click here to create one. + Questo progetto non contiene un file di impostazioni predefinito. Fare clic qui per crearne uno. + + + + Could not find the file '{0}'. + Il file '{0}' non è stato trovato. + + + + The file '{0}' is already open in an editor. Please close the file and try again. + Il file '{0}' è già aperto in un editor. Chiudere il file e riprovare. + + + + All Project Designer Pages + Tutte le pagine Creazione progetti + + + + More Settings + Altre impostazioni + + + + The requested file type is not supported in projects of this type. + Il tipo di file richiesto non è supportato nei progetti di questo tipo. + + + + Assembly Name + Nome dell'assembly + + + + Root Namespace + Spazio dei nomi radice + + + + Startup Object + Oggetto di avvio + + + + Application Icon + Icona dell'applicazione + Property Friendly Names (for transaction names) - NOTE: All of these are optional + + + Assembly Version + Versione dell'assembly + + + + Assembly File Version + Versione del file di assembly + + + + Assembly GUID + GUID dell'assembly + + + + Enable application framework + Abilita framework applicazione + + + + External Program Path + Percorso del programma esterno + + + + Start Browser With URL + Avvia browser con URL + + + + Working Directory + Directory di lavoro + + + + Remote Machine Name + Nome del computer remoto + + + + Project Designer Page Container + Contenitore pagine Creazione progetti + + + + Switch Project Designer Page + Passa alla pagina Creazione progetti + + + + Allow switching between active pages of the project designer (use Ctrl+PageUp and Ctrl+PageDown) + Consente di spostarsi tra le pagine attive di Creazione progetti (usare CTRL+PGSU e CTRL+PGGIÙ) + + + + {0} page: + Pagina {0}: + {0} = sub page name + + + {0} [Read Only] + {0} [Di sola lettura] + Attach a readonly to the designer caption {0}=Designer caption + + + The editor could not get the IVsTextStream for file {0}. + L'editor non è riuscito a ottenere IVsTextStream per il file {0}. + #exception {0}=filename + + + The editor could not get the IVsTextStream. + L'editor non è riuscito a ottenere IVsTextStream. + #exception (no file name) + + + No DesignerService for file '{0}'. + Non è disponibile alcun DesignerService per il file '{0}'. + #{0}=file name + + + Invalid physical view name. + Il nome della visualizzazione fisica non è valido. + + + + Unable to create text buffer. + Non è possibile creare il buffer di testo. + # com exception + + + No LocalRegistry service. + Non è disponibile alcun servizio LocalRegistry. + #exception + + + Replacing text stream failed:{0} + Sostituzione del flusso di testo non riuscita: {0} + #exception {0}=err msg + + + Buffer is read only. + Il buffer è di sola lettura. + + + + File is already opened in an incompatible editor. + Il file è già aperto in un editor non compatibile. + + + + Unsupported format. + Formato non supportato. + + + + Unknown Error. + Errore sconosciuto. + + + + Unable to create the designer. {0} + Non è possibile creare la finestra di progettazione. {0} + # {0}=inner exception + + + Unable to check out the current file. The file may be read-only or locked, or you may need to check the file out manually. + Non è possibile estrarre il file corrente. Il file potrebbe essere di sola lettura o bloccato oppure deve essere estratto manualmente. + # General checkout exception message + + + Microsoft Visual Studio + Microsoft Visual Studio + Error reporting + + + Please enter an integer between 1 and 60. + Immettere un numero intero compreso tra 1 e 60. + + + + Please enter an integer between 1 and 60. + Immettere un numero intero compreso tra 1 e 60. + + + + Show empty environment + Visualizza ambiente vuoto + These are items in a combobox (and so they don't need periods) + + + Load last loaded solution + Carica ultima soluzione caricata + These are items in a combobox (and so they don't need periods) + + + Show New Project dialog box + Mostra finestra di dialogo Nuovo progetto + These are items in a combobox (and so they don't need periods) + + + Show Open Project dialog box + Mostra finestra di dialogo Apri progetto + These are items in a combobox (and so they don't need periods) + + + Changes in Help Options will not take effect until the environment is restarted. + Per rendere effettive le modifiche apportate alle opzioni della Guida, è necessario riavviare l'ambiente. + + + + The location specified is on an invalid or read-only disk, or contains a device name reserved for the system. + Il percorso specificato si trova su un disco non valido o di sola lettura oppure contiene un nome di dispositivo riservato per il sistema. + + + + COM + COM + + + + Component Design + Progettazione componenti + + + + Serialization + Serializzazione + + + + Web + Web + + + + COMClass + COMClass + + + + Expose {0} to COM. + Espone {0} a COM. + + + + COM Class + Classe COM + + + + COMVisible + COMVisible + + + + Make {0} visible through COM. + Rende {0} visibile tramite COM. + + + + COM Visible + Visibile a COM + + + + DispId + DispId + + + + Set explicit DispId to this {0}. + Imposta DispId esplicito per {0}. + + + + DispId + DispId + + + + Value + Valore + + + + Explicit DispId value for this {0}. + Valore DispId esplicito per {0}. + + + + Value + Valore + + + + DispId value should be an integer greater than or equal to 1. + DispId deve essere un intero maggiore o uguale a 1. + + + + Category + Categoria + + + + Category group for the property. + Gruppo di categorie per la proprietà. + + + + Category + Categoria + + + + Default Event + Evento predefinito + + + + Default event for the class. + Evento predefinito per la classe. + + + + Default Event + Evento predefinito + + + + Default Value + Valore predefinito + + + + Default value for the property. + Valore predefinito per la proprietà. + + + + Default Value + Valore predefinito + + + + NonSerialized + NonSerialized + + + + Field should not be serialized. + Il campo non deve essere serializzato. + + + + Non Serialized + Non serializzato + + + + Serializable + Serializzabile + + + + Enable serialization for this {0} and its members. + Abilitare la serializzazione per {0} e relativi membri. + + + + Serializable + Serializzabile + + + + WebMethod + WebMethod + + + + Expose method via web services. + Espone il metodo tramite i servizi Web. + + + + Web Method + Metodo Web + + + + Description + Descrizione + + + + Description for the Web Method. + Descrizione per il metodo Web. + + + + Description + Descrizione + + + + EnableSession + EnableSession + + + + Maintain session state. + Mantiene lo stato sessione. + + + + Enable Session + Abilita sessione + + + + TransactionOptions + TransactionOptions + + + + Set transaction options. + Imposta le opzioni di transizione. + + + + Transaction Options + Opzioni di transizione + + + + WebService + WebService + + + + Configure the Web Service settings. + Configura le impostazioni del servizio Web. + + + + Web Service + Servizio Web + + + + Name + Nome + + + + Name for the web service. + Nome del servizio Web. + + + + Name + Nome + + + + Description + Descrizione + + + + Description for the web service. + Descrizione per il servizio Web. + + + + Description + Descrizione + + + + Namespace + Spazio dei nomi + + + + Namespace for the web service. + Spazio dei nomi per il servizio Web. + + + + Namespace + Spazio dei nomi + + + + Default + Predefinito + + + + Action + Azione + + + + Appearance + Aspetto + + + + Behavior + Comportamento + + + + Data + Dati + + + + DragDrop + DragDrop + + + + Focus + Stato attivo + + + + Format + Formato + + + + Key + Chiave + + + + Layout + Layout + + + + Mouse + Mouse + + + + WindowStyle + WindowStyle + + + + (None) + (Nessuno) + Default Event + + + Requires: + Richiede: + + + + Name + Nome + Column names for the string table + + + Type + Tipo + Column names for the string table + + + Value + Valore + Column names for the string table + + + Comment + Commento + Column names for the string table + + + Failed to generate file: {0} + Non è stato possibile generare il file: {0} + + + + Editing embedded resources directly is not supported. Do you wish to convert this item to a linked resource in order to edit it? + La modifica diretta delle risorse incorporate non è supportata. Convertire questo elemento in una risorsa collegata per modificarlo? + + + + The current object is auto-generated and only supports renaming through the Managed Resources Editor. + L'oggetto corrente è stato generato automaticamente e supporta la ridenominazione solo tramite Editor risorse gestite. + + + + Cannot find the file '{0}'. It may have been moved or deleted. + Il file '{0}' non è stato trovato. È possibile che sia stato spostato o eliminato. + {0} = file name and path + + + Unable to load resource from file '{0}'. + Non è possibile caricare la risorsa dal file '{0}'. + {0} = file name and path + + + The resource name cannot be empty. + Il nome della risorsa non può essere vuoto. + + + + There is already another resource with the name '{0}'. + Esiste già un'altra risorsa denominata '{0}'. + {0} = Resource name + + + The resource was not of the expected type. + La risorsa non è del tipo previsto. + This error can happen if, for example, you try to add foo.bmp to the resource editor, but foo.bmp is really a metafile. + + + Unable to create new resource file '{0}'. {1} + Non è possibile creare il nuovo file di risorse '{0}'. {1} + {0} = file name and path, {1} = additional error information + + + Unable to play the audio resource. {0} + Non è possibile riprodurre la risorsa audio. {0} + {0} = Additional error information. + + + Resource '{0}' cannot be saved to a file. + Non è possibile salvare la risorsa '{0}' in un file. + {0} = Resource name + + + The operation has been canceled by the user. + L'operazione è stata annullata dall'utente. + + + + The resource value contains invalid data or has an incorrect format. + Il valore della risorsa contiene dati non validi o è in un formato non corretto. + + + + The name of the resource '{0}' cannot be used as a valid identifier, because it contains one or more invalid characters: '{1}'. Please remove or replace those characters and try again. + Il nome della risorsa '{0}' non può essere usato come identificatore valido perché contiene uno o più caratteri non validi: \'{1\}'. Rimuovere o sostituire tali caratteri e riprovare. + {0} = Resource name + + + Too many files specified. Please select fewer files and try again. + Sono stati specificati troppi file. Selezionare un numero minore di file e riprovare. + + + + Unexpected error. + Errore imprevisto. + Theoretically possible but we really don't expect to happen. Unexpected, internal error. + + + Unable to load internal localized resource '{0}'. + Non è possibile caricare la risorsa localizzata interna '{0}'. + Theoretically possible but we really don't expect to happen. Unexpected, internal error. + + + The value could not be converted into a resource of type {0}. + +{1} + Non è stato possibile convertire il valore in una risorsa di tipo {0}. + +{1} + {0} = the type that was expected by the resource editor (e.g. System.Drawing.Point) +{1} = more specific additional error message from the system + + + The value cannot be empty in a resource of type {0}. + Il valore non può essere vuoto in una risorsa di tipo {0}. + {0} = the type that was expected by the resource editor (e.g. System.Drawing.Point) + + + One or more of the selected resource values could not be cleared. + Non è stato possibile deselezionare uno o più valori della risorsa selezionata. + + + + The resource file cannot be modified at this time. + Non è possibile modificare il file di risorse in questo momento. + + + + You are trying to edit a resource file that is a part of another project item (such as a form or a control). Editing this item could corrupt the project item, and you will have to recover it by hand. In addition, changes made to this resource file may be lost if further changes are made to the project item. + +Do you really want to edit this file? + Si sta provando a modificare un file di risorse che fa parte di un altro elemento del progetto, ad esempio un form o un controllo. La modifica del file potrebbe comportare il danneggiamento dell'elemento del progetto e di conseguenza sarà necessario eseguire un ripristino manuale. Inoltre, le modifiche apportate a questo file di risorse potrebbero andare perdute se si effettuano altre modifiche all'elemento del progetto. + +Modificare il file? + + + + The resource '{0}' cannot be added. + Non è possibile aggiungere la risorsa '{0}'. + {0} - name of the resource + + + The device does not support '{0}' files. + Il dispositivo non supporta i file '{0}'. + {0} - the extension of the file name like 'tiff' + + + The resource item uses the type '{0}', which is not supported in this project. + L'elemento risorsa usa il tipo '{0}', che non è supportato in questo progetto. + {0} - name of the type + + + The resource item(s) {0} cannot be saved correctly. The item(s) will be discarded. + Non è possibile salvare correttamente gli elementi risorsa {0}. Gli elementi verranno ignorati. + {0} - name list of the resource + + + '{0}' + '{0}' + {0} - name + + + {0}, '{1}' + {0}, '{1}' + # {0} - name list +# {1} - another name + + + (Nothing/null) + (Nothing/Null) + Displayed in a string table for values of Nothing/null +CONSIDER: get this from CodeDom + + + (Unknown type) + (Tipo sconosciuto) + This actually shouldn't be needed, but if we get an exception trying to get the type name of an entry in the resx file (not supposed to happen), then we'll display this as its type. + + + (Value cannot be displayed) + (Valore non visualizzabile) + Displayed in a string table for values which cannot be edited by the user + + + Name + Nome + Columns for the "Details" view of the resource editor + + + Filename + Nome file + Columns for the "Details" view of the resource editor + + + Type + Tipo + Columns for the "Details" view of the resource editor + + + Size + Dimensioni + Columns for the "Details" view of the resource editor + + + Comment + Commento + Columns for the "Details" view of the resource editor + + + Text Encoding + Codifica testo + Columns for the "Details" view of the resource editor + + + {0} x {1} + {0} x {1} + Format string for showing a graphic's size + +# {0} = width (as an integer) +# {1} = height (as an integer) +#Example, for a bitmap of width=123, height = 456, the English version of this string would be "123x456" + + + {0} KB + {0} KB + #Format string for showing a file's size +# {0} = length in kilobytes + + + {0} byte(s) + {0} byte + Format string for showing a file's size. +{0} = length in bytes + + + Strings + Stringhe + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + Images + Immagini + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + Icons + Icone + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + Audio + Audio + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + Files + File + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + Other + Altro + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + &Add + &Aggiungi + Add, Delete and Views button text in the main ToolStrip + + + &Remove + &Rimuovi + Add, Delete and Views button text in the main ToolStrip + + + &Views + &Visualizzazioni + Add, Delete and Views button text in the main ToolStrip + + + &Existing File... + &File esistente... + Menu items under the "Add" button + + + New &String + &Nuova stringa + Menu items under the "Add" button + + + New &Image + &Nuova immagine + Menu items under the "Add" button + + + &PNG Image... + &Immagine PNG... + Menu items under the "Add" button + + + &BMP Image... + &Immagine BMP... + Menu items under the "Add" button + + + &GIF Image... + &Immagine GIF... + Menu items under the "Add" button + + + &JPEG Image... + &Immagine JPEG... + Menu items under the "Add" button + + + &TIFF Image... + &Immagine TIFF... + Menu items under the "Add" button + + + New I&con... + &Nuova icona... + Menu items under the "Add" button + + + New &Text File... + &Nuovo file di testo... + Menu items under the "Add" button + + + Windows Bitmap + Bitmap di Windows + Friendly Image types + + + EXIF Image + Immagine EXIF + Friendly Image types + + + Graphics Interchange Format + Graphics Interchange Format + Friendly Image types + + + JPEG File Interchange Format + File di interscambio JPEG + Friendly Image types + + + Windows Bitmap + Bitmap di Windows + Friendly Image types + + + Portable Network Graphics + Portable Network Graphics + Friendly Image types + + + Tag Image File Format + Tag Image File Format + Friendly Image types + + + Icon + Icona + Friendly Image types + + + Text File + File di testo + Friendly Image types + + + Binary File + File binario + + + + Wave Sound + Suono WAVE + Friendly Image types + + + Linked at compile time + Collegato in fase di compilazione + File Persistence Mode + + + Embedded in .resx + Incorporato in .resx + File Persistence Mode + + + Bitmaps + Bitmap + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Icons + Icone + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Audio + Audio + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Text Files + File di testo + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + All Files + Tutti i file + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Windows Bitmap + Bitmap di Windows + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Portable Network Graphics + Portable Network Graphics + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Graphics Interchange Format + Graphics Interchange Format + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + JPEG File Interchange Format + File di interscambio JPEG + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Tag Image File Format + Tag Image File Format + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Icon + Icona + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + &List + &Elenco + Resource editor listview view styles (like changing the view style of a folder in Windows XP) + + + &Details + &Dettagli + Resource editor listview view styles (like changing the view style of a folder in Windows XP) + + + &Thumbnail + &Anteprima + Resource editor listview view styles (like changing the view style of a folder in Windows XP) + + + Managed Resources Editor + Editor risorse gestite + + + + Add existing file to resources + Aggiungi file esistente alle risorse + + + + Import file into resource '{0}' + Importa il file nella risorsa '{0}' + {0} = Name of resource being imported into + + + Export resource '{0}' to file + Esporta la risorsa '{0}' nel file + {0} = Name of resource being exported from + + + Please specify where to save the new file + Specificare dove salvare il nuovo file + + + + The file '{0}' already exists. Do you want to replace it? + Il file '{0}' esiste già. Sostituirlo? + {0} = full file path and name + + + The following files already exist. Do you want to replace them? + I file seguenti esistono già. Sostituirli? + + + + Select a folder in which to export the resources. + Selezionare una cartella in cui esportare le risorse. + + + + Do you want to continue anyway? + Continuare comunque? + + + + Do you want to enable strongly-typed resource generation for this file? + Abilitare la generazione di risorse fortemente tipizzate per questo file? + + + + Resource '{0}' could not be loaded because the file to which it is linked could not be found: {1}. + Non è stato possibile caricare la risorsa '{0}' perché il file a cui è collegata non è stato trovato: {1}. + {0} = resource name that had the error, {1} = file path/name that could not be found + + + Resource '{0}' could not be instantiated. {1} + Non è stato possibile creare un'istanza della risorsa '{0}'. {1} + {0} = resource name that had the error, {1} = extended error information + + + Resource '{0}' has a name that is not recommended and that may cause compilation errors in your code. Please choose another name. + È consigliabile non usare il nome della risorsa '{0}' perché potrebbe causare errori di compilazione nel codice. Scegliere un altro nome. + {0} = resource name that had the error + + + Unable to set the Custom Tool or Custom Tool Namespace properties of this file in order to change strongly-typed resource generation options. If the project file is checked in, try checking it out. + Non è possibile impostare le proprietà dello strumento personalizzato o dello spazio dei nomi dello strumento personalizzato del file per modificare le opzioni di generazione di risorse fortemente tipizzate. Se il file di progetto è archiviato, provare a estrarlo. + One possible source for this error is that source code control checkout failed or was canceled. + + + Double-click here to enable strongly-typed resources for this file. + Fare doppio clic qui per abilitare le risorse fortemente tipizzate per questo file. + + + + The resource name '{0}' is not a valid identifier. + Il nome di risorsa '{0}' non è un identificatore valido. + + + + {0} - Codepage {1} + {0} - Tabella codici {1} + {0} = encoding name (e.g., "Western European (Windows)"), {1} = code page # (e.g., 85001) + + + (Default) + (Predefinita) + + + + Change resource name + Cambia nome della risorsa + + + + Add {0} new resource(s) + Aggiungi {0} nuova/e risorsa/e + {0} = number of resources added + + + Remove {0} resource(s) + Rimuovi {0} risorsa/e + {0} = number of resources removed + + + Delete values in {0} cell(s) + Elimina valori in {0} cella/e + {0} = number of cells cleared + + + &Categories: + &Categorie: + The label in the menu strip for the combobox that holds the categories of resources to display + + + Name used to identify the resource in code. + Nome usato per identificare la risorsa nel codice. + + + + Additional information about the resource. This property is only meaningful at design time. + Informazioni aggiuntive relative alla risorsa. Questa proprietà è significativa solo in fase di progettazione. + + + + Character encoding of the file. + Codifica dei caratteri del file. + + + + The path to the linked resource. + Percorso della risorsa collegata. + + + + Specifies whether the file resource is text or binary. + Consente di specificare se il file è di testo o binario. + + + + Specifies whether the resource is embedded or linked. Embedded resources are saved in the resource file. Linked resources reside in an external location on disk. + Consente di specificare se la risorsa è incorporata o collegata. Le risorse incorporate vengono salvate nel file di risorsa. Le risorse collegate si trovano in un percorso esterno sul disco. + + + + The resource will be generated as this type in the strongly-typed resource class. For example, the resource might be generated as a String or Bitmap object. + La risorsa verrà generata con questo tipo nella classe di risorse fortemente tipizzate. Ad esempio, la risorsa potrebbe essere generata come un oggetto String o Bitmap. + + + + The value of the resource. + Valore della risorsa. + + + + Unable to add a '{0}' folder to this project. + +{1} + Non è possibile aggiungere una cartella '{0}' al progetto. + +{1} + {0} = name of folder trying to add (by default, this will be "Resources"), {1} = additional error information + + + Unable to add '{0}' to the project. + +{1} + Non è possibile aggiungere '{0}' al progetto. + +{1} + {0} = file name and path, {1} = additional error information. + + + Unable to add '{0}' to the project. + Non è possibile aggiungere '{0}' al progetto. + {0} = file name and path + + + A file with the name '{0}' already exists. Do you want to replace it? + Esiste già un file denominato '{0}'. Sostituirlo? + {0} = file name and path + + + {0} - Destination File Exists + {0} - File di destinazione esistente + {0} = Name of the editor, e.g. "Managed Resources Editor" or "Resource Picker" + + + There is already a linked file with the name "{0}" in the project folder "{1}". Do you want to remove it? + Nella cartella di progetto "{1}" esiste già un file collegato con il nome "{0}". Rimuoverlo? + {0} = file name (no path), {1} = Path of resource folder + + + {0} - Destination File Exists + {0} - File di destinazione esistente + {0} = Name of the editor, e.g. "Managed Resources Editor" or "Resource Picker" + + + Cannot find the file '{0}'. It may have been moved or deleted. + Il file '{0}' non è stato trovato. È possibile che sia stato spostato o eliminato. + {0} = file name and path + + + Connection string + Stringa di connessione + Added as the last item in the list of available types to let the user browse for a new type + + + Web Service URL + URL del servizio Web + Added as the last item in the list of available types to let the user browse for a new type + + + Browse... + Sfoglia... + Added as the last item in the list of available types to let the user browse for a new type + + + Application + Applicazione + + + + Application (Web) + Applicazione (Web) + + + + User + Utente + + + + User (Web) + Utente (Web) + + + + Name + Nome + + + + Type + Tipo + + + + Scope + Ambito + + + + Value + Valore + + + + Type '{0}' is not defined. + Il tipo '{0}' non è definito. + + + + Name changed + Nome modificato + + + + Type changed + Tipo modificato + + + + Scope changed + Ambito modificato + + + + Roaming changed + Roaming modificato + + + + Description changed + Descrizione modificata + + + + Provider changed + Provider modificato + + + + Value changed + Valore modificato + + + + Generate default value in code changed + Genera valore predefinito nel codice modificato + + + + Remove {0} setting(s) + Rimuovi {0} impostazione/i + + + + Unable to load settings file. It might be corrupted or contain invalid XML or contain duplicate identifiers. + Non è possibile caricare il file di impostazioni. Potrebbe essere danneggiato oppure contenere XML non valido o identificatori duplicati. + + + + New values from the app.config file were automatically added + Sono stati aggiunti automaticamente nuovi valori dal file app.config + + + + Value of setting '{0}' was changed in the app.config file. + Il valore dell'impostazione '{0}' è stato modificato nel file app.config. + + + + The current value in the .settings file is '{0}' +The new value in the app.config file is '{1}' + +Do you want to update the value in the .settings file? + Il valore corrente nel file .settings è '{0}' +Il nuovo valore nel file app.config è '{1}' + +Aggiornare il valore nel file .settings? + + + + An error occurred while reading the app.config file. The file might be corrupted or contain invalid XML. + Si è verificato un errore durante la lettura del file app.config. Il file potrebbe essere danneggiato o contenere XML non valido. + + + + An error occurred while saving values to the app.config file. The file might be corrupted or contain invalid XML. + Si è verificato un errore durante il salvataggio dei valori nel file app.config. Il file potrebbe essere danneggiato o contenere XML non valido. + + + + There is already another setting with the name '{0}'. + Esiste già un'altra impostazione denominata '{0}'. + + + + '{0}' is not a valid identifier. + '{0}' non è un identificatore valido. + + + + '{0}' is not a valid type name. + '{0}' non è un nome di tipo valido. + + + + The setting name cannot be empty. + Il nome dell'impostazione non può essere vuoto. + + + + '{0}' cannot be converted to an instance of type '{1}'. + Non è possibile convertire '{0}' in un'istanza di tipo '{1}'. + + + + Generic types are not supported. + I tipi generici non sono supportati. + + + + Abstract types are not supported. + I tipi astratti non sono supportati. + + + + The current object is auto-generated and only supports renaming through the Settings Designer. + L'oggetto corrente è stato generato automaticamente e supporta la ridenominazione solo tramite Progettazione impostazioni. + + + + The current object is auto-generated and does not support modifying parameters. + L'oggetto corrente è stato generato automaticamente e non supporta la modifica dei parametri. + + + + The settings file cannot be modified at this time. + Non è possibile modificare il file di impostazioni in questo momento. + + + + &Add Setting + &Aggiungi impostazione + + + + R&emove Setting + &Rimuovi impostazione + + + + Application settings allow you to store and retrieve property settings and other information for your application dynamically. For example, the application can save a user's color preferences, then retrieve them the next time it runs. + Le impostazioni dell'applicazione consentono di archiviare e recuperare le impostazioni delle proprietà e altre informazioni per l'applicazione. Ad esempio, le preferenze di un utente relative ai colori possono essere salvate e quindi recuperate alla successiva esecuzione dell'applicazione. + + + + Learn more about application settings... + Altre informazioni sulle impostazioni dell'applicazione... + + + + This connection string appears to contain sensitive data (for example, a password), which is required to connect to the database. However, storing sensitive data in the connection string can be a security risk. Do you want to include sensitive data in the connection string? + La stringa di connessione sembra contenere dati sensibili, ad esempio una password, richiesti per connettersi al database. L'archiviazione di dati sensibili nella stringa di connessione può rappresentare un rischio per la sicurezza. Includere i dati sensibili nella stringa di connessione? + + + + Select a Type + Selezionare un tipo + + + + This class allows you to handle specific events on the settings class: + Questa classe consente di gestire eventi specifici sulla classe delle impostazioni: + Comments for user part of extending generated settings class + + + The SettingChanging event is raised before a setting's value is changed. + L'evento SettingChanging viene generato prima della modifica del valore di un'impostazione. + + + + The PropertyChanged event is raised after a setting's value is changed. + L'evento PropertyChanged viene generato dopo la modifica del valore di un'impostazione. + + + + The SettingsLoaded event is raised after the setting values are loaded. + L'evento SettingsLoaded viene generato dopo il caricamento dei valori dell'impostazione. + + + + The SettingsSaving event is raised before the setting values are saved. + L'evento SettingsSaving viene generato prima del salvataggio dei valori dell'impostazione. + + + + To add event handlers for saving and changing settings, uncomment the lines below: + Per aggiungere gestori eventi per il salvataggio e la modifica delle impostazioni, rimuovere il commento dalle righe seguenti: + + + + Add code to handle the SettingChangingEvent event here. + Aggiungere qui il codice per gestire l'evento SettingChangingEvent. + + + + Add code to handle the SettingsSaving event here. + Aggiungere qui il codice per gestire l'evento SettingsSaving. + + + + Failed to create or open file. + Non è stato possibile creare o aprire il file. + + + + Description of the setting. + Descrizione dell'impostazione. + + + + Specifies whether or not the default setting value should be generated in the strongly-typed settings class. + Consente di specificare se il valore dell'impostazione predefinita deve essere generato nella classe delle impostazioni fortemente tipizzate. + + + + Specifies the group to which this Settings file belongs. + Consente di specificare il gruppo a cui appartiene il file di impostazioni. + + + + Description of the group to which this Settings file belongs. + Descrizione del gruppo a cui appartiene il file di impostazioni. + + + + Indicates whether the setting should roam when Windows roaming profiles are enabled. + Indica se l'impostazione deve effettuare il roaming quando vengono attivati i profili mobili di Windows. + + + + Name used to identify the setting. + Nome usato per identificare l'impostazione. + + + + The provider (System.Configuration.Provider.ProviderBase) used to manage the setting. + Provider (System.Configuration.Provider.ProviderBase) usato per gestire l'impostazione. + + + + Specifies whether the setting is per-application (read-only) or per-user (read-write). + Consente di specificare se l'impostazione è per applicazione (di sola lettura) o per utente (lettura/scrittura). + + + + The setting will be generated as this type in the strongly-typed settings class. For example, the setting might be generated as a String or Integer object. + L'impostazione sarà generata come questo tipo nella classe delle impostazioni fortemente tipizzate. Ad esempio, l'impostazione potrebbe essere generata come un oggetto String o Integer. + + + + The current value for the setting. + Valore corrente per l'impostazione. + + + + The following files will be deleted: + +{0} + I file seguenti verranno eliminati: + +{0} + Synchronize with user.config file + + + No user.config files were found in any of the following locations: + +{0} + Non è stato trovato alcun file user.config nei percorsi seguenti: + +{0} + + + + One or more user.config files was not removed. + Non è stato possibile rimuovere uno o più file user.config. + + + + My.Settings Auto-Save Functionality + Funzionalità di salvataggio automatico My.Settings + in-code comment used to generate a region that hides My.Settings AutoSave functionality + + + Unable to find service '{0}'. Ensure that the application is installed correctly. + Il servizio '{0}' non è stato trovato. Assicurarsi che l'applicazione sia installata correttamente. + Settings Global-Object-Provider Strings + + + Default pac&kage: + &Pacchetto predefinito: + J# Specific String for Root Namespace + + + (Custom) + (Personalizzata) + Entry in the "Accessibility dropdown" + + + No code generation + Nessuna generazione codice + Entry in the "Accessibility dropdown" + + + WPF Application + Applicazione WPF + + + + (Invalid value: "{0}") + (Valore non valido: "{0}") + Goes into the ShutdownMode combobox + + + On explicit shutdown + Alla chiusura esplicita + + + + On last window close + Alla chiusura dell'ultima finestra + + + + On main window close + Alla chiusura della finestra principale + + + + Could not find the expected root element "{0}" in the application definition file. + L'elemento radice previsto "{0}" non è stato trovato nel file di definizione dell'applicazione (ADF). + + + + The .xaml file was in an unexpected format, near line {0} column {1}. + Il formato del file XAML è imprevisto in prossimità della riga {0}, colonna {1}. + + + + Startup &object: + &Oggetto di avvio: + + + + Startup &URI: + &URI di avvio: + + + + The application definition file is already opened in an incompatible editor. Please close the other editor and reload the project properties page. + Il file di definizione dell'applicazione (ADF) è già aperto in un editor non compatibile. Chiudere l'altro editor e ricaricare la pagina delle proprietà del progetto. + + + + There was an error trying to open or create the application definition file for this project. {0} + Si è verificato un errore durante il tentativo di apertura o creazione del file di definizione dell'applicazione (ADF) per questo progetto. {0} + + + + An error occurred trying to load the application definition file for this project. The file '{0}' could not be parsed. Please edit the file in the XAML editor to fix the error. + Si è verificato un errore durante il tentativo di caricamento del file di definizione dell'applicazione (ADF) per il progetto. Non è stato possibile analizzare il file '{0}'. Per correggere l'errore, modificare il file nell'editor XAML. + + + + (Error) + (Errore) + Used inside UI elements when there is an error (e.g. combobox text) + + + An unspecified error has occurred. + Si è verificato un errore non specificato. + + + + This project does not contain an application definition file. + Questo progetto non contiene un file di definizione dell'applicazione (ADF). + + + + An error occurred trying to create the application events file. {0} + Si è verificato un errore durante il tentativo di creazione del file di eventi dell'applicazione. {0} + + + + Invalid argument '{0}' + Argomento '{0}' non valido + {0} = name of invalid argument + + + WPF Console Application + Applicazione console WPF + + + + WPF Class Library + Libreria di classi WPF + + + + Embed manifest with default settings + Incorpora manifesto con impostazioni predefinite + + + + Create application without a manifest + Crea applicazione senza manifesto + + + + Invalid manifest file. + File manifesto non valido. + + + + Services + Servizi + + + + Client application services enable your Windows-based applications to use the ASP.NET login (authentication), roles, and profile (settings) services. + I servizi delle applicazioni client consentono alle applicazioni basate su Windows di utilizzare accesso ASP.NET (autenticazione) e servizi ruoli e profili (impostazioni). + + + + Learn more about client application services... + Altre informazioni sui servizi dell'applicazione client... + + + + Advanced Settings for Services + Impostazioni avanzate per i servizi + + + + Disabling application services will clear the default services for Authentication, Roles, and Settings. Click OK to disable application services. + La disabilitazione dei servizi dell'applicazione comporta la cancellazione dei servizi predefiniti per autenticazione, ruoli e impostazioni. Fare clic su OK per disabilitare i servizi dell'applicazione. + + + + Disable Application Services + Disabilita servizi dell'applicazione + + + + seconds + secondi + + + + minutes + minuti + + + + hours + ore + + + + days + giorni + + + + To enable client application services, you must set the Target Framework for your application to .NET Framework 3.5 or later. In C#, you can do this on the Application property page. In Visual Basic, you can do this one the Compile property page by clicking Advanced Compile Options. + Per abilitare i servizi dell'applicazione client, è necessario impostare la versione di .NET Framework di destinazione dell'applicazione su .NET Framework 3.5 o versione successiva. A tale scopo, in C# è possibile utilizzare la pagina delle proprietà dell'applicazione. In Visual Basic, utilizzare la pagina delle proprietà di compilazione facendo clic su Opzioni di compilazione avanzate. + + + + An error occurred while reading the Application configuration file. The file might be corrupted or contain invalid XML. + Si è verificato un errore durante la lettura del file di configurazione dell'applicazione. Il file potrebbe essere danneggiato o contenere XML non valido. + + + + The URL is invalid. Please enter a valid URL like http://microsoft.com/services + L'URL non è valido. Immettere un URL valido, ad esempio http://microsoft.com/services + + + + A service URL in the application configuration file is not in the expected format. + Il formato di un URL di servizio incluso nel file di configurazione dell'applicazione non è quello previsto. + + + + Authentication, Roles and Web Settings providers have been configured via the Application configuration file such that they do not share a common connection string. + I provider di autenticazione, ruoli e impostazioni Web sono stati configurati tramite il file di configurazione dell'applicazione in modo da non condividere una stringa di connessione comune. + + + + Specify a connection string to a SQL Server database, or use the special connection string "Data Source = |SQL/CE|", which causes SQL Server Compact to generate local database files for offline storage. + Specificare una stringa di connessione a un database di SQL Server oppure usare la stringa di connessione speciale "Data Source = |SQL/CE|", per fare in modo che in SQL Server Compact vengano generati i file di database locali per l'archiviazione offline. + + + + The following type names were not understood: '{0}'. Make sure you have references to these types. + I nomi di tipi seguenti non sono stati riconosciuti: '{0}'. Assicurarsi che siano disponibili riferimenti a questi tipi. + + + + There are already settings with the following names: {0}. + Esistono già impostazioni con i nomi seguenti: {0}. + + + + The username/password combination cannot be authenticated. + Non è possibile autenticare la combinazione di nome utente e password. + + + + Windows Forms Application + Windows Forms Application + The "Windows Forms" distinguishes it from a WPF application + + + Namespace of the service reference. + Spazio dei nomi del riferimento al servizio. + + + + Service Reference Properties + Proprietà del riferimento al servizio + + + + Metadata Location Url + URL del percorso metadati + + + + Metadata Location + Percorso metadati + + + + A service reference with multiple source urls is not supported. + Non sono supportati riferimenti al servizio con più URL di origine. + + + + Cannot change reference Url to empty. The reference url must be a valid URL. + Non è possibile modificare l'URL del riferimento in uno vuoto. L'URL del riferimento deve essere un URL valido. + + + + One or more files were reloaded during the checkout. Please retry your operation. + Uno o più file sono stati ricaricati durante l'estrazione. Riprovare. + + + + The project was reloaded, and some changes on this page may have been lost. + Il progetto è stato ricaricato ed è possibile che alcune modifiche apportate alla pagina siano andate perdute. + + + + The application will fail to run in the selected zone because of this requested elevated permission. Click the help link above for more info. + Non è possibile eseguire l'applicazione nell'area selezionata perché è richiesta un'autorizzazione elevata. Per altre informazioni, fare clic sul precedente collegamento della Guida. + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.ja.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.ja.xlf new file mode 100644 index 00000000000..a8fe2004e40 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.ja.xlf @@ -0,0 +1,2948 @@ + + + + + + All Files + すべてのファイル + + + + Property Page + プロパティ ページ + + + + References + 参照 + + + + Version + バージョン + + + + Signing + 署名 + + + + Application + アプリケーション + + + + Compile + コンパイル + + + + Debug + デバッグ + + + + Deploy + 展開 + + + + Database + データベース + + + + Security + セキュリティ + + + + Build + ビルド + + + + Build Events + ビルド イベント + + + + Reference Paths + 参照パス + + + + Pre-build Event Command Line + ビルド前イベントのコマンド ライン + + + + Post-build Event Command Line + ビルド後イベントのコマンド ライン + + + + The output path is not trusted. +The application may throw security exceptions when it attempts to perform actions which require full trust. +Click OK to ignore and continue. Click CANCEL to choose a different output path. + この出力パスは信頼されていません。 +完全な信頼が必要なアクションを実行しようとすると、アプリケーションがセキュリティ例外をスローする可能性があります。 +無視して続行するには [OK] をクリックしてください。別の出力パスを選ぶには [キャンセル] をクリックしてください。 + + + + <Browse...> + <参照...> + + + + (None) + (なし) + + + + <New...> + <新規...> + + + + <Browse...> + <参照...> + + + + (None) + (なし) + + + + Active ({0}) + アクティブな ({0}) + + + + All Configurations + すべての構成 + + + + All Platforms + すべてのプラットフォーム + + + + N/A + なし + This is used in the platform and configuration comboboxes when showing pages that don't care about the current platform/configuration + + + Could not find the configuration '{0}' for platform '{1}'. + プラットフォーム '{1}' の構成 '{0}' が見つかりませんでした。 + + + + (None) + (なし) + + + + Select File + ファイルの選択 + + + + Add existing file to project + 既存のファイルをプロジェクトに追加 + + + + Icon Files + アイコン ファイル + + + + Executable Files + 実行可能ファイル + + + + Select Working Directory + 作業ディレクトリの選択 + + + + Select Output Path + 出力パスの選択 + + + + Select Reference Path + 参照パスの選択 + + + + Win32 Resource Files + Win32 リソース ファイル + + + + Add Win32 resource file to project + Win32 リソース ファイルをプロジェクトに追加 + + + + Folder path does not exist. +Please select a valid folder path. + フォルダー パスが存在しません。 +有効なフォルダー パスを選択してください。 + + + + Advanced Compiler Settings + コンパイラの詳細設定 + + + + Advanced Build Settings + ビルドの詳細設定 + + + + Compiler Warnings + コンパイラの警告 + + + + Reference Paths + 参照パス + + + + Compatible Settings + 互換性のある設定 + + + + Assembly Information + アセンブリ情報 + + + + Invalid version format, expected "[Major]", "[Major].[Minor]", "[Major].[Minor].[Build]" or "[Major].[Minor].[Build].[Revision]" + 無効なバージョン形式です。"[Major]"、"[Major].[Minor]"、"[Major].[Minor].[Build]"、"[Major].[Minor].[Build].[Revision]" のいずれかの形式であることが必要です + + + + A wildcard ("*") is not allowed in this field. + このフィールドにワイルドカード ("*") は使用できません。 + + + + Each part of the version number for '{0}' must be an integer between 0 and {1}. + '{0}' のバージョン番号の各部分は 0 から {1} までの整数である必要があります。 + + + + (Default Icon) + (既定のアイコン) + + + + Startup object must be a form when 'Enable application framework' is checked. + [アプリケーション フレームワークを有効にする] がオンのとき、スタートアップ オブジェクトはフォームでなければなりません。 + + + + (Not set) + (未設定) + + + + Icon could not be added to the project. + アイコンをプロジェクトに追加できませんでした。 + + + + Invalid icon file. + アイコン ファイルが無効です。 + + + + {0} is not a valid icon file. + {0} は有効なアイコン ファイルではありません。 + + + + The GUID should match the format dddddddd-dddd-dddd-dddd-dddddddddddd. + GUID は dddddddd-dddd-dddd-dddd-dddddddddddd の形式でなければなりません。 + + + + NOTE: This file is auto-generated; do not modify it directly. To make changes, + メモ:このファイルは自動生成されました。直接変更しないでください。変更したり、 + These comments are placed in the ApplicationEvents.vb file if it is generated by the project designer. The same comments appear in the templates, under vsproject\Templates\Windows\VisualBasic\ProjectTemplates\WindowsApplication\MyEvents.vb (MyEvents.vb is renamed to ApplicationEvents.vb after project creation), and these comments should be kept in sync + + + or if you encounter build errors in this file, go to the Project Designer + ビルド エラーが発生した場合は、プロジェクト デザイナー へ移動し (プロジェクト + + + + (go to Project Properties or double-click the My Project node in + プロパティに移動するか、またはソリューション エクスプローラーのマイ プロジェクト + + + + Solution Explorer), and make changes on the Application tab. + ノード上でダブルクリック)、アプリケーション タブ上で変更を行います。 + + + + '{0}' is not a valid identifier. Please select a different Startup form. + '{0}' は有効な識別子ではありません別のスタートアップ フォームを選択してください。 + + + + '{0}' is not a valid identifier. Please select a different Splash screen form. + '{0}' は有効な識別子ではありません別のスプラッシュ スクリーン フォームを選択してください。 + + + + The splash screen form cannot be the start-up form. + スプラッシュ スクリーン フォームをスタートアップ フォームにすることはできません。 + + + + Startup f&orm: + スタートアップ フォーム(&O): + + + + The following events are available for MyApplication: + 次のイベントは MyApplication に対して利用できます: + + + + Startup: Raised when the application starts, before the startup form is created. + Startup:アプリケーションが開始されたとき、スタートアップ フォームが作成される前に発生します。 + + + + Shutdown: Raised after all application forms are closed. This event is not raised if the application terminates abnormally. + Shutdown:アプリケーション フォームがすべて閉じられた後に発生します。このイベントは、アプリケーションが異常終了したときには発生しません。 + + + + UnhandledException: Raised if the application encounters an unhandled exception. + UnhandledException:ハンドルされない例外がアプリケーションで発生したときに発生します。 + + + + StartupNextInstance: Raised when launching a single-instance application and the application is already active. + StartupNextInstance:単一インスタンス アプリケーションが起動され、それが既にアクティブであるときに発生します。 + + + + NetworkAvailabilityChanged: Raised when the network connection is connected or disconnected. + NetworkAvailabilityChanged:ネットワーク接続が接続されたとき、または切断されたときに発生します。 + + + + Base address must be a hexadecimal number with less than or equal to 8 digits, for example, 0x11000000. + ベース アドレスは 8 桁以下の 16 進数である必要があります (例: 0x11000000)。 + + + + None + なし + + + + Warning + 警告 + + + + Error + エラー + + + + (custom) + (カスタム) + + + + Implicit conversion + 暗黙的な変換 + + + + Late binding; call could fail at run time + 遅延バインディングです。呼び出しが実行時に失敗する可能性があります + + + + Implicit type; object assumed + 暗黙的な型です。オブジェクトと見なされます + + + + Use of variable prior to assignment + 割り当て前の変数の使用 + + + + Function/Operator without return value + 戻り値なしの関数/演算子 + + + + Unused local variable + 未使用のローカル変数 + + + + Instance variable accesses shared member + 共有メンバーにアクセスするインスタンス変数 + + + + Recursive operator or property access + 演算子またはプロパティの再帰的なアクセス + + + + Duplicate or overlapping catch blocks + 重複またはオーバーラップする catch ブロック + + + + The warning settings for one or more configurations conflict. +Changing this setting will reset the settings in all configurations. + 1 つ以上の構成に対する警告の設定が競合します。 +この設定を変更すると、すべての構成の設定がリセットされます。 + + + + When startup form closes + スタートアップ フォームが閉じるとき + + + + When last form closes + 最後のフォームが閉じるとき + + + + Windows + Windows + Authentication modes + + + Application-defined + アプリケーション定義 + Authentication modes + + + Cancel + キャンセル + + + + &Calculate Permissions + アクセス許可の計算(&C) + + + + Stopped... + 停止しました... + + + + Starting... + 開始しています... + + + + Building... + ビルドしています... + + + + Analyzing... + 分析しています... + + + + Analyze Failed + 分析できませんでした + + + + Aborting... + 中止しています... + + + + Canceling... + キャンセルしています... + + + + Internet + インターネット + + + + Local Intranet + ローカル イントラネット + + + + (Custom) + (カスタム) + Don't use + + + (Zone Default) + (ゾーン既定値) + + + + Include + 包含 + + + + Exclude + 除外 + + + + The application will require elevated permissions to run in the selected zone. Click the help link above for more info. + 選択されたゾーンでアプリケーションを実行するには、アクセス許可を引き上げる必要があります。詳細については、上のヘルプ リンクをクリックしてください。 + + + + This permission could not be loaded. Press the delete key to remove it from your project. + このアクセス許可を読み込めませんでした。プロジェクトからこのアクセス許可を削除するには、Delete キーを押してください。 + Don't use + + + Included + 含まれている + + + + Permission + アクセス許可 + + + + Setting + 設定 + + + + Specify the code access security permissions that your ClickOnce application requires in order to run. Learn more about code access security... + ClickOnce アプリケーションの実行に必要なコード アクセス セキュリティのアクセス許可を指定してください。コード アクセス セキュリティに関する詳細の表示... + + + + Learn more about code access security... + コード アクセス セキュリティに関する詳細の表示... + + + + Invalid value + 無効な値 + + + + The SecurityPermission must be included in your application with the Execute flag set or your application will not run. Mark this permission as "Zone Default" or "Include." + SecurityPermission が実行フラグ セットと共にアプリケーションに含まれていなければ、アプリケーションは実行されません。このアクセス許可を "ゾーン既定値" または "包含" として設定してください。 + + + + The SecurityPermission must be included in your application with the Execute flag set or your application will not run. The Execute flag has been added to the SecurityPermission in your manifest. + SecurityPermission が実行フラグ セットと共にアプリケーションに含まれていなければ、アプリケーションは実行されません。実行フラグはマニフェスト内の SecurityPermission に追加されました。 + + + + This application requires full trust to run correctly. Would you like to set this as a full trust application? + このアプリケーションは、正しく実行されるために完全な信頼の設定を必要とします。完全信頼アプリケーションとして設定しますか? + + + + Full Trust Required + 完全信頼が必要です + + + + An error occurred and the app.manifest file could not be saved. +Error: + エラーが発生したため、app.manifest ファイルを保存できませんでした。 +エラー: + + + + An error occurred and the app.manifest file could not be loaded. Please remove any changes you have made to the file and reload the Security property page again. + エラーが発生したため、app.manifest ファイルを読み込めませんでした。このファイルへの変更を削除して、セキュリティ プロパティ ページを再度読み込んでください。 + + + + Included + 含まれている + + + + Not Included + 含まれていない + + + + Included with warning + 含まれるアクセス許可 (警告あり) + + + + Calculating permissions failed. + アクセス許可の計算に失敗しました。 + + + + Error + エラー + + + + Advanced Security Settings + セキュリティの詳細設定 + + + + Build Failed. Click CANCEL and correct the build failure before analyzing again. + ビルドに失敗しました。[キャンセル] をクリックし、解析を再実行する前にビルドのエラーを修正してください。 + + + + Build completed... + ビルドの完了... + + + + Unable to start the build. + ビルドを開始できません。 + + + + Serious error. The build must begin in order to analyze permissions. It has not started. + 重大なエラーが発生しました。アクセス許可を解析するために、ビルドを開始しなければなりません。ビルドが開始されていません。 + Don't use + + + (Custom) + (カスタム) + Don't use + + + (None) + (なし) + + + + Selecting existing key file + 既存のキー ファイルを選択しています。 + + + + Key Files + キー ファイル + + + + Create key file + キー ファイルの作成 + + + + The old password is invalid. + 古いパスワードは無効です。 + + + + Enter the old password. + 古いパスワードを入力してください。 + + + + Enter a new password. + 新しいパスワードを入力してください。 + + + + The new passwords do not match. Enter the password again. + 新しいパスワードが一致しません。もう一度、パスワードを入力してください。 + + + + The new password must be at least 6 characters in length. Enter the password again. + 新しいパスワードには、6 文字以上を指定することが必要です。もう一度、パスワードを入力してください。 + + + + Select a Certificate + 証明書の選択 + + + + Select a certificate to sign your ClickOnce manifests + ClickOnce マニフェストに署名する証明書を選択してください + + + + Certificate Files + 証明書ファイル + + + + Issued To + 発行先 + + + + Issued By + 発行元 + + + + Intended Purpose + 使用目的 + + + + Expiration Date + 有効期限 + + + + The password is invalid. + パスワードが無効です。 + + + + Invalid password + 無効なパスワード + + + + The selected file does not contain a private key. You must choose a certificate that contains a private key. + 選択されたファイルには秘密キーが含まれていません。秘密キーを含む証明書を選択する必要があります。 + + + + Invalid key + 無効なキー + + + + Certificate Creation Error + 証明書の作成エラー + + + + <All> + <すべて> + + + + The passwords do not match. + パスワードが一致しません。 + + + + Enter a password. + パスワードを入力してください。 + + + + Confirm the password. + パスワードを確認入力してください。 + + + + (none) + (なし) + + + + Enter password to open file + ファイルを開くためのパスワードを入力してください。 + + + + Enter &password to open file {0} + ファイル {0} を開くためのパスワードを入力する(&P) + + + + Enter &password for new file {0} + 新しいファイル {0} のパスワードを入力する(&P) + + + + The project already contains a file with that name. Choose another certificate file or rename the file in your project. + プロジェクトには既にその名前のファイルが含まれています。別の証明書ファイルを選択するか、またはプロジェクト内のファイル名を変更してください。 + + + + The file '{0}' could not be imported: {1} + ファイル '{0}' をインポートできませんでした: {1} + + + + _TemporaryKey.pfx + _TemporaryKey.pfx + + + + The selected certificate is not valid for code signing. Choose another certificate file. + 選択された証明書はコードの署名には無効です。別の証明書ファイルを選択してください。 + + + + Change property: {0} + プロパティの変更: {0} + + + + Windows Application + Windows アプリケーション + + + + Windows Service + Windows サービス + + + + Class Library + クラス ライブラリ + + + + Console Application + コンソール アプリケーション + + + + Web Control Library + Web コントロール ライブラリ + + + + Cannot remove '{0}'. {1} + + '{0}' を削除できません。 {1} + + + + + Adding or removing '{0}' as a project import failed because of an unexpected error from the project system. The error returned was: '{1}'. + プロジェクト システムからの予期しないエラーのため、'{0}' をプロジェクトのインポートとして追加または削除できませんでした。次のエラーが返されました: '{1}' + + + + Adding web reference failed. {0} + + Web 参照の追加に失敗しました。{0} + + + + + Updating web reference '{0}' failed. +{1} + Web 参照 '{0}' の更新に失敗しました。 +{1} + + + + Web Reference Properties + Web 参照プロパティ + + + + Static + 静的 + + + + Dynamic + 動的 + + + + Name of the web reference + Web 参照の名前です + + + + URL Behavior + URL の動作 + + + + Web reference URL behavior + Web 参照 URL の動作 + + + + Web Reference URL + Web 参照 URL + + + + Web Reference URL + Web 参照 URL + + + + Reference Properties + 参照プロパティ + + + + The remote machine name cannot be blank. Please specify the name of the machine to debug remotely. + リモート コンピューター名を空白にすることはできません。リモートでデバッグするコンピューターの名前を指定してください。 + + + + The external program cannot be found. Please enter a valid executable file. + 外部プログラムが見つかりません。有効な実行可能ファイルを入力してください。 + + + + The external program property cannot be empty. Please enter a valid executable file. + 外部プログラム プロパティは空にできません。有効な実行可能ファイルを入力してください。 + + + + We can only debug an EXE file. Please enter a valid executable file. + EXE ファイルのみをデバッグすることができます。有効な実行可能ファイルを入力してください。 + + + + The URL property cannot be empty. Please enter a valid URL. + URL プロパティは空にできません。有効な URL を入力してください。 + + + + The URL is invalid. Please enter a valid URL like "http://www.microsoft.com/" + URL が無効です。"http://www.microsoft.com/" のような有効な URL を入力してください。 + + + + The working directory you entered does not exist. Please enter a valid working directory. + 入力した作業ディレクトリは存在しません。有効な作業ディレクトリを入力してください。 + + + + <The system cannot find the reference specified> + <システムでは、指定された参照が見つかりません> + + + + Unused References + 未使用の参照 + + + + &Remove + 削除(&R) + + + + No unused references + 未使用の参照はありません + + + + Project compilation failed. Cannot determine unused references. + プロジェクトをコンパイルできませんでした。未使用の参照を特定できませんでした。 + + + + Gathering list of unused references... + 未使用の参照を収集しています... + + + + Error getting unused references. + 未使用の参照を取得するときにエラーが発生しました。 + + + + Base address must be a hexadecimal number with less than or equal to 8 digits, for example, &H11000000. + ベース アドレスは 8 桁以下の 16 進数である必要があります (例: &H11000000)。 + + + + "Resource files must have a .res file extension. Please enter a valid resource file name." + "リソース ファイルには .res 拡張子が必要です。有効なリソース ファイル名を入力してください。" + + + + "The resource file entered does not exist." + "入力されたリソース ファイルは存在しません。 + + + + Project Designer + プロジェクト デザイナー + + + + Settings + 設定 + + + + Resources + リソース + + + + An error occurred trying to load the project properties window. Close the window and try again. +{0} + プロジェクト プロパティ ウィンドウを読み込もうとしているときにエラーが発生しました。ウィンドウを閉じて、もう一度試してください。 +{0} + + + + An error occurred trying to load the page. + ページの読み込み中にエラーが発生しました。 + + + + The designer cannot be shown because the document for it was never loaded. + ドキュメントが読み込まれなかったため、デザイナーを表示できません。 + + + + This project does not contain a default resources file. Click here to create one. + このプロジェクトには既定のリソース ファイルが含まれていません。ファイルを作成するには、ここをクリックしてください。 + + + + This project does not contain a default settings file. Click here to create one. + このプロジェクトには既定の設定ファイルが含まれていません。ファイルを作成するには、ここをクリックしてください。 + + + + Could not find the file '{0}'. + ファイル '{0}' が見つかりません。 + + + + The file '{0}' is already open in an editor. Please close the file and try again. + ファイル '{0}' は既にエディターで開かれています。ファイルを閉じて、もう一度操作を行ってください。 + + + + All Project Designer Pages + すべてのプロジェクト デザイナー ページ + + + + More Settings + その他の設定 + + + + The requested file type is not supported in projects of this type. + 要求されたファイルの種類はこの種類のプロジェクトでサポートされていません。 + + + + Assembly Name + アセンブリ名 + + + + Root Namespace + ルート名前空間 + + + + Startup Object + スタートアップ オブジェクト + + + + Application Icon + アプリケーション アイコン + Property Friendly Names (for transaction names) - NOTE: All of these are optional + + + Assembly Version + アセンブリ バージョン + + + + Assembly File Version + アセンブリ ファイル バージョン + + + + Assembly GUID + アセンブリ GUID + + + + Enable application framework + アプリケーション フレームワークを有効にする + + + + External Program Path + 外部プログラム パス + + + + Start Browser With URL + ブラウザーを開始時に使用する URL + + + + Working Directory + 作業ディレクトリ + + + + Remote Machine Name + リモート コンピューター名 + + + + Project Designer Page Container + プロジェクト デザイナー ページ コンテナー + + + + Switch Project Designer Page + プロジェクト デザイナー ページの切り替え + + + + Allow switching between active pages of the project designer (use Ctrl+PageUp and Ctrl+PageDown) + プロジェクト デザイナーのアクティブ ページ間の切り替えを許可します (Ctrl + PageUp キーおよび Ctrl + PageDown キーを使用) + + + + {0} page: + {0} ページ: + {0} = sub page name + + + {0} [Read Only] + {0} [読み取り専用] + Attach a readonly to the designer caption {0}=Designer caption + + + The editor could not get the IVsTextStream for file {0}. + エディターでファイル {0} の IVsTextStream を取得できませんでした。 + #exception {0}=filename + + + The editor could not get the IVsTextStream. + エディターで IVsTextStream を取得できませんでした。 + #exception (no file name) + + + No DesignerService for file '{0}'. + ファイル '{0}' に対する DesignerService がありません。 + #{0}=file name + + + Invalid physical view name. + 無効な物理ビュー名です。 + + + + Unable to create text buffer. + テキスト バッファーを作成できません。 + # com exception + + + No LocalRegistry service. + LocalRegistry サービスがありません。 + #exception + + + Replacing text stream failed:{0} + テキスト ストリームの置換に失敗しました: {0} + #exception {0}=err msg + + + Buffer is read only. + バッファーは読み取り専用です。 + + + + File is already opened in an incompatible editor. + ファイルは、互換性のないエディターで既に開かれています。 + + + + Unsupported format. + サポートされていない形式です。 + + + + Unknown Error. + 不明なエラーです。 + + + + Unable to create the designer. {0} + デザイナーを作成できません。{0} + # {0}=inner exception + + + Unable to check out the current file. The file may be read-only or locked, or you may need to check the file out manually. + 現在のファイルをチェックアウトできません。ファイルが読み取り専用かロックされています。あるいは、ファイルを手動でチェックアウトする必要がある可能性があります。 + # General checkout exception message + + + Microsoft Visual Studio + Microsoft Visual Studio + Error reporting + + + Please enter an integer between 1 and 60. + 1 から 60 までの整数を入力してください。 + + + + Please enter an integer between 1 and 60. + 1 から 60 までの整数を入力してください。 + + + + Show empty environment + 空の環境の表示 + These are items in a combobox (and so they don't need periods) + + + Load last loaded solution + 最後に読み込んだソリューションの読み込み + These are items in a combobox (and so they don't need periods) + + + Show New Project dialog box + [新しいプロジェクト] ダイアログ ボックスの表示 + These are items in a combobox (and so they don't need periods) + + + Show Open Project dialog box + [プロジェクトを開く] ダイアログ ボックスの表示 + These are items in a combobox (and so they don't need periods) + + + Changes in Help Options will not take effect until the environment is restarted. + ヘルプ オプションの変更は、環境が再起動されたときに有効になります。 + + + + The location specified is on an invalid or read-only disk, or contains a device name reserved for the system. + 指定されたディスクは無効か、読み取り専用か、またはシステムで予約されたデバイス名を含んでいます。 + + + + COM + COM + + + + Component Design + コンポーネント デザイン + + + + Serialization + シリアル化 + + + + Web + Web + + + + COMClass + COMClass + + + + Expose {0} to COM. + {0} を COM に公開します。 + + + + COM Class + COM クラス + + + + COMVisible + COMVisible + + + + Make {0} visible through COM. + COM で {0} を表示します。 + + + + COM Visible + COM 参照可能 + + + + DispId + DispId + + + + Set explicit DispId to this {0}. + 明示的な DispId をこの {0} に設定します。 + + + + DispId + DispId + + + + Value + + + + + Explicit DispId value for this {0}. + この {0} に対する明示的な DispId 値です。 + + + + Value + + + + + DispId value should be an integer greater than or equal to 1. + DispId 値は 1 以上の整数でなければなりません。 + + + + Category + カテゴリ + + + + Category group for the property. + プロパティのカテゴリ グループ + + + + Category + カテゴリ + + + + Default Event + 既定のイベント + + + + Default event for the class. + このクラスの既定のイベントです。 + + + + Default Event + 既定のイベント + + + + Default Value + 既定値 + + + + Default value for the property. + プロパティの既定値です。 + + + + Default Value + 既定値 + + + + NonSerialized + NonSerialized + + + + Field should not be serialized. + フィールドはシリアル化できません。 + + + + Non Serialized + 逆シリアル化 + + + + Serializable + シリアル化可能 + + + + Enable serialization for this {0} and its members. + この {0} およびそのメンバーに対するシリアル化を有効にします。 + + + + Serializable + シリアル化可能 + + + + WebMethod + WebMethod + + + + Expose method via web services. + Web サービスでメソッドを公開します。 + + + + Web Method + Web メソッド + + + + Description + 説明 + + + + Description for the Web Method. + Web メソッドの説明です。 + + + + Description + 説明 + + + + EnableSession + EnableSession + + + + Maintain session state. + セッション状態を維持します。 + + + + Enable Session + セッションを有効にする + + + + TransactionOptions + TransactionOptions + + + + Set transaction options. + トランザクション オプションを設定します。 + + + + Transaction Options + トランザクション オプション + + + + WebService + WebService + + + + Configure the Web Service settings. + Web サービス設定を構成します。 + + + + Web Service + Web サービス + + + + Name + 名前 + + + + Name for the web service. + Web サービスの名前です。 + + + + Name + 名前 + + + + Description + 説明 + + + + Description for the web service. + Web サービスの説明です + + + + Description + 説明 + + + + Namespace + 名前空間 + + + + Namespace for the web service. + Web サービスの名前空間です。 + + + + Namespace + 名前空間 + + + + Default + 既定 + + + + Action + アクション + + + + Appearance + 外観 + + + + Behavior + 動作 + + + + Data + データ + + + + DragDrop + ドラッグ アンド ドロップ + + + + Focus + フォーカス + + + + Format + 形式 + + + + Key + キー + + + + Layout + レイアウト + + + + Mouse + マウス + + + + WindowStyle + ウィンドウ スタイル + + + + (None) + (なし) + Default Event + + + Requires: + 必要なアクセス許可: + + + + Name + 名前 + Column names for the string table + + + Type + 種類 + Column names for the string table + + + Value + + Column names for the string table + + + Comment + コメント + Column names for the string table + + + Failed to generate file: {0} + ファイルの生成に失敗しました: {0} + + + + Editing embedded resources directly is not supported. Do you wish to convert this item to a linked resource in order to edit it? + 埋め込まれたリソースを直接編集する機能はサポートされていません。このアイテムをリンクされたリソースに変換して編集しますか? + + + + The current object is auto-generated and only supports renaming through the Managed Resources Editor. + 現在のオブジェクトは自動生成されていて、マネージ リソース エディターによる名前の変更のみサポートしています。 + + + + Cannot find the file '{0}'. It may have been moved or deleted. + ファイル '{0}' が見つかりません。移動または削除された可能性があります。 + {0} = file name and path + + + Unable to load resource from file '{0}'. + ファイル '{0}' からリソースを読み込めません。 + {0} = file name and path + + + The resource name cannot be empty. + リソース名は空白にできません。 + + + + There is already another resource with the name '{0}'. + '{0}' という名前の付いた別のリソースが既にあります。 + {0} = Resource name + + + The resource was not of the expected type. + リソースは、予期された型ではありませんでした。 + This error can happen if, for example, you try to add foo.bmp to the resource editor, but foo.bmp is really a metafile. + + + Unable to create new resource file '{0}'. {1} + 新しいリソース ファイル '{0}' を作成できません。 {1} + {0} = file name and path, {1} = additional error information + + + Unable to play the audio resource. {0} + オーディオ リソースを再生できません。{0} + {0} = Additional error information. + + + Resource '{0}' cannot be saved to a file. + リソース '{0}' をファイルに保存できません。 + {0} = Resource name + + + The operation has been canceled by the user. + 操作はユーザーによって取り消されました。 + + + + The resource value contains invalid data or has an incorrect format. + リソース値に無効なデータまたは適切ではない形式が含まれています。 + + + + The name of the resource '{0}' cannot be used as a valid identifier, because it contains one or more invalid characters: '{1}'. Please remove or replace those characters and try again. + リソース '{0}' の名前には 1 つまたは複数の無効な文字 '{1}' が含まれているので、有効な識別子として使用できません。これらの文字を削除するか別の文字に置き換えてからもう一度やり直してください。 + {0} = Resource name + + + Too many files specified. Please select fewer files and try again. + 指定したファイルが多すぎます。選択するファイルを少なくして、もう一度やり直してください。 + + + + Unexpected error. + 予期しないエラーです。 + Theoretically possible but we really don't expect to happen. Unexpected, internal error. + + + Unable to load internal localized resource '{0}'. + ローカライズされた内部リソース '{0}' を読み込めません。 + Theoretically possible but we really don't expect to happen. Unexpected, internal error. + + + The value could not be converted into a resource of type {0}. + +{1} + 型 {0} のリソースに値を変換できませんでした。 + +{1} + {0} = the type that was expected by the resource editor (e.g. System.Drawing.Point) +{1} = more specific additional error message from the system + + + The value cannot be empty in a resource of type {0}. + 型 {0} のリソースで値を空にすることはできません。 + {0} = the type that was expected by the resource editor (e.g. System.Drawing.Point) + + + One or more of the selected resource values could not be cleared. + 選択されたリソース値の 1 つ以上をクリアできませんでした。 + + + + The resource file cannot be modified at this time. + リソース ファイルは、現時点では変更できません。 + + + + You are trying to edit a resource file that is a part of another project item (such as a form or a control). Editing this item could corrupt the project item, and you will have to recover it by hand. In addition, changes made to this resource file may be lost if further changes are made to the project item. + +Do you really want to edit this file? + 他のプロジェクト アイテム (フォーム、コントロールなど) の一部であるリソース ファイルを編集しようとしています。このアイテムを編集すると、プロジェクト アイテムが壊れる可能性があり、手動で修復する必要があります。さらに、プロジェクト アイテムに変更を続ける場合、このリソース ファイルへの変更が失われる可能性があります。 + +このファイルの編集を続行しますか? + + + + The resource '{0}' cannot be added. + リソース '{0}' を追加できません。 + {0} - name of the resource + + + The device does not support '{0}' files. + デバイスは '{0}' ファイルをサポートしていません。 + {0} - the extension of the file name like 'tiff' + + + The resource item uses the type '{0}', which is not supported in this project. + リソース アイテムは '{0}' 型を使用していますが、このプロジェクトではサポートされていません。 + {0} - name of the type + + + The resource item(s) {0} cannot be saved correctly. The item(s) will be discarded. + リソース アイテム {0} を正しく保存できません。アイテムは破棄されます。 + {0} - name list of the resource + + + '{0}' + '{0}' + {0} - name + + + {0}, '{1}' + {0}, '{1}' + # {0} - name list +# {1} - another name + + + (Nothing/null) + (なし/null) + Displayed in a string table for values of Nothing/null +CONSIDER: get this from CodeDom + + + (Unknown type) + (不明な種類) + This actually shouldn't be needed, but if we get an exception trying to get the type name of an entry in the resx file (not supposed to happen), then we'll display this as its type. + + + (Value cannot be displayed) + (値を表示できません) + Displayed in a string table for values which cannot be edited by the user + + + Name + 名前 + Columns for the "Details" view of the resource editor + + + Filename + ファイル名 + Columns for the "Details" view of the resource editor + + + Type + 種類 + Columns for the "Details" view of the resource editor + + + Size + サイズ + Columns for the "Details" view of the resource editor + + + Comment + コメント + Columns for the "Details" view of the resource editor + + + Text Encoding + テキストのエンコード + Columns for the "Details" view of the resource editor + + + {0} x {1} + {0} x {1} + Format string for showing a graphic's size + +# {0} = width (as an integer) +# {1} = height (as an integer) +#Example, for a bitmap of width=123, height = 456, the English version of this string would be "123x456" + + + {0} KB + {0} KB + #Format string for showing a file's size +# {0} = length in kilobytes + + + {0} byte(s) + {0} バイト + Format string for showing a file's size. +{0} = length in bytes + + + Strings + 文字列 + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + Images + イメージ + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + Icons + アイコン + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + Audio + オーディオ + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + Files + ファイル + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + Other + その他 + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + &Add + 追加(&A) + Add, Delete and Views button text in the main ToolStrip + + + &Remove + 削除(&R) + Add, Delete and Views button text in the main ToolStrip + + + &Views + ビュー(&V) + Add, Delete and Views button text in the main ToolStrip + + + &Existing File... + 既存のファイル(&E)... + Menu items under the "Add" button + + + New &String + 新しい文字列(&S) + Menu items under the "Add" button + + + New &Image + 新しいイメージ(&I) + Menu items under the "Add" button + + + &PNG Image... + PNG イメージ(&P)... + Menu items under the "Add" button + + + &BMP Image... + BMP イメージ(&B)... + Menu items under the "Add" button + + + &GIF Image... + GIF イメージ(&G)... + Menu items under the "Add" button + + + &JPEG Image... + JPEG イメージ(&J)... + Menu items under the "Add" button + + + &TIFF Image... + TIFF イメージ(&T)... + Menu items under the "Add" button + + + New I&con... + 新しいアイコン(&I)... + Menu items under the "Add" button + + + New &Text File... + 新しいテキスト ファイル(&T)... + Menu items under the "Add" button + + + Windows Bitmap + Windows ビットマップ + Friendly Image types + + + EXIF Image + EXIF イメージ + Friendly Image types + + + Graphics Interchange Format + グラフィックス交換形式 + Friendly Image types + + + JPEG File Interchange Format + JPEG ファイル交換形式 + Friendly Image types + + + Windows Bitmap + Windows ビットマップ + Friendly Image types + + + Portable Network Graphics + ポータブル ネットワーク グラフィックス + Friendly Image types + + + Tag Image File Format + タグ イメージ ファイル形式 + Friendly Image types + + + Icon + アイコン + Friendly Image types + + + Text File + テキスト ファイル + Friendly Image types + + + Binary File + バイナリ ファイル + + + + Wave Sound + Wave サウンド + Friendly Image types + + + Linked at compile time + コンパイル時にリンクされました + File Persistence Mode + + + Embedded in .resx + .resx に埋め込まれました + File Persistence Mode + + + Bitmaps + ビットマップ + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Icons + アイコン + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Audio + オーディオ + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Text Files + テキスト ファイル + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + All Files + すべてのファイル + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Windows Bitmap + Windows ビットマップ + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Portable Network Graphics + ポータブル ネットワーク グラフィックス + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Graphics Interchange Format + グラフィックス交換形式 + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + JPEG File Interchange Format + JPEG ファイル交換形式 + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Tag Image File Format + タグ イメージ ファイル形式 + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Icon + アイコン + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + &List + 一覧(&L) + Resource editor listview view styles (like changing the view style of a folder in Windows XP) + + + &Details + 詳細(&D) + Resource editor listview view styles (like changing the view style of a folder in Windows XP) + + + &Thumbnail + サムネイル(&T) + Resource editor listview view styles (like changing the view style of a folder in Windows XP) + + + Managed Resources Editor + マネージ リソース エディター + + + + Add existing file to resources + 既存のファイルをリソースに追加 + + + + Import file into resource '{0}' + ファイル '{0}' をリソースにインポートします + {0} = Name of resource being imported into + + + Export resource '{0}' to file + リソース '{0}' をファイルにエクスポートします + {0} = Name of resource being exported from + + + Please specify where to save the new file + 新しいファイルの保存場所を指定してください + + + + The file '{0}' already exists. Do you want to replace it? + ファイル '{0}' は既に存在します。置き換えますか? + {0} = full file path and name + + + The following files already exist. Do you want to replace them? + 次のファイルは既に存在します。置き換えますか? + + + + Select a folder in which to export the resources. + リソースをエクスポートするフォルダーを選択してください。 + + + + Do you want to continue anyway? + 続行しますか? + + + + Do you want to enable strongly-typed resource generation for this file? + このファイルに対して厳密に型指定されたリソースの生成を有効にしますか? + + + + Resource '{0}' could not be loaded because the file to which it is linked could not be found: {1}. + リソース '{0}' は、リンクされたファイルが見つからなかったため、読み込めませんでした: {1}。 + {0} = resource name that had the error, {1} = file path/name that could not be found + + + Resource '{0}' could not be instantiated. {1} + リソース '{0}' をインスタンス化できませんでした。 {1} + {0} = resource name that had the error, {1} = extended error information + + + Resource '{0}' has a name that is not recommended and that may cause compilation errors in your code. Please choose another name. + リソース '{0}' には、コードのコンパイル エラーの原因となる可能性のある、推奨されていない名前が付けられています。別の名前を選んでください。 + {0} = resource name that had the error + + + Unable to set the Custom Tool or Custom Tool Namespace properties of this file in order to change strongly-typed resource generation options. If the project file is checked in, try checking it out. + 厳密に型指定されたリソースの生成オプションを変更するためにこのファイルのカスタム ツール、またはカスタム ツールの名前空間プロパティを設定できませんでした。プロジェクト ファイルがチェックインされている場合、チェックアウトしてください。 + One possible source for this error is that source code control checkout failed or was canceled. + + + Double-click here to enable strongly-typed resources for this file. + このファイルに対して厳密に型指定されたリソースを有効にするには、ここをダブルクリックしてください。 + + + + The resource name '{0}' is not a valid identifier. + リソース名 '{0}' は有効な識別子ではありません。 + + + + {0} - Codepage {1} + {0} - コードページ {1} + {0} = encoding name (e.g., "Western European (Windows)"), {1} = code page # (e.g., 85001) + + + (Default) + (既定) + + + + Change resource name + リソース名の変更 + + + + Add {0} new resource(s) + {0} 個のリソースの追加 + {0} = number of resources added + + + Remove {0} resource(s) + {0} 個のリソースの削除 + {0} = number of resources removed + + + Delete values in {0} cell(s) + {0} 個のセルの値を消去します + {0} = number of cells cleared + + + &Categories: + カテゴリ(&C): + The label in the menu strip for the combobox that holds the categories of resources to display + + + Name used to identify the resource in code. + コード内のリソースを識別するために使用する名前です。 + + + + Additional information about the resource. This property is only meaningful at design time. + リソースについての追加情報ですこのプロパティは、デザイン時にのみ有効です。 + + + + Character encoding of the file. + ファイルの文字エンコードです。 + + + + The path to the linked resource. + リンクされたリソースへのパスです。 + + + + Specifies whether the file resource is text or binary. + ファイル リソースが、テキストかバイナリかを指定します。 + + + + Specifies whether the resource is embedded or linked. Embedded resources are saved in the resource file. Linked resources reside in an external location on disk. + リソースを埋め込むかリンクするかを指定します。埋め込まれたリソースはリソース ファイルに保存されます。リンクされたリソースは、ディスク上の外部の場所に存在します。 + + + + The resource will be generated as this type in the strongly-typed resource class. For example, the resource might be generated as a String or Bitmap object. + このリソースは、この型として厳密に型指定されたリソース クラスで生成されます。たとえば、リソースは String または Bitmap オブジェクトとして生成されます。 + + + + The value of the resource. + リソースの値です。 + + + + Unable to add a '{0}' folder to this project. + +{1} + このプロジェクトに '{0}' フォルダーを追加できません。 + +{1} + {0} = name of folder trying to add (by default, this will be "Resources"), {1} = additional error information + + + Unable to add '{0}' to the project. + +{1} + プロジェクトに '{0}' を追加できません。 + +{1} + {0} = file name and path, {1} = additional error information. + + + Unable to add '{0}' to the project. + プロジェクトに '{0}' を追加できません。 + {0} = file name and path + + + A file with the name '{0}' already exists. Do you want to replace it? + '{0}' という名前のファイルは既に存在します。置き換えますか? + {0} = file name and path + + + {0} - Destination File Exists + {0} - ターゲット ファイルが存在します + {0} = Name of the editor, e.g. "Managed Resources Editor" or "Resource Picker" + + + There is already a linked file with the name "{0}" in the project folder "{1}". Do you want to remove it? + "{0}" というリンク ファイルは既にプロジェクト フォルダー "{1}" の中にあります。削除しますか? + {0} = file name (no path), {1} = Path of resource folder + + + {0} - Destination File Exists + {0} - ターゲット ファイルが存在します + {0} = Name of the editor, e.g. "Managed Resources Editor" or "Resource Picker" + + + Cannot find the file '{0}'. It may have been moved or deleted. + ファイル '{0}' が見つかりません。移動または削除された可能性があります。 + {0} = file name and path + + + Connection string + 接続文字列 + Added as the last item in the list of available types to let the user browse for a new type + + + Web Service URL + Web サービス URL + Added as the last item in the list of available types to let the user browse for a new type + + + Browse... + 参照... + Added as the last item in the list of available types to let the user browse for a new type + + + Application + アプリケーション + + + + Application (Web) + アプリケーション (Web) + + + + User + ユーザー + + + + User (Web) + ユーザー (Web) + + + + Name + 名前 + + + + Type + 種類 + + + + Scope + スコープ + + + + Value + + + + + Type '{0}' is not defined. + 型 '{0}' は定義されていません。 + + + + Name changed + 変更された名前 + + + + Type changed + 変更された型 + + + + Scope changed + 変更されたスコープ + + + + Roaming changed + 変更されたローミング + + + + Description changed + 変更された説明 + + + + Provider changed + 変更されたプロバイダー + + + + Value changed + 変更された値 + + + + Generate default value in code changed + 変更されたコードの既定値を生成します + + + + Remove {0} setting(s) + {0} 個の設定の削除 + + + + Unable to load settings file. It might be corrupted or contain invalid XML or contain duplicate identifiers. + 設定ファイルを読み込めませんでした。設定ファイルが壊れているか、無効な XML を含んでいるか、または重複した ID を含んでいる可能性があります。 + + + + New values from the app.config file were automatically added + app.config から新しい値が自動的に追加されました + + + + Value of setting '{0}' was changed in the app.config file. + 設定 '{0}' の値が app.config ファイルで変更されました。 + + + + The current value in the .settings file is '{0}' +The new value in the app.config file is '{1}' + +Do you want to update the value in the .settings file? + .settings ファイルでの現在の値は '{0}' です +app.config ファイルでの新しい値は '{1}' です + +.settings ファイル内の値を更新しますか? + + + + An error occurred while reading the app.config file. The file might be corrupted or contain invalid XML. + app.config ファイルの読み取り中にエラーが発生しました。ファイルが壊れているか、無効な XML を含んでいる可能性があります。 + + + + An error occurred while saving values to the app.config file. The file might be corrupted or contain invalid XML. + app.config ファイルに値を保存しているときにエラーが発生しました。ファイルが壊れているか、無効な XML を含んでいる可能性があります。 + + + + There is already another setting with the name '{0}'. + '{0}' という名前の別の設定が既にあります。 + + + + '{0}' is not a valid identifier. + '{0}' は有効な識別子ではありません + + + + '{0}' is not a valid type name. + '{0}' は有効な型名ではありません。 + + + + The setting name cannot be empty. + 設定名は空白にできません。 + + + + '{0}' cannot be converted to an instance of type '{1}'. + 型 '{1}' のインスタンスに '{0}' を変換できません。 + + + + Generic types are not supported. + ジェネリック型はサポートされていません。 + + + + Abstract types are not supported. + 抽象型はサポートされていません。 + + + + The current object is auto-generated and only supports renaming through the Settings Designer. + 現在のオブジェクトは自動生成されていて、設定デザイナーによる名前の変更のみサポートしています。 + + + + The current object is auto-generated and does not support modifying parameters. + 現在のオブジェクトは自動生成されていて、パラメーターの変更をサポートしていません。 + + + + The settings file cannot be modified at this time. + 設定ファイルは、現時点では変更できません。 + + + + &Add Setting + 設定の追加(&A) + + + + R&emove Setting + 設定の削除(&E) + + + + Application settings allow you to store and retrieve property settings and other information for your application dynamically. For example, the application can save a user's color preferences, then retrieve them the next time it runs. + アプリケーション設定によって、アプリケーションのプロパティ設定とその他の情報を、動的に格納、取得することができます。たとえば、アプリケーションでユーザーのカラー設定が保存された後、次回実行時にその設定を取得することができます。 + + + + Learn more about application settings... + アプリケーション設定に関する詳細の表示... + + + + This connection string appears to contain sensitive data (for example, a password), which is required to connect to the database. However, storing sensitive data in the connection string can be a security risk. Do you want to include sensitive data in the connection string? + この接続文字列にはデータベース接続に必要な重要情報 (例: パスワード) が含まれています。しかし、接続文字列内に重要な情報を保存すると、セキュリティ上のリスクが発生する可能性があります。接続文字列にこの重要情報を含めますか? + + + + Select a Type + 種類の選択 + + + + This class allows you to handle specific events on the settings class: + このクラスでは設定クラスでの特定のイベントを処理することができます: + Comments for user part of extending generated settings class + + + The SettingChanging event is raised before a setting's value is changed. + SettingChanging イベントは、設定値が変更される前に発生します。 + + + + The PropertyChanged event is raised after a setting's value is changed. + PropertyChanged イベントは、設定値が変更された後に発生します。 + + + + The SettingsLoaded event is raised after the setting values are loaded. + SettingsLoaded イベントは、設定値が読み込まれた後に発生します。 + + + + The SettingsSaving event is raised before the setting values are saved. + SettingsSaving イベントは、設定値が保存される前に発生します。 + + + + To add event handlers for saving and changing settings, uncomment the lines below: + 設定の保存と変更のイベント ハンドラーを追加するには、以下の行のコメントを解除します: + + + + Add code to handle the SettingChangingEvent event here. + SettingChangingEvent イベントを処理するコードをここに追加してください。 + + + + Add code to handle the SettingsSaving event here. + SettingsSaving イベントを処理するコードをここに追加してください。 + + + + Failed to create or open file. + ファイルを作成、または開くことができませんでした。 + + + + Description of the setting. + 設定の説明です。 + + + + Specifies whether or not the default setting value should be generated in the strongly-typed settings class. + 既定値を、厳密に型指定された設定クラスで生成するかどうかを指定します。 + + + + Specifies the group to which this Settings file belongs. + この設定ファイルが属するグループを指定します。 + + + + Description of the group to which this Settings file belongs. + この設定ファイルが属するグループの説明です。 + + + + Indicates whether the setting should roam when Windows roaming profiles are enabled. + Windows 移動プロファイルが有効になっているときに設定を移動するかどうかを示します。 + + + + Name used to identify the setting. + 設定を識別するために使用する名前です。 + + + + The provider (System.Configuration.Provider.ProviderBase) used to manage the setting. + 設定の管理に使用されるプロバイダー (System.Configuration.Provider.ProviderBase) です。 + + + + Specifies whether the setting is per-application (read-only) or per-user (read-write). + 設定がアプリケーションごと (読み取り専用) であるか、ユーザーごと (編集可能) であるかを指定します + + + + The setting will be generated as this type in the strongly-typed settings class. For example, the setting might be generated as a String or Integer object. + この設定は、この型として厳密に型指定された設定クラスで生成されます。たとえば、設定は String または Integer オブジェクトとして生成されます。 + + + + The current value for the setting. + 設定用の現在の値です。 + + + + The following files will be deleted: + +{0} + 次のファイルは削除されます: + +{0} + Synchronize with user.config file + + + No user.config files were found in any of the following locations: + +{0} + 次のいずれの場所でも user.config ファイルが見つかりませんでした: + +{0} + + + + One or more user.config files was not removed. + 1 つ以上の user.config ファイルが削除されませんでした。 + + + + My.Settings Auto-Save Functionality + My.Settings 自動保存機能 + in-code comment used to generate a region that hides My.Settings AutoSave functionality + + + Unable to find service '{0}'. Ensure that the application is installed correctly. + サービス '{0}' が見つかりません。アプリケーションが正しくインストールされていることを確認してください。 + Settings Global-Object-Provider Strings + + + Default pac&kage: + 既定のパッケージ(&K): + J# Specific String for Root Namespace + + + (Custom) + (カスタム) + Entry in the "Accessibility dropdown" + + + No code generation + コード生成なし + Entry in the "Accessibility dropdown" + + + WPF Application + WPF アプリケーション + + + + (Invalid value: "{0}") + (無効な値: "{0}") + Goes into the ShutdownMode combobox + + + On explicit shutdown + 明示的にシャットダウンするとき + + + + On last window close + 最後のウィンドウを閉じるとき + + + + On main window close + メイン ウィンドウを閉じるとき + + + + Could not find the expected root element "{0}" in the application definition file. + 必要なルート要素 "{0}" がアプリケーション定義ファイル内に見つかりません。 + + + + The .xaml file was in an unexpected format, near line {0} column {1}. + .xaml ファイルの行 {0} 列 {1} 付近が予期せぬ形式です。 + + + + Startup &object: + スタートアップ オブジェクト(&O): + + + + Startup &URI: + スタートアップ URI(&U): + + + + The application definition file is already opened in an incompatible editor. Please close the other editor and reload the project properties page. + アプリケーション定義ファイルが互換性のないエディターで既に開かれています。そのエディターを終了してから、プロジェクト プロパティ ページを再度読み込んでください。 + + + + There was an error trying to open or create the application definition file for this project. {0} + このプロジェクトのアプリケーション定義ファイル {0} を開くときまたは作成するときにエラーが発生しました。{0} + + + + An error occurred trying to load the application definition file for this project. The file '{0}' could not be parsed. Please edit the file in the XAML editor to fix the error. + このプロジェクトのアプリケーション定義ファイルを読み込むときにエラーが発生しました。ファイル '{0}' を解析できませんでした。XAML エディターでファイルを編集してエラーを修正してください。 + + + + (Error) + (エラー) + Used inside UI elements when there is an error (e.g. combobox text) + + + An unspecified error has occurred. + 不明なエラーが発生しました。 + + + + This project does not contain an application definition file. + このプロジェクトには、アプリケーション定義ファイルが含まれていません。 + + + + An error occurred trying to create the application events file. {0} + アプリケーション イベント ファイル {0} を作成するときにエラーが発生しました。{0} + + + + Invalid argument '{0}' + 無効な引数 '{0}' + {0} = name of invalid argument + + + WPF Console Application + WPF コンソール アプリケーション + + + + WPF Class Library + WPF クラス ライブラリ + + + + Embed manifest with default settings + マニフェストを既定の設定で埋め込みます + + + + Create application without a manifest + マニフェストなしでアプリケーションを作成します + + + + Invalid manifest file. + マニフェスト ファイルが無効です。 + + + + Services + サービス + + + + Client application services enable your Windows-based applications to use the ASP.NET login (authentication), roles, and profile (settings) services. + クライアント アプリケーション サービスを使用すると、Windows ベースのアプリケーションから、ASP.NET ログイン (認証)、ロール、およびプロファイル (設定) サービスを使用できます。 + + + + Learn more about client application services... + クライアント アプリケーション サービスに関する詳細の表示... + + + + Advanced Settings for Services + サービスの詳細設定 + + + + Disabling application services will clear the default services for Authentication, Roles, and Settings. Click OK to disable application services. + アプリケーション サービスを無効にすると、認証、ロール、および設定の既定のサービスがクリアされます。アプリケーション サービスを無効にするには、[OK] をクリックしてください。 + + + + Disable Application Services + アプリケーション サービスを無効にする + + + + seconds + + + + + minutes + + + + + hours + + + + + days + + + + + To enable client application services, you must set the Target Framework for your application to .NET Framework 3.5 or later. In C#, you can do this on the Application property page. In Visual Basic, you can do this one the Compile property page by clicking Advanced Compile Options. + クライアント アプリケーション サービスを有効にするには、アプリケーションのターゲット フレームワークを .NET Framework 3.5 以降に設定する必要があります。C# では、これはアプリケーション プロパティ ページで行います。Visual Basic では、[詳細コンパイル オプション]5D; をクリックしてコンパイル プロパティ ページで行います。 + + + + An error occurred while reading the Application configuration file. The file might be corrupted or contain invalid XML. + アプリケーション構成ファイルの読み取り中にエラーが発生しました。ファイルが破損しているか、無効な XML を含んでいる可能性があります。 + + + + The URL is invalid. Please enter a valid URL like http://microsoft.com/services + URL が無効です。有効な URL を入力してください (例: http://microsoft.com/services)。 + + + + A service URL in the application configuration file is not in the expected format. + アプリケーション構成ファイルに指定されているサービスの URL の形式が正しくありません。 + + + + Authentication, Roles and Web Settings providers have been configured via the Application configuration file such that they do not share a common connection string. + 認証、ロール、および Web 設定プロバイダーは、共通の接続文字列を共有しないように、アプリケーション構成ファイルを介して構成されています。 + + + + Specify a connection string to a SQL Server database, or use the special connection string "Data Source = |SQL/CE|", which causes SQL Server Compact to generate local database files for offline storage. + SQL Server データベースへの接続文字列を指定するか、特殊な接続文字列 "Data Source = |SQL/CE|" を指定します。後者の場合、オフライン ストレージ用のローカル データベース ファイルが SQL Server Compact によって生成されます。 + + + + The following type names were not understood: '{0}'. Make sure you have references to these types. + 次の型名が認識されませんでした: '{0}'。これらの型が正しく参照設定されていることを確認してください。 + + + + There are already settings with the following names: {0}. + 次の名前の設定が既に存在します: {0}。 + + + + The username/password combination cannot be authenticated. + ユーザー名とパスワードの組み合わせを認証できません。 + + + + Windows Forms Application + Windows フォーム アプリケーション + The "Windows Forms" distinguishes it from a WPF application + + + Namespace of the service reference. + サービス参照の名前空間。 + + + + Service Reference Properties + サービス参照プロパティ + + + + Metadata Location Url + メタデータ ロケーション URL + + + + Metadata Location + メタデータ ロケーション + + + + A service reference with multiple source urls is not supported. + 複数のソース URL を含むサービス参照はサポートされていません。 + + + + Cannot change reference Url to empty. The reference url must be a valid URL. + 参照 URL を空に変更できません。参照 URL は有効な URL である必要があります。 + + + + One or more files were reloaded during the checkout. Please retry your operation. + 1 つ以上のファイルがチェックアウト時に再読み込みされました。操作を再試行してください。 + + + + The project was reloaded, and some changes on this page may have been lost. + プロジェクトが再度読み込まれました。このページに加えられたいくつかの変更が失われた可能性があります。 + + + + The application will fail to run in the selected zone because of this requested elevated permission. Click the help link above for more info. + この引き上げられたアクセス許可が原因で、選択されたゾーンでのアプリケーションの実行は失敗します。詳細については、ヘルプ リンクをクリックしてください。 + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.ko.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.ko.xlf new file mode 100644 index 00000000000..b4cf73bdbf3 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.ko.xlf @@ -0,0 +1,2948 @@ + + + + + + All Files + 모든 파일 + + + + Property Page + 속성 페이지 + + + + References + 참조 + + + + Version + 버전 + + + + Signing + 서명 + + + + Application + 응용 프로그램 + + + + Compile + 컴파일 + + + + Debug + 디버그 + + + + Deploy + 배포 + + + + Database + 데이터베이스 + + + + Security + 보안 + + + + Build + 빌드 + + + + Build Events + 빌드 이벤트 + + + + Reference Paths + 참조 경로 + + + + Pre-build Event Command Line + 빌드 전 이벤트 명령줄 + + + + Post-build Event Command Line + 빌드 후 이벤트 명령줄 + + + + The output path is not trusted. +The application may throw security exceptions when it attempts to perform actions which require full trust. +Click OK to ignore and continue. Click CANCEL to choose a different output path. + 출력 경로를 신뢰할 수 없습니다. +완전 신뢰가 필요한 동작을 수행할 때 응용 프로그램에서 보안 예외를 throw할 수 있습니다. +무시하고 계속 실행하려면 [확인]을 클릭하고 다른 출력 경로를 선택하려면 [취소]를 클릭하세요. + + + + <Browse...> + <찾아보기...> + + + + (None) + (없음) + + + + <New...> + <새로 만들기...> + + + + <Browse...> + <찾아보기...> + + + + (None) + (없음) + + + + Active ({0}) + 활성({0}) + + + + All Configurations + 모든 구성 + + + + All Platforms + 모든 플랫폼 + + + + N/A + N/A + This is used in the platform and configuration comboboxes when showing pages that don't care about the current platform/configuration + + + Could not find the configuration '{0}' for platform '{1}'. + '{1}' 플랫폼에 대한 '{0}' 구성을 찾을 수 없습니다. + + + + (None) + (없음) + + + + Select File + 파일 선택 + + + + Add existing file to project + 프로젝트에 기존 파일 추가 + + + + Icon Files + 아이콘 파일 + + + + Executable Files + 실행 파일 + + + + Select Working Directory + 작업 디렉터리 선택 + + + + Select Output Path + 출력 경로 선택 + + + + Select Reference Path + 참조 경로 선택 + + + + Win32 Resource Files + Win32 리소스 파일 + + + + Add Win32 resource file to project + 프로젝트에 Win32 리소스 파일 추가 + + + + Folder path does not exist. +Please select a valid folder path. + 폴더 경로가 없습니다. +올바른 폴더 경로를 선택하세요. + + + + Advanced Compiler Settings + 고급 컴파일러 설정 + + + + Advanced Build Settings + 고급 빌드 설정 + + + + Compiler Warnings + 컴파일러 경고 + + + + Reference Paths + 참조 경로 + + + + Compatible Settings + 호환되는 설정 + + + + Assembly Information + 어셈블리 정보 + + + + Invalid version format, expected "[Major]", "[Major].[Minor]", "[Major].[Minor].[Build]" or "[Major].[Minor].[Build].[Revision]" + 버전 형식이 잘못되었습니다. 올바른 형식은 "[Major]", "[Major].[Minor]", "[Major].[Minor].[Build]" 또는 "[Major].[Minor].[Build].[Revision]"입니다. + + + + A wildcard ("*") is not allowed in this field. + 이 필드에는 와일드카드("*")를 사용할 수 없습니다. + + + + Each part of the version number for '{0}' must be an integer between 0 and {1}. + '{0}' 버전 번호의 각 부분은 0에서 {1} 사이의 정수여야 합니다. + + + + (Default Icon) + (기본 아이콘) + + + + Startup object must be a form when 'Enable application framework' is checked. + '응용 프로그램 프레임워크 사용'이 선택된 경우 시작 개체는 폼이어야 합니다. + + + + (Not set) + (설정 안 함) + + + + Icon could not be added to the project. + 아이콘을 프로젝트에 추가할 수 없습니다. + + + + Invalid icon file. + 아이콘 파일이 잘못되었습니다. + + + + {0} is not a valid icon file. + {0}은(는) 올바른 아이콘 파일이 아닙니다. + + + + The GUID should match the format dddddddd-dddd-dddd-dddd-dddddddddddd. + GUID는 dddddddd-dddd-dddd-dddd-dddddddddddd 형식이어야 합니다. + + + + NOTE: This file is auto-generated; do not modify it directly. To make changes, + 참고: 자동으로 생성되므로 직접 이 파일을 수정하지 마세요. 변경할 사항이 있거나 + These comments are placed in the ApplicationEvents.vb file if it is generated by the project designer. The same comments appear in the templates, under vsproject\Templates\Windows\VisualBasic\ProjectTemplates\WindowsApplication\MyEvents.vb (MyEvents.vb is renamed to ApplicationEvents.vb after project creation), and these comments should be kept in sync + + + or if you encounter build errors in this file, go to the Project Designer + 파일에서 빌드 오류가 발생하는 경우 프로젝트 디자이너로 + + + + (go to Project Properties or double-click the My Project node in + 이동([프로젝트 속성]으로 이동하거나 솔루션 탐색기에서 My Project 노드를 + + + + Solution Explorer), and make changes on the Application tab. + 두 번 클릭)한 다음 [응용 프로그램] 탭에서 변경하세요. + + + + '{0}' is not a valid identifier. Please select a different Startup form. + '{0}'이(가) 올바른 식별자가 아닙니다. 다른 시작 폼을 선택하세요. + + + + '{0}' is not a valid identifier. Please select a different Splash screen form. + '{0}'이(가) 올바른 식별자가 아닙니다. 다른 시작 화면 폼을 선택하세요. + + + + The splash screen form cannot be the start-up form. + 시작 화면 폼은 시작 폼일 수 없습니다. + + + + Startup f&orm: + 시작 폼(&O): + + + + The following events are available for MyApplication: + MyApplication에 대해 다음 이벤트를 사용할 수 있습니다. + + + + Startup: Raised when the application starts, before the startup form is created. + Startup: 응용 프로그램이 시작되고 시작 폼이 만들어지기 전에 발생합니다. + + + + Shutdown: Raised after all application forms are closed. This event is not raised if the application terminates abnormally. + Shutdown: 모든 응용 프로그램 폼이 닫힌 후에 발생합니다. 이 이벤트는 응용 프로그램이 비정상적으로 종료되는 경우에는 발생하지 않습니다. + + + + UnhandledException: Raised if the application encounters an unhandled exception. + UnhandledException: 응용 프로그램에서 처리되지 않은 예외가 발생하는 경우 이 이벤트가 발생합니다. + + + + StartupNextInstance: Raised when launching a single-instance application and the application is already active. + StartupNextInstance: 단일 인스턴스 응용 프로그램을 시작할 때 해당 응용 프로그램이 이미 활성 상태인 경우 발생합니다. + + + + NetworkAvailabilityChanged: Raised when the network connection is connected or disconnected. + NetworkAvailabilityChanged: 네트워크가 연결되거나 연결이 끊어질 때 발생합니다. + + + + Base address must be a hexadecimal number with less than or equal to 8 digits, for example, 0x11000000. + 기준 주소는 0x11000000과 같이 8자리 이하의 16진수여야 합니다. + + + + None + 없음 + + + + Warning + 경고 + + + + Error + 오류 + + + + (custom) + (사용자 지정) + + + + Implicit conversion + 암시적 변환 + + + + Late binding; call could fail at run time + 런타임에 바인딩; 호출이 실패할 수 있음 + + + + Implicit type; object assumed + 암시적 형식, 개체로 간주 + + + + Use of variable prior to assignment + 할당 전 변수 사용 + + + + Function/Operator without return value + 반환 값이 없는 함수/연산자 + + + + Unused local variable + 사용되지 않은 지역 변수 + + + + Instance variable accesses shared member + 인스턴스 변수가 공유 멤버에 액세스함 + + + + Recursive operator or property access + 재귀 연산자 또는 속성 액세스 + + + + Duplicate or overlapping catch blocks + 중복되거나 겹치는 catch 블록 + + + + The warning settings for one or more configurations conflict. +Changing this setting will reset the settings in all configurations. + 하나 이상의 구성에 대한 경고 설정이 충돌합니다. +이 설정을 변경하면 모든 구성의 설정이 다시 설정됩니다. + + + + When startup form closes + 시작 폼을 닫을 때 + + + + When last form closes + 마지막 폼을 닫을 때 + + + + Windows + Windows + Authentication modes + + + Application-defined + 응용 프로그램 정의 + Authentication modes + + + Cancel + 취소 + + + + &Calculate Permissions + 권한 계산(&C) + + + + Stopped... + 중지되었습니다... + + + + Starting... + 시작하고 있습니다... + + + + Building... + 빌드하고 있습니다... + + + + Analyzing... + 분석하고 있습니다... + + + + Analyze Failed + 분석하지 못했습니다. + + + + Aborting... + 중단하고 있습니다... + + + + Canceling... + 취소하고 있습니다... + + + + Internet + 인터넷 + + + + Local Intranet + 로컬 인트라넷 + + + + (Custom) + (사용자 지정) + Don't use + + + (Zone Default) + (영역 기본값) + + + + Include + 포함 + + + + Exclude + 제외 + + + + The application will require elevated permissions to run in the selected zone. Click the help link above for more info. + 응용 프로그램을 선택한 영역에서 실행하려면 고급 권한이 필요합니다. 자세한 내용을 보려면 위에 있는 도움말 링크를 클릭하세요. + + + + This permission could not be loaded. Press the delete key to remove it from your project. + 이 사용 권한을 로드할 수 없습니다. 프로젝트에서 해당 권한을 제거하려면 <Delete> 키를 누르세요. + Don't use + + + Included + 포함됨 + + + + Permission + 권한 + + + + Setting + 설정 + + + + Specify the code access security permissions that your ClickOnce application requires in order to run. Learn more about code access security... + ClickOnce 응용 프로그램 실행에 필요한 코드 액세스 보안 권한을 지정합니다. 코드 액세스 보안에 대한 자세한 정보... + + + + Learn more about code access security... + 코드 액세스 보안에 대한 자세한 정보... + + + + Invalid value + 잘못된 값 + + + + The SecurityPermission must be included in your application with the Execute flag set or your application will not run. Mark this permission as "Zone Default" or "Include." + 응용 프로그램에 Execute 플래그가 설정된 SecurityPermission이 포함되지 않으면 응용 프로그램이 실행되지 않습니다. 이 사용 권한을 "영역 기본값" 또는 "포함"으로 표시하세요. + + + + The SecurityPermission must be included in your application with the Execute flag set or your application will not run. The Execute flag has been added to the SecurityPermission in your manifest. + 응용 프로그램에 Execute 플래그가 설정된 SecurityPermission이 포함되지 않으면 응용 프로그램이 실행되지 않습니다. Execute 플래그는 사용자 매니페스트의 SecurityPermission에 추가되었습니다. + + + + This application requires full trust to run correctly. Would you like to set this as a full trust application? + 응용 프로그램을 올바르게 실행되려면 완전 신뢰가 필요합니다. 이 응용 프로그램을 완전 신뢰 응용 프로그램으로 설정하시겠습니까? + + + + Full Trust Required + 완전 신뢰 필요 + + + + An error occurred and the app.manifest file could not be saved. +Error: + 오류가 발생하여 app.manifest 파일을 저장할 수 없습니다. +오류: + + + + An error occurred and the app.manifest file could not be loaded. Please remove any changes you have made to the file and reload the Security property page again. + 오류가 발생하여 app.manifest 파일을 로드할 수 없습니다. 파일에서 변경한 내용을 제거하고 [보안] 속성 페이지를 다시 로드하세요. + + + + Included + 포함됨 + + + + Not Included + 포함 안 됨 + + + + Included with warning + 경고와 함께 포함됨 + + + + Calculating permissions failed. + 사용 권한을 계산하지 못했습니다. + + + + Error + 오류 + + + + Advanced Security Settings + 고급 보안 설정 + + + + Build Failed. Click CANCEL and correct the build failure before analyzing again. + 빌드하지 못했습니다. [취소]를 클릭하여 빌드 실패를 수정한 다음 다시 분석하세요. + + + + Build completed... + 빌드가 완료되었습니다... + + + + Unable to start the build. + 빌드를 시작할 수 없습니다. + + + + Serious error. The build must begin in order to analyze permissions. It has not started. + 심각한 오류가 발생했습니다. 사용 권한을 분석하려면 빌드가 시작되어야 하는데 시작되지 않았습니다. + Don't use + + + (Custom) + (사용자 지정) + Don't use + + + (None) + (없음) + + + + Selecting existing key file + 기존 키 파일 선택 + + + + Key Files + 키 파일 + + + + Create key file + 키 파일 만들기 + + + + The old password is invalid. + 이전 암호가 잘못되었습니다. + + + + Enter the old password. + 이전 암호를 입력하세요. + + + + Enter a new password. + 새 암호를 입력하세요. + + + + The new passwords do not match. Enter the password again. + 새 암호가 일치하지 않습니다. 암호를 다시 입력하세요. + + + + The new password must be at least 6 characters in length. Enter the password again. + 새 암호는 6자 이상이어야 합니다. 암호를 다시 입력하세요. + + + + Select a Certificate + 인증서 선택 + + + + Select a certificate to sign your ClickOnce manifests + ClickOnce 매니페스트 서명에 사용할 인증서를 선택하세요. + + + + Certificate Files + 인증서 파일 + + + + Issued To + 발급 대상 + + + + Issued By + 발급자 + + + + Intended Purpose + 용도 + + + + Expiration Date + 만료 날짜 + + + + The password is invalid. + 암호가 잘못되었습니다. + + + + Invalid password + 잘못된 암호 + + + + The selected file does not contain a private key. You must choose a certificate that contains a private key. + 선택한 파일에 개인 키가 없습니다. 개인 키를 포함하는 인증서를 선택해야 합니다. + + + + Invalid key + 잘못된 키 + + + + Certificate Creation Error + 인증서 만들기 오류 + + + + <All> + <모두> + + + + The passwords do not match. + 암호가 일치하지 않습니다. + + + + Enter a password. + 암호를 입력하세요. + + + + Confirm the password. + 암호를 확인하세요. + + + + (none) + (없음) + + + + Enter password to open file + 파일을 여는 데 필요한 암호 입력 + + + + Enter &password to open file {0} + {0} 파일을 여는 데 필요한 암호 입력(&P) + + + + Enter &password for new file {0} + 새 파일 {0}의 암호 입력(&P) + + + + The project already contains a file with that name. Choose another certificate file or rename the file in your project. + 같은 이름의 파일이 프로젝트에 이미 있습니다. 다른 인증서 파일을 선택하거나 프로젝트에 있는 파일 이름을 바꾸세요. + + + + The file '{0}' could not be imported: {1} + '{0}' 파일을 가져올 수 없습니다. {1} + + + + _TemporaryKey.pfx + _TemporaryKey.pfx + + + + The selected certificate is not valid for code signing. Choose another certificate file. + 선택한 인증서는 코드 서명에 사용할 수 없습니다. 다른 인증서 파일을 선택하세요. + + + + Change property: {0} + 속성 변경: {0} + + + + Windows Application + Windows 응용 프로그램 + + + + Windows Service + Windows 서비스 + + + + Class Library + 클래스 라이브러리 + + + + Console Application + 콘솔 응용 프로그램 + + + + Web Control Library + 웹 컨트롤 라이브러리 + + + + Cannot remove '{0}'. {1} + + '{0}'을(를) 제거할 수 없습니다. {1} + + + + + Adding or removing '{0}' as a project import failed because of an unexpected error from the project system. The error returned was: '{1}'. + 프로젝트 시스템에서 예기치 않은 오류가 발생하여 '{0}'을(를) 프로젝트 가져오기로 추가하거나 제거하지 못했습니다. 반환된 오류는 '{1}'입니다. + + + + Adding web reference failed. {0} + + 웹 참조를 추가하지 못했습니다. {0} + + + + + Updating web reference '{0}' failed. +{1} + 웹 참조 '{0}'을(를) 업데이트하지 못했습니다. +{1} + + + + Web Reference Properties + 웹 참조 속성 + + + + Static + 정적 + + + + Dynamic + 동적 + + + + Name of the web reference + 웹 참조 이름 + + + + URL Behavior + URL 동작 + + + + Web reference URL behavior + 웹 참조 URL 동작 + + + + Web Reference URL + 웹 참조 URL + + + + Web Reference URL + 웹 참조 URL + + + + Reference Properties + 참조 속성 + + + + The remote machine name cannot be blank. Please specify the name of the machine to debug remotely. + 원격 컴퓨터 이름은 비워 둘 수 없습니다. 원격으로 디버그할 컴퓨터의 이름을 지정하세요. + + + + The external program cannot be found. Please enter a valid executable file. + 외부 프로그램을 찾을 수 없습니다. 올바른 실행 파일을 입력하세요. + + + + The external program property cannot be empty. Please enter a valid executable file. + 외부 프로그램 속성은 비워 둘 수 없습니다. 올바른 실행 파일을 입력하세요. + + + + We can only debug an EXE file. Please enter a valid executable file. + EXE 파일만 디버그할 수 있습니다. 올바른 실행 파일을 입력하세요. + + + + The URL property cannot be empty. Please enter a valid URL. + URL 속성은 비워 둘 수 없습니다. 올바른 URL을 입력하세요. + + + + The URL is invalid. Please enter a valid URL like "http://www.microsoft.com/" + URL이 잘못되었습니다. "http://www.microsoft.com/"과 같은 올바른 URL을 입력하세요. + + + + The working directory you entered does not exist. Please enter a valid working directory. + 입력한 작업 디렉터리가 없습니다. 올바른 작업 디렉터리를 입력하세요. + + + + <The system cannot find the reference specified> + <지정한 참조를 찾을 수 없습니다.> + + + + Unused References + 사용하지 않는 참조 + + + + &Remove + 제거(&R) + + + + No unused references + 사용하지 않는 참조가 없습니다. + + + + Project compilation failed. Cannot determine unused references. + 프로젝트를 컴파일하지 못했습니다. 사용하지 않는 참조를 확인할 수 없습니다. + + + + Gathering list of unused references... + 사용하지 않는 참조 목록을 수집하고 있습니다... + + + + Error getting unused references. + 사용하지 않는 참조를 가져오는 동안 오류가 발생했습니다. + + + + Base address must be a hexadecimal number with less than or equal to 8 digits, for example, &H11000000. + 기준 주소는 &H11000000과 같이 8자리 이하의 16진수여야 합니다. + + + + "Resource files must have a .res file extension. Please enter a valid resource file name." + "리소스 파일의 확장명은 .res여야 합니다. 올바른 리소스 파일 이름을 입력하세요." + + + + "The resource file entered does not exist." + "입력한 리소스 파일이 없습니다." + + + + Project Designer + 프로젝트 디자이너 + + + + Settings + 설정 + + + + Resources + 리소스 + + + + An error occurred trying to load the project properties window. Close the window and try again. +{0} + 프로젝트 속성 창을 로드하는 동안 오류가 발생했습니다. 창을 닫고 다시 시도하세요. +{0} + + + + An error occurred trying to load the page. + 페이지를 로드하는 동안 오류가 발생했습니다. + + + + The designer cannot be shown because the document for it was never loaded. + 디자이너에 대한 문서를 로드하지 않았으므로 디자이너를 표시할 수 없습니다. + + + + This project does not contain a default resources file. Click here to create one. + 이 프로젝트에는 기본 리소스 파일이 없습니다. 기본 리소스 파일을 만들려면 여기를 클릭하세요. + + + + This project does not contain a default settings file. Click here to create one. + 이 프로젝트에는 기본 설정 파일이 없습니다. 기본 설정 파일을 만들려면 여기를 클릭하세요. + + + + Could not find the file '{0}'. + '{0}' 파일을 찾을 수 없습니다. + + + + The file '{0}' is already open in an editor. Please close the file and try again. + '{0}' 파일이 이미 편집기에서 열려 있습니다. 파일을 닫고 다시 시도하세요. + + + + All Project Designer Pages + 모든 프로젝트 디자이너 페이지 + + + + More Settings + 추가 설정 + + + + The requested file type is not supported in projects of this type. + 이 형식의 프로젝트에서는 요청한 파일 형식이 지원되지 않습니다. + + + + Assembly Name + 어셈블리 이름 + + + + Root Namespace + 루트 네임스페이스 + + + + Startup Object + 시작 개체 + + + + Application Icon + 응용 프로그램 아이콘 + Property Friendly Names (for transaction names) - NOTE: All of these are optional + + + Assembly Version + 어셈블리 버전 + + + + Assembly File Version + 어셈블리 파일 버전 + + + + Assembly GUID + 어셈블리 GUID + + + + Enable application framework + 응용 프로그램 프레임워크 사용 + + + + External Program Path + 외부 프로그램 경로 + + + + Start Browser With URL + 다음 URL로 브라우저 시작 + + + + Working Directory + 작업 디렉터리 + + + + Remote Machine Name + 원격 컴퓨터 이름 + + + + Project Designer Page Container + 프로젝트 디자이너 페이지 컨테이너 + + + + Switch Project Designer Page + 프로젝트 디자이너 페이지 전환 + + + + Allow switching between active pages of the project designer (use Ctrl+PageUp and Ctrl+PageDown) + Ctrl+PageUp 및 Ctrl+PageDown을 사용하여 프로젝트 디자이너의 활성 페이지 간에 전환할 수 있습니다. + + + + {0} page: + {0} 페이지: + {0} = sub page name + + + {0} [Read Only] + {0}[읽기 전용] + Attach a readonly to the designer caption {0}=Designer caption + + + The editor could not get the IVsTextStream for file {0}. + 편집기에서 {0} 파일에 대한 IVsTextStream을 가져올 수 없습니다. + #exception {0}=filename + + + The editor could not get the IVsTextStream. + 편집기에서 IVsTextStream을 가져올 수 없습니다. + #exception (no file name) + + + No DesignerService for file '{0}'. + '{0}' 파일에 대한 DesignerService가 없습니다. + #{0}=file name + + + Invalid physical view name. + 실제 뷰 이름이 잘못되었습니다. + + + + Unable to create text buffer. + 텍스트 버퍼를 만들 수 없습니다. + # com exception + + + No LocalRegistry service. + LocalRegistry 서비스가 없습니다. + #exception + + + Replacing text stream failed:{0} + 텍스트 스트림을 바꾸지 못했습니다. {0} + #exception {0}=err msg + + + Buffer is read only. + 버퍼가 읽기 전용입니다. + + + + File is already opened in an incompatible editor. + 호환되지 않는 편집기에서 파일을 이미 열었습니다. + + + + Unsupported format. + 지원되지 않는 형식입니다. + + + + Unknown Error. + 알 수 없는 오류입니다. + + + + Unable to create the designer. {0} + 디자이너를 만들 수 없습니다. {0} + # {0}=inner exception + + + Unable to check out the current file. The file may be read-only or locked, or you may need to check the file out manually. + 현재 파일을 체크 아웃할 수 없습니다. 파일이 읽기 전용이거나 잠겨 있을 수 있습니다. 또는 수동으로 파일을 체크 아웃해야 할 수도 있습니다. + # General checkout exception message + + + Microsoft Visual Studio + Microsoft Visual Studio + Error reporting + + + Please enter an integer between 1 and 60. + 1에서 60 사이의 정수를 입력하세요. + + + + Please enter an integer between 1 and 60. + 1에서 60 사이의 정수를 입력하세요. + + + + Show empty environment + 빈 환경 표시 + These are items in a combobox (and so they don't need periods) + + + Load last loaded solution + 마지막에 로드한 솔루션 로드 + These are items in a combobox (and so they don't need periods) + + + Show New Project dialog box + [새 프로젝트] 대화 상자 표시 + These are items in a combobox (and so they don't need periods) + + + Show Open Project dialog box + [프로젝트 열기] 대화 상자 표시 + These are items in a combobox (and so they don't need periods) + + + Changes in Help Options will not take effect until the environment is restarted. + 도움말 옵션의 변경 내용은 개발 환경을 다시 시작하기 전까지 적용되지 않습니다. + + + + The location specified is on an invalid or read-only disk, or contains a device name reserved for the system. + 지정한 위치가 잘못된 디스크 또는 읽기 전용 디스크에 있거나 시스템용으로 예약된 장치 이름을 포함하고 있습니다. + + + + COM + COM + + + + Component Design + 구성 요소 디자인 + + + + Serialization + Serialization + + + + Web + + + + + COMClass + COMClass + + + + Expose {0} to COM. + {0}을(를) COM에 노출합니다. + + + + COM Class + COM 클래스 + + + + COMVisible + COMVisible + + + + Make {0} visible through COM. + COM을 통해 {0}을(를) 노출합니다. + + + + COM Visible + COM 노출 + + + + DispId + DispId + + + + Set explicit DispId to this {0}. + 이 {0}에 명시적 DispId를 설정합니다. + + + + DispId + DispId + + + + Value + + + + + Explicit DispId value for this {0}. + 이 {0}에 대한 명시적 DispId 값입니다. + + + + Value + + + + + DispId value should be an integer greater than or equal to 1. + DispId 값은 1보다 크거나 같은 정수여야 합니다. + + + + Category + 범주 + + + + Category group for the property. + 속성의 범주 그룹입니다. + + + + Category + 범주 + + + + Default Event + 기본 이벤트 + + + + Default event for the class. + 클래스의 기본 이벤트입니다. + + + + Default Event + 기본 이벤트 + + + + Default Value + 기본값 + + + + Default value for the property. + 속성의 기본값입니다. + + + + Default Value + 기본값 + + + + NonSerialized + NonSerialized + + + + Field should not be serialized. + 필드는 serialize할 수 없습니다. + + + + Non Serialized + Serialize되지 않음 + + + + Serializable + Serialize 가능 + + + + Enable serialization for this {0} and its members. + 이 {0} 및 해당 멤버에 대해 serialization을 활성화합니다. + + + + Serializable + Serialize 가능 + + + + WebMethod + WebMethod + + + + Expose method via web services. + 웹 서비스를 통해 메서드를 노출합니다. + + + + Web Method + 웹 메서드 + + + + Description + 설명 + + + + Description for the Web Method. + 웹 메서드에 대한 설명입니다. + + + + Description + 설명 + + + + EnableSession + EnableSession + + + + Maintain session state. + 세션 상태를 유지합니다. + + + + Enable Session + 세션 사용 + + + + TransactionOptions + TransactionOptions + + + + Set transaction options. + 트랜잭션 옵션을 설정합니다. + + + + Transaction Options + 트랜잭션 옵션 + + + + WebService + WebService + + + + Configure the Web Service settings. + 웹 서비스 설정을 구성합니다. + + + + Web Service + 웹 서비스 + + + + Name + 이름 + + + + Name for the web service. + 웹 서비스의 이름입니다. + + + + Name + 이름 + + + + Description + 설명 + + + + Description for the web service. + 웹 서비스에 대한 설명입니다. + + + + Description + 설명 + + + + Namespace + 네임스페이스 + + + + Namespace for the web service. + 웹 서비스의 네임스페이스입니다. + + + + Namespace + 네임스페이스 + + + + Default + 기본값 + + + + Action + 작업 + + + + Appearance + 모양 + + + + Behavior + 동작 + + + + Data + 데이터 + + + + DragDrop + 끌어서 놓기 + + + + Focus + 포커스 + + + + Format + 서식 + + + + Key + + + + + Layout + 레이아웃 + + + + Mouse + 마우스 + + + + WindowStyle + 창 스타일 + + + + (None) + (없음) + Default Event + + + Requires: + 필요한 권한: + + + + Name + 이름 + Column names for the string table + + + Type + 형식 + Column names for the string table + + + Value + + Column names for the string table + + + Comment + 설명 + Column names for the string table + + + Failed to generate file: {0} + {0} 파일을 생성하지 못했습니다. + + + + Editing embedded resources directly is not supported. Do you wish to convert this item to a linked resource in order to edit it? + 포함 리소스는 직접 편집할 수 없습니다. 이 항목을 편집이 가능한 링크된 리소스로 변환하시겠습니까? + + + + The current object is auto-generated and only supports renaming through the Managed Resources Editor. + 현재 개체는 자동으로 생성되었으며 관리되는 리소스 편집기를 통해서만 이름을 바꿀 수 있습니다. + + + + Cannot find the file '{0}'. It may have been moved or deleted. + '{0}' 파일을 찾을 수 없습니다. 이동되었거나 삭제된 것 같습니다. + {0} = file name and path + + + Unable to load resource from file '{0}'. + '{0}' 파일에서 리소스를 로드할 수 없습니다. + {0} = file name and path + + + The resource name cannot be empty. + 리소스 이름을 비워둘 수 없습니다. + + + + There is already another resource with the name '{0}'. + 이름이 '{0}'인 다른 리소스가 이미 있습니다. + {0} = Resource name + + + The resource was not of the expected type. + 리소스가 올바른 형식이 아닙니다. + This error can happen if, for example, you try to add foo.bmp to the resource editor, but foo.bmp is really a metafile. + + + Unable to create new resource file '{0}'. {1} + 새 리소스 파일 '{0}'을(를) 만들 수 없습니다. {1} + {0} = file name and path, {1} = additional error information + + + Unable to play the audio resource. {0} + 오디오 리소스를 재생할 수 없습니다. {0} + {0} = Additional error information. + + + Resource '{0}' cannot be saved to a file. + '{0}' 리소스를 파일에 저장할 수 없습니다. + {0} = Resource name + + + The operation has been canceled by the user. + 사용자가 작업을 취소했습니다. + + + + The resource value contains invalid data or has an incorrect format. + 리소스 값에 잘못된 데이터가 있거나 리소스 값의 형식이 잘못되었습니다. + + + + The name of the resource '{0}' cannot be used as a valid identifier, because it contains one or more invalid characters: '{1}'. Please remove or replace those characters and try again. + '{0}' 리소스의 이름에 잘못된 문자({1})가 하나 이상 있으므로 이 이름을 올바른 식별자로 사용할 수 없습니다. 해당 문자를 제거하거나 바꾸고 다시 시도하세요. + {0} = Resource name + + + Too many files specified. Please select fewer files and try again. + 파일을 너무 많이 지정했습니다. 현재 지정한 파일에서 몇 개를 빼고 다시 시도하세요. + + + + Unexpected error. + 예기치 않은 오류가 발생했습니다. + Theoretically possible but we really don't expect to happen. Unexpected, internal error. + + + Unable to load internal localized resource '{0}'. + 지역화된 내부 리소스 '{0}'을(를) 로드할 수 없습니다. + Theoretically possible but we really don't expect to happen. Unexpected, internal error. + + + The value could not be converted into a resource of type {0}. + +{1} + 값을 {0} 형식의 리소스로 변환할 수 없습니다. + +{1} + {0} = the type that was expected by the resource editor (e.g. System.Drawing.Point) +{1} = more specific additional error message from the system + + + The value cannot be empty in a resource of type {0}. + {0} 형식의 리소스에서는 해당 값을 비워 둘 수 없습니다. + {0} = the type that was expected by the resource editor (e.g. System.Drawing.Point) + + + One or more of the selected resource values could not be cleared. + 하나 이상의 선택한 리소스 값을 지울 수 없습니다. + + + + The resource file cannot be modified at this time. + 지금은 리소스 파일을 수정할 수 없습니다. + + + + You are trying to edit a resource file that is a part of another project item (such as a form or a control). Editing this item could corrupt the project item, and you will have to recover it by hand. In addition, changes made to this resource file may be lost if further changes are made to the project item. + +Do you really want to edit this file? + 폼 또는 컨트롤과 같은 다른 프로젝트 항목에 포함된 리소스 파일을 편집하려고 합니다. 이 파일을 편집하면 해당 프로젝트 항목이 손상될 수 있으며, 이 경우 수동으로 해당 항목을 복구해야 합니다. 또한 이후에 프로젝트 항목이 변경되면 이 리소스 파일에 대한 변경 내용이 손실될 수 있습니다. + +이 파일을 편집하시겠습니까? + + + + The resource '{0}' cannot be added. + '{0}' 리소스를 추가할 수 없습니다. + {0} - name of the resource + + + The device does not support '{0}' files. + 장치가 '{0}' 파일을 지원하지 않습니다. + {0} - the extension of the file name like 'tiff' + + + The resource item uses the type '{0}', which is not supported in this project. + 리소스 항목이 이 프로젝트에서 지원하지 않는 '{0}' 형식을 사용합니다. + {0} - name of the type + + + The resource item(s) {0} cannot be saved correctly. The item(s) will be discarded. + 리소스 항목 {0}을(를) 올바로 저장할 수 없습니다. 이 항목이 삭제됩니다. + {0} - name list of the resource + + + '{0}' + '{0}' + {0} - name + + + {0}, '{1}' + {0}, '{1}' + # {0} - name list +# {1} - another name + + + (Nothing/null) + (없음/null) + Displayed in a string table for values of Nothing/null +CONSIDER: get this from CodeDom + + + (Unknown type) + (알 수 없는 형식) + This actually shouldn't be needed, but if we get an exception trying to get the type name of an entry in the resx file (not supposed to happen), then we'll display this as its type. + + + (Value cannot be displayed) + (값을 표시할 수 없음) + Displayed in a string table for values which cannot be edited by the user + + + Name + 이름 + Columns for the "Details" view of the resource editor + + + Filename + 파일 이름 + Columns for the "Details" view of the resource editor + + + Type + 형식 + Columns for the "Details" view of the resource editor + + + Size + 크기 + Columns for the "Details" view of the resource editor + + + Comment + 설명 + Columns for the "Details" view of the resource editor + + + Text Encoding + 텍스트 인코딩 + Columns for the "Details" view of the resource editor + + + {0} x {1} + {0} x {1} + Format string for showing a graphic's size + +# {0} = width (as an integer) +# {1} = height (as an integer) +#Example, for a bitmap of width=123, height = 456, the English version of this string would be "123x456" + + + {0} KB + {0}KB + #Format string for showing a file's size +# {0} = length in kilobytes + + + {0} byte(s) + {0}바이트 + Format string for showing a file's size. +{0} = length in bytes + + + Strings + 문자열 + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + Images + 이미지 + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + Icons + 아이콘 + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + Audio + 오디오 + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + Files + 파일 + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + Other + 기타 + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + &Add + 추가(&A) + Add, Delete and Views button text in the main ToolStrip + + + &Remove + 제거(&R) + Add, Delete and Views button text in the main ToolStrip + + + &Views + 보기(&V) + Add, Delete and Views button text in the main ToolStrip + + + &Existing File... + 기존 파일(&E)... + Menu items under the "Add" button + + + New &String + 새 문자열(&S) + Menu items under the "Add" button + + + New &Image + 새 이미지(&I) + Menu items under the "Add" button + + + &PNG Image... + PNG 이미지(&P)... + Menu items under the "Add" button + + + &BMP Image... + BMP 이미지(&B)... + Menu items under the "Add" button + + + &GIF Image... + GIF 이미지(&G)... + Menu items under the "Add" button + + + &JPEG Image... + JPEG 이미지(&J)... + Menu items under the "Add" button + + + &TIFF Image... + TIFF 이미지(&T)... + Menu items under the "Add" button + + + New I&con... + 새 아이콘(&C)... + Menu items under the "Add" button + + + New &Text File... + 새 텍스트 파일(&T)... + Menu items under the "Add" button + + + Windows Bitmap + Windows 비트맵 + Friendly Image types + + + EXIF Image + EXIF 이미지 + Friendly Image types + + + Graphics Interchange Format + Graphics Interchange Format + Friendly Image types + + + JPEG File Interchange Format + JPEG 파일 교환 형식 + Friendly Image types + + + Windows Bitmap + Windows 비트맵 + Friendly Image types + + + Portable Network Graphics + 이동식 네트워크 그래픽 + Friendly Image types + + + Tag Image File Format + Tag Image File Format + Friendly Image types + + + Icon + 아이콘 + Friendly Image types + + + Text File + 텍스트 파일 + Friendly Image types + + + Binary File + 이진 파일 + + + + Wave Sound + 웨이브 사운드 + Friendly Image types + + + Linked at compile time + 컴파일 시간에 링크됨 + File Persistence Mode + + + Embedded in .resx + .resx에 포함됨 + File Persistence Mode + + + Bitmaps + 비트맵 + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Icons + 아이콘 + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Audio + 오디오 + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Text Files + 텍스트 파일 + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + All Files + 모든 파일 + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Windows Bitmap + Windows 비트맵 + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Portable Network Graphics + 이동식 네트워크 그래픽 + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Graphics Interchange Format + Graphics Interchange Format + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + JPEG File Interchange Format + JPEG 파일 교환 형식 + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Tag Image File Format + Tag Image File Format + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Icon + 아이콘 + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + &List + 목록(&L) + Resource editor listview view styles (like changing the view style of a folder in Windows XP) + + + &Details + 세부 정보(&D) + Resource editor listview view styles (like changing the view style of a folder in Windows XP) + + + &Thumbnail + 미리 보기(&T) + Resource editor listview view styles (like changing the view style of a folder in Windows XP) + + + Managed Resources Editor + 관리되는 리소스 편집기 + + + + Add existing file to resources + 리소스에 기존 파일 추가 + + + + Import file into resource '{0}' + '{0}' 리소스로 파일 가져오기 + {0} = Name of resource being imported into + + + Export resource '{0}' to file + 파일로 '{0}' 리소스 내보내기 + {0} = Name of resource being exported from + + + Please specify where to save the new file + 새 파일을 저장할 위치를 지정하세요. + + + + The file '{0}' already exists. Do you want to replace it? + ‘{0}’ 파일이 이미 있습니다. 바꾸시겠습니까? + {0} = full file path and name + + + The following files already exist. Do you want to replace them? + 다음 파일이 이미 있습니다. 바꾸시겠습니까? + + + + Select a folder in which to export the resources. + 리소스를 내보낼 대상 폴더를 선택하세요. + + + + Do you want to continue anyway? + 계속하시겠습니까? + + + + Do you want to enable strongly-typed resource generation for this file? + 이 파일에 대해 강력한 형식의 리소스 생성을 사용하시겠습니까? + + + + Resource '{0}' could not be loaded because the file to which it is linked could not be found: {1}. + 링크된 파일을 찾을 수 없어 '{0}' 리소스를 로드할 수 없습니다. {1}. + {0} = resource name that had the error, {1} = file path/name that could not be found + + + Resource '{0}' could not be instantiated. {1} + '{0}' 리소스를 인스턴스화할 수 없습니다. {1} + {0} = resource name that had the error, {1} = extended error information + + + Resource '{0}' has a name that is not recommended and that may cause compilation errors in your code. Please choose another name. + '{0}' 리소스가 권장되지 않는 이름을 사용하고 있으며 이 이름은 코드에서 컴파일 오류를 발생시킬 수 있습니다. 다른 이름을 선택하세요. + {0} = resource name that had the error + + + Unable to set the Custom Tool or Custom Tool Namespace properties of this file in order to change strongly-typed resource generation options. If the project file is checked in, try checking it out. + 강력한 형식의 리소스 생성 옵션을 변경하도록 이 파일의 사용자 지정 도구 또는 사용자 지정 도구 네임스페이스 속성을 설정할 수 없습니다. 프로젝트 파일이 체크 인되었으면 해당 파일을 체크 아웃하세요. + One possible source for this error is that source code control checkout failed or was canceled. + + + Double-click here to enable strongly-typed resources for this file. + 이 파일에 대해 강력한 형식의 리소스를 사용하려면 여기를 두 번 클릭하세요. + + + + The resource name '{0}' is not a valid identifier. + 리소스 이름 '{0}'은(는) 올바른 식별자가 아닙니다. + + + + {0} - Codepage {1} + {0} - 코드 페이지 {1} + {0} = encoding name (e.g., "Western European (Windows)"), {1} = code page # (e.g., 85001) + + + (Default) + (기본값) + + + + Change resource name + 리소스 이름 변경 + + + + Add {0} new resource(s) + {0}개의 새 리소스 추가 + {0} = number of resources added + + + Remove {0} resource(s) + {0}개 리소스 제거 + {0} = number of resources removed + + + Delete values in {0} cell(s) + {0}개 셀에서 값 삭제 + {0} = number of cells cleared + + + &Categories: + 범주(&C): + The label in the menu strip for the combobox that holds the categories of resources to display + + + Name used to identify the resource in code. + 코드에서 리소스를 식별하는 데 사용되는 이름입니다. + + + + Additional information about the resource. This property is only meaningful at design time. + 리소스에 대한 추가 정보입니다. 이 속성은 디자인 타임에서만 의미가 있습니다. + + + + Character encoding of the file. + 파일의 문자 인코딩입니다. + + + + The path to the linked resource. + 링크된 리소스의 경로입니다. + + + + Specifies whether the file resource is text or binary. + 파일 리소스가 텍스트 또는 이진 형식인지 여부를 지정합니다. + + + + Specifies whether the resource is embedded or linked. Embedded resources are saved in the resource file. Linked resources reside in an external location on disk. + 리소스가 포함 또는 링크되어 있는지 여부를 지정합니다. 포함 리소스는 리소스 파일에 저장되고 링크된 리소스는 디스크의 외부 위치에 저장됩니다. + + + + The resource will be generated as this type in the strongly-typed resource class. For example, the resource might be generated as a String or Bitmap object. + 강력한 형식의 리소스 클래스에 이 형식으로 리소스가 생성됩니다. 예를 들어 리소스가 String 또는 Bitmap 개체로 생성될 수 있습니다. + + + + The value of the resource. + 리소스의 값입니다. + + + + Unable to add a '{0}' folder to this project. + +{1} + 이 프로젝트에 '{0}' 폴더를 추가할 수 없습니다. + +{1} + {0} = name of folder trying to add (by default, this will be "Resources"), {1} = additional error information + + + Unable to add '{0}' to the project. + +{1} + 프로젝트에 '{0}'을(를) 추가할 수 없습니다. + +{1} + {0} = file name and path, {1} = additional error information. + + + Unable to add '{0}' to the project. + 프로젝트에 '{0}'을(를) 추가할 수 없습니다. + {0} = file name and path + + + A file with the name '{0}' already exists. Do you want to replace it? + 이름이 '{0}'인 파일이 이미 있습니다. 바꾸시겠습니까? + {0} = file name and path + + + {0} - Destination File Exists + {0} - 대상 파일 있음 + {0} = Name of the editor, e.g. "Managed Resources Editor" or "Resource Picker" + + + There is already a linked file with the name "{0}" in the project folder "{1}". Do you want to remove it? + 프로젝트 폴더 "{1}"에 이름이 "{0}"인 링크된 파일이 이미 있습니다. 해당 파일을 제거하시겠습니까? + {0} = file name (no path), {1} = Path of resource folder + + + {0} - Destination File Exists + {0} - 대상 파일 있음 + {0} = Name of the editor, e.g. "Managed Resources Editor" or "Resource Picker" + + + Cannot find the file '{0}'. It may have been moved or deleted. + '{0}' 파일을 찾을 수 없습니다. 이동되었거나 삭제된 것 같습니다. + {0} = file name and path + + + Connection string + 연결 문자열 + Added as the last item in the list of available types to let the user browse for a new type + + + Web Service URL + 웹 서비스 URL + Added as the last item in the list of available types to let the user browse for a new type + + + Browse... + 찾아보기... + Added as the last item in the list of available types to let the user browse for a new type + + + Application + 응용 프로그램 + + + + Application (Web) + 응용 프로그램(웹) + + + + User + 사용자 + + + + User (Web) + 사용자(웹) + + + + Name + 이름 + + + + Type + 형식 + + + + Scope + 범위 + + + + Value + + + + + Type '{0}' is not defined. + '{0}' 형식이 정의되어 있지 않습니다. + + + + Name changed + 이름이 변경되었습니다. + + + + Type changed + 형식이 변경되었습니다. + + + + Scope changed + 범위가 변경되었습니다. + + + + Roaming changed + 로밍이 변경되었습니다. + + + + Description changed + 설명이 변경되었습니다. + + + + Provider changed + 공급자가 변경되었습니다. + + + + Value changed + 값이 변경되었습니다. + + + + Generate default value in code changed + 코드의 기본값 생성이 변경되었습니다. + + + + Remove {0} setting(s) + {0}개 설정 제거 + + + + Unable to load settings file. It might be corrupted or contain invalid XML or contain duplicate identifiers. + 설정 파일을 로드할 수 없습니다. 파일이 손상되었거나 잘못된 XML 또는 중복되는 식별자를 포함하고 있습니다. + + + + New values from the app.config file were automatically added + app.config 파일의 새 값이 자동으로 추가되었습니다. + + + + Value of setting '{0}' was changed in the app.config file. + app.config 파일에서 '{0}' 설정의 값이 변경되었습니다. + + + + The current value in the .settings file is '{0}' +The new value in the app.config file is '{1}' + +Do you want to update the value in the .settings file? + .settings 파일의 현재 값은 '{0}'이고 +app.config 파일의 새 값은 '{1}'입니다. + +.settings 파일의 값을 업데이트하시겠습니까? + + + + An error occurred while reading the app.config file. The file might be corrupted or contain invalid XML. + app.config 파일을 읽는 동안 오류가 발생했습니다. 파일이 손상되었거나 잘못된 XML이 포함되어 있습니다. + + + + An error occurred while saving values to the app.config file. The file might be corrupted or contain invalid XML. + app.config 파일에 값을 저장하는 동안 오류가 발생했습니다. 파일이 손상되었거나 잘못된 XML이 포함되어 있습니다. + + + + There is already another setting with the name '{0}'. + 이름이 '{0}'인 다른 설정이 이미 있습니다. + + + + '{0}' is not a valid identifier. + '{0}'이(가) 올바른 식별자가 아닙니다. + + + + '{0}' is not a valid type name. + '{0}'은(는) 올바른 형식 이름이 아닙니다. + + + + The setting name cannot be empty. + 설정 이름은 비워 둘 수 없습니다. + + + + '{0}' cannot be converted to an instance of type '{1}'. + '{0}'을(를) '{1}' 형식의 인스턴스로 변환할 수 없습니다. + + + + Generic types are not supported. + 제네릭 형식은 지원되지 않습니다. + + + + Abstract types are not supported. + 추상 형식은 지원되지 않습니다. + + + + The current object is auto-generated and only supports renaming through the Settings Designer. + 현재 개체는 자동으로 생성되었으며 설정 디자이너를 통해서만 이름을 바꿀 수 있습니다. + + + + The current object is auto-generated and does not support modifying parameters. + 현재 개체는 자동으로 생성되었으므로 매개 변수를 수정할 수 없습니다. + + + + The settings file cannot be modified at this time. + 지금은 설정 파일을 수정할 수 없습니다. + + + + &Add Setting + 설정 추가(&A) + + + + R&emove Setting + 설정 제거(&E) + + + + Application settings allow you to store and retrieve property settings and other information for your application dynamically. For example, the application can save a user's color preferences, then retrieve them the next time it runs. + 응용 프로그램 설정에서 응용 프로그램에 대한 속성 설정 및 기타 정보를 동적으로 저장하고 가져올 수 있습니다. 예를 들어 사용자의 색 기본 설정을 저장하여 다음에 응용 프로그램이 실행될 때 이 설정을 가져올 수 있습니다. + + + + Learn more about application settings... + 응용 프로그램 설정에 대한 자세한 정보... + + + + This connection string appears to contain sensitive data (for example, a password), which is required to connect to the database. However, storing sensitive data in the connection string can be a security risk. Do you want to include sensitive data in the connection string? + 데이터베이스 연결에 필요한 중요한 데이터(예: 암호)가 연결 문자열에 들어 있는 것 같습니다. 중요한 데이터를 연결 문자열에 저장하면 보안에 문제가 발생할 수 있습니다. 중요한 데이터를 연결 문자열에 포함하시겠습니까? + + + + Select a Type + 형식 선택 + + + + This class allows you to handle specific events on the settings class: + 이 클래스를 사용하여 설정 클래스에 대한 특정 이벤트를 처리할 수 있습니다. + Comments for user part of extending generated settings class + + + The SettingChanging event is raised before a setting's value is changed. + SettingChanging 이벤트는 설정 값이 변경되기 전에 발생합니다. + + + + The PropertyChanged event is raised after a setting's value is changed. + PropertyChanged 이벤트는 설정 값이 변경된 후에 발생합니다. + + + + The SettingsLoaded event is raised after the setting values are loaded. + SettingsLoaded 이벤트는 설정 값이 로드된 후에 발생합니다. + + + + The SettingsSaving event is raised before the setting values are saved. + SettingsSaving 이벤트는 설정 값이 저장되기 전에 발생합니다. + + + + To add event handlers for saving and changing settings, uncomment the lines below: + 설정을 저장 및 변경하기 위한 이벤트 처리기를 추가하려면 아래 줄에서 주석 처리를 제거하세요. + + + + Add code to handle the SettingChangingEvent event here. + SettingChangingEvent 이벤트를 처리하는 코드를 여기에 추가하세요. + + + + Add code to handle the SettingsSaving event here. + SettingsSaving 이벤트를 처리하는 코드를 여기에 추가하세요. + + + + Failed to create or open file. + 파일을 만들거나 열지 못했습니다. + + + + Description of the setting. + 설정에 대한 설명입니다. + + + + Specifies whether or not the default setting value should be generated in the strongly-typed settings class. + 강력한 형식의 설정 클래스에서 기본 설정 값을 생성할지 여부를 지정합니다. + + + + Specifies the group to which this Settings file belongs. + 이 설정 파일이 속하는 그룹을 지정합니다. + + + + Description of the group to which this Settings file belongs. + 이 설정 파일이 속하는 그룹에 대한 설명입니다. + + + + Indicates whether the setting should roam when Windows roaming profiles are enabled. + Windows 로밍 프로필이 사용되는 경우 설정을 로밍할지 여부를 나타냅니다. + + + + Name used to identify the setting. + 설정을 식별하는 데 사용되는 이름입니다. + + + + The provider (System.Configuration.Provider.ProviderBase) used to manage the setting. + 설정을 관리하는 데 사용되는 공급자(System.Configuration.Provider.ProviderBase)입니다. + + + + Specifies whether the setting is per-application (read-only) or per-user (read-write). + 설정이 응용 프로그램별로 적용되는지(읽기 전용) 사용자별로 적용되는지(읽기/쓰기) 여부를 지정합니다. + + + + The setting will be generated as this type in the strongly-typed settings class. For example, the setting might be generated as a String or Integer object. + 강력한 형식의 설정 클래스에 이 형식으로 설정이 생성됩니다. 예를 들어 설정이 String 또는 Integer 개체로 생성될 수 있습니다. + + + + The current value for the setting. + 설정의 현재 값입니다. + + + + The following files will be deleted: + +{0} + 다음 파일이 삭제됩니다. + +{0} + Synchronize with user.config file + + + No user.config files were found in any of the following locations: + +{0} + 다음 위치에서 user.config 파일을 찾을 수 없습니다. + +{0} + + + + One or more user.config files was not removed. + 하나 이상의 user.config 파일을 제거하지 못했습니다. + + + + My.Settings Auto-Save Functionality + My.Settings 자동 저장 기능 + in-code comment used to generate a region that hides My.Settings AutoSave functionality + + + Unable to find service '{0}'. Ensure that the application is installed correctly. + '{0}' 서비스를 찾을 수 없습니다. 응용 프로그램이 제대로 설치되어 있는지 확인하세요. + Settings Global-Object-Provider Strings + + + Default pac&kage: + 기본 패키지(&K): + J# Specific String for Root Namespace + + + (Custom) + (사용자 지정) + Entry in the "Accessibility dropdown" + + + No code generation + 코드 생성 안 됨 + Entry in the "Accessibility dropdown" + + + WPF Application + WPF 응용 프로그램 + + + + (Invalid value: "{0}") + (잘못된 값: "{0}") + Goes into the ShutdownMode combobox + + + On explicit shutdown + 명시적으로 종료할 때 + + + + On last window close + 마지막 창을 닫을 때 + + + + On main window close + 주 창을 닫을 때 + + + + Could not find the expected root element "{0}" in the application definition file. + 응용 프로그램 정의 파일에서 필요한 루트 요소 "{0}"을(를) 찾을 수 없습니다. + + + + The .xaml file was in an unexpected format, near line {0} column {1}. + .xaml 파일의 줄 {0} 열 {1} 근처에 예기치 않은 형식이 있습니다. + + + + Startup &object: + 시작 개체(&O): + + + + Startup &URI: + 시작 URI(&U): + + + + The application definition file is already opened in an incompatible editor. Please close the other editor and reload the project properties page. + 호환되지 않는 편집기에 응용 프로그램 정의 파일이 이미 열려 있습니다. 다른 편집기를 닫고 프로젝트 속성 페이지를 다시 로드하세요. + + + + There was an error trying to open or create the application definition file for this project. {0} + 이 프로젝트에 대한 응용 프로그램 정의 파일을 열거나 만드는 동안 오류가 발생했습니다. {0} + + + + An error occurred trying to load the application definition file for this project. The file '{0}' could not be parsed. Please edit the file in the XAML editor to fix the error. + 이 프로젝트에 대한 응용 프로그램 정의 파일을 로드하는 동안 오류가 발생했습니다. ‘{0}’ 파일을 구문 분석할 수 없습니다. XAML 편집기에서 파일을 편집하여 오류를 수정하세요. + + + + (Error) + (오류) + Used inside UI elements when there is an error (e.g. combobox text) + + + An unspecified error has occurred. + 알 수 없는 오류가 발생했습니다. + + + + This project does not contain an application definition file. + 이 프로젝트에 응용 프로그램 정의 파일이 없습니다. + + + + An error occurred trying to create the application events file. {0} + 응용 프로그램 이벤트 파일을 만드는 동안 오류가 발생했습니다. {0} + + + + Invalid argument '{0}' + '{0}' 인수가 잘못되었습니다. + {0} = name of invalid argument + + + WPF Console Application + WPF 콘솔 응용 프로그램 + + + + WPF Class Library + WPF 클래스 라이브러리 + + + + Embed manifest with default settings + 기본 설정으로 구성된 매니페스트 포함 + + + + Create application without a manifest + 매니페스트 없이 응용 프로그램 만들기 + + + + Invalid manifest file. + 매니페스트 파일이 잘못되었습니다. + + + + Services + 서비스 + + + + Client application services enable your Windows-based applications to use the ASP.NET login (authentication), roles, and profile (settings) services. + 클라이언트 응용 프로그램 서비스를 사용하면 Windows 기반 응용 프로그램에서 ASP.NET 로그인(인증), 역할 및 프로필(설정) 서비스를 사용할 수 있습니다. + + + + Learn more about client application services... + 클라이언트 응용 프로그램 서비스에 대한 자세한 정보... + + + + Advanced Settings for Services + 서비스의 고급 설정 + + + + Disabling application services will clear the default services for Authentication, Roles, and Settings. Click OK to disable application services. + 응용 프로그램 서비스를 사용하지 않도록 설정하면 인증, 역할 및 설정에 대한 기본 서비스가 지워집니다. 응용 프로그램 서비스를 사용하지 않도록 설정하려면 [확인]을 클릭하세요. + + + + Disable Application Services + 응용 프로그램 서비스 사용 안 함 + + + + seconds + + + + + minutes + + + + + hours + 시간 + + + + days + + + + + To enable client application services, you must set the Target Framework for your application to .NET Framework 3.5 or later. In C#, you can do this on the Application property page. In Visual Basic, you can do this one the Compile property page by clicking Advanced Compile Options. + 클라이언트 응용 프로그램 서비스를 사용하려면 응용 프로그램의 대상 프레임워크를 .NET Framework 3.5 이상으로 설정해야 합니다. C#에서는 [응용 프로그램]5D; 속성 페이지에서 이를 수행할 수 있습니다. Visual Basic에서는 [컴파일]5D; 속성 페이지에서 [고급 컴파일 옵션]5D;을 클릭하면 이를 수행할 수 있습니다. + + + + An error occurred while reading the Application configuration file. The file might be corrupted or contain invalid XML. + 응용 프로그램 구성 파일을 읽는 동안 오류가 발생했습니다. 파일이 손상되었거나 잘못된 XML이 포함되어 있습니다. + + + + The URL is invalid. Please enter a valid URL like http://microsoft.com/services + URL이 잘못되었습니다. http://microsoft.com/services와 같은 올바른 URL을 입력하세요. + + + + A service URL in the application configuration file is not in the expected format. + 응용 프로그램 구성 파일의 서비스 URL 형식이 잘못되었습니다. + + + + Authentication, Roles and Web Settings providers have been configured via the Application configuration file such that they do not share a common connection string. + 응용 프로그램 구성 파일을 통해 인증, 역할 및 웹 설정 공급자가 공용 연결 문자열을 공유하지 않도록 구성되었습니다. + + + + Specify a connection string to a SQL Server database, or use the special connection string "Data Source = |SQL/CE|", which causes SQL Server Compact to generate local database files for offline storage. + SQL Server 데이터베이스에 대한 연결 문자열을 지정하거나 "Data Source = |SQL/CE|"라는 특정 연결 문자열을 사용하세요. 이 특정 연결 문자열을 사용하면 SQL Server Compact에서 오프라인 저장소에 로컬 데이터베이스 파일을 생성합니다. + + + + The following type names were not understood: '{0}'. Make sure you have references to these types. + 형식 이름 '{0}'을(를) 인식할 수 없습니다. 이들 형식에 대한 참조가 있는지 확인하세요. + + + + There are already settings with the following names: {0}. + 이름이 {0}인 설정이 이미 있습니다. + + + + The username/password combination cannot be authenticated. + 사용자 이름/암호 조합을 인증할 수 없습니다. + + + + Windows Forms Application + Windows Forms 응용 프로그램 + The "Windows Forms" distinguishes it from a WPF application + + + Namespace of the service reference. + 서비스 참조의 네임스페이스입니다. + + + + Service Reference Properties + 서비스 참조 속성 + + + + Metadata Location Url + 메타데이터 위치 URL + + + + Metadata Location + 메타데이터 위치 + + + + A service reference with multiple source urls is not supported. + 여러 소스 URL이 있는 서비스 참조는 지원되지 않습니다. + + + + Cannot change reference Url to empty. The reference url must be a valid URL. + 참조 URL이 비어 있도록 변경할 수 없습니다. 참조 URL은 올바른 URL이어야 합니다. + + + + One or more files were reloaded during the checkout. Please retry your operation. + 체크 아웃하는 동안 하나 이상의 파일이 다시 로드되었습니다. 작업을 다시 시도하세요. + + + + The project was reloaded, and some changes on this page may have been lost. + 프로젝트가 다시 로드되었습니다. 이 페이지의 일부 변경 내용이 손실되었을 수 있습니다. + + + + The application will fail to run in the selected zone because of this requested elevated permission. Click the help link above for more info. + 고급 권한이 없으므로 응용 프로그램을 선택한 영역에서 실행할 수 없습니다. 자세한 내용을 보려면 위에 있는 도움말 링크를 클릭하세요. + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.pl.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.pl.xlf new file mode 100644 index 00000000000..4e053ce5db5 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.pl.xlf @@ -0,0 +1,2948 @@ + + + + + + All Files + Wszystkie pliki + + + + Property Page + Strona właściwości + + + + References + Odwołania + + + + Version + Wersja + + + + Signing + Podpisywanie + + + + Application + Aplikacja + + + + Compile + Kompiluj + + + + Debug + Debuguj + + + + Deploy + Wdróż + + + + Database + Baza danych + + + + Security + Zabezpieczenia + + + + Build + Kompilacja + + + + Build Events + Zdarzenia kompilacji + + + + Reference Paths + Ścieżki odwołania + + + + Pre-build Event Command Line + Wiersz polecenia zdarzenia sprzed kompilacji + + + + Post-build Event Command Line + Wiersz polecenia zdarzenia po kompilacji + + + + The output path is not trusted. +The application may throw security exceptions when it attempts to perform actions which require full trust. +Click OK to ignore and continue. Click CANCEL to choose a different output path. + Ścieżka wyjściowa nie jest zaufana. +Aplikacja może zgłaszać wyjątki zabezpieczeń podczas próby wykonania akcji wymagającej pełnego zaufania. +Kliknij przycisk OK, aby to zignorować i kontynuować. Kliknij przycisk ANULUJ, aby wybrać inną ścieżkę wyjściową. + + + + <Browse...> + <Przeglądaj...> + + + + (None) + (Brak) + + + + <New...> + <Nowa...> + + + + <Browse...> + <Przeglądaj...> + + + + (None) + (Brak) + + + + Active ({0}) + Aktywne ({0}) + + + + All Configurations + Wszystkie konfiguracje + + + + All Platforms + Wszystkie platformy + + + + N/A + ND + This is used in the platform and configuration comboboxes when showing pages that don't care about the current platform/configuration + + + Could not find the configuration '{0}' for platform '{1}'. + Nie można odnaleźć konfiguracji „{0}” dla platformy „{1}”. + + + + (None) + (Brak) + + + + Select File + Wybieranie pliku + + + + Add existing file to project + Dodawanie istniejącego pliku do projektu + + + + Icon Files + Pliki ikon + + + + Executable Files + Pliki wykonywalne + + + + Select Working Directory + Wybieranie katalogu roboczego + + + + Select Output Path + Wybieranie ścieżki wyjściowej + + + + Select Reference Path + Wybieranie ścieżki odwołania + + + + Win32 Resource Files + Pliki zasobów Win32 + + + + Add Win32 resource file to project + Dodawanie pliku zasobów Win32 do projektu + + + + Folder path does not exist. +Please select a valid folder path. + Ścieżka folderu nie istnieje. +Wybierz prawidłową ścieżkę folderu. + + + + Advanced Compiler Settings + Zaawansowane ustawienia kompilatora + + + + Advanced Build Settings + Zaawansowane ustawienia kompilacji + + + + Compiler Warnings + Ostrzeżenia kompilatora + + + + Reference Paths + Ścieżki odwołania + + + + Compatible Settings + Ustawienia zgodności + + + + Assembly Information + Informacje o zestawie + + + + Invalid version format, expected "[Major]", "[Major].[Minor]", "[Major].[Minor].[Build]" or "[Major].[Minor].[Build].[Revision]" + Nieprawidłowy format wersji, oczekiwano "[Główna]", "[Główna].[Pomocnicza]", "[Główna].[Pomocnicza].[Kompilacja]" lub "[Główna].[Pomocnicza].[Kompilacja].[Poprawka]" + + + + A wildcard ("*") is not allowed in this field. + Symbol wieloznaczny (*) nie jest dozwolony w tym polu. + + + + Each part of the version number for '{0}' must be an integer between 0 and {1}. + Każda część numeru wersji elementu „{0}” musi być liczbą całkowitą z przedziału od 0 do {1}. + + + + (Default Icon) + (Ikona domyślna) + + + + Startup object must be a form when 'Enable application framework' is checked. + Obiekt uruchomieniowy musi być formularzem, jeżeli zaznaczona jest opcja „Włącz platformę aplikacji”. + + + + (Not set) + (Nie ustawiono) + + + + Icon could not be added to the project. + Nie można dodać ikony do projektu. + + + + Invalid icon file. + Nieprawidłowy plik ikony. + + + + {0} is not a valid icon file. + {0} nie jest prawidłową ikoną pliku. + + + + The GUID should match the format dddddddd-dddd-dddd-dddd-dddddddddddd. + Identyfikator GUID powinien być zgodny z formatem dddddddd-dddd-dddd-dddd-dddddddddddd. + + + + NOTE: This file is auto-generated; do not modify it directly. To make changes, + UWAGA: Ten plik został wygenerowany automatycznie; nie należy go bezpośrednio modyfikować. Aby wprowadzić zmiany + These comments are placed in the ApplicationEvents.vb file if it is generated by the project designer. The same comments appear in the templates, under vsproject\Templates\Windows\VisualBasic\ProjectTemplates\WindowsApplication\MyEvents.vb (MyEvents.vb is renamed to ApplicationEvents.vb after project creation), and these comments should be kept in sync + + + or if you encounter build errors in this file, go to the Project Designer + lub jeśli napotkasz w tym pliku błędy kompilacji, przejdź do Projektanta projektu + + + + (go to Project Properties or double-click the My Project node in + (przejdź do obszaru Właściwości projektu lub kliknij dwukrotnie węzeł Mój Projekt w + + + + Solution Explorer), and make changes on the Application tab. + Eksploratorze rozwiązań) i wprowadź zmiany na karcie Aplikacja. + + + + '{0}' is not a valid identifier. Please select a different Startup form. + „{0}” nie jest prawidłowym identyfikatorem. Wybierz inny formularz początkowy. + + + + '{0}' is not a valid identifier. Please select a different Splash screen form. + „{0}” nie jest prawidłowym identyfikatorem. Wybierz inny formularz ekranu powitalnego. + + + + The splash screen form cannot be the start-up form. + Formularz ekranu powitalnego nie może być formularzem początkowym. + + + + Startup f&orm: + F&ormularz początkowy: + + + + The following events are available for MyApplication: + Następujące zdarzenia są dostępne dla MyApplication: + + + + Startup: Raised when the application starts, before the startup form is created. + Startup: występuje podczas uruchamiania aplikacji, przed utworzeniem formularza początkowego. + + + + Shutdown: Raised after all application forms are closed. This event is not raised if the application terminates abnormally. + Shutdown: występuje po zamknięciu wszystkich formularzy aplikacji. To zdarzenie nie jest wywoływane, jeśli aplikacja nieprawidłowo kończy działanie. + + + + UnhandledException: Raised if the application encounters an unhandled exception. + UnhandledException: występuje, gdy aplikacja napotka nieobsługiwany wyjątek. + + + + StartupNextInstance: Raised when launching a single-instance application and the application is already active. + StartupNextInstance: występuje podczas uruchamiania pojedynczego wystąpienia aplikacji i gdy aplikacja jest już aktywna. + + + + NetworkAvailabilityChanged: Raised when the network connection is connected or disconnected. + NetworkAvailabilityChanged: występuje, gdy połączenie sieciowe jest połączone lub rozłączone. + + + + Base address must be a hexadecimal number with less than or equal to 8 digits, for example, 0x11000000. + Adres podstawowy musi być liczbą szesnastkową o długości maksymalnie 8 cyfr, na przykład 0x11000000. + + + + None + Brak + + + + Warning + Ostrzeżenie + + + + Error + Błąd + + + + (custom) + (niestandardowy) + + + + Implicit conversion + Niejawna konwersja + + + + Late binding; call could fail at run time + Późne wiązanie; wywołanie może się zakończyć niepowodzeniem w czasie wykonywania + + + + Implicit type; object assumed + Niejawny typ; przyjęto obiekt + + + + Use of variable prior to assignment + Użycie zmiennej przed przypisaniem + + + + Function/Operator without return value + Funkcja/operator bez wartości zwracanej + + + + Unused local variable + Nieużyta zmienna lokalna + + + + Instance variable accesses shared member + Zmienna wystąpienia uzyskała dostęp do udostępnionej składowej + + + + Recursive operator or property access + Cykliczny operator lub dostęp do właściwości + + + + Duplicate or overlapping catch blocks + Zduplikowane lub nakładające się bloki catch + + + + The warning settings for one or more configurations conflict. +Changing this setting will reset the settings in all configurations. + Konflikt konfiguracji co najmniej jednego ustawienia ostrzeżeń. +Zmiana tego ustawienia spowoduje zresetowanie ustawień we wszystkich konfiguracjach. + + + + When startup form closes + Po zamknięciu formularza startowego + + + + When last form closes + Po zamknięciu ostatniego formularza + + + + Windows + System Windows + Authentication modes + + + Application-defined + Określony przez aplikację + Authentication modes + + + Cancel + Anuluj + + + + &Calculate Permissions + &Oblicz uprawnienia + + + + Stopped... + Zatrzymano... + + + + Starting... + Uruchamianie... + + + + Building... + Kompilowanie... + + + + Analyzing... + Analizowanie... + + + + Analyze Failed + Analiza nie powiodła się + + + + Aborting... + Przerywanie... + + + + Canceling... + Anulowanie... + + + + Internet + Internet + + + + Local Intranet + Lokalny intranet + + + + (Custom) + (Niestandardowy) + Don't use + + + (Zone Default) + (Strefa domyślna) + + + + Include + Uwzględnij + + + + Exclude + Wyklucz + + + + The application will require elevated permissions to run in the selected zone. Click the help link above for more info. + W celu uruchomienia aplikacji w wybranej strefie wymagane są podniesione uprawnienia. Kliknij powyższy link pomocy, aby uzyskać więcej informacji. + + + + This permission could not be loaded. Press the delete key to remove it from your project. + Nie można załadować uprawnienia. Naciśnij klawisz Delete, aby je usunąć z projektu. + Don't use + + + Included + Uwzględnione + + + + Permission + Uprawnienie + + + + Setting + Ustawienie + + + + Specify the code access security permissions that your ClickOnce application requires in order to run. Learn more about code access security... + Określ uprawnienia zabezpieczeń dostępu kodu, jakie musi spełniać aplikacja ClickOnce, aby mogła zostać uruchomiona. Dowiedz się więcej o zabezpieczeniach dostępu kodu… + + + + Learn more about code access security... + Dowiedz się więcej o zabezpieczeniach dostępu kodu… + + + + Invalid value + Nieprawidłowa wartość + + + + The SecurityPermission must be included in your application with the Execute flag set or your application will not run. Mark this permission as "Zone Default" or "Include." + Atrybut SecurityPermission musi być dołączony do aplikacji z ustawioną flagą Uruchom. W przeciwnym razie aplikacja nie zostanie uruchomiona. Oznacz to uprawnienie jako „Strefa domyślna” lub „Dołącz”. + + + + The SecurityPermission must be included in your application with the Execute flag set or your application will not run. The Execute flag has been added to the SecurityPermission in your manifest. + Atrybut SecurityPermission musi być dołączony do aplikacji z ustawioną flagą Uruchom. W przeciwnym razie aplikacja nie zostanie uruchomiona. Flaga Uruchom została dodana do atrybutu SecurityPermission w manifeście. + + + + This application requires full trust to run correctly. Would you like to set this as a full trust application? + Ta aplikacja wymaga pełnego zaufania w celu poprawnego uruchomienia. Czy chcesz ustawić tę aplikację jako w pełni zaufaną? + + + + Full Trust Required + Pełne zaufanie wymagane + + + + An error occurred and the app.manifest file could not be saved. +Error: + Wystąpił błąd i nie można zapisać pliku app.manifest. +Błąd: + + + + An error occurred and the app.manifest file could not be loaded. Please remove any changes you have made to the file and reload the Security property page again. + Wystąpił błąd i nie można załadować pliku app.manifest. Usuń wszystkie dokonane w pliku zmiany i ponownie załaduj stronę właściwości zabezpieczeń. + + + + Included + Uwzględnione + + + + Not Included + Nieuwzględnione + + + + Included with warning + Uwzględnione z ostrzeżeniem + + + + Calculating permissions failed. + Obliczanie uprawnień nie powiodło się. + + + + Error + Błąd + + + + Advanced Security Settings + Zaawansowane ustawienia zabezpieczeń + + + + Build Failed. Click CANCEL and correct the build failure before analyzing again. + Kompilacja nie powiodła się. Kliknij przycisk ANULUJ i popraw błąd kompilacji przed ponowną analizą. + + + + Build completed... + Kompilacja zakończona... + + + + Unable to start the build. + Nie można uruchomić kompilacji. + + + + Serious error. The build must begin in order to analyze permissions. It has not started. + Poważny błąd. Aby przeanalizować uprawnienia, należy rozpocząć kompilację. Kompilacja nie została uruchomiona. + Don't use + + + (Custom) + (Niestandardowy) + Don't use + + + (None) + (Brak) + + + + Selecting existing key file + Wybieranie istniejącego pliku klucza + + + + Key Files + Pliki klucza + + + + Create key file + Utwórz plik klucza + + + + The old password is invalid. + Stare hasło jest nieprawidłowe. + + + + Enter the old password. + Wprowadź stare hasło. + + + + Enter a new password. + Wprowadź nowe hasło. + + + + The new passwords do not match. Enter the password again. + Nowe hasła nie pasują do siebie. Wprowadź hasło ponownie. + + + + The new password must be at least 6 characters in length. Enter the password again. + Nowe hasło musi mieć co najmniej 6 znaków. Wprowadź hasło ponownie. + + + + Select a Certificate + Wybierz certyfikat + + + + Select a certificate to sign your ClickOnce manifests + Wybierz certyfikat do podpisania manifestów ClickOnce + + + + Certificate Files + Certyfikuj pliki + + + + Issued To + Wystawiony dla + + + + Issued By + Wystawiony przez + + + + Intended Purpose + Zamierzony cel + + + + Expiration Date + Data wygaśnięcia + + + + The password is invalid. + Hasło jest nieprawidłowe. + + + + Invalid password + Nieprawidłowe hasło + + + + The selected file does not contain a private key. You must choose a certificate that contains a private key. + Wybrany plik nie zawiera klucza prywatnego. Musisz wybrać certyfikat zawierający klucz prywatny. + + + + Invalid key + Nieprawidłowy klucz + + + + Certificate Creation Error + Błąd tworzenia certyfikatu + + + + <All> + <Wszystkie> + + + + The passwords do not match. + Hasła są niezgodne. + + + + Enter a password. + Wprowadź hasło. + + + + Confirm the password. + Potwierdź hasło. + + + + (none) + (brak) + + + + Enter password to open file + Wprowadź hasło, aby otworzyć plik + + + + Enter &password to open file {0} + Wprowadź &hasło, aby otworzyć plik {0} + + + + Enter &password for new file {0} + Wprowadź &hasło dla nowego pliku {0} + + + + The project already contains a file with that name. Choose another certificate file or rename the file in your project. + Projekt już zawiera plik o tej nazwie. Wybierz inny plik certyfikatu lub zmień nazwę pliku w projekcie. + + + + The file '{0}' could not be imported: {1} + Nie można zaimportować pliku „{0}”: {1} + + + + _TemporaryKey.pfx + _TemporaryKey.pfx + + + + The selected certificate is not valid for code signing. Choose another certificate file. + Wybrany certyfikat nie jest poprawny na potrzeby podpisywania kodu. Wybierz inny plik certyfikatu. + + + + Change property: {0} + Zmień właściwość: {0} + + + + Windows Application + Aplikacja systemu Windows + + + + Windows Service + Usługa systemu Windows + + + + Class Library + Biblioteka klas + + + + Console Application + Aplikacja konsolowa + + + + Web Control Library + Biblioteka kontrolek sieci Web + + + + Cannot remove '{0}'. {1} + + Nie można usunąć elementu „{0}”. {1} + + + + + Adding or removing '{0}' as a project import failed because of an unexpected error from the project system. The error returned was: '{1}'. + Usuwanie lub dodawanie elementu „{0}” jako importu projektu nie powiodło się, ponieważ wystąpił nieoczekiwany błąd w systemie projektów. Zwrócony błąd to: „{1}”. + + + + Adding web reference failed. {0} + + Dodawanie odwołania sieci Web nie powiodło się. {0} + + + + + Updating web reference '{0}' failed. +{1} + Aktualizowanie odwołania sieci Web „{0}” nie powiodło się. +{1} + + + + Web Reference Properties + Właściwości odwołania do sieci Web + + + + Static + Statyczne + + + + Dynamic + Dynamiczne + + + + Name of the web reference + Nazwa odwołania do sieci Web + + + + URL Behavior + Zachowanie adresu URL + + + + Web reference URL behavior + Zachowanie adresu URL odwołania sieci Web + + + + Web Reference URL + Adres URL odwołania sieci Web + + + + Web Reference URL + Adres URL odwołania sieci Web + + + + Reference Properties + Właściwości odwołania + + + + The remote machine name cannot be blank. Please specify the name of the machine to debug remotely. + Nazwa zdalnego komputera nie może być pusta. Podaj nazwę komputera do zdalnego debugowania. + + + + The external program cannot be found. Please enter a valid executable file. + Nie można odnaleźć zewnętrznego programu. Wprowadź prawidłowy plik wykonywalny. + + + + The external program property cannot be empty. Please enter a valid executable file. + Właściwość programu zewnętrznego nie może być pusta. Wprowadź prawidłowy plik wykonywalny. + + + + We can only debug an EXE file. Please enter a valid executable file. + Debugować można tylko pliki EXE. Wprowadź prawidłowy plik wykonywalny. + + + + The URL property cannot be empty. Please enter a valid URL. + Właściwość URL nie może być pusta. Wprowadź poprawny adres URL. + + + + The URL is invalid. Please enter a valid URL like "http://www.microsoft.com/" + Adres URL jest nieprawidłowy. Wprowadź poprawny adres URL, np. „http://www.microsoft.com/” + + + + The working directory you entered does not exist. Please enter a valid working directory. + Wprowadzony katalog roboczy nie istnieje. Wprowadź poprawny katalog roboczy. + + + + <The system cannot find the reference specified> + <System nie może odnaleźć określonego odwołania> + + + + Unused References + Nieużywane odwołania + + + + &Remove + &Usuń + + + + No unused references + Brak nieużywanych odwołań + + + + Project compilation failed. Cannot determine unused references. + Kompilacja projektu nie powiodła się. Nie można określić nieużywanych odwołań. + + + + Gathering list of unused references... + Gromadzenie listy nieużywanych odwołań… + + + + Error getting unused references. + Błąd podczas pobierania nieużywanych odwołań. + + + + Base address must be a hexadecimal number with less than or equal to 8 digits, for example, &H11000000. + &Adres bazowy musi być liczbą szesnastkową o maksymalnie 8 cyfrach, na przykład: H11000000. + + + + "Resource files must have a .res file extension. Please enter a valid resource file name." + „Pliki zasobów muszą mieć rozszerzenie res. Wprowadź prawidłową nazwę pliku zasobu”. + + + + "The resource file entered does not exist." + "Wprowadzony plik zasobu nie istnieje". + + + + Project Designer + Projektant projektu + + + + Settings + Ustawienia + + + + Resources + Zasoby + + + + An error occurred trying to load the project properties window. Close the window and try again. +{0} + Wystąpił błąd podczas próby załadowania okna właściwości projektu. Zamknij okno i spróbuj ponownie. +{0} + + + + An error occurred trying to load the page. + Wystąpił błąd podczas próby załadowania strony. + + + + The designer cannot be shown because the document for it was never loaded. + Nie można wyświetlić projektanta, ponieważ nie załadowano dokumentu. + + + + This project does not contain a default resources file. Click here to create one. + Ten projekt nie zawiera domyślnego pliku zasobów. Kliknij tutaj, aby go utworzyć. + + + + This project does not contain a default settings file. Click here to create one. + Ten projekt nie zawiera domyślnego pliku ustawień. Kliknij tutaj, aby go utworzyć. + + + + Could not find the file '{0}'. + Nie można odnaleźć pliku '{0}'. + + + + The file '{0}' is already open in an editor. Please close the file and try again. + Plik „{0}” jest już otwarty w edytorze. Zamknij plik i spróbuj ponownie. + + + + All Project Designer Pages + Wszystkie strony projektanta projektu + + + + More Settings + Więcej ustawień + + + + The requested file type is not supported in projects of this type. + Żądany typ pliku nie jest obsługiwany w projektach tego typu. + + + + Assembly Name + Nazwa zestawu + + + + Root Namespace + Główna przestrzeń nazw + + + + Startup Object + Obiekt uruchomieniowy + + + + Application Icon + Ikona aplikacji + Property Friendly Names (for transaction names) - NOTE: All of these are optional + + + Assembly Version + Wersja zestawu + + + + Assembly File Version + Wersja pliku zestawu + + + + Assembly GUID + Identyfikator GUID zestawu + + + + Enable application framework + Włącz strukturę aplikacji + + + + External Program Path + Ścieżka programu zewnętrznego + + + + Start Browser With URL + Uruchom przeglądarkę i przejdź do adresu URL + + + + Working Directory + Katalog roboczy + + + + Remote Machine Name + Nazwa komputera zdalnego + + + + Project Designer Page Container + Kontener strony projektanta projektu + + + + Switch Project Designer Page + Przełącz stronę projektanta projektu + + + + Allow switching between active pages of the project designer (use Ctrl+PageUp and Ctrl+PageDown) + Pozwala przełączać między aktywnymi stronami projektanta projektu (użyj klawiszy Ctrl+PageUp i Ctrl+PageDown) + + + + {0} page: + Strona {0}: + {0} = sub page name + + + {0} [Read Only] + {0} [tylko do odczytu] + Attach a readonly to the designer caption {0}=Designer caption + + + The editor could not get the IVsTextStream for file {0}. + Edytor nie może uzyskać elementu IVsTextStream dla pliku {0}. + #exception {0}=filename + + + The editor could not get the IVsTextStream. + Edytor nie może uzyskać elementu IVsTextStream. + #exception (no file name) + + + No DesignerService for file '{0}'. + Brak usługi DesignerService dla pliku „{0}”. + #{0}=file name + + + Invalid physical view name. + Nieprawidłowa nazwa widoku fizycznego. + + + + Unable to create text buffer. + Nie można utworzyć buforu tekstu. + # com exception + + + No LocalRegistry service. + Brak usługi LocalRegistry. + #exception + + + Replacing text stream failed:{0} + Nie można dokonać zamiany w strumieniu tekstu: {0} + #exception {0}=err msg + + + Buffer is read only. + Bufor jest tylko do odczytu. + + + + File is already opened in an incompatible editor. + Plik jest już otwarty w niezgodnym edytorze. + + + + Unsupported format. + Nieobsługiwany format. + + + + Unknown Error. + Nieznany błąd. + + + + Unable to create the designer. {0} + Nie można utworzyć projektanta. {0} + # {0}=inner exception + + + Unable to check out the current file. The file may be read-only or locked, or you may need to check the file out manually. + Nie można wyewidencjonować bieżącego pliku. Plik może być zablokowany lub tylko do odczytu albo należy go wyewidencjonować ręcznie. + # General checkout exception message + + + Microsoft Visual Studio + Microsoft Visual Studio + Error reporting + + + Please enter an integer between 1 and 60. + Wprowadź liczbę całkowitą z zakresu od 1 do 60. + + + + Please enter an integer between 1 and 60. + Wprowadź liczbę całkowitą z zakresu od 1 do 60. + + + + Show empty environment + Pokaż puste środowisko + These are items in a combobox (and so they don't need periods) + + + Load last loaded solution + Załaduj ostatnio załadowane rozwiązanie + These are items in a combobox (and so they don't need periods) + + + Show New Project dialog box + Pokaż okno dialogowe nowego projektu + These are items in a combobox (and so they don't need periods) + + + Show Open Project dialog box + Pokaż okno dialogowe otwarcia projektu + These are items in a combobox (and so they don't need periods) + + + Changes in Help Options will not take effect until the environment is restarted. + Zmiany w opcjach pomocy nie zostaną wprowadzone, dopóki środowisko nie zostanie ponownie uruchomione. + + + + The location specified is on an invalid or read-only disk, or contains a device name reserved for the system. + Określona lokalizacja znajduje się na nieprawidłowym dysku lub dysku tylko do odczytu lub zawiera nazwę urządzenia zarezerwowaną dla systemu. + + + + COM + Model COM + + + + Component Design + Projekt składnika + + + + Serialization + Serializacja + + + + Web + Sieć Web + + + + COMClass + Atrybut COMClass + + + + Expose {0} to COM. + Prezentuj element {0} w modelu COM. + + + + COM Class + Klasa modelu COM + + + + COMVisible + Atrybut COMVisible + + + + Make {0} visible through COM. + Ustaw element {0} jako widoczny w modelu COM. + + + + COM Visible + Widoczny dla modelu COM + + + + DispId + DispId + + + + Set explicit DispId to this {0}. + Ustaw jawną wartość DispId elementu {0}. + + + + DispId + DispId + + + + Value + Wartość + + + + Explicit DispId value for this {0}. + Jawna wartość DispId elementu {0}. + + + + Value + Wartość + + + + DispId value should be an integer greater than or equal to 1. + Wartość DispId powinna być liczbą całkowitą większą niż lub równą 1. + + + + Category + Kategoria + + + + Category group for the property. + Grupa kategorii dla właściwości. + + + + Category + Kategoria + + + + Default Event + Zdarzenie domyślne + + + + Default event for the class. + Zdarzenie domyślne klasy. + + + + Default Event + Zdarzenie domyślne + + + + Default Value + Wartość domyślna + + + + Default value for the property. + Wartość domyślna właściwości. + + + + Default Value + Wartość domyślna + + + + NonSerialized + Atrybut NonSerialized + + + + Field should not be serialized. + Pole nie powinno być serializowane. + + + + Non Serialized + Bez serializacji + + + + Serializable + Możliwy do serializacji + + + + Enable serialization for this {0} and its members. + Włącz serializację elementu {0} i jego elementów członkowskich. + + + + Serializable + Możliwy do serializacji + + + + WebMethod + Atrybut WebMethod + + + + Expose method via web services. + Prezentuj metody za pośrednictwem usług sieci Web. + + + + Web Method + Metoda sieci Web + + + + Description + Opis + + + + Description for the Web Method. + Opis metody sieci Web. + + + + Description + Opis + + + + EnableSession + Atrybut EnableSession + + + + Maintain session state. + Utrzymuj stan sesji. + + + + Enable Session + Włącz sesję + + + + TransactionOptions + Atrybut TransactionOptions + + + + Set transaction options. + Ustaw opcje dla transakcji. + + + + Transaction Options + Opcje transakcji + + + + WebService + Atrybut WebService + + + + Configure the Web Service settings. + Skonfiguruj ustawienia usługi sieci Web. + + + + Web Service + Usługa sieci Web + + + + Name + Nazwa + + + + Name for the web service. + Nazwa usługi sieci Web. + + + + Name + Nazwa + + + + Description + Opis + + + + Description for the web service. + Opis usługi sieci Web. + + + + Description + Opis + + + + Namespace + Przestrzeń nazw + + + + Namespace for the web service. + Przestrzeń nazw usługi sieci Web. + + + + Namespace + Przestrzeń nazw + + + + Default + Domyślne + + + + Action + Akcja + + + + Appearance + Wygląd + + + + Behavior + Zachowanie + + + + Data + Dane + + + + DragDrop + Przeciąganie i upuszczanie + + + + Focus + Fokus + + + + Format + Format + + + + Key + Klawisz + + + + Layout + Układ + + + + Mouse + Mysz + + + + WindowStyle + Styl okna + + + + (None) + (Brak) + Default Event + + + Requires: + Wymaga: + + + + Name + Nazwa + Column names for the string table + + + Type + Typ + Column names for the string table + + + Value + Wartość + Column names for the string table + + + Comment + Komentarz + Column names for the string table + + + Failed to generate file: {0} + Nie można wygenerować pliku: {0} + + + + Editing embedded resources directly is not supported. Do you wish to convert this item to a linked resource in order to edit it? + Bezpośrednia edycja zasobów osadzonych nie jest obsługiwana. Czy chcesz przekonwertować ten element na zasób połączony w celu jego edycji? + + + + The current object is auto-generated and only supports renaming through the Managed Resources Editor. + Bieżący obiekt został wygenerowany automatycznie i obsługuje zmianę nazwy poprzez edytor zarządzanych zasobów. + + + + Cannot find the file '{0}'. It may have been moved or deleted. + Nie można odnaleźć pliku „{0}”. Mógł on zostać przeniesiony lub usunięty. + {0} = file name and path + + + Unable to load resource from file '{0}'. + Nie można załadować zasobu z pliku '{0}'. + {0} = file name and path + + + The resource name cannot be empty. + Nazwa zasobu nie może być pusta. + + + + There is already another resource with the name '{0}'. + Istnieje już inny zasób o nazwie '{0}'. + {0} = Resource name + + + The resource was not of the expected type. + Zasób nie ma oczekiwanego typu. + This error can happen if, for example, you try to add foo.bmp to the resource editor, but foo.bmp is really a metafile. + + + Unable to create new resource file '{0}'. {1} + Nie można utworzyć nowego pliku zasobu „{0}”. {1} + {0} = file name and path, {1} = additional error information + + + Unable to play the audio resource. {0} + Nie można odtworzyć zasobu audio. {0} + {0} = Additional error information. + + + Resource '{0}' cannot be saved to a file. + Nie można zapisać zasobu '{0}' do pliku. + {0} = Resource name + + + The operation has been canceled by the user. + Operacja została anulowana przez użytkownika. + + + + The resource value contains invalid data or has an incorrect format. + Wartość zasobu zawiera nieprawidłowe dane lub ma nieprawidłowy format. + + + + The name of the resource '{0}' cannot be used as a valid identifier, because it contains one or more invalid characters: '{1}'. Please remove or replace those characters and try again. + Nazwa zasobu „{0}” nie może zostać użyta jako prawidłowy identyfikator, ponieważ zawiera nieprawidłowe znaki: „{1}”. Usuń lub zastąp te znaki i spróbuj ponownie. + {0} = Resource name + + + Too many files specified. Please select fewer files and try again. + Wybrano za dużo plików. Wybierz mniej plików i spróbuj ponownie. + + + + Unexpected error. + Nieoczekiwany błąd. + Theoretically possible but we really don't expect to happen. Unexpected, internal error. + + + Unable to load internal localized resource '{0}'. + Nie można załadować wewnętrznych zlokalizowanych zasobów '{0}'. + Theoretically possible but we really don't expect to happen. Unexpected, internal error. + + + The value could not be converted into a resource of type {0}. + +{1} + Nie można skonwertować wartości do zasobu typu {0}. + +{1} + {0} = the type that was expected by the resource editor (e.g. System.Drawing.Point) +{1} = more specific additional error message from the system + + + The value cannot be empty in a resource of type {0}. + Wartość nie może być pusta w zasobie typu {0}. + {0} = the type that was expected by the resource editor (e.g. System.Drawing.Point) + + + One or more of the selected resource values could not be cleared. + Nie można wyczyścić jednego lub więcej z wybranych wartości zasobów. + + + + The resource file cannot be modified at this time. + W tej chwili nie można zmodyfikować pliku zasobu. + + + + You are trying to edit a resource file that is a part of another project item (such as a form or a control). Editing this item could corrupt the project item, and you will have to recover it by hand. In addition, changes made to this resource file may be lost if further changes are made to the project item. + +Do you really want to edit this file? + Podjęto próbę edycji pliku zasobu, który jest częścią innego elementu projektu (takiego jak formularz czy kontrolka). Edytowanie tego elementu może spowodować uszkodzenie elementu projektu i trzeba będzie go odzyskać ręcznie. Ponadto zmiany dokonane w tym pliku zasobu mogą zostać utracone, jeśli zostaną wprowadzone kolejne zmiany w elemencie projektu. + +Czy na pewno chcesz edytować ten plik? + + + + The resource '{0}' cannot be added. + Nie można dodać zasobu „{0}”. + {0} - name of the resource + + + The device does not support '{0}' files. + Urządzenie nie obsługuje plików '{0}'. + {0} - the extension of the file name like 'tiff' + + + The resource item uses the type '{0}', which is not supported in this project. + Element zasobu używa typu '{0}', który nie jest obsługiwany w tym projekcie. + {0} - name of the type + + + The resource item(s) {0} cannot be saved correctly. The item(s) will be discarded. + Nie można poprawnie zapisać elementów zasobów {0}. Elementy zostaną odrzucone. + {0} - name list of the resource + + + '{0}' + „{0}” + {0} - name + + + {0}, '{1}' + {0}, „{1}” + # {0} - name list +# {1} - another name + + + (Nothing/null) + (Nic/null) + Displayed in a string table for values of Nothing/null +CONSIDER: get this from CodeDom + + + (Unknown type) + (Nieznany typ) + This actually shouldn't be needed, but if we get an exception trying to get the type name of an entry in the resx file (not supposed to happen), then we'll display this as its type. + + + (Value cannot be displayed) + (Nie można wyświetlić wartości) + Displayed in a string table for values which cannot be edited by the user + + + Name + Nazwa + Columns for the "Details" view of the resource editor + + + Filename + Nazwa pliku + Columns for the "Details" view of the resource editor + + + Type + Typ + Columns for the "Details" view of the resource editor + + + Size + Rozmiar + Columns for the "Details" view of the resource editor + + + Comment + Komentarz + Columns for the "Details" view of the resource editor + + + Text Encoding + Kodowanie tekstu + Columns for the "Details" view of the resource editor + + + {0} x {1} + {0} x {1} + Format string for showing a graphic's size + +# {0} = width (as an integer) +# {1} = height (as an integer) +#Example, for a bitmap of width=123, height = 456, the English version of this string would be "123x456" + + + {0} KB + {0} KB + #Format string for showing a file's size +# {0} = length in kilobytes + + + {0} byte(s) + {0} B + Format string for showing a file's size. +{0} = length in bytes + + + Strings + Ciągi + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + Images + Obrazy + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + Icons + Ikony + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + Audio + Audio + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + Files + Pliki + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + Other + Inne + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + &Add + &Dodaj + Add, Delete and Views button text in the main ToolStrip + + + &Remove + &Usuń + Add, Delete and Views button text in the main ToolStrip + + + &Views + &Widoki + Add, Delete and Views button text in the main ToolStrip + + + &Existing File... + &Istniejący plik... + Menu items under the "Add" button + + + New &String + Nowy &ciąg + Menu items under the "Add" button + + + New &Image + Nowy &obraz + Menu items under the "Add" button + + + &PNG Image... + Obraz &PNG... + Menu items under the "Add" button + + + &BMP Image... + Obraz &BMP... + Menu items under the "Add" button + + + &GIF Image... + Obraz &GIF... + Menu items under the "Add" button + + + &JPEG Image... + Obraz &JPEG... + Menu items under the "Add" button + + + &TIFF Image... + Obraz &TIFF... + Menu items under the "Add" button + + + New I&con... + Nowa i&kona... + Menu items under the "Add" button + + + New &Text File... + Nowy plik &tekstowy... + Menu items under the "Add" button + + + Windows Bitmap + Mapa bitowa Windows + Friendly Image types + + + EXIF Image + Obraz EXIF + Friendly Image types + + + Graphics Interchange Format + Format wymiany grafiki GIF + Friendly Image types + + + JPEG File Interchange Format + Format wymiany plików JPEG + Friendly Image types + + + Windows Bitmap + Mapa bitowa Windows + Friendly Image types + + + Portable Network Graphics + Przenośna grafika sieciowa PNG + Friendly Image types + + + Tag Image File Format + Znacznikowy format pliku obrazu TIF + Friendly Image types + + + Icon + Ikona + Friendly Image types + + + Text File + Plik tekstowy + Friendly Image types + + + Binary File + Plik binarny + + + + Wave Sound + Dźwięk typu wave + Friendly Image types + + + Linked at compile time + Połączone w czasie kompilacji + File Persistence Mode + + + Embedded in .resx + Osadzone w pliku resx + File Persistence Mode + + + Bitmaps + Mapy bitowe + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Icons + Ikony + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Audio + Audio + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Text Files + Pliki tekstowe + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + All Files + Wszystkie pliki + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Windows Bitmap + Mapa bitowa Windows + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Portable Network Graphics + Przenośna grafika sieciowa PNG + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Graphics Interchange Format + Format wymiany grafiki GIF + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + JPEG File Interchange Format + Format wymiany plików JPEG + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Tag Image File Format + Znacznikowy format pliku obrazu TIF + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Icon + Ikona + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + &List + &Lista + Resource editor listview view styles (like changing the view style of a folder in Windows XP) + + + &Details + &Szczegóły + Resource editor listview view styles (like changing the view style of a folder in Windows XP) + + + &Thumbnail + &Miniatura + Resource editor listview view styles (like changing the view style of a folder in Windows XP) + + + Managed Resources Editor + Edytor zarządzanych zasobów + + + + Add existing file to resources + Dodawanie istniejącego pliku do zasobów + + + + Import file into resource '{0}' + Importowanie pliku do zasobu „{0}” + {0} = Name of resource being imported into + + + Export resource '{0}' to file + Eksportowanie zasobu „{0}” do pliku + {0} = Name of resource being exported from + + + Please specify where to save the new file + Określanie lokalizacji zapisu nowego pliku + + + + The file '{0}' already exists. Do you want to replace it? + Plik „{0}” już istnieje. Czy chcesz go zastąpić? + {0} = full file path and name + + + The following files already exist. Do you want to replace them? + Następujące pliki już istnieją. Czy chcesz je zastąpić? + + + + Select a folder in which to export the resources. + Wybierz folder, do którego zostaną wyeksportowane zasoby. + + + + Do you want to continue anyway? + Czy chcesz kontynuować mimo to? + + + + Do you want to enable strongly-typed resource generation for this file? + Czy chcesz włączyć generowanie zasobów z jednoznacznie określonymi typami dla tego pliku? + + + + Resource '{0}' could not be loaded because the file to which it is linked could not be found: {1}. + Nie można załadować zasobu „{0}”, ponieważ nie można odnaleźć pliku, z którym jest on połączony: {1}. + {0} = resource name that had the error, {1} = file path/name that could not be found + + + Resource '{0}' could not be instantiated. {1} + Nie można utworzyć wystąpienia zasobu „{0}”. {1} + {0} = resource name that had the error, {1} = extended error information + + + Resource '{0}' has a name that is not recommended and that may cause compilation errors in your code. Please choose another name. + Nazwa zasobu „{0}” nie jest zalecana i może powodować błędy kompilacji w kodzie. Wybierz inną nazwę. + {0} = resource name that had the error + + + Unable to set the Custom Tool or Custom Tool Namespace properties of this file in order to change strongly-typed resource generation options. If the project file is checked in, try checking it out. + Nie można ustawić właściwości niestandardowego narzędzia lub przestrzeni nazw niestandardowego narzędzia dla tego pliku w celu zmiany opcji generowania zasobu z jednoznacznie określonymi typami. Jeśli plik projektu jest zaewidencjonowany, spróbuj go wyewidencjonować. + One possible source for this error is that source code control checkout failed or was canceled. + + + Double-click here to enable strongly-typed resources for this file. + Kliknij dwukrotnie tutaj, aby włączyć zasoby z jednoznacznie określonymi typami dla tego pliku. + + + + The resource name '{0}' is not a valid identifier. + Nazwa zasobu „{0}” nie jest prawidłowym identyfikatorem. + + + + {0} - Codepage {1} + {0} — strona kodowa {1} + {0} = encoding name (e.g., "Western European (Windows)"), {1} = code page # (e.g., 85001) + + + (Default) + (Domyślne) + + + + Change resource name + Zmień nazwę zasobu + + + + Add {0} new resource(s) + Dodaj nowe zasoby ({0}) + {0} = number of resources added + + + Remove {0} resource(s) + Usuń zasoby ({0}) + {0} = number of resources removed + + + Delete values in {0} cell(s) + Usuń wartości w komórkach ({0}) + {0} = number of cells cleared + + + &Categories: + &Kategorie: + The label in the menu strip for the combobox that holds the categories of resources to display + + + Name used to identify the resource in code. + Nazwa używana do identyfikacji zasobu w kodzie. + + + + Additional information about the resource. This property is only meaningful at design time. + Dodatkowe informacje na temat zasobu. Ta właściwość ma znaczenie tylko podczas projektowania. + + + + Character encoding of the file. + Kodowanie znaków pliku + + + + The path to the linked resource. + Ścieżka do połączonego zasobu. + + + + Specifies whether the file resource is text or binary. + Określa czy plik zasobu jest tekstowy czy binarny. + + + + Specifies whether the resource is embedded or linked. Embedded resources are saved in the resource file. Linked resources reside in an external location on disk. + Określa, czy zasób jest osadzony, czy połączony. Zasoby osadzone są zapisywane w pliku zasobów. Zasoby połączone znajdują się w zewnętrznej lokalizacji na dysku. + + + + The resource will be generated as this type in the strongly-typed resource class. For example, the resource might be generated as a String or Bitmap object. + Zasób zostanie wygenerowany w formie tego typu w klasie zasobu z jednoznacznie określonymi typami. Na przykład zasób może zostać wygenerowany jako obiekt String lub Bitmap. + + + + The value of the resource. + Wartość zasobów. + + + + Unable to add a '{0}' folder to this project. + +{1} + Nie można dodać folderu „{0}” do tego projektu. + +{1} + {0} = name of folder trying to add (by default, this will be "Resources"), {1} = additional error information + + + Unable to add '{0}' to the project. + +{1} + Nie można dodać pliku '{0}' do projektu. + +{1} + {0} = file name and path, {1} = additional error information. + + + Unable to add '{0}' to the project. + Nie można dodać pliku '{0}' do projektu. + {0} = file name and path + + + A file with the name '{0}' already exists. Do you want to replace it? + Plik o nazwie „{0}” już istnieje. Czy chcesz go zastąpić? + {0} = file name and path + + + {0} - Destination File Exists + {0} — Plik docelowy istnieje + {0} = Name of the editor, e.g. "Managed Resources Editor" or "Resource Picker" + + + There is already a linked file with the name "{0}" in the project folder "{1}". Do you want to remove it? + W folderze projektu „{1}” istnieje już plik połączony o nazwie „{0}”. Czy chcesz go usunąć? + {0} = file name (no path), {1} = Path of resource folder + + + {0} - Destination File Exists + {0} — Plik docelowy istnieje + {0} = Name of the editor, e.g. "Managed Resources Editor" or "Resource Picker" + + + Cannot find the file '{0}'. It may have been moved or deleted. + Nie można odnaleźć pliku „{0}”. Mógł on zostać przeniesiony lub usunięty. + {0} = file name and path + + + Connection string + Parametry połączenia + Added as the last item in the list of available types to let the user browse for a new type + + + Web Service URL + Adres URL usługi sieci Web + Added as the last item in the list of available types to let the user browse for a new type + + + Browse... + Przeglądaj... + Added as the last item in the list of available types to let the user browse for a new type + + + Application + Aplikacja + + + + Application (Web) + Aplikacja (sieć Web) + + + + User + Użytkownik + + + + User (Web) + Użytkownik (sieć Web) + + + + Name + Nazwa + + + + Type + Typ + + + + Scope + Zakres + + + + Value + Wartość + + + + Type '{0}' is not defined. + Typ „{0}” nie jest zdefiniowany. + + + + Name changed + Zmieniono nazwę + + + + Type changed + Zmieniono typ + + + + Scope changed + Zmieniono zakres + + + + Roaming changed + Zmieniono roaming + + + + Description changed + Zmieniono opis + + + + Provider changed + Zmieniono dostawcę + + + + Value changed + Zmieniono wartość + + + + Generate default value in code changed + Zmieniono generowanie wartości domyślnej w kodzie + + + + Remove {0} setting(s) + Usuń ustawienia ({0}) + + + + Unable to load settings file. It might be corrupted or contain invalid XML or contain duplicate identifiers. + Nie można załadować pliku ustawień. Plik może być uszkodzony lub zawierać nieprawidłowy kod XML bądź zduplikowane identyfikatory. + + + + New values from the app.config file were automatically added + Dodano automatycznie nowe wartości z pliku app.config + + + + Value of setting '{0}' was changed in the app.config file. + Zmieniono wartość ustawienia '{0}' w pliku app.config. + + + + The current value in the .settings file is '{0}' +The new value in the app.config file is '{1}' + +Do you want to update the value in the .settings file? + Bieżąca wartość w pliku settings to „{0}” +Nowa wartość w pliku app.config to „{1}” + +Czy chcesz zaktualizować wartość w pliku settings? + + + + An error occurred while reading the app.config file. The file might be corrupted or contain invalid XML. + Wystąpił błąd podczas odczytywania pliku app.config. Plik może być uszkodzony lub zawierać nieprawidłowy kod XML. + + + + An error occurred while saving values to the app.config file. The file might be corrupted or contain invalid XML. + Wystąpił błąd podczas zapisywania wartości w pliku app.config. Plik może być uszkodzony lub zawierać nieprawidłowy kod XML. + + + + There is already another setting with the name '{0}'. + Istnieje już inne ustawienie o nazwie '{0}'. + + + + '{0}' is not a valid identifier. + „{0}” nie jest prawidłowym identyfikatorem. + + + + '{0}' is not a valid type name. + '{0}' nie jest prawidłową nazwą typu. + + + + The setting name cannot be empty. + Nazwa ustawienia nie może być pusta. + + + + '{0}' cannot be converted to an instance of type '{1}'. + Nie można przekonwertować elementu „{0}” na wystąpienie typu „{1}”. + + + + Generic types are not supported. + Typy rodzajowe nie są obsługiwane. + + + + Abstract types are not supported. + Typy abstrakcyjne nie są wspomagane. + + + + The current object is auto-generated and only supports renaming through the Settings Designer. + Bieżący obiekt został wygenerowany automatycznie i obsługuje zmianę nazwy tylko przez Projektanta ustawień. + + + + The current object is auto-generated and does not support modifying parameters. + Bieżący obiekt został wygenerowany automatycznie i nie obsługuje parametrów modyfikujących. + + + + The settings file cannot be modified at this time. + W tej chwili nie można zmodyfikować pliku ustawień. + + + + &Add Setting + &Dodaj ustawienie + + + + R&emove Setting + U&suń ustawienie + + + + Application settings allow you to store and retrieve property settings and other information for your application dynamically. For example, the application can save a user's color preferences, then retrieve them the next time it runs. + Ustawienia aplikacji umożliwiają dynamiczne przechowywanie i pobieranie ustawień właściwości i innych informacji dla aplikacji. Na przykład aplikacja może zapisać preferencje kolorów dla użytkownika i pobrać je przy następnym uruchomieniu. + + + + Learn more about application settings... + Dowiedz się więcej o ustawieniach aplikacji… + + + + This connection string appears to contain sensitive data (for example, a password), which is required to connect to the database. However, storing sensitive data in the connection string can be a security risk. Do you want to include sensitive data in the connection string? + Ten ciąg połączenia prawdopodobnie zawiera dane poufne (na przykład hasło) wymagane do nawiązania połączenia z bazą danych. Przechowywanie danych poufnych w ciągu połączenia może stanowić zagrożenie bezpieczeństwa. Czy chcesz, aby dane poufne były zawarte w parametrach połączenia? + + + + Select a Type + Wybierz typ + + + + This class allows you to handle specific events on the settings class: + Ta klasa umożliwia obsługę określonych zdarzeń w klasie ustawień: + Comments for user part of extending generated settings class + + + The SettingChanging event is raised before a setting's value is changed. + Zdarzenie SettingChanging jest wywoływane przed zmianą wartości ustawień. + + + + The PropertyChanged event is raised after a setting's value is changed. + Zdarzenie PropertyChanged jest wywoływane po zmianie wartości ustawień. + + + + The SettingsLoaded event is raised after the setting values are loaded. + Zdarzenie SettingsLoaded jest wywoływane po załadowaniu wartości ustawień. + + + + The SettingsSaving event is raised before the setting values are saved. + Zdarzenie SettingsSaving jest wywoływane przed zapisaniem wartości ustawień. + + + + To add event handlers for saving and changing settings, uncomment the lines below: + Aby dodać obsługę zdarzeń dla zapisu i zmiany ustawień, należy usunąć komentarz w poniższych wierszach: + + + + Add code to handle the SettingChangingEvent event here. + Dodaj tutaj kod obsługi zdarzenia SettingChangingEvent. + + + + Add code to handle the SettingsSaving event here. + Dodaj tutaj kod obsługi zdarzenia SettingsSaving. + + + + Failed to create or open file. + Nie można utworzyć lub otworzyć pliku. + + + + Description of the setting. + Opis ustawienia. + + + + Specifies whether or not the default setting value should be generated in the strongly-typed settings class. + Określa, czy domyślna wartość ustawień powinna zostać wygenerowana w klasie ustawień z jednoznacznie określonymi typami. + + + + Specifies the group to which this Settings file belongs. + Określa grupę, do której należy plik ustawień. + + + + Description of the group to which this Settings file belongs. + Opis grupy, do której należy plik ustawień. + + + + Indicates whether the setting should roam when Windows roaming profiles are enabled. + Wskazuje, czy ustawienie powinno mieć roaming, gdy włączone są profile roamingu systemu Windows. + + + + Name used to identify the setting. + Nazwa używana do identyfikacji ustawienia. + + + + The provider (System.Configuration.Provider.ProviderBase) used to manage the setting. + Dostawca (System.Configuration.Provider.ProviderBase) używany do zarządzania ustawieniem. + + + + Specifies whether the setting is per-application (read-only) or per-user (read-write). + Określa czy ustawienie dotyczy aplikacji (tylko do odczytu) czy użytkownika (do odczytu/zapisu). + + + + The setting will be generated as this type in the strongly-typed settings class. For example, the setting might be generated as a String or Integer object. + Ustawienie zostanie wygenerowane w formie tego typu w klasie zasobu z jednoznacznie określonymi typami. Na przykład ustawienie może zostać wygenerowane jako obiekt String lub Integer. + + + + The current value for the setting. + Bieżąca wartość ustawienia. + + + + The following files will be deleted: + +{0} + Następujące pliki zostaną usunięte: + +{0} + Synchronize with user.config file + + + No user.config files were found in any of the following locations: + +{0} + Nie odnaleziono plików user.config w żadnej z następujących lokalizacji: + +{0} + + + + One or more user.config files was not removed. + Nie usunięto jednego lub więcej plików user.config. + + + + My.Settings Auto-Save Functionality + Funkcje automatycznego zapisywania My.Settings + in-code comment used to generate a region that hides My.Settings AutoSave functionality + + + Unable to find service '{0}'. Ensure that the application is installed correctly. + Nie można odnaleźć usługi „{0}”. Upewnij się, że aplikacja jest poprawnie zainstalowana. + Settings Global-Object-Provider Strings + + + Default pac&kage: + Pa&kiet domyślny: + J# Specific String for Root Namespace + + + (Custom) + (Niestandardowy) + Entry in the "Accessibility dropdown" + + + No code generation + Brak generowania kodu + Entry in the "Accessibility dropdown" + + + WPF Application + Aplikacja WPF + + + + (Invalid value: "{0}") + (Nieprawidłowa wartość: „{0}”) + Goes into the ShutdownMode combobox + + + On explicit shutdown + Przy jawnym zamykaniu + + + + On last window close + Przy zamknięciu ostatniego okna + + + + On main window close + Przy zamknięciu głównego okna + + + + Could not find the expected root element "{0}" in the application definition file. + Nie można odnaleźć oczekiwanego elementu korzenia "{0}" w pliku definicji aplikacji. + + + + The .xaml file was in an unexpected format, near line {0} column {1}. + Plik xaml ma nieoczekiwany format w pobliżu wiersza {0} i kolumny {1}. + + + + Startup &object: + Obiekt &uruchomieniowy: + + + + Startup &URI: + Początkowy identyfikator &URI: + + + + The application definition file is already opened in an incompatible editor. Please close the other editor and reload the project properties page. + Plik definicji aplikacji jest już otwarty w niezgodnym edytorze. Zamknij inny edytor i załaduj ponownie stronę właściwości projektu. + + + + There was an error trying to open or create the application definition file for this project. {0} + Wystąpił błąd podczas próby otwarcia lub utworzenia pliku definicji aplikacji dla tego projektu. {0} + + + + An error occurred trying to load the application definition file for this project. The file '{0}' could not be parsed. Please edit the file in the XAML editor to fix the error. + Wystąpił błąd podczas próby załadowania pliku definicji aplikacji dla tego projektu. Nie można przeanalizować pliku „{0}”. Zmodyfikuj plik w edytorze XAML, aby naprawić ten błąd. + + + + (Error) + (Błąd) + Used inside UI elements when there is an error (e.g. combobox text) + + + An unspecified error has occurred. + Wystąpił nieokreślony błąd. + + + + This project does not contain an application definition file. + Ten projekt nie zawiera pliku definicji aplikacji. + + + + An error occurred trying to create the application events file. {0} + Wystąpił błąd podczas próby utworzenia pliku zdarzeń aplikacji. {0} + + + + Invalid argument '{0}' + Nieprawidłowy argument. „{0}” + {0} = name of invalid argument + + + WPF Console Application + Aplikacja konsoli WPF + + + + WPF Class Library + Biblioteka klas WPF + + + + Embed manifest with default settings + Osadź manifest w ustawieniach domyślnych + + + + Create application without a manifest + Utwórz aplikację bez manifestu + + + + Invalid manifest file. + Nieprawidłowy plik manifestu. + + + + Services + Usługi + + + + Client application services enable your Windows-based applications to use the ASP.NET login (authentication), roles, and profile (settings) services. + Usługi aplikacji klienta w aplikacjach dla systemu Windows pozwalają używać funkcji logowania (uwierzytelniania), ról i usług profili (ustawień) środowiska ASP.NET. + + + + Learn more about client application services... + Dowiedz się więcej o usługach aplikacji klienta... + + + + Advanced Settings for Services + Zaawansowane ustawienia dla usług + + + + Disabling application services will clear the default services for Authentication, Roles, and Settings. Click OK to disable application services. + Wyłączenie usług aplikacji spowoduje wyczyszczenie domyślnych usług dla uwierzytelniania, ról i ustawień. Kliknij przycisk OK, aby wyłączyć usługi aplikacji. + + + + Disable Application Services + Wyłącz usługi aplikacji + + + + seconds + sekundy + + + + minutes + minuty + + + + hours + godziny + + + + days + dni + + + + To enable client application services, you must set the Target Framework for your application to .NET Framework 3.5 or later. In C#, you can do this on the Application property page. In Visual Basic, you can do this one the Compile property page by clicking Advanced Compile Options. + Aby włączyć usługi aplikacji klienta, ustaw docelową strukturę aplikacji na program .NET Framework 3.5 lub nowszy. W języku C# można to zrobić na stronie właściwości aplikacji. W języku Visual Basic można to zrobić na stronie właściwości kompilacji po kliknięciu opcji Zaawansowane opcje kompilacji. + + + + An error occurred while reading the Application configuration file. The file might be corrupted or contain invalid XML. + Wystąpił błąd podczas odczytu pliku konfiguracji aplikacji. Plik może być uszkodzony lub zawierać nieprawidłowy kod XML. + + + + The URL is invalid. Please enter a valid URL like http://microsoft.com/services + Adres URL jest nieprawidłowy. Wprowadź poprawny adres URL, np. http://microsoft.com/services + + + + A service URL in the application configuration file is not in the expected format. + Adres URL usługi w pliku konfiguracyjnym aplikacji ma nieoczekiwany format. + + + + Authentication, Roles and Web Settings providers have been configured via the Application configuration file such that they do not share a common connection string. + Dostawców uwierzytelniania, ról i ustawień sieci Web skonfigurowano za pomocą pliku konfiguracyjnego aplikacji tak, że nie współdzielą one wspólnych parametrów połączenia. + + + + Specify a connection string to a SQL Server database, or use the special connection string "Data Source = |SQL/CE|", which causes SQL Server Compact to generate local database files for offline storage. + Określ parametry połączenia bazy danych serwera SQL lub użyj specjalnych parametrów połączenia "Data Source = |SQL/CE|", które powodują, że SQL Server Compact wygeneruje lokalne pliki bazy danych dla magazynu offline. + + + + The following type names were not understood: '{0}'. Make sure you have references to these types. + Następujące nazwy typów są niezrozumiałe: „{0}”. Upewnij się, że istnieją odwołania do tych typów. + + + + There are already settings with the following names: {0}. + Istnieją już ustawienia o następujących nazwach: {0}. + + + + The username/password combination cannot be authenticated. + Kombinacja nazwa użytkownika/hasła nie może być uwierzytelniona. + + + + Windows Forms Application + Aplikacja Windows Forms + The "Windows Forms" distinguishes it from a WPF application + + + Namespace of the service reference. + Przestrzeń nazw odwołania do usługi + + + + Service Reference Properties + Właściwości odwołania do usługi + + + + Metadata Location Url + Adres URL metadanych + + + + Metadata Location + Lokalizacja metadanych + + + + A service reference with multiple source urls is not supported. + Odwołanie do usługi z wieloma źródłowymi adresami URL nie jest obsługiwane. + + + + Cannot change reference Url to empty. The reference url must be a valid URL. + Nie można zmienić adresu URL odwołania na pusty. Adres URL odwołania musi być prawidłowy. + + + + One or more files were reloaded during the checkout. Please retry your operation. + Co najmniej jeden plik został ponownie załadowany podczas wyewidencjonowywania. Ponów próbę wykonania operacji. + + + + The project was reloaded, and some changes on this page may have been lost. + Projekt został ponownie załadowany i niektóre zmiany na tej stronie mogły zostać utracone. + + + + The application will fail to run in the selected zone because of this requested elevated permission. Click the help link above for more info. + Uruchomienie aplikacji w wybranej strefie zakończy się niepowodzeniem ze względu na wymagane podniesione uprawnienia. Kliknij powyższy link pomocy, aby uzyskać więcej informacji. + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.pt-BR.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.pt-BR.xlf new file mode 100644 index 00000000000..c59226370a4 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.pt-BR.xlf @@ -0,0 +1,2948 @@ + + + + + + All Files + Todos os Arquivos + + + + Property Page + Página de Propriedades + + + + References + Referências + + + + Version + Versão + + + + Signing + Assinatura + + + + Application + Aplicativo + + + + Compile + Compilar + + + + Debug + Depurar + + + + Deploy + Implantar + + + + Database + Banco de Dados + + + + Security + Segurança + + + + Build + Build + + + + Build Events + Eventos de Build + + + + Reference Paths + Caminhos de Referência + + + + Pre-build Event Command Line + Linha de Comando de Eventos Pré-build + + + + Post-build Event Command Line + Linha de Comando de Eventos Pós-build + + + + The output path is not trusted. +The application may throw security exceptions when it attempts to perform actions which require full trust. +Click OK to ignore and continue. Click CANCEL to choose a different output path. + O caminho de saída não é confiável. +O aplicativo pode lançar exceções de segurança quando ele tenta executar ações que exigem confiança total. +Clique em OK para ignorar e continuar. Clique em CANCELAR para escolher um caminho de saída diferente. + + + + <Browse...> + <Procurar...> + + + + (None) + (Nenhum) + + + + <New...> + <Novo...> + + + + <Browse...> + <Procurar...> + + + + (None) + (Nenhum) + + + + Active ({0}) + Ativo ({0}) + + + + All Configurations + Todas as Configurações + + + + All Platforms + Todas as Plataformas + + + + N/A + N/A + This is used in the platform and configuration comboboxes when showing pages that don't care about the current platform/configuration + + + Could not find the configuration '{0}' for platform '{1}'. + Não foi possível encontrar a configuração '{0}' para a plataforma '{1}'. + + + + (None) + (Nenhum) + + + + Select File + Selecionar Arquivo + + + + Add existing file to project + Adicionar arquivo existente ao projeto + + + + Icon Files + Arquivos de Ícone + + + + Executable Files + Arquivos Executáveis + + + + Select Working Directory + Selecionar Diretório de Trabalho + + + + Select Output Path + Selecionar Caminho de Saída + + + + Select Reference Path + Selecionar Caminho de Referência + + + + Win32 Resource Files + Arquivos de Recursos do Win32 + + + + Add Win32 resource file to project + Adicionar arquivo de recurso Win32 ao projeto + + + + Folder path does not exist. +Please select a valid folder path. + O caminho da pasta não existe. +Selecione um caminho da pasta válido. + + + + Advanced Compiler Settings + Configurações Avançadas do Compilador + + + + Advanced Build Settings + Configurações Avançadas de Build + + + + Compiler Warnings + Avisos do Compilador + + + + Reference Paths + Caminhos de Referência + + + + Compatible Settings + Configurações Compatíveis + + + + Assembly Information + Informações do Assembly + + + + Invalid version format, expected "[Major]", "[Major].[Minor]", "[Major].[Minor].[Build]" or "[Major].[Minor].[Build].[Revision]" + Formato de versão inválido, esperava-se "[Major]", "[Major].[Minor]", "[Major].[Minor].[Build]" ou "[Major].[Minor].[Build].[Revision]" + + + + A wildcard ("*") is not allowed in this field. + Não é permitido o uso de um curinga (" *") neste campo. + + + + Each part of the version number for '{0}' must be an integer between 0 and {1}. + Cada parte do número de versão de '{0}' deve ser um inteiro entre 0 e {1}. + + + + (Default Icon) + (Ícone Padrão) + + + + Startup object must be a form when 'Enable application framework' is checked. + O objeto de inicialização deve ser um formulário quando a opção 'Habilitar estrutura de aplicativo' estiver selecionada. + + + + (Not set) + (Não definido) + + + + Icon could not be added to the project. + O ícone não pôde ser adicionado ao projeto. + + + + Invalid icon file. + Arquivo de ícone inválido. + + + + {0} is not a valid icon file. + {0} não é um arquivo de ícone válido. + + + + The GUID should match the format dddddddd-dddd-dddd-dddd-dddddddddddd. + O GUID deve ter o formato dddddddd-dddd-dddd-dddd-dddddddddddd. + + + + NOTE: This file is auto-generated; do not modify it directly. To make changes, + OBSERVAÇÃO: Esse arquivo é gerado automaticamente; não o modifique diretamente. Para fazer alterações, + These comments are placed in the ApplicationEvents.vb file if it is generated by the project designer. The same comments appear in the templates, under vsproject\Templates\Windows\VisualBasic\ProjectTemplates\WindowsApplication\MyEvents.vb (MyEvents.vb is renamed to ApplicationEvents.vb after project creation), and these comments should be kept in sync + + + or if you encounter build errors in this file, go to the Project Designer + ou se você encontrar erros de compilação neste arquivo, vá para o Designer de Projeto + + + + (go to Project Properties or double-click the My Project node in + (vá para Propriedades do Projeto ou clique duas vezes no nó Meu Projeto em + + + + Solution Explorer), and make changes on the Application tab. + Gerenciador de Soluções) e faça as alterações na guia Aplicativo. + + + + '{0}' is not a valid identifier. Please select a different Startup form. + '{0}' não é um identificador válido. Selecione um formulário de Inicialização diferente. + + + + '{0}' is not a valid identifier. Please select a different Splash screen form. + '{0}' não é um identificador válido. Selecione um formulário de Tela Inicial diferente. + + + + The splash screen form cannot be the start-up form. + O formulário de tela inicial não pode ser o formulário de inicialização. + + + + Startup f&orm: + F&ormulário de Inicialização: + + + + The following events are available for MyApplication: + Os seguintes eventos estão disponíveis para MyApplication: + + + + Startup: Raised when the application starts, before the startup form is created. + Inicialização: Ocorre quando o aplicativo é iniciado, antes da criação do formulário de inicialização. + + + + Shutdown: Raised after all application forms are closed. This event is not raised if the application terminates abnormally. + Desligamento: Ocorre após todos os formulários de aplicativo serem fechados. Esse evento não ocorrerá se o aplicativo for encerrado de forma anormal. + + + + UnhandledException: Raised if the application encounters an unhandled exception. + UnhandledException: Ocorre se o aplicativo encontra uma exceção sem tratamento. + + + + StartupNextInstance: Raised when launching a single-instance application and the application is already active. + StartupNextInstance: Ocorre durante a inicialização de um aplicativo de instância única quando o aplicativo já está ativo. + + + + NetworkAvailabilityChanged: Raised when the network connection is connected or disconnected. + NetworkAvailabilityChanged: Ocorre quando a conexão de rede é conectada ou desconectada. + + + + Base address must be a hexadecimal number with less than or equal to 8 digits, for example, 0x11000000. + O endereço base deve ser um número hexadecimal com 8 ou menos dígitos, por exemplo, 0x11000000. + + + + None + Nenhum + + + + Warning + Aviso + + + + Error + Erro + + + + (custom) + (personalizado) + + + + Implicit conversion + Conversão implícita + + + + Late binding; call could fail at run time + Associação tardia; a chamada poderia falhar em tempo de execução + + + + Implicit type; object assumed + Tipo implícito, objeto presumido + + + + Use of variable prior to assignment + Uso da variável antes da atribuição + + + + Function/Operator without return value + Função/Operador sem valor de retorno + + + + Unused local variable + Variável local não usada + + + + Instance variable accesses shared member + A variável de instância acessa o membro compartilhado + + + + Recursive operator or property access + Operador recursivo ou acesso de propriedade + + + + Duplicate or overlapping catch blocks + Duplicar ou sobrepor blocos de captura + + + + The warning settings for one or more configurations conflict. +Changing this setting will reset the settings in all configurations. + As configurações de aviso para um ou mais conflitos de configurações. +A alteração dessa configuração redefinirá as definições em todas as configurações. + + + + When startup form closes + Quando o formulário de inicialização fechar + + + + When last form closes + Quando o último formulário fechar + + + + Windows + Windows + Authentication modes + + + Application-defined + Definido pelo aplicativo + Authentication modes + + + Cancel + Cancelar + + + + &Calculate Permissions + &Calcular Permissões + + + + Stopped... + Parado... + + + + Starting... + Iniciando... + + + + Building... + Compilando... + + + + Analyzing... + Analisando... + + + + Analyze Failed + Falha na Análise + + + + Aborting... + Anulando... + + + + Canceling... + Cancelando... + + + + Internet + Internet + + + + Local Intranet + Intranet Local + + + + (Custom) + (Personalizado) + Don't use + + + (Zone Default) + (Zona Padrão) + + + + Include + Incluir + + + + Exclude + Excluir + + + + The application will require elevated permissions to run in the selected zone. Click the help link above for more info. + O aplicativo exigirá permissões de nível elevado para que possa ser executado na zona selecionada. Clique no link de ajuda acima para obter mais informações. + + + + This permission could not be loaded. Press the delete key to remove it from your project. + Não foi possível carregar essa permissão. Pressione a tecla Excluir para removê-la do projeto. + Don't use + + + Included + Incluído + + + + Permission + Permissão + + + + Setting + Configuração + + + + Specify the code access security permissions that your ClickOnce application requires in order to run. Learn more about code access security... + Especifique as permissões de segurança de acesso do código exigidas pelo seu aplicativo ClickOnce para que ele possa ser executado. Saiba mais sobre a segurança de acesso do código... + + + + Learn more about code access security... + Saiba mais sobre a segurança de acesso do código... + + + + Invalid value + Valor inválido + + + + The SecurityPermission must be included in your application with the Execute flag set or your application will not run. Mark this permission as "Zone Default" or "Include." + A SecurityPermission deverá estar incluída em seu aplicativo com o sinalizador Execute definido ou o aplicativo não será executado. Marque esta permissão como "Padrão de Zona" ou "Incluir". + + + + The SecurityPermission must be included in your application with the Execute flag set or your application will not run. The Execute flag has been added to the SecurityPermission in your manifest. + A SecurityPermission deverá estar incluída em seu aplicativo com o sinalizador Execute definido ou o aplicativo não será executado. O sinalizador Execute foi adicionado à SecurityPermission no manifesto. + + + + This application requires full trust to run correctly. Would you like to set this as a full trust application? + Este aplicativo requer confiança total para ser executado corretamente. Gostaria de defini-lo como um aplicativo de confiança total? + + + + Full Trust Required + Confiança Total Obrigatória + + + + An error occurred and the app.manifest file could not be saved. +Error: + Ocorreu um erro e não foi possível salvar o arquivo app.manifest. +Erro: + + + + An error occurred and the app.manifest file could not be loaded. Please remove any changes you have made to the file and reload the Security property page again. + Ocorreu um erro e não foi possível carregar o arquivo app.manifest. Remova todas as alterações feitas no arquivo e recarregue a página de propriedades de Segurança. + + + + Included + Incluído + + + + Not Included + Não Incluído + + + + Included with warning + Incluído com aviso + + + + Calculating permissions failed. + Falha ao calcular as permissões. + + + + Error + Erro + + + + Advanced Security Settings + Configurações de Segurança Avançadas + + + + Build Failed. Click CANCEL and correct the build failure before analyzing again. + Falha no build. Clique em CANCELAR e corrija a falha de build antes de analisar novamente. + + + + Build completed... + Build concluído... + + + + Unable to start the build. + Não é possível iniciar a compilação. + + + + Serious error. The build must begin in order to analyze permissions. It has not started. + Erro grave. O build deve começar para analisar permissões. Ele não começou. + Don't use + + + (Custom) + (Personalizado) + Don't use + + + (None) + (Nenhum) + + + + Selecting existing key file + Selecionando arquivo de chave existente + + + + Key Files + Arquivos de Chave + + + + Create key file + Criar arquivo de chave + + + + The old password is invalid. + A senha antiga é inválida. + + + + Enter the old password. + Insira a senha antiga. + + + + Enter a new password. + Insira uma nova senha. + + + + The new passwords do not match. Enter the password again. + As novas senhas não coincidem. Insira a senha novamente. + + + + The new password must be at least 6 characters in length. Enter the password again. + A nova senha deve ter pelo menos seis caracteres. Insira a senha novamente. + + + + Select a Certificate + Selecionar um certificado + + + + Select a certificate to sign your ClickOnce manifests + Selecione um certificado para assinar seus manifestos ClickOnce + + + + Certificate Files + Arquivos de Certificado + + + + Issued To + Emitido Para + + + + Issued By + Emitido Por + + + + Intended Purpose + Finalidade + + + + Expiration Date + Data de Vencimento + + + + The password is invalid. + A senha é inválida. + + + + Invalid password + Senha inválida + + + + The selected file does not contain a private key. You must choose a certificate that contains a private key. + O arquivo selecionado não contém uma chave privada. Você deve selecionar um certificado que contém uma chave privada. + + + + Invalid key + Chave inválida + + + + Certificate Creation Error + Erro de Criação de Certificado + + + + <All> + <Tudo> + + + + The passwords do not match. + As senhas não coincidem. + + + + Enter a password. + Insira uma senha. + + + + Confirm the password. + Confirme a senha. + + + + (none) + (nenhum) + + + + Enter password to open file + Digite a senha para abrir o arquivo + + + + Enter &password to open file {0} + Insira a senha &para abrir o arquivo {0} + + + + Enter &password for new file {0} + Insira a senha &para o novo arquivo {0} + + + + The project already contains a file with that name. Choose another certificate file or rename the file in your project. + O projeto já contém um arquivo com este nome. Escolha outro arquivo de certificado ou renomeie o arquivo em seu projeto. + + + + The file '{0}' could not be imported: {1} + Não foi possível importar o arquivo '{0}': {1} + + + + _TemporaryKey.pfx + _TemporaryKey.pfx + + + + The selected certificate is not valid for code signing. Choose another certificate file. + O certificado selecionado não é válido para assinatura de código. Escolha outro arquivo de certificado. + + + + Change property: {0} + Alterar propriedade: {0} + + + + Windows Application + Aplicativo do Windows + + + + Windows Service + Serviço Windows + + + + Class Library + Biblioteca de Classes + + + + Console Application + Aplicativo do Console + + + + Web Control Library + Biblioteca de Controles da Web + + + + Cannot remove '{0}'. {1} + + Não é possível remover '{0}'. {1} + + + + + Adding or removing '{0}' as a project import failed because of an unexpected error from the project system. The error returned was: '{1}'. + Falha na adição ou na remoção de '{0}' como uma importação de projeto devido a um erro inesperado do sistema de projeto. O erro retornado foi: '{1}'. + + + + Adding web reference failed. {0} + + Falha ao adicionar referência Web. {0} + + + + + Updating web reference '{0}' failed. +{1} + Falha ao atualizar '{0}' de referência Web. +{1} + + + + Web Reference Properties + Propriedades de Referência Web + + + + Static + Estático + + + + Dynamic + Dinâmico + + + + Name of the web reference + Nome da referência Web + + + + URL Behavior + Comportamento da URL + + + + Web reference URL behavior + Comportamento da URL da referência Web + + + + Web Reference URL + URL da Referência Web + + + + Web Reference URL + URL da Referência Web + + + + Reference Properties + Propriedades de Referência + + + + The remote machine name cannot be blank. Please specify the name of the machine to debug remotely. + O nome do computador remoto não pode ficar em branco. Especifique o nome do computador a ser depurado remotamente. + + + + The external program cannot be found. Please enter a valid executable file. + O programa externo não foi encontrado. Insira um arquivo executável válido. + + + + The external program property cannot be empty. Please enter a valid executable file. + A propriedade do programa externo não pode ficar vazia. Insira um arquivo executável válido. + + + + We can only debug an EXE file. Please enter a valid executable file. + Só é possível depurar um arquivo EXE. Insira um arquivo executável válido. + + + + The URL property cannot be empty. Please enter a valid URL. + A propriedade URL não pode ficar vazia. Insira uma URL válida. + + + + The URL is invalid. Please enter a valid URL like "http://www.microsoft.com/" + A URL é inválida. Insira uma URL válida como "http://www.microsoft.com/" + + + + The working directory you entered does not exist. Please enter a valid working directory. + O diretório de trabalho inserido não existe. Insira um diretório de trabalho válido. + + + + <The system cannot find the reference specified> + <O sistema não encontrou a referência especificada> + + + + Unused References + Referências Não Utilizadas + + + + &Remove + &Remover + + + + No unused references + Nenhuma referência não utilizada + + + + Project compilation failed. Cannot determine unused references. + Falha na compilação do projeto. Não é possível determinar as referências não utilizadas. + + + + Gathering list of unused references... + Coletando lista de referências não utilizadas... + + + + Error getting unused references. + Erro ao obter as referências não utilizadas. + + + + Base address must be a hexadecimal number with less than or equal to 8 digits, for example, &H11000000. + O endereço base deve ser um número hexadecimal com 8 ou menos dígitos, por exemplo, &H11000000. + + + + "Resource files must have a .res file extension. Please enter a valid resource file name." + "Os arquivos de recurso devem ter a extensão .res. Insira um nome de arquivo de recurso válido." + + + + "The resource file entered does not exist." + "O arquivo de recurso inserido não existe." + + + + Project Designer + Designer de Projeto + + + + Settings + Configurações + + + + Resources + Recursos + + + + An error occurred trying to load the project properties window. Close the window and try again. +{0} + Erro ao tentar carregar a janela de propriedades do projeto. Feche a janela e tente novamente. +{0} + + + + An error occurred trying to load the page. + Erro ao tentar carregar a página. + + + + The designer cannot be shown because the document for it was never loaded. + Não é possível mostrar o designer, pois o documento para ele não foi carregado. + + + + This project does not contain a default resources file. Click here to create one. + Este projeto não contém um arquivo de recursos padrão. Clique aqui para criar um. + + + + This project does not contain a default settings file. Click here to create one. + Este projeto não contém um arquivo de configurações padrão. Clique aqui para criar um. + + + + Could not find the file '{0}'. + Não foi possível encontrar o arquivo '{0}'. + + + + The file '{0}' is already open in an editor. Please close the file and try again. + O arquivo '{0}' já está aberto em um editor. Feche o arquivo e tente novamente. + + + + All Project Designer Pages + Todas as Páginas de Designer de Projeto + + + + More Settings + Mais Configurações + + + + The requested file type is not supported in projects of this type. + Não há suporte para o tipo de arquivo solicitado em projetos deste tipo. + + + + Assembly Name + Nome do Assembly + + + + Root Namespace + Namespace Raiz + + + + Startup Object + Objeto de Inicialização + + + + Application Icon + Ícone do Aplicativo + Property Friendly Names (for transaction names) - NOTE: All of these are optional + + + Assembly Version + Versão do Assembly + + + + Assembly File Version + Versão do Arquivo do Assembly + + + + Assembly GUID + GUID do Assembly + + + + Enable application framework + Habilitar a estrutura do aplicativo + + + + External Program Path + Caminho do Programa Externo + + + + Start Browser With URL + Iniciar Navegador com URL + + + + Working Directory + Diretório de Trabalho + + + + Remote Machine Name + Nome do Computador Remoto + + + + Project Designer Page Container + Contêiner da Página de Designer de Projeto + + + + Switch Project Designer Page + Mudar a Página de Designer de Projeto + + + + Allow switching between active pages of the project designer (use Ctrl+PageUp and Ctrl+PageDown) + Para alternar entre as páginas ativas do designer de projeto (use Ctrl+PageUp e Ctrl+PageDown) + + + + {0} page: + Página {0}: + {0} = sub page name + + + {0} [Read Only] + {0} [Somente Leitura] + Attach a readonly to the designer caption {0}=Designer caption + + + The editor could not get the IVsTextStream for file {0}. + O editor não pôde obter o IVsTextStream para o arquivo {0}. + #exception {0}=filename + + + The editor could not get the IVsTextStream. + O editor não pôde obter o IVsTextStream. + #exception (no file name) + + + No DesignerService for file '{0}'. + Nenhum DesignerService para o arquivo '{0}'. + #{0}=file name + + + Invalid physical view name. + Nome de exibição físico inválido. + + + + Unable to create text buffer. + Não é possível criar o buffer de texto. + # com exception + + + No LocalRegistry service. + Nenhum serviço LocalRegistry. + #exception + + + Replacing text stream failed:{0} + Falha ao substituir o fluxo de texto: {0} + #exception {0}=err msg + + + Buffer is read only. + O buffer é somente leitura. + + + + File is already opened in an incompatible editor. + O arquivo já está aberto em um editor incompatível. + + + + Unsupported format. + Formato sem suporte. + + + + Unknown Error. + Erro Desconhecido. + + + + Unable to create the designer. {0} + Não é possível criar o designer. {0} + # {0}=inner exception + + + Unable to check out the current file. The file may be read-only or locked, or you may need to check the file out manually. + Não é possível fazer o check-out do arquivo atual. O arquivo pode ser somente leitura ou estar bloqueado ou talvez você precise fazer check-out do arquivo manualmente. + # General checkout exception message + + + Microsoft Visual Studio + Microsoft Visual Studio + Error reporting + + + Please enter an integer between 1 and 60. + Digite um inteiro entre 1 e 60. + + + + Please enter an integer between 1 and 60. + Digite um inteiro entre 1 e 60. + + + + Show empty environment + Mostrar ambiente vazio + These are items in a combobox (and so they don't need periods) + + + Load last loaded solution + Carregar última solução carregada + These are items in a combobox (and so they don't need periods) + + + Show New Project dialog box + Mostrar caixa de diálogo Novo Projeto + These are items in a combobox (and so they don't need periods) + + + Show Open Project dialog box + Mostrar caixa de diálogo Abrir Projeto + These are items in a combobox (and so they don't need periods) + + + Changes in Help Options will not take effect until the environment is restarted. + As alterações nas opções da Ajuda só terão efeito quando o ambiente for reiniciado. + + + + The location specified is on an invalid or read-only disk, or contains a device name reserved for the system. + O local especificado está em um disco inválido ou somente leitura, ou contém um nome de dispositivo reservado para o sistema. + + + + COM + COM + + + + Component Design + Design do Componente + + + + Serialization + Serialização + + + + Web + Web + + + + COMClass + COMClass + + + + Expose {0} to COM. + Expor {0} para COM. + + + + COM Class + Classe COM + + + + COMVisible + COMVisible + + + + Make {0} visible through COM. + Faça {0} visível através de COM. + + + + COM Visible + COM Visível + + + + DispId + DispId + + + + Set explicit DispId to this {0}. + Definir DispId explícita para este {0}. + + + + DispId + DispId + + + + Value + Valor + + + + Explicit DispId value for this {0}. + Valor explícito de Displd para este {0}. + + + + Value + Valor + + + + DispId value should be an integer greater than or equal to 1. + O valor de DispId deve ser inteiro maior ou igual a 1. + + + + Category + Categoria + + + + Category group for the property. + Grupo de categoria para a propriedade. + + + + Category + Categoria + + + + Default Event + Evento Padrão + + + + Default event for the class. + Evento padrão para a classe. + + + + Default Event + Evento Padrão + + + + Default Value + Valor Padrão + + + + Default value for the property. + Valor padrão para a propriedade. + + + + Default Value + Valor Padrão + + + + NonSerialized + NonSerialized + + + + Field should not be serialized. + Campo não deve ser serializado. + + + + Non Serialized + Não Serializado + + + + Serializable + Serializado + + + + Enable serialization for this {0} and its members. + Habilitar a serialização para este {0} e seus membros. + + + + Serializable + Serializado + + + + WebMethod + WebMethod + + + + Expose method via web services. + Expor o método através de serviços web. + + + + Web Method + Método Web + + + + Description + Descrição + + + + Description for the Web Method. + Descrição para o Método Web. + + + + Description + Descrição + + + + EnableSession + EnableSession + + + + Maintain session state. + Manter o estado de sessão. + + + + Enable Session + Ativar Sessão + + + + TransactionOptions + TransactionOptions + + + + Set transaction options. + Defina as opções de transação. + + + + Transaction Options + Opções de Transação + + + + WebService + WebService + + + + Configure the Web Service settings. + Configure as definições de Serviços Web. + + + + Web Service + Serviço Web + + + + Name + Nome + + + + Name for the web service. + Nome para serviço web. + + + + Name + Nome + + + + Description + Descrição + + + + Description for the web service. + Descrição do serviço web. + + + + Description + Descrição + + + + Namespace + Namespace + + + + Namespace for the web service. + Namespace para serviço web. + + + + Namespace + Namespace + + + + Default + Padrão + + + + Action + Ação + + + + Appearance + Aparência + + + + Behavior + Comportamento + + + + Data + Dados + + + + DragDrop + ArrastarSoltar + + + + Focus + Foco + + + + Format + Formato + + + + Key + Key + + + + Layout + Layout + + + + Mouse + Mouse + + + + WindowStyle + EstiloWindow + + + + (None) + (Nenhum) + Default Event + + + Requires: + Necessita de: + + + + Name + Nome + Column names for the string table + + + Type + Tipo + Column names for the string table + + + Value + Valor + Column names for the string table + + + Comment + Comentário + Column names for the string table + + + Failed to generate file: {0} + Falha ao gerar o arquivo: {0} + + + + Editing embedded resources directly is not supported. Do you wish to convert this item to a linked resource in order to edit it? + Não há suporte para a edição direta de recursos inseridos. Deseja converter o item em um recurso vinculado para editá-lo? + + + + The current object is auto-generated and only supports renaming through the Managed Resources Editor. + O objeto atual é gerado automaticamente e só dá suporte à renomeação por meio do Editor de Recursos Gerenciados. + + + + Cannot find the file '{0}'. It may have been moved or deleted. + Não foi possível encontrar o arquivo '{0}'. Ele pode ter sido movido ou excluído. + {0} = file name and path + + + Unable to load resource from file '{0}'. + Não é possível carregar o recurso a partir do arquivo '{0}'. + {0} = file name and path + + + The resource name cannot be empty. + O nome de recurso não pode ficar vazio. + + + + There is already another resource with the name '{0}'. + Já existe outro recurso com o nome '{0}'. + {0} = Resource name + + + The resource was not of the expected type. + O recurso não era do tipo esperado. + This error can happen if, for example, you try to add foo.bmp to the resource editor, but foo.bmp is really a metafile. + + + Unable to create new resource file '{0}'. {1} + Não foi possível criar o novo arquivo de recurso '{0}'. {1} + {0} = file name and path, {1} = additional error information + + + Unable to play the audio resource. {0} + Não é possível executar o recurso de áudio. {0} + {0} = Additional error information. + + + Resource '{0}' cannot be saved to a file. + O recurso '{0}' não pode ser salvo em um arquivo. + {0} = Resource name + + + The operation has been canceled by the user. + A operação foi cancelada pelo usuário. + + + + The resource value contains invalid data or has an incorrect format. + O valor do recurso contém dados inválidos ou tem um formato incorreto. + + + + The name of the resource '{0}' cannot be used as a valid identifier, because it contains one or more invalid characters: '{1}'. Please remove or replace those characters and try again. + O nome do recurso '{0}' não pode ser usado como um identificador válido, pois ele contém um ou mais caracteres inválidos: '{1}'. Remova ou substitua esses caracteres e tente novamente. + {0} = Resource name + + + Too many files specified. Please select fewer files and try again. + Há arquivos demais especificados. Selecione menos arquivos e tente novamente. + + + + Unexpected error. + Erro inesperado. + Theoretically possible but we really don't expect to happen. Unexpected, internal error. + + + Unable to load internal localized resource '{0}'. + Não é possível carregar o recurso localizado internamente '{0}'. + Theoretically possible but we really don't expect to happen. Unexpected, internal error. + + + The value could not be converted into a resource of type {0}. + +{1} + Não foi possível converter o valor em um recurso do tipo {0}. + +{1} + {0} = the type that was expected by the resource editor (e.g. System.Drawing.Point) +{1} = more specific additional error message from the system + + + The value cannot be empty in a resource of type {0}. + O valor não pode ficar vazio em um recurso do tipo {0}. + {0} = the type that was expected by the resource editor (e.g. System.Drawing.Point) + + + One or more of the selected resource values could not be cleared. + Não foi possível remover um ou mais valores de recurso selecionados. + + + + The resource file cannot be modified at this time. + O arquivo de recurso não pode ser modificado neste momento. + + + + You are trying to edit a resource file that is a part of another project item (such as a form or a control). Editing this item could corrupt the project item, and you will have to recover it by hand. In addition, changes made to this resource file may be lost if further changes are made to the project item. + +Do you really want to edit this file? + Você está tentando editar um arquivo de recurso que faz parte de outro item de projeto (como um formulário ou controle). A edição desse item pode corromper o item de projeto e será preciso recuperá-lo manualmente. Além disso, as alterações feitas nesse arquivo de recurso podem ser perdidas se forem feitas alterações futuras no item de projeto. + +Deseja realmente editar esse arquivo? + + + + The resource '{0}' cannot be added. + O recurso '{0}' não pode ser adicionado. + {0} - name of the resource + + + The device does not support '{0}' files. + O dispositivo não dá suporte a arquivos '{0}'. + {0} - the extension of the file name like 'tiff' + + + The resource item uses the type '{0}', which is not supported in this project. + O item de recurso usa o tipo '{0}', que não tem suporte neste projeto. + {0} - name of the type + + + The resource item(s) {0} cannot be saved correctly. The item(s) will be discarded. + Os itens de recurso {0} não podem ser salvos corretamente. Os itens serão descartados. + {0} - name list of the resource + + + '{0}' + '{0}' + {0} - name + + + {0}, '{1}' + {0}, '{1}' + # {0} - name list +# {1} - another name + + + (Nothing/null) + (Nada/nulo) + Displayed in a string table for values of Nothing/null +CONSIDER: get this from CodeDom + + + (Unknown type) + (Tipo desconhecido) + This actually shouldn't be needed, but if we get an exception trying to get the type name of an entry in the resx file (not supposed to happen), then we'll display this as its type. + + + (Value cannot be displayed) + (O valor não pode ser exibido) + Displayed in a string table for values which cannot be edited by the user + + + Name + Nome + Columns for the "Details" view of the resource editor + + + Filename + Nome do arquivo + Columns for the "Details" view of the resource editor + + + Type + Tipo + Columns for the "Details" view of the resource editor + + + Size + Tamanho + Columns for the "Details" view of the resource editor + + + Comment + Comentário + Columns for the "Details" view of the resource editor + + + Text Encoding + Codificação de Texto + Columns for the "Details" view of the resource editor + + + {0} x {1} + {0} x {1} + Format string for showing a graphic's size + +# {0} = width (as an integer) +# {1} = height (as an integer) +#Example, for a bitmap of width=123, height = 456, the English version of this string would be "123x456" + + + {0} KB + {0} KB + #Format string for showing a file's size +# {0} = length in kilobytes + + + {0} byte(s) + {0} byte(s) + Format string for showing a file's size. +{0} = length in bytes + + + Strings + Cadeias de Caracteres + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + Images + Imagens + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + Icons + Ícones + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + Audio + Áudio + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + Files + Arquivos + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + Other + Outro + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + &Add + &Adicionar + Add, Delete and Views button text in the main ToolStrip + + + &Remove + &Remover + Add, Delete and Views button text in the main ToolStrip + + + &Views + &Exibições + Add, Delete and Views button text in the main ToolStrip + + + &Existing File... + &Arquivo Existente... + Menu items under the "Add" button + + + New &String + Nova Cadeia de Caractere&s + Menu items under the "Add" button + + + New &Image + Nova &Imagem + Menu items under the "Add" button + + + &PNG Image... + Imagem &PNG... + Menu items under the "Add" button + + + &BMP Image... + Imagem &BMP... + Menu items under the "Add" button + + + &GIF Image... + Imagem &GIF... + Menu items under the "Add" button + + + &JPEG Image... + Imagem &JPEG... + Menu items under the "Add" button + + + &TIFF Image... + Imagem &TIFF... + Menu items under the "Add" button + + + New I&con... + Novo Í&cone... + Menu items under the "Add" button + + + New &Text File... + Novo Arquivo de &Texto... + Menu items under the "Add" button + + + Windows Bitmap + Bitmap do Windows + Friendly Image types + + + EXIF Image + Imagem EXIF + Friendly Image types + + + Graphics Interchange Format + Graphics Interchange Format + Friendly Image types + + + JPEG File Interchange Format + Formato de Intercâmbio de Arquivo JPEG + Friendly Image types + + + Windows Bitmap + Bitmap do Windows + Friendly Image types + + + Portable Network Graphics + formato PNG + Friendly Image types + + + Tag Image File Format + Formato TIFF + Friendly Image types + + + Icon + Ícone + Friendly Image types + + + Text File + Arquivo de Texto + Friendly Image types + + + Binary File + Arquivo Binário + + + + Wave Sound + Som Wave + Friendly Image types + + + Linked at compile time + Vinculado no tempo de compilação + File Persistence Mode + + + Embedded in .resx + Inserido no .resx + File Persistence Mode + + + Bitmaps + Bitmaps + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Icons + Ícones + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Audio + Áudio + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Text Files + Arquivos de Texto + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + All Files + Todos os Arquivos + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Windows Bitmap + Bitmap do Windows + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Portable Network Graphics + formato PNG + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Graphics Interchange Format + Graphics Interchange Format + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + JPEG File Interchange Format + Formato de Intercâmbio de Arquivo JPEG + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Tag Image File Format + Formato TIFF + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Icon + Ícone + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + &List + &Lista + Resource editor listview view styles (like changing the view style of a folder in Windows XP) + + + &Details + &Detalhes + Resource editor listview view styles (like changing the view style of a folder in Windows XP) + + + &Thumbnail + &Miniatura + Resource editor listview view styles (like changing the view style of a folder in Windows XP) + + + Managed Resources Editor + Editor de Recursos Gerenciados + + + + Add existing file to resources + Adicionar arquivo existente aos recursos + + + + Import file into resource '{0}' + Importar arquivo no recurso '{0}' + {0} = Name of resource being imported into + + + Export resource '{0}' to file + Exportar o recurso '{0}' para arquivo + {0} = Name of resource being exported from + + + Please specify where to save the new file + Especifique onde o novo arquivo será salvo + + + + The file '{0}' already exists. Do you want to replace it? + O arquivo '{0}' já existe. Deseja substituí-lo? + {0} = full file path and name + + + The following files already exist. Do you want to replace them? + Os arquivos a seguir já existem. Deseja substituí-los? + + + + Select a folder in which to export the resources. + Selecione uma pasta para a qual exportar os recursos. + + + + Do you want to continue anyway? + Deseja continuar assim mesmo? + + + + Do you want to enable strongly-typed resource generation for this file? + Deseja habilitar a geração de recurso fortemente tipado para este arquivo? + + + + Resource '{0}' could not be loaded because the file to which it is linked could not be found: {1}. + Não foi possível carregar o recurso '{0}', pois o arquivo ao qual ele está vinculado não foi encontrado: {1}. + {0} = resource name that had the error, {1} = file path/name that could not be found + + + Resource '{0}' could not be instantiated. {1} + O recurso '{0}' não pôde ser instanciado. {1} + {0} = resource name that had the error, {1} = extended error information + + + Resource '{0}' has a name that is not recommended and that may cause compilation errors in your code. Please choose another name. + O recurso '{0}' tem um nome que não é recomendado e que pode causar erros de compilação no código. Escolha outro nome. + {0} = resource name that had the error + + + Unable to set the Custom Tool or Custom Tool Namespace properties of this file in order to change strongly-typed resource generation options. If the project file is checked in, try checking it out. + Não é possível definir as propriedades Ferramenta Personalizada ou Namespace de Ferramenta Personalizada deste arquivo para alterar as opções de geração de recursos fortemente tipados. Se o check-in do arquivo de projeto tiver sido feito, tente fazer check-out. + One possible source for this error is that source code control checkout failed or was canceled. + + + Double-click here to enable strongly-typed resources for this file. + Clique duas vezes aqui para habilitar recursos fortemente tipados para este arquivo. + + + + The resource name '{0}' is not a valid identifier. + O nome de recurso '{0}' não é um identificador válido. + + + + {0} - Codepage {1} + {0} – Página do Código {1} + {0} = encoding name (e.g., "Western European (Windows)"), {1} = code page # (e.g., 85001) + + + (Default) + (Padrão) + + + + Change resource name + Alterar nome de recurso + + + + Add {0} new resource(s) + Adicionar {0} novo(s) recurso(s) + {0} = number of resources added + + + Remove {0} resource(s) + Remover {0} recurso(s) + {0} = number of resources removed + + + Delete values in {0} cell(s) + Excluir valores em {0} célula(s) + {0} = number of cells cleared + + + &Categories: + &Categorias: + The label in the menu strip for the combobox that holds the categories of resources to display + + + Name used to identify the resource in code. + Nome usado para identificar o recurso no código. + + + + Additional information about the resource. This property is only meaningful at design time. + Informações adicionais sobre o recurso. Esta propriedade é útil apenas no tempo de design. + + + + Character encoding of the file. + Codificação de caracteres do arquivo. + + + + The path to the linked resource. + O caminho para o recurso vinculado. + + + + Specifies whether the file resource is text or binary. + Especifica se o arquivo de recurso é texto ou binário. + + + + Specifies whether the resource is embedded or linked. Embedded resources are saved in the resource file. Linked resources reside in an external location on disk. + Especifica se o recurso é inserido ou vinculado. Os recursos inseridos são salvos no arquivo de recurso. Os recursos vinculados residem em um local externo no disco. + + + + The resource will be generated as this type in the strongly-typed resource class. For example, the resource might be generated as a String or Bitmap object. + O recurso será gerado como este tipo na classe de recursos fortemente tipados. Por exemplo, o recurso pode ser gerado como um objeto Bitmap ou String. + + + + The value of the resource. + O valor do recurso. + + + + Unable to add a '{0}' folder to this project. + +{1} + Não é possível adicionar a pasta '{0}' a este projeto. + +{1} + {0} = name of folder trying to add (by default, this will be "Resources"), {1} = additional error information + + + Unable to add '{0}' to the project. + +{1} + Não foi possível adicionar '{0}' ao projeto. + +{1} + {0} = file name and path, {1} = additional error information. + + + Unable to add '{0}' to the project. + Não foi possível adicionar '{0}' ao projeto. + {0} = file name and path + + + A file with the name '{0}' already exists. Do you want to replace it? + Já existe um arquivo com o nome '{0}'. Deseja substituí-lo? + {0} = file name and path + + + {0} - Destination File Exists + {0} – O Arquivo de Destino Existe + {0} = Name of the editor, e.g. "Managed Resources Editor" or "Resource Picker" + + + There is already a linked file with the name "{0}" in the project folder "{1}". Do you want to remove it? + Já existe um arquivo vinculado com o nome "{0}" na pasta do projeto "{1}". Deseja removê-lo? + {0} = file name (no path), {1} = Path of resource folder + + + {0} - Destination File Exists + {0} – O Arquivo de Destino Existe + {0} = Name of the editor, e.g. "Managed Resources Editor" or "Resource Picker" + + + Cannot find the file '{0}'. It may have been moved or deleted. + Não foi possível encontrar o arquivo '{0}'. Ele pode ter sido movido ou excluído. + {0} = file name and path + + + Connection string + Cadeia de conexão + Added as the last item in the list of available types to let the user browse for a new type + + + Web Service URL + URL do Serviço Web + Added as the last item in the list of available types to let the user browse for a new type + + + Browse... + Procurar... + Added as the last item in the list of available types to let the user browse for a new type + + + Application + Aplicativo + + + + Application (Web) + Aplicativo (Web) + + + + User + Usuário + + + + User (Web) + Usuário (Web) + + + + Name + Nome + + + + Type + Tipo + + + + Scope + Escopo + + + + Value + Valor + + + + Type '{0}' is not defined. + O tipo '{0}' não está definido. + + + + Name changed + Nome alterado + + + + Type changed + Tipo alterado + + + + Scope changed + Escopo alterado + + + + Roaming changed + Roaming alterado + + + + Description changed + Descrição alterada + + + + Provider changed + Provedor alterado + + + + Value changed + Valor alterado + + + + Generate default value in code changed + Gerar valor padrão no código alterado + + + + Remove {0} setting(s) + Remover {0} configurações + + + + Unable to load settings file. It might be corrupted or contain invalid XML or contain duplicate identifiers. + Não é possível carregar o arquivo de configurações. Talvez ele esteja corrompido, contenha XML inválido ou contenha identificadores duplicados. + + + + New values from the app.config file were automatically added + Foram adicionados automaticamente novos valores do arquivo app.config + + + + Value of setting '{0}' was changed in the app.config file. + O valor da configuração '{0}' foi alterado no arquivo app.config. + + + + The current value in the .settings file is '{0}' +The new value in the app.config file is '{1}' + +Do you want to update the value in the .settings file? + O valor atual no arquivo .settings é '{0}' +O novo valor no arquivo app.config é '{1}' + +Deseja atualizar o valor no arquivo .settings? + + + + An error occurred while reading the app.config file. The file might be corrupted or contain invalid XML. + Erro ao ler o arquivo app.config. O arquivo pode estar corrompido ou conter XML inválido. + + + + An error occurred while saving values to the app.config file. The file might be corrupted or contain invalid XML. + Erro ao salvar valores no arquivo app.config. O arquivo pode estar corrompido ou conter XML inválido. + + + + There is already another setting with the name '{0}'. + Já existe outra configuração com o nome '{0}'. + + + + '{0}' is not a valid identifier. + '{0}' não é um identificador válido. + + + + '{0}' is not a valid type name. + '{0}' não é um nome de tipo válido. + + + + The setting name cannot be empty. + O nome da configuração não pode ficar vazio. + + + + '{0}' cannot be converted to an instance of type '{1}'. + '{0}' não pode ser convertido em uma instância do tipo '{1}'. + + + + Generic types are not supported. + Não há suporte para tipos genéricos. + + + + Abstract types are not supported. + Não há suporte para tipos abstratos. + + + + The current object is auto-generated and only supports renaming through the Settings Designer. + O objeto atual é gerado automaticamente e só dá suporte à renomeação por meio do Designer de Configurações. + + + + The current object is auto-generated and does not support modifying parameters. + O objeto atual é gerado automaticamente e não dá suporte à modificação de parâmetros. + + + + The settings file cannot be modified at this time. + O arquivo de configurações não pode ser modificado neste momento. + + + + &Add Setting + &Adicionar Configuração + + + + R&emove Setting + R&emover Configuração + + + + Application settings allow you to store and retrieve property settings and other information for your application dynamically. For example, the application can save a user's color preferences, then retrieve them the next time it runs. + As configurações de aplicativo permitem que você armazene e recupere dinamicamente configurações de propriedades e outras informações para seu aplicativo. Por exemplo, o aplicativo pode salvar as preferências de cor do usuário e recuperá-las da próxima vez que for executado. + + + + Learn more about application settings... + Saiba mais sobre configurações de aplicativo... + + + + This connection string appears to contain sensitive data (for example, a password), which is required to connect to the database. However, storing sensitive data in the connection string can be a security risk. Do you want to include sensitive data in the connection string? + Esta cadeia de conexão aparenta conter dados confidenciais (por exemplo, uma senha), que são necessários para se conectar ao banco de dados. No entanto, armazenar dados confidenciais na cadeia de conexão pode ser um risco à segurança. Deseja incluir dados confidenciais na cadeia de conexão? + + + + Select a Type + Selecionar um Tipo + + + + This class allows you to handle specific events on the settings class: + Esta classe permite que você trate eventos específicos na classe de configurações: + Comments for user part of extending generated settings class + + + The SettingChanging event is raised before a setting's value is changed. + O evento SettingChanging é gerado antes da alteração de um valor de configuração. + + + + The PropertyChanged event is raised after a setting's value is changed. + O evento PropertyChanged é gerado depois da alteração de um valor de configuração. + + + + The SettingsLoaded event is raised after the setting values are loaded. + O evento SettingsLoaded é gerado depois do carregamento dos valores de configuração. + + + + The SettingsSaving event is raised before the setting values are saved. + O evento SettingsSaving é gerado antes de salvar os valores de configuração. + + + + To add event handlers for saving and changing settings, uncomment the lines below: + Para adicionar manipuladores de eventos para salvar e alterar configurações, remova os comentários das linhas abaixo: + + + + Add code to handle the SettingChangingEvent event here. + Adicione código para manipular o evento SettingChangingEvent aqui. + + + + Add code to handle the SettingsSaving event here. + Adicione código para manipular o evento SettingsSaving aqui. + + + + Failed to create or open file. + Falha ao criar ou abrir arquivo. + + + + Description of the setting. + A descrição da configuração. + + + + Specifies whether or not the default setting value should be generated in the strongly-typed settings class. + Especifica se o valor de configuração padrão deve ser gerado na classe de configurações fortemente tipadas. + + + + Specifies the group to which this Settings file belongs. + Especifica o grupo ao qual este arquivo de Configurações pertence. + + + + Description of the group to which this Settings file belongs. + Descrição do grupo ao qual este arquivo de Configurações pertence. + + + + Indicates whether the setting should roam when Windows roaming profiles are enabled. + Indica se a configuração deverá usar o sistema de roaming quando os perfis de roaming do Windows forem habilitados. + + + + Name used to identify the setting. + Nome usado para identificar a configuração. + + + + The provider (System.Configuration.Provider.ProviderBase) used to manage the setting. + O provedor (System.Configuration.Provider.ProviderBase) usado para gerenciar a configuração. + + + + Specifies whether the setting is per-application (read-only) or per-user (read-write). + Especifica se a configuração é por aplicativo (somente leitura) ou por usuário (leitura-gravação). + + + + The setting will be generated as this type in the strongly-typed settings class. For example, the setting might be generated as a String or Integer object. + A configuração será gerada como este tipo na classe de configurações fortemente tipadas. Por exemplo, a configuração pode ser gerada como um objeto de cadeia de caracteres ou inteiro. + + + + The current value for the setting. + O valor atual para a configuração. + + + + The following files will be deleted: + +{0} + Os arquivos a seguir serão excluídos: + +{0} + Synchronize with user.config file + + + No user.config files were found in any of the following locations: + +{0} + Nenhum arquivo user.config foi encontrado nos locais a seguir: + +{0} + + + + One or more user.config files was not removed. + Um ou mais arquivos user.config não foram removidos. + + + + My.Settings Auto-Save Functionality + Funcionalidade de salvamento automático do My.Settings + in-code comment used to generate a region that hides My.Settings AutoSave functionality + + + Unable to find service '{0}'. Ensure that the application is installed correctly. + Não é possível localizar o serviço '{0}'. Verifique se o aplicativo está instalado corretamente. + Settings Global-Object-Provider Strings + + + Default pac&kage: + Pac&ote padrão: + J# Specific String for Root Namespace + + + (Custom) + (Personalizado) + Entry in the "Accessibility dropdown" + + + No code generation + Nenhuma geração de código + Entry in the "Accessibility dropdown" + + + WPF Application + Aplicativo WPF + + + + (Invalid value: "{0}") + (Valor inválido: "{0}") + Goes into the ShutdownMode combobox + + + On explicit shutdown + No desligamento explícito + + + + On last window close + No fechamento da última janela + + + + On main window close + No fechamento da janela principal + + + + Could not find the expected root element "{0}" in the application definition file. + Não foi possível encontrar o elemento de raiz esperado "{0}" no arquivo de definição de aplicativo. + + + + The .xaml file was in an unexpected format, near line {0} column {1}. + O arquivo .xaml estava em um formato inesperado, próximo à linha {0}, coluna {1}. + + + + Startup &object: + &Objeto de inicialização: + + + + Startup &URI: + &URI de Inicialização: + + + + The application definition file is already opened in an incompatible editor. Please close the other editor and reload the project properties page. + O arquivo de definição de aplicativo já está aberto em um editor incompatível. Feche o outro editor e recarregue a página de propriedades do projeto. + + + + There was an error trying to open or create the application definition file for this project. {0} + Erro ao tentar abrir ou criar um arquivo de definição de aplicativo para este projeto. {0} + + + + An error occurred trying to load the application definition file for this project. The file '{0}' could not be parsed. Please edit the file in the XAML editor to fix the error. + Ocorreu um erro ao tentar carregar o arquivo de definição de aplicativo para esse projeto. Não foi possível analisar o arquivo {0}. Edite o arquivo no editor XAML para corrigir o erro. + + + + (Error) + (Erro) + Used inside UI elements when there is an error (e.g. combobox text) + + + An unspecified error has occurred. + Ocorreu um erro não especificado. + + + + This project does not contain an application definition file. + Este projeto não contém um arquivo de definição de aplicativo. + + + + An error occurred trying to create the application events file. {0} + Erro ao tentar criar um arquivo de eventos de aplicativo. {0} + + + + Invalid argument '{0}' + Argumento inválido '{0}' + {0} = name of invalid argument + + + WPF Console Application + Aplicativo de Console WPF + + + + WPF Class Library + Biblioteca de Classes WPF + + + + Embed manifest with default settings + Inserir manifesto com configurações padrão + + + + Create application without a manifest + Criar aplicativo sem um manifesto + + + + Invalid manifest file. + Arquivo de manifesto inválido. + + + + Services + Serviços + + + + Client application services enable your Windows-based applications to use the ASP.NET login (authentication), roles, and profile (settings) services. + Serviços de aplicativo cliente habilitam seus aplicativos baseados em Windows a usarem o logon (autenticação), as funções e os serviços de perfil (configurações) do ASP.NET. + + + + Learn more about client application services... + Saiba mais sobre os serviços do aplicativo cliente... + + + + Advanced Settings for Services + Configurações Avançadas para Serviços + + + + Disabling application services will clear the default services for Authentication, Roles, and Settings. Click OK to disable application services. + Desabilitar os serviços do aplicativo limpará os serviços padrão de Autenticação, Funções e Configurações. Clique em OK para desabilitar os serviços de aplicativo. + + + + Disable Application Services + Desabilitar Serviços de Aplicativo + + + + seconds + segundos + + + + minutes + minutos + + + + hours + horas + + + + days + dias + + + + To enable client application services, you must set the Target Framework for your application to .NET Framework 3.5 or later. In C#, you can do this on the Application property page. In Visual Basic, you can do this one the Compile property page by clicking Advanced Compile Options. + Para habilitar serviços de aplicativo cliente é necessário definir a Estrutura de Destino de seu aplicativo como .NET Framework 3.5 ou posterior. Em C# isto pode ser definido na página de propriedades do Aplicativo. No Visual Basic é possível fazer isto na página de propriedades de Compilação clicando em Opções Avançadas de Compilação. + + + + An error occurred while reading the Application configuration file. The file might be corrupted or contain invalid XML. + Erro ao ler o arquivo de configuração do Aplicativo. O arquivo pode estar corrompido ou conter XML inválido. + + + + The URL is invalid. Please enter a valid URL like http://microsoft.com/services + A URL é inválida. Insira uma URL válida como http://microsoft.com/services + + + + A service URL in the application configuration file is not in the expected format. + Uma URL de serviço no arquivo de configuração do aplicativo não está de acordo com o formato esperado. + + + + Authentication, Roles and Web Settings providers have been configured via the Application configuration file such that they do not share a common connection string. + Os provedores de Autenticação, Funções e Configurações da Web foram configurados usando o arquivo de configuração Aplicativo, portanto, eles não compartilham uma cadeia de conexão comum. + + + + Specify a connection string to a SQL Server database, or use the special connection string "Data Source = |SQL/CE|", which causes SQL Server Compact to generate local database files for offline storage. + Especifique uma cadeia de conexão para um banco de dados do SQL Server ou use a cadeia de conexão especial "Data Source = |SQL/CE|", que faz com que o SQL Server Compact gere arquivos de banco de dados local para armazenamento offline. + + + + The following type names were not understood: '{0}'. Make sure you have references to these types. + Os seguintes nomes de tipo não foram entendidos: '{0}'. Certifique-se de que você tem referências para esses tipos. + + + + There are already settings with the following names: {0}. + Já existem configurações com os seguinte nomes: {0}. + + + + The username/password combination cannot be authenticated. + A combinação nome de usuário/senha não pode ser autenticada. + + + + Windows Forms Application + Aplicativo do Windows Forms + The "Windows Forms" distinguishes it from a WPF application + + + Namespace of the service reference. + Namespace da referência de serviço. + + + + Service Reference Properties + Propriedades de Referência de Serviço + + + + Metadata Location Url + URL do Local de Metadados + + + + Metadata Location + Local de Metadados + + + + A service reference with multiple source urls is not supported. + Não há suporte para uma referência de serviço com várias URLs de origem. + + + + Cannot change reference Url to empty. The reference url must be a valid URL. + Não é possível alterar a URL de referência para vazia. A URL de referência deve ser uma URL válida. + + + + One or more files were reloaded during the checkout. Please retry your operation. + Um ou mais arquivos foram recarregados durante o check-out. Tente realizar sua operação novamente. + + + + The project was reloaded, and some changes on this page may have been lost. + O projeto foi recarregado e algumas alterações nesta página podem ter sido perdidas. + + + + The application will fail to run in the selected zone because of this requested elevated permission. Click the help link above for more info. + O aplicativo não poderá ser executado na zona selecionada porque ele requer permissão de nível elevado. Clique no link de ajuda acima para obter mais informações. + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.ru.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.ru.xlf new file mode 100644 index 00000000000..80383103d67 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.ru.xlf @@ -0,0 +1,2948 @@ + + + + + + All Files + Все файлы + + + + Property Page + Страница свойств + + + + References + Ссылки + + + + Version + Версия + + + + Signing + Подписывание + + + + Application + Приложение + + + + Compile + Компиляция + + + + Debug + Отладка + + + + Deploy + Развертывание. + + + + Database + База данных + + + + Security + Безопасность + + + + Build + Сборка + + + + Build Events + События сборки + + + + Reference Paths + Пути для ссылок + + + + Pre-build Event Command Line + Командная строка событий перед сборкой + + + + Post-build Event Command Line + Командная строка событий после сборки + + + + The output path is not trusted. +The application may throw security exceptions when it attempts to perform actions which require full trust. +Click OK to ignore and continue. Click CANCEL to choose a different output path. + Выходной путь не является доверенным. +При выполнении действий, требующих полного доверия, приложение может создавать исключения системы безопасности. +Чтобы пропустить и продолжить, нажмите кнопку ОК. Чтобы выбрать другой выходной путь, нажмите кнопку "Отмена". + + + + <Browse...> + <Обзор...> + + + + (None) + (Нет) + + + + <New...> + <Создать...> + + + + <Browse...> + <Обзор...> + + + + (None) + (Нет) + + + + Active ({0}) + Активн. ({0}) + + + + All Configurations + Все конфигурации + + + + All Platforms + Все платформы + + + + N/A + Н/Д + This is used in the platform and configuration comboboxes when showing pages that don't care about the current platform/configuration + + + Could not find the configuration '{0}' for platform '{1}'. + Не удалось найти конфигурацию "{0}" для платформы "{1}". + + + + (None) + (Нет) + + + + Select File + Выбор файла + + + + Add existing file to project + Добавить существующий файл в проект + + + + Icon Files + Файлы значков + + + + Executable Files + Исполняемые файлы + + + + Select Working Directory + Выбор рабочего каталога + + + + Select Output Path + Выбор выходного пути + + + + Select Reference Path + Выбор пути для ссылок + + + + Win32 Resource Files + Файлы ресурсов Win32 + + + + Add Win32 resource file to project + Добавить файл ресурсов Win32 в проект + + + + Folder path does not exist. +Please select a valid folder path. + Путь к папке не существует. +Выберите допустимый путь к папке. + + + + Advanced Compiler Settings + Расширенные параметры компилятора + + + + Advanced Build Settings + Расширенные параметры сборки + + + + Compiler Warnings + Предупреждения компилятора + + + + Reference Paths + Пути для ссылок + + + + Compatible Settings + Совместимые параметры + + + + Assembly Information + Сведения о сборке + + + + Invalid version format, expected "[Major]", "[Major].[Minor]", "[Major].[Minor].[Build]" or "[Major].[Minor].[Build].[Revision]" + Недопустимый формат версии, ожидаемый [Основной номер], [Основной номер].[Дополнительный номер], [Основной номер].[Дополнительный номер].[Сборка] или [Основной номер].[Дополнительный номер].[Сборка].[Редакция] + + + + A wildcard ("*") is not allowed in this field. + Знак подстановки ("*") не допускается в этом поле. + + + + Each part of the version number for '{0}' must be an integer between 0 and {1}. + Каждый компонент номера версии для "{0}" должен быть целым числом в диапазоне от 0 до {1}. + + + + (Default Icon) + (Значок по умолчанию) + + + + Startup object must be a form when 'Enable application framework' is checked. + Если установлен флажок "Включить исполняющую среду", автоматически запускаемый объект должен быть формой. + + + + (Not set) + (Не задано) + + + + Icon could not be added to the project. + Не удалось добавить значок в проект. + + + + Invalid icon file. + Недопустимый файл значка. + + + + {0} is not a valid icon file. + "{0}" не является действительным файлом значка. + + + + The GUID should match the format dddddddd-dddd-dddd-dddd-dddddddddddd. + GUID должен иметь следующий формат dddddddd-dddd-dddd-dddd-dddddddddddd. + + + + NOTE: This file is auto-generated; do not modify it directly. To make changes, + ПРИМЕЧАНИЕ. Этот файл создан автоматически; не изменяйте его самостоятельно. Для внесения изменений + These comments are placed in the ApplicationEvents.vb file if it is generated by the project designer. The same comments appear in the templates, under vsproject\Templates\Windows\VisualBasic\ProjectTemplates\WindowsApplication\MyEvents.vb (MyEvents.vb is renamed to ApplicationEvents.vb after project creation), and these comments should be kept in sync + + + or if you encounter build errors in this file, go to the Project Designer + или, если в ходе сборки обнаружены ошибки в этом файле, перейдите в конструктор проектов + + + + (go to Project Properties or double-click the My Project node in + (перейдите к свойствам проекта или дважды щелкните узел "Мой проект" в + + + + Solution Explorer), and make changes on the Application tab. + обозревателе решений), и внесите изменения на вкладке "Приложение". + + + + '{0}' is not a valid identifier. Please select a different Startup form. + "{0}" не является допустимым идентификатором. Выберите другую начальную форму. + + + + '{0}' is not a valid identifier. Please select a different Splash screen form. + "{0}" не является допустимым идентификатором. Выберите другую форму экрана-заставки. + + + + The splash screen form cannot be the start-up form. + Форма заставки не может быть начальной формой. + + + + Startup f&orm: + Начальная ф&орма: + + + + The following events are available for MyApplication: + Для MyApplication имеются следующие события: + + + + Startup: Raised when the application starts, before the startup form is created. + Startup: возникает при запуске приложения перед созданием начальной формы. + + + + Shutdown: Raised after all application forms are closed. This event is not raised if the application terminates abnormally. + Shutdown: возникает после закрытия всех форм приложения. Это событие не создается, если происходит аварийное завершение работы приложения. + + + + UnhandledException: Raised if the application encounters an unhandled exception. + UnhandledException: возникает, если в приложении обнаруживается необработанное исключение. + + + + StartupNextInstance: Raised when launching a single-instance application and the application is already active. + StartupNextInstance: возникает при запуске приложения, допускающего одновременное выполнение только одного экземпляра, если это приложение уже активно. + + + + NetworkAvailabilityChanged: Raised when the network connection is connected or disconnected. + NetworkAvailabilityChanged: возникает при изменении состояния подключения — при подключении или отключении. + + + + Base address must be a hexadecimal number with less than or equal to 8 digits, for example, 0x11000000. + Базовый адрес должен быть шестнадцатеричным числом (длина — не более 8 цифр), например: 0x11000000. + + + + None + Нет + + + + Warning + Предупреждение + + + + Error + Ошибка + + + + (custom) + (настраиваемое) + + + + Implicit conversion + Неявное преобразование + + + + Late binding; call could fail at run time + Позднее связывание; возможный сбой вызова во время выполнения + + + + Implicit type; object assumed + Неявный тип; предполагается объект + + + + Use of variable prior to assignment + Использование переменной до присваивания + + + + Function/Operator without return value + Функция или оператор без возвращаемого значения + + + + Unused local variable + Неиспользуемая локальная переменная + + + + Instance variable accesses shared member + Обращение к общему члену через переменную-экземпляр + + + + Recursive operator or property access + Рекурсивный оператор или доступ к свойству + + + + Duplicate or overlapping catch blocks + Повторяющиеся или перекрывающиеся блоки catch + + + + The warning settings for one or more configurations conflict. +Changing this setting will reset the settings in all configurations. + Параметры предупреждений для одной или нескольких конфигураций конфликтуют. +Изменение этого параметра приведет к сбросу параметров во всех конфигурациях. + + + + When startup form closes + Когда закрывается начальная форма + + + + When last form closes + Когда закрывается последняя форма + + + + Windows + Windows + Authentication modes + + + Application-defined + Определяется приложением + Authentication modes + + + Cancel + Отмена + + + + &Calculate Permissions + &Вычислить разрешения + + + + Stopped... + Остановлено... + + + + Starting... + Запуск... + + + + Building... + Сборка... + + + + Analyzing... + Анализ... + + + + Analyze Failed + Сбой анализа + + + + Aborting... + Прекращение... + + + + Canceling... + Отмена... + + + + Internet + Интернет + + + + Local Intranet + Локальная интрасеть + + + + (Custom) + (Настраиваемое) + Don't use + + + (Zone Default) + (По умолчанию для зоны) + + + + Include + Включить + + + + Exclude + Исключить + + + + The application will require elevated permissions to run in the selected zone. Click the help link above for more info. + Для запуска приложения в выбранной зоне требуются разрешения более высокого уровня. Для просмотра дополнительных сведений щелкните ссылку справки ниже. + + + + This permission could not be loaded. Press the delete key to remove it from your project. + Не удалось загрузить это разрешение. Нажмите клавишу DELETE, чтобы удалить его из проекта. + Don't use + + + Included + Включено + + + + Permission + Разрешение + + + + Setting + Параметр + + + + Specify the code access security permissions that your ClickOnce application requires in order to run. Learn more about code access security... + Укажите разрешения системы управления доступом для кода, которые требуются для запуска вашего приложения ClickOnce. Дополнительные сведения об управлении доступом для кода... + + + + Learn more about code access security... + Дополнительные сведения об управлении доступом для кода... + + + + Invalid value + Недопустимое значение + + + + The SecurityPermission must be included in your application with the Execute flag set or your application will not run. Mark this permission as "Zone Default" or "Include." + В приложении должен присутствовать объект SecurityPermission с установленным флагом Execute, в противном случае ваше приложение не будет запущено. Пометьте это разрешение как "По умолчанию для зоны" или "Включить". + + + + The SecurityPermission must be included in your application with the Execute flag set or your application will not run. The Execute flag has been added to the SecurityPermission in your manifest. + В приложении должен присутствовать объект SecurityPermission с установленным флагом Execute, в противном случае ваше приложение не будет запущено. Флаг Execute был добавлен в SecurityPermission в манифесте. + + + + This application requires full trust to run correctly. Would you like to set this as a full trust application? + Для правильной работы приложению требуется полное доверие. Настроить его как приложение с полным доверием? + + + + Full Trust Required + Требуется полное доверие + + + + An error occurred and the app.manifest file could not be saved. +Error: + Произошла ошибка. Не удалось сохранить файл app.manifest. +Ошибка: + + + + An error occurred and the app.manifest file could not be loaded. Please remove any changes you have made to the file and reload the Security property page again. + Произошла ошибка. Не удалось загрузить файл app.manifest. Отмените все изменения, внесенные в файл, и повторно загрузите страницу свойств безопасности. + + + + Included + Включено + + + + Not Included + Не включено + + + + Included with warning + Включено с предупреждением + + + + Calculating permissions failed. + Сбой вычисления разрешений. + + + + Error + Ошибка + + + + Advanced Security Settings + Дополнительные параметры безопасности + + + + Build Failed. Click CANCEL and correct the build failure before analyzing again. + Ошибка сборки. Нажмите кнопку "Отмена" и исправьте ошибку сборки до повторного анализа. + + + + Build completed... + Сборка выполнена... + + + + Unable to start the build. + Невозможно начать сборку. + + + + Serious error. The build must begin in order to analyze permissions. It has not started. + Серьезная ошибка. Для анализа разрешений необходимо начать сборку. Сборка не начата. + Don't use + + + (Custom) + (Настраиваемое) + Don't use + + + (None) + (Нет) + + + + Selecting existing key file + Выбор существующего файла ключа + + + + Key Files + Файлы ключей + + + + Create key file + Создать файл ключа + + + + The old password is invalid. + Недействительный старый пароль. + + + + Enter the old password. + Введите старый пароль. + + + + Enter a new password. + Введите новый пароль. + + + + The new passwords do not match. Enter the password again. + Новые пароли не совпадают. Введите пароль еще раз. + + + + The new password must be at least 6 characters in length. Enter the password again. + Длина нового пароля должна составлять не менее 6 символов. Введите пароль еще раз. + + + + Select a Certificate + Выберите сертификат + + + + Select a certificate to sign your ClickOnce manifests + Выберите сертификат, которым будут подписываться манифесты ClickOnce-приложений + + + + Certificate Files + Файлы сертификатов + + + + Issued To + Получатель сертификата + + + + Issued By + Кем выдан + + + + Intended Purpose + Назначение + + + + Expiration Date + Срок действия + + + + The password is invalid. + Пароль недопустим. + + + + Invalid password + Недопустимый пароль + + + + The selected file does not contain a private key. You must choose a certificate that contains a private key. + Выбранный файл не содержит закрытый ключ. Необходимо выбрать сертификат, содержащий закрытый ключ. + + + + Invalid key + Недопустимый ключ + + + + Certificate Creation Error + Ошибка создания сертификата + + + + <All> + <Все> + + + + The passwords do not match. + Пароли не совпадают. + + + + Enter a password. + Введите пароль. + + + + Confirm the password. + Подтвердите пароль. + + + + (none) + (нет) + + + + Enter password to open file + Введите пароль, чтобы открыть файл + + + + Enter &password to open file {0} + Введите &пароль, чтобы открыть файл {0} + + + + Enter &password for new file {0} + Введите &пароль для нового файла {0} + + + + The project already contains a file with that name. Choose another certificate file or rename the file in your project. + Проект уже содержит файл с таким именем. Выберите другой файл сертификата или переименуйте файл в вашем проекте. + + + + The file '{0}' could not be imported: {1} + Не удалось импортировать файл "{0}". {1} + + + + _TemporaryKey.pfx + _TemporaryKey.pfx + + + + The selected certificate is not valid for code signing. Choose another certificate file. + Выбранный сертификат недопустим для подписи кода. Выберите другой файл сертификата. + + + + Change property: {0} + Изменить свойство: {0} + + + + Windows Application + Приложение Windows + + + + Windows Service + Служба Windows + + + + Class Library + Библиотека классов + + + + Console Application + Консольное приложение + + + + Web Control Library + Библиотека веб-элементов управления + + + + Cannot remove '{0}'. {1} + + Невозможно удалить "{0}". {1} + + + + + Adding or removing '{0}' as a project import failed because of an unexpected error from the project system. The error returned was: '{1}'. + Не удалось добавить или удалить "{0}" в ходе импорта проекта из-за непредвиденной ошибки в подсистеме управления проектами. Возвращена ошибка: {1}. + + + + Adding web reference failed. {0} + + Не удалось добавить веб-ссылку. {0} + + + + + Updating web reference '{0}' failed. +{1} + Не удалось обновить веб-ссылку "{0}". +{1} + + + + Web Reference Properties + Свойства веб-ссылки + + + + Static + Статическая + + + + Dynamic + Динамическая + + + + Name of the web reference + Имя веб-ссылки + + + + URL Behavior + Поведение URL-адреса + + + + Web reference URL behavior + Поведение URL-адреса веб-ссылки + + + + Web Reference URL + URL-адрес веб-ссылки + + + + Web Reference URL + URL-адрес веб-ссылки + + + + Reference Properties + Свойства ссылки + + + + The remote machine name cannot be blank. Please specify the name of the machine to debug remotely. + Имя удаленного компьютера не может быть пустым. Укажите имя компьютера для удаленной отладки. + + + + The external program cannot be found. Please enter a valid executable file. + Невозможно найти внешнюю программу. Укажите допустимый исполняемый файл. + + + + The external program property cannot be empty. Please enter a valid executable file. + Свойство внешней программы не может быть пустым. Укажите допустимый исполняемый файл. + + + + We can only debug an EXE file. Please enter a valid executable file. + Поддерживается отладка только EXE-файлов. Укажите допустимый исполняемый файл. + + + + The URL property cannot be empty. Please enter a valid URL. + Свойство URL не может быть пустым. Введите допустимый URL-адрес. + + + + The URL is invalid. Please enter a valid URL like "http://www.microsoft.com/" + URL-адрес недопустим. Введите допустимый URL-адрес, например http://www.microsoft.com/. + + + + The working directory you entered does not exist. Please enter a valid working directory. + Указанный рабочий каталог не существует. Введите допустимый рабочий каталог. + + + + <The system cannot find the reference specified> + <Система не может найти указанную ссылку> + + + + Unused References + Неиспользуемые ссылки + + + + &Remove + Уда&лить + + + + No unused references + Нет неиспользуемых ссылок + + + + Project compilation failed. Cannot determine unused references. + Сбой компиляции проекта. Невозможно определить неиспользуемые ссылки. + + + + Gathering list of unused references... + Формирование списка неиспользуемых ссылок... + + + + Error getting unused references. + Ошибка при получении неиспользуемых ссылок. + + + + Base address must be a hexadecimal number with less than or equal to 8 digits, for example, &H11000000. + &Базовый адрес должен быть шестнадцатеричным числом (длина — не более 8 цифр), например: H11000000. + + + + "Resource files must have a .res file extension. Please enter a valid resource file name." + "У файлов ресурсов должно быть расширение RES. Укажите допустимое имя файла ресурсов". + + + + "The resource file entered does not exist." + "Указанный файл ресурсов не существует." + + + + Project Designer + Конструктор проектов + + + + Settings + Параметры + + + + Resources + Ресурсы + + + + An error occurred trying to load the project properties window. Close the window and try again. +{0} + Произошла ошибка при попытке загрузки окна свойств проекта. Закройте окно и повторите попытку. +{0} + + + + An error occurred trying to load the page. + Произошла ошибка при попытке загрузки страницы. + + + + The designer cannot be shown because the document for it was never loaded. + Невозможно отобразить конструктор, поскольку документ для него никогда не загружался. + + + + This project does not contain a default resources file. Click here to create one. + Этот проект не содержит файл ресурсов по умолчанию. Щелкните эту ссылку для создания. + + + + This project does not contain a default settings file. Click here to create one. + Этот проект не содержит файл параметров по умолчанию. Щелкните эту ссылку для создания. + + + + Could not find the file '{0}'. + Не удалось найти файл "{0}". + + + + The file '{0}' is already open in an editor. Please close the file and try again. + Файл "{0}" уже открыт в редакторе. Закройте файл и повторите попытку. + + + + All Project Designer Pages + Все страницы конструктора проектов + + + + More Settings + Дополнительные параметры + + + + The requested file type is not supported in projects of this type. + Запрошенный тип файла не поддерживается в проектах этого типа. + + + + Assembly Name + Имя сборки + + + + Root Namespace + Корневое пространство имен + + + + Startup Object + Автоматически запускаемый объект + + + + Application Icon + Значок приложения + Property Friendly Names (for transaction names) - NOTE: All of these are optional + + + Assembly Version + Версия сборки + + + + Assembly File Version + Версия файла сборки + + + + Assembly GUID + GUID сборки + + + + Enable application framework + Включить исполняющую среду + + + + External Program Path + Путь к внешней программе + + + + Start Browser With URL + Запускать браузер, используя URL-адрес + + + + Working Directory + Рабочий каталог + + + + Remote Machine Name + Имя удаленного компьютера + + + + Project Designer Page Container + Контейнер страницы конструктора проектов + + + + Switch Project Designer Page + Переключение страниц конструктора проектов + + + + Allow switching between active pages of the project designer (use Ctrl+PageUp and Ctrl+PageDown) + Разрешить переключение между активными страницами конструктора проектов (с помощью клавиш Ctrl+PageUp и Ctrl+PageDown) + + + + {0} page: + {0} стр.: + {0} = sub page name + + + {0} [Read Only] + {0} [только для чтения] + Attach a readonly to the designer caption {0}=Designer caption + + + The editor could not get the IVsTextStream for file {0}. + Редактору не удалось получить IVsTextStream для файла "{0}". + #exception {0}=filename + + + The editor could not get the IVsTextStream. + Редактору не удалось получить IVsTextStream. + #exception (no file name) + + + No DesignerService for file '{0}'. + Нет DesignerService для файла "{0}". + #{0}=file name + + + Invalid physical view name. + Недопустимое имя физического представления. + + + + Unable to create text buffer. + Невозможно создать текстовый буфер. + # com exception + + + No LocalRegistry service. + Нет службы LocalRegistry. + #exception + + + Replacing text stream failed:{0} + Сбой замены текстового потока: {0} + #exception {0}=err msg + + + Buffer is read only. + Буфер доступен только для чтения. + + + + File is already opened in an incompatible editor. + Файл уже открыт в несовместимом редакторе. + + + + Unsupported format. + Неподдерживаемый формат. + + + + Unknown Error. + Неизвестная ошибка. + + + + Unable to create the designer. {0} + Невозможно создать конструктор. {0} + # {0}=inner exception + + + Unable to check out the current file. The file may be read-only or locked, or you may need to check the file out manually. + Не удалось получить текущий файл для изменения. Возможно, файл доступен только для чтения или заблокирован, либо его следует получить вручную. + # General checkout exception message + + + Microsoft Visual Studio + Microsoft Visual Studio + Error reporting + + + Please enter an integer between 1 and 60. + Введите целое число от 1 до 60. + + + + Please enter an integer between 1 and 60. + Введите целое число от 1 до 60. + + + + Show empty environment + Показать пустую среду + These are items in a combobox (and so they don't need periods) + + + Load last loaded solution + Загрузить последнее загруженное решение + These are items in a combobox (and so they don't need periods) + + + Show New Project dialog box + Показать диалоговое окно "Создание проекта" + These are items in a combobox (and so they don't need periods) + + + Show Open Project dialog box + Показать диалоговое окно "Открытие проекта" + These are items in a combobox (and so they don't need periods) + + + Changes in Help Options will not take effect until the environment is restarted. + Чтобы изменения в параметрах справочной системы вступили в силу, необходимо перезапустить окружение. + + + + The location specified is on an invalid or read-only disk, or contains a device name reserved for the system. + Указанное место находится на недоступном или защищенном от записи диске или содержит имя устройства, зарезервированное для системы. + + + + COM + COM + + + + Component Design + Макет компонента + + + + Serialization + Сериализация + + + + Web + Веб + + + + COMClass + COMClass + + + + Expose {0} to COM. + Раскрыть {0} для COM. + + + + COM Class + COM-класс + + + + COMVisible + COMVisible + + + + Make {0} visible through COM. + Сделать {0} видимым через COM. + + + + COM Visible + Видимый для COM + + + + DispId + DispId + + + + Set explicit DispId to this {0}. + Явно задать DispId для этого {0}. + + + + DispId + DispId + + + + Value + Значение + + + + Explicit DispId value for this {0}. + Явно заданное значение DispId для этого {0}. + + + + Value + Значение + + + + DispId value should be an integer greater than or equal to 1. + Значение DispId должно быть целым числом большим или равным 1. + + + + Category + Категория + + + + Category group for the property. + Группа категорий для свойства. + + + + Category + Категория + + + + Default Event + Событие по умолчанию + + + + Default event for the class. + Событие по умолчанию для класса. + + + + Default Event + Событие по умолчанию + + + + Default Value + Значение по умолчанию + + + + Default value for the property. + Значение по умолчанию для свойства. + + + + Default Value + Значение по умолчанию + + + + NonSerialized + NonSerialized + + + + Field should not be serialized. + Поле не должно быть сериализуемым. + + + + Non Serialized + Несериализуемый + + + + Serializable + Сериализуемый + + + + Enable serialization for this {0} and its members. + Включить сериализацию для этого {0} и его элементов. + + + + Serializable + Сериализуемый + + + + WebMethod + WebMethod + + + + Expose method via web services. + Раскрыть метод через веб-службы. + + + + Web Method + Веб-метод + + + + Description + Описание + + + + Description for the Web Method. + Описание для веб-метода. + + + + Description + Описание + + + + EnableSession + EnableSession + + + + Maintain session state. + Настроить состояние сеанса. + + + + Enable Session + Включить сеанс + + + + TransactionOptions + TransactionOptions + + + + Set transaction options. + Задать параметры транзакций. + + + + Transaction Options + Параметры транзакций + + + + WebService + WebService + + + + Configure the Web Service settings. + Настроить параметры веб-службы. + + + + Web Service + Веб-служба + + + + Name + Имя + + + + Name for the web service. + Имя для веб-службы. + + + + Name + Имя + + + + Description + Описание + + + + Description for the web service. + Описание для веб-службы. + + + + Description + Описание + + + + Namespace + Пространство имен + + + + Namespace for the web service. + Пространство имен для веб-службы. + + + + Namespace + Пространство имен + + + + Default + По умолчанию + + + + Action + Действие + + + + Appearance + Вид + + + + Behavior + Поведение + + + + Data + Данные + + + + DragDrop + Перетаскивание + + + + Focus + Фокус + + + + Format + Формат + + + + Key + Ключ + + + + Layout + Макет + + + + Mouse + Мышь + + + + WindowStyle + Стиль окон + + + + (None) + (Нет) + Default Event + + + Requires: + Требуется: + + + + Name + Имя + Column names for the string table + + + Type + Тип + Column names for the string table + + + Value + Значение + Column names for the string table + + + Comment + Комментарий + Column names for the string table + + + Failed to generate file: {0} + Не удалось создать файл: {0} + + + + Editing embedded resources directly is not supported. Do you wish to convert this item to a linked resource in order to edit it? + Изменение внедренных ресурсов напрямую не поддерживается. Преобразовать этот элемент в связанный ресурс для его изменения? + + + + The current object is auto-generated and only supports renaming through the Managed Resources Editor. + Текущий объект создан автоматически и поддерживает переименование только с помощью редактора управляемых ресурсов. + + + + Cannot find the file '{0}'. It may have been moved or deleted. + Невозможно найти файл "{0}". Возможно, он был перемещен или удален. + {0} = file name and path + + + Unable to load resource from file '{0}'. + Не удается загрузить ресурс из файла "{0}". + {0} = file name and path + + + The resource name cannot be empty. + Имя ресурса не может быть пустым. + + + + There is already another resource with the name '{0}'. + Уже имеется другой ресурс с именем "{0}". + {0} = Resource name + + + The resource was not of the expected type. + Непредвиденный тип ресурса + This error can happen if, for example, you try to add foo.bmp to the resource editor, but foo.bmp is really a metafile. + + + Unable to create new resource file '{0}'. {1} + Не удается создать файл ресурсов "{0}". {1} + {0} = file name and path, {1} = additional error information + + + Unable to play the audio resource. {0} + Невозможно воспроизвести звуковой ресурс. {0} + {0} = Additional error information. + + + Resource '{0}' cannot be saved to a file. + Ресурс "{0}" нельзя сохранить в файл. + {0} = Resource name + + + The operation has been canceled by the user. + Операция была прервана пользователем. + + + + The resource value contains invalid data or has an incorrect format. + Значение ресурса введено в неправильном формате или содержит недопустимые данные. + + + + The name of the resource '{0}' cannot be used as a valid identifier, because it contains one or more invalid characters: '{1}'. Please remove or replace those characters and try again. + Имя ресурса "{0}" не может быть действительным идентификатором, так как оно содержит один или несколько недопустимых символов: "{1}". Удалите или замените эти символы и повторите попытку. + {0} = Resource name + + + Too many files specified. Please select fewer files and try again. + Указано слишком много файлов. Выберите меньше файлов и повторите попытку. + + + + Unexpected error. + Непредвиденная ошибка. + Theoretically possible but we really don't expect to happen. Unexpected, internal error. + + + Unable to load internal localized resource '{0}'. + Не удалось загрузить внутренний локализованный ресурс "{0}". + Theoretically possible but we really don't expect to happen. Unexpected, internal error. + + + The value could not be converted into a resource of type {0}. + +{1} + Значение нельзя преобразовать в ресурс с типом "{0}". + +{1} + {0} = the type that was expected by the resource editor (e.g. System.Drawing.Point) +{1} = more specific additional error message from the system + + + The value cannot be empty in a resource of type {0}. + Значение не может быть пустым в ресурсе типа {0}. + {0} = the type that was expected by the resource editor (e.g. System.Drawing.Point) + + + One or more of the selected resource values could not be cleared. + Не удалось очистить одно или несколько значений ресурса. + + + + The resource file cannot be modified at this time. + В данный момент невозможно изменить файл ресурсов. + + + + You are trying to edit a resource file that is a part of another project item (such as a form or a control). Editing this item could corrupt the project item, and you will have to recover it by hand. In addition, changes made to this resource file may be lost if further changes are made to the project item. + +Do you really want to edit this file? + Вы пытаетесь изменить файл ресурса, являющийся частью другого элемента проекта (например, формы или элемента управления). Изменение этого элемента может повредить элемент проекта, и вам потребуется восстановить его вручную. Кроме того, изменения, внесенные в этот файл ресурса, могут быть утеряны при последующем изменении элемента проекта. + +Действительно изменить этот файл? + + + + The resource '{0}' cannot be added. + Невозможно добавить ресурс "{0}". + {0} - name of the resource + + + The device does not support '{0}' files. + Устройство не поддерживает файлы "{0}". + {0} - the extension of the file name like 'tiff' + + + The resource item uses the type '{0}', which is not supported in this project. + Для элемента ресурса используется тип "{0}", который не поддерживается в этом проекте. + {0} - name of the type + + + The resource item(s) {0} cannot be saved correctly. The item(s) will be discarded. + Невозможно правильно сохранить элементы ресурса "{0}". Элементы будут отменены. + {0} - name list of the resource + + + '{0}' + "{0}" + {0} - name + + + {0}, '{1}' + {0}, "{1}" + # {0} - name list +# {1} - another name + + + (Nothing/null) + (Нет/null) + Displayed in a string table for values of Nothing/null +CONSIDER: get this from CodeDom + + + (Unknown type) + (Неизвестный тип) + This actually shouldn't be needed, but if we get an exception trying to get the type name of an entry in the resx file (not supposed to happen), then we'll display this as its type. + + + (Value cannot be displayed) + (Значение невозможно вывести на экран) + Displayed in a string table for values which cannot be edited by the user + + + Name + Имя + Columns for the "Details" view of the resource editor + + + Filename + Имя файла + Columns for the "Details" view of the resource editor + + + Type + Тип + Columns for the "Details" view of the resource editor + + + Size + Размер + Columns for the "Details" view of the resource editor + + + Comment + Комментарий + Columns for the "Details" view of the resource editor + + + Text Encoding + Кодировка текста + Columns for the "Details" view of the resource editor + + + {0} x {1} + {0} x {1} + Format string for showing a graphic's size + +# {0} = width (as an integer) +# {1} = height (as an integer) +#Example, for a bitmap of width=123, height = 456, the English version of this string would be "123x456" + + + {0} KB + {0} КБ + #Format string for showing a file's size +# {0} = length in kilobytes + + + {0} byte(s) + {0} байт + Format string for showing a file's size. +{0} = length in bytes + + + Strings + Строки + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + Images + Изображения + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + Icons + Значки + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + Audio + Звук + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + Files + Файлы + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + Other + Другое + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + &Add + Д&обавить + Add, Delete and Views button text in the main ToolStrip + + + &Remove + Уда&лить + Add, Delete and Views button text in the main ToolStrip + + + &Views + &Представления + Add, Delete and Views button text in the main ToolStrip + + + &Existing File... + &Существующий файл... + Menu items under the "Add" button + + + New &String + Создать с&троку + Menu items under the "Add" button + + + New &Image + Создать &изображение + Menu items under the "Add" button + + + &PNG Image... + &Изображение PNG... + Menu items under the "Add" button + + + &BMP Image... + &Изображение BMP... + Menu items under the "Add" button + + + &GIF Image... + &Изображение GIF... + Menu items under the "Add" button + + + &JPEG Image... + &Изображение JPEG... + Menu items under the "Add" button + + + &TIFF Image... + &Изображение TIFF... + Menu items under the "Add" button + + + New I&con... + Создать &значок... + Menu items under the "Add" button + + + New &Text File... + Создать &текстовый файл... + Menu items under the "Add" button + + + Windows Bitmap + Точечный рисунок Windows + Friendly Image types + + + EXIF Image + Изображение EXIF + Friendly Image types + + + Graphics Interchange Format + Формат GIF + Friendly Image types + + + JPEG File Interchange Format + Формат обмена файлами JPEG + Friendly Image types + + + Windows Bitmap + Точечный рисунок Windows + Friendly Image types + + + Portable Network Graphics + Формат PNG + Friendly Image types + + + Tag Image File Format + Формат TIFF + Friendly Image types + + + Icon + Значок + Friendly Image types + + + Text File + Текстовый файл + Friendly Image types + + + Binary File + Двоичный файл + + + + Wave Sound + Звукозапись + Friendly Image types + + + Linked at compile time + Скомпоновано во время компиляции + File Persistence Mode + + + Embedded in .resx + Внедрено в RESX-файл + File Persistence Mode + + + Bitmaps + Точечные рисунки + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Icons + Значки + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Audio + Звук + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Text Files + Текстовые файлы + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + All Files + Все файлы + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Windows Bitmap + Точечный рисунок Windows + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Portable Network Graphics + Формат PNG + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Graphics Interchange Format + Формат GIF + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + JPEG File Interchange Format + Формат обмена файлами JPEG + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Tag Image File Format + Формат TIFF + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Icon + Значок + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + &List + &Список + Resource editor listview view styles (like changing the view style of a folder in Windows XP) + + + &Details + С&ведения + Resource editor listview view styles (like changing the view style of a folder in Windows XP) + + + &Thumbnail + &Эскиз + Resource editor listview view styles (like changing the view style of a folder in Windows XP) + + + Managed Resources Editor + Редактор управляемых ресурсов + + + + Add existing file to resources + Добавить существующий файл к ресурсам + + + + Import file into resource '{0}' + Импорт файла в ресурс "{0}" + {0} = Name of resource being imported into + + + Export resource '{0}' to file + Экспорт ресурса "{0}" в файл + {0} = Name of resource being exported from + + + Please specify where to save the new file + Укажите, где следует сохранить новый файл + + + + The file '{0}' already exists. Do you want to replace it? + Файл "{0}" уже существует. Заменить его? + {0} = full file path and name + + + The following files already exist. Do you want to replace them? + Следующие файлы уже существуют. Заменить их? + + + + Select a folder in which to export the resources. + Выберите папку для экспорта ресурсов. + + + + Do you want to continue anyway? + Все равно продолжить? + + + + Do you want to enable strongly-typed resource generation for this file? + Включить создание ресурсов со строгим типом для этого файла? + + + + Resource '{0}' could not be loaded because the file to which it is linked could not be found: {1}. + Невозможно загрузить ресурс "{0}", так как не удалось обнаружить связанный с ним файл: {1}. + {0} = resource name that had the error, {1} = file path/name that could not be found + + + Resource '{0}' could not be instantiated. {1} + Не удалось создать экземпляр ресурса "{0}". {1} + {0} = resource name that had the error, {1} = extended error information + + + Resource '{0}' has a name that is not recommended and that may cause compilation errors in your code. Please choose another name. + Ресурс "{0}" имеет имя, которое не рекомендуется использовать, так как оно может вызвать ошибки компиляции в вашем коде. Выберите другое имя. + {0} = resource name that had the error + + + Unable to set the Custom Tool or Custom Tool Namespace properties of this file in order to change strongly-typed resource generation options. If the project file is checked in, try checking it out. + Не удалось задать свойства "Пользовательский инструмент" и "Пространство имен пользовательского инструмента" для этого файла. Они необходимы для изменения параметров создания для ресурса со строгой типизацией. Если файл проекта возвращен, попытайтесь получить его для изменения. + One possible source for this error is that source code control checkout failed or was canceled. + + + Double-click here to enable strongly-typed resources for this file. + Щелкните здесь дважды для включения ресурсов со строгим типом для этого файла. + + + + The resource name '{0}' is not a valid identifier. + Имя ресурса "{0}" не является допустимым идентификатором. + + + + {0} - Codepage {1} + {0} — кодовая страница {1} + {0} = encoding name (e.g., "Western European (Windows)"), {1} = code page # (e.g., 85001) + + + (Default) + (По умолчанию) + + + + Change resource name + Изменить имя ресурса + + + + Add {0} new resource(s) + Добавление новых ресурсов: {0} + {0} = number of resources added + + + Remove {0} resource(s) + Удаление ресурсов: {0} + {0} = number of resources removed + + + Delete values in {0} cell(s) + Удаление значений в нескольких ячейках: {0} + {0} = number of cells cleared + + + &Categories: + &Категории: + The label in the menu strip for the combobox that holds the categories of resources to display + + + Name used to identify the resource in code. + Имя, используемое для идентификации ресурса в коде. + + + + Additional information about the resource. This property is only meaningful at design time. + Дополнительные сведения о ресурсе. Это свойство имеет значение только во время разработки. + + + + Character encoding of the file. + Кодировка знаков файла. + + + + The path to the linked resource. + Путь к связанному ресурсу. + + + + Specifies whether the file resource is text or binary. + Указывает, является ли файловый ресурс текстовым или двоичным. + + + + Specifies whether the resource is embedded or linked. Embedded resources are saved in the resource file. Linked resources reside in an external location on disk. + Указывает, является ли ресурс внедренным или связанным. Внедренные ресурсы сохраняются в файле ресурсов. Связанные ресурсы хранятся на диске во внешних папках. + + + + The resource will be generated as this type in the strongly-typed resource class. For example, the resource might be generated as a String or Bitmap object. + Ресурс будет создан как данный тип в классе ресурсов строго заданного типа. Например, ресурс может быть создан как объект "Строка" или "Точечный рисунок". + + + + The value of the resource. + Значение ресурса. + + + + Unable to add a '{0}' folder to this project. + +{1} + Не удается добавить папку "{0}" в этот проект. + +{1} + {0} = name of folder trying to add (by default, this will be "Resources"), {1} = additional error information + + + Unable to add '{0}' to the project. + +{1} + Не удается добавить "{0}" в проект. + +{1} + {0} = file name and path, {1} = additional error information. + + + Unable to add '{0}' to the project. + Не удается добавить "{0}" в проект. + {0} = file name and path + + + A file with the name '{0}' already exists. Do you want to replace it? + Файл с именем "{0}" уже существует. Заменить его? + {0} = file name and path + + + {0} - Destination File Exists + {0} — файл назначения существует + {0} = Name of the editor, e.g. "Managed Resources Editor" or "Resource Picker" + + + There is already a linked file with the name "{0}" in the project folder "{1}". Do you want to remove it? + Связанный файл с именем "{0}" уже существует в папке "{1}" проекта. Удалить его? + {0} = file name (no path), {1} = Path of resource folder + + + {0} - Destination File Exists + {0} — файл назначения существует + {0} = Name of the editor, e.g. "Managed Resources Editor" or "Resource Picker" + + + Cannot find the file '{0}'. It may have been moved or deleted. + Невозможно найти файл "{0}". Возможно, он был перемещен или удален. + {0} = file name and path + + + Connection string + Строка подключения + Added as the last item in the list of available types to let the user browse for a new type + + + Web Service URL + URL-адрес веб-службы + Added as the last item in the list of available types to let the user browse for a new type + + + Browse... + Обзор... + Added as the last item in the list of available types to let the user browse for a new type + + + Application + Приложение + + + + Application (Web) + Приложение (веб) + + + + User + Пользователь + + + + User (Web) + Пользователь (веб) + + + + Name + Имя + + + + Type + Тип + + + + Scope + Область. + + + + Value + Значение + + + + Type '{0}' is not defined. + Тип "{0}" не определен. + + + + Name changed + Имя изменено + + + + Type changed + Тип изменен + + + + Scope changed + Область изменена + + + + Roaming changed + Роуминг изменен + + + + Description changed + Описание изменено + + + + Provider changed + Поставщик изменен + + + + Value changed + Значение изменено + + + + Generate default value in code changed + Создание значения по умолчанию в коде изменилось + + + + Remove {0} setting(s) + Удаление параметров: {0} + + + + Unable to load settings file. It might be corrupted or contain invalid XML or contain duplicate identifiers. + Не удается загрузить файл параметров. Возможно, он поврежден, содержит недопустимый XML-код или повторяющиеся идентификаторы. + + + + New values from the app.config file were automatically added + Автоматически добавлены новые значения из файла app.config + + + + Value of setting '{0}' was changed in the app.config file. + Значение параметра "{0}" изменилось в файле app.config. + + + + The current value in the .settings file is '{0}' +The new value in the app.config file is '{1}' + +Do you want to update the value in the .settings file? + Текущее значение в файле параметров — "{0}" +Новое значение в файле app.config — "{1}" + +Изменить это значение в файле параметров? + + + + An error occurred while reading the app.config file. The file might be corrupted or contain invalid XML. + При чтении файла app.config произошла ошибка. Возможно, файл поврежден или содержит недопустимый XML-код. + + + + An error occurred while saving values to the app.config file. The file might be corrupted or contain invalid XML. + При сохранении значений в файл app.config произошла ошибка. Возможно, файл поврежден или содержит недопустимый XML-код. + + + + There is already another setting with the name '{0}'. + Уже имеется другой параметр с именем "{0}". + + + + '{0}' is not a valid identifier. + "{0}" не является допустимым идентификатором. + + + + '{0}' is not a valid type name. + "{0}" не является допустимым именем типа. + + + + The setting name cannot be empty. + Имя параметра не может быть пустым. + + + + '{0}' cannot be converted to an instance of type '{1}'. + Невозможно преобразовать "{0}" в экземпляр типа "{1}". + + + + Generic types are not supported. + Универсальные типы не поддерживаются. + + + + Abstract types are not supported. + Абстрактные типы не поддерживаются. + + + + The current object is auto-generated and only supports renaming through the Settings Designer. + Текущий объект создан автоматически и поддерживает переименование только с помощью конструктора параметров. + + + + The current object is auto-generated and does not support modifying parameters. + Текущий объект создан автоматически и не поддерживает изменение параметров. + + + + The settings file cannot be modified at this time. + В данный момент невозможно изменить файл параметров. + + + + &Add Setting + Добавить &параметр + + + + R&emove Setting + &Удалить параметр + + + + Application settings allow you to store and retrieve property settings and other information for your application dynamically. For example, the application can save a user's color preferences, then retrieve them the next time it runs. + Параметры приложения позволяют динамически сохранять и извлекать параметры свойств и другие данные для приложения. Например, приложение может сохранять пользовательские параметры цветов и извлекать их при следующем запуске. + + + + Learn more about application settings... + Дополнительные сведения о параметрах приложений... + + + + This connection string appears to contain sensitive data (for example, a password), which is required to connect to the database. However, storing sensitive data in the connection string can be a security risk. Do you want to include sensitive data in the connection string? + Возможно, эта строка подключения содержит конфиденциальные данные (например, пароль), необходимые для подключения к базе данных. Хранение таких данных в строке подключения представляет потенциальную угрозу безопасности. Действительно включить конфиденциальные данные в строку подключения? + + + + Select a Type + Выбор типа + + + + This class allows you to handle specific events on the settings class: + Этот класс позволяет обрабатывать определенные события в классе параметров: + Comments for user part of extending generated settings class + + + The SettingChanging event is raised before a setting's value is changed. + Событие SettingChanging возникает перед изменением значения параметра. + + + + The PropertyChanged event is raised after a setting's value is changed. + Событие PropertyChanged возникает после изменения значения параметра. + + + + The SettingsLoaded event is raised after the setting values are loaded. + Событие SettingsLoaded возникает после загрузки значений параметров. + + + + The SettingsSaving event is raised before the setting values are saved. + Событие SettingsSaving возникает перед сохранением значений параметров. + + + + To add event handlers for saving and changing settings, uncomment the lines below: + Для добавления обработчиков событий для сохранения и изменения параметров раскомментируйте приведенные ниже строки: + + + + Add code to handle the SettingChangingEvent event here. + Добавьте здесь код для обработки события SettingChangingEvent. + + + + Add code to handle the SettingsSaving event here. + Добавьте здесь код для обработки события SettingsSaving. + + + + Failed to create or open file. + Не удалось создать или открыть файл. + + + + Description of the setting. + Описание параметра. + + + + Specifies whether or not the default setting value should be generated in the strongly-typed settings class. + Определяет необходимость создания используемого по умолчанию значения параметра в классе параметров строго заданного типа. + + + + Specifies the group to which this Settings file belongs. + Задает группу, к которой принадлежит этот файл параметров. + + + + Description of the group to which this Settings file belongs. + Описание группы, к которой относится этот файл параметров. + + + + Indicates whether the setting should roam when Windows roaming profiles are enabled. + Указывает, должен ли перемещаться этот параметр, если включены перемещаемые профили Windows. + + + + Name used to identify the setting. + Имя, используемое для идентификации параметра. + + + + The provider (System.Configuration.Provider.ProviderBase) used to manage the setting. + Поставщик (System.Configuration.Provider.ProviderBase) используется для управления параметром. + + + + Specifies whether the setting is per-application (read-only) or per-user (read-write). + Указывает, относится этот параметр к приложению (только чтение) или к пользователю (чтение и запись). + + + + The setting will be generated as this type in the strongly-typed settings class. For example, the setting might be generated as a String or Integer object. + Параметр будет создан как данный тип в классе параметров строго заданного типа. Например, параметр может быть создан как объект "Строка" или "Целое число". + + + + The current value for the setting. + Текущее значение для параметра. + + + + The following files will be deleted: + +{0} + Будут удалены следующие файлы: + +{0} + Synchronize with user.config file + + + No user.config files were found in any of the following locations: + +{0} + Файлы user.config не обнаружены в следующих расположениях: + +{0} + + + + One or more user.config files was not removed. + Один или несколько файлов user.config не были удалены. + + + + My.Settings Auto-Save Functionality + Функция автоматического сохранения My.Settings + in-code comment used to generate a region that hides My.Settings AutoSave functionality + + + Unable to find service '{0}'. Ensure that the application is installed correctly. + Не удается найти службу "{0}". Убедитесь, что приложение установлено правильно. + Settings Global-Object-Provider Strings + + + Default pac&kage: + Па&кет по умолчанию: + J# Specific String for Root Namespace + + + (Custom) + (Настраиваемое) + Entry in the "Accessibility dropdown" + + + No code generation + Без создания кода + Entry in the "Accessibility dropdown" + + + WPF Application + Приложение WPF + + + + (Invalid value: "{0}") + (Недопустимое значение: "{0}") + Goes into the ShutdownMode combobox + + + On explicit shutdown + При явном завершении работы + + + + On last window close + При закрытии последнего окна + + + + On main window close + При закрытии главного окна + + + + Could not find the expected root element "{0}" in the application definition file. + Не удалось найти ожидаемый корневой элемент "{0}" в файле определения приложения. + + + + The .xaml file was in an unexpected format, near line {0} column {1}. + Непредвиденный формат XAML-файла; см. строку {0}, столбец {1}. + + + + Startup &object: + Автоматически запускаемый &объект: + + + + Startup &URI: + URI &запуска: + + + + The application definition file is already opened in an incompatible editor. Please close the other editor and reload the project properties page. + Файл определения приложения уже открыт в несовместимом редакторе. Закройте другой редактор и перезагрузите страницу свойств проекта. + + + + There was an error trying to open or create the application definition file for this project. {0} + При попытке открытия или создания файла определения приложения произошла ошибка. {0} + + + + An error occurred trying to load the application definition file for this project. The file '{0}' could not be parsed. Please edit the file in the XAML editor to fix the error. + При попытке загрузки файла определения приложения для этого проекта произошла ошибка. Не удалось проанализировать файл "{0}". Чтобы исправить ошибку, измените файл в редакторе XAML. + + + + (Error) + (Ошибка) + Used inside UI elements when there is an error (e.g. combobox text) + + + An unspecified error has occurred. + Произошла неопределенная ошибка. + + + + This project does not contain an application definition file. + Проект не содержит файл определения приложения. + + + + An error occurred trying to create the application events file. {0} + При попытке создания файла событий приложения произошла ошибка. {0} + + + + Invalid argument '{0}' + Недопустимый аргумент "{0}" + {0} = name of invalid argument + + + WPF Console Application + Консольное приложение WPF + + + + WPF Class Library + Библиотека классов WPF + + + + Embed manifest with default settings + Внедрить манифест с настройками по умолчанию + + + + Create application without a manifest + Создать приложение без манифеста + + + + Invalid manifest file. + Недопустимый файл манифеста. + + + + Services + Службы + + + + Client application services enable your Windows-based applications to use the ASP.NET login (authentication), roles, and profile (settings) services. + Службы клиентских приложений позволяют использовать в Windows приложениях службы ASP.NET входа (аутентификации), ролей и профиля (настроек). + + + + Learn more about client application services... + Дополнительные сведения о службах клиентских приложений... + + + + Advanced Settings for Services + Дополнительные параметры для служб + + + + Disabling application services will clear the default services for Authentication, Roles, and Settings. Click OK to disable application services. + Отключение служб приложений очистит службы по умолчанию для проверки подлинности, ролей и параметров. Нажмите кнопку ОК для отключения служб приложений. + + + + Disable Application Services + Отключить службы приложений + + + + seconds + с + + + + minutes + мин + + + + hours + ч + + + + days + дн. + + + + To enable client application services, you must set the Target Framework for your application to .NET Framework 3.5 or later. In C#, you can do this on the Application property page. In Visual Basic, you can do this one the Compile property page by clicking Advanced Compile Options. + Чтобы обеспечить работу клиентских служб, необходимо задать в качестве требуемой версии .NET Framework для приложения .NET Framework 3.5 или более позднюю версию. В C# это можно сделать на странице свойств приложения. В Visual Basic необходимо проделать то же самое на странице свойств компилятора в разделе "Расширенные параметры компилятора". + + + + An error occurred while reading the Application configuration file. The file might be corrupted or contain invalid XML. + Произошла ошибка при чтении конфигурационного файла приложения. Возможно, файл поврежден или содержит недопустимый XML-код. + + + + The URL is invalid. Please enter a valid URL like http://microsoft.com/services + URL-адрес недопустим. Введите допустимый URL-адрес, например http://microsoft.com/services. + + + + A service URL in the application configuration file is not in the expected format. + URL службы, записанный в конфигурационном файле приложения записан в недопустимом формате. + + + + Authentication, Roles and Web Settings providers have been configured via the Application configuration file such that they do not share a common connection string. + Поставщики для аутентификации, ролей и веб-параметров сконфигурированы файлом конфигурации приложения таким образом, что они не разделяют общей строки подключения. + + + + Specify a connection string to a SQL Server database, or use the special connection string "Data Source = |SQL/CE|", which causes SQL Server Compact to generate local database files for offline storage. + Укажите строку подключения к базе данных SQL Server. Либо используйте специальную строку подключения "Data Source = |SQL/CE|". В этом случае SQL Server Compact создаст локальную базу данных для хранения вне сети. + + + + The following type names were not understood: '{0}'. Make sure you have references to these types. + Следующие имена типов не распознаны: "{0}". Убедитесь, что существуют ссылки на эти типы. + + + + There are already settings with the following names: {0}. + Уже есть параметры со следующими именами: {0}. + + + + The username/password combination cannot be authenticated. + Подлинность имени пользователя и пароля не может быть проверена. + + + + Windows Forms Application + Приложение Windows Forms + The "Windows Forms" distinguishes it from a WPF application + + + Namespace of the service reference. + Пространство имен для ссылки на службу. + + + + Service Reference Properties + Свойства ссылки службы + + + + Metadata Location Url + URL-адрес расположения метаданных + + + + Metadata Location + Расположение метаданных + + + + A service reference with multiple source urls is not supported. + Не поддерживаются ссылки на службу несколькими исходными url. + + + + Cannot change reference Url to empty. The reference url must be a valid URL. + Нельзя изменить URL-адрес ссылки на пустой. URL-адрес ссылки должен быть действительным URL-адресом. + + + + One or more files were reloaded during the checkout. Please retry your operation. + Во время извлечения был перезагружен один или несколько файлов. Повторите операцию. + + + + The project was reloaded, and some changes on this page may have been lost. + Проект был перезагружен. Возможно, некоторые изменения на этой странице были потеряны. + + + + The application will fail to run in the selected zone because of this requested elevated permission. Click the help link above for more info. + Приложению не удастся запуститься в выбранной зоне из-за запрошенного повышенного разрешения. Для просмотра дополнительных сведений нажмите ссылку справки. + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.tr.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.tr.xlf new file mode 100644 index 00000000000..689a912f21e --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.tr.xlf @@ -0,0 +1,2948 @@ + + + + + + All Files + Tüm Dosyalar + + + + Property Page + Özellik Sayfası + + + + References + Başvurular + + + + Version + Sürüm + + + + Signing + İmzalama + + + + Application + Uygulama + + + + Compile + Derleme + + + + Debug + Hata Ayıkla + + + + Deploy + Dağıtma + + + + Database + Veritabanı + + + + Security + Güvenlik + + + + Build + Derleme + + + + Build Events + Derleme Olayları + + + + Reference Paths + Başvuru Yolları + + + + Pre-build Event Command Line + Derleme Öncesi Olay Komut Satırı + + + + Post-build Event Command Line + Derleme Sonrası Olay Komut Satırı + + + + The output path is not trusted. +The application may throw security exceptions when it attempts to perform actions which require full trust. +Click OK to ignore and continue. Click CANCEL to choose a different output path. + Çıkış yolu güvenilir değil. +Uygulama, tam güven gerektiren eylemler gerçekleştirmeye çalıştığında güvenlik özel durumları oluşturabilir. +Yoksayıp devam etmek için Tamam'a tıklayın. Farklı bir çıkış yolu seçmek için İPTAL’e tıklayın. + + + + <Browse...> + <Gözat...> + + + + (None) + (Hiçbiri) + + + + <New...> + <Yeni...> + + + + <Browse...> + <Gözat...> + + + + (None) + (Hiçbiri) + + + + Active ({0}) + Etkin ({0}) + + + + All Configurations + Tüm Yapılandırmalar + + + + All Platforms + Tüm Platformlar + + + + N/A + Yok + This is used in the platform and configuration comboboxes when showing pages that don't care about the current platform/configuration + + + Could not find the configuration '{0}' for platform '{1}'. + '{1}' platformu için '{0}' yapılandırması bulunamadı. + + + + (None) + (Hiçbiri) + + + + Select File + Dosya Seçin + + + + Add existing file to project + Var olan dosyayı projeye ekle + + + + Icon Files + Simge Dosyaları + + + + Executable Files + Yürütülebilir Dosyalar + + + + Select Working Directory + Çalışma Dizini Seçin + + + + Select Output Path + Çıkış Yolu Seçin + + + + Select Reference Path + Başvuru Yolu Seçin + + + + Win32 Resource Files + Win32 Kaynak Dosyaları + + + + Add Win32 resource file to project + Projeye Win32 kaynak dosyası ekle + + + + Folder path does not exist. +Please select a valid folder path. + Klasör yolu yok. +Lütfen geçerli bir klasör yolu seçin. + + + + Advanced Compiler Settings + Gelişmiş Derleyici Ayarları + + + + Advanced Build Settings + Gelişmiş Derleme Ayarları + + + + Compiler Warnings + Derleyici Uyarıları + + + + Reference Paths + Başvuru Yolları + + + + Compatible Settings + Uyumlu Ayarlar + + + + Assembly Information + Bütünleştirilmiş Kod Bilgileri + + + + Invalid version format, expected "[Major]", "[Major].[Minor]", "[Major].[Minor].[Build]" or "[Major].[Minor].[Build].[Revision]" + Geçersiz sürüm biçimi, beklenen "[Birincil]", "[Birincil].[İkincil] "," [Birincil].[İkincil].[Derle] "veya" [Birincil].[İkincil].[Derle].[Düzeltme]" + + + + A wildcard ("*") is not allowed in this field. + Bu alanda joker karaktere ("*") izin verilmez. + + + + Each part of the version number for '{0}' must be an integer between 0 and {1}. + '{0}' için sürüm numarasının her parçası 0 ve {1} arasında bir tamsayı olmalıdır. + + + + (Default Icon) + (Varsayılan Simge) + + + + Startup object must be a form when 'Enable application framework' is checked. + Uygulama çerçevesini etkinleştir' işaretlendiğinde Başlangıç nesnesi bir form olmalı. + + + + (Not set) + (Ayarlanmadı) + + + + Icon could not be added to the project. + Simge projeye eklenemedi. + + + + Invalid icon file. + Geçersiz simge dosyası. + + + + {0} is not a valid icon file. + {0} geçerli bir simge dosyası değil. + + + + The GUID should match the format dddddddd-dddd-dddd-dddd-dddddddddddd. + GUID dddddddd-dddd-dddd-dddd-dddddddddddd biçimiyle eşleşmelidir. + + + + NOTE: This file is auto-generated; do not modify it directly. To make changes, + NOT: Bu dosya otomatik olarak oluşturulur; doğrudan değiştirmeyin. Değişiklik yapmak için, + These comments are placed in the ApplicationEvents.vb file if it is generated by the project designer. The same comments appear in the templates, under vsproject\Templates\Windows\VisualBasic\ProjectTemplates\WindowsApplication\MyEvents.vb (MyEvents.vb is renamed to ApplicationEvents.vb after project creation), and these comments should be kept in sync + + + or if you encounter build errors in this file, go to the Project Designer + veya bu dosyada derleme hatalarıyla karşılaşırsanız, Proje Tasarımcısı'na gidin + + + + (go to Project Properties or double-click the My Project node in + (Proje Özellikleri'ne gidin veya Çözüm Gezgini içerisindeki + + + + Solution Explorer), and make changes on the Application tab. + Projelerim düğümüne çift tıklayın) ve Uygulama sekmesinde değişiklikler yapın. + + + + '{0}' is not a valid identifier. Please select a different Startup form. + '{0}' geçerli bir kimlik tanımlayıcısı değil. Lütfen farklı bir Başlangıç formu seçin. + + + + '{0}' is not a valid identifier. Please select a different Splash screen form. + '{0}' geçerli bir kimlik tanımlayıcısı değil. Lütfen farklı bir Giriş ekranı formu seçin. + + + + The splash screen form cannot be the start-up form. + Giriş ekranı formu başlangıç formu olamaz. + + + + Startup f&orm: + Başlangıç f&ormu: + + + + The following events are available for MyApplication: + Şu olaylar MyApplication için kullanılabilir: + + + + Startup: Raised when the application starts, before the startup form is created. + Startup: Başlangıç formu oluşturulmadan önce, uygulama başlatıldığında tetiklenir. + + + + Shutdown: Raised after all application forms are closed. This event is not raised if the application terminates abnormally. + Shutdown: Tüm uygulama formları kapatıldıktan sonra tetiklenir. Uygulama anormal şekilde kapatılırsa bu olay tetiklenmez. + + + + UnhandledException: Raised if the application encounters an unhandled exception. + UnhandledException: Uygulama, işlenmemiş bir özel durumla karşılaşırsa tetkilenir. + + + + StartupNextInstance: Raised when launching a single-instance application and the application is already active. + StartupNextInstance: Tek örnekli bir uygulama başlatılırken ve uygulama zaten etkinken tetiklenir. + + + + NetworkAvailabilityChanged: Raised when the network connection is connected or disconnected. + NetworkAvailabilityChanged: Ağ bağlantısı etkinken ya da bağlantı kesildiğinde tetiklenir. + + + + Base address must be a hexadecimal number with less than or equal to 8 digits, for example, 0x11000000. + Temel adres 8 veya daha düşük basamaklı onaltılık bir sayı olmalıdır, örneğin, 0x11000000. + + + + None + Hiçbiri + + + + Warning + Uyarı + + + + Error + Hata + + + + (custom) + (özel) + + + + Implicit conversion + Örtük dönüştürme + + + + Late binding; call could fail at run time + Geç bağlama; çağrı çalışma zamanında başarısız olabilir + + + + Implicit type; object assumed + Örtük tür; varsayılan nesne + + + + Use of variable prior to assignment + Atama işleminden önce değişken kullanımı + + + + Function/Operator without return value + Dönüş değersiz İşlev/İşleç + + + + Unused local variable + Kullanılmayan yerel değişken + + + + Instance variable accesses shared member + Örnek değişkeni paylaşılan üyeye erişir + + + + Recursive operator or property access + Özyinelemeli işleç ya da özellik erişimi + + + + Duplicate or overlapping catch blocks + Yinelenen ya da çakışan catch blokları + + + + The warning settings for one or more configurations conflict. +Changing this setting will reset the settings in all configurations. + Bir veya daha fazla yapılandırmanın uyarı ayarları çakışıyor. +Bu ayarın değiştirilmesi, tüm yapılandırmaların ayarlarını sıfırlar. + + + + When startup form closes + Başlangıç formu kapatıldığında + + + + When last form closes + Son form kapatıldığında + + + + Windows + Windows + Authentication modes + + + Application-defined + Uygulama tanımlı + Authentication modes + + + Cancel + İptal + + + + &Calculate Permissions + İzinleri &Hesapla + + + + Stopped... + Durduruldu... + + + + Starting... + Başlatılıyor... + + + + Building... + Derleniyor... + + + + Analyzing... + Çözümleniyor... + + + + Analyze Failed + Çözümleme Başarısız + + + + Aborting... + Durduruluyor... + + + + Canceling... + İptal ediliyor... + + + + Internet + İnternet + + + + Local Intranet + Yerel İntranet + + + + (Custom) + (Özel) + Don't use + + + (Zone Default) + (Bölge Varsayılan Ayarı) + + + + Include + Dahil Et + + + + Exclude + Dışla + + + + The application will require elevated permissions to run in the selected zone. Click the help link above for more info. + Uygulamanın seçilmiş bölgede çalışabilmesi için yükseltilmiş izinler gerekecek. Daha fazla bilgi için yukarıdaki yardım bağlantısına tıklayın. + + + + This permission could not be loaded. Press the delete key to remove it from your project. + Bu izin yüklenemedi. Projenizden kaldırmak için Delete tuşuna basın. + Don't use + + + Included + Dahil edildi + + + + Permission + İzin + + + + Setting + Ayar + + + + Specify the code access security permissions that your ClickOnce application requires in order to run. Learn more about code access security... + ClickOnce uygulamanızın çalışabilmesi için gerektirdiği kod erişim güvenlik izinlerini belirtin. Kod erişim güvenliği ile ilgili daha fazla bilgi edinin... + + + + Learn more about code access security... + Kod erişim güvenliği ile ilgili daha fazla bilgi edinin... + + + + Invalid value + Geçersiz değer + + + + The SecurityPermission must be included in your application with the Execute flag set or your application will not run. Mark this permission as "Zone Default" or "Include." + Uygulamanızda SecurityPermission, Execute bayrağı ayarlanmış olarak bulunmalıdır. Aksi halde uygulamanız çalışmaz. Bu izni "Bölge Varsayılan Ayarı" veya "Dahil Et" olarak işaretleyin. + + + + The SecurityPermission must be included in your application with the Execute flag set or your application will not run. The Execute flag has been added to the SecurityPermission in your manifest. + Uygulamanızda SecurityPermission, Execute bayrağı ayarlanmış olarak bulunmalıdır. Aksi halde uygulamanız çalışmaz. Bildiriminizde SecurityPermission öğesine Execute bayrağı eklendi. + + + + This application requires full trust to run correctly. Would you like to set this as a full trust application? + Bu uygulamanın doğru çalışabilmesi için tam güven gerekir. Bunu tam güven uygulaması olarak ayarlamak istiyor musunuz? + + + + Full Trust Required + Tam Güven Gerekli + + + + An error occurred and the app.manifest file could not be saved. +Error: + Bir hata oluştu ve app.manifest dosyası kaydedilemedi. +Hata: + + + + An error occurred and the app.manifest file could not be loaded. Please remove any changes you have made to the file and reload the Security property page again. + Bir hata oluştu ve app.manifest dosyası yüklenemedi. Lütfen dosyada yaptığınız değişiklikleri kaldırın ve Security özellik sayfasını yeniden yükleyin. + + + + Included + Dahil edildi + + + + Not Included + Dahil edilmedi + + + + Included with warning + Uyarı ile dahil edildi + + + + Calculating permissions failed. + İzinler hesaplanamadı. + + + + Error + Hata + + + + Advanced Security Settings + Gelişmiş Güvenlik Ayarları + + + + Build Failed. Click CANCEL and correct the build failure before analyzing again. + Derleme Başarısız Oldu. İPTAL'e tıklayın ve yeniden çözümlemeden önce derleme hatasını düzeltin. + + + + Build completed... + Derleme tamamlandı... + + + + Unable to start the build. + Derleme başlatılamıyor. + + + + Serious error. The build must begin in order to analyze permissions. It has not started. + Önemli hata. İzinleri çözümlemek için derleme başlatılmalıdır. Başlatılmadı. + Don't use + + + (Custom) + (Özel) + Don't use + + + (None) + (Hiçbiri) + + + + Selecting existing key file + Mevcut anahtar dosyası seçiliyor + + + + Key Files + Anahtar Dosyaları + + + + Create key file + Anahtar dosyası oluştur + + + + The old password is invalid. + Eski parola geçersiz. + + + + Enter the old password. + Eski parolayı girin. + + + + Enter a new password. + Yeni parolayı girin. + + + + The new passwords do not match. Enter the password again. + Yeni parolalar eşleşmiyor. Parolayı yeniden girin. + + + + The new password must be at least 6 characters in length. Enter the password again. + Yeni parola en az 6 karakter uzunluğunda olmalıdır. Parolayı yeniden girin. + + + + Select a Certificate + Sertifika seçin + + + + Select a certificate to sign your ClickOnce manifests + ClickOnce bildirimlerinizi imzalamak için bir sertifika seçin + + + + Certificate Files + Sertifika Dosyaları + + + + Issued To + Verildiği Yer + + + + Issued By + Veren + + + + Intended Purpose + Amaç + + + + Expiration Date + Sona Erme Tarihi + + + + The password is invalid. + Parola geçersiz. + + + + Invalid password + Geçersiz parola + + + + The selected file does not contain a private key. You must choose a certificate that contains a private key. + Seçilen dosya bir özel anahtar içermiyor. Özel anahtar içeren bir sertifika seçmeniz gerekir. + + + + Invalid key + Geçersiz anahtar + + + + Certificate Creation Error + Sertifika Oluşturma Hatası + + + + <All> + <Tümü> + + + + The passwords do not match. + Parolalar eşleşmiyor. + + + + Enter a password. + Bir parola girin. + + + + Confirm the password. + Parolayı onaylayın. + + + + (none) + (hiçbiri) + + + + Enter password to open file + Dosyayı açmak için parolayı girin + + + + Enter &password to open file {0} + {0} dosyasını açmak için &parola girin + + + + Enter &password for new file {0} + Yeni {0} dosyası için &parola girin + + + + The project already contains a file with that name. Choose another certificate file or rename the file in your project. + Projede bu ada sahip bir dosya zaten var. Başka bir sertifika dosyası seçin veya projenizde dosyayı yeniden adlandırın. + + + + The file '{0}' could not be imported: {1} + '{0}' dosyası içeri aktarılamadı: {1} + + + + _TemporaryKey.pfx + _TemporaryKey.pfx + + + + The selected certificate is not valid for code signing. Choose another certificate file. + Seçilen sertifika, kod imzalamak için geçerli değil. Başka bir sertifika dosyası seçin. + + + + Change property: {0} + Özelliği değiştir: {0} + + + + Windows Application + Windows Uygulaması + + + + Windows Service + Windows Hizmeti + + + + Class Library + Sınıf Kitaplığı + + + + Console Application + Konsol Uygulaması + + + + Web Control Library + Web Denetim Kitaplığı + + + + Cannot remove '{0}'. {1} + + '{0}' kaldırılamıyor. {1} + + + + + Adding or removing '{0}' as a project import failed because of an unexpected error from the project system. The error returned was: '{1}'. + Beklenmeyen bir hata nedeniyle, proje sisteminde '{0}' öğesini proje aktarımı olarak ekleme veya kaldırma işlemi başarısız oldu. Döndürülen hata: '{1}'. + + + + Adding web reference failed. {0} + + Web başvurusu eklenemedi. {0} + + + + + Updating web reference '{0}' failed. +{1} + '{0}' web başvurusu güncelleştirilemedi. +{1} + + + + Web Reference Properties + Web Başvurusu Özellikleri + + + + Static + Statik + + + + Dynamic + Dinamik + + + + Name of the web reference + Web başvurusunun adı + + + + URL Behavior + URL Davranışı + + + + Web reference URL behavior + Web başvurusu URL davranışı + + + + Web Reference URL + Web Başvurusu URL’si + + + + Web Reference URL + Web Başvurusu URL’si + + + + Reference Properties + Başvuru Özellikleri + + + + The remote machine name cannot be blank. Please specify the name of the machine to debug remotely. + Uzak makine adı boş olamaz. Lütfen uzaktan hata ayıklama işleminin yapılacağı makinenin adını belirtin. + + + + The external program cannot be found. Please enter a valid executable file. + Dış program bulunamıyor. Lütfen geçerli bir yürütülebilir dosya girin. + + + + The external program property cannot be empty. Please enter a valid executable file. + Dış program özelliği boş olamaz. Lütfen geçerli bir yürütülebilir dosya girin. + + + + We can only debug an EXE file. Please enter a valid executable file. + Yalnızca EXE dosyalarında hata ayıklanabilir. Lütfen geçerli bir yürütülebilir dosya girin. + + + + The URL property cannot be empty. Please enter a valid URL. + URL özelliği boş olamaz. Lütfen geçerli bir URL girin. + + + + The URL is invalid. Please enter a valid URL like "http://www.microsoft.com/" + URL geçersiz. Lütfen "http://www.microsoft.com/" gibi geçerli bir URL girin + + + + The working directory you entered does not exist. Please enter a valid working directory. + Girdiğiniz çalışma dizini mevcut değil. Lütfen geçerli bir çalışma dizini girin. + + + + <The system cannot find the reference specified> + <Sistem belirtilen başvuruyu bulamıyor> + + + + Unused References + Kullanılmayan Başvurular + + + + &Remove + &Kaldır + + + + No unused references + Kullanılmayan başvuru yok + + + + Project compilation failed. Cannot determine unused references. + Proje derleme başarısız oldu. Kullanılmayan başvurular belirlenemiyor. + + + + Gathering list of unused references... + Kullanılmayan başvuruların listesi toplanıyor... + + + + Error getting unused references. + Kullanılmayan başvurular alınırken hata oluştu. + + + + Base address must be a hexadecimal number with less than or equal to 8 digits, for example, &H11000000. + Temel adres 8 veya daha düşük haneli onaltılık bir sayı olmalıdır, örneğin, &H11000000. + + + + "Resource files must have a .res file extension. Please enter a valid resource file name." + "Kaynak dosyalarının uzantısı .res olmalıdır. Lütfen geçerli bir kaynak dosyası adı girin." + + + + "The resource file entered does not exist." + "Girilen kaynak dosyası yok." + + + + Project Designer + Proje Tasarımcısı + + + + Settings + Ayarlar + + + + Resources + Kaynaklar + + + + An error occurred trying to load the project properties window. Close the window and try again. +{0} + Proje özellikleri penceresi yüklenmeye çalışılırken bir hata oluştu. Pencereyi kapatın ve tekrar deneyin. +{0} + + + + An error occurred trying to load the page. + Sayfayı yüklemeye çalışırken bir hata oluştu. + + + + The designer cannot be shown because the document for it was never loaded. + Belgesi hiç yüklenmediği için tasarımcı gösterilemiyor. + + + + This project does not contain a default resources file. Click here to create one. + Bu proje, varsayılan kaynaklar dosyası içermiyor. Oluşturmak için buraya tıklayın. + + + + This project does not contain a default settings file. Click here to create one. + Bu proje, varsayılan ayarlar dosyası içermiyor. Oluşturmak için buraya tıklayın. + + + + Could not find the file '{0}'. + '{0}' dosyası bulunamadı. + + + + The file '{0}' is already open in an editor. Please close the file and try again. + '{0}' dosyası bir düzenleyicide zaten açık. Lütfen dosyayı kapatıp yeniden deneyin. + + + + All Project Designer Pages + Tüm Proje Tasarımcısı Sayfaları + + + + More Settings + Diğer Ayarlar + + + + The requested file type is not supported in projects of this type. + İstenen dosya türü bu tür projelerde desteklenmiyor. + + + + Assembly Name + Bütünleştirilmiş Kod Adı + + + + Root Namespace + Kök Ad Alanı + + + + Startup Object + Başlangıç Nesnesi + + + + Application Icon + Uygulama Simgesi + Property Friendly Names (for transaction names) - NOTE: All of these are optional + + + Assembly Version + Bütünleştirilmiş Kod Sürümü + + + + Assembly File Version + Bütünleştirilmiş Kod Dosya Sürümü + + + + Assembly GUID + Bütünleştirilmiş Kod GUID’i + + + + Enable application framework + Uygulama çerçevesini etkinleştir + + + + External Program Path + Dış Program Yolu + + + + Start Browser With URL + Tarayıcıyı URL ile Başlat + + + + Working Directory + Çalışma Dizini + + + + Remote Machine Name + Uzak Makine Adı + + + + Project Designer Page Container + Proje Tasarımcısı Sayfa Kapsayıcısı + + + + Switch Project Designer Page + Proje Tasarımcısı Sayfasını Değiştir + + + + Allow switching between active pages of the project designer (use Ctrl+PageUp and Ctrl+PageDown) + Proje tasarımcısının etkin sayfaları arasında geçiş yapmaya izin ver (Ctrl + PageUp ve Ctrl + PageDown kullanın) + + + + {0} page: + {0} sayfası: + {0} = sub page name + + + {0} [Read Only] + {0} [Salt Okunur] + Attach a readonly to the designer caption {0}=Designer caption + + + The editor could not get the IVsTextStream for file {0}. + Düzenleyici {0} dosyası için IVsTextStream alamadı. + #exception {0}=filename + + + The editor could not get the IVsTextStream. + Düzenleyici IVsTextStream alamadı. + #exception (no file name) + + + No DesignerService for file '{0}'. + '{0}' dosyası için DesignerService yok. + #{0}=file name + + + Invalid physical view name. + Fiziksel görünüm adı geçersiz. + + + + Unable to create text buffer. + Merin arabelleği oluşturulamıyor. + # com exception + + + No LocalRegistry service. + LocalRegistry hizmeti yok. + #exception + + + Replacing text stream failed:{0} + Metin akışı değiştirilemedi:{0} + #exception {0}=err msg + + + Buffer is read only. + Ara bellek salt okunur. + + + + File is already opened in an incompatible editor. + Dosya uyumsuz bir düzenleyicide önceden açılmış. + + + + Unsupported format. + Desteklenmeyen biçim. + + + + Unknown Error. + Bilinmeyen Hata. + + + + Unable to create the designer. {0} + Tasarımcı oluşturulamıyor. {0} + # {0}=inner exception + + + Unable to check out the current file. The file may be read-only or locked, or you may need to check the file out manually. + Geçerli dosya kullanıma alınamıyor. Dosya salt okunur veya kilitli olabilir ya da dosyayı el ile kullanıma almanız gerekiyor olabilir. + # General checkout exception message + + + Microsoft Visual Studio + Microsoft Visual Studio + Error reporting + + + Please enter an integer between 1 and 60. + Lütfen 1 ile 60 arasında bir tamsayı girin. + + + + Please enter an integer between 1 and 60. + Lütfen 1 ile 60 arasında bir tamsayı girin. + + + + Show empty environment + Boş ortamı göster + These are items in a combobox (and so they don't need periods) + + + Load last loaded solution + Son yüklenen çözümü yükle + These are items in a combobox (and so they don't need periods) + + + Show New Project dialog box + Yeni Proje iletişim kutusunu göster + These are items in a combobox (and so they don't need periods) + + + Show Open Project dialog box + Proje Aç iletişim kutusunu göster + These are items in a combobox (and so they don't need periods) + + + Changes in Help Options will not take effect until the environment is restarted. + Yardım Seçenekleri'ndeki değişiklikler ortam yeniden başlatılıncaya kadar etkili olmayacaktır. + + + + The location specified is on an invalid or read-only disk, or contains a device name reserved for the system. + Belirtilen konum geçersiz veya salt okunur bir diskte veya sistem için ayrılmış bir cihaz adını içeriyor. + + + + COM + COM + + + + Component Design + Bileşen Tasarımı + + + + Serialization + Serileştirme + + + + Web + Web + + + + COMClass + COMClass + + + + Expose {0} to COM. + {0} öğesini COM'a açın. + + + + COM Class + COM Sınıfı + + + + COMVisible + COMVisible + + + + Make {0} visible through COM. + {0} öğesini COM aracılığıyla görünür yapın. + + + + COM Visible + COM Görünebilir + + + + DispId + DispId + + + + Set explicit DispId to this {0}. + Bu {0} öğesi için açık DispId ayarlayın. + + + + DispId + DispId + + + + Value + Değer + + + + Explicit DispId value for this {0}. + Bu {0} öğesi için açık DispId. + + + + Value + Değer + + + + DispId value should be an integer greater than or equal to 1. + DispId değeri 1 veya daha büyük bir tamsayı olmalıdır. + + + + Category + Kategori + + + + Category group for the property. + Özelliğin kategori grubu. + + + + Category + Kategori + + + + Default Event + Varsayılan Olay + + + + Default event for the class. + Sınıfın varsayılan olayı. + + + + Default Event + Varsayılan Olay + + + + Default Value + Varsayılan Değer + + + + Default value for the property. + Özelliğin varsayılan değeri. + + + + Default Value + Varsayılan Değer + + + + NonSerialized + NonSerialized + + + + Field should not be serialized. + Alan serileştirilmemelidir. + + + + Non Serialized + Serileştirilmemiş + + + + Serializable + Serileştirilebilir + + + + Enable serialization for this {0} and its members. + Bu {0} öğesi ve üyeleri için serileştirmeyi etkinleştirin. + + + + Serializable + Serileştirilebilir + + + + WebMethod + WebMethod + + + + Expose method via web services. + Metodu Web hizmetleri ile kullanıma sunun. + + + + Web Method + Web Metodu + + + + Description + Açıklama + + + + Description for the Web Method. + Web Metodunun açıklaması. + + + + Description + Açıklama + + + + EnableSession + EnableSession + + + + Maintain session state. + Oturum durumunu sürdürün. + + + + Enable Session + Oturumu Etkinleştir + + + + TransactionOptions + TransactionOptions + + + + Set transaction options. + İşlem seçeneklerini ayarlayın. + + + + Transaction Options + İşlem Seçenekleri + + + + WebService + WebService + + + + Configure the Web Service settings. + Web Hizmeti ayarlarını yapılandırın. + + + + Web Service + Web Hizmeti + + + + Name + Ad + + + + Name for the web service. + Web hizmetinin adı. + + + + Name + Ad + + + + Description + Açıklama + + + + Description for the web service. + Web hizmetinin açıklaması. + + + + Description + Açıklama + + + + Namespace + Ad alanı + + + + Namespace for the web service. + Web hizmetinin ad alanı. + + + + Namespace + Ad alanı + + + + Default + Varsayılan + + + + Action + Eylem + + + + Appearance + Görünüm + + + + Behavior + Davranış + + + + Data + Veri + + + + DragDrop + DragDrop + + + + Focus + Odak + + + + Format + Biçim + + + + Key + Anahtar + + + + Layout + Düzen + + + + Mouse + Fare + + + + WindowStyle + WindowStyle + + + + (None) + (Yok) + Default Event + + + Requires: + Gereksinimler: + + + + Name + Ad + Column names for the string table + + + Type + Tür + Column names for the string table + + + Value + Değer + Column names for the string table + + + Comment + Açıklama + Column names for the string table + + + Failed to generate file: {0} + Dosya oluşturulamadı: {0} + + + + Editing embedded resources directly is not supported. Do you wish to convert this item to a linked resource in order to edit it? + Ekli kaynakların doğrudan düzenlenmesi desteklenmiyor. Bu öğeyi, düzenlemek üzere bağlı bir kaynağa dönüştürmek istiyor musunuz? + + + + The current object is auto-generated and only supports renaming through the Managed Resources Editor. + Geçerli nesne otomatik olarak oluşturuldu ve yalnızca Yönetilen Kaynak Düzenleyici tarafından yeniden adlandırılması destekleniyor. + + + + Cannot find the file '{0}'. It may have been moved or deleted. + '{0}' dosyası bulunamıyor. Taşınmış veya silinmiş olabilir. + {0} = file name and path + + + Unable to load resource from file '{0}'. + '{0}' dosyasından kaynak yüklenemiyor. + {0} = file name and path + + + The resource name cannot be empty. + Kaynak adı boş olamaz. + + + + There is already another resource with the name '{0}'. + '{0}' adlı başka bir kaynak zaten var. + {0} = Resource name + + + The resource was not of the expected type. + Kaynak beklenen türde değildi. + This error can happen if, for example, you try to add foo.bmp to the resource editor, but foo.bmp is really a metafile. + + + Unable to create new resource file '{0}'. {1} + '{0}' adlı yeni kaynak dosyası oluşturulamıyor. {1} + {0} = file name and path, {1} = additional error information + + + Unable to play the audio resource. {0} + Ses kaynağı yürütülemiyor. {0} + {0} = Additional error information. + + + Resource '{0}' cannot be saved to a file. + '{0}' kaynağı dosyaya kaydedilemiyor. + {0} = Resource name + + + The operation has been canceled by the user. + İşlem kullanıcı tarafından iptal edildi. + + + + The resource value contains invalid data or has an incorrect format. + Kaynak değer geçersiz veri içeriyor ya da yanlış biçimde. + + + + The name of the resource '{0}' cannot be used as a valid identifier, because it contains one or more invalid characters: '{1}'. Please remove or replace those characters and try again. + Bir veya birden fazla geçersiz karakter içerdiği için '{0}' kaynağının adı geçerli bir tanımlayıcı olarak kullanılamıyor: '{1}'. Bu karakterleri kaldırın veya değiştirin ve yeniden deneyin. + {0} = Resource name + + + Too many files specified. Please select fewer files and try again. + Çok fazla dosya belirtildi. Lütfen daha az dosya seçin ve tekrar deneyin. + + + + Unexpected error. + Beklenmeyen hata. + Theoretically possible but we really don't expect to happen. Unexpected, internal error. + + + Unable to load internal localized resource '{0}'. + Dahili '{0}' yerelleştirilmiş kaynağı yüklenemiyor. + Theoretically possible but we really don't expect to happen. Unexpected, internal error. + + + The value could not be converted into a resource of type {0}. + +{1} + Değer, {0} türündeki kaynağa dönüştürülemedi. + +{1} + {0} = the type that was expected by the resource editor (e.g. System.Drawing.Point) +{1} = more specific additional error message from the system + + + The value cannot be empty in a resource of type {0}. + {0} türü bir kaynakta bu değer boş olamaz. + {0} = the type that was expected by the resource editor (e.g. System.Drawing.Point) + + + One or more of the selected resource values could not be cleared. + Seçili kaynak değerlerinden bir veya daha fazlası temizlenemedi. + + + + The resource file cannot be modified at this time. + Şu anda kaynak dosyası değiştirilemez. + + + + You are trying to edit a resource file that is a part of another project item (such as a form or a control). Editing this item could corrupt the project item, and you will have to recover it by hand. In addition, changes made to this resource file may be lost if further changes are made to the project item. + +Do you really want to edit this file? + Başka bir proje öğesinin parçası olan bir kaynak dosyasını düzenlemeye çalışıyorsunuz (form veya denetim gibi). Bu öğenin düzenlenmesi, proje öğesini bozabilir ve bu durumda öğeyi el ile kurtarmanız gerekir. Ayrıca, proje öğesinde başka değişiklikler yapılırsa bu kaynak dosyasında yapılan değişiklikler kaybedilebilir. + +Bu dosyayı düzenlemek istediğinizden emin misiniz? + + + + The resource '{0}' cannot be added. + '{0}' adlı kaynak eklenemiyor. + {0} - name of the resource + + + The device does not support '{0}' files. + Cihaz '{0}' dosyalarını desteklemez. + {0} - the extension of the file name like 'tiff' + + + The resource item uses the type '{0}', which is not supported in this project. + Kaynak öğesi bu projede desteklenmeyen '{0}' türünü kullanıyor. + {0} - name of the type + + + The resource item(s) {0} cannot be saved correctly. The item(s) will be discarded. + Şu kaynak öğeleri doğru şekilde kaydedilemiyor: {0}. Öğeler atılacak. + {0} - name list of the resource + + + '{0}' + '{0}' + {0} - name + + + {0}, '{1}' + {0}, '{1}' + # {0} - name list +# {1} - another name + + + (Nothing/null) + (Yok/null) + Displayed in a string table for values of Nothing/null +CONSIDER: get this from CodeDom + + + (Unknown type) + (Bilinmeyen tür) + This actually shouldn't be needed, but if we get an exception trying to get the type name of an entry in the resx file (not supposed to happen), then we'll display this as its type. + + + (Value cannot be displayed) + (Değer adı görüntülenemiyor) + Displayed in a string table for values which cannot be edited by the user + + + Name + Ad + Columns for the "Details" view of the resource editor + + + Filename + Dosya adı + Columns for the "Details" view of the resource editor + + + Type + Tür + Columns for the "Details" view of the resource editor + + + Size + Boyut + Columns for the "Details" view of the resource editor + + + Comment + Açıklama + Columns for the "Details" view of the resource editor + + + Text Encoding + Metin Kodlama + Columns for the "Details" view of the resource editor + + + {0} x {1} + {0} x {1} + Format string for showing a graphic's size + +# {0} = width (as an integer) +# {1} = height (as an integer) +#Example, for a bitmap of width=123, height = 456, the English version of this string would be "123x456" + + + {0} KB + {0} KB + #Format string for showing a file's size +# {0} = length in kilobytes + + + {0} byte(s) + {0} bayt + Format string for showing a file's size. +{0} = length in bytes + + + Strings + Dizeler + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + Images + Görüntüler + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + Icons + Simgeler + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + Audio + Ses + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + Files + Dosyalar + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + Other + Diğer + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + &Add + &Ekle + Add, Delete and Views button text in the main ToolStrip + + + &Remove + &Kaldır + Add, Delete and Views button text in the main ToolStrip + + + &Views + &Görünümler + Add, Delete and Views button text in the main ToolStrip + + + &Existing File... + &Mevcut Dosya... + Menu items under the "Add" button + + + New &String + Yeni &Dize + Menu items under the "Add" button + + + New &Image + Yeni &Resim + Menu items under the "Add" button + + + &PNG Image... + &PNG Resmi... + Menu items under the "Add" button + + + &BMP Image... + &BMP Resmi... + Menu items under the "Add" button + + + &GIF Image... + &GIF Resmi... + Menu items under the "Add" button + + + &JPEG Image... + &JPEG Resmi... + Menu items under the "Add" button + + + &TIFF Image... + &TIFF Resmi... + Menu items under the "Add" button + + + New I&con... + Yeni Si&mge... + Menu items under the "Add" button + + + New &Text File... + Yeni &Metin Dosyası... + Menu items under the "Add" button + + + Windows Bitmap + Windows Bit Eşlem + Friendly Image types + + + EXIF Image + EXIF Resmi + Friendly Image types + + + Graphics Interchange Format + Grafik Değişim Biçimi + Friendly Image types + + + JPEG File Interchange Format + JPEG Dosya Değişim Biçimi + Friendly Image types + + + Windows Bitmap + Windows Bit Eşlem + Friendly Image types + + + Portable Network Graphics + Taşınabilir Ağ Grafikleri + Friendly Image types + + + Tag Image File Format + Etiketli Resim Dosyası Biçimi + Friendly Image types + + + Icon + Simge + Friendly Image types + + + Text File + Metin Dosyası + Friendly Image types + + + Binary File + İkili Dosya + + + + Wave Sound + Ses Dalgası + Friendly Image types + + + Linked at compile time + Derleme zamanında bağlandı + File Persistence Mode + + + Embedded in .resx + .resx biçiminde eklendi + File Persistence Mode + + + Bitmaps + Bit eşlemler + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Icons + Simgeler + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Audio + Ses + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Text Files + Metin Dosyaları + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + All Files + Tüm Dosyalar + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Windows Bitmap + Windows Bit Eşlem + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Portable Network Graphics + Taşınabilir Ağ Grafikleri + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Graphics Interchange Format + Grafik Değişim Biçimi + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + JPEG File Interchange Format + JPEG Dosya Değişim Biçimi + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Tag Image File Format + Etiketli Resim Dosyası Biçimi + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Icon + Simge + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + &List + &Liste + Resource editor listview view styles (like changing the view style of a folder in Windows XP) + + + &Details + &Ayrıntılar + Resource editor listview view styles (like changing the view style of a folder in Windows XP) + + + &Thumbnail + &Küçük resim + Resource editor listview view styles (like changing the view style of a folder in Windows XP) + + + Managed Resources Editor + Yönetilen Kaynak Düzenleyicisi + + + + Add existing file to resources + Kaynaklara var olan dosya ekleme + + + + Import file into resource '{0}' + Dosyayı '{0}' kaynağına aktarma + {0} = Name of resource being imported into + + + Export resource '{0}' to file + '{0}' kaynağını dosyaya aktarma + {0} = Name of resource being exported from + + + Please specify where to save the new file + Yeni dosyanın nereye kaydedileceğini belirtin + + + + The file '{0}' already exists. Do you want to replace it? + '{0}' dosyası zaten var. Değiştirmek istiyor musunuz? + {0} = full file path and name + + + The following files already exist. Do you want to replace them? + Aşağıdaki dosyalar zaten var. Değiştirmek istiyor musunuz? + + + + Select a folder in which to export the resources. + Kaynakları dışa aktarmak için bir klasör seçin. + + + + Do you want to continue anyway? + Yine de devam etmek istiyor musunuz? + + + + Do you want to enable strongly-typed resource generation for this file? + Bu dosya için kesin tür belirtilmiş kaynak üretimini etkinleştirmek istiyor musunuz? + + + + Resource '{0}' could not be loaded because the file to which it is linked could not be found: {1}. + Bağlı olduğu dosya bulunamadığı için '{0}' kaynağı yüklenemedi: {1}. + {0} = resource name that had the error, {1} = file path/name that could not be found + + + Resource '{0}' could not be instantiated. {1} + '{0}' kaynağının örneği oluşturulamadı. {1} + {0} = resource name that had the error, {1} = extended error information + + + Resource '{0}' has a name that is not recommended and that may cause compilation errors in your code. Please choose another name. + '{0}' kaynağı önerilmeyen bir ada sahip ve bu durum, kodunuzda derleme hatalarına neden olabilir. Lütfen başka bir ad seçin. + {0} = resource name that had the error + + + Unable to set the Custom Tool or Custom Tool Namespace properties of this file in order to change strongly-typed resource generation options. If the project file is checked in, try checking it out. + Bu dosya için, kesin tür belirtilmiş kaynak oluşturma seçeneklerini değiştirmek üzere Özel Araç veya Özel Araç Ad Alanı özellikleri ayarlanamıyor. Proje dosyası iade edilmişse, dosyayı kullanıma almayı deneyin. + One possible source for this error is that source code control checkout failed or was canceled. + + + Double-click here to enable strongly-typed resources for this file. + Bu dosya ile ilgili kesin türü belirtilmiş kaynakları etkinleştirmek için buraya çift tıklayın. + + + + The resource name '{0}' is not a valid identifier. + '{0}' kaynak adı geçerli bir tanımlayıcı değil. + + + + {0} - Codepage {1} + {0} - Kod sayfası {1} + {0} = encoding name (e.g., "Western European (Windows)"), {1} = code page # (e.g., 85001) + + + (Default) + (Varsayılan) + + + + Change resource name + Kaynak adını değiştir + + + + Add {0} new resource(s) + {0} yeni kaynak ekle + {0} = number of resources added + + + Remove {0} resource(s) + {0} kaynağı kaldır + {0} = number of resources removed + + + Delete values in {0} cell(s) + {0} hücredeki değerleri sil + {0} = number of cells cleared + + + &Categories: + &Kategoriler: + The label in the menu strip for the combobox that holds the categories of resources to display + + + Name used to identify the resource in code. + Kod içindeki kaynağı tanımlamak için kullanılan ad. + + + + Additional information about the resource. This property is only meaningful at design time. + Kaynak ile ilgili ek bilgiler. Bu özellik, yalnızca tasarım zamanında kullanıldığında anlamlıdır. + + + + Character encoding of the file. + Dosyanın karakter kodlaması. + + + + The path to the linked resource. + Bağlantılı kaynak yolu. + + + + Specifies whether the file resource is text or binary. + Dosya kaynağının metin mi yoksa ikili mi olduğunu belirtir. + + + + Specifies whether the resource is embedded or linked. Embedded resources are saved in the resource file. Linked resources reside in an external location on disk. + Kaynağın ekli veya bağlı olduğunu belirtir. Ekli kaynaklar, kaynak dosyasına kaydedilir. Bağlı kaynaklar disk üzerindeki bir dış konumda bulunur. + + + + The resource will be generated as this type in the strongly-typed resource class. For example, the resource might be generated as a String or Bitmap object. + Kaynak, kesin tür belirtilmiş sınıftaki bu tür gibi oluşturulacak. Örneğin kaynak, bir Dize veya Bit Eşlem nesnesi olarak oluşturulabilir. + + + + The value of the resource. + Kaynağın değeri. + + + + Unable to add a '{0}' folder to this project. + +{1} + Bu projeye '{0}' klasörü eklenemiyor. + +{1} + {0} = name of folder trying to add (by default, this will be "Resources"), {1} = additional error information + + + Unable to add '{0}' to the project. + +{1} + '{0}' öğesi projeye eklenemiyor. + +{1} + {0} = file name and path, {1} = additional error information. + + + Unable to add '{0}' to the project. + '{0}' öğesi projeye eklenemiyor. + {0} = file name and path + + + A file with the name '{0}' already exists. Do you want to replace it? + '{0}' adlı bir dosya zaten var. Değiştirmek istiyor musunuz? + {0} = file name and path + + + {0} - Destination File Exists + {0} - Hedef Dosya Mevcut + {0} = Name of the editor, e.g. "Managed Resources Editor" or "Resource Picker" + + + There is already a linked file with the name "{0}" in the project folder "{1}". Do you want to remove it? + "{1}" proje klasöründe "{0}" adlı bir bağlı dosya zaten var. Kaldırmak istiyor musunuz? + {0} = file name (no path), {1} = Path of resource folder + + + {0} - Destination File Exists + {0} - Hedef Dosya Mevcut + {0} = Name of the editor, e.g. "Managed Resources Editor" or "Resource Picker" + + + Cannot find the file '{0}'. It may have been moved or deleted. + '{0}' dosyası bulunamıyor. Taşınmış veya silinmiş olabilir. + {0} = file name and path + + + Connection string + Bağlantı dizesi + Added as the last item in the list of available types to let the user browse for a new type + + + Web Service URL + Web Hizmeti URL’si + Added as the last item in the list of available types to let the user browse for a new type + + + Browse... + Gözat... + Added as the last item in the list of available types to let the user browse for a new type + + + Application + Uygulama + + + + Application (Web) + Uygulama (Web) + + + + User + Kullanıcı + + + + User (Web) + Kullanıcı (Web) + + + + Name + Ad + + + + Type + Tür + + + + Scope + Kapsam + + + + Value + Değer + + + + Type '{0}' is not defined. + '{0}' türü tanımlı değil. + + + + Name changed + Ad değiştirildi + + + + Type changed + Tür değiştirildi + + + + Scope changed + Kapsam değiştirildi + + + + Roaming changed + Dolaşım değiştirildi + + + + Description changed + Açıklama değiştirildi + + + + Provider changed + Sağlayıcı değiştirildi + + + + Value changed + Değer değiştirildi + + + + Generate default value in code changed + Kod içinde varsayılan değer oluşturma değişti + + + + Remove {0} setting(s) + {0} ayarı kaldır + + + + Unable to load settings file. It might be corrupted or contain invalid XML or contain duplicate identifiers. + Ayar dosyası yüklenemiyor. Dosya, bozulmuş olabilir, geçersiz bir XML içeriyor ya da yinelenen tanımlayıcılar içeriyor olabilir. + + + + New values from the app.config file were automatically added + Yeni değerler app.config dosyasından otomatik olarak eklendi + + + + Value of setting '{0}' was changed in the app.config file. + '{0}' ayarının değeri app.config dosyasında değiştirildi. + + + + The current value in the .settings file is '{0}' +The new value in the app.config file is '{1}' + +Do you want to update the value in the .settings file? + .settings dosyasındaki geçerli değer: '{0}' +app.config dosyasındaki yeni değer: '{1}' + +.settings dosyasındaki değeri güncelleştirmek istiyor musunuz? + + + + An error occurred while reading the app.config file. The file might be corrupted or contain invalid XML. + app.config dosyası okunurken bir hata oluştu. Dosya, bozuk olabilir veya geçersiz XML içeriyor olabilir. + + + + An error occurred while saving values to the app.config file. The file might be corrupted or contain invalid XML. + Değerler app.config dosyasına kaydedilirken bir hata oluştu. Dosya, bozuk olabilir veya geçersiz XML içeriyor olabilir. + + + + There is already another setting with the name '{0}'. + Zaten '{0}' adlı başka bir ayar var. + + + + '{0}' is not a valid identifier. + '{0}' geçerli bir kimlik tanımlayıcısı değil. + + + + '{0}' is not a valid type name. + '{0}', geçerli bir tür adı değil. + + + + The setting name cannot be empty. + Ayar adı boş olamaz. + + + + '{0}' cannot be converted to an instance of type '{1}'. + '{0}', '{1}' türündeki bir örneğe dönüştürülemez. + + + + Generic types are not supported. + Genel türler desteklenmez. + + + + Abstract types are not supported. + Soyut türler desteklenmez. + + + + The current object is auto-generated and only supports renaming through the Settings Designer. + Geçerli nesne otomatik olarak oluşturuldu ve yalnızca Ayarlar Tasarımcısı tarafından yeniden adlandırılmayı destekler. + + + + The current object is auto-generated and does not support modifying parameters. + Geçerli nesne otomatik olarak oluşturulduğundan parametre değiştirmeyi desteklemiyor. + + + + The settings file cannot be modified at this time. + Şu anda bu ayar dosyası değiştirilemez. + + + + &Add Setting + &Ayar Ekle + + + + R&emove Setting + A&yarı Kaldır + + + + Application settings allow you to store and retrieve property settings and other information for your application dynamically. For example, the application can save a user's color preferences, then retrieve them the next time it runs. + Uygulama ayarları, uygulamanızın özellik ayarlarını ve diğer bilgilerini dinamik şekilde depolamanıza ve almanıza olanak tanır. Örneğin uygulama, bir kullanıcının renk tercihlerini kaydedebilir ve bir sonraki çalıştırılmasında bu tercihleri alabilir. + + + + Learn more about application settings... + Uygulama ayarları hakkında daha fazla bilgi edinin... + + + + This connection string appears to contain sensitive data (for example, a password), which is required to connect to the database. However, storing sensitive data in the connection string can be a security risk. Do you want to include sensitive data in the connection string? + Bu bağlantı dizesi, veritabanına bağlanmak için gerekli olan gizli verileri (örneğin, bir parola) içeriyor gibi görünüyor. Ancak, gizli verilerin bağlantı dizesine kaydedilmesi güvenlik riski oluşturabilir. Gizli verileri bağlantı dizesine dahil etmek istiyor musunuz? + + + + Select a Type + Tür Seçin + + + + This class allows you to handle specific events on the settings class: + Bu sınıf ayarlar sınıfında belirli olayları işleyebilmenizi sağlar: + Comments for user part of extending generated settings class + + + The SettingChanging event is raised before a setting's value is changed. + SettingChanging olayı, bir ayarın değeri değiştirilmeden önce tetiklenir. + + + + The PropertyChanged event is raised after a setting's value is changed. + PropertyChanged olayı, bir ayarın değeri değiştirildikten sonra tetiklenir. + + + + The SettingsLoaded event is raised after the setting values are loaded. + SettingsLoaded olayı ayar değerleri yüklendikten sonra oluşturulur. + + + + The SettingsSaving event is raised before the setting values are saved. + SettingsSaving olayı, ayar değerleri kaydedilmeden önce tetiklenir. + + + + To add event handlers for saving and changing settings, uncomment the lines below: + Ayarları kaydetmek ve değiştirmek üzere olay işleyicileri eklemek için alttaki açıklama satırlarını kaldırın: + + + + Add code to handle the SettingChangingEvent event here. + SettingChangingEvent olayını işleyebilmek için buraya kod ekleyin. + + + + Add code to handle the SettingsSaving event here. + SettingsSaving olayını işleyebilmek için buraya kod ekleyin. + + + + Failed to create or open file. + Dosya açılamadı ya da oluşturulamadı. + + + + Description of the setting. + Ayarın açıklaması. + + + + Specifies whether or not the default setting value should be generated in the strongly-typed settings class. + Varsayılan ayar değerinin kesin türü belirtilmiş ayar sınıfı içinde oluşturulup oluşturulmadığını belirtir. + + + + Specifies the group to which this Settings file belongs. + Bu Ayarlar dosyasının hangi gruba ait olduğunu belirtir. + + + + Description of the group to which this Settings file belongs. + Bu Ayarlar dosyasının ait olduğu grubun açıklaması. + + + + Indicates whether the setting should roam when Windows roaming profiles are enabled. + Windows gezici profilleri etkinleştirildiğinde ayarın dolaşımda kullanılıp kullanılmayacağını belirtir. + + + + Name used to identify the setting. + Ayarı tanımlamak için kullanılan ad. + + + + The provider (System.Configuration.Provider.ProviderBase) used to manage the setting. + Ayarı yönetmek için kullanılan sağlayıcı (System.Configuration.Provider.ProviderBase). + + + + Specifies whether the setting is per-application (read-only) or per-user (read-write). + Bu ayarın uygulama başına mı (salt okunur) yoksa kullanıcı başına mı (oku-yaz) olduğunu belirtir. + + + + The setting will be generated as this type in the strongly-typed settings class. For example, the setting might be generated as a String or Integer object. + Ayar, kesin tür belirtilmiş ayarlar sınıfındaki bu tür gibi oluşturulacak. Örneğin ayar, bir Dize veya Tamsayı nesnesi olarak oluşturulabilir. + + + + The current value for the setting. + Ayar için geçerli değer. + + + + The following files will be deleted: + +{0} + Aşağıdaki dosyalar silinecek: + +{0} + Synchronize with user.config file + + + No user.config files were found in any of the following locations: + +{0} + Aşağıdaki konumların hiçbirinde user.config dosyası bulunamadı: + +{0} + + + + One or more user.config files was not removed. + Bir veya daha fazla user.config dosyası kaldırıldı. + + + + My.Settings Auto-Save Functionality + My.Settings Otomatik Kaydetme İşlevi + in-code comment used to generate a region that hides My.Settings AutoSave functionality + + + Unable to find service '{0}'. Ensure that the application is installed correctly. + '{0}' hizmeti bulunamıyor. Uygulamanın doğru şekilde yüklendiğinden emin olun. + Settings Global-Object-Provider Strings + + + Default pac&kage: + Varsayılan pak&et: + J# Specific String for Root Namespace + + + (Custom) + (Özel) + Entry in the "Accessibility dropdown" + + + No code generation + Kod oluşturma yok + Entry in the "Accessibility dropdown" + + + WPF Application + WPF Uygulaması + + + + (Invalid value: "{0}") + (Geçersiz değer: "{0}") + Goes into the ShutdownMode combobox + + + On explicit shutdown + Açıkça kapatıldığında + + + + On last window close + Son pencere kapatıldığında + + + + On main window close + Ana pencere kapatıldığında + + + + Could not find the expected root element "{0}" in the application definition file. + "{0}" beklenen kök öğe uygulama tanım dosyasında bulunamadı. + + + + The .xaml file was in an unexpected format, near line {0} column {1}. + .xaml dosyası beklenmedik bir biçimde; {1} sütunu, {0} satırının yanında. + + + + Startup &object: + Başlangıç &nesnesi: + + + + Startup &URI: + Başlangıç &URI’si: + + + + The application definition file is already opened in an incompatible editor. Please close the other editor and reload the project properties page. + Uygulama tanım dosyası, uyumsuz bir düzenleyicide açılmış. Lütfen diğer düzenleyiciyi kapatın ve proje özellikleri sayfasını yeniden yükleyin. + + + + There was an error trying to open or create the application definition file for this project. {0} + Bu projenin uygulama tanımı dosyasını açmaya ya da oluşturmaya çalışırken bir hata oluştu. {0} + + + + An error occurred trying to load the application definition file for this project. The file '{0}' could not be parsed. Please edit the file in the XAML editor to fix the error. + Bu proje için uygulama tanım dosyası yüklenmeye çalışılırken hata oluştu. '{0}' dosyası ayrıştırılamadı. Lütfen dosyayı XAML düzenleyicisinde düzenleyerek hatayı düzeltin. + + + + (Error) + (Hata) + Used inside UI elements when there is an error (e.g. combobox text) + + + An unspecified error has occurred. + Belirlenemeyen bir hata oluştu. + + + + This project does not contain an application definition file. + Bu proje bir uygulama tanımı dosyası içermiyor. + + + + An error occurred trying to create the application events file. {0} + Uygulama olayları dosyası oluşturulmaya çalışılırken bir hata oluştu. {0} + + + + Invalid argument '{0}' + '{0}' bağımsız değişkeni geçersiz. + {0} = name of invalid argument + + + WPF Console Application + WPF Konsol Uygulaması + + + + WPF Class Library + WPF Sınıf Kitaplığı + + + + Embed manifest with default settings + Bildirimi varsayılan ayarlarla ekle + + + + Create application without a manifest + Uygulamayı bildirim olmadan oluştur + + + + Invalid manifest file. + Bildirim dosyası geçersiz. + + + + Services + Hizmetler + + + + Client application services enable your Windows-based applications to use the ASP.NET login (authentication), roles, and profile (settings) services. + İstemci uygulama hizmetleri Windows tabanlı uygulamalarınızın ASP.NET oturum açma (kimlik doğrulaması), rol ve profil (ayarlar) hizmetlerini kullanmasını sağlar. + + + + Learn more about client application services... + İstemci uygulama hizmetleri hakkında daha fazla bilgi edinin... + + + + Advanced Settings for Services + Hizmetler için Gelişmiş Ayarlar + + + + Disabling application services will clear the default services for Authentication, Roles, and Settings. Click OK to disable application services. + Uygulama hizmetlerini devre dışı bırakmak, Kimlik Doğrulama, Roller ve Ayarlar için varsayılan hizmetleri temizleyecek. Uygulama hizmetlerini devre dışı bırakmak için Tamam'a tıklayın. + + + + Disable Application Services + Uygulama Hizmetlerini Devre Dışı Bırak + + + + seconds + saniye + + + + minutes + dakika + + + + hours + saat + + + + days + gün + + + + To enable client application services, you must set the Target Framework for your application to .NET Framework 3.5 or later. In C#, you can do this on the Application property page. In Visual Basic, you can do this one the Compile property page by clicking Advanced Compile Options. + İstemci uygulama hizmetlerini etkinleştirmek için uygulamanızın Hedef Framework'ünü .NET Framework 3.5 veya sonraki sürüme ayarlamanız gerekir. C# dilinde, bunu Uygulama özellik sayfasında yapabilirsiniz. Visual Basic'te, bunu Derle özellik sayfasında Gelişmiş Derleme Seçenekleri'ne tıklayarak yapabilirsiniz. + + + + An error occurred while reading the Application configuration file. The file might be corrupted or contain invalid XML. + Uygulama yapılandırma dosyası okunurken bir hata oluştu. Dosya bozulmuş olabilir veya geçersiz XML içerebilir. + + + + The URL is invalid. Please enter a valid URL like http://microsoft.com/services + URL geçersiz. Lütfen http://microsoft.com/services gibi geçerli bir URL girin + + + + A service URL in the application configuration file is not in the expected format. + Uygulama yapılandırma dosyasındaki bir hizmet URL'si beklenen biçimde değil. + + + + Authentication, Roles and Web Settings providers have been configured via the Application configuration file such that they do not share a common connection string. + Kimlik Doğrulama, Roller ve Web Ayarları sağlayıcıları, Uygulama yapılandırma dosyası kullanılarak ortak bağlantı dizesini paylaşmayacak şekilde yapılandırıldı. + + + + Specify a connection string to a SQL Server database, or use the special connection string "Data Source = |SQL/CE|", which causes SQL Server Compact to generate local database files for offline storage. + SQL Server veritabanına bir bağlantı dizesi belirtin veya SQL Server Compact'ın çevrimdışı depolama için yerel veritabanı dosyaları oluşturmasına neden olan "Data Source = |SQL/CE|" özel bağlantı dizesini kullanın. + + + + The following type names were not understood: '{0}'. Make sure you have references to these types. + Aşağıdaki tür adları anlaşılmadı: '{0}'. Bu türlere başvurduğunuzdan emin olun. + + + + There are already settings with the following names: {0}. + Zaten aşağıdaki adlara sahip ayarlar var: {0}. + + + + The username/password combination cannot be authenticated. + Kullanıcı adı/parola bileşimi doğrulanamıyor. + + + + Windows Forms Application + Windows Forms Uygulaması + The "Windows Forms" distinguishes it from a WPF application + + + Namespace of the service reference. + Hizmet başvurusunun isim uzayı. + + + + Service Reference Properties + Hizmet Başvurusu Özellikleri + + + + Metadata Location Url + Meta Veri Konumu URL’si + + + + Metadata Location + Meta Veri Konumu + + + + A service reference with multiple source urls is not supported. + Birden çok kaynak url'si olan hizmet başvurusu desteklenmiyor. + + + + Cannot change reference Url to empty. The reference url must be a valid URL. + Başvuru URL’si boş olarak ayarlanamıyor. Başvuru URL’si, geçerli bir URL olmalıdır. + + + + One or more files were reloaded during the checkout. Please retry your operation. + Kullanıma alma sırasında bir veya daha fazla dosya yeniden yüklendi. Lütfen işleminizi yeniden deneyin. + + + + The project was reloaded, and some changes on this page may have been lost. + Proje yeniden yüklendi, bu sayfadaki bazı değişiklikler kaybolmuş olabilir. + + + + The application will fail to run in the selected zone because of this requested elevated permission. Click the help link above for more info. + İstenen bu yükseltilmiş izin nedeniyle, uygulama seçili bölgede çalışamayacak. Daha fazla bilgi için yukarıdaki yardım bağlantısına tıklayın. + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.zh-Hans.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.zh-Hans.xlf new file mode 100644 index 00000000000..953aa3b878f --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.zh-Hans.xlf @@ -0,0 +1,2948 @@ + + + + + + All Files + 所有文件 + + + + Property Page + 属性页 + + + + References + 引用 + + + + Version + 版本 + + + + Signing + 签名 + + + + Application + 应用程序 + + + + Compile + 编译 + + + + Debug + 调试 + + + + Deploy + 部署 + + + + Database + 数据库 + + + + Security + 安全 + + + + Build + 生成 + + + + Build Events + 生成事件 + + + + Reference Paths + 引用路径 + + + + Pre-build Event Command Line + 生成前事件命令行 + + + + Post-build Event Command Line + 生成后事件命令行 + + + + The output path is not trusted. +The application may throw security exceptions when it attempts to perform actions which require full trust. +Click OK to ignore and continue. Click CANCEL to choose a different output path. + 输出路径不受信任。 +如果应用程序尝试执行需要完全信任的操作,可能会引发安全异常。 +单击“确定”可忽略并继续。单击“取消”可选择其他输出路径。 + + + + <Browse...> + <浏览...> + + + + (None) + (无) + + + + <New...> + <新建...> + + + + <Browse...> + <浏览...> + + + + (None) + (无) + + + + Active ({0}) + 活动({0}) + + + + All Configurations + 所有配置 + + + + All Platforms + 所有平台 + + + + N/A + 不可用 + This is used in the platform and configuration comboboxes when showing pages that don't care about the current platform/configuration + + + Could not find the configuration '{0}' for platform '{1}'. + 未能找到平台“{1}”的配置“{0}”。 + + + + (None) + (无) + + + + Select File + 选择文件 + + + + Add existing file to project + 将现有文件添加到项目中 + + + + Icon Files + 图标文件 + + + + Executable Files + 可执行文件 + + + + Select Working Directory + 选择工作目录 + + + + Select Output Path + 选择输出路径 + + + + Select Reference Path + 选择引用路径 + + + + Win32 Resource Files + Win32 资源文件 + + + + Add Win32 resource file to project + 将 Win32 资源文件添加到项目中 + + + + Folder path does not exist. +Please select a valid folder path. + 文件夹路径不存在。 +请选择有效的文件夹路径。 + + + + Advanced Compiler Settings + 高级编译器设置 + + + + Advanced Build Settings + 高级生成设置 + + + + Compiler Warnings + 编译器警告 + + + + Reference Paths + 引用路径 + + + + Compatible Settings + 兼容设置 + + + + Assembly Information + 程序集信息 + + + + Invalid version format, expected "[Major]", "[Major].[Minor]", "[Major].[Minor].[Build]" or "[Major].[Minor].[Build].[Revision]" + 版本格式无效,应为“[主版本]”、“[主版本].[次版本]”、“[主版本].[次版本].[内部版本]”或“[主版本].[次版本].[内部版本].[修订版]” + + + + A wildcard ("*") is not allowed in this field. + 此字段不允许使用通配符("*")。 + + + + Each part of the version number for '{0}' must be an integer between 0 and {1}. + “{0}”的版本号的每个部分都必须是介于 0 和 {1} 之间的整数。 + + + + (Default Icon) + (默认值: 图标) + + + + Startup object must be a form when 'Enable application framework' is checked. + 选中“启用应用程序框架”时,启动对象必须是窗体。 + + + + (Not set) + (未设置) + + + + Icon could not be added to the project. + 未能将图标添加到项目中。 + + + + Invalid icon file. + 无效图标文件。 + + + + {0} is not a valid icon file. + {0} 不是有效的图标文件。 + + + + The GUID should match the format dddddddd-dddd-dddd-dddd-dddddddddddd. + GUID 应匹配格式 dddddddd-dddd-dddd-dddd-dddddddddddd。 + + + + NOTE: This file is auto-generated; do not modify it directly. To make changes, + 注意:此文件是自动生成的;请勿直接进行修改。若要更改, + These comments are placed in the ApplicationEvents.vb file if it is generated by the project designer. The same comments appear in the templates, under vsproject\Templates\Windows\VisualBasic\ProjectTemplates\WindowsApplication\MyEvents.vb (MyEvents.vb is renamed to ApplicationEvents.vb after project creation), and these comments should be kept in sync + + + or if you encounter build errors in this file, go to the Project Designer + 或者如果您在此文件中遇到生成错误,请转至项目设计器 + + + + (go to Project Properties or double-click the My Project node in + (转至“项目属性”或在解决方案资源管理器中双击“我的项目”节点), + + + + Solution Explorer), and make changes on the Application tab. + 然后在“应用程序”选项卡中进行更改。 + + + + '{0}' is not a valid identifier. Please select a different Startup form. + “{0}”不是有效标识符。请选择其他启动窗体。 + + + + '{0}' is not a valid identifier. Please select a different Splash screen form. + “{0}”不是有效标识符。请选择其他初始屏幕窗体。 + + + + The splash screen form cannot be the start-up form. + 初始屏幕窗体不能是启动窗体。 + + + + Startup f&orm: + 启动窗体(&O): + + + + The following events are available for MyApplication: + 以下事件可用于 MyApplication: + + + + Startup: Raised when the application starts, before the startup form is created. + Startup:应用程序启动时在创建启动窗体之前引发。 + + + + Shutdown: Raised after all application forms are closed. This event is not raised if the application terminates abnormally. + Shutdown:在关闭所有应用程序窗体后引发。如果应用程序非正常终止,则不会引发此事件。 + + + + UnhandledException: Raised if the application encounters an unhandled exception. + UnhandledException:在应用程序遇到未经处理的异常时引发。 + + + + StartupNextInstance: Raised when launching a single-instance application and the application is already active. + StartupNextInstance:在启动单实例应用程序且应用程序已处于活动状态时引发。 + + + + NetworkAvailabilityChanged: Raised when the network connection is connected or disconnected. + NetworkAvailabilityChanged:在连接或断开网络连接时引发。 + + + + Base address must be a hexadecimal number with less than or equal to 8 digits, for example, 0x11000000. + 基址必须是十六进制数,位数小于或等于 8,如 0x11000000。 + + + + None + + + + + Warning + 警告 + + + + Error + 错误 + + + + (custom) + (自定义) + + + + Implicit conversion + 隐式转换 + + + + Late binding; call could fail at run time + 后期绑定;调用可能在运行时失败 + + + + Implicit type; object assumed + 隐式类型;假定对象 + + + + Use of variable prior to assignment + 在赋值前使用变量 + + + + Function/Operator without return value + 没有返回值的函数/运算符 + + + + Unused local variable + 未使用的局部变量 + + + + Instance variable accesses shared member + 实例变量访问共享成员 + + + + Recursive operator or property access + 递归运算符或属性访问 + + + + Duplicate or overlapping catch blocks + 重复或重叠的 catch 块 + + + + The warning settings for one or more configurations conflict. +Changing this setting will reset the settings in all configurations. + 一个或多个配置的警告设置相冲突。 +更改此设置将重置所有配置中的设置。 + + + + When startup form closes + 当启动窗体关闭时 + + + + When last form closes + 当最后一个窗体关闭时 + + + + Windows + Windows + Authentication modes + + + Application-defined + 由应用程序定义 + Authentication modes + + + Cancel + 取消 + + + + &Calculate Permissions + 计算权限(&C) + + + + Stopped... + 已停止... + + + + Starting... + 正在启动... + + + + Building... + 正在生成... + + + + Analyzing... + 正在分析... + + + + Analyze Failed + 分析失败 + + + + Aborting... + 正在中止... + + + + Canceling... + 正在取消... + + + + Internet + Internet + + + + Local Intranet + 本地 Intranet + + + + (Custom) + (自定义) + Don't use + + + (Zone Default) + (区域默认设置) + + + + Include + 包括 + + + + Exclude + 排除 + + + + The application will require elevated permissions to run in the selected zone. Click the help link above for more info. + 应用程序将需要提升的权限才能在所选区域中运行。请单击上面的帮助链接获取详细信息。 + + + + This permission could not be loaded. Press the delete key to remove it from your project. + 未能加载该权限。请按 Delete 键将其从项目中删除。 + Don't use + + + Included + 包括 + + + + Permission + 权限 + + + + Setting + 设置 + + + + Specify the code access security permissions that your ClickOnce application requires in order to run. Learn more about code access security... + 指定运行 ClickOnce 应用程序所需的代码访问安全权限。了解有关代码访问安全性的更多信息... + + + + Learn more about code access security... + 了解有关代码访问安全性的更多信息... + + + + Invalid value + 无效值 + + + + The SecurityPermission must be included in your application with the Execute flag set or your application will not run. Mark this permission as "Zone Default" or "Include." + 应用程序中必须包含 SecurityPermission,且为其设置了 Execute 标志,否则应用程序将不会运行。将此权限标记为“区域默认设置”或“包括”。 + + + + The SecurityPermission must be included in your application with the Execute flag set or your application will not run. The Execute flag has been added to the SecurityPermission in your manifest. + 应用程序中必须包含 SecurityPermission,且为其设置了 Execute 标志,否则应用程序将不会运行。已在清单中向 SecurityPermission 添加了 Execute 标志。 + + + + This application requires full trust to run correctly. Would you like to set this as a full trust application? + 此应用程序需要完全信任才能正确运行。是否将其设置为完全信任的应用程序? + + + + Full Trust Required + 需要完全信任 + + + + An error occurred and the app.manifest file could not be saved. +Error: + 出错,无法保存 app.manifest 文件。 +错误: + + + + An error occurred and the app.manifest file could not be loaded. Please remove any changes you have made to the file and reload the Security property page again. + 出错,无法加载 app.manifest 文件。请删除已对该文件进行的所有更改,然后重新加载“安全”属性页。 + + + + Included + 包括 + + + + Not Included + 不包括 + + + + Included with warning + 包括警告 + + + + Calculating permissions failed. + 计算权限失败。 + + + + Error + 错误 + + + + Advanced Security Settings + 高级安全设置 + + + + Build Failed. Click CANCEL and correct the build failure before analyzing again. + 生成失败。请单击“取消”并更正生成错误,然后重新分析。 + + + + Build completed... + 生成完毕... + + + + Unable to start the build. + 无法启动生成。 + + + + Serious error. The build must begin in order to analyze permissions. It has not started. + 错误。必须先开始生成才可以分析权限。生成尚未启动。 + Don't use + + + (Custom) + (自定义) + Don't use + + + (None) + (无) + + + + Selecting existing key file + 选择现有密钥文件 + + + + Key Files + 密钥文件 + + + + Create key file + 创建密钥文件 + + + + The old password is invalid. + 旧密码无效。 + + + + Enter the old password. + 请输入旧密码。 + + + + Enter a new password. + 请输入新密码。 + + + + The new passwords do not match. Enter the password again. + 新密码不匹配。请重新输入密码。 + + + + The new password must be at least 6 characters in length. Enter the password again. + 新密码的长度必须至少为 6 个字符。请重新输入密码。 + + + + Select a Certificate + 选择证书 + + + + Select a certificate to sign your ClickOnce manifests + 选择证书来为 ClickOnce 清单签名 + + + + Certificate Files + 创建文件 + + + + Issued To + 颁发对象 + + + + Issued By + 颁发者 + + + + Intended Purpose + 目的 + + + + Expiration Date + 到期日期 + + + + The password is invalid. + 密码无效。 + + + + Invalid password + 无效密码 + + + + The selected file does not contain a private key. You must choose a certificate that contains a private key. + 所选文件未包含私钥。必须选择包含私钥的证书。 + + + + Invalid key + 无效密钥 + + + + Certificate Creation Error + 证书创建错误 + + + + <All> + <全部> + + + + The passwords do not match. + 密码不匹配。 + + + + Enter a password. + 请输入密码。 + + + + Confirm the password. + 确认密码。 + + + + (none) + (无) + + + + Enter password to open file + 输入密码以打开文件 + + + + Enter &password to open file {0} + 输入密码(&P)以打开文件 {0} + + + + Enter &password for new file {0} + 输入新文件 {0} 的密码(&P) + + + + The project already contains a file with that name. Choose another certificate file or rename the file in your project. + 项目已包含具有该名称的文件。请选择其他证书文件或重命名项目中的文件。 + + + + The file '{0}' could not be imported: {1} + 未能导入文件“{0}”: {1} + + + + _TemporaryKey.pfx + _TemporaryKey.pfx + + + + The selected certificate is not valid for code signing. Choose another certificate file. + 所选证书对代码签名无效。请另行选择证书文件。 + + + + Change property: {0} + 更改属性: {0} + + + + Windows Application + Windows 应用程序 + + + + Windows Service + Windows 服务 + + + + Class Library + 类库 + + + + Console Application + 控制台应用程序 + + + + Web Control Library + Web 控件库 + + + + Cannot remove '{0}'. {1} + + 无法删除“{0}”。{1} + + + + + Adding or removing '{0}' as a project import failed because of an unexpected error from the project system. The error returned was: '{1}'. + 由于项目系统中发生意外错误,未能将“{0}”作为项目导入进行添加或删除。返回的错误为:“{1}” + + + + Adding web reference failed. {0} + + 添加 Web 引用失败。{0} + + + + + Updating web reference '{0}' failed. +{1} + 更新 Web 引用“{0}”失败。 +{1} + + + + Web Reference Properties + Web 引用属性 + + + + Static + 静态 + + + + Dynamic + 动态 + + + + Name of the web reference + Web 引用的名称 + + + + URL Behavior + URL 行为 + + + + Web reference URL behavior + Web 引用 URL 行为 + + + + Web Reference URL + Web 引用 URL + + + + Web Reference URL + Web 引用 URL + + + + Reference Properties + 引用属性 + + + + The remote machine name cannot be blank. Please specify the name of the machine to debug remotely. + 远程计算机名称不能为空。请指定要远程调试的计算机的名称。 + + + + The external program cannot be found. Please enter a valid executable file. + 未能找到外部程序。请输入有效的可执行文件。 + + + + The external program property cannot be empty. Please enter a valid executable file. + 外部程序属性不能为空。请输入有效的可执行文件。 + + + + We can only debug an EXE file. Please enter a valid executable file. + 只能调试 EXE 文件。请输入有效的可执行文件。 + + + + The URL property cannot be empty. Please enter a valid URL. + URL 属性不能为空。请输入有效的 URL + + + + The URL is invalid. Please enter a valid URL like "http://www.microsoft.com/" + URL 无效。请输入有效的 URL,如“http://www.microsoft.com/” + + + + The working directory you entered does not exist. Please enter a valid working directory. + 输入的工作目录不存在。请输入有效的工作目录。 + + + + <The system cannot find the reference specified> + <系统无法找到指定的引用> + + + + Unused References + 未使用的引用 + + + + &Remove + 删除(&R) + + + + No unused references + 没有未使用的引用 + + + + Project compilation failed. Cannot determine unused references. + 项目编译失败。无法确定未使用的引用。 + + + + Gathering list of unused references... + 正在收集未使用的引用的列表... + + + + Error getting unused references. + 获取未使用的引用时出错。 + + + + Base address must be a hexadecimal number with less than or equal to 8 digits, for example, &H11000000. + 基址必须是十六进制数,位数小于或等于 8,如 H11000000(&H)。 + + + + "Resource files must have a .res file extension. Please enter a valid resource file name." + “资源文件必须具有文件扩展名 .res。请输入有效的资源文件名。” + + + + "The resource file entered does not exist." + "输入的资源文件不存在。" + + + + Project Designer + 项目设计器 + + + + Settings + 设置 + + + + Resources + 资源 + + + + An error occurred trying to load the project properties window. Close the window and try again. +{0} + 尝试加载项目属性窗口时出错。请关闭窗口并重试。 +{0} + + + + An error occurred trying to load the page. + 尝试加载该页时出错。 + + + + The designer cannot be shown because the document for it was never loaded. + 由于从未加载设计器的文档,因此无法显示设计器。 + + + + This project does not contain a default resources file. Click here to create one. + 此项目不包含默认的资源文件。单击此处可进行创建。 + + + + This project does not contain a default settings file. Click here to create one. + 此项目不包含默认的设置文件。单击此处可进行创建。 + + + + Could not find the file '{0}'. + 未能找到文件“{0}”。 + + + + The file '{0}' is already open in an editor. Please close the file and try again. + 文件“{0}”已在某个编辑器中打开。请关闭文件并重试。 + + + + All Project Designer Pages + 所有项目设计器页 + + + + More Settings + 更多设置 + + + + The requested file type is not supported in projects of this type. + 此类项目中不支持所请求的文件类型。 + + + + Assembly Name + 程序集名称 + + + + Root Namespace + 根命名空间 + + + + Startup Object + 启动对象 + + + + Application Icon + 应用程序图标 + Property Friendly Names (for transaction names) - NOTE: All of these are optional + + + Assembly Version + 程序集版本 + + + + Assembly File Version + 程序集文件版本 + + + + Assembly GUID + 程序集 GUID + + + + Enable application framework + 启用应用程序框架 + + + + External Program Path + 外部程序路径 + + + + Start Browser With URL + 使用 URL启动浏览器 + + + + Working Directory + 工作目录 + + + + Remote Machine Name + 远程计算机名称 + + + + Project Designer Page Container + 项目设计器页容器 + + + + Switch Project Designer Page + 切换项目设计器页 + + + + Allow switching between active pages of the project designer (use Ctrl+PageUp and Ctrl+PageDown) + 允许在项目设计器的活动页之间进行切换(使用 Ctrl+PageUp 和 Ctrl+PageDown) + + + + {0} page: + {0} 页: + {0} = sub page name + + + {0} [Read Only] + {0} [只读] + Attach a readonly to the designer caption {0}=Designer caption + + + The editor could not get the IVsTextStream for file {0}. + 编辑器未能获取文件 {0} 的 IVsTextStream。 + #exception {0}=filename + + + The editor could not get the IVsTextStream. + 编辑器未能获取 IVsTextStream。 + #exception (no file name) + + + No DesignerService for file '{0}'. + 没有用于文件“{0}”的 DesignerService。 + #{0}=file name + + + Invalid physical view name. + 物理视图名无效。 + + + + Unable to create text buffer. + 无法创建文本缓冲区。 + # com exception + + + No LocalRegistry service. + 无 LocalRegistry 服务。 + #exception + + + Replacing text stream failed:{0} + 替换文本流失败: {0} + #exception {0}=err msg + + + Buffer is read only. + 缓冲区为只读。 + + + + File is already opened in an incompatible editor. + 已经在不兼容的编辑器中打开了文件。 + + + + Unsupported format. + 不支持的格式。 + + + + Unknown Error. + 未知错误。 + + + + Unable to create the designer. {0} + 无法创建设计器。 {0} + # {0}=inner exception + + + Unable to check out the current file. The file may be read-only or locked, or you may need to check the file out manually. + 无法签出当前文件。该文件可能为只读或已锁定,或者可能需要手动签出文件。 + # General checkout exception message + + + Microsoft Visual Studio + Microsoft Visual Studio + Error reporting + + + Please enter an integer between 1 and 60. + 请输入 1 到 60 之间的整数。 + + + + Please enter an integer between 1 and 60. + 请输入 1 到 60 之间的整数。 + + + + Show empty environment + 显示空环境 + These are items in a combobox (and so they don't need periods) + + + Load last loaded solution + 加载上一次加载的解决方案 + These are items in a combobox (and so they don't need periods) + + + Show New Project dialog box + 显示“新建项目”对话框 + These are items in a combobox (and so they don't need periods) + + + Show Open Project dialog box + 显示“打开项目”对话框 + These are items in a combobox (and so they don't need periods) + + + Changes in Help Options will not take effect until the environment is restarted. + 重新启动环境之后,帮助选项中的更改才会生效。 + + + + The location specified is on an invalid or read-only disk, or contains a device name reserved for the system. + 所指定的位置在无效或只读的磁盘上,或者包含为系统保留的设备名。 + + + + COM + COM + + + + Component Design + 组件设计 + + + + Serialization + 序列化 + + + + Web + Web + + + + COMClass + COMClass + + + + Expose {0} to COM. + 将 {0} 向 COM 公开。 + + + + COM Class + COM 类 + + + + COMVisible + COMVisible + + + + Make {0} visible through COM. + 使 {0} 在整个 COM 中可见。 + + + + COM Visible + COM 可见 + + + + DispId + DispId + + + + Set explicit DispId to this {0}. + 将显式 DispId 设置为此 {0}。 + + + + DispId + DispId + + + + Value + + + + + Explicit DispId value for this {0}. + 此 {0} 的显式 DispId 值。 + + + + Value + + + + + DispId value should be an integer greater than or equal to 1. + DispId 值应该是大于或等于 1 的整数。 + + + + Category + 类别 + + + + Category group for the property. + 属性的类别组。 + + + + Category + 类别 + + + + Default Event + 默认事件 + + + + Default event for the class. + 类的默认事件。 + + + + Default Event + 默认事件 + + + + Default Value + 默认值 + + + + Default value for the property. + 属性的默认值。 + + + + Default Value + 默认值 + + + + NonSerialized + NonSerialized + + + + Field should not be serialized. + 字段不应序列化。 + + + + Non Serialized + 未序列化 + + + + Serializable + 可序列化 + + + + Enable serialization for this {0} and its members. + 为此 {0} 及其成员启用序列化。 + + + + Serializable + 可序列化 + + + + WebMethod + WebMethod + + + + Expose method via web services. + 通过 Web 服务公开方法。 + + + + Web Method + Web 方法 + + + + Description + 说明 + + + + Description for the Web Method. + Web 方法的说明。 + + + + Description + 说明 + + + + EnableSession + EnableSession + + + + Maintain session state. + 维护会话状态。 + + + + Enable Session + 启用会话 + + + + TransactionOptions + TransactionOptions + + + + Set transaction options. + 设置事务选项。 + + + + Transaction Options + 事务选项 + + + + WebService + WebService + + + + Configure the Web Service settings. + 配置 Web 服务设置。 + + + + Web Service + Web 服务 + + + + Name + 名称 + + + + Name for the web service. + Web 服务的名称。 + + + + Name + 名称 + + + + Description + 说明 + + + + Description for the web service. + Web 服务的说明。 + + + + Description + 说明 + + + + Namespace + 命名空间 + + + + Namespace for the web service. + Web 服务的命名空间。 + + + + Namespace + 命名空间 + + + + Default + 默认值 + + + + Action + 操作 + + + + Appearance + 外观 + + + + Behavior + 行为 + + + + Data + 数据 + + + + DragDrop + 拖放 + + + + Focus + 焦点 + + + + Format + 格式 + + + + Key + + + + + Layout + 布局 + + + + Mouse + 鼠标 + + + + WindowStyle + WindowStyle + + + + (None) + (无) + Default Event + + + Requires: + 要求: + + + + Name + 名称 + Column names for the string table + + + Type + 类型 + Column names for the string table + + + Value + + Column names for the string table + + + Comment + 注释 + Column names for the string table + + + Failed to generate file: {0} + 未能生成文件: {0} + + + + Editing embedded resources directly is not supported. Do you wish to convert this item to a linked resource in order to edit it? + 不支持直接编辑嵌入的资源。是否将此项转换为链接资源,以便对其进行编辑? + + + + The current object is auto-generated and only supports renaming through the Managed Resources Editor. + 当前对象是自动生成的,只支持通过托管资源编辑器重命名。 + + + + Cannot find the file '{0}'. It may have been moved or deleted. + 无法找到文件“{0}”。该文件可能已被移动或删除。 + {0} = file name and path + + + Unable to load resource from file '{0}'. + 无法从文件“{0}”加载资源。 + {0} = file name and path + + + The resource name cannot be empty. + 资源名称不能是空的。 + + + + There is already another resource with the name '{0}'. + 已经存在使用名称“{0}”的其他资源。 + {0} = Resource name + + + The resource was not of the expected type. + 资源不是需要的类型。 + This error can happen if, for example, you try to add foo.bmp to the resource editor, but foo.bmp is really a metafile. + + + Unable to create new resource file '{0}'. {1} + 无法创建新的资源文件“{0}”。 {1} + {0} = file name and path, {1} = additional error information + + + Unable to play the audio resource. {0} + 无法播放音频资源。 {0} + {0} = Additional error information. + + + Resource '{0}' cannot be saved to a file. + 无法将资源“{0}”保存到文件中。 + {0} = Resource name + + + The operation has been canceled by the user. + 用户已取消该操作。 + + + + The resource value contains invalid data or has an incorrect format. + 资源值包含无效数据或格式不正确。 + + + + The name of the resource '{0}' cannot be used as a valid identifier, because it contains one or more invalid characters: '{1}'. Please remove or replace those characters and try again. + 资源“{0}”的名称无法用作有效的标识符,因为其含有一个或多个无效字符:“{1}”。请删除或替换这些字符,然后重试。 + {0} = Resource name + + + Too many files specified. Please select fewer files and try again. + 指定的文件过多。请少选一些文件,然后重试。 + + + + Unexpected error. + 意外错误。 + Theoretically possible but we really don't expect to happen. Unexpected, internal error. + + + Unable to load internal localized resource '{0}'. + 无法加载内部本地化资源“{0}”。 + Theoretically possible but we really don't expect to happen. Unexpected, internal error. + + + The value could not be converted into a resource of type {0}. + +{1} + 未能将该值转换为 {0} 类型的资源。 + +{1} + {0} = the type that was expected by the resource editor (e.g. System.Drawing.Point) +{1} = more specific additional error message from the system + + + The value cannot be empty in a resource of type {0}. + 该值在 {0} 类型的资源中不能是空的。 + {0} = the type that was expected by the resource editor (e.g. System.Drawing.Point) + + + One or more of the selected resource values could not be cleared. + 未能清除一个或多个选定资源值。 + + + + The resource file cannot be modified at this time. + 此时无法修改资源文件。 + + + + You are trying to edit a resource file that is a part of another project item (such as a form or a control). Editing this item could corrupt the project item, and you will have to recover it by hand. In addition, changes made to this resource file may be lost if further changes are made to the project item. + +Do you really want to edit this file? + 尝试编辑的某个资源文件是另一个项目项(如窗体或控件)的一部分。编辑此项可能会损坏该项目项,之后将不得不手动将其恢复。此外,如果对该项目项做进一步更改,则对此资源文件所做的更改可能会丢失。 + +确实要编辑此文件吗? + + + + The resource '{0}' cannot be added. + 无法添加资源“{0}”。 + {0} - name of the resource + + + The device does not support '{0}' files. + 设备不支持“{0}”文件。 + {0} - the extension of the file name like 'tiff' + + + The resource item uses the type '{0}', which is not supported in this project. + 资源项使用“{0}”类型,但该类型在此项目中不受支持。 + {0} - name of the type + + + The resource item(s) {0} cannot be saved correctly. The item(s) will be discarded. + 无法正确保存资源项 {0}。将弃用此项(或这些项)。 + {0} - name list of the resource + + + '{0}' + “{0}” + {0} - name + + + {0}, '{1}' + {0},“{1}” + # {0} - name list +# {1} - another name + + + (Nothing/null) + (Nothing/null) + Displayed in a string table for values of Nothing/null +CONSIDER: get this from CodeDom + + + (Unknown type) + (未知类型) + This actually shouldn't be needed, but if we get an exception trying to get the type name of an entry in the resx file (not supposed to happen), then we'll display this as its type. + + + (Value cannot be displayed) + (无法显示值) + Displayed in a string table for values which cannot be edited by the user + + + Name + 名称 + Columns for the "Details" view of the resource editor + + + Filename + 文件名 + Columns for the "Details" view of the resource editor + + + Type + 类型 + Columns for the "Details" view of the resource editor + + + Size + 大小 + Columns for the "Details" view of the resource editor + + + Comment + 注释 + Columns for the "Details" view of the resource editor + + + Text Encoding + 文本编码 + Columns for the "Details" view of the resource editor + + + {0} x {1} + {0} x {1} + Format string for showing a graphic's size + +# {0} = width (as an integer) +# {1} = height (as an integer) +#Example, for a bitmap of width=123, height = 456, the English version of this string would be "123x456" + + + {0} KB + {0} KB + #Format string for showing a file's size +# {0} = length in kilobytes + + + {0} byte(s) + {0} 字节 + Format string for showing a file's size. +{0} = length in bytes + + + Strings + 字符串 + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + Images + 图像 + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + Icons + 图标 + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + Audio + 音频 + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + Files + 文件 + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + Other + 其他 + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + &Add + 添加(&A) + Add, Delete and Views button text in the main ToolStrip + + + &Remove + 删除(&R) + Add, Delete and Views button text in the main ToolStrip + + + &Views + 视图(&V) + Add, Delete and Views button text in the main ToolStrip + + + &Existing File... + 现有文件(&E)... + Menu items under the "Add" button + + + New &String + 新建字符串(&S) + Menu items under the "Add" button + + + New &Image + 新建图像(&I) + Menu items under the "Add" button + + + &PNG Image... + PNG 图像(&P)... + Menu items under the "Add" button + + + &BMP Image... + BMP 图像(&B)... + Menu items under the "Add" button + + + &GIF Image... + GIF 图像(&G)... + Menu items under the "Add" button + + + &JPEG Image... + JPEG 图像(&J)... + Menu items under the "Add" button + + + &TIFF Image... + TIFF 图像(&T)... + Menu items under the "Add" button + + + New I&con... + 新建图标(&C)... + Menu items under the "Add" button + + + New &Text File... + 新建文本文件(&T)... + Menu items under the "Add" button + + + Windows Bitmap + Windows 位图 + Friendly Image types + + + EXIF Image + EXIF 图像 + Friendly Image types + + + Graphics Interchange Format + 图形交换格式 + Friendly Image types + + + JPEG File Interchange Format + JPEG 文件交换格式 + Friendly Image types + + + Windows Bitmap + Windows 位图 + Friendly Image types + + + Portable Network Graphics + 可移植网络图形 + Friendly Image types + + + Tag Image File Format + 标记图像文件格式 + Friendly Image types + + + Icon + 图标 + Friendly Image types + + + Text File + 文本文件 + Friendly Image types + + + Binary File + 二进制文件 + + + + Wave Sound + 波形声音 + Friendly Image types + + + Linked at compile time + 在编译时链接 + File Persistence Mode + + + Embedded in .resx + 嵌入在 .resx 中 + File Persistence Mode + + + Bitmaps + 位图 + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Icons + 图标 + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Audio + 音频 + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Text Files + 文本文件 + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + All Files + 所有文件 + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Windows Bitmap + Windows 位图 + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Portable Network Graphics + 可移植网络图形 + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Graphics Interchange Format + 图形交换格式 + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + JPEG File Interchange Format + JPEG 文件交换格式 + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Tag Image File Format + 标记图像文件格式 + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Icon + 图标 + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + &List + 列表(&L) + Resource editor listview view styles (like changing the view style of a folder in Windows XP) + + + &Details + 详细信息(&D) + Resource editor listview view styles (like changing the view style of a folder in Windows XP) + + + &Thumbnail + 缩略图(&T) + Resource editor listview view styles (like changing the view style of a folder in Windows XP) + + + Managed Resources Editor + 托管资源编辑器 + + + + Add existing file to resources + 将现有文件添加到资源中 + + + + Import file into resource '{0}' + 将文件导入到资源“{0}”中 + {0} = Name of resource being imported into + + + Export resource '{0}' to file + 将资源“{0}”导出到文件中 + {0} = Name of resource being exported from + + + Please specify where to save the new file + 请指定保存新文件的位置 + + + + The file '{0}' already exists. Do you want to replace it? + 文件“{0}”已经存在。是否替换它? + {0} = full file path and name + + + The following files already exist. Do you want to replace them? + 以下文件已经存在。是否替换它们? + + + + Select a folder in which to export the resources. + 选择要将资源导出到的文件夹。 + + + + Do you want to continue anyway? + 是否仍要继续? + + + + Do you want to enable strongly-typed resource generation for this file? + 是否为此文件启用强类型资源生成? + + + + Resource '{0}' could not be loaded because the file to which it is linked could not be found: {1}. + 由于未能找到资源“{0}”链接到的文件,未能加载该资源: {1}。 + {0} = resource name that had the error, {1} = file path/name that could not be found + + + Resource '{0}' could not be instantiated. {1} + 未能实例化资源“{0}”。 {1} + {0} = resource name that had the error, {1} = extended error information + + + Resource '{0}' has a name that is not recommended and that may cause compilation errors in your code. Please choose another name. + 资源“{0}”具有不建议使用的名称,可能会导致代码中出现编译错误。请选择其他名称。 + {0} = resource name that had the error + + + Unable to set the Custom Tool or Custom Tool Namespace properties of this file in order to change strongly-typed resource generation options. If the project file is checked in, try checking it out. + 无法设置此文件的“自定义工具”或“自定义工具命名空间”属性以更改强类型资源生成选项。如果已签入此项目文件,请尝试将它签出。 + One possible source for this error is that source code control checkout failed or was canceled. + + + Double-click here to enable strongly-typed resources for this file. + 双击此处可为此文件启用强类型资源。 + + + + The resource name '{0}' is not a valid identifier. + 资源名称“{0}”不是有效的标识符。 + + + + {0} - Codepage {1} + {0} - 代码页 {1} + {0} = encoding name (e.g., "Western European (Windows)"), {1} = code page # (e.g., 85001) + + + (Default) + (默认值) + + + + Change resource name + 更改资源名称 + + + + Add {0} new resource(s) + 添加 {0} 个新资源 + {0} = number of resources added + + + Remove {0} resource(s) + 移除 {0} 个新资源 + {0} = number of resources removed + + + Delete values in {0} cell(s) + 删除 {0} 个单元格中的值 + {0} = number of cells cleared + + + &Categories: + 类别(&C): + The label in the menu strip for the combobox that holds the categories of resources to display + + + Name used to identify the resource in code. + 用于在代码中标识资源的名称。 + + + + Additional information about the resource. This property is only meaningful at design time. + 关于该资源的附加信息。此属性仅在设计时有意义。 + + + + Character encoding of the file. + 文件的字符编码。 + + + + The path to the linked resource. + 指向链接资源的路径。 + + + + Specifies whether the file resource is text or binary. + 指定文件资源是文本格式还是二进制格式。 + + + + Specifies whether the resource is embedded or linked. Embedded resources are saved in the resource file. Linked resources reside in an external location on disk. + 指定资源是嵌入的资源还是链接的资源。嵌入的资源保存在资源文件中。链接的资源驻留在磁盘的外部位置。 + + + + The resource will be generated as this type in the strongly-typed resource class. For example, the resource might be generated as a String or Bitmap object. + 在强类型资源类中,资源将生成为此类型。例如,资源可能生成为 String 对象或 Bitmap 对象。 + + + + The value of the resource. + 资源的值。 + + + + Unable to add a '{0}' folder to this project. + +{1} + 无法将“{0}”文件夹添加到此项目中。 + +{1} + {0} = name of folder trying to add (by default, this will be "Resources"), {1} = additional error information + + + Unable to add '{0}' to the project. + +{1} + 无法将“{0}”添加到项目中。 + +{1} + {0} = file name and path, {1} = additional error information. + + + Unable to add '{0}' to the project. + 无法将“{0}”添加到项目中。 + {0} = file name and path + + + A file with the name '{0}' already exists. Do you want to replace it? + 名为“{0}”的文件已存在。是否替换它? + {0} = file name and path + + + {0} - Destination File Exists + {0} - 目标文件已存在 + {0} = Name of the editor, e.g. "Managed Resources Editor" or "Resource Picker" + + + There is already a linked file with the name "{0}" in the project folder "{1}". Do you want to remove it? + 项目文件夹“{1}”中已经有一个名为“{0}”的链接文件。是否删除它? + {0} = file name (no path), {1} = Path of resource folder + + + {0} - Destination File Exists + {0} - 目标文件已存在 + {0} = Name of the editor, e.g. "Managed Resources Editor" or "Resource Picker" + + + Cannot find the file '{0}'. It may have been moved or deleted. + 无法找到文件“{0}”。该文件可能已被移动或删除。 + {0} = file name and path + + + Connection string + 连接字符串 + Added as the last item in the list of available types to let the user browse for a new type + + + Web Service URL + Web 服务 URL + Added as the last item in the list of available types to let the user browse for a new type + + + Browse... + 浏览... + Added as the last item in the list of available types to let the user browse for a new type + + + Application + 应用程序 + + + + Application (Web) + 应用程序 (Web) + + + + User + 用户 + + + + User (Web) + 用户 (Web) + + + + Name + 名称 + + + + Type + 类型 + + + + Scope + 范围 + + + + Value + + + + + Type '{0}' is not defined. + 未定义类型“{0}”。 + + + + Name changed + 名称已更改 + + + + Type changed + 类型已更改 + + + + Scope changed + 范围已更改 + + + + Roaming changed + 漫游已更改 + + + + Description changed + 说明已更改 + + + + Provider changed + 提供程序已更改 + + + + Value changed + 值已更改 + + + + Generate default value in code changed + 在代码中生成的默认值已更改 + + + + Remove {0} setting(s) + 删除 {0} 个设置 + + + + Unable to load settings file. It might be corrupted or contain invalid XML or contain duplicate identifiers. + 无法加载设置文件。它可能已损坏、包含无效的 XML,或者包含重复的标识符。 + + + + New values from the app.config file were automatically added + 已自动添加 app.config 文件中的新值 + + + + Value of setting '{0}' was changed in the app.config file. + 已在 app.config 文件中更改设置“{0}”的值。 + + + + The current value in the .settings file is '{0}' +The new value in the app.config file is '{1}' + +Do you want to update the value in the .settings file? + .settings 文件中的当前值为“{0}” +app.config 文件中的新值为“{1}” + +是否要更新 .settings 文件中的值? + + + + An error occurred while reading the app.config file. The file might be corrupted or contain invalid XML. + 读取 app.config 文件时出错。该文件可能已损坏或者包含无效的 XML。 + + + + An error occurred while saving values to the app.config file. The file might be corrupted or contain invalid XML. + 将值保存到 app.config 文件时出错。该文件可能已损坏或者包含无效的 XML。 + + + + There is already another setting with the name '{0}'. + 已有另一个名为“{0}”的设置。 + + + + '{0}' is not a valid identifier. + “{0}”不是有效标识符。 + + + + '{0}' is not a valid type name. + “{0}”不是有效的类型名称。 + + + + The setting name cannot be empty. + 设置名称不能是空的。 + + + + '{0}' cannot be converted to an instance of type '{1}'. + “{0}”无法转换为“{1}”类型的实例。 + + + + Generic types are not supported. + 不支持泛型类型。 + + + + Abstract types are not supported. + 不支持抽象类型。 + + + + The current object is auto-generated and only supports renaming through the Settings Designer. + 当前对象是自动生成的,只支持通过“设置设计器”为其重命名。 + + + + The current object is auto-generated and does not support modifying parameters. + 当前对象是自动生成的,不支持修改参数。 + + + + The settings file cannot be modified at this time. + 此时无法修改设置文件。 + + + + &Add Setting + 添加设置(&A) + + + + R&emove Setting + 删除设置(&R) + + + + Application settings allow you to store and retrieve property settings and other information for your application dynamically. For example, the application can save a user's color preferences, then retrieve them the next time it runs. + 应用程序设置允许动态存储和检索应用程序的属性设置和其他信息。例如,应用程序可以保存用户的颜色首选项,然后在下次运行时检索它们。 + + + + Learn more about application settings... + 了解有关应用程序设置的更多信息... + + + + This connection string appears to contain sensitive data (for example, a password), which is required to connect to the database. However, storing sensitive data in the connection string can be a security risk. Do you want to include sensitive data in the connection string? + 此连接字符串中似乎包含连接到数据库所需的敏感数据(例如密码)。而在连接字符串中存储敏感数据会带来安全风险。是否要在连接字符串中包含敏感数据? + + + + Select a Type + 选择类型 + + + + This class allows you to handle specific events on the settings class: + 通过此类可以处理设置类的特定事件: + Comments for user part of extending generated settings class + + + The SettingChanging event is raised before a setting's value is changed. + 在更改某个设置的值之前将引发 SettingChanging 事件。 + + + + The PropertyChanged event is raised after a setting's value is changed. + 在更改某个设置的值之后将引发 PropertyChanged 事件。 + + + + The SettingsLoaded event is raised after the setting values are loaded. + 在加载设置值之后将引发 SettingsLoaded 事件。 + + + + The SettingsSaving event is raised before the setting values are saved. + 在保存设置值之前将引发 SettingsSaving 事件。 + + + + To add event handlers for saving and changing settings, uncomment the lines below: + 若要为保存和更改设置添加事件处理程序,请取消注释下列行: + + + + Add code to handle the SettingChangingEvent event here. + 在此处添加用于处理 SettingChangingEvent 事件的代码。 + + + + Add code to handle the SettingsSaving event here. + 在此处添加用于处理 SettingsSaving 事件的代码。 + + + + Failed to create or open file. + 未能创建或打开文件。 + + + + Description of the setting. + 设置说明。 + + + + Specifies whether or not the default setting value should be generated in the strongly-typed settings class. + 指定是否应在强类型设置类中生成默认设置值。 + + + + Specifies the group to which this Settings file belongs. + 指定此设置文件所属的组。 + + + + Description of the group to which this Settings file belongs. + 对此设置文件所属组的说明。 + + + + Indicates whether the setting should roam when Windows roaming profiles are enabled. + 指示在启用 Windows 漫游配置文件时,设置是否应漫游。 + + + + Name used to identify the setting. + 用于标识设置的名称。 + + + + The provider (System.Configuration.Provider.ProviderBase) used to manage the setting. + 用于管理设置的提供程序(System.Configuration.Provider.ProviderBase)。 + + + + Specifies whether the setting is per-application (read-only) or per-user (read-write). + 指定这是一个逐应用程序的设置(只读),还是一个逐用户的设置(读写)。 + + + + The setting will be generated as this type in the strongly-typed settings class. For example, the setting might be generated as a String or Integer object. + 在强类型设置类中,此设置将生成为此类型。例如,设置可能生成为 String 或 Integer 对象。 + + + + The current value for the setting. + 设置的当前值。 + + + + The following files will be deleted: + +{0} + 将删除下列文件: + +{0} + Synchronize with user.config file + + + No user.config files were found in any of the following locations: + +{0} + 在下列任何一个位置中均未找到 user.config 文件: + +{0} + + + + One or more user.config files was not removed. + 一个或多个 user.config 文件没有删除。 + + + + My.Settings Auto-Save Functionality + My.Settings 自动保存功能 + in-code comment used to generate a region that hides My.Settings AutoSave functionality + + + Unable to find service '{0}'. Ensure that the application is installed correctly. + 无法找到服务“{0}”。请确保已正确安装该应用程序。 + Settings Global-Object-Provider Strings + + + Default pac&kage: + 默认包(&K): + J# Specific String for Root Namespace + + + (Custom) + (自定义) + Entry in the "Accessibility dropdown" + + + No code generation + 无代码生成 + Entry in the "Accessibility dropdown" + + + WPF Application + WPF 应用程序 + + + + (Invalid value: "{0}") + (无效值:“{0}”) + Goes into the ShutdownMode combobox + + + On explicit shutdown + 在显式关闭时 + + + + On last window close + 在上一窗口关闭时 + + + + On main window close + 在主窗口关闭时 + + + + Could not find the expected root element "{0}" in the application definition file. + 未能在应用程序定义文件中找到需要的根元素“{0}”。 + + + + The .xaml file was in an unexpected format, near line {0} column {1}. + .xaml 文件在行 {0} 列 {1} 附近出现格式错误。 + + + + Startup &object: + 启动对象(&O): + + + + Startup &URI: + 启动 URI (&U): + + + + The application definition file is already opened in an incompatible editor. Please close the other editor and reload the project properties page. + 应用程序定义文件已在不兼容的编辑器中打开。请关闭其他编辑器并重新加载项目属性页。 + + + + There was an error trying to open or create the application definition file for this project. {0} + 尝试为此项目打开或创建应用程序定义文件时出错。 {0} + + + + An error occurred trying to load the application definition file for this project. The file '{0}' could not be parsed. Please edit the file in the XAML editor to fix the error. + 尝试加载此项目的应用程序定义文件时出错。未能分析文件“{0}”。请在 XAML 编辑器中编辑此文件以修复错误。 + + + + (Error) + (错误) + Used inside UI elements when there is an error (e.g. combobox text) + + + An unspecified error has occurred. + 发生未指定的错误。 + + + + This project does not contain an application definition file. + 此项目不包含应用程序定义文件。 + + + + An error occurred trying to create the application events file. {0} + 尝试创建应用程序事件文件时出错。 {0} + + + + Invalid argument '{0}' + 参数“{0}”无效 + {0} = name of invalid argument + + + WPF Console Application + WPF 控制台应用程序 + + + + WPF Class Library + WPF 类库 + + + + Embed manifest with default settings + 嵌入带默认设置的清单 + + + + Create application without a manifest + 创建不带清单的应用程序 + + + + Invalid manifest file. + 无效清单文件。 + + + + Services + 服务 + + + + Client application services enable your Windows-based applications to use the ASP.NET login (authentication), roles, and profile (settings) services. + 客户端应用程序服务使基于 Windows 的应用程序能够使用 ASP.NET 登录(身份验证)、角色和配置文件(设置)服务。 + + + + Learn more about client application services... + 了解有关客户端应用程序服务的更多信息... + + + + Advanced Settings for Services + 服务的高级设置 + + + + Disabling application services will clear the default services for Authentication, Roles, and Settings. Click OK to disable application services. + 禁用应用程序服务将清除“身份验证”、“角色”和“设置”的默认服务。单击“确定”可禁用应用程序服务。 + + + + Disable Application Services + 禁用应用程序服务 + + + + seconds + + + + + minutes + 分钟 + + + + hours + 小时 + + + + days + + + + + To enable client application services, you must set the Target Framework for your application to .NET Framework 3.5 or later. In C#, you can do this on the Application property page. In Visual Basic, you can do this one the Compile property page by clicking Advanced Compile Options. + 若要启用客户端应用程序服务,您必须将应用程序的目标框架设置为 .NET Framework 3.5 或更高版本。在 C# 中,您可以在“应用程序”属性页上进行此设置。在 Visual Basic 中,您可以通过单击“高级编译选项”,在“编译”属性页上进行此设置。 + + + + An error occurred while reading the Application configuration file. The file might be corrupted or contain invalid XML. + 读取应用程序配置文件时出错。 该文件可能已损坏或包含无效 XML。 + + + + The URL is invalid. Please enter a valid URL like http://microsoft.com/services + URL 无效。请输入有效的 URL,如 http://microsoft.com/services + + + + A service URL in the application configuration file is not in the expected format. + 应用程序配置文件中的服务 URL 未采用所需的格式。 + + + + Authentication, Roles and Web Settings providers have been configured via the Application configuration file such that they do not share a common connection string. + “身份验证”、“角色”和“Web 设置”提供程序已通过应用程序配置文件配置为三者不共享共同的连接字符串。 + + + + Specify a connection string to a SQL Server database, or use the special connection string "Data Source = |SQL/CE|", which causes SQL Server Compact to generate local database files for offline storage. + 指定与 SQL Server 数据库的连接字符串,或者使用特殊的连接字符串“Data Source = |SQL/CE|”,此字符串可使 SQL Server Compact 生成用于脱机存储的本地数据库文件。 + + + + The following type names were not understood: '{0}'. Make sure you have references to these types. + 无法理解以下类型名称:“{0}”。请确保具有对这些类型的引用。 + + + + There are already settings with the following names: {0}. + 已存在具有以下名称的设置: {0}。 + + + + The username/password combination cannot be authenticated. + 用户名/密码组合无法通过身份验证。 + + + + Windows Forms Application + Windows 窗体应用程序 + The "Windows Forms" distinguishes it from a WPF application + + + Namespace of the service reference. + 服务引用的命名空间。 + + + + Service Reference Properties + 服务引用属性 + + + + Metadata Location Url + 元数据位置 URL + + + + Metadata Location + 元数据位置 + + + + A service reference with multiple source urls is not supported. + 不支持带有多个源 URL 的服务引用。 + + + + Cannot change reference Url to empty. The reference url must be a valid URL. + 不能将引用 URL 更改为空。此引用 URL 必须为有效的 URL。 + + + + One or more files were reloaded during the checkout. Please retry your operation. + 签出期间重新加载了一个或多个文件。请重试操作。 + + + + The project was reloaded, and some changes on this page may have been lost. + 项目已重新加载,此页上的一些更改可能已经丢失。 + + + + The application will fail to run in the selected zone because of this requested elevated permission. Click the help link above for more info. + 应用程序将不能在选定区域中运行,因为此操作需要提升的权限。请单击上面的帮助链接获取详细信息。 + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.zh-Hant.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.zh-Hant.xlf new file mode 100644 index 00000000000..272f1b2e49f --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/Microsoft.VisualStudio.Editors.Designer.zh-Hant.xlf @@ -0,0 +1,2948 @@ + + + + + + All Files + 所有檔案 + + + + Property Page + 屬性頁 + + + + References + 參考 + + + + Version + 版本 + + + + Signing + 簽署 + + + + Application + 應用程式 + + + + Compile + 編譯 + + + + Debug + 偵錯 + + + + Deploy + 部署 + + + + Database + 資料庫 + + + + Security + 安全性 + + + + Build + 建置 + + + + Build Events + 建置事件 + + + + Reference Paths + 參考路徑 + + + + Pre-build Event Command Line + 建置前事件命令列 + + + + Post-build Event Command Line + 建置後事件命令列 + + + + The output path is not trusted. +The application may throw security exceptions when it attempts to perform actions which require full trust. +Click OK to ignore and continue. Click CANCEL to choose a different output path. + 輸出路徑不受信任。 +應用程式嘗試執行需要完全信任的動作時,可能會擲回安全性例外狀況。 +按一下 [確定] 略過並繼續。按一下 [取消] 選擇其他輸出路徑。 + + + + <Browse...> + <瀏覽...> + + + + (None) + (無) + + + + <New...> + <新增...> + + + + <Browse...> + <瀏覽...> + + + + (None) + (無) + + + + Active ({0}) + 使用中 ({0}) + + + + All Configurations + 所有組態 + + + + All Platforms + 所有平台 + + + + N/A + N/A + This is used in the platform and configuration comboboxes when showing pages that don't care about the current platform/configuration + + + Could not find the configuration '{0}' for platform '{1}'. + 找不到平台 '{1}' 的組態 '{0}'。 + + + + (None) + (無) + + + + Select File + 選取檔案 + + + + Add existing file to project + 將現有的檔案加入專案 + + + + Icon Files + 圖示檔 + + + + Executable Files + 可執行檔 + + + + Select Working Directory + 選取工作目錄 + + + + Select Output Path + 選取輸出路徑 + + + + Select Reference Path + 選取參考路徑 + + + + Win32 Resource Files + Win32 資源檔 + + + + Add Win32 resource file to project + 將 Win32 資源檔加入專案 + + + + Folder path does not exist. +Please select a valid folder path. + 資料夾路徑不存在。 +請選取有效的資料夾路徑。 + + + + Advanced Compiler Settings + 進階編譯器設定 + + + + Advanced Build Settings + 進階建置設定 + + + + Compiler Warnings + 編譯器警告 + + + + Reference Paths + 參考路徑 + + + + Compatible Settings + 相容設定 + + + + Assembly Information + 組件資訊 + + + + Invalid version format, expected "[Major]", "[Major].[Minor]", "[Major].[Minor].[Build]" or "[Major].[Minor].[Build].[Revision]" + 無效的版本格式,必須是 "[Major]"、"[Major].[Minor]"、"[Major].[Minor].[Build]" 或 "[Major].[Minor].[Build].[Revision]" + + + + A wildcard ("*") is not allowed in this field. + 此欄位不允許萬用字元 ("*")。 + + + + Each part of the version number for '{0}' must be an integer between 0 and {1}. + '{0}' 的版本號碼的每個部分都必須是介於 0 和 {1} 之間的整數。 + + + + (Default Icon) + (預設圖示) + + + + Startup object must be a form when 'Enable application framework' is checked. + 核取 [啟用應用程式架構] 時,啟始物件必須是表單。 + + + + (Not set) + (未設定) + + + + Icon could not be added to the project. + 無法將圖示加入專案。 + + + + Invalid icon file. + 圖示檔無效。 + + + + {0} is not a valid icon file. + {0} 不是有效的圖示檔。 + + + + The GUID should match the format dddddddd-dddd-dddd-dddd-dddddddddddd. + GUID 應符合 dddddddd-dddd-dddd-dddd-dddddddddddd 格式。 + + + + NOTE: This file is auto-generated; do not modify it directly. To make changes, + 注意:這是自動產生的檔案,請勿直接修改它。若要進行變更, + These comments are placed in the ApplicationEvents.vb file if it is generated by the project designer. The same comments appear in the templates, under vsproject\Templates\Windows\VisualBasic\ProjectTemplates\WindowsApplication\MyEvents.vb (MyEvents.vb is renamed to ApplicationEvents.vb after project creation), and these comments should be kept in sync + + + or if you encounter build errors in this file, go to the Project Designer + 或者您在這個檔案發生建置錯誤,請到專案設計工具 + + + + (go to Project Properties or double-click the My Project node in + (移至專案屬性或者在 [方案總管] 中按兩下 [My Project] 節點), + + + + Solution Explorer), and make changes on the Application tab. + 然後在 [應用程式] 索引標籤上進行變更。 + + + + '{0}' is not a valid identifier. Please select a different Startup form. + '{0}' 不是有效的識別碼。請選取其他的啟動表單。 + + + + '{0}' is not a valid identifier. Please select a different Splash screen form. + '{0}' 不是有效的識別碼。請選取其他的啟動顯示畫面表單。 + + + + The splash screen form cannot be the start-up form. + 啟動顯示畫面表單不能是啟動表單。 + + + + Startup f&orm: + 啟動表單(&O): + + + + The following events are available for MyApplication: + MyApplication 可以使用下列事件: + + + + Startup: Raised when the application starts, before the startup form is created. + Startup:在應用程式啟動時,但尚未建立啟動表單之前引發。 + + + + Shutdown: Raised after all application forms are closed. This event is not raised if the application terminates abnormally. + Shutdown:在所有應用程式表單關閉之後引發。如果應用程式不正常終止,就不會引發此事件。 + + + + UnhandledException: Raised if the application encounters an unhandled exception. + UnhandledException:在應用程式發生未處理的例外狀況時引發。 + + + + StartupNextInstance: Raised when launching a single-instance application and the application is already active. + StartupNextInstance:在啟動單一執行個體應用程式且應用程式已於使用中時引發。 + + + + NetworkAvailabilityChanged: Raised when the network connection is connected or disconnected. + NetworkAvailabilityChanged:在建立或中斷網路連線時引發。 + + + + Base address must be a hexadecimal number with less than or equal to 8 digits, for example, 0x11000000. + 基底位址必須是小於或等於 8 位數的十六進位數字,例如 0x11000000。 + + + + None + + + + + Warning + 警告 + + + + Error + 錯誤 + + + + (custom) + (自訂) + + + + Implicit conversion + 隱含轉換 + + + + Late binding; call could fail at run time + 晚期繫結,執行階段時呼叫可能失敗 + + + + Implicit type; object assumed + 隱含類型,假設是 Object + + + + Use of variable prior to assignment + 在指派之前使用變數 + + + + Function/Operator without return value + 無傳回值的函式/運算子 + + + + Unused local variable + 未使用的區域變數 + + + + Instance variable accesses shared member + 執行個體變數存取共用成員 + + + + Recursive operator or property access + 遞迴運算子或屬性存取 + + + + Duplicate or overlapping catch blocks + 重複或重疊的 catch 區塊 + + + + The warning settings for one or more configurations conflict. +Changing this setting will reset the settings in all configurations. + 一或多個組態衝突的警告設定。 +變更此設定將重設所有組態中的設定。 + + + + When startup form closes + 啟動表單關閉時 + + + + When last form closes + 最後表單關閉時 + + + + Windows + Windows + Authentication modes + + + Application-defined + 由應用程式定義 + Authentication modes + + + Cancel + 取消 + + + + &Calculate Permissions + 計算使用權限(&C) + + + + Stopped... + 已停止... + + + + Starting... + 正在啟動... + + + + Building... + 正在建置... + + + + Analyzing... + 正在分析... + + + + Analyze Failed + 分析失敗 + + + + Aborting... + 正在中止... + + + + Canceling... + 正在取消... + + + + Internet + 網際網路 + + + + Local Intranet + 近端內部網路 + + + + (Custom) + (自訂) + Don't use + + + (Zone Default) + (區域預設) + + + + Include + 包含 + + + + Exclude + 排除 + + + + The application will require elevated permissions to run in the selected zone. Click the help link above for more info. + 應用程式必須有更高的使用權限,才能在選取的區域中執行。如需詳細資訊,請按一下上方的 [說明] 連結。 + + + + This permission could not be loaded. Press the delete key to remove it from your project. + 無法載入此使用權限。請按 DELETE 鍵,將它從專案中移除。 + Don't use + + + Included + 包含 + + + + Permission + 使用權限 + + + + Setting + 設定 + + + + Specify the code access security permissions that your ClickOnce application requires in order to run. Learn more about code access security... + 指定執行 ClickOnce 應用程式所需的程式碼存取安全性權限。進一步了解程式碼存取安全性... + + + + Learn more about code access security... + 進一步了解程式碼存取安全性... + + + + Invalid value + 值無效 + + + + The SecurityPermission must be included in your application with the Execute flag set or your application will not run. Mark this permission as "Zone Default" or "Include." + 應用程式必須包含 SecurityPermission,而且必須設定執行旗標,否則應用程式將無法執行。請將此使用權限標記為 [區域預設] 或 [包含]。 + + + + The SecurityPermission must be included in your application with the Execute flag set or your application will not run. The Execute flag has been added to the SecurityPermission in your manifest. + 應用程式必須包含 SecurityPermission,而且必須設定執行旗標,否則應用程式將無法執行。已將執行旗標新增至資訊清單中的 SecurityPermission。 + + + + This application requires full trust to run correctly. Would you like to set this as a full trust application? + 此應用程式需要完全信任才能正確執行。要將它設定為完全信任應用程式嗎? + + + + Full Trust Required + 需要完全信任 + + + + An error occurred and the app.manifest file could not be saved. +Error: + 發生錯誤,無法儲存 app.manifest 檔案。 +錯誤: + + + + An error occurred and the app.manifest file could not be loaded. Please remove any changes you have made to the file and reload the Security property page again. + 發生錯誤且無法載入 app.manifest 檔案。請移除您對檔案進行的任何變更,並重新載入 [安全性] 屬性頁。 + + + + Included + 包含 + + + + Not Included + 不包含 + + + + Included with warning + 包含在警告中 + + + + Calculating permissions failed. + 計算使用權限失敗。 + + + + Error + 錯誤 + + + + Advanced Security Settings + 進階安全性設定 + + + + Build Failed. Click CANCEL and correct the build failure before analyzing again. + 建置失敗。請按 [取消] 並更正建置失敗錯誤後,再分析一次。 + + + + Build completed... + 建置完成... + + + + Unable to start the build. + 無法啟動建置。 + + + + Serious error. The build must begin in order to analyze permissions. It has not started. + 嚴重錯誤。必須開始建置才能分析使用權限,但建置尚未啟動。 + Don't use + + + (Custom) + (自訂) + Don't use + + + (None) + (無) + + + + Selecting existing key file + 選取現有的金鑰檔 + + + + Key Files + 金鑰檔 + + + + Create key file + 建立金鑰檔 + + + + The old password is invalid. + 舊密碼無效。 + + + + Enter the old password. + 請輸入舊密碼。 + + + + Enter a new password. + 請輸入新密碼。 + + + + The new passwords do not match. Enter the password again. + 新密碼不相符。請重新輸入密碼。 + + + + The new password must be at least 6 characters in length. Enter the password again. + 新密碼長度必須至少為 6 個字元。請重新輸入密碼。 + + + + Select a Certificate + 選取憑證 + + + + Select a certificate to sign your ClickOnce manifests + 選取簽署 ClickOnce 資訊清單的憑證 + + + + Certificate Files + 憑證檔 + + + + Issued To + 核發對象 + + + + Issued By + 核發者 + + + + Intended Purpose + 預期的用途 + + + + Expiration Date + 到期日 + + + + The password is invalid. + 密碼無效。 + + + + Invalid password + 密碼無效 + + + + The selected file does not contain a private key. You must choose a certificate that contains a private key. + 選取的檔案未包含私密金鑰。您必須選擇含有私密金鑰的憑證。 + + + + Invalid key + 金鑰無效 + + + + Certificate Creation Error + 建立憑證發生錯誤 + + + + <All> + <全部> + + + + The passwords do not match. + 密碼不相符。 + + + + Enter a password. + 請輸入密碼。 + + + + Confirm the password. + 請確認密碼。 + + + + (none) + (無) + + + + Enter password to open file + 輸入密碼以開啟檔案 + + + + Enter &password to open file {0} + 輸入密碼以開啟檔案 {0}(&P) + + + + Enter &password for new file {0} + 輸入新檔案 {0} 的密碼(&P) + + + + The project already contains a file with that name. Choose another certificate file or rename the file in your project. + 專案已經包含相同名稱的檔案。請選擇另一個憑證檔,或將專案中的檔案重新命名。 + + + + The file '{0}' could not be imported: {1} + 無法匯入檔案 '{0}': {1} + + + + _TemporaryKey.pfx + _TemporaryKey.pfx + + + + The selected certificate is not valid for code signing. Choose another certificate file. + 選取的憑證對程式碼簽署無效。請選擇其他憑證檔。 + + + + Change property: {0} + 變更屬性: {0} + + + + Windows Application + Windows 應用程式 + + + + Windows Service + Windows 服務 + + + + Class Library + 類別庫 + + + + Console Application + 主控台應用程式 + + + + Web Control Library + Web 控制項程式庫 + + + + Cannot remove '{0}'. {1} + + 無法移除 '{0}'。{1} + + + + + Adding or removing '{0}' as a project import failed because of an unexpected error from the project system. The error returned was: '{1}'. + 由於專案系統發生未預期的錯誤,導致專案匯入時新增或移除 '{0}' 失敗。傳回的錯誤是: '{1}'。 + + + + Adding web reference failed. {0} + + 新增 Web 參考失敗。{0} + + + + + Updating web reference '{0}' failed. +{1} + 更新 Web 參考 '{0}' 失敗。 +{1} + + + + Web Reference Properties + Web 參考屬性 + + + + Static + 靜態 + + + + Dynamic + 動態 + + + + Name of the web reference + Web 參考的名稱 + + + + URL Behavior + URL 行為 + + + + Web reference URL behavior + Web 參考 URL 行為 + + + + Web Reference URL + Web 參考 URL + + + + Web Reference URL + Web 參考 URL + + + + Reference Properties + 參考屬性 + + + + The remote machine name cannot be blank. Please specify the name of the machine to debug remotely. + 遠端電腦名稱不能為空白。請指定電腦名稱以進行遠端偵錯。 + + + + The external program cannot be found. Please enter a valid executable file. + 找不到外部程式。請輸入有效的可執行檔。 + + + + The external program property cannot be empty. Please enter a valid executable file. + 外部程式屬性不可為空白。請輸入有效的可執行檔。 + + + + We can only debug an EXE file. Please enter a valid executable file. + 僅可為 EXE 檔案偵錯。請輸入有效的可執行檔。 + + + + The URL property cannot be empty. Please enter a valid URL. + URL 屬性不可為空白。請輸入有效的 URL。 + + + + The URL is invalid. Please enter a valid URL like "http://www.microsoft.com/" + URL 無效。請輸入有效的 URL,例如 "http://www.microsoft.com/" + + + + The working directory you entered does not exist. Please enter a valid working directory. + 您輸入的工作目錄不存在。請輸入有效的工作目錄。 + + + + <The system cannot find the reference specified> + <系統找不到指定的參考> + + + + Unused References + 未使用的參考 + + + + &Remove + 移除(&R) + + + + No unused references + 沒有未使用的參考 + + + + Project compilation failed. Cannot determine unused references. + 專案編譯失敗。無法判斷未使用的參考。 + + + + Gathering list of unused references... + 正在蒐集未使用的參考清單... + + + + Error getting unused references. + 取得未使用的參考時發生錯誤。 + + + + Base address must be a hexadecimal number with less than or equal to 8 digits, for example, &H11000000. + 基底位址必須是少於或等於 8 位數的十六進位數字,例如 &H11000000。 + + + + "Resource files must have a .res file extension. Please enter a valid resource file name." + "資源檔必須具有 .res 副檔名。請輸入有效的資源檔名稱。" + + + + "The resource file entered does not exist." + "輸入的資源檔不存在。" + + + + Project Designer + 專案設計工具 + + + + Settings + 設定 + + + + Resources + 資源 + + + + An error occurred trying to load the project properties window. Close the window and try again. +{0} + 嘗試載入專案屬性視窗時發生錯誤。請關閉視窗後再試一次。 +{0} + + + + An error occurred trying to load the page. + 嘗試載入頁面時發生錯誤。 + + + + The designer cannot be shown because the document for it was never loaded. + 無法顯示設計工具,因為設計工具的文件尚未載入。 + + + + This project does not contain a default resources file. Click here to create one. + 此專案未包含預設的資源檔。請按一下這裡建立資源檔。 + + + + This project does not contain a default settings file. Click here to create one. + 此專案未包含預設的設定檔。請按一下這裡建立資源檔。 + + + + Could not find the file '{0}'. + 找不到檔案 '{0}'。 + + + + The file '{0}' is already open in an editor. Please close the file and try again. + 檔案 '{0}' 已在編輯器中開啟。請關閉檔案後再試一次。 + + + + All Project Designer Pages + 所有的專案設計工具頁面 + + + + More Settings + 其他設定 + + + + The requested file type is not supported in projects of this type. + 這種類型的專案不支援所要求的檔案類型。 + + + + Assembly Name + 組件名稱 + + + + Root Namespace + 根命名空間 + + + + Startup Object + 啟始物件 + + + + Application Icon + 應用程式圖示 + Property Friendly Names (for transaction names) - NOTE: All of these are optional + + + Assembly Version + 組件版本 + + + + Assembly File Version + 組件檔版本 + + + + Assembly GUID + 組件 GUID + + + + Enable application framework + 啟用應用程式架構 + + + + External Program Path + 外部程式路徑 + + + + Start Browser With URL + 瀏覽器起始 URL + + + + Working Directory + 工作目錄 + + + + Remote Machine Name + 遠端電腦名稱 + + + + Project Designer Page Container + 專案設計工具頁面容器 + + + + Switch Project Designer Page + 切換專案設計工具頁面 + + + + Allow switching between active pages of the project designer (use Ctrl+PageUp and Ctrl+PageDown) + 允許在使用中的專案設計工具頁面之間進行切換 (使用 Ctrl+PageUp 和 Ctrl+PageDown) + + + + {0} page: + {0} 頁: + {0} = sub page name + + + {0} [Read Only] + {0} [唯讀] + Attach a readonly to the designer caption {0}=Designer caption + + + The editor could not get the IVsTextStream for file {0}. + 編輯器無法取得檔案 {0} 的 IVsTextStream。 + #exception {0}=filename + + + The editor could not get the IVsTextStream. + 編輯器無法取得 IVsTextStream。 + #exception (no file name) + + + No DesignerService for file '{0}'. + 檔案 '{0}' 沒有 DesignerService。 + #{0}=file name + + + Invalid physical view name. + 實體檢視名稱無效。 + + + + Unable to create text buffer. + 無法建立文字緩衝區。 + # com exception + + + No LocalRegistry service. + 沒有 LocalRegistry 服務。 + #exception + + + Replacing text stream failed:{0} + 取代文字資料流失敗:{0} + #exception {0}=err msg + + + Buffer is read only. + 緩衝區為唯讀。 + + + + File is already opened in an incompatible editor. + 已經在不相容的編輯器中開啟了檔案。 + + + + Unsupported format. + 不支援的格式。 + + + + Unknown Error. + 未知的錯誤。 + + + + Unable to create the designer. {0} + 無法建立設計工具。{0} + # {0}=inner exception + + + Unable to check out the current file. The file may be read-only or locked, or you may need to check the file out manually. + 無法簽出目前檔案。檔案可能處於唯讀或鎖定的狀態,或者您需要手動簽出檔案。 + # General checkout exception message + + + Microsoft Visual Studio + Microsoft Visual Studio + Error reporting + + + Please enter an integer between 1 and 60. + 請輸入介於 1 和 60 之間的整數。 + + + + Please enter an integer between 1 and 60. + 請輸入介於 1 和 60 之間的整數。 + + + + Show empty environment + 顯示空白環境 + These are items in a combobox (and so they don't need periods) + + + Load last loaded solution + 載入上次載入的解決方案 + These are items in a combobox (and so they don't need periods) + + + Show New Project dialog box + 顯示 [新增專案] 對話方塊 + These are items in a combobox (and so they don't need periods) + + + Show Open Project dialog box + 顯示 [開啟專案] 對話方塊 + These are items in a combobox (and so they don't need periods) + + + Changes in Help Options will not take effect until the environment is restarted. + 在重新啟動環境之前,[說明] 選項中的變更將不會生效。 + + + + The location specified is on an invalid or read-only disk, or contains a device name reserved for the system. + 指定的位置不正確或是唯讀磁碟,或含有為系統保留的裝置名稱。 + + + + COM + COM + + + + Component Design + 元件設計 + + + + Serialization + 序列化 + + + + Web + Web + + + + COMClass + COMClass + + + + Expose {0} to COM. + 將 {0} 公開至 COM。 + + + + COM Class + COM 類別 + + + + COMVisible + COMVisible + + + + Make {0} visible through COM. + 讓 {0} 可以透過 COM 顯示。 + + + + COM Visible + COM 可見 + + + + DispId + DispId + + + + Set explicit DispId to this {0}. + 將明確 DispId 設定為這個 {0}。 + + + + DispId + DispId + + + + Value + + + + + Explicit DispId value for this {0}. + 這個 {0} 的明確 DispId 值。 + + + + Value + + + + + DispId value should be an integer greater than or equal to 1. + DispId 值必須是大於或等於 1 的整數。 + + + + Category + 分類 + + + + Category group for the property. + 屬性的分類群組。 + + + + Category + 分類 + + + + Default Event + 預設事件 + + + + Default event for the class. + 類別的預設事件。 + + + + Default Event + 預設事件 + + + + Default Value + 預設值 + + + + Default value for the property. + 屬性的預設值。 + + + + Default Value + 預設值 + + + + NonSerialized + NonSerialized + + + + Field should not be serialized. + 欄位不可以序列化。 + + + + Non Serialized + 非序列化 + + + + Serializable + 可序列化 + + + + Enable serialization for this {0} and its members. + 啟用這個 {0} 及其成員的序列化。 + + + + Serializable + 可序列化 + + + + WebMethod + WebMethod + + + + Expose method via web services. + 透過 Web 服務公開方法。 + + + + Web Method + Web 方法 + + + + Description + 描述 + + + + Description for the Web Method. + Web 方法的描述。 + + + + Description + 描述 + + + + EnableSession + EnableSession + + + + Maintain session state. + 維護工作階段狀態。 + + + + Enable Session + 啟用工作階段 + + + + TransactionOptions + TransactionOptions + + + + Set transaction options. + 設定異動選項。 + + + + Transaction Options + 異動選項 + + + + WebService + WebService + + + + Configure the Web Service settings. + 設定 Web 服務的設定。 + + + + Web Service + Web 服務 + + + + Name + 名稱 + + + + Name for the web service. + Web 服務的名稱。 + + + + Name + 名稱 + + + + Description + 描述 + + + + Description for the web service. + Web 服務的描述。 + + + + Description + 描述 + + + + Namespace + 命名空間 + + + + Namespace for the web service. + Web 服務的命名空間。 + + + + Namespace + 命名空間 + + + + Default + 預設 + + + + Action + 動作 + + + + Appearance + 外觀 + + + + Behavior + 行為 + + + + Data + 資料 + + + + DragDrop + 拖放 + + + + Focus + 焦點 + + + + Format + 格式 + + + + Key + 索引鍵 + + + + Layout + 配置 + + + + Mouse + 滑鼠 + + + + WindowStyle + WindowStyle + + + + (None) + (無) + Default Event + + + Requires: + 需要: + + + + Name + 名稱 + Column names for the string table + + + Type + 類型 + Column names for the string table + + + Value + + Column names for the string table + + + Comment + 註解 + Column names for the string table + + + Failed to generate file: {0} + 無法產生檔案: {0} + + + + Editing embedded resources directly is not supported. Do you wish to convert this item to a linked resource in order to edit it? + 不支援直接編輯內嵌資源。要將此項目轉換成連結資源以便進行編輯嗎? + + + + The current object is auto-generated and only supports renaming through the Managed Resources Editor. + 目前的物件是自動產生的,而且僅支援透過受控資源編輯器重新命名。 + + + + Cannot find the file '{0}'. It may have been moved or deleted. + 找不到檔案 '{0}',可能已移動或刪除。 + {0} = file name and path + + + Unable to load resource from file '{0}'. + 無法從檔案 '{0}' 載入資源。 + {0} = file name and path + + + The resource name cannot be empty. + 資源名稱不能為空白。 + + + + There is already another resource with the name '{0}'. + 已經有另一個名為 '{0}' 的資源。 + {0} = Resource name + + + The resource was not of the expected type. + 資源不是預期的類型。 + This error can happen if, for example, you try to add foo.bmp to the resource editor, but foo.bmp is really a metafile. + + + Unable to create new resource file '{0}'. {1} + 無法建立新的資源檔 '{0}'。{1} + {0} = file name and path, {1} = additional error information + + + Unable to play the audio resource. {0} + 無法播放音效資源。{0} + {0} = Additional error information. + + + Resource '{0}' cannot be saved to a file. + 無法將資源 '{0}' 儲存到檔案中。 + {0} = Resource name + + + The operation has been canceled by the user. + 使用者已取消作業。 + + + + The resource value contains invalid data or has an incorrect format. + 資源值含有無效資料,或者格式不正確。 + + + + The name of the resource '{0}' cannot be used as a valid identifier, because it contains one or more invalid characters: '{1}'. Please remove or replace those characters and try again. + 資源 '{0}' 的名稱無法作為有效的識別碼,因為它含有一或多個無效的字元: '{1}'。請移除或取代這些字元後再試一次。 + {0} = Resource name + + + Too many files specified. Please select fewer files and try again. + 指定了太多檔案,請少選一些檔案後再試一次。 + + + + Unexpected error. + 未預期的錯誤。 + Theoretically possible but we really don't expect to happen. Unexpected, internal error. + + + Unable to load internal localized resource '{0}'. + 無法載入內部的當地語系化資源 '{0}'。 + Theoretically possible but we really don't expect to happen. Unexpected, internal error. + + + The value could not be converted into a resource of type {0}. + +{1} + 無法將值轉換成 {0} 類型的資源。 + +{1} + {0} = the type that was expected by the resource editor (e.g. System.Drawing.Point) +{1} = more specific additional error message from the system + + + The value cannot be empty in a resource of type {0}. + 在 {0} 類型的資源中值不可為空白。 + {0} = the type that was expected by the resource editor (e.g. System.Drawing.Point) + + + One or more of the selected resource values could not be cleared. + 有一或多個選取的資源值無法清除。 + + + + The resource file cannot be modified at this time. + 此時無法修改資源檔。 + + + + You are trying to edit a resource file that is a part of another project item (such as a form or a control). Editing this item could corrupt the project item, and you will have to recover it by hand. In addition, changes made to this resource file may be lost if further changes are made to the project item. + +Do you really want to edit this file? + 您嘗試編輯的資源檔是另一個專案項目 (例如表單或控制項) 的一部分。編輯此項目可能導致專案項目損毀,而必須手動復原。此外,如果進一步對專案項目進行變更,可能會遺失此資源檔的變更。 + +確定要編輯此檔案嗎? + + + + The resource '{0}' cannot be added. + 無法新增資源 '{0}'。 + {0} - name of the resource + + + The device does not support '{0}' files. + 裝置不支援 '{0}' 檔案。 + {0} - the extension of the file name like 'tiff' + + + The resource item uses the type '{0}', which is not supported in this project. + 資源項目使用 '{0}' 類型,但此專案不支援該類型。 + {0} - name of the type + + + The resource item(s) {0} cannot be saved correctly. The item(s) will be discarded. + 無法正確儲存資源項目 {0},將捨棄這些項目。 + {0} - name list of the resource + + + '{0}' + '{0}' + {0} - name + + + {0}, '{1}' + {0}、'{1}' + # {0} - name list +# {1} - another name + + + (Nothing/null) + (Nothing/null) + Displayed in a string table for values of Nothing/null +CONSIDER: get this from CodeDom + + + (Unknown type) + (未知的類型) + This actually shouldn't be needed, but if we get an exception trying to get the type name of an entry in the resx file (not supposed to happen), then we'll display this as its type. + + + (Value cannot be displayed) + (無法顯示值) + Displayed in a string table for values which cannot be edited by the user + + + Name + 名稱 + Columns for the "Details" view of the resource editor + + + Filename + 檔名 + Columns for the "Details" view of the resource editor + + + Type + 類型 + Columns for the "Details" view of the resource editor + + + Size + 大小 + Columns for the "Details" view of the resource editor + + + Comment + 註解 + Columns for the "Details" view of the resource editor + + + Text Encoding + 文字編碼方式 + Columns for the "Details" view of the resource editor + + + {0} x {1} + {0} x {1} + Format string for showing a graphic's size + +# {0} = width (as an integer) +# {1} = height (as an integer) +#Example, for a bitmap of width=123, height = 456, the English version of this string would be "123x456" + + + {0} KB + {0} KB + #Format string for showing a file's size +# {0} = length in kilobytes + + + {0} byte(s) + {0} 位元組 + Format string for showing a file's size. +{0} = length in bytes + + + Strings + 字串 + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + Images + 影像 + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + Icons + 圖示 + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + Audio + 音訊 + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + Files + 檔案 + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + Other + 其他 + Resource category names (these show up in the category buttons in the ToolStrip at the top of the resource editor) + + + &Add + 新增(&A) + Add, Delete and Views button text in the main ToolStrip + + + &Remove + 移除(&R) + Add, Delete and Views button text in the main ToolStrip + + + &Views + 檢視(&V) + Add, Delete and Views button text in the main ToolStrip + + + &Existing File... + 現有檔案(&E)... + Menu items under the "Add" button + + + New &String + 新增字串(&S) + Menu items under the "Add" button + + + New &Image + 新增影像(&I) + Menu items under the "Add" button + + + &PNG Image... + PNG 影像(&P)... + Menu items under the "Add" button + + + &BMP Image... + BMP 影像(&B)... + Menu items under the "Add" button + + + &GIF Image... + GIF 影像(&G)... + Menu items under the "Add" button + + + &JPEG Image... + JPEG 影像(&J)... + Menu items under the "Add" button + + + &TIFF Image... + TIFF 影像(&T)... + Menu items under the "Add" button + + + New I&con... + 新增圖示(&C)... + Menu items under the "Add" button + + + New &Text File... + 新增文字檔(&T)... + Menu items under the "Add" button + + + Windows Bitmap + Windows 點陣圖 + Friendly Image types + + + EXIF Image + EXIF 影像 + Friendly Image types + + + Graphics Interchange Format + 圖形交換格式 (GIF) + Friendly Image types + + + JPEG File Interchange Format + JPEG 檔案交換格式 + Friendly Image types + + + Windows Bitmap + Windows 點陣圖 + Friendly Image types + + + Portable Network Graphics + 可攜式網路圖形 + Friendly Image types + + + Tag Image File Format + TIF 檔案格式 + Friendly Image types + + + Icon + 圖示 + Friendly Image types + + + Text File + 文字檔 + Friendly Image types + + + Binary File + 二進位檔案 + + + + Wave Sound + 聲音音效 + Friendly Image types + + + Linked at compile time + 於編譯時間連結 + File Persistence Mode + + + Embedded in .resx + 內嵌於 .resx + File Persistence Mode + + + Bitmaps + 點陣圖 + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Icons + 圖示 + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Audio + 音訊 + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Text Files + 文字檔 + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + All Files + 所有檔案 + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Windows Bitmap + Windows 點陣圖 + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Portable Network Graphics + 可攜式網路圖形 + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Graphics Interchange Format + 圖形交換格式 (GIF) + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + JPEG File Interchange Format + JPEG 檔案交換格式 + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Tag Image File Format + TIF 檔案格式 + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + Icon + 圖示 + # File dialog filters +# +# E.g., for icons, the actual filter created would look like "Icons (*.ico)". These resources +# represent the first part of that filter +# + + + &List + 清單(&L) + Resource editor listview view styles (like changing the view style of a folder in Windows XP) + + + &Details + 詳細資料(&D) + Resource editor listview view styles (like changing the view style of a folder in Windows XP) + + + &Thumbnail + 縮圖(&T) + Resource editor listview view styles (like changing the view style of a folder in Windows XP) + + + Managed Resources Editor + 受控資源編輯器 + + + + Add existing file to resources + 將現有的檔案加入資源 + + + + Import file into resource '{0}' + 將檔案匯入資源 '{0}' + {0} = Name of resource being imported into + + + Export resource '{0}' to file + 將資源 '{0}' 匯出到檔案 + {0} = Name of resource being exported from + + + Please specify where to save the new file + 請指定新檔案的儲存位置 + + + + The file '{0}' already exists. Do you want to replace it? + 檔案 '{0}' 已經存在。要取代它嗎? + {0} = full file path and name + + + The following files already exist. Do you want to replace them? + 下列檔案已經存在。要取代它們嗎? + + + + Select a folder in which to export the resources. + 選取要匯出資源的資料夾。 + + + + Do you want to continue anyway? + 您仍然要繼續嗎? + + + + Do you want to enable strongly-typed resource generation for this file? + 您要對這個檔案啟用強類型的資源產生嗎? + + + + Resource '{0}' could not be loaded because the file to which it is linked could not be found: {1}. + 無法載入資源 '{0}',因為找不到連結的檔案: {1}。 + {0} = resource name that had the error, {1} = file path/name that could not be found + + + Resource '{0}' could not be instantiated. {1} + 無法將資源 '{0}' 具現化。{1} + {0} = resource name that had the error, {1} = extended error information + + + Resource '{0}' has a name that is not recommended and that may cause compilation errors in your code. Please choose another name. + 資源 '{0}' 使用不建議採用的名稱,可能導致程式碼發生編譯錯誤。請選擇其他名稱。 + {0} = resource name that had the error + + + Unable to set the Custom Tool or Custom Tool Namespace properties of this file in order to change strongly-typed resource generation options. If the project file is checked in, try checking it out. + 無法設定此檔案的自訂工具或自訂工具命名空間屬性,因此無法變更強型別的資源產生選項。如果專案檔已簽入,請試著將它簽出。 + One possible source for this error is that source code control checkout failed or was canceled. + + + Double-click here to enable strongly-typed resources for this file. + 按兩下這裡,啟用此檔案的強類型資源。 + + + + The resource name '{0}' is not a valid identifier. + 資源名稱 '{0}' 不是有效的識別項。 + + + + {0} - Codepage {1} + {0} - 字碼頁 {1} + {0} = encoding name (e.g., "Western European (Windows)"), {1} = code page # (e.g., 85001) + + + (Default) + (預設) + + + + Change resource name + 變更資源名稱 + + + + Add {0} new resource(s) + 新增 {0} 個新資源 + {0} = number of resources added + + + Remove {0} resource(s) + 移除 {0} 個資源 + {0} = number of resources removed + + + Delete values in {0} cell(s) + 刪除 {0} 個儲存格中的值 + {0} = number of cells cleared + + + &Categories: + 分類(&C): + The label in the menu strip for the combobox that holds the categories of resources to display + + + Name used to identify the resource in code. + 用來在程式碼中識別資源的名稱。 + + + + Additional information about the resource. This property is only meaningful at design time. + 資源的其他資訊。這個屬性僅在設計階段時有意義。 + + + + Character encoding of the file. + 檔案的字元編碼方式。 + + + + The path to the linked resource. + 連結資源的路徑。 + + + + Specifies whether the file resource is text or binary. + 指定檔案資源是文字或二進位格式。 + + + + Specifies whether the resource is embedded or linked. Embedded resources are saved in the resource file. Linked resources reside in an external location on disk. + 指定資源為內嵌還是連結。內嵌資源儲存在資源檔中,而連結資源則位於磁碟上的外部位置。 + + + + The resource will be generated as this type in the strongly-typed resource class. For example, the resource might be generated as a String or Bitmap object. + 將會在強型別資源類別中以此類型產生資源。例如,可能會將資源產生為 String 或 Bitmap 物件。 + + + + The value of the resource. + 資源的值。 + + + + Unable to add a '{0}' folder to this project. + +{1} + 無法將 '{0}' 資料夾新增至此專案。 + +{1} + {0} = name of folder trying to add (by default, this will be "Resources"), {1} = additional error information + + + Unable to add '{0}' to the project. + +{1} + 無法將 '{0}' 加入專案。 + +{1} + {0} = file name and path, {1} = additional error information. + + + Unable to add '{0}' to the project. + 無法將 '{0}' 加入專案。 + {0} = file name and path + + + A file with the name '{0}' already exists. Do you want to replace it? + 名稱為 '{0}' 的檔案已經存在。要取代它嗎? + {0} = file name and path + + + {0} - Destination File Exists + {0} - 目的檔案已經存在 + {0} = Name of the editor, e.g. "Managed Resources Editor" or "Resource Picker" + + + There is already a linked file with the name "{0}" in the project folder "{1}". Do you want to remove it? + 已經有名為 "{0}" 的連結檔案存在專案資料夾 "{1}" 中。要移除它嗎? + {0} = file name (no path), {1} = Path of resource folder + + + {0} - Destination File Exists + {0} - 目的檔案已經存在 + {0} = Name of the editor, e.g. "Managed Resources Editor" or "Resource Picker" + + + Cannot find the file '{0}'. It may have been moved or deleted. + 找不到檔案 '{0}',可能已移動或刪除。 + {0} = file name and path + + + Connection string + 連接字串 + Added as the last item in the list of available types to let the user browse for a new type + + + Web Service URL + Web 服務 URL + Added as the last item in the list of available types to let the user browse for a new type + + + Browse... + 瀏覽... + Added as the last item in the list of available types to let the user browse for a new type + + + Application + 應用程式 + + + + Application (Web) + 應用程式 (Web) + + + + User + 使用者 + + + + User (Web) + 使用者 (Web) + + + + Name + 名稱 + + + + Type + 類型 + + + + Scope + 範圍 + + + + Value + + + + + Type '{0}' is not defined. + 類型 '{0}' 未定義。 + + + + Name changed + 名稱已變更 + + + + Type changed + 類型已變更 + + + + Scope changed + 範圍已變更 + + + + Roaming changed + 漫遊已變更 + + + + Description changed + 描述已變更 + + + + Provider changed + 提供者已變更 + + + + Value changed + 值已變更 + + + + Generate default value in code changed + 在已變更的程式碼中產生預設值 + + + + Remove {0} setting(s) + 移除 {0} 項設定 + + + + Unable to load settings file. It might be corrupted or contain invalid XML or contain duplicate identifiers. + 無法載入設定檔。檔案可能已損毀,或是包含無效的 XML 或重複的識別碼。 + + + + New values from the app.config file were automatically added + app.config 檔的新值已自動加入 + + + + Value of setting '{0}' was changed in the app.config file. + 在 app.config 檔中,設定 '{0}' 的值已經變更。 + + + + The current value in the .settings file is '{0}' +The new value in the app.config file is '{1}' + +Do you want to update the value in the .settings file? + .settings 檔的目前值是 '{0}' +app.config 檔的新值是 '{1}' + +要更新 .settings 檔的值嗎? + + + + An error occurred while reading the app.config file. The file might be corrupted or contain invalid XML. + 讀取 app.config 檔時發生錯誤。檔案可能已損毀或是包含無效的 XML。 + + + + An error occurred while saving values to the app.config file. The file might be corrupted or contain invalid XML. + 將值儲存到 app.config 檔時發生錯誤。檔案可能已損毀或是包含無效的 XML。 + + + + There is already another setting with the name '{0}'. + 已經有另一個名為 '{0}' 的設定。 + + + + '{0}' is not a valid identifier. + '{0}' 不是有效的識別碼。 + + + + '{0}' is not a valid type name. + '{0}' 不是有效的類型名稱。 + + + + The setting name cannot be empty. + 設定名稱不可為空白。 + + + + '{0}' cannot be converted to an instance of type '{1}'. + '{0}' 不能轉換成類型 '{1}' 的執行個體。 + + + + Generic types are not supported. + 不支援泛型類型。 + + + + Abstract types are not supported. + 不支援抽象類型。 + + + + The current object is auto-generated and only supports renaming through the Settings Designer. + 目前的物件是自動產生的,而且僅支援透過設定設計工具重新命名。 + + + + The current object is auto-generated and does not support modifying parameters. + 目前的物件是自動產生的,而且不支援修改參數的功能。 + + + + The settings file cannot be modified at this time. + 目前無法修改設定檔。 + + + + &Add Setting + 新增設定(&A) + + + + R&emove Setting + 移除設定(&E) + + + + Application settings allow you to store and retrieve property settings and other information for your application dynamically. For example, the application can save a user's color preferences, then retrieve them the next time it runs. + 應用程式設定可以讓您動態儲存及擷取應用程式的屬性設定和其他資訊。例如,應用程式可以儲存使用者的色彩偏好設定,然後下次執行應用程式時再擷取這些設定。 + + + + Learn more about application settings... + 進一步了解有關應用程式設定... + + + + This connection string appears to contain sensitive data (for example, a password), which is required to connect to the database. However, storing sensitive data in the connection string can be a security risk. Do you want to include sensitive data in the connection string? + 這個連接字串似乎含有連接資料庫所需的敏感性資料 (例如密碼)。但是,將敏感性資料儲存在連接字串中可能會有安全性的風險。要在連接字串中包含敏感性資料嗎? + + + + Select a Type + 選取類型 + + + + This class allows you to handle specific events on the settings class: + 這個類別可以讓您處理設定類別上的特定事件: + Comments for user part of extending generated settings class + + + The SettingChanging event is raised before a setting's value is changed. + 在設定值變更之前引發 SettingChanging 事件。 + + + + The PropertyChanged event is raised after a setting's value is changed. + 在設定值變更之後引發 PropertyChanged 事件。 + + + + The SettingsLoaded event is raised after the setting values are loaded. + 在載入設定值之後引發 SettingsLoaded 事件。 + + + + The SettingsSaving event is raised before the setting values are saved. + 在儲存設定值之前引發 SettingsSaving 事件。 + + + + To add event handlers for saving and changing settings, uncomment the lines below: + 若要加入用於儲存與變更設定的事件處理常式,請取消註解下列程式行: + + + + Add code to handle the SettingChangingEvent event here. + 在此加入程式碼以處理 SettingChangingEvent 事件。 + + + + Add code to handle the SettingsSaving event here. + 在此加入程式碼以處理 SettingsSaving 事件。 + + + + Failed to create or open file. + 無法建立或開啟檔案。 + + + + Description of the setting. + 設定的描述。 + + + + Specifies whether or not the default setting value should be generated in the strongly-typed settings class. + 指定是否應該在強類型設定類別中產生預設的設定值。 + + + + Specifies the group to which this Settings file belongs. + 指定此設定檔所屬的群組。 + + + + Description of the group to which this Settings file belongs. + 此設定檔所屬群組的說明。 + + + + Indicates whether the setting should roam when Windows roaming profiles are enabled. + 表示啟用 Windows 漫遊設定檔時是否要使用漫遊設定。 + + + + Name used to identify the setting. + 用來識別設定的名稱。 + + + + The provider (System.Configuration.Provider.ProviderBase) used to manage the setting. + 用來管理設定的提供者 (System.Configuration.Provider.ProviderBase)。 + + + + Specifies whether the setting is per-application (read-only) or per-user (read-write). + 指定設定是針對應用程式 (唯讀) 或是針對使用者 (讀寫)。 + + + + The setting will be generated as this type in the strongly-typed settings class. For example, the setting might be generated as a String or Integer object. + 將會在強型別設定類別中以此類型產生設定。例如,可能會將設定產生為 String 或 Integer 物件。 + + + + The current value for the setting. + 目前的設定值。 + + + + The following files will be deleted: + +{0} + 下列檔案將刪除: + +{0} + Synchronize with user.config file + + + No user.config files were found in any of the following locations: + +{0} + 在下列位置中找不到 user.config 檔案: + +{0} + + + + One or more user.config files was not removed. + 一或多個 user.config 檔案尚未移除。 + + + + My.Settings Auto-Save Functionality + My.Settings 自動儲存功能 + in-code comment used to generate a region that hides My.Settings AutoSave functionality + + + Unable to find service '{0}'. Ensure that the application is installed correctly. + 找不到服務 '{0}'。請確認此應用程式已正確安裝。 + Settings Global-Object-Provider Strings + + + Default pac&kage: + 預設套件(&K): + J# Specific String for Root Namespace + + + (Custom) + (自訂) + Entry in the "Accessibility dropdown" + + + No code generation + 沒有程式碼產生 + Entry in the "Accessibility dropdown" + + + WPF Application + WPF 應用程式 + + + + (Invalid value: "{0}") + (無效值: "{0}") + Goes into the ShutdownMode combobox + + + On explicit shutdown + 在明確關機時 + + + + On last window close + 在最後一個視窗關閉時 + + + + On main window close + 在主視窗關閉時 + + + + Could not find the expected root element "{0}" in the application definition file. + 應用程式定義檔案中找不到預期的根項目 "{0}"。 + + + + The .xaml file was in an unexpected format, near line {0} column {1}. + 此 .xaml 檔在第 {0} 行第 {1} 欄不是預期的格式。 + + + + Startup &object: + 啟始物件(&O): + + + + Startup &URI: + 啟動 URI(&U): + + + + The application definition file is already opened in an incompatible editor. Please close the other editor and reload the project properties page. + 此應用程式定義檔案已經在不相容的編輯器中開啟。請先關閉其他編輯器,然後重新載入此專案屬性頁。 + + + + There was an error trying to open or create the application definition file for this project. {0} + 嘗試開啟或建立此專案的應用程式定義檔案時發生錯誤。{0} + + + + An error occurred trying to load the application definition file for this project. The file '{0}' could not be parsed. Please edit the file in the XAML editor to fix the error. + 嘗試載入此專案的應用程式定義檔案時發生錯誤。無法剖析檔案 '{0}'。請在 XAML 編輯器中編輯此檔案以修正錯誤。 + + + + (Error) + (錯誤) + Used inside UI elements when there is an error (e.g. combobox text) + + + An unspecified error has occurred. + 發生未指定的錯誤。 + + + + This project does not contain an application definition file. + 此專案未包含應用程式定義檔案。 + + + + An error occurred trying to create the application events file. {0} + 嘗試建立應用程式事件檔時發生錯誤。{0} + + + + Invalid argument '{0}' + 引數 '{0}' 無效 + {0} = name of invalid argument + + + WPF Console Application + WPF 主控台應用程式 + + + + WPF Class Library + WPF 類別庫 + + + + Embed manifest with default settings + 用預設設定嵌入資訊清單 + + + + Create application without a manifest + 建立無資訊清單應用程式 + + + + Invalid manifest file. + 資訊清單檔案無效。 + + + + Services + 服務 + + + + Client application services enable your Windows-based applications to use the ASP.NET login (authentication), roles, and profile (settings) services. + 用戶端應用程式服務可以讓您的 Windows 應用程式使用 ASP.NET 登入 (驗證)、角色和設定檔 (設定) 服務。 + + + + Learn more about client application services... + 進一步了解用戶端應用程式服務... + + + + Advanced Settings for Services + 服務的進階設定 + + + + Disabling application services will clear the default services for Authentication, Roles, and Settings. Click OK to disable application services. + 停用應用程式服務將會清除驗證、角色和設定的預設服務。按一下 [確定] 即可停用應用程式服務。 + + + + Disable Application Services + 停用應用程式服務 + + + + seconds + + + + + minutes + 分鐘 + + + + hours + 小時 + + + + days + 天數 + + + + To enable client application services, you must set the Target Framework for your application to .NET Framework 3.5 or later. In C#, you can do this on the Application property page. In Visual Basic, you can do this one the Compile property page by clicking Advanced Compile Options. + 若要啟用用戶端應用程式服務,必須將應用程式的目標 Framework 設定成 .NET Framework 3.5 (含) 以後版本。在 C#,您可以在 [應用程式]5D; 屬性頁上進行此設定。在 Visual Basic,您可以按一下 [進階編譯選項]5D;,在 [編譯]5D; 屬性頁上進行此設定。 + + + + An error occurred while reading the Application configuration file. The file might be corrupted or contain invalid XML. + 讀取應用程式組態檔時發生錯誤。此檔案可能已損毀或包含無效的 XML。 + + + + The URL is invalid. Please enter a valid URL like http://microsoft.com/services + URL 無效。請輸入有效的 URL,例如 http://microsoft.com/services + + + + A service URL in the application configuration file is not in the expected format. + 應用程式組態檔中某項服務的 URL 不是預期的格式。 + + + + Authentication, Roles and Web Settings providers have been configured via the Application configuration file such that they do not share a common connection string. + 驗證、角色和 Web 設定提供者已透過應用程式組態檔設定成不共用通用的連接字串。 + + + + Specify a connection string to a SQL Server database, or use the special connection string "Data Source = |SQL/CE|", which causes SQL Server Compact to generate local database files for offline storage. + 指定 SQL Server 資料庫的連接字串,或者使用特殊連接字串 "Data Source = |SQL/CE|",它會使 SQL Server Compact 產生離線存放區使用的本機資料庫檔案。 + + + + The following type names were not understood: '{0}'. Make sure you have references to these types. + 不了解下列類型名稱: '{0}'。請確認您具備這些類型的參考。 + + + + There are already settings with the following names: {0}. + 已經有使用下列名稱的設定: {0}。 + + + + The username/password combination cannot be authenticated. + 無法驗證此使用者名稱/密碼組合。 + + + + Windows Forms Application + Windows Forms 應用程式 + The "Windows Forms" distinguishes it from a WPF application + + + Namespace of the service reference. + 服務參考的命名空間。 + + + + Service Reference Properties + 服務參考屬性 + + + + Metadata Location Url + 中繼資料位置 URL + + + + Metadata Location + 中繼資料位置 + + + + A service reference with multiple source urls is not supported. + 不支援具有多個來源 URL 的服務參考。 + + + + Cannot change reference Url to empty. The reference url must be a valid URL. + 無法將參考 URL 變更為空白。參考 URL 必須是有效的 URL。 + + + + One or more files were reloaded during the checkout. Please retry your operation. + 在簽出期間重新載入了一或多個檔案。請重試作業。 + + + + The project was reloaded, and some changes on this page may have been lost. + 專案已重新載入,此頁面上的某些變更可能已遺失。 + + + + The application will fail to run in the selected zone because of this requested elevated permission. Click the help link above for more info. + 由於這項要求的更高權限,此應用程式將無法在選取的區域中執行。如需詳細資訊,請按一下上方的 [說明]5D; 連結。 + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/MyExtensibilityRes.cs.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/MyExtensibilityRes.cs.xlf new file mode 100644 index 00000000000..ec65922d473 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/MyExtensibilityRes.cs.xlf @@ -0,0 +1,107 @@ + + + + + + The following My Namespace extensions are associated with assembly '{0}'. Do you want to add them to your project? + Následující rozšíření rozhraní My Namespace jsou přidružená k sestavení {0}. Chcete je přidat do projektu? + Label of the add My extensions dialog. + + + Add My Namespace Extensions + Přidat rozšíření My Namespace + Text (caption) of the add My extensions dialog. + + + &Remember my decision for '{0}'. + Pamatovat si &rozhodnutí pro {0}. + Text for the option on add / remove My extensions dialog. + + + Removing the reference to '{0}' will make the following My Namespace extensions stop functioning. Do you want to remove them as well? + Pokud odeberete odkaz na {0}, přestanou následující rozšíření My Namespace fungovat. Chcete je také odebrat? + Label of the remove My extensions dialog. + + + Remove My Namespace Extensions + Odebrat rozšíření My Namespace + Text (caption) of the remove My extensions dialog. + + + No project items were added to the current project from My Namespace extension '{0}'. The extension will not be added to the project. + Z rozšíření My Namespace {0} se do aktuálního projektu nepřidaly žádné položky projektu. Rozšíření nebude do projektu přidáno. + Error message when there is no project items being added to the project from the My Namespace extension template. + + + Failed to Add Project Item + Selhalo přidání položky projektu + Text (caption)for the error message when there is no project items being added to the project from the My Namespace extension template. + + + No project items could be associated with My Namespace extension '{0}'. The extension will not be added to the project. + Rozšíření My Namespace {0} nemá přidružené žádné položky projektu. Rozšíření nebude do projektu přidáno. + Error message when we could not set build attributes on any of the project items in My Namespace extension template. + + + Project item '{0}' was added to the current project but could not be associated with My Namespace extension '{1}'. It will not be removed with the extension. + Položka projektu {0} byla přidána do aktuálního projektu, ale nemůžete ji přidružit k rozšíření My Namespace {1}. S rozšířením nebude odebrána. + Error message when we could not set build attributes on one of the project items in My Namespace extension template. + + + Failed to Set Extension Attributes + Selhalo nastavení rozšiřujících atributů + Text (caption) of the error message when we could not set build attributes on one of or any of the project items in My Namespace extension template. + + + Version '{0}' of My Namespace extension '{1}' already exists in the current project. Do you want to overwrite it with version '{2}'? + Verze {0} rozšíření My Namespace {1} už v aktuálním projektu existuje. Chcete ji přepsat verzí {2}? + Question to replace an existing My extension in the project. + + + Extension File Already Exists + Soubor rozšíření už existuje + Title (caption) for the question to replace an existing My extension in the project. + + + My Extensions + Moje rozšíření + Caption for "My Extensions" property page. + + + My Namespace extensions added: '{0}'. + Rozšíření My Namespace byla přidána: {0} + Status bar text listing all My extension templates added. + + + My Namespace extension added: '{0}'. + Rozšíření My Namespace bylo přidáno: {0} + Status bar text for each My extension template added. + + + My Namespace extensions added: '{0}'. My Namespace extensions removed: '{1}'. + Rozšíření My Namespace byla přidána: {0} Rozšíření My Namespace byla odebrána: {1} + Status bar text listing all My extensions added and removed to a project. This is a rare case but may happen if user adds / removes assemblies real fast. + + + Adding My Namespace extensions... + Přidává se rozšíření My Namespace... + Status bar text when starting to add My extension templates. + + + My Namespace extensions removed: '{0}'. + Rozšíření My Namespace byla odebrána: {0} + Status bar text listing all My extension code files removed. + + + My Namespace extension removed: '{0}'. + Rozšíření My Namespace bylo odebráno: {0} + Status bar text for each My extension code file removed. + + + Removing My Namespace extensions... + Odebírá se rozšíření My Namespace... + Status bar text when starting to remove My extensions. + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/MyExtensibilityRes.de.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/MyExtensibilityRes.de.xlf new file mode 100644 index 00000000000..588c6249f3b --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/MyExtensibilityRes.de.xlf @@ -0,0 +1,107 @@ + + + + + + The following My Namespace extensions are associated with assembly '{0}'. Do you want to add them to your project? + Die folgenden My-Namespaceerweiterungen sind der Assembly "{0}" zugeordnet. Möchten Sie sie dem Projekt hinzufügen? + Label of the add My extensions dialog. + + + Add My Namespace Extensions + My-Namespaceerweiterungen hinzufügen + Text (caption) of the add My extensions dialog. + + + &Remember my decision for '{0}'. + &Entscheidung für "{0}" speichern. + Text for the option on add / remove My extensions dialog. + + + Removing the reference to '{0}' will make the following My Namespace extensions stop functioning. Do you want to remove them as well? + Wenn der Verweis auf "{0}" entfernt wird, funktionieren die folgenden My-Namespaceerweiterungen nicht mehr. Möchten Sie sie ebenfalls entfernen? + Label of the remove My extensions dialog. + + + Remove My Namespace Extensions + My-Namespaceerweiterungen entfernen + Text (caption) of the remove My extensions dialog. + + + No project items were added to the current project from My Namespace extension '{0}'. The extension will not be added to the project. + Dem aktuellen Projekt wurden keine Projektelemente aus der My-Namespaceerweiterung "{0}" hinzugefügt. Die Erweiterung wird dem Projekt nicht hinzugefügt. + Error message when there is no project items being added to the project from the My Namespace extension template. + + + Failed to Add Project Item + Fehler beim Hinzufügen eines Projektelements. + Text (caption)for the error message when there is no project items being added to the project from the My Namespace extension template. + + + No project items could be associated with My Namespace extension '{0}'. The extension will not be added to the project. + Der My-Namespaceerweiterung "{0}" konnten keine Projektelemente zugeordnet werden. Die Erweiterung wird dem Projekt nicht hinzugefügt. + Error message when we could not set build attributes on any of the project items in My Namespace extension template. + + + Project item '{0}' was added to the current project but could not be associated with My Namespace extension '{1}'. It will not be removed with the extension. + Das Projektelement "{0}" wurde dem aktuellen Projekt hinzugefügt, konnte aber der My-Namespaceerweiterung "{1}" nicht zugeordnet werden. Es wird nicht mit der Erweiterung entfernt. + Error message when we could not set build attributes on one of the project items in My Namespace extension template. + + + Failed to Set Extension Attributes + Fehler beim Festlegen von Erweiterungsattributen. + Text (caption) of the error message when we could not set build attributes on one of or any of the project items in My Namespace extension template. + + + Version '{0}' of My Namespace extension '{1}' already exists in the current project. Do you want to overwrite it with version '{2}'? + Die Version "{0}" der My-Namespaceerweiterung "{1}" ist bereits im aktuellen Projekt vorhanden. Möchten Sie sie mit der Version "{2}" überschreiben? + Question to replace an existing My extension in the project. + + + Extension File Already Exists + Erweiterungsdatei bereits vorhanden + Title (caption) for the question to replace an existing My extension in the project. + + + My Extensions + Meine Erweiterungen + Caption for "My Extensions" property page. + + + My Namespace extensions added: '{0}'. + My-Namespaceerweiterungen hinzugefügt: {0}. + Status bar text listing all My extension templates added. + + + My Namespace extension added: '{0}'. + My-Namespaceerweiterung hinzugefügt: {0}. + Status bar text for each My extension template added. + + + My Namespace extensions added: '{0}'. My Namespace extensions removed: '{1}'. + My-Namespaceerweiterungen hinzugefügt: {0}. My-Namespaceerweiterungen entfernt: {1}. + Status bar text listing all My extensions added and removed to a project. This is a rare case but may happen if user adds / removes assemblies real fast. + + + Adding My Namespace extensions... + My-Namespaceerweiterungen werden hinzugefügt... + Status bar text when starting to add My extension templates. + + + My Namespace extensions removed: '{0}'. + My-Namespaceerweiterungen entfernt: {0}. + Status bar text listing all My extension code files removed. + + + My Namespace extension removed: '{0}'. + My-Namespaceerweiterung entfernt: {0}. + Status bar text for each My extension code file removed. + + + Removing My Namespace extensions... + My-Namespaceerweiterungen werden entfernt... + Status bar text when starting to remove My extensions. + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/MyExtensibilityRes.en.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/MyExtensibilityRes.en.xlf new file mode 100644 index 00000000000..6796c7696e6 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/MyExtensibilityRes.en.xlf @@ -0,0 +1,107 @@ + + + + + + The following My Namespace extensions are associated with assembly '{0}'. Do you want to add them to your project? + The following My Namespace extensions are associated with assembly '{0}'. Do you want to add them to your project? + Label of the add My extensions dialog. + + + Add My Namespace Extensions + Add My Namespace Extensions + Text (caption) of the add My extensions dialog. + + + &Remember my decision for '{0}'. + &Remember my decision for '{0}'. + Text for the option on add / remove My extensions dialog. + + + Removing the reference to '{0}' will make the following My Namespace extensions stop functioning. Do you want to remove them as well? + Removing the reference to '{0}' will make the following My Namespace extensions stop functioning. Do you want to remove them as well? + Label of the remove My extensions dialog. + + + Remove My Namespace Extensions + Remove My Namespace Extensions + Text (caption) of the remove My extensions dialog. + + + No project items were added to the current project from My Namespace extension '{0}'. The extension will not be added to the project. + No project items were added to the current project from My Namespace extension '{0}'. The extension will not be added to the project. + Error message when there is no project items being added to the project from the My Namespace extension template. + + + Failed to Add Project Item + Failed to Add Project Item + Text (caption)for the error message when there is no project items being added to the project from the My Namespace extension template. + + + No project items could be associated with My Namespace extension '{0}'. The extension will not be added to the project. + No project items could be associated with My Namespace extension '{0}'. The extension will not be added to the project. + Error message when we could not set build attributes on any of the project items in My Namespace extension template. + + + Project item '{0}' was added to the current project but could not be associated with My Namespace extension '{1}'. It will not be removed with the extension. + Project item '{0}' was added to the current project but could not be associated with My Namespace extension '{1}'. It will not be removed with the extension. + Error message when we could not set build attributes on one of the project items in My Namespace extension template. + + + Failed to Set Extension Attributes + Failed to Set Extension Attributes + Text (caption) of the error message when we could not set build attributes on one of or any of the project items in My Namespace extension template. + + + Version '{0}' of My Namespace extension '{1}' already exists in the current project. Do you want to overwrite it with version '{2}'? + Version '{0}' of My Namespace extension '{1}' already exists in the current project. Do you want to overwrite it with version '{2}'? + Question to replace an existing My extension in the project. + + + Extension File Already Exists + Extension File Already Exists + Title (caption) for the question to replace an existing My extension in the project. + + + My Extensions + My Extensions + Caption for "My Extensions" property page. + + + My Namespace extensions added: '{0}'. + My Namespace extensions added: '{0}'. + Status bar text listing all My extension templates added. + + + My Namespace extension added: '{0}'. + My Namespace extension added: '{0}'. + Status bar text for each My extension template added. + + + My Namespace extensions added: '{0}'. My Namespace extensions removed: '{1}'. + My Namespace extensions added: '{0}'. My Namespace extensions removed: '{1}'. + Status bar text listing all My extensions added and removed to a project. This is a rare case but may happen if user adds / removes assemblies real fast. + + + Adding My Namespace extensions... + Adding My Namespace extensions... + Status bar text when starting to add My extension templates. + + + My Namespace extensions removed: '{0}'. + My Namespace extensions removed: '{0}'. + Status bar text listing all My extension code files removed. + + + My Namespace extension removed: '{0}'. + My Namespace extension removed: '{0}'. + Status bar text for each My extension code file removed. + + + Removing My Namespace extensions... + Removing My Namespace extensions... + Status bar text when starting to remove My extensions. + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/MyExtensibilityRes.es.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/MyExtensibilityRes.es.xlf new file mode 100644 index 00000000000..9376a024fb4 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/MyExtensibilityRes.es.xlf @@ -0,0 +1,107 @@ + + + + + + The following My Namespace extensions are associated with assembly '{0}'. Do you want to add them to your project? + Las siguientes extensiones del espacio de nombres My están asociadas con el ensamblado '{0}'. ¿Quiere agregarlas al proyecto? + Label of the add My extensions dialog. + + + Add My Namespace Extensions + Agregar extensiones del espacio de nombres My + Text (caption) of the add My extensions dialog. + + + &Remember my decision for '{0}'. + &Recordar esta decisión para '{0}'. + Text for the option on add / remove My extensions dialog. + + + Removing the reference to '{0}' will make the following My Namespace extensions stop functioning. Do you want to remove them as well? + Si quita la referencia a '{0}', las siguientes extensiones del espacio de nombres My dejarán de funcionar. ¿Quiere quitarlas también? + Label of the remove My extensions dialog. + + + Remove My Namespace Extensions + Quitar extensiones del espacio de nombres My + Text (caption) of the remove My extensions dialog. + + + No project items were added to the current project from My Namespace extension '{0}'. The extension will not be added to the project. + No se han agregado elementos de proyecto al proyecto actual de la extensión '{0}' del espacio de nombres My. No se agregará la extensión al proyecto. + Error message when there is no project items being added to the project from the My Namespace extension template. + + + Failed to Add Project Item + No se pudo agregar el elemento de proyecto + Text (caption)for the error message when there is no project items being added to the project from the My Namespace extension template. + + + No project items could be associated with My Namespace extension '{0}'. The extension will not be added to the project. + No se pueden asociar elementos de proyecto con la extensión '{0}' del espacio de nombres My. No se agregará la extensión al proyecto. + Error message when we could not set build attributes on any of the project items in My Namespace extension template. + + + Project item '{0}' was added to the current project but could not be associated with My Namespace extension '{1}'. It will not be removed with the extension. + Se ha agregado el elemento de proyecto '{0}' al proyecto actual, pero no se puede asociar a la extensión '{1}' del espacio de nombres My. No se quitará con la extensión. + Error message when we could not set build attributes on one of the project items in My Namespace extension template. + + + Failed to Set Extension Attributes + No se pudieron establecer atributos de extensión + Text (caption) of the error message when we could not set build attributes on one of or any of the project items in My Namespace extension template. + + + Version '{0}' of My Namespace extension '{1}' already exists in the current project. Do you want to overwrite it with version '{2}'? + La versión '{0}' de la extensión '{1}' del espacio de nombres My ya existe en el proyecto actual. ¿Quiere sobrescribirla con la versión '{2}'? + Question to replace an existing My extension in the project. + + + Extension File Already Exists + El archivo de extensión ya existe + Title (caption) for the question to replace an existing My extension in the project. + + + My Extensions + Extensiones de My + Caption for "My Extensions" property page. + + + My Namespace extensions added: '{0}'. + Extensiones del espacio de nombres My agregadas: '{0}'. + Status bar text listing all My extension templates added. + + + My Namespace extension added: '{0}'. + Extensión del espacio de nombres My agregada: '{0}'. + Status bar text for each My extension template added. + + + My Namespace extensions added: '{0}'. My Namespace extensions removed: '{1}'. + Extensiones del espacio de nombres My agregadas: '{0}'. Extensiones del espacio de nombres My quitadas: '{1}'. + Status bar text listing all My extensions added and removed to a project. This is a rare case but may happen if user adds / removes assemblies real fast. + + + Adding My Namespace extensions... + Agregando extensiones del espacio de nombres My... + Status bar text when starting to add My extension templates. + + + My Namespace extensions removed: '{0}'. + Extensiones del espacio de nombres My quitadas: '{0}'. + Status bar text listing all My extension code files removed. + + + My Namespace extension removed: '{0}'. + Extensión del espacio de nombres My quitada: '{0}'. + Status bar text for each My extension code file removed. + + + Removing My Namespace extensions... + Quitando extensiones del espacio de nombres My... + Status bar text when starting to remove My extensions. + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/MyExtensibilityRes.fr.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/MyExtensibilityRes.fr.xlf new file mode 100644 index 00000000000..0092c58edac --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/MyExtensibilityRes.fr.xlf @@ -0,0 +1,107 @@ + + + + + + The following My Namespace extensions are associated with assembly '{0}'. Do you want to add them to your project? + Les extensions de l'espace de noms My suivantes sont associées à l'assembly '{0}'. Voulez-vous les ajouter à votre projet ? + Label of the add My extensions dialog. + + + Add My Namespace Extensions + Ajouter les extensions de l'espace de noms My + Text (caption) of the add My extensions dialog. + + + &Remember my decision for '{0}'. + Mémorise&r ma décision pour '{0}'. + Text for the option on add / remove My extensions dialog. + + + Removing the reference to '{0}' will make the following My Namespace extensions stop functioning. Do you want to remove them as well? + La suppression de la référence à '{0}' va empêcher le fonctionnement des extensions de l'espace de noms My suivantes. Voulez-vous aussi les supprimer ? + Label of the remove My extensions dialog. + + + Remove My Namespace Extensions + Supprimer les extensions de l'espace de noms My + Text (caption) of the remove My extensions dialog. + + + No project items were added to the current project from My Namespace extension '{0}'. The extension will not be added to the project. + Aucun élément de projet n'a été ajouté au projet actif depuis l'extension de l'espace de noms My '{0}'. L'extension ne sera pas ajoutée au projet. + Error message when there is no project items being added to the project from the My Namespace extension template. + + + Failed to Add Project Item + Impossible d'ajouter l'élément de projet + Text (caption)for the error message when there is no project items being added to the project from the My Namespace extension template. + + + No project items could be associated with My Namespace extension '{0}'. The extension will not be added to the project. + Aucun élément de projet n'a pu être associé à l'extension de l'espace de noms My '{0}'. L'extension ne sera pas ajoutée au projet. + Error message when we could not set build attributes on any of the project items in My Namespace extension template. + + + Project item '{0}' was added to the current project but could not be associated with My Namespace extension '{1}'. It will not be removed with the extension. + L'élément de projet '{0}' a été ajouté au projet actif, mais n'a pas pu être associé à l'extension de l'espace de noms My '{1}'. Il ne sera pas supprimé avec l'extension. + Error message when we could not set build attributes on one of the project items in My Namespace extension template. + + + Failed to Set Extension Attributes + Impossible de définir les attributs d'extension + Text (caption) of the error message when we could not set build attributes on one of or any of the project items in My Namespace extension template. + + + Version '{0}' of My Namespace extension '{1}' already exists in the current project. Do you want to overwrite it with version '{2}'? + La version '{0}' de l'extension de l'espace de noms My '{1}' existe déjà dans le projet actif. Voulez-vous la remplacer par la version '{2}' ? + Question to replace an existing My extension in the project. + + + Extension File Already Exists + Le fichier d'extension existe déjà + Title (caption) for the question to replace an existing My extension in the project. + + + My Extensions + Extensions My + Caption for "My Extensions" property page. + + + My Namespace extensions added: '{0}'. + Extensions de l'espace de noms My ajoutées : '{0}'. + Status bar text listing all My extension templates added. + + + My Namespace extension added: '{0}'. + Extension de l'espace de noms My ajoutée : '{0}'. + Status bar text for each My extension template added. + + + My Namespace extensions added: '{0}'. My Namespace extensions removed: '{1}'. + Extensions de l'espace de noms My ajoutées : '{0}'. Extensions de l'espace de noms My supprimées : '{1}'. + Status bar text listing all My extensions added and removed to a project. This is a rare case but may happen if user adds / removes assemblies real fast. + + + Adding My Namespace extensions... + Ajout des extensions de l'espace de noms My... + Status bar text when starting to add My extension templates. + + + My Namespace extensions removed: '{0}'. + Extensions de l'espace de noms My supprimées : '{0}'. + Status bar text listing all My extension code files removed. + + + My Namespace extension removed: '{0}'. + Extension de l'espace de noms My supprimée : '{0}'. + Status bar text for each My extension code file removed. + + + Removing My Namespace extensions... + Suppression des extensions de l'espace de noms My... + Status bar text when starting to remove My extensions. + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/MyExtensibilityRes.it.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/MyExtensibilityRes.it.xlf new file mode 100644 index 00000000000..2dd57154f02 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/MyExtensibilityRes.it.xlf @@ -0,0 +1,107 @@ + + + + + + The following My Namespace extensions are associated with assembly '{0}'. Do you want to add them to your project? + Le estensioni seguenti dello spazio dei nomi My sono associate all'assembly '{0}'. Aggiungerle al progetto? + Label of the add My extensions dialog. + + + Add My Namespace Extensions + Aggiungi estensioni spazio dei nomi My + Text (caption) of the add My extensions dialog. + + + &Remember my decision for '{0}'. + &Memorizza impostazione per '{0}'. + Text for the option on add / remove My extensions dialog. + + + Removing the reference to '{0}' will make the following My Namespace extensions stop functioning. Do you want to remove them as well? + Se si rimuove il riferimento a '{0}', le estensioni dello spazio dei nomi My non funzioneranno più. Rimuovere anche le estensioni? + Label of the remove My extensions dialog. + + + Remove My Namespace Extensions + Rimuovi estensioni spazio dei nomi My + Text (caption) of the remove My extensions dialog. + + + No project items were added to the current project from My Namespace extension '{0}'. The extension will not be added to the project. + Non è stato possibile aggiungere elementi del progetto al progetto corrente dall'estensione '{0}' dello spazio dei nomi My. L'estensione non verrà aggiunta al progetto. + Error message when there is no project items being added to the project from the My Namespace extension template. + + + Failed to Add Project Item + Non è stato possibile aggiungere l'elemento del progetto + Text (caption)for the error message when there is no project items being added to the project from the My Namespace extension template. + + + No project items could be associated with My Namespace extension '{0}'. The extension will not be added to the project. + Non è stato possibile associare elementi del progetto all'estensione '{0}' dello spazio dei nomi My. L'estensione non verrà aggiunta al progetto. + Error message when we could not set build attributes on any of the project items in My Namespace extension template. + + + Project item '{0}' was added to the current project but could not be associated with My Namespace extension '{1}'. It will not be removed with the extension. + L'elemento '{0}' del progetto è stato aggiunto al progetto corrente, ma non può essere associato all'estensione '{1}' dello spazio dei nomi My. L'elemento non verrà rimosso con l'estensione. + Error message when we could not set build attributes on one of the project items in My Namespace extension template. + + + Failed to Set Extension Attributes + Non è stato possibile impostare gli attributi dell'estensione + Text (caption) of the error message when we could not set build attributes on one of or any of the project items in My Namespace extension template. + + + Version '{0}' of My Namespace extension '{1}' already exists in the current project. Do you want to overwrite it with version '{2}'? + La versione '{0}' dell'estensione dello spazio dei nomi My '{1}' esiste già nel progetto corrente. Sovrascriverla con la versione '{2}'? + Question to replace an existing My extension in the project. + + + Extension File Already Exists + File di estensione già esistente + Title (caption) for the question to replace an existing My extension in the project. + + + My Extensions + Estensioni My + Caption for "My Extensions" property page. + + + My Namespace extensions added: '{0}'. + Estensioni dello spazio dei nomi My aggiunte: '{0}'. + Status bar text listing all My extension templates added. + + + My Namespace extension added: '{0}'. + Estensione dello spazio dei nomi My aggiunta: '{0}'. + Status bar text for each My extension template added. + + + My Namespace extensions added: '{0}'. My Namespace extensions removed: '{1}'. + Estensioni dello spazio dei nomi My aggiunte: '{0}'. Estensioni dello spazio dei nomi My rimosse: '{1}'. + Status bar text listing all My extensions added and removed to a project. This is a rare case but may happen if user adds / removes assemblies real fast. + + + Adding My Namespace extensions... + Aggiunta delle estensioni dello spazio dei nomi My... + Status bar text when starting to add My extension templates. + + + My Namespace extensions removed: '{0}'. + Estensioni dello spazio dei nomi My rimosse: '{0}'. + Status bar text listing all My extension code files removed. + + + My Namespace extension removed: '{0}'. + Estensione dello spazio dei nomi My rimossa: '{0}'. + Status bar text for each My extension code file removed. + + + Removing My Namespace extensions... + Rimozione delle estensioni dello spazio dei nomi My... + Status bar text when starting to remove My extensions. + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/MyExtensibilityRes.ja.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/MyExtensibilityRes.ja.xlf new file mode 100644 index 00000000000..ab3b08e8584 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/MyExtensibilityRes.ja.xlf @@ -0,0 +1,107 @@ + + + + + + The following My Namespace extensions are associated with assembly '{0}'. Do you want to add them to your project? + 次のマイ名前空間拡張がアセンブリ '{0}' に関連付けられています。プロジェクトに追加しますか? + Label of the add My extensions dialog. + + + Add My Namespace Extensions + マイ名前空間拡張を追加します + Text (caption) of the add My extensions dialog. + + + &Remember my decision for '{0}'. + '{0}' の決定を記憶する(&R) + Text for the option on add / remove My extensions dialog. + + + Removing the reference to '{0}' will make the following My Namespace extensions stop functioning. Do you want to remove them as well? + '{0}' への参照を削除すると、次のマイ名前空間拡張が機能しなくなります。この拡張も削除しますか? + Label of the remove My extensions dialog. + + + Remove My Namespace Extensions + マイ名前空間拡張を削除します + Text (caption) of the remove My extensions dialog. + + + No project items were added to the current project from My Namespace extension '{0}'. The extension will not be added to the project. + マイ名前空間拡張 '{0}' から現在のプロジェクトに追加されたプロジェクト項目はありません。拡張はプロジェクトに追加されません。 + Error message when there is no project items being added to the project from the My Namespace extension template. + + + Failed to Add Project Item + プロジェクト項目を追加できませんでした + Text (caption)for the error message when there is no project items being added to the project from the My Namespace extension template. + + + No project items could be associated with My Namespace extension '{0}'. The extension will not be added to the project. + マイ名前空間拡張 '{0}' にプロジェクト項目を関連付けることができませんでした。拡張はプロジェクトに追加されません。 + Error message when we could not set build attributes on any of the project items in My Namespace extension template. + + + Project item '{0}' was added to the current project but could not be associated with My Namespace extension '{1}'. It will not be removed with the extension. + プロジェクト項目 '{0}' が現在のプロジェクトに追加されましたが、マイ名前空間拡張 '{1}' と関連付けることができませんでした。プロジェクト項目は拡張と一緒に削除されません。 + Error message when we could not set build attributes on one of the project items in My Namespace extension template. + + + Failed to Set Extension Attributes + 拡張の属性を設定できませんでした + Text (caption) of the error message when we could not set build attributes on one of or any of the project items in My Namespace extension template. + + + Version '{0}' of My Namespace extension '{1}' already exists in the current project. Do you want to overwrite it with version '{2}'? + 現在のプロジェクトにはバージョン '{0}' のマイ名前空間拡張 '{1}' が既に存在します。バージョン '{2}' で上書きしますか? + Question to replace an existing My extension in the project. + + + Extension File Already Exists + 拡張ファイルが既に存在します + Title (caption) for the question to replace an existing My extension in the project. + + + My Extensions + マイ拡張 + Caption for "My Extensions" property page. + + + My Namespace extensions added: '{0}'. + 追加されたマイ名前空間拡張: '{0}'。 + Status bar text listing all My extension templates added. + + + My Namespace extension added: '{0}'. + 追加されたマイ名前空間拡張: '{0}'。 + Status bar text for each My extension template added. + + + My Namespace extensions added: '{0}'. My Namespace extensions removed: '{1}'. + 追加されたマイ名前空間拡張: '{0}'。削除されたマイ名前空間拡張: '{1}'。 + Status bar text listing all My extensions added and removed to a project. This is a rare case but may happen if user adds / removes assemblies real fast. + + + Adding My Namespace extensions... + マイ名前空間拡張を追加しています... + Status bar text when starting to add My extension templates. + + + My Namespace extensions removed: '{0}'. + 削除されたマイ名前空間拡張: '{0}'。 + Status bar text listing all My extension code files removed. + + + My Namespace extension removed: '{0}'. + 削除されたマイ名前空間拡張: '{0}'。 + Status bar text for each My extension code file removed. + + + Removing My Namespace extensions... + マイ名前空間拡張を削除しています... + Status bar text when starting to remove My extensions. + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/MyExtensibilityRes.ko.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/MyExtensibilityRes.ko.xlf new file mode 100644 index 00000000000..6c554422d60 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/MyExtensibilityRes.ko.xlf @@ -0,0 +1,107 @@ + + + + + + The following My Namespace extensions are associated with assembly '{0}'. Do you want to add them to your project? + 다음 My 네임스페이스 확장이 '{0}' 어셈블리에 연결되어 있습니다. 이러한 확장을 프로젝트에 추가하시겠습니까? + Label of the add My extensions dialog. + + + Add My Namespace Extensions + My 네임스페이스 확장 추가 + Text (caption) of the add My extensions dialog. + + + &Remember my decision for '{0}'. + '{0}'에 대한 결정을 저장합니다(&R). + Text for the option on add / remove My extensions dialog. + + + Removing the reference to '{0}' will make the following My Namespace extensions stop functioning. Do you want to remove them as well? + '{0}'에 대한 참조를 제거하면 다음 My 네임스페이스 확장의 작동이 중지됩니다. 확장도 제거하시겠습니까? + Label of the remove My extensions dialog. + + + Remove My Namespace Extensions + My 네임스페이스 확장 제거 + Text (caption) of the remove My extensions dialog. + + + No project items were added to the current project from My Namespace extension '{0}'. The extension will not be added to the project. + My 네임스페이스 확장 '{0}'에서 현재 프로젝트에 추가된 프로젝트 항목이 없습니다. 프로젝트에 확장이 추가되지 않습니다. + Error message when there is no project items being added to the project from the My Namespace extension template. + + + Failed to Add Project Item + 프로젝트 항목 추가 실패 + Text (caption)for the error message when there is no project items being added to the project from the My Namespace extension template. + + + No project items could be associated with My Namespace extension '{0}'. The extension will not be added to the project. + 프로젝트 항목을 My 네임스페이스 확장 '{0}'과(와) 연결할 수 없습니다. 프로젝트에 확장이 추가되지 않습니다. + Error message when we could not set build attributes on any of the project items in My Namespace extension template. + + + Project item '{0}' was added to the current project but could not be associated with My Namespace extension '{1}'. It will not be removed with the extension. + 프로젝트 항목 '{0}'이(가) 현재 프로젝트에 추가되었지만 My 네임스페이스 확장 '{1}'과(와) 연결할 수 없습니다. 확장과 함께 제거되지 않습니다. + Error message when we could not set build attributes on one of the project items in My Namespace extension template. + + + Failed to Set Extension Attributes + 확장 특성 설정 실패 + Text (caption) of the error message when we could not set build attributes on one of or any of the project items in My Namespace extension template. + + + Version '{0}' of My Namespace extension '{1}' already exists in the current project. Do you want to overwrite it with version '{2}'? + My 네임스페이스 확장 '{1}'의 버전 '{0}'이(가) 이미 현재 프로젝트에 있습니다. 버전 '{2}'(으)로 덮어쓰시겠습니까? + Question to replace an existing My extension in the project. + + + Extension File Already Exists + 확장 파일 이미 있음 + Title (caption) for the question to replace an existing My extension in the project. + + + My Extensions + My 확장 + Caption for "My Extensions" property page. + + + My Namespace extensions added: '{0}'. + My 네임스페이스 확장이 추가되었습니다. '{0}'. + Status bar text listing all My extension templates added. + + + My Namespace extension added: '{0}'. + My 네임스페이스 확장이 추가되었습니다. '{0}'. + Status bar text for each My extension template added. + + + My Namespace extensions added: '{0}'. My Namespace extensions removed: '{1}'. + My 네임스페이스 확장이 추가되었습니다. '{0}'. My 네임스페이스 확장이 제거되었습니다. '{1}'. + Status bar text listing all My extensions added and removed to a project. This is a rare case but may happen if user adds / removes assemblies real fast. + + + Adding My Namespace extensions... + My 네임스페이스 확장을 추가하고 있습니다... + Status bar text when starting to add My extension templates. + + + My Namespace extensions removed: '{0}'. + My 네임스페이스 확장이 제거되었습니다. '{0}'. + Status bar text listing all My extension code files removed. + + + My Namespace extension removed: '{0}'. + My 네임스페이스 확장이 제거되었습니다. '{0}'. + Status bar text for each My extension code file removed. + + + Removing My Namespace extensions... + My 네임스페이스 확장을 제거하고 있습니다... + Status bar text when starting to remove My extensions. + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/MyExtensibilityRes.pl.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/MyExtensibilityRes.pl.xlf new file mode 100644 index 00000000000..e671ee203c8 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/MyExtensibilityRes.pl.xlf @@ -0,0 +1,107 @@ + + + + + + The following My Namespace extensions are associated with assembly '{0}'. Do you want to add them to your project? + Następujące rozszerzenia typu My Namespace są skojarzone z zestawem „{0}”. Czy chcesz je dodać do projektu? + Label of the add My extensions dialog. + + + Add My Namespace Extensions + Dodaj rozszerzenia typu My Namespace + Text (caption) of the add My extensions dialog. + + + &Remember my decision for '{0}'. + &Zapamiętaj mój wybór dla „{0}”. + Text for the option on add / remove My extensions dialog. + + + Removing the reference to '{0}' will make the following My Namespace extensions stop functioning. Do you want to remove them as well? + Usunięcie odwołania do elementu „{0}” spowoduje, że następujące rozszerzenia typu My Namespace przestaną działać. Czy chcesz je również usunąć? + Label of the remove My extensions dialog. + + + Remove My Namespace Extensions + Usuń rozszerzenia typu My Namespace + Text (caption) of the remove My extensions dialog. + + + No project items were added to the current project from My Namespace extension '{0}'. The extension will not be added to the project. + Nie dodano żadnych elementów z rozszerzenia typu My Namespace „{0}” do bieżącego projektu. Rozszerzenie nie zostanie dodane do projektu. + Error message when there is no project items being added to the project from the My Namespace extension template. + + + Failed to Add Project Item + Dodanie elementu projektu nie powiodło się + Text (caption)for the error message when there is no project items being added to the project from the My Namespace extension template. + + + No project items could be associated with My Namespace extension '{0}'. The extension will not be added to the project. + Nie można powiązać żadnych elementów projektu z rozszerzeniem typu My Namespace „{0}”. Rozszerzenie nie zostanie dodane do projektu. + Error message when we could not set build attributes on any of the project items in My Namespace extension template. + + + Project item '{0}' was added to the current project but could not be associated with My Namespace extension '{1}'. It will not be removed with the extension. + Dodano element „{0}” do bieżącego projektu, ale nie można go powiązać z rozszerzeniem typu My Namespace „{1}”. Element ten nie zostanie usunięty z tym rozszerzeniem. + Error message when we could not set build attributes on one of the project items in My Namespace extension template. + + + Failed to Set Extension Attributes + Ustawienie atrybutów rozszerzenia nie powiodło się + Text (caption) of the error message when we could not set build attributes on one of or any of the project items in My Namespace extension template. + + + Version '{0}' of My Namespace extension '{1}' already exists in the current project. Do you want to overwrite it with version '{2}'? + W bieżącym projekcie istnieje już wersja „{0}” rozszerzenia typu My Namespace „{1}”. Czy chcesz ją zastąpić wersją „{2}”? + Question to replace an existing My extension in the project. + + + Extension File Already Exists + Plik rozszerzenia już istnieje + Title (caption) for the question to replace an existing My extension in the project. + + + My Extensions + Moje rozszerzenia + Caption for "My Extensions" property page. + + + My Namespace extensions added: '{0}'. + Dodane rozszerzenia typu My Namespace: „{0}”. + Status bar text listing all My extension templates added. + + + My Namespace extension added: '{0}'. + Dodane rozszerzenie typu My Namespace: „{0}”. + Status bar text for each My extension template added. + + + My Namespace extensions added: '{0}'. My Namespace extensions removed: '{1}'. + Dodane rozszerzenia typu My Namespace: „{0}”. Usunięte rozszerzenia typu My Namespace: „{1}”. + Status bar text listing all My extensions added and removed to a project. This is a rare case but may happen if user adds / removes assemblies real fast. + + + Adding My Namespace extensions... + Dodawanie rozszerzeń typu My Namespace... + Status bar text when starting to add My extension templates. + + + My Namespace extensions removed: '{0}'. + Usunięte rozszerzenia typu My Namespace: „{0}”. + Status bar text listing all My extension code files removed. + + + My Namespace extension removed: '{0}'. + Usunięte rozszerzenie typu My Namespace: „{0}”. + Status bar text for each My extension code file removed. + + + Removing My Namespace extensions... + Usuwanie rozszerzeń typu My Namespace... + Status bar text when starting to remove My extensions. + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/MyExtensibilityRes.pt-BR.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/MyExtensibilityRes.pt-BR.xlf new file mode 100644 index 00000000000..71fb221cb35 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/MyExtensibilityRes.pt-BR.xlf @@ -0,0 +1,107 @@ + + + + + + The following My Namespace extensions are associated with assembly '{0}'. Do you want to add them to your project? + As extensões do Meu Namespace a seguir estão associadas ao assembly '{0}'. Deseja adicioná-las ao seu projeto? + Label of the add My extensions dialog. + + + Add My Namespace Extensions + Adicionar Extensões do Meu Namespace + Text (caption) of the add My extensions dialog. + + + &Remember my decision for '{0}'. + Lemb&rar minha decisão para '{0}'. + Text for the option on add / remove My extensions dialog. + + + Removing the reference to '{0}' will make the following My Namespace extensions stop functioning. Do you want to remove them as well? + A remoção da referência a '{0}' causará a interrupção do funcionamento das seguintes extensões do Meu Namespace. Deseja removê-las também? + Label of the remove My extensions dialog. + + + Remove My Namespace Extensions + Remover as extensões do Meu Namespace + Text (caption) of the remove My extensions dialog. + + + No project items were added to the current project from My Namespace extension '{0}'. The extension will not be added to the project. + Nenhum item de projeto foi adicionado da extensão do Meu Namespace '{0}' ao projeto atual. A extensão não será adicionada ao projeto. + Error message when there is no project items being added to the project from the My Namespace extension template. + + + Failed to Add Project Item + Falha ao Adicionar Item de Projeto + Text (caption)for the error message when there is no project items being added to the project from the My Namespace extension template. + + + No project items could be associated with My Namespace extension '{0}'. The extension will not be added to the project. + Não foi possível associar nenhum item de projeto à extensão do Meu Namespace '{0}'. A extensão não será adicionada ao projeto. + Error message when we could not set build attributes on any of the project items in My Namespace extension template. + + + Project item '{0}' was added to the current project but could not be associated with My Namespace extension '{1}'. It will not be removed with the extension. + O item de projeto '{0}' foi adicionado ao projeto atual, mas não pôde ser associado à extensão do Meu Namespace '{1}'. Ele não será removido com a extensão. + Error message when we could not set build attributes on one of the project items in My Namespace extension template. + + + Failed to Set Extension Attributes + Falha ao Definir Atributos de Extensão + Text (caption) of the error message when we could not set build attributes on one of or any of the project items in My Namespace extension template. + + + Version '{0}' of My Namespace extension '{1}' already exists in the current project. Do you want to overwrite it with version '{2}'? + A versão '{0}' da extensão do Meu Namespace '{1}' já existe no projeto atual. Deseja sobrescrevê-la com a versão '{2}'? + Question to replace an existing My extension in the project. + + + Extension File Already Exists + O Arquivo de Extensão Já Existe + Title (caption) for the question to replace an existing My extension in the project. + + + My Extensions + Minhas Extensões + Caption for "My Extensions" property page. + + + My Namespace extensions added: '{0}'. + Extensões do Meu Namespace adicionadas: '{0}'. + Status bar text listing all My extension templates added. + + + My Namespace extension added: '{0}'. + Extensão do Meu Namespace adicionada: '{0}'. + Status bar text for each My extension template added. + + + My Namespace extensions added: '{0}'. My Namespace extensions removed: '{1}'. + Extensões do Meu Namespace adicionadas: '{0}'. Extensões do Meu Namespace removidas: '{1}'. + Status bar text listing all My extensions added and removed to a project. This is a rare case but may happen if user adds / removes assemblies real fast. + + + Adding My Namespace extensions... + Adicionando extensões do Meu Namespace... + Status bar text when starting to add My extension templates. + + + My Namespace extensions removed: '{0}'. + Extensões do Meu Namespace removidas: '{0}'. + Status bar text listing all My extension code files removed. + + + My Namespace extension removed: '{0}'. + Extensão do Meu Namespace removida: '{0}'. + Status bar text for each My extension code file removed. + + + Removing My Namespace extensions... + Removendo extensões do Meu Namespace... + Status bar text when starting to remove My extensions. + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/MyExtensibilityRes.ru.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/MyExtensibilityRes.ru.xlf new file mode 100644 index 00000000000..9878db1c549 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/MyExtensibilityRes.ru.xlf @@ -0,0 +1,107 @@ + + + + + + The following My Namespace extensions are associated with assembly '{0}'. Do you want to add them to your project? + Следующие расширения пространства имен My связаны со сборкой "{0}". Добавить их в проект? + Label of the add My extensions dialog. + + + Add My Namespace Extensions + Добавить расширения пространства имен My + Text (caption) of the add My extensions dialog. + + + &Remember my decision for '{0}'. + &Запомнить мое решение для "{0}". + Text for the option on add / remove My extensions dialog. + + + Removing the reference to '{0}' will make the following My Namespace extensions stop functioning. Do you want to remove them as well? + Удаление ссылки на "{0}" приведет к тому, что следующие расширения пространства имен My прекратят функционировать. Удалить их тоже? + Label of the remove My extensions dialog. + + + Remove My Namespace Extensions + Удалить расширения пространства имен My + Text (caption) of the remove My extensions dialog. + + + No project items were added to the current project from My Namespace extension '{0}'. The extension will not be added to the project. + Из расширения пространства имен My "{0}" в текущий проект не было добавлено ни одного элемента. Расширение не будет добавлено в проект. + Error message when there is no project items being added to the project from the My Namespace extension template. + + + Failed to Add Project Item + Произошла ошибка при добавлении элемента проекта + Text (caption)for the error message when there is no project items being added to the project from the My Namespace extension template. + + + No project items could be associated with My Namespace extension '{0}'. The extension will not be added to the project. + Нет элементов проекта, которые можно связать с расширением пространства имен My "{0}". Расширение не будет добавлено в проект. + Error message when we could not set build attributes on any of the project items in My Namespace extension template. + + + Project item '{0}' was added to the current project but could not be associated with My Namespace extension '{1}'. It will not be removed with the extension. + Элемент проекта "{0}" был добавлен в текущий проект. Однако он не может быть связан с расширением пространства имен My "{1}". Он не будет удален вместе с расширением. + Error message when we could not set build attributes on one of the project items in My Namespace extension template. + + + Failed to Set Extension Attributes + Произошла ошибка при установке атрибутов расширения + Text (caption) of the error message when we could not set build attributes on one of or any of the project items in My Namespace extension template. + + + Version '{0}' of My Namespace extension '{1}' already exists in the current project. Do you want to overwrite it with version '{2}'? + Версия "{0}" расширения пространства имен My "{1}" уже существует в текущем проекте. Перезаписать ее версией "{2}"? + Question to replace an existing My extension in the project. + + + Extension File Already Exists + Файл расширения уже существует + Title (caption) for the question to replace an existing My extension in the project. + + + My Extensions + Расширения My + Caption for "My Extensions" property page. + + + My Namespace extensions added: '{0}'. + Добавлены расширения пространства имен My: "{0}". + Status bar text listing all My extension templates added. + + + My Namespace extension added: '{0}'. + Добавлено расширение пространства имен My: "{0}". + Status bar text for each My extension template added. + + + My Namespace extensions added: '{0}'. My Namespace extensions removed: '{1}'. + Добавлены расширения пространства имен My: "{0}". Удалены расширения пространства имен My: "{1}". + Status bar text listing all My extensions added and removed to a project. This is a rare case but may happen if user adds / removes assemblies real fast. + + + Adding My Namespace extensions... + Добавление расширений пространства имен My... + Status bar text when starting to add My extension templates. + + + My Namespace extensions removed: '{0}'. + Удалены расширения пространства имен My: "{0}". + Status bar text listing all My extension code files removed. + + + My Namespace extension removed: '{0}'. + Удалено расширение пространства имен My: "{0}". + Status bar text for each My extension code file removed. + + + Removing My Namespace extensions... + Удаление расширений пространства имен My... + Status bar text when starting to remove My extensions. + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/MyExtensibilityRes.tr.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/MyExtensibilityRes.tr.xlf new file mode 100644 index 00000000000..e54f9c008be --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/MyExtensibilityRes.tr.xlf @@ -0,0 +1,107 @@ + + + + + + The following My Namespace extensions are associated with assembly '{0}'. Do you want to add them to your project? + Aşağıdaki My Namespace uzantıları, '{0}' bütünleştirilmiş kodu ile ilişkili. Bunları projenize eklemek istiyor musunuz? + Label of the add My extensions dialog. + + + Add My Namespace Extensions + My Namespace Uzantılarını Ekle + Text (caption) of the add My extensions dialog. + + + &Remember my decision for '{0}'. + '{0}' için kararımı &hatırla. + Text for the option on add / remove My extensions dialog. + + + Removing the reference to '{0}' will make the following My Namespace extensions stop functioning. Do you want to remove them as well? + '{0}' başvurusunun kaldırılması, aşağıdaki My Namespace uzantılarının çalışmasını durduracak. Bunları da kaldırmak istiyor musunuz? + Label of the remove My extensions dialog. + + + Remove My Namespace Extensions + My Namespace Uzantılarını Kaldır + Text (caption) of the remove My extensions dialog. + + + No project items were added to the current project from My Namespace extension '{0}'. The extension will not be added to the project. + Geçerli projeye, '{0}' My Namespace uzantısından proje öğesi eklenmedi. Uzantı, projeye eklenmeyecek. + Error message when there is no project items being added to the project from the My Namespace extension template. + + + Failed to Add Project Item + Proje Öğesi Eklenemedi + Text (caption)for the error message when there is no project items being added to the project from the My Namespace extension template. + + + No project items could be associated with My Namespace extension '{0}'. The extension will not be added to the project. + '{0}' My Namespace uzantısıyla ilişkilendirilebilen proje öğesi yok. Uzantı, projeye eklenmeyecek. + Error message when we could not set build attributes on any of the project items in My Namespace extension template. + + + Project item '{0}' was added to the current project but could not be associated with My Namespace extension '{1}'. It will not be removed with the extension. + '{0}' proje öğesi geçerli projeye eklendi, ancak '{1}' My Namespace uzantısı ile ilişkilendirilemedi. Proje öğesi uzantıyla birlikte kaldırılmayacak. + Error message when we could not set build attributes on one of the project items in My Namespace extension template. + + + Failed to Set Extension Attributes + Uzantı Öznitelikleri Ayarlanamadı + Text (caption) of the error message when we could not set build attributes on one of or any of the project items in My Namespace extension template. + + + Version '{0}' of My Namespace extension '{1}' already exists in the current project. Do you want to overwrite it with version '{2}'? + '{1}' My Namespace uzantısının '{0}' sürümü geçerli projede zaten var. '{2}' sürümünü üzerine yazmak istiyor musunuz? + Question to replace an existing My extension in the project. + + + Extension File Already Exists + Uzantı Dosyası Zaten Var + Title (caption) for the question to replace an existing My extension in the project. + + + My Extensions + Uzantılarım + Caption for "My Extensions" property page. + + + My Namespace extensions added: '{0}'. + My Namespace uzantıları eklendi: '{0}'. + Status bar text listing all My extension templates added. + + + My Namespace extension added: '{0}'. + My Namespace uzantısı eklendi: '{0}'. + Status bar text for each My extension template added. + + + My Namespace extensions added: '{0}'. My Namespace extensions removed: '{1}'. + My Namespace uzantıları eklendi: '{0}'. My Namespace uzantıları kaldırıldı: '{1}'. + Status bar text listing all My extensions added and removed to a project. This is a rare case but may happen if user adds / removes assemblies real fast. + + + Adding My Namespace extensions... + My Namespace uzantıları ekleniyor... + Status bar text when starting to add My extension templates. + + + My Namespace extensions removed: '{0}'. + My Namespace uzantıları kaldırıldı: '{0}'. + Status bar text listing all My extension code files removed. + + + My Namespace extension removed: '{0}'. + My Namespace uzantısı kaldırıldı: '{0}'. + Status bar text for each My extension code file removed. + + + Removing My Namespace extensions... + My Namespace uzantıları kaldırılıyor... + Status bar text when starting to remove My extensions. + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/MyExtensibilityRes.zh-Hans.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/MyExtensibilityRes.zh-Hans.xlf new file mode 100644 index 00000000000..e79e6368f9e --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/MyExtensibilityRes.zh-Hans.xlf @@ -0,0 +1,107 @@ + + + + + + The following My Namespace extensions are associated with assembly '{0}'. Do you want to add them to your project? + 下面的 My 命名空间扩展与程序集“{0}”关联。是否将它们添加到项目中? + Label of the add My extensions dialog. + + + Add My Namespace Extensions + 添加 My 命名空间扩展 + Text (caption) of the add My extensions dialog. + + + &Remember my decision for '{0}'. + 记住我对“{0}”的决定(&R)。 + Text for the option on add / remove My extensions dialog. + + + Removing the reference to '{0}' will make the following My Namespace extensions stop functioning. Do you want to remove them as well? + 删除对“{0}”的引用会导致以下 My 命名空间扩展停止工作。是否仍要删除它们? + Label of the remove My extensions dialog. + + + Remove My Namespace Extensions + 删除 My 命名空间扩展 + Text (caption) of the remove My extensions dialog. + + + No project items were added to the current project from My Namespace extension '{0}'. The extension will not be added to the project. + 未从 My 命名空间扩展“{0}”向当前项目添加任何项目项。该扩展不会添加到项目中。 + Error message when there is no project items being added to the project from the My Namespace extension template. + + + Failed to Add Project Item + 未能添加项目项 + Text (caption)for the error message when there is no project items being added to the project from the My Namespace extension template. + + + No project items could be associated with My Namespace extension '{0}'. The extension will not be added to the project. + 没有任何项目项能够与 My 命名空间扩展“{0}”关联。该扩展不会添加到项目中。 + Error message when we could not set build attributes on any of the project items in My Namespace extension template. + + + Project item '{0}' was added to the current project but could not be associated with My Namespace extension '{1}'. It will not be removed with the extension. + 项目项“{0}”已添加到当前项目,但未能与 My 命名空间扩展“{1}”关联。它不会与此扩展一起被删除。 + Error message when we could not set build attributes on one of the project items in My Namespace extension template. + + + Failed to Set Extension Attributes + 未能设置扩展特性 + Text (caption) of the error message when we could not set build attributes on one of or any of the project items in My Namespace extension template. + + + Version '{0}' of My Namespace extension '{1}' already exists in the current project. Do you want to overwrite it with version '{2}'? + 当前项目中已经存在 My 命名空间扩展“{1}”的版本“{0}”。是否用版本“{2}”覆盖它? + Question to replace an existing My extension in the project. + + + Extension File Already Exists + 扩展文件已存在 + Title (caption) for the question to replace an existing My extension in the project. + + + My Extensions + 我的扩展 + Caption for "My Extensions" property page. + + + My Namespace extensions added: '{0}'. + 已添加 My 命名空间扩展“{0}”。 + Status bar text listing all My extension templates added. + + + My Namespace extension added: '{0}'. + 已添加 My 命名空间扩展“{0}”。 + Status bar text for each My extension template added. + + + My Namespace extensions added: '{0}'. My Namespace extensions removed: '{1}'. + 已添加 My 命名空间扩展“{0}”。已删除 My 命名空间扩展“{1}”。 + Status bar text listing all My extensions added and removed to a project. This is a rare case but may happen if user adds / removes assemblies real fast. + + + Adding My Namespace extensions... + 正在添加 My 命名空间扩展... + Status bar text when starting to add My extension templates. + + + My Namespace extensions removed: '{0}'. + 已删除 My 命名空间扩展“{0}”。 + Status bar text listing all My extension code files removed. + + + My Namespace extension removed: '{0}'. + 已删除 My 命名空间扩展“{0}”。 + Status bar text for each My extension code file removed. + + + Removing My Namespace extensions... + 正在删除 My 命名空间扩展... + Status bar text when starting to remove My extensions. + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/MyExtensibilityRes.zh-Hant.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/MyExtensibilityRes.zh-Hant.xlf new file mode 100644 index 00000000000..7131d9e48d8 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/MyExtensibilityRes.zh-Hant.xlf @@ -0,0 +1,107 @@ + + + + + + The following My Namespace extensions are associated with assembly '{0}'. Do you want to add them to your project? + 下列 My 命名空間延伸模組已與組件 '{0}' 建立關聯。要將其新增到您的專案中嗎? + Label of the add My extensions dialog. + + + Add My Namespace Extensions + 新增 My 命名空間延伸模組 + Text (caption) of the add My extensions dialog. + + + &Remember my decision for '{0}'. + 記住對 '{0}' 的決定(&R) + Text for the option on add / remove My extensions dialog. + + + Removing the reference to '{0}' will make the following My Namespace extensions stop functioning. Do you want to remove them as well? + 移除 '{0}' 的參考會使下列 My 命名空間延伸模組停止運作。要一併將其移除嗎? + Label of the remove My extensions dialog. + + + Remove My Namespace Extensions + 移除 My 命名空間延伸模組 + Text (caption) of the remove My extensions dialog. + + + No project items were added to the current project from My Namespace extension '{0}'. The extension will not be added to the project. + 未從 My 命名空間延伸模組 '{0}' 將任何專案項目新增到目前的專案。此延伸模組將不會新增到專案。 + Error message when there is no project items being added to the project from the My Namespace extension template. + + + Failed to Add Project Item + 無法加入專案項目 + Text (caption)for the error message when there is no project items being added to the project from the My Namespace extension template. + + + No project items could be associated with My Namespace extension '{0}'. The extension will not be added to the project. + 無法建立任何專案項目與 My 命名空間延伸模組 '{0}' 的關聯。此延伸模組將不會新增到專案。 + Error message when we could not set build attributes on any of the project items in My Namespace extension template. + + + Project item '{0}' was added to the current project but could not be associated with My Namespace extension '{1}'. It will not be removed with the extension. + 專案項目 '{0}' 已新增到目前的專案,但是無法與 My 命名空間延伸模組 '{1}' 建立關聯。將不會隨延伸模組移除。 + Error message when we could not set build attributes on one of the project items in My Namespace extension template. + + + Failed to Set Extension Attributes + 無法設定擴充屬性 + Text (caption) of the error message when we could not set build attributes on one of or any of the project items in My Namespace extension template. + + + Version '{0}' of My Namespace extension '{1}' already exists in the current project. Do you want to overwrite it with version '{2}'? + 目前專案中已經有 My 命名空間延伸模組 '{1}' 的版本 '{0}'。要以版本 '{2}' 加以覆寫嗎? + Question to replace an existing My extension in the project. + + + Extension File Already Exists + 延伸模組檔案已經存在 + Title (caption) for the question to replace an existing My extension in the project. + + + My Extensions + My 延伸模組 + Caption for "My Extensions" property page. + + + My Namespace extensions added: '{0}'. + 已新增 My 命名空間延伸模組: '{0}'。 + Status bar text listing all My extension templates added. + + + My Namespace extension added: '{0}'. + 已新增 My 命名空間延伸模組: '{0}'。 + Status bar text for each My extension template added. + + + My Namespace extensions added: '{0}'. My Namespace extensions removed: '{1}'. + 已新增 My 命名空間延伸模組: '{0}'。已移除 My 命名空間延伸模組: '{1}'。 + Status bar text listing all My extensions added and removed to a project. This is a rare case but may happen if user adds / removes assemblies real fast. + + + Adding My Namespace extensions... + 正在新增 My 命名空間延伸模組... + Status bar text when starting to add My extension templates. + + + My Namespace extensions removed: '{0}'. + 已移除 My 命名空間延伸模組: '{0}'。 + Status bar text listing all My extension code files removed. + + + My Namespace extension removed: '{0}'. + 已移除 My 命名空間延伸模組: '{0}'。 + Status bar text for each My extension code file removed. + + + Removing My Namespace extensions... + 正在移除 My 命名空間延伸模組... + Status bar text when starting to remove My extensions. + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/WCF.cs.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/WCF.cs.xlf new file mode 100644 index 00000000000..3c501581e95 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/WCF.cs.xlf @@ -0,0 +1,312 @@ + + + + + + Add Service Reference + Přidat odkaz na službu + Title for the "Add Service Reference" dialog + + + Unable to find a code generator (CodeDomProvider). + Nepovedlo se najít generátor kódu (CodeDomProvider). + + + + Configuration could not be saved. Make sure the configuration file exists and can be edited. + Konfigurace se nedá uložit. Ujistěte se prosím, že konfigurační soubor existuje a že se dá upravovat. + + + + The current project does not support configuration files. + Aktuální projekt konfigurační soubory nepodporuje. + + + + No services found in the solution. + V řešení se nenašly žádné služby. + + + + There was an error downloading metadata from the address. Please verify that you have entered a valid address. + Při stahování metadat z dané adresy došlo k chybě. Zkontrolujte prosím, jestli jste zadali platnou adresu. + + + + {0} service(s) found at address '{1}'. + Na adrese {1} se našly služby ({0}). + {0} = count, {1} = URL where the services were found + + + {0} service(s) found in the solution. + V řešení se našly služby ({0}). + {0} = # of services + + + It is only possible to access the default (ITEMID_ROOT) configuration file. + Je možné přistupovat jenom k výchozímu (ITEMID_ROOT) konfiguračnímu souboru. + + + + '{0}' is not a valid namespace for the service reference. + {0} není platným oborem názvů pro odkaz na službu. + + + + Cannot create a service reference with namespace '{0}' because the name is already in use by an existing service reference, folder or file. + Nedá se vytvořit odkaz na službu s oborem názvů {0}, protože tento název už používá existující odkaz na službu, složka nebo soubor. + + + + Unable to add a new reference. One or more references already exists or the 'Metadata' section is not empty in the .svcmap file. Edit the .svcmap file and clear all the entries from the 'Metadata' section. + Nedá se přidat nový odkaz. Jeden nebo víc odkazů už existuje, nebo sekce Metadata v souboru .svcmap není prázdná. Upravte prosím soubor .svcmap a smažte všechny položky v sekci Metadata. + + + + A namespace needs to be specified for this service reference. + Pro tento odkaz na službu se musí zadat obor názvů. + + + + {0}' is not a valid name for a service reference. + {0} není platným názvem pro odkaz na službu. + + + + Empty string is not a valid name for a reference group. + Prázdný řetězec není platným názvem referenční skupiny. + + + + Cannot create a reference group named '{0}' because the name is already being used by an existing reference group, folder or file. + Nepovedlo se vytvořit referenční skupinu {0}, protože tento název už používá existující referenční skupina, složka nebo soubor. + + + + Cannot create a reference group with namespace or name with leading or trailing whitespace characters. + Nedá se vytvořit referenční skupina s oborem názvů nebo názvem začínajícím nebo končícím prázdnými znaky. + + + + The .svcmap file cannot be found. It may have been moved or deleted. To generate a new .svcmap file, delete the service reference and add it again. + Soubor .svcmap se nepovedlo najít. Možná je přesunutý nebo smazaný. Abyste mohli vygenerovat nový soubor .svcmap, smažte odkaz na službu a potom ho znovu přidejte. + + + + The current project does not support service references. To enable Windows Communication Foundation support, change the target version of the Microsoft .NET Framework. + Aktuální projekt nepodporuje odkazy na služby. Aby se dala zapnout podpora Windows Communication Foundation, změňte cílovou verzi rozhraní Microsoft .NET Framework. + + + + The configuration for the service reference could not be deleted due to the following issue: {0} + Konfiguraci odkazu na službu nejde z následujícího důvodu smazat: {0} + + + + The configuration for the service reference could not be updated due to the following issue: {0} + Konfiguraci odkazu na službu nejde z následujícího důvodu aktualizovat: {0} + + + + The configuration for the service reference could not be added due to the following issue: {0} + Konfiguraci odkazu na službu nejde z následujícího důvodu přidat: {0} + + + + Please enter the address for a service. + Zadejte prosím adresu služby. + + + + An error occurred while attempting to find services at '{0}'. + Při pokusu o nalezení služeb na adrese {0} došlo k chybě. + {0} = a URL path + + + An error occurred while searching for services in the solution. + Při hledání služeb v řešení došlo k chybě. + + + + An error occurred while attempting to start services at '{0}'". + Při pokusu o spuštění služeb na adrese {0} došlo k chybě. + {0} = a URL path + + + Please wait for service information to be downloaded or click Stop. + Počkejte, dokud se nestáhnou informace o službě, nebo klikněte na Zastavit. + + + + Cannot get referenced assemblies from the project system. + Ze systému projektů se nedala získat odkazovaná sestavení. + + + + The service reference is invalid, because the .svcmap file ('{0}') cannot be found. It may have been moved, deleted or excluded from the project. To generate a new .svcmap file, delete the service reference and add it again. + Odkaz na službu je neplatný, protože se nepovedlo najít soubor .svcmap ({0}). Možná je přesunutý, smazaný nebo vyloučený z projektu. Aby se dal vygenerovat nový soubor .svcmap, smažte odkaz na službu a potom ho znovu přidejte. + + + + The service reference is invalid. The .svcmap file ('{0}') cannot be loaded. It may be corrupted or in a bad format: {1} + Odkaz na službu je neplatný. Soubor .svcmap ({0}) se nepovedlo načíst. Může být poškozený nebo ve špatném formátu: {1} + + + + (Details) + (Podrobnosti) + This is the text for a link to additional error information. + + + Select a service contract to view its operations. + Pro zobrazení operací služby vyberte její kontrakt. + This is the message displayed when user selects non-cotract nodes. + + + Service Reference Settings + Nastavení odkazu na službu + + + + ( Custom ) + ( Vlastní ) + + + + The assembly '{0}' could not be found. + Sestavení {0} se nedá najít. + + + + Address should be a valid non-empty URL. + Adresa by měla být platná, neprázdná adresa URL. + Error message to display when user enters empty URL in the address change text box + + + {0} service(s) found. + Nalezené služby ({0}) + {0} = count + + + The operation was cancelled. + Operace se zrušila. + + + + Updating Service Reference '{0}' + Aktualizuje se odkaz na službu {0}. + + + + Service reference update complete. + Aktualizace referencí na službu je dokončená. + + + + Generating service reference client code... + Generuje se klientský kód odkazu na službu... + + + + Generation of service reference client code complete. + Generování klientského kódu odkazu na službu se dokončilo. + + + + Updating service reference '{0}'... + Aktualizuje se odkaz na službu {0}... + + + + Updating configuration... + Aktualizuje se konfigurace... + + + + Configuration update complete. + Aktualizace konfigurace se dokončila. + + + + Service reference update was cancelled. + Aktualizace referencí na službu se zrušila. + + + + Service reference update failed. + Aktualizace referencí na službu selhala. + + + + Add service reference complete. + Přidání odkazu na službu se dokončilo. + + + + Add service reference failed. + Přidání odkazu na službu selhalo. + + + + Creating new service reference to '{0}'... + Vytváří se nový odkaz na službu do {0}... + {0}=URL + + + No assembly is selected. + Nevybrali jste žádné sestavení. + + + + The requested operation is not valid while an asynchronous operation is in progress. + Dokud probíhá asynchronní operace, požadovaná operace není platná. + + + + Multiple addresses (editable in .svcmap file) + Víc adres (upravitelné v souboru .svcmap) + + + + {0} contract(s) found at address '{1}'. + Na adrese {1} se našly kontrakty ({0}). + {0} = count, {1} = URL where the contracts were found + + + Unable to create temporary configuration file for downloading service information. + Nedá se vytvořit dočasný konfigurační soubor pro stažení informací o službě. + + + + The file is already opened in an incompatible editor. + Soubor je už otevřený v nekompatibilním editoru. + + + + Downloading service information... + Stahují se informace o službě... + + + + The current version of the software does not support adding a service reference to an existing service reference group. + Aktuální verze softwaru nepodporuje přidávání odkazů na služby do existující skupiny odkazů na služby. + + + + If the service is defined in the current solution, try building the solution and adding the service reference again. + Pokud je odkaz na službu v aktuálním řešení definovaný, pokuste se prosím řešení sestavit a odkaz na službu přidat znovu. + + + + Mismatching Begin/EndBatch calls. You have called EndBatch more times than BeginBatch. + Volání Begin/EndBatch se neshodují. EndBatch jste zavolali víckrát než BeginBatch. + + + + Failed to generate code for the service reference '{0}'. Please check other error and warning messages for details. + Generování kódu pro odkaz na službu {0} selhalo. Podrobnosti najdete v ostatních chybových zprávách a upozorněních. + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/WCF.de.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/WCF.de.xlf new file mode 100644 index 00000000000..584143c8116 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/WCF.de.xlf @@ -0,0 +1,312 @@ + + + + + + Add Service Reference + Dienstverweis hinzufügen + Title for the "Add Service Reference" dialog + + + Unable to find a code generator (CodeDomProvider). + Code-Generator (CodeDomProvider) kann nicht gefunden werden. + + + + Configuration could not be saved. Make sure the configuration file exists and can be edited. + Die Konfiguration konnte nicht gespeichert werden. Stellen Sie sicher, dass die Konfigurationsdatei vorhanden ist und bearbeitet werden kann. + + + + The current project does not support configuration files. + Das aktuelle Projekt unterstützt keine Konfigurationsdateien. + + + + No services found in the solution. + In der Projektmappe wurden keine Dienste gefunden. + + + + There was an error downloading metadata from the address. Please verify that you have entered a valid address. + Fehler beim Herunterladen von Metadaten von der Adresse. Stellen Sie sicher, dass die eingegebene Adresse gültig ist. + + + + {0} service(s) found at address '{1}'. + {0} Dienst(e) gefunden bei Adresse "{1}". + {0} = count, {1} = URL where the services were found + + + {0} service(s) found in the solution. + {0} Dienst(e) in der Projektmappe gefunden. + {0} = # of services + + + It is only possible to access the default (ITEMID_ROOT) configuration file. + Es ist nicht möglich, auf die Standardkonfigurationsdatei (ITEMID_ROOT) zuzugreifen. + + + + '{0}' is not a valid namespace for the service reference. + {0} ist kein gültiger Namespace für den Dienstverweis. + + + + Cannot create a service reference with namespace '{0}' because the name is already in use by an existing service reference, folder or file. + Ein Dienstverweis mit dem Namespace "{0}" kann nicht erstellt werden, weil der Name bereits von einem vorhandenen Dienstverweis bzw. einem Ordner oder einer Datei verwendet wird. + + + + Unable to add a new reference. One or more references already exists or the 'Metadata' section is not empty in the .svcmap file. Edit the .svcmap file and clear all the entries from the 'Metadata' section. + Neuer Verweis kann nicht hinzugefügt werden. Mindestens ein Verweis ist bereits vorhanden, oder der Abschnitt "Metadata" in der SVCMAP-Datei ist nicht leer. Bearbeiten Sie die SVCMAP-Datei, und löschen Sie alle Einträge im Abschnitt "Metadata". + + + + A namespace needs to be specified for this service reference. + Ein Namespace muss für diesen Dienstverweis angegeben werden. + + + + {0}' is not a valid name for a service reference. + {0} ist kein gültiger Name für einen Dienstverweis. + + + + Empty string is not a valid name for a reference group. + Eine leere Zeichenfolge ist kein gültiger Name für eine Verweisgruppe. + + + + Cannot create a reference group named '{0}' because the name is already being used by an existing reference group, folder or file. + Die Verweisgruppe mit dem Namen "{0}" kann nicht erstellt werden, weil der Name bereits von einer vorhandenen Verweisgruppe bzw. einem Ordner oder einer Datei verwendet wird. + + + + Cannot create a reference group with namespace or name with leading or trailing whitespace characters. + Eine Verweisgruppe, deren Namespace oder Name führende oder nachstehende Leerzeichen enthält, kann nicht erstellt werden. + + + + The .svcmap file cannot be found. It may have been moved or deleted. To generate a new .svcmap file, delete the service reference and add it again. + Die SVCMAP-Datei wurde nicht gefunden. Möglicherweise wurde sie verschoben oder gelöscht. Wenn Sie eine neue SVCMAP-Datei generieren möchten, löschen Sie den Dienstverweis und fügen ihn erneut hinzu. + + + + The current project does not support service references. To enable Windows Communication Foundation support, change the target version of the Microsoft .NET Framework. + Das aktuelle Projekt unterstützt keine Dienstverweise. Um die Unterstützung der Windows Communication Foundation zu aktivieren, ändern Sie die Zielversion von Microsoft .NET Framework. + + + + The configuration for the service reference could not be deleted due to the following issue: {0} + Die Konfiguration für den Dienstverweis konnte aufgrund des folgenden Problems nicht gelöscht werden: {0} + + + + The configuration for the service reference could not be updated due to the following issue: {0} + Die Konfiguration für den Dienstverweis konnte aufgrund des folgenden Problems nicht aktualisiert werden: {0} + + + + The configuration for the service reference could not be added due to the following issue: {0} + Die Konfiguration für den Dienstverweis konnte aufgrund des folgenden Problems nicht hinzugefügt werden: {0} + + + + Please enter the address for a service. + Geben Sie die Adresse für einen Dienst ein. + + + + An error occurred while attempting to find services at '{0}'. + Fehler beim Versuch, Dienste bei "{0}" zu suchen. + {0} = a URL path + + + An error occurred while searching for services in the solution. + Fehler beim Suchen nach Diensten in der Projektmappe. + + + + An error occurred while attempting to start services at '{0}'". + Fehler beim Versuch, Dienste bei "{0}" zu starten. + {0} = a URL path + + + Please wait for service information to be downloaded or click Stop. + Warten Sie, bis die Dienstinformationen heruntergeladen wurden, oder klicken Sie auf "Beenden". + + + + Cannot get referenced assemblies from the project system. + Assemblys, auf die verwiesen wird, können nicht aus dem Projektsystem abgerufen werden. + + + + The service reference is invalid, because the .svcmap file ('{0}') cannot be found. It may have been moved, deleted or excluded from the project. To generate a new .svcmap file, delete the service reference and add it again. + Der Dienstverweis ist ungültig, da die SVCMAP-Datei ("{0}") nicht gefunden wurde. Möglicherweise wurde sie verschoben, gelöscht oder aus dem Projekt ausgeschlossen. Wenn Sie eine neue SVCMAP-Datei generieren möchten, löschen Sie den Dienstverweis und fügen ihn erneut hinzu. + + + + The service reference is invalid. The .svcmap file ('{0}') cannot be loaded. It may be corrupted or in a bad format: {1} + Der Dienstverweis ist ungültig. Die SVCMAP-Datei ("{0}") kann nicht geladen werden. Möglicherweise ist sie beschädigt oder hat ein unzulässiges Format: {1} + + + + (Details) + (Details) + This is the text for a link to additional error information. + + + Select a service contract to view its operations. + Wählen Sie einen Dienstvertrag aus, um seine Abläufe anzuzeigen. + This is the message displayed when user selects non-cotract nodes. + + + Service Reference Settings + Dienstverweiseinstellungen + + + + ( Custom ) + (Benutzerdefiniert) + + + + The assembly '{0}' could not be found. + Die Assembly "{0}" wurde nicht gefunden. + + + + Address should be a valid non-empty URL. + Die Adresse muss eine gültige, nicht leere URL sein. + Error message to display when user enters empty URL in the address change text box + + + {0} service(s) found. + {0} Dienst(e) gefunden. + {0} = count + + + The operation was cancelled. + Der Vorgang wurde abgebrochen. + + + + Updating Service Reference '{0}' + Dienstverweis "{0}" wird aktualisiert + + + + Service reference update complete. + Die Aktualisierung des Dienstverweises ist abgeschlossen. + + + + Generating service reference client code... + Dienstverweis-Clientcode wird generiert... + + + + Generation of service reference client code complete. + Das Generieren des Dienstverweis-Clientcodes ist abgeschlossen. + + + + Updating service reference '{0}'... + Dienstverweis "{0}" wird aktualisiert... + + + + Updating configuration... + Konfiguration wird aktualisiert... + + + + Configuration update complete. + Die Konfigurationsaktualisierung ist abgeschlossen. + + + + Service reference update was cancelled. + Die Aktualisierung des Dienstverweises wurde abgebrochen. + + + + Service reference update failed. + Fehler beim Aktualisieren des Dienstverweises. + + + + Add service reference complete. + Das Hinzufügen des Dienstverweises ist abgeschlossen. + + + + Add service reference failed. + Fehler beim Hinzufügen des Dienstverweises. + + + + Creating new service reference to '{0}'... + Neuer Dienstverweis auf "{0}" wird erstellt... + {0}=URL + + + No assembly is selected. + Es wurde keine Assembly ausgewählt. + + + + The requested operation is not valid while an asynchronous operation is in progress. + Der angeforderte Vorgang ist unzulässig, während ein asynchroner Vorgang läuft. + + + + Multiple addresses (editable in .svcmap file) + Mehrere Adressen (in SVCMAP-Datei bearbeitbar) + + + + {0} contract(s) found at address '{1}'. + {0} Vertrag/Verträge gefunden bei Adresse "{1}". + {0} = count, {1} = URL where the contracts were found + + + Unable to create temporary configuration file for downloading service information. + Temporäre Konfigurationsdatei für das Herunterladen von Dienstinformationen kann nicht erstellt werden. + + + + The file is already opened in an incompatible editor. + Die Datei ist bereits in einem inkompatiblen Editor geöffnet. + + + + Downloading service information... + Dienstinformationen werden heruntergeladen... + + + + The current version of the software does not support adding a service reference to an existing service reference group. + Die aktuelle Version der Software unterstützt das Hinzufügen von Dienstverweisen zu einer vorhandenen Dienstverweisgruppe nicht. + + + + If the service is defined in the current solution, try building the solution and adding the service reference again. + Wenn der Dienst in der aktuellen Projektmappe definiert ist, sollten Sie die Projektmappe erstellen und den Dienstverweis erneut hinzufügen. + + + + Mismatching Begin/EndBatch calls. You have called EndBatch more times than BeginBatch. + Begin/EndBatch-Aufrufe stimmen nicht überein. "EndBatch" wurde häufiger aufgerufen als "BeginBatch". + + + + Failed to generate code for the service reference '{0}'. Please check other error and warning messages for details. + Fehler beim Generieren von Code für den Dienstverweis "{0}". Weitere Details entnehmen Sie den anderen Fehler- und Warnmeldungen. + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/WCF.en.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/WCF.en.xlf new file mode 100644 index 00000000000..be23fe5ce07 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/WCF.en.xlf @@ -0,0 +1,312 @@ + + + + + + Add Service Reference + Add Service Reference + Title for the "Add Service Reference" dialog + + + Unable to find a code generator (CodeDomProvider). + Unable to find a code generator (CodeDomProvider). + + + + Configuration could not be saved. Make sure the configuration file exists and can be edited. + Configuration could not be saved. Make sure the configuration file exists and can be edited. + + + + The current project does not support configuration files. + The current project does not support configuration files. + + + + No services found in the solution. + No services found in the solution. + + + + There was an error downloading metadata from the address. Please verify that you have entered a valid address. + There was an error downloading metadata from the address. Please verify that you have entered a valid address. + + + + {0} service(s) found at address '{1}'. + {0} service(s) found at address '{1}'. + {0} = count, {1} = URL where the services were found + + + {0} service(s) found in the solution. + {0} service(s) found in the solution. + {0} = # of services + + + It is only possible to access the default (ITEMID_ROOT) configuration file. + It is only possible to access the default (ITEMID_ROOT) configuration file. + + + + '{0}' is not a valid namespace for the service reference. + '{0}' is not a valid namespace for the service reference. + + + + Cannot create a service reference with namespace '{0}' because the name is already in use by an existing service reference, folder or file. + Cannot create a service reference with namespace '{0}' because the name is already in use by an existing service reference, folder or file. + + + + Unable to add a new reference. One or more references already exists or the 'Metadata' section is not empty in the .svcmap file. Edit the .svcmap file and clear all the entries from the 'Metadata' section. + Unable to add a new reference. One or more references already exists or the 'Metadata' section is not empty in the .svcmap file. Edit the .svcmap file and clear all the entries from the 'Metadata' section. + + + + A namespace needs to be specified for this service reference. + A namespace needs to be specified for this service reference. + + + + {0}' is not a valid name for a service reference. + {0}' is not a valid name for a service reference. + + + + Empty string is not a valid name for a reference group. + Empty string is not a valid name for a reference group. + + + + Cannot create a reference group named '{0}' because the name is already being used by an existing reference group, folder or file. + Cannot create a reference group named '{0}' because the name is already being used by an existing reference group, folder or file. + + + + Cannot create a reference group with namespace or name with leading or trailing whitespace characters. + Cannot create a reference group with namespace or name with leading or trailing whitespace characters. + + + + The .svcmap file cannot be found. It may have been moved or deleted. To generate a new .svcmap file, delete the service reference and add it again. + The .svcmap file cannot be found. It may have been moved or deleted. To generate a new .svcmap file, delete the service reference and add it again. + + + + The current project does not support service references. To enable Windows Communication Foundation support, change the target version of the Microsoft .NET Framework. + The current project does not support service references. To enable Windows Communication Foundation support, change the target version of the Microsoft .NET Framework. + + + + The configuration for the service reference could not be deleted due to the following issue: {0} + The configuration for the service reference could not be deleted due to the following issue: {0} + + + + The configuration for the service reference could not be updated due to the following issue: {0} + The configuration for the service reference could not be updated due to the following issue: {0} + + + + The configuration for the service reference could not be added due to the following issue: {0} + The configuration for the service reference could not be added due to the following issue: {0} + + + + Please enter the address for a service. + Please enter the address for a service. + + + + An error occurred while attempting to find services at '{0}'. + An error occurred while attempting to find services at '{0}'. + {0} = a URL path + + + An error occurred while searching for services in the solution. + An error occurred while searching for services in the solution. + + + + An error occurred while attempting to start services at '{0}'". + An error occurred while attempting to start services at '{0}'". + {0} = a URL path + + + Please wait for service information to be downloaded or click Stop. + Please wait for service information to be downloaded or click Stop. + + + + Cannot get referenced assemblies from the project system. + Cannot get referenced assemblies from the project system. + + + + The service reference is invalid, because the .svcmap file ('{0}') cannot be found. It may have been moved, deleted or excluded from the project. To generate a new .svcmap file, delete the service reference and add it again. + The service reference is invalid, because the .svcmap file ('{0}') cannot be found. It may have been moved, deleted or excluded from the project. To generate a new .svcmap file, delete the service reference and add it again. + + + + The service reference is invalid. The .svcmap file ('{0}') cannot be loaded. It may be corrupted or in a bad format: {1} + The service reference is invalid. The .svcmap file ('{0}') cannot be loaded. It may be corrupted or in a bad format: {1} + + + + (Details) + (Details) + This is the text for a link to additional error information. + + + Select a service contract to view its operations. + Select a service contract to view its operations. + This is the message displayed when user selects non-cotract nodes. + + + Service Reference Settings + Service Reference Settings + + + + ( Custom ) + ( Custom ) + + + + The assembly '{0}' could not be found. + The assembly '{0}' could not be found. + + + + Address should be a valid non-empty URL. + Address should be a valid non-empty URL. + Error message to display when user enters empty URL in the address change text box + + + {0} service(s) found. + {0} service(s) found. + {0} = count + + + The operation was cancelled. + The operation was cancelled. + + + + Updating Service Reference '{0}' + Updating Service Reference '{0}' + + + + Service reference update complete. + Service reference update complete. + + + + Generating service reference client code... + Generating service reference client code... + + + + Generation of service reference client code complete. + Generation of service reference client code complete. + + + + Updating service reference '{0}'... + Updating service reference '{0}'... + + + + Updating configuration... + Updating configuration... + + + + Configuration update complete. + Configuration update complete. + + + + Service reference update was cancelled. + Service reference update was cancelled. + + + + Service reference update failed. + Service reference update failed. + + + + Add service reference complete. + Add service reference complete. + + + + Add service reference failed. + Add service reference failed. + + + + Creating new service reference to '{0}'... + Creating new service reference to '{0}'... + {0}=URL + + + No assembly is selected. + No assembly is selected. + + + + The requested operation is not valid while an asynchronous operation is in progress. + The requested operation is not valid while an asynchronous operation is in progress. + + + + Multiple addresses (editable in .svcmap file) + Multiple addresses (editable in .svcmap file) + + + + {0} contract(s) found at address '{1}'. + {0} contract(s) found at address '{1}'. + {0} = count, {1} = URL where the contracts were found + + + Unable to create temporary configuration file for downloading service information. + Unable to create temporary configuration file for downloading service information. + + + + The file is already opened in an incompatible editor. + The file is already opened in an incompatible editor. + + + + Downloading service information... + Downloading service information... + + + + The current version of the software does not support adding a service reference to an existing service reference group. + The current version of the software does not support adding a service reference to an existing service reference group. + + + + If the service is defined in the current solution, try building the solution and adding the service reference again. + If the service is defined in the current solution, try building the solution and adding the service reference again. + + + + Mismatching Begin/EndBatch calls. You have called EndBatch more times than BeginBatch. + Mismatching Begin/EndBatch calls. You have called EndBatch more times than BeginBatch. + + + + Failed to generate code for the service reference '{0}'. Please check other error and warning messages for details. + Failed to generate code for the service reference '{0}'. Please check other error and warning messages for details. + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/WCF.es.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/WCF.es.xlf new file mode 100644 index 00000000000..f6125e7269a --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/WCF.es.xlf @@ -0,0 +1,312 @@ + + + + + + Add Service Reference + Agregar referencia de servicio + Title for the "Add Service Reference" dialog + + + Unable to find a code generator (CodeDomProvider). + No se encontró un generador de código (CodeDomProvider). + + + + Configuration could not be saved. Make sure the configuration file exists and can be edited. + No se pudo guardar la configuración. Asegúrese de que el archivo de configuración existe y se puede modificar. + + + + The current project does not support configuration files. + El proyecto actual no admite archivos de configuración. + + + + No services found in the solution. + No se encontraron servicios en la solución. + + + + There was an error downloading metadata from the address. Please verify that you have entered a valid address. + Hubo un error al descargar los metadatos desde esta dirección. Compruebe que ha especificado una dirección válida. + + + + {0} service(s) found at address '{1}'. + {0} servicios encontrados en la dirección '{1}'. + {0} = count, {1} = URL where the services were found + + + {0} service(s) found in the solution. + {0} servicios encontrados en la solución. + {0} = # of services + + + It is only possible to access the default (ITEMID_ROOT) configuration file. + Solo se puede obtener acceso al archivo de configuración (ITEMID_ROOT) predeterminado. + + + + '{0}' is not a valid namespace for the service reference. + '{0}' no es un espacio de nombres válido para la referencia de servicio. + + + + Cannot create a service reference with namespace '{0}' because the name is already in use by an existing service reference, folder or file. + No se puede crear una referencia de servicio con el espacio de nombres '{0}' porque el nombre ya se está usando en una referencia de servicio, carpeta o archivo existente. + + + + Unable to add a new reference. One or more references already exists or the 'Metadata' section is not empty in the .svcmap file. Edit the .svcmap file and clear all the entries from the 'Metadata' section. + No se puede agregar una nueva referencia. Ya existen una o varias referencias, o la sección 'Metadatos' no está vacía en el archivo .svcmap. Edite el archivo .svcmap y borre todas las entradas de la sección 'Metadatos'. + + + + A namespace needs to be specified for this service reference. + Debe especificarse un espacio de nombres para esta referencia de servicio. + + + + {0}' is not a valid name for a service reference. + {0}' no es un nombre válido para una referencia de servicio. + + + + Empty string is not a valid name for a reference group. + Una cadena vacía no es un nombre válido para un grupo de referencias. + + + + Cannot create a reference group named '{0}' because the name is already being used by an existing reference group, folder or file. + No se puede crear un grupo de referencias con el nombre '{0}' porque este nombre ya se está usando en un grupo de referencias, carpeta o archivo existente. + + + + Cannot create a reference group with namespace or name with leading or trailing whitespace characters. + No se puede crear un grupo de referencias con un espacio de nombres o un nombre que tenga caracteres de espacio iniciales o finales. + + + + The .svcmap file cannot be found. It may have been moved or deleted. To generate a new .svcmap file, delete the service reference and add it again. + No se encuentra el archivo .svcmap. Es posible que se haya movido o eliminado. Para generar un nuevo archivo .svcmap, elimine la referencia de servicio y agréguela de nuevo. + + + + The current project does not support service references. To enable Windows Communication Foundation support, change the target version of the Microsoft .NET Framework. + El proyecto actual no admite referencias de servicio. Para permitir la compatibilidad con Windows Communication Foundation, cambie la versión de destino de Microsoft .NET Framework. + + + + The configuration for the service reference could not be deleted due to the following issue: {0} + No se pudo eliminar la configuración de la referencia del servicio debido al problema siguiente: {0} + + + + The configuration for the service reference could not be updated due to the following issue: {0} + No se pudo actualizar la configuración de la referencia de servicio debido al problema siguiente: {0} + + + + The configuration for the service reference could not be added due to the following issue: {0} + No se pudo agregar la configuración de la referencia de servicio debido al problema siguiente: {0} + + + + Please enter the address for a service. + Escriba la dirección de un servicio. + + + + An error occurred while attempting to find services at '{0}'. + Error al intentar buscar servicios en '{0}'. + {0} = a URL path + + + An error occurred while searching for services in the solution. + Error al buscar servicios en la solución. + + + + An error occurred while attempting to start services at '{0}'". + Error al intentar iniciar servicios en '{0}'". + {0} = a URL path + + + Please wait for service information to be downloaded or click Stop. + Espere a que se descargue la información del servicio o haga clic en Detener. + + + + Cannot get referenced assemblies from the project system. + No se pueden obtener los ensamblados a los que se hace referencia del sistema del proyecto. + + + + The service reference is invalid, because the .svcmap file ('{0}') cannot be found. It may have been moved, deleted or excluded from the project. To generate a new .svcmap file, delete the service reference and add it again. + La referencia de servicio no es válida porque no se encuentra el archivo .svcmap ('{0}'). Puede que se haya movido, eliminado o excluido del proyecto. Para generar un nuevo archivo .svcmap, elimine la referencia de servicio y agréguela de nuevo. + + + + The service reference is invalid. The .svcmap file ('{0}') cannot be loaded. It may be corrupted or in a bad format: {1} + La referencia de servicio no es válida. No se puede cargar el archivo .svcmap ('{0}'). Puede que esté dañado o que tenga un formato incorrecto: {1} + + + + (Details) + (Detalles) + This is the text for a link to additional error information. + + + Select a service contract to view its operations. + Seleccione un contrato de servicio para ver sus operaciones. + This is the message displayed when user selects non-cotract nodes. + + + Service Reference Settings + Configuración de referencia de servicio + + + + ( Custom ) + (Personalizado) + + + + The assembly '{0}' could not be found. + No se encontró el ensamblado '{0}'. + + + + Address should be a valid non-empty URL. + La dirección debe ser una dirección URL no vacía válida. + Error message to display when user enters empty URL in the address change text box + + + {0} service(s) found. + {0} servicios encontrados. + {0} = count + + + The operation was cancelled. + Se canceló la operación. + + + + Updating Service Reference '{0}' + Actualizando referencia de servicio '{0}'. + + + + Service reference update complete. + Actualización de referencia de servicio completada. + + + + Generating service reference client code... + Generando código de cliente de referencia de servicio... + + + + Generation of service reference client code complete. + Generación del código cliente de referencia de servicio completada. + + + + Updating service reference '{0}'... + Actualizando referencia de servicio '{0}'... + + + + Updating configuration... + Actualizando configuración... + + + + Configuration update complete. + Actualización de configuración completada. + + + + Service reference update was cancelled. + Se canceló la actualización de referencia de servicio. + + + + Service reference update failed. + No se pudo actualizar la referencia de servicio. + + + + Add service reference complete. + Incorporación de referencia de servicio completada. + + + + Add service reference failed. + No se pudo agregar la referencia de servicio. + + + + Creating new service reference to '{0}'... + Creando nueva referencia de servicio en '{0}'... + {0}=URL + + + No assembly is selected. + No se seleccionó ningún ensamblado. + + + + The requested operation is not valid while an asynchronous operation is in progress. + La operación solicitada no es válida cuando una operación asincrónica está en curso. + + + + Multiple addresses (editable in .svcmap file) + Varias direcciones (editables en el archivo .svcmap) + + + + {0} contract(s) found at address '{1}'. + Se encontraron {0} contratos en la dirección '{1}'. + {0} = count, {1} = URL where the contracts were found + + + Unable to create temporary configuration file for downloading service information. + No se puede crear el archivo de configuración temporal para descargar la información del servicio. + + + + The file is already opened in an incompatible editor. + El archivo ya está abierto en un editor incompatible. + + + + Downloading service information... + Descargando información del servicio... + + + + The current version of the software does not support adding a service reference to an existing service reference group. + La versión actual del software no permite agregar una referencia de servicio a un grupo de referencias de servicio existente. + + + + If the service is defined in the current solution, try building the solution and adding the service reference again. + Si el servicio se define en la solución actual, intente compilar la solución y agregar de nuevo la referencia de servicio. + + + + Mismatching Begin/EndBatch calls. You have called EndBatch more times than BeginBatch. + Las llamadas a Begin/EndBatch no coinciden. Ha llamado más veces a EndBatch que a BeginBatch. + + + + Failed to generate code for the service reference '{0}'. Please check other error and warning messages for details. + No se pudo generar código para la referencia al servicio '{0}'. Consulte otros mensajes de advertencia y error para obtener más detalles. + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/WCF.fr.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/WCF.fr.xlf new file mode 100644 index 00000000000..4703e91b134 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/WCF.fr.xlf @@ -0,0 +1,312 @@ + + + + + + Add Service Reference + Ajouter une référence de service + Title for the "Add Service Reference" dialog + + + Unable to find a code generator (CodeDomProvider). + Impossible de trouver un générateur de code (CodeDomProvider). + + + + Configuration could not be saved. Make sure the configuration file exists and can be edited. + Impossible d'enregistrer la configuration. Vérifiez que le fichier config existe et qu'il peut être modifié. + + + + The current project does not support configuration files. + Le projet actif ne prend pas en charge les fichiers de configuration. + + + + No services found in the solution. + Aucun service présent dans la solution. + + + + There was an error downloading metadata from the address. Please verify that you have entered a valid address. + Erreur lors du téléchargement de métadonnées à partir de l'adresse. Vérifiez que vous avez entré une adresse valide. + + + + {0} service(s) found at address '{1}'. + {0} services trouvés à l'adresse '{1}'. + {0} = count, {1} = URL where the services were found + + + {0} service(s) found in the solution. + {0} services trouvés dans la solution. + {0} = # of services + + + It is only possible to access the default (ITEMID_ROOT) configuration file. + L'accès n'est possible qu'au fichier config (ITEMID_ROOT) par défaut. + + + + '{0}' is not a valid namespace for the service reference. + '{0}' n'est pas un espace de noms valide pour la référence de service. + + + + Cannot create a service reference with namespace '{0}' because the name is already in use by an existing service reference, folder or file. + Impossible de créer une référence de service avec un espace de noms '{0}' car ce nom est déjà utilisé par un fichier, un dossier ou une référence de service existant. + + + + Unable to add a new reference. One or more references already exists or the 'Metadata' section is not empty in the .svcmap file. Edit the .svcmap file and clear all the entries from the 'Metadata' section. + Impossible d'ajouter une nouvelle référence. Une ou plusieurs références existent déjà ou la section 'Metadata' n'est pas vide dans le fichier .svcmap. Modifiez le fichier .svcmap et supprimez toutes les entrées de la section 'Metadata'. + + + + A namespace needs to be specified for this service reference. + Vous devez spécifier un espace de noms pour cette référence de service. + + + + {0}' is not a valid name for a service reference. + {0}' n'est pas un nom valide pour une référence de service. + + + + Empty string is not a valid name for a reference group. + La chaîne vide n'est pas un nom valide pour un groupe de référence. + + + + Cannot create a reference group named '{0}' because the name is already being used by an existing reference group, folder or file. + Impossible de créer un groupe de référence intitulé '{0}' car ce nom est déjà utilisé par un fichier, un dossier ou un groupe de référence existant. + + + + Cannot create a reference group with namespace or name with leading or trailing whitespace characters. + Impossible de créer un groupe de référence avec un espace de noms ou un nom contenant des caractères d'espace blanc de début ou de fin. + + + + The .svcmap file cannot be found. It may have been moved or deleted. To generate a new .svcmap file, delete the service reference and add it again. + Impossible de trouver le fichier .svcmap. Il a peut-être été déplacé ou supprimé. Pour générer un nouveau fichier .svcmap, supprimez la référence de service et ajoutez-la de nouveau. + + + + The current project does not support service references. To enable Windows Communication Foundation support, change the target version of the Microsoft .NET Framework. + Le projet actif ne prend pas en charge les références de service. Pour activer la prise en charge de Windows Communication Foundation, changez la version cible de Microsoft .NET Framework. + + + + The configuration for the service reference could not be deleted due to the following issue: {0} + Impossible de supprimer la configuration de la référence de service en raison du problème suivant : {0} + + + + The configuration for the service reference could not be updated due to the following issue: {0} + Impossible de mettre à jour la configuration de la référence de service en raison du problème suivant : {0} + + + + The configuration for the service reference could not be added due to the following issue: {0} + Impossible d'ajouter la configuration de la référence de service en raison du problème suivant : {0} + + + + Please enter the address for a service. + Entrez l'adresse d'un service. + + + + An error occurred while attempting to find services at '{0}'. + Une erreur s'est produite lors de la recherche de services à l'adresse '{0}'. + {0} = a URL path + + + An error occurred while searching for services in the solution. + Une erreur s'est produite lors de la recherche de services dans la solution. + + + + An error occurred while attempting to start services at '{0}'". + Une erreur s'est produite lors du démarrage des services à l'adresse '{0}'". + {0} = a URL path + + + Please wait for service information to be downloaded or click Stop. + Patientez pendant le téléchargement des informations de service ou cliquez sur Arrêter. + + + + Cannot get referenced assemblies from the project system. + Impossible d'obtenir les assemblys référencés à partir du système de projet. + + + + The service reference is invalid, because the .svcmap file ('{0}') cannot be found. It may have been moved, deleted or excluded from the project. To generate a new .svcmap file, delete the service reference and add it again. + La référence de service n'est pas valide, car le fichier .svcmap ('{0}') est introuvable. Il a peut être été déplacé, supprimé ou exclu du projet. Pour générer un nouveau fichier .svcmap, supprimez la référence de service et ajoutez-la de nouveau. + + + + The service reference is invalid. The .svcmap file ('{0}') cannot be loaded. It may be corrupted or in a bad format: {1} + La référence de service n'est pas valide. Impossible de charger le fichier .svcmap ('{0}'). Il peut être endommagé ou dans un format incorrect : {1} + + + + (Details) + (Détails) + This is the text for a link to additional error information. + + + Select a service contract to view its operations. + Sélectionnez un contrat de service pour afficher ses opérations. + This is the message displayed when user selects non-cotract nodes. + + + Service Reference Settings + Paramètres de référence de service + + + + ( Custom ) + ( Personnalisé ) + + + + The assembly '{0}' could not be found. + L'assembly '{0}' est introuvable. + + + + Address should be a valid non-empty URL. + L'adresse doit être une URL valide non vide. + Error message to display when user enters empty URL in the address change text box + + + {0} service(s) found. + {0} services trouvés. + {0} = count + + + The operation was cancelled. + L'opération a été annulée. + + + + Updating Service Reference '{0}' + Mise à jour de la référence de service '{0}' + + + + Service reference update complete. + Mise à jour de la référence de service terminée. + + + + Generating service reference client code... + Génération du code client de référence de service en cours... + + + + Generation of service reference client code complete. + Génération du code client de référence de service terminée. + + + + Updating service reference '{0}'... + Mise à jour de la référence de service '{0}'... + + + + Updating configuration... + Mise à jour de la configuration en cours... + + + + Configuration update complete. + Mise à jour de la configuration terminée. + + + + Service reference update was cancelled. + Mise à jour de la référence de service annulée. + + + + Service reference update failed. + Échec de la mise à jour de la référence de service. + + + + Add service reference complete. + Ajout de la référence de service terminé. + + + + Add service reference failed. + Échec de l'ajout de la référence de service. + + + + Creating new service reference to '{0}'... + Création d'une référence de service à '{0}'... + {0}=URL + + + No assembly is selected. + Aucun assembly sélectionné. + + + + The requested operation is not valid while an asynchronous operation is in progress. + L'opération demandée n'est pas valide tant qu'une opération asynchrone est en cours. + + + + Multiple addresses (editable in .svcmap file) + Plusieurs adresses (modifiables dans le fichier .svcmap) + + + + {0} contract(s) found at address '{1}'. + {0} contrats trouvés à l'adresse '{1}'. + {0} = count, {1} = URL where the contracts were found + + + Unable to create temporary configuration file for downloading service information. + Impossible de créer un fichier config temporaire pour le téléchargement des informations de service. + + + + The file is already opened in an incompatible editor. + Le fichier est déjà ouvert dans un éditeur incompatible. + + + + Downloading service information... + Téléchargement des informations de service en cours... + + + + The current version of the software does not support adding a service reference to an existing service reference group. + La version actuelle du logiciel ne prend pas en charge l'ajout d'une référence de service à un groupe de références de services existant. + + + + If the service is defined in the current solution, try building the solution and adding the service reference again. + Si le service est défini dans la solution actuelle, essayez de générer la solution et d'ajouter de nouveau la référence du service. + + + + Mismatching Begin/EndBatch calls. You have called EndBatch more times than BeginBatch. + Non-correspondance des appels Begin/EndBatch. Vous avez appelé EndBatch plus de fois que BeginBatch. + + + + Failed to generate code for the service reference '{0}'. Please check other error and warning messages for details. + Impossible de générer du code pour la référence de service '{0}'. Vérifiez les autres messages d'erreur et d'avertissement pour plus d'informations. + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/WCF.it.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/WCF.it.xlf new file mode 100644 index 00000000000..e1289648175 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/WCF.it.xlf @@ -0,0 +1,312 @@ + + + + + + Add Service Reference + Aggiungi riferimento al servizio + Title for the "Add Service Reference" dialog + + + Unable to find a code generator (CodeDomProvider). + Non è stato trovato alcun generatore del codice (CodeDomProvider). + + + + Configuration could not be saved. Make sure the configuration file exists and can be edited. + Non è stato possibile salvare la configurazione. Verificare che i file di configurazione siano presenti e possano essere modificati. + + + + The current project does not support configuration files. + Il progetto corrente non supporta i file di configurazione. + + + + No services found in the solution. + Nessun servizio trovato nella soluzione. + + + + There was an error downloading metadata from the address. Please verify that you have entered a valid address. + Errore durante il download dei metadati dall'indirizzo. Verificare di avere immesso un indirizzo valido. + + + + {0} service(s) found at address '{1}'. + {0} servizio o servizi trovato/i all'indirizzo '{1}'. + {0} = count, {1} = URL where the services were found + + + {0} service(s) found in the solution. + Servizi trovati nella soluzione: {0}. + {0} = # of services + + + It is only possible to access the default (ITEMID_ROOT) configuration file. + È possibile accedere solo al file di configurazione (ITEMID_ROOT) predefinito. + + + + '{0}' is not a valid namespace for the service reference. + '{0}' non è uno spazio dei nomi valido per il riferimento al servizio. + + + + Cannot create a service reference with namespace '{0}' because the name is already in use by an existing service reference, folder or file. + Non è possibile creare un riferimento al servizio con lo spazio dei nomi '{0}' perché il nome è già in uso da parte di un riferimento al servizio, una cartella o un file esistente. + + + + Unable to add a new reference. One or more references already exists or the 'Metadata' section is not empty in the .svcmap file. Edit the .svcmap file and clear all the entries from the 'Metadata' section. + Non è possibile aggiungere un nuovo riferimento. Sono già presenti uno o più riferimenti o la sezione 'Metadata' non è vuota nel file con estensione svcmap. Modificare il file svcmap e cancellare tutte le voci dalla sezione 'Metadata'. + + + + A namespace needs to be specified for this service reference. + Per il riferimento al servizio è necessario specificare uno spazio dei nomi. + + + + {0}' is not a valid name for a service reference. + {0}' non è un nome valido per un riferimento al servizio. + + + + Empty string is not a valid name for a reference group. + Una stringa vuota non è un nome valido per un gruppo di riferimenti. + + + + Cannot create a reference group named '{0}' because the name is already being used by an existing reference group, folder or file. + Non è possibile creare un gruppo di riferimenti denominato '{0}' perché il nome è già in uso da un gruppo di riferimenti, una cartella o un file esistente. + + + + Cannot create a reference group with namespace or name with leading or trailing whitespace characters. + Non è possibile creare un gruppo di riferimenti con un nome o uno spazio dei nomi contenente spazi iniziali o finali. + + + + The .svcmap file cannot be found. It may have been moved or deleted. To generate a new .svcmap file, delete the service reference and add it again. + Il file con estensione svcmap non è stato trovato. Potrebbe essere stato spostato o eliminato. Per generare un nuovo file con estensione svcmap, eliminare il riferimento al servizio e aggiungerlo di nuovo. + + + + The current project does not support service references. To enable Windows Communication Foundation support, change the target version of the Microsoft .NET Framework. + Il progetto corrente non supporta riferimenti al servizio. Per abilitare il supporto di Windows Communication Foundation, cambiare la versione di destinazione di Microsoft .NET Framework. + + + + The configuration for the service reference could not be deleted due to the following issue: {0} + Non è stato possibile eliminare la configurazione per il riferimento al servizio a causa del problema seguente: {0} + + + + The configuration for the service reference could not be updated due to the following issue: {0} + Non è stato possibile aggiornare la configurazione per il riferimento al servizio a causa del problema seguente: {0} + + + + The configuration for the service reference could not be added due to the following issue: {0} + Non è stato possibile aggiungere la configurazione per il riferimento al servizio a causa del problema seguente: {0} + + + + Please enter the address for a service. + Immettere l'indirizzo per un servizio. + + + + An error occurred while attempting to find services at '{0}'. + Errore durante il tentativo di individuare servizi su '{0}'. + {0} = a URL path + + + An error occurred while searching for services in the solution. + Errore durante la ricerca di servizi nella soluzione. + + + + An error occurred while attempting to start services at '{0}'". + Si è verificato un errore durante il tentativo di avviare servizi su '{0}'. + {0} = a URL path + + + Please wait for service information to be downloaded or click Stop. + Attendere il completamento del download delle informazioni del servizio oppure fare clic su Arresta. + + + + Cannot get referenced assemblies from the project system. + Non è possibile ottenere gli assembly di riferimento dal sistema del progetto. + + + + The service reference is invalid, because the .svcmap file ('{0}') cannot be found. It may have been moved, deleted or excluded from the project. To generate a new .svcmap file, delete the service reference and add it again. + Riferimento al servizio non valido. File con estensione ('{0}') non trovato. Potrebbe essere stato spostato, eliminato o escluso dal progetto. Per generare un nuovo file con estensione svcmap, eliminare il riferimento al servizio e aggiungerlo di nuovo. + + + + The service reference is invalid. The .svcmap file ('{0}') cannot be loaded. It may be corrupted or in a bad format: {1} + Il riferimento al servizio non è valido. Non è possibile caricare il file con estensione svcmap ('{0}'). È possibile che il file sia danneggiato o in formato non valido: {1} + + + + (Details) + (Dettagli) + This is the text for a link to additional error information. + + + Select a service contract to view its operations. + Selezionare un contratto di servizio per visualizzarne le operazioni. + This is the message displayed when user selects non-cotract nodes. + + + Service Reference Settings + Impostazioni riferimento al servizio + + + + ( Custom ) + ( Personalizzato ) + + + + The assembly '{0}' could not be found. + L'assembly '{0}' non è stato trovato. + + + + Address should be a valid non-empty URL. + L'indirizzo deve essere un URL valido non vuoto. + Error message to display when user enters empty URL in the address change text box + + + {0} service(s) found. + Servizi trovati: {0}. + {0} = count + + + The operation was cancelled. + Operazione annullata. + + + + Updating Service Reference '{0}' + Aggiornamento del riferimento al servizio '{0}' + + + + Service reference update complete. + Aggiornamento del riferimento al servizio completato. + + + + Generating service reference client code... + Generazione del codice client del riferimento al servizio... + + + + Generation of service reference client code complete. + Generazione del codice client del riferimento al servizio completata. + + + + Updating service reference '{0}'... + Aggiornamento del riferimento al servizio '{0}'... + + + + Updating configuration... + Aggiornamento della configurazione in corso... + + + + Configuration update complete. + Aggiornamento della configurazione completato. + + + + Service reference update was cancelled. + Aggiornamento del riferimento al servizio annullato. + + + + Service reference update failed. + Non è stato possibile aggiornare il riferimento al servizio. + + + + Add service reference complete. + Aggiunta del riferimento al servizio completata. + + + + Add service reference failed. + Non è stato possibile aggiungere il riferimento al servizio. + + + + Creating new service reference to '{0}'... + Creazione di un nuovo riferimento al servizio all'indirizzo '{0}'... + {0}=URL + + + No assembly is selected. + Nessun assembly selezionato. + + + + The requested operation is not valid while an asynchronous operation is in progress. + L'operazione richiesta non è valida quando è in corso un'operazione asincrona. + + + + Multiple addresses (editable in .svcmap file) + Più indirizzi (modificabili nel file con estensione svcmap) + + + + {0} contract(s) found at address '{1}'. + {0} contratto/i trovato/i all'indirizzo '{1}'. + {0} = count, {1} = URL where the contracts were found + + + Unable to create temporary configuration file for downloading service information. + Non è possibile creare il file di configurazione temporaneo per scaricare le informazioni del servizio. + + + + The file is already opened in an incompatible editor. + File già aperto in un editor non compatibile. + + + + Downloading service information... + Download delle informazioni sul servizio... + + + + The current version of the software does not support adding a service reference to an existing service reference group. + La versione corrente del software non supporta l'aggiunta di un riferimento al servizio a un gruppo di riferimenti al servizio esistente. + + + + If the service is defined in the current solution, try building the solution and adding the service reference again. + Se il servizio è definito nella soluzione corrente, provare a compilare la soluzione e ad aggiungere nuovamente il riferimento al servizio. + + + + Mismatching Begin/EndBatch calls. You have called EndBatch more times than BeginBatch. + Mancata corrispondenza tra chiamate BeginBatch/EndBatch. EndBatch è stato chiamato più volte di BeginBatch. + + + + Failed to generate code for the service reference '{0}'. Please check other error and warning messages for details. + Non è stato possibile generare il codice per il riferimento al servizio '{0}'. Per altre informazioni, vedere gli altri messaggi di errore e di avviso. + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/WCF.ja.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/WCF.ja.xlf new file mode 100644 index 00000000000..76999ca3e0b --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/WCF.ja.xlf @@ -0,0 +1,312 @@ + + + + + + Add Service Reference + サービス参照の追加 + Title for the "Add Service Reference" dialog + + + Unable to find a code generator (CodeDomProvider). + コード ジェネレーター (CodeDomProvider) が見つかりません。 + + + + Configuration could not be saved. Make sure the configuration file exists and can be edited. + 構成を保存できません。構成ファイルが存在し、編集できることを確認してください。 + + + + The current project does not support configuration files. + 現在のプロジェクトは構成ファイルをサポートしていません。 + + + + No services found in the solution. + ソリューションにサービスが見つかりません。 + + + + There was an error downloading metadata from the address. Please verify that you have entered a valid address. + アドレスからメタデータをダウンロードするときに、エラーが発生しました。有効なアドレスを入力していることを確認してください。 + + + + {0} service(s) found at address '{1}'. + アドレス '{1}' で {0} 個のサービスが見つかりました。 + {0} = count, {1} = URL where the services were found + + + {0} service(s) found in the solution. + ソリューションで {0} 個のサービスが見つかりました。 + {0} = # of services + + + It is only possible to access the default (ITEMID_ROOT) configuration file. + 既定の (ITEMID_ROOT) 構成ファイルにのみアクセスすることができます。 + + + + '{0}' is not a valid namespace for the service reference. + '{0}' はサービス参照に有効な名前空間ではありません。 + + + + Cannot create a service reference with namespace '{0}' because the name is already in use by an existing service reference, folder or file. + 同じ名前が既存のサービス参照、フォルダー、またはファイルによって使用されているので、名前空間 '{0}' を持つサービス参照を作成できません。 + + + + Unable to add a new reference. One or more references already exists or the 'Metadata' section is not empty in the .svcmap file. Edit the .svcmap file and clear all the entries from the 'Metadata' section. + 新しい参照を追加できません。1 つ以上の参照が既に存在するか、.svcmap ファイルの 'Metadata' セクションが空ではありません。.svcmap ファイルを編集して 'Metadata' セクションのすべてのエントリをクリアしてください。 + + + + A namespace needs to be specified for this service reference. + このサービス参照に対して名前空間を指定する必要があります。 + + + + {0}' is not a valid name for a service reference. + '{0}' はサービス参照に有効な名前ではありません。 + + + + Empty string is not a valid name for a reference group. + 空の文字列は参照グループに有効な名前ではありません。 + + + + Cannot create a reference group named '{0}' because the name is already being used by an existing reference group, folder or file. + 同じ名前が既存の参照グループ、フォルダー、またはファイルによって使用されているので、'{0}' という名前の参照グループを作成できません。 + + + + Cannot create a reference group with namespace or name with leading or trailing whitespace characters. + 名前空間または名前の先頭や末尾にスペース文字を含む参照グループは作成できません。 + + + + The .svcmap file cannot be found. It may have been moved or deleted. To generate a new .svcmap file, delete the service reference and add it again. + .svcmap ファイルが見つかりません。移動したか、または削除された可能性があります。新しい .svcmap ファイルを生成するには、サービス参照を削除してから再び追加してください。 + + + + The current project does not support service references. To enable Windows Communication Foundation support, change the target version of the Microsoft .NET Framework. + 現在のプロジェクトはサービス参照をサポートしていません。Windows Communication Foundation サポートを有効にするには、対象の Microsoft .NET Framework のバージョンを変更してください。 + + + + The configuration for the service reference could not be deleted due to the following issue: {0} + 次の問題により、サービス参照の構成を削除できませんでした: {0} + + + + The configuration for the service reference could not be updated due to the following issue: {0} + 次の問題により、サービス参照の構成を更新できませんでした: {0} + + + + The configuration for the service reference could not be added due to the following issue: {0} + 次の問題により、サービス参照の構成を追加できませんでした: {0} + + + + Please enter the address for a service. + サービスのアドレスを入力してください。 + + + + An error occurred while attempting to find services at '{0}'. + '{0}' でサービスを検索しようとしてエラーが発生しました。 + {0} = a URL path + + + An error occurred while searching for services in the solution. + ソリューションでサービスを検索中にエラーが発生しました。 + + + + An error occurred while attempting to start services at '{0}'". + '{0}' でサービスを開始しようとしてエラーが発生しました。 + {0} = a URL path + + + Please wait for service information to be downloaded or click Stop. + サービス情報がダウンロードされるまでお待ちください。または [停止]5D; をクリックしてください。 + + + + Cannot get referenced assemblies from the project system. + 参照されたアセンブリをプロジェクト システムから取得できません。 + + + + The service reference is invalid, because the .svcmap file ('{0}') cannot be found. It may have been moved, deleted or excluded from the project. To generate a new .svcmap file, delete the service reference and add it again. + .svcmap ファイル ('{0}') が見つからないためサービス参照が無効です。移動または削除されたか、プロジェクトから除外されている可能性があります。新しい .svcmap ファイルを生成するには、サービス参照を削除してから再び追加してください。 + + + + The service reference is invalid. The .svcmap file ('{0}') cannot be loaded. It may be corrupted or in a bad format: {1} + サービス参照が無効です。.svcmap ファイル ('{0}') を読み込むことができません。破損しているか、無効な形式の可能性があります: {1} + + + + (Details) + (詳細) + This is the text for a link to additional error information. + + + Select a service contract to view its operations. + サービス コントラクトを選択して操作を表示します。 + This is the message displayed when user selects non-cotract nodes. + + + Service Reference Settings + サービス参照設定 + + + + ( Custom ) + (カスタム) + + + + The assembly '{0}' could not be found. + アセンブリ '{0}' が見つかりませんでした。 + + + + Address should be a valid non-empty URL. + アドレスには空ではない有効な URL を指定してください。 + Error message to display when user enters empty URL in the address change text box + + + {0} service(s) found. + {0} 個のサービスが見つかりました。 + {0} = count + + + The operation was cancelled. + 処理が取り消されました。 + + + + Updating Service Reference '{0}' + サービス参照 '{0}' を更新しています + + + + Service reference update complete. + サービス参照の更新が完了しました。 + + + + Generating service reference client code... + サービス参照クライアント コードを生成しています... + + + + Generation of service reference client code complete. + サービス参照クライアント コードの生成が完了しました。 + + + + Updating service reference '{0}'... + サービス参照 '{0}' を更新しています... + + + + Updating configuration... + 構成を更新しています... + + + + Configuration update complete. + 構成の更新が完了しました。 + + + + Service reference update was cancelled. + サービス参照の更新が取り消されました。 + + + + Service reference update failed. + サービス参照の更新が失敗しました。 + + + + Add service reference complete. + サービス参照の追加が完了しました。 + + + + Add service reference failed. + サービス参照の追加が失敗しました。 + + + + Creating new service reference to '{0}'... + '{0}' への新しいサービス参照を作成しています... + {0}=URL + + + No assembly is selected. + アセンブリが選択されていません。 + + + + The requested operation is not valid while an asynchronous operation is in progress. + 要求された操作は、非同期操作を実行している間は無効です。 + + + + Multiple addresses (editable in .svcmap file) + 複数アドレス (.svcmap ファイルで編集可能) + + + + {0} contract(s) found at address '{1}'. + アドレス '{1}' で {0} 個のコントラクトが見つかりました。 + {0} = count, {1} = URL where the contracts were found + + + Unable to create temporary configuration file for downloading service information. + サービス情報をダウンロードするための一時構成ファイルを作成できません。 + + + + The file is already opened in an incompatible editor. + ファイルは、互換性のないエディターで既に開かれています。 + + + + Downloading service information... + サービス情報をダウンロードしています... + + + + The current version of the software does not support adding a service reference to an existing service reference group. + ソフトウェアの現在のバージョンでは、既存のサービス参照グループへのサービス参照の追加はサポートされていません。 + + + + If the service is defined in the current solution, try building the solution and adding the service reference again. + サービスが現在のソリューションに定義されている場合は、ソリューションの構築とサービス参照の追加を再試行してください。 + + + + Mismatching Begin/EndBatch calls. You have called EndBatch more times than BeginBatch. + Begin/EndBatch の呼び出しが対応していません。EndBatch が BeginBatch よりも多く呼び出されています。 + + + + Failed to generate code for the service reference '{0}'. Please check other error and warning messages for details. + サービス参照 '{0}' のコードを生成できませんでした。詳細については、他のエラー メッセージと警告メッセージを確認してください。 + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/WCF.ko.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/WCF.ko.xlf new file mode 100644 index 00000000000..8ef523f70e7 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/WCF.ko.xlf @@ -0,0 +1,312 @@ + + + + + + Add Service Reference + 서비스 참조 추가 + Title for the "Add Service Reference" dialog + + + Unable to find a code generator (CodeDomProvider). + 코드 생성기(CodeDomProvider)를 찾을 수 없습니다. + + + + Configuration could not be saved. Make sure the configuration file exists and can be edited. + 구성을 저장할 수 없습니다. 구성 파일이 있는지, 그리고 편집할 수 있는지 확인하세요. + + + + The current project does not support configuration files. + 현재 프로젝트에서 구성 파일을 지원하지 않습니다. + + + + No services found in the solution. + 솔루션에서 서비스를 찾을 수 없습니다. + + + + There was an error downloading metadata from the address. Please verify that you have entered a valid address. + 주소에서 메타데이터를 다운로드하는 동안 오류가 발생했습니다. 올바른 주소를 입력했는지 확인하세요. + + + + {0} service(s) found at address '{1}'. + 주소 '{1}'에서 {0}개의 서비스를 찾았습니다. + {0} = count, {1} = URL where the services were found + + + {0} service(s) found in the solution. + 솔루션에서 {0}개의 서비스를 찾았습니다. + {0} = # of services + + + It is only possible to access the default (ITEMID_ROOT) configuration file. + 기본(ITEMID_ROOT) 구성 파일에만 액세스할 수 있습니다. + + + + '{0}' is not a valid namespace for the service reference. + '{0}'은(는) 올바른 서비스 참조 네임스페이스가 아닙니다. + + + + Cannot create a service reference with namespace '{0}' because the name is already in use by an existing service reference, folder or file. + 기존 서비스 참조, 폴더 또는 파일에서 '{0}' 이름을 이미 사용하고 있으므로 이 이름의 네임스페이스로 서비스 참조를 만들 수 없습니다. + + + + Unable to add a new reference. One or more references already exists or the 'Metadata' section is not empty in the .svcmap file. Edit the .svcmap file and clear all the entries from the 'Metadata' section. + 새 참조를 추가할 수 없습니다. .svcmap 파일에 이미 하나 이상의 참조가 있거나 'Metadata' 섹션이 비어 있지 않습니다. .svcmap 파일을 편집하여 'Metadata' 섹션의 모든 항목을 지우세요. + + + + A namespace needs to be specified for this service reference. + 이 서비스 참조에 네임스페이스를 지정해야 합니다. + + + + {0}' is not a valid name for a service reference. + '{0}'은(는) 올바른 서비스 참조 이름이 아닙니다. + + + + Empty string is not a valid name for a reference group. + 빈 문자열은 올바른 참조 그룹 이름이 아닙니다. + + + + Cannot create a reference group named '{0}' because the name is already being used by an existing reference group, folder or file. + 기존 참조 그룹, 폴더 또는 파일에서 이미 '{0}'(이)라는 이름을 사용하고 있으므로 이 이름으로 참조 그룹을 만들 수 없습니다. + + + + Cannot create a reference group with namespace or name with leading or trailing whitespace characters. + 선행 공백 또는 후행 공백 문자가 있는 네임스페이스나 이름으로 참조 그룹을 만들 수 없습니다. + + + + The .svcmap file cannot be found. It may have been moved or deleted. To generate a new .svcmap file, delete the service reference and add it again. + .svcmap 파일을 찾을 수 없습니다. 이동되었거나 삭제되었을 수 있습니다. 새 .svcmap 파일을 생성하려면 서비스 참조를 삭제하고 다시 추가하세요. + + + + The current project does not support service references. To enable Windows Communication Foundation support, change the target version of the Microsoft .NET Framework. + 현재 프로젝트에서는 서비스 참조를 지원하지 않습니다. Windows Communication Foundation이 지원되도록 하려면 Microsoft .NET Framework의 대상 버전을 변경하세요. + + + + The configuration for the service reference could not be deleted due to the following issue: {0} + 다음 문제로 인해 서비스 참조의 구성을 삭제할 수 없습니다. {0} + + + + The configuration for the service reference could not be updated due to the following issue: {0} + 다음 문제로 인해 서비스 참조의 구성을 업데이트할 수 없습니다. {0} + + + + The configuration for the service reference could not be added due to the following issue: {0} + 다음 문제로 인해 서비스 참조의 구성을 추가할 수 없습니다. {0} + + + + Please enter the address for a service. + 서비스의 주소를 입력하세요. + + + + An error occurred while attempting to find services at '{0}'. + '{0}'에서 서비스를 찾는 동안 오류가 발생했습니다. + {0} = a URL path + + + An error occurred while searching for services in the solution. + 솔루션에서 서비스를 검색하는 동안 오류가 발생했습니다. + + + + An error occurred while attempting to start services at '{0}'". + '{0}'에서 서비스를 시작하는 동안 오류가 발생했습니다. + {0} = a URL path + + + Please wait for service information to be downloaded or click Stop. + 서비스 정보가 다운로드될 때까지 기다리거나 [중지]5D;를 클릭하세요. + + + + Cannot get referenced assemblies from the project system. + 참조된 어셈블리를 프로젝트 시스템에서 가져올 수 없습니다. + + + + The service reference is invalid, because the .svcmap file ('{0}') cannot be found. It may have been moved, deleted or excluded from the project. To generate a new .svcmap file, delete the service reference and add it again. + .svcmap 파일('{0}')을 찾을 수 없으므로 서비스 참조가 유효하지 않습니다. 이 파일은 이동 또는 삭제되었거나 프로젝트에서 제외되었을 수 있습니다. 새 .svcmap 파일을 생성하려면 서비스 참조를 삭제하고 다시 추가하세요. + + + + The service reference is invalid. The .svcmap file ('{0}') cannot be loaded. It may be corrupted or in a bad format: {1} + 서비스 참조가 잘못되었습니다. .svcmap 파일('{0}')을 로드할 수 없습니다. 이 파일은 손상되거나 형식이 잘못되어 있을 수 있습니다. {1} + + + + (Details) + (자세히) + This is the text for a link to additional error information. + + + Select a service contract to view its operations. + 서비스 계약을 선택하여 해당 작업을 확인하세요. + This is the message displayed when user selects non-cotract nodes. + + + Service Reference Settings + 서비스 참조 설정 + + + + ( Custom ) + ( 사용자 지정 ) + + + + The assembly '{0}' could not be found. + '{0}' 어셈블리를 찾을 수 없습니다. + + + + Address should be a valid non-empty URL. + 주소는 비어 있지 않은 올바른 URL이어야 합니다. + Error message to display when user enters empty URL in the address change text box + + + {0} service(s) found. + {0}개의 서비스를 찾았습니다. + {0} = count + + + The operation was cancelled. + 작업이 취소되었습니다. + + + + Updating Service Reference '{0}' + 서비스 참조 '{0}'을(를) 업데이트하는 중 + + + + Service reference update complete. + 서비스 참조가 업데이트되었습니다. + + + + Generating service reference client code... + 서비스 참조 클라이언트 코드를 생성하는 중... + + + + Generation of service reference client code complete. + 서비스 참조 클라이언트 코드가 생성되었습니다. + + + + Updating service reference '{0}'... + 서비스 참조 '{0}'을(를) 업데이트하는 중... + + + + Updating configuration... + 구성을 업데이트하는 중... + + + + Configuration update complete. + 구성이 업데이트되었습니다. + + + + Service reference update was cancelled. + 서비스 참조 업데이트가 취소되었습니다. + + + + Service reference update failed. + 서비스 참조를 업데이트하지 못했습니다. + + + + Add service reference complete. + 서비스 참조가 추가되었습니다. + + + + Add service reference failed. + 서비스 참조를 추가하지 못했습니다. + + + + Creating new service reference to '{0}'... + '{0}'에 대한 새 서비스 참조를 만드는 중... + {0}=URL + + + No assembly is selected. + 선택된 어셈블리가 없습니다. + + + + The requested operation is not valid while an asynchronous operation is in progress. + 비동기 작업이 진행되는 동안에는 요청된 작업이 유효하지 않습니다. + + + + Multiple addresses (editable in .svcmap file) + 여러 주소(.svcmap 파일에서 편집 가능) + + + + {0} contract(s) found at address '{1}'. + 주소 '{1}'에서 {0}개의 계약을 찾았습니다. + {0} = count, {1} = URL where the contracts were found + + + Unable to create temporary configuration file for downloading service information. + 서비스 정보를 다운로드하기 위한 임시 구성 파일을 만들 수 없습니다. + + + + The file is already opened in an incompatible editor. + 이 파일은 호환되지 않는 편집기에 이미 열려 있습니다. + + + + Downloading service information... + 서비스 정보를 다운로드하는 중... + + + + The current version of the software does not support adding a service reference to an existing service reference group. + 현재 버전의 소프트웨어에서는 기존 서비스 참조 그룹에 서비스 참조를 추가할 수 없습니다. + + + + If the service is defined in the current solution, try building the solution and adding the service reference again. + 서비스가 현재 솔루션에 정의되어 있으면 다시 솔루션을 빌드하고 서비스 참조를 추가해 보세요. + + + + Mismatching Begin/EndBatch calls. You have called EndBatch more times than BeginBatch. + BeginBatch와 EndBatch의 호출 횟수가 일치하지 않습니다. BeginBatch보다 EndBatch를 더 많이 호출했습니다. + + + + Failed to generate code for the service reference '{0}'. Please check other error and warning messages for details. + 서비스 참조 '{0}'에 대해 코드를 생성하지 못했습니다. 자세한 내용은 기타 오류 및 경고 메시지를 확인하세요. + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/WCF.pl.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/WCF.pl.xlf new file mode 100644 index 00000000000..325a2575411 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/WCF.pl.xlf @@ -0,0 +1,312 @@ + + + + + + Add Service Reference + Dodawanie odwołania do usługi + Title for the "Add Service Reference" dialog + + + Unable to find a code generator (CodeDomProvider). + Nie można odnaleźć generatora kodu (CodeDomProvider). + + + + Configuration could not be saved. Make sure the configuration file exists and can be edited. + Nie można zapisać konfiguracji. Upewnij się, że plik konfiguracji istnieje i można go edytować. + + + + The current project does not support configuration files. + Bieżący projekt nie obsługuje plików konfiguracji. + + + + No services found in the solution. + Nie znaleziono żadnych usług w rozwiązaniu. + + + + There was an error downloading metadata from the address. Please verify that you have entered a valid address. + Wystąpił błąd podczas pobierania metadanych z adresu. Sprawdź, czy wprowadzono poprawny adres. + + + + {0} service(s) found at address '{1}'. + Znaleziono usługi ({0}) pod adresem {1}. + {0} = count, {1} = URL where the services were found + + + {0} service(s) found in the solution. + Znaleziono usługi ({0}) w rozwiązaniu. + {0} = # of services + + + It is only possible to access the default (ITEMID_ROOT) configuration file. + Możliwy jest tylko dostęp do domyślnego pliku konfiguracji (ITEMID_ROOT). + + + + '{0}' is not a valid namespace for the service reference. + Wartość {0} nie jest prawidłową przestrzenią nazw dla odwołania do usługi. + + + + Cannot create a service reference with namespace '{0}' because the name is already in use by an existing service reference, folder or file. + Nie można utworzyć odwołania do usługi z przestrzenią nazw {0}, ponieważ ta nazwa jest już używana przez istniejące odwołanie do usługi, folder lub plik. + + + + Unable to add a new reference. One or more references already exists or the 'Metadata' section is not empty in the .svcmap file. Edit the .svcmap file and clear all the entries from the 'Metadata' section. + Nie można dodać nowego odwołania. Istnieje już co najmniej jedno odwołanie lub sekcja Metadata w pliku .svcmap nie jest pusta. Zmodyfikuj plik .svcmap i wyczyść wszystkie wpisy z sekcji Metadata. + + + + A namespace needs to be specified for this service reference. + Należy określić przestrzeń nazw dla tego odwołania do usługi. + + + + {0}' is not a valid name for a service reference. + Wartość {0} nie jest prawidłową nazwą dla odwołania do usługi. + + + + Empty string is not a valid name for a reference group. + Pusty ciąg nie jest prawidłową nazwą dla grupy odwołania. + + + + Cannot create a reference group named '{0}' because the name is already being used by an existing reference group, folder or file. + Nie można utworzyć grupy odwołania o nazwie {0}, ponieważ nazwa ta jest już używana przez istniejącą grupę odwołania, folder lub plik. + + + + Cannot create a reference group with namespace or name with leading or trailing whitespace characters. + Nie można utworzyć grupy odwołania z przestrzenią nazw lub nazwą rozpoczynającą się lub kończącą znakami odstępu. + + + + The .svcmap file cannot be found. It may have been moved or deleted. To generate a new .svcmap file, delete the service reference and add it again. + Nie można odnaleźć pliku .svcmap. Mógł on zostać przeniesiony lub usunięty. Aby wygenerować nowy plik .svcmap, usuń odwołanie do usługi i ponownie je dodaj. + + + + The current project does not support service references. To enable Windows Communication Foundation support, change the target version of the Microsoft .NET Framework. + Bieżący projekt nie obsługuje odwołań do usług. Aby włączyć obsługę struktury Windows Communication Foundation, zmień docelową wersję programu Microsoft .NET Framework. + + + + The configuration for the service reference could not be deleted due to the following issue: {0} + Nie można usunąć konfiguracji dla odwołania do usługi z powodu następującego problemu: {0} + + + + The configuration for the service reference could not be updated due to the following issue: {0} + Nie można zaktualizować konfiguracji dla odwołania do usługi z powodu następującego problemu: {0} + + + + The configuration for the service reference could not be added due to the following issue: {0} + Nie można dodać konfiguracji dla odwołania do usługi z powodu następującego problemu: {0} + + + + Please enter the address for a service. + Wprowadź adres dla usługi. + + + + An error occurred while attempting to find services at '{0}'. + Wystąpił błąd w czasie próby znalezienia usług w {0}. + {0} = a URL path + + + An error occurred while searching for services in the solution. + Wystąpił błąd podczas wyszukiwania usług w rozwiązaniu. + + + + An error occurred while attempting to start services at '{0}'". + Wystąpił błąd w czasie próby uruchomienia usług w {0}. + {0} = a URL path + + + Please wait for service information to be downloaded or click Stop. + Zaczekaj na pobranie informacji o usłudze lub kliknij przycisk Zatrzymaj. + + + + Cannot get referenced assemblies from the project system. + Nie można pobrać przywoływanych zestawów z systemu projektów. + + + + The service reference is invalid, because the .svcmap file ('{0}') cannot be found. It may have been moved, deleted or excluded from the project. To generate a new .svcmap file, delete the service reference and add it again. + Odwołanie do usługi jest nieprawidłowe, ponieważ nie można odnaleźć pliku .svcmap ({0}). Mógł on zostać przeniesiony, usunięty lub wykluczony z projektu. Aby wygenerować nowy plik .svcmap, usuń odwołanie do usługi i ponownie je dodaj. + + + + The service reference is invalid. The .svcmap file ('{0}') cannot be loaded. It may be corrupted or in a bad format: {1} + Odwołanie do usługi jest nieprawidłowe. Nie można załadować pliku .svcmap ({0}). Plik może być uszkodzony lub ma zły format: {1} + + + + (Details) + (Szczegóły) + This is the text for a link to additional error information. + + + Select a service contract to view its operations. + Wybierz kontrakt usługi, aby wyświetlić jego operacje. + This is the message displayed when user selects non-cotract nodes. + + + Service Reference Settings + Ustawienia odwołań do usługi + + + + ( Custom ) + ( Niestandardowe ) + + + + The assembly '{0}' could not be found. + Nie odnaleziono zestawu „{0}”. + + + + Address should be a valid non-empty URL. + Adres powinien być prawidłowym, niepustym adresem URL. + Error message to display when user enters empty URL in the address change text box + + + {0} service(s) found. + Znaleziono usługi ({0}). + {0} = count + + + The operation was cancelled. + Operacja została anulowana. + + + + Updating Service Reference '{0}' + Aktualizowanie odwołania do usługi {0} + + + + Service reference update complete. + Ukończono aktualizowanie odwołania do usługi. + + + + Generating service reference client code... + Generowanie kodu klienta odwołania do usługi... + + + + Generation of service reference client code complete. + Ukończono generowanie kodu klienta odwołania do usługi. + + + + Updating service reference '{0}'... + Aktualizowanie odwołania do usługi {0}... + + + + Updating configuration... + Aktualizowanie konfiguracji... + + + + Configuration update complete. + Ukończono aktualizowanie konfiguracji. + + + + Service reference update was cancelled. + Aktualizacja odwołania do usługi została anulowana. + + + + Service reference update failed. + Nie można zaktualizować odwołania do usługi. + + + + Add service reference complete. + Ukończono dodawanie odwołania do usługi. + + + + Add service reference failed. + Nie można dodać odwołania do usługi. + + + + Creating new service reference to '{0}'... + Tworzenie nowego odwołania do usługi do {0}... + {0}=URL + + + No assembly is selected. + Nie wybrano zestawu. + + + + The requested operation is not valid while an asynchronous operation is in progress. + Żądana operacja nie jest prawidłowa, gdy trwa operacja asynchroniczna. + + + + Multiple addresses (editable in .svcmap file) + Wiele adresów (edytowalne w pliku svcmap) + + + + {0} contract(s) found at address '{1}'. + Pod adresem {1} znaleziono następującą liczbę kontraktów: {0}. + {0} = count, {1} = URL where the contracts were found + + + Unable to create temporary configuration file for downloading service information. + Nie można utworzyć tymczasowego pliku konfiguracji dla pobieranych informacji o usłudze. + + + + The file is already opened in an incompatible editor. + Plik jest już otwarty w niezgodnym edytorze. + + + + Downloading service information... + Pobieranie informacji o usłudze... + + + + The current version of the software does not support adding a service reference to an existing service reference group. + Bieżąca wersja oprogramowania nie obsługuje dodawania odwołania do usługi do istniejącej grupy odwołań do usługi. + + + + If the service is defined in the current solution, try building the solution and adding the service reference again. + Jeśli usługa została zdefiniowana w bieżącym rozwiązaniu, spróbuj skompilować rozwiązanie i dodać ponownie odwołanie do usługi. + + + + Mismatching Begin/EndBatch calls. You have called EndBatch more times than BeginBatch. + Niezgodne wywołania Begin/EndBatch. Wywołano element EndBatch więcej razy niż element BeginBatch. + + + + Failed to generate code for the service reference '{0}'. Please check other error and warning messages for details. + Nie można wygenerować kodu dla odwołania do usługi {0}. Aby uzyskać więcej szczegółów, sprawdź inne komunikaty o błędach i ostrzeżeniach. + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/WCF.pt-BR.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/WCF.pt-BR.xlf new file mode 100644 index 00000000000..52699071a4d --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/WCF.pt-BR.xlf @@ -0,0 +1,312 @@ + + + + + + Add Service Reference + Adicionar Referência de Serviço + Title for the "Add Service Reference" dialog + + + Unable to find a code generator (CodeDomProvider). + Não foi possível encontrar o gerador de código (CodeDomProvider). + + + + Configuration could not be saved. Make sure the configuration file exists and can be edited. + Não foi possível salvar a configuração. Verifique se o arquivo de configuração existe e se ele pode ser editado. + + + + The current project does not support configuration files. + O projeto atual não dá suporte a arquivos de configuração. + + + + No services found in the solution. + Nenhum serviço foi encontrado na solução. + + + + There was an error downloading metadata from the address. Please verify that you have entered a valid address. + Erro ao baixar metadados do endereço. Verifique se você inseriu um endereço válido. + + + + {0} service(s) found at address '{1}'. + {0} serviço(s) encontrado(s) no endereço '{1}'. + {0} = count, {1} = URL where the services were found + + + {0} service(s) found in the solution. + {0} serviço(s) encontrado(s) na solução. + {0} = # of services + + + It is only possible to access the default (ITEMID_ROOT) configuration file. + Só é possível acessar o arquivo de configuração padrão (ITEMID_ROOT). + + + + '{0}' is not a valid namespace for the service reference. + '{0}' não é um namespace válido para a referência de serviço. + + + + Cannot create a service reference with namespace '{0}' because the name is already in use by an existing service reference, folder or file. + Não é possível criar uma referência de serviço com namespace '{0}' porque o nomes já está sendo usado por uma referência de serviço, pasta ou arquivo existentes. + + + + Unable to add a new reference. One or more references already exists or the 'Metadata' section is not empty in the .svcmap file. Edit the .svcmap file and clear all the entries from the 'Metadata' section. + Não é possível adicionar uma nova referência. Uma ou mais referências já existem ou a seção 'Metadados' não está vazia no arquivo .svcmap. Edite esse arquivo e remova todas as entradas da seção 'Metadados'. + + + + A namespace needs to be specified for this service reference. + Um namespace precisa ser especificado para esta referência de serviço. + + + + {0}' is not a valid name for a service reference. + {0}' não é um nome válido para uma referência de serviço. + + + + Empty string is not a valid name for a reference group. + Uma cadeia de caracteres vazia não é um nome válido para um grupo de referências. + + + + Cannot create a reference group named '{0}' because the name is already being used by an existing reference group, folder or file. + Não é possível criar um grupo de referencias nomeado '{0}' porque o nome já está sendo usado por um grupo de referências, pasta ou arquivo existentes. + + + + Cannot create a reference group with namespace or name with leading or trailing whitespace characters. + Não é possível criar um grupo de referências com o namespace ou nome com caracteres de espaços em branco no início ou no término destes. + + + + The .svcmap file cannot be found. It may have been moved or deleted. To generate a new .svcmap file, delete the service reference and add it again. + O arquivo .svcmap não foi encontrado. Ele pode ter sido movido ou excluído. Para gerar um novo arquivo .svcmap, exclua a referência de serviço e adicione-a novamente. + + + + The current project does not support service references. To enable Windows Communication Foundation support, change the target version of the Microsoft .NET Framework. + O projeto atual não dá suporte a referências de serviço. Para habilitar o suporte ao Windows Communication Foundation, altere a versão de destino do Microsoft .NET Framework. + + + + The configuration for the service reference could not be deleted due to the following issue: {0} + A configuração para referência de serviço não pôde ser deletada devido ao seguinte problema: {0} + + + + The configuration for the service reference could not be updated due to the following issue: {0} + A configuração para a referência de serviço não pôde ser atualizada devido ao seguinte problema: {0} + + + + The configuration for the service reference could not be added due to the following issue: {0} + A configuração para a referência de serviço não pôde ser adicionada devido ao seguinte problema: {0} + + + + Please enter the address for a service. + Digite um endereço para um serviço. + + + + An error occurred while attempting to find services at '{0}'. + Um erro ocorreu durante a tentativa de encontrar os serviços de '{0}'. + {0} = a URL path + + + An error occurred while searching for services in the solution. + Erro ao procurar serviços na solução. + + + + An error occurred while attempting to start services at '{0}'". + Um erro ocorreu ao tentar iniciar os serviços em '{0}'". + {0} = a URL path + + + Please wait for service information to be downloaded or click Stop. + Aguarde o download das informações do serviço ou clique em Parar. + + + + Cannot get referenced assemblies from the project system. + Não é possível obter assemblies referenciados do sistema de projeto. + + + + The service reference is invalid, because the .svcmap file ('{0}') cannot be found. It may have been moved, deleted or excluded from the project. To generate a new .svcmap file, delete the service reference and add it again. + A referência de serviço é inválida, pois o arquivo .svcmap ('{0}') não pode ser encontrado. Ele pode ter sido movido, excluído ou removido do projeto. Para gerar um novo arquivo .svcmap, exclua a referência de serviço e adicione-a novamente. + + + + The service reference is invalid. The .svcmap file ('{0}') cannot be loaded. It may be corrupted or in a bad format: {1} + A referência de serviço é inválida O arquivo .svcmap ('{0}') não pode ser carregado. Ele pode estar corrompido ou em um formato ruim: {1} + + + + (Details) + (Detalhes) + This is the text for a link to additional error information. + + + Select a service contract to view its operations. + Selecione um contrato de serviço para exibir as operações. + This is the message displayed when user selects non-cotract nodes. + + + Service Reference Settings + Configurações de Referência de Serviço + + + + ( Custom ) + ( Personalizado ) + + + + The assembly '{0}' could not be found. + Não foi possível encontrar o assembly '{0}'. + + + + Address should be a valid non-empty URL. + O endereço deve ser uma URL válida não vazia. + Error message to display when user enters empty URL in the address change text box + + + {0} service(s) found. + {0} serviço(s) encontrado(s). + {0} = count + + + The operation was cancelled. + A operação foi cancelada. + + + + Updating Service Reference '{0}' + Atualizando a Referência de Serviço '{0}' + + + + Service reference update complete. + Atualização de referência de serviço concluída. + + + + Generating service reference client code... + Gerando código de cliente de referência de serviço... + + + + Generation of service reference client code complete. + Geração do código de cliente de referência de serviço concluída. + + + + Updating service reference '{0}'... + Atualizando a referência de serviço '{0}'... + + + + Updating configuration... + Atualizando configuração... + + + + Configuration update complete. + Atualização de configuração concluída. + + + + Service reference update was cancelled. + Atualização da referência de serviço foi cancelada. + + + + Service reference update failed. + Falha na atualização de referência de serviço. + + + + Add service reference complete. + Adição de referência de serviço concluída. + + + + Add service reference failed. + Falha ao adicionar a referência de serviço. + + + + Creating new service reference to '{0}'... + Criando nova referência de serviço para '{0}'... + {0}=URL + + + No assembly is selected. + Nenhum assembly está selecionado. + + + + The requested operation is not valid while an asynchronous operation is in progress. + A operação solicitada não é válida enquanto uma operação assíncrona está em andamento. + + + + Multiple addresses (editable in .svcmap file) + Vários endereços (editáveis no arquivo .svcmap) + + + + {0} contract(s) found at address '{1}'. + {0} contrato(s) encontrado(s) no endereço '{1}'. + {0} = count, {1} = URL where the contracts were found + + + Unable to create temporary configuration file for downloading service information. + Não é possível criar o arquivo de configuração temporário para baixar informações do serviço. + + + + The file is already opened in an incompatible editor. + O arquivo já está aberto em um editor incompatível. + + + + Downloading service information... + Baixando informações do serviço... + + + + The current version of the software does not support adding a service reference to an existing service reference group. + A versão atual do software não dá suporte à adição de uma referência de serviço a um grupo de referências de serviço existente. + + + + If the service is defined in the current solution, try building the solution and adding the service reference again. + Se o serviço está definido na solução atual, tente compilar a solução e adicionar a referência de serviço novamente. + + + + Mismatching Begin/EndBatch calls. You have called EndBatch more times than BeginBatch. + Chamadas Begin/EndBatch incompatíveis. Você chamou EndBatch mais vezes que BeginBatch. + + + + Failed to generate code for the service reference '{0}'. Please check other error and warning messages for details. + Falha ao gerar código para a referência de serviço '{0}'. Verifique outras mensagens de erro e aviso para mais detalhes. + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/WCF.ru.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/WCF.ru.xlf new file mode 100644 index 00000000000..7c3bf7b2e09 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/WCF.ru.xlf @@ -0,0 +1,312 @@ + + + + + + Add Service Reference + Добавить ссылку на службу + Title for the "Add Service Reference" dialog + + + Unable to find a code generator (CodeDomProvider). + Не удалось найти генератор кода (CodeDomProvider). + + + + Configuration could not be saved. Make sure the configuration file exists and can be edited. + Не удалось сохранить конфигурацию. Убедитесь, что конфигурационных файл существует и что его можно изменить. + + + + The current project does not support configuration files. + Текущий проект не поддерживает конфигурационные файлы. + + + + No services found in the solution. + В решении не найдено служб. + + + + There was an error downloading metadata from the address. Please verify that you have entered a valid address. + Возникла ошибка при загрузке метаданных с указанного адреса. Проверьте корректность введенного адреса. + + + + {0} service(s) found at address '{1}'. + Сервисов найдено по адресу "{1}": {0}. + {0} = count, {1} = URL where the services were found + + + {0} service(s) found in the solution. + Сервисов найдено в решении: {0} + {0} = # of services + + + It is only possible to access the default (ITEMID_ROOT) configuration file. + Возможно лишь открыть конфигурационный файл по умолчанию (ITEMID_ROOT). + + + + '{0}' is not a valid namespace for the service reference. + {0} не является действительным пространством имен для ссылки на службу. + + + + Cannot create a service reference with namespace '{0}' because the name is already in use by an existing service reference, folder or file. + Не удалось создать группу ссылок с пространством имен "{0}", потому что имя уже используется либо существующей группой ссылок, либо каталогом, либо файлом. + + + + Unable to add a new reference. One or more references already exists or the 'Metadata' section is not empty in the .svcmap file. Edit the .svcmap file and clear all the entries from the 'Metadata' section. + Не удается добавить новую ссылку. Либо уже существует одна или более ссылок, либо секция "Metadata" в svcmap-файле не пуста. Исправьте svcmap-файл и очистите все записи из секции "Metadata". + + + + A namespace needs to be specified for this service reference. + Нужно указать пространство имен для этой ссылки на службу. + + + + {0}' is not a valid name for a service reference. + {0} не является действительным именем для ссылки на службу. + + + + Empty string is not a valid name for a reference group. + Пустая строка не является действительным именем для группы ссылок. + + + + Cannot create a reference group named '{0}' because the name is already being used by an existing reference group, folder or file. + Не удалось создать группу ссылок с именем "{0}", потому что имя уже используется либо существующей группой ссылок, либо каталогом, либо файлом. + + + + Cannot create a reference group with namespace or name with leading or trailing whitespace characters. + Нельзя создать группу ссылок с пространством имен или именем, в начале или конце которого присутствуют пробелы. + + + + The .svcmap file cannot be found. It may have been moved or deleted. To generate a new .svcmap file, delete the service reference and add it again. + Не удалось найти svcmap-файл. Возможно, он перемещен или удален. Чтобы создать новый svcmap-файл, удалите ссылку на службу и добавьте ее снова. + + + + The current project does not support service references. To enable Windows Communication Foundation support, change the target version of the Microsoft .NET Framework. + Данный проект не поддерживает ссылки на службы. Чтобы включить поддержку Windows Communication Foundation, измените заданную версию Microsoft .NET Framework. + + + + The configuration for the service reference could not be deleted due to the following issue: {0} + Конфигурация ссылки на службу не может быть удалена по следующей причине: {0} + + + + The configuration for the service reference could not be updated due to the following issue: {0} + Конфигурацию для ссылки на службу не удалось обновить по следующей причине: {0} + + + + The configuration for the service reference could not be added due to the following issue: {0} + Не удается добавить конфигурацию для ссылки на службу по следующей причине: {0} + + + + Please enter the address for a service. + Введите адрес службы. + + + + An error occurred while attempting to find services at '{0}'. + Произошла ошибка при попытке найти службы на "{0}". + {0} = a URL path + + + An error occurred while searching for services in the solution. + Произошла ошибка при поиске служб в решении. + + + + An error occurred while attempting to start services at '{0}'". + Произошла ошибка при попытке запуска службы на "{0}". + {0} = a URL path + + + Please wait for service information to be downloaded or click Stop. + Подождите, пока не загрузятся данные служб. Для отмены операции нажмите кнопку "Остановить". + + + + Cannot get referenced assemblies from the project system. + Не удается найти сборки, на которые есть ссылки в системе проектов. + + + + The service reference is invalid, because the .svcmap file ('{0}') cannot be found. It may have been moved, deleted or excluded from the project. To generate a new .svcmap file, delete the service reference and add it again. + Ссылка на службу недействительна, ибо не удается найти файл svcmsp ("{0}"). Возможно, он был перемещен, удален или исключен из проекта. Чтобы создать новый svcmap-файл, удалите ссылку на службу и добавьте ее снова. + + + + The service reference is invalid. The .svcmap file ('{0}') cannot be loaded. It may be corrupted or in a bad format: {1} + Ссылка на службу недействительна. Не удается загрузить файл svcmap ("{0}"). Возможно, он поврежден или имеет неверный формат: {1} + + + + (Details) + (Подробности) + This is the text for a link to additional error information. + + + Select a service contract to view its operations. + Чтобы просмотреть операции службы, выберете контракт службы. + This is the message displayed when user selects non-cotract nodes. + + + Service Reference Settings + Настройки ссылок на службы + + + + ( Custom ) + (Настройка) + + + + The assembly '{0}' could not be found. + Не удается найти сборку ''{0}''. + + + + Address should be a valid non-empty URL. + Адрес должен быть действительным не пустым URL. + Error message to display when user enters empty URL in the address change text box + + + {0} service(s) found. + Сервисов найдено: {0} + {0} = count + + + The operation was cancelled. + Операция отменена. + + + + Updating Service Reference '{0}' + Обновление ссылки на службу "{0}" + + + + Service reference update complete. + Обновление ссылки на службу завершено. + + + + Generating service reference client code... + Создание клиентского кода для ссылки на службу... + + + + Generation of service reference client code complete. + Клиентский код для ссылки на службу создан. + + + + Updating service reference '{0}'... + Обновление ссылки на службу "{0}"... + + + + Updating configuration... + Обновление конфигурации... + + + + Configuration update complete. + Обновление конфигурации завершено. + + + + Service reference update was cancelled. + Обновление ссылки на службу отменено. + + + + Service reference update failed. + Произошла ошибка при обновлении ссылки на службу. + + + + Add service reference complete. + Добавление ссылки на службу завершено. + + + + Add service reference failed. + Не удалось добавить ссылку на службу. + + + + Creating new service reference to '{0}'... + Создание ссылки на службу "{0}"... + {0}=URL + + + No assembly is selected. + Сборка не выбрана. + + + + The requested operation is not valid while an asynchronous operation is in progress. + Запрошенная операция не действительная, пока действует асинхронная операция. + + + + Multiple addresses (editable in .svcmap file) + Несколько адресов (изменяются в файле .svcmap) + + + + {0} contract(s) found at address '{1}'. + Найдено {0} контрактов по адресу "{1}". + {0} = count, {1} = URL where the contracts were found + + + Unable to create temporary configuration file for downloading service information. + Не удалось создать файл временной конфигурации, необходимый для загрузки информации о сервисе. + + + + The file is already opened in an incompatible editor. + Файл уже открыт в несовместимом редакторе. + + + + Downloading service information... + Загрузка данных службы... + + + + The current version of the software does not support adding a service reference to an existing service reference group. + Текущая версия ПО не поддерживает добавление ссылки на службу к существующей группе ссылок на службы. + + + + If the service is defined in the current solution, try building the solution and adding the service reference again. + Если служба определена в текущем решении, попробуйте собрать решение и добавить ссылку на службу еще раз. + + + + Mismatching Begin/EndBatch calls. You have called EndBatch more times than BeginBatch. + Нарушена парность вызовов Begin/EndBatch. EndBatch вызывался больше раз, чем BeginBatch. + + + + Failed to generate code for the service reference '{0}'. Please check other error and warning messages for details. + Не удалось создать код для ссылки службы "{0}". Проверьте другие сообщения об ошибках и предупреждениях. + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/WCF.tr.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/WCF.tr.xlf new file mode 100644 index 00000000000..fbd3fadfd4c --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/WCF.tr.xlf @@ -0,0 +1,312 @@ + + + + + + Add Service Reference + Hizmet Başvurusu Ekle + Title for the "Add Service Reference" dialog + + + Unable to find a code generator (CodeDomProvider). + Kod oluşturucusu (CodeDomProvider) bulunamıyor. + + + + Configuration could not be saved. Make sure the configuration file exists and can be edited. + Yapılandırma kaydedilemedi. Yapılandırma dosyasının var olduğundan ve düzenlenebildiğinden emin olun. + + + + The current project does not support configuration files. + Geçerli proje yapılandırma dosyalarını desteklemiyor. + + + + No services found in the solution. + Çözümde herhangi bir hizmet bulunamadı. + + + + There was an error downloading metadata from the address. Please verify that you have entered a valid address. + Adresten meta veri indirilirken bir hata oluştu. Lütfen geçerli bir adres girdiğinizi doğrulayın. + + + + {0} service(s) found at address '{1}'. + {1}' adresinde {0} hizmet bulundu. + {0} = count, {1} = URL where the services were found + + + {0} service(s) found in the solution. + Çözümde {0} hizmet bulundu. + {0} = # of services + + + It is only possible to access the default (ITEMID_ROOT) configuration file. + Yalnızca varsayılan (ITEMID_ROOT) yapılandırma dosyasına erişmek mümkün. + + + + '{0}' is not a valid namespace for the service reference. + '{0}', hizmet başvurusu için geçerli bir ad alanı değil. + + + + Cannot create a service reference with namespace '{0}' because the name is already in use by an existing service reference, folder or file. + '{0}' ad alanı daha önce var olan bir hizmet başvurusu, klasör veya dosya tarafından kullanıldığı için bu adlı bir hizmet başvurusu oluşturulamaz. + + + + Unable to add a new reference. One or more references already exists or the 'Metadata' section is not empty in the .svcmap file. Edit the .svcmap file and clear all the entries from the 'Metadata' section. + Yeni başvuru eklenemiyor. Bir veya daha fazla başvuru zaten var veya .svcmap dosyasındaki 'Metadata' bölümü boş değil. .svcmap dosyasını düzenleyin ve 'Metadata' bölümündeki tüm girdileri temizleyin. + + + + A namespace needs to be specified for this service reference. + Bu hizmet başvurusu için ad alanı belirtilmelidir. + + + + {0}' is not a valid name for a service reference. + '{0}', hizmet başvurusu için geçerli bir ad değil. + + + + Empty string is not a valid name for a reference group. + Boş dize başvuru grubu için geçerli bir ad değildir. + + + + Cannot create a reference group named '{0}' because the name is already being used by an existing reference group, folder or file. + '{0}' adı daha önce var olan bir başvuru grubu, klasör veya dosya tarafından kullanıldığı için bu adlı bir başvuru grubu oluşturulamaz. + + + + Cannot create a reference group with namespace or name with leading or trailing whitespace characters. + Adının başında ya da sonunda boşluk karakterleri olan veya ad alanı içeren bir başvuru grubu oluşturulamaz. + + + + The .svcmap file cannot be found. It may have been moved or deleted. To generate a new .svcmap file, delete the service reference and add it again. + .svcmap dosyası bulunamıyor. Taşınmış veya silinmiş olabilir. Yeni bir .svcmap dosyası oluşturmak için hizmet başvurusunu silin ve yeniden ekleyin. + + + + The current project does not support service references. To enable Windows Communication Foundation support, change the target version of the Microsoft .NET Framework. + Geçerli proje hizmet başvurularını desteklemiyor. Windows Communication Foundation desteğini etkinleştirmek için hedef Microsoft .NET Framework sürümünü değiştirin. + + + + The configuration for the service reference could not be deleted due to the following issue: {0} + Şu sorundan dolayı hizmet başvurusu yapılandırması silinemedi: {0} + + + + The configuration for the service reference could not be updated due to the following issue: {0} + Hizmet başvurusu yapılandırması şu sorun nedeniyle güncelleştirilemedi: {0} + + + + The configuration for the service reference could not be added due to the following issue: {0} + Şu sorundan dolayı hizmet başvurusu yapılandırması eklenemedi: {0} + + + + Please enter the address for a service. + Lütfen hizmetin adresini girin. + + + + An error occurred while attempting to find services at '{0}'. + '{0}' konumunda hizmetleri bulmaya çalışırken bir hata oluştu. + {0} = a URL path + + + An error occurred while searching for services in the solution. + Çözüm içinde hizmetleri ararken bir hata oluştu. + + + + An error occurred while attempting to start services at '{0}'". + '{0}' konumunda hizmetleri başlatmaya çalışırken bir hata oluştu. + {0} = a URL path + + + Please wait for service information to be downloaded or click Stop. + Lütfen hizmet bilgilerinin indirilmesini bekleyin veya Durdur'a tıklayın. + + + + Cannot get referenced assemblies from the project system. + Proje sisteminden başvurulan bütünleştirilmiş kodlar alınamıyor. + + + + The service reference is invalid, because the .svcmap file ('{0}') cannot be found. It may have been moved, deleted or excluded from the project. To generate a new .svcmap file, delete the service reference and add it again. + .svcmap dosyası ('{0}') bulunamadığından hizmet başvurusu geçersiz. Dosya taşınmış, silinmiş veya projeden çıkartılmış olabilir. Yeni bir .svcmap dosyası oluşturmak için hizmet başvurusunu silin ve yeniden ekleyin. + + + + The service reference is invalid. The .svcmap file ('{0}') cannot be loaded. It may be corrupted or in a bad format: {1} + Hizmet başvurusu geçersiz. .svcmap dosyası ('{0}') yüklenemiyor. Bozuk veya biçimi hatalı olabilir: {1} + + + + (Details) + (Ayrıntılar) + This is the text for a link to additional error information. + + + Select a service contract to view its operations. + İşlemlerini görüntülemek için bir hizmet sözleşmesi seçin. + This is the message displayed when user selects non-cotract nodes. + + + Service Reference Settings + Hizmet Başvuru Ayarları + + + + ( Custom ) + (Özel) + + + + The assembly '{0}' could not be found. + '{0}' bütünleştirilmiş kodu bulunamadı. + + + + Address should be a valid non-empty URL. + Adres, boş olmayan geçerli bir URL olmalıdır. + Error message to display when user enters empty URL in the address change text box + + + {0} service(s) found. + {0} hizmet bulundu. + {0} = count + + + The operation was cancelled. + İşlem iptal edildi. + + + + Updating Service Reference '{0}' + '{0}' Hizmet Başvurusu Güncelleştiriliyor + + + + Service reference update complete. + Hizmet başvurusu güncelleştirme tamamlandı. + + + + Generating service reference client code... + Hizmet başvurusu istemci kodu oluşturuluyor... + + + + Generation of service reference client code complete. + Hizmet başvurusu istemci kodu oluşturma tamamlandı. + + + + Updating service reference '{0}'... + '{0}' hizmet başvurusu güncelleştiriliyor... + + + + Updating configuration... + Yapılandırma güncelleştiriliyor... + + + + Configuration update complete. + Yapılandırma güncelleştirmesi tamamlandı. + + + + Service reference update was cancelled. + Hizmet başvurusu güncelleştirme iptal edildi. + + + + Service reference update failed. + Hizmet başvurusu güncelleştirme başarısız oldu. + + + + Add service reference complete. + Hizmet başvurusu ekleme tamamlandı. + + + + Add service reference failed. + Hizmet başvurusu ekleme başarısız. + + + + Creating new service reference to '{0}'... + '{0}' için yeni hizmet başvurusu oluşturuluyor... + {0}=URL + + + No assembly is selected. + Bir bütünleştirilmiş kod seçilmedi. + + + + The requested operation is not valid while an asynchronous operation is in progress. + Asenkron bir işlem yürütülürken istenen işlem geçerli değil. + + + + Multiple addresses (editable in .svcmap file) + Birden çok adres (.svcmap dosyasında düzenlenebilir) + + + + {0} contract(s) found at address '{1}'. + {1}' adresinde {0} sözleşme bulundu. + {0} = count, {1} = URL where the contracts were found + + + Unable to create temporary configuration file for downloading service information. + Hizmet bilgilerini indirmek için geçici yapılandırma dosyası oluşturulamıyor. + + + + The file is already opened in an incompatible editor. + Dosya uyumsuz bir düzenleyicide önceden açılmış. + + + + Downloading service information... + Hizmet bilgileri indiriliyor... + + + + The current version of the software does not support adding a service reference to an existing service reference group. + Yazılımın mevcut sürümü, mevcut hizmet başvuru grubuna bir hizmet başvurusu eklemeyi desteklemiyor. + + + + If the service is defined in the current solution, try building the solution and adding the service reference again. + Hizmet geçerli çözüm içerisinde tanımlıysa çözümü yeniden derlemeyi ve hizmet başvurusunu yeniden eklemeyi deneyin. + + + + Mismatching Begin/EndBatch calls. You have called EndBatch more times than BeginBatch. + Eşleşmeyen Begin/EndBatch çağrıları. EndBatch'i BeginBatch'den daha fazla çağırdınız. + + + + Failed to generate code for the service reference '{0}'. Please check other error and warning messages for details. + '{0}' hizmet başvurusu için kod oluşturulamadı. Ayrıntılar için diğer hata ve uyarı iletilerini kontrol edin. + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/WCF.zh-Hans.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/WCF.zh-Hans.xlf new file mode 100644 index 00000000000..c65c862e469 --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/WCF.zh-Hans.xlf @@ -0,0 +1,312 @@ + + + + + + Add Service Reference + 添加服务引用 + Title for the "Add Service Reference" dialog + + + Unable to find a code generator (CodeDomProvider). + 无法找到代码生成器(CodeDomProvider)。 + + + + Configuration could not be saved. Make sure the configuration file exists and can be edited. + 未能保存配置。请确保配置文件存在且可供编辑。 + + + + The current project does not support configuration files. + 当前项目不支持配置文件。 + + + + No services found in the solution. + 未在解决方案中找到服务。 + + + + There was an error downloading metadata from the address. Please verify that you have entered a valid address. + 从此地址下载元数据时出错。请确认您输入了有效地址。 + + + + {0} service(s) found at address '{1}'. + 在地址“{1}”处找到 {0} 个服务。 + {0} = count, {1} = URL where the services were found + + + {0} service(s) found in the solution. + 在解决方案中找到 {0} 个服务。 + {0} = # of services + + + It is only possible to access the default (ITEMID_ROOT) configuration file. + 只能访问默认的(ITEMID_ROOT)配置文件。 + + + + '{0}' is not a valid namespace for the service reference. + “{0}”不是有效的服务引用命名空间。 + + + + Cannot create a service reference with namespace '{0}' because the name is already in use by an existing service reference, folder or file. + 无法创建命名空间为“{0}”的服务引用,因为此名称已由某个现有服务引用、文件夹或文件使用。 + + + + Unable to add a new reference. One or more references already exists or the 'Metadata' section is not empty in the .svcmap file. Edit the .svcmap file and clear all the entries from the 'Metadata' section. + 无法添加新的引用。在 .svcmap 文件中已经有一个或多个引用,或者“Metadata”部分不为空。请编辑 .svcmap 文件并清除“Metadata”部分中的所有项。 + + + + A namespace needs to be specified for this service reference. + 需要为此服务引用指定命名空间。 + + + + {0}' is not a valid name for a service reference. + “{0}”不是有效的服务引用名称。 + + + + Empty string is not a valid name for a reference group. + 空字符串不能用作引用组的有效名称。 + + + + Cannot create a reference group named '{0}' because the name is already being used by an existing reference group, folder or file. + 无法创建名称为“{0}”的引用组,因为此名称已由某个现有引用组、文件夹或文件使用。 + + + + Cannot create a reference group with namespace or name with leading or trailing whitespace characters. + 无法创建其命名空间或名称带前导或尾随空白字符的引用组。 + + + + The .svcmap file cannot be found. It may have been moved or deleted. To generate a new .svcmap file, delete the service reference and add it again. + 无法找到 .svcmap 文件。它可能已被移动或删除。 若要生成一个新的 .svcmap 文件,请删除此服务引用,然后再次添加它。 + + + + The current project does not support service references. To enable Windows Communication Foundation support, change the target version of the Microsoft .NET Framework. + 当前项目不支持服务引用。若要启用 Windows Communication Foundation 支持,请更改 Microsoft .NET Framework 的目标版本。 + + + + The configuration for the service reference could not be deleted due to the following issue: {0} + 未能删除服务引用的配置,因为存在以下问题: {0} + + + + The configuration for the service reference could not be updated due to the following issue: {0} + 未能更新服务引用的配置,因为存在以下问题: {0} + + + + The configuration for the service reference could not be added due to the following issue: {0} + 未能添加服务引用的配置,因为存在以下问题: {0} + + + + Please enter the address for a service. + 请输入服务的地址。 + + + + An error occurred while attempting to find services at '{0}'. + 尝试在“{0}”处查找服务时出错。 + {0} = a URL path + + + An error occurred while searching for services in the solution. + 尝试在解决方案中搜索服务时出错。 + + + + An error occurred while attempting to start services at '{0}'". + 尝试在“{0}”处启动服务时出错。 + {0} = a URL path + + + Please wait for service information to be downloaded or click Stop. + 正在下载服务信息,请稍候,或者请单击“停止”。 + + + + Cannot get referenced assemblies from the project system. + 无法从项目系统中获取引用的程序集。 + + + + The service reference is invalid, because the .svcmap file ('{0}') cannot be found. It may have been moved, deleted or excluded from the project. To generate a new .svcmap file, delete the service reference and add it again. + 服务引用无效,原因是找不到 .svcmap 文件(“{0}”)。该文件可能已从项目中移动、删除或排除。 若要生成新的 .svcmap 文件,请删除该服务引用,然后再添加它。 + + + + The service reference is invalid. The .svcmap file ('{0}') cannot be loaded. It may be corrupted or in a bad format: {1} + 服务引用无效。无法加载 .svcmap 文件(“{0}”)。该文件可能已损坏或格式不正确: {1} + + + + (Details) + (详细信息) + This is the text for a link to additional error information. + + + Select a service contract to view its operations. + 选择服务协定可查看其操作。 + This is the message displayed when user selects non-cotract nodes. + + + Service Reference Settings + 服务引用设置 + + + + ( Custom ) + (自定义) + + + + The assembly '{0}' could not be found. + 未能找到程序集“{0}”。 + + + + Address should be a valid non-empty URL. + 地址应为有效的非空 URL。 + Error message to display when user enters empty URL in the address change text box + + + {0} service(s) found. + 找到 {0} 个服务。 + {0} = count + + + The operation was cancelled. + 操作被取消。 + + + + Updating Service Reference '{0}' + 正在更新服务引用“{0}” + + + + Service reference update complete. + 服务引用更新完毕。 + + + + Generating service reference client code... + 正在生成服务引用客户端代码... + + + + Generation of service reference client code complete. + 服务引用客户端代码生成完毕。 + + + + Updating service reference '{0}'... + 正在更新服务引用“{0}”... + + + + Updating configuration... + 正在更新配置... + + + + Configuration update complete. + 配置更新完毕。 + + + + Service reference update was cancelled. + 服务引用更新已取消。 + + + + Service reference update failed. + 服务引用更新失败。 + + + + Add service reference complete. + 服务引用添加完毕。 + + + + Add service reference failed. + 服务引用添加失败。 + + + + Creating new service reference to '{0}'... + 正在新建对“{0}”的服务引用... + {0}=URL + + + No assembly is selected. + 未选择任何程序集。 + + + + The requested operation is not valid while an asynchronous operation is in progress. + 异步操作期间,请求的操作无效。 + + + + Multiple addresses (editable in .svcmap file) + 多个地址(可在 .svcmap 文件中编辑) + + + + {0} contract(s) found at address '{1}'. + 在地址“{1}”处找到 {0} 个协定。 + {0} = count, {1} = URL where the contracts were found + + + Unable to create temporary configuration file for downloading service information. + 无法为下载服务信息创建临时配置文件。 + + + + The file is already opened in an incompatible editor. + 已经在不兼容的编辑器中打开了文件。 + + + + Downloading service information... + 正在下载服务信息... + + + + The current version of the software does not support adding a service reference to an existing service reference group. + 软件的当前版本不支持向现有服务引用组中添加服务引用。 + + + + If the service is defined in the current solution, try building the solution and adding the service reference again. + 如果该服务已在当前解决方案中定义,请尝试生成该解决方案,然后再次添加服务引用。 + + + + Mismatching Begin/EndBatch calls. You have called EndBatch more times than BeginBatch. + Begin/EndBatch 调用不匹配。调用 EndBatch 的次数比调用 BeginBatch 的次数多。 + + + + Failed to generate code for the service reference '{0}'. Please check other error and warning messages for details. + 无法生成服务引用“{0}”的代码。 请检查其他错误和警告信息,了解详细信息。 + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/WCF.zh-Hant.xlf b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/WCF.zh-Hant.xlf new file mode 100644 index 00000000000..57b2b4cfaee --- /dev/null +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/Resources/xlf/WCF.zh-Hant.xlf @@ -0,0 +1,312 @@ + + + + + + Add Service Reference + 加入服務參考 + Title for the "Add Service Reference" dialog + + + Unable to find a code generator (CodeDomProvider). + 找不到程式碼產生器 (CodeDomProvider)。 + + + + Configuration could not be saved. Make sure the configuration file exists and can be edited. + 無法儲存組態。請確認組態檔是否存在、是否可編輯。 + + + + The current project does not support configuration files. + 目前的專案不支援組態檔。 + + + + No services found in the solution. + 在方案中找不到服務。 + + + + There was an error downloading metadata from the address. Please verify that you have entered a valid address. + 從這個位址下載中繼資料時發生錯誤。請確認您輸入的是有效的位址。 + + + + {0} service(s) found at address '{1}'. + 在位址 '{1}' 找到 {0} 個服務。 + {0} = count, {1} = URL where the services were found + + + {0} service(s) found in the solution. + 在方案中找到 {0} 個服務。 + {0} = # of services + + + It is only possible to access the default (ITEMID_ROOT) configuration file. + 只能存取預設 (ITEMID_ROOT) 組態檔。 + + + + '{0}' is not a valid namespace for the service reference. + '{0}' 不是服務參考的有效命名空間。 + + + + Cannot create a service reference with namespace '{0}' because the name is already in use by an existing service reference, folder or file. + 無法用命名空間 '{0}' 建立服務參考,因為此名稱已經由現有的參考群組、資料夾或檔案使用。 + + + + Unable to add a new reference. One or more references already exists or the 'Metadata' section is not empty in the .svcmap file. Edit the .svcmap file and clear all the entries from the 'Metadata' section. + 無法加入新的參考。這個 .svcmap 檔案中已經有一或多個參考,或是其中的 'Metadata' 區段不是空的。請編輯這個 .svcmap 檔案,並清除 'Metadata' 區段中的所有項目。 + + + + A namespace needs to be specified for this service reference. + 必須指定此服務參考的命名空間。 + + + + {0}' is not a valid name for a service reference. + {0}' 不是服務參考的有效名稱。 + + + + Empty string is not a valid name for a reference group. + 空字串不是參考群組的有效名稱。 + + + + Cannot create a reference group named '{0}' because the name is already being used by an existing reference group, folder or file. + 無法建立名為 '{0}' 的參考群組,因為此名稱已經由現有的參考群組、資料夾或檔案使用。 + + + + Cannot create a reference group with namespace or name with leading or trailing whitespace characters. + 無法用前端或後端有空白字元的命名空間或名稱建立參考群組。 + + + + The .svcmap file cannot be found. It may have been moved or deleted. To generate a new .svcmap file, delete the service reference and add it again. + 找不到 .svcmap 檔案,可能已經移除或刪除。若要產生新的 .svcmap 檔案,請刪除此服務參考,然後再次將它加入。 + + + + The current project does not support service references. To enable Windows Communication Foundation support, change the target version of the Microsoft .NET Framework. + 目前的專案並不支援服務參考。若要啟用 Windows Communication Foundation 支援,請變更 Microsoft .NET Framework 的目標版本。 + + + + The configuration for the service reference could not be deleted due to the following issue: {0} + 由於有下列問題,所以無法刪除此服務參考的組態: {0} + + + + The configuration for the service reference could not be updated due to the following issue: {0} + 由於有下列問題,所以無法更新此服務參考的組態: {0} + + + + The configuration for the service reference could not be added due to the following issue: {0} + 由於有下列問題,所以無法加入此服務參考的組態: {0} + + + + Please enter the address for a service. + 請輸入服務的位址。 + + + + An error occurred while attempting to find services at '{0}'. + 嘗試在 '{0}' 找出服務時發生錯誤。 + {0} = a URL path + + + An error occurred while searching for services in the solution. + 搜尋方案中的服務時發生錯誤。 + + + + An error occurred while attempting to start services at '{0}'". + 嘗試啟動位於 '{0}' 的服務時發生錯誤。 + {0} = a URL path + + + Please wait for service information to be downloaded or click Stop. + 請等候下載服務資訊,或者按一下 [停止]5D;。 + + + + Cannot get referenced assemblies from the project system. + 無法從專案系統中取得參考的組件。 + + + + The service reference is invalid, because the .svcmap file ('{0}') cannot be found. It may have been moved, deleted or excluded from the project. To generate a new .svcmap file, delete the service reference and add it again. + 該服務參考無效,因為找不到 .svcmap 檔案 ('{0}')。可能已經從專案中移除、刪除或排除該檔案。若要產生新的 .svcmap 檔案,請刪除該服務參考,並再次將其加入。 + + + + The service reference is invalid. The .svcmap file ('{0}') cannot be loaded. It may be corrupted or in a bad format: {1} + 該服務參考無效。無法載入 .svcmap 檔案 ('{0}')。它可能已損毀或是格式錯誤: {1} + + + + (Details) + (詳細資料) + This is the text for a link to additional error information. + + + Select a service contract to view its operations. + 選取要檢視其作業的服務合約。 + This is the message displayed when user selects non-cotract nodes. + + + Service Reference Settings + 服務參考設定 + + + + ( Custom ) + (自訂) + + + + The assembly '{0}' could not be found. + 找不到組件 '{0}'。 + + + + Address should be a valid non-empty URL. + 位址必須是有效、非空白的 URL。 + Error message to display when user enters empty URL in the address change text box + + + {0} service(s) found. + 已找到 {0} 個服務。 + {0} = count + + + The operation was cancelled. + 作業已取消。 + + + + Updating Service Reference '{0}' + 正在更新服務參考 '{0}' + + + + Service reference update complete. + 服務參考的更新完成。 + + + + Generating service reference client code... + 正在產生服務參考的用戶端程式碼... + + + + Generation of service reference client code complete. + 產生服務參考的用戶端程式碼完成。 + + + + Updating service reference '{0}'... + 正在更新服務參考 '{0}'... + + + + Updating configuration... + 正在更新組態... + + + + Configuration update complete. + 組態更新完成。 + + + + Service reference update was cancelled. + 已取消服務參考的更新。 + + + + Service reference update failed. + 服務參考的更新失敗。 + + + + Add service reference complete. + 加入服務參考完成。 + + + + Add service reference failed. + 加入服務參考失敗。 + + + + Creating new service reference to '{0}'... + 正在建立 '{0}' 的新服務參考... + {0}=URL + + + No assembly is selected. + 沒有選取任何組件。 + + + + The requested operation is not valid while an asynchronous operation is in progress. + 當非同步作業進行中時,要求的作業無效。 + + + + Multiple addresses (editable in .svcmap file) + 多重位址 (可在 .svcmap 檔案中編輯) + + + + {0} contract(s) found at address '{1}'. + 在位址 '{1}' 找到 {0} 個合約。 + {0} = count, {1} = URL where the contracts were found + + + Unable to create temporary configuration file for downloading service information. + 無法建立暫存組態檔進行下載服務資訊。 + + + + The file is already opened in an incompatible editor. + 這個檔案已經在不相容的編輯器中開啟。 + + + + Downloading service information... + 正在下載服務資訊... + + + + The current version of the software does not support adding a service reference to an existing service reference group. + 目前的軟體版本不支援將服務參考加入現有的服務參考群組中。 + + + + If the service is defined in the current solution, try building the solution and adding the service reference again. + 如果目前方案中已定義該服務,請重試一次建置方案,並加入服務參考。 + + + + Mismatching Begin/EndBatch calls. You have called EndBatch more times than BeginBatch. + 不相符的 Begin/EndBatch 呼叫。EndBatch 的呼叫次數多於 BeginBatch。 + + + + Failed to generate code for the service reference '{0}'. Please check other error and warning messages for details. + 無法為服務參考 '{0}' 產生程式碼。如需詳細資訊,請檢查其他錯誤與警告訊息。 + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.UIResources/AdvancedOptionsControl.xaml b/vsintegration/src/FSharp.UIResources/AdvancedOptionsControl.xaml new file mode 100644 index 00000000000..7126d6efb8b --- /dev/null +++ b/vsintegration/src/FSharp.UIResources/AdvancedOptionsControl.xaml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/vsintegration/src/FSharp.UIResources/AdvancedOptionsControl.xaml.cs b/vsintegration/src/FSharp.UIResources/AdvancedOptionsControl.xaml.cs new file mode 100644 index 00000000000..571e8905213 --- /dev/null +++ b/vsintegration/src/FSharp.UIResources/AdvancedOptionsControl.xaml.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace Microsoft.VisualStudio.FSharp.UIResources +{ + /// + /// Interaction logic for AdvancedOptionsControl.xaml + /// + public partial class AdvancedOptionsControl : UserControl + { + public AdvancedOptionsControl() + { + InitializeComponent(); + } + } +} diff --git a/vsintegration/src/FSharp.UIResources/CodeFixesOptionControl.xaml b/vsintegration/src/FSharp.UIResources/CodeFixesOptionControl.xaml index d6ba236a1c1..b9e9f428146 100644 --- a/vsintegration/src/FSharp.UIResources/CodeFixesOptionControl.xaml +++ b/vsintegration/src/FSharp.UIResources/CodeFixesOptionControl.xaml @@ -26,6 +26,8 @@ + diff --git a/vsintegration/src/FSharp.UIResources/CodeLensOptionControl.xaml b/vsintegration/src/FSharp.UIResources/CodeLensOptionControl.xaml new file mode 100644 index 00000000000..7e62f575fd6 --- /dev/null +++ b/vsintegration/src/FSharp.UIResources/CodeLensOptionControl.xaml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vsintegration/src/FSharp.UIResources/CodeLensOptionControl.xaml.cs b/vsintegration/src/FSharp.UIResources/CodeLensOptionControl.xaml.cs new file mode 100644 index 00000000000..ad1a0ecf1a1 --- /dev/null +++ b/vsintegration/src/FSharp.UIResources/CodeLensOptionControl.xaml.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace Microsoft.VisualStudio.FSharp.UIResources +{ + /// + /// Interaction logic for CodeLensOptionPage.xaml + /// + internal partial class CodeLensOptionControl : UserControl + { + public CodeLensOptionControl() + { + InitializeComponent(); + } + } +} diff --git a/vsintegration/src/FSharp.UIResources/FSharp.UIResources.csproj b/vsintegration/src/FSharp.UIResources/FSharp.UIResources.csproj index 58e5ef5a823..a5d5df95ee1 100644 --- a/vsintegration/src/FSharp.UIResources/FSharp.UIResources.csproj +++ b/vsintegration/src/FSharp.UIResources/FSharp.UIResources.csproj @@ -1,114 +1,62 @@  - + + - $(MSBuildProjectDirectory)\..\..\..\src - CSharp - 15.4.1.0 - cs - - - Debug - net40 - $(FSharpSourcesRoot)\..\$(Configuration)\$(TargetDotnetProfile)\bin - AnyCPU - {C4586A06-1402-48BC-8E35-A1B8642F895B} Library - Properties + $(NoWarn);1591 + false Microsoft.VisualStudio.FSharp.UIResources - FSharp.UIResources - LIBRARY - true - $(DefineConstants) - v4.6 - true + $(NoWarn);1591 + - - $(FSharpSourcesRoot)\..\loc\lcl\{Lang}\$(AssemblyName).dll.lcl - $(FSharpSourcesRoot)\..\loc\lci\$(AssemblyName).dll.lci - false - false - + + + + + + - + + - - - - - - - + + - - CodeFixesOptionControl.xaml - - - - LanguageServicePerformanceOptionControl.xaml - - - IntelliSenseOptionControl.xaml - - - - QuickInfoOptionControl.xaml - - - - True + + + + + + + + True + True Strings.resx - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - Designer - MSBuild:Compile - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - - + PublicResXFileCodeGenerator Strings.Designer.cs - Designer - - - - - - - - Microsoft - StrongName - - + + + $(VS150COMNTOOLS)\..\..\MSBuild\$(VisualStudioVersion)\Bin + $(VSMSBuildBinDir)\Microsoft.CSharp.targets + + + + + false + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.UIResources/HyperlinkStyles.xaml b/vsintegration/src/FSharp.UIResources/HyperlinkStyles.xaml deleted file mode 100644 index 64826b28de9..00000000000 --- a/vsintegration/src/FSharp.UIResources/HyperlinkStyles.xaml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/vsintegration/src/FSharp.UIResources/IntelliSenseOptionControl.xaml b/vsintegration/src/FSharp.UIResources/IntelliSenseOptionControl.xaml index c214018dc08..dbb7b6bb8fc 100644 --- a/vsintegration/src/FSharp.UIResources/IntelliSenseOptionControl.xaml +++ b/vsintegration/src/FSharp.UIResources/IntelliSenseOptionControl.xaml @@ -7,29 +7,36 @@ xmlns:local="clr-namespace:Microsoft.VisualStudio.FSharp.UIResources" mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="400"> - - - - - - - - - - - - - + + + + + + + + + + + + - - + - - + - - + + + + + + + + + - - + + diff --git a/vsintegration/src/FSharp.UIResources/InternalsVisibleTo.cs b/vsintegration/src/FSharp.UIResources/InternalsVisibleTo.cs deleted file mode 100644 index 3ad48dae990..00000000000 --- a/vsintegration/src/FSharp.UIResources/InternalsVisibleTo.cs +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; - -[assembly: InternalsVisibleTo("VisualFSharp.Salsa, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")] -[assembly: InternalsVisibleTo("VisualFSharp.Unittests, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")] -[assembly: InternalsVisibleTo("FSharp.LanguageService, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")] -[assembly: InternalsVisibleTo("FSharp.ProjectSystem.Base, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")] -[assembly: InternalsVisibleTo("FSharp.ProjectSystem.FSharp, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")] -[assembly: InternalsVisibleTo("FSharp.Editor, PublicKey=002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")] - diff --git a/vsintegration/src/FSharp.UIResources/LanguageServicePerformanceOptionControl.xaml b/vsintegration/src/FSharp.UIResources/LanguageServicePerformanceOptionControl.xaml index eeedf0607bb..e67690250dd 100644 --- a/vsintegration/src/FSharp.UIResources/LanguageServicePerformanceOptionControl.xaml +++ b/vsintegration/src/FSharp.UIResources/LanguageServicePerformanceOptionControl.xaml @@ -17,19 +17,24 @@ - + - + - + - + + + + + + + + + + + diff --git a/vsintegration/src/FSharp.UIResources/NavStyles.xaml b/vsintegration/src/FSharp.UIResources/NavStyles.xaml new file mode 100644 index 00000000000..345ab98a35d --- /dev/null +++ b/vsintegration/src/FSharp.UIResources/NavStyles.xaml @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vsintegration/src/FSharp.UIResources/NavStyles.xaml.cs b/vsintegration/src/FSharp.UIResources/NavStyles.xaml.cs new file mode 100644 index 00000000000..fb81b1f5794 --- /dev/null +++ b/vsintegration/src/FSharp.UIResources/NavStyles.xaml.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace Microsoft.VisualStudio.FSharp.UIResources +{ + /// + /// Interaction logic for NavStyles.xaml + /// + internal partial class NavStyles : UserControl + { + public NavStyles() + { + InitializeComponent(); + } + } +} diff --git a/vsintegration/src/FSharp.UIResources/Properties/AssemblyInfo.cs b/vsintegration/src/FSharp.UIResources/Properties/AssemblyInfo.cs index 18439c74d35..7c13fcd592a 100644 --- a/vsintegration/src/FSharp.UIResources/Properties/AssemblyInfo.cs +++ b/vsintegration/src/FSharp.UIResources/Properties/AssemblyInfo.cs @@ -1,22 +1,7 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -using System; -using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("FSharp.UIResources")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft.VisualFSharpTools")] -[assembly: AssemblyProduct("FSharp.UIResources")] -[assembly: AssemblyCopyright("Copyright (c) Microsoft Corporation.")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. diff --git a/vsintegration/src/FSharp.UIResources/Strings.Designer.cs b/vsintegration/src/FSharp.UIResources/Strings.Designer.cs index ff02acbe6e1..a1afd465942 100644 --- a/vsintegration/src/FSharp.UIResources/Strings.Designer.cs +++ b/vsintegration/src/FSharp.UIResources/Strings.Designer.cs @@ -19,7 +19,7 @@ namespace Microsoft.VisualStudio.FSharp.UIResources { // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] public class Strings { @@ -69,6 +69,15 @@ public static string Always_place_opens_at_top_level { } } + /// + /// Looks up a localized string similar to Block Structure Guides. + /// + public static string Block_Structure { + get { + return ResourceManager.GetString("Block_Structure", resourceCulture); + } + } + /// /// Looks up a localized string similar to Code Fixes. /// @@ -78,6 +87,51 @@ public static string Code_Fixes { } } + /// + /// Looks up a localized string similar to CodeLens. + /// + public static string CodeLens { + get { + return ResourceManager.GetString("CodeLens", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Annotation prefix. + /// + public static string CodeLens_Prefix { + get { + return ResourceManager.GetString("CodeLens_Prefix", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Show annotations to the right instead of above the line. + /// + public static string CodeLens_Replace_LineLens { + get { + return ResourceManager.GetString("CodeLens_Replace_LineLens", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Show type signature annotations in the editor. + /// + public static string CodeLens_Switch { + get { + return ResourceManager.GetString("CodeLens_Switch", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Use colors in annotations. + /// + public static string CodeLens_UseColors { + get { + return ResourceManager.GetString("CodeLens_UseColors", resourceCulture); + } + } + /// /// Looks up a localized string similar to Completion Lists. /// @@ -114,6 +168,60 @@ public static string Enable_in_memory_cross_project_references { } } + /// + /// Looks up a localized string similar to Enable stale data for IntelliSense features. + /// + public static string Enable_Stale_IntelliSense_Results { + get { + return ResourceManager.GetString("Enable_Stale_IntelliSense_Results", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Always add new line on enter. + /// + public static string Enter_key_always { + get { + return ResourceManager.GetString("Enter_key_always", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Never add new line on enter. + /// + public static string Enter_key_never { + get { + return ResourceManager.GetString("Enter_key_never", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Only add new line on enter after end of fully typed word. + /// + public static string Enter_key_only { + get { + return ResourceManager.GetString("Enter_key_only", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Enter key behavior. + /// + public static string Enter_Key_Rule { + get { + return ResourceManager.GetString("Enter_Key_Rule", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to IntelliSense Performance Options. + /// + public static string IntelliSense_Performance { + get { + return ResourceManager.GetString("IntelliSense_Performance", resourceCulture); + } + } + /// /// Looks up a localized string similar to Performance. /// @@ -133,7 +241,16 @@ public static string Navigation_links { } /// - /// Looks up a localized string similar to Project check cache size. + /// Looks up a localized string similar to Outlining. + /// + public static string Outlining { + get { + return ResourceManager.GetString("Outlining", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Number of projects whose data is cached in memory. /// public static string Project_check_cache_size { get { @@ -141,6 +258,15 @@ public static string Project_check_cache_size { } } + /// + /// Looks up a localized string similar to F# Project and Caching Performance Options. + /// + public static string Project_Performance { + get { + return ResourceManager.GetString("Project_Performance", resourceCulture); + } + } + /// /// Looks up a localized string similar to Show s_ymbols in unopened namespaces. /// @@ -168,6 +294,15 @@ public static string Show_completion_list_after_a_character_is_typed { } } + /// + /// Looks up a localized string similar to Show structure guidelines for F# code. + /// + public static string Show_guides { + get { + return ResourceManager.GetString("Show_guides", resourceCulture); + } + } + /// /// Looks up a localized string similar to S_how navigation links as. /// @@ -177,6 +312,15 @@ public static string Show_navigation_links_as { } } + /// + /// Looks up a localized string similar to Show outlining and collapsible nodes for F# code. + /// + public static string Show_Outlining { + get { + return ResourceManager.GetString("Show_Outlining", resourceCulture); + } + } + /// /// Looks up a localized string similar to Simplify names (remove unnecessary qualifiers). /// @@ -195,6 +339,42 @@ public static string Solid_underline { } } + /// + /// Looks up a localized string similar to Time until stale results are used (in milliseconds). + /// + public static string Time_until_stale_completion { + get { + return ResourceManager.GetString("Time_until_stale_completion", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to In-memory cross-project references store project-level data in memory to allow IDE features to work across projects.. + /// + public static string Tooltip_in_memory_cross_project_references { + get { + return ResourceManager.GetString("Tooltip_in_memory_cross_project_references", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Project data is cached for IDE features. Higher values use more memory because more projects are cached. Tuning this value should not affect small or medium-sized solutions.. + /// + public static string Tooltip_project_check_cache_size { + get { + return ResourceManager.GetString("Tooltip_project_check_cache_size", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Analyze and suggest fixes for unused values. + /// + public static string Unused_declaration_code_fix { + get { + return ResourceManager.GetString("Unused_declaration_code_fix", resourceCulture); + } + } + /// /// Looks up a localized string similar to Remove unused open statements. /// diff --git a/vsintegration/src/FSharp.UIResources/Strings.resx b/vsintegration/src/FSharp.UIResources/Strings.resx index 4500bfcc71f..a10b4454580 100644 --- a/vsintegration/src/FSharp.UIResources/Strings.resx +++ b/vsintegration/src/FSharp.UIResources/Strings.resx @@ -120,6 +120,21 @@ Always place open statements at the top level + + CodeLens + + + Show annotations to the right instead of above the line + + + Enable CodeLens (Experimental) + + + Annotation prefix + + + Use colors in annotations + Code Fixes @@ -151,7 +166,7 @@ _Enable in-memory cross project references - Project check cache size + Number of projects whose data is cached in memory S_how navigation links as @@ -165,4 +180,49 @@ Remove unused open statements + + Analyze and suggest fixes for unused values + + + Block Structure Guides + + + Show structure guidelines for F# code + + + Outlining + + + Show outlining and collapsible nodes for F# code + + + Time until stale results are used (in milliseconds) + + + IntelliSense Performance Options + + + F# Project and Caching Performance Options + + + Enable stale data for IntelliSense features + + + In-memory cross-project references store project-level data in memory to allow IDE features to work across projects. + + + Project data is cached for IDE features. Higher values use more memory because more projects are cached. Tuning this value should not affect small or medium-sized solutions. + + + Always add new line on enter + + + Never add new line on enter + + + Only add new line on enter after end of fully typed word + + + Enter key behavior + \ No newline at end of file diff --git a/vsintegration/src/FSharp.UIResources/xlf/Strings.cs.xlf b/vsintegration/src/FSharp.UIResources/xlf/Strings.cs.xlf new file mode 100644 index 00000000000..239e9000005 --- /dev/null +++ b/vsintegration/src/FSharp.UIResources/xlf/Strings.cs.xlf @@ -0,0 +1,187 @@ + + + + + + Always place open statements at the top level + Vždy umístit otevřené příkazy na nejvyšší úroveň + + + + CodeLens + CodeLens + + + + Show annotations to the right instead of above the line + Zobrazí poznámky napravo místo nad řádkem. + + + + Enable CodeLens (Experimental) + Povolit funkci CodeLens (experimentální) + + + + Annotation prefix + Předpona poznámky + + + + Use colors in annotations + Použít barvy v poznámkách + + + + Code Fixes + Opravy kódu + + + + Completion Lists + Seznamy dokončení + + + + Performance + Výkon + + + + D_ash underline + Čá_rkované podtržení + + + + D_ot underline + _Tečkované podtržení + + + + Navigation links + Navigační odkazy + + + + Show s_ymbols in unopened namespaces + Zobrazit s_ymboly v neotevřených oborech názvů + + + + Show completion list after a character is _deleted + Zobrazovat seznam dokončení po _odstranění znaku + + + + _Show completion list after a character is typed + _Zobrazovat seznam dokončení po zadání znaku + + + + _Enable in-memory cross project references + _Povolit odkazy mezi projekty v paměti + + + + Number of projects whose data is cached in memory + Počet projektů, jejichž data jsou uložená v mezipaměti + + + + S_how navigation links as + Zo_brazit navigační odkazy jako + + + + Simplify names (remove unnecessary qualifiers) + Zjednodušit názvy (odebrat nepotřebné kvalifikátory) + + + + _Solid underline + _Plné podtržení + + + + Remove unused open statements + Odebrat nepoužívané otevřené výkazy + + + + Analyze and suggest fixes for unused values + Analyzovat a navrhovat opravy pro nepoužité hodnoty + + + + Block Structure Guides + Vodítka pro strukturu bloku + + + + Show structure guidelines for F# code + Zobrazí pokyny pro strukturu kódu F#. + + + + Outlining + Sbalení + + + + Show outlining and collapsible nodes for F# code + Zobrazí osnovu a sbalitelné uzly kódu F#. + + + + Time until stale results are used (in milliseconds) + Doba, do kdy se budou používat zastaralé výsledky (v milisekundách) + + + + IntelliSense Performance Options + Možnosti výkonu pro IntelliSense + + + + F# Project and Caching Performance Options + Možnosti výkonu pro ukládání do mezipaměti a projekt F# + + + + Enable stale data for IntelliSense features + Povolit zastaralá data pro funkce IntelliSense + + + + In-memory cross-project references store project-level data in memory to allow IDE features to work across projects. + V odkazech v paměti pro různé projekty jsou uložená data na úrovni projektů, aby mohly mezi projekty fungovat funkce IDE. + + + + Project data is cached for IDE features. Higher values use more memory because more projects are cached. Tuning this value should not affect small or medium-sized solutions. + Projektová data jsou uložená v mezipaměti pro funkce IDE. Vyšší hodnoty znamenají využití více paměti, protože je uloženo více projektů. Vyladění této hodnoty by nemělo mít vliv na malá a středně velká řešení. + + + + Always add new line on enter + Always add new line on enter + + + + Never add new line on enter + Never add new line on enter + + + + Only add new line on enter after end of fully typed word + Only add new line on enter after end of fully typed word + + + + Enter key behavior + Enter key behavior + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.UIResources/xlf/Strings.de.xlf b/vsintegration/src/FSharp.UIResources/xlf/Strings.de.xlf new file mode 100644 index 00000000000..4bd995642a6 --- /dev/null +++ b/vsintegration/src/FSharp.UIResources/xlf/Strings.de.xlf @@ -0,0 +1,187 @@ + + + + + + Always place open statements at the top level + open-Anweisungen immer an oberster Ebene platzieren + + + + CodeLens + CodeLens + + + + Show annotations to the right instead of above the line + Anmerkungen nicht oberhalb der Zeile, sondern rechts neben der Zeile anzeigen + + + + Enable CodeLens (Experimental) + CodeLens aktivieren (experimentell) + + + + Annotation prefix + Anmerkungspräfix + + + + Use colors in annotations + Farben in Anmerkungen verwenden + + + + Code Fixes + Codefehlerbehebungen + + + + Completion Lists + Vervollständigungslisten + + + + Performance + Leistung + + + + D_ash underline + Ge_strichelte Unterstreichung + + + + D_ot underline + Ge_punktete Unterstreichung + + + + Navigation links + Navigationslinks + + + + Show s_ymbols in unopened namespaces + S_ymbole in nicht geöffneten Namespaces anzeigen + + + + Show completion list after a character is _deleted + Vervollstän_digungsliste nach Löschen eines Zeichens anzeigen + + + + _Show completion list after a character is typed + _Vervoll­ständigungsliste nach Eingabe eines Zeichens anzeigen + + + + _Enable in-memory cross project references + Proj_ektübergreifende Verweise im Arbeitsspeicher aktivieren + + + + Number of projects whose data is cached in memory + Anzahl von Projekten, deren Daten im Arbeitsspeicher zwischengespeichert werden + + + + S_how navigation links as + Navigationslink_s anzeigen als + + + + Simplify names (remove unnecessary qualifiers) + Namen vereinfachen (unnötige Qualifizierer entfernen) + + + + _Solid underline + _Durchgezogene Unterstreichung + + + + Remove unused open statements + Nicht verwendete "open"-Anweisungen entfernen + + + + Analyze and suggest fixes for unused values + Korrekturen für nicht verwendete Werte analysieren und vorschlagen + + + + Block Structure Guides + Führungslinien für Blockstruktur + + + + Show structure guidelines for F# code + Strukturführungslinien für F#-Code anzeigen + + + + Outlining + Gliederung + + + + Show outlining and collapsible nodes for F# code + Gliederung und ausblendbare Knoten für F#-Code anzeigen + + + + Time until stale results are used (in milliseconds) + Zeit bis zur Verwendung veralteter Ergebnisse (in Millisekunden) + + + + IntelliSense Performance Options + Optionen zur IntelliSense-Leistung + + + + F# Project and Caching Performance Options + Optionen zur F#-Projekt- und Cacheleistung + + + + Enable stale data for IntelliSense features + Veraltete Daten für IntelliSense-Features aktivieren + + + + In-memory cross-project references store project-level data in memory to allow IDE features to work across projects. + Bei projektübergreifenden In-Memory-Verweisen werden Daten auf Projektebene im Arbeitsspeicher abgelegt, damit IDE-Features projektübergreifend verwendet werden können. + + + + Project data is cached for IDE features. Higher values use more memory because more projects are cached. Tuning this value should not affect small or medium-sized solutions. + Für IDE-Features werden Projektdaten zwischengespeichert. Bei höheren Werten wird mehr Arbeitsspeicher beansprucht, weil mehr Projekte zwischengespeichert werden. Die Optimierung dieses Werts besitzt keine Auswirkungen auf kleine oder mittelgroße Projektmappen. + + + + Always add new line on enter + Always add new line on enter + + + + Never add new line on enter + Never add new line on enter + + + + Only add new line on enter after end of fully typed word + Only add new line on enter after end of fully typed word + + + + Enter key behavior + Enter key behavior + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.UIResources/xlf/Strings.en.xlf b/vsintegration/src/FSharp.UIResources/xlf/Strings.en.xlf new file mode 100644 index 00000000000..9c5b33763c9 --- /dev/null +++ b/vsintegration/src/FSharp.UIResources/xlf/Strings.en.xlf @@ -0,0 +1,187 @@ + + + + + + Always place open statements at the top level + Always place open statements at the top level + + + + CodeLens + CodeLens + + + + Show annotations to the right instead of above the line + Show annotations to the right instead of above the line + + + + Enable CodeLens (Experimental) + Enable CodeLens (Experimental) + + + + Annotation prefix + Annotation prefix + + + + Use colors in annotations + Use colors in annotations + + + + Code Fixes + Code Fixes + + + + Completion Lists + Completion Lists + + + + Performance + Performance + + + + D_ash underline + D_ash underline + + + + D_ot underline + D_ot underline + + + + Navigation links + Navigation links + + + + Show s_ymbols in unopened namespaces + Show s_ymbols in unopened namespaces + + + + Show completion list after a character is _deleted + Show completion list after a character is _deleted + + + + _Show completion list after a character is typed + _Show completion list after a character is typed + + + + _Enable in-memory cross project references + _Enable in-memory cross project references + + + + Number of projects whose data is cached in memory + Number of projects whose data is cached in memory + + + + S_how navigation links as + S_how navigation links as + + + + Simplify names (remove unnecessary qualifiers) + Simplify names (remove unnecessary qualifiers) + + + + _Solid underline + _Solid underline + + + + Remove unused open statements + Remove unused open statements + + + + Analyze and suggest fixes for unused values + Analyze and suggest fixes for unused values + + + + Block Structure Guides + Block Structure Guides + + + + Show structure guidelines for F# code + Show structure guidelines for F# code + + + + Outlining + Outlining + + + + Show outlining and collapsible nodes for F# code + Show outlining and collapsible nodes for F# code + + + + Time until stale results are used (in milliseconds) + Time until stale results are used (in milliseconds) + + + + IntelliSense Performance Options + IntelliSense Performance Options + + + + F# Project and Caching Performance Options + F# Project and Caching Performance Options + + + + Enable stale data for IntelliSense features + Enable stale data for IntelliSense features + + + + In-memory cross-project references store project-level data in memory to allow IDE features to work across projects. + In-memory cross-project references store project-level data in memory to allow IDE features to work across projects. + + + + Project data is cached for IDE features. Higher values use more memory because more projects are cached. Tuning this value should not affect small or medium-sized solutions. + Project data is cached for IDE features. Higher values use more memory because more projects are cached. Tuning this value should not affect small or medium-sized solutions. + + + + Always add new line on enter + Always add new line on enter + + + + Never add new line on enter + Never add new line on enter + + + + Only add new line on enter after end of fully typed word + Only add new line on enter after end of fully typed word + + + + Enter key behavior + Enter key behavior + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.UIResources/xlf/Strings.es.xlf b/vsintegration/src/FSharp.UIResources/xlf/Strings.es.xlf new file mode 100644 index 00000000000..545ceb9b15b --- /dev/null +++ b/vsintegration/src/FSharp.UIResources/xlf/Strings.es.xlf @@ -0,0 +1,187 @@ + + + + + + Always place open statements at the top level + Colocar siempre las instrucciones open en el nivel superior + + + + CodeLens + CodeLens + + + + Show annotations to the right instead of above the line + Mostrar anotaciones a la derecha en lugar de encima de la línea + + + + Enable CodeLens (Experimental) + Habilitar CodeLens (experimental) + + + + Annotation prefix + Prefijo de anotación + + + + Use colors in annotations + Usar colores en anotaciones + + + + Code Fixes + Correcciones de código + + + + Completion Lists + Listas de finalización + + + + Performance + Rendimiento + + + + D_ash underline + _Subrayado guion + + + + D_ot underline + S_ubrayado punto + + + + Navigation links + Vínculos de navegación + + + + Show s_ymbols in unopened namespaces + Mostrar sím_bolos en espacios de nombres sin abrir + + + + Show completion list after a character is _deleted + Mostrar lista de finalización después de _eliminar un carácter + + + + _Show completion list after a character is typed + _Mostrar la lista de finalización después de escribir un carácter + + + + _Enable in-memory cross project references + _Habilitar referencias entre proyectos en memoria + + + + Number of projects whose data is cached in memory + Número de proyectos cuyos datos se almacenan en la memoria caché + + + + S_how navigation links as + M_ostrar vínculos de navegación como + + + + Simplify names (remove unnecessary qualifiers) + Simplificar nombres (quitar calificadores innecesarios) + + + + _Solid underline + Su_brayado sólido + + + + Remove unused open statements + Quitar instrucciones open no usadas + + + + Analyze and suggest fixes for unused values + Analizar y sugerir correcciones para valores no utilizados + + + + Block Structure Guides + Guías de estructura de bloque + + + + Show structure guidelines for F# code + Mostrar las guías de la estructura del código F# + + + + Outlining + Esquematización + + + + Show outlining and collapsible nodes for F# code + Mostrar los nodos de esquematización y contraíbles del código de F# + + + + Time until stale results are used (in milliseconds) + Tiempo hasta que se utilizan los resultados obsoletos (en milisegundos) + + + + IntelliSense Performance Options + Opciones de rendimiento de IntelliSense + + + + F# Project and Caching Performance Options + Opciones de rendimiento de almacenamiento en caché y proyectos de F# + + + + Enable stale data for IntelliSense features + Habilitar datos obsoletos para características de IntelliSense + + + + In-memory cross-project references store project-level data in memory to allow IDE features to work across projects. + Las referencias en memoria entre proyectos almacenan los datos de nivel de proyecto en memoria para permitir que las características del IDE funcionen de unos proyectos a otros. + + + + Project data is cached for IDE features. Higher values use more memory because more projects are cached. Tuning this value should not affect small or medium-sized solutions. + Los datos de proyecto se almacenan en caché para que funcionen las características del IDE. Los valores más altos utilizan más memoria porque se almacenan en caché más proyectos. El ajuste de este valor no debería afectar a soluciones de tamaño pequeño o medio. + + + + Always add new line on enter + Always add new line on enter + + + + Never add new line on enter + Never add new line on enter + + + + Only add new line on enter after end of fully typed word + Only add new line on enter after end of fully typed word + + + + Enter key behavior + Enter key behavior + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.UIResources/xlf/Strings.fr.xlf b/vsintegration/src/FSharp.UIResources/xlf/Strings.fr.xlf new file mode 100644 index 00000000000..dea1037b7b3 --- /dev/null +++ b/vsintegration/src/FSharp.UIResources/xlf/Strings.fr.xlf @@ -0,0 +1,187 @@ + + + + + + Always place open statements at the top level + Placer toujours les instructions open au niveau supérieur + + + + CodeLens + CodeLens + + + + Show annotations to the right instead of above the line + Afficher les annotations à droite plutôt qu'au-dessus de la ligne + + + + Enable CodeLens (Experimental) + Activer CodeLens (expérimental) + + + + Annotation prefix + Préfixe d'annotation + + + + Use colors in annotations + Utiliser des couleurs dans les annotations + + + + Code Fixes + Correctifs du code + + + + Completion Lists + Listes de saisie semi-automatique + + + + Performance + Performances + + + + D_ash underline + So_ulignement avec des tirets + + + + D_ot underline + S_oulignement avec des points + + + + Navigation links + Liens de navigation + + + + Show s_ymbols in unopened namespaces + Afficher les sym_boles dans les espaces de noms non ouverts + + + + Show completion list after a character is _deleted + Afficher la liste de saisie semi-automatique après la suppression d'un _caractère + + + + _Show completion list after a character is typed + _Afficher la liste de saisie semi-automatique après la saisie d'un caractère + + + + _Enable in-memory cross project references + _Activer les références de projet croisé en mémoire + + + + Number of projects whose data is cached in memory + Nombre de projets dont les données sont mises en cache dans la mémoire + + + + S_how navigation links as + Affic_her les liens de navigation en tant que + + + + Simplify names (remove unnecessary qualifiers) + Simplifier les noms (supprimer les qualificateurs inutiles) + + + + _Solid underline + Soulig_nement avec un trait uni + + + + Remove unused open statements + Supprimer les instructions open inutilisées + + + + Analyze and suggest fixes for unused values + Analyser et proposer des solutions pour les valeurs inutilisées + + + + Block Structure Guides + Repères de structure de bloc + + + + Show structure guidelines for F# code + Afficher les directives de structure pour le code F# + + + + Outlining + Mode plan + + + + Show outlining and collapsible nodes for F# code + Afficher les nœuds de plan ou réductibles pour le code F# + + + + Time until stale results are used (in milliseconds) + Délai avant l'utilisation des résultats périmés (en millisecondes) + + + + IntelliSense Performance Options + Options relatives aux performances d'IntelliSense + + + + F# Project and Caching Performance Options + Options relatives aux performances de la mise en cache et des projets F# + + + + Enable stale data for IntelliSense features + Activer les données périmées pour les fonctionnalités IntelliSense + + + + In-memory cross-project references store project-level data in memory to allow IDE features to work across projects. + Les références inter-projets en mémoire stockent les données de niveau projet dans la mémoire pour permettre aux fonctionnalités de l'IDE de fonctionner sur plusieurs projets. + + + + Project data is cached for IDE features. Higher values use more memory because more projects are cached. Tuning this value should not affect small or medium-sized solutions. + Les données de projet sont mises en cache pour les fonctionnalités de l'IDE. Les valeurs plus élevées utilisent plus de mémoire, car davantage de projets sont mis en cache. L'ajustement de cette valeur ne devrait pas affecter les petites ou moyennes solutions. + + + + Always add new line on enter + Always add new line on enter + + + + Never add new line on enter + Never add new line on enter + + + + Only add new line on enter after end of fully typed word + Only add new line on enter after end of fully typed word + + + + Enter key behavior + Enter key behavior + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.UIResources/xlf/Strings.it.xlf b/vsintegration/src/FSharp.UIResources/xlf/Strings.it.xlf new file mode 100644 index 00000000000..22ed85d58f7 --- /dev/null +++ b/vsintegration/src/FSharp.UIResources/xlf/Strings.it.xlf @@ -0,0 +1,187 @@ + + + + + + Always place open statements at the top level + Inserisci sempre le istruzioni OPEN al primo livello + + + + CodeLens + CodeLens + + + + Show annotations to the right instead of above the line + Mostra le annotazioni a destra anziché sopra la riga + + + + Enable CodeLens (Experimental) + Abilita CodeLens (sperimentale) + + + + Annotation prefix + Prefisso annotazione + + + + Use colors in annotations + Usa colori nelle annotazioni + + + + Code Fixes + Correzioni del codice + + + + Completion Lists + Elenchi di completamento + + + + Performance + Prestazioni + + + + D_ash underline + Sottolineatura _tratteggiata + + + + D_ot underline + Sottolineatura _punteggiata + + + + Navigation links + Collegamenti di navigazione + + + + Show s_ymbols in unopened namespaces + Mostra si_mboli in spazi dei nomi non aperti + + + + Show completion list after a character is _deleted + Mostra _elenco di completamento dopo l'eliminazione di un carattere + + + + _Show completion list after a character is typed + Mo_stra elenco di completamento dopo la digitazione di un carattere + + + + _Enable in-memory cross project references + _Abilita i riferimenti tra progetti in memoria + + + + Number of projects whose data is cached in memory + Numero di progetti i cui dati sono disponibili nella cache in memoria + + + + S_how navigation links as + M_ostra collegamenti di navigazione come + + + + Simplify names (remove unnecessary qualifiers) + Semplifica nomi (rimuovi qualificatori non necessari) + + + + _Solid underline + Sottolineatura _continua + + + + Remove unused open statements + Rimuovi istruzioni OPEN inutilizzate + + + + Analyze and suggest fixes for unused values + Analizza e suggerisci correzioni per valori inutilizzati + + + + Block Structure Guides + Guide per strutture a blocchi + + + + Show structure guidelines for F# code + Mostra le linee guida della struttura per il codice F# + + + + Outlining + Struttura + + + + Show outlining and collapsible nodes for F# code + Mostra i nodi struttura e comprimibili per il codice F# + + + + Time until stale results are used (in milliseconds) + Intervallo di utilizzo dei risultati non aggiornati (in millisecondi) + + + + IntelliSense Performance Options + Opzioni per le prestazioni IntelliSense + + + + F# Project and Caching Performance Options + Opzioni per le prestazioni di memorizzazione nella cache e progetti F# + + + + Enable stale data for IntelliSense features + Abilita dati non aggiornati per le funzionalità IntelliSense + + + + In-memory cross-project references store project-level data in memory to allow IDE features to work across projects. + I riferimenti tra progetti in memoria consentono di archiviare in memoria i dati a livello di progetto per consentire l'uso di funzionalità IDE tra progetti. + + + + Project data is cached for IDE features. Higher values use more memory because more projects are cached. Tuning this value should not affect small or medium-sized solutions. + I dati del progetto sono memorizzati nella cache per le funzionalità IDE. Con valori più elevati viene usata una maggiore quantità di memoria perché nella cache viene memorizzato un numero maggiore di progetti. La disattivazione di questo valore non dovrebbe influire su soluzioni di piccole e medie dimensioni. + + + + Always add new line on enter + Always add new line on enter + + + + Never add new line on enter + Never add new line on enter + + + + Only add new line on enter after end of fully typed word + Only add new line on enter after end of fully typed word + + + + Enter key behavior + Enter key behavior + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.UIResources/xlf/Strings.ja.xlf b/vsintegration/src/FSharp.UIResources/xlf/Strings.ja.xlf new file mode 100644 index 00000000000..4230bb7e5ba --- /dev/null +++ b/vsintegration/src/FSharp.UIResources/xlf/Strings.ja.xlf @@ -0,0 +1,187 @@ + + + + + + Always place open statements at the top level + Open ステートメントを常に最上位に配置する + + + + CodeLens + CodeLens + + + + Show annotations to the right instead of above the line + 注釈を行の上ではなく右に表示する + + + + Enable CodeLens (Experimental) + CodeLens を有効にする (試験段階) + + + + Annotation prefix + 注釈のプレフィックス + + + + Use colors in annotations + 注釈でカラーを使用する + + + + Code Fixes + コード修正 + + + + Completion Lists + 入力候補一覧 + + + + Performance + パフォーマンス + + + + D_ash underline + 破線の下線(_A) + + + + D_ot underline + 点線の下線(_O) + + + + Navigation links + ナビゲーション リンク + + + + Show s_ymbols in unopened namespaces + 開かれていない名前空間の記号を表示する(_Y) + + + + Show completion list after a character is _deleted + 文字が削除された後に入力候補一覧を表示する(_D) + + + + _Show completion list after a character is typed + 文字が入力された後に入力候補一覧を表示する(_S) + + + + _Enable in-memory cross project references + メモリ内のプロジェクト間参照を有効にする(_E) + + + + Number of projects whose data is cached in memory + データがメモリ内にキャッシュされているプロジェクトの数 + + + + S_how navigation links as + 次としてナビゲーション リンクを表示する(_H) + + + + Simplify names (remove unnecessary qualifiers) + 名前の簡略化する (不要な修飾子の削除) + + + + _Solid underline + 実線の下線(_S) + + + + Remove unused open statements + 未使用の Open ステートメントを削除する + + + + Analyze and suggest fixes for unused values + 未使用の値を分析して修正を提案する + + + + Block Structure Guides + ブロック構造のガイド + + + + Show structure guidelines for F# code + F# コードの構造のガイドラインを表示する + + + + Outlining + アウトライン + + + + Show outlining and collapsible nodes for F# code + F# コードのアウトラインおよび折りたたみ可能なノードを表示する + + + + Time until stale results are used (in milliseconds) + 古い結果が使用されるまでの時間 (ミリ秒) + + + + IntelliSense Performance Options + IntelliSense のパフォーマンス オプション + + + + F# Project and Caching Performance Options + F# プロジェクトとキャッシュのパフォーマンス オプション + + + + Enable stale data for IntelliSense features + IntelliSense 機能に対して古いデータを有効にする + + + + In-memory cross-project references store project-level data in memory to allow IDE features to work across projects. + メモリ内のプロジェクト間参照に、プロジェクトをまたいで IDE 機能を動作可能にするプロジェクト レベルのデータが格納されます。 + + + + Project data is cached for IDE features. Higher values use more memory because more projects are cached. Tuning this value should not affect small or medium-sized solutions. + IDE 機能のためにプロジェクト データがキャッシュされます。値を高くすると、キャッシュされるプロジェクトが多くなるため、メモリ使用量が増えます。この値の調整は、小規模または中規模のソリューションに影響しません。 + + + + Always add new line on enter + Always add new line on enter + + + + Never add new line on enter + Never add new line on enter + + + + Only add new line on enter after end of fully typed word + Only add new line on enter after end of fully typed word + + + + Enter key behavior + Enter key behavior + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.UIResources/xlf/Strings.ko.xlf b/vsintegration/src/FSharp.UIResources/xlf/Strings.ko.xlf new file mode 100644 index 00000000000..9429a1d42ab --- /dev/null +++ b/vsintegration/src/FSharp.UIResources/xlf/Strings.ko.xlf @@ -0,0 +1,187 @@ + + + + + + Always place open statements at the top level + 항상 최상위에 open 문 배치 + + + + CodeLens + CodeLens + + + + Show annotations to the right instead of above the line + 선 위가 아니라 오른쪽에 주석 표시 + + + + Enable CodeLens (Experimental) + CodeLens 사용(실험적) + + + + Annotation prefix + 주석 접두사 + + + + Use colors in annotations + 주석에서 색 사용 + + + + Code Fixes + 코드 수정 사항 + + + + Completion Lists + 완성 목록 + + + + Performance + 성능 + + + + D_ash underline + 대시 밑줄(_A) + + + + D_ot underline + 점 밑줄(_O) + + + + Navigation links + 탐색 링크 + + + + Show s_ymbols in unopened namespaces + 열려 있지 않은 네임스페이스에 기호 표시(_Y) + + + + Show completion list after a character is _deleted + 문자를 삭제하면 완성 목록 표시(_D) + + + + _Show completion list after a character is typed + 문자를 입력하면 완성 목록 표시(_S) + + + + _Enable in-memory cross project references + 메모리 내 크로스 프로젝트 참조 사용(_E) + + + + Number of projects whose data is cached in memory + 메모리에 데이터가 캐시된 프로젝트 수 + + + + S_how navigation links as + 탐색 링크를 다음으로 표시(_H) + + + + Simplify names (remove unnecessary qualifiers) + 이름 단순화(불필요한 한정자 제거) + + + + _Solid underline + 실선 밑줄(_S) + + + + Remove unused open statements + 사용되지 않는 open 문 제거 + + + + Analyze and suggest fixes for unused values + 사용되지 않는 값에 대해 수정 사항 분석 및 제안 + + + + Block Structure Guides + 블록 구조 가이드 + + + + Show structure guidelines for F# code + F# 코드에 대한 구조체 지침 표시 + + + + Outlining + 개요 + + + + Show outlining and collapsible nodes for F# code + F# 코드에 대한 개요 및 축소 가능한 노드 표시 + + + + Time until stale results are used (in milliseconds) + 부실 결과가 사용될 때까지 시간(밀리초) + + + + IntelliSense Performance Options + IntelliSense 성능 옵션 + + + + F# Project and Caching Performance Options + F# 프로젝트 및 캐싱 성능 옵션 + + + + Enable stale data for IntelliSense features + IntelliSense 기능에 대해 부실 데이터 사용 + + + + In-memory cross-project references store project-level data in memory to allow IDE features to work across projects. + 메모리 내 크로스 프로젝트 참조가 메모리에 프로젝트 수준 데이터를 저장하여 IDE 기능이 프로젝트에서 작동하도록 합니다. + + + + Project data is cached for IDE features. Higher values use more memory because more projects are cached. Tuning this value should not affect small or medium-sized solutions. + 프로젝트 데이터가 IDE 기능에 대해 캐시됩니다. 값이 클수록 프로제트가 더 많이 캐시되므로 메모리를 더 많이 사용합니다. 이 값을 조정해도 중소 규모 솔루션에 영향을 미치지 않습니다. + + + + Always add new line on enter + Always add new line on enter + + + + Never add new line on enter + Never add new line on enter + + + + Only add new line on enter after end of fully typed word + Only add new line on enter after end of fully typed word + + + + Enter key behavior + Enter key behavior + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.UIResources/xlf/Strings.pl.xlf b/vsintegration/src/FSharp.UIResources/xlf/Strings.pl.xlf new file mode 100644 index 00000000000..41c64aebd31 --- /dev/null +++ b/vsintegration/src/FSharp.UIResources/xlf/Strings.pl.xlf @@ -0,0 +1,187 @@ + + + + + + Always place open statements at the top level + Zawsze umieszczaj otwarte instrukcje na najwyższym poziomie + + + + CodeLens + CodeLens + + + + Show annotations to the right instead of above the line + Pokaż adnotacje po prawej, a nie ponad wierszem + + + + Enable CodeLens (Experimental) + Włącz funkcję CodeLens (eksperymentalna) + + + + Annotation prefix + Prefiks adnotacji + + + + Use colors in annotations + Stosuj kolory w adnotacjach + + + + Code Fixes + Poprawki kodu + + + + Completion Lists + Listy uzupełniania + + + + Performance + Wydajność + + + + D_ash underline + Po_dkreślenie z kresek + + + + D_ot underline + P_odkreślenie z kropek + + + + Navigation links + Linki nawigacyjne + + + + Show s_ymbols in unopened namespaces + Pokaż s_ymbole w nieotwartych przestrzeniach nazw + + + + Show completion list after a character is _deleted + Pokaż listę _uzupełniania po usunięciu znaku + + + + _Show completion list after a character is typed + _Pokaż listę uzupełniania po wpisaniu znaku + + + + _Enable in-memory cross project references + _Włącz odwołania między projektami w pamięci + + + + Number of projects whose data is cached in memory + Liczba projektów, które mają dane buforowane w pamięci + + + + S_how navigation links as + P_okaż linki nawigacyjne jako + + + + Simplify names (remove unnecessary qualifiers) + Uprość nazwy (usuń niepotrzebne kwalifikatory) + + + + _Solid underline + Podkreślenie _ciągłe + + + + Remove unused open statements + Usuń nieużywane otwarte instrukcje + + + + Analyze and suggest fixes for unused values + Analizuj nieużywane wartości i sugeruj dla nich poprawki + + + + Block Structure Guides + Prowadnice struktury blokowej + + + + Show structure guidelines for F# code + Pokaż wskazówki dotyczące struktury dla kodu języka F# + + + + Outlining + Konspekt + + + + Show outlining and collapsible nodes for F# code + Pokaż konspekt i węzły z możliwością zwijania dla kodu języka F# + + + + Time until stale results are used (in milliseconds) + Czas do użycia nieodświeżonych wyników (w milisekundach) + + + + IntelliSense Performance Options + Opcje wydajności IntelliSense + + + + F# Project and Caching Performance Options + Opcje wydajności buforowania i projektów F# + + + + Enable stale data for IntelliSense features + Włącz dane nieodświeżone na potrzeby funkcji IntelliSense + + + + In-memory cross-project references store project-level data in memory to allow IDE features to work across projects. + Odwołania między projektami w pamięci przechowują dane na poziomie projektu w pamięci, aby umożliwić funkcjom środowiska IDE działanie w wielu projektach. + + + + Project data is cached for IDE features. Higher values use more memory because more projects are cached. Tuning this value should not affect small or medium-sized solutions. + Dane projektów są buforowane na potrzeby funkcji środowiska IDE. Wyższe wartości powodują używanie większej ilości pamięci, ponieważ buforowanych jest więcej projektów. Dostrajanie tej wartości nie powinno mieć wpływu na małe ani średnie rozwiązania. + + + + Always add new line on enter + Always add new line on enter + + + + Never add new line on enter + Never add new line on enter + + + + Only add new line on enter after end of fully typed word + Only add new line on enter after end of fully typed word + + + + Enter key behavior + Enter key behavior + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.UIResources/xlf/Strings.pt-BR.xlf b/vsintegration/src/FSharp.UIResources/xlf/Strings.pt-BR.xlf new file mode 100644 index 00000000000..a7efc694f2b --- /dev/null +++ b/vsintegration/src/FSharp.UIResources/xlf/Strings.pt-BR.xlf @@ -0,0 +1,187 @@ + + + + + + Always place open statements at the top level + Sempre coloque as instruções abertas no nível superior + + + + CodeLens + CodeLens + + + + Show annotations to the right instead of above the line + Mostrar anotações à direita da linha, em vez de acima dela + + + + Enable CodeLens (Experimental) + Habilitar CodeLens (Experimental) + + + + Annotation prefix + Prefixo da anotação + + + + Use colors in annotations + Usar cores em anotações + + + + Code Fixes + Correções de Código + + + + Completion Lists + Listas de Conclusão + + + + Performance + Desempenho + + + + D_ash underline + Sublinhado t_racejado + + + + D_ot underline + Sublinhado p_ontilhado + + + + Navigation links + Links de navegação + + + + Show s_ymbols in unopened namespaces + Mostrar s_ímbolos em namespaces não abertos + + + + Show completion list after a character is _deleted + Mostrar lista de conclusão após um caractere ser _excluído + + + + _Show completion list after a character is typed + _Mostrar lista de conclusão depois que um caractere é digitado + + + + _Enable in-memory cross project references + _Habilitar referências de projeto cruzado na memória + + + + Number of projects whose data is cached in memory + Número de projetos cujos dados estão em cache na memória + + + + S_how navigation links as + E_xibir link de navegação como + + + + Simplify names (remove unnecessary qualifiers) + Simplificar nomes (remover qualificadores desnecessários) + + + + _Solid underline + Sublinhado _sólido + + + + Remove unused open statements + Remover instruções abertas não usadas + + + + Analyze and suggest fixes for unused values + Analisar e sugerir correções de valores não usados + + + + Block Structure Guides + Guias de Estrutura de Bloco + + + + Show structure guidelines for F# code + Mostrar as diretrizes de estrutura para o código F# + + + + Outlining + Estrutura de Tópicos + + + + Show outlining and collapsible nodes for F# code + Mostrar os nós de estrutura de tópicos e recolhíveis para o código F# + + + + Time until stale results are used (in milliseconds) + Tempo até que os resultados obsoletos sejam utilizados (em milissegundos) + + + + IntelliSense Performance Options + Opções de desempenho do IntelliSense + + + + F# Project and Caching Performance Options + Projeto em F# e opções de desempenho em cache + + + + Enable stale data for IntelliSense features + Habilitar dados obsoletos para os recursos do IntelliSense + + + + In-memory cross-project references store project-level data in memory to allow IDE features to work across projects. + As referências entre projetos na memória armazenam os dados de nível de projeto na memória para permitir que os recursos do IDE funcionem nos projetos. + + + + Project data is cached for IDE features. Higher values use more memory because more projects are cached. Tuning this value should not affect small or medium-sized solutions. + Os dados do projeto são colocados em cache para os recursos do IDE. Os valores mais altos utilizam mais memória porque mais projetos são colocados em cache. O ajuste desses valores não deve afetar as soluções de pequeno ou médio porte. + + + + Always add new line on enter + Always add new line on enter + + + + Never add new line on enter + Never add new line on enter + + + + Only add new line on enter after end of fully typed word + Only add new line on enter after end of fully typed word + + + + Enter key behavior + Enter key behavior + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.UIResources/xlf/Strings.ru.xlf b/vsintegration/src/FSharp.UIResources/xlf/Strings.ru.xlf new file mode 100644 index 00000000000..892209a2d43 --- /dev/null +++ b/vsintegration/src/FSharp.UIResources/xlf/Strings.ru.xlf @@ -0,0 +1,187 @@ + + + + + + Always place open statements at the top level + Всегда располагайте открытые операторы на верхнем уровне + + + + CodeLens + CodeLens + + + + Show annotations to the right instead of above the line + Показать примечания справа от строки, а не над ней + + + + Enable CodeLens (Experimental) + Включить CodeLens (экспериментальная функция) + + + + Annotation prefix + Префикс примечания + + + + Use colors in annotations + Использовать цветные примечания + + + + Code Fixes + Исправления кода + + + + Completion Lists + Списки завершения + + + + Performance + Производительность + + + + D_ash underline + Ш_триховое подчеркивание + + + + D_ot underline + Пу_нктирное подчеркивание + + + + Navigation links + Ссылки навигации + + + + Show s_ymbols in unopened namespaces + По_казать символы в неоткрытых пространствах имен + + + + Show completion list after a character is _deleted + Показывать список завершения после удалени_я знака + + + + _Show completion list after a character is typed + _Показывать список завершения после ввода знака + + + + _Enable in-memory cross project references + _Включить перекрестные ссылки между проектами в памяти + + + + Number of projects whose data is cached in memory + Число проектов, данные которых кэшируются в памяти + + + + S_how navigation links as + П_оказать ссылки навигации как + + + + Simplify names (remove unnecessary qualifiers) + Упростить имена (удалить ненужные квалификаторы) + + + + _Solid underline + _Сплошнное подчеркивание + + + + Remove unused open statements + Удалить неиспользуемые открытые операторы + + + + Analyze and suggest fixes for unused values + Проанализировать и предложить исправления для неиспользуемых значений + + + + Block Structure Guides + Направляющие для структуры блоков + + + + Show structure guidelines for F# code + Показать рекомендации по структуре для кода F# + + + + Outlining + Структура + + + + Show outlining and collapsible nodes for F# code + Показать структурирование и свертываемые узлы для кода F# + + + + Time until stale results are used (in milliseconds) + Используются результаты времени до устаревания (в мс) + + + + IntelliSense Performance Options + Параметры производительности IntelliSense + + + + F# Project and Caching Performance Options + Проект F# и параметры производительности кэширования + + + + Enable stale data for IntelliSense features + Включение устаревших данных для функций IntelliSense + + + + In-memory cross-project references store project-level data in memory to allow IDE features to work across projects. + Перекрестные ссылки между проектами в памяти хранят данные уровня проекта в памяти, поэтому функции и компоненты IDE могут работать в разных проектах. + + + + Project data is cached for IDE features. Higher values use more memory because more projects are cached. Tuning this value should not affect small or medium-sized solutions. + Для функций и компонентов IDE используются кэшированные данные проекта. Более высокие значения потребляют больший объем памяти, так как кэшируется больше проектов. Настройка этого значения не должна влиять на решения небольших или средних размеров. + + + + Always add new line on enter + Always add new line on enter + + + + Never add new line on enter + Never add new line on enter + + + + Only add new line on enter after end of fully typed word + Only add new line on enter after end of fully typed word + + + + Enter key behavior + Enter key behavior + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.UIResources/xlf/Strings.tr.xlf b/vsintegration/src/FSharp.UIResources/xlf/Strings.tr.xlf new file mode 100644 index 00000000000..f1187f2e25c --- /dev/null +++ b/vsintegration/src/FSharp.UIResources/xlf/Strings.tr.xlf @@ -0,0 +1,187 @@ + + + + + + Always place open statements at the top level + Açık deyimleri her zaman en üst düzeye yerleştir + + + + CodeLens + CodeLens + + + + Show annotations to the right instead of above the line + Ek açıklamaları satırın üstü yerine sağ tarafta göster + + + + Enable CodeLens (Experimental) + CodeLens’i Etkinleştir (Deneysel) + + + + Annotation prefix + Ek açıklama ön eki + + + + Use colors in annotations + Ek açıklamalarda renk kullan + + + + Code Fixes + Kod Düzeltmeleri + + + + Completion Lists + Tamamlama Listeleri + + + + Performance + Performans + + + + D_ash underline + T_ire alt çizgi + + + + D_ot underline + N_okta alt çizgi + + + + Navigation links + Gezinti bağlantıları + + + + Show s_ymbols in unopened namespaces + Açılmamış ad alanlarında s_embolleri göster + + + + Show completion list after a character is _deleted + Bir karakter _silindikten sonra tamamlanma listesini göster + + + + _Show completion list after a character is typed + Bir karakter yazıldıktan sonra tamamlanma listesini _göster + + + + _Enable in-memory cross project references + _Bellek içi çapraz proje başvurularını etkinleştir + + + + Number of projects whose data is cached in memory + Verileri bellekte önbelleğe alınan proje sayısı + + + + S_how navigation links as + Gezinti bağlantılarını farklı _göster + + + + Simplify names (remove unnecessary qualifiers) + Adları basitleştir (gereksiz niteleyicileri kaldır) + + + + _Solid underline + _Kesintisiz alt çizgi + + + + Remove unused open statements + Kullanılmayan açık deyimleri kaldır + + + + Analyze and suggest fixes for unused values + Kullanılmayan değerlere yönelik düzeltmeleri çözümle + + + + Block Structure Guides + Blok Yapısı Kılavuzları + + + + Show structure guidelines for F# code + F# kodu için yapı yönergelerini göster + + + + Outlining + Ana Hat + + + + Show outlining and collapsible nodes for F# code + F# kodu için ana hattı ve daraltılabilir düğümleri göster + + + + Time until stale results are used (in milliseconds) + Eski sonuçların kullanılması için geçecek süre (milisaniye cinsinden) + + + + IntelliSense Performance Options + IntelliSense Performans Seçenekleri + + + + F# Project and Caching Performance Options + F# Proje ve Önbelleğe Alma Performansı Seçenekleri + + + + Enable stale data for IntelliSense features + IntelliSense özellikleri için eski verileri etkinleştir + + + + In-memory cross-project references store project-level data in memory to allow IDE features to work across projects. + Bellek içi projeler arası başvurular, IDE özelliklerinin farklı projelerde çalışmasına imkan tanımak için bellekte proje düzeyi veriler depolar. + + + + Project data is cached for IDE features. Higher values use more memory because more projects are cached. Tuning this value should not affect small or medium-sized solutions. + IDE özellikleri için proje verileri önbelleğe alınır. Değer yüksek olduğunda daha fazla proje önbelleğe alındığından daha fazla bellek kullanılır. Bu değerin ayarlanması küçük veya orta ölçekli çözümleri etkilememelidir. + + + + Always add new line on enter + Always add new line on enter + + + + Never add new line on enter + Never add new line on enter + + + + Only add new line on enter after end of fully typed word + Only add new line on enter after end of fully typed word + + + + Enter key behavior + Enter key behavior + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.UIResources/xlf/Strings.zh-Hans.xlf b/vsintegration/src/FSharp.UIResources/xlf/Strings.zh-Hans.xlf new file mode 100644 index 00000000000..db270930177 --- /dev/null +++ b/vsintegration/src/FSharp.UIResources/xlf/Strings.zh-Hans.xlf @@ -0,0 +1,187 @@ + + + + + + Always place open statements at the top level + 始终在顶层放置 open 语句 + + + + CodeLens + CodeLens + + + + Show annotations to the right instead of above the line + 在行右侧而非上方显示批注 + + + + Enable CodeLens (Experimental) + 启用 CodeLens (试验) + + + + Annotation prefix + 批注前缀 + + + + Use colors in annotations + 在批注中使用颜色 + + + + Code Fixes + 代码修补程序 + + + + Completion Lists + 完成列表 + + + + Performance + 性能 + + + + D_ash underline + 短线下划线(_A) + + + + D_ot underline + 点下划线(_O) + + + + Navigation links + 导航链接 + + + + Show s_ymbols in unopened namespaces + 显示未打开的命名空间中的符号(_Y) + + + + Show completion list after a character is _deleted + 删除字符后显示完成列表 + + + + _Show completion list after a character is typed + 键入字符后显示完成列表 + + + + _Enable in-memory cross project references + 启用内存中跨项目引用(_E) + + + + Number of projects whose data is cached in memory + 内存中缓存了其数据的项目数 + + + + S_how navigation links as + 导航链接显示方式(_H) + + + + Simplify names (remove unnecessary qualifiers) + 简化名称(删除不必要的限定符) + + + + _Solid underline + 实线下划线(_S) + + + + Remove unused open statements + 删除未使用的 open 语句 + + + + Analyze and suggest fixes for unused values + 分析未使用的值并建议相应的修补程序 + + + + Block Structure Guides + 块结构指南 + + + + Show structure guidelines for F# code + 显示 F# 代码的结构指南 + + + + Outlining + 大纲 + + + + Show outlining and collapsible nodes for F# code + 显示 F# 代码的大纲显示节点和可折叠节点 + + + + Time until stale results are used (in milliseconds) + 使用过时结果前等待的时间(以毫秒计) + + + + IntelliSense Performance Options + IntelliSense 性能选项 + + + + F# Project and Caching Performance Options + F# 项目和缓存性能选项 + + + + Enable stale data for IntelliSense features + 针对 IntelliSense 功能启用过时数据 + + + + In-memory cross-project references store project-level data in memory to allow IDE features to work across projects. + 内存中跨项目引用将项目级数据存储在内存中,让 IDE 功能能够跨项目工作。 + + + + Project data is cached for IDE features. Higher values use more memory because more projects are cached. Tuning this value should not affect small or medium-sized solutions. + 针对 IDE 功能缓存项目数据。值越大,缓存的项目越多,因此使用的内存越多。调整此值不应影响小型或中型解决方案。 + + + + Always add new line on enter + Always add new line on enter + + + + Never add new line on enter + Never add new line on enter + + + + Only add new line on enter after end of fully typed word + Only add new line on enter after end of fully typed word + + + + Enter key behavior + Enter key behavior + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.UIResources/xlf/Strings.zh-Hant.xlf b/vsintegration/src/FSharp.UIResources/xlf/Strings.zh-Hant.xlf new file mode 100644 index 00000000000..264a4df8808 --- /dev/null +++ b/vsintegration/src/FSharp.UIResources/xlf/Strings.zh-Hant.xlf @@ -0,0 +1,187 @@ + + + + + + Always place open statements at the top level + 一律將 open 陳述式放在最上層 + + + + CodeLens + CodeLens + + + + Show annotations to the right instead of above the line + 在行的右方而非上方顯示註釋 + + + + Enable CodeLens (Experimental) + 啟用 CodeLens (實驗性) + + + + Annotation prefix + 註釋前置詞 + + + + Use colors in annotations + 在註釋中使用色彩 + + + + Code Fixes + 程式碼修正 + + + + Completion Lists + 完成清單 + + + + Performance + 效能 + + + + D_ash underline + 虛點底線(_A) + + + + D_ot underline + 點線底線(_O) + + + + Navigation links + 導覽連結 + + + + Show s_ymbols in unopened namespaces + 顯示未開啟之命名空間中的符號(_Y) + + + + Show completion list after a character is _deleted + 刪除一個字元後顯示完成清單(_D) + + + + _Show completion list after a character is typed + 輸入一個字元後顯示完成清單(_S) + + + + _Enable in-memory cross project references + 允許記憶體內跨專案參考(_E) + + + + Number of projects whose data is cached in memory + 資料會快取到記憶體的專案數 + + + + S_how navigation links as + 顯示導覽連結為(_H) + + + + Simplify names (remove unnecessary qualifiers) + 簡化名稱 (移除不必要的限定詞) + + + + _Solid underline + 實線底線(_S) + + + + Remove unused open statements + 移除未使用的 open 陳述式 + + + + Analyze and suggest fixes for unused values + 分析未使用的值並建議修正 + + + + Block Structure Guides + 區塊結構輔助線 + + + + Show structure guidelines for F# code + 顯示 F# 程式碼的結構方針 + + + + Outlining + 大綱 + + + + Show outlining and collapsible nodes for F# code + 顯示 F# 程式碼的大綱與可折疊的節點 + + + + Time until stale results are used (in milliseconds) + 使用過時結果前等待的時間 (毫秒) + + + + IntelliSense Performance Options + IntelliSense 效能選項 + + + + F# Project and Caching Performance Options + F# 專案與快取效能選項 + + + + Enable stale data for IntelliSense features + 為 IntelliSense 功能啟用過時資料 + + + + In-memory cross-project references store project-level data in memory to allow IDE features to work across projects. + 記憶體內跨專案參考,會在記憶體中儲存專案等級的資料,以允許 IDE 功能在各專案中皆可運作。 + + + + Project data is cached for IDE features. Higher values use more memory because more projects are cached. Tuning this value should not affect small or medium-sized solutions. + 專案資料會進行快取,供 IDE 功能使用。值較高時會使用較多的記憶體,這是因為會快取較多的專案數。調整此值應該不會影響中小型的解決方案。 + + + + Always add new line on enter + Always add new line on enter + + + + Never add new line on enter + Never add new line on enter + + + + Only add new line on enter after end of fully typed word + Only add new line on enter after end of fully typed word + + + + Enter key behavior + Enter key behavior + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.VS.FSI/FSHarp.VS.FSI.fsproj b/vsintegration/src/FSharp.VS.FSI/FSHarp.VS.FSI.fsproj deleted file mode 100644 index 8ef9147b006..00000000000 --- a/vsintegration/src/FSharp.VS.FSI/FSHarp.VS.FSI.fsproj +++ /dev/null @@ -1,238 +0,0 @@ - - - - - $(MSBuildProjectDirectory)\..\..\..\src - FSharp - FSharp.VS.FSI - true - - - - Debug - AnyCPU - {991dcf75-c2eb-42b6-9a0d-aa1d2409d519} - Library - FSharp.VS.FSI - v4.6 - true - LIBRARY - $(NoWarn);47;75 - $(OtherFlags) --subsystemversion:6.00 - true - false - false - true - true - true - - - - - - - - - - Microsoft - StrongName - - - - - - - - - - - - - - $(FSharpSourcesRoot)\..\loc\lcl\{Lang}\$(AssemblyName).dll.lcl - $(FSharpSourcesRoot)\..\loc\lci\$(AssemblyName).dll.lci - false - false - - - - - - CompilerLocationUtils.fs - - - - - - - - - - - true - Microsoft.VisualStudio.FSharp.Interactive.SRProperties - true - Properties - Properties.resx - - - - - - - - FSharp.Compiler.Private - {2e4d67b4-522d-4cf7-97e4-ba940f0b18f3} - True - - - - - - - - - - - - - - - - - - - $(FSharpSourcesRoot)\..\packages\EnvDTE.8.0.1\lib\net10\EnvDTE.dll - True - - - $(FSharpSourcesRoot)\..\packages\EnvDTE80.8.0.1\lib\net10\EnvDTE80.dll - True - - - $(FSharpSourcesRoot)\..\packages\VSSDK.VSLangProj.7.0.4\lib\net20\VSLangProj.dll - True - - - $(FSharpSourcesRoot)\..\packages\VSSDK.VSLangProj.8.8.0.4\lib\net20\VSLangProj80.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.OLE.Interop.7.10.6070\lib\Microsoft.VisualStudio.OLE.Interop.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Immutable.10.0.10.0.30319\lib\net40\Microsoft.VisualStudio.Shell.Immutable.10.0.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Immutable.11.0.11.0.50727\lib\net45\Microsoft.VisualStudio.Shell.Immutable.11.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.7.10.6071\lib\Microsoft.VisualStudio.Shell.Interop.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.8.0.8.0.50727\lib\Microsoft.VisualStudio.Shell.Interop.8.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.9.0.9.0.30729\lib\Microsoft.VisualStudio.Shell.Interop.9.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.10.0.10.0.30319\lib\Microsoft.VisualStudio.Shell.Interop.10.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.11.0.11.0.61030\lib\Microsoft.VisualStudio.Shell.Interop.11.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.ProjectAggregator.8.0.50727\lib\net45\Microsoft.VisualStudio.ProjectAggregator.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.7.10.6071\lib\Microsoft.VisualStudio.Shell.Interop.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.8.0.8.0.50727\lib\Microsoft.VisualStudio.Shell.Interop.8.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.10.0.10.0.30319\lib\Microsoft.VisualStudio.Shell.Interop.10.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.TextManager.Interop.7.10.6070\lib\Microsoft.VisualStudio.TextManager.Interop.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.TextManager.Interop.8.0.8.0.50727\lib\Microsoft.VisualStudio.TextManager.Interop.8.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.TextManager.Interop.10.0.10.0.30319\lib\Microsoft.VisualStudio.TextManager.Interop.10.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Designer.Interfaces.1.1.4322\lib\microsoft.visualstudio.designer.interfaces.dll - - - $(FSharpSourcesRoot)\..\packages\VSSDK.VSHelp.7.0.4\lib\net20\Microsoft.VisualStudio.VSHelp.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Threading.$(MicrosoftVisualStudioThreadingVersion)\lib\net45\Microsoft.VisualStudio.Threading.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Editor.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Editor.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Text.UI.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Text.UI.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Text.UI.Wpf.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Text.UI.Wpf.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Text.Data.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Text.Data.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Text.Logic.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Text.Logic.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.CoreUtility.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.CoreUtility.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Utilities.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Utilities.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Design.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Shell.Design.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Framework.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Shell.Framework.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.$(RoslynVSBinariesVersion).$(RoslynVSPackagesVersion)\lib\Microsoft.VisualStudio.Shell.15.0.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Package.LanguageService.$(RoslynVSBinariesVersion).$(RoslynVSPackagesVersion)\lib\Microsoft.VisualStudio.Package.LanguageService.$(RoslynVSBinariesVersion).dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Language.StandardClassification.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Language.StandardClassification.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.ComponentModelHost.15.0.26201-alpha\lib\net46\Microsoft.VisualStudio.ComponentModelHost.dll - - - - {DED3BBD7-53F4-428A-8C9F-27968E768605} - FSharp.Core - - - FSharp.Compiler.Server.Shared - {d5870cf0-ed51-4cbc-b3d7-6f56da84ac06} - - - \ No newline at end of file diff --git a/vsintegration/src/FSharp.VS.FSI/FSharp.VS.FSI.fsproj b/vsintegration/src/FSharp.VS.FSI/FSharp.VS.FSI.fsproj new file mode 100644 index 00000000000..29f70484239 --- /dev/null +++ b/vsintegration/src/FSharp.VS.FSI/FSharp.VS.FSI.fsproj @@ -0,0 +1,84 @@ + + + + + + net46 + Library + true + false + $(NoWarn);47;75 + true + true + $(SystemValueTuplePackageVersion) + $(OtherFlags) --subsystemversion:6.00 + true + false + + + + + + + + + + + + + + + CompilerLocationUtils.fs + + + + + + + + + + + true + Microsoft.VisualStudio.FSharp.Interactive.SRProperties + true + Properties + Properties.resx + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vsintegration/src/FSharp.VS.FSI/Resources/Images_24bit.bmp b/vsintegration/src/FSharp.VS.FSI/Resources/Images_24bit.bmp deleted file mode 100644 index d4751234fd1..00000000000 Binary files a/vsintegration/src/FSharp.VS.FSI/Resources/Images_24bit.bmp and /dev/null differ diff --git a/vsintegration/src/FSharp.VS.FSI/Resources/Package.ico b/vsintegration/src/FSharp.VS.FSI/Resources/Package.ico deleted file mode 100644 index ea3b23fe8d4..00000000000 Binary files a/vsintegration/src/FSharp.VS.FSI/Resources/Package.ico and /dev/null differ diff --git a/vsintegration/src/FSharp.VS.FSI/VSPackage.resx b/vsintegration/src/FSharp.VS.FSI/VSPackage.resx index 5f1204460b6..0785825ba61 100644 --- a/vsintegration/src/FSharp.VS.FSI/VSPackage.resx +++ b/vsintegration/src/FSharp.VS.FSI/VSPackage.resx @@ -119,9 +119,6 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - fsiCommands.vsct;System.Byte[], mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - J1H0RTAZRQRKDEJ2I3A2PCIAPQQRQIDZI3CTKAIAQPJIE3EPHAMRRKAJCHI1PJM2CPDIRZKMMJHKPHJ9E1HDZHZDC1DEHHR0QIARA8RKA3PICCHAA3QKA1QMJZMKKZKZ diff --git a/vsintegration/src/FSharp.VS.FSI/fsiBasis.fs b/vsintegration/src/FSharp.VS.FSI/fsiBasis.fs index 3167b466f13..ddff0481e7d 100644 --- a/vsintegration/src/FSharp.VS.FSI/fsiBasis.fs +++ b/vsintegration/src/FSharp.VS.FSI/fsiBasis.fs @@ -64,7 +64,12 @@ module internal Guids = let guidFsiPackage = "eeeeeeee-9342-42f1-8ea9-42f0e8a6be55" // FSI-LINKAGE-POINT: when packaged here let guidFSharpProjectPkgString = "91A04A73-4F2C-4E7C-AD38-C1A68E7DA05C" // FSI-LINKAGE-POINT: when packaged in project system + [] + /// "35A5E6B8-4012-41fc-A652-2CDC56D74E9F" let guidFsiLanguageService = "35A5E6B8-4012-41fc-A652-2CDC56D74E9F" // The FSI lang service + + [] + /// "dee22b65-9761-4a26-8fb2-759b971d6dfc" let guidFsiSessionToolWindow = "dee22b65-9761-4a26-8fb2-759b971d6dfc" // FSI Package command set diff --git a/vsintegration/src/FSharp.VS.FSI/fsiCommands.vsct b/vsintegration/src/FSharp.VS.FSI/fsiCommands.vsct deleted file mode 100644 index 7c4fa57bc7d..00000000000 --- a/vsintegration/src/FSharp.VS.FSI/fsiCommands.vsct +++ /dev/null @@ -1,310 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - FSI Console Context - FSI Console Context - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vsintegration/src/FSharp.VS.FSI/fsiLanguageService.fs b/vsintegration/src/FSharp.VS.FSI/fsiLanguageService.fs index 62d2cf7efe9..6177d8bba25 100644 --- a/vsintegration/src/FSharp.VS.FSI/fsiLanguageService.fs +++ b/vsintegration/src/FSharp.VS.FSI/fsiLanguageService.fs @@ -190,13 +190,11 @@ module internal Helpers = member x.GetDisplayName(pbstrName) = pbstrName <- "Keyword"; VSConstants.S_OK } - - -[] +[] type internal FsiLanguageService() = inherit LanguageService() - do assert("35A5E6B8-4012-41fc-A652-2CDC56D74E9F" = Guids.guidFsiLanguageService) + let mutable preferences = null : LanguagePreferences let mutable scanner = null : IScanner let mutable sessions = None : Session.FsiSessions option @@ -224,32 +222,12 @@ type internal FsiLanguageService() = (new FsiAuthoringScope(sessions,readOnlySpan) :> AuthoringScope) override this.Name = "FSharpInteractive" // LINK: see ProvidePackage attribute on the package. - override this.GetFormatFilterList() = "" // Reading MPF sources suggest this is called by codeWinMan.OnNewView(textView) to install a ViewFilter on the TextView. override this.CreateViewFilter(mgr:CodeWindowManager,newView:IVsTextView) = new FsiViewFilter(mgr,newView) :> ViewFilter - // Editor prefrerences require language service to provide at least one colorable item, otherwise weird failures happen - // See env\msenv\textmgr\editpref.cpp, CEditorPreferences::BuildDefaultColorableItemListHelper: - // HRESULT CEditorPreferences::BuildDefaultColorableItemListHelper(COLORABLEITEMLIST *pColorableItemList, IVsProvideColorableItems *pColorProv) - // { - // HRESULT hr; - // - // int cItems; - // - // hr = pColorProv->GetItemCount (&cItems); - // if (FAILED(hr)) - // return hr; - // - // if (!cItems) - // { - // ASSERT(FALSE); // something's way wrong - // return E_FAIL; - // } - // ... - // } override this.GetItemCount count = count <- 1 VSConstants.S_OK diff --git a/vsintegration/src/FSharp.VS.FSI/fsiSessionToolWindow.fs b/vsintegration/src/FSharp.VS.FSI/fsiSessionToolWindow.fs index c9897d7153c..eae479ef9e2 100644 --- a/vsintegration/src/FSharp.VS.FSI/fsiSessionToolWindow.fs +++ b/vsintegration/src/FSharp.VS.FSI/fsiSessionToolWindow.fs @@ -79,12 +79,10 @@ type internal FsiEditorSendAction = | ExecuteLine | DebugSelection -[] //REVIEW: double check fresh guid! IIRC it is. +[] type internal FsiToolWindow() as this = inherit ToolWindowPane(null) - do assert("dee22b65-9761-4a26-8fb2-759b971d6dfc" = Guids.guidFsiSessionToolWindow) - let providerGlobal = Package.GetGlobalService(typeof) :?> IOleServiceProvider let provider = new ServiceProvider(providerGlobal) :> System.IServiceProvider let textViewAdapter, contentTypeRegistry = @@ -492,21 +490,6 @@ type internal FsiToolWindow() as this = match RegistryHelpers.tryReadHKCU (defaultVSRegistryRoot + "\\" + settingsRegistrySubKey) debugPromptRegistryValue with | Some(1) -> true // warning dialog suppressed | _ -> -#if VS_VERSION_DEV12 - let result = - VsShellUtilities.ShowMessageBox( - serviceProvider = provider, - message = VFSIstrings.SR.sessionIsNotDebugFriendly(), - title = VFSIstrings.SR.fsharpInteractive(), - icon = OLEMSGICON.OLEMSGICON_WARNING, - msgButton = OLEMSGBUTTON.OLEMSGBUTTON_YESNO, - defaultButton = OLEMSGDEFBUTTON.OLEMSGDEFBUTTON_FIRST - ) - - // if user picks YES, allow debugging anyways - result = 6 - -#else let mutable suppressDiag = false let result = Microsoft.VisualStudio.PlatformUI.MessageDialog.Show( @@ -522,7 +505,6 @@ type internal FsiToolWindow() as this = // if user picks YES, allow debugging anyways result = Microsoft.VisualStudio.PlatformUI.MessageDialogCommand.Yes -#endif let onAttachDebugger (sender:obj) (args:EventArgs) = if checkDebuggability() then diff --git a/vsintegration/src/FSharp.VS.FSI/xlf/Properties.cs.xlf b/vsintegration/src/FSharp.VS.FSI/xlf/Properties.cs.xlf new file mode 100644 index 00000000000..8b43cbae350 --- /dev/null +++ b/vsintegration/src/FSharp.VS.FSI/xlf/Properties.cs.xlf @@ -0,0 +1,57 @@ + + + + + + 64-bit F# Interactive + 64bitový F# Interactive + + + + If set to true, and the current machine is 64-bit, then run F# Interactive as a 64-bit process. (Otherwise, F# Interactive is a 32-bit process.) + V případě nastavení na true a za předpokladu, že aktuální počítač je 64bitový, se F# Interactive spustí jako 64bitový proces. (V opačném případě je F# Interactive 32bitový proces.) + + + + F# Interactive options + Možnost F# Interactive + + + + Additional command line arguments passed to the F# Interactive executable by Visual Studio. (optimization and debug flags are ignored if script debugging is enabled) + Další argumenty příkazového řádku předané F# Interactive a spustitelné ve Visual Studiu. (Pokud se povolí ladění skriptů, ignorují se příznaky optimalizace a ladění.) + + + + Misc + Různé + + + + Shadow copy assemblies + Sestavení stínových kopií + + + + Prevents referenced assemblies from being locked by the F# Interactive process. + Znemožňuje zamknutí odkazovaných sestavení procesem nástroje F# Interactive. + + + + Enable script debugging + Povolit ladění skriptů + + + + Enable debugging of F# scripts (may impact script performance, requires reset of F# Interactive) + Povolit ladění skriptů F# (může ovlivnit výkon skriptů, vyžaduje restartování F# Interactive) + + + + Debugging + Ladění + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.VS.FSI/xlf/Properties.de.xlf b/vsintegration/src/FSharp.VS.FSI/xlf/Properties.de.xlf new file mode 100644 index 00000000000..defc84aed79 --- /dev/null +++ b/vsintegration/src/FSharp.VS.FSI/xlf/Properties.de.xlf @@ -0,0 +1,57 @@ + + + + + + 64-bit F# Interactive + 64-Bit-Version von F# Interactive + + + + If set to true, and the current machine is 64-bit, then run F# Interactive as a 64-bit process. (Otherwise, F# Interactive is a 32-bit process.) + Wenn diese Einstellung auf "True" gesetzt ist und der aktuelle Computer eine 64-Bit-Version ist, müssen Sie F# Interactive als einen 64-Bit-Prozess ausführen (Andernfalls ist F# Interactive ein 32-Bit-Prozess). + + + + F# Interactive options + F# Interactive-Optionen + + + + Additional command line arguments passed to the F# Interactive executable by Visual Studio. (optimization and debug flags are ignored if script debugging is enabled) + Die an die ausführbare F# Interactive-Datei von Visual Studio übergebenen zusätzlichen Befehlszeilenargumente. (Optimierungs- und Debugflags werden bei aktiviertem Skriptdebuggen ignoriert.) + + + + Misc + Sonstiges + + + + Shadow copy assemblies + Schattenkopie-Assemblys + + + + Prevents referenced assemblies from being locked by the F# Interactive process. + Verhindert, dass referenzierte Assemblys vom F# Interactive-Prozess gesperrt werden. + + + + Enable script debugging + Skriptdebuggen aktivieren + + + + Enable debugging of F# scripts (may impact script performance, requires reset of F# Interactive) + Debuggen von F#-Skripts aktivieren (kann die Skriptleistung beeinträchtigen, erfordert das Zurücksetzen von F# Interactive) + + + + Debugging + Debuggen + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.VS.FSI/xlf/Properties.en.xlf b/vsintegration/src/FSharp.VS.FSI/xlf/Properties.en.xlf new file mode 100644 index 00000000000..78bd986fab5 --- /dev/null +++ b/vsintegration/src/FSharp.VS.FSI/xlf/Properties.en.xlf @@ -0,0 +1,57 @@ + + + + + + 64-bit F# Interactive + 64-bit F# Interactive + + + + If set to true, and the current machine is 64-bit, then run F# Interactive as a 64-bit process. (Otherwise, F# Interactive is a 32-bit process.) + If set to true, and the current machine is 64-bit, then run F# Interactive as a 64-bit process. (Otherwise, F# Interactive is a 32-bit process.) + + + + F# Interactive options + F# Interactive options + + + + Additional command line arguments passed to the F# Interactive executable by Visual Studio. (optimization and debug flags are ignored if script debugging is enabled) + Additional command line arguments passed to the F# Interactive executable by Visual Studio. (optimization and debug flags are ignored if script debugging is enabled) + + + + Misc + Misc + + + + Shadow copy assemblies + Shadow copy assemblies + + + + Prevents referenced assemblies from being locked by the F# Interactive process. + Prevents referenced assemblies from being locked by the F# Interactive process. + + + + Enable script debugging + Enable script debugging + + + + Enable debugging of F# scripts (may impact script performance, requires reset of F# Interactive) + Enable debugging of F# scripts (may impact script performance, requires reset of F# Interactive) + + + + Debugging + Debugging + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.VS.FSI/xlf/Properties.es.xlf b/vsintegration/src/FSharp.VS.FSI/xlf/Properties.es.xlf new file mode 100644 index 00000000000..725e86521e8 --- /dev/null +++ b/vsintegration/src/FSharp.VS.FSI/xlf/Properties.es.xlf @@ -0,0 +1,57 @@ + + + + + + 64-bit F# Interactive + F# interactivo de 64 bits + + + + If set to true, and the current machine is 64-bit, then run F# Interactive as a 64-bit process. (Otherwise, F# Interactive is a 32-bit process.) + Si se establece en True y la máquina actual es de 64 bits, F# interactivo se ejecuta como proceso de 64 bits; de lo contrario, se ejecuta como proceso de 32 bits. + + + + F# Interactive options + Opciones de F# interactivo + + + + Additional command line arguments passed to the F# Interactive executable by Visual Studio. (optimization and debug flags are ignored if script debugging is enabled) + Argumentos de la línea de comandos adicional pasados al archivo ejecutable de F# interactivo por Visual Studio. (se prescinde de las marcas de optimización y depuración si la depuración de scripts está habilitada) + + + + Misc + Varios + + + + Shadow copy assemblies + Ensamblados de instantánea + + + + Prevents referenced assemblies from being locked by the F# Interactive process. + Impide que el proceso de F# interactivo bloquee los ensamblados a los que se hace referencia. + + + + Enable script debugging + Habilitar depuración de scripts + + + + Enable debugging of F# scripts (may impact script performance, requires reset of F# Interactive) + Habilitar depuración de scripts F# (puede afectar al rendimiento de los scripts y requiere restablecer F# interactivo) + + + + Debugging + Depuración + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.VS.FSI/xlf/Properties.fr.xlf b/vsintegration/src/FSharp.VS.FSI/xlf/Properties.fr.xlf new file mode 100644 index 00000000000..1c66865aeaa --- /dev/null +++ b/vsintegration/src/FSharp.VS.FSI/xlf/Properties.fr.xlf @@ -0,0 +1,57 @@ + + + + + + 64-bit F# Interactive + F# Interactive 64 bits + + + + If set to true, and the current machine is 64-bit, then run F# Interactive as a 64-bit process. (Otherwise, F# Interactive is a 32-bit process.) + Si la valeur est true et que l'ordinateur actuel est de type 64 bits, exécutez F# Interactive en tant que processus 64 bits. (Sinon, F# Interactive est un processus 32 bits.) + + + + F# Interactive options + Options de F# Interactive + + + + Additional command line arguments passed to the F# Interactive executable by Visual Studio. (optimization and debug flags are ignored if script debugging is enabled) + Arguments supplémentaires de la ligne de commande passés à l'exécutable F# Interactive par Visual Studio. (les indicateurs d'optimisation et de débogage sont ignorés si le débogage de script est activé) + + + + Misc + Divers + + + + Shadow copy assemblies + Assemblys de cliché instantané + + + + Prevents referenced assemblies from being locked by the F# Interactive process. + Empêche le blocage des assemblys référencés par le processus de F# Interactive. + + + + Enable script debugging + Activer le débogage de script + + + + Enable debugging of F# scripts (may impact script performance, requires reset of F# Interactive) + Activer le débogage des scripts F# (peut avoir un impact sur la performance des scripts, requiert une réinitialisation de F# Interactive) + + + + Debugging + Débogage + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.VS.FSI/xlf/Properties.it.xlf b/vsintegration/src/FSharp.VS.FSI/xlf/Properties.it.xlf new file mode 100644 index 00000000000..3ab00cc2b5c --- /dev/null +++ b/vsintegration/src/FSharp.VS.FSI/xlf/Properties.it.xlf @@ -0,0 +1,57 @@ + + + + + + 64-bit F# Interactive + F# Interactive a 64 bit + + + + If set to true, and the current machine is 64-bit, then run F# Interactive as a 64-bit process. (Otherwise, F# Interactive is a 32-bit process.) + Se impostato su true, e il computer corrente è a 64 bit, eseguire F# Interactive come processo a 64 bit. In caso contrario, F# Interactive è un processo a 32 bit. + + + + F# Interactive options + Opzioni di F# Interactive + + + + Additional command line arguments passed to the F# Interactive executable by Visual Studio. (optimization and debug flags are ignored if script debugging is enabled) + Argomenti aggiuntivi della riga di comando passati all'eseguibile F# Interactive da Visual Studio. Se è abilitato il debug di script, i flag di ottimizzazione e debug vengono ignorati. + + + + Misc + Varie + + + + Shadow copy assemblies + Assembly copie shadow + + + + Prevents referenced assemblies from being locked by the F# Interactive process. + Impedisce che assembly di riferimento vengano bloccati dal processo F# Interactive. + + + + Enable script debugging + Abilita debug di script + + + + Enable debugging of F# scripts (may impact script performance, requires reset of F# Interactive) + Abilita il debug di script F#. Può influire sulle prestazioni degli script e richiede la reimpostazione di F# Interactive. + + + + Debugging + Debug + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.VS.FSI/xlf/Properties.ja.xlf b/vsintegration/src/FSharp.VS.FSI/xlf/Properties.ja.xlf new file mode 100644 index 00000000000..2ecad3011a8 --- /dev/null +++ b/vsintegration/src/FSharp.VS.FSI/xlf/Properties.ja.xlf @@ -0,0 +1,57 @@ + + + + + + 64-bit F# Interactive + 64 ビット F# インタラクティブ + + + + If set to true, and the current machine is 64-bit, then run F# Interactive as a 64-bit process. (Otherwise, F# Interactive is a 32-bit process.) + true に設定されていて、現在のコンピューターが 64 ビットである場合は、F# インタラクティブを 64 ビット プロセスで実行してください (そうしないと、F# インタラクティブは 32 ビット プロセスになります)。 + + + + F# Interactive options + F# インタラクティブ オプション + + + + Additional command line arguments passed to the F# Interactive executable by Visual Studio. (optimization and debug flags are ignored if script debugging is enabled) + 追加のコマンド ライン引数が Visual Studio によって F# インタラクティブ実行可能ファイルに渡されました。(スクリプト デバッグが有効な場合、最適化とデバッグのフラグは無視されます) + + + + Misc + その他 + + + + Shadow copy assemblies + シャドウ コピーのアセンブリ + + + + Prevents referenced assemblies from being locked by the F# Interactive process. + 参照アセンブリを F# インタラクティブ プロセスによってロックされないようにします。 + + + + Enable script debugging + スクリプト デバッグを有効にする + + + + Enable debugging of F# scripts (may impact script performance, requires reset of F# Interactive) + F# スクリプトのデバッグを有効にする (スクリプトのパフォーマンスに影響を与える可能性があります。F# インタラクティブのリセットが必要です) + + + + Debugging + デバッグ + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.VS.FSI/xlf/Properties.ko.xlf b/vsintegration/src/FSharp.VS.FSI/xlf/Properties.ko.xlf new file mode 100644 index 00000000000..b030fad5e50 --- /dev/null +++ b/vsintegration/src/FSharp.VS.FSI/xlf/Properties.ko.xlf @@ -0,0 +1,57 @@ + + + + + + 64-bit F# Interactive + 64비트 F# 대화형 + + + + If set to true, and the current machine is 64-bit, then run F# Interactive as a 64-bit process. (Otherwise, F# Interactive is a 32-bit process.) + true로 설정하는 경우 현재 컴퓨터가 64비트이면 F# 대화형을 64비트 프로세스로 실행하고, 그렇지 않으면 F# 대화형이 32비트 프로세스로 실행됩니다. + + + + F# Interactive options + F# 대화형 옵션 + + + + Additional command line arguments passed to the F# Interactive executable by Visual Studio. (optimization and debug flags are ignored if script debugging is enabled) + Visual Studio에서 F# 대화형 실행 파일로 전달되는 추가 명령줄 인수입니다. 스크립트 디버깅을 사용하도록 설정한 경우 최적화 및 디버그 플래그는 무시됩니다. + + + + Misc + 기타 + + + + Shadow copy assemblies + 섀도 복사본 어셈블리 + + + + Prevents referenced assemblies from being locked by the F# Interactive process. + 참조된 어셈블리가 F# 대화형 프로세스에 의해 잠기지 않도록 합니다. + + + + Enable script debugging + 스크립트 디버깅 사용 + + + + Enable debugging of F# scripts (may impact script performance, requires reset of F# Interactive) + F# 스크립트 디버깅 사용(스크립트 성능에 영향을 주고, F# 대화형을 다시 설정해야 할 수 있음) + + + + Debugging + 디버깅 + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.VS.FSI/xlf/Properties.pl.xlf b/vsintegration/src/FSharp.VS.FSI/xlf/Properties.pl.xlf new file mode 100644 index 00000000000..48e1694269a --- /dev/null +++ b/vsintegration/src/FSharp.VS.FSI/xlf/Properties.pl.xlf @@ -0,0 +1,57 @@ + + + + + + 64-bit F# Interactive + 64-bitowe narzędzie F# Interactive + + + + If set to true, and the current machine is 64-bit, then run F# Interactive as a 64-bit process. (Otherwise, F# Interactive is a 32-bit process.) + Jeśli ustawiono wartość true i obecnie jest używany komputer 64-bitowy, należy uruchomić narzędzie F# Interactive jako proces 64-bitowy. W przeciwnym razie narzędzie F# Interactive zostanie uruchomione jako proces 32-bitowy. + + + + F# Interactive options + Opcje narzędzia F# Interactive + + + + Additional command line arguments passed to the F# Interactive executable by Visual Studio. (optimization and debug flags are ignored if script debugging is enabled) + Argumenty wiersza polecenia przekazywane do pliku wykonywalnego narzędzia F# Interactive przez program Visual Studio. (Flagi optymalizacji i debugowania są ignorowane, jeśli włączone jest debugowanie skryptów). + + + + Misc + Różne + + + + Shadow copy assemblies + Zestawy kopii w tle + + + + Prevents referenced assemblies from being locked by the F# Interactive process. + Uniemożliwia blokowanie zestawów występujących w odwołaniach przez proces narzędzia F# Interactive. + + + + Enable script debugging + Włącz debugowanie skryptów + + + + Enable debugging of F# scripts (may impact script performance, requires reset of F# Interactive) + Włącz debugowanie skryptów w języku F# (może to mieć wpływ na wydajność skryptów, wymaga zresetowania narzędzia F# Interactive) + + + + Debugging + Debugowanie + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.VS.FSI/xlf/Properties.pt-BR.xlf b/vsintegration/src/FSharp.VS.FSI/xlf/Properties.pt-BR.xlf new file mode 100644 index 00000000000..39b9925257b --- /dev/null +++ b/vsintegration/src/FSharp.VS.FSI/xlf/Properties.pt-BR.xlf @@ -0,0 +1,57 @@ + + + + + + 64-bit F# Interactive + F# Interativo de 64 bits + + + + If set to true, and the current machine is 64-bit, then run F# Interactive as a 64-bit process. (Otherwise, F# Interactive is a 32-bit process.) + Se estiver definido como true, e o computador atual for 64 bits, execute o F# Interativo como um processo de 64 bits. (Caso contrário, o F# Interativo será um processo de 32 bits.) + + + + F# Interactive options + Opções F# Interativo + + + + Additional command line arguments passed to the F# Interactive executable by Visual Studio. (optimization and debug flags are ignored if script debugging is enabled) + Argumentos da linha de comando adicionais passados para o executável do F# Interativo pelo Visual Studio (sinalizadores de depuração e otimização são ignorados se a depuração do script estiver habilitada) + + + + Misc + Diversos + + + + Shadow copy assemblies + Assemblies de cópia de sombra + + + + Prevents referenced assemblies from being locked by the F# Interactive process. + Impede que os assemblies referenciados sejam bloqueados pelo processo de F# Interativo. + + + + Enable script debugging + Habilitar depuração de script + + + + Enable debugging of F# scripts (may impact script performance, requires reset of F# Interactive) + Habilitar depuração de scripts do F# (pode impactar o desempenho do script; requer reinicialização do F# Interativo) + + + + Debugging + Depuração + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.VS.FSI/xlf/Properties.ru.xlf b/vsintegration/src/FSharp.VS.FSI/xlf/Properties.ru.xlf new file mode 100644 index 00000000000..b8733de8c12 --- /dev/null +++ b/vsintegration/src/FSharp.VS.FSI/xlf/Properties.ru.xlf @@ -0,0 +1,57 @@ + + + + + + 64-bit F# Interactive + F# Interactive, 64-разрядная версия + + + + If set to true, and the current machine is 64-bit, then run F# Interactive as a 64-bit process. (Otherwise, F# Interactive is a 32-bit process.) + Если задано значение true и текущий компьютер является 64-разрядным, F# Interactive запускается как 64-разрядный процесс. (В остальных случая F# Interactive является 32-разрядным процессом.) + + + + F# Interactive options + Параметры F# Interactive + + + + Additional command line arguments passed to the F# Interactive executable by Visual Studio. (optimization and debug flags are ignored if script debugging is enabled) + Дополнительные аргументы командной строки, передаваемые исполняемому файлу F# Interactive из Visual Studio. Оптимизация и флаги отладки игнорируются, если включена отладка скриптов. + + + + Misc + Прочее + + + + Shadow copy assemblies + Теневое копирование сборок + + + + Prevents referenced assemblies from being locked by the F# Interactive process. + Предотвращает блокировку сборок, на которые указаны ссылки, процессом F# Interactive. + + + + Enable script debugging + Включить отладку скриптов + + + + Enable debugging of F# scripts (may impact script performance, requires reset of F# Interactive) + Включение отладки скриптов F# (может повлиять на их производительность, необходим сброс F# Interactive). + + + + Debugging + Отладка + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.VS.FSI/xlf/Properties.tr.xlf b/vsintegration/src/FSharp.VS.FSI/xlf/Properties.tr.xlf new file mode 100644 index 00000000000..5fef942b6e2 --- /dev/null +++ b/vsintegration/src/FSharp.VS.FSI/xlf/Properties.tr.xlf @@ -0,0 +1,57 @@ + + + + + + 64-bit F# Interactive + 64 bit F# Etkileşimli + + + + If set to true, and the current machine is 64-bit, then run F# Interactive as a 64-bit process. (Otherwise, F# Interactive is a 32-bit process.) + True olarak ayarlanırsa ve geçerli makine 64 bit ise F# Etkileşimli'yi 64 bit işlem olarak çalıştırın. (Aksi takdirde F# Etkileşimli 32 bit işlemdir.) + + + + F# Interactive options + F# Etkileşimli seçenekleri + + + + Additional command line arguments passed to the F# Interactive executable by Visual Studio. (optimization and debug flags are ignored if script debugging is enabled) + Visual Studio tarafından çalıştırılabilen F# Etkileşimli'ye geçirilmiş ek komut satırı bağımsız değişkenleri. (Betik hata ayıklaması etkinleştirilmişse en iyi duruma getirme ve hata ayıklama bayrakları yok sayılır.) + + + + Misc + Çeşitli + + + + Shadow copy assemblies + Gölge kopya bütünleştirilmiş kodları + + + + Prevents referenced assemblies from being locked by the F# Interactive process. + Başvurulan bütünleştirilmiş kodların F# Etkileşimli işlemi tarafından kilitlenmesini engeller. + + + + Enable script debugging + Betik hata ayıklamayı etkinleştir + + + + Enable debugging of F# scripts (may impact script performance, requires reset of F# Interactive) + F# betiklerinde hata ayıklamayı etkinleştir (betik performansını etkileyebilir, F# Etkileşimli'nin sıfırlanmasını gerektirir) + + + + Debugging + Hata Ayıklama + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.VS.FSI/xlf/Properties.zh-Hans.xlf b/vsintegration/src/FSharp.VS.FSI/xlf/Properties.zh-Hans.xlf new file mode 100644 index 00000000000..19c14755929 --- /dev/null +++ b/vsintegration/src/FSharp.VS.FSI/xlf/Properties.zh-Hans.xlf @@ -0,0 +1,57 @@ + + + + + + 64-bit F# Interactive + 64 位 F# 交互窗口 + + + + If set to true, and the current machine is 64-bit, then run F# Interactive as a 64-bit process. (Otherwise, F# Interactive is a 32-bit process.) + 如果设为 true,且当前计算机是 64 位的,则将 F# 交互窗口作为 64 位进程运行。(否则,F# 交互窗口为 32 位进程。) + + + + F# Interactive options + F# 交互窗口选项 + + + + Additional command line arguments passed to the F# Interactive executable by Visual Studio. (optimization and debug flags are ignored if script debugging is enabled) + 其他命令行参数传递到 Visual Studio 执行的 F# 交互窗口可执行文件。(若已启动脚本调试,则忽略优化和调试标志) + + + + Misc + 杂项 + + + + Shadow copy assemblies + 卷影副本程序集 + + + + Prevents referenced assemblies from being locked by the F# Interactive process. + 防止被引用的程序集被 F# 交互窗口进程锁定。 + + + + Enable script debugging + 启用脚本调试 + + + + Enable debugging of F# scripts (may impact script performance, requires reset of F# Interactive) + 启用 F# 脚本的调试(可能会影响脚本性能,需要重置 F# 交互窗口) + + + + Debugging + 正在调试 + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.VS.FSI/xlf/Properties.zh-Hant.xlf b/vsintegration/src/FSharp.VS.FSI/xlf/Properties.zh-Hant.xlf new file mode 100644 index 00000000000..dd4f7af3268 --- /dev/null +++ b/vsintegration/src/FSharp.VS.FSI/xlf/Properties.zh-Hant.xlf @@ -0,0 +1,57 @@ + + + + + + 64-bit F# Interactive + 64 位元 F# 互動 + + + + If set to true, and the current machine is 64-bit, then run F# Interactive as a 64-bit process. (Otherwise, F# Interactive is a 32-bit process.) + 如果設為 true,並且目前電腦為 64 位元,則 F# 互動會當做 64 位元處理序來執行 (反之,F# 互動則為 32 位元處理序)。 + + + + F# Interactive options + F# 互動選項 + + + + Additional command line arguments passed to the F# Interactive executable by Visual Studio. (optimization and debug flags are ignored if script debugging is enabled) + 由 Visual Studio 額外傳遞給 F# 互動可執行檔的命令列引數。(若啟用指令碼偵錯,則會忽略最佳化及偵錯旗標) + + + + Misc + 其他 + + + + Shadow copy assemblies + 陰影複製組件 + + + + Prevents referenced assemblies from being locked by the F# Interactive process. + 避免參考的組件遭 F# 互動處理序封鎖。 + + + + Enable script debugging + 啟用指令碼偵錯 + + + + Enable debugging of F# scripts (may impact script performance, requires reset of F# Interactive) + 啟用 F# 指令碼偵錯 (可能會影響指令碼效能,必須重設 F# 互動) + + + + Debugging + 偵錯 + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.VS.FSI/xlf/VFSIstrings.txt.cs.xlf b/vsintegration/src/FSharp.VS.FSI/xlf/VFSIstrings.txt.cs.xlf new file mode 100644 index 00000000000..82a60809e79 --- /dev/null +++ b/vsintegration/src/FSharp.VS.FSI/xlf/VFSIstrings.txt.cs.xlf @@ -0,0 +1,57 @@ + + + + + + Cannot create window F# Interactive ToolWindow + Nedá se vytvořit Okno nástroje F# Interactive. + + + + Exception raised when creating remoting client for launched fsi.exe\n{0} + Při vytváření klienta vzdálené komunikace pro spuštěný soubor fsi.exe se vyvolala výjimka:\n{0} + + + + Exception raised when requesting FSI ToolWindow.\n{0} + Při požadování Okna nástrojů FSI se vyvolala výjimka.\n{0} + + + + Could not load F# language service + Nepovedlo se načíst službu jazyka F#. + + + + Session termination detected. Press Enter to restart. + Zjistilo se ukončení relace. Pokračovat můžete stisknutím klávesy Enter. + + + + F# Interactive + F# Interactive + + + + Could not find fsi.exe, the F# Interactive executable.\nThis file does not exist:\n\n{0}\n + Nepovedlo se najít soubor fsi.exe, spustitelný soubor F# Interactive.\nTento soubor neexistuje:\n\n{0}\n + + + + Killing process raised exception:\n{0} + Proces rušení vyvolal výjimku:\n{0} + + + + The current F# Interactive session is not configured for debugging. For the best experience, enable debugging in F# Interactive settings, then reset the session.\n\nAttempt debugging with current settings? + Aktuální relace F# Interactive není nakonfigurovaná pro ladění. Ladění bude fungovat nejlíp, když ho povolíte v nastavení F# Interactive a resetujete relaci.\n\nChcete zkusit ladit s aktuálním nastavením? + + + + Don't show this warning again + Toto upozornění příště nezobrazovat + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.VS.FSI/xlf/VFSIstrings.txt.de.xlf b/vsintegration/src/FSharp.VS.FSI/xlf/VFSIstrings.txt.de.xlf new file mode 100644 index 00000000000..e8dabd63d6b --- /dev/null +++ b/vsintegration/src/FSharp.VS.FSI/xlf/VFSIstrings.txt.de.xlf @@ -0,0 +1,57 @@ + + + + + + Cannot create window F# Interactive ToolWindow + Das F# Interactive-Toolfenster kann nicht erstellt werden. + + + + Exception raised when creating remoting client for launched fsi.exe\n{0} + Ausnahme beim Erstellen eines Remoteclients für die gestartete "fsi.exe".\n{0} + + + + Exception raised when requesting FSI ToolWindow.\n{0} + Ausnahme beim Anfordern von FSI ToolWindow.\n{0} + + + + Could not load F# language service + Der F#-Sprachendienst konnte nicht geladen werden. + + + + Session termination detected. Press Enter to restart. + Es wurde eine Beendigung der Sitzung erkannt. Drücken Sie die EINGABETASTE, um neu zu starten. + + + + F# Interactive + F# Interactive + + + + Could not find fsi.exe, the F# Interactive executable.\nThis file does not exist:\n\n{0}\n + Fsi.exe, die ausführbare F# Interactive-Datei, wurde nicht gefunden.\nDiese Datei ist nicht vorhanden:\n\n{0}\n + + + + Killing process raised exception:\n{0} + Ausnahme beim Entfernen:\n{0} + + + + The current F# Interactive session is not configured for debugging. For the best experience, enable debugging in F# Interactive settings, then reset the session.\n\nAttempt debugging with current settings? + Die aktuelle F# Interactive-Sitzung ist nicht für Debuggen konfiguriert. Um ein optimales Ergebnis zu erzielen, aktivieren Sie das Debuggen in den F# Interactive-Einstellungen, und setzen Sie anschließend die Sitzung zurück.\n\nDebuggen mit den aktuellen Einstellungen versuchen? + + + + Don't show this warning again + Diese Warnung nicht mehr anzeigen. + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.VS.FSI/xlf/VFSIstrings.txt.en.xlf b/vsintegration/src/FSharp.VS.FSI/xlf/VFSIstrings.txt.en.xlf new file mode 100644 index 00000000000..500b07c52cb --- /dev/null +++ b/vsintegration/src/FSharp.VS.FSI/xlf/VFSIstrings.txt.en.xlf @@ -0,0 +1,57 @@ + + + + + + Cannot create window F# Interactive ToolWindow + Cannot create window F# Interactive ToolWindow + + + + Exception raised when creating remoting client for launched fsi.exe\n{0} + Exception raised when creating remoting client for launched fsi.exe\n{0} + + + + Exception raised when requesting FSI ToolWindow.\n{0} + Exception raised when requesting FSI ToolWindow.\n{0} + + + + Could not load F# language service + Could not load F# language service + + + + Session termination detected. Press Enter to restart. + Session termination detected. Press Enter to restart. + + + + F# Interactive + F# Interactive + + + + Could not find fsi.exe, the F# Interactive executable.\nThis file does not exist:\n\n{0}\n + Could not find fsi.exe, the F# Interactive executable.\nThis file does not exist:\n\n{0}\n + + + + Killing process raised exception:\n{0} + Killing process raised exception:\n{0} + + + + The current F# Interactive session is not configured for debugging. For the best experience, enable debugging in F# Interactive settings, then reset the session.\n\nAttempt debugging with current settings? + The current F# Interactive session is not configured for debugging. For the best experience, enable debugging in F# Interactive settings, then reset the session.\n\nAttempt debugging with current settings? + + + + Don't show this warning again + Don't show this warning again + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.VS.FSI/xlf/VFSIstrings.txt.es.xlf b/vsintegration/src/FSharp.VS.FSI/xlf/VFSIstrings.txt.es.xlf new file mode 100644 index 00000000000..8fafdfe73df --- /dev/null +++ b/vsintegration/src/FSharp.VS.FSI/xlf/VFSIstrings.txt.es.xlf @@ -0,0 +1,57 @@ + + + + + + Cannot create window F# Interactive ToolWindow + No se puede crear la ventana ToolWindow de F# interactivo. + + + + Exception raised when creating remoting client for launched fsi.exe\n{0} + Se generó una excepción al crear el cliente remoto para el archivo fsi.exe iniciado.\n{0} + + + + Exception raised when requesting FSI ToolWindow.\n{0} + Se generó una excepción al solicitar ToolWindow de FSI.\n{0} + + + + Could not load F# language service + No se pudo cargar el servicio del lenguaje F#. + + + + Session termination detected. Press Enter to restart. + Se detectó una terminación de sesión. Presione Entrar para reiniciar. + + + + F# Interactive + F# interactivo + + + + Could not find fsi.exe, the F# Interactive executable.\nThis file does not exist:\n\n{0}\n + No se encontró el archivo fsi.exe, ejecutable de F# interactivo.\nEste archivo no existe:\n\n{0}\n + + + + Killing process raised exception:\n{0} + El proceso de eliminación generó una excepción:\n{0} + + + + The current F# Interactive session is not configured for debugging. For the best experience, enable debugging in F# Interactive settings, then reset the session.\n\nAttempt debugging with current settings? + La sesión actual de F# interactivo no está configurada para la depuración. Para obtener el mejor rendimiento, habilite la depuración en la configuración de F# interactivo y, a continuación, restablezca la sesión.\n\n¿Desea intentar la depuración con la configuración actual? + + + + Don't show this warning again + No volver a mostrar esta advertencia + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.VS.FSI/xlf/VFSIstrings.txt.fr.xlf b/vsintegration/src/FSharp.VS.FSI/xlf/VFSIstrings.txt.fr.xlf new file mode 100644 index 00000000000..14025011c11 --- /dev/null +++ b/vsintegration/src/FSharp.VS.FSI/xlf/VFSIstrings.txt.fr.xlf @@ -0,0 +1,57 @@ + + + + + + Cannot create window F# Interactive ToolWindow + Impossible de créer la fenêtre F# Interactive ToolWindow + + + + Exception raised when creating remoting client for launched fsi.exe\n{0} + Exception déclenchée lors de la création du client de communication à distance pour le fichier fsi.exe lancé\n{0} + + + + Exception raised when requesting FSI ToolWindow.\n{0} + Exception déclenchée lors de la demande de ToolWindow FSI.\n{0} + + + + Could not load F# language service + Impossible de charger le service de langage F# + + + + Session termination detected. Press Enter to restart. + Fin de session détectée. Appuyez sur Entrée pour redémarrer. + + + + F# Interactive + F# Interactive + + + + Could not find fsi.exe, the F# Interactive executable.\nThis file does not exist:\n\n{0}\n + Impossible de trouver fsi.exe, l'exécutable F# Interactive.\nCe fichier n'existe pas :\n\n{0}\n + + + + Killing process raised exception:\n{0} + La suppression du processus a déclenché une exception :\n{0} + + + + The current F# Interactive session is not configured for debugging. For the best experience, enable debugging in F# Interactive settings, then reset the session.\n\nAttempt debugging with current settings? + La session F# Interactive actuelle n'est pas configurée pour le débogage. Pour une meilleure expérience, activez le débogage dans les paramètres de F# Interactive, puis réinitialisez la session.\n\nEssayer de déboguer avec les paramètres actuels ? + + + + Don't show this warning again + Ne plus afficher cet avertissement + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.VS.FSI/xlf/VFSIstrings.txt.it.xlf b/vsintegration/src/FSharp.VS.FSI/xlf/VFSIstrings.txt.it.xlf new file mode 100644 index 00000000000..5f2b1b679c9 --- /dev/null +++ b/vsintegration/src/FSharp.VS.FSI/xlf/VFSIstrings.txt.it.xlf @@ -0,0 +1,57 @@ + + + + + + Cannot create window F# Interactive ToolWindow + Non è possibile creare la finestra ToolWindow di F# Interactive + + + + Exception raised when creating remoting client for launched fsi.exe\n{0} + Eccezione durante la creazione del client remoto per il file fsi.exe avviato\n{0} + + + + Exception raised when requesting FSI ToolWindow.\n{0} + Eccezione durante la richiesta di FSI ToolWindow.\n{0} + + + + Could not load F# language service + Non è stato possibile caricare il servizio di linguaggio F# + + + + Session termination detected. Press Enter to restart. + Rilevata terminazione di sessione. Premere INVIO per riavviare. + + + + F# Interactive + F# Interactive + + + + Could not find fsi.exe, the F# Interactive executable.\nThis file does not exist:\n\n{0}\n + L'eseguibile di F# Interactive fsi.exe non è stato trovato.\nQuesto file non esiste:\n\n{0}\n + + + + Killing process raised exception:\n{0} + La chiusura del processo ha generato un'eccezione:\n{0} + + + + The current F# Interactive session is not configured for debugging. For the best experience, enable debugging in F# Interactive settings, then reset the session.\n\nAttempt debugging with current settings? + La sessione corrente di F# Interactive non è configurata per il debug. Per un'esperienza ottimale, abilitare il debug nelle impostazioni di F# Interactive, quindi reimpostare la sessione.\n\nProvare a eseguire il debug con le impostazioni correnti? + + + + Don't show this warning again + Non visualizzare più questo avviso + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.VS.FSI/xlf/VFSIstrings.txt.ja.xlf b/vsintegration/src/FSharp.VS.FSI/xlf/VFSIstrings.txt.ja.xlf new file mode 100644 index 00000000000..83d693f545f --- /dev/null +++ b/vsintegration/src/FSharp.VS.FSI/xlf/VFSIstrings.txt.ja.xlf @@ -0,0 +1,57 @@ + + + + + + Cannot create window F# Interactive ToolWindow + F# Interactive ToolWindow ウィンドウを作成できません + + + + Exception raised when creating remoting client for launched fsi.exe\n{0} + 起動した fsi.exe のリモート処理クライアントの作成中に例外が発生しました\n{0} + + + + Exception raised when requesting FSI ToolWindow.\n{0} + FSI ToolWindow の要求中に例外が発生しました。\n{0} + + + + Could not load F# language service + F# 言語サービスを読み込めませんでした + + + + Session termination detected. Press Enter to restart. + セッションの終了が検出されました。再開する場合は Enter キーを押してください。 + + + + F# Interactive + F# インタラクティブ + + + + Could not find fsi.exe, the F# Interactive executable.\nThis file does not exist:\n\n{0}\n + F# インタラクティブ実行可能ファイルである fsi.exe が見つかりませんでした。\nこのファイルは存在しません:\n\n{0}\n + + + + Killing process raised exception:\n{0} + プロセスの中止中に例外が発生しました:\n{0} + + + + The current F# Interactive session is not configured for debugging. For the best experience, enable debugging in F# Interactive settings, then reset the session.\n\nAttempt debugging with current settings? + 現在の F# インタラクティブ セッションは、デバッグのために構成されていません。最適にご利用いただくには、F# インタラクティブ設定でデバッグを有効にし、セッションをリセットしてください。\n\n現在の設定でデバッグを試みますか? + + + + Don't show this warning again + この警告を今後表示しない + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.VS.FSI/xlf/VFSIstrings.txt.ko.xlf b/vsintegration/src/FSharp.VS.FSI/xlf/VFSIstrings.txt.ko.xlf new file mode 100644 index 00000000000..5f01c48a662 --- /dev/null +++ b/vsintegration/src/FSharp.VS.FSI/xlf/VFSIstrings.txt.ko.xlf @@ -0,0 +1,57 @@ + + + + + + Cannot create window F# Interactive ToolWindow + F# 대화형 ToolWindow 창을 만들 수 없습니다. + + + + Exception raised when creating remoting client for launched fsi.exe\n{0} + 시작된 fsi.exe에 대한 원격 클라이언트를 만들 때 예외가 발생했습니다.\n{0} + + + + Exception raised when requesting FSI ToolWindow.\n{0} + FSI ToolWindow를 요청하는 동안 예외가 발생했습니다.\n{0} + + + + Could not load F# language service + F# 언어 서비스를 로드할 수 없습니다. + + + + Session termination detected. Press Enter to restart. + 세션 종료가 검색되었습니다. 다시 시작하려면 <Enter> 키를 누르세요. + + + + F# Interactive + F# 대화형 + + + + Could not find fsi.exe, the F# Interactive executable.\nThis file does not exist:\n\n{0}\n + F# 대화형 실행 파일 fsi.exe를 찾을 수 없습니다.\n이 파일이 없습니다.\n\n{0}\n + + + + Killing process raised exception:\n{0} + 프로세스를 종료할 때 예외가 발생했습니다.\n{0} + + + + The current F# Interactive session is not configured for debugging. For the best experience, enable debugging in F# Interactive settings, then reset the session.\n\nAttempt debugging with current settings? + 현재 F# 대화형 세션이 디버깅용으로 구성되지 않았습니다. 최상의 환경을 유지하려면 F# 대화형 설정에서 디버깅을 사용하도록 설정한 다음, 세션을 다시 설정하세요.\n\n현재 설정으로 디버깅을 시도하시겠습니까? + + + + Don't show this warning again + 이 경고 메시지를 다시 표시 안 함 + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.VS.FSI/xlf/VFSIstrings.txt.pl.xlf b/vsintegration/src/FSharp.VS.FSI/xlf/VFSIstrings.txt.pl.xlf new file mode 100644 index 00000000000..34a64865416 --- /dev/null +++ b/vsintegration/src/FSharp.VS.FSI/xlf/VFSIstrings.txt.pl.xlf @@ -0,0 +1,57 @@ + + + + + + Cannot create window F# Interactive ToolWindow + Nie można utworzyć okna ToolWindow narzędzia F# Interactive + + + + Exception raised when creating remoting client for launched fsi.exe\n{0} + Wywołano wyjątek podczas tworzenia klienta zdalnego dla uruchomionego pliku fsi.exe\n{0} + + + + Exception raised when requesting FSI ToolWindow.\n{0} + Wywołano wyjątek podczas żądania elementu ToolWindow narzędzia FSI.\n{0} + + + + Could not load F# language service + Nie można załadować usługi języka F# + + + + Session termination detected. Press Enter to restart. + Wykryto zakończenie sesji. Naciśnij klawisz Enter, aby uruchomić ją ponownie. + + + + F# Interactive + F# Interactive + + + + Could not find fsi.exe, the F# Interactive executable.\nThis file does not exist:\n\n{0}\n + Nie można odnaleźć pliku wykonywalnego narzędzia F# Interactive (fsi.exe).\nTen plik nie istnieje:\n\n{0}\n + + + + Killing process raised exception:\n{0} + Zamknięcie procesu wywołało wyjątek:\n{0} + + + + The current F# Interactive session is not configured for debugging. For the best experience, enable debugging in F# Interactive settings, then reset the session.\n\nAttempt debugging with current settings? + Bieżąca sesja narzędzia F# Interactive nie jest skonfigurowana do debugowania. Aby uzyskać najlepszy efekt, włącz debugowanie w ustawieniach narzędzia F# Interactive, a następnie zresetuj sesję.\n\nPodjąć próbę debugowania z bieżącymi ustawieniami? + + + + Don't show this warning again + Nie pokazuj tego ostrzeżenia ponownie + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.VS.FSI/xlf/VFSIstrings.txt.pt-BR.xlf b/vsintegration/src/FSharp.VS.FSI/xlf/VFSIstrings.txt.pt-BR.xlf new file mode 100644 index 00000000000..50aff667659 --- /dev/null +++ b/vsintegration/src/FSharp.VS.FSI/xlf/VFSIstrings.txt.pt-BR.xlf @@ -0,0 +1,57 @@ + + + + + + Cannot create window F# Interactive ToolWindow + Não é possível criar a Janela F# Interativo ToolWindow + + + + Exception raised when creating remoting client for launched fsi.exe\n{0} + Exceção gerada durante a criação de cliente remoto pelo fsi.exe inicializado\n{0} + + + + Exception raised when requesting FSI ToolWindow.\n{0} + Exceção gerada na solicitação de ToolWindow FSI.\n{0} + + + + Could not load F# language service + Não foi possível carregar o serviço de linguagem F# + + + + Session termination detected. Press Enter to restart. + Encerramento da sessão detectado. Pressione a tecla Enter para reiniciar. + + + + F# Interactive + F# Interativo + + + + Could not find fsi.exe, the F# Interactive executable.\nThis file does not exist:\n\n{0}\n + Não foi possível encontrar fsi.exe, o Executável F# Interativo.\nEste arquivo não existe:\n\n{0}\n + + + + Killing process raised exception:\n{0} + Processo fatal abriu exceção:\n{0} + + + + The current F# Interactive session is not configured for debugging. For the best experience, enable debugging in F# Interactive settings, then reset the session.\n\nAttempt debugging with current settings? + A sessão do F# Interativo atual não está configurada para depuração. Para uma melhor experiência, habilite a depuração nas configurações do F# Interativo e, em seguida, redefina a sessão de depuração.\n\nDeseja tentar a depuração com as configurações atuais? + + + + Don't show this warning again + Não mostrar este aviso novamente + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.VS.FSI/xlf/VFSIstrings.txt.ru.xlf b/vsintegration/src/FSharp.VS.FSI/xlf/VFSIstrings.txt.ru.xlf new file mode 100644 index 00000000000..c0b711f3b86 --- /dev/null +++ b/vsintegration/src/FSharp.VS.FSI/xlf/VFSIstrings.txt.ru.xlf @@ -0,0 +1,57 @@ + + + + + + Cannot create window F# Interactive ToolWindow + Не удается создать окно инструментов F# Interactive + + + + Exception raised when creating remoting client for launched fsi.exe\n{0} + Возникло исключение при создании удаленного клиента для запущенного файла fsi.exe\n{0} + + + + Exception raised when requesting FSI ToolWindow.\n{0} + Возникло исключение при запросе окна инструментов FSI.\n{0} + + + + Could not load F# language service + Не удалось загрузить службу языка F# + + + + Session termination detected. Press Enter to restart. + Обнаружено прекращение сеанса. Нажмите клавишу ВВОД для перезапуска. + + + + F# Interactive + F# Interactive + + + + Could not find fsi.exe, the F# Interactive executable.\nThis file does not exist:\n\n{0}\n + Не удалось найти fsi.exe, исполняемый файл F# Interactive.\nЭтот файл не существует:\n\n{0}\n + + + + Killing process raised exception:\n{0} + Прерывание процесса вызвало исключение:\n{0} + + + + The current F# Interactive session is not configured for debugging. For the best experience, enable debugging in F# Interactive settings, then reset the session.\n\nAttempt debugging with current settings? + Текущий сеанс F# Interactive не настроен для отладки. Для достижения наилучших результатов включите отладку в настройках F# Interactive, затем выполните сброс сеанса.\n\nПопробовать выполнить отладку с текущими настройками? + + + + Don't show this warning again + Больше не показывать это предупреждение + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.VS.FSI/xlf/VFSIstrings.txt.tr.xlf b/vsintegration/src/FSharp.VS.FSI/xlf/VFSIstrings.txt.tr.xlf new file mode 100644 index 00000000000..6d80fb6bee6 --- /dev/null +++ b/vsintegration/src/FSharp.VS.FSI/xlf/VFSIstrings.txt.tr.xlf @@ -0,0 +1,57 @@ + + + + + + Cannot create window F# Interactive ToolWindow + F# Etkileşimli ToolWindow penceresi oluşturulamıyor + + + + Exception raised when creating remoting client for launched fsi.exe\n{0} + Başlatılmış fsi.exe için uzaktan iletişim istemcisi oluşturulurken özel durum tetiklendi\n{0} + + + + Exception raised when requesting FSI ToolWindow.\n{0} + FSI ToolWindow istenirken özel durum tetiklendi.\n{0} + + + + Could not load F# language service + F# dil hizmeti yüklenemedi + + + + Session termination detected. Press Enter to restart. + Oturum sonlandırma algılandı. Yeniden başlatmak için Enter'a basın. + + + + F# Interactive + F# Etkileşimli + + + + Could not find fsi.exe, the F# Interactive executable.\nThis file does not exist:\n\n{0}\n + F# Etkileşimli çalıştırılabilir dosyası olan fsi.exe bulunamıyor.\nBu dosya yok:\n\n{0}\n + + + + Killing process raised exception:\n{0} + Sonlandırma işlemi özel durum tetikledi:\n{0} + + + + The current F# Interactive session is not configured for debugging. For the best experience, enable debugging in F# Interactive settings, then reset the session.\n\nAttempt debugging with current settings? + Geçerli F# Etkileşimli oturumu hata ayıklama için yapılandırılmamış. En iyi deneyim için, F# Etkileşimli ayarlarında hata ayıklamayı etkinleştirin ve ardından oturumu sıfırlayın.\n\nGeçerli ayarlarla hata ayıklama denensin mi? + + + + Don't show this warning again + Bu uyarıyı bir daha gösterme + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.VS.FSI/xlf/VFSIstrings.txt.zh-Hans.xlf b/vsintegration/src/FSharp.VS.FSI/xlf/VFSIstrings.txt.zh-Hans.xlf new file mode 100644 index 00000000000..3124ad32361 --- /dev/null +++ b/vsintegration/src/FSharp.VS.FSI/xlf/VFSIstrings.txt.zh-Hans.xlf @@ -0,0 +1,57 @@ + + + + + + Cannot create window F# Interactive ToolWindow + 无法创建“F# 交互窗口”工具窗口 + + + + Exception raised when creating remoting client for launched fsi.exe\n{0} + 在为启动的 fsi.exe 创建远程处理客户端时发生异常\n{0} + + + + Exception raised when requesting FSI ToolWindow.\n{0} + 在请求 FSI ToolWindow 时发生异常。\n{0} + + + + Could not load F# language service + 未能加载 F# 语言服务 + + + + Session termination detected. Press Enter to restart. + 检测到会话已终止。请按 Enter 重新启动会话。 + + + + F# Interactive + F# 交互窗口 + + + + Could not find fsi.exe, the F# Interactive executable.\nThis file does not exist:\n\n{0}\n + 未能找到 F# 交互窗口可执行文件 fsi.exe。\n此文件不存在:\n\n{0}\n + + + + Killing process raised exception:\n{0} + 取消进程引发了异常:\n{0} + + + + The current F# Interactive session is not configured for debugging. For the best experience, enable debugging in F# Interactive settings, then reset the session.\n\nAttempt debugging with current settings? + 当前 F# 窗口会话未进行调试配置。为实现最佳体验,请启用 F# 交互窗口设置中的调试,然后重置会话。\n\n是否尝试用当前设置进行调试? + + + + Don't show this warning again + 不要再次显示此警告 + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.VS.FSI/xlf/VFSIstrings.txt.zh-Hant.xlf b/vsintegration/src/FSharp.VS.FSI/xlf/VFSIstrings.txt.zh-Hant.xlf new file mode 100644 index 00000000000..ba06ff32813 --- /dev/null +++ b/vsintegration/src/FSharp.VS.FSI/xlf/VFSIstrings.txt.zh-Hant.xlf @@ -0,0 +1,57 @@ + + + + + + Cannot create window F# Interactive ToolWindow + 無法建立視窗 F# 互動工具視窗 + + + + Exception raised when creating remoting client for launched fsi.exe\n{0} + 建立已啟動之 fsi.exe 的遠端處理用戶端時發生例外狀況\n{0} + + + + Exception raised when requesting FSI ToolWindow.\n{0} + 要求 FSI 工具視窗時發生例外狀況。\n{0} + + + + Could not load F# language service + 無法載入 F# 語言服務 + + + + Session termination detected. Press Enter to restart. + 偵測到工作階段終止。請按 Enter 重新啟動。 + + + + F# Interactive + F# 互動 + + + + Could not find fsi.exe, the F# Interactive executable.\nThis file does not exist:\n\n{0}\n + 找不到 F# 互動可執行檔 fsi.exe。\n這個檔案不存在:\n\n{0}\n + + + + Killing process raised exception:\n{0} + 正在刪除引發例外狀況的處理序:\n{0} + + + + The current F# Interactive session is not configured for debugging. For the best experience, enable debugging in F# Interactive settings, then reset the session.\n\nAttempt debugging with current settings? + 目前的 F# 互動工作階段並未設定偵錯功能。最佳做法是啟用 F# 互動設定中的偵錯設定,然後重設此工作階段。\n\n要嘗試使用目前的設定進行偵錯嗎? + + + + Don't show this warning again + 不再顯示這項警告 + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.VS.FSI/xlf/VSPackage.cs.xlf b/vsintegration/src/FSharp.VS.FSI/xlf/VSPackage.cs.xlf new file mode 100644 index 00000000000..94409a3ba83 --- /dev/null +++ b/vsintegration/src/FSharp.VS.FSI/xlf/VSPackage.cs.xlf @@ -0,0 +1,12 @@ + + + + + + J1H0RTAZRQRKDEJ2I3A2PCIAPQQRQIDZI3CTKAIAQPJIE3EPHAMRRKAJCHI1PJM2CPDIRZKMMJHKPHJ9E1HDZHZDC1DEHHR0QIARA8RKA3PICCHAA3QKA1QMJZMKKZKZ + J1H0RTAZRQRKDEJ2I3A2PCIAPQQRQIDZI3CTKAIAQPJIE3EPHAMRRKAJCHI1PJM2CPDIRZKMMJHKPHJ9E1HDZHZDC1DEHHR0QIARA8RKA3PICCHAA3QKA1QMJZMKKZKZ + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.VS.FSI/xlf/VSPackage.de.xlf b/vsintegration/src/FSharp.VS.FSI/xlf/VSPackage.de.xlf new file mode 100644 index 00000000000..6d23fd5f296 --- /dev/null +++ b/vsintegration/src/FSharp.VS.FSI/xlf/VSPackage.de.xlf @@ -0,0 +1,12 @@ + + + + + + J1H0RTAZRQRKDEJ2I3A2PCIAPQQRQIDZI3CTKAIAQPJIE3EPHAMRRKAJCHI1PJM2CPDIRZKMMJHKPHJ9E1HDZHZDC1DEHHR0QIARA8RKA3PICCHAA3QKA1QMJZMKKZKZ + J1H0RTAZRQRKDEJ2I3A2PCIAPQQRQIDZI3CTKAIAQPJIE3EPHAMRRKAJCHI1PJM2CPDIRZKMMJHKPHJ9E1HDZHZDC1DEHHR0QIARA8RKA3PICCHAA3QKA1QMJZMKKZKZ + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.VS.FSI/xlf/VSPackage.en.xlf b/vsintegration/src/FSharp.VS.FSI/xlf/VSPackage.en.xlf new file mode 100644 index 00000000000..dd67c3bec33 --- /dev/null +++ b/vsintegration/src/FSharp.VS.FSI/xlf/VSPackage.en.xlf @@ -0,0 +1,12 @@ + + + + + + J1H0RTAZRQRKDEJ2I3A2PCIAPQQRQIDZI3CTKAIAQPJIE3EPHAMRRKAJCHI1PJM2CPDIRZKMMJHKPHJ9E1HDZHZDC1DEHHR0QIARA8RKA3PICCHAA3QKA1QMJZMKKZKZ + J1H0RTAZRQRKDEJ2I3A2PCIAPQQRQIDZI3CTKAIAQPJIE3EPHAMRRKAJCHI1PJM2CPDIRZKMMJHKPHJ9E1HDZHZDC1DEHHR0QIARA8RKA3PICCHAA3QKA1QMJZMKKZKZ + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.VS.FSI/xlf/VSPackage.es.xlf b/vsintegration/src/FSharp.VS.FSI/xlf/VSPackage.es.xlf new file mode 100644 index 00000000000..5dac8007e72 --- /dev/null +++ b/vsintegration/src/FSharp.VS.FSI/xlf/VSPackage.es.xlf @@ -0,0 +1,12 @@ + + + + + + J1H0RTAZRQRKDEJ2I3A2PCIAPQQRQIDZI3CTKAIAQPJIE3EPHAMRRKAJCHI1PJM2CPDIRZKMMJHKPHJ9E1HDZHZDC1DEHHR0QIARA8RKA3PICCHAA3QKA1QMJZMKKZKZ + J1H0RTAZRQRKDEJ2I3A2PCIAPQQRQIDZI3CTKAIAQPJIE3EPHAMRRKAJCHI1PJM2CPDIRZKMMJHKPHJ9E1HDZHZDC1DEHHR0QIARA8RKA3PICCHAA3QKA1QMJZMKKZKZ + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.VS.FSI/xlf/VSPackage.fr.xlf b/vsintegration/src/FSharp.VS.FSI/xlf/VSPackage.fr.xlf new file mode 100644 index 00000000000..13eee90d1bb --- /dev/null +++ b/vsintegration/src/FSharp.VS.FSI/xlf/VSPackage.fr.xlf @@ -0,0 +1,12 @@ + + + + + + J1H0RTAZRQRKDEJ2I3A2PCIAPQQRQIDZI3CTKAIAQPJIE3EPHAMRRKAJCHI1PJM2CPDIRZKMMJHKPHJ9E1HDZHZDC1DEHHR0QIARA8RKA3PICCHAA3QKA1QMJZMKKZKZ + J1H0RTAZRQRKDEJ2I3A2PCIAPQQRQIDZI3CTKAIAQPJIE3EPHAMRRKAJCHI1PJM2CPDIRZKMMJHKPHJ9E1HDZHZDC1DEHHR0QIARA8RKA3PICCHAA3QKA1QMJZMKKZKZ + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.VS.FSI/xlf/VSPackage.it.xlf b/vsintegration/src/FSharp.VS.FSI/xlf/VSPackage.it.xlf new file mode 100644 index 00000000000..3663e52ff36 --- /dev/null +++ b/vsintegration/src/FSharp.VS.FSI/xlf/VSPackage.it.xlf @@ -0,0 +1,12 @@ + + + + + + J1H0RTAZRQRKDEJ2I3A2PCIAPQQRQIDZI3CTKAIAQPJIE3EPHAMRRKAJCHI1PJM2CPDIRZKMMJHKPHJ9E1HDZHZDC1DEHHR0QIARA8RKA3PICCHAA3QKA1QMJZMKKZKZ + J1H0RTAZRQRKDEJ2I3A2PCIAPQQRQIDZI3CTKAIAQPJIE3EPHAMRRKAJCHI1PJM2CPDIRZKMMJHKPHJ9E1HDZHZDC1DEHHR0QIARA8RKA3PICCHAA3QKA1QMJZMKKZKZ + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.VS.FSI/xlf/VSPackage.ja.xlf b/vsintegration/src/FSharp.VS.FSI/xlf/VSPackage.ja.xlf new file mode 100644 index 00000000000..e72e126b1fd --- /dev/null +++ b/vsintegration/src/FSharp.VS.FSI/xlf/VSPackage.ja.xlf @@ -0,0 +1,12 @@ + + + + + + J1H0RTAZRQRKDEJ2I3A2PCIAPQQRQIDZI3CTKAIAQPJIE3EPHAMRRKAJCHI1PJM2CPDIRZKMMJHKPHJ9E1HDZHZDC1DEHHR0QIARA8RKA3PICCHAA3QKA1QMJZMKKZKZ + J1H0RTAZRQRKDEJ2I3A2PCIAPQQRQIDZI3CTKAIAQPJIE3EPHAMRRKAJCHI1PJM2CPDIRZKMMJHKPHJ9E1HDZHZDC1DEHHR0QIARA8RKA3PICCHAA3QKA1QMJZMKKZKZ + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.VS.FSI/xlf/VSPackage.ko.xlf b/vsintegration/src/FSharp.VS.FSI/xlf/VSPackage.ko.xlf new file mode 100644 index 00000000000..2cf2374c950 --- /dev/null +++ b/vsintegration/src/FSharp.VS.FSI/xlf/VSPackage.ko.xlf @@ -0,0 +1,12 @@ + + + + + + J1H0RTAZRQRKDEJ2I3A2PCIAPQQRQIDZI3CTKAIAQPJIE3EPHAMRRKAJCHI1PJM2CPDIRZKMMJHKPHJ9E1HDZHZDC1DEHHR0QIARA8RKA3PICCHAA3QKA1QMJZMKKZKZ + J1H0RTAZRQRKDEJ2I3A2PCIAPQQRQIDZI3CTKAIAQPJIE3EPHAMRRKAJCHI1PJM2CPDIRZKMMJHKPHJ9E1HDZHZDC1DEHHR0QIARA8RKA3PICCHAA3QKA1QMJZMKKZKZ + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.VS.FSI/xlf/VSPackage.pl.xlf b/vsintegration/src/FSharp.VS.FSI/xlf/VSPackage.pl.xlf new file mode 100644 index 00000000000..5c93445d21f --- /dev/null +++ b/vsintegration/src/FSharp.VS.FSI/xlf/VSPackage.pl.xlf @@ -0,0 +1,12 @@ + + + + + + J1H0RTAZRQRKDEJ2I3A2PCIAPQQRQIDZI3CTKAIAQPJIE3EPHAMRRKAJCHI1PJM2CPDIRZKMMJHKPHJ9E1HDZHZDC1DEHHR0QIARA8RKA3PICCHAA3QKA1QMJZMKKZKZ + J1H0RTAZRQRKDEJ2I3A2PCIAPQQRQIDZI3CTKAIAQPJIE3EPHAMRRKAJCHI1PJM2CPDIRZKMMJHKPHJ9E1HDZHZDC1DEHHR0QIARA8RKA3PICCHAA3QKA1QMJZMKKZKZ + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.VS.FSI/xlf/VSPackage.pt-BR.xlf b/vsintegration/src/FSharp.VS.FSI/xlf/VSPackage.pt-BR.xlf new file mode 100644 index 00000000000..6eafbec312d --- /dev/null +++ b/vsintegration/src/FSharp.VS.FSI/xlf/VSPackage.pt-BR.xlf @@ -0,0 +1,12 @@ + + + + + + J1H0RTAZRQRKDEJ2I3A2PCIAPQQRQIDZI3CTKAIAQPJIE3EPHAMRRKAJCHI1PJM2CPDIRZKMMJHKPHJ9E1HDZHZDC1DEHHR0QIARA8RKA3PICCHAA3QKA1QMJZMKKZKZ + J1H0RTAZRQRKDEJ2I3A2PCIAPQQRQIDZI3CTKAIAQPJIE3EPHAMRRKAJCHI1PJM2CPDIRZKMMJHKPHJ9E1HDZHZDC1DEHHR0QIARA8RKA3PICCHAA3QKA1QMJZMKKZKZ + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.VS.FSI/xlf/VSPackage.ru.xlf b/vsintegration/src/FSharp.VS.FSI/xlf/VSPackage.ru.xlf new file mode 100644 index 00000000000..82128f9ce6f --- /dev/null +++ b/vsintegration/src/FSharp.VS.FSI/xlf/VSPackage.ru.xlf @@ -0,0 +1,12 @@ + + + + + + J1H0RTAZRQRKDEJ2I3A2PCIAPQQRQIDZI3CTKAIAQPJIE3EPHAMRRKAJCHI1PJM2CPDIRZKMMJHKPHJ9E1HDZHZDC1DEHHR0QIARA8RKA3PICCHAA3QKA1QMJZMKKZKZ + J1H0RTAZRQRKDEJ2I3A2PCIAPQQRQIDZI3CTKAIAQPJIE3EPHAMRRKAJCHI1PJM2CPDIRZKMMJHKPHJ9E1HDZHZDC1DEHHR0QIARA8RKA3PICCHAA3QKA1QMJZMKKZKZ + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.VS.FSI/xlf/VSPackage.tr.xlf b/vsintegration/src/FSharp.VS.FSI/xlf/VSPackage.tr.xlf new file mode 100644 index 00000000000..0a0e2372fc3 --- /dev/null +++ b/vsintegration/src/FSharp.VS.FSI/xlf/VSPackage.tr.xlf @@ -0,0 +1,12 @@ + + + + + + J1H0RTAZRQRKDEJ2I3A2PCIAPQQRQIDZI3CTKAIAQPJIE3EPHAMRRKAJCHI1PJM2CPDIRZKMMJHKPHJ9E1HDZHZDC1DEHHR0QIARA8RKA3PICCHAA3QKA1QMJZMKKZKZ + J1H0RTAZRQRKDEJ2I3A2PCIAPQQRQIDZI3CTKAIAQPJIE3EPHAMRRKAJCHI1PJM2CPDIRZKMMJHKPHJ9E1HDZHZDC1DEHHR0QIARA8RKA3PICCHAA3QKA1QMJZMKKZKZ + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.VS.FSI/xlf/VSPackage.zh-Hans.xlf b/vsintegration/src/FSharp.VS.FSI/xlf/VSPackage.zh-Hans.xlf new file mode 100644 index 00000000000..6a485bd6d2c --- /dev/null +++ b/vsintegration/src/FSharp.VS.FSI/xlf/VSPackage.zh-Hans.xlf @@ -0,0 +1,12 @@ + + + + + + J1H0RTAZRQRKDEJ2I3A2PCIAPQQRQIDZI3CTKAIAQPJIE3EPHAMRRKAJCHI1PJM2CPDIRZKMMJHKPHJ9E1HDZHZDC1DEHHR0QIARA8RKA3PICCHAA3QKA1QMJZMKKZKZ + J1H0RTAZRQRKDEJ2I3A2PCIAPQQRQIDZI3CTKAIAQPJIE3EPHAMRRKAJCHI1PJM2CPDIRZKMMJHKPHJ9E1HDZHZDC1DEHHR0QIARA8RKA3PICCHAA3QKA1QMJZMKKZKZ + + + + + \ No newline at end of file diff --git a/vsintegration/src/FSharp.VS.FSI/xlf/VSPackage.zh-Hant.xlf b/vsintegration/src/FSharp.VS.FSI/xlf/VSPackage.zh-Hant.xlf new file mode 100644 index 00000000000..68641900a27 --- /dev/null +++ b/vsintegration/src/FSharp.VS.FSI/xlf/VSPackage.zh-Hant.xlf @@ -0,0 +1,12 @@ + + + + + + J1H0RTAZRQRKDEJ2I3A2PCIAPQQRQIDZI3CTKAIAQPJIE3EPHAMRRKAJCHI1PJM2CPDIRZKMMJHKPHJ9E1HDZHZDC1DEHHR0QIARA8RKA3PICCHAA3QKA1QMJZMKKZKZ + J1H0RTAZRQRKDEJ2I3A2PCIAPQQRQIDZI3CTKAIAQPJIE3EPHAMRRKAJCHI1PJM2CPDIRZKMMJHKPHJ9E1HDZHZDC1DEHHR0QIARA8RKA3PICCHAA3QKA1QMJZMKKZKZ + + + + + \ No newline at end of file diff --git a/vsintegration/src/SupportedRuntimes/SupportedRuntimes.xml b/vsintegration/src/SupportedRuntimes/SupportedRuntimes.xml index 0c23512c43c..c92ea3c4592 100644 --- a/vsintegration/src/SupportedRuntimes/SupportedRuntimes.xml +++ b/vsintegration/src/SupportedRuntimes/SupportedRuntimes.xml @@ -11,6 +11,7 @@ + diff --git a/vsintegration/src/fsharp.common.props b/vsintegration/src/fsharp.common.props deleted file mode 100644 index 47dee9fdbde..00000000000 --- a/vsintegration/src/fsharp.common.props +++ /dev/null @@ -1,38 +0,0 @@ - - - - - Debug - AnyCPU - - - - - - - - ..\.. - net40 - - - $(FSharpSourcesRoot)\..\$(Configuration)\$(TargetDotnetProfile)\bin - - - - true - full - false - DEBUG;TRACE - prompt - 4 - - - - pdbonly - true - TRACE - prompt - 4 - - - \ No newline at end of file diff --git a/vsintegration/src/fsharp.tools.targets b/vsintegration/src/fsharp.tools.targets deleted file mode 100644 index 6ef78a70161..00000000000 --- a/vsintegration/src/fsharp.tools.targets +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/vsintegration/tests/GetTypesVSUnitTests/App.config b/vsintegration/tests/GetTypesVSUnitTests/App.config new file mode 100644 index 00000000000..274bc3450a3 --- /dev/null +++ b/vsintegration/tests/GetTypesVSUnitTests/App.config @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/vsintegration/tests/GetTypesVSUnitTests/GetTypesVSUnitTests.fs b/vsintegration/tests/GetTypesVSUnitTests/GetTypesVSUnitTests.fs new file mode 100644 index 00000000000..d92edecabef --- /dev/null +++ b/vsintegration/tests/GetTypesVSUnitTests/GetTypesVSUnitTests.fs @@ -0,0 +1,17 @@ +namespace GetTypesVSUnitTests + +open NUnit.Framework +open System.IO +open System.Reflection + +[] +type VerifyUnitTests() = + + [] + member this.GetTypesForVSUnitTests () = + try + let location = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + Assembly.LoadFrom(Path.Combine(location, "VisualFSharp.UnitTests.dll")).GetTypes() |> ignore + with | :? ReflectionTypeLoadException as e -> + let message = e.LoaderExceptions |> Seq.fold (fun (acc:string) e -> acc + (sprintf "TypeLoad failure: %s\n" ) (e.Message) ) "" + Assert.Fail(message) diff --git a/vsintegration/tests/GetTypesVSUnitTests/GetTypesVSUnitTests.fsproj b/vsintegration/tests/GetTypesVSUnitTests/GetTypesVSUnitTests.fsproj new file mode 100644 index 00000000000..1167ad2577c --- /dev/null +++ b/vsintegration/tests/GetTypesVSUnitTests/GetTypesVSUnitTests.fsproj @@ -0,0 +1,31 @@ + + + + + + net46 + Library + true + true + false + true + true + + + + + + + + + + + + + + + + + + + diff --git a/vsintegration/tests/unittests/MockTypeProviders/DefinitionLocationAttribute/ArtificalEventInfo.cs b/vsintegration/tests/MockTypeProviders/DefinitionLocationAttribute/ArtificalEventInfo.cs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/DefinitionLocationAttribute/ArtificalEventInfo.cs rename to vsintegration/tests/MockTypeProviders/DefinitionLocationAttribute/ArtificalEventInfo.cs diff --git a/vsintegration/tests/unittests/MockTypeProviders/DefinitionLocationAttribute/ArtificialConstructorInfo.cs b/vsintegration/tests/MockTypeProviders/DefinitionLocationAttribute/ArtificialConstructorInfo.cs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/DefinitionLocationAttribute/ArtificialConstructorInfo.cs rename to vsintegration/tests/MockTypeProviders/DefinitionLocationAttribute/ArtificialConstructorInfo.cs diff --git a/vsintegration/tests/unittests/MockTypeProviders/DefinitionLocationAttribute/ArtificialMethodInfo.cs b/vsintegration/tests/MockTypeProviders/DefinitionLocationAttribute/ArtificialMethodInfo.cs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/DefinitionLocationAttribute/ArtificialMethodInfo.cs rename to vsintegration/tests/MockTypeProviders/DefinitionLocationAttribute/ArtificialMethodInfo.cs diff --git a/vsintegration/tests/unittests/MockTypeProviders/DefinitionLocationAttribute/ArtificialParamInfo.cs b/vsintegration/tests/MockTypeProviders/DefinitionLocationAttribute/ArtificialParamInfo.cs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/DefinitionLocationAttribute/ArtificialParamInfo.cs rename to vsintegration/tests/MockTypeProviders/DefinitionLocationAttribute/ArtificialParamInfo.cs diff --git a/vsintegration/tests/unittests/MockTypeProviders/DefinitionLocationAttribute/ArtificialPropertyInfo.cs b/vsintegration/tests/MockTypeProviders/DefinitionLocationAttribute/ArtificialPropertyInfo.cs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/DefinitionLocationAttribute/ArtificialPropertyInfo.cs rename to vsintegration/tests/MockTypeProviders/DefinitionLocationAttribute/ArtificialPropertyInfo.cs diff --git a/vsintegration/tests/unittests/MockTypeProviders/DefinitionLocationAttribute/ArtificialType.cs b/vsintegration/tests/MockTypeProviders/DefinitionLocationAttribute/ArtificialType.cs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/DefinitionLocationAttribute/ArtificialType.cs rename to vsintegration/tests/MockTypeProviders/DefinitionLocationAttribute/ArtificialType.cs diff --git a/vsintegration/tests/unittests/MockTypeProviders/DefinitionLocationAttribute/DefinitionLocationAttribute.csproj b/vsintegration/tests/MockTypeProviders/DefinitionLocationAttribute/DefinitionLocationAttribute.csproj similarity index 95% rename from vsintegration/tests/unittests/MockTypeProviders/DefinitionLocationAttribute/DefinitionLocationAttribute.csproj rename to vsintegration/tests/MockTypeProviders/DefinitionLocationAttribute/DefinitionLocationAttribute.csproj index 798c014807f..0b2fc8a750b 100644 --- a/vsintegration/tests/unittests/MockTypeProviders/DefinitionLocationAttribute/DefinitionLocationAttribute.csproj +++ b/vsintegration/tests/MockTypeProviders/DefinitionLocationAttribute/DefinitionLocationAttribute.csproj @@ -2,7 +2,7 @@ - $(MSBuildProjectDirectory)\..\..\..\..\..\src + $(MSBuildProjectDirectory)\..\..\..\..\src CSharp diff --git a/vsintegration/tests/unittests/MockTypeProviders/DefinitionLocationAttribute/TypeProviderInCSharp.cs b/vsintegration/tests/MockTypeProviders/DefinitionLocationAttribute/TypeProviderInCSharp.cs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/DefinitionLocationAttribute/TypeProviderInCSharp.cs rename to vsintegration/tests/MockTypeProviders/DefinitionLocationAttribute/TypeProviderInCSharp.cs diff --git a/vsintegration/tests/unittests/MockTypeProviders/DefinitionLocationAttributeFileDoesnotExist/ArtificalEventInfo.cs b/vsintegration/tests/MockTypeProviders/DefinitionLocationAttributeFileDoesnotExist/ArtificalEventInfo.cs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/DefinitionLocationAttributeFileDoesnotExist/ArtificalEventInfo.cs rename to vsintegration/tests/MockTypeProviders/DefinitionLocationAttributeFileDoesnotExist/ArtificalEventInfo.cs diff --git a/vsintegration/tests/unittests/MockTypeProviders/DefinitionLocationAttributeFileDoesnotExist/ArtificialConstructorInfo.cs b/vsintegration/tests/MockTypeProviders/DefinitionLocationAttributeFileDoesnotExist/ArtificialConstructorInfo.cs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/DefinitionLocationAttributeFileDoesnotExist/ArtificialConstructorInfo.cs rename to vsintegration/tests/MockTypeProviders/DefinitionLocationAttributeFileDoesnotExist/ArtificialConstructorInfo.cs diff --git a/vsintegration/tests/unittests/MockTypeProviders/DefinitionLocationAttributeFileDoesnotExist/ArtificialMethodInfo.cs b/vsintegration/tests/MockTypeProviders/DefinitionLocationAttributeFileDoesnotExist/ArtificialMethodInfo.cs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/DefinitionLocationAttributeFileDoesnotExist/ArtificialMethodInfo.cs rename to vsintegration/tests/MockTypeProviders/DefinitionLocationAttributeFileDoesnotExist/ArtificialMethodInfo.cs diff --git a/vsintegration/tests/unittests/MockTypeProviders/DefinitionLocationAttributeFileDoesnotExist/ArtificialParamInfo.cs b/vsintegration/tests/MockTypeProviders/DefinitionLocationAttributeFileDoesnotExist/ArtificialParamInfo.cs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/DefinitionLocationAttributeFileDoesnotExist/ArtificialParamInfo.cs rename to vsintegration/tests/MockTypeProviders/DefinitionLocationAttributeFileDoesnotExist/ArtificialParamInfo.cs diff --git a/vsintegration/tests/unittests/MockTypeProviders/DefinitionLocationAttributeFileDoesnotExist/ArtificialPropertyInfo.cs b/vsintegration/tests/MockTypeProviders/DefinitionLocationAttributeFileDoesnotExist/ArtificialPropertyInfo.cs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/DefinitionLocationAttributeFileDoesnotExist/ArtificialPropertyInfo.cs rename to vsintegration/tests/MockTypeProviders/DefinitionLocationAttributeFileDoesnotExist/ArtificialPropertyInfo.cs diff --git a/vsintegration/tests/unittests/MockTypeProviders/DefinitionLocationAttributeFileDoesnotExist/ArtificialType.cs b/vsintegration/tests/MockTypeProviders/DefinitionLocationAttributeFileDoesnotExist/ArtificialType.cs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/DefinitionLocationAttributeFileDoesnotExist/ArtificialType.cs rename to vsintegration/tests/MockTypeProviders/DefinitionLocationAttributeFileDoesnotExist/ArtificialType.cs diff --git a/vsintegration/tests/unittests/MockTypeProviders/DefinitionLocationAttributeFileDoesnotExist/DefinitionLocationAttributeFileDoesnotExist.csproj b/vsintegration/tests/MockTypeProviders/DefinitionLocationAttributeFileDoesnotExist/DefinitionLocationAttributeFileDoesnotExist.csproj similarity index 95% rename from vsintegration/tests/unittests/MockTypeProviders/DefinitionLocationAttributeFileDoesnotExist/DefinitionLocationAttributeFileDoesnotExist.csproj rename to vsintegration/tests/MockTypeProviders/DefinitionLocationAttributeFileDoesnotExist/DefinitionLocationAttributeFileDoesnotExist.csproj index b66f8de6f02..cf8838f72ce 100644 --- a/vsintegration/tests/unittests/MockTypeProviders/DefinitionLocationAttributeFileDoesnotExist/DefinitionLocationAttributeFileDoesnotExist.csproj +++ b/vsintegration/tests/MockTypeProviders/DefinitionLocationAttributeFileDoesnotExist/DefinitionLocationAttributeFileDoesnotExist.csproj @@ -2,7 +2,7 @@ - $(MSBuildProjectDirectory)\..\..\..\..\..\src + $(MSBuildProjectDirectory)\..\..\..\..\src CSharp diff --git a/vsintegration/tests/unittests/MockTypeProviders/DefinitionLocationAttributeFileDoesnotExist/TypeProviderInCSharp.cs b/vsintegration/tests/MockTypeProviders/DefinitionLocationAttributeFileDoesnotExist/TypeProviderInCSharp.cs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/DefinitionLocationAttributeFileDoesnotExist/TypeProviderInCSharp.cs rename to vsintegration/tests/MockTypeProviders/DefinitionLocationAttributeFileDoesnotExist/TypeProviderInCSharp.cs diff --git a/vsintegration/tests/unittests/MockTypeProviders/DefinitionLocationAttributeLineDoesnotExist/ArtificalEventInfo.cs b/vsintegration/tests/MockTypeProviders/DefinitionLocationAttributeLineDoesnotExist/ArtificalEventInfo.cs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/DefinitionLocationAttributeLineDoesnotExist/ArtificalEventInfo.cs rename to vsintegration/tests/MockTypeProviders/DefinitionLocationAttributeLineDoesnotExist/ArtificalEventInfo.cs diff --git a/vsintegration/tests/unittests/MockTypeProviders/DefinitionLocationAttributeLineDoesnotExist/ArtificialConstructorInfo.cs b/vsintegration/tests/MockTypeProviders/DefinitionLocationAttributeLineDoesnotExist/ArtificialConstructorInfo.cs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/DefinitionLocationAttributeLineDoesnotExist/ArtificialConstructorInfo.cs rename to vsintegration/tests/MockTypeProviders/DefinitionLocationAttributeLineDoesnotExist/ArtificialConstructorInfo.cs diff --git a/vsintegration/tests/unittests/MockTypeProviders/DefinitionLocationAttributeLineDoesnotExist/ArtificialMethodInfo.cs b/vsintegration/tests/MockTypeProviders/DefinitionLocationAttributeLineDoesnotExist/ArtificialMethodInfo.cs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/DefinitionLocationAttributeLineDoesnotExist/ArtificialMethodInfo.cs rename to vsintegration/tests/MockTypeProviders/DefinitionLocationAttributeLineDoesnotExist/ArtificialMethodInfo.cs diff --git a/vsintegration/tests/unittests/MockTypeProviders/DefinitionLocationAttributeLineDoesnotExist/ArtificialParamInfo.cs b/vsintegration/tests/MockTypeProviders/DefinitionLocationAttributeLineDoesnotExist/ArtificialParamInfo.cs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/DefinitionLocationAttributeLineDoesnotExist/ArtificialParamInfo.cs rename to vsintegration/tests/MockTypeProviders/DefinitionLocationAttributeLineDoesnotExist/ArtificialParamInfo.cs diff --git a/vsintegration/tests/unittests/MockTypeProviders/DefinitionLocationAttributeLineDoesnotExist/ArtificialPropertyInfo.cs b/vsintegration/tests/MockTypeProviders/DefinitionLocationAttributeLineDoesnotExist/ArtificialPropertyInfo.cs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/DefinitionLocationAttributeLineDoesnotExist/ArtificialPropertyInfo.cs rename to vsintegration/tests/MockTypeProviders/DefinitionLocationAttributeLineDoesnotExist/ArtificialPropertyInfo.cs diff --git a/vsintegration/tests/unittests/MockTypeProviders/DefinitionLocationAttributeLineDoesnotExist/ArtificialType.cs b/vsintegration/tests/MockTypeProviders/DefinitionLocationAttributeLineDoesnotExist/ArtificialType.cs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/DefinitionLocationAttributeLineDoesnotExist/ArtificialType.cs rename to vsintegration/tests/MockTypeProviders/DefinitionLocationAttributeLineDoesnotExist/ArtificialType.cs diff --git a/vsintegration/tests/unittests/MockTypeProviders/DefinitionLocationAttributeLineDoesnotExist/DefinitionLocationAttributeLineDoesnotExist.csproj b/vsintegration/tests/MockTypeProviders/DefinitionLocationAttributeLineDoesnotExist/DefinitionLocationAttributeLineDoesnotExist.csproj similarity index 95% rename from vsintegration/tests/unittests/MockTypeProviders/DefinitionLocationAttributeLineDoesnotExist/DefinitionLocationAttributeLineDoesnotExist.csproj rename to vsintegration/tests/MockTypeProviders/DefinitionLocationAttributeLineDoesnotExist/DefinitionLocationAttributeLineDoesnotExist.csproj index 9895bd74f42..c4c480ee525 100644 --- a/vsintegration/tests/unittests/MockTypeProviders/DefinitionLocationAttributeLineDoesnotExist/DefinitionLocationAttributeLineDoesnotExist.csproj +++ b/vsintegration/tests/MockTypeProviders/DefinitionLocationAttributeLineDoesnotExist/DefinitionLocationAttributeLineDoesnotExist.csproj @@ -2,7 +2,7 @@ - $(MSBuildProjectDirectory)\..\..\..\..\..\src + $(MSBuildProjectDirectory)\..\..\..\..\src CSharp diff --git a/vsintegration/tests/unittests/MockTypeProviders/DefinitionLocationAttributeLineDoesnotExist/TypeProviderInCSharp.cs b/vsintegration/tests/MockTypeProviders/DefinitionLocationAttributeLineDoesnotExist/TypeProviderInCSharp.cs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/DefinitionLocationAttributeLineDoesnotExist/TypeProviderInCSharp.cs rename to vsintegration/tests/MockTypeProviders/DefinitionLocationAttributeLineDoesnotExist/TypeProviderInCSharp.cs diff --git a/vsintegration/tests/unittests/MockTypeProviders/DefinitionLocationAttributeWithSpaceInTheType/ArtificalEventInfo.cs b/vsintegration/tests/MockTypeProviders/DefinitionLocationAttributeWithSpaceInTheType/ArtificalEventInfo.cs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/DefinitionLocationAttributeWithSpaceInTheType/ArtificalEventInfo.cs rename to vsintegration/tests/MockTypeProviders/DefinitionLocationAttributeWithSpaceInTheType/ArtificalEventInfo.cs diff --git a/vsintegration/tests/unittests/MockTypeProviders/DefinitionLocationAttributeWithSpaceInTheType/ArtificialConstructorInfo.cs b/vsintegration/tests/MockTypeProviders/DefinitionLocationAttributeWithSpaceInTheType/ArtificialConstructorInfo.cs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/DefinitionLocationAttributeWithSpaceInTheType/ArtificialConstructorInfo.cs rename to vsintegration/tests/MockTypeProviders/DefinitionLocationAttributeWithSpaceInTheType/ArtificialConstructorInfo.cs diff --git a/vsintegration/tests/unittests/MockTypeProviders/DefinitionLocationAttributeWithSpaceInTheType/ArtificialMethodInfo.cs b/vsintegration/tests/MockTypeProviders/DefinitionLocationAttributeWithSpaceInTheType/ArtificialMethodInfo.cs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/DefinitionLocationAttributeWithSpaceInTheType/ArtificialMethodInfo.cs rename to vsintegration/tests/MockTypeProviders/DefinitionLocationAttributeWithSpaceInTheType/ArtificialMethodInfo.cs diff --git a/vsintegration/tests/unittests/MockTypeProviders/DefinitionLocationAttributeWithSpaceInTheType/ArtificialParamInfo.cs b/vsintegration/tests/MockTypeProviders/DefinitionLocationAttributeWithSpaceInTheType/ArtificialParamInfo.cs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/DefinitionLocationAttributeWithSpaceInTheType/ArtificialParamInfo.cs rename to vsintegration/tests/MockTypeProviders/DefinitionLocationAttributeWithSpaceInTheType/ArtificialParamInfo.cs diff --git a/vsintegration/tests/unittests/MockTypeProviders/DefinitionLocationAttributeWithSpaceInTheType/ArtificialPropertyInfo.cs b/vsintegration/tests/MockTypeProviders/DefinitionLocationAttributeWithSpaceInTheType/ArtificialPropertyInfo.cs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/DefinitionLocationAttributeWithSpaceInTheType/ArtificialPropertyInfo.cs rename to vsintegration/tests/MockTypeProviders/DefinitionLocationAttributeWithSpaceInTheType/ArtificialPropertyInfo.cs diff --git a/vsintegration/tests/unittests/MockTypeProviders/DefinitionLocationAttributeWithSpaceInTheType/ArtificialType.cs b/vsintegration/tests/MockTypeProviders/DefinitionLocationAttributeWithSpaceInTheType/ArtificialType.cs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/DefinitionLocationAttributeWithSpaceInTheType/ArtificialType.cs rename to vsintegration/tests/MockTypeProviders/DefinitionLocationAttributeWithSpaceInTheType/ArtificialType.cs diff --git a/vsintegration/tests/unittests/MockTypeProviders/DefinitionLocationAttributeWithSpaceInTheType/DefinitionLocationAttributeWithSpaceInTheType.csproj b/vsintegration/tests/MockTypeProviders/DefinitionLocationAttributeWithSpaceInTheType/DefinitionLocationAttributeWithSpaceInTheType.csproj similarity index 95% rename from vsintegration/tests/unittests/MockTypeProviders/DefinitionLocationAttributeWithSpaceInTheType/DefinitionLocationAttributeWithSpaceInTheType.csproj rename to vsintegration/tests/MockTypeProviders/DefinitionLocationAttributeWithSpaceInTheType/DefinitionLocationAttributeWithSpaceInTheType.csproj index 73c48bd1057..a02e9e3bfa9 100644 --- a/vsintegration/tests/unittests/MockTypeProviders/DefinitionLocationAttributeWithSpaceInTheType/DefinitionLocationAttributeWithSpaceInTheType.csproj +++ b/vsintegration/tests/MockTypeProviders/DefinitionLocationAttributeWithSpaceInTheType/DefinitionLocationAttributeWithSpaceInTheType.csproj @@ -2,7 +2,7 @@ - $(MSBuildProjectDirectory)\..\..\..\..\..\src + $(MSBuildProjectDirectory)\..\..\..\..\src CSharp diff --git a/vsintegration/tests/unittests/MockTypeProviders/DefinitionLocationAttributeWithSpaceInTheType/TypeProviderInCSharp.cs b/vsintegration/tests/MockTypeProviders/DefinitionLocationAttributeWithSpaceInTheType/TypeProviderInCSharp.cs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/DefinitionLocationAttributeWithSpaceInTheType/TypeProviderInCSharp.cs rename to vsintegration/tests/MockTypeProviders/DefinitionLocationAttributeWithSpaceInTheType/TypeProviderInCSharp.cs diff --git a/vsintegration/tests/MockTypeProviders/Directory.Build.props b/vsintegration/tests/MockTypeProviders/Directory.Build.props new file mode 100644 index 00000000000..bb5b23d29d0 --- /dev/null +++ b/vsintegration/tests/MockTypeProviders/Directory.Build.props @@ -0,0 +1,3 @@ + + + diff --git a/vsintegration/tests/MockTypeProviders/Directory.Build.targets b/vsintegration/tests/MockTypeProviders/Directory.Build.targets new file mode 100644 index 00000000000..bb5b23d29d0 --- /dev/null +++ b/vsintegration/tests/MockTypeProviders/Directory.Build.targets @@ -0,0 +1,3 @@ + + + diff --git a/vsintegration/tests/unittests/MockTypeProviders/DummyProviderForLanguageServiceTesting/DummyProviderForLanguageServiceTesting.fs b/vsintegration/tests/MockTypeProviders/DummyProviderForLanguageServiceTesting/DummyProviderForLanguageServiceTesting.fs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/DummyProviderForLanguageServiceTesting/DummyProviderForLanguageServiceTesting.fs rename to vsintegration/tests/MockTypeProviders/DummyProviderForLanguageServiceTesting/DummyProviderForLanguageServiceTesting.fs diff --git a/vsintegration/tests/unittests/MockTypeProviders/DummyProviderForLanguageServiceTesting/DummyProviderForLanguageServiceTesting.fsproj b/vsintegration/tests/MockTypeProviders/DummyProviderForLanguageServiceTesting/DummyProviderForLanguageServiceTesting.fsproj similarity index 91% rename from vsintegration/tests/unittests/MockTypeProviders/DummyProviderForLanguageServiceTesting/DummyProviderForLanguageServiceTesting.fsproj rename to vsintegration/tests/MockTypeProviders/DummyProviderForLanguageServiceTesting/DummyProviderForLanguageServiceTesting.fsproj index 8459b536e7e..05c38f1a8ae 100644 --- a/vsintegration/tests/unittests/MockTypeProviders/DummyProviderForLanguageServiceTesting/DummyProviderForLanguageServiceTesting.fsproj +++ b/vsintegration/tests/MockTypeProviders/DummyProviderForLanguageServiceTesting/DummyProviderForLanguageServiceTesting.fsproj @@ -2,8 +2,9 @@ - $(MSBuildProjectDirectory)\..\..\..\..\..\src + $(MSBuildProjectDirectory)\..\..\..\..\src FSharp + true @@ -37,5 +38,4 @@ - \ No newline at end of file diff --git a/vsintegration/tests/unittests/MockTypeProviders/DummyProviderForLanguageServiceTesting/FSData.txt b/vsintegration/tests/MockTypeProviders/DummyProviderForLanguageServiceTesting/FSData.txt similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/DummyProviderForLanguageServiceTesting/FSData.txt rename to vsintegration/tests/MockTypeProviders/DummyProviderForLanguageServiceTesting/FSData.txt diff --git a/vsintegration/tests/unittests/MockTypeProviders/DummyProviderForLanguageServiceTesting/ProvidedTypes.fs b/vsintegration/tests/MockTypeProviders/DummyProviderForLanguageServiceTesting/ProvidedTypes.fs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/DummyProviderForLanguageServiceTesting/ProvidedTypes.fs rename to vsintegration/tests/MockTypeProviders/DummyProviderForLanguageServiceTesting/ProvidedTypes.fs diff --git a/vsintegration/tests/unittests/MockTypeProviders/DummyProviderForLanguageServiceTesting/ProvidedTypes.fsi b/vsintegration/tests/MockTypeProviders/DummyProviderForLanguageServiceTesting/ProvidedTypes.fsi similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/DummyProviderForLanguageServiceTesting/ProvidedTypes.fsi rename to vsintegration/tests/MockTypeProviders/DummyProviderForLanguageServiceTesting/ProvidedTypes.fsi diff --git a/vsintegration/tests/unittests/MockTypeProviders/EditorHideMethodsAttribute/ArtificalEventInfo.cs b/vsintegration/tests/MockTypeProviders/EditorHideMethodsAttribute/ArtificalEventInfo.cs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/EditorHideMethodsAttribute/ArtificalEventInfo.cs rename to vsintegration/tests/MockTypeProviders/EditorHideMethodsAttribute/ArtificalEventInfo.cs diff --git a/vsintegration/tests/unittests/MockTypeProviders/EditorHideMethodsAttribute/ArtificialConstructorInfo.cs b/vsintegration/tests/MockTypeProviders/EditorHideMethodsAttribute/ArtificialConstructorInfo.cs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/EditorHideMethodsAttribute/ArtificialConstructorInfo.cs rename to vsintegration/tests/MockTypeProviders/EditorHideMethodsAttribute/ArtificialConstructorInfo.cs diff --git a/vsintegration/tests/unittests/MockTypeProviders/EditorHideMethodsAttribute/ArtificialMethodInfo.cs b/vsintegration/tests/MockTypeProviders/EditorHideMethodsAttribute/ArtificialMethodInfo.cs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/EditorHideMethodsAttribute/ArtificialMethodInfo.cs rename to vsintegration/tests/MockTypeProviders/EditorHideMethodsAttribute/ArtificialMethodInfo.cs diff --git a/vsintegration/tests/unittests/MockTypeProviders/EditorHideMethodsAttribute/ArtificialParamInfo.cs b/vsintegration/tests/MockTypeProviders/EditorHideMethodsAttribute/ArtificialParamInfo.cs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/EditorHideMethodsAttribute/ArtificialParamInfo.cs rename to vsintegration/tests/MockTypeProviders/EditorHideMethodsAttribute/ArtificialParamInfo.cs diff --git a/vsintegration/tests/unittests/MockTypeProviders/EditorHideMethodsAttribute/ArtificialPropertyInfo.cs b/vsintegration/tests/MockTypeProviders/EditorHideMethodsAttribute/ArtificialPropertyInfo.cs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/EditorHideMethodsAttribute/ArtificialPropertyInfo.cs rename to vsintegration/tests/MockTypeProviders/EditorHideMethodsAttribute/ArtificialPropertyInfo.cs diff --git a/vsintegration/tests/unittests/MockTypeProviders/EditorHideMethodsAttribute/ArtificialType.cs b/vsintegration/tests/MockTypeProviders/EditorHideMethodsAttribute/ArtificialType.cs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/EditorHideMethodsAttribute/ArtificialType.cs rename to vsintegration/tests/MockTypeProviders/EditorHideMethodsAttribute/ArtificialType.cs diff --git a/vsintegration/tests/unittests/MockTypeProviders/EditorHideMethodsAttribute/EditorHideMethodsAttribute.csproj b/vsintegration/tests/MockTypeProviders/EditorHideMethodsAttribute/EditorHideMethodsAttribute.csproj similarity index 95% rename from vsintegration/tests/unittests/MockTypeProviders/EditorHideMethodsAttribute/EditorHideMethodsAttribute.csproj rename to vsintegration/tests/MockTypeProviders/EditorHideMethodsAttribute/EditorHideMethodsAttribute.csproj index 899401d6b29..66baa3dfe19 100644 --- a/vsintegration/tests/unittests/MockTypeProviders/EditorHideMethodsAttribute/EditorHideMethodsAttribute.csproj +++ b/vsintegration/tests/MockTypeProviders/EditorHideMethodsAttribute/EditorHideMethodsAttribute.csproj @@ -2,7 +2,7 @@ - $(MSBuildProjectDirectory)\..\..\..\..\..\src + $(MSBuildProjectDirectory)\..\..\..\..\src CSharp diff --git a/vsintegration/tests/unittests/MockTypeProviders/EditorHideMethodsAttribute/TypeProviderInCSharp.cs b/vsintegration/tests/MockTypeProviders/EditorHideMethodsAttribute/TypeProviderInCSharp.cs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/EditorHideMethodsAttribute/TypeProviderInCSharp.cs rename to vsintegration/tests/MockTypeProviders/EditorHideMethodsAttribute/TypeProviderInCSharp.cs diff --git a/vsintegration/tests/unittests/MockTypeProviders/EmptyAssembly/EmptyAssembly.fs b/vsintegration/tests/MockTypeProviders/EmptyAssembly/EmptyAssembly.fs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/EmptyAssembly/EmptyAssembly.fs rename to vsintegration/tests/MockTypeProviders/EmptyAssembly/EmptyAssembly.fs diff --git a/vsintegration/tests/unittests/MockTypeProviders/EmptyAssembly/EmptyAssembly.fsproj b/vsintegration/tests/MockTypeProviders/EmptyAssembly/EmptyAssembly.fsproj similarity index 91% rename from vsintegration/tests/unittests/MockTypeProviders/EmptyAssembly/EmptyAssembly.fsproj rename to vsintegration/tests/MockTypeProviders/EmptyAssembly/EmptyAssembly.fsproj index 439e8d6aa3f..be555283db8 100644 --- a/vsintegration/tests/unittests/MockTypeProviders/EmptyAssembly/EmptyAssembly.fsproj +++ b/vsintegration/tests/MockTypeProviders/EmptyAssembly/EmptyAssembly.fsproj @@ -2,7 +2,7 @@ - $(MSBuildProjectDirectory)\..\..\..\..\..\src + $(MSBuildProjectDirectory)\..\..\..\..\src FSharp @@ -35,5 +35,4 @@ - \ No newline at end of file diff --git a/vsintegration/tests/unittests/MockTypeProviders/Helpers.cs b/vsintegration/tests/MockTypeProviders/Helpers.cs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/Helpers.cs rename to vsintegration/tests/MockTypeProviders/Helpers.cs diff --git a/vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithAdequateComment/ArtificalEventInfo.cs b/vsintegration/tests/MockTypeProviders/XmlDocAttributeWithAdequateComment/ArtificalEventInfo.cs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithAdequateComment/ArtificalEventInfo.cs rename to vsintegration/tests/MockTypeProviders/XmlDocAttributeWithAdequateComment/ArtificalEventInfo.cs diff --git a/vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithAdequateComment/ArtificialConstructorInfo.cs b/vsintegration/tests/MockTypeProviders/XmlDocAttributeWithAdequateComment/ArtificialConstructorInfo.cs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithAdequateComment/ArtificialConstructorInfo.cs rename to vsintegration/tests/MockTypeProviders/XmlDocAttributeWithAdequateComment/ArtificialConstructorInfo.cs diff --git a/vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithAdequateComment/ArtificialMethodInfo.cs b/vsintegration/tests/MockTypeProviders/XmlDocAttributeWithAdequateComment/ArtificialMethodInfo.cs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithAdequateComment/ArtificialMethodInfo.cs rename to vsintegration/tests/MockTypeProviders/XmlDocAttributeWithAdequateComment/ArtificialMethodInfo.cs diff --git a/vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithAdequateComment/ArtificialParamInfo.cs b/vsintegration/tests/MockTypeProviders/XmlDocAttributeWithAdequateComment/ArtificialParamInfo.cs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithAdequateComment/ArtificialParamInfo.cs rename to vsintegration/tests/MockTypeProviders/XmlDocAttributeWithAdequateComment/ArtificialParamInfo.cs diff --git a/vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithAdequateComment/ArtificialPropertyInfo.cs b/vsintegration/tests/MockTypeProviders/XmlDocAttributeWithAdequateComment/ArtificialPropertyInfo.cs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithAdequateComment/ArtificialPropertyInfo.cs rename to vsintegration/tests/MockTypeProviders/XmlDocAttributeWithAdequateComment/ArtificialPropertyInfo.cs diff --git a/vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithAdequateComment/ArtificialType.cs b/vsintegration/tests/MockTypeProviders/XmlDocAttributeWithAdequateComment/ArtificialType.cs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithAdequateComment/ArtificialType.cs rename to vsintegration/tests/MockTypeProviders/XmlDocAttributeWithAdequateComment/ArtificialType.cs diff --git a/vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithAdequateComment/TypeProviderInCSharp.cs b/vsintegration/tests/MockTypeProviders/XmlDocAttributeWithAdequateComment/TypeProviderInCSharp.cs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithAdequateComment/TypeProviderInCSharp.cs rename to vsintegration/tests/MockTypeProviders/XmlDocAttributeWithAdequateComment/TypeProviderInCSharp.cs diff --git a/vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithAdequateComment/XmlDocAttributeWithAdequateComment.csproj b/vsintegration/tests/MockTypeProviders/XmlDocAttributeWithAdequateComment/XmlDocAttributeWithAdequateComment.csproj similarity index 95% rename from vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithAdequateComment/XmlDocAttributeWithAdequateComment.csproj rename to vsintegration/tests/MockTypeProviders/XmlDocAttributeWithAdequateComment/XmlDocAttributeWithAdequateComment.csproj index 762839f1b6f..865547fb515 100644 --- a/vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithAdequateComment/XmlDocAttributeWithAdequateComment.csproj +++ b/vsintegration/tests/MockTypeProviders/XmlDocAttributeWithAdequateComment/XmlDocAttributeWithAdequateComment.csproj @@ -2,7 +2,7 @@ - $(MSBuildProjectDirectory)\..\..\..\..\..\src + $(MSBuildProjectDirectory)\..\..\..\..\src CSharp diff --git a/vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithEmptyComment/ArtificalEventInfo.cs b/vsintegration/tests/MockTypeProviders/XmlDocAttributeWithEmptyComment/ArtificalEventInfo.cs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithEmptyComment/ArtificalEventInfo.cs rename to vsintegration/tests/MockTypeProviders/XmlDocAttributeWithEmptyComment/ArtificalEventInfo.cs diff --git a/vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithEmptyComment/ArtificialConstructorInfo.cs b/vsintegration/tests/MockTypeProviders/XmlDocAttributeWithEmptyComment/ArtificialConstructorInfo.cs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithEmptyComment/ArtificialConstructorInfo.cs rename to vsintegration/tests/MockTypeProviders/XmlDocAttributeWithEmptyComment/ArtificialConstructorInfo.cs diff --git a/vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithEmptyComment/ArtificialMethodInfo.cs b/vsintegration/tests/MockTypeProviders/XmlDocAttributeWithEmptyComment/ArtificialMethodInfo.cs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithEmptyComment/ArtificialMethodInfo.cs rename to vsintegration/tests/MockTypeProviders/XmlDocAttributeWithEmptyComment/ArtificialMethodInfo.cs diff --git a/vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithEmptyComment/ArtificialParamInfo.cs b/vsintegration/tests/MockTypeProviders/XmlDocAttributeWithEmptyComment/ArtificialParamInfo.cs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithEmptyComment/ArtificialParamInfo.cs rename to vsintegration/tests/MockTypeProviders/XmlDocAttributeWithEmptyComment/ArtificialParamInfo.cs diff --git a/vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithEmptyComment/ArtificialPropertyInfo.cs b/vsintegration/tests/MockTypeProviders/XmlDocAttributeWithEmptyComment/ArtificialPropertyInfo.cs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithEmptyComment/ArtificialPropertyInfo.cs rename to vsintegration/tests/MockTypeProviders/XmlDocAttributeWithEmptyComment/ArtificialPropertyInfo.cs diff --git a/vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithEmptyComment/ArtificialType.cs b/vsintegration/tests/MockTypeProviders/XmlDocAttributeWithEmptyComment/ArtificialType.cs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithEmptyComment/ArtificialType.cs rename to vsintegration/tests/MockTypeProviders/XmlDocAttributeWithEmptyComment/ArtificialType.cs diff --git a/vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithEmptyComment/TypeProviderInCSharp.cs b/vsintegration/tests/MockTypeProviders/XmlDocAttributeWithEmptyComment/TypeProviderInCSharp.cs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithEmptyComment/TypeProviderInCSharp.cs rename to vsintegration/tests/MockTypeProviders/XmlDocAttributeWithEmptyComment/TypeProviderInCSharp.cs diff --git a/vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithEmptyComment/XmlDocAttributeWithEmptyComment.csproj b/vsintegration/tests/MockTypeProviders/XmlDocAttributeWithEmptyComment/XmlDocAttributeWithEmptyComment.csproj similarity index 95% rename from vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithEmptyComment/XmlDocAttributeWithEmptyComment.csproj rename to vsintegration/tests/MockTypeProviders/XmlDocAttributeWithEmptyComment/XmlDocAttributeWithEmptyComment.csproj index 8cb46c9898b..6c71fe60010 100644 --- a/vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithEmptyComment/XmlDocAttributeWithEmptyComment.csproj +++ b/vsintegration/tests/MockTypeProviders/XmlDocAttributeWithEmptyComment/XmlDocAttributeWithEmptyComment.csproj @@ -2,7 +2,7 @@ - $(MSBuildProjectDirectory)\..\..\..\..\..\src + $(MSBuildProjectDirectory)\..\..\..\..\src CSharp diff --git a/vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithLocalizedComment/ArtificalEventInfo.cs b/vsintegration/tests/MockTypeProviders/XmlDocAttributeWithLocalizedComment/ArtificalEventInfo.cs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithLocalizedComment/ArtificalEventInfo.cs rename to vsintegration/tests/MockTypeProviders/XmlDocAttributeWithLocalizedComment/ArtificalEventInfo.cs diff --git a/vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithLocalizedComment/ArtificialConstructorInfo.cs b/vsintegration/tests/MockTypeProviders/XmlDocAttributeWithLocalizedComment/ArtificialConstructorInfo.cs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithLocalizedComment/ArtificialConstructorInfo.cs rename to vsintegration/tests/MockTypeProviders/XmlDocAttributeWithLocalizedComment/ArtificialConstructorInfo.cs diff --git a/vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithLocalizedComment/ArtificialMethodInfo.cs b/vsintegration/tests/MockTypeProviders/XmlDocAttributeWithLocalizedComment/ArtificialMethodInfo.cs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithLocalizedComment/ArtificialMethodInfo.cs rename to vsintegration/tests/MockTypeProviders/XmlDocAttributeWithLocalizedComment/ArtificialMethodInfo.cs diff --git a/vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithLocalizedComment/ArtificialParamInfo.cs b/vsintegration/tests/MockTypeProviders/XmlDocAttributeWithLocalizedComment/ArtificialParamInfo.cs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithLocalizedComment/ArtificialParamInfo.cs rename to vsintegration/tests/MockTypeProviders/XmlDocAttributeWithLocalizedComment/ArtificialParamInfo.cs diff --git a/vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithLocalizedComment/ArtificialPropertyInfo.cs b/vsintegration/tests/MockTypeProviders/XmlDocAttributeWithLocalizedComment/ArtificialPropertyInfo.cs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithLocalizedComment/ArtificialPropertyInfo.cs rename to vsintegration/tests/MockTypeProviders/XmlDocAttributeWithLocalizedComment/ArtificialPropertyInfo.cs diff --git a/vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithLocalizedComment/ArtificialType.cs b/vsintegration/tests/MockTypeProviders/XmlDocAttributeWithLocalizedComment/ArtificialType.cs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithLocalizedComment/ArtificialType.cs rename to vsintegration/tests/MockTypeProviders/XmlDocAttributeWithLocalizedComment/ArtificialType.cs diff --git a/vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithLocalizedComment/TypeProviderInCSharp.cs b/vsintegration/tests/MockTypeProviders/XmlDocAttributeWithLocalizedComment/TypeProviderInCSharp.cs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithLocalizedComment/TypeProviderInCSharp.cs rename to vsintegration/tests/MockTypeProviders/XmlDocAttributeWithLocalizedComment/TypeProviderInCSharp.cs diff --git a/vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithLocalizedComment/XmlDocAttributeWithLocalizedComment.csproj b/vsintegration/tests/MockTypeProviders/XmlDocAttributeWithLocalizedComment/XmlDocAttributeWithLocalizedComment.csproj similarity index 95% rename from vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithLocalizedComment/XmlDocAttributeWithLocalizedComment.csproj rename to vsintegration/tests/MockTypeProviders/XmlDocAttributeWithLocalizedComment/XmlDocAttributeWithLocalizedComment.csproj index a28c3ea6dd1..694fcd781e9 100644 --- a/vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithLocalizedComment/XmlDocAttributeWithLocalizedComment.csproj +++ b/vsintegration/tests/MockTypeProviders/XmlDocAttributeWithLocalizedComment/XmlDocAttributeWithLocalizedComment.csproj @@ -2,7 +2,7 @@ - $(MSBuildProjectDirectory)\..\..\..\..\..\src + $(MSBuildProjectDirectory)\..\..\..\..\src CSharp diff --git a/vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithLongComment/ArtificalEventInfo.cs b/vsintegration/tests/MockTypeProviders/XmlDocAttributeWithLongComment/ArtificalEventInfo.cs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithLongComment/ArtificalEventInfo.cs rename to vsintegration/tests/MockTypeProviders/XmlDocAttributeWithLongComment/ArtificalEventInfo.cs diff --git a/vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithLongComment/ArtificialConstructorInfo.cs b/vsintegration/tests/MockTypeProviders/XmlDocAttributeWithLongComment/ArtificialConstructorInfo.cs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithLongComment/ArtificialConstructorInfo.cs rename to vsintegration/tests/MockTypeProviders/XmlDocAttributeWithLongComment/ArtificialConstructorInfo.cs diff --git a/vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithLongComment/ArtificialMethodInfo.cs b/vsintegration/tests/MockTypeProviders/XmlDocAttributeWithLongComment/ArtificialMethodInfo.cs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithLongComment/ArtificialMethodInfo.cs rename to vsintegration/tests/MockTypeProviders/XmlDocAttributeWithLongComment/ArtificialMethodInfo.cs diff --git a/vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithLongComment/ArtificialParamInfo.cs b/vsintegration/tests/MockTypeProviders/XmlDocAttributeWithLongComment/ArtificialParamInfo.cs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithLongComment/ArtificialParamInfo.cs rename to vsintegration/tests/MockTypeProviders/XmlDocAttributeWithLongComment/ArtificialParamInfo.cs diff --git a/vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithLongComment/ArtificialPropertyInfo.cs b/vsintegration/tests/MockTypeProviders/XmlDocAttributeWithLongComment/ArtificialPropertyInfo.cs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithLongComment/ArtificialPropertyInfo.cs rename to vsintegration/tests/MockTypeProviders/XmlDocAttributeWithLongComment/ArtificialPropertyInfo.cs diff --git a/vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithLongComment/ArtificialType.cs b/vsintegration/tests/MockTypeProviders/XmlDocAttributeWithLongComment/ArtificialType.cs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithLongComment/ArtificialType.cs rename to vsintegration/tests/MockTypeProviders/XmlDocAttributeWithLongComment/ArtificialType.cs diff --git a/vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithLongComment/TypeProviderInCSharp.cs b/vsintegration/tests/MockTypeProviders/XmlDocAttributeWithLongComment/TypeProviderInCSharp.cs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithLongComment/TypeProviderInCSharp.cs rename to vsintegration/tests/MockTypeProviders/XmlDocAttributeWithLongComment/TypeProviderInCSharp.cs diff --git a/vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithLongComment/XmlDocAttributeWithLongComment.csproj b/vsintegration/tests/MockTypeProviders/XmlDocAttributeWithLongComment/XmlDocAttributeWithLongComment.csproj similarity index 95% rename from vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithLongComment/XmlDocAttributeWithLongComment.csproj rename to vsintegration/tests/MockTypeProviders/XmlDocAttributeWithLongComment/XmlDocAttributeWithLongComment.csproj index ae2742811c8..90f90e87985 100644 --- a/vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithLongComment/XmlDocAttributeWithLongComment.csproj +++ b/vsintegration/tests/MockTypeProviders/XmlDocAttributeWithLongComment/XmlDocAttributeWithLongComment.csproj @@ -2,7 +2,7 @@ - $(MSBuildProjectDirectory)\..\..\..\..\..\src + $(MSBuildProjectDirectory)\..\..\..\..\src CSharp diff --git a/vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithNullComment/ArtificalEventInfo.cs b/vsintegration/tests/MockTypeProviders/XmlDocAttributeWithNullComment/ArtificalEventInfo.cs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithNullComment/ArtificalEventInfo.cs rename to vsintegration/tests/MockTypeProviders/XmlDocAttributeWithNullComment/ArtificalEventInfo.cs diff --git a/vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithNullComment/ArtificialConstructorInfo.cs b/vsintegration/tests/MockTypeProviders/XmlDocAttributeWithNullComment/ArtificialConstructorInfo.cs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithNullComment/ArtificialConstructorInfo.cs rename to vsintegration/tests/MockTypeProviders/XmlDocAttributeWithNullComment/ArtificialConstructorInfo.cs diff --git a/vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithNullComment/ArtificialMethodInfo.cs b/vsintegration/tests/MockTypeProviders/XmlDocAttributeWithNullComment/ArtificialMethodInfo.cs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithNullComment/ArtificialMethodInfo.cs rename to vsintegration/tests/MockTypeProviders/XmlDocAttributeWithNullComment/ArtificialMethodInfo.cs diff --git a/vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithNullComment/ArtificialParamInfo.cs b/vsintegration/tests/MockTypeProviders/XmlDocAttributeWithNullComment/ArtificialParamInfo.cs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithNullComment/ArtificialParamInfo.cs rename to vsintegration/tests/MockTypeProviders/XmlDocAttributeWithNullComment/ArtificialParamInfo.cs diff --git a/vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithNullComment/ArtificialPropertyInfo.cs b/vsintegration/tests/MockTypeProviders/XmlDocAttributeWithNullComment/ArtificialPropertyInfo.cs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithNullComment/ArtificialPropertyInfo.cs rename to vsintegration/tests/MockTypeProviders/XmlDocAttributeWithNullComment/ArtificialPropertyInfo.cs diff --git a/vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithNullComment/ArtificialType.cs b/vsintegration/tests/MockTypeProviders/XmlDocAttributeWithNullComment/ArtificialType.cs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithNullComment/ArtificialType.cs rename to vsintegration/tests/MockTypeProviders/XmlDocAttributeWithNullComment/ArtificialType.cs diff --git a/vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithNullComment/TypeProviderInCSharp.cs b/vsintegration/tests/MockTypeProviders/XmlDocAttributeWithNullComment/TypeProviderInCSharp.cs similarity index 100% rename from vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithNullComment/TypeProviderInCSharp.cs rename to vsintegration/tests/MockTypeProviders/XmlDocAttributeWithNullComment/TypeProviderInCSharp.cs diff --git a/vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithNullComment/XmlDocAttributeWithNullComment.csproj b/vsintegration/tests/MockTypeProviders/XmlDocAttributeWithNullComment/XmlDocAttributeWithNullComment.csproj similarity index 95% rename from vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithNullComment/XmlDocAttributeWithNullComment.csproj rename to vsintegration/tests/MockTypeProviders/XmlDocAttributeWithNullComment/XmlDocAttributeWithNullComment.csproj index 680fa119ac6..525153bff63 100644 --- a/vsintegration/tests/unittests/MockTypeProviders/XmlDocAttributeWithNullComment/XmlDocAttributeWithNullComment.csproj +++ b/vsintegration/tests/MockTypeProviders/XmlDocAttributeWithNullComment/XmlDocAttributeWithNullComment.csproj @@ -2,7 +2,7 @@ - $(MSBuildProjectDirectory)\..\..\..\..\..\src + $(MSBuildProjectDirectory)\..\..\..\..\src CSharp diff --git a/vsintegration/tests/Salsa/FSharpLanguageServiceTestable.fs b/vsintegration/tests/Salsa/FSharpLanguageServiceTestable.fs index 21b290c3819..ee82ab0807f 100644 --- a/vsintegration/tests/Salsa/FSharpLanguageServiceTestable.fs +++ b/vsintegration/tests/Salsa/FSharpLanguageServiceTestable.fs @@ -18,7 +18,6 @@ open Microsoft.FSharp.Compiler open Microsoft.FSharp.Compiler.SourceCodeServices open Microsoft.VisualStudio.FSharp.LanguageService open Microsoft.VisualStudio.FSharp.LanguageService.SiteProvider -open Microsoft.VisualStudio.FSharp.Editor type internal FSharpLanguageServiceTestable() as this = static let colorizerGuid = new Guid("{A2976312-7D71-4BB4-A5F8-66A08EBF46C8}") // Guid for colorized user data on IVsTextBuffer @@ -149,9 +148,9 @@ type internal FSharpLanguageServiceTestable() as this = match hier with | :? IProvideProjectSite as siteProvider -> let site = siteProvider.GetProjectSite() - site.AdviseProjectSiteChanges(FSharpConstants.FSharpLanguageServiceCallbackName, + site.AdviseProjectSiteChanges(LanguageServiceConstants.FSharpLanguageServiceCallbackName, new AdviseProjectSiteChanges(fun () -> this.OnProjectSettingsChanged(site))) - site.AdviseProjectSiteCleaned(FSharpConstants.FSharpLanguageServiceCallbackName, + site.AdviseProjectSiteCleaned(LanguageServiceConstants.FSharpLanguageServiceCallbackName, new AdviseProjectSiteChanges(fun () -> this.OnProjectCleaned(site))) | _ -> // This can happen when the file is in a solution folder or in, say, a C# project. diff --git a/vsintegration/tests/Salsa/VisualFSharp.Salsa.fsproj b/vsintegration/tests/Salsa/VisualFSharp.Salsa.fsproj index 2bd608e43e1..6552af44642 100644 --- a/vsintegration/tests/Salsa/VisualFSharp.Salsa.fsproj +++ b/vsintegration/tests/Salsa/VisualFSharp.Salsa.fsproj @@ -1,25 +1,20 @@  - - - $(MSBuildProjectDirectory)\..\..\..\src - FSharp - VisualFSharp.Salsa - - + + - Debug - AnyCPU - 2.0 - {fbd4b354-dc6e-4032-8ec7-c81d8dfb1af7} + net46 Library - VisualFSharp.Salsa $(NoWarn);45;47;52;58;75 - v4.6 + true + true + $(SystemValueTuplePackageVersion) + true + false - + @@ -35,177 +30,40 @@ + + + + + + + + + + + - + - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualFSharp.Msbuild.15.0.1.0.1\lib\net45\Microsoft.Build.Framework.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualFSharp.Msbuild.15.0.1.0.1\lib\net45\Microsoft.Build.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualFSharp.Msbuild.15.0.1.0.1\lib\net45\Microsoft.Build.Utilities.Core.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualFSharp.Msbuild.15.0.1.0.1\lib\net45\Microsoft.Build.Tasks.Core.dll - - - $(FSharpSourcesRoot)\..\packages\EnvDTE.8.0.1\lib\net10\EnvDTE.dll - True - - - $(FSharpSourcesRoot)\..\packages\EnvDTE80.8.0.1\lib\net10\EnvDTE80.dll - True - - - $(FSharpSourcesRoot)\..\packages\VSSDK.VSLangProj.7.0.4\lib\net20\VSLangProj.dll - True - - - $(FSharpSourcesRoot)\..\packages\VSSDK.VSLangProj.8.8.0.4\lib\net20\VSLangProj80.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.OLE.Interop.7.10.6070\lib\Microsoft.VisualStudio.OLE.Interop.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.7.10.6071\lib\Microsoft.VisualStudio.Shell.Interop.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.8.0.8.0.50727\lib\Microsoft.VisualStudio.Shell.Interop.8.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.9.0.9.0.30729\lib\Microsoft.VisualStudio.Shell.Interop.9.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.10.0.10.0.30319\lib\Microsoft.VisualStudio.Shell.Interop.10.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.11.0.11.0.61030\lib\Microsoft.VisualStudio.Shell.Interop.11.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.ProjectAggregator.8.0.50727\lib\net45\Microsoft.VisualStudio.ProjectAggregator.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.TextManager.Interop.7.10.6070\lib\Microsoft.VisualStudio.TextManager.Interop.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.TextManager.Interop.8.0.8.0.50727\lib\Microsoft.VisualStudio.TextManager.Interop.8.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Designer.Interfaces.1.1.4322\lib\microsoft.visualstudio.designer.interfaces.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Text.Internal.$(RoslynVSPackagesVersion)-alpha\lib\net46\Microsoft.VisualStudio.Text.Internal.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Platform.VSEditor.$(RoslynVSPackagesVersion)-alpha\lib\net46\Microsoft.VisualStudio.Platform.VSEditor.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Platform.VSEditor.Interop.$(RoslynVSPackagesVersion)-alpha\lib\net46\Microsoft.VisualStudio.Platform.VSEditor.Interop.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Telemetry.15.0.777-rtm6FAA2C78\lib\net45\Microsoft.VisualStudio.Telemetry.dll - True - - - $(FSharpSourcesRoot)\..\packages\VSSDK.VSHelp.7.0.4\lib\net20\Microsoft.VisualStudio.VSHelp.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Threading.$(MicrosoftVisualStudioThreadingVersion)\lib\net45\Microsoft.VisualStudio.Threading.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Text.UI.Wpf.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Text.UI.Wpf.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Text.Data.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Text.Data.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.CoreUtility.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.CoreUtility.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Design.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Shell.Design.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.$(RoslynVSBinariesVersion).$(RoslynVSPackagesVersion)\lib\Microsoft.VisualStudio.Shell.$(RoslynVSBinariesVersion).dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.CodeAnalysis.Workspaces.Common.$(RoslynVersion)\lib\netstandard1.3\Microsoft.CodeAnalysis.Workspaces.dll - True - - - True - $(NUnitLibDir)\nunit.framework.dll - - - $(FSharpSourcesRoot)\..\packages\System.ValueTuple.4.3.1\lib\netstandard1.0\System.ValueTuple.dll - true - - - {DED3BBD7-53F4-428A-8C9F-27968E768605} - FSharp.Core - - - FSharp.Build - {702a7979-bcf9-4c41-853e-3adfc9897890} - True - - - {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3} - FSharp.Compiler.Private - True - - - FSharp.Editor - {65e0e82a-eace-4787-8994-888674c2fe87} - True - - - FSharp.LanguageService.Base - {1c5c163c-37ea-4a3c-8ccc-0d34b74bf8ef} - True - - - FSharp.LanguageService - {ee85aab7-cda0-4c4e-bda0-a64ccc413e3f} - True - - - ProjectSystem.Base - {b700e38b-f8c0-4e49-b5ec-db7b7ac0c4e7} - True - - - FSharp.ProjectSystem.FSharp - {6196B0F8-CAEA-4CF1-AF82-1B520F77FE44} - True - + + + + + + + + + + + + + + - - - \ No newline at end of file + + diff --git a/vsintegration/tests/Salsa/VsMocks.fs b/vsintegration/tests/Salsa/VsMocks.fs index d5cc21f4fbf..2d8e730490b 100644 --- a/vsintegration/tests/Salsa/VsMocks.fs +++ b/vsintegration/tests/Salsa/VsMocks.fs @@ -1630,55 +1630,54 @@ module internal VsActual = // Since the editor exports MEF components, we can use those components directly from unit tests without having to load too many heavy // VS assemblies. Use editor MEF components directly from the VS product. + open System.Reflection open System.IO open System.ComponentModel.Composition.Hosting open System.ComponentModel.Composition.Primitives open Microsoft.VisualStudio.Text + open Microsoft.VisualStudio.Threading + + type TestExportJoinableTaskContext () = + + static let jtc = new JoinableTaskContext() + + [)>] + member public __.JoinableTaskContext : JoinableTaskContext = jtc let vsInstallDir = // use the environment variable to find the VS installdir -#if VS_VERSION_DEV12 - let vsvar = System.Environment.GetEnvironmentVariable("VS120COMNTOOLS") - if String.IsNullOrEmpty vsvar then failwith "VS120COMNTOOLS environment variable was not found." -#endif -#if VS_VERSION_DEV14 - let vsvar = System.Environment.GetEnvironmentVariable("VS140COMNTOOLS") - if String.IsNullOrEmpty vsvar then failwith "VS140COMNTOOLS environment variable was not found." -#endif -#if VS_VERSION_DEV15 - let vsvar = System.Environment.GetEnvironmentVariable("VS150COMNTOOLS") - if String.IsNullOrEmpty vsvar then failwith "VS150COMNTOOLS environment variable was not found." -#endif + let vsvar = + let var = Environment.GetEnvironmentVariable("VS150COMNTOOLS") + if String.IsNullOrEmpty var then Environment.GetEnvironmentVariable("VSAPPIDDIR") + else var + if String.IsNullOrEmpty vsvar then failwith "VS150COMNTOOLS and VSAPPIDDIR environment variables not found." Path.Combine(vsvar, "..") let CreateEditorCatalog() = - let root = Path.Combine(vsInstallDir, @"IDE\CommonExtensions\Microsoft\Editor") - let CreateAssemblyCatalog(root, file) = - let fullPath = System.IO.Path.Combine(root, file) - if System.IO.File.Exists(fullPath) then + let thisAssembly = Assembly.GetExecutingAssembly().Location + let editorAssemblyDir = Path.Combine(vsInstallDir, @"IDE\CommonExtensions\Microsoft\Editor") + let privateAssemblyDir = Path.Combine(vsInstallDir, @"IDE\PrivateAssemblies") + let publicAssemblyDir = Path.Combine(vsInstallDir, @"IDE\PublicAssemblies") + + let CreateAssemblyCatalog(path, file) = + let fullPath = Path.GetFullPath(Path.Combine(path, file)) + if File.Exists(fullPath) then new AssemblyCatalog(fullPath) else failwith("could not find " + fullPath) let list = new ResizeArray() - list.Add(CreateAssemblyCatalog(root, "Microsoft.VisualStudio.Platform.VSEditor.dll")) - - // Must include this because several editor options are actually stored as exported information - // on this DLL. Including most importantly, the tab size information - list.Add(CreateAssemblyCatalog(root, "Microsoft.VisualStudio.Text.Logic.dll")) - - // Include this DLL to get several more EditorOptions including WordWrapStyle - list.Add(CreateAssemblyCatalog(root, "Microsoft.VisualStudio.Text.UI.dll")) - - // Include this DLL to get more EditorOptions values - list.Add(CreateAssemblyCatalog(root, "Microsoft.VisualStudio.Text.UI.Wpf.dll")) - - // Include this DLL to get more undo operations - //list.Add(CreateAssemblyCatalog(root, "StandaloneUndo.dll")) - //list.Add(CreateAssemblyCatalog(root, "Microsoft.VisualStudio.Language.StandardClassification.dll")) - - // list.Add(CreateAssemblyCatalog(root, "Microsoft.VisualStudio.Text.Internal.dll")) - + list.Add(new AssemblyCatalog(thisAssembly)) + list.Add(CreateAssemblyCatalog(editorAssemblyDir, "Microsoft.VisualStudio.Text.Data.dll")) + list.Add(CreateAssemblyCatalog(editorAssemblyDir, "Microsoft.VisualStudio.Text.Logic.dll")) + list.Add(CreateAssemblyCatalog(privateAssemblyDir, "Microsoft.VisualStudio.Text.Internal.dll")) + list.Add(CreateAssemblyCatalog(editorAssemblyDir, "Microsoft.VisualStudio.Text.UI.dll")) + list.Add(CreateAssemblyCatalog(editorAssemblyDir, "Microsoft.VisualStudio.Text.UI.Wpf.dll")) + list.Add(CreateAssemblyCatalog(privateAssemblyDir, "Microsoft.VisualStudio.Threading.dll")) + list.Add(CreateAssemblyCatalog(editorAssemblyDir, "Microsoft.VisualStudio.Platform.VSEditor.dll")) + list.Add(CreateAssemblyCatalog(editorAssemblyDir, "Microsoft.VisualStudio.Editor.Implementation.dll")) + list.Add(CreateAssemblyCatalog(publicAssemblyDir, "Microsoft.VisualStudio.ComponentModelHost.dll")) + list.Add(CreateAssemblyCatalog(publicAssemblyDir, "Microsoft.VisualStudio.Shell.15.0.dll")) new AggregateCatalog(list) let exportProvider = new CompositionContainer(new AggregateCatalog(CreateEditorCatalog()), true, null) diff --git a/vsintegration/tests/Salsa/salsa.fs b/vsintegration/tests/Salsa/salsa.fs index e2f0c17ab9f..1dc47629103 100644 --- a/vsintegration/tests/Salsa/salsa.fs +++ b/vsintegration/tests/Salsa/salsa.fs @@ -147,7 +147,7 @@ module internal Salsa = printfn "build succeeded? %A" buildResult let mainassembly = try - (projectInstance.GetItems("MainAssembly") |> Seq.head).EvaluatedInclude + (projectInstance.GetItems("TargetFileName") |> Seq.head).EvaluatedInclude with e -> "" // TODO it seems like Dev10 "Clean" target does not produce this output, but this result is not consumed by those tests in an interesting way anyway printfn "mainAssembly: %A" mainassembly diff --git a/vsintegration/tests/UnitTests/App.config b/vsintegration/tests/UnitTests/App.config new file mode 100644 index 00000000000..edefefae9c9 --- /dev/null +++ b/vsintegration/tests/UnitTests/App.config @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vsintegration/tests/UnitTests/AssemblyResolver.fs b/vsintegration/tests/UnitTests/AssemblyResolver.fs new file mode 100644 index 00000000000..e213596b5f4 --- /dev/null +++ b/vsintegration/tests/UnitTests/AssemblyResolver.fs @@ -0,0 +1,52 @@ +namespace Microsoft.VisualStudio.FSharp + +open NUnit.Framework +open System +open System.IO +open System.Reflection + +module AssemblyResolver = + open System.Globalization + + let vsInstallDir = + // use the environment variable to find the VS installdir + let vsvar = + let var = Environment.GetEnvironmentVariable("VS150COMNTOOLS") + if String.IsNullOrEmpty var then Environment.GetEnvironmentVariable("VSAPPIDDIR") + else var + if String.IsNullOrEmpty vsvar then failwith "VS150COMNTOOLS and VSAPPIDDIR environment variables not found." + Path.Combine(vsvar, "..") + + let probingPaths = [| + Path.Combine(vsInstallDir, @"IDE\CommonExtensions\Microsoft\Editor") + Path.Combine(vsInstallDir, @"IDE\PublicAssemblies") + Path.Combine(vsInstallDir, @"IDE\PrivateAssemblies") + Path.Combine(vsInstallDir, @"IDE\CommonExtensions\Microsoft\ManagedLanguages\VBCSharp\LanguageServices") + Path.Combine(vsInstallDir, @"IDE\Extensions\Microsoft\CodeSense\Framework") + Path.Combine(vsInstallDir, @"IDE") + |] + + let addResolver () = + AppDomain.CurrentDomain.add_AssemblyResolve(fun h args -> + let found () = + (probingPaths ) |> Seq.tryPick(fun p -> + try + let name = AssemblyName(args.Name) + let codebase = Path.GetFullPath(Path.Combine(p, name.Name) + ".dll") + if File.Exists(codebase) then + name.CodeBase <- codebase + name.CultureInfo <- Unchecked.defaultof + name.Version <- Unchecked.defaultof + Some (name) + else None + with | _ -> None + ) + match found() with + | None -> Unchecked.defaultof + | Some name -> Assembly.Load(name) ) + +[] +type public AssemblyResolverTestFixture () = + + [] + member public __.Init () = AssemblyResolver.addResolver () diff --git a/vsintegration/tests/unittests/BraceMatchingServiceTests.fs b/vsintegration/tests/UnitTests/BraceMatchingServiceTests.fs similarity index 90% rename from vsintegration/tests/unittests/BraceMatchingServiceTests.fs rename to vsintegration/tests/UnitTests/BraceMatchingServiceTests.fs index 8e3d4ee7c9a..e323cc8db20 100644 --- a/vsintegration/tests/unittests/BraceMatchingServiceTests.fs +++ b/vsintegration/tests/UnitTests/BraceMatchingServiceTests.fs @@ -19,6 +19,7 @@ type BraceMatchingServiceTests() = let fileName = "C:\\test.fs" let projectOptions: FSharpProjectOptions = { ProjectFileName = "C:\\test.fsproj" + ProjectId = None SourceFiles = [| fileName |] ReferencedProjects = [| |] OtherOptions = [| |] @@ -160,26 +161,23 @@ let main argv = 0 // return an integer exit code""" this.VerifyBraceMatch(code, "(printfn", ")endBrace") - [] - [] - [", [|9;10;11;14;15;16|])>] - [", [|9;10;11;12;15;15;16;17|])>] - [] - []\nlet a7 = 70", [|0;1;2;21;22;23|])>] - [] - member this.BraceMatchingBothSides_Bug2092(fileContents: string, matchingPositions: int[]) = - // https://github.com/Microsoft/visualfsharp/issues/2092 + [] + [] + [", [|9;10;15|])>] + [", [|9;10;11;15;16|])>] + [] + []\nlet a7 = 70", [|0;1;22|])>] + [] + member this.DoNotMatchOnInnerSide(fileContents: string, matchingPositions: int[]) = let sourceText = SourceText.From(fileContents) - let parsingOptions, _ = checker.GetParsingOptionsFromProjectOptions projectOptions - matchingPositions - |> Array.iter (fun position -> + + for position in matchingPositions do match FSharpBraceMatchingService.GetBraceMatchingResult(checker, sourceText, fileName, parsingOptions, position, "UnitTest") |> Async.RunSynchronously with | Some _ -> () | None -> match position with | 0 -> "" | _ -> fileContents.[position - 1] |> sprintf " (previous character '%c')" - |> sprintf "Didn't find a matching brace at position '%d', character '%c'%s" position fileContents.[position] + |> sprintf "Didn't find a matching brace at position '%d' %s" position |> Assert.Fail - ) \ No newline at end of file diff --git a/vsintegration/tests/unittests/BreakpointResolutionService.fs b/vsintegration/tests/UnitTests/BreakpointResolutionService.fs similarity index 99% rename from vsintegration/tests/unittests/BreakpointResolutionService.fs rename to vsintegration/tests/UnitTests/BreakpointResolutionService.fs index c84c1b76f76..655fc02986a 100644 --- a/vsintegration/tests/unittests/BreakpointResolutionService.fs +++ b/vsintegration/tests/UnitTests/BreakpointResolutionService.fs @@ -24,6 +24,7 @@ type BreakpointResolutionServiceTests() = let fileName = "C:\\test.fs" let projectOptions: FSharpProjectOptions = { ProjectFileName = "C:\\test.fsproj" + ProjectId = None SourceFiles = [| fileName |] ReferencedProjects = [| |] OtherOptions = [| |] diff --git a/vsintegration/tests/UnitTests/CompletionProviderTests.fs b/vsintegration/tests/UnitTests/CompletionProviderTests.fs new file mode 100644 index 00000000000..1d64eb28984 --- /dev/null +++ b/vsintegration/tests/UnitTests/CompletionProviderTests.fs @@ -0,0 +1,617 @@ + +// To run the tests in this file: +// +// Technique 1: Compile VisualFSharp.UnitTests.dll and run it as a set of unit tests +// +// Technique 2: +// +// Enable some tests in the #if EXE section at the end of the file, +// then compile this file as an EXE that has InternalsVisibleTo access into the +// appropriate DLLs. This can be the quickest way to get turnaround on updating the tests +// and capturing large amounts of structured output. +(* + cd Debug\net40\bin + .\fsc.exe --define:EXE -r:.\Microsoft.Build.Utilities.Core.dll -o VisualFSharp.UnitTests.exe -g --optimize- -r .\FSharp.Compiler.Private.dll -r .\FSharp.Editor.dll -r nunit.framework.dll ..\..\..\tests\service\FsUnit.fs ..\..\..\tests\service\Common.fs /delaysign /keyfile:..\..\..\src\fsharp\msft.pubkey ..\..\..\vsintegration\tests\UnitTests\CompletionProviderTests.fs + .\VisualFSharp.UnitTests.exe +*) +// Technique 3: +// +// Use F# Interactive. This only works for FSharp.Compiler.Service.dll which has a public API + +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. +module Microsoft.VisualStudio.FSharp.Editor.Tests.Roslyn.CompletionProviderTests + +open System +open System.Linq + +open NUnit.Framework + +open Microsoft.CodeAnalysis +open Microsoft.CodeAnalysis.Completion +open Microsoft.CodeAnalysis.Text +open Microsoft.VisualStudio.FSharp.Editor + +open Microsoft.FSharp.Compiler.SourceCodeServices +open UnitTests.TestLib.LanguageService + +let filePath = "C:\\test.fs" +let internal projectOptions = { + ProjectFileName = "C:\\test.fsproj" + ProjectId = None + SourceFiles = [| filePath |] + ReferencedProjects = [| |] + OtherOptions = [| |] + IsIncompleteTypeCheckEnvironment = true + UseScriptResolutionRules = false + LoadTime = DateTime.MaxValue + OriginalLoadReferences = [] + UnresolvedReferences = None + ExtraProjectInfo = None + Stamp = None +} + +let formatCompletions(completions : string seq) = + "\n\t" + String.Join("\n\t", completions) + +let VerifyCompletionList(fileContents: string, marker: string, expected: string list, unexpected: string list) = + let caretPosition = fileContents.IndexOf(marker) + marker.Length + let results = + FSharpCompletionProvider.ProvideCompletionsAsyncAux(checker, SourceText.From(fileContents), caretPosition, projectOptions, filePath, 0, (fun _ -> []), LanguageServicePerformanceOptions.Default, IntelliSenseOptions.Default) + |> Async.RunSynchronously + |> Option.defaultValue (ResizeArray()) + |> Seq.map(fun result -> result.DisplayText) + + let expectedFound = + expected + |> Seq.filter results.Contains + + let expectedNotFound = + expected + |> Seq.filter (expectedFound.Contains >> not) + + let unexpectedNotFound = + unexpected + |> Seq.filter (results.Contains >> not) + + let unexpectedFound = + unexpected + |> Seq.filter (unexpectedNotFound.Contains >> not) + + // If either of these are true, then the test fails. + let hasExpectedNotFound = not (Seq.isEmpty expectedNotFound) + let hasUnexpectedFound = not (Seq.isEmpty unexpectedFound) + + if hasExpectedNotFound || hasUnexpectedFound then + let expectedNotFoundMsg = + if hasExpectedNotFound then + sprintf "\nExpected completions not found:%s\n" (formatCompletions expectedNotFound) + else + String.Empty + + let unexpectedFoundMsg = + if hasUnexpectedFound then + sprintf "\nUnexpected completions found:%s\n" (formatCompletions unexpectedFound) + else + String.Empty + + let completionsMsg = sprintf "\nin Completions:%s" (formatCompletions results) + + let msg = sprintf "%s%s%s" expectedNotFoundMsg unexpectedFoundMsg completionsMsg + + Assert.Fail(msg) + +let VerifyCompletionListExactly(fileContents: string, marker: string, expected: string list) = + let caretPosition = fileContents.IndexOf(marker) + marker.Length + + let actual = + FSharpCompletionProvider.ProvideCompletionsAsyncAux(checker, SourceText.From(fileContents), caretPosition, projectOptions, filePath, 0, (fun _ -> []), LanguageServicePerformanceOptions.Default, IntelliSenseOptions.Default) + |> Async.RunSynchronously + |> Option.defaultValue (ResizeArray()) + |> Seq.toList + // sort items as Roslyn do - by `SortText` + |> List.sortBy (fun x -> x.SortText) + + let actualNames = actual |> List.map (fun x -> x.DisplayText) + + if actualNames <> expected then + Assert.Fail(sprintf "Expected:\n%s,\nbut was:\n%s\nactual with sort text:\n%s" + (String.Join("; ", expected |> List.map (sprintf "\"%s\""))) + (String.Join("; ", actualNames |> List.map (sprintf "\"%s\""))) + (String.Join("\n", actual |> List.map (fun x -> sprintf "%s => %s" x.DisplayText x.SortText)))) + +let VerifyNoCompletionList(fileContents: string, marker: string) = + VerifyCompletionListExactly(fileContents, marker, []) + +[] +let ShouldTriggerCompletionAtCorrectMarkers() = + let testCases = + [("x", true) + ("y", true) + ("1", false) + ("2", false) + ("x +", false) + ("Console.Write", false) + ("System.", true) + ("Console.", true) ] + + for (marker: string, shouldBeTriggered: bool) in testCases do + let fileContents = """ +let x = 1 +let y = 2 +System.Console.WriteLine(x + y) +""" + + let caretPosition = fileContents.IndexOf(marker) + marker.Length + let documentId = DocumentId.CreateNewId(ProjectId.CreateNewId()) + let getInfo() = documentId, filePath, [] + let triggered = FSharpCompletionProvider.ShouldTriggerCompletionAux(SourceText.From(fileContents), caretPosition, CompletionTriggerKind.Insertion, getInfo, IntelliSenseOptions.Default) + Assert.AreEqual(shouldBeTriggered, triggered, "FSharpCompletionProvider.ShouldTriggerCompletionAux() should compute the correct result") + +[] +let ShouldNotTriggerCompletionAfterAnyTriggerOtherThanInsertion() = + for triggerKind in [CompletionTriggerKind.Deletion; CompletionTriggerKind.Invoke; CompletionTriggerKind.Snippets ] do + let fileContents = "System.Console.WriteLine(123)" + let caretPosition = fileContents.IndexOf("System.") + let documentId = DocumentId.CreateNewId(ProjectId.CreateNewId()) + let getInfo() = documentId, filePath, [] + let triggered = FSharpCompletionProvider.ShouldTriggerCompletionAux(SourceText.From(fileContents), caretPosition, triggerKind, getInfo, IntelliSenseOptions.Default) + Assert.IsFalse(triggered, "FSharpCompletionProvider.ShouldTriggerCompletionAux() should not trigger") + +[] +let ShouldNotTriggerCompletionInStringLiterals() = + let fileContents = "let literal = \"System.Console.WriteLine()\"" + let caretPosition = fileContents.IndexOf("System.") + let documentId = DocumentId.CreateNewId(ProjectId.CreateNewId()) + let getInfo() = documentId, filePath, [] + let triggered = FSharpCompletionProvider.ShouldTriggerCompletionAux(SourceText.From(fileContents), caretPosition, CompletionTriggerKind.Insertion, getInfo, IntelliSenseOptions.Default) + Assert.IsFalse(triggered, "FSharpCompletionProvider.ShouldTriggerCompletionAux() should not trigger") + +[] +let ShouldNotTriggerCompletionInComments() = + let fileContents = """ +(* +This is a comment +System.Console.WriteLine() +*) +""" + let caretPosition = fileContents.IndexOf("System.") + let documentId = DocumentId.CreateNewId(ProjectId.CreateNewId()) + let getInfo() = documentId, filePath, [] + let triggered = FSharpCompletionProvider.ShouldTriggerCompletionAux(SourceText.From(fileContents), caretPosition, CompletionTriggerKind.Insertion, getInfo, IntelliSenseOptions.Default) + Assert.IsFalse(triggered, "FSharpCompletionProvider.ShouldTriggerCompletionAux() should not trigger") + +[] +let ShouldNotTriggerCompletionInExcludedCode() = + let fileContents = """ +#if UNDEFINED +System.Console.WriteLine() +#endif +""" + let caretPosition = fileContents.IndexOf("System.") + let documentId = DocumentId.CreateNewId(ProjectId.CreateNewId()) + let getInfo() = documentId, filePath, [] + let triggered = FSharpCompletionProvider.ShouldTriggerCompletionAux(SourceText.From(fileContents), caretPosition, CompletionTriggerKind.Insertion, getInfo, IntelliSenseOptions.Default) + Assert.IsFalse(triggered, "FSharpCompletionProvider.ShouldTriggerCompletionAux() should not trigger") + +[] +let ShouldNotTriggerCompletionInOperatorWithDot() = + // Simulate mistyping '|>' as '|.' + let fileContents = """ +let f() = + 12.0 |. sqrt +""" + let caretPosition = fileContents.IndexOf("|.") + let documentId = DocumentId.CreateNewId(ProjectId.CreateNewId()) + let getInfo() = documentId, filePath, [] + let triggered = FSharpCompletionProvider.ShouldTriggerCompletionAux(SourceText.From(fileContents), caretPosition, CompletionTriggerKind.Insertion, getInfo, IntelliSenseOptions.Default) + Assert.IsFalse(triggered, "FSharpCompletionProvider.ShouldTriggerCompletionAux() should not trigger on operators") + +[] +let ShouldTriggerCompletionInAttribute() = + let fileContents = """ +[] +let ShouldTriggerCompletionAfterDerefOperator() = + let fileContents = """ +let foo = ref 12 +printfn "%d" !f +""" + let marker = "!f" + let caretPosition = fileContents.IndexOf(marker) + marker.Length + let documentId = DocumentId.CreateNewId(ProjectId.CreateNewId()) + let getInfo() = documentId, filePath, [] + let triggered = FSharpCompletionProvider.ShouldTriggerCompletionAux(SourceText.From(fileContents), caretPosition, CompletionTriggerKind.Insertion, getInfo, IntelliSenseOptions.Default) + Assert.IsTrue(triggered, "Completion should trigger after typing an identifier that follows a dereference operator (!).") + +[] +let ShouldTriggerCompletionAfterAddressOfOperator() = + let fileContents = """ +type Point = { mutable X: int; mutable Y: int } +let pnt = { X = 1; Y = 2 } +use ptr = fixed &p +""" + let marker = "&p" + let caretPosition = fileContents.IndexOf(marker) + marker.Length + let documentId = DocumentId.CreateNewId(ProjectId.CreateNewId()) + let getInfo() = documentId, filePath, [] + let triggered = FSharpCompletionProvider.ShouldTriggerCompletionAux(SourceText.From(fileContents), caretPosition, CompletionTriggerKind.Insertion, getInfo, IntelliSenseOptions.Default) + Assert.IsTrue(triggered, "Completion should trigger after typing an identifier that follows an addressOf operator (&).") + +[] +let ShouldTriggerCompletionAfterArithmeticOperation() = + let fileContents = """ +let xVal = 1.0 +let yVal = 2.0 +let zVal + +xVal+y +xVal-y +xVal*y +xVal/y +xVal%y +xVal**y +""" + + let markers = [ "+y"; "-y"; "*y"; "/y"; "%y"; "**y"] + + for marker in markers do + let caretPosition = fileContents.IndexOf(marker) + marker.Length + let documentId = DocumentId.CreateNewId(ProjectId.CreateNewId()) + let getInfo() = documentId, filePath, [] + let triggered = FSharpCompletionProvider.ShouldTriggerCompletionAux(SourceText.From(fileContents), caretPosition, CompletionTriggerKind.Insertion, getInfo, IntelliSenseOptions.Default) + Assert.IsTrue(triggered, "Completion should trigger after typing an identifier that follows a mathematical operation") + +[] +let ShouldTriggerCompletionAtStartOfFileWithInsertion = + let fileContents = """ +l""" + + let marker = "l" + let caretPosition = fileContents.IndexOf(marker) + marker.Length + let documentId = DocumentId.CreateNewId(ProjectId.CreateNewId()) + let getInfo() = documentId, filePath, [] + let triggered = FSharpCompletionProvider.ShouldTriggerCompletionAux(SourceText.From(fileContents), caretPosition, CompletionTriggerKind.Insertion, getInfo, IntelliSenseOptions.Default) + Assert.IsTrue(triggered, "Completion should trigger after typing an Insertion character at the top of the file, e.g. a function definition in a new script file.") + +[] +let ShouldDisplayTypeMembers() = + let fileContents = """ +type T1() = + member this.M1 = 5 + member this.M2 = "literal" + +[] +let main argv = + let obj = T1() + obj. +""" + VerifyCompletionList(fileContents, "obj.", ["M1"; "M2"], ["System"]) + +[] +let ShouldDisplaySystemNamespace() = + let fileContents = """ +type T1 = + member this.M1 = 5 + member this.M2 = "literal" +System.Console.WriteLine() +""" + VerifyCompletionList(fileContents, "System.", ["Console"; "Array"; "String"], ["T1"; "M1"; "M2"]) + +[] +let ``Class instance members are ordered according to their kind and where they are defined (simple case, by a variable)``() = + let fileContents = """ +type Base() = + member __.BaseMethod() = 1 + member __.BaseProp = 1 + +type Class() = + inherit Base() + member this.MineMethod() = 1 + member this.MineProp = 1 + +let x = Class() +x. +""" + let expected = ["MineProp"; "BaseProp"; "MineMethod"; "BaseMethod"; "Equals"; "GetHashCode"; "GetType"; "ToString"] + VerifyCompletionListExactly(fileContents, "x.", expected) + +[] +let ``Class instance members are ordered according to their kind and where they are defined (simple case, by a constructor)``() = + let fileContents = """ +type Base() = + member __.BaseMethod() = 1 + member __.BaseProp = 1 + +type Class() = + inherit Base() + member this.MineMethod() = 1 + member this.MineProp = 1 + +let x = Class(). +""" + let expected = ["MineProp"; "BaseProp"; "MineMethod"; "BaseMethod"; "Equals"; "GetHashCode"; "GetType"; "ToString"] + VerifyCompletionListExactly(fileContents, "let x = Class().", expected) + + +[] +let ``Class static members are ordered according to their kind and where they are defined``() = + let fileContents = """ +type Base() = + static member BaseStaticMethod() = 1 + static member BaseStaticProp = 1 + +type Class() = + inherit Base() + static member MineStaticMethod() = 1 + static member MineStaticProp = 2 + +Class. +""" + let expected = ["MineStaticProp"; "BaseStaticProp"; "MineStaticMethod"; "BaseStaticMethod"] + VerifyCompletionListExactly(fileContents, "Class.", expected) + +[] +let ``Class instance members are ordered according to their kind and where they are defined (complex case)``() = + let fileContents = """ +type Base() = + inherit System.Collections.Generic.List + member __.BaseMethod() = 1 + member __.BaseProp = 1 + +type Class() = + inherit Base() + member this.MineMethod() = 1 + member this.MineProp = 1 + +let x = Class() +x. +""" + let expected = ["MineProp"; "BaseProp"; "Capacity"; "Count"; "Item"; "MineMethod"; "Add"; "AddRange"; "AsReadOnly"; "BaseMethod"; "BinarySearch"; "Clear"; "Contains" + "ConvertAll"; "CopyTo"; "Equals"; "Exists"; "Find"; "FindAll"; "FindIndex"; "FindLast"; "FindLastIndex"; "ForEach"; "GetEnumerator"; "GetHashCode" + "GetRange"; "GetType"; "IndexOf"; "Insert"; "InsertRange"; "LastIndexOf"; "Remove"; "RemoveAll"; "RemoveAt"; "RemoveRange"; "Reverse"; "Sort" + "ToArray"; "ToString"; "TrimExcess"; "TrueForAll"] + VerifyCompletionListExactly(fileContents, "x.", expected) + +[] +let ``Constructing a new class with object initializer syntax``() = + let fileContents = """ +type A() = + member val SettableProperty = 1 with get, set + member val AnotherSettableProperty = 1 with get, set + member val NonSettableProperty = 1 + +let _ = new A(Setta) +""" + + let expected = ["SettableProperty"; "AnotherSettableProperty"] + let notExpected = ["NonSettableProperty"] + VerifyCompletionList(fileContents, "(Setta", expected, notExpected) + +[] +let ``Constructing a new class with object initializer syntax and verifying 'at' character doesn't exist.``() = + let fileContents = """ +type A() = + member val SettableProperty = 1 with get, set + member val AnotherSettableProperty = 1 with get, set + member val NonSettableProperty = 1 + +let _ = new A(Setta) +""" + + let expected = [] + let notExpected = ["SettableProperty@"; "AnotherSettableProperty@"; "NonSettableProperty@"] + VerifyCompletionList(fileContents, "(Setta", expected, notExpected) + +[] +let ``Constructing a new fully qualified class with object initializer syntax without ending paren``() = + let fileContents = """ +module M = + type A() = + member val SettableProperty = 1 with get, set + member val AnotherSettableProperty = 1 with get, set + member val NonSettableProperty = 1 + +let _ = new M.A(Setta +""" + + let expected = ["SettableProperty"; "AnotherSettableProperty"] + let notExpected = ["NonSettableProperty"] + VerifyCompletionList(fileContents, "(Setta", expected, notExpected) + +[] +let ``Extension methods go after everything else, extension properties are treated as normal ones``() = + let fileContents = """ +open System.Collections.Generic + +type List<'a> with + member __.ExtensionProp = 1 + member __.ExtensionMeth() = 1 + +List(). +""" + let expected = ["Capacity"; "Count"; "Item"; "ExtensionProp"; "Add"; "AddRange"; "AsReadOnly"; "BinarySearch"; "Clear"; "Contains"; "ConvertAll"; "CopyTo"; "Exists" + "Find"; "FindAll"; "FindIndex"; "FindLast"; "FindLastIndex"; "ForEach"; "GetEnumerator"; "GetRange"; "IndexOf"; "Insert"; "InsertRange"; "LastIndexOf" + "Remove"; "RemoveAll"; "RemoveAt"; "RemoveRange"; "Reverse"; "Sort"; "ToArray"; "TrimExcess"; "TrueForAll"; "Equals"; "GetHashCode"; "GetType"; "ToString" + "ExtensionMeth"] + VerifyCompletionListExactly(fileContents, "List().", expected) + +[] +let ``No completion on type name at declaration site``() = + let fileContents = """ +type T + +""" + VerifyNoCompletionList(fileContents, "type T") + +[] +let ``No completion on name of unfinished function declaration``() = + let fileContents = """ +let f + +""" + VerifyNoCompletionList(fileContents, "let f") + +[] +let ``No completion on name of value declaration``() = + let fileContents = """ +let xyz = 1 + +""" + VerifyNoCompletionList(fileContents, "let xy") + +[] +let ``No completion on name of function declaration``() = + let fileContents = """ +let foo x = 1 + +""" + VerifyNoCompletionList(fileContents, "let fo") + +[] +let ``No completion on name of tupled function declaration``() = + let fileContents = """ +let foo (x, y) = 1 + +""" + VerifyNoCompletionList(fileContents, "let fo") + +[] +let ``No completion on member name at declaration site``() = + let fileContents = """ +type T() = + member this.M +""" + VerifyNoCompletionList(fileContents, "member this.M") + +[] +let ``No completion on function first argument name``() = + let fileContents = """ +let func (p +""" + VerifyNoCompletionList(fileContents, "let func (p") + +[] +let ``No completion on function subsequent argument name``() = + let fileContents = """ +let func (p, h +""" + VerifyNoCompletionList(fileContents, "let func (p, h") + +[] +let ``No completion on curried function subsequent argument name``() = + let fileContents = """ +let func (p) (h +""" + VerifyNoCompletionList(fileContents, "let func (p) (h") + +[] +let ``No completion on method first argument name``() = + let fileContents = """ +type T() = + member this.M(p) = () +""" + VerifyNoCompletionList(fileContents, "member this.M(p") + +[] +let ``No completion on method subsequent argument name``() = + let fileContents = """ +type T() = + member this.M(p:int, h ) = () +""" + VerifyNoCompletionList(fileContents, "member this.M(p:int, h") + +[] +let ``Provide completion on first function argument type hint``() = + let fileContents = """ +let func (p:i +""" + VerifyCompletionList(fileContents, "let func (p:i", ["int"], []) + +[] +let ``Provide completion on subsequent function argument type hint``() = + let fileContents = """ +let func (p:int, h:f +""" + VerifyCompletionList(fileContents, "let func (p:int, h:f", ["float"], []) + +[] +let ``Provide completion on local function argument type hint``() = + let fileContents = """ +let top () = + let func (p:i +""" + VerifyCompletionList(fileContents, "let func (p:i", ["int"], []) + +[] +let ``No completion on implicit constructor first argument name``() = + let fileContents = """ +type T(p) = +""" + VerifyNoCompletionList(fileContents, "type T(p") + +[] +let ``No completion on implicit constructor subsequent argument name``() = + let fileContents = """ +type T(p:int, h) = +""" + VerifyNoCompletionList(fileContents, "type T(p:int, h") + +[] +let ``Provide completion on implicit constructor argument type hint``() = + let fileContents = """ +type T(p:i) = +""" + VerifyCompletionList(fileContents, "type T(p:i", ["int"], []) + +[] +let ``No completion on lambda argument name``() = + let fileContents = """ +let _ = fun (p) -> () +""" + VerifyNoCompletionList(fileContents, "let _ = fun (p") + +[] +let ``Provide completion on lambda argument type hint``() = + let fileContents = """ +let _ = fun (p:i) -> () +""" + VerifyCompletionList(fileContents, "let _ = fun (p:i", ["int"], []) + +[] +let ``Extensions.Bug5162``() = + let fileContents = """ +module Extensions = + type System.Object with + member x.P = 1 +module M2 = + let x = 1 + Ext +""" + VerifyCompletionList(fileContents, " Ext", ["Extensions"; "ExtraTopLevelOperators"], []) + +[] +let ``Custom operations should be at the top of completion list inside computation expression``() = + let fileContents = """ +let joinLocal = 1 + +let _ = + query { + for i in 1..10 do + select i + join + } +""" + VerifyCompletionList(fileContents, " join", ["groupJoin"; "join"; "leftOuterJoin"; "joinLocal"], []) + +#if EXE +ShouldDisplaySystemNamespace() +#endif diff --git a/vsintegration/tests/unittests/DocumentDiagnosticAnalyzerTests.fs b/vsintegration/tests/UnitTests/DocumentDiagnosticAnalyzerTests.fs similarity index 99% rename from vsintegration/tests/unittests/DocumentDiagnosticAnalyzerTests.fs rename to vsintegration/tests/UnitTests/DocumentDiagnosticAnalyzerTests.fs index d7302afc296..99f0380abbc 100644 --- a/vsintegration/tests/unittests/DocumentDiagnosticAnalyzerTests.fs +++ b/vsintegration/tests/UnitTests/DocumentDiagnosticAnalyzerTests.fs @@ -26,6 +26,7 @@ type DocumentDiagnosticAnalyzerTests() = let endMarker = "(*end*)" let projectOptions: FSharpProjectOptions = { ProjectFileName = "C:\\test.fsproj" + ProjectId = None SourceFiles = [| filePath |] ReferencedProjects = [| |] OtherOptions = [| |] diff --git a/vsintegration/tests/unittests/DocumentHighlightsServiceTests.fs b/vsintegration/tests/UnitTests/DocumentHighlightsServiceTests.fs similarity index 92% rename from vsintegration/tests/unittests/DocumentHighlightsServiceTests.fs rename to vsintegration/tests/UnitTests/DocumentHighlightsServiceTests.fs index 53ac885768a..2b39f4749d5 100644 --- a/vsintegration/tests/unittests/DocumentHighlightsServiceTests.fs +++ b/vsintegration/tests/UnitTests/DocumentHighlightsServiceTests.fs @@ -1,7 +1,7 @@ // To run the tests in this file: // -// Technique 1: Compile VisualFSharp.Unittests.dll and run it as a set of unit tests +// Technique 1: Compile VisualFSharp.UnitTests.dll and run it as a set of unit tests // // Technique 2: // @@ -11,8 +11,8 @@ // and capturing large amounts of structured output. (* cd Debug\net40\bin - .\fsc.exe --define:EXE -r:.\Microsoft.Build.Utilities.Core.dll -o VisualFSharp.Unittests.exe -g --optimize- -r .\FSharp.Compiler.Private.dll -r .\FSharp.Editor.dll -r nunit.framework.dll ..\..\..\tests\service\FsUnit.fs ..\..\..\tests\service\Common.fs /delaysign /keyfile:..\..\..\src\fsharp\msft.pubkey ..\..\..\vsintegration\tests\unittests\CompletionProviderTests.fs - .\VisualFSharp.Unittests.exe + .\fsc.exe --define:EXE -r:.\Microsoft.Build.Utilities.Core.dll -o VisualFSharp.UnitTests.exe -g --optimize- -r .\FSharp.Compiler.Private.dll -r .\FSharp.Editor.dll -r nunit.framework.dll ..\..\..\tests\service\FsUnit.fs ..\..\..\tests\service\Common.fs /delaysign /keyfile:..\..\..\src\fsharp\msft.pubkey ..\..\..\vsintegration\tests\UnitTests\CompletionProviderTests.fs + .\VisualFSharp.UnitTests.exe *) // Technique 3: // @@ -39,6 +39,7 @@ let filePath = "C:\\test.fs" let internal projectOptions = { ProjectFileName = "C:\\test.fsproj" + ProjectId = None SourceFiles = [| filePath |] ReferencedProjects = [| |] OtherOptions = [| |] @@ -53,7 +54,7 @@ let internal projectOptions = { let private getSpans (sourceText: SourceText) (caretPosition: int) = let documentId = DocumentId.CreateNewId(ProjectId.CreateNewId()) - FSharpDocumentHighlightsService.GetDocumentHighlights(checker, documentId, sourceText, filePath, caretPosition, [], projectOptions, 0) + FSharpDocumentHighlightsService.GetDocumentHighlights(checker, documentId, sourceText, filePath, caretPosition, [], projectOptions, 0, LanguageServicePerformanceOptions.Default) |> Async.RunSynchronously |> Option.defaultValue [||] diff --git a/vsintegration/tests/unittests/EditorFormattingServiceTests.fs b/vsintegration/tests/UnitTests/EditorFormattingServiceTests.fs similarity index 99% rename from vsintegration/tests/unittests/EditorFormattingServiceTests.fs rename to vsintegration/tests/UnitTests/EditorFormattingServiceTests.fs index 7fa10f056c9..82101256552 100644 --- a/vsintegration/tests/unittests/EditorFormattingServiceTests.fs +++ b/vsintegration/tests/UnitTests/EditorFormattingServiceTests.fs @@ -20,6 +20,7 @@ type EditorFormattingServiceTests() = let filePath = "C:\\test.fs" let projectOptions : FSharpProjectOptions = { ProjectFileName = "C:\\test.fsproj" + ProjectId = None SourceFiles = [| filePath |] ReferencedProjects = [| |] OtherOptions = [| |] diff --git a/vsintegration/tests/unittests/GoToDefinitionServiceTests.fs b/vsintegration/tests/UnitTests/GoToDefinitionServiceTests.fs similarity index 93% rename from vsintegration/tests/unittests/GoToDefinitionServiceTests.fs rename to vsintegration/tests/UnitTests/GoToDefinitionServiceTests.fs index 7b598bbf6f2..a2650c519e4 100644 --- a/vsintegration/tests/unittests/GoToDefinitionServiceTests.fs +++ b/vsintegration/tests/UnitTests/GoToDefinitionServiceTests.fs @@ -2,7 +2,7 @@ // // To run the tests in this file: // -// Technique 1: Compile VisualFSharp.Unittests.dll and run it as a set of unit tests +// Technique 1: Compile VisualFSharp.UnitTests.dll and run it as a set of unit tests // // Technique 2: // @@ -12,8 +12,8 @@ // and capturing large amounts of structured output. (* cd Debug\net40\bin - .\fsc.exe --define:EXE -r:.\Microsoft.Build.Utilities.Core.dll -o VisualFSharp.Unittests.exe -g --optimize- -r .\FSharp.Compiler.Private.dll -r .\FSharp.Editor.dll -r nunit.framework.dll ..\..\..\tests\service\FsUnit.fs ..\..\..\tests\service\Common.fs /delaysign /keyfile:..\..\..\src\fsharp\msft.pubkey ..\..\..\vsintegration\tests\unittests\GoToDefinitionServiceTests.fs - .\VisualFSharp.Unittests.exe + .\fsc.exe --define:EXE -r:.\Microsoft.Build.Utilities.Core.dll -o VisualFSharp.UnitTests.exe -g --optimize- -r .\FSharp.Compiler.Private.dll -r .\FSharp.Editor.dll -r nunit.framework.dll ..\..\..\tests\service\FsUnit.fs ..\..\..\tests\service\Common.fs /delaysign /keyfile:..\..\..\src\fsharp\msft.pubkey ..\..\..\vsintegration\tests\UnitTests\GoToDefinitionServiceTests.fs + .\VisualFSharp.UnitTests.exe *) // Technique 3: // @@ -53,7 +53,7 @@ module GoToDefinitionServiceTests = let textLinePos = sourceText.Lines.GetLinePosition position let fcsTextLineNumber = Line.fromZ textLinePos.Line let! lexerSymbol = Tokenizer.getSymbolAtPosition(documentKey, sourceText, position, filePath, defines, SymbolLookupKind.Greedy, false) - let! _, _, checkFileResults = checker.ParseAndCheckDocument (filePath, textVersionHash, sourceText.ToString(), options, allowStaleResults = true, userOpName=userOpName) |> Async.RunSynchronously + let! _, _, checkFileResults = checker.ParseAndCheckDocument (filePath, textVersionHash, sourceText.ToString(), options, LanguageServicePerformanceOptions.Default, userOpName=userOpName) |> Async.RunSynchronously let declarations = checkFileResults.GetDeclarationLocation (fcsTextLineNumber, lexerSymbol.Ident.idRange.EndColumn, textLine.ToString(), lexerSymbol.FullIsland, false, userOpName=userOpName) |> Async.RunSynchronously @@ -103,6 +103,7 @@ let _ = Module1.foo 1 let filePath = Path.GetTempFileName() + ".fs" let options: FSharpProjectOptions = { ProjectFileName = "C:\\test.fsproj" + ProjectId = None SourceFiles = [| filePath |] ReferencedProjects = [| |] OtherOptions = [| |] diff --git a/vsintegration/tests/unittests/HelpContextServiceTests.fs b/vsintegration/tests/UnitTests/HelpContextServiceTests.fs similarity index 98% rename from vsintegration/tests/unittests/HelpContextServiceTests.fs rename to vsintegration/tests/UnitTests/HelpContextServiceTests.fs index b39849128f1..da005db0d09 100644 --- a/vsintegration/tests/unittests/HelpContextServiceTests.fs +++ b/vsintegration/tests/UnitTests/HelpContextServiceTests.fs @@ -22,6 +22,7 @@ type HelpContextServiceTests() = let fileName = "C:\\test.fs" let options: FSharpProjectOptions = { ProjectFileName = "C:\\test.fsproj" + ProjectId = None SourceFiles = [| fileName |] ReferencedProjects = [| |] OtherOptions = [| |] @@ -60,9 +61,9 @@ type HelpContextServiceTests() = let span = Microsoft.CodeAnalysis.Text.TextSpan(marker, 0) let textLine = sourceText.Lines.GetLineFromPosition(marker) let documentId = DocumentId.CreateNewId(ProjectId.CreateNewId()) - let tokens = Tokenizer.getColorizationData(documentId, sourceText, textLine.Span, Some "test.fs", [], CancellationToken.None) + let classifiedSpans = Tokenizer.getClassifiedSpans(documentId, sourceText, textLine.Span, Some "test.fs", [], CancellationToken.None) - yield FSharpHelpContextService.GetHelpTerm(checker, sourceText, fileName, newOptions, span, tokens, version) + yield FSharpHelpContextService.GetHelpTerm(checker, sourceText, fileName, newOptions, span, classifiedSpans, version) |> Async.RunSynchronously ] let equalLength = List.length expectedKeywords = List.length res diff --git a/vsintegration/tests/unittests/IndentationServiceTests.fs b/vsintegration/tests/UnitTests/IndentationServiceTests.fs similarity index 99% rename from vsintegration/tests/unittests/IndentationServiceTests.fs rename to vsintegration/tests/UnitTests/IndentationServiceTests.fs index 66f92ea534f..5139e313a48 100644 --- a/vsintegration/tests/unittests/IndentationServiceTests.fs +++ b/vsintegration/tests/UnitTests/IndentationServiceTests.fs @@ -21,6 +21,7 @@ type IndentationServiceTests() = let filePath = "C:\\test.fs" let projectOptions: FSharpProjectOptions = { ProjectFileName = "C:\\test.fsproj" + ProjectId = None SourceFiles = [| filePath |] ReferencedProjects = [| |] OtherOptions = [| |] @@ -169,6 +170,7 @@ while true do |> Array.map (fun (lineNumber, expectedIndentation) -> ( Some(expectedIndentation), lineNumber, autoIndentTemplate )) + [] member this.TestIndentation() = for (expectedIndentation, lineNumber, template) in testCases do let sourceText = SourceText.From(template) @@ -178,7 +180,8 @@ while true do match expectedIndentation with | None -> Assert.IsTrue(actualIndentation.IsNone, "No indentation was expected at line {0}", lineNumber) | Some indentation -> Assert.AreEqual(expectedIndentation.Value, actualIndentation.Value, "Indentation on line {0} doesn't match", lineNumber) - + + [] member this.TestAutoIndentation() = for (expectedIndentation, lineNumber, template) in autoIndentTestCases do diff --git a/vsintegration/tests/unittests/LanguageDebugInfoServiceTests.fs b/vsintegration/tests/UnitTests/LanguageDebugInfoServiceTests.fs similarity index 91% rename from vsintegration/tests/unittests/LanguageDebugInfoServiceTests.fs rename to vsintegration/tests/UnitTests/LanguageDebugInfoServiceTests.fs index aab626912bc..7578f34bb9f 100644 --- a/vsintegration/tests/unittests/LanguageDebugInfoServiceTests.fs +++ b/vsintegration/tests/UnitTests/LanguageDebugInfoServiceTests.fs @@ -54,8 +54,8 @@ let main argv = let sourceText = SourceText.From(code) let documentId = DocumentId.CreateNewId(ProjectId.CreateNewId()) - let tokens = Tokenizer.getColorizationData(documentId, sourceText, TextSpan.FromBounds(0, sourceText.Length), Some(fileName), defines, CancellationToken.None) - let actualDataTipSpanOption = FSharpLanguageDebugInfoService.GetDataTipInformation(sourceText, searchPosition, tokens) + let classifiedSpans = Tokenizer.getClassifiedSpans(documentId, sourceText, TextSpan.FromBounds(0, sourceText.Length), Some(fileName), defines, CancellationToken.None) + let actualDataTipSpanOption = FSharpLanguageDebugInfoService.GetDataTipInformation(sourceText, searchPosition, classifiedSpans) match actualDataTipSpanOption with | None -> Assert.IsTrue(expectedDataTip.IsNone, "LanguageDebugInfoService failed to produce a data tip") diff --git a/vsintegration/tests/unittests/Tests.LanguageService.Completion.fs b/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.Completion.fs similarity index 99% rename from vsintegration/tests/unittests/Tests.LanguageService.Completion.fs rename to vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.Completion.fs index ed9b6160a70..a16adb7450f 100644 --- a/vsintegration/tests/unittests/Tests.LanguageService.Completion.fs +++ b/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.Completion.fs @@ -182,9 +182,8 @@ type UsingMSBuild() as this = shouldContain // should contain shouldNotContain - member public this.AutoCompleteBug70080Helper(programText:string, ?withSuffix: bool) = - let expected = if defaultArg withSuffix false then "AttributeUsageAttribute" else "AttributeUsage" - this.AutoCompleteBug70080HelperHelper(programText, [expected], []) + member public this.AutoCompleteBug70080Helper(programText: string) = + this.AutoCompleteBug70080HelperHelper(programText, ["AttributeUsage"], []) member private this.testAutoCompleteAdjacentToDot op = let text = sprintf "System.Console%s" op @@ -1029,7 +1028,35 @@ for i in 0..a."] for (code, marker) in useCases do let code = prologue @ [code] AssertCtrlSpaceCompleteContains code marker [] ["field1"; "field2"] + + [] + [] + member public this.``Records.InferByFieldsInPriorMethodArguments``() = + + let prologue = + [ + "type T() =" + " new (left: float32, top: float32) = T()" + " new (left: float32, top: float32, width: float32, height: float32) = T()" + "" + "type Rect =" + " { Left: float32" + " Top: float32" + " Width: float32" + " Height: float32 }" + ] + let useCases = + [ + "let toT(original) = T(original.Left, (* MARKER*)original.)", "(* MARKER*)original.", ["Left"; "Top"; "Width"; "Height"] + "let toT(original) = T(original.Left, original.Height, (* MARKER*)original.)", "(* MARKER*)original.", ["Left"; "Top"; "Width"; "Height"] + "let toT(original) = T(original.Left, original.Height, original.Width, (* MARKER*)original.)", "(* MARKER*)original.", ["Left"; "Top"; "Width"; "Height"] + "let toT(original) = T(original.Left, original.Height, (* MARKER*)original., original.Width)", "(* MARKER*)original.", ["Left"; "Top"; "Width"; "Height"] + ] + + for (code, marker, should) in useCases do + let code = prologue @ [code] + AssertCtrlSpaceCompleteContains code marker should [] [] member this.``Completion.DetectInterfaces``() = @@ -1241,6 +1268,7 @@ for i in 0..a."] AssertCtrlSpaceCompleteContains code "? y." ["Chars"; "Length"] ["abs"] [] + [] member public this.``Query.ForKeywordCanCompleteIntoIdentifier``() = let code = [ @@ -2042,6 +2070,7 @@ let x = new MyClass2(0) [] [] + [] member public this.``CurriedArguments.Regression1``() = AssertCtrlSpaceCompleteContainsNoCoffeeBreak ["let fffff x y = 1" @@ -3518,22 +3547,22 @@ let x = query { for bbbb in abbbbc(*D0*) do member public this.``Attribute.WhenAttachedToType.Bug70080``() = this.AutoCompleteBug70080Helper(@" open System - [] member public this.``Attribute.WhenAttachedToNothing.Bug70080``() = this.AutoCompleteBug70080Helper(@" open System - [] member public this.``Attribute.WhenAttachedToLetInNamespace.Bug70080``() = this.AutoCompleteBug70080Helper @" namespace Foo open System - [] @@ -3541,33 +3570,33 @@ let x = query { for bbbb in abbbbc(*D0*) do this.AutoCompleteBug70080Helper(@" namespace Foo open System - [] member public this.``Attribute.WhenAttachedToNothingInNamespace.Bug70080``() = this.AutoCompleteBug70080Helper(@" namespace Foo open System - [] member public this.``Attribute.WhenAttachedToModuleInNamespace.Bug70080``() = this.AutoCompleteBug70080Helper(@" namespace Foo open System - [] member public this.``Attribute.WhenAttachedToModule.Bug70080``() = this.AutoCompleteBug70080Helper(@" open System - [] member public this.``Identifer.InMatchStatemente.Bug72595``() = @@ -5024,7 +5053,7 @@ let x = query { for bbbb in abbbbc(*D0*) do [< """] "[<" - ["AttributeUsageAttribute"] + ["AttributeUsage"] [] [] @@ -5035,7 +5064,7 @@ let x = query { for bbbb in abbbbc(*D0*) do [< """] "[<" - ["AttributeUsageAttribute"] + ["AttributeUsage"] [] [] @@ -6877,6 +6906,7 @@ let rec f l = //Regression test for bug 65740 Fsharp: dot completion is mission after a '#' statement [] + [] member this.``Identifier.In#Statement``() = this.VerifyDotCompListContainAllAtStartOfMarker( fileContents = """ diff --git a/vsintegration/tests/unittests/Tests.LanguageService.ErrorList.fs b/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.ErrorList.fs similarity index 100% rename from vsintegration/tests/unittests/Tests.LanguageService.ErrorList.fs rename to vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.ErrorList.fs diff --git a/vsintegration/tests/unittests/Tests.LanguageService.ErrorRecovery.fs b/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.ErrorRecovery.fs similarity index 100% rename from vsintegration/tests/unittests/Tests.LanguageService.ErrorRecovery.fs rename to vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.ErrorRecovery.fs diff --git a/vsintegration/tests/unittests/Tests.LanguageService.General.fs b/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.General.fs similarity index 99% rename from vsintegration/tests/unittests/Tests.LanguageService.General.fs rename to vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.General.fs index 7b1abf3f828..ee05cc3bb0c 100644 --- a/vsintegration/tests/unittests/Tests.LanguageService.General.fs +++ b/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.General.fs @@ -115,7 +115,7 @@ type UsingMSBuild() = let lsbase = publicTypesInAsm @"FSharp.LanguageService.Base.dll" Assert.AreEqual(0, lsbase) let psbase = publicTypesInAsm @"FSharp.ProjectSystem.Base.dll" - Assert.AreEqual(19, psbase) + Assert.AreEqual(17, psbase) let fsi = publicTypesInAsm @"FSharp.VS.FSI.dll" Assert.AreEqual(1, fsi) diff --git a/vsintegration/tests/unittests/Tests.LanguageService.GotoDefinition.fs b/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.GotoDefinition.fs similarity index 99% rename from vsintegration/tests/unittests/Tests.LanguageService.GotoDefinition.fs rename to vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.GotoDefinition.fs index f72aa5c93d8..0fad94e8e46 100644 --- a/vsintegration/tests/unittests/Tests.LanguageService.GotoDefinition.fs +++ b/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.GotoDefinition.fs @@ -330,10 +330,7 @@ type UsingMSBuild() = type T = N1.T<"", 1> """, marker = "T<", - f = (fun (_, result) -> - Assert.IsFalse(result.Success) - Assert.That(result.ErrorDescription, Does.Contain("provided type 'T'")) - ), + f = (fun (_, result) -> Assert.IsFalse(result.Success) ), addtlRefAssy = [PathRelativeToTestAssembly(@"UnitTests\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")] ) diff --git a/vsintegration/tests/unittests/Tests.LanguageService.IncrementalBuild.fs b/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.IncrementalBuild.fs similarity index 100% rename from vsintegration/tests/unittests/Tests.LanguageService.IncrementalBuild.fs rename to vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.IncrementalBuild.fs diff --git a/vsintegration/tests/unittests/Tests.LanguageService.NavigationBar.fs b/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.NavigationBar.fs similarity index 100% rename from vsintegration/tests/unittests/Tests.LanguageService.NavigationBar.fs rename to vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.NavigationBar.fs diff --git a/vsintegration/tests/unittests/Tests.LanguageService.ParameterInfo.fs b/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.ParameterInfo.fs similarity index 99% rename from vsintegration/tests/unittests/Tests.LanguageService.ParameterInfo.fs rename to vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.ParameterInfo.fs index 7547ba64599..8fe4486f160 100644 --- a/vsintegration/tests/unittests/Tests.LanguageService.ParameterInfo.fs +++ b/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.ParameterInfo.fs @@ -772,8 +772,7 @@ type UsingMSBuild() = [] //This test verifies that ParamInfo location on a provided type without the namespace that exposes static parameter that takes >1 argument works normally. member public this.``TypeProvider.Type.ParameterInfoLocation.WithOutNamespace`` () = - this.TestParameterInfoLocation("open N1 \n"+ - "type boo = T<$", + this.TestParameterInfoLocation("open N1 \n"+"type boo = T<$", expectedPos = 11, addtlRefAssy = [PathRelativeToTestAssembly(@"UnitTests\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")]) @@ -1632,6 +1631,13 @@ We really need to rewrite some code paths here to use the real parse tree rather type U = ^N1.T^<^ ,^$ ^>""", additionalReferenceAssemblies = [PathRelativeToTestAssembly(@"UnitTests\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")]) + [] + [] + member public this.``LocationOfParams.TypeProviders.StaticParametersAtConstructorCallSite``() = + this.TestParameterInfoLocationOfParamsWithVariousSurroundingContexts(""" + let x = new ^N1.T^<^ "fo$o",^ 42 ^>()""", + additionalReferenceAssemblies = [PathRelativeToTestAssembly(@"UnitTests\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")]) + [] member public this.``TypeProvider.FormatOfNamesOfSystemTypes``() = let code = ["""type TTT = N1.T< "foo", ParamIgnored=42 > """] diff --git a/vsintegration/tests/unittests/Tests.LanguageService.QuickInfo.fs b/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.QuickInfo.fs similarity index 100% rename from vsintegration/tests/unittests/Tests.LanguageService.QuickInfo.fs rename to vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.QuickInfo.fs diff --git a/vsintegration/tests/unittests/Tests.LanguageService.QuickParse.fs b/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.QuickParse.fs similarity index 98% rename from vsintegration/tests/unittests/Tests.LanguageService.QuickParse.fs rename to vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.QuickParse.fs index 7d08f8e4967..1798a9f05fe 100644 --- a/vsintegration/tests/unittests/Tests.LanguageService.QuickParse.fs +++ b/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.QuickParse.fs @@ -29,7 +29,6 @@ type QuickParse() = let Check(line,expected) = CheckAt(line, line.Length-1, expected) - do Microsoft.FSharp.Compiler.AbstractIL.Diagnostics.setDiagnosticsChannel(Some(Console.Out)); Check("let y = List.",(["List"], "", Some 12)) Check("let y = List.conc",(["List"], "conc", Some 12)) Check("let y = S", ([], "S", None)) diff --git a/vsintegration/tests/unittests/Tests.LanguageService.Script.fs b/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.Script.fs similarity index 99% rename from vsintegration/tests/unittests/Tests.LanguageService.Script.fs rename to vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.Script.fs index a43eb1a372e..6a9f0637463 100644 --- a/vsintegration/tests/unittests/Tests.LanguageService.Script.fs +++ b/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.Script.fs @@ -4,6 +4,7 @@ namespace Tests.LanguageService.Script open System open System.IO +open System.Reflection open NUnit.Framework open Salsa.Salsa open Salsa.VsOpsUtils @@ -573,7 +574,7 @@ type UsingMSBuild() as this = [] [] - member public this.``Fsx.NoError.HashR.ResolveFromFullyQualifiedPath``() = + member public this.``Fsx.NoError.HashR.ResolveFromFullyQualifiedPath``() = let fullyqualifiepathtoddll = System.IO.Path.Combine( System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory(), "System.configuration.dll" ) let code = ["#light";"#r @\"" + fullyqualifiepathtoddll + "\""] let (project, _) = createSingleFileFsxFromLines code @@ -581,10 +582,11 @@ type UsingMSBuild() as this = [] [] - member public this.``Fsx.NoError.HashR.RelativePath1``() = - use _guard = this.UsingNewVS() + [] + member public this.``Fsx.NoError.HashR.RelativePath1``() = + use _guard = this.UsingNewVS() let solution = this.CreateSolution() - let project = CreateProject(solution,"testproject") + let project = CreateProject(solution,"testproject") let file1 = AddFileFromText(project,"lib.fs", ["module Lib" "let X = 42" @@ -608,7 +610,7 @@ type UsingMSBuild() as this = let script2 = File.WriteAllLines(script2Path, ["#r \"../lib.exe\"" ]) - + let script1 = OpenFile(project, script1Path) TakeCoffeeBreak(this.VS) @@ -616,17 +618,17 @@ type UsingMSBuild() as this = let ans = GetSquiggleAtCursor(script1) AssertNoSquiggle(ans) - [] - [] + [] + [] member public this.``Fsx.NoError.HashR.RelativePath2``() = use _guard = this.UsingNewVS() let solution = this.CreateSolution() - let project = CreateProject(solution,"testproject") + let project = CreateProject(solution,"testproject") let file1 = AddFileFromText(project,"lib.fs", ["module Lib" "let X = 42" ]) - + let bld = Build(project) let script1Dir = Path.Combine(ProjectDirectory(project), "ccc") @@ -1335,20 +1337,8 @@ type UsingMSBuild() as this = use _guard = this.UsingNewVS() let solution = this.CreateSolution() let project = CreateProject(solution,"testproject") - let fsVersion = -#if VS_VERSION_DEV12 - "4.3.1.0" -#endif -#if VS_VERSION_DEV14 - "4.4.0.0" -#endif -#if VS_VERSION_DEV15 - "4.4.1.0" -#endif - let binariesFolder = match Internal.Utilities.FSharpEnvironment.BinFolderOfDefaultFSharpCompiler(None) with - | Some(x) -> x - | None -> failwith "Location of binaries folder cannot be found" - + let fsVersion = "10.2.3.0" + let binariesFolder = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) PlaceIntoProjectFileBeforeImport (project, sprintf @" diff --git a/vsintegration/tests/unittests/Tests.LanguageService.TimeStamp.fs b/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.TimeStamp.fs similarity index 96% rename from vsintegration/tests/unittests/Tests.LanguageService.TimeStamp.fs rename to vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.TimeStamp.fs index 4b2be043be2..4fdf86bca8d 100644 --- a/vsintegration/tests/unittests/Tests.LanguageService.TimeStamp.fs +++ b/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.TimeStamp.fs @@ -88,6 +88,7 @@ type UsingMSBuild() = // In this bug, the referenced project output didn't exist yet. Building dependee should cause update in dependant [] + [] member public this.``Regression.NoContainedString.Timestamps.Bug3368a``() = use _guard = this.UsingNewVS() let solution = this.CreateSolution() @@ -164,6 +165,7 @@ type UsingMSBuild() = // FEATURE: When a referenced assembly's timestamp changes the reference is reread. [] + [] member public this.``Timestamps.ReferenceAssemblyChangeAbsolute``() = use _guard = this.UsingNewVS() let solution = this.CreateSolution() @@ -198,29 +200,30 @@ type UsingMSBuild() = ["#light" "module File1 = " " let Mary x = \"\""] - SaveFileToDisk file1 - time1 Build project1 "Time to build project1 second time" |> ignore - TakeCoffeeBreak(this.VS) // Give enough time to catch up + SaveFileToDisk file1 + time1 Build project1 "Time to build project1 second time" |> ignore + TakeCoffeeBreak(this.VS) // Give enough time to catch up SwitchToFile this.VS file2 MoveCursorToEndOfMarker(file2,"File1.File1.") - TakeCoffeeBreak(this.VS) // Give enough time to catch up + TakeCoffeeBreak(this.VS) // Give enough time to catch up let completions = AutoCompleteAtCursor(file2) Assert.AreNotEqual(0, completions.Length) printfn "Completions=%A\n" completions - + // In this bug, relative paths to referenced assemblies weren't seen. [] + [] member public this.``Timestamps.ReferenceAssemblyChangeRelative``() = use _guard = this.UsingNewVS() let solution = this.CreateSolution() let project1 = CreateProject(solution,"testproject1") - + let MakeRelativePath(path1:string, path2) = // Pretend to return a path to path1 relative to path2. let temp = (System.IO.Path.GetTempPath()) let tempLen = temp.Length ".."+(path1.Substring(tempLen-1)) - + let file1 = AddFileFromText(project1,"File1.fs", ["#light"] ) @@ -231,14 +234,14 @@ type UsingMSBuild() = "File1.File1." "()"]) let file2 = OpenFile(project2,"File2.fs") - + // Build project1 which will later have the type being referenced by project2 let project1Dll = time1 Build project1 "Time to build project1" printfn "Output of building project1 was %s" project1Dll.ExecutableOutput printfn "Project2 directory is %s" (ProjectDirectory project2) let project1DllRelative = MakeRelativePath(project1Dll.ExecutableOutput, (ProjectDirectory project2)) printfn "Relative output of building project1 was %s" project1DllRelative - + // Add a new reference project2->project1. There should be no completions because Mary doesn't exist yet. this.AddAssemblyReference(project2,project1DllRelative) TakeCoffeeBreak(this.VS) // Dependencies between projects get registered for file-watching during OnIdle processing @@ -246,26 +249,25 @@ type UsingMSBuild() = MoveCursorToEndOfMarker(file2,"File1.File1.") let completions = AutoCompleteAtCursor(file2) Assert.AreEqual(0, completions.Length) - + // Now modify project1's file and rebuild. ReplaceFileInMemory file1 ["#light" "module File1 = " " let Mary x = \"\""] SaveFileToDisk file1 - time1 Build project1 "Time to build project1 second time" |> ignore - TakeCoffeeBreak(this.VS) // Give enough time to catch up + time1 Build project1 "Time to build project1 second time" |> ignore + TakeCoffeeBreak(this.VS) // Give enough time to catch up SwitchToFile this.VS file2 MoveCursorToEndOfMarker(file2,"File1.File1.") - TakeCoffeeBreak(this.VS) // Give enough time to catch up + TakeCoffeeBreak(this.VS) // Give enough time to catch up let completions = AutoCompleteAtCursor(file2) Assert.AreNotEqual(0, completions.Length) - printfn "Completions=%A\n" completions - + printfn "Completions=%A\n" completions // FEATURE: When a referenced project's assembly timestamp changes the reference is reread. - [] - [] + [] + [] member public this.``Timestamps.ProjectReferenceAssemblyChange``() = use _guard = this.UsingNewVS() let solution = this.CreateSolution() diff --git a/vsintegration/tests/unittests/Tests.ProjectSystem.Configs.fs b/vsintegration/tests/UnitTests/LegacyProjectSystem/Tests.ProjectSystem.Configs.fs similarity index 98% rename from vsintegration/tests/unittests/Tests.ProjectSystem.Configs.fs rename to vsintegration/tests/UnitTests/LegacyProjectSystem/Tests.ProjectSystem.Configs.fs index 806140621f6..ff06f80bac6 100644 --- a/vsintegration/tests/unittests/Tests.ProjectSystem.Configs.fs +++ b/vsintegration/tests/UnitTests/LegacyProjectSystem/Tests.ProjectSystem.Configs.fs @@ -13,6 +13,7 @@ open NUnit.Framework // VS namespaces open Microsoft.VisualStudio open Microsoft.VisualStudio.Shell.Interop +open Microsoft.VisualStudio.FSharp open Microsoft.VisualStudio.FSharp.ProjectSystem // Internal unittest namespaces @@ -22,6 +23,12 @@ open UnitTests.TestLib.Utils.FilesystemHelpers open UnitTests.TestLib.ProjectSystem +[] +type public AssemblyResolverTestFixture () = + + [] + member public __.Init () = AssemblyResolver.addResolver () + [][] type Config() = inherit TheTests() diff --git a/vsintegration/tests/unittests/Tests.ProjectSystem.Miscellaneous.fs b/vsintegration/tests/UnitTests/LegacyProjectSystem/Tests.ProjectSystem.Miscellaneous.fs similarity index 96% rename from vsintegration/tests/unittests/Tests.ProjectSystem.Miscellaneous.fs rename to vsintegration/tests/UnitTests/LegacyProjectSystem/Tests.ProjectSystem.Miscellaneous.fs index 361f6569b16..1f5dfff2054 100644 --- a/vsintegration/tests/unittests/Tests.ProjectSystem.Miscellaneous.fs +++ b/vsintegration/tests/UnitTests/LegacyProjectSystem/Tests.ProjectSystem.Miscellaneous.fs @@ -15,6 +15,7 @@ open Microsoft.VisualStudio open Microsoft.VisualStudio.Shell open Microsoft.VisualStudio.Shell.Interop open Microsoft.VisualStudio.FSharp.ProjectSystem +open Microsoft.VisualStudio.FSharp.Editor // Internal unittest namespaces open NUnit.Framework @@ -121,7 +122,7 @@ type Miscellaneous() = printfn "here1" let buildEngine = Utilities.InitializeMsBuildEngine(null) printfn "here2" - let buildProject = Utilities.InitializeMsBuildProject(buildEngine, fsproj) + let buildProject = Utilities.InitializeMsBuildProject(buildEngine, fsproj, null) printfn "here3" let package = new FSharpProjectPackage() let project = new UnitTestingFSharpProjectNode(package) @@ -326,7 +327,7 @@ type Miscellaneous() = use project = TheTests.CreateProject(projFile) let srcFile = (Path.GetDirectoryName projFile) + "\\" + "foo.fs" File.AppendAllText(srcFile, "#light\nlet foo () =\n printfn \"A\"\n") - project.BuildToOutput("Build", vso) |> ignore // Build the project using vso as the output logger + project.BuildToOutput("Build", vso, null) |> ignore // Build the project using vso as the output logger let errors = List.filter (fun (s:string) -> s.Contains(expectedError)) !outputWindowPaneErrors AssertEqual 1 (List.length errors) ) @@ -418,7 +419,7 @@ type Miscellaneous() = let vso = VsMocks.vsOutputWindowPane(outputWindowPaneErrors) let srcFile = (Path.GetDirectoryName projFileName) + "\\" + "foo.fs" File.AppendAllText(srcFile, "let x = 5\n") - project.BuildToOutput("Build", vso) |> ignore // Build the project using vso as the output logger + project.BuildToOutput("Build", vso, null) |> ignore // Build the project using vso as the output logger printfn "Build output:" !outputWindowPaneErrors |> Seq.iter (printfn "%s") let expectedRegex = new Regex("\\s*ProjectExt\\[.fsproj\\]") @@ -427,7 +428,10 @@ type Miscellaneous() = [] member public this.``BuildMacroValues`` () = + let logger (message:string) = System.IO.File.AppendAllText(@"c:\temp\logfile.txt", (message + Environment.NewLine)) + DoWithTempFile "MyAssembly.fsproj" (fun file -> + File.AppendAllText(file, TheTests.FsprojTextWithProjectReferences([],[],[],"")) let sp, cnn = VsMocks.MakeMockServiceProviderAndConfigChangeNotifier() use project = TheTests.CreateProject(file, "false", cnn, sp) @@ -437,6 +441,23 @@ type Miscellaneous() = let targetDir = project.GetBuildMacroValue("TargetDir") let expectedTargetDir = Path.Combine(Path.GetDirectoryName(file), @"bin\Debug\") AssertEqual expectedTargetDir targetDir + + // Verify Solution values + let solutionDir = project.GetBuildMacroValue("SolutionDir") + Assert.IsNotNull (solutionDir, "SolutionDir is NULL") + Assert.IsFalse ( (solutionDir = "*Undefined*"), "SolutionDir not defined") + + let solutionFileName = project.GetBuildMacroValue("SolutionFileName") + Assert.IsNotNull (solutionFileName, "SolutionFileName is null") + Assert.IsFalse ( (solutionFileName = "*Undefined*"), "SolutionFileName not defined") + + let solutionName = project.GetBuildMacroValue("SolutionName") + Assert.IsNotNull (solutionName, "SolutionName is null") + Assert.IsFalse ( (solutionName = "*Undefined*"), "SolutionName not defined") + + let solutionExt = project.GetBuildMacroValue("SolutionExt") + Assert.IsNotNull (solutionExt, "SolutionExt is null") + Assert.IsFalse ( (solutionExt = "*Undefined*"), "SolutionExt not defined") ) [] @@ -498,7 +519,7 @@ type Miscellaneous() = // Now the project system is in a state where ComputeSourcesAndFlags will fail. // Our goal is to at least be able to open individual source files and treat them like 'files outside a project' with regards to intellisense, etc. // Also, if the user does 'Build', he will get an error which will help diagnose the problem. - let ipps = project :> Microsoft.VisualStudio.FSharp.LanguageService.IProvideProjectSite + let ipps = project :> IProvideProjectSite let ips = ipps.GetProjectSite() let expected = [| |] // Ideal behavior is [|"foo.fs";"bar.fs"|], and we could choose to improve this in the future. For now we are just happy to now throw/crash. let actual = ips.CompilationSourceFiles diff --git a/vsintegration/tests/unittests/Tests.ProjectSystem.MultiTargeting.fs b/vsintegration/tests/UnitTests/LegacyProjectSystem/Tests.ProjectSystem.MultiTargeting.fs similarity index 99% rename from vsintegration/tests/unittests/Tests.ProjectSystem.MultiTargeting.fs rename to vsintegration/tests/UnitTests/LegacyProjectSystem/Tests.ProjectSystem.MultiTargeting.fs index 6f854bb4694..f1b699a428c 100644 --- a/vsintegration/tests/unittests/Tests.ProjectSystem.MultiTargeting.fs +++ b/vsintegration/tests/UnitTests/LegacyProjectSystem/Tests.ProjectSystem.MultiTargeting.fs @@ -30,8 +30,8 @@ type MultiTargeting() = let dirName = Path.GetDirectoryName(projFile) let libDirName = Directory.CreateDirectory(Path.Combine(dirName, "lib")).FullName let codeBase = (new Uri(Assembly.GetExecutingAssembly().EscapedCodeBase)).LocalPath |> Path.GetDirectoryName - let refLibPath = Path.Combine(libDirName, "VisualFSharp.Unittests.dll") - File.Copy(Path.Combine(codeBase, "VisualFSharp.Unittests.dll"), refLibPath) + let refLibPath = Path.Combine(libDirName, "VisualFSharp.UnitTests.dll") + File.Copy(Path.Combine(codeBase, "VisualFSharp.UnitTests.dll"), refLibPath) File.AppendAllText(projFile, TheTests.FsprojTextWithProjectReferencesAndOtherFlags([], [refLibPath], [], null, "", "v4.0")) refLibPath diff --git a/vsintegration/tests/unittests/Tests.ProjectSystem.Project.fs b/vsintegration/tests/UnitTests/LegacyProjectSystem/Tests.ProjectSystem.Project.fs similarity index 99% rename from vsintegration/tests/unittests/Tests.ProjectSystem.Project.fs rename to vsintegration/tests/UnitTests/LegacyProjectSystem/Tests.ProjectSystem.Project.fs index 6a37f44ba89..87994c1949f 100644 --- a/vsintegration/tests/unittests/Tests.ProjectSystem.Project.fs +++ b/vsintegration/tests/UnitTests/LegacyProjectSystem/Tests.ProjectSystem.Project.fs @@ -847,7 +847,7 @@ type Project() = use project = TheTests.CreateProject(projFile) let srcFile = (Path.GetDirectoryName projFile) + "\\" + "foo.fs" File.AppendAllText(srcFile, "bar") ; // foo.fs will be cleaned up by parent call to DoWithTempFile - project.BuildToOutput("Build", vso) |> ignore // Build the project using vso as the output logger + project.BuildToOutput("Build", vso, null) |> ignore // Build the project using vso as the output logger let errors = List.filter (fun s -> (new Regex(expectedError)).IsMatch(s)) !outputWindowPaneErrors @@ -870,7 +870,7 @@ type Project() = use project = TheTests.CreateProjectWithUTF8Output(projFile) let srcFile = (Path.GetDirectoryName projFile) + "\\" + "新規bcrogram.fs" File.AppendAllText(srcFile, "bar") ; // 新規bcrogram.fs will be cleaned up by parent call to DoWithTempFile - project.BuildToOutput("Build", vso) |> ignore // Build the project using vso as the output logger + project.BuildToOutput("Build", vso, null) |> ignore // Build the project using vso as the output logger // The console inserts hard line breaks accumulate the output as a single line then look for the expected output. let output = (!outputWindowPaneErrors |> String.concat "").Replace("\r\n", "") diff --git a/vsintegration/tests/unittests/Tests.ProjectSystem.ProjectItems.fs b/vsintegration/tests/UnitTests/LegacyProjectSystem/Tests.ProjectSystem.ProjectItems.fs similarity index 100% rename from vsintegration/tests/unittests/Tests.ProjectSystem.ProjectItems.fs rename to vsintegration/tests/UnitTests/LegacyProjectSystem/Tests.ProjectSystem.ProjectItems.fs diff --git a/vsintegration/tests/unittests/Tests.ProjectSystem.References.fs b/vsintegration/tests/UnitTests/LegacyProjectSystem/Tests.ProjectSystem.References.fs similarity index 100% rename from vsintegration/tests/unittests/Tests.ProjectSystem.References.fs rename to vsintegration/tests/UnitTests/LegacyProjectSystem/Tests.ProjectSystem.References.fs diff --git a/vsintegration/tests/unittests/Tests.ProjectSystem.RoundTrip.fs b/vsintegration/tests/UnitTests/LegacyProjectSystem/Tests.ProjectSystem.RoundTrip.fs similarity index 100% rename from vsintegration/tests/unittests/Tests.ProjectSystem.RoundTrip.fs rename to vsintegration/tests/UnitTests/LegacyProjectSystem/Tests.ProjectSystem.RoundTrip.fs diff --git a/vsintegration/tests/unittests/Tests.ProjectSystem.UpToDate.fs b/vsintegration/tests/UnitTests/LegacyProjectSystem/Tests.ProjectSystem.UpToDate.fs similarity index 95% rename from vsintegration/tests/unittests/Tests.ProjectSystem.UpToDate.fs rename to vsintegration/tests/UnitTests/LegacyProjectSystem/Tests.ProjectSystem.UpToDate.fs index 0d079f2f01e..41b596fcfac 100644 --- a/vsintegration/tests/unittests/Tests.ProjectSystem.UpToDate.fs +++ b/vsintegration/tests/UnitTests/LegacyProjectSystem/Tests.ProjectSystem.UpToDate.fs @@ -14,6 +14,7 @@ open System.Text.RegularExpressions open Microsoft.VisualStudio open Microsoft.VisualStudio.Shell open Microsoft.VisualStudio.Shell.Interop +open Microsoft.VisualStudio.FSharp open Microsoft.VisualStudio.FSharp.ProjectSystem // Internal unittest namespaces @@ -27,6 +28,9 @@ open UnitTests.TestLib.ProjectSystem type UpToDate() = inherit TheTests() + [] + member public __.Init () = AssemblyResolver.addResolver () + [] member public this.ItemInputs () = this.MakeProjectAndDo(["file1.fs"], [], @" @@ -60,7 +64,7 @@ type UpToDate() = File.AppendAllText(embedPath, "some embedded resource") Assert.IsFalse(config.IsUpToDate(logger, true)) - project.Build(configNameDebug, output, "Build") |> AssertBuildSuccessful + project.Build(configNameDebug, output, "Build", null) |> AssertBuildSuccessful Assert.IsTrue(config.IsUpToDate(logger, true)) // None items should not affect up-to-date (unless captured by well-known items, e.g. App.config) @@ -112,7 +116,7 @@ type UpToDate() = project.SetConfiguration(config.ConfigCanonicalName); Assert.IsFalse(config.IsUpToDate(logger, true)) - project.Build(configNameDebug, output, "Build") |> AssertBuildSuccessful + project.Build(configNameDebug, output, "Build", null) |> AssertBuildSuccessful Assert.IsTrue(config.IsUpToDate(logger, true)) for path in [verPath; keyPath] do @@ -147,7 +151,7 @@ type UpToDate() = File.AppendAllText(absFilePath, "printfn \"hello\"") Assert.IsFalse(config.IsUpToDate(logger, true)) - project.Build(configNameDebug, output, "Build") |> AssertBuildSuccessful + project.Build(configNameDebug, output, "Build", null) |> AssertBuildSuccessful Assert.IsTrue(config.IsUpToDate(logger, true)) // touch proj file @@ -178,7 +182,7 @@ type UpToDate() = let config1 = project1.ConfigProvider.GetProjectConfiguration(configNameDebug) Assert.IsFalse(config1.IsUpToDate(logger, true)) - project1.Build(configNameDebug, output, "Build") |> AssertBuildSuccessful + project1.Build(configNameDebug, output, "Build", null) |> AssertBuildSuccessful Assert.IsTrue(config1.IsUpToDate(logger, true)) let output1 = Path.Combine(project1.ProjectFolder, "bin\\debug", project1.OutputFileName) @@ -197,7 +201,7 @@ type UpToDate() = let startTime = DateTime.UtcNow Assert.IsFalse(config2.IsUpToDate(logger, true)) - project2.Build(configNameDebug, output, "Build") |> AssertBuildSuccessful + project2.Build(configNameDebug, output, "Build", null) |> AssertBuildSuccessful Assert.IsTrue(config2.IsUpToDate(logger, true)) // reference is updated @@ -241,7 +245,7 @@ type UpToDate() = File.AppendAllText(appConfigPath, """""") Assert.IsFalse(config.IsUpToDate(logger, true)) - project.Build(configNameDebug, output, "Build") |> AssertBuildSuccessful + project.Build(configNameDebug, output, "Build", null) |> AssertBuildSuccessful Assert.IsTrue(config.IsUpToDate(logger, true)) let startTime = DateTime.UtcNow @@ -290,25 +294,25 @@ type UpToDate() = Assert.IsFalse(debugConfigAnyCPU.IsUpToDate(logger, true)) Assert.IsFalse(releaseConfigAnyCPU.IsUpToDate(logger, true)) - project.Build(configNameDebugx86, output, "Build") |> AssertBuildSuccessful + project.Build(configNameDebugx86, output, "Build", null) |> AssertBuildSuccessful Assert.IsTrue(debugConfigx86.IsUpToDate(logger, true)) Assert.IsFalse(releaseConfigx86.IsUpToDate(logger, true)) Assert.IsFalse(debugConfigAnyCPU.IsUpToDate(logger, true)) Assert.IsFalse(releaseConfigAnyCPU.IsUpToDate(logger, true)) - project.Build(configNameReleasex86, output, "Build") |> AssertBuildSuccessful + project.Build(configNameReleasex86, output, "Build", null) |> AssertBuildSuccessful Assert.IsTrue(debugConfigx86.IsUpToDate(logger, true)) Assert.IsTrue(releaseConfigx86.IsUpToDate(logger, true)) Assert.IsFalse(debugConfigAnyCPU.IsUpToDate(logger, true)) Assert.IsFalse(releaseConfigAnyCPU.IsUpToDate(logger, true)) - project.Build(configNameDebugAnyCPU, output, "Build") |> AssertBuildSuccessful + project.Build(configNameDebugAnyCPU, output, "Build", null) |> AssertBuildSuccessful Assert.IsTrue(debugConfigx86.IsUpToDate(logger, true)) Assert.IsTrue(releaseConfigx86.IsUpToDate(logger, true)) Assert.IsTrue(debugConfigAnyCPU.IsUpToDate(logger, true)) Assert.IsFalse(releaseConfigAnyCPU.IsUpToDate(logger, true)) - project.Build(configNameReleaseAnyCPU, output, "Build") |> AssertBuildSuccessful + project.Build(configNameReleaseAnyCPU, output, "Build", null) |> AssertBuildSuccessful Assert.IsTrue(debugConfigx86.IsUpToDate(logger, true)) Assert.IsTrue(releaseConfigx86.IsUpToDate(logger, true)) Assert.IsTrue(debugConfigAnyCPU.IsUpToDate(logger, true)) diff --git a/vsintegration/tests/unittests/ProjectDiagnosticAnalyzerTests.fs b/vsintegration/tests/UnitTests/ProjectDiagnosticAnalyzerTests.fs similarity index 100% rename from vsintegration/tests/unittests/ProjectDiagnosticAnalyzerTests.fs rename to vsintegration/tests/UnitTests/ProjectDiagnosticAnalyzerTests.fs diff --git a/vsintegration/tests/unittests/QuickInfoProviderTests.fs b/vsintegration/tests/UnitTests/QuickInfoProviderTests.fs similarity index 89% rename from vsintegration/tests/unittests/QuickInfoProviderTests.fs rename to vsintegration/tests/UnitTests/QuickInfoProviderTests.fs index 45d39459564..d14747fffa6 100644 --- a/vsintegration/tests/unittests/QuickInfoProviderTests.fs +++ b/vsintegration/tests/UnitTests/QuickInfoProviderTests.fs @@ -1,7 +1,10 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------------------------------ +// // To run the tests in this file: // -// Technique 1: Compile VisualFSharp.Unittests.dll and run it as a set of unit tests +// Technique 1: Compile VisualFSharp.UnitTests.dll and run it as a set of unit tests // // Technique 2: // @@ -11,31 +14,41 @@ // and capturing large amounts of structured output. (* cd Debug\net40\bin - .\fsc.exe --define:EXE -r:.\Microsoft.Build.Utilities.Core.dll -o VisualFSharp.Unittests.exe -g --optimize- -r .\FSharp.Compiler.Private.dll -r .\FSharp.Editor.dll -r nunit.framework.dll ..\..\..\tests\service\FsUnit.fs ..\..\..\tests\service\Common.fs /delaysign /keyfile:..\..\..\src\fsharp\msft.pubkey ..\..\..\vsintegration\tests\unittests\CompletionProviderTests.fs - .\VisualFSharp.Unittests.exe + .\fsc.exe --define:EXE -r:.\Microsoft.Build.Utilities.Core.dll -o VisualFSharp.UnitTests.exe -g --optimize- -r .\FSharp.Compiler.Private.dll -r .\FSharp.Editor.dll -r nunit.framework.dll ..\..\..\tests\service\FsUnit.fs ..\..\..\tests\service\Common.fs /delaysign /keyfile:..\..\..\src\fsharp\msft.pubkey ..\..\..\vsintegration\tests\UnitTests\CompletionProviderTests.fs + .\VisualFSharp.UnitTests.exe *) // Technique 3: // // Use F# Interactive. This only works for FSharp.Compiler.Private.dll which has a public API +// +// ------------------------------------------------------------------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -[] -module Microsoft.VisualStudio.FSharp.Editor.Tests.Roslyn.QuickInfoProviderTests -open System +namespace Microsoft.VisualStudio.FSharp.Editor.Tests.Roslyn +open System open NUnit.Framework +open Microsoft.VisualStudio.FSharp + +[] +type public AssemblyResolverTestFixture () = + + [] + member public __.Init () = AssemblyResolver.addResolver () + +[] +module QuickInfoProviderTests = open Microsoft.CodeAnalysis open Microsoft.CodeAnalysis.Text open Microsoft.VisualStudio.FSharp.Editor open Microsoft.FSharp.Compiler.SourceCodeServices open UnitTests.TestLib.LanguageService - let filePath = "C:\\test.fs" let internal projectOptions = { ProjectFileName = "C:\\test.fsproj" + ProjectId = None SourceFiles = [| filePath |] ReferencedProjects = [| |] OtherOptions = [| |] @@ -99,7 +112,7 @@ Full name: System.Console" let parsingOptions, _ = checker.GetParsingOptionsFromProjectOptions projectOptions let quickInfo = - FSharpQuickInfoProvider.ProvideQuickInfo(checker, documentId, SourceText.From(fileContents), filePath, caretPosition, parsingOptions, projectOptions, 0) + FSharpAsyncQuickInfoSource.ProvideQuickInfo(checker, documentId, SourceText.From(fileContents), filePath, caretPosition, parsingOptions, projectOptions, 0) |> Async.RunSynchronously let actual = quickInfo |> Option.map (fun (text, _, _, _) -> getQuickInfoText text) @@ -230,7 +243,7 @@ let res8 = abs 5.0 let parsingOptions, _ = checker.GetParsingOptionsFromProjectOptions projectOptions let quickInfo = - FSharpQuickInfoProvider.ProvideQuickInfo(checker, documentId, SourceText.From(fileContents), filePath, caretPosition, parsingOptions, projectOptions, 0) + FSharpAsyncQuickInfoSource.ProvideQuickInfo(checker, documentId, SourceText.From(fileContents), filePath, caretPosition, parsingOptions, projectOptions, 0) |> Async.RunSynchronously let actual = quickInfo |> Option.map (fun (text, _, _, _) -> getQuickInfoText text) diff --git a/vsintegration/tests/unittests/Resources/TestTypeProvider.Negative1.fsx b/vsintegration/tests/UnitTests/Resources/TestTypeProvider.Negative1.fsx similarity index 100% rename from vsintegration/tests/unittests/Resources/TestTypeProvider.Negative1.fsx rename to vsintegration/tests/UnitTests/Resources/TestTypeProvider.Negative1.fsx diff --git a/vsintegration/tests/unittests/Resources/TestTypeProvider.Positive1.fsx b/vsintegration/tests/UnitTests/Resources/TestTypeProvider.Positive1.fsx similarity index 100% rename from vsintegration/tests/unittests/Resources/TestTypeProvider.Positive1.fsx rename to vsintegration/tests/UnitTests/Resources/TestTypeProvider.Positive1.fsx diff --git a/vsintegration/tests/UnitTests/SemanticColorizationServiceTests.fs b/vsintegration/tests/UnitTests/SemanticColorizationServiceTests.fs new file mode 100644 index 00000000000..3c5b8f40147 --- /dev/null +++ b/vsintegration/tests/UnitTests/SemanticColorizationServiceTests.fs @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. +namespace Microsoft.VisualStudio.FSharp.Editor.Tests.Roslyn + +open System +open NUnit.Framework +open Microsoft.VisualStudio.FSharp.Editor +open Microsoft.FSharp.Compiler.SourceCodeServices +open Microsoft.FSharp.Compiler +open Microsoft.CodeAnalysis.Text + +[] +type SemanticClassificationServiceTests() = + let filePath = "C:\\test.fs" + + let projectOptions = { + ProjectFileName = "C:\\test.fsproj" + ProjectId = None + SourceFiles = [| filePath |] + ReferencedProjects = [| |] + OtherOptions = [| |] + IsIncompleteTypeCheckEnvironment = true + UseScriptResolutionRules = false + LoadTime = DateTime.MaxValue + UnresolvedReferences = None + OriginalLoadReferences = [] + ExtraProjectInfo = None + Stamp = None + } + + let checker = FSharpChecker.Create() + let perfOptions = { LanguageServicePerformanceOptions.Default with AllowStaleCompletionResults = false } + + let getRanges (sourceText: string) : (Range.range * SemanticClassificationType) list = + asyncMaybe { + + let! _, _, checkFileResults = checker.ParseAndCheckDocument(filePath, 0, sourceText, projectOptions, perfOptions, "") + return checkFileResults.GetSemanticClassification(None) + } + |> Async.RunSynchronously + |> Option.toList + |> List.collect Array.toList + + let verifyClassificationAtEndOfMarker(fileContents: string, marker: string, classificationType: string) = + let text = SourceText.From fileContents + let ranges = getRanges fileContents + let line = text.Lines.GetLinePosition (fileContents.IndexOf(marker) + marker.Length - 1) + let markerPos = Range.mkPos (Range.Line.fromZ line.Line) (line.Character + marker.Length - 1) + match ranges |> List.tryFind (fun (range, _) -> Range.rangeContainsPos range markerPos) with + | None -> Assert.Fail("Cannot find colorization data for end of marker") + | Some(_, ty) -> Assert.AreEqual(classificationType, FSharpClassificationTypes.getClassificationTypeName ty, "Classification data doesn't match for end of marker") + + let verifyNoClassificationDataAtEndOfMarker(fileContents: string, marker: string, classificationType: string) = + let text = SourceText.From fileContents + let ranges = getRanges fileContents + let line = text.Lines.GetLinePosition (fileContents.IndexOf(marker) + marker.Length - 1) + let markerPos = Range.mkPos (Range.Line.fromZ line.Line) (line.Character + marker.Length - 1) + let anyData = ranges |> List.exists (fun (range, sct) -> Range.rangeContainsPos range markerPos && ((FSharpClassificationTypes.getClassificationTypeName sct) = classificationType)) + Assert.False(anyData, "Classification data was found when it wasn't expected.") + + [] + [] + [] + [] + [] + [] + [] + member __.Measured_Types(marker: string, classificationType: string) = + verifyClassificationAtEndOfMarker( + """#light (*Light*) + open System + + [] type (*1*)Guid<[] 'm> = Guid + [] type (*2*)string<[] 'm> = string + + let inline cast<'a, 'b> (a : 'a) : 'b = (# "" a : 'b #) + + type Uom = + static member inline tag<[]'m> (x : Guid) : (*3*)Guid<'m> = cast x + static member inline tag<[]'m> (x : string) : (*4*)string<'m> = cast x + + type [] Ms + + let i: (*5*)int = 1 + let g: (*6*)Guid = Uom.tag Guid.Empty + let s: (*7*)string = Uom.tag "foo" """, + marker, + classificationType) + + [] + [] + [] + [] + [] + [] + [] + [] + [] + [] + [] + [] + member __.MutableValues(marker: string, classificationType: string) = + let sourceText =""" +type R1 = { mutable (*1*)Doop: int} +let r1 = { (*2*)Doop = 12 } +r1.Doop + +let mutable (*3*)first = 12 + +printfn "%d" (*4*)first + +let g ((*5*)xRef: outref) = (*6*)xRef <- 12 + +let f() = + let (*7*)second = &first + let (*8*)third: outref = &first + printfn "%d%d" (*9*)second (*10*)third + +type R = { (*11*)MutableField: int ref } +let r = { (*12*)MutableField = ref 12 } +r.MutableField +r.MutableField := 3 +""" + verifyClassificationAtEndOfMarker(sourceText, marker, classificationType) + + + [] + [] + [] + [] + [] + [] + member __.NoInrefsExpected(marker: string, classificationType: string) = + let sourceText = """ +let f (item: (*1*)inref) = printfn "%d" (*2*)item +let g() = + let x = 1 + let y = 2 + let (*3*)xRef = &x + let (*4*)yRef: inref = &y + f (*5*)&xRef + f (*6*)&yRef +""" + verifyNoClassificationDataAtEndOfMarker(sourceText, marker, classificationType) \ No newline at end of file diff --git a/vsintegration/tests/unittests/SignatureHelpProviderTests.fs b/vsintegration/tests/UnitTests/SignatureHelpProviderTests.fs similarity index 96% rename from vsintegration/tests/unittests/SignatureHelpProviderTests.fs rename to vsintegration/tests/UnitTests/SignatureHelpProviderTests.fs index 2280116b4fe..ee651357715 100644 --- a/vsintegration/tests/unittests/SignatureHelpProviderTests.fs +++ b/vsintegration/tests/UnitTests/SignatureHelpProviderTests.fs @@ -2,7 +2,7 @@ // // To run the tests in this file: // -// Technique 1: Compile VisualFSharp.Unittests.dll and run it as a set of unit tests +// Technique 1: Compile VisualFSharp.UnitTests.dll and run it as a set of unit tests // // Technique 2: // @@ -12,8 +12,8 @@ // and capturing large amounts of structured output. (* cd Debug\net40\bin - .\fsc.exe --define:EXE -r:.\Microsoft.Build.Utilities.Core.dll -o VisualFSharp.Unittests.exe -g --optimize- -r .\FSharp.Compiler.Private.dll -r .\FSharp.Editor.dll -r nunit.framework.dll ..\..\..\tests\service\FsUnit.fs ..\..\..\tests\service\Common.fs /delaysign /keyfile:..\..\..\src\fsharp\msft.pubkey ..\..\..\vsintegration\tests\unittests\SignatureHelpProviderTests.fs - .\VisualFSharp.Unittests.exe + .\fsc.exe --define:EXE -r:.\Microsoft.Build.Utilities.Core.dll -o VisualFSharp.UnitTests.exe -g --optimize- -r .\FSharp.Compiler.Private.dll -r .\FSharp.Editor.dll -r nunit.framework.dll ..\..\..\tests\service\FsUnit.fs ..\..\..\tests\service\Common.fs /delaysign /keyfile:..\..\..\src\fsharp\msft.pubkey ..\..\..\vsintegration\tests\UnitTests\SignatureHelpProviderTests.fs + .\VisualFSharp.UnitTests.exe *) // Technique 3: // @@ -36,6 +36,7 @@ let PathRelativeToTestAssembly p = Path.Combine(Path.GetDirectoryName(Uri( Syste let internal projectOptions = { ProjectFileName = "C:\\test.fsproj" + ProjectId = None SourceFiles = [| filePath |] ReferencedProjects = [| |] OtherOptions = [| "-r:" + PathRelativeToTestAssembly(@"UnitTests\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll") |] diff --git a/vsintegration/tests/UnitTests/SyntacticColorizationServiceTests.fs b/vsintegration/tests/UnitTests/SyntacticColorizationServiceTests.fs new file mode 100644 index 00000000000..05b0d39e7aa --- /dev/null +++ b/vsintegration/tests/UnitTests/SyntacticColorizationServiceTests.fs @@ -0,0 +1,1056 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. +namespace Microsoft.VisualStudio.FSharp.Editor.Tests.Roslyn + +open System +open System.Threading + +open NUnit.Framework + +open Microsoft.CodeAnalysis.Classification +open Microsoft.CodeAnalysis +open Microsoft.CodeAnalysis.Text +open Microsoft.VisualStudio.FSharp.Editor + +[][] +type SyntacticClassificationServiceTests() = + + member private this.ExtractMarkerData(fileContents: string, marker: string, defines: string list, isScriptFile: Option) = + let textSpan = TextSpan(0, fileContents.Length) + let fileName = if isScriptFile.IsSome && isScriptFile.Value then "test.fsx" else "test.fs" + let documentId = DocumentId.CreateNewId(ProjectId.CreateNewId()) + let tokens = Tokenizer.getClassifiedSpans(documentId, SourceText.From(fileContents), textSpan, Some(fileName), defines, CancellationToken.None) + let markerPosition = fileContents.IndexOf(marker) + Assert.IsTrue(markerPosition >= 0, "Cannot find marker '{0}' in file contents", marker) + (tokens, markerPosition) + + member private this.VerifyColorizerAtStartOfMarker(fileContents: string, marker: string, defines: string list, classificationType: string, ?isScriptFile: bool) = + let (tokens, markerPosition) = this.ExtractMarkerData(fileContents, marker, defines, isScriptFile) + match tokens |> Seq.tryFind(fun token -> token.TextSpan.Contains(markerPosition)) with + | None -> Assert.Fail("Cannot find colorization data for start of marker") + | Some(classifiedSpan) -> Assert.AreEqual(classificationType, classifiedSpan.ClassificationType, "Classification data doesn't match for start of marker") + + member private this.VerifyColorizerAtEndOfMarker(fileContents : string, marker: string, defines: string list, classificationType: string, ?isScriptFile: bool) = + let (tokens, markerPosition) = this.ExtractMarkerData(fileContents, marker, defines, isScriptFile) + match tokens |> Seq.tryFind(fun token -> token.TextSpan.Contains(markerPosition + marker.Length - 1)) with + | None -> Assert.Fail("Cannot find colorization data for end of marker") + | Some(classifiedSpan) -> Assert.AreEqual(classificationType, classifiedSpan.ClassificationType, "Classification data doesn't match for end of marker") + + [] + member this.Comment_SingleLine() = + this.VerifyColorizerAtEndOfMarker( + fileContents = """ + let simplefunction x y = x + y // Test1SimpleComment""", + marker = "// Test1", + defines = [], + classificationType = ClassificationTypeNames.Comment) + + [] + member this.Conment_SingleLine_MultiConments() = + this.VerifyColorizerAtEndOfMarker( + fileContents = """ + let x = // Test2SimpleComment // 1""", + marker = "// Test2", + defines = [], + classificationType = ClassificationTypeNames.Comment) + + [] + member this.Comment_MultiLine_AfterAnExpression() = + this.VerifyColorizerAtEndOfMarker( + fileContents = """ + let mutliLine x = 5(* Test1MultiLine + Test2MultiLine <@@asdf@@> + Test3MultiLine*) + 1(*Test4*)""", + marker = "Test1", + defines = [], + classificationType = ClassificationTypeNames.Comment) + + [] + member this.Comment_MultiLine_WithLineBreakAndATab() = + this.VerifyColorizerAtEndOfMarker( + fileContents = """ + let mutliLine x = 5(* Test1MultiLine + Test2MultiLine <@@asdf@@> + Test3MultiLine*) + 1(*Test4*) + """, + marker = "Test2", + defines = [], + classificationType = ClassificationTypeNames.Comment) + + [] + member this.Comment_MultiLine_WithLineBreakAfterQuotExp() = + this.VerifyColorizerAtEndOfMarker( + fileContents = """ + let mutliLine x = 5(* Test1MultiLine + Test2MultiLine <@@asdf@@> + Test3MultiLine*) + 1(*Test4*) + """, + marker = "Test3", + defines = [], + classificationType = ClassificationTypeNames.Comment) + + [] + member this.Comment_MultiLine_AfterANumber() = + this.VerifyColorizerAtStartOfMarker( + fileContents = """ + let mutliLine x = 5(* Test1MultiLine + Test2MultiLine <@@asdf@@> + Test3MultiLine*) + 1(*Test4*) + """, + marker = "1(*Test4*)", + defines = [], + classificationType = ClassificationTypeNames.NumericLiteral) + + [] + member this.Comment_Nested_Nested01() = + this.VerifyColorizerAtEndOfMarker( + fileContents = """ + (* L1Nesting + (* L2Nesting + (* L3 Nesting + let l3code = 3 + *) + let l2code = 2 + *) + let l1code = 1 + *) + let l0code = 0 + """, + marker = "let l3", + defines = [], + classificationType = ClassificationTypeNames.Comment) + + [] + member this.Comment_Nested_Nested02() = + this.VerifyColorizerAtEndOfMarker( + fileContents = """ + (* L1Nesting + (* L2Nesting + (* L3 Nesting + let l3code = 3 + *) + let l2code = 2 + *) + let l1code = 1 + *) + let l0code = 0 + """, + marker = "let l2", + defines = [], + classificationType = ClassificationTypeNames.Comment) + + [] + member this.Comment_Nested_Nested03() = + this.VerifyColorizerAtEndOfMarker( + fileContents = """ + (* L1Nesting + (* L2Nesting + (* L3 Nesting + let l3code = 3 + *) + let l2code = 2 + *) + let l1code = 1 + *) + let l0code = 0 + """, + marker = "let l1", + defines = [], + classificationType = ClassificationTypeNames.Comment) + + [] + member this.Comment_Nested_IdentAfterNestedComments() = + this.VerifyColorizerAtEndOfMarker( + fileContents = """ + (* L1Nesting + (* L2Nesting + (* L3 Nesting + let l3code = 3 + *) + let l2code = 2 + *) + let l1code = 1 + *) + let l0code = 0 + """, + marker = "let l0", + defines = [], + classificationType = ClassificationTypeNames.Identifier) + + [] + member this.Comment_CommentInString() = + this.VerifyColorizerAtEndOfMarker( + fileContents = """ + let commentsInString = "...(*test1_comment_in_string_literal*)..." + )""", + marker = "test1", + defines = [], + classificationType = ClassificationTypeNames.StringLiteral) + + [] + member this.Comment_StringInComment() = + this.VerifyColorizerAtEndOfMarker( + fileContents = """ + (* + let commentsInString2 = "...*)test2_stringliteral_in_comment(*..." + *)""", + marker = "test2", + defines = [], + classificationType = ClassificationTypeNames.Comment) + + [] + member this.Comment_Unterminated_KeywordBeforeComment() = + this.VerifyColorizerAtStartOfMarker( + fileContents = """ + type IPeekPoke = interface(*ML Comment Start + abstract member Peek: unit -> int + abstract member Poke: int -> unit + end + """, + marker = "face(*ML Comment Start", + defines = [], + classificationType = ClassificationTypeNames.Keyword) + + [] + member this.Comment_Unterminated_KeywordInComment() = + this.VerifyColorizerAtStartOfMarker( + fileContents = """ + type IPeekPoke = interface(*ML Comment Start + abstract member Peek: unit -> int + abstract member Poke: int -> unit + end + + type wodget = class + val mutable state: int + interface IPeekPoke with(*Few Lines Later2*) + member x.Poke(n) = x.state <- x.state + n + member x.Peek() = x.state + end + end(*Few Lines Later3*)""", + marker = "with(*Few Lines Later2*)", + defines = [], + classificationType = ClassificationTypeNames.Comment) + + [] + member this.Comment_Unterminated_NestedComments() = + this.VerifyColorizerAtStartOfMarker( + fileContents = """ + type IPeekPoke = interface(*ML Comment Start + abstract member Peek: unit -> int + abstract member Poke: int -> unit + end + + type wodget = class + val mutable state: int + interface IPeekPoke with(*Few Lines Later2*) + member x.Poke(n) = x.state <- x.state + n + member x.Peek() = x.state + end + member x.HasBeenPoked = (x.state <> 0) + new() = { state = 0 } + end(*Few Lines Later3*)""", + marker = "nd(*Few Lines Later3*)", + defines = [], + classificationType = ClassificationTypeNames.Comment) + + [] + member this.String_AtEnd() = + this.VerifyColorizerAtStartOfMarker( + fileContents = """ + let stringone = "simple string test"(*Simple String*) """, + marker = """est"(*Simple String*)""", + defines = [], + classificationType = ClassificationTypeNames.StringLiteral) + + [] + member this.String_MultiLines() = + this.VerifyColorizerAtStartOfMarker( + fileContents = """ + let stringtwo = "simple test(*MultiLine - First*) + string test"(*MultiLine - Second*)""", + marker = "st(*MultiLine - First*)", + defines = [], + classificationType = ClassificationTypeNames.StringLiteral) + + [] + member this.String_MultiLines_LineBreak() = + this.VerifyColorizerAtStartOfMarker( + fileContents = """ + let stringtwo = "simple test(*MultiLine - First*) + string test"(*MultiLine - Second*) """, + marker = "\"(*MultiLine - Second*) ", + defines = [], + classificationType = ClassificationTypeNames.StringLiteral) + + [] + member this.String_Literal() = + this.VerifyColorizerAtStartOfMarker( + fileContents = """ + let stringthree = @"literal test"(*Literal String*)""", + marker = """st"(*Literal String*)""", + defines = [], + classificationType = ClassificationTypeNames.StringLiteral) + + [] + member this.ByteString_AtEnd() = + this.VerifyColorizerAtStartOfMarker( + fileContents = """ + let bytestringone = "abcdefg"B(*Byte String*)""", + marker = "B(*Byte String*)", + defines = [], + classificationType = ClassificationTypeNames.StringLiteral) + + [] + member this.ByteString_MultiLines() = + this.VerifyColorizerAtStartOfMarker( + fileContents = """ + let bytestringtwo = "simple(*MultiLineB - First*) + string"B(*MultiLineB - Second*)""", + marker = """ing"B(*MultiLineB - Second*)""", + defines = [], + classificationType = ClassificationTypeNames.StringLiteral) + + [] + member this.ByteString_Literal() = + this.VerifyColorizerAtStartOfMarker( + fileContents = """ + let bytestringthree = @"literal"B(*Literal Byte*)""", + marker = """al"B(*Literal Byte*)""", + defines = [], + classificationType = ClassificationTypeNames.StringLiteral) + + [] + member this.EscapedIdentifier_word() = + this.VerifyColorizerAtStartOfMarker( + fileContents = """let ``this is an escaped identifier 123ASDF@#$"`` = 4""", + marker = "this", + defines = [], + classificationType = ClassificationTypeNames.Identifier) + + [] + member this.EscapedIdentifier_SpecialChar() = + this.VerifyColorizerAtStartOfMarker( + fileContents = """let ``this is an escaped identifier 123ASDF@#$"`` = 4""", + marker = "3ASDF@#", + defines = [], + classificationType = ClassificationTypeNames.Identifier) + + [] + member this.EscapedIdentifier_EscapeChar() = + this.VerifyColorizerAtStartOfMarker( + fileContents = """let ``this is an escaped identifier 123ASDF@#$"`` = 4""", + marker = "\"``", + defines = [], + classificationType = ClassificationTypeNames.Identifier) + + /// Regression for 3609 - Colorizer: __SOURCE__ and others colorized as a string + [] + member this.PredefinedIdentifier_SOURCE_DIRECTORY() = + this.VerifyColorizerAtStartOfMarker( + fileContents = """ + let x = __SOURCE_DIRECTORY__(*Test1*)""", + marker = "__(*Test1*)", + defines = [], + classificationType = ClassificationTypeNames.Keyword) + + [] + member this.PredefinedIdentifier_SOURCE_FILE() = + this.VerifyColorizerAtStartOfMarker( + fileContents = """ + let y = __SOURCE_FILE__(*Test2*))""", + marker = "__(*Test2*)", + defines = [], + classificationType = ClassificationTypeNames.Keyword) + + [] + member this.PredefinedIdentifier_LINE() = + this.VerifyColorizerAtStartOfMarker( + fileContents = """ + let z = __LINE__(*Test3*)""", + marker = "__(*Test3*)", + defines = [], + classificationType = ClassificationTypeNames.Keyword) + + // Regression Test for FSB 3566, F# colorizer does not respect numbers + [] + member this.Number_InAnExpression() = + this.VerifyColorizerAtStartOfMarker( + fileContents = """let f x = x + 9""", + marker = "9", + defines = [], + classificationType = ClassificationTypeNames.NumericLiteral) + + // Regression Test for FSB 1778 - Colorization seems to be confused after parsing a comment that contains a verbatim string that contains a \ + [] + member this.Number_AfterCommentWithBackSlash() = + this.VerifyColorizerAtStartOfMarker( + fileContents = """let f (* @"\\" *)x = x + 19(*Marker1*)""", + marker = "9(*Marker1*)", + defines = [], + classificationType = ClassificationTypeNames.NumericLiteral) + + // Regression Test for FSharp1.0:2539 -- lexing @"" strings inside (* *) comments? + [] + member this.Keyword_AfterCommentWithLexingStrings() = + this.VerifyColorizerAtStartOfMarker( + fileContents = """ + (* + let x = @"\\" + *) + + let(*Marker1*) y = 1 + """, + marker = "t(*Marker1*)", + defines = [], + classificationType = ClassificationTypeNames.Keyword) + + // Regression Test for FSB 1380 - Language Service colorizes anything followed by a bang as a keyword + [] + member this.Keyword_LetBang() = + this.VerifyColorizerAtStartOfMarker( + fileContents = """ + let seqExpr = + seq { + let! x = [1 .. 10](*Marker1*) + yield! x(*Marker2*) + do! - = ()(*Marker3*) + }""", + marker = "! x = [1 .. 10](*Marker1*)", + defines = [], + classificationType = ClassificationTypeNames.Keyword) + + [] + member this.Keyword_Yield() = + this.VerifyColorizerAtStartOfMarker( + fileContents = """ + let seqExpr = + seq { + let! x = [1 .. 10](*Marker1*) + yield! x(*Marker2*) + do! - = ()(*Marker3*) + }""", + marker = "! x(*Marker2*)", + defines = [], + classificationType = ClassificationTypeNames.Keyword) + + [] + member this.Keyword_Do() = + this.VerifyColorizerAtStartOfMarker( + fileContents = """ + let seqExpr = + seq { + let! x = [1 .. 10](*Marker1*) + yield! x(*Marker2*) + do! - = ()(*Marker3*) + }""", + marker = "! - = ()(*Marker3*)", + defines = [], + classificationType = ClassificationTypeNames.Keyword) + + [] + member this.Keyword_Invalid_Bang() = + this.VerifyColorizerAtStartOfMarker( + fileContents = """ + let seqExpr = + seq { + foo! = true(*Marker1*) + }""", + marker = "! = true(*Marker1*)", + defines = [], + classificationType = ClassificationTypeNames.Identifier) + + [] + [] + [] + //This test case Verify that the color of const is the keyword color + member this.TypeProvider_StaticParameters_Keyword_const() = + this.VerifyColorizerAtStartOfMarker( + fileContents = """ + type foo = N1.T< const(*Marker1*) "Hello World",2>""", + marker = "t(*Marker1*)", + defines = [], + classificationType = ClassificationTypeNames.Keyword) + + // Regression test for FSB 3696 - Colorization doesn't treat #if/else/endif correctly when embedded in a string literal + [] + member this.PreProcessor_InStringLiteral01() = + this.VerifyColorizerAtStartOfMarker( + fileContents = """ + #if UNDEFINED + let x = "#elseMarker1" + let y = "#endifMarker2" + #else//Marker3 + let x = "#elseMarker4" + let y = "#endifMarker5" + #endif""", + marker = "eMarker1", + defines = [], + classificationType = ClassificationTypeNames.ExcludedCode) + + [] + member this.PreProcessor_InStringLiteral02() = + this.VerifyColorizerAtStartOfMarker( + fileContents = """ + #if UNDEFINED + let x = "#elseMarker1" + let y = "#endifMarker2" + #else//Marker3 + let x = "#elseMarker4" + let y = "#endifMarker5" + #endif""", + marker = "fMarker2", + defines = [], + classificationType = ClassificationTypeNames.ExcludedCode) + + [] + member this.PreProcessor_ElseKeyword() = + this.VerifyColorizerAtStartOfMarker( + fileContents = """ + #if UNDEFINED + let x = "#elseMarker1" + let y = "#endifMarker2" + #else//Marker3 + let x = "#elseMarker4" + let y = "#endifMarker5" + #endif""", + marker = "e//Marker3", + defines = [], + classificationType = ClassificationTypeNames.PreprocessorKeyword) + + [] + member this.PreProcessor_InStringLiteral03() = + this.VerifyColorizerAtStartOfMarker( + fileContents = """ + #if UNDEFINED + let x = "#elseMarker1" + let y = "#endifMarker2" + #else//Marker3 + let x = "#elseMarker4" + let y = "#endifMarker5" + #endif""", + marker = "eMarker4", + defines = [], + classificationType = ClassificationTypeNames.StringLiteral) + + [] + member this.PreProcessor_InStringLiteral04() = + this.VerifyColorizerAtStartOfMarker( + fileContents = """ + #if UNDEFINED + let x = "#elseMarker1" + let y = "#endifMarker2" + #else//Marker3 + let x = "#elseMarker4" + let y = "#endifMarker5" + #endif""", + marker = "fMarker5", + defines = [], + classificationType = ClassificationTypeNames.StringLiteral) + + // Regression test for FSHARP1.0:4279 + [] + member this.Keyword_OCaml_asr() = + this.VerifyColorizerAtStartOfMarker( + fileContents = """ + let foo a = + match a with + | Some(asr, b) -> () + |_ -> ()""", + marker = "asr", + defines = [], + classificationType = ClassificationTypeNames.Keyword) + + [] + member this.Keyword_OCaml_land() = + this.VerifyColorizerAtStartOfMarker( + fileContents = """ + let foo a = + match a with + | Some(land, b) -> () + |_ -> ()""", + marker = "land", + defines = [], + classificationType = ClassificationTypeNames.Keyword) + + [] + member this.Keyword_OCaml_lor() = + this.VerifyColorizerAtStartOfMarker( + fileContents = """ + let foo a = + match a with + | Some(lor, b) -> () + |_ -> ()""", + marker = "lor", + defines = [], + classificationType = ClassificationTypeNames.Keyword) + + [] + member this.Keyword_OCaml_lsl() = + this.VerifyColorizerAtStartOfMarker( + fileContents = """ + let foo a = + match a with + | Some(lsl, b) -> () + |_ -> ()""", + marker = "lsl", + defines = [], + classificationType = ClassificationTypeNames.Keyword) + + [] + member this.Keyword_OCaml_lsr() = + this.VerifyColorizerAtStartOfMarker( + fileContents = """ + let foo a = + match a with + | Some(lsr, b) -> () + |_ -> ()""", + marker = "lsr", + defines = [], + classificationType = ClassificationTypeNames.Keyword) + + [] + member this.Keyword_OCaml_lxor() = + this.VerifyColorizerAtStartOfMarker( + fileContents = """ + let foo a = + match a with + | Some(lxor, b) -> () + |_ -> ()""", + marker = "lxor", + defines = [], + classificationType = ClassificationTypeNames.Keyword) + + [] + member this.Keyword_OCaml_mod() = + this.VerifyColorizerAtStartOfMarker( + fileContents = """ + let foo a = + match a with + | Some(mod, b) -> () + |_ -> ()""", + marker = "mod", + defines = [], + classificationType = ClassificationTypeNames.Keyword) + + [] + member this.Keyword_OCaml_sig() = + this.VerifyColorizerAtStartOfMarker( + fileContents = """ + let foo a = + match a with + | Some(sig, b) -> () + |_ -> ()""", + marker = "sig", + defines = [], + classificationType = ClassificationTypeNames.Keyword) + + [] + [] + [] + [] + [] + [] + [] + [] + [] + [] + [] + [] + [] + [] + member this.InactiveCode(marker: string, classificationType: string) = + let fileContents = """ + #if UNDEFINED + (*Inactive Code1*)let notLegit1 x = x + #else + #if UNDEFINED + (*Inactive Code2*)let notLegit2 x = x + #else + #if UNDEFINED + (*Inactive Code3*)let notLegit3 x = x + #else + #if UNDEFINED + (*Inactive Code4*)let notLegit4 x = x + #else + #if UNDEFINED + (*Inactive Code5*)let notLegit5 x = x + #else + (*Active Code5*)let legitCode5 x = x + #endif + (*Active Code4*)let legitCode4 x = x + #endif + (*Active Code3*)let legitCode3 x = x + #endif + + (*Active Code2*)let legitCode2 x = x + #endif + (*Active Code1*)let legitCode1 x = x + #endif + + #if DEFINED + (*Active Code6*)let legitCode6 x = x + #if DEFINED + (*Active Code7*)let legitCode7 x = x + #else + (*Inactive Code7*)let notLegit7 x = x + #endif + #else + (*Inactive Code6*)let notLegit6 x = x + #endif + """ + + this.VerifyColorizerAtEndOfMarker(fileContents, marker, ["DEFINED"], classificationType) + + + [] + member public this.Colorizer_AtString() = + this.VerifyColorizerAtEndOfMarker("let s = @\"Bob\"", + marker = "let s = @\"B", + defines = [], + classificationType = ClassificationTypeNames.StringLiteral) + + + [] + [] + [] + member public this.Regression_Bug4860(marker: string, classificationType: string) = + this.VerifyColorizerAtStartOfMarker( + fileContents = " + let x = __SOURCE_DIRECTORY__(*Test1*) + let y = __SOURCE_FILE__(*Test2*) + let z = __LINE__(*Test3*)", + marker = marker, + defines = [], + classificationType = classificationType) + + + [] + [] + [] + [] + [] + [] + [] + [] + [] + [] + [] + [] + [] + [] + [] + [] + [] + [] + [] + [] + [] + [] + [] + [] + member public this.Number_Regression_Bug3566(marker: string, classificationType: string) = + this.VerifyColorizerAtEndOfMarker( + fileContents = + "let n = 123 + let l = [12..15] + let l2 = [12 .. 15] + let l3 = [ 12 .. 15 ] + // comment1: 1234 + (* comment2: 1234 *) + let other = 0x4, 0b0100, 4L, 4UL, 4u, 4s, 4us, 4y, 4uy, 4.0, 4.0f, 4N, 4I, 1M, 123", + marker = marker, + defines = [], + classificationType = classificationType) + + + /// FEATURE: Hash commands in .fsx files are colorized in PreprocessorKeyword color + [] + member public this.Preprocessor_InFsxFile_StartOfMarker(marker: string, classificationType: string) = + this.VerifyColorizerAtStartOfMarker( + fileContents = + "#reference @\"\" + #load @\"\" + #I <--hash I + #time @\"\"", + marker = marker, + defines = [], + classificationType = classificationType, + isScriptFile = true) + + + /// FEATURE: Hash commands in .fsx files are colorized in PreprocessorKeyword color + [] + [] + [] + member public this.Preprocessor_InFsxFile_EndOfMarker(marker: string, classificationType: string) = + this.VerifyColorizerAtEndOfMarker( + fileContents = + "#reference @\"\" + #load @\"\" + #I <--hash I + #time @\"\"", + marker = marker, + defines = [], + classificationType = classificationType, + isScriptFile = true) + + + /// FEATURE: Script-specific hash commands do not show up in blue in .fs files. + [] + member public this.Preprocessor_InFsFile_StartOfMarker(marker: string, classificationType: string) = + this.VerifyColorizerAtStartOfMarker( + fileContents = + "#reference @\"\" + #load @\"\" + #I <--hash I + #time @\"\"", + marker = marker, + defines = [], + classificationType = classificationType) + + + /// FEATURE: Script-specific hash commands do not show up in blue in .fs files. + [] + [] + [] + member public this.Preprocessor_InFsFile_EndOfMarker(marker: string, classificationType: string) = + this.VerifyColorizerAtEndOfMarker( + fileContents = + "#reference @\"\" + #load @\"\" + #I <--hash I + #time @\"\"", + marker = marker, + defines = [], + classificationType = classificationType) + + /// FEATURE: Nested (* *) comments are allowed and will be colorized with CommentColor. Only the final *) causes the comment to close. + [] + [] + [] + member public this.Comment_AfterCommentBlock(marker: string, classificationType: string) = + this.VerifyColorizerAtEndOfMarker( + fileContents = + "(*Bob*)type Bob() = class end + (* + (* + (*Alice*)type Alice() = class end + *) + *) + (*Charles*)type Charles() = class end", + marker = marker, + defines = [], + classificationType = classificationType) + + + /// BUG: The comment used to be colored in black. + [] + member public this.Regression_Bug1596() = + this.VerifyColorizerAtEndOfMarker( + fileContents = " let 2d (* Identifiers cannot start with numbers *)", + marker = "let 2d (* Ide", + defines = [], + classificationType = ClassificationTypeNames.Comment) + + + /// FEATURE: Code inside #if\#else\#endif blocks is colored with InactiveCodeColor depending on defines. This works for nested #if blocks as well. + [] + [] + [] + [] + [] + [] + member public this.Preprocessor_AfterPreprocessorBlock(marker: string, classificationType: string) = + this.VerifyColorizerAtEndOfMarker( + fileContents = + "(*Bob*)type Bob() = class end + #if UNDEFINED + #if UNDEFINED + (*Alice*)type Alice() = class end + #else + (*Tom*)type Tom() = class end + #endif + #else + #if UNDEFINED + (*Maurice*)type Maurice() = class end + #else + (*Larry*)type Larry() = class end + #endif + #endif + (*Charles*)type Charles() = class end", + marker = marker, + defines = [], + classificationType = classificationType) + + + // Wrong "#else" in "#if" should be ignored + [] + [] + member public this.Preprocessor_InvalidElseDirectiveIgnored(marker: string, classificationType: string) = + this.VerifyColorizerAtEndOfMarker( + fileContents = + "#if UNDEFINED + (*Alice*)type Alice() = class end + (**) #else + (*Larry*)type Larry() = class end + #endif", + marker = marker, + defines = [], + classificationType = classificationType) + + + /// FEATURE: Code inside #if\#else\#endif blocks is colored with InactiveCodeColor depending on defines. This works for nested #if blocks as well. + [] + [] + [] + [] + [] + [] + member public this.Preprocessor_AfterPreprocessorBlockWithDefines(marker: string, classificationType: string) = + this.VerifyColorizerAtEndOfMarker( + fileContents = + "(*Bob*)type Bob() = class end + #if UNDEFINED + #if UNDEFINED + (*Alice*)type Alice() = class end + #else + (*Tom*)type Tom() = class end + #endif + #else + #if UNDEFINED + (*Maurice*)type Maurice() = class end + #else + (*Larry*)type Larry() = class end + #endif + #endif + (*Charles*)type Charles() = class end", + marker = marker, + defines = [], + classificationType = classificationType) + + + /// FEATURE: Preprocessor keywords #light\#if\#else\#endif are colored with the PreprocessorKeyword color. + /// FEATURE: All code in the inactive side of #if\#else\#endif is colored with with InactiveCode color. + [] + [] + [] + [] + [] + [] + [] + [] + [] + [] + member public this.Preprocessor_Keywords(marker: string, classificationType: string) = + this.VerifyColorizerAtStartOfMarker( + fileContents = + "#light (*Light*) + #if UNDEFINED //(*If*) + let x = 1(*Inactive*) + #else //(*Else*) + let(*Active*) x = 1 + #endif //(*Endif*)", + marker = marker, + defines = [], + classificationType = classificationType) + + + /// FEATURE: Preprocessor extended grammar basic check. + /// FEATURE: More extensive grammar test is done in compiler unit tests + [] + member public this.Preprocesso_ExtendedIfGrammar_Basic01() = + this.VerifyColorizerAtStartOfMarker( + fileContents = """ + #if UNDEFINED || !UNDEFINED // Extended #if + let x = "activeCode" + #else + let x = "inactiveCode" + #endif + """, + marker = "activeCode", + defines = [], + classificationType = ClassificationTypeNames.StringLiteral) + + + [] + member public this.Preprocessor_ExtendedIfGrammar_Basic02() = + this.VerifyColorizerAtStartOfMarker( + fileContents = """ + #if UNDEFINED || !UNDEFINED // Extended #if + let x = "activeCode" + #else + let x = "inactiveCode" + #endif + """, + marker = "inactiveCode", + defines = [], + classificationType = ClassificationTypeNames.ExcludedCode) + + + /// #else / #endif in multiline strings is ignored + [] + member public this.Preprocessor_DirectivesInString() = + this.VerifyColorizerAtStartOfMarker( + fileContents = + "#light + + #if DEFINED + let s = \" + #else + \" + let testme = 1 + #endif", + marker = "let testme", + defines = ["DEFINED"], + classificationType = ClassificationTypeNames.Keyword) + + + /// Bug 2076 - String literals were causing the endif stack information to be discarded + [] + [] + [] + member public this.Preprocessor_KeywordsWithStrings(marker: string, classificationType: string) = + this.VerifyColorizerAtStartOfMarker( + fileContents = + "#light (*Light*) + let x1 = \"string1\" + #if UNDEFINED //(*If*) + let x2 = \"string2\" + #else //(*Else*) + let x3 = \"string3\" + #endif //(*Endif*) + let x4 = \"string4\"", + marker = marker, + defines = [], + classificationType = classificationType) + + + [] + member public this.Comment_VerbatimStringInComment_Bug1778() = + this.VerifyColorizerAtStartOfMarker( + fileContents = + "#light + (* @\"\\\" *) let a = 0", + marker = "le", + defines = [], + classificationType = ClassificationTypeNames.Keyword) + + + [] + member public this.Preprocessor_KeywordsWrongIf_Bug1577() = + this.VerifyColorizerAtStartOfMarker( + fileContents = + "#if !!!!!!!!!!!!!!!COMPILED + #endif", + marker = "!!COMPILED", + defines = [], + classificationType = ClassificationTypeNames.Identifier) + + + // This was an off-by-one bug in the replacement Colorizer + [] + member public this.Keyword_LastCharacterOfKeyword() = + this.VerifyColorizerAtEndOfMarker( + fileContents = "(*Bob*)type Bob() = int", + marker = "(*Bob*)typ", + defines = [], + classificationType = ClassificationTypeNames.Keyword) \ No newline at end of file diff --git a/vsintegration/tests/unittests/TestLib.LanguageService.fs b/vsintegration/tests/UnitTests/TestLib.LanguageService.fs similarity index 99% rename from vsintegration/tests/unittests/TestLib.LanguageService.fs rename to vsintegration/tests/UnitTests/TestLib.LanguageService.fs index c1b1d73dcce..35425ae98dc 100644 --- a/vsintegration/tests/unittests/TestLib.LanguageService.fs +++ b/vsintegration/tests/UnitTests/TestLib.LanguageService.fs @@ -3,6 +3,7 @@ namespace UnitTests.TestLib.LanguageService open System +open System.Reflection open NUnit.Framework open System.Diagnostics open System.IO @@ -247,6 +248,7 @@ type LanguageServiceBaseTests() = let mutable defaultVS : VisualStudio = Unchecked.defaultof<_> let mutable currentVS : VisualStudio = Unchecked.defaultof<_> + (* VsOps is internal, but this type needs to be public *) let mutable ops = BuiltMSBuildTestFlavour() let testStopwatch = new Stopwatch() @@ -427,7 +429,6 @@ type LanguageServiceBaseTests() = ShiftKeyUp(currentVS) ops.CleanInvisibleProject(currentVS) - do AbstractIL.Diagnostics.setDiagnosticsChannel(None); ResetStopWatch() testStopwatch.Reset() testStopwatch.Start() diff --git a/vsintegration/tests/unittests/TestLib.ProjectSystem.fs b/vsintegration/tests/UnitTests/TestLib.ProjectSystem.fs similarity index 99% rename from vsintegration/tests/unittests/TestLib.ProjectSystem.fs rename to vsintegration/tests/UnitTests/TestLib.ProjectSystem.fs index b353e548f72..0cd346e1314 100644 --- a/vsintegration/tests/unittests/TestLib.ProjectSystem.fs +++ b/vsintegration/tests/UnitTests/TestLib.ProjectSystem.fs @@ -18,6 +18,7 @@ open Microsoft.Win32 open Microsoft.VisualStudio open Microsoft.VisualStudio.FSharp.ProjectSystem +open Microsoft.VisualStudio.FSharp.Editor open Microsoft.VisualStudio.Shell.Interop open Microsoft.Build.Execution @@ -25,7 +26,6 @@ open Microsoft.Build.Framework #nowarn "52" // The value has been copied to ensure the original is not mutated open NUnit.Framework - open UnitTests.TestLib.Utils open UnitTests.TestLib.Utils.Asserts open UnitTests.TestLib.Utils.FilesystemHelpers @@ -122,7 +122,7 @@ type TheTests() = static member internal CreateProject(filename : string, forceUTF8 : string, configChangeNotifier, serviceProvider) = UIStuff.SetupSynchronizationContext() let buildEngine = Utilities.InitializeMsBuildEngine(null) - let buildProject = Utilities.InitializeMsBuildProject(buildEngine, filename) + let buildProject = Utilities.InitializeMsBuildProject(buildEngine, filename, null) let package = new FSharpProjectPackage() let project = new UnitTestingFSharpProjectNode(package) try @@ -366,10 +366,10 @@ type TheTests() = () member internal this.EnsureCausesNotification(project, code) = - let ipsf = project :> Microsoft.VisualStudio.FSharp.LanguageService.IProvideProjectSite + let ipsf = project :> IProvideProjectSite let ips = ipsf.GetProjectSite() let changed = ref false - let handle = ips.AdviseProjectSiteChanges("EnsureCausesNotificationTest", new Microsoft.VisualStudio.FSharp.LanguageService.AdviseProjectSiteChanges(fun () -> changed := true)) + let handle = ips.AdviseProjectSiteChanges("EnsureCausesNotificationTest", new AdviseProjectSiteChanges(fun () -> changed := true)) code() AssertEqual true (!changed) static member MsBuildCompileItems(project : Microsoft.Build.Evaluation.Project) = @@ -656,7 +656,7 @@ module LanguageServiceExtension = failwith "tried to build not-yet-created project" else let target = if target <> null then target else "Build" - projInfo.Project.BuildToOutput(target,vsOutputWindowPane) |> ignore // force build through project system for code coverage + projInfo.Project.BuildToOutput(target,vsOutputWindowPane, null) |> ignore // force build through project system for code coverage hooks.BuildHook(projFileName, target, vsOutputWindowPane) // use MSBuild to build and also return MainAssembly value member x.GetMainOutputAssemblyHook baseName = hooks.GetMainOutputAssemblyHook baseName diff --git a/vsintegration/tests/unittests/TestLib.Salsa.fs b/vsintegration/tests/UnitTests/TestLib.Salsa.fs similarity index 100% rename from vsintegration/tests/unittests/TestLib.Salsa.fs rename to vsintegration/tests/UnitTests/TestLib.Salsa.fs diff --git a/vsintegration/tests/unittests/TestLib.Utils.fs b/vsintegration/tests/UnitTests/TestLib.Utils.fs similarity index 98% rename from vsintegration/tests/unittests/TestLib.Utils.fs rename to vsintegration/tests/UnitTests/TestLib.Utils.fs index 378e0ee25b8..d67e55fe8ee 100644 --- a/vsintegration/tests/unittests/TestLib.Utils.fs +++ b/vsintegration/tests/UnitTests/TestLib.Utils.fs @@ -5,7 +5,6 @@ namespace UnitTests.TestLib.Utils open System open System.IO open NUnit.Framework - open Microsoft.VisualStudio module Asserts = @@ -52,7 +51,9 @@ module Asserts = module UIStuff = let SetupSynchronizationContext() = + Microsoft.VisualStudio.FSharp.ProjectSystem.UIThread.InitUnitTestingMode() Microsoft.VisualStudio.FSharp.LanguageService.UIThread.InitUnitTestingMode() + Microsoft.VisualStudio.FSharp.ProjectSystem.UIThread.InitUnitTestingMode() module FilesystemHelpers = let pid = System.Diagnostics.Process.GetCurrentProcess().Id diff --git a/vsintegration/tests/unittests/Tests.Build.fs b/vsintegration/tests/UnitTests/Tests.Build.fs similarity index 97% rename from vsintegration/tests/unittests/Tests.Build.fs rename to vsintegration/tests/UnitTests/Tests.Build.fs index 22faaef01a8..ecdf69f5cf3 100644 --- a/vsintegration/tests/unittests/Tests.Build.fs +++ b/vsintegration/tests/UnitTests/Tests.Build.fs @@ -171,6 +171,21 @@ type Build() = "--highentropyva-" + Environment.NewLine) cmd + [] + member public this.TestWarningsNotAsErrors() = + let tool = new Microsoft.FSharp.Build.Fsc() + tool.WarningsNotAsErrors <- "52;109" + AssertEqual "52;109" tool.WarningsNotAsErrors + let cmd = tool.InternalGenerateResponseFileCommands() + printfn "cmd=\"%s\"" cmd + AssertEqual ("--optimize+" + Environment.NewLine + + "--warnaserror:76" + Environment.NewLine + + "--warnaserror-:52,109" + Environment.NewLine + + "--fullpaths" + Environment.NewLine + + "--flaterrors" + Environment.NewLine + + "--highentropyva-" + Environment.NewLine) + cmd + [] member public this.TestVersionFile() = let tool = new Microsoft.FSharp.Build.Fsc() diff --git a/vsintegration/tests/unittests/Tests.InternalCollections.fs b/vsintegration/tests/UnitTests/Tests.InternalCollections.fs similarity index 100% rename from vsintegration/tests/unittests/Tests.InternalCollections.fs rename to vsintegration/tests/UnitTests/Tests.InternalCollections.fs diff --git a/vsintegration/tests/unittests/Tests.Powerpack.fs b/vsintegration/tests/UnitTests/Tests.Powerpack.fs similarity index 100% rename from vsintegration/tests/unittests/Tests.Powerpack.fs rename to vsintegration/tests/UnitTests/Tests.Powerpack.fs diff --git a/vsintegration/tests/unittests/Tests.TaskReporter.fs b/vsintegration/tests/UnitTests/Tests.TaskReporter.fs similarity index 100% rename from vsintegration/tests/unittests/Tests.TaskReporter.fs rename to vsintegration/tests/UnitTests/Tests.TaskReporter.fs diff --git a/vsintegration/tests/unittests/Tests.Watson.fs b/vsintegration/tests/UnitTests/Tests.Watson.fs similarity index 96% rename from vsintegration/tests/unittests/Tests.Watson.fs rename to vsintegration/tests/UnitTests/Tests.Watson.fs index 824edef867c..1e660ac359b 100644 --- a/vsintegration/tests/unittests/Tests.Watson.fs +++ b/vsintegration/tests/UnitTests/Tests.Watson.fs @@ -4,7 +4,9 @@ namespace Tests.Compiler.Watson #nowarn "52" // The value has been copied to ensure the original is not mutated +open Microsoft.FSharp.Compiler.AbstractIL.ILBinaryReader open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library +open Microsoft.FSharp.Compiler.CompileOps open Microsoft.FSharp.Compiler.Driver open NUnit.Framework open System @@ -27,7 +29,7 @@ type Check = let argv = [| "--simulateException:"+simulationCode; "watson-test.fs"|] let ctok = AssumeCompilationThreadWithoutEvidence () - let _code = mainCompile (ctok, argv, Microsoft.FSharp.Compiler.MSBuildReferenceResolver.Resolver, false, false, false, Microsoft.FSharp.Compiler.ErrorLogger.QuitProcessExiter, ConsoleLoggerProvider(), None, None) + let _code = mainCompile (ctok, argv, Microsoft.FSharp.Compiler.MSBuildReferenceResolver.Resolver, false, ReduceMemoryFlag.No, CopyFSharpCoreFlag.No, Microsoft.FSharp.Compiler.ErrorLogger.QuitProcessExiter, ConsoleLoggerProvider(), None, None) () with | :? 'TException as e -> diff --git a/vsintegration/tests/unittests/Tests.XmlDocComments.fs b/vsintegration/tests/UnitTests/Tests.XmlDocComments.fs similarity index 100% rename from vsintegration/tests/unittests/Tests.XmlDocComments.fs rename to vsintegration/tests/UnitTests/Tests.XmlDocComments.fs diff --git a/vsintegration/tests/unittests/UnusedOpensTests.fs b/vsintegration/tests/UnitTests/UnusedOpensTests.fs similarity index 95% rename from vsintegration/tests/unittests/UnusedOpensTests.fs rename to vsintegration/tests/UnitTests/UnusedOpensTests.fs index f932ff26164..d23f5ed4e18 100644 --- a/vsintegration/tests/unittests/UnusedOpensTests.fs +++ b/vsintegration/tests/UnitTests/UnusedOpensTests.fs @@ -12,6 +12,7 @@ let private filePath = "C:\\test.fs" let private projectOptions : FSharpProjectOptions = { ProjectFileName = "C:\\test.fsproj" + ProjectId = None SourceFiles = [| filePath |] ReferencedProjects = [| |] OtherOptions = [| |] @@ -752,3 +753,56 @@ module M2 = let _ = T() """ => [] + +[] +let ``unused open declaration in top level rec module``() = + """ +module rec TopModule +open System +open System.IO +let _ = DateTime.Now +""" + => [ 4, (5, 14) ] + +[] +let ``unused open declaration in rec namespace``() = + """ +namespace rec TopNamespace +open System +open System.IO +module Nested = + let _ = DateTime.Now +""" + => [ 4, (5, 14) ] + +[] +let ``unused inner module open declaration in rec module``() = + """ +module rec TopModule + +module Nested = + let x = 1 + let f x = x + type T() = class end + type R = { F: int } + +open Nested +""" + => [ 10, (5, 11) ] + +[] +let ``used inner module open declaration in rec module``() = + """ +module rec TopModule + +module Nested = + let x = 1 + let f x = x + type T() = class end + type R = { F: int } + +open Nested + +let _ = f 1 +""" + => [] \ No newline at end of file diff --git a/vsintegration/tests/UnitTests/VisualFSharp.UnitTests.fsproj b/vsintegration/tests/UnitTests/VisualFSharp.UnitTests.fsproj new file mode 100644 index 00000000000..a6f6e7b2726 --- /dev/null +++ b/vsintegration/tests/UnitTests/VisualFSharp.UnitTests.fsproj @@ -0,0 +1,223 @@ + + + + + + net46 + Library + $(NoWarn);58;75 + NO_PROJECTCRACKER;$(DefineConstants) + true + true + $(SystemValueTuplePackageVersion) + true + true + false + + + + + + Internal.Utilities.Collections.fsi + + + Internal.Utilities.Collections.fs + + + Internal.Utilities.CompilerLocationUtils.fs + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CompilerService\FsUnit.fs + + + CompilerService\Common.fs + + + CompilerService\Symbols.fs + + + CompilerService\EditorTests.fs + + + CompilerService\FileSystemTests.fs + + + CompilerService\ProjectAnalysisTests.fs + + + + CompilerService\PerfTests.fs + + + CompilerService\InteractiveCheckerTests.fs + + + + CompilerService\CSharpProjectAnalysis.fs + + + CompilerService\ProjectOptionsTests.fs + + + CompilerService\StructureTests.fs + + + CompilerService\AssemblyContentProviderTests.fs + + + CompilerService\ServiceUntypedParseTests.fs + + + CompilerService\UnusedOpensTests.fs + + + Roslyn\SyntacticColorizationServiceTests.fs + + + Roslyn\SemanticColorizationServiceTests.fs + + + Roslyn\BraceMatchingServiceTests.fs + + + + Roslyn\EditorFormattingServiceTests.fs + + + Roslyn\IndentationServiceTests.fs + + + Roslyn\BreakpointResolutionService.fs + + + Roslyn\LanguageDebugInfoServiceTests.fs + + + Roslyn\DocumentDiagnosticAnalyzerTests.fs + + + Roslyn\ProjectDiagnosticAnalyzerTests.fs + + + Roslyn\CompletionProviderTests.fs + + + Roslyn\SignatureHelpProviderTests.fs + + + Roslyn\GoToDefinitionServiceTests.fs + + + + Roslyn\DocumentHighlightsServiceTests.fs + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vsintegration/src/unittests/app.runsettings b/vsintegration/tests/UnitTests/app.runsettings similarity index 100% rename from vsintegration/src/unittests/app.runsettings rename to vsintegration/tests/UnitTests/app.runsettings diff --git a/vsintegration/tests/unittests/ColorizationServiceTests.fs b/vsintegration/tests/unittests/ColorizationServiceTests.fs deleted file mode 100644 index 5fca7ad933c..00000000000 --- a/vsintegration/tests/unittests/ColorizationServiceTests.fs +++ /dev/null @@ -1,1056 +0,0 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -namespace Microsoft.VisualStudio.FSharp.Editor.Tests.Roslyn - -open System -open System.Threading - -open NUnit.Framework - -open Microsoft.CodeAnalysis.Classification -open Microsoft.CodeAnalysis -open Microsoft.CodeAnalysis.Text -open Microsoft.VisualStudio.FSharp.Editor - -[][] -type ColorizationServiceTests() = - - member private this.ExtractMarkerData(fileContents: string, marker: string, defines: string list, isScriptFile: Option) = - let textSpan = TextSpan(0, fileContents.Length) - let fileName = if isScriptFile.IsSome && isScriptFile.Value then "test.fsx" else "test.fs" - let documentId = DocumentId.CreateNewId(ProjectId.CreateNewId()) - let tokens = Tokenizer.getColorizationData(documentId, SourceText.From(fileContents), textSpan, Some(fileName), defines, CancellationToken.None) - let markerPosition = fileContents.IndexOf(marker) - Assert.IsTrue(markerPosition >= 0, "Cannot find marker '{0}' in file contents", marker) - (tokens, markerPosition) - - member private this.VerifyColorizerAtStartOfMarker(fileContents: string, marker: string, defines: string list, classificationType: string, ?isScriptFile: bool) = - let (tokens, markerPosition) = this.ExtractMarkerData(fileContents, marker, defines, isScriptFile) - match tokens |> Seq.tryFind(fun token -> token.TextSpan.Contains(markerPosition)) with - | None -> Assert.Fail("Cannot find colorization data for start of marker") - | Some(classifiedSpan) -> Assert.AreEqual(classificationType, classifiedSpan.ClassificationType, "Classification data doesn't match for start of marker") - - member private this.VerifyColorizerAtEndOfMarker(fileContents : string, marker: string, defines: string list, classificationType: string, ?isScriptFile: bool) = - let (tokens, markerPosition) = this.ExtractMarkerData(fileContents, marker, defines, isScriptFile) - match tokens |> Seq.tryFind(fun token -> token.TextSpan.Contains(markerPosition + marker.Length - 1)) with - | None -> Assert.Fail("Cannot find colorization data for end of marker") - | Some(classifiedSpan) -> Assert.AreEqual(classificationType, classifiedSpan.ClassificationType, "Classification data doesn't match for end of marker") - - [] - member this.Comment_SingleLine() = - this.VerifyColorizerAtEndOfMarker( - fileContents = """ - let simplefunction x y = x + y // Test1SimpleComment""", - marker = "// Test1", - defines = [], - classificationType = ClassificationTypeNames.Comment) - - [] - member this.Conment_SingleLine_MultiConments() = - this.VerifyColorizerAtEndOfMarker( - fileContents = """ - let x = // Test2SimpleComment // 1""", - marker = "// Test2", - defines = [], - classificationType = ClassificationTypeNames.Comment) - - [] - member this.Comment_MultiLine_AfterAnExpression() = - this.VerifyColorizerAtEndOfMarker( - fileContents = """ - let mutliLine x = 5(* Test1MultiLine - Test2MultiLine <@@asdf@@> - Test3MultiLine*) + 1(*Test4*)""", - marker = "Test1", - defines = [], - classificationType = ClassificationTypeNames.Comment) - - [] - member this.Comment_MultiLine_WithLineBreakAndATab() = - this.VerifyColorizerAtEndOfMarker( - fileContents = """ - let mutliLine x = 5(* Test1MultiLine - Test2MultiLine <@@asdf@@> - Test3MultiLine*) + 1(*Test4*) - """, - marker = "Test2", - defines = [], - classificationType = ClassificationTypeNames.Comment) - - [] - member this.Comment_MultiLine_WithLineBreakAfterQuotExp() = - this.VerifyColorizerAtEndOfMarker( - fileContents = """ - let mutliLine x = 5(* Test1MultiLine - Test2MultiLine <@@asdf@@> - Test3MultiLine*) + 1(*Test4*) - """, - marker = "Test3", - defines = [], - classificationType = ClassificationTypeNames.Comment) - - [] - member this.Comment_MultiLine_AfterANumber() = - this.VerifyColorizerAtStartOfMarker( - fileContents = """ - let mutliLine x = 5(* Test1MultiLine - Test2MultiLine <@@asdf@@> - Test3MultiLine*) + 1(*Test4*) - """, - marker = "1(*Test4*)", - defines = [], - classificationType = ClassificationTypeNames.NumericLiteral) - - [] - member this.Comment_Nested_Nested01() = - this.VerifyColorizerAtEndOfMarker( - fileContents = """ - (* L1Nesting - (* L2Nesting - (* L3 Nesting - let l3code = 3 - *) - let l2code = 2 - *) - let l1code = 1 - *) - let l0code = 0 - """, - marker = "let l3", - defines = [], - classificationType = ClassificationTypeNames.Comment) - - [] - member this.Comment_Nested_Nested02() = - this.VerifyColorizerAtEndOfMarker( - fileContents = """ - (* L1Nesting - (* L2Nesting - (* L3 Nesting - let l3code = 3 - *) - let l2code = 2 - *) - let l1code = 1 - *) - let l0code = 0 - """, - marker = "let l2", - defines = [], - classificationType = ClassificationTypeNames.Comment) - - [] - member this.Comment_Nested_Nested03() = - this.VerifyColorizerAtEndOfMarker( - fileContents = """ - (* L1Nesting - (* L2Nesting - (* L3 Nesting - let l3code = 3 - *) - let l2code = 2 - *) - let l1code = 1 - *) - let l0code = 0 - """, - marker = "let l1", - defines = [], - classificationType = ClassificationTypeNames.Comment) - - [] - member this.Comment_Nested_IdentAfterNestedComments() = - this.VerifyColorizerAtEndOfMarker( - fileContents = """ - (* L1Nesting - (* L2Nesting - (* L3 Nesting - let l3code = 3 - *) - let l2code = 2 - *) - let l1code = 1 - *) - let l0code = 0 - """, - marker = "let l0", - defines = [], - classificationType = ClassificationTypeNames.Identifier) - - [] - member this.Comment_CommentInString() = - this.VerifyColorizerAtEndOfMarker( - fileContents = """ - let commentsInString = "...(*test1_comment_in_string_literal*)..." - )""", - marker = "test1", - defines = [], - classificationType = ClassificationTypeNames.StringLiteral) - - [] - member this.Comment_StringInComment() = - this.VerifyColorizerAtEndOfMarker( - fileContents = """ - (* - let commentsInString2 = "...*)test2_stringliteral_in_comment(*..." - *)""", - marker = "test2", - defines = [], - classificationType = ClassificationTypeNames.Comment) - - [] - member this.Comment_Unterminated_KeywordBeforeComment() = - this.VerifyColorizerAtStartOfMarker( - fileContents = """ - type IPeekPoke = interface(*ML Comment Start - abstract member Peek: unit -> int - abstract member Poke: int -> unit - end - """, - marker = "face(*ML Comment Start", - defines = [], - classificationType = ClassificationTypeNames.Keyword) - - [] - member this.Comment_Unterminated_KeywordInComment() = - this.VerifyColorizerAtStartOfMarker( - fileContents = """ - type IPeekPoke = interface(*ML Comment Start - abstract member Peek: unit -> int - abstract member Poke: int -> unit - end - - type wodget = class - val mutable state: int - interface IPeekPoke with(*Few Lines Later2*) - member x.Poke(n) = x.state <- x.state + n - member x.Peek() = x.state - end - end(*Few Lines Later3*)""", - marker = "with(*Few Lines Later2*)", - defines = [], - classificationType = ClassificationTypeNames.Comment) - - [] - member this.Comment_Unterminated_NestedComments() = - this.VerifyColorizerAtStartOfMarker( - fileContents = """ - type IPeekPoke = interface(*ML Comment Start - abstract member Peek: unit -> int - abstract member Poke: int -> unit - end - - type wodget = class - val mutable state: int - interface IPeekPoke with(*Few Lines Later2*) - member x.Poke(n) = x.state <- x.state + n - member x.Peek() = x.state - end - member x.HasBeenPoked = (x.state <> 0) - new() = { state = 0 } - end(*Few Lines Later3*)""", - marker = "nd(*Few Lines Later3*)", - defines = [], - classificationType = ClassificationTypeNames.Comment) - - [] - member this.String_AtEnd() = - this.VerifyColorizerAtStartOfMarker( - fileContents = """ - let stringone = "simple string test"(*Simple String*) """, - marker = """est"(*Simple String*)""", - defines = [], - classificationType = ClassificationTypeNames.StringLiteral) - - [] - member this.String_MultiLines() = - this.VerifyColorizerAtStartOfMarker( - fileContents = """ - let stringtwo = "simple test(*MultiLine - First*) - string test"(*MultiLine - Second*)""", - marker = "st(*MultiLine - First*)", - defines = [], - classificationType = ClassificationTypeNames.StringLiteral) - - [] - member this.String_MultiLines_LineBreak() = - this.VerifyColorizerAtStartOfMarker( - fileContents = """ - let stringtwo = "simple test(*MultiLine - First*) - string test"(*MultiLine - Second*) """, - marker = "\"(*MultiLine - Second*) ", - defines = [], - classificationType = ClassificationTypeNames.StringLiteral) - - [] - member this.String_Literal() = - this.VerifyColorizerAtStartOfMarker( - fileContents = """ - let stringthree = @"literal test"(*Literal String*)""", - marker = """st"(*Literal String*)""", - defines = [], - classificationType = ClassificationTypeNames.StringLiteral) - - [] - member this.ByteString_AtEnd() = - this.VerifyColorizerAtStartOfMarker( - fileContents = """ - let bytestringone = "abcdefg"B(*Byte String*)""", - marker = "B(*Byte String*)", - defines = [], - classificationType = ClassificationTypeNames.StringLiteral) - - [] - member this.ByteString_MultiLines() = - this.VerifyColorizerAtStartOfMarker( - fileContents = """ - let bytestringtwo = "simple(*MultiLineB - First*) - string"B(*MultiLineB - Second*)""", - marker = """ing"B(*MultiLineB - Second*)""", - defines = [], - classificationType = ClassificationTypeNames.StringLiteral) - - [] - member this.ByteString_Literal() = - this.VerifyColorizerAtStartOfMarker( - fileContents = """ - let bytestringthree = @"literal"B(*Literal Byte*)""", - marker = """al"B(*Literal Byte*)""", - defines = [], - classificationType = ClassificationTypeNames.StringLiteral) - - [] - member this.EscapedIdentifier_word() = - this.VerifyColorizerAtStartOfMarker( - fileContents = """let ``this is an escaped identifier 123ASDF@#$"`` = 4""", - marker = "this", - defines = [], - classificationType = ClassificationTypeNames.Identifier) - - [] - member this.EscapedIdentifier_SpecialChar() = - this.VerifyColorizerAtStartOfMarker( - fileContents = """let ``this is an escaped identifier 123ASDF@#$"`` = 4""", - marker = "3ASDF@#", - defines = [], - classificationType = ClassificationTypeNames.Identifier) - - [] - member this.EscapedIdentifier_EscapeChar() = - this.VerifyColorizerAtStartOfMarker( - fileContents = """let ``this is an escaped identifier 123ASDF@#$"`` = 4""", - marker = "\"``", - defines = [], - classificationType = ClassificationTypeNames.Identifier) - - /// Regression for 3609 - Colorizer: __SOURCE__ and others colorized as a string - [] - member this.PredefinedIdentifier_SOURCE_DIRECTORY() = - this.VerifyColorizerAtStartOfMarker( - fileContents = """ - let x = __SOURCE_DIRECTORY__(*Test1*)""", - marker = "__(*Test1*)", - defines = [], - classificationType = ClassificationTypeNames.Keyword) - - [] - member this.PredefinedIdentifier_SOURCE_FILE() = - this.VerifyColorizerAtStartOfMarker( - fileContents = """ - let y = __SOURCE_FILE__(*Test2*))""", - marker = "__(*Test2*)", - defines = [], - classificationType = ClassificationTypeNames.Keyword) - - [] - member this.PredefinedIdentifier_LINE() = - this.VerifyColorizerAtStartOfMarker( - fileContents = """ - let z = __LINE__(*Test3*)""", - marker = "__(*Test3*)", - defines = [], - classificationType = ClassificationTypeNames.Keyword) - - // Regression Test for FSB 3566, F# colorizer does not respect numbers - [] - member this.Number_InAnExpression() = - this.VerifyColorizerAtStartOfMarker( - fileContents = """let f x = x + 9""", - marker = "9", - defines = [], - classificationType = ClassificationTypeNames.NumericLiteral) - - // Regression Test for FSB 1778 - Colorization seems to be confused after parsing a comment that contains a verbatim string that contains a \ - [] - member this.Number_AfterCommentWithBackSlash() = - this.VerifyColorizerAtStartOfMarker( - fileContents = """let f (* @"\\" *)x = x + 19(*Marker1*)""", - marker = "9(*Marker1*)", - defines = [], - classificationType = ClassificationTypeNames.NumericLiteral) - - // Regression Test for FSharp1.0:2539 -- lexing @"" strings inside (* *) comments? - [] - member this.Keyword_AfterCommentWithLexingStrings() = - this.VerifyColorizerAtStartOfMarker( - fileContents = """ - (* - let x = @"\\" - *) - - let(*Marker1*) y = 1 - """, - marker = "t(*Marker1*)", - defines = [], - classificationType = ClassificationTypeNames.Keyword) - - // Regression Test for FSB 1380 - Language Service colorizes anything followed by a bang as a keyword - [] - member this.Keyword_LetBang() = - this.VerifyColorizerAtStartOfMarker( - fileContents = """ - let seqExpr = - seq { - let! x = [1 .. 10](*Marker1*) - yield! x(*Marker2*) - do! - = ()(*Marker3*) - }""", - marker = "! x = [1 .. 10](*Marker1*)", - defines = [], - classificationType = ClassificationTypeNames.Keyword) - - [] - member this.Keyword_Yield() = - this.VerifyColorizerAtStartOfMarker( - fileContents = """ - let seqExpr = - seq { - let! x = [1 .. 10](*Marker1*) - yield! x(*Marker2*) - do! - = ()(*Marker3*) - }""", - marker = "! x(*Marker2*)", - defines = [], - classificationType = ClassificationTypeNames.Keyword) - - [] - member this.Keyword_Do() = - this.VerifyColorizerAtStartOfMarker( - fileContents = """ - let seqExpr = - seq { - let! x = [1 .. 10](*Marker1*) - yield! x(*Marker2*) - do! - = ()(*Marker3*) - }""", - marker = "! - = ()(*Marker3*)", - defines = [], - classificationType = ClassificationTypeNames.Keyword) - - [] - member this.Keyword_Invalid_Bang() = - this.VerifyColorizerAtStartOfMarker( - fileContents = """ - let seqExpr = - seq { - foo! = true(*Marker1*) - }""", - marker = "! = true(*Marker1*)", - defines = [], - classificationType = ClassificationTypeNames.Identifier) - - [] - [] - [] - //This test case Verify that the color of const is the keyword color - member this.TypeProvider_StaticParameters_Keyword_const() = - this.VerifyColorizerAtStartOfMarker( - fileContents = """ - type foo = N1.T< const(*Marker1*) "Hello World",2>""", - marker = "t(*Marker1*)", - defines = [], - classificationType = ClassificationTypeNames.Keyword) - - // Regression test for FSB 3696 - Colorization doesn't treat #if/else/endif correctly when embedded in a string literal - [] - member this.PreProcessor_InStringLiteral01() = - this.VerifyColorizerAtStartOfMarker( - fileContents = """ - #if UNDEFINED - let x = "#elseMarker1" - let y = "#endifMarker2" - #else//Marker3 - let x = "#elseMarker4" - let y = "#endifMarker5" - #endif""", - marker = "eMarker1", - defines = [], - classificationType = ClassificationTypeNames.ExcludedCode) - - [] - member this.PreProcessor_InStringLiteral02() = - this.VerifyColorizerAtStartOfMarker( - fileContents = """ - #if UNDEFINED - let x = "#elseMarker1" - let y = "#endifMarker2" - #else//Marker3 - let x = "#elseMarker4" - let y = "#endifMarker5" - #endif""", - marker = "fMarker2", - defines = [], - classificationType = ClassificationTypeNames.ExcludedCode) - - [] - member this.PreProcessor_ElseKeyword() = - this.VerifyColorizerAtStartOfMarker( - fileContents = """ - #if UNDEFINED - let x = "#elseMarker1" - let y = "#endifMarker2" - #else//Marker3 - let x = "#elseMarker4" - let y = "#endifMarker5" - #endif""", - marker = "e//Marker3", - defines = [], - classificationType = ClassificationTypeNames.PreprocessorKeyword) - - [] - member this.PreProcessor_InStringLiteral03() = - this.VerifyColorizerAtStartOfMarker( - fileContents = """ - #if UNDEFINED - let x = "#elseMarker1" - let y = "#endifMarker2" - #else//Marker3 - let x = "#elseMarker4" - let y = "#endifMarker5" - #endif""", - marker = "eMarker4", - defines = [], - classificationType = ClassificationTypeNames.StringLiteral) - - [] - member this.PreProcessor_InStringLiteral04() = - this.VerifyColorizerAtStartOfMarker( - fileContents = """ - #if UNDEFINED - let x = "#elseMarker1" - let y = "#endifMarker2" - #else//Marker3 - let x = "#elseMarker4" - let y = "#endifMarker5" - #endif""", - marker = "fMarker5", - defines = [], - classificationType = ClassificationTypeNames.StringLiteral) - - // Regression test for FSHARP1.0:4279 - [] - member this.Keyword_OCaml_asr() = - this.VerifyColorizerAtStartOfMarker( - fileContents = """ - let foo a = - match a with - | Some(asr, b) -> () - |_ -> ()""", - marker = "asr", - defines = [], - classificationType = ClassificationTypeNames.Keyword) - - [] - member this.Keyword_OCaml_land() = - this.VerifyColorizerAtStartOfMarker( - fileContents = """ - let foo a = - match a with - | Some(land, b) -> () - |_ -> ()""", - marker = "land", - defines = [], - classificationType = ClassificationTypeNames.Keyword) - - [] - member this.Keyword_OCaml_lor() = - this.VerifyColorizerAtStartOfMarker( - fileContents = """ - let foo a = - match a with - | Some(lor, b) -> () - |_ -> ()""", - marker = "lor", - defines = [], - classificationType = ClassificationTypeNames.Keyword) - - [] - member this.Keyword_OCaml_lsl() = - this.VerifyColorizerAtStartOfMarker( - fileContents = """ - let foo a = - match a with - | Some(lsl, b) -> () - |_ -> ()""", - marker = "lsl", - defines = [], - classificationType = ClassificationTypeNames.Keyword) - - [] - member this.Keyword_OCaml_lsr() = - this.VerifyColorizerAtStartOfMarker( - fileContents = """ - let foo a = - match a with - | Some(lsr, b) -> () - |_ -> ()""", - marker = "lsr", - defines = [], - classificationType = ClassificationTypeNames.Keyword) - - [] - member this.Keyword_OCaml_lxor() = - this.VerifyColorizerAtStartOfMarker( - fileContents = """ - let foo a = - match a with - | Some(lxor, b) -> () - |_ -> ()""", - marker = "lxor", - defines = [], - classificationType = ClassificationTypeNames.Keyword) - - [] - member this.Keyword_OCaml_mod() = - this.VerifyColorizerAtStartOfMarker( - fileContents = """ - let foo a = - match a with - | Some(mod, b) -> () - |_ -> ()""", - marker = "mod", - defines = [], - classificationType = ClassificationTypeNames.Keyword) - - [] - member this.Keyword_OCaml_sig() = - this.VerifyColorizerAtStartOfMarker( - fileContents = """ - let foo a = - match a with - | Some(sig, b) -> () - |_ -> ()""", - marker = "sig", - defines = [], - classificationType = ClassificationTypeNames.Keyword) - - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - member this.InactiveCode(marker: string, classificationType: string) = - let fileContents = """ - #if UNDEFINED - (*Inactive Code1*)let notLegit1 x = x - #else - #if UNDEFINED - (*Inactive Code2*)let notLegit2 x = x - #else - #if UNDEFINED - (*Inactive Code3*)let notLegit3 x = x - #else - #if UNDEFINED - (*Inactive Code4*)let notLegit4 x = x - #else - #if UNDEFINED - (*Inactive Code5*)let notLegit5 x = x - #else - (*Active Code5*)let legitCode5 x = x - #endif - (*Active Code4*)let legitCode4 x = x - #endif - (*Active Code3*)let legitCode3 x = x - #endif - - (*Active Code2*)let legitCode2 x = x - #endif - (*Active Code1*)let legitCode1 x = x - #endif - - #if DEFINED - (*Active Code6*)let legitCode6 x = x - #if DEFINED - (*Active Code7*)let legitCode7 x = x - #else - (*Inactive Code7*)let notLegit7 x = x - #endif - #else - (*Inactive Code6*)let notLegit6 x = x - #endif - """ - - this.VerifyColorizerAtEndOfMarker(fileContents, marker, ["DEFINED"], classificationType) - - - [] - member public this.Colorizer_AtString() = - this.VerifyColorizerAtEndOfMarker("let s = @\"Bob\"", - marker = "let s = @\"B", - defines = [], - classificationType = ClassificationTypeNames.StringLiteral) - - - [] - [] - [] - member public this.Regression_Bug4860(marker: string, classificationType: string) = - this.VerifyColorizerAtStartOfMarker( - fileContents = " - let x = __SOURCE_DIRECTORY__(*Test1*) - let y = __SOURCE_FILE__(*Test2*) - let z = __LINE__(*Test3*)", - marker = marker, - defines = [], - classificationType = classificationType) - - - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - member public this.Number_Regression_Bug3566(marker: string, classificationType: string) = - this.VerifyColorizerAtEndOfMarker( - fileContents = - "let n = 123 - let l = [12..15] - let l2 = [12 .. 15] - let l3 = [ 12 .. 15 ] - // comment1: 1234 - (* comment2: 1234 *) - let other = 0x4, 0b0100, 4L, 4UL, 4u, 4s, 4us, 4y, 4uy, 4.0, 4.0f, 4N, 4I, 1M, 123", - marker = marker, - defines = [], - classificationType = classificationType) - - - /// FEATURE: Hash commands in .fsx files are colorized in PreprocessorKeyword color - [] - member public this.Preprocessor_InFsxFile_StartOfMarker(marker: string, classificationType: string) = - this.VerifyColorizerAtStartOfMarker( - fileContents = - "#reference @\"\" - #load @\"\" - #I <--hash I - #time @\"\"", - marker = marker, - defines = [], - classificationType = classificationType, - isScriptFile = true) - - - /// FEATURE: Hash commands in .fsx files are colorized in PreprocessorKeyword color - [] - [] - [] - member public this.Preprocessor_InFsxFile_EndOfMarker(marker: string, classificationType: string) = - this.VerifyColorizerAtEndOfMarker( - fileContents = - "#reference @\"\" - #load @\"\" - #I <--hash I - #time @\"\"", - marker = marker, - defines = [], - classificationType = classificationType, - isScriptFile = true) - - - /// FEATURE: Script-specific hash commands do not show up in blue in .fs files. - [] - member public this.Preprocessor_InFsFile_StartOfMarker(marker: string, classificationType: string) = - this.VerifyColorizerAtStartOfMarker( - fileContents = - "#reference @\"\" - #load @\"\" - #I <--hash I - #time @\"\"", - marker = marker, - defines = [], - classificationType = classificationType) - - - /// FEATURE: Script-specific hash commands do not show up in blue in .fs files. - [] - [] - [] - member public this.Preprocessor_InFsFile_EndOfMarker(marker: string, classificationType: string) = - this.VerifyColorizerAtEndOfMarker( - fileContents = - "#reference @\"\" - #load @\"\" - #I <--hash I - #time @\"\"", - marker = marker, - defines = [], - classificationType = classificationType) - - /// FEATURE: Nested (* *) comments are allowed and will be colorized with CommentColor. Only the final *) causes the comment to close. - [] - [] - [] - member public this.Comment_AfterCommentBlock(marker: string, classificationType: string) = - this.VerifyColorizerAtEndOfMarker( - fileContents = - "(*Bob*)type Bob() = class end - (* - (* - (*Alice*)type Alice() = class end - *) - *) - (*Charles*)type Charles() = class end", - marker = marker, - defines = [], - classificationType = classificationType) - - - /// BUG: The comment used to be colored in black. - [] - member public this.Regression_Bug1596() = - this.VerifyColorizerAtEndOfMarker( - fileContents = " let 2d (* Identifiers cannot start with numbers *)", - marker = "let 2d (* Ide", - defines = [], - classificationType = ClassificationTypeNames.Comment) - - - /// FEATURE: Code inside #if\#else\#endif blocks is colored with InactiveCodeColor depending on defines. This works for nested #if blocks as well. - [] - [] - [] - [] - [] - [] - member public this.Preprocessor_AfterPreprocessorBlock(marker: string, classificationType: string) = - this.VerifyColorizerAtEndOfMarker( - fileContents = - "(*Bob*)type Bob() = class end - #if UNDEFINED - #if UNDEFINED - (*Alice*)type Alice() = class end - #else - (*Tom*)type Tom() = class end - #endif - #else - #if UNDEFINED - (*Maurice*)type Maurice() = class end - #else - (*Larry*)type Larry() = class end - #endif - #endif - (*Charles*)type Charles() = class end", - marker = marker, - defines = [], - classificationType = classificationType) - - - // Wrong "#else" in "#if" should be ignored - [] - [] - member public this.Preprocessor_InvalidElseDirectiveIgnored(marker: string, classificationType: string) = - this.VerifyColorizerAtEndOfMarker( - fileContents = - "#if UNDEFINED - (*Alice*)type Alice() = class end - (**) #else - (*Larry*)type Larry() = class end - #endif", - marker = marker, - defines = [], - classificationType = classificationType) - - - /// FEATURE: Code inside #if\#else\#endif blocks is colored with InactiveCodeColor depending on defines. This works for nested #if blocks as well. - [] - [] - [] - [] - [] - [] - member public this.Preprocessor_AfterPreprocessorBlockWithDefines(marker: string, classificationType: string) = - this.VerifyColorizerAtEndOfMarker( - fileContents = - "(*Bob*)type Bob() = class end - #if UNDEFINED - #if UNDEFINED - (*Alice*)type Alice() = class end - #else - (*Tom*)type Tom() = class end - #endif - #else - #if UNDEFINED - (*Maurice*)type Maurice() = class end - #else - (*Larry*)type Larry() = class end - #endif - #endif - (*Charles*)type Charles() = class end", - marker = marker, - defines = [], - classificationType = classificationType) - - - /// FEATURE: Preprocessor keywords #light\#if\#else\#endif are colored with the PreprocessorKeyword color. - /// FEATURE: All code in the inactive side of #if\#else\#endif is colored with with InactiveCode color. - [] - [] - [] - [] - [] - [] - [] - [] - [] - [] - member public this.Preprocessor_Keywords(marker: string, classificationType: string) = - this.VerifyColorizerAtStartOfMarker( - fileContents = - "#light (*Light*) - #if UNDEFINED //(*If*) - let x = 1(*Inactive*) - #else //(*Else*) - let(*Active*) x = 1 - #endif //(*Endif*)", - marker = marker, - defines = [], - classificationType = classificationType) - - - /// FEATURE: Preprocessor extended grammar basic check. - /// FEATURE: More extensive grammar test is done in compiler unit tests - [] - member public this.Preprocesso_ExtendedIfGrammar_Basic01() = - this.VerifyColorizerAtStartOfMarker( - fileContents = """ - #if UNDEFINED || !UNDEFINED // Extended #if - let x = "activeCode" - #else - let x = "inactiveCode" - #endif - """, - marker = "activeCode", - defines = [], - classificationType = ClassificationTypeNames.StringLiteral) - - - [] - member public this.Preprocessor_ExtendedIfGrammar_Basic02() = - this.VerifyColorizerAtStartOfMarker( - fileContents = """ - #if UNDEFINED || !UNDEFINED // Extended #if - let x = "activeCode" - #else - let x = "inactiveCode" - #endif - """, - marker = "inactiveCode", - defines = [], - classificationType = ClassificationTypeNames.ExcludedCode) - - - /// #else / #endif in multiline strings is ignored - [] - member public this.Preprocessor_DirectivesInString() = - this.VerifyColorizerAtStartOfMarker( - fileContents = - "#light - - #if DEFINED - let s = \" - #else - \" - let testme = 1 - #endif", - marker = "let testme", - defines = ["DEFINED"], - classificationType = ClassificationTypeNames.Keyword) - - - /// Bug 2076 - String literals were causing the endif stack information to be discarded - [] - [] - [] - member public this.Preprocessor_KeywordsWithStrings(marker: string, classificationType: string) = - this.VerifyColorizerAtStartOfMarker( - fileContents = - "#light (*Light*) - let x1 = \"string1\" - #if UNDEFINED //(*If*) - let x2 = \"string2\" - #else //(*Else*) - let x3 = \"string3\" - #endif //(*Endif*) - let x4 = \"string4\"", - marker = marker, - defines = [], - classificationType = classificationType) - - - [] - member public this.Comment_VerbatimStringInComment_Bug1778() = - this.VerifyColorizerAtStartOfMarker( - fileContents = - "#light - (* @\"\\\" *) let a = 0", - marker = "le", - defines = [], - classificationType = ClassificationTypeNames.Keyword) - - - [] - member public this.Preprocessor_KeywordsWrongIf_Bug1577() = - this.VerifyColorizerAtStartOfMarker( - fileContents = - "#if !!!!!!!!!!!!!!!COMPILED - #endif", - marker = "!!COMPILED", - defines = [], - classificationType = ClassificationTypeNames.Identifier) - - - // This was an off-by-one bug in the replacement Colorizer - [] - member public this.Keyword_LastCharacterOfKeyword() = - this.VerifyColorizerAtEndOfMarker( - fileContents = "(*Bob*)type Bob() = int", - marker = "(*Bob*)typ", - defines = [], - classificationType = ClassificationTypeNames.Keyword) \ No newline at end of file diff --git a/vsintegration/tests/unittests/CompletionProviderTests.fs b/vsintegration/tests/unittests/CompletionProviderTests.fs deleted file mode 100644 index 8799801cb3d..00000000000 --- a/vsintegration/tests/unittests/CompletionProviderTests.fs +++ /dev/null @@ -1,493 +0,0 @@ - -// To run the tests in this file: -// -// Technique 1: Compile VisualFSharp.Unittests.dll and run it as a set of unit tests -// -// Technique 2: -// -// Enable some tests in the #if EXE section at the end of the file, -// then compile this file as an EXE that has InternalsVisibleTo access into the -// appropriate DLLs. This can be the quickest way to get turnaround on updating the tests -// and capturing large amounts of structured output. -(* - cd Debug\net40\bin - .\fsc.exe --define:EXE -r:.\Microsoft.Build.Utilities.Core.dll -o VisualFSharp.Unittests.exe -g --optimize- -r .\FSharp.Compiler.Private.dll -r .\FSharp.Editor.dll -r nunit.framework.dll ..\..\..\tests\service\FsUnit.fs ..\..\..\tests\service\Common.fs /delaysign /keyfile:..\..\..\src\fsharp\msft.pubkey ..\..\..\vsintegration\tests\unittests\CompletionProviderTests.fs - .\VisualFSharp.Unittests.exe -*) -// Technique 3: -// -// Use F# Interactive. This only works for FSharp.Compiler.Service.dll which has a public API - -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -module Microsoft.VisualStudio.FSharp.Editor.Tests.Roslyn.CompletionProviderTests - -open System -open System.Linq - -open NUnit.Framework - -open Microsoft.CodeAnalysis -open Microsoft.CodeAnalysis.Completion -open Microsoft.CodeAnalysis.Text -open Microsoft.VisualStudio.FSharp.Editor - -open Microsoft.FSharp.Compiler.SourceCodeServices -open UnitTests.TestLib.LanguageService - -let filePath = "C:\\test.fs" -let internal projectOptions = { - ProjectFileName = "C:\\test.fsproj" - SourceFiles = [| filePath |] - ReferencedProjects = [| |] - OtherOptions = [| |] - IsIncompleteTypeCheckEnvironment = true - UseScriptResolutionRules = false - LoadTime = DateTime.MaxValue - OriginalLoadReferences = [] - UnresolvedReferences = None - ExtraProjectInfo = None - Stamp = None -} - -let formatCompletions(completions : string seq) = - "\n\t" + String.Join("\n\t", completions) - -let VerifyCompletionList(fileContents: string, marker: string, expected: string list, unexpected: string list) = - let caretPosition = fileContents.IndexOf(marker) + marker.Length - let results = - FSharpCompletionProvider.ProvideCompletionsAsyncAux(checker, SourceText.From(fileContents), caretPosition, projectOptions, filePath, 0, fun _ -> []) - |> Async.RunSynchronously - |> Option.defaultValue (ResizeArray()) - |> Seq.map(fun result -> result.DisplayText) - - let expectedFound = - expected - |> Seq.filter results.Contains - - let expectedNotFound = - expected - |> Seq.filter (expectedFound.Contains >> not) - - let unexpectedNotFound = - unexpected - |> Seq.filter (results.Contains >> not) - - let unexpectedFound = - unexpected - |> Seq.filter (unexpectedNotFound.Contains >> not) - - // If either of these are true, then the test fails. - let hasExpectedNotFound = not (Seq.isEmpty expectedNotFound) - let hasUnexpectedFound = not (Seq.isEmpty unexpectedFound) - - if hasExpectedNotFound || hasUnexpectedFound then - let expectedNotFoundMsg = - if hasExpectedNotFound then - sprintf "\nExpected completions not found:%s\n" (formatCompletions expectedNotFound) - else - String.Empty - - let unexpectedFoundMsg = - if hasUnexpectedFound then - sprintf "\nUnexpected completions found:%s\n" (formatCompletions unexpectedFound) - else - String.Empty - - let completionsMsg = sprintf "\nin Completions:%s" (formatCompletions results) - - let msg = sprintf "%s%s%s" expectedNotFoundMsg unexpectedFoundMsg completionsMsg - - Assert.Fail(msg) - -let VerifyCompletionListExactly(fileContents: string, marker: string, expected: string list) = - let caretPosition = fileContents.IndexOf(marker) + marker.Length - - let actual = - FSharpCompletionProvider.ProvideCompletionsAsyncAux(checker, SourceText.From(fileContents), caretPosition, projectOptions, filePath, 0, fun _ -> []) - |> Async.RunSynchronously - |> Option.defaultValue (ResizeArray()) - |> Seq.toList - // sort items as Roslyn do - by `SortText` - |> List.sortBy (fun x -> x.SortText) - - let actualNames = actual |> List.map (fun x -> x.DisplayText) - - if actualNames <> expected then - Assert.Fail(sprintf "Expected:\n%s,\nbut was:\n%s\nactual with sort text:\n%s" - (String.Join("; ", expected |> List.map (sprintf "\"%s\""))) - (String.Join("; ", actualNames |> List.map (sprintf "\"%s\""))) - (String.Join("\n", actual |> List.map (fun x -> sprintf "%s => %s" x.DisplayText x.SortText)))) - -let VerifyNoCompletionList(fileContents: string, marker: string) = - VerifyCompletionListExactly(fileContents, marker, []) - -[] -let usingDefaultSettings() = - SettingsPersistence.setSettings { ShowAfterCharIsTyped = true; ShowAfterCharIsDeleted = false; ShowAllSymbols = true } - -[] -let ShouldTriggerCompletionAtCorrectMarkers() = - let testCases = - [("x", true) - ("y", true) - ("1", false) - ("2", false) - ("x +", false) - ("Console.Write", false) - ("System.", true) - ("Console.", true) ] - - for (marker: string, shouldBeTriggered: bool) in testCases do - let fileContents = """ -let x = 1 -let y = 2 -System.Console.WriteLine(x + y) -""" - - let caretPosition = fileContents.IndexOf(marker) + marker.Length - let documentId = DocumentId.CreateNewId(ProjectId.CreateNewId()) - let getInfo() = documentId, filePath, [] - let triggered = FSharpCompletionProvider.ShouldTriggerCompletionAux(SourceText.From(fileContents), caretPosition, CompletionTriggerKind.Insertion, getInfo) - Assert.AreEqual(shouldBeTriggered, triggered, "FSharpCompletionProvider.ShouldTriggerCompletionAux() should compute the correct result") - -[] -let ShouldNotTriggerCompletionAfterAnyTriggerOtherThanInsertion() = - for triggerKind in [CompletionTriggerKind.Deletion; CompletionTriggerKind.Invoke; CompletionTriggerKind.Snippets ] do - let fileContents = "System.Console.WriteLine(123)" - let caretPosition = fileContents.IndexOf("System.") - let documentId = DocumentId.CreateNewId(ProjectId.CreateNewId()) - let getInfo() = documentId, filePath, [] - let triggered = FSharpCompletionProvider.ShouldTriggerCompletionAux(SourceText.From(fileContents), caretPosition, triggerKind, getInfo) - Assert.IsFalse(triggered, "FSharpCompletionProvider.ShouldTriggerCompletionAux() should not trigger") - -[] -let ShouldNotTriggerCompletionInStringLiterals() = - let fileContents = "let literal = \"System.Console.WriteLine()\"" - let caretPosition = fileContents.IndexOf("System.") - let documentId = DocumentId.CreateNewId(ProjectId.CreateNewId()) - let getInfo() = documentId, filePath, [] - let triggered = FSharpCompletionProvider.ShouldTriggerCompletionAux(SourceText.From(fileContents), caretPosition, CompletionTriggerKind.Insertion, getInfo) - Assert.IsFalse(triggered, "FSharpCompletionProvider.ShouldTriggerCompletionAux() should not trigger") - -[] -let ShouldNotTriggerCompletionInComments() = - let fileContents = """ -(* -This is a comment -System.Console.WriteLine() -*) -""" - let caretPosition = fileContents.IndexOf("System.") - let documentId = DocumentId.CreateNewId(ProjectId.CreateNewId()) - let getInfo() = documentId, filePath, [] - let triggered = FSharpCompletionProvider.ShouldTriggerCompletionAux(SourceText.From(fileContents), caretPosition, CompletionTriggerKind.Insertion, getInfo) - Assert.IsFalse(triggered, "FSharpCompletionProvider.ShouldTriggerCompletionAux() should not trigger") - -[] -let ShouldNotTriggerCompletionInExcludedCode() = - let fileContents = """ -#if UNDEFINED -System.Console.WriteLine() -#endif -""" - let caretPosition = fileContents.IndexOf("System.") - let documentId = DocumentId.CreateNewId(ProjectId.CreateNewId()) - let getInfo() = documentId, filePath, [] - let triggered = FSharpCompletionProvider.ShouldTriggerCompletionAux(SourceText.From(fileContents), caretPosition, CompletionTriggerKind.Insertion, getInfo) - Assert.IsFalse(triggered, "FSharpCompletionProvider.ShouldTriggerCompletionAux() should not trigger") - -[] -let ShouldDisplayTypeMembers() = - let fileContents = """ -type T1() = - member this.M1 = 5 - member this.M2 = "literal" - -[] -let main argv = - let obj = T1() - obj. -""" - VerifyCompletionList(fileContents, "obj.", ["M1"; "M2"], ["System"]) - -[] -let ShouldDisplaySystemNamespace() = - let fileContents = """ -type T1 = - member this.M1 = 5 - member this.M2 = "literal" -System.Console.WriteLine() -""" - VerifyCompletionList(fileContents, "System.", ["Console"; "Array"; "String"], ["T1"; "M1"; "M2"]) - -[] -let ``Class instance members are ordered according to their kind and where they are defined (simple case, by a variable)``() = - let fileContents = """ -type Base() = - member __.BaseMethod() = 1 - member __.BaseProp = 1 - -type Class() = - inherit Base() - member this.MineMethod() = 1 - member this.MineProp = 1 - -let x = Class() -x. -""" - let expected = ["MineProp"; "BaseProp"; "MineMethod"; "BaseMethod"; "Equals"; "GetHashCode"; "GetType"; "ToString"] - VerifyCompletionListExactly(fileContents, "x.", expected) - -[] -let ``Class instance members are ordered according to their kind and where they are defined (simple case, by a constructor)``() = - let fileContents = """ -type Base() = - member __.BaseMethod() = 1 - member __.BaseProp = 1 - -type Class() = - inherit Base() - member this.MineMethod() = 1 - member this.MineProp = 1 - -let x = Class(). -""" - let expected = ["MineProp"; "BaseProp"; "MineMethod"; "BaseMethod"; "Equals"; "GetHashCode"; "GetType"; "ToString"] - VerifyCompletionListExactly(fileContents, "let x = Class().", expected) - - -[] -let ``Class static members are ordered according to their kind and where they are defined``() = - let fileContents = """ -type Base() = - static member BaseStaticMethod() = 1 - static member BaseStaticProp = 1 - -type Class() = - inherit Base() - static member MineStaticMethod() = 1 - static member MineStaticProp = 2 - -Class. -""" - let expected = ["MineStaticProp"; "BaseStaticProp"; "MineStaticMethod"; "BaseStaticMethod"] - VerifyCompletionListExactly(fileContents, "Class.", expected) - -[] -let ``Class instance members are ordered according to their kind and where they are defined (complex case)``() = - let fileContents = """ -type Base() = - inherit System.Collections.Generic.List - member __.BaseMethod() = 1 - member __.BaseProp = 1 - -type Class() = - inherit Base() - member this.MineMethod() = 1 - member this.MineProp = 1 - -let x = Class() -x. -""" - let expected = ["MineProp"; "BaseProp"; "Capacity"; "Count"; "Item"; "MineMethod"; "Add"; "AddRange"; "AsReadOnly"; "BaseMethod"; "BinarySearch"; "Clear"; "Contains" - "ConvertAll"; "CopyTo"; "Equals"; "Exists"; "Find"; "FindAll"; "FindIndex"; "FindLast"; "FindLastIndex"; "ForEach"; "GetEnumerator"; "GetHashCode" - "GetRange"; "GetType"; "IndexOf"; "Insert"; "InsertRange"; "LastIndexOf"; "Remove"; "RemoveAll"; "RemoveAt"; "RemoveRange"; "Reverse"; "Sort" - "ToArray"; "ToString"; "TrimExcess"; "TrueForAll"] - VerifyCompletionListExactly(fileContents, "x.", expected) - -[] -let ``Constructing a new class with object initializer syntax``() = - let fileContents = """ -type A() = - member val SettableProperty = 1 with get, set - member val AnotherSettableProperty = 1 with get, set - member val NonSettableProperty = 1 - -let _ = new A(Setta) -""" - - let expected = ["SettableProperty"; "AnotherSettableProperty"] - let notExpected = ["NonSettableProperty"] - VerifyCompletionList(fileContents, "(Setta", expected, notExpected) - -[] -let ``Constructing a new class with object initializer syntax and verifying 'at' character doesn't exist.``() = - let fileContents = """ -type A() = - member val SettableProperty = 1 with get, set - member val AnotherSettableProperty = 1 with get, set - member val NonSettableProperty = 1 - -let _ = new A(Setta) -""" - - let expected = [] - let notExpected = ["SettableProperty@"; "AnotherSettableProperty@"; "NonSettableProperty@"] - VerifyCompletionList(fileContents, "(Setta", expected, notExpected) - -[] -let ``Constructing a new fully qualified class with object initializer syntax without ending paren``() = - let fileContents = """ -module M = - type A() = - member val SettableProperty = 1 with get, set - member val AnotherSettableProperty = 1 with get, set - member val NonSettableProperty = 1 - -let _ = new M.A(Setta -""" - - let expected = ["SettableProperty"; "AnotherSettableProperty"] - let notExpected = ["NonSettableProperty"] - VerifyCompletionList(fileContents, "(Setta", expected, notExpected) - -[] -let ``Extension methods go after everything else, extension properties are treated as normal ones``() = - let fileContents = """ -open System.Collections.Generic - -type List<'a> with - member __.ExtensionProp = 1 - member __.ExtensionMeth() = 1 - -List(). -""" - let expected = ["Capacity"; "Count"; "ExtensionProp"; "Item"; "Add"; "AddRange"; "AsReadOnly"; "BinarySearch"; "Clear"; "Contains"; "ConvertAll"; "CopyTo"; "Exists" - "Find"; "FindAll"; "FindIndex"; "FindLast"; "FindLastIndex"; "ForEach"; "GetEnumerator"; "GetRange"; "IndexOf"; "Insert"; "InsertRange"; "LastIndexOf" - "Remove"; "RemoveAll"; "RemoveAt"; "RemoveRange"; "Reverse"; "Sort"; "ToArray"; "TrimExcess"; "TrueForAll"; "Equals"; "GetHashCode"; "GetType"; "ToString" - "ExtensionMeth"] - VerifyCompletionListExactly(fileContents, "List().", expected) - -[] -let ``No completion on type name at declaration site``() = - let fileContents = """ -type T - -""" - VerifyNoCompletionList(fileContents, "type T") - -[] -let ``No completion on function name at declaration site``() = - let fileContents = """ -let f - -""" - VerifyNoCompletionList(fileContents, "let f") - -[] -let ``No completion on member name at declaration site``() = - let fileContents = """ -type T() = - member this.M -""" - VerifyNoCompletionList(fileContents, "member this.M") - -[] -let ``No completion on function first argument name``() = - let fileContents = """ -let func (p -""" - VerifyNoCompletionList(fileContents, "let func (p") - -[] -let ``No completion on function subsequent argument name``() = - let fileContents = """ -let func (p, h -""" - VerifyNoCompletionList(fileContents, "let func (p, h") - -[] -let ``No completion on curried function subsequent argument name``() = - let fileContents = """ -let func (p) (h -""" - VerifyNoCompletionList(fileContents, "let func (p) (h") - -[] -let ``No completion on method first argument name``() = - let fileContents = """ -type T() = - member this.M(p) = () -""" - VerifyNoCompletionList(fileContents, "member this.M(p") - -[] -let ``No completion on method subsequent argument name``() = - let fileContents = """ -type T() = - member this.M(p:int, h ) = () -""" - VerifyNoCompletionList(fileContents, "member this.M(p:int, h") - -[] -let ``Provide completion on first function argument type hint``() = - let fileContents = """ -let func (p:i -""" - VerifyCompletionList(fileContents, "let func (p:i", ["int"], []) - -[] -let ``Provide completion on subsequent function argument type hint``() = - let fileContents = """ -let func (p:int, h:f -""" - VerifyCompletionList(fileContents, "let func (p:int, h:f", ["float"], []) - -[] -let ``Provide completion on local function argument type hint``() = - let fileContents = """ -let top () = - let func (p:i -""" - VerifyCompletionList(fileContents, "let func (p:i", ["int"], []) - -[] -let ``No completion on implicit constructor first argument name``() = - let fileContents = """ -type T(p) = -""" - VerifyNoCompletionList(fileContents, "type T(p") - -[] -let ``No completion on implicit constructor subsequent argument name``() = - let fileContents = """ -type T(p:int, h) = -""" - VerifyNoCompletionList(fileContents, "type T(p:int, h") - -[] -let ``Provide completion on implicit constructor argument type hint``() = - let fileContents = """ -type T(p:i) = -""" - VerifyCompletionList(fileContents, "type T(p:i", ["int"], []) - -[] -let ``No completion on lambda argument name``() = - let fileContents = """ -let _ = fun (p) -> () -""" - VerifyNoCompletionList(fileContents, "let _ = fun (p") - -[] -let ``Provide completion on lambda argument type hint``() = - let fileContents = """ -let _ = fun (p:i) -> () -""" - VerifyCompletionList(fileContents, "let _ = fun (p:i", ["int"], []) - -[] -let ``Extensions.Bug5162``() = - let fileContents = """ -module Extensions = - type System.Object with - member x.P = 1 -module M2 = - let x = 1 - Ext -""" - VerifyCompletionList(fileContents, " Ext", ["Extensions"; "ExtraTopLevelOperators"], []) - -#if EXE -ShouldDisplaySystemNamespace() -#endif diff --git a/vsintegration/tests/unittests/VisualFSharp.Unittests.dll.config b/vsintegration/tests/unittests/VisualFSharp.Unittests.dll.config deleted file mode 100644 index 7aae3905c10..00000000000 --- a/vsintegration/tests/unittests/VisualFSharp.Unittests.dll.config +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vsintegration/tests/unittests/VisualFSharp.Unittests.fsproj b/vsintegration/tests/unittests/VisualFSharp.Unittests.fsproj deleted file mode 100644 index e590ef7026b..00000000000 --- a/vsintegration/tests/unittests/VisualFSharp.Unittests.fsproj +++ /dev/null @@ -1,406 +0,0 @@ - - - - - $(MSBuildProjectDirectory)\..\..\..\src - FSharp - VisualFSharp.Unittests - - - - Debug - 2.0 - {EE85AAB7-CDA0-4C4E-BDA0-A64DDDD13E3F} - Library - VisualFSharp.Unittests - LIBRARY - 58;75 - x86 - v4.6 - NO_PROJECTCRACKER;$(DefineConstants) - - - - Internal.Utilities.Collections.fsi - - - Internal.Utilities.Collections.fs - - - Internal.Utilities.CompilerLocationUtils.fs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - FsUnit.fs - - - Common.fs - - - EditorTests.fs - - - FileSystemTests.fs - - - ProjectAnalysisTests.fs - - - MultiProjectAnalysisTests.fs - - - PerfTests.fs - - - InteractiveCheckerTests.fs - - - ExprTests.fs - - - CSharpProjectAnalysis.fs - - - ProjectOptionsTests.fs - - - StructureTests.fs - - - ServiceAnalysis\UnusedOpensTests.fs - - - Roslyn\ColorizationServiceTests.fs - - - Roslyn\BraceMatchingServiceTests.fs - - - Roslyn\HelpContextServiceTests.fs - - - Roslyn\EditorFormattingServiceTests.fs - - - Roslyn\IndentationServiceTests.fs - - - Roslyn\BreakpointResolutionService.fs - - - Roslyn\LanguageDebugInfoServiceTests.fs - - - Roslyn\DocumentDiagnosticAnalyzerTests.fs - - - Roslyn\ProjectDiagnosticAnalyzerTests.fs - - - Roslyn\CompletionProviderTests.fs - - - Roslyn\SignatureHelpProviderTests.fs - - - Roslyn\GoToDefinitionServiceTests.fs - - - Roslyn\QuickInfoProviderTests.fs - - - Roslyn\DocumentHighlightsServiceTests.fs - - - VisualFSharp.Unittests.dll.config - {VisualStudioVersion} - $(VisualStudioVersion) - {FinalDir} - $([System.IO.Path]::GetFullPath('$(OutputPath)'))\ - - - - - - - - - - - - - - - - - - - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualFSharp.Msbuild.15.0.1.0.1\lib\net45\Microsoft.Build.Framework.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualFSharp.Msbuild.15.0.1.0.1\lib\net45\Microsoft.Build.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualFSharp.Msbuild.15.0.1.0.1\lib\net45\Microsoft.Build.Utilities.Core.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualFSharp.Msbuild.15.0.1.0.1\lib\net45\Microsoft.Build.Tasks.Core.dll - - - $(FSharpSourcesRoot)\..\packages\EnvDTE.8.0.1\lib\net10\EnvDTE.dll - True - - - $(FSharpSourcesRoot)\..\packages\EnvDTE80.8.0.1\lib\net10\EnvDTE80.dll - True - - - $(FSharpSourcesRoot)\..\packages\VSSDK.VSLangProj.7.0.4\lib\net20\VSLangProj.dll - True - - - $(FSharpSourcesRoot)\..\packages\VSSDK.VSLangProj.8.8.0.4\lib\net20\VSLangProj80.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.OLE.Interop.7.10.6070\lib\Microsoft.VisualStudio.OLE.Interop.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.7.10.6071\lib\Microsoft.VisualStudio.Shell.Interop.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.8.0.8.0.50727\lib\Microsoft.VisualStudio.Shell.Interop.8.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.9.0.9.0.30729\lib\Microsoft.VisualStudio.Shell.Interop.9.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.10.0.10.0.30319\lib\Microsoft.VisualStudio.Shell.Interop.10.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Interop.11.0.11.0.61030\lib\Microsoft.VisualStudio.Shell.Interop.11.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Text.Logic.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Text.Logic.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Threading.$(MicrosoftVisualStudioThreadingVersion)\lib\net45\Microsoft.VisualStudio.Threading.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Validation.$(MicrosoftVisualStudioValidationVersion)\lib\net45\Microsoft.VisualStudio.Validation.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Text.UI.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Text.UI.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Text.UI.Wpf.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Text.UI.Wpf.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Text.Data.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Text.Data.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Design.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Shell.Design.dll - True - - - $(FSharpSourcesRoot)\..\packages\RoslynDependencies.Microsoft.VisualStudio.Text.Internal.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Text.Internal.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Language.Intellisense.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Language.Intellisense.dll - True - - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.$(RoslynVSBinariesVersion).$(RoslynVSPackagesVersion)\lib\Microsoft.VisualStudio.Shell.$(RoslynVSBinariesVersion).dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Framework.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Shell.Framework.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.CoreUtility.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.CoreUtility.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Editor.$(RoslynVSPackagesVersion)\lib\net45\Microsoft.VisualStudio.Editor.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.TextManager.Interop.7.10.6070\lib\Microsoft.VisualStudio.TextManager.Interop.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.TextManager.Interop.8.0.8.0.50727\lib\Microsoft.VisualStudio.TextManager.Interop.8.0.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Shell.Immutable.10.0.10.0.30319\lib\net40\Microsoft.VisualStudio.Shell.Immutable.10.0.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Designer.Interfaces.1.1.4322\lib\microsoft.visualstudio.designer.interfaces.dll - - - $(FSharpSourcesRoot)\..\packages\VSSDK.VSHelp.7.0.4\lib\net20\Microsoft.VisualStudio.VSHelp.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.Telemetry.15.0.777-rtm6FAA2C78\lib\net45\Microsoft.VisualStudio.Telemetry.dll - - - True - $(NUnitLibDir)\nunit.framework.dll - - - $(FSharpSourcesRoot)\..\packages\Microsoft.CodeAnalysis.Common.$(RoslynVersion)\lib\netstandard1.3\Microsoft.CodeAnalysis.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.CodeAnalysis.EditorFeatures.$(RoslynVersion)\lib\net46\Microsoft.CodeAnalysis.EditorFeatures.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.CodeAnalysis.EditorFeatures.Text.$(RoslynVersion)\lib\net46\Microsoft.CodeAnalysis.EditorFeatures.Text.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.CodeAnalysis.Features.$(RoslynVersion)\lib\netstandard1.3\Microsoft.CodeAnalysis.Features.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.CodeAnalysis.Workspaces.Common.$(RoslynVersion)\lib\netstandard1.3\Microsoft.CodeAnalysis.Workspaces.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.VisualStudio.LanguageServices.$(RoslynVersion)\lib\net46\Microsoft.VisualStudio.LanguageServices.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.Composition.1.0.30\lib\portable-net45+win8+wp8+wpa81\System.Composition.AttributedModel.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.Composition.1.0.30\lib\portable-net45+win8+wp8+wpa81\System.Composition.Convention.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.Composition.1.0.30\lib\portable-net45+win8+wp8+wpa81\System.Composition.Hosting.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.Composition.1.0.30\lib\portable-net45+win8+wp8+wpa81\System.Composition.Runtime.dll - True - - - $(FSharpSourcesRoot)\..\packages\Microsoft.Composition.1.0.30\lib\portable-net45+win8+wp8+wpa81\System.Composition.TypedParts.dll - True - - - $(FSharpSourcesRoot)\..\packages\System.Collections.Immutable.$(SystemCollectionsImmutableVersion)\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll - True - - - $(FSharpSourcesRoot)\..\packages\System.Threading.Tasks.Dataflow.4.5.24\lib\portable-net45+win8+wp8+wpa81\System.Threading.Tasks.Dataflow.dll - True - - - {DED3BBD7-53F4-428A-8C9F-27968E768605} - FSharp.Core - - - FSharp.Build - {702a7979-bcf9-4c41-853e-3adfc9897890} - True - - - CSharp_Analysis - {887630A3-4B1D-40EA-B8B3-2D842E9C40DB} - True - - - {2E4D67B4-522D-4CF7-97E4-BA940F0B18F3} - FSharp.Compiler.Private - True - - - $(FSharpSourcesRoot)\..\packages\System.ValueTuple.4.3.1\lib\netstandard1.0\System.ValueTuple.dll - true - - - VisualFSharp.Salsa - {fbd4b354-dc6e-4032-8ec7-c81d8dfb1af7} - True - - - FSharp.LanguageService.Base - {1c5c163c-37ea-4a3c-8ccc-0d34b74bf8ef} - True - - - FSharp.LanguageService - {ee85aab7-cda0-4c4e-bda0-a64ccc413e3f} - True - - - ProjectSystem.Base - {b700e38b-f8c0-4e49-b5ec-db7b7ac0c4e7} - True - - - FSharp.ProjectSystem.FSharp - {6196B0F8-CAEA-4CF1-AF82-1B520F77FE44} - True - - - FSharp.Editor - {65e0e82a-eace-4787-8994-888674c2fe87} - True - - - - - \ No newline at end of file diff --git a/vsintegration/update-vsintegration.cmd b/vsintegration/update-vsintegration.cmd index 35dd8014330..3e2564d30ae 100644 --- a/vsintegration/update-vsintegration.cmd +++ b/vsintegration/update-vsintegration.cmd @@ -20,7 +20,7 @@ @rem * Installation of F# FSC compiler and FSI are done in the SHARED SDK directory. Henceforth @rem each installation of Visual Studio 2017 will use the updated FSC.exe and the commandline @rem FSI.exe. The in-product VS FSI plugin, syntax highlighting and IntelliSense must be -@rem installed through VSIXInstaller.exe debug\net40\bin\VisualFSharpOpenSource.vsix +@rem installed through VSIXInstaller.exe debug\net40\bin\VisualFSharpFull.vsix @rem @rem This procedure needs to be changed once F# supports multiple side-by-side installations @rem at which point everything will go through VSIXInstaller.exe @@ -83,7 +83,7 @@ GOTO :start echo. echo Installs or restores F# SDK bits, which applies system-wide to all Visual Studio -echo 2017 installations. After running this, each project targeting F# 4.1 will use +echo 2017 installations. After running this, each project targeting F# 4.5 will use echo your locally built FSC.exe. It will not update other F# tools, see remarks below. echo. echo Requires Administrator privileges for removing/restoring strong-naming. @@ -117,12 +117,12 @@ echo. echo For Release builds: echo. echo ^> VSIXInstaller.exe /u:"VisualFSharp" -echo ^> VSIXInstaller.exe release\net40\bin\VisualFSharpOpenSource.vsix +echo ^> VSIXInstaller.exe release\net40\bin\VisualFSharpFull.vsix echo. echo For Debug builds: echo. echo ^> VSIXInstaller.exe /u:"VisualFSharp" -echo ^> VSIXInstaller.exe debug\net40\bin\VisualFSharpOpenSource.vsix +echo ^> VSIXInstaller.exe debug\net40\bin\VisualFSharpFull.vsix echo. exit /b 1 @@ -158,8 +158,8 @@ set SN64="%WINSDKNETFXTOOLS%x64\sn.exe" set NGEN32=%windir%\Microsoft.NET\Framework\v4.0.30319\ngen.exe set NGEN64=%windir%\Microsoft.NET\Framework64\v4.0.30319\ngen.exe -set FSHARPVERSION=4.1 -set FSHARPVERSION2=41 +set FSHARPVERSION=4.3 +set FSHARPVERSION2=43 rem The various locations of the SDK and tools @@ -226,6 +226,7 @@ if "!BIN_AVAILABLE!" == "true" ( CALL :backupAndOrCopy Microsoft.Portable.FSharp.Targets "%COMPILERSDKPATH%" CALL :backupAndOrCopy Microsoft.FSharp.NetSdk.props "%COMPILERSDKPATH%" CALL :backupAndOrCopy Microsoft.FSharp.NetSdk.targets "%COMPILERSDKPATH%" + CALL :backupAndOrCopy Microsoft.FSharp.Overrides.NetSdk.targets "%COMPILERSDKPATH%" rem Special casing for SupportedRuntimes.xml, it has a different source directory, it's always there set SOURCEDIR="%TOPDIR%\vsintegration\src\SupportedRuntimes" @@ -250,68 +251,6 @@ if "!BIN_AVAILABLE!" == "true" ( ) -rem Deploying for .NET Core 3.7 - -echo. -CALL :colorEcho 02 "[!ACTION!] Processing files for profile_7" & echo. - -set SOURCEDIR=%BINDIR%\..\..\portable7\bin -set RESTOREDIR=!RESTOREBASE!\profile_7 -CALL :checkAvailability profile_7 -if "!BIN_AVAILABLE!" == "true" ( - CALL :backupAndOrCopy FSharp.Core.dll "%COMPILER7ASSEMBLIESPATH%" - CALL :backupAndOrCopy FSharp.Core.optdata "%COMPILER7ASSEMBLIESPATH%" - CALL :backupAndOrCopy FSharp.Core.sigdata "%COMPILER7ASSEMBLIESPATH%" - CALL :backupAndOrCopy FSharp.Core.xml "%COMPILER7ASSEMBLIESPATH%" -) - - -rem Deploying for .NET Core 3.78 - -echo. -CALL :colorEcho 02 "[!ACTION!] Processing files for profile_78" & echo. - -set SOURCEDIR=%BINDIR%\..\..\portable78\bin -set RESTOREDIR=!RESTOREBASE!\profile_78 -CALL :checkAvailability profile_78 -if "!BIN_AVAILABLE!" == "true" ( - CALL :backupAndOrCopy FSharp.Core.dll "%COMPILER78ASSEMBLIESPATH%" - CALL :backupAndOrCopy FSharp.Core.optdata "%COMPILER78ASSEMBLIESPATH%" - CALL :backupAndOrCopy FSharp.Core.sigdata "%COMPILER78ASSEMBLIESPATH%" - CALL :backupAndOrCopy FSharp.Core.xml "%COMPILER78ASSEMBLIESPATH%" -) - - -rem Deploying for .NET Core 3.259 - -echo. -CALL :colorEcho 02 "[!ACTION!] Processing files for profile_259" & echo. - -set SOURCEDIR=%BINDIR%\..\..\portable259\bin -set RESTOREDIR=!RESTOREBASE!\profile_259 -CALL :checkAvailability profile_259 -if "!BIN_AVAILABLE!" == "true" ( - CALL :backupAndOrCopy FSharp.Core.dll "%COMPILER259ASSEMBLIESPATH%" - CALL :backupAndOrCopy FSharp.Core.optdata "%COMPILER259ASSEMBLIESPATH%" - CALL :backupAndOrCopy FSharp.Core.sigdata "%COMPILER259ASSEMBLIESPATH%" - CALL :backupAndOrCopy FSharp.Core.xml "%COMPILER259ASSEMBLIESPATH%" -) - - -rem Deploying for .NET Portable 3.47 - -echo. -CALL :colorEcho 02 "[!ACTION!] Processing files for profile_47" & echo. - -set SOURCEDIR=%BINDIR%\..\..\portable47\bin -set RESTOREDIR=!RESTOREBASE!\profile_47 -CALL :checkAvailability profile_47 -if "!BIN_AVAILABLE!" == "true" ( - CALL :backupAndOrCopy FSharp.Core.dll "%COMPILER47ASSEMBLIESPATH%" - CALL :backupAndOrCopy FSharp.Core.optdata "%COMPILER47ASSEMBLIESPATH%" - CALL :backupAndOrCopy FSharp.Core.sigdata "%COMPILER47ASSEMBLIESPATH%" - CALL :backupAndOrCopy FSharp.Core.xml "%COMPILER47ASSEMBLIESPATH%" -) REM TODO: this was already here (2017-09-28) and was already commented out, I think (AB) that these redirects aren't necessary anymore and can be permanently removed REM echo ^^^^^ ^^^^^ > "%X86_PROGRAMFILES%\Reference Assemblies\Microsoft\FSharp\.NETFramework\v4.0\4.%FSHARPVERSION%.0\pub.config" @@ -345,7 +284,7 @@ if "%DEPLOY%" == "yes" if "!ISADMIN!" == "yes" ( !SN32! -Vr FSharp.ProjectSystem.FSharp,b03f5f7f11d50a3a 1>NUL 2>NUL !SN32! -Vr FSharp.ProjectSystem.PropertyPages,b03f5f7f11d50a3a 1>NUL 2>NUL !SN32! -Vr FSharp.VS.FSI,b03f5f7f11d50a3a 1>NUL 2>NUL - !SN32! -Vr VisualFSharp.Unittests,b03f5f7f11d50a3a 1>NUL 2>NUL + !SN32! -Vr VisualFSharp.UnitTests,b03f5f7f11d50a3a 1>NUL 2>NUL !SN32! -Vr VisualFSharp.Salsa,b03f5f7f11d50a3a 1>NUL 2>NUL REM Do this *in addition* to the above for x64 systems @@ -364,7 +303,7 @@ if "%DEPLOY%" == "yes" if "!ISADMIN!" == "yes" ( !SN64! -Vr FSharp.ProjectSystem.FSharp,b03f5f7f11d50a3a 1>NUL 2>NUL !SN64! -Vr FSharp.ProjectSystem.PropertyPages,b03f5f7f11d50a3a 1>NUL 2>NUL !SN64! -Vr FSharp.VS.FSI,b03f5f7f11d50a3a 1>NUL 2>NUL - !SN64! -Vr VisualFSharp.Unittests,b03f5f7f11d50a3a 1>NUL 2>NUL + !SN64! -Vr VisualFSharp.UnitTests,b03f5f7f11d50a3a 1>NUL 2>NUL !SN64! -Vr VisualFSharp.Salsa,b03f5f7f11d50a3a 1>NUL 2>NUL ) @@ -417,7 +356,7 @@ if "%ACTION%" == "restore" if "!ISADMIN!" == "yes" ( !SN32! -Vu FSharp.ProjectSystem.FSharp,b03f5f7f11d50a3a 2>NUL 1>NUL !SN32! -Vu FSharp.ProjectSystem.PropertyPages,b03f5f7f11d50a3a 2>NUL 1>NUL !SN32! -Vu FSharp.VS.FSI,b03f5f7f11d50a3a 2>NUL 1>NUL - !SN32! -Vu VisualFSharp.Unittests,b03f5f7f11d50a3a 2>NUL 1>NUL + !SN32! -Vu VisualFSharp.UnitTests,b03f5f7f11d50a3a 2>NUL 1>NUL !SN32! -Vu VisualFSharp.Salsa,b03f5f7f11d50a3a 2>NUL 1>NUL REM Do this *in addition* to the above for x64 systems @@ -436,7 +375,7 @@ if "%ACTION%" == "restore" if "!ISADMIN!" == "yes" ( !SN64! -Vu FSharp.ProjectSystem.FSharp,b03f5f7f11d50a3a 2>NUL 1>NUL !SN64! -Vu FSharp.ProjectSystem.PropertyPages,b03f5f7f11d50a3a 2>NUL 1>NUL !SN64! -Vu FSharp.VS.FSI,b03f5f7f11d50a3a 2>NUL 1>NUL - !SN64! -Vu VisualFSharp.Unittests,b03f5f7f11d50a3a 2>NUL 1>NUL + !SN64! -Vu VisualFSharp.UnitTests,b03f5f7f11d50a3a 2>NUL 1>NUL !SN64! -Vu VisualFSharp.Salsa,b03f5f7f11d50a3a 2>NUL 1>NUL ) diff --git a/vsintegration/vsintegration.targets b/vsintegration/vsintegration.targets deleted file mode 100644 index 8e545af1f30..00000000000 --- a/vsintegration/vsintegration.targets +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - -